diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,1106 @@
+# 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.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/hydra.cabal b/hydra.cabal
--- a/hydra.cabal
+++ b/hydra.cabal
@@ -5,1244 +5,34 @@
 -- see: https://github.com/sol/hpack
 
 name:           hydra
-version:        0.15.0
-synopsis:       The Hydra Haskell head: primitives, DSL infrastructure, generation driver
-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". The Haskell head provides the hand-written Haskell runtime Hydra needs in order to build and regenerate itself: primitive libraries (Hydra.Lib.*), the embedded DSL infrastructure (Hydra.Dsl.*), the generation driver (Hydra.Generation), the kernel entry point (Hydra.Kernel), module support utilities, and the exec binaries that drive Hydra's Haskell code generation. It consumes the language-independent kernel DSL sources and generated kernel runtime from packages/hydra-kernel/, plus the Haskell coder DSL sources and generated output from packages/hydra-haskell/, and produces all Haskell-host build artifacts.
-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
-
-source-repository head
-  type: git
-  location: https://github.com/CategoricalData/hydra
-
-library
-  exposed-modules:
-      Com.Gdblab.PathAlgebra.Expressions
-      Com.Gdblab.PathAlgebra.Syntax
-      Hydra.Adapt
-      Hydra.Analysis
-      Hydra.Annotations
-      Hydra.Arity
-      Hydra.Ast
-      Hydra.Atlas
-      Hydra.Avro.Coder
-      Hydra.Avro.Encoder
-      Hydra.Avro.Environment
-      Hydra.Avro.Language
-      Hydra.Avro.Schema
-      Hydra.Avro.SchemaJson
-      Hydra.Avro.Testing
-      Hydra.Azure.Dtld
-      Hydra.Checking
-      Hydra.Classes
-      Hydra.Codegen
-      Hydra.Coders
-      Hydra.Constants
-      Hydra.Context
-      Hydra.Coq.Coder
-      Hydra.Coq.Environment
-      Hydra.Coq.Generate
-      Hydra.Coq.GenerateDriver
-      Hydra.Coq.Language
-      Hydra.Coq.Serde
-      Hydra.Coq.Syntax
-      Hydra.Coq.Utils
-      Hydra.Core
-      Hydra.Cpp.Coder
-      Hydra.Cpp.Environment
-      Hydra.Cpp.Language
-      Hydra.Cpp.Names
-      Hydra.Cpp.Serde
-      Hydra.Cpp.Syntax
-      Hydra.Cpp.Utils
-      Hydra.Csharp.Language
-      Hydra.Csharp.Syntax
-      Hydra.Cypher.Features
-      Hydra.Cypher.OpenCypher
-      Hydra.Datalog.Syntax
-      Hydra.Decode.Ast
-      Hydra.Decode.Classes
-      Hydra.Decode.Coders
-      Hydra.Decode.Context
-      Hydra.Decode.Core
-      Hydra.Decode.Error.Checking
-      Hydra.Decode.Error.Core
-      Hydra.Decode.Errors
-      Hydra.Decode.Json.Model
-      Hydra.Decode.Packaging
-      Hydra.Decode.Parsing
-      Hydra.Decode.Paths
-      Hydra.Decode.Pg.Mapping
-      Hydra.Decode.Pg.Model
-      Hydra.Decode.Phantoms
-      Hydra.Decode.Query
-      Hydra.Decode.Relational
-      Hydra.Decode.Tabular
-      Hydra.Decode.Testing
-      Hydra.Decode.Topology
-      Hydra.Decode.Typing
-      Hydra.Decode.Util
-      Hydra.Decode.Variants
-      Hydra.Decoding
-      Hydra.Delta.Parquet
-      Hydra.Demos.AvroBicoder
-      Hydra.Demos.AvroToPropertyGraphs
-      Hydra.Demos.Genpg.Demo
-      Hydra.Demos.Genpg.ExampleDatabaseSchema
-      Hydra.Demos.Genpg.ExampleGraphSchema
-      Hydra.Demos.Genpg.ExampleMapping
-      Hydra.Demos.Genpg.Examples.Health.DatabaseSchema
-      Hydra.Demos.Genpg.Examples.Health.GraphSchema
-      Hydra.Demos.Genpg.Examples.Health.Mapping
-      Hydra.Demos.Genpg.Examples.Sales.DatabaseSchema
-      Hydra.Demos.Genpg.Examples.Sales.GraphSchema
-      Hydra.Demos.Genpg.Examples.Sales.Mapping
-      Hydra.Demos.Genpg.GenerateJava
-      Hydra.Demos.Genpg.GeneratePython
-      Hydra.Demos.Genpg.Modules
-      Hydra.Demos.Genpg.Rdf
-      Hydra.Demos.Genpg.Runtime
-      Hydra.Demos.Genpg.Transform
-      Hydra.Demos.Grad.Demo
-      Hydra.Demos.GraphqlJson
-      Hydra.Demos.MeteredEvaluation
-      Hydra.Demos.Shacl.Demo
-      Hydra.Demos.Shacl.ShaclRdf
-      Hydra.Demos.ValidatePg.Demo
-      Hydra.Dependencies
-      Hydra.Differentiation
-      Hydra.Digest
-      Hydra.Dsl.Annotations
-      Hydra.Dsl.Ast
-      Hydra.Dsl.AsTerm
-      Hydra.Dsl.AsType
-      Hydra.Dsl.Atlas
-      Hydra.Dsl.Avro.Environment
-      Hydra.Dsl.Avro.Schema
-      Hydra.Dsl.Avro.Testing
-      Hydra.Dsl.Azure.Dtld
-      Hydra.Dsl.Bootstrap
-      Hydra.Dsl.Classes
-      Hydra.Dsl.Coders
-      Hydra.Dsl.Com.Gdblab.PathAlgebra.Expressions
-      Hydra.Dsl.Com.Gdblab.PathAlgebra.Syntax
-      Hydra.Dsl.Context
-      Hydra.Dsl.Coq.Environment
-      Hydra.Dsl.Coq.Syntax
-      Hydra.Dsl.Core
-      Hydra.Dsl.Cpp.Environment
-      Hydra.Dsl.Cpp.Syntax
-      Hydra.Dsl.Csharp.Syntax
-      Hydra.Dsl.Cypher.Features
-      Hydra.Dsl.Cypher.OpenCypher
-      Hydra.Dsl.Datalog.Syntax
-      Hydra.Dsl.Deep.Lib.Math
-      Hydra.Dsl.Delta.Parquet
-      Hydra.Dsl.Error.Checking
-      Hydra.Dsl.Error.Core
-      Hydra.Dsl.Error.Packaging
-      Hydra.Dsl.Error.Pg
-      Hydra.Dsl.Errors
-      Hydra.Dsl.Geojson.Model
-      Hydra.Dsl.Go.Syntax
-      Hydra.Dsl.Graph
-      Hydra.Dsl.Graphql.Syntax
-      Hydra.Dsl.Graphviz.Dot
-      Hydra.Dsl.Haskell.Environment
-      Hydra.Dsl.Haskell.Syntax
-      Hydra.Dsl.Iana.Linkrelations
-      Hydra.Dsl.Java.Environment
-      Hydra.Dsl.Java.Helpers
-      Hydra.Dsl.Java.Syntax
-      Hydra.Dsl.JavaScript.Helpers
-      Hydra.Dsl.JavaScript.Syntax
-      Hydra.Dsl.Json.Model
-      Hydra.Dsl.Json.Schema
-      Hydra.Dsl.Kusto.Kql
-      Hydra.Dsl.Lisp.Syntax
-      Hydra.Dsl.Literals
-      Hydra.Dsl.LiteralTypes
-      Hydra.Dsl.Meta.Base
-      Hydra.Dsl.Meta.Common
-      Hydra.Dsl.Meta.Context
-      Hydra.Dsl.Meta.Core
-      Hydra.Dsl.Meta.DeepCore
-      Hydra.Dsl.Meta.Graph
-      Hydra.Dsl.Meta.Lib.Chars
-      Hydra.Dsl.Meta.Lib.Eithers
-      Hydra.Dsl.Meta.Lib.Equality
-      Hydra.Dsl.Meta.Lib.Lists
-      Hydra.Dsl.Meta.Lib.Literals
-      Hydra.Dsl.Meta.Lib.Logic
-      Hydra.Dsl.Meta.Lib.Maps
-      Hydra.Dsl.Meta.Lib.Math
-      Hydra.Dsl.Meta.Lib.Maybes
-      Hydra.Dsl.Meta.Lib.Pairs
-      Hydra.Dsl.Meta.Lib.Regex
-      Hydra.Dsl.Meta.Lib.Sets
-      Hydra.Dsl.Meta.Lib.Strings
-      Hydra.Dsl.Meta.Literals
-      Hydra.Dsl.Meta.Phantoms
-      Hydra.Dsl.Meta.Tabular
-      Hydra.Dsl.Meta.Terms
-      Hydra.Dsl.Meta.Testing
-      Hydra.Dsl.Meta.Types
-      Hydra.Dsl.Meta.Variants
-      Hydra.Dsl.OpenGql.Grammar
-      Hydra.Dsl.Osv.Schema
-      Hydra.Dsl.Owl.Syntax
-      Hydra.Dsl.Packaging
-      Hydra.Dsl.Parquet.Format
-      Hydra.Dsl.Parsing
-      Hydra.Dsl.Paths
-      Hydra.Dsl.Pegasus.Pdl
-      Hydra.Dsl.Pg.Graphson.Syntax
-      Hydra.Dsl.Pg.Mapping
-      Hydra.Dsl.Pg.Mappings
-      Hydra.Dsl.Pg.Model
-      Hydra.Dsl.Pg.Query
-      Hydra.Dsl.Pg.Rdf.Environment
-      Hydra.Dsl.Pg.Schemas
-      Hydra.Dsl.Prims
-      Hydra.Dsl.Protobuf.Any
-      Hydra.Dsl.Protobuf.Environment
-      Hydra.Dsl.Protobuf.Proto3
-      Hydra.Dsl.Protobuf.SourceContext
-      Hydra.Dsl.Python.Environment
-      Hydra.Dsl.Python.Helpers
-      Hydra.Dsl.Python.Syntax
-      Hydra.Dsl.Query
-      Hydra.Dsl.Rdf.Syntax
-      Hydra.Dsl.Relational
-      Hydra.Dsl.Rust.Syntax
-      Hydra.Dsl.Scala.Syntax
-      Hydra.Dsl.Shacl.Model
-      Hydra.Dsl.Shex.Syntax
-      Hydra.Dsl.Sql.Syntax
-      Hydra.Dsl.Stac.Items
-      Hydra.Dsl.Tabular
-      Hydra.Dsl.Terms
-      Hydra.Dsl.Testing
-      Hydra.Dsl.Tests
-      Hydra.Dsl.Tinkerpop.Features
-      Hydra.Dsl.Tinkerpop.Gremlin
-      Hydra.Dsl.Topology
-      Hydra.Dsl.Types
-      Hydra.Dsl.TypeScript.Model
-      Hydra.Dsl.Typing
-      Hydra.Dsl.Util
-      Hydra.Dsl.Variants
-      Hydra.Dsl.Workflow
-      Hydra.Dsl.Xml.Schema
-      Hydra.Dsl.Yaml.Model
-      Hydra.Dsls
-      Hydra.Encode.Ast
-      Hydra.Encode.Classes
-      Hydra.Encode.Coders
-      Hydra.Encode.Context
-      Hydra.Encode.Core
-      Hydra.Encode.Error.Checking
-      Hydra.Encode.Error.Core
-      Hydra.Encode.Errors
-      Hydra.Encode.Json.Model
-      Hydra.Encode.Packaging
-      Hydra.Encode.Parsing
-      Hydra.Encode.Paths
-      Hydra.Encode.Pg.Mapping
-      Hydra.Encode.Pg.Model
-      Hydra.Encode.Phantoms
-      Hydra.Encode.Query
-      Hydra.Encode.Relational
-      Hydra.Encode.Tabular
-      Hydra.Encode.Testing
-      Hydra.Encode.Topology
-      Hydra.Encode.Typing
-      Hydra.Encode.Util
-      Hydra.Encode.Variants
-      Hydra.Encoding
-      Hydra.Environment
-      Hydra.Error.Checking
-      Hydra.Error.Core
-      Hydra.Error.Packaging
-      Hydra.Error.Pg
-      Hydra.Errors
-      Hydra.Eval.Lib.Eithers
-      Hydra.Eval.Lib.Equality
-      Hydra.Eval.Lib.Lists
-      Hydra.Eval.Lib.Logic
-      Hydra.Eval.Lib.Maps
-      Hydra.Eval.Lib.Math
-      Hydra.Eval.Lib.Maybes
-      Hydra.Eval.Lib.Pairs
-      Hydra.Eval.Lib.Sets
-      Hydra.ExtGeneration
-      Hydra.Extract.Core
-      Hydra.Extract.Json
-      Hydra.Extract.Util
-      Hydra.Formatting
-      Hydra.Generation
-      Hydra.Geojson.Model
-      Hydra.Go.Language
-      Hydra.Go.Syntax
-      Hydra.Graph
-      Hydra.Graphql.Coder
-      Hydra.Graphql.Language
-      Hydra.Graphql.Serde
-      Hydra.Graphql.Syntax
-      Hydra.Graphviz.Coder
-      Hydra.Graphviz.Dot
-      Hydra.Graphviz.Serde
-      Hydra.Haskell.Coder
-      Hydra.Haskell.Environment
-      Hydra.Haskell.Generation
-      Hydra.Haskell.Language
-      Hydra.Haskell.Operators
-      Hydra.Haskell.Serde
-      Hydra.Haskell.Syntax
-      Hydra.Haskell.Testing
-      Hydra.Haskell.Utils
-      Hydra.Hoisting
-      Hydra.Iana.Linkrelations
-      Hydra.Inference
-      Hydra.Java.Coder
-      Hydra.Java.Environment
-      Hydra.Java.Language
-      Hydra.Java.Names
-      Hydra.Java.Serde
-      Hydra.Java.Syntax
-      Hydra.Java.Testing
-      Hydra.Java.Utils
-      Hydra.JavaScript.Language
-      Hydra.JavaScript.Operators
-      Hydra.JavaScript.Serde
-      Hydra.JavaScript.Syntax
-      Hydra.Json.Bootstrap
-      Hydra.Json.Decode
-      Hydra.Json.Decoding
-      Hydra.Json.Encode
-      Hydra.Json.Model
-      Hydra.Json.Parser
-      Hydra.Json.Schema
-      Hydra.Json.Schema.Coder
-      Hydra.Json.Schema.Language
-      Hydra.Json.Schema.Serde
-      Hydra.Json.Writer
-      Hydra.Json.Yaml.Decode
-      Hydra.Json.Yaml.Encode
-      Hydra.Kernel
-      Hydra.Kusto.Kql
-      Hydra.Languages
-      Hydra.Lexical
-      Hydra.Lib.Chars
-      Hydra.Lib.Eithers
-      Hydra.Lib.Equality
-      Hydra.Lib.Lists
-      Hydra.Lib.Literals
-      Hydra.Lib.Logic
-      Hydra.Lib.Maps
-      Hydra.Lib.Math
-      Hydra.Lib.Maybes
-      Hydra.Lib.Names
-      Hydra.Lib.Pairs
-      Hydra.Lib.Regex
-      Hydra.Lib.Sets
-      Hydra.Lib.Strings
-      Hydra.Lisp.Coder
-      Hydra.Lisp.Language
-      Hydra.Lisp.Serde
-      Hydra.Lisp.Syntax
-      Hydra.Literals
-      Hydra.Minimal
-      Hydra.Module.Compat
-      Hydra.Names
-      Hydra.Osv.Schema
-      Hydra.Owl.Syntax
-      Hydra.PackageRouting
-      Hydra.Packaging
-      Hydra.Parquet.Format
-      Hydra.Parsers
-      Hydra.Parsing
-      Hydra.Paths
-      Hydra.Pegasus.Coder
-      Hydra.Pegasus.Language
-      Hydra.Pegasus.Pdl
-      Hydra.Pegasus.Serde
-      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.Phantoms
-      Hydra.Predicates
-      Hydra.Protobuf.Any
-      Hydra.Protobuf.Coder
-      Hydra.Protobuf.Environment
-      Hydra.Protobuf.Language
-      Hydra.Protobuf.Proto3
-      Hydra.Protobuf.Serde
-      Hydra.Protobuf.SourceContext
-      Hydra.Python.Coder
-      Hydra.Python.Environment
-      Hydra.Python.Language
-      Hydra.Python.Names
-      Hydra.Python.Serde
-      Hydra.Python.Syntax
-      Hydra.Python.Testing
-      Hydra.Python.Utils
-      Hydra.Query
-      Hydra.Rdf.Serde
-      Hydra.Rdf.Syntax
-      Hydra.Rdf.Utils
-      Hydra.Reduction
-      Hydra.Reflect
-      Hydra.Relational
-      Hydra.Resolution
-      Hydra.Rewriting
-      Hydra.Rust.Coder
-      Hydra.Rust.Language
-      Hydra.Rust.Operators
-      Hydra.Rust.Serde
-      Hydra.Rust.Syntax
-      Hydra.Scala.Coder
-      Hydra.Scala.Language
-      Hydra.Scala.Prepare
-      Hydra.Scala.Serde
-      Hydra.Scala.Syntax
-      Hydra.Scala.Utils
-      Hydra.Scoping
-      Hydra.Serialization
-      Hydra.Settings
-      Hydra.Shacl.Coder
-      Hydra.Shacl.Language
-      Hydra.Shacl.Model
-      Hydra.Shex.Syntax
-      Hydra.Show.Core
-      Hydra.Show.Error.Core
-      Hydra.Show.Errors
-      Hydra.Show.Graph
-      Hydra.Show.Paths
-      Hydra.Show.Typing
-      Hydra.Show.Util
-      Hydra.Show.Variants
-      Hydra.Sorting
-      Hydra.Sources.All
-      Hydra.Sources.Avro.Coder
-      Hydra.Sources.Avro.Encoder
-      Hydra.Sources.Avro.Environment
-      Hydra.Sources.Avro.Language
-      Hydra.Sources.Avro.Schema
-      Hydra.Sources.Avro.SchemaJson
-      Hydra.Sources.Avro.Testing
-      Hydra.Sources.Coq.Coder
-      Hydra.Sources.Coq.Environment
-      Hydra.Sources.Coq.Generate
-      Hydra.Sources.Coq.Language
-      Hydra.Sources.Coq.Manifest
-      Hydra.Sources.Coq.Serde
-      Hydra.Sources.Coq.Syntax
-      Hydra.Sources.Coq.Utils
-      Hydra.Sources.Cpp.Coder
-      Hydra.Sources.Cpp.Environment
-      Hydra.Sources.Cpp.Language
-      Hydra.Sources.Cpp.Names
-      Hydra.Sources.Cpp.Serde
-      Hydra.Sources.Cpp.Syntax
-      Hydra.Sources.Cpp.Utils
-      Hydra.Sources.Csharp.Language
-      Hydra.Sources.Csharp.Syntax
-      Hydra.Sources.Cypher.Features
-      Hydra.Sources.Cypher.Functions
-      Hydra.Sources.Cypher.OpenCypher
-      Hydra.Sources.Decode.Ast
-      Hydra.Sources.Decode.Classes
-      Hydra.Sources.Decode.Coders
-      Hydra.Sources.Decode.Context
-      Hydra.Sources.Decode.Core
-      Hydra.Sources.Decode.Error.Checking
-      Hydra.Sources.Decode.Error.Core
-      Hydra.Sources.Decode.Error.Packaging
-      Hydra.Sources.Decode.Errors
-      Hydra.Sources.Decode.Json.Model
-      Hydra.Sources.Decode.Packaging
-      Hydra.Sources.Decode.Parsing
-      Hydra.Sources.Decode.Paths
-      Hydra.Sources.Decode.Pg.Mapping
-      Hydra.Sources.Decode.Pg.Model
-      Hydra.Sources.Decode.Phantoms
-      Hydra.Sources.Decode.Query
-      Hydra.Sources.Decode.Relational
-      Hydra.Sources.Decode.Tabular
-      Hydra.Sources.Decode.Testing
-      Hydra.Sources.Decode.Topology
-      Hydra.Sources.Decode.Typing
-      Hydra.Sources.Decode.Util
-      Hydra.Sources.Decode.Variants
-      Hydra.Sources.Delta.Parquet
-      Hydra.Sources.Demos.GenPG.Transform
-      Hydra.Sources.Encode.Ast
-      Hydra.Sources.Encode.Classes
-      Hydra.Sources.Encode.Coders
-      Hydra.Sources.Encode.Context
-      Hydra.Sources.Encode.Core
-      Hydra.Sources.Encode.Error.Checking
-      Hydra.Sources.Encode.Error.Core
-      Hydra.Sources.Encode.Error.Packaging
-      Hydra.Sources.Encode.Errors
-      Hydra.Sources.Encode.Json.Model
-      Hydra.Sources.Encode.Packaging
-      Hydra.Sources.Encode.Parsing
-      Hydra.Sources.Encode.Paths
-      Hydra.Sources.Encode.Pg.Mapping
-      Hydra.Sources.Encode.Pg.Model
-      Hydra.Sources.Encode.Phantoms
-      Hydra.Sources.Encode.Query
-      Hydra.Sources.Encode.Relational
-      Hydra.Sources.Encode.Tabular
-      Hydra.Sources.Encode.Testing
-      Hydra.Sources.Encode.Topology
-      Hydra.Sources.Encode.Typing
-      Hydra.Sources.Encode.Util
-      Hydra.Sources.Encode.Variants
-      Hydra.Sources.Error.Pg
-      Hydra.Sources.Eval.Lib.All
-      Hydra.Sources.Eval.Lib.Eithers
-      Hydra.Sources.Eval.Lib.Equality
-      Hydra.Sources.Eval.Lib.Lists
-      Hydra.Sources.Eval.Lib.Logic
-      Hydra.Sources.Eval.Lib.Maps
-      Hydra.Sources.Eval.Lib.Math
-      Hydra.Sources.Eval.Lib.Maybes
-      Hydra.Sources.Eval.Lib.Pairs
-      Hydra.Sources.Eval.Lib.Sets
-      Hydra.Sources.Ext
-      Hydra.Sources.Ext.Manifest
-      Hydra.Sources.Go.Language
-      Hydra.Sources.Go.Serde
-      Hydra.Sources.Go.Syntax
-      Hydra.Sources.Gql.OpenGql
-      Hydra.Sources.Gql.PathAlgebra.Expressions
-      Hydra.Sources.Gql.PathAlgebra.Syntax
-      Hydra.Sources.Graphql.Coder
-      Hydra.Sources.Graphql.Language
-      Hydra.Sources.Graphql.Serde
-      Hydra.Sources.Graphql.Syntax
-      Hydra.Sources.Graphviz.Coder
-      Hydra.Sources.Graphviz.Dot
-      Hydra.Sources.Graphviz.Serde
-      Hydra.Sources.Haskell.Coder
-      Hydra.Sources.Haskell.Environment
-      Hydra.Sources.Haskell.Language
-      Hydra.Sources.Haskell.Manifest
-      Hydra.Sources.Haskell.Operators
-      Hydra.Sources.Haskell.Serde
-      Hydra.Sources.Haskell.Syntax
-      Hydra.Sources.Haskell.Testing
-      Hydra.Sources.Haskell.Utils
-      Hydra.Sources.Java.Coder
-      Hydra.Sources.Java.Environment
-      Hydra.Sources.Java.Language
-      Hydra.Sources.Java.Manifest
-      Hydra.Sources.Java.Names
-      Hydra.Sources.Java.Serde
-      Hydra.Sources.Java.Syntax
-      Hydra.Sources.Java.Testing
-      Hydra.Sources.Java.Utils
-      Hydra.Sources.JavaScript.Language
-      Hydra.Sources.JavaScript.Manifest
-      Hydra.Sources.JavaScript.Operators
-      Hydra.Sources.JavaScript.Serde
-      Hydra.Sources.JavaScript.Syntax
-      Hydra.Sources.Json.Bootstrap
-      Hydra.Sources.Json.Decode
-      Hydra.Sources.Json.Decoding
-      Hydra.Sources.Json.Encode
-      Hydra.Sources.Json.Extract
-      Hydra.Sources.Json.Model
-      Hydra.Sources.Json.Parser
-      Hydra.Sources.Json.Schema
-      Hydra.Sources.Json.Schema.Coder
-      Hydra.Sources.Json.Schema.Language
-      Hydra.Sources.Json.Schema.Serde
-      Hydra.Sources.Json.Writer
-      Hydra.Sources.Json.Yaml.Decode
-      Hydra.Sources.Json.Yaml.Encode
-      Hydra.Sources.Kernel.Lib.Names
-      Hydra.Sources.Kernel.Manifest
-      Hydra.Sources.Kernel.Terms.Adapt
-      Hydra.Sources.Kernel.Terms.All
-      Hydra.Sources.Kernel.Terms.Analysis
-      Hydra.Sources.Kernel.Terms.Annotations
-      Hydra.Sources.Kernel.Terms.Arity
-      Hydra.Sources.Kernel.Terms.Checking
-      Hydra.Sources.Kernel.Terms.Constants
-      Hydra.Sources.Kernel.Terms.Decoding
-      Hydra.Sources.Kernel.Terms.Dependencies
-      Hydra.Sources.Kernel.Terms.Differentiation
-      Hydra.Sources.Kernel.Terms.Dsls
-      Hydra.Sources.Kernel.Terms.Encoding
-      Hydra.Sources.Kernel.Terms.Environment
-      Hydra.Sources.Kernel.Terms.Extract.Core
-      Hydra.Sources.Kernel.Terms.Extract.Util
-      Hydra.Sources.Kernel.Terms.Formatting
-      Hydra.Sources.Kernel.Terms.Generation
-      Hydra.Sources.Kernel.Terms.Hoisting
-      Hydra.Sources.Kernel.Terms.Inference
-      Hydra.Sources.Kernel.Terms.Languages
-      Hydra.Sources.Kernel.Terms.Lexical
-      Hydra.Sources.Kernel.Terms.Literals
-      Hydra.Sources.Kernel.Terms.Names
-      Hydra.Sources.Kernel.Terms.Parsers
-      Hydra.Sources.Kernel.Terms.Predicates
-      Hydra.Sources.Kernel.Terms.Reduction
-      Hydra.Sources.Kernel.Terms.Reflect
-      Hydra.Sources.Kernel.Terms.Resolution
-      Hydra.Sources.Kernel.Terms.Rewriting
-      Hydra.Sources.Kernel.Terms.Scoping
-      Hydra.Sources.Kernel.Terms.Serialization
-      Hydra.Sources.Kernel.Terms.Show.Core
-      Hydra.Sources.Kernel.Terms.Show.Error.Core
-      Hydra.Sources.Kernel.Terms.Show.Errors
-      Hydra.Sources.Kernel.Terms.Show.Graph
-      Hydra.Sources.Kernel.Terms.Show.Paths
-      Hydra.Sources.Kernel.Terms.Show.Typing
-      Hydra.Sources.Kernel.Terms.Show.Util
-      Hydra.Sources.Kernel.Terms.Show.Variants
-      Hydra.Sources.Kernel.Terms.Sorting
-      Hydra.Sources.Kernel.Terms.Strip
-      Hydra.Sources.Kernel.Terms.Substitution
-      Hydra.Sources.Kernel.Terms.Templates
-      Hydra.Sources.Kernel.Terms.Unification
-      Hydra.Sources.Kernel.Terms.Validate.Core
-      Hydra.Sources.Kernel.Terms.Validate.Packaging
-      Hydra.Sources.Kernel.Terms.Variables
-      Hydra.Sources.Kernel.Types.All
-      Hydra.Sources.Kernel.Types.Ast
-      Hydra.Sources.Kernel.Types.Classes
-      Hydra.Sources.Kernel.Types.Coders
-      Hydra.Sources.Kernel.Types.Context
-      Hydra.Sources.Kernel.Types.Core
-      Hydra.Sources.Kernel.Types.Error.Checking
-      Hydra.Sources.Kernel.Types.Error.Core
-      Hydra.Sources.Kernel.Types.Error.Packaging
-      Hydra.Sources.Kernel.Types.Errors
-      Hydra.Sources.Kernel.Types.Graph
-      Hydra.Sources.Kernel.Types.Packaging
-      Hydra.Sources.Kernel.Types.Parsing
-      Hydra.Sources.Kernel.Types.Paths
-      Hydra.Sources.Kernel.Types.Phantoms
-      Hydra.Sources.Kernel.Types.Query
-      Hydra.Sources.Kernel.Types.Relational
-      Hydra.Sources.Kernel.Types.Tabular
-      Hydra.Sources.Kernel.Types.Testing
-      Hydra.Sources.Kernel.Types.Topology
-      Hydra.Sources.Kernel.Types.Typing
-      Hydra.Sources.Kernel.Types.Util
-      Hydra.Sources.Kernel.Types.Variants
-      Hydra.Sources.Kusto.Kql
-      Hydra.Sources.Libraries
-      Hydra.Sources.Lisp.Coder
-      Hydra.Sources.Lisp.Language
-      Hydra.Sources.Lisp.Manifest
-      Hydra.Sources.Lisp.Serde
-      Hydra.Sources.Lisp.Syntax
-      Hydra.Sources.Other.Atlas
-      Hydra.Sources.Other.AzureDtld
-      Hydra.Sources.Other.Datalog
-      Hydra.Sources.Other.GeoJson
-      Hydra.Sources.Other.IanaRelations
-      Hydra.Sources.Other.Osv
-      Hydra.Sources.Other.StacItems
-      Hydra.Sources.Owl.Syntax
-      Hydra.Sources.Parquet.Format
-      Hydra.Sources.Pegasus.Coder
-      Hydra.Sources.Pegasus.Language
-      Hydra.Sources.Pegasus.Pdl
-      Hydra.Sources.Pegasus.Serde
-      Hydra.Sources.Pg.Coder
-      Hydra.Sources.Pg.Graphson.Coder
-      Hydra.Sources.Pg.Graphson.Construct
-      Hydra.Sources.Pg.Graphson.Syntax
-      Hydra.Sources.Pg.Graphson.Utils
-      Hydra.Sources.Pg.Manifest
-      Hydra.Sources.Pg.Mapping
-      Hydra.Sources.Pg.Model
-      Hydra.Sources.Pg.Printing
-      Hydra.Sources.Pg.Query
-      Hydra.Sources.Pg.Rdf.Environment
-      Hydra.Sources.Pg.Rdf.Mappings
-      Hydra.Sources.Pg.TermsToElements
-      Hydra.Sources.Pg.Utils
-      Hydra.Sources.Protobuf.Any
-      Hydra.Sources.Protobuf.Coder
-      Hydra.Sources.Protobuf.Environment
-      Hydra.Sources.Protobuf.Language
-      Hydra.Sources.Protobuf.Proto3
-      Hydra.Sources.Protobuf.Serde
-      Hydra.Sources.Protobuf.SourceContext
-      Hydra.Sources.Python.Coder
-      Hydra.Sources.Python.Environment
-      Hydra.Sources.Python.Language
-      Hydra.Sources.Python.Manifest
-      Hydra.Sources.Python.Names
-      Hydra.Sources.Python.Serde
-      Hydra.Sources.Python.Syntax
-      Hydra.Sources.Python.Testing
-      Hydra.Sources.Python.Utils
-      Hydra.Sources.Rdf.Manifest
-      Hydra.Sources.Rdf.Serde
-      Hydra.Sources.Rdf.Syntax
-      Hydra.Sources.Rdf.Utils
-      Hydra.Sources.Rust.Coder
-      Hydra.Sources.Rust.Language
-      Hydra.Sources.Rust.Operators
-      Hydra.Sources.Rust.Serde
-      Hydra.Sources.Rust.Syntax
-      Hydra.Sources.Scala.Coder
-      Hydra.Sources.Scala.Language
-      Hydra.Sources.Scala.Manifest
-      Hydra.Sources.Scala.Prepare
-      Hydra.Sources.Scala.Serde
-      Hydra.Sources.Scala.Syntax
-      Hydra.Sources.Scala.Utils
-      Hydra.Sources.Shacl.Coder
-      Hydra.Sources.Shacl.Language
-      Hydra.Sources.Shacl.Model
-      Hydra.Sources.Shex.Syntax
-      Hydra.Sources.Sql.Ansi
-      Hydra.Sources.Test.All
-      Hydra.Sources.Test.Annotations
-      Hydra.Sources.Test.Checking.Advanced
-      Hydra.Sources.Test.Checking.AlgebraicTypes
-      Hydra.Sources.Test.Checking.All
-      Hydra.Sources.Test.Checking.Collections
-      Hydra.Sources.Test.Checking.Failures
-      Hydra.Sources.Test.Checking.Fundamentals
-      Hydra.Sources.Test.Checking.NominalTypes
-      Hydra.Sources.Test.Dependencies
-      Hydra.Sources.Test.Differentiation
-      Hydra.Sources.Test.EtaExpansion
-      Hydra.Sources.Test.Formatting
-      Hydra.Sources.Test.Generation
-      Hydra.Sources.Test.Hoisting.All
-      Hydra.Sources.Test.Hoisting.Cases
-      Hydra.Sources.Test.Hoisting.Let
-      Hydra.Sources.Test.Inference.AlgebraicTypes
-      Hydra.Sources.Test.Inference.AlgorithmW
-      Hydra.Sources.Test.Inference.All
-      Hydra.Sources.Test.Inference.Classes
-      Hydra.Sources.Test.Inference.Failures
-      Hydra.Sources.Test.Inference.Fundamentals
-      Hydra.Sources.Test.Inference.KernelExamples
-      Hydra.Sources.Test.Inference.NominalTypes
-      Hydra.Sources.Test.Json.Parser
-      Hydra.Sources.Test.Json.Roundtrip
-      Hydra.Sources.Test.Json.Writer
-      Hydra.Sources.Test.Json.Yaml
-      Hydra.Sources.Test.Lib.Chars
-      Hydra.Sources.Test.Lib.Eithers
-      Hydra.Sources.Test.Lib.Equality
-      Hydra.Sources.Test.Lib.Lists
-      Hydra.Sources.Test.Lib.Literals
-      Hydra.Sources.Test.Lib.Logic
-      Hydra.Sources.Test.Lib.Maps
-      Hydra.Sources.Test.Lib.Math
-      Hydra.Sources.Test.Lib.Maybes
-      Hydra.Sources.Test.Lib.Pairs
-      Hydra.Sources.Test.Lib.Regex
-      Hydra.Sources.Test.Lib.Sets
-      Hydra.Sources.Test.Lib.Strings
-      Hydra.Sources.Test.Ordering
-      Hydra.Sources.Test.Reduction
-      Hydra.Sources.Test.Rewriting
-      Hydra.Sources.Test.Serialization
-      Hydra.Sources.Test.Sorting
-      Hydra.Sources.Test.Strip
-      Hydra.Sources.Test.Substitution
-      Hydra.Sources.Test.TestEnv
-      Hydra.Sources.Test.TestGraph
-      Hydra.Sources.Test.TestSuite
-      Hydra.Sources.Test.TestTerms
-      Hydra.Sources.Test.TestTypes
-      Hydra.Sources.Test.Transform
-      Hydra.Sources.Test.Unification
-      Hydra.Sources.Test.Utils
-      Hydra.Sources.Test.Validate.All
-      Hydra.Sources.Test.Validate.Core
-      Hydra.Sources.Test.Variables
-      Hydra.Sources.Tinkerpop.Features
-      Hydra.Sources.Tinkerpop.Gremlin
-      Hydra.Sources.Tinkerpop.Language
-      Hydra.Sources.TypeScript.Language
-      Hydra.Sources.TypeScript.Model
-      Hydra.Sources.Validate.Pg
-      Hydra.Sources.Wasm.Coder
-      Hydra.Sources.Wasm.Language
-      Hydra.Sources.Wasm.Manifest
-      Hydra.Sources.Wasm.Serde
-      Hydra.Sources.Wasm.Syntax
-      Hydra.Sources.Workflow
-      Hydra.Sources.Xml.Schema
-      Hydra.Sources.Yaml.Coder
-      Hydra.Sources.Yaml.Language
-      Hydra.Sources.Yaml.Model
-      Hydra.Sources.Yaml.Serde
-      Hydra.Sql.Syntax
-      Hydra.Stac.Items
-      Hydra.Strip
-      Hydra.Substitution
-      Hydra.Tabular
-      Hydra.Templates
-      Hydra.Test.Transform
-      Hydra.Test.Utils
-      Hydra.Testing
-      Hydra.Tinkerpop.Features
-      Hydra.Tinkerpop.Gremlin
-      Hydra.Tinkerpop.Language
-      Hydra.Tools.AvroWorkflows
-      Hydra.Tools.Bytestrings
-      Hydra.Tools.Csv
-      Hydra.Tools.Debug
-      Hydra.Tools.Tabular
-      Hydra.Topology
-      Hydra.TypeScript.Language
-      Hydra.TypeScript.Model
-      Hydra.Typing
-      Hydra.Unification
-      Hydra.Util
-      Hydra.Validate.Core
-      Hydra.Validate.Packaging
-      Hydra.Validate.Pg
-      Hydra.Variables
-      Hydra.Variants
-      Hydra.Wasm.Coder
-      Hydra.Wasm.Language
-      Hydra.Wasm.Serde
-      Hydra.Wasm.Syntax
-      Hydra.Workflow
-      Hydra.Xml.Schema
-      Hydra.Yaml.Coder
-      Hydra.Yaml.Language
-      Hydra.Yaml.Model
-      Hydra.Yaml.Serde
-      OpenGql.Grammar
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/main/haskell
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable bootstrap-from-json
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/bootstrap-from-json
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hspec >=2.11.0 && <2.12
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , time
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable diag-module
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/diag-module
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable digest-check
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/digest-check
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable generate-coq
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/generate-coq
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable generate-coq-tests
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/generate-coq-tests
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable transform-haskell-dsl-to-json
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/transform-haskell-dsl-to-json
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable update-json-kernel
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/update-json-kernel
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable update-json-main
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/update-json-main
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable update-json-manifest
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/update-json-manifest
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable update-json-test
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/update-json-test
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable update-wasm
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/update-wasm
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-executable verify-json-kernel
-  main-is: Main.hs
-  other-modules:
-      Paths_hydra
-  hs-source-dirs:
-      src/exec/verify-json-kernel
-  ghc-options: -rtsopts
-  build-depends:
-      SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hydra
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , vector >=0.12.0 && <0.14
-  default-language: Haskell2010
-
-test-suite hydra-test
-  type: exitcode-stdio-1.0
-  main-is: Spec.hs
-  other-modules:
-      Hydra.ArbitraryCore
-      Hydra.CoreCodersSpec
-      Hydra.Dsl.TypesSpec
-      Hydra.EvalPrimitives
-      Hydra.Reference.AlgorithmW
-      Hydra.Reference.AlgorithmWBridge
-      Hydra.Reference.AlgorithmWSpec
-      Hydra.Test.Annotations
-      Hydra.Test.Checking.Advanced
-      Hydra.Test.Checking.AlgebraicTypes
-      Hydra.Test.Checking.All
-      Hydra.Test.Checking.Collections
-      Hydra.Test.Checking.Failures
-      Hydra.Test.Checking.Fundamentals
-      Hydra.Test.Checking.NominalTypes
-      Hydra.Test.Dependencies
-      Hydra.Test.Differentiation
-      Hydra.Test.EtaExpansion
-      Hydra.Test.Formatting
-      Hydra.Test.Generation
-      Hydra.Test.Hoisting.All
-      Hydra.Test.Hoisting.Cases
-      Hydra.Test.Hoisting.Let
-      Hydra.Test.Inference.AlgebraicTypes
-      Hydra.Test.Inference.AlgorithmW
-      Hydra.Test.Inference.All
-      Hydra.Test.Inference.Classes
-      Hydra.Test.Inference.Failures
-      Hydra.Test.Inference.Fundamentals
-      Hydra.Test.Inference.KernelExamples
-      Hydra.Test.Inference.NominalTypes
-      Hydra.Test.Json.Roundtrip
-      Hydra.Test.Json.Writer
-      Hydra.Test.Json.Yaml
-      Hydra.Test.Lib.Chars
-      Hydra.Test.Lib.Eithers
-      Hydra.Test.Lib.Equality
-      Hydra.Test.Lib.Lists
-      Hydra.Test.Lib.Literals
-      Hydra.Test.Lib.Logic
-      Hydra.Test.Lib.Maps
-      Hydra.Test.Lib.Math
-      Hydra.Test.Lib.Maybes
-      Hydra.Test.Lib.Pairs
-      Hydra.Test.Lib.Regex
-      Hydra.Test.Lib.Sets
-      Hydra.Test.Lib.Strings
-      Hydra.Test.Reduction
-      Hydra.Test.Rewriting
-      Hydra.Test.Serialization
-      Hydra.Test.Sorting
-      Hydra.Test.Strip
-      Hydra.Test.Substitution
-      Hydra.Test.TestEnv
-      Hydra.Test.TestGraph
-      Hydra.Test.TestSuite
-      Hydra.Test.TestTerms
-      Hydra.Test.TestTypes
-      Hydra.Test.Unification
-      Hydra.Test.Validate.All
-      Hydra.Test.Validate.Core
-      Hydra.Test.Variables
-      Hydra.TestData
-      Hydra.TestSuiteSpec
-      Hydra.TestUtils
-      Paths_hydra
-  hs-source-dirs:
-      src/test/haskell
-  build-depends:
-      HUnit
-    , QuickCheck
-    , SHA >=1.6.4 && <1.7
-    , aeson >=2.1.0 && <2.3
-    , base >=4.19.0 && <4.22
-    , base64-bytestring >=1.2.1 && <1.3
-    , bytestring >=0.11.5 && <0.13
-    , containers >=0.6.7 && <0.8
-    , directory >=1.3.6 && <1.4
-    , filepath >=1.4.200 && <1.6
-    , hspec >=2.11.0 && <2.12
-    , hspec-discover >=2.11.0 && <2.12
-    , hydra
-    , mtl
-    , process
-    , regex-tdfa >=1.3.2 && <1.4
-    , scientific >=0.3.7 && <0.4
-    , split >=0.2.3 && <0.3
-    , text >=2.0.2 && <2.2
-    , time
-    , vector >=0.12.0 && <0.14
+version:        0.16.0
+synopsis:       Hydra: graphs are programs, and programs are graphs (umbrella package)
+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". This umbrella package provides a single convenient entry point (the Hydra module) re-exporting the Hydra kernel plus the Haskell coder's moduleToHaskell. Depend on hydra-kernel / hydra-haskell directly for finer-grained APIs.
+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
+    CHANGELOG.md
+
+source-repository head
+  type: git
+  location: https://github.com/CategoricalData/hydra
+
+library
+  exposed-modules:
+      Hydra
+  other-modules:
+      Paths_hydra
+  hs-source-dirs:
+      src/main/haskell
+  build-depends:
+      base >=4.19.0 && <4.22
+    , hydra-haskell ==0.16.0
+    , hydra-kernel ==0.16.0
   default-language: Haskell2010
diff --git a/src/exec/bootstrap-from-json/Main.hs b/src/exec/bootstrap-from-json/Main.hs
deleted file mode 100644
--- a/src/exec/bootstrap-from-json/Main.hs
+++ /dev/null
@@ -1,743 +0,0 @@
--- | Unified executable for generating code from JSON modules.
---
--- Loads Hydra modules from pre-built JSON (no Haskell DSL compilation or type
--- inference needed) and generates code for a target language.
---
--- Used by both:
---   - sync-java.sh / sync-python.sh (repo sync, writes to hydra-java / hydra-python)
---   - haskell-to-*.sh (bootstrapping demo, writes to /tmp)
---
--- JSON sources:
---   dist/json/hydra-kernel/src/main/json/  — kernel, eval lib, and other modules
---   dist/json/hydra-kernel/src/test/json/  — test modules
---   hydra-ext/../../dist/json/hydra-ext/src/main/json/      — ext coder modules (Java/Python coders)
---
--- Usage:
---   bootstrap-from-json --target <haskell|java|python|clojure|scheme|common-lisp|emacs-lisp> [OPTIONS]
---
--- Options:
---   --output <dir>         Output base directory (default: repo target dir)
---   --include-coders       Also load and generate ext coder modules
---   --include-tests        Also load and generate kernel test modules
---   --kernel-only          Only generate kernel modules (exclude ext coder modules)
---   --types-only           Only generate type-defining modules
---   --ext-only             Only generate hydraExtDemoModules from ext manifest
---   --dist-json-root <dir> Override JSON root directory
-
-{-# LANGUAGE ScopedTypeVariables #-}
-module Main where
-
-import Hydra.Kernel
-import Hydra.Generation
-import Hydra.PackageRouting (groupByPackage, namespaceToPackage, packagePrefixes)
-import qualified Hydra.Digest as Digest
-import Hydra.Sources.All (kernelModules)
-import Hydra.ExtGeneration (moduleToLispDialect, wrapLongLinesInScalaTree)
-import Hydra.Haskell.Coder (moduleToHaskell)
-import Hydra.Haskell.Language (haskellLanguage)
-import Hydra.Java.Coder (moduleToJava)
-import Hydra.Java.Language (javaLanguage)
-import Hydra.Python.Coder (moduleToPython)
-import Hydra.Python.Language (pythonLanguage)
-import Hydra.Scala.Coder (moduleToScala)
-import Hydra.Scala.Language (scalaLanguage)
-import Hydra.Lisp.Language (lispLanguage)
-import qualified Hydra.Lisp.Syntax as LispSyntax
-import qualified Hydra.Sources.Test.TestSuite as TestSuite
-import Hydra.Sources.Test.All (testSkipEmitNamespaces)
-
-import Control.Exception (catch, IOException)
-import Control.Monad (when, forM)
-import qualified Control.Monad as CM
-import qualified Data.Char as C
-import Data.List (isPrefixOf, partition)
-import qualified Data.List as L
-import qualified Data.List.Split as LS
-import qualified Data.Map as M
-import Data.Time.Clock (getCurrentTime, diffUTCTime, UTCTime)
-import System.Directory (listDirectory, doesFileExist)
-import qualified System.Directory as SD
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import System.IO (hSetBuffering, BufferMode(NoBuffering), stdout)
-import qualified System.FilePath as FP
-
-
--- | Format elapsed time for display.
-formatTime :: Double -> String
-formatTime secs
-  | secs < 1   = show (round (secs * 1000) :: Int) ++ "ms"
-  | secs < 60  = show tenths ++ "s"
-  | otherwise   = show mins ++ "m " ++ show remTenths ++ "s"
-  where
-    tenths = fromIntegral (round (secs * 10) :: Int) / 10.0 :: Double
-    mins = floor secs `div` 60 :: Int
-    remSecs = secs - fromIntegral (mins * 60)
-    remTenths = fromIntegral (round (remSecs * 10) :: Int) / 10.0 :: Double
-
--- | Count files with a given extension in a directory tree.
-countFiles :: FilePath -> String -> IO Int
-countFiles dir ext = go dir
-  where
-    go d = do
-      entries <- listDirectory d `catch` \(_ :: IOException) -> return []
-      counts <- mapM (\e -> do
-        let p = d FP.</> e
-        isFile <- doesFileExist p
-        if isFile
-          then return (if FP.takeExtension p == ext then 1 else 0)
-          else go p) entries
-      return (sum counts)
-
-data Options = Options
-  { optTarget             :: String
-  , optOutput             :: Maybe FilePath
-  , optIncludeCoders      :: Bool
-  , optIncludeDsls        :: Bool
-  , optIncludeTests       :: Bool
-  , optKernelOnly         :: Bool
-  , optTypesOnly          :: Bool
-  , optExtOnly            :: Bool
-  , optSynthesizeSources  :: Bool
-  , optDistJsonRoot       :: Maybe FilePath
-  , optPackage            :: Maybe String  -- Layer 1: narrow generation to one package
-  , optAllPackages        :: Bool          -- Batch mode: generate every package in one run
-  }
-
-defaultOptions :: Options
-defaultOptions = Options
-  { optTarget             = ""
-  , optOutput             = Nothing
-  , optIncludeCoders      = False
-  , optIncludeDsls        = False
-  , optIncludeTests       = False
-  , optKernelOnly         = False
-  , optTypesOnly          = False
-  , optExtOnly            = False
-  , optSynthesizeSources  = False
-  , optDistJsonRoot       = Nothing
-  , optPackage            = Nothing
-  , optAllPackages        = False
-  }
-
-parseArgs :: [String] -> Either String Options
-parseArgs = go defaultOptions
-  where
-    go opts [] = if Prelude.null (optTarget opts)
-      then Left "Missing --target"
-      else Right opts
-    go opts ("--target" : t : rest) = go (opts { optTarget = t }) rest
-    go opts ("--output" : o : rest) = go (opts { optOutput = Just o }) rest
-    go opts ("--include-coders" : rest) = go (opts { optIncludeCoders = True }) rest
-    go opts ("--include-dsls" : rest) = go (opts { optIncludeDsls = True }) rest
-    go opts ("--include-tests" : rest) = go (opts { optIncludeTests = True }) rest
-    go opts ("--kernel-only" : rest) = go (opts { optKernelOnly = True }) rest
-    go opts ("--types-only" : rest) = go (opts { optTypesOnly = True }) rest
-    go opts ("--ext-only" : rest) = go (opts { optExtOnly = True }) rest
-    go opts ("--synthesize-sources" : rest) = go (opts { optSynthesizeSources = True }) rest
-    go opts ("--dist-json-root" : d : rest) = go (opts { optDistJsonRoot = Just d }) rest
-    go opts ("--package" : p : rest) = go (opts { optPackage = Just p }) rest
-    go opts ("--all-packages" : rest) = go (opts { optAllPackages = True }) rest
-    go _ (arg : _) = Left $ "Unknown argument: " ++ arg
-
-usage :: String
-usage = unlines
-  [ "Usage: bootstrap-from-json --target <haskell|java|python|clojure|scheme|common-lisp|emacs-lisp> [OPTIONS]"
-  , ""
-  , "Options:"
-  , "  --output <dir>           Output base directory"
-  , "  --include-coders         Also load coder packages (hydra-java/python/scala/lisp)"
-  , "  --include-dsls           Also load DSL wrapper modules"
-  , "  --include-tests          Also generate kernel test modules"
-  , "  --kernel-only            Only generate kernel modules (exclude coder packages)"
-  , "  --types-only             Only generate type-defining modules"
-  , "  --ext-only               Only generate ext demo modules from hydra-pg / hydra-rdf"
-  , "  --synthesize-sources     Also synthesize decoder/encoder DSL source modules"
-  , "                           (Hydra.Sources.Decode.*, Hydra.Sources.Encode.*) from"
-  , "                           the loaded kernel type modules."
-  , "  --dist-json-root <dir>   Override the root dist/json directory (default:"
-  , "                           ../../dist/json). The tool walks"
-  , "                           <root>/<package>/src/main/json/ for each package it"
-  , "                           needs to load, in dependency order."
-  , "  --package <pkg>          Narrow generation to modules owned by <pkg>."
-  , "                           The full universe is still loaded so cross-"
-  , "                           package type references resolve."
-  ]
-
-main :: IO ()
-main = do
-  hSetBuffering stdout NoBuffering
-  args <- getArgs
-
-  opts <- case parseArgs args of
-    Left err -> do
-      putStrLn $ "Error: " ++ err
-      putStrLn ""
-      putStrLn usage
-      exitFailure
-    Right o -> return o
-
-  let target = optTarget opts
-  let ext = case target of
-        "haskell"     -> ".hs"
-        "java"        -> ".java"
-        "python"      -> ".py"
-        "scala"       -> ".scala"
-        "clojure"     -> ".clj"
-        "scheme"      -> ".scm"
-        "common-lisp" -> ".lisp"
-        "emacs-lisp"  -> ".el"
-        _             -> ""
-
-  -- Determine output directories
-  let defaultOutput = case target of
-        "haskell"     -> "/tmp/hydra-bootstrapping-demo/haskell-to-haskell"
-        "java"        -> "../../dist/java/hydra-kernel"
-        "python"      -> "../../dist/python/hydra-kernel"
-        "scala"       -> "../../dist/scala/hydra-kernel"
-        "clojure"     -> "../../dist/clojure/hydra-kernel"
-        "scheme"      -> "../../dist/scheme/hydra-kernel"
-        "common-lisp" -> "../../dist/common-lisp/hydra-kernel"
-        "emacs-lisp"  -> "../../dist/emacs-lisp/hydra-kernel"
-        _             -> "/tmp/hydra-bootstrapping-demo/haskell-to-" ++ target
-  let outBase = maybe defaultOutput id (optOutput opts)
-  -- Output path convention: callers pass the parent of per-package dirs as
-  -- --output (e.g. --output ../../dist/haskell), and each module is routed
-  -- to ../../dist/haskell/<package>/src/{main,test}/<lang>/.
-  let packageOutMain pkg = outBase FP.</> pkg FP.</> ("src/main/" ++ target)
-  let packageOutTest pkg = outBase FP.</> pkg FP.</> ("src/test/" ++ target)
-  -- Flat outMain / outTest are used by the few legacy writers (test-mode
-  -- ext injection below) that don't go through groupByPackage.
-  let outMain = outBase FP.</> ("src/main/" ++ target)
-  let outTest = outBase FP.</> ("src/test/" ++ target)
-
-  -- Per-package JSON layout. Every package's main-side modules live at
-  -- <root>/<pkg>/src/main/json/; the kernel's test modules live at
-  -- <root>/hydra-kernel/src/test/json/.
-  let distJsonRoot = maybe "../../dist/json" id (optDistJsonRoot opts)
-  let pkgMainDir pkg = distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "json"
-  let kernelJsonDir = pkgMainDir "hydra-kernel"
-  let testJsonDir   = distJsonRoot FP.</> "hydra-kernel" FP.</> "src" FP.</> "test" FP.</> "json"
-
-  -- Dependency order: baseline packages (hydra-kernel + hydra-haskell) are
-  -- loaded individually in Step 1. Coder packages are loaded with
-  -- --include-coders. Ext demo packages are loaded with --ext-only. Other
-  -- non-baseline non-coder packages (extPackages and extDemoPackages) are
-  -- auto-loaded based on --package or --all-packages — see Step 2c.
-  let coderPackages   = ["hydra-java", "hydra-python", "hydra-scala", "hydra-lisp"]
-  let extDemoPackages = ["hydra-pg", "hydra-rdf"]
-  let extPackages     = ["hydra-coq", "hydra-javascript", "hydra-ext", "hydra-wasm"]
-
-  let targetCap = case target of
-        "haskell"     -> "Haskell"
-        "java"        -> "Java"
-        "python"      -> "Python"
-        "scala"       -> "Scala"
-        "clojure"     -> "Clojure"
-        "scheme"      -> "Scheme"
-        "common-lisp" -> "Common Lisp"
-        "emacs-lisp"  -> "Emacs Lisp"
-        t             -> t
-
-  putStrLn "=========================================="
-  putStrLn $ "Mapping JSON to " ++ targetCap
-  putStrLn "=========================================="
-  putStrLn ""
-  putStrLn $ "  Target:            " ++ targetCap
-  putStrLn $ "  Output:            " ++ outBase
-  putStrLn $ "  Include coders:    " ++ show (optIncludeCoders opts)
-  putStrLn $ "  Include DSLs:      " ++ show (optIncludeDsls opts)
-  putStrLn $ "  Include tests:     " ++ show (optIncludeTests opts)
-  putStrLn ""
-
-  -- Load a single package's mainModules + evalLibModules from its per-package
-  -- manifest. Returns the accumulated Modules; missing fields are treated as
-  -- empty.
-  let loadPackageMain :: String -> IO [Module]
-      loadPackageMain pkg = do
-        let pkgDir = pkgMainDir pkg
-        mainNs <- readManifestFieldOrEmpty pkgDir "mainModules"
-        evalNs <- readManifestFieldOrEmpty pkgDir "evalLibModules"
-        let allNs = mainNs ++ evalNs
-        if Prelude.null allNs
-          then return []
-          else do
-            putStrLn $ "  " ++ pkg ++ ": " ++ show (length allNs) ++ " modules from " ++ pkgDir
-            loadModulesFromJson pkgDir kernelModules allNs
-
-  -- Load a single package's DSL wrapper modules.
-  let loadPackageDsl :: String -> IO [Module]
-      loadPackageDsl pkg = do
-        let pkgDir = pkgMainDir pkg
-        dslNs <- readManifestFieldOrEmpty pkgDir "dslModules"
-        if Prelude.null dslNs
-          then return []
-          else do
-            putStrLn $ "  " ++ pkg ++ ": " ++ show (length dslNs) ++ " DSL modules from " ++ pkgDir
-            loadModulesFromJson pkgDir kernelModules dslNs
-
-  -- Step 1: Load baseline main modules (hydra-kernel + hydra-haskell).
-  -- Both packages are part of the bootstrap baseline: hydra-haskell provides
-  -- the runtime AST modules (Hydra.Haskell.Syntax, Environment, Coder, Serde,
-  -- ...) that the generated DSL source modules import, so it must pass
-  -- --kernel-only filtering as part of the kernel namespace set.
-  putStrLn "Step 1: Loading baseline main modules from JSON..."
-  loadStart <- getCurrentTime
-  kernelBaselineMods <- loadPackageMain "hydra-kernel"
-  haskellBaselineMods <- loadPackageMain "hydra-haskell"
-  let baselineMods = kernelBaselineMods ++ haskellBaselineMods
-  loadEnd <- getCurrentTime
-  putStrLn $ "  Loaded " ++ show (length baselineMods) ++ " baseline modules."
-  putStrLn $ "  Time: " ++ formatTime (elapsed loadEnd loadStart)
-  putStrLn ""
-
-  let allKernelNamespaces = fmap moduleNamespace baselineMods
-
-  -- Step 2: Optionally load coder-package main modules.
-  coderMods <- if optIncludeCoders opts
-    then do
-      putStrLn "Step 2: Loading coder package modules from JSON..."
-      loadStart2 <- getCurrentTime
-      mods <- fmap concat $ CM.forM coderPackages loadPackageMain
-      loadEnd2 <- getCurrentTime
-      putStrLn $ "  Loaded " ++ show (length mods) ++ " coder modules."
-      putStrLn $ "  Time: " ++ formatTime (elapsed loadEnd2 loadStart2)
-      putStrLn ""
-      return mods
-    else do
-      putStrLn "Step 2: Skipping coder packages"
-      putStrLn ""
-      return []
-
-  -- Step 2b: Optionally load DSL wrapper modules from every loaded package.
-  -- Compute which non-baseline non-coder packages need to be loaded into
-  -- the universe. Each of hydra-rdf, hydra-coq, hydra-javascript,
-  -- hydra-ext, hydra-wasm is independent. hydra-pg depends on hydra-rdf
-  -- (e.g. hydra.pg.rdf.environment references hydra.rdf.syntax.Iri), so
-  -- loading hydra-pg implicitly loads hydra-rdf.
-  --
-  --   --package <p>  : load <p> + its package-level deps when it's an ext
-  --                    or ext-demo package
-  --   --ext-only     : load both ext-demo packages (legacy demo path)
-  --   (otherwise)    : nothing extra. --all-packages alone does NOT auto-load
-  --                    these — sync-haskell.sh uses --all-packages to regen
-  --                    only baseline + dsl artifacts; the per-package
-  --                    assemble-distribution.sh handles coder/ext packages
-  --                    individually with --package <pkg>.
-  let allExtPackages = extPackages ++ extDemoPackages
-  let packageDeps p = case p of
-        "hydra-pg" -> ["hydra-pg", "hydra-rdf"]
-        _          -> [p]
-  let extPackagesToLoad
-        | optExtOnly opts                           = extDemoPackages
-        | Just p <- optPackage opts, p `elem` allExtPackages = packageDeps p
-        | otherwise                                 = []
-
-  dslMods <- if optIncludeDsls opts
-    then do
-      putStrLn "Step 2b: Loading DSL wrapper modules from JSON..."
-      loadStart3 <- getCurrentTime
-      let dslPackages =
-            ["hydra-kernel", "hydra-haskell"]
-              ++ (if optIncludeCoders opts then coderPackages else [])
-              ++ extPackagesToLoad
-      mods <- fmap concat $ CM.forM dslPackages loadPackageDsl
-      loadEnd3 <- getCurrentTime
-      putStrLn $ "  Loaded " ++ show (length mods) ++ " DSL modules."
-      putStrLn $ "  Time: " ++ formatTime (elapsed loadEnd3 loadStart3)
-      putStrLn ""
-      return mods
-    else return []
-
-  -- Step 2c: Load main modules for any ext / ext-demo packages selected above.
-  -- Already-loaded namespaces (via --include-coders) are skipped to avoid
-  -- duplicates.
-  extMods <- if Prelude.null extPackagesToLoad
-    then return []
-    else do
-      putStrLn "Step 2c: Loading ext package modules from JSON..."
-      loadStart4 <- getCurrentTime
-      allExtMods <- fmap concat $ CM.forM extPackagesToLoad loadPackageMain
-      let coderNsSet = fmap (unNamespace . moduleNamespace) (baselineMods ++ coderMods)
-          mods = Prelude.filter
-            (\m -> unNamespace (moduleNamespace m) `notElem` coderNsSet)
-            allExtMods
-      loadEnd4 <- getCurrentTime
-      putStrLn $ "  Loaded " ++ show (length mods) ++ " ext modules."
-      putStrLn $ "  Time: " ++ formatTime (elapsed loadEnd4 loadStart4)
-      putStrLn ""
-      return mods
-
-  -- Apply filters
-  let allMods = baselineMods ++ coderMods ++ extMods ++ dslMods
-  let kernelNsStrings = fmap unNamespace allKernelNamespaces
-  let filtered1 = if optKernelOnly opts
-        then Prelude.filter (\m -> unNamespace (moduleNamespace m) `elem` kernelNsStrings) allMods
-        else allMods
-  let filtered2 = if optTypesOnly opts
-        then Prelude.filter (\m -> any isNativeType (moduleBindings m)) filtered1
-        else filtered1
-  let allMainMods = filtered2
-
-  when (optKernelOnly opts) $ do
-    putStrLn $ "Filtering to kernel modules: " ++ show (length allMainMods) ++ " of " ++ show (length allMods)
-    putStrLn ""
-  when (optTypesOnly opts) $ do
-    putStrLn $ "Filtering to type modules: " ++ show (length allMainMods) ++ " of " ++ show (length filtered1)
-    putStrLn ""
-
-  -- Optionally synthesize decoder/encoder DSL source modules over the loaded
-  -- type modules, and add them to the modules-to-generate set. The
-  -- synthesized modules carry no type annotations, so we run inference over
-  -- them before handing them to the generator (which skips inference on the
-  -- loaded modules).
-  synthesizedSourceMods <- if optSynthesizeSources opts
-    then do
-      -- Decoder/encoder synthesis runs over a curated subset of loaded
-      -- type modules. Kernel type modules produce the Sources.Decode.*
-      -- and Sources.Encode.* coder-package meta-sources. hydra-pg's
-      -- model and mapping modules produce the pg meta-sources that were
-      -- historically generated by update-ext-sources.
-      let pgSynthNs = ["hydra.pg.model", "hydra.pg.mapping"]
-      -- Synth is meaningful only for namespaces the hydra-kernel manifest
-      -- claims, plus the two hydra-pg type modules (historical coverage
-      -- of update-ext-sources). Long-tail ext types (hydra.xml.schema,
-      -- hydra.avro.*, ...) produce synth output whose references can't
-      -- be resolved in the generator's lexical env during batch-mode
-      -- iteration.
-      let kernelNsList = fmap unNamespace allKernelNamespaces
-      let isSynthInput m =
-            let nsStr = unNamespace (moduleNamespace m)
-                isCoder = any (\(pfx, _) -> pfx `isPrefixOf` nsStr) packagePrefixes
-                isYaml  = "hydra.yaml." `isPrefixOf` nsStr
-                isPgSynthInput = nsStr `elem` pgSynthNs
-                hasType = any isNativeType (moduleBindings m)
-                isKernel = (nsStr `elem` kernelNsList) && not isCoder && not isYaml
-            in hasType && (isKernel || isPgSynthInput)
-      let typeMods = Prelude.filter isSynthInput allMainMods
-      putStrLn $ "Synthesizing decoder/encoder source modules from "
-        ++ show (length typeMods) ++ " type modules..."
-      decSrc <- generateDecoderSourceModules allMainMods typeMods
-      encSrc <- generateEncoderSourceModules allMainMods typeMods
-      putStrLn $ "  Synthesized " ++ show (length decSrc) ++ " decoder source modules"
-      putStrLn $ "  Synthesized " ++ show (length encSrc) ++ " encoder source modules"
-      -- Run inference on the synthesized modules; the generator call below uses
-      -- doInfer=False, which would fail on these untyped bindings otherwise.
-      let synthesized = decSrc ++ encSrc
-      let inferUniverse = allMainMods ++ synthesized
-      inferred <- inferModulesIO inferUniverse synthesized
-      putStrLn $ "  Inferred types for " ++ show (length inferred) ++ " synthesized modules"
-      putStrLn ""
-      return inferred
-    else return []
-
-  -- When --ext-only is used, load the ext demo packages (hydra-pg, hydra-rdf)
-  -- and generate only those, using allMainMods plus the loaded ext demo
-  -- modules as the universe for type resolution.
-  (modsToGenerate, allModsFinal) <- if optExtOnly opts
-    then do
-      putStrLn "Loading ext demo packages from JSON..."
-      extMods <- fmap concat $ CM.forM extDemoPackages loadPackageMain
-      -- Filter out any namespace already present in the baseline/coder set
-      -- so that downstream generation doesn't see duplicates.
-      let loadedNsSet = fmap (unNamespace . moduleNamespace) allMainMods
-          extMods' = Prelude.filter
-            (\m -> unNamespace (moduleNamespace m) `notElem` loadedNsSet)
-            extMods
-      putStrLn $ "  Loaded " ++ show (length extMods') ++ " ext demo modules"
-      putStrLn ""
-      return (extMods', allMainMods ++ extMods')
-    else return (allMainMods, allMainMods)
-
-  -- Layer 1 per-package scoping: if --package <pkg> is set, narrow
-  -- modsToGenerate to modules owned by that package (per namespaceToPackage).
-  -- The universe (allModsFinal) is unchanged, so type references across
-  -- packages still resolve. Applies AFTER all other filters.
-  modsToGenerateScoped <- case optPackage opts of
-    Nothing  -> return modsToGenerate
-    Just pkg -> do
-      let owned = Prelude.filter
-            (\m -> namespaceToPackage (moduleNamespace m) == pkg)
-            modsToGenerate
-      putStrLn $ "Scoping to package " ++ pkg ++ ": "
-        ++ show (length owned) ++ " of " ++ show (length modsToGenerate) ++ " modules"
-      putStrLn ""
-      return owned
-
-  -- Stage 7: per-module checksum skip. For each module M whose DSL source
-  -- hash matches the hash recorded in the per-target digest at
-  -- <outBase>/<owning-pkg>/digest.json's inputs section, exclude M from
-  -- modsToGenerate. The output already on disk reflects exactly the same
-  -- DSL source content, so regeneration would produce a byte-identical
-  -- result. Excluding before generation skips inference work entirely.
-  --
-  -- Only applied when --package is set (scoped mode). In unscoped mode
-  -- the per-module digest semantics get harder to reason about because
-  -- multiple packages share the same outBase tree.
-  -- Source set indicator: tests are generated when --include-tests is set
-  -- AND we're scoped to a single package. (In --all-packages mode, tests
-  -- are generated separately via testMods.)
-  let sourceSetForFilter = if optIncludeTests opts then "test" else "main"
-
-  modsToGenerateScopedFiltered <- case optPackage opts of
-    Nothing  -> return modsToGenerateScoped
-    Just pkg -> filterByTargetDigest outBase pkg sourceSetForFilter modsToGenerateScoped
-
-  -- Prepend synthesized source modules to modsToGenerate (deduping by namespace
-  -- to keep ordering stable). They go into the same universe as the main modules.
-  let modsToGenerate' = modsToGenerateScopedFiltered ++ synthesizedSourceMods
-  let allModsFinal'   = allModsFinal ++ synthesizedSourceMods
-
-  -- Generate main modules
-  let stepNum = if optIncludeCoders opts then "3" else "2"
-  -- Stage 7: if every module was filtered out as fresh (and there's
-  -- no synthesis to do), this is a no-op. The downstream loop over
-  -- groupByPackage modsToGenerate' will naturally iterate zero times,
-  -- but we log it for clarity.
-  CM.when (Prelude.null modsToGenerate' && not (Prelude.null modsToGenerateScoped)) $ do
-    putStrLn $ "Step " ++ stepNum ++ ": all "
-      ++ show (length modsToGenerateScoped) ++ " main modules fresh; skipping generation."
-
-  putStrLn $ "Step " ++ stepNum ++ ": Mapping " ++ show (length modsToGenerate') ++ " modules to " ++ targetCap ++ "..."
-
-  genStart <- getCurrentTime
-  let lispDialectAndExt = case target of
-        "clojure"     -> Just (LispSyntax.DialectClojure,    "clj")
-        "scheme"      -> Just (LispSyntax.DialectScheme,     "scm")
-        "common-lisp" -> Just (LispSyntax.DialectCommonLisp, "lisp")
-        "emacs-lisp"  -> Just (LispSyntax.DialectEmacsLisp,  "el")
-        _             -> Nothing
-
-  let lispGenerator = case lispDialectAndExt of
-        Just (dialect, lispExt) -> Just (moduleToLispDialect dialect lispExt)
-        Nothing -> Nothing
-
-  -- 'mods' is the set this scoped package wants written. The full
-  -- universe is passed for typing context only; generateSourceFiles
-  -- emits files only for the modsToGenerate argument (per the existing
-  -- typeModulesToGenerate / termModulesToGenerate filters in
-  -- Hydra.Codegen). No expansion, no prune.
-  let genForDir :: FilePath -> [Module] -> IO Int
-      genForDir dir mods = case target of
-        "haskell" -> generateSources moduleToHaskell haskellLanguage False False False False dir allModsFinal' mods
-        "java"    -> generateSources moduleToJava    javaLanguage    False True False True   dir allModsFinal' mods
-        "python"  -> generateSources moduleToPython  pythonLanguage  False True True False   dir allModsFinal' mods
-        "scala"   -> generateSources moduleToScala   scalaLanguage   False True False False  dir allModsFinal' mods
-        _ | Just g <- lispGenerator ->
-              generateSources g lispLanguage True False False False dir allModsFinal' mods
-        _ -> do
-          putStrLn $ "Unknown target: " ++ target
-          exitFailure
-
-  -- Partition modules by owning package and generate each group to its own dir.
-  -- Routing via PackageRouting.groupByPackage is unconditional: every module
-  -- lands at <output>/<pkg>/src/main/<lang>/... based on its namespace.
-  --
-  -- Three routing modes:
-  --   --package <pkg>   : one package, per-package dir (scoped sync path)
-  --   --all-packages    : every package, per-package dirs (batch sync path)
-  --   (neither)         : flat <outBase>/src/main/<target>/ (demo path)
-  mainFileCount <- case (optPackage opts, optAllPackages opts) of
-    (Just pkgArg, _) -> do
-      let groups = groupByPackage modsToGenerate'
-      let scopedGroups = Prelude.filter (\(pkg, _) -> pkg == pkgArg) groups
-      counts <- CM.forM scopedGroups $ \(pkg, pkgMods) -> do
-        let dir = packageOutMain pkg
-        putStrLn $ "  " ++ pkg ++ ": " ++ show (length pkgMods) ++ " modules → " ++ dir
-        genForDir dir pkgMods
-      return (sum counts)
-    (Nothing, True) -> do
-      let groups = groupByPackage modsToGenerate'
-      counts <- CM.forM groups $ \(pkg, pkgMods) -> do
-        let dir = packageOutMain pkg
-        putStrLn $ "  " ++ pkg ++ ": " ++ show (length pkgMods) ++ " modules → " ++ dir
-        genForDir dir pkgMods
-      return (sum counts)
-    (Nothing, False) -> do
-      putStrLn $ "  " ++ show (length modsToGenerate') ++ " modules → " ++ outMain
-      genForDir outMain modsToGenerate'
-  genEnd <- getCurrentTime
-
-  putStrLn $ "  Generated " ++ show mainFileCount ++ " files."
-  putStrLn $ "  Time: " ++ formatTime (elapsed genEnd genStart)
-  putStrLn ""
-
-  -- Optionally generate test modules
-  testFileCount <- if optIncludeTests opts
-    then do
-      putStrLn "Loading test modules from JSON..."
-      testNamespaces <- readManifestField kernelJsonDir "testModules"
-      testModsAll <- loadModulesFromJson testJsonDir kernelModules testNamespaces
-      putStrLn $ "  Loaded " ++ show (length testModsAll) ++ " test modules"
-
-      -- Layer 1 per-package scoping for tests: if --package <pkg> is set,
-      -- narrow testMods to modules owned by that package. The universe is
-      -- unchanged so cross-package refs still resolve.
-      --
-      -- Additionally, filter out skip-emit namespaces (e.g. hydra.test.testEnv).
-      -- These are type-only stubs whose hand-written per-language
-      -- counterparts are the source of truth; emitting them would
-      -- overwrite hand-written code.
-      let notSkipEmit m = moduleNamespace m `notElem` testSkipEmitNamespaces
-      let testMods = Prelude.filter notSkipEmit $ case optPackage opts of
-            Nothing  -> testModsAll
-            Just pkg ->
-              Prelude.filter
-                (\m -> namespaceToPackage (moduleNamespace m) == pkg)
-                testModsAll
-      case optPackage opts of
-        Just pkg | length testMods /= length testModsAll ->
-          putStrLn $ "  Scoping to package " ++ pkg ++ ": "
-            ++ show (length testMods) ++ " of " ++ show (length testModsAll) ++ " test modules"
-        _ -> return ()
-      putStrLn ""
-
-      let allUniverse = allMods ++ testModsAll
-
-      -- When --kernel-only is active, non-kernel modules are excluded from allMainMods.
-      -- But test modules may depend on non-kernel modules (e.g. hydra.test.serialization
-      -- depends on hydra.haskell.operators). Generate those modules to outMain
-      -- so test code can reference them.
-      when (optKernelOnly opts) $ do
-        let testExtraDeps = Prelude.filter (\ns -> unNamespace ns `notElem` kernelNsStrings)
-              $ concatMap moduleTermDependencies testMods
-            extModsForTests = Prelude.filter (\m -> moduleNamespace m `elem` testExtraDeps) allMods
-        when (not (Prelude.null extModsForTests)) $ do
-          putStrLn $ "Generating " ++ show (length extModsForTests) ++ " ext module(s) needed by tests..."
-          case target of
-            "haskell" -> generateSources moduleToHaskell haskellLanguage False False False False outMain allUniverse extModsForTests >> return ()
-            "java"    -> generateSources     moduleToJava    javaLanguage    False True False True   outMain allUniverse extModsForTests >> return ()
-            "python"  -> generateSources moduleToPython  pythonLanguage  False True True False   outMain allUniverse extModsForTests >> return ()
-            _ | Just gen <- lispGenerator -> generateSources gen lispLanguage False False False False outMain allUniverse extModsForTests >> return ()
-            _ -> return ()
-          putStrLn ""
-
-      putStrLn $ "Mapping test modules to " ++ targetCap ++ "..."
-
-      -- Dispatch helper for the test source set.
-      let genTestForDir :: FilePath -> [Module] -> IO Int
-          genTestForDir dir mods = case target of
-            "haskell" -> generateSources moduleToHaskell haskellLanguage False False False False dir allUniverse mods
-            "java"    -> generateSources moduleToJava    javaLanguage    False True False True   dir allUniverse mods
-            "python"  -> generateSources moduleToPython  pythonLanguage  False True True False   dir allUniverse mods
-            "scala"   -> generateSources moduleToScala   scalaLanguage   False True False False  dir allUniverse mods
-            _ | Just gen <- lispGenerator -> generateSources gen lispLanguage False False False False dir allUniverse mods
-            _ -> return 0
-
-      testStart <- getCurrentTime
-      count <- case (optPackage opts, optAllPackages opts) of
-        (Just pkgArg, _) -> do
-          let groups = groupByPackage testMods
-          let scopedGroups = Prelude.filter (\(pkg, _) -> pkg == pkgArg) groups
-          counts <- CM.forM scopedGroups $ \(pkg, pkgMods) -> do
-            let dir = packageOutTest pkg
-            putStrLn $ "  " ++ pkg ++ ": " ++ show (length pkgMods) ++ " test modules → " ++ dir
-            genTestForDir dir pkgMods
-          return (sum counts)
-        (Nothing, True) -> do
-          let groups = groupByPackage testMods
-          counts <- CM.forM groups $ \(pkg, pkgMods) -> do
-            let dir = packageOutTest pkg
-            putStrLn $ "  " ++ pkg ++ ": " ++ show (length pkgMods) ++ " test modules → " ++ dir
-            genTestForDir dir pkgMods
-          return (sum counts)
-        (Nothing, False) -> do
-          putStrLn $ "  " ++ show (length testMods) ++ " test modules → " ++ outTest
-          genTestForDir outTest testMods
-      testEnd <- getCurrentTime
-
-      putStrLn $ "  Generated " ++ show count ++ " test files."
-      putStrLn $ "  Time: " ++ formatTime (elapsed testEnd testStart)
-      putStrLn ""
-      return count
-    else return 0
-
-  let genTestSuccess = True
-
-  -- Scala post-processing: wrap long lines in every generated .scala file.
-  -- The Scala compiler hits stack/memory limits on extremely long single-line
-  -- expressions; wrapping is the same pass that writeScala applies in the
-  -- DSL-direct path, lifted here so the JSON pipeline produces identical output.
-  when (target == "scala") $ do
-    putStrLn "Post-processing: wrapping long Scala lines..."
-    wrapLongLinesInScalaTree outBase
-    putStrLn ""
-
-  putStrLn "=========================================="
-  putStrLn $ "Done: " ++ show mainFileCount ++ " main"
-    ++ (if optIncludeTests opts then " + " ++ show testFileCount ++ " test" else "")
-    ++ " files"
-  putStrLn $ "  Output: " ++ outBase
-  putStrLn "=========================================="
-
-  if not genTestSuccess
-    then exitFailure
-    else return ()
-
-elapsed :: UTCTime -> UTCTime -> Double
-elapsed end start = realToFrac (diffUTCTime end start)
-
--- | Stage 7: per-module target-side freshness filter.
---
--- For each module M in the input set, check whether its current DSL
--- source hash matches the hash recorded in the per-target digest
--- (<outBase>/<owning-pkg>/digest.json's "inputs" section). If so, the
--- target output already on disk reflects exactly the same DSL content,
--- so M can be skipped (no inference, no generation, no write).
---
--- The recorded digest is in v2 format (digest-check refresh writes it
--- after a successful regen). The "inputs" map's keys are namespace
--- strings (e.g. "hydra.core"); values are SHA-256 hex of the DSL
--- source file as of the last successful regen.
---
--- Modules with no recorded entry are kept (treated as dirty).
--- Modules with no current DSL source (synth modules etc.) are also
--- kept — we can't verify staleness, so we don't risk a false skip.
---
--- The per-target digest is read from
--- <outBase>/<pkg>/src/<sourceSet>/digest.json, where outBase is e.g.
--- "../../dist/java" (the parent of the per-package target dirs) and
--- sourceSet is "main" or "test".
-filterByTargetDigest :: FilePath -> String -> String -> [Module] -> IO [Module]
-filterByTargetDigest outBase pkg sourceSet mods = do
-  let digestPath = outBase FP.</> pkg FP.</> "src" FP.</> sourceSet FP.</> "digest.json"
-  exists <- SD.doesFileExist digestPath
-  if not exists
-    then do
-      putStrLn $ "  Per-module skip: no target digest at " ++ digestPath
-        ++ "; keeping all " ++ show (length mods) ++ " modules"
-      return mods
-    else do
-      stored <- Digest.readDigestV2 digestPath
-      let recordedInputs = Digest.digestInputs stored
-      if M.null recordedInputs
-        then do
-          putStrLn $ "  Per-module skip: target digest empty; keeping all "
-            ++ show (length mods) ++ " modules"
-          return mods
-        else do
-          -- Compute current DSL source hashes.
-          nsFiles <- Digest.discoverNamespaceFiles
-          currentDigest <- Digest.hashUniverse nsFiles mods
-          let isFresh m =
-                let nsStr = unNamespace (moduleNamespace m)
-                in case (M.lookup nsStr recordedInputs, M.lookup (Namespace nsStr) currentDigest) of
-                     (Just rec, Just cur) -> Digest.entryHash rec == cur
-                     _                    -> False
-              (fresh, dirty) = partition isFresh mods
-          if Prelude.null fresh
-            then do
-              putStrLn $ "  Per-module skip: 0 fresh / "
-                ++ show (length dirty) ++ " dirty; processing all"
-              return mods
-            else if Prelude.null dirty
-              then do
-                putStrLn $ "  Per-module skip: " ++ show (length fresh)
-                  ++ " fresh / 0 dirty; nothing to generate"
-                return []
-              else do
-                putStrLn $ "  Per-module skip: " ++ show (length fresh)
-                  ++ " fresh / " ++ show (length dirty)
-                  ++ " dirty; excluding fresh from generation"
-                return dirty
-
diff --git a/src/exec/diag-module/Main.hs b/src/exec/diag-module/Main.hs
deleted file mode 100644
--- a/src/exec/diag-module/Main.hs
+++ /dev/null
@@ -1,200 +0,0 @@
--- Diagnostic: bisect the incremental-inference bug down to individual
--- definitions.
---
--- Modes:
---   stack exec diag-module -- <ns1,ns2,...>
---     Use full modules as the dirty set; load the rest from dist/json.
---
---   stack exec diag-module -- --subset <ns> <defName1,defName2,...>
---     Build a synthetic module containing only the named definitions
---     of <ns>, use that as the single dirty module, load the rest of
---     the universe (including the full version of <ns>) from dist/json.
---     This lets us narrow the failure to a specific definition.
---
---   stack exec diag-module -- --list-defs <ns>
---     Print the definition names of the module, one per line.
-module Main where
-
-import Hydra.Kernel
-import Hydra.Generation (inferModulesGivenIO)
-import qualified Hydra.Codegen as CodeGeneration
-import qualified Hydra.Sources.All as All
-import qualified Hydra.Sources.Ext as Ext
-import qualified Hydra.Show.Errors as ShowError
-import qualified Hydra.Json.Model as JsonModel
-import Hydra.Dsl.Bootstrap (bootstrapGraph)
-import qualified Hydra.PackageRouting as PackageRouting
-
-import qualified Data.Aeson as A
-import qualified Data.ByteString.Lazy as BS
-import qualified Data.Aeson.KeyMap as AKM
-import qualified Data.Aeson.Key as AK
-import qualified Data.Vector as V
-import qualified Data.Text as T
-
-import qualified Data.Map as M
-import qualified Data.List as L
-import qualified Control.Exception as E
-import qualified Control.Monad as CM
-import qualified System.Environment as Env
-import qualified System.FilePath as FP
-import qualified System.Directory as SD
-import System.IO (hSetBuffering, stdout, BufferMode(..))
-
-parseJsonFile :: FilePath -> IO (Either String JsonModel.Value)
-parseJsonFile path = do
-  bytes <- BS.readFile path
-  case A.eitherDecode bytes of
-    Left err -> return (Left err)
-    Right aesonVal -> return (Right (aesonToJsonModel aesonVal))
-
-aesonToJsonModel :: A.Value -> JsonModel.Value
-aesonToJsonModel v = case v of
-  A.Null -> JsonModel.ValueNull
-  A.Bool b -> JsonModel.ValueBoolean b
-  A.Number n -> JsonModel.ValueNumber n
-  A.String t -> JsonModel.ValueString (T.unpack t)
-  A.Array xs -> JsonModel.ValueArray (fmap aesonToJsonModel (V.toList xs))
-  A.Object o -> JsonModel.ValueObject (M.fromList [(T.unpack (AK.toText k), aesonToJsonModel x) | (k, x) <- AKM.toList o])
-
-loadModuleFromJson :: FilePath -> [Module] -> Namespace -> IO Module
-loadModuleFromJson distJsonRoot universe ns = do
-  let pkg = PackageRouting.namespaceToPackage ns
-      pkgDir = distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "json"
-      filePath = pkgDir FP.</> CodeGeneration.namespaceToPath ns ++ ".json"
-  parseResult <- parseJsonFile filePath
-  case parseResult of
-    Left err -> fail $ "JSON parse error for " ++ unNamespace ns ++ " at " ++ filePath ++ ": " ++ err
-    Right jsonVal -> case CodeGeneration.decodeModuleFromJson bootstrapGraph universe jsonVal of
-      Left err -> fail $ "Module decode error for " ++ unNamespace ns ++ ": " ++ ShowError.error err
-      Right m -> return m
-
-main :: IO ()
-main = do
-  hSetBuffering stdout NoBuffering
-  args <- Env.getArgs
-  case args of
-    ["--list-defs", ns] -> listDefs ns
-    ["--subset", ns, defSpec] -> runSubset ns defSpec
-    [spec] -> runModules spec
-    _      -> fail "Usage: diag-module [--list-defs <ns>] [--subset <ns> <def1,def2,...>] [<ns1,ns2,...>]"
-
-listDefs :: String -> IO ()
-listDefs nsStr = do
-  let ns = Namespace nsStr
-      universe = All.mainModules ++ Ext.hydraExtModules
-  case L.find (\m -> moduleNamespace m == ns) universe of
-    Nothing -> fail $ "No such module: " ++ nsStr
-    Just m -> do
-      let defs = moduleDefinitions m
-      putStrLn $ "Definitions in " ++ nsStr ++ " (" ++ show (length defs) ++ " total):"
-      mapM_ putStrLn (definitionNames defs)
-
-definitionNames :: [Definition] -> [String]
-definitionNames ds = fmap definitionName ds
-  where
-    definitionName d = case d of
-      DefinitionTerm td -> unName (termDefinitionName td)
-      DefinitionType td -> unName (typeDefinitionName td)
-
-runModules :: String -> IO ()
-runModules spec = do
-  let universe = All.mainModules ++ Ext.hydraExtModules
-  putStrLn $ "Universe: " ++ show (length universe) ++ " modules"
-  let allKernelNss = [moduleNamespace m | m <- universe,
-                       let ns = unNamespace (moduleNamespace m),
-                       not ("hydra.test." `L.isPrefixOf` ns),
-                       not ("hydra.ext." `L.isPrefixOf` ns),
-                       not ("hydra.wasm." `L.isPrefixOf` ns),
-                       not ("hydra.coq." `L.isPrefixOf` ns),
-                       not ("hydra.javascript." `L.isPrefixOf` ns)]
-      half = length allKernelNss `div` 2
-      dirtyNss = case spec of
-        "ALL"   -> allKernelNss
-        "HALF1" -> take half allKernelNss
-        "HALF2" -> drop half allKernelNss
-        _ -> fmap Namespace (splitCommas spec)
-  putStrLn $ "Dirty set: " ++ show (length dirtyNss) ++ " modules"
-  CM.when (length dirtyNss <= 20) $
-    mapM_ (\ns -> putStrLn $ "  " ++ unNamespace ns) dirtyNss
-  let dirtySet = M.fromList [(ns, ()) | ns <- dirtyNss]
-      dirtyMods = [m | m <- universe, M.member (moduleNamespace m) dirtySet]
-      cleanMods = [m | m <- universe, not (M.member (moduleNamespace m) dirtySet)]
-  runWithCleanAndDirty cleanMods dirtyMods
-
--- Subset mode: build a dirty module at namespace "hydra.bisect" that
--- contains CLONES of the named definitions from <ns>. The full <ns> stays
--- in the clean universe, so cross-definition references in the clones
--- resolve against it (i.e. clone of X calling Y sees clean X.Y). The
--- cloned definition names are `hydra.bisect.<lastComponent>`, so there's
--- no name collision with the clean universe.
---
--- This isolates whether a specific definition's term body / type
--- annotation triggers the unification bug, without perturbing the rest
--- of the universe.
-runSubset :: String -> String -> IO ()
-runSubset nsStr defSpec = do
-  let ns = Namespace nsStr
-      universe = All.mainModules ++ Ext.hydraExtModules
-      wanted = splitCommas defSpec
-      bisectNs = Namespace "hydra.bisect"
-  case L.find (\m -> moduleNamespace m == ns) universe of
-    Nothing -> fail $ "No such module: " ++ nsStr
-    Just fullMod -> do
-      let allDefs = moduleDefinitions fullMod
-          lastCompOf s = L.reverse (L.takeWhile (/= '.') (L.reverse s))
-          defMatches n d = case d of
-            DefinitionTerm td -> lastCompOf (unName (termDefinitionName td)) == n
-            DefinitionType td -> lastCompOf (unName (typeDefinitionName td)) == n
-          picked = [d | n <- wanted, d <- allDefs, defMatches n d]
-      let defName d = case d of
-            DefinitionTerm td -> unName (termDefinitionName td)
-            DefinitionType td -> unName (typeDefinitionName td)
-      CM.when (length picked /= length wanted) $ do
-        putStrLn "Warning: not all requested definitions were found."
-        let found = fmap defName picked
-            missing = filter (\n -> not (elem n found)) wanted
-        mapM_ (\m -> putStrLn $ "  missing: " ++ m) missing
-      let cloneDef d = case d of
-            DefinitionTerm td ->
-              DefinitionTerm td { termDefinitionName = rename (termDefinitionName td) }
-            DefinitionType td ->
-              DefinitionType td { typeDefinitionName = rename (typeDefinitionName td) }
-          rename (Name full) =
-            let simple = L.reverse (L.takeWhile (/= '.') (L.reverse full))
-            in Name ("hydra.bisect." ++ simple)
-          cloned = fmap cloneDef picked
-      let syntheticDirty = Module {
-            moduleNamespace = bisectNs,
-            moduleDefinitions = cloned,
-            moduleTermDependencies = [ns],
-            moduleTypeDependencies = [ns],
-            moduleDescription = Just "Bisection dummy module" }
-      putStrLn $ "Universe: " ++ show (length universe) ++ " kept intact; dirty is new hydra.bisect with " ++ show (length picked) ++ " cloned defs:"
-      mapM_ (\d -> putStrLn $ "  " ++ defName d ++ " → " ++ cloneName d) picked
-      runWithCleanAndDirty universe [syntheticDirty]
-  where
-    cloneName d = case d of
-      DefinitionTerm td -> "hydra.bisect." ++ lastComp (unName (termDefinitionName td))
-      DefinitionType td -> "hydra.bisect." ++ lastComp (unName (typeDefinitionName td))
-    lastComp s = L.reverse (L.takeWhile (/= '.') (L.reverse s))
-
-runWithCleanAndDirty :: [Module] -> [Module] -> IO ()
-runWithCleanAndDirty cleanMods dirtyMods = do
-  putStrLn $ "Loading " ++ show (length cleanMods) ++ " clean modules from dist/json..."
-  distJsonRoot <- SD.makeAbsolute "../../dist/json"
-  cleanLoaded <- mapM (loadModuleFromJson distJsonRoot (cleanMods ++ dirtyMods) . moduleNamespace) cleanMods
-  putStrLn "Running inferModulesGiven..."
-  result <- E.try (inferModulesGivenIO (cleanLoaded ++ dirtyMods) dirtyMods) :: IO (Either E.SomeException [Module])
-  case result of
-    Left e -> do
-      putStrLn "FAILED"
-      putStrLn $ show e
-    Right _ -> putStrLn "OK"
-
-splitCommas :: String -> [String]
-splitCommas [] = []
-splitCommas s = let (h, t) = break (== ',') s
-                in h : case t of
-                     [] -> []
-                     _  -> splitCommas (drop 1 t)
diff --git a/src/exec/digest-check/Main.hs b/src/exec/digest-check/Main.hs
deleted file mode 100644
--- a/src/exec/digest-check/Main.hs
+++ /dev/null
@@ -1,238 +0,0 @@
--- | Per-target freshness check + digest refresh tool.
---
--- Two subcommands:
---
---   digest-check fresh --inputs <file> --output-digest <file>
---     Reads the input digest (e.g. dist/json/<pkg>/digest.json) and
---     the output digest (e.g. dist/<lang>/<pkg>/digest.json).
---     Returns exit 0 if:
---       * the inputs section of the output digest matches the input
---         digest's hashes,
---       * every output file recorded in the output digest exists and
---         hashes to its recorded value,
---       * the generator stamp matches the current generator stamp.
---     Returns exit 1 (cache miss) otherwise.
---
---     Callers use this with an `if !` shell idiom to skip work when
---     fresh and run the work otherwise.
---
---   digest-check refresh --inputs <file> --output-dir <dir>
---                        --output-digest <file>
---     Recomputes the hash of every regular file under <dir> (recursive),
---     reads the input digest, and writes a new output digest with both
---     sections populated plus the current generator stamp.
---
---     Run after a successful regen to record what was produced.
---
--- All paths are taken as-is (no implicit normalization).
-
-module Main where
-
-import Hydra.Digest
-import Hydra.Packaging (Namespace(..))
-
-import Control.Monad (when, forM)
-import Data.List (isPrefixOf)
-import qualified Data.Map as M
-import System.Directory (doesDirectoryExist, doesFileExist, listDirectory)
-import System.Environment (getArgs)
-import System.Exit (exitFailure, exitSuccess)
-import qualified System.FilePath as FP
-import System.IO (hPutStrLn, stderr)
-
-data Mode = Fresh | Refresh deriving (Eq, Show)
-
-data Options = Options
-  { optMode         :: Mode
-  , optInputDigest  :: FilePath
-  , optOutputDigest :: FilePath
-  , optOutputDir    :: Maybe FilePath
-  } deriving Show
-
-usage :: String
-usage = unlines
-  [ "Usage:"
-  , "  digest-check fresh   --inputs <file> --output-dir <dir> --output-digest <file>"
-  , "  digest-check refresh --inputs <file> --output-dir <dir> --output-digest <file>"
-  , ""
-  , "  fresh:    exit 0 if cache hit (skip work), exit 1 if miss (do work)."
-  , "            Resolves recorded (relative) output paths against <output-dir>."
-  , "  refresh:  walk <output-dir>, hash every file, write a new"
-  , "            <output-digest> with paths stored relative to <output-dir>."
-  ]
-
-parseArgs :: [String] -> Either String Options
-parseArgs [] = Left "Missing subcommand"
-parseArgs (cmd : rest) = do
-  mode <- case cmd of
-    "fresh"   -> Right Fresh
-    "refresh" -> Right Refresh
-    _         -> Left ("Unknown subcommand: " ++ cmd)
-  go (Options mode "" "" Nothing) rest
-  where
-    go opts [] = if null (optInputDigest opts) || null (optOutputDigest opts)
-      then Left "Missing required --inputs or --output-digest"
-      else if optOutputDir opts == Nothing
-        then Left "--output-dir is required"
-        else Right opts
-    go opts ("--inputs" : v : xs)        = go (opts { optInputDigest  = v }) xs
-    go opts ("--output-digest" : v : xs) = go (opts { optOutputDigest = v }) xs
-    go opts ("--output-dir" : v : xs)    = go (opts { optOutputDir    = Just v }) xs
-    go _ (a : _) = Left ("Unknown argument: " ++ a)
-
-main :: IO ()
-main = do
-  args <- getArgs
-  case parseArgs args of
-    Left err -> do
-      hPutStrLn stderr ("Error: " ++ err)
-      hPutStrLn stderr usage
-      exitFailure
-    Right opts -> case optMode opts of
-      Fresh   -> doFresh opts
-      Refresh -> doRefresh opts
-
-doFresh :: Options -> IO ()
-doFresh opts = do
-  -- Input digest: must exist. Absent means we have no record of what
-  -- was used, so always treat as cache miss.
-  inputExists <- doesFileExist (optInputDigest opts)
-  if not inputExists
-    then do
-      putStrLn $ "  digest-check: input digest absent ("
-        ++ optInputDigest opts ++ "); cache miss"
-      exitFailure
-    else return ()
-
-  -- Output digest: must exist. Absent means we have no record of
-  -- what was produced previously.
-  outputExists <- doesFileExist (optOutputDigest opts)
-  if not outputExists
-    then do
-      putStrLn $ "  digest-check: output digest absent ("
-        ++ optOutputDigest opts ++ "); cache miss"
-      exitFailure
-    else return ()
-
-  inputDigest  <- Hydra.Digest.readDigest (optInputDigest opts)
-  outputDigest <- Hydra.Digest.readDigestV2 (optOutputDigest opts)
-
-  -- Compare: each input hash from the v1 input digest must appear,
-  -- with the same hash, in the v2 output digest's inputs map. (We
-  -- key by namespace string in v1; in v2 we use FilePath. The bridge
-  -- is namespace strings live as paths in the output digest, recorded
-  -- by 'refresh' below.)
-  let recordedInputs = M.map entryHash (digestInputs outputDigest)
-      currentInputs  = M.fromList
-        [ (k, v) | (Namespace k, v) <- M.toList inputDigest ]
-
-  if recordedInputs /= currentInputs
-    then do
-      putStrLn $ "  digest-check: input mismatch; cache miss"
-      exitFailure
-    else return ()
-
-  -- Generator stamp must match.
-  currentGen <- generatorStamp
-  if currentGen /= digestGenerator outputDigest
-    then do
-      putStrLn $ "  digest-check: generator stamp mismatch ("
-        ++ digestGenerator outputDigest ++ " vs " ++ currentGen
-        ++ "); cache miss"
-      exitFailure
-    else return ()
-
-  -- Output files must all exist with matching hashes. Paths recorded
-  -- in the digest are relative to outputDir (per 'refresh' below).
-  let outputDir = case optOutputDir opts of
-        Just d  -> d
-        Nothing -> error "doFresh called without output-dir (parseArgs bug)"
-  outputsOk <- fmap and $ forM (M.toList (digestOutputs outputDigest)) $ \(rel, entry) -> do
-    let abs_ = outputDir FP.</> rel
-    exists <- doesFileExist abs_
-    if not exists then return False else do
-      h <- Hydra.Digest.hashFile abs_
-      return (h == entryHash entry)
-  if not outputsOk
-    then do
-      putStrLn $ "  digest-check: output files missing or modified; cache miss"
-      exitFailure
-    else do
-      putStrLn $ "  digest-check: cache hit; skipping work"
-      exitSuccess
-
-doRefresh :: Options -> IO ()
-doRefresh opts = do
-  let outputDir = case optOutputDir opts of
-        Just d  -> d
-        Nothing -> error "doRefresh called without output-dir (parseArgs bug)"
-  -- Read the input digest. May be absent if the inputs themselves
-  -- aren't cached yet; that's OK, we'll just record an empty inputs
-  -- map and the next 'fresh' check will miss until inputs settle.
-  inputDigest <- Hydra.Digest.readDigest (optInputDigest opts)
-  let inputsAsMap = M.fromList
-        [ (k, DigestEntry KindOther v)
-        | (Namespace k, v) <- M.toList inputDigest
-        ]
-
-  -- Walk the output dir. Paths are stored relative to outputDir for
-  -- portability (absolute paths would bake in the worktree location
-  -- and break across machines, CI runners, etc).
-  --
-  -- Exclude the output-digest file itself from the walk: we're about
-  -- to overwrite it, and hashing it here would (a) be a self-reference
-  -- that changes every run and (b) race with writeDigestV2 below.
-  allFiles <- listFilesRecursive outputDir
-  -- Normalize both sides so "dir//digest.json" (double slash from a
-  -- pkg_dir with trailing /) compares equal to "dir/digest.json" as
-  -- emitted by listFilesRecursive.
-  let digestPath = FP.normalise (optOutputDigest opts)
-      files = filter (\fp -> FP.normalise fp /= digestPath) allFiles
-  outputs <- fmap M.fromList $ forM files $ \fp -> do
-    h <- Hydra.Digest.hashFile fp
-    let rel = makeRelative' outputDir fp
-    return (rel, DigestEntry KindTargetFile h)
-
-  gen <- generatorStamp
-
-  let d = Digest
-        { digestInputs    = inputsAsMap
-        , digestOutputs   = outputs
-        , digestGenerator = gen
-        }
-
-  Hydra.Digest.writeDigestV2 (optOutputDigest opts) d
-  putStrLn $ "  digest-check: wrote " ++ optOutputDigest opts
-    ++ " (" ++ show (M.size inputsAsMap) ++ " inputs, "
-    ++ show (M.size outputs) ++ " outputs)"
-
--- | Recursively list every regular file under a directory.
--- Skips dotfiles and dot-directories.
-listFilesRecursive :: FilePath -> IO [FilePath]
-listFilesRecursive root = do
-  exists <- doesDirectoryExist root
-  if not exists then return [] else go root
-  where
-    go dir = do
-      entries <- listDirectory dir
-      fmap concat $ forM entries $ \e ->
-        if "." `isPrefixOf` e
-          then return []
-          else do
-            let p = dir FP.</> e
-            isDir <- doesDirectoryExist p
-            if isDir
-              then go p
-              else do
-                isFile <- doesFileExist p
-                return (if isFile then [p] else [])
-
--- | Compute 'path' relative to 'base'. If 'path' isn't under 'base',
--- returns 'path' unchanged (callers should guard against that, but the
--- fallback keeps us from producing absolute paths accidentally).
-makeRelative' :: FilePath -> FilePath -> FilePath
-makeRelative' base path =
-  let prefix = if not (null base) && last base == '/' then base else base ++ "/"
-  in if prefix `isPrefixOf` path
-       then drop (length prefix) path
-       else path
diff --git a/src/exec/generate-coq-tests/Main.hs b/src/exec/generate-coq-tests/Main.hs
deleted file mode 100644
--- a/src/exec/generate-coq-tests/Main.hs
+++ /dev/null
@@ -1,44 +0,0 @@
-module Main where
-
-import Hydra.Sources.All (kernelModules, mainModules)
-import Hydra.Sources.Test.All (testModules)
-import Hydra.ExtGeneration (writeCoq)
-
-import Control.Monad (forM_)
-import Data.List (sort)
-import System.Directory (copyFile, createDirectoryIfMissing, doesDirectoryExist, listDirectory)
-import System.FilePath ((</>))
-
--- | Copy hand-written test-support .v files (e.g. runner.v) into the
--- generated test tree so coqc can see them alongside the generated modules.
--- Source path is resolved relative to the current working directory, which
--- is heads/haskell/ when generate-coq-tests runs.
-copyCoqTestFiles :: FilePath -> IO ()
-copyCoqTestFiles baseDir = do
-  let srcDir = "src/test/coq" </> "hydra" </> "test"
-      dstDir = baseDir </> "hydra" </> "test"
-  srcExists <- doesDirectoryExist srcDir
-  if not srcExists
-    then return ()
-    else do
-      createDirectoryIfMissing True dstDir
-      files <- sort <$> listDirectory srcDir
-      forM_ files $ \f -> do
-        copyFile (srcDir </> f) (dstDir </> f)
-        putStrLn ("  hydra/test/" ++ f)
-
-main :: IO ()
-main = do
-  let outputDir = "../../dist/coq/hydra-kernel/src/test/coq"
-      universe  = mainModules ++ testModules
-  putStrLn "Generating Coq (.v) files from Hydra test modules..."
-  n <- writeCoq outputDir universe testModules
-  putStrLn $ "Generated " ++ show n ++ " test .v files"
-  putStrLn "Copying hand-written test support files..."
-  copyCoqTestFiles outputDir
-  -- Kernel modules are in dist/coq/hydra-kernel/src/main/coq. The generated
-  -- test files Require their dependencies via fully qualified `hydra.*`
-  -- module paths, so both roots need to be on coqc's library path. See the
-  -- _CoqProject in the test runner directory (written separately).
-  putStrLn $ "Output: " ++ outputDir
-  putStrLn $ "(Add a _CoqProject that unions the main and test trees to coqc.)"
diff --git a/src/exec/generate-coq/Main.hs b/src/exec/generate-coq/Main.hs
deleted file mode 100644
--- a/src/exec/generate-coq/Main.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-module Main where
-
-import Hydra.Sources.All (kernelModules)
-import Hydra.ExtGeneration (writeCoq)
-import Hydra.Coq.GenerateDriver (writeCoqProject, copyCoqLibFiles)
-
-main :: IO ()
-main = do
-  let outputDir = "../../dist/coq/hydra-kernel/src/main/coq"
-  putStrLn "Generating Coq (.v) files from Hydra kernel modules..."
-  writeCoqProject outputDir
-  copyCoqLibFiles outputDir
-  n <- writeCoq outputDir kernelModules kernelModules
-  putStrLn $ "Generated " ++ show n ++ " .v files"
diff --git a/src/exec/transform-haskell-dsl-to-json/Main.hs b/src/exec/transform-haskell-dsl-to-json/Main.hs
deleted file mode 100644
--- a/src/exec/transform-haskell-dsl-to-json/Main.hs
+++ /dev/null
@@ -1,269 +0,0 @@
--- | Layer 1 transform: Haskell DSL -> JSON, scoped to a single package and
--- source set.
---
--- Usage:
---   transform-haskell-dsl-to-json --package <pkg> --source-set <main|test>
---                                 [--dist-json-root <dir>]
---
--- Reads the named package's manifest module (via Hydra.Sources.Ext, which
--- re-exports every per-package manifest), selects the requested source set,
--- and writes that set's JSON under <dist-json-root>/<pkg>/src/<set>/json/.
---
--- The full main-side universe (all packages) is used as the type-resolution
--- context, so cross-package type references resolve correctly. Only the
--- requested package's modules are actually written to disk.
---
--- Empty source sets (e.g. 'test' on a package with no test modules) exit 0
--- cleanly with a one-line note; callers can invoke unconditionally.
---
--- This is a Layer 1 transform per the sync system design in
--- feature_290_packaging-plan.md: stateless, idempotent, single
--- (package, source-set) pair per invocation. Composition is the orchestrator's
--- job, not this exec's.
-
-module Main where
-
-import Hydra.Generation (writeModulesJson, writeModulesJsonPackageSplit, writeDslJsonPackageSplit)
-import Hydra.PackageRouting (defaultDistJsonRoot, namespaceToPackage)
-import Hydra.Sources.Ext (
-  mainModules, dslSourceModules,
-  kernelModules, haskellModules, jsonModules, otherModules,
-  hydraCoqModules, hydraJavaModules, hydraJavaScriptModules,
-  hydraPythonModules, hydraScalaModules, hydraLispModules,
-  hydraPgModules, hydraRdfModules, hydraWasmModules,
-  hydraExtPackageModules,
-  hydraExtDecodingModules, hydraExtEncodingModules)
-import Hydra.Sources.Eval.Lib.All (evalLibModules)
-import Hydra.Sources.Test.All (testModules)
-
-import qualified Hydra.Kernel as Kernel
-import qualified Hydra.Sources.Demos.GenPG.Transform as GenPGTransform
-
-import Control.Monad (when)
-import qualified Data.List as L
-import qualified Data.Set as S
-import System.Environment (getArgs)
-import System.Exit (exitFailure, exitSuccess)
-import qualified System.FilePath as FP
-
-
--- | Deduplicate a list of modules by namespace, keeping the first occurrence.
-dedupByNamespace :: [Kernel.Module] -> [Kernel.Module]
-dedupByNamespace = go S.empty
-  where
-    go _    []     = []
-    go seen (m:ms)
-      | ns `S.member` seen = go seen ms
-      | otherwise          = m : go (S.insert ns seen) ms
-      where ns = Kernel.moduleNamespace m
-
-
--- | All main-side modules across all packages, deduped. Used as the type-
--- resolution universe regardless of which package is being written.
---
--- Every package's DSL sources are included here so that per-package JSON
--- output can route modules to their owning package via namespaceToPackage.
-fullMainUniverse :: [Kernel.Module]
-fullMainUniverse = dedupByNamespace $ L.concat
-  [ mainModules
-  , evalLibModules
-  , dslSourceModules
-  , hydraCoqModules
-  , hydraJavaModules
-  , hydraJavaScriptModules
-  , hydraPythonModules
-  , hydraScalaModules
-  , hydraLispModules
-  , hydraPgModules
-  , hydraRdfModules
-  , hydraWasmModules
-  , hydraExtPackageModules
-  , hydraExtDecodingModules
-  , hydraExtEncodingModules
-  , [GenPGTransform.module_]
-  ]
-
-
-data Options = Options
-  { optPackage      :: Maybe String
-  , optSourceSet    :: String
-  , optDistJsonRoot :: FilePath
-  }
-
-defaultOptions :: Options
-defaultOptions = Options
-  { optPackage      = Nothing
-  , optSourceSet    = "main"
-  , optDistJsonRoot = defaultDistJsonRoot
-  }
-
-
-parseArgs :: [String] -> Either String Options
-parseArgs = go defaultOptions
-  where
-    go opts [] = case optPackage opts of
-      Nothing -> Right opts  -- no --package means "all packages" (batch mode)
-      Just _  -> Right opts
-    go opts ("--package" : p : rest) = go (opts { optPackage = Just p }) rest
-    go opts ("--all" : rest) = go (opts { optPackage = Nothing }) rest
-    go opts ("--source-set" : s : rest)
-      | s == "main" || s == "test" = go (opts { optSourceSet = s }) rest
-      | otherwise                  = Left $ "--source-set must be 'main' or 'test', got: " ++ s
-    go opts ("--dist-json-root" : d : rest) = go (opts { optDistJsonRoot = d }) rest
-    go _    (arg : _) = Left $ "Unknown argument: " ++ arg
-
-
-usage :: String
-usage = unlines
-  [ "Usage: transform-haskell-dsl-to-json [--package <pkg>] [OPTIONS]"
-  , ""
-  , "Options:"
-  , "  --package <pkg>          Package to transform. If omitted (or --all"
-  , "                           is passed), every package is transformed in a"
-  , "                           single Haskell-universe load."
-  , "                           Packages: hydra-kernel, hydra-haskell,"
-  , "                           hydra-java, hydra-python, hydra-scala,"
-  , "                           hydra-lisp, hydra-coq, hydra-javascript,"
-  , "                           hydra-pg, hydra-rdf, hydra-ext, hydra-wasm."
-  , "  --all                    Batch mode: transform every package."
-  , "  --source-set <main|test> Source set to transform (default: main)."
-  , "                           'test' is only non-empty for hydra-kernel today."
-  , "  --dist-json-root <dir>   Output root (default: ../../dist/json)."
-  ]
-
-
--- | Every supported package (ordering matches hydra.json).
-allPackages :: [String]
-allPackages =
-  [ "hydra-kernel"
-  , "hydra-haskell"
-  , "hydra-java"
-  , "hydra-python"
-  , "hydra-scala"
-  , "hydra-lisp"
-  , "hydra-coq"
-  , "hydra-javascript"
-  , "hydra-wasm"
-  , "hydra-pg"
-  , "hydra-rdf"
-  , "hydra-ext"
-  ]
-
-
--- | Return the test modules owned by the given package. Today, only the
--- kernel has any test modules; other packages return [].
-packageTestModules :: String -> [Kernel.Module]
-packageTestModules "hydra-kernel" = testModules
-packageTestModules _              = []
-
-
--- | Return the type-defining modules whose DSL wrappers should be generated
--- for this package. Only kernel and hydra-haskell have DSL wrappers today;
--- other packages return [] and skip DSL generation.
---
--- Mirrors update-json-main's dslInputMods composition: the kernel DSL pass
--- covers kernel + json + other modules; the haskell DSL pass covers haskell
--- coder modules. Other packages don't produce DSL wrappers.
-packageDslInputModules :: String -> [Kernel.Module]
-packageDslInputModules "hydra-kernel"  = kernelModules ++ jsonModules ++ otherModules
-packageDslInputModules "hydra-haskell" = haskellModules
-packageDslInputModules _               = []
-
-
-main :: IO ()
-main = do
-  args <- getArgs
-  opts <- case parseArgs args of
-    Left err -> do
-      putStrLn $ "Error: " ++ err
-      putStrLn ""
-      putStrLn usage
-      exitFailure
-    Right o -> return o
-
-  let srcSet    = optSourceSet opts
-      distRoot  = optDistJsonRoot opts
-
-  case optPackage opts of
-    Just pkg -> runSinglePackage pkg srcSet distRoot
-    Nothing  -> runAllPackages      srcSet distRoot
-
-  putStrLn "=== Done. ==="
-
--- | Transform a single package. Historical behaviour, kept for scoped
--- callers that invoke one package at a time.
-runSinglePackage :: String -> String -> FilePath -> IO ()
-runSinglePackage pkg srcSet distRoot = do
-  let outDir = distRoot FP.</> pkg FP.</> "src" FP.</> srcSet FP.</> "json"
-  putStrLn $ "=== Transform Haskell DSL -> JSON: " ++ pkg ++ " (" ++ srcSet ++ ") ==="
-
-  let (mods, universe) = case srcSet of
-        "main" ->
-          let owned = filter (\m -> namespaceToPackage (Kernel.moduleNamespace m) == pkg)
-                             fullMainUniverse
-          in (owned, fullMainUniverse)
-        "test" ->
-          let ts       = packageTestModules pkg
-              testUniv = fullMainUniverse ++ ts
-          in (ts, testUniv)
-        _ -> ([], fullMainUniverse)
-
-  when (null mods) $ do
-    putStrLn $ "  (no modules in " ++ pkg ++ "/" ++ srcSet ++ "; skipping)"
-    exitSuccess
-
-  putStrLn $ "  Writing " ++ show (length mods) ++ " modules -> " ++ outDir
-
-  case srcSet of
-    "main" -> do
-      writeModulesJsonPackageSplit True distRoot universe mods
-      let dslInputs = packageDslInputModules pkg
-      case dslInputs of
-        [] -> return ()
-        _  -> do
-          putStrLn ""
-          putStrLn $ "  Generating DSL wrapper modules for "
-            ++ show (length dslInputs) ++ " type modules..."
-          writeDslJsonPackageSplit distRoot universe dslInputs
-    "test" -> writeModulesJson True outDir universe mods
-    _      -> return ()
-
--- | Batch mode: transform every package with one Haskell universe load.
--- writeModulesJsonPackageSplit routes modules to their owning package's
--- per-package JSON tree based on namespaceToPackage, so passing the whole
--- universe produces the same on-disk layout as per-package calls — but
--- we only pay the Haskell startup + DSL-compile cost once.
-runAllPackages :: String -> FilePath -> IO ()
-runAllPackages srcSet distRoot = do
-  putStrLn $ "=== Transform Haskell DSL -> JSON: all packages (" ++ srcSet ++ ") ==="
-
-  case srcSet of
-    "main" -> do
-      putStrLn $ "  Writing " ++ show (length fullMainUniverse)
-        ++ " main modules (routed per-package)..."
-      writeModulesJsonPackageSplit True distRoot fullMainUniverse fullMainUniverse
-      -- DSL wrappers: generate for every package that has type-defining
-      -- inputs. The routing is implicit — wrapper namespaces like
-      -- hydra.dsl.<pkg>.* resolve to their owning package via
-      -- packagePrefixes in PackageRouting.
-      let allDslInputs = concatMap packageDslInputModules allPackages
-      when (not (null allDslInputs)) $ do
-        putStrLn ""
-        putStrLn $ "  Generating DSL wrapper modules for "
-          ++ show (length allDslInputs) ++ " type modules..."
-        writeDslJsonPackageSplit distRoot fullMainUniverse allDslInputs
-    "test" -> do
-      let allTestMods = concatMap packageTestModules allPackages
-          testUniverse = fullMainUniverse ++ allTestMods
-      when (null allTestMods) $ do
-        putStrLn "  (no test modules in any package; skipping)"
-        exitSuccess
-      -- Today only hydra-kernel has tests, and its tests live at a flat
-      -- hydra-kernel/src/test/json/ location. writeModulesJson is the
-      -- direct (non-routing) writer.
-      let kernelTestDir = distRoot FP.</> "hydra-kernel" FP.</> "src"
-            FP.</> "test" FP.</> "json"
-      putStrLn $ "  Writing " ++ show (length allTestMods)
-        ++ " test modules -> " ++ kernelTestDir
-      writeModulesJson True kernelTestDir testUniverse allTestMods
-    _ -> return ()
diff --git a/src/exec/update-json-kernel/Main.hs b/src/exec/update-json-kernel/Main.hs
deleted file mode 100644
--- a/src/exec/update-json-kernel/Main.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-module Main where
-
-import Hydra.Generation (writeModulesJson)
-import Hydra.Sources.All (kernelModules)
-import Hydra.Sources.Eval.Lib.All (evalLibModules)
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import Control.Exception (catch, SomeException)
-
-
-main :: IO ()
-main = do
-  outputDir <- parseOutputDir "../../dist/json/hydra-kernel/src/main/json"
-  let allMods = kernelModules ++ evalLibModules
-  putStrLn "=== Generate Hydra kernel JSON ==="
-  putStrLn ""
-  putStrLn $ "Generating " ++ show (length allMods) ++ " kernel + eval lib modules to JSON..."
-  putStrLn ""
-
-  result <- catch (writeModulesJson True outputDir allMods allMods >> return True)
-                  (\e -> do
-                    putStrLn $ "Error: " ++ show (e :: SomeException)
-                    return False)
-
-  if result
-    then do
-      putStrLn ""
-      putStrLn "=== Done! ==="
-      putStrLn ""
-      putStrLn $ "Generated files are in: " ++ outputDir ++ "/"
-    else do
-      putStrLn ""
-      putStrLn "=== FAILED ==="
-      exitFailure
-
-parseOutputDir :: String -> IO String
-parseOutputDir defaultDir = do
-  args <- getArgs
-  return $ go args
-  where
-    go ("--output-dir" : dir : _) = dir
-    go (_ : rest) = go rest
-    go [] = defaultDir
diff --git a/src/exec/update-json-main/Main.hs b/src/exec/update-json-main/Main.hs
deleted file mode 100644
--- a/src/exec/update-json-main/Main.hs
+++ /dev/null
@@ -1,119 +0,0 @@
--- | Export all Hydra DSL modules to JSON, fanned out across per-package
--- directories under dist/json/.
---
--- Replaces the older update-json-main + update-json-ext split. Every module
--- in the universe is routed to its owning package's dist/json/<pkg>/src/main/json/
--- directory via the routing table in Hydra.PackageRouting.
---
--- Universe (deduped by namespace before writing):
---   * hydra-kernel: mainModules + evalLibModules + dslSourceModules
---   * hydra-haskell: haskellModules (already in mainModules; routed here)
---   * coder packages: hydraJavaModules, hydraPythonModules, hydraScalaModules,
---     hydraLispModules
---   * hydra-pg: hydraPgModules + pg decode/encode meta-sources + GenPGTransform
---   * hydra-rdf: hydraRdfModules
---
--- DSL wrapper modules (hydra.dsl.*) are generated in a second pass with the
--- same routing.
-
-module Main where
-
-import Hydra.Generation (writeModulesJsonPackageSplit, writeDslJsonPackageSplit)
-import Hydra.PackageRouting (defaultDistJsonRoot)
-import Hydra.Sources.Ext (
-  mainModules, dslSourceModules, kernelModules, haskellModules, jsonModules, otherModules,
-  hydraCoqModules, hydraJavaModules, hydraJavaScriptModules,
-  hydraPythonModules, hydraScalaModules, hydraLispModules,
-  hydraPgModules, hydraRdfModules, hydraWasmModules,
-  hydraExtPackageModules,
-  hydraExtDecodingModules, hydraExtEncodingModules)
-import Hydra.Sources.Eval.Lib.All (evalLibModules)
-
-import qualified Hydra.Kernel as Kernel
-import qualified Hydra.Sources.Demos.GenPG.Transform as GenPGTransform
-
-import Control.Exception (catch, SomeException)
-import qualified Data.List as L
-import qualified Data.Set as S
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-
-
--- | Deduplicate a list of modules by namespace, keeping the first occurrence.
-dedupByNamespace :: [Kernel.Module] -> [Kernel.Module]
-dedupByNamespace = go S.empty
-  where
-    go _    []     = []
-    go seen (m:ms)
-      | ns `S.member` seen = go seen ms
-      | otherwise          = m : go (S.insert ns seen) ms
-      where ns = Kernel.moduleNamespace m
-
-main :: IO ()
-main = do
-  distRoot <- parseDistRoot defaultDistJsonRoot
-
-  let universe = dedupByNamespace $ L.concat
-        [ mainModules
-        , evalLibModules
-        , dslSourceModules
-        , hydraCoqModules
-        , hydraJavaModules
-        , hydraJavaScriptModules
-        , hydraPythonModules
-        , hydraScalaModules
-        , hydraLispModules
-        , hydraPgModules
-        , hydraRdfModules
-        , hydraWasmModules
-        , hydraExtPackageModules
-        , hydraExtDecodingModules
-        , hydraExtEncodingModules
-        , [GenPGTransform.module_]
-        ]
-
-  putStrLn "=== Generate Hydra JSON modules ==="
-  putStrLn ""
-  putStrLn $ "Generating " ++ show (length universe) ++ " modules to JSON, routed per package..."
-  putStrLn $ "dist-json root: " ++ distRoot
-  putStrLn ""
-
-  result <- catch
-    (writeModulesJsonPackageSplit True distRoot universe universe >> return True)
-    (\e -> do
-      putStrLn $ "Error: " ++ show (e :: SomeException)
-      return False)
-
-  putStrLn ""
-  putStrLn "Generating DSL wrapper modules to JSON..."
-  -- The DSL generator runs over the kernel-side type universe (kernel + json +
-  -- other + haskell coder). This matches the old behavior of update-json-main:
-  -- DSL modules are produced for every type in that universe.
-  let dslInputMods = kernelModules ++ jsonModules ++ otherModules ++ haskellModules
-  dslResult <- catch
-    (writeDslJsonPackageSplit distRoot universe dslInputMods >> return True)
-    (\e -> do
-      putStrLn $ "Error generating DSL JSON: " ++ show (e :: SomeException)
-      return False)
-
-  if result && dslResult
-    then do
-      putStrLn ""
-      putStrLn "=== Done! ==="
-    else do
-      putStrLn ""
-      putStrLn "=== FAILED ==="
-      exitFailure
-
--- | Parse an optional --dist-root argument. Retains the older --output-dir
--- flag name for call-site compatibility (it is interpreted as a dist-json
--- root now).
-parseDistRoot :: String -> IO String
-parseDistRoot defaultRoot = do
-  args <- getArgs
-  return $ go args
-  where
-    go ("--dist-root" : dir : _)  = dir
-    go ("--output-dir" : dir : _) = dir
-    go (_ : rest)                 = go rest
-    go []                         = defaultRoot
diff --git a/src/exec/update-json-manifest/Main.hs b/src/exec/update-json-manifest/Main.hs
deleted file mode 100644
--- a/src/exec/update-json-manifest/Main.hs
+++ /dev/null
@@ -1,69 +0,0 @@
--- | Write per-package manifest.json files under dist/json/<pkg>/src/main/json/.
---
--- Each package's manifest lists only the namespaces it owns. Bootstrap
--- readers (bootstrap-from-json, language hosts) walk multiple package
--- manifests in dependency order rather than reading a single monolithic
--- manifest.
-
-module Main where
-
-import Hydra.Generation (writePerPackageManifestsJson)
-import Hydra.PackageRouting (defaultDistJsonRoot)
-import Hydra.Sources.Ext (
-  mainModules, dslSourceModules, kernelModules, haskellModules, jsonModules, otherModules,
-  hydraCoqModules, hydraJavaModules, hydraJavaScriptModules,
-  hydraPythonModules, hydraScalaModules, hydraLispModules,
-  hydraPgModules, hydraRdfModules, hydraWasmModules,
-  hydraExtPackageModules,
-  hydraExtDecodingModules, hydraExtEncodingModules)
-import Hydra.Sources.Eval.Lib.All (evalLibModules)
-import Hydra.Sources.Test.All (testModules)
-
-import qualified Hydra.Kernel as Kernel
-import qualified Hydra.Sources.Demos.GenPG.Transform as GenPGTransform
-
-import qualified Data.List as L
-import qualified Data.Set as S
-
-
--- | Deduplicate a list of modules by namespace, keeping the first occurrence.
-dedupByNamespace :: [Kernel.Module] -> [Kernel.Module]
-dedupByNamespace = go S.empty
-  where
-    go _    []     = []
-    go seen (m:ms)
-      | ns `S.member` seen = go seen ms
-      | otherwise          = m : go (S.insert ns seen) ms
-      where ns = Kernel.moduleNamespace m
-
-main :: IO ()
-main = do
-  putStrLn "=== Generate per-package JSON manifests ==="
-  putStrLn ""
-
-  -- The full main-side universe mirrors update-json-main's input: every
-  -- module written to JSON should appear in exactly one package's manifest.
-  let mainUniverse = dedupByNamespace $ L.concat
-        [ mainModules
-        , evalLibModules
-        , dslSourceModules
-        , hydraCoqModules
-        , hydraJavaModules
-        , hydraJavaScriptModules
-        , hydraPythonModules
-        , hydraScalaModules
-        , hydraLispModules
-        , hydraPgModules
-        , hydraRdfModules
-        , hydraWasmModules
-        , hydraExtPackageModules
-        , hydraExtDecodingModules
-        , hydraExtEncodingModules
-        , [GenPGTransform.module_]
-        ]
-  -- DSL generator input: the kernel-side type universe. Matches update-json-main.
-  let dslInputMods = kernelModules ++ jsonModules ++ otherModules ++ haskellModules
-
-  writePerPackageManifestsJson defaultDistJsonRoot mainUniverse dslInputMods mainUniverse testModules
-  putStrLn ""
-  putStrLn "=== Done! ==="
diff --git a/src/exec/update-json-test/Main.hs b/src/exec/update-json-test/Main.hs
deleted file mode 100644
--- a/src/exec/update-json-test/Main.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-module Main where
-
-import Hydra.Generation (writeModulesJson)
-import Hydra.Sources.All (mainModules)
-import Hydra.Sources.Test.All (testModules)
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import Control.Exception (catch, SomeException)
-
-
-main :: IO ()
-main = do
-  outputDir <- parseOutputDir "../../dist/json/hydra-kernel/src/test/json"
-  putStrLn "=== Generate Hydra test modules JSON ==="
-  putStrLn ""
-  putStrLn $ "Generating " ++ show (length testModules) ++ " test modules to JSON..."
-  putStrLn ""
-
-  let universeModules = mainModules ++ testModules
-  result <- catch (writeModulesJson True outputDir universeModules testModules >> return True)
-                  (\e -> do
-                    putStrLn $ "Error: " ++ show (e :: SomeException)
-                    return False)
-
-  if result
-    then do
-      putStrLn ""
-      putStrLn "=== Done! ==="
-      putStrLn ""
-      putStrLn $ "Generated files are in: " ++ outputDir ++ "/"
-    else do
-      putStrLn ""
-      putStrLn "=== FAILED ==="
-      exitFailure
-
-parseOutputDir :: String -> IO String
-parseOutputDir defaultDir = do
-  args <- getArgs
-  return $ go args
-  where
-    go ("--output-dir" : dir : _) = dir
-    go (_ : rest) = go rest
-    go [] = defaultDir
diff --git a/src/exec/update-wasm/Main.hs b/src/exec/update-wasm/Main.hs
deleted file mode 100644
--- a/src/exec/update-wasm/Main.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Main where
-
-import Hydra.ExtGeneration
-
-main :: IO ()
-main = do
-  putStrLn "=== Generate WebAssembly text format (WAT) modules ==="
-  let mods = mainModules <> hydraExtModules
-  n <- writeWasm "../../dist/wasm/hydra-kernel/src/main/wat" mods mainModules
-  putStrLn $ "Generated " ++ show n ++ " files"
-  putStrLn "=== Done! ==="
diff --git a/src/exec/verify-json-kernel/Main.hs b/src/exec/verify-json-kernel/Main.hs
deleted file mode 100644
--- a/src/exec/verify-json-kernel/Main.hs
+++ /dev/null
@@ -1,264 +0,0 @@
--- | Verification tool that decodes all kernel modules from JSON and compares with originals.
--- This is a standalone executable that does not run with regular tests (too slow).
---
--- This tests that: JSON file → parse → Term → Module equals the original Module
-
-module Main where
-
-import Hydra.Kernel
-import Hydra.Packaging (_Module)
-import Hydra.Sources.All (kernelModules)
-import Hydra.Generation (modulesToGraph)
-import Hydra.Codegen (namespaceToPath)
-import qualified Hydra.Json.Model as Json
-import qualified Hydra.Json.Decode as JsonDecode
-import qualified Hydra.Decode.Packaging as DecodePackaging
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Strip as Strip
-
-import Control.Monad (forM, when)
-import System.Exit (exitFailure, exitSuccess)
-import System.Directory (doesFileExist, createDirectoryIfMissing)
-import System.FilePath ((</>), takeDirectory)
-import System.IO (hFlush, stdout)
-import qualified Hydra.Digest as Digest
-import qualified Data.Map as M
-import qualified Data.ByteString.Lazy as BS
-import qualified Data.Aeson as A
-import qualified Data.Aeson.KeyMap as AKM
-import qualified Data.Aeson.Key as AK
-import qualified Data.Text as T
-import qualified Data.Vector as V
-import qualified Data.Scientific as SC
-
-flushPut :: String -> IO ()
-flushPut s = putStrLn s >> hFlush stdout
-
--- | Convert Aeson JSON value to Hydra JSON value
-aesonToHydra :: A.Value -> Json.Value
-aesonToHydra v = case v of
-  A.Object km -> Json.ValueObject $ M.fromList (mapPair <$> AKM.toList km)
-    where
-      mapPair (k, v') = (AK.toString k, aesonToHydra v')
-  A.Array a -> Json.ValueArray (aesonToHydra <$> V.toList a)
-  A.String t -> Json.ValueString $ T.unpack t
-  A.Number s -> Json.ValueNumber s
-  A.Bool b -> Json.ValueBoolean b
-  A.Null -> Json.ValueNull
-
--- | Parse JSON from file using Aeson (fast)
-parseJsonFile :: FilePath -> IO (Either String Json.Value)
-parseJsonFile fp = do
-  content <- BS.readFile fp
-  return $ aesonToHydra <$> A.eitherDecode content
-
--- | Build a schema map (Name -> Type) from a graph's schema types.
--- This is used by the JSON decoder to resolve type variables.
--- Uses graphSchemaTypes (which contains TypeScheme values) and extracts the underlying Type.
-buildSchemaMap :: Graph -> M.Map Name Type
-buildSchemaMap g = M.map extractType (graphSchemaTypes g)
-  where
-    extractType (TypeScheme _ t _) = stripTypeAnnotationsTop t
-
-    -- Strip only top-level annotations
-    stripTypeAnnotationsTop (TypeAnnotated (AnnotatedType t _)) = stripTypeAnnotationsTop t
-    stripTypeAnnotationsTop t = t
-
--- | Path to the per-module verify cache. Content: a v1-style hash map
--- mapping namespace → SHA-256 of the module's JSON file at the time of
--- the last successful verification. On a later verify run, a module
--- whose JSON hash matches its recorded entry is known-good and is
--- skipped. Lives under .stack-work so it's gitignored and worktree-local.
-cachePath :: FilePath
-cachePath = "../../heads/haskell/.stack-work/verify-json-kernel-per-module-cache.json"
-
--- | Load the per-module verify cache. Returns empty map on any error
--- (missing file, malformed JSON, wrong schema). A cache miss just means
--- we re-verify — safe in all cases.
-loadCache :: IO (M.Map String String)
-loadCache = do
-  exists <- doesFileExist cachePath
-  if not exists
-    then return M.empty
-    else do
-      bytes <- BS.readFile cachePath
-      case A.eitherDecode bytes of
-        Left _ -> return M.empty
-        Right v -> case v of
-          A.Object km -> case AKM.lookup (AK.fromString "hashes") km of
-            Just (A.Object hm) -> return $ M.fromList
-              [ (AK.toString k, T.unpack t)
-              | (k, A.String t) <- AKM.toList hm ]
-            _ -> return M.empty
-          _ -> return M.empty
-
--- | Write the per-module verify cache. Output is deterministic (sorted
--- keys). Failures in writing are non-fatal: a missed cache is just a
--- re-verify next run.
-saveCache :: M.Map String String -> IO ()
-saveCache hashes = do
-  createDirectoryIfMissing True (takeDirectory cachePath)
-  let lns =
-        [ "{"
-        , "  \"hashes\": {"
-        ] ++ fmap entry (zip [0..] (M.toAscList hashes)) ++
-        [ "  }"
-        , "}"
-        ]
-      entry (i, (k, v)) =
-        "    \"" ++ k ++ "\": \"" ++ v ++ "\""
-        ++ (if i == M.size hashes - 1 then "" else ",")
-  writeFile cachePath (unlines lns)
-
-main :: IO ()
-main = do
-  flushPut "=== Verify JSON Kernel ==="
-  flushPut ""
-
-  let basePath = "../../dist/json/hydra-kernel/src/main/json"
-
-  -- Load the per-module cache up front. On a no-op sync, every module's
-  -- JSON hash matches its recorded entry and the verify loop short-
-  -- circuits each module in microseconds (just a hash + map lookup).
-  recorded <- loadCache
-  flushPut $ "Per-module cache: " ++ show (M.size recorded) ++ " recorded entries."
-
-  flushPut "Building graph from kernel modules..."
-  -- Build the graph from all kernel modules - this provides the type info
-  let graph = modulesToGraph kernelModules kernelModules
-
-  flushPut "Building schema map for JSON decoding..."
-  let schemaMap = buildSchemaMap graph
-  flushPut $ "  Schema map has " ++ show (M.size schemaMap) ++ " type definitions"
-
-  -- Use TypeVariable to reference the Module type - the decoder will resolve it
-  let modType = TypeVariable _Module
-  flushPut "Using TypeVariable for Module type (decoder will resolve it)."
-
-  flushPut "Counting modules..."
-  let numModules = length kernelModules
-  flushPut $ "Verifying " ++ show numModules ++ " kernel modules..."
-  putStrLn ""
-
-  -- For each module, read JSON file, decode to Term, then to Module, and compare.
-  -- Returns (ok, ns, newHashOrEmpty) — newHash is the current file's hash if
-  -- verification succeeded (so we can record it), empty string on failure or
-  -- file-not-found.
-  results <- forM kernelModules $ \origMod -> do
-    let ns = moduleNamespace origMod
-        nsStr = unNamespace ns
-        filePath = basePath </> namespaceToPath ns ++ ".json"
-
-    exists <- doesFileExist filePath
-    if not exists
-      then do
-        flushPut $ "  Processing: " ++ nsStr
-        flushPut $ "  ✗ " ++ nsStr ++ " (file not found)"
-        return (False, nsStr ++ ": file not found", "")
-      else do
-        currentHash <- Digest.hashFile filePath
-        case M.lookup nsStr recorded of
-          Just rec | rec == currentHash -> do
-            -- Silent cache hit — verification is deterministic, so a
-            -- matching hash means the verdict is still "pass".
-            return (True, nsStr, currentHash)
-          _ -> do
-            flushPut $ "  Processing: " ++ nsStr
-            parseResult <- parseJsonFile filePath
-            case parseResult of
-              Left err -> do
-                flushPut $ "  ✗ " ++ nsStr ++ " (JSON parse error)"
-                flushPut $ "    " ++ err
-                return (False, nsStr ++ ": JSON parse error", "")
-              Right jsonVal -> do
-                flushPut $ "    JSON parsed successfully"
-                case JsonDecode.fromJson schemaMap _Module modType jsonVal of
-                  Left err -> do
-                    flushPut $ "  ✗ " ++ nsStr ++ " (JSON decode error)"
-                    flushPut $ "    " ++ err
-                    return (False, nsStr ++ ": " ++ err, "")
-                  Right term -> do
-                    flushPut $ "    JSON decoded to Term"
-                    case DecodePackaging.module_ graph term of
-                      Left (DecodingError err) -> do
-                        flushPut $ "  ✗ " ++ nsStr ++ " (module decode error)"
-                        flushPut $ "    " ++ err
-                        return (False, nsStr ++ ": " ++ err, "")
-                      Right decodedMod ->
-                        let compareMod = if isTypeModule origMod then decodedMod else stripTypeAnnotations decodedMod
-                            compareOrig = if isTypeModule origMod then origMod else stripTypeAnnotations origMod
-                        in if compareMod == compareOrig
-                          then do
-                            flushPut $ "  ✓ " ++ nsStr
-                            return (True, nsStr, currentHash)
-                          else do
-                            flushPut $ "  ✗ " ++ nsStr ++ " (content mismatch)"
-                            let diff = findDifference compareOrig compareMod
-                            flushPut $ "    " ++ diff
-                            return (False, nsStr ++ ": " ++ diff, "")
-
-  let failures = [(ok, msg) | (ok, msg, _) <- results, not ok]
-      successes = [(ok, msg) | (ok, msg, _) <- results, ok]
-      newHashes = M.fromList [(ns, h) | (True, ns, h) <- results, not (null h)]
-      cacheHits = M.size (M.intersectionWith (\a b -> if a == b then () else ()) recorded newHashes)
-
-  when (cacheHits > 0) $
-    flushPut $ "\nPer-module cache: " ++ show cacheHits
-        ++ " hits / " ++ show (length kernelModules) ++ " modules (skipped decode+compare)."
-
-  putStrLn ""
-  if null failures
-    then do
-      putStrLn "=== SUCCESS ==="
-      putStrLn $ "All " ++ show (length successes) ++ " modules verified successfully!"
-      saveCache newHashes
-      exitSuccess
-    else do
-      putStrLn "=== FAILED ==="
-      putStrLn $ show (length failures) ++ " modules failed verification:"
-      mapM_ (putStrLn . ("  " ++) . snd) (take 20 failures)
-      when (length failures > 20) $
-        putStrLn $ "  ... and " ++ show (length failures - 20) ++ " more"
-      exitFailure
-
--- | Check whether a module contains only native type definitions (no term definitions).
-isTypeModule :: Module -> Bool
-isTypeModule m = all isNativeType (moduleBindings m)
-
--- | Strip type annotations from a module for comparison with raw (pre-inference) modules.
--- Removes TypeLambda, TypeApplication, binding TypeSchemes, and lambda domain types from terms,
--- but preserves user annotations.
-stripTypeAnnotations :: Module -> Module
-stripTypeAnnotations m = m {
-  moduleDefinitions = fmap stripDef (moduleDefinitions m) }
-  where
-    stripDef (DefinitionTerm td) = DefinitionTerm td {
-      termDefinitionTerm = Strip.removeTypesFromTerm (termDefinitionTerm td),
-      termDefinitionTypeScheme = Just $ TypeScheme [] (TypeVariable $ Name "hydra.core.Unit") Nothing }
-    stripDef d = d
-
--- | Find the first difference between two modules
-findDifference :: Module -> Module -> String
-findDifference orig decoded
-  | moduleNamespace orig /= moduleNamespace decoded =
-      "namespace differs: " ++ unNamespace (moduleNamespace orig) ++ " vs " ++ unNamespace (moduleNamespace decoded)
-  | length (moduleDefinitions orig) /= length (moduleDefinitions decoded) =
-      "element count differs: " ++ show (length (moduleDefinitions orig)) ++ " vs " ++ show (length (moduleDefinitions decoded))
-  | moduleTermDependencies orig /= moduleTermDependencies decoded =
-      "termDependencies differ"
-  | moduleTypeDependencies orig /= moduleTypeDependencies decoded =
-      "typeDependencies differ"
-  | moduleDescription orig /= moduleDescription decoded =
-      "description differs"
-  | otherwise =
-      "elements differ (checking first mismatch...)" ++ findElementDiff (moduleDefinitions orig) (moduleDefinitions decoded)
-
-findElementDiff :: [Definition] -> [Definition] -> String
-findElementDiff [] [] = ""
-findElementDiff (o:os) (d:ds)
-  | o == d = findElementDiff os ds
-  | otherwise = " - definition differs at " ++ show (defName o) ++ " vs " ++ show (defName d)
-  where
-    defName (DefinitionTerm td) = termDefinitionName td
-    defName (DefinitionType td) = typeDefinitionName td
-findElementDiff _ _ = " - different element counts"
diff --git a/src/main/haskell/Com/Gdblab/PathAlgebra/Expressions.hs b/src/main/haskell/Com/Gdblab/PathAlgebra/Expressions.hs
deleted file mode 100644
--- a/src/main/haskell/Com/Gdblab/PathAlgebra/Expressions.hs
+++ /dev/null
@@ -1,551 +0,0 @@
--- 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.Core as Core
-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
deleted file mode 100644
--- a/src/main/haskell/Com/Gdblab/PathAlgebra/Syntax.hs
+++ /dev/null
@@ -1,455 +0,0 @@
--- 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.hs b/src/main/haskell/Hydra.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra.hs
@@ -0,0 +1,34 @@
+-- | Hydra: graphs are programs, and programs are graphs.
+-- |
+-- | This is the convenience entry point of the @hydra@ umbrella package. It
+-- | re-exports the Hydra kernel (via "Hydra.Kernel") together with the Haskell
+-- | coder's top-level entry points, so that
+-- |
+-- | > import Hydra
+-- |
+-- | gives a newcomer the kernel API plus the ability to emit Haskell source
+-- | from Hydra modules, in one import.
+-- |
+-- | The surface here is deliberately small. Everything else in the kernel and
+-- | the Haskell coder remains available by direct, qualified import — e.g.
+-- | @import qualified Hydra.Haskell.Syntax as H@ for the Haskell AST types, or
+-- | @import Hydra.Ast@ for the modules "Hydra.Kernel" omits to avoid name
+-- | clashes. Depend on @hydra-kernel@ / @hydra-haskell@ directly for
+-- | finer-grained APIs.
+--
+-- Note: this is a hand-written umbrella module. Its canonical home is
+-- overlay/haskell/hydra/ (the top-level overlay/ tree); sync-haskell.sh overlays
+-- it onto dist/haskell/hydra/, from which the publishable sdist is assembled.
+
+module Hydra (
+  module Hydra.Kernel,
+  -- * Haskell code generation
+  -- | From "Hydra.Haskell.Coder". @moduleToHaskell@ renders a Hydra module to a
+  -- map of file path -> Haskell source; @moduleToHaskellModule@ returns the
+  -- structured Haskell AST instead.
+  moduleToHaskell,
+  moduleToHaskellModule,
+) where
+
+import Hydra.Kernel
+import Hydra.Haskell.Coder (moduleToHaskell, moduleToHaskellModule)
diff --git a/src/main/haskell/Hydra/Adapt.hs b/src/main/haskell/Hydra/Adapt.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Adapt.hs
+++ /dev/null
@@ -1,634 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Simple, one-way adapters for types and terms
-
-module Hydra.Adapt where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Hoisting as Hoisting
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as LibLiterals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Literals as Literals
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Reflect as Reflect
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variables as Variables
-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
--- | Adapt a graph and its schema to the given language constraints. The doExpand flag controls eta expansion of partial applications. Adaptation is type-preserving: binding-level TypeSchemes are adapted (not stripped). Note: case statement hoisting is done separately, prior to adaptation. The els0 parameter provides the original ordered bindings. Returns both the adapted graph and the ordered adapted bindings.
-adaptDataGraph :: Coders.LanguageConstraints -> Bool -> [Core.Binding] -> t0 -> Graph.Graph -> Either Errors.Error (Graph.Graph, [Core.Binding])
-adaptDataGraph constraints doExpand els0 cx graph0 =
-
-      let transformTerm =
-              \g -> \term ->
-                let tx = g
-                    t1 = Variables.unshadowVariables (pushTypeAppsInward term)
-                    t2 = Variables.unshadowVariables (Logic.ifElse doExpand (pushTypeAppsInward (Reduction.etaExpandTerm tx t1)) t1)
-                in (Dependencies.liftLambdaAboveLet t2)
-          transformBinding =
-                  \g -> \el -> Core.Binding {
-                    Core.bindingName = (Core.bindingName el),
-                    Core.bindingTerm = (transformTerm g (Core.bindingTerm el)),
-                    Core.bindingTypeScheme = (Core.bindingTypeScheme el)}
-          litmap = adaptLiteralTypesMap constraints
-          prims0 = Graph.graphPrimitives graph0
-          schemaTypes0 = Graph.graphSchemaTypes graph0
-          schemaBindings = Environment.typesToDefinitions (Maps.map (\ts -> Scoping.typeSchemeToFType ts) schemaTypes0)
-      in (Eithers.bind (Logic.ifElse (Maps.null schemaTypes0) (Right Maps.empty) (Eithers.bind (Eithers.bimap (\e -> Errors.ErrorDecoding e) (\x -> x) (Environment.graphAsTypes graph0 schemaBindings)) (\tmap0 -> Eithers.bind (adaptGraphSchema constraints litmap tmap0) (\tmap1 -> Right (Maps.map (\t -> Resolution.typeToTypeScheme t) tmap1))))) (\schemaResult ->
-        let adaptedSchemaTypes = schemaResult
-            adaptBinding =
-                    \el ->
-                      let transformed = transformBinding graph0 el
-                          wrapped =
-                                  Core.TermLet (Core.Let {
-                                    Core.letBindings = (Lists.pure transformed),
-                                    Core.letBody = Core.TermUnit})
-                      in (Eithers.bind (adaptTerm constraints litmap cx graph0 wrapped) (\adapted -> Rewriting.rewriteTermM (adaptLambdaDomains constraints litmap) adapted))
-        in (Eithers.bind (Eithers.mapList adaptBinding els0) (\adaptedTerms ->
-          let els1Raw = Lists.concat (Lists.map Environment.termAsBindings adaptedTerms)
-              processBinding =
-                      \el -> Eithers.bind (Rewriting.rewriteTermM (adaptNestedTypes constraints litmap) (Core.bindingTerm el)) (\newTerm -> Eithers.bind (Maybes.maybe (Right Nothing) (\ts -> Eithers.bind (adaptTypeScheme constraints litmap ts) (\ts1 -> Right (Just ts1))) (Core.bindingTypeScheme el)) (\adaptedType -> Right (Core.Binding {
-                        Core.bindingName = (Core.bindingName el),
-                        Core.bindingTerm = newTerm,
-                        Core.bindingTypeScheme = adaptedType})))
-          in (Eithers.bind (Eithers.mapList processBinding els1Raw) (\els1 -> Eithers.bind (Eithers.mapList (\kv -> Eithers.bind (adaptPrimitive constraints litmap (Pairs.second kv)) (\prim1 -> Right (Pairs.first kv, prim1))) (Maps.toList prims0)) (\primPairs ->
-            let prims1 = Maps.fromList primPairs
-                adaptedGraphRaw = Lexical.buildGraph els1 Maps.empty prims1
-                adaptedGraph =
-                        Graph.Graph {
-                          Graph.graphBoundTerms = (Graph.graphBoundTerms adaptedGraphRaw),
-                          Graph.graphBoundTypes = (Graph.graphBoundTypes adaptedGraphRaw),
-                          Graph.graphClassConstraints = (Graph.graphClassConstraints adaptedGraphRaw),
-                          Graph.graphLambdaVariables = (Graph.graphLambdaVariables adaptedGraphRaw),
-                          Graph.graphMetadata = (Graph.graphMetadata adaptedGraphRaw),
-                          Graph.graphPrimitives = (Graph.graphPrimitives adaptedGraphRaw),
-                          Graph.graphSchemaTypes = adaptedSchemaTypes,
-                          Graph.graphTypeVariables = (Graph.graphTypeVariables adaptedGraphRaw)}
-            in (Right (adaptedGraph, els1)))))))))
--- | Attempt to adapt a floating-point type using the given language constraints
-adaptFloatType :: Coders.LanguageConstraints -> Core.FloatType -> Maybe Core.FloatType
-adaptFloatType constraints ft =
-
-      let supported = Sets.member ft (Coders.languageConstraintsFloatTypes constraints)
-          alt = adaptFloatType constraints
-          forUnsupported =
-                  \ft2 -> case ft2 of
-                    Core.FloatTypeBigfloat -> alt Core.FloatTypeFloat64
-                    Core.FloatTypeFloat32 -> alt Core.FloatTypeFloat64
-                    Core.FloatTypeFloat64 -> alt Core.FloatTypeBigfloat
-      in (Logic.ifElse supported (Just ft) (forUnsupported ft))
--- | Adapt a schema graph to the given language constraints
-adaptGraphSchema :: Ord t0 => (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> M.Map t0 Core.Type -> Either Errors.Error (M.Map t0 Core.Type))
-adaptGraphSchema constraints litmap types0 =
-
-      let mapPair =
-              \pair ->
-                let name = Pairs.first pair
-                    typ = Pairs.second pair
-                in (Eithers.bind (adaptType constraints litmap typ) (\typ1 -> Right (name, typ1)))
-      in (Eithers.bind (Eithers.mapList mapPair (Maps.toList types0)) (\pairs -> Right (Maps.fromList pairs)))
--- | Attempt to adapt an integer type using the given language constraints
-adaptIntegerType :: Coders.LanguageConstraints -> Core.IntegerType -> Maybe Core.IntegerType
-adaptIntegerType constraints it =
-
-      let supported = Sets.member it (Coders.languageConstraintsIntegerTypes constraints)
-          alt = adaptIntegerType constraints
-          forUnsupported =
-                  \it2 -> case it2 of
-                    Core.IntegerTypeBigint -> Nothing
-                    Core.IntegerTypeInt8 -> alt Core.IntegerTypeUint16
-                    Core.IntegerTypeInt16 -> alt Core.IntegerTypeUint32
-                    Core.IntegerTypeInt32 -> alt Core.IntegerTypeUint64
-                    Core.IntegerTypeInt64 -> alt Core.IntegerTypeBigint
-                    Core.IntegerTypeUint8 -> alt Core.IntegerTypeInt16
-                    Core.IntegerTypeUint16 -> alt Core.IntegerTypeInt32
-                    Core.IntegerTypeUint32 -> alt Core.IntegerTypeInt64
-                    Core.IntegerTypeUint64 -> alt Core.IntegerTypeBigint
-      in (Logic.ifElse supported (Just it) (forUnsupported it))
--- | Rewrite callback for adapting lambda domain types in a term
-adaptLambdaDomains :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> (t0 -> Either Errors.Error Core.Term) -> t0 -> Either Errors.Error Core.Term
-adaptLambdaDomains constraints litmap recurse term =
-    Eithers.bind (recurse term) (\rewritten -> case rewritten of
-      Core.TermLambda v0 -> Eithers.bind (Maybes.maybe (Right Nothing) (\dom -> Eithers.bind (adaptType constraints litmap dom) (\dom1 -> Right (Just dom1))) (Core.lambdaDomain v0)) (\adaptedDomain -> Right (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.lambdaParameter v0),
-        Core.lambdaDomain = adaptedDomain,
-        Core.lambdaBody = (Core.lambdaBody v0)})))
-      _ -> Right rewritten)
--- | Convert a literal to a different type
-adaptLiteral :: Core.LiteralType -> Core.Literal -> Core.Literal
-adaptLiteral lt l =
-    case l of
-      Core.LiteralBinary v0 -> case lt of
-        Core.LiteralTypeString -> Core.LiteralString (LibLiterals.binaryToString v0)
-      Core.LiteralBoolean v0 -> case lt of
-        Core.LiteralTypeInteger v1 -> Core.LiteralInteger (Literals.bigintToIntegerValue v1 (Logic.ifElse v0 1 0))
-      Core.LiteralDecimal v0 -> case lt of
-        Core.LiteralTypeFloat _ -> Core.LiteralFloat (Core.FloatValueFloat64 (LibLiterals.decimalToFloat64 v0))
-        Core.LiteralTypeString -> Core.LiteralString (LibLiterals.showDecimal v0)
-      Core.LiteralFloat v0 -> case lt of
-        Core.LiteralTypeFloat v1 -> Core.LiteralFloat (Literals.bigfloatToFloatValue v1 (Literals.floatValueToBigfloat v0))
-      Core.LiteralInteger v0 -> case lt of
-        Core.LiteralTypeInteger v1 -> Core.LiteralInteger (Literals.bigintToIntegerValue v1 (Literals.integerValueToBigint v0))
--- | Attempt to adapt a literal type using the given language constraints
-adaptLiteralType :: Coders.LanguageConstraints -> Core.LiteralType -> Maybe Core.LiteralType
-adaptLiteralType constraints lt =
-
-      let forUnsupported =
-              \lt2 -> case lt2 of
-                Core.LiteralTypeBinary -> Just Core.LiteralTypeString
-                Core.LiteralTypeBoolean -> Maybes.map (\x -> Core.LiteralTypeInteger x) (adaptIntegerType constraints Core.IntegerTypeInt8)
-                Core.LiteralTypeDecimal -> Just (Core.LiteralTypeFloat Core.FloatTypeFloat64)
-                Core.LiteralTypeFloat v0 -> Maybes.map (\x -> Core.LiteralTypeFloat x) (adaptFloatType constraints v0)
-                Core.LiteralTypeInteger v0 -> Maybes.map (\x -> Core.LiteralTypeInteger x) (adaptIntegerType constraints v0)
-                _ -> Nothing
-      in (Logic.ifElse (literalTypeSupported constraints lt) Nothing (forUnsupported lt))
--- | Derive a map of adapted literal types for the given language constraints
-adaptLiteralTypesMap :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType
-adaptLiteralTypesMap constraints =
-
-      let tryType = \lt -> Maybes.maybe Nothing (\lt2 -> Just (lt, lt2)) (adaptLiteralType constraints lt)
-      in (Maps.fromList (Maybes.cat (Lists.map tryType Reflect.literalTypes)))
--- | Adapt a literal value using the given language constraints
-adaptLiteralValue :: Ord t0 => (M.Map t0 Core.LiteralType -> t0 -> Core.Literal -> Core.Literal)
-adaptLiteralValue litmap lt l =
-    Maybes.maybe (Core.LiteralString (ShowCore.literal l)) (\lt2 -> adaptLiteral lt2 l) (Maps.lookup lt litmap)
--- | Rewrite callback for adapting nested let binding TypeSchemes in a term
-adaptNestedTypes :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> (t0 -> Either Errors.Error Core.Term) -> t0 -> Either Errors.Error Core.Term
-adaptNestedTypes constraints litmap recurse term =
-    Eithers.bind (recurse term) (\rewritten -> case rewritten of
-      Core.TermLet v0 ->
-        let adaptB =
-                \b -> Eithers.bind (Maybes.maybe (Right Nothing) (\ts -> Eithers.bind (adaptTypeScheme constraints litmap ts) (\ts1 -> Right (Just ts1))) (Core.bindingTypeScheme b)) (\adaptedBType -> Right (Core.Binding {
-                  Core.bindingName = (Core.bindingName b),
-                  Core.bindingTerm = (Core.bindingTerm b),
-                  Core.bindingTypeScheme = adaptedBType}))
-        in (Eithers.bind (Eithers.mapList adaptB (Core.letBindings v0)) (\adaptedBindings -> Right (Core.TermLet (Core.Let {
-          Core.letBindings = adaptedBindings,
-          Core.letBody = (Core.letBody v0)}))))
-      _ -> Right rewritten)
--- | Adapt a primitive to the given language constraints, prior to inference
-adaptPrimitive :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Graph.Primitive -> Either Errors.Error Graph.Primitive
-adaptPrimitive constraints litmap prim0 =
-
-      let ts0 = Graph.primitiveTypeScheme prim0
-      in (Eithers.bind (adaptTypeScheme constraints litmap ts0) (\ts1 -> Right (Graph.Primitive {
-        Graph.primitiveName = (Graph.primitiveName prim0),
-        Graph.primitiveTypeScheme = ts1,
-        Graph.primitiveImplementation = (Graph.primitiveImplementation prim0)})))
--- | Adapt a term using the given language constraints
-adaptTerm :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-adaptTerm constraints litmap cx graph term0 =
-
-      let rewrite =
-              \recurse -> \term02 ->
-                let forSupported =
-                        \term -> case term of
-                          Core.TermLiteral v0 ->
-                            let lt = Reflect.literalType v0
-                            in (Right (Just (Logic.ifElse (literalTypeSupported constraints lt) term (Core.TermLiteral (adaptLiteralValue litmap lt v0)))))
-                          _ -> Right (Just term)
-                    forUnsupported =
-                            \term ->
-                              let tryAlts =
-                                      \alts -> Maybes.maybe (Right Nothing) (\uc -> Eithers.bind (tryTerm (Pairs.first uc)) (\mterm -> Maybes.maybe (tryAlts (Pairs.second uc)) (\t -> Right (Just t)) mterm)) (Lists.uncons alts)
-                              in (Eithers.bind (termAlternatives cx graph term) (\alts0 -> tryAlts alts0))
-                    tryTerm =
-                            \term ->
-                              let supportedVariant = Sets.member (Reflect.termVariant term) (Coders.languageConstraintsTermVariants constraints)
-                              in (Logic.ifElse supportedVariant (forSupported term) (forUnsupported term))
-                in (Eithers.bind (recurse term02) (\term1 -> case term1 of
-                  Core.TermTypeApplication v0 -> Eithers.bind (adaptType constraints litmap (Core.typeApplicationTermType v0)) (\atyp -> Right (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.typeApplicationTermBody v0),
-                    Core.typeApplicationTermType = atyp})))
-                  Core.TermTypeLambda _ -> Right term1
-                  _ -> Eithers.bind (tryTerm term1) (\mterm -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "no alternatives for term: " (ShowCore.term term1))))) (\term2 -> Right term2) mterm)))
-      in (Rewriting.rewriteTermM rewrite term0)
--- | Adapt a term using the constraints of a given language
-adaptTermForLanguage :: Coders.Language -> t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-adaptTermForLanguage lang cx g term =
-
-      let constraints = Coders.languageConstraints lang
-          litmap = adaptLiteralTypesMap constraints
-      in (adaptTerm constraints litmap cx g term)
--- | Adapt a type using the given language constraints
-adaptType :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.Type -> Either Errors.Error Core.Type
-adaptType constraints litmap type0 =
-
-      let forSupported =
-              \typ -> case typ of
-                Core.TypeLiteral v0 -> Logic.ifElse (literalTypeSupported constraints v0) (Just typ) (Maybes.maybe (Just (Core.TypeLiteral Core.LiteralTypeString)) (\lt2 -> Just (Core.TypeLiteral lt2)) (Maps.lookup v0 litmap))
-                _ -> Just typ
-          forUnsupported =
-                  \typ ->
-                    let tryAlts =
-                            \alts -> Maybes.bind (Lists.uncons alts) (\uc -> Maybes.maybe (tryAlts (Pairs.second uc)) (\t -> Just t) (tryType (Pairs.first uc)))
-                        alts0 = typeAlternatives typ
-                    in (tryAlts alts0)
-          tryType =
-                  \typ ->
-                    let supportedVariant = Sets.member (Reflect.typeVariant typ) (Coders.languageConstraintsTypeVariants constraints)
-                    in (Logic.ifElse supportedVariant (forSupported typ) (forUnsupported typ))
-          rewrite =
-                  \recurse -> \typ -> Eithers.bind (recurse typ) (\type1 -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "no alternatives for type: " (ShowCore.type_ typ))))) (\type2 -> Right type2) (tryType type1))
-      in (Rewriting.rewriteTypeM rewrite type0)
--- | Adapt a type using the constraints of a given language
-adaptTypeForLanguage :: Coders.Language -> Core.Type -> Either Errors.Error Core.Type
-adaptTypeForLanguage lang typ =
-
-      let constraints = Coders.languageConstraints lang
-          litmap = adaptLiteralTypesMap constraints
-      in (adaptType constraints litmap typ)
--- | Adapt a type scheme to the given language constraints, prior to inference
-adaptTypeScheme :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.TypeScheme -> Either Errors.Error Core.TypeScheme
-adaptTypeScheme constraints litmap ts0 =
-
-      let vars0 = Core.typeSchemeVariables ts0
-          t0 = Core.typeSchemeBody ts0
-      in (Eithers.bind (adaptType constraints litmap t0) (\t1 -> Right (Core.TypeScheme {
-        Core.typeSchemeVariables = vars0,
-        Core.typeSchemeBody = t1,
-        Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts0)})))
--- | Compose two coders into a single coder
-composeCoders :: Coders.Coder t0 t1 -> Coders.Coder t1 t2 -> Coders.Coder t0 t2
-composeCoders c1 c2 =
-    Coders.Coder {
-      Coders.coderEncode = (\cx -> \a -> Eithers.bind (Coders.coderEncode c1 cx a) (\b1 -> Coders.coderEncode c2 cx b1)),
-      Coders.coderDecode = (\cx -> \c -> Eithers.bind (Coders.coderDecode c2 cx c) (\b2 -> Coders.coderDecode c1 cx b2))}
--- | Given a data graph along with language constraints, original ordered bindings, and a designated list of namespaces, adapt the graph to the language constraints, then return the processed graph along with term definitions grouped by namespace (in the order of the input namespaces). Inference is performed before adaptation if bindings lack type annotations. Hoisting must preserve type schemes; if any binding loses its type scheme after hoisting, the pipeline fails. Adaptation preserves type application/lambda wrappers and adapts embedded types. Post-adaptation inference is performed to ensure binding TypeSchemes are fully consistent. The doExpand flag controls eta expansion. The doHoistCaseStatements flag controls case statement hoisting (needed for Python). The doHoistPolymorphicLetBindings flag controls polymorphic let binding hoisting (needed for Java). The originalBindings parameter provides the original ordered bindings (from module elements).
-dataGraphToDefinitions :: Coders.LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> [Core.Binding] -> Graph.Graph -> [Packaging.Namespace] -> Context.Context -> Either Errors.Error (Graph.Graph, [[Packaging.TermDefinition]])
-dataGraphToDefinitions constraints doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings originalBindings graph0 namespaces cx =
-
-      let namespacesSet = Sets.fromList namespaces
-          isParentBinding =
-                  \b -> Maybes.maybe False (\ns -> Sets.member ns namespacesSet) (Names.namespaceOf (Core.bindingName b))
-          hoistCases =
-                  \bindings ->
-                    let stripped =
-                            Lists.map (\b -> Core.Binding {
-                              Core.bindingName = (Core.bindingName b),
-                              Core.bindingTerm = (Strip.stripTypeLambdas (Core.bindingTerm b)),
-                              Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) bindings
-                        term0 =
-                                Core.TermLet (Core.Let {
-                                  Core.letBindings = stripped,
-                                  Core.letBody = Core.TermUnit})
-                        unshadowed0 = Environment.termAsBindings (Variables.unshadowVariables term0)
-                        hoisted = Hoisting.hoistCaseStatementsInGraph unshadowed0
-                        term1 =
-                                Core.TermLet (Core.Let {
-                                  Core.letBindings = hoisted,
-                                  Core.letBody = Core.TermUnit})
-                    in (Environment.termAsBindings (Variables.unshadowVariables term1))
-          hoistPoly =
-                  \bindings ->
-                    let letBefore =
-                            Core.Let {
-                              Core.letBindings = bindings,
-                              Core.letBody = Core.TermUnit}
-                        letAfter = Hoisting.hoistPolymorphicLetBindings isParentBinding letBefore
-                    in (Core.letBindings letAfter)
-          checkBindingsTyped =
-                  \debugLabel -> \bindings ->
-                    let untypedBindings =
-                            Lists.map (\b -> Core.unName (Core.bindingName b)) (Lists.filter (\b -> Logic.not (Maybes.isJust (Core.bindingTypeScheme b))) bindings)
-                    in (Logic.ifElse (Lists.null untypedBindings) (Right bindings) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "Found untyped bindings (",
-                      debugLabel,
-                      "): ",
-                      (Strings.intercalate ", " untypedBindings)])))))
-          normalizeBindings =
-                  \bindings -> Lists.map (\b -> Core.Binding {
-                    Core.bindingName = (Core.bindingName b),
-                    Core.bindingTerm = (pushTypeAppsInward (Core.bindingTerm b)),
-                    Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) bindings
-          rebuildGraph =
-                  \bindings ->
-                    let g = Lexical.buildGraph bindings Maps.empty (Graph.graphPrimitives graph0)
-                    in Graph.Graph {
-                      Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-                      Graph.graphBoundTypes = (Graph.graphBoundTypes g),
-                      Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-                      Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-                      Graph.graphMetadata = (Graph.graphMetadata g),
-                      Graph.graphPrimitives = (Graph.graphPrimitives g),
-                      Graph.graphSchemaTypes = (Graph.graphSchemaTypes graph0),
-                      Graph.graphTypeVariables = (Graph.graphTypeVariables g)}
-          bins0 = originalBindings
-          bins1 = Logic.ifElse doHoistCaseStatements (hoistCases bins0) bins0
-      in (Eithers.bind (Logic.ifElse doInfer (Eithers.map (\result -> Pairs.second (Pairs.first result)) (Inference.inferGraphTypes cx bins1 (rebuildGraph bins1))) (checkBindingsTyped "after case hoisting" bins1)) (\bins2 -> Eithers.bind (Logic.ifElse doHoistPolymorphicLetBindings (checkBindingsTyped "after let hoisting" (hoistPoly bins2)) (Right bins2)) (\bins3 -> Eithers.bind (adaptDataGraph constraints doExpand bins3 cx (rebuildGraph bins3)) (\adaptResult ->
-        let adapted = Pairs.first adaptResult
-            adaptedBindings = Pairs.second adaptResult
-        in (Eithers.bind (checkBindingsTyped "after adaptation" adaptedBindings) (\bins4 ->
-          let bins5 = normalizeBindings bins4
-              toDef =
-                      \el -> Maybes.map (\ts -> Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.bindingName el),
-                        Packaging.termDefinitionTerm = (Core.bindingTerm el),
-                        Packaging.termDefinitionTypeScheme = (Just ts)}) (Core.bindingTypeScheme el)
-              selectedElements =
-                      Lists.filter (\el -> Maybes.maybe False (\ns -> Sets.member ns namespacesSet) (Names.namespaceOf (Core.bindingName el))) bins5
-              elementsByNamespace =
-                      Lists.foldl (\acc -> \el -> Maybes.maybe acc (\ns ->
-                        let existing = Maybes.maybe [] Equality.identity (Maps.lookup ns acc)
-                        in (Maps.insert ns (Lists.concat2 existing [
-                          el]) acc)) (Names.namespaceOf (Core.bindingName el))) Maps.empty selectedElements
-              defsGrouped =
-                      Lists.map (\ns ->
-                        let elsForNs = Maybes.maybe [] Equality.identity (Maps.lookup ns elementsByNamespace)
-                        in (Maybes.cat (Lists.map toDef elsForNs))) namespaces
-              g = Lexical.buildGraph bins5 Maps.empty (Graph.graphPrimitives adapted)
-          in (Right (Graph.Graph {
-            Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-            Graph.graphBoundTypes = (Graph.graphBoundTypes g),
-            Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-            Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-            Graph.graphMetadata = (Graph.graphMetadata g),
-            Graph.graphPrimitives = (Graph.graphPrimitives g),
-            Graph.graphSchemaTypes = (Graph.graphSchemaTypes adapted),
-            Graph.graphTypeVariables = (Graph.graphTypeVariables g)}, defsGrouped))))))))
--- | Check if a literal type is supported by the given language constraints
-literalTypeSupported :: Coders.LanguageConstraints -> Core.LiteralType -> Bool
-literalTypeSupported constraints lt =
-
-      let forType =
-              \lt2 -> case lt2 of
-                Core.LiteralTypeFloat v0 -> Sets.member v0 (Coders.languageConstraintsFloatTypes constraints)
-                Core.LiteralTypeInteger v0 -> Sets.member v0 (Coders.languageConstraintsIntegerTypes constraints)
-                _ -> True
-      in (Logic.ifElse (Sets.member (Reflect.literalTypeVariant lt) (Coders.languageConstraintsLiteralVariants constraints)) (forType lt) False)
--- | Prepare a float type, substituting unsupported types
-prepareFloatType :: Core.FloatType -> (Core.FloatType, ((Core.FloatValue -> Core.FloatValue), (S.Set String)))
-prepareFloatType ft =
-    case ft of
-      Core.FloatTypeBigfloat -> (Core.FloatTypeFloat64, ((\v -> case v of
-        Core.FloatValueBigfloat v1 -> Core.FloatValueFloat64 (LibLiterals.bigfloatToFloat64 v1)
-        _ -> v), (Sets.fromList [
-        "replace arbitrary-precision floating-point numbers with 64-bit floating-point numbers (doubles)"])))
-      _ -> prepareSame ft
--- | Prepare an integer type, substituting unsupported types
-prepareIntegerType :: Core.IntegerType -> (Core.IntegerType, ((Core.IntegerValue -> Core.IntegerValue), (S.Set String)))
-prepareIntegerType it =
-    case it of
-      Core.IntegerTypeBigint -> (Core.IntegerTypeInt64, ((\v -> case v of
-        Core.IntegerValueBigint v1 -> Core.IntegerValueInt64 (LibLiterals.bigintToInt64 v1)
-        _ -> v), (Sets.fromList [
-        "replace arbitrary-precision integers with 64-bit integers"])))
-      Core.IntegerTypeUint8 -> (Core.IntegerTypeInt8, ((\v -> case v of
-        Core.IntegerValueUint8 v1 -> Core.IntegerValueInt8 (LibLiterals.bigintToInt8 (LibLiterals.uint8ToBigint v1))
-        _ -> v), (Sets.fromList [
-        "replace unsigned 8-bit integers with signed 8-bit integers"])))
-      Core.IntegerTypeUint32 -> (Core.IntegerTypeInt32, ((\v -> case v of
-        Core.IntegerValueUint32 v1 -> Core.IntegerValueInt32 (LibLiterals.bigintToInt32 (LibLiterals.uint32ToBigint v1))
-        _ -> v), (Sets.fromList [
-        "replace unsigned 32-bit integers with signed 32-bit integers"])))
-      Core.IntegerTypeUint64 -> (Core.IntegerTypeInt64, ((\v -> case v of
-        Core.IntegerValueUint64 v1 -> Core.IntegerValueInt64 (LibLiterals.bigintToInt64 (LibLiterals.uint64ToBigint v1))
-        _ -> v), (Sets.fromList [
-        "replace unsigned 64-bit integers with signed 64-bit integers"])))
-      _ -> prepareSame it
--- | Prepare a literal type, substituting unsupported types
-prepareLiteralType :: Core.LiteralType -> (Core.LiteralType, ((Core.Literal -> Core.Literal), (S.Set String)))
-prepareLiteralType at =
-    case at of
-      Core.LiteralTypeBinary -> (Core.LiteralTypeString, ((\v -> case v of
-        Core.LiteralBinary v1 -> Core.LiteralString (LibLiterals.binaryToString v1)
-        _ -> v), (Sets.fromList [
-        "replace binary strings with character strings"])))
-      Core.LiteralTypeDecimal -> (Core.LiteralTypeFloat Core.FloatTypeFloat64, ((\v -> case v of
-        Core.LiteralDecimal v1 -> Core.LiteralFloat (Core.FloatValueFloat64 (LibLiterals.decimalToFloat64 v1))
-        _ -> v), (Sets.fromList [
-        "replace arbitrary-precision decimal numbers with 64-bit floating-point numbers (doubles)"])))
-      Core.LiteralTypeFloat v0 ->
-        let result = prepareFloatType v0
-            rtyp = Pairs.first result
-            rep = Pairs.first (Pairs.second result)
-            msgs = Pairs.second (Pairs.second result)
-        in (Core.LiteralTypeFloat rtyp, ((\v -> case v of
-          Core.LiteralFloat v1 -> Core.LiteralFloat (rep v1)
-          _ -> v), msgs))
-      Core.LiteralTypeInteger v0 ->
-        let result = prepareIntegerType v0
-            rtyp = Pairs.first result
-            rep = Pairs.first (Pairs.second result)
-            msgs = Pairs.second (Pairs.second result)
-        in (Core.LiteralTypeInteger rtyp, ((\v -> case v of
-          Core.LiteralInteger v1 -> Core.LiteralInteger (rep v1)
-          _ -> v), msgs))
-      _ -> prepareSame at
--- | Return a value unchanged with identity transform and no messages
-prepareSame :: Ord t2 => (t0 -> (t0, ((t1 -> t1), (S.Set t2))))
-prepareSame x = (x, ((\y -> y), Sets.empty))
--- | Prepare a type, substituting unsupported literal types
-prepareType :: t0 -> Core.Type -> (Core.Type, ((Core.Term -> Core.Term), (S.Set String)))
-prepareType cx typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeLiteral v0 ->
-        let result = prepareLiteralType v0
-            rtyp = Pairs.first result
-            rep = Pairs.first (Pairs.second result)
-            msgs = Pairs.second (Pairs.second result)
-        in (Core.TypeLiteral rtyp, ((\v -> case v of
-          Core.TermLiteral v1 -> Core.TermLiteral (rep v1)
-          _ -> v), msgs))
-      _ -> prepareSame typ
--- | Normalize a term by pushing TermTypeApplication inward past TermApplication and TermLambda. This corrects structures produced by poly-let hoisting and eta expansion, where type applications from inference end up wrapping term applications or lambda abstractions instead of being directly on the polymorphic variable.
-pushTypeAppsInward :: Core.Term -> Core.Term
-pushTypeAppsInward term =
-
-      let push =
-              \body -> \typ -> case body of
-                Core.TermApplication v0 -> go (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.applicationFunction v0),
-                    Core.typeApplicationTermType = typ})),
-                  Core.applicationArgument = (Core.applicationArgument v0)}))
-                Core.TermLambda v0 -> go (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.lambdaParameter v0),
-                  Core.lambdaDomain = (Core.lambdaDomain v0),
-                  Core.lambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.lambdaBody v0),
-                    Core.typeApplicationTermType = typ}))}))
-                Core.TermLet v0 -> go (Core.TermLet (Core.Let {
-                  Core.letBindings = (Core.letBindings v0),
-                  Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.letBody v0),
-                    Core.typeApplicationTermType = typ}))}))
-                _ -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                  Core.typeApplicationTermBody = body,
-                  Core.typeApplicationTermType = typ})
-          go =
-                  \t ->
-                    let forField =
-                            \fld -> Core.Field {
-                              Core.fieldName = (Core.fieldName fld),
-                              Core.fieldTerm = (go (Core.fieldTerm fld))}
-                        forLet =
-                                \lt ->
-                                  let mapBinding =
-                                          \b -> Core.Binding {
-                                            Core.bindingName = (Core.bindingName b),
-                                            Core.bindingTerm = (go (Core.bindingTerm b)),
-                                            Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                                  in Core.Let {
-                                    Core.letBindings = (Lists.map mapBinding (Core.letBindings lt)),
-                                    Core.letBody = (go (Core.letBody lt))}
-                        forMap =
-                                \m ->
-                                  let forPair = \p -> (go (Pairs.first p), (go (Pairs.second p)))
-                                  in (Maps.fromList (Lists.map forPair (Maps.toList m)))
-                    in case t of
-                      Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-                        Core.annotatedTermBody = (go (Core.annotatedTermBody v0)),
-                        Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-                      Core.TermApplication v0 -> Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (go (Core.applicationFunction v0)),
-                        Core.applicationArgument = (go (Core.applicationArgument v0))})
-                      Core.TermCases v0 -> Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                        Core.caseStatementDefault = (Maybes.map go (Core.caseStatementDefault v0)),
-                        Core.caseStatementCases = (Lists.map forField (Core.caseStatementCases v0))})
-                      Core.TermEither v0 -> Core.TermEither (Eithers.either (\l -> Left (go l)) (\r -> Right (go r)) v0)
-                      Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.lambdaParameter v0),
-                        Core.lambdaDomain = (Core.lambdaDomain v0),
-                        Core.lambdaBody = (go (Core.lambdaBody v0))})
-                      Core.TermLet v0 -> Core.TermLet (forLet v0)
-                      Core.TermList v0 -> Core.TermList (Lists.map go v0)
-                      Core.TermLiteral v0 -> Core.TermLiteral v0
-                      Core.TermMap v0 -> Core.TermMap (forMap v0)
-                      Core.TermMaybe v0 -> Core.TermMaybe (Maybes.map go v0)
-                      Core.TermPair v0 -> Core.TermPair (go (Pairs.first v0), (go (Pairs.second v0)))
-                      Core.TermProject v0 -> Core.TermProject v0
-                      Core.TermRecord v0 -> Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.recordTypeName v0),
-                        Core.recordFields = (Lists.map forField (Core.recordFields v0))})
-                      Core.TermSet v0 -> Core.TermSet (Sets.fromList (Lists.map go (Sets.toList v0)))
-                      Core.TermTypeApplication v0 ->
-                        let body1 = go (Core.typeApplicationTermBody v0)
-                        in (push body1 (Core.typeApplicationTermType v0))
-                      Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                        Core.typeLambdaBody = (go (Core.typeLambdaBody v0))})
-                      Core.TermInject v0 -> Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.injectionTypeName v0),
-                        Core.injectionField = (forField (Core.injectionField v0))})
-                      Core.TermUnit -> Core.TermUnit
-                      Core.TermUnwrap v0 -> Core.TermUnwrap v0
-                      Core.TermVariable v0 -> Core.TermVariable v0
-                      Core.TermWrap v0 -> Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                        Core.wrappedTermBody = (go (Core.wrappedTermBody v0))})
-      in (go term)
--- | Given a schema graph along with language constraints and a designated list of element names, adapt the graph to the language constraints, then return a corresponding type definition for each element name.
-schemaGraphToDefinitions :: Coders.LanguageConstraints -> Graph.Graph -> [[Core.Name]] -> t0 -> Either Errors.Error (M.Map Core.Name Core.Type, [[Packaging.TypeDefinition]])
-schemaGraphToDefinitions constraints graph nameLists cx =
-
-      let litmap = adaptLiteralTypesMap constraints
-      in (Eithers.bind (Eithers.bimap (\e -> Errors.ErrorDecoding e) (\x -> x) (Environment.graphAsTypes graph (Lexical.graphToBindings graph))) (\tmap0 -> Eithers.bind (adaptGraphSchema constraints litmap tmap0) (\tmap1 ->
-        let toDef =
-                \pair -> Packaging.TypeDefinition {
-                  Packaging.typeDefinitionName = (Pairs.first pair),
-                  Packaging.typeDefinitionTypeScheme = Core.TypeScheme {
-                    Core.typeSchemeVariables = [],
-                    Core.typeSchemeBody = (Pairs.second pair),
-                    Core.typeSchemeConstraints = Nothing}}
-        in (Right (tmap1, (Lists.map (\names -> Lists.map toDef (Maybes.mapMaybe (\n -> Maybes.map (\t -> (n, t)) (Maps.lookup n tmap1)) names)) nameLists))))))
--- | Given a target language and a source type, produce an adapter which rewrites the type and its terms according to the language's constraints. The encode direction adapts terms; the decode direction is identity.
-simpleLanguageAdapter :: Coders.Language -> t0 -> Graph.Graph -> Core.Type -> Either Errors.Error (Coders.Adapter Core.Type Core.Type Core.Term Core.Term)
-simpleLanguageAdapter lang cx g typ =
-
-      let constraints = Coders.languageConstraints lang
-          litmap = adaptLiteralTypesMap constraints
-      in (Eithers.bind (adaptType constraints litmap typ) (\adaptedType -> Right (Coders.Adapter {
-        Coders.adapterIsLossy = False,
-        Coders.adapterSource = typ,
-        Coders.adapterTarget = adaptedType,
-        Coders.adapterCoder = Coders.Coder {
-          Coders.coderEncode = (\cx2 -> \term -> adaptTerm constraints litmap cx2 g term),
-          Coders.coderDecode = (\cx2 -> \term -> Right term)}})))
--- | Find a list of alternatives for a given term, if any
-termAlternatives :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error [Core.Term]
-termAlternatives cx graph term =
-    case term of
-      Core.TermAnnotated v0 ->
-        let term2 = Core.annotatedTermBody v0
-        in (Right [
-          term2])
-      Core.TermMaybe v0 -> Right [
-        Core.TermList (Maybes.maybe [] (\term2 -> [
-          term2]) v0)]
-      Core.TermTypeLambda v0 ->
-        let term2 = Core.typeLambdaBody v0
-        in (Right [
-          term2])
-      Core.TermTypeApplication v0 ->
-        let term2 = Core.typeApplicationTermBody v0
-        in (Right [
-          term2])
-      Core.TermInject v0 ->
-        let tname = Core.injectionTypeName v0
-            field = Core.injectionField v0
-            fname = Core.fieldName field
-            fterm = Core.fieldTerm field
-            forFieldType =
-                    \ft ->
-                      let ftname = Core.fieldTypeName ft
-                      in Core.Field {
-                        Core.fieldName = fname,
-                        Core.fieldTerm = (Core.TermMaybe (Logic.ifElse (Equality.equal ftname fname) (Just fterm) Nothing))}
-        in (Eithers.bind (Resolution.requireUnionType cx graph tname) (\rt -> Right [
-          Core.TermRecord (Core.Record {
-            Core.recordTypeName = tname,
-            Core.recordFields = (Lists.map forFieldType rt)})]))
-      Core.TermUnit -> Right [
-        Core.TermLiteral (Core.LiteralBoolean True)]
-      Core.TermWrap v0 ->
-        let term2 = Core.wrappedTermBody v0
-        in (Right [
-          term2])
-      _ -> Right []
--- | Find a list of alternatives for a given type, if any
-typeAlternatives :: Core.Type -> [Core.Type]
-typeAlternatives type_ =
-    case type_ of
-      Core.TypeAnnotated v0 ->
-        let type2 = Core.annotatedTypeBody v0
-        in [
-          type2]
-      Core.TypeMaybe v0 -> [
-        Core.TypeList v0]
-      Core.TypeUnion v0 ->
-        let toOptField =
-                \f -> Core.FieldType {
-                  Core.fieldTypeName = (Core.fieldTypeName f),
-                  Core.fieldTypeType = (Core.TypeMaybe (Core.fieldTypeType f))}
-            optFields = Lists.map toOptField v0
-        in [
-          Core.TypeRecord optFields]
-      Core.TypeUnit -> [
-        Core.TypeLiteral Core.LiteralTypeBoolean]
-      Core.TypeVoid -> [
-        Core.TypeUnit]
-      _ -> []
diff --git a/src/main/haskell/Hydra/Analysis.hs b/src/main/haskell/Hydra/Analysis.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Analysis.hs
+++ /dev/null
@@ -1,288 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Module dependency namespace analysis
-
-module Hydra.Analysis where
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Checking as Checking
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Add names to existing namespaces mapping
-addNamesToNamespaces :: (Packaging.Namespace -> t0) -> S.Set Core.Name -> Packaging.Namespaces t0 -> Packaging.Namespaces t0
-addNamesToNamespaces encodeNamespace names ns0 =
-
-      let nss = Sets.fromList (Maybes.cat (Lists.map Names.namespaceOf (Sets.toList names)))
-          toPair = \ns -> (ns, (encodeNamespace ns))
-      in Packaging.Namespaces {
-        Packaging.namespacesFocus = (Packaging.namespacesFocus ns0),
-        Packaging.namespacesMapping = (Maps.union (Packaging.namespacesMapping ns0) (Maps.fromList (Lists.map toPair (Sets.toList nss))))}
--- | Analyze a function term, collecting lambdas, type lambdas, lets, and type applications
-analyzeFunctionTerm :: Context.Context -> (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t0) -> t0 -> Core.Term -> Either t1 (Typing.FunctionStructure t0)
-analyzeFunctionTerm cx getTC setTC env term =
-    analyzeFunctionTermWith cx (\g -> \b -> Logic.ifElse (Predicates.isComplexBinding g b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing) getTC setTC env term
--- | Analyze a function term with configurable binding metadata
-analyzeFunctionTermWith :: Context.Context -> (Graph.Graph -> Core.Binding -> Maybe Core.Term) -> (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t0) -> t0 -> Core.Term -> Either t1 (Typing.FunctionStructure t0)
-analyzeFunctionTermWith cx forBinding getTC setTC env term =
-    analyzeFunctionTermWith_gather cx forBinding getTC setTC True env [] [] [] [] [] term
-analyzeFunctionTermWith_finish :: Context.Context -> (t0 -> Graph.Graph) -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Either t1 (Typing.FunctionStructure t0)
-analyzeFunctionTermWith_finish cx getTC fEnv tparams args bindings doms tapps body =
-
-      let bodyWithTapps =
-              Lists.foldl (\trm -> \typ -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                Core.typeApplicationTermBody = trm,
-                Core.typeApplicationTermType = typ})) body tapps
-          mcod = Eithers.either (\_ -> Nothing) (\c -> Just c) (Checking.typeOfTerm cx (getTC fEnv) bodyWithTapps)
-      in (Right (Typing.FunctionStructure {
-        Typing.functionStructureTypeParams = (Lists.reverse tparams),
-        Typing.functionStructureParams = (Lists.reverse args),
-        Typing.functionStructureBindings = bindings,
-        Typing.functionStructureBody = bodyWithTapps,
-        Typing.functionStructureDomains = (Lists.reverse doms),
-        Typing.functionStructureCodomain = mcod,
-        Typing.functionStructureEnvironment = fEnv}))
-analyzeFunctionTermWith_gather :: Context.Context -> (Graph.Graph -> Core.Binding -> Maybe Core.Term) -> (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t0) -> Bool -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Either t1 (Typing.FunctionStructure t0)
-analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode gEnv tparams args bindings doms tapps t =
-    case (Strip.deannotateTerm t) of
-      Core.TermLambda v0 -> Logic.ifElse argMode (
-        let v = Core.lambdaParameter v0
-            dom = Maybes.maybe (Core.TypeVariable (Core.Name "_")) (\x_ -> x_) (Core.lambdaDomain v0)
-            body = Core.lambdaBody v0
-            newEnv = setTC (Scoping.extendGraphForLambda (getTC gEnv) v0) gEnv
-        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode newEnv tparams (Lists.cons v args) bindings (Lists.cons dom doms) tapps body)) (analyzeFunctionTermWith_finish cx getTC gEnv tparams args bindings doms tapps t)
-      Core.TermLet v0 ->
-        let newBindings = Core.letBindings v0
-            body = Core.letBody v0
-            newEnv = setTC (Scoping.extendGraphForLet forBinding (getTC gEnv) v0) gEnv
-        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC False newEnv tparams args (Lists.concat2 bindings newBindings) doms tapps body)
-      Core.TermTypeApplication v0 ->
-        let taBody = Core.typeApplicationTermBody v0
-            typ = Core.typeApplicationTermType v0
-        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode gEnv tparams args bindings doms (Lists.cons typ tapps) taBody)
-      Core.TermTypeLambda v0 ->
-        let tvar = Core.typeLambdaParameter v0
-            tlBody = Core.typeLambdaBody v0
-            newEnv = setTC (Scoping.extendGraphForTypeLambda (getTC gEnv) v0) gEnv
-        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode newEnv (Lists.cons tvar tparams) args bindings doms tapps tlBody)
-      _ -> analyzeFunctionTermWith_finish cx getTC gEnv tparams args bindings doms tapps t
--- | Get dependency namespaces from definitions
-definitionDependencyNamespaces :: [Packaging.Definition] -> S.Set Packaging.Namespace
-definitionDependencyNamespaces defs =
-
-      let defNames =
-              \def -> case def of
-                Packaging.DefinitionType v0 -> Dependencies.typeDependencyNames True (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0))
-                Packaging.DefinitionTerm v0 -> Dependencies.termDependencyNames True True True (Packaging.termDefinitionTerm v0)
-          allNames = Sets.unions (Lists.map defNames defs)
-      in (Sets.fromList (Maybes.cat (Lists.map Names.namespaceOf (Sets.toList allNames))))
--- | Find dependency namespaces in all of a set of terms (Either version)
-dependencyNamespaces :: t0 -> Graph.Graph -> Bool -> Bool -> Bool -> Bool -> [Core.Binding] -> Either Errors.Error (S.Set Packaging.Namespace)
-dependencyNamespaces cx graph binds withPrims withNoms withSchema els =
-
-      let depNames =
-              \el ->
-                let term = Core.bindingTerm el
-                    deannotatedTerm = Strip.deannotateTerm term
-                    dataNames = Dependencies.termDependencyNames binds withPrims withNoms term
-                    schemaNames =
-                            Logic.ifElse withSchema (Maybes.maybe Sets.empty (\ts -> Dependencies.typeDependencyNames True (Core.typeSchemeBody ts)) (Core.bindingTypeScheme el)) Sets.empty
-                in (Logic.ifElse (Predicates.isEncodedType deannotatedTerm) (Eithers.map (\typ -> Sets.unions [
-                  dataNames,
-                  schemaNames,
-                  (Dependencies.typeDependencyNames True typ)]) (Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\_a -> _a) (DecodeCore.type_ graph term))) (Logic.ifElse (Predicates.isEncodedTerm deannotatedTerm) (Eithers.map (\decodedTerm -> Sets.unions [
-                  dataNames,
-                  schemaNames,
-                  (Dependencies.termDependencyNames binds withPrims withNoms decodedTerm)]) (Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\_a -> _a) (DecodeCore.term graph term))) (Right (Sets.unions [
-                  dataNames,
-                  schemaNames]))))
-      in (Eithers.map (\namesList -> Sets.fromList (Maybes.cat (Lists.map Names.namespaceOf (Sets.toList (Sets.unions namesList))))) (Eithers.mapList depNames els))
--- | Gather applications from a term, returning (args, baseTerm)
-gatherApplications :: Core.Term -> ([Core.Term], Core.Term)
-gatherApplications term =
-
-      let go =
-              \args -> \t -> case (Strip.deannotateTerm t) of
-                Core.TermApplication v0 ->
-                  let lhs = Core.applicationFunction v0
-                      rhs = Core.applicationArgument v0
-                  in (go (Lists.cons rhs args) lhs)
-                _ -> (args, t)
-      in (go [] term)
--- | Gather term arguments, stripping type-level constructs
-gatherArgs :: Core.Term -> [Core.Term] -> (Core.Term, [Core.Term])
-gatherArgs term args =
-    case (Strip.deannotateTerm term) of
-      Core.TermApplication v0 ->
-        let lhs = Core.applicationFunction v0
-            rhs = Core.applicationArgument v0
-        in (gatherArgs lhs (Lists.cons rhs args))
-      Core.TermTypeLambda v0 ->
-        let body = Core.typeLambdaBody v0
-        in (gatherArgs body args)
-      Core.TermTypeApplication v0 ->
-        let body = Core.typeApplicationTermBody v0
-        in (gatherArgs body args)
-      _ -> (term, args)
--- | Gather term and type arguments from a term
-gatherArgsWithTypeApps :: Core.Term -> [Core.Term] -> [Core.Type] -> (Core.Term, ([Core.Term], [Core.Type]))
-gatherArgsWithTypeApps term args tyArgs =
-    case (Strip.deannotateTerm term) of
-      Core.TermApplication v0 ->
-        let lhs = Core.applicationFunction v0
-            rhs = Core.applicationArgument v0
-        in (gatherArgsWithTypeApps lhs (Lists.cons rhs args) tyArgs)
-      Core.TermTypeLambda v0 ->
-        let body = Core.typeLambdaBody v0
-        in (gatherArgsWithTypeApps body args tyArgs)
-      Core.TermTypeApplication v0 ->
-        let body = Core.typeApplicationTermBody v0
-            typ = Core.typeApplicationTermType v0
-        in (gatherArgsWithTypeApps body args (Lists.cons typ tyArgs))
-      _ -> (term, (args, tyArgs))
--- | Check if a term body is self-tail-recursive with respect to a function name
-isSelfTailRecursive :: Core.Name -> Core.Term -> Bool
-isSelfTailRecursive funcName body =
-
-      let callsSelf = Logic.not (Variables.isFreeVariableInTerm funcName body)
-      in (Logic.ifElse callsSelf (isTailRecursiveInTailPosition funcName body) False)
--- | Check if a term can be encoded as a simple assignment
-isSimpleAssignment :: Core.Term -> Bool
-isSimpleAssignment term =
-    case term of
-      Core.TermAnnotated v0 -> isSimpleAssignment (Core.annotatedTermBody v0)
-      Core.TermLambda _ -> False
-      Core.TermLet _ -> False
-      Core.TermTypeLambda _ -> False
-      Core.TermTypeApplication v0 -> isSimpleAssignment (Core.typeApplicationTermBody v0)
-      _ ->
-        let baseTerm = Pairs.first (gatherArgs term [])
-        in case baseTerm of
-          Core.TermCases _ -> False
-          _ -> True
--- | Check that all self-references are in tail position
-isTailRecursiveInTailPosition :: Core.Name -> Core.Term -> Bool
-isTailRecursiveInTailPosition funcName term =
-
-      let stripped = Strip.deannotateAndDetypeTerm term
-      in case stripped of
-        Core.TermApplication _ ->
-          let gathered = gatherApplications stripped
-              gatherArgs = Pairs.first gathered
-              gatherFun = Pairs.second gathered
-              strippedFun = Strip.deannotateAndDetypeTerm gatherFun
-          in case strippedFun of
-            Core.TermVariable v1 -> Logic.ifElse (Equality.equal v1 funcName) (
-              let argsNoFunc = Lists.foldl (\ok -> \arg -> Logic.and ok (Variables.isFreeVariableInTerm funcName arg)) True gatherArgs
-                  argsNoLambda =
-                          Lists.foldl (\ok -> \arg -> Logic.and ok (Logic.not (Rewriting.foldOverTerm Coders.TraversalOrderPre (\found -> \t -> Logic.or found (case t of
-                            Core.TermLambda v2 ->
-                              let ignore = Core.lambdaBody v2
-                              in True
-                            _ -> False)) False arg))) True gatherArgs
-              in (Logic.and argsNoFunc argsNoLambda)) (Variables.isFreeVariableInTerm funcName term)
-            Core.TermCases v1 ->
-              let cases_ = Core.caseStatementCases v1
-                  dflt = Core.caseStatementDefault v1
-                  branchesOk =
-                          Lists.foldl (\ok -> \field -> Logic.and ok (isTailRecursiveInTailPosition funcName (Core.fieldTerm field))) True cases_
-                  dfltOk = Maybes.maybe True (\d -> isTailRecursiveInTailPosition funcName d) dflt
-                  argsOk = Lists.foldl (\ok -> \arg -> Logic.and ok (Variables.isFreeVariableInTerm funcName arg)) True gatherArgs
-              in (Logic.and (Logic.and branchesOk dfltOk) argsOk)
-            _ -> Variables.isFreeVariableInTerm funcName term
-        Core.TermLambda v0 -> isTailRecursiveInTailPosition funcName (Core.lambdaBody v0)
-        Core.TermLet v0 ->
-          let bindingsOk =
-                  Lists.foldl (\ok -> \b -> Logic.and ok (Variables.isFreeVariableInTerm funcName (Core.bindingTerm b))) True (Core.letBindings v0)
-          in (Logic.and bindingsOk (isTailRecursiveInTailPosition funcName (Core.letBody v0)))
-        _ -> Variables.isFreeVariableInTerm funcName term
--- | Check whether a module contains any binary literal values
-moduleContainsBinaryLiterals :: Packaging.Module -> Bool
-moduleContainsBinaryLiterals mod =
-
-      let checkTerm =
-              \found -> \term -> Logic.or found (case term of
-                Core.TermLiteral v0 -> case v0 of
-                  Core.LiteralBinary _ -> True
-                  _ -> False
-                _ -> False)
-          termContainsBinary = \term -> Rewriting.foldOverTerm Coders.TraversalOrderPre checkTerm False term
-          defTerms =
-                  Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Packaging.termDefinitionTerm v0)
-                    _ -> Nothing) (Packaging.moduleDefinitions mod))
-      in (Lists.foldl (\acc -> \t -> Logic.or acc (termContainsBinary t)) False defTerms)
--- | Check whether a module contains any decimal literal values
-moduleContainsDecimalLiterals :: Packaging.Module -> Bool
-moduleContainsDecimalLiterals mod =
-
-      let checkTerm =
-              \found -> \term -> Logic.or found (case term of
-                Core.TermLiteral v0 -> case v0 of
-                  Core.LiteralDecimal _ -> True
-                  _ -> False
-                _ -> False)
-          termContainsDecimal = \term -> Rewriting.foldOverTerm Coders.TraversalOrderPre checkTerm False term
-          defTerms =
-                  Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Packaging.termDefinitionTerm v0)
-                    _ -> Nothing) (Packaging.moduleDefinitions mod))
-      in (Lists.foldl (\acc -> \t -> Logic.or acc (termContainsDecimal t)) False defTerms)
--- | Find dependency namespaces in all elements of a module, excluding the module's own namespace (Either version)
-moduleDependencyNamespaces :: t0 -> Graph.Graph -> Bool -> Bool -> Bool -> Bool -> Packaging.Module -> Either Errors.Error (S.Set Packaging.Namespace)
-moduleDependencyNamespaces cx graph binds withPrims withNoms withSchema mod =
-
-      let allBindings =
-              Maybes.cat (Lists.map (\d -> case d of
-                Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-                  let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-                      dataTerm =
-                              Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                                Core.annotatedTermBody = (EncodeCore.type_ typ),
-                                Core.annotatedTermAnnotation = (Maps.fromList [
-                                  (Constants.key_type, schemaTerm)])}))
-                  in Core.Binding {
-                    Core.bindingName = name,
-                    Core.bindingTerm = dataTerm,
-                    Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                      Core.typeSchemeVariables = [],
-                      Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                      Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                  Core.bindingName = (Packaging.termDefinitionName v0),
-                  Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                  Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                _ -> Nothing) (Packaging.moduleDefinitions mod))
-      in (Eithers.map (\deps -> Sets.delete (Packaging.moduleNamespace mod) deps) (dependencyNamespaces cx graph binds withPrims withNoms withSchema allBindings))
--- | Create namespaces mapping for definitions
-namespacesForDefinitions :: (Packaging.Namespace -> t0) -> Packaging.Namespace -> [Packaging.Definition] -> Packaging.Namespaces t0
-namespacesForDefinitions encodeNamespace focusNs defs =
-
-      let nss = Sets.delete focusNs (definitionDependencyNamespaces defs)
-          toPair = \ns -> (ns, (encodeNamespace ns))
-      in Packaging.Namespaces {
-        Packaging.namespacesFocus = (toPair focusNs),
-        Packaging.namespacesMapping = (Maps.fromList (Lists.map toPair (Sets.toList nss)))}
diff --git a/src/main/haskell/Hydra/Annotations.hs b/src/main/haskell/Hydra/Annotations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Annotations.hs
+++ /dev/null
@@ -1,265 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for reading and writing type and term annotations
-
-module Hydra.Annotations where
-import qualified Hydra.Classes as Classes
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-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
--- | Aggregate annotations from nested structures
-aggregateAnnotations :: Ord t2 => ((t0 -> Maybe t1) -> (t1 -> t0) -> (t1 -> M.Map t2 t3) -> t0 -> M.Map t2 t3)
-aggregateAnnotations getValue getX getAnns t =
-
-      let toPairs =
-              \rest -> \t2 -> Maybes.maybe rest (\yy -> toPairs (Lists.cons (Maps.toList (getAnns yy)) rest) (getX yy)) (getValue t2)
-      in (Maps.fromList (Lists.concat (toPairs [] t)))
--- | Extract comments/description from a Binding
-commentsFromBinding :: t0 -> Graph.Graph -> Core.Binding -> Either Errors.Error (Maybe String)
-commentsFromBinding cx g b = getTermDescription cx g (Core.bindingTerm b)
--- | Extract comments/description from a FieldType
-commentsFromFieldType :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error (Maybe String)
-commentsFromFieldType cx g ft = getTypeDescription cx g (Core.fieldTypeType ft)
--- | Debug if the debug ID matches (Either version)
-debugIf :: Context.Context -> String -> String -> Either Errors.Error ()
-debugIf cx debugId message =
-    Eithers.bind (getDebugId cx) (\mid -> Logic.ifElse (Equality.equal mid (Just debugId)) (Left (Errors.ErrorOther (Errors.OtherError message))) (Right ()))
--- | Fail if the given flag is set (Either version)
-failOnFlag :: Context.Context -> Core.Name -> String -> Either Errors.Error ()
-failOnFlag cx flag msg =
-    Eithers.bind (hasFlag cx flag) (\val -> Logic.ifElse val (Left (Errors.ErrorOther (Errors.OtherError msg))) (Right ()))
--- | Get an attribute from a context (pure version)
-getAttr :: Core.Name -> Context.Context -> Maybe Core.Term
-getAttr key cx = Maps.lookup key (Context.contextOther cx)
--- | Get an attribute with a default value from context (pure version)
-getAttrWithDefault :: Core.Name -> Core.Term -> Context.Context -> Core.Term
-getAttrWithDefault key def cx = Maybes.fromMaybe def (getAttr key cx)
--- | Get a counter value from context (pure version)
-getCount :: Core.Name -> Context.Context -> Int
-getCount key cx =
-    Maybes.maybe 0 (\term -> case term of
-      Core.TermLiteral v0 -> case v0 of
-        Core.LiteralInteger v1 -> case v1 of
-          Core.IntegerValueInt32 v2 -> v2
-          _ -> 0
-        _ -> 0
-      _ -> 0) (Maps.lookup key (Context.contextOther cx))
--- | Get the debug ID from context (Either version)
-getDebugId :: Context.Context -> Either Errors.Error (Maybe String)
-getDebugId cx =
-    Maybes.maybe (Right Nothing) (\term -> Eithers.map Maybes.pure (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)) (getAttr Constants.key_debugId cx)
--- | Get description from annotations map (Either version)
-getDescription :: t0 -> Graph.Graph -> M.Map Core.Name Core.Term -> Either Errors.Error (Maybe String)
-getDescription cx graph anns =
-    Maybes.maybe (Right Nothing) (\term -> Eithers.map Maybes.pure (ExtractCore.string graph term)) (Maps.lookup (Core.Name "description") anns)
--- | Get a term annotation
-getTermAnnotation :: Core.Name -> Core.Term -> Maybe Core.Term
-getTermAnnotation key term = Maps.lookup key (termAnnotationInternal term)
--- | Get term description (Either version)
-getTermDescription :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error (Maybe String)
-getTermDescription cx graph term =
-
-      let peel =
-              \t -> case t of
-                Core.TermTypeLambda v0 -> peel (Core.typeLambdaBody v0)
-                Core.TermTypeApplication v0 -> peel (Core.typeApplicationTermBody v0)
-                _ -> t
-      in (getDescription cx graph (termAnnotationInternal (peel term)))
--- | Get type from annotations
-getType :: Graph.Graph -> M.Map Core.Name Core.Term -> Either Errors.DecodingError (Maybe Core.Type)
-getType graph anns =
-    Maybes.maybe (Right Nothing) (\dat -> Eithers.map Maybes.pure (DecodeCore.type_ graph dat)) (Maps.lookup Constants.key_type anns)
--- | Get a type annotation
-getTypeAnnotation :: Core.Name -> Core.Type -> Maybe Core.Term
-getTypeAnnotation key typ = Maps.lookup key (typeAnnotationInternal typ)
--- | Get type classes from term
-getTypeClasses :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error (M.Map Core.Name (S.Set Classes.TypeClass))
-getTypeClasses cx graph term =
-
-      let decodeClass =
-              \term2 ->
-                let byName =
-                        Maps.fromList [
-                          (Core.Name "equality", Classes.TypeClassEquality),
-                          (Core.Name "ordering", Classes.TypeClassOrdering)]
-                in (Eithers.bind (ExtractCore.unitVariant (Core.Name "hydra.classes.TypeClass") graph term2) (\fn -> Maybes.maybe (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-                  Errors.unexpectedShapeErrorExpected = "type class",
-                  Errors.unexpectedShapeErrorActual = (ShowCore.term term2)})))) (\x -> Right x) (Maps.lookup fn byName)))
-      in (Maybes.maybe (Right Maps.empty) (\term2 -> ExtractCore.map (\t -> Eithers.bimap (\de -> Errors.ErrorDecoding de) (\x -> x) (DecodeCore.name graph t)) (ExtractCore.setOf decodeClass graph) graph term2) (getTermAnnotation Constants.key_classes term))
--- | Get type description (Either version)
-getTypeDescription :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error (Maybe String)
-getTypeDescription cx graph typ = getDescription cx graph (typeAnnotationInternal typ)
--- | Check if annotations contain description
-hasDescription :: M.Map Core.Name t0 -> Bool
-hasDescription anns = Maybes.isJust (Maps.lookup Constants.key_description anns)
--- | Check if flag is set (Either version)
-hasFlag :: Context.Context -> Core.Name -> Either Errors.Error Bool
-hasFlag cx flag =
-
-      let term = getAttrWithDefault flag (Core.TermLiteral (Core.LiteralBoolean False)) cx
-      in (ExtractCore.boolean (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)
--- | Check if type has description
-hasTypeDescription :: Core.Type -> Bool
-hasTypeDescription typ = hasDescription (typeAnnotationInternal typ)
--- | For a typed term, decide whether a coder should encode it as a native type expression, or as a Hydra type expression.
-isNativeType :: Core.Binding -> Bool
-isNativeType el =
-
-      let isFlaggedAsFirstClassType =
-              Maybes.fromMaybe False (Maybes.map (\_ -> True) (getTermAnnotation Constants.key_firstClassType (Core.bindingTerm el)))
-      in (Maybes.maybe False (\ts -> Logic.and (Equality.equal ts (Core.TypeScheme {
-        Core.typeSchemeVariables = [],
-        Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-        Core.typeSchemeConstraints = Nothing})) (Logic.not isFlaggedAsFirstClassType)) (Core.bindingTypeScheme el))
--- | Return a zero-indexed counter for the given key and updated context (pure version)
-nextCount :: Core.Name -> Context.Context -> (Int, Context.Context)
-nextCount key cx =
-
-      let count = getCount key cx
-      in (count, (putCount key (Math.add count 1) cx))
--- | Normalize term annotations
-normalizeTermAnnotations :: Core.Term -> Core.Term
-normalizeTermAnnotations term =
-
-      let anns = termAnnotationInternal term
-          stripped = Strip.deannotateTerm term
-      in (Logic.ifElse (Maps.null anns) stripped (Core.TermAnnotated (Core.AnnotatedTerm {
-        Core.annotatedTermBody = stripped,
-        Core.annotatedTermAnnotation = anns})))
--- | Normalize type annotations
-normalizeTypeAnnotations :: Core.Type -> Core.Type
-normalizeTypeAnnotations typ =
-
-      let anns = typeAnnotationInternal typ
-          stripped = Strip.deannotateType typ
-      in (Logic.ifElse (Maps.null anns) stripped (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = stripped,
-        Core.annotatedTypeAnnotation = anns})))
--- | Set an attribute in a context
-putAttr :: Core.Name -> Core.Term -> Context.Context -> Context.Context
-putAttr key val cx =
-    Context.Context {
-      Context.contextTrace = (Context.contextTrace cx),
-      Context.contextMessages = (Context.contextMessages cx),
-      Context.contextOther = (Maps.insert key val (Context.contextOther cx))}
--- | Set counter value in context
-putCount :: Core.Name -> Int -> Context.Context -> Context.Context
-putCount key count cx = putAttr key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 count))) cx
--- | Reset counter to zero in context
-resetCount :: Core.Name -> Context.Context -> Context.Context
-resetCount key cx = putAttr key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))) cx
--- | Set annotation in map
-setAnnotation :: Ord t0 => (t0 -> Maybe t1 -> M.Map t0 t1 -> M.Map t0 t1)
-setAnnotation key val m = Maps.alter (\_ -> val) key m
--- | Set description in annotations
-setDescription :: Maybe String -> M.Map Core.Name Core.Term -> M.Map Core.Name Core.Term
-setDescription d =
-    setAnnotation Constants.key_description (Maybes.map (\arg_ -> (\x -> Core.TermLiteral x) ((\x -> Core.LiteralString x) arg_)) d)
--- | Set term annotation
-setTermAnnotation :: Core.Name -> Maybe Core.Term -> Core.Term -> Core.Term
-setTermAnnotation key val term =
-
-      let term_ = Strip.deannotateTerm term
-          anns = setAnnotation key val (termAnnotationInternal term)
-      in (Logic.ifElse (Maps.null anns) term_ (Core.TermAnnotated (Core.AnnotatedTerm {
-        Core.annotatedTermBody = term_,
-        Core.annotatedTermAnnotation = anns})))
--- | Set term description
-setTermDescription :: Maybe String -> Core.Term -> Core.Term
-setTermDescription d =
-    setTermAnnotation Constants.key_description (Maybes.map (\s -> Core.TermLiteral (Core.LiteralString s)) d)
--- | Set type in annotations
-setType :: Maybe Core.Type -> M.Map Core.Name Core.Term -> M.Map Core.Name Core.Term
-setType mt = setAnnotation Constants.key_type (Maybes.map EncodeCore.type_ mt)
--- | Set type annotation
-setTypeAnnotation :: Core.Name -> Maybe Core.Term -> Core.Type -> Core.Type
-setTypeAnnotation key val typ =
-
-      let typ_ = Strip.deannotateType typ
-          anns = setAnnotation key val (typeAnnotationInternal typ)
-      in (Logic.ifElse (Maps.null anns) typ_ (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = typ_,
-        Core.annotatedTypeAnnotation = anns})))
--- | Set type classes on term
-setTypeClasses :: M.Map Core.Name (S.Set Classes.TypeClass) -> Core.Term -> Core.Term
-setTypeClasses m term =
-
-      let encodeClass =
-              \tc -> case tc of
-                Classes.TypeClassEquality -> Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "equality"),
-                    Core.fieldTerm = Core.TermUnit}})
-                Classes.TypeClassOrdering -> Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "ordering"),
-                    Core.fieldTerm = Core.TermUnit}})
-          encodePair =
-                  \nameClasses ->
-                    let name = Pairs.first nameClasses
-                        classes = Pairs.second nameClasses
-                    in (EncodeCore.name name, (Core.TermSet (Sets.fromList (Lists.map encodeClass (Sets.toList classes)))))
-          encoded = Logic.ifElse (Maps.null m) Nothing (Just (Core.TermMap (Maps.fromList (Lists.map encodePair (Maps.toList m)))))
-      in (setTermAnnotation Constants.key_classes encoded term)
--- | Set type description
-setTypeDescription :: Maybe String -> Core.Type -> Core.Type
-setTypeDescription d =
-    setTypeAnnotation Constants.key_description (Maybes.map (\arg_ -> (\x -> Core.TermLiteral x) ((\x -> Core.LiteralString x) arg_)) d)
--- | Get internal term annotations
-termAnnotationInternal :: Core.Term -> M.Map Core.Name Core.Term
-termAnnotationInternal term =
-
-      let getAnn =
-              \t -> case t of
-                Core.TermAnnotated v0 -> Just v0
-                _ -> Nothing
-      in (aggregateAnnotations getAnn (\at -> Core.annotatedTermBody at) (\at -> Core.annotatedTermAnnotation at) term)
--- | Get internal type annotations
-typeAnnotationInternal :: Core.Type -> M.Map Core.Name Core.Term
-typeAnnotationInternal typ =
-
-      let getAnn =
-              \t -> case t of
-                Core.TypeAnnotated v0 -> Just v0
-                _ -> Nothing
-      in (aggregateAnnotations getAnn (\at -> Core.annotatedTypeBody at) (\at -> Core.annotatedTypeAnnotation at) typ)
--- | Execute different branches based on flag (Either version)
-whenFlag :: Context.Context -> Core.Name -> Either Errors.Error t0 -> Either Errors.Error t0 -> Either Errors.Error t0
-whenFlag cx flag ethen eelse = Eithers.bind (hasFlag cx flag) (\b -> Logic.ifElse b ethen eelse)
diff --git a/src/main/haskell/Hydra/Arity.hs b/src/main/haskell/Hydra/Arity.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Arity.hs
+++ /dev/null
@@ -1,45 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions dealing with arguments and arity.
-
-module Hydra.Arity where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Math as Math
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Find the arity (expected number of arguments) of a primitive constant or function
-primitiveArity :: Graph.Primitive -> Int
-primitiveArity arg_ = (\arg_2 -> typeArity (Core.typeSchemeBody arg_2)) (Graph.primitiveTypeScheme arg_)
--- | Find the arity (expected number of arguments) of a term
-termArity :: Core.Term -> Int
-termArity x =
-    case x of
-      Core.TermApplication v0 -> (\arg_2 -> (\xapp -> Math.sub xapp 1) (termArity arg_2)) (Core.applicationFunction v0)
-      Core.TermCases _ -> 1
-      Core.TermLambda v0 -> (\i -> Math.add 1 i) (termArity (Core.lambdaBody v0))
-      Core.TermProject _ -> 1
-      Core.TermUnwrap _ -> 1
-      _ -> 0
--- | Find the arity (expected number of arguments) of a type
-typeArity :: Core.Type -> Int
-typeArity x =
-    case x of
-      Core.TypeAnnotated v0 -> typeArity (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> typeArity (Core.applicationTypeFunction v0)
-      Core.TypeForall v0 -> typeArity (Core.forallTypeBody v0)
-      Core.TypeFunction v0 -> Math.add 1 (typeArity (Core.functionTypeCodomain v0))
-      _ -> 0
--- | Find the arity (expected number of arguments) of a type scheme
-typeSchemeArity :: Core.TypeScheme -> Int
-typeSchemeArity arg_ = typeArity (Core.typeSchemeBody arg_)
--- | Uncurry a type expression into a list of types, turning a function type a -> b into cons a (uncurryType b)
-uncurryType :: Core.Type -> [Core.Type]
-uncurryType t =
-    case t of
-      Core.TypeAnnotated v0 -> uncurryType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> uncurryType (Core.applicationTypeFunction v0)
-      Core.TypeForall v0 -> uncurryType (Core.forallTypeBody v0)
-      Core.TypeFunction v0 -> Lists.cons (Core.functionTypeDomain v0) (uncurryType (Core.functionTypeCodomain v0))
-      _ -> [
-        t]
diff --git a/src/main/haskell/Hydra/Ast.hs b/src/main/haskell/Hydra/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Ast.hs
+++ /dev/null
@@ -1,182 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A model which provides a common syntax tree for Hydra serializers
-
-module Hydra.Ast where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Operator associativity
-data Associativity =
-  AssociativityNone |
-  AssociativityLeft |
-  AssociativityRight |
-  AssociativityBoth
-  deriving (Eq, Ord, Read, Show)
-_Associativity = Core.Name "hydra.ast.Associativity"
-_Associativity_none = Core.Name "none"
-_Associativity_left = Core.Name "left"
-_Associativity_right = Core.Name "right"
-_Associativity_both = Core.Name "both"
--- | Formatting option for code blocks
-data BlockStyle =
-  BlockStyle {
-    -- | An optional indentation string
-    blockStyleIndent :: (Maybe String),
-    -- | Whether to place a newline before the content
-    blockStyleNewlineBeforeContent :: Bool,
-    -- | Whether to place a newline after the content
-    blockStyleNewlineAfterContent :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_BlockStyle = Core.Name "hydra.ast.BlockStyle"
-_BlockStyle_indent = Core.Name "indent"
-_BlockStyle_newlineBeforeContent = Core.Name "newlineBeforeContent"
-_BlockStyle_newlineAfterContent = Core.Name "newlineAfterContent"
--- | An expression enclosed by brackets
-data BracketExpr =
-  BracketExpr {
-    -- | The bracket pair enclosing the expression
-    bracketExprBrackets :: Brackets,
-    -- | The expression within the brackets
-    bracketExprEnclosed :: Expr,
-    -- | The formatting style for the bracketed block
-    bracketExprStyle :: BlockStyle}
-  deriving (Eq, Ord, Read, Show)
-_BracketExpr = Core.Name "hydra.ast.BracketExpr"
-_BracketExpr_brackets = Core.Name "brackets"
-_BracketExpr_enclosed = Core.Name "enclosed"
-_BracketExpr_style = Core.Name "style"
--- | Matching open and close bracket symbols
-data Brackets =
-  Brackets {
-    -- | The opening bracket symbol
-    bracketsOpen :: Symbol,
-    -- | The closing bracket symbol
-    bracketsClose :: Symbol}
-  deriving (Eq, Ord, Read, Show)
-_Brackets = Core.Name "hydra.ast.Brackets"
-_Brackets_open = Core.Name "open"
-_Brackets_close = Core.Name "close"
--- | An abstract expression
-data Expr =
-  -- | A constant symbol
-  ExprConst Symbol |
-  -- | An indented expression
-  ExprIndent IndentedExpression |
-  -- | An operator expression
-  ExprOp OpExpr |
-  -- | A bracketed expression
-  ExprBrackets BracketExpr |
-  -- | A sequence of expressions joined by a separator, treated as structural layout (not subject to parenthesization)
-  ExprSeq SeqExpr
-  deriving (Eq, Ord, Read, Show)
-_Expr = Core.Name "hydra.ast.Expr"
-_Expr_const = Core.Name "const"
-_Expr_indent = Core.Name "indent"
-_Expr_op = Core.Name "op"
-_Expr_brackets = Core.Name "brackets"
-_Expr_seq = Core.Name "seq"
--- | An expression indented in a certain style
-data IndentedExpression =
-  IndentedExpression {
-    -- | The indentation style
-    indentedExpressionStyle :: IndentStyle,
-    -- | The expression to be indented
-    indentedExpressionExpr :: Expr}
-  deriving (Eq, Ord, Read, Show)
-_IndentedExpression = Core.Name "hydra.ast.IndentedExpression"
-_IndentedExpression_style = Core.Name "style"
-_IndentedExpression_expr = Core.Name "expr"
--- | Any of several indentation styles
-data IndentStyle =
-  -- | Indent all lines with the given string
-  IndentStyleAllLines String |
-  -- | Indent only lines after the first with the given string
-  IndentStyleSubsequentLines String
-  deriving (Eq, Ord, Read, Show)
-_IndentStyle = Core.Name "hydra.ast.IndentStyle"
-_IndentStyle_allLines = Core.Name "allLines"
-_IndentStyle_subsequentLines = Core.Name "subsequentLines"
--- | An operator symbol
-data Op =
-  Op {
-    -- | The operator symbol
-    opSymbol :: Symbol,
-    -- | The padding around the operator
-    opPadding :: Padding,
-    -- | The precedence of the operator
-    opPrecedence :: Precedence,
-    -- | The associativity of the operator
-    opAssociativity :: Associativity}
-  deriving (Eq, Ord, Read, Show)
-_Op = Core.Name "hydra.ast.Op"
-_Op_symbol = Core.Name "symbol"
-_Op_padding = Core.Name "padding"
-_Op_precedence = Core.Name "precedence"
-_Op_associativity = Core.Name "associativity"
--- | An operator expression
-data OpExpr =
-  OpExpr {
-    -- | The operator
-    opExprOp :: Op,
-    -- | The left-hand side operand
-    opExprLhs :: Expr,
-    -- | The right-hand side operand
-    opExprRhs :: Expr}
-  deriving (Eq, Ord, Read, Show)
-_OpExpr = Core.Name "hydra.ast.OpExpr"
-_OpExpr_op = Core.Name "op"
-_OpExpr_lhs = Core.Name "lhs"
-_OpExpr_rhs = Core.Name "rhs"
--- | Left and right padding for an operator
-data Padding =
-  Padding {
-    -- | Padding to the left of the operator
-    paddingLeft :: Ws,
-    -- | Padding to the right of the operator
-    paddingRight :: Ws}
-  deriving (Eq, Ord, Read, Show)
-_Padding = Core.Name "hydra.ast.Padding"
-_Padding_left = Core.Name "left"
-_Padding_right = Core.Name "right"
--- | Operator precedence
-newtype Precedence =
-  Precedence {
-    unPrecedence :: Int}
-  deriving (Eq, Ord, Read, Show)
-_Precedence = Core.Name "hydra.ast.Precedence"
--- | A sequence of expressions joined by a separator operator. Unlike OpExpr, parenthesize ignores SeqExpr boundaries.
-data SeqExpr =
-  SeqExpr {
-    -- | The separator operator
-    seqExprOp :: Op,
-    -- | The expressions to join
-    seqExprElements :: [Expr]}
-  deriving (Eq, Ord, Read, Show)
-_SeqExpr = Core.Name "hydra.ast.SeqExpr"
-_SeqExpr_op = Core.Name "op"
-_SeqExpr_elements = Core.Name "elements"
--- | Any symbol
-newtype Symbol =
-  Symbol {
-    unSymbol :: String}
-  deriving (Eq, Ord, Read, Show)
-_Symbol = Core.Name "hydra.ast.Symbol"
--- | One of several classes of whitespace
-data Ws =
-  -- | No whitespace
-  WsNone |
-  -- | A single space
-  WsSpace |
-  -- | A line break
-  WsBreak |
-  -- | A line break followed by indentation
-  WsBreakAndIndent String |
-  -- | Two line breaks
-  WsDoubleBreak
-  deriving (Eq, Ord, Read, Show)
-_Ws = Core.Name "hydra.ast.Ws"
-_Ws_none = Core.Name "none"
-_Ws_space = Core.Name "space"
-_Ws_break = Core.Name "break"
-_Ws_breakAndIndent = Core.Name "breakAndIndent"
-_Ws_doubleBreak = Core.Name "doubleBreak"
diff --git a/src/main/haskell/Hydra/Atlas.hs b/src/main/haskell/Hydra/Atlas.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Atlas.hs
+++ /dev/null
@@ -1,240 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | The Apache Atlas meta-model
--- | Based on the the org.apache.atlas.model package in the master branch as of 2022-06-01
--- |   https://github.com/apache/atlas/tree/master/intg/src/main/java/org/apache/atlas/model
-
-module Hydra.Atlas where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Xml.Schema as Schema
-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
-import qualified Data.Set as S
-
--- | class that captures details of a struct-attribute.
-data AtlasAttributeDef =
-  AtlasAttributeDef {
-    atlasAttributeDefName :: (Maybe String),
-    atlasAttributeDefTypeName :: (Maybe String),
-    atlasAttributeDefIsOptional :: Bool,
-    atlasAttributeDefCardinality :: (Maybe AtlasAttributeDef_Cardinality),
-    atlasAttributeDefValuesMinCount :: Int,
-    atlasAttributeDefValuesMaxCount :: Int,
-    atlasAttributeDefIsUnique :: Bool,
-    atlasAttributeDefIsIndexable :: Bool,
-    atlasAttributeDefIncludeInNotification :: Bool,
-    atlasAttributeDefDefaultValue :: (Maybe String),
-    atlasAttributeDefDescription :: (Maybe String),
-    atlasAttributeDefSearchWeight :: Int,
-    atlasAttributeDefIndexType :: (Maybe AtlasAttributeDef_IndexType),
-    atlasAttributeDefConstraints :: [AtlasConstraintDef],
-    atlasAttributeDefOptions :: (M.Map String String),
-    atlasAttributeDefDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasAttributeDef = Core.Name "hydra.atlas.AtlasAttributeDef"
-
-_AtlasAttributeDef_name = Core.Name "name"
-
-_AtlasAttributeDef_typeName = Core.Name "typeName"
-
-_AtlasAttributeDef_isOptional = Core.Name "isOptional"
-
-_AtlasAttributeDef_cardinality = Core.Name "cardinality"
-
-_AtlasAttributeDef_valuesMinCount = Core.Name "valuesMinCount"
-
-_AtlasAttributeDef_valuesMaxCount = Core.Name "valuesMaxCount"
-
-_AtlasAttributeDef_isUnique = Core.Name "isUnique"
-
-_AtlasAttributeDef_isIndexable = Core.Name "isIndexable"
-
-_AtlasAttributeDef_includeInNotification = Core.Name "includeInNotification"
-
-_AtlasAttributeDef_defaultValue = Core.Name "defaultValue"
-
-_AtlasAttributeDef_description = Core.Name "description"
-
-_AtlasAttributeDef_searchWeight = Core.Name "searchWeight"
-
-_AtlasAttributeDef_indexType = Core.Name "indexType"
-
-_AtlasAttributeDef_constraints = Core.Name "constraints"
-
-_AtlasAttributeDef_options = Core.Name "options"
-
-_AtlasAttributeDef_displayName = Core.Name "displayName"
-
-data AtlasAttributeDef_Cardinality =
-  AtlasAttributeDef_CardinalitySingle  |
-  AtlasAttributeDef_CardinalityList  |
-  AtlasAttributeDef_CardinalitySet
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasAttributeDef_Cardinality = Core.Name "hydra.atlas.AtlasAttributeDef_Cardinality"
-
-_AtlasAttributeDef_Cardinality_single = Core.Name "single"
-
-_AtlasAttributeDef_Cardinality_list = Core.Name "list"
-
-_AtlasAttributeDef_Cardinality_set = Core.Name "set"
-
-data AtlasAttributeDef_IndexType =
-  AtlasAttributeDef_IndexTypeDefault  |
-  AtlasAttributeDef_IndexTypeString
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasAttributeDef_IndexType = Core.Name "hydra.atlas.AtlasAttributeDef_IndexType"
-
-_AtlasAttributeDef_IndexType_default = Core.Name "default"
-
-_AtlasAttributeDef_IndexType_string = Core.Name "string"
-
--- | Base class that captures common-attributes for all Atlas types.
-data AtlasBaseTypeDef =
-  AtlasBaseTypeDef {
-    atlasBaseTypeDefCategory :: (Maybe TypeCategory),
-    atlasBaseTypeDefGuid :: (Maybe String),
-    atlasBaseTypeDefCreatedBy :: (Maybe String),
-    atlasBaseTypeDefUpdatedBy :: (Maybe String),
-    atlasBaseTypeDefCreateTime :: (Maybe Schema.DateTime),
-    atlasBaseTypeDefUpdateTime :: (Maybe Schema.DateTime),
-    atlasBaseTypeDefVersion :: (Maybe I.Int64),
-    atlasBaseTypeDefName :: (Maybe String),
-    atlasBaseTypeDefDescription :: (Maybe String),
-    atlasBaseTypeDefTypeVersion :: (Maybe String),
-    atlasBaseTypeDefServiceType :: (Maybe String),
-    atlasBaseTypeDefOptions :: (M.Map String String)}
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasBaseTypeDef = Core.Name "hydra.atlas.AtlasBaseTypeDef"
-
-_AtlasBaseTypeDef_category = Core.Name "category"
-
-_AtlasBaseTypeDef_guid = Core.Name "guid"
-
-_AtlasBaseTypeDef_createdBy = Core.Name "createdBy"
-
-_AtlasBaseTypeDef_updatedBy = Core.Name "updatedBy"
-
-_AtlasBaseTypeDef_createTime = Core.Name "createTime"
-
-_AtlasBaseTypeDef_updateTime = Core.Name "updateTime"
-
-_AtlasBaseTypeDef_version = Core.Name "version"
-
-_AtlasBaseTypeDef_name = Core.Name "name"
-
-_AtlasBaseTypeDef_description = Core.Name "description"
-
-_AtlasBaseTypeDef_typeVersion = Core.Name "typeVersion"
-
-_AtlasBaseTypeDef_serviceType = Core.Name "serviceType"
-
-_AtlasBaseTypeDef_options = Core.Name "options"
-
--- | class that captures details of a constraint.
-data AtlasConstraintDef =
-  AtlasConstraintDef {
-    atlasConstraintDefType :: (Maybe String),
-    atlasConstraintDefParams :: (M.Map String String)}
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasConstraintDef = Core.Name "hydra.atlas.AtlasConstraintDef"
-
-_AtlasConstraintDef_type = Core.Name "type"
-
-_AtlasConstraintDef_params = Core.Name "params"
-
--- | class that captures details of a entity-type.
-data AtlasEntityDef =
-  AtlasEntityDef {
-    atlasEntityDefAsAtlasStruct :: AtlasStructDef,
-    atlasEntityDefSuperTypes :: (S.Set String),
-    -- | the value of this field is derived from 'superTypes' specified in all AtlasEntityDef
-    atlasEntityDefSubTypes :: (S.Set String),
-    -- | the value of this field is derived from all the relationshipDefs this entityType is referenced in
-    atlasEntityDefRelationshipAttributeDefs :: [AtlasRelationshipAttributeDef],
-    -- | the value of this field is derived from all the businessMetadataDefs this entityType is referenced in
-    atlasEntityDefBusinessAttributeDefs :: (M.Map String [AtlasAttributeDef])}
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasEntityDef = Core.Name "hydra.atlas.AtlasEntityDef"
-
-_AtlasEntityDef_asAtlasStruct = Core.Name "asAtlasStruct"
-
-_AtlasEntityDef_superTypes = Core.Name "superTypes"
-
-_AtlasEntityDef_subTypes = Core.Name "subTypes"
-
-_AtlasEntityDef_relationshipAttributeDefs = Core.Name "relationshipAttributeDefs"
-
-_AtlasEntityDef_businessAttributeDefs = Core.Name "businessAttributeDefs"
-
--- | class that captures details of a struct-attribute.
-data AtlasRelationshipAttributeDef =
-  AtlasRelationshipAttributeDef {
-    atlasRelationshipAttributeDefAsAtlasAttribute :: AtlasAttributeDef,
-    atlasRelationshipAttributeDefRelationshipTypeName :: (Maybe String),
-    atlasRelationshipAttributeDefIsLegacyAttribute :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasRelationshipAttributeDef = Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"
-
-_AtlasRelationshipAttributeDef_asAtlasAttribute = Core.Name "asAtlasAttribute"
-
-_AtlasRelationshipAttributeDef_relationshipTypeName = Core.Name "relationshipTypeName"
-
-_AtlasRelationshipAttributeDef_isLegacyAttribute = Core.Name "isLegacyAttribute"
-
--- | class that captures details of a struct-type.
-data AtlasStructDef =
-  AtlasStructDef {
-    atlasStructDefAsAtlasBaseType :: AtlasBaseTypeDef,
-    atlasStructDefAttributeDefs :: [AtlasAttributeDef]}
-  deriving (Eq, Ord, Read, Show)
-
-_AtlasStructDef = Core.Name "hydra.atlas.AtlasStructDef"
-
-_AtlasStructDef_asAtlasBaseType = Core.Name "asAtlasBaseType"
-
-_AtlasStructDef_attributeDefs = Core.Name "attributeDefs"
-
-data TypeCategory =
-  TypeCategoryPrimitive  |
-  TypeCategoryObjectIdType  |
-  TypeCategoryEnum  |
-  TypeCategoryStruct  |
-  TypeCategoryClassification  |
-  TypeCategoryEntity  |
-  TypeCategoryArray  |
-  TypeCategoryMap  |
-  TypeCategoryRelationship  |
-  TypeCategoryBusinessMetadata
-  deriving (Eq, Ord, Read, Show)
-
-_TypeCategory = Core.Name "hydra.atlas.TypeCategory"
-
-_TypeCategory_primitive = Core.Name "primitive"
-
-_TypeCategory_objectIdType = Core.Name "objectIdType"
-
-_TypeCategory_enum = Core.Name "enum"
-
-_TypeCategory_struct = Core.Name "struct"
-
-_TypeCategory_classification = Core.Name "classification"
-
-_TypeCategory_entity = Core.Name "entity"
-
-_TypeCategory_array = Core.Name "array"
-
-_TypeCategory_map = Core.Name "map"
-
-_TypeCategory_relationship = Core.Name "relationship"
-
-_TypeCategory_businessMetadata = Core.Name "businessMetadata"
diff --git a/src/main/haskell/Hydra/Avro/Coder.hs b/src/main/haskell/Hydra/Avro/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/Coder.hs
+++ /dev/null
@@ -1,616 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Avro-to-Hydra adapter for converting Avro schemas and data to Hydra types and terms
-
-module Hydra.Avro.Coder where
-
-import qualified Hydra.Avro.Environment as Environment
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
--- | Annotate an adapter's target type with optional annotations
-annotateAdapter :: Maybe (M.Map Core.Name Core.Term) -> Coders.Adapter t0 Core.Type t1 t2 -> Coders.Adapter t0 Core.Type t1 t2
-annotateAdapter ann ad =
-    Maybes.maybe ad (\n -> Coders.Adapter {
-      Coders.adapterIsLossy = (Coders.adapterIsLossy ad),
-      Coders.adapterSource = (Coders.adapterSource ad),
-      Coders.adapterTarget = (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Coders.adapterTarget ad),
-        Core.annotatedTypeAnnotation = n})),
-      Coders.adapterCoder = (Coders.adapterCoder ad)}) ann
-
--- | Create an adapter between Avro schemas and Hydra types/terms
-avroHydraAdapter :: t0 -> Schema.Schema -> Environment.AvroEnvironment -> Either Errors.Error (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term, Environment.AvroEnvironment)
-avroHydraAdapter cx schema env0 =
-
-      let simpleAdapter =
-              \env -> \typ -> \encode -> \decode -> Right (Coders.Adapter {
-                Coders.adapterIsLossy = False,
-                Coders.adapterSource = schema,
-                Coders.adapterTarget = typ,
-                Coders.adapterCoder = Coders.Coder {
-                  Coders.coderEncode = encode,
-                  Coders.coderDecode = decode}}, env)
-          doubleToInt = \d -> Literals.bigintToInt32 (Literals.decimalToBigint d)
-          doubleToLong = \d -> Literals.bigintToInt64 (Literals.decimalToBigint d)
-      in case schema of
-        Schema.SchemaArray v0 -> Eithers.bind (avroHydraAdapter cx (Schema.arrayItems v0) env0) (\adEnv ->
-          let ad = Pairs.first adEnv
-              env1 = Pairs.second adEnv
-          in (Right (Coders.Adapter {
-            Coders.adapterIsLossy = (Coders.adapterIsLossy ad),
-            Coders.adapterSource = schema,
-            Coders.adapterTarget = (Core.TypeList (Coders.adapterTarget ad)),
-            Coders.adapterCoder = Coders.Coder {
-              Coders.coderEncode = (\cx1 -> \v -> case v of
-                Model.ValueArray v1 -> Eithers.map (\ts -> Core.TermList ts) (Eithers.mapList (\jv -> Coders.coderEncode (Coders.adapterCoder ad) cx1 jv) v1)),
-              Coders.coderDecode = (\cx1 -> \t -> case t of
-                Core.TermList v1 -> Eithers.map (\jvs -> Model.ValueArray jvs) (Eithers.mapList (\tv -> Coders.coderDecode (Coders.adapterCoder ad) cx1 tv) v1))}}, env1)))
-        Schema.SchemaMap v0 -> Eithers.bind (avroHydraAdapter cx (Schema.mapValues v0) env0) (\adEnv ->
-          let ad = Pairs.first adEnv
-              env1 = Pairs.second adEnv
-              pairToHydra =
-                      \cx1 -> \entry ->
-                        let k = Pairs.first entry
-                            v = Pairs.second entry
-                        in (Eithers.map (\v_ -> (Core.TermLiteral (Core.LiteralString k), v_)) (Coders.coderEncode (Coders.adapterCoder ad) cx1 v))
-          in (Right (Coders.Adapter {
-            Coders.adapterIsLossy = (Coders.adapterIsLossy ad),
-            Coders.adapterSource = schema,
-            Coders.adapterTarget = (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Coders.adapterTarget ad)})),
-            Coders.adapterCoder = Coders.Coder {
-              Coders.coderEncode = (\cx1 -> \v -> case v of
-                Model.ValueObject v1 -> Eithers.map (\pairs -> Core.TermMap (Maps.fromList pairs)) (Eithers.mapList (\e -> pairToHydra cx1 e) (Maps.toList v1))),
-              Coders.coderDecode = (\cx1 -> \m -> Eithers.map (\mp_ -> Model.ValueObject mp_) (ExtractCore.map (\t -> 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}) t) (\t -> Coders.coderDecode (Coders.adapterCoder ad) cx1 t) (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}) m))}}, env1)))
-        Schema.SchemaNamed v0 ->
-          let ns = Schema.namedNamespace v0
-              manns = namedAnnotationsToCore v0
-              ann = Logic.ifElse (Maps.null manns) Nothing (Just manns)
-              lastNs = Environment.avroEnvironmentNamespace env0
-              nextNs = Maybes.maybe lastNs (\s -> Just s) ns
-              env1 =
-                      Environment.AvroEnvironment {
-                        Environment.avroEnvironmentNamedAdapters = (Environment.avroEnvironmentNamedAdapters env0),
-                        Environment.avroEnvironmentNamespace = nextNs,
-                        Environment.avroEnvironmentElements = (Environment.avroEnvironmentElements env0)}
-              qname =
-                      Environment.AvroQualifiedName {
-                        Environment.avroQualifiedNameNamespace = nextNs,
-                        Environment.avroQualifiedNameName = (Schema.namedName v0)}
-              hydraName = avroNameToHydraName qname
-          in (Maybes.maybe (Eithers.bind (case (Schema.namedType v0) of
-            Schema.NamedTypeEnum v1 ->
-              let syms = Schema.enumSymbols v1
-                  typ =
-                          Core.TypeUnion (Lists.map (\s -> Core.FieldType {
-                            Core.fieldTypeName = (Core.Name s),
-                            Core.fieldTypeType = Core.TypeUnit}) syms)
-              in (simpleAdapter env1 typ (\_cx -> \jv -> case jv of
-                Model.ValueString v2 -> Right (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = hydraName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name v2),
-                    Core.fieldTerm = Core.TermUnit}}))) (\_cx -> \t -> case t of
-                Core.TermInject v2 ->
-                  let fld = Core.injectionField v2
-                      fn = Core.fieldName fld
-                  in (Right (Model.ValueString (Core.unName fn)))))
-            Schema.NamedTypeFixed _ -> simpleAdapter env1 (Core.TypeLiteral Core.LiteralTypeBinary) (\_cx -> \jv -> case jv of
-              Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary v2)))) (\cx1 -> \t -> Eithers.map (\b -> Model.ValueString (Literals.binaryToString b)) (ExtractCore.binary (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}) t))
-            Schema.NamedTypeRecord v1 ->
-              let avroFields = Schema.recordFields v1
-              in (Eithers.bind (prepareFields cx env1 avroFields) (\prepResult ->
-                let adaptersByFieldName = Pairs.first prepResult
-                    env2 = Pairs.second prepResult
-                in (Eithers.bind (findAvroPrimaryKeyField cx qname avroFields) (\pk ->
-                  let encodePair =
-                          \cx1 -> \entry ->
-                            let k = Pairs.first entry
-                                v = Pairs.second entry
-                            in (Maybes.maybe (err cx1 (Strings.cat [
-                              "unrecognized field for ",
-                              (showQname qname),
-                              ": ",
-                              k])) (\fad -> Eithers.map (\v_ -> Core.Field {
-                              Core.fieldName = (Core.Name k),
-                              Core.fieldTerm = v_}) (Coders.coderEncode (Coders.adapterCoder (Pairs.second fad)) cx1 v)) (Maps.lookup k adaptersByFieldName))
-                      decodeField =
-                              \cx1 -> \fld ->
-                                let k = Core.unName (Core.fieldName fld)
-                                    v = Core.fieldTerm fld
-                                in (Maybes.maybe (err cx1 (Strings.cat [
-                                  "unrecognized field for ",
-                                  (showQname qname),
-                                  ": ",
-                                  k])) (\fad -> Eithers.map (\v_ -> (k, v_)) (Coders.coderDecode (Coders.adapterCoder (Pairs.second fad)) cx1 v)) (Maps.lookup k adaptersByFieldName))
-                      lossy =
-                              Lists.foldl (\b -> \fad -> Logic.or b (Coders.adapterIsLossy (Pairs.second fad))) False (Maps.elems adaptersByFieldName)
-                      hfields =
-                              Lists.map (\fad -> Core.FieldType {
-                                Core.fieldTypeName = (Core.Name (Schema.fieldName (Pairs.first fad))),
-                                Core.fieldTypeType = (Coders.adapterTarget (Pairs.second fad))}) (Maps.elems adaptersByFieldName)
-                      target = Core.TypeRecord hfields
-                  in (Right (Coders.Adapter {
-                    Coders.adapterIsLossy = lossy,
-                    Coders.adapterSource = schema,
-                    Coders.adapterTarget = target,
-                    Coders.adapterCoder = Coders.Coder {
-                      Coders.coderEncode = (\cx1 -> \jv -> case jv of
-                        Model.ValueObject v2 -> Eithers.map (\fields -> Core.TermRecord (Core.Record {
-                          Core.recordTypeName = hydraName,
-                          Core.recordFields = fields})) (Eithers.mapList (\e -> encodePair cx1 e) (Maps.toList v2))),
-                      Coders.coderDecode = (\cx1 -> \t -> case t of
-                        Core.TermRecord v2 -> Eithers.map (\kvs -> Model.ValueObject (Maps.fromList kvs)) (Eithers.mapList (\fld -> decodeField cx1 fld) (Core.recordFields v2)))}}, env2))))))) (\adEnv2 ->
-            let ad = Pairs.first adEnv2
-                env2 = Pairs.second adEnv2
-                env3 = putAvroHydraAdapter qname ad env2
-                env4 =
-                        Environment.AvroEnvironment {
-                          Environment.avroEnvironmentNamedAdapters = (Environment.avroEnvironmentNamedAdapters env3),
-                          Environment.avroEnvironmentNamespace = lastNs,
-                          Environment.avroEnvironmentElements = (Environment.avroEnvironmentElements env3)}
-            in (Right (annotateAdapter ann ad, env4)))) (\_ad -> err cx (Strings.cat2 "Avro named type defined more than once: " (showQname qname))) (getAvroHydraAdapter qname env1))
-        Schema.SchemaPrimitive v0 -> case v0 of
-          Schema.PrimitiveNull -> simpleAdapter env0 Core.TypeUnit (\_cx -> \jv -> case jv of
-            Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralString v2))) (\cx1 -> \t -> Eithers.map (\s -> Model.ValueString s) (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}) t))
-          Schema.PrimitiveBoolean -> simpleAdapter env0 (Core.TypeLiteral Core.LiteralTypeBoolean) (\_cx -> \jv -> case jv of
-            Model.ValueBoolean v2 -> Right (Core.TermLiteral (Core.LiteralBoolean v2))) (\cx1 -> \t -> Eithers.map (\b -> Model.ValueBoolean b) (ExtractCore.boolean (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}) t))
-          Schema.PrimitiveInt -> simpleAdapter env0 (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (\_cx -> \jv -> case jv of
-            Model.ValueNumber v2 -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (doubleToInt v2))))) (\cx1 -> \t -> Eithers.map (\i -> Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint i))) (ExtractCore.int32 (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}) t))
-          Schema.PrimitiveLong -> simpleAdapter env0 (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)) (\_cx -> \jv -> case jv of
-            Model.ValueNumber v2 -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (doubleToLong v2))))) (\cx1 -> \t -> Eithers.map (\i -> Model.ValueNumber (Literals.bigintToDecimal (Literals.int64ToBigint i))) (ExtractCore.int64 (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}) t))
-          Schema.PrimitiveFloat -> simpleAdapter env0 (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) (\_cx -> \jv -> case jv of
-            Model.ValueNumber v2 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (Literals.decimalToFloat32 v2))))) (\cx1 -> \t -> Eithers.map (\f -> Model.ValueNumber (Literals.float32ToDecimal f)) (ExtractCore.float32 (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}) t))
-          Schema.PrimitiveDouble -> simpleAdapter env0 (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) (\_cx -> \jv -> case jv of
-            Model.ValueNumber v2 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (Literals.decimalToFloat64 v2))))) (\cx1 -> \t -> Eithers.map (\d -> Model.ValueNumber (Literals.float64ToDecimal d)) (ExtractCore.float64 (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}) t))
-          Schema.PrimitiveBytes -> simpleAdapter env0 (Core.TypeLiteral Core.LiteralTypeBinary) (\_cx -> \jv -> case jv of
-            Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary v2)))) (\cx1 -> \t -> Eithers.map (\b -> Model.ValueString (Literals.binaryToString b)) (ExtractCore.binary (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}) t))
-          Schema.PrimitiveString -> simpleAdapter env0 (Core.TypeLiteral Core.LiteralTypeString) (\_cx -> \jv -> case jv of
-            Model.ValueString v2 -> Right (Core.TermLiteral (Core.LiteralString v2))) (\cx1 -> \t -> Eithers.map (\s -> Model.ValueString s) (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}) t))
-        Schema.SchemaReference v0 ->
-          let qname = parseAvroName (Environment.avroEnvironmentNamespace env0) v0
-          in (Maybes.maybe (err cx (Strings.cat2 "Referenced Avro type has not been defined: " (showQname qname))) (\ad -> Right (ad, env0)) (getAvroHydraAdapter qname env0))
-        Schema.SchemaUnion v0 ->
-          let schemas = Schema.unUnion v0
-              isNull =
-                      \s -> case s of
-                        Schema.SchemaPrimitive v1 -> case v1 of
-                          Schema.PrimitiveNull -> True
-                          _ -> False
-                        _ -> False
-              hasNull = Logic.not (Lists.null (Lists.filter isNull schemas))
-              nonNulls = Lists.filter (\s -> Logic.not (isNull s)) schemas
-              forOptional =
-                      \s -> Eithers.bind (avroHydraAdapter cx s env0) (\adEnv ->
-                        let ad = Pairs.first adEnv
-                            env1 = Pairs.second adEnv
-                        in (Right (Coders.Adapter {
-                          Coders.adapterIsLossy = (Coders.adapterIsLossy ad),
-                          Coders.adapterSource = schema,
-                          Coders.adapterTarget = (Core.TypeMaybe (Coders.adapterTarget ad)),
-                          Coders.adapterCoder = Coders.Coder {
-                            Coders.coderEncode = (\cx1 -> \v -> case v of
-                              Model.ValueNull -> Right (Core.TermMaybe Nothing)
-                              _ -> Eithers.map (\t -> Core.TermMaybe (Just t)) (Coders.coderEncode (Coders.adapterCoder ad) cx1 v)),
-                            Coders.coderDecode = (\cx1 -> \t -> case t of
-                              Core.TermMaybe v1 -> Maybes.maybe (Right Model.ValueNull) (\term_ -> Coders.coderDecode (Coders.adapterCoder ad) cx1 term_) v1)}}, env1)))
-          in (Logic.ifElse (Equality.gt (Lists.length nonNulls) 1) (err cx "general-purpose unions are not yet supported") (Maybes.maybe (err cx "cannot generate the empty type") (\nonNullHead -> Logic.ifElse hasNull (forOptional nonNullHead) (Eithers.bind (avroHydraAdapter cx nonNullHead env0) (\adEnv ->
-            let ad = Pairs.first adEnv
-                env1 = Pairs.second adEnv
-            in (Right (Coders.Adapter {
-              Coders.adapterIsLossy = (Coders.adapterIsLossy ad),
-              Coders.adapterSource = schema,
-              Coders.adapterTarget = (Coders.adapterTarget ad),
-              Coders.adapterCoder = (Coders.adapterCoder ad)}, env1))))) (Lists.maybeHead nonNulls)))
-
--- | Convert an Avro qualified name to a Hydra name
-avroNameToHydraName :: Environment.AvroQualifiedName -> Core.Name
-avroNameToHydraName qname =
-
-      let mns = Environment.avroQualifiedNameNamespace qname
-          local = Environment.avroQualifiedNameName qname
-      in (Names.unqualifyName (Packaging.QualifiedName {
-        Packaging.qualifiedNameNamespace = (Maybes.map (\s -> Packaging.Namespace s) mns),
-        Packaging.qualifiedNameLocal = local}))
-
-avro_foreignKey :: String
-avro_foreignKey = "@foreignKey"
-
-avro_primaryKey :: String
-avro_primaryKey = "@primaryKey"
-
--- | An empty Avro environment with no named adapters, no namespace, and no elements
-emptyAvroEnvironment :: Environment.AvroEnvironment
-emptyAvroEnvironment =
-    Environment.AvroEnvironment {
-      Environment.avroEnvironmentNamedAdapters = Maps.empty,
-      Environment.avroEnvironmentNamespace = Nothing,
-      Environment.avroEnvironmentElements = Maps.empty}
-
--- | Encode a JSON value as a Hydra term for annotation purposes
-encodeAnnotationValue :: Model.Value -> Core.Term
-encodeAnnotationValue v =
-    case v of
-      Model.ValueArray v0 -> Core.TermList (Lists.map encodeAnnotationValue v0)
-      Model.ValueBoolean v0 -> Core.TermLiteral (Core.LiteralBoolean v0)
-      Model.ValueNull -> Core.TermUnit
-      Model.ValueNumber v0 -> Core.TermLiteral (Core.LiteralDecimal v0)
-      Model.ValueObject v0 -> Core.TermMap (Maps.fromList (Lists.map (\entry ->
-        let k = Pairs.first entry
-            v_ = Pairs.second entry
-        in (Core.TermLiteral (Core.LiteralString k), (encodeAnnotationValue v_))) (Maps.toList v0)))
-      Model.ValueString v0 -> Core.TermLiteral (Core.LiteralString v0)
-
--- | Construct an error result with a message in context
-err :: t0 -> String -> Either Errors.Error t1
-err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))
-
--- | Extract a JSON array or return an error
-expectArrayE :: t0 -> Model.Value -> Either t1 [Model.Value]
-expectArrayE cx value =
-    case value of
-      Model.ValueArray v0 -> Right v0
-
--- | Extract a JSON object or return an error
-expectObjectE :: t0 -> Model.Value -> Either t1 (M.Map String Model.Value)
-expectObjectE cx value =
-    case value of
-      Model.ValueObject v0 -> Right v0
-
--- | Extract a JSON string or return an error
-expectStringE :: t0 -> Model.Value -> Either t1 String
-expectStringE cx value =
-    case value of
-      Model.ValueString v0 -> Right v0
-
--- | Extract field annotations and convert them to core Name/Term pairs
-fieldAnnotationsToCore :: Schema.Field -> M.Map Core.Name Core.Term
-fieldAnnotationsToCore f =
-    Maps.fromList (Lists.map (\entry ->
-      let k = Pairs.first entry
-          v = Pairs.second entry
-      in (Core.Name k, (encodeAnnotationValue v))) (Maps.toList (Schema.fieldAnnotations f)))
-
--- | Find the primary key field among a list of Avro fields
-findAvroPrimaryKeyField :: t0 -> Environment.AvroQualifiedName -> [Schema.Field] -> Either Errors.Error (Maybe Environment.AvroPrimaryKey)
-findAvroPrimaryKeyField cx qname avroFields =
-
-      let keys = Maybes.cat (Lists.map (\f -> primaryKeyE cx f) avroFields)
-      in (Logic.ifElse (Lists.null keys) (Right Nothing) (Logic.ifElse (Equality.equal (Lists.length keys) 1) (Right (Lists.maybeHead keys)) (err cx (Strings.cat2 "multiple primary key fields for " (showQname qname)))))
-
--- | Extract a foreign key annotation from a field, if present
-foreignKeyE :: t0 -> Schema.Field -> Either Errors.Error (Maybe Environment.AvroForeignKey)
-foreignKeyE cx f =
-    Maybes.maybe (Right Nothing) (\v -> Eithers.bind (expectObjectE cx v) (\m -> Eithers.bind (Eithers.map (\s -> Core.Name s) (requireStringE cx "type" m)) (\tname -> Eithers.bind (optStringE cx "pattern" m) (\pattern_ ->
-      let constr = Maybes.maybe (\s -> Core.Name s) (\pat -> patternToNameConstructor pat) pattern_
-      in (Right (Just (Environment.AvroForeignKey {
-        Environment.avroForeignKeyTypeName = tname,
-        Environment.avroForeignKeyConstructor = constr}))))))) (Maps.lookup avro_foreignKey (Schema.fieldAnnotations f))
-
--- | Look up an adapter by qualified name in the environment
-getAvroHydraAdapter :: Environment.AvroQualifiedName -> Environment.AvroEnvironment -> Maybe (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term)
-getAvroHydraAdapter qname env = Maps.lookup qname (Environment.avroEnvironmentNamedAdapters env)
-
--- | Convert a JSON value to a string, supporting booleans, strings, and numbers
-jsonToStringE :: t0 -> Model.Value -> Either Errors.Error String
-jsonToStringE cx v =
-    case v of
-      Model.ValueBoolean v0 -> Right (Logic.ifElse v0 "true" "false")
-      Model.ValueString v0 -> Right v0
-      Model.ValueNumber v0 -> Right (Literals.showDecimal v0)
-      _ -> unexpectedE cx "string, number, or boolean" "other"
-
--- | Extract named type annotations and convert them to core Name/Term pairs
-namedAnnotationsToCore :: Schema.Named -> M.Map Core.Name Core.Term
-namedAnnotationsToCore n =
-    Maps.fromList (Lists.map (\entry ->
-      let k = Pairs.first entry
-          v = Pairs.second entry
-      in (Core.Name k, (encodeAnnotationValue v))) (Maps.toList (Schema.namedAnnotations n)))
-
--- | Look up an optional string attribute in a JSON object map
-optStringE :: Ord t1 => (t0 -> t1 -> M.Map t1 Model.Value -> Either t2 (Maybe String))
-optStringE cx fname m =
-    Maybes.maybe (Right Nothing) (\v -> Eithers.map (\s -> Maybes.pure s) (expectStringE cx v)) (Maps.lookup fname m)
-
--- | Parse a dotted Avro name into a qualified name
-parseAvroName :: Maybe String -> String -> Environment.AvroQualifiedName
-parseAvroName mns name_ =
-
-      let parts = Strings.splitOn "." name_
-          local = Maybes.fromMaybe name_ (Lists.maybeLast parts)
-      in (Logic.ifElse (Equality.equal (Lists.length parts) 1) (Environment.AvroQualifiedName {
-        Environment.avroQualifiedNameNamespace = mns,
-        Environment.avroQualifiedNameName = local}) (Environment.AvroQualifiedName {
-        Environment.avroQualifiedNameNamespace = (Maybes.map (\ps -> Strings.intercalate "." ps) (Lists.maybeInit parts)),
-        Environment.avroQualifiedNameName = local}))
-
--- | Create a name constructor from a pattern string
-patternToNameConstructor :: String -> String -> Core.Name
-patternToNameConstructor pat s = Core.Name (Strings.intercalate s (Strings.splitOn "${}" pat))
-
--- | Prepare a single field, producing an adapter and updated environment
-prepareField :: t0 -> Environment.AvroEnvironment -> Schema.Field -> Either Errors.Error ((String, (Schema.Field, (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term))), Environment.AvroEnvironment)
-prepareField cx env f =
-
-      let manns = fieldAnnotationsToCore f
-          ann = Logic.ifElse (Maps.null manns) Nothing (Just manns)
-      in (Eithers.bind (foreignKeyE cx f) (\fk -> Eithers.bind (Maybes.maybe (avroHydraAdapter cx (Schema.fieldType f) env) (\fkVal ->
-        let fkName = Environment.avroForeignKeyTypeName fkVal
-            fkConstr = Environment.avroForeignKeyConstructor fkVal
-        in (Eithers.bind (avroHydraAdapter cx (Schema.fieldType f) env) (\adEnvPair ->
-          let ad0 = Pairs.first adEnvPair
-              env1 = Pairs.second adEnvPair
-              elTyp = Core.TypeVariable fkName
-              encodeValue =
-                      \cx1 -> \v -> Eithers.bind (Coders.coderEncode (Coders.adapterCoder ad0) cx1 v) (\encoded -> Eithers.bind (termToStringE cx1 encoded) (\s -> Right (Core.TermVariable (fkConstr s))))
-              decodeTerm =
-                      \cx1 -> \t -> case t of
-                        Core.TermVariable v0 -> Eithers.bind (stringToTermE cx1 (Coders.adapterTarget ad0) (Core.unName v0)) (\term_ -> Coders.coderDecode (Coders.adapterCoder ad0) cx1 term_)
-                        _ -> err cx1 "expected variable"
-              forTypeAndCoder =
-                      \env2 -> \ad1 -> \typ -> \cdr -> Right (Coders.Adapter {
-                        Coders.adapterIsLossy = (Coders.adapterIsLossy ad1),
-                        Coders.adapterSource = (Schema.fieldType f),
-                        Coders.adapterTarget = typ,
-                        Coders.adapterCoder = cdr}, env2)
-          in case (Strip.deannotateType (Coders.adapterTarget ad0)) of
-            Core.TypeMaybe v0 -> case v0 of
-              Core.TypeLiteral _ -> forTypeAndCoder env1 ad0 (Core.TypeMaybe elTyp) (Coders.Coder {
-                Coders.coderEncode = (\cx2 -> \json -> Eithers.map (\v_ -> Core.TermMaybe (Just v_)) (encodeValue cx2 json)),
-                Coders.coderDecode = decodeTerm})
-              _ -> err cx "expected literal type inside optional foreign key"
-            Core.TypeList v0 -> case v0 of
-              Core.TypeLiteral _ -> forTypeAndCoder env1 ad0 (Core.TypeList elTyp) (Coders.Coder {
-                Coders.coderEncode = (\cx2 -> \json -> case json of
-                  Model.ValueArray v2 -> Eithers.map (\terms -> Core.TermList terms) (Eithers.mapList (\jv -> encodeValue cx2 jv) v2)
-                  _ -> err cx2 "Expected JSON array"),
-                Coders.coderDecode = decodeTerm})
-              _ -> err cx "expected literal type inside list foreign key"
-            Core.TypeLiteral _ -> forTypeAndCoder env1 ad0 elTyp (Coders.Coder {
-              Coders.coderEncode = encodeValue,
-              Coders.coderDecode = decodeTerm})
-            _ -> err cx (Strings.cat2 "unsupported type annotated as foreign key: " "unknown")))) fk) (\adEnv ->
-        let ad = Pairs.first adEnv
-            env1 = Pairs.second adEnv
-        in (Right ((Schema.fieldName f, (f, (annotateAdapter ann ad))), env1)))))
-
--- | Thread AvroEnvironment through preparing multiple fields
-prepareFields :: t0 -> Environment.AvroEnvironment -> [Schema.Field] -> Either Errors.Error (M.Map String (Schema.Field, (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term)), Environment.AvroEnvironment)
-prepareFields cx env fields =
-    Lists.foldl (\acc -> \f -> Eithers.bind acc (\accPair ->
-      let m = Pairs.first accPair
-          env1 = Pairs.second accPair
-      in (Eithers.bind (prepareField cx env1 f) (\result ->
-        let kv = Pairs.first result
-            env2 = Pairs.second result
-            k = Pairs.first kv
-            v = Pairs.second kv
-        in (Right (Maps.insert k v m, env2)))))) (Right (Maps.empty, env)) fields
-
--- | Extract a primary key annotation from a field, if present
-primaryKeyE :: t0 -> Schema.Field -> Maybe Environment.AvroPrimaryKey
-primaryKeyE cx f =
-    Maybes.maybe Nothing (\v -> Eithers.either (\_ -> Nothing) (\s -> Just (Environment.AvroPrimaryKey {
-      Environment.avroPrimaryKeyFieldName = (Core.Name (Schema.fieldName f)),
-      Environment.avroPrimaryKeyConstructor = (patternToNameConstructor s)})) (expectStringE cx v)) (Maps.lookup avro_primaryKey (Schema.fieldAnnotations f))
-
--- | Store an adapter in the environment by qualified name
-putAvroHydraAdapter :: Environment.AvroQualifiedName -> Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term -> Environment.AvroEnvironment -> Environment.AvroEnvironment
-putAvroHydraAdapter qname ad env =
-    Environment.AvroEnvironment {
-      Environment.avroEnvironmentNamedAdapters = (Maps.insert qname ad (Environment.avroEnvironmentNamedAdapters env)),
-      Environment.avroEnvironmentNamespace = (Environment.avroEnvironmentNamespace env),
-      Environment.avroEnvironmentElements = (Environment.avroEnvironmentElements env)}
-
--- | Look up a required string attribute in a JSON object map
-requireStringE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error String
-requireStringE cx fname m =
-    Maybes.maybe (err cx (Strings.cat [
-      "required attribute ",
-      (Literals.showString fname),
-      " not found"])) (\v -> expectStringE cx v) (Maps.lookup fname m)
-
--- | Recursively rewrite an Avro schema using a monadic transformation function
-rewriteAvroSchemaM :: ((Schema.Schema -> Either t0 Schema.Schema) -> Schema.Schema -> Either t0 Schema.Schema) -> Schema.Schema -> Either t0 Schema.Schema
-rewriteAvroSchemaM f schema =
-
-      let recurse = rewriteAvroSchemaM f
-          fsub =
-                  \s -> case s of
-                    Schema.SchemaArray v0 -> Eithers.map (\els_ -> Schema.SchemaArray (Schema.Array {
-                      Schema.arrayItems = els_})) (recurse (Schema.arrayItems v0))
-                    Schema.SchemaMap v0 -> Eithers.map (\vs_ -> Schema.SchemaMap (Schema.Map {
-                      Schema.mapValues = vs_})) (recurse (Schema.mapValues v0))
-                    Schema.SchemaNamed v0 -> Eithers.map (\nt_ -> Schema.SchemaNamed (Schema.Named {
-                      Schema.namedName = (Schema.namedName v0),
-                      Schema.namedNamespace = (Schema.namedNamespace v0),
-                      Schema.namedAliases = (Schema.namedAliases v0),
-                      Schema.namedDoc = (Schema.namedDoc v0),
-                      Schema.namedType = nt_,
-                      Schema.namedAnnotations = (Schema.namedAnnotations v0)})) (case (Schema.namedType v0) of
-                      Schema.NamedTypeRecord v1 -> Eithers.map (\fields_ -> Schema.NamedTypeRecord (Schema.Record {
-                        Schema.recordFields = fields_})) (Eithers.mapList (\fld -> Eithers.map (\t_ -> Schema.Field {
-                        Schema.fieldName = (Schema.fieldName fld),
-                        Schema.fieldDoc = (Schema.fieldDoc fld),
-                        Schema.fieldType = t_,
-                        Schema.fieldDefault = (Schema.fieldDefault fld),
-                        Schema.fieldOrder = (Schema.fieldOrder fld),
-                        Schema.fieldAliases = (Schema.fieldAliases fld),
-                        Schema.fieldAnnotations = (Schema.fieldAnnotations fld)}) (recurse (Schema.fieldType fld))) (Schema.recordFields v1))
-                      _ -> Right (Schema.namedType v0))
-                    Schema.SchemaUnion v0 -> Eithers.map (\schemas_ -> Schema.SchemaUnion (Schema.Union schemas_)) (Eithers.mapList (\us -> recurse us) (Schema.unUnion v0))
-                    _ -> Right s
-      in (f fsub schema)
-
--- | Convert an Avro qualified name to a display string
-showQname :: Environment.AvroQualifiedName -> String
-showQname qname =
-
-      let mns = Environment.avroQualifiedNameNamespace qname
-          local = Environment.avroQualifiedNameName qname
-      in (Strings.cat2 (Maybes.maybe "" (\ns -> Strings.cat2 ns ".") mns) local)
-
--- | Parse a string into a term of the expected type
-stringToTermE :: t0 -> Core.Type -> String -> Either Errors.Error Core.Term
-stringToTermE cx typ s =
-
-      let readErr = err cx "failed to read value"
-          readAndWrap = \reader -> \wrapper -> Maybes.maybe readErr (\v -> Right (Core.TermLiteral (wrapper v))) (reader s)
-      in case (Strip.deannotateType typ) of
-        Core.TypeLiteral v0 -> case v0 of
-          Core.LiteralTypeBoolean -> readAndWrap (\x -> Literals.readBoolean x) (\b -> Core.LiteralBoolean b)
-          Core.LiteralTypeInteger v1 -> case v1 of
-            Core.IntegerTypeBigint -> readAndWrap (\x -> Literals.readBigint x) (\i -> Core.LiteralInteger (Core.IntegerValueBigint i))
-            Core.IntegerTypeInt8 -> readAndWrap (\x -> Literals.readInt8 x) (\i -> Core.LiteralInteger (Core.IntegerValueInt8 i))
-            Core.IntegerTypeInt16 -> readAndWrap (\x -> Literals.readInt16 x) (\i -> Core.LiteralInteger (Core.IntegerValueInt16 i))
-            Core.IntegerTypeInt32 -> readAndWrap (\x -> Literals.readInt32 x) (\i -> Core.LiteralInteger (Core.IntegerValueInt32 i))
-            Core.IntegerTypeInt64 -> readAndWrap (\x -> Literals.readInt64 x) (\i -> Core.LiteralInteger (Core.IntegerValueInt64 i))
-            Core.IntegerTypeUint8 -> readAndWrap (\x -> Literals.readUint8 x) (\i -> Core.LiteralInteger (Core.IntegerValueUint8 i))
-            Core.IntegerTypeUint16 -> readAndWrap (\x -> Literals.readUint16 x) (\i -> Core.LiteralInteger (Core.IntegerValueUint16 i))
-            Core.IntegerTypeUint32 -> readAndWrap (\x -> Literals.readUint32 x) (\i -> Core.LiteralInteger (Core.IntegerValueUint32 i))
-            Core.IntegerTypeUint64 -> readAndWrap (\x -> Literals.readUint64 x) (\i -> Core.LiteralInteger (Core.IntegerValueUint64 i))
-          Core.LiteralTypeString -> Right (Core.TermLiteral (Core.LiteralString s))
-          _ -> unexpectedE cx "literal type" "other literal type"
-        _ -> unexpectedE cx "literal type" "other"
-
--- | Convert a literal term to its string representation
-termToStringE :: t0 -> Core.Term -> Either Errors.Error String
-termToStringE cx term =
-    case (Strip.deannotateTerm term) of
-      Core.TermLiteral v0 -> case v0 of
-        Core.LiteralBoolean v1 -> Right (Literals.showBoolean v1)
-        Core.LiteralInteger v1 -> Right (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.LiteralString v1 -> Right v1
-        _ -> unexpectedE cx "boolean, integer, or string" "other literal"
-      Core.TermMaybe v0 -> Maybes.maybe (unexpectedE cx "literal value" "Nothing") (\term_ -> termToStringE cx term_) v0
-      _ -> unexpectedE cx "literal value" "other"
-
--- | Construct an error for unexpected values
-unexpectedE :: t0 -> String -> String -> Either Errors.Error t1
-unexpectedE cx expected found =
-    err cx (Strings.cat [
-      "Expected ",
-      expected,
-      ", found: ",
-      found])
diff --git a/src/main/haskell/Hydra/Avro/Encoder.hs b/src/main/haskell/Hydra/Avro/Encoder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/Encoder.hs
+++ /dev/null
@@ -1,565 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Hydra-to-Avro encoder: converts Hydra types and terms to Avro schemas and JSON values
-
-module Hydra.Avro.Encoder where
-
-import qualified Hydra.Avro.Environment as Environment
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
--- | Build an Avro field from a name-adapter pair
-buildAvroField :: (Core.Name, (Coders.Adapter t0 Schema.Schema t1 t2)) -> Schema.Field
-buildAvroField nameAd =
-
-      let name_ = Pairs.first nameAd
-          ad = Pairs.second nameAd
-      in Schema.Field {
-        Schema.fieldName = (localName name_),
-        Schema.fieldDoc = Nothing,
-        Schema.fieldType = (Coders.adapterTarget ad),
-        Schema.fieldDefault = Nothing,
-        Schema.fieldOrder = Nothing,
-        Schema.fieldAliases = Nothing,
-        Schema.fieldAnnotations = Maps.empty}
-
--- | Create an empty encode environment with the given type map
-emptyEncodeEnvironment :: M.Map Core.Name Core.Type -> Environment.EncodeEnvironment
-emptyEncodeEnvironment typeMap =
-    Environment.EncodeEnvironment {
-      Environment.encodeEnvironmentTypeMap = typeMap,
-      Environment.encodeEnvironmentEmitted = Maps.empty}
-
--- | Encode a Hydra type to an Avro schema adapter, given the type map and a root name
-encodeType :: t0 -> M.Map Core.Name Core.Type -> Core.Name -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value)
-encodeType cx typeMap name_ =
-    Eithers.map (\adEnv -> Pairs.first adEnv) (encodeTypeWithEnv cx name_ (emptyEncodeEnvironment typeMap))
-
--- | Core encoding logic: recursively encode a Hydra type to an Avro schema
-encodeTypeInner :: t0 -> Maybe Core.Name -> Core.Type -> Environment.EncodeEnvironment -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value, Environment.EncodeEnvironment)
-encodeTypeInner cx mName typ env =
-
-      let annResult = extractAnnotations typ
-          annotations = Pairs.first annResult
-          bareType = Pairs.second annResult
-          simpleAdapter =
-                  \target -> \lossy -> \encode -> \decode -> Right (Coders.Adapter {
-                    Coders.adapterIsLossy = lossy,
-                    Coders.adapterSource = typ,
-                    Coders.adapterTarget = target,
-                    Coders.adapterCoder = Coders.Coder {
-                      Coders.coderEncode = encode,
-                      Coders.coderDecode = decode}}, env)
-      in case bareType of
-        Core.TypeUnit -> simpleAdapter (Schema.SchemaPrimitive Schema.PrimitiveNull) False (\_cx -> \_t -> Right Model.ValueNull) (\_cx -> \_j -> Right Core.TermUnit)
-        Core.TypeLiteral v0 -> Eithers.map (\ad -> (ad, env)) (literalAdapter cx typ v0)
-        Core.TypeList v0 -> Eithers.bind (encodeTypeInner cx Nothing v0 env) (\adEnv ->
-          let innerAd = Pairs.first adEnv
-              env1 = Pairs.second adEnv
-          in (Right (Coders.Adapter {
-            Coders.adapterIsLossy = (Coders.adapterIsLossy innerAd),
-            Coders.adapterSource = typ,
-            Coders.adapterTarget = (Schema.SchemaArray (Schema.Array {
-              Schema.arrayItems = (Coders.adapterTarget innerAd)})),
-            Coders.adapterCoder = Coders.Coder {
-              Coders.coderEncode = (\cx1 -> \t -> case t of
-                Core.TermList v1 -> Eithers.map (\jvs -> Model.ValueArray jvs) (Eithers.mapList (\el -> Coders.coderEncode (Coders.adapterCoder innerAd) cx1 el) v1)),
-              Coders.coderDecode = (\cx1 -> \j -> case j of
-                Model.ValueArray v1 -> Eithers.map (\ts -> Core.TermList ts) (Eithers.mapList (\el -> Coders.coderDecode (Coders.adapterCoder innerAd) cx1 el) v1))}}, env1)))
-        Core.TypeMap v0 ->
-          let keyType = Core.mapTypeKeys v0
-              valType = Core.mapTypeValues v0
-          in case (Strip.deannotateType keyType) of
-            Core.TypeLiteral v1 -> case v1 of
-              Core.LiteralTypeString -> Eithers.bind (encodeTypeInner cx Nothing valType env) (\adEnv ->
-                let valAd = Pairs.first adEnv
-                    env1 = Pairs.second adEnv
-                in (Right (Coders.Adapter {
-                  Coders.adapterIsLossy = (Coders.adapterIsLossy valAd),
-                  Coders.adapterSource = typ,
-                  Coders.adapterTarget = (Schema.SchemaMap (Schema.Map {
-                    Schema.mapValues = (Coders.adapterTarget valAd)})),
-                  Coders.adapterCoder = Coders.Coder {
-                    Coders.coderEncode = (\cx1 -> \t -> case t of
-                      Core.TermMap v3 ->
-                        let encodeEntry =
-                                \entry ->
-                                  let k = Pairs.first entry
-                                      v = Pairs.second entry
-                                  in (Eithers.bind (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}) k) (\kStr -> Eithers.map (\vJson -> (kStr, vJson)) (Coders.coderEncode (Coders.adapterCoder valAd) cx1 v)))
-                        in (Eithers.map (\pairs -> Model.ValueObject (Maps.fromList pairs)) (Eithers.mapList encodeEntry (Maps.toList v3)))),
-                    Coders.coderDecode = (\cx1 -> \j -> case j of
-                      Model.ValueObject v3 ->
-                        let decodeEntry =
-                                \entry ->
-                                  let k = Pairs.first entry
-                                      v = Pairs.second entry
-                                  in (Eithers.map (\vTerm -> (Core.TermLiteral (Core.LiteralString k), vTerm)) (Coders.coderDecode (Coders.adapterCoder valAd) cx1 v))
-                        in (Eithers.map (\pairs -> Core.TermMap (Maps.fromList pairs)) (Eithers.mapList decodeEntry (Maps.toList v3))))}}, env1)))
-              _ -> err cx "Avro maps require string keys"
-            _ -> err cx "Avro maps require string keys"
-        Core.TypeRecord v0 -> namedTypeAdapter cx typ mName annotations v0 env (\avroFields -> Schema.NamedTypeRecord (Schema.Record {
-          Schema.recordFields = avroFields})) recordTermCoder
-        Core.TypeUnion v0 ->
-          let allUnit =
-                  Lists.foldl (\b -> \ft -> Logic.and b (case (Core.fieldTypeType ft) of
-                    Core.TypeUnit -> True
-                    _ -> False)) True v0
-          in (Logic.ifElse allUnit (enumAdapter cx typ mName annotations v0 env) (unionAsRecordAdapter cx typ mName annotations v0 env))
-        Core.TypeMaybe v0 -> Eithers.bind (encodeTypeInner cx Nothing v0 env) (\adEnv ->
-          let innerAd = Pairs.first adEnv
-              env1 = Pairs.second adEnv
-          in (Right (Coders.Adapter {
-            Coders.adapterIsLossy = (Coders.adapterIsLossy innerAd),
-            Coders.adapterSource = typ,
-            Coders.adapterTarget = (Schema.SchemaUnion (Schema.Union [
-              Schema.SchemaPrimitive Schema.PrimitiveNull,
-              (Coders.adapterTarget innerAd)])),
-            Coders.adapterCoder = Coders.Coder {
-              Coders.coderEncode = (\cx1 -> \t -> case t of
-                Core.TermMaybe v1 -> Maybes.maybe (Right Model.ValueNull) (\inner -> Coders.coderEncode (Coders.adapterCoder innerAd) cx1 inner) v1),
-              Coders.coderDecode = (\cx1 -> \j -> case j of
-                Model.ValueNull -> Right (Core.TermMaybe Nothing)
-                _ -> Eithers.map (\t -> Core.TermMaybe (Just t)) (Coders.coderDecode (Coders.adapterCoder innerAd) cx1 j))}}, env1)))
-        Core.TypeWrap v0 -> encodeTypeInner cx mName v0 env
-        Core.TypeVariable v0 -> Maybes.maybe (Maybes.maybe (err cx (Strings.cat2 "referenced type not found: " (Core.unName v0))) (\refType -> encodeTypeInner cx (Just v0) refType env) (Maps.lookup v0 (Environment.encodeEnvironmentTypeMap env))) (\existingAd -> Right (Coders.Adapter {
-          Coders.adapterIsLossy = (Coders.adapterIsLossy existingAd),
-          Coders.adapterSource = (Coders.adapterSource existingAd),
-          Coders.adapterTarget = (Schema.SchemaReference (localName v0)),
-          Coders.adapterCoder = (Coders.adapterCoder existingAd)}, env)) (Maps.lookup v0 (Environment.encodeEnvironmentEmitted env))
-        _ -> err cx "unsupported Hydra type for Avro encoding"
-
--- | Encode with full environment threading. Returns the adapter and updated environment
-encodeTypeWithEnv :: t0 -> Core.Name -> Environment.EncodeEnvironment -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value, Environment.EncodeEnvironment)
-encodeTypeWithEnv cx name_ env =
-    Maybes.maybe (err cx (Strings.cat2 "type not found in type map: " (Literals.showString (Core.unName name_)))) (\typ -> encodeTypeInner cx (Just name_) typ env) (Maps.lookup name_ (Environment.encodeEnvironmentTypeMap env))
-
--- | Adapter for all-unit union types (enums)
-enumAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either t1 (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value, Environment.EncodeEnvironment)
-enumAdapter cx typ mName annotations fieldTypes env0 =
-
-      let symbols = Lists.map (\ft -> localName (Core.fieldTypeName ft)) fieldTypes
-          typeName = Maybes.fromMaybe (typeToName typ) mName
-          avroAnnotations = hydraAnnotationsToAvro annotations
-          avroSchema =
-                  Schema.SchemaNamed (Schema.Named {
-                    Schema.namedName = (localName typeName),
-                    Schema.namedNamespace = (nameNamespace typeName),
-                    Schema.namedAliases = Nothing,
-                    Schema.namedDoc = Nothing,
-                    Schema.namedType = (Schema.NamedTypeEnum (Schema.Enum {
-                      Schema.enumSymbols = symbols,
-                      Schema.enumDefault = Nothing})),
-                    Schema.namedAnnotations = avroAnnotations})
-          adapter_ =
-                  Coders.Adapter {
-                    Coders.adapterIsLossy = False,
-                    Coders.adapterSource = typ,
-                    Coders.adapterTarget = avroSchema,
-                    Coders.adapterCoder = Coders.Coder {
-                      Coders.coderEncode = (\cx1 -> \t -> case t of
-                        Core.TermInject v0 ->
-                          let fname = Core.injectionField v0
-                          in (Right (Model.ValueString (localName (Core.fieldName fname))))
-                        _ -> err cx1 "expected union term for enum"),
-                      Coders.coderDecode = (\_cx -> \j -> case j of
-                        Model.ValueString v0 -> Right (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = typeName,
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name v0),
-                            Core.fieldTerm = Core.TermUnit}})))}}
-          env1 =
-                  Environment.EncodeEnvironment {
-                    Environment.encodeEnvironmentTypeMap = (Environment.encodeEnvironmentTypeMap env0),
-                    Environment.encodeEnvironmentEmitted = (Maps.insert typeName adapter_ (Environment.encodeEnvironmentEmitted env0))}
-      in (Right (adapter_, env1))
-
--- | Construct an error result with a message in context
-err :: t0 -> String -> Either Errors.Error t1
-err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))
-
--- | Extract annotations from a potentially annotated type
-extractAnnotations :: Core.Type -> (M.Map Core.Name Core.Term, Core.Type)
-extractAnnotations typ =
-    case typ of
-      Core.TypeAnnotated v0 ->
-        let inner = Core.annotatedTypeBody v0
-            anns = Core.annotatedTypeAnnotation v0
-            innerResult = extractAnnotations inner
-            innerAnns = Pairs.first innerResult
-            bareType = Pairs.second innerResult
-        in (Maps.union anns innerAnns, bareType)
-      _ -> (Maps.empty, typ)
-
--- | Create an adapter for float types
-floatAdapter :: t0 -> t1 -> Core.FloatType -> Either t2 (Coders.Adapter t1 Schema.Schema Core.Term Model.Value)
-floatAdapter cx typ ft =
-
-      let simple =
-              \target -> \lossy -> \encode -> \decode -> Right (Coders.Adapter {
-                Coders.adapterIsLossy = lossy,
-                Coders.adapterSource = typ,
-                Coders.adapterTarget = target,
-                Coders.adapterCoder = Coders.Coder {
-                  Coders.coderEncode = encode,
-                  Coders.coderDecode = decode}})
-      in case ft of
-        Core.FloatTypeFloat32 -> simple (Schema.SchemaPrimitive Schema.PrimitiveFloat) False (\_cx -> \t -> Eithers.map (\f -> Model.ValueNumber (Literals.float32ToDecimal f)) (ExtractCore.float32 (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}) t)) (\_cx -> \j -> case j of
-          Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (Literals.decimalToFloat32 v1)))))
-        Core.FloatTypeFloat64 -> simple (Schema.SchemaPrimitive Schema.PrimitiveDouble) False (\_cx -> \t -> Eithers.map (\d -> Model.ValueNumber (Literals.float64ToDecimal d)) (ExtractCore.float64 (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}) t)) (\_cx -> \j -> case j of
-          Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (Literals.decimalToFloat64 v1)))))
-        _ -> simple (Schema.SchemaPrimitive Schema.PrimitiveDouble) True (\_cx -> \t -> case t of
-          Core.TermLiteral v0 -> case v0 of
-            Core.LiteralFloat v1 -> Right (Model.ValueNumber (floatValueToDouble v1))) (\_cx -> \j -> case j of
-          Model.ValueNumber v0 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (Literals.decimalToFloat64 v0)))))
-
--- | Convert any float value to a JSON decimal number
-floatValueToDouble :: Core.FloatValue -> Sci.Scientific
-floatValueToDouble fv =
-    case fv of
-      Core.FloatValueBigfloat v0 -> Literals.float64ToDecimal (Literals.bigfloatToFloat64 v0)
-      Core.FloatValueFloat32 v0 -> Literals.float32ToDecimal v0
-      Core.FloatValueFloat64 v0 -> Literals.float64ToDecimal v0
-
--- | Fold over field types, building adapters and threading the environment
-foldFieldAdapters :: t0 -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either Errors.Error ([(Core.Name, (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value))], Environment.EncodeEnvironment)
-foldFieldAdapters cx fieldTypes env0 =
-    Lists.foldl (\acc -> \ft -> Eithers.bind acc (\accPair ->
-      let soFar = Pairs.first accPair
-          env1 = Pairs.second accPair
-          fname = Core.fieldTypeName ft
-          ftype = Core.fieldTypeType ft
-      in (Eithers.bind (encodeTypeInner cx Nothing ftype env1) (\adEnv ->
-        let ad = Pairs.first adEnv
-            env2 = Pairs.second adEnv
-        in (Right (Lists.concat2 soFar [
-          (fname, ad)], env2)))))) (Right ([], env0)) fieldTypes
-
--- | Convert Hydra annotations to Avro annotation map
-hydraAnnotationsToAvro :: M.Map Core.Name Core.Term -> M.Map String Model.Value
-hydraAnnotationsToAvro anns =
-    Maps.fromList (Lists.map (\entry ->
-      let k = Pairs.first entry
-          v = Pairs.second entry
-      in (Core.unName k, (termToJsonValue v))) (Maps.toList anns))
-
--- | Encode a single type without a type map (for simple/anonymous types)
-hydraAvroAdapter :: t0 -> M.Map Core.Name Core.Type -> Core.Type -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value)
-hydraAvroAdapter cx typeMap typ =
-    Eithers.map (\adEnv -> Pairs.first adEnv) (encodeTypeInner cx Nothing typ (emptyEncodeEnvironment typeMap))
-
--- | Convert a Hydra Name to an Avro qualified name (local name, optional namespace)
-hydraNameToAvroName :: Core.Name -> (String, (Maybe String))
-hydraNameToAvroName name_ = (localName name_, (nameNamespace name_))
-
--- | Create an adapter for integer types
-integerAdapter :: t0 -> t1 -> Core.IntegerType -> Either t2 (Coders.Adapter t1 Schema.Schema Core.Term Model.Value)
-integerAdapter cx typ it =
-
-      let simple =
-              \target -> \lossy -> \encode -> \decode -> Right (Coders.Adapter {
-                Coders.adapterIsLossy = lossy,
-                Coders.adapterSource = typ,
-                Coders.adapterTarget = target,
-                Coders.adapterCoder = Coders.Coder {
-                  Coders.coderEncode = encode,
-                  Coders.coderDecode = decode}})
-      in case it of
-        Core.IntegerTypeInt32 -> simple (Schema.SchemaPrimitive Schema.PrimitiveInt) False (\_cx -> \t -> Eithers.map (\i -> Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint i))) (ExtractCore.int32 (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}) t)) (\_cx -> \j -> case j of
-          Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Literals.bigintToInt32 (Literals.decimalToBigint v1))))))
-        Core.IntegerTypeInt64 -> simple (Schema.SchemaPrimitive Schema.PrimitiveLong) False (\_cx -> \t -> Eithers.map (\i -> Model.ValueNumber (Literals.bigintToDecimal (Literals.int64ToBigint i))) (ExtractCore.int64 (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}) t)) (\_cx -> \j -> case j of
-          Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (Literals.bigintToInt64 (Literals.decimalToBigint v1))))))
-        _ -> simple (Schema.SchemaPrimitive Schema.PrimitiveLong) True (\_cx -> \t -> case t of
-          Core.TermLiteral v0 -> case v0 of
-            Core.LiteralInteger v1 -> Right (Model.ValueNumber (integerValueToDouble v1))) (\_cx -> \j -> case j of
-          Model.ValueNumber v0 -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (Literals.bigintToInt64 (Literals.decimalToBigint v0))))))
-
--- | Convert any integer value to a JSON decimal number
-integerValueToDouble :: Core.IntegerValue -> Sci.Scientific
-integerValueToDouble iv =
-    case iv of
-      Core.IntegerValueBigint v0 -> Literals.bigintToDecimal v0
-      Core.IntegerValueInt8 v0 -> Literals.bigintToDecimal (Literals.int8ToBigint v0)
-      Core.IntegerValueInt16 v0 -> Literals.bigintToDecimal (Literals.int16ToBigint v0)
-      Core.IntegerValueInt32 v0 -> Literals.bigintToDecimal (Literals.int32ToBigint v0)
-      Core.IntegerValueInt64 v0 -> Literals.bigintToDecimal (Literals.int64ToBigint v0)
-      Core.IntegerValueUint8 v0 -> Literals.bigintToDecimal (Literals.uint8ToBigint v0)
-      Core.IntegerValueUint16 v0 -> Literals.bigintToDecimal (Literals.uint16ToBigint v0)
-      Core.IntegerValueUint32 v0 -> Literals.bigintToDecimal (Literals.uint32ToBigint v0)
-      Core.IntegerValueUint64 v0 -> Literals.bigintToDecimal (Literals.uint64ToBigint v0)
-
--- | Create an adapter for literal types
-literalAdapter :: t0 -> t1 -> Core.LiteralType -> Either t2 (Coders.Adapter t1 Schema.Schema Core.Term Model.Value)
-literalAdapter cx typ lt =
-
-      let simple =
-              \target -> \lossy -> \encode -> \decode -> Right (Coders.Adapter {
-                Coders.adapterIsLossy = lossy,
-                Coders.adapterSource = typ,
-                Coders.adapterTarget = target,
-                Coders.adapterCoder = Coders.Coder {
-                  Coders.coderEncode = encode,
-                  Coders.coderDecode = decode}})
-      in case lt of
-        Core.LiteralTypeBoolean -> simple (Schema.SchemaPrimitive Schema.PrimitiveBoolean) False (\_cx -> \t -> case t of
-          Core.TermLiteral v1 -> case v1 of
-            Core.LiteralBoolean v2 -> Right (Model.ValueBoolean v2)) (\_cx -> \j -> case j of
-          Model.ValueBoolean v1 -> Right (Core.TermLiteral (Core.LiteralBoolean v1)))
-        Core.LiteralTypeString -> simple (Schema.SchemaPrimitive Schema.PrimitiveString) False (\_cx -> \t -> case t of
-          Core.TermLiteral v1 -> case v1 of
-            Core.LiteralString v2 -> Right (Model.ValueString v2)) (\_cx -> \j -> case j of
-          Model.ValueString v1 -> Right (Core.TermLiteral (Core.LiteralString v1)))
-        Core.LiteralTypeBinary -> simple (Schema.SchemaPrimitive Schema.PrimitiveBytes) False (\_cx -> \t -> case t of
-          Core.TermLiteral v1 -> case v1 of
-            Core.LiteralBinary v2 -> Right (Model.ValueString (Literals.binaryToString v2))) (\_cx -> \j -> case j of
-          Model.ValueString v1 -> Right (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary v1))))
-        Core.LiteralTypeInteger v0 -> integerAdapter cx typ v0
-        Core.LiteralTypeFloat v0 -> floatAdapter cx typ v0
-
--- | Extract the local part of a qualified name
-localName :: Core.Name -> String
-localName name_ =
-
-      let s = Core.unName name_
-          parts = Strings.splitOn "." s
-      in (Maybes.fromMaybe s (Lists.maybeLast parts))
-
--- | Extract the namespace from a qualified name, if any
-nameNamespace :: Core.Name -> Maybe String
-nameNamespace name_ =
-
-      let s = Core.unName name_
-          parts = Strings.splitOn "." s
-      in (Logic.ifElse (Equality.equal (Lists.length parts) 1) Nothing (Maybes.map (\ps -> Strings.intercalate "." ps) (Lists.maybeInit parts)))
-
--- | Build a named type adapter (shared between record and union-as-record)
-namedTypeAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> ([Schema.Field] -> Schema.NamedType) -> (t0 -> Core.Name -> [(Core.Name, (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value))] -> ((Context.Context -> Core.Term -> Either Errors.Error Model.Value), (Context.Context -> Model.Value -> Either Errors.Error Core.Term))) -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value, Environment.EncodeEnvironment)
-namedTypeAdapter cx typ mName annotations fieldTypes env0 mkNamedType mkCoder =
-
-      let typeName = Maybes.fromMaybe (typeToName typ) mName
-      in (Maybes.maybe (Eithers.bind (foldFieldAdapters cx fieldTypes env0) (\faResult ->
-        let fieldAdapters = Pairs.first faResult
-            env1 = Pairs.second faResult
-            avroFields = Lists.map buildAvroField fieldAdapters
-            avroAnnotations = hydraAnnotationsToAvro annotations
-            avroSchema =
-                    Schema.SchemaNamed (Schema.Named {
-                      Schema.namedName = (localName typeName),
-                      Schema.namedNamespace = (nameNamespace typeName),
-                      Schema.namedAliases = Nothing,
-                      Schema.namedDoc = Nothing,
-                      Schema.namedType = (mkNamedType avroFields),
-                      Schema.namedAnnotations = avroAnnotations})
-            lossy = Lists.foldl (\b -> \fa -> Logic.or b (Coders.adapterIsLossy (Pairs.second fa))) False fieldAdapters
-            coderPair = mkCoder cx typeName fieldAdapters
-            encodeFn = Pairs.first coderPair
-            decodeFn = Pairs.second coderPair
-            adapter_ =
-                    Coders.Adapter {
-                      Coders.adapterIsLossy = lossy,
-                      Coders.adapterSource = typ,
-                      Coders.adapterTarget = avroSchema,
-                      Coders.adapterCoder = Coders.Coder {
-                        Coders.coderEncode = encodeFn,
-                        Coders.coderDecode = decodeFn}}
-            env2 =
-                    Environment.EncodeEnvironment {
-                      Environment.encodeEnvironmentTypeMap = (Environment.encodeEnvironmentTypeMap env1),
-                      Environment.encodeEnvironmentEmitted = (Maps.insert typeName adapter_ (Environment.encodeEnvironmentEmitted env1))}
-        in (Right (adapter_, env2)))) (\existingAd -> Right (existingAd, env0)) (Maps.lookup typeName (Environment.encodeEnvironmentEmitted env0)))
-
--- | Build a record term coder from field adapters
-recordTermCoder :: t0 -> Core.Name -> [(Core.Name, (Coders.Adapter t1 t2 Core.Term Model.Value))] -> ((Context.Context -> Core.Term -> Either Errors.Error Model.Value), (Context.Context -> Model.Value -> Either Errors.Error Core.Term))
-recordTermCoder cx typeName fieldAdapters =
-
-      let encode =
-              \cx1 -> \term -> case term of
-                Core.TermRecord v0 ->
-                  let fields = Core.recordFields v0
-                      fieldMap = Maps.fromList (Lists.map (\f -> (Core.fieldName f, (Core.fieldTerm f))) fields)
-                      encodeField =
-                              \nameAd ->
-                                let fname = Pairs.first nameAd
-                                    ad = Pairs.second nameAd
-                                    fTerm = Maybes.fromMaybe Core.TermUnit (Maps.lookup fname fieldMap)
-                                in (Eithers.map (\jv -> (localName fname, jv)) (Coders.coderEncode (Coders.adapterCoder ad) cx1 fTerm))
-                  in (Eithers.map (\pairs -> Model.ValueObject (Maps.fromList pairs)) (Eithers.mapList encodeField fieldAdapters))
-                _ -> err cx "expected record term"
-          decode =
-                  \cx1 -> \json -> case json of
-                    Model.ValueObject v0 ->
-                      let decodeField =
-                              \nameAd ->
-                                let fname = Pairs.first nameAd
-                                    ad = Pairs.second nameAd
-                                    jv = Maybes.fromMaybe Model.ValueNull (Maps.lookup (localName fname) v0)
-                                in (Eithers.map (\t -> Core.Field {
-                                  Core.fieldName = fname,
-                                  Core.fieldTerm = t}) (Coders.coderDecode (Coders.adapterCoder ad) cx1 jv))
-                      in (Eithers.map (\fields -> Core.TermRecord (Core.Record {
-                        Core.recordTypeName = typeName,
-                        Core.recordFields = fields})) (Eithers.mapList decodeField fieldAdapters))
-                    _ -> err cx "expected JSON object"
-      in (encode, decode)
-
--- | Convert a Hydra term to a JSON value (for annotation values)
-termToJsonValue :: Core.Term -> Model.Value
-termToJsonValue term =
-    case term of
-      Core.TermLiteral v0 -> case v0 of
-        Core.LiteralString v1 -> Model.ValueString v1
-        Core.LiteralBoolean v1 -> Model.ValueBoolean v1
-        Core.LiteralInteger v1 -> Model.ValueNumber (integerValueToDouble v1)
-        Core.LiteralFloat v1 -> Model.ValueNumber (floatValueToDouble v1)
-        Core.LiteralBinary v1 -> Model.ValueString (Literals.binaryToString v1)
-      Core.TermList v0 -> Model.ValueArray (Lists.map termToJsonValue v0)
-      Core.TermMap v0 -> Model.ValueObject (Maps.fromList (Lists.map (\entry ->
-        let k = Pairs.first entry
-            v = Pairs.second entry
-        in (case k of
-          Core.TermLiteral v1 -> case v1 of
-            Core.LiteralString v2 -> v2
-            _ -> "<key>"
-          _ -> "<key>", (termToJsonValue v))) (Maps.toList v0)))
-      Core.TermRecord v0 -> Logic.ifElse (Lists.null (Core.recordFields v0)) Model.ValueNull (Model.ValueString "<record>")
-      _ -> Model.ValueString "<term>"
-
--- | Generate a default name for an anonymous type
-typeToName :: Core.Type -> Core.Name
-typeToName t =
-    case (Strip.deannotateType t) of
-      Core.TypeRecord _ -> Core.Name "Record"
-      Core.TypeUnion _ -> Core.Name "Union"
-      _ -> Core.Name "Unknown"
-
--- | Adapter for general unions (encoded as records with optional fields)
-unionAsRecordAdapter :: t0 -> Core.Type -> Maybe Core.Name -> M.Map Core.Name Core.Term -> [Core.FieldType] -> Environment.EncodeEnvironment -> Either Errors.Error (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value, Environment.EncodeEnvironment)
-unionAsRecordAdapter cx typ mName annotations fieldTypes env0 =
-    Eithers.bind (foldFieldAdapters cx fieldTypes env0) (\faResult ->
-      let fieldAdapters = Pairs.first faResult
-          env1 = Pairs.second faResult
-          avroFields =
-                  Lists.map (\nameAd ->
-                    let fname = Pairs.first nameAd
-                        ad = Pairs.second nameAd
-                    in Schema.Field {
-                      Schema.fieldName = (localName fname),
-                      Schema.fieldDoc = Nothing,
-                      Schema.fieldType = (Schema.SchemaUnion (Schema.Union [
-                        Schema.SchemaPrimitive Schema.PrimitiveNull,
-                        (Coders.adapterTarget ad)])),
-                      Schema.fieldDefault = (Just Model.ValueNull),
-                      Schema.fieldOrder = Nothing,
-                      Schema.fieldAliases = Nothing,
-                      Schema.fieldAnnotations = Maps.empty}) fieldAdapters
-          typeName = Maybes.fromMaybe (typeToName typ) mName
-          avroAnnotations = hydraAnnotationsToAvro annotations
-          avroSchema =
-                  Schema.SchemaNamed (Schema.Named {
-                    Schema.namedName = (localName typeName),
-                    Schema.namedNamespace = (nameNamespace typeName),
-                    Schema.namedAliases = Nothing,
-                    Schema.namedDoc = Nothing,
-                    Schema.namedType = (Schema.NamedTypeRecord (Schema.Record {
-                      Schema.recordFields = avroFields})),
-                    Schema.namedAnnotations = avroAnnotations})
-          adapter_ =
-                  Coders.Adapter {
-                    Coders.adapterIsLossy = True,
-                    Coders.adapterSource = typ,
-                    Coders.adapterTarget = avroSchema,
-                    Coders.adapterCoder = Coders.Coder {
-                      Coders.coderEncode = (\cx1 -> \t -> case t of
-                        Core.TermInject v0 ->
-                          let activeName = Core.fieldName (Core.injectionField v0)
-                              activeValue = Core.fieldTerm (Core.injectionField v0)
-                              encodePair =
-                                      \nameAd ->
-                                        let fname = Pairs.first nameAd
-                                            ad = Pairs.second nameAd
-                                        in (Logic.ifElse (Equality.equal (Core.unName fname) (Core.unName activeName)) (Eithers.map (\jv -> (localName fname, jv)) (Coders.coderEncode (Coders.adapterCoder ad) cx1 activeValue)) (Right (localName fname, Model.ValueNull)))
-                          in (Eithers.map (\pairs -> Model.ValueObject (Maps.fromList pairs)) (Eithers.mapList encodePair fieldAdapters))
-                        _ -> err cx1 "expected union term"),
-                      Coders.coderDecode = (\cx1 -> \j -> case j of
-                        Model.ValueObject v0 ->
-                          let findActive =
-                                  \remaining -> Maybes.maybe (err cx1 "no non-null field in union record") (\p ->
-                                    let head_ = Pairs.first p
-                                        rest_ = Pairs.second p
-                                        fname = Pairs.first head_
-                                        ad = Pairs.second head_
-                                        mjv = Maps.lookup (localName fname) v0
-                                    in (Maybes.maybe (findActive rest_) (\jv -> case jv of
-                                      Model.ValueNull -> findActive rest_
-                                      _ -> Eithers.map (\t -> Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = typeName,
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = fname,
-                                          Core.fieldTerm = t}})) (Coders.coderDecode (Coders.adapterCoder ad) cx1 jv)) mjv)) (Lists.uncons remaining)
-                          in (findActive fieldAdapters)
-                        _ -> err cx1 "expected JSON object for union-as-record")}}
-          env2 =
-                  Environment.EncodeEnvironment {
-                    Environment.encodeEnvironmentTypeMap = (Environment.encodeEnvironmentTypeMap env1),
-                    Environment.encodeEnvironmentEmitted = (Maps.insert typeName adapter_ (Environment.encodeEnvironmentEmitted env1))}
-      in (Right (adapter_, env2)))
diff --git a/src/main/haskell/Hydra/Avro/Environment.hs b/src/main/haskell/Hydra/Avro/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/Environment.hs
+++ /dev/null
@@ -1,88 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Type definitions for the Avro code generation environment
-
-module Hydra.Avro.Environment where
-
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.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
-
--- | An Avro qualified name with optional namespace
-data AvroQualifiedName =
-  AvroQualifiedName {
-    -- | The optional namespace
-    avroQualifiedNameNamespace :: (Maybe String),
-    -- | The local name
-    avroQualifiedNameName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_AvroQualifiedName = Core.Name "hydra.avro.environment.AvroQualifiedName"
-
-_AvroQualifiedName_namespace = Core.Name "namespace"
-
-_AvroQualifiedName_name = Core.Name "name"
-
--- | An Avro foreign key annotation linking a field to another type
-data AvroForeignKey =
-  AvroForeignKey {
-    -- | The Hydra type name referenced by this foreign key
-    avroForeignKeyTypeName :: Core.Name,
-    -- | A function which constructs element names from string values
-    avroForeignKeyConstructor :: (String -> Core.Name)}
-
-_AvroForeignKey = Core.Name "hydra.avro.environment.AvroForeignKey"
-
-_AvroForeignKey_typeName = Core.Name "typeName"
-
-_AvroForeignKey_constructor = Core.Name "constructor"
-
--- | An Avro primary key annotation identifying the element name field
-data AvroPrimaryKey =
-  AvroPrimaryKey {
-    -- | The name of the primary key field
-    avroPrimaryKeyFieldName :: Core.Name,
-    -- | A function which constructs element names from string values
-    avroPrimaryKeyConstructor :: (String -> Core.Name)}
-
-_AvroPrimaryKey = Core.Name "hydra.avro.environment.AvroPrimaryKey"
-
-_AvroPrimaryKey_fieldName = Core.Name "fieldName"
-
-_AvroPrimaryKey_constructor = Core.Name "constructor"
-
--- | Environment for Avro-to-Hydra code generation
-data AvroEnvironment =
-  AvroEnvironment {
-    -- | Named adapters for previously processed schemas
-    avroEnvironmentNamedAdapters :: (M.Map AvroQualifiedName (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term)),
-    -- | The current Avro namespace
-    avroEnvironmentNamespace :: (Maybe String),
-    -- | Generated Hydra elements
-    avroEnvironmentElements :: (M.Map Core.Name Core.Binding)}
-
-_AvroEnvironment = Core.Name "hydra.avro.environment.AvroEnvironment"
-
-_AvroEnvironment_namedAdapters = Core.Name "namedAdapters"
-
-_AvroEnvironment_namespace = Core.Name "namespace"
-
-_AvroEnvironment_elements = Core.Name "elements"
-
--- | Environment for Hydra-to-Avro encoding, tracking which named types have been emitted
-data EncodeEnvironment =
-  EncodeEnvironment {
-    -- | All named types available for reference
-    encodeEnvironmentTypeMap :: (M.Map Core.Name Core.Type),
-    -- | Adapters for types that have already been fully emitted (emit references for these)
-    encodeEnvironmentEmitted :: (M.Map Core.Name (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value))}
-
-_EncodeEnvironment = Core.Name "hydra.avro.environment.EncodeEnvironment"
-
-_EncodeEnvironment_typeMap = Core.Name "typeMap"
-
-_EncodeEnvironment_emitted = Core.Name "emitted"
diff --git a/src/main/haskell/Hydra/Avro/Language.hs b/src/main/haskell/Hydra/Avro/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/Language.hs
+++ /dev/null
@@ -1,68 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for Apache Avro
-
-module Hydra.Avro.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Language constraints for Apache Avro
-avroLanguage :: Coders.Language
-avroLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.avro"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants = Sets.empty
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantWrap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord]
-    typePredicate =
-        \typ -> case (Strip.deannotateType typ) of
-          Core.TypeMaybe v0 -> case (Strip.deannotateType v0) of
-            Core.TypeMaybe _ -> False
-            _ -> True
-          _ -> True
diff --git a/src/main/haskell/Hydra/Avro/Schema.hs b/src/main/haskell/Hydra/Avro/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/Schema.hs
+++ /dev/null
@@ -1,223 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for Avro schemas. Based on the Avro 1.11.1 specification:
--- |   https://avro.apache.org/docs/1.11.1/specification
-
-module Hydra.Avro.Schema where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.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
-
-data Array =
-  Array {
-    arrayItems :: Schema}
-  deriving (Eq, Ord, Read, Show)
-
-_Array = Core.Name "hydra.avro.schema.Array"
-
-_Array_items = Core.Name "items"
-
-data Enum =
-  Enum {
-    -- | a JSON array, listing symbols, as JSON strings. All symbols in an enum must be unique; duplicates are prohibited. Every symbol must match the regular expression [A-Za-z_][A-Za-z0-9_]* (the same requirement as for names)
-    enumSymbols :: [String],
-    -- | A default value for this enumeration, used during resolution when the reader encounters a symbol from the writer that isn't defined in the reader's schema. The value provided here must be a JSON string that's a member of the symbols array
-    enumDefault :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Enum = Core.Name "hydra.avro.schema.Enum"
-
-_Enum_symbols = Core.Name "symbols"
-
-_Enum_default = Core.Name "default"
-
-data Field =
-  Field {
-    -- | a JSON string providing the name of the field
-    fieldName :: String,
-    -- | a JSON string describing this field for users
-    fieldDoc :: (Maybe String),
-    -- | a schema
-    fieldType :: Schema,
-    -- | default value for this field, only used when reading instances that lack the field for schema evolution purposes
-    fieldDefault :: (Maybe Model.Value),
-    -- | specifies how this field impacts sort ordering of this record
-    fieldOrder :: (Maybe Order),
-    -- | a JSON array of strings, providing alternate names for this field
-    fieldAliases :: (Maybe [String]),
-    -- | Any additional key/value pairs attached to the field
-    fieldAnnotations :: (M.Map String Model.Value)}
-  deriving (Eq, Ord, Read, Show)
-
-_Field = Core.Name "hydra.avro.schema.Field"
-
-_Field_name = Core.Name "name"
-
-_Field_doc = Core.Name "doc"
-
-_Field_type = Core.Name "type"
-
-_Field_default = Core.Name "default"
-
-_Field_order = Core.Name "order"
-
-_Field_aliases = Core.Name "aliases"
-
-_Field_annotations = Core.Name "annotations"
-
-data Fixed =
-  Fixed {
-    -- | an integer, specifying the number of bytes per value
-    fixedSize :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_Fixed = Core.Name "hydra.avro.schema.Fixed"
-
-_Fixed_size = Core.Name "size"
-
-data Map =
-  Map {
-    mapValues :: Schema}
-  deriving (Eq, Ord, Read, Show)
-
-_Map = Core.Name "hydra.avro.schema.Map"
-
-_Map_values = Core.Name "values"
-
-data Named =
-  Named {
-    -- | a string naming this schema
-    namedName :: String,
-    -- | a string that qualifies the name
-    namedNamespace :: (Maybe String),
-    -- | a JSON array of strings, providing alternate names for this schema
-    namedAliases :: (Maybe [String]),
-    -- | a JSON string providing documentation to the user of this schema
-    namedDoc :: (Maybe String),
-    namedType :: NamedType,
-    -- | Any additional key/value pairs attached to the type
-    namedAnnotations :: (M.Map String Model.Value)}
-  deriving (Eq, Ord, Read, Show)
-
-_Named = Core.Name "hydra.avro.schema.Named"
-
-_Named_name = Core.Name "name"
-
-_Named_namespace = Core.Name "namespace"
-
-_Named_aliases = Core.Name "aliases"
-
-_Named_doc = Core.Name "doc"
-
-_Named_type = Core.Name "type"
-
-_Named_annotations = Core.Name "annotations"
-
-data NamedType =
-  NamedTypeEnum Enum |
-  NamedTypeFixed Fixed |
-  NamedTypeRecord Record
-  deriving (Eq, Ord, Read, Show)
-
-_NamedType = Core.Name "hydra.avro.schema.NamedType"
-
-_NamedType_enum = Core.Name "enum"
-
-_NamedType_fixed = Core.Name "fixed"
-
-_NamedType_record = Core.Name "record"
-
-data Order =
-  OrderAscending  |
-  OrderDescending  |
-  OrderIgnore
-  deriving (Eq, Ord, Read, Show)
-
-_Order = Core.Name "hydra.avro.schema.Order"
-
-_Order_ascending = Core.Name "ascending"
-
-_Order_descending = Core.Name "descending"
-
-_Order_ignore = Core.Name "ignore"
-
-data Primitive =
-  -- | no value
-  PrimitiveNull  |
-  -- | A binary value
-  PrimitiveBoolean  |
-  -- | 32-bit signed integer
-  PrimitiveInt  |
-  -- | 64-bit signed integer
-  PrimitiveLong  |
-  -- | single precision (32-bit) IEEE 754 floating-point number
-  PrimitiveFloat  |
-  -- | double precision (64-bit) IEEE 754 floating-point number
-  PrimitiveDouble  |
-  -- | sequence of 8-bit unsigned bytes
-  PrimitiveBytes  |
-  -- | unicode character sequence
-  PrimitiveString
-  deriving (Eq, Ord, Read, Show)
-
-_Primitive = Core.Name "hydra.avro.schema.Primitive"
-
-_Primitive_null = Core.Name "null"
-
-_Primitive_boolean = Core.Name "boolean"
-
-_Primitive_int = Core.Name "int"
-
-_Primitive_long = Core.Name "long"
-
-_Primitive_float = Core.Name "float"
-
-_Primitive_double = Core.Name "double"
-
-_Primitive_bytes = Core.Name "bytes"
-
-_Primitive_string = Core.Name "string"
-
-data Record =
-  Record {
-    -- | a JSON array, listing fields
-    recordFields :: [Field]}
-  deriving (Eq, Ord, Read, Show)
-
-_Record = Core.Name "hydra.avro.schema.Record"
-
-_Record_fields = Core.Name "fields"
-
-data Schema =
-  SchemaArray Array |
-  SchemaMap Map |
-  SchemaNamed Named |
-  SchemaPrimitive Primitive |
-  -- | A reference by name to a previously defined type
-  SchemaReference String |
-  SchemaUnion Union
-  deriving (Eq, Ord, Read, Show)
-
-_Schema = Core.Name "hydra.avro.schema.Schema"
-
-_Schema_array = Core.Name "array"
-
-_Schema_map = Core.Name "map"
-
-_Schema_named = Core.Name "named"
-
-_Schema_primitive = Core.Name "primitive"
-
-_Schema_reference = Core.Name "reference"
-
-_Schema_union = Core.Name "union"
-
-newtype Union =
-  Union {
-    unUnion :: [Schema]}
-  deriving (Eq, Ord, Read, Show)
-
-_Union = Core.Name "hydra.avro.schema.Union"
diff --git a/src/main/haskell/Hydra/Avro/SchemaJson.hs b/src/main/haskell/Hydra/Avro/SchemaJson.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/SchemaJson.hs
+++ /dev/null
@@ -1,424 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | JSON serialization and deserialization for Avro schemas
-
-module Hydra.Avro.SchemaJson where
-
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Json.Parser as Parser
-import qualified Hydra.Json.Writer as Writer
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Parsing as Parsing
-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 coder between Avro schemas and JSON values
-avroSchemaJsonCoder :: t0 -> Coders.Coder Schema.Schema Model.Value
-avroSchemaJsonCoder cx =
-    Coders.Coder {
-      Coders.coderEncode = (\_cx -> \schema -> Right (encodeSchema schema)),
-      Coders.coderDecode = (\cx2 -> \json -> decodeSchema cx2 json)}
-
--- | Create a coder between Avro schemas and JSON strings
-avroSchemaStringCoder :: t0 -> Coders.Coder Schema.Schema String
-avroSchemaStringCoder cx =
-    Coders.Coder {
-      Coders.coderEncode = (\_cx -> \schema -> Right (showJsonValue (encodeSchema schema))),
-      Coders.coderDecode = (\cx2 -> \s -> Eithers.bind (Eithers.either (\e -> err cx2 e) (\v -> Right v) (stringToJsonValue s)) (\json -> decodeSchema cx2 json))}
-
-avro_aliases :: String
-avro_aliases = "aliases"
-
-avro_array :: String
-avro_array = "array"
-
-avro_ascending :: String
-avro_ascending = "ascending"
-
-avro_boolean :: String
-avro_boolean = "boolean"
-
-avro_bytes :: String
-avro_bytes = "bytes"
-
-avro_default :: String
-avro_default = "default"
-
-avro_descending :: String
-avro_descending = "descending"
-
-avro_doc :: String
-avro_doc = "doc"
-
-avro_double :: String
-avro_double = "double"
-
-avro_enum :: String
-avro_enum = "enum"
-
-avro_fields :: String
-avro_fields = "fields"
-
-avro_fixed :: String
-avro_fixed = "fixed"
-
-avro_float :: String
-avro_float = "float"
-
-avro_ignore :: String
-avro_ignore = "ignore"
-
-avro_int :: String
-avro_int = "int"
-
-avro_items :: String
-avro_items = "items"
-
-avro_long :: String
-avro_long = "long"
-
-avro_map :: String
-avro_map = "map"
-
-avro_name :: String
-avro_name = "name"
-
-avro_namespace :: String
-avro_namespace = "namespace"
-
-avro_null :: String
-avro_null = "null"
-
-avro_order :: String
-avro_order = "order"
-
-avro_record :: String
-avro_record = "record"
-
-avro_size :: String
-avro_size = "size"
-
-avro_string :: String
-avro_string = "string"
-
-avro_symbols :: String
-avro_symbols = "symbols"
-
-avro_type :: String
-avro_type = "type"
-
-avro_values :: String
-avro_values = "values"
-
--- | Decode aliases from a JSON object map
-decodeAliases :: t0 -> M.Map String Model.Value -> Either t1 (Maybe [String])
-decodeAliases cx m =
-    Eithers.bind (optArrayE cx avro_aliases m) (\mArr -> Maybes.maybe (Right Nothing) (\arr -> Eithers.map (\strs -> Maybes.pure strs) (Eithers.mapList (expectStringE cx) arr)) mArr)
-
--- | Decode an Avro array schema from a JSON object map
-decodeArraySchema :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.Schema
-decodeArraySchema cx m =
-    Eithers.bind (requireE cx avro_items m) (\items -> Eithers.map (\s -> Schema.SchemaArray (Schema.Array {
-      Schema.arrayItems = s})) (decodeSchema cx items))
-
--- | Decode an Avro enum type from a JSON object map
-decodeEnum :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType
-decodeEnum cx m =
-    Eithers.bind (requireArrayE cx avro_symbols m) (\syms -> Eithers.bind (Eithers.mapList (expectStringE cx) syms) (\symbols -> Eithers.bind (optStringE cx avro_default m) (\defVal -> Right (Schema.NamedTypeEnum (Schema.Enum {
-      Schema.enumSymbols = symbols,
-      Schema.enumDefault = defVal})))))
-
--- | Decode an Avro field from a JSON object map
-decodeField :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.Field
-decodeField cx m =
-    Eithers.bind (requireStringE cx avro_name m) (\name -> Eithers.bind (optStringE cx avro_doc m) (\fdoc -> Eithers.bind (requireE cx avro_type m) (\typeJson -> Eithers.bind (decodeSchema cx typeJson) (\fieldType -> Eithers.bind (Eithers.bind (optStringE cx avro_order m) (\mOrd -> Eithers.mapMaybe (decodeOrder cx) mOrd)) (\order -> Eithers.bind (decodeAliases cx m) (\aliases -> Right (Schema.Field {
-      Schema.fieldName = name,
-      Schema.fieldDoc = fdoc,
-      Schema.fieldType = fieldType,
-      Schema.fieldDefault = (optE avro_default m),
-      Schema.fieldOrder = order,
-      Schema.fieldAliases = aliases,
-      Schema.fieldAnnotations = (getAnnotations m)})))))))
-
--- | Decode an Avro fixed type from a JSON object map
-decodeFixed :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType
-decodeFixed cx m =
-    Eithers.bind (requireNumberE cx avro_size m) (\n ->
-      let size = Literals.bigintToInt32 (Literals.decimalToBigint n)
-      in (Right (Schema.NamedTypeFixed (Schema.Fixed {
-        Schema.fixedSize = size}))))
-
--- | Decode an Avro map schema from a JSON object map
-decodeMapSchema :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.Schema
-decodeMapSchema cx m =
-    Eithers.bind (requireE cx avro_values m) (\values -> Eithers.map (\s -> Schema.SchemaMap (Schema.Map {
-      Schema.mapValues = s})) (decodeSchema cx values))
-
--- | Decode a named Avro schema from a JSON object map and a decoded named type result
-decodeNamedSchema :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType -> Either Errors.Error Schema.Schema
-decodeNamedSchema cx m namedTypeResult =
-    Eithers.bind (requireStringE cx avro_name m) (\name -> Eithers.bind (optStringE cx avro_namespace m) (\ns -> Eithers.bind (optStringE cx avro_doc m) (\sdoc -> Eithers.bind (decodeAliases cx m) (\aliases -> Eithers.bind namedTypeResult (\namedType -> Right (Schema.SchemaNamed (Schema.Named {
-      Schema.namedName = name,
-      Schema.namedNamespace = ns,
-      Schema.namedAliases = aliases,
-      Schema.namedDoc = sdoc,
-      Schema.namedType = namedType,
-      Schema.namedAnnotations = (getAnnotations m)})))))))
-
--- | Decode an Avro schema from a JSON object given the type name
-decodeObjectSchema :: t0 -> M.Map String Model.Value -> String -> Either Errors.Error Schema.Schema
-decodeObjectSchema cx m typeName =
-    Logic.ifElse (Equality.equal typeName "array") (decodeArraySchema cx m) (Logic.ifElse (Equality.equal typeName "map") (decodeMapSchema cx m) (Logic.ifElse (Equality.equal typeName "record") (decodeNamedSchema cx m (decodeRecord cx m)) (Logic.ifElse (Equality.equal typeName "enum") (decodeNamedSchema cx m (decodeEnum cx m)) (Logic.ifElse (Equality.equal typeName "fixed") (decodeNamedSchema cx m (decodeFixed cx m)) (Maybes.maybe (err cx (Strings.cat [
-      "unknown type: ",
-      typeName])) (\p -> Right (Schema.SchemaPrimitive p)) (decodePrimitiveName typeName))))))
-
--- | Decode an Avro field ordering from a string
-decodeOrder :: t0 -> String -> Either Errors.Error Schema.Order
-decodeOrder cx o =
-    Logic.ifElse (Equality.equal o "ascending") (Right Schema.OrderAscending) (Logic.ifElse (Equality.equal o "descending") (Right Schema.OrderDescending) (Logic.ifElse (Equality.equal o "ignore") (Right Schema.OrderIgnore) (err cx (Strings.cat [
-      "unknown order: ",
-      o]))))
-
--- | Decode a primitive type name string to a Primitive, or Nothing if not a primitive
-decodePrimitiveName :: String -> Maybe Schema.Primitive
-decodePrimitiveName s =
-    Logic.ifElse (Equality.equal s "null") (Just Schema.PrimitiveNull) (Logic.ifElse (Equality.equal s "boolean") (Just Schema.PrimitiveBoolean) (Logic.ifElse (Equality.equal s "int") (Just Schema.PrimitiveInt) (Logic.ifElse (Equality.equal s "long") (Just Schema.PrimitiveLong) (Logic.ifElse (Equality.equal s "float") (Just Schema.PrimitiveFloat) (Logic.ifElse (Equality.equal s "double") (Just Schema.PrimitiveDouble) (Logic.ifElse (Equality.equal s "bytes") (Just Schema.PrimitiveBytes) (Logic.ifElse (Equality.equal s "string") (Just Schema.PrimitiveString) Nothing)))))))
-
--- | Decode an Avro record type from a JSON object map
-decodeRecord :: t0 -> M.Map String Model.Value -> Either Errors.Error Schema.NamedType
-decodeRecord cx m =
-    Eithers.bind (requireArrayE cx avro_fields m) (\fieldJsons -> Eithers.bind (Eithers.mapList (\fj -> Eithers.bind (expectObjectE cx fj) (\fm -> decodeField cx fm)) fieldJsons) (\fields -> Right (Schema.NamedTypeRecord (Schema.Record {
-      Schema.recordFields = fields}))))
-
--- | Decode an Avro schema from a JSON value
-decodeSchema :: t0 -> Model.Value -> Either Errors.Error Schema.Schema
-decodeSchema cx v =
-    case v of
-      Model.ValueString v0 -> Maybes.maybe (Right (Schema.SchemaReference v0)) (\p -> Right (Schema.SchemaPrimitive p)) (decodePrimitiveName v0)
-      Model.ValueArray v0 -> Eithers.map (\decoded -> Schema.SchemaUnion (Schema.Union decoded)) (Eithers.mapList (decodeSchema cx) v0)
-      Model.ValueObject v0 -> Eithers.bind (requireStringE cx avro_type v0) (\typeName -> decodeObjectSchema cx v0 typeName)
-      _ -> err cx (Strings.cat [
-        "unexpected JSON value for schema: ",
-        (showJsonValue v)])
-
--- | Encode annotations as key-value pairs with @ prefix on keys
-encodeAnnotations :: M.Map String t0 -> [(String, t0)]
-encodeAnnotations m = Lists.map (\entry -> (Strings.cat2 "@" (Pairs.first entry), (Pairs.second entry))) (Maps.toList m)
-
--- | Encode an Avro array schema to a JSON object
-encodeArray :: Schema.Array -> Model.Value
-encodeArray arr =
-    Model.ValueObject (Maps.fromList [
-      ("type", (Model.ValueString "array")),
-      ("items", (encodeSchema (Schema.arrayItems arr)))])
-
--- | Encode an Avro enum type as key-value pairs
-encodeEnum :: Schema.Enum -> [(String, Model.Value)]
-encodeEnum e =
-    Lists.concat [
-      [
-        ("type", (Model.ValueString "enum"))],
-      [
-        ("symbols", (Model.ValueArray (Lists.map (\s -> Model.ValueString s) (Schema.enumSymbols e))))],
-      (Maybes.maybe [] (\d -> [
-        ("default", (Model.ValueString d))]) (Schema.enumDefault e))]
-
--- | Encode an Avro field to a JSON object
-encodeField :: Schema.Field -> Model.Value
-encodeField f =
-    Model.ValueObject (Maps.fromList (Lists.concat [
-      [
-        ("name", (Model.ValueString (Schema.fieldName f)))],
-      [
-        ("type", (encodeSchema (Schema.fieldType f)))],
-      (Maybes.maybe [] (\d -> [
-        ("doc", (Model.ValueString d))]) (Schema.fieldDoc f)),
-      (Maybes.maybe [] (\d -> [
-        ("default", d)]) (Schema.fieldDefault f)),
-      (Maybes.maybe [] (\o -> [
-        encodeOrder o]) (Schema.fieldOrder f)),
-      (Maybes.maybe [] (\als -> [
-        ("aliases", (Model.ValueArray (Lists.map (\a -> Model.ValueString a) als)))]) (Schema.fieldAliases f)),
-      (encodeAnnotations (Schema.fieldAnnotations f))]))
-
--- | Encode an Avro fixed type as key-value pairs
-encodeFixed :: Schema.Fixed -> [(String, Model.Value)]
-encodeFixed f =
-    [
-      ("type", (Model.ValueString "fixed")),
-      ("size", (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint (Schema.fixedSize f)))))]
-
--- | Encode an Avro map schema to a JSON object
-encodeMap :: Schema.Map -> Model.Value
-encodeMap mp =
-    Model.ValueObject (Maps.fromList [
-      ("type", (Model.ValueString "map")),
-      ("values", (encodeSchema (Schema.mapValues mp)))])
-
--- | Encode an Avro named type to a JSON object
-encodeNamed :: Schema.Named -> Model.Value
-encodeNamed n =
-    Model.ValueObject (Maps.fromList (Lists.concat [
-      [
-        ("name", (Model.ValueString (Schema.namedName n)))],
-      (Maybes.maybe [] (\ns -> [
-        ("namespace", (Model.ValueString ns))]) (Schema.namedNamespace n)),
-      (Maybes.maybe [] (\d -> [
-        ("doc", (Model.ValueString d))]) (Schema.namedDoc n)),
-      (Maybes.maybe [] (\als -> [
-        ("aliases", (Model.ValueArray (Lists.map (\a -> Model.ValueString a) als)))]) (Schema.namedAliases n)),
-      (encodeNamedType (Schema.namedType n)),
-      (encodeAnnotations (Schema.namedAnnotations n))]))
-
--- | Encode the specific variant of a named Avro type
-encodeNamedType :: Schema.NamedType -> [(String, Model.Value)]
-encodeNamedType nt =
-    case nt of
-      Schema.NamedTypeEnum v0 -> encodeEnum v0
-      Schema.NamedTypeFixed v0 -> encodeFixed v0
-      Schema.NamedTypeRecord v0 -> encodeRecord v0
-
--- | Encode an Avro field ordering as a key-value pair
-encodeOrder :: Schema.Order -> (String, Model.Value)
-encodeOrder o =
-    ("order", (Model.ValueString (case o of
-      Schema.OrderAscending -> "ascending"
-      Schema.OrderDescending -> "descending"
-      Schema.OrderIgnore -> "ignore")))
-
--- | Encode an Avro primitive type as a JSON string
-encodePrimitive :: Schema.Primitive -> Model.Value
-encodePrimitive p =
-    Model.ValueString (case p of
-      Schema.PrimitiveNull -> "null"
-      Schema.PrimitiveBoolean -> "boolean"
-      Schema.PrimitiveInt -> "int"
-      Schema.PrimitiveLong -> "long"
-      Schema.PrimitiveFloat -> "float"
-      Schema.PrimitiveDouble -> "double"
-      Schema.PrimitiveBytes -> "bytes"
-      Schema.PrimitiveString -> "string")
-
--- | Encode an Avro record type as key-value pairs
-encodeRecord :: Schema.Record -> [(String, Model.Value)]
-encodeRecord r =
-    [
-      ("type", (Model.ValueString "record")),
-      ("fields", (Model.ValueArray (Lists.map encodeField (Schema.recordFields r))))]
-
--- | Encode an Avro schema to a JSON value
-encodeSchema :: Schema.Schema -> Model.Value
-encodeSchema schema =
-    case schema of
-      Schema.SchemaPrimitive v0 -> encodePrimitive v0
-      Schema.SchemaArray v0 -> encodeArray v0
-      Schema.SchemaMap v0 -> encodeMap v0
-      Schema.SchemaNamed v0 -> encodeNamed v0
-      Schema.SchemaReference v0 -> Model.ValueString v0
-      Schema.SchemaUnion v0 -> encodeUnion v0
-
--- | Encode an Avro union as a JSON array of schemas
-encodeUnion :: Schema.Union -> Model.Value
-encodeUnion u = Model.ValueArray (Lists.map encodeSchema (Schema.unUnion u))
-
--- | Construct an error result with a message in context
-err :: t0 -> String -> Either Errors.Error t1
-err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))
-
--- | Extract a JSON array or return an error
-expectArrayE :: t0 -> Model.Value -> Either t1 [Model.Value]
-expectArrayE cx value =
-    case value of
-      Model.ValueArray v0 -> Right v0
-
--- | Extract a JSON number or return an error
-expectNumberE :: t0 -> Model.Value -> Either t1 Sci.Scientific
-expectNumberE cx value =
-    case value of
-      Model.ValueNumber v0 -> Right v0
-
--- | Extract a JSON object or return an error
-expectObjectE :: t0 -> Model.Value -> Either t1 (M.Map String Model.Value)
-expectObjectE cx value =
-    case value of
-      Model.ValueObject v0 -> Right v0
-
--- | Extract a JSON string or return an error
-expectStringE :: t0 -> Model.Value -> Either t1 String
-expectStringE cx value =
-    case value of
-      Model.ValueString v0 -> Right v0
-
--- | Extract annotation entries (keys starting with @) from a JSON object map
-getAnnotations :: M.Map String t0 -> M.Map String t0
-getAnnotations m =
-    Maps.fromList (Maybes.cat (Lists.map (\entry ->
-      let k = Pairs.first entry
-          v = Pairs.second entry
-      in (Logic.ifElse (Equality.equal (Maybes.fromMaybe 0 (Strings.maybeCharAt 0 k)) 64) (Maybes.pure (Strings.fromList (Lists.drop 1 (Strings.toList k)), v)) Nothing)) (Maps.toList m)))
-
--- | Look up an optional array attribute in a JSON object map
-optArrayE :: Ord t1 => (t0 -> t1 -> M.Map t1 Model.Value -> Either t2 (Maybe [Model.Value]))
-optArrayE cx fname m =
-    Maybes.maybe (Right Nothing) (\v -> Eithers.map (\a -> Maybes.pure a) (expectArrayE cx v)) (Maps.lookup fname m)
-
--- | Look up an optional attribute in a JSON object map
-optE :: Ord t0 => (t0 -> M.Map t0 t1 -> Maybe t1)
-optE k m = Maps.lookup k m
-
--- | Look up an optional string attribute in a JSON object map
-optStringE :: Ord t1 => (t0 -> t1 -> M.Map t1 Model.Value -> Either t2 (Maybe String))
-optStringE cx fname m =
-    Maybes.maybe (Right Nothing) (\v -> Eithers.map (\s -> Maybes.pure s) (expectStringE cx v)) (Maps.lookup fname m)
-
--- | Look up a required array attribute in a JSON object map
-requireArrayE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error [Model.Value]
-requireArrayE cx fname m = Eithers.bind (requireE cx fname m) (\v -> expectArrayE cx v)
-
--- | Look up a required attribute in a JSON object map
-requireE :: t0 -> String -> M.Map String t1 -> Either Errors.Error t1
-requireE cx fname m =
-    Maybes.maybe (err cx (Strings.cat [
-      "required attribute ",
-      (Literals.showString fname),
-      " not found"])) (\v -> Right v) (Maps.lookup fname m)
-
--- | Look up a required number attribute in a JSON object map
-requireNumberE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error Sci.Scientific
-requireNumberE cx fname m = Eithers.bind (requireE cx fname m) (\v -> expectNumberE cx v)
-
--- | Look up a required string attribute in a JSON object map
-requireStringE :: t0 -> String -> M.Map String Model.Value -> Either Errors.Error String
-requireStringE cx fname m = Eithers.bind (requireE cx fname m) (\v -> expectStringE cx v)
-
--- | Convert a JSON value to its string representation
-showJsonValue :: Model.Value -> String
-showJsonValue v = Writer.printJson v
-
--- | Parse a JSON string, returning Either for compatibility
-stringToJsonValue :: String -> Either String Model.Value
-stringToJsonValue s =
-    (\x -> case x of
-      Parsing.ParseResultSuccess v0 -> Right (Parsing.parseSuccessValue v0)
-      Parsing.ParseResultFailure v0 -> Left (Parsing.parseErrorMessage v0)) (Parser.parseJson s)
-
--- | Construct an error for unexpected values
-unexpectedE :: t0 -> String -> String -> Either Errors.Error t1
-unexpectedE cx expected found =
-    err cx (Strings.cat [
-      "Expected ",
-      expected,
-      ", found: ",
-      found])
diff --git a/src/main/haskell/Hydra/Avro/Testing.hs b/src/main/haskell/Hydra/Avro/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Avro/Testing.hs
+++ /dev/null
@@ -1,325 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Test case types for the bidirectional Avro coder
-
-module Hydra.Avro.Testing where
-
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | A test case which maps an Avro schema to a Hydra type and compares the result
-data TypeLevelForwardTestCase =
-  TypeLevelForwardTestCase {
-    -- | A human-readable description of what this test case covers
-    typeLevelForwardTestCaseDescription :: String,
-    -- | The input Avro schema
-    typeLevelForwardTestCaseSchema :: Schema.Schema,
-    -- | The expected Hydra type
-    typeLevelForwardTestCaseType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeLevelForwardTestCase = Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"
-
-_TypeLevelForwardTestCase_description = Core.Name "description"
-
-_TypeLevelForwardTestCase_schema = Core.Name "schema"
-
-_TypeLevelForwardTestCase_type = Core.Name "type"
-
--- | A test case which maps a Hydra type to an Avro schema and compares the result
-data TypeLevelReverseTestCase =
-  TypeLevelReverseTestCase {
-    -- | A human-readable description of what this test case covers
-    typeLevelReverseTestCaseDescription :: String,
-    -- | The input Hydra type
-    typeLevelReverseTestCaseType :: Core.Type,
-    -- | The expected Avro schema
-    typeLevelReverseTestCaseSchema :: Schema.Schema}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeLevelReverseTestCase = Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"
-
-_TypeLevelReverseTestCase_description = Core.Name "description"
-
-_TypeLevelReverseTestCase_type = Core.Name "type"
-
-_TypeLevelReverseTestCase_schema = Core.Name "schema"
-
--- | A test case which maps an Avro schema to a Hydra type and back, verifying the result
-data TypeLevelRoundTripAvroTestCase =
-  TypeLevelRoundTripAvroTestCase {
-    -- | A human-readable description of what this test case covers
-    typeLevelRoundTripAvroTestCaseDescription :: String,
-    -- | The original Avro schema
-    typeLevelRoundTripAvroTestCaseSchema :: Schema.Schema,
-    -- | The expected Avro schema after the round-trip, which may differ from the original due to normalization or information loss
-    typeLevelRoundTripAvroTestCaseExpectedSchema :: Schema.Schema}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeLevelRoundTripAvroTestCase = Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"
-
-_TypeLevelRoundTripAvroTestCase_description = Core.Name "description"
-
-_TypeLevelRoundTripAvroTestCase_schema = Core.Name "schema"
-
-_TypeLevelRoundTripAvroTestCase_expectedSchema = Core.Name "expectedSchema"
-
--- | A test case which maps a Hydra type to an Avro schema and back, verifying the result
-data TypeLevelRoundTripHydraTestCase =
-  TypeLevelRoundTripHydraTestCase {
-    -- | A human-readable description of what this test case covers
-    typeLevelRoundTripHydraTestCaseDescription :: String,
-    -- | The original Hydra type
-    typeLevelRoundTripHydraTestCaseType :: Core.Type,
-    -- | The expected Hydra type after the round-trip, which may differ from the original due to normalization or information loss
-    typeLevelRoundTripHydraTestCaseExpectedType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeLevelRoundTripHydraTestCase = Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"
-
-_TypeLevelRoundTripHydraTestCase_description = Core.Name "description"
-
-_TypeLevelRoundTripHydraTestCase_type = Core.Name "type"
-
-_TypeLevelRoundTripHydraTestCase_expectedType = Core.Name "expectedType"
-
--- | A test case which encodes a JSON value as a Hydra term using an Avro schema
-data TermLevelForwardTestCase =
-  TermLevelForwardTestCase {
-    -- | A human-readable description of what this test case covers
-    termLevelForwardTestCaseDescription :: String,
-    -- | The Avro schema describing the JSON value
-    termLevelForwardTestCaseSchema :: Schema.Schema,
-    -- | The input JSON value
-    termLevelForwardTestCaseJson :: Model.Value,
-    -- | The expected Hydra term
-    termLevelForwardTestCaseTerm :: Core.Term}
-  deriving (Eq, Ord, Read, Show)
-
-_TermLevelForwardTestCase = Core.Name "hydra.avro.testing.TermLevelForwardTestCase"
-
-_TermLevelForwardTestCase_description = Core.Name "description"
-
-_TermLevelForwardTestCase_schema = Core.Name "schema"
-
-_TermLevelForwardTestCase_json = Core.Name "json"
-
-_TermLevelForwardTestCase_term = Core.Name "term"
-
--- | A test case which decodes a Hydra term to a JSON value using an Avro schema
-data TermLevelReverseTestCase =
-  TermLevelReverseTestCase {
-    -- | A human-readable description of what this test case covers
-    termLevelReverseTestCaseDescription :: String,
-    -- | The Avro schema describing the expected JSON value
-    termLevelReverseTestCaseSchema :: Schema.Schema,
-    -- | The input Hydra term
-    termLevelReverseTestCaseTerm :: Core.Term,
-    -- | The expected JSON value
-    termLevelReverseTestCaseJson :: Model.Value}
-  deriving (Eq, Ord, Read, Show)
-
-_TermLevelReverseTestCase = Core.Name "hydra.avro.testing.TermLevelReverseTestCase"
-
-_TermLevelReverseTestCase_description = Core.Name "description"
-
-_TermLevelReverseTestCase_schema = Core.Name "schema"
-
-_TermLevelReverseTestCase_term = Core.Name "term"
-
-_TermLevelReverseTestCase_json = Core.Name "json"
-
--- | A test case which encodes a JSON value as a Hydra term and decodes it back, verifying the result
-data TermLevelRoundTripJsonTestCase =
-  TermLevelRoundTripJsonTestCase {
-    -- | A human-readable description of what this test case covers
-    termLevelRoundTripJsonTestCaseDescription :: String,
-    -- | The Avro schema describing the JSON value
-    termLevelRoundTripJsonTestCaseSchema :: Schema.Schema,
-    -- | The original JSON value
-    termLevelRoundTripJsonTestCaseJson :: Model.Value,
-    -- | The expected JSON value after the round-trip, which may differ from the original due to normalization
-    termLevelRoundTripJsonTestCaseExpectedJson :: Model.Value}
-  deriving (Eq, Ord, Read, Show)
-
-_TermLevelRoundTripJsonTestCase = Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"
-
-_TermLevelRoundTripJsonTestCase_description = Core.Name "description"
-
-_TermLevelRoundTripJsonTestCase_schema = Core.Name "schema"
-
-_TermLevelRoundTripJsonTestCase_json = Core.Name "json"
-
-_TermLevelRoundTripJsonTestCase_expectedJson = Core.Name "expectedJson"
-
--- | A test case which decodes a Hydra term to JSON and encodes it back, verifying the result
-data TermLevelRoundTripTermTestCase =
-  TermLevelRoundTripTermTestCase {
-    -- | A human-readable description of what this test case covers
-    termLevelRoundTripTermTestCaseDescription :: String,
-    -- | The Hydra type of the term
-    termLevelRoundTripTermTestCaseType :: Core.Type,
-    -- | The original Hydra term
-    termLevelRoundTripTermTestCaseTerm :: Core.Term,
-    -- | The expected Hydra term after the round-trip, which may differ from the original due to normalization
-    termLevelRoundTripTermTestCaseExpectedTerm :: Core.Term}
-  deriving (Eq, Ord, Read, Show)
-
-_TermLevelRoundTripTermTestCase = Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"
-
-_TermLevelRoundTripTermTestCase_description = Core.Name "description"
-
-_TermLevelRoundTripTermTestCase_type = Core.Name "type"
-
-_TermLevelRoundTripTermTestCase_term = Core.Name "term"
-
-_TermLevelRoundTripTermTestCase_expectedTerm = Core.Name "expectedTerm"
-
--- | A test case for union type encoding and decoding, covering the various strategies for representing unions in Avro
-data UnionTestCase =
-  UnionTestCase {
-    -- | A human-readable description of what this test case covers
-    unionTestCaseDescription :: String,
-    -- | The Hydra union type
-    unionTestCaseHydraType :: Core.Type,
-    -- | The expected Avro schema (enum for all-unit unions, record with optional fields for general unions)
-    unionTestCaseAvroSchema :: Schema.Schema,
-    -- | Pairs of corresponding Hydra terms and JSON values for this union
-    unionTestCaseTermPairs :: [(Core.Term, Model.Value)]}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionTestCase = Core.Name "hydra.avro.testing.UnionTestCase"
-
-_UnionTestCase_description = Core.Name "description"
-
-_UnionTestCase_hydraType = Core.Name "hydraType"
-
-_UnionTestCase_avroSchema = Core.Name "avroSchema"
-
-_UnionTestCase_termPairs = Core.Name "termPairs"
-
--- | A test case for bidirectional name mapping between Hydra and Avro
-data NameMappingTestCase =
-  NameMappingTestCase {
-    -- | A human-readable description of what this test case covers
-    nameMappingTestCaseDescription :: String,
-    -- | The Hydra name
-    nameMappingTestCaseHydraName :: Core.Name,
-    -- | The expected Avro qualified name (dotted string)
-    nameMappingTestCaseAvroName :: String,
-    -- | The expected Avro namespace, if any
-    nameMappingTestCaseAvroNamespace :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_NameMappingTestCase = Core.Name "hydra.avro.testing.NameMappingTestCase"
-
-_NameMappingTestCase_description = Core.Name "description"
-
-_NameMappingTestCase_hydraName = Core.Name "hydraName"
-
-_NameMappingTestCase_avroName = Core.Name "avroName"
-
-_NameMappingTestCase_avroNamespace = Core.Name "avroNamespace"
-
--- | A test case which verifies that lossy conversions stash original information in annotations
-data LossinessTestCase =
-  LossinessTestCase {
-    -- | A human-readable description of what this test case covers
-    lossinessTestCaseDescription :: String,
-    -- | The original Avro schema containing information that may be lost
-    lossinessTestCaseOriginalSchema :: Schema.Schema,
-    -- | The resulting Hydra type, which should carry annotations for any lost information
-    lossinessTestCaseHydraType :: Core.Type,
-    -- | The Avro schema recovered from the annotated Hydra type
-    lossinessTestCaseRecoveredSchema :: Schema.Schema,
-    -- | Whether the adapter reports this conversion as lossy
-    lossinessTestCaseIsLossy :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_LossinessTestCase = Core.Name "hydra.avro.testing.LossinessTestCase"
-
-_LossinessTestCase_description = Core.Name "description"
-
-_LossinessTestCase_originalSchema = Core.Name "originalSchema"
-
-_LossinessTestCase_hydraType = Core.Name "hydraType"
-
-_LossinessTestCase_recoveredSchema = Core.Name "recoveredSchema"
-
-_LossinessTestCase_isLossy = Core.Name "isLossy"
-
--- | A test case for Avro schema serialization to and from JSON
-data SchemaSerializationTestCase =
-  SchemaSerializationTestCase {
-    -- | A human-readable description of what this test case covers
-    schemaSerializationTestCaseDescription :: String,
-    -- | The Avro schema
-    schemaSerializationTestCaseSchema :: Schema.Schema,
-    -- | The expected JSON representation of the schema
-    schemaSerializationTestCaseJson :: Model.Value}
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaSerializationTestCase = Core.Name "hydra.avro.testing.SchemaSerializationTestCase"
-
-_SchemaSerializationTestCase_description = Core.Name "description"
-
-_SchemaSerializationTestCase_schema = Core.Name "schema"
-
-_SchemaSerializationTestCase_json = Core.Name "json"
-
--- | A test case for the bidirectional Avro coder
-data AvroTestCase =
-  -- | Type-level forward mapping (Avro Schema -> Hydra Type)
-  AvroTestCaseTypeLevelForward TypeLevelForwardTestCase |
-  -- | Type-level reverse mapping (Hydra Type -> Avro Schema)
-  AvroTestCaseTypeLevelReverse TypeLevelReverseTestCase |
-  -- | Type-level round-trip starting from Avro (Avro -> Hydra -> Avro)
-  AvroTestCaseTypeLevelRoundTripAvro TypeLevelRoundTripAvroTestCase |
-  -- | Type-level round-trip starting from Hydra (Hydra -> Avro -> Hydra)
-  AvroTestCaseTypeLevelRoundTripHydra TypeLevelRoundTripHydraTestCase |
-  -- | Term-level forward mapping (JSON -> Hydra Term)
-  AvroTestCaseTermLevelForward TermLevelForwardTestCase |
-  -- | Term-level reverse mapping (Hydra Term -> JSON)
-  AvroTestCaseTermLevelReverse TermLevelReverseTestCase |
-  -- | Term-level round-trip starting from JSON (JSON -> Term -> JSON)
-  AvroTestCaseTermLevelRoundTripJson TermLevelRoundTripJsonTestCase |
-  -- | Term-level round-trip starting from a term (Term -> JSON -> Term)
-  AvroTestCaseTermLevelRoundTripTerm TermLevelRoundTripTermTestCase |
-  -- | Union-specific encoding and decoding
-  AvroTestCaseUnion UnionTestCase |
-  -- | Name mapping between Hydra and Avro
-  AvroTestCaseNameMapping NameMappingTestCase |
-  -- | Lossy conversion with annotation stashing
-  AvroTestCaseLossiness LossinessTestCase |
-  -- | Schema serialization to and from JSON
-  AvroTestCaseSchemaSerialization SchemaSerializationTestCase
-  deriving (Eq, Ord, Read, Show)
-
-_AvroTestCase = Core.Name "hydra.avro.testing.AvroTestCase"
-
-_AvroTestCase_typeLevelForward = Core.Name "typeLevelForward"
-
-_AvroTestCase_typeLevelReverse = Core.Name "typeLevelReverse"
-
-_AvroTestCase_typeLevelRoundTripAvro = Core.Name "typeLevelRoundTripAvro"
-
-_AvroTestCase_typeLevelRoundTripHydra = Core.Name "typeLevelRoundTripHydra"
-
-_AvroTestCase_termLevelForward = Core.Name "termLevelForward"
-
-_AvroTestCase_termLevelReverse = Core.Name "termLevelReverse"
-
-_AvroTestCase_termLevelRoundTripJson = Core.Name "termLevelRoundTripJson"
-
-_AvroTestCase_termLevelRoundTripTerm = Core.Name "termLevelRoundTripTerm"
-
-_AvroTestCase_union = Core.Name "union"
-
-_AvroTestCase_nameMapping = Core.Name "nameMapping"
-
-_AvroTestCase_lossiness = Core.Name "lossiness"
-
-_AvroTestCase_schemaSerialization = Core.Name "schemaSerialization"
diff --git a/src/main/haskell/Hydra/Azure/Dtld.hs b/src/main/haskell/Hydra/Azure/Dtld.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Azure/Dtld.hs
+++ /dev/null
@@ -1,740 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | An Azure Digital Twin Definition Language (DTLD) model. Based on:
--- |   https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twins-definition-language
--- | DTLD features which are not currently included in this model:
--- |   * geospatial schemas (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#geospatial-schemas)
--- |   * semantic types and units (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#semantic-types)
--- |   * model versioning (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#model-versioning)
-
-module Hydra.Azure.Dtld 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.Set as S
-
--- | A Command describes a function or operation that can be performed on any digital twin.
-data Command =
-  Command {
-    -- | This must be 'Command'
-    commandType :: Iri,
-    -- | The 'programming' name of the command. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    commandName :: String,
-    -- | The ID of the command. If no @id is provided, the digital twin interface processor will assign one.
-    commandId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    commandComment :: (Maybe String),
-    -- | A localizable description for display
-    commandDescription :: (Maybe String),
-    -- | A localizable name for display
-    commandDisplayName :: (Maybe String),
-    -- | This property is deprecated. Either value, synchronous or asynchronous, has the same meaning: a command that starts execution within a configurable time and that completes execution within a configurable time.
-    commandCommandType :: (Maybe CommandType),
-    -- | A description of the input to the Command
-    commandRequest :: (Maybe CommandPayload),
-    -- | A description of the output of the Command
-    commandResponse :: (Maybe CommandPayload)}
-  deriving (Eq, Ord, Read, Show)
-
-_Command = Core.Name "hydra.azure.dtld.Command"
-
-_Command_type = Core.Name "type"
-
-_Command_name = Core.Name "name"
-
-_Command_id = Core.Name "id"
-
-_Command_comment = Core.Name "comment"
-
-_Command_description = Core.Name "description"
-
-_Command_displayName = Core.Name "displayName"
-
-_Command_commandType = Core.Name "commandType"
-
-_Command_request = Core.Name "request"
-
-_Command_response = Core.Name "response"
-
--- | A CommandPayload describes the inputs to or the outputs from a Command.
-data CommandPayload =
-  CommandPayload {
-    -- | The 'programming' name of the payload. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    commandPayloadName :: String,
-    -- | The data type of the payload
-    commandPayloadSchema :: Schema,
-    -- | The ID of the payload. If no @id is provided, the digital twin interface processor will assign one.
-    commandPayloadId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    commandPayloadComment :: (Maybe String),
-    -- | A localizable description for display
-    commandPayloadDescription :: (Maybe String),
-    -- | A localizable name for display
-    commandPayloadDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_CommandPayload = Core.Name "hydra.azure.dtld.CommandPayload"
-
-_CommandPayload_name = Core.Name "name"
-
-_CommandPayload_schema = Core.Name "schema"
-
-_CommandPayload_id = Core.Name "id"
-
-_CommandPayload_comment = Core.Name "comment"
-
-_CommandPayload_description = Core.Name "description"
-
-_CommandPayload_displayName = Core.Name "displayName"
-
--- | CommandType is deprecated. Either value, synchronous or asynchronous, has the same meaning: a command that starts execution within a configurable time and that completes execution within a configurable time.
-data CommandType =
-  CommandTypeSynchronous  |
-  CommandTypeAsynchronous
-  deriving (Eq, Ord, Read, Show)
-
-_CommandType = Core.Name "hydra.azure.dtld.CommandType"
-
-_CommandType_synchronous = Core.Name "synchronous"
-
-_CommandType_asynchronous = Core.Name "asynchronous"
-
--- | Components enable interfaces to be composed of other interfaces. Components are different from relationships because they describe contents that are directly part of the interface. (A relationship describes a link between two interfaces.)
-data Component =
-  Component {
-    -- | This must be 'Component'
-    componentType :: Iri,
-    -- | The 'programming' name of the component. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    componentName :: String,
-    -- | The data type of the component
-    componentSchema :: Interface,
-    -- | The ID of the component. If no @id is provided, the digital twin interface processor will assign one.
-    componentId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    componentComment :: (Maybe String),
-    -- | A localizable description for display
-    componentDescription :: (Maybe String),
-    -- | A localizable name for display
-    componentDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Component = Core.Name "hydra.azure.dtld.Component"
-
-_Component_type = Core.Name "type"
-
-_Component_name = Core.Name "name"
-
-_Component_schema = Core.Name "schema"
-
-_Component_id = Core.Name "id"
-
-_Component_comment = Core.Name "comment"
-
-_Component_description = Core.Name "description"
-
-_Component_displayName = Core.Name "displayName"
-
--- | A digital twin model identifier
-newtype Dtmi =
-  Dtmi {
-    unDtmi :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Dtmi = Core.Name "hydra.azure.dtld.Dtmi"
-
--- | An EnumValue describes an element of an Enum.
-data EnumValue =
-  EnumValue {
-    -- | The 'programming' name of the enum value. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    enumValueName :: String,
-    -- | The on-the-wire value that maps to the EnumValue. EnumValue may be either an integer or a string and must be unique for all enum values in this enum.
-    enumValueEnumValue :: IntegerOrString,
-    -- | The ID of the enum value. If no @id is provided, the digital twin interface processor will assign one.
-    enumValueId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    enumValueComment :: (Maybe String),
-    -- | A localizable description for display
-    enumValueDescription :: (Maybe String),
-    -- | A localizable name for display
-    enumValueDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumValue = Core.Name "hydra.azure.dtld.EnumValue"
-
-_EnumValue_name = Core.Name "name"
-
-_EnumValue_enumValue = Core.Name "enumValue"
-
-_EnumValue_id = Core.Name "id"
-
-_EnumValue_comment = Core.Name "comment"
-
-_EnumValue_description = Core.Name "description"
-
-_EnumValue_displayName = Core.Name "displayName"
-
--- | A Field describes a field in an Object.
-data Field =
-  Field {
-    -- | The 'programming' name of the field. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    fieldName :: String,
-    -- | The data type of the field
-    fieldSchema :: Schema,
-    -- | The ID of the field. If no @id is provided, the digital twin interface processor will assign one.
-    fieldId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    fieldComment :: (Maybe String),
-    -- | A localizable description for display
-    fieldDescription :: (Maybe String),
-    -- | A localizable name for display
-    fieldDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Field = Core.Name "hydra.azure.dtld.Field"
-
-_Field_name = Core.Name "name"
-
-_Field_schema = Core.Name "schema"
-
-_Field_id = Core.Name "id"
-
-_Field_comment = Core.Name "comment"
-
-_Field_description = Core.Name "description"
-
-_Field_displayName = Core.Name "displayName"
-
-data IntegerOrString =
-  IntegerOrStringInteger Int |
-  IntegerOrStringString String
-  deriving (Eq, Ord, Read, Show)
-
-_IntegerOrString = Core.Name "hydra.azure.dtld.IntegerOrString"
-
-_IntegerOrString_integer = Core.Name "integer"
-
-_IntegerOrString_string = Core.Name "string"
-
-data Interface =
-  Interface {
-    -- | A digital twin model identifier for the interface
-    interfaceId :: Dtmi,
-    -- | This must be 'Interface'
-    interfaceType :: Iri,
-    -- | The context to use when processing this interface. For this version, it must be set to 'dtmi:dtdl:context;2'
-    interfaceContext :: Iri,
-    -- | A comment for model authors
-    interfaceComment :: (Maybe String),
-    -- | A set of objects that define the contents (Telemetry, Properties, Commands, Relationships, and/or Components) of this interface
-    interfaceContents :: (Maybe (S.Set Interface_Contents)),
-    -- | A localizable description for display
-    interfaceDescription :: (Maybe String),
-    -- | A localizable name for display
-    interfaceDisplayName :: (Maybe String),
-    -- | A set of DTMIs that refer to interfaces this interface inherits from. Interfaces can inherit from multiple interfaces.
-    interfaceExtends :: (Maybe (S.Set Interface)),
-    -- | A set of IRIs or objects that refer to the reusable schemas within this interface.
-    interfaceSchemas :: (Maybe (S.Set Schema_Interface))}
-  deriving (Eq, Ord, Read, Show)
-
-_Interface = Core.Name "hydra.azure.dtld.Interface"
-
-_Interface_id = Core.Name "id"
-
-_Interface_type = Core.Name "type"
-
-_Interface_context = Core.Name "context"
-
-_Interface_comment = Core.Name "comment"
-
-_Interface_contents = Core.Name "contents"
-
-_Interface_description = Core.Name "description"
-
-_Interface_displayName = Core.Name "displayName"
-
-_Interface_extends = Core.Name "extends"
-
-_Interface_schemas = Core.Name "schemas"
-
-data Interface_Contents =
-  Interface_ContentsCommand Command |
-  Interface_ContentsComponent Component |
-  Interface_ContentsProperty Property |
-  Interface_ContentsRelationship Relationship |
-  Interface_ContentsTelemetry Telemetry
-  deriving (Eq, Ord, Read, Show)
-
-_Interface_Contents = Core.Name "hydra.azure.dtld.Interface_Contents"
-
-_Interface_Contents_command = Core.Name "command"
-
-_Interface_Contents_component = Core.Name "component"
-
-_Interface_Contents_property = Core.Name "property"
-
-_Interface_Contents_relationship = Core.Name "relationship"
-
-_Interface_Contents_telemetry = Core.Name "telemetry"
-
-newtype Iri =
-  Iri {
-    unIri :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Iri = Core.Name "hydra.azure.dtld.Iri"
-
--- | A MapKey describes the key in a Map. The schema of a MapKey must be string.
-data MapKey =
-  MapKey {
-    -- | The 'programming' name of the map's key. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    mapKeyName :: String,
-    -- | The data type of the map's key
-    mapKeySchema :: Schema,
-    -- | The ID of the map key. If no @id is provided, the digital twin interface processor will assign one.
-    mapKeyId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    mapKeyComment :: (Maybe String),
-    -- | A localizable description for display
-    mapKeyDescription :: (Maybe String),
-    -- | A localizable name for display
-    mapKeyDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_MapKey = Core.Name "hydra.azure.dtld.MapKey"
-
-_MapKey_name = Core.Name "name"
-
-_MapKey_schema = Core.Name "schema"
-
-_MapKey_id = Core.Name "id"
-
-_MapKey_comment = Core.Name "comment"
-
-_MapKey_description = Core.Name "description"
-
-_MapKey_displayName = Core.Name "displayName"
-
--- | A MapValue describes the values in a Map.
-data MapValue =
-  MapValue {
-    -- | The 'programming' name of the map's value. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    mapValueName :: String,
-    -- | The data type of the map's values
-    mapValueSchema :: Schema,
-    -- | The ID of the map value. If no @id is provided, the digital twin interface processor will assign one.
-    mapValueId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    mapValueComment :: (Maybe String),
-    -- | A localizable description for display
-    mapValueDescription :: (Maybe String),
-    -- | A localizable name for display
-    mapValueDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_MapValue = Core.Name "hydra.azure.dtld.MapValue"
-
-_MapValue_name = Core.Name "name"
-
-_MapValue_schema = Core.Name "schema"
-
-_MapValue_id = Core.Name "id"
-
-_MapValue_comment = Core.Name "comment"
-
-_MapValue_description = Core.Name "description"
-
-_MapValue_displayName = Core.Name "displayName"
-
--- | A Property describes the read-only and read/write state of any digital twin. For example, a device serial number may be a read-only property, the desired temperature on a thermostat may be a read-write property; and the name of a room may be a read-write property.
-data Property =
-  Property {
-    -- | This must at least be 'Property'. It can also include a semantic type.
-    propertyType :: Iri,
-    -- | The 'programming' name of the property. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$..
-    propertyName :: String,
-    -- | The data type of the Property
-    propertySchema :: Schema,
-    -- | The ID of the property. If no @id is provided, the digital twin interface processor will assign one.
-    propertyId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    propertyComment :: (Maybe String),
-    -- | A localizable description for display
-    propertyDescription :: (Maybe String),
-    -- | A localizable name for display
-    propertyDisplayName :: (Maybe String),
-    -- | The unit type of the property. A semantic type is required for the unit property to be available.
-    propertyUnit :: (Maybe Unit),
-    -- | A boolean value that indicates whether the property is writable by an external source, such as an application, or not. The default value is false (read-only).
-    propertyWritable :: (Maybe Bool)}
-  deriving (Eq, Ord, Read, Show)
-
-_Property = Core.Name "hydra.azure.dtld.Property"
-
-_Property_type = Core.Name "type"
-
-_Property_name = Core.Name "name"
-
-_Property_schema = Core.Name "schema"
-
-_Property_id = Core.Name "id"
-
-_Property_comment = Core.Name "comment"
-
-_Property_description = Core.Name "description"
-
-_Property_displayName = Core.Name "displayName"
-
-_Property_unit = Core.Name "unit"
-
-_Property_writable = Core.Name "writable"
-
--- | A Relationship describes a link to another digital twin and enables graphs of digital twins to be created. Relationships are different from Components because they describe a link to a separate digital twin.
-data Relationship =
-  Relationship {
-    -- | This must be 'Relationship'
-    relationshipType :: Iri,
-    -- | The 'programming' name of the relationship. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.
-    relationshipName :: String,
-    -- | The ID of the relationship description. If no @id is provided, the digital twin interface processor will assign one.
-    relationshipId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    relationshipComment :: (Maybe String),
-    -- | A localizable description for display
-    relationshipDescription :: (Maybe String),
-    -- | A localizable name for display
-    relationshipDisplayName :: (Maybe String),
-    -- | The maximum multiplicity for the target of the relationship. The default value is infinite (there may be an unlimited number of relationship instances for this relationship).
-    relationshipMaxMultiplicity :: (Maybe Int),
-    -- | The minimum multiplicity for the target of the relationship. The default value is 0 (this relationship is permitted to have no instances). In DTDL v2, minMultiplicity must always be 0.
-    relationshipMinMultiplicity :: (Maybe Int),
-    -- | A set of Properties that define relationship-specific state
-    relationshipProperties :: (Maybe (S.Set Property)),
-    -- | An interface ID. The default value (when target is not specified) is that the target may be any interface.
-    relationshipTarget :: (Maybe Interface),
-    -- | A boolean value that indicates whether the relationship is writable by an external source, such as an application, or not. The default value is false (read-only).
-    relationshipWritable :: (Maybe Bool)}
-  deriving (Eq, Ord, Read, Show)
-
-_Relationship = Core.Name "hydra.azure.dtld.Relationship"
-
-_Relationship_type = Core.Name "type"
-
-_Relationship_name = Core.Name "name"
-
-_Relationship_id = Core.Name "id"
-
-_Relationship_comment = Core.Name "comment"
-
-_Relationship_description = Core.Name "description"
-
-_Relationship_displayName = Core.Name "displayName"
-
-_Relationship_maxMultiplicity = Core.Name "maxMultiplicity"
-
-_Relationship_minMultiplicity = Core.Name "minMultiplicity"
-
-_Relationship_properties = Core.Name "properties"
-
-_Relationship_target = Core.Name "target"
-
-_Relationship_writable = Core.Name "writable"
-
--- | Schemas are used to describe the on-the-wire or serialized format of the data in a digital twin interface. A full set of primitive data types are provided, along with support for a variety of complex schemas in the forms of Arrays, Enums, Maps, and Objects. Schemas described through digital twin's schema definition language are compatible with popular serialization formats, including JSON, Avro, and Protobuf.
-data Schema =
-  SchemaPrimitive Schema_Primitive |
-  SchemaComplex Schema_Complex
-  deriving (Eq, Ord, Read, Show)
-
-_Schema = Core.Name "hydra.azure.dtld.Schema"
-
-_Schema_primitive = Core.Name "primitive"
-
-_Schema_complex = Core.Name "complex"
-
--- | An Array describes an indexable data type where each element is of the same schema. An Array elements' schema can itself be a primitive or complex schema.
-data Schema_Array =
-  Schema_Array {
-    -- | This must be 'Array'
-    schema_ArrayType :: Iri,
-    -- | The data type of the array elements
-    schema_ArrayElementSchema :: Schema,
-    -- | The ID of the array. If no @id is provided, the digital twin interface processor will assign one.
-    schema_ArrayId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    schema_ArrayComment :: (Maybe String),
-    -- | A localizable description for display
-    schema_ArrayDescription :: (Maybe String),
-    -- | A localizable name for display
-    schema_ArrayDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Array = Core.Name "hydra.azure.dtld.Schema_Array"
-
-_Schema_Array_type = Core.Name "type"
-
-_Schema_Array_elementSchema = Core.Name "elementSchema"
-
-_Schema_Array_id = Core.Name "id"
-
-_Schema_Array_comment = Core.Name "comment"
-
-_Schema_Array_description = Core.Name "description"
-
-_Schema_Array_displayName = Core.Name "displayName"
-
--- | Complex schemas are designed for supporting complex data types made up of primitive data types. Currently the following complex schemas are provided: Array, Enum, Map, and Object. A complex schema can be specified directly as the value in a schema statement or described in the interface schemas set and referenced in the schema statement.
-data Schema_Complex =
-  Schema_ComplexArray Schema_Array |
-  Schema_ComplexEnum Schema_Enum |
-  Schema_ComplexMap Schema_Map |
-  Schema_ComplexObject Schema_Object
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Complex = Core.Name "hydra.azure.dtld.Schema_Complex"
-
-_Schema_Complex_array = Core.Name "array"
-
-_Schema_Complex_enum = Core.Name "enum"
-
-_Schema_Complex_map = Core.Name "map"
-
-_Schema_Complex_object = Core.Name "object"
-
--- | An Enum describes a data type with a set of named labels that map to values. The values in an Enum can be either integers or strings, but the labels are always strings.
-data Schema_Enum =
-  Schema_Enum {
-    -- | Enum
-    schema_EnumType :: Iri,
-    -- | A set of enum value and label mappings
-    schema_EnumEnumValues :: [EnumValue],
-    -- | The data type for the enum values. All enum values must be of the same type.
-    schema_EnumValueSchema :: IntegerOrString,
-    -- | The ID of the enum. If no @id is provided, the digital twin interface processor will assign one.
-    schema_EnumId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    schema_EnumComment :: (Maybe String),
-    -- | A localizable description for display
-    schema_EnumDescription :: (Maybe String),
-    -- | A localizable name for display
-    schema_EnumDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Enum = Core.Name "hydra.azure.dtld.Schema_Enum"
-
-_Schema_Enum_type = Core.Name "type"
-
-_Schema_Enum_enumValues = Core.Name "enumValues"
-
-_Schema_Enum_valueSchema = Core.Name "valueSchema"
-
-_Schema_Enum_id = Core.Name "id"
-
-_Schema_Enum_comment = Core.Name "comment"
-
-_Schema_Enum_description = Core.Name "description"
-
-_Schema_Enum_displayName = Core.Name "displayName"
-
--- | Within an interface definition, complex schemas may be defined for reusability across Telemetry, Properties, and Commands. This is designed to promote readability and improved maintenance because schemas that are reused can be defined once (per interface). Interface schemas are defined in the schemas property of an interface.
-data Schema_Interface =
-  Schema_Interface {
-    -- | The globally unique identifier for the schema
-    schema_InterfaceId :: Dtmi,
-    -- | The type of complex schema. This must refer to one of the complex schema classes (Array, Enum, Map, or Object).
-    schema_InterfaceType :: Schema_Interface_Type,
-    -- | A comment for model authors
-    schema_InterfaceComment :: (Maybe String),
-    -- | A localizable description for display
-    schema_InterfaceDescription :: (Maybe String),
-    -- | A localizable name for display
-    schema_InterfaceDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Interface = Core.Name "hydra.azure.dtld.Schema_Interface"
-
-_Schema_Interface_id = Core.Name "id"
-
-_Schema_Interface_type = Core.Name "type"
-
-_Schema_Interface_comment = Core.Name "comment"
-
-_Schema_Interface_description = Core.Name "description"
-
-_Schema_Interface_displayName = Core.Name "displayName"
-
-data Schema_Interface_Type =
-  Schema_Interface_TypeArray Schema_Array |
-  Schema_Interface_TypeEnum Schema_Enum |
-  Schema_Interface_TypeMap Schema_Map |
-  Schema_Interface_TypeObject Schema_Object
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Interface_Type = Core.Name "hydra.azure.dtld.Schema_Interface_Type"
-
-_Schema_Interface_Type_array = Core.Name "array"
-
-_Schema_Interface_Type_enum = Core.Name "enum"
-
-_Schema_Interface_Type_map = Core.Name "map"
-
-_Schema_Interface_Type_object = Core.Name "object"
-
--- | A Map describes a data type of key-value pairs where the values share the same schema. The key in a Map must be a string. The values in a Map can be any schema.
-data Schema_Map =
-  Schema_Map {
-    -- | Map
-    schema_MapType :: Iri,
-    -- | A description of the keys in the map
-    schema_MapMapKey :: MapKey,
-    -- | A description of the values in the map
-    schema_MapMapValue :: MapValue,
-    -- | The ID of the map. If no @id is provided, the digital twin interface processor will assign one.
-    schema_MapId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    schema_MapComment :: (Maybe String),
-    -- | A localizable description for display
-    schema_MapDescription :: (Maybe String),
-    -- | A localizable name for display
-    schema_MapDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Map = Core.Name "hydra.azure.dtld.Schema_Map"
-
-_Schema_Map_type = Core.Name "type"
-
-_Schema_Map_mapKey = Core.Name "mapKey"
-
-_Schema_Map_mapValue = Core.Name "mapValue"
-
-_Schema_Map_id = Core.Name "id"
-
-_Schema_Map_comment = Core.Name "comment"
-
-_Schema_Map_description = Core.Name "description"
-
-_Schema_Map_displayName = Core.Name "displayName"
-
--- | An Object describes a data type made up of named fields (like a struct in C). The fields in an Object map can be primitive or complex schemas.
-data Schema_Object =
-  Schema_Object {
-    -- | Object
-    schema_ObjectType :: Iri,
-    -- | A set of field descriptions, one for each field in the Object
-    schema_ObjectFields :: (S.Set Field),
-    -- | The ID of the object. If no @id is provided, the digital twin interface processor will assign one.
-    schema_ObjectId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    schema_ObjectComment :: (Maybe String),
-    -- | A localizable description for display
-    schema_ObjectDescription :: (Maybe String),
-    -- | A localizable name for display
-    schema_ObjectDisplayName :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Object = Core.Name "hydra.azure.dtld.Schema_Object"
-
-_Schema_Object_type = Core.Name "type"
-
-_Schema_Object_fields = Core.Name "fields"
-
-_Schema_Object_id = Core.Name "id"
-
-_Schema_Object_comment = Core.Name "comment"
-
-_Schema_Object_description = Core.Name "description"
-
-_Schema_Object_displayName = Core.Name "displayName"
-
--- | A full set of primitive data types are provided and can be specified directly as the value in a schema statement in a digital twin interface.
-data Schema_Primitive =
-  -- | A boolean value
-  Schema_PrimitiveBoolean  |
-  -- | A full-date as defined in section 5.6 of RFC 3339
-  Schema_PrimitiveDate  |
-  -- | A date-time as defined in RFC 3339
-  Schema_PrimitiveDateTime  |
-  -- | An IEEE 8-byte floating point
-  Schema_PrimitiveDouble  |
-  -- | A duration in ISO 8601 format
-  Schema_PrimitiveDuration  |
-  -- | An IEEE 4-byte floating point
-  Schema_PrimitiveFloat  |
-  -- | A signed 4-byte integer
-  Schema_PrimitiveInteger  |
-  -- | A signed 8-byte integer
-  Schema_PrimitiveLong  |
-  -- | A UTF8 string
-  Schema_PrimitiveString  |
-  -- | A full-time as defined in section 5.6 of RFC 3339
-  Schema_PrimitiveTime
-  deriving (Eq, Ord, Read, Show)
-
-_Schema_Primitive = Core.Name "hydra.azure.dtld.Schema_Primitive"
-
-_Schema_Primitive_boolean = Core.Name "boolean"
-
-_Schema_Primitive_date = Core.Name "date"
-
-_Schema_Primitive_dateTime = Core.Name "dateTime"
-
-_Schema_Primitive_double = Core.Name "double"
-
-_Schema_Primitive_duration = Core.Name "duration"
-
-_Schema_Primitive_float = Core.Name "float"
-
-_Schema_Primitive_integer = Core.Name "integer"
-
-_Schema_Primitive_long = Core.Name "long"
-
-_Schema_Primitive_string = Core.Name "string"
-
-_Schema_Primitive_time = Core.Name "time"
-
--- | Telemetry describes the data emitted by any digital twin, whether the data is a regular stream of sensor readings or a computed stream of data, such as occupancy, or an occasional error or information message.
-data Telemetry =
-  Telemetry {
-    -- | This must be at least 'Telemetry'. It can also include a semantic type
-    telemetryType :: Iri,
-    -- | The 'programming' name of the telemetry. The name may only contain the characters a-z, A-Z, 0-9, and underscore, and must match this regular expression ^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$..
-    telemetryName :: String,
-    -- | The data type of the Telemetry
-    telemetrySchema :: Schema,
-    -- | The ID of the telemetry. If no @id is provided, the digital twin interface processor will assign one.
-    telemetryId :: (Maybe Dtmi),
-    -- | A comment for model authors
-    telemetryComment :: (Maybe String),
-    -- | A localizable description for display
-    telemetryDescription :: (Maybe String),
-    -- | A localizable name for display
-    telemetryDisplayName :: (Maybe String),
-    -- | The unit type of the Telemetry. A semantic type is required for the unit property to be available.
-    telemetryUnit :: (Maybe Unit)}
-  deriving (Eq, Ord, Read, Show)
-
-_Telemetry = Core.Name "hydra.azure.dtld.Telemetry"
-
-_Telemetry_type = Core.Name "type"
-
-_Telemetry_name = Core.Name "name"
-
-_Telemetry_schema = Core.Name "schema"
-
-_Telemetry_id = Core.Name "id"
-
-_Telemetry_comment = Core.Name "comment"
-
-_Telemetry_description = Core.Name "description"
-
-_Telemetry_displayName = Core.Name "displayName"
-
-_Telemetry_unit = Core.Name "unit"
-
-newtype Unit =
-  Unit {
-    unUnit :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_Unit = Core.Name "hydra.azure.dtld.Unit"
diff --git a/src/main/haskell/Hydra/Checking.hs b/src/main/haskell/Hydra/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Checking.hs
+++ /dev/null
@@ -1,660 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type checking and type reconstruction (type-of) for the results of Hydra unification and inference
-
-module Hydra.Checking where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Reflect as Reflect
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Substitution as Substitution
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Variables as Variables
-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
-allEqual :: Eq t0 => ([t0] -> Bool)
-allEqual els =
-    Maybes.maybe True (\uc ->
-      let h = Pairs.first uc
-          t = Pairs.second uc
-      in (Lists.foldl (\b -> \x -> Logic.and b (Equality.equal x h)) True t)) (Lists.uncons els)
--- | Apply type arguments to a type, substituting forall-bound variables
-applyTypeArgumentsToType :: t0 -> Graph.Graph -> [Core.Type] -> Core.Type -> Either Errors.Error Core.Type
-applyTypeArgumentsToType cx tx typeArgs t =
-    Maybes.maybe (Right t) (\uc ->
-      let ah = Pairs.first uc
-          at = Pairs.second uc
-      in case t of
-        Core.TypeForall v0 ->
-          let v = Core.forallTypeParameter v0
-              tbody = Core.forallTypeBody v0
-          in (applyTypeArgumentsToType cx tx at (Substitution.substInType (Typing.TypeSubst (Maps.singleton v ah)) tbody))
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "forall type",
-          Errors.unexpectedShapeErrorActual = (Strings.cat [
-            ShowCore.type_ t,
-            ". Trying to apply ",
-            (Literals.showInt32 (Lists.length typeArgs)),
-            " type args: ",
-            (Formatting.showList ShowCore.type_ typeArgs),
-            ". Context has vars: {",
-            (Strings.intercalate ", " (Lists.map Core.unName (Maps.keys (Graph.graphBoundTypes tx)))),
-            "}"])})))) (Lists.uncons typeArgs)
--- | Check that a term has no unbound type variables (Either version)
-checkForUnboundTypeVariables :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error ()
-checkForUnboundTypeVariables cx tx term0 =
-
-      let svars = Sets.fromList (Maps.keys (Graph.graphSchemaTypes tx))
-          checkRecursive =
-                  \vars -> \trace -> \lbinding -> \term ->
-                    let recurse = checkRecursive vars trace lbinding
-                        dflt = Eithers.bind (Eithers.mapList recurse (Rewriting.subterms term)) (\_ -> Right ())
-                        check =
-                                \typ ->
-                                  let freevars = Variables.freeVariablesInType typ
-                                      badvars = Sets.difference (Sets.difference freevars vars) svars
-                                  in (Logic.ifElse (Sets.null badvars) (Right ()) (Left (Errors.ErrorChecking (Checking.CheckingErrorUnboundTypeVariables (Checking.UnboundTypeVariablesError {
-                                    Checking.unboundTypeVariablesErrorVariables = badvars,
-                                    Checking.unboundTypeVariablesErrorType = typ})))))
-                        checkOptional = \m -> Eithers.bind (Eithers.mapMaybe check m) (\_ -> Right ())
-                    in case term of
-                      Core.TermLambda v0 -> Eithers.bind (checkOptional (Core.lambdaDomain v0)) (\_ -> recurse (Core.lambdaBody v0))
-                      Core.TermLet v0 ->
-                        let forBinding =
-                                \b ->
-                                  let bterm = Core.bindingTerm b
-                                      newVars =
-                                              Maybes.maybe vars (\ts -> Sets.union vars (Sets.fromList (Core.typeSchemeVariables ts))) (Core.bindingTypeScheme b)
-                                      newTrace = Lists.cons (Core.unName (Core.bindingName b)) trace
-                                  in (checkRecursive newVars newTrace (Just b) bterm)
-                        in (Eithers.bind (Eithers.mapList forBinding (Core.letBindings v0)) (\_ -> recurse (Core.letBody v0)))
-                      Core.TermTypeApplication v0 -> Eithers.bind (check (Core.typeApplicationTermType v0)) (\_ -> recurse (Core.typeApplicationTermBody v0))
-                      Core.TermTypeLambda v0 -> Eithers.bind (check (Core.TypeVariable (Core.typeLambdaParameter v0))) (\_ -> recurse (Core.typeLambdaBody v0))
-                      _ -> dflt
-      in (checkRecursive Sets.empty [
-        "top level"] Nothing term0)
--- | Check that a nominal type is applied to the correct number of type arguments (Either version)
-checkNominalApplication :: Context.Context -> Graph.Graph -> Core.Name -> [Core.Type] -> Either Errors.Error ((), Context.Context)
-checkNominalApplication cx tx tname typeArgs =
-    Eithers.bind (Resolution.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\result ->
-      let schemaType = Pairs.first result
-          cx2 = Pairs.second result
-          vars = Core.typeSchemeVariables schemaType
-          varslen = Lists.length vars
-          argslen = Lists.length typeArgs
-      in (Logic.ifElse (Equality.equal varslen argslen) (Right ((), cx2)) (Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-        Checking.typeArityMismatchErrorType = (Core.TypeVariable tname),
-        Checking.typeArityMismatchErrorExpectedArity = varslen,
-        Checking.typeArityMismatchErrorActualArity = argslen,
-        Checking.typeArityMismatchErrorTypeArguments = typeArgs}))))))
--- | Ensure all types in a list are equal and return the common type
-checkSameType :: t0 -> Graph.Graph -> String -> [Core.Type] -> Either Errors.Error Core.Type
-checkSameType cx tx desc types =
-
-      let unequalErr =
-              Left (Errors.ErrorChecking (Checking.CheckingErrorUnequalTypes (Checking.UnequalTypesError {
-                Checking.unequalTypesErrorTypes = types,
-                Checking.unequalTypesErrorDescription = desc})))
-      in (Logic.ifElse (typesAllEffectivelyEqual tx types) (Maybes.maybe unequalErr (\t -> Right t) (Lists.maybeHead types)) unequalErr)
--- | Check that a term has the expected type
-checkType :: Context.Context -> Graph.Graph -> Core.Term -> Core.Type -> Either Errors.Error ()
-checkType cx tx term typ =
-
-      let vars = Graph.graphTypeVariables tx
-      in (Logic.ifElse Constants.debugInference (Eithers.bind (Eithers.map (\_p -> Pairs.first _p) (typeOf cx tx [] term)) (\t0 -> Logic.ifElse (typesEffectivelyEqual tx t0 typ) (Right ()) (Left (Errors.ErrorChecking (Checking.CheckingErrorTypeMismatch (Checking.TypeMismatchError {
-        Checking.typeMismatchErrorExpectedType = typ,
-        Checking.typeMismatchErrorActualType = t0})))))) (Right ()))
--- | Sanity-check a type substitution arising from unification. Specifically, check that schema types have not been inappropriately unified with type variables inferred from terms.
-checkTypeSubst :: t0 -> Graph.Graph -> Typing.TypeSubst -> Either Errors.Error Typing.TypeSubst
-checkTypeSubst cx tx subst =
-
-      let s = Typing.unTypeSubst subst
-          vars = Sets.fromList (Maps.keys s)
-          suspectVars = Sets.intersection vars (Sets.fromList (Maps.keys (Graph.graphSchemaTypes tx)))
-          isNominal =
-                  \ts -> case (Strip.deannotateType (Core.typeSchemeBody ts)) of
-                    Core.TypeRecord _ -> True
-                    Core.TypeUnion _ -> True
-                    Core.TypeWrap _ -> True
-                    _ -> False
-          badVars =
-                  Sets.fromList (Lists.filter (\v -> Maybes.maybe False isNominal (Lexical.dereferenceSchemaType v (Graph.graphSchemaTypes tx))) (Sets.toList suspectVars))
-          badPairs = Lists.filter (\p -> Sets.member (Pairs.first p) badVars) (Maps.toList s)
-          printPair = \p -> Strings.cat2 (Strings.cat2 (Core.unName (Pairs.first p)) " --> ") (ShowCore.type_ (Pairs.second p))
-      in (Logic.ifElse (Sets.null badVars) (Right subst) (Left (Errors.ErrorChecking (Checking.CheckingErrorIncorrectUnification (Checking.IncorrectUnificationError {
-        Checking.incorrectUnificationErrorSubstitution = subst})))))
--- | Check that all type variables in a type are bound. NOTE: This check is currently disabled to allow phantom type variables from polymorphic instantiation to pass through. The proper fix is to ensure `typeOf` doesn't create fresh variables for post-inference code.
-checkTypeVariables :: t0 -> t1 -> ()
-checkTypeVariables _tx _typ = ()
--- | Check if a type contains any type variable from the current scope
-containsInScopeTypeVars :: Graph.Graph -> Core.Type -> Bool
-containsInScopeTypeVars tx t =
-
-      let vars = Graph.graphTypeVariables tx
-          freeVars = Variables.freeVariablesInTypeSimple t
-      in (Logic.not (Sets.null (Sets.intersection vars freeVars)))
--- | Normalize free type variables in a type to canonical names based on order of first occurrence. This allows comparing types that differ only in the naming of free type variables.
-normalizeTypeFreeVars :: Core.Type -> Core.Type
-normalizeTypeFreeVars typ =
-
-      let collectVars =
-              \acc -> \t -> case t of
-                Core.TypeVariable v0 -> Logic.ifElse (Maps.member v0 acc) acc (Maps.insert v0 (Core.Name (Strings.cat2 "_tv" (Literals.showInt32 (Maps.size acc)))) acc)
-                _ -> acc
-          subst = Rewriting.foldOverType Coders.TraversalOrderPre collectVars Maps.empty typ
-      in (Variables.substituteTypeVariables subst typ)
--- | Get the bound types from a graph as a type environment
-toFContext :: Graph.Graph -> M.Map Core.Name Core.Type
-toFContext cx = Maps.map Scoping.typeSchemeToFType (Graph.graphBoundTypes cx)
--- | Check whether two lists of types are effectively equal, disregarding type aliases
-typeListsEffectivelyEqual :: Graph.Graph -> [Core.Type] -> [Core.Type] -> Bool
-typeListsEffectivelyEqual tx tlist1 tlist2 =
-    Logic.ifElse (Equality.equal (Lists.length tlist1) (Lists.length tlist2)) (Lists.foldl Logic.and True (Lists.zipWith (typesEffectivelyEqual tx) tlist1 tlist2)) False
--- | Given a type context, reconstruct the type of a System F term
-typeOf :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Term -> Either Errors.Error (Core.Type, Context.Context)
-typeOf cx tx typeArgs term =
-
-      let cx1 =
-              Context.Context {
-                Context.contextTrace = (Lists.cons "typeOf" (Context.contextTrace cx)),
-                Context.contextMessages = (Context.contextMessages cx),
-                Context.contextOther = (Context.contextOther cx)}
-      in case term of
-        Core.TermAnnotated v0 -> typeOfAnnotatedTerm cx1 tx typeArgs v0
-        Core.TermApplication v0 -> typeOfApplication cx1 tx typeArgs v0
-        Core.TermCases v0 -> typeOfCaseStatement cx1 tx typeArgs v0
-        Core.TermEither v0 -> typeOfEither cx1 tx typeArgs v0
-        Core.TermLambda v0 -> typeOfLambda cx1 tx typeArgs v0
-        Core.TermLet v0 -> typeOfLet cx1 tx typeArgs v0
-        Core.TermList v0 -> typeOfList cx1 tx typeArgs v0
-        Core.TermLiteral v0 -> typeOfLiteral cx1 tx typeArgs v0
-        Core.TermMap v0 -> typeOfMap cx1 tx typeArgs v0
-        Core.TermMaybe v0 -> typeOfMaybe cx1 tx typeArgs v0
-        Core.TermPair v0 -> typeOfPair cx1 tx typeArgs v0
-        Core.TermProject v0 -> typeOfProjection cx1 tx typeArgs v0
-        Core.TermRecord v0 -> typeOfRecord cx1 tx typeArgs v0
-        Core.TermSet v0 -> typeOfSet cx1 tx typeArgs v0
-        Core.TermTypeApplication v0 -> typeOfTypeApplication cx1 tx typeArgs v0
-        Core.TermTypeLambda v0 -> typeOfTypeLambda cx1 tx typeArgs v0
-        Core.TermInject v0 -> typeOfInjection cx1 tx typeArgs v0
-        Core.TermUnit -> typeOfUnit cx1 tx typeArgs
-        Core.TermUnwrap v0 -> typeOfUnwrap cx1 tx typeArgs v0
-        Core.TermVariable v0 -> typeOfVariable cx1 tx typeArgs v0
-        Core.TermWrap v0 -> typeOfWrappedTerm cx1 tx typeArgs v0
-        _ -> Left (Errors.ErrorChecking (Checking.CheckingErrorUnsupportedTermVariant (Checking.UnsupportedTermVariantError {
-          Checking.unsupportedTermVariantErrorTermVariant = (Reflect.termVariant term)})))
--- | Reconstruct the type of an annotated term (Either/Context version)
-typeOfAnnotatedTerm :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.AnnotatedTerm -> Either Errors.Error (Core.Type, Context.Context)
-typeOfAnnotatedTerm cx tx typeArgs at = typeOf cx tx typeArgs (Core.annotatedTermBody at)
--- | Reconstruct the type of an application term (Either/Context version)
-typeOfApplication :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Application -> Either Errors.Error (Core.Type, Context.Context)
-typeOfApplication cx tx typeArgs app =
-
-      let fun = Core.applicationFunction app
-          arg = Core.applicationArgument app
-          tryType =
-                  \cx0 -> \tfun -> \targ -> case tfun of
-                    Core.TypeForall v0 -> tryType cx0 (Core.forallTypeBody v0) targ
-                    Core.TypeFunction v0 ->
-                      let dom = Core.functionTypeDomain v0
-                          cod = Core.functionTypeCodomain v0
-                      in (Logic.ifElse (typesEffectivelyEqual tx dom targ) (Right (cod, cx0)) (Left (Errors.ErrorChecking (Checking.CheckingErrorTypeMismatch (Checking.TypeMismatchError {
-                        Checking.typeMismatchErrorExpectedType = dom,
-                        Checking.typeMismatchErrorActualType = targ})))))
-                    Core.TypeVariable _ ->
-                      let nameResult = Names.freshName cx0
-                          freshN = Pairs.first nameResult
-                          cx1 = Pairs.second nameResult
-                      in (Right (Core.TypeVariable freshN, cx1))
-                    _ -> Left (Errors.ErrorChecking (Checking.CheckingErrorNotAFunctionType (Checking.NotAFunctionTypeError {
-                      Checking.notAFunctionTypeErrorType = tfun})))
-      in (Eithers.bind (typeOf cx tx [] fun) (\result1 ->
-        let tfun = Pairs.first result1
-            cx2 = Pairs.second result1
-        in (Eithers.bind (typeOf cx2 tx [] arg) (\result2 ->
-          let targ = Pairs.first result2
-              cx3 = Pairs.second result2
-          in (Eithers.bind (tryType cx3 tfun targ) (\result3 ->
-            let t = Pairs.first result3
-                cx4 = Pairs.second result3
-            in (Eithers.bind (applyTypeArgumentsToType cx4 tx typeArgs t) (\applied -> Right (applied, cx4)))))))))
--- | Reconstruct the type of a case statement (Either/Context version)
-typeOfCaseStatement :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.CaseStatement -> Either Errors.Error (Core.Type, Context.Context)
-typeOfCaseStatement cx tx typeArgs cs =
-
-      let tname = Core.caseStatementTypeName cs
-          dflt = Core.caseStatementDefault cs
-          cases = Core.caseStatementCases cs
-          cterms = Lists.map Core.fieldTerm cases
-      in (Eithers.bind (Eithers.mapMaybe (\e -> typeOf cx tx [] e) dflt) (\dfltResult ->
-        let tdflt = Maybes.map Pairs.first dfltResult
-            cx2 = Maybes.maybe cx Pairs.second dfltResult
-            foldResult =
-                    Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->
-                      let types = Pairs.first accR
-                          cxA = Pairs.second accR
-                      in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->
-                        let t = Pairs.first tResult
-                            cxB = Pairs.second tResult
-                        in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx2)) cterms
-        in (Eithers.bind foldResult (\foldR ->
-          let tcterms = Pairs.first foldR
-              cx3 = Pairs.second foldR
-              fcodsResult =
-                      Lists.foldl (\acc -> \t -> Eithers.bind acc (\accR ->
-                        let cods = Pairs.first accR
-                        in (Eithers.bind (ExtractCore.functionType t) (\ft -> Right (Lists.concat2 cods (Lists.pure (Core.functionTypeCodomain ft)), cx3))))) (Right ([], cx3)) tcterms
-          in (Eithers.bind fcodsResult (\fcodsR ->
-            let fcods = Pairs.first fcodsR
-                cods = Maybes.cat (Lists.cons tdflt (Lists.map Maybes.pure fcods))
-            in (Eithers.bind (checkSameType cx3 tx "case branches" cods) (\cod -> Right (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Resolution.nominalApplication tname typeArgs),
-              Core.functionTypeCodomain = cod}), cx3)))))))))
--- | Reconstruct the type of an either value (Either/Context version)
-typeOfEither :: Context.Context -> Graph.Graph -> [Core.Type] -> Either Core.Term Core.Term -> Either Errors.Error (Core.Type, Context.Context)
-typeOfEither cx tx typeArgs et =
-
-      let n = Lists.length typeArgs
-          arityErr =
-                  Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-                    Checking.typeArityMismatchErrorType = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = Core.TypeUnit,
-                      Core.eitherTypeRight = Core.TypeUnit})),
-                    Checking.typeArityMismatchErrorExpectedArity = 2,
-                    Checking.typeArityMismatchErrorActualArity = n,
-                    Checking.typeArityMismatchErrorTypeArguments = typeArgs})))
-      in (Maybes.maybe arityErr (\uc0 ->
-        let ta0 = Pairs.first uc0
-        in (Maybes.maybe arityErr (\uc1 ->
-          let ta1 = Pairs.first uc1
-          in (Logic.ifElse (Equality.equal n 2) (Eithers.either (\leftTerm -> Eithers.bind (typeOf cx tx [] leftTerm) (\result ->
-            let leftType = Pairs.first result
-                cx2 = Pairs.second result
-            in (Right (Core.TypeEither (Core.EitherType {
-              Core.eitherTypeLeft = leftType,
-              Core.eitherTypeRight = ta1}), cx2)))) (\rightTerm -> Eithers.bind (typeOf cx tx [] rightTerm) (\result ->
-            let rightType = Pairs.first result
-                cx2 = Pairs.second result
-            in (Right (Core.TypeEither (Core.EitherType {
-              Core.eitherTypeLeft = ta0,
-              Core.eitherTypeRight = rightType}), cx2)))) et) arityErr)) (Lists.uncons (Pairs.second uc0)))) (Lists.uncons typeArgs))
--- | Reconstruct the type of a union injection (Either/Context version)
-typeOfInjection :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Injection -> Either Errors.Error (Core.Type, Context.Context)
-typeOfInjection cx tx typeArgs injection =
-
-      let tname = Core.injectionTypeName injection
-          field = Core.injectionField injection
-          fname = Core.fieldName field
-          fterm = Core.fieldTerm field
-      in (Eithers.bind (Resolution.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\schemaResult ->
-        let schemaType = Pairs.first schemaResult
-            cx2 = Pairs.second schemaResult
-            svars = Core.typeSchemeVariables schemaType
-            sbody = Core.typeSchemeBody schemaType
-        in (Eithers.bind (ExtractCore.unionType tname sbody) (\sfields -> Eithers.bind (Resolution.findFieldType cx2 fname sfields) (\ftyp -> Right (Resolution.nominalApplication tname typeArgs, cx2))))))
--- | Reconstruct the type of a lambda function (Either/Context version)
-typeOfLambda :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Lambda -> Either Errors.Error (Core.Type, Context.Context)
-typeOfLambda cx tx typeArgs l =
-
-      let v = Core.lambdaParameter l
-          mdom = Core.lambdaDomain l
-          body = Core.lambdaBody l
-      in (Eithers.bind (Maybes.maybe (Left (Errors.ErrorChecking (Checking.CheckingErrorUntypedLambda (Checking.UntypedLambdaError {
-      })))) (\dom ->
-        let types2 = Maps.insert v (Scoping.fTypeToTypeScheme dom) (Graph.graphBoundTypes tx)
-        in (Eithers.bind (typeOf cx (Graph.Graph {
-          Graph.graphBoundTerms = (Graph.graphBoundTerms tx),
-          Graph.graphBoundTypes = types2,
-          Graph.graphClassConstraints = (Graph.graphClassConstraints tx),
-          Graph.graphLambdaVariables = (Graph.graphLambdaVariables tx),
-          Graph.graphMetadata = (Graph.graphMetadata tx),
-          Graph.graphPrimitives = (Graph.graphPrimitives tx),
-          Graph.graphSchemaTypes = (Graph.graphSchemaTypes tx),
-          Graph.graphTypeVariables = (Graph.graphTypeVariables tx)}) [] body) (\codResult ->
-          let cod = Pairs.first codResult
-              cx2 = Pairs.second codResult
-          in (Right (Core.TypeFunction (Core.FunctionType {
-            Core.functionTypeDomain = dom,
-            Core.functionTypeCodomain = cod}), cx2))))) mdom) (\tbodyResult ->
-        let tbody = Pairs.first tbodyResult
-            cx3 = Pairs.second tbodyResult
-        in (Eithers.bind (applyTypeArgumentsToType cx3 tx typeArgs tbody) (\applied -> Right (applied, cx3)))))
--- | Reconstruct the type of a let binding (Either/Context version)
-typeOfLet :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Let -> Either Errors.Error (Core.Type, Context.Context)
-typeOfLet cx tx typeArgs letTerm =
-
-      let bs = Core.letBindings letTerm
-          body = Core.letBody letTerm
-          bnames = Lists.map Core.bindingName bs
-          bindingType =
-                  \b -> Maybes.maybe (Left (Errors.ErrorChecking (Checking.CheckingErrorUntypedLetBinding (Checking.UntypedLetBindingError {
-                    Checking.untypedLetBindingErrorBinding = b})))) (\ts -> Right (Scoping.typeSchemeToFType ts)) (Core.bindingTypeScheme b)
-          btypesResult =
-                  Lists.foldl (\acc -> \b -> Eithers.bind acc (\accR ->
-                    let types = Pairs.first accR
-                    in (Eithers.bind (bindingType b) (\btype -> Right (Lists.concat2 types (Lists.pure btype), ()))))) (Right ([], ())) bs
-      in (Eithers.bind btypesResult (\btypesR ->
-        let btypes = Pairs.first btypesR
-            tx2 =
-                    Graph.Graph {
-                      Graph.graphBoundTerms = (Graph.graphBoundTerms tx),
-                      Graph.graphBoundTypes = (Maps.union (Maps.fromList (Lists.zip bnames (Lists.map Scoping.fTypeToTypeScheme btypes))) (Graph.graphBoundTypes tx)),
-                      Graph.graphClassConstraints = (Graph.graphClassConstraints tx),
-                      Graph.graphLambdaVariables = (Graph.graphLambdaVariables tx),
-                      Graph.graphMetadata = (Graph.graphMetadata tx),
-                      Graph.graphPrimitives = (Graph.graphPrimitives tx),
-                      Graph.graphSchemaTypes = (Graph.graphSchemaTypes tx),
-                      Graph.graphTypeVariables = (Graph.graphTypeVariables tx)}
-        in (Eithers.bind (typeOf cx tx2 [] body) (\tResult ->
-          let t = Pairs.first tResult
-              cx2 = Pairs.second tResult
-          in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2)))))))
--- | Reconstruct the type of a list (Either/Context version)
-typeOfList :: Context.Context -> Graph.Graph -> [Core.Type] -> [Core.Term] -> Either Errors.Error (Core.Type, Context.Context)
-typeOfList cx tx typeArgs els =
-
-      let listArityErr =
-              Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-                Checking.typeArityMismatchErrorType = (Core.TypeList Core.TypeUnit),
-                Checking.typeArityMismatchErrorExpectedArity = 1,
-                Checking.typeArityMismatchErrorActualArity = (Lists.length typeArgs),
-                Checking.typeArityMismatchErrorTypeArguments = typeArgs})))
-      in (Logic.ifElse (Lists.null els) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 1) (Maybes.maybe listArityErr (\ta0 -> Right (Core.TypeList ta0, cx)) (Lists.maybeHead typeArgs)) listArityErr) (
-        let foldResult =
-                Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->
-                  let types = Pairs.first accR
-                      cxA = Pairs.second accR
-                  in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->
-                    let t = Pairs.first tResult
-                        cxB = Pairs.second tResult
-                    in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) els
-        in (Eithers.bind foldResult (\foldR ->
-          let eltypes = Pairs.first foldR
-              cx2 = Pairs.second foldR
-          in (Eithers.bind (checkSameType cx2 tx "list elements" eltypes) (\unifiedType -> Right (Core.TypeList unifiedType, cx2)))))))
--- | Reconstruct the type of a literal (Either/Context version)
-typeOfLiteral :: t0 -> Graph.Graph -> [Core.Type] -> Core.Literal -> Either Errors.Error (Core.Type, t0)
-typeOfLiteral cx tx typeArgs lit =
-
-      let t = Core.TypeLiteral (Reflect.literalType lit)
-      in (Eithers.bind (applyTypeArgumentsToType cx tx typeArgs t) (\applied -> Right (applied, cx)))
--- | Reconstruct the type of a map (Either/Context version)
-typeOfMap :: Context.Context -> Graph.Graph -> [Core.Type] -> M.Map Core.Term Core.Term -> Either Errors.Error (Core.Type, Context.Context)
-typeOfMap cx tx typeArgs m =
-
-      let mapArityErr =
-              Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-                Checking.typeArityMismatchErrorType = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = Core.TypeUnit,
-                  Core.mapTypeValues = Core.TypeUnit})),
-                Checking.typeArityMismatchErrorExpectedArity = 2,
-                Checking.typeArityMismatchErrorActualArity = (Lists.length typeArgs),
-                Checking.typeArityMismatchErrorTypeArguments = typeArgs})))
-      in (Logic.ifElse (Maps.null m) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 2) (Maybes.maybe mapArityErr (\uc0 ->
-        let ta0 = Pairs.first uc0
-        in (Maybes.maybe mapArityErr (\uc1 ->
-          let ta1 = Pairs.first uc1
-          in (Right (Core.TypeMap (Core.MapType {
-            Core.mapTypeKeys = ta0,
-            Core.mapTypeValues = ta1}), cx))) (Lists.uncons (Pairs.second uc0)))) (Lists.uncons typeArgs)) mapArityErr) (
-        let pairs = Maps.toList m
-            keyFoldResult =
-                    Lists.foldl (\acc -> \p -> Eithers.bind acc (\accR ->
-                      let types = Pairs.first accR
-                          cxA = Pairs.second accR
-                      in (Eithers.bind (typeOf cxA tx [] (Pairs.first p)) (\tResult ->
-                        let t = Pairs.first tResult
-                            cxB = Pairs.second tResult
-                        in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) pairs
-        in (Eithers.bind keyFoldResult (\keyFoldR ->
-          let keyTypes = Pairs.first keyFoldR
-              cx2 = Pairs.second keyFoldR
-          in (Eithers.bind (checkSameType cx2 tx "map keys" keyTypes) (\kt ->
-            let valFoldResult =
-                    Lists.foldl (\acc -> \p -> Eithers.bind acc (\accR ->
-                      let types = Pairs.first accR
-                          cxA = Pairs.second accR
-                      in (Eithers.bind (typeOf cxA tx [] (Pairs.second p)) (\tResult ->
-                        let t = Pairs.first tResult
-                            cxB = Pairs.second tResult
-                        in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx2)) pairs
-            in (Eithers.bind valFoldResult (\valFoldR ->
-              let valTypes = Pairs.first valFoldR
-                  cx3 = Pairs.second valFoldR
-              in (Eithers.bind (checkSameType cx3 tx "map values" valTypes) (\vt -> Eithers.bind (applyTypeArgumentsToType cx3 tx typeArgs (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = kt,
-                Core.mapTypeValues = vt}))) (\applied -> Right (applied, cx3))))))))))))
--- | Reconstruct the type of an optional value (Either/Context version)
-typeOfMaybe :: Context.Context -> Graph.Graph -> [Core.Type] -> Maybe Core.Term -> Either Errors.Error (Core.Type, Context.Context)
-typeOfMaybe cx tx typeArgs mt =
-
-      let forNothing =
-
-                let n = Lists.length typeArgs
-                    maybeArityErr =
-                            Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-                              Checking.typeArityMismatchErrorType = (Core.TypeMaybe Core.TypeUnit),
-                              Checking.typeArityMismatchErrorExpectedArity = 1,
-                              Checking.typeArityMismatchErrorActualArity = n,
-                              Checking.typeArityMismatchErrorTypeArguments = typeArgs})))
-                in (Logic.ifElse (Equality.equal n 1) (Maybes.maybe maybeArityErr (\ta0 -> Right (Core.TypeMaybe ta0, cx)) (Lists.maybeHead typeArgs)) maybeArityErr)
-          forJust =
-                  \term -> Eithers.bind (typeOf cx tx [] term) (\tResult ->
-                    let termType = Pairs.first tResult
-                        cx2 = Pairs.second tResult
-                        t = Core.TypeMaybe termType
-                    in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2))))
-      in (Maybes.maybe forNothing forJust mt)
--- | Reconstruct the type of a pair (Either/Context version)
-typeOfPair :: Context.Context -> Graph.Graph -> [Core.Type] -> (Core.Term, Core.Term) -> Either Errors.Error (Core.Type, Context.Context)
-typeOfPair cx tx typeArgs p =
-
-      let n = Lists.length typeArgs
-      in (Logic.ifElse (Equality.equal n 2) (
-        let pairFst = Pairs.first p
-            pairSnd = Pairs.second p
-        in (Eithers.bind (typeOf cx tx [] pairFst) (\result1 ->
-          let firstType = Pairs.first result1
-              cx2 = Pairs.second result1
-          in (Eithers.bind (typeOf cx2 tx [] pairSnd) (\result2 ->
-            let secondType = Pairs.first result2
-                cx3 = Pairs.second result2
-            in (Right (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = firstType,
-              Core.pairTypeSecond = secondType}), cx3))))))) (Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-        Checking.typeArityMismatchErrorType = (Core.TypePair (Core.PairType {
-          Core.pairTypeFirst = Core.TypeUnit,
-          Core.pairTypeSecond = Core.TypeUnit})),
-        Checking.typeArityMismatchErrorExpectedArity = 2,
-        Checking.typeArityMismatchErrorActualArity = n,
-        Checking.typeArityMismatchErrorTypeArguments = typeArgs})))))
--- | Reconstruct the type of a primitive function (Either/Context version)
-typeOfPrimitive :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Name -> Either Errors.Error (Core.Type, Context.Context)
-typeOfPrimitive cx tx typeArgs name =
-
-      let rawTs = Maybes.map (\_p -> Graph.primitiveTypeScheme _p) (Maps.lookup name (Graph.graphPrimitives tx))
-      in (Maybes.maybe (Left (Errors.ErrorUndefinedTermVariable (ErrorCore.UndefinedTermVariableError {
-        ErrorCore.undefinedTermVariableErrorLocation = (Paths.SubtermPath []),
-        ErrorCore.undefinedTermVariableErrorName = name}))) (\tsRaw ->
-        let instResult = Resolution.instantiateTypeScheme cx tsRaw
-            ts = Pairs.first instResult
-            cx2 = Pairs.second instResult
-            t = Scoping.typeSchemeToFType ts
-        in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2)))) rawTs)
--- | Reconstruct the type of a record projection (Either/Context version)
-typeOfProjection :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Projection -> Either Errors.Error (Core.Type, Context.Context)
-typeOfProjection cx tx typeArgs p =
-
-      let tname = Core.projectionTypeName p
-          fname = Core.projectionField p
-      in (Eithers.bind (Resolution.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\schemaResult ->
-        let schemaType = Pairs.first schemaResult
-            cx2 = Pairs.second schemaResult
-            svars = Core.typeSchemeVariables schemaType
-            sbody = Core.typeSchemeBody schemaType
-        in (Eithers.bind (ExtractCore.recordType tname sbody) (\sfields -> Eithers.bind (Resolution.findFieldType cx2 fname sfields) (\ftyp ->
-          let subst = Typing.TypeSubst (Maps.fromList (Lists.zip svars typeArgs))
-              sftyp = Substitution.substInType subst ftyp
-          in (Right (Core.TypeFunction (Core.FunctionType {
-            Core.functionTypeDomain = (Resolution.nominalApplication tname typeArgs),
-            Core.functionTypeCodomain = sftyp}), cx2)))))))
--- | Reconstruct the type of a record (Either/Context version)
-typeOfRecord :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Record -> Either Errors.Error (Core.Type, Context.Context)
-typeOfRecord cx tx typeArgs record =
-
-      let tname = Core.recordTypeName record
-          fields = Core.recordFields record
-          foldResult =
-                  Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->
-                    let types = Pairs.first accR
-                        cxA = Pairs.second accR
-                    in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->
-                      let t = Pairs.first tResult
-                          cxB = Pairs.second tResult
-                      in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) (Lists.map Core.fieldTerm fields)
-      in (Eithers.bind foldResult (\foldR ->
-        let cx2 = Pairs.second foldR
-        in (Right (Resolution.nominalApplication tname typeArgs, cx2))))
--- | Reconstruct the type of a set (Either/Context version)
-typeOfSet :: Context.Context -> Graph.Graph -> [Core.Type] -> S.Set Core.Term -> Either Errors.Error (Core.Type, Context.Context)
-typeOfSet cx tx typeArgs els =
-
-      let setArityErr =
-              Left (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {
-                Checking.typeArityMismatchErrorType = (Core.TypeSet Core.TypeUnit),
-                Checking.typeArityMismatchErrorExpectedArity = 1,
-                Checking.typeArityMismatchErrorActualArity = (Lists.length typeArgs),
-                Checking.typeArityMismatchErrorTypeArguments = typeArgs})))
-      in (Logic.ifElse (Sets.null els) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 1) (Maybes.maybe setArityErr (\ta0 -> Right (Core.TypeSet ta0, cx)) (Lists.maybeHead typeArgs)) setArityErr) (
-        let foldResult =
-                Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->
-                  let types = Pairs.first accR
-                      cxA = Pairs.second accR
-                  in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->
-                    let t = Pairs.first tResult
-                        cxB = Pairs.second tResult
-                    in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) (Sets.toList els)
-        in (Eithers.bind foldResult (\foldR ->
-          let eltypes = Pairs.first foldR
-              cx2 = Pairs.second foldR
-          in (Eithers.bind (checkSameType cx2 tx "set elements" eltypes) (\unifiedType -> Right (Core.TypeSet unifiedType, cx2)))))))
--- | Check the type of a term
-typeOfTerm :: Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Type
-typeOfTerm cx g term = Eithers.map Pairs.first (typeOf cx g [] term)
--- | Reconstruct the type of a type application term (Either/Context version)
-typeOfTypeApplication :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.TypeApplicationTerm -> Either Errors.Error (Core.Type, Context.Context)
-typeOfTypeApplication cx tx typeArgs tyapp =
-
-      let body = Core.typeApplicationTermBody tyapp
-          t = Core.typeApplicationTermType tyapp
-      in (typeOf cx tx (Lists.cons t typeArgs) body)
--- | Reconstruct the type of a type lambda (type abstraction) term (Either/Context version)
-typeOfTypeLambda :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.TypeLambda -> Either Errors.Error (Core.Type, Context.Context)
-typeOfTypeLambda cx tx typeArgs tl =
-
-      let v = Core.typeLambdaParameter tl
-          body = Core.typeLambdaBody tl
-          vars = Graph.graphTypeVariables tx
-          tx2 =
-                  Graph.Graph {
-                    Graph.graphBoundTerms = (Graph.graphBoundTerms tx),
-                    Graph.graphBoundTypes = (Graph.graphBoundTypes tx),
-                    Graph.graphClassConstraints = (Graph.graphClassConstraints tx),
-                    Graph.graphLambdaVariables = (Graph.graphLambdaVariables tx),
-                    Graph.graphMetadata = (Graph.graphMetadata tx),
-                    Graph.graphPrimitives = (Graph.graphPrimitives tx),
-                    Graph.graphSchemaTypes = (Graph.graphSchemaTypes tx),
-                    Graph.graphTypeVariables = (Sets.insert v vars)}
-      in (Eithers.bind (typeOf cx tx2 [] body) (\result1 ->
-        let t1 = Pairs.first result1
-            cx2 = Pairs.second result1
-        in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = v,
-          Core.forallTypeBody = t1}))) (\applied -> Right (applied, cx2)))))
--- | Reconstruct the type of the unit term (Either/Context version)
-typeOfUnit :: t0 -> Graph.Graph -> [Core.Type] -> Either Errors.Error (Core.Type, t0)
-typeOfUnit cx tx typeArgs =
-    Eithers.bind (applyTypeArgumentsToType cx tx typeArgs Core.TypeUnit) (\applied -> Right (applied, cx))
--- | Reconstruct the type of an unwrap operation (Either/Context version)
-typeOfUnwrap :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Name -> Either Errors.Error (Core.Type, Context.Context)
-typeOfUnwrap cx tx typeArgs tname =
-    Eithers.bind (Resolution.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\schemaResult ->
-      let schemaType = Pairs.first schemaResult
-          cx2 = Pairs.second schemaResult
-          svars = Core.typeSchemeVariables schemaType
-          sbody = Core.typeSchemeBody schemaType
-      in (Eithers.bind (ExtractCore.wrappedType tname sbody) (\wrapped ->
-        let subst = Typing.TypeSubst (Maps.fromList (Lists.zip svars typeArgs))
-            swrapped = Substitution.substInType subst wrapped
-        in (Right (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = (Resolution.nominalApplication tname typeArgs),
-          Core.functionTypeCodomain = swrapped}), cx2)))))
--- | Reconstruct the type of a variable (Either/Context version)
-typeOfVariable :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Name -> Either Errors.Error (Core.Type, Context.Context)
-typeOfVariable cx tx typeArgs name =
-
-      let rawTypeScheme = Maps.lookup name (Graph.graphBoundTypes tx)
-          forScheme =
-                  \ts ->
-                    let tResult =
-                            Logic.ifElse (Lists.null typeArgs) (Resolution.instantiateType cx (Scoping.typeSchemeToFType ts)) (Scoping.typeSchemeToFType ts, cx)
-                        t = Pairs.first tResult
-                        cx2 = Pairs.second tResult
-                    in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2)))
-      in (Maybes.maybe (Maybes.maybe (Left (Errors.ErrorUntypedTermVariable (ErrorCore.UntypedTermVariableError {
-        ErrorCore.untypedTermVariableErrorLocation = (Paths.SubtermPath []),
-        ErrorCore.untypedTermVariableErrorName = name}))) forScheme (Maybes.map (\_p -> Graph.primitiveTypeScheme _p) (Maps.lookup name (Graph.graphPrimitives tx)))) forScheme rawTypeScheme)
--- | Reconstruct the type of a wrapped term (Either/Context version)
-typeOfWrappedTerm :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.WrappedTerm -> Either Errors.Error (Core.Type, Context.Context)
-typeOfWrappedTerm cx tx typeArgs wt =
-
-      let tname = Core.wrappedTermTypeName wt
-          body = Core.wrappedTermBody wt
-      in (Eithers.bind (typeOf cx tx [] body) (\result ->
-        let cx2 = Pairs.second result
-        in (Right (Resolution.nominalApplication tname typeArgs, cx2))))
--- | Check whether a list of types are effectively equal, disregarding type aliases and free type variable naming. Also treats free type variables (not in schema) as wildcards, since inference has already verified consistency.
-typesAllEffectivelyEqual :: Graph.Graph -> [Core.Type] -> Bool
-typesAllEffectivelyEqual tx tlist =
-
-      let types = Graph.graphSchemaTypes tx
-          containsFreeVar =
-                  \t ->
-                    let allVars = Variables.freeVariablesInTypeSimple t
-                        schemaNames = Sets.fromList (Maps.keys types)
-                    in (Logic.not (Sets.null (Sets.difference allVars schemaNames)))
-          anyContainsFreeVar = Lists.foldl (\acc -> \t -> Logic.or acc (containsFreeVar t)) False tlist
-      in (Logic.ifElse anyContainsFreeVar True (Logic.ifElse (allEqual (Lists.map (\t -> normalizeTypeFreeVars t) tlist)) True (allEqual (Lists.map (\t -> normalizeTypeFreeVars (Strip.deannotateTypeRecursive (Dependencies.replaceTypedefs types t))) tlist))))
--- | Check whether two types are effectively equal, disregarding type aliases, forall quantifiers, and treating in-scope type variables as wildcards
-typesEffectivelyEqual :: Graph.Graph -> Core.Type -> Core.Type -> Bool
-typesEffectivelyEqual tx t1 t2 =
-    Logic.or (containsInScopeTypeVars tx t1) (Logic.or (containsInScopeTypeVars tx t2) (typesAllEffectivelyEqual tx [
-      Resolution.fullyStripAndNormalizeType t1,
-      (Resolution.fullyStripAndNormalizeType t2)]))
diff --git a/src/main/haskell/Hydra/Classes.hs b/src/main/haskell/Hydra/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Classes.hs
+++ /dev/null
@@ -1,15 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type classes
-
-module Hydra.Classes where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Any of a small number of built-in type classes
-data TypeClass =
-  TypeClassEquality |
-  TypeClassOrdering
-  deriving (Eq, Ord, Read, Show)
-_TypeClass = Core.Name "hydra.classes.TypeClass"
-_TypeClass_equality = Core.Name "equality"
-_TypeClass_ordering = Core.Name "ordering"
diff --git a/src/main/haskell/Hydra/Codegen.hs b/src/main/haskell/Hydra/Codegen.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Codegen.hs
+++ /dev/null
@@ -1,445 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Pure code generation pipeline for bootstrapping Hydra across languages.
-
-module Hydra.Codegen where
-import qualified Hydra.Adapt as Adapt
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Decode.Packaging as DecodePackaging
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Encode.Packaging as EncodePackaging
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Json.Decode as Decode
-import qualified Hydra.Json.Encode as Encode
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Json.Writer as Writer
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-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
--- | Build a schema map (Name -> Type) from a graph's schema types
-buildSchemaMap :: Graph.Graph -> M.Map Core.Name Core.Type
-buildSchemaMap g = Maps.map (\ts -> Strip.deannotateType (Core.typeSchemeBody ts)) (Graph.graphSchemaTypes g)
--- | Decode a single module from a JSON value
-decodeModuleFromJson :: Graph.Graph -> [Packaging.Module] -> Model.Value -> Either Errors.Error Packaging.Module
-decodeModuleFromJson bsGraph universeModules jsonVal =
-
-      let graph = modulesToGraph bsGraph universeModules universeModules
-          schemaMap = buildSchemaMap graph
-          modType = Core.TypeVariable (Core.Name "hydra.packaging.Module")
-      in (Eithers.either (\err -> Left (Errors.ErrorOther (Errors.OtherError err))) (\term -> Eithers.either (\decErr -> Left (Errors.ErrorDecoding decErr)) (\mod -> Right mod) (DecodePackaging.module_ graph term)) (Decode.fromJson schemaMap (Core.Name "hydra.packaging.Module") modType jsonVal))
--- | Escape unescaped control characters inside JSON string literals
-escapeControlCharsInJson :: [Int] -> [Int]
-escapeControlCharsInJson input =
-
-      let hexDigit = \n -> Logic.ifElse (Equality.lt n 10) (Math.add 48 n) (Math.add 97 (Math.sub n 10))
-          escapeToUnicode =
-                  \b -> [
-                    92,
-                    117,
-                    48,
-                    48,
-                    (hexDigit (Maybes.fromMaybe 0 (Math.maybeDiv b 16))),
-                    (hexDigit (Maybes.fromMaybe 0 (Math.maybeMod b 16)))]
-          go =
-                  \inStr -> \esc -> \bytes -> Maybes.maybe [] (\uc ->
-                    let b = Pairs.first uc
-                        bs = Pairs.second uc
-                    in (Logic.ifElse esc (Lists.cons b (go inStr False bs)) (Logic.ifElse (Logic.and (Equality.equal b 92) inStr) (Lists.cons b (go inStr True bs)) (Logic.ifElse (Equality.equal b 34) (Lists.cons b (go (Logic.not inStr) False bs)) (Logic.ifElse (Logic.and inStr (Equality.lt b 32)) (Lists.concat2 (escapeToUnicode b) (go inStr False bs)) (Lists.cons b (go inStr False bs))))))) (Lists.uncons bytes)
-      in (go False False input)
--- | Format a primitive for the lexicon
-formatPrimitive :: Graph.Primitive -> String
-formatPrimitive prim =
-
-      let name = Core.unName (Graph.primitiveName prim)
-          typeStr = ShowCore.typeScheme (Graph.primitiveTypeScheme prim)
-      in (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " name) " : ") typeStr)
--- | Format a term binding for the lexicon
-formatTermBinding :: Core.Binding -> String
-formatTermBinding binding =
-
-      let name = Core.unName (Core.bindingName binding)
-          typeStr = Maybes.maybe "?" (\scheme -> ShowCore.typeScheme scheme) (Core.bindingTypeScheme binding)
-      in (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " name) " : ") typeStr)
--- | Format a type binding for the lexicon
-formatTypeBinding :: Graph.Graph -> Core.Binding -> Either Errors.Error String
-formatTypeBinding graph binding =
-    Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\_a -> _a) (DecodeCore.type_ graph (Core.bindingTerm binding))) (\typ -> Right (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " (Core.unName (Core.bindingName binding))) " = ") (ShowCore.type_ typ)))
--- | Generate encoder or decoder modules for a list of type modules
-generateCoderModules :: (t0 -> Graph.Graph -> t1 -> Either t2 (Maybe t3)) -> Graph.Graph -> [Packaging.Module] -> [t1] -> t0 -> Either t2 [t3]
-generateCoderModules codec bsGraph universeModules typeModules cx =
-
-      let universe = Maps.fromList (Lists.map (\m -> (Packaging.moduleNamespace m, m)) (Lists.concat2 universeModules universeModules))
-          schemaModules = moduleTypeDepsTransitive universe universeModules
-          dataModules = moduleTermDepsTransitive universe universeModules
-          schemaElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-                      let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-                          dataTerm =
-                                  Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                                    Core.annotatedTermBody = (EncodeCore.type_ typ),
-                                    Core.annotatedTermAnnotation = (Maps.fromList [
-                                      (Constants.key_type, schemaTerm)])}))
-                      in Core.Binding {
-                        Core.bindingName = name,
-                        Core.bindingTerm = dataTerm,
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [],
-                          Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                          Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) (Lists.concat2 schemaModules universeModules))
-          dataElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) dataModules)
-          schemaGraph = Lexical.elementsToGraph bsGraph Maps.empty schemaElements
-          schemaTypes = Eithers.either (\_ -> Maps.empty) (\_r -> _r) (Environment.schemaGraphToTypingEnvironment schemaGraph)
-          allElements = Lists.concat2 schemaElements dataElements
-          graph = Lexical.elementsToGraph bsGraph schemaTypes allElements
-      in (Eithers.map (\results -> Maybes.cat results) (Eithers.mapList (\m -> codec cx graph m) typeModules))
--- | Generate the lexicon content from a graph
-generateLexicon :: Graph.Graph -> Either Errors.Error String
-generateLexicon graph =
-
-      let bindings = Lexical.graphToBindings graph
-          primitives = Maps.elems (Graph.graphPrimitives graph)
-          partitioned = Lists.partition (\b -> Annotations.isNativeType b) bindings
-          typeBindings = Pairs.first partitioned
-          termBindings = Pairs.second partitioned
-          sortedPrimitives = Lists.sortOn (\p -> Graph.primitiveName p) primitives
-          sortedTypes = Lists.sortOn (\b -> Core.bindingName b) typeBindings
-          sortedTerms = Lists.sortOn (\b -> Core.bindingName b) termBindings
-      in (Eithers.bind (Eithers.mapList (\b -> formatTypeBinding graph b) sortedTypes) (\typeLines ->
-        let termLines = Lists.map (\b -> formatTermBinding b) sortedTerms
-            primitiveLines = Lists.map (\p -> formatPrimitive p) sortedPrimitives
-        in (Right (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "Primitives:\n" (Strings.unlines primitiveLines)) "\nTypes:\n") (Strings.unlines typeLines)) "\nTerms:\n") (Strings.unlines termLines)))))
--- | Pure core of code generation: given a coder, language, flags, bootstrap graph, universe, and modules to generate, produce a list of (filePath, content) pairs.
-generateSourceFiles :: Ord t0 => ((Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error (M.Map t0 t1)) -> Coders.Language -> Bool -> Bool -> Bool -> Bool -> Graph.Graph -> [Packaging.Module] -> [Packaging.Module] -> Context.Context -> Either Errors.Error [(t0, t1)])
-generateSourceFiles printDefinitions lang doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings bsGraph universeModules modsToGenerate cx =
-
-      let namespaceMap =
-              Maps.fromList (Lists.map (\m -> (Packaging.moduleNamespace m, m)) (Lists.concat2 universeModules modsToGenerate))
-          constraints = Coders.languageConstraints lang
-          typeModulesToGenerate =
-                  Lists.filter (\mod -> Logic.not (Lists.null (Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-                      let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-                          dataTerm =
-                                  Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                                    Core.annotatedTermBody = (EncodeCore.type_ typ),
-                                    Core.annotatedTermAnnotation = (Maps.fromList [
-                                      (Constants.key_type, schemaTerm)])}))
-                      in Core.Binding {
-                        Core.bindingName = name,
-                        Core.bindingTerm = dataTerm,
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [],
-                          Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                          Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                    _ -> Nothing) (Packaging.moduleDefinitions mod))))) modsToGenerate
-          termModulesToGenerate =
-                  Lists.filter (\mod -> Logic.not (Lists.null (Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions mod))))) modsToGenerate
-          schemaMods = moduleTypeDepsTransitive namespaceMap modsToGenerate
-          schemaElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-                      let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-                          dataTerm =
-                                  Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                                    Core.annotatedTermBody = (EncodeCore.type_ typ),
-                                    Core.annotatedTermAnnotation = (Maps.fromList [
-                                      (Constants.key_type, schemaTerm)])}))
-                      in Core.Binding {
-                        Core.bindingName = name,
-                        Core.bindingTerm = dataTerm,
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [],
-                          Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                          Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) (Lists.concat2 schemaMods typeModulesToGenerate))
-          dataMods = moduleTermDepsTransitive namespaceMap modsToGenerate
-          dataElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) dataMods)
-          schemaGraph = Lexical.elementsToGraph bsGraph Maps.empty schemaElements
-          schemaTypes2 = Eithers.either (\_ -> Maps.empty) (\_r -> _r) (Environment.schemaGraphToTypingEnvironment schemaGraph)
-          dataGraph = Lexical.elementsToGraph bsGraph schemaTypes2 dataElements
-      in (Eithers.bind (Logic.ifElse (Lists.null typeModulesToGenerate) (Right []) (
-        let nameLists =
-                Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                  Packaging.DefinitionType v0 -> Just (Packaging.typeDefinitionName v0)
-                  _ -> Nothing) (Packaging.moduleDefinitions m))) typeModulesToGenerate
-        in (Eithers.bind (Adapt.schemaGraphToDefinitions constraints schemaGraph nameLists cx) (\schemaResult ->
-          let defLists = Pairs.second schemaResult
-              schemaGraphWithTypes =
-                      Graph.Graph {
-                        Graph.graphBoundTerms = (Graph.graphBoundTerms schemaGraph),
-                        Graph.graphBoundTypes = (Graph.graphBoundTypes schemaGraph),
-                        Graph.graphClassConstraints = (Graph.graphClassConstraints schemaGraph),
-                        Graph.graphLambdaVariables = (Graph.graphLambdaVariables schemaGraph),
-                        Graph.graphMetadata = (Graph.graphMetadata schemaGraph),
-                        Graph.graphPrimitives = (Graph.graphPrimitives schemaGraph),
-                        Graph.graphSchemaTypes = schemaTypes2,
-                        Graph.graphTypeVariables = (Graph.graphTypeVariables schemaGraph)}
-          in (Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (\p ->
-            let mod = Pairs.first p
-                defs = Pairs.second p
-            in (Eithers.map (\m -> Maps.toList m) (printDefinitions mod (Lists.map (\d -> Packaging.DefinitionType d) defs) cx schemaGraphWithTypes))) (Lists.zip typeModulesToGenerate defLists))))))) (\schemaFiles -> Eithers.bind (Logic.ifElse (Lists.null termModulesToGenerate) (Right []) (
-        let namespaces = Lists.map (\m -> Packaging.moduleNamespace m) termModulesToGenerate
-        in (Eithers.bind (Adapt.dataGraphToDefinitions constraints doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings dataElements dataGraph namespaces cx) (\dataResult ->
-          let g1 = Pairs.first dataResult
-              defLists = Pairs.second dataResult
-              defName =
-                      \d -> case d of
-                        Packaging.DefinitionTerm v0 -> Packaging.termDefinitionName v0
-                        Packaging.DefinitionType v0 -> Packaging.typeDefinitionName v0
-              refreshModule =
-                      \els -> \m -> Packaging.Module {
-                        Packaging.moduleDescription = (Packaging.moduleDescription m),
-                        Packaging.moduleNamespace = (Packaging.moduleNamespace m),
-                        Packaging.moduleTermDependencies = (Packaging.moduleTermDependencies m),
-                        Packaging.moduleTypeDependencies = (Packaging.moduleTypeDependencies m),
-                        Packaging.moduleDefinitions = (Maybes.cat (Lists.map (\d -> case d of
-                          Packaging.DefinitionType v0 -> Just (Packaging.DefinitionType v0)
-                          Packaging.DefinitionTerm v0 -> Maybes.map (\b -> Packaging.DefinitionTerm (Packaging.TermDefinition {
-                            Packaging.termDefinitionName = (Core.bindingName b),
-                            Packaging.termDefinitionTerm = (Core.bindingTerm b),
-                            Packaging.termDefinitionTypeScheme = (Core.bindingTypeScheme b)})) (Lists.find (\b -> Equality.equal (Core.bindingName b) (Packaging.termDefinitionName v0)) els)) (Packaging.moduleDefinitions m)))}
-              allBindings = Lexical.graphToBindings g1
-              refreshedMods = Lists.map (\m -> refreshModule allBindings m) termModulesToGenerate
-              dedupDefs = \defs -> Maps.elems (Maps.fromList (Lists.map (\d -> (Packaging.termDefinitionName d, d)) defs))
-              dedupedDefLists = Lists.map dedupDefs defLists
-          in (Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (\p ->
-            let mod = Pairs.first p
-                defs = Pairs.second p
-            in (Eithers.map (\m -> Maps.toList m) (printDefinitions mod (Lists.map (\d -> Packaging.DefinitionTerm d) defs) cx g1))) (Lists.zip refreshedMods dedupedDefLists))))))) (\termFiles -> Right (Lists.concat2 schemaFiles termFiles))))
--- | Perform type inference and generate the lexicon for a set of modules
-inferAndGenerateLexicon :: Context.Context -> Graph.Graph -> [Packaging.Module] -> Either Errors.Error String
-inferAndGenerateLexicon cx bsGraph kernelModules =
-
-      let g0 = modulesToGraph bsGraph kernelModules kernelModules
-          dataElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) kernelModules)
-      in (Eithers.bind (Inference.inferGraphTypes cx dataElements g0) (\inferResultWithCx ->
-        let g1 = Pairs.first (Pairs.first inferResultWithCx)
-        in (generateLexicon g1)))
--- | Perform type inference on modules and reconstruct with inferred types
-inferModules :: Context.Context -> Graph.Graph -> [Packaging.Module] -> [Packaging.Module] -> Either Errors.Error [Packaging.Module]
-inferModules cx bsGraph universeMods targetMods =
-
-      let g0 = modulesToGraph bsGraph universeMods universeMods
-          dataElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) universeMods)
-      in (Eithers.bind (Inference.inferGraphTypes cx dataElements g0) (\inferResultWithCx ->
-        let inferResult = Pairs.first inferResultWithCx
-            inferredElements = Pairs.second inferResult
-        in (Right (Lists.map (refreshModule inferredElements) targetMods))))
--- | Infer types for target modules in the context of a typed universe
-inferModulesGiven :: Context.Context -> Graph.Graph -> [Packaging.Module] -> [Packaging.Module] -> Either Errors.Error [Packaging.Module]
-inferModulesGiven cx bsGraph universeMods targetMods =
-
-      let g0 = modulesToGraph bsGraph universeMods universeMods
-          nsMap = Maps.fromList (Lists.map (\m -> (Packaging.moduleNamespace m, m)) universeMods)
-          closureMods = moduleTermDepsTransitive nsMap targetMods
-          targetNamespaces = Sets.fromList (Lists.map Packaging.moduleNamespace targetMods)
-          bindingsToInfer =
-                  Lists.concat (Lists.map (\m ->
-                    let isTarget = Sets.member (Packaging.moduleNamespace m) targetNamespaces
-                        bs =
-                                Maybes.cat (Lists.map (\d -> case d of
-                                  Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                                    Core.bindingName = (Packaging.termDefinitionName v0),
-                                    Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                                    Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                                  _ -> Nothing) (Packaging.moduleDefinitions m))
-                    in (Logic.ifElse isTarget bs (Lists.filter (\b -> Maybes.isNothing (Core.bindingTypeScheme b)) bs))) closureMods)
-          untouchedTypedBindings =
-                  Lists.concat (Lists.map (\m ->
-                    let isTarget = Sets.member (Packaging.moduleNamespace m) targetNamespaces
-                        bs =
-                                Maybes.cat (Lists.map (\d -> case d of
-                                  Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                                    Core.bindingName = (Packaging.termDefinitionName v0),
-                                    Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                                    Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                                  _ -> Nothing) (Packaging.moduleDefinitions m))
-                    in (Logic.ifElse isTarget [] (Lists.filter (\b -> Maybes.isJust (Core.bindingTypeScheme b)) bs))) closureMods)
-      in (Eithers.bind (Inference.inferGraphTypes cx bindingsToInfer g0) (\inferResultWithCx ->
-        let inferResult = Pairs.first inferResultWithCx
-            newlyInferredBindings = Pairs.second inferResult
-            allInferredBindings = Lists.concat2 newlyInferredBindings untouchedTypedBindings
-        in (Right (Lists.map (refreshModule allInferredBindings) targetMods))))
--- | Compute transitive closure of term dependencies for a set of modules
-moduleTermDepsTransitive :: M.Map Packaging.Namespace Packaging.Module -> [Packaging.Module] -> [Packaging.Module]
-moduleTermDepsTransitive nsMap modules =
-
-      let closure =
-              Sets.union (transitiveDeps (\m -> Packaging.moduleTermDependencies m) nsMap modules) (Sets.fromList (Lists.map (\m -> Packaging.moduleNamespace m) modules))
-      in (Maybes.cat (Lists.map (\n -> Maps.lookup n nsMap) (Sets.toList closure)))
--- | Convert a Module to a JSON string
-moduleToJson :: M.Map Core.Name Core.Type -> Packaging.Module -> Either Errors.Error String
-moduleToJson schemaMap m =
-
-      let term = EncodePackaging.module_ m
-          modType = Core.TypeVariable (Core.Name "hydra.packaging.Module")
-      in (Eithers.map (\json -> Writer.printJson json) (Eithers.bimap (\_e -> Errors.ErrorOther (Errors.OtherError _e)) (\_a -> _a) (Encode.toJson schemaMap (Core.Name "hydra.packaging.Module") modType term)))
--- | Convert a generated Module into a Source module
-moduleToSourceModule :: Packaging.Module -> Packaging.Module
-moduleToSourceModule m =
-
-      let sourceNs =
-              Packaging.Namespace (Strings.cat2 "hydra.sources." (Strings.intercalate "." (Lists.drop 1 (Strings.splitOn "." (Packaging.unNamespace (Packaging.moduleNamespace m))))))
-          modTypeNs = Packaging.Namespace "hydra.packaging"
-          moduleDef =
-                  Packaging.DefinitionTerm (Packaging.TermDefinition {
-                    Packaging.termDefinitionName = (Core.Name (Strings.cat2 (Packaging.unNamespace sourceNs) ".module_")),
-                    Packaging.termDefinitionTerm = (EncodePackaging.module_ m),
-                    Packaging.termDefinitionTypeScheme = Nothing})
-      in Packaging.Module {
-        Packaging.moduleDescription = (Just (Strings.cat2 "Source module for " (Packaging.unNamespace (Packaging.moduleNamespace m)))),
-        Packaging.moduleNamespace = sourceNs,
-        Packaging.moduleTermDependencies = [
-          modTypeNs],
-        Packaging.moduleTypeDependencies = [
-          modTypeNs],
-        Packaging.moduleDefinitions = [
-          moduleDef]}
--- | Compute transitive closure of type dependencies for a set of modules
-moduleTypeDepsTransitive :: M.Map Packaging.Namespace Packaging.Module -> [Packaging.Module] -> [Packaging.Module]
-moduleTypeDepsTransitive nsMap modules =
-
-      let termMods = moduleTermDepsTransitive nsMap modules
-          typeNamespaces = Sets.toList (transitiveDeps (\m -> Packaging.moduleTypeDependencies m) nsMap termMods)
-      in (Maybes.cat (Lists.map (\n -> Maps.lookup n nsMap) typeNamespaces))
--- | Build a graph from universe modules and working modules, using an explicit bootstrap graph
-modulesToGraph :: Graph.Graph -> [Packaging.Module] -> [Packaging.Module] -> Graph.Graph
-modulesToGraph bsGraph universeModules modules =
-
-      let universe = Maps.fromList (Lists.map (\m -> (Packaging.moduleNamespace m, m)) (Lists.concat2 universeModules modules))
-          schemaModules = moduleTypeDepsTransitive universe modules
-          dataModules = moduleTermDepsTransitive universe modules
-          schemaElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-                      let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-                          dataTerm =
-                                  Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                                    Core.annotatedTermBody = (EncodeCore.type_ typ),
-                                    Core.annotatedTermAnnotation = (Maps.fromList [
-                                      (Constants.key_type, schemaTerm)])}))
-                      in Core.Binding {
-                        Core.bindingName = name,
-                        Core.bindingTerm = dataTerm,
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [],
-                          Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                          Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) (Lists.concat2 schemaModules modules))
-          dataElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) dataModules)
-          schemaGraph = Lexical.elementsToGraph bsGraph Maps.empty schemaElements
-          schemaTypes = Eithers.either (\_ -> Maps.empty) (\_r -> _r) (Environment.schemaGraphToTypingEnvironment schemaGraph)
-          baseGraph = Lexical.elementsToGraph bsGraph schemaTypes dataElements
-          universeDataElements =
-                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                      Core.bindingName = (Packaging.termDefinitionName v0),
-                      Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                      Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                    _ -> Nothing) (Packaging.moduleDefinitions m))) universeModules)
-          universeBoundTypes =
-                  Maps.fromList (Maybes.cat (Lists.map (\b -> Maybes.map (\ts -> (Core.bindingName b, ts)) (Core.bindingTypeScheme b)) universeDataElements))
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Graph.graphBoundTerms baseGraph),
-        Graph.graphBoundTypes = universeBoundTypes,
-        Graph.graphClassConstraints = (Graph.graphClassConstraints baseGraph),
-        Graph.graphLambdaVariables = (Graph.graphLambdaVariables baseGraph),
-        Graph.graphMetadata = (Graph.graphMetadata baseGraph),
-        Graph.graphPrimitives = (Graph.graphPrimitives baseGraph),
-        Graph.graphSchemaTypes = (Graph.graphSchemaTypes baseGraph),
-        Graph.graphTypeVariables = (Graph.graphTypeVariables baseGraph)}
--- | Convert a namespace to a file path (e.g., hydra.core -> hydra/core)
-namespaceToPath :: Packaging.Namespace -> String
-namespaceToPath ns = Strings.intercalate "/" (Strings.splitOn "." (Packaging.unNamespace ns))
--- | Rebuild a module's term definitions using freshly inferred bindings
-refreshModule :: [Core.Binding] -> Packaging.Module -> Packaging.Module
-refreshModule inferredElements m =
-    Logic.ifElse (Logic.not (Logic.not (Lists.null (Maybes.cat (Lists.map (\d -> case d of
-      Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-        Core.bindingName = (Packaging.termDefinitionName v0),
-        Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-        Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-      _ -> Nothing) (Packaging.moduleDefinitions m)))))) m (Packaging.Module {
-      Packaging.moduleDescription = (Packaging.moduleDescription m),
-      Packaging.moduleNamespace = (Packaging.moduleNamespace m),
-      Packaging.moduleTermDependencies = (Packaging.moduleTermDependencies m),
-      Packaging.moduleTypeDependencies = (Packaging.moduleTypeDependencies m),
-      Packaging.moduleDefinitions = (Maybes.cat (Lists.map (\d -> case d of
-        Packaging.DefinitionType v0 -> Just (Packaging.DefinitionType v0)
-        Packaging.DefinitionTerm v0 -> Maybes.map (\b -> Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.bindingName b),
-          Packaging.termDefinitionTerm = (Core.bindingTerm b),
-          Packaging.termDefinitionTypeScheme = (Core.bindingTypeScheme b)})) (Lists.find (\b -> Equality.equal (Core.bindingName b) (Packaging.termDefinitionName v0)) inferredElements)) (Packaging.moduleDefinitions m)))})
--- | Compute transitive closure of module dependencies
-transitiveDeps :: (Packaging.Module -> [Packaging.Namespace]) -> M.Map Packaging.Namespace Packaging.Module -> [Packaging.Module] -> S.Set Packaging.Namespace
-transitiveDeps getDeps nsMap startMods =
-
-      let initialDeps =
-              Sets.fromList (Lists.concat (Lists.map (\m -> Lists.filter (\dep -> Logic.not (Equality.equal dep (Packaging.moduleNamespace m))) (getDeps m)) startMods))
-          go =
-                  \pending -> \visited -> Logic.ifElse (Sets.null pending) visited (
-                    let newVisited = Sets.union visited pending
-                        nextDeps =
-                                Sets.fromList (Lists.concat (Lists.map (\nsv -> Maybes.maybe [] (\depMod -> getDeps depMod) (Maps.lookup nsv nsMap)) (Sets.toList pending)))
-                        newPending = Sets.difference nextDeps newVisited
-                    in (go newPending newVisited))
-      in (go initialDeps Sets.empty)
diff --git a/src/main/haskell/Hydra/Coders.hs b/src/main/haskell/Hydra/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coders.hs
+++ /dev/null
@@ -1,130 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Abstractions for paired transformations between languages
-
-module Hydra.Coders where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-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
--- | A two-level bidirectional encoder which adapts types to types and terms to terms
-data Adapter t1 t2 v1 v2 =
-  Adapter {
-    -- | Whether information may be lost in the course of this adaptation
-    adapterIsLossy :: Bool,
-    -- | The source type
-    adapterSource :: t1,
-    -- | The target type
-    adapterTarget :: t2,
-    -- | The coder for transforming instances of the source type to instances of the target type
-    adapterCoder :: (Coder v1 v2)}
-_Adapter = Core.Name "hydra.coders.Adapter"
-_Adapter_isLossy = Core.Name "isLossy"
-_Adapter_source = Core.Name "source"
-_Adapter_target = Core.Name "target"
-_Adapter_coder = Core.Name "coder"
--- | An evaluation context together with a source language and a target language
-data AdapterContext =
-  AdapterContext {
-    -- | The underlying graph of elements and primitives
-    adapterContextGraph :: Graph.Graph,
-    -- | The language being encoded or decoded
-    adapterContextLanguage :: Language,
-    -- | A map of type names to adapters for those types
-    adapterContextAdapters :: (M.Map Core.Name (Adapter Core.Type Core.Type Core.Term Core.Term))}
-_AdapterContext = Core.Name "hydra.coders.AdapterContext"
-_AdapterContext_graph = Core.Name "graph"
-_AdapterContext_language = Core.Name "language"
-_AdapterContext_adapters = Core.Name "adapters"
--- | A two-level encoder and decoder, operating both at a type level and an instance (data) level
-data Bicoder t1 t2 v1 v2 =
-  Bicoder {
-    -- | A function from source types to adapters
-    bicoderEncode :: (t1 -> Adapter t1 t2 v1 v2),
-    -- | A function from target types to adapters
-    bicoderDecode :: (t2 -> Adapter t2 t1 v2 v1)}
-_Bicoder = Core.Name "hydra.coders.Bicoder"
-_Bicoder_encode = Core.Name "encode"
-_Bicoder_decode = Core.Name "decode"
--- | An encoder and decoder; a bidirectional transformation between two types
-data Coder v1 v2 =
-  Coder {
-    -- | A function which encodes source values as target values in a given context
-    coderEncode :: (Context.Context -> v1 -> Either Errors.Error v2),
-    -- | A function which decodes target values as source values in a given context
-    coderDecode :: (Context.Context -> v2 -> Either Errors.Error v1)}
-_Coder = Core.Name "hydra.coders.Coder"
-_Coder_encode = Core.Name "encode"
-_Coder_decode = Core.Name "decode"
--- | Indicates either the 'out' or the 'in' direction of a coder
-data CoderDirection =
-  CoderDirectionEncode |
-  CoderDirectionDecode
-  deriving (Eq, Ord, Read, Show)
-_CoderDirection = Core.Name "hydra.coders.CoderDirection"
-_CoderDirection_encode = Core.Name "encode"
-_CoderDirection_decode = Core.Name "decode"
--- | A named language together with language-specific constraints
-data Language =
-  Language {
-    -- | The unique name of the language
-    languageName :: LanguageName,
-    -- | The constraints which characterize the language
-    languageConstraints :: LanguageConstraints}
-_Language = Core.Name "hydra.coders.Language"
-_Language_name = Core.Name "name"
-_Language_constraints = Core.Name "constraints"
--- | A set of constraints on valid type and term expressions, characterizing a language
-data LanguageConstraints =
-  LanguageConstraints {
-    -- | All supported elimination variants
-    languageConstraintsEliminationVariants :: (S.Set Variants.EliminationVariant),
-    -- | All supported literal variants
-    languageConstraintsLiteralVariants :: (S.Set Variants.LiteralVariant),
-    -- | All supported float types
-    languageConstraintsFloatTypes :: (S.Set Core.FloatType),
-    -- | All supported function variants
-    languageConstraintsFunctionVariants :: (S.Set Variants.FunctionVariant),
-    -- | All supported integer types
-    languageConstraintsIntegerTypes :: (S.Set Core.IntegerType),
-    -- | All supported term variants
-    languageConstraintsTermVariants :: (S.Set Variants.TermVariant),
-    -- | All supported type variants
-    languageConstraintsTypeVariants :: (S.Set Variants.TypeVariant),
-    -- | A logical set of types, as a predicate which tests a type for inclusion
-    languageConstraintsTypes :: (Core.Type -> Bool)}
-_LanguageConstraints = Core.Name "hydra.coders.LanguageConstraints"
-_LanguageConstraints_eliminationVariants = Core.Name "eliminationVariants"
-_LanguageConstraints_literalVariants = Core.Name "literalVariants"
-_LanguageConstraints_floatTypes = Core.Name "floatTypes"
-_LanguageConstraints_functionVariants = Core.Name "functionVariants"
-_LanguageConstraints_integerTypes = Core.Name "integerTypes"
-_LanguageConstraints_termVariants = Core.Name "termVariants"
-_LanguageConstraints_typeVariants = Core.Name "typeVariants"
-_LanguageConstraints_types = Core.Name "types"
--- | The unique name of a language
-newtype LanguageName =
-  LanguageName {
-    unLanguageName :: String}
-  deriving (Eq, Ord, Read, Show)
-_LanguageName = Core.Name "hydra.coders.LanguageName"
--- | A bidirectional encoder which maps between the same type and term languages on either side
-type SymmetricAdapter t v = (Adapter t t v v)
-_SymmetricAdapter = Core.Name "hydra.coders.SymmetricAdapter"
--- | Specifies either a pre-order or post-order traversal
-data TraversalOrder =
-  -- | Pre-order traversal
-  TraversalOrderPre |
-  -- | Post-order traversal
-  TraversalOrderPost
-  deriving (Eq, Ord, Read, Show)
-_TraversalOrder = Core.Name "hydra.coders.TraversalOrder"
-_TraversalOrder_pre = Core.Name "pre"
-_TraversalOrder_post = Core.Name "post"
--- | A function which maps a Hydra type to a symmetric adapter between types and terms
-type TypeAdapter = (AdapterContext -> Core.Type -> Either String (SymmetricAdapter Core.Type Core.Term))
-_TypeAdapter = Core.Name "hydra.coders.TypeAdapter"
diff --git a/src/main/haskell/Hydra/Constants.hs b/src/main/haskell/Hydra/Constants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Constants.hs
+++ /dev/null
@@ -1,55 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A module for tier-0 constants.
-
-module Hydra.Constants where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Disable type checking by default, for better performance
-debugInference :: Bool
-debugInference = True
--- | The name used for ignored variables
-ignoredVariable :: String
-ignoredVariable = "_"
--- | Annotation key for type classes
-key_classes :: Core.Name
-key_classes = Core.Name "classes"
--- | Annotation key for debug identifiers
-key_debugId :: Core.Name
-key_debugId = Core.Name "debugId"
--- | Annotation key for deprecated markers
-key_deprecated :: Core.Name
-key_deprecated = Core.Name "deprecated"
--- | Annotation key for descriptions
-key_description :: Core.Name
-key_description = Core.Name "description"
--- | Annotation key for exclusions
-key_exclude :: Core.Name
-key_exclude = Core.Name "exclude"
--- | A flag which tells the language coders to encode a given encoded type as a term rather than a native type
-key_firstClassType :: Core.Name
-key_firstClassType = Core.Name "firstClassType"
--- | A counter for generating fresh type variable names
-key_freshTypeVariableCount :: Core.Name
-key_freshTypeVariableCount = Core.Name "freshTypeVariableCount"
--- | Annotation key for maximum length constraints
-key_maxLength :: Core.Name
-key_maxLength = Core.Name "maxLength"
--- | Annotation key for minimum length constraints
-key_minLength :: Core.Name
-key_minLength = Core.Name "minLength"
--- | Annotation key for preserving field names during code generation
-key_preserveFieldName :: Core.Name
-key_preserveFieldName = Core.Name "preserveFieldName"
--- | Annotation key for type information
-key_type :: Core.Name
-key_type = Core.Name "type"
--- | The maximum value of a 32-bit integer
-maxInt32 :: Int
-maxInt32 = 2147483647
--- | A maximum depth for nested computations. Currently, this is set very high because deep recursion is common in type inference over the Hydra kernel.
-maxTraceDepth :: Int
-maxTraceDepth = 5000
--- | A standard warning message for auto-generated files
-warningAutoGeneratedFile :: String
-warningAutoGeneratedFile = "Note: this is an automatically generated file. Do not edit."
diff --git a/src/main/haskell/Hydra/Context.hs b/src/main/haskell/Hydra/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Context.hs
+++ /dev/null
@@ -1,33 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Execution context for tracing and diagnostics
-
-module Hydra.Context 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 execution context for tracing and diagnostics, threaded through function calls
-data Context =
-  Context {
-    -- | A stack of context labels describing the current execution path
-    contextTrace :: [String],
-    -- | A log of warnings and/or info messages
-    contextMessages :: [String],
-    -- | A map of string keys to arbitrary terms as values, for application-specific use
-    contextOther :: (M.Map Core.Name Core.Term)}
-  deriving (Eq, Ord, Read, Show)
-_Context = Core.Name "hydra.context.Context"
-_Context_trace = Core.Name "trace"
-_Context_messages = Core.Name "messages"
-_Context_other = Core.Name "other"
--- | A particular domain object (such as an error) together with an execution context
-data InContext e =
-  InContext {
-    -- | A domain object; typically an error
-    inContextObject :: e,
-    -- | The execution context at the point of capture
-    inContextContext :: Context}
-  deriving (Eq, Ord, Read, Show)
-_InContext = Core.Name "hydra.context.InContext"
-_InContext_object = Core.Name "object"
-_InContext_context = Core.Name "context"
diff --git a/src/main/haskell/Hydra/Coq/Coder.hs b/src/main/haskell/Hydra/Coq/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Coder.hs
+++ /dev/null
@@ -1,638 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Coq code generator: converts Hydra modules to Coq source
-
-module Hydra.Coq.Coder where
-
-import qualified Hydra.Coq.Environment as Environment
-import qualified Hydra.Coq.Language as Language
-import qualified Hydra.Coq.Syntax as Syntax
-import qualified Hydra.Coq.Utils as Utils
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Build the Coq dependent-function term `forall (_ : dom), cod` used as the arrow type
-coqArrow :: Syntax.Term -> Syntax.Term -> Syntax.Term
-coqArrow dom cod =
-    Syntax.TermForallOrFun (Syntax.ForallOrFunForall (Syntax.Forall {
-      Syntax.forallBinders = (Syntax.OpenBindersBinders [
-        Syntax.BinderType (Syntax.TypeBinders {
-          Syntax.typeBindersNames = [
-            Syntax.Name Nothing],
-          Syntax.typeBindersType = (coqTypeTerm dom)})]),
-      Syntax.forallType = (coqTypeTerm cod)}))
-
-coqIdent :: String -> Syntax.Ident
-coqIdent s = Syntax.Ident (Syntax.String_ s)
-
-coqName :: String -> Syntax.Name
-coqName s = Syntax.Name (Just (coqIdent s))
-
-coqQualid :: String -> Syntax.Qualid
-coqQualid s =
-    Syntax.Qualid {
-      Syntax.qualidId = (coqIdent s),
-      Syntax.qualidFieldIds = []}
-
--- | Apply a Coq term to a list of argument terms, parenthesising each
-coqTermApp :: Syntax.Term -> [Syntax.Term] -> Syntax.Term
-coqTermApp f args =
-    Logic.ifElse (Lists.null args) f (Syntax.TermTerm100 (Syntax.Term100Term10 (Syntax.Term10Application (Syntax.ApplicationNormal (Syntax.NormalApplication {
-      Syntax.normalApplicationLhs = (Syntax.Term1Term0 (Syntax.Term0Parens f)),
-      Syntax.normalApplicationRhs = (Lists.map (\a -> Syntax.ArgTerm (Syntax.Term1Term0 (Syntax.Term0Parens a))) args)})))))
-
--- | Build a Coq Term expressing `(t : T)` with the normal cast operator
-coqTermCast :: Syntax.Term -> Syntax.Type -> Syntax.Term
-coqTermCast t ty =
-    Syntax.TermTerm100 (Syntax.Term100Cast (Syntax.TypeCast {
-      Syntax.typeCastTerm = (Syntax.Term10OneTerm (Syntax.OneTermTerm1 (Syntax.Term1Term0 (Syntax.Term0Parens t)))),
-      Syntax.typeCastType = ty,
-      Syntax.typeCastOperator = Syntax.TypeCastOperatorNormal}))
-
--- | Build a Coq Term that references a (possibly qualified) identifier
-coqTermQualid :: String -> Syntax.Term
-coqTermQualid s =
-    Syntax.TermTerm100 (Syntax.Term100Term10 (Syntax.Term10OneTerm (Syntax.OneTermExplicit (Syntax.QualidAnnotated {
-      Syntax.qualidAnnotatedQualid = (coqQualid s),
-      Syntax.qualidAnnotatedUnivAnnot = Nothing}))))
-
-coqTypeTerm :: Syntax.Term -> Syntax.Type
-coqTypeTerm t = Syntax.Type t
-
--- | Produce `Axiom name : type.` from a (name, Hydra type) pair
-encodeAxiomDefinitionPair :: Environment.CoqEnvironment -> (String, Core.Type) -> Syntax.Sentence
-encodeAxiomDefinitionPair env nt =
-    Syntax.Sentence {
-      Syntax.sentenceComment = Nothing,
-      Syntax.sentenceContent = (Syntax.SentenceContentAxiom (Syntax.AxiomDeclaration {
-        Syntax.axiomDeclarationName = (coqIdent (Pairs.first nt)),
-        Syntax.axiomDeclarationType = (coqTypeTerm (encodeType env (Pairs.second nt)))}))}
-
--- | Map a Haskell-`show`n Double/Scientific to a Coq term, routing NaN/Inf to base-lib axioms
-encodeFloatLiteral :: String -> Syntax.Term
-encodeFloatLiteral s =
-    Logic.ifElse (Equality.equal s "Infinity") (coqTermQualid "hydra_posInf") (Logic.ifElse (Equality.equal s "-Infinity") (coqTermQualid "hydra_negInf") (Logic.ifElse (Equality.equal s "NaN") (coqTermQualid "hydra_nan") (coqTermQualid (Strings.cat [
-      "(",
-      s,
-      ")"]))))
-
--- | Encode a Lambda into a Coq `fun` expression, sanitising the parameter name
-encodeLambdaTerm :: Environment.CoqEnvironment -> Core.Lambda -> Syntax.Term
-encodeLambdaTerm env lam =
-
-      let paramName = sanitizeVar (Core.unName (Core.lambdaParameter lam))
-          binder =
-                  Maybes.maybe (Syntax.BinderName (coqName paramName)) (\domTy -> Syntax.BinderType (Syntax.TypeBinders {
-                    Syntax.typeBindersNames = [
-                      coqName paramName],
-                    Syntax.typeBindersType = (coqTypeTerm (encodeType env domTy))})) (Core.lambdaDomain lam)
-      in (Syntax.TermForallOrFun (Syntax.ForallOrFunFun (Syntax.Fun {
-        Syntax.funBinders = (Syntax.OpenBindersBinders [
-          binder]),
-        Syntax.funBody = (encodeTerm env (Core.lambdaBody lam))})))
-
--- | Translate a Hydra literal into its Coq stdlib form, with disambiguating parentheses
-encodeLiteral :: Core.Literal -> Syntax.Term
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBoolean v0 -> Logic.ifElse v0 (coqTermQualid "true") (coqTermQualid "false")
-      Core.LiteralDecimal v0 -> coqTermQualid (Strings.cat [
-        "(",
-        (Literals.showDecimal v0),
-        ")"])
-      Core.LiteralFloat v0 -> case v0 of
-        Core.FloatValueBigfloat v1 -> encodeFloatLiteral (Literals.showBigfloat v1)
-        Core.FloatValueFloat32 v1 -> encodeFloatLiteral (Literals.showBigfloat (Literals.float32ToBigfloat v1))
-        Core.FloatValueFloat64 v1 -> encodeFloatLiteral (Literals.showBigfloat (Literals.float64ToBigfloat v1))
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueBigint v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showBigint v1),
-          ")%Z"])
-        Core.IntegerValueInt8 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showInt8 v1),
-          ")%Z"])
-        Core.IntegerValueInt16 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showInt16 v1),
-          ")%Z"])
-        Core.IntegerValueInt32 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showInt32 v1),
-          ")%Z"])
-        Core.IntegerValueInt64 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showInt64 v1),
-          ")%Z"])
-        Core.IntegerValueUint8 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showUint8 v1),
-          ")"])
-        Core.IntegerValueUint16 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showUint16 v1),
-          ")"])
-        Core.IntegerValueUint32 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showUint32 v1),
-          ")"])
-        Core.IntegerValueUint64 v1 -> coqTermQualid (Strings.cat [
-          "(",
-          (Literals.showUint64 v1),
-          ")"])
-      Core.LiteralString v0 -> coqTermQualid (Strings.cat [
-        "\"",
-        (escapeCoqString v0),
-        "\"%string"])
-      Core.LiteralBinary _ -> coqTermQualid "\"\""
-
--- | Map a Hydra LiteralType to its Coq stdlib counterpart
-encodeLiteralType :: Core.LiteralType -> Syntax.Term
-encodeLiteralType lt =
-    case lt of
-      Core.LiteralTypeBoolean -> coqTermQualid "bool"
-      Core.LiteralTypeDecimal -> coqTermQualid "Q"
-      Core.LiteralTypeFloat _ -> coqTermQualid "Q"
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeBigint -> coqTermQualid "Z"
-        Core.IntegerTypeInt8 -> coqTermQualid "Z"
-        Core.IntegerTypeInt16 -> coqTermQualid "Z"
-        Core.IntegerTypeInt32 -> coqTermQualid "Z"
-        Core.IntegerTypeInt64 -> coqTermQualid "Z"
-        Core.IntegerTypeUint8 -> coqTermQualid "nat"
-        Core.IntegerTypeUint16 -> coqTermQualid "nat"
-        Core.IntegerTypeUint32 -> coqTermQualid "nat"
-        Core.IntegerTypeUint64 -> coqTermQualid "nat"
-      Core.LiteralTypeString -> coqTermQualid "string"
-      Core.LiteralTypeBinary -> coqTermQualid "string"
-
--- | Translate a Hydra record projection into a Coq lambda that pulls out the field
-encodeProjectionElim :: Environment.CoqEnvironment -> Core.Projection -> Syntax.Term
-encodeProjectionElim env p =
-
-      let fname = Core.projectionField p
-          rawFname = Core.unName fname
-          sanitizedSet = Environment.coqEnvironmentSanitizedAccessors env
-      in (Logic.ifElse (Sets.member rawFname sanitizedSet) (Syntax.TermForallOrFun (Syntax.ForallOrFunFun (Syntax.Fun {
-        Syntax.funBinders = (Syntax.OpenBindersBinders [
-          Syntax.BinderName (coqName "_")]),
-        Syntax.funBody = (coqTermQualid "hydra_unreachable")}))) (Syntax.TermForallOrFun (Syntax.ForallOrFunFun (Syntax.Fun {
-        Syntax.funBinders = (Syntax.OpenBindersBinders [
-          Syntax.BinderName (coqName "r_")]),
-        Syntax.funBody = (coqTermApp (coqTermQualid rawFname) [
-          coqTermQualid "r_"])}))))
-
--- | Translate a Hydra Term into its Coq Term counterpart. The environment provides the constructor-count map used by encodeUnionElim (to decide whether a match is exhaustive) and the ambiguous-name set used by resolveQualifiedName (to decide whether cross-module references need to stay fully qualified).
-encodeTerm :: Environment.CoqEnvironment -> Core.Term -> Syntax.Term
-encodeTerm env tm =
-    case tm of
-      Core.TermAnnotated v0 -> encodeTerm env (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> coqTermApp (encodeTerm env (Core.applicationFunction v0)) [
-        encodeTerm env (Core.applicationArgument v0)]
-      Core.TermCases v0 -> encodeUnionElim env v0
-      Core.TermEither v0 -> Eithers.either (\l -> coqTermApp (coqTermQualid "inl") [
-        encodeTerm env l]) (\r -> coqTermApp (coqTermQualid "inr") [
-        encodeTerm env r]) v0
-      Core.TermInject v0 ->
-        let uname = Core.injectionTypeName v0
-            ufield = Core.injectionField v0
-            fname = Core.fieldName ufield
-            fterm = Core.fieldTerm ufield
-            constrName = unionConstructorName (Core.unName uname) (Core.unName fname)
-        in (coqTermApp (coqTermQualid (resolveQualifiedName env constrName)) [
-          encodeTerm env fterm])
-      Core.TermLambda v0 -> encodeLambdaTerm env v0
-      Core.TermLet v0 ->
-        let bindings = Core.letBindings v0
-            body = Core.letBody v0
-        in (Lists.foldr (\binding -> \acc ->
-          let bname = Core.bindingName binding
-              bterm = Core.bindingTerm binding
-              safeName = sanitizeVar (Core.unName bname)
-              recursive = termReferencesVar bname bterm
-              recBody =
-                      coqTermApp (coqTermQualid "hydra_fix") [
-                        Syntax.TermForallOrFun (Syntax.ForallOrFunFun (Syntax.Fun {
-                          Syntax.funBinders = (Syntax.OpenBindersBinders [
-                            Syntax.BinderName (coqName safeName)]),
-                          Syntax.funBody = (encodeTerm env bterm)}))]
-              boundTerm = Logic.ifElse recursive recBody (encodeTerm env bterm)
-          in (Syntax.TermLet (Syntax.Let {
-            Syntax.letBindings = (Syntax.LetBindingsNamed (Syntax.LetNamed {
-              Syntax.letNamedBinder = Syntax.LetBinder {
-                Syntax.letBinderName = (coqName safeName),
-                Syntax.letBinderType = Nothing,
-                Syntax.letBinderTerm = boundTerm},
-              Syntax.letNamedBinders = []})),
-            Syntax.letIn = acc}))) (encodeTerm env body) bindings)
-      Core.TermList v0 -> Lists.foldr (\el -> \acc -> coqTermApp (coqTermQualid "cons") [
-        encodeTerm env el,
-        acc]) (coqTermQualid "nil") v0
-      Core.TermLiteral v0 -> encodeLiteral v0
-      Core.TermMap v0 -> Lists.foldr (\kv -> \acc -> coqTermApp (coqTermQualid "cons") [
-        coqTermApp (coqTermQualid "pair") [
-          encodeTerm env (Pairs.first kv),
-          (encodeTerm env (Pairs.second kv))],
-        acc]) (coqTermQualid "nil") (Maps.toList v0)
-      Core.TermMaybe v0 -> Maybes.maybe (coqTermQualid "None") (\v -> coqTermApp (coqTermQualid "Some") [
-        encodeTerm env v]) v0
-      Core.TermPair v0 -> coqTermApp (coqTermQualid "pair") [
-        encodeTerm env (Pairs.first v0),
-        (encodeTerm env (Pairs.second v0))]
-      Core.TermProject v0 -> encodeProjectionElim env v0
-      Core.TermRecord v0 ->
-        let rname = Core.recordTypeName v0
-            rfields = Core.recordFields v0
-        in (Logic.ifElse (Lists.null rfields) (coqTermQualid "tt") (coqTermApp (coqTermQualid (resolveQualifiedName env (Strings.cat2 "Build_" (Core.unName rname)))) (Lists.map (\f -> encodeTerm env (Core.fieldTerm f)) rfields)))
-      Core.TermSet v0 -> Lists.foldr (\el -> \acc -> coqTermApp (coqTermQualid "cons") [
-        encodeTerm env el,
-        acc]) (coqTermQualid "nil") (Sets.toList v0)
-      Core.TermTypeApplication v0 ->
-        let body = Core.typeApplicationTermBody v0
-            tyArg = Core.typeApplicationTermType v0
-            encoded = encodeTerm env body
-            isGround = Sets.null (Utils.collectFreeTypeVarsInType tyArg)
-        in (Logic.ifElse (Logic.not isGround) encoded (case body of
-          Core.TermMaybe v1 -> Maybes.maybe (coqTermCast (coqTermQualid "None") (coqTypeTerm (coqTermApp (coqTermQualid "option") [
-            encodeType env tyArg]))) (\_ -> encoded) v1
-          Core.TermList v1 -> Logic.ifElse (Logic.and (Lists.null v1) (case tyArg of
-            Core.TypeEither _ -> True
-            Core.TypePair _ -> True
-            Core.TypeMap _ -> True
-            _ -> False)) (coqTermCast (coqTermQualid "nil") (coqTypeTerm (coqTermApp (coqTermQualid "list") [
-            encodeType env tyArg]))) encoded
-          Core.TermEither _ -> case tyArg of
-            Core.TypeEither v2 ->
-              let sumTy =
-                      coqTypeTerm (coqTermApp (coqTermQualid "sum") [
-                        encodeType env (Core.eitherTypeLeft v2),
-                        (encodeType env (Core.eitherTypeRight v2))])
-              in (coqTermCast encoded sumTy)
-            _ -> encoded
-          Core.TermTypeApplication v1 ->
-            let innerBody = Core.typeApplicationTermBody v1
-                innerTyArg = Core.typeApplicationTermType v1
-                innerEncoded = encodeTerm env innerBody
-            in case innerBody of
-              Core.TermEither _ ->
-                let sumTy =
-                        coqTypeTerm (coqTermApp (coqTermQualid "sum") [
-                          encodeType env innerTyArg,
-                          (encodeType env tyArg)])
-                in (coqTermCast innerEncoded sumTy)
-              _ -> encoded
-          _ -> encoded))
-      Core.TermTypeLambda v0 -> encodeTerm env (Core.typeLambdaBody v0)
-      Core.TermUnit -> coqTermQualid "tt"
-      Core.TermUnwrap v0 -> encodeWrapElim v0
-      Core.TermVariable v0 -> coqTermQualid (resolveQualifiedName env (Core.unName v0))
-      Core.TermWrap v0 -> encodeTerm env (Core.wrappedTermBody v0)
-
--- | Build a Coq `Definition name := body.` sentence from a Hydra term
-encodeTermDefinition :: Environment.CoqEnvironment -> String -> Core.Term -> Syntax.SentenceContent
-encodeTermDefinition env name body =
-    Syntax.SentenceContentDefinition (Syntax.Definition {
-      Syntax.definitionLocality = Nothing,
-      Syntax.definitionName = (coqIdent name),
-      Syntax.definitionBinders = [],
-      Syntax.definitionType = Nothing,
-      Syntax.definitionBody = (encodeTerm env body)})
-
--- | Wrap encodeTermDefinition in a Coq Sentence with no leading comment
-encodeTermDefinitionPair :: Environment.CoqEnvironment -> (String, Core.Term) -> Syntax.Sentence
-encodeTermDefinitionPair env ed =
-    Syntax.Sentence {
-      Syntax.sentenceComment = Nothing,
-      Syntax.sentenceContent = (encodeTermDefinition env (Pairs.first ed) (Pairs.second ed))}
-
--- | Translate a Hydra Type into a Coq Term representing that type. The environment is consulted to resolve qualified type variable references
-encodeType :: Environment.CoqEnvironment -> Core.Type -> Syntax.Term
-encodeType env ty =
-    case ty of
-      Core.TypeAnnotated v0 -> encodeType env (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> coqTermApp (encodeType env (Core.applicationTypeFunction v0)) [
-        encodeType env (Core.applicationTypeArgument v0)]
-      Core.TypeEither v0 -> coqTermApp (coqTermQualid "sum") [
-        encodeType env (Core.eitherTypeLeft v0),
-        (encodeType env (Core.eitherTypeRight v0))]
-      Core.TypeForall v0 -> Syntax.TermForallOrFun (Syntax.ForallOrFunForall (Syntax.Forall {
-        Syntax.forallBinders = (Syntax.OpenBindersBinders [
-          Syntax.BinderType (Syntax.TypeBinders {
-            Syntax.typeBindersNames = [
-              coqName (Core.unName (Core.forallTypeParameter v0))],
-            Syntax.typeBindersType = (coqTypeTerm (coqTermQualid "Type"))})]),
-        Syntax.forallType = (coqTypeTerm (encodeType env (Core.forallTypeBody v0)))}))
-      Core.TypeFunction v0 -> coqArrow (encodeType env (Core.functionTypeDomain v0)) (encodeType env (Core.functionTypeCodomain v0))
-      Core.TypeList v0 -> coqTermApp (coqTermQualid "list") [
-        encodeType env v0]
-      Core.TypeLiteral v0 -> encodeLiteralType v0
-      Core.TypeMap v0 -> coqTermApp (coqTermQualid "list") [
-        coqTermApp (coqTermQualid "prod") [
-          encodeType env (Core.mapTypeKeys v0),
-          (encodeType env (Core.mapTypeValues v0))]]
-      Core.TypeMaybe v0 -> coqTermApp (coqTermQualid "option") [
-        encodeType env v0]
-      Core.TypePair v0 -> coqTermApp (coqTermQualid "prod") [
-        encodeType env (Core.pairTypeFirst v0),
-        (encodeType env (Core.pairTypeSecond v0))]
-      Core.TypeRecord _ -> coqTermQualid "unit"
-      Core.TypeSet v0 -> coqTermApp (coqTermQualid "list") [
-        encodeType env v0]
-      Core.TypeUnion _ -> coqTermQualid "unit"
-      Core.TypeUnit -> coqTermQualid "unit"
-      Core.TypeVariable v0 ->
-        let raw = Core.unName v0
-            headSeg = Maybes.fromMaybe raw (Lists.maybeHead (Strings.splitOn "." raw))
-        in (Logic.ifElse (Logic.or (Equality.equal headSeg "hydra") (Equality.equal headSeg "Build_hydra")) (coqTermQualid (resolveQualifiedName env raw)) (coqTermQualid raw))
-      Core.TypeVoid -> coqTermQualid "Empty_set"
-      Core.TypeWrap v0 -> encodeType env v0
-
--- | Build a Coq `Definition name : Type := body.` sentence from a Hydra type
-encodeTypeDefinition :: Environment.CoqEnvironment -> String -> Core.Type -> Syntax.SentenceContent
-encodeTypeDefinition env name ty =
-    Syntax.SentenceContentDefinition (Syntax.Definition {
-      Syntax.definitionLocality = Nothing,
-      Syntax.definitionName = (coqIdent name),
-      Syntax.definitionBinders = [],
-      Syntax.definitionType = (Just (coqTypeTerm (coqTermQualid "Type"))),
-      Syntax.definitionBody = (encodeType env ty)})
-
--- | Wrap encodeTypeDefinition in a Coq Sentence with no leading comment
-encodeTypeDefinitionPair :: Environment.CoqEnvironment -> (String, Core.Type) -> Syntax.Sentence
-encodeTypeDefinitionPair env td =
-    Syntax.Sentence {
-      Syntax.sentenceComment = Nothing,
-      Syntax.sentenceContent = (encodeTypeDefinition env (Pairs.first td) (Pairs.second td))}
-
--- | Construct a Coq Inductive Constructor line `Name_Tag : body -> Name` for a union variant
-encodeUnionConstructor :: Environment.CoqEnvironment -> String -> Core.FieldType -> Syntax.Constructor
-encodeUnionConstructor env typeName f =
-
-      let ufn = Core.fieldTypeName f
-          uft = Core.fieldTypeType f
-          constrName =
-                  Strings.cat [
-                    typeName,
-                    "_",
-                    (Formatting.capitalize (Core.unName ufn))]
-      in Syntax.Constructor {
-        Syntax.constructorName = (coqIdent constrName),
-        Syntax.constructorBinders = [],
-        Syntax.constructorType = (Just (coqTypeTerm (coqArrow (encodeType env uft) (coqTermQualid typeName))))}
-
--- | Build a Coq match expression from a Hydra union eliminator. Uses the constructor-count map in the environment to decide whether the match is exhaustive: if so, an explicit default is suppressed; if not and the kernel didn't provide one, inserts `| _ => hydra_unreachable`.
-encodeUnionElim :: Environment.CoqEnvironment -> Core.CaseStatement -> Syntax.Term
-encodeUnionElim env cs =
-
-      let csName = Core.caseStatementTypeName cs
-          csCases = Core.caseStatementCases cs
-          csDefault = Core.caseStatementDefault cs
-          csLocalName = localTypeName (Core.unName csName)
-          expectedCount = Maps.lookup csLocalName (Environment.coqEnvironmentConstructorCounts env)
-          caseCount = Lists.length csCases
-          baseEqs =
-                  Lists.map (\c ->
-                    let cfn = Core.fieldName c
-                        cft = Core.fieldTerm c
-                        constr = resolveQualifiedName env (unionConstructorName (Core.unName csName) (Core.unName cfn))
-                    in (Logic.ifElse (isUnitLambda cft) (Syntax.Equation {
-                      Syntax.equationPattern = [
-                        [
-                          Syntax.PatternPattern (Syntax.Pattern10Qualiid (Syntax.Pattern10_Qualid {
-                            Syntax.pattern10_QualidQualid = (coqQualid constr),
-                            Syntax.pattern10_QualidPatterns = [
-                              Syntax.Pattern1 {
-                                Syntax.pattern1Pattern = (Syntax.Pattern0Qualid (coqQualid "_")),
-                                Syntax.pattern1Scope = Nothing}]}))]],
-                      Syntax.equationTerm = (encodeTerm env (unitLambdaBody cft))}) (Syntax.Equation {
-                      Syntax.equationPattern = [
-                        [
-                          Syntax.PatternPattern (Syntax.Pattern10Qualiid (Syntax.Pattern10_Qualid {
-                            Syntax.pattern10_QualidQualid = (coqQualid constr),
-                            Syntax.pattern10_QualidPatterns = [
-                              Syntax.Pattern1 {
-                                Syntax.pattern1Pattern = (Syntax.Pattern0Qualid (coqQualid "v_")),
-                                Syntax.pattern1Scope = Nothing}]}))]],
-                      Syntax.equationTerm = (coqTermApp (encodeTerm env cft) [
-                        coqTermQualid "v_"])}))) csCases
-          wildcardEq =
-                  \body -> Syntax.Equation {
-                    Syntax.equationPattern = [
-                      [
-                        Syntax.PatternPattern (Syntax.Pattern10Qualiid (Syntax.Pattern10_Qualid {
-                          Syntax.pattern10_QualidQualid = (coqQualid "_"),
-                          Syntax.pattern10_QualidPatterns = []}))]],
-                    Syntax.equationTerm = body}
-          defaultEqs =
-                  Maybes.maybe (Logic.ifElse (Maybes.maybe False (\n -> Logic.not (Equality.gte caseCount n)) expectedCount) [
-                    wildcardEq (coqTermQualid "hydra_unreachable")] []) (\defT -> Logic.ifElse (Maybes.maybe False (\n -> Equality.gte caseCount n) expectedCount) [] [
-                    wildcardEq (encodeTerm env defT)]) csDefault
-          allEqs = Lists.concat2 baseEqs defaultEqs
-      in (Syntax.TermForallOrFun (Syntax.ForallOrFunFun (Syntax.Fun {
-        Syntax.funBinders = (Syntax.OpenBindersBinders [
-          Syntax.BinderName (coqName "x_")]),
-        Syntax.funBody = (Syntax.TermTerm100 (Syntax.Term100Term10 (Syntax.Term10OneTerm (Syntax.OneTermTerm1 (Syntax.Term1Term0 (Syntax.Term0Match (Syntax.Match {
-          Syntax.matchCaseItems = [
-            Syntax.CaseItem {
-              Syntax.caseItemTerm = (Syntax.Term100Term10 (Syntax.Term10OneTerm (Syntax.OneTermExplicit (Syntax.QualidAnnotated {
-                Syntax.qualidAnnotatedQualid = (coqQualid "x_"),
-                Syntax.qualidAnnotatedUnivAnnot = Nothing})))),
-              Syntax.caseItemAs = Nothing,
-              Syntax.caseItemIn = Nothing}],
-          Syntax.matchReturn = Nothing,
-          Syntax.matchPipe = True,
-          Syntax.matchEquations = allEqs})))))))})))
-
--- | A Hydra wrap eliminator is just the identity on the wrapped object in Coq
-encodeWrapElim :: t0 -> Syntax.Term
-encodeWrapElim _n =
-    Syntax.TermForallOrFun (Syntax.ForallOrFunFun (Syntax.Fun {
-      Syntax.funBinders = (Syntax.OpenBindersBinders [
-        Syntax.BinderName (coqName "w_")]),
-      Syntax.funBody = (coqTermQualid "w_")}))
-
--- | Escape a string for Coq string literals: double any embedded quotes
-escapeCoqString :: String -> String
-escapeCoqString s = Strings.intercalate "\"\"" (Strings.splitOn "\"" s)
-
--- | Collect a chain of leading lambdas as Coq binders, converting type annotations as well
-extractLambdaBinders :: Environment.CoqEnvironment -> Core.Term -> [Syntax.Binder]
-extractLambdaBinders env tm =
-    case tm of
-      Core.TermAnnotated v0 -> extractLambdaBinders env (Core.annotatedTermBody v0)
-      Core.TermLambda v0 ->
-        let param = Core.lambdaParameter v0
-            mDomain = Core.lambdaDomain v0
-            binder =
-                    Maybes.maybe (Syntax.BinderName (coqName (Core.unName param))) (\domTy -> Syntax.BinderType (Syntax.TypeBinders {
-                      Syntax.typeBindersNames = [
-                        coqName (Core.unName param)],
-                      Syntax.typeBindersType = (coqTypeTerm (encodeType env domTy))})) mDomain
-        in (Lists.cons binder (extractLambdaBinders env (Core.lambdaBody v0)))
-      _ -> []
-
--- | True if the Maybe Type is the unit type, looking through annotations
-isUnitDomain :: Maybe Core.Type -> Bool
-isUnitDomain mty =
-    Maybes.maybe False (\ty -> case ty of
-      Core.TypeUnit -> True
-      Core.TypeRecord v0 -> Lists.null v0
-      Core.TypeAnnotated v0 -> isUnitDomain (Just (Core.annotatedTypeBody v0))
-      _ -> False) mty
-
--- | Detect a lambda over the unit type whose parameter is not referenced in the body
-isUnitLambda :: Core.Term -> Bool
-isUnitLambda tm =
-    case tm of
-      Core.TermAnnotated v0 -> isUnitLambda (Core.annotatedTermBody v0)
-      Core.TermLambda v0 ->
-        let unused = Logic.not (termReferencesVar (Core.lambdaParameter v0) (Core.lambdaBody v0))
-        in (Logic.and (isUnitDomain (Core.lambdaDomain v0)) unused)
-      _ -> False
-
--- | Take the last dot-separated segment of a (possibly) qualified Hydra name and sanitize it
-localTypeName :: String -> String
-localTypeName s =
-
-      let parts = Strings.splitOn "." s
-          localPart = Maybes.fromMaybe s (Lists.maybeLast parts)
-      in (sanitizeVar localPart)
-
--- | Build a Coq Document from lists of type definitions and term definitions
-moduleToCoq :: Environment.CoqEnvironment -> [(String, Core.Type)] -> [(String, Core.Term)] -> Syntax.Document
-moduleToCoq env typeDefs termDefs =
-
-      let typesSentences = Lists.map (\td -> encodeTypeDefinitionPair env td) typeDefs
-          termsSentences = Lists.map (\ed -> encodeTermDefinitionPair env ed) termDefs
-      in Syntax.Document {
-        Syntax.documentSentences = (Lists.concat [
-          [
-            standardImports],
-          typesSentences,
-          termsSentences])}
-
--- | Rewrite a stripped hydra.lib.<mod>.<func> name to avoid Coq keyword collisions
-renameLibKeyword :: String -> String
-renameLibKeyword s =
-    Logic.ifElse (Equality.equal s "lists.at") "lists.at_" (Logic.ifElse (Equality.equal s "math.mod") "math.mod_" s)
-
--- | Emit a Coq `Require Import m1 m2 ...` sentence with a `Standard library imports` comment
-requireImportSentence :: [String] -> Syntax.Sentence
-requireImportSentence mods =
-    Syntax.Sentence {
-      Syntax.sentenceComment = (Just (Syntax.Comment "Standard library imports")),
-      Syntax.sentenceContent = (Syntax.SentenceContentRequireImport (Syntax.RequireImport {
-        Syntax.requireImportFrom = Nothing,
-        Syntax.requireImportRequire = True,
-        Syntax.requireImportQualification = (Just Syntax.ImportQualificationImport),
-        Syntax.requireImportModules = (Lists.map (\m -> coqQualid m) mods)}))}
-
--- | Resolve a (possibly qualified) Hydra identifier to the form that should appear in Coq source
-resolveQualifiedName :: Environment.CoqEnvironment -> String -> String
-resolveQualifiedName env s =
-
-      let parts = Strings.splitOn "." s
-          head1 = Maybes.fromMaybe s (Lists.maybeHead parts)
-          currentNs = Environment.coqEnvironmentCurrentNamespace env
-          ambig = Environment.coqEnvironmentAmbiguousNames env
-      in (Logic.ifElse (Equality.equal head1 "Coq") (Maybes.fromMaybe s (Lists.maybeLast parts)) (Logic.ifElse (Equality.equal head1 "Build_hydra") (Strings.cat2 "Build_" (sanitizeStripped (Maybes.fromMaybe s (Lists.maybeLast parts)))) (Logic.ifElse (Equality.equal head1 "hydra") (
-        let rest = Lists.drop 1 parts
-            head2 = Maybes.fromMaybe "" (Lists.maybeHead rest)
-        in (Logic.ifElse (Equality.equal head2 "lib") (renameLibKeyword (Strings.intercalate "." (Lists.drop 1 rest))) (
-          let localRaw = Maybes.fromMaybe s (Lists.maybeLast parts)
-              localN = sanitizeStripped localRaw
-              sourceNs = Strings.intercalate "." (Maybes.fromMaybe [] (Lists.maybeInit parts))
-              isCurrent = Equality.equal sourceNs currentNs
-              isAmbig = Sets.member localRaw ambig
-              isCollisionProne =
-                      Logic.and (Equality.equal (Lists.length parts) 3) (Logic.and (Equality.equal head2 "parsers") (Logic.not isCurrent))
-          in (Logic.ifElse (Logic.and isAmbig (Logic.not isCurrent)) (Strings.cat [
-            sourceNs,
-            ".",
-            localN]) (Logic.ifElse isCollisionProne (Strings.cat [
-            sanitizeStripped head2,
-            ".",
-            (sanitizeStripped localRaw)]) localN))))) (sanitizeVar s))))
-
--- | Append an underscore if a stripped-local-name reference collides with a Coq reserved word
-sanitizeStripped :: String -> String
-sanitizeStripped s = Formatting.escapeWithUnderscore Language.coqStrippedReservedWords s
-
--- | Append an underscore if the name collides with a Coq reserved word
-sanitizeVar :: String -> String
-sanitizeVar s = Formatting.escapeWithUnderscore Language.coqReservedWords s
-
--- | The Coq stdlib modules plus the hand-written hydra.lib.base axioms
-standardImports :: Syntax.Sentence
-standardImports =
-    requireImportSentence [
-      "Stdlib.Strings.String",
-      "Stdlib.Lists.List",
-      "Stdlib.ZArith.ZArith",
-      "Stdlib.QArith.QArith",
-      "hydra.lib.base"]
-
--- | Peel off leading lambdas and annotations, returning the first non-lambda body
-stripLambdas :: Core.Term -> Core.Term
-stripLambdas tm =
-    case tm of
-      Core.TermAnnotated v0 -> stripLambdas (Core.annotatedTermBody v0)
-      Core.TermLambda v0 -> stripLambdas (Core.lambdaBody v0)
-      _ -> tm
-
--- | Syntactic free-variable check over the shapes encodeTerm walks through
-termReferencesVar :: Core.Name -> Core.Term -> Bool
-termReferencesVar name tm =
-    case tm of
-      Core.TermVariable v0 -> Equality.equal v0 name
-      Core.TermAnnotated v0 -> termReferencesVar name (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> Logic.or (termReferencesVar name (Core.applicationFunction v0)) (termReferencesVar name (Core.applicationArgument v0))
-      Core.TermLambda v0 -> termReferencesVar name (Core.lambdaBody v0)
-      Core.TermCases v0 -> Logic.or (Maybes.isJust (Lists.find (\f -> termReferencesVar name (Core.fieldTerm f)) (Core.caseStatementCases v0))) (Maybes.maybe False (\d -> termReferencesVar name d) (Core.caseStatementDefault v0))
-      Core.TermLet v0 -> Logic.or (Maybes.isJust (Lists.find (\b -> termReferencesVar name (Core.bindingTerm b)) (Core.letBindings v0))) (termReferencesVar name (Core.letBody v0))
-      Core.TermList v0 -> Maybes.isJust (Lists.find (\el -> termReferencesVar name el) v0)
-      Core.TermMaybe v0 -> Maybes.maybe False (\el -> termReferencesVar name el) v0
-      Core.TermPair v0 -> Logic.or (termReferencesVar name (Pairs.first v0)) (termReferencesVar name (Pairs.second v0))
-      Core.TermRecord v0 -> Maybes.isJust (Lists.find (\f -> termReferencesVar name (Core.fieldTerm f)) (Core.recordFields v0))
-      Core.TermInject v0 -> termReferencesVar name (Core.fieldTerm (Core.injectionField v0))
-      Core.TermEither v0 -> Eithers.either (\l -> termReferencesVar name l) (\r -> termReferencesVar name r) v0
-      Core.TermTypeApplication v0 -> termReferencesVar name (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> termReferencesVar name (Core.typeLambdaBody v0)
-      Core.TermWrap v0 -> termReferencesVar name (Core.wrappedTermBody v0)
-      _ -> False
-
--- | Combine a type name and field name into a constructor identifier, preserving the namespace prefix
-unionConstructorName :: String -> String -> String
-unionConstructorName typeName fieldName =
-
-      let parts = Strings.splitOn "." typeName
-          localPart = Maybes.fromMaybe typeName (Lists.maybeLast parts)
-          prefixParts = Maybes.fromMaybe [] (Lists.maybeInit parts)
-          prefix = Logic.ifElse (Lists.null prefixParts) "" (Strings.cat2 (Strings.intercalate "." prefixParts) ".")
-          sanitized = sanitizeVar localPart
-      in (Strings.cat [
-        prefix,
-        sanitized,
-        "_",
-        (Formatting.capitalize fieldName)])
-
--- | Peel the outer unit lambda off a term, returning the body
-unitLambdaBody :: Core.Term -> Core.Term
-unitLambdaBody tm =
-    case tm of
-      Core.TermAnnotated v0 -> unitLambdaBody (Core.annotatedTermBody v0)
-      Core.TermLambda v0 -> Core.lambdaBody v0
-      _ -> tm
diff --git a/src/main/haskell/Hydra/Coq/Environment.hs b/src/main/haskell/Hydra/Coq/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Environment.hs
+++ /dev/null
@@ -1,34 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Environment types for Coq code generation
-
-module Hydra.Coq.Environment 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
-import qualified Data.Set as S
-
--- | Cross-module state threaded through the Coq encoder
-data CoqEnvironment =
-  CoqEnvironment {
-    -- | The Hydra namespace of the module currently being encoded (e.g. "hydra.core"). Used by the name resolver to decide whether a cross-namespace reference needs to stay qualified.
-    coqEnvironmentCurrentNamespace :: String,
-    -- | Number of constructors in each union type, keyed by local type name (e.g. "Term" -> 14). Used to decide whether a match is exhaustive.
-    coqEnvironmentConstructorCounts :: (M.Map String Int),
-    -- | Local names (without namespace prefix) that are defined in more than one module. References to these must be kept fully qualified.
-    coqEnvironmentAmbiguousNames :: (S.Set String),
-    -- | Accessor names for record fields that were sanitized to unit due to Coq's strict positivity requirement. Applications of these accessors are replaced with hydra_unreachable at emission time.
-    coqEnvironmentSanitizedAccessors :: (S.Set String)}
-  deriving (Eq, Ord, Read, Show)
-
-_CoqEnvironment = Core.Name "hydra.coq.environment.CoqEnvironment"
-
-_CoqEnvironment_currentNamespace = Core.Name "currentNamespace"
-
-_CoqEnvironment_constructorCounts = Core.Name "constructorCounts"
-
-_CoqEnvironment_ambiguousNames = Core.Name "ambiguousNames"
-
-_CoqEnvironment_sanitizedAccessors = Core.Name "sanitizedAccessors"
diff --git a/src/main/haskell/Hydra/Coq/Generate.hs b/src/main/haskell/Hydra/Coq/Generate.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Generate.hs
+++ /dev/null
@@ -1,769 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Coq code generation driver — pre-passes, sentence producers, and per-module pipeline
-
-module Hydra.Coq.Generate where
-
-import qualified Hydra.Coq.Coder as Coder
-import qualified Hydra.Coq.Environment as Environment
-import qualified Hydra.Coq.Serde as Serde
-import qualified Hydra.Coq.Syntax as Syntax
-import qualified Hydra.Coq.Utils as Utils
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Serialization as Serialization
-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
-
--- | Render an axiom-only Coq module: imports + dependency imports + Axiom declarations
-buildAxiomOnlyContent :: Environment.CoqEnvironment -> String -> t0 -> [(String, t1)] -> [(String, (t2, ([Core.Name], (Maybe Core.Type))))] -> Packaging.Module -> String
-buildAxiomOnlyContent env desc nsStr typeDefs termDefs mod_ =
-
-      let typeOfType = Core.TypeVariable (Core.Name "Type")
-          typeAxioms = Lists.map (\nt -> Coder.encodeAxiomDefinitionPair env (Pairs.first nt, typeOfType)) typeDefs
-          termAxioms =
-                  Maybes.cat (Lists.map (\td ->
-                    let name = Pairs.first td
-                        tvars = Pairs.first (Pairs.second (Pairs.second td))
-                        mty = Pairs.second (Pairs.second (Pairs.second td))
-                    in (Maybes.maybe Nothing (\schemeTy ->
-                      let wrapped =
-                              Lists.foldr (\v -> \t -> Core.TypeForall (Core.ForallType {
-                                Core.forallTypeParameter = v,
-                                Core.forallTypeBody = t})) schemeTy tvars
-                      in (Just (Coder.encodeAxiomDefinitionPair env (name, wrapped)))) mty)) termDefs)
-          deps = Utils.moduleDependencies mod_
-          depSentences = dependencyImports deps
-          allSentences = Lists.cons Coder.standardImports (Lists.concat2 depSentences (Lists.concat2 typeAxioms termAxioms))
-          doc_ = Syntax.Document {
-                Syntax.documentSentences = allSentences}
-          body = Serialization.printExpr (Serialization.parenthesize (Serde.documentToExpr doc_))
-      in (Strings.cat [
-        desc,
-        body,
-        "\n"])
-
--- | Assemble the full (non-axiom) Coq source for a module
-buildFullModule :: Ord t1 => (Environment.CoqEnvironment -> M.Map (String, String) String -> t0 -> String -> t1 -> String -> [(String, Core.Type)] -> [(String, (Core.Term, ([Core.Name], (Maybe Core.Type))))] -> M.Map t1 String)
-buildFullModule env fieldMap mod_ nsStr path desc typeDefs termDefs =
-
-      let termDefsForSort = Lists.map (\td -> (Pairs.first td, (Pairs.first (Pairs.second td)))) termDefs
-          termDefMap = Maps.fromList (Lists.map (\td -> (Pairs.first td, (Pairs.second td))) termDefs)
-          termGroups = Utils.sortTermDefsSCC termDefsForSort
-          termGroups2 =
-                  Lists.map (\cg ->
-                    let cyc = Pairs.first cg
-                        grp = Pairs.second cg
-                        enriched =
-                                Maybes.cat (Lists.map (\nt ->
-                                  let nm = Pairs.first nt
-                                      t = Pairs.second nt
-                                  in (Maybes.map (\rec ->
-                                    let body2 = Utils.normalizeInnerTypeLambdas (Utils.rewriteTermFields fieldMap t)
-                                        rest = Pairs.second rec
-                                        vs = Pairs.first rest
-                                        mty = Pairs.second rest
-                                    in (nm, (body2, (vs, mty)))) (Maps.lookup nm termDefMap))) grp)
-                    in (cyc, enriched)) termGroups
-          typeGroups = Utils.sortTypeDefsSCC typeDefs
-          typeSentences = Lists.concat (Lists.map (\g -> generateTypeGroup env g) typeGroups)
-          termRenderedParts =
-                  Lists.concat (Lists.map (\cg ->
-                    let cyc = Pairs.first cg
-                        grp = Pairs.second cg
-                    in (Logic.ifElse cyc [
-                      encodeMutualGroupText env grp] (Lists.map (\td ->
-                      let sentences = encodeTermGroupSingleton env td
-                          nm = Pairs.first td
-                          body = Pairs.first (Pairs.second td)
-                          tv = Pairs.first (Pairs.second (Pairs.second td))
-                          schemeVarNames = Sets.fromList (Lists.map (\n -> Core.unName n) tv)
-                          body2 = Utils.reorderLetBindings (Utils.eraseUnboundTypeVarDomains schemeVarNames body)
-                          binders = mkTypeBinders body2 tv
-                          allTypeVarNames = Pairs.first binders
-                          rendered = renderSentences sentences
-                          argsLine =
-                                  Logic.ifElse (Lists.null allTypeVarNames) "" (Strings.cat [
-                                    "\nArguments ",
-                                    nm,
-                                    " ",
-                                    (Strings.intercalate " " (Lists.map (\v -> Strings.cat [
-                                      "{",
-                                      v,
-                                      "}"]) allTypeVarNames)),
-                                    "."])
-                      in (Strings.cat [
-                        rendered,
-                        argsLine,
-                        "\n"])) grp))) termGroups2)
-          allQualifiedNamesFromTypes = Sets.unions (Lists.map (\nt -> Utils.collectQualifiedNamesInType (Pairs.second nt)) typeDefs)
-          allQualifiedNamesFromTerms =
-                  Sets.unions (Lists.map (\td -> Utils.collectQualifiedNamesInTerm (Pairs.first (Pairs.second td))) termDefs)
-          allQualifiedNamesFromTermTypes =
-                  Sets.unions (Maybes.cat (Lists.map (\td ->
-                    let mty = Pairs.second (Pairs.second (Pairs.second td))
-                    in (Maybes.map (\ty ->
-                      let ep = Utils.extractTypeParams ty
-                          bodyTy = Pairs.second ep
-                      in (Utils.collectQualifiedNamesInType bodyTy)) mty)) termDefs))
-          allQualifiedNames =
-                  Sets.union allQualifiedNamesFromTypes (Sets.union allQualifiedNamesFromTerms allQualifiedNamesFromTermTypes)
-          nsSet = Sets.fromList (Lists.map (\q -> Utils.extractQualifiedNamespace q) (Sets.toList allQualifiedNames))
-          strStartsWith =
-                  \pref -> \s -> Logic.and (Equality.gte (Strings.length s) (Strings.length pref)) (Equality.equal (Strings.fromList (Lists.take (Strings.length pref) (Strings.toList s))) pref)
-          hasStrictSuffix =
-                  \nsC -> \otherList -> Maybes.isJust (Lists.find (\other -> Logic.and (Logic.not (Equality.equal other nsC)) (strStartsWith (Strings.cat [
-                    nsC,
-                    "."]) other)) otherList)
-          referencedNs =
-                  Lists.nub (Lists.filter (\nsC -> Logic.and (Logic.not (Equality.equal nsC nsStr)) (Logic.not (hasStrictSuffix nsC (Sets.toList nsSet)))) (Sets.toList nsSet))
-          depSentences = dependencyImports referencedNs
-          importText = renderRequireImports depSentences
-          typeSentencesText = renderSentences typeSentences
-          allTermText = Strings.cat termRenderedParts
-          typeArgsDecls = generateArgumentsDecls typeDefs
-          content =
-                  Strings.cat [
-                    desc,
-                    importText,
-                    "\n",
-                    typeSentencesText,
-                    "\n",
-                    allTermText,
-                    typeArgsDecls,
-                    "\n"]
-      in (Maps.fromList [
-        (path, content)])
-
--- | Emit a Require Import sentence for the given dependency namespaces; empty list yields no sentence
-dependencyImports :: [String] -> [Syntax.Sentence]
-dependencyImports deps =
-    Logic.ifElse (Lists.null deps) [] [
-      Syntax.Sentence {
-        Syntax.sentenceComment = (Just (Syntax.Comment "Module dependencies")),
-        Syntax.sentenceContent = (Syntax.SentenceContentRequireImport (Syntax.RequireImport {
-          Syntax.requireImportFrom = Nothing,
-          Syntax.requireImportRequire = True,
-          Syntax.requireImportQualification = (Just Syntax.ImportQualificationImport),
-          Syntax.requireImportModules = (Lists.map (\d -> Coder.coqQualid d) deps)}))}]
-
--- | Render a mutually recursive term group as a hydra_fix bundle plus projection Definitions
-encodeMutualGroupText :: Environment.CoqEnvironment -> [(String, (Core.Term, ([Core.Name], (Maybe Core.Type))))] -> String
-encodeMutualGroupText env group =
-
-      let groupSchemeVars =
-              Sets.fromList (Lists.concat (Lists.map (\td ->
-                let rest1 = Pairs.second td
-                    rest2 = Pairs.second rest1
-                    tv = Pairs.first rest2
-                in (Lists.map (\n -> Core.unName n) tv)) group))
-          funInfos =
-                  Lists.map (\td ->
-                    let name = Pairs.first td
-                        rest1 = Pairs.second td
-                        body = Pairs.first rest1
-                        rest2 = Pairs.second rest1
-                        mType = Pairs.second rest2
-                        body2 = Utils.reorderLetBindings (Utils.eraseUnboundTypeVarDomains groupSchemeVars body)
-                        coqBody = Coder.encodeTerm env body2
-                        bodyText = Serialization.printExpr (Serialization.parenthesize (Serde.termToExpr coqBody))
-                        typeText =
-                                Maybes.maybe "_" (\ty ->
-                                  let ep = Utils.extractTypeParams ty
-                                      bodyTy = Pairs.second ep
-                                  in (Serialization.printExpr (Serialization.parenthesize (Serde.typeToExpr (Syntax.Type (Coder.encodeType env bodyTy)))))) mType
-                    in (name, (typeText, bodyText))) group
-          allTypeVarNames =
-                  Lists.nub (Lists.concat (Lists.map (\td ->
-                    let rest1 = Pairs.second td
-                        b = Pairs.first rest1
-                        rest2 = Pairs.second rest1
-                        tv = Pairs.first rest2
-                        binders = mkTypeBinders b tv
-                    in (Pairs.first binders)) group))
-          names = Lists.map (\fi -> Pairs.first fi) funInfos
-          bundleName =
-                  Strings.cat [
-                    Strings.intercalate "_" (Lists.take 2 names),
-                    "_bundle"]
-          n = Lists.length funInfos
-          types = Lists.map (\fi -> Pairs.first (Pairs.second fi)) funInfos
-          productType = makeProdType types
-          projExprs = makeProjectionExprs n "bundle_"
-          letParts =
-                  Lists.map (\np ->
-                    let nm = Pairs.first (Pairs.first np)
-                        proj = Pairs.second np
-                    in (Strings.cat [
-                      nm,
-                      " := ",
-                      proj])) (Lists.zip funInfos projExprs)
-          letBlock =
-                  Logic.ifElse (Lists.null letParts) "" (Strings.cat [
-                    "let ",
-                    (Strings.intercalate " in\n    let " letParts),
-                    " in\n    "])
-          bodies = Lists.map (\fi -> Pairs.second (Pairs.second fi)) funInfos
-          prodVal = makeProdVal bodies
-          typBindText =
-                  Logic.ifElse (Lists.null allTypeVarNames) "" (Strings.cat [
-                    " ",
-                    (Strings.intercalate " " (Lists.map (\v -> Strings.cat [
-                      "(",
-                      v,
-                      " : Type)"]) allTypeVarNames))])
-          bundleArgsLine = implicitArgsLine bundleName allTypeVarNames
-          bundleDef =
-                  Strings.cat [
-                    "Definition ",
-                    bundleName,
-                    typBindText,
-                    " :=\n  hydra_fix (fun (bundle_ : ",
-                    productType,
-                    ") =>\n    ",
-                    letBlock,
-                    prodVal,
-                    ").\n",
-                    bundleArgsLine]
-          indexed = Lists.zip (Math.range 0 (Math.sub n 1)) funInfos
-          projDefs =
-                  Strings.cat (Lists.map (\iFi ->
-                    let i = Pairs.first iFi
-                        fi = Pairs.second iFi
-                        nm = Pairs.first fi
-                        t = Pairs.first (Pairs.second fi)
-                        projText0 = Maybes.fromMaybe "" (Maps.lookup i (Maps.fromList (Lists.zip (Math.range 0 (Math.sub n 1)) projExprs)))
-                        projText = replaceBundle projText0 bundleName
-                        argsDef = implicitArgsLine nm allTypeVarNames
-                    in (Strings.cat [
-                      "Definition ",
-                      nm,
-                      typBindText,
-                      " : ",
-                      t,
-                      " :=\n  ",
-                      projText,
-                      ".\n",
-                      argsDef])) indexed)
-      in (Strings.cat [
-        bundleDef,
-        "\n",
-        projDefs])
-
--- | Encode a non-cyclic term definition as a Coq Definition sentence
-encodeTermGroupSingleton :: Environment.CoqEnvironment -> (String, (Core.Term, ([Core.Name], (Maybe Core.Type)))) -> [Syntax.Sentence]
-encodeTermGroupSingleton env td =
-
-      let name = Pairs.first td
-          rest1 = Pairs.second td
-          body = Pairs.first rest1
-          rest2 = Pairs.second rest1
-          typeVars = Pairs.first rest2
-          mType = Pairs.second rest2
-          schemeVarNames = Sets.fromList (Lists.map (\n -> Core.unName n) typeVars)
-          body2 = Utils.reorderLetBindings (Utils.eraseUnboundTypeVarDomains schemeVarNames body)
-          coqBody = Coder.encodeTerm env body2
-          binders = mkTypeBinders body2 typeVars
-          typeBinders = Pairs.second binders
-          returnType =
-                  Maybes.maybe Nothing (\ty ->
-                    let ep = Utils.extractTypeParams ty
-                        bodyTy = Pairs.second ep
-                    in (Just (Syntax.Type (Coder.encodeType env bodyTy)))) mType
-      in [
-        Syntax.Sentence {
-          Syntax.sentenceComment = Nothing,
-          Syntax.sentenceContent = (Syntax.SentenceContentDefinition (Syntax.Definition {
-            Syntax.definitionLocality = Nothing,
-            Syntax.definitionName = (Coder.coqIdent name),
-            Syntax.definitionBinders = typeBinders,
-            Syntax.definitionType = returnType,
-            Syntax.definitionBody = coqBody}))}]
-
--- | Produce Arguments {p} declarations for every parameterized type's constructor and field accessors
-generateArgumentsDecls :: [(String, Core.Type)] -> String
-generateArgumentsDecls typeDefs =
-
-      let implicitAll =
-              \params -> Strings.intercalate " " (Lists.map (\p -> Strings.cat [
-                "{",
-                p,
-                "}"]) params)
-          linesFor =
-                  \triple ->
-                    let name = Pairs.first triple
-                        params = Pairs.first (Pairs.second triple)
-                        bodyTy = Pairs.second (Pairs.second triple)
-                        impAll = implicitAll params
-                    in case bodyTy of
-                      Core.TypeUnion v0 -> Lists.map (\ft -> Strings.cat [
-                        "Arguments ",
-                        name,
-                        "_",
-                        (Formatting.capitalize (Core.unName (Core.fieldTypeName ft))),
-                        " ",
-                        impAll,
-                        "."]) v0
-                      Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) [] (
-                        let constrLine =
-                                Strings.cat [
-                                  "Arguments Build_",
-                                  name,
-                                  " ",
-                                  impAll,
-                                  "."]
-                            fieldLines =
-                                    Lists.map (\ft -> Strings.cat [
-                                      "Arguments ",
-                                      (Formatting.decapitalize name),
-                                      "_",
-                                      (Utils.sanitize (Utils.localName (Core.unName (Core.fieldTypeName ft)))),
-                                      " ",
-                                      impAll,
-                                      "."]) v0
-                        in (Lists.cons constrLine fieldLines))
-                      _ -> []
-          triples =
-                  Maybes.cat (Lists.map (\nt ->
-                    let name = Pairs.first nt
-                        ty = Pairs.second nt
-                        ep = Utils.extractTypeParams ty
-                        params = Pairs.first ep
-                        bodyTy = Pairs.second ep
-                    in (Logic.ifElse (Lists.null params) Nothing (Just (name, (params, bodyTy))))) typeDefs)
-          allLines = Lists.concat (Lists.map linesFor triples)
-      in (Logic.ifElse (Lists.null allLines) "" (Strings.cat [
-        "\n",
-        (Strings.intercalate "\n" allLines),
-        "\n"]))
-
--- | Emit Coq sentences for a type-definition SCC group, handling mutual recursion and positivity
-generateTypeGroup :: Environment.CoqEnvironment -> (Bool, [(String, Core.Type)]) -> [Syntax.Sentence]
-generateTypeGroup env group =
-
-      let cyclic = Pairs.first group
-          defs = Pairs.second group
-      in (Logic.ifElse (Logic.and (Logic.not cyclic) (Equality.equal (Lists.length defs) 1)) (Maybes.fromMaybe [] (Maybes.map (\d -> generateTypeSentence env (Pairs.first d) (Pairs.second d)) (Lists.maybeHead defs))) (
-        let groupNames = Sets.fromList (Lists.map (\d -> Pairs.first d) defs)
-            hasPositivity = Utils.hasPositivityIssue groupNames defs
-            sanitizedGroup =
-                    Logic.ifElse hasPositivity (Lists.map (\d -> (Pairs.first d, (Utils.sanitizePositivity groupNames (Pairs.second d)))) defs) defs
-            bodies = Lists.concat (Lists.map (\d -> makeInductiveBody env (Pairs.first d) (Pairs.second d)) sanitizedGroup)
-            accessors = Lists.concat (Lists.map (\d -> makeAccessorDefs d) sanitizedGroup)
-            inductiveSent =
-                    Logic.ifElse (Lists.null bodies) [] [
-                      Syntax.Sentence {
-                        Syntax.sentenceComment = Nothing,
-                        Syntax.sentenceContent = (Syntax.SentenceContentInductive (Syntax.InductiveDefinition {
-                          Syntax.inductiveDefinitionLocality = Nothing,
-                          Syntax.inductiveDefinitionCoinductive = False,
-                          Syntax.inductiveDefinitionBodies = bodies}))}]
-        in (Lists.concat2 inductiveSent accessors)))
-
--- | Generate the Coq sentence(s) for a non-cyclic type definition
-generateTypeSentence :: Environment.CoqEnvironment -> String -> Core.Type -> [Syntax.Sentence]
-generateTypeSentence env name ty =
-
-      let extracted = Utils.extractTypeParams ty
-          params = Pairs.first extracted
-          bodyTy = Pairs.second extracted
-          paramBinders =
-                  Lists.map (\p -> Syntax.BinderType (Syntax.TypeBinders {
-                    Syntax.typeBindersNames = [
-                      Coder.coqName p],
-                    Syntax.typeBindersType = (Syntax.Type (Coder.coqTermQualid "Type"))})) params
-          mkDef =
-                  \n -> \binders -> \body -> Syntax.Sentence {
-                    Syntax.sentenceComment = Nothing,
-                    Syntax.sentenceContent = (Syntax.SentenceContentDefinition (Syntax.Definition {
-                      Syntax.definitionLocality = Nothing,
-                      Syntax.definitionName = (Coder.coqIdent n),
-                      Syntax.definitionBinders = binders,
-                      Syntax.definitionType = (Just (Syntax.Type (Coder.coqTermQualid "Type"))),
-                      Syntax.definitionBody = body}))}
-      in case bodyTy of
-        Core.TypeUnion v0 ->
-          let body =
-                  Syntax.InductiveBody {
-                    Syntax.inductiveBodyName = (Coder.coqIdent name),
-                    Syntax.inductiveBodyBinders = paramBinders,
-                    Syntax.inductiveBodyType = (Just (Syntax.Type (Coder.coqTermQualid "Type"))),
-                    Syntax.inductiveBodyConstructors = (Lists.map (\ft -> makeConstructor env name params ft) v0)}
-              indDef =
-                      Syntax.InductiveDefinition {
-                        Syntax.inductiveDefinitionLocality = Nothing,
-                        Syntax.inductiveDefinitionCoinductive = False,
-                        Syntax.inductiveDefinitionBodies = [
-                          body]}
-          in [
-            Syntax.Sentence {
-              Syntax.sentenceComment = Nothing,
-              Syntax.sentenceContent = (Syntax.SentenceContentInductive indDef)}]
-        Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) [
-          mkDef name paramBinders (Coder.coqTermQualid "unit")] [
-          Syntax.Sentence {
-            Syntax.sentenceComment = Nothing,
-            Syntax.sentenceContent = (Syntax.SentenceContentRecord (Syntax.RecordDefinition {
-              Syntax.recordDefinitionLocality = Nothing,
-              Syntax.recordDefinitionName = (Coder.coqIdent name),
-              Syntax.recordDefinitionBinders = paramBinders,
-              Syntax.recordDefinitionSort = (Just Syntax.SortType),
-              Syntax.recordDefinitionBody = Syntax.RecordBody {
-                Syntax.recordBodyConstructor = (Just (Coder.coqIdent (Strings.cat [
-                  "Build_",
-                  name]))),
-                Syntax.recordBodyFields = (Lists.map (\ft ->
-                  let fn = Utils.sanitize (Utils.localName (Core.unName (Core.fieldTypeName ft)))
-                      prefixedFn =
-                              Strings.cat [
-                                Formatting.decapitalize name,
-                                "_",
-                                fn]
-                      ftCoq = Coder.encodeType env (Core.fieldTypeType ft)
-                  in Syntax.RecordField {
-                    Syntax.recordFieldName = (Coder.coqIdent prefixedFn),
-                    Syntax.recordFieldType = (Syntax.Type ftCoq)}) v0)}}))}]
-        _ -> [
-          mkDef name paramBinders (Coder.encodeType env bodyTy)]
-
--- | Collect local names that occur in more than one module's type or term definitions
-globalAmbiguousNames :: [Packaging.Module] -> S.Set String
-globalAmbiguousNames modules =
-
-      let allNames =
-              Lists.concat (Lists.map (\m ->
-                let nsStr = Packaging.unNamespace (Packaging.moduleNamespace m)
-                    fromDef =
-                            \def_ -> case def_ of
-                              Packaging.DefinitionType v0 -> Just (Utils.localName (Core.unName (Packaging.typeDefinitionName v0)), nsStr)
-                              Packaging.DefinitionTerm v0 -> Just (Utils.localName (Core.unName (Packaging.termDefinitionName v0)), nsStr)
-                              _ -> Nothing
-                in (Maybes.cat (Lists.map fromDef (Packaging.moduleDefinitions m)))) modules)
-          nameToNs =
-                  Lists.foldl (\acc -> \np ->
-                    let n = Pairs.first np
-                        nsVal = Pairs.second np
-                        existing = Maybes.fromMaybe Sets.empty (Maps.lookup n acc)
-                    in (Maps.insert n (Sets.insert nsVal existing) acc)) Maps.empty allNames
-      in (Sets.fromList (Maybes.cat (Lists.map (\entry -> Logic.ifElse (Equality.gte (Lists.length (Sets.toList (Pairs.second entry))) 2) (Just (Pairs.first entry)) Nothing) (Maps.toList nameToNs))))
-
--- | Collect all type definitions from every module and run buildConstructorCounts over them
-globalConstructorCounts :: [Packaging.Module] -> M.Map String Int
-globalConstructorCounts modules =
-
-      let allTypeDefs =
-              Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\def_ -> case def_ of
-                Packaging.DefinitionType v0 -> Just (Utils.localName (Core.unName (Packaging.typeDefinitionName v0)), (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                _ -> Nothing) (Packaging.moduleDefinitions m))) modules)
-      in (Utils.buildConstructorCounts allTypeDefs)
-
--- | Delegate to CoqUtils.buildFieldMapping across all supplied modules
-globalFieldMapping :: [Packaging.Module] -> M.Map (String, String) String
-globalFieldMapping modules = Utils.buildFieldMapping modules
-
--- | Collect sanitized accessor names by SCC-sorting every module's type defs and folding collectSanitizedAccessors
-globalSanitizedAccessors :: [Packaging.Module] -> S.Set String
-globalSanitizedAccessors modules =
-
-      let allTypeGroups =
-              Lists.concat (Lists.map (\m ->
-                let typeDefs =
-                        Maybes.cat (Lists.map (\def_ -> case def_ of
-                          Packaging.DefinitionType v0 -> Just (Utils.localName (Core.unName (Packaging.typeDefinitionName v0)), (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                          _ -> Nothing) (Packaging.moduleDefinitions m))
-                in (Utils.sortTypeDefsSCC typeDefs)) modules)
-      in (Utils.collectSanitizedAccessors allTypeGroups)
-
--- | Emit an Arguments line marking every type parameter of a definition as implicit
-implicitArgsLine :: String -> [String] -> String
-implicitArgsLine name typeVarNames =
-    Logic.ifElse (Lists.null typeVarNames) "" (Strings.cat [
-      "Arguments ",
-      name,
-      " ",
-      (Strings.intercalate " " (Lists.map (\v -> Strings.cat [
-        "{",
-        v,
-        "}"]) typeVarNames)),
-      ".\n"])
-
--- | Build one Definition per record field, pattern-matching on Build_T
-makeAccessorDefs :: (String, Core.Type) -> [Syntax.Sentence]
-makeAccessorDefs nt =
-
-      let name = Pairs.first nt
-          ty = Pairs.second nt
-          extracted = Utils.extractTypeParams ty
-          bodyTy = Pairs.second extracted
-      in case bodyTy of
-        Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) [] (
-          let nFields = Lists.length v0
-              fieldVars =
-                      Lists.map (\i -> Strings.cat [
-                        "f",
-                        (Literals.showInt32 i)]) (Math.range 0 (Math.sub nFields 1))
-              constrPat =
-                      Syntax.Pattern10_Qualid {
-                        Syntax.pattern10_QualidQualid = (Coder.coqQualid (Strings.cat [
-                          "Build_",
-                          name])),
-                        Syntax.pattern10_QualidPatterns = (Lists.map (\v -> Syntax.Pattern1 {
-                          Syntax.pattern1Pattern = (Syntax.Pattern0Qualid (Coder.coqQualid v)),
-                          Syntax.pattern1Scope = Nothing}) fieldVars)}
-              indexed = Lists.zip (Math.range 0 (Math.sub nFields 1)) v0
-          in (Lists.map (\ift -> makeOneAccessor name constrPat fieldVars (Pairs.first ift) (Pairs.second ift)) indexed))
-        _ -> []
-
--- | Build a Coq Constructor from a union field (prepended with the type name and capitalized field name)
-makeConstructor :: Environment.CoqEnvironment -> String -> [String] -> Core.FieldType -> Syntax.Constructor
-makeConstructor env typeName params ft =
-
-      let fn = Core.unName (Core.fieldTypeName ft)
-          constrName =
-                  Strings.cat [
-                    typeName,
-                    "_",
-                    (Formatting.capitalize fn)]
-          fieldTy = Core.fieldTypeType ft
-          argType = Coder.encodeType env fieldTy
-          returnType = makeReturnType typeName params
-      in Syntax.Constructor {
-        Syntax.constructorName = (Coder.coqIdent constrName),
-        Syntax.constructorBinders = [],
-        Syntax.constructorType = (Just (Syntax.Type (Coder.coqArrow argType returnType)))}
-
--- | Build an Inductive body for a union or record type in a mutual group
-makeInductiveBody :: Environment.CoqEnvironment -> String -> Core.Type -> [Syntax.InductiveBody]
-makeInductiveBody env name ty =
-
-      let extracted = Utils.extractTypeParams ty
-          params = Pairs.first extracted
-          bodyTy = Pairs.second extracted
-          paramBinders =
-                  Lists.map (\p -> Syntax.BinderType (Syntax.TypeBinders {
-                    Syntax.typeBindersNames = [
-                      Coder.coqName p],
-                    Syntax.typeBindersType = (Syntax.Type (Coder.coqTermQualid "Type"))})) params
-      in case bodyTy of
-        Core.TypeUnion v0 -> [
-          Syntax.InductiveBody {
-            Syntax.inductiveBodyName = (Coder.coqIdent name),
-            Syntax.inductiveBodyBinders = paramBinders,
-            Syntax.inductiveBodyType = (Just (Syntax.Type (Coder.coqTermQualid "Type"))),
-            Syntax.inductiveBodyConstructors = (Lists.map (\ft -> makeConstructor env name params ft) v0)}]
-        Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) [
-          Syntax.InductiveBody {
-            Syntax.inductiveBodyName = (Coder.coqIdent name),
-            Syntax.inductiveBodyBinders = paramBinders,
-            Syntax.inductiveBodyType = (Just (Syntax.Type (Coder.coqTermQualid "Type"))),
-            Syntax.inductiveBodyConstructors = [
-              Syntax.Constructor {
-                Syntax.constructorName = (Coder.coqIdent (Strings.cat [
-                  "Build_",
-                  name])),
-                Syntax.constructorBinders = [],
-                Syntax.constructorType = (Just (Syntax.Type (makeReturnType name params)))}]}] (
-          let constrType =
-                  Lists.foldr (\ft -> \acc -> Coder.coqArrow (Coder.encodeType env (Core.fieldTypeType ft)) acc) (makeReturnType name params) v0
-          in [
-            Syntax.InductiveBody {
-              Syntax.inductiveBodyName = (Coder.coqIdent name),
-              Syntax.inductiveBodyBinders = paramBinders,
-              Syntax.inductiveBodyType = (Just (Syntax.Type (Coder.coqTermQualid "Type"))),
-              Syntax.inductiveBodyConstructors = [
-                Syntax.Constructor {
-                  Syntax.constructorName = (Coder.coqIdent (Strings.cat [
-                    "Build_",
-                    name])),
-                  Syntax.constructorBinders = [],
-                  Syntax.constructorType = (Just (Syntax.Type constrType))}]}])
-        _ -> []
-
--- | Emit a Definition for a record field accessor, keyed by the Build_T pattern
-makeOneAccessor :: String -> Syntax.Pattern10_Qualid -> [String] -> Int -> Core.FieldType -> Syntax.Sentence
-makeOneAccessor typeName constrPat fieldVars idx ft =
-
-      let fn = Utils.sanitize (Utils.localName (Core.unName (Core.fieldTypeName ft)))
-          prefixedFn =
-                  Strings.cat [
-                    Formatting.decapitalize typeName,
-                    "_",
-                    fn]
-          returnExpr =
-                  Coder.coqTermQualid (Maybes.fromMaybe "" (Maps.lookup idx (Maps.fromList (Lists.zip (Math.range 0 (Math.sub (Lists.length fieldVars) 1)) fieldVars))))
-          matchExpr =
-                  Syntax.TermTerm100 (Syntax.Term100Term10 (Syntax.Term10OneTerm (Syntax.OneTermTerm1 (Syntax.Term1Term0 (Syntax.Term0Match (Syntax.Match {
-                    Syntax.matchCaseItems = [
-                      Syntax.CaseItem {
-                        Syntax.caseItemTerm = (Syntax.Term100Term10 (Syntax.Term10OneTerm (Syntax.OneTermExplicit (Syntax.QualidAnnotated {
-                          Syntax.qualidAnnotatedQualid = (Coder.coqQualid "r_"),
-                          Syntax.qualidAnnotatedUnivAnnot = Nothing})))),
-                        Syntax.caseItemAs = Nothing,
-                        Syntax.caseItemIn = Nothing}],
-                    Syntax.matchReturn = Nothing,
-                    Syntax.matchPipe = False,
-                    Syntax.matchEquations = [
-                      Syntax.Equation {
-                        Syntax.equationPattern = [
-                          [
-                            Syntax.PatternPattern (Syntax.Pattern10Qualiid constrPat)]],
-                        Syntax.equationTerm = returnExpr}]}))))))
-      in Syntax.Sentence {
-        Syntax.sentenceComment = Nothing,
-        Syntax.sentenceContent = (Syntax.SentenceContentDefinition (Syntax.Definition {
-          Syntax.definitionLocality = Nothing,
-          Syntax.definitionName = (Coder.coqIdent prefixedFn),
-          Syntax.definitionBinders = [
-            Syntax.BinderType (Syntax.TypeBinders {
-              Syntax.typeBindersNames = [
-                Coder.coqName "r_"],
-              Syntax.typeBindersType = (Syntax.Type (Coder.coqTermQualid typeName))})],
-          Syntax.definitionType = Nothing,
-          Syntax.definitionBody = matchExpr}))}
-
--- | Emit nested `prod (T1) (prod ...)` textual type expression
-makeProdType :: [String] -> String
-makeProdType ts =
-    Maybes.fromMaybe "unit" (Maybes.map (\p -> Logic.ifElse (Equality.equal (Lists.length ts) 1) (Pairs.first p) (Strings.cat [
-      "prod (",
-      (Pairs.first p),
-      ") (",
-      (makeProdType (Pairs.second p)),
-      ")"])) (Lists.uncons ts))
-
--- | Emit a nested `(pair (b1) (...))` textual value expression
-makeProdVal :: [String] -> String
-makeProdVal bs =
-    Maybes.fromMaybe "tt" (Maybes.map (\p -> Logic.ifElse (Equality.equal (Lists.length bs) 1) (Pairs.first p) (Strings.cat [
-      "(pair (",
-      (Pairs.first p),
-      ") (",
-      (makeProdVal (Pairs.second p)),
-      "))"])) (Lists.uncons bs))
-
--- | Emit the n projection expressions extracting each member of a nested pair bundle
-makeProjectionExprs :: Int -> String -> [String]
-makeProjectionExprs n bvar =
-
-      let snds =
-              \k -> \v -> Logic.ifElse (Equality.equal k 0) v (snds (Math.sub k 1) (Strings.cat [
-                "(snd ",
-                v,
-                ")"]))
-          mkProj =
-                  \i -> \total -> \v -> Logic.ifElse (Equality.equal i 0) (Strings.cat [
-                    "(fst ",
-                    v,
-                    ")"]) (Logic.ifElse (Equality.equal i (Math.sub total 1)) (snds i v) (Strings.cat [
-                    "(fst ",
-                    (snds i v),
-                    ")"]))
-      in (Logic.ifElse (Equality.lte n 0) [] (Logic.ifElse (Equality.equal n 1) [
-        bvar] (Lists.map (\i -> mkProj i n bvar) (Math.range 0 (Math.sub n 1)))))
-
--- | Return-type Coq term: `TypeName` or `TypeName p1 p2 ...`
-makeReturnType :: String -> [String] -> Syntax.Term
-makeReturnType typeName params =
-    Logic.ifElse (Lists.null params) (Coder.coqTermQualid typeName) (Coder.coqTermApp (Coder.coqTermQualid typeName) (Lists.map (\p -> Coder.coqTermQualid p) params))
-
--- | Build a Coq `(p : Type)` binder for a type parameter
-makeTypeBinder :: String -> Syntax.Binder
-makeTypeBinder p =
-    Syntax.BinderType (Syntax.TypeBinders {
-      Syntax.typeBindersNames = [
-        Coder.coqName p],
-      Syntax.typeBindersType = (Syntax.Type (Coder.coqTermQualid "Type"))})
-
--- | Collect type-variable names and the Coq binders needed for a term definition
-mkTypeBinders :: Core.Term -> [Core.Name] -> ([String], [Syntax.Binder])
-mkTypeBinders body typeVars =
-
-      let schemeVarNames = Sets.fromList (Lists.map (\n -> Core.unName n) typeVars)
-          innerTypeVars = Logic.ifElse (Lists.null typeVars) Sets.empty (Utils.collectFreeTypeVars body)
-          explicit = Lists.map (\n -> Core.unName n) typeVars
-          extras = Lists.filter (\nm -> Logic.not (Sets.member nm schemeVarNames)) (Sets.toList innerTypeVars)
-          allTypeVarNames = Lists.nub (Lists.concat2 explicit extras)
-          binders = Lists.map (\v -> makeTypeBinder v) allTypeVarNames
-      in (allTypeVarNames, binders)
-
--- | Top-level driver: dispatch a module to either full-emission or axiom-only emission, producing (path, content) pairs
-moduleToCoq :: M.Map (String, String) String -> M.Map String Int -> S.Set String -> S.Set String -> Packaging.Module -> [Packaging.Definition] -> M.Map String String
-moduleToCoq fieldMap constrCounts ambiguousNames globalSanitizedAcc mod_ defs =
-
-      let nsStr = Packaging.unNamespace (Packaging.moduleNamespace mod_)
-          path = namespaceToPath nsStr
-          desc =
-                  Maybes.maybe "" (\d -> Strings.cat [
-                    "(* ",
-                    d,
-                    " *)\n\n"]) (Packaging.moduleDescription mod_)
-          axiomOnlyModules =
-                  [
-                    "hydra.hoisting",
-                    "hydra.inference"]
-          isAxiomOnly = Lists.elem nsStr axiomOnlyModules
-          typeDefs =
-                  Maybes.cat (Lists.map (\def_ -> case def_ of
-                    Packaging.DefinitionType v0 -> Just (Utils.localName (Core.unName (Packaging.typeDefinitionName v0)), (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                    _ -> Nothing) defs)
-          termDefs =
-                  Maybes.cat (Lists.map (\def_ -> case def_ of
-                    Packaging.DefinitionTerm v0 ->
-                      let mts = Packaging.termDefinitionTypeScheme v0
-                          vs = Maybes.maybe [] (\ts -> Core.typeSchemeVariables ts) mts
-                          mty = Maybes.map (\ts -> Core.typeSchemeBody ts) mts
-                      in (Just (Utils.localName (Core.unName (Packaging.termDefinitionName v0)), (Packaging.termDefinitionTerm v0, (vs, mty))))
-                    _ -> Nothing) defs)
-          localDefNames =
-                  Sets.fromList (Lists.concat2 (Lists.map (\nt -> Pairs.first nt) typeDefs) (Lists.map (\td -> Pairs.first td) termDefs))
-          moduleAmbig = Sets.union ambiguousNames localDefNames
-          env =
-                  Environment.CoqEnvironment {
-                    Environment.coqEnvironmentCurrentNamespace = nsStr,
-                    Environment.coqEnvironmentConstructorCounts = constrCounts,
-                    Environment.coqEnvironmentAmbiguousNames = moduleAmbig,
-                    Environment.coqEnvironmentSanitizedAccessors = globalSanitizedAcc}
-      in (Logic.ifElse isAxiomOnly (Maps.fromList [
-        (path, (buildAxiomOnlyContent env desc nsStr typeDefs termDefs mod_))]) (buildFullModule env fieldMap mod_ nsStr path desc typeDefs termDefs))
-
--- | Convert a Hydra namespace string (e.g. hydra.show.core) into a relative .v file path
-namespaceToPath :: String -> String
-namespaceToPath ns =
-
-      let parts = Strings.splitOn "." ns
-          dirParts = Maybes.fromMaybe [] (Lists.maybeInit parts)
-          fileName =
-                  Strings.cat [
-                    Maybes.fromMaybe ns (Lists.maybeLast parts),
-                    ".v"]
-      in (Logic.ifElse (Lists.null dirParts) fileName (Strings.cat [
-        Strings.intercalate "/" dirParts,
-        "/",
-        fileName]))
-
--- | Pretty-print the standard-imports sentence followed by additional dependency imports
-renderRequireImports :: [Syntax.Sentence] -> String
-renderRequireImports depSentences = renderSentences (Lists.cons Coder.standardImports depSentences)
-
--- | Pretty-print a Document containing the given Coq sentences
-renderSentences :: [Syntax.Sentence] -> String
-renderSentences sentences =
-    Serialization.printExpr (Serialization.parenthesize (Serde.documentToExpr (Syntax.Document {
-      Syntax.documentSentences = sentences})))
-
--- | Replace literal `bundle_` with the given replacement string
-replaceBundle :: String -> String -> String
-replaceBundle s bname = Strings.intercalate bname (Strings.splitOn "bundle_" s)
diff --git a/src/main/haskell/Hydra/Coq/GenerateDriver.hs b/src/main/haskell/Hydra/Coq/GenerateDriver.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/GenerateDriver.hs
+++ /dev/null
@@ -1,57 +0,0 @@
--- | Coq code generator driver: a thin host-side wrapper over the DSL-ported
--- `Hydra.Coq.Generate`. Only the `generateSources` adapter and the
--- `_CoqProject` writer live here; everything else has been promoted to DSL.
-
-module Hydra.Coq.GenerateDriver where
-
-import qualified Hydra.Packaging as Pkg
-import qualified Hydra.Coq.Generate as CoqGenerate
-import qualified Hydra.Context as Context
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Errors as Errors
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import Control.Monad (forM_)
-import Data.List (sort)
-import System.Directory (copyFile, createDirectoryIfMissing, listDirectory)
-import System.FilePath ((</>), takeDirectory)
-
--- | Standard coder interface: takes an adapted Module and Definitions,
--- returns a map from file paths to file contents.
--- Thin wrapper over the DSL-ported `Hydra.Coq.Generate.moduleToCoq` that
--- adapts the generateSources signature (accepting unused Context/Graph
--- parameters and wrapping the result in Either).
-moduleToCoq :: Map.Map (String, String) String -> Map.Map String Int -> Set.Set String -> Set.Set String -> Pkg.Module -> [Pkg.Definition] -> Context.Context -> Graph.Graph
-  -> Either Errors.Error (Map.Map FilePath String)
-moduleToCoq fieldMap constrCounts ambiguousNames globalSanitizedAcc mod defs _cx _g =
-  Right (CoqGenerate.moduleToCoq fieldMap constrCounts ambiguousNames globalSanitizedAcc mod defs)
-
--- | Generate a _CoqProject file for the output directory.
--- Maps the physical directory to the empty logical path so that
--- e.g. hydra/Core.v becomes module "hydra.Core".
-writeCoqProject :: FilePath -> IO ()
-writeCoqProject baseDir = do
-  createDirectoryIfMissing True baseDir
-  let content = unlines
-        [ "# Generated by Hydra's Coq code generator"
-        , "-Q . \"\""
-        ]
-  writeFile (baseDir </> "_CoqProject") content
-  putStrLn "  _CoqProject"
-
--- | Copy the hand-written hydra.lib.* axiom-stub modules into the output tree.
--- These files declare Coq axioms for Hydra primitive functions whose bodies
--- are implemented natively in each host language. They have no DSL sources
--- (unlike hydra.lib.names, which is DSL-generated), so they are maintained
--- by hand under heads/haskell/src/main/coq/hydra/lib/ and copied into dist/
--- at generation time. The source path is resolved relative to the current
--- working directory, which is heads/haskell/ when generate-coq runs.
-copyCoqLibFiles :: FilePath -> IO ()
-copyCoqLibFiles baseDir = do
-  let srcDir = "src/main/coq" </> "hydra" </> "lib"
-      dstDir = baseDir </> "hydra" </> "lib"
-  createDirectoryIfMissing True dstDir
-  files <- sort <$> listDirectory srcDir
-  forM_ files $ \f -> do
-    copyFile (srcDir </> f) (dstDir </> f)
-    putStrLn ("  hydra/lib/" ++ f)
diff --git a/src/main/haskell/Hydra/Coq/Language.hs b/src/main/haskell/Hydra/Coq/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Language.hs
+++ /dev/null
@@ -1,232 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for Coq code generation
-
-module Hydra.Coq.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
-coqLanguage :: Coders.Language
-coqLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.coq"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes = Sets.fromList [
-      Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
-coqReservedWords :: S.Set String
-coqReservedWords =
-    Sets.fromList [
-      "as",
-      "at",
-      "cofix",
-      "do",
-      "else",
-      "end",
-      "exists",
-      "exists2",
-      "fix",
-      "for",
-      "forall",
-      "fun",
-      "if",
-      "IF",
-      "in",
-      "let",
-      "match",
-      "mod",
-      "open",
-      "Prop",
-      "return",
-      "Set",
-      "then",
-      "Type",
-      "using",
-      "where",
-      "with",
-      "Axiom",
-      "Class",
-      "Coercion",
-      "Context",
-      "Definition",
-      "Fixpoint",
-      "Hypothesis",
-      "Inductive",
-      "Instance",
-      "Lemma",
-      "Module",
-      "Notation",
-      "Proof",
-      "Qed",
-      "Record",
-      "Require",
-      "Import",
-      "Section",
-      "End",
-      "Theorem",
-      "Example",
-      "Variable",
-      "Variables",
-      "cons",
-      "pair",
-      "nil",
-      "list",
-      "option",
-      "prod",
-      "sum",
-      "unit",
-      "bool",
-      "nat",
-      "string",
-      "term",
-      "literal",
-      "graph",
-      "element"]
-
-coqStrippedReservedWords :: S.Set String
-coqStrippedReservedWords =
-    Sets.fromList [
-      "as",
-      "at",
-      "cofix",
-      "do",
-      "else",
-      "end",
-      "exists",
-      "exists2",
-      "fix",
-      "for",
-      "forall",
-      "fun",
-      "if",
-      "IF",
-      "in",
-      "let",
-      "match",
-      "mod",
-      "Prop",
-      "return",
-      "Set",
-      "then",
-      "Type",
-      "using",
-      "where",
-      "with",
-      "Axiom",
-      "Class",
-      "Coercion",
-      "Context",
-      "Definition",
-      "Fixpoint",
-      "Hypothesis",
-      "Inductive",
-      "Instance",
-      "Lemma",
-      "Module",
-      "Notation",
-      "Proof",
-      "Qed",
-      "Record",
-      "Require",
-      "Import",
-      "Section",
-      "End",
-      "Theorem",
-      "Example",
-      "Variable",
-      "Variables",
-      "bool",
-      "nat",
-      "list",
-      "option",
-      "prod",
-      "sum",
-      "unit",
-      "string",
-      "String",
-      "Empty_set",
-      "true",
-      "false",
-      "None",
-      "Some",
-      "nil",
-      "cons",
-      "pair",
-      "inl",
-      "inr",
-      "tt",
-      "graph"]
diff --git a/src/main/haskell/Hydra/Coq/Serde.hs b/src/main/haskell/Hydra/Coq/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Serde.hs
+++ /dev/null
@@ -1,615 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Coq serializer: converts Coq AST to concrete Coq source code
-
-module Hydra.Coq.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Coq.Syntax as Syntax
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-applicationToExpr :: Syntax.Application -> Ast.Expr
-applicationToExpr app =
-    case app of
-      Syntax.ApplicationNormal v0 -> Serialization.spaceSep [
-        term1ToExpr (Syntax.normalApplicationLhs v0),
-        (Serialization.spaceSep (Lists.map (\a -> case a of
-          Syntax.ArgIdent v1 -> Serialization.spaceSep [
-            Serialization.parens (Serialization.spaceSep [
-              identToExpr (Syntax.identArgIdent v1),
-              (Serialization.cst ":="),
-              (termToExpr (Syntax.identArgTerm v1))])]
-          Syntax.ArgNatural v1 ->
-            let v = Syntax.unNatural (Syntax.naturalArgNatural v1)
-            in (Serialization.cst (Literals.showBigint v))
-          Syntax.ArgTerm v1 -> term1ToExpr v1) (Syntax.normalApplicationRhs v0)))]
-      Syntax.ApplicationAnnotated v0 -> Serialization.spaceSep [
-        Serialization.cst "@",
-        (qualidToExpr (Syntax.qualidAnnotatedQualid (Syntax.annotatedApplicationAnnot v0)))]
-
-axiomDeclarationToExpr :: Syntax.AxiomDeclaration -> Ast.Expr
-axiomDeclarationToExpr a =
-    Serialization.suffix "." (Serialization.spaceSep [
-      Serialization.cst "Axiom",
-      (identToExpr (Syntax.axiomDeclarationName a)),
-      (Serialization.cst ":"),
-      (typeToExpr (Syntax.axiomDeclarationType a))])
-
-binderToExpr :: Syntax.Binder -> Ast.Expr
-binderToExpr b =
-    case b of
-      Syntax.BinderName v0 -> Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName v0)
-      Syntax.BinderType v0 ->
-        let names =
-                Lists.map (\n -> Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName n)) (Syntax.typeBindersNames v0)
-            ty = typeToExpr (Syntax.typeBindersType v0)
-        in (Serialization.parens (Serialization.spaceSep [
-          Serialization.spaceSep names,
-          (Serialization.cst ":"),
-          ty]))
-      Syntax.BinderTerm v0 ->
-        let name = Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName (Syntax.letBinderName v0))
-            ty =
-                    Maybes.maybe [] (\t -> [
-                      Serialization.cst ":",
-                      (typeToExpr t)]) (Syntax.letBinderType v0)
-            body = termToExpr (Syntax.letBinderTerm v0)
-        in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            name],
-          ty,
-          [
-            Serialization.cst ":=",
-            body]])))
-      Syntax.BinderImplicit v0 -> case v0 of
-        Syntax.ImplicitBindersMaximallyInserted v1 ->
-          let names =
-                  Lists.map (\n -> Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName n)) (Syntax.typeBindersNames v1)
-              ty = typeToExpr (Syntax.typeBindersType v1)
-          in (Serialization.brackets Serialization.curlyBraces Serialization.inlineStyle (Serialization.spaceSep [
-            Serialization.spaceSep names,
-            (Serialization.cst ":"),
-            ty]))
-        Syntax.ImplicitBindersNonMaximallyInserted v1 ->
-          let names =
-                  Lists.map (\n -> Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName n)) (Syntax.typeBindersNames v1)
-              ty = typeToExpr (Syntax.typeBindersType v1)
-          in (Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep [
-            Serialization.spaceSep names,
-            (Serialization.cst ":"),
-            ty]))
-      Syntax.BinderGeneralizing v0 -> case v0 of
-        Syntax.GeneralizingBinderExplicit v1 -> Serialization.parens (termToExpr (Syntax.typeclassConstraintTerm v1))
-        Syntax.GeneralizingBinderImplicitMaximallyInserted v1 -> Serialization.brackets Serialization.curlyBraces Serialization.inlineStyle (termToExpr (Syntax.typeclassConstraintTerm v1))
-        Syntax.GeneralizingBinderImplicitNonMaximallyInserted v1 -> Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (termToExpr (Syntax.typeclassConstraintTerm v1))
-      Syntax.BinderPattern _ -> Serialization.cst "_"
-
-commentToExpr :: Syntax.Comment -> Ast.Expr
-commentToExpr c =
-    Serialization.cst (Strings.cat [
-      "(* ",
-      (Syntax.unComment c),
-      " *)"])
-
-constructorToExpr :: Syntax.Constructor -> Ast.Expr
-constructorToExpr c =
-
-      let name = identToExpr (Syntax.constructorName c)
-          binders = Lists.map (\b -> binderToExpr b) (Syntax.constructorBinders c)
-          ty =
-                  Maybes.maybe [] (\t -> [
-                    Serialization.cst ":",
-                    (typeToExpr t)]) (Syntax.constructorType c)
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "|",
-          name],
-        binders,
-        ty]))
-
-definitionToExpr :: Syntax.Definition -> Ast.Expr
-definitionToExpr d =
-
-      let locPart = Maybes.maybe [] (\l -> [
-            localityToExpr l]) (Syntax.definitionLocality d)
-          name = identToExpr (Syntax.definitionName d)
-          binders = Lists.map (\b -> binderToExpr b) (Syntax.definitionBinders d)
-          ty =
-                  Maybes.maybe [] (\t -> [
-                    Serialization.cst ":",
-                    (typeToExpr t)]) (Syntax.definitionType d)
-          body = termToExpr (Syntax.definitionBody d)
-      in (Serialization.suffix "." (Serialization.spaceSep (Lists.concat [
-        locPart,
-        [
-          Serialization.cst "Definition",
-          name],
-        binders,
-        ty,
-        [
-          Serialization.cst ":=",
-          body]])))
-
-documentToExpr :: Syntax.Document -> Ast.Expr
-documentToExpr doc = Serialization.doubleNewlineSep (Lists.map (\s -> sentenceToExpr s) (Syntax.documentSentences doc))
-
-fixpointDefinitionToExpr :: Syntax.FixpointDefinition -> Ast.Expr
-fixpointDefinitionToExpr fd =
-
-      let locPart = Maybes.maybe [] (\l -> [
-            localityToExpr l]) (Syntax.fixpointDefinitionLocality fd)
-          name = identToExpr (Syntax.fixpointDefinitionName fd)
-          binders = Lists.map (\b -> binderToExpr b) (Syntax.fixpointDefinitionBinders fd)
-          ty =
-                  Maybes.maybe [] (\t -> [
-                    Serialization.cst ":",
-                    (typeToExpr t)]) (Syntax.fixpointDefinitionType fd)
-          body = termToExpr (Syntax.fixpointDefinitionBody fd)
-      in (Serialization.suffix "." (Serialization.spaceSep (Lists.concat [
-        locPart,
-        [
-          Serialization.cst "Fixpoint",
-          name],
-        binders,
-        ty,
-        [
-          Serialization.cst ":=",
-          body]])))
-
-identToExpr :: Syntax.Ident -> Ast.Expr
-identToExpr ident = Serialization.cst (Syntax.unString (Syntax.unIdent ident))
-
-inductiveBodyToExpr :: Syntax.InductiveBody -> Ast.Expr
-inductiveBodyToExpr ib =
-
-      let name = identToExpr (Syntax.inductiveBodyName ib)
-          binders = Lists.map (\b -> binderToExpr b) (Syntax.inductiveBodyBinders ib)
-          ty =
-                  Maybes.maybe [] (\t -> [
-                    Serialization.cst ":",
-                    (typeToExpr t)]) (Syntax.inductiveBodyType ib)
-          constrs = Lists.map (\c -> constructorToExpr c) (Syntax.inductiveBodyConstructors ib)
-      in (Serialization.newlineSep (Lists.concat [
-        [
-          Serialization.spaceSep (Lists.concat [
-            [
-              name],
-            binders,
-            ty,
-            [
-              Serialization.cst ":="]])],
-        constrs]))
-
-inductiveDefinitionToExpr :: Syntax.InductiveDefinition -> Ast.Expr
-inductiveDefinitionToExpr id =
-
-      let locPart = Maybes.maybe [] (\l -> [
-            localityToExpr l]) (Syntax.inductiveDefinitionLocality id)
-          kwPart =
-                  Logic.ifElse (Syntax.inductiveDefinitionCoinductive id) (Serialization.cst "CoInductive") (Serialization.cst "Inductive")
-          bodyExprs = Lists.map (\b -> inductiveBodyToExpr b) (Syntax.inductiveDefinitionBodies id)
-          firstBody = Maybes.fromMaybe (Serialization.cst "") (Lists.maybeHead bodyExprs)
-          restBodies =
-                  Lists.map (\b -> Serialization.spaceSep [
-                    Serialization.cst "with",
-                    b]) (Lists.drop 1 bodyExprs)
-          firstLine =
-                  Serialization.spaceSep (Lists.concat [
-                    locPart,
-                    [
-                      kwPart,
-                      firstBody]])
-      in (Serialization.suffix "." (Serialization.newlineSep (Lists.cons firstLine restBodies)))
-
-localityToExpr :: Syntax.Locality -> Ast.Expr
-localityToExpr loc =
-    case loc of
-      Syntax.LocalityLocal -> Serialization.cst "Local"
-      Syntax.LocalityGlobal -> Serialization.cst "Global"
-
-matchToExpr :: Syntax.Match -> Ast.Expr
-matchToExpr m =
-
-      let items =
-              Lists.map (\ci ->
-                let t = term100ToExpr (Syntax.caseItemTerm ci)
-                    asP =
-                            Maybes.maybe [] (\n -> [
-                              Serialization.cst "as",
-                              (Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName n))]) (Syntax.caseItemAs ci)
-                in (Serialization.spaceSep (Lists.concat [
-                  [
-                    t],
-                  asP]))) (Syntax.matchCaseItems m)
-          ret =
-                  Maybes.maybe [] (\r -> [
-                    Serialization.cst "return",
-                    (term100ToExpr r)]) (Syntax.matchReturn m)
-          eqs =
-                  Lists.map (\eq ->
-                    let patGroups = Lists.map (\grp -> Serialization.spaceSep (Lists.map (\p -> patternToExpr p) grp)) (Syntax.equationPattern eq)
-                        pats = Serialization.infixWsList " | " patGroups
-                        body = termToExpr (Syntax.equationTerm eq)
-                    in (Serialization.spaceSep [
-                      Serialization.cst "|",
-                      pats,
-                      (Serialization.cst "=>"),
-                      body])) (Syntax.matchEquations m)
-      in (Serialization.newlineSep (Lists.concat [
-        [
-          Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "match"],
-            items,
-            ret,
-            [
-              Serialization.cst "with"]])],
-        eqs,
-        [
-          Serialization.cst "end"]]))
-
-moduleDefinitionToExpr :: Syntax.ModuleDefinition -> Ast.Expr
-moduleDefinitionToExpr md =
-
-      let name = identToExpr (Syntax.moduleDefinitionName md)
-          sentences = Lists.map (\s -> sentenceToExpr s) (Syntax.moduleDefinitionSentences md)
-      in (Serialization.doubleNewlineSep (Lists.concat [
-        [
-          Serialization.suffix "." (Serialization.spaceSep [
-            Serialization.cst "Module",
-            name])],
-        sentences,
-        [
-          Serialization.suffix "." (Serialization.spaceSep [
-            Serialization.cst "End",
-            name])]]))
-
-pattern0ToExpr :: Syntax.Pattern0 -> Ast.Expr
-pattern0ToExpr p =
-    case p of
-      Syntax.Pattern0Qualid v0 -> qualidToExpr v0
-      Syntax.Pattern0QualIdAndPattern _ -> Serialization.cst "..."
-      Syntax.Pattern0Placeholder -> Serialization.cst "_"
-      Syntax.Pattern0Parens v0 -> Serialization.parens (Serialization.infixWsList ", " (Lists.map (\p2 -> patternToExpr p2) v0))
-      Syntax.Pattern0Number v0 ->
-        let v = Syntax.unNumber v0
-        in (Serialization.cst (Literals.showBigfloat v))
-      Syntax.Pattern0String v0 -> Serialization.spaceSep [
-        Serialization.cst "\"",
-        (Serialization.cst (Syntax.unString v0)),
-        (Serialization.cst "\"")]
-
-pattern10ToExpr :: Syntax.Pattern10 -> Ast.Expr
-pattern10ToExpr p =
-    case p of
-      Syntax.Pattern10As v0 -> Serialization.spaceSep [
-        pattern1ToExpr (Syntax.pattern10_AsPattern v0),
-        (Serialization.cst "as"),
-        (Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName (Syntax.pattern10_AsAs v0)))]
-      Syntax.Pattern10Patterns v0 ->
-        let first = pattern1ToExpr (Syntax.pattern10_PatternsPattern v0)
-            rest = Lists.map (\p2 -> pattern1ToExpr p2) (Syntax.pattern10_PatternsPatterns v0)
-        in (Serialization.spaceSep (Lists.cons first rest))
-      Syntax.Pattern10Qualiid v0 ->
-        let q = qualidToExpr (Syntax.pattern10_QualidQualid v0)
-            args = Lists.map (\p2 -> pattern1ToExpr p2) (Syntax.pattern10_QualidPatterns v0)
-        in (Logic.ifElse (Lists.null args) q (Serialization.spaceSep (Lists.cons q args)))
-
-pattern1ToExpr :: Syntax.Pattern1 -> Ast.Expr
-pattern1ToExpr p = pattern0ToExpr (Syntax.pattern1Pattern p)
-
-patternToExpr :: Syntax.Pattern -> Ast.Expr
-patternToExpr p =
-    case p of
-      Syntax.PatternPattern v0 -> pattern10ToExpr v0
-      Syntax.PatternTerm _ -> Serialization.cst "_"
-
-qualidToExpr :: Syntax.Qualid -> Ast.Expr
-qualidToExpr q =
-
-      let idExpr = identToExpr (Syntax.qualidId q)
-          fieldIds = Syntax.qualidFieldIds q
-          fieldExprs = Lists.map (\f -> identToExpr (Syntax.unFieldIdent f)) fieldIds
-      in (Logic.ifElse (Lists.null fieldExprs) idExpr (Serialization.dotSep (Lists.concat2 [
-        idExpr] fieldExprs)))
-
-recordDefinitionToExpr :: Syntax.RecordDefinition -> Ast.Expr
-recordDefinitionToExpr rd =
-
-      let locPart = Maybes.maybe [] (\l -> [
-            localityToExpr l]) (Syntax.recordDefinitionLocality rd)
-          name = identToExpr (Syntax.recordDefinitionName rd)
-          binders = Lists.map (\b -> binderToExpr b) (Syntax.recordDefinitionBinders rd)
-          sortPart =
-                  Maybes.maybe [] (\s -> [
-                    Serialization.cst ":",
-                    (sortToExpr s)]) (Syntax.recordDefinitionSort rd)
-          body = Syntax.recordDefinitionBody rd
-          constrPart = Maybes.maybe [] (\c -> [
-                identToExpr c]) (Syntax.recordBodyConstructor body)
-          fields = Lists.map (\f -> Serialization.suffix " ;" (recordFieldToExpr f)) (Syntax.recordBodyFields body)
-      in (Serialization.suffix "." (Serialization.newlineSep (Lists.concat [
-        [
-          Serialization.spaceSep (Lists.concat [
-            locPart,
-            [
-              Serialization.cst "Record"],
-            [
-              name],
-            binders,
-            sortPart,
-            [
-              Serialization.cst ":="],
-            constrPart,
-            [
-              Serialization.cst "{"]])],
-        fields,
-        [
-          Serialization.cst "}"]])))
-
-recordFieldToExpr :: Syntax.RecordField -> Ast.Expr
-recordFieldToExpr rf =
-    Serialization.spaceSep [
-      identToExpr (Syntax.recordFieldName rf),
-      (Serialization.cst ":"),
-      (typeToExpr (Syntax.recordFieldType rf))]
-
-requireImportToExpr :: Syntax.RequireImport -> Ast.Expr
-requireImportToExpr ri =
-
-      let fromPart =
-              Maybes.maybe [] (\q -> [
-                Serialization.cst "From",
-                (qualidToExpr q)]) (Syntax.requireImportFrom ri)
-          requirePart = Logic.ifElse (Syntax.requireImportRequire ri) [
-                Serialization.cst "Require"] []
-          qualPart =
-                  Maybes.maybe [] (\q -> case q of
-                    Syntax.ImportQualificationImport -> [
-                      Serialization.cst "Import"]
-                    Syntax.ImportQualificationExport -> [
-                      Serialization.cst "Export"]) (Syntax.requireImportQualification ri)
-          mods = Lists.map (\m -> qualidToExpr m) (Syntax.requireImportModules ri)
-      in (Serialization.suffix "." (Serialization.spaceSep (Lists.concat [
-        fromPart,
-        requirePart,
-        qualPart,
-        mods])))
-
-sectionDefinitionToExpr :: Syntax.SectionDefinition -> Ast.Expr
-sectionDefinitionToExpr sd =
-
-      let name = identToExpr (Syntax.sectionDefinitionName sd)
-          sentences = Lists.map (\s -> sentenceToExpr s) (Syntax.sectionDefinitionSentences sd)
-      in (Serialization.doubleNewlineSep (Lists.concat [
-        [
-          Serialization.suffix "." (Serialization.spaceSep [
-            Serialization.cst "Section",
-            name])],
-        sentences,
-        [
-          Serialization.suffix "." (Serialization.spaceSep [
-            Serialization.cst "End",
-            name])]]))
-
-sentenceContentToExpr :: Syntax.SentenceContent -> Ast.Expr
-sentenceContentToExpr sc =
-    case sc of
-      Syntax.SentenceContentAxiom v0 -> axiomDeclarationToExpr v0
-      Syntax.SentenceContentDefinition v0 -> definitionToExpr v0
-      Syntax.SentenceContentFixpoint v0 -> fixpointDefinitionToExpr v0
-      Syntax.SentenceContentInductive v0 -> inductiveDefinitionToExpr v0
-      Syntax.SentenceContentModule v0 -> moduleDefinitionToExpr v0
-      Syntax.SentenceContentNotation _ -> Serialization.cst "(* notation *)"
-      Syntax.SentenceContentRecord v0 -> recordDefinitionToExpr v0
-      Syntax.SentenceContentRequireImport v0 -> requireImportToExpr v0
-      Syntax.SentenceContentSection v0 -> sectionDefinitionToExpr v0
-      Syntax.SentenceContentTheorem v0 -> theoremBodyToExpr v0
-
-sentenceToExpr :: Syntax.Sentence -> Ast.Expr
-sentenceToExpr s =
-
-      let cmtPart = Maybes.maybe [] (\c -> [
-            commentToExpr c]) (Syntax.sentenceComment s)
-          content = sentenceContentToExpr (Syntax.sentenceContent s)
-      in (Serialization.newlineSep (Lists.concat [
-        cmtPart,
-        [
-          content]]))
-
-sortToExpr :: Syntax.Sort -> Ast.Expr
-sortToExpr s =
-    case s of
-      Syntax.SortSet -> Serialization.cst "Set"
-      Syntax.SortProp -> Serialization.cst "Prop"
-      Syntax.SortSProp -> Serialization.cst "SProp"
-      Syntax.SortType -> Serialization.cst "Type"
-      Syntax.SortTypeWithAnyUniverse -> Serialization.cst "Type"
-      Syntax.SortTypeWithUniverse _ -> Serialization.noSep [
-        Serialization.cst "Type",
-        (Serialization.cst "@{"),
-        (Serialization.cst "}")]
-
-term0ToExpr :: Syntax.Term0 -> Ast.Expr
-term0ToExpr t =
-    case t of
-      Syntax.Term0QualidAnnotated v0 -> qualidToExpr (Syntax.qualidAnnotatedQualid v0)
-      Syntax.Term0Sort v0 -> sortToExpr v0
-      Syntax.Term0PrimitiveNotations v0 -> case v0 of
-        Syntax.PrimitiveNotationsNumber v1 ->
-          let v = Syntax.unNumber v1
-          in (Serialization.cst (Literals.showBigfloat v))
-        Syntax.PrimitiveNotationsString v1 -> Serialization.spaceSep [
-          Serialization.cst "\"",
-          (Serialization.cst (Syntax.unString v1)),
-          (Serialization.cst "\"")]
-      Syntax.Term0Evar _ -> Serialization.cst "?evar"
-      Syntax.Term0Match v0 -> matchToExpr v0
-      Syntax.Term0Record -> Serialization.cst "{| |}"
-      Syntax.Term0Generalizing -> Serialization.cst "`( )"
-      Syntax.Term0Ltac -> Serialization.cst "ltac:( )"
-      Syntax.Term0Parens v0 -> Serialization.parens (termToExpr v0)
-
-term100ToExpr :: Syntax.Term100 -> Ast.Expr
-term100ToExpr t =
-    case t of
-      Syntax.Term100Cast v0 -> Serialization.spaceSep [
-        term10ToExpr (Syntax.typeCastTerm v0),
-        (Serialization.cst ":"),
-        (typeToExpr (Syntax.typeCastType v0))]
-      Syntax.Term100Term10 v0 -> term10ToExpr v0
-
-term10ToExpr :: Syntax.Term10 -> Ast.Expr
-term10ToExpr t =
-    case t of
-      Syntax.Term10Application v0 -> applicationToExpr v0
-      Syntax.Term10OneTerm v0 -> case v0 of
-        Syntax.OneTermExplicit v1 -> qualidToExpr (Syntax.qualidAnnotatedQualid v1)
-        Syntax.OneTermTerm1 v1 -> term1ToExpr v1
-
-term1ToExpr :: Syntax.Term1 -> Ast.Expr
-term1ToExpr t =
-    case t of
-      Syntax.Term1Projection -> Serialization.cst "?projection"
-      Syntax.Term1Scope -> Serialization.cst "?scope"
-      Syntax.Term1Term0 v0 -> term0ToExpr v0
-
-termToExpr :: Syntax.Term -> Ast.Expr
-termToExpr t =
-    case t of
-      Syntax.TermForallOrFun v0 -> case v0 of
-        Syntax.ForallOrFunForall v1 -> Serialization.spaceSep [
-          Serialization.cst "forall",
-          case (Syntax.forallBinders v1) of
-            Syntax.OpenBindersType v2 ->
-              let names =
-                      Lists.map (\n -> Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName n)) (Syntax.typeBindersNames v2)
-                  ty = typeToExpr (Syntax.typeBindersType v2)
-              in (Serialization.spaceSep [
-                Serialization.parens (Serialization.spaceSep [
-                  Serialization.spaceSep names,
-                  (Serialization.cst ":"),
-                  ty])])
-            Syntax.OpenBindersBinders v2 -> Serialization.spaceSep (Lists.map (\b -> binderToExpr b) v2),
-          (Serialization.cst ","),
-          (typeToExpr (Syntax.forallType v1))]
-        Syntax.ForallOrFunFun v1 -> Serialization.spaceSep [
-          Serialization.cst "fun",
-          case (Syntax.funBinders v1) of
-            Syntax.OpenBindersType v2 ->
-              let names =
-                      Lists.map (\n -> Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName n)) (Syntax.typeBindersNames v2)
-                  ty = typeToExpr (Syntax.typeBindersType v2)
-              in (Serialization.spaceSep [
-                Serialization.parens (Serialization.spaceSep [
-                  Serialization.spaceSep names,
-                  (Serialization.cst ":"),
-                  ty])])
-            Syntax.OpenBindersBinders v2 -> Serialization.spaceSep (Lists.map (\b -> binderToExpr b) v2),
-          (Serialization.cst "=>"),
-          (termToExpr (Syntax.funBody v1))]
-      Syntax.TermLet v0 ->
-        let bindings = Syntax.letBindings v0
-            body = termToExpr (Syntax.letIn v0)
-        in case bindings of
-          Syntax.LetBindingsNamed v1 ->
-            let binder = Syntax.letNamedBinder v1
-                name = Maybes.maybe (Serialization.cst "_") (\i -> identToExpr i) (Syntax.unName (Syntax.letBinderName binder))
-                binders = Lists.map (\b -> binderToExpr b) (Syntax.letNamedBinders v1)
-                ty =
-                        Maybes.maybe [] (\t2 -> [
-                          Serialization.cst ":",
-                          (typeToExpr t2)]) (Syntax.letBinderType binder)
-                val = termToExpr (Syntax.letBinderTerm binder)
-            in (Serialization.spaceSep [
-              Serialization.cst "let",
-              (Serialization.spaceSep (Lists.concat [
-                [
-                  name],
-                binders,
-                ty,
-                [
-                  Serialization.cst ":=",
-                  val],
-                [
-                  Serialization.cst "in"]])),
-              body])
-          Syntax.LetBindingsDestructuring _ -> Serialization.spaceSep [
-            Serialization.cst "let",
-            (Serialization.cst "..."),
-            (Serialization.cst "in"),
-            body]
-      Syntax.TermIf v0 ->
-        let cond = termToExpr (Syntax.ifCondition v0)
-            thn = termToExpr (Syntax.ifThen v0)
-            els = termToExpr (Syntax.ifElse v0)
-        in (Serialization.spaceSep [
-          Serialization.cst "if",
-          cond,
-          (Serialization.cst "then"),
-          thn,
-          (Serialization.cst "else"),
-          els])
-      Syntax.TermFix v0 -> case v0 of
-        Syntax.FixDecl v1 -> Serialization.spaceSep [
-          Serialization.cst "fix",
-
-            let name = identToExpr (Syntax.fix_DeclIdent v1)
-                binders = Lists.map (\b -> binderToExpr b) (Syntax.fix_DeclBinders v1)
-                ty =
-                        Maybes.maybe [] (\t2 -> [
-                          Serialization.cst ":",
-                          (typeToExpr t2)]) (Syntax.fix_DeclType v1)
-                body = termToExpr (Syntax.fix_DeclTerm v1)
-            in (Serialization.spaceSep (Lists.concat [
-              [
-                name],
-              binders,
-              ty,
-              [
-                Serialization.cst ":=",
-                body]]))]
-        Syntax.FixQual _ -> Serialization.cst "fix"
-      Syntax.TermCofix _ -> Serialization.spaceSep [
-        Serialization.cst "cofix",
-        (Serialization.cst "...")]
-      Syntax.TermTerm100 v0 -> term100ToExpr v0
-
-theoremBodyToExpr :: Syntax.TheoremBody -> Ast.Expr
-theoremBodyToExpr tb =
-
-      let kindKw =
-              case (Syntax.theoremBodyKind tb) of
-                Syntax.TheoremKindTheorem -> Serialization.cst "Theorem"
-                Syntax.TheoremKindLemma -> Serialization.cst "Lemma"
-                Syntax.TheoremKindProposition -> Serialization.cst "Proposition"
-                Syntax.TheoremKindCorollary -> Serialization.cst "Corollary"
-                Syntax.TheoremKindExample -> Serialization.cst "Example"
-          name = identToExpr (Syntax.theoremBodyName tb)
-          binders = Lists.map (\b -> binderToExpr b) (Syntax.theoremBodyBinders tb)
-          ty = typeToExpr (Syntax.theoremBodyType tb)
-          proof = termToExpr (Syntax.theoremBodyProof tb)
-      in (Serialization.newlineSep [
-        Serialization.suffix "." (Serialization.spaceSep (Lists.concat [
-          [
-            kindKw,
-            name],
-          binders,
-          [
-            Serialization.cst ":",
-            ty]])),
-        (Serialization.cst "Proof."),
-        (Serialization.spaceSep [
-          Serialization.cst "exact",
-          (Serialization.parens proof)]),
-        (Serialization.cst "Qed.")])
-
-typeToExpr :: Syntax.Type -> Ast.Expr
-typeToExpr t = termToExpr (Syntax.unType t)
diff --git a/src/main/haskell/Hydra/Coq/Syntax.hs b/src/main/haskell/Hydra/Coq/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Syntax.hs
+++ /dev/null
@@ -1,1365 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for Coq core and extensions. Based on the Coq 8.15 grammar:
--- |   https://coq.github.io/doc/v8.15/refman/language/core/basic.html#essential-vocabulary
--- |   Extended with Vernacular commands for complete .v file generation.
-
-module Hydra.Coq.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
-
-data AnnotatedApplication =
-  AnnotatedApplication {
-    annotatedApplicationAnnot :: QualidAnnotated,
-    annotatedApplicationTerms :: [Term1]}
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotatedApplication = Core.Name "hydra.coq.syntax.AnnotatedApplication"
-
-_AnnotatedApplication_annot = Core.Name "annot"
-
-_AnnotatedApplication_terms = Core.Name "terms"
-
-data Application =
-  ApplicationNormal NormalApplication |
-  ApplicationAnnotated AnnotatedApplication
-  deriving (Eq, Ord, Read, Show)
-
-_Application = Core.Name "hydra.coq.syntax.Application"
-
-_Application_normal = Core.Name "normal"
-
-_Application_annotated = Core.Name "annotated"
-
-data Arg =
-  ArgIdent IdentArg |
-  ArgNatural NaturalArg |
-  ArgTerm Term1
-  deriving (Eq, Ord, Read, Show)
-
-_Arg = Core.Name "hydra.coq.syntax.Arg"
-
-_Arg_ident = Core.Name "ident"
-
-_Arg_natural = Core.Name "natural"
-
-_Arg_term = Core.Name "term"
-
-data Binder =
-  BinderName Name |
-  BinderType TypeBinders |
-  BinderTerm LetBinder |
-  BinderImplicit ImplicitBinders |
-  BinderGeneralizing GeneralizingBinder |
-  BinderPattern Pattern0
-  deriving (Eq, Ord, Read, Show)
-
-_Binder = Core.Name "hydra.coq.syntax.Binder"
-
-_Binder_name = Core.Name "name"
-
-_Binder_type = Core.Name "type"
-
-_Binder_term = Core.Name "term"
-
-_Binder_implicit = Core.Name "implicit"
-
-_Binder_generalizing = Core.Name "generalizing"
-
-_Binder_pattern = Core.Name "pattern"
-
-data CaseItem =
-  CaseItem {
-    caseItemTerm :: Term100,
-    caseItemAs :: (Maybe Name),
-    caseItemIn :: (Maybe Pattern)}
-  deriving (Eq, Ord, Read, Show)
-
-_CaseItem = Core.Name "hydra.coq.syntax.CaseItem"
-
-_CaseItem_term = Core.Name "term"
-
-_CaseItem_as = Core.Name "as"
-
-_CaseItem_in = Core.Name "in"
-
-data Cofix =
-  Cofix {
-    cofixBody :: CofixBody,
-    cofixQual :: (Maybe CofixQual)}
-  deriving (Eq, Ord, Read, Show)
-
-_Cofix = Core.Name "hydra.coq.syntax.Cofix"
-
-_Cofix_body = Core.Name "body"
-
-_Cofix_qual = Core.Name "qual"
-
-data CofixBody =
-  CofixBody {
-    cofixBodyIdent :: Ident,
-    cofixBodyBinders :: [Binder],
-    cofixBodyType :: (Maybe Type),
-    cofixBodyTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_CofixBody = Core.Name "hydra.coq.syntax.CofixBody"
-
-_CofixBody_ident = Core.Name "ident"
-
-_CofixBody_binders = Core.Name "binders"
-
-_CofixBody_type = Core.Name "type"
-
-_CofixBody_term = Core.Name "term"
-
-data CofixQual =
-  CofixQualIn Term |
-  CofixQualWith CofixWith
-  deriving (Eq, Ord, Read, Show)
-
-_CofixQual = Core.Name "hydra.coq.syntax.CofixQual"
-
-_CofixQual_in = Core.Name "in"
-
-_CofixQual_with = Core.Name "with"
-
-data CofixWith =
-  CofixWith {
-    cofixWithWith :: [CofixBody],
-    cofixWithFor :: (Maybe Ident)}
-  deriving (Eq, Ord, Read, Show)
-
-_CofixWith = Core.Name "hydra.coq.syntax.CofixWith"
-
-_CofixWith_with = Core.Name "with"
-
-_CofixWith_for = Core.Name "for"
-
-data Equation =
-  Equation {
-    equationPattern :: [[Pattern]],
-    equationTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_Equation = Core.Name "hydra.coq.syntax.Equation"
-
-_Equation_pattern = Core.Name "pattern"
-
-_Equation_term = Core.Name "term"
-
-data ExistentialVariable =
-  ExistentialVariable {
-    existentialVariableIdent :: Ident,
-    existentialVariableVariant :: ExistentialVariableVariant}
-  deriving (Eq, Ord, Read, Show)
-
-_ExistentialVariable = Core.Name "hydra.coq.syntax.ExistentialVariable"
-
-_ExistentialVariable_ident = Core.Name "ident"
-
-_ExistentialVariable_variant = Core.Name "variant"
-
-data ExistentialVariableVariant =
-  ExistentialVariableVariantPlaceholder  |
-  ExistentialVariableVariantInside1  |
-  ExistentialVariableVariantInside2  |
-  ExistentialVariableVariantOutside (Maybe IdentArg)
-  deriving (Eq, Ord, Read, Show)
-
-_ExistentialVariableVariant = Core.Name "hydra.coq.syntax.ExistentialVariableVariant"
-
-_ExistentialVariableVariant_placeholder = Core.Name "placeholder"
-
-_ExistentialVariableVariant_inside1 = Core.Name "inside1"
-
-_ExistentialVariableVariant_inside2 = Core.Name "inside2"
-
-_ExistentialVariableVariant_outside = Core.Name "outside"
-
-newtype FieldIdent =
-  FieldIdent {
-    unFieldIdent :: Ident}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldIdent = Core.Name "hydra.coq.syntax.FieldIdent"
-
-data Fix =
-  FixDecl Fix_Decl |
-  FixQual (Maybe Fix_Qual)
-  deriving (Eq, Ord, Read, Show)
-
-_Fix = Core.Name "hydra.coq.syntax.Fix"
-
-_Fix_decl = Core.Name "decl"
-
-_Fix_qual = Core.Name "qual"
-
-data FixAnnot =
-  FixAnnotStruct Ident |
-  FixAnnotWf FixAnnot_Wf |
-  FixAnnotMeasure FixAnnot_Measure
-  deriving (Eq, Ord, Read, Show)
-
-_FixAnnot = Core.Name "hydra.coq.syntax.FixAnnot"
-
-_FixAnnot_struct = Core.Name "struct"
-
-_FixAnnot_wf = Core.Name "wf"
-
-_FixAnnot_measure = Core.Name "measure"
-
-data FixAnnot_Measure =
-  FixAnnot_Measure {
-    fixAnnot_MeasureTerm :: OneTerm,
-    fixAnnot_MeasureIdent :: (Maybe Ident),
-    fixAnnot_MeasureTerm2 :: (Maybe OneTerm)}
-  deriving (Eq, Ord, Read, Show)
-
-_FixAnnot_Measure = Core.Name "hydra.coq.syntax.FixAnnot_Measure"
-
-_FixAnnot_Measure_term = Core.Name "term"
-
-_FixAnnot_Measure_ident = Core.Name "ident"
-
-_FixAnnot_Measure_term2 = Core.Name "term2"
-
-data FixAnnot_Wf =
-  FixAnnot_Wf {
-    fixAnnot_WfTerm :: OneTerm,
-    fixAnnot_WfIdent :: Ident}
-  deriving (Eq, Ord, Read, Show)
-
-_FixAnnot_Wf = Core.Name "hydra.coq.syntax.FixAnnot_Wf"
-
-_FixAnnot_Wf_term = Core.Name "term"
-
-_FixAnnot_Wf_ident = Core.Name "ident"
-
-data Fix_Decl =
-  Fix_Decl {
-    fix_DeclIdent :: Ident,
-    fix_DeclBinders :: [Binder],
-    fix_DeclAnnot :: (Maybe FixAnnot),
-    fix_DeclType :: (Maybe Type),
-    fix_DeclTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_Fix_Decl = Core.Name "hydra.coq.syntax.Fix_Decl"
-
-_Fix_Decl_ident = Core.Name "ident"
-
-_Fix_Decl_binders = Core.Name "binders"
-
-_Fix_Decl_annot = Core.Name "annot"
-
-_Fix_Decl_type = Core.Name "type"
-
-_Fix_Decl_term = Core.Name "term"
-
-data Fix_Qual =
-  Fix_QualIn Term |
-  Fix_QualWith FixWith
-  deriving (Eq, Ord, Read, Show)
-
-_Fix_Qual = Core.Name "hydra.coq.syntax.Fix_Qual"
-
-_Fix_Qual_in = Core.Name "in"
-
-_Fix_Qual_with = Core.Name "with"
-
-data FixWith =
-  FixWith {
-    fixWithDecls :: [Fix_Decl],
-    fixWithFor :: (Maybe Ident)}
-  deriving (Eq, Ord, Read, Show)
-
-_FixWith = Core.Name "hydra.coq.syntax.FixWith"
-
-_FixWith_decls = Core.Name "decls"
-
-_FixWith_for = Core.Name "for"
-
-data Forall =
-  Forall {
-    forallBinders :: OpenBinders,
-    forallType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_Forall = Core.Name "hydra.coq.syntax.Forall"
-
-_Forall_binders = Core.Name "binders"
-
-_Forall_type = Core.Name "type"
-
-data ForallOrFun =
-  ForallOrFunForall Forall |
-  ForallOrFunFun Fun
-  deriving (Eq, Ord, Read, Show)
-
-_ForallOrFun = Core.Name "hydra.coq.syntax.ForallOrFun"
-
-_ForallOrFun_forall = Core.Name "forall"
-
-_ForallOrFun_fun = Core.Name "fun"
-
-data Fun =
-  Fun {
-    funBinders :: OpenBinders,
-    funBody :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_Fun = Core.Name "hydra.coq.syntax.Fun"
-
-_Fun_binders = Core.Name "binders"
-
-_Fun_body = Core.Name "body"
-
-data GeneralizingBinder =
-  -- | Terms surrounded by `( ) introduce their free variables as explicit arguments
-  GeneralizingBinderExplicit TypeclassConstraint |
-  -- | Terms surrounded by `{ } introduce their free variables as maximally inserted implicit arguments
-  GeneralizingBinderImplicitMaximallyInserted TypeclassConstraint |
-  -- | Terms surrounded by `[ ] introduce them as non-maximally inserted implicit arguments
-  GeneralizingBinderImplicitNonMaximallyInserted TypeclassConstraint
-  deriving (Eq, Ord, Read, Show)
-
-_GeneralizingBinder = Core.Name "hydra.coq.syntax.GeneralizingBinder"
-
-_GeneralizingBinder_explicit = Core.Name "explicit"
-
-_GeneralizingBinder_implicitMaximallyInserted = Core.Name "implicitMaximallyInserted"
-
-_GeneralizingBinder_implicitNonMaximallyInserted = Core.Name "implicitNonMaximallyInserted"
-
-newtype Ident =
-  Ident {
-    unIdent :: String_}
-  deriving (Eq, Ord, Read, Show)
-
-_Ident = Core.Name "hydra.coq.syntax.Ident"
-
-data IdentArg =
-  IdentArg {
-    identArgIdent :: Ident,
-    identArgTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_IdentArg = Core.Name "hydra.coq.syntax.IdentArg"
-
-_IdentArg_ident = Core.Name "ident"
-
-_IdentArg_term = Core.Name "term"
-
--- | Pattern match on boolean values
-data If =
-  If {
-    ifCondition :: Term,
-    ifReturnAs :: (Maybe ReturnAs),
-    ifThen :: Term,
-    ifElse :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_If = Core.Name "hydra.coq.syntax.If"
-
-_If_condition = Core.Name "condition"
-
-_If_returnAs = Core.Name "returnAs"
-
-_If_then = Core.Name "then"
-
-_If_else = Core.Name "else"
-
--- | In the context of a function definition, these forms specify that name is an implicit argument.
-data ImplicitBinders =
-  -- | The first form, with curly braces, makes name a maximally inserted implicit argument
-  ImplicitBindersMaximallyInserted TypeBinders |
-  -- | The second form, with square brackets, makes name a non-maximally inserted implicit argument.
-  ImplicitBindersNonMaximallyInserted TypeBinders
-  deriving (Eq, Ord, Read, Show)
-
-_ImplicitBinders = Core.Name "hydra.coq.syntax.ImplicitBinders"
-
-_ImplicitBinders_maximallyInserted = Core.Name "maximallyInserted"
-
-_ImplicitBinders_nonMaximallyInserted = Core.Name "nonMaximallyInserted"
-
--- | A let-in definition
-data Let =
-  Let {
-    letBindings :: LetBindings,
-    letIn :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_Let = Core.Name "hydra.coq.syntax.Let"
-
-_Let_bindings = Core.Name "bindings"
-
-_Let_in = Core.Name "in"
-
--- | Some constructions allow the binding of a variable to value. This is called a 'let-binder'.
-data LetBinder =
-  LetBinder {
-    letBinderName :: Name,
-    letBinderType :: (Maybe Type),
-    letBinderTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_LetBinder = Core.Name "hydra.coq.syntax.LetBinder"
-
-_LetBinder_name = Core.Name "name"
-
-_LetBinder_type = Core.Name "type"
-
-_LetBinder_term = Core.Name "term"
-
-data LetBindings =
-  LetBindingsNamed LetNamed |
-  LetBindingsDestructuring LetDestructuring
-  deriving (Eq, Ord, Read, Show)
-
-_LetBindings = Core.Name "hydra.coq.syntax.LetBindings"
-
-_LetBindings_named = Core.Name "named"
-
-_LetBindings_destructuring = Core.Name "destructuring"
-
-data LetNamed =
-  LetNamed {
-    letNamedBinder :: LetBinder,
-    letNamedBinders :: [Binder]}
-  deriving (Eq, Ord, Read, Show)
-
-_LetNamed = Core.Name "hydra.coq.syntax.LetNamed"
-
-_LetNamed_binder = Core.Name "binder"
-
-_LetNamed_binders = Core.Name "binders"
-
-data LetDestructuring =
-  LetDestructuringVariant1 LetDestructuring_Variant1 |
-  LetDestructuringVariant2 LetDestructuring_Variant2 |
-  LetDestructuringVariant3 LetDestructuring_Variant3
-  deriving (Eq, Ord, Read, Show)
-
-_LetDestructuring = Core.Name "hydra.coq.syntax.LetDestructuring"
-
-_LetDestructuring_variant1 = Core.Name "variant1"
-
-_LetDestructuring_variant2 = Core.Name "variant2"
-
-_LetDestructuring_variant3 = Core.Name "variant3"
-
-data LetDestructuring_Variant1 =
-  LetDestructuring_Variant1 {
-    letDestructuring_Variant1Names :: [Name],
-    letDestructuring_Variant1ReturnAs :: (Maybe ReturnAs),
-    letDestructuring_Variant1Term :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_LetDestructuring_Variant1 = Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"
-
-_LetDestructuring_Variant1_names = Core.Name "names"
-
-_LetDestructuring_Variant1_returnAs = Core.Name "returnAs"
-
-_LetDestructuring_Variant1_term = Core.Name "term"
-
-data LetDestructuring_Variant2 =
-  LetDestructuring_Variant2 {
-    letDestructuring_Variant2Pattern :: Pattern,
-    letDestructuring_Variant2Term :: Term,
-    letDestructuring_Variant2Return :: (Maybe Term100)}
-  deriving (Eq, Ord, Read, Show)
-
-_LetDestructuring_Variant2 = Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"
-
-_LetDestructuring_Variant2_pattern = Core.Name "pattern"
-
-_LetDestructuring_Variant2_term = Core.Name "term"
-
-_LetDestructuring_Variant2_return = Core.Name "return"
-
-data LetDestructuring_Variant3 =
-  LetDestructuring_Variant3 {
-    letDestructuring_Variant3Pattern1 :: Pattern,
-    letDestructuring_Variant3Pattern2 :: Pattern,
-    letDestructuring_Variant3Term :: Term,
-    letDestructuring_Variant3Return :: Term100}
-  deriving (Eq, Ord, Read, Show)
-
-_LetDestructuring_Variant3 = Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"
-
-_LetDestructuring_Variant3_pattern1 = Core.Name "pattern1"
-
-_LetDestructuring_Variant3_pattern2 = Core.Name "pattern2"
-
-_LetDestructuring_Variant3_term = Core.Name "term"
-
-_LetDestructuring_Variant3_return = Core.Name "return"
-
-data Match =
-  Match {
-    matchCaseItems :: [CaseItem],
-    matchReturn :: (Maybe Term100),
-    matchPipe :: Bool,
-    matchEquations :: [Equation]}
-  deriving (Eq, Ord, Read, Show)
-
-_Match = Core.Name "hydra.coq.syntax.Match"
-
-_Match_caseItems = Core.Name "caseItems"
-
-_Match_return = Core.Name "return"
-
-_Match_pipe = Core.Name "pipe"
-
-_Match_equations = Core.Name "equations"
-
-newtype Name =
-  Name {
-    unName :: (Maybe Ident)}
-  deriving (Eq, Ord, Read, Show)
-
-_Name = Core.Name "hydra.coq.syntax.Name"
-
--- | A non-negative arbitrary-precision integer
-newtype Natural =
-  Natural {
-    unNatural :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_Natural = Core.Name "hydra.coq.syntax.Natural"
-
-data NaturalArg =
-  NaturalArg {
-    naturalArgNatural :: Natural,
-    naturalArgTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_NaturalArg = Core.Name "hydra.coq.syntax.NaturalArg"
-
-_NaturalArg_natural = Core.Name "natural"
-
-_NaturalArg_term = Core.Name "term"
-
-data NormalApplication =
-  NormalApplication {
-    normalApplicationLhs :: Term1,
-    normalApplicationRhs :: [Arg]}
-  deriving (Eq, Ord, Read, Show)
-
-_NormalApplication = Core.Name "hydra.coq.syntax.NormalApplication"
-
-_NormalApplication_lhs = Core.Name "lhs"
-
-_NormalApplication_rhs = Core.Name "rhs"
-
-newtype Number =
-  Number {
-    unNumber :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_Number = Core.Name "hydra.coq.syntax.Number"
-
-data OneTerm =
-  OneTermExplicit QualidAnnotated |
-  OneTermTerm1 Term1
-  deriving (Eq, Ord, Read, Show)
-
-_OneTerm = Core.Name "hydra.coq.syntax.OneTerm"
-
-_OneTerm_explicit = Core.Name "explicit"
-
-_OneTerm_term1 = Core.Name "term1"
-
-data OpenBinders =
-  OpenBindersType TypeBinders |
-  OpenBindersBinders [Binder]
-  deriving (Eq, Ord, Read, Show)
-
-_OpenBinders = Core.Name "hydra.coq.syntax.OpenBinders"
-
-_OpenBinders_type = Core.Name "type"
-
-_OpenBinders_binders = Core.Name "binders"
-
-data Pattern =
-  PatternPattern Pattern10 |
-  PatternTerm (Maybe Term)
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern = Core.Name "hydra.coq.syntax.Pattern"
-
-_Pattern_pattern = Core.Name "pattern"
-
-_Pattern_term = Core.Name "term"
-
-data Pattern0 =
-  Pattern0Qualid Qualid |
-  Pattern0QualIdAndPattern QualidAndPattern |
-  Pattern0Placeholder  |
-  Pattern0Parens [Pattern] |
-  Pattern0Number Number |
-  Pattern0String String_
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern0 = Core.Name "hydra.coq.syntax.Pattern0"
-
-_Pattern0_qualid = Core.Name "qualid"
-
-_Pattern0_qualIdAndPattern = Core.Name "qualIdAndPattern"
-
-_Pattern0_placeholder = Core.Name "placeholder"
-
-_Pattern0_parens = Core.Name "parens"
-
-_Pattern0_number = Core.Name "number"
-
-_Pattern0_string = Core.Name "string"
-
-data Pattern1 =
-  Pattern1 {
-    pattern1Pattern :: Pattern0,
-    pattern1Scope :: (Maybe ScopeKey)}
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern1 = Core.Name "hydra.coq.syntax.Pattern1"
-
-_Pattern1_pattern = Core.Name "pattern"
-
-_Pattern1_scope = Core.Name "scope"
-
-data Pattern10 =
-  Pattern10As Pattern10_As |
-  Pattern10Patterns Pattern10_Patterns |
-  Pattern10Qualiid Pattern10_Qualid
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern10 = Core.Name "hydra.coq.syntax.Pattern10"
-
-_Pattern10_as = Core.Name "as"
-
-_Pattern10_patterns = Core.Name "patterns"
-
-_Pattern10_qualiid = Core.Name "qualiid"
-
-data Pattern10_As =
-  Pattern10_As {
-    pattern10_AsPattern :: Pattern1,
-    pattern10_AsAs :: Name}
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern10_As = Core.Name "hydra.coq.syntax.Pattern10_As"
-
-_Pattern10_As_pattern = Core.Name "pattern"
-
-_Pattern10_As_as = Core.Name "as"
-
-data Pattern10_Patterns =
-  Pattern10_Patterns {
-    pattern10_PatternsPattern :: Pattern1,
-    pattern10_PatternsPatterns :: [Pattern1]}
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern10_Patterns = Core.Name "hydra.coq.syntax.Pattern10_Patterns"
-
-_Pattern10_Patterns_pattern = Core.Name "pattern"
-
-_Pattern10_Patterns_patterns = Core.Name "patterns"
-
-data Pattern10_Qualid =
-  Pattern10_Qualid {
-    pattern10_QualidQualid :: Qualid,
-    pattern10_QualidPatterns :: [Pattern1]}
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern10_Qualid = Core.Name "hydra.coq.syntax.Pattern10_Qualid"
-
-_Pattern10_Qualid_qualid = Core.Name "qualid"
-
-_Pattern10_Qualid_patterns = Core.Name "patterns"
-
-data PrimitiveNotations =
-  PrimitiveNotationsNumber Number |
-  PrimitiveNotationsString String_
-  deriving (Eq, Ord, Read, Show)
-
-_PrimitiveNotations = Core.Name "hydra.coq.syntax.PrimitiveNotations"
-
-_PrimitiveNotations_number = Core.Name "number"
-
-_PrimitiveNotations_string = Core.Name "string"
-
--- | A qualified identifier
-data Qualid =
-  Qualid {
-    qualidId :: Ident,
-    qualidFieldIds :: [FieldIdent]}
-  deriving (Eq, Ord, Read, Show)
-
-_Qualid = Core.Name "hydra.coq.syntax.Qualid"
-
-_Qualid_id = Core.Name "id"
-
-_Qualid_fieldIds = Core.Name "fieldIds"
-
-data QualidAndPattern =
-  QualidAndPattern {
-    qualidAndPatternQualid :: Qualid,
-    qualidAndPatternPattern :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-
-_QualidAndPattern = Core.Name "hydra.coq.syntax.QualidAndPattern"
-
-_QualidAndPattern_qualid = Core.Name "qualid"
-
-_QualidAndPattern_pattern = Core.Name "pattern"
-
-data QualidAnnotated =
-  QualidAnnotated {
-    qualidAnnotatedQualid :: Qualid,
-    qualidAnnotatedUnivAnnot :: (Maybe UnivAnnot)}
-  deriving (Eq, Ord, Read, Show)
-
-_QualidAnnotated = Core.Name "hydra.coq.syntax.QualidAnnotated"
-
-_QualidAnnotated_qualid = Core.Name "qualid"
-
-_QualidAnnotated_univAnnot = Core.Name "univAnnot"
-
-data ReturnAs =
-  ReturnAs {
-    returnAsAs :: (Maybe Name),
-    returnAsReturn :: Term100}
-  deriving (Eq, Ord, Read, Show)
-
-_ReturnAs = Core.Name "hydra.coq.syntax.ReturnAs"
-
-_ReturnAs_as = Core.Name "as"
-
-_ReturnAs_return = Core.Name "return"
-
-newtype ScopeKey =
-  ScopeKey {
-    unScopeKey :: Ident}
-  deriving (Eq, Ord, Read, Show)
-
-_ScopeKey = Core.Name "hydra.coq.syntax.ScopeKey"
-
--- | The types of types are called sorts.
-data Sort =
-  -- | The sort 𝖲𝖾𝗍 intends to be the type of small sets.
-  SortSet  |
-  -- | The sort 𝖯𝗋𝗈𝗉 intends to be the type of logical propositions.
-  SortProp  |
-  -- | The sort 𝖲𝖯𝗋𝗈𝗉 is like 𝖯𝗋𝗈𝗉 but the propositions in 𝖲𝖯𝗋𝗈𝗉 are known to have irrelevant proofs (all proofs are equal).
-  SortSProp  |
-  SortType  |
-  SortTypeWithAnyUniverse  |
-  SortTypeWithUniverse Universe
-  deriving (Eq, Ord, Read, Show)
-
-_Sort = Core.Name "hydra.coq.syntax.Sort"
-
-_Sort_set = Core.Name "set"
-
-_Sort_prop = Core.Name "prop"
-
-_Sort_sProp = Core.Name "sProp"
-
-_Sort_type = Core.Name "type"
-
-_Sort_typeWithAnyUniverse = Core.Name "typeWithAnyUniverse"
-
-_Sort_typeWithUniverse = Core.Name "typeWithUniverse"
-
-newtype String_ =
-  String_ {
-    unString :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_String = Core.Name "hydra.coq.syntax.String"
-
-data Term =
-  TermForallOrFun ForallOrFun |
-  TermLet Let |
-  TermIf If |
-  TermFix Fix |
-  TermCofix Cofix |
-  TermTerm100 Term100
-  deriving (Eq, Ord, Read, Show)
-
-_Term = Core.Name "hydra.coq.syntax.Term"
-
-_Term_forallOrFun = Core.Name "forallOrFun"
-
-_Term_let = Core.Name "let"
-
-_Term_if = Core.Name "if"
-
-_Term_fix = Core.Name "fix"
-
-_Term_cofix = Core.Name "cofix"
-
-_Term_term100 = Core.Name "term100"
-
-data Term0 =
-  Term0QualidAnnotated QualidAnnotated |
-  Term0Sort Sort |
-  Term0PrimitiveNotations PrimitiveNotations |
-  Term0Evar ExistentialVariable |
-  Term0Match Match |
-  Term0Record  |
-  Term0Generalizing  |
-  Term0Ltac  |
-  Term0Parens Term
-  deriving (Eq, Ord, Read, Show)
-
-_Term0 = Core.Name "hydra.coq.syntax.Term0"
-
-_Term0_qualidAnnotated = Core.Name "qualidAnnotated"
-
-_Term0_sort = Core.Name "sort"
-
-_Term0_primitiveNotations = Core.Name "primitiveNotations"
-
-_Term0_evar = Core.Name "evar"
-
-_Term0_match = Core.Name "match"
-
-_Term0_record = Core.Name "record"
-
-_Term0_generalizing = Core.Name "generalizing"
-
-_Term0_ltac = Core.Name "ltac"
-
-_Term0_parens = Core.Name "parens"
-
-data Term1 =
-  Term1Projection  |
-  Term1Scope  |
-  Term1Term0 Term0
-  deriving (Eq, Ord, Read, Show)
-
-_Term1 = Core.Name "hydra.coq.syntax.Term1"
-
-_Term1_projection = Core.Name "projection"
-
-_Term1_scope = Core.Name "scope"
-
-_Term1_term0 = Core.Name "term0"
-
-data Term10 =
-  Term10Application Application |
-  Term10OneTerm OneTerm
-  deriving (Eq, Ord, Read, Show)
-
-_Term10 = Core.Name "hydra.coq.syntax.Term10"
-
-_Term10_application = Core.Name "application"
-
-_Term10_oneTerm = Core.Name "oneTerm"
-
-data Term100 =
-  Term100Cast TypeCast |
-  Term100Term10 Term10
-  deriving (Eq, Ord, Read, Show)
-
-_Term100 = Core.Name "hydra.coq.syntax.Term100"
-
-_Term100_cast = Core.Name "cast"
-
-_Term100_term10 = Core.Name "term10"
-
-newtype Type =
-  Type {
-    unType :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.coq.syntax.Type"
-
-data TypeCast =
-  TypeCast {
-    typeCastTerm :: Term10,
-    typeCastType :: Type,
-    typeCastOperator :: TypeCastOperator}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeCast = Core.Name "hydra.coq.syntax.TypeCast"
-
-_TypeCast_term = Core.Name "term"
-
-_TypeCast_type = Core.Name "type"
-
-_TypeCast_operator = Core.Name "operator"
-
-data TypeCastOperator =
-  -- | The expression term10 : type is a type cast expression. It enforces the type of term10 to be type.
-  TypeCastOperatorNormal  |
-  -- | term10 <: type specifies that the virtual machine will be used to type check that term10 has type type (see vm_compute).
-  TypeCastOperatorVmCompute  |
-  -- | term10 <<: type specifies that compilation to OCaml will be used to type check that term10 has type type (see native_compute).
-  TypeCastOperatorNativeCompute
-  deriving (Eq, Ord, Read, Show)
-
-_TypeCastOperator = Core.Name "hydra.coq.syntax.TypeCastOperator"
-
-_TypeCastOperator_normal = Core.Name "normal"
-
-_TypeCastOperator_vmCompute = Core.Name "vmCompute"
-
-_TypeCastOperator_nativeCompute = Core.Name "nativeCompute"
-
-data TypeBinders =
-  TypeBinders {
-    typeBindersNames :: [Name],
-    typeBindersType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeBinders = Core.Name "hydra.coq.syntax.TypeBinders"
-
-_TypeBinders_names = Core.Name "names"
-
-_TypeBinders_type = Core.Name "type"
-
-data TypeclassConstraint =
-  TypeclassConstraint {
-    typeclassConstraintName :: (Maybe Name),
-    typeclassConstraintGeneralizing :: Bool,
-    typeclassConstraintTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeclassConstraint = Core.Name "hydra.coq.syntax.TypeclassConstraint"
-
-_TypeclassConstraint_name = Core.Name "name"
-
-_TypeclassConstraint_generalizing = Core.Name "generalizing"
-
-_TypeclassConstraint_term = Core.Name "term"
-
-newtype UnivAnnot =
-  UnivAnnot {
-    unUnivAnnot :: [UniverseLevel]}
-  deriving (Eq, Ord, Read, Show)
-
-_UnivAnnot = Core.Name "hydra.coq.syntax.UnivAnnot"
-
-data Universe =
-  UniverseMax [Universe_Expr] |
-  UniverseExpr Universe_Expr
-  deriving (Eq, Ord, Read, Show)
-
-_Universe = Core.Name "hydra.coq.syntax.Universe"
-
-_Universe_max = Core.Name "max"
-
-_Universe_expr = Core.Name "expr"
-
-data Universe_Expr =
-  Universe_Expr {
-    universe_ExprName :: UniverseName,
-    universe_ExprNumber :: (Maybe Natural)}
-  deriving (Eq, Ord, Read, Show)
-
-_Universe_Expr = Core.Name "hydra.coq.syntax.Universe_Expr"
-
-_Universe_Expr_name = Core.Name "name"
-
-_Universe_Expr_number = Core.Name "number"
-
-data UniverseLevel =
-  UniverseLevelSet  |
-  UniverseLevelProp  |
-  UniverseLevelType  |
-  UniverseLevelIgnored  |
-  UniverseLevelQualid Qualid
-  deriving (Eq, Ord, Read, Show)
-
-_UniverseLevel = Core.Name "hydra.coq.syntax.UniverseLevel"
-
-_UniverseLevel_set = Core.Name "set"
-
-_UniverseLevel_prop = Core.Name "prop"
-
-_UniverseLevel_type = Core.Name "type"
-
-_UniverseLevel_ignored = Core.Name "ignored"
-
-_UniverseLevel_qualid = Core.Name "qualid"
-
-data UniverseName =
-  UniverseNameQualid Qualid |
-  UniverseNameSet  |
-  UniverseNameProp
-  deriving (Eq, Ord, Read, Show)
-
-_UniverseName = Core.Name "hydra.coq.syntax.UniverseName"
-
-_UniverseName_qualid = Core.Name "qualid"
-
-_UniverseName_set = Core.Name "set"
-
-_UniverseName_prop = Core.Name "prop"
-
--- | An Axiom declaration: `Axiom <name> : <type>.`
-data AxiomDeclaration =
-  AxiomDeclaration {
-    axiomDeclarationName :: Ident,
-    axiomDeclarationType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_AxiomDeclaration = Core.Name "hydra.coq.syntax.AxiomDeclaration"
-
-_AxiomDeclaration_name = Core.Name "name"
-
-_AxiomDeclaration_type = Core.Name "type"
-
--- | A Coq comment (* ... *)
-newtype Comment =
-  Comment {
-    unComment :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Comment = Core.Name "hydra.coq.syntax.Comment"
-
--- | A constructor in an Inductive definition
-data Constructor =
-  Constructor {
-    constructorName :: Ident,
-    constructorBinders :: [Binder],
-    constructorType :: (Maybe Type)}
-  deriving (Eq, Ord, Read, Show)
-
-_Constructor = Core.Name "hydra.coq.syntax.Constructor"
-
-_Constructor_name = Core.Name "name"
-
-_Constructor_binders = Core.Name "binders"
-
-_Constructor_type = Core.Name "type"
-
--- | A Definition or Let command: Definition name binders : type := term.
-data Definition =
-  Definition {
-    definitionLocality :: (Maybe Locality),
-    definitionName :: Ident,
-    definitionBinders :: [Binder],
-    definitionType :: (Maybe Type),
-    definitionBody :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_Definition = Core.Name "hydra.coq.syntax.Definition"
-
-_Definition_locality = Core.Name "locality"
-
-_Definition_name = Core.Name "name"
-
-_Definition_binders = Core.Name "binders"
-
-_Definition_type = Core.Name "type"
-
-_Definition_body = Core.Name "body"
-
--- | A complete Coq .v file
-data Document =
-  Document {
-    documentSentences :: [Sentence]}
-  deriving (Eq, Ord, Read, Show)
-
-_Document = Core.Name "hydra.coq.syntax.Document"
-
-_Document_sentences = Core.Name "sentences"
-
--- | A Fixpoint command for recursive definitions
-data FixpointDefinition =
-  FixpointDefinition {
-    fixpointDefinitionLocality :: (Maybe Locality),
-    fixpointDefinitionName :: Ident,
-    fixpointDefinitionBinders :: [Binder],
-    fixpointDefinitionAnnot :: (Maybe FixAnnot),
-    fixpointDefinitionType :: (Maybe Type),
-    fixpointDefinitionBody :: Term,
-    fixpointDefinitionWith :: [Fix_Decl]}
-  deriving (Eq, Ord, Read, Show)
-
-_FixpointDefinition = Core.Name "hydra.coq.syntax.FixpointDefinition"
-
-_FixpointDefinition_locality = Core.Name "locality"
-
-_FixpointDefinition_name = Core.Name "name"
-
-_FixpointDefinition_binders = Core.Name "binders"
-
-_FixpointDefinition_annot = Core.Name "annot"
-
-_FixpointDefinition_type = Core.Name "type"
-
-_FixpointDefinition_body = Core.Name "body"
-
-_FixpointDefinition_with = Core.Name "with"
-
--- | Qualification for Require/Import commands
-data ImportQualification =
-  ImportQualificationImport  |
-  ImportQualificationExport
-  deriving (Eq, Ord, Read, Show)
-
-_ImportQualification = Core.Name "hydra.coq.syntax.ImportQualification"
-
-_ImportQualification_import = Core.Name "import"
-
-_ImportQualification_export = Core.Name "export"
-
--- | A single body in an Inductive definition (supports mutual induction via 'with')
-data InductiveBody =
-  InductiveBody {
-    inductiveBodyName :: Ident,
-    inductiveBodyBinders :: [Binder],
-    inductiveBodyType :: (Maybe Type),
-    inductiveBodyConstructors :: [Constructor]}
-  deriving (Eq, Ord, Read, Show)
-
-_InductiveBody = Core.Name "hydra.coq.syntax.InductiveBody"
-
-_InductiveBody_name = Core.Name "name"
-
-_InductiveBody_binders = Core.Name "binders"
-
-_InductiveBody_type = Core.Name "type"
-
-_InductiveBody_constructors = Core.Name "constructors"
-
--- | An Inductive or CoInductive definition with one or more mutually inductive bodies
-data InductiveDefinition =
-  InductiveDefinition {
-    inductiveDefinitionLocality :: (Maybe Locality),
-    inductiveDefinitionCoinductive :: Bool,
-    inductiveDefinitionBodies :: [InductiveBody]}
-  deriving (Eq, Ord, Read, Show)
-
-_InductiveDefinition = Core.Name "hydra.coq.syntax.InductiveDefinition"
-
-_InductiveDefinition_locality = Core.Name "locality"
-
-_InductiveDefinition_coinductive = Core.Name "coinductive"
-
-_InductiveDefinition_bodies = Core.Name "bodies"
-
--- | Local or Global qualifier for commands
-data Locality =
-  LocalityLocal  |
-  LocalityGlobal
-  deriving (Eq, Ord, Read, Show)
-
-_Locality = Core.Name "hydra.coq.syntax.Locality"
-
-_Locality_local = Core.Name "local"
-
-_Locality_global = Core.Name "global"
-
--- | A Module ... End block
-data ModuleDefinition =
-  ModuleDefinition {
-    moduleDefinitionName :: Ident,
-    moduleDefinitionSentences :: [Sentence]}
-  deriving (Eq, Ord, Read, Show)
-
-_ModuleDefinition = Core.Name "hydra.coq.syntax.ModuleDefinition"
-
-_ModuleDefinition_name = Core.Name "name"
-
-_ModuleDefinition_sentences = Core.Name "sentences"
-
--- | A Notation declaration
-data NotationDeclaration =
-  NotationDeclaration {
-    notationDeclarationNotation :: String_,
-    notationDeclarationDefinition :: Term,
-    notationDeclarationLevel :: (Maybe Natural),
-    notationDeclarationAssociativity :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_NotationDeclaration = Core.Name "hydra.coq.syntax.NotationDeclaration"
-
-_NotationDeclaration_notation = Core.Name "notation"
-
-_NotationDeclaration_definition = Core.Name "definition"
-
-_NotationDeclaration_level = Core.Name "level"
-
-_NotationDeclaration_associativity = Core.Name "associativity"
-
--- | The body of a Record definition
-data RecordBody =
-  RecordBody {
-    recordBodyConstructor :: (Maybe Ident),
-    recordBodyFields :: [RecordField]}
-  deriving (Eq, Ord, Read, Show)
-
-_RecordBody = Core.Name "hydra.coq.syntax.RecordBody"
-
-_RecordBody_constructor = Core.Name "constructor"
-
-_RecordBody_fields = Core.Name "fields"
-
--- | A Record or Structure definition
-data RecordDefinition =
-  RecordDefinition {
-    recordDefinitionLocality :: (Maybe Locality),
-    recordDefinitionName :: Ident,
-    recordDefinitionBinders :: [Binder],
-    recordDefinitionSort :: (Maybe Sort),
-    recordDefinitionBody :: RecordBody}
-  deriving (Eq, Ord, Read, Show)
-
-_RecordDefinition = Core.Name "hydra.coq.syntax.RecordDefinition"
-
-_RecordDefinition_locality = Core.Name "locality"
-
-_RecordDefinition_name = Core.Name "name"
-
-_RecordDefinition_binders = Core.Name "binders"
-
-_RecordDefinition_sort = Core.Name "sort"
-
-_RecordDefinition_body = Core.Name "body"
-
--- | A field in a Record definition
-data RecordField =
-  RecordField {
-    recordFieldName :: Ident,
-    recordFieldType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_RecordField = Core.Name "hydra.coq.syntax.RecordField"
-
-_RecordField_name = Core.Name "name"
-
-_RecordField_type = Core.Name "type"
-
--- | A Require Import/Export command
-data RequireImport =
-  RequireImport {
-    requireImportFrom :: (Maybe Qualid),
-    requireImportRequire :: Bool,
-    requireImportQualification :: (Maybe ImportQualification),
-    requireImportModules :: [Qualid]}
-  deriving (Eq, Ord, Read, Show)
-
-_RequireImport = Core.Name "hydra.coq.syntax.RequireImport"
-
-_RequireImport_from = Core.Name "from"
-
-_RequireImport_require = Core.Name "require"
-
-_RequireImport_qualification = Core.Name "qualification"
-
-_RequireImport_modules = Core.Name "modules"
-
--- | A Section ... End block
-data SectionDefinition =
-  SectionDefinition {
-    sectionDefinitionName :: Ident,
-    sectionDefinitionSentences :: [Sentence]}
-  deriving (Eq, Ord, Read, Show)
-
-_SectionDefinition = Core.Name "hydra.coq.syntax.SectionDefinition"
-
-_SectionDefinition_name = Core.Name "name"
-
-_SectionDefinition_sentences = Core.Name "sentences"
-
--- | A top-level sentence in a Coq document, optionally preceded by a comment
-data Sentence =
-  Sentence {
-    sentenceComment :: (Maybe Comment),
-    sentenceContent :: SentenceContent}
-  deriving (Eq, Ord, Read, Show)
-
-_Sentence = Core.Name "hydra.coq.syntax.Sentence"
-
-_Sentence_comment = Core.Name "comment"
-
-_Sentence_content = Core.Name "content"
-
--- | The content of a top-level sentence
-data SentenceContent =
-  SentenceContentAxiom AxiomDeclaration |
-  SentenceContentDefinition Definition |
-  SentenceContentFixpoint FixpointDefinition |
-  SentenceContentInductive InductiveDefinition |
-  SentenceContentModule ModuleDefinition |
-  SentenceContentNotation NotationDeclaration |
-  SentenceContentRecord RecordDefinition |
-  SentenceContentRequireImport RequireImport |
-  SentenceContentSection SectionDefinition |
-  SentenceContentTheorem TheoremBody
-  deriving (Eq, Ord, Read, Show)
-
-_SentenceContent = Core.Name "hydra.coq.syntax.SentenceContent"
-
-_SentenceContent_axiom = Core.Name "axiom"
-
-_SentenceContent_definition = Core.Name "definition"
-
-_SentenceContent_fixpoint = Core.Name "fixpoint"
-
-_SentenceContent_inductive = Core.Name "inductive"
-
-_SentenceContent_module = Core.Name "module"
-
-_SentenceContent_notation = Core.Name "notation"
-
-_SentenceContent_record = Core.Name "record"
-
-_SentenceContent_requireImport = Core.Name "requireImport"
-
-_SentenceContent_section = Core.Name "section"
-
-_SentenceContent_theorem = Core.Name "theorem"
-
--- | A Theorem/Lemma/Proposition with a proof term
-data TheoremBody =
-  TheoremBody {
-    theoremBodyKind :: TheoremKind,
-    theoremBodyName :: Ident,
-    theoremBodyBinders :: [Binder],
-    theoremBodyType :: Type,
-    theoremBodyProof :: Term}
-  deriving (Eq, Ord, Read, Show)
-
-_TheoremBody = Core.Name "hydra.coq.syntax.TheoremBody"
-
-_TheoremBody_kind = Core.Name "kind"
-
-_TheoremBody_name = Core.Name "name"
-
-_TheoremBody_binders = Core.Name "binders"
-
-_TheoremBody_type = Core.Name "type"
-
-_TheoremBody_proof = Core.Name "proof"
-
--- | The kind of theorem command
-data TheoremKind =
-  TheoremKindTheorem  |
-  TheoremKindLemma  |
-  TheoremKindProposition  |
-  TheoremKindCorollary  |
-  TheoremKindExample
-  deriving (Eq, Ord, Read, Show)
-
-_TheoremKind = Core.Name "hydra.coq.syntax.TheoremKind"
-
-_TheoremKind_theorem = Core.Name "theorem"
-
-_TheoremKind_lemma = Core.Name "lemma"
-
-_TheoremKind_proposition = Core.Name "proposition"
-
-_TheoremKind_corollary = Core.Name "corollary"
-
-_TheoremKind_example = Core.Name "example"
diff --git a/src/main/haskell/Hydra/Coq/Utils.hs b/src/main/haskell/Hydra/Coq/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Coq/Utils.hs
+++ /dev/null
@@ -1,668 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Pure helpers for the Coq code generator
-
-module Hydra.Coq.Utils where
-
-import qualified Hydra.Coq.Language as Language
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Variables as Variables
-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
-
--- | Build a map from each union-type definition's name to its constructor count
-buildConstructorCounts :: Ord t0 => ([(t0, Core.Type)] -> M.Map t0 Int)
-buildConstructorCounts defs =
-    Maps.fromList (Lists.concat (Lists.map (\nt ->
-      let name = Pairs.first nt
-          ty = Pairs.second nt
-          extracted = extractTypeParams ty
-          bodyTy = Pairs.second extracted
-      in case bodyTy of
-        Core.TypeUnion v0 -> [
-          (name, (Lists.length v0))]
-        _ -> []) defs))
-
--- | Build a map keyed by (qualifiedTypeName, rawFieldName) producing the prefixed Coq accessor name
-buildFieldMapping :: [Packaging.Module] -> M.Map (String, String) String
-buildFieldMapping modules =
-    Maps.fromList (Lists.concat (Lists.map (\m -> Lists.concat (Lists.map (\def_ -> case def_ of
-      Packaging.DefinitionType v0 ->
-        let qname = Core.unName (Packaging.typeDefinitionName v0)
-            tname = localName qname
-            ty = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)
-            extracted = extractTypeParams ty
-            bodyTy = Pairs.second extracted
-        in case bodyTy of
-          Core.TypeRecord v1 -> Lists.map (\ft ->
-            let rawFn = localNameRaw (Core.unName (Core.fieldTypeName ft))
-                fn = sanitize rawFn
-                prefixed =
-                        Strings.cat [
-                          Formatting.decapitalize tname,
-                          "_",
-                          fn]
-            in ((qname, rawFn), prefixed)) v1
-          _ -> []
-      _ -> []) (Packaging.moduleDefinitions m))) modules))
-
--- | Collect the set of free type-variable-like names (t0, t1, ...) referenced anywhere inside a Term
-collectFreeTypeVars :: Core.Term -> S.Set String
-collectFreeTypeVars tm =
-    case tm of
-      Core.TermAnnotated v0 -> collectFreeTypeVars (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> Sets.union (collectFreeTypeVars (Core.applicationFunction v0)) (collectFreeTypeVars (Core.applicationArgument v0))
-      Core.TermCases v0 -> Sets.union (Maybes.maybe Sets.empty (\d -> collectFreeTypeVars d) (Core.caseStatementDefault v0)) (Sets.unions (Lists.map (\f -> collectFreeTypeVars (Core.fieldTerm f)) (Core.caseStatementCases v0)))
-      Core.TermEither v0 -> Eithers.either (\l -> collectFreeTypeVars l) (\r -> collectFreeTypeVars r) v0
-      Core.TermInject v0 -> collectFreeTypeVars (Core.fieldTerm (Core.injectionField v0))
-      Core.TermLambda v0 ->
-        let paramName = Core.unName (Core.lambdaParameter v0)
-            domVars = Maybes.maybe Sets.empty (\dty -> collectFreeTypeVarsInType dty) (Core.lambdaDomain v0)
-            bodyVars = collectFreeTypeVars (Core.lambdaBody v0)
-            allVars = Sets.union domVars bodyVars
-        in (Logic.ifElse (isTypeVarLike paramName) (Sets.delete paramName allVars) allVars)
-      Core.TermLet v0 ->
-        let bindVars =
-                Sets.unions (Lists.map (\b -> Sets.union (collectFreeTypeVars (Core.bindingTerm b)) (Maybes.maybe Sets.empty (\sch -> collectFreeTypeVarsInTypeScheme sch) (Core.bindingTypeScheme b))) (Core.letBindings v0))
-        in (Sets.union bindVars (collectFreeTypeVars (Core.letBody v0)))
-      Core.TermList v0 -> Sets.unions (Lists.map (\el -> collectFreeTypeVars el) v0)
-      Core.TermMaybe v0 -> Maybes.maybe Sets.empty (\el -> collectFreeTypeVars el) v0
-      Core.TermPair v0 -> Sets.union (collectFreeTypeVars (Pairs.first v0)) (collectFreeTypeVars (Pairs.second v0))
-      Core.TermRecord v0 -> Sets.unions (Lists.map (\f -> collectFreeTypeVars (Core.fieldTerm f)) (Core.recordFields v0))
-      Core.TermSet v0 -> Sets.unions (Lists.map (\el -> collectFreeTypeVars el) (Sets.toList v0))
-      Core.TermTypeApplication v0 -> collectFreeTypeVars (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> Sets.delete (Core.unName (Core.typeLambdaParameter v0)) (collectFreeTypeVars (Core.typeLambdaBody v0))
-      Core.TermWrap v0 -> collectFreeTypeVars (Core.wrappedTermBody v0)
-      _ -> Sets.empty
-
--- | Collect names of type-variable-like references (t0, t1, ...) inside a Type
-collectFreeTypeVarsInType :: Core.Type -> S.Set String
-collectFreeTypeVarsInType ty =
-    case ty of
-      Core.TypeAnnotated v0 -> collectFreeTypeVarsInType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Sets.union (collectFreeTypeVarsInType (Core.applicationTypeFunction v0)) (collectFreeTypeVarsInType (Core.applicationTypeArgument v0))
-      Core.TypeForall v0 -> collectFreeTypeVarsInType (Core.forallTypeBody v0)
-      Core.TypeFunction v0 -> Sets.union (collectFreeTypeVarsInType (Core.functionTypeDomain v0)) (collectFreeTypeVarsInType (Core.functionTypeCodomain v0))
-      Core.TypeList v0 -> collectFreeTypeVarsInType v0
-      Core.TypeMap v0 -> Sets.union (collectFreeTypeVarsInType (Core.mapTypeKeys v0)) (collectFreeTypeVarsInType (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> collectFreeTypeVarsInType v0
-      Core.TypePair v0 -> Sets.union (collectFreeTypeVarsInType (Core.pairTypeFirst v0)) (collectFreeTypeVarsInType (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Sets.unions (Lists.map (\f -> collectFreeTypeVarsInType (Core.fieldTypeType f)) v0)
-      Core.TypeSet v0 -> collectFreeTypeVarsInType v0
-      Core.TypeUnion v0 -> Sets.unions (Lists.map (\f -> collectFreeTypeVarsInType (Core.fieldTypeType f)) v0)
-      Core.TypeVariable v0 ->
-        let nm = Core.unName v0
-        in (Logic.ifElse (isTypeVarLike nm) (Sets.singleton nm) Sets.empty)
-      Core.TypeWrap v0 -> collectFreeTypeVarsInType v0
-      _ -> Sets.empty
-
--- | Collect type-variable-like names declared or referenced by a TypeScheme
-collectFreeTypeVarsInTypeScheme :: Core.TypeScheme -> S.Set String
-collectFreeTypeVarsInTypeScheme ts =
-
-      let explicit =
-              Sets.fromList (Lists.map (\n -> Core.unName n) (Lists.filter (\n -> isTypeVarLike (Core.unName n)) (Core.typeSchemeVariables ts)))
-      in (Sets.union explicit (collectFreeTypeVarsInType (Core.typeSchemeBody ts)))
-
--- | Flatten consecutive TermLet wrappers into (bindings, innermostBody)
-collectLetBindings :: Core.Term -> ([Core.Binding], Core.Term)
-collectLetBindings tm =
-    case tm of
-      Core.TermLet v0 ->
-        let rest = collectLetBindings (Core.letBody v0)
-        in (Lists.concat2 (Core.letBindings v0) (Pairs.first rest), (Pairs.second rest))
-      _ -> ([], tm)
-
--- | Collect the set of qualified (hydra.*) Name strings that a Hydra Term references
-collectQualifiedNamesInTerm :: Core.Term -> S.Set String
-collectQualifiedNamesInTerm tm =
-    case tm of
-      Core.TermAnnotated v0 -> collectQualifiedNamesInTerm (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> Sets.union (collectQualifiedNamesInTerm (Core.applicationFunction v0)) (collectQualifiedNamesInTerm (Core.applicationArgument v0))
-      Core.TermCases v0 -> Sets.union (qualifiedFromName (Core.caseStatementTypeName v0)) (Sets.union (Sets.unions (Lists.map (\f -> collectQualifiedNamesInTerm (Core.fieldTerm f)) (Core.caseStatementCases v0))) (Maybes.maybe Sets.empty (\d -> collectQualifiedNamesInTerm d) (Core.caseStatementDefault v0)))
-      Core.TermEither v0 -> Eithers.either (\l -> collectQualifiedNamesInTerm l) (\r -> collectQualifiedNamesInTerm r) v0
-      Core.TermInject v0 -> Sets.union (qualifiedFromName (Core.injectionTypeName v0)) (collectQualifiedNamesInTerm (Core.fieldTerm (Core.injectionField v0)))
-      Core.TermLambda v0 -> Sets.union (Maybes.maybe Sets.empty (\domTy -> collectQualifiedNamesInType domTy) (Core.lambdaDomain v0)) (collectQualifiedNamesInTerm (Core.lambdaBody v0))
-      Core.TermLet v0 -> Sets.union (Sets.unions (Lists.map (\b -> collectQualifiedNamesInTerm (Core.bindingTerm b)) (Core.letBindings v0))) (collectQualifiedNamesInTerm (Core.letBody v0))
-      Core.TermList v0 -> Sets.unions (Lists.map (\el -> collectQualifiedNamesInTerm el) v0)
-      Core.TermMaybe v0 -> Maybes.maybe Sets.empty (\el -> collectQualifiedNamesInTerm el) v0
-      Core.TermPair v0 -> Sets.union (collectQualifiedNamesInTerm (Pairs.first v0)) (collectQualifiedNamesInTerm (Pairs.second v0))
-      Core.TermRecord v0 -> Sets.union (qualifiedFromName (Core.recordTypeName v0)) (Sets.unions (Lists.map (\f -> collectQualifiedNamesInTerm (Core.fieldTerm f)) (Core.recordFields v0)))
-      Core.TermTypeApplication v0 -> Sets.union (collectQualifiedNamesInTerm (Core.typeApplicationTermBody v0)) (collectQualifiedNamesInType (Core.typeApplicationTermType v0))
-      Core.TermTypeLambda v0 -> collectQualifiedNamesInTerm (Core.typeLambdaBody v0)
-      Core.TermVariable v0 -> qualifiedFromName v0
-      Core.TermWrap v0 -> collectQualifiedNamesInTerm (Core.wrappedTermBody v0)
-      _ -> Sets.empty
-
--- | Collect the set of qualified (hydra.*) Name strings that a Hydra Type references
-collectQualifiedNamesInType :: Core.Type -> S.Set String
-collectQualifiedNamesInType ty =
-    case ty of
-      Core.TypeAnnotated v0 -> collectQualifiedNamesInType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Sets.union (collectQualifiedNamesInType (Core.applicationTypeFunction v0)) (collectQualifiedNamesInType (Core.applicationTypeArgument v0))
-      Core.TypeEither v0 -> Sets.union (collectQualifiedNamesInType (Core.eitherTypeLeft v0)) (collectQualifiedNamesInType (Core.eitherTypeRight v0))
-      Core.TypeForall v0 -> collectQualifiedNamesInType (Core.forallTypeBody v0)
-      Core.TypeFunction v0 -> Sets.union (collectQualifiedNamesInType (Core.functionTypeDomain v0)) (collectQualifiedNamesInType (Core.functionTypeCodomain v0))
-      Core.TypeList v0 -> collectQualifiedNamesInType v0
-      Core.TypeMap v0 -> Sets.union (collectQualifiedNamesInType (Core.mapTypeKeys v0)) (collectQualifiedNamesInType (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> collectQualifiedNamesInType v0
-      Core.TypePair v0 -> Sets.union (collectQualifiedNamesInType (Core.pairTypeFirst v0)) (collectQualifiedNamesInType (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Sets.unions (Lists.map (\f -> collectQualifiedNamesInType (Core.fieldTypeType f)) v0)
-      Core.TypeSet v0 -> collectQualifiedNamesInType v0
-      Core.TypeUnion v0 -> Sets.unions (Lists.map (\f -> collectQualifiedNamesInType (Core.fieldTypeType f)) v0)
-      Core.TypeVariable v0 -> qualifiedFromName v0
-      Core.TypeWrap v0 -> collectQualifiedNamesInType v0
-      _ -> Sets.empty
-
--- | Collect qualified (hydra.*) Name strings from a TypeScheme's body, after stripping forall binders
-collectQualifiedNamesInTypeScheme :: Core.TypeScheme -> S.Set String
-collectQualifiedNamesInTypeScheme ts =
-
-      let extracted = extractTypeParams (Core.typeSchemeBody ts)
-          body = Pairs.second extracted
-      in (collectQualifiedNamesInType body)
-
--- | Return the set of decapitalized, sanitized accessor names whose fields were replaced with unit due to positivity issues
-collectSanitizedAccessors :: [(t0, [(String, Core.Type)])] -> S.Set String
-collectSanitizedAccessors typeGroups =
-    Sets.fromList (Lists.concat (Lists.map (\group ->
-      let defs = Pairs.second group
-          groupNames = Sets.fromList (Lists.map (\nt -> Pairs.first nt) defs)
-      in (Logic.ifElse (hasPositivityIssue groupNames defs) (Lists.concat (Lists.map (\nt ->
-        let typeName = Pairs.first nt
-            ty = Pairs.second nt
-            extracted = extractTypeParams ty
-            bodyTy = Pairs.second extracted
-        in case bodyTy of
-          Core.TypeRecord v0 -> Maybes.cat (Lists.map (\f -> Logic.ifElse (fieldCausesPositivityIssue groupNames (Core.fieldTypeType f)) (Just (Strings.cat [
-            Formatting.decapitalize typeName,
-            "_",
-            (sanitize (localName (Core.unName (Core.fieldTypeName f))))])) Nothing) v0)
-          _ -> []) defs)) [])) typeGroups))
-
--- | Wrap a mutually recursive binding group in a hydra_fix nested-pair bundle with per-name projection lets
-encodeMutualLetGroup :: [Core.Binding] -> Core.Term -> Core.Term
-encodeMutualLetGroup grp body =
-
-      let n = Lists.length grp
-          bundleName = Core.Name "hydra_mutual_bundle_"
-          bundleInner = Core.Name "hydra_mutual_b_"
-          innerBundleVar = Core.TermVariable bundleInner
-          outerBundleVar = Core.TermVariable bundleName
-          appVar =
-                  \fname -> \v -> Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name fname)),
-                    Core.applicationArgument = v})
-          nestedSecond = \k -> \v -> Logic.ifElse (Equality.equal k 0) v (appVar "pairs.second" (nestedSecond (Math.sub k 1) v))
-          mkProj =
-                  \bvar -> \i -> Logic.ifElse (Equality.equal i (Math.sub n 1)) (nestedSecond i bvar) (appVar "pairs.first" (nestedSecond i bvar))
-          mkProjBindings =
-                  \bvar -> Lists.map (\ib ->
-                    let i = Pairs.first ib
-                        b = Pairs.second ib
-                    in Core.Binding {
-                      Core.bindingName = (Core.bindingName b),
-                      Core.bindingTerm = (mkProj bvar i),
-                      Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) (Lists.zip (Math.range 0 (Math.sub n 1)) grp)
-          innerProjBindings = mkProjBindings innerBundleVar
-          outerProjBindings = mkProjBindings outerBundleVar
-          strippedBindings =
-                  Lists.map (\b -> Core.Binding {
-                    Core.bindingName = (Core.bindingName b),
-                    Core.bindingTerm = (stripHydraFix (Core.bindingName b) (Core.bindingTerm b)),
-                    Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) grp
-          mkPair =
-                  \ts -> Maybes.fromMaybe (Core.TermVariable (Core.Name "tt")) (Maybes.map (\p -> Logic.ifElse (Equality.equal (Lists.length ts) 1) (Pairs.first p) (Core.TermPair (Pairs.first p, (mkPair (Pairs.second p))))) (Lists.uncons ts))
-          pairExpr = mkPair (Lists.map (\b -> Core.bindingTerm b) strippedBindings)
-          fixBody = rebuildLets innerProjBindings pairExpr
-          fixTerm =
-                  Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra_fix")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = bundleInner,
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = fixBody}))})
-          bundleBinding =
-                  Core.Binding {
-                    Core.bindingName = bundleName,
-                    Core.bindingTerm = fixTerm,
-                    Core.bindingTypeScheme = Nothing}
-      in (Core.TermLet (Core.Let {
-        Core.letBindings = [
-          bundleBinding],
-        Core.letBody = (rebuildLets outerProjBindings body)}))
-
--- | Erase lambda domain annotations referencing unbound type variables; recurse under new type binders
-eraseUnboundTypeVarDomains :: S.Set String -> Core.Term -> Core.Term
-eraseUnboundTypeVarDomains initialBound term0 =
-
-      let eraseIfUnbound =
-              \bound -> \mdom -> Maybes.maybe Nothing (\ty -> Logic.ifElse (hasUnboundTypeVar bound ty) Nothing (Just ty)) mdom
-          f =
-                  \recurse -> \bound -> \term -> case term of
-                    Core.TermLambda v0 ->
-                      let paramName = Core.unName (Core.lambdaParameter v0)
-                          dom = Core.lambdaDomain v0
-                          isTypeParam =
-                                  Maybes.maybe False (\d -> case d of
-                                    Core.TypeVariable v1 -> Equality.equal (Core.unName v1) "Type"
-                                    _ -> False) dom
-                          bound2 = Logic.ifElse (Logic.and isTypeParam (isTypeVarLike paramName)) (Sets.insert paramName bound) bound
-                      in (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.lambdaParameter v0),
-                        Core.lambdaDomain = (eraseIfUnbound bound dom),
-                        Core.lambdaBody = (f recurse bound2 (Core.lambdaBody v0))}))
-                    _ -> recurse bound term
-      in (Rewriting.rewriteTermWithContext f initialBound term0)
-
--- | Extract the namespace (everything except the last dot-separated component) from a qualified Hydra name
-extractQualifiedNamespace :: String -> String
-extractQualifiedNamespace s =
-
-      let parts = Strings.splitOn "." s
-      in (Logic.ifElse (Equality.gte (Lists.length parts) 2) (Strings.intercalate "." (Maybes.fromMaybe [] (Lists.maybeInit parts))) s)
-
--- | Peel off leading forall binders, returning the list of parameter names and the inner body type
-extractTypeParams :: Core.Type -> ([String], Core.Type)
-extractTypeParams ty =
-    case ty of
-      Core.TypeForall v0 ->
-        let param = Core.unName (Core.forallTypeParameter v0)
-            rest = extractTypeParams (Core.forallTypeBody v0)
-        in (Lists.cons param (Pairs.first rest), (Pairs.second rest))
-      Core.TypeAnnotated v0 -> extractTypeParams (Core.annotatedTypeBody v0)
-      _ -> ([], ty)
-
--- | Return True if the field type contains a function whose domain mentions a group member
-fieldCausesPositivityIssue :: S.Set String -> Core.Type -> Bool
-fieldCausesPositivityIssue groupNames fty =
-    case fty of
-      Core.TypeFunction v0 -> Logic.or (typeContainsGroupRef groupNames (Core.functionTypeDomain v0)) (fieldCausesPositivityIssue groupNames (Core.functionTypeCodomain v0))
-      Core.TypeAnnotated v0 -> fieldCausesPositivityIssue groupNames (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> fieldCausesPositivityIssue groupNames (Core.forallTypeBody v0)
-      Core.TypeWrap v0 -> fieldCausesPositivityIssue groupNames v0
-      _ -> False
-
--- | Return True if any definition in the group has a record/union field whose type causes a positivity violation
-hasPositivityIssue :: S.Set String -> [(t0, Core.Type)] -> Bool
-hasPositivityIssue groupNames defs =
-    Lists.foldl (\acc -> \nt -> Logic.or acc (
-      let ty = Pairs.second nt
-          extracted = extractTypeParams ty
-          bodyTy = Pairs.second extracted
-      in case bodyTy of
-        Core.TypeRecord v0 -> Lists.foldl (\acc2 -> \f -> Logic.or acc2 (fieldCausesPositivityIssue groupNames (Core.fieldTypeType f))) False v0
-        Core.TypeUnion v0 -> Lists.foldl (\acc2 -> \f -> Logic.or acc2 (fieldCausesPositivityIssue groupNames (Core.fieldTypeType f))) False v0
-        _ -> False)) False defs
-
--- | Return True if the type mentions a t<digits> variable not present in the given set
-hasUnboundTypeVar :: S.Set String -> Core.Type -> Bool
-hasUnboundTypeVar bound ty =
-    case ty of
-      Core.TypeAnnotated v0 -> hasUnboundTypeVar bound (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Logic.or (hasUnboundTypeVar bound (Core.applicationTypeFunction v0)) (hasUnboundTypeVar bound (Core.applicationTypeArgument v0))
-      Core.TypeFunction v0 -> Logic.or (hasUnboundTypeVar bound (Core.functionTypeDomain v0)) (hasUnboundTypeVar bound (Core.functionTypeCodomain v0))
-      Core.TypeList v0 -> hasUnboundTypeVar bound v0
-      Core.TypeMap v0 -> Logic.or (hasUnboundTypeVar bound (Core.mapTypeKeys v0)) (hasUnboundTypeVar bound (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> hasUnboundTypeVar bound v0
-      Core.TypePair v0 -> Logic.or (hasUnboundTypeVar bound (Core.pairTypeFirst v0)) (hasUnboundTypeVar bound (Core.pairTypeSecond v0))
-      Core.TypeSet v0 -> hasUnboundTypeVar bound v0
-      Core.TypeVariable v0 ->
-        let nm = Core.unName v0
-        in (Logic.and (isTypeVarLike nm) (Logic.not (Sets.member nm bound)))
-      _ -> False
-
--- | Return True if a Term (possibly under TermAnnotated wrappers) is a TermTypeLambda
-isTypeLambdaTerm :: Core.Term -> Bool
-isTypeLambdaTerm tm =
-    case tm of
-      Core.TermAnnotated v0 -> isTypeLambdaTerm (Core.annotatedTermBody v0)
-      Core.TermTypeLambda _ -> True
-      _ -> False
-
--- | Return True if the string is of the form `t<digits>` with at least one digit
-isTypeVarLike :: String -> Bool
-isTypeVarLike s =
-
-      let chars = Strings.toList s
-      in (Maybes.fromMaybe False (Maybes.map (\p ->
-        let firstCh = Pairs.first p
-            rest = Pairs.second p
-        in (Logic.ifElse (Logic.not (Equality.equal firstCh 116)) False (Logic.and (Logic.not (Lists.null rest)) (Lists.foldl (\acc -> \c -> Logic.and acc (Logic.and (Equality.gte c 48) (Equality.lte c 57))) True rest)))) (Lists.uncons chars)))
-
--- | Return the last dot-separated segment of a qualified Hydra name, sanitised via `sanitize`
-localName :: String -> String
-localName s =
-
-      let parts = Strings.splitOn "." s
-          raw = Maybes.fromMaybe s (Lists.maybeLast parts)
-      in (sanitize raw)
-
--- | Return the last dot-separated segment of a qualified Hydra name, unsanitized
-localNameRaw :: String -> String
-localNameRaw s =
-
-      let parts = Strings.splitOn "." s
-      in (Maybes.fromMaybe s (Lists.maybeLast parts))
-
--- | Return the deduplicated list of dependency namespace strings for a Module, excluding its own namespace
-moduleDependencies :: Packaging.Module -> [String]
-moduleDependencies m =
-
-      let typeDeps = Lists.map (\ns -> Packaging.unNamespace ns) (Packaging.moduleTypeDependencies m)
-          termDeps = Lists.map (\ns -> Packaging.unNamespace ns) (Packaging.moduleTermDependencies m)
-          ownNs = Packaging.unNamespace (Packaging.moduleNamespace m)
-          allDeps = Lists.concat2 typeDeps termDeps
-          filtered = Lists.filter (\s -> Logic.not (Equality.equal s ownNs)) allDeps
-      in (Lists.nub filtered)
-
--- | Rewrite inner TermTypeLambda nodes and type applications so that polymorphic helpers work under Coq's erasure-based encoding
-normalizeInnerTypeLambdas :: Core.Term -> Core.Term
-normalizeInnerTypeLambdas term =
-
-      let stripTypeLambdas =
-              \tm -> case tm of
-                Core.TermTypeLambda v0 ->
-                  let rest = stripTypeLambdas (Core.typeLambdaBody v0)
-                  in (Lists.cons (Core.unName (Core.typeLambdaParameter v0)) (Pairs.first rest), (Pairs.second rest))
-                _ -> ([], tm)
-          rebuildTypeLambdas =
-                  \params -> \body -> Lists.foldr (\p -> \acc -> Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.Name p),
-                    Core.typeLambdaBody = acc})) body params
-          f =
-                  \recurse -> \polyNames -> \tm -> case tm of
-                    Core.TermLet v0 ->
-                      let newPoly =
-                              Sets.fromList (Maybes.cat (Lists.map (\b -> Logic.ifElse (isTypeLambdaTerm (Core.bindingTerm b)) (Just (Core.unName (Core.bindingName b))) Nothing) (Core.letBindings v0)))
-                          polyNames2 = Sets.union polyNames newPoly
-                      in (Core.TermLet (Core.Let {
-                        Core.letBindings = (Lists.map (\b -> Core.Binding {
-                          Core.bindingName = (Core.bindingName b),
-                          Core.bindingTerm = (f recurse polyNames2 (Core.bindingTerm b)),
-                          Core.bindingTypeScheme = (Logic.ifElse (isTypeLambdaTerm (Core.bindingTerm b)) Nothing (Core.bindingTypeScheme b))}) (Core.letBindings v0)),
-                        Core.letBody = (f recurse polyNames2 (Core.letBody v0))}))
-                    Core.TermTypeLambda v0 -> f recurse polyNames (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.typeLambdaParameter v0),
-                      Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "Type"))),
-                      Core.lambdaBody = (Core.typeLambdaBody v0)}))
-                    Core.TermTypeApplication v0 ->
-                      let body = Core.typeApplicationTermBody v0
-                          ttype = Core.typeApplicationTermType v0
-                      in (Logic.ifElse (targetsPolyName polyNames body) (f recurse polyNames (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = body,
-                        Core.applicationArgument = (typeToTerm ttype)}))) (f recurse polyNames body))
-                    _ -> recurse polyNames tm
-          stripped = stripTypeLambdas term
-          outerParams = Pairs.first stripped
-          body0 = Pairs.second stripped
-      in (Logic.ifElse (Lists.null outerParams) term (rebuildTypeLambdas outerParams (Rewriting.rewriteTermWithContext f Sets.empty body0)))
-
--- | Sort bindings into SCC groups using free-var analysis and local-name matching
-processLetSCCs :: [Core.Binding] -> [[Core.Binding]]
-processLetSCCs bindings =
-
-      let getName = \b -> Core.unName (Core.bindingName b)
-          names = Sets.fromList (Lists.map getName bindings)
-          localNames = Sets.fromList (Lists.map (\b -> localNameRaw (getName b)) bindings)
-          allNames = Sets.union names localNames
-          depVars =
-                  \b ->
-                    let varsName = Variables.freeVariablesInTerm (Core.bindingTerm b)
-                        vars = Sets.fromList (Lists.map (\n -> Core.unName n) (Sets.toList varsName))
-                        localVars = Sets.fromList (Lists.map (\v -> localNameRaw v) (Sets.toList vars))
-                    in (Sets.toList (Sets.intersection allNames (Sets.union vars localVars)))
-      in (Sorting.topologicalSortNodes getName depVars bindings)
-
--- | Wrap a Hydra Name as a singleton set of its raw string, iff it is a qualified (hydra.*) reference
-qualifiedFromName :: Core.Name -> S.Set String
-qualifiedFromName n =
-
-      let raw = Core.unName n
-          parts = Strings.splitOn "." raw
-      in (Logic.ifElse (Logic.and (Equality.gte (Lists.length parts) 2) (Equality.equal (Maybes.fromMaybe "" (Lists.maybeHead parts)) "hydra")) (Sets.singleton raw) Sets.empty)
-
--- | Build a chain of single-binding TermLet wrappers around the given body
-rebuildLets :: [Core.Binding] -> Core.Term -> Core.Term
-rebuildLets bindings body =
-    Lists.foldr (\b -> \acc -> Core.TermLet (Core.Let {
-      Core.letBindings = [
-        b],
-      Core.letBody = acc})) body bindings
-
--- | Rebuild a chain of TermLet/hydra_fix wrappers from SCC-sorted binding groups
-rebuildMutualLets :: [[Core.Binding]] -> Core.Term -> Core.Term
-rebuildMutualLets groups body =
-    Lists.foldr (\grp -> \acc -> Logic.ifElse (Equality.equal (Lists.length grp) 1) (Core.TermLet (Core.Let {
-      Core.letBindings = grp,
-      Core.letBody = acc})) (encodeMutualLetGroup grp acc)) body groups
-
--- | Topologically reorder let bindings and pair-encode mutually recursive groups
-reorderLetBindings :: Core.Term -> Core.Term
-reorderLetBindings term0 =
-
-      let f =
-              \recurse -> \tm -> case tm of
-                Core.TermLet _ ->
-                  let flat = collectLetBindings tm
-                      allBindings = Pairs.first flat
-                      innerBody = Pairs.second flat
-                      groups = processLetSCCs allBindings
-                      groups2 =
-                              Lists.map (\grp -> Lists.map (\b -> Core.Binding {
-                                Core.bindingName = (Core.bindingName b),
-                                Core.bindingTerm = (reorderLetBindings (Core.bindingTerm b)),
-                                Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) grp) groups
-                  in (rebuildMutualLets groups2 (reorderLetBindings innerBody))
-                _ -> recurse tm
-      in (Rewriting.rewriteTerm f term0)
-
--- | Replace field names in TermProject nodes using the given (typeName, rawFieldName) -> prefixedName map
-rewriteTermFields :: M.Map (String, String) String -> Core.Term -> Core.Term
-rewriteTermFields fm term0 =
-
-      let rewrite =
-              \recurse -> \term -> case term of
-                Core.TermProject v0 ->
-                  let tname = Core.unName (Core.projectionTypeName v0)
-                      rawFn = localNameRaw (Core.unName (Core.projectionField v0))
-                      key = (tname, rawFn)
-                      newFname = Maybes.fromMaybe (Core.projectionField v0) (Maybes.map (\s -> Core.Name s) (Maps.lookup key fm))
-                  in (Core.TermProject (Core.Projection {
-                    Core.projectionTypeName = (Core.projectionTypeName v0),
-                    Core.projectionField = newFname}))
-                _ -> recurse term
-      in (Rewriting.rewriteTerm rewrite term0)
-
--- | Escape a stripped local name against Coq's stripped reserved-words set
-sanitize :: String -> String
-sanitize s = Formatting.escapeWithUnderscore Language.coqStrippedReservedWords s
-
--- | Rewrite a Type, replacing offending record/union fields with TypeUnit and restoring forall binders
-sanitizePositivity :: S.Set String -> Core.Type -> Core.Type
-sanitizePositivity groupNames ty =
-
-      let extracted = extractTypeParams ty
-          params = Pairs.first extracted
-          bodyTy = Pairs.second extracted
-          sanitizeField =
-                  \f -> Logic.ifElse (fieldCausesPositivityIssue groupNames (Core.fieldTypeType f)) (Core.FieldType {
-                    Core.fieldTypeName = (Core.fieldTypeName f),
-                    Core.fieldTypeType = Core.TypeUnit}) f
-          sanitized =
-                  case bodyTy of
-                    Core.TypeRecord v0 -> Core.TypeRecord (Lists.map sanitizeField v0)
-                    Core.TypeUnion v0 -> Core.TypeUnion (Lists.map sanitizeField v0)
-                    _ -> bodyTy
-      in (Lists.foldr (\p -> \t -> Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = (Core.Name p),
-        Core.forallTypeBody = t})) sanitized params)
-
--- | Group term definitions into SCC components with a cyclic/acyclic flag
-sortTermDefsSCC :: [(String, Core.Term)] -> [(Bool, [(String, Core.Term)])]
-sortTermDefsSCC defs =
-
-      let localNames = Sets.fromList (Lists.map (\d -> Pairs.first d) defs)
-          depsOf = \d -> Sets.toList (termRefs localNames (Pairs.second d))
-          comps = Sorting.topologicalSortNodes (\d -> Pairs.first d) depsOf defs
-      in (Lists.map (\grp -> Logic.ifElse (Equality.gte (Lists.length grp) 2) (True, grp) (Maybes.fromMaybe (False, grp) (Maybes.map (\d ->
-        let name = Pairs.first d
-            deps = termRefs localNames (Pairs.second d)
-        in (Sets.member name deps, grp)) (Lists.maybeHead grp)))) comps)
-
--- | Group type definitions into SCC components with a cyclic/acyclic flag
-sortTypeDefsSCC :: [(String, Core.Type)] -> [(Bool, [(String, Core.Type)])]
-sortTypeDefsSCC defs =
-
-      let localNames = Sets.fromList (Lists.map (\d -> Pairs.first d) defs)
-          depsOf = \d -> Sets.toList (typeRefs localNames (Pairs.second d))
-          comps = Sorting.topologicalSortNodes (\d -> Pairs.first d) depsOf defs
-      in (Lists.map (\grp -> Logic.ifElse (Equality.gte (Lists.length grp) 2) (True, grp) (Maybes.fromMaybe (False, grp) (Maybes.map (\d ->
-        let name = Pairs.first d
-            deps = typeRefs localNames (Pairs.second d)
-        in (Sets.member name deps, grp)) (Lists.maybeHead grp)))) comps)
-
--- | Strip an outer hydra_fix lambda wrapper, substituting the inner self-reference for the binding name
-stripHydraFix :: Core.Name -> Core.Term -> Core.Term
-stripHydraFix bName tm =
-    case tm of
-      Core.TermApplication v0 ->
-        let fn = Core.applicationFunction v0
-            arg = Core.applicationArgument v0
-        in case fn of
-          Core.TermVariable v1 -> Logic.ifElse (Equality.equal (Core.unName v1) "hydra_fix") (case arg of
-            Core.TermLambda v2 -> Variables.substituteVariable (Core.lambdaParameter v2) bName (Core.lambdaBody v2)
-            _ -> tm) tm
-          _ -> tm
-      _ -> tm
-
--- | Return True if the innermost target of a (possibly nested) type application is a poly-converted local name
-targetsPolyName :: S.Set String -> Core.Term -> Bool
-targetsPolyName polyNames tm =
-    case tm of
-      Core.TermVariable v0 -> Sets.member (Core.unName v0) polyNames
-      Core.TermTypeApplication v0 -> targetsPolyName polyNames (Core.typeApplicationTermBody v0)
-      Core.TermAnnotated v0 -> targetsPolyName polyNames (Core.annotatedTermBody v0)
-      _ -> False
-
--- | Walk a Term and collect the local names it references, intersected with the given locally-defined names
-termRefs :: S.Set String -> Core.Term -> S.Set String
-termRefs locals tm =
-    case tm of
-      Core.TermAnnotated v0 -> termRefs locals (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> Sets.union (termRefs locals (Core.applicationFunction v0)) (termRefs locals (Core.applicationArgument v0))
-      Core.TermCases v0 -> Sets.union (Sets.unions (Lists.map (\f -> termRefs locals (Core.fieldTerm f)) (Core.caseStatementCases v0))) (Maybes.maybe Sets.empty (\d -> termRefs locals d) (Core.caseStatementDefault v0))
-      Core.TermEither v0 -> Eithers.either (\l -> termRefs locals l) (\r -> termRefs locals r) v0
-      Core.TermInject v0 -> termRefs locals (Core.fieldTerm (Core.injectionField v0))
-      Core.TermLambda v0 -> termRefs locals (Core.lambdaBody v0)
-      Core.TermLet v0 -> Sets.union (Sets.unions (Lists.map (\b -> termRefs locals (Core.bindingTerm b)) (Core.letBindings v0))) (termRefs locals (Core.letBody v0))
-      Core.TermList v0 -> Sets.unions (Lists.map (\el -> termRefs locals el) v0)
-      Core.TermMaybe v0 -> Maybes.maybe Sets.empty (\el -> termRefs locals el) v0
-      Core.TermPair v0 -> Sets.union (termRefs locals (Pairs.first v0)) (termRefs locals (Pairs.second v0))
-      Core.TermRecord v0 -> Sets.unions (Lists.map (\f -> termRefs locals (Core.fieldTerm f)) (Core.recordFields v0))
-      Core.TermTypeApplication v0 -> termRefs locals (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> termRefs locals (Core.typeLambdaBody v0)
-      Core.TermVariable v0 ->
-        let local = localName (Core.unName v0)
-        in (Logic.ifElse (Sets.member local locals) (Sets.singleton local) Sets.empty)
-      Core.TermWrap v0 -> termRefs locals (Core.wrappedTermBody v0)
-      _ -> Sets.empty
-
--- | Return True if the Type mentions any type variable whose local name is in the given set
-typeContainsGroupRef :: S.Set String -> Core.Type -> Bool
-typeContainsGroupRef groupNames ty =
-    case ty of
-      Core.TypeAnnotated v0 -> typeContainsGroupRef groupNames (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Logic.or (typeContainsGroupRef groupNames (Core.applicationTypeFunction v0)) (typeContainsGroupRef groupNames (Core.applicationTypeArgument v0))
-      Core.TypeEither v0 -> Logic.or (typeContainsGroupRef groupNames (Core.eitherTypeLeft v0)) (typeContainsGroupRef groupNames (Core.eitherTypeRight v0))
-      Core.TypeForall v0 -> typeContainsGroupRef groupNames (Core.forallTypeBody v0)
-      Core.TypeFunction v0 -> Logic.or (typeContainsGroupRef groupNames (Core.functionTypeDomain v0)) (typeContainsGroupRef groupNames (Core.functionTypeCodomain v0))
-      Core.TypeList v0 -> typeContainsGroupRef groupNames v0
-      Core.TypeMap v0 -> Logic.or (typeContainsGroupRef groupNames (Core.mapTypeKeys v0)) (typeContainsGroupRef groupNames (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> typeContainsGroupRef groupNames v0
-      Core.TypePair v0 -> Logic.or (typeContainsGroupRef groupNames (Core.pairTypeFirst v0)) (typeContainsGroupRef groupNames (Core.pairTypeSecond v0))
-      Core.TypeSet v0 -> typeContainsGroupRef groupNames v0
-      Core.TypeVariable v0 -> Sets.member (localName (Core.unName v0)) groupNames
-      Core.TypeWrap v0 -> typeContainsGroupRef groupNames v0
-      _ -> False
-
--- | Walk a Type and collect the local names it references, intersected with the given locally-defined names
-typeRefs :: S.Set String -> Core.Type -> S.Set String
-typeRefs locals ty =
-    case ty of
-      Core.TypeAnnotated v0 -> typeRefs locals (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Sets.union (typeRefs locals (Core.applicationTypeFunction v0)) (typeRefs locals (Core.applicationTypeArgument v0))
-      Core.TypeEither v0 -> Sets.union (typeRefs locals (Core.eitherTypeLeft v0)) (typeRefs locals (Core.eitherTypeRight v0))
-      Core.TypeForall v0 -> typeRefs locals (Core.forallTypeBody v0)
-      Core.TypeFunction v0 -> Sets.union (typeRefs locals (Core.functionTypeDomain v0)) (typeRefs locals (Core.functionTypeCodomain v0))
-      Core.TypeList v0 -> typeRefs locals v0
-      Core.TypeMap v0 -> Sets.union (typeRefs locals (Core.mapTypeKeys v0)) (typeRefs locals (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> typeRefs locals v0
-      Core.TypePair v0 -> Sets.union (typeRefs locals (Core.pairTypeFirst v0)) (typeRefs locals (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Sets.unions (Lists.map (\f -> typeRefs locals (Core.fieldTypeType f)) v0)
-      Core.TypeSet v0 -> typeRefs locals v0
-      Core.TypeUnion v0 -> Sets.unions (Lists.map (\f -> typeRefs locals (Core.fieldTypeType f)) v0)
-      Core.TypeVariable v0 ->
-        let local = localName (Core.unName v0)
-        in (Logic.ifElse (Sets.member local locals) (Sets.singleton local) Sets.empty)
-      Core.TypeWrap v0 -> typeRefs locals v0
-      _ -> Sets.empty
-
--- | Convert a Hydra Type to a placeholder Term for use as an explicit Coq type argument. Coq-builtin type constructors are marked with a `Coq.` prefix so the encoder can emit them raw without going through sanitizeVar, which would clash with user-level lambda parameters of the same name (e.g. `list` -> `list_`).
-typeToTerm :: Core.Type -> Core.Term
-typeToTerm ty =
-    case ty of
-      Core.TypeVariable v0 -> Core.TermVariable v0
-      Core.TypeList v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.list")),
-        Core.applicationArgument = (typeToTerm v0)})
-      Core.TypeMaybe v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.option")),
-        Core.applicationArgument = (typeToTerm v0)})
-      Core.TypeSet v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.list")),
-        Core.applicationArgument = (typeToTerm v0)})
-      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (typeToTerm (Core.applicationTypeFunction v0)),
-        Core.applicationArgument = (typeToTerm (Core.applicationTypeArgument v0))})
-      Core.TypeFunction _ -> Core.TermVariable (Core.Name "Coq.unit")
-      Core.TypePair v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.prod")),
-          Core.applicationArgument = (typeToTerm (Core.pairTypeFirst v0))})),
-        Core.applicationArgument = (typeToTerm (Core.pairTypeSecond v0))})
-      Core.TypeMap v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.list")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.prod")),
-          Core.applicationArgument = (typeToTerm (Core.mapTypeKeys v0))}))})
-      Core.TypeUnit -> Core.TermVariable (Core.Name "Coq.unit")
-      Core.TypeLiteral _ -> Core.TermVariable (Core.Name "Coq.unit")
-      Core.TypeEither v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "Coq.sum")),
-          Core.applicationArgument = (typeToTerm (Core.eitherTypeLeft v0))})),
-        Core.applicationArgument = (typeToTerm (Core.eitherTypeRight v0))})
-      Core.TypeRecord _ -> Core.TermVariable (Core.Name "Coq.unit")
-      Core.TypeUnion _ -> Core.TermVariable (Core.Name "Coq.unit")
-      Core.TypeWrap v0 -> typeToTerm v0
-      Core.TypeAnnotated v0 -> typeToTerm (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> typeToTerm (Core.forallTypeBody v0)
-      Core.TypeVoid -> Core.TermVariable (Core.Name "Coq.Empty_set")
-      _ -> Core.TermVariable (Core.Name "Coq.unit")
diff --git a/src/main/haskell/Hydra/Core.hs b/src/main/haskell/Hydra/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Core.hs
+++ /dev/null
@@ -1,532 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Hydra's core data model, consisting of the fundamental hydra.core.Term type and all of its dependencies.
-
-module Hydra.Core where
-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 term together with an annotation
-data AnnotatedTerm =
-  AnnotatedTerm {
-    -- | The term being annotated
-    annotatedTermBody :: Term,
-    -- | The annotation as a map from keys to values
-    annotatedTermAnnotation :: (M.Map Name Term)}
-  deriving (Eq, Ord, Read, Show)
-_AnnotatedTerm = Name "hydra.core.AnnotatedTerm"
-_AnnotatedTerm_body = Name "body"
-_AnnotatedTerm_annotation = Name "annotation"
--- | A type together with an annotation
-data AnnotatedType =
-  AnnotatedType {
-    -- | The type being annotated
-    annotatedTypeBody :: Type,
-    -- | The annotation as a map from keys to values
-    annotatedTypeAnnotation :: (M.Map Name Term)}
-  deriving (Eq, Ord, Read, Show)
-_AnnotatedType = Name "hydra.core.AnnotatedType"
-_AnnotatedType_body = Name "body"
-_AnnotatedType_annotation = Name "annotation"
--- | A term which applies a function to an argument
-data Application =
-  Application {
-    -- | The left-hand side of the application
-    applicationFunction :: Term,
-    -- | The right-hand side of the application
-    applicationArgument :: Term}
-  deriving (Eq, Ord, Read, Show)
-_Application = Name "hydra.core.Application"
-_Application_function = Name "function"
-_Application_argument = Name "argument"
--- | The type-level analog of an application term
-data ApplicationType =
-  ApplicationType {
-    -- | The left-hand side of the application
-    applicationTypeFunction :: Type,
-    -- | The right-hand side of the application
-    applicationTypeArgument :: Type}
-  deriving (Eq, Ord, Read, Show)
-_ApplicationType = Name "hydra.core.ApplicationType"
-_ApplicationType_function = Name "function"
-_ApplicationType_argument = Name "argument"
--- | A field with an optional type scheme, used to bind variables to terms in a 'let' expression
-data Binding =
-  Binding {
-    -- | The name of the bound variable
-    bindingName :: Name,
-    -- | The term to which the variable is bound
-    bindingTerm :: Term,
-    -- | The optional type scheme of the bound term
-    bindingTypeScheme :: (Maybe TypeScheme)}
-  deriving (Eq, Ord, Read, Show)
-_Binding = Name "hydra.core.Binding"
-_Binding_name = Name "name"
-_Binding_term = Name "term"
-_Binding_typeScheme = Name "typeScheme"
--- | A union elimination; a case statement
-data CaseStatement =
-  CaseStatement {
-    -- | The name of the union type
-    caseStatementTypeName :: Name,
-    -- | An optional default case, used if none of the explicit cases match
-    caseStatementDefault :: (Maybe Term),
-    -- | A list of case alternatives, one per union field
-    caseStatementCases :: [Field]}
-  deriving (Eq, Ord, Read, Show)
-_CaseStatement = Name "hydra.core.CaseStatement"
-_CaseStatement_typeName = Name "typeName"
-_CaseStatement_default = Name "default"
-_CaseStatement_cases = Name "cases"
--- | A type which provides a choice between a 'left' type and a 'right' type
-data EitherType =
-  EitherType {
-    -- | The 'left' alternative
-    eitherTypeLeft :: Type,
-    -- | The 'right' alternative
-    eitherTypeRight :: Type}
-  deriving (Eq, Ord, Read, Show)
-_EitherType = Name "hydra.core.EitherType"
-_EitherType_left = Name "left"
-_EitherType_right = Name "right"
--- | A type which pairs a 'first' type and a 'second' type
-data PairType =
-  PairType {
-    -- | The first component of the pair
-    pairTypeFirst :: Type,
-    -- | The second component of the pair
-    pairTypeSecond :: Type}
-  deriving (Eq, Ord, Read, Show)
-_PairType = Name "hydra.core.PairType"
-_PairType_first = Name "first"
-_PairType_second = Name "second"
--- | A name/term pair
-data Field =
-  Field {
-    -- | The name of the field
-    fieldName :: Name,
-    -- | The term value of the field
-    fieldTerm :: Term}
-  deriving (Eq, Ord, Read, Show)
-_Field = Name "hydra.core.Field"
-_Field_name = Name "name"
-_Field_term = Name "term"
--- | A name/type pair
-data FieldType =
-  FieldType {
-    -- | The name of the field
-    fieldTypeName :: Name,
-    -- | The type of the field
-    fieldTypeType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_FieldType = Name "hydra.core.FieldType"
-_FieldType_name = Name "name"
-_FieldType_type = Name "type"
--- | A floating-point type
-data FloatType =
-  -- | An arbitrary-precision floating-point type
-  FloatTypeBigfloat |
-  -- | A 32-bit floating-point type
-  FloatTypeFloat32 |
-  -- | A 64-bit floating-point type
-  FloatTypeFloat64
-  deriving (Eq, Ord, Read, Show)
-_FloatType = Name "hydra.core.FloatType"
-_FloatType_bigfloat = Name "bigfloat"
-_FloatType_float32 = Name "float32"
-_FloatType_float64 = Name "float64"
--- | A floating-point literal value
-data FloatValue =
-  -- | An arbitrary-precision floating-point value
-  FloatValueBigfloat Double |
-  -- | A 32-bit floating-point value
-  FloatValueFloat32 Float |
-  -- | A 64-bit floating-point value
-  FloatValueFloat64 Double
-  deriving (Eq, Ord, Read, Show)
-_FloatValue = Name "hydra.core.FloatValue"
-_FloatValue_bigfloat = Name "bigfloat"
-_FloatValue_float32 = Name "float32"
-_FloatValue_float64 = Name "float64"
--- | A universally quantified type; the System F equivalent of a type scheme, and the type-level equivalent of a lambda term.
-data ForallType =
-  ForallType {
-    -- | The variable which is bound by the lambda
-    forallTypeParameter :: Name,
-    -- | The body of the lambda
-    forallTypeBody :: Type}
-  deriving (Eq, Ord, Read, Show)
-_ForallType = Name "hydra.core.ForallType"
-_ForallType_parameter = Name "parameter"
-_ForallType_body = Name "body"
--- | A function type, also known as an arrow type
-data FunctionType =
-  FunctionType {
-    -- | The domain (input) type of the function
-    functionTypeDomain :: Type,
-    -- | The codomain (output) type of the function
-    functionTypeCodomain :: Type}
-  deriving (Eq, Ord, Read, Show)
-_FunctionType = Name "hydra.core.FunctionType"
-_FunctionType_domain = Name "domain"
-_FunctionType_codomain = Name "codomain"
--- | An instance of a union type; i.e. a string-indexed generalization of inl() or inr()
-data Injection =
-  Injection {
-    -- | The name of the union type
-    injectionTypeName :: Name,
-    -- | The field being injected, including its name and value
-    injectionField :: Field}
-  deriving (Eq, Ord, Read, Show)
-_Injection = Name "hydra.core.Injection"
-_Injection_typeName = Name "typeName"
-_Injection_field = Name "field"
--- | An integer type
-data IntegerType =
-  -- | An arbitrary-precision integer type
-  IntegerTypeBigint |
-  -- | An 8-bit signed integer type
-  IntegerTypeInt8 |
-  -- | A 16-bit signed integer type
-  IntegerTypeInt16 |
-  -- | A 32-bit signed integer type
-  IntegerTypeInt32 |
-  -- | A 64-bit signed integer type
-  IntegerTypeInt64 |
-  -- | An 8-bit unsigned integer type
-  IntegerTypeUint8 |
-  -- | A 16-bit unsigned integer type
-  IntegerTypeUint16 |
-  -- | A 32-bit unsigned integer type
-  IntegerTypeUint32 |
-  -- | A 64-bit unsigned integer type
-  IntegerTypeUint64
-  deriving (Eq, Ord, Read, Show)
-_IntegerType = Name "hydra.core.IntegerType"
-_IntegerType_bigint = Name "bigint"
-_IntegerType_int8 = Name "int8"
-_IntegerType_int16 = Name "int16"
-_IntegerType_int32 = Name "int32"
-_IntegerType_int64 = Name "int64"
-_IntegerType_uint8 = Name "uint8"
-_IntegerType_uint16 = Name "uint16"
-_IntegerType_uint32 = Name "uint32"
-_IntegerType_uint64 = Name "uint64"
--- | An integer literal value
-data IntegerValue =
-  -- | An arbitrary-precision integer value
-  IntegerValueBigint Integer |
-  -- | An 8-bit signed integer value
-  IntegerValueInt8 I.Int8 |
-  -- | A 16-bit signed integer value (short value)
-  IntegerValueInt16 I.Int16 |
-  -- | A 32-bit signed integer value (int value)
-  IntegerValueInt32 Int |
-  -- | A 64-bit signed integer value (long value)
-  IntegerValueInt64 I.Int64 |
-  -- | An 8-bit unsigned integer value (byte)
-  IntegerValueUint8 I.Int16 |
-  -- | A 16-bit unsigned integer value
-  IntegerValueUint16 Int |
-  -- | A 32-bit unsigned integer value (unsigned int)
-  IntegerValueUint32 I.Int64 |
-  -- | A 64-bit unsigned integer value (unsigned long)
-  IntegerValueUint64 Integer
-  deriving (Eq, Ord, Read, Show)
-_IntegerValue = Name "hydra.core.IntegerValue"
-_IntegerValue_bigint = Name "bigint"
-_IntegerValue_int8 = Name "int8"
-_IntegerValue_int16 = Name "int16"
-_IntegerValue_int32 = Name "int32"
-_IntegerValue_int64 = Name "int64"
-_IntegerValue_uint8 = Name "uint8"
-_IntegerValue_uint16 = Name "uint16"
-_IntegerValue_uint32 = Name "uint32"
-_IntegerValue_uint64 = Name "uint64"
--- | A function abstraction (lambda)
-data Lambda =
-  Lambda {
-    -- | The parameter of the lambda
-    lambdaParameter :: Name,
-    -- | An optional domain type for the lambda
-    lambdaDomain :: (Maybe Type),
-    -- | The body of the lambda
-    lambdaBody :: Term}
-  deriving (Eq, Ord, Read, Show)
-_Lambda = Name "hydra.core.Lambda"
-_Lambda_parameter = Name "parameter"
-_Lambda_domain = Name "domain"
-_Lambda_body = Name "body"
--- | A set of (possibly recursive) 'let' bindings together with a body in which they are bound
-data Let =
-  Let {
-    -- | The list of variable bindings
-    letBindings :: [Binding],
-    -- | The body term in which the variables are bound
-    letBody :: Term}
-  deriving (Eq, Ord, Read, Show)
-_Let = Name "hydra.core.Let"
-_Let_bindings = Name "bindings"
-_Let_body = Name "body"
--- | A term constant; an instance of a literal type
-data Literal =
-  -- | A binary literal
-  LiteralBinary B.ByteString |
-  -- | A boolean literal
-  LiteralBoolean Bool |
-  -- | An arbitrary-precision decimal literal
-  LiteralDecimal Sci.Scientific |
-  -- | A floating-point literal
-  LiteralFloat FloatValue |
-  -- | An integer literal
-  LiteralInteger IntegerValue |
-  -- | A string literal
-  LiteralString String
-  deriving (Eq, Ord, Read, Show)
-_Literal = Name "hydra.core.Literal"
-_Literal_binary = Name "binary"
-_Literal_boolean = Name "boolean"
-_Literal_decimal = Name "decimal"
-_Literal_float = Name "float"
-_Literal_integer = Name "integer"
-_Literal_string = Name "string"
--- | Any of a fixed set of literal types, also called atomic types, base types, primitive types, or type constants
-data LiteralType =
-  -- | The type of a binary (byte string) value
-  LiteralTypeBinary |
-  -- | The type of a boolean (true/false) value
-  LiteralTypeBoolean |
-  -- | The type of an arbitrary-precision decimal value
-  LiteralTypeDecimal |
-  -- | The type of a floating-point value
-  LiteralTypeFloat FloatType |
-  -- | The type of an integer value
-  LiteralTypeInteger IntegerType |
-  -- | The type of a string value
-  LiteralTypeString
-  deriving (Eq, Ord, Read, Show)
-_LiteralType = Name "hydra.core.LiteralType"
-_LiteralType_binary = Name "binary"
-_LiteralType_boolean = Name "boolean"
-_LiteralType_decimal = Name "decimal"
-_LiteralType_float = Name "float"
-_LiteralType_integer = Name "integer"
-_LiteralType_string = Name "string"
--- | A map type
-data MapType =
-  MapType {
-    -- | The type of keys in the map
-    mapTypeKeys :: Type,
-    -- | The type of values in the map
-    mapTypeValues :: Type}
-  deriving (Eq, Ord, Read, Show)
-_MapType = Name "hydra.core.MapType"
-_MapType_keys = Name "keys"
-_MapType_values = Name "values"
--- | A unique identifier in some context; a string-valued key
-newtype Name =
-  Name {
-    unName :: String}
-  deriving (Eq, Ord, Read, Show)
-_Name = Name "hydra.core.Name"
--- | A record elimination; a projection
-data Projection =
-  Projection {
-    -- | The name of the record type
-    projectionTypeName :: Name,
-    -- | The name of the projected field
-    projectionField :: Name}
-  deriving (Eq, Ord, Read, Show)
-_Projection = Name "hydra.core.Projection"
-_Projection_typeName = Name "typeName"
-_Projection_field = Name "field"
--- | A record, or labeled tuple; a map of field names to terms
-data Record =
-  Record {
-    -- | The name of the record type
-    recordTypeName :: Name,
-    -- | The fields of the record, as a list of name/term pairs
-    recordFields :: [Field]}
-  deriving (Eq, Ord, Read, Show)
-_Record = Name "hydra.core.Record"
-_Record_typeName = Name "typeName"
-_Record_fields = Name "fields"
--- | A data term
-data Term =
-  -- | A term annotated with metadata
-  TermAnnotated AnnotatedTerm |
-  -- | A function application
-  TermApplication Application |
-  -- | A union elimination; a case statement
-  TermCases CaseStatement |
-  -- | An either value
-  TermEither (Either Term Term) |
-  -- | An injection; an instance of a union type
-  TermInject Injection |
-  -- | A function abstraction (lambda)
-  TermLambda Lambda |
-  -- | A 'let' term, which binds variables to terms
-  TermLet Let |
-  -- | A list
-  TermList [Term] |
-  -- | A literal value
-  TermLiteral Literal |
-  -- | A map of keys to values
-  TermMap (M.Map Term Term) |
-  -- | An optional value
-  TermMaybe (Maybe Term) |
-  -- | A pair (2-tuple)
-  TermPair (Term, Term) |
-  -- | A record elimination; a projection
-  TermProject Projection |
-  -- | A record term
-  TermRecord Record |
-  -- | A set of values
-  TermSet (S.Set Term) |
-  -- | A System F type application term
-  TermTypeApplication TypeApplicationTerm |
-  -- | A System F type abstraction term
-  TermTypeLambda TypeLambda |
-  -- | A unit value; a term with no value
-  TermUnit |
-  -- | An unwrap elimination; the inverse of a wrap
-  TermUnwrap Name |
-  -- | A variable reference
-  TermVariable Name |
-  -- | A wrapped term; an instance of a wrapper type (newtype)
-  TermWrap WrappedTerm
-  deriving (Eq, Ord, Read, Show)
-_Term = Name "hydra.core.Term"
-_Term_annotated = Name "annotated"
-_Term_application = Name "application"
-_Term_cases = Name "cases"
-_Term_either = Name "either"
-_Term_inject = Name "inject"
-_Term_lambda = Name "lambda"
-_Term_let = Name "let"
-_Term_list = Name "list"
-_Term_literal = Name "literal"
-_Term_map = Name "map"
-_Term_maybe = Name "maybe"
-_Term_pair = Name "pair"
-_Term_project = Name "project"
-_Term_record = Name "record"
-_Term_set = Name "set"
-_Term_typeApplication = Name "typeApplication"
-_Term_typeLambda = Name "typeLambda"
-_Term_unit = Name "unit"
-_Term_unwrap = Name "unwrap"
-_Term_variable = Name "variable"
-_Term_wrap = Name "wrap"
--- | A data type
-data Type =
-  -- | An annotated type
-  TypeAnnotated AnnotatedType |
-  -- | A type application
-  TypeApplication ApplicationType |
-  -- | An either (sum) type
-  TypeEither EitherType |
-  -- | A universally quantified (polymorphic) type
-  TypeForall ForallType |
-  -- | A function type
-  TypeFunction FunctionType |
-  -- | A list type
-  TypeList Type |
-  -- | A literal type
-  TypeLiteral LiteralType |
-  -- | A map type
-  TypeMap MapType |
-  -- | An optional type
-  TypeMaybe Type |
-  -- | A pair (2-tuple) type
-  TypePair PairType |
-  -- | A record type
-  TypeRecord [FieldType] |
-  -- | A set type
-  TypeSet Type |
-  -- | A union type with field names
-  TypeUnion [FieldType] |
-  -- | The unit type
-  TypeUnit |
-  -- | A type variable
-  TypeVariable Name |
-  -- | The void (uninhabited, or bottom) type
-  TypeVoid |
-  -- | A wrapped type (newtype)
-  TypeWrap Type
-  deriving (Eq, Ord, Read, Show)
-_Type = Name "hydra.core.Type"
-_Type_annotated = Name "annotated"
-_Type_application = Name "application"
-_Type_either = Name "either"
-_Type_forall = Name "forall"
-_Type_function = Name "function"
-_Type_list = Name "list"
-_Type_literal = Name "literal"
-_Type_map = Name "map"
-_Type_maybe = Name "maybe"
-_Type_pair = Name "pair"
-_Type_record = Name "record"
-_Type_set = Name "set"
-_Type_union = Name "union"
-_Type_unit = Name "unit"
-_Type_variable = Name "variable"
-_Type_void = Name "void"
-_Type_wrap = Name "wrap"
--- | A term applied to a type; a type application
-data TypeApplicationTerm =
-  TypeApplicationTerm {
-    -- | The term being applied to a type
-    typeApplicationTermBody :: Term,
-    -- | The type argument
-    typeApplicationTermType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_TypeApplicationTerm = Name "hydra.core.TypeApplicationTerm"
-_TypeApplicationTerm_body = Name "body"
-_TypeApplicationTerm_type = Name "type"
--- | A System F type abstraction term
-data TypeLambda =
-  TypeLambda {
-    -- | The type variable introduced by the abstraction
-    typeLambdaParameter :: Name,
-    -- | The body of the abstraction
-    typeLambdaBody :: Term}
-  deriving (Eq, Ord, Read, Show)
-_TypeLambda = Name "hydra.core.TypeLambda"
-_TypeLambda_parameter = Name "parameter"
-_TypeLambda_body = Name "body"
--- | A type expression together with free type variables occurring in the expression
-data TypeScheme =
-  TypeScheme {
-    -- | The free type variables
-    typeSchemeVariables :: [Name],
-    -- | The type expression
-    typeSchemeBody :: Type,
-    -- | Optional metadata for type variables, including typeclass constraints. The map keys are type variable names.
-    typeSchemeConstraints :: (Maybe (M.Map Name TypeVariableMetadata))}
-  deriving (Eq, Ord, Read, Show)
-_TypeScheme = Name "hydra.core.TypeScheme"
-_TypeScheme_variables = Name "variables"
-_TypeScheme_body = Name "body"
-_TypeScheme_constraints = Name "constraints"
--- | Metadata associated with a type variable, including typeclass constraints
-data TypeVariableMetadata =
-  TypeVariableMetadata {
-    -- | The set of typeclass constraints on this type variable
-    typeVariableMetadataClasses :: (S.Set Name)}
-  deriving (Eq, Ord, Read, Show)
-_TypeVariableMetadata = Name "hydra.core.TypeVariableMetadata"
-_TypeVariableMetadata_classes = Name "classes"
--- | A term wrapped in a type name
-data WrappedTerm =
-  WrappedTerm {
-    -- | The name of the wrapper type
-    wrappedTermTypeName :: Name,
-    -- | The wrapped term
-    wrappedTermBody :: Term}
-  deriving (Eq, Ord, Read, Show)
-_WrappedTerm = Name "hydra.core.WrappedTerm"
-_WrappedTerm_typeName = Name "typeName"
-_WrappedTerm_body = Name "body"
diff --git a/src/main/haskell/Hydra/Cpp/Coder.hs b/src/main/haskell/Hydra/Cpp/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Coder.hs
+++ /dev/null
@@ -1,649 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | C++ code generator: converts Hydra modules to C++ header files
-
-module Hydra.Cpp.Coder where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Cpp.Language as Language
-import qualified Hydra.Cpp.Serde as Serde
-import qualified Hydra.Cpp.Syntax as Syntax
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-bindingNameToFilePath :: Core.Name -> String
-bindingNameToFilePath name =
-    Names.nameToFilePath Util.CaseConventionLowerSnake Util.CaseConventionLowerSnake (Packaging.FileExtension "h") name
-
-className :: Core.Name -> String
-className name = sanitizeCppName (Names.localNameOf name)
-
-constParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter
-constParameter name typ =
-    Syntax.Parameter {
-      Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-        Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-          Syntax.qualifiedTypeBaseType = typ,
-          Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})),
-        Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})),
-      Syntax.parameterName = name,
-      Syntax.parameterUnnamed = False,
-      Syntax.parameterDefaultValue = Nothing}
-
-cppClassDeclaration :: String -> [Syntax.BaseSpecifier] -> Maybe Syntax.ClassBody -> Syntax.Declaration
-cppClassDeclaration name baseSpecs mbody =
-    Syntax.DeclarationClass (Syntax.ClassDeclaration {
-      Syntax.classDeclarationSpecifier = Syntax.ClassSpecifier {
-        Syntax.classSpecifierKey = Syntax.ClassKeyClass,
-        Syntax.classSpecifierName = name,
-        Syntax.classSpecifierInheritance = baseSpecs},
-      Syntax.classDeclarationBody = mbody})
-
-cppEnumDeclaration :: String -> Maybe Syntax.ClassBody -> Syntax.Declaration
-cppEnumDeclaration name mbody =
-    Syntax.DeclarationClass (Syntax.ClassDeclaration {
-      Syntax.classDeclarationSpecifier = Syntax.ClassSpecifier {
-        Syntax.classSpecifierKey = Syntax.ClassKeyEnumClass,
-        Syntax.classSpecifierName = name,
-        Syntax.classSpecifierInheritance = []},
-      Syntax.classDeclarationBody = mbody})
-
-cppEnumForwardDeclaration :: String -> Syntax.Declaration
-cppEnumForwardDeclaration name = cppEnumDeclaration name Nothing
-
-cppPostfixExpressionToCppExpression :: Syntax.PostfixExpression -> Syntax.Expression
-cppPostfixExpressionToCppExpression pe = cppUnaryExpressionToCppExpression (Syntax.UnaryExpressionPostfix pe)
-
-cppPrimaryExpressionToCppExpression :: Syntax.PrimaryExpression -> Syntax.Expression
-cppPrimaryExpressionToCppExpression prim = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary prim)
-
-cppUnaryExpressionToCppExpression :: Syntax.UnaryExpression -> Syntax.Expression
-cppUnaryExpressionToCppExpression ue =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionLogicalOr (cppUnaryExpressionToCppLogicalOrExpression ue)))
-
-cppUnaryExpressionToCppLogicalOrExpression :: Syntax.UnaryExpression -> Syntax.LogicalOrExpression
-cppUnaryExpressionToCppLogicalOrExpression ue =
-    Syntax.LogicalOrExpressionLogicalAnd (Syntax.LogicalAndExpressionInclusiveOr (Syntax.InclusiveOrExpressionExclusiveOr (Syntax.ExclusiveOrExpressionAnd (Syntax.AndExpressionEquality (Syntax.EqualityExpressionRelational (Syntax.RelationalExpressionShift (Syntax.ShiftExpressionAdditive (Syntax.AdditiveExpressionMultiplicative (Syntax.MultiplicativeExpressionUnary ue)))))))))
-
-createAcceptImplementation :: Core.Name -> [Core.FieldType] -> Syntax.Declaration
-createAcceptImplementation tname variants =
-    Syntax.DeclarationTemplate (Syntax.TemplateDeclaration {
-      Syntax.templateDeclarationInline = False,
-      Syntax.templateDeclarationParameters = [
-        "typename R"],
-      Syntax.templateDeclarationDeclaration = (Syntax.DeclarationFunction (Syntax.FunctionDeclaration {
-        Syntax.functionDeclarationPrefixSpecifiers = [],
-        Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed "R")),
-        Syntax.functionDeclarationName = (Strings.cat2 (className tname) "::accept"),
-        Syntax.functionDeclarationParameters = [
-          Syntax.Parameter {
-            Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-              Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (Strings.cat2 (visitorName tname) "<R>"))),
-              Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})),
-            Syntax.parameterName = "visitor",
-            Syntax.parameterUnnamed = False,
-            Syntax.parameterDefaultValue = Nothing}],
-        Syntax.functionDeclarationSuffixSpecifiers = [
-          Syntax.FunctionSpecifierSuffixConst],
-        Syntax.functionDeclarationBody = (Syntax.FunctionBodyCompound (Syntax.CompoundStatement (Lists.map (\ft ->
-          let fname = Core.fieldTypeName ft
-          in (Syntax.StatementSelection (Syntax.SelectionStatement {
-            Syntax.selectionStatementCondition = (Syntax.ExpressionAssignment (Syntax.AssignmentExpressionAssignment (Syntax.ExplicitAssignment {
-              Syntax.explicitAssignmentLeft = (cppUnaryExpressionToCppLogicalOrExpression (Syntax.UnaryExpressionPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "auto ptr")))),
-              Syntax.explicitAssignmentOp = Syntax.AssignmentOperatorAssign,
-              Syntax.explicitAssignmentRight = (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionLogicalOr (cppUnaryExpressionToCppLogicalOrExpression (Syntax.UnaryExpressionPostfix (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-                Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier (Strings.cat2 (Strings.cat2 "dynamic_cast<const " (variantName tname fname)) "*>"))),
-                Syntax.functionCallOperationArguments = [
-                  cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionIdentifier "this")]}))))))}))),
-            Syntax.selectionStatementThenBranch = (Syntax.StatementCompound (Syntax.CompoundStatement [
-              Syntax.StatementJump (Syntax.JumpStatementReturnValue (cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-                Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation {
-                  Syntax.memberAccessOperationObject = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "visitor")),
-                  Syntax.memberAccessOperationMember = "visit"})),
-                Syntax.functionCallOperationArguments = [
-                  cppUnaryExpressionToCppExpression (Syntax.UnaryExpressionUnaryOp (Syntax.UnaryOperation {
-                    Syntax.unaryOperationOperator = Syntax.UnaryOperatorDereference,
-                    Syntax.unaryOperationOperand = (Syntax.UnaryExpressionPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "ptr")))}))]}))))])),
-            Syntax.selectionStatementElseBranch = (Just (createThrowStmt "std::runtime_error" createTypeIdNameCall))}))) variants)))}))})
-
-createConstructorBody :: [t0] -> Syntax.FunctionBody
-createConstructorBody params =
-    Logic.ifElse (Lists.null params) Syntax.FunctionBodyDefault (Syntax.FunctionBodyCompound (Syntax.CompoundStatement []))
-
-createFunctionCallExpr :: String -> [Syntax.Expression] -> Syntax.Expression
-createFunctionCallExpr funcName args =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-      Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier funcName)),
-      Syntax.functionCallOperationArguments = args}))
-
-createHeaderFile :: [Syntax.IncludeDirective] -> [Syntax.Declaration] -> Syntax.Program
-createHeaderFile includes decls =
-    Syntax.Program {
-      Syntax.programPreprocessorDirectives = [
-        Syntax.PreprocessorDirectivePragma (Syntax.PragmaDirective {
-          Syntax.pragmaDirectiveContent = "once"})],
-      Syntax.programIncludes = includes,
-      Syntax.programDeclarations = decls}
-
-createIdentifierExpr :: String -> Syntax.Expression
-createIdentifierExpr name = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionIdentifier name)
-
-createLessThanOperator :: Core.Name -> t0 -> Syntax.Declaration
-createLessThanOperator typeName fields =
-    Syntax.DeclarationFunction (Syntax.FunctionDeclaration {
-      Syntax.functionDeclarationPrefixSpecifiers = [
-        Syntax.FunctionSpecifierPrefixInline],
-      Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic Syntax.BasicTypeBool),
-      Syntax.functionDeclarationName = "operator<",
-      Syntax.functionDeclarationParameters = [
-        unnamedParameter "lhs" (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (className typeName))),
-        (unnamedParameter "rhs" (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (className typeName))))],
-      Syntax.functionDeclarationSuffixSpecifiers = [],
-      Syntax.functionDeclarationBody = (Syntax.FunctionBodyCompound (Syntax.CompoundStatement [
-        Syntax.StatementJump (Syntax.JumpStatementReturnValue (createLiteralBoolExpr False))]))})
-
-createLiteralBoolExpr :: Bool -> Syntax.Expression
-createLiteralBoolExpr val =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralBoolean (Syntax.BooleanLiteral val)))
-
-createLiteralIntExpr :: Integer -> Syntax.Expression
-createLiteralIntExpr val =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteralDecimal val)))
-
-createPartialVisitorInterface :: Core.Name -> [Core.FieldType] -> Syntax.Declaration
-createPartialVisitorInterface tname variants =
-    Syntax.DeclarationTemplate (Syntax.TemplateDeclaration {
-      Syntax.templateDeclarationInline = False,
-      Syntax.templateDeclarationParameters = [
-        "typename R"],
-      Syntax.templateDeclarationDeclaration = (cppClassDeclaration (partialVisitorName tname) [
-        Syntax.BaseSpecifier {
-          Syntax.baseSpecifierAccess = Syntax.AccessSpecifierPublic,
-          Syntax.baseSpecifierName = (Strings.cat2 (visitorName tname) "<R>")}] (Just (Syntax.ClassBody (Lists.concat [
-        [
-          memberSpecificationPublic],
-        [
-          Syntax.MemberSpecificationMember (Syntax.MemberDeclarationFunction (Syntax.FunctionDeclaration {
-            Syntax.functionDeclarationPrefixSpecifiers = [
-              Syntax.FunctionSpecifierPrefixVirtual],
-            Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed "R")),
-            Syntax.functionDeclarationName = "otherwise",
-            Syntax.functionDeclarationParameters = [
-              constParameter "value" (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (className tname)))],
-            Syntax.functionDeclarationSuffixSpecifiers = [
-              Syntax.FunctionSpecifierSuffixConst],
-            Syntax.functionDeclarationBody = Syntax.FunctionBodyPure}))],
-        (Lists.map (\ft ->
-          let fname = Core.fieldTypeName ft
-          in (Syntax.MemberSpecificationMember (Syntax.MemberDeclarationFunction (Syntax.FunctionDeclaration {
-            Syntax.functionDeclarationPrefixSpecifiers = [],
-            Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed "R")),
-            Syntax.functionDeclarationName = "visit",
-            Syntax.functionDeclarationParameters = [
-              constParameter "value" (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (variantName tname fname)))],
-            Syntax.functionDeclarationSuffixSpecifiers = [
-              Syntax.FunctionSpecifierSuffixOverride],
-            Syntax.functionDeclarationBody = (Syntax.FunctionBodyCompound (Syntax.CompoundStatement [
-              Syntax.StatementJump (Syntax.JumpStatementReturnValue (createFunctionCallExpr "otherwise" [
-                createIdentifierExpr "value"]))]))})))) variants)]))))})
-
-createTemplateType :: String -> [Syntax.TypeExpression] -> Syntax.TypeExpression
-createTemplateType name args =
-    Syntax.TypeExpressionTemplate (Syntax.TemplateType {
-      Syntax.templateTypeName = name,
-      Syntax.templateTypeArguments = (Lists.map (\a -> Syntax.TemplateArgumentType a) args)})
-
-createThrowStmt :: String -> Syntax.Expression -> Syntax.Statement
-createThrowStmt exceptionType arg =
-    Syntax.StatementJump (Syntax.JumpStatementThrow (createFunctionCallExpr exceptionType [
-      arg]))
-
-createTypeIdNameCall :: Syntax.Expression
-createTypeIdNameCall =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-      Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation {
-        Syntax.memberAccessOperationObject = (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-          Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "typeid")),
-          Syntax.functionCallOperationArguments = [
-            cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized (cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "*this"))))]})),
-        Syntax.memberAccessOperationMember = "name"})),
-      Syntax.functionCallOperationArguments = []}))
-
-createTypeReference :: Bool -> Core.Name -> Syntax.TypeExpression
-createTypeReference isPointer name =
-    Logic.ifElse isPointer (createTemplateType "std::shared_ptr" [
-      toConstType (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (sanitizeCppName (Names.localNameOf name))))]) (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (sanitizeCppName (Names.localNameOf name))))
-
-createUnionBaseClass :: Core.Name -> t0 -> Syntax.Declaration
-createUnionBaseClass name variants =
-    cppClassDeclaration (className name) [] (Just (Syntax.ClassBody [
-      memberSpecificationProtected,
-      (Syntax.MemberSpecificationMember (Syntax.MemberDeclarationConstructor (Syntax.ConstructorDeclaration {
-        Syntax.constructorDeclarationName = (className name),
-        Syntax.constructorDeclarationParameters = [],
-        Syntax.constructorDeclarationInitializers = [],
-        Syntax.constructorDeclarationBody = Syntax.FunctionBodyDefault}))),
-      memberSpecificationPublic,
-      (Syntax.MemberSpecificationMember (Syntax.MemberDeclarationDestructor (Syntax.DestructorDeclaration {
-        Syntax.destructorDeclarationPrefixSpecifiers = [
-          Syntax.FunctionSpecifierPrefixVirtual],
-        Syntax.destructorDeclarationName = (className name),
-        Syntax.destructorDeclarationSuffixSpecifiers = [],
-        Syntax.destructorDeclarationBody = Syntax.FunctionBodyDefault}))),
-      (Syntax.MemberSpecificationMember (Syntax.MemberDeclarationTemplate (Syntax.TemplateDeclaration {
-        Syntax.templateDeclarationInline = False,
-        Syntax.templateDeclarationParameters = [
-          "typename R"],
-        Syntax.templateDeclarationDeclaration = (Syntax.DeclarationFunction (Syntax.FunctionDeclaration {
-          Syntax.functionDeclarationPrefixSpecifiers = [],
-          Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed "R")),
-          Syntax.functionDeclarationName = "accept",
-          Syntax.functionDeclarationParameters = [
-            Syntax.Parameter {
-              Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-                Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (Strings.cat2 (visitorName name) "<R>"))),
-                Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})),
-              Syntax.parameterName = "visitor",
-              Syntax.parameterUnnamed = False,
-              Syntax.parameterDefaultValue = Nothing}],
-          Syntax.functionDeclarationSuffixSpecifiers = [
-            Syntax.FunctionSpecifierSuffixConst],
-          Syntax.functionDeclarationBody = Syntax.FunctionBodyDeclaration}))})))]))
-
-createVariantClass :: t0 -> t1 -> Core.Name -> Core.Name -> Core.FieldType -> Either Errors.Error Syntax.Declaration
-createVariantClass cx g tname parentClass ft =
-
-      let fname = Core.fieldTypeName ft
-          variantType = Core.fieldTypeType ft
-          hasValue = Logic.not (Predicates.isUnitType variantType)
-          valueField =
-                  Logic.ifElse hasValue (Eithers.map (\cppType -> [
-                    Syntax.MemberSpecificationMember (Syntax.MemberDeclarationVariable (Syntax.VariableDeclaration {
-                      Syntax.variableDeclarationType = (Just cppType),
-                      Syntax.variableDeclarationName = "value",
-                      Syntax.variableDeclarationInitializer = Nothing,
-                      Syntax.variableDeclarationIsAuto = False}))]) (encodeType cx g (Strip.deannotateType variantType))) (Right [])
-          constructorParams =
-                  Logic.ifElse hasValue (Eithers.map (\paramType -> [
-                    Syntax.Parameter {
-                      Syntax.parameterType = paramType,
-                      Syntax.parameterName = "value",
-                      Syntax.parameterUnnamed = False,
-                      Syntax.parameterDefaultValue = Nothing}]) (encodeType cx g (Strip.deannotateType variantType))) (Right [])
-      in (Eithers.bind valueField (\vFields -> Eithers.bind constructorParams (\vParams ->
-        let initList =
-                Logic.ifElse hasValue [
-                  Syntax.MemInitializer {
-                    Syntax.memInitializerName = "value",
-                    Syntax.memInitializerArguments = [
-                      createIdentifierExpr "value"]}] []
-        in (Right (cppClassDeclaration (variantName tname fname) [
-          Syntax.BaseSpecifier {
-            Syntax.baseSpecifierAccess = Syntax.AccessSpecifierPublic,
-            Syntax.baseSpecifierName = (className parentClass)}] (Just (Syntax.ClassBody (Lists.concat [
-          [
-            memberSpecificationPublic],
-          vFields,
-          [
-            Syntax.MemberSpecificationMember (Syntax.MemberDeclarationConstructor (Syntax.ConstructorDeclaration {
-              Syntax.constructorDeclarationName = (variantName tname fname),
-              Syntax.constructorDeclarationParameters = vParams,
-              Syntax.constructorDeclarationInitializers = initList,
-              Syntax.constructorDeclarationBody = (createConstructorBody vParams)}))]]))))))))
-
-createVisitorInterface :: Core.Name -> [Core.FieldType] -> Syntax.Declaration
-createVisitorInterface tname variants =
-    Syntax.DeclarationTemplate (Syntax.TemplateDeclaration {
-      Syntax.templateDeclarationInline = False,
-      Syntax.templateDeclarationParameters = [
-        "typename R"],
-      Syntax.templateDeclarationDeclaration = (cppClassDeclaration (visitorName tname) [] (Just (Syntax.ClassBody (Lists.concat [
-        [
-          memberSpecificationPublic],
-        (Lists.map (\ft ->
-          let fname = Core.fieldTypeName ft
-          in (Syntax.MemberSpecificationMember (Syntax.MemberDeclarationFunction (Syntax.FunctionDeclaration {
-            Syntax.functionDeclarationPrefixSpecifiers = [
-              Syntax.FunctionSpecifierPrefixVirtual],
-            Syntax.functionDeclarationReturnType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed "R")),
-            Syntax.functionDeclarationName = "visit",
-            Syntax.functionDeclarationParameters = [
-              Syntax.Parameter {
-                Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-                  Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-                    Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (variantName tname fname))),
-                    Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})),
-                  Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})),
-                Syntax.parameterName = "value",
-                Syntax.parameterUnnamed = False,
-                Syntax.parameterDefaultValue = Nothing}],
-            Syntax.functionDeclarationSuffixSpecifiers = [],
-            Syntax.functionDeclarationBody = Syntax.FunctionBodyPure})))) variants),
-        [
-          Syntax.MemberSpecificationMember (Syntax.MemberDeclarationDestructor (Syntax.DestructorDeclaration {
-            Syntax.destructorDeclarationPrefixSpecifiers = [
-              Syntax.FunctionSpecifierPrefixVirtual],
-            Syntax.destructorDeclarationName = (visitorName tname),
-            Syntax.destructorDeclarationSuffixSpecifiers = [],
-            Syntax.destructorDeclarationBody = Syntax.FunctionBodyDefault}))]]))))})
-
-encodeApplicationType :: t0 -> t1 -> Core.ApplicationType -> Either Errors.Error Syntax.TypeExpression
-encodeApplicationType cx g at =
-    Eithers.bind (encodeType cx g (Core.applicationTypeFunction at)) (\body -> Eithers.bind (encodeType cx g (Core.applicationTypeArgument at)) (\arg -> Right (createTemplateType "TODO_template" [
-      body,
-      arg])))
-
-encodeEnumType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either t3 [Syntax.Declaration]
-encodeEnumType cx g name tfields comment =
-    Right [
-      cppEnumDeclaration (className name) (Just (Syntax.ClassBody (Lists.map (\ft -> Syntax.MemberSpecificationMember (Syntax.MemberDeclarationVariable (Syntax.VariableDeclaration {
-        Syntax.variableDeclarationType = Nothing,
-        Syntax.variableDeclarationName = (encodeEnumValue (Core.fieldTypeName ft)),
-        Syntax.variableDeclarationInitializer = Nothing,
-        Syntax.variableDeclarationIsAuto = False}))) tfields)))]
-
-encodeEnumValue :: Core.Name -> String
-encodeEnumValue fname = sanitizeCppName (Formatting.convertCaseCamelToUpperSnake (Core.unName fname))
-
-encodeFieldName :: Core.Name -> String
-encodeFieldName fname = sanitizeCppName (Formatting.convertCaseCamelToLowerSnake (Core.unName fname))
-
-encodeFieldType :: t0 -> Core.FieldType -> t1 -> t2 -> Either Errors.Error Syntax.VariableDeclaration
-encodeFieldType isParameter ft cx g =
-
-      let fname = Core.fieldTypeName ft
-          ftype = Core.fieldTypeType ft
-      in (Eithers.bind (encodeType cx g ftype) (\cppType -> Right (Syntax.VariableDeclaration {
-        Syntax.variableDeclarationType = (Just cppType),
-        Syntax.variableDeclarationName = (encodeFieldName fname),
-        Syntax.variableDeclarationInitializer = Nothing,
-        Syntax.variableDeclarationIsAuto = False})))
-
-encodeForallType :: t0 -> t1 -> Core.ForallType -> Either Errors.Error Syntax.TypeExpression
-encodeForallType cx g lt = encodeType cx g (Core.forallTypeBody lt)
-
-encodeFunctionType :: t0 -> t1 -> Core.FunctionType -> Either Errors.Error Syntax.TypeExpression
-encodeFunctionType cx g ft =
-    Eithers.bind (encodeType cx g (Core.functionTypeDomain ft)) (\dom -> Eithers.bind (encodeType cx g (Core.functionTypeCodomain ft)) (\cod -> Right (Syntax.TypeExpressionFunction (Syntax.FunctionType {
-      Syntax.functionTypeReturnType = cod,
-      Syntax.functionTypeParameters = [
-        Syntax.Parameter {
-          Syntax.parameterType = dom,
-          Syntax.parameterName = "",
-          Syntax.parameterUnnamed = False,
-          Syntax.parameterDefaultValue = Nothing}]}))))
-
-encodeLiteralType :: Core.LiteralType -> Syntax.TypeExpression
-encodeLiteralType lt =
-    Syntax.TypeExpressionBasic (case lt of
-      Core.LiteralTypeBinary -> Syntax.BasicTypeChar
-      Core.LiteralTypeBoolean -> Syntax.BasicTypeBool
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeFloat32 -> Syntax.BasicTypeFloat
-        Core.FloatTypeFloat64 -> Syntax.BasicTypeDouble
-        _ -> Syntax.BasicTypeDouble
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeBigint -> Syntax.BasicTypeInt
-        Core.IntegerTypeInt8 -> Syntax.BasicTypeChar
-        Core.IntegerTypeInt16 -> Syntax.BasicTypeNamed "int16_t"
-        Core.IntegerTypeInt32 -> Syntax.BasicTypeInt
-        Core.IntegerTypeInt64 -> Syntax.BasicTypeNamed "int64_t"
-        _ -> Syntax.BasicTypeInt
-      Core.LiteralTypeString -> Syntax.BasicTypeString)
-
--- | Encode a name with a specified case convention, optionally qualified
-encodeName :: t0 -> t1 -> t2 -> Core.Name -> String
-encodeName isQualified conv env name = sanitizeCppName (Names.localNameOf name)
-
-encodeNamespace :: Packaging.Namespace -> String
-encodeNamespace ns =
-    Strings.intercalate "::" (Lists.map (\seg -> Formatting.convertCaseCamelToLowerSnake seg) (Strings.splitOn "." (Packaging.unNamespace ns)))
-
-encodeRecordType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either Errors.Error [Syntax.Declaration]
-encodeRecordType cx g name rt comment =
-    Eithers.bind (Eithers.mapList (\f -> encodeFieldType False f cx g) rt) (\cppFields -> Eithers.bind (Eithers.mapList (\f -> encodeFieldType True f cx g) rt) (\constructorParams -> Right [
-      cppClassDeclaration (className name) [] (Just (Syntax.ClassBody (Lists.concat [
-        [
-          memberSpecificationPublic],
-        (Lists.map (\field -> Syntax.MemberSpecificationMember (Syntax.MemberDeclarationVariable field)) cppFields),
-        [
-          Syntax.MemberSpecificationMember (Syntax.MemberDeclarationConstructor (Syntax.ConstructorDeclaration {
-            Syntax.constructorDeclarationName = (className name),
-            Syntax.constructorDeclarationParameters = (Lists.map (\p -> Syntax.Parameter {
-              Syntax.parameterType = (Maybes.fromMaybe (Syntax.TypeExpressionBasic Syntax.BasicTypeInt) (Syntax.variableDeclarationType p)),
-              Syntax.parameterName = (Syntax.variableDeclarationName p),
-              Syntax.parameterUnnamed = False,
-              Syntax.parameterDefaultValue = Nothing}) constructorParams),
-            Syntax.constructorDeclarationInitializers = (Lists.map (\field -> Syntax.MemInitializer {
-              Syntax.memInitializerName = (Syntax.variableDeclarationName field),
-              Syntax.memInitializerArguments = [
-                createIdentifierExpr (Syntax.variableDeclarationName field)]}) cppFields),
-            Syntax.constructorDeclarationBody = (createConstructorBody constructorParams)}))]]))),
-      (createLessThanOperator name rt)]))
-
-encodeType :: t0 -> t1 -> Core.Type -> Either Errors.Error Syntax.TypeExpression
-encodeType cx g typ =
-
-      let t = Strip.deannotateType typ
-      in case t of
-        Core.TypeApplication v0 -> encodeApplicationType cx g v0
-        Core.TypeEither v0 -> Eithers.bind (encodeType cx g (Core.eitherTypeLeft v0)) (\lt -> Eithers.bind (encodeType cx g (Core.eitherTypeRight v0)) (\rt -> Right (toConstType (createTemplateType "std::variant" [
-          lt,
-          rt]))))
-        Core.TypeFunction v0 -> encodeFunctionType cx g v0
-        Core.TypeForall v0 -> encodeForallType cx g v0
-        Core.TypeList v0 -> Eithers.map (\enc -> toConstType (createTemplateType "std::vector" [
-          enc])) (encodeType cx g v0)
-        Core.TypeMap v0 -> Eithers.bind (encodeType cx g (Core.mapTypeKeys v0)) (\kt -> Eithers.bind (encodeType cx g (Core.mapTypeValues v0)) (\vt -> Right (toConstType (createTemplateType "std::map" [
-          kt,
-          vt]))))
-        Core.TypeLiteral v0 -> Right (encodeLiteralType v0)
-        Core.TypeMaybe v0 -> Eithers.map (\enc -> toConstType (createTemplateType "std::optional" [
-          enc])) (encodeType cx g v0)
-        Core.TypePair v0 -> Eithers.bind (encodeType cx g (Core.pairTypeFirst v0)) (\ft -> Eithers.bind (encodeType cx g (Core.pairTypeSecond v0)) (\st -> Right (toConstType (createTemplateType "std::pair" [
-          ft,
-          st]))))
-        Core.TypeRecord _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous record type"))
-        Core.TypeSet v0 -> Eithers.map (\enc -> toConstType (createTemplateType "std::set" [
-          enc])) (encodeType cx g v0)
-        Core.TypeUnion _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous union type"))
-        Core.TypeVariable v0 -> Right (Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (sanitizeCppName (Core.unName v0))))
-        Core.TypeWrap _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous wrapped type"))
-        Core.TypeUnit -> Right (createTemplateType "std::tuple" [])
-        _ -> Left (Errors.ErrorOther (Errors.OtherError "Unsupported type"))
-
-encodeTypeAlias :: t0 -> t1 -> Core.Name -> Core.Type -> t2 -> Either Errors.Error Syntax.Declaration
-encodeTypeAlias cx g name typ comment =
-    Eithers.bind (encodeType cx g typ) (\cppType -> Right (Syntax.DeclarationTypedef (Syntax.TypedefDeclaration {
-      Syntax.typedefDeclarationName = (className name),
-      Syntax.typedefDeclarationType = cppType,
-      Syntax.typedefDeclarationIsUsing = True})))
-
-encodeTypeDefinition :: t0 -> t1 -> Core.Name -> Core.Type -> Either Errors.Error [Syntax.Declaration]
-encodeTypeDefinition cx g name typ =
-
-      let t = Strip.deannotateType typ
-      in case t of
-        Core.TypeForall v0 -> encodeTypeDefinition cx g name (Core.forallTypeBody v0)
-        Core.TypeRecord v0 -> encodeRecordType cx g name v0 Nothing
-        Core.TypeUnion v0 -> encodeUnionType cx g name v0 Nothing
-        Core.TypeWrap v0 -> encodeWrappedType cx g name v0 Nothing
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected type in definition: " (ShowCore.type_ typ))))
-
-encodeUnionType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either Errors.Error [Syntax.Declaration]
-encodeUnionType cx g name rt comment =
-    Logic.ifElse (Predicates.isEnumRowType rt) (encodeEnumType cx g name rt comment) (encodeVariantType cx g name rt comment)
-
-encodeVariantType :: t0 -> t1 -> Core.Name -> [Core.FieldType] -> t2 -> Either Errors.Error [Syntax.Declaration]
-encodeVariantType cx g name variants comment =
-    Eithers.bind (Eithers.mapList (\v -> createVariantClass cx g name name v) variants) (\variantClasses -> Right (Lists.concat [
-      generateForwardDeclarations name variants,
-      [
-        createVisitorInterface name variants],
-      [
-        createUnionBaseClass name variants],
-      variantClasses,
-      [
-        createPartialVisitorInterface name variants],
-      [
-        createAcceptImplementation name variants]]))
-
-encodeWrappedType :: t0 -> t1 -> Core.Name -> Core.Type -> t2 -> Either Errors.Error [Syntax.Declaration]
-encodeWrappedType cx g name typ comment =
-    encodeRecordType cx g name [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "value"),
-        Core.fieldTypeType = typ}] comment
-
-findIncludes :: Bool -> Packaging.Namespace -> [Packaging.TypeDefinition] -> [Syntax.IncludeDirective]
-findIncludes withFwd ns defs =
-    Lists.concat [
-      [
-        Syntax.IncludeDirective {
-          Syntax.includeDirectiveName = "memory",
-          Syntax.includeDirectiveIsSystem = True},
-        Syntax.IncludeDirective {
-          Syntax.includeDirectiveName = "stdexcept",
-          Syntax.includeDirectiveIsSystem = True}],
-      (Lists.map (\depName -> Syntax.IncludeDirective {
-        Syntax.includeDirectiveName = (bindingNameToFilePath depName),
-        Syntax.includeDirectiveIsSystem = False}) (findTypeDependencies ns defs)),
-      (Logic.ifElse withFwd [
-        Syntax.IncludeDirective {
-          Syntax.includeDirectiveName = (bindingNameToFilePath (fwdHeaderName ns)),
-          Syntax.includeDirectiveIsSystem = False}] [])]
-
-findTypeDependencies :: Packaging.Namespace -> [Packaging.TypeDefinition] -> [Core.Name]
-findTypeDependencies ns defs =
-    Lists.filter (\n -> Logic.not (Equality.equal (Maybes.map Packaging.unNamespace (Names.namespaceOf n)) (Just (Packaging.unNamespace ns)))) (Sets.toList (Lists.foldl (\acc -> \d -> Sets.union acc (Dependencies.typeDependencyNames True (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme d)))) Sets.empty defs))
-
-fwdHeaderName :: Packaging.Namespace -> Core.Name
-fwdHeaderName ns =
-    Names.unqualifyName (Packaging.QualifiedName {
-      Packaging.qualifiedNameNamespace = (Just ns),
-      Packaging.qualifiedNameLocal = "Fwd"})
-
-gatherMetadata :: t0 -> Bool
-gatherMetadata defs = True
-
-generateForwardDeclarations :: Core.Name -> [Core.FieldType] -> [Syntax.Declaration]
-generateForwardDeclarations tname fields =
-    Lists.map (\ft -> cppClassDeclaration (variantName tname (Core.fieldTypeName ft)) [] Nothing) fields
-
-generateTypeFile :: Packaging.Namespace -> Packaging.TypeDefinition -> t0 -> t1 -> Either Errors.Error (String, String)
-generateTypeFile ns def_ cx g =
-
-      let name = Packaging.typeDefinitionName def_
-          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme def_)
-      in (Eithers.bind (encodeTypeDefinition cx g name typ) (\decls ->
-        let includes = findIncludes True ns [
-              def_]
-        in (Right (serializeHeaderFile name includes [
-          namespaceDecl ns decls]))))
-
-generateTypeFiles :: Packaging.Namespace -> [Packaging.TypeDefinition] -> t0 -> t1 -> Either Errors.Error [(String, String)]
-generateTypeFiles ns defs cx g =
-    Eithers.bind (Eithers.mapList (\d -> generateTypeFile ns d cx g) defs) (\classFiles -> Right classFiles)
-
-isStdContainerType :: Core.Type -> Bool
-isStdContainerType typ =
-
-      let t = Strip.deannotateType typ
-      in case t of
-        Core.TypeApplication v0 -> isStdContainerType (Core.applicationTypeFunction v0)
-        Core.TypeList _ -> True
-        Core.TypeMap _ -> True
-        Core.TypeMaybe _ -> True
-        Core.TypeSet _ -> True
-        _ -> False
-
-isStructType :: Core.Type -> Bool
-isStructType rawType =
-
-      let t = Resolution.fullyStripType rawType
-          isLiteral =
-                  case t of
-                    Core.TypeLiteral _ -> True
-                    _ -> False
-      in (Logic.and (Logic.not isLiteral) (Logic.not (Predicates.isEnumType rawType)))
-
-isTemplateType :: Core.Type -> Bool
-isTemplateType typ =
-
-      let t = Strip.deannotateType typ
-      in (Logic.or (case t of
-        Core.TypeLiteral v0 -> case v0 of
-          Core.LiteralTypeString -> True
-          _ -> False
-        _ -> False) (isStdContainerType typ))
-
-memberSpecificationProtected :: Syntax.MemberSpecification
-memberSpecificationProtected = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierProtected
-
-memberSpecificationPublic :: Syntax.MemberSpecification
-memberSpecificationPublic = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierPublic
-
-moduleToCpp :: Packaging.Module -> [Packaging.Definition] -> t0 -> t1 -> Either Errors.Error (M.Map String String)
-moduleToCpp mod defs cx g =
-
-      let ns = Packaging.moduleNamespace mod
-          typeDefs = Pairs.first (Environment.partitionDefinitions defs)
-      in (Eithers.bind (generateTypeFiles ns typeDefs cx g) (\typeFiles -> Right (Maps.fromList typeFiles)))
-
-namespaceDecl :: Packaging.Namespace -> [Syntax.Declaration] -> Syntax.Declaration
-namespaceDecl ns decls =
-    Syntax.DeclarationNamespace (Syntax.NamespaceDeclaration {
-      Syntax.namespaceDeclarationName = (encodeNamespace ns),
-      Syntax.namespaceDeclarationDeclarations = decls})
-
-partialVisitorName :: Core.Name -> String
-partialVisitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "PartialVisitor")
-
-sanitizeCppName :: String -> String
-sanitizeCppName name = Formatting.sanitizeWithUnderscores Language.cppReservedWords name
-
-serializeHeaderFile :: Core.Name -> [Syntax.IncludeDirective] -> [Syntax.Declaration] -> (String, String)
-serializeHeaderFile name includes decls =
-    (bindingNameToFilePath name, (Serialization.printExpr (Serialization.parenthesize (Serde.encodeProgram (createHeaderFile includes decls)))))
-
-toConstType :: Syntax.TypeExpression -> Syntax.TypeExpression
-toConstType baseType =
-    Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-      Syntax.qualifiedTypeBaseType = baseType,
-      Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})
-
-unnamedParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter
-unnamedParameter name typ =
-    Syntax.Parameter {
-      Syntax.parameterType = typ,
-      Syntax.parameterName = name,
-      Syntax.parameterUnnamed = True,
-      Syntax.parameterDefaultValue = Nothing}
-
-variantName :: Core.Name -> Core.Name -> String
-variantName tname fname = sanitizeCppName (Strings.cat2 (Names.localNameOf tname) (Formatting.capitalize (Core.unName fname)))
-
-visitorName :: Core.Name -> String
-visitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "Visitor")
diff --git a/src/main/haskell/Hydra/Cpp/Environment.hs b/src/main/haskell/Hydra/Cpp/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Environment.hs
+++ /dev/null
@@ -1,26 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Type definitions for C++ code generation environment
-
-module Hydra.Cpp.Environment where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
--- | Environment for C++ code generation
-data CppEnvironment =
-  CppEnvironment {
-    -- | Namespace mapping for code generation
-    cppEnvironmentNamespaces :: (Packaging.Namespaces String),
-    -- | Type variables in scope, with their C++ names
-    cppEnvironmentBoundTypeVariables :: ([Core.Name], (M.Map Core.Name String))}
-  deriving (Eq, Ord, Read, Show)
-
-_CppEnvironment = Core.Name "hydra.cpp.environment.CppEnvironment"
-
-_CppEnvironment_namespaces = Core.Name "namespaces"
-
-_CppEnvironment_boundTypeVariables = Core.Name "boundTypeVariables"
diff --git a/src/main/haskell/Hydra/Cpp/Language.hs b/src/main/haskell/Hydra/Cpp/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Language.hs
+++ /dev/null
@@ -1,242 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for C++
-
-module Hydra.Cpp.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
--- | Language constraints for C++
-cppLanguage :: Coders.Language
-cppLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.cpp"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
--- | A set of reserved words in C++
-cppReservedWords :: S.Set String
-cppReservedWords =
-    Sets.fromList (Lists.concat [
-      cppKeywords,
-      cppPreprocessor,
-      cppStlTypes,
-      hydraCppKeywords])
-  where
-    cppKeywords =
-        [
-          "alignas",
-          "alignof",
-          "and",
-          "and_eq",
-          "asm",
-          "auto",
-          "bitand",
-          "bitor",
-          "bool",
-          "break",
-          "case",
-          "catch",
-          "char",
-          "char8_t",
-          "char16_t",
-          "char32_t",
-          "class",
-          "compl",
-          "concept",
-          "const",
-          "consteval",
-          "constexpr",
-          "constinit",
-          "const_cast",
-          "continue",
-          "co_await",
-          "co_return",
-          "co_yield",
-          "decltype",
-          "default",
-          "delete",
-          "do",
-          "double",
-          "dynamic_cast",
-          "else",
-          "enum",
-          "explicit",
-          "export",
-          "extern",
-          "false",
-          "float",
-          "for",
-          "friend",
-          "goto",
-          "if",
-          "inline",
-          "int",
-          "long",
-          "mutable",
-          "namespace",
-          "new",
-          "noexcept",
-          "not",
-          "not_eq",
-          "nullptr",
-          "operator",
-          "or",
-          "or_eq",
-          "private",
-          "protected",
-          "public",
-          "register",
-          "reinterpret_cast",
-          "requires",
-          "return",
-          "short",
-          "signed",
-          "sizeof",
-          "static",
-          "static_assert",
-          "static_cast",
-          "struct",
-          "switch",
-          "template",
-          "this",
-          "thread_local",
-          "throw",
-          "true",
-          "try",
-          "typedef",
-          "typeid",
-          "typename",
-          "union",
-          "unsigned",
-          "using",
-          "virtual",
-          "void",
-          "volatile",
-          "wchar_t",
-          "while",
-          "xor",
-          "xor_eq"]
-    cppPreprocessor =
-        [
-          "#define",
-          "#elif",
-          "#else",
-          "#endif",
-          "#error",
-          "#if",
-          "#ifdef",
-          "#ifndef",
-          "#include",
-          "#line",
-          "#pragma",
-          "#undef"]
-    cppStlTypes =
-        [
-          "std",
-          "string",
-          "vector",
-          "map",
-          "set",
-          "optional",
-          "variant",
-          "pair",
-          "tuple",
-          "function",
-          "array",
-          "deque",
-          "forward_list",
-          "list",
-          "multimap",
-          "multiset",
-          "unordered_map",
-          "unordered_set",
-          "unordered_multimap",
-          "unordered_multiset",
-          "stack",
-          "queue",
-          "priority_queue",
-          "shared_ptr",
-          "unique_ptr",
-          "weak_ptr"]
-    hydraCppKeywords = []
diff --git a/src/main/haskell/Hydra/Cpp/Names.hs b/src/main/haskell/Hydra/Cpp/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Names.hs
+++ /dev/null
@@ -1,120 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | C++ naming utilities: encoding Hydra names as C++ names
-
-module Hydra.Cpp.Names where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Cpp.Environment as Environment
-import qualified Hydra.Cpp.Language as Language
-import qualified Hydra.Cpp.Syntax as Syntax
-import qualified Hydra.Cpp.Utils as Utils
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Get the C++ class name from a Hydra Name
-className :: Core.Name -> String
-className name = sanitizeCppName (Names.localNameOf name)
-
--- | Create a type reference, optionally wrapped in shared_ptr
-createTypeReference :: Bool -> Environment.CppEnvironment -> Core.Name -> Syntax.TypeExpression
-createTypeReference isPointer env name =
-
-      let baseType = Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (encodeName True Util.CaseConventionPascal env name))
-      in (Logic.ifElse isPointer (Utils.toConstType baseType) baseType)
-
--- | Encode an enum value with appropriate naming convention
-encodeEnumValue :: Environment.CppEnvironment -> Core.Name -> String
-encodeEnumValue = encodeName False Util.CaseConventionUpperSnake
-
--- | Encode a field name with appropriate naming convention
-encodeFieldName :: Environment.CppEnvironment -> Core.Name -> String
-encodeFieldName env fname = encodeName False Util.CaseConventionLowerSnake env fname
-
--- | Encode a name with specified convention
-encodeName :: Bool -> Util.CaseConvention -> Environment.CppEnvironment -> Core.Name -> String
-encodeName isQualified conv env name =
-
-      let focusNs = Pairs.first (Packaging.namespacesFocus (Environment.cppEnvironmentNamespaces env))
-          boundVars = Pairs.second (Environment.cppEnvironmentBoundTypeVariables env)
-          qualName = Names.qualifyName name
-          mns = Packaging.qualifiedNameNamespace qualName
-          local = Packaging.qualifiedNameLocal qualName
-          cppLocal = sanitizeCppName (Formatting.convertCase Util.CaseConventionCamel conv local)
-          cppNs =
-                  \nsVal -> Strings.intercalate "::" (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unNamespace nsVal)))
-      in (Logic.ifElse isQualified (Maybes.maybe (Maybes.maybe cppLocal (\nsVal -> Strings.cat2 (cppNs nsVal) (Strings.cat2 "::" cppLocal)) mns) (\n -> n) (Maps.lookup name boundVars)) cppLocal)
-
--- | Encode a qualified name with namespace
-encodeNameQualified :: Environment.CppEnvironment -> Core.Name -> String
-encodeNameQualified env name =
-
-      let boundVars = Pairs.second (Environment.cppEnvironmentBoundTypeVariables env)
-          focusNs = Pairs.first (Packaging.namespacesFocus (Environment.cppEnvironmentNamespaces env))
-          qualName = Names.qualifyName name
-          mns = Packaging.qualifiedNameNamespace qualName
-          local = Packaging.qualifiedNameLocal qualName
-      in (Maybes.maybe (Logic.ifElse (Equality.equal mns (Just focusNs)) (sanitizeCppName local) (Strings.intercalate "::" (Lists.map sanitizeCppName (Strings.splitOn "." (Core.unName name))))) (\n -> n) (Maps.lookup name boundVars))
-
--- | Encode a namespace as a C++ namespace string
-encodeNamespace :: Packaging.Namespace -> String
-encodeNamespace nsVal =
-    Strings.intercalate "::" (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unNamespace nsVal)))
-
--- | Encode a type variable name
-encodeTypeVariable :: Core.Name -> String
-encodeTypeVariable name = Formatting.capitalize (Core.unName name)
-
--- | Get the forward header name for a namespace
-fwdHeaderName :: Packaging.Namespace -> Core.Name
-fwdHeaderName nsVal =
-    Names.unqualifyName (Packaging.QualifiedName {
-      Packaging.qualifiedNameNamespace = (Just nsVal),
-      Packaging.qualifiedNameLocal = "Fwd"})
-
--- | Create a namespace declaration wrapping inner declarations
-namespaceDecl :: Packaging.Namespace -> [Syntax.Declaration] -> Syntax.Declaration
-namespaceDecl nsVal decls =
-    Syntax.DeclarationNamespace (Syntax.NamespaceDeclaration {
-      Syntax.namespaceDeclarationName = (encodeNamespace nsVal),
-      Syntax.namespaceDeclarationDeclarations = decls})
-
--- | Get the partial visitor name for a type
-partialVisitorName :: Core.Name -> String
-partialVisitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "PartialVisitor")
-
--- | Sanitize a name to be valid in C++
-sanitizeCppName :: String -> String
-sanitizeCppName = Formatting.sanitizeWithUnderscores Language.cppReservedWords
-
--- | Create a reference to a term variable
-termVariableReference :: Environment.CppEnvironment -> Core.Name -> Syntax.Expression
-termVariableReference = variableReference Util.CaseConventionLowerSnake
-
--- | Create a reference to a type variable
-typeVariableReference :: Environment.CppEnvironment -> Core.Name -> Syntax.TypeExpression
-typeVariableReference env name =
-    Syntax.TypeExpressionBasic (Syntax.BasicTypeNamed (encodeName True Util.CaseConventionPascal env name))
-
--- | Create a variable reference expression
-variableReference :: Util.CaseConvention -> Environment.CppEnvironment -> Core.Name -> Syntax.Expression
-variableReference conv env name = Utils.createIdentifierExpr (encodeName True conv env name)
-
--- | Get the variant name by combining type name and field name
-variantName :: Core.Name -> Core.Name -> String
-variantName tname fname = sanitizeCppName (Strings.cat2 (Names.localNameOf tname) (Formatting.capitalize (Core.unName fname)))
-
--- | Get the visitor name for a type
-visitorName :: Core.Name -> String
-visitorName name = sanitizeCppName (Strings.cat2 (Names.localNameOf name) "Visitor")
diff --git a/src/main/haskell/Hydra/Cpp/Serde.hs b/src/main/haskell/Hydra/Cpp/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Serde.hs
+++ /dev/null
@@ -1,1325 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting C++ AST to abstract expressions
-
-module Hydra.Cpp.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Cpp.Syntax as Syntax
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Convert an access specifier to an expression
-encodeAccessSpecifier :: Syntax.AccessSpecifier -> Ast.Expr
-encodeAccessSpecifier a =
-    case a of
-      Syntax.AccessSpecifierPublic -> Serialization.cst "public"
-      Syntax.AccessSpecifierProtected -> Serialization.cst "protected"
-      Syntax.AccessSpecifierPrivate -> Serialization.cst "private"
-      Syntax.AccessSpecifierNone -> Serialization.cst ""
-
--- | Convert an add operation to an expression
-encodeAddOperation :: Syntax.AddOperation -> Ast.Expr
-encodeAddOperation op =
-
-      let left = Syntax.addOperationLeft op
-          right = Syntax.addOperationRight op
-      in (Serialization.spaceSep [
-        encodeAdditiveExpression left,
-        (Serialization.cst "+"),
-        (encodeMultiplicativeExpression right)])
-
--- | Convert an additive expression to an expression
-encodeAdditiveExpression :: Syntax.AdditiveExpression -> Ast.Expr
-encodeAdditiveExpression e =
-    case e of
-      Syntax.AdditiveExpressionMultiplicative v0 -> encodeMultiplicativeExpression v0
-      Syntax.AdditiveExpressionAdd v0 -> encodeAddOperation v0
-      Syntax.AdditiveExpressionSubtract v0 -> encodeSubtractOperation v0
-
--- | Convert an and expression to an expression
-encodeAndExpression :: Syntax.AndExpression -> Ast.Expr
-encodeAndExpression e =
-    case e of
-      Syntax.AndExpressionEquality v0 -> encodeEqualityExpression v0
-      Syntax.AndExpressionBitwiseAnd v0 -> encodeBitwiseAndOperation v0
-
--- | Convert an assignment expression to an expression
-encodeAssignmentExpression :: Syntax.AssignmentExpression -> Ast.Expr
-encodeAssignmentExpression a =
-    case a of
-      Syntax.AssignmentExpressionConditional v0 -> encodeConditionalExpression v0
-      Syntax.AssignmentExpressionAssignment v0 -> encodeExplicitAssignment v0
-
--- | Convert an assignment operator to an expression
-encodeAssignmentOperator :: Syntax.AssignmentOperator -> Ast.Expr
-encodeAssignmentOperator op =
-    case op of
-      Syntax.AssignmentOperatorAssign -> Serialization.cst "="
-      Syntax.AssignmentOperatorPlusAssign -> Serialization.cst "+="
-      Syntax.AssignmentOperatorMinusAssign -> Serialization.cst "-="
-      Syntax.AssignmentOperatorMultiplyAssign -> Serialization.cst "*="
-      Syntax.AssignmentOperatorDivideAssign -> Serialization.cst "/="
-      Syntax.AssignmentOperatorModuloAssign -> Serialization.cst "%="
-      Syntax.AssignmentOperatorLeftShiftAssign -> Serialization.cst "<<="
-      Syntax.AssignmentOperatorRightShiftAssign -> Serialization.cst ">>="
-      Syntax.AssignmentOperatorBitwiseAndAssign -> Serialization.cst "&="
-      Syntax.AssignmentOperatorBitwiseXorAssign -> Serialization.cst "^="
-      Syntax.AssignmentOperatorBitwiseOrAssign -> Serialization.cst "|="
-
--- | Convert a base specifier to an expression
-encodeBaseSpecifier :: Syntax.BaseSpecifier -> Ast.Expr
-encodeBaseSpecifier bs =
-
-      let access = Syntax.baseSpecifierAccess bs
-          name = Syntax.baseSpecifierName bs
-      in (Serialization.spaceSep [
-        encodeAccessSpecifier access,
-        (Serialization.cst name)])
-
--- | Convert a basic type to an expression
-encodeBasicType :: Syntax.BasicType -> Ast.Expr
-encodeBasicType t =
-    case t of
-      Syntax.BasicTypeVoid -> Serialization.cst "void"
-      Syntax.BasicTypeBool -> Serialization.cst "bool"
-      Syntax.BasicTypeChar -> Serialization.cst "char"
-      Syntax.BasicTypeInt -> Serialization.cst "int"
-      Syntax.BasicTypeFloat -> Serialization.cst "float"
-      Syntax.BasicTypeDouble -> Serialization.cst "double"
-      Syntax.BasicTypeString -> Serialization.cst "std::string"
-      Syntax.BasicTypeAuto -> Serialization.cst "auto"
-      Syntax.BasicTypeNamed v0 -> Serialization.cst v0
-
--- | Convert a bitwise and operation to an expression
-encodeBitwiseAndOperation :: Syntax.BitwiseAndOperation -> Ast.Expr
-encodeBitwiseAndOperation op =
-
-      let left = Syntax.bitwiseAndOperationLeft op
-          right = Syntax.bitwiseAndOperationRight op
-      in (Serialization.spaceSep [
-        encodeAndExpression left,
-        (Serialization.cst "&"),
-        (encodeEqualityExpression right)])
-
--- | Convert a bitwise or operation to an expression
-encodeBitwiseOrOperation :: Syntax.BitwiseOrOperation -> Ast.Expr
-encodeBitwiseOrOperation op =
-
-      let left = Syntax.bitwiseOrOperationLeft op
-          right = Syntax.bitwiseOrOperationRight op
-      in (Serialization.spaceSep [
-        encodeInclusiveOrExpression left,
-        (Serialization.cst "|"),
-        (encodeExclusiveOrExpression right)])
-
--- | Convert a bitwise xor operation to an expression
-encodeBitwiseXorOperation :: Syntax.BitwiseXorOperation -> Ast.Expr
-encodeBitwiseXorOperation op =
-
-      let left = Syntax.bitwiseXorOperationLeft op
-          right = Syntax.bitwiseXorOperationRight op
-      in (Serialization.spaceSep [
-        encodeExclusiveOrExpression left,
-        (Serialization.cst "^"),
-        (encodeAndExpression right)])
-
--- | Convert a boolean literal to an expression
-encodeBooleanLiteral :: Syntax.BooleanLiteral -> Ast.Expr
-encodeBooleanLiteral bl = Logic.ifElse (Syntax.unBooleanLiteral bl) (Serialization.cst "true") (Serialization.cst "false")
-
--- | Convert a capture to an expression
-encodeCapture :: Syntax.Capture -> Ast.Expr
-encodeCapture cap =
-
-      let name = Syntax.captureName cap
-          byRef = Syntax.captureByReference cap
-      in (Logic.ifElse byRef (Serialization.cst (Strings.cat2 "&" name)) (Serialization.cst name))
-
--- | Convert a capture list to an expression
-encodeCaptureList :: Syntax.CaptureList -> Ast.Expr
-encodeCaptureList cl =
-    case cl of
-      Syntax.CaptureListCaptureByValue -> Serialization.cst "[=]"
-      Syntax.CaptureListCaptures v0 -> Serialization.bracketList Serialization.inlineStyle (Lists.map encodeCapture v0)
-
--- | Convert a case statement to an expression
-encodeCaseStatement :: Syntax.CaseStatement -> Ast.Expr
-encodeCaseStatement stmt =
-    case stmt of
-      Syntax.CaseStatementCase v0 -> encodeCaseValue v0
-      Syntax.CaseStatementDefault v0 -> Serialization.spaceSep [
-        Serialization.cst "default:",
-        (encodeStatement v0)]
-
--- | Convert a case value to an expression
-encodeCaseValue :: Syntax.CaseValue -> Ast.Expr
-encodeCaseValue cv =
-
-      let value = Syntax.caseValueValue cv
-          statement = Syntax.caseValueStatement cv
-      in (Serialization.spaceSep [
-        Serialization.cst "case",
-        (Serialization.noSep [
-          encodeExpression value,
-          (Serialization.cst ":")]),
-        (encodeStatement statement)])
-
--- | Convert a class body to an expression
-encodeClassBody :: Bool -> Syntax.ClassBody -> Ast.Expr
-encodeClassBody commas cb =
-    Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Lists.map (encodeMemberSpecification commas) (Syntax.unClassBody cb)))
-
--- | Convert a class declaration to an expression
-encodeClassDeclaration :: Syntax.ClassDeclaration -> Ast.Expr
-encodeClassDeclaration cd =
-
-      let spec = Syntax.classDeclarationSpecifier cd
-          mbody = Syntax.classDeclarationBody cd
-          key = Syntax.classSpecifierKey spec
-          isEnum = Logic.or (Equality.equal key Syntax.ClassKeyEnum) (Equality.equal key Syntax.ClassKeyEnumClass)
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Just (encodeClassSpecifier spec),
-        (Maybes.map (\body -> encodeClassBody isEnum body) mbody)])))
-
--- | Convert a class key to an expression
-encodeClassKey :: Syntax.ClassKey -> Ast.Expr
-encodeClassKey k =
-    case k of
-      Syntax.ClassKeyClass -> Serialization.cst "class"
-      Syntax.ClassKeyEnum -> Serialization.cst "enum"
-      Syntax.ClassKeyEnumClass -> Serialization.cst "enum class"
-      Syntax.ClassKeyStruct -> Serialization.cst "struct"
-
--- | Convert a class specifier to an expression
-encodeClassSpecifier :: Syntax.ClassSpecifier -> Ast.Expr
-encodeClassSpecifier cs =
-
-      let key = Syntax.classSpecifierKey cs
-          name = Syntax.classSpecifierName cs
-          inheritance = Syntax.classSpecifierInheritance cs
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          encodeClassKey key,
-          (Serialization.cst name)],
-        (Logic.ifElse (Lists.null inheritance) [] [
-          Serialization.cst ":",
-          (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeBaseSpecifier inheritance))])]))
-
--- | Convert a comma expression to an expression
-encodeCommaExpression :: Syntax.CommaExpression -> Ast.Expr
-encodeCommaExpression ce =
-
-      let left = Syntax.commaExpressionLeft ce
-          right = Syntax.commaExpressionRight ce
-      in (Serialization.spaceSep [
-        encodeExpression left,
-        (Serialization.cst ","),
-        (encodeAssignmentExpression right)])
-
--- | Convert a comment to an expression
-encodeComment :: Syntax.Comment -> Ast.Expr
-encodeComment c =
-
-      let text = Syntax.commentText c
-          isMultiline = Syntax.commentIsMultiline c
-      in (Serialization.cst (toCppComments text isMultiline))
-
--- | Convert a compound statement to an expression
-encodeCompoundStatement :: Syntax.CompoundStatement -> Ast.Expr
-encodeCompoundStatement cs =
-    Serialization.curlyBracesList (Just "") Serialization.fullBlockStyle (Lists.map encodeStatement (Syntax.unCompoundStatement cs))
-
--- | Convert a conditional expression to an expression
-encodeConditionalExpression :: Syntax.ConditionalExpression -> Ast.Expr
-encodeConditionalExpression c =
-    case c of
-      Syntax.ConditionalExpressionLogicalOr v0 -> encodeLogicalOrExpression v0
-      Syntax.ConditionalExpressionTernary v0 -> encodeTernaryExpression v0
-
--- | Convert a constructor declaration to an expression
-encodeConstructorDeclaration :: Syntax.ConstructorDeclaration -> Ast.Expr
-encodeConstructorDeclaration cd =
-
-      let name = Syntax.constructorDeclarationName cd
-          params = Syntax.constructorDeclarationParameters cd
-          inits = Syntax.constructorDeclarationInitializers cd
-          body = Syntax.constructorDeclarationBody cd
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.noSep [
-          Serialization.cst name,
-          (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeParameter params)))]),
-        (Logic.ifElse (Lists.null inits) Nothing (Just (Serialization.spaceSep [
-          Serialization.cst ":",
-          (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeMemInitializer inits))]))),
-        (Just (encodeFunctionBody body))]))
-
--- | Convert a declaration to an expression
-encodeDeclaration :: Syntax.Declaration -> Ast.Expr
-encodeDeclaration d =
-    case d of
-      Syntax.DeclarationPreprocessor v0 -> encodePreprocessorDirective v0
-      Syntax.DeclarationClass v0 -> encodeClassDeclaration v0
-      Syntax.DeclarationFunction v0 -> encodeFunctionDeclaration v0
-      Syntax.DeclarationVariable v0 -> encodeVariableDeclaration False v0
-      Syntax.DeclarationTypedef v0 -> encodeTypedefDeclaration v0
-      Syntax.DeclarationNamespace v0 -> encodeNamespaceDeclaration v0
-      Syntax.DeclarationTemplate v0 -> encodeTemplateDeclaration v0
-
--- | Convert a define directive to an expression
-encodeDefineDirective :: Syntax.DefineDirective -> Ast.Expr
-encodeDefineDirective dd =
-
-      let name = Syntax.defineDirectiveName dd
-          params = Syntax.defineDirectiveParameters dd
-          replacement = Syntax.defineDirectiveReplacement dd
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "#define",
-          (Serialization.cst name)],
-        (Maybes.maybe [] (\ps -> [
-          Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map (\p -> Serialization.cst p) ps))]) params),
-        (Maybes.maybe [] (\r -> [
-          Serialization.cst r]) replacement)]))
-
--- | Convert a destructor declaration to an expression
-encodeDestructorDeclaration :: Syntax.DestructorDeclaration -> Ast.Expr
-encodeDestructorDeclaration dd =
-
-      let prefixSpecs = Syntax.destructorDeclarationPrefixSpecifiers dd
-          name = Syntax.destructorDeclarationName dd
-          suffixSpecs = Syntax.destructorDeclarationSuffixSpecifiers dd
-          body = Syntax.destructorDeclarationBody dd
-      in (Serialization.spaceSep (Lists.concat [
-        Lists.map encodeFunctionSpecifierPrefix prefixSpecs,
-        [
-          Serialization.noSep [
-            Serialization.cst (Strings.cat2 "~" name),
-            (Serialization.parens (Serialization.cst ""))]],
-        (Lists.map encodeFunctionSpecifierSuffix suffixSpecs),
-        [
-          encodeFunctionBody body]]))
-
--- | Convert a divide operation to an expression
-encodeDivideOperation :: Syntax.DivideOperation -> Ast.Expr
-encodeDivideOperation op =
-
-      let left = Syntax.divideOperationLeft op
-          right = Syntax.divideOperationRight op
-      in (Serialization.spaceSep [
-        encodeMultiplicativeExpression left,
-        (Serialization.cst "/"),
-        (encodeUnaryExpression right)])
-
--- | Convert a do statement to an expression
-encodeDoStatement :: Syntax.DoStatement -> Ast.Expr
-encodeDoStatement ds =
-
-      let body = Syntax.doStatementBody ds
-          cond = Syntax.doStatementCondition ds
-      in (Serialization.newlineSep [
-        Serialization.cst "do",
-        (encodeStatement body),
-        (Serialization.withSemi (Serialization.spaceSep [
-          Serialization.cst "while",
-          (Serialization.parens (encodeExpression cond))]))])
-
--- | Convert an elif directive to an expression
-encodeElifDirective :: Syntax.ElifDirective -> Ast.Expr
-encodeElifDirective ed =
-    Serialization.spaceSep [
-      Serialization.cst "#elif",
-      (Serialization.cst (Syntax.elifDirectiveCondition ed))]
-
--- | Convert an else directive to an expression
-encodeElseDirective :: t0 -> Ast.Expr
-encodeElseDirective ed = Serialization.cst "#else"
-
--- | Convert an endif directive to an expression
-encodeEndifDirective :: t0 -> Ast.Expr
-encodeEndifDirective ed = Serialization.cst "#endif"
-
--- | Convert an equal operation to an expression
-encodeEqualOperation :: Syntax.EqualOperation -> Ast.Expr
-encodeEqualOperation op =
-
-      let left = Syntax.equalOperationLeft op
-          right = Syntax.equalOperationRight op
-      in (Serialization.spaceSep [
-        encodeEqualityExpression left,
-        (Serialization.cst "=="),
-        (encodeRelationalExpression right)])
-
--- | Convert an equality expression to an expression
-encodeEqualityExpression :: Syntax.EqualityExpression -> Ast.Expr
-encodeEqualityExpression e =
-    case e of
-      Syntax.EqualityExpressionRelational v0 -> encodeRelationalExpression v0
-      Syntax.EqualityExpressionEqual v0 -> encodeEqualOperation v0
-      Syntax.EqualityExpressionNotEqual v0 -> encodeNotEqualOperation v0
-
--- | Convert an error directive to an expression
-encodeErrorDirective :: Syntax.ErrorDirective -> Ast.Expr
-encodeErrorDirective ed =
-    Serialization.spaceSep [
-      Serialization.cst "#error",
-      (Serialization.cst (Syntax.errorDirectiveMessage ed))]
-
--- | Convert an exclusive or expression to an expression
-encodeExclusiveOrExpression :: Syntax.ExclusiveOrExpression -> Ast.Expr
-encodeExclusiveOrExpression e =
-    case e of
-      Syntax.ExclusiveOrExpressionAnd v0 -> encodeAndExpression v0
-      Syntax.ExclusiveOrExpressionBitwiseXor v0 -> encodeBitwiseXorOperation v0
-
--- | Convert an explicit assignment to an expression
-encodeExplicitAssignment :: Syntax.ExplicitAssignment -> Ast.Expr
-encodeExplicitAssignment ea =
-
-      let left = Syntax.explicitAssignmentLeft ea
-          op = Syntax.explicitAssignmentOp ea
-          right = Syntax.explicitAssignmentRight ea
-      in (Serialization.spaceSep [
-        encodeLogicalOrExpression left,
-        (encodeAssignmentOperator op),
-        (encodeAssignmentExpression right)])
-
--- | Convert an expression to an expression
-encodeExpression :: Syntax.Expression -> Ast.Expr
-encodeExpression e =
-    case e of
-      Syntax.ExpressionAssignment v0 -> encodeAssignmentExpression v0
-      Syntax.ExpressionComma v0 -> encodeCommaExpression v0
-
--- | Convert a for-init to an expression
-encodeForInit :: Syntax.ForInit -> Ast.Expr
-encodeForInit i =
-    case i of
-      Syntax.ForInitExpression v0 -> encodeExpression v0
-      Syntax.ForInitDeclaration v0 -> encodeVariableDeclaration False v0
-      Syntax.ForInitEmpty -> Serialization.cst ""
-
--- | Convert a for statement to an expression
-encodeForStatement :: Syntax.ForStatement -> Ast.Expr
-encodeForStatement fs =
-
-      let init = Syntax.forStatementInit fs
-          cond = Syntax.forStatementCondition fs
-          inc = Syntax.forStatementIncrement fs
-          body = Syntax.forStatementBody fs
-      in (Serialization.newlineSep [
-        Serialization.spaceSep [
-          Serialization.cst "for",
-          (Serialization.parens (Serialization.noSep [
-            encodeForInit init,
-            (Serialization.cst ";"),
-            (encodeExpression cond),
-            (Serialization.cst ";"),
-            (encodeExpression inc)]))],
-        (encodeStatement body)])
-
--- | Convert a function application to an expression
-encodeFunctionApplication :: Syntax.FunctionApplication -> Ast.Expr
-encodeFunctionApplication fa =
-
-      let func = Syntax.functionApplicationFunction fa
-          args = Syntax.functionApplicationArguments fa
-      in (Serialization.spaceSep [
-        encodeFunctionIdentifier func,
-        (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeExpression args)))])
-
--- | Convert a function body to an expression
-encodeFunctionBody :: Syntax.FunctionBody -> Ast.Expr
-encodeFunctionBody b =
-    case b of
-      Syntax.FunctionBodyCompound v0 -> encodeCompoundStatement v0
-      Syntax.FunctionBodyDeclaration -> Serialization.cst ";"
-      Syntax.FunctionBodyPure -> Serialization.withSemi (Serialization.cst "= 0")
-      Syntax.FunctionBodyDefault -> Serialization.withSemi (Serialization.cst "= default")
-
--- | Convert a function call operation to an expression
-encodeFunctionCallOperation :: Syntax.FunctionCallOperation -> Ast.Expr
-encodeFunctionCallOperation fco =
-
-      let func = Syntax.functionCallOperationFunction fco
-          args = Syntax.functionCallOperationArguments fco
-      in (Serialization.noSep [
-        encodePostfixExpression func,
-        (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeExpression args)))])
-
--- | Convert a function declaration to an expression
-encodeFunctionDeclaration :: Syntax.FunctionDeclaration -> Ast.Expr
-encodeFunctionDeclaration fd =
-
-      let prefixSpecs = Syntax.functionDeclarationPrefixSpecifiers fd
-          retType = Syntax.functionDeclarationReturnType fd
-          name = Syntax.functionDeclarationName fd
-          params = Syntax.functionDeclarationParameters fd
-          suffixSpecs = Syntax.functionDeclarationSuffixSpecifiers fd
-          body = Syntax.functionDeclarationBody fd
-      in (Serialization.spaceSep (Lists.concat [
-        Lists.map encodeFunctionSpecifierPrefix prefixSpecs,
-        [
-          encodeTypeExpression retType,
-          (Serialization.noSep [
-            Serialization.cst name,
-            (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeParameter params)))])],
-        (Lists.map encodeFunctionSpecifierSuffix suffixSpecs),
-        [
-          encodeFunctionBody body]]))
-
--- | Convert a function identifier to an expression
-encodeFunctionIdentifier :: Syntax.FunctionIdentifier -> Ast.Expr
-encodeFunctionIdentifier f =
-    case f of
-      Syntax.FunctionIdentifierSimple v0 -> Serialization.cst v0
-      Syntax.FunctionIdentifierQualified v0 -> encodeQualifiedIdentifier v0
-
--- | Convert a function specifier prefix to an expression
-encodeFunctionSpecifierPrefix :: Syntax.FunctionSpecifierPrefix -> Ast.Expr
-encodeFunctionSpecifierPrefix s =
-    case s of
-      Syntax.FunctionSpecifierPrefixInline -> Serialization.cst "inline"
-      Syntax.FunctionSpecifierPrefixVirtual -> Serialization.cst "virtual"
-      Syntax.FunctionSpecifierPrefixStatic -> Serialization.cst "static"
-      Syntax.FunctionSpecifierPrefixExplicit -> Serialization.cst "explicit"
-
--- | Convert a function specifier suffix to an expression
-encodeFunctionSpecifierSuffix :: Syntax.FunctionSpecifierSuffix -> Ast.Expr
-encodeFunctionSpecifierSuffix s =
-    case s of
-      Syntax.FunctionSpecifierSuffixConst -> Serialization.cst "const"
-      Syntax.FunctionSpecifierSuffixNoexcept -> Serialization.cst "noexcept"
-      Syntax.FunctionSpecifierSuffixOverride -> Serialization.cst "override"
-      Syntax.FunctionSpecifierSuffixFinal -> Serialization.cst "final"
-
--- | Convert a function type to an expression
-encodeFunctionType :: Syntax.FunctionType -> Ast.Expr
-encodeFunctionType ft =
-
-      let retType = Syntax.functionTypeReturnType ft
-          params = Syntax.functionTypeParameters ft
-      in (Serialization.spaceSep [
-        encodeTypeExpression retType,
-        (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeParameter params)))])
-
--- | Convert a greater-than-or-equal operation to an expression
-encodeGreaterEqualOperation :: Syntax.GreaterEqualOperation -> Ast.Expr
-encodeGreaterEqualOperation op =
-
-      let left = Syntax.greaterEqualOperationLeft op
-          right = Syntax.greaterEqualOperationRight op
-      in (Serialization.spaceSep [
-        encodeRelationalExpression left,
-        (Serialization.cst ">="),
-        (encodeShiftExpression right)])
-
--- | Convert a greater-than operation to an expression
-encodeGreaterOperation :: Syntax.GreaterOperation -> Ast.Expr
-encodeGreaterOperation op =
-
-      let left = Syntax.greaterOperationLeft op
-          right = Syntax.greaterOperationRight op
-      in (Serialization.spaceSep [
-        encodeRelationalExpression left,
-        (Serialization.cst ">"),
-        (encodeShiftExpression right)])
-
--- | Convert an if directive to an expression
-encodeIfDirective :: Syntax.IfDirective -> Ast.Expr
-encodeIfDirective ifd =
-    Serialization.spaceSep [
-      Serialization.cst "#if",
-      (Serialization.cst (Syntax.ifDirectiveCondition ifd))]
-
--- | Convert an ifdef directive to an expression
-encodeIfdefDirective :: Syntax.IfdefDirective -> Ast.Expr
-encodeIfdefDirective id =
-    Serialization.spaceSep [
-      Serialization.cst "#ifdef",
-      (Serialization.cst (Syntax.ifdefDirectiveIdentifier id))]
-
--- | Convert an ifndef directive to an expression
-encodeIfndefDirective :: Syntax.IfndefDirective -> Ast.Expr
-encodeIfndefDirective ind =
-    Serialization.spaceSep [
-      Serialization.cst "#ifndef",
-      (Serialization.cst (Syntax.ifndefDirectiveIdentifier ind))]
-
--- | Convert an include directive to an expression
-encodeIncludeDirective :: Syntax.IncludeDirective -> Ast.Expr
-encodeIncludeDirective incl =
-
-      let name = Syntax.includeDirectiveName incl
-          isSystem = Syntax.includeDirectiveIsSystem incl
-      in (Logic.ifElse isSystem (Serialization.cst (Strings.cat [
-        "#include <",
-        name,
-        ">"])) (Serialization.cst (Strings.cat [
-        "#include \"",
-        name,
-        "\""])))
-
--- | Convert an inclusive or expression to an expression
-encodeInclusiveOrExpression :: Syntax.InclusiveOrExpression -> Ast.Expr
-encodeInclusiveOrExpression e =
-    case e of
-      Syntax.InclusiveOrExpressionExclusiveOr v0 -> encodeExclusiveOrExpression v0
-      Syntax.InclusiveOrExpressionBitwiseOr v0 -> encodeBitwiseOrOperation v0
-
--- | Convert an integer literal to an expression
-encodeIntegerLiteral :: Syntax.IntegerLiteral -> Ast.Expr
-encodeIntegerLiteral i =
-    case i of
-      Syntax.IntegerLiteralDecimal v0 -> Serialization.cst (Literals.showBigint v0)
-      Syntax.IntegerLiteralHexadecimal v0 -> Serialization.cst (Strings.cat2 "0x" v0)
-      Syntax.IntegerLiteralOctal v0 -> Serialization.cst (Strings.cat2 "0" v0)
-      Syntax.IntegerLiteralBinary v0 -> Serialization.cst (Strings.cat2 "0b" v0)
-
--- | Convert an iteration statement to an expression
-encodeIterationStatement :: Syntax.IterationStatement -> Ast.Expr
-encodeIterationStatement i =
-    case i of
-      Syntax.IterationStatementWhile v0 -> encodeWhileStatement v0
-      Syntax.IterationStatementDo v0 -> encodeDoStatement v0
-      Syntax.IterationStatementFor v0 -> encodeForStatement v0
-      Syntax.IterationStatementRangeFor v0 -> encodeRangeForStatement v0
-
--- | Convert a jump statement to an expression
-encodeJumpStatement :: Syntax.JumpStatement -> Ast.Expr
-encodeJumpStatement j =
-    case j of
-      Syntax.JumpStatementBreak -> Serialization.withSemi (Serialization.cst "break")
-      Syntax.JumpStatementContinue -> Serialization.withSemi (Serialization.cst "continue")
-      Syntax.JumpStatementReturnValue v0 -> Serialization.withSemi (Serialization.spaceSep [
-        Serialization.cst "return",
-        (encodeExpression v0)])
-      Syntax.JumpStatementReturnVoid -> Serialization.withSemi (Serialization.cst "return")
-      Syntax.JumpStatementThrow v0 -> Serialization.withSemi (Serialization.spaceSep [
-        Serialization.cst "throw",
-        (encodeExpression v0)])
-
--- | Convert a labeled statement to an expression
-encodeLabeledStatement :: Syntax.LabeledStatement -> Ast.Expr
-encodeLabeledStatement ls =
-
-      let label = Syntax.labeledStatementLabel ls
-          stmt = Syntax.labeledStatementStatement ls
-      in (Serialization.newlineSep [
-        Serialization.cst (Strings.cat2 label ":"),
-        (encodeStatement stmt)])
-
--- | Convert a lambda expression to an expression
-encodeLambdaExpression :: Syntax.LambdaExpression -> Ast.Expr
-encodeLambdaExpression le =
-
-      let captures = Syntax.lambdaExpressionCaptures le
-          params = Syntax.lambdaExpressionParameters le
-          retType = Syntax.lambdaExpressionReturnType le
-          body = Syntax.lambdaExpressionBody le
-      in (Serialization.spaceSep [
-        encodeCaptureList captures,
-        (Logic.ifElse (Lists.null params) (Serialization.parens (Serialization.cst "")) (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeParameter params)))),
-        (Maybes.maybe (Serialization.cst "") (\t -> Serialization.spaceSep [
-          Serialization.cst "->",
-          (encodeTypeExpression t)]) retType),
-        (encodeCompoundStatement body)])
-
--- | Convert a left shift operation to an expression
-encodeLeftShiftOperation :: Syntax.LeftShiftOperation -> Ast.Expr
-encodeLeftShiftOperation op =
-
-      let left = Syntax.leftShiftOperationLeft op
-          right = Syntax.leftShiftOperationRight op
-      in (Serialization.spaceSep [
-        encodeShiftExpression left,
-        (Serialization.cst "<<"),
-        (encodeAdditiveExpression right)])
-
--- | Convert a less-than-or-equal operation to an expression
-encodeLessEqualOperation :: Syntax.LessEqualOperation -> Ast.Expr
-encodeLessEqualOperation op =
-
-      let left = Syntax.lessEqualOperationLeft op
-          right = Syntax.lessEqualOperationRight op
-      in (Serialization.spaceSep [
-        encodeRelationalExpression left,
-        (Serialization.cst "<="),
-        (encodeShiftExpression right)])
-
--- | Convert a less-than operation to an expression
-encodeLessOperation :: Syntax.LessOperation -> Ast.Expr
-encodeLessOperation op =
-
-      let left = Syntax.lessOperationLeft op
-          right = Syntax.lessOperationRight op
-      in (Serialization.spaceSep [
-        encodeRelationalExpression left,
-        (Serialization.cst "<"),
-        (encodeShiftExpression right)])
-
--- | Convert a line directive to an expression
-encodeLineDirective :: Syntax.LineDirective -> Ast.Expr
-encodeLineDirective ld =
-
-      let lineNumber = Syntax.lineDirectiveLineNumber ld
-          filename = Syntax.lineDirectiveFilename ld
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "#line",
-          (Serialization.cst (Literals.showInt32 lineNumber))],
-        (Maybes.maybe [] (\f -> [
-          Serialization.cst (Strings.cat [
-            "\"",
-            f,
-            "\""])]) filename)]))
-
--- | Convert a literal to an expression
-encodeLiteral :: Syntax.Literal -> Ast.Expr
-encodeLiteral l =
-    case l of
-      Syntax.LiteralInteger v0 -> encodeIntegerLiteral v0
-      Syntax.LiteralFloating v0 -> Serialization.cst (Literals.showBigfloat (Syntax.unFloatingLiteral v0))
-      Syntax.LiteralCharacter v0 -> Serialization.cst (Strings.cat [
-        "'",
-        (Syntax.unCharacterLiteral v0),
-        "'"])
-      Syntax.LiteralString v0 -> Serialization.cst (Strings.cat [
-        "\"",
-        (Syntax.unStringLiteral v0),
-        "\""])
-      Syntax.LiteralBoolean v0 -> encodeBooleanLiteral v0
-      Syntax.LiteralNull -> Serialization.cst "nullptr"
-
--- | Convert a logical and expression to an expression
-encodeLogicalAndExpression :: Syntax.LogicalAndExpression -> Ast.Expr
-encodeLogicalAndExpression e =
-    case e of
-      Syntax.LogicalAndExpressionInclusiveOr v0 -> encodeInclusiveOrExpression v0
-      Syntax.LogicalAndExpressionLogicalAnd v0 -> encodeLogicalAndOperation v0
-
--- | Convert a logical and operation to an expression
-encodeLogicalAndOperation :: Syntax.LogicalAndOperation -> Ast.Expr
-encodeLogicalAndOperation op =
-
-      let left = Syntax.logicalAndOperationLeft op
-          right = Syntax.logicalAndOperationRight op
-      in (Serialization.spaceSep [
-        encodeLogicalAndExpression left,
-        (Serialization.cst "&&"),
-        (encodeInclusiveOrExpression right)])
-
--- | Convert a logical or expression to an expression
-encodeLogicalOrExpression :: Syntax.LogicalOrExpression -> Ast.Expr
-encodeLogicalOrExpression e =
-    case e of
-      Syntax.LogicalOrExpressionLogicalAnd v0 -> encodeLogicalAndExpression v0
-      Syntax.LogicalOrExpressionLogicalOr v0 -> encodeLogicalOrOperation v0
-
--- | Convert a logical or operation to an expression
-encodeLogicalOrOperation :: Syntax.LogicalOrOperation -> Ast.Expr
-encodeLogicalOrOperation op =
-
-      let left = Syntax.logicalOrOperationLeft op
-          right = Syntax.logicalOrOperationRight op
-      in (Serialization.spaceSep [
-        encodeLogicalOrExpression left,
-        (Serialization.cst "||"),
-        (encodeLogicalAndExpression right)])
-
--- | Convert a map to an expression
-encodeMap :: Syntax.Map -> Ast.Expr
-encodeMap m =
-
-      let keyType = Syntax.mapKeyType m
-          valType = Syntax.mapValueType m
-          entries = Syntax.mapEntries m
-      in (Serialization.spaceSep [
-        Serialization.cst "std::map<",
-        (Serialization.commaSep Serialization.inlineStyle [
-          encodeTypeExpression keyType,
-          (encodeTypeExpression valType)]),
-        (Serialization.cst ">"),
-        (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map encodeMapEntry entries))])
-
--- | Convert a map entry to an expression
-encodeMapEntry :: Syntax.MapEntry -> Ast.Expr
-encodeMapEntry me =
-
-      let key = Syntax.mapEntryKey me
-          val = Syntax.mapEntryValue me
-      in (Serialization.spaceSep [
-        Serialization.curlyBracesList Nothing Serialization.inlineStyle [
-          encodeExpression key],
-        (Serialization.cst "->"),
-        (encodeExpression val)])
-
--- | Convert a member initializer to an expression
-encodeMemInitializer :: Syntax.MemInitializer -> Ast.Expr
-encodeMemInitializer mi =
-
-      let name = Syntax.memInitializerName mi
-          args = Syntax.memInitializerArguments mi
-      in (Serialization.noSep [
-        Serialization.cst name,
-        (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeExpression args)))])
-
--- | Convert a member access operation to an expression
-encodeMemberAccessOperation :: Syntax.MemberAccessOperation -> Ast.Expr
-encodeMemberAccessOperation mao =
-
-      let obj = Syntax.memberAccessOperationObject mao
-          member = Syntax.memberAccessOperationMember mao
-      in (Serialization.noSep [
-        encodePostfixExpression obj,
-        (Serialization.cst "."),
-        (Serialization.cst member)])
-
--- | Convert a member declaration to an expression
-encodeMemberDeclaration :: Bool -> Syntax.MemberDeclaration -> Ast.Expr
-encodeMemberDeclaration commas m =
-    case m of
-      Syntax.MemberDeclarationFunction v0 -> encodeFunctionDeclaration v0
-      Syntax.MemberDeclarationVariable v0 -> encodeVariableDeclaration commas v0
-      Syntax.MemberDeclarationConstructor v0 -> encodeConstructorDeclaration v0
-      Syntax.MemberDeclarationDestructor v0 -> encodeDestructorDeclaration v0
-      Syntax.MemberDeclarationNestedClass v0 -> encodeClassDeclaration v0
-      Syntax.MemberDeclarationTemplate v0 -> encodeTemplateDeclaration v0
-
--- | Convert a member specification to an expression
-encodeMemberSpecification :: Bool -> Syntax.MemberSpecification -> Ast.Expr
-encodeMemberSpecification commas m =
-    case m of
-      Syntax.MemberSpecificationAccessLabel v0 -> Serialization.noSep [
-        encodeAccessSpecifier v0,
-        (Serialization.cst ":")]
-      Syntax.MemberSpecificationMember v0 -> encodeMemberDeclaration commas v0
-
--- | Convert a modulo operation to an expression
-encodeModuloOperation :: Syntax.ModuloOperation -> Ast.Expr
-encodeModuloOperation op =
-
-      let left = Syntax.moduloOperationLeft op
-          right = Syntax.moduloOperationRight op
-      in (Serialization.spaceSep [
-        encodeMultiplicativeExpression left,
-        (Serialization.cst "%"),
-        (encodeUnaryExpression right)])
-
--- | Convert a multiplicative expression to an expression
-encodeMultiplicativeExpression :: Syntax.MultiplicativeExpression -> Ast.Expr
-encodeMultiplicativeExpression e =
-    case e of
-      Syntax.MultiplicativeExpressionUnary v0 -> encodeUnaryExpression v0
-      Syntax.MultiplicativeExpressionMultiply v0 -> encodeMultiplyOperation v0
-      Syntax.MultiplicativeExpressionDivide v0 -> encodeDivideOperation v0
-      Syntax.MultiplicativeExpressionModulo v0 -> encodeModuloOperation v0
-
--- | Convert a multiply operation to an expression
-encodeMultiplyOperation :: Syntax.MultiplyOperation -> Ast.Expr
-encodeMultiplyOperation op =
-
-      let left = Syntax.multiplyOperationLeft op
-          right = Syntax.multiplyOperationRight op
-      in (Serialization.spaceSep [
-        encodeMultiplicativeExpression left,
-        (Serialization.cst "*"),
-        (encodeUnaryExpression right)])
-
--- | Convert a namespace declaration to an expression
-encodeNamespaceDeclaration :: Syntax.NamespaceDeclaration -> Ast.Expr
-encodeNamespaceDeclaration nd =
-
-      let name = Syntax.namespaceDeclarationName nd
-          decls = Syntax.namespaceDeclarationDeclarations nd
-      in (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 "namespace " name),
-        (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Lists.map encodeDeclaration decls)))])
-
--- | Convert a not-equal operation to an expression
-encodeNotEqualOperation :: Syntax.NotEqualOperation -> Ast.Expr
-encodeNotEqualOperation op =
-
-      let left = Syntax.notEqualOperationLeft op
-          right = Syntax.notEqualOperationRight op
-      in (Serialization.spaceSep [
-        encodeEqualityExpression left,
-        (Serialization.cst "!="),
-        (encodeRelationalExpression right)])
-
--- | Convert an optional to an expression
-encodeOptional :: Syntax.Optional -> Ast.Expr
-encodeOptional opt =
-
-      let valType = Syntax.optionalValueType opt
-          val = Syntax.optionalValue opt
-      in (Serialization.spaceSep [
-        Serialization.cst "std::optional<",
-        (encodeTypeExpression valType),
-        (Serialization.cst ">"),
-        (Maybes.maybe (Serialization.cst "{}") (\v -> Serialization.curlyBracesList Nothing Serialization.inlineStyle [
-          encodeExpression v]) val)])
-
--- | Convert overloaded lambdas to an expression
-encodeOverloadedLambdas :: Syntax.OverloadedLambdas -> Ast.Expr
-encodeOverloadedLambdas ol =
-    Serialization.spaceSep [
-      Serialization.cst "overloaded",
-      (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map encodeLambdaExpression (Syntax.unOverloadedLambdas ol))))]
-
--- | Convert a parameter to an expression
-encodeParameter :: Syntax.Parameter -> Ast.Expr
-encodeParameter p =
-
-      let typ = Syntax.parameterType p
-          name = Syntax.parameterName p
-          unnamed = Syntax.parameterUnnamed p
-          defaultVal = Syntax.parameterDefaultValue p
-          nameExpr =
-                  Serialization.cst (Logic.ifElse unnamed (Strings.cat [
-                    "/*",
-                    name,
-                    "*/"]) name)
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          encodeTypeExpression typ,
-          nameExpr],
-        (Maybes.maybe [] (\expr -> [
-          Serialization.cst "=",
-          (encodeExpression expr)]) defaultVal)]))
-
--- | Convert a pattern match to an expression
-encodePatternMatch :: Syntax.PatternMatch -> Ast.Expr
-encodePatternMatch pm =
-
-      let visitor = Syntax.patternMatchVisitor pm
-          variant = Syntax.patternMatchVariant pm
-      in (Serialization.spaceSep [
-        Serialization.cst "std::visit",
-        (Serialization.parens (Serialization.commaSep Serialization.inlineStyle [
-          encodeVisitor visitor,
-          (encodeExpression variant)]))])
-
--- | Convert a pointer member access operation to an expression
-encodePointerMemberAccessOperation :: Syntax.PointerMemberAccessOperation -> Ast.Expr
-encodePointerMemberAccessOperation pmao =
-
-      let ptr = Syntax.pointerMemberAccessOperationPointer pmao
-          member = Syntax.pointerMemberAccessOperationMember pmao
-      in (Serialization.noSep [
-        encodePostfixExpression ptr,
-        (Serialization.cst "->"),
-        (Serialization.cst member)])
-
--- | Convert a postfix expression to an expression
-encodePostfixExpression :: Syntax.PostfixExpression -> Ast.Expr
-encodePostfixExpression e =
-    case e of
-      Syntax.PostfixExpressionPrimary v0 -> encodePrimaryExpression v0
-      Syntax.PostfixExpressionSubscript v0 -> encodeSubscriptOperation v0
-      Syntax.PostfixExpressionFunctionCall v0 -> encodeFunctionCallOperation v0
-      Syntax.PostfixExpressionTemplateFunctionCall v0 -> encodeTemplateFunctionCallOperation v0
-      Syntax.PostfixExpressionMemberAccess v0 -> encodeMemberAccessOperation v0
-      Syntax.PostfixExpressionPointerMemberAccess v0 -> encodePointerMemberAccessOperation v0
-      Syntax.PostfixExpressionPostIncrement v0 -> Serialization.noSep [
-        encodePostfixExpression v0,
-        (Serialization.cst "++")]
-      Syntax.PostfixExpressionPostDecrement v0 -> Serialization.noSep [
-        encodePostfixExpression v0,
-        (Serialization.cst "--")]
-
--- | Convert a pragma directive to an expression
-encodePragmaDirective :: Syntax.PragmaDirective -> Ast.Expr
-encodePragmaDirective pd = Serialization.cst (Strings.cat2 "#pragma " (Syntax.pragmaDirectiveContent pd))
-
--- | Convert a preprocessor directive to an expression
-encodePreprocessorDirective :: Syntax.PreprocessorDirective -> Ast.Expr
-encodePreprocessorDirective d =
-    case d of
-      Syntax.PreprocessorDirectiveInclude v0 -> encodeIncludeDirective v0
-      Syntax.PreprocessorDirectivePragma v0 -> encodePragmaDirective v0
-      Syntax.PreprocessorDirectiveDefine v0 -> encodeDefineDirective v0
-      Syntax.PreprocessorDirectiveUndef v0 -> encodeUndefDirective v0
-      Syntax.PreprocessorDirectiveIfdef v0 -> encodeIfdefDirective v0
-      Syntax.PreprocessorDirectiveIfndef v0 -> encodeIfndefDirective v0
-      Syntax.PreprocessorDirectiveIf v0 -> encodeIfDirective v0
-      Syntax.PreprocessorDirectiveElif v0 -> encodeElifDirective v0
-      Syntax.PreprocessorDirectiveElse v0 -> encodeElseDirective v0
-      Syntax.PreprocessorDirectiveEndif v0 -> encodeEndifDirective v0
-      Syntax.PreprocessorDirectiveLine v0 -> encodeLineDirective v0
-      Syntax.PreprocessorDirectiveError v0 -> encodeErrorDirective v0
-      Syntax.PreprocessorDirectiveWarning v0 -> encodeWarningDirective v0
-
--- | Convert a primary expression to an expression
-encodePrimaryExpression :: Syntax.PrimaryExpression -> Ast.Expr
-encodePrimaryExpression e =
-    case e of
-      Syntax.PrimaryExpressionIdentifier v0 -> Serialization.cst v0
-      Syntax.PrimaryExpressionLiteral v0 -> encodeLiteral v0
-      Syntax.PrimaryExpressionParenthesized v0 -> Serialization.parens (encodeExpression v0)
-      Syntax.PrimaryExpressionLambda v0 -> encodeLambdaExpression v0
-
--- | Convert a program to an expression
-encodeProgram :: Syntax.Program -> Ast.Expr
-encodeProgram prog =
-
-      let preps = Syntax.programPreprocessorDirectives prog
-          includes = Syntax.programIncludes prog
-          decls = Syntax.programDeclarations prog
-          separate = \sep -> \defs -> Logic.ifElse (Lists.null defs) Nothing (Just (sep defs))
-      in (Serialization.doubleNewlineSep (Maybes.cat [
-        separate Serialization.newlineSep (Lists.map encodePreprocessorDirective preps),
-        (separate Serialization.newlineSep (Lists.map encodeIncludeDirective includes)),
-        (separate Serialization.doubleNewlineSep (Lists.map encodeDeclaration decls))]))
-
--- | Convert a qualified identifier to an expression
-encodeQualifiedIdentifier :: Syntax.QualifiedIdentifier -> Ast.Expr
-encodeQualifiedIdentifier qi =
-
-      let ns = Syntax.qualifiedIdentifierNamespace qi
-          name = Syntax.qualifiedIdentifierName qi
-      in (Serialization.cst (Strings.cat [
-        ns,
-        "::",
-        name]))
-
--- | Convert a qualified type to an expression
-encodeQualifiedType :: Syntax.QualifiedType -> Ast.Expr
-encodeQualifiedType qt =
-
-      let baseType = Syntax.qualifiedTypeBaseType qt
-          qualifier = Syntax.qualifiedTypeQualifier qt
-      in case qualifier of
-        Syntax.TypeQualifierConst -> Serialization.spaceSep [
-          Serialization.cst "const",
-          (encodeTypeExpression baseType)]
-        Syntax.TypeQualifierLvalueRef -> Serialization.noSep [
-          encodeTypeExpression baseType,
-          (Serialization.cst "&")]
-        Syntax.TypeQualifierRvalueRef -> Serialization.noSep [
-          encodeTypeExpression baseType,
-          (Serialization.cst "&&")]
-        Syntax.TypeQualifierPointer -> Serialization.noSep [
-          encodeTypeExpression baseType,
-          (Serialization.cst "*")]
-
--- | Convert a range-for statement to an expression
-encodeRangeForStatement :: Syntax.RangeForStatement -> Ast.Expr
-encodeRangeForStatement rfs =
-
-      let typ = Syntax.rangeForStatementType rfs
-          var = Syntax.rangeForStatementVariable rfs
-          range = Syntax.rangeForStatementRange rfs
-          body = Syntax.rangeForStatementBody rfs
-      in (Serialization.newlineSep [
-        Serialization.spaceSep [
-          Serialization.cst "for",
-          (Serialization.parens (Serialization.spaceSep [
-            encodeTypeExpression typ,
-            (Serialization.cst var),
-            (Serialization.cst ":"),
-            (encodeExpression range)]))],
-        (encodeStatement body)])
-
--- | Convert a relational expression to an expression
-encodeRelationalExpression :: Syntax.RelationalExpression -> Ast.Expr
-encodeRelationalExpression e =
-    case e of
-      Syntax.RelationalExpressionShift v0 -> encodeShiftExpression v0
-      Syntax.RelationalExpressionLess v0 -> encodeLessOperation v0
-      Syntax.RelationalExpressionGreater v0 -> encodeGreaterOperation v0
-      Syntax.RelationalExpressionLessEqual v0 -> encodeLessEqualOperation v0
-      Syntax.RelationalExpressionGreaterEqual v0 -> encodeGreaterEqualOperation v0
-
--- | Convert a right shift operation to an expression
-encodeRightShiftOperation :: Syntax.RightShiftOperation -> Ast.Expr
-encodeRightShiftOperation op =
-
-      let left = Syntax.rightShiftOperationLeft op
-          right = Syntax.rightShiftOperationRight op
-      in (Serialization.spaceSep [
-        encodeShiftExpression left,
-        (Serialization.cst ">>"),
-        (encodeAdditiveExpression right)])
-
--- | Convert a selection statement to an expression
-encodeSelectionStatement :: Syntax.SelectionStatement -> Ast.Expr
-encodeSelectionStatement ss =
-
-      let cond = Syntax.selectionStatementCondition ss
-          thenBranch = Syntax.selectionStatementThenBranch ss
-          elseBranch = Syntax.selectionStatementElseBranch ss
-      in (Serialization.newlineSep [
-        Serialization.spaceSep [
-          Serialization.cst "if",
-          (Serialization.parens (encodeExpression cond))],
-        (encodeStatement thenBranch),
-        (Maybes.maybe (Serialization.cst "") (\stmt -> Serialization.newlineSep [
-          Serialization.cst "else",
-          (encodeStatement stmt)]) elseBranch)])
-
--- | Convert a set to an expression
-encodeSet :: Syntax.Set -> Ast.Expr
-encodeSet s =
-
-      let elemType = Syntax.setElementType s
-          elems = Syntax.setElements s
-      in (Serialization.spaceSep [
-        Serialization.cst "std::set<",
-        (encodeTypeExpression elemType),
-        (Serialization.cst ">"),
-        (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map encodeExpression elems))])
-
--- | Convert a shift expression to an expression
-encodeShiftExpression :: Syntax.ShiftExpression -> Ast.Expr
-encodeShiftExpression e =
-    case e of
-      Syntax.ShiftExpressionAdditive v0 -> encodeAdditiveExpression v0
-      Syntax.ShiftExpressionLeftShift v0 -> encodeLeftShiftOperation v0
-      Syntax.ShiftExpressionRightShift v0 -> encodeRightShiftOperation v0
-
--- | Convert a sizeof expression to an expression
-encodeSizeofExpression :: Syntax.SizeofExpression -> Ast.Expr
-encodeSizeofExpression se =
-    Serialization.spaceSep [
-      Serialization.cst "sizeof",
-      (Serialization.parens (encodeTypeExpression (Syntax.unSizeofExpression se)))]
-
--- | Convert a statement to an expression
-encodeStatement :: Syntax.Statement -> Ast.Expr
-encodeStatement s =
-    case s of
-      Syntax.StatementLabeled v0 -> encodeLabeledStatement v0
-      Syntax.StatementCompound v0 -> encodeCompoundStatement v0
-      Syntax.StatementSelection v0 -> encodeSelectionStatement v0
-      Syntax.StatementSwitch v0 -> encodeSwitchStatement v0
-      Syntax.StatementIteration v0 -> encodeIterationStatement v0
-      Syntax.StatementJump v0 -> encodeJumpStatement v0
-      Syntax.StatementDeclaration v0 -> Serialization.withSemi (encodeVariableDeclaration False v0)
-      Syntax.StatementExpression v0 -> Serialization.withSemi (encodeExpression v0)
-
--- | Convert a subscript operation to an expression
-encodeSubscriptOperation :: Syntax.SubscriptOperation -> Ast.Expr
-encodeSubscriptOperation so =
-
-      let array = Syntax.subscriptOperationArray so
-          index = Syntax.subscriptOperationIndex so
-      in (Serialization.noSep [
-        encodePostfixExpression array,
-        (Serialization.cst "["),
-        (encodeExpression index),
-        (Serialization.cst "]")])
-
--- | Convert a subtract operation to an expression
-encodeSubtractOperation :: Syntax.SubtractOperation -> Ast.Expr
-encodeSubtractOperation op =
-
-      let left = Syntax.subtractOperationLeft op
-          right = Syntax.subtractOperationRight op
-      in (Serialization.spaceSep [
-        encodeAdditiveExpression left,
-        (Serialization.cst "-"),
-        (encodeMultiplicativeExpression right)])
-
--- | Convert a switch statement to an expression
-encodeSwitchStatement :: Syntax.SwitchStatement -> Ast.Expr
-encodeSwitchStatement ss =
-
-      let value = Syntax.switchStatementValue ss
-          cases = Syntax.switchStatementCases ss
-      in (Serialization.spaceSep [
-        Serialization.cst "switch",
-        (Serialization.parens (encodeExpression value)),
-        (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map encodeCaseStatement cases)))])
-
--- | Convert a template argument to an expression
-encodeTemplateArgument :: Syntax.TemplateArgument -> Ast.Expr
-encodeTemplateArgument a =
-    case a of
-      Syntax.TemplateArgumentType v0 -> encodeTypeExpression v0
-      Syntax.TemplateArgumentValue v0 -> encodeExpression v0
-
--- | Convert a template declaration to an expression
-encodeTemplateDeclaration :: Syntax.TemplateDeclaration -> Ast.Expr
-encodeTemplateDeclaration td =
-
-      let inline = Syntax.templateDeclarationInline td
-          params = Syntax.templateDeclarationParameters td
-          declaration = Syntax.templateDeclarationDeclaration td
-          sep = Logic.ifElse inline Serialization.spaceSep Serialization.newlineSep
-      in (sep [
-        Serialization.noSep [
-          Serialization.cst "template",
-          (Serialization.angleBracesList Serialization.inlineStyle (Lists.map (\p -> Serialization.cst p) params))],
-        (encodeDeclaration declaration)])
-
--- | Convert a template function call operation to an expression
-encodeTemplateFunctionCallOperation :: Syntax.TemplateFunctionCallOperation -> Ast.Expr
-encodeTemplateFunctionCallOperation tfco =
-
-      let func = Syntax.templateFunctionCallOperationFunction tfco
-          templateArgs = Syntax.templateFunctionCallOperationTemplateArguments tfco
-          args = Syntax.templateFunctionCallOperationArguments tfco
-      in (Serialization.noSep [
-        encodePostfixExpression func,
-        (Serialization.angleBracesList Serialization.inlineStyle (Lists.map encodeTemplateArgument templateArgs)),
-        (Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeExpression args)))])
-
--- | Convert a template type to an expression
-encodeTemplateType :: Syntax.TemplateType -> Ast.Expr
-encodeTemplateType tt =
-
-      let name = Syntax.templateTypeName tt
-          args = Syntax.templateTypeArguments tt
-      in (Serialization.noSep [
-        Serialization.cst name,
-        (Serialization.angleBracesList Serialization.inlineStyle (Lists.map encodeTemplateArgument args))])
-
--- | Convert a ternary expression to an expression
-encodeTernaryExpression :: Syntax.TernaryExpression -> Ast.Expr
-encodeTernaryExpression te =
-
-      let cond = Syntax.ternaryExpressionCondition te
-          trueExpr = Syntax.ternaryExpressionTrueExpr te
-          falseExpr = Syntax.ternaryExpressionFalseExpr te
-      in (Serialization.spaceSep [
-        encodeLogicalOrExpression cond,
-        (Serialization.cst "?"),
-        (encodeExpression trueExpr),
-        (Serialization.cst ":"),
-        (encodeConditionalExpression falseExpr)])
-
--- | Convert a type expression to an expression
-encodeTypeExpression :: Syntax.TypeExpression -> Ast.Expr
-encodeTypeExpression t =
-    case t of
-      Syntax.TypeExpressionBasic v0 -> encodeBasicType v0
-      Syntax.TypeExpressionQualified v0 -> encodeQualifiedType v0
-      Syntax.TypeExpressionTemplate v0 -> encodeTemplateType v0
-      Syntax.TypeExpressionFunction v0 -> encodeFunctionType v0
-      Syntax.TypeExpressionAuto -> Serialization.cst "auto"
-
--- | Convert a typedef declaration to an expression
-encodeTypedefDeclaration :: Syntax.TypedefDeclaration -> Ast.Expr
-encodeTypedefDeclaration td =
-
-      let name = Syntax.typedefDeclarationName td
-          typ = Syntax.typedefDeclarationType td
-          isUsing = Syntax.typedefDeclarationIsUsing td
-      in (Logic.ifElse isUsing (Serialization.withSemi (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 "using " name),
-        (Serialization.cst "="),
-        (encodeTypeExpression typ)])) (Serialization.withSemi (Serialization.spaceSep [
-        Serialization.cst "typedef",
-        (encodeTypeExpression typ),
-        (Serialization.cst name)])))
-
--- | Convert a unary expression to an expression
-encodeUnaryExpression :: Syntax.UnaryExpression -> Ast.Expr
-encodeUnaryExpression e =
-    case e of
-      Syntax.UnaryExpressionPostfix v0 -> encodePostfixExpression v0
-      Syntax.UnaryExpressionUnaryOp v0 -> encodeUnaryOperation v0
-      Syntax.UnaryExpressionSizeof v0 -> encodeSizeofExpression v0
-
--- | Convert a unary operation to an expression
-encodeUnaryOperation :: Syntax.UnaryOperation -> Ast.Expr
-encodeUnaryOperation uo =
-
-      let op = Syntax.unaryOperationOperator uo
-          operand = Syntax.unaryOperationOperand uo
-      in (Serialization.spaceSep [
-        encodeUnaryOperator op,
-        (encodeUnaryExpression operand)])
-
--- | Convert a unary operator to an expression
-encodeUnaryOperator :: Syntax.UnaryOperator -> Ast.Expr
-encodeUnaryOperator op =
-    case op of
-      Syntax.UnaryOperatorPlus -> Serialization.cst "+"
-      Syntax.UnaryOperatorMinus -> Serialization.cst "-"
-      Syntax.UnaryOperatorLogicalNot -> Serialization.cst "!"
-      Syntax.UnaryOperatorBitwiseNot -> Serialization.cst "~"
-      Syntax.UnaryOperatorDereference -> Serialization.cst "*"
-      Syntax.UnaryOperatorAddressOf -> Serialization.cst "&"
-      Syntax.UnaryOperatorPreIncrement -> Serialization.cst "++"
-      Syntax.UnaryOperatorPreDecrement -> Serialization.cst "--"
-
--- | Convert an undef directive to an expression
-encodeUndefDirective :: Syntax.UndefDirective -> Ast.Expr
-encodeUndefDirective ud =
-    Serialization.spaceSep [
-      Serialization.cst "#undef",
-      (Serialization.cst (Syntax.undefDirectiveName ud))]
-
--- | Convert a variable declaration to an expression
-encodeVariableDeclaration :: Bool -> Syntax.VariableDeclaration -> Ast.Expr
-encodeVariableDeclaration commas vd =
-
-      let typ = Syntax.variableDeclarationType vd
-          name = Syntax.variableDeclarationName vd
-          init = Syntax.variableDeclarationInitializer vd
-          isAuto = Syntax.variableDeclarationIsAuto vd
-          terminator = Logic.ifElse commas Serialization.withComma Serialization.withSemi
-      in (terminator (Serialization.spaceSep (Lists.concat [
-        Logic.ifElse isAuto [
-          Serialization.cst "auto"] (Maybes.maybe [] (\t -> [
-          encodeTypeExpression t]) typ),
-        [
-          Serialization.cst name],
-        (Maybes.maybe [] (\expr -> [
-          Serialization.cst "=",
-          (encodeExpression expr)]) init)])))
-
--- | Convert a vector to an expression
-encodeVector :: Syntax.Vector -> Ast.Expr
-encodeVector v =
-
-      let elemType = Syntax.vectorElementType v
-          elems = Syntax.vectorElements v
-      in (Serialization.spaceSep [
-        Serialization.cst "std::vector<",
-        (encodeTypeExpression elemType),
-        (Serialization.cst ">"),
-        (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map encodeExpression elems))])
-
--- | Convert a visitor to an expression
-encodeVisitor :: Syntax.Visitor -> Ast.Expr
-encodeVisitor v =
-    case v of
-      Syntax.VisitorLambda v0 -> encodeLambdaExpression v0
-      Syntax.VisitorOverloaded v0 -> encodeOverloadedLambdas v0
-
--- | Convert a warning directive to an expression
-encodeWarningDirective :: Syntax.WarningDirective -> Ast.Expr
-encodeWarningDirective wd =
-    Serialization.spaceSep [
-      Serialization.cst "#warning",
-      (Serialization.cst (Syntax.warningDirectiveMessage wd))]
-
--- | Convert a while statement to an expression
-encodeWhileStatement :: Syntax.WhileStatement -> Ast.Expr
-encodeWhileStatement ws =
-
-      let cond = Syntax.whileStatementCondition ws
-          body = Syntax.whileStatementBody ws
-      in (Serialization.newlineSep [
-        Serialization.spaceSep [
-          Serialization.cst "while",
-          (Serialization.parens (encodeExpression cond))],
-        (encodeStatement body)])
-
--- | Convert a string to a C++ comment
-toCppComments :: String -> Bool -> String
-toCppComments s isMultiline =
-    Logic.ifElse isMultiline (Strings.cat [
-      "/* ",
-      s,
-      " */"]) (Strings.cat2 "// " s)
diff --git a/src/main/haskell/Hydra/Cpp/Syntax.hs b/src/main/haskell/Hydra/Cpp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Syntax.hs
+++ /dev/null
@@ -1,1898 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A C++ syntax model, focusing on features for representing algebraic data types and declarative computations
-
-module Hydra.Cpp.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
-
-data AccessSpecifier =
-  AccessSpecifierPublic  |
-  AccessSpecifierProtected  |
-  AccessSpecifierPrivate  |
-  AccessSpecifierNone
-  deriving (Eq, Ord, Read, Show)
-
-_AccessSpecifier = Core.Name "hydra.cpp.syntax.AccessSpecifier"
-
-_AccessSpecifier_public = Core.Name "public"
-
-_AccessSpecifier_protected = Core.Name "protected"
-
-_AccessSpecifier_private = Core.Name "private"
-
-_AccessSpecifier_none = Core.Name "none"
-
-data Program =
-  Program {
-    programPreprocessorDirectives :: [PreprocessorDirective],
-    programIncludes :: [IncludeDirective],
-    programDeclarations :: [Declaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_Program = Core.Name "hydra.cpp.syntax.Program"
-
-_Program_preprocessorDirectives = Core.Name "preprocessorDirectives"
-
-_Program_includes = Core.Name "includes"
-
-_Program_declarations = Core.Name "declarations"
-
-data IncludeDirective =
-  IncludeDirective {
-    includeDirectiveName :: String,
-    includeDirectiveIsSystem :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_IncludeDirective = Core.Name "hydra.cpp.syntax.IncludeDirective"
-
-_IncludeDirective_name = Core.Name "name"
-
-_IncludeDirective_isSystem = Core.Name "isSystem"
-
-data Declaration =
-  DeclarationPreprocessor PreprocessorDirective |
-  DeclarationClass ClassDeclaration |
-  DeclarationFunction FunctionDeclaration |
-  DeclarationVariable VariableDeclaration |
-  DeclarationTypedef TypedefDeclaration |
-  DeclarationNamespace NamespaceDeclaration |
-  DeclarationTemplate TemplateDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_Declaration = Core.Name "hydra.cpp.syntax.Declaration"
-
-_Declaration_preprocessor = Core.Name "preprocessor"
-
-_Declaration_class = Core.Name "class"
-
-_Declaration_function = Core.Name "function"
-
-_Declaration_variable = Core.Name "variable"
-
-_Declaration_typedef = Core.Name "typedef"
-
-_Declaration_namespace = Core.Name "namespace"
-
-_Declaration_template = Core.Name "template"
-
-data NamespaceDeclaration =
-  NamespaceDeclaration {
-    namespaceDeclarationName :: String,
-    namespaceDeclarationDeclarations :: [Declaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_NamespaceDeclaration = Core.Name "hydra.cpp.syntax.NamespaceDeclaration"
-
-_NamespaceDeclaration_name = Core.Name "name"
-
-_NamespaceDeclaration_declarations = Core.Name "declarations"
-
-data TypedefDeclaration =
-  TypedefDeclaration {
-    typedefDeclarationName :: String,
-    typedefDeclarationType :: TypeExpression,
-    typedefDeclarationIsUsing :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_TypedefDeclaration = Core.Name "hydra.cpp.syntax.TypedefDeclaration"
-
-_TypedefDeclaration_name = Core.Name "name"
-
-_TypedefDeclaration_type = Core.Name "type"
-
-_TypedefDeclaration_isUsing = Core.Name "isUsing"
-
-data ClassDeclaration =
-  ClassDeclaration {
-    classDeclarationSpecifier :: ClassSpecifier,
-    classDeclarationBody :: (Maybe ClassBody)}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassDeclaration = Core.Name "hydra.cpp.syntax.ClassDeclaration"
-
-_ClassDeclaration_specifier = Core.Name "specifier"
-
-_ClassDeclaration_body = Core.Name "body"
-
-data TemplateDeclaration =
-  TemplateDeclaration {
-    templateDeclarationInline :: Bool,
-    templateDeclarationParameters :: [String],
-    templateDeclarationDeclaration :: Declaration}
-  deriving (Eq, Ord, Read, Show)
-
-_TemplateDeclaration = Core.Name "hydra.cpp.syntax.TemplateDeclaration"
-
-_TemplateDeclaration_inline = Core.Name "inline"
-
-_TemplateDeclaration_parameters = Core.Name "parameters"
-
-_TemplateDeclaration_declaration = Core.Name "declaration"
-
-data PreprocessorDirective =
-  PreprocessorDirectiveInclude IncludeDirective |
-  PreprocessorDirectivePragma PragmaDirective |
-  PreprocessorDirectiveDefine DefineDirective |
-  PreprocessorDirectiveUndef UndefDirective |
-  PreprocessorDirectiveIfdef IfdefDirective |
-  PreprocessorDirectiveIfndef IfndefDirective |
-  PreprocessorDirectiveIf IfDirective |
-  PreprocessorDirectiveElif ElifDirective |
-  PreprocessorDirectiveElse ElseDirective |
-  PreprocessorDirectiveEndif EndifDirective |
-  PreprocessorDirectiveLine LineDirective |
-  PreprocessorDirectiveError ErrorDirective |
-  PreprocessorDirectiveWarning WarningDirective
-  deriving (Eq, Ord, Read, Show)
-
-_PreprocessorDirective = Core.Name "hydra.cpp.syntax.PreprocessorDirective"
-
-_PreprocessorDirective_include = Core.Name "include"
-
-_PreprocessorDirective_pragma = Core.Name "pragma"
-
-_PreprocessorDirective_define = Core.Name "define"
-
-_PreprocessorDirective_undef = Core.Name "undef"
-
-_PreprocessorDirective_ifdef = Core.Name "ifdef"
-
-_PreprocessorDirective_ifndef = Core.Name "ifndef"
-
-_PreprocessorDirective_if = Core.Name "if"
-
-_PreprocessorDirective_elif = Core.Name "elif"
-
-_PreprocessorDirective_else = Core.Name "else"
-
-_PreprocessorDirective_endif = Core.Name "endif"
-
-_PreprocessorDirective_line = Core.Name "line"
-
-_PreprocessorDirective_error = Core.Name "error"
-
-_PreprocessorDirective_warning = Core.Name "warning"
-
-data PragmaDirective =
-  PragmaDirective {
-    pragmaDirectiveContent :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PragmaDirective = Core.Name "hydra.cpp.syntax.PragmaDirective"
-
-_PragmaDirective_content = Core.Name "content"
-
-data DefineDirective =
-  DefineDirective {
-    defineDirectiveName :: String,
-    defineDirectiveParameters :: (Maybe [String]),
-    defineDirectiveReplacement :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_DefineDirective = Core.Name "hydra.cpp.syntax.DefineDirective"
-
-_DefineDirective_name = Core.Name "name"
-
-_DefineDirective_parameters = Core.Name "parameters"
-
-_DefineDirective_replacement = Core.Name "replacement"
-
-data UndefDirective =
-  UndefDirective {
-    undefDirectiveName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_UndefDirective = Core.Name "hydra.cpp.syntax.UndefDirective"
-
-_UndefDirective_name = Core.Name "name"
-
-data IfdefDirective =
-  IfdefDirective {
-    ifdefDirectiveIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IfdefDirective = Core.Name "hydra.cpp.syntax.IfdefDirective"
-
-_IfdefDirective_identifier = Core.Name "identifier"
-
-data IfndefDirective =
-  IfndefDirective {
-    ifndefDirectiveIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IfndefDirective = Core.Name "hydra.cpp.syntax.IfndefDirective"
-
-_IfndefDirective_identifier = Core.Name "identifier"
-
-data IfDirective =
-  IfDirective {
-    ifDirectiveCondition :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IfDirective = Core.Name "hydra.cpp.syntax.IfDirective"
-
-_IfDirective_condition = Core.Name "condition"
-
-data ElifDirective =
-  ElifDirective {
-    elifDirectiveCondition :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ElifDirective = Core.Name "hydra.cpp.syntax.ElifDirective"
-
-_ElifDirective_condition = Core.Name "condition"
-
-type ElseDirective = ()
-
-_ElseDirective = Core.Name "hydra.cpp.syntax.ElseDirective"
-
-type EndifDirective = ()
-
-_EndifDirective = Core.Name "hydra.cpp.syntax.EndifDirective"
-
-data LineDirective =
-  LineDirective {
-    lineDirectiveLineNumber :: Int,
-    lineDirectiveFilename :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_LineDirective = Core.Name "hydra.cpp.syntax.LineDirective"
-
-_LineDirective_lineNumber = Core.Name "lineNumber"
-
-_LineDirective_filename = Core.Name "filename"
-
-data ErrorDirective =
-  ErrorDirective {
-    errorDirectiveMessage :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ErrorDirective = Core.Name "hydra.cpp.syntax.ErrorDirective"
-
-_ErrorDirective_message = Core.Name "message"
-
-data WarningDirective =
-  WarningDirective {
-    warningDirectiveMessage :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_WarningDirective = Core.Name "hydra.cpp.syntax.WarningDirective"
-
-_WarningDirective_message = Core.Name "message"
-
-data ClassSpecifier =
-  ClassSpecifier {
-    classSpecifierKey :: ClassKey,
-    classSpecifierName :: String,
-    classSpecifierInheritance :: [BaseSpecifier]}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassSpecifier = Core.Name "hydra.cpp.syntax.ClassSpecifier"
-
-_ClassSpecifier_key = Core.Name "key"
-
-_ClassSpecifier_name = Core.Name "name"
-
-_ClassSpecifier_inheritance = Core.Name "inheritance"
-
-data ClassKey =
-  ClassKeyClass  |
-  ClassKeyEnum  |
-  ClassKeyEnumClass  |
-  ClassKeyStruct
-  deriving (Eq, Ord, Read, Show)
-
-_ClassKey = Core.Name "hydra.cpp.syntax.ClassKey"
-
-_ClassKey_class = Core.Name "class"
-
-_ClassKey_enum = Core.Name "enum"
-
-_ClassKey_enumClass = Core.Name "enumClass"
-
-_ClassKey_struct = Core.Name "struct"
-
-data BaseSpecifier =
-  BaseSpecifier {
-    baseSpecifierAccess :: AccessSpecifier,
-    baseSpecifierName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_BaseSpecifier = Core.Name "hydra.cpp.syntax.BaseSpecifier"
-
-_BaseSpecifier_access = Core.Name "access"
-
-_BaseSpecifier_name = Core.Name "name"
-
-newtype ClassBody =
-  ClassBody {
-    unClassBody :: [MemberSpecification]}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassBody = Core.Name "hydra.cpp.syntax.ClassBody"
-
-data MemberSpecification =
-  MemberSpecificationAccessLabel AccessSpecifier |
-  MemberSpecificationMember MemberDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_MemberSpecification = Core.Name "hydra.cpp.syntax.MemberSpecification"
-
-_MemberSpecification_accessLabel = Core.Name "accessLabel"
-
-_MemberSpecification_member = Core.Name "member"
-
-data MemberDeclaration =
-  MemberDeclarationFunction FunctionDeclaration |
-  MemberDeclarationVariable VariableDeclaration |
-  MemberDeclarationConstructor ConstructorDeclaration |
-  MemberDeclarationDestructor DestructorDeclaration |
-  MemberDeclarationNestedClass ClassDeclaration |
-  MemberDeclarationTemplate TemplateDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_MemberDeclaration = Core.Name "hydra.cpp.syntax.MemberDeclaration"
-
-_MemberDeclaration_function = Core.Name "function"
-
-_MemberDeclaration_variable = Core.Name "variable"
-
-_MemberDeclaration_constructor = Core.Name "constructor"
-
-_MemberDeclaration_destructor = Core.Name "destructor"
-
-_MemberDeclaration_nestedClass = Core.Name "nestedClass"
-
-_MemberDeclaration_template = Core.Name "template"
-
-data ConstructorDeclaration =
-  ConstructorDeclaration {
-    constructorDeclarationName :: String,
-    constructorDeclarationParameters :: [Parameter],
-    constructorDeclarationInitializers :: [MemInitializer],
-    constructorDeclarationBody :: FunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstructorDeclaration = Core.Name "hydra.cpp.syntax.ConstructorDeclaration"
-
-_ConstructorDeclaration_name = Core.Name "name"
-
-_ConstructorDeclaration_parameters = Core.Name "parameters"
-
-_ConstructorDeclaration_initializers = Core.Name "initializers"
-
-_ConstructorDeclaration_body = Core.Name "body"
-
-data MemInitializer =
-  MemInitializer {
-    memInitializerName :: String,
-    memInitializerArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_MemInitializer = Core.Name "hydra.cpp.syntax.MemInitializer"
-
-_MemInitializer_name = Core.Name "name"
-
-_MemInitializer_arguments = Core.Name "arguments"
-
-data DestructorDeclaration =
-  DestructorDeclaration {
-    destructorDeclarationPrefixSpecifiers :: [FunctionSpecifierPrefix],
-    destructorDeclarationName :: String,
-    destructorDeclarationSuffixSpecifiers :: [FunctionSpecifierSuffix],
-    destructorDeclarationBody :: FunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_DestructorDeclaration = Core.Name "hydra.cpp.syntax.DestructorDeclaration"
-
-_DestructorDeclaration_prefixSpecifiers = Core.Name "prefixSpecifiers"
-
-_DestructorDeclaration_name = Core.Name "name"
-
-_DestructorDeclaration_suffixSpecifiers = Core.Name "suffixSpecifiers"
-
-_DestructorDeclaration_body = Core.Name "body"
-
-data FunctionDeclaration =
-  FunctionDeclaration {
-    functionDeclarationPrefixSpecifiers :: [FunctionSpecifierPrefix],
-    functionDeclarationReturnType :: TypeExpression,
-    functionDeclarationName :: String,
-    functionDeclarationParameters :: [Parameter],
-    functionDeclarationSuffixSpecifiers :: [FunctionSpecifierSuffix],
-    functionDeclarationBody :: FunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionDeclaration = Core.Name "hydra.cpp.syntax.FunctionDeclaration"
-
-_FunctionDeclaration_prefixSpecifiers = Core.Name "prefixSpecifiers"
-
-_FunctionDeclaration_returnType = Core.Name "returnType"
-
-_FunctionDeclaration_name = Core.Name "name"
-
-_FunctionDeclaration_parameters = Core.Name "parameters"
-
-_FunctionDeclaration_suffixSpecifiers = Core.Name "suffixSpecifiers"
-
-_FunctionDeclaration_body = Core.Name "body"
-
-data FunctionSpecifierPrefix =
-  FunctionSpecifierPrefixInline  |
-  FunctionSpecifierPrefixVirtual  |
-  FunctionSpecifierPrefixStatic  |
-  FunctionSpecifierPrefixExplicit
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionSpecifierPrefix = Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"
-
-_FunctionSpecifierPrefix_inline = Core.Name "inline"
-
-_FunctionSpecifierPrefix_virtual = Core.Name "virtual"
-
-_FunctionSpecifierPrefix_static = Core.Name "static"
-
-_FunctionSpecifierPrefix_explicit = Core.Name "explicit"
-
-data FunctionSpecifierSuffix =
-  FunctionSpecifierSuffixConst  |
-  FunctionSpecifierSuffixNoexcept  |
-  FunctionSpecifierSuffixOverride  |
-  FunctionSpecifierSuffixFinal
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionSpecifierSuffix = Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"
-
-_FunctionSpecifierSuffix_const = Core.Name "const"
-
-_FunctionSpecifierSuffix_noexcept = Core.Name "noexcept"
-
-_FunctionSpecifierSuffix_override = Core.Name "override"
-
-_FunctionSpecifierSuffix_final = Core.Name "final"
-
-data Parameter =
-  Parameter {
-    parameterType :: TypeExpression,
-    parameterName :: String,
-    parameterUnnamed :: Bool,
-    parameterDefaultValue :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_Parameter = Core.Name "hydra.cpp.syntax.Parameter"
-
-_Parameter_type = Core.Name "type"
-
-_Parameter_name = Core.Name "name"
-
-_Parameter_unnamed = Core.Name "unnamed"
-
-_Parameter_defaultValue = Core.Name "defaultValue"
-
-data FunctionBody =
-  FunctionBodyCompound CompoundStatement |
-  FunctionBodyDeclaration  |
-  FunctionBodyPure  |
-  FunctionBodyDefault
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionBody = Core.Name "hydra.cpp.syntax.FunctionBody"
-
-_FunctionBody_compound = Core.Name "compound"
-
-_FunctionBody_declaration = Core.Name "declaration"
-
-_FunctionBody_pure = Core.Name "pure"
-
-_FunctionBody_default = Core.Name "default"
-
-data VariableDeclaration =
-  VariableDeclaration {
-    variableDeclarationType :: (Maybe TypeExpression),
-    variableDeclarationName :: String,
-    variableDeclarationInitializer :: (Maybe Expression),
-    variableDeclarationIsAuto :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_VariableDeclaration = Core.Name "hydra.cpp.syntax.VariableDeclaration"
-
-_VariableDeclaration_type = Core.Name "type"
-
-_VariableDeclaration_name = Core.Name "name"
-
-_VariableDeclaration_initializer = Core.Name "initializer"
-
-_VariableDeclaration_isAuto = Core.Name "isAuto"
-
-data VariantDeclaration =
-  VariantDeclaration {
-    variantDeclarationTypes :: [TypeExpression],
-    variantDeclarationName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_VariantDeclaration = Core.Name "hydra.cpp.syntax.VariantDeclaration"
-
-_VariantDeclaration_types = Core.Name "types"
-
-_VariantDeclaration_name = Core.Name "name"
-
-data ProductDeclaration =
-  ProductDeclaration {
-    productDeclarationName :: String,
-    productDeclarationFields :: [VariableDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_ProductDeclaration = Core.Name "hydra.cpp.syntax.ProductDeclaration"
-
-_ProductDeclaration_name = Core.Name "name"
-
-_ProductDeclaration_fields = Core.Name "fields"
-
-data ContainerDeclaration =
-  ContainerDeclarationList ListDeclaration |
-  ContainerDeclarationMap MapDeclaration |
-  ContainerDeclarationSet SetDeclaration |
-  ContainerDeclarationOptional OptionalDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_ContainerDeclaration = Core.Name "hydra.cpp.syntax.ContainerDeclaration"
-
-_ContainerDeclaration_list = Core.Name "list"
-
-_ContainerDeclaration_map = Core.Name "map"
-
-_ContainerDeclaration_set = Core.Name "set"
-
-_ContainerDeclaration_optional = Core.Name "optional"
-
-data ListDeclaration =
-  ListDeclaration {
-    listDeclarationElementType :: TypeExpression,
-    listDeclarationName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ListDeclaration = Core.Name "hydra.cpp.syntax.ListDeclaration"
-
-_ListDeclaration_elementType = Core.Name "elementType"
-
-_ListDeclaration_name = Core.Name "name"
-
-data MapDeclaration =
-  MapDeclaration {
-    mapDeclarationKeyType :: TypeExpression,
-    mapDeclarationValueType :: TypeExpression,
-    mapDeclarationName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_MapDeclaration = Core.Name "hydra.cpp.syntax.MapDeclaration"
-
-_MapDeclaration_keyType = Core.Name "keyType"
-
-_MapDeclaration_valueType = Core.Name "valueType"
-
-_MapDeclaration_name = Core.Name "name"
-
-data SetDeclaration =
-  SetDeclaration {
-    setDeclarationElementType :: TypeExpression,
-    setDeclarationName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_SetDeclaration = Core.Name "hydra.cpp.syntax.SetDeclaration"
-
-_SetDeclaration_elementType = Core.Name "elementType"
-
-_SetDeclaration_name = Core.Name "name"
-
-data OptionalDeclaration =
-  OptionalDeclaration {
-    optionalDeclarationValueType :: TypeExpression,
-    optionalDeclarationName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_OptionalDeclaration = Core.Name "hydra.cpp.syntax.OptionalDeclaration"
-
-_OptionalDeclaration_valueType = Core.Name "valueType"
-
-_OptionalDeclaration_name = Core.Name "name"
-
-data Expression =
-  ExpressionAssignment AssignmentExpression |
-  ExpressionComma CommaExpression
-  deriving (Eq, Ord, Read, Show)
-
-_Expression = Core.Name "hydra.cpp.syntax.Expression"
-
-_Expression_assignment = Core.Name "assignment"
-
-_Expression_comma = Core.Name "comma"
-
-data CommaExpression =
-  CommaExpression {
-    commaExpressionLeft :: Expression,
-    commaExpressionRight :: AssignmentExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_CommaExpression = Core.Name "hydra.cpp.syntax.CommaExpression"
-
-_CommaExpression_left = Core.Name "left"
-
-_CommaExpression_right = Core.Name "right"
-
-data AssignmentExpression =
-  AssignmentExpressionConditional ConditionalExpression |
-  AssignmentExpressionAssignment ExplicitAssignment
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentExpression = Core.Name "hydra.cpp.syntax.AssignmentExpression"
-
-_AssignmentExpression_conditional = Core.Name "conditional"
-
-_AssignmentExpression_assignment = Core.Name "assignment"
-
-data ExplicitAssignment =
-  ExplicitAssignment {
-    explicitAssignmentLeft :: LogicalOrExpression,
-    explicitAssignmentOp :: AssignmentOperator,
-    explicitAssignmentRight :: AssignmentExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ExplicitAssignment = Core.Name "hydra.cpp.syntax.ExplicitAssignment"
-
-_ExplicitAssignment_left = Core.Name "left"
-
-_ExplicitAssignment_op = Core.Name "op"
-
-_ExplicitAssignment_right = Core.Name "right"
-
-data AssignmentOperator =
-  AssignmentOperatorAssign  |
-  AssignmentOperatorPlusAssign  |
-  AssignmentOperatorMinusAssign  |
-  AssignmentOperatorMultiplyAssign  |
-  AssignmentOperatorDivideAssign  |
-  AssignmentOperatorModuloAssign  |
-  AssignmentOperatorLeftShiftAssign  |
-  AssignmentOperatorRightShiftAssign  |
-  AssignmentOperatorBitwiseAndAssign  |
-  AssignmentOperatorBitwiseXorAssign  |
-  AssignmentOperatorBitwiseOrAssign
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentOperator = Core.Name "hydra.cpp.syntax.AssignmentOperator"
-
-_AssignmentOperator_assign = Core.Name "assign"
-
-_AssignmentOperator_plusAssign = Core.Name "plusAssign"
-
-_AssignmentOperator_minusAssign = Core.Name "minusAssign"
-
-_AssignmentOperator_multiplyAssign = Core.Name "multiplyAssign"
-
-_AssignmentOperator_divideAssign = Core.Name "divideAssign"
-
-_AssignmentOperator_moduloAssign = Core.Name "moduloAssign"
-
-_AssignmentOperator_leftShiftAssign = Core.Name "leftShiftAssign"
-
-_AssignmentOperator_rightShiftAssign = Core.Name "rightShiftAssign"
-
-_AssignmentOperator_bitwiseAndAssign = Core.Name "bitwiseAndAssign"
-
-_AssignmentOperator_bitwiseXorAssign = Core.Name "bitwiseXorAssign"
-
-_AssignmentOperator_bitwiseOrAssign = Core.Name "bitwiseOrAssign"
-
-data ConditionalExpression =
-  ConditionalExpressionLogicalOr LogicalOrExpression |
-  ConditionalExpressionTernary TernaryExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ConditionalExpression = Core.Name "hydra.cpp.syntax.ConditionalExpression"
-
-_ConditionalExpression_logicalOr = Core.Name "logicalOr"
-
-_ConditionalExpression_ternary = Core.Name "ternary"
-
-data TernaryExpression =
-  TernaryExpression {
-    ternaryExpressionCondition :: LogicalOrExpression,
-    ternaryExpressionTrueExpr :: Expression,
-    ternaryExpressionFalseExpr :: ConditionalExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_TernaryExpression = Core.Name "hydra.cpp.syntax.TernaryExpression"
-
-_TernaryExpression_condition = Core.Name "condition"
-
-_TernaryExpression_trueExpr = Core.Name "trueExpr"
-
-_TernaryExpression_falseExpr = Core.Name "falseExpr"
-
-data LogicalOrExpression =
-  LogicalOrExpressionLogicalAnd LogicalAndExpression |
-  LogicalOrExpressionLogicalOr LogicalOrOperation
-  deriving (Eq, Ord, Read, Show)
-
-_LogicalOrExpression = Core.Name "hydra.cpp.syntax.LogicalOrExpression"
-
-_LogicalOrExpression_logicalAnd = Core.Name "logicalAnd"
-
-_LogicalOrExpression_logicalOr = Core.Name "logicalOr"
-
-data LogicalOrOperation =
-  LogicalOrOperation {
-    logicalOrOperationLeft :: LogicalOrExpression,
-    logicalOrOperationRight :: LogicalAndExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_LogicalOrOperation = Core.Name "hydra.cpp.syntax.LogicalOrOperation"
-
-_LogicalOrOperation_left = Core.Name "left"
-
-_LogicalOrOperation_right = Core.Name "right"
-
-data LogicalAndExpression =
-  LogicalAndExpressionInclusiveOr InclusiveOrExpression |
-  LogicalAndExpressionLogicalAnd LogicalAndOperation
-  deriving (Eq, Ord, Read, Show)
-
-_LogicalAndExpression = Core.Name "hydra.cpp.syntax.LogicalAndExpression"
-
-_LogicalAndExpression_inclusiveOr = Core.Name "inclusiveOr"
-
-_LogicalAndExpression_logicalAnd = Core.Name "logicalAnd"
-
-data LogicalAndOperation =
-  LogicalAndOperation {
-    logicalAndOperationLeft :: LogicalAndExpression,
-    logicalAndOperationRight :: InclusiveOrExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_LogicalAndOperation = Core.Name "hydra.cpp.syntax.LogicalAndOperation"
-
-_LogicalAndOperation_left = Core.Name "left"
-
-_LogicalAndOperation_right = Core.Name "right"
-
-data InclusiveOrExpression =
-  InclusiveOrExpressionExclusiveOr ExclusiveOrExpression |
-  InclusiveOrExpressionBitwiseOr BitwiseOrOperation
-  deriving (Eq, Ord, Read, Show)
-
-_InclusiveOrExpression = Core.Name "hydra.cpp.syntax.InclusiveOrExpression"
-
-_InclusiveOrExpression_exclusiveOr = Core.Name "exclusiveOr"
-
-_InclusiveOrExpression_bitwiseOr = Core.Name "bitwiseOr"
-
-data BitwiseOrOperation =
-  BitwiseOrOperation {
-    bitwiseOrOperationLeft :: InclusiveOrExpression,
-    bitwiseOrOperationRight :: ExclusiveOrExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BitwiseOrOperation = Core.Name "hydra.cpp.syntax.BitwiseOrOperation"
-
-_BitwiseOrOperation_left = Core.Name "left"
-
-_BitwiseOrOperation_right = Core.Name "right"
-
-data ExclusiveOrExpression =
-  ExclusiveOrExpressionAnd AndExpression |
-  ExclusiveOrExpressionBitwiseXor BitwiseXorOperation
-  deriving (Eq, Ord, Read, Show)
-
-_ExclusiveOrExpression = Core.Name "hydra.cpp.syntax.ExclusiveOrExpression"
-
-_ExclusiveOrExpression_and = Core.Name "and"
-
-_ExclusiveOrExpression_bitwiseXor = Core.Name "bitwiseXor"
-
-data BitwiseXorOperation =
-  BitwiseXorOperation {
-    bitwiseXorOperationLeft :: ExclusiveOrExpression,
-    bitwiseXorOperationRight :: AndExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BitwiseXorOperation = Core.Name "hydra.cpp.syntax.BitwiseXorOperation"
-
-_BitwiseXorOperation_left = Core.Name "left"
-
-_BitwiseXorOperation_right = Core.Name "right"
-
-data AndExpression =
-  AndExpressionEquality EqualityExpression |
-  AndExpressionBitwiseAnd BitwiseAndOperation
-  deriving (Eq, Ord, Read, Show)
-
-_AndExpression = Core.Name "hydra.cpp.syntax.AndExpression"
-
-_AndExpression_equality = Core.Name "equality"
-
-_AndExpression_bitwiseAnd = Core.Name "bitwiseAnd"
-
-data BitwiseAndOperation =
-  BitwiseAndOperation {
-    bitwiseAndOperationLeft :: AndExpression,
-    bitwiseAndOperationRight :: EqualityExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BitwiseAndOperation = Core.Name "hydra.cpp.syntax.BitwiseAndOperation"
-
-_BitwiseAndOperation_left = Core.Name "left"
-
-_BitwiseAndOperation_right = Core.Name "right"
-
-data EqualityExpression =
-  EqualityExpressionRelational RelationalExpression |
-  EqualityExpressionEqual EqualOperation |
-  EqualityExpressionNotEqual NotEqualOperation
-  deriving (Eq, Ord, Read, Show)
-
-_EqualityExpression = Core.Name "hydra.cpp.syntax.EqualityExpression"
-
-_EqualityExpression_relational = Core.Name "relational"
-
-_EqualityExpression_equal = Core.Name "equal"
-
-_EqualityExpression_notEqual = Core.Name "notEqual"
-
-data EqualOperation =
-  EqualOperation {
-    equalOperationLeft :: EqualityExpression,
-    equalOperationRight :: RelationalExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_EqualOperation = Core.Name "hydra.cpp.syntax.EqualOperation"
-
-_EqualOperation_left = Core.Name "left"
-
-_EqualOperation_right = Core.Name "right"
-
-data NotEqualOperation =
-  NotEqualOperation {
-    notEqualOperationLeft :: EqualityExpression,
-    notEqualOperationRight :: RelationalExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_NotEqualOperation = Core.Name "hydra.cpp.syntax.NotEqualOperation"
-
-_NotEqualOperation_left = Core.Name "left"
-
-_NotEqualOperation_right = Core.Name "right"
-
-data RelationalExpression =
-  RelationalExpressionShift ShiftExpression |
-  RelationalExpressionLess LessOperation |
-  RelationalExpressionGreater GreaterOperation |
-  RelationalExpressionLessEqual LessEqualOperation |
-  RelationalExpressionGreaterEqual GreaterEqualOperation
-  deriving (Eq, Ord, Read, Show)
-
-_RelationalExpression = Core.Name "hydra.cpp.syntax.RelationalExpression"
-
-_RelationalExpression_shift = Core.Name "shift"
-
-_RelationalExpression_less = Core.Name "less"
-
-_RelationalExpression_greater = Core.Name "greater"
-
-_RelationalExpression_lessEqual = Core.Name "lessEqual"
-
-_RelationalExpression_greaterEqual = Core.Name "greaterEqual"
-
-data LessOperation =
-  LessOperation {
-    lessOperationLeft :: RelationalExpression,
-    lessOperationRight :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_LessOperation = Core.Name "hydra.cpp.syntax.LessOperation"
-
-_LessOperation_left = Core.Name "left"
-
-_LessOperation_right = Core.Name "right"
-
-data GreaterOperation =
-  GreaterOperation {
-    greaterOperationLeft :: RelationalExpression,
-    greaterOperationRight :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_GreaterOperation = Core.Name "hydra.cpp.syntax.GreaterOperation"
-
-_GreaterOperation_left = Core.Name "left"
-
-_GreaterOperation_right = Core.Name "right"
-
-data LessEqualOperation =
-  LessEqualOperation {
-    lessEqualOperationLeft :: RelationalExpression,
-    lessEqualOperationRight :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_LessEqualOperation = Core.Name "hydra.cpp.syntax.LessEqualOperation"
-
-_LessEqualOperation_left = Core.Name "left"
-
-_LessEqualOperation_right = Core.Name "right"
-
-data GreaterEqualOperation =
-  GreaterEqualOperation {
-    greaterEqualOperationLeft :: RelationalExpression,
-    greaterEqualOperationRight :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_GreaterEqualOperation = Core.Name "hydra.cpp.syntax.GreaterEqualOperation"
-
-_GreaterEqualOperation_left = Core.Name "left"
-
-_GreaterEqualOperation_right = Core.Name "right"
-
-data ShiftExpression =
-  ShiftExpressionAdditive AdditiveExpression |
-  ShiftExpressionLeftShift LeftShiftOperation |
-  ShiftExpressionRightShift RightShiftOperation
-  deriving (Eq, Ord, Read, Show)
-
-_ShiftExpression = Core.Name "hydra.cpp.syntax.ShiftExpression"
-
-_ShiftExpression_additive = Core.Name "additive"
-
-_ShiftExpression_leftShift = Core.Name "leftShift"
-
-_ShiftExpression_rightShift = Core.Name "rightShift"
-
-data LeftShiftOperation =
-  LeftShiftOperation {
-    leftShiftOperationLeft :: ShiftExpression,
-    leftShiftOperationRight :: AdditiveExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_LeftShiftOperation = Core.Name "hydra.cpp.syntax.LeftShiftOperation"
-
-_LeftShiftOperation_left = Core.Name "left"
-
-_LeftShiftOperation_right = Core.Name "right"
-
-data RightShiftOperation =
-  RightShiftOperation {
-    rightShiftOperationLeft :: ShiftExpression,
-    rightShiftOperationRight :: AdditiveExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_RightShiftOperation = Core.Name "hydra.cpp.syntax.RightShiftOperation"
-
-_RightShiftOperation_left = Core.Name "left"
-
-_RightShiftOperation_right = Core.Name "right"
-
-data AdditiveExpression =
-  AdditiveExpressionMultiplicative MultiplicativeExpression |
-  AdditiveExpressionAdd AddOperation |
-  AdditiveExpressionSubtract SubtractOperation
-  deriving (Eq, Ord, Read, Show)
-
-_AdditiveExpression = Core.Name "hydra.cpp.syntax.AdditiveExpression"
-
-_AdditiveExpression_multiplicative = Core.Name "multiplicative"
-
-_AdditiveExpression_add = Core.Name "add"
-
-_AdditiveExpression_subtract = Core.Name "subtract"
-
-data AddOperation =
-  AddOperation {
-    addOperationLeft :: AdditiveExpression,
-    addOperationRight :: MultiplicativeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_AddOperation = Core.Name "hydra.cpp.syntax.AddOperation"
-
-_AddOperation_left = Core.Name "left"
-
-_AddOperation_right = Core.Name "right"
-
-data SubtractOperation =
-  SubtractOperation {
-    subtractOperationLeft :: AdditiveExpression,
-    subtractOperationRight :: MultiplicativeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_SubtractOperation = Core.Name "hydra.cpp.syntax.SubtractOperation"
-
-_SubtractOperation_left = Core.Name "left"
-
-_SubtractOperation_right = Core.Name "right"
-
-data MultiplicativeExpression =
-  MultiplicativeExpressionUnary UnaryExpression |
-  MultiplicativeExpressionMultiply MultiplyOperation |
-  MultiplicativeExpressionDivide DivideOperation |
-  MultiplicativeExpressionModulo ModuloOperation
-  deriving (Eq, Ord, Read, Show)
-
-_MultiplicativeExpression = Core.Name "hydra.cpp.syntax.MultiplicativeExpression"
-
-_MultiplicativeExpression_unary = Core.Name "unary"
-
-_MultiplicativeExpression_multiply = Core.Name "multiply"
-
-_MultiplicativeExpression_divide = Core.Name "divide"
-
-_MultiplicativeExpression_modulo = Core.Name "modulo"
-
-data MultiplyOperation =
-  MultiplyOperation {
-    multiplyOperationLeft :: MultiplicativeExpression,
-    multiplyOperationRight :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_MultiplyOperation = Core.Name "hydra.cpp.syntax.MultiplyOperation"
-
-_MultiplyOperation_left = Core.Name "left"
-
-_MultiplyOperation_right = Core.Name "right"
-
-data DivideOperation =
-  DivideOperation {
-    divideOperationLeft :: MultiplicativeExpression,
-    divideOperationRight :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_DivideOperation = Core.Name "hydra.cpp.syntax.DivideOperation"
-
-_DivideOperation_left = Core.Name "left"
-
-_DivideOperation_right = Core.Name "right"
-
-data ModuloOperation =
-  ModuloOperation {
-    moduloOperationLeft :: MultiplicativeExpression,
-    moduloOperationRight :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ModuloOperation = Core.Name "hydra.cpp.syntax.ModuloOperation"
-
-_ModuloOperation_left = Core.Name "left"
-
-_ModuloOperation_right = Core.Name "right"
-
-data UnaryExpression =
-  UnaryExpressionPostfix PostfixExpression |
-  UnaryExpressionUnaryOp UnaryOperation |
-  UnaryExpressionSizeof SizeofExpression
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryExpression = Core.Name "hydra.cpp.syntax.UnaryExpression"
-
-_UnaryExpression_postfix = Core.Name "postfix"
-
-_UnaryExpression_unaryOp = Core.Name "unaryOp"
-
-_UnaryExpression_sizeof = Core.Name "sizeof"
-
-data UnaryOperation =
-  UnaryOperation {
-    unaryOperationOperator :: UnaryOperator,
-    unaryOperationOperand :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOperation = Core.Name "hydra.cpp.syntax.UnaryOperation"
-
-_UnaryOperation_operator = Core.Name "operator"
-
-_UnaryOperation_operand = Core.Name "operand"
-
-data UnaryOperator =
-  UnaryOperatorPlus  |
-  UnaryOperatorMinus  |
-  UnaryOperatorLogicalNot  |
-  UnaryOperatorBitwiseNot  |
-  UnaryOperatorDereference  |
-  UnaryOperatorAddressOf  |
-  UnaryOperatorPreIncrement  |
-  UnaryOperatorPreDecrement
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOperator = Core.Name "hydra.cpp.syntax.UnaryOperator"
-
-_UnaryOperator_plus = Core.Name "plus"
-
-_UnaryOperator_minus = Core.Name "minus"
-
-_UnaryOperator_logicalNot = Core.Name "logicalNot"
-
-_UnaryOperator_bitwiseNot = Core.Name "bitwiseNot"
-
-_UnaryOperator_dereference = Core.Name "dereference"
-
-_UnaryOperator_addressOf = Core.Name "addressOf"
-
-_UnaryOperator_preIncrement = Core.Name "preIncrement"
-
-_UnaryOperator_preDecrement = Core.Name "preDecrement"
-
-newtype SizeofExpression =
-  SizeofExpression {
-    unSizeofExpression :: TypeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_SizeofExpression = Core.Name "hydra.cpp.syntax.SizeofExpression"
-
-data PostfixExpression =
-  PostfixExpressionPrimary PrimaryExpression |
-  PostfixExpressionSubscript SubscriptOperation |
-  PostfixExpressionFunctionCall FunctionCallOperation |
-  PostfixExpressionTemplateFunctionCall TemplateFunctionCallOperation |
-  PostfixExpressionMemberAccess MemberAccessOperation |
-  PostfixExpressionPointerMemberAccess PointerMemberAccessOperation |
-  PostfixExpressionPostIncrement PostfixExpression |
-  PostfixExpressionPostDecrement PostfixExpression
-  deriving (Eq, Ord, Read, Show)
-
-_PostfixExpression = Core.Name "hydra.cpp.syntax.PostfixExpression"
-
-_PostfixExpression_primary = Core.Name "primary"
-
-_PostfixExpression_subscript = Core.Name "subscript"
-
-_PostfixExpression_functionCall = Core.Name "functionCall"
-
-_PostfixExpression_templateFunctionCall = Core.Name "templateFunctionCall"
-
-_PostfixExpression_memberAccess = Core.Name "memberAccess"
-
-_PostfixExpression_pointerMemberAccess = Core.Name "pointerMemberAccess"
-
-_PostfixExpression_postIncrement = Core.Name "postIncrement"
-
-_PostfixExpression_postDecrement = Core.Name "postDecrement"
-
-data SubscriptOperation =
-  SubscriptOperation {
-    subscriptOperationArray :: PostfixExpression,
-    subscriptOperationIndex :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_SubscriptOperation = Core.Name "hydra.cpp.syntax.SubscriptOperation"
-
-_SubscriptOperation_array = Core.Name "array"
-
-_SubscriptOperation_index = Core.Name "index"
-
-data FunctionCallOperation =
-  FunctionCallOperation {
-    functionCallOperationFunction :: PostfixExpression,
-    functionCallOperationArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionCallOperation = Core.Name "hydra.cpp.syntax.FunctionCallOperation"
-
-_FunctionCallOperation_function = Core.Name "function"
-
-_FunctionCallOperation_arguments = Core.Name "arguments"
-
-data MemberAccessOperation =
-  MemberAccessOperation {
-    memberAccessOperationObject :: PostfixExpression,
-    memberAccessOperationMember :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_MemberAccessOperation = Core.Name "hydra.cpp.syntax.MemberAccessOperation"
-
-_MemberAccessOperation_object = Core.Name "object"
-
-_MemberAccessOperation_member = Core.Name "member"
-
-data PointerMemberAccessOperation =
-  PointerMemberAccessOperation {
-    pointerMemberAccessOperationPointer :: PostfixExpression,
-    pointerMemberAccessOperationMember :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PointerMemberAccessOperation = Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"
-
-_PointerMemberAccessOperation_pointer = Core.Name "pointer"
-
-_PointerMemberAccessOperation_member = Core.Name "member"
-
-data TemplateFunctionCallOperation =
-  TemplateFunctionCallOperation {
-    templateFunctionCallOperationFunction :: PostfixExpression,
-    templateFunctionCallOperationTemplateArguments :: [TemplateArgument],
-    templateFunctionCallOperationArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_TemplateFunctionCallOperation = Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"
-
-_TemplateFunctionCallOperation_function = Core.Name "function"
-
-_TemplateFunctionCallOperation_templateArguments = Core.Name "templateArguments"
-
-_TemplateFunctionCallOperation_arguments = Core.Name "arguments"
-
-data PrimaryExpression =
-  PrimaryExpressionIdentifier String |
-  PrimaryExpressionLiteral Literal |
-  PrimaryExpressionParenthesized Expression |
-  PrimaryExpressionLambda LambdaExpression
-  deriving (Eq, Ord, Read, Show)
-
-_PrimaryExpression = Core.Name "hydra.cpp.syntax.PrimaryExpression"
-
-_PrimaryExpression_identifier = Core.Name "identifier"
-
-_PrimaryExpression_literal = Core.Name "literal"
-
-_PrimaryExpression_parenthesized = Core.Name "parenthesized"
-
-_PrimaryExpression_lambda = Core.Name "lambda"
-
-data LambdaExpression =
-  LambdaExpression {
-    lambdaExpressionCaptures :: CaptureList,
-    lambdaExpressionParameters :: [Parameter],
-    lambdaExpressionReturnType :: (Maybe TypeExpression),
-    lambdaExpressionBody :: CompoundStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_LambdaExpression = Core.Name "hydra.cpp.syntax.LambdaExpression"
-
-_LambdaExpression_captures = Core.Name "captures"
-
-_LambdaExpression_parameters = Core.Name "parameters"
-
-_LambdaExpression_returnType = Core.Name "returnType"
-
-_LambdaExpression_body = Core.Name "body"
-
-data CaptureList =
-  CaptureListCaptureByValue  |
-  CaptureListCaptures [Capture]
-  deriving (Eq, Ord, Read, Show)
-
-_CaptureList = Core.Name "hydra.cpp.syntax.CaptureList"
-
-_CaptureList_captureByValue = Core.Name "captureByValue"
-
-_CaptureList_captures = Core.Name "captures"
-
-data Capture =
-  Capture {
-    captureName :: String,
-    captureByReference :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Capture = Core.Name "hydra.cpp.syntax.Capture"
-
-_Capture_name = Core.Name "name"
-
-_Capture_byReference = Core.Name "byReference"
-
-data PatternMatch =
-  PatternMatch {
-    patternMatchVisitor :: Visitor,
-    patternMatchVariant :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_PatternMatch = Core.Name "hydra.cpp.syntax.PatternMatch"
-
-_PatternMatch_visitor = Core.Name "visitor"
-
-_PatternMatch_variant = Core.Name "variant"
-
-data Visitor =
-  VisitorLambda LambdaExpression |
-  VisitorOverloaded OverloadedLambdas
-  deriving (Eq, Ord, Read, Show)
-
-_Visitor = Core.Name "hydra.cpp.syntax.Visitor"
-
-_Visitor_lambda = Core.Name "lambda"
-
-_Visitor_overloaded = Core.Name "overloaded"
-
-newtype OverloadedLambdas =
-  OverloadedLambdas {
-    unOverloadedLambdas :: [LambdaExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_OverloadedLambdas = Core.Name "hydra.cpp.syntax.OverloadedLambdas"
-
-data FunctionApplication =
-  FunctionApplication {
-    functionApplicationFunction :: FunctionIdentifier,
-    functionApplicationArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionApplication = Core.Name "hydra.cpp.syntax.FunctionApplication"
-
-_FunctionApplication_function = Core.Name "function"
-
-_FunctionApplication_arguments = Core.Name "arguments"
-
-data FunctionIdentifier =
-  FunctionIdentifierSimple String |
-  FunctionIdentifierQualified QualifiedIdentifier
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionIdentifier = Core.Name "hydra.cpp.syntax.FunctionIdentifier"
-
-_FunctionIdentifier_simple = Core.Name "simple"
-
-_FunctionIdentifier_qualified = Core.Name "qualified"
-
-data QualifiedIdentifier =
-  QualifiedIdentifier {
-    qualifiedIdentifierNamespace :: String,
-    qualifiedIdentifierName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedIdentifier = Core.Name "hydra.cpp.syntax.QualifiedIdentifier"
-
-_QualifiedIdentifier_namespace = Core.Name "namespace"
-
-_QualifiedIdentifier_name = Core.Name "name"
-
-data Statement =
-  StatementLabeled LabeledStatement |
-  StatementCompound CompoundStatement |
-  StatementSelection SelectionStatement |
-  StatementSwitch SwitchStatement |
-  StatementIteration IterationStatement |
-  StatementJump JumpStatement |
-  StatementDeclaration VariableDeclaration |
-  StatementExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_Statement = Core.Name "hydra.cpp.syntax.Statement"
-
-_Statement_labeled = Core.Name "labeled"
-
-_Statement_compound = Core.Name "compound"
-
-_Statement_selection = Core.Name "selection"
-
-_Statement_switch = Core.Name "switch"
-
-_Statement_iteration = Core.Name "iteration"
-
-_Statement_jump = Core.Name "jump"
-
-_Statement_declaration = Core.Name "declaration"
-
-_Statement_expression = Core.Name "expression"
-
-data LabeledStatement =
-  LabeledStatement {
-    labeledStatementLabel :: String,
-    labeledStatementStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_LabeledStatement = Core.Name "hydra.cpp.syntax.LabeledStatement"
-
-_LabeledStatement_label = Core.Name "label"
-
-_LabeledStatement_statement = Core.Name "statement"
-
-newtype CompoundStatement =
-  CompoundStatement {
-    unCompoundStatement :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_CompoundStatement = Core.Name "hydra.cpp.syntax.CompoundStatement"
-
-data SelectionStatement =
-  SelectionStatement {
-    selectionStatementCondition :: Expression,
-    selectionStatementThenBranch :: Statement,
-    selectionStatementElseBranch :: (Maybe Statement)}
-  deriving (Eq, Ord, Read, Show)
-
-_SelectionStatement = Core.Name "hydra.cpp.syntax.SelectionStatement"
-
-_SelectionStatement_condition = Core.Name "condition"
-
-_SelectionStatement_thenBranch = Core.Name "thenBranch"
-
-_SelectionStatement_elseBranch = Core.Name "elseBranch"
-
-data SwitchStatement =
-  SwitchStatement {
-    switchStatementValue :: Expression,
-    switchStatementCases :: [CaseStatement]}
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchStatement = Core.Name "hydra.cpp.syntax.SwitchStatement"
-
-_SwitchStatement_value = Core.Name "value"
-
-_SwitchStatement_cases = Core.Name "cases"
-
-data CaseStatement =
-  CaseStatementCase CaseValue |
-  CaseStatementDefault Statement
-  deriving (Eq, Ord, Read, Show)
-
-_CaseStatement = Core.Name "hydra.cpp.syntax.CaseStatement"
-
-_CaseStatement_case = Core.Name "case"
-
-_CaseStatement_default = Core.Name "default"
-
-data CaseValue =
-  CaseValue {
-    caseValueValue :: Expression,
-    caseValueStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_CaseValue = Core.Name "hydra.cpp.syntax.CaseValue"
-
-_CaseValue_value = Core.Name "value"
-
-_CaseValue_statement = Core.Name "statement"
-
-data IterationStatement =
-  IterationStatementWhile WhileStatement |
-  IterationStatementDo DoStatement |
-  IterationStatementFor ForStatement |
-  IterationStatementRangeFor RangeForStatement
-  deriving (Eq, Ord, Read, Show)
-
-_IterationStatement = Core.Name "hydra.cpp.syntax.IterationStatement"
-
-_IterationStatement_while = Core.Name "while"
-
-_IterationStatement_do = Core.Name "do"
-
-_IterationStatement_for = Core.Name "for"
-
-_IterationStatement_rangeFor = Core.Name "rangeFor"
-
-data WhileStatement =
-  WhileStatement {
-    whileStatementCondition :: Expression,
-    whileStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_WhileStatement = Core.Name "hydra.cpp.syntax.WhileStatement"
-
-_WhileStatement_condition = Core.Name "condition"
-
-_WhileStatement_body = Core.Name "body"
-
-data DoStatement =
-  DoStatement {
-    doStatementBody :: Statement,
-    doStatementCondition :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_DoStatement = Core.Name "hydra.cpp.syntax.DoStatement"
-
-_DoStatement_body = Core.Name "body"
-
-_DoStatement_condition = Core.Name "condition"
-
-data ForStatement =
-  ForStatement {
-    forStatementInit :: ForInit,
-    forStatementCondition :: Expression,
-    forStatementIncrement :: Expression,
-    forStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_ForStatement = Core.Name "hydra.cpp.syntax.ForStatement"
-
-_ForStatement_init = Core.Name "init"
-
-_ForStatement_condition = Core.Name "condition"
-
-_ForStatement_increment = Core.Name "increment"
-
-_ForStatement_body = Core.Name "body"
-
-data ForInit =
-  ForInitExpression Expression |
-  ForInitDeclaration VariableDeclaration |
-  ForInitEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_ForInit = Core.Name "hydra.cpp.syntax.ForInit"
-
-_ForInit_expression = Core.Name "expression"
-
-_ForInit_declaration = Core.Name "declaration"
-
-_ForInit_empty = Core.Name "empty"
-
-data RangeForStatement =
-  RangeForStatement {
-    rangeForStatementType :: TypeExpression,
-    rangeForStatementVariable :: String,
-    rangeForStatementRange :: Expression,
-    rangeForStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_RangeForStatement = Core.Name "hydra.cpp.syntax.RangeForStatement"
-
-_RangeForStatement_type = Core.Name "type"
-
-_RangeForStatement_variable = Core.Name "variable"
-
-_RangeForStatement_range = Core.Name "range"
-
-_RangeForStatement_body = Core.Name "body"
-
-data JumpStatement =
-  JumpStatementBreak  |
-  JumpStatementContinue  |
-  JumpStatementReturnValue Expression |
-  JumpStatementReturnVoid  |
-  JumpStatementThrow Expression
-  deriving (Eq, Ord, Read, Show)
-
-_JumpStatement = Core.Name "hydra.cpp.syntax.JumpStatement"
-
-_JumpStatement_break = Core.Name "break"
-
-_JumpStatement_continue = Core.Name "continue"
-
-_JumpStatement_returnValue = Core.Name "returnValue"
-
-_JumpStatement_returnVoid = Core.Name "returnVoid"
-
-_JumpStatement_throw = Core.Name "throw"
-
-newtype ExpressionStatement =
-  ExpressionStatement {
-    unExpressionStatement :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ExpressionStatement = Core.Name "hydra.cpp.syntax.ExpressionStatement"
-
-data TypeExpression =
-  TypeExpressionBasic BasicType |
-  TypeExpressionQualified QualifiedType |
-  TypeExpressionTemplate TemplateType |
-  TypeExpressionFunction FunctionType |
-  TypeExpressionAuto
-  deriving (Eq, Ord, Read, Show)
-
-_TypeExpression = Core.Name "hydra.cpp.syntax.TypeExpression"
-
-_TypeExpression_basic = Core.Name "basic"
-
-_TypeExpression_qualified = Core.Name "qualified"
-
-_TypeExpression_template = Core.Name "template"
-
-_TypeExpression_function = Core.Name "function"
-
-_TypeExpression_auto = Core.Name "auto"
-
-data BasicType =
-  BasicTypeVoid  |
-  BasicTypeBool  |
-  BasicTypeChar  |
-  BasicTypeInt  |
-  BasicTypeFloat  |
-  BasicTypeDouble  |
-  BasicTypeString  |
-  BasicTypeAuto  |
-  BasicTypeNamed String
-  deriving (Eq, Ord, Read, Show)
-
-_BasicType = Core.Name "hydra.cpp.syntax.BasicType"
-
-_BasicType_void = Core.Name "void"
-
-_BasicType_bool = Core.Name "bool"
-
-_BasicType_char = Core.Name "char"
-
-_BasicType_int = Core.Name "int"
-
-_BasicType_float = Core.Name "float"
-
-_BasicType_double = Core.Name "double"
-
-_BasicType_string = Core.Name "string"
-
-_BasicType_auto = Core.Name "auto"
-
-_BasicType_named = Core.Name "named"
-
-data QualifiedType =
-  QualifiedType {
-    qualifiedTypeBaseType :: TypeExpression,
-    qualifiedTypeQualifier :: TypeQualifier}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedType = Core.Name "hydra.cpp.syntax.QualifiedType"
-
-_QualifiedType_baseType = Core.Name "baseType"
-
-_QualifiedType_qualifier = Core.Name "qualifier"
-
-data TypeQualifier =
-  TypeQualifierConst  |
-  TypeQualifierLvalueRef  |
-  TypeQualifierRvalueRef  |
-  TypeQualifierPointer
-  deriving (Eq, Ord, Read, Show)
-
-_TypeQualifier = Core.Name "hydra.cpp.syntax.TypeQualifier"
-
-_TypeQualifier_const = Core.Name "const"
-
-_TypeQualifier_lvalueRef = Core.Name "lvalueRef"
-
-_TypeQualifier_rvalueRef = Core.Name "rvalueRef"
-
-_TypeQualifier_pointer = Core.Name "pointer"
-
-data TemplateType =
-  TemplateType {
-    templateTypeName :: String,
-    templateTypeArguments :: [TemplateArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_TemplateType = Core.Name "hydra.cpp.syntax.TemplateType"
-
-_TemplateType_name = Core.Name "name"
-
-_TemplateType_arguments = Core.Name "arguments"
-
-data TemplateArgument =
-  TemplateArgumentType TypeExpression |
-  TemplateArgumentValue Expression
-  deriving (Eq, Ord, Read, Show)
-
-_TemplateArgument = Core.Name "hydra.cpp.syntax.TemplateArgument"
-
-_TemplateArgument_type = Core.Name "type"
-
-_TemplateArgument_value = Core.Name "value"
-
-data FunctionType =
-  FunctionType {
-    functionTypeReturnType :: TypeExpression,
-    functionTypeParameters :: [Parameter]}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionType = Core.Name "hydra.cpp.syntax.FunctionType"
-
-_FunctionType_returnType = Core.Name "returnType"
-
-_FunctionType_parameters = Core.Name "parameters"
-
-data Literal =
-  LiteralInteger IntegerLiteral |
-  LiteralFloating FloatingLiteral |
-  LiteralCharacter CharacterLiteral |
-  LiteralString StringLiteral |
-  LiteralBoolean BooleanLiteral |
-  LiteralNull
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.cpp.syntax.Literal"
-
-_Literal_integer = Core.Name "integer"
-
-_Literal_floating = Core.Name "floating"
-
-_Literal_character = Core.Name "character"
-
-_Literal_string = Core.Name "string"
-
-_Literal_boolean = Core.Name "boolean"
-
-_Literal_null = Core.Name "null"
-
-data IntegerLiteral =
-  IntegerLiteralDecimal Integer |
-  IntegerLiteralHexadecimal String |
-  IntegerLiteralOctal String |
-  IntegerLiteralBinary String
-  deriving (Eq, Ord, Read, Show)
-
-_IntegerLiteral = Core.Name "hydra.cpp.syntax.IntegerLiteral"
-
-_IntegerLiteral_decimal = Core.Name "decimal"
-
-_IntegerLiteral_hexadecimal = Core.Name "hexadecimal"
-
-_IntegerLiteral_octal = Core.Name "octal"
-
-_IntegerLiteral_binary = Core.Name "binary"
-
-newtype FloatingLiteral =
-  FloatingLiteral {
-    unFloatingLiteral :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_FloatingLiteral = Core.Name "hydra.cpp.syntax.FloatingLiteral"
-
-newtype CharacterLiteral =
-  CharacterLiteral {
-    unCharacterLiteral :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_CharacterLiteral = Core.Name "hydra.cpp.syntax.CharacterLiteral"
-
-newtype StringLiteral =
-  StringLiteral {
-    unStringLiteral :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteral = Core.Name "hydra.cpp.syntax.StringLiteral"
-
-newtype BooleanLiteral =
-  BooleanLiteral {
-    unBooleanLiteral :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanLiteral = Core.Name "hydra.cpp.syntax.BooleanLiteral"
-
-data Vector =
-  Vector {
-    vectorElementType :: TypeExpression,
-    vectorElements :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_Vector = Core.Name "hydra.cpp.syntax.Vector"
-
-_Vector_elementType = Core.Name "elementType"
-
-_Vector_elements = Core.Name "elements"
-
-data Map =
-  Map {
-    mapKeyType :: TypeExpression,
-    mapValueType :: TypeExpression,
-    mapEntries :: [MapEntry]}
-  deriving (Eq, Ord, Read, Show)
-
-_Map = Core.Name "hydra.cpp.syntax.Map"
-
-_Map_keyType = Core.Name "keyType"
-
-_Map_valueType = Core.Name "valueType"
-
-_Map_entries = Core.Name "entries"
-
-data MapEntry =
-  MapEntry {
-    mapEntryKey :: Expression,
-    mapEntryValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_MapEntry = Core.Name "hydra.cpp.syntax.MapEntry"
-
-_MapEntry_key = Core.Name "key"
-
-_MapEntry_value = Core.Name "value"
-
-data Set =
-  Set {
-    setElementType :: TypeExpression,
-    setElements :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_Set = Core.Name "hydra.cpp.syntax.Set"
-
-_Set_elementType = Core.Name "elementType"
-
-_Set_elements = Core.Name "elements"
-
-data Optional =
-  Optional {
-    optionalValueType :: TypeExpression,
-    optionalValue :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_Optional = Core.Name "hydra.cpp.syntax.Optional"
-
-_Optional_valueType = Core.Name "valueType"
-
-_Optional_value = Core.Name "value"
-
-type Identifier = String
-
-_Identifier = Core.Name "hydra.cpp.syntax.Identifier"
-
-data Comment =
-  Comment {
-    commentText :: String,
-    commentIsMultiline :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Comment = Core.Name "hydra.cpp.syntax.Comment"
-
-_Comment_text = Core.Name "text"
-
-_Comment_isMultiline = Core.Name "isMultiline"
-
-data BinaryOperator =
-  BinaryOperatorPlus  |
-  BinaryOperatorMinus  |
-  BinaryOperatorMultiply  |
-  BinaryOperatorDivide  |
-  BinaryOperatorModulo  |
-  BinaryOperatorBitwiseAnd  |
-  BinaryOperatorBitwiseOr  |
-  BinaryOperatorBitwiseXor  |
-  BinaryOperatorLogicalAnd  |
-  BinaryOperatorLogicalOr  |
-  BinaryOperatorEqual  |
-  BinaryOperatorNotEqual  |
-  BinaryOperatorLess  |
-  BinaryOperatorGreater  |
-  BinaryOperatorLessEqual  |
-  BinaryOperatorGreaterEqual  |
-  BinaryOperatorLeftShift  |
-  BinaryOperatorRightShift
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryOperator = Core.Name "hydra.cpp.syntax.BinaryOperator"
-
-_BinaryOperator_plus = Core.Name "plus"
-
-_BinaryOperator_minus = Core.Name "minus"
-
-_BinaryOperator_multiply = Core.Name "multiply"
-
-_BinaryOperator_divide = Core.Name "divide"
-
-_BinaryOperator_modulo = Core.Name "modulo"
-
-_BinaryOperator_bitwiseAnd = Core.Name "bitwiseAnd"
-
-_BinaryOperator_bitwiseOr = Core.Name "bitwiseOr"
-
-_BinaryOperator_bitwiseXor = Core.Name "bitwiseXor"
-
-_BinaryOperator_logicalAnd = Core.Name "logicalAnd"
-
-_BinaryOperator_logicalOr = Core.Name "logicalOr"
-
-_BinaryOperator_equal = Core.Name "equal"
-
-_BinaryOperator_notEqual = Core.Name "notEqual"
-
-_BinaryOperator_less = Core.Name "less"
-
-_BinaryOperator_greater = Core.Name "greater"
-
-_BinaryOperator_lessEqual = Core.Name "lessEqual"
-
-_BinaryOperator_greaterEqual = Core.Name "greaterEqual"
-
-_BinaryOperator_leftShift = Core.Name "leftShift"
-
-_BinaryOperator_rightShift = Core.Name "rightShift"
diff --git a/src/main/haskell/Hydra/Cpp/Utils.hs b/src/main/haskell/Hydra/Cpp/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cpp/Utils.hs
+++ /dev/null
@@ -1,278 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | C++ utilities for constructing C++ syntax trees
-
-module Hydra.Cpp.Utils where
-
-import qualified Hydra.Cpp.Syntax as Syntax
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Create a const reference parameter
-constParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter
-constParameter name typ =
-    Syntax.Parameter {
-      Syntax.parameterType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-        Syntax.qualifiedTypeBaseType = (Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-          Syntax.qualifiedTypeBaseType = typ,
-          Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})),
-        Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierLvalueRef})),
-      Syntax.parameterName = name,
-      Syntax.parameterUnnamed = False,
-      Syntax.parameterDefaultValue = Nothing}
-
--- | Create a C++ class declaration
-cppClassDeclaration :: String -> [Syntax.BaseSpecifier] -> Maybe Syntax.ClassBody -> Syntax.Declaration
-cppClassDeclaration name baseSpecs mbody =
-    Syntax.DeclarationClass (Syntax.ClassDeclaration {
-      Syntax.classDeclarationSpecifier = Syntax.ClassSpecifier {
-        Syntax.classSpecifierKey = Syntax.ClassKeyClass,
-        Syntax.classSpecifierName = name,
-        Syntax.classSpecifierInheritance = baseSpecs},
-      Syntax.classDeclarationBody = mbody})
-
--- | Create a C++ enum class declaration
-cppEnumDeclaration :: String -> Maybe Syntax.ClassBody -> Syntax.Declaration
-cppEnumDeclaration name mbody =
-    Syntax.DeclarationClass (Syntax.ClassDeclaration {
-      Syntax.classDeclarationSpecifier = Syntax.ClassSpecifier {
-        Syntax.classSpecifierKey = Syntax.ClassKeyEnumClass,
-        Syntax.classSpecifierName = name,
-        Syntax.classSpecifierInheritance = []},
-      Syntax.classDeclarationBody = mbody})
-
--- | Create a C++ enum class forward declaration
-cppEnumForwardDeclaration :: String -> Syntax.Declaration
-cppEnumForwardDeclaration name =
-    Syntax.DeclarationClass (Syntax.ClassDeclaration {
-      Syntax.classDeclarationSpecifier = Syntax.ClassSpecifier {
-        Syntax.classSpecifierKey = Syntax.ClassKeyEnumClass,
-        Syntax.classSpecifierName = name,
-        Syntax.classSpecifierInheritance = []},
-      Syntax.classDeclarationBody = Nothing})
-
--- | Convert a PostfixExpression to an Expression
-cppPostfixExpressionToCppExpression :: Syntax.PostfixExpression -> Syntax.Expression
-cppPostfixExpressionToCppExpression pf = cppUnaryExpressionToCppExpression (Syntax.UnaryExpressionPostfix pf)
-
--- | Convert a PrimaryExpression to an Expression
-cppPrimaryExpressionToCppExpression :: Syntax.PrimaryExpression -> Syntax.Expression
-cppPrimaryExpressionToCppExpression prim = cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary prim)
-
--- | Convert a UnaryExpression to an Expression
-cppUnaryExpressionToCppExpression :: Syntax.UnaryExpression -> Syntax.Expression
-cppUnaryExpressionToCppExpression ue =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionLogicalOr (cppUnaryExpressionToCppLogicalOrExpression ue)))
-
--- | Convert a UnaryExpression to a LogicalOrExpression
-cppUnaryExpressionToCppLogicalOrExpression :: Syntax.UnaryExpression -> Syntax.LogicalOrExpression
-cppUnaryExpressionToCppLogicalOrExpression ue =
-    Syntax.LogicalOrExpressionLogicalAnd (Syntax.LogicalAndExpressionInclusiveOr (Syntax.InclusiveOrExpressionExclusiveOr (Syntax.ExclusiveOrExpressionAnd (Syntax.AndExpressionEquality (Syntax.EqualityExpressionRelational (Syntax.RelationalExpressionShift (Syntax.ShiftExpressionAdditive (Syntax.AdditiveExpressionMultiplicative (Syntax.MultiplicativeExpressionUnary ue)))))))))
-
--- | Create a cast expression
-createCastExpr :: t0 -> Syntax.Expression -> Syntax.Expression
-createCastExpr targetType expr =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized (cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized expr)))
-
--- | Create a compound statement
-createCompoundStmt :: [Syntax.Statement] -> Syntax.CompoundStatement
-createCompoundStmt stmts = Syntax.CompoundStatement stmts
-
--- | Create a const reference type
-createConstRefType :: Syntax.TypeExpression -> Syntax.TypeExpression
-createConstRefType baseType = createReferenceType (createConstType baseType)
-
--- | Create a const-qualified type
-createConstType :: Syntax.TypeExpression -> Syntax.TypeExpression
-createConstType baseType = createQualifiedType baseType Syntax.TypeQualifierConst
-
--- | Create a constructor body (default if no params, empty otherwise)
-createConstructorBody :: [t0] -> Syntax.FunctionBody
-createConstructorBody params = Logic.ifElse (Lists.null params) Syntax.FunctionBodyDefault emptyFunctionBody
-
--- | Create an enum access expression
-createEnumAccessExpr :: String -> String -> Syntax.Expression
-createEnumAccessExpr enumName valueName =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation {
-      Syntax.memberAccessOperationObject = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier enumName)),
-      Syntax.memberAccessOperationMember = valueName}))
-
--- | Create a function call expression
-createFunctionCallExpr :: String -> [Syntax.Expression] -> Syntax.Expression
-createFunctionCallExpr funcName args =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-      Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier funcName)),
-      Syntax.functionCallOperationArguments = args}))
-
--- | Create a header file with pragma once
-createHeaderFile :: [Syntax.IncludeDirective] -> [Syntax.Declaration] -> Syntax.Program
-createHeaderFile includes decls =
-    Syntax.Program {
-      Syntax.programPreprocessorDirectives = [
-        Syntax.PreprocessorDirectivePragma (Syntax.PragmaDirective {
-          Syntax.pragmaDirectiveContent = "once"})],
-      Syntax.programIncludes = includes,
-      Syntax.programDeclarations = decls}
-
--- | Create an identifier expression
-createIdentifierExpr :: String -> Syntax.Expression
-createIdentifierExpr name = cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionIdentifier name)
-
--- | Create a lambda expression
-createLambdaExpr :: [Syntax.Parameter] -> Syntax.Expression -> Syntax.Expression
-createLambdaExpr params body =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionLambda (Syntax.LambdaExpression {
-      Syntax.lambdaExpressionCaptures = (Syntax.CaptureListCaptures []),
-      Syntax.lambdaExpressionParameters = params,
-      Syntax.lambdaExpressionReturnType = Nothing,
-      Syntax.lambdaExpressionBody = (Syntax.CompoundStatement [
-        Syntax.StatementExpression body])})))
-
--- | Create a boolean literal expression
-createLiteralBoolExpr :: Bool -> Syntax.Expression
-createLiteralBoolExpr val =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralBoolean (Syntax.BooleanLiteral val)))
-
--- | Create an integer literal expression
-createLiteralIntExpr :: Integer -> Syntax.Expression
-createLiteralIntExpr val =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteralDecimal val)))
-
--- | Create a string literal expression
-createLiteralStringExpr :: String -> Syntax.Expression
-createLiteralStringExpr val =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral val)))
-
--- | Create a member access expression
-createMemberAccessExpr :: Syntax.Expression -> String -> Syntax.Expression
-createMemberAccessExpr objExpr member =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation {
-      Syntax.memberAccessOperationObject = (extractPostfixExpression objExpr),
-      Syntax.memberAccessOperationMember = member}))
-
--- | Create a qualified type with a qualifier
-createQualifiedType :: Syntax.TypeExpression -> Syntax.TypeQualifier -> Syntax.TypeExpression
-createQualifiedType baseType qualifier =
-    Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-      Syntax.qualifiedTypeBaseType = baseType,
-      Syntax.qualifiedTypeQualifier = qualifier})
-
--- | Create a reference type
-createReferenceType :: Syntax.TypeExpression -> Syntax.TypeExpression
-createReferenceType baseType = createQualifiedType baseType Syntax.TypeQualifierLvalueRef
-
--- | Create a return statement with a value
-createReturnStmt :: Syntax.Expression -> Syntax.Statement
-createReturnStmt expr = Syntax.StatementJump (Syntax.JumpStatementReturnValue expr)
-
--- | Create a void return statement
-createReturnVoidStmt :: Syntax.Statement
-createReturnVoidStmt = Syntax.StatementJump Syntax.JumpStatementReturnVoid
-
--- | Create a template type
-createTemplateType :: String -> [Syntax.TypeExpression] -> Syntax.TypeExpression
-createTemplateType name args =
-    Syntax.TypeExpressionTemplate (Syntax.TemplateType {
-      Syntax.templateTypeName = name,
-      Syntax.templateTypeArguments = (Lists.map (\a -> Syntax.TemplateArgumentType a) args)})
-
--- | Create a *this expression
-createThisExpr :: Syntax.Expression
-createThisExpr =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "*this"))
-
--- | Create a throw statement
-createThrowStmt :: String -> Syntax.Expression -> Syntax.Statement
-createThrowStmt exceptionType arg =
-    Syntax.StatementJump (Syntax.JumpStatementThrow (createFunctionCallExpr exceptionType [
-      arg]))
-
--- | Create a typeid(...).name() call expression
-createTypeIdNameCall :: Syntax.Expression
-createTypeIdNameCall =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-      Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionMemberAccess (Syntax.MemberAccessOperation {
-        Syntax.memberAccessOperationObject = (Syntax.PostfixExpressionFunctionCall (Syntax.FunctionCallOperation {
-          Syntax.functionCallOperationFunction = (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "typeid")),
-          Syntax.functionCallOperationArguments = [
-            cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionParenthesized createThisExpr)]})),
-        Syntax.memberAccessOperationMember = "name"})),
-      Syntax.functionCallOperationArguments = []}))
-
--- | Create a type name expression
-createTypeNameExpr :: String -> Syntax.Expression
-createTypeNameExpr typeName =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier typeName))
-
--- | Create a variant expression
-createVariantExpr :: Syntax.Expression
-createVariantExpr =
-    cppPostfixExpressionToCppExpression (Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "variant"))
-
--- | An empty function body
-emptyFunctionBody :: Syntax.FunctionBody
-emptyFunctionBody = Syntax.FunctionBodyCompound (Syntax.CompoundStatement [])
-
--- | Extract the PostfixExpression from a fully-wrapped Expression
-extractPostfixExpression :: Syntax.Expression -> Syntax.PostfixExpression
-extractPostfixExpression expr =
-    case expr of
-      Syntax.ExpressionAssignment v0 -> case v0 of
-        Syntax.AssignmentExpressionConditional v1 -> case v1 of
-          Syntax.ConditionalExpressionLogicalOr v2 -> case v2 of
-            Syntax.LogicalOrExpressionLogicalAnd v3 -> case v3 of
-              Syntax.LogicalAndExpressionInclusiveOr v4 -> case v4 of
-                Syntax.InclusiveOrExpressionExclusiveOr v5 -> case v5 of
-                  Syntax.ExclusiveOrExpressionAnd v6 -> case v6 of
-                    Syntax.AndExpressionEquality v7 -> case v7 of
-                      Syntax.EqualityExpressionRelational v8 -> case v8 of
-                        Syntax.RelationalExpressionShift v9 -> case v9 of
-                          Syntax.ShiftExpressionAdditive v10 -> case v10 of
-                            Syntax.AdditiveExpressionMultiplicative v11 -> case v11 of
-                              Syntax.MultiplicativeExpressionUnary v12 -> case v12 of
-                                Syntax.UnaryExpressionPostfix v13 -> v13
-                                _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                              _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                            _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                          _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                        _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                      _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                    _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                  _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-                _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-              _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-            _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-          _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-        _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-      _ -> Syntax.PostfixExpressionPrimary (Syntax.PrimaryExpressionIdentifier "error")
-
--- | Protected access specifier member specification
-memberSpecificationProtected :: Syntax.MemberSpecification
-memberSpecificationProtected = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierProtected
-
--- | Public access specifier member specification
-memberSpecificationPublic :: Syntax.MemberSpecification
-memberSpecificationPublic = Syntax.MemberSpecificationAccessLabel Syntax.AccessSpecifierPublic
-
--- | Create a string expression
-stringExpression :: String -> Syntax.Expression
-stringExpression s =
-    cppPrimaryExpressionToCppExpression (Syntax.PrimaryExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral s)))
-
--- | Add const qualifier to a type
-toConstType :: Syntax.TypeExpression -> Syntax.TypeExpression
-toConstType baseType =
-    Syntax.TypeExpressionQualified (Syntax.QualifiedType {
-      Syntax.qualifiedTypeBaseType = baseType,
-      Syntax.qualifiedTypeQualifier = Syntax.TypeQualifierConst})
-
--- | Create an unnamed parameter
-unnamedParameter :: String -> Syntax.TypeExpression -> Syntax.Parameter
-unnamedParameter name typ =
-    Syntax.Parameter {
-      Syntax.parameterType = typ,
-      Syntax.parameterName = name,
-      Syntax.parameterUnnamed = True,
-      Syntax.parameterDefaultValue = Nothing}
diff --git a/src/main/haskell/Hydra/Csharp/Language.hs b/src/main/haskell/Hydra/Csharp/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Csharp/Language.hs
+++ /dev/null
@@ -1,214 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for C Sharp (C#)
-
-module Hydra.Csharp.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
--- | Language constraints for C Sharp (C#)
-csharpLanguage :: Coders.Language
-csharpLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.csharp"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint8,
-          Core.IntegerTypeUint16,
-          Core.IntegerTypeUint32,
-          Core.IntegerTypeUint64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantApplication,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
--- | A set of reserved words in C#. Both the "keywords" and "contextual keywords" are drawn from section 6.4.4 of the C# documentation:
--- | https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#64-tokens
-csharpReservedWords :: S.Set String
-csharpReservedWords =
-    Sets.fromList (Lists.concat [
-      keywords,
-      contextualKeywords])
-  where
-    keywords =
-        [
-          "DEFAULT",
-          "FALSE",
-          "NULL",
-          "TRUE",
-          "abstract",
-          "as",
-          "base",
-          "bool",
-          "break",
-          "byte",
-          "case",
-          "catch",
-          "char",
-          "checked",
-          "class",
-          "const",
-          "continue",
-          "decimal",
-          "delegate",
-          "do",
-          "double",
-          "else",
-          "enum",
-          "event",
-          "explicit",
-          "extern",
-          "finally",
-          "fixed",
-          "float",
-          "for",
-          "foreach",
-          "goto",
-          "if",
-          "implicit",
-          "in",
-          "int",
-          "interface",
-          "internal",
-          "is",
-          "lock",
-          "long",
-          "namespace",
-          "new",
-          "object",
-          "operator",
-          "out",
-          "override",
-          "params",
-          "private",
-          "protected",
-          "public",
-          "readonly",
-          "ref",
-          "return",
-          "sbyte",
-          "sealed",
-          "short",
-          "sizeof",
-          "stackalloc",
-          "static",
-          "string",
-          "struct",
-          "switch",
-          "this",
-          "throw",
-          "try",
-          "typeof",
-          "uint",
-          "ulong",
-          "unchecked",
-          "unsafe",
-          "ushort",
-          "using",
-          "virtual",
-          "void",
-          "volatile",
-          "while"]
-    contextualKeywords =
-        [
-          "add",
-          "alias",
-          "ascending",
-          "async",
-          "await",
-          "by",
-          "descending",
-          "dynamic",
-          "equals",
-          "from",
-          "get",
-          "global",
-          "group",
-          "into",
-          "join",
-          "let",
-          "nameof",
-          "on",
-          "orderby",
-          "partial",
-          "remove",
-          "select",
-          "set",
-          "unmanaged",
-          "value",
-          "var",
-          "when",
-          "where",
-          "yield"]
diff --git a/src/main/haskell/Hydra/Csharp/Syntax.hs b/src/main/haskell/Hydra/Csharp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Csharp/Syntax.hs
+++ /dev/null
@@ -1,4964 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A C# syntax module based on the ANTLR grammar dated 02/07/2024 and available at:
--- |   https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/grammar
-
-module Hydra.Csharp.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
-
-newtype Identifier =
-  Identifier {
-    unIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Identifier = Core.Name "hydra.csharp.syntax.Identifier"
-
-newtype Keyword =
-  Keyword {
-    unKeyword :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Keyword = Core.Name "hydra.csharp.syntax.Keyword"
-
-data Literal =
-  LiteralBoolean Bool |
-  LiteralInteger IntegerLiteral |
-  LiteralReal Double |
-  LiteralCharacter String |
-  LiteralString String |
-  LiteralNull
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.csharp.syntax.Literal"
-
-_Literal_boolean = Core.Name "boolean"
-
-_Literal_integer = Core.Name "integer"
-
-_Literal_real = Core.Name "real"
-
-_Literal_character = Core.Name "character"
-
-_Literal_string = Core.Name "string"
-
-_Literal_null = Core.Name "null"
-
-data IntegerLiteral =
-  IntegerLiteralDecimal String |
-  IntegerLiteralHexadecimal String |
-  IntegerLiteralBinary Integer
-  deriving (Eq, Ord, Read, Show)
-
-_IntegerLiteral = Core.Name "hydra.csharp.syntax.IntegerLiteral"
-
-_IntegerLiteral_decimal = Core.Name "decimal"
-
-_IntegerLiteral_hexadecimal = Core.Name "hexadecimal"
-
-_IntegerLiteral_binary = Core.Name "binary"
-
-newtype NamespaceName =
-  NamespaceName {
-    unNamespaceName :: NamespaceOrTypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_NamespaceName = Core.Name "hydra.csharp.syntax.NamespaceName"
-
-newtype TypeName =
-  TypeName {
-    unTypeName :: NamespaceOrTypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeName = Core.Name "hydra.csharp.syntax.TypeName"
-
-data NamespaceOrTypeName =
-  NamespaceOrTypeNameIdentifier IdentifierNamespaceOrTypeName |
-  NamespaceOrTypeNameQualified QualifiedNamespaceOrTypeName |
-  NamespaceOrTypeNameAlias QualifiedAliasMember
-  deriving (Eq, Ord, Read, Show)
-
-_NamespaceOrTypeName = Core.Name "hydra.csharp.syntax.NamespaceOrTypeName"
-
-_NamespaceOrTypeName_identifier = Core.Name "identifier"
-
-_NamespaceOrTypeName_qualified = Core.Name "qualified"
-
-_NamespaceOrTypeName_alias = Core.Name "alias"
-
-data IdentifierNamespaceOrTypeName =
-  IdentifierNamespaceOrTypeName {
-    identifierNamespaceOrTypeNameIdentifier :: Identifier,
-    identifierNamespaceOrTypeNameArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_IdentifierNamespaceOrTypeName = Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"
-
-_IdentifierNamespaceOrTypeName_identifier = Core.Name "identifier"
-
-_IdentifierNamespaceOrTypeName_arguments = Core.Name "arguments"
-
-data QualifiedNamespaceOrTypeName =
-  QualifiedNamespaceOrTypeName {
-    qualifiedNamespaceOrTypeNameNamespaceOrType :: NamespaceOrTypeName,
-    qualifiedNamespaceOrTypeNameIdentifier :: Identifier,
-    qualifiedNamespaceOrTypeNameArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedNamespaceOrTypeName = Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"
-
-_QualifiedNamespaceOrTypeName_namespaceOrType = Core.Name "namespaceOrType"
-
-_QualifiedNamespaceOrTypeName_identifier = Core.Name "identifier"
-
-_QualifiedNamespaceOrTypeName_arguments = Core.Name "arguments"
-
-data Type =
-  TypeReference ReferenceType |
-  TypeValue ValueType |
-  TypeParam TypeParameter |
-  TypePointer PointerType
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.csharp.syntax.Type"
-
-_Type_reference = Core.Name "reference"
-
-_Type_value = Core.Name "value"
-
-_Type_param = Core.Name "param"
-
-_Type_pointer = Core.Name "pointer"
-
-data ReferenceType =
-  ReferenceTypeClass ClassType |
-  ReferenceTypeInterface InterfaceType |
-  ReferenceTypeArray ArrayType |
-  ReferenceTypeDelegate DelegateType |
-  ReferenceTypeDynamic
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceType = Core.Name "hydra.csharp.syntax.ReferenceType"
-
-_ReferenceType_class = Core.Name "class"
-
-_ReferenceType_interface = Core.Name "interface"
-
-_ReferenceType_array = Core.Name "array"
-
-_ReferenceType_delegate = Core.Name "delegate"
-
-_ReferenceType_dynamic = Core.Name "dynamic"
-
-data ClassType =
-  ClassTypeTypeName TypeName |
-  ClassTypeObject  |
-  ClassTypeString
-  deriving (Eq, Ord, Read, Show)
-
-_ClassType = Core.Name "hydra.csharp.syntax.ClassType"
-
-_ClassType_typeName = Core.Name "typeName"
-
-_ClassType_object = Core.Name "object"
-
-_ClassType_string = Core.Name "string"
-
-newtype InterfaceType =
-  InterfaceType {
-    unInterfaceType :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceType = Core.Name "hydra.csharp.syntax.InterfaceType"
-
-data ArrayType =
-  ArrayType {
-    arrayTypeType :: NonArrayType,
-    arrayTypeRank :: [RankSpecifier]}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayType = Core.Name "hydra.csharp.syntax.ArrayType"
-
-_ArrayType_type = Core.Name "type"
-
-_ArrayType_rank = Core.Name "rank"
-
-data NonArrayType =
-  NonArrayTypeValue ValueType |
-  NonArrayTypeClass ClassType |
-  NonArrayTypeInterface InterfaceType |
-  NonArrayTypeDelegate DelegateType |
-  NonArrayTypeDynamic  |
-  NonArrayTypeParameter TypeParameter |
-  NonArrayTypePointer PointerType
-  deriving (Eq, Ord, Read, Show)
-
-_NonArrayType = Core.Name "hydra.csharp.syntax.NonArrayType"
-
-_NonArrayType_value = Core.Name "value"
-
-_NonArrayType_class = Core.Name "class"
-
-_NonArrayType_interface = Core.Name "interface"
-
-_NonArrayType_delegate = Core.Name "delegate"
-
-_NonArrayType_dynamic = Core.Name "dynamic"
-
-_NonArrayType_parameter = Core.Name "parameter"
-
-_NonArrayType_pointer = Core.Name "pointer"
-
-newtype RankSpecifier =
-  RankSpecifier {
-    unRankSpecifier :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_RankSpecifier = Core.Name "hydra.csharp.syntax.RankSpecifier"
-
-newtype DelegateType =
-  DelegateType {
-    unDelegateType :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_DelegateType = Core.Name "hydra.csharp.syntax.DelegateType"
-
-data ValueType =
-  ValueTypeNonNullable StructOrEnumType |
-  ValueTypeNullable StructOrEnumType
-  deriving (Eq, Ord, Read, Show)
-
-_ValueType = Core.Name "hydra.csharp.syntax.ValueType"
-
-_ValueType_nonNullable = Core.Name "nonNullable"
-
-_ValueType_nullable = Core.Name "nullable"
-
-data StructOrEnumType =
-  StructOrEnumTypeStruct StructType |
-  StructOrEnumTypeEnum EnumType
-  deriving (Eq, Ord, Read, Show)
-
-_StructOrEnumType = Core.Name "hydra.csharp.syntax.StructOrEnumType"
-
-_StructOrEnumType_struct = Core.Name "struct"
-
-_StructOrEnumType_enum = Core.Name "enum"
-
-data StructType =
-  StructTypeTypeName TypeName |
-  StructTypeSimple SimpleType |
-  StructTypeTuple TupleType
-  deriving (Eq, Ord, Read, Show)
-
-_StructType = Core.Name "hydra.csharp.syntax.StructType"
-
-_StructType_typeName = Core.Name "typeName"
-
-_StructType_simple = Core.Name "simple"
-
-_StructType_tuple = Core.Name "tuple"
-
-data SimpleType =
-  SimpleTypeNumeric NumericType |
-  SimpleTypeBool
-  deriving (Eq, Ord, Read, Show)
-
-_SimpleType = Core.Name "hydra.csharp.syntax.SimpleType"
-
-_SimpleType_numeric = Core.Name "numeric"
-
-_SimpleType_bool = Core.Name "bool"
-
-data NumericType =
-  NumericTypeIntegral IntegralType |
-  NumericTypeFloatingPoint FloatingPointType |
-  NumericTypeDecimal
-  deriving (Eq, Ord, Read, Show)
-
-_NumericType = Core.Name "hydra.csharp.syntax.NumericType"
-
-_NumericType_integral = Core.Name "integral"
-
-_NumericType_floatingPoint = Core.Name "floatingPoint"
-
-_NumericType_decimal = Core.Name "decimal"
-
-data IntegralType =
-  IntegralTypeSbyte  |
-  IntegralTypeByte  |
-  IntegralTypeShort  |
-  IntegralTypeUshort  |
-  IntegralTypeInt  |
-  IntegralTypeUint  |
-  IntegralTypeLong  |
-  IntegralTypeUlong  |
-  IntegralTypeChar
-  deriving (Eq, Ord, Read, Show)
-
-_IntegralType = Core.Name "hydra.csharp.syntax.IntegralType"
-
-_IntegralType_sbyte = Core.Name "sbyte"
-
-_IntegralType_byte = Core.Name "byte"
-
-_IntegralType_short = Core.Name "short"
-
-_IntegralType_ushort = Core.Name "ushort"
-
-_IntegralType_int = Core.Name "int"
-
-_IntegralType_uint = Core.Name "uint"
-
-_IntegralType_long = Core.Name "long"
-
-_IntegralType_ulong = Core.Name "ulong"
-
-_IntegralType_char = Core.Name "char"
-
-data FloatingPointType =
-  FloatingPointTypeFloat  |
-  FloatingPointTypeDouble
-  deriving (Eq, Ord, Read, Show)
-
-_FloatingPointType = Core.Name "hydra.csharp.syntax.FloatingPointType"
-
-_FloatingPointType_float = Core.Name "float"
-
-_FloatingPointType_double = Core.Name "double"
-
-newtype TupleType =
-  TupleType {
-    unTupleType :: [TupleTypeElement]}
-  deriving (Eq, Ord, Read, Show)
-
-_TupleType = Core.Name "hydra.csharp.syntax.TupleType"
-
-data TupleTypeElement =
-  TupleTypeElement {
-    tupleTypeElementType :: Type,
-    tupleTypeElementIdentifier :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-
-_TupleTypeElement = Core.Name "hydra.csharp.syntax.TupleTypeElement"
-
-_TupleTypeElement_type = Core.Name "type"
-
-_TupleTypeElement_identifier = Core.Name "identifier"
-
-newtype EnumType =
-  EnumType {
-    unEnumType :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumType = Core.Name "hydra.csharp.syntax.EnumType"
-
-newtype TypeArgumentList =
-  TypeArgumentList {
-    unTypeArgumentList :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeArgumentList = Core.Name "hydra.csharp.syntax.TypeArgumentList"
-
-newtype TypeParameter =
-  TypeParameter {
-    unTypeParameter :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameter = Core.Name "hydra.csharp.syntax.TypeParameter"
-
-data UnmanagedType =
-  UnmanagedTypeValue ValueType |
-  UnmanagedTypePointer PointerType
-  deriving (Eq, Ord, Read, Show)
-
-_UnmanagedType = Core.Name "hydra.csharp.syntax.UnmanagedType"
-
-_UnmanagedType_value = Core.Name "value"
-
-_UnmanagedType_pointer = Core.Name "pointer"
-
-newtype VariableReference =
-  VariableReference {
-    unVariableReference :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_VariableReference = Core.Name "hydra.csharp.syntax.VariableReference"
-
-data Pattern =
-  PatternDeclaration DeclarationPattern |
-  PatternConstant Expression |
-  PatternVar Designation
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern = Core.Name "hydra.csharp.syntax.Pattern"
-
-_Pattern_declaration = Core.Name "declaration"
-
-_Pattern_constant = Core.Name "constant"
-
-_Pattern_var = Core.Name "var"
-
-data DeclarationPattern =
-  DeclarationPattern {
-    declarationPatternType :: Type,
-    declarationPatternDesignation :: Designation}
-  deriving (Eq, Ord, Read, Show)
-
-_DeclarationPattern = Core.Name "hydra.csharp.syntax.DeclarationPattern"
-
-_DeclarationPattern_type = Core.Name "type"
-
-_DeclarationPattern_designation = Core.Name "designation"
-
-newtype Designation =
-  Designation {
-    unDesignation :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_Designation = Core.Name "hydra.csharp.syntax.Designation"
-
-newtype ArgumentList =
-  ArgumentList {
-    unArgumentList :: [Argument]}
-  deriving (Eq, Ord, Read, Show)
-
-_ArgumentList = Core.Name "hydra.csharp.syntax.ArgumentList"
-
-data Argument =
-  Argument {
-    argumentName :: (Maybe Identifier),
-    argumentValue :: ArgumentValue}
-  deriving (Eq, Ord, Read, Show)
-
-_Argument = Core.Name "hydra.csharp.syntax.Argument"
-
-_Argument_name = Core.Name "name"
-
-_Argument_value = Core.Name "value"
-
-data ArgumentValue =
-  ArgumentValueExpression Expression |
-  ArgumentValueIn VariableReference |
-  ArgumentValueRef VariableReference |
-  ArgumentValueOut VariableReference
-  deriving (Eq, Ord, Read, Show)
-
-_ArgumentValue = Core.Name "hydra.csharp.syntax.ArgumentValue"
-
-_ArgumentValue_expression = Core.Name "expression"
-
-_ArgumentValue_in = Core.Name "in"
-
-_ArgumentValue_ref = Core.Name "ref"
-
-_ArgumentValue_out = Core.Name "out"
-
-data PrimaryExpression =
-  PrimaryExpressionNoArray PrimaryNoArrayCreationExpression |
-  PrimaryExpressionArray ArrayCreationExpression
-  deriving (Eq, Ord, Read, Show)
-
-_PrimaryExpression = Core.Name "hydra.csharp.syntax.PrimaryExpression"
-
-_PrimaryExpression_noArray = Core.Name "noArray"
-
-_PrimaryExpression_array = Core.Name "array"
-
-data PrimaryNoArrayCreationExpression =
-  PrimaryNoArrayCreationExpressionLiteral Literal |
-  PrimaryNoArrayCreationExpressionInterpolatedString InterpolatedStringExpression |
-  PrimaryNoArrayCreationExpressionSimpleName SimpleName |
-  PrimaryNoArrayCreationExpressionParenthesized Expression |
-  PrimaryNoArrayCreationExpressionTuple TupleExpression |
-  PrimaryNoArrayCreationExpressionMemberAccess MemberAccess |
-  PrimaryNoArrayCreationExpressionNullConditionalMemberAccess NullConditionalMemberAccess |
-  PrimaryNoArrayCreationExpressionInvocation InvocationExpression |
-  PrimaryNoArrayCreationExpressionElementAccess ElementAccess |
-  PrimaryNoArrayCreationExpressionNullConditionalElementAccess NullConditionalElementAccess |
-  PrimaryNoArrayCreationExpressionThisAccess  |
-  PrimaryNoArrayCreationExpressionBaseAccess BaseAccess |
-  PrimaryNoArrayCreationExpressionPostIncrement PrimaryExpression |
-  PrimaryNoArrayCreationExpressionPostDecrement PrimaryExpression |
-  PrimaryNoArrayCreationExpressionObjectCreation ObjectCreationExpression |
-  PrimaryNoArrayCreationExpressionDelegateCreation DelegateCreationExpression |
-  PrimaryNoArrayCreationExpressionAnonymousObjectCreation (Maybe MemberDeclaratorList) |
-  PrimaryNoArrayCreationExpressionTypeof TypeofExpression |
-  PrimaryNoArrayCreationExpressionSizeof UnmanagedType |
-  PrimaryNoArrayCreationExpressionChecked Expression |
-  PrimaryNoArrayCreationExpressionUnchecked Expression |
-  PrimaryNoArrayCreationExpressionDefaultValue DefaultValueExpression |
-  PrimaryNoArrayCreationExpressionNameof NamedEntity |
-  PrimaryNoArrayCreationExpressionAnonymousMethod AnonymousMethodExpression |
-  PrimaryNoArrayCreationExpressionPointerMemberAccess PointerMemberAccess |
-  PrimaryNoArrayCreationExpressionPointerElementAccess PointerElementAccess |
-  PrimaryNoArrayCreationExpressionStackalloc StackallocExpression
-  deriving (Eq, Ord, Read, Show)
-
-_PrimaryNoArrayCreationExpression = Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"
-
-_PrimaryNoArrayCreationExpression_literal = Core.Name "literal"
-
-_PrimaryNoArrayCreationExpression_interpolatedString = Core.Name "interpolatedString"
-
-_PrimaryNoArrayCreationExpression_simpleName = Core.Name "simpleName"
-
-_PrimaryNoArrayCreationExpression_parenthesized = Core.Name "parenthesized"
-
-_PrimaryNoArrayCreationExpression_tuple = Core.Name "tuple"
-
-_PrimaryNoArrayCreationExpression_memberAccess = Core.Name "memberAccess"
-
-_PrimaryNoArrayCreationExpression_nullConditionalMemberAccess = Core.Name "nullConditionalMemberAccess"
-
-_PrimaryNoArrayCreationExpression_invocation = Core.Name "invocation"
-
-_PrimaryNoArrayCreationExpression_elementAccess = Core.Name "elementAccess"
-
-_PrimaryNoArrayCreationExpression_nullConditionalElementAccess = Core.Name "nullConditionalElementAccess"
-
-_PrimaryNoArrayCreationExpression_thisAccess = Core.Name "thisAccess"
-
-_PrimaryNoArrayCreationExpression_baseAccess = Core.Name "baseAccess"
-
-_PrimaryNoArrayCreationExpression_postIncrement = Core.Name "postIncrement"
-
-_PrimaryNoArrayCreationExpression_postDecrement = Core.Name "postDecrement"
-
-_PrimaryNoArrayCreationExpression_objectCreation = Core.Name "objectCreation"
-
-_PrimaryNoArrayCreationExpression_delegateCreation = Core.Name "delegateCreation"
-
-_PrimaryNoArrayCreationExpression_anonymousObjectCreation = Core.Name "anonymousObjectCreation"
-
-_PrimaryNoArrayCreationExpression_typeof = Core.Name "typeof"
-
-_PrimaryNoArrayCreationExpression_sizeof = Core.Name "sizeof"
-
-_PrimaryNoArrayCreationExpression_checked = Core.Name "checked"
-
-_PrimaryNoArrayCreationExpression_unchecked = Core.Name "unchecked"
-
-_PrimaryNoArrayCreationExpression_defaultValue = Core.Name "defaultValue"
-
-_PrimaryNoArrayCreationExpression_nameof = Core.Name "nameof"
-
-_PrimaryNoArrayCreationExpression_anonymousMethod = Core.Name "anonymousMethod"
-
-_PrimaryNoArrayCreationExpression_pointerMemberAccess = Core.Name "pointerMemberAccess"
-
-_PrimaryNoArrayCreationExpression_pointerElementAccess = Core.Name "pointerElementAccess"
-
-_PrimaryNoArrayCreationExpression_stackalloc = Core.Name "stackalloc"
-
-data InterpolatedStringExpression =
-  InterpolatedStringExpressionRegular InterpolatedRegularStringExpression |
-  InterpolatedStringExpressionVerbatim InterpolatedVerbatimStringExpression
-  deriving (Eq, Ord, Read, Show)
-
-_InterpolatedStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedStringExpression"
-
-_InterpolatedStringExpression_regular = Core.Name "regular"
-
-_InterpolatedStringExpression_verbatim = Core.Name "verbatim"
-
-newtype InterpolatedRegularStringExpression =
-  InterpolatedRegularStringExpression {
-    unInterpolatedRegularStringExpression :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_InterpolatedRegularStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedRegularStringExpression"
-
-data RegularInterpolation =
-  RegularInterpolation {
-    regularInterpolationExpression :: Expression,
-    regularInterpolationWidth :: (Maybe Expression),
-    regularInterpolationFormat :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_RegularInterpolation = Core.Name "hydra.csharp.syntax.RegularInterpolation"
-
-_RegularInterpolation_expression = Core.Name "expression"
-
-_RegularInterpolation_width = Core.Name "width"
-
-_RegularInterpolation_format = Core.Name "format"
-
-newtype InterpolatedVerbatimStringExpression =
-  InterpolatedVerbatimStringExpression {
-    unInterpolatedVerbatimStringExpression :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_InterpolatedVerbatimStringExpression = Core.Name "hydra.csharp.syntax.InterpolatedVerbatimStringExpression"
-
-data VerbatimInterpolation =
-  VerbatimInterpolation {
-    verbatimInterpolationExpression :: Expression,
-    verbatimInterpolationWidth :: (Maybe ConstantExpression),
-    verbatimInterpolationFormat :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_VerbatimInterpolation = Core.Name "hydra.csharp.syntax.VerbatimInterpolation"
-
-_VerbatimInterpolation_expression = Core.Name "expression"
-
-_VerbatimInterpolation_width = Core.Name "width"
-
-_VerbatimInterpolation_format = Core.Name "format"
-
-data SimpleName =
-  SimpleName {
-    simpleNameIdentifier :: Identifier,
-    simpleNameTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_SimpleName = Core.Name "hydra.csharp.syntax.SimpleName"
-
-_SimpleName_identifier = Core.Name "identifier"
-
-_SimpleName_typeArguments = Core.Name "typeArguments"
-
-data TupleExpression =
-  TupleExpressionElements [TupleElement] |
-  TupleExpressionDeconstruction DeconstructionTuple
-  deriving (Eq, Ord, Read, Show)
-
-_TupleExpression = Core.Name "hydra.csharp.syntax.TupleExpression"
-
-_TupleExpression_elements = Core.Name "elements"
-
-_TupleExpression_deconstruction = Core.Name "deconstruction"
-
-data TupleElement =
-  TupleElement {
-    tupleElementName :: (Maybe Identifier),
-    tupleElementExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_TupleElement = Core.Name "hydra.csharp.syntax.TupleElement"
-
-_TupleElement_name = Core.Name "name"
-
-_TupleElement_expression = Core.Name "expression"
-
-newtype DeconstructionTuple =
-  DeconstructionTuple {
-    unDeconstructionTuple :: [DeconstructionElement]}
-  deriving (Eq, Ord, Read, Show)
-
-_DeconstructionTuple = Core.Name "hydra.csharp.syntax.DeconstructionTuple"
-
-data DeconstructionElement =
-  DeconstructionElementTuple DeconstructionTuple |
-  DeconstructionElementIdentifier Identifier
-  deriving (Eq, Ord, Read, Show)
-
-_DeconstructionElement = Core.Name "hydra.csharp.syntax.DeconstructionElement"
-
-_DeconstructionElement_tuple = Core.Name "tuple"
-
-_DeconstructionElement_identifier = Core.Name "identifier"
-
-data MemberAccess =
-  MemberAccess {
-    memberAccessHead :: MemberAccessHead,
-    memberAccessIdentifier :: Identifier,
-    memberAccessTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_MemberAccess = Core.Name "hydra.csharp.syntax.MemberAccess"
-
-_MemberAccess_head = Core.Name "head"
-
-_MemberAccess_identifier = Core.Name "identifier"
-
-_MemberAccess_typeArguments = Core.Name "typeArguments"
-
-data MemberAccessHead =
-  MemberAccessHeadPrimary PrimaryExpression |
-  MemberAccessHeadPredefined PredefinedType |
-  MemberAccessHeadQualifiedAlias QualifiedAliasMember
-  deriving (Eq, Ord, Read, Show)
-
-_MemberAccessHead = Core.Name "hydra.csharp.syntax.MemberAccessHead"
-
-_MemberAccessHead_primary = Core.Name "primary"
-
-_MemberAccessHead_predefined = Core.Name "predefined"
-
-_MemberAccessHead_qualifiedAlias = Core.Name "qualifiedAlias"
-
-data PredefinedType =
-  PredefinedTypeBool  |
-  PredefinedTypeByte  |
-  PredefinedTypeChar  |
-  PredefinedTypeDecimal  |
-  PredefinedTypeDouble  |
-  PredefinedTypeFloat  |
-  PredefinedTypeInt  |
-  PredefinedTypeLong  |
-  PredefinedTypeObject  |
-  PredefinedTypeSbyte  |
-  PredefinedTypeShort  |
-  PredefinedTypeString  |
-  PredefinedTypeUint  |
-  PredefinedTypeUlong  |
-  PredefinedTypeUshort
-  deriving (Eq, Ord, Read, Show)
-
-_PredefinedType = Core.Name "hydra.csharp.syntax.PredefinedType"
-
-_PredefinedType_bool = Core.Name "bool"
-
-_PredefinedType_byte = Core.Name "byte"
-
-_PredefinedType_char = Core.Name "char"
-
-_PredefinedType_decimal = Core.Name "decimal"
-
-_PredefinedType_double = Core.Name "double"
-
-_PredefinedType_float = Core.Name "float"
-
-_PredefinedType_int = Core.Name "int"
-
-_PredefinedType_long = Core.Name "long"
-
-_PredefinedType_object = Core.Name "object"
-
-_PredefinedType_sbyte = Core.Name "sbyte"
-
-_PredefinedType_short = Core.Name "short"
-
-_PredefinedType_string = Core.Name "string"
-
-_PredefinedType_uint = Core.Name "uint"
-
-_PredefinedType_ulong = Core.Name "ulong"
-
-_PredefinedType_ushort = Core.Name "ushort"
-
-data NullConditionalMemberAccess =
-  NullConditionalMemberAccess {
-    nullConditionalMemberAccessExpression :: PrimaryExpression,
-    nullConditionalMemberAccessIdentifier :: Identifier,
-    nullConditionalMemberAccessTypeArguments :: (Maybe TypeArgumentList),
-    nullConditionalMemberAccessDependentAccess :: [DependentAccess]}
-  deriving (Eq, Ord, Read, Show)
-
-_NullConditionalMemberAccess = Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"
-
-_NullConditionalMemberAccess_expression = Core.Name "expression"
-
-_NullConditionalMemberAccess_identifier = Core.Name "identifier"
-
-_NullConditionalMemberAccess_typeArguments = Core.Name "typeArguments"
-
-_NullConditionalMemberAccess_dependentAccess = Core.Name "dependentAccess"
-
-data DependentAccess =
-  DependentAccessMemberAccess DependentAccessForMember |
-  DependentAccessElementAccess ArgumentList |
-  DependentAccessInvocation (Maybe ArgumentList)
-  deriving (Eq, Ord, Read, Show)
-
-_DependentAccess = Core.Name "hydra.csharp.syntax.DependentAccess"
-
-_DependentAccess_memberAccess = Core.Name "memberAccess"
-
-_DependentAccess_elementAccess = Core.Name "elementAccess"
-
-_DependentAccess_invocation = Core.Name "invocation"
-
-data DependentAccessForMember =
-  DependentAccessForMember {
-    dependentAccessForMemberIdentifier :: Identifier,
-    dependentAccessForMemberTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_DependentAccessForMember = Core.Name "hydra.csharp.syntax.DependentAccessForMember"
-
-_DependentAccessForMember_identifier = Core.Name "identifier"
-
-_DependentAccessForMember_typeArguments = Core.Name "typeArguments"
-
-data NullConditionalProjectionInitializer =
-  NullConditionalProjectionInitializer {
-    nullConditionalProjectionInitializerExpression :: PrimaryExpression,
-    nullConditionalProjectionInitializerIdentifier :: Identifier,
-    nullConditionalProjectionInitializerTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_NullConditionalProjectionInitializer = Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"
-
-_NullConditionalProjectionInitializer_expression = Core.Name "expression"
-
-_NullConditionalProjectionInitializer_identifier = Core.Name "identifier"
-
-_NullConditionalProjectionInitializer_typeArguments = Core.Name "typeArguments"
-
-data InvocationExpression =
-  InvocationExpression {
-    invocationExpressionExpression :: PrimaryExpression,
-    invocationExpressionArguments :: (Maybe ArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_InvocationExpression = Core.Name "hydra.csharp.syntax.InvocationExpression"
-
-_InvocationExpression_expression = Core.Name "expression"
-
-_InvocationExpression_arguments = Core.Name "arguments"
-
-data NullConditionalInvocationExpression =
-  NullConditionalInvocationExpression {
-    nullConditionalInvocationExpressionHead :: NullConditionalInvocationExpressionHead,
-    nullConditionalInvocationExpressionArguments :: (Maybe ArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_NullConditionalInvocationExpression = Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"
-
-_NullConditionalInvocationExpression_head = Core.Name "head"
-
-_NullConditionalInvocationExpression_arguments = Core.Name "arguments"
-
-data NullConditionalInvocationExpressionHead =
-  NullConditionalInvocationExpressionHeadMember NullConditionalMemberAccess |
-  NullConditionalInvocationExpressionHeadElement NullConditionalElementAccess
-  deriving (Eq, Ord, Read, Show)
-
-_NullConditionalInvocationExpressionHead = Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpressionHead"
-
-_NullConditionalInvocationExpressionHead_member = Core.Name "member"
-
-_NullConditionalInvocationExpressionHead_element = Core.Name "element"
-
-data ElementAccess =
-  ElementAccess {
-    elementAccessExpression :: PrimaryNoArrayCreationExpression,
-    elementAccessArguments :: ArgumentList}
-  deriving (Eq, Ord, Read, Show)
-
-_ElementAccess = Core.Name "hydra.csharp.syntax.ElementAccess"
-
-_ElementAccess_expression = Core.Name "expression"
-
-_ElementAccess_arguments = Core.Name "arguments"
-
-data NullConditionalElementAccess =
-  NullConditionalElementAccess {
-    nullConditionalElementAccessExpression :: PrimaryNoArrayCreationExpression,
-    nullConditionalElementAccessArguments :: ArgumentList,
-    nullConditionalElementAccessDependentAccess :: [DependentAccess]}
-  deriving (Eq, Ord, Read, Show)
-
-_NullConditionalElementAccess = Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"
-
-_NullConditionalElementAccess_expression = Core.Name "expression"
-
-_NullConditionalElementAccess_arguments = Core.Name "arguments"
-
-_NullConditionalElementAccess_dependentAccess = Core.Name "dependentAccess"
-
-data BaseAccess =
-  BaseAccessIdentifier BaseAccessWithIdentifier |
-  BaseAccessArguments ArgumentList
-  deriving (Eq, Ord, Read, Show)
-
-_BaseAccess = Core.Name "hydra.csharp.syntax.BaseAccess"
-
-_BaseAccess_identifier = Core.Name "identifier"
-
-_BaseAccess_arguments = Core.Name "arguments"
-
-data BaseAccessWithIdentifier =
-  BaseAccessWithIdentifier {
-    baseAccessWithIdentifierIdentifier :: Identifier,
-    baseAccessWithIdentifierTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_BaseAccessWithIdentifier = Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"
-
-_BaseAccessWithIdentifier_identifier = Core.Name "identifier"
-
-_BaseAccessWithIdentifier_typeArguments = Core.Name "typeArguments"
-
-data ObjectCreationExpression =
-  ObjectCreationExpression {
-    objectCreationExpressionType :: Type,
-    objectCreationExpressionArguments :: (Maybe ArgumentList),
-    objectCreationExpressionInitializer :: (Maybe ObjectOrCollectionInitializer)}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectCreationExpression = Core.Name "hydra.csharp.syntax.ObjectCreationExpression"
-
-_ObjectCreationExpression_type = Core.Name "type"
-
-_ObjectCreationExpression_arguments = Core.Name "arguments"
-
-_ObjectCreationExpression_initializer = Core.Name "initializer"
-
-data ObjectOrCollectionInitializer =
-  ObjectOrCollectionInitializerObject [MemberInitializer] |
-  ObjectOrCollectionInitializerCollection [ElementInitializer]
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectOrCollectionInitializer = Core.Name "hydra.csharp.syntax.ObjectOrCollectionInitializer"
-
-_ObjectOrCollectionInitializer_object = Core.Name "object"
-
-_ObjectOrCollectionInitializer_collection = Core.Name "collection"
-
-data MemberInitializer =
-  MemberInitializer {
-    memberInitializerTarget :: InitializerTarget,
-    memberInitializerValue :: InitializerValue}
-  deriving (Eq, Ord, Read, Show)
-
-_MemberInitializer = Core.Name "hydra.csharp.syntax.MemberInitializer"
-
-_MemberInitializer_target = Core.Name "target"
-
-_MemberInitializer_value = Core.Name "value"
-
-data InitializerTarget =
-  InitializerTargetIdentifier Identifier |
-  InitializerTargetArguments ArgumentList
-  deriving (Eq, Ord, Read, Show)
-
-_InitializerTarget = Core.Name "hydra.csharp.syntax.InitializerTarget"
-
-_InitializerTarget_identifier = Core.Name "identifier"
-
-_InitializerTarget_arguments = Core.Name "arguments"
-
-data InitializerValue =
-  InitializerValueExpression Expression |
-  InitializerValueObjectOrCollection ObjectOrCollectionInitializer
-  deriving (Eq, Ord, Read, Show)
-
-_InitializerValue = Core.Name "hydra.csharp.syntax.InitializerValue"
-
-_InitializerValue_expression = Core.Name "expression"
-
-_InitializerValue_objectOrCollection = Core.Name "objectOrCollection"
-
-data ElementInitializer =
-  ElementInitializerSingle NonAssignmentExpression |
-  ElementInitializerList ExpressionList
-  deriving (Eq, Ord, Read, Show)
-
-_ElementInitializer = Core.Name "hydra.csharp.syntax.ElementInitializer"
-
-_ElementInitializer_single = Core.Name "single"
-
-_ElementInitializer_list = Core.Name "list"
-
-newtype ExpressionList =
-  ExpressionList {
-    unExpressionList :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExpressionList = Core.Name "hydra.csharp.syntax.ExpressionList"
-
-data ArrayCreationExpression =
-  ArrayCreationExpressionNonArrayType NonArrayTypeArrayCreationExpression |
-  ArrayCreationExpressionArrayType ArrayTypeArrayCreationExpression |
-  ArrayCreationExpressionRankSpecifier RankSpecifierArrayCreationExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayCreationExpression = Core.Name "hydra.csharp.syntax.ArrayCreationExpression"
-
-_ArrayCreationExpression_nonArrayType = Core.Name "nonArrayType"
-
-_ArrayCreationExpression_arrayType = Core.Name "arrayType"
-
-_ArrayCreationExpression_rankSpecifier = Core.Name "rankSpecifier"
-
-data NonArrayTypeArrayCreationExpression =
-  NonArrayTypeArrayCreationExpression {
-    nonArrayTypeArrayCreationExpressionType :: NonArrayType,
-    nonArrayTypeArrayCreationExpressionExpressions :: ExpressionList,
-    nonArrayTypeArrayCreationExpressionRankSpecifiers :: [RankSpecifier],
-    nonArrayTypeArrayCreationExpressionInitializer :: (Maybe ArrayInitializer)}
-  deriving (Eq, Ord, Read, Show)
-
-_NonArrayTypeArrayCreationExpression = Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"
-
-_NonArrayTypeArrayCreationExpression_type = Core.Name "type"
-
-_NonArrayTypeArrayCreationExpression_expressions = Core.Name "expressions"
-
-_NonArrayTypeArrayCreationExpression_rankSpecifiers = Core.Name "rankSpecifiers"
-
-_NonArrayTypeArrayCreationExpression_initializer = Core.Name "initializer"
-
-data ArrayTypeArrayCreationExpression =
-  ArrayTypeArrayCreationExpression {
-    arrayTypeArrayCreationExpressionType :: ArrayType,
-    arrayTypeArrayCreationExpressionInitializer :: ArrayInitializer}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayTypeArrayCreationExpression = Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"
-
-_ArrayTypeArrayCreationExpression_type = Core.Name "type"
-
-_ArrayTypeArrayCreationExpression_initializer = Core.Name "initializer"
-
-data RankSpecifierArrayCreationExpression =
-  RankSpecifierArrayCreationExpression {
-    rankSpecifierArrayCreationExpressionRankSpecifier :: RankSpecifier,
-    rankSpecifierArrayCreationExpressionInitializer :: ArrayInitializer}
-  deriving (Eq, Ord, Read, Show)
-
-_RankSpecifierArrayCreationExpression = Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"
-
-_RankSpecifierArrayCreationExpression_rankSpecifier = Core.Name "rankSpecifier"
-
-_RankSpecifierArrayCreationExpression_initializer = Core.Name "initializer"
-
-data DelegateCreationExpression =
-  DelegateCreationExpression {
-    delegateCreationExpressionType :: DelegateType,
-    delegateCreationExpressionExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_DelegateCreationExpression = Core.Name "hydra.csharp.syntax.DelegateCreationExpression"
-
-_DelegateCreationExpression_type = Core.Name "type"
-
-_DelegateCreationExpression_expression = Core.Name "expression"
-
-newtype MemberDeclaratorList =
-  MemberDeclaratorList {
-    unMemberDeclaratorList :: [MemberDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_MemberDeclaratorList = Core.Name "hydra.csharp.syntax.MemberDeclaratorList"
-
-data MemberDeclarator =
-  MemberDeclaratorName SimpleName |
-  MemberDeclaratorMemberAccess MemberAccess |
-  MemberDeclaratorNullConditionalProjectionInitializer NullConditionalProjectionInitializer |
-  MemberDeclaratorBaseAccess BaseAccess |
-  MemberDeclaratorAssignment AssignmentMemberDeclarator
-  deriving (Eq, Ord, Read, Show)
-
-_MemberDeclarator = Core.Name "hydra.csharp.syntax.MemberDeclarator"
-
-_MemberDeclarator_name = Core.Name "name"
-
-_MemberDeclarator_memberAccess = Core.Name "memberAccess"
-
-_MemberDeclarator_nullConditionalProjectionInitializer = Core.Name "nullConditionalProjectionInitializer"
-
-_MemberDeclarator_baseAccess = Core.Name "baseAccess"
-
-_MemberDeclarator_assignment = Core.Name "assignment"
-
-data AssignmentMemberDeclarator =
-  AssignmentMemberDeclarator {
-    assignmentMemberDeclaratorIdentifier :: Identifier,
-    assignmentMemberDeclaratorExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentMemberDeclarator = Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"
-
-_AssignmentMemberDeclarator_identifier = Core.Name "identifier"
-
-_AssignmentMemberDeclarator_expression = Core.Name "expression"
-
-data TypeofExpression =
-  TypeofExpressionType Type |
-  TypeofExpressionUnboundTypeName UnboundTypeName |
-  TypeofExpressionVoid
-  deriving (Eq, Ord, Read, Show)
-
-_TypeofExpression = Core.Name "hydra.csharp.syntax.TypeofExpression"
-
-_TypeofExpression_type = Core.Name "type"
-
-_TypeofExpression_unboundTypeName = Core.Name "unboundTypeName"
-
-_TypeofExpression_void = Core.Name "void"
-
-newtype UnboundTypeName =
-  UnboundTypeName {
-    unUnboundTypeName :: [UnboundTypeNamePart]}
-  deriving (Eq, Ord, Read, Show)
-
-_UnboundTypeName = Core.Name "hydra.csharp.syntax.UnboundTypeName"
-
-data UnboundTypeNamePart =
-  UnboundTypeNamePart {
-    unboundTypeNamePartIdentifier :: Identifier,
-    unboundTypeNamePartAliased :: Bool,
-    unboundTypeNamePartDimension :: (Maybe Int)}
-  deriving (Eq, Ord, Read, Show)
-
-_UnboundTypeNamePart = Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"
-
-_UnboundTypeNamePart_identifier = Core.Name "identifier"
-
-_UnboundTypeNamePart_aliased = Core.Name "aliased"
-
-_UnboundTypeNamePart_dimension = Core.Name "dimension"
-
-data DefaultValueExpression =
-  DefaultValueExpressionExplicitlyTyped Type |
-  DefaultValueExpressionDefaultLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_DefaultValueExpression = Core.Name "hydra.csharp.syntax.DefaultValueExpression"
-
-_DefaultValueExpression_explicitlyTyped = Core.Name "explicitlyTyped"
-
-_DefaultValueExpression_defaultLiteral = Core.Name "defaultLiteral"
-
-data StackallocExpression =
-  StackallocExpression {
-    stackallocExpressionType :: (Maybe UnmanagedType),
-    stackallocExpressionExpression :: (Maybe ConstantExpression),
-    stackallocExpressionInitializer :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_StackallocExpression = Core.Name "hydra.csharp.syntax.StackallocExpression"
-
-_StackallocExpression_type = Core.Name "type"
-
-_StackallocExpression_expression = Core.Name "expression"
-
-_StackallocExpression_initializer = Core.Name "initializer"
-
-data NamedEntity =
-  NamedEntity {
-    namedEntityTarget :: NamedEntityTarget,
-    namedEntityParts :: [NamedEntityPart]}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedEntity = Core.Name "hydra.csharp.syntax.NamedEntity"
-
-_NamedEntity_target = Core.Name "target"
-
-_NamedEntity_parts = Core.Name "parts"
-
-data NamedEntityPart =
-  NamedEntityPart {
-    namedEntityPartIdentifier :: Identifier,
-    namedEntityPartTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedEntityPart = Core.Name "hydra.csharp.syntax.NamedEntityPart"
-
-_NamedEntityPart_identifier = Core.Name "identifier"
-
-_NamedEntityPart_typeArguments = Core.Name "typeArguments"
-
-data NamedEntityTarget =
-  NamedEntityTargetName SimpleName |
-  NamedEntityTargetThis  |
-  NamedEntityTargetBase  |
-  NamedEntityTargetPredefinedType PredefinedType |
-  NamedEntityTargetQualifiedAliasMember QualifiedAliasMember
-  deriving (Eq, Ord, Read, Show)
-
-_NamedEntityTarget = Core.Name "hydra.csharp.syntax.NamedEntityTarget"
-
-_NamedEntityTarget_name = Core.Name "name"
-
-_NamedEntityTarget_this = Core.Name "this"
-
-_NamedEntityTarget_base = Core.Name "base"
-
-_NamedEntityTarget_predefinedType = Core.Name "predefinedType"
-
-_NamedEntityTarget_qualifiedAliasMember = Core.Name "qualifiedAliasMember"
-
-data UnaryExpression =
-  UnaryExpressionPrimary PrimaryExpression |
-  UnaryExpressionPlus UnaryExpression |
-  UnaryExpressionMinus UnaryExpression |
-  UnaryExpressionNot UnaryExpression |
-  UnaryExpressionBitwiseComplement UnaryExpression |
-  UnaryExpressionPreIncrement UnaryExpression |
-  UnaryExpressionPreDecrement UnaryExpression |
-  UnaryExpressionCast CastExpression |
-  UnaryExpressionAwait UnaryExpression |
-  UnaryExpressionPointerIndirection UnaryExpression |
-  UnaryExpressionAddressOf UnaryExpression
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryExpression = Core.Name "hydra.csharp.syntax.UnaryExpression"
-
-_UnaryExpression_primary = Core.Name "primary"
-
-_UnaryExpression_plus = Core.Name "plus"
-
-_UnaryExpression_minus = Core.Name "minus"
-
-_UnaryExpression_not = Core.Name "not"
-
-_UnaryExpression_bitwiseComplement = Core.Name "bitwiseComplement"
-
-_UnaryExpression_preIncrement = Core.Name "preIncrement"
-
-_UnaryExpression_preDecrement = Core.Name "preDecrement"
-
-_UnaryExpression_cast = Core.Name "cast"
-
-_UnaryExpression_await = Core.Name "await"
-
-_UnaryExpression_pointerIndirection = Core.Name "pointerIndirection"
-
-_UnaryExpression_addressOf = Core.Name "addressOf"
-
-data CastExpression =
-  CastExpression {
-    castExpressionType :: Type,
-    castExpressionExpression :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_CastExpression = Core.Name "hydra.csharp.syntax.CastExpression"
-
-_CastExpression_type = Core.Name "type"
-
-_CastExpression_expression = Core.Name "expression"
-
-data MultiplicativeExpression =
-  MultiplicativeExpressionSimple UnaryExpression |
-  MultiplicativeExpressionBinary BinaryMultiplicativeExpression
-  deriving (Eq, Ord, Read, Show)
-
-_MultiplicativeExpression = Core.Name "hydra.csharp.syntax.MultiplicativeExpression"
-
-_MultiplicativeExpression_simple = Core.Name "simple"
-
-_MultiplicativeExpression_binary = Core.Name "binary"
-
-data BinaryMultiplicativeExpression =
-  BinaryMultiplicativeExpression {
-    binaryMultiplicativeExpressionLeft :: MultiplicativeExpression,
-    binaryMultiplicativeExpressionOperator :: MultiplicativeOperator,
-    binaryMultiplicativeExpressionRight :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryMultiplicativeExpression = Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"
-
-_BinaryMultiplicativeExpression_left = Core.Name "left"
-
-_BinaryMultiplicativeExpression_operator = Core.Name "operator"
-
-_BinaryMultiplicativeExpression_right = Core.Name "right"
-
-data MultiplicativeOperator =
-  MultiplicativeOperatorTimes  |
-  MultiplicativeOperatorDivide  |
-  MultiplicativeOperatorModulo
-  deriving (Eq, Ord, Read, Show)
-
-_MultiplicativeOperator = Core.Name "hydra.csharp.syntax.MultiplicativeOperator"
-
-_MultiplicativeOperator_times = Core.Name "times"
-
-_MultiplicativeOperator_divide = Core.Name "divide"
-
-_MultiplicativeOperator_modulo = Core.Name "modulo"
-
-data AdditiveExpression =
-  AdditiveExpressionSimple MultiplicativeExpression |
-  AdditiveExpressionBinary BinaryAdditiveExpression
-  deriving (Eq, Ord, Read, Show)
-
-_AdditiveExpression = Core.Name "hydra.csharp.syntax.AdditiveExpression"
-
-_AdditiveExpression_simple = Core.Name "simple"
-
-_AdditiveExpression_binary = Core.Name "binary"
-
-data BinaryAdditiveExpression =
-  BinaryAdditiveExpression {
-    binaryAdditiveExpressionLeft :: AdditiveExpression,
-    binaryAdditiveExpressionOperator :: AdditiveOperator,
-    binaryAdditiveExpressionRight :: MultiplicativeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryAdditiveExpression = Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"
-
-_BinaryAdditiveExpression_left = Core.Name "left"
-
-_BinaryAdditiveExpression_operator = Core.Name "operator"
-
-_BinaryAdditiveExpression_right = Core.Name "right"
-
-data AdditiveOperator =
-  AdditiveOperatorPlus  |
-  AdditiveOperatorMinus
-  deriving (Eq, Ord, Read, Show)
-
-_AdditiveOperator = Core.Name "hydra.csharp.syntax.AdditiveOperator"
-
-_AdditiveOperator_plus = Core.Name "plus"
-
-_AdditiveOperator_minus = Core.Name "minus"
-
-data ShiftExpression =
-  ShiftExpressionSimple AdditiveExpression |
-  ShiftExpressionBinary BinaryShiftExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ShiftExpression = Core.Name "hydra.csharp.syntax.ShiftExpression"
-
-_ShiftExpression_simple = Core.Name "simple"
-
-_ShiftExpression_binary = Core.Name "binary"
-
-data BinaryShiftExpression =
-  BinaryShiftExpression {
-    binaryShiftExpressionLeft :: ShiftExpression,
-    binaryShiftExpressionOperator :: ShiftOperator,
-    binaryShiftExpressionRight :: AdditiveExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryShiftExpression = Core.Name "hydra.csharp.syntax.BinaryShiftExpression"
-
-_BinaryShiftExpression_left = Core.Name "left"
-
-_BinaryShiftExpression_operator = Core.Name "operator"
-
-_BinaryShiftExpression_right = Core.Name "right"
-
-data ShiftOperator =
-  ShiftOperatorLeft  |
-  ShiftOperatorRight
-  deriving (Eq, Ord, Read, Show)
-
-_ShiftOperator = Core.Name "hydra.csharp.syntax.ShiftOperator"
-
-_ShiftOperator_left = Core.Name "left"
-
-_ShiftOperator_right = Core.Name "right"
-
-data RelationalExpression =
-  RelationalExpressionSimple ShiftExpression |
-  RelationalExpressionBinary BinaryRelationalExpression |
-  RelationalExpressionIsType IsTypeExpression |
-  RelationalExpressionIsPattern IsPatternExpression |
-  RelationalExpressionAsType AsTypeExpression
-  deriving (Eq, Ord, Read, Show)
-
-_RelationalExpression = Core.Name "hydra.csharp.syntax.RelationalExpression"
-
-_RelationalExpression_simple = Core.Name "simple"
-
-_RelationalExpression_binary = Core.Name "binary"
-
-_RelationalExpression_isType = Core.Name "isType"
-
-_RelationalExpression_isPattern = Core.Name "isPattern"
-
-_RelationalExpression_asType = Core.Name "asType"
-
-data BinaryRelationalExpression =
-  BinaryRelationalExpression {
-    binaryRelationalExpressionLeft :: RelationalExpression,
-    binaryRelationalExpressionOperator :: RelationalOperator,
-    binaryRelationalExpressionRight :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryRelationalExpression = Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"
-
-_BinaryRelationalExpression_left = Core.Name "left"
-
-_BinaryRelationalExpression_operator = Core.Name "operator"
-
-_BinaryRelationalExpression_right = Core.Name "right"
-
-data RelationalOperator =
-  RelationalOperatorLessThan  |
-  RelationalOperatorGreaterThan  |
-  RelationalOperatorLessThanOrEqual  |
-  RelationalOperatorGreaterThanOrEqual
-  deriving (Eq, Ord, Read, Show)
-
-_RelationalOperator = Core.Name "hydra.csharp.syntax.RelationalOperator"
-
-_RelationalOperator_lessThan = Core.Name "lessThan"
-
-_RelationalOperator_greaterThan = Core.Name "greaterThan"
-
-_RelationalOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"
-
-_RelationalOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
-
-data IsTypeExpression =
-  IsTypeExpression {
-    isTypeExpressionExpression :: RelationalExpression,
-    isTypeExpressionType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_IsTypeExpression = Core.Name "hydra.csharp.syntax.IsTypeExpression"
-
-_IsTypeExpression_expression = Core.Name "expression"
-
-_IsTypeExpression_type = Core.Name "type"
-
-data IsPatternExpression =
-  IsPatternExpression {
-    isPatternExpressionExpression :: RelationalExpression,
-    isPatternExpressionPattern :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-
-_IsPatternExpression = Core.Name "hydra.csharp.syntax.IsPatternExpression"
-
-_IsPatternExpression_expression = Core.Name "expression"
-
-_IsPatternExpression_pattern = Core.Name "pattern"
-
-data AsTypeExpression =
-  AsTypeExpression {
-    asTypeExpressionExpression :: RelationalExpression,
-    asTypeExpressionType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_AsTypeExpression = Core.Name "hydra.csharp.syntax.AsTypeExpression"
-
-_AsTypeExpression_expression = Core.Name "expression"
-
-_AsTypeExpression_type = Core.Name "type"
-
-data EqualityExpression =
-  EqualityExpressionSimple RelationalExpression |
-  EqualityExpressionBinary BinaryEqualityExpression
-  deriving (Eq, Ord, Read, Show)
-
-_EqualityExpression = Core.Name "hydra.csharp.syntax.EqualityExpression"
-
-_EqualityExpression_simple = Core.Name "simple"
-
-_EqualityExpression_binary = Core.Name "binary"
-
-data BinaryEqualityExpression =
-  BinaryEqualityExpression {
-    binaryEqualityExpressionLeft :: EqualityExpression,
-    binaryEqualityExpressionOperator :: EqualityOperator,
-    binaryEqualityExpressionRight :: RelationalExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryEqualityExpression = Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"
-
-_BinaryEqualityExpression_left = Core.Name "left"
-
-_BinaryEqualityExpression_operator = Core.Name "operator"
-
-_BinaryEqualityExpression_right = Core.Name "right"
-
-data EqualityOperator =
-  EqualityOperatorEqual  |
-  EqualityOperatorNotEqual
-  deriving (Eq, Ord, Read, Show)
-
-_EqualityOperator = Core.Name "hydra.csharp.syntax.EqualityOperator"
-
-_EqualityOperator_equal = Core.Name "equal"
-
-_EqualityOperator_notEqual = Core.Name "notEqual"
-
-data AndExpression =
-  AndExpressionSimple EqualityExpression |
-  AndExpressionBinary BinaryAndExpression
-  deriving (Eq, Ord, Read, Show)
-
-_AndExpression = Core.Name "hydra.csharp.syntax.AndExpression"
-
-_AndExpression_simple = Core.Name "simple"
-
-_AndExpression_binary = Core.Name "binary"
-
-data BinaryAndExpression =
-  BinaryAndExpression {
-    binaryAndExpressionLeft :: AndExpression,
-    binaryAndExpressionRight :: EqualityExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryAndExpression = Core.Name "hydra.csharp.syntax.BinaryAndExpression"
-
-_BinaryAndExpression_left = Core.Name "left"
-
-_BinaryAndExpression_right = Core.Name "right"
-
-data ExclusiveOrExpression =
-  ExclusiveOrExpressionSimple AndExpression |
-  ExclusiveOrExpressionBinary BinaryExclusiveOrExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ExclusiveOrExpression = Core.Name "hydra.csharp.syntax.ExclusiveOrExpression"
-
-_ExclusiveOrExpression_simple = Core.Name "simple"
-
-_ExclusiveOrExpression_binary = Core.Name "binary"
-
-data BinaryExclusiveOrExpression =
-  BinaryExclusiveOrExpression {
-    binaryExclusiveOrExpressionLeft :: ExclusiveOrExpression,
-    binaryExclusiveOrExpressionRight :: AndExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryExclusiveOrExpression = Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"
-
-_BinaryExclusiveOrExpression_left = Core.Name "left"
-
-_BinaryExclusiveOrExpression_right = Core.Name "right"
-
-data InclusiveOrExpression =
-  InclusiveOrExpressionSimple ExclusiveOrExpression |
-  InclusiveOrExpressionBinary BinaryInclusiveOrExpression
-  deriving (Eq, Ord, Read, Show)
-
-_InclusiveOrExpression = Core.Name "hydra.csharp.syntax.InclusiveOrExpression"
-
-_InclusiveOrExpression_simple = Core.Name "simple"
-
-_InclusiveOrExpression_binary = Core.Name "binary"
-
-data BinaryInclusiveOrExpression =
-  BinaryInclusiveOrExpression {
-    binaryInclusiveOrExpressionLeft :: InclusiveOrExpression,
-    binaryInclusiveOrExpressionRight :: ExclusiveOrExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryInclusiveOrExpression = Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"
-
-_BinaryInclusiveOrExpression_left = Core.Name "left"
-
-_BinaryInclusiveOrExpression_right = Core.Name "right"
-
-data ConditionalAndExpression =
-  ConditionalAndExpressionSimple InclusiveOrExpression |
-  ConditionalAndExpressionBinary BinaryConditionalAndExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ConditionalAndExpression = Core.Name "hydra.csharp.syntax.ConditionalAndExpression"
-
-_ConditionalAndExpression_simple = Core.Name "simple"
-
-_ConditionalAndExpression_binary = Core.Name "binary"
-
-data BinaryConditionalAndExpression =
-  BinaryConditionalAndExpression {
-    binaryConditionalAndExpressionLeft :: ConditionalAndExpression,
-    binaryConditionalAndExpressionRight :: InclusiveOrExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryConditionalAndExpression = Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"
-
-_BinaryConditionalAndExpression_left = Core.Name "left"
-
-_BinaryConditionalAndExpression_right = Core.Name "right"
-
-data ConditionalOrExpression =
-  ConditionalOrExpressionSimple ConditionalAndExpression |
-  ConditionalOrExpressionBinary BinaryConditionalOrExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ConditionalOrExpression = Core.Name "hydra.csharp.syntax.ConditionalOrExpression"
-
-_ConditionalOrExpression_simple = Core.Name "simple"
-
-_ConditionalOrExpression_binary = Core.Name "binary"
-
-data BinaryConditionalOrExpression =
-  BinaryConditionalOrExpression {
-    binaryConditionalOrExpressionLeft :: ConditionalOrExpression,
-    binaryConditionalOrExpressionRight :: ConditionalAndExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryConditionalOrExpression = Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"
-
-_BinaryConditionalOrExpression_left = Core.Name "left"
-
-_BinaryConditionalOrExpression_right = Core.Name "right"
-
-data NullCoalescingExpression =
-  NullCoalescingExpressionSimple ConditionalOrExpression |
-  NullCoalescingExpressionBinary BinaryNullCoalescingExpression |
-  NullCoalescingExpressionThrow NullCoalescingExpression
-  deriving (Eq, Ord, Read, Show)
-
-_NullCoalescingExpression = Core.Name "hydra.csharp.syntax.NullCoalescingExpression"
-
-_NullCoalescingExpression_simple = Core.Name "simple"
-
-_NullCoalescingExpression_binary = Core.Name "binary"
-
-_NullCoalescingExpression_throw = Core.Name "throw"
-
-data BinaryNullCoalescingExpression =
-  BinaryNullCoalescingExpression {
-    binaryNullCoalescingExpressionLeft :: ConditionalOrExpression,
-    binaryNullCoalescingExpressionRight :: NullCoalescingExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryNullCoalescingExpression = Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"
-
-_BinaryNullCoalescingExpression_left = Core.Name "left"
-
-_BinaryNullCoalescingExpression_right = Core.Name "right"
-
-data DeclarationExpression =
-  DeclarationExpression {
-    declarationExpressionType :: LocalVariableType,
-    declarationExpressionIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_DeclarationExpression = Core.Name "hydra.csharp.syntax.DeclarationExpression"
-
-_DeclarationExpression_type = Core.Name "type"
-
-_DeclarationExpression_identifier = Core.Name "identifier"
-
-data LocalVariableType =
-  LocalVariableTypeType Type |
-  LocalVariableTypeVar
-  deriving (Eq, Ord, Read, Show)
-
-_LocalVariableType = Core.Name "hydra.csharp.syntax.LocalVariableType"
-
-_LocalVariableType_type = Core.Name "type"
-
-_LocalVariableType_var = Core.Name "var"
-
-data ConditionalExpression =
-  ConditionalExpressionSimple NullCoalescingExpression |
-  ConditionalExpressionSimpleConditional SimpleConditionalExpression |
-  ConditionalExpressionRefConditional RefConditionalExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ConditionalExpression = Core.Name "hydra.csharp.syntax.ConditionalExpression"
-
-_ConditionalExpression_simple = Core.Name "simple"
-
-_ConditionalExpression_simpleConditional = Core.Name "simpleConditional"
-
-_ConditionalExpression_refConditional = Core.Name "refConditional"
-
-data SimpleConditionalExpression =
-  SimpleConditionalExpression {
-    simpleConditionalExpressionCondition :: NullCoalescingExpression,
-    simpleConditionalExpressionTrue :: Expression,
-    simpleConditionalExpressionFalse :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_SimpleConditionalExpression = Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"
-
-_SimpleConditionalExpression_condition = Core.Name "condition"
-
-_SimpleConditionalExpression_true = Core.Name "true"
-
-_SimpleConditionalExpression_false = Core.Name "false"
-
-data RefConditionalExpression =
-  RefConditionalExpression {
-    refConditionalExpressionCondition :: NullCoalescingExpression,
-    refConditionalExpressionTrue :: VariableReference,
-    refConditionalExpressionFalse :: VariableReference}
-  deriving (Eq, Ord, Read, Show)
-
-_RefConditionalExpression = Core.Name "hydra.csharp.syntax.RefConditionalExpression"
-
-_RefConditionalExpression_condition = Core.Name "condition"
-
-_RefConditionalExpression_true = Core.Name "true"
-
-_RefConditionalExpression_false = Core.Name "false"
-
-data LambdaExpression =
-  LambdaExpression {
-    lambdaExpressionAsync :: Bool,
-    lambdaExpressionSignature :: AnonymousFunctionSignature,
-    lambdaExpressionBody :: AnonymousFunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_LambdaExpression = Core.Name "hydra.csharp.syntax.LambdaExpression"
-
-_LambdaExpression_async = Core.Name "async"
-
-_LambdaExpression_signature = Core.Name "signature"
-
-_LambdaExpression_body = Core.Name "body"
-
-data AnonymousMethodExpression =
-  AnonymousMethodExpression {
-    anonymousMethodExpressionAsync :: Bool,
-    anonymousMethodExpressionSignature :: [ExplicitAnonymousFunctionParameter],
-    anonymousMethodExpressionBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_AnonymousMethodExpression = Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"
-
-_AnonymousMethodExpression_async = Core.Name "async"
-
-_AnonymousMethodExpression_signature = Core.Name "signature"
-
-_AnonymousMethodExpression_body = Core.Name "body"
-
-data AnonymousFunctionSignature =
-  AnonymousFunctionSignatureExplicit [ExplicitAnonymousFunctionParameter] |
-  AnonymousFunctionSignatureImplicit [Identifier]
-  deriving (Eq, Ord, Read, Show)
-
-_AnonymousFunctionSignature = Core.Name "hydra.csharp.syntax.AnonymousFunctionSignature"
-
-_AnonymousFunctionSignature_explicit = Core.Name "explicit"
-
-_AnonymousFunctionSignature_implicit = Core.Name "implicit"
-
-data ExplicitAnonymousFunctionParameter =
-  ExplicitAnonymousFunctionParameter {
-    explicitAnonymousFunctionParameterModifier :: (Maybe AnonymousFunctionParameterModifier),
-    explicitAnonymousFunctionParameterType :: Type,
-    explicitAnonymousFunctionParameterIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ExplicitAnonymousFunctionParameter = Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"
-
-_ExplicitAnonymousFunctionParameter_modifier = Core.Name "modifier"
-
-_ExplicitAnonymousFunctionParameter_type = Core.Name "type"
-
-_ExplicitAnonymousFunctionParameter_identifier = Core.Name "identifier"
-
-data AnonymousFunctionParameterModifier =
-  AnonymousFunctionParameterModifierRef  |
-  AnonymousFunctionParameterModifierOut  |
-  AnonymousFunctionParameterModifierIn
-  deriving (Eq, Ord, Read, Show)
-
-_AnonymousFunctionParameterModifier = Core.Name "hydra.csharp.syntax.AnonymousFunctionParameterModifier"
-
-_AnonymousFunctionParameterModifier_ref = Core.Name "ref"
-
-_AnonymousFunctionParameterModifier_out = Core.Name "out"
-
-_AnonymousFunctionParameterModifier_in = Core.Name "in"
-
-data AnonymousFunctionBody =
-  AnonymousFunctionBodyNullConditionalInvocation NullConditionalInvocationExpression |
-  AnonymousFunctionBodyExpression Expression |
-  AnonymousFunctionBodyRef VariableReference |
-  AnonymousFunctionBodyBlock Block
-  deriving (Eq, Ord, Read, Show)
-
-_AnonymousFunctionBody = Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"
-
-_AnonymousFunctionBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"
-
-_AnonymousFunctionBody_expression = Core.Name "expression"
-
-_AnonymousFunctionBody_ref = Core.Name "ref"
-
-_AnonymousFunctionBody_block = Core.Name "block"
-
-data QueryExpression =
-  QueryExpression {
-    queryExpressionFrom :: FromClause,
-    queryExpressionBody :: QueryBody}
-  deriving (Eq, Ord, Read, Show)
-
-_QueryExpression = Core.Name "hydra.csharp.syntax.QueryExpression"
-
-_QueryExpression_from = Core.Name "from"
-
-_QueryExpression_body = Core.Name "body"
-
-data FromClause =
-  FromClause {
-    fromClauseType :: (Maybe Type),
-    fromClauseIdentifier :: Identifier,
-    fromClauseIn :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_FromClause = Core.Name "hydra.csharp.syntax.FromClause"
-
-_FromClause_type = Core.Name "type"
-
-_FromClause_identifier = Core.Name "identifier"
-
-_FromClause_in = Core.Name "in"
-
-data QueryBody =
-  QueryBody {
-    queryBodyClauses :: [QueryBodyClause],
-    queryBodySelectOrGroup :: SelectOrGroupClause,
-    queryBodyContinuation :: (Maybe QueryContinuation)}
-  deriving (Eq, Ord, Read, Show)
-
-_QueryBody = Core.Name "hydra.csharp.syntax.QueryBody"
-
-_QueryBody_clauses = Core.Name "clauses"
-
-_QueryBody_selectOrGroup = Core.Name "selectOrGroup"
-
-_QueryBody_continuation = Core.Name "continuation"
-
-data QueryBodyClause =
-  QueryBodyClauseFrom FromClause |
-  QueryBodyClauseLet LetClause |
-  QueryBodyClauseWhere BooleanExpression |
-  QueryBodyClauseJoin JoinClause |
-  QueryBodyClauseOrderby [Ordering]
-  deriving (Eq, Ord, Read, Show)
-
-_QueryBodyClause = Core.Name "hydra.csharp.syntax.QueryBodyClause"
-
-_QueryBodyClause_from = Core.Name "from"
-
-_QueryBodyClause_let = Core.Name "let"
-
-_QueryBodyClause_where = Core.Name "where"
-
-_QueryBodyClause_join = Core.Name "join"
-
-_QueryBodyClause_orderby = Core.Name "orderby"
-
-data LetClause =
-  LetClause {
-    letClauseLeft :: Identifier,
-    letClauseRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_LetClause = Core.Name "hydra.csharp.syntax.LetClause"
-
-_LetClause_left = Core.Name "left"
-
-_LetClause_right = Core.Name "right"
-
-data JoinClause =
-  JoinClause {
-    joinClauseType :: (Maybe Type),
-    joinClauseIdentifier :: Identifier,
-    joinClauseIn :: Expression,
-    joinClauseOn :: Expression,
-    joinClauseEquals :: Expression,
-    joinClauseInto :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-
-_JoinClause = Core.Name "hydra.csharp.syntax.JoinClause"
-
-_JoinClause_type = Core.Name "type"
-
-_JoinClause_identifier = Core.Name "identifier"
-
-_JoinClause_in = Core.Name "in"
-
-_JoinClause_on = Core.Name "on"
-
-_JoinClause_equals = Core.Name "equals"
-
-_JoinClause_into = Core.Name "into"
-
-data Ordering =
-  Ordering {
-    orderingExpression :: Expression,
-    orderingDirection :: (Maybe OrderingDirection)}
-  deriving (Eq, Ord, Read, Show)
-
-_Ordering = Core.Name "hydra.csharp.syntax.Ordering"
-
-_Ordering_expression = Core.Name "expression"
-
-_Ordering_direction = Core.Name "direction"
-
-data OrderingDirection =
-  OrderingDirectionAscending  |
-  OrderingDirectionDescending
-  deriving (Eq, Ord, Read, Show)
-
-_OrderingDirection = Core.Name "hydra.csharp.syntax.OrderingDirection"
-
-_OrderingDirection_ascending = Core.Name "ascending"
-
-_OrderingDirection_descending = Core.Name "descending"
-
-data SelectOrGroupClause =
-  SelectOrGroupClauseSelect Expression |
-  SelectOrGroupClauseGroup GroupClause
-  deriving (Eq, Ord, Read, Show)
-
-_SelectOrGroupClause = Core.Name "hydra.csharp.syntax.SelectOrGroupClause"
-
-_SelectOrGroupClause_select = Core.Name "select"
-
-_SelectOrGroupClause_group = Core.Name "group"
-
-data GroupClause =
-  GroupClause {
-    groupClauseGrouped :: Expression,
-    groupClauseBy :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_GroupClause = Core.Name "hydra.csharp.syntax.GroupClause"
-
-_GroupClause_grouped = Core.Name "grouped"
-
-_GroupClause_by = Core.Name "by"
-
-data QueryContinuation =
-  QueryContinuation {
-    queryContinuationInto :: Identifier,
-    queryContinuationBody :: QueryBody}
-  deriving (Eq, Ord, Read, Show)
-
-_QueryContinuation = Core.Name "hydra.csharp.syntax.QueryContinuation"
-
-_QueryContinuation_into = Core.Name "into"
-
-_QueryContinuation_body = Core.Name "body"
-
-data Assignment =
-  Assignment {
-    assignmentLeft :: UnaryExpression,
-    assignmentOperator :: AssignmentOperator,
-    assignmentRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_Assignment = Core.Name "hydra.csharp.syntax.Assignment"
-
-_Assignment_left = Core.Name "left"
-
-_Assignment_operator = Core.Name "operator"
-
-_Assignment_right = Core.Name "right"
-
-data AssignmentOperator =
-  AssignmentOperatorSimple Bool |
-  AssignmentOperatorPlusEquals  |
-  AssignmentOperatorMinusEquals  |
-  AssignmentOperatorTimesEquals  |
-  AssignmentOperatorDivideEquals  |
-  AssignmentOperatorModEquals  |
-  AssignmentOperatorAndEquals  |
-  AssignmentOperatorOrEquals  |
-  AssignmentOperatorXorEquals  |
-  AssignmentOperatorLeftShiftEquals  |
-  AssignmentOperatorRightShiftEquals
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentOperator = Core.Name "hydra.csharp.syntax.AssignmentOperator"
-
-_AssignmentOperator_simple = Core.Name "simple"
-
-_AssignmentOperator_plusEquals = Core.Name "plusEquals"
-
-_AssignmentOperator_minusEquals = Core.Name "minusEquals"
-
-_AssignmentOperator_timesEquals = Core.Name "timesEquals"
-
-_AssignmentOperator_divideEquals = Core.Name "divideEquals"
-
-_AssignmentOperator_modEquals = Core.Name "modEquals"
-
-_AssignmentOperator_andEquals = Core.Name "andEquals"
-
-_AssignmentOperator_orEquals = Core.Name "orEquals"
-
-_AssignmentOperator_xorEquals = Core.Name "xorEquals"
-
-_AssignmentOperator_leftShiftEquals = Core.Name "leftShiftEquals"
-
-_AssignmentOperator_rightShiftEquals = Core.Name "rightShiftEquals"
-
-data Expression =
-  ExpressionNonAssignment NonAssignmentExpression |
-  ExpressionAssignment Assignment
-  deriving (Eq, Ord, Read, Show)
-
-_Expression = Core.Name "hydra.csharp.syntax.Expression"
-
-_Expression_nonAssignment = Core.Name "nonAssignment"
-
-_Expression_assignment = Core.Name "assignment"
-
-data NonAssignmentExpression =
-  NonAssignmentExpressionDeclaration DeclarationExpression |
-  NonAssignmentExpressionConditional ConditionalExpression |
-  NonAssignmentExpressionLambda LambdaExpression |
-  NonAssignmentExpressionQuery QueryExpression
-  deriving (Eq, Ord, Read, Show)
-
-_NonAssignmentExpression = Core.Name "hydra.csharp.syntax.NonAssignmentExpression"
-
-_NonAssignmentExpression_declaration = Core.Name "declaration"
-
-_NonAssignmentExpression_conditional = Core.Name "conditional"
-
-_NonAssignmentExpression_lambda = Core.Name "lambda"
-
-_NonAssignmentExpression_query = Core.Name "query"
-
-newtype ConstantExpression =
-  ConstantExpression {
-    unConstantExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstantExpression = Core.Name "hydra.csharp.syntax.ConstantExpression"
-
-newtype BooleanExpression =
-  BooleanExpression {
-    unBooleanExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanExpression = Core.Name "hydra.csharp.syntax.BooleanExpression"
-
-data Statement =
-  StatementLabeled LabeledStatement |
-  StatementDeclaration DeclarationStatement |
-  StatementEmbedded EmbeddedStatement
-  deriving (Eq, Ord, Read, Show)
-
-_Statement = Core.Name "hydra.csharp.syntax.Statement"
-
-_Statement_labeled = Core.Name "labeled"
-
-_Statement_declaration = Core.Name "declaration"
-
-_Statement_embedded = Core.Name "embedded"
-
-data EmbeddedStatement =
-  EmbeddedStatementBlock Block |
-  EmbeddedStatementEmpty  |
-  EmbeddedStatementExpression StatementExpression |
-  EmbeddedStatementSelection SelectionStatement |
-  EmbeddedStatementIteration IterationStatement |
-  EmbeddedStatementJump JumpStatement |
-  EmbeddedStatementTry TryStatement |
-  EmbeddedStatementChecked Block |
-  EmbeddedStatementUnchecked Block |
-  EmbeddedStatementLock LockStatement |
-  EmbeddedStatementUsing UsingStatement |
-  EmbeddedStatementYield YieldStatement |
-  EmbeddedStatementUnsafe Block |
-  EmbeddedStatementFixed FixedStatement
-  deriving (Eq, Ord, Read, Show)
-
-_EmbeddedStatement = Core.Name "hydra.csharp.syntax.EmbeddedStatement"
-
-_EmbeddedStatement_block = Core.Name "block"
-
-_EmbeddedStatement_empty = Core.Name "empty"
-
-_EmbeddedStatement_expression = Core.Name "expression"
-
-_EmbeddedStatement_selection = Core.Name "selection"
-
-_EmbeddedStatement_iteration = Core.Name "iteration"
-
-_EmbeddedStatement_jump = Core.Name "jump"
-
-_EmbeddedStatement_try = Core.Name "try"
-
-_EmbeddedStatement_checked = Core.Name "checked"
-
-_EmbeddedStatement_unchecked = Core.Name "unchecked"
-
-_EmbeddedStatement_lock = Core.Name "lock"
-
-_EmbeddedStatement_using = Core.Name "using"
-
-_EmbeddedStatement_yield = Core.Name "yield"
-
-_EmbeddedStatement_unsafe = Core.Name "unsafe"
-
-_EmbeddedStatement_fixed = Core.Name "fixed"
-
-newtype Block =
-  Block {
-    unBlock :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_Block = Core.Name "hydra.csharp.syntax.Block"
-
-data LabeledStatement =
-  LabeledStatement {
-    labeledStatementLabel :: Identifier,
-    labeledStatementStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_LabeledStatement = Core.Name "hydra.csharp.syntax.LabeledStatement"
-
-_LabeledStatement_label = Core.Name "label"
-
-_LabeledStatement_statement = Core.Name "statement"
-
-data DeclarationStatement =
-  DeclarationStatementVariable LocalVariableDeclaration |
-  DeclarationStatementConstant LocalConstantDeclaration |
-  DeclarationStatementFunction LocalFunctionDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_DeclarationStatement = Core.Name "hydra.csharp.syntax.DeclarationStatement"
-
-_DeclarationStatement_variable = Core.Name "variable"
-
-_DeclarationStatement_constant = Core.Name "constant"
-
-_DeclarationStatement_function = Core.Name "function"
-
-data LocalVariableDeclaration =
-  LocalVariableDeclarationImplicitlyTyped ImplicitlyTypedLocalVariableDeclaration |
-  LocalVariableDeclarationExplicitlyTyped ExplicitlyTypedLocalVariableDeclaration |
-  LocalVariableDeclarationRef RefLocalVariableDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_LocalVariableDeclaration = Core.Name "hydra.csharp.syntax.LocalVariableDeclaration"
-
-_LocalVariableDeclaration_implicitlyTyped = Core.Name "implicitlyTyped"
-
-_LocalVariableDeclaration_explicitlyTyped = Core.Name "explicitlyTyped"
-
-_LocalVariableDeclaration_ref = Core.Name "ref"
-
-data ImplicitlyTypedLocalVariableDeclaration =
-  ImplicitlyTypedLocalVariableDeclarationVar ImplicitlyTypedLocalVariableDeclarator |
-  ImplicitlyTypedLocalVariableDeclarationRefVar RefVarImplicitlyTypedLocalVariableDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_ImplicitlyTypedLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclaration"
-
-_ImplicitlyTypedLocalVariableDeclaration_var = Core.Name "var"
-
-_ImplicitlyTypedLocalVariableDeclaration_refVar = Core.Name "refVar"
-
-data RefVarImplicitlyTypedLocalVariableDeclaration =
-  RefVarImplicitlyTypedLocalVariableDeclaration {
-    refVarImplicitlyTypedLocalVariableDeclarationRefKind :: RefKind,
-    refVarImplicitlyTypedLocalVariableDeclarationDeclarator :: RefLocalVariableDeclarator}
-  deriving (Eq, Ord, Read, Show)
-
-_RefVarImplicitlyTypedLocalVariableDeclaration =
-    Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"
-
-_RefVarImplicitlyTypedLocalVariableDeclaration_refKind = Core.Name "refKind"
-
-_RefVarImplicitlyTypedLocalVariableDeclaration_declarator = Core.Name "declarator"
-
-data ImplicitlyTypedLocalVariableDeclarator =
-  ImplicitlyTypedLocalVariableDeclarator {
-    implicitlyTypedLocalVariableDeclaratorIdentifier :: Identifier,
-    implicitlyTypedLocalVariableDeclaratorExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ImplicitlyTypedLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"
-
-_ImplicitlyTypedLocalVariableDeclarator_identifier = Core.Name "identifier"
-
-_ImplicitlyTypedLocalVariableDeclarator_expression = Core.Name "expression"
-
-data ExplicitlyTypedLocalVariableDeclaration =
-  ExplicitlyTypedLocalVariableDeclaration {
-    explicitlyTypedLocalVariableDeclarationType :: Type,
-    explicitlyTypedLocalVariableDeclarationDeclarators :: [ExplicitlyTypedLocalVariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExplicitlyTypedLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"
-
-_ExplicitlyTypedLocalVariableDeclaration_type = Core.Name "type"
-
-_ExplicitlyTypedLocalVariableDeclaration_declarators = Core.Name "declarators"
-
-data ExplicitlyTypedLocalVariableDeclarator =
-  ExplicitlyTypedLocalVariableDeclarator {
-    explicitlyTypedLocalVariableDeclaratorIdentifier :: Identifier,
-    explicitlyTypedLocalVariableDeclaratorInitializer :: (Maybe LocalVariableInitializer)}
-  deriving (Eq, Ord, Read, Show)
-
-_ExplicitlyTypedLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"
-
-_ExplicitlyTypedLocalVariableDeclarator_identifier = Core.Name "identifier"
-
-_ExplicitlyTypedLocalVariableDeclarator_initializer = Core.Name "initializer"
-
-data LocalVariableInitializer =
-  LocalVariableInitializerExpression Expression |
-  LocalVariableInitializerInitializer ArrayInitializer
-  deriving (Eq, Ord, Read, Show)
-
-_LocalVariableInitializer = Core.Name "hydra.csharp.syntax.LocalVariableInitializer"
-
-_LocalVariableInitializer_expression = Core.Name "expression"
-
-_LocalVariableInitializer_initializer = Core.Name "initializer"
-
-data RefLocalVariableDeclaration =
-  RefLocalVariableDeclaration {
-    refLocalVariableDeclarationRefKind :: RefKind,
-    refLocalVariableDeclarationType :: Type,
-    refLocalVariableDeclarationDeclarators :: [RefLocalVariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_RefLocalVariableDeclaration = Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"
-
-_RefLocalVariableDeclaration_refKind = Core.Name "refKind"
-
-_RefLocalVariableDeclaration_type = Core.Name "type"
-
-_RefLocalVariableDeclaration_declarators = Core.Name "declarators"
-
-data RefLocalVariableDeclarator =
-  RefLocalVariableDeclarator {
-    refLocalVariableDeclaratorLeft :: Identifier,
-    refLocalVariableDeclaratorRight :: VariableReference}
-  deriving (Eq, Ord, Read, Show)
-
-_RefLocalVariableDeclarator = Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"
-
-_RefLocalVariableDeclarator_left = Core.Name "left"
-
-_RefLocalVariableDeclarator_right = Core.Name "right"
-
-data LocalConstantDeclaration =
-  LocalConstantDeclaration {
-    localConstantDeclarationType :: Type,
-    localConstantDeclarationDeclarators :: [ConstantDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_LocalConstantDeclaration = Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"
-
-_LocalConstantDeclaration_type = Core.Name "type"
-
-_LocalConstantDeclaration_declarators = Core.Name "declarators"
-
-data ConstantDeclarator =
-  ConstantDeclarator {
-    constantDeclaratorIdentifier :: Identifier,
-    constantDeclaratorExpression :: ConstantExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstantDeclarator = Core.Name "hydra.csharp.syntax.ConstantDeclarator"
-
-_ConstantDeclarator_identifier = Core.Name "identifier"
-
-_ConstantDeclarator_expression = Core.Name "expression"
-
-data LocalFunctionDeclaration =
-  LocalFunctionDeclarationStandard StandardLocalFunctionDeclaration |
-  LocalFunctionDeclarationRef RefLocalFunctionDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_LocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.LocalFunctionDeclaration"
-
-_LocalFunctionDeclaration_standard = Core.Name "standard"
-
-_LocalFunctionDeclaration_ref = Core.Name "ref"
-
-data StandardLocalFunctionDeclaration =
-  StandardLocalFunctionDeclaration {
-    standardLocalFunctionDeclarationModifiers :: [LocalFunctionModifier],
-    standardLocalFunctionDeclarationReturnType :: ReturnType,
-    standardLocalFunctionDeclarationHeader :: LocalFunctionHeader,
-    standardLocalFunctionDeclarationBody :: LocalFunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_StandardLocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"
-
-_StandardLocalFunctionDeclaration_modifiers = Core.Name "modifiers"
-
-_StandardLocalFunctionDeclaration_returnType = Core.Name "returnType"
-
-_StandardLocalFunctionDeclaration_header = Core.Name "header"
-
-_StandardLocalFunctionDeclaration_body = Core.Name "body"
-
-data RefLocalFunctionDeclaration =
-  RefLocalFunctionDeclaration {
-    refLocalFunctionDeclarationModifiers :: [RefLocalFunctionModifier],
-    refLocalFunctionDeclarationRefKind :: RefKind,
-    refLocalFunctionDeclarationReturnType :: Type,
-    refLocalFunctionDeclarationHeader :: LocalFunctionHeader,
-    refLocalFunctionDeclarationBody :: RefLocalFunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_RefLocalFunctionDeclaration = Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"
-
-_RefLocalFunctionDeclaration_modifiers = Core.Name "modifiers"
-
-_RefLocalFunctionDeclaration_refKind = Core.Name "refKind"
-
-_RefLocalFunctionDeclaration_returnType = Core.Name "returnType"
-
-_RefLocalFunctionDeclaration_header = Core.Name "header"
-
-_RefLocalFunctionDeclaration_body = Core.Name "body"
-
-data LocalFunctionHeader =
-  LocalFunctionHeader {
-    localFunctionHeaderIdentifier :: Identifier,
-    localFunctionHeaderTypeParameters :: (Maybe TypeParameterList),
-    localFunctionHeaderParameters :: FormalParameterList,
-    localFunctionHeaderConstraints :: [TypeParameterConstraintsClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_LocalFunctionHeader = Core.Name "hydra.csharp.syntax.LocalFunctionHeader"
-
-_LocalFunctionHeader_identifier = Core.Name "identifier"
-
-_LocalFunctionHeader_typeParameters = Core.Name "typeParameters"
-
-_LocalFunctionHeader_parameters = Core.Name "parameters"
-
-_LocalFunctionHeader_constraints = Core.Name "constraints"
-
-data LocalFunctionModifier =
-  LocalFunctionModifierRef RefLocalFunctionModifier |
-  LocalFunctionModifierAsync
-  deriving (Eq, Ord, Read, Show)
-
-_LocalFunctionModifier = Core.Name "hydra.csharp.syntax.LocalFunctionModifier"
-
-_LocalFunctionModifier_ref = Core.Name "ref"
-
-_LocalFunctionModifier_async = Core.Name "async"
-
-data RefLocalFunctionModifier =
-  RefLocalFunctionModifierStatic  |
-  RefLocalFunctionModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_RefLocalFunctionModifier = Core.Name "hydra.csharp.syntax.RefLocalFunctionModifier"
-
-_RefLocalFunctionModifier_static = Core.Name "static"
-
-_RefLocalFunctionModifier_unsafe = Core.Name "unsafe"
-
-data LocalFunctionBody =
-  LocalFunctionBodyBlock Block |
-  LocalFunctionBodyNullConditionalInvocation NullConditionalInvocationExpression |
-  LocalFunctionBodyExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_LocalFunctionBody = Core.Name "hydra.csharp.syntax.LocalFunctionBody"
-
-_LocalFunctionBody_block = Core.Name "block"
-
-_LocalFunctionBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"
-
-_LocalFunctionBody_expression = Core.Name "expression"
-
-data RefLocalFunctionBody =
-  RefLocalFunctionBodyBlock Block |
-  RefLocalFunctionBodyRef VariableReference
-  deriving (Eq, Ord, Read, Show)
-
-_RefLocalFunctionBody = Core.Name "hydra.csharp.syntax.RefLocalFunctionBody"
-
-_RefLocalFunctionBody_block = Core.Name "block"
-
-_RefLocalFunctionBody_ref = Core.Name "ref"
-
-data StatementExpression =
-  StatementExpressionNullConditionalInvocation NullConditionalInvocationExpression |
-  StatementExpressionInvocation InvocationExpression |
-  StatementExpressionObjectCreation ObjectCreationExpression |
-  StatementExpressionAssignment Assignment |
-  StatementExpressionPostIncrement PrimaryExpression |
-  StatementExpressionPostDecrement PrimaryExpression |
-  StatementExpressionPreIncrement UnaryExpression |
-  StatementExpressionPreDecrement UnaryExpression |
-  StatementExpressionAwait UnaryExpression
-  deriving (Eq, Ord, Read, Show)
-
-_StatementExpression = Core.Name "hydra.csharp.syntax.StatementExpression"
-
-_StatementExpression_nullConditionalInvocation = Core.Name "nullConditionalInvocation"
-
-_StatementExpression_invocation = Core.Name "invocation"
-
-_StatementExpression_objectCreation = Core.Name "objectCreation"
-
-_StatementExpression_assignment = Core.Name "assignment"
-
-_StatementExpression_postIncrement = Core.Name "postIncrement"
-
-_StatementExpression_postDecrement = Core.Name "postDecrement"
-
-_StatementExpression_preIncrement = Core.Name "preIncrement"
-
-_StatementExpression_preDecrement = Core.Name "preDecrement"
-
-_StatementExpression_await = Core.Name "await"
-
-data SelectionStatement =
-  SelectionStatementIf IfStatement |
-  SelectionStatementSwitch SwitchStatement
-  deriving (Eq, Ord, Read, Show)
-
-_SelectionStatement = Core.Name "hydra.csharp.syntax.SelectionStatement"
-
-_SelectionStatement_if = Core.Name "if"
-
-_SelectionStatement_switch = Core.Name "switch"
-
-data IfStatement =
-  IfStatement {
-    ifStatementCondition :: BooleanExpression,
-    ifStatementIfBranch :: EmbeddedStatement,
-    ifStatementElseBranch :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_IfStatement = Core.Name "hydra.csharp.syntax.IfStatement"
-
-_IfStatement_condition = Core.Name "condition"
-
-_IfStatement_ifBranch = Core.Name "ifBranch"
-
-_IfStatement_elseBranch = Core.Name "elseBranch"
-
-data SwitchStatement =
-  SwitchStatement {
-    switchStatementExpression :: Expression,
-    switchStatementBranches :: [SwitchSection]}
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchStatement = Core.Name "hydra.csharp.syntax.SwitchStatement"
-
-_SwitchStatement_expression = Core.Name "expression"
-
-_SwitchStatement_branches = Core.Name "branches"
-
-data SwitchSection =
-  SwitchSection {
-    switchSectionLabels :: [SwitchLabel],
-    switchSectionStatements :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchSection = Core.Name "hydra.csharp.syntax.SwitchSection"
-
-_SwitchSection_labels = Core.Name "labels"
-
-_SwitchSection_statements = Core.Name "statements"
-
-data SwitchLabel =
-  SwitchLabelBranch SwitchBranch |
-  SwitchLabelDefault
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchLabel = Core.Name "hydra.csharp.syntax.SwitchLabel"
-
-_SwitchLabel_branch = Core.Name "branch"
-
-_SwitchLabel_default = Core.Name "default"
-
-data SwitchBranch =
-  SwitchBranch {
-    switchBranchPattern :: Pattern,
-    switchBranchGuard :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchBranch = Core.Name "hydra.csharp.syntax.SwitchBranch"
-
-_SwitchBranch_pattern = Core.Name "pattern"
-
-_SwitchBranch_guard = Core.Name "guard"
-
-data IterationStatement =
-  IterationStatementWhile WhileStatement |
-  IterationStatementDo DoStatement |
-  IterationStatementFor ForStatement |
-  IterationStatementForeach ForeachStatement
-  deriving (Eq, Ord, Read, Show)
-
-_IterationStatement = Core.Name "hydra.csharp.syntax.IterationStatement"
-
-_IterationStatement_while = Core.Name "while"
-
-_IterationStatement_do = Core.Name "do"
-
-_IterationStatement_for = Core.Name "for"
-
-_IterationStatement_foreach = Core.Name "foreach"
-
-data WhileStatement =
-  WhileStatement {
-    whileStatementCondition :: BooleanExpression,
-    whileStatementBody :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_WhileStatement = Core.Name "hydra.csharp.syntax.WhileStatement"
-
-_WhileStatement_condition = Core.Name "condition"
-
-_WhileStatement_body = Core.Name "body"
-
-data DoStatement =
-  DoStatement {
-    doStatementBody :: EmbeddedStatement,
-    doStatementWhile :: BooleanExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_DoStatement = Core.Name "hydra.csharp.syntax.DoStatement"
-
-_DoStatement_body = Core.Name "body"
-
-_DoStatement_while = Core.Name "while"
-
-data ForStatement =
-  ForStatement {
-    forStatementInitializer :: (Maybe ForInitializer),
-    forStatementCondition :: (Maybe BooleanExpression),
-    forStatementIterator :: (Maybe StatementExpressionList),
-    forStatementBody :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_ForStatement = Core.Name "hydra.csharp.syntax.ForStatement"
-
-_ForStatement_initializer = Core.Name "initializer"
-
-_ForStatement_condition = Core.Name "condition"
-
-_ForStatement_iterator = Core.Name "iterator"
-
-_ForStatement_body = Core.Name "body"
-
-data ForInitializer =
-  ForInitializerVariable LocalVariableDeclaration |
-  ForInitializerStatements StatementExpressionList
-  deriving (Eq, Ord, Read, Show)
-
-_ForInitializer = Core.Name "hydra.csharp.syntax.ForInitializer"
-
-_ForInitializer_variable = Core.Name "variable"
-
-_ForInitializer_statements = Core.Name "statements"
-
-newtype StatementExpressionList =
-  StatementExpressionList {
-    unStatementExpressionList :: [StatementExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_StatementExpressionList = Core.Name "hydra.csharp.syntax.StatementExpressionList"
-
-data ForeachStatement =
-  ForeachStatement {
-    foreachStatementKind :: (Maybe RefKind),
-    foreachStatementType :: LocalVariableType,
-    foreachStatementIdentifier :: Identifier,
-    foreachStatementExpression :: Expression,
-    foreachStatementBody :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_ForeachStatement = Core.Name "hydra.csharp.syntax.ForeachStatement"
-
-_ForeachStatement_kind = Core.Name "kind"
-
-_ForeachStatement_type = Core.Name "type"
-
-_ForeachStatement_identifier = Core.Name "identifier"
-
-_ForeachStatement_expression = Core.Name "expression"
-
-_ForeachStatement_body = Core.Name "body"
-
-data JumpStatement =
-  JumpStatementBreak  |
-  JumpStatementContinue  |
-  JumpStatementGoto GotoStatement |
-  JumpStatementReturn ReturnStatement |
-  JumpStatementThrow (Maybe Expression)
-  deriving (Eq, Ord, Read, Show)
-
-_JumpStatement = Core.Name "hydra.csharp.syntax.JumpStatement"
-
-_JumpStatement_break = Core.Name "break"
-
-_JumpStatement_continue = Core.Name "continue"
-
-_JumpStatement_goto = Core.Name "goto"
-
-_JumpStatement_return = Core.Name "return"
-
-_JumpStatement_throw = Core.Name "throw"
-
-data GotoStatement =
-  GotoStatementIdentifier Identifier |
-  GotoStatementCase ConstantExpression |
-  GotoStatementDefault
-  deriving (Eq, Ord, Read, Show)
-
-_GotoStatement = Core.Name "hydra.csharp.syntax.GotoStatement"
-
-_GotoStatement_identifier = Core.Name "identifier"
-
-_GotoStatement_case = Core.Name "case"
-
-_GotoStatement_default = Core.Name "default"
-
-data ReturnStatement =
-  ReturnStatementSimple  |
-  ReturnStatementValue Expression |
-  ReturnStatementRef VariableReference
-  deriving (Eq, Ord, Read, Show)
-
-_ReturnStatement = Core.Name "hydra.csharp.syntax.ReturnStatement"
-
-_ReturnStatement_simple = Core.Name "simple"
-
-_ReturnStatement_value = Core.Name "value"
-
-_ReturnStatement_ref = Core.Name "ref"
-
-data TryStatement =
-  TryStatement {
-    tryStatementBody :: Block,
-    tryStatementCatches :: CatchClauses,
-    tryStatementFinally :: (Maybe Block)}
-  deriving (Eq, Ord, Read, Show)
-
-_TryStatement = Core.Name "hydra.csharp.syntax.TryStatement"
-
-_TryStatement_body = Core.Name "body"
-
-_TryStatement_catches = Core.Name "catches"
-
-_TryStatement_finally = Core.Name "finally"
-
-data CatchClauses =
-  CatchClausesSpecific [SpecificCatchClause] |
-  CatchClausesGeneral Block
-  deriving (Eq, Ord, Read, Show)
-
-_CatchClauses = Core.Name "hydra.csharp.syntax.CatchClauses"
-
-_CatchClauses_specific = Core.Name "specific"
-
-_CatchClauses_general = Core.Name "general"
-
-data SpecificCatchClause =
-  SpecificCatchClause {
-    specificCatchClauseSpecifier :: (Maybe ExceptionSpecifier),
-    specificCatchClauseFilter :: (Maybe BooleanExpression),
-    specificCatchClauseBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_SpecificCatchClause = Core.Name "hydra.csharp.syntax.SpecificCatchClause"
-
-_SpecificCatchClause_specifier = Core.Name "specifier"
-
-_SpecificCatchClause_filter = Core.Name "filter"
-
-_SpecificCatchClause_body = Core.Name "body"
-
-data ExceptionSpecifier =
-  ExceptionSpecifier {
-    exceptionSpecifierType :: Type,
-    exceptionSpecifierIdentifier :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-
-_ExceptionSpecifier = Core.Name "hydra.csharp.syntax.ExceptionSpecifier"
-
-_ExceptionSpecifier_type = Core.Name "type"
-
-_ExceptionSpecifier_identifier = Core.Name "identifier"
-
-data LockStatement =
-  LockStatement {
-    lockStatementExpression :: Expression,
-    lockStatementBody :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_LockStatement = Core.Name "hydra.csharp.syntax.LockStatement"
-
-_LockStatement_expression = Core.Name "expression"
-
-_LockStatement_body = Core.Name "body"
-
-data UsingStatement =
-  UsingStatement {
-    usingStatementAcquisition :: ResourceAcquisition,
-    usingStatementBody :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_UsingStatement = Core.Name "hydra.csharp.syntax.UsingStatement"
-
-_UsingStatement_acquisition = Core.Name "acquisition"
-
-_UsingStatement_body = Core.Name "body"
-
-data ResourceAcquisition =
-  ResourceAcquisitionLocal LocalVariableDeclaration |
-  ResourceAcquisitionExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_ResourceAcquisition = Core.Name "hydra.csharp.syntax.ResourceAcquisition"
-
-_ResourceAcquisition_local = Core.Name "local"
-
-_ResourceAcquisition_expression = Core.Name "expression"
-
-data YieldStatement =
-  YieldStatementReturn Expression |
-  YieldStatementBreak
-  deriving (Eq, Ord, Read, Show)
-
-_YieldStatement = Core.Name "hydra.csharp.syntax.YieldStatement"
-
-_YieldStatement_return = Core.Name "return"
-
-_YieldStatement_break = Core.Name "break"
-
-data CompilationUnit =
-  CompilationUnit {
-    compilationUnitExterns :: [ExternAliasDirective],
-    compilationUnitUsings :: [UsingDirective],
-    compilationUnitAttributes :: [GlobalAttributeSection],
-    compilationUnitMembers :: [NamespaceMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_CompilationUnit = Core.Name "hydra.csharp.syntax.CompilationUnit"
-
-_CompilationUnit_externs = Core.Name "externs"
-
-_CompilationUnit_usings = Core.Name "usings"
-
-_CompilationUnit_attributes = Core.Name "attributes"
-
-_CompilationUnit_members = Core.Name "members"
-
-data NamespaceDeclaration =
-  NamespaceDeclaration {
-    namespaceDeclarationName :: QualifiedIdentifier,
-    namespaceDeclarationBody :: NamespaceBody}
-  deriving (Eq, Ord, Read, Show)
-
-_NamespaceDeclaration = Core.Name "hydra.csharp.syntax.NamespaceDeclaration"
-
-_NamespaceDeclaration_name = Core.Name "name"
-
-_NamespaceDeclaration_body = Core.Name "body"
-
-newtype QualifiedIdentifier =
-  QualifiedIdentifier {
-    unQualifiedIdentifier :: [Identifier]}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedIdentifier = Core.Name "hydra.csharp.syntax.QualifiedIdentifier"
-
-data NamespaceBody =
-  NamespaceBody {
-    namespaceBodyExterns :: [ExternAliasDirective],
-    namespaceBodyUsings :: [UsingDirective],
-    namespaceBodyMembers :: [NamespaceMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_NamespaceBody = Core.Name "hydra.csharp.syntax.NamespaceBody"
-
-_NamespaceBody_externs = Core.Name "externs"
-
-_NamespaceBody_usings = Core.Name "usings"
-
-_NamespaceBody_members = Core.Name "members"
-
-newtype ExternAliasDirective =
-  ExternAliasDirective {
-    unExternAliasDirective :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ExternAliasDirective = Core.Name "hydra.csharp.syntax.ExternAliasDirective"
-
-data UsingDirective =
-  UsingDirectiveAlias UsingAliasDirective |
-  UsingDirectiveNamespace NamespaceName |
-  UsingDirectiveStatic TypeName
-  deriving (Eq, Ord, Read, Show)
-
-_UsingDirective = Core.Name "hydra.csharp.syntax.UsingDirective"
-
-_UsingDirective_alias = Core.Name "alias"
-
-_UsingDirective_namespace = Core.Name "namespace"
-
-_UsingDirective_static = Core.Name "static"
-
-data UsingAliasDirective =
-  UsingAliasDirective {
-    usingAliasDirectiveAlias :: Identifier,
-    usingAliasDirectiveName :: NamespaceOrTypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_UsingAliasDirective = Core.Name "hydra.csharp.syntax.UsingAliasDirective"
-
-_UsingAliasDirective_alias = Core.Name "alias"
-
-_UsingAliasDirective_name = Core.Name "name"
-
-data NamespaceMemberDeclaration =
-  NamespaceMemberDeclarationNamespace NamespaceDeclaration |
-  NamespaceMemberDeclarationType TypeDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_NamespaceMemberDeclaration = Core.Name "hydra.csharp.syntax.NamespaceMemberDeclaration"
-
-_NamespaceMemberDeclaration_namespace = Core.Name "namespace"
-
-_NamespaceMemberDeclaration_type = Core.Name "type"
-
-data TypeDeclaration =
-  TypeDeclarationClass ClassDeclaration |
-  TypeDeclarationStruct StructDeclaration |
-  TypeDeclarationInterface InterfaceDeclaration |
-  TypeDeclarationEnum EnumDeclaration |
-  TypeDeclarationDelegate DelegateDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_TypeDeclaration = Core.Name "hydra.csharp.syntax.TypeDeclaration"
-
-_TypeDeclaration_class = Core.Name "class"
-
-_TypeDeclaration_struct = Core.Name "struct"
-
-_TypeDeclaration_interface = Core.Name "interface"
-
-_TypeDeclaration_enum = Core.Name "enum"
-
-_TypeDeclaration_delegate = Core.Name "delegate"
-
-data QualifiedAliasMember =
-  QualifiedAliasMember {
-    qualifiedAliasMemberAlias :: Identifier,
-    qualifiedAliasMemberMember :: Identifier,
-    qualifiedAliasMemberArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedAliasMember = Core.Name "hydra.csharp.syntax.QualifiedAliasMember"
-
-_QualifiedAliasMember_alias = Core.Name "alias"
-
-_QualifiedAliasMember_member = Core.Name "member"
-
-_QualifiedAliasMember_arguments = Core.Name "arguments"
-
-data ClassDeclaration =
-  ClassDeclaration {
-    classDeclarationAttributes :: [AttributeSection],
-    classDeclarationModifiers :: [ClassModifier],
-    classDeclarationPartial :: Bool,
-    classDeclarationName :: Identifier,
-    classDeclarationParameters :: (Maybe TypeParameterList),
-    classDeclarationBase :: (Maybe ClassBase),
-    classDeclarationConstraints :: [TypeParameterConstraintsClause],
-    classDeclarationBody :: ClassBody}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassDeclaration = Core.Name "hydra.csharp.syntax.ClassDeclaration"
-
-_ClassDeclaration_attributes = Core.Name "attributes"
-
-_ClassDeclaration_modifiers = Core.Name "modifiers"
-
-_ClassDeclaration_partial = Core.Name "partial"
-
-_ClassDeclaration_name = Core.Name "name"
-
-_ClassDeclaration_parameters = Core.Name "parameters"
-
-_ClassDeclaration_base = Core.Name "base"
-
-_ClassDeclaration_constraints = Core.Name "constraints"
-
-_ClassDeclaration_body = Core.Name "body"
-
-data ClassModifier =
-  ClassModifierNew  |
-  ClassModifierPublic  |
-  ClassModifierProtected  |
-  ClassModifierInternal  |
-  ClassModifierPrivate  |
-  ClassModifierAbstract  |
-  ClassModifierSealed  |
-  ClassModifierStatic  |
-  ClassModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_ClassModifier = Core.Name "hydra.csharp.syntax.ClassModifier"
-
-_ClassModifier_new = Core.Name "new"
-
-_ClassModifier_public = Core.Name "public"
-
-_ClassModifier_protected = Core.Name "protected"
-
-_ClassModifier_internal = Core.Name "internal"
-
-_ClassModifier_private = Core.Name "private"
-
-_ClassModifier_abstract = Core.Name "abstract"
-
-_ClassModifier_sealed = Core.Name "sealed"
-
-_ClassModifier_static = Core.Name "static"
-
-_ClassModifier_unsafe = Core.Name "unsafe"
-
-newtype TypeParameterList =
-  TypeParameterList {
-    unTypeParameterList :: [TypeParameterPart]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameterList = Core.Name "hydra.csharp.syntax.TypeParameterList"
-
-data TypeParameterPart =
-  TypeParameterPart {
-    typeParameterPartAttributes :: (Maybe Attributes),
-    typeParameterPartName :: TypeParameter}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameterPart = Core.Name "hydra.csharp.syntax.TypeParameterPart"
-
-_TypeParameterPart_attributes = Core.Name "attributes"
-
-_TypeParameterPart_name = Core.Name "name"
-
-data ClassBase =
-  ClassBaseClass (Maybe ClassType) |
-  ClassBaseInterfaces [InterfaceType]
-  deriving (Eq, Ord, Read, Show)
-
-_ClassBase = Core.Name "hydra.csharp.syntax.ClassBase"
-
-_ClassBase_class = Core.Name "class"
-
-_ClassBase_interfaces = Core.Name "interfaces"
-
-data TypeParameterConstraintsClause =
-  TypeParameterConstraintsClause {
-    typeParameterConstraintsClauseParameter :: TypeParameter,
-    typeParameterConstraintsClauseConstraints :: [TypeParameterConstraints]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameterConstraintsClause = Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"
-
-_TypeParameterConstraintsClause_parameter = Core.Name "parameter"
-
-_TypeParameterConstraintsClause_constraints = Core.Name "constraints"
-
-data TypeParameterConstraints =
-  TypeParameterConstraints {
-    typeParameterConstraintsPrimary :: (Maybe PrimaryConstraint),
-    typeParameterConstraintsSecondary :: (Maybe SecondaryConstraints),
-    typeParameterConstraintsConstructor :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameterConstraints = Core.Name "hydra.csharp.syntax.TypeParameterConstraints"
-
-_TypeParameterConstraints_primary = Core.Name "primary"
-
-_TypeParameterConstraints_secondary = Core.Name "secondary"
-
-_TypeParameterConstraints_constructor = Core.Name "constructor"
-
-data PrimaryConstraint =
-  PrimaryConstraintClassType ClassType |
-  PrimaryConstraintClass  |
-  PrimaryConstraintStruct  |
-  PrimaryConstraintUnmanaged
-  deriving (Eq, Ord, Read, Show)
-
-_PrimaryConstraint = Core.Name "hydra.csharp.syntax.PrimaryConstraint"
-
-_PrimaryConstraint_classType = Core.Name "classType"
-
-_PrimaryConstraint_class = Core.Name "class"
-
-_PrimaryConstraint_struct = Core.Name "struct"
-
-_PrimaryConstraint_unmanaged = Core.Name "unmanaged"
-
-newtype SecondaryConstraints =
-  SecondaryConstraints {
-    unSecondaryConstraints :: [SecondaryConstraint]}
-  deriving (Eq, Ord, Read, Show)
-
-_SecondaryConstraints = Core.Name "hydra.csharp.syntax.SecondaryConstraints"
-
-data SecondaryConstraint =
-  SecondaryConstraintInterface InterfaceType |
-  SecondaryConstraintParameter TypeParameter
-  deriving (Eq, Ord, Read, Show)
-
-_SecondaryConstraint = Core.Name "hydra.csharp.syntax.SecondaryConstraint"
-
-_SecondaryConstraint_interface = Core.Name "interface"
-
-_SecondaryConstraint_parameter = Core.Name "parameter"
-
-newtype ClassBody =
-  ClassBody {
-    unClassBody :: [ClassMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassBody = Core.Name "hydra.csharp.syntax.ClassBody"
-
-data ClassMemberDeclaration =
-  ClassMemberDeclarationConstant ConstantDeclaration |
-  ClassMemberDeclarationField FieldDeclaration |
-  ClassMemberDeclarationMethod MethodDeclaration |
-  ClassMemberDeclarationProperty PropertyDeclaration |
-  ClassMemberDeclarationEvent EventDeclaration |
-  ClassMemberDeclarationIndexer IndexerDeclaration |
-  ClassMemberDeclarationOperator OperatorDeclaration |
-  ClassMemberDeclarationConstructor ConstructorDeclaration |
-  ClassMemberDeclarationFinalizer FinalizerDeclaration |
-  ClassMemberDeclarationStaticConstructor StaticConstructorDeclaration |
-  ClassMemberDeclarationType TypeDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_ClassMemberDeclaration = Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"
-
-_ClassMemberDeclaration_constant = Core.Name "constant"
-
-_ClassMemberDeclaration_field = Core.Name "field"
-
-_ClassMemberDeclaration_method = Core.Name "method"
-
-_ClassMemberDeclaration_property = Core.Name "property"
-
-_ClassMemberDeclaration_event = Core.Name "event"
-
-_ClassMemberDeclaration_indexer = Core.Name "indexer"
-
-_ClassMemberDeclaration_operator = Core.Name "operator"
-
-_ClassMemberDeclaration_constructor = Core.Name "constructor"
-
-_ClassMemberDeclaration_finalizer = Core.Name "finalizer"
-
-_ClassMemberDeclaration_staticConstructor = Core.Name "staticConstructor"
-
-_ClassMemberDeclaration_type = Core.Name "type"
-
-data ConstantDeclaration =
-  ConstantDeclaration {
-    constantDeclarationAttributes :: (Maybe Attributes),
-    constantDeclarationModifiers :: [ConstantModifier],
-    constantDeclarationType :: Type,
-    constantDeclarationDeclarators :: [ConstantDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstantDeclaration = Core.Name "hydra.csharp.syntax.ConstantDeclaration"
-
-_ConstantDeclaration_attributes = Core.Name "attributes"
-
-_ConstantDeclaration_modifiers = Core.Name "modifiers"
-
-_ConstantDeclaration_type = Core.Name "type"
-
-_ConstantDeclaration_declarators = Core.Name "declarators"
-
-data ConstantModifier =
-  ConstantModifierNew  |
-  ConstantModifierPublic  |
-  ConstantModifierProtected  |
-  ConstantModifierInternal  |
-  ConstantModifierPrivate
-  deriving (Eq, Ord, Read, Show)
-
-_ConstantModifier = Core.Name "hydra.csharp.syntax.ConstantModifier"
-
-_ConstantModifier_new = Core.Name "new"
-
-_ConstantModifier_public = Core.Name "public"
-
-_ConstantModifier_protected = Core.Name "protected"
-
-_ConstantModifier_internal = Core.Name "internal"
-
-_ConstantModifier_private = Core.Name "private"
-
-data FieldDeclaration =
-  FieldDeclaration {
-    fieldDeclarationAttributes :: (Maybe Attributes),
-    fieldDeclarationModifiers :: [FieldModifier],
-    fieldDeclarationType :: Type,
-    fieldDeclarationDeclarators :: [VariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldDeclaration = Core.Name "hydra.csharp.syntax.FieldDeclaration"
-
-_FieldDeclaration_attributes = Core.Name "attributes"
-
-_FieldDeclaration_modifiers = Core.Name "modifiers"
-
-_FieldDeclaration_type = Core.Name "type"
-
-_FieldDeclaration_declarators = Core.Name "declarators"
-
-data FieldModifier =
-  FieldModifierNew  |
-  FieldModifierPublic  |
-  FieldModifierProtected  |
-  FieldModifierInternal  |
-  FieldModifierPrivate  |
-  FieldModifierStatic  |
-  FieldModifierReadonly  |
-  FieldModifierVolatile  |
-  FieldModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_FieldModifier = Core.Name "hydra.csharp.syntax.FieldModifier"
-
-_FieldModifier_new = Core.Name "new"
-
-_FieldModifier_public = Core.Name "public"
-
-_FieldModifier_protected = Core.Name "protected"
-
-_FieldModifier_internal = Core.Name "internal"
-
-_FieldModifier_private = Core.Name "private"
-
-_FieldModifier_static = Core.Name "static"
-
-_FieldModifier_readonly = Core.Name "readonly"
-
-_FieldModifier_volatile = Core.Name "volatile"
-
-_FieldModifier_unsafe = Core.Name "unsafe"
-
-newtype VariableDeclarators =
-  VariableDeclarators {
-    unVariableDeclarators :: [VariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_VariableDeclarators = Core.Name "hydra.csharp.syntax.VariableDeclarators"
-
-data VariableDeclarator =
-  VariableDeclarator {
-    variableDeclaratorIdentifier :: Identifier,
-    variableDeclaratorInitializer :: (Maybe VariableInitializer)}
-  deriving (Eq, Ord, Read, Show)
-
-_VariableDeclarator = Core.Name "hydra.csharp.syntax.VariableDeclarator"
-
-_VariableDeclarator_identifier = Core.Name "identifier"
-
-_VariableDeclarator_initializer = Core.Name "initializer"
-
-data MethodDeclaration =
-  MethodDeclarationStandard StandardMethodDeclaration |
-  MethodDeclarationRefReturn RefReturnMethodDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_MethodDeclaration = Core.Name "hydra.csharp.syntax.MethodDeclaration"
-
-_MethodDeclaration_standard = Core.Name "standard"
-
-_MethodDeclaration_refReturn = Core.Name "refReturn"
-
-data StandardMethodDeclaration =
-  StandardMethodDeclaration {
-    standardMethodDeclarationAttributes :: (Maybe Attributes),
-    standardMethodDeclarationModifiers :: [MethodModifier],
-    standardMethodDeclarationReturnType :: ReturnType,
-    standardMethodDeclarationHeader :: MethodHeader,
-    standardMethodDeclarationBody :: MethodBody}
-  deriving (Eq, Ord, Read, Show)
-
-_StandardMethodDeclaration = Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"
-
-_StandardMethodDeclaration_attributes = Core.Name "attributes"
-
-_StandardMethodDeclaration_modifiers = Core.Name "modifiers"
-
-_StandardMethodDeclaration_returnType = Core.Name "returnType"
-
-_StandardMethodDeclaration_header = Core.Name "header"
-
-_StandardMethodDeclaration_body = Core.Name "body"
-
-data RefReturnMethodDeclaration =
-  RefReturnMethodDeclaration {
-    refReturnMethodDeclarationAttributes :: (Maybe Attributes),
-    refReturnMethodDeclarationModifiers :: [RefMethodModifier],
-    refReturnMethodDeclarationKind :: RefKind,
-    refReturnMethodDeclarationReturnType :: ReturnType,
-    refReturnMethodDeclarationHeader :: MethodHeader,
-    refReturnMethodDeclarationBody :: RefMethodBody}
-  deriving (Eq, Ord, Read, Show)
-
-_RefReturnMethodDeclaration = Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"
-
-_RefReturnMethodDeclaration_attributes = Core.Name "attributes"
-
-_RefReturnMethodDeclaration_modifiers = Core.Name "modifiers"
-
-_RefReturnMethodDeclaration_kind = Core.Name "kind"
-
-_RefReturnMethodDeclaration_returnType = Core.Name "returnType"
-
-_RefReturnMethodDeclaration_header = Core.Name "header"
-
-_RefReturnMethodDeclaration_body = Core.Name "body"
-
-data MethodModifiers =
-  MethodModifiers {
-    methodModifiersModifiers :: [MethodModifier],
-    methodModifiersPartial :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodModifiers = Core.Name "hydra.csharp.syntax.MethodModifiers"
-
-_MethodModifiers_modifiers = Core.Name "modifiers"
-
-_MethodModifiers_partial = Core.Name "partial"
-
-data RefKind =
-  RefKindRef  |
-  RefKindRefReadonly
-  deriving (Eq, Ord, Read, Show)
-
-_RefKind = Core.Name "hydra.csharp.syntax.RefKind"
-
-_RefKind_ref = Core.Name "ref"
-
-_RefKind_refReadonly = Core.Name "refReadonly"
-
-data MethodHeader =
-  MethodHeader {
-    methodHeaderName :: MemberName,
-    methodHeaderTypeParameters :: (Maybe TypeParameterList),
-    methodHeaderParameters :: (Maybe FormalParameterList),
-    methodHeaderConstraints :: [TypeParameterConstraintsClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodHeader = Core.Name "hydra.csharp.syntax.MethodHeader"
-
-_MethodHeader_name = Core.Name "name"
-
-_MethodHeader_typeParameters = Core.Name "typeParameters"
-
-_MethodHeader_parameters = Core.Name "parameters"
-
-_MethodHeader_constraints = Core.Name "constraints"
-
-data MethodModifier =
-  MethodModifierRef RefMethodModifier |
-  MethodModifierAsync
-  deriving (Eq, Ord, Read, Show)
-
-_MethodModifier = Core.Name "hydra.csharp.syntax.MethodModifier"
-
-_MethodModifier_ref = Core.Name "ref"
-
-_MethodModifier_async = Core.Name "async"
-
-data RefMethodModifier =
-  RefMethodModifierNew  |
-  RefMethodModifierPublic  |
-  RefMethodModifierProtected  |
-  RefMethodModifierInternal  |
-  RefMethodModifierPrivate  |
-  RefMethodModifierStatic  |
-  RefMethodModifierVirtual  |
-  RefMethodModifierSealed  |
-  RefMethodModifierOverride  |
-  RefMethodModifierAbstract  |
-  RefMethodModifierExtern  |
-  RefMethodModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_RefMethodModifier = Core.Name "hydra.csharp.syntax.RefMethodModifier"
-
-_RefMethodModifier_new = Core.Name "new"
-
-_RefMethodModifier_public = Core.Name "public"
-
-_RefMethodModifier_protected = Core.Name "protected"
-
-_RefMethodModifier_internal = Core.Name "internal"
-
-_RefMethodModifier_private = Core.Name "private"
-
-_RefMethodModifier_static = Core.Name "static"
-
-_RefMethodModifier_virtual = Core.Name "virtual"
-
-_RefMethodModifier_sealed = Core.Name "sealed"
-
-_RefMethodModifier_override = Core.Name "override"
-
-_RefMethodModifier_abstract = Core.Name "abstract"
-
-_RefMethodModifier_extern = Core.Name "extern"
-
-_RefMethodModifier_unsafe = Core.Name "unsafe"
-
-data ReturnType =
-  ReturnTypeRef Type |
-  ReturnTypeVoid
-  deriving (Eq, Ord, Read, Show)
-
-_ReturnType = Core.Name "hydra.csharp.syntax.ReturnType"
-
-_ReturnType_ref = Core.Name "ref"
-
-_ReturnType_void = Core.Name "void"
-
-data MemberName =
-  MemberName {
-    memberNameInterfaceType :: (Maybe TypeName),
-    memberNameIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_MemberName = Core.Name "hydra.csharp.syntax.MemberName"
-
-_MemberName_interfaceType = Core.Name "interfaceType"
-
-_MemberName_identifier = Core.Name "identifier"
-
-data MethodBody =
-  MethodBodyBlock Block |
-  MethodBodyNullConditionalInvocation NullConditionalInvocationExpression |
-  MethodBodyExpression Expression |
-  MethodBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_MethodBody = Core.Name "hydra.csharp.syntax.MethodBody"
-
-_MethodBody_block = Core.Name "block"
-
-_MethodBody_nullConditionalInvocation = Core.Name "nullConditionalInvocation"
-
-_MethodBody_expression = Core.Name "expression"
-
-_MethodBody_empty = Core.Name "empty"
-
-data RefMethodBody =
-  RefMethodBodyBlock Block |
-  RefMethodBodyRef VariableReference |
-  RefMethodBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_RefMethodBody = Core.Name "hydra.csharp.syntax.RefMethodBody"
-
-_RefMethodBody_block = Core.Name "block"
-
-_RefMethodBody_ref = Core.Name "ref"
-
-_RefMethodBody_empty = Core.Name "empty"
-
-data FormalParameterList =
-  FormalParameterList {
-    formalParameterListFixed :: [FixedParameter],
-    formalParameterListArray :: (Maybe ParameterArray)}
-  deriving (Eq, Ord, Read, Show)
-
-_FormalParameterList = Core.Name "hydra.csharp.syntax.FormalParameterList"
-
-_FormalParameterList_fixed = Core.Name "fixed"
-
-_FormalParameterList_array = Core.Name "array"
-
-data FixedParameter =
-  FixedParameter {
-    fixedParameterAttributes :: (Maybe Attributes),
-    fixedParameterModifier :: (Maybe ParameterModifier),
-    fixedParameterType :: Type,
-    fixedParameterIdentifier :: Identifier,
-    fixedParameterDefaultArgument :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_FixedParameter = Core.Name "hydra.csharp.syntax.FixedParameter"
-
-_FixedParameter_attributes = Core.Name "attributes"
-
-_FixedParameter_modifier = Core.Name "modifier"
-
-_FixedParameter_type = Core.Name "type"
-
-_FixedParameter_identifier = Core.Name "identifier"
-
-_FixedParameter_defaultArgument = Core.Name "defaultArgument"
-
-data ParameterModifier =
-  ParameterModifierMode ParameterModeModifier |
-  ParameterModifierThis
-  deriving (Eq, Ord, Read, Show)
-
-_ParameterModifier = Core.Name "hydra.csharp.syntax.ParameterModifier"
-
-_ParameterModifier_mode = Core.Name "mode"
-
-_ParameterModifier_this = Core.Name "this"
-
-data ParameterModeModifier =
-  ParameterModeModifierRef  |
-  ParameterModeModifierOut  |
-  ParameterModeModifierIn
-  deriving (Eq, Ord, Read, Show)
-
-_ParameterModeModifier = Core.Name "hydra.csharp.syntax.ParameterModeModifier"
-
-_ParameterModeModifier_ref = Core.Name "ref"
-
-_ParameterModeModifier_out = Core.Name "out"
-
-_ParameterModeModifier_in = Core.Name "in"
-
-data ParameterArray =
-  ParameterArray {
-    parameterArrayAttributes :: (Maybe Attributes),
-    parameterArrayType :: ArrayType,
-    parameterArrayIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ParameterArray = Core.Name "hydra.csharp.syntax.ParameterArray"
-
-_ParameterArray_attributes = Core.Name "attributes"
-
-_ParameterArray_type = Core.Name "type"
-
-_ParameterArray_identifier = Core.Name "identifier"
-
-data PropertyDeclaration =
-  PropertyDeclarationStandard StandardPropertyDeclaration |
-  PropertyDeclarationRefReturn RefReturnPropertyDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyDeclaration = Core.Name "hydra.csharp.syntax.PropertyDeclaration"
-
-_PropertyDeclaration_standard = Core.Name "standard"
-
-_PropertyDeclaration_refReturn = Core.Name "refReturn"
-
-data StandardPropertyDeclaration =
-  StandardPropertyDeclaration {
-    standardPropertyDeclarationAttributes :: (Maybe Attributes),
-    standardPropertyDeclarationModifiers :: [PropertyModifier],
-    standardPropertyDeclarationType :: Type,
-    standardPropertyDeclarationName :: MemberName,
-    standardPropertyDeclarationBody :: PropertyBody}
-  deriving (Eq, Ord, Read, Show)
-
-_StandardPropertyDeclaration = Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"
-
-_StandardPropertyDeclaration_attributes = Core.Name "attributes"
-
-_StandardPropertyDeclaration_modifiers = Core.Name "modifiers"
-
-_StandardPropertyDeclaration_type = Core.Name "type"
-
-_StandardPropertyDeclaration_name = Core.Name "name"
-
-_StandardPropertyDeclaration_body = Core.Name "body"
-
-data RefReturnPropertyDeclaration =
-  RefReturnPropertyDeclaration {
-    refReturnPropertyDeclarationAttributes :: (Maybe Attributes),
-    refReturnPropertyDeclarationModifiers :: [PropertyModifier],
-    refReturnPropertyDeclarationRefKind :: RefKind,
-    refReturnPropertyDeclarationType :: Type,
-    refReturnPropertyDeclarationName :: MemberName,
-    refReturnPropertyDeclarationBody :: RefPropertyBody}
-  deriving (Eq, Ord, Read, Show)
-
-_RefReturnPropertyDeclaration = Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"
-
-_RefReturnPropertyDeclaration_attributes = Core.Name "attributes"
-
-_RefReturnPropertyDeclaration_modifiers = Core.Name "modifiers"
-
-_RefReturnPropertyDeclaration_refKind = Core.Name "refKind"
-
-_RefReturnPropertyDeclaration_type = Core.Name "type"
-
-_RefReturnPropertyDeclaration_name = Core.Name "name"
-
-_RefReturnPropertyDeclaration_body = Core.Name "body"
-
-data PropertyModifier =
-  PropertyModifierNew  |
-  PropertyModifierPublic  |
-  PropertyModifierProtected  |
-  PropertyModifierInternal  |
-  PropertyModifierPrivate  |
-  PropertyModifierStatic  |
-  PropertyModifierVirtual  |
-  PropertyModifierSealed  |
-  PropertyModifierOverride  |
-  PropertyModifierAbstract  |
-  PropertyModifierExtern  |
-  PropertyModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyModifier = Core.Name "hydra.csharp.syntax.PropertyModifier"
-
-_PropertyModifier_new = Core.Name "new"
-
-_PropertyModifier_public = Core.Name "public"
-
-_PropertyModifier_protected = Core.Name "protected"
-
-_PropertyModifier_internal = Core.Name "internal"
-
-_PropertyModifier_private = Core.Name "private"
-
-_PropertyModifier_static = Core.Name "static"
-
-_PropertyModifier_virtual = Core.Name "virtual"
-
-_PropertyModifier_sealed = Core.Name "sealed"
-
-_PropertyModifier_override = Core.Name "override"
-
-_PropertyModifier_abstract = Core.Name "abstract"
-
-_PropertyModifier_extern = Core.Name "extern"
-
-_PropertyModifier_unsafe = Core.Name "unsafe"
-
-data PropertyBody =
-  PropertyBodyBlock BlockPropertyBody |
-  PropertyBodyExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyBody = Core.Name "hydra.csharp.syntax.PropertyBody"
-
-_PropertyBody_block = Core.Name "block"
-
-_PropertyBody_expression = Core.Name "expression"
-
-data BlockPropertyBody =
-  BlockPropertyBody {
-    blockPropertyBodyAccessors :: AccessorDeclarations,
-    blockPropertyBodyInitializer :: (Maybe VariableInitializer)}
-  deriving (Eq, Ord, Read, Show)
-
-_BlockPropertyBody = Core.Name "hydra.csharp.syntax.BlockPropertyBody"
-
-_BlockPropertyBody_accessors = Core.Name "accessors"
-
-_BlockPropertyBody_initializer = Core.Name "initializer"
-
-data RefPropertyBody =
-  RefPropertyBodyBlock RefGetAccessorDeclaration |
-  RefPropertyBodyRef VariableReference
-  deriving (Eq, Ord, Read, Show)
-
-_RefPropertyBody = Core.Name "hydra.csharp.syntax.RefPropertyBody"
-
-_RefPropertyBody_block = Core.Name "block"
-
-_RefPropertyBody_ref = Core.Name "ref"
-
-data AccessorDeclarations =
-  AccessorDeclarationsGet (Maybe AccessorDeclaration) |
-  AccessorDeclarationsSet (Maybe AccessorDeclaration)
-  deriving (Eq, Ord, Read, Show)
-
-_AccessorDeclarations = Core.Name "hydra.csharp.syntax.AccessorDeclarations"
-
-_AccessorDeclarations_get = Core.Name "get"
-
-_AccessorDeclarations_set = Core.Name "set"
-
-data AccessorDeclaration =
-  AccessorDeclaration {
-    accessorDeclarationAttributes :: (Maybe Attributes),
-    accessorDeclarationModifier :: (Maybe AccessorModifier),
-    accessorDeclarationBody :: AccessorBody}
-  deriving (Eq, Ord, Read, Show)
-
-_AccessorDeclaration = Core.Name "hydra.csharp.syntax.AccessorDeclaration"
-
-_AccessorDeclaration_attributes = Core.Name "attributes"
-
-_AccessorDeclaration_modifier = Core.Name "modifier"
-
-_AccessorDeclaration_body = Core.Name "body"
-
-data AccessorModifier =
-  AccessorModifierProtected  |
-  AccessorModifierInternal  |
-  AccessorModifierPrivate  |
-  AccessorModifierProtectedInternal  |
-  AccessorModifierInternalProtected  |
-  AccessorModifierProtectedPrivate  |
-  AccessorModifierPrivateProtected
-  deriving (Eq, Ord, Read, Show)
-
-_AccessorModifier = Core.Name "hydra.csharp.syntax.AccessorModifier"
-
-_AccessorModifier_protected = Core.Name "protected"
-
-_AccessorModifier_internal = Core.Name "internal"
-
-_AccessorModifier_private = Core.Name "private"
-
-_AccessorModifier_protectedInternal = Core.Name "protectedInternal"
-
-_AccessorModifier_internalProtected = Core.Name "internalProtected"
-
-_AccessorModifier_protectedPrivate = Core.Name "protectedPrivate"
-
-_AccessorModifier_privateProtected = Core.Name "privateProtected"
-
-data AccessorBody =
-  AccessorBodyBlock Block |
-  AccessorBodyExpression Expression |
-  AccessorBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_AccessorBody = Core.Name "hydra.csharp.syntax.AccessorBody"
-
-_AccessorBody_block = Core.Name "block"
-
-_AccessorBody_expression = Core.Name "expression"
-
-_AccessorBody_empty = Core.Name "empty"
-
-data RefGetAccessorDeclaration =
-  RefGetAccessorDeclaration {
-    refGetAccessorDeclarationAttributes :: (Maybe Attributes),
-    refGetAccessorDeclarationModifier :: (Maybe AccessorModifier),
-    refGetAccessorDeclarationBody :: RefAccessorBody}
-  deriving (Eq, Ord, Read, Show)
-
-_RefGetAccessorDeclaration = Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"
-
-_RefGetAccessorDeclaration_attributes = Core.Name "attributes"
-
-_RefGetAccessorDeclaration_modifier = Core.Name "modifier"
-
-_RefGetAccessorDeclaration_body = Core.Name "body"
-
-data RefAccessorBody =
-  RefAccessorBodyBlock Block |
-  RefAccessorBodyRef VariableReference |
-  RefAccessorBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_RefAccessorBody = Core.Name "hydra.csharp.syntax.RefAccessorBody"
-
-_RefAccessorBody_block = Core.Name "block"
-
-_RefAccessorBody_ref = Core.Name "ref"
-
-_RefAccessorBody_empty = Core.Name "empty"
-
-data EventDeclaration =
-  EventDeclarationStandard StandardEventDeclaration |
-  EventDeclarationAccessors AccessorsEventDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_EventDeclaration = Core.Name "hydra.csharp.syntax.EventDeclaration"
-
-_EventDeclaration_standard = Core.Name "standard"
-
-_EventDeclaration_accessors = Core.Name "accessors"
-
-data StandardEventDeclaration =
-  StandardEventDeclaration {
-    standardEventDeclarationAttributes :: (Maybe Attributes),
-    standardEventDeclarationModifiers :: [EventModifier],
-    standardEventDeclarationType :: Type,
-    standardEventDeclarationDeclarators :: VariableDeclarators}
-  deriving (Eq, Ord, Read, Show)
-
-_StandardEventDeclaration = Core.Name "hydra.csharp.syntax.StandardEventDeclaration"
-
-_StandardEventDeclaration_attributes = Core.Name "attributes"
-
-_StandardEventDeclaration_modifiers = Core.Name "modifiers"
-
-_StandardEventDeclaration_type = Core.Name "type"
-
-_StandardEventDeclaration_declarators = Core.Name "declarators"
-
-data AccessorsEventDeclaration =
-  AccessorsEventDeclaration {
-    accessorsEventDeclarationAttributes :: (Maybe Attributes),
-    accessorsEventDeclarationModifiers :: [EventModifier],
-    accessorsEventDeclarationType :: Type,
-    accessorsEventDeclarationName :: MemberName,
-    accessorsEventDeclarationAccessors :: EventAccessorDeclarations}
-  deriving (Eq, Ord, Read, Show)
-
-_AccessorsEventDeclaration = Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"
-
-_AccessorsEventDeclaration_attributes = Core.Name "attributes"
-
-_AccessorsEventDeclaration_modifiers = Core.Name "modifiers"
-
-_AccessorsEventDeclaration_type = Core.Name "type"
-
-_AccessorsEventDeclaration_name = Core.Name "name"
-
-_AccessorsEventDeclaration_accessors = Core.Name "accessors"
-
-data EventModifier =
-  EventModifierNew  |
-  EventModifierPublic  |
-  EventModifierProtected  |
-  EventModifierInternal  |
-  EventModifierPrivate  |
-  EventModifierStatic  |
-  EventModifierVirtual  |
-  EventModifierSealed  |
-  EventModifierOverride  |
-  EventModifierAbstract  |
-  EventModifierExtern  |
-  EventModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_EventModifier = Core.Name "hydra.csharp.syntax.EventModifier"
-
-_EventModifier_new = Core.Name "new"
-
-_EventModifier_public = Core.Name "public"
-
-_EventModifier_protected = Core.Name "protected"
-
-_EventModifier_internal = Core.Name "internal"
-
-_EventModifier_private = Core.Name "private"
-
-_EventModifier_static = Core.Name "static"
-
-_EventModifier_virtual = Core.Name "virtual"
-
-_EventModifier_sealed = Core.Name "sealed"
-
-_EventModifier_override = Core.Name "override"
-
-_EventModifier_abstract = Core.Name "abstract"
-
-_EventModifier_extern = Core.Name "extern"
-
-_EventModifier_unsafe = Core.Name "unsafe"
-
-data EventAccessorDeclarations =
-  EventAccessorDeclarationsAdd AddRemoveAccessorDeclaration |
-  EventAccessorDeclarationsRemove AddRemoveAccessorDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_EventAccessorDeclarations = Core.Name "hydra.csharp.syntax.EventAccessorDeclarations"
-
-_EventAccessorDeclarations_add = Core.Name "add"
-
-_EventAccessorDeclarations_remove = Core.Name "remove"
-
-data AddRemoveAccessorDeclaration =
-  AddRemoveAccessorDeclaration {
-    addRemoveAccessorDeclarationAttributes :: (Maybe Attributes),
-    addRemoveAccessorDeclarationBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_AddRemoveAccessorDeclaration = Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"
-
-_AddRemoveAccessorDeclaration_attributes = Core.Name "attributes"
-
-_AddRemoveAccessorDeclaration_body = Core.Name "body"
-
-data IndexerDeclaration =
-  IndexerDeclarationStandard StandardIndexerDeclaration |
-  IndexerDeclarationRef RefIndexerDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_IndexerDeclaration = Core.Name "hydra.csharp.syntax.IndexerDeclaration"
-
-_IndexerDeclaration_standard = Core.Name "standard"
-
-_IndexerDeclaration_ref = Core.Name "ref"
-
-data StandardIndexerDeclaration =
-  StandardIndexerDeclaration {
-    standardIndexerDeclarationAttributes :: (Maybe Attributes),
-    standardIndexerDeclarationModifiers :: [IndexerModifier],
-    standardIndexerDeclarationDeclarator :: IndexerDeclarator,
-    standardIndexerDeclarationBody :: IndexerBody}
-  deriving (Eq, Ord, Read, Show)
-
-_StandardIndexerDeclaration = Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"
-
-_StandardIndexerDeclaration_attributes = Core.Name "attributes"
-
-_StandardIndexerDeclaration_modifiers = Core.Name "modifiers"
-
-_StandardIndexerDeclaration_declarator = Core.Name "declarator"
-
-_StandardIndexerDeclaration_body = Core.Name "body"
-
-data RefIndexerDeclaration =
-  RefIndexerDeclaration {
-    refIndexerDeclarationAttributes :: (Maybe Attributes),
-    refIndexerDeclarationModifiers :: [IndexerModifier],
-    refIndexerDeclarationRefKind :: RefKind,
-    refIndexerDeclarationDeclarator :: IndexerDeclarator,
-    refIndexerDeclarationBody :: RefIndexerBody}
-  deriving (Eq, Ord, Read, Show)
-
-_RefIndexerDeclaration = Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"
-
-_RefIndexerDeclaration_attributes = Core.Name "attributes"
-
-_RefIndexerDeclaration_modifiers = Core.Name "modifiers"
-
-_RefIndexerDeclaration_refKind = Core.Name "refKind"
-
-_RefIndexerDeclaration_declarator = Core.Name "declarator"
-
-_RefIndexerDeclaration_body = Core.Name "body"
-
-data IndexerModifier =
-  IndexerModifierNew  |
-  IndexerModifierPublic  |
-  IndexerModifierProtected  |
-  IndexerModifierInternal  |
-  IndexerModifierPrivate  |
-  IndexerModifierVirtual  |
-  IndexerModifierSealed  |
-  IndexerModifierOverride  |
-  IndexerModifierAbstract  |
-  IndexerModifierExtern  |
-  IndexerModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_IndexerModifier = Core.Name "hydra.csharp.syntax.IndexerModifier"
-
-_IndexerModifier_new = Core.Name "new"
-
-_IndexerModifier_public = Core.Name "public"
-
-_IndexerModifier_protected = Core.Name "protected"
-
-_IndexerModifier_internal = Core.Name "internal"
-
-_IndexerModifier_private = Core.Name "private"
-
-_IndexerModifier_virtual = Core.Name "virtual"
-
-_IndexerModifier_sealed = Core.Name "sealed"
-
-_IndexerModifier_override = Core.Name "override"
-
-_IndexerModifier_abstract = Core.Name "abstract"
-
-_IndexerModifier_extern = Core.Name "extern"
-
-_IndexerModifier_unsafe = Core.Name "unsafe"
-
-data IndexerDeclarator =
-  IndexerDeclarator {
-    indexerDeclaratorType :: Type,
-    indexerDeclaratorInterface :: (Maybe InterfaceType),
-    indexerDeclaratorParameters :: FormalParameterList}
-  deriving (Eq, Ord, Read, Show)
-
-_IndexerDeclarator = Core.Name "hydra.csharp.syntax.IndexerDeclarator"
-
-_IndexerDeclarator_type = Core.Name "type"
-
-_IndexerDeclarator_interface = Core.Name "interface"
-
-_IndexerDeclarator_parameters = Core.Name "parameters"
-
-data IndexerBody =
-  IndexerBodyBlock AccessorDeclarations |
-  IndexerBodyExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_IndexerBody = Core.Name "hydra.csharp.syntax.IndexerBody"
-
-_IndexerBody_block = Core.Name "block"
-
-_IndexerBody_expression = Core.Name "expression"
-
-data RefIndexerBody =
-  RefIndexerBodyBlock RefGetAccessorDeclaration |
-  RefIndexerBodyRef VariableReference
-  deriving (Eq, Ord, Read, Show)
-
-_RefIndexerBody = Core.Name "hydra.csharp.syntax.RefIndexerBody"
-
-_RefIndexerBody_block = Core.Name "block"
-
-_RefIndexerBody_ref = Core.Name "ref"
-
-data OperatorDeclaration =
-  OperatorDeclaration {
-    operatorDeclarationAttributes :: (Maybe Attributes),
-    operatorDeclarationModifiers :: [OperatorModifier],
-    operatorDeclarationDeclarator :: OperatorDeclarator,
-    operatorDeclarationBody :: OperatorBody}
-  deriving (Eq, Ord, Read, Show)
-
-_OperatorDeclaration = Core.Name "hydra.csharp.syntax.OperatorDeclaration"
-
-_OperatorDeclaration_attributes = Core.Name "attributes"
-
-_OperatorDeclaration_modifiers = Core.Name "modifiers"
-
-_OperatorDeclaration_declarator = Core.Name "declarator"
-
-_OperatorDeclaration_body = Core.Name "body"
-
-data OperatorModifier =
-  OperatorModifierPublic  |
-  OperatorModifierStatic  |
-  OperatorModifierExtern  |
-  OperatorModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_OperatorModifier = Core.Name "hydra.csharp.syntax.OperatorModifier"
-
-_OperatorModifier_public = Core.Name "public"
-
-_OperatorModifier_static = Core.Name "static"
-
-_OperatorModifier_extern = Core.Name "extern"
-
-_OperatorModifier_unsafe = Core.Name "unsafe"
-
-data OperatorDeclarator =
-  OperatorDeclaratorUnary UnaryOperatorDeclarator |
-  OperatorDeclaratorBinary BinaryOperatorDeclarator |
-  OperatorDeclaratorConversion ConversionOperatorDeclarator
-  deriving (Eq, Ord, Read, Show)
-
-_OperatorDeclarator = Core.Name "hydra.csharp.syntax.OperatorDeclarator"
-
-_OperatorDeclarator_unary = Core.Name "unary"
-
-_OperatorDeclarator_binary = Core.Name "binary"
-
-_OperatorDeclarator_conversion = Core.Name "conversion"
-
-data UnaryOperatorDeclarator =
-  UnaryOperatorDeclarator {
-    unaryOperatorDeclaratorType :: Type,
-    unaryOperatorDeclaratorOperator :: OverloadableUnaryOperator,
-    unaryOperatorDeclaratorParameter :: FixedParameter}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOperatorDeclarator = Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"
-
-_UnaryOperatorDeclarator_type = Core.Name "type"
-
-_UnaryOperatorDeclarator_operator = Core.Name "operator"
-
-_UnaryOperatorDeclarator_parameter = Core.Name "parameter"
-
-data OverloadableUnaryOperator =
-  OverloadableUnaryOperatorPlus  |
-  OverloadableUnaryOperatorMinus  |
-  OverloadableUnaryOperatorNot  |
-  OverloadableUnaryOperatorComplement  |
-  OverloadableUnaryOperatorIncrement  |
-  OverloadableUnaryOperatorDecrement  |
-  OverloadableUnaryOperatorTrue  |
-  OverloadableUnaryOperatorFalse
-  deriving (Eq, Ord, Read, Show)
-
-_OverloadableUnaryOperator = Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"
-
-_OverloadableUnaryOperator_plus = Core.Name "plus"
-
-_OverloadableUnaryOperator_minus = Core.Name "minus"
-
-_OverloadableUnaryOperator_not = Core.Name "not"
-
-_OverloadableUnaryOperator_complement = Core.Name "complement"
-
-_OverloadableUnaryOperator_increment = Core.Name "increment"
-
-_OverloadableUnaryOperator_decrement = Core.Name "decrement"
-
-_OverloadableUnaryOperator_true = Core.Name "true"
-
-_OverloadableUnaryOperator_false = Core.Name "false"
-
-data BinaryOperatorDeclarator =
-  BinaryOperatorDeclarator {
-    binaryOperatorDeclaratorType :: Type,
-    binaryOperatorDeclaratorOperator :: OverloadableBinaryOperator,
-    binaryOperatorDeclaratorLeft :: FixedParameter,
-    binaryOperatorDeclaratorRight :: FixedParameter}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryOperatorDeclarator = Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"
-
-_BinaryOperatorDeclarator_type = Core.Name "type"
-
-_BinaryOperatorDeclarator_operator = Core.Name "operator"
-
-_BinaryOperatorDeclarator_left = Core.Name "left"
-
-_BinaryOperatorDeclarator_right = Core.Name "right"
-
-data OverloadableBinaryOperator =
-  OverloadableBinaryOperatorAdd  |
-  OverloadableBinaryOperatorSubtract  |
-  OverloadableBinaryOperatorMultiply  |
-  OverloadableBinaryOperatorDivide  |
-  OverloadableBinaryOperatorModulus  |
-  OverloadableBinaryOperatorAnd  |
-  OverloadableBinaryOperatorOr  |
-  OverloadableBinaryOperatorXor  |
-  OverloadableBinaryOperatorLeftShift  |
-  OverloadableBinaryOperatorRightShift  |
-  OverloadableBinaryOperatorEqual  |
-  OverloadableBinaryOperatorNotEqual  |
-  OverloadableBinaryOperatorGreaterThan  |
-  OverloadableBinaryOperatorLessThan  |
-  OverloadableBinaryOperatorGreaterThanOrEqual  |
-  OverloadableBinaryOperatorLessThanOrEqual
-  deriving (Eq, Ord, Read, Show)
-
-_OverloadableBinaryOperator = Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"
-
-_OverloadableBinaryOperator_add = Core.Name "add"
-
-_OverloadableBinaryOperator_subtract = Core.Name "subtract"
-
-_OverloadableBinaryOperator_multiply = Core.Name "multiply"
-
-_OverloadableBinaryOperator_divide = Core.Name "divide"
-
-_OverloadableBinaryOperator_modulus = Core.Name "modulus"
-
-_OverloadableBinaryOperator_and = Core.Name "and"
-
-_OverloadableBinaryOperator_or = Core.Name "or"
-
-_OverloadableBinaryOperator_xor = Core.Name "xor"
-
-_OverloadableBinaryOperator_leftShift = Core.Name "leftShift"
-
-_OverloadableBinaryOperator_rightShift = Core.Name "rightShift"
-
-_OverloadableBinaryOperator_equal = Core.Name "equal"
-
-_OverloadableBinaryOperator_notEqual = Core.Name "notEqual"
-
-_OverloadableBinaryOperator_greaterThan = Core.Name "greaterThan"
-
-_OverloadableBinaryOperator_lessThan = Core.Name "lessThan"
-
-_OverloadableBinaryOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
-
-_OverloadableBinaryOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"
-
-data ConversionOperatorDeclarator =
-  ConversionOperatorDeclarator {
-    conversionOperatorDeclaratorKind :: ConversionKind,
-    conversionOperatorDeclaratorType :: Type,
-    conversionOperatorDeclaratorParameter :: FixedParameter}
-  deriving (Eq, Ord, Read, Show)
-
-_ConversionOperatorDeclarator = Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"
-
-_ConversionOperatorDeclarator_kind = Core.Name "kind"
-
-_ConversionOperatorDeclarator_type = Core.Name "type"
-
-_ConversionOperatorDeclarator_parameter = Core.Name "parameter"
-
-data ConversionKind =
-  ConversionKindImplicit  |
-  ConversionKindExplicit
-  deriving (Eq, Ord, Read, Show)
-
-_ConversionKind = Core.Name "hydra.csharp.syntax.ConversionKind"
-
-_ConversionKind_implicit = Core.Name "implicit"
-
-_ConversionKind_explicit = Core.Name "explicit"
-
-data OperatorBody =
-  OperatorBodyBlock Block |
-  OperatorBodyExpression Expression |
-  OperatorBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_OperatorBody = Core.Name "hydra.csharp.syntax.OperatorBody"
-
-_OperatorBody_block = Core.Name "block"
-
-_OperatorBody_expression = Core.Name "expression"
-
-_OperatorBody_empty = Core.Name "empty"
-
-data ConstructorDeclaration =
-  ConstructorDeclaration {
-    constructorDeclarationAttributes :: (Maybe Attributes),
-    constructorDeclarationModifiers :: [ConstructorModifier],
-    constructorDeclarationDeclarator :: ConstructorDeclarator,
-    constructorDeclarationBody :: ConstructorBody}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstructorDeclaration = Core.Name "hydra.csharp.syntax.ConstructorDeclaration"
-
-_ConstructorDeclaration_attributes = Core.Name "attributes"
-
-_ConstructorDeclaration_modifiers = Core.Name "modifiers"
-
-_ConstructorDeclaration_declarator = Core.Name "declarator"
-
-_ConstructorDeclaration_body = Core.Name "body"
-
-data ConstructorModifier =
-  ConstructorModifierPublic  |
-  ConstructorModifierProtected  |
-  ConstructorModifierInternal  |
-  ConstructorModifierPrivate  |
-  ConstructorModifierExtern  |
-  ConstructorModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_ConstructorModifier = Core.Name "hydra.csharp.syntax.ConstructorModifier"
-
-_ConstructorModifier_public = Core.Name "public"
-
-_ConstructorModifier_protected = Core.Name "protected"
-
-_ConstructorModifier_internal = Core.Name "internal"
-
-_ConstructorModifier_private = Core.Name "private"
-
-_ConstructorModifier_extern = Core.Name "extern"
-
-_ConstructorModifier_unsafe = Core.Name "unsafe"
-
-data ConstructorDeclarator =
-  ConstructorDeclarator {
-    constructorDeclaratorName :: Identifier,
-    constructorDeclaratorParameters :: (Maybe FormalParameterList),
-    constructorDeclaratorInitializer :: (Maybe ConstructorInitializer)}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstructorDeclarator = Core.Name "hydra.csharp.syntax.ConstructorDeclarator"
-
-_ConstructorDeclarator_name = Core.Name "name"
-
-_ConstructorDeclarator_parameters = Core.Name "parameters"
-
-_ConstructorDeclarator_initializer = Core.Name "initializer"
-
-data ConstructorInitializer =
-  ConstructorInitializerBase (Maybe ArgumentList) |
-  ConstructorInitializerThis (Maybe ArgumentList)
-  deriving (Eq, Ord, Read, Show)
-
-_ConstructorInitializer = Core.Name "hydra.csharp.syntax.ConstructorInitializer"
-
-_ConstructorInitializer_base = Core.Name "base"
-
-_ConstructorInitializer_this = Core.Name "this"
-
-data ConstructorBody =
-  ConstructorBodyBlock Block |
-  ConstructorBodyExpression Expression |
-  ConstructorBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_ConstructorBody = Core.Name "hydra.csharp.syntax.ConstructorBody"
-
-_ConstructorBody_block = Core.Name "block"
-
-_ConstructorBody_expression = Core.Name "expression"
-
-_ConstructorBody_empty = Core.Name "empty"
-
-data StaticConstructorDeclaration =
-  StaticConstructorDeclaration {
-    staticConstructorDeclarationAttributes :: (Maybe Attributes),
-    staticConstructorDeclarationModifiers :: StaticConstructorModifiers,
-    staticConstructorDeclarationName :: Identifier,
-    staticConstructorDeclarationBody :: StaticConstructorBody}
-  deriving (Eq, Ord, Read, Show)
-
-_StaticConstructorDeclaration = Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"
-
-_StaticConstructorDeclaration_attributes = Core.Name "attributes"
-
-_StaticConstructorDeclaration_modifiers = Core.Name "modifiers"
-
-_StaticConstructorDeclaration_name = Core.Name "name"
-
-_StaticConstructorDeclaration_body = Core.Name "body"
-
-data StaticConstructorModifiers =
-  StaticConstructorModifiers {
-    staticConstructorModifiersExtern :: Bool,
-    staticConstructorModifiersUnsafe :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_StaticConstructorModifiers = Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"
-
-_StaticConstructorModifiers_extern = Core.Name "extern"
-
-_StaticConstructorModifiers_unsafe = Core.Name "unsafe"
-
-data StaticConstructorBody =
-  StaticConstructorBodyBlock Block |
-  StaticConstructorBodyExpression Expression |
-  StaticConstructorBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_StaticConstructorBody = Core.Name "hydra.csharp.syntax.StaticConstructorBody"
-
-_StaticConstructorBody_block = Core.Name "block"
-
-_StaticConstructorBody_expression = Core.Name "expression"
-
-_StaticConstructorBody_empty = Core.Name "empty"
-
-data FinalizerDeclaration =
-  FinalizerDeclaration {
-    finalizerDeclarationAttributes :: (Maybe Attributes),
-    finalizerDeclarationExtern :: Bool,
-    finalizerDeclarationUnsafe :: Bool,
-    finalizerDeclarationName :: Identifier,
-    finalizerDeclarationBody :: FinalizerBody}
-  deriving (Eq, Ord, Read, Show)
-
-_FinalizerDeclaration = Core.Name "hydra.csharp.syntax.FinalizerDeclaration"
-
-_FinalizerDeclaration_attributes = Core.Name "attributes"
-
-_FinalizerDeclaration_extern = Core.Name "extern"
-
-_FinalizerDeclaration_unsafe = Core.Name "unsafe"
-
-_FinalizerDeclaration_name = Core.Name "name"
-
-_FinalizerDeclaration_body = Core.Name "body"
-
-data FinalizerBody =
-  FinalizerBodyBlock Block |
-  FinalizerBodyExpression Expression |
-  FinalizerBodyEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_FinalizerBody = Core.Name "hydra.csharp.syntax.FinalizerBody"
-
-_FinalizerBody_block = Core.Name "block"
-
-_FinalizerBody_expression = Core.Name "expression"
-
-_FinalizerBody_empty = Core.Name "empty"
-
-data StructDeclaration =
-  StructDeclaration {
-    structDeclarationAttributes :: (Maybe Attributes),
-    structDeclarationModifiers :: [StructModifier],
-    structDeclarationRef :: Bool,
-    structDeclarationPartial :: Bool,
-    structDeclarationName :: Identifier,
-    structDeclarationParameters :: (Maybe TypeParameterList),
-    structDeclarationInterfaces :: [InterfaceType],
-    structDeclarationConstraints :: [TypeParameterConstraintsClause],
-    structDeclarationBody :: [StructMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_StructDeclaration = Core.Name "hydra.csharp.syntax.StructDeclaration"
-
-_StructDeclaration_attributes = Core.Name "attributes"
-
-_StructDeclaration_modifiers = Core.Name "modifiers"
-
-_StructDeclaration_ref = Core.Name "ref"
-
-_StructDeclaration_partial = Core.Name "partial"
-
-_StructDeclaration_name = Core.Name "name"
-
-_StructDeclaration_parameters = Core.Name "parameters"
-
-_StructDeclaration_interfaces = Core.Name "interfaces"
-
-_StructDeclaration_constraints = Core.Name "constraints"
-
-_StructDeclaration_body = Core.Name "body"
-
-data StructModifier =
-  StructModifierNew  |
-  StructModifierPublic  |
-  StructModifierProtected  |
-  StructModifierInternal  |
-  StructModifierPrivate  |
-  StructModifierReadonly  |
-  StructModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_StructModifier = Core.Name "hydra.csharp.syntax.StructModifier"
-
-_StructModifier_new = Core.Name "new"
-
-_StructModifier_public = Core.Name "public"
-
-_StructModifier_protected = Core.Name "protected"
-
-_StructModifier_internal = Core.Name "internal"
-
-_StructModifier_private = Core.Name "private"
-
-_StructModifier_readonly = Core.Name "readonly"
-
-_StructModifier_unsafe = Core.Name "unsafe"
-
-data StructMemberDeclaration =
-  StructMemberDeclarationConstant ConstantDeclaration |
-  StructMemberDeclarationField FieldDeclaration |
-  StructMemberDeclarationMethod MethodDeclaration |
-  StructMemberDeclarationProperty PropertyDeclaration |
-  StructMemberDeclarationEvent EventDeclaration |
-  StructMemberDeclarationIndexer IndexerDeclaration |
-  StructMemberDeclarationOperator OperatorDeclaration |
-  StructMemberDeclarationConstructor ConstructorDeclaration |
-  StructMemberDeclarationStaticConstructor StaticConstructorDeclaration |
-  StructMemberDeclarationType TypeDeclaration |
-  StructMemberDeclarationFixedSizeBuffer FixedSizeBufferDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_StructMemberDeclaration = Core.Name "hydra.csharp.syntax.StructMemberDeclaration"
-
-_StructMemberDeclaration_constant = Core.Name "constant"
-
-_StructMemberDeclaration_field = Core.Name "field"
-
-_StructMemberDeclaration_method = Core.Name "method"
-
-_StructMemberDeclaration_property = Core.Name "property"
-
-_StructMemberDeclaration_event = Core.Name "event"
-
-_StructMemberDeclaration_indexer = Core.Name "indexer"
-
-_StructMemberDeclaration_operator = Core.Name "operator"
-
-_StructMemberDeclaration_constructor = Core.Name "constructor"
-
-_StructMemberDeclaration_staticConstructor = Core.Name "staticConstructor"
-
-_StructMemberDeclaration_type = Core.Name "type"
-
-_StructMemberDeclaration_fixedSizeBuffer = Core.Name "fixedSizeBuffer"
-
-newtype ArrayInitializer =
-  ArrayInitializer {
-    unArrayInitializer :: [VariableInitializer]}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayInitializer = Core.Name "hydra.csharp.syntax.ArrayInitializer"
-
-data VariableInitializer =
-  VariableInitializerExpression Expression |
-  VariableInitializerArray ArrayInitializer
-  deriving (Eq, Ord, Read, Show)
-
-_VariableInitializer = Core.Name "hydra.csharp.syntax.VariableInitializer"
-
-_VariableInitializer_expression = Core.Name "expression"
-
-_VariableInitializer_array = Core.Name "array"
-
-data InterfaceDeclaration =
-  InterfaceDeclaration {
-    interfaceDeclarationAttributes :: (Maybe Attributes),
-    interfaceDeclarationModifiers :: [InterfaceModifier],
-    interfaceDeclarationPartial :: Bool,
-    interfaceDeclarationName :: Identifier,
-    interfaceDeclarationParameters :: (Maybe VariantTypeParameters),
-    interfaceDeclarationBase :: [InterfaceType],
-    interfaceDeclarationConstraints :: [TypeParameterConstraintsClause],
-    interfaceDeclarationBody :: [InterfaceMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceDeclaration = Core.Name "hydra.csharp.syntax.InterfaceDeclaration"
-
-_InterfaceDeclaration_attributes = Core.Name "attributes"
-
-_InterfaceDeclaration_modifiers = Core.Name "modifiers"
-
-_InterfaceDeclaration_partial = Core.Name "partial"
-
-_InterfaceDeclaration_name = Core.Name "name"
-
-_InterfaceDeclaration_parameters = Core.Name "parameters"
-
-_InterfaceDeclaration_base = Core.Name "base"
-
-_InterfaceDeclaration_constraints = Core.Name "constraints"
-
-_InterfaceDeclaration_body = Core.Name "body"
-
-data InterfaceModifier =
-  InterfaceModifierNew  |
-  InterfaceModifierPublic  |
-  InterfaceModifierProtected  |
-  InterfaceModifierInternal  |
-  InterfaceModifierPrivate  |
-  InterfaceModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceModifier = Core.Name "hydra.csharp.syntax.InterfaceModifier"
-
-_InterfaceModifier_new = Core.Name "new"
-
-_InterfaceModifier_public = Core.Name "public"
-
-_InterfaceModifier_protected = Core.Name "protected"
-
-_InterfaceModifier_internal = Core.Name "internal"
-
-_InterfaceModifier_private = Core.Name "private"
-
-_InterfaceModifier_unsafe = Core.Name "unsafe"
-
-newtype VariantTypeParameters =
-  VariantTypeParameters {
-    unVariantTypeParameters :: [VariantTypeParameter]}
-  deriving (Eq, Ord, Read, Show)
-
-_VariantTypeParameters = Core.Name "hydra.csharp.syntax.VariantTypeParameters"
-
-data VariantTypeParameter =
-  VariantTypeParameter {
-    variantTypeParameterAttributes :: (Maybe Attributes),
-    variantTypeParameterVariance :: (Maybe VarianceAnnotation),
-    variantTypeParameterParameter :: TypeParameter}
-  deriving (Eq, Ord, Read, Show)
-
-_VariantTypeParameter = Core.Name "hydra.csharp.syntax.VariantTypeParameter"
-
-_VariantTypeParameter_attributes = Core.Name "attributes"
-
-_VariantTypeParameter_variance = Core.Name "variance"
-
-_VariantTypeParameter_parameter = Core.Name "parameter"
-
-data VarianceAnnotation =
-  VarianceAnnotationIn  |
-  VarianceAnnotationOut
-  deriving (Eq, Ord, Read, Show)
-
-_VarianceAnnotation = Core.Name "hydra.csharp.syntax.VarianceAnnotation"
-
-_VarianceAnnotation_in = Core.Name "in"
-
-_VarianceAnnotation_out = Core.Name "out"
-
-data InterfaceMemberDeclaration =
-  InterfaceMemberDeclarationMethod InterfaceMethodDeclaration |
-  InterfaceMemberDeclarationProperty InterfacePropertyDeclaration |
-  InterfaceMemberDeclarationEvent InterfaceEventDeclaration |
-  InterfaceMemberDeclarationIndexer InterfaceIndexerDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceMemberDeclaration = Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"
-
-_InterfaceMemberDeclaration_method = Core.Name "method"
-
-_InterfaceMemberDeclaration_property = Core.Name "property"
-
-_InterfaceMemberDeclaration_event = Core.Name "event"
-
-_InterfaceMemberDeclaration_indexer = Core.Name "indexer"
-
-data InterfaceMethodDeclaration =
-  InterfaceMethodDeclaration {
-    interfaceMethodDeclarationAttributes :: (Maybe Attributes),
-    interfaceMethodDeclarationNew :: Bool,
-    interfaceMethodDeclarationReturnType :: ReturnType,
-    interfaceMethodDeclarationRefKind :: (Maybe RefKind),
-    interfaceMethodDeclarationHeader :: InterfaceMethodHeader}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceMethodDeclaration = Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"
-
-_InterfaceMethodDeclaration_attributes = Core.Name "attributes"
-
-_InterfaceMethodDeclaration_new = Core.Name "new"
-
-_InterfaceMethodDeclaration_returnType = Core.Name "returnType"
-
-_InterfaceMethodDeclaration_refKind = Core.Name "refKind"
-
-_InterfaceMethodDeclaration_header = Core.Name "header"
-
-data InterfaceMethodHeader =
-  InterfaceMethodHeader {
-    interfaceMethodHeaderName :: Identifier,
-    interfaceMethodHeaderParameters :: (Maybe FormalParameterList),
-    interfaceMethodHeaderTypeParameters :: (Maybe TypeParameterList),
-    interfaceMethodHeaderConstraints :: [TypeParameterConstraintsClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceMethodHeader = Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"
-
-_InterfaceMethodHeader_name = Core.Name "name"
-
-_InterfaceMethodHeader_parameters = Core.Name "parameters"
-
-_InterfaceMethodHeader_typeParameters = Core.Name "typeParameters"
-
-_InterfaceMethodHeader_constraints = Core.Name "constraints"
-
-data InterfacePropertyDeclaration =
-  InterfacePropertyDeclaration {
-    interfacePropertyDeclarationAttributes :: (Maybe Attributes),
-    interfacePropertyDeclarationNew :: Bool,
-    interfacePropertyDeclarationRefKind :: (Maybe RefKind),
-    interfacePropertyDeclarationType :: Type,
-    interfacePropertyDeclarationName :: Identifier,
-    interfacePropertyDeclarationAccessors :: InterfaceAccessors}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfacePropertyDeclaration = Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"
-
-_InterfacePropertyDeclaration_attributes = Core.Name "attributes"
-
-_InterfacePropertyDeclaration_new = Core.Name "new"
-
-_InterfacePropertyDeclaration_refKind = Core.Name "refKind"
-
-_InterfacePropertyDeclaration_type = Core.Name "type"
-
-_InterfacePropertyDeclaration_name = Core.Name "name"
-
-_InterfacePropertyDeclaration_accessors = Core.Name "accessors"
-
-data InterfaceAccessors =
-  InterfaceAccessors {
-    interfaceAccessorsAttributes :: (Maybe Attributes),
-    interfaceAccessorsGet :: (Maybe Attributes),
-    interfaceAccessorsSet :: (Maybe Attributes)}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceAccessors = Core.Name "hydra.csharp.syntax.InterfaceAccessors"
-
-_InterfaceAccessors_attributes = Core.Name "attributes"
-
-_InterfaceAccessors_get = Core.Name "get"
-
-_InterfaceAccessors_set = Core.Name "set"
-
-data InterfaceEventDeclaration =
-  InterfaceEventDeclaration {
-    interfaceEventDeclarationAttributes :: (Maybe Attributes),
-    interfaceEventDeclarationNew :: Bool,
-    interfaceEventDeclarationType :: Type,
-    interfaceEventDeclarationName :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceEventDeclaration = Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"
-
-_InterfaceEventDeclaration_attributes = Core.Name "attributes"
-
-_InterfaceEventDeclaration_new = Core.Name "new"
-
-_InterfaceEventDeclaration_type = Core.Name "type"
-
-_InterfaceEventDeclaration_name = Core.Name "name"
-
-data InterfaceIndexerDeclaration =
-  InterfaceIndexerDeclaration {
-    interfaceIndexerDeclarationAttributes :: (Maybe Attributes),
-    interfaceIndexerDeclarationNew :: Bool,
-    interfaceIndexerDeclarationRefKind :: (Maybe RefKind),
-    interfaceIndexerDeclarationType :: Type,
-    interfaceIndexerDeclarationParameters :: FormalParameterList,
-    interfaceIndexerDeclarationAccessors :: InterfaceAccessors}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceIndexerDeclaration = Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"
-
-_InterfaceIndexerDeclaration_attributes = Core.Name "attributes"
-
-_InterfaceIndexerDeclaration_new = Core.Name "new"
-
-_InterfaceIndexerDeclaration_refKind = Core.Name "refKind"
-
-_InterfaceIndexerDeclaration_type = Core.Name "type"
-
-_InterfaceIndexerDeclaration_parameters = Core.Name "parameters"
-
-_InterfaceIndexerDeclaration_accessors = Core.Name "accessors"
-
-data EnumDeclaration =
-  EnumDeclaration {
-    enumDeclarationAttributes :: (Maybe Attributes),
-    enumDeclarationModifiers :: [EnumModifier],
-    enumDeclarationName :: Identifier,
-    enumDeclarationBase :: (Maybe EnumBase),
-    enumDeclarationBody :: (Maybe EnumBody)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumDeclaration = Core.Name "hydra.csharp.syntax.EnumDeclaration"
-
-_EnumDeclaration_attributes = Core.Name "attributes"
-
-_EnumDeclaration_modifiers = Core.Name "modifiers"
-
-_EnumDeclaration_name = Core.Name "name"
-
-_EnumDeclaration_base = Core.Name "base"
-
-_EnumDeclaration_body = Core.Name "body"
-
-data EnumBase =
-  EnumBaseType IntegralType |
-  EnumBaseName TypeName
-  deriving (Eq, Ord, Read, Show)
-
-_EnumBase = Core.Name "hydra.csharp.syntax.EnumBase"
-
-_EnumBase_type = Core.Name "type"
-
-_EnumBase_name = Core.Name "name"
-
-newtype EnumBody =
-  EnumBody {
-    unEnumBody :: [EnumMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumBody = Core.Name "hydra.csharp.syntax.EnumBody"
-
-data EnumModifier =
-  EnumModifierNew  |
-  EnumModifierPublic  |
-  EnumModifierProtected  |
-  EnumModifierInternal  |
-  EnumModifierPrivate
-  deriving (Eq, Ord, Read, Show)
-
-_EnumModifier = Core.Name "hydra.csharp.syntax.EnumModifier"
-
-_EnumModifier_new = Core.Name "new"
-
-_EnumModifier_public = Core.Name "public"
-
-_EnumModifier_protected = Core.Name "protected"
-
-_EnumModifier_internal = Core.Name "internal"
-
-_EnumModifier_private = Core.Name "private"
-
-data EnumMemberDeclaration =
-  EnumMemberDeclaration {
-    enumMemberDeclarationAttributes :: (Maybe Attributes),
-    enumMemberDeclarationName :: Identifier,
-    enumMemberDeclarationValue :: (Maybe ConstantExpression)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumMemberDeclaration = Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"
-
-_EnumMemberDeclaration_attributes = Core.Name "attributes"
-
-_EnumMemberDeclaration_name = Core.Name "name"
-
-_EnumMemberDeclaration_value = Core.Name "value"
-
-data DelegateDeclaration =
-  DelegateDeclaration {
-    delegateDeclarationAttributes :: (Maybe Attributes),
-    delegateDeclarationModifiers :: [DelegateModifier],
-    delegateDeclarationReturnType :: ReturnType,
-    delegateDeclarationRefKind :: (Maybe RefKind),
-    delegateDeclarationRefReturnType :: (Maybe Type),
-    delegateDeclarationHeader :: DelegateHeader}
-  deriving (Eq, Ord, Read, Show)
-
-_DelegateDeclaration = Core.Name "hydra.csharp.syntax.DelegateDeclaration"
-
-_DelegateDeclaration_attributes = Core.Name "attributes"
-
-_DelegateDeclaration_modifiers = Core.Name "modifiers"
-
-_DelegateDeclaration_returnType = Core.Name "returnType"
-
-_DelegateDeclaration_refKind = Core.Name "refKind"
-
-_DelegateDeclaration_refReturnType = Core.Name "refReturnType"
-
-_DelegateDeclaration_header = Core.Name "header"
-
-data DelegateHeader =
-  DelegateHeader {
-    delegateHeaderName :: Identifier,
-    delegateHeaderTypeParameters :: (Maybe VariantTypeParameters),
-    delegateHeaderParameters :: (Maybe FormalParameterList),
-    delegateHeaderConstraints :: [TypeParameterConstraintsClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_DelegateHeader = Core.Name "hydra.csharp.syntax.DelegateHeader"
-
-_DelegateHeader_name = Core.Name "name"
-
-_DelegateHeader_typeParameters = Core.Name "typeParameters"
-
-_DelegateHeader_parameters = Core.Name "parameters"
-
-_DelegateHeader_constraints = Core.Name "constraints"
-
-data DelegateModifier =
-  DelegateModifierNew  |
-  DelegateModifierPublic  |
-  DelegateModifierProtected  |
-  DelegateModifierInternal  |
-  DelegateModifierPrivate  |
-  DelegateModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_DelegateModifier = Core.Name "hydra.csharp.syntax.DelegateModifier"
-
-_DelegateModifier_new = Core.Name "new"
-
-_DelegateModifier_public = Core.Name "public"
-
-_DelegateModifier_protected = Core.Name "protected"
-
-_DelegateModifier_internal = Core.Name "internal"
-
-_DelegateModifier_private = Core.Name "private"
-
-_DelegateModifier_unsafe = Core.Name "unsafe"
-
-data GlobalAttributeSection =
-  GlobalAttributeSection {
-    globalAttributeSectionTarget :: Identifier,
-    globalAttributeSectionAttributes :: AttributeList}
-  deriving (Eq, Ord, Read, Show)
-
-_GlobalAttributeSection = Core.Name "hydra.csharp.syntax.GlobalAttributeSection"
-
-_GlobalAttributeSection_target = Core.Name "target"
-
-_GlobalAttributeSection_attributes = Core.Name "attributes"
-
-newtype Attributes =
-  Attributes {
-    unAttributes :: [AttributeSection]}
-  deriving (Eq, Ord, Read, Show)
-
-_Attributes = Core.Name "hydra.csharp.syntax.Attributes"
-
-data AttributeSection =
-  AttributeSection {
-    attributeSectionTarget :: (Maybe AttributeTarget),
-    attributeSectionAttributes :: AttributeList}
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeSection = Core.Name "hydra.csharp.syntax.AttributeSection"
-
-_AttributeSection_target = Core.Name "target"
-
-_AttributeSection_attributes = Core.Name "attributes"
-
-data AttributeTarget =
-  AttributeTargetIdentifier Identifier |
-  AttributeTargetKeyword Keyword
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeTarget = Core.Name "hydra.csharp.syntax.AttributeTarget"
-
-_AttributeTarget_identifier = Core.Name "identifier"
-
-_AttributeTarget_keyword = Core.Name "keyword"
-
-newtype AttributeList =
-  AttributeList {
-    unAttributeList :: [Attribute]}
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeList = Core.Name "hydra.csharp.syntax.AttributeList"
-
-data Attribute =
-  Attribute {
-    attributeName :: AttributeName,
-    attributeArguments :: (Maybe AttributeArguments)}
-  deriving (Eq, Ord, Read, Show)
-
-_Attribute = Core.Name "hydra.csharp.syntax.Attribute"
-
-_Attribute_name = Core.Name "name"
-
-_Attribute_arguments = Core.Name "arguments"
-
-newtype AttributeName =
-  AttributeName {
-    unAttributeName :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeName = Core.Name "hydra.csharp.syntax.AttributeName"
-
-data AttributeArguments =
-  AttributeArguments {
-    attributeArgumentsPositonal :: (Maybe PositionalArgumentList),
-    attributeArgumentsNamed :: (Maybe NamedArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeArguments = Core.Name "hydra.csharp.syntax.AttributeArguments"
-
-_AttributeArguments_positonal = Core.Name "positonal"
-
-_AttributeArguments_named = Core.Name "named"
-
-newtype PositionalArgumentList =
-  PositionalArgumentList {
-    unPositionalArgumentList :: [PositionalArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_PositionalArgumentList = Core.Name "hydra.csharp.syntax.PositionalArgumentList"
-
-data PositionalArgument =
-  PositionalArgument {
-    positionalArgumentName :: (Maybe Identifier),
-    positionalArgumentValue :: AttributeArgumentExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_PositionalArgument = Core.Name "hydra.csharp.syntax.PositionalArgument"
-
-_PositionalArgument_name = Core.Name "name"
-
-_PositionalArgument_value = Core.Name "value"
-
-newtype NamedArgumentList =
-  NamedArgumentList {
-    unNamedArgumentList :: [NamedArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedArgumentList = Core.Name "hydra.csharp.syntax.NamedArgumentList"
-
-data NamedArgument =
-  NamedArgument {
-    namedArgumentName :: Identifier,
-    namedArgumentValue :: AttributeArgumentExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedArgument = Core.Name "hydra.csharp.syntax.NamedArgument"
-
-_NamedArgument_name = Core.Name "name"
-
-_NamedArgument_value = Core.Name "value"
-
-newtype AttributeArgumentExpression =
-  AttributeArgumentExpression {
-    unAttributeArgumentExpression :: NonAssignmentExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeArgumentExpression = Core.Name "hydra.csharp.syntax.AttributeArgumentExpression"
-
-data PointerType =
-  PointerTypeValueType (Maybe ValueType) |
-  PointerTypePointerDepth Int
-  deriving (Eq, Ord, Read, Show)
-
-_PointerType = Core.Name "hydra.csharp.syntax.PointerType"
-
-_PointerType_valueType = Core.Name "valueType"
-
-_PointerType_pointerDepth = Core.Name "pointerDepth"
-
-data PointerMemberAccess =
-  PointerMemberAccess {
-    pointerMemberAccessPointer :: PrimaryExpression,
-    pointerMemberAccessMember :: Identifier,
-    pointerMemberAccessTypeArguments :: (Maybe TypeArgumentList)}
-  deriving (Eq, Ord, Read, Show)
-
-_PointerMemberAccess = Core.Name "hydra.csharp.syntax.PointerMemberAccess"
-
-_PointerMemberAccess_pointer = Core.Name "pointer"
-
-_PointerMemberAccess_member = Core.Name "member"
-
-_PointerMemberAccess_typeArguments = Core.Name "typeArguments"
-
-data PointerElementAccess =
-  PointerElementAccess {
-    pointerElementAccessPointer :: PrimaryNoArrayCreationExpression,
-    pointerElementAccessIndex :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_PointerElementAccess = Core.Name "hydra.csharp.syntax.PointerElementAccess"
-
-_PointerElementAccess_pointer = Core.Name "pointer"
-
-_PointerElementAccess_index = Core.Name "index"
-
-data FixedStatement =
-  FixedStatement {
-    fixedStatementPointerType :: PointerType,
-    fixedStatementDeclarators :: [FixedPointerDeclarator],
-    fixedStatementStatement :: EmbeddedStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_FixedStatement = Core.Name "hydra.csharp.syntax.FixedStatement"
-
-_FixedStatement_pointerType = Core.Name "pointerType"
-
-_FixedStatement_declarators = Core.Name "declarators"
-
-_FixedStatement_statement = Core.Name "statement"
-
-data FixedPointerDeclarator =
-  FixedPointerDeclaratorReference VariableReference |
-  FixedPointerDeclaratorExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_FixedPointerDeclarator = Core.Name "hydra.csharp.syntax.FixedPointerDeclarator"
-
-_FixedPointerDeclarator_reference = Core.Name "reference"
-
-_FixedPointerDeclarator_expression = Core.Name "expression"
-
-data FixedSizeBufferDeclaration =
-  FixedSizeBufferDeclaration {
-    fixedSizeBufferDeclarationAttributes :: (Maybe Attributes),
-    fixedSizeBufferDeclarationModifiers :: [FixedSizeBufferModifier],
-    fixedSizeBufferDeclarationElementType :: Type,
-    fixedSizeBufferDeclarationDeclarators :: [FixedSizeBufferDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_FixedSizeBufferDeclaration = Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"
-
-_FixedSizeBufferDeclaration_attributes = Core.Name "attributes"
-
-_FixedSizeBufferDeclaration_modifiers = Core.Name "modifiers"
-
-_FixedSizeBufferDeclaration_elementType = Core.Name "elementType"
-
-_FixedSizeBufferDeclaration_declarators = Core.Name "declarators"
-
-data FixedSizeBufferModifier =
-  FixedSizeBufferModifierNew  |
-  FixedSizeBufferModifierPublic  |
-  FixedSizeBufferModifierInternal  |
-  FixedSizeBufferModifierPrivate  |
-  FixedSizeBufferModifierUnsafe
-  deriving (Eq, Ord, Read, Show)
-
-_FixedSizeBufferModifier = Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"
-
-_FixedSizeBufferModifier_new = Core.Name "new"
-
-_FixedSizeBufferModifier_public = Core.Name "public"
-
-_FixedSizeBufferModifier_internal = Core.Name "internal"
-
-_FixedSizeBufferModifier_private = Core.Name "private"
-
-_FixedSizeBufferModifier_unsafe = Core.Name "unsafe"
-
-data FixedSizeBufferDeclarator =
-  FixedSizeBufferDeclarator {
-    fixedSizeBufferDeclaratorName :: Identifier,
-    fixedSizeBufferDeclaratorSize :: ConstantExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_FixedSizeBufferDeclarator = Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"
-
-_FixedSizeBufferDeclarator_name = Core.Name "name"
-
-_FixedSizeBufferDeclarator_size = Core.Name "size"
diff --git a/src/main/haskell/Hydra/Cypher/Features.hs b/src/main/haskell/Hydra/Cypher/Features.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cypher/Features.hs
+++ /dev/null
@@ -1,1360 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Cypher/OpenCypher.hs
+++ /dev/null
@@ -1,1306 +0,0 @@
--- 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/Datalog/Syntax.hs b/src/main/haskell/Hydra/Datalog/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Datalog/Syntax.hs
+++ /dev/null
@@ -1,164 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A basic Datalog model
-
-module Hydra.Datalog.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
-
-newtype Constant =
-  Constant {
-    unConstant :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Constant = Core.Name "hydra.datalog.syntax.Constant"
-
-newtype Relation =
-  Relation {
-    unRelation :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Relation = Core.Name "hydra.datalog.syntax.Relation"
-
-newtype Variable =
-  Variable {
-    unVariable :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Variable = Core.Name "hydra.datalog.syntax.Variable"
-
-newtype Program =
-  Program {
-    unProgram :: [Program_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_Program = Core.Name "hydra.datalog.syntax.Program"
-
-data Program_Elmt =
-  Program_ElmtFact Fact |
-  Program_ElmtRule Rule
-  deriving (Eq, Ord, Read, Show)
-
-_Program_Elmt = Core.Name "hydra.datalog.syntax.Program_Elmt"
-
-_Program_Elmt_Fact = Core.Name "Fact"
-
-_Program_Elmt_Rule = Core.Name "Rule"
-
-data Fact =
-  Fact {
-    factRelation :: Relation,
-    factConstantList :: ConstantList}
-  deriving (Eq, Ord, Read, Show)
-
-_Fact = Core.Name "hydra.datalog.syntax.Fact"
-
-_Fact_Relation = Core.Name "Relation"
-
-_Fact_ConstantList = Core.Name "ConstantList"
-
-data Rule =
-  Rule {
-    ruleAtom :: Atom,
-    ruleAtomList :: AtomList}
-  deriving (Eq, Ord, Read, Show)
-
-_Rule = Core.Name "hydra.datalog.syntax.Rule"
-
-_Rule_Atom = Core.Name "Atom"
-
-_Rule_AtomList = Core.Name "AtomList"
-
-data Atom =
-  Atom {
-    atomRelation :: Relation,
-    atomTermList :: TermList}
-  deriving (Eq, Ord, Read, Show)
-
-_Atom = Core.Name "hydra.datalog.syntax.Atom"
-
-_Atom_Relation = Core.Name "Relation"
-
-_Atom_TermList = Core.Name "TermList"
-
-data AtomList =
-  AtomListSingle Atom |
-  AtomListMultiple AtomList_Multiple
-  deriving (Eq, Ord, Read, Show)
-
-_AtomList = Core.Name "hydra.datalog.syntax.AtomList"
-
-_AtomList_single = Core.Name "single"
-
-_AtomList_multiple = Core.Name "multiple"
-
-data AtomList_Multiple =
-  AtomList_Multiple {
-    atomList_MultipleAtom :: Atom,
-    atomList_MultipleAtomList :: AtomList}
-  deriving (Eq, Ord, Read, Show)
-
-_AtomList_Multiple = Core.Name "hydra.datalog.syntax.AtomList_Multiple"
-
-_AtomList_Multiple_Atom = Core.Name "Atom"
-
-_AtomList_Multiple_AtomList = Core.Name "AtomList"
-
-data Term =
-  TermConstant Constant |
-  TermVariable Variable
-  deriving (Eq, Ord, Read, Show)
-
-_Term = Core.Name "hydra.datalog.syntax.Term"
-
-_Term_Constant = Core.Name "Constant"
-
-_Term_Variable = Core.Name "Variable"
-
-data TermList =
-  TermListSingle Term |
-  TermListMultiple TermList_Multiple
-  deriving (Eq, Ord, Read, Show)
-
-_TermList = Core.Name "hydra.datalog.syntax.TermList"
-
-_TermList_single = Core.Name "single"
-
-_TermList_multiple = Core.Name "multiple"
-
-data TermList_Multiple =
-  TermList_Multiple {
-    termList_MultipleTerm :: Term,
-    termList_MultipleTermList :: TermList}
-  deriving (Eq, Ord, Read, Show)
-
-_TermList_Multiple = Core.Name "hydra.datalog.syntax.TermList_Multiple"
-
-_TermList_Multiple_Term = Core.Name "Term"
-
-_TermList_Multiple_TermList = Core.Name "TermList"
-
-data ConstantList =
-  ConstantListSingle Constant |
-  ConstantListMultiple ConstantList_Multiple
-  deriving (Eq, Ord, Read, Show)
-
-_ConstantList = Core.Name "hydra.datalog.syntax.ConstantList"
-
-_ConstantList_single = Core.Name "single"
-
-_ConstantList_multiple = Core.Name "multiple"
-
-data ConstantList_Multiple =
-  ConstantList_Multiple {
-    constantList_MultipleConstant :: Constant,
-    constantList_MultipleConstantList :: ConstantList}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstantList_Multiple = Core.Name "hydra.datalog.syntax.ConstantList_Multiple"
-
-_ConstantList_Multiple_Constant = Core.Name "Constant"
-
-_ConstantList_Multiple_ConstantList = Core.Name "ConstantList"
diff --git a/src/main/haskell/Hydra/Decode/Ast.hs b/src/main/haskell/Hydra/Decode/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Ast.hs
+++ /dev/null
@@ -1,208 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.ast
-
-module Hydra.Decode.Ast where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-associativity :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Associativity
-associativity 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 "none", (\input -> Eithers.map (\t -> Ast.AssociativityNone) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "left", (\input -> Eithers.map (\t -> Ast.AssociativityLeft) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "right", (\input -> Eithers.map (\t -> Ast.AssociativityRight) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "both", (\input -> Eithers.map (\t -> Ast.AssociativityBoth) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-blockStyle :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.BlockStyle
-blockStyle cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "indent" (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_indent -> Eithers.bind (ExtractCore.requireField "newlineBeforeContent" (\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_newlineBeforeContent -> Eithers.bind (ExtractCore.requireField "newlineAfterContent" (\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_newlineAfterContent -> Right (Ast.BlockStyle {
-          Ast.blockStyleIndent = field_indent,
-          Ast.blockStyleNewlineBeforeContent = field_newlineBeforeContent,
-          Ast.blockStyleNewlineAfterContent = field_newlineAfterContent})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-bracketExpr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.BracketExpr
-bracketExpr cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "brackets" brackets fieldMap cx) (\field_brackets -> Eithers.bind (ExtractCore.requireField "enclosed" expr fieldMap cx) (\field_enclosed -> Eithers.bind (ExtractCore.requireField "style" blockStyle fieldMap cx) (\field_style -> Right (Ast.BracketExpr {
-          Ast.bracketExprBrackets = field_brackets,
-          Ast.bracketExprEnclosed = field_enclosed,
-          Ast.bracketExprStyle = field_style})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-brackets :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Brackets
-brackets cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "open" symbol fieldMap cx) (\field_open -> Eithers.bind (ExtractCore.requireField "close" symbol fieldMap cx) (\field_close -> Right (Ast.Brackets {
-          Ast.bracketsOpen = field_open,
-          Ast.bracketsClose = field_close}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-expr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Expr
-expr 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 "const", (\input -> Eithers.map (\t -> Ast.ExprConst t) (symbol cx input))),
-                      (Core.Name "indent", (\input -> Eithers.map (\t -> Ast.ExprIndent t) (indentedExpression cx input))),
-                      (Core.Name "op", (\input -> Eithers.map (\t -> Ast.ExprOp t) (opExpr cx input))),
-                      (Core.Name "brackets", (\input -> Eithers.map (\t -> Ast.ExprBrackets t) (bracketExpr cx input))),
-                      (Core.Name "seq", (\input -> Eithers.map (\t -> Ast.ExprSeq t) (seqExpr cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-indentStyle :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.IndentStyle
-indentStyle 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 "allLines", (\input -> Eithers.map (\t -> Ast.IndentStyleAllLines 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 "subsequentLines", (\input -> Eithers.map (\t -> Ast.IndentStyleSubsequentLines 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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-indentedExpression :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.IndentedExpression
-indentedExpression cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "style" indentStyle fieldMap cx) (\field_style -> Eithers.bind (ExtractCore.requireField "expr" expr fieldMap cx) (\field_expr -> Right (Ast.IndentedExpression {
-          Ast.indentedExpressionStyle = field_style,
-          Ast.indentedExpressionExpr = field_expr}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-op :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Op
-op cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "symbol" symbol fieldMap cx) (\field_symbol -> Eithers.bind (ExtractCore.requireField "padding" padding fieldMap cx) (\field_padding -> Eithers.bind (ExtractCore.requireField "precedence" precedence fieldMap cx) (\field_precedence -> Eithers.bind (ExtractCore.requireField "associativity" associativity fieldMap cx) (\field_associativity -> Right (Ast.Op {
-          Ast.opSymbol = field_symbol,
-          Ast.opPadding = field_padding,
-          Ast.opPrecedence = field_precedence,
-          Ast.opAssociativity = field_associativity}))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-opExpr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.OpExpr
-opExpr cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "op" op fieldMap cx) (\field_op -> Eithers.bind (ExtractCore.requireField "lhs" expr fieldMap cx) (\field_lhs -> Eithers.bind (ExtractCore.requireField "rhs" expr fieldMap cx) (\field_rhs -> Right (Ast.OpExpr {
-          Ast.opExprOp = field_op,
-          Ast.opExprLhs = field_lhs,
-          Ast.opExprRhs = field_rhs})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-padding :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Padding
-padding cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "left" ws fieldMap cx) (\field_left -> Eithers.bind (ExtractCore.requireField "right" ws fieldMap cx) (\field_right -> Right (Ast.Padding {
-          Ast.paddingLeft = field_left,
-          Ast.paddingRight = field_right}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-precedence :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Precedence
-precedence cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Ast.Precedence 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)
-seqExpr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.SeqExpr
-seqExpr cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "op" op fieldMap cx) (\field_op -> Eithers.bind (ExtractCore.requireField "elements" (ExtractCore.decodeList expr) fieldMap cx) (\field_elements -> Right (Ast.SeqExpr {
-          Ast.seqExprOp = field_op,
-          Ast.seqExprElements = field_elements}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-symbol :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Symbol
-symbol cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Ast.Symbol 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)
-ws :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Ws
-ws 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 "none", (\input -> Eithers.map (\t -> Ast.WsNone) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "space", (\input -> Eithers.map (\t -> Ast.WsSpace) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "break", (\input -> Eithers.map (\t -> Ast.WsBreak) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "breakAndIndent", (\input -> Eithers.map (\t -> Ast.WsBreakAndIndent 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 "doubleBreak", (\input -> Eithers.map (\t -> Ast.WsDoubleBreak) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Classes.hs b/src/main/haskell/Hydra/Decode/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Classes.hs
+++ /dev/null
@@ -1,31 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.classes
-
-module Hydra.Decode.Classes where
-import qualified Hydra.Classes as Classes
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-typeClass :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Classes.TypeClass
-typeClass 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 "equality", (\input -> Eithers.map (\t -> Classes.TypeClassEquality) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "ordering", (\input -> Eithers.map (\t -> Classes.TypeClassOrdering) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Coders.hs b/src/main/haskell/Hydra/Decode/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Coders.hs
+++ /dev/null
@@ -1,56 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.coders
-
-module Hydra.Decode.Coders where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-coderDirection :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Coders.CoderDirection
-coderDirection 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 "encode", (\input -> Eithers.map (\t -> Coders.CoderDirectionEncode) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "decode", (\input -> Eithers.map (\t -> Coders.CoderDirectionDecode) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-languageName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Coders.LanguageName
-languageName cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Coders.LanguageName 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)
-traversalOrder :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Coders.TraversalOrder
-traversalOrder 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 "pre", (\input -> Eithers.map (\t -> Coders.TraversalOrderPre) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "post", (\input -> Eithers.map (\t -> Coders.TraversalOrderPost) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Context.hs b/src/main/haskell/Hydra/Decode/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Context.hs
+++ /dev/null
@@ -1,40 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.context
-
-module Hydra.Decode.Context where
-import qualified Hydra.Context as Context
-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.Lib.Eithers as Eithers
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-context :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Context.Context
-context cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "trace" (ExtractCore.decodeList (\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_trace -> Eithers.bind (ExtractCore.requireField "messages" (ExtractCore.decodeList (\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_messages -> Eithers.bind (ExtractCore.requireField "other" (ExtractCore.decodeMap DecodeCore.name DecodeCore.term) fieldMap cx) (\field_other -> Right (Context.Context {
-          Context.contextTrace = field_trace,
-          Context.contextMessages = field_messages,
-          Context.contextOther = field_other})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-inContext :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Context.InContext t0)
-inContext e cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "object" e fieldMap cx) (\field_object -> Eithers.bind (ExtractCore.requireField "context" context fieldMap cx) (\field_context -> Right (Context.InContext {
-          Context.inContextObject = field_object,
-          Context.inContextContext = field_context}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Core.hs b/src/main/haskell/Hydra/Decode/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Core.hs
+++ /dev/null
@@ -1,507 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.core
-
-module Hydra.Decode.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-annotatedTerm :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.AnnotatedTerm
-annotatedTerm cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "body" term fieldMap cx) (\field_body -> Eithers.bind (ExtractCore.requireField "annotation" (ExtractCore.decodeMap name term) fieldMap cx) (\field_annotation -> Right (Core.AnnotatedTerm {
-          Core.annotatedTermBody = field_body,
-          Core.annotatedTermAnnotation = field_annotation}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-annotatedType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.AnnotatedType
-annotatedType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "body" type_ fieldMap cx) (\field_body -> Eithers.bind (ExtractCore.requireField "annotation" (ExtractCore.decodeMap name term) fieldMap cx) (\field_annotation -> Right (Core.AnnotatedType {
-          Core.annotatedTypeBody = field_body,
-          Core.annotatedTypeAnnotation = field_annotation}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-application :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Application
-application cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "function" term fieldMap cx) (\field_function -> Eithers.bind (ExtractCore.requireField "argument" term fieldMap cx) (\field_argument -> Right (Core.Application {
-          Core.applicationFunction = field_function,
-          Core.applicationArgument = field_argument}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-applicationType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.ApplicationType
-applicationType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "function" type_ fieldMap cx) (\field_function -> Eithers.bind (ExtractCore.requireField "argument" type_ fieldMap cx) (\field_argument -> Right (Core.ApplicationType {
-          Core.applicationTypeFunction = field_function,
-          Core.applicationTypeArgument = field_argument}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-binding :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Binding
-binding 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" name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "term" term fieldMap cx) (\field_term -> Eithers.bind (ExtractCore.requireField "typeScheme" (ExtractCore.decodeMaybe typeScheme) fieldMap cx) (\field_typeScheme -> Right (Core.Binding {
-          Core.bindingName = field_name,
-          Core.bindingTerm = field_term,
-          Core.bindingTypeScheme = field_typeScheme})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-caseStatement :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.CaseStatement
-caseStatement cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (ExtractCore.requireField "default" (ExtractCore.decodeMaybe term) fieldMap cx) (\field_default -> Eithers.bind (ExtractCore.requireField "cases" (ExtractCore.decodeList field) fieldMap cx) (\field_cases -> Right (Core.CaseStatement {
-          Core.caseStatementTypeName = field_typeName,
-          Core.caseStatementDefault = field_default,
-          Core.caseStatementCases = field_cases})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-eitherType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.EitherType
-eitherType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "left" type_ fieldMap cx) (\field_left -> Eithers.bind (ExtractCore.requireField "right" type_ fieldMap cx) (\field_right -> Right (Core.EitherType {
-          Core.eitherTypeLeft = field_left,
-          Core.eitherTypeRight = field_right}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-field :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Field
-field 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" name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "term" term fieldMap cx) (\field_term -> Right (Core.Field {
-          Core.fieldName = field_name,
-          Core.fieldTerm = field_term}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-fieldType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FieldType
-fieldType 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" name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "type" type_ fieldMap cx) (\field_type -> Right (Core.FieldType {
-          Core.fieldTypeName = field_name,
-          Core.fieldTypeType = field_type}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-floatType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FloatType
-floatType 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 "bigfloat", (\input -> Eithers.map (\t -> Core.FloatTypeBigfloat) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "float32", (\input -> Eithers.map (\t -> Core.FloatTypeFloat32) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "float64", (\input -> Eithers.map (\t -> Core.FloatTypeFloat64) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-floatValue :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FloatValue
-floatValue 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 "bigfloat", (\input -> Eithers.map (\t -> Core.FloatValueBigfloat t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralFloat v2 -> case v2 of
-                            Core.FloatValueBigfloat v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected bigfloat value")
-                          _ -> Left (Errors.DecodingError "expected bigfloat literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "float32", (\input -> Eithers.map (\t -> Core.FloatValueFloat32 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralFloat v2 -> case v2 of
-                            Core.FloatValueFloat32 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected float32 value")
-                          _ -> Left (Errors.DecodingError "expected float32 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "float64", (\input -> Eithers.map (\t -> Core.FloatValueFloat64 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))))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-forallType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.ForallType
-forallType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (ExtractCore.requireField "body" type_ fieldMap cx) (\field_body -> Right (Core.ForallType {
-          Core.forallTypeParameter = field_parameter,
-          Core.forallTypeBody = field_body}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-functionType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FunctionType
-functionType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "domain" type_ fieldMap cx) (\field_domain -> Eithers.bind (ExtractCore.requireField "codomain" type_ fieldMap cx) (\field_codomain -> Right (Core.FunctionType {
-          Core.functionTypeDomain = field_domain,
-          Core.functionTypeCodomain = field_codomain}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-injection :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Injection
-injection cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (ExtractCore.requireField "field" field fieldMap cx) (\field_field -> Right (Core.Injection {
-          Core.injectionTypeName = field_typeName,
-          Core.injectionField = field_field}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-integerType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.IntegerType
-integerType 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 "bigint", (\input -> Eithers.map (\t -> Core.IntegerTypeBigint) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "int8", (\input -> Eithers.map (\t -> Core.IntegerTypeInt8) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "int16", (\input -> Eithers.map (\t -> Core.IntegerTypeInt16) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "int32", (\input -> Eithers.map (\t -> Core.IntegerTypeInt32) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "int64", (\input -> Eithers.map (\t -> Core.IntegerTypeInt64) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "uint8", (\input -> Eithers.map (\t -> Core.IntegerTypeUint8) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "uint16", (\input -> Eithers.map (\t -> Core.IntegerTypeUint16) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "uint32", (\input -> Eithers.map (\t -> Core.IntegerTypeUint32) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "uint64", (\input -> Eithers.map (\t -> Core.IntegerTypeUint64) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-integerValue :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.IntegerValue
-integerValue 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 "bigint", (\input -> Eithers.map (\t -> Core.IntegerValueBigint t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueBigint v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected bigint value")
-                          _ -> Left (Errors.DecodingError "expected bigint literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "int8", (\input -> Eithers.map (\t -> Core.IntegerValueInt8 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueInt8 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected int8 value")
-                          _ -> Left (Errors.DecodingError "expected int8 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "int16", (\input -> Eithers.map (\t -> Core.IntegerValueInt16 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueInt16 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected int16 value")
-                          _ -> Left (Errors.DecodingError "expected int16 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "int32", (\input -> Eithers.map (\t -> Core.IntegerValueInt32 t) (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 input)))),
-                      (Core.Name "int64", (\input -> Eithers.map (\t -> Core.IntegerValueInt64 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 "uint8", (\input -> Eithers.map (\t -> Core.IntegerValueUint8 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueUint8 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected uint8 value")
-                          _ -> Left (Errors.DecodingError "expected uint8 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "uint16", (\input -> Eithers.map (\t -> Core.IntegerValueUint16 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueUint16 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected uint16 value")
-                          _ -> Left (Errors.DecodingError "expected uint16 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "uint32", (\input -> Eithers.map (\t -> Core.IntegerValueUint32 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueUint32 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected uint32 value")
-                          _ -> Left (Errors.DecodingError "expected uint32 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "uint64", (\input -> Eithers.map (\t -> Core.IntegerValueUint64 t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralInteger v2 -> case v2 of
-                            Core.IntegerValueUint64 v3 -> Right v3
-                            _ -> Left (Errors.DecodingError "expected uint64 value")
-                          _ -> Left (Errors.DecodingError "expected uint64 literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input))))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-lambda :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Lambda
-lambda cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (ExtractCore.requireField "domain" (ExtractCore.decodeMaybe type_) fieldMap cx) (\field_domain -> Eithers.bind (ExtractCore.requireField "body" term fieldMap cx) (\field_body -> Right (Core.Lambda {
-          Core.lambdaParameter = field_parameter,
-          Core.lambdaDomain = field_domain,
-          Core.lambdaBody = field_body})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-let_ :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Let
-let_ cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "bindings" (ExtractCore.decodeList binding) fieldMap cx) (\field_bindings -> Eithers.bind (ExtractCore.requireField "body" term fieldMap cx) (\field_body -> Right (Core.Let {
-          Core.letBindings = field_bindings,
-          Core.letBody = field_body}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-literal :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Literal
-literal 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 "binary", (\input -> Eithers.map (\t -> Core.LiteralBinary 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 "boolean", (\input -> Eithers.map (\t -> Core.LiteralBoolean 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 "decimal", (\input -> Eithers.map (\t -> Core.LiteralDecimal t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralDecimal v2 -> Right v2
-                          _ -> Left (Errors.DecodingError "expected decimal literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "float", (\input -> Eithers.map (\t -> Core.LiteralFloat t) (floatValue cx input))),
-                      (Core.Name "integer", (\input -> Eithers.map (\t -> Core.LiteralInteger t) (integerValue cx input))),
-                      (Core.Name "string", (\input -> Eithers.map (\t -> Core.LiteralString 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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-literalType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.LiteralType
-literalType 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 "binary", (\input -> Eithers.map (\t -> Core.LiteralTypeBinary) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Core.LiteralTypeBoolean) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "decimal", (\input -> Eithers.map (\t -> Core.LiteralTypeDecimal) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "float", (\input -> Eithers.map (\t -> Core.LiteralTypeFloat t) (floatType cx input))),
-                      (Core.Name "integer", (\input -> Eithers.map (\t -> Core.LiteralTypeInteger t) (integerType cx input))),
-                      (Core.Name "string", (\input -> Eithers.map (\t -> Core.LiteralTypeString) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-mapType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.MapType
-mapType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "keys" type_ fieldMap cx) (\field_keys -> Eithers.bind (ExtractCore.requireField "values" type_ fieldMap cx) (\field_values -> Right (Core.MapType {
-          Core.mapTypeKeys = field_keys,
-          Core.mapTypeValues = field_values}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-name :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Name
-name cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Core.Name 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)
-pairType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.PairType
-pairType cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "first" type_ fieldMap cx) (\field_first -> Eithers.bind (ExtractCore.requireField "second" type_ fieldMap cx) (\field_second -> Right (Core.PairType {
-          Core.pairTypeFirst = field_first,
-          Core.pairTypeSecond = field_second}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-projection :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Projection
-projection cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (ExtractCore.requireField "field" name fieldMap cx) (\field_field -> Right (Core.Projection {
-          Core.projectionTypeName = field_typeName,
-          Core.projectionField = field_field}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-record :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Record
-record cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (ExtractCore.requireField "fields" (ExtractCore.decodeList field) fieldMap cx) (\field_fields -> Right (Core.Record {
-          Core.recordTypeName = field_typeName,
-          Core.recordFields = field_fields}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-term :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Term
-term 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 "annotated", (\input -> Eithers.map (\t -> Core.TermAnnotated t) (annotatedTerm cx input))),
-                      (Core.Name "application", (\input -> Eithers.map (\t -> Core.TermApplication t) (application cx input))),
-                      (Core.Name "cases", (\input -> Eithers.map (\t -> Core.TermCases t) (caseStatement cx input))),
-                      (Core.Name "either", (\input -> Eithers.map (\t -> Core.TermEither t) (ExtractCore.decodeEither term term cx input))),
-                      (Core.Name "inject", (\input -> Eithers.map (\t -> Core.TermInject t) (injection cx input))),
-                      (Core.Name "lambda", (\input -> Eithers.map (\t -> Core.TermLambda t) (lambda cx input))),
-                      (Core.Name "let", (\input -> Eithers.map (\t -> Core.TermLet t) (let_ cx input))),
-                      (Core.Name "list", (\input -> Eithers.map (\t -> Core.TermList t) (ExtractCore.decodeList term cx input))),
-                      (Core.Name "literal", (\input -> Eithers.map (\t -> Core.TermLiteral t) (literal cx input))),
-                      (Core.Name "map", (\input -> Eithers.map (\t -> Core.TermMap t) (ExtractCore.decodeMap term term cx input))),
-                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Core.TermMaybe t) (ExtractCore.decodeMaybe term cx input))),
-                      (Core.Name "pair", (\input -> Eithers.map (\t -> Core.TermPair t) (ExtractCore.decodePair term term cx input))),
-                      (Core.Name "project", (\input -> Eithers.map (\t -> Core.TermProject t) (projection cx input))),
-                      (Core.Name "record", (\input -> Eithers.map (\t -> Core.TermRecord t) (record cx input))),
-                      (Core.Name "set", (\input -> Eithers.map (\t -> Core.TermSet t) (ExtractCore.decodeSet term cx input))),
-                      (Core.Name "typeApplication", (\input -> Eithers.map (\t -> Core.TermTypeApplication t) (typeApplicationTerm cx input))),
-                      (Core.Name "typeLambda", (\input -> Eithers.map (\t -> Core.TermTypeLambda t) (typeLambda cx input))),
-                      (Core.Name "unit", (\input -> Eithers.map (\t -> Core.TermUnit) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unwrap", (\input -> Eithers.map (\t -> Core.TermUnwrap t) (name cx input))),
-                      (Core.Name "variable", (\input -> Eithers.map (\t -> Core.TermVariable t) (name cx input))),
-                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.TermWrap t) (wrappedTerm cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-type_ :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Type
-type_ 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 "annotated", (\input -> Eithers.map (\t -> Core.TypeAnnotated t) (annotatedType cx input))),
-                      (Core.Name "application", (\input -> Eithers.map (\t -> Core.TypeApplication t) (applicationType cx input))),
-                      (Core.Name "either", (\input -> Eithers.map (\t -> Core.TypeEither t) (eitherType cx input))),
-                      (Core.Name "forall", (\input -> Eithers.map (\t -> Core.TypeForall t) (forallType cx input))),
-                      (Core.Name "function", (\input -> Eithers.map (\t -> Core.TypeFunction t) (functionType cx input))),
-                      (Core.Name "list", (\input -> Eithers.map (\t -> Core.TypeList t) (type_ cx input))),
-                      (Core.Name "literal", (\input -> Eithers.map (\t -> Core.TypeLiteral t) (literalType cx input))),
-                      (Core.Name "map", (\input -> Eithers.map (\t -> Core.TypeMap t) (mapType cx input))),
-                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Core.TypeMaybe t) (type_ cx input))),
-                      (Core.Name "pair", (\input -> Eithers.map (\t -> Core.TypePair t) (pairType cx input))),
-                      (Core.Name "record", (\input -> Eithers.map (\t -> Core.TypeRecord t) (ExtractCore.decodeList fieldType cx input))),
-                      (Core.Name "set", (\input -> Eithers.map (\t -> Core.TypeSet t) (type_ cx input))),
-                      (Core.Name "union", (\input -> Eithers.map (\t -> Core.TypeUnion t) (ExtractCore.decodeList fieldType cx input))),
-                      (Core.Name "unit", (\input -> Eithers.map (\t -> Core.TypeUnit) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "variable", (\input -> Eithers.map (\t -> Core.TypeVariable t) (name cx input))),
-                      (Core.Name "void", (\input -> Eithers.map (\t -> Core.TypeVoid) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.TypeWrap t) (type_ cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-typeApplicationTerm :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeApplicationTerm
-typeApplicationTerm cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "body" term fieldMap cx) (\field_body -> Eithers.bind (ExtractCore.requireField "type" type_ fieldMap cx) (\field_type -> Right (Core.TypeApplicationTerm {
-          Core.typeApplicationTermBody = field_body,
-          Core.typeApplicationTermType = field_type}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeLambda :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeLambda
-typeLambda cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (ExtractCore.requireField "body" term fieldMap cx) (\field_body -> Right (Core.TypeLambda {
-          Core.typeLambdaParameter = field_parameter,
-          Core.typeLambdaBody = field_body}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeScheme :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeScheme
-typeScheme cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "variables" (ExtractCore.decodeList name) fieldMap cx) (\field_variables -> Eithers.bind (ExtractCore.requireField "body" type_ fieldMap cx) (\field_body -> Eithers.bind (ExtractCore.requireField "constraints" (ExtractCore.decodeMaybe (ExtractCore.decodeMap name typeVariableMetadata)) fieldMap cx) (\field_constraints -> Right (Core.TypeScheme {
-          Core.typeSchemeVariables = field_variables,
-          Core.typeSchemeBody = field_body,
-          Core.typeSchemeConstraints = field_constraints})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeVariableMetadata :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeVariableMetadata
-typeVariableMetadata cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "classes" (ExtractCore.decodeSet name) fieldMap cx) (\field_classes -> Right (Core.TypeVariableMetadata {
-          Core.typeVariableMetadataClasses = field_classes})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-wrappedTerm :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.WrappedTerm
-wrappedTerm cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (ExtractCore.requireField "body" term fieldMap cx) (\field_body -> Right (Core.WrappedTerm {
-          Core.wrappedTermTypeName = field_typeName,
-          Core.wrappedTermBody = field_body}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Error/Checking.hs b/src/main/haskell/Hydra/Decode/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Error/Checking.hs
+++ /dev/null
@@ -1,180 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.error.checking
-
-module Hydra.Decode.Error.Checking where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Decode.Paths as Paths
-import qualified Hydra.Decode.Typing as Typing
-import qualified Hydra.Decode.Variants as Variants
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-checkingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.CheckingError
-checkingError 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 "incorrectUnification", (\input -> Eithers.map (\t -> Checking.CheckingErrorIncorrectUnification t) (incorrectUnificationError cx input))),
-                      (Core.Name "notAForallType", (\input -> Eithers.map (\t -> Checking.CheckingErrorNotAForallType t) (notAForallTypeError cx input))),
-                      (Core.Name "notAFunctionType", (\input -> Eithers.map (\t -> Checking.CheckingErrorNotAFunctionType t) (notAFunctionTypeError cx input))),
-                      (Core.Name "other", (\input -> Eithers.map (\t -> Checking.CheckingErrorOther t) (otherCheckingError cx input))),
-                      (Core.Name "typeArityMismatch", (\input -> Eithers.map (\t -> Checking.CheckingErrorTypeArityMismatch t) (typeArityMismatchError cx input))),
-                      (Core.Name "typeMismatch", (\input -> Eithers.map (\t -> Checking.CheckingErrorTypeMismatch t) (typeMismatchError cx input))),
-                      (Core.Name "unboundTypeVariables", (\input -> Eithers.map (\t -> Checking.CheckingErrorUnboundTypeVariables t) (unboundTypeVariablesError cx input))),
-                      (Core.Name "undefinedTermVariable", (\input -> Eithers.map (\t -> Checking.CheckingErrorUndefinedTermVariable t) (undefinedTermVariableCheckingError cx input))),
-                      (Core.Name "unequalTypes", (\input -> Eithers.map (\t -> Checking.CheckingErrorUnequalTypes t) (unequalTypesError cx input))),
-                      (Core.Name "unsupportedTermVariant", (\input -> Eithers.map (\t -> Checking.CheckingErrorUnsupportedTermVariant t) (unsupportedTermVariantError cx input))),
-                      (Core.Name "untypedLambda", (\input -> Eithers.map (\t -> Checking.CheckingErrorUntypedLambda t) (untypedLambdaError cx input))),
-                      (Core.Name "untypedLetBinding", (\input -> Eithers.map (\t -> Checking.CheckingErrorUntypedLetBinding t) (untypedLetBindingError cx input))),
-                      (Core.Name "untypedTermVariable", (\input -> Eithers.map (\t -> Checking.CheckingErrorUntypedTermVariable t) (untypedTermVariableCheckingError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-incorrectUnificationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.IncorrectUnificationError
-incorrectUnificationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "substitution" Typing.typeSubst fieldMap cx) (\field_substitution -> Right (Checking.IncorrectUnificationError {
-          Checking.incorrectUnificationErrorSubstitution = field_substitution})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-notAForallTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.NotAForallTypeError
-notAForallTypeError 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" DecodeCore.type_ fieldMap cx) (\field_type -> Eithers.bind (ExtractCore.requireField "typeArguments" (ExtractCore.decodeList DecodeCore.type_) fieldMap cx) (\field_typeArguments -> Right (Checking.NotAForallTypeError {
-          Checking.notAForallTypeErrorType = field_type,
-          Checking.notAForallTypeErrorTypeArguments = field_typeArguments}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-notAFunctionTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.NotAFunctionTypeError
-notAFunctionTypeError 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" DecodeCore.type_ fieldMap cx) (\field_type -> Right (Checking.NotAFunctionTypeError {
-          Checking.notAFunctionTypeErrorType = field_type})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-otherCheckingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.OtherCheckingError
-otherCheckingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "path" Paths.subtermPath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "message" (\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_message -> Right (Checking.OtherCheckingError {
-          Checking.otherCheckingErrorPath = field_path,
-          Checking.otherCheckingErrorMessage = field_message}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeArityMismatchError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.TypeArityMismatchError
-typeArityMismatchError 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" DecodeCore.type_ fieldMap cx) (\field_type -> Eithers.bind (ExtractCore.requireField "expectedArity" (\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_expectedArity -> Eithers.bind (ExtractCore.requireField "actualArity" (\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_actualArity -> Eithers.bind (ExtractCore.requireField "typeArguments" (ExtractCore.decodeList DecodeCore.type_) fieldMap cx) (\field_typeArguments -> Right (Checking.TypeArityMismatchError {
-          Checking.typeArityMismatchErrorType = field_type,
-          Checking.typeArityMismatchErrorExpectedArity = field_expectedArity,
-          Checking.typeArityMismatchErrorActualArity = field_actualArity,
-          Checking.typeArityMismatchErrorTypeArguments = field_typeArguments}))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeMismatchError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.TypeMismatchError
-typeMismatchError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "expectedType" DecodeCore.type_ fieldMap cx) (\field_expectedType -> Eithers.bind (ExtractCore.requireField "actualType" DecodeCore.type_ fieldMap cx) (\field_actualType -> Right (Checking.TypeMismatchError {
-          Checking.typeMismatchErrorExpectedType = field_expectedType,
-          Checking.typeMismatchErrorActualType = field_actualType}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unboundTypeVariablesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UnboundTypeVariablesError
-unboundTypeVariablesError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "variables" (ExtractCore.decodeSet DecodeCore.name) fieldMap cx) (\field_variables -> Eithers.bind (ExtractCore.requireField "type" DecodeCore.type_ fieldMap cx) (\field_type -> Right (Checking.UnboundTypeVariablesError {
-          Checking.unboundTypeVariablesErrorVariables = field_variables,
-          Checking.unboundTypeVariablesErrorType = field_type}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedTermVariableCheckingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UndefinedTermVariableCheckingError
-undefinedTermVariableCheckingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "path" Paths.subtermPath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (Checking.UndefinedTermVariableCheckingError {
-          Checking.undefinedTermVariableCheckingErrorPath = field_path,
-          Checking.undefinedTermVariableCheckingErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unequalTypesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UnequalTypesError
-unequalTypesError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "types" (ExtractCore.decodeList DecodeCore.type_) fieldMap cx) (\field_types -> Eithers.bind (ExtractCore.requireField "description" (\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_description -> Right (Checking.UnequalTypesError {
-          Checking.unequalTypesErrorTypes = field_types,
-          Checking.unequalTypesErrorDescription = field_description}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unsupportedTermVariantError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UnsupportedTermVariantError
-unsupportedTermVariantError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "termVariant" Variants.termVariant fieldMap cx) (\field_termVariant -> Right (Checking.UnsupportedTermVariantError {
-          Checking.unsupportedTermVariantErrorTermVariant = field_termVariant})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-untypedLambdaError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UntypedLambdaError
-untypedLambdaError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Right (Checking.UntypedLambdaError {
-        }))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-untypedLetBindingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UntypedLetBindingError
-untypedLetBindingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "binding" DecodeCore.binding fieldMap cx) (\field_binding -> Right (Checking.UntypedLetBindingError {
-          Checking.untypedLetBindingErrorBinding = field_binding})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-untypedTermVariableCheckingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UntypedTermVariableCheckingError
-untypedTermVariableCheckingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "path" Paths.subtermPath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (Checking.UntypedTermVariableCheckingError {
-          Checking.untypedTermVariableCheckingErrorPath = field_path,
-          Checking.untypedTermVariableCheckingErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Error/Core.hs b/src/main/haskell/Hydra/Decode/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Error/Core.hs
+++ /dev/null
@@ -1,427 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.error.core
-
-module Hydra.Decode.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Decode.Paths as Paths
-import qualified Hydra.Decode.Variants as Variants
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-constantConditionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.ConstantConditionError
-constantConditionError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "value" (\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_value -> Right (ErrorCore.ConstantConditionError {
-          ErrorCore.constantConditionErrorLocation = field_location,
-          ErrorCore.constantConditionErrorValue = field_value}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-duplicateBindingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.DuplicateBindingError
-duplicateBindingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.DuplicateBindingError {
-          ErrorCore.duplicateBindingErrorLocation = field_location,
-          ErrorCore.duplicateBindingErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-duplicateFieldError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.DuplicateFieldError
-duplicateFieldError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.DuplicateFieldError {
-          ErrorCore.duplicateFieldErrorLocation = field_location,
-          ErrorCore.duplicateFieldErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-duplicateRecordTypeFieldNamesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.DuplicateRecordTypeFieldNamesError
-duplicateRecordTypeFieldNamesError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.DuplicateRecordTypeFieldNamesError {
-          ErrorCore.duplicateRecordTypeFieldNamesErrorLocation = field_location,
-          ErrorCore.duplicateRecordTypeFieldNamesErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-duplicateUnionTypeFieldNamesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.DuplicateUnionTypeFieldNamesError
-duplicateUnionTypeFieldNamesError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.DuplicateUnionTypeFieldNamesError {
-          ErrorCore.duplicateUnionTypeFieldNamesErrorLocation = field_location,
-          ErrorCore.duplicateUnionTypeFieldNamesErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyCaseStatementError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyCaseStatementError
-emptyCaseStatementError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "typeName" DecodeCore.name fieldMap cx) (\field_typeName -> Right (ErrorCore.EmptyCaseStatementError {
-          ErrorCore.emptyCaseStatementErrorLocation = field_location,
-          ErrorCore.emptyCaseStatementErrorTypeName = field_typeName}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyLetBindingsError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyLetBindingsError
-emptyLetBindingsError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.EmptyLetBindingsError {
-          ErrorCore.emptyLetBindingsErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyRecordTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyRecordTypeError
-emptyRecordTypeError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.EmptyRecordTypeError {
-          ErrorCore.emptyRecordTypeErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyTermAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyTermAnnotationError
-emptyTermAnnotationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.EmptyTermAnnotationError {
-          ErrorCore.emptyTermAnnotationErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyTypeAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyTypeAnnotationError
-emptyTypeAnnotationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.EmptyTypeAnnotationError {
-          ErrorCore.emptyTypeAnnotationErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyTypeNameInTermError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyTypeNameInTermError
-emptyTypeNameInTermError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.EmptyTypeNameInTermError {
-          ErrorCore.emptyTypeNameInTermErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-emptyUnionTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.EmptyUnionTypeError
-emptyUnionTypeError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.EmptyUnionTypeError {
-          ErrorCore.emptyUnionTypeErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-invalidForallParameterNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidForallParameterNameError
-invalidForallParameterNameError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.InvalidForallParameterNameError {
-          ErrorCore.invalidForallParameterNameErrorLocation = field_location,
-          ErrorCore.invalidForallParameterNameErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-invalidLambdaParameterNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidLambdaParameterNameError
-invalidLambdaParameterNameError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.InvalidLambdaParameterNameError {
-          ErrorCore.invalidLambdaParameterNameErrorLocation = field_location,
-          ErrorCore.invalidLambdaParameterNameErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-invalidLetBindingNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidLetBindingNameError
-invalidLetBindingNameError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.InvalidLetBindingNameError {
-          ErrorCore.invalidLetBindingNameErrorLocation = field_location,
-          ErrorCore.invalidLetBindingNameErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-invalidTermError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidTermError
-invalidTermError 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 "constantCondition", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorConstantCondition t) (constantConditionError cx input))),
-                      (Core.Name "duplicateBinding", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorDuplicateBinding t) (duplicateBindingError cx input))),
-                      (Core.Name "duplicateField", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorDuplicateField t) (duplicateFieldError cx input))),
-                      (Core.Name "emptyCaseStatement", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorEmptyCaseStatement t) (emptyCaseStatementError cx input))),
-                      (Core.Name "emptyLetBindings", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorEmptyLetBindings t) (emptyLetBindingsError cx input))),
-                      (Core.Name "emptyTermAnnotation", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorEmptyTermAnnotation t) (emptyTermAnnotationError cx input))),
-                      (Core.Name "emptyTypeNameInTerm", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorEmptyTypeNameInTerm t) (emptyTypeNameInTermError cx input))),
-                      (Core.Name "invalidLambdaParameterName", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorInvalidLambdaParameterName t) (invalidLambdaParameterNameError cx input))),
-                      (Core.Name "invalidLetBindingName", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorInvalidLetBindingName t) (invalidLetBindingNameError cx input))),
-                      (Core.Name "invalidTypeLambdaParameterName", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorInvalidTypeLambdaParameterName t) (invalidTypeLambdaParameterNameError cx input))),
-                      (Core.Name "nestedTermAnnotation", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorNestedTermAnnotation t) (nestedTermAnnotationError cx input))),
-                      (Core.Name "redundantWrapUnwrap", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorRedundantWrapUnwrap t) (redundantWrapUnwrapError cx input))),
-                      (Core.Name "selfApplication", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorSelfApplication t) (selfApplicationError cx input))),
-                      (Core.Name "termVariableShadowing", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorTermVariableShadowing t) (termVariableShadowingError cx input))),
-                      (Core.Name "typeVariableShadowingInTypeLambda", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorTypeVariableShadowingInTypeLambda t) (typeVariableShadowingInTypeLambdaError cx input))),
-                      (Core.Name "undefinedTermVariable", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUndefinedTermVariable t) (undefinedTermVariableError cx input))),
-                      (Core.Name "undefinedTypeVariableInBindingType", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUndefinedTypeVariableInBindingType t) (undefinedTypeVariableInBindingTypeError cx input))),
-                      (Core.Name "undefinedTypeVariableInLambdaDomain", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUndefinedTypeVariableInLambdaDomain t) (undefinedTypeVariableInLambdaDomainError cx input))),
-                      (Core.Name "undefinedTypeVariableInTypeApplication", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUndefinedTypeVariableInTypeApplication t) (undefinedTypeVariableInTypeApplicationError cx input))),
-                      (Core.Name "unknownPrimitiveName", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUnknownPrimitiveName t) (unknownPrimitiveNameError cx input))),
-                      (Core.Name "unnecessaryIdentityApplication", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUnnecessaryIdentityApplication t) (unnecessaryIdentityApplicationError cx input))),
-                      (Core.Name "untypedTermVariable", (\input -> Eithers.map (\t -> ErrorCore.InvalidTermErrorUntypedTermVariable t) (untypedTermVariableError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-invalidTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidTypeError
-invalidTypeError 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 "duplicateRecordTypeFieldNames", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorDuplicateRecordTypeFieldNames t) (duplicateRecordTypeFieldNamesError cx input))),
-                      (Core.Name "duplicateUnionTypeFieldNames", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorDuplicateUnionTypeFieldNames t) (duplicateUnionTypeFieldNamesError cx input))),
-                      (Core.Name "emptyRecordType", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorEmptyRecordType t) (emptyRecordTypeError cx input))),
-                      (Core.Name "emptyTypeAnnotation", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorEmptyTypeAnnotation t) (emptyTypeAnnotationError cx input))),
-                      (Core.Name "emptyUnionType", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorEmptyUnionType t) (emptyUnionTypeError cx input))),
-                      (Core.Name "invalidForallParameterName", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorInvalidForallParameterName t) (invalidForallParameterNameError cx input))),
-                      (Core.Name "invalidTypeSchemeVariableName", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorInvalidTypeSchemeVariableName t) (invalidTypeSchemeVariableNameError cx input))),
-                      (Core.Name "nestedTypeAnnotation", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorNestedTypeAnnotation t) (nestedTypeAnnotationError cx input))),
-                      (Core.Name "nonComparableMapKeyType", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorNonComparableMapKeyType t) (nonComparableMapKeyTypeError cx input))),
-                      (Core.Name "nonComparableSetElementType", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorNonComparableSetElementType t) (nonComparableSetElementTypeError cx input))),
-                      (Core.Name "singleVariantUnion", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorSingleVariantUnion t) (singleVariantUnionError cx input))),
-                      (Core.Name "typeVariableShadowingInForall", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorTypeVariableShadowingInForall t) (typeVariableShadowingInForallError cx input))),
-                      (Core.Name "undefinedTypeVariable", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorUndefinedTypeVariable t) (undefinedTypeVariableError cx input))),
-                      (Core.Name "voidInNonBottomPosition", (\input -> Eithers.map (\t -> ErrorCore.InvalidTypeErrorVoidInNonBottomPosition t) (voidInNonBottomPositionError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-invalidTypeLambdaParameterNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidTypeLambdaParameterNameError
-invalidTypeLambdaParameterNameError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.InvalidTypeLambdaParameterNameError {
-          ErrorCore.invalidTypeLambdaParameterNameErrorLocation = field_location,
-          ErrorCore.invalidTypeLambdaParameterNameErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-invalidTypeSchemeVariableNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.InvalidTypeSchemeVariableNameError
-invalidTypeSchemeVariableNameError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.InvalidTypeSchemeVariableNameError {
-          ErrorCore.invalidTypeSchemeVariableNameErrorLocation = field_location,
-          ErrorCore.invalidTypeSchemeVariableNameErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-nestedTermAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.NestedTermAnnotationError
-nestedTermAnnotationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.NestedTermAnnotationError {
-          ErrorCore.nestedTermAnnotationErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-nestedTypeAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.NestedTypeAnnotationError
-nestedTypeAnnotationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.NestedTypeAnnotationError {
-          ErrorCore.nestedTypeAnnotationErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-nonComparableMapKeyTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.NonComparableMapKeyTypeError
-nonComparableMapKeyTypeError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "keyType" DecodeCore.type_ fieldMap cx) (\field_keyType -> Right (ErrorCore.NonComparableMapKeyTypeError {
-          ErrorCore.nonComparableMapKeyTypeErrorLocation = field_location,
-          ErrorCore.nonComparableMapKeyTypeErrorKeyType = field_keyType}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-nonComparableSetElementTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.NonComparableSetElementTypeError
-nonComparableSetElementTypeError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "elementType" DecodeCore.type_ fieldMap cx) (\field_elementType -> Right (ErrorCore.NonComparableSetElementTypeError {
-          ErrorCore.nonComparableSetElementTypeErrorLocation = field_location,
-          ErrorCore.nonComparableSetElementTypeErrorElementType = field_elementType}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-redundantWrapUnwrapError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.RedundantWrapUnwrapError
-redundantWrapUnwrapError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "typeName" DecodeCore.name fieldMap cx) (\field_typeName -> Right (ErrorCore.RedundantWrapUnwrapError {
-          ErrorCore.redundantWrapUnwrapErrorLocation = field_location,
-          ErrorCore.redundantWrapUnwrapErrorTypeName = field_typeName}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-selfApplicationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.SelfApplicationError
-selfApplicationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.SelfApplicationError {
-          ErrorCore.selfApplicationErrorLocation = field_location,
-          ErrorCore.selfApplicationErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-singleVariantUnionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.SingleVariantUnionError
-singleVariantUnionError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "fieldName" DecodeCore.name fieldMap cx) (\field_fieldName -> Right (ErrorCore.SingleVariantUnionError {
-          ErrorCore.singleVariantUnionErrorLocation = field_location,
-          ErrorCore.singleVariantUnionErrorFieldName = field_fieldName}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-termVariableShadowingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.TermVariableShadowingError
-termVariableShadowingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.TermVariableShadowingError {
-          ErrorCore.termVariableShadowingErrorLocation = field_location,
-          ErrorCore.termVariableShadowingErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeVariableShadowingInForallError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.TypeVariableShadowingInForallError
-typeVariableShadowingInForallError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.TypeVariableShadowingInForallError {
-          ErrorCore.typeVariableShadowingInForallErrorLocation = field_location,
-          ErrorCore.typeVariableShadowingInForallErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeVariableShadowingInTypeLambdaError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.TypeVariableShadowingInTypeLambdaError
-typeVariableShadowingInTypeLambdaError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.TypeVariableShadowingInTypeLambdaError {
-          ErrorCore.typeVariableShadowingInTypeLambdaErrorLocation = field_location,
-          ErrorCore.typeVariableShadowingInTypeLambdaErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedFieldError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UndefinedFieldError
-undefinedFieldError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "fieldName" DecodeCore.name fieldMap cx) (\field_fieldName -> Eithers.bind (ExtractCore.requireField "typeName" DecodeCore.name fieldMap cx) (\field_typeName -> Right (ErrorCore.UndefinedFieldError {
-          ErrorCore.undefinedFieldErrorFieldName = field_fieldName,
-          ErrorCore.undefinedFieldErrorTypeName = field_typeName}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedTermVariableError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UndefinedTermVariableError
-undefinedTermVariableError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UndefinedTermVariableError {
-          ErrorCore.undefinedTermVariableErrorLocation = field_location,
-          ErrorCore.undefinedTermVariableErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedTypeVariableError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UndefinedTypeVariableError
-undefinedTypeVariableError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UndefinedTypeVariableError {
-          ErrorCore.undefinedTypeVariableErrorLocation = field_location,
-          ErrorCore.undefinedTypeVariableErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedTypeVariableInBindingTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UndefinedTypeVariableInBindingTypeError
-undefinedTypeVariableInBindingTypeError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UndefinedTypeVariableInBindingTypeError {
-          ErrorCore.undefinedTypeVariableInBindingTypeErrorLocation = field_location,
-          ErrorCore.undefinedTypeVariableInBindingTypeErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedTypeVariableInLambdaDomainError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UndefinedTypeVariableInLambdaDomainError
-undefinedTypeVariableInLambdaDomainError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UndefinedTypeVariableInLambdaDomainError {
-          ErrorCore.undefinedTypeVariableInLambdaDomainErrorLocation = field_location,
-          ErrorCore.undefinedTypeVariableInLambdaDomainErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-undefinedTypeVariableInTypeApplicationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UndefinedTypeVariableInTypeApplicationError
-undefinedTypeVariableInTypeApplicationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UndefinedTypeVariableInTypeApplicationError {
-          ErrorCore.undefinedTypeVariableInTypeApplicationErrorLocation = field_location,
-          ErrorCore.undefinedTypeVariableInTypeApplicationErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unexpectedTermVariantError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UnexpectedTermVariantError
-unexpectedTermVariantError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "expectedVariant" Variants.termVariant fieldMap cx) (\field_expectedVariant -> Eithers.bind (ExtractCore.requireField "actualTerm" DecodeCore.term fieldMap cx) (\field_actualTerm -> Right (ErrorCore.UnexpectedTermVariantError {
-          ErrorCore.unexpectedTermVariantErrorExpectedVariant = field_expectedVariant,
-          ErrorCore.unexpectedTermVariantErrorActualTerm = field_actualTerm}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unexpectedTypeVariantError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UnexpectedTypeVariantError
-unexpectedTypeVariantError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "expectedVariant" Variants.typeVariant fieldMap cx) (\field_expectedVariant -> Eithers.bind (ExtractCore.requireField "actualType" DecodeCore.type_ fieldMap cx) (\field_actualType -> Right (ErrorCore.UnexpectedTypeVariantError {
-          ErrorCore.unexpectedTypeVariantErrorExpectedVariant = field_expectedVariant,
-          ErrorCore.unexpectedTypeVariantErrorActualType = field_actualType}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unknownPrimitiveNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UnknownPrimitiveNameError
-unknownPrimitiveNameError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UnknownPrimitiveNameError {
-          ErrorCore.unknownPrimitiveNameErrorLocation = field_location,
-          ErrorCore.unknownPrimitiveNameErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unnecessaryIdentityApplicationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UnnecessaryIdentityApplicationError
-unnecessaryIdentityApplicationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.UnnecessaryIdentityApplicationError {
-          ErrorCore.unnecessaryIdentityApplicationErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-untypedTermVariableError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.UntypedTermVariableError
-untypedTermVariableError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (ExtractCore.requireField "name" DecodeCore.name fieldMap cx) (\field_name -> Right (ErrorCore.UntypedTermVariableError {
-          ErrorCore.untypedTermVariableErrorLocation = field_location,
-          ErrorCore.untypedTermVariableErrorName = field_name}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-voidInNonBottomPositionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ErrorCore.VoidInNonBottomPositionError
-voidInNonBottomPositionError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (ErrorCore.VoidInNonBottomPositionError {
-          ErrorCore.voidInNonBottomPositionErrorLocation = field_location})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Errors.hs b/src/main/haskell/Hydra/Decode/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Errors.hs
+++ /dev/null
@@ -1,227 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.errors
-
-module Hydra.Decode.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Decode.Error.Checking as Checking
-import qualified Hydra.Decode.Error.Core as ErrorCore
-import qualified Hydra.Decode.Paths as Paths
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-decodingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.DecodingError
-decodingError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Errors.DecodingError 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)
-emptyListError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ()
-emptyListError cx t = ExtractCore.decodeUnit cx t
-error :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.Error
-error 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 "checking", (\input -> Eithers.map (\t -> Errors.ErrorChecking t) (Checking.checkingError cx input))),
-                      (Core.Name "decoding", (\input -> Eithers.map (\t -> Errors.ErrorDecoding t) (decodingError cx input))),
-                      (Core.Name "duplicateBinding", (\input -> Eithers.map (\t -> Errors.ErrorDuplicateBinding t) (ErrorCore.duplicateBindingError cx input))),
-                      (Core.Name "duplicateField", (\input -> Eithers.map (\t -> Errors.ErrorDuplicateField t) (ErrorCore.duplicateFieldError cx input))),
-                      (Core.Name "extraction", (\input -> Eithers.map (\t -> Errors.ErrorExtraction t) (extractionError cx input))),
-                      (Core.Name "inference", (\input -> Eithers.map (\t -> Errors.ErrorInference t) (inferenceError cx input))),
-                      (Core.Name "other", (\input -> Eithers.map (\t -> Errors.ErrorOther t) (otherError cx input))),
-                      (Core.Name "resolution", (\input -> Eithers.map (\t -> Errors.ErrorResolution t) (resolutionError cx input))),
-                      (Core.Name "undefinedField", (\input -> Eithers.map (\t -> Errors.ErrorUndefinedField t) (ErrorCore.undefinedFieldError cx input))),
-                      (Core.Name "undefinedTermVariable", (\input -> Eithers.map (\t -> Errors.ErrorUndefinedTermVariable t) (ErrorCore.undefinedTermVariableError cx input))),
-                      (Core.Name "untypedTermVariable", (\input -> Eithers.map (\t -> Errors.ErrorUntypedTermVariable t) (ErrorCore.untypedTermVariableError cx input))),
-                      (Core.Name "unexpectedTermVariant", (\input -> Eithers.map (\t -> Errors.ErrorUnexpectedTermVariant t) (ErrorCore.unexpectedTermVariantError cx input))),
-                      (Core.Name "unexpectedTypeVariant", (\input -> Eithers.map (\t -> Errors.ErrorUnexpectedTypeVariant t) (ErrorCore.unexpectedTypeVariantError cx input))),
-                      (Core.Name "unification", (\input -> Eithers.map (\t -> Errors.ErrorUnification t) (unificationError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-extractionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.ExtractionError
-extractionError 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 "emptyList", (\input -> Eithers.map (\t -> Errors.ExtractionErrorEmptyList t) (emptyListError cx input))),
-                      (Core.Name "multipleBindings", (\input -> Eithers.map (\t -> Errors.ExtractionErrorMultipleBindings t) (multipleBindingsError cx input))),
-                      (Core.Name "multipleFields", (\input -> Eithers.map (\t -> Errors.ExtractionErrorMultipleFields t) (multipleFieldsError cx input))),
-                      (Core.Name "noMatchingField", (\input -> Eithers.map (\t -> Errors.ExtractionErrorNoMatchingField t) (noMatchingFieldError cx input))),
-                      (Core.Name "noSuchBinding", (\input -> Eithers.map (\t -> Errors.ExtractionErrorNoSuchBinding t) (noSuchBindingError cx input))),
-                      (Core.Name "notEnoughCases", (\input -> Eithers.map (\t -> Errors.ExtractionErrorNotEnoughCases t) (notEnoughCasesError cx input))),
-                      (Core.Name "unexpectedShape", (\input -> Eithers.map (\t -> Errors.ExtractionErrorUnexpectedShape t) (unexpectedShapeError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-inferenceError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.InferenceError
-inferenceError 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 "checking", (\input -> Eithers.map (\t -> Errors.InferenceErrorChecking t) (Checking.checkingError cx input))),
-                      (Core.Name "other", (\input -> Eithers.map (\t -> Errors.InferenceErrorOther t) (otherInferenceError cx input))),
-                      (Core.Name "unification", (\input -> Eithers.map (\t -> Errors.InferenceErrorUnification t) (unificationInferenceError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-multipleBindingsError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.MultipleBindingsError
-multipleBindingsError 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" DecodeCore.name fieldMap cx) (\field_name -> Right (Errors.MultipleBindingsError {
-          Errors.multipleBindingsErrorName = field_name})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-multipleFieldsError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.MultipleFieldsError
-multipleFieldsError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "fieldName" DecodeCore.name fieldMap cx) (\field_fieldName -> Right (Errors.MultipleFieldsError {
-          Errors.multipleFieldsErrorFieldName = field_fieldName})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-noMatchingFieldError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.NoMatchingFieldError
-noMatchingFieldError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "fieldName" DecodeCore.name fieldMap cx) (\field_fieldName -> Right (Errors.NoMatchingFieldError {
-          Errors.noMatchingFieldErrorFieldName = field_fieldName})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-noSuchBindingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.NoSuchBindingError
-noSuchBindingError 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" DecodeCore.name fieldMap cx) (\field_name -> Right (Errors.NoSuchBindingError {
-          Errors.noSuchBindingErrorName = field_name})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-noSuchPrimitiveError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.NoSuchPrimitiveError
-noSuchPrimitiveError 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" DecodeCore.name fieldMap cx) (\field_name -> Right (Errors.NoSuchPrimitiveError {
-          Errors.noSuchPrimitiveErrorName = field_name})))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-notEnoughCasesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ()
-notEnoughCasesError cx t = ExtractCore.decodeUnit cx t
-otherError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.OtherError
-otherError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Errors.OtherError 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)
-otherInferenceError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.OtherInferenceError
-otherInferenceError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "path" Paths.subtermPath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "message" (\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_message -> Right (Errors.OtherInferenceError {
-          Errors.otherInferenceErrorPath = field_path,
-          Errors.otherInferenceErrorMessage = field_message}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-otherResolutionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.OtherResolutionError
-otherResolutionError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Errors.OtherResolutionError 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)
-resolutionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.ResolutionError
-resolutionError 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 "noSuchBinding", (\input -> Eithers.map (\t -> Errors.ResolutionErrorNoSuchBinding t) (noSuchBindingError cx input))),
-                      (Core.Name "noSuchPrimitive", (\input -> Eithers.map (\t -> Errors.ResolutionErrorNoSuchPrimitive t) (noSuchPrimitiveError cx input))),
-                      (Core.Name "noMatchingField", (\input -> Eithers.map (\t -> Errors.ResolutionErrorNoMatchingField t) (noMatchingFieldError cx input))),
-                      (Core.Name "other", (\input -> Eithers.map (\t -> Errors.ResolutionErrorOther t) (otherResolutionError cx input))),
-                      (Core.Name "unexpectedShape", (\input -> Eithers.map (\t -> Errors.ResolutionErrorUnexpectedShape t) (unexpectedShapeError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-unexpectedShapeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.UnexpectedShapeError
-unexpectedShapeError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "expected" (\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_expected -> Eithers.bind (ExtractCore.requireField "actual" (\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_actual -> Right (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = field_expected,
-          Errors.unexpectedShapeErrorActual = field_actual}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unificationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.UnificationError
-unificationError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "leftType" DecodeCore.type_ fieldMap cx) (\field_leftType -> Eithers.bind (ExtractCore.requireField "rightType" DecodeCore.type_ fieldMap cx) (\field_rightType -> Eithers.bind (ExtractCore.requireField "message" (\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_message -> Right (Errors.UnificationError {
-          Errors.unificationErrorLeftType = field_leftType,
-          Errors.unificationErrorRightType = field_rightType,
-          Errors.unificationErrorMessage = field_message})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-unificationInferenceError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.UnificationInferenceError
-unificationInferenceError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "path" Paths.subtermPath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "cause" unificationError fieldMap cx) (\field_cause -> Right (Errors.UnificationInferenceError {
-          Errors.unificationInferenceErrorPath = field_path,
-          Errors.unificationInferenceErrorCause = field_cause}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Json/Model.hs b/src/main/haskell/Hydra/Decode/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Json/Model.hs
+++ /dev/null
@@ -1,51 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.json.model
-
-module Hydra.Decode.Json.Model where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-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 "array", (\input -> Eithers.map (\t -> Model.ValueArray t) (ExtractCore.decodeList value cx input))),
-                      (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 "null", (\input -> Eithers.map (\t -> Model.ValueNull) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "number", (\input -> Eithers.map (\t -> Model.ValueNumber t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
-                        Core.TermLiteral v1 -> case v1 of
-                          Core.LiteralDecimal v2 -> Right v2
-                          _ -> Left (Errors.DecodingError "expected decimal literal")
-                        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
-                      (Core.Name "object", (\input -> Eithers.map (\t -> Model.ValueObject t) (ExtractCore.decodeMap (\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)) value 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))))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Packaging.hs b/src/main/haskell/Hydra/Decode/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Packaging.hs
+++ /dev/null
@@ -1,131 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.packaging
-
-module Hydra.Decode.Packaging 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.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-definition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.Definition
-definition 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 "term", (\input -> Eithers.map (\t -> Packaging.DefinitionTerm t) (termDefinition cx input))),
-                      (Core.Name "type", (\input -> Eithers.map (\t -> Packaging.DefinitionType t) (typeDefinition cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-fileExtension :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.FileExtension
-fileExtension cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Packaging.FileExtension 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)
-module_ :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.Module
-module_ cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "description" (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_description -> Eithers.bind (ExtractCore.requireField "namespace" namespace fieldMap cx) (\field_namespace -> Eithers.bind (ExtractCore.requireField "termDependencies" (ExtractCore.decodeList namespace) fieldMap cx) (\field_termDependencies -> Eithers.bind (ExtractCore.requireField "typeDependencies" (ExtractCore.decodeList namespace) fieldMap cx) (\field_typeDependencies -> Eithers.bind (ExtractCore.requireField "definitions" (ExtractCore.decodeList definition) fieldMap cx) (\field_definitions -> Right (Packaging.Module {
-          Packaging.moduleDescription = field_description,
-          Packaging.moduleNamespace = field_namespace,
-          Packaging.moduleTermDependencies = field_termDependencies,
-          Packaging.moduleTypeDependencies = field_typeDependencies,
-          Packaging.moduleDefinitions = field_definitions})))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-namespace :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.Namespace
-namespace cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Packaging.Namespace 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)
-namespaces :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Packaging.Namespaces t0)
-namespaces n cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "focus" (ExtractCore.decodePair namespace n) fieldMap cx) (\field_focus -> Eithers.bind (ExtractCore.requireField "mapping" (ExtractCore.decodeMap namespace n) fieldMap cx) (\field_mapping -> Right (Packaging.Namespaces {
-          Packaging.namespacesFocus = field_focus,
-          Packaging.namespacesMapping = field_mapping}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-package :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.Package
-package 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" packageName fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "modules" (ExtractCore.decodeList module_) fieldMap cx) (\field_modules -> Eithers.bind (ExtractCore.requireField "dependencies" (ExtractCore.decodeList packageName) fieldMap cx) (\field_dependencies -> Eithers.bind (ExtractCore.requireField "description" (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_description -> Right (Packaging.Package {
-          Packaging.packageName = field_name,
-          Packaging.packageModules = field_modules,
-          Packaging.packageDependencies = field_dependencies,
-          Packaging.packageDescription = field_description}))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-packageName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.PackageName
-packageName cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Packaging.PackageName 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)
-qualifiedName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.QualifiedName
-qualifiedName cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "namespace" (ExtractCore.decodeMaybe namespace) fieldMap cx) (\field_namespace -> Eithers.bind (ExtractCore.requireField "local" (\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_local -> Right (Packaging.QualifiedName {
-          Packaging.qualifiedNameNamespace = field_namespace,
-          Packaging.qualifiedNameLocal = field_local}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-termDefinition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.TermDefinition
-termDefinition 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" DecodeCore.name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "term" DecodeCore.term fieldMap cx) (\field_term -> Eithers.bind (ExtractCore.requireField "typeScheme" (ExtractCore.decodeMaybe DecodeCore.typeScheme) fieldMap cx) (\field_typeScheme -> Right (Packaging.TermDefinition {
-          Packaging.termDefinitionName = field_name,
-          Packaging.termDefinitionTerm = field_term,
-          Packaging.termDefinitionTypeScheme = field_typeScheme})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeDefinition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Packaging.TypeDefinition
-typeDefinition 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" DecodeCore.name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "typeScheme" DecodeCore.typeScheme fieldMap cx) (\field_typeScheme -> Right (Packaging.TypeDefinition {
-          Packaging.typeDefinitionName = field_name,
-          Packaging.typeDefinitionTypeScheme = field_typeScheme}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Parsing.hs b/src/main/haskell/Hydra/Decode/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Parsing.hs
+++ /dev/null
@@ -1,61 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.parsing
-
-module Hydra.Decode.Parsing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Parsing as Parsing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-parseError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Parsing.ParseError
-parseError cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "message" (\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_message -> Eithers.bind (ExtractCore.requireField "remainder" (\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_remainder -> Right (Parsing.ParseError {
-          Parsing.parseErrorMessage = field_message,
-          Parsing.parseErrorRemainder = field_remainder}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-parseResult :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Parsing.ParseResult t0)
-parseResult a 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 "success", (\input -> Eithers.map (\t -> Parsing.ParseResultSuccess t) (parseSuccess a cx input))),
-                      (Core.Name "failure", (\input -> Eithers.map (\t -> Parsing.ParseResultFailure t) (parseError cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-parseSuccess :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Parsing.ParseSuccess t0)
-parseSuccess a cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "value" a fieldMap cx) (\field_value -> Eithers.bind (ExtractCore.requireField "remainder" (\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_remainder -> Right (Parsing.ParseSuccess {
-          Parsing.parseSuccessValue = field_value,
-          Parsing.parseSuccessRemainder = field_remainder}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Paths.hs b/src/main/haskell/Hydra/Decode/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Paths.hs
+++ /dev/null
@@ -1,196 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.paths
-
-module Hydra.Decode.Paths 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.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Paths as Paths
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-subtermEdge :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermEdge
-subtermEdge cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "source" subtermNode fieldMap cx) (\field_source -> Eithers.bind (ExtractCore.requireField "path" subtermPath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "target" subtermNode fieldMap cx) (\field_target -> Right (Paths.SubtermEdge {
-          Paths.subtermEdgeSource = field_source,
-          Paths.subtermEdgePath = field_path,
-          Paths.subtermEdgeTarget = field_target})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-subtermGraph :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermGraph
-subtermGraph 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 subtermNode) fieldMap cx) (\field_nodes -> Eithers.bind (ExtractCore.requireField "edges" (ExtractCore.decodeList subtermEdge) fieldMap cx) (\field_edges -> Right (Paths.SubtermGraph {
-          Paths.subtermGraphNodes = field_nodes,
-          Paths.subtermGraphEdges = field_edges}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-subtermNode :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermNode
-subtermNode 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" DecodeCore.name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "label" (\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_label -> Eithers.bind (ExtractCore.requireField "id" (\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_id -> Right (Paths.SubtermNode {
-          Paths.subtermNodeName = field_name,
-          Paths.subtermNodeLabel = field_label,
-          Paths.subtermNodeId = field_id})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-subtermPath :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermPath
-subtermPath cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Paths.SubtermPath b) (ExtractCore.decodeList subtermStep cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-subtermStep :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermStep
-subtermStep 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 "annotatedBody", (\input -> Eithers.map (\t -> Paths.SubtermStepAnnotatedBody) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "applicationFunction", (\input -> Eithers.map (\t -> Paths.SubtermStepApplicationFunction) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "applicationArgument", (\input -> Eithers.map (\t -> Paths.SubtermStepApplicationArgument) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "lambdaBody", (\input -> Eithers.map (\t -> Paths.SubtermStepLambdaBody) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unionCasesDefault", (\input -> Eithers.map (\t -> Paths.SubtermStepUnionCasesDefault) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unionCasesBranch", (\input -> Eithers.map (\t -> Paths.SubtermStepUnionCasesBranch t) (DecodeCore.name cx input))),
-                      (Core.Name "letBody", (\input -> Eithers.map (\t -> Paths.SubtermStepLetBody) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "letBinding", (\input -> Eithers.map (\t -> Paths.SubtermStepLetBinding t) (DecodeCore.name cx input))),
-                      (Core.Name "listElement", (\input -> Eithers.map (\t -> Paths.SubtermStepListElement t) (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 input)))),
-                      (Core.Name "mapKey", (\input -> Eithers.map (\t -> Paths.SubtermStepMapKey t) (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 input)))),
-                      (Core.Name "mapValue", (\input -> Eithers.map (\t -> Paths.SubtermStepMapValue t) (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 input)))),
-                      (Core.Name "maybeTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepMaybeTerm) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "productTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepProductTerm t) (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 input)))),
-                      (Core.Name "recordField", (\input -> Eithers.map (\t -> Paths.SubtermStepRecordField t) (DecodeCore.name cx input))),
-                      (Core.Name "setElement", (\input -> Eithers.map (\t -> Paths.SubtermStepSetElement t) (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 input)))),
-                      (Core.Name "sumTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepSumTerm) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "typeLambdaBody", (\input -> Eithers.map (\t -> Paths.SubtermStepTypeLambdaBody) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "typeApplicationTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepTypeApplicationTerm) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "injectionTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepInjectionTerm) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "wrappedTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepWrappedTerm) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-subtypeEdge :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeEdge
-subtypeEdge cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "source" subtypeNode fieldMap cx) (\field_source -> Eithers.bind (ExtractCore.requireField "path" subtypePath fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "target" subtypeNode fieldMap cx) (\field_target -> Right (Paths.SubtypeEdge {
-          Paths.subtypeEdgeSource = field_source,
-          Paths.subtypeEdgePath = field_path,
-          Paths.subtypeEdgeTarget = field_target})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-subtypeGraph :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeGraph
-subtypeGraph 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 subtypeNode) fieldMap cx) (\field_nodes -> Eithers.bind (ExtractCore.requireField "edges" (ExtractCore.decodeList subtypeEdge) fieldMap cx) (\field_edges -> Right (Paths.SubtypeGraph {
-          Paths.subtypeGraphNodes = field_nodes,
-          Paths.subtypeGraphEdges = field_edges}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-subtypeNode :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeNode
-subtypeNode 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" DecodeCore.name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "label" (\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_label -> Eithers.bind (ExtractCore.requireField "id" (\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_id -> Right (Paths.SubtypeNode {
-          Paths.subtypeNodeName = field_name,
-          Paths.subtypeNodeLabel = field_label,
-          Paths.subtypeNodeId = field_id})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-subtypePath :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypePath
-subtypePath cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Paths.SubtypePath b) (ExtractCore.decodeList subtypeStep cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-subtypeStep :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeStep
-subtypeStep 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 "annotatedBody", (\input -> Eithers.map (\t -> Paths.SubtypeStepAnnotatedBody) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "applicationFunction", (\input -> Eithers.map (\t -> Paths.SubtypeStepApplicationFunction) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "applicationArgument", (\input -> Eithers.map (\t -> Paths.SubtypeStepApplicationArgument) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "eitherLeft", (\input -> Eithers.map (\t -> Paths.SubtypeStepEitherLeft) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "eitherRight", (\input -> Eithers.map (\t -> Paths.SubtypeStepEitherRight) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "forallBody", (\input -> Eithers.map (\t -> Paths.SubtypeStepForallBody) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "functionDomain", (\input -> Eithers.map (\t -> Paths.SubtypeStepFunctionDomain) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "functionCodomain", (\input -> Eithers.map (\t -> Paths.SubtypeStepFunctionCodomain) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "listElement", (\input -> Eithers.map (\t -> Paths.SubtypeStepListElement) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "mapKeys", (\input -> Eithers.map (\t -> Paths.SubtypeStepMapKeys) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "mapValues", (\input -> Eithers.map (\t -> Paths.SubtypeStepMapValues) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "maybeElement", (\input -> Eithers.map (\t -> Paths.SubtypeStepMaybeElement) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "pairFirst", (\input -> Eithers.map (\t -> Paths.SubtypeStepPairFirst) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "pairSecond", (\input -> Eithers.map (\t -> Paths.SubtypeStepPairSecond) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "recordField", (\input -> Eithers.map (\t -> Paths.SubtypeStepRecordField t) (DecodeCore.name cx input))),
-                      (Core.Name "setElement", (\input -> Eithers.map (\t -> Paths.SubtypeStepSetElement) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unionField", (\input -> Eithers.map (\t -> Paths.SubtypeStepUnionField t) (DecodeCore.name cx input))),
-                      (Core.Name "wrappedType", (\input -> Eithers.map (\t -> Paths.SubtypeStepWrappedType) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Pg/Mapping.hs b/src/main/haskell/Hydra/Decode/Pg/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Pg/Mapping.hs
+++ /dev/null
@@ -1,173 +0,0 @@
--- 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.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.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Mapping as Mapping
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Pg/Model.hs b/src/main/haskell/Hydra/Decode/Pg/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Pg/Model.hs
+++ /dev/null
@@ -1,280 +0,0 @@
--- 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.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-adjacentEdge :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.AdjacentEdge t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-edge :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Edge t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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)
-
-edgeType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.EdgeType t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-element :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Element t0)
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-elementTree :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.ElementTree t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-elementType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.ElementType t0)
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-elementTypeTree :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.ElementTypeTree t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-graph :: Ord t0 => ((Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Graph t0))
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-graphSchema :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.GraphSchema t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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 (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-
-lazyGraph :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.LazyGraph t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-property :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Property t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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)
-
-propertyType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.PropertyType t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-vertex :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Vertex t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-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)
-
-vertexType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.VertexType t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
-
-vertexWithAdjacentEdges :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.VertexWithAdjacentEdges t0)
-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 record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Phantoms.hs b/src/main/haskell/Hydra/Decode/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Phantoms.hs
+++ /dev/null
@@ -1,36 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.phantoms
-
-module Hydra.Decode.Phantoms 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.Lib.Eithers as Eithers
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-tBinding :: t0 -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Phantoms.TBinding t1)
-tBinding a 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" DecodeCore.name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "term" (tTerm a) fieldMap cx) (\field_term -> Right (Phantoms.TBinding {
-          Phantoms.tBindingName = field_name,
-          Phantoms.tBindingTerm = field_term}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-tTerm :: t0 -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Phantoms.TTerm t1)
-tTerm a cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Phantoms.TTerm b) (DecodeCore.term cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-tTermDefinition :: t0 -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Phantoms.TTermDefinition t1)
-tTermDefinition a 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" DecodeCore.name fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "term" (tTerm a) fieldMap cx) (\field_term -> Right (Phantoms.TTermDefinition {
-          Phantoms.tTermDefinitionName = field_name,
-          Phantoms.tTermDefinitionTerm = field_term}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Query.hs b/src/main/haskell/Hydra/Decode/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Query.hs
+++ /dev/null
@@ -1,234 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.query
-
-module Hydra.Decode.Query 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.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Query as Query
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-comparisonConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.ComparisonConstraint
-comparisonConstraint 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 "equal", (\input -> Eithers.map (\t -> Query.ComparisonConstraintEqual) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "notEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintNotEqual) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "lessThan", (\input -> Eithers.map (\t -> Query.ComparisonConstraintLessThan) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "greaterThan", (\input -> Eithers.map (\t -> Query.ComparisonConstraintGreaterThan) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "lessThanOrEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintLessThanOrEqual) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "greaterThanOrEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintGreaterThanOrEqual) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-edge :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Edge
-edge 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" DecodeCore.name fieldMap cx) (\field_type -> Eithers.bind (ExtractCore.requireField "out" (ExtractCore.decodeMaybe DecodeCore.name) fieldMap cx) (\field_out -> Eithers.bind (ExtractCore.requireField "in" (ExtractCore.decodeMaybe DecodeCore.name) fieldMap cx) (\field_in -> Right (Query.Edge {
-          Query.edgeType = field_type,
-          Query.edgeOut = field_out,
-          Query.edgeIn = field_in})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-graphPattern :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.GraphPattern
-graphPattern cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "graph" DecodeCore.name fieldMap cx) (\field_graph -> Eithers.bind (ExtractCore.requireField "patterns" (ExtractCore.decodeList pattern) fieldMap cx) (\field_patterns -> Right (Query.GraphPattern {
-          Query.graphPatternGraph = field_graph,
-          Query.graphPatternPatterns = field_patterns}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-node :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Node
-node 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 "term", (\input -> Eithers.map (\t -> Query.NodeTerm t) (DecodeCore.term cx input))),
-                      (Core.Name "variable", (\input -> Eithers.map (\t -> Query.NodeVariable t) (variable cx input))),
-                      (Core.Name "wildcard", (\input -> Eithers.map (\t -> Query.NodeWildcard) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-path :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Path
-path 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 "step", (\input -> Eithers.map (\t -> Query.PathStep t) (step cx input))),
-                      (Core.Name "regex", (\input -> Eithers.map (\t -> Query.PathRegex t) (regexSequence cx input))),
-                      (Core.Name "inverse", (\input -> Eithers.map (\t -> Query.PathInverse t) (path cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-pathEquation :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.PathEquation
-pathEquation cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "left" path fieldMap cx) (\field_left -> Eithers.bind (ExtractCore.requireField "right" path fieldMap cx) (\field_right -> Right (Query.PathEquation {
-          Query.pathEquationLeft = field_left,
-          Query.pathEquationRight = field_right}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-pattern :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Pattern
-pattern 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 "triple", (\input -> Eithers.map (\t -> Query.PatternTriple t) (triplePattern cx input))),
-                      (Core.Name "negation", (\input -> Eithers.map (\t -> Query.PatternNegation t) (pattern cx input))),
-                      (Core.Name "conjunction", (\input -> Eithers.map (\t -> Query.PatternConjunction t) (ExtractCore.decodeList pattern cx input))),
-                      (Core.Name "disjunction", (\input -> Eithers.map (\t -> Query.PatternDisjunction t) (ExtractCore.decodeList pattern cx input))),
-                      (Core.Name "graph", (\input -> Eithers.map (\t -> Query.PatternGraph t) (graphPattern cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-patternImplication :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.PatternImplication
-patternImplication cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "antecedent" pattern fieldMap cx) (\field_antecedent -> Eithers.bind (ExtractCore.requireField "consequent" pattern fieldMap cx) (\field_consequent -> Right (Query.PatternImplication {
-          Query.patternImplicationAntecedent = field_antecedent,
-          Query.patternImplicationConsequent = field_consequent}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-query :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Query
-query cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "variables" (ExtractCore.decodeList variable) fieldMap cx) (\field_variables -> Eithers.bind (ExtractCore.requireField "patterns" (ExtractCore.decodeList pattern) fieldMap cx) (\field_patterns -> Right (Query.Query {
-          Query.queryVariables = field_variables,
-          Query.queryPatterns = field_patterns}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-range :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Range
-range cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "min" (\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_min -> Eithers.bind (ExtractCore.requireField "max" (\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_max -> Right (Query.Range {
-          Query.rangeMin = field_min,
-          Query.rangeMax = field_max}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-regexQuantifier :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.RegexQuantifier
-regexQuantifier 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 "one", (\input -> Eithers.map (\t -> Query.RegexQuantifierOne) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "zeroOrOne", (\input -> Eithers.map (\t -> Query.RegexQuantifierZeroOrOne) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "zeroOrMore", (\input -> Eithers.map (\t -> Query.RegexQuantifierZeroOrMore) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "oneOrMore", (\input -> Eithers.map (\t -> Query.RegexQuantifierOneOrMore) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "exactly", (\input -> Eithers.map (\t -> Query.RegexQuantifierExactly t) (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 input)))),
-                      (Core.Name "atLeast", (\input -> Eithers.map (\t -> Query.RegexQuantifierAtLeast t) (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 input)))),
-                      (Core.Name "range", (\input -> Eithers.map (\t -> Query.RegexQuantifierRange t) (range cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-regexSequence :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.RegexSequence
-regexSequence cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "path" path fieldMap cx) (\field_path -> Eithers.bind (ExtractCore.requireField "quantifier" regexQuantifier fieldMap cx) (\field_quantifier -> Right (Query.RegexSequence {
-          Query.regexSequencePath = field_path,
-          Query.regexSequenceQuantifier = field_quantifier}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-step :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Step
-step 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 "edge", (\input -> Eithers.map (\t -> Query.StepEdge t) (edge cx input))),
-                      (Core.Name "project", (\input -> Eithers.map (\t -> Query.StepProject t) (DecodeCore.projection cx input))),
-                      (Core.Name "compare", (\input -> Eithers.map (\t -> Query.StepCompare t) (comparisonConstraint cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-triplePattern :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.TriplePattern
-triplePattern cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "subject" node fieldMap cx) (\field_subject -> Eithers.bind (ExtractCore.requireField "predicate" path fieldMap cx) (\field_predicate -> Eithers.bind (ExtractCore.requireField "object" node fieldMap cx) (\field_object -> Right (Query.TriplePattern {
-          Query.triplePatternSubject = field_subject,
-          Query.triplePatternPredicate = field_predicate,
-          Query.triplePatternObject = field_object})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-variable :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Variable
-variable cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Query.Variable 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)
diff --git a/src/main/haskell/Hydra/Decode/Relational.hs b/src/main/haskell/Hydra/Decode/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Relational.hs
+++ /dev/null
@@ -1,79 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.relational
-
-module Hydra.Decode.Relational where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Relational as Relational
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-columnName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.ColumnName
-columnName cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Relational.ColumnName 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)
-columnSchema :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.ColumnSchema t0)
-columnSchema 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 "name" columnName fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "domain" t fieldMap cx) (\field_domain -> Right (Relational.ColumnSchema {
-          Relational.columnSchemaName = field_name,
-          Relational.columnSchemaDomain = field_domain}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-foreignKey :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.ForeignKey
-foreignKey cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "foreignRelation" relationName fieldMap cx) (\field_foreignRelation -> Eithers.bind (ExtractCore.requireField "keys" (ExtractCore.decodeMap columnName columnName) fieldMap cx) (\field_keys -> Right (Relational.ForeignKey {
-          Relational.foreignKeyForeignRelation = field_foreignRelation,
-          Relational.foreignKeyKeys = field_keys}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-primaryKey :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.PrimaryKey
-primaryKey cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Relational.PrimaryKey b) (ExtractCore.decodeList columnName cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-relation :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.Relation t0)
-relation v cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Relational.Relation b) (ExtractCore.decodeList (row v) cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-relationName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.RelationName
-relationName cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Relational.RelationName 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)
-relationSchema :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.RelationSchema t0)
-relationSchema 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 "name" relationName fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "columns" (ExtractCore.decodeList (columnSchema t)) fieldMap cx) (\field_columns -> Eithers.bind (ExtractCore.requireField "primaryKeys" (ExtractCore.decodeList primaryKey) fieldMap cx) (\field_primaryKeys -> Eithers.bind (ExtractCore.requireField "foreignKeys" (ExtractCore.decodeList foreignKey) fieldMap cx) (\field_foreignKeys -> Right (Relational.RelationSchema {
-          Relational.relationSchemaName = field_name,
-          Relational.relationSchemaColumns = field_columns,
-          Relational.relationSchemaPrimaryKeys = field_primaryKeys,
-          Relational.relationSchemaForeignKeys = field_foreignKeys}))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-relationship :: Ord t0 => ((Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.Relationship t0))
-relationship v cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Relational.Relationship b) (ExtractCore.decodeSet (ExtractCore.decodeMap columnName v) cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-row :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.Row t0)
-row v cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Relational.Row b) (ExtractCore.decodeList v cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Tabular.hs b/src/main/haskell/Hydra/Decode/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Tabular.hs
+++ /dev/null
@@ -1,55 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.tabular
-
-module Hydra.Decode.Tabular where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Decode.Relational as Relational
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Tabular as Tabular
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-columnType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Tabular.ColumnType
-columnType 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" Relational.columnName fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "type" DecodeCore.type_ fieldMap cx) (\field_type -> Right (Tabular.ColumnType {
-          Tabular.columnTypeName = field_name,
-          Tabular.columnTypeType = field_type}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-dataRow :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Tabular.DataRow t0)
-dataRow v cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Tabular.DataRow b) (ExtractCore.decodeList (ExtractCore.decodeMaybe v) cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-headerRow :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Tabular.HeaderRow
-headerRow cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Tabular.HeaderRow b) (ExtractCore.decodeList (\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)) cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-table :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Tabular.Table t0)
-table 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 "header" (ExtractCore.decodeMaybe headerRow) fieldMap cx) (\field_header -> Eithers.bind (ExtractCore.requireField "data" (ExtractCore.decodeList (dataRow v)) fieldMap cx) (\field_data -> Right (Tabular.Table {
-          Tabular.tableHeader = field_header,
-          Tabular.tableData = field_data}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-tableType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Tabular.TableType
-tableType 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" Relational.relationName fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "columns" (ExtractCore.decodeList columnType) fieldMap cx) (\field_columns -> Right (Tabular.TableType {
-          Tabular.tableTypeName = field_name,
-          Tabular.tableTypeColumns = field_columns}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Testing.hs b/src/main/haskell/Hydra/Decode/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Testing.hs
+++ /dev/null
@@ -1,94 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.testing
-
-module Hydra.Decode.Testing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-tag :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.Tag
-tag cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Testing.Tag 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)
-testCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TestCase
-testCase 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 "universal", (\input -> Eithers.map (\t -> Testing.TestCaseUniversal t) (universalTestCase cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-testCaseWithMetadata :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TestCaseWithMetadata
-testCaseWithMetadata 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" (\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 "case" testCase fieldMap cx) (\field_case -> Eithers.bind (ExtractCore.requireField "description" (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_description -> Eithers.bind (ExtractCore.requireField "tags" (ExtractCore.decodeList tag) fieldMap cx) (\field_tags -> Right (Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = field_name,
-          Testing.testCaseWithMetadataCase = field_case,
-          Testing.testCaseWithMetadataDescription = field_description,
-          Testing.testCaseWithMetadataTags = field_tags}))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-testGroup :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TestGroup
-testGroup 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" (\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 "description" (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_description -> Eithers.bind (ExtractCore.requireField "subgroups" (ExtractCore.decodeList testGroup) fieldMap cx) (\field_subgroups -> Eithers.bind (ExtractCore.requireField "cases" (ExtractCore.decodeList testCaseWithMetadata) fieldMap cx) (\field_cases -> Right (Testing.TestGroup {
-          Testing.testGroupName = field_name,
-          Testing.testGroupDescription = field_description,
-          Testing.testGroupSubgroups = field_subgroups,
-          Testing.testGroupCases = field_cases}))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-universalTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.UniversalTestCase
-universalTestCase cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "actual" (\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_actual -> Eithers.bind (ExtractCore.requireField "expected" (\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_expected -> Right (Testing.UniversalTestCase {
-          Testing.universalTestCaseActual = field_actual,
-          Testing.universalTestCaseExpected = field_expected}))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Topology.hs b/src/main/haskell/Hydra/Decode/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Topology.hs
+++ /dev/null
@@ -1,55 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.topology
-
-module Hydra.Decode.Topology where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Topology as Topology
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-graph :: Graph.Graph -> Core.Term -> Either Errors.DecodingError (M.Map Int [Int])
-graph = ExtractCore.decodeMap vertex (ExtractCore.decodeList vertex)
-tarjanState :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Topology.TarjanState
-tarjanState cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "counter" (\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_counter -> Eithers.bind (ExtractCore.requireField "indices" (ExtractCore.decodeMap vertex (\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_indices -> Eithers.bind (ExtractCore.requireField "lowLinks" (ExtractCore.decodeMap vertex (\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_lowLinks -> Eithers.bind (ExtractCore.requireField "stack" (ExtractCore.decodeList vertex) fieldMap cx) (\field_stack -> Eithers.bind (ExtractCore.requireField "onStack" (ExtractCore.decodeSet vertex) fieldMap cx) (\field_onStack -> Eithers.bind (ExtractCore.requireField "sccs" (ExtractCore.decodeList (ExtractCore.decodeList vertex)) fieldMap cx) (\field_sccs -> Right (Topology.TarjanState {
-          Topology.tarjanStateCounter = field_counter,
-          Topology.tarjanStateIndices = field_indices,
-          Topology.tarjanStateLowLinks = field_lowLinks,
-          Topology.tarjanStateStack = field_stack,
-          Topology.tarjanStateOnStack = field_onStack,
-          Topology.tarjanStateSccs = field_sccs}))))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-vertex :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Int
-vertex cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermLiteral v0 -> case v0 of
-        Core.LiteralInteger v1 -> case v1 of
-          Core.IntegerValueInt32 v2 -> Right v2
-          _ -> Left (Errors.DecodingError "expected int32 value")
-        _ -> Left (Errors.DecodingError "expected int32 literal")
-      _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Typing.hs b/src/main/haskell/Hydra/Decode/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Typing.hs
+++ /dev/null
@@ -1,64 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.typing
-
-module Hydra.Decode.Typing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Context as Context
-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.Lib.Eithers as Eithers
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-functionStructure :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Typing.FunctionStructure t0)
-functionStructure env cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "typeParams" (ExtractCore.decodeList DecodeCore.name) fieldMap cx) (\field_typeParams -> Eithers.bind (ExtractCore.requireField "params" (ExtractCore.decodeList DecodeCore.name) fieldMap cx) (\field_params -> Eithers.bind (ExtractCore.requireField "bindings" (ExtractCore.decodeList DecodeCore.binding) fieldMap cx) (\field_bindings -> Eithers.bind (ExtractCore.requireField "body" DecodeCore.term fieldMap cx) (\field_body -> Eithers.bind (ExtractCore.requireField "domains" (ExtractCore.decodeList DecodeCore.type_) fieldMap cx) (\field_domains -> Eithers.bind (ExtractCore.requireField "codomain" (ExtractCore.decodeMaybe DecodeCore.type_) fieldMap cx) (\field_codomain -> Eithers.bind (ExtractCore.requireField "environment" env fieldMap cx) (\field_environment -> Right (Typing.FunctionStructure {
-          Typing.functionStructureTypeParams = field_typeParams,
-          Typing.functionStructureParams = field_params,
-          Typing.functionStructureBindings = field_bindings,
-          Typing.functionStructureBody = field_body,
-          Typing.functionStructureDomains = field_domains,
-          Typing.functionStructureCodomain = field_codomain,
-          Typing.functionStructureEnvironment = field_environment})))))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-inferenceResult :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.InferenceResult
-inferenceResult cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "term" DecodeCore.term fieldMap cx) (\field_term -> Eithers.bind (ExtractCore.requireField "type" DecodeCore.type_ fieldMap cx) (\field_type -> Eithers.bind (ExtractCore.requireField "subst" typeSubst fieldMap cx) (\field_subst -> Eithers.bind (ExtractCore.requireField "classConstraints" (ExtractCore.decodeMap DecodeCore.name DecodeCore.typeVariableMetadata) fieldMap cx) (\field_classConstraints -> Eithers.bind (ExtractCore.requireField "context" Context.context fieldMap cx) (\field_context -> Right (Typing.InferenceResult {
-          Typing.inferenceResultTerm = field_term,
-          Typing.inferenceResultType = field_type,
-          Typing.inferenceResultSubst = field_subst,
-          Typing.inferenceResultClassConstraints = field_classConstraints,
-          Typing.inferenceResultContext = field_context})))))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-termSubst :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.TermSubst
-termSubst cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Typing.TermSubst b) (ExtractCore.decodeMap DecodeCore.name DecodeCore.term cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
-typeConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.TypeConstraint
-typeConstraint cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermRecord v0 ->
-        let fieldMap = ExtractCore.toFieldMap v0
-        in (Eithers.bind (ExtractCore.requireField "left" DecodeCore.type_ fieldMap cx) (\field_left -> Eithers.bind (ExtractCore.requireField "right" DecodeCore.type_ fieldMap cx) (\field_right -> Eithers.bind (ExtractCore.requireField "comment" (\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_comment -> Right (Typing.TypeConstraint {
-          Typing.typeConstraintLeft = field_left,
-          Typing.typeConstraintRight = field_right,
-          Typing.typeConstraintComment = field_comment})))))
-      _ -> Left (Errors.DecodingError "expected record")) (ExtractCore.stripWithDecodingError cx raw)
-typeSubst :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.TypeSubst
-typeSubst cx raw =
-    Eithers.either (\err -> Left err) (\stripped -> case stripped of
-      Core.TermWrap v0 -> Eithers.map (\b -> Typing.TypeSubst b) (ExtractCore.decodeMap DecodeCore.name DecodeCore.type_ cx (Core.wrappedTermBody v0))
-      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Util.hs b/src/main/haskell/Hydra/Decode/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Util.hs
+++ /dev/null
@@ -1,72 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.util
-
-module Hydra.Decode.Util where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-caseConvention :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Util.CaseConvention
-caseConvention 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 "camel", (\input -> Eithers.map (\t -> Util.CaseConventionCamel) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "pascal", (\input -> Eithers.map (\t -> Util.CaseConventionPascal) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "lowerSnake", (\input -> Eithers.map (\t -> Util.CaseConventionLowerSnake) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "upperSnake", (\input -> Eithers.map (\t -> Util.CaseConventionUpperSnake) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-comparison :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Util.Comparison
-comparison 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 "lessThan", (\input -> Eithers.map (\t -> Util.ComparisonLessThan) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "equalTo", (\input -> Eithers.map (\t -> Util.ComparisonEqualTo) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "greaterThan", (\input -> Eithers.map (\t -> Util.ComparisonGreaterThan) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-precision :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Util.Precision
-precision 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 "arbitrary", (\input -> Eithers.map (\t -> Util.PrecisionArbitrary) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "bits", (\input -> Eithers.map (\t -> Util.PrecisionBits t) (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 input))))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Variants.hs b/src/main/haskell/Hydra/Decode/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decode/Variants.hs
+++ /dev/null
@@ -1,134 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term decoders for hydra.variants
-
-module Hydra.Decode.Variants where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-eliminationVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.EliminationVariant
-eliminationVariant 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 "record", (\input -> Eithers.map (\t -> Variants.EliminationVariantRecord) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "union", (\input -> Eithers.map (\t -> Variants.EliminationVariantUnion) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.EliminationVariantWrap) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-functionVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.FunctionVariant
-functionVariant 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 "elimination", (\input -> Eithers.map (\t -> Variants.FunctionVariantElimination) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "lambda", (\input -> Eithers.map (\t -> Variants.FunctionVariantLambda) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-literalVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.LiteralVariant
-literalVariant 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 "binary", (\input -> Eithers.map (\t -> Variants.LiteralVariantBinary) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Variants.LiteralVariantBoolean) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "decimal", (\input -> Eithers.map (\t -> Variants.LiteralVariantDecimal) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "float", (\input -> Eithers.map (\t -> Variants.LiteralVariantFloat) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "integer", (\input -> Eithers.map (\t -> Variants.LiteralVariantInteger) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "string", (\input -> Eithers.map (\t -> Variants.LiteralVariantString) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-termVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.TermVariant
-termVariant 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 "annotated", (\input -> Eithers.map (\t -> Variants.TermVariantAnnotated) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "application", (\input -> Eithers.map (\t -> Variants.TermVariantApplication) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "cases", (\input -> Eithers.map (\t -> Variants.TermVariantCases) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "either", (\input -> Eithers.map (\t -> Variants.TermVariantEither) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "inject", (\input -> Eithers.map (\t -> Variants.TermVariantInject) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "lambda", (\input -> Eithers.map (\t -> Variants.TermVariantLambda) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "let", (\input -> Eithers.map (\t -> Variants.TermVariantLet) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "list", (\input -> Eithers.map (\t -> Variants.TermVariantList) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "literal", (\input -> Eithers.map (\t -> Variants.TermVariantLiteral) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "map", (\input -> Eithers.map (\t -> Variants.TermVariantMap) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Variants.TermVariantMaybe) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "pair", (\input -> Eithers.map (\t -> Variants.TermVariantPair) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "project", (\input -> Eithers.map (\t -> Variants.TermVariantProject) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "record", (\input -> Eithers.map (\t -> Variants.TermVariantRecord) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "set", (\input -> Eithers.map (\t -> Variants.TermVariantSet) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "typeApplication", (\input -> Eithers.map (\t -> Variants.TermVariantTypeApplication) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "typeLambda", (\input -> Eithers.map (\t -> Variants.TermVariantTypeLambda) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unit", (\input -> Eithers.map (\t -> Variants.TermVariantUnit) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unwrap", (\input -> Eithers.map (\t -> Variants.TermVariantUnwrap) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "variable", (\input -> Eithers.map (\t -> Variants.TermVariantVariable) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.TermVariantWrap) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
-typeVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.TypeVariant
-typeVariant 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 "annotated", (\input -> Eithers.map (\t -> Variants.TypeVariantAnnotated) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "application", (\input -> Eithers.map (\t -> Variants.TypeVariantApplication) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "either", (\input -> Eithers.map (\t -> Variants.TypeVariantEither) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "forall", (\input -> Eithers.map (\t -> Variants.TypeVariantForall) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "function", (\input -> Eithers.map (\t -> Variants.TypeVariantFunction) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "list", (\input -> Eithers.map (\t -> Variants.TypeVariantList) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "literal", (\input -> Eithers.map (\t -> Variants.TypeVariantLiteral) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "map", (\input -> Eithers.map (\t -> Variants.TypeVariantMap) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Variants.TypeVariantMaybe) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "pair", (\input -> Eithers.map (\t -> Variants.TypeVariantPair) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "record", (\input -> Eithers.map (\t -> Variants.TypeVariantRecord) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "set", (\input -> Eithers.map (\t -> Variants.TypeVariantSet) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "union", (\input -> Eithers.map (\t -> Variants.TypeVariantUnion) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "unit", (\input -> Eithers.map (\t -> Variants.TypeVariantUnit) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "variable", (\input -> Eithers.map (\t -> Variants.TypeVariantVariable) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "void", (\input -> Eithers.map (\t -> Variants.TypeVariantVoid) (ExtractCore.decodeUnit cx input))),
-                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.TypeVariantWrap) (ExtractCore.decodeUnit cx input)))]
-        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-          "no such field ",
-          (Core.unName fname),
-          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))
-      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decoding.hs b/src/main/haskell/Hydra/Decoding.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Decoding.hs
+++ /dev/null
@@ -1,1662 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for generating term decoders from type modules
-
-module Hydra.Decoding where
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Collect forall type variable names from a type
-collectForallVariables :: Core.Type -> [Core.Name]
-collectForallVariables typ =
-    case typ of
-      Core.TypeAnnotated v0 -> collectForallVariables (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (collectForallVariables (Core.forallTypeBody v0))
-      _ -> []
--- | Collect type variables needing Ord constraints (from Map key and Set element types)
-collectOrdConstrainedVariables :: Core.Type -> [Core.Name]
-collectOrdConstrainedVariables typ =
-    case typ of
-      Core.TypeAnnotated v0 -> collectOrdConstrainedVariables (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Lists.concat2 (collectOrdConstrainedVariables (Core.applicationTypeFunction v0)) (collectOrdConstrainedVariables (Core.applicationTypeArgument v0))
-      Core.TypeEither v0 -> Lists.concat2 (collectOrdConstrainedVariables (Core.eitherTypeLeft v0)) (collectOrdConstrainedVariables (Core.eitherTypeRight v0))
-      Core.TypeForall v0 -> collectOrdConstrainedVariables (Core.forallTypeBody v0)
-      Core.TypeList v0 -> collectOrdConstrainedVariables v0
-      Core.TypeMap v0 -> Lists.concat [
-        collectTypeVariablesFromType (Core.mapTypeKeys v0),
-        (collectOrdConstrainedVariables (Core.mapTypeKeys v0)),
-        (collectOrdConstrainedVariables (Core.mapTypeValues v0))]
-      Core.TypeMaybe v0 -> collectOrdConstrainedVariables v0
-      Core.TypePair v0 -> Lists.concat2 (collectOrdConstrainedVariables (Core.pairTypeFirst v0)) (collectOrdConstrainedVariables (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Lists.concat (Lists.map (\ft -> collectOrdConstrainedVariables (Core.fieldTypeType ft)) v0)
-      Core.TypeSet v0 -> Lists.concat2 (collectTypeVariablesFromType v0) (collectOrdConstrainedVariables v0)
-      Core.TypeUnion v0 -> Lists.concat (Lists.map (\ft -> collectOrdConstrainedVariables (Core.fieldTypeType ft)) v0)
-      Core.TypeWrap v0 -> collectOrdConstrainedVariables v0
-      _ -> []
--- | Collect type variable names from a type (forall parameters only)
-collectTypeVariables :: Core.Type -> [Core.Name]
-collectTypeVariables typ = collectForallVariables typ
--- | Collect all type variable names from a type expression
-collectTypeVariablesFromType :: Core.Type -> [Core.Name]
-collectTypeVariablesFromType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> collectTypeVariablesFromType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.applicationTypeFunction v0)) (collectTypeVariablesFromType (Core.applicationTypeArgument v0))
-      Core.TypeEither v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.eitherTypeLeft v0)) (collectTypeVariablesFromType (Core.eitherTypeRight v0))
-      Core.TypeForall v0 -> collectTypeVariablesFromType (Core.forallTypeBody v0)
-      Core.TypeList v0 -> collectTypeVariablesFromType v0
-      Core.TypeMap v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.mapTypeKeys v0)) (collectTypeVariablesFromType (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> collectTypeVariablesFromType v0
-      Core.TypePair v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.pairTypeFirst v0)) (collectTypeVariablesFromType (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Lists.concat (Lists.map (\ft -> collectTypeVariablesFromType (Core.fieldTypeType ft)) v0)
-      Core.TypeSet v0 -> collectTypeVariablesFromType v0
-      Core.TypeUnion v0 -> Lists.concat (Lists.map (\ft -> collectTypeVariablesFromType (Core.fieldTypeType ft)) v0)
-      Core.TypeVariable v0 -> [
-        v0]
-      Core.TypeWrap v0 -> collectTypeVariablesFromType v0
-      _ -> []
--- | Transform a type binding into a decoder binding
-decodeBinding :: t0 -> Graph.Graph -> Core.Binding -> Either Errors.DecodingError Core.Binding
-decodeBinding cx graph b =
-    Eithers.bind (DecodeCore.type_ graph (Core.bindingTerm b)) (\typ -> Right (Core.Binding {
-      Core.bindingName = (decodeBindingName (Core.bindingName b)),
-      Core.bindingTerm = (decodeTypeNamed (Core.bindingName b) typ),
-      Core.bindingTypeScheme = (Just (decoderTypeSchemeNamed (Core.bindingName b) typ))}))
--- | Generate a binding name for a decoder function from a type name
-decodeBindingName :: Core.Name -> Core.Name
-decodeBindingName n =
-
-      let parts = Strings.splitOn "." (Core.unName n)
-          localPart = Formatting.decapitalize (Names.localNameOf n)
-          localResult = Core.Name localPart
-      in (Maybes.maybe localResult (\nsParts -> Maybes.maybe localResult (\nsUc ->
-        let tail = Pairs.second nsUc
-        in (Core.Name (Strings.intercalate "." (Lists.concat2 [
-          "hydra",
-          "decode"] (Lists.concat2 tail [
-          localPart]))))) (Lists.uncons nsParts)) (Lists.maybeInit parts))
--- | Generate a decoder for an Either type
-decodeEitherType :: Core.EitherType -> Core.Term
-decodeEitherType et =
-
-      let leftDecoder = decodeType (Core.eitherTypeLeft et)
-          rightDecoder = decodeType (Core.eitherTypeRight et)
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeEither")),
-          Core.applicationArgument = leftDecoder})),
-        Core.applicationArgument = rightDecoder}))
--- | Generate a decoder for a polymorphic (forall) type
-decodeForallType :: Core.ForallType -> Core.Term
-decodeForallType ft =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (decodeBindingName (Core.forallTypeParameter ft)),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (decodeType (Core.forallTypeBody ft))})
--- | Generate a decoder for a list type
-decodeListType :: Core.Type -> Core.Term
-decodeListType elemType =
-
-      let elemDecoder = decodeType elemType
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-        Core.applicationArgument = elemDecoder}))
--- | Generate a decoder for a literal type
-decodeLiteralType :: Core.LiteralType -> Core.Term
-decodeLiteralType lt =
-    case lt of
-      Core.LiteralTypeBinary -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected binary literal"))}))))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "binary"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-      Core.LiteralTypeBoolean -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "boolean"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-      Core.LiteralTypeDecimal -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected decimal literal"))}))))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "decimal"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "d"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "d"))))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeBigfloat -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "bigfloat",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "float"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "bigfloat",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "bigfloat"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "f"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.FloatTypeFloat32 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "float32",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "float"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "float32",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "float32"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "f"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.FloatTypeFloat64 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "float64",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "float"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "float64",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "float64"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "f"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeBigint -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "bigint",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "bigint",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "bigint"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeInt8 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "int8",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "int8",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "int8"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeInt16 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "int16",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "int16",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "int16"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeInt32 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "int32",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "int32",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "int32"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeInt64 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "int64",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "int64",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "int64"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeUint8 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "uint8",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "uint8",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "uint8"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeUint16 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "uint16",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "uint16",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "uint16"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeUint32 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "uint32",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "uint32",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "uint32"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-        Core.IntegerTypeUint64 -> Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "cx"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "raw"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "err"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "stripped"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                    "expected ",
-                                    "uint64",
-                                    " literal"])))}))))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [
-                                          "expected ",
-                                          "uint64",
-                                          " value"])))}))))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "uint64"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "i"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
-      Core.LiteralTypeString -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "s"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})
--- | Generate a decoder for a map type
-decodeMapType :: Core.MapType -> Core.Term
-decodeMapType mt =
-
-      let keyDecoder = decodeType (Core.mapTypeKeys mt)
-          valDecoder = decodeType (Core.mapTypeValues mt)
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-          Core.applicationArgument = keyDecoder})),
-        Core.applicationArgument = valDecoder}))
--- | Generate a decoder for an optional type
-decodeMaybeType :: Core.Type -> Core.Term
-decodeMaybeType elemType =
-
-      let elemDecoder = decodeType elemType
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-        Core.applicationArgument = elemDecoder}))
--- | Transform a type module into a decoder module
-decodeModule :: Context.Context -> Graph.Graph -> Packaging.Module -> Either Errors.Error (Maybe Packaging.Module)
-decodeModule cx graph mod =
-    Eithers.bind (filterTypeBindings cx graph (Maybes.cat (Lists.map (\d -> case d of
-      Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-        let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-            dataTerm =
-                    Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (EncodeCore.type_ typ),
-                      Core.annotatedTermAnnotation = (Maps.fromList [
-                        (Constants.key_type, schemaTerm)])}))
-        in Core.Binding {
-          Core.bindingName = name,
-          Core.bindingTerm = dataTerm,
-          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-            Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-      _ -> Nothing) (Packaging.moduleDefinitions mod)))) (\typeBindings -> Logic.ifElse (Lists.null typeBindings) (Right Nothing) (Eithers.bind (Eithers.mapList (\b -> Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\x -> x) (decodeBinding cx graph b)) typeBindings) (\decodedBindings ->
-      let decodedTypeDeps = Lists.map decodeNamespace (Packaging.moduleTypeDependencies mod)
-          decodedTermDeps = Lists.map decodeNamespace (Packaging.moduleTermDependencies mod)
-          allDecodedDeps = Lists.nub (Lists.concat2 decodedTypeDeps decodedTermDeps)
-      in (Right (Just (Packaging.Module {
-        Packaging.moduleDescription = (Just (Strings.cat [
-          "Term decoders for ",
-          (Packaging.unNamespace (Packaging.moduleNamespace mod))])),
-        Packaging.moduleNamespace = (decodeNamespace (Packaging.moduleNamespace mod)),
-        Packaging.moduleTermDependencies = (Lists.concat2 [
-          Packaging.Namespace "hydra.extract.core",
-          (Packaging.Namespace "hydra.lexical"),
-          (Packaging.Namespace "hydra.rewriting")] allDecodedDeps),
-        Packaging.moduleTypeDependencies = [
-          Packaging.moduleNamespace mod,
-          (Packaging.Namespace "hydra.util")],
-        Packaging.moduleDefinitions = (Lists.map (\b -> Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.bindingName b),
-          Packaging.termDefinitionTerm = (Core.bindingTerm b),
-          Packaging.termDefinitionTypeScheme = (Core.bindingTypeScheme b)})) decodedBindings)}))))))
--- | Generate a decoder module namespace from a source module namespace
-decodeNamespace :: Packaging.Namespace -> Packaging.Namespace
-decodeNamespace ns =
-
-      let parts = Strings.splitOn "." (Packaging.unNamespace ns)
-          fallback = Packaging.Namespace (Packaging.unNamespace ns)
-      in (Maybes.maybe fallback (\uc -> Packaging.Namespace (Strings.cat [
-        "hydra.decode.",
-        (Strings.intercalate "." (Pairs.second uc))])) (Lists.uncons parts))
--- | Generate a decoder for a pair type
-decodePairType :: Core.PairType -> Core.Term
-decodePairType pt =
-
-      let firstDecoder = decodeType (Core.pairTypeFirst pt)
-          secondDecoder = decodeType (Core.pairTypeSecond pt)
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodePair")),
-          Core.applicationArgument = firstDecoder})),
-        Core.applicationArgument = secondDecoder}))
--- | Generate a decoder for a record type
-decodeRecordType :: [Core.FieldType] -> Core.Term
-decodeRecordType rt = decodeRecordTypeImpl (Core.Name "unknown") rt
--- | Generate a decoder for a record type with a type name
-decodeRecordTypeImpl :: Core.Name -> [Core.FieldType] -> Core.Term
-decodeRecordTypeImpl tname rt =
-
-      let decodeFieldTerm =
-              \ft -> Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))})),
-                    Core.applicationArgument = (decodeType (Core.fieldTypeType ft))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})
-          localVarName =
-                  \ft -> Core.Name (Strings.cat [
-                    "field_",
-                    (Core.unName (Core.fieldTypeName ft))])
-          toFieldLambda =
-                  \ft -> \body -> Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (localVarName ft),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = body})
-          decodeBody =
-                  Lists.foldl (\acc -> \ft -> Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                      Core.applicationArgument = (decodeFieldTerm ft)})),
-                    Core.applicationArgument = (toFieldLambda ft acc)})) (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = tname,
-                    Core.recordFields = (Lists.map (\ft -> Core.Field {
-                      Core.fieldName = (Core.fieldTypeName ft),
-                      Core.fieldTerm = (Core.TermVariable (localVarName ft))}) rt)})))) (Lists.reverse rt)
-      in (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "record"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "record"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "fieldMap"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                Core.bindingTypeScheme = Nothing}],
-                            Core.letBody = decodeBody}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))
--- | Generate a decoder for a record type with element name
-decodeRecordTypeNamed :: Core.Name -> [Core.FieldType] -> Core.Term
-decodeRecordTypeNamed ename rt = decodeRecordTypeImpl ename rt
--- | Generate a decoder for a set type
-decodeSetType :: Core.Type -> Core.Term
-decodeSetType elemType =
-
-      let elemDecoder = decodeType elemType
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeSet")),
-        Core.applicationArgument = elemDecoder}))
--- | Generate a decoder term for a Type
-decodeType :: Core.Type -> Core.Term
-decodeType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> decodeType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (decodeType (Core.applicationTypeFunction v0)),
-        Core.applicationArgument = (decodeType (Core.applicationTypeArgument v0))})
-      Core.TypeEither v0 -> decodeEitherType v0
-      Core.TypeForall v0 -> decodeForallType v0
-      Core.TypeList v0 -> decodeListType v0
-      Core.TypeLiteral v0 -> decodeLiteralType v0
-      Core.TypeMap v0 -> decodeMapType v0
-      Core.TypeMaybe v0 -> decodeMaybeType v0
-      Core.TypePair v0 -> decodePairType v0
-      Core.TypeRecord v0 -> decodeRecordType v0
-      Core.TypeSet v0 -> decodeSetType v0
-      Core.TypeUnion v0 -> decodeUnionType v0
-      Core.TypeUnit -> decodeUnitType
-      Core.TypeVoid -> decodeUnitType
-      Core.TypeWrap v0 -> decodeWrappedType v0
-      Core.TypeVariable v0 -> Core.TermVariable (decodeBindingName v0)
-      _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "t"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupported type variant"))}))))}))})
--- | Generate a decoder term for a Type, with element name for nominal types
-decodeTypeNamed :: Core.Name -> Core.Type -> Core.Term
-decodeTypeNamed ename typ =
-    case typ of
-      Core.TypeAnnotated v0 -> decodeTypeNamed ename (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (decodeType (Core.applicationTypeFunction v0)),
-        Core.applicationArgument = (decodeType (Core.applicationTypeArgument v0))})
-      Core.TypeEither v0 -> decodeEitherType v0
-      Core.TypeForall v0 -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (decodeBindingName (Core.forallTypeParameter v0)),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (decodeTypeNamed ename (Core.forallTypeBody v0))})
-      Core.TypeList v0 -> decodeListType v0
-      Core.TypeLiteral v0 -> decodeLiteralType v0
-      Core.TypeMap v0 -> decodeMapType v0
-      Core.TypeMaybe v0 -> decodeMaybeType v0
-      Core.TypePair v0 -> decodePairType v0
-      Core.TypeRecord v0 -> decodeRecordTypeNamed ename v0
-      Core.TypeSet v0 -> decodeSetType v0
-      Core.TypeUnion v0 -> decodeUnionTypeNamed ename v0
-      Core.TypeUnit -> decodeUnitType
-      Core.TypeVoid -> decodeUnitType
-      Core.TypeWrap v0 -> decodeWrappedTypeNamed ename v0
-      Core.TypeVariable v0 -> Core.TermVariable (decodeBindingName v0)
-      _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "t"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupported type variant"))}))))}))})
--- | Generate a decoder for a union type
-decodeUnionType :: [Core.FieldType] -> Core.Term
-decodeUnionType rt = decodeUnionTypeNamed (Core.Name "unknown") rt
--- | Generate a decoder for a union type with the given element name
-decodeUnionTypeNamed :: Core.Name -> [Core.FieldType] -> Core.Term
-decodeUnionTypeNamed ename rt =
-
-      let toVariantPair =
-              \ft -> Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}), (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "input"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "t"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = ename,
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.fieldTypeName ft),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (decodeType (Core.fieldTypeType ft)),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))
-      in (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "inj"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "field"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                    Core.projectionField = (Core.Name "field")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                Core.bindingTypeScheme = Nothing},
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "fname"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                Core.bindingTypeScheme = Nothing},
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "fterm"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                    Core.projectionField = (Core.Name "term")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                Core.bindingTypeScheme = Nothing},
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "variantMap"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                  Core.applicationArgument = (Core.TermList (Lists.map toVariantPair rt))})),
-                                Core.bindingTypeScheme = Nothing}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                  Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                    Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermLiteral (Core.LiteralString "no such field "),
-                                        (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                        (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "f"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))
--- | Generate a decoder for the unit type
-decodeUnitType :: Core.Term
-decodeUnitType =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "cx"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "t"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-          Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})
--- | Generate a decoder for a wrapped type
-decodeWrappedType :: Core.Type -> Core.Term
-decodeWrappedType wt = decodeWrappedTypeNamed (Core.Name "unknown") wt
--- | Generate a decoder for a wrapped type with the given element name
-decodeWrappedTypeNamed :: Core.Name -> Core.Type -> Core.Term
-decodeWrappedTypeNamed ename wt =
-
-      let bodyDecoder = decodeType wt
-      in (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "cx"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "raw"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "err"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "stripped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "wrap"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "b"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = ename,
-                                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = bodyDecoder,
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                  Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                  Core.projectionField = (Core.Name "body")})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))
--- | Get full result type for decoder
-decoderFullResultType :: Core.Type -> Core.Type
-decoderFullResultType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> decoderFullResultType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (decoderFullResultType (Core.applicationTypeFunction v0)),
-        Core.applicationTypeArgument = (Core.applicationTypeArgument v0)})
-      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-        Core.eitherTypeLeft = (decoderFullResultType (Core.eitherTypeLeft v0)),
-        Core.eitherTypeRight = (decoderFullResultType (Core.eitherTypeRight v0))})
-      Core.TypeForall v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (decoderFullResultType (Core.forallTypeBody v0)),
-        Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v0))})
-      Core.TypeList v0 -> Core.TypeList (decoderFullResultType v0)
-      Core.TypeLiteral _ -> Core.TypeVariable (Core.Name "hydra.core.Literal")
-      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (decoderFullResultType (Core.mapTypeKeys v0)),
-        Core.mapTypeValues = (decoderFullResultType (Core.mapTypeValues v0))})
-      Core.TypeMaybe v0 -> Core.TypeMaybe (decoderFullResultType v0)
-      Core.TypePair v0 -> Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (decoderFullResultType (Core.pairTypeFirst v0)),
-        Core.pairTypeSecond = (decoderFullResultType (Core.pairTypeSecond v0))})
-      Core.TypeRecord _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
-      Core.TypeSet v0 -> Core.TypeSet (decoderFullResultType v0)
-      Core.TypeUnion _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
-      Core.TypeUnit -> Core.TypeUnit
-      Core.TypeVariable v0 -> Core.TypeVariable v0
-      Core.TypeVoid -> Core.TypeVoid
-      Core.TypeWrap _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
-      _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
--- | Get full result type for decoder with element name
-decoderFullResultTypeNamed :: Core.Name -> Core.Type -> Core.Type
-decoderFullResultTypeNamed ename typ =
-    case typ of
-      Core.TypeAnnotated v0 -> decoderFullResultTypeNamed ename (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (decoderFullResultTypeNamed ename (Core.forallTypeBody v0)),
-        Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v0))})
-      Core.TypeRecord _ -> Core.TypeVariable ename
-      Core.TypeUnion _ -> Core.TypeVariable ename
-      Core.TypeWrap _ -> Core.TypeVariable ename
-      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (decoderFullResultType (Core.applicationTypeFunction v0)),
-        Core.applicationTypeArgument = (Core.applicationTypeArgument v0)})
-      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-        Core.eitherTypeLeft = (decoderFullResultType (Core.eitherTypeLeft v0)),
-        Core.eitherTypeRight = (decoderFullResultType (Core.eitherTypeRight v0))})
-      Core.TypeList v0 -> Core.TypeList (decoderFullResultType v0)
-      Core.TypeLiteral _ -> Core.TypeVariable (Core.Name "hydra.core.Literal")
-      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (decoderFullResultType (Core.mapTypeKeys v0)),
-        Core.mapTypeValues = (decoderFullResultType (Core.mapTypeValues v0))})
-      Core.TypeMaybe v0 -> Core.TypeMaybe (decoderFullResultType v0)
-      Core.TypePair v0 -> Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (decoderFullResultType (Core.pairTypeFirst v0)),
-        Core.pairTypeSecond = (decoderFullResultType (Core.pairTypeSecond v0))})
-      Core.TypeSet v0 -> Core.TypeSet (decoderFullResultType v0)
-      Core.TypeUnit -> Core.TypeUnit
-      Core.TypeVariable v0 -> Core.TypeVariable v0
-      Core.TypeVoid -> Core.TypeVoid
-      _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
--- | Compute the result type name for a decoder
-decoderResultType :: Core.Type -> Core.Name
-decoderResultType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> decoderResultType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> decoderResultType (Core.applicationTypeFunction v0)
-      Core.TypeForall v0 -> decoderResultType (Core.forallTypeBody v0)
-      Core.TypeLiteral _ -> Core.Name "hydra.core.Literal"
-      Core.TypeRecord _ -> Core.Name "hydra.core.Term"
-      Core.TypeUnion _ -> Core.Name "hydra.core.Term"
-      Core.TypeWrap _ -> Core.Name "hydra.core.Term"
-      _ -> Core.Name "hydra.core.Term"
--- | Build decoder function type
-decoderType :: Core.Type -> Core.Type
-decoderType typ =
-
-      let resultType = decoderFullResultType typ
-          baseType =
-                  Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                        Core.eitherTypeRight = resultType}))}))})
-      in (prependForallDecoders baseType typ)
--- | Build decoder function type with element name
-decoderTypeNamed :: Core.Name -> Core.Type -> Core.Type
-decoderTypeNamed ename typ =
-
-      let resultType = decoderFullResultTypeNamed ename typ
-          baseType =
-                  Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                        Core.eitherTypeRight = resultType}))}))})
-      in (prependForallDecoders baseType typ)
--- | Build type scheme for a decoder function
-decoderTypeScheme :: Core.Type -> Core.TypeScheme
-decoderTypeScheme typ =
-
-      let typeVars = collectTypeVariables typ
-          allOrdVars = collectOrdConstrainedVariables typ
-          ordVars = Lists.filter (\v -> Lists.elem v typeVars) allOrdVars
-          constraints =
-                  Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {
-                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars)))
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = typeVars,
-        Core.typeSchemeBody = (decoderType typ),
-        Core.typeSchemeConstraints = constraints}
--- | Build type scheme for a decoder function with element name
-decoderTypeSchemeNamed :: Core.Name -> Core.Type -> Core.TypeScheme
-decoderTypeSchemeNamed ename typ =
-
-      let typeVars = collectTypeVariables typ
-          allOrdVars = collectOrdConstrainedVariables typ
-          ordVars = Lists.filter (\v -> Lists.elem v typeVars) allOrdVars
-          constraints =
-                  Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {
-                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars)))
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = typeVars,
-        Core.typeSchemeBody = (decoderTypeNamed ename typ),
-        Core.typeSchemeConstraints = constraints}
--- | Filter bindings to only decodable type definitions
-filterTypeBindings :: Context.Context -> Graph.Graph -> [Core.Binding] -> Either Errors.Error [Core.Binding]
-filterTypeBindings cx graph bindings =
-    Eithers.map Maybes.cat (Eithers.mapList (isDecodableBinding cx graph) (Lists.filter Annotations.isNativeType bindings))
--- | Check if a binding is decodable (serializable type)
-isDecodableBinding :: Context.Context -> Graph.Graph -> Core.Binding -> Either Errors.Error (Maybe Core.Binding)
-isDecodableBinding cx graph b =
-    Eithers.bind (Predicates.isSerializableByName cx graph (Core.bindingName b)) (\serializable -> Right (Logic.ifElse serializable (Just b) Nothing))
--- | Prepend decoder types for forall parameters to base type
-prependForallDecoders :: Core.Type -> Core.Type -> Core.Type
-prependForallDecoders baseType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> prependForallDecoders baseType (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Core.TypeFunction (Core.FunctionType {
-        Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-            Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-              Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-              Core.eitherTypeRight = (Core.TypeVariable (Core.forallTypeParameter v0))}))}))})),
-        Core.functionTypeCodomain = (prependForallDecoders baseType (Core.forallTypeBody v0))})
-      _ -> baseType
diff --git a/src/main/haskell/Hydra/Delta/Parquet.hs b/src/main/haskell/Hydra/Delta/Parquet.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Delta/Parquet.hs
+++ /dev/null
@@ -1,152 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A partial Delta Parquet model, based on DataType and its subclasses as specified in the 3.0.0 Java API: https://docs.delta.io/3.0.0/api/java/kernel/io/delta/kernel/types/DataType.html
-
-module Hydra.Delta.Parquet where
-
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Represent array data type.
-data ArrayType =
-  ArrayType {
-    arrayTypeElementType :: DataType,
-    arrayTypeContainsNull :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayType = Core.Name "hydra.delta.parquet.ArrayType"
-
-_ArrayType_elementType = Core.Name "elementType"
-
-_ArrayType_containsNull = Core.Name "containsNull"
-
--- | Base class for all primitive types DataType.
-data BasePrimitiveType =
-  -- | The data type representing byte[] values.
-  BasePrimitiveTypeBinary  |
-  -- | Data type representing boolean type values.
-  BasePrimitiveTypeBoolean  |
-  -- | The data type representing byte type values.
-  BasePrimitiveTypeByte  |
-  -- | A date type, supporting "0001-01-01" through "9999-12-31". Internally, this is represented as the number of days from 1970-01-01.
-  BasePrimitiveTypeDate  |
-  -- | The data type representing double type values.
-  BasePrimitiveTypeDouble  |
-  -- | The data type representing float type values.
-  BasePrimitiveTypeFloat  |
-  -- | The data type representing integer type values.
-  BasePrimitiveTypeInteger  |
-  -- | The data type representing long type values.
-  BasePrimitiveTypeLong  |
-  -- | The data type representing short type values.
-  BasePrimitiveTypeShort  |
-  -- | The data type representing string type values.
-  BasePrimitiveTypeString  |
-  -- | A timestamp type, supporting [0001-01-01T00:00:00.000000Z, 9999-12-31T23:59:59.999999Z] where the left/right-bound is a date and time of the proleptic Gregorian calendar in UTC+00:00. Internally, this is represented as the number of microseconds since the Unix epoch, 1970-01-01 00:00:00 UTC.
-  BasePrimitiveTypeTimestamp
-  deriving (Eq, Ord, Read, Show)
-
-_BasePrimitiveType = Core.Name "hydra.delta.parquet.BasePrimitiveType"
-
-_BasePrimitiveType_binary = Core.Name "binary"
-
-_BasePrimitiveType_boolean = Core.Name "boolean"
-
-_BasePrimitiveType_byte = Core.Name "byte"
-
-_BasePrimitiveType_date = Core.Name "date"
-
-_BasePrimitiveType_double = Core.Name "double"
-
-_BasePrimitiveType_float = Core.Name "float"
-
-_BasePrimitiveType_integer = Core.Name "integer"
-
-_BasePrimitiveType_long = Core.Name "long"
-
-_BasePrimitiveType_short = Core.Name "short"
-
-_BasePrimitiveType_string = Core.Name "string"
-
-_BasePrimitiveType_timestamp = Core.Name "timestamp"
-
-data DataType =
-  -- | Represent array data type.
-  DataTypeArray ArrayType |
-  -- | Base class for all primitive types DataType.
-  DataTypeBase BasePrimitiveType |
-  -- | A decimal data type.
-  DataTypeDecimal DecimalType |
-  -- | Data type representing a map type.
-  DataTypeMap MapType |
-  -- | Struct type which contains one or more columns.
-  DataTypeStruct StructType
-  deriving (Eq, Ord, Read, Show)
-
-_DataType = Core.Name "hydra.delta.parquet.DataType"
-
-_DataType_array = Core.Name "array"
-
-_DataType_base = Core.Name "base"
-
-_DataType_decimal = Core.Name "decimal"
-
-_DataType_map = Core.Name "map"
-
-_DataType_struct = Core.Name "struct"
-
--- | A decimal data type with fixed precision (the maximum number of digits) and scale (the number of digits on right side of dot). The precision can be up to 38, scale can also be up to 38 (less or equal to precision).
-data DecimalType =
-  DecimalType {
-    decimalTypePrecision :: Int,
-    decimalTypeScale :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_DecimalType = Core.Name "hydra.delta.parquet.DecimalType"
-
-_DecimalType_precision = Core.Name "precision"
-
-_DecimalType_scale = Core.Name "scale"
-
--- | Data type representing a map type.
-data MapType =
-  MapType {
-    mapTypeKeyType :: DataType,
-    mapTypeValueType :: DataType,
-    mapTypeValueContainsNull :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_MapType = Core.Name "hydra.delta.parquet.MapType"
-
-_MapType_keyType = Core.Name "keyType"
-
-_MapType_valueType = Core.Name "valueType"
-
-_MapType_valueContainsNull = Core.Name "valueContainsNull"
-
--- | Represents a subfield of StructType with additional properties and metadata.
-data StructField =
-  StructField {
-    structFieldName :: String,
-    structFieldDataType :: DataType,
-    structFieldNullable :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_StructField = Core.Name "hydra.delta.parquet.StructField"
-
-_StructField_name = Core.Name "name"
-
-_StructField_dataType = Core.Name "dataType"
-
-_StructField_nullable = Core.Name "nullable"
-
--- | Struct type which contains one or more columns.
-data StructType =
-  StructType {
-    structTypeFields :: [StructField]}
-  deriving (Eq, Ord, Read, Show)
-
-_StructType = Core.Name "hydra.delta.parquet.StructType"
-
-_StructType_fields = Core.Name "fields"
diff --git a/src/main/haskell/Hydra/Demos/AvroBicoder.hs b/src/main/haskell/Hydra/Demos/AvroBicoder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/AvroBicoder.hs
+++ /dev/null
@@ -1,324 +0,0 @@
--- | Demo for the bidirectional Avro coder.
---
--- Exercises:
---   1. Forward: Avro schema + JSON data -> Hydra types + terms (with round-trip)
---   2. Reverse: Hydra types -> Avro schema -> JSON
---   3. Round-trip: Avro schema -> Hydra -> Avro schema (structural comparison)
---   4. Schema codec: .avsc file -> parse -> encode -> compare
---   5. Avro to property graph: Avro schema + JSON data -> GraphSON
-module Hydra.Demos.AvroBicoder (
-  -- * Top-level demo runners
-  runAllDemos,
-  runForwardDemo,
-  runReverseDemo,
-  runRoundTripDemo,
-  runSchemaCodecDemo,
-  runPropertyGraphDemo,
-) where
-
-import Hydra.Kernel
-import qualified Hydra.Core as Core
-import qualified Hydra.Avro.Schema as Avro
-import qualified Hydra.Json.Model as Json
-import qualified Hydra.Avro.Coder as AvroCoder
-import qualified Hydra.Avro.Encoder as Encoder
-import qualified Hydra.Avro.Environment as AvroEnv
-import qualified Hydra.Avro.SchemaJson as SchemaJson
-import qualified Hydra.Json.Parser as JsonParser
-import qualified Hydra.Json.Writer as JsonWriter
-import Hydra.Parsing (ParseResult(..), ParseSuccess(..), ParseError(..))
-import qualified Hydra.Show.Errors as ShowError
-import Hydra.Tools.AvroWorkflows (propertyGraphGraphsonLastMile, transformAvroJsonDirectory)
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Util as Util
-import qualified Hydra.Json.Writer as JsonWriter
-
-import qualified Data.Map as M
-import qualified Data.List as L
-import System.Directory
-import System.FilePath
-
-
--- | Run all demos in sequence
-runAllDemos :: IO ()
-runAllDemos = do
-  putStrLn "============================================"
-  putStrLn "Hydra Avro Bidirectional Coder Demo"
-  putStrLn "============================================"
-  putStrLn ""
-
-  runForwardDemo
-  putStrLn ""
-  runReverseDemo
-  putStrLn ""
-  runRoundTripDemo
-  putStrLn ""
-  runSchemaCodecDemo
-  putStrLn ""
-  runPropertyGraphDemo
-
-  putStrLn ""
-  putStrLn "============================================"
-  putStrLn "All demos completed successfully."
-  putStrLn "============================================"
-
-
--- | Demo 1: Forward pipeline (Avro schema + JSON -> Hydra type + term)
---
--- Reads a real .avsc schema and example JSON data, converts to Hydra types and terms
--- using the forward adapter, then displays the results.
-runForwardDemo :: IO ()
-runForwardDemo = do
-  putStrLn "--- Demo 1: Forward pipeline (Avro -> Hydra) ---"
-  pwd <- getCurrentDirectory
-  let cx = emptyContext
-
-  -- Load the Review schema
-  let schemaPath = combine pwd "src/test/avro/moviedemo/Review.avsc"
-  schemaStr <- readFile schemaPath
-  case parseJson schemaStr of
-    Left e -> putStrLn $ "  Parse error: " ++ e
-    Right schemaJson -> case SchemaJson.decodeSchema cx schemaJson of
-      Left e -> putStrLn $ "  Schema decode error: " ++ show e
-      Right avroSchema -> do
-        putStrLn "  Loaded: Review.avsc"
-        case avroSchema of
-          Avro.SchemaNamed named -> do
-            putStrLn $ "  Schema name: " ++ Avro.namedName named
-            putStrLn $ "  Schema namespace: " ++ show (Avro.namedNamespace named)
-          _ -> return ()
-
-        -- Create forward adapter
-        case AvroCoder.avroHydraAdapter cx avroSchema AvroCoder.emptyAvroEnvironment of
-          Left e -> putStrLn $ "  Adapter error: " ++ show e
-          Right (adapter, _env) -> do
-            putStrLn $ "  Forward adapter created (lossy: " ++ show (Coders.adapterIsLossy adapter) ++ ")"
-
-            -- Load and convert example data
-            let dataPath = combine pwd "src/test/json/moviedemo/exampleReview.json"
-            dataStr <- readFile dataPath
-            case parseJson dataStr of
-              Left e -> putStrLn $ "  Data parse error: " ++ e
-              Right dataJson -> do
-                case Coders.coderEncode (Coders.adapterCoder adapter) cx dataJson of
-                  Left e -> putStrLn $ "  Encode error: " ++ show e
-                  Right hydraTerm -> do
-                    putStrLn "  JSON data -> Hydra term: OK"
-                    -- Decode back to JSON to verify round-trip
-                    case Coders.coderDecode (Coders.adapterCoder adapter) cx hydraTerm of
-                      Left e -> putStrLn $ "  Decode error: " ++ show e
-                      Right jsonResult -> do
-                        let resultStr = JsonWriter.printJson jsonResult
-                        putStrLn $ "  Term -> JSON round-trip: OK (" ++ show (length resultStr) ++ " chars)"
-                        -- Write output
-                        let outDir = "/tmp/hydra-avro-demo/forward"
-                        createDirectoryIfMissing True outDir
-                        writeFile (combine outDir "review-roundtrip.json") resultStr
-                        putStrLn $ "  Output: " ++ combine outDir "review-roundtrip.json"
-
-
--- | Demo 2: Reverse pipeline (Hydra types -> Avro schema)
---
--- Defines Hydra types programmatically and encodes them as Avro schemas,
--- then serializes the schemas to JSON.
-runReverseDemo :: IO ()
-runReverseDemo = do
-  putStrLn "--- Demo 2: Reverse pipeline (Hydra -> Avro schema) ---"
-  let cx = emptyContext
-
-  -- Define a small type graph: Person with Address
-  let addressName = Core.Name "com.example.Address"
-  let personName = Core.Name "com.example.Person"
-  let addressType = Core.TypeRecord [
-        Core.FieldType (Core.Name "street") (Core.TypeLiteral (Core.LiteralTypeString)),
-        Core.FieldType (Core.Name "city") (Core.TypeLiteral (Core.LiteralTypeString)),
-        Core.FieldType (Core.Name "zipCode") (Core.TypeLiteral (Core.LiteralTypeString))]
-  let personType = Core.TypeRecord [
-        Core.FieldType (Core.Name "name") (Core.TypeLiteral (Core.LiteralTypeString)),
-        Core.FieldType (Core.Name "age") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-        Core.FieldType (Core.Name "email") (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeString))),
-        Core.FieldType (Core.Name "address") (Core.TypeVariable addressName),
-        Core.FieldType (Core.Name "tags") (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeString)))]
-  let typeMap = M.fromList [(addressName, addressType), (personName, personType)]
-
-  case Encoder.encodeType cx typeMap personName of
-    Left err -> putStrLn $ "  ERROR: " ++ ShowError.error err
-    Right adapter -> do
-      let avroSchema = Coders.adapterTarget adapter
-      let json = SchemaJson.encodeSchema avroSchema
-      let jsonStr = JsonWriter.printJson json
-      putStrLn "  Hydra type 'com.example.Person' encoded as Avro schema:"
-      putStrLn $ "  " ++ jsonStr
-      -- Write to file
-      let outDir = "/tmp/hydra-avro-demo/reverse"
-      createDirectoryIfMissing True outDir
-      let outFile = combine outDir "Person.avsc"
-      writeFile outFile jsonStr
-      putStrLn $ "  Written to: " ++ outFile
-
-      -- Also encode a term and show the JSON
-      let personTerm = Core.TermRecord $ Core.Record personName [
-            Core.Field (Core.Name "name") (Core.TermLiteral (Core.LiteralString "Alice Smith")),
-            Core.Field (Core.Name "age") (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30))),
-            Core.Field (Core.Name "email") (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "alice@example.com")))),
-            Core.Field (Core.Name "address") (Core.TermRecord $ Core.Record addressName [
-              Core.Field (Core.Name "street") (Core.TermLiteral (Core.LiteralString "123 Main St")),
-              Core.Field (Core.Name "city") (Core.TermLiteral (Core.LiteralString "Springfield")),
-              Core.Field (Core.Name "zipCode") (Core.TermLiteral (Core.LiteralString "62701"))]),
-            Core.Field (Core.Name "tags") (Core.TermList [
-              Core.TermLiteral (Core.LiteralString "engineer"),
-              Core.TermLiteral (Core.LiteralString "haskell")])]
-      case Coders.coderEncode (Coders.adapterCoder adapter) cx personTerm of
-        Left err -> putStrLn $ "  Term encode ERROR: " ++ ShowError.error err
-        Right jsonVal -> do
-          let termJsonStr = JsonWriter.printJson jsonVal
-          putStrLn $ "  Term encoded as JSON: " ++ termJsonStr
-          let termFile = combine outDir "person-data.json"
-          writeFile termFile termJsonStr
-          putStrLn $ "  Written to: " ++ termFile
-
-
--- | Demo 3: Round-trip (Avro -> Hydra -> Avro)
---
--- Parses a real .avsc schema, converts to Hydra types via the forward adapter,
--- then converts back to an Avro schema via the reverse encoder, and compares.
-runRoundTripDemo :: IO ()
-runRoundTripDemo = do
-  putStrLn "--- Demo 3: Round-trip (Avro -> Hydra -> Avro) ---"
-  pwd <- getCurrentDirectory
-  let cx = emptyContext
-
-  -- Load the AirplaneInfo schema
-  let schemaPath = combine pwd "src/test/avro/aviationdemo/AirplaneInfo.avsc"
-  schemaStr <- readFile schemaPath
-  case parseJson schemaStr of
-    Left e -> putStrLn $ "  Parse error: " ++ e
-    Right schemaJson -> case SchemaJson.decodeSchema cx schemaJson of
-      Left e -> putStrLn $ "  Schema decode error: " ++ show e
-      Right avroSchema -> do
-        putStrLn $ "  Loaded: AirplaneInfo.avsc"
-
-        -- Forward: Avro -> Hydra
-        case AvroCoder.avroHydraAdapter cx avroSchema AvroCoder.emptyAvroEnvironment of
-          Left e -> putStrLn $ "  Forward adapter error: " ++ show e
-          Right (fwdAdapter, _env) -> do
-            let hydraType = Coders.adapterTarget fwdAdapter
-            putStrLn $ "  Forward: Avro schema -> Hydra type (ok)"
-
-            -- Reverse: Hydra -> Avro
-            let typeName = Core.Name "com.example.AirplaneInfo"
-            case Encoder.encodeType cx (M.singleton typeName hydraType) typeName of
-              Left e -> putStrLn $ "  Reverse adapter error: " ++ show e
-              Right revAdapter -> do
-                let revSchema = Coders.adapterTarget revAdapter
-                putStrLn $ "  Reverse: Hydra type -> Avro schema (ok)"
-
-                -- Compare: serialize both and check structure
-                let origJson = SchemaJson.encodeSchema avroSchema
-                let revJson = SchemaJson.encodeSchema revSchema
-                let origStr = JsonWriter.printJson origJson
-                let revStr = JsonWriter.printJson revJson
-
-                -- Write both for manual inspection
-                let outDir = "/tmp/hydra-avro-demo/roundtrip"
-                createDirectoryIfMissing True outDir
-                writeFile (combine outDir "original.json") origStr
-                writeFile (combine outDir "roundtripped.json") revStr
-                putStrLn $ "  Original schema:     " ++ show (length origStr) ++ " chars"
-                putStrLn $ "  Round-tripped schema: " ++ show (length revStr) ++ " chars"
-                putStrLn $ "  Output written to: " ++ outDir
-
-                -- Structural check: both should be named record schemas
-                case (avroSchema, revSchema) of
-                  (Avro.SchemaNamed origNamed, Avro.SchemaNamed revNamed) -> do
-                    putStrLn $ "  Original name: " ++ Avro.namedName origNamed
-                    putStrLn $ "  Round-trip name: " ++ Avro.namedName revNamed
-                    let origFieldCount = case Avro.namedType origNamed of
-                          Avro.NamedTypeRecord (Avro.Record fs) -> length fs
-                          _ -> 0
-                    let revFieldCount = case Avro.namedType revNamed of
-                          Avro.NamedTypeRecord (Avro.Record fs) -> length fs
-                          _ -> 0
-                    putStrLn $ "  Field count: " ++ show origFieldCount ++ " -> " ++ show revFieldCount
-                    if origFieldCount == revFieldCount
-                      then putStrLn "  PASS: field counts match"
-                      else putStrLn "  NOTE: field counts differ (expected if annotations affect structure)"
-                  _ -> putStrLn "  WARNING: schemas have different top-level structure"
-
-
--- | Demo 4: Schema string codec
---
--- Demonstrates the avroSchemaStringCoder: parse JSON string -> Schema -> JSON string
-runSchemaCodecDemo :: IO ()
-runSchemaCodecDemo = do
-  putStrLn "--- Demo 4: Schema string codec ---"
-  let cx = emptyContext
-  let coder = SchemaJson.avroSchemaStringCoder cx
-
-  -- Encode a schema to a JSON string
-  let schema = Avro.SchemaNamed $ Avro.Named {
-        Avro.namedName = "Greeting",
-        Avro.namedNamespace = Just "com.example",
-        Avro.namedAliases = Nothing,
-        Avro.namedDoc = Just "A simple greeting message",
-        Avro.namedType = Avro.NamedTypeRecord $ Avro.Record [
-          Avro.Field "message" (Just "The greeting text") (Avro.SchemaPrimitive Avro.PrimitiveString) Nothing Nothing Nothing M.empty,
-          Avro.Field "timestamp" Nothing (Avro.SchemaPrimitive Avro.PrimitiveLong) Nothing Nothing Nothing M.empty],
-        Avro.namedAnnotations = M.empty}
-
-  case Coders.coderEncode coder cx schema of
-    Left e -> putStrLn $ "  Encode error: " ++ show e
-    Right jsonStr -> do
-      putStrLn $ "  Encoded: " ++ jsonStr
-      -- Decode it back
-      case Coders.coderDecode coder cx jsonStr of
-        Left e -> putStrLn $ "  Decode error: " ++ show e
-        Right decoded -> do
-          if decoded == schema
-            then putStrLn "  PASS: round-trip produces identical schema"
-            else putStrLn "  NOTE: round-trip produces structurally different schema (may differ in optional fields)"
-          -- Re-encode to verify
-          case Coders.coderEncode coder cx decoded of
-            Left e -> putStrLn $ "  Re-encode error: " ++ show e
-            Right jsonStr2 -> do
-              if jsonStr == jsonStr2
-                then putStrLn "  PASS: JSON string round-trips exactly"
-                else do
-                  putStrLn "  NOTE: JSON strings differ after re-encoding"
-                  putStrLn $ "  First:  " ++ jsonStr
-                  putStrLn $ "  Second: " ++ jsonStr2
-
-
--- | Demo 5: Avro to property graph (GraphSON)
---
--- Reads an Avro schema and JSON data, converts through the forward adapter,
--- extracts elements from @primaryKey annotations, builds a graph, then
--- transforms to a GraphSON property graph.
-runPropertyGraphDemo :: IO ()
-runPropertyGraphDemo = do
-  putStrLn "--- Demo 5: Avro to property graph (GraphSON) ---"
-  pwd <- getCurrentDirectory
-  let schemaPath = combine pwd "src/test/avro/moviedemo/Review.avsc"
-  let dataDir = combine pwd "src/test/json/moviedemo"
-  let outDir = "/tmp/hydra-avro-demo/graphson"
-  createDirectoryIfMissing True outDir
-  transformAvroJsonDirectory propertyGraphGraphsonLastMile schemaPath dataDir outDir
-  let outFile = combine outDir "exampleReview.jsonl"
-  exists <- doesFileExist outFile
-  if exists
-    then do
-      content <- readFile outFile
-      let lineCount = length (lines content)
-      putStrLn $ "  Generated " ++ show lineCount ++ " GraphSON vertices"
-      putStrLn $ "  Output: " ++ outFile
-      putStrLn "  First 3 vertices:"
-      mapM_ (\l -> putStrLn $ "    " ++ take 120 l ++ if length l > 120 then "..." else "") (take 3 $ lines content)
-    else putStrLn "  ERROR: output file not generated"
-
-
--- Helpers
-
-parseJson :: String -> Either String Json.Value
-parseJson s = case JsonParser.parseJson s of
-  ParseResultSuccess success -> Right (parseSuccessValue success)
-  ParseResultFailure err -> Left (parseErrorMessage err)
diff --git a/src/main/haskell/Hydra/Demos/AvroToPropertyGraphs.hs b/src/main/haskell/Hydra/Demos/AvroToPropertyGraphs.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/AvroToPropertyGraphs.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Hydra.Demos.AvroToPropertyGraphs where
-
-import Hydra.Kernel
-import Hydra.Workflow
-import Hydra.Tools.AvroWorkflows
-
-import qualified System.FilePath as FP
-import System.Directory
-
-
--- | Last mile which transforms a graph into JSON. See the README for usage.
-transformAvroJsonToPg :: LastMile x -> FilePath -> FilePath -> FilePath -> IO ()
-transformAvroJsonToPg lastMile schemaFile dataDir outDir = do
-  pwd <- getCurrentDirectory
-  executeAvroTransformWorkflow lastMile $ TransformWorkflow "airplane info"
-    (SchemaSpecFile $ FP.combine pwd schemaFile) (FP.combine pwd dataDir) outDir
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Demo.hs b/src/main/haskell/Hydra/Demos/Genpg/Demo.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Demo.hs
+++ /dev/null
@@ -1,103 +0,0 @@
-module Hydra.Demos.GenPG.Demo where
-
-import Hydra.Kernel
-import qualified Hydra.Show.Errors as ShowError
-import Hydra.Demos.GenPG.Examples.Sales.DatabaseSchema
-import Hydra.Demos.GenPG.Examples.Sales.GraphSchema
-import Hydra.Demos.GenPG.Examples.Sales.Mapping
-import Hydra.Demos.GenPG.Examples.Health.DatabaseSchema
-import Hydra.Demos.GenPG.Examples.Health.GraphSchema
-import Hydra.Demos.GenPG.Examples.Health.Mapping
-import Hydra.Dsl.Pg.Mappings
-import Hydra.Lib.Literals
-import Hydra.Pg.Graphson.Utils
-import qualified Hydra.Demos.Genpg.Transform as Transform
-import Hydra.Pg.Utils (lazyGraphToElements)
-import Hydra.Sources.Kernel.Types.Core
-import qualified Hydra.Json.Writer as JsonWriter
-import qualified Hydra.Pg.Model as Pg
-import qualified Hydra.Tabular as Tab
-
-import qualified Control.Monad as CM
-import qualified Data.List as L
-import qualified Data.Map as M
-import System.IO (hFlush, stdout)
-
-
-generateSalesGraphSON :: IO ()
-generateSalesGraphSON = generateGraphSON
-  "demos/genpg/data/sources/sales"
-  salesTableSchemas
-  salesGraph
-  "demos/genpg/output/sales.jsonl"
-
-generateHealthGraphSON :: IO ()
-generateHealthGraphSON = generateGraphSON
-  "demos/genpg/data/sources/health"
-  healthTableSchemas
-  healthGraph
-  "demos/genpg/output/health.jsonl"
-
-generateGraphSON :: FilePath -> [TableType] -> Pg.LazyGraph Term -> FilePath -> IO ()
-generateGraphSON sourceRoot tableSchemas graphMapping outputPath = do
-  log $ "Reading CSV files from " ++ sourceRoot ++ "/"
-  log $ "  Tables: " ++ L.intercalate ", " (fmap (unRelationName . tableTypeName) tableSchemas)
-  g <- transformTables sourceRoot tableSchemas graphMapping
-  let els = lazyGraphToElements g
-  let (vertices, edges) = L.partition Transform.elementIsVertex els
-  log $ "Transforming to property graph..."
-  log $ "  Vertices: " ++ show (L.length vertices)
-  log $ "  Edges: " ++ show (L.length edges)
-  log $ "Writing GraphSON to " ++ outputPath
-  jsonResult <- case pgElementsToGraphson encodeTermValue els of
-    Left ic -> fail (ShowError.error ic)
-    Right v -> return v
-  writeFile outputPath (jsonValuesToString jsonResult)
-  log $ "Done. Output written to " ++ outputPath
-  where
-    log msg = putStrLn msg >> hFlush stdout
-    jsonValuesToString vals = L.intercalate "\n" (fmap JsonWriter.printJson vals) ++ "\n"
-    unRelationName (RelationName n) = n
-
-
---------------------------------------------------------------------------------
--- Table transformation (I/O)
-
--- | Transform a table by reading from a file and applying vertex/edge specifications
-transformTable :: TableType -> FilePath -> [Pg.Vertex Term] -> [Pg.Edge Term] -> IO ([Pg.Vertex Term], [Pg.Edge Term])
-transformTable tableType@(TableType (RelationName tableName) _) path vspecs especs = do
-    (Table _ rows) <- decodeTableIo tableType path
-    case Transform.transformTableRows emptyContext hydraCoreGraph vspecs especs tableType rows of
-      Left ic -> fail $ "Error transforming " ++ tableName ++ ": " ++ ShowError.error ic
-      Right v -> return v
-
--- | Transform multiple tables according to a graph mapping specification
-transformTables :: FilePath -> [TableType] -> Pg.LazyGraph Term -> IO (Pg.LazyGraph Term)
-transformTables fileRoot tableTypes spec = do
-    transform <- case (Transform.elementSpecsByTable spec) of
-      Left err -> fail $ "Error in mapping specification: " ++ err
-      Right t -> return t
-    pairs <- CM.mapM forTable $ M.toList transform
-    let (vertices, edges) = L.foldl Transform.concatPairs ([], []) pairs
-    return $ Transform.makeLazyGraph vertices edges
-  where
-    forTable (tname, (vspecs, especs)) = case M.lookup (RelationName tname) tblTypesByName of
-        Nothing -> fail $ "Table specified in mapping does not exist: " ++ tname
-        Just tableType -> transformTable tableType path vspecs especs
-      where
-        path = fileRoot ++ "/" ++ tname
-    tblTypesByName = Transform.tableTypesByName tableTypes
-
-
---------------------------------------------------------------------------------
--- Table reading
-
-decodeTableIo :: TableType -> FilePath -> IO (Table Term)
-decodeTableIo tableType path = do
-    rawLines <- fmap lines $ readFile path
-    table <- case Transform.parseTableLines True rawLines of
-      Left err -> fail $ "CSV read error in " ++ show path ++ ": " ++ err
-      Right t -> return t
-    case Transform.decodeTable tableType table of
-      Left err -> fail err
-      Right t -> return t
diff --git a/src/main/haskell/Hydra/Demos/Genpg/ExampleDatabaseSchema.hs b/src/main/haskell/Hydra/Demos/Genpg/ExampleDatabaseSchema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/ExampleDatabaseSchema.hs
+++ /dev/null
@@ -1,111 +0,0 @@
-module Hydra.Demos.GenPG.ExampleDatabaseSchema where
-
-import Hydra.Tabular (TableType)
-import Hydra.Dsl.Meta.Tabular (tableType, columnType)
-import Hydra.Dsl.Types (binary, boolean, float32, float64, int32, int64, string)
-
-employeesTableType :: TableType
-employeesTableType = tableType "employees.csv" [
-  columnType "employee_id" int32,
-  columnType "first_name" string,
-  columnType "last_name" string,
-  columnType "email" string,
-  columnType "hire_date" string,
-  columnType "manager_id" int32,
-  columnType "department_id" int32,
-  columnType "management_since_date" string,
-  columnType "department_join_date" string,
-  columnType "department_role" string]
-
-departmentsTableType :: TableType
-departmentsTableType = tableType "departments.csv" [
-  columnType "department_id" int32,
-  columnType "department_name" string,
-  columnType "parent_department_id" int32,
-  columnType "parent_department_since" string]
-
-customersTableType :: TableType
-customersTableType = tableType "customers.csv" [
-  columnType "customer_id" int32,
-  columnType "company_name" string,
-  columnType "contact_name" string,
-  columnType "email" string,
-  columnType "phone" string]
-
-productsTableType :: TableType
-productsTableType = tableType "products.csv" [
-  columnType "product_id" int32,
-  columnType "product_name" string,
-  columnType "price" float64,
-  columnType "category_name" string,
-  columnType "since_date" string,
-  columnType "is_primary" boolean]
-
-salesTableType :: TableType
-salesTableType = tableType "sales.csv" [
-  columnType "sale_id" int32,
-  columnType "employee_id" int32,
-  columnType "customer_id" int32,
-  columnType "sale_date" string,
-  columnType "total_amount" float64,
-  columnType "commission_rate" float64,
-  columnType "sales_channel" string,
-  columnType "payment_method" string,
-  columnType "satisfaction_rating" int32,
-  columnType "is_repeat_customer" boolean]
-
-saleItemsTableType :: TableType
-saleItemsTableType = tableType "sale_items.csv" [
-  columnType "sale_item_id" int32,
-  columnType "sale_id" int32,
-  columnType "product_id" int32,
-  columnType "quantity" int32,
-  columnType "item_price" float64,
-  columnType "item_order" int32,
-  columnType "discount_applied" float64,
-  columnType "warranty_period" int32]
-
-callsTableType :: TableType
-callsTableType = tableType "calls.csv" [
-  columnType "id" int32,
-  columnType "customer_id" int32,
-  columnType "employee_id" int32,
-  columnType "interaction_date" string,
-  columnType "notes" string,
-  columnType "duration_minutes" int32,
-  columnType "follow_up_required" boolean,
-  columnType "customer_initiated" boolean]
-
-emailsTableType :: TableType
-emailsTableType = tableType "emails.csv" [
-  columnType "id" int32,
-  columnType "customer_id" int32,
-  columnType "employee_id" int32,
-  columnType "interaction_date" string,
-  columnType "notes" string,
-  columnType "duration_minutes" int32,
-  columnType "follow_up_required" boolean,
-  columnType "customer_initiated" boolean]
-
-meetingsTableType :: TableType
-meetingsTableType = tableType "meetings.csv" [
-  columnType "id" int32,
-  columnType "customer_id" int32,
-  columnType "employee_id" int32,
-  columnType "interaction_date" string,
-  columnType "notes" string,
-  columnType "duration_minutes" int32,
-  columnType "follow_up_required" boolean,
-  columnType "customer_initiated" boolean]
-
-salesTableSchemas :: [TableType]
-salesTableSchemas = [
-  employeesTableType,
-  departmentsTableType,
-  customersTableType,
-  productsTableType,
-  salesTableType,
-  saleItemsTableType,
-  callsTableType,
-  emailsTableType,
-  meetingsTableType]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/ExampleGraphSchema.hs b/src/main/haskell/Hydra/Demos/Genpg/ExampleGraphSchema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/ExampleGraphSchema.hs
+++ /dev/null
@@ -1,110 +0,0 @@
-module Hydra.Demos.GenPG.ExampleGraphSchema where
-
-import Hydra.Dsl.Pg.Schemas (propertyType, required, schema, simpleEdgeType, vertexType)
-import Hydra.Dsl.Types (binary, boolean, float32, float64, int32, int64, string)
-
-dateType = string
-decimalType = float64
-
--- Vertex labels -----------------------
-
-employeeVertexLabel = "Employee"
-departmentVertexLabel = "Department"
-customerVertexLabel = "Customer"
-productVertexLabel = "Product"
-saleVertexLabel = "Sale"
-saleItemVertexLabel = "SaleItem"
-customerInteractionVertexLabel = "CustomerInteraction"
-
--- Edge labels -------------------------
-
-managesEdgeLabel = "manages"
-belongsToEdgeLabel = "belongsTo"
-parentDepartmentEdgeLabel = "parentDepartment"
-soldEdgeLabel = "sold"
-purchasedEdgeLabel = "purchased"
-includesEdgeLabel = "includes"
-containsProductEdgeLabel = "containsProduct"
-employeeEdgeLabel = "employee"
-customerEdgeLabel = "customer"
-
--- Interaction types -------------------
-
-callInteractionType = "Call"
-emailInteractionType = "Email"
-meetingInteractionType = "Meeting"
-
--- Graph Schema ------------------------
-
-salesGraphSchema = schema vertexTypes edgeTypes
-  where
-    vertexTypes = [
-      vertexType employeeVertexLabel int32 [
-        required $ propertyType "firstName" string,
-        required $ propertyType "lastName" string,
-        required $ propertyType "email" string,
-        propertyType "hireDate" dateType],
-
-      vertexType departmentVertexLabel int32 [
-        required $ propertyType "name" string],
-
-      vertexType customerVertexLabel int32 [
-        required $ propertyType "companyName" string,
-        propertyType "contactName" string,
-        propertyType "email" string,
-        propertyType "phone" string],
-
-      vertexType productVertexLabel int32 [
-        required $ propertyType "name" string,
-        propertyType "price" decimalType],
-
-      vertexType saleVertexLabel int32 [
-        required $ propertyType "saleDate" dateType,
-        propertyType "totalAmount" decimalType],
-
-      vertexType saleItemVertexLabel int32 [
-        propertyType "quantity" int32,
-        propertyType "itemPrice" decimalType],
-
-      vertexType customerInteractionVertexLabel string [
-        required $ propertyType "interactionDate" dateType,
-        required $ propertyType "interactionType" string,
-        propertyType "notes" string,
-        propertyType "durationMinutes" int32,
-        propertyType "followUpRequired" boolean,
-        propertyType "customerInitiated" boolean]]
-
-    edgeTypes = [
-      simpleEdgeType managesEdgeLabel employeeVertexLabel employeeVertexLabel [
-        propertyType "sinceDate" dateType],
-
-      simpleEdgeType belongsToEdgeLabel employeeVertexLabel departmentVertexLabel [
-        required $ propertyType "joinDate" dateType,
-        propertyType "role" string],
-
-      simpleEdgeType parentDepartmentEdgeLabel departmentVertexLabel departmentVertexLabel [
-        propertyType "since" dateType],
-
-      simpleEdgeType "hasCategory" productVertexLabel "Category" [
-        propertyType "sinceDate" dateType,
-        required $ propertyType "isPrimary" boolean],
-
-      simpleEdgeType soldEdgeLabel employeeVertexLabel saleVertexLabel [
-        required $ propertyType "commissionRate" float64,
-        propertyType "salesChannel" string],
-
-      simpleEdgeType purchasedEdgeLabel customerVertexLabel saleVertexLabel [
-        required $ propertyType "paymentMethod" string,
-        propertyType "satisfactionRating" int32,
-        propertyType "isRepeatCustomer" boolean],
-
-      simpleEdgeType includesEdgeLabel saleVertexLabel saleItemVertexLabel [
-        required $ propertyType "itemOrder" int32,
-        propertyType "discountApplied" float64],
-
-      simpleEdgeType containsProductEdgeLabel saleItemVertexLabel productVertexLabel [
-        propertyType "warrantyPeriodYears" int32],
-
-      simpleEdgeType employeeEdgeLabel customerInteractionVertexLabel employeeVertexLabel [],
-
-      simpleEdgeType customerEdgeLabel customerInteractionVertexLabel customerVertexLabel []]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/ExampleMapping.hs b/src/main/haskell/Hydra/Demos/Genpg/ExampleMapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/ExampleMapping.hs
+++ /dev/null
@@ -1,128 +0,0 @@
-module Hydra.Demos.GenPG.ExampleMapping where
-
-import Hydra.Core (Term)
-import Hydra.Pg.Model (Edge, Vertex, LazyGraph)
-import Hydra.Formatting (decapitalize)
-import Hydra.Phantoms (TTerm)
-import Hydra.Dsl.Meta.Phantoms ((@@), constant, just, lambda, nothing, string, var)
-import Hydra.Dsl.Pg.Mappings (column, edge, edgeNoId, graph, property, vertex)
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-import Hydra.Demos.GenPG.ExampleGraphSchema
-
--- Helpers -----------------------
-
-labeledIntId :: String -> TTerm (r -> Maybe Int) -> TTerm (r -> String)
-labeledIntId itype iid = lambda "r" $ Maybes.map
-  (lambda "i" $ Strings.concat [
-    string $ decapitalize itype,
-    string "_",
-    Literals.showInt32 $ var "i"])
-  (iid @@ var "r")
-
-interactionVertex :: String -> String -> Vertex Term
-interactionVertex tableName itype = vertex tableName customerInteractionVertexLabel
-  (labeledIntId itype (column "id"))
-  [property "interactionType" $ constant $ just $ string itype,
-   property "interactionDate" $ column "interaction_date",
-   property "notes" $ column "notes",
-   property "durationMinutes" $ column "duration_minutes",
-   property "followUpRequired" $ column "follow_up_required",
-   property "customerInitiated" $ column "customer_initiated"]
-
-employeeEdge :: String -> String -> Edge Term
-employeeEdge tableName itype = edgeNoId tableName employeeEdgeLabel
-  (labeledIntId itype (column "id"))
-  (labeledIntId employeeVertexLabel $ column "employee_id")
-  []
-
-customerEdge :: String -> String -> Edge Term
-customerEdge tableName itype = edgeNoId tableName customerEdgeLabel
-  (labeledIntId itype (column "id"))
-  (labeledIntId customerVertexLabel $ column "customer_id")
-  []
-
--- Mapping -----------------------------
-
-salesGraph :: LazyGraph Term
-salesGraph = graph
-  -- Vertices
-  [vertex "employees.csv" employeeVertexLabel (labeledIntId employeeVertexLabel $ column "employee_id") [
-     property "firstName" $ column "first_name",
-     property "lastName" $ column "last_name",
-     property "email" $ column "email",
-     property "hireDate" $ column "hire_date"],
-
-   vertex "departments.csv" departmentVertexLabel (labeledIntId departmentVertexLabel $ column "department_id") [
-     property "name" $ column "department_name"],
-
-   vertex "customers.csv" customerVertexLabel (labeledIntId customerVertexLabel $ column "customer_id") [
-     property "companyName" $ column "company_name",
-     property "contactName" $ column "contact_name",
-     property "email" $ column "email",
-     property "phone" $ column "phone"],
-
-   vertex "products.csv" productVertexLabel (labeledIntId productVertexLabel $ column "product_id") [
-     property "name" $ column "product_name",
-     property "price" $ column "price"],
-
-   vertex "sales.csv" saleVertexLabel (labeledIntId saleVertexLabel $ column "sale_id") [
-     property "saleDate" $ column "sale_date",
-     property "totalAmount" $ column "total_amount"],
-
-   vertex "sale_items.csv" saleItemVertexLabel (labeledIntId saleItemVertexLabel $ column "sale_item_id") [
-     property "quantity" $ column "quantity",
-     property "itemPrice" $ column "item_price"],
-
-   interactionVertex "calls.csv" callInteractionType,
-   interactionVertex "emails.csv" emailInteractionType,
-   interactionVertex "meetings.csv" meetingInteractionType]
-
-  -- Edges
-  [edgeNoId "employees.csv" managesEdgeLabel
-     (labeledIntId employeeVertexLabel $ column "manager_id")
-     (labeledIntId employeeVertexLabel $ column "employee_id")
-     [property "sinceDate" $ column "management_since_date"],
-
-   edgeNoId "employees.csv" belongsToEdgeLabel
-     (labeledIntId employeeVertexLabel $ column "employee_id")
-     (labeledIntId departmentVertexLabel $ column "department_id")
-     [property "joinDate" $ column "department_join_date",
-      property "role" $ column "department_role"],
-
-   edgeNoId "departments.csv" parentDepartmentEdgeLabel
-     (labeledIntId departmentVertexLabel $ column "department_id")
-     (labeledIntId departmentVertexLabel $ column "parent_department_id")
-     [property "since" $ column "parent_department_since"],
-
-   edgeNoId "sales.csv" soldEdgeLabel
-     (labeledIntId employeeVertexLabel $ column "employee_id")
-     (labeledIntId saleVertexLabel $ column "sale_id")
-     [property "commissionRate" $ column "commission_rate",
-      property "salesChannel" $ column "sales_channel"],
-
-   edgeNoId "sales.csv" purchasedEdgeLabel
-     (labeledIntId customerVertexLabel $ column "customer_id")
-     (labeledIntId saleVertexLabel $ column "sale_id")
-     [property "paymentMethod" $ column "payment_method",
-      property "satisfactionRating" $ column "satisfaction_rating",
-      property "isRepeatCustomer" $ column "is_repeat_customer"],
-
-   edgeNoId "sale_items.csv" includesEdgeLabel
-     (labeledIntId saleVertexLabel $ column "sale_id")
-     (labeledIntId saleItemVertexLabel $ column "sale_item_id")
-     [property "itemOrder" $ column "item_order",
-      property "discountApplied" $ column "discount_applied"],
-
-   edgeNoId "sale_items.csv" containsProductEdgeLabel
-     (labeledIntId saleItemVertexLabel $ column "sale_item_id")
-     (labeledIntId productVertexLabel $ column "product_id")
-     [property "warrantyPeriodYears" $ column "warranty_period"],
-
-   employeeEdge "calls.csv" callInteractionType,
-   customerEdge "calls.csv" callInteractionType,
-   employeeEdge "emails.csv" emailInteractionType,
-   customerEdge "emails.csv" emailInteractionType,
-   employeeEdge "meetings.csv" meetingInteractionType,
-   customerEdge "meetings.csv" meetingInteractionType]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/DatabaseSchema.hs b/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/DatabaseSchema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/DatabaseSchema.hs
+++ /dev/null
@@ -1,136 +0,0 @@
-module Hydra.Demos.GenPG.Examples.Health.DatabaseSchema where
-
-import Hydra.Tabular
-import Hydra.Dsl.Meta.Tabular (tableType, columnType)
-import Hydra.Dsl.Types (string, int32, float64, boolean)
-
-appointmentsTable :: TableType
-appointmentsTable = tableType "appointments.csv" [
-  columnType "appointment_id" int32,
-  columnType "patient_id" int32,
-  columnType "doctor_id" int32,
-  columnType "appointment_date" string,
-  columnType "appointment_time" string,
-  columnType "duration_minutes" int32,
-  columnType "status" string,
-  columnType "room_number" string,
-  columnType "appointment_type" string,
-  columnType "follow_up_required" boolean,
-  columnType "notes" string]
-
-billingTable :: TableType
-billingTable = tableType "billing.csv" [
-  columnType "billing_id" int32,
-  columnType "patient_id" int32,
-  columnType "appointment_id" int32,
-  columnType "service_description" string,
-  columnType "date_billed" string,
-  columnType "amount" float64,
-  columnType "insurance_coverage" float64,
-  columnType "patient_responsibility" float64,
-  columnType "payment_status" string,
-  columnType "payment_date" string]
-
-doctorsTable :: TableType
-doctorsTable = tableType "doctors.csv" [
-  columnType "doctor_id" int32,
-  columnType "first_name" string,
-  columnType "last_name" string,
-  columnType "specialization" string,
-  columnType "email" string,
-  columnType "phone" string,
-  columnType "hire_date" string,
-  columnType "department_id" int32,
-  columnType "license_number" string,
-  columnType "is_resident" boolean,
-  columnType "supervisor_id" int32]
-
-medicalTestsTable :: TableType
-medicalTestsTable = tableType "medical_tests.csv" [
-  columnType "test_id" int32,
-  columnType "patient_id" int32,
-  columnType "doctor_id" int32,
-  columnType "test_name" string,
-  columnType "test_date" string,
-  columnType "result_date" string,
-  columnType "result_status" string,
-  columnType "department_id" int32,
-  columnType "technician_id" int32,
-  columnType "priority" string,
-  columnType "notes" string]
-
-patientsTable :: TableType
-patientsTable = tableType "patients.csv" [
-  columnType "patient_id" int32,
-  columnType "first_name" string,
-  columnType "last_name" string,
-  columnType "date_of_birth" string,
-  columnType "gender" string,
-  columnType "phone" string,
-  columnType "email" string,
-  columnType "address" string,
-  columnType "insurance_provider" string,
-  columnType "registration_date" string,
-  columnType "primary_doctor_id" int32]
-
-pharmacyTable :: TableType
-pharmacyTable = tableType "pharmacy.csv" [
-  columnType "pharmacy_id" int32,
-  columnType "pharmacy_name" string,
-  columnType "address" string,
-  columnType "phone" string,
-  columnType "email" string,
-  columnType "hours_of_operation" string,
-  columnType "is_hospital_affiliated" boolean,
-  columnType "manager_name" string]
-
-prescriptionsTable :: TableType
-prescriptionsTable = tableType "prescriptions.csv" [
-  columnType "prescription_id" int32,
-  columnType "patient_id" int32,
-  columnType "doctor_id" int32,
-  columnType "medication_name" string,
-  columnType "dosage" string,
-  columnType "frequency" string,
-  columnType "start_date" string,
-  columnType "end_date" string,
-  columnType "refill_count" int32,
-  columnType "pharmacy_id" int32,
-  columnType "is_controlled" boolean,
-  columnType "notes" string]
-
-techniciansTable :: TableType
-techniciansTable = tableType "technicians.csv" [
-  columnType "technician_id" int32,
-  columnType "first_name" string,
-  columnType "last_name" string,
-  columnType "specialization" string,
-  columnType "department_id" int32,
-  columnType "hire_date" string,
-  columnType "certification" string,
-  columnType "phone" string,
-  columnType "email" string,
-  columnType "supervisor_id" int32]
-
-departmentsTable :: TableType
-departmentsTable = tableType "departments.csv" [
-  columnType "department_id" int32,
-  columnType "department_name" string,
-  columnType "location" string,
-  columnType "head_doctor_id" int32,
-  columnType "founded_date" string,
-  columnType "budget" float64,
-  columnType "is_teaching" boolean,
-  columnType "max_capacity" int32]
-
-healthTableSchemas :: [TableType]
-healthTableSchemas = [
-  appointmentsTable,
-  billingTable,
-  doctorsTable,
-  medicalTestsTable,
-  patientsTable,
-  pharmacyTable,
-  prescriptionsTable,
-  techniciansTable,
-  departmentsTable]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/GraphSchema.hs b/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/GraphSchema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/GraphSchema.hs
+++ /dev/null
@@ -1,140 +0,0 @@
-module Hydra.Demos.GenPG.Examples.Health.GraphSchema where
-
-import Hydra.Dsl.Pg.Schemas (propertyType, required, schema, simpleEdgeType, vertexType)
-import Hydra.Dsl.Types (string, int32, float64, boolean)
-
--- Reusable types
-dateType = string
-timeType = string
-decimalType = float64
-
--- Vertex labels
-patientVertex = "Patient"
-doctorVertex = "Doctor"
-technicianVertex = "Technician"
-departmentVertex = "Department"
-appointmentVertex = "Appointment"
-medicalTestVertex = "MedicalTest"
-prescriptionVertex = "Prescription"
-pharmacyVertex = "Pharmacy"
-billingVertex = "Billing"
-
--- Edge labels
-supervisesEdge = "supervises"
-belongsToEdge = "belongsTo"
-referredByEdge = "referredBy"
-assignedToEdge = "assignedTo"
-conductedByEdge = "conductedBy"
-prescribedByEdge = "prescribedBy"
-filledByEdge = "filledBy"
-headOfEdge = "headOf"
-prescribedToEdge = "prescribedTo"
-patientEdge = "patient"
-appropriateForEdge = "appropriateFor"
-paymentForEdge = "paymentFor"
-
--- Schema
-healthGraphSchema = schema vertexTypes edgeTypes where
-  vertexTypes = [
-    vertexType patientVertex int32 [
-      required $ propertyType "firstName" string,
-      required $ propertyType "lastName" string,
-      propertyType "dateOfBirth" dateType,
-      propertyType "gender" string,
-      propertyType "phone" string,
-      propertyType "email" string,
-      propertyType "address" string,
-      propertyType "insuranceProvider" string,
-      propertyType "registrationDate" dateType],
-
-    vertexType doctorVertex int32 [
-      required $ propertyType "firstName" string,
-      required $ propertyType "lastName" string,
-      propertyType "specialization" string,
-      propertyType "email" string,
-      propertyType "phone" string,
-      propertyType "hireDate" dateType,
-      propertyType "licenseNumber" string,
-      propertyType "isResident" boolean],
-
-    vertexType technicianVertex int32 [
-      required $ propertyType "firstName" string,
-      required $ propertyType "lastName" string,
-      propertyType "specialization" string,
-      propertyType "hireDate" dateType,
-      propertyType "certification" string,
-      propertyType "phone" string,
-      propertyType "email" string],
-
-    vertexType departmentVertex int32 [
-      required $ propertyType "name" string,
-      propertyType "location" string,
-      propertyType "foundedDate" dateType,
-      propertyType "budget" decimalType,
-      propertyType "isTeaching" boolean,
-      propertyType "maxCapacity" int32],
-
-    vertexType appointmentVertex int32 [
-      required $ propertyType "appointmentDate" dateType,
-      propertyType "appointmentTime" timeType,
-      propertyType "durationMinutes" int32,
-      propertyType "status" string,
-      propertyType "roomNumber" string,
-      propertyType "appointmentType" string,
-      propertyType "followUpRequired" boolean,
-      propertyType "notes" string],
-
-    vertexType medicalTestVertex int32 [
-      required $ propertyType "testName" string,
-      propertyType "testDate" dateType,
-      propertyType "resultDate" dateType,
-      propertyType "resultStatus" string,
-      propertyType "priority" string,
-      propertyType "notes" string],
-
-    vertexType prescriptionVertex int32 [
-      required $ propertyType "medicationName" string,
-      propertyType "dosage" string,
-      propertyType "frequency" string,
-      propertyType "startDate" dateType,
-      propertyType "endDate" dateType,
-      propertyType "refillCount" int32,
-      propertyType "isControlled" boolean,
-      propertyType "notes" string],
-
-    vertexType pharmacyVertex int32 [
-      required $ propertyType "name" string,
-      propertyType "address" string,
-      propertyType "phone" string,
-      propertyType "email" string,
-      propertyType "hoursOfOperation" string,
-      propertyType "isHospitalAffiliated" boolean,
-      propertyType "managerName" string],
-
-    vertexType billingVertex int32 [
-      propertyType "serviceDescription" string,
-      propertyType "dateBilled" dateType,
-      propertyType "amount" decimalType,
-      propertyType "insuranceCoverage" decimalType,
-      propertyType "patientResponsibility" decimalType,
-      propertyType "paymentStatus" string,
-      propertyType "paymentDate" dateType]
-    ]
-
-  edgeTypes = [
-    simpleEdgeType supervisesEdge doctorVertex doctorVertex [],
-    simpleEdgeType supervisesEdge doctorVertex technicianVertex [],
-    simpleEdgeType belongsToEdge doctorVertex departmentVertex [],
-    simpleEdgeType belongsToEdge technicianVertex departmentVertex [],
-    simpleEdgeType headOfEdge doctorVertex departmentVertex [],
-    simpleEdgeType referredByEdge patientVertex doctorVertex [],
-    simpleEdgeType assignedToEdge appointmentVertex doctorVertex [],
-    simpleEdgeType patientEdge appointmentVertex patientVertex [],
-    simpleEdgeType conductedByEdge medicalTestVertex technicianVertex [],
-    simpleEdgeType assignedToEdge medicalTestVertex doctorVertex [],
-    simpleEdgeType patientEdge medicalTestVertex patientVertex [],
-    simpleEdgeType prescribedByEdge prescriptionVertex doctorVertex [],
-    simpleEdgeType prescribedToEdge prescriptionVertex patientVertex [],
-    simpleEdgeType filledByEdge prescriptionVertex pharmacyVertex [],
-    simpleEdgeType patientEdge billingVertex patientVertex [],
-    simpleEdgeType paymentForEdge billingVertex appointmentVertex []]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/Mapping.hs b/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Examples/Health/Mapping.hs
+++ /dev/null
@@ -1,191 +0,0 @@
-module Hydra.Demos.GenPG.Examples.Health.Mapping where
-
-import Hydra.Core (Term)
-import Hydra.Pg.Model (Vertex, Edge, LazyGraph)
-import Hydra.Formatting (decapitalize)
-import Hydra.Phantoms (TTerm)
-import Hydra.Dsl.Meta.Phantoms ((@@), constant, just, lambda, nothing, string, var)
-import Hydra.Dsl.Pg.Mappings (column, edgeNoId, graph, property, vertex)
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-import Hydra.Demos.GenPG.Examples.Health.GraphSchema
-
-labeledIntId :: String -> TTerm (r -> Maybe Int) -> TTerm (r -> String)
-labeledIntId itype iid = lambda "r" $ Maybes.map
-  (lambda "i" $ Strings.concat [
-    string $ decapitalize itype,
-    string "_",
-    Literals.showInt32 (var "i")])
-  (iid @@ var "r")
-
-healthGraph :: LazyGraph Term
-healthGraph = graph
-
-  -- Vertices
-  [ vertex "patients.csv" patientVertex (labeledIntId patientVertex $ column "patient_id") [
-      property "firstName" $ column "first_name",
-      property "lastName" $ column "last_name",
-      property "dateOfBirth" $ column "date_of_birth",
-      property "gender" $ column "gender",
-      property "phone" $ column "phone",
-      property "email" $ column "email",
-      property "address" $ column "address",
-      property "insuranceProvider" $ column "insurance_provider",
-      property "registrationDate" $ column "registration_date"],
-
-    vertex "doctors.csv" doctorVertex (labeledIntId doctorVertex $ column "doctor_id") [
-      property "firstName" $ column "first_name",
-      property "lastName" $ column "last_name",
-      property "specialization" $ column "specialization",
-      property "email" $ column "email",
-      property "phone" $ column "phone",
-      property "hireDate" $ column "hire_date",
-      property "licenseNumber" $ column "license_number",
-      property "isResident" $ column "is_resident"],
-
-    vertex "technicians.csv" technicianVertex (labeledIntId technicianVertex $ column "technician_id") [
-      property "firstName" $ column "first_name",
-      property "lastName" $ column "last_name",
-      property "specialization" $ column "specialization",
-      property "hireDate" $ column "hire_date",
-      property "certification" $ column "certification",
-      property "phone" $ column "phone",
-      property "email" $ column "email"],
-
-    vertex "departments.csv" departmentVertex (labeledIntId departmentVertex $ column "department_id") [
-      property "name" $ column "department_name",
-      property "location" $ column "location",
-      property "foundedDate" $ column "founded_date",
-      property "budget" $ column "budget",
-      property "isTeaching" $ column "is_teaching",
-      property "maxCapacity" $ column "max_capacity"],
-
-    vertex "appointments.csv" appointmentVertex (labeledIntId appointmentVertex $ column "appointment_id") [
-      property "appointmentDate" $ column "appointment_date",
-      property "appointmentTime" $ column "appointment_time",
-      property "durationMinutes" $ column "duration_minutes",
-      property "status" $ column "status",
-      property "roomNumber" $ column "room_number",
-      property "appointmentType" $ column "appointment_type",
-      property "followUpRequired" $ column "follow_up_required",
-      property "notes" $ column "notes"],
-
-    vertex "medical_tests.csv" medicalTestVertex (labeledIntId medicalTestVertex $ column "test_id") [
-      property "testName" $ column "test_name",
-      property "testDate" $ column "test_date",
-      property "resultDate" $ column "result_date",
-      property "resultStatus" $ column "result_status",
-      property "priority" $ column "priority",
-      property "notes" $ column "notes"],
-
-    vertex "prescriptions.csv" prescriptionVertex (labeledIntId prescriptionVertex $ column "prescription_id") [
-      property "medicationName" $ column "medication_name",
-      property "dosage" $ column "dosage",
-      property "frequency" $ column "frequency",
-      property "startDate" $ column "start_date",
-      property "endDate" $ column "end_date",
-      property "refillCount" $ column "refill_count",
-      property "isControlled" $ column "is_controlled",
-      property "notes" $ column "notes"],
-
-    vertex "pharmacy.csv" pharmacyVertex (labeledIntId pharmacyVertex $ column "pharmacy_id") [
-      property "name" $ column "pharmacy_name",
-      property "address" $ column "address",
-      property "phone" $ column "phone",
-      property "email" $ column "email",
-      property "hoursOfOperation" $ column "hours_of_operation",
-      property "isHospitalAffiliated" $ column "is_hospital_affiliated",
-      property "managerName" $ column "manager_name"],
-
-    vertex "billing.csv" billingVertex (labeledIntId billingVertex $ column "billing_id") [
-      property "serviceDescription" $ column "service_description",
-      property "dateBilled" $ column "date_billed",
-      property "amount" $ column "amount",
-      property "insuranceCoverage" $ column "insurance_coverage",
-      property "patientResponsibility" $ column "patient_responsibility",
-      property "paymentStatus" $ column "payment_status",
-      property "paymentDate" $ column "payment_date"]
-  ]
-
-  -- Edges
-  [ edgeNoId "doctors.csv" supervisesEdge
-      (labeledIntId doctorVertex $ column "supervisor_id")
-      (labeledIntId doctorVertex $ column "doctor_id")
-      [],
-
-    edgeNoId "technicians.csv" supervisesEdge
-      (labeledIntId doctorVertex $ column "supervisor_id")
-      (labeledIntId technicianVertex $ column "technician_id")
-      [],
-
-    edgeNoId "doctors.csv" belongsToEdge
-      (labeledIntId doctorVertex $ column "doctor_id")
-      (labeledIntId departmentVertex $ column "department_id")
-      [],
-
-    edgeNoId "technicians.csv" belongsToEdge
-      (labeledIntId technicianVertex $ column "technician_id")
-      (labeledIntId departmentVertex $ column "department_id")
-      [],
-
-    edgeNoId "departments.csv" headOfEdge
-      (labeledIntId doctorVertex $ column "head_doctor_id")
-      (labeledIntId departmentVertex $ column "department_id")
-      [],
-
-    edgeNoId "patients.csv" referredByEdge
-      (labeledIntId patientVertex $ column "patient_id")
-      (labeledIntId doctorVertex $ column "primary_doctor_id")
-      [],
-
-    edgeNoId "appointments.csv" assignedToEdge
-      (labeledIntId appointmentVertex $ column "appointment_id")
-      (labeledIntId doctorVertex $ column "doctor_id")
-      [],
-
-    edgeNoId "appointments.csv" patientEdge
-      (labeledIntId appointmentVertex $ column "appointment_id")
-      (labeledIntId patientVertex $ column "patient_id")
-      [],
-
-    edgeNoId "medical_tests.csv" assignedToEdge
-      (labeledIntId medicalTestVertex $ column "test_id")
-      (labeledIntId doctorVertex $ column "doctor_id")
-      [],
-
-    edgeNoId "medical_tests.csv" conductedByEdge
-      (labeledIntId medicalTestVertex $ column "test_id")
-      (labeledIntId technicianVertex $ column "technician_id")
-      [],
-
-    edgeNoId "medical_tests.csv" patientEdge
-      (labeledIntId medicalTestVertex $ column "test_id")
-      (labeledIntId patientVertex $ column "patient_id")
-      [],
-
-    edgeNoId "prescriptions.csv" prescribedByEdge
-      (labeledIntId prescriptionVertex $ column "prescription_id")
-      (labeledIntId doctorVertex $ column "doctor_id")
-      [],
-
-    edgeNoId "prescriptions.csv" prescribedToEdge
-      (labeledIntId prescriptionVertex $ column "prescription_id")
-      (labeledIntId patientVertex $ column "patient_id")
-      [],
-
-    edgeNoId "prescriptions.csv" filledByEdge
-      (labeledIntId prescriptionVertex $ column "prescription_id")
-      (labeledIntId pharmacyVertex $ column "pharmacy_id")
-      [],
-
-    edgeNoId "billing.csv" patientEdge
-      (labeledIntId billingVertex $ column "billing_id")
-      (labeledIntId patientVertex $ column "patient_id")
-      [],
-
-    edgeNoId "billing.csv" paymentForEdge
-      (labeledIntId billingVertex $ column "billing_id")
-      (labeledIntId appointmentVertex $ column "appointment_id")
-      []
-  ]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/DatabaseSchema.hs b/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/DatabaseSchema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/DatabaseSchema.hs
+++ /dev/null
@@ -1,111 +0,0 @@
-module Hydra.Demos.GenPG.Examples.Sales.DatabaseSchema where
-
-import Hydra.Tabular
-import Hydra.Dsl.Meta.Tabular (tableType, columnType)
-import Hydra.Dsl.Types (binary, boolean, float32, float64, int32, int64, string)
-
-employeesTableType :: TableType
-employeesTableType = tableType "employees.csv" [
-  columnType "employee_id" int32,
-  columnType "first_name" string,
-  columnType "last_name" string,
-  columnType "email" string,
-  columnType "hire_date" string,
-  columnType "manager_id" int32,
-  columnType "department_id" int32,
-  columnType "management_since_date" string,
-  columnType "department_join_date" string,
-  columnType "department_role" string]
-
-departmentsTableType :: TableType
-departmentsTableType = tableType "departments.csv" [
-  columnType "department_id" int32,
-  columnType "department_name" string,
-  columnType "parent_department_id" int32,
-  columnType "parent_department_since" string]
-
-customersTableType :: TableType
-customersTableType = tableType "customers.csv" [
-  columnType "customer_id" int32,
-  columnType "company_name" string,
-  columnType "contact_name" string,
-  columnType "email" string,
-  columnType "phone" string]
-
-productsTableType :: TableType
-productsTableType = tableType "products.csv" [
-  columnType "product_id" int32,
-  columnType "product_name" string,
-  columnType "price" float64,
-  columnType "category_name" string,
-  columnType "since_date" string,
-  columnType "is_primary" boolean]
-
-salesTableType :: TableType
-salesTableType = tableType "sales.csv" [
-  columnType "sale_id" int32,
-  columnType "employee_id" int32,
-  columnType "customer_id" int32,
-  columnType "sale_date" string,
-  columnType "total_amount" float64,
-  columnType "commission_rate" float64,
-  columnType "sales_channel" string,
-  columnType "payment_method" string,
-  columnType "satisfaction_rating" int32,
-  columnType "is_repeat_customer" boolean]
-
-saleItemsTableType :: TableType
-saleItemsTableType = tableType "sale_items.csv" [
-  columnType "sale_item_id" int32,
-  columnType "sale_id" int32,
-  columnType "product_id" int32,
-  columnType "quantity" int32,
-  columnType "item_price" float64,
-  columnType "item_order" int32,
-  columnType "discount_applied" float64,
-  columnType "warranty_period" int32]
-
-callsTableType :: TableType
-callsTableType = tableType "calls.csv" [
-  columnType "id" int32,
-  columnType "customer_id" int32,
-  columnType "employee_id" int32,
-  columnType "interaction_date" string,
-  columnType "notes" string,
-  columnType "duration_minutes" int32,
-  columnType "follow_up_required" boolean,
-  columnType "customer_initiated" boolean]
-
-emailsTableType :: TableType
-emailsTableType = tableType "emails.csv" [
-  columnType "id" int32,
-  columnType "customer_id" int32,
-  columnType "employee_id" int32,
-  columnType "interaction_date" string,
-  columnType "notes" string,
-  columnType "duration_minutes" int32,
-  columnType "follow_up_required" boolean,
-  columnType "customer_initiated" boolean]
-
-meetingsTableType :: TableType
-meetingsTableType = tableType "meetings.csv" [
-  columnType "id" int32,
-  columnType "customer_id" int32,
-  columnType "employee_id" int32,
-  columnType "interaction_date" string,
-  columnType "notes" string,
-  columnType "duration_minutes" int32,
-  columnType "follow_up_required" boolean,
-  columnType "customer_initiated" boolean]
-
-salesTableSchemas :: [TableType]
-salesTableSchemas = [
-  employeesTableType,
-  departmentsTableType,
-  customersTableType,
-  productsTableType,
-  salesTableType,
-  saleItemsTableType,
-  callsTableType,
-  emailsTableType,
-  meetingsTableType]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/GraphSchema.hs b/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/GraphSchema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/GraphSchema.hs
+++ /dev/null
@@ -1,110 +0,0 @@
-module Hydra.Demos.GenPG.Examples.Sales.GraphSchema where
-
-import Hydra.Dsl.Pg.Schemas (propertyType, required, schema, simpleEdgeType, vertexType)
-import Hydra.Dsl.Types (binary, boolean, float32, float64, int32, int64, string)
-
-dateType = string
-decimalType = float64
-
--- Vertex labels -----------------------
-
-employeeVertexLabel = "Employee"
-departmentVertexLabel = "Department"
-customerVertexLabel = "Customer"
-productVertexLabel = "Product"
-saleVertexLabel = "Sale"
-saleItemVertexLabel = "SaleItem"
-customerInteractionVertexLabel = "CustomerInteraction"
-
--- Edge labels -------------------------
-
-managesEdgeLabel = "manages"
-belongsToEdgeLabel = "belongsTo"
-parentDepartmentEdgeLabel = "parentDepartment"
-soldEdgeLabel = "sold"
-purchasedEdgeLabel = "purchased"
-includesEdgeLabel = "includes"
-containsProductEdgeLabel = "containsProduct"
-employeeEdgeLabel = "employee"
-customerEdgeLabel = "customer"
-
--- Interaction types -------------------
-
-callInteractionType = "Call"
-emailInteractionType = "Email"
-meetingInteractionType = "Meeting"
-
--- Graph Schema ------------------------
-
-salesGraphSchema = schema vertexTypes edgeTypes
-  where
-    vertexTypes = [
-      vertexType employeeVertexLabel int32 [
-        required $ propertyType "firstName" string,
-        required $ propertyType "lastName" string,
-        required $ propertyType "email" string,
-        propertyType "hireDate" dateType],
-
-      vertexType departmentVertexLabel int32 [
-        required $ propertyType "name" string],
-
-      vertexType customerVertexLabel int32 [
-        required $ propertyType "companyName" string,
-        propertyType "contactName" string,
-        propertyType "email" string,
-        propertyType "phone" string],
-
-      vertexType productVertexLabel int32 [
-        required $ propertyType "name" string,
-        propertyType "price" decimalType],
-
-      vertexType saleVertexLabel int32 [
-        required $ propertyType "saleDate" dateType,
-        propertyType "totalAmount" decimalType],
-
-      vertexType saleItemVertexLabel int32 [
-        propertyType "quantity" int32,
-        propertyType "itemPrice" decimalType],
-
-      vertexType customerInteractionVertexLabel string [
-        required $ propertyType "interactionDate" dateType,
-        required $ propertyType "interactionType" string,
-        propertyType "notes" string,
-        propertyType "durationMinutes" int32,
-        propertyType "followUpRequired" boolean,
-        propertyType "customerInitiated" boolean]]
-
-    edgeTypes = [
-      simpleEdgeType managesEdgeLabel employeeVertexLabel employeeVertexLabel [
-        propertyType "sinceDate" dateType],
-
-      simpleEdgeType belongsToEdgeLabel employeeVertexLabel departmentVertexLabel [
-        required $ propertyType "joinDate" dateType,
-        propertyType "role" string],
-
-      simpleEdgeType parentDepartmentEdgeLabel departmentVertexLabel departmentVertexLabel [
-        propertyType "since" dateType],
-
-      simpleEdgeType "hasCategory" productVertexLabel "Category" [
-        propertyType "sinceDate" dateType,
-        required $ propertyType "isPrimary" boolean],
-
-      simpleEdgeType soldEdgeLabel employeeVertexLabel saleVertexLabel [
-        required $ propertyType "commissionRate" float64,
-        propertyType "salesChannel" string],
-
-      simpleEdgeType purchasedEdgeLabel customerVertexLabel saleVertexLabel [
-        required $ propertyType "paymentMethod" string,
-        propertyType "satisfactionRating" int32,
-        propertyType "isRepeatCustomer" boolean],
-
-      simpleEdgeType includesEdgeLabel saleVertexLabel saleItemVertexLabel [
-        required $ propertyType "itemOrder" int32,
-        propertyType "discountApplied" float64],
-
-      simpleEdgeType containsProductEdgeLabel saleItemVertexLabel productVertexLabel [
-        propertyType "warrantyPeriodYears" int32],
-
-      simpleEdgeType employeeEdgeLabel customerInteractionVertexLabel employeeVertexLabel [],
-
-      simpleEdgeType customerEdgeLabel customerInteractionVertexLabel customerVertexLabel []]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/Mapping.hs b/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Examples/Sales/Mapping.hs
+++ /dev/null
@@ -1,128 +0,0 @@
-module Hydra.Demos.GenPG.Examples.Sales.Mapping where
-
-import Hydra.Core (Term)
-import Hydra.Pg.Model (Edge, LazyGraph, Vertex)
-import Hydra.Formatting (decapitalize)
-import Hydra.Phantoms (TTerm)
-import Hydra.Dsl.Meta.Phantoms ((@@), constant, just, lambda, nothing, string, var)
-import Hydra.Dsl.Pg.Mappings (column, edge, edgeNoId, graph, property, vertex)
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-import Hydra.Demos.GenPG.Examples.Sales.GraphSchema
-
--- Helpers -----------------------
-
-labeledIntId :: String -> TTerm (r -> Maybe Int) -> TTerm (r -> String)
-labeledIntId itype iid = lambda "r" $ Maybes.map
-  (lambda "i" $ Strings.concat [
-    string $ decapitalize itype,
-    string "_",
-    Literals.showInt32 $ var "i"])
-  (iid @@ var "r")
-
-interactionVertex :: String -> String -> Vertex Term
-interactionVertex tableName itype = vertex tableName customerInteractionVertexLabel
-  (labeledIntId itype (column "id"))
-  [property "interactionType" $ constant $ just $ string itype,
-   property "interactionDate" $ column "interaction_date",
-   property "notes" $ column "notes",
-   property "durationMinutes" $ column "duration_minutes",
-   property "followUpRequired" $ column "follow_up_required",
-   property "customerInitiated" $ column "customer_initiated"]
-
-employeeEdge :: String -> String -> Edge Term
-employeeEdge tableName itype = edgeNoId tableName employeeEdgeLabel
-  (labeledIntId itype (column "id"))
-  (labeledIntId employeeVertexLabel $ column "employee_id")
-  []
-
-customerEdge :: String -> String -> Edge Term
-customerEdge tableName itype = edgeNoId tableName customerEdgeLabel
-  (labeledIntId itype (column "id"))
-  (labeledIntId customerVertexLabel $ column "customer_id")
-  []
-
--- Mapping -----------------------------
-
-salesGraph :: LazyGraph Term
-salesGraph = graph
-  -- Vertices
-  [vertex "employees.csv" employeeVertexLabel (labeledIntId employeeVertexLabel $ column "employee_id") [
-     property "firstName" $ column "first_name",
-     property "lastName" $ column "last_name",
-     property "email" $ column "email",
-     property "hireDate" $ column "hire_date"],
-
-   vertex "departments.csv" departmentVertexLabel (labeledIntId departmentVertexLabel $ column "department_id") [
-     property "name" $ column "department_name"],
-
-   vertex "customers.csv" customerVertexLabel (labeledIntId customerVertexLabel $ column "customer_id") [
-     property "companyName" $ column "company_name",
-     property "contactName" $ column "contact_name",
-     property "email" $ column "email",
-     property "phone" $ column "phone"],
-
-   vertex "products.csv" productVertexLabel (labeledIntId productVertexLabel $ column "product_id") [
-     property "name" $ column "product_name",
-     property "price" $ column "price"],
-
-   vertex "sales.csv" saleVertexLabel (labeledIntId saleVertexLabel $ column "sale_id") [
-     property "saleDate" $ column "sale_date",
-     property "totalAmount" $ column "total_amount"],
-
-   vertex "sale_items.csv" saleItemVertexLabel (labeledIntId saleItemVertexLabel $ column "sale_item_id") [
-     property "quantity" $ column "quantity",
-     property "itemPrice" $ column "item_price"],
-
-   interactionVertex "calls.csv" callInteractionType,
-   interactionVertex "emails.csv" emailInteractionType,
-   interactionVertex "meetings.csv" meetingInteractionType]
-
-  -- Edges
-  [edgeNoId "employees.csv" managesEdgeLabel
-     (labeledIntId employeeVertexLabel $ column "manager_id")
-     (labeledIntId employeeVertexLabel $ column "employee_id")
-     [property "sinceDate" $ column "management_since_date"],
-
-   edgeNoId "employees.csv" belongsToEdgeLabel
-     (labeledIntId employeeVertexLabel $ column "employee_id")
-     (labeledIntId departmentVertexLabel $ column "department_id")
-     [property "joinDate" $ column "department_join_date",
-      property "role" $ column "department_role"],
-
-   edgeNoId "departments.csv" parentDepartmentEdgeLabel
-     (labeledIntId departmentVertexLabel $ column "department_id")
-     (labeledIntId departmentVertexLabel $ column "parent_department_id")
-     [property "since" $ column "parent_department_since"],
-
-   edgeNoId "sales.csv" soldEdgeLabel
-     (labeledIntId employeeVertexLabel $ column "employee_id")
-     (labeledIntId saleVertexLabel $ column "sale_id")
-     [property "commissionRate" $ column "commission_rate",
-      property "salesChannel" $ column "sales_channel"],
-
-   edgeNoId "sales.csv" purchasedEdgeLabel
-     (labeledIntId customerVertexLabel $ column "customer_id")
-     (labeledIntId saleVertexLabel $ column "sale_id")
-     [property "paymentMethod" $ column "payment_method",
-      property "satisfactionRating" $ column "satisfaction_rating",
-      property "isRepeatCustomer" $ column "is_repeat_customer"],
-
-   edgeNoId "sale_items.csv" includesEdgeLabel
-     (labeledIntId saleVertexLabel $ column "sale_id")
-     (labeledIntId saleItemVertexLabel $ column "sale_item_id")
-     [property "itemOrder" $ column "item_order",
-      property "discountApplied" $ column "discount_applied"],
-
-   edgeNoId "sale_items.csv" containsProductEdgeLabel
-     (labeledIntId saleItemVertexLabel $ column "sale_item_id")
-     (labeledIntId productVertexLabel $ column "product_id")
-     [property "warrantyPeriodYears" $ column "warranty_period"],
-
-   employeeEdge "calls.csv" callInteractionType,
-   customerEdge "calls.csv" callInteractionType,
-   employeeEdge "emails.csv" emailInteractionType,
-   customerEdge "emails.csv" emailInteractionType,
-   employeeEdge "meetings.csv" meetingInteractionType,
-   customerEdge "meetings.csv" meetingInteractionType]
diff --git a/src/main/haskell/Hydra/Demos/Genpg/GenerateJava.hs b/src/main/haskell/Hydra/Demos/Genpg/GenerateJava.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/GenerateJava.hs
+++ /dev/null
@@ -1,60 +0,0 @@
--- | Java code generation for the GenPG demo.
---
--- This module provides functions to generate all Java modules needed for
--- the GenPG demo, including:
---   - hydra.pg.model, hydra.pg.mapping
---   - hydra.pg.graphson.* (coder, construct, syntax, utils)
---   - hydra.encode.pg.*, hydra.decode.pg.*
---   - hydra.demos.genpg.transform
---   - hydra.demos.genpg.sales (sales database/graph schemas and mapping)
---   - hydra.demos.genpg.health (health database/graph schemas and mapping)
---
--- Usage from GHCI:
---   > import Hydra.Demos.GenPG.GenerateJava
---   > generateJavaModules
-
-module Hydra.Demos.GenPG.GenerateJava where
-
-import Hydra.ExtGeneration
-import Hydra.Sources.All (kernelModules)
-import Hydra.Sources.Ext (hydraExtModules, genpgModules)
-import Hydra.Demos.GenPG.Modules (salesModule, healthModule)
-import System.Directory (createDirectoryIfMissing)
-import System.IO (hFlush, stdout)
-
-
--- | Generate all Java modules for the GenPG demo.
---
--- This generates to demos/src/main/java:
---   - hydra.pg.* modules
---   - hydra.demos.genpg.transform
---   - hydra.demos.genpg.sales
---   - hydra.demos.genpg.health
-generateJavaModules :: IO ()
-generateJavaModules = do
-  let outputDir = "../../demos/src/main/java"
-  createDirectoryIfMissing True outputDir
-
-  putStrLn "=== Generate Java GenPG Modules ==="
-  putStrLn ""
-  putStrLn $ "Output directory: " ++ outputDir
-  putStrLn ""
-  putStrLn "Generating modules:"
-  putStrLn "  - hydra.pg.model"
-  putStrLn "  - hydra.pg.mapping"
-  putStrLn "  - hydra.pg.graphson.* (coder, construct, syntax, utils)"
-  putStrLn "  - hydra.encode.pg.*, hydra.decode.pg.*"
-  putStrLn "  - hydra.demos.genpg.transform"
-  putStrLn "  - hydra.demos.genpg.sales"
-  putStrLn "  - hydra.demos.genpg.health"
-  putStrLn ""
-  hFlush stdout
-
-  -- Universe includes kernel and hydra-ext modules for dependency resolution
-  -- We generate genpgModules plus the sales and health modules
-  let universeModules = kernelModules ++ hydraExtModules ++ [salesModule, healthModule]
-  let modulesToGenerate = genpgModules ++ [salesModule, healthModule]
-  writeJava outputDir universeModules modulesToGenerate
-
-  putStrLn ""
-  putStrLn "=== Done! ==="
diff --git a/src/main/haskell/Hydra/Demos/Genpg/GeneratePython.hs b/src/main/haskell/Hydra/Demos/Genpg/GeneratePython.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/GeneratePython.hs
+++ /dev/null
@@ -1,60 +0,0 @@
--- | Python code generation for the GenPG demo.
---
--- This module provides functions to generate all Python modules needed for
--- the GenPG demo, including:
---   - hydra.pg.model, hydra.pg.mapping
---   - hydra.pg.graphson.* (coder, construct, syntax, utils)
---   - hydra.encode.pg.*, hydra.decode.pg.*
---   - hydra.demos.genpg.transform
---   - hydra.demos.genpg.sales (sales database/graph schemas and mapping)
---   - hydra.demos.genpg.health (health database/graph schemas and mapping)
---
--- Usage from GHCI:
---   > import Hydra.Demos.GenPG.GeneratePython
---   > generatePythonModules
-
-module Hydra.Demos.GenPG.GeneratePython where
-
-import Hydra.ExtGeneration
-import Hydra.Sources.All (kernelModules)
-import Hydra.Sources.Ext (hydraExtModules, genpgModules)
-import Hydra.Demos.GenPG.Modules (salesModule, healthModule)
-import System.Directory (createDirectoryIfMissing)
-import System.IO (hFlush, stdout)
-
-
--- | Generate all Python modules for the GenPG demo.
---
--- This generates to demos/src/main/python:
---   - hydra.pg.* modules
---   - hydra.demos.genpg.transform
---   - hydra.demos.genpg.sales
---   - hydra.demos.genpg.health
-generatePythonModules :: IO ()
-generatePythonModules = do
-  let outputDir = "../../demos/src/main/python"
-  createDirectoryIfMissing True outputDir
-
-  putStrLn "=== Generate Python GenPG Modules ==="
-  putStrLn ""
-  putStrLn $ "Output directory: " ++ outputDir
-  putStrLn ""
-  putStrLn "Generating modules:"
-  putStrLn "  - hydra.pg.model"
-  putStrLn "  - hydra.pg.mapping"
-  putStrLn "  - hydra.pg.graphson.* (coder, construct, syntax, utils)"
-  putStrLn "  - hydra.encode.pg.*, hydra.decode.pg.*"
-  putStrLn "  - hydra.demos.genpg.transform"
-  putStrLn "  - hydra.demos.genpg.sales"
-  putStrLn "  - hydra.demos.genpg.health"
-  putStrLn ""
-  hFlush stdout
-
-  -- Universe includes kernel and hydra-ext modules for dependency resolution
-  -- We generate genpgModules plus the sales and health modules
-  let universeModules = kernelModules ++ hydraExtModules ++ [salesModule, healthModule]
-  let modulesToGenerate = genpgModules ++ [salesModule, healthModule]
-  writePython outputDir universeModules modulesToGenerate
-
-  putStrLn ""
-  putStrLn "=== Done! ==="
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Modules.hs b/src/main/haskell/Hydra/Demos/Genpg/Modules.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Modules.hs
+++ /dev/null
@@ -1,139 +0,0 @@
--- | Shared module definitions for the GenPG demo code generation.
---
--- This module defines the sales and health modules (as Hydra Modules with
--- Term-encoded schemas and mappings) that are shared by both the Python
--- and Java code generators.
-
-module Hydra.Demos.GenPG.Modules where
-
-import Hydra.Kernel
-import Hydra.Demos.GenPG.Examples.Sales.DatabaseSchema as Sales
-import Hydra.Demos.GenPG.Examples.Sales.GraphSchema as Sales
-import Hydra.Demos.GenPG.Examples.Sales.Mapping as Sales
-import Hydra.Demos.GenPG.Examples.Health.DatabaseSchema as Health
-import Hydra.Demos.GenPG.Examples.Health.GraphSchema as Health
-import Hydra.Demos.GenPG.Examples.Health.Mapping as Health
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Encode.Pg.Model as EncodePg
-import qualified Hydra.Encode.Tabular as EncodeTabular
-
-
--- | The sales module containing sales demo schemas and mapping.
-salesModule :: Module
-salesModule = Module {
-  moduleNamespace = salesNamespace,
-  moduleDefinitions = map bindingToDefinition [
-    -- salesDatabaseSchema: list[TableType]
-    Binding {
-      bindingName = Name "hydra.demos.genpg.sales.salesDatabaseSchema",
-      bindingTerm = TermList $ fmap EncodeTabular.tableType Sales.salesTableSchemas,
-      bindingTypeScheme = Just listTableTypeScheme
-    },
-    -- salesGraphSchema: GraphSchema[Type]
-    Binding {
-      bindingName = Name "hydra.demos.genpg.sales.salesGraphSchema",
-      bindingTerm = EncodePg.graphSchema EncodeCore.type_ Sales.salesGraphSchema,
-      bindingTypeScheme = Just graphSchemaTypeScheme
-    },
-    -- salesMapping: LazyGraph[Term]
-    Binding {
-      bindingName = Name "hydra.demos.genpg.sales.salesMapping",
-      bindingTerm = EncodePg.lazyGraph EncodeCore.term Sales.salesGraph,
-      bindingTypeScheme = Just lazyGraphTermScheme
-    }
-  ],
-  moduleTermDependencies = [
-    Namespace "hydra.tabular",
-    Namespace "hydra.relational",
-    Namespace "hydra.pg.model",
-    Namespace "hydra.core"
-  ],
-  moduleTypeDependencies = [
-    Namespace "hydra.tabular",
-    Namespace "hydra.relational",
-    Namespace "hydra.pg.model",
-    Namespace "hydra.core"
-  ],
-  moduleDescription = Just "GenPG schemas for the sales demo"
-}
-
-
--- | Namespace for the generated sales module
-salesNamespace :: Namespace
-salesNamespace = Namespace "hydra.demos.genpg.sales"
-
-
--- | The health module containing health demo schemas and mapping.
-healthModule :: Module
-healthModule = Module {
-  moduleNamespace = healthNamespace,
-  moduleDefinitions = map bindingToDefinition [
-    -- healthDatabaseSchema: list[TableType]
-    Binding {
-      bindingName = Name "hydra.demos.genpg.health.healthDatabaseSchema",
-      bindingTerm = TermList $ fmap EncodeTabular.tableType Health.healthTableSchemas,
-      bindingTypeScheme = Just listTableTypeScheme
-    },
-    -- healthGraphSchema: GraphSchema[Type]
-    Binding {
-      bindingName = Name "hydra.demos.genpg.health.healthGraphSchema",
-      bindingTerm = EncodePg.graphSchema EncodeCore.type_ Health.healthGraphSchema,
-      bindingTypeScheme = Just graphSchemaTypeScheme
-    },
-    -- healthMapping: LazyGraph[Term]
-    Binding {
-      bindingName = Name "hydra.demos.genpg.health.healthMapping",
-      bindingTerm = EncodePg.lazyGraph EncodeCore.term Health.healthGraph,
-      bindingTypeScheme = Just lazyGraphTermScheme
-    }
-  ],
-  moduleTermDependencies = [
-    Namespace "hydra.tabular",
-    Namespace "hydra.relational",
-    Namespace "hydra.pg.model",
-    Namespace "hydra.core"
-  ],
-  moduleTypeDependencies = [
-    Namespace "hydra.tabular",
-    Namespace "hydra.relational",
-    Namespace "hydra.pg.model",
-    Namespace "hydra.core"
-  ],
-  moduleDescription = Just "GenPG schemas for the health demo"
-}
-
-
--- | Namespace for the generated health module
-healthNamespace :: Namespace
-healthNamespace = Namespace "hydra.demos.genpg.health"
-
-
--- | Type scheme for list of TableType (no type variables)
-listTableTypeScheme :: TypeScheme
-listTableTypeScheme = TypeScheme {
-  typeSchemeVariables = [],
-  typeSchemeBody = TypeList (TypeVariable (Name "hydra.tabular.TableType")),
-  typeSchemeConstraints = Nothing
-}
-
-
--- | Type scheme for GraphSchema Type (no type variables)
-graphSchemaTypeScheme :: TypeScheme
-graphSchemaTypeScheme = TypeScheme {
-  typeSchemeVariables = [],
-  typeSchemeBody = TypeApplication (ApplicationType
-    (TypeVariable (Name "hydra.pg.model.GraphSchema"))
-    (TypeVariable (Name "hydra.core.Type"))),
-  typeSchemeConstraints = Nothing
-}
-
-
--- | Type scheme for LazyGraph Term (no type variables)
-lazyGraphTermScheme :: TypeScheme
-lazyGraphTermScheme = TypeScheme {
-  typeSchemeVariables = [],
-  typeSchemeBody = TypeApplication (ApplicationType
-    (TypeVariable (Name "hydra.pg.model.LazyGraph"))
-    (TypeVariable (Name "hydra.core.Term"))),
-  typeSchemeConstraints = Nothing
-}
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Rdf.hs b/src/main/haskell/Hydra/Demos/Genpg/Rdf.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Rdf.hs
+++ /dev/null
@@ -1,282 +0,0 @@
--- | RDF/SHACL output for the GenPG demo.
---
--- Provides an alternative output path (N-Triples + SHACL shapes) alongside the
--- existing GraphSON output. Uses the same CSV-to-property-graph pipeline; only
--- the final serialization differs.
-
-module Hydra.Demos.GenPG.Rdf where
-
-import Hydra.Kernel
-import Hydra.Demos.GenPG.Examples.Sales.DatabaseSchema
-import Hydra.Demos.GenPG.Examples.Sales.GraphSchema
-import Hydra.Demos.GenPG.Examples.Sales.Mapping
-import Hydra.Demos.GenPG.Examples.Health.DatabaseSchema
-import Hydra.Demos.GenPG.Examples.Health.GraphSchema
-import Hydra.Demos.GenPG.Examples.Health.Mapping
-import Hydra.Demos.GenPG.Demo (transformTables)
-import Hydra.Demos.Shacl.ShaclRdf (shapesGraphToNtriples)
-import Hydra.Lib.Literals (showInt32)
-import qualified Hydra.Pg.Rdf.Environment as PgRdfEnv
-import qualified Hydra.Pg.Rdf.Mappings as PgRdfMappings
-
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Shacl.Model as Shacl
-import qualified Hydra.Rdf.Serde as Serde
-import qualified Hydra.Rdf.Utils as RdfUtils
-import qualified Hydra.Pg.Model as Pg
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-import System.IO (hFlush, stdout)
-
-
---------------------------------------------------------------------------------
--- Entry points
-
-generateSalesRdf :: IO ()
-generateSalesRdf = generateRdf
-  "demos/genpg/data/sources/sales"
-  salesTableSchemas
-  salesGraph
-  salesGraphSchema
-  "demos/genpg/output/sales"
-
-generateHealthRdf :: IO ()
-generateHealthRdf = generateRdf
-  "demos/genpg/data/sources/health"
-  healthTableSchemas
-  healthGraph
-  healthGraphSchema
-  "demos/genpg/output/health"
-
-generateRdf :: FilePath -> [TableType] -> Pg.LazyGraph Term -> Pg.GraphSchema Type
-  -> FilePath -> IO ()
-generateRdf sourceRoot tableSchemas graphMapping graphSchema outputDir = do
-  log $ "Reading CSV files from " ++ sourceRoot ++ "/"
-  g <- transformTables sourceRoot tableSchemas graphMapping
-
-  -- Generate SHACL shapes from the graph schema
-  log "Generating SHACL shapes..."
-  let shapes = graphSchemaToShapesGraph graphSchema
-  let shapesNt = shapesGraphToNtriples shapes
-  let shapesFile = outputDir ++ "-shapes.nt"
-  writeFile shapesFile (ensureTrailingNewline shapesNt)
-  log $ "  Wrote shapes to " ++ shapesFile
-
-  -- Generate RDF data from the property graph
-  log "Encoding property graph as RDF..."
-  let env = defaultTermEnv
-  let dataGraph = PgRdfMappings.encodeLazyGraph env g
-  let nVertices = length (Pg.lazyGraphVertices g)
-  let nEdges = length (Pg.lazyGraphEdges g)
-  let dataNt = Serde.rdfGraphToNtriples dataGraph
-  let dataFile = outputDir ++ "-data.nt"
-  writeFile dataFile (ensureTrailingNewline dataNt)
-  log $ "  Wrote " ++ show nVertices ++ " vertex and "
-    ++ show nEdges ++ " edge descriptions to " ++ dataFile
-
-  -- Generate intentionally non-conforming RDF data for negative validation
-  log "Generating non-conforming RDF data..."
-  let invalidNt = generateInvalidData
-  let invalidFile = outputDir ++ "-invalid.nt"
-  writeFile invalidFile (ensureTrailingNewline invalidNt)
-  log $ "  Wrote to " ++ invalidFile
-
-  log "Done."
-  where
-    log msg = putStrLn msg >> hFlush stdout
-    ensureTrailingNewline s
-      | null s = "\n"
-      | last s == '\n' = s
-      | otherwise = s ++ "\n"
-
-
---------------------------------------------------------------------------------
--- Default environment for Term-valued property graphs
-
--- | A default namespace prefix for the demo
-demoNs :: String
-demoNs = "urn:hydra:genpg:"
-
--- | Default environment for encoding Term-valued property graphs as RDF.
-defaultTermEnv :: PgRdfEnv.PgRdfEnvironment Term
-defaultTermEnv = PgRdfEnv.PgRdfEnvironment {
-  PgRdfEnv.pgRdfEnvironmentEncodeVertexId = termToIri "vertex:",
-  PgRdfEnv.pgRdfEnvironmentEncodeVertexLabel = \(Pg.VertexLabel l) -> Rdf.Iri (demoNs ++ l),
-  PgRdfEnv.pgRdfEnvironmentEncodeEdgeId = termToIri "edge:",
-  PgRdfEnv.pgRdfEnvironmentEncodeEdgeLabel = \(Pg.EdgeLabel l) -> Rdf.Iri (demoNs ++ l),
-  PgRdfEnv.pgRdfEnvironmentEncodePropertyKey = \(Pg.PropertyKey k) -> Rdf.Iri (demoNs ++ k),
-  PgRdfEnv.pgRdfEnvironmentEncodePropertyValue = termToLiteral}
-
-termToIri :: String -> Term -> Rdf.Iri
-termToIri prefix term = case term of
-  TermLiteral (LiteralString s) -> Rdf.Iri (demoNs ++ prefix ++ s)
-  TermLiteral (LiteralInteger (IntegerValueInt32 i)) -> Rdf.Iri (demoNs ++ prefix ++ showInt32 i)
-  _ -> error $ "Unsupported term type for IRI encoding: " ++ show term
-
-termToLiteral :: Term -> Rdf.Literal
-termToLiteral term = case term of
-  TermLiteral lit -> RdfUtils.encodeLiteral lit
-  _ -> error $ "Expected a literal term: " ++ show term
-
-
---------------------------------------------------------------------------------
--- Invalid data generation for negative validation
-
--- | Generate intentionally non-conforming RDF data for validation testing.
--- Creates instances that violate the SHACL shapes in specific ways:
---   1. An Employee missing required "firstName" and "lastName"
---   2. A Product with an integer "name" instead of string
---   3. An edge pointing to a non-existent vertex type
-generateInvalidData :: String
-generateInvalidData = Serde.rdfGraphToNtriples $ Rdf.Graph $ S.fromList $
-  -- Employee missing required firstName and lastName
-  [ triple "urn:hydra:genpg:vertex:invalid_emp" rdfType "urn:hydra:genpg:Employee"
-  , tripleL "urn:hydra:genpg:vertex:invalid_emp" "urn:hydra:genpg:email" "bad@example.com"
-  ] ++
-  -- Product with integer name instead of string (wrong datatype)
-  [ triple "urn:hydra:genpg:vertex:invalid_prod" rdfType "urn:hydra:genpg:Product"
-  , tripleInt "urn:hydra:genpg:vertex:invalid_prod" "urn:hydra:genpg:name" 42
-  ]
-  where
-    rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
-
-    triple :: String -> String -> String -> Rdf.Triple
-    triple s p o = Rdf.Triple
-      (Rdf.ResourceIri (Rdf.Iri s))
-      (Rdf.Iri p)
-      (Rdf.NodeIri (Rdf.Iri o))
-
-    tripleL :: String -> String -> String -> Rdf.Triple
-    tripleL s p v = Rdf.Triple
-      (Rdf.ResourceIri (Rdf.Iri s))
-      (Rdf.Iri p)
-      (Rdf.NodeLiteral (Rdf.Literal v (Rdf.Iri "http://www.w3.org/2001/XMLSchema#string") Nothing))
-
-    tripleInt :: String -> String -> Int -> Rdf.Triple
-    tripleInt s p n = Rdf.Triple
-      (Rdf.ResourceIri (Rdf.Iri s))
-      (Rdf.Iri p)
-      (Rdf.NodeLiteral (Rdf.Literal (show n) (Rdf.Iri "http://www.w3.org/2001/XMLSchema#integer") Nothing))
-
-
---------------------------------------------------------------------------------
--- Schema-to-SHACL conversion (raw Haskell, mirrors the promoted DSL logic)
-
--- | Convert a GraphSchema Type to a SHACL ShapesGraph.
-graphSchemaToShapesGraph :: Pg.GraphSchema Type -> Shacl.ShapesGraph
-graphSchemaToShapesGraph schema =
-  Shacl.ShapesGraph $ S.fromList $ map makeVertexShape $ M.elems (Pg.graphSchemaVertices schema)
-  where
-    allEdgeTypes = M.elems (Pg.graphSchemaEdges schema)
-
-    makeVertexShape :: Pg.VertexType Type -> Shacl.Definition Shacl.Shape
-    makeVertexShape vt =
-      let labelIri = vertexLabelToIri (Pg.vertexTypeLabel vt)
-          vlabel = Pg.vertexTypeLabel vt
-          propConstraints = map (\pt -> makePropertyConstraint (scopedPropertyIri vlabel $ Pg.propertyTypeKey pt) (makePropertyShape pt)) (Pg.vertexTypeProperties vt)
-          edgeConstraints = concatMap (makeEdgeConstraint (Pg.vertexTypeLabel vt)) allEdgeTypes
-          allConstraints = S.fromList (propConstraints ++ edgeConstraints)
-          common = emptyCommon {
-            Shacl.commonPropertiesConstraints = allConstraints,
-            Shacl.commonPropertiesTargetClass = S.singleton (Rdf.RdfsClass ())}
-      in Shacl.Definition {
-        Shacl.definitionIri = labelIri,
-        Shacl.definitionTarget = Shacl.ShapeNode $ Shacl.NodeShape common}
-
-    makePropertyShape :: Pg.PropertyType Type -> Shacl.PropertyShape
-    makePropertyShape pt =
-      let keyIri = propertyKeyToIri (Pg.propertyTypeKey pt)
-          dtIri = typeToXsdIri (Pg.propertyTypeValue pt)
-          constraints = S.singleton (Shacl.CommonConstraintDatatype dtIri)
-          propConstraints = if Pg.propertyTypeRequired pt
-            then S.singleton (Shacl.PropertyShapeConstraintMinCount 1)
-            else S.empty
-      in Shacl.PropertyShape {
-        Shacl.propertyShapeCommon = emptyCommon { Shacl.commonPropertiesConstraints = constraints },
-        Shacl.propertyShapeConstraints = propConstraints,
-        Shacl.propertyShapeDefaultValue = Nothing,
-        Shacl.propertyShapeDescription = emptyLangStrings,
-        Shacl.propertyShapeName = emptyLangStrings,
-        Shacl.propertyShapeOrder = Nothing,
-        Shacl.propertyShapePath = keyIri}
-
-    makePropertyConstraint :: Rdf.Iri -> Shacl.PropertyShape -> Shacl.CommonConstraint
-    makePropertyConstraint propIri ps = Shacl.CommonConstraintProperty $
-      S.singleton (Shacl.ReferenceDefinition $ Shacl.Definition propIri ps)
-
-    makeEdgeConstraint :: Pg.VertexLabel -> Pg.EdgeType Type -> [Shacl.CommonConstraint]
-    makeEdgeConstraint vLabel et
-      | Pg.edgeTypeOut et == vLabel =
-          let edgeIri = edgeLabelToIri (Pg.edgeTypeLabel et)
-              inIri = vertexLabelToIri (Pg.edgeTypeIn et)
-              classConstraint = Shacl.CommonConstraintClass $ S.singleton (Rdf.RdfsClass ())
-              nodeConstraint = Shacl.CommonConstraintNode $
-                S.singleton (Shacl.ReferenceNamed inIri)
-              common = emptyCommon { Shacl.commonPropertiesConstraints = S.fromList [classConstraint, nodeConstraint] }
-              ps = Shacl.PropertyShape {
-                Shacl.propertyShapeCommon = common,
-                Shacl.propertyShapeConstraints = S.empty,
-                Shacl.propertyShapeDefaultValue = Nothing,
-                Shacl.propertyShapeDescription = emptyLangStrings,
-                Shacl.propertyShapeName = emptyLangStrings,
-                Shacl.propertyShapeOrder = Nothing,
-                Shacl.propertyShapePath = edgeIri}
-          in [makePropertyConstraint (scopedEdgeIri vLabel $ Pg.edgeTypeLabel et) ps]
-      | otherwise = []
-
-    emptyCommon :: Shacl.CommonProperties
-    emptyCommon = Shacl.CommonProperties {
-      Shacl.commonPropertiesConstraints = S.empty,
-      Shacl.commonPropertiesDeactivated = Nothing,
-      Shacl.commonPropertiesMessage = emptyLangStrings,
-      Shacl.commonPropertiesSeverity = Shacl.SeverityViolation,
-      Shacl.commonPropertiesTargetClass = S.empty,
-      Shacl.commonPropertiesTargetNode = S.empty,
-      Shacl.commonPropertiesTargetObjectsOf = S.empty,
-      Shacl.commonPropertiesTargetSubjectsOf = S.empty}
-
-    emptyLangStrings :: Rdf.LangStrings
-    emptyLangStrings = Rdf.LangStrings M.empty
-
-    vertexLabelToIri :: Pg.VertexLabel -> Rdf.Iri
-    vertexLabelToIri (Pg.VertexLabel l) = Rdf.Iri (demoNs ++ l)
-
-    edgeLabelToIri :: Pg.EdgeLabel -> Rdf.Iri
-    edgeLabelToIri (Pg.EdgeLabel l) = Rdf.Iri (demoNs ++ l)
-
-    propertyKeyToIri :: Pg.PropertyKey -> Rdf.Iri
-    propertyKeyToIri (Pg.PropertyKey k) = Rdf.Iri (demoNs ++ k)
-
-    scopedPropertyIri :: Pg.VertexLabel -> Pg.PropertyKey -> Rdf.Iri
-    scopedPropertyIri (Pg.VertexLabel vl) (Pg.PropertyKey k) = Rdf.Iri (demoNs ++ vl ++ "#" ++ k)
-
-    scopedEdgeIri :: Pg.VertexLabel -> Pg.EdgeLabel -> Rdf.Iri
-    scopedEdgeIri (Pg.VertexLabel vl) (Pg.EdgeLabel el) = Rdf.Iri (demoNs ++ vl ++ "#" ++ el)
-
-    -- | Map a Hydra Type to an XSD datatype IRI
-    typeToXsdIri :: Type -> Rdf.Iri
-    typeToXsdIri typ = case typ of
-      TypeLiteral lt -> literalTypeToXsd lt
-      _ -> Rdf.Iri "http://www.w3.org/2001/XMLSchema#string"  -- fallback
-
-    literalTypeToXsd :: LiteralType -> Rdf.Iri
-    literalTypeToXsd lt = Rdf.Iri $ "http://www.w3.org/2001/XMLSchema#" ++ case lt of
-      LiteralTypeBinary -> "base64Binary"
-      LiteralTypeBoolean -> "boolean"
-      LiteralTypeFloat ft -> case ft of
-        FloatTypeBigfloat -> "decimal"
-        FloatTypeFloat32 -> "float"
-        FloatTypeFloat64 -> "double"
-      LiteralTypeInteger it -> case it of
-        IntegerTypeBigint -> "integer"
-        IntegerTypeInt8 -> "byte"
-        IntegerTypeInt16 -> "short"
-        IntegerTypeInt32 -> "int"
-        IntegerTypeInt64 -> "long"
-        IntegerTypeUint8 -> "unsignedByte"
-        IntegerTypeUint16 -> "unsignedShort"
-        IntegerTypeUint32 -> "unsignedInt"
-        IntegerTypeUint64 -> "unsignedLong"
-      LiteralTypeString -> "string"
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Runtime.hs b/src/main/haskell/Hydra/Demos/Genpg/Runtime.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Runtime.hs
+++ /dev/null
@@ -1,241 +0,0 @@
-module Hydra.Demos.GenPG.Runtime where
-
-import Hydra.Kernel
-import qualified Hydra.Show.Errors as ShowError
-import qualified Hydra.Pg.Model as Pg
-import Hydra.Dsl.Pg.Mappings
-import Hydra.Lib.Literals
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Kernel.Types.Core (hydraCoreGraph)
-
-import qualified Control.Monad as CM
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Data.Maybe as Y
-
-
-type PgTransform = M.Map String ([Pg.Vertex Term], [Pg.Edge Term])
-
-
-type Result a = Either Error a
-
-evaluate :: Context -> Graph -> Term -> Result Term
-evaluate cx g term = reduceTerm cx g True term
-
-evaluateEdge :: Context -> Graph -> Pg.Edge Term -> Term -> Result (Maybe (Pg.Edge Term))
-evaluateEdge cx g (Pg.Edge label idSpec outSpec inSpec propSpecs) term = do
-    id <- evaluate cx g $ Terms.apply idSpec term
-    mOutId <- evaluate cx g (Terms.apply outSpec term) >>= ExtractCore.maybeTerm Right g
-    mInId <- evaluate cx g (Terms.apply inSpec term) >>= ExtractCore.maybeTerm Right g
-    props <- evaluateProperties cx g propSpecs term
-    return $ case mOutId of
-      Nothing -> Nothing
-      Just outId -> case mInId of
-        Nothing -> Nothing
-        Just inId -> Just $ Pg.Edge label id outId inId props
-
-evaluateProperties :: Context -> Graph -> M.Map Pg.PropertyKey Term -> Term -> Result (M.Map Pg.PropertyKey Term)
-evaluateProperties cx g specs record = M.fromList . Y.catMaybes <$> (CM.mapM forPair $ M.toList specs)
-  where
-    forPair (k, spec) = do
-      value <- evaluate cx g $ Terms.apply spec record
-      case deannotateTerm value of
-        TermMaybe mv -> case mv of
-          Nothing -> return Nothing
-          Just v -> return $ Just (k, v)
-        _ -> Left $ ErrorOther (OtherError $ "expected an optional value for property " ++ Pg.unPropertyKey k ++ " but got " ++ ShowCore.term value)
-
-evaluateVertex :: Context -> Graph -> Pg.Vertex Term -> Term -> Result (Maybe (Pg.Vertex Term))
-evaluateVertex cx g (Pg.Vertex label idSpec propSpecs) record = do
-  mId <- evaluate cx g (Terms.apply idSpec record) >>= ExtractCore.maybeTerm Right g
-  props <- evaluateProperties cx g propSpecs record
-  return $ case mId of
-    Nothing -> Nothing
-    Just id -> Just $ Pg.Vertex label id props
-
-findTablesInTerm :: Term -> S.Set String
-findTablesInTerm = foldOverTerm TraversalOrderPre f S.empty
-  where
-    f names term = case term of
-      TermProject (Projection tname _) -> S.insert (unName tname) names
-      _ -> names
-
-findTablesInTerms :: [Term] -> S.Set String
-findTablesInTerms terms = S.unions $ fmap findTablesInTerm terms
-
-elementSpecsByTable :: Pg.LazyGraph Term -> Either String PgTransform
-elementSpecsByTable (Pg.LazyGraph vertices edges) = do
-    vertexPairs <- CM.mapM vertexPair vertices
-    edgePairs <- CM.mapM edgePair edges
-    return $ L.foldl addEdgePair (L.foldl addVertexPair M.empty vertexPairs) edgePairs
-  where
-    vertexPair v = case tableForVertex v of
-          Left err -> Left err
-          Right table -> Right (table, v)
-    edgePair e = case tableForEdge e of
-          Left err -> Left err
-          Right table -> Right (table, e)
-    addVertexPair m (table, v) = M.insert table (v : vertices, edges) m
-      where
-        (vertices, edges) = Y.fromMaybe ([], []) $ M.lookup table m
-    addEdgePair m (table, e) = M.insert table (vertices, e : edges) m
-      where
-        (vertices, edges) = Y.fromMaybe ([], []) $ M.lookup table m
-
-tableForEdge :: Pg.Edge Term -> Either String String
-tableForEdge (Pg.Edge label id outId inId props) = if S.size tables == 1
-    then Right $ L.head $ S.toList tables
-    else Left $ "Specification for " ++ Pg.unEdgeLabel label ++ " edges has wrong number of tables: "
-      ++ show tables
-  where
-    tables = findTablesInTerms $ [id, outId, inId] ++ M.elems props
-
-tableForVertex :: Pg.Vertex Term -> Either String String
-tableForVertex (Pg.Vertex label id props) = if S.size tables == 1
-    then Right $ L.head $ S.toList tables
-    else Left $ "Specification for " ++ Pg.unVertexLabel label ++ " vertices has wrong number of tables: "
-      ++ show tables
-  where
-    tables = findTablesInTerms $ [id] ++ M.elems props
-
-termRowToRecord :: TableType -> DataRow Term -> Term
-termRowToRecord (TableType (RelationName tname) colTypes) (DataRow cells) = TermRecord $ Record (Name tname) $
-    L.zipWith toField colTypes cells
-  where
-    toField (ColumnType (ColumnName cname) _) mvalue = Field (Name cname) $ TermMaybe mvalue
-
-transformRecord :: Context -> Graph -> [Pg.Vertex Term] -> [Pg.Edge Term] -> Term -> Result ([Pg.Vertex Term], [Pg.Edge Term])
-transformRecord cx g vspecs especs term = do
-  vertices <- CM.mapM (\s -> evaluateVertex cx g s term) vspecs
-  edges <- CM.mapM (\s -> evaluateEdge cx g s term) especs
-  return (Y.catMaybes vertices, Y.catMaybes edges)
-
-transformTable :: TableType -> FilePath -> [Pg.Vertex Term] -> [Pg.Edge Term] -> IO ([Pg.Vertex Term], [Pg.Edge Term])
-transformTable tableType@(TableType (RelationName tableName) _) path vspecs especs = do
-    (Table _ rows) <- decodeTableIo tableType path
-    let cx = emptyContext
-    pairs <- case CM.mapM (transformRecord cx hydraCoreGraph vspecs especs . termRowToRecord tableType) rows of
-      Left ic -> fail $ ShowError.error ic
-      Right ps -> return ps
-    return $ L.foldl addRow ([], []) pairs
-  where
-    filePath = tableName
-    addRow (vertices, edges) (v, e) = (vertices ++ v, edges ++ e)
-
-transformTables :: FilePath -> [TableType] -> Pg.LazyGraph Term -> IO (Pg.LazyGraph Term)
-transformTables fileRoot tableTypes spec = do
-    transform <- case (elementSpecsByTable spec) of
-      Left err -> fail $ "Error in mapping specification: " ++ err
-      Right t -> return t
-    pairs <- CM.mapM forTable $ M.toList transform
-    let (vertices, edges) = L.foldl addRow ([], []) pairs
-    return $ Pg.LazyGraph vertices edges
-  where
-    addRow (vertices, edges) (v, e) = (vertices ++ v, edges ++ e)
-    forTable (tname, (vspecs, especs)) = case M.lookup (RelationName tname) tableTypesByName of
-        Nothing -> fail $ "Table specified in mapping does not exist: " ++ tname
-        Just tableType -> do
-          (vertices, edges) <- transformTable tableType path vspecs especs
-          return (vertices, edges)
-      where
-        path = fileRoot ++ "/" ++ tname
-    tableTypesByName = M.fromList $ fmap (\t -> (tableTypeName t, t)) tableTypes
-
-
---------------------------------------------------------------------------------
--- Table reading (consider making this into a separate module)
-
-decodeTable :: TableType -> Table String -> Either String (Table Term)
-decodeTable (TableType _ colTypes) (Table mheader rows) = do
-    -- TODO: check header names against the table schema
-    -- TODO: check that all rows have the same length as the header
-    drows <- CM.zipWithM decodeRow rows [1..]
-    return $ Table mheader $ fmap DataRow drows
-  where
-    decodeRow (DataRow row) lineno = CM.zipWithM decodeCell colTypes row
-      where
-        decodeCell (ColumnType (ColumnName cname) typ) mvalue = case mvalue of
-          Nothing -> Right Nothing
-          Just value -> case typ of
-              TypeLiteral lt -> case lt of
-                LiteralTypeBoolean -> readValue Terms.boolean readBoolean value
-                LiteralTypeFloat ft -> case ft of
-                   FloatTypeBigfloat -> readValue Terms.bigfloat readFloat64 value
-                   FloatTypeFloat32 -> readValue Terms.float32 readFloat32 value
-                   FloatTypeFloat64 -> readValue Terms.float64 readFloat64 value
-                LiteralTypeInteger it -> case it of
-                  IntegerTypeInt32 -> readValue Terms.int32 readInt32 value
-                  IntegerTypeInt64 -> readValue Terms.int64 readInt64 value
-                  _ -> unsupported
-                LiteralTypeString -> readValue Terms.string Just value
-              _ -> unsupported
-            where
-              toEither mv = case mv of
-                Nothing -> Left $ "Invalid value of type " ++ ShowCore.type_ typ ++ " for column " ++ show cname
-                  ++ " on line " ++ show lineno ++ ": " ++ value
-                Just v -> Right v
-              unsupported = Left $ "Unsupported type for column " ++ show cname ++ ": " ++ ShowCore.type_ typ
-              readValue cons read value = (Just . cons) <$> (toEither $ read value)
-
-decodeTableIo :: TableType -> FilePath -> IO (Table Term)
-decodeTableIo tableType path = do
-    table <- readTable True path
-    case decodeTable tableType table of
-      Left err -> fail err
-      Right t -> return t
-
--- Note: LLM-generated function. Not thoroughly tested.
-parseCsvLine :: String -> Either String [Maybe String]
-parseCsvLine = go [] [] False False
-  where
-    go acc field inQuotes escape [] =
-      finalize acc field inQuotes
-
-    go acc field inQuotes escape (c:cs)
-      | c == '"' =
-          if inQuotes
-            then case cs of
-              ('"':cs') -> go acc (field ++ ['"']) True False cs'  -- Escaped quote
-              _         -> go acc field False False cs             -- End quote
-          else if null field
-            then go acc field True False cs                       -- Start quote
-          else Left "Unexpected quote inside unquoted field"
-
-      | c == ',' && not inQuotes =
-          go (acc ++ [normalize field]) [] False False cs
-
-      | otherwise =
-          go acc (field ++ [c]) inQuotes False cs
-
-    finalize acc field inQuotes
-      | inQuotes  = Left "Unclosed quoted field"
-      | otherwise = Right (acc ++ [normalize field])
-
-    normalize "" = Nothing
-    normalize s  = Just s
-
-readTable :: Bool -> FilePath -> IO (Table String)
-readTable hasHeader path = do
-  rawLines <- fmap lines $ readFile path
-  case CM.zipWithM parseLine rawLines [1..] of
-    Left err -> fail $ "CSV read error in " ++ show path ++ ": " ++ err
-    Right rows0 -> do
-      let rows = Y.catMaybes rows0
-      if hasHeader
-        then do
-          let headerRow = L.head rows
-          if any Y.isNothing headerRow
-            then fail $ "null header column(s) in " ++ show path
-            else pure $ Table (Just $ HeaderRow $ Y.catMaybes headerRow) $ fmap DataRow $ L.tail rows
-        else pure $ Table Nothing $ fmap DataRow rows
-  where
-    parseLine line number = if L.null trimmed
-        then pure Nothing
-        else case parseCsvLine trimmed of
-          Left err -> Left $ "CSV error in " ++ show path ++ ", line " ++ show number ++ ": " ++ err
-          Right row -> pure $ Just row
-      where
-        trimmed = stripLeadingAndTrailingWhitespace line
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Transform.hs b/src/main/haskell/Hydra/Demos/Genpg/Transform.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Genpg/Transform.hs
+++ /dev/null
@@ -1,325 +0,0 @@
--- 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.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Chars as Chars
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Model as Model
-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.Tabular as Tabular
-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 -> Maybes.maybe (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralBoolean parsed)))) (Literals.readBoolean value)
-                        Core.LiteralTypeFloat v1 -> case v1 of
-                          Core.FloatTypeBigfloat -> Maybes.maybe (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat parsed))))) (Literals.readBigfloat value)
-                          Core.FloatTypeFloat32 -> Maybes.maybe (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 parsed))))) (Literals.readFloat32 value)
-                          Core.FloatTypeFloat64 -> Maybes.maybe (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 parsed))))) (Literals.readFloat64 value)
-                          _ -> Left (Strings.cat [
-                            "Unsupported float type for column ",
-                            cname])
-                        Core.LiteralTypeInteger v1 -> case v1 of
-                          Core.IntegerTypeInt32 -> Maybes.maybe (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 parsed))))) (Literals.readInt32 value)
-                          Core.IntegerTypeInt64 -> Maybes.maybe (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 parsed))))) (Literals.readInt64 value)
-                          _ -> 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 (Maybes.maybe (Right Nothing) decodeValue mvalue)
-
--- | 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 :: Model.Element t0 -> Bool
-elementIsEdge el =
-    (\x -> case x of
-      Model.ElementEdge _ -> True
-      _ -> False) el
-
--- | Check if an element is a vertex
-elementIsVertex :: Model.Element t0 -> Bool
-elementIsVertex el =
-    (\x -> case x of
-      Model.ElementVertex _ -> True
-      _ -> False) el
-
--- | Group element specifications by their source table
-elementSpecsByTable :: Model.LazyGraph Core.Term -> Either String (M.Map String ([Model.Vertex Core.Term], [Model.Edge Core.Term]))
-elementSpecsByTable graph =
-
-      let vertices = Model.lazyGraphVertices graph
-          edges = Model.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 = Maybes.fromMaybe ([], []) 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 = Maybes.fromMaybe ([], []) 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 :: Context.Context -> Graph.Graph -> Model.Edge Core.Term -> Core.Term -> Either Errors.Error (Maybe (Model.Edge Core.Term))
-evaluateEdge cx g edgeSpec record =
-
-      let label = Model.edgeLabel edgeSpec
-          idSpec = Model.edgeId edgeSpec
-          outSpec = Model.edgeOut edgeSpec
-          inSpec = Model.edgeIn edgeSpec
-          propSpecs = Model.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.maybeTerm (\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.maybeTerm (\t -> Right t) g _term)) (\mInId -> Eithers.bind (evaluateProperties cx g propSpecs record) (\props -> Right (Maybes.bind mOutId (\outId -> Maybes.map (\inId -> Model.Edge {
-        Model.edgeLabel = label,
-        Model.edgeId = id,
-        Model.edgeOut = outId,
-        Model.edgeIn = inId,
-        Model.edgeProperties = props}) mInId)))))))
-
--- | Evaluate property specifications against a record term
-evaluateProperties :: Ord t0 => (Context.Context -> Graph.Graph -> M.Map t0 Core.Term -> Core.Term -> Either Errors.Error (M.Map t0 Core.Term))
-evaluateProperties cx g specs record =
-
-      let extractMaybe =
-              \k -> \term -> case term of
-                Core.TermMaybe v0 -> Right (Maybes.map (\v -> (k, v)) v0)
-      in (Eithers.map (\pairs -> Maps.fromList (Maybes.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 :: Context.Context -> Graph.Graph -> Model.Vertex Core.Term -> Core.Term -> Either Errors.Error (Maybe (Model.Vertex Core.Term))
-evaluateVertex cx g vertexSpec record =
-
-      let label = Model.vertexLabel vertexSpec
-          idSpec = Model.vertexId vertexSpec
-          propSpecs = Model.vertexProperties vertexSpec
-      in (Eithers.bind (Eithers.bind (Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
-        Core.applicationFunction = idSpec,
-        Core.applicationArgument = record}))) (\_term -> ExtractCore.maybeTerm (\t -> Right t) g _term)) (\mId -> Eithers.bind (evaluateProperties cx g propSpecs record) (\props -> Right (Maybes.map (\id -> Model.Vertex {
-        Model.vertexLabel = label,
-        Model.vertexId = id,
-        Model.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 :: [Model.Vertex t0] -> [Model.Edge t0] -> Model.LazyGraph t0
-makeLazyGraph vertices edges =
-    Model.LazyGraph {
-      Model.lazyGraphVertices = vertices,
-      Model.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 = Maybes.cat parsedRows
-      in (Logic.ifElse hasHeader (Maybes.maybe (Left "empty rows: cannot parse header") (\p ->
-        let headerRow = Pairs.first p
-            dataRows = Pairs.second p
-        in (Logic.ifElse (listAny (\m -> Maybes.isNothing m) headerRow) (Left "null header column(s)") (Right (Tabular.Table {
-          Tabular.tableHeader = (Just (Tabular.HeaderRow (Maybes.cat headerRow))),
-          Tabular.tableData = (Lists.map (\r -> Tabular.DataRow r) dataRows)})))) (Lists.uncons rows)) (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 :: Model.Edge Core.Term -> Either String String
-tableForEdge edge =
-
-      let label = Model.edgeLabel edge
-          id = Model.edgeId edge
-          outId = Model.edgeOut edge
-          inId = Model.edgeIn edge
-          props = Model.edgeProperties edge
-          tables =
-                  findTablesInTerms (Lists.concat2 [
-                    id,
-                    outId,
-                    inId] (Maps.elems props))
-      in (Logic.ifElse (Equality.equal (Sets.size tables) 1) (Maybes.maybe (Left "unreachable: empty tables set") (\x -> Right x) (Lists.maybeHead (Sets.toList tables))) (Left (Strings.cat [
-        "Specification for ",
-        (Model.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 :: Model.Vertex Core.Term -> Either String String
-tableForVertex vertex =
-
-      let label = Model.vertexLabel vertex
-          id = Model.vertexId vertex
-          props = Model.vertexProperties vertex
-          tables = findTablesInTerms (Lists.cons id (Maps.elems props))
-      in (Logic.ifElse (Equality.equal (Sets.size tables) 1) (Maybes.maybe (Left "unreachable: empty tables set") (\x -> Right x) (Lists.maybeHead (Sets.toList tables))) (Left (Strings.cat [
-        "Specification for ",
-        (Model.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.TermMaybe mvalue)}) colTypes cells)}))
-
--- | Transform a record through vertex and edge specifications to produce vertices and edges
-transformRecord :: Context.Context -> Graph.Graph -> [Model.Vertex Core.Term] -> [Model.Edge Core.Term] -> Core.Term -> Either Errors.Error ([Model.Vertex Core.Term], [Model.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 (Maybes.cat mVertices, (Maybes.cat mEdges))))
-
--- | Transform all rows from a table through vertex/edge specifications
-transformTableRows :: Context.Context -> Graph.Graph -> [Model.Vertex Core.Term] -> [Model.Edge Core.Term] -> Tabular.TableType -> [Tabular.DataRow Core.Term] -> Either Errors.Error ([Model.Vertex Core.Term], [Model.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/Demos/Grad/Demo.hs b/src/main/haskell/Hydra/Demos/Grad/Demo.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Grad/Demo.hs
+++ /dev/null
@@ -1,441 +0,0 @@
--- | Haskell driver for the automatic differentiation demo.
---
--- Demonstrates source-to-source automatic differentiation on Hydra terms.
--- Builds mathematical functions as Hydra Term values, differentiates them
--- symbolically, and evaluates both original and derivative at specific points.
---
--- Usage: runhaskell Demo.hs <output-dir>
-
-module Hydra.Demos.Grad.Demo where
-
-import Hydra.Kernel
-import qualified Hydra.Core as Core
-import qualified Hydra.Differentiation as Diff
-import qualified Hydra.Variables as Vars
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Sources.Libraries as Lib
-import qualified Hydra.Lib.Math as HMath
-
-import Control.Monad (when)
-import qualified Data.List as L
-import qualified Data.Map as M
-import System.Directory (createDirectoryIfMissing)
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import System.FilePath ((</>))
-import System.IO (hPutStrLn, stderr, hFlush, stdout)
-import Text.Printf (printf)
-
-
-main :: IO ()
-main = do
-  args <- getArgs
-  case args of
-    [outDir] -> runDemo outDir
-    _ -> do
-      hPutStrLn stderr "Usage: GradDemo <output-dir>"
-      exitFailure
-
--- | Build a Graph with all standard library primitives registered.
-primGraph :: Graph
-primGraph = let
-    allPrims = L.concatMap libraryPrimitives Lib.standardLibraries
-    primsMap = M.fromList $ fmap (\p -> (primitiveName p, p)) allPrims
-  in emptyGraph { graphPrimitives = primsMap }
-
--- | Evaluate a Term to a reduced form, or return an error message.
-eval :: Term -> Either String Term
-eval term = case Reduction.reduceTerm emptyContext primGraph True term of
-  Left err -> Left $ show err
-  Right t -> Right t
-
--- | Evaluate a Term and show the result as a string.
-evalShow :: Term -> String
-evalShow term = case eval term of
-  Left err -> "<<error: " ++ err ++ ">>"
-  Right t -> ShowCore.term t
-
--- | Extract a Double from a reduced Term, if possible.
-evalDouble :: Term -> Maybe Double
-evalDouble term = case eval term of
-  Right (TermLiteral (LiteralFloat (FloatValueFloat64 d))) -> Just d
-  _ -> Nothing
-
--- | Build a variable term: x
-var :: String -> Term
-var = TermVariable . Name
-
--- | Build a Float64 literal term
-lit :: Double -> Term
-lit = TermLiteral . LiteralFloat . FloatValueFloat64
-
--- | Build a unary primitive application: f(x)
-app1 :: String -> Term -> Term
-app1 name arg = TermApplication $ Application
-  (TermVariable (Name name)) arg
-
--- | Build a binary primitive application: f(x, y)
-app2 :: String -> Term -> Term -> Term
-app2 name a b = TermApplication $ Application
-  (TermApplication $ Application (TermVariable (Name name)) a) b
-
--- | Substitute a variable with a value in a term, then evaluate.
-evalAt :: String -> Double -> Term -> Maybe Double
-evalAt varName xVal term =
-  let substituted = Vars.replaceFreeTermVariable (Name varName) (lit xVal) term
-  in evalDouble substituted
-
--- | Central finite difference approximation of the derivative.
-finiteDiff :: (Double -> Double) -> Double -> Double -> Double
-finiteDiff f x h = (f (x + h) - f (x - h)) / (2 * h)
-
--- | A demo function: name, Hydra term representation, and Haskell evaluation function.
-data DemoFunction = DemoFunction
-  { dfName :: String
-  , dfTerm :: Term
-  , dfHaskell :: Double -> Double
-  }
-
--- | The collection of demo functions.
-demoFunctions :: [DemoFunction]
-demoFunctions =
-  [ DemoFunction
-      { dfName = "x^2"
-      , dfTerm = app2 "hydra.lib.math.mulFloat64" (var "x") (var "x")
-      , dfHaskell = \x -> x * x
-      }
-  , DemoFunction
-      { dfName = "x^3"
-      , dfTerm = app2 "hydra.lib.math.pow" (var "x") (lit 3.0)
-      , dfHaskell = \x -> x ** 3
-      }
-  , DemoFunction
-      { dfName = "sin(x)"
-      , dfTerm = app1 "hydra.lib.math.sin" (var "x")
-      , dfHaskell = sin
-      }
-  , DemoFunction
-      { dfName = "exp(x)"
-      , dfTerm = app1 "hydra.lib.math.exp" (var "x")
-      , dfHaskell = exp
-      }
-  , DemoFunction
-      { dfName = "log(x)"
-      , dfTerm = app1 "hydra.lib.math.log" (var "x")
-      , dfHaskell = log
-      }
-  , DemoFunction
-      { dfName = "sqrt(x)"
-      , dfTerm = app1 "hydra.lib.math.sqrt" (var "x")
-      , dfHaskell = sqrt
-      }
-  , DemoFunction
-      { dfName = "sin(cos(x))"
-      , dfTerm = app1 "hydra.lib.math.sin" (app1 "hydra.lib.math.cos" (var "x"))
-      , dfHaskell = \x -> sin (cos x)
-      }
-  , DemoFunction
-      { dfName = "x * sin(x)"
-      , dfTerm = app2 "hydra.lib.math.mulFloat64" (var "x") (app1 "hydra.lib.math.sin" (var "x"))
-      , dfHaskell = \x -> x * sin x
-      }
-  , DemoFunction
-      { dfName = "exp(x^2)"
-      , dfTerm = app1 "hydra.lib.math.exp"
-          (app2 "hydra.lib.math.mulFloat64" (var "x") (var "x"))
-      , dfHaskell = \x -> exp (x * x)
-      }
-  ]
-
--- | Test points for evaluation.
-testPoints :: [Double]
-testPoints = [0.5, 1.0, 2.0]
-
-runDemo :: FilePath -> IO ()
-runDemo outDir = do
-  createDirectoryIfMissing True outDir
-
-  putStrLn "╔══════════════════════════════════════════════════════════════════╗"
-  putStrLn "║          Automatic Differentiation Demo for Hydra              ║"
-  putStrLn "║                                                                ║"
-  putStrLn "║  Source-to-source symbolic differentiation on typed lambda     ║"
-  putStrLn "║  calculus terms, compiled identically across all Hydra         ║"
-  putStrLn "║  target languages.                                            ║"
-  putStrLn "╚══════════════════════════════════════════════════════════════════╝"
-  putStrLn ""
-
-  -- Phase 1: Symbolic differentiation
-  putStrLn "═══ Phase 1: Symbolic Differentiation ═══"
-  putStrLn ""
-
-  derivs <- mapM showSymbolic demoFunctions
-  putStrLn ""
-
-  -- Phase 2: Numerical evaluation
-  putStrLn "═══ Phase 2: Numerical Evaluation ═══"
-  putStrLn ""
-
-  mapM_ (evaluateFunction outDir) (zip demoFunctions derivs)
-  putStrLn ""
-
-  -- Phase 3: Gradient check
-  putStrLn "═══ Phase 3: Gradient Check (AD vs Finite Differences) ═══"
-  putStrLn ""
-
-  results <- mapM gradientCheck demoFunctions
-  let allPass = and results
-  putStrLn ""
-  if allPass
-    then putStrLn "All gradient checks PASSED."
-    else putStrLn "Some gradient checks FAILED."
-
-  putStrLn ""
-
-  -- Phase 4: Gradient descent optimization
-  putStrLn "═══ Phase 4: Gradient Descent Optimization ═══"
-  putStrLn ""
-  optimizationDemo outDir
-  putStrLn ""
-
-  -- Phase 5: Curve fitting with two parameters
-  putStrLn "═══ Phase 5: Linear Regression via Gradient Descent ═══"
-  putStrLn ""
-  curveFittingDemo outDir
-  putStrLn ""
-
-  -- Write summary to file
-  let summaryFile = outDir </> "summary.txt"
-  writeFile summaryFile $ unlines
-    [ "Automatic Differentiation Demo Summary"
-    , "======================================"
-    , ""
-    , "Functions differentiated: " ++ show (length demoFunctions)
-    , "Test points: " ++ show testPoints
-    , "Gradient checks: " ++ (if allPass then "ALL PASSED" else "SOME FAILED")
-    , "Optimization: single-variable and linear regression demos included"
-    ]
-  putStrLn $ "Summary written to " ++ summaryFile
-
-showSymbolic :: DemoFunction -> IO Term
-showSymbolic df = do
-  let deriv = Diff.differentiateTerm (Name "x") (dfTerm df)
-  putStrLn $ "  f(x) = " ++ dfName df
-  putStrLn $ "    term:       " ++ ShowCore.term (dfTerm df)
-  putStrLn $ "    derivative: " ++ ShowCore.term deriv
-  putStrLn ""
-  return deriv
-
-evaluateFunction :: FilePath -> (DemoFunction, Term) -> IO ()
-evaluateFunction outDir (df, deriv) = do
-  putStrLn $ "  f(x) = " ++ dfName df
-  printf "    %-8s  %-14s  %-14s  %-14s  %-14s\n"
-    ("x" :: String) ("f(x)" :: String) ("f'(x) AD" :: String) ("f'(x) exact" :: String) ("error" :: String)
-  printf "    %-8s  %-14s  %-14s  %-14s  %-14s\n"
-    ("---" :: String) ("----" :: String) ("--------" :: String) ("----------" :: String) ("-----" :: String)
-
-  mapM_ (evalPoint df deriv) testPoints
-  putStrLn ""
-
-  -- Write derivative terms to file
-  let derivFile = outDir </> (sanitize (dfName df) ++ "_derivative.txt")
-  writeFile derivFile $ unlines
-    [ "f(x) = " ++ dfName df
-    , ""
-    , "Original term:"
-    , "  " ++ ShowCore.term (dfTerm df)
-    , ""
-    , "Derivative term:"
-    , "  " ++ ShowCore.term deriv
-    ]
-  where
-    sanitize = map (\c -> if c `elem` ("*^() " :: String) then '_' else c)
-
-evalPoint :: DemoFunction -> Term -> Double -> IO ()
-evalPoint df deriv x = do
-  let fVal = dfHaskell df x
-  let adVal = evalAt "x" x deriv
-  let exactDeriv = finiteDiff (dfHaskell df) x 1.0e-10
-  case adVal of
-    Just ad -> do
-      let err = abs (ad - exactDeriv)
-      printf "    %-8.4f  %-14.8f  %-14.8f  %-14.8f  %-14.2e\n" x fVal ad exactDeriv err
-    Nothing ->
-      printf "    %-8.4f  %-14.8f  %-14s  %-14.8f  %-14s\n" x fVal ("<<error>>" :: String) exactDeriv ("—" :: String)
-
-gradientCheck :: DemoFunction -> IO Bool
-gradientCheck df = do
-  let deriv = Diff.differentiateTerm (Name "x") (dfTerm df)
-  let h = 1.0e-7
-  let results = map (checkPoint deriv h) testPoints
-  let allOk = all id results
-  let status = if allOk then "PASS" else "FAIL"
-  printf "  %-20s %s\n" (dfName df) status
-  return allOk
-  where
-    checkPoint deriv h x =
-      case evalAt "x" x deriv of
-        Nothing -> False
-        Just ad ->
-          let fd = finiteDiff (dfHaskell df) x h
-              relErr = if abs fd < 1e-12
-                then abs (ad - fd)
-                else abs (ad - fd) / abs fd
-          in relErr < 1e-4
-
--- ============================================================================
--- Phase 4: Single-variable gradient descent optimization
--- ============================================================================
-
--- | Minimize f(x) = (x - 3)^2 + 2*sin(x), starting from x = 0.
---   The minimum is near x ≈ 2.81 where f'(x) = 0.
-optimizationDemo :: FilePath -> IO ()
-optimizationDemo outDir = do
-  putStrLn "  Problem: minimize f(x) = (x - 3)^2 + 2*sin(x)"
-  putStrLn "  Method:  gradient descent with AD-computed derivatives"
-  putStrLn "  Start:   x = 0.0, learning rate = 0.1"
-  putStrLn ""
-
-  -- Build the loss function as a Hydra term:
-  --   f(x) = (x - 3)^2 + 2*sin(x)
-  --        = mulFloat64(subFloat64(x, 3), subFloat64(x, 3)) + mulFloat64(2, sin(x))
-  let xMinus3 = app2 "hydra.lib.math.subFloat64" (var "x") (lit 3.0)
-  let lossTerm = app2 "hydra.lib.math.addFloat64"
-        (app2 "hydra.lib.math.mulFloat64" xMinus3 xMinus3)
-        (app2 "hydra.lib.math.mulFloat64" (lit 2.0) (app1 "hydra.lib.math.sin" (var "x")))
-
-  -- Differentiate once — this produces the gradient term
-  let gradTerm = Diff.differentiateTerm (Name "x") lossTerm
-
-  putStrLn $ "  Loss term:     " ++ ShowCore.term lossTerm
-  putStrLn $ "  Gradient term: " ++ ShowCore.term gradTerm
-  putStrLn ""
-
-  -- Gradient descent loop
-  let lr = 0.1
-  let numSteps = 30
-  let haskellLoss x = (x - 3)**2 + 2 * sin x
-
-  printf "    %-6s  %-12s  %-14s  %-14s\n"
-    ("step" :: String) ("x" :: String) ("f(x)" :: String) ("f'(x)" :: String)
-  printf "    %-6s  %-12s  %-14s  %-14s\n"
-    ("----" :: String) ("---" :: String) ("----" :: String) ("-----" :: String)
-
-  let go :: Int -> Double -> IO Double
-      go step x
-        | step > numSteps = return x
-        | otherwise = do
-            let fVal = haskellLoss x
-            case evalAt "x" x gradTerm of
-              Nothing -> do
-                printf "    %-6d  %-12.6f  %-14.8f  <<error>>\n" step x fVal
-                return x
-              Just grad -> do
-                when (step `mod` 5 == 0 || step <= 2 || step == numSteps) $
-                  printf "    %-6d  %-12.6f  %-14.8f  %-14.8f\n" step x fVal grad
-                go (step + 1) (x - lr * grad)
-
-  xFinal <- go 0 0.0
-  let fFinal = haskellLoss xFinal
-  putStrLn ""
-  printf "  Result: x* = %.8f, f(x*) = %.8f\n" xFinal fFinal
-  printf "  Verification: f'(x*) ≈ %.2e (should be near zero)\n"
-    (case evalAt "x" xFinal gradTerm of Just g -> g; Nothing -> 999.0)
-
-  -- Write optimization trace to file
-  let optFile = outDir </> "optimization.txt"
-  writeFile optFile $ unlines
-    [ "Single-variable optimization"
-    , "f(x) = (x - 3)^2 + 2*sin(x)"
-    , "Method: gradient descent, lr=0.1, 30 steps"
-    , "Result: x* = " ++ show xFinal ++ ", f(x*) = " ++ show fFinal
-    ]
-
--- ============================================================================
--- Phase 5: Linear regression (2-parameter curve fitting)
--- ============================================================================
-
--- | Fit y = a*x + b to noisy data using coordinate-wise gradient descent.
---   Since we have single-variable differentiation, we compute dL/da and dL/db
---   separately and update each parameter per step.
-curveFittingDemo :: FilePath -> IO ()
-curveFittingDemo outDir = do
-  -- Generate "observed" data: y = 2.5*x + 0.7 + noise
-  let trueA = 2.5
-  let trueB = 0.7
-  let dataPoints = [(x, trueA * x + trueB + noise x) | x <- [0.0, 0.5 .. 4.0]]
-        where noise x = 0.1 * sin (7 * x)  -- deterministic pseudo-noise
-
-  putStrLn $ "  Problem: fit y = a*x + b to " ++ show (length dataPoints) ++ " data points"
-  putStrLn $ "  True parameters: a = " ++ show trueA ++ ", b = " ++ show trueB
-  putStrLn $ "  Method: coordinate-wise gradient descent with AD"
-  putStrLn ""
-
-  -- Build the loss function L(a, b) = sum_i (a*x_i + b - y_i)^2
-  -- We construct this as a Hydra term with free variables "a" and "b".
-  let residual xi yi = app2 "hydra.lib.math.subFloat64"
-        (app2 "hydra.lib.math.addFloat64"
-          (app2 "hydra.lib.math.mulFloat64" (var "a") (lit xi))
-          (var "b"))
-        (lit yi)
-  let squaredResidual xi yi =
-        let r = residual xi yi
-        in app2 "hydra.lib.math.mulFloat64" r r
-  let lossTerm = foldl1 (\acc t -> app2 "hydra.lib.math.addFloat64" acc t)
-        [squaredResidual xi yi | (xi, yi) <- dataPoints]
-
-  -- Differentiate w.r.t. "a" and "b" separately
-  let dLda = Diff.differentiateTerm (Name "a") lossTerm
-  let dLdb = Diff.differentiateTerm (Name "b") lossTerm
-
-  putStrLn "  Loss function: L(a,b) = sum_i (a*x_i + b - y_i)^2"
-  putStrLn ""
-
-  -- Gradient descent
-  let lr = 0.001  -- small learning rate (sum of squares can have large gradients)
-  let numSteps = 200
-
-  printf "    %-6s  %-12s  %-12s  %-14s\n"
-    ("step" :: String) ("a" :: String) ("b" :: String) ("loss" :: String)
-  printf "    %-6s  %-12s  %-12s  %-14s\n"
-    ("----" :: String) ("---" :: String) ("---" :: String) ("----" :: String)
-
-  let evalLoss a b = sum [(a * xi + b - yi)**2 | (xi, yi) <- dataPoints]
-
-  let evalGrad gradTerm aVal bVal =
-        let t1 = Vars.replaceFreeTermVariable (Name "a") (lit aVal) gradTerm
-            t2 = Vars.replaceFreeTermVariable (Name "b") (lit bVal) t1
-        in evalDouble t2
-
-  let go :: Int -> Double -> Double -> IO (Double, Double)
-      go step a b
-        | step > numSteps = return (a, b)
-        | otherwise = do
-            let loss = evalLoss a b
-            case (evalGrad dLda a b, evalGrad dLdb a b) of
-              (Just ga, Just gb) -> do
-                when (step `mod` 40 == 0 || step <= 2 || step == numSteps) $
-                  printf "    %-6d  %-12.6f  %-12.6f  %-14.8f\n" step a b loss
-                go (step + 1) (a - lr * ga) (b - lr * gb)
-              _ -> do
-                printf "    %-6d  %-12.6f  %-12.6f  <<gradient error>>\n" step a b
-                return (a, b)
-
-  (aFinal, bFinal) <- go 0 0.0 0.0
-  let finalLoss = evalLoss aFinal bFinal
-  putStrLn ""
-  printf "  Result:     a = %.6f, b = %.6f\n" aFinal bFinal
-  printf "  True:       a = %.6f, b = %.6f\n" trueA trueB
-  printf "  Error:      |a - a*| = %.6f, |b - b*| = %.6f\n"
-    (abs (aFinal - trueA)) (abs (bFinal - trueB))
-  printf "  Final loss: %.8f\n" finalLoss
-
-  -- Write results
-  let fitFile = outDir </> "curve_fitting.txt"
-  writeFile fitFile $ unlines
-    [ "Linear regression via gradient descent"
-    , "Model: y = a*x + b"
-    , "True: a = " ++ show trueA ++ ", b = " ++ show trueB
-    , "Fitted: a = " ++ show aFinal ++ ", b = " ++ show bFinal
-    , "Final loss: " ++ show finalLoss
-    ]
diff --git a/src/main/haskell/Hydra/Demos/GraphqlJson.hs b/src/main/haskell/Hydra/Demos/GraphqlJson.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/GraphqlJson.hs
+++ /dev/null
@@ -1,122 +0,0 @@
--- | GraphQL JSON demo: generates a GraphQL schema from Hydra kernel types, then demonstrates
---   querying Hydra kernel modules through that schema.
---
---   The pipeline:
---   1. Hydra types  ->  GraphQL schema (via the GraphQL coder)
---   2. Hydra terms  ->  JSON data      (via term encoders + JSON encoder)
---   3. GraphQL queries against the JSON data (via a companion Python script)
---
---   This demo uses the actual Hydra kernel modules as the dataset.
-
-module Hydra.Demos.GraphqlJson (
-  demoGraphqlJson,
-  generateGraphqlSchema,
-) where
-
-import Hydra.Kernel
-import Hydra.ExtGeneration
-import Hydra.Dsl.Bootstrap (bootstrapGraph)
-import Hydra.Module.Compat (moduleBindings)
-
-import qualified Hydra.Graphql.Coder as GraphqlCoder
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Context as Context
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Strip as Strip
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified System.Directory as SD
-import qualified System.FilePath as FP
-
-
--- | The kernel type modules that define the schema we want to query.
--- Includes hydra.util for the Pair/Either fallback types referenced by other types.
-schemaModules :: [Module]
-schemaModules = filterModulesByNamespace ["hydra.module", "hydra.util"] kernelTypesModules
-
-filterModulesByNamespace :: [String] -> [Module] -> [Module]
-filterModulesByNamespace names mods =
-  [m | m <- mods, unNamespace (moduleNamespace m) `elem` names]
-
--- | All kernel modules: both type modules and term modules.
-allKernelModules :: [Module]
-allKernelModules = kernelModules
-
--- | Decode type bindings directly into TypeDefinitions, bypassing the adapter.
--- Each native type binding's term is decoded into a Type.
--- Skips types that fail to decode.
-bindingsToTypeDefinitions :: Graph -> [Binding] -> [TypeDefinition]
-bindingsToTypeDefinitions graph bindings =
-  [TypeDefinition (bindingName b) (TypeScheme [] typ Nothing) | b <- bindings,
-   Annotations.isNativeType b,
-   Right typ <- [DecodeCore.type_ graph (Strip.deannotateTerm (bindingTerm b))]]
-
--- | Convert TypeDefinitions to Definitions
-typeDefsToDefinitions :: [TypeDefinition] -> [Definition]
-typeDefsToDefinitions = map DefinitionType
-
--- | Generate the GraphQL schema by calling the coder directly, bypassing language adaptation.
-generateGraphqlSchema :: FilePath -> IO Int
-generateGraphqlSchema outputDir = do
-  putStrLn $ "Generating GraphQL schema to: " ++ outputDir
-
-  -- Build the schema graph from kernel type modules
-  let allMods = kernelTypesModules
-      schemaElements = concatMap (\m -> filter Annotations.isNativeType (moduleBindings m)) allMods
-      schemaGraph = Lexical.elementsToGraph bootstrapGraph M.empty schemaElements
-      cx = Context.Context [] [] M.empty
-
-  -- For each schema module, decode types and run the coder
-  let results = do
-        mod <- schemaModules
-        let typeBindings = filter Annotations.isNativeType (moduleBindings mod)
-            typeDefs = bindingsToTypeDefinitions schemaGraph typeBindings
-            defs = typeDefsToDefinitions typeDefs
-        case GraphqlCoder.moduleToGraphql mod defs cx schemaGraph of
-          Left ic -> [(unNamespace (moduleNamespace mod), Left $ show ic)]
-          Right files -> [(path, Right content) | (path, content) <- M.toList files]
-
-  -- Write output files
-  let successes = [(path, content) | (path, Right content) <- results]
-      failures = [(path, err) | (path, Left err) <- results]
-
-  mapM_ (\(path, err) -> putStrLn $ "  Warning: " ++ path ++ ": " ++ err) failures
-
-  mapM_ (\(path, content) -> do
-    let fullPath = FP.combine outputDir path
-    SD.createDirectoryIfMissing True $ FP.takeDirectory fullPath
-    writeFile fullPath (content ++ "\n")
-    putStrLn $ "  Wrote: " ++ fullPath
-    ) successes
-
-  return (length successes)
-
--- | Run the full demo
-demoGraphqlJson :: IO ()
-demoGraphqlJson = do
-  let demoDir = "demos/graphql-json"
-  let outputDir = FP.combine demoDir "output"
-  let jsonDir = "../../dist/json/hydra-kernel/src/main/json"
-
-  putStrLn "=== GraphQL JSON Demo ==="
-  putStrLn ""
-
-  -- Step 1: Generate GraphQL schema
-  putStrLn "--- Step 1: Generate GraphQL schema from Hydra types ---"
-  nFiles <- generateGraphqlSchema outputDir
-  putStrLn $ "  Generated " ++ show nFiles ++ " schema file(s)"
-  putStrLn ""
-
-  putStrLn "--- Done ---"
-  putStrLn ""
-  putStrLn "Generated files:"
-  putStrLn $ "  Schema:  " ++ FP.combine outputDir "hydra/module.graphql"
-  putStrLn $ "  Data:    " ++ jsonDir ++ "/hydra/*.json (existing kernel JSON)"
-  putStrLn ""
-  putStrLn "To run GraphQL queries:"
-  putStrLn $ "  cd " ++ demoDir
-  putStrLn "  pip install graphql-core"
-  putStrLn "  python3 query.py"
diff --git a/src/main/haskell/Hydra/Demos/MeteredEvaluation.hs b/src/main/haskell/Hydra/Demos/MeteredEvaluation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/MeteredEvaluation.hs
+++ /dev/null
@@ -1,53 +0,0 @@
--- | A small demo of "metered" Hydra evaluation. In this example, the evaluator keeps track of the number of times it
---   calls each primitive function (as a proxy for API calls, which can consume time and resources).
-
-module Hydra.Demos.MeteredEvaluation (demoMeteredEvaluation) where
-
-import Hydra.Kernel
-import qualified Hydra.Show.Errors as ShowError
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Types as Types
-import Hydra.Dsl.Meta.Lib.Lists as Lists
-import Hydra.Dsl.Meta.Lib.Strings as Strings
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import Hydra.ExtGeneration
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-
-import System.IO
-import qualified Control.Monad as CM
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-
-import Prelude hiding ((++))
-
-
-testNs = Namespace "hydra.demos.meteredEvaluation"
-
-testModule :: Module
-testModule = Module {
-               moduleNamespace = testNs,
-               moduleDefinitions = definitions,
-               moduleTermDependencies = [],
-               moduleTypeDependencies = [],
-               moduleDescription = Nothing}
-  where
-    test local tterm = TTermDefinition (unqualifyName $ QualifiedName (Just testNs) local) tterm
-    definitions = [
-        toDefinition $ test "catStrings" (string "foo" ++ string "bar" ++ string "quux" ++ (Literals.showInt32 $ int32 42)),
-        toDefinition $ test "describeType" $ ShowCore.type_ @@ (TTerm $ EncodeCore.type_ $ Types.list $ Types.int32)]
-
-demoMeteredEvaluation :: IO ()
-demoMeteredEvaluation = do
-    case result of
-      Left err -> putStrLn $ "error: " <> ShowError.error err
-      Right reduced -> putStrLn $ "result: " <> show reduced
-  where
-    graph = modulesToGraph [testModule] [testModule]
-    cx = emptyContext
-    result = do
-      original <- bindingTerm <$> requireBinding graph (unqualifyName $ QualifiedName (Just testNs) "catStrings")
-      reduceTerm cx graph False original
diff --git a/src/main/haskell/Hydra/Demos/Shacl/Demo.hs b/src/main/haskell/Hydra/Demos/Shacl/Demo.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Shacl/Demo.hs
+++ /dev/null
@@ -1,221 +0,0 @@
-{-# LANGUAGE ScopedTypeVariables #-}
--- | Haskell driver for the SHACL demo.
---
--- Generates SHACL shapes from the hydra.module.Module type, encodes kernel
--- modules from JSON as conforming RDF data, and writes both to N-Triples files.
---
--- Usage: runhaskell Demo.hs <json-dir> <output-dir>
---
--- Where:
---   <json-dir>    is the path to dist/json/hydra-kernel/src/main/json/
---   <output-dir>  is the directory for output N-Triples files
-
-module Hydra.Demos.Shacl.Demo where
-
-import Hydra.Kernel
-import Hydra.Generation (modulesToGraph, loadModulesFromJson, readManifestField)
-import Hydra.Sources.All (kernelModules)
-import Hydra.Module.Compat (moduleBindings)
-
-import qualified Hydra.Shacl.Coder as ShaclCoder
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Shacl.Model as Shacl
-import qualified Hydra.Rdf.Utils as RdfUtils
-import qualified Hydra.Rdf.Serde as Serde
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Packaging as EncodePackaging
-import qualified Hydra.Context as Context
-import qualified Hydra.Lexical as Lexical
-
-import Hydra.Demos.Shacl.ShaclRdf (shapesGraphToTriples)
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-import Control.Exception (catch, SomeException, evaluate)
-import System.CPUTime (getCPUTime)
-import System.Directory (createDirectoryIfMissing)
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import System.FilePath ((</>))
-import System.IO (hPutStrLn, stderr, hFlush, stdout)
-
-
-main :: IO ()
-main = do
-  args <- getArgs
-  case args of
-    [jsonDir, outDir] -> runDemo jsonDir outDir
-    _ -> do
-      hPutStrLn stderr "Usage: ShaclDemo <json-dir> <output-dir>"
-      exitFailure
-
-runDemo :: FilePath -> FilePath -> IO ()
-runDemo jsonDir outDir = do
-  createDirectoryIfMissing True outDir
-
-  -- Step 1: Build a graph from the kernel type modules
-  putStrLn "Step 1: Building graph from kernel type modules..."
-  let graph = modulesToGraph kernelModules kernelModules
-  let cx = Lexical.emptyContext
-
-  -- Step 2: Generate SHACL shapes from kernel type elements, skipping unsupported types
-  putStrLn "Step 2: Generating SHACL shapes from kernel type modules..."
-  startTime <- getCPUTime
-  let allTypeEls = concatMap (\m -> filter isNativeType (moduleBindings m)) kernelModules
-  let (shapes, nSkipped) = encodeShapes cx graph allTypeEls
-  let allTriples = shapesGraphToTriples shapes
-  let shapesNt = triplesToNtriples allTriples
-  let shapesFile = outDir </> "shapes.nt"
-  writeFile shapesFile shapesNt
-  shapesEnd <- getCPUTime
-  putStrLn $ "  Generated " ++ show (S.size (Shacl.unShapesGraph shapes)) ++ " shapes (" ++ show nSkipped ++ " types skipped)"
-  putStrLn $ "  Wrote " ++ show (length allTriples) ++ " triples to " ++ shapesFile
-  putStrLn $ "  Time: " ++ showTimeMs (shapesEnd - startTime)
-
-  -- Step 3: Load kernel modules from JSON and encode as RDF
-  putStrLn "Step 3: Loading kernel modules from JSON and encoding as RDF..."
-  dataStart <- getCPUTime
-  kernelNamespaces <- readManifestField jsonDir "mainModules"
-  -- Load the first type-defining modules (those whose types we encoded as shapes)
-  let typeNs = take 15 kernelNamespaces
-  loadedModules <- loadModulesFromJson jsonDir kernelModules typeNs
-
-  -- Encode each loaded module *as a Module term* into RDF
-  (allDataDescs, nDataSkipped) <- encodeModulesAsRdf cx graph loadedModules
-  let dataNt = Serde.rdfGraphToNtriples $ RdfUtils.descriptionsToGraph allDataDescs
-  let dataFile = outDir </> "data.nt"
-  writeFile dataFile dataNt
-  dataEnd <- getCPUTime
-  putStrLn $ "  Encoded " ++ show (length allDataDescs) ++ " descriptions (" ++ show nDataSkipped ++ " elements skipped)"
-  putStrLn $ "  Wrote to " ++ dataFile
-  putStrLn $ "  Time: " ++ showTimeMs (dataEnd - dataStart)
-
-  -- Step 4: Generate intentionally non-conforming RDF
-  putStrLn "Step 4: Generating non-conforming RDF data..."
-  let invalidNt = generateInvalidData
-  let invalidFile = outDir </> "invalid.nt"
-  writeFile invalidFile invalidNt
-  putStrLn $ "  Wrote to " ++ invalidFile
-
-  -- Summary
-  let totalMs = showTimeMs (dataEnd - startTime)
-  putStrLn ""
-  putStrLn $ "Done. Output files in " ++ outDir
-  putStrLn $ "  shapes.nt:  SHACL shapes graph (" ++ show (S.size (Shacl.unShapesGraph shapes)) ++ " shapes, " ++ show (length allTriples) ++ " triples)"
-  putStrLn $ "  data.nt:    conforming RDF data (" ++ show (length allDataDescs) ++ " descriptions)"
-  putStrLn $ "  invalid.nt: non-conforming RDF data"
-  hPutStrLn stderr $ "HYDRA_TIME_MS=" ++ totalMs
-
--- | Encode type elements as SHACL shapes, skipping types that the SHACL language
--- doesn't support (function types, type variables, etc.). Returns the shapes graph
--- and the count of skipped elements.
-encodeShapes :: Context.Context -> Graph -> [Binding] -> (Shacl.ShapesGraph, Int)
-encodeShapes cx graph elements =
-  let results = map (encodeOneShape cx graph) elements
-      successes = [d | Right d <- results]
-      failures = length [() | Left _ <- results]
-  in (Shacl.ShapesGraph (S.fromList successes), failures)
-
--- | Try to encode a single type element as a SHACL Definition<Shape>.
--- Replicates the toShape logic from shaclCoder but returns Either for error recovery.
-encodeOneShape :: Context.Context -> Graph -> Binding -> Either String (Shacl.Definition Shacl.Shape)
-encodeOneShape cx graph el =
-  case DecodeCore.type_ graph (bindingTerm el) of
-    Left de -> Left $ "decode error: " ++ unDecodingError de
-    Right typ ->
-      case ShaclCoder.encodeType (bindingName el) typ cx of
-        Left _ic -> Left $ "encode error for " ++ unName (bindingName el)
-        Right cp -> Right $ Shacl.Definition {
-          Shacl.definitionIri = RdfUtils.nameToIri (bindingName el),
-          Shacl.definitionTarget = Shacl.ShapeNode (Shacl.NodeShape cp) }
-
--- | Encode loaded modules as RDF. Each Module is simplified (element terms stripped)
--- then converted to a term and encoded as RDF via the SHACL term encoder.
--- This is necessary because Module elements can contain arbitrary Hydra terms
--- (functions, type definitions) that the SHACL term encoder doesn't support.
-encodeModulesAsRdf :: Context.Context -> Graph -> [Module] -> IO ([Rdf.Description], Int)
-encodeModulesAsRdf cx graph mods = go cx mods [] 0
-  where
-    go _ [] descs nSkip = return (descs, nSkip)
-    go cx' (m:ms) descs nSkip = do
-      let ns = unNamespace (moduleNamespace m)
-          subject = Rdf.ResourceIri $ Rdf.Iri ("urn:hydra:module:" ++ ns)
-          simplified = simplifyModule m
-          moduleTerm = EncodePackaging.module_ simplified
-      result <- tryEncode subject moduleTerm cx' graph
-      case result of
-        Nothing -> do
-          hPutStrLn stderr $ "  Skipped: " ++ ns
-          go cx' ms descs (nSkip + 1)
-        Just (mDescs, cx'') -> do
-          putStrLn $ "  Encoded: " ++ ns ++ " (" ++ show (length mDescs) ++ " descriptions)"
-          go cx'' ms (descs ++ mDescs) nSkip
-
--- | Simplify a module for RDF encoding by replacing each element's term body
--- with a string literal of the element name. This preserves the module structure
--- (namespace, element names, type schemes, dependencies, description) while
--- avoiding unsupported term variants (functions, type applications, etc.).
-simplifyModule :: Module -> Module
-simplifyModule m = m { moduleDefinitions = map simplifyDef (moduleDefinitions m) }
-  where
-    simplifyDef (DefinitionTerm td) = DefinitionTerm $ td {
-      termDefinitionTerm = TermLiteral (LiteralString (unName (termDefinitionName td))) }
-    simplifyDef d = d
-
--- | Try to encode a term as RDF, catching both Either errors and exceptions.
-tryEncode :: Rdf.Resource -> Term -> Context.Context -> Graph
-          -> IO (Maybe ([Rdf.Description], Context.Context))
-tryEncode subject term cx graph =
-  catch
-    (case ShaclCoder.encodeTerm subject term cx graph of
-      Left _ic -> return Nothing
-      Right (descs, cx') -> do
-        -- Force full evaluation to catch lazy exceptions
-        let nt = Serde.rdfGraphToNtriples $ RdfUtils.descriptionsToGraph descs
-        _ <- evaluate (length nt)
-        return (Just (descs, cx')))
-    (\(_e :: SomeException) -> return Nothing)
-
--- | Generate non-conforming RDF data that should fail SHACL validation.
--- Creates instances typed as kernel types but with missing required fields,
--- wrong value types, etc.
-generateInvalidData :: String
-generateInvalidData = triplesToNtriples $
-  -- A Module missing its required "namespace" field
-  [ triple "urn:invalid:module1" (rdfType) "urn:hydra.module.Module"
-  , tripleL "urn:invalid:module1" "urn:hydra.module#moduleDescription" "A module with no namespace"
-  ] ++
-  -- A Namespace with a non-string value (integer instead of string)
-  [ triple "urn:invalid:ns1" (rdfType) "urn:hydra.module.Namespace"
-  , tripleInt "urn:invalid:ns1" "urn:hydra.module#namespace" 42
-  ] ++
-  -- A QualifiedName missing its required "local" field
-  [ triple "urn:invalid:qn1" (rdfType) "urn:hydra.module.QualifiedName"
-  ]
-  where
-    rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
-
-    triple s p o = Rdf.Triple
-      (Rdf.ResourceIri (Rdf.Iri s))
-      (Rdf.Iri p)
-      (Rdf.NodeIri (Rdf.Iri o))
-
-    tripleL s p v = Rdf.Triple
-      (Rdf.ResourceIri (Rdf.Iri s))
-      (Rdf.Iri p)
-      (Rdf.NodeLiteral (Rdf.Literal v (Rdf.Iri "http://www.w3.org/2001/XMLSchema#string") Nothing))
-
-    tripleInt s p n = Rdf.Triple
-      (Rdf.ResourceIri (Rdf.Iri s))
-      (Rdf.Iri p)
-      (Rdf.NodeLiteral (Rdf.Literal (show n) (Rdf.Iri "http://www.w3.org/2001/XMLSchema#integer") Nothing))
-
--- | Convert triples to N-Triples string via Description intermediary
-triplesToNtriples :: [Rdf.Triple] -> String
-triplesToNtriples triples =
-  Serde.rdfGraphToNtriples $ Rdf.Graph (S.fromList triples)
-
--- | Format picoseconds as milliseconds string
-showTimeMs :: Integer -> String
-showTimeMs ps = show (fromIntegral ps / 1e9 :: Double)
diff --git a/src/main/haskell/Hydra/Demos/Shacl/ShaclRdf.hs b/src/main/haskell/Hydra/Demos/Shacl/ShaclRdf.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/Shacl/ShaclRdf.hs
+++ /dev/null
@@ -1,235 +0,0 @@
--- | Serialize a SHACL ShapesGraph to RDF triples using the SHACL vocabulary.
---
--- Converts Hydra's SHACL model types (ShapesGraph, Definition, Shape,
--- NodeShape, PropertyShape, etc.) into RDF triples using the sh: namespace.
-
-module Hydra.Demos.Shacl.ShaclRdf (
-  shapesGraphToTriples,
-  shapesGraphToNtriples,
-) where
-
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Shacl.Model as Shacl
-import qualified Hydra.Rdf.Serde as Serde
-import qualified Hydra.Rdf.Utils as RdfUtils
-
-import qualified Data.Set as S
-
-
--- | SHACL namespace
-sh :: String -> Rdf.Iri
-sh local = Rdf.Iri ("http://www.w3.org/ns/shacl#" ++ local)
-
--- | RDF namespace
-rdf :: String -> Rdf.Iri
-rdf local = Rdf.Iri ("http://www.w3.org/1999/02/22-rdf-syntax-ns#" ++ local)
-
--- | XSD namespace
-xsd :: String -> Rdf.Iri
-xsd local = Rdf.Iri ("http://www.w3.org/2001/XMLSchema#" ++ local)
-
--- | Create an IRI node
-iriNode :: Rdf.Iri -> Rdf.Node
-iriNode = Rdf.NodeIri
-
--- | Create an IRI resource
-iriResource :: Rdf.Iri -> Rdf.Resource
-iriResource = Rdf.ResourceIri
-
--- | Create a triple from IRI subject, IRI predicate, and IRI object
-tripleIII :: Rdf.Iri -> Rdf.Iri -> Rdf.Iri -> Rdf.Triple
-tripleIII s p o = Rdf.Triple (iriResource s) p (iriNode o)
-
--- | Create a triple from IRI subject, IRI predicate, and node object
-tripleIIN :: Rdf.Iri -> Rdf.Iri -> Rdf.Node -> Rdf.Triple
-tripleIIN s p o = Rdf.Triple (iriResource s) p o
-
--- | Create a triple from resource subject, IRI predicate, and node object
-tripleRIN :: Rdf.Resource -> Rdf.Iri -> Rdf.Node -> Rdf.Triple
-tripleRIN s p o = Rdf.Triple s p o
-
--- | Create a triple from resource subject, IRI predicate, and IRI object
-tripleRII :: Rdf.Resource -> Rdf.Iri -> Rdf.Iri -> Rdf.Triple
-tripleRII s p o = Rdf.Triple s p (iriNode o)
-
--- | Create an integer literal node
-integerNode :: Integer -> Rdf.Node
-integerNode n = Rdf.NodeLiteral $ Rdf.Literal {
-  Rdf.literalLexicalForm = show n,
-  Rdf.literalDatatypeIri = xsd "integer",
-  Rdf.literalLanguageTag = Nothing }
-
--- | Create a boolean literal node
-booleanNode :: Bool -> Rdf.Node
-booleanNode b = Rdf.NodeLiteral $ Rdf.Literal {
-  Rdf.literalLexicalForm = if b then "true" else "false",
-  Rdf.literalDatatypeIri = xsd "boolean",
-  Rdf.literalLanguageTag = Nothing }
-
--- | Create a string literal node
-stringNode :: String -> Rdf.Node
-stringNode s = Rdf.NodeLiteral $ Rdf.Literal {
-  Rdf.literalLexicalForm = s,
-  Rdf.literalDatatypeIri = xsd "string",
-  Rdf.literalLanguageTag = Nothing }
-
--- | Convert a ShapesGraph to RDF triples
-shapesGraphToTriples :: Shacl.ShapesGraph -> [Rdf.Triple]
-shapesGraphToTriples (Shacl.ShapesGraph defs) =
-  concatMap definitionToTriples (S.toList defs)
-
--- | Convert a ShapesGraph to N-Triples string
-shapesGraphToNtriples :: Shacl.ShapesGraph -> String
-shapesGraphToNtriples sg =
-  Serde.rdfGraphToNtriples $ RdfUtils.descriptionsToGraph descs
-  where
-    triples = shapesGraphToTriples sg
-    descs = map tripleToDescription triples
-
--- | Convert a single triple to a description (one triple per description)
-tripleToDescription :: Rdf.Triple -> Rdf.Description
-tripleToDescription t@(Rdf.Triple subj _ _) =
-  Rdf.Description {
-    Rdf.descriptionSubject = resourceToNode subj,
-    Rdf.descriptionGraph = Rdf.Graph (S.singleton t) }
-
--- | Convert a resource to a node
-resourceToNode :: Rdf.Resource -> Rdf.Node
-resourceToNode (Rdf.ResourceIri i) = Rdf.NodeIri i
-resourceToNode (Rdf.ResourceBnode b) = Rdf.NodeBnode b
-
--- | Serialize a Definition<Shape> to triples
-definitionToTriples :: Shacl.Definition Shacl.Shape -> [Rdf.Triple]
-definitionToTriples (Shacl.Definition iri shape) =
-  case shape of
-    Shacl.ShapeNode ns -> nodeShapeToTriples iri ns
-    Shacl.ShapeProperty ps -> propertyShapeToTriples (iriResource iri) ps
-
--- | Serialize a NodeShape to triples
-nodeShapeToTriples :: Rdf.Iri -> Shacl.NodeShape -> [Rdf.Triple]
-nodeShapeToTriples iri (Shacl.NodeShape common) =
-  [ tripleIII iri (rdf "type") (sh "NodeShape"),
-    tripleIII iri (sh "targetClass") iri ]
-  ++ commonPropertiesToTriples (iriResource iri) common
-
--- | Serialize a PropertyShape to triples, given a subject resource (may be blank node)
-propertyShapeToTriples :: Rdf.Resource -> Shacl.PropertyShape -> [Rdf.Triple]
-propertyShapeToTriples subj ps =
-  [ tripleRII subj (rdf "type") (sh "PropertyShape"),
-    tripleRII subj (sh "path") (Shacl.propertyShapePath ps) ]
-  ++ commonPropertiesToTriples subj (Shacl.propertyShapeCommon ps)
-  ++ concatMap (propertyShapeConstraintToTriples subj) (S.toList $ Shacl.propertyShapeConstraints ps)
-  ++ maybe [] (\n -> [tripleRIN subj (sh "order") (integerNode n)]) (Shacl.propertyShapeOrder ps)
-
--- | Serialize CommonProperties to triples
-commonPropertiesToTriples :: Rdf.Resource -> Shacl.CommonProperties -> [Rdf.Triple]
-commonPropertiesToTriples subj cp =
-  concatMap (commonConstraintToTriples subj) (S.toList $ Shacl.commonPropertiesConstraints cp)
-  ++ maybe [] (\b -> [tripleRIN subj (sh "deactivated") (booleanNode b)]) (Shacl.commonPropertiesDeactivated cp)
-  -- Note: targetClass, targetNode, targetObjectsOf, targetSubjectsOf are typically empty
-  -- for shapes generated by the Hydra SHACL coder. The RDF model's RdfsClass and Property
-  -- types are stand-ins (not IRIs), so we skip them if non-empty.
-  ++ concatMap (\n -> [tripleRIN subj (sh "targetNode") (iriOrLiteralToNode n)]) (S.toList $ Shacl.commonPropertiesTargetNode cp)
-
--- | Serialize a CommonConstraint to triples
-commonConstraintToTriples :: Rdf.Resource -> Shacl.CommonConstraint -> [Rdf.Triple]
-commonConstraintToTriples subj cc = case cc of
-  Shacl.CommonConstraintDatatype iri ->
-    [tripleRII subj (sh "datatype") iri]
-  Shacl.CommonConstraintClass _classes ->
-    [] -- RdfsClass is a stand-in type (wraps ()), not usable as an IRI
-  Shacl.CommonConstraintNodeKind nk ->
-    [tripleRII subj (sh "nodeKind") (nodeKindToIri nk)]
-  Shacl.CommonConstraintProperty refs ->
-    concatMap (propertyRefToTriples subj) (S.toList refs)
-  Shacl.CommonConstraintMaxInclusive lit ->
-    [tripleRIN subj (sh "maxInclusive") (Rdf.NodeLiteral lit)]
-  Shacl.CommonConstraintMinInclusive lit ->
-    [tripleRIN subj (sh "minInclusive") (Rdf.NodeLiteral lit)]
-  Shacl.CommonConstraintMaxExclusive lit ->
-    [tripleRIN subj (sh "maxExclusive") (Rdf.NodeLiteral lit)]
-  Shacl.CommonConstraintMinExclusive lit ->
-    [tripleRIN subj (sh "minExclusive") (Rdf.NodeLiteral lit)]
-  Shacl.CommonConstraintMaxLength n ->
-    [tripleRIN subj (sh "maxLength") (integerNode n)]
-  Shacl.CommonConstraintMinLength n ->
-    [tripleRIN subj (sh "minLength") (integerNode n)]
-  Shacl.CommonConstraintPattern (Shacl.Pattern regex flags) ->
-    [tripleRIN subj (sh "pattern") (stringNode regex)]
-    ++ maybe [] (\f -> [tripleRIN subj (sh "flags") (stringNode f)]) flags
-  Shacl.CommonConstraintClosed (Shacl.Closed isClosed _ignored) ->
-    [tripleRIN subj (sh "closed") (booleanNode isClosed)]
-  Shacl.CommonConstraintHasValue nodes ->
-    concatMap (\n -> [tripleRIN subj (sh "hasValue") n]) (S.toList nodes)
-  Shacl.CommonConstraintIn nodes ->
-    -- sh:in is an RDF list; simplified here as individual triples
-    concatMap (\n -> [tripleRIN subj (sh "in") n]) nodes
-  Shacl.CommonConstraintNode refs ->
-    concatMap (\ref -> case ref of
-      Shacl.ReferenceNamed iri -> [tripleRII subj (sh "node") iri]
-      _ -> []) (S.toList refs)
-  Shacl.CommonConstraintNot refs ->
-    concatMap (\ref -> case ref of
-      Shacl.ReferenceNamed iri -> [tripleRII subj (sh "not") iri]
-      _ -> []) (S.toList refs)
-  Shacl.CommonConstraintAnd refs ->
-    concatMap (\ref -> case ref of
-      Shacl.ReferenceNamed iri -> [tripleRII subj (sh "and") iri]
-      _ -> []) (S.toList refs)
-  Shacl.CommonConstraintOr refs ->
-    concatMap (\ref -> case ref of
-      Shacl.ReferenceNamed iri -> [tripleRII subj (sh "or") iri]
-      _ -> []) (S.toList refs)
-  Shacl.CommonConstraintXone refs ->
-    concatMap (\ref -> case ref of
-      Shacl.ReferenceNamed iri -> [tripleRII subj (sh "xone") iri]
-      _ -> []) (S.toList refs)
-  Shacl.CommonConstraintEquals _props ->
-    [] -- Property is a stand-in type, not usable as an IRI
-  Shacl.CommonConstraintDisjoint _props ->
-    [] -- Property is a stand-in type, not usable as an IRI
-  Shacl.CommonConstraintLanguageIn _tags ->
-    [] -- Language-in requires RDF list encoding; omit for now
-
--- | Serialize a property shape reference (may be inline or named)
-propertyRefToTriples :: Rdf.Resource -> Shacl.Reference Shacl.PropertyShape -> [Rdf.Triple]
-propertyRefToTriples subj ref = case ref of
-  Shacl.ReferenceNamed iri ->
-    [tripleRII subj (sh "property") iri]
-  Shacl.ReferenceDefinition (Shacl.Definition iri ps) ->
-    [tripleRII subj (sh "property") iri]
-    ++ propertyShapeToTriples (iriResource iri) ps
-  Shacl.ReferenceAnonymous _ps ->
-    -- Anonymous property shapes would need blank node allocation; skip for now
-    []
-
--- | Serialize a PropertyShapeConstraint to triples
-propertyShapeConstraintToTriples :: Rdf.Resource -> Shacl.PropertyShapeConstraint -> [Rdf.Triple]
-propertyShapeConstraintToTriples subj psc = case psc of
-  Shacl.PropertyShapeConstraintMinCount n ->
-    [tripleRIN subj (sh "minCount") (integerNode n)]
-  Shacl.PropertyShapeConstraintMaxCount n ->
-    [tripleRIN subj (sh "maxCount") (integerNode n)]
-  Shacl.PropertyShapeConstraintLessThan _props ->
-    [] -- Property is a stand-in type, not usable as an IRI
-  Shacl.PropertyShapeConstraintLessThanOrEquals _props ->
-    [] -- Property is a stand-in type, not usable as an IRI
-  Shacl.PropertyShapeConstraintUniqueLang b ->
-    [tripleRIN subj (sh "uniqueLang") (booleanNode b)]
-  Shacl.PropertyShapeConstraintQualifiedValueShape _ ->
-    [] -- Complex; omit for now
-
--- | Convert a NodeKind to its SHACL IRI
-nodeKindToIri :: Shacl.NodeKind -> Rdf.Iri
-nodeKindToIri nk = case nk of
-  Shacl.NodeKindBlankNode -> sh "BlankNode"
-  Shacl.NodeKindIri -> sh "IRI"
-  Shacl.NodeKindLiteral -> sh "Literal"
-  Shacl.NodeKindBlankNodeOrIri -> sh "BlankNodeOrIRI"
-  Shacl.NodeKindBlankNodeOrLiteral -> sh "BlankNodeOrLiteral"
-  Shacl.NodeKindIriOrLiteral -> sh "IRIOrLiteral"
-
--- | Convert an IriOrLiteral to an RDF Node
-iriOrLiteralToNode :: Rdf.IriOrLiteral -> Rdf.Node
-iriOrLiteralToNode (Rdf.IriOrLiteralIri iri) = Rdf.NodeIri iri
-iriOrLiteralToNode (Rdf.IriOrLiteralLiteral lit) = Rdf.NodeLiteral lit
diff --git a/src/main/haskell/Hydra/Demos/ValidatePg/Demo.hs b/src/main/haskell/Hydra/Demos/ValidatePg/Demo.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Demos/ValidatePg/Demo.hs
+++ /dev/null
@@ -1,360 +0,0 @@
--- | Haskell driver for the PG validation translingual demo.
---
--- Reads a schema JSON file and graph JSON files (produced by GenerateData using
--- hydra.encode.pg.model), validates each graph against the schema using
--- Hydra.Validate.Pg, and prints the results.
---
--- Usage: runhaskell ValidateDemo.hs <data-directory>
-
-module Hydra.Demos.ValidatePg.Demo where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Pg.Model as Pg
-import qualified Hydra.Validate.Pg as Validation
-import qualified Hydra.Error.Pg as Err
-import qualified Hydra.Json.Model as Json
-
-import qualified Data.Aeson as A
-import qualified Data.Aeson.KeyMap as AKM
-import qualified Data.Aeson.Key as AK
-import qualified Data.ByteString.Lazy as BS
-import qualified Data.ByteString.Char8 as BS8
-import qualified Data.Map as M
-import qualified Data.Scientific as SC
-import qualified Data.Text as T
-import qualified Data.Vector as V
-
-import System.CPUTime (getCPUTime)
-import System.Directory (doesFileExist)
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import System.FilePath ((</>))
-import System.IO (hFlush, stdout, hPutStrLn, stderr)
-
-
-main :: IO ()
-main = do
-  args <- getArgs
-  case args of
-    [dataDir] -> runDemo dataDir
-    _ -> do
-      hPutStrLn stderr "Usage: ValidateDemo <data-directory>"
-      exitFailure
-
-runDemo :: FilePath -> IO ()
-runDemo dataDir = do
-  -- Load data (I/O, not timed)
-  schemaJson <- loadJsonFile (dataDir </> "schema.json")
-  let schema = decodeGraphSchema schemaJson
-  graphData <- mapM (loadGraph dataDir) graphNames
-  let loaded = [(n, g) | (n, Just g) <- zip graphNames graphData]
-
-  -- Validate (timed: Hydra computation only)
-  startTime <- getCPUTime
-  mapM_ (uncurry (printResult schema)) loaded
-  endTime <- getCPUTime
-
-  let elapsedPs = endTime - startTime
-      elapsedMs = fromIntegral elapsedPs / 1e9 :: Double
-  hPutStrLn stderr $ "HYDRA_TIME_MS=" ++ show elapsedMs
-
-loadGraph :: FilePath -> String -> IO (Maybe (Pg.Graph Core.Literal))
-loadGraph dataDir name = do
-  let path = dataDir </> name ++ ".json"
-  exists <- doesFileExist path
-  if exists
-    then do
-      graphJson <- loadJsonFile path
-      return (Just (decodeGraph graphJson))
-    else return Nothing
-
-printResult :: Pg.GraphSchema Core.LiteralType -> String -> Pg.Graph Core.Literal -> IO ()
-printResult schema name graph = do
-  let result = Validation.validateGraph checkLiteral schema graph
-  case result of
-    Nothing  -> log $ "Graph \"" ++ name ++ "\": VALID"
-    Just err -> log $ "Graph \"" ++ name ++ "\": INVALID - " ++ show err
-  where
-    log msg = putStrLn msg >> hFlush stdout
-
-graphNames :: [String]
-graphNames =
-  [ "valid_social_network"
-  , "missing_required_property"
-  , "wrong_id_type"
-  , "unknown_edge_endpoint"
-  , "unexpected_vertex_label"
-  , "unexpected_edge_label"
-  , "property_value_type_mismatch"
-  , "unexpected_property_key"
-  , "wrong_in_vertex_label"
-  , "wrong_out_vertex_label"
-  , "missing_required_edge_property"
-  ]
-
--- | Check that a literal value matches a literal type.
-checkLiteral :: Core.LiteralType -> Core.Literal -> Maybe Err.InvalidValueError
-checkLiteral lt lv = if showLiteralType lt == literalFamily lv
-  then Nothing
-  else Just $ Err.InvalidValueError {
-    Err.invalidValueErrorExpectedType = showLiteralType lt,
-    Err.invalidValueErrorValue = showLiteral lv }
-
-showLiteralType :: Core.LiteralType -> String
-showLiteralType lt = case lt of
-  Core.LiteralTypeBinary    -> "binary"
-  Core.LiteralTypeBoolean   -> "boolean"
-  Core.LiteralTypeString    -> "string"
-  Core.LiteralTypeFloat ft  -> "float:" ++ showFloatType ft
-  Core.LiteralTypeInteger it -> "integer:" ++ showIntegerType it
-
-showFloatType :: Core.FloatType -> String
-showFloatType ft = case ft of
-  Core.FloatTypeBigfloat -> "bigfloat"
-  Core.FloatTypeFloat32  -> "float32"
-  Core.FloatTypeFloat64  -> "float64"
-
-showIntegerType :: Core.IntegerType -> String
-showIntegerType it = case it of
-  Core.IntegerTypeBigint -> "bigint"
-  Core.IntegerTypeInt8   -> "int8"
-  Core.IntegerTypeInt16  -> "int16"
-  Core.IntegerTypeInt32  -> "int32"
-  Core.IntegerTypeInt64  -> "int64"
-  Core.IntegerTypeUint8  -> "uint8"
-  Core.IntegerTypeUint16 -> "uint16"
-  Core.IntegerTypeUint32 -> "uint32"
-  Core.IntegerTypeUint64 -> "uint64"
-
-showLiteral :: Core.Literal -> String
-showLiteral l = case l of
-  Core.LiteralBinary _    -> "binary:..."
-  Core.LiteralBoolean b   -> "boolean:" ++ show b
-  Core.LiteralString s    -> "string:\"" ++ s ++ "\""
-  Core.LiteralFloat fv    -> showFloatValue fv
-  Core.LiteralInteger iv  -> showIntegerValue iv
-
-showFloatValue :: Core.FloatValue -> String
-showFloatValue fv = case fv of
-  Core.FloatValueBigfloat d -> "float:bigfloat:" ++ show d
-  Core.FloatValueFloat32 f  -> "float:float32:" ++ show f
-  Core.FloatValueFloat64 d  -> "float:float64:" ++ show d
-
-showIntegerValue :: Core.IntegerValue -> String
-showIntegerValue iv = case iv of
-  Core.IntegerValueBigint n  -> "integer:bigint:" ++ show n
-  Core.IntegerValueInt8 n    -> "integer:int8:" ++ show n
-  Core.IntegerValueInt16 n   -> "integer:int16:" ++ show n
-  Core.IntegerValueInt32 n   -> "integer:int32:" ++ show n
-  Core.IntegerValueInt64 n   -> "integer:int64:" ++ show n
-  Core.IntegerValueUint8 n   -> "integer:uint8:" ++ show n
-  Core.IntegerValueUint16 n  -> "integer:uint16:" ++ show n
-  Core.IntegerValueUint32 n  -> "integer:uint32:" ++ show n
-  Core.IntegerValueUint64 n  -> "integer:uint64:" ++ show n
-
-literalFamily :: Core.Literal -> String
-literalFamily l = case l of
-  Core.LiteralBinary _    -> "binary"
-  Core.LiteralBoolean _   -> "boolean"
-  Core.LiteralString _    -> "string"
-  Core.LiteralFloat fv    -> "float:" ++ floatFamily fv
-  Core.LiteralInteger iv  -> "integer:" ++ integerFamily iv
-  where
-    floatFamily fv = case fv of
-      Core.FloatValueBigfloat _ -> "bigfloat"
-      Core.FloatValueFloat32 _  -> "float32"
-      Core.FloatValueFloat64 _  -> "float64"
-    integerFamily iv = case iv of
-      Core.IntegerValueBigint _  -> "bigint"
-      Core.IntegerValueInt8 _    -> "int8"
-      Core.IntegerValueInt16 _   -> "int16"
-      Core.IntegerValueInt32 _   -> "int32"
-      Core.IntegerValueInt64 _   -> "int64"
-      Core.IntegerValueUint8 _   -> "uint8"
-      Core.IntegerValueUint16 _  -> "uint16"
-      Core.IntegerValueUint32 _  -> "uint32"
-      Core.IntegerValueUint64 _  -> "uint64"
-
-
--- ============================================================================
--- JSON parsing (Aeson → Hydra JSON)
--- ============================================================================
-
-loadJsonFile :: FilePath -> IO Json.Value
-loadJsonFile fp = do
-  content <- BS.readFile fp
-  case A.eitherDecode content of
-    Left err -> fail $ "JSON parse error in " ++ fp ++ ": " ++ err
-    Right v  -> return (aesonToHydra v)
-
-aesonToHydra :: A.Value -> Json.Value
-aesonToHydra v = case v of
-  A.Object km -> Json.ValueObject $ M.fromList [(AK.toString k, aesonToHydra v') | (k, v') <- AKM.toList km]
-  A.Array a   -> Json.ValueArray [aesonToHydra x | x <- V.toList a]
-  A.String t  -> Json.ValueString (T.unpack t)
-  A.Number s  -> Json.ValueNumber s
-  A.Bool b    -> Json.ValueBoolean b
-  A.Null      -> Json.ValueNull
-
-
--- ============================================================================
--- JSON → PG model decoders
--- ============================================================================
-
-decodeGraphSchema :: Json.Value -> Pg.GraphSchema Core.LiteralType
-decodeGraphSchema json = Pg.GraphSchema
-  (decodeMap (requireField obj "vertices") (Pg.VertexLabel . expectString) decodeVertexType)
-  (decodeMap (requireField obj "edges") (Pg.EdgeLabel . expectString) decodeEdgeType)
-  where obj = expectObject json
-
-decodeGraph :: Json.Value -> Pg.Graph Core.Literal
-decodeGraph json = Pg.Graph
-  (decodeMap (requireField obj "vertices") decodeLiteral decodeVertex)
-  (decodeMap (requireField obj "edges") decodeLiteral decodeEdge)
-  where obj = expectObject json
-
-decodeVertexType :: Json.Value -> Pg.VertexType Core.LiteralType
-decodeVertexType json = Pg.VertexType
-  (Pg.VertexLabel $ expectString $ requireField obj "label")
-  (decodeLiteralType $ requireField obj "id")
-  (decodeList (requireField obj "properties") decodePropertyType)
-  where obj = expectObject json
-
-decodeEdgeType :: Json.Value -> Pg.EdgeType Core.LiteralType
-decodeEdgeType json = Pg.EdgeType
-  (Pg.EdgeLabel $ expectString $ requireField obj "label")
-  (decodeLiteralType $ requireField obj "id")
-  (Pg.VertexLabel $ expectString $ requireField obj "out")
-  (Pg.VertexLabel $ expectString $ requireField obj "in")
-  (decodeList (requireField obj "properties") decodePropertyType)
-  where obj = expectObject json
-
-decodePropertyType :: Json.Value -> Pg.PropertyType Core.LiteralType
-decodePropertyType json = Pg.PropertyType
-  (Pg.PropertyKey $ expectString $ requireField obj "key")
-  (decodeLiteralType $ requireField obj "value")
-  (expectBoolean $ requireField obj "required")
-  where obj = expectObject json
-
-decodeVertex :: Json.Value -> Pg.Vertex Core.Literal
-decodeVertex json = Pg.Vertex
-  (Pg.VertexLabel $ expectString $ requireField obj "label")
-  (decodeLiteral $ requireField obj "id")
-  (decodeMap (requireField obj "properties") (Pg.PropertyKey . expectString) decodeLiteral)
-  where obj = expectObject json
-
-decodeEdge :: Json.Value -> Pg.Edge Core.Literal
-decodeEdge json = Pg.Edge
-  (Pg.EdgeLabel $ expectString $ requireField obj "label")
-  (decodeLiteral $ requireField obj "id")
-  (decodeLiteral $ requireField obj "out")
-  (decodeLiteral $ requireField obj "in")
-  (decodeMap (requireField obj "properties") (Pg.PropertyKey . expectString) decodeLiteral)
-  where obj = expectObject json
-
-decodeLiteralType :: Json.Value -> Core.LiteralType
-decodeLiteralType json
-  | hasField obj "binary"  = Core.LiteralTypeBinary
-  | hasField obj "boolean" = Core.LiteralTypeBoolean
-  | hasField obj "string"  = Core.LiteralTypeString
-  | hasField obj "float"   = Core.LiteralTypeFloat $ decodeFloatType (requireField obj "float")
-  | hasField obj "integer" = Core.LiteralTypeInteger $ decodeIntegerType (requireField obj "integer")
-  | otherwise = error $ "Unknown literal type"
-  where obj = expectObject json
-
-decodeFloatType :: Json.Value -> Core.FloatType
-decodeFloatType json
-  | hasField obj "bigfloat" = Core.FloatTypeBigfloat
-  | hasField obj "float32"  = Core.FloatTypeFloat32
-  | hasField obj "float64"  = Core.FloatTypeFloat64
-  | otherwise = error "Unknown float type"
-  where obj = expectObject json
-
-decodeIntegerType :: Json.Value -> Core.IntegerType
-decodeIntegerType json
-  | hasField obj "bigint" = Core.IntegerTypeBigint
-  | hasField obj "int8"   = Core.IntegerTypeInt8
-  | hasField obj "int16"  = Core.IntegerTypeInt16
-  | hasField obj "int32"  = Core.IntegerTypeInt32
-  | hasField obj "int64"  = Core.IntegerTypeInt64
-  | hasField obj "uint8"  = Core.IntegerTypeUint8
-  | hasField obj "uint16" = Core.IntegerTypeUint16
-  | hasField obj "uint32" = Core.IntegerTypeUint32
-  | hasField obj "uint64" = Core.IntegerTypeUint64
-  | otherwise = error "Unknown integer type"
-  where obj = expectObject json
-
-decodeLiteral :: Json.Value -> Core.Literal
-decodeLiteral json
-  | hasField obj "binary"  = Core.LiteralBinary $ BS8.pack $ expectString (requireField obj "binary")
-  | hasField obj "boolean" = Core.LiteralBoolean $ expectBoolean (requireField obj "boolean")
-  | hasField obj "string"  = Core.LiteralString $ expectString (requireField obj "string")
-  | hasField obj "float"   = Core.LiteralFloat $ decodeFloatValue (requireField obj "float")
-  | hasField obj "integer" = Core.LiteralInteger $ decodeIntegerValue (requireField obj "integer")
-  | otherwise = error "Unknown literal"
-  where obj = expectObject json
-
-decodeFloatValue :: Json.Value -> Core.FloatValue
-decodeFloatValue json
-  | hasField obj "bigfloat" = Core.FloatValueBigfloat $ expectNumber (requireField obj "bigfloat")
-  | hasField obj "float32"  = Core.FloatValueFloat32 $ realToFrac $ expectNumber (requireField obj "float32")
-  | hasField obj "float64"  = Core.FloatValueFloat64 $ expectNumber (requireField obj "float64")
-  | otherwise = error "Unknown float value"
-  where obj = expectObject json
-
-decodeIntegerValue :: Json.Value -> Core.IntegerValue
-decodeIntegerValue json
-  | hasField obj "bigint" = Core.IntegerValueBigint $ round $ expectNumber (requireField obj "bigint")
-  | hasField obj "int8"   = Core.IntegerValueInt8 $ round $ expectNumber (requireField obj "int8")
-  | hasField obj "int16"  = Core.IntegerValueInt16 $ round $ expectNumber (requireField obj "int16")
-  | hasField obj "int32"  = Core.IntegerValueInt32 $ round $ expectNumber (requireField obj "int32")
-  | hasField obj "int64"  = Core.IntegerValueInt64 $ round $ expectNumber (requireField obj "int64")
-  | hasField obj "uint8"  = Core.IntegerValueUint8 $ round $ expectNumber (requireField obj "uint8")
-  | hasField obj "uint16" = Core.IntegerValueUint16 $ round $ expectNumber (requireField obj "uint16")
-  | hasField obj "uint32" = Core.IntegerValueUint32 $ round $ expectNumber (requireField obj "uint32")
-  | hasField obj "uint64" = Core.IntegerValueUint64 $ round $ expectNumber (requireField obj "uint64")
-  | otherwise = error "Unknown integer value"
-  where obj = expectObject json
-
-
--- ============================================================================
--- JSON helpers
--- ============================================================================
-
-decodeMap :: Ord k => Json.Value -> (Json.Value -> k) -> (Json.Value -> v) -> M.Map k v
-decodeMap json decodeKey decodeValue = M.fromList $ fmap decodePair entries
-  where
-    entries = expectArray json
-    decodePair entry = (decodeKey (requireField obj "@key"), decodeValue (requireField obj "@value"))
-      where obj = expectObject entry
-
-decodeList :: Json.Value -> (Json.Value -> a) -> [a]
-decodeList json decode = fmap decode (expectArray json)
-
-expectObject :: Json.Value -> M.Map String Json.Value
-expectObject (Json.ValueObject m) = m
-expectObject _ = error "Expected JSON object"
-
-expectArray :: Json.Value -> [Json.Value]
-expectArray (Json.ValueArray a) = a
-expectArray _ = error "Expected JSON array"
-
-expectString :: Json.Value -> String
-expectString (Json.ValueString s) = s
-expectString _ = error "Expected JSON string"
-
-expectBoolean :: Json.Value -> Bool
-expectBoolean (Json.ValueBoolean b) = b
-expectBoolean _ = error "Expected JSON boolean"
-
-expectNumber :: Json.Value -> Double
-expectNumber (Json.ValueNumber n) = SC.toRealFloat n
-expectNumber _ = error "Expected JSON number"
-
-requireField :: M.Map String Json.Value -> String -> Json.Value
-requireField obj name = case M.lookup name obj of
-  Just v  -> v
-  Nothing -> error $ "Missing required field: " ++ name
-
-hasField :: M.Map String Json.Value -> String -> Bool
-hasField obj name = M.member name obj
diff --git a/src/main/haskell/Hydra/Dependencies.hs b/src/main/haskell/Hydra/Dependencies.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dependencies.hs
+++ /dev/null
@@ -1,306 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Dependency extraction, binding sort, and let normalization
-
-module Hydra.Dependencies where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variables as Variables
-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
--- | Get definitions with their dependencies
-definitionsWithDependencies :: t0 -> Graph.Graph -> [Core.Binding] -> Either Errors.Error [Core.Binding]
-definitionsWithDependencies cx graph original =
-
-      let depNames = \el -> Sets.toList (termDependencyNames True False False (Core.bindingTerm el))
-          allDepNames = Lists.nub (Lists.concat2 (Lists.map Core.bindingName original) (Lists.concat (Lists.map depNames original)))
-      in (Eithers.mapList (\name -> Lexical.requireBinding graph name) allDepNames)
--- | Flatten nested let expressions
-flattenLetTerms :: Core.Term -> Core.Term
-flattenLetTerms term =
-
-      let rewriteBinding =
-              \binding ->
-                let key0 = Core.bindingName binding
-                    val0 = Core.bindingTerm binding
-                    t = Core.bindingTypeScheme binding
-                in case val0 of
-                  Core.TermAnnotated v0 ->
-                    let val1 = Core.annotatedTermBody v0
-                        ann = Core.annotatedTermAnnotation v0
-                        recursive =
-                                rewriteBinding (Core.Binding {
-                                  Core.bindingName = key0,
-                                  Core.bindingTerm = val1,
-                                  Core.bindingTypeScheme = t})
-                        innerBinding = Pairs.first recursive
-                        deps = Pairs.second recursive
-                        val2 = Core.bindingTerm innerBinding
-                    in (Core.Binding {
-                      Core.bindingName = key0,
-                      Core.bindingTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                        Core.annotatedTermBody = val2,
-                        Core.annotatedTermAnnotation = ann})),
-                      Core.bindingTypeScheme = t}, deps)
-                  Core.TermLet v0 ->
-                    let bindings1 = Core.letBindings v0
-                        body1 = Core.letBody v0
-                        prefix = Strings.cat2 (Core.unName key0) "_"
-                        qualify = \n -> Core.Name (Strings.cat2 prefix (Core.unName n))
-                        toSubstPair = \b -> (Core.bindingName b, (qualify (Core.bindingName b)))
-                        subst = Maps.fromList (Lists.map toSubstPair bindings1)
-                        replaceVars = Variables.substituteVariables subst
-                        newBody = replaceVars body1
-                        newBinding =
-                                \b -> Core.Binding {
-                                  Core.bindingName = (qualify (Core.bindingName b)),
-                                  Core.bindingTerm = (replaceVars (Core.bindingTerm b)),
-                                  Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                    in (Core.Binding {
-                      Core.bindingName = key0,
-                      Core.bindingTerm = newBody,
-                      Core.bindingTypeScheme = t}, (Lists.map newBinding bindings1))
-                  _ -> (Core.Binding {
-                    Core.bindingName = key0,
-                    Core.bindingTerm = val0,
-                    Core.bindingTypeScheme = t}, [])
-          flattenBodyLet =
-                  \bindings -> \body -> case body of
-                    Core.TermLet v0 ->
-                      let innerBindings = Core.letBindings v0
-                          innerBody = Core.letBody v0
-                      in (flattenBodyLet (Lists.concat2 bindings innerBindings) innerBody)
-                    _ -> (Lists.concat2 [] bindings, body)
-          flatten =
-                  \recurse -> \term2 ->
-                    let rewritten = recurse term2
-                    in case rewritten of
-                      Core.TermLet v0 ->
-                        let bindings = Core.letBindings v0
-                            body = Core.letBody v0
-                            forResult = \hr -> Lists.concat2 (Pairs.second hr) (Lists.pure (Pairs.first hr))
-                            flattenedBindings = Lists.concat (Lists.map (\arg_ -> forResult (rewriteBinding arg_)) bindings)
-                            merged = flattenBodyLet flattenedBindings body
-                            newBindings = Pairs.first merged
-                            newBody = Pairs.second merged
-                        in (Core.TermLet (Core.Let {
-                          Core.letBindings = newBindings,
-                          Core.letBody = newBody}))
-                      _ -> rewritten
-      in (Rewriting.rewriteTerm flatten term)
--- | Inline all type variables in a type using the provided schema (Either version). Note: this function is only appropriate for nonrecursive type definitions
-inlineType :: M.Map Core.Name Core.Type -> Core.Type -> Either Errors.Error Core.Type
-inlineType schema typ =
-
-      let f =
-              \recurse -> \typ2 ->
-                let afterRecurse =
-                        \tr -> case tr of
-                          Core.TypeVariable v0 -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "No such type in schema: " (Core.unName v0))))) (inlineType schema) (Maps.lookup v0 schema)
-                          _ -> Right tr
-                in (Eithers.bind (recurse typ2) (\tr -> afterRecurse tr))
-      in (Rewriting.rewriteTypeM f typ)
--- | Check whether a term is a lambda, possibly nested within let and/or annotation terms
-isLambda :: Core.Term -> Bool
-isLambda term =
-    case (Strip.deannotateTerm term) of
-      Core.TermLambda _ -> True
-      Core.TermLet v0 -> isLambda (Core.letBody v0)
-      _ -> False
--- | Rewrite terms like `let foo = bar in λx.baz` to `λx.let foo = bar in baz`, lifting lambda-bound variables above let-bound variables, recursively. This is helpful for targets such as Python.
-liftLambdaAboveLet :: Core.Term -> Core.Term
-liftLambdaAboveLet term0 =
-
-      let rewrite =
-              \recurse -> \term ->
-                let rewriteBinding =
-                        \b -> Core.Binding {
-                          Core.bindingName = (Core.bindingName b),
-                          Core.bindingTerm = (rewrite recurse (Core.bindingTerm b)),
-                          Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                    rewriteBindings = \bs -> Lists.map rewriteBinding bs
-                    digForLambdas =
-                            \original -> \cons -> \term2 -> case term2 of
-                              Core.TermAnnotated v0 -> digForLambdas original (\t -> Core.TermAnnotated (Core.AnnotatedTerm {
-                                Core.annotatedTermBody = (cons t),
-                                Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})) (Core.annotatedTermBody v0)
-                              Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.lambdaParameter v0),
-                                Core.lambdaDomain = (Core.lambdaDomain v0),
-                                Core.lambdaBody = (digForLambdas (cons (Core.lambdaBody v0)) (\t -> cons t) (Core.lambdaBody v0))})
-                              Core.TermLet v0 -> digForLambdas original (\t -> cons (Core.TermLet (Core.Let {
-                                Core.letBindings = (rewriteBindings (Core.letBindings v0)),
-                                Core.letBody = t}))) (Core.letBody v0)
-                              _ -> recurse original
-                in case term of
-                  Core.TermLet v0 -> digForLambdas term (\t -> Core.TermLet (Core.Let {
-                    Core.letBindings = (rewriteBindings (Core.letBindings v0)),
-                    Core.letBody = t})) (Core.letBody v0)
-                  _ -> recurse term
-      in (Rewriting.rewriteTerm rewrite term0)
--- | Given a let expression, remove any unused bindings. The resulting expression is still a let, even if has no remaining bindings
-pruneLet :: Core.Let -> Core.Let
-pruneLet l =
-
-      let bindingMap = Maps.fromList (Lists.map (\b -> (Core.bindingName b, (Core.bindingTerm b))) (Core.letBindings l))
-          rootName = Core.Name "[[[root]]]"
-          adj =
-                  \n -> Sets.intersection (Sets.fromList (Maps.keys bindingMap)) (Variables.freeVariablesInTerm (Logic.ifElse (Equality.equal n rootName) (Core.letBody l) (Maybes.fromMaybe Core.TermUnit (Maps.lookup n bindingMap))))
-          reachable = Sorting.findReachableNodes adj rootName
-          prunedBindings = Lists.filter (\b -> Sets.member (Core.bindingName b) reachable) (Core.letBindings l)
-      in Core.Let {
-        Core.letBindings = prunedBindings,
-        Core.letBody = (Core.letBody l)}
--- | Replace all occurrences of simple typedefs (type aliases) with the aliased types, recursively
-replaceTypedefs :: M.Map Core.Name Core.TypeScheme -> Core.Type -> Core.Type
-replaceTypedefs types typ0 =
-
-      let rewrite =
-              \recurse -> \typ -> case typ of
-                Core.TypeAnnotated v0 -> Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (rewrite recurse (Core.annotatedTypeBody v0)),
-                  Core.annotatedTypeAnnotation = (Core.annotatedTypeAnnotation v0)})
-                Core.TypeRecord _ -> typ
-                Core.TypeUnion _ -> typ
-                Core.TypeVariable v0 ->
-                  let forMono =
-                          \t -> case t of
-                            Core.TypeRecord _ -> typ
-                            Core.TypeUnion _ -> typ
-                            Core.TypeWrap _ -> typ
-                            _ -> rewrite recurse t
-                      forTypeScheme =
-                              \ts ->
-                                let t = Core.typeSchemeBody ts
-                                in (Logic.ifElse (Lists.null (Core.typeSchemeVariables ts)) (forMono t) typ)
-                  in (Maybes.maybe typ (\ts -> forTypeScheme ts) (Maps.lookup v0 types))
-                Core.TypeWrap _ -> typ
-                _ -> recurse typ
-      in (Rewriting.rewriteType rewrite typ0)
--- | Simplify terms by applying beta reduction where possible
-simplifyTerm :: Core.Term -> Core.Term
-simplifyTerm term =
-
-      let simplify =
-              \recurse -> \term2 ->
-                let forRhs =
-                        \rhs -> \var -> \body -> case (Strip.deannotateTerm rhs) of
-                          Core.TermVariable v0 -> simplifyTerm (Variables.substituteVariable var v0 body)
-                          _ -> term2
-                    forLhs =
-                            \lhs -> \rhs -> case (Strip.deannotateTerm lhs) of
-                              Core.TermLambda v0 ->
-                                let var = Core.lambdaParameter v0
-                                    body = Core.lambdaBody v0
-                                in (Logic.ifElse (Sets.member var (Variables.freeVariablesInTerm body)) (forRhs rhs var body) (simplifyTerm body))
-                              _ -> term2
-                    forTerm =
-                            \stripped -> case stripped of
-                              Core.TermApplication v0 ->
-                                let lhs = Core.applicationFunction v0
-                                    rhs = Core.applicationArgument v0
-                                in (forLhs lhs rhs)
-                              _ -> term2
-                    stripped = Strip.deannotateTerm term2
-                in (recurse (forTerm stripped))
-      in (Rewriting.rewriteTerm simplify term)
--- | Note: does not distinguish between bound and free variables; use freeVariablesInTerm for that
-termDependencyNames :: Bool -> Bool -> Bool -> Core.Term -> S.Set Core.Name
-termDependencyNames binds withPrims withNoms term0 =
-
-      let addNames =
-              \names -> \term ->
-                let nominal = \name -> Logic.ifElse withNoms (Sets.insert name names) names
-                    prim = \name -> Logic.ifElse withPrims (Sets.insert name names) names
-                    var = \name -> Logic.ifElse binds (Sets.insert name names) names
-                in case term of
-                  Core.TermCases v0 -> nominal (Core.caseStatementTypeName v0)
-                  Core.TermProject v0 -> nominal (Core.projectionTypeName v0)
-                  Core.TermUnwrap v0 -> nominal v0
-                  Core.TermRecord v0 -> nominal (Core.recordTypeName v0)
-                  Core.TermInject v0 -> nominal (Core.injectionTypeName v0)
-                  Core.TermVariable v0 -> var v0
-                  Core.TermWrap v0 -> nominal (Core.wrappedTermTypeName v0)
-                  _ -> names
-      in (Rewriting.foldOverTerm Coders.TraversalOrderPre addNames Sets.empty term0)
--- | Generate short names from a list of fully qualified names
-toShortNames :: [Core.Name] -> M.Map Core.Name Core.Name
-toShortNames original =
-
-      let addName =
-              \acc -> \name ->
-                let local = Names.localNameOf name
-                    group = Maybes.fromMaybe Sets.empty (Maps.lookup local acc)
-                in (Maps.insert local (Sets.insert name group) acc)
-          groupNamesByLocal = \names -> Lists.foldl addName Maps.empty names
-          groups = groupNamesByLocal original
-          renameGroup =
-                  \localNames ->
-                    let local = Pairs.first localNames
-                        names = Pairs.second localNames
-                        rangeFrom = \start -> Lists.cons start (rangeFrom (Math.add start 1))
-                        rename =
-                                \name -> \i -> (name, (Core.Name (Logic.ifElse (Equality.gt i 1) (Strings.cat2 local (Literals.showInt32 i)) local)))
-                    in (Lists.zipWith rename (Sets.toList names) (rangeFrom 1))
-      in (Maps.fromList (Lists.concat (Lists.map renameGroup (Maps.toList groups))))
--- | Topological sort of connected components, in terms of dependencies between variable/term binding pairs
-topologicalSortBindingMap :: M.Map Core.Name Core.Term -> [[(Core.Name, Core.Term)]]
-topologicalSortBindingMap bindingMap =
-
-      let bindings = Maps.toList bindingMap
-          keys = Sets.fromList (Lists.map Pairs.first bindings)
-          hasTypeAnnotation =
-                  \term -> case term of
-                    Core.TermAnnotated v0 -> hasTypeAnnotation (Core.annotatedTermBody v0)
-                    _ -> False
-          depsOf =
-                  \nameAndTerm ->
-                    let name = Pairs.first nameAndTerm
-                        term = Pairs.second nameAndTerm
-                    in (name, (Logic.ifElse (hasTypeAnnotation term) [] (Sets.toList (Sets.intersection keys (Variables.freeVariablesInTerm term)))))
-          toPair =
-                  \name -> (name, (Maybes.fromMaybe (Core.TermLiteral (Core.LiteralString "Impossible!")) (Maps.lookup name bindingMap)))
-      in (Lists.map (Lists.map toPair) (Sorting.topologicalSortComponents (Lists.map depsOf bindings)))
--- | Topological sort of elements based on their dependencies
-topologicalSortBindings :: [Core.Binding] -> Either [[Core.Name]] [Core.Name]
-topologicalSortBindings els =
-
-      let adjlist = \e -> (Core.bindingName e, (Sets.toList (termDependencyNames False True True (Core.bindingTerm e))))
-      in (Sorting.topologicalSort (Lists.map adjlist els))
--- | Topologically sort type definitions by dependencies
-topologicalSortTypeDefinitions :: [Packaging.TypeDefinition] -> [[Packaging.TypeDefinition]]
-topologicalSortTypeDefinitions defs =
-
-      let toPair =
-              \def -> (Packaging.typeDefinitionName def, (Sets.toList (typeDependencyNames False (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme def)))))
-          nameToDef = Maps.fromList (Lists.map (\d -> (Packaging.typeDefinitionName d, d)) defs)
-          sorted = Sorting.topologicalSortComponents (Lists.map toPair defs)
-      in (Lists.map (\names -> Maybes.cat (Lists.map (\n -> Maps.lookup n nameToDef) names)) sorted)
-typeDependencyNames :: Bool -> Core.Type -> S.Set Core.Name
-typeDependencyNames withSchema typ =
-    Logic.ifElse withSchema (Sets.union (Variables.freeVariablesInType typ) (typeNamesInType typ)) (Variables.freeVariablesInType typ)
-typeNamesInType :: Ord t0 => (Core.Type -> S.Set t0)
-typeNamesInType typ0 =
-
-      let addNames = \names -> \typ -> names
-      in (Rewriting.foldOverType Coders.TraversalOrderPre addNames Sets.empty typ0)
diff --git a/src/main/haskell/Hydra/Differentiation.hs b/src/main/haskell/Hydra/Differentiation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Differentiation.hs
+++ /dev/null
@@ -1,411 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source-to-source automatic differentiation for Float64 terms.
-
-module Hydra.Differentiation where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Differentiate a binary primitive application given both arguments and their derivatives
-differentiateBinary :: Core.Name -> Core.Term -> Core.Term -> Core.Term -> Core.Term -> Core.Term
-differentiateBinary bfname a b da db =
-    Logic.ifElse (Logic.or (Equality.equal bfname (Core.Name "hydra.lib.math.add")) (Equality.equal bfname (Core.Name "hydra.lib.math.addFloat64"))) (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-        Core.applicationArgument = da})),
-      Core.applicationArgument = db})) (Logic.ifElse (Logic.or (Equality.equal bfname (Core.Name "hydra.lib.math.sub")) (Equality.equal bfname (Core.Name "hydra.lib.math.subFloat64"))) (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-        Core.applicationArgument = da})),
-      Core.applicationArgument = db})) (Logic.ifElse (Logic.or (Equality.equal bfname (Core.Name "hydra.lib.math.mul")) (Equality.equal bfname (Core.Name "hydra.lib.math.mulFloat64"))) (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-            Core.applicationArgument = a})),
-          Core.applicationArgument = db}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-          Core.applicationArgument = b})),
-        Core.applicationArgument = da}))})) (Logic.ifElse (Equality.equal bfname (Core.Name "hydra.lib.math.pow")) (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-            Core.applicationArgument = a})),
-          Core.applicationArgument = b}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-              Core.applicationArgument = db})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-              Core.applicationArgument = a}))}))})),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = b})),
-              Core.applicationArgument = da}))})),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-              Core.applicationArgument = a})),
-            Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))}))})) (Logic.ifElse (Equality.equal bfname (Core.Name "hydra.lib.math.atan2")) (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = b})),
-              Core.applicationArgument = da}))})),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-              Core.applicationArgument = a})),
-            Core.applicationArgument = db}))}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                  Core.applicationArgument = a})),
-                Core.applicationArgument = a}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = b})),
-              Core.applicationArgument = b}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))})) (Logic.ifElse (Equality.equal bfname (Core.Name "hydra.lib.math.logBase")) (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = a}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                  Core.applicationArgument = db})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = b})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))}))})),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                Core.applicationArgument = b}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = da})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                  Core.applicationArgument = a})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))}))}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                Core.applicationArgument = a}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-              Core.applicationArgument = a}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))})) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))))))
--- | Differentiate a function term (Float64 -> Float64) with respect to its parameter
-differentiateFunction :: Core.Term -> Core.Term
-differentiateFunction term =
-    case term of
-      Core.TermAnnotated v0 -> differentiateFunction (Core.annotatedTermBody v0)
-      Core.TermLambda v0 ->
-        let paramName = Core.lambdaParameter v0
-            body = Core.lambdaBody v0
-        in (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = paramName,
-          Core.lambdaDomain = (Core.lambdaDomain v0),
-          Core.lambdaBody = (differentiateTerm paramName body)}))
-      _ -> term
--- | Differentiate a term with respect to a named variable
-differentiateTerm :: Core.Name -> Core.Term -> Core.Term
-differentiateTerm dx term =
-    case term of
-      Core.TermVariable v0 -> Logic.ifElse (Equality.equal v0 dx) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))
-      Core.TermLiteral _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermApplication v0 ->
-        let func = Core.applicationFunction v0
-            arg = Core.applicationArgument v0
-        in case func of
-          Core.TermVariable v1 -> Maybes.maybe (differentiateTerm dx (Core.TermApplication (Core.Application {
-            Core.applicationFunction = func,
-            Core.applicationArgument = arg}))) (\derivTerm -> Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = derivTerm,
-                Core.applicationArgument = arg}))})),
-            Core.applicationArgument = (differentiateTerm dx arg)})) (primitiveDerivative v1)
-          Core.TermApplication v1 ->
-            let innerFunc = Core.applicationFunction v1
-                innerArg = Core.applicationArgument v1
-            in case innerFunc of
-              Core.TermVariable v2 -> differentiateBinary v2 innerArg arg (differentiateTerm dx innerArg) (differentiateTerm dx arg)
-              _ -> Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                  Core.applicationArgument = (differentiateTerm dx (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = func,
-                    Core.applicationArgument = arg})))})),
-                Core.applicationArgument = (differentiateTerm dx arg)})
-          _ -> Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-              Core.applicationArgument = (differentiateTerm dx (Core.TermApplication (Core.Application {
-                Core.applicationFunction = func,
-                Core.applicationArgument = arg})))})),
-            Core.applicationArgument = (differentiateTerm dx arg)})
-      Core.TermLambda v0 -> Logic.ifElse (Equality.equal (Core.lambdaParameter v0) dx) (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.lambdaParameter v0),
-        Core.lambdaDomain = (Core.lambdaDomain v0),
-        Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})) (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.lambdaParameter v0),
-        Core.lambdaDomain = (Core.lambdaDomain v0),
-        Core.lambdaBody = (differentiateTerm dx (Core.lambdaBody v0))}))
-      Core.TermCases _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermProject _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermUnwrap _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermLet v0 -> Core.TermLet (Core.Let {
-        Core.letBindings = (Lists.map (\b -> Core.Binding {
-          Core.bindingName = (Core.bindingName b),
-          Core.bindingTerm = (differentiateTerm dx (Core.bindingTerm b)),
-          Core.bindingTypeScheme = Nothing}) (Core.letBindings v0)),
-        Core.letBody = (differentiateTerm dx (Core.letBody v0))})
-      Core.TermAnnotated v0 -> differentiateTerm dx (Core.annotatedTermBody v0)
-      Core.TermList v0 -> Core.TermList (Lists.map (differentiateTerm dx) v0)
-      Core.TermPair v0 -> Core.TermPair (differentiateTerm dx (Pairs.first v0), (differentiateTerm dx (Pairs.second v0)))
-      Core.TermRecord v0 -> Core.TermRecord (Core.Record {
-        Core.recordTypeName = (Core.recordTypeName v0),
-        Core.recordFields = (Lists.map (\fld -> Core.Field {
-          Core.fieldName = (Core.fieldName fld),
-          Core.fieldTerm = (differentiateTerm dx (Core.fieldTerm fld))}) (Core.recordFields v0))})
-      Core.TermTypeApplication v0 -> differentiateTerm dx (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> differentiateTerm dx (Core.typeLambdaBody v0)
-      Core.TermUnit -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermSet _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermMap _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermEither _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermMaybe _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermInject _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
-      Core.TermWrap _ -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))
--- | Compute the gradient of a term as a record of partial derivatives
-gradient :: Core.Name -> [Core.Name] -> Core.Term -> Core.Term
-gradient typeName vars term =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = typeName,
-      Core.recordFields = (Lists.map (\v -> Core.Field {
-        Core.fieldName = v,
-        Core.fieldTerm = (differentiateTerm v term)}) vars)})
--- | Look up the derivative of a unary Float64 primitive
-primitiveDerivative :: Core.Name -> Maybe Core.Term
-primitiveDerivative name =
-    Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.sin")) (Just (Core.TermVariable (Core.Name "hydra.lib.math.cos"))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.cos")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-          Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.tan")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.exp")) (Just (Core.TermVariable (Core.Name "hydra.lib.math.exp"))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.log")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.sqrt")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))})),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))})),
-          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.asin")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.acos")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))}))})),
-          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.atan")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.sinh")) (Just (Core.TermVariable (Core.Name "hydra.lib.math.cosh"))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.cosh")) (Just (Core.TermVariable (Core.Name "hydra.lib.math.sinh"))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.tanh")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))})),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.asinh")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.acosh")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.atanh")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))})),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.negate")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.abs")) (Just (Core.TermVariable (Core.Name "hydra.lib.math.signum"))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.ceiling")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.floor")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.round")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.truncate")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))) (Logic.ifElse (Equality.equal name (Core.Name "hydra.lib.math.signum")) (Just (Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "_x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))) Nothing)))))))))))))))))))))
diff --git a/src/main/haskell/Hydra/Digest.hs b/src/main/haskell/Hydra/Digest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Digest.hs
+++ /dev/null
@@ -1,517 +0,0 @@
--- | Per-module source digests for skipping inference when nothing has changed.
---
--- The cache is intentionally all-or-nothing: if every module's DSL source
--- hash matches the stored digest and every expected JSON output exists,
--- the caller short-circuits. Otherwise it falls through to full inference
--- and overwrites the digest on success.
-
-module Hydra.Digest (
-    -- v1 API (backwards-compatible namespace → hash map)
-    DigestMap,
-    discoverNamespaceFiles,
-    hashFile,
-    hashUniverse,
-    readDigest,
-    writeDigest,
-    digestPath,
-    -- Encoder identity: a hash of the JSON encode/decode/model/writer
-    -- DSL sources. When the universe-wide digest's encoderId doesn't
-    -- match the one computed from current sources, every module's
-    -- on-disk JSON is potentially stale (the format changed even
-    -- though the per-namespace DSL hashes didn't). The cache check
-    -- treats this as a universal miss.
-    computeEncoderId,
-    readEncoderId,
-    writeUniverseDigest,
-    -- v2 API (richer digest with inputs, outputs, generator stamp)
-    Digest(..),
-    DigestEntry(..),
-    DigestKind(..),
-    emptyDigest,
-    readDigestV2,
-    writeDigestV2,
-    hashFileV2,
-    digestsMatch,
-    verifyOutputsExist,
-    generatorStamp,
-) where
-
-import Hydra.Packaging (Module(..), Namespace(..))
-
-import qualified Data.ByteString.Lazy as BL
-import qualified Data.Digest.Pure.SHA as SHA
-import qualified Data.Map as M
-import qualified Data.List as L
-import qualified Data.Maybe as Y
-import qualified System.Directory as SD
-import qualified System.Environment as SE
-import qualified System.FilePath as FP
-import qualified Text.Regex.TDFA as RE
-import qualified Control.Exception as E
-import qualified Control.Monad as CM
-
-
-type DigestMap = M.Map Namespace String
-
-
--- | Root directory where DSL source files live. Relative paths are resolved
--- from the Haskell head's working directory ("heads/haskell"), which matches
--- the existing hs-source-dirs in package.yaml.
-packagesRoot :: FilePath
-packagesRoot = ".." FP.</> ".." FP.</> "packages"
-
-
--- | Walk packages/*/src/main/haskell/Hydra/Sources/ to build a namespace →
--- file map. Each source file must declare its namespace with a top-level
--- line of the form: ns = Namespace "hydra.foo.bar"
---
--- Files without a recognizable ns declaration are silently skipped.
-discoverNamespaceFiles :: IO (M.Map Namespace FilePath)
-discoverNamespaceFiles = do
-    exists <- SD.doesDirectoryExist packagesRoot
-    if not exists then return M.empty else do
-      pkgs <- SD.listDirectory packagesRoot
-      pairs <- L.concat <$> mapM scanPackage pkgs
-      return $ M.fromList pairs
-  where
-    scanPackage pkg = do
-      let srcDir = packagesRoot FP.</> pkg FP.</> "src" FP.</> "main"
-                               FP.</> "haskell" FP.</> "Hydra" FP.</> "Sources"
-      isDir <- SD.doesDirectoryExist srcDir
-      if not isDir then return [] else do
-        files <- listHaskellFiles srcDir
-        Y.catMaybes <$> mapM extractNs files
-
-    listHaskellFiles dir = do
-      entries <- SD.listDirectory dir
-      subResults <- CM.forM entries $ \e -> do
-        let p = dir FP.</> e
-        isDir <- SD.doesDirectoryExist p
-        if isDir
-          then listHaskellFiles p
-          else if ".hs" `L.isSuffixOf` e then return [p] else return []
-      return $ concat subResults
-
-    extractNs :: FilePath -> IO (Maybe (Namespace, FilePath))
-    extractNs fp = do
-      content <- E.try (readFile fp) :: IO (Either E.SomeException String)
-      case content of
-        Left _ -> return Nothing
-        Right s ->
-          let pattern = "^ns = Namespace \"([^\"]+)\"" :: String
-              matches = s RE.=~ pattern :: [[String]]
-          in case matches of
-               ([_, nsName]:_) -> return $ Just (Namespace nsName, fp)
-               _               -> return Nothing
-
-
--- | SHA-256 hex digest of the raw bytes of a file. Fails loudly if the file
--- cannot be read — callers treat failures as "cache miss" upstream.
-hashFile :: FilePath -> IO String
-hashFile fp = do
-    bytes <- BL.readFile fp
-    return $ SHA.showDigest (SHA.sha256 bytes)
-
-
--- | Hash every module in the given list against the namespace → file map.
--- Modules whose source file isn't found (because discovery missed them, or
--- they have no DSL source — e.g. generated coder modules loaded from JSON)
--- are absent from the returned map. The caller treats that as "cannot verify
--- freshness," which always falls through to full inference.
-hashUniverse :: M.Map Namespace FilePath -> [Module] -> IO DigestMap
-hashUniverse nsFiles mods = do
-    let namespaces = map moduleNamespace mods
-    pairs <- CM.forM namespaces $ \ns ->
-      case M.lookup ns nsFiles of
-        Nothing -> return Nothing
-        Just fp -> do
-          result <- E.try (hashFile fp) :: IO (Either E.SomeException String)
-          case result of
-            Left _  -> return Nothing
-            Right h -> return $ Just (ns, h)
-    return $ M.fromList (Y.catMaybes pairs)
-
-
--- | Digest path for a single-tree writer: sits next to the json/ subdir.
--- Input `<pkg>/src/main/json` produces `<pkg>/src/main/digest.json`, and
--- `<pkg>/src/test/json` produces `<pkg>/src/test/digest.json`. This keeps
--- main-tree and test-tree caches distinct.
-digestPath :: FilePath -> FilePath
-digestPath basePath = FP.takeDirectory basePath FP.</> "digest.json"
-
-
--- | Read a digest file. Absent or malformed → empty map.
--- The "encoderId" key, when present, is filtered out of the result.
-readDigest :: FilePath -> IO DigestMap
-readDigest path = do
-    exists <- SD.doesFileExist path
-    if not exists then return M.empty else do
-      result <- E.try (readFile path) :: IO (Either E.SomeException String)
-      case result of
-        Left _  -> return M.empty
-        Right s -> return $ parseDigest s
-
-
--- | Read the encoderId field from a digest file, if present. Absent file
--- or no encoderId field → empty string. Callers compare this against
--- 'computeEncoderId'; a mismatch means the encoder/format changed since
--- the digest was last written.
-readEncoderId :: FilePath -> IO String
-readEncoderId path = do
-    exists <- SD.doesFileExist path
-    if not exists then return "" else do
-      result <- E.try (readFile path) :: IO (Either E.SomeException String)
-      case result of
-        Left _  -> return ""
-        Right s -> return $ parseEncoderId s
-
-
--- | Write a digest file. Format: a minimal JSON object
--- { "formatVersion": 1, "version": 1, "hashes": { "<namespace>": "<hex>", ... } }
--- Keys are written in sorted order for deterministic output.
---
--- The two version fields are deliberately distinct:
---
---   * "formatVersion" describes the JSON encoding of sibling module files
---     (dist/json/<package>/.../*.json). See docs/json-format.md.
---     Bumped only when a parser for version N would mis-parse version N+1.
---   * "version" describes this digest file's own internal schema (v1 = simple
---     hash map, v2 = inputs/outputs/generator). It is not meant for consumers
---     gating on the module-JSON encoding.
---
--- Use 'writeUniverseDigest' to also record an encoderId.
-writeDigest :: FilePath -> DigestMap -> IO ()
-writeDigest path digest = do
-    SD.createDirectoryIfMissing True (FP.takeDirectory path)
-    writeFile path (serializeDigest "" digest)
-
-
--- | Write a digest file together with an encoderId stamp. Format:
--- { "formatVersion": 1, "version": 1, "encoderId": "<hex>", "hashes": { ... } }
--- The encoderId is computed by 'computeEncoderId'. When empty, the field
--- is omitted (matching the legacy schema).
-writeUniverseDigest :: FilePath -> String -> DigestMap -> IO ()
-writeUniverseDigest path encoderId digest = do
-    SD.createDirectoryIfMissing True (FP.takeDirectory path)
-    writeFile path (serializeDigest encoderId digest)
-
-
--- | Compute a hash identifying the on-disk JSON encoder/decoder layer.
--- Concretely: SHA-256 of the concatenated bytes of the four DSL source
--- files that govern the wire format. Any change to these files
--- invalidates the universe-wide cache, even when per-namespace DSL
--- hashes are unchanged — guards against the failure mode where editing
--- only Encode.hs or Decode.hs leaves stale JSON on disk for every other
--- namespace (issue surfaced by feature_343_json on 2026-04-25).
---
--- Files hashed (in fixed order):
---   * Hydra/Sources/Json/Encode.hs   — emits Term → Value
---   * Hydra/Sources/Json/Decode.hs   — parses Value → Term
---   * Hydra/Sources/Json/Model.hs    — Value type definition
---   * Hydra/Sources/Json/Writer.hs   — serializes Value to bytes on disk
---
--- A missing file is treated as the zero-byte string for hashing
--- (fail-soft); the encoderId still reflects the present files'
--- contents, and a missing encoder file should fail downstream anyway.
-computeEncoderId :: IO String
-computeEncoderId = do
-    let files =
-          [ packagesRoot FP.</> "hydra-kernel/src/main/haskell/Hydra/Sources/Json/Encode.hs"
-          , packagesRoot FP.</> "hydra-kernel/src/main/haskell/Hydra/Sources/Json/Decode.hs"
-          , packagesRoot FP.</> "hydra-kernel/src/main/haskell/Hydra/Sources/Json/Model.hs"
-          , packagesRoot FP.</> "hydra-kernel/src/main/haskell/Hydra/Sources/Json/Writer.hs"
-          ]
-    chunks <- mapM safeRead files
-    let combined = BL.concat chunks
-    return $ SHA.showDigest (SHA.sha256 combined)
-  where
-    safeRead fp = do
-      exists <- SD.doesFileExist fp
-      if not exists then return BL.empty else do
-        result <- E.try (BL.readFile fp) :: IO (Either E.SomeException BL.ByteString)
-        case result of
-          Left _  -> return BL.empty
-          Right b -> return b
-
-
--- | Minimal JSON parser for the digest file. We deliberately avoid pulling
--- in aeson's full machinery here because the format is trivial and we want
--- tolerant parsing (a malformed digest silently becomes an empty map).
--- The regex only matches `"key": "quoted_value"` pairs, so it naturally
--- skips the `"formatVersion"`, `"version"`, and `"hashes": { ... }` scaffolding.
---
--- The "encoderId" key is filtered from the namespace map: it is a
--- top-level field, not a namespace hash. Callers wanting the encoderId
--- use 'parseEncoderId' / 'readEncoderId' instead.
-parseDigest :: String -> DigestMap
-parseDigest s =
-    let kvPattern = "\"([^\"]+)\"[[:space:]]*:[[:space:]]*\"([^\"]+)\"" :: String
-        matches   = s RE.=~ kvPattern :: [[String]]
-    in M.fromList [ (Namespace k, v)
-                  | (_:k:v:_) <- matches
-                  , k /= "encoderId"
-                  ]
-
-
--- | Extract the encoderId field from a digest file's text, or "" if absent.
-parseEncoderId :: String -> String
-parseEncoderId s =
-    let pat = "\"encoderId\"[[:space:]]*:[[:space:]]*\"([^\"]*)\"" :: String
-    in case s RE.=~ pat :: [[String]] of
-         ((_:enc:_):_) -> enc
-         _             -> ""
-
-
--- | Serialize a digest, optionally with an encoderId stamp. Pass "" to
--- omit the field (legacy schema).
-serializeDigest :: String -> DigestMap -> String
-serializeDigest encoderId digest = unlines $
-    ["{"
-    ,"  \"formatVersion\": 1,"
-    ,"  \"version\": 1,"]
-    ++ encoderLines ++
-    ["  \"hashes\": {"]
-    ++ hashLines ++
-    ["  }"
-    ,"}"]
-  where
-    encoderLines =
-      if null encoderId
-        then []
-        else ["  \"encoderId\": \"" ++ encoderId ++ "\","]
-    entries = L.sortBy (\a b -> compare (fst a) (fst b)) (M.toList digest)
-    hashLines = zipWith renderEntry [0..] entries
-    renderEntry i (Namespace ns, h) =
-      let sep = if i == length entries - 1 then "" else ","
-      in "    \"" ++ ns ++ "\": \"" ++ h ++ "\"" ++ sep
-
-
-----------------------------------------------------------------------
--- v2 API: per-package, per-target digest with inputs + outputs +
--- generator stamp.
-----------------------------------------------------------------------
--- A v2 digest records:
---   * inputs:  every file whose content determines the output of a sync
---              step (DSL sources, JSON files consumed by code generators,
---              hand-written runtime files copied in by post-processing).
---   * outputs: every file the sync step is responsible for producing.
---   * generator: a stamp identifying the version of the generator that
---                produced these outputs, so generator changes invalidate
---                downstream caches.
---
--- A freshness check is "all input hashes match recorded inputs AND all
--- output files exist with matching hashes AND generator stamp matches."
--- Any mismatch falls through to a regen of the affected step.
-
--- | What kind of artifact is being recorded. Lets a single Digest mix
--- typed entries (DSL source, JSON file, target source, runtime support
--- file) without losing the discriminator.
-data DigestKind
-    = KindDslSource     -- A .hs source file under packages/*/src/main/haskell/Hydra/Sources/
-    | KindJsonFile      -- A .json file under dist/json/
-    | KindTargetFile    -- A generated source file under dist/<lang>/
-    | KindRuntimeFile   -- A hand-written file under heads/*/src/ that gets copied in
-    | KindOther         -- Anything else (escape hatch)
-    deriving (Eq, Ord, Show, Read)
-
--- | One file's hash + classification. The path is the canonical key
--- (relative to the worktree root for portability).
-data DigestEntry = DigestEntry
-    { entryKind :: DigestKind
-    , entryHash :: String  -- SHA-256 hex
-    } deriving (Eq, Show)
-
--- | A versioned digest for one sync step. Indexed by file path so that
--- callers can mix file types freely.
-data Digest = Digest
-    { digestInputs    :: M.Map FilePath DigestEntry
-    , digestOutputs   :: M.Map FilePath DigestEntry
-    , digestGenerator :: String  -- generator stamp; see 'generatorStamp'
-    } deriving (Eq, Show)
-
-emptyDigest :: Digest
-emptyDigest = Digest M.empty M.empty ""
-
--- | Hash any file by content. Returns a DigestEntry with the given kind
--- attached. Fails loudly if the file is missing — callers handle by
--- treating absent inputs as cache miss upstream.
-hashFileV2 :: DigestKind -> FilePath -> IO DigestEntry
-hashFileV2 kind fp = do
-    h <- hashFile fp
-    return (DigestEntry kind h)
-
--- | A stamp identifying the generator version. Right now just the
--- HYDRA_GENERATOR_STAMP env var if set, falling back to a fixed
--- placeholder. Future work: hash the bootstrap-from-json executable
--- itself, or read a commit SHA at build time.
---
--- The stamp is treated as opaque by the freshness check: any change
--- invalidates downstream digests across the board. This is a coarse
--- but safe trigger for "the code that produced these files changed."
-generatorStamp :: IO String
-generatorStamp = do
-    mEnv <- E.try (SE.getEnv "HYDRA_GENERATOR_STAMP") :: IO (Either E.SomeException String)
-    case mEnv of
-      Right s | not (null s) -> return s
-      _                      -> return "v0-unstamped"
-
--- | Read a v2 digest from disk. Absent or malformed → emptyDigest.
-readDigestV2 :: FilePath -> IO Digest
-readDigestV2 path = do
-    exists <- SD.doesFileExist path
-    if not exists then return emptyDigest else do
-      result <- E.try (readFile path) :: IO (Either E.SomeException String)
-      case result of
-        Left _  -> return emptyDigest
-        Right s -> return $ parseDigestV2 s
-
--- | Write a v2 digest to disk. Format is JSON-ish, sorted for
--- determinism, parseable by parseDigestV2 (regex-based, tolerant).
-writeDigestV2 :: FilePath -> Digest -> IO ()
-writeDigestV2 path d = do
-    SD.createDirectoryIfMissing True (FP.takeDirectory path)
-    writeFile path (serializeDigestV2 d)
-
--- | Two digests are equivalent for freshness purposes if their input,
--- output, and generator fields all match. Output hashes are NOT
--- compared against the filesystem here — see 'verifyOutputsExist'
--- for that.
-digestsMatch :: Digest -> Digest -> Bool
-digestsMatch a b =
-    digestInputs a == digestInputs b
-      && digestOutputs a == digestOutputs b
-      && digestGenerator a == digestGenerator b
-
--- | For each output file recorded in the digest, verify the file
--- exists on disk and hashes to the recorded value. Returns True iff
--- every output is present and content-matched.
---
--- This catches "user deleted some files" or "files were partially
--- regenerated and corrupted." A digest match alone is not sufficient
--- proof of freshness because the dist/ tree could have been mutated
--- after the last write.
-verifyOutputsExist :: Digest -> IO Bool
-verifyOutputsExist d = do
-    let outputs = M.toList (digestOutputs d)
-    fmap and $ CM.forM outputs $ \(fp, entry) -> do
-      exists <- SD.doesFileExist fp
-      if not exists then return False else do
-        result <- E.try (hashFile fp) :: IO (Either E.SomeException String)
-        case result of
-          Left _  -> return False
-          Right h -> return (h == entryHash entry)
-
-
-----------------------------------------------------------------------
--- v2 serialization.
---
--- File layout (deliberately readable + tolerant):
---
---   {
---     "version": 2,
---     "generator": "<stamp>",
---     "inputs": {
---       "<path>": { "kind": "DslSource", "hash": "<hex>" },
---       ...
---     },
---     "outputs": {
---       "<path>": { "kind": "JsonFile", "hash": "<hex>" },
---       ...
---     }
---   }
---
--- Parser is regex-based and recovers from formatting variations.
--- Unknown kinds round-trip as KindOther.
-----------------------------------------------------------------------
-
-serializeDigestV2 :: Digest -> String
-serializeDigestV2 d = unlines $
-    [ "{"
-    , "  \"version\": 2,"
-    , "  \"generator\": " ++ jsonString (digestGenerator d) ++ ","
-    , "  \"inputs\": {"
-    ] ++ entries (digestInputs d) ++
-    [ "  },"
-    , "  \"outputs\": {"
-    ] ++ entries (digestOutputs d) ++
-    [ "  }"
-    , "}"
-    ]
-  where
-    entries m =
-      let kvs = L.sortBy (\a b -> compare (fst a) (fst b)) (M.toList m)
-      in zipWith (renderEntry (length kvs)) [0..] kvs
-
-    renderEntry total i (path, DigestEntry k h) =
-      let sep = if i == total - 1 then "" else ","
-      in "    " ++ jsonString path ++ ": { \"kind\": "
-           ++ jsonString (kindToString k) ++ ", \"hash\": "
-           ++ jsonString h ++ " }" ++ sep
-
-    jsonString s = "\"" ++ concatMap escape s ++ "\""
-    escape '\\' = "\\\\"
-    escape '"'  = "\\\""
-    escape c    = [c]
-
-kindToString :: DigestKind -> String
-kindToString KindDslSource   = "DslSource"
-kindToString KindJsonFile    = "JsonFile"
-kindToString KindTargetFile  = "TargetFile"
-kindToString KindRuntimeFile = "RuntimeFile"
-kindToString KindOther       = "Other"
-
-stringToKind :: String -> DigestKind
-stringToKind "DslSource"   = KindDslSource
-stringToKind "JsonFile"    = KindJsonFile
-stringToKind "TargetFile"  = KindTargetFile
-stringToKind "RuntimeFile" = KindRuntimeFile
-stringToKind _             = KindOther
-
--- Tolerant regex-based parser; ignores anything outside the recognized
--- shapes. The shapes we look for:
---   "generator": "<stamp>"           → captures generator stamp
---   "<path>": { "kind": "<k>", "hash": "<h>" } in inputs/outputs sections
-parseDigestV2 :: String -> Digest
-parseDigestV2 s =
-    let -- Generator stamp is a top-level string.
-        genPat = "\"generator\"[[:space:]]*:[[:space:]]*\"([^\"]*)\"" :: String
-        gen    = case s RE.=~ genPat :: [[String]] of
-                   ((_:g:_):_) -> g
-                   _           -> ""
-        -- Split on "outputs": to give us two halves; the inputs half is
-        -- everything before, outputs half is everything after. This is
-        -- coarse but lets us assign entries to the right map without
-        -- proper JSON parsing.
-        -- We anchor on the literal text "\"outputs\"" preceded by a
-        -- closing brace + comma + whitespace to disambiguate from the
-        -- (theoretical) word "outputs" appearing in a path.
-        (inHalf, outHalf) = splitOnOutputs s
-        entryPat = "\"([^\"]+)\"[[:space:]]*:[[:space:]]*\\{[[:space:]]*\"kind\"[[:space:]]*:[[:space:]]*\"([^\"]*)\"[[:space:]]*,[[:space:]]*\"hash\"[[:space:]]*:[[:space:]]*\"([^\"]*)\"" :: String
-        parseEntries :: String -> M.Map FilePath DigestEntry
-        parseEntries half =
-          let ms = (half RE.=~ entryPat) :: [[String]]
-          in M.fromList [ (path, DigestEntry (stringToKind k) h)
-                        | (_:path:k:h:_) <- ms
-                        ]
-    in Digest
-        { digestInputs    = parseEntries inHalf
-        , digestOutputs   = parseEntries outHalf
-        , digestGenerator = gen
-        }
-
--- Split the digest text into the inputs region (everything up to and
--- including the first `"outputs"` key) and the outputs region (after).
--- If we can't find the boundary, treat everything as inputs.
-splitOnOutputs :: String -> (String, String)
-splitOnOutputs s =
-    case findIndex "\"outputs\"" s of
-      Just i  -> (take i s, drop i s)
-      Nothing -> (s, "")
-  where
-    findIndex needle hay =
-      let n = length needle
-          go ix rest
-            | length rest < n = Nothing
-            | take n rest == needle = Just ix
-            | otherwise = go (ix + 1) (drop 1 rest)
-      in go 0 hay
diff --git a/src/main/haskell/Hydra/Dsl/Annotations.hs b/src/main/haskell/Hydra/Dsl/Annotations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Annotations.hs
+++ /dev/null
@@ -1,85 +0,0 @@
--- | A DSL which is used as a basis for some of the other DSLs
-
-module Hydra.Dsl.Annotations where
-
-import Hydra.Core
-import Hydra.Util
-import Hydra.Constants
-import Hydra.Annotations
-import Hydra.Dsl.AsType
-import Hydra.Formatting
-import Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Types as Types
-
-import qualified Data.Map as M
-import qualified Data.Maybe as Y
-
-
-annotateTerm :: Name -> Y.Maybe Term -> Term -> Term
-annotateTerm = setTermAnnotation
-
-annotateType :: Name -> Y.Maybe Term -> Type -> Type
-annotateType = setTypeAnnotation
-
-bounded :: Maybe Int -> Maybe Int -> Type -> Type
-bounded min max = annotMin . annotMax
-  where
-    annotMax t = Y.maybe t (`setMaxLength` t) max
-    annotMin t = Y.maybe t (`setMinLength` t) max
-
-boundedList :: AsType a => Maybe Int -> Maybe Int -> a -> Type
-boundedList min max et = bounded min max $ Types.list (asType et)
-
-boundedMap :: (AsType a, AsType b) => Maybe Int -> Maybe Int -> a -> b -> Type
-boundedMap min max kt vt = bounded min max $ Types.map (asType kt) (asType vt)
-
-boundedSet :: AsType a => Maybe Int -> Maybe Int -> a -> Type
-boundedSet min max et = bounded min max $ Types.set (asType et)
-
-boundedString :: Maybe Int -> Maybe Int -> Type
-boundedString min max = bounded min max Types.string
-
-deprecated :: AsType a => a -> Type
-deprecated = setTypeAnnotation key_deprecated (Just $ Terms.boolean True) . asType
-
-doc :: AsType a => String -> a -> Type
-doc s = setTypeDescription (Just s) . asType
-
-doc70 :: AsType a => String -> a -> Type
-doc70 = doc . wrapLine 70
-
-doc80 :: AsType a => String -> a -> Type
-doc80 = doc . wrapLine 80
-
-dataDoc :: String -> Term -> Term
-dataDoc s = setTermDescription (Just s)
-
-exclude :: AsType a => a -> Type
-exclude = setTypeAnnotation key_exclude (Just $ Terms.boolean True) . asType
-
-minLengthList :: AsType a => Int -> a -> Type
-minLengthList len = boundedList (Just len) Nothing
-
-nonemptyList :: AsType a => a -> Type
-nonemptyList = minLengthList 1
-
-nonemptyMap :: (AsType a, AsType b) => a -> b -> Type
-nonemptyMap = boundedMap (Just 1) Nothing
-
-note :: AsType a => String -> a -> Type
-note s = doc $ "Note: " ++ s
-
-preserveFieldName :: AsType a => a -> Type
-preserveFieldName = setTypeAnnotation key_preserveFieldName (Just $ Terms.boolean True) . asType
-
-see :: AsType a => String -> a -> Type
-see s = doc $ "See " ++ s
-
-setMaxLength :: Int -> Type -> Type
-setMaxLength m = setTypeAnnotation key_maxLength (Just $ Terms.int32 m)
-
-setMinLength :: Int -> Type -> Type
-setMinLength m = setTypeAnnotation key_minLength (Just $ Terms.int32 m)
-
-twoOrMoreList :: AsType a => a -> Type
-twoOrMoreList = boundedList (Just 2) Nothing
diff --git a/src/main/haskell/Hydra/Dsl/AsTerm.hs b/src/main/haskell/Hydra/Dsl/AsTerm.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/AsTerm.hs
+++ /dev/null
@@ -1,34 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE FunctionalDependencies #-}
-
--- | Type class for implicit coercion to TTerm
--- This allows TTerm, TBinding, and String to be used where a TTerm is expected,
--- while preserving phantom type information.
-
-module Hydra.Dsl.AsTerm where
-
-import Hydra.Core
-import Hydra.Packaging
-import Hydra.Phantoms
-
-
--- | Type class for implicit coercion to TTerm, preserving phantom types
--- TTerm passes through unchanged, TBinding becomes a variable reference
--- The functional dependency ensures that the input type determines the phantom type
-class AsTerm f a | f -> a where
-  asTerm :: f -> TTerm a
-
-instance AsTerm (TTerm a) a where
-  asTerm = id
-
-instance AsTerm (TBinding a) a where
-  asTerm (TBinding name _) = TTerm (TermVariable name)
-
-instance AsTerm (TTermDefinition a) a where
-  asTerm (TTermDefinition name _) = TTerm (TermVariable name)
-
-instance AsTerm String String where
-  asTerm s = TTerm $ TermLiteral $ LiteralString s
-
-instance AsTerm Int Int where
-  asTerm i = TTerm $ TermLiteral $ LiteralInteger $ IntegerValueInt32 i
diff --git a/src/main/haskell/Hydra/Dsl/AsType.hs b/src/main/haskell/Hydra/Dsl/AsType.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/AsType.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-
--- | Type class for implicit coercion to Type
--- This allows Type, Binding, and String to be used where a Type is expected
-
-module Hydra.Dsl.AsType where
-
-import Hydra.Core
-import Hydra.Packaging
-
-
--- | Type class for implicit coercion to Type
--- This allows Type, Binding, and String to be used where a Type is expected
-class AsType a where
-  asType :: a -> Type
-
-instance AsType Type where
-  asType = id
-
-instance AsType Binding where
-  asType b = TypeVariable (bindingName b)
-
-instance AsType String where
-  asType s = TypeVariable (Name s)
diff --git a/src/main/haskell/Hydra/Dsl/Ast.hs b/src/main/haskell/Hydra/Dsl/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Ast.hs
+++ /dev/null
@@ -1,825 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.ast
-
-module Hydra.Dsl.Ast where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-associativityBoth :: Phantoms.TTerm Ast.Associativity
-associativityBoth =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "both"),
-        Core.fieldTerm = Core.TermUnit}}))
-associativityLeft :: Phantoms.TTerm Ast.Associativity
-associativityLeft =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "left"),
-        Core.fieldTerm = Core.TermUnit}}))
-associativityNone :: Phantoms.TTerm Ast.Associativity
-associativityNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-associativityRight :: Phantoms.TTerm Ast.Associativity
-associativityRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "right"),
-        Core.fieldTerm = Core.TermUnit}}))
-blockStyle :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Ast.BlockStyle
-blockStyle indent newlineBeforeContent newlineAfterContent =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "indent"),
-          Core.fieldTerm = (Phantoms.unTTerm indent)},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineBeforeContent"),
-          Core.fieldTerm = (Phantoms.unTTerm newlineBeforeContent)},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineAfterContent"),
-          Core.fieldTerm = (Phantoms.unTTerm newlineAfterContent)}]}))
-blockStyleIndent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm (Maybe String)
-blockStyleIndent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-        Core.projectionField = (Core.Name "indent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-blockStyleNewlineAfterContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool
-blockStyleNewlineAfterContent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-        Core.projectionField = (Core.Name "newlineAfterContent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-blockStyleNewlineBeforeContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool
-blockStyleNewlineBeforeContent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-        Core.projectionField = (Core.Name "newlineBeforeContent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-blockStyleWithIndent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Ast.BlockStyle
-blockStyleWithIndent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "indent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineBeforeContent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-              Core.projectionField = (Core.Name "newlineBeforeContent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineAfterContent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-              Core.projectionField = (Core.Name "newlineAfterContent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-blockStyleWithNewlineAfterContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool -> Phantoms.TTerm Ast.BlockStyle
-blockStyleWithNewlineAfterContent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "indent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-              Core.projectionField = (Core.Name "indent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineBeforeContent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-              Core.projectionField = (Core.Name "newlineBeforeContent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineAfterContent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-blockStyleWithNewlineBeforeContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool -> Phantoms.TTerm Ast.BlockStyle
-blockStyleWithNewlineBeforeContent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "indent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-              Core.projectionField = (Core.Name "indent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineBeforeContent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineAfterContent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-              Core.projectionField = (Core.Name "newlineAfterContent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-bracketExpr :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Ast.BracketExpr
-bracketExpr brackets enclosed style =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "brackets"),
-          Core.fieldTerm = (Phantoms.unTTerm brackets)},
-        Core.Field {
-          Core.fieldName = (Core.Name "enclosed"),
-          Core.fieldTerm = (Phantoms.unTTerm enclosed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Phantoms.unTTerm style)}]}))
-bracketExprBrackets :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Brackets
-bracketExprBrackets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-        Core.projectionField = (Core.Name "brackets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bracketExprEnclosed :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Expr
-bracketExprEnclosed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-        Core.projectionField = (Core.Name "enclosed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bracketExprStyle :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.BlockStyle
-bracketExprStyle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-        Core.projectionField = (Core.Name "style")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bracketExprWithBrackets :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.BracketExpr
-bracketExprWithBrackets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "brackets"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "enclosed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-              Core.projectionField = (Core.Name "enclosed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-              Core.projectionField = (Core.Name "style")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-bracketExprWithEnclosed :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.BracketExpr
-bracketExprWithEnclosed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "brackets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-              Core.projectionField = (Core.Name "brackets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enclosed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-              Core.projectionField = (Core.Name "style")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-bracketExprWithStyle :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Ast.BracketExpr
-bracketExprWithStyle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "brackets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-              Core.projectionField = (Core.Name "brackets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enclosed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-              Core.projectionField = (Core.Name "enclosed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-brackets :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Brackets
-brackets open close =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Phantoms.unTTerm open)},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (Phantoms.unTTerm close)}]}))
-bracketsClose :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol
-bracketsClose x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),
-        Core.projectionField = (Core.Name "close")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bracketsOpen :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol
-bracketsOpen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),
-        Core.projectionField = (Core.Name "open")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bracketsWithClose :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Brackets
-bracketsWithClose original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),
-              Core.projectionField = (Core.Name "open")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-bracketsWithOpen :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Brackets
-bracketsWithOpen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),
-              Core.projectionField = (Core.Name "close")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-exprBrackets :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Expr
-exprBrackets x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "brackets"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-exprConst :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Expr
-exprConst x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-exprIndent :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.Expr
-exprIndent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-exprOp :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr
-exprOp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "op"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-exprSeq :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm Ast.Expr
-exprSeq x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "seq"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-indentStyleAllLines :: Phantoms.TTerm String -> Phantoms.TTerm Ast.IndentStyle
-indentStyleAllLines x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "allLines"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-indentStyleSubsequentLines :: Phantoms.TTerm String -> Phantoms.TTerm Ast.IndentStyle
-indentStyleSubsequentLines x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subsequentLines"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-indentedExpression :: Phantoms.TTerm Ast.IndentStyle -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.IndentedExpression
-indentedExpression style expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Phantoms.unTTerm style)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-indentedExpressionExpr :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.Expr
-indentedExpressionExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-indentedExpressionStyle :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.IndentStyle
-indentedExpressionStyle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-        Core.projectionField = (Core.Name "style")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-indentedExpressionWithExpr :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.IndentedExpression
-indentedExpressionWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-              Core.projectionField = (Core.Name "style")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-indentedExpressionWithStyle :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.IndentStyle -> Phantoms.TTerm Ast.IndentedExpression
-indentedExpressionWithStyle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-op :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Precedence -> Phantoms.TTerm Ast.Associativity -> Phantoms.TTerm Ast.Op
-op symbol padding precedence associativity =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbol"),
-          Core.fieldTerm = (Phantoms.unTTerm symbol)},
-        Core.Field {
-          Core.fieldName = (Core.Name "padding"),
-          Core.fieldTerm = (Phantoms.unTTerm padding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "precedence"),
-          Core.fieldTerm = (Phantoms.unTTerm precedence)},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Phantoms.unTTerm associativity)}]}))
-opAssociativity :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Associativity
-opAssociativity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-        Core.projectionField = (Core.Name "associativity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opExpr :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.OpExpr
-opExpr op lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-opExprLhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr
-opExprLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opExprOp :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Op
-opExprOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opExprRhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr
-opExprRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opExprWithLhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.OpExpr
-opExprWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-opExprWithOp :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.OpExpr
-opExprWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-opExprWithRhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.OpExpr
-opExprWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-opPadding :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Padding
-opPadding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-        Core.projectionField = (Core.Name "padding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opPrecedence :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Precedence
-opPrecedence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-        Core.projectionField = (Core.Name "precedence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opSymbol :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Symbol
-opSymbol x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-        Core.projectionField = (Core.Name "symbol")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-opWithAssociativity :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Associativity -> Phantoms.TTerm Ast.Op
-opWithAssociativity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbol"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "symbol")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "padding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "padding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "precedence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "precedence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-opWithPadding :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Op
-opWithPadding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbol"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "symbol")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "padding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "precedence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "precedence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "associativity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-opWithPrecedence :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Precedence -> Phantoms.TTerm Ast.Op
-opWithPrecedence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbol"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "symbol")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "padding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "padding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "precedence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "associativity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-opWithSymbol :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Op
-opWithSymbol original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbol"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "padding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "padding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "precedence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "precedence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-              Core.projectionField = (Core.Name "associativity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-padding :: Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Padding
-padding left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-paddingLeft :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws
-paddingLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-paddingRight :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws
-paddingRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-paddingWithLeft :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Padding
-paddingWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-paddingWithRight :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Padding
-paddingWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-precedence :: Phantoms.TTerm Int -> Phantoms.TTerm Ast.Precedence
-precedence x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Precedence"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-seqExpr :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm [Ast.Expr] -> Phantoms.TTerm Ast.SeqExpr
-seqExpr op elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-seqExprElements :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm [Ast.Expr]
-seqExprElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-seqExprOp :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm Ast.Op
-seqExprOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-seqExprWithElements :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm [Ast.Expr] -> Phantoms.TTerm Ast.SeqExpr
-seqExprWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-seqExprWithOp :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.SeqExpr
-seqExprWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-symbol :: Phantoms.TTerm String -> Phantoms.TTerm Ast.Symbol
-symbol x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Symbol"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-unPrecedence :: Phantoms.TTerm Ast.Precedence -> Phantoms.TTerm Int
-unPrecedence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.ast.Precedence")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unSymbol :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm String
-unSymbol x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.ast.Symbol")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-wsBreak :: Phantoms.TTerm Ast.Ws
-wsBreak =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = Core.TermUnit}}))
-wsBreakAndIndent :: Phantoms.TTerm String -> Phantoms.TTerm Ast.Ws
-wsBreakAndIndent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "breakAndIndent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-wsDoubleBreak :: Phantoms.TTerm Ast.Ws
-wsDoubleBreak =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doubleBreak"),
-        Core.fieldTerm = Core.TermUnit}}))
-wsNone :: Phantoms.TTerm Ast.Ws
-wsNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-wsSpace :: Phantoms.TTerm Ast.Ws
-wsSpace =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "space"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Atlas.hs b/src/main/haskell/Hydra/Dsl/Atlas.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Atlas.hs
+++ /dev/null
@@ -1,3785 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.atlas
-
-module Hydra.Dsl.Atlas where
-
-import qualified Hydra.Atlas as Atlas
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Xml.Schema as Schema
-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
-import qualified Data.Set as S
-
-atlasAttributeDef :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Atlas.AtlasAttributeDef_Cardinality) -> Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Int -> Phantoms.TTerm (Maybe Atlas.AtlasAttributeDef_IndexType) -> Phantoms.TTerm [Atlas.AtlasConstraintDef] -> Phantoms.TTerm (M.Map String String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDef name typeName isOptional cardinality valuesMinCount valuesMaxCount isUnique isIndexable includeInNotification defaultValue description searchWeight indexType constraints options displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Phantoms.unTTerm isOptional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm cardinality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Phantoms.unTTerm valuesMinCount)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Phantoms.unTTerm valuesMaxCount)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Phantoms.unTTerm isUnique)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Phantoms.unTTerm isIndexable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Phantoms.unTTerm includeInNotification)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Phantoms.unTTerm searchWeight)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Phantoms.unTTerm indexType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-atlasAttributeDefCardinality :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe Atlas.AtlasAttributeDef_Cardinality)
-atlasAttributeDefCardinality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "cardinality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefConstraints :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm [Atlas.AtlasConstraintDef]
-atlasAttributeDefConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefDefaultValue :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String)
-atlasAttributeDefDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "defaultValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefDescription :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String)
-atlasAttributeDefDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefDisplayName :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String)
-atlasAttributeDefDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefIncludeInNotification :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool
-atlasAttributeDefIncludeInNotification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "includeInNotification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefIndexType :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe Atlas.AtlasAttributeDef_IndexType)
-atlasAttributeDefIndexType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "indexType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefIsIndexable :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool
-atlasAttributeDefIsIndexable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "isIndexable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefIsOptional :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool
-atlasAttributeDefIsOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "isOptional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefIsUnique :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool
-atlasAttributeDefIsUnique x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "isUnique")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefName :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String)
-atlasAttributeDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefOptions :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (M.Map String String)
-atlasAttributeDefOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefSearchWeight :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Int
-atlasAttributeDefSearchWeight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "searchWeight")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefTypeName :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String)
-atlasAttributeDefTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefValuesMaxCount :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Int
-atlasAttributeDefValuesMaxCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "valuesMaxCount")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefValuesMinCount :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Int
-atlasAttributeDefValuesMinCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-        Core.projectionField = (Core.Name "valuesMinCount")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasAttributeDefWithCardinality :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe Atlas.AtlasAttributeDef_Cardinality) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithCardinality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithConstraints :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm [Atlas.AtlasConstraintDef] -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithDefaultValue :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithDefaultValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithDescription :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithDisplayName :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atlasAttributeDefWithIncludeInNotification :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithIncludeInNotification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithIndexType :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe Atlas.AtlasAttributeDef_IndexType) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithIndexType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithIsIndexable :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithIsIndexable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithIsOptional :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithIsOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithIsUnique :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithIsUnique original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithName :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithOptions :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (M.Map String String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithSearchWeight :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Int -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithSearchWeight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithTypeName :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithValuesMaxCount :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Int -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithValuesMaxCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDefWithValuesMinCount :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Int -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasAttributeDefWithValuesMinCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOptional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isOptional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMinCount"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valuesMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "valuesMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isIndexable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "isIndexable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includeInNotification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "includeInNotification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "searchWeight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "searchWeight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "indexType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasAttributeDef_CardinalityList :: Phantoms.TTerm Atlas.AtlasAttributeDef_Cardinality
-atlasAttributeDef_CardinalityList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef_Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atlasAttributeDef_CardinalitySet :: Phantoms.TTerm Atlas.AtlasAttributeDef_Cardinality
-atlasAttributeDef_CardinalitySet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef_Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atlasAttributeDef_CardinalitySingle :: Phantoms.TTerm Atlas.AtlasAttributeDef_Cardinality
-atlasAttributeDef_CardinalitySingle =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef_Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atlasAttributeDef_IndexTypeDefault :: Phantoms.TTerm Atlas.AtlasAttributeDef_IndexType
-atlasAttributeDef_IndexTypeDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef_IndexType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atlasAttributeDef_IndexTypeString :: Phantoms.TTerm Atlas.AtlasAttributeDef_IndexType
-atlasAttributeDef_IndexTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.AtlasAttributeDef_IndexType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atlasBaseTypeDef :: Phantoms.TTerm (Maybe Atlas.TypeCategory) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Schema.DateTime) -> Phantoms.TTerm (Maybe Schema.DateTime) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (M.Map String String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDef category guid createdBy updatedBy createTime updateTime version name description typeVersion serviceType options =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Phantoms.unTTerm category)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Phantoms.unTTerm guid)},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Phantoms.unTTerm createdBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Phantoms.unTTerm updatedBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Phantoms.unTTerm createTime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Phantoms.unTTerm updateTime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Phantoms.unTTerm version)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Phantoms.unTTerm typeVersion)},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Phantoms.unTTerm serviceType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)}]}))
-
-atlasBaseTypeDefCategory :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe Atlas.TypeCategory)
-atlasBaseTypeDefCategory x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "category")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefCreateTime :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe Schema.DateTime)
-atlasBaseTypeDefCreateTime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "createTime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefCreatedBy :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefCreatedBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "createdBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefDescription :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefGuid :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefGuid x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "guid")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefName :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefOptions :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (M.Map String String)
-atlasBaseTypeDefOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefServiceType :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefServiceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "serviceType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefTypeVersion :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefTypeVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "typeVersion")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefUpdateTime :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe Schema.DateTime)
-atlasBaseTypeDefUpdateTime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "updateTime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefUpdatedBy :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String)
-atlasBaseTypeDefUpdatedBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "updatedBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefVersion :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe I.Int64)
-atlasBaseTypeDefVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-        Core.projectionField = (Core.Name "version")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasBaseTypeDefWithCategory :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe Atlas.TypeCategory) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithCategory original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithCreateTime :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe Schema.DateTime) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithCreateTime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithCreatedBy :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithCreatedBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithDescription :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithGuid :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithGuid original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithName :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithOptions :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (M.Map String String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atlasBaseTypeDefWithServiceType :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithServiceType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithTypeVersion :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithTypeVersion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithUpdateTime :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe Schema.DateTime) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithUpdateTime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithUpdatedBy :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithUpdatedBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasBaseTypeDefWithVersion :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasBaseTypeDefWithVersion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "category"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "category")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "guid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updatedBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updatedBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "createTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updateTime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "updateTime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "typeVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "serviceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "serviceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasBaseTypeDef"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasConstraintDef :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (M.Map String String) -> Phantoms.TTerm Atlas.AtlasConstraintDef
-atlasConstraintDef type_ params =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)}]}))
-
-atlasConstraintDefParams :: Phantoms.TTerm Atlas.AtlasConstraintDef -> Phantoms.TTerm (M.Map String String)
-atlasConstraintDefParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasConstraintDefType :: Phantoms.TTerm Atlas.AtlasConstraintDef -> Phantoms.TTerm (Maybe String)
-atlasConstraintDefType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasConstraintDefWithParams :: Phantoms.TTerm Atlas.AtlasConstraintDef -> Phantoms.TTerm (M.Map String String) -> Phantoms.TTerm Atlas.AtlasConstraintDef
-atlasConstraintDefWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atlasConstraintDefWithType :: Phantoms.TTerm Atlas.AtlasConstraintDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasConstraintDef
-atlasConstraintDefWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasConstraintDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasEntityDef :: Phantoms.TTerm Atlas.AtlasStructDef -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm [Atlas.AtlasRelationshipAttributeDef] -> Phantoms.TTerm (M.Map String [Atlas.AtlasAttributeDef]) -> Phantoms.TTerm Atlas.AtlasEntityDef
-atlasEntityDef asAtlasStruct superTypes subTypes relationshipAttributeDefs businessAttributeDefs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasStruct"),
-          Core.fieldTerm = (Phantoms.unTTerm asAtlasStruct)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm superTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm subTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipAttributeDefs"),
-          Core.fieldTerm = (Phantoms.unTTerm relationshipAttributeDefs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "businessAttributeDefs"),
-          Core.fieldTerm = (Phantoms.unTTerm businessAttributeDefs)}]}))
-
-atlasEntityDefAsAtlasStruct :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm Atlas.AtlasStructDef
-atlasEntityDefAsAtlasStruct x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-        Core.projectionField = (Core.Name "asAtlasStruct")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasEntityDefBusinessAttributeDefs :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm (M.Map String [Atlas.AtlasAttributeDef])
-atlasEntityDefBusinessAttributeDefs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-        Core.projectionField = (Core.Name "businessAttributeDefs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasEntityDefRelationshipAttributeDefs :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm [Atlas.AtlasRelationshipAttributeDef]
-atlasEntityDefRelationshipAttributeDefs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-        Core.projectionField = (Core.Name "relationshipAttributeDefs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasEntityDefSubTypes :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm (S.Set String)
-atlasEntityDefSubTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-        Core.projectionField = (Core.Name "subTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasEntityDefSuperTypes :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm (S.Set String)
-atlasEntityDefSuperTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-        Core.projectionField = (Core.Name "superTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasEntityDefWithAsAtlasStruct :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm Atlas.AtlasStructDef -> Phantoms.TTerm Atlas.AtlasEntityDef
-atlasEntityDefWithAsAtlasStruct original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasStruct"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "superTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "subTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "relationshipAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "businessAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "businessAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasEntityDefWithBusinessAttributeDefs :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm (M.Map String [Atlas.AtlasAttributeDef]) -> Phantoms.TTerm Atlas.AtlasEntityDef
-atlasEntityDefWithBusinessAttributeDefs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasStruct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "asAtlasStruct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "superTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "subTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "relationshipAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "businessAttributeDefs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atlasEntityDefWithRelationshipAttributeDefs :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm [Atlas.AtlasRelationshipAttributeDef] -> Phantoms.TTerm Atlas.AtlasEntityDef
-atlasEntityDefWithRelationshipAttributeDefs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasStruct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "asAtlasStruct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "superTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "subTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipAttributeDefs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "businessAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "businessAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasEntityDefWithSubTypes :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm Atlas.AtlasEntityDef
-atlasEntityDefWithSubTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasStruct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "asAtlasStruct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "superTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "relationshipAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "businessAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "businessAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasEntityDefWithSuperTypes :: Phantoms.TTerm Atlas.AtlasEntityDef -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm Atlas.AtlasEntityDef
-atlasEntityDefWithSuperTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasStruct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "asAtlasStruct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "subTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "relationshipAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "businessAttributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasEntityDef"),
-              Core.projectionField = (Core.Name "businessAttributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasRelationshipAttributeDef :: Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Bool -> Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef
-atlasRelationshipAttributeDef asAtlasAttribute relationshipTypeName isLegacyAttribute =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasAttribute"),
-          Core.fieldTerm = (Phantoms.unTTerm asAtlasAttribute)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm relationshipTypeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLegacyAttribute"),
-          Core.fieldTerm = (Phantoms.unTTerm isLegacyAttribute)}]}))
-
-atlasRelationshipAttributeDefAsAtlasAttribute :: Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef -> Phantoms.TTerm Atlas.AtlasAttributeDef
-atlasRelationshipAttributeDefAsAtlasAttribute x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-        Core.projectionField = (Core.Name "asAtlasAttribute")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasRelationshipAttributeDefIsLegacyAttribute :: Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef -> Phantoms.TTerm Bool
-atlasRelationshipAttributeDefIsLegacyAttribute x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-        Core.projectionField = (Core.Name "isLegacyAttribute")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasRelationshipAttributeDefRelationshipTypeName :: Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef -> Phantoms.TTerm (Maybe String)
-atlasRelationshipAttributeDefRelationshipTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-        Core.projectionField = (Core.Name "relationshipTypeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasRelationshipAttributeDefWithAsAtlasAttribute :: Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef -> Phantoms.TTerm Atlas.AtlasAttributeDef -> Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef
-atlasRelationshipAttributeDefWithAsAtlasAttribute original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasAttribute"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipTypeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-              Core.projectionField = (Core.Name "relationshipTypeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLegacyAttribute"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-              Core.projectionField = (Core.Name "isLegacyAttribute")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasRelationshipAttributeDefWithIsLegacyAttribute :: Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef
-atlasRelationshipAttributeDefWithIsLegacyAttribute original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasAttribute"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-              Core.projectionField = (Core.Name "asAtlasAttribute")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipTypeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-              Core.projectionField = (Core.Name "relationshipTypeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLegacyAttribute"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atlasRelationshipAttributeDefWithRelationshipTypeName :: Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Atlas.AtlasRelationshipAttributeDef
-atlasRelationshipAttributeDefWithRelationshipTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasAttribute"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-              Core.projectionField = (Core.Name "asAtlasAttribute")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLegacyAttribute"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasRelationshipAttributeDef"),
-              Core.projectionField = (Core.Name "isLegacyAttribute")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasStructDef :: Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm [Atlas.AtlasAttributeDef] -> Phantoms.TTerm Atlas.AtlasStructDef
-atlasStructDef asAtlasBaseType attributeDefs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasBaseType"),
-          Core.fieldTerm = (Phantoms.unTTerm asAtlasBaseType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributeDefs"),
-          Core.fieldTerm = (Phantoms.unTTerm attributeDefs)}]}))
-
-atlasStructDefAsAtlasBaseType :: Phantoms.TTerm Atlas.AtlasStructDef -> Phantoms.TTerm Atlas.AtlasBaseTypeDef
-atlasStructDefAsAtlasBaseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-        Core.projectionField = (Core.Name "asAtlasBaseType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasStructDefAttributeDefs :: Phantoms.TTerm Atlas.AtlasStructDef -> Phantoms.TTerm [Atlas.AtlasAttributeDef]
-atlasStructDefAttributeDefs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-        Core.projectionField = (Core.Name "attributeDefs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atlasStructDefWithAsAtlasBaseType :: Phantoms.TTerm Atlas.AtlasStructDef -> Phantoms.TTerm Atlas.AtlasBaseTypeDef -> Phantoms.TTerm Atlas.AtlasStructDef
-atlasStructDefWithAsAtlasBaseType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasBaseType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributeDefs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-              Core.projectionField = (Core.Name "attributeDefs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atlasStructDefWithAttributeDefs :: Phantoms.TTerm Atlas.AtlasStructDef -> Phantoms.TTerm [Atlas.AtlasAttributeDef] -> Phantoms.TTerm Atlas.AtlasStructDef
-atlasStructDefWithAttributeDefs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "asAtlasBaseType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.atlas.AtlasStructDef"),
-              Core.projectionField = (Core.Name "asAtlasBaseType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributeDefs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeCategoryArray :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryBusinessMetadata :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryBusinessMetadata =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "businessMetadata"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryClassification :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryClassification =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classification"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryEntity :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryEntity =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "entity"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryEnum :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryEnum =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryMap :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryMap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryObjectIdType :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryObjectIdType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectIdType"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryPrimitive :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryPrimitive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryRelationship :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryRelationship =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "relationship"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCategoryStruct :: Phantoms.TTerm Atlas.TypeCategory
-typeCategoryStruct =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.atlas.TypeCategory"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Avro/Environment.hs b/src/main/haskell/Hydra/Dsl/Avro/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Avro/Environment.hs
+++ /dev/null
@@ -1,363 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.avro.environment
-
-module Hydra.Dsl.Avro.Environment where
-
-import qualified Hydra.Avro.Environment as Environment
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-avroEnvironment :: Phantoms.TTerm (M.Map Environment.AvroQualifiedName (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term)) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (M.Map Core.Name Core.Binding) -> Phantoms.TTerm Environment.AvroEnvironment
-avroEnvironment namedAdapters namespace elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namedAdapters"),
-          Core.fieldTerm = (Phantoms.unTTerm namedAdapters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-avroEnvironmentElements :: Phantoms.TTerm Environment.AvroEnvironment -> Phantoms.TTerm (M.Map Core.Name Core.Binding)
-avroEnvironmentElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroEnvironmentNamedAdapters :: Phantoms.TTerm Environment.AvroEnvironment -> Phantoms.TTerm (M.Map Environment.AvroQualifiedName (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term))
-avroEnvironmentNamedAdapters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-        Core.projectionField = (Core.Name "namedAdapters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroEnvironmentNamespace :: Phantoms.TTerm Environment.AvroEnvironment -> Phantoms.TTerm (Maybe String)
-avroEnvironmentNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroEnvironmentWithElements :: Phantoms.TTerm Environment.AvroEnvironment -> Phantoms.TTerm (M.Map Core.Name Core.Binding) -> Phantoms.TTerm Environment.AvroEnvironment
-avroEnvironmentWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namedAdapters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-              Core.projectionField = (Core.Name "namedAdapters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-avroEnvironmentWithNamedAdapters :: Phantoms.TTerm Environment.AvroEnvironment -> Phantoms.TTerm (M.Map Environment.AvroQualifiedName (Coders.Adapter Schema.Schema Core.Type Model.Value Core.Term)) -> Phantoms.TTerm Environment.AvroEnvironment
-avroEnvironmentWithNamedAdapters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namedAdapters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-avroEnvironmentWithNamespace :: Phantoms.TTerm Environment.AvroEnvironment -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Environment.AvroEnvironment
-avroEnvironmentWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namedAdapters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-              Core.projectionField = (Core.Name "namedAdapters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroEnvironment"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-avroForeignKey :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (String -> Core.Name) -> Phantoms.TTerm Environment.AvroForeignKey
-avroForeignKey typeName constructor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm constructor)}]}))
-
-avroForeignKeyConstructor :: Phantoms.TTerm Environment.AvroForeignKey -> Phantoms.TTerm (String -> Core.Name)
-avroForeignKeyConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-        Core.projectionField = (Core.Name "constructor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroForeignKeyTypeName :: Phantoms.TTerm Environment.AvroForeignKey -> Phantoms.TTerm Core.Name
-avroForeignKeyTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroForeignKeyWithConstructor :: Phantoms.TTerm Environment.AvroForeignKey -> Phantoms.TTerm (String -> Core.Name) -> Phantoms.TTerm Environment.AvroForeignKey
-avroForeignKeyWithConstructor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-avroForeignKeyWithTypeName :: Phantoms.TTerm Environment.AvroForeignKey -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Environment.AvroForeignKey
-avroForeignKeyWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroForeignKey"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-avroPrimaryKey :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (String -> Core.Name) -> Phantoms.TTerm Environment.AvroPrimaryKey
-avroPrimaryKey fieldName constructor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm constructor)}]}))
-
-avroPrimaryKeyConstructor :: Phantoms.TTerm Environment.AvroPrimaryKey -> Phantoms.TTerm (String -> Core.Name)
-avroPrimaryKeyConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-        Core.projectionField = (Core.Name "constructor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroPrimaryKeyFieldName :: Phantoms.TTerm Environment.AvroPrimaryKey -> Phantoms.TTerm Core.Name
-avroPrimaryKeyFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-        Core.projectionField = (Core.Name "fieldName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroPrimaryKeyWithConstructor :: Phantoms.TTerm Environment.AvroPrimaryKey -> Phantoms.TTerm (String -> Core.Name) -> Phantoms.TTerm Environment.AvroPrimaryKey
-avroPrimaryKeyWithConstructor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-              Core.projectionField = (Core.Name "fieldName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-avroPrimaryKeyWithFieldName :: Phantoms.TTerm Environment.AvroPrimaryKey -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Environment.AvroPrimaryKey
-avroPrimaryKeyWithFieldName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroPrimaryKey"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-avroQualifiedName :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm String -> Phantoms.TTerm Environment.AvroQualifiedName
-avroQualifiedName namespace name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-avroQualifiedNameName :: Phantoms.TTerm Environment.AvroQualifiedName -> Phantoms.TTerm String
-avroQualifiedNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroQualifiedNameNamespace :: Phantoms.TTerm Environment.AvroQualifiedName -> Phantoms.TTerm (Maybe String)
-avroQualifiedNameNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-avroQualifiedNameWithName :: Phantoms.TTerm Environment.AvroQualifiedName -> Phantoms.TTerm String -> Phantoms.TTerm Environment.AvroQualifiedName
-avroQualifiedNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-avroQualifiedNameWithNamespace :: Phantoms.TTerm Environment.AvroQualifiedName -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Environment.AvroQualifiedName
-avroQualifiedNameWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.AvroQualifiedName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-encodeEnvironment :: Phantoms.TTerm (M.Map Core.Name Core.Type) -> Phantoms.TTerm (M.Map Core.Name (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value)) -> Phantoms.TTerm Environment.EncodeEnvironment
-encodeEnvironment typeMap emitted =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeMap"),
-          Core.fieldTerm = (Phantoms.unTTerm typeMap)},
-        Core.Field {
-          Core.fieldName = (Core.Name "emitted"),
-          Core.fieldTerm = (Phantoms.unTTerm emitted)}]}))
-
-encodeEnvironmentEmitted :: Phantoms.TTerm Environment.EncodeEnvironment -> Phantoms.TTerm (M.Map Core.Name (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value))
-encodeEnvironmentEmitted x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-        Core.projectionField = (Core.Name "emitted")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-encodeEnvironmentTypeMap :: Phantoms.TTerm Environment.EncodeEnvironment -> Phantoms.TTerm (M.Map Core.Name Core.Type)
-encodeEnvironmentTypeMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-        Core.projectionField = (Core.Name "typeMap")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-encodeEnvironmentWithEmitted :: Phantoms.TTerm Environment.EncodeEnvironment -> Phantoms.TTerm (M.Map Core.Name (Coders.Adapter Core.Type Schema.Schema Core.Term Model.Value)) -> Phantoms.TTerm Environment.EncodeEnvironment
-encodeEnvironmentWithEmitted original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-              Core.projectionField = (Core.Name "typeMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "emitted"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-encodeEnvironmentWithTypeMap :: Phantoms.TTerm Environment.EncodeEnvironment -> Phantoms.TTerm (M.Map Core.Name Core.Type) -> Phantoms.TTerm Environment.EncodeEnvironment
-encodeEnvironmentWithTypeMap original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeMap"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "emitted"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.environment.EncodeEnvironment"),
-              Core.projectionField = (Core.Name "emitted")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Avro/Schema.hs b/src/main/haskell/Hydra/Dsl/Avro/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Avro/Schema.hs
+++ /dev/null
@@ -1,1125 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.avro.schema
-
-module Hydra.Dsl.Avro.Schema where
-
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-array :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Array
-array items =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)}]}))
-
-arrayItems :: Phantoms.TTerm Schema.Array -> Phantoms.TTerm Schema.Schema
-arrayItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Array"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayWithItems :: Phantoms.TTerm Schema.Array -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Array
-arrayWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enum :: Phantoms.TTerm [String] -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Enum
-enum symbols default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbols"),
-          Core.fieldTerm = (Phantoms.unTTerm symbols)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-enumDefault :: Phantoms.TTerm Schema.Enum -> Phantoms.TTerm (Maybe String)
-enumDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Enum"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumSymbols :: Phantoms.TTerm Schema.Enum -> Phantoms.TTerm [String]
-enumSymbols x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Enum"),
-        Core.projectionField = (Core.Name "symbols")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumWithDefault :: Phantoms.TTerm Schema.Enum -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Enum
-enumWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbols"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Enum"),
-              Core.projectionField = (Core.Name "symbols")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumWithSymbols :: Phantoms.TTerm Schema.Enum -> Phantoms.TTerm [String] -> Phantoms.TTerm Schema.Enum
-enumWithSymbols original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbols"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Enum"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-field :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm (Maybe Model.Value) -> Phantoms.TTerm (Maybe Schema.Order) -> Phantoms.TTerm (Maybe [String]) -> Phantoms.TTerm (M.Map String Model.Value) -> Phantoms.TTerm Schema.Field
-field name doc type_ default_ order aliases annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm order)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm aliases)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-fieldAliases :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe [String])
-fieldAliases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "aliases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAnnotations :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (M.Map String Model.Value)
-fieldAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefault :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe Model.Value)
-fieldDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDoc :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe String)
-fieldDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldName :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm String
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldOrder :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe Schema.Order)
-fieldOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "order")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldType :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm Schema.Schema
-fieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldWithAliases :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe [String]) -> Phantoms.TTerm Schema.Field
-fieldWithAliases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithAnnotations :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (M.Map String Model.Value) -> Phantoms.TTerm Schema.Field
-fieldWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldWithDefault :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe Model.Value) -> Phantoms.TTerm Schema.Field
-fieldWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithDoc :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Field
-fieldWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithName :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm String -> Phantoms.TTerm Schema.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithOrder :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm (Maybe Schema.Order) -> Phantoms.TTerm Schema.Field
-fieldWithOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithType :: Phantoms.TTerm Schema.Field -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Field
-fieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Field"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixed :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.Fixed
-fixed size =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Fixed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Phantoms.unTTerm size)}]}))
-
-fixedSize :: Phantoms.TTerm Schema.Fixed -> Phantoms.TTerm Int
-fixedSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Fixed"),
-        Core.projectionField = (Core.Name "size")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedWithSize :: Phantoms.TTerm Schema.Fixed -> Phantoms.TTerm Int -> Phantoms.TTerm Schema.Fixed
-fixedWithSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Fixed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-map :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Map
-map values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-mapValues :: Phantoms.TTerm Schema.Map -> Phantoms.TTerm Schema.Schema
-mapValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Map"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapWithValues :: Phantoms.TTerm Schema.Map -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Map
-mapWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-named :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe [String]) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.NamedType -> Phantoms.TTerm (M.Map String Model.Value) -> Phantoms.TTerm Schema.Named
-named name namespace aliases doc type_ annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm aliases)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-namedAliases :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (Maybe [String])
-namedAliases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-        Core.projectionField = (Core.Name "aliases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedAnnotations :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (M.Map String Model.Value)
-namedAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedDoc :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (Maybe String)
-namedDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedName :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm String
-namedName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedNamespace :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (Maybe String)
-namedNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedType :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm Schema.NamedType
-namedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedTypeEnum :: Phantoms.TTerm Schema.Enum -> Phantoms.TTerm Schema.NamedType
-namedTypeEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.NamedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedTypeFixed :: Phantoms.TTerm Schema.Fixed -> Phantoms.TTerm Schema.NamedType
-namedTypeFixed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.NamedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedTypeRecord :: Phantoms.TTerm Schema.Record -> Phantoms.TTerm Schema.NamedType
-namedTypeRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.NamedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedWithAliases :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (Maybe [String]) -> Phantoms.TTerm Schema.Named
-namedWithAliases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedWithAnnotations :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (M.Map String Model.Value) -> Phantoms.TTerm Schema.Named
-namedWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedWithDoc :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Named
-namedWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedWithName :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm String -> Phantoms.TTerm Schema.Named
-namedWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedWithNamespace :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Named
-namedWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedWithType :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm Schema.NamedType -> Phantoms.TTerm Schema.Named
-namedWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Named"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.schema.Named"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-orderAscending :: Phantoms.TTerm Schema.Order
-orderAscending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Order"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderDescending :: Phantoms.TTerm Schema.Order
-orderDescending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Order"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "descending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderIgnore :: Phantoms.TTerm Schema.Order
-orderIgnore =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Order"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ignore"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveBoolean :: Phantoms.TTerm Schema.Primitive
-primitiveBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveBytes :: Phantoms.TTerm Schema.Primitive
-primitiveBytes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bytes"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveDouble :: Phantoms.TTerm Schema.Primitive
-primitiveDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveFloat :: Phantoms.TTerm Schema.Primitive
-primitiveFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveInt :: Phantoms.TTerm Schema.Primitive
-primitiveInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveLong :: Phantoms.TTerm Schema.Primitive
-primitiveLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveNull :: Phantoms.TTerm Schema.Primitive
-primitiveNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveString :: Phantoms.TTerm Schema.Primitive
-primitiveString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-record :: Phantoms.TTerm [Schema.Field] -> Phantoms.TTerm Schema.Record
-record fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Record"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-
-recordFields :: Phantoms.TTerm Schema.Record -> Phantoms.TTerm [Schema.Field]
-recordFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.schema.Record"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordWithFields :: Phantoms.TTerm Schema.Record -> Phantoms.TTerm [Schema.Field] -> Phantoms.TTerm Schema.Record
-recordWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.schema.Record"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaArray :: Phantoms.TTerm Schema.Array -> Phantoms.TTerm Schema.Schema
-schemaArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaMap :: Phantoms.TTerm Schema.Map -> Phantoms.TTerm Schema.Schema
-schemaMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaNamed :: Phantoms.TTerm Schema.Named -> Phantoms.TTerm Schema.Schema
-schemaNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaPrimitive :: Phantoms.TTerm Schema.Primitive -> Phantoms.TTerm Schema.Schema
-schemaPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaReference :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema
-schemaReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaUnion :: Phantoms.TTerm Schema.Union -> Phantoms.TTerm Schema.Schema
-schemaUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.schema.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unUnion :: Phantoms.TTerm Schema.Union -> Phantoms.TTerm [Schema.Schema]
-unUnion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.avro.schema.Union")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-union :: Phantoms.TTerm [Schema.Schema] -> Phantoms.TTerm Schema.Union
-union x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.avro.schema.Union"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Avro/Testing.hs b/src/main/haskell/Hydra/Dsl/Avro/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Avro/Testing.hs
+++ /dev/null
@@ -1,1915 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.avro.testing
-
-module Hydra.Dsl.Avro.Testing where
-
-import qualified Hydra.Avro.Schema as Schema
-import qualified Hydra.Avro.Testing as Testing
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-avroTestCaseLossiness :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseLossiness x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lossiness"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseNameMapping :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseNameMapping x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nameMapping"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseSchemaSerialization :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseSchemaSerialization x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schemaSerialization"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTermLevelForward :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTermLevelForward x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "termLevelForward"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTermLevelReverse :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTermLevelReverse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "termLevelReverse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTermLevelRoundTripJson :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTermLevelRoundTripJson x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "termLevelRoundTripJson"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTermLevelRoundTripTerm :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTermLevelRoundTripTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "termLevelRoundTripTerm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTypeLevelForward :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTypeLevelForward x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLevelForward"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTypeLevelReverse :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTypeLevelReverse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLevelReverse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTypeLevelRoundTripAvro :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTypeLevelRoundTripAvro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLevelRoundTripAvro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseTypeLevelRoundTripHydra :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseTypeLevelRoundTripHydra x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLevelRoundTripHydra"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-avroTestCaseUnion :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm Testing.AvroTestCase
-avroTestCaseUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.avro.testing.AvroTestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lossinessTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Bool -> Phantoms.TTerm Testing.LossinessTestCase
-lossinessTestCase description originalSchema hydraType recoveredSchema isLossy =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "originalSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm originalSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Phantoms.unTTerm hydraType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "recoveredSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm recoveredSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Phantoms.unTTerm isLossy)}]}))
-
-lossinessTestCaseDescription :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm String
-lossinessTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lossinessTestCaseHydraType :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Core.Type
-lossinessTestCaseHydraType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-        Core.projectionField = (Core.Name "hydraType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lossinessTestCaseIsLossy :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Bool
-lossinessTestCaseIsLossy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-        Core.projectionField = (Core.Name "isLossy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lossinessTestCaseOriginalSchema :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Schema.Schema
-lossinessTestCaseOriginalSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-        Core.projectionField = (Core.Name "originalSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lossinessTestCaseRecoveredSchema :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Schema.Schema
-lossinessTestCaseRecoveredSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-        Core.projectionField = (Core.Name "recoveredSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lossinessTestCaseWithDescription :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.LossinessTestCase
-lossinessTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "originalSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "originalSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recoveredSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "recoveredSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lossinessTestCaseWithHydraType :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.LossinessTestCase
-lossinessTestCaseWithHydraType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "originalSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "originalSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "recoveredSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "recoveredSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lossinessTestCaseWithIsLossy :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Bool -> Phantoms.TTerm Testing.LossinessTestCase
-lossinessTestCaseWithIsLossy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "originalSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "originalSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recoveredSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "recoveredSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lossinessTestCaseWithOriginalSchema :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.LossinessTestCase
-lossinessTestCaseWithOriginalSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "originalSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recoveredSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "recoveredSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lossinessTestCaseWithRecoveredSchema :: Phantoms.TTerm Testing.LossinessTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.LossinessTestCase
-lossinessTestCaseWithRecoveredSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "originalSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "originalSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recoveredSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.LossinessTestCase"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nameMappingTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Core.Name -> Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Testing.NameMappingTestCase
-nameMappingTestCase description hydraName avroName avroNamespace =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraName"),
-          Core.fieldTerm = (Phantoms.unTTerm hydraName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroName"),
-          Core.fieldTerm = (Phantoms.unTTerm avroName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm avroNamespace)}]}))
-
-nameMappingTestCaseAvroName :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm String
-nameMappingTestCaseAvroName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-        Core.projectionField = (Core.Name "avroName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nameMappingTestCaseAvroNamespace :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm (Maybe String)
-nameMappingTestCaseAvroNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-        Core.projectionField = (Core.Name "avroNamespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nameMappingTestCaseDescription :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm String
-nameMappingTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nameMappingTestCaseHydraName :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm Core.Name
-nameMappingTestCaseHydraName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-        Core.projectionField = (Core.Name "hydraName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nameMappingTestCaseWithAvroName :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.NameMappingTestCase
-nameMappingTestCaseWithAvroName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "hydraName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "avroNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nameMappingTestCaseWithAvroNamespace :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Testing.NameMappingTestCase
-nameMappingTestCaseWithAvroNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "hydraName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "avroName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nameMappingTestCaseWithDescription :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.NameMappingTestCase
-nameMappingTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "hydraName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "avroName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "avroNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nameMappingTestCaseWithHydraName :: Phantoms.TTerm Testing.NameMappingTestCase -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Testing.NameMappingTestCase
-nameMappingTestCaseWithHydraName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "avroName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.NameMappingTestCase"),
-              Core.projectionField = (Core.Name "avroNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaSerializationTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.SchemaSerializationTestCase
-schemaSerializationTestCase description schema json =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm json)}]}))
-
-schemaSerializationTestCaseDescription :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm String
-schemaSerializationTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaSerializationTestCaseJson :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm Model.Value
-schemaSerializationTestCaseJson x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-        Core.projectionField = (Core.Name "json")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaSerializationTestCaseSchema :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm Schema.Schema
-schemaSerializationTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaSerializationTestCaseWithDescription :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.SchemaSerializationTestCase
-schemaSerializationTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaSerializationTestCaseWithJson :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.SchemaSerializationTestCase
-schemaSerializationTestCaseWithJson original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaSerializationTestCaseWithSchema :: Phantoms.TTerm Testing.SchemaSerializationTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.SchemaSerializationTestCase
-schemaSerializationTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.SchemaSerializationTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelForwardTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermLevelForwardTestCase
-termLevelForwardTestCase description schema json term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm json)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-termLevelForwardTestCaseDescription :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm String
-termLevelForwardTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelForwardTestCaseJson :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Model.Value
-termLevelForwardTestCaseJson x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "json")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelForwardTestCaseSchema :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Schema.Schema
-termLevelForwardTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelForwardTestCaseTerm :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Core.Term
-termLevelForwardTestCaseTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelForwardTestCaseWithDescription :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TermLevelForwardTestCase
-termLevelForwardTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelForwardTestCaseWithJson :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.TermLevelForwardTestCase
-termLevelForwardTestCaseWithJson original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelForwardTestCaseWithSchema :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TermLevelForwardTestCase
-termLevelForwardTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelForwardTestCaseWithTerm :: Phantoms.TTerm Testing.TermLevelForwardTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermLevelForwardTestCase
-termLevelForwardTestCaseWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termLevelReverseTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.TermLevelReverseTestCase
-termLevelReverseTestCase description schema term json =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm json)}]}))
-
-termLevelReverseTestCaseDescription :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm String
-termLevelReverseTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelReverseTestCaseJson :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Model.Value
-termLevelReverseTestCaseJson x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "json")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelReverseTestCaseSchema :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Schema.Schema
-termLevelReverseTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelReverseTestCaseTerm :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Core.Term
-termLevelReverseTestCaseTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelReverseTestCaseWithDescription :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TermLevelReverseTestCase
-termLevelReverseTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelReverseTestCaseWithJson :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.TermLevelReverseTestCase
-termLevelReverseTestCaseWithJson original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termLevelReverseTestCaseWithSchema :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TermLevelReverseTestCase
-termLevelReverseTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelReverseTestCaseWithTerm :: Phantoms.TTerm Testing.TermLevelReverseTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermLevelReverseTestCase
-termLevelReverseTestCaseWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelRoundTripJsonTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase
-termLevelRoundTripJsonTestCase description schema json expectedJson =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm json)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedJson"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedJson)}]}))
-
-termLevelRoundTripJsonTestCaseDescription :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm String
-termLevelRoundTripJsonTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripJsonTestCaseExpectedJson :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Model.Value
-termLevelRoundTripJsonTestCaseExpectedJson x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-        Core.projectionField = (Core.Name "expectedJson")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripJsonTestCaseJson :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Model.Value
-termLevelRoundTripJsonTestCaseJson x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-        Core.projectionField = (Core.Name "json")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripJsonTestCaseSchema :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Schema.Schema
-termLevelRoundTripJsonTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripJsonTestCaseWithDescription :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase
-termLevelRoundTripJsonTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedJson"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "expectedJson")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelRoundTripJsonTestCaseWithExpectedJson :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase
-termLevelRoundTripJsonTestCaseWithExpectedJson original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedJson"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termLevelRoundTripJsonTestCaseWithJson :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase
-termLevelRoundTripJsonTestCaseWithJson original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedJson"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "expectedJson")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelRoundTripJsonTestCaseWithSchema :: Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TermLevelRoundTripJsonTestCase
-termLevelRoundTripJsonTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "json"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "json")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedJson"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripJsonTestCase"),
-              Core.projectionField = (Core.Name "expectedJson")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelRoundTripTermTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase
-termLevelRoundTripTermTestCase description type_ term expectedTerm =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedTerm"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedTerm)}]}))
-
-termLevelRoundTripTermTestCaseDescription :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm String
-termLevelRoundTripTermTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripTermTestCaseExpectedTerm :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Core.Term
-termLevelRoundTripTermTestCaseExpectedTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-        Core.projectionField = (Core.Name "expectedTerm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripTermTestCaseTerm :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Core.Term
-termLevelRoundTripTermTestCaseTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripTermTestCaseType :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Core.Type
-termLevelRoundTripTermTestCaseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLevelRoundTripTermTestCaseWithDescription :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase
-termLevelRoundTripTermTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedTerm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "expectedTerm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelRoundTripTermTestCaseWithExpectedTerm :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase
-termLevelRoundTripTermTestCaseWithExpectedTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedTerm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termLevelRoundTripTermTestCaseWithTerm :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase
-termLevelRoundTripTermTestCaseWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedTerm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "expectedTerm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLevelRoundTripTermTestCaseWithType :: Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TermLevelRoundTripTermTestCase
-termLevelRoundTripTermTestCaseWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedTerm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TermLevelRoundTripTermTestCase"),
-              Core.projectionField = (Core.Name "expectedTerm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelForwardTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeLevelForwardTestCase
-typeLevelForwardTestCase description schema type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeLevelForwardTestCaseDescription :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm String
-typeLevelForwardTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelForwardTestCaseSchema :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm Schema.Schema
-typeLevelForwardTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelForwardTestCaseType :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm Core.Type
-typeLevelForwardTestCaseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelForwardTestCaseWithDescription :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TypeLevelForwardTestCase
-typeLevelForwardTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelForwardTestCaseWithSchema :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TypeLevelForwardTestCase
-typeLevelForwardTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelForwardTestCaseWithType :: Phantoms.TTerm Testing.TypeLevelForwardTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeLevelForwardTestCase
-typeLevelForwardTestCaseWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelForwardTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeLevelReverseTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TypeLevelReverseTestCase
-typeLevelReverseTestCase description type_ schema =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)}]}))
-
-typeLevelReverseTestCaseDescription :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm String
-typeLevelReverseTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelReverseTestCaseSchema :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm Schema.Schema
-typeLevelReverseTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelReverseTestCaseType :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm Core.Type
-typeLevelReverseTestCaseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelReverseTestCaseWithDescription :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TypeLevelReverseTestCase
-typeLevelReverseTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelReverseTestCaseWithSchema :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TypeLevelReverseTestCase
-typeLevelReverseTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeLevelReverseTestCaseWithType :: Phantoms.TTerm Testing.TypeLevelReverseTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeLevelReverseTestCase
-typeLevelReverseTestCaseWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelReverseTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelRoundTripAvroTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase
-typeLevelRoundTripAvroTestCase description schema expectedSchema =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedSchema)}]}))
-
-typeLevelRoundTripAvroTestCaseDescription :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm String
-typeLevelRoundTripAvroTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelRoundTripAvroTestCaseExpectedSchema :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm Schema.Schema
-typeLevelRoundTripAvroTestCaseExpectedSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-        Core.projectionField = (Core.Name "expectedSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelRoundTripAvroTestCaseSchema :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm Schema.Schema
-typeLevelRoundTripAvroTestCaseSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelRoundTripAvroTestCaseWithDescription :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase
-typeLevelRoundTripAvroTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-              Core.projectionField = (Core.Name "expectedSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelRoundTripAvroTestCaseWithExpectedSchema :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase
-typeLevelRoundTripAvroTestCaseWithExpectedSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeLevelRoundTripAvroTestCaseWithSchema :: Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.TypeLevelRoundTripAvroTestCase
-typeLevelRoundTripAvroTestCaseWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripAvroTestCase"),
-              Core.projectionField = (Core.Name "expectedSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelRoundTripHydraTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase
-typeLevelRoundTripHydraTestCase description type_ expectedType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedType)}]}))
-
-typeLevelRoundTripHydraTestCaseDescription :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm String
-typeLevelRoundTripHydraTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelRoundTripHydraTestCaseExpectedType :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm Core.Type
-typeLevelRoundTripHydraTestCaseExpectedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-        Core.projectionField = (Core.Name "expectedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelRoundTripHydraTestCaseType :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm Core.Type
-typeLevelRoundTripHydraTestCaseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeLevelRoundTripHydraTestCaseWithDescription :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase
-typeLevelRoundTripHydraTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-              Core.projectionField = (Core.Name "expectedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeLevelRoundTripHydraTestCaseWithExpectedType :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase
-typeLevelRoundTripHydraTestCaseWithExpectedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeLevelRoundTripHydraTestCaseWithType :: Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeLevelRoundTripHydraTestCase
-typeLevelRoundTripHydraTestCaseWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.TypeLevelRoundTripHydraTestCase"),
-              Core.projectionField = (Core.Name "expectedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTestCase :: Phantoms.TTerm String -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm [(Core.Term, Model.Value)] -> Phantoms.TTerm Testing.UnionTestCase
-unionTestCase description hydraType avroSchema termPairs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Phantoms.unTTerm hydraType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm avroSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "termPairs"),
-          Core.fieldTerm = (Phantoms.unTTerm termPairs)}]}))
-
-unionTestCaseAvroSchema :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm Schema.Schema
-unionTestCaseAvroSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-        Core.projectionField = (Core.Name "avroSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTestCaseDescription :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm String
-unionTestCaseDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTestCaseHydraType :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm Core.Type
-unionTestCaseHydraType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-        Core.projectionField = (Core.Name "hydraType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTestCaseTermPairs :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm [(Core.Term, Model.Value)]
-unionTestCaseTermPairs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-        Core.projectionField = (Core.Name "termPairs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTestCaseWithAvroSchema :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Testing.UnionTestCase
-unionTestCaseWithAvroSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "termPairs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "termPairs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTestCaseWithDescription :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.UnionTestCase
-unionTestCaseWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "avroSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termPairs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "termPairs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTestCaseWithHydraType :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.UnionTestCase
-unionTestCaseWithHydraType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "avroSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termPairs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "termPairs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTestCaseWithTermPairs :: Phantoms.TTerm Testing.UnionTestCase -> Phantoms.TTerm [(Core.Term, Model.Value)] -> Phantoms.TTerm Testing.UnionTestCase
-unionTestCaseWithTermPairs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hydraType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "hydraType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "avroSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.avro.testing.UnionTestCase"),
-              Core.projectionField = (Core.Name "avroSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termPairs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Azure/Dtld.hs b/src/main/haskell/Hydra/Dsl/Azure/Dtld.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Azure/Dtld.hs
+++ /dev/null
@@ -1,7822 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.azure.dtld
-
-module Hydra.Dsl.Azure.Dtld where
-
-import qualified Hydra.Azure.Dtld as Dtld
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-
-command :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm String -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Dtld.CommandType) -> Phantoms.TTerm (Maybe Dtld.CommandPayload) -> Phantoms.TTerm (Maybe Dtld.CommandPayload) -> Phantoms.TTerm Dtld.Command
-command type_ name id comment description displayName commandType request response =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Phantoms.unTTerm commandType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Phantoms.unTTerm request)},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Phantoms.unTTerm response)}]}))
-
-commandCommandType :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.CommandType)
-commandCommandType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "commandType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandComment :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe String)
-commandComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandDescription :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe String)
-commandDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandDisplayName :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe String)
-commandDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandId :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-commandId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandName :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm String
-commandName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayload :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.CommandPayload
-commandPayload name schema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-commandPayloadComment :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe String)
-commandPayloadComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayloadDescription :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe String)
-commandPayloadDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayloadDisplayName :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe String)
-commandPayloadDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayloadId :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-commandPayloadId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayloadName :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm String
-commandPayloadName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayloadSchema :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm Dtld.Schema
-commandPayloadSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandPayloadWithComment :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.CommandPayload
-commandPayloadWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandPayloadWithDescription :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.CommandPayload
-commandPayloadWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandPayloadWithDisplayName :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.CommandPayload
-commandPayloadWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-commandPayloadWithId :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.CommandPayload
-commandPayloadWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandPayloadWithName :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.CommandPayload
-commandPayloadWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandPayloadWithSchema :: Phantoms.TTerm Dtld.CommandPayload -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.CommandPayload
-commandPayloadWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.CommandPayload"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandRequest :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.CommandPayload)
-commandRequest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "request")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandResponse :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.CommandPayload)
-commandResponse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "response")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandType :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm Dtld.Iri
-commandType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commandTypeAsynchronous :: Phantoms.TTerm Dtld.CommandType
-commandTypeAsynchronous =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.CommandType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asynchronous"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commandTypeSynchronous :: Phantoms.TTerm Dtld.CommandType
-commandTypeSynchronous =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.CommandType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "synchronous"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commandWithCommandType :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.CommandType) -> Phantoms.TTerm Dtld.Command
-commandWithCommandType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithComment :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Command
-commandWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithDescription :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Command
-commandWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithDisplayName :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Command
-commandWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithId :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Command
-commandWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithName :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Command
-commandWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithRequest :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.CommandPayload) -> Phantoms.TTerm Dtld.Command
-commandWithRequest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commandWithResponse :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm (Maybe Dtld.CommandPayload) -> Phantoms.TTerm Dtld.Command
-commandWithResponse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-commandWithType :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Command
-commandWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Command"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commandType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "commandType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "request"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "request")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "response"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Command"),
-              Core.projectionField = (Core.Name "response")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-component :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Component
-component type_ name schema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-componentComment :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe String)
-componentComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentDescription :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe String)
-componentDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentDisplayName :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe String)
-componentDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentId :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-componentId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentName :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm String
-componentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentSchema :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm Dtld.Interface
-componentSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentType :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm Dtld.Iri
-componentType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-componentWithComment :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Component
-componentWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-componentWithDescription :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Component
-componentWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-componentWithDisplayName :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Component
-componentWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-componentWithId :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Component
-componentWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-componentWithName :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Component
-componentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-componentWithSchema :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Component
-componentWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-componentWithType :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Component
-componentWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Component"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Component"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dtmi :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.Dtmi
-dtmi x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.azure.dtld.Dtmi"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumValue :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.IntegerOrString -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.EnumValue
-enumValue name enumValue id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Phantoms.unTTerm enumValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-enumValueComment :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe String)
-enumValueComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueDescription :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe String)
-enumValueDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueDisplayName :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe String)
-enumValueDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueEnumValue :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm Dtld.IntegerOrString
-enumValueEnumValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-        Core.projectionField = (Core.Name "enumValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueId :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-enumValueId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueName :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm String
-enumValueName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueWithComment :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.EnumValue
-enumValueWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "enumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueWithDescription :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.EnumValue
-enumValueWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "enumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueWithDisplayName :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.EnumValue
-enumValueWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "enumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumValueWithEnumValue :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm Dtld.IntegerOrString -> Phantoms.TTerm Dtld.EnumValue
-enumValueWithEnumValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueWithId :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.EnumValue
-enumValueWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "enumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueWithName :: Phantoms.TTerm Dtld.EnumValue -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.EnumValue
-enumValueWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "enumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.EnumValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-field :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Field
-field name schema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-fieldComment :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe String)
-fieldComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDescription :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe String)
-fieldDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDisplayName :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe String)
-fieldDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldId :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-fieldId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldName :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm String
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldSchema :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm Dtld.Schema
-fieldSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldWithComment :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Field
-fieldWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithDescription :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Field
-fieldWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithDisplayName :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Field
-fieldWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldWithId :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Field
-fieldWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithName :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithSchema :: Phantoms.TTerm Dtld.Field -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.Field
-fieldWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Field"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-integerOrStringInteger :: Phantoms.TTerm Int -> Phantoms.TTerm Dtld.IntegerOrString
-integerOrStringInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.IntegerOrString"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerOrStringString :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.IntegerOrString
-integerOrStringString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.IntegerOrString"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interface :: Phantoms.TTerm Dtld.Dtmi -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe (S.Set Dtld.Interface_Contents)) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe (S.Set Dtld.Interface)) -> Phantoms.TTerm (Maybe (S.Set Dtld.Schema_Interface)) -> Phantoms.TTerm Dtld.Interface
-interface id type_ context comment contents description displayName extends schemas =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm context)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Phantoms.unTTerm contents)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Phantoms.unTTerm extends)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Phantoms.unTTerm schemas)}]}))
-
-interfaceComment :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe String)
-interfaceComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceContents :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe (S.Set Dtld.Interface_Contents))
-interfaceContents x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "contents")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceContext :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Iri
-interfaceContext x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "context")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDescription :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe String)
-interfaceDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDisplayName :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe String)
-interfaceDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceExtends :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe (S.Set Dtld.Interface))
-interfaceExtends x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "extends")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceId :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Dtmi
-interfaceId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceSchemas :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe (S.Set Dtld.Schema_Interface))
-interfaceSchemas x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "schemas")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceType :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Iri
-interfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceWithComment :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Interface
-interfaceWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithContents :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe (S.Set Dtld.Interface_Contents)) -> Phantoms.TTerm Dtld.Interface
-interfaceWithContents original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithContext :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Interface
-interfaceWithContext original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithDescription :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Interface
-interfaceWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithDisplayName :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Interface
-interfaceWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithExtends :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe (S.Set Dtld.Interface)) -> Phantoms.TTerm Dtld.Interface
-interfaceWithExtends original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithId :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Dtmi -> Phantoms.TTerm Dtld.Interface
-interfaceWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceWithSchemas :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm (Maybe (S.Set Dtld.Schema_Interface)) -> Phantoms.TTerm Dtld.Interface
-interfaceWithSchemas original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceWithType :: Phantoms.TTerm Dtld.Interface -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Interface
-interfaceWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contents"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "contents")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Interface"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interface_ContentsCommand :: Phantoms.TTerm Dtld.Command -> Phantoms.TTerm Dtld.Interface_Contents
-interface_ContentsCommand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Interface_Contents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "command"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interface_ContentsComponent :: Phantoms.TTerm Dtld.Component -> Phantoms.TTerm Dtld.Interface_Contents
-interface_ContentsComponent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Interface_Contents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "component"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interface_ContentsProperty :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm Dtld.Interface_Contents
-interface_ContentsProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Interface_Contents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interface_ContentsRelationship :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm Dtld.Interface_Contents
-interface_ContentsRelationship x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Interface_Contents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "relationship"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interface_ContentsTelemetry :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm Dtld.Interface_Contents
-interface_ContentsTelemetry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Interface_Contents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "telemetry"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iri :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.Iri
-iri x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.azure.dtld.Iri"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-mapKey :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapKey
-mapKey name schema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-mapKeyComment :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe String)
-mapKeyComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapKeyDescription :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe String)
-mapKeyDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapKeyDisplayName :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe String)
-mapKeyDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapKeyId :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-mapKeyId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapKeyName :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm String
-mapKeyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapKeySchema :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm Dtld.Schema
-mapKeySchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapKeyWithComment :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapKey
-mapKeyWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapKeyWithDescription :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapKey
-mapKeyWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapKeyWithDisplayName :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapKey
-mapKeyWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapKeyWithId :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.MapKey
-mapKeyWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapKeyWithName :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.MapKey
-mapKeyWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapKeyWithSchema :: Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.MapKey
-mapKeyWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapKey"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapValue :: Phantoms.TTerm String -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapValue
-mapValue name schema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-mapValueComment :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe String)
-mapValueComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueDescription :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe String)
-mapValueDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueDisplayName :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe String)
-mapValueDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueId :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-mapValueId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueName :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm String
-mapValueName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueSchema :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm Dtld.Schema
-mapValueSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueWithComment :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapValue
-mapValueWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapValueWithDescription :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapValue
-mapValueWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapValueWithDisplayName :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.MapValue
-mapValueWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapValueWithId :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.MapValue
-mapValueWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapValueWithName :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.MapValue
-mapValueWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapValueWithSchema :: Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.MapValue
-mapValueWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.MapValue"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-property :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Dtld.Unit) -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Dtld.Property
-property type_ name schema id comment description displayName unit writable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm unit)},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Phantoms.unTTerm writable)}]}))
-
-propertyComment :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe String)
-propertyComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyDescription :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe String)
-propertyDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyDisplayName :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe String)
-propertyDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyId :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-propertyId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyName :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm String
-propertyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySchema :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm Dtld.Schema
-propertySchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyType :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm Dtld.Iri
-propertyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyUnit :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe Dtld.Unit)
-propertyUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "unit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyWithComment :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Property
-propertyWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithDescription :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Property
-propertyWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithDisplayName :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Property
-propertyWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithId :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Property
-propertyWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithName :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Property
-propertyWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithSchema :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.Property
-propertyWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithType :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Property
-propertyWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithUnit :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe Dtld.Unit) -> Phantoms.TTerm Dtld.Property
-propertyWithUnit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithWritable :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Dtld.Property
-propertyWithWritable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyWritable :: Phantoms.TTerm Dtld.Property -> Phantoms.TTerm (Maybe Bool)
-propertyWritable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Property"),
-        Core.projectionField = (Core.Name "writable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationship :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm String -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe (S.Set Dtld.Property)) -> Phantoms.TTerm (Maybe Dtld.Interface) -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Dtld.Relationship
-relationship type_ name id comment description displayName maxMultiplicity minMultiplicity properties target writable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Phantoms.unTTerm maxMultiplicity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Phantoms.unTTerm minMultiplicity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Phantoms.unTTerm writable)}]}))
-
-relationshipComment :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe String)
-relationshipComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDescription :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe String)
-relationshipDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDisplayName :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe String)
-relationshipDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipId :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-relationshipId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipMaxMultiplicity :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Int)
-relationshipMaxMultiplicity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "maxMultiplicity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipMinMultiplicity :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Int)
-relationshipMinMultiplicity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "minMultiplicity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipName :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm String
-relationshipName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipProperties :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe (S.Set Dtld.Property))
-relationshipProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipTarget :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Dtld.Interface)
-relationshipTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipType :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm Dtld.Iri
-relationshipType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipWithComment :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithDescription :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithDisplayName :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithId :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithMaxMultiplicity :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithMaxMultiplicity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithMinMultiplicity :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithMinMultiplicity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithName :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Relationship
-relationshipWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithProperties :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe (S.Set Dtld.Property)) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithTarget :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Dtld.Interface) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithType :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Relationship
-relationshipWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "writable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipWithWritable :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Dtld.Relationship
-relationshipWithWritable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "maxMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minMultiplicity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "minMultiplicity")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "writable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationshipWritable :: Phantoms.TTerm Dtld.Relationship -> Phantoms.TTerm (Maybe Bool)
-relationshipWritable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Relationship"),
-        Core.projectionField = (Core.Name "writable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaComplex :: Phantoms.TTerm Dtld.Schema_Complex -> Phantoms.TTerm Dtld.Schema
-schemaComplex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "complex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaPrimitive :: Phantoms.TTerm Dtld.Schema_Primitive -> Phantoms.TTerm Dtld.Schema
-schemaPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_Array :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Array
-schema_Array type_ elementSchema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm elementSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-schema_ArrayComment :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe String)
-schema_ArrayComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ArrayDescription :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe String)
-schema_ArrayDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ArrayDisplayName :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe String)
-schema_ArrayDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ArrayElementSchema :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm Dtld.Schema
-schema_ArrayElementSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-        Core.projectionField = (Core.Name "elementSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ArrayId :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-schema_ArrayId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ArrayType :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm Dtld.Iri
-schema_ArrayType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ArrayWithComment :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Array
-schema_ArrayWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "elementSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ArrayWithDescription :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Array
-schema_ArrayWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "elementSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ArrayWithDisplayName :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Array
-schema_ArrayWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "elementSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schema_ArrayWithElementSchema :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.Schema_Array
-schema_ArrayWithElementSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ArrayWithId :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Schema_Array
-schema_ArrayWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "elementSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ArrayWithType :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Schema_Array
-schema_ArrayWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "elementSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Array"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ComplexArray :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm Dtld.Schema_Complex
-schema_ComplexArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Complex"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_ComplexEnum :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm Dtld.Schema_Complex
-schema_ComplexEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Complex"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_ComplexMap :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.Schema_Complex
-schema_ComplexMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Complex"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_ComplexObject :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm Dtld.Schema_Complex
-schema_ComplexObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Complex"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_Enum :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm [Dtld.EnumValue] -> Phantoms.TTerm Dtld.IntegerOrString -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Enum
-schema_Enum type_ enumValues valueSchema id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Phantoms.unTTerm enumValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm valueSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-schema_EnumComment :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe String)
-schema_EnumComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumDescription :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe String)
-schema_EnumDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumDisplayName :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe String)
-schema_EnumDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumEnumValues :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm [Dtld.EnumValue]
-schema_EnumEnumValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "enumValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumId :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-schema_EnumId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumType :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm Dtld.Iri
-schema_EnumType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumValueSchema :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm Dtld.IntegerOrString
-schema_EnumValueSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-        Core.projectionField = (Core.Name "valueSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_EnumWithComment :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "enumValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "valueSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_EnumWithDescription :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "enumValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "valueSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_EnumWithDisplayName :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "enumValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "valueSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schema_EnumWithEnumValues :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm [Dtld.EnumValue] -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithEnumValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "valueSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_EnumWithId :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "enumValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "valueSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_EnumWithType :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "enumValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "valueSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_EnumWithValueSchema :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm Dtld.IntegerOrString -> Phantoms.TTerm Dtld.Schema_Enum
-schema_EnumWithValueSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enumValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "enumValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Enum"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_Interface :: Phantoms.TTerm Dtld.Dtmi -> Phantoms.TTerm Dtld.Schema_Interface_Type -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Interface
-schema_Interface id type_ comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-schema_InterfaceComment :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm (Maybe String)
-schema_InterfaceComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_InterfaceDescription :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm (Maybe String)
-schema_InterfaceDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_InterfaceDisplayName :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm (Maybe String)
-schema_InterfaceDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_InterfaceId :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm Dtld.Dtmi
-schema_InterfaceId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_InterfaceType :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm Dtld.Schema_Interface_Type
-schema_InterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_InterfaceWithComment :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Interface
-schema_InterfaceWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_InterfaceWithDescription :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Interface
-schema_InterfaceWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_InterfaceWithDisplayName :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Interface
-schema_InterfaceWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schema_InterfaceWithId :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm Dtld.Dtmi -> Phantoms.TTerm Dtld.Schema_Interface
-schema_InterfaceWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_InterfaceWithType :: Phantoms.TTerm Dtld.Schema_Interface -> Phantoms.TTerm Dtld.Schema_Interface_Type -> Phantoms.TTerm Dtld.Schema_Interface
-schema_InterfaceWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_Interface_TypeArray :: Phantoms.TTerm Dtld.Schema_Array -> Phantoms.TTerm Dtld.Schema_Interface_Type
-schema_Interface_TypeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface_Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_Interface_TypeEnum :: Phantoms.TTerm Dtld.Schema_Enum -> Phantoms.TTerm Dtld.Schema_Interface_Type
-schema_Interface_TypeEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface_Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_Interface_TypeMap :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.Schema_Interface_Type
-schema_Interface_TypeMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface_Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_Interface_TypeObject :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm Dtld.Schema_Interface_Type
-schema_Interface_TypeObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Interface_Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema_Map :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Map
-schema_Map type_ mapKey mapValue id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Phantoms.unTTerm mapKey)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Phantoms.unTTerm mapValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-schema_MapComment :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe String)
-schema_MapComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapDescription :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe String)
-schema_MapDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapDisplayName :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe String)
-schema_MapDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapId :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-schema_MapId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapMapKey :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.MapKey
-schema_MapMapKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "mapKey")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapMapValue :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.MapValue
-schema_MapMapValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "mapValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapType :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.Iri
-schema_MapType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_MapWithComment :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_MapWithDescription :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_MapWithDisplayName :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schema_MapWithId :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_MapWithMapKey :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.MapKey -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithMapKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_MapWithMapValue :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.MapValue -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithMapValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_MapWithType :: Phantoms.TTerm Dtld.Schema_Map -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Schema_Map
-schema_MapWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "mapValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Map"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_Object :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm (S.Set Dtld.Field) -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Object
-schema_Object type_ fields id comment description displayName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)}]}))
-
-schema_ObjectComment :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe String)
-schema_ObjectComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ObjectDescription :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe String)
-schema_ObjectDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ObjectDisplayName :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe String)
-schema_ObjectDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ObjectFields :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (S.Set Dtld.Field)
-schema_ObjectFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ObjectId :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-schema_ObjectId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ObjectType :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm Dtld.Iri
-schema_ObjectType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schema_ObjectWithComment :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Object
-schema_ObjectWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ObjectWithDescription :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Object
-schema_ObjectWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ObjectWithDisplayName :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Schema_Object
-schema_ObjectWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schema_ObjectWithFields :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (S.Set Dtld.Field) -> Phantoms.TTerm Dtld.Schema_Object
-schema_ObjectWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ObjectWithId :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Schema_Object
-schema_ObjectWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_ObjectWithType :: Phantoms.TTerm Dtld.Schema_Object -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Schema_Object
-schema_ObjectWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Object"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schema_PrimitiveBoolean :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveDate :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveDate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveDateTime :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveDateTime =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateTime"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveDouble :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveDuration :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveDuration =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duration"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveFloat :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveInteger :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveLong :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveString :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schema_PrimitiveTime :: Phantoms.TTerm Dtld.Schema_Primitive
-schema_PrimitiveTime =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.azure.dtld.Schema_Primitive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "time"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-telemetry :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Dtld.Unit) -> Phantoms.TTerm Dtld.Telemetry
-telemetry type_ name schema id comment description displayName unit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm displayName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm unit)}]}))
-
-telemetryComment :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe String)
-telemetryComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryDescription :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe String)
-telemetryDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryDisplayName :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe String)
-telemetryDisplayName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "displayName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryId :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe Dtld.Dtmi)
-telemetryId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryName :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm String
-telemetryName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetrySchema :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm Dtld.Schema
-telemetrySchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryType :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm Dtld.Iri
-telemetryType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryUnit :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe Dtld.Unit)
-telemetryUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-        Core.projectionField = (Core.Name "unit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-telemetryWithComment :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithDescription :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithDisplayName :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithDisplayName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithId :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe Dtld.Dtmi) -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithName :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm String -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithSchema :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm Dtld.Schema -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithType :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-telemetryWithUnit :: Phantoms.TTerm Dtld.Telemetry -> Phantoms.TTerm (Maybe Dtld.Unit) -> Phantoms.TTerm Dtld.Telemetry
-telemetryWithUnit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "displayName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.azure.dtld.Telemetry"),
-              Core.projectionField = (Core.Name "displayName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unDtmi :: Phantoms.TTerm Dtld.Dtmi -> Phantoms.TTerm String
-unDtmi x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.azure.dtld.Dtmi")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIri :: Phantoms.TTerm Dtld.Iri -> Phantoms.TTerm String
-unIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.azure.dtld.Iri")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnit :: Phantoms.TTerm Dtld.Unit -> Phantoms.TTerm ()
-unUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.azure.dtld.Unit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unit :: Phantoms.TTerm () -> Phantoms.TTerm Dtld.Unit
-unit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.azure.dtld.Unit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Bootstrap.hs b/src/main/haskell/Hydra/Dsl/Bootstrap.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Bootstrap.hs
+++ /dev/null
@@ -1,88 +0,0 @@
--- | A bootstrapping DSL, used for Hydra's inner core models
-
-module Hydra.Dsl.Bootstrap (
-  module Hydra.Dsl.AsType,
-  bootstrapGraph,
-  datatype,
-  qualify,
-  typeref,
-  defineType,
-  toTypeDef,
-  use,
-  useType,
-) where
-
-import Hydra.Util
-import Hydra.Constants
-import Hydra.Core
-import Hydra.Dsl.AsType
-import Hydra.Graph
-import Hydra.Lexical
-import Hydra.Annotations
-import Hydra.Packaging
-import Hydra.Sources.Libraries
-import qualified Hydra.Decode.Core as Decode
-import qualified Hydra.Encode.Core as Encode
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-
-
--- | An empty graph (no elements, no schema, but with primitive functions) which is used for bootstrapping Hydra Core
-bootstrapGraph :: Graph
-bootstrapGraph = Graph {
-  graphBoundTerms = M.empty,
-  graphBoundTypes = M.empty,
-  graphClassConstraints = M.empty,
-  graphLambdaVariables = S.empty,
-  graphMetadata = M.empty,
-  graphPrimitives = M.fromList $ fmap (\p -> (primitiveName p, p)) (L.concat (libraryPrimitives <$> standardLibraries)),
-  graphSchemaTypes = M.empty,
-  graphTypeVariables = S.empty}
-
-datatype :: Namespace -> String -> Type -> Binding
-datatype gname lname typ = Binding {
-    bindingName = elName,
-    bindingTerm = normalizeTermAnnotations (TermAnnotated (AnnotatedTerm {
-      annotatedTermBody = Encode.type_ typ,
-      annotatedTermAnnotation = M.fromList [
-        (Name "type", TermVariable (Name "hydra.core.Type"))]})),
-    bindingTypeScheme = Just (TypeScheme {
-      typeSchemeVariables = [],
-      typeSchemeBody = TypeVariable (Name "hydra.core.Type"),
-      typeSchemeConstraints = Nothing})}
-  where
-    elName = qualify gname (Name lname)
-
-qualify :: Namespace -> Name -> Name
-qualify (Namespace gname) (Name lname) = Name $ gname ++ "." ++ lname
-
-typeref :: Namespace -> String -> Type
-typeref ns = TypeVariable . qualify ns . Name
-
--- | New DSL helpers (Option 1 from dsl-redesign-options.md)
-
--- | Define a type in a namespace
-defineType :: Namespace -> String -> Type -> Binding
-defineType = datatype
-
--- | Convert a type Binding (from defineType) to a type Definition.
--- The Binding must have been created by defineType/datatype, which stores
--- the type encoded as a term. We decode it back.
-toTypeDef :: Binding -> Definition
-toTypeDef b = case Decode.type_ bootstrapGraph (stripAnnotations $ bindingTerm b) of
-  Right typ -> DefinitionType $ TypeDefinition (bindingName b) (TypeScheme [] typ Nothing)
-  Left err -> error $ "toTypeDef: failed to decode type from binding "
-    ++ show (bindingName b) ++ ": " ++ show err
-  where
-    stripAnnotations (TermAnnotated (AnnotatedTerm body _)) = stripAnnotations body
-    stripAnnotations t = t
-
--- | Reference a type by its binding
-use :: Binding -> Type
-use b = TypeVariable (bindingName b)
-
--- | Reference a type in a namespace (old style, for migration)
-useType :: Namespace -> String -> Type
-useType = typeref
diff --git a/src/main/haskell/Hydra/Dsl/Classes.hs b/src/main/haskell/Hydra/Dsl/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Classes.hs
+++ /dev/null
@@ -1,23 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.classes
-
-module Hydra.Dsl.Classes where
-import qualified Hydra.Classes as Classes
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-typeClassEquality :: Phantoms.TTerm Classes.TypeClass
-typeClassEquality =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equality"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeClassOrdering :: Phantoms.TTerm Classes.TypeClass
-typeClassOrdering =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ordering"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Coders.hs b/src/main/haskell/Hydra/Dsl/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Coders.hs
+++ /dev/null
@@ -1,1021 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.coders
-
-module Hydra.Dsl.Coders where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Phantoms as Phantoms
-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
-adapter :: Phantoms.TTerm Bool -> Phantoms.TTerm t1 -> Phantoms.TTerm t2 -> Phantoms.TTerm (Coders.Coder v1 v2) -> Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2)
-adapter isLossy source target coder =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Adapter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Phantoms.unTTerm isLossy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "coder"),
-          Core.fieldTerm = (Phantoms.unTTerm coder)}]}))
-adapterCoder :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (Coders.Coder v1 v2)
-adapterCoder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-        Core.projectionField = (Core.Name "coder")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterContext :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Coders.Language -> Phantoms.TTerm (M.Map Core.Name (Coders.Adapter Core.Type Core.Type Core.Term Core.Term)) -> Phantoms.TTerm Coders.AdapterContext
-adapterContext graph language adapters =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "language"),
-          Core.fieldTerm = (Phantoms.unTTerm language)},
-        Core.Field {
-          Core.fieldName = (Core.Name "adapters"),
-          Core.fieldTerm = (Phantoms.unTTerm adapters)}]}))
-adapterContextAdapters :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm (M.Map Core.Name (Coders.Adapter Core.Type Core.Type Core.Term Core.Term))
-adapterContextAdapters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-        Core.projectionField = (Core.Name "adapters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterContextGraph :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Graph.Graph
-adapterContextGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterContextLanguage :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Coders.Language
-adapterContextLanguage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-        Core.projectionField = (Core.Name "language")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterContextWithAdapters :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm (M.Map Core.Name (Coders.Adapter Core.Type Core.Type Core.Term Core.Term)) -> Phantoms.TTerm Coders.AdapterContext
-adapterContextWithAdapters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "language"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-              Core.projectionField = (Core.Name "language")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "adapters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-adapterContextWithGraph :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Coders.AdapterContext
-adapterContextWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "language"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-              Core.projectionField = (Core.Name "language")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "adapters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-              Core.projectionField = (Core.Name "adapters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-adapterContextWithLanguage :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.AdapterContext
-adapterContextWithLanguage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "language"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "adapters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),
-              Core.projectionField = (Core.Name "adapters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-adapterIsLossy :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm Bool
-adapterIsLossy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-        Core.projectionField = (Core.Name "isLossy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterSource :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t1
-adapterSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterTarget :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t2
-adapterTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-adapterWithCoder :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (Coders.Coder v1 v2) -> Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2)
-adapterWithCoder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Adapter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coder"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-adapterWithIsLossy :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2)
-adapterWithIsLossy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Adapter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "coder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-adapterWithSource :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t1 -> Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2)
-adapterWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Adapter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "coder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-adapterWithTarget :: Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t2 -> Phantoms.TTerm (Coders.Adapter t1 t2 v1 v2)
-adapterWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Adapter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLossy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "isLossy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "coder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Adapter"),
-              Core.projectionField = (Core.Name "coder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-bicoder :: Phantoms.TTerm (t1 -> Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (t2 -> Coders.Adapter t2 t1 v2 v1) -> Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2)
-bicoder encode decode =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Bicoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm encode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))
-bicoderDecode :: Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t2 -> Coders.Adapter t2 t1 v2 v1)
-bicoderDecode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Bicoder"),
-        Core.projectionField = (Core.Name "decode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bicoderEncode :: Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t1 -> Coders.Adapter t1 t2 v1 v2)
-bicoderEncode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Bicoder"),
-        Core.projectionField = (Core.Name "encode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bicoderWithDecode :: Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t2 -> Coders.Adapter t2 t1 v2 v1) -> Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2)
-bicoderWithDecode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Bicoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Bicoder"),
-              Core.projectionField = (Core.Name "encode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-bicoderWithEncode :: Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t1 -> Coders.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (Coders.Bicoder t1 t2 v1 v2)
-bicoderWithEncode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Bicoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Bicoder"),
-              Core.projectionField = (Core.Name "decode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-coder :: Phantoms.TTerm (Context.Context -> v1 -> Either Errors.Error v2) -> Phantoms.TTerm (Context.Context -> v2 -> Either Errors.Error v1) -> Phantoms.TTerm (Coders.Coder v1 v2)
-coder encode decode =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Coder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm encode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))
-coderDecode :: Phantoms.TTerm (Coders.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v2 -> Either Errors.Error v1)
-coderDecode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-        Core.projectionField = (Core.Name "decode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-coderDirectionDecode :: Phantoms.TTerm Coders.CoderDirection
-coderDirectionDecode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decode"),
-        Core.fieldTerm = Core.TermUnit}}))
-coderDirectionEncode :: Phantoms.TTerm Coders.CoderDirection
-coderDirectionEncode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "encode"),
-        Core.fieldTerm = Core.TermUnit}}))
-coderEncode :: Phantoms.TTerm (Coders.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v1 -> Either Errors.Error v2)
-coderEncode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-        Core.projectionField = (Core.Name "encode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-coderWithDecode :: Phantoms.TTerm (Coders.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v2 -> Either Errors.Error v1) -> Phantoms.TTerm (Coders.Coder v1 v2)
-coderWithDecode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Coder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-              Core.projectionField = (Core.Name "encode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-coderWithEncode :: Phantoms.TTerm (Coders.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v1 -> Either Errors.Error v2) -> Phantoms.TTerm (Coders.Coder v1 v2)
-coderWithEncode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Coder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-              Core.projectionField = (Core.Name "decode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-language :: Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm Coders.Language
-language name constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Language"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-languageConstraints :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Language"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsEliminationVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.EliminationVariant)
-languageConstraintsEliminationVariants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "eliminationVariants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsFloatTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.FloatType)
-languageConstraintsFloatTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "floatTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsFunctionVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.FunctionVariant)
-languageConstraintsFunctionVariants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "functionVariants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsIntegerTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.IntegerType)
-languageConstraintsIntegerTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "integerTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsLiteralVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.LiteralVariant)
-languageConstraintsLiteralVariants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "literalVariants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsTermVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TermVariant)
-languageConstraintsTermVariants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "termVariants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsTypeVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TypeVariant)
-languageConstraintsTypeVariants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "typeVariants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (Core.Type -> Bool)
-languageConstraintsTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageConstraintsWithEliminationVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.EliminationVariant) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithEliminationVariants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithFloatTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.FloatType) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithFloatTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithFunctionVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.FunctionVariant) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithFunctionVariants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithIntegerTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.IntegerType) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithIntegerTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithLiteralVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.LiteralVariant) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithLiteralVariants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithTermVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TermVariant) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithTermVariants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithTypeVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TypeVariant) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithTypeVariants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-languageConstraintsWithTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (Core.Type -> Bool) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraintsWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "eliminationVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "literalVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "floatTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "functionVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "integerTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "termVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-              Core.projectionField = (Core.Name "typeVariants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-languageConstraints_ :: Phantoms.TTerm (S.Set Variants.EliminationVariant) -> Phantoms.TTerm (S.Set Variants.LiteralVariant) -> Phantoms.TTerm (S.Set Core.FloatType) -> Phantoms.TTerm (S.Set Variants.FunctionVariant) -> Phantoms.TTerm (S.Set Core.IntegerType) -> Phantoms.TTerm (S.Set Variants.TermVariant) -> Phantoms.TTerm (S.Set Variants.TypeVariant) -> Phantoms.TTerm (Core.Type -> Bool) -> Phantoms.TTerm Coders.LanguageConstraints
-languageConstraints_ eliminationVariants literalVariants floatTypes functionVariants integerTypes termVariants typeVariants types =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "eliminationVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm eliminationVariants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literalVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm literalVariants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "floatTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm floatTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm functionVariants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "integerTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm integerTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm termVariants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariants"),
-          Core.fieldTerm = (Phantoms.unTTerm typeVariants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)}]}))
-languageName :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageName
-languageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coders.Language"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-languageName_ :: Phantoms.TTerm String -> Phantoms.TTerm Coders.LanguageName
-languageName_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coders.LanguageName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-languageWithConstraints :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm Coders.Language
-languageWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Language"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Language"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-languageWithName :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm Coders.Language
-languageWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coders.Language"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coders.Language"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-traversalOrderPost :: Phantoms.TTerm Coders.TraversalOrder
-traversalOrderPost =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "post"),
-        Core.fieldTerm = Core.TermUnit}}))
-traversalOrderPre :: Phantoms.TTerm Coders.TraversalOrder
-traversalOrderPre =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pre"),
-        Core.fieldTerm = Core.TermUnit}}))
-unLanguageName :: Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm String
-unLanguageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coders.LanguageName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Com/Gdblab/PathAlgebra/Expressions.hs b/src/main/haskell/Hydra/Dsl/Com/Gdblab/PathAlgebra/Expressions.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Com/Gdblab/PathAlgebra/Expressions.hs
+++ /dev/null
@@ -1,1833 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for com.gdblab.pathAlgebra.expressions
-
-module Hydra.Dsl.Com.Gdblab.PathAlgebra.Expressions where
-
-import qualified Com.Gdblab.PathAlgebra.Expressions as Expressions
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-andCondition :: Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.AndCondition
-andCondition left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-andConditionLeft :: Phantoms.TTerm Expressions.AndCondition -> Phantoms.TTerm Expressions.SelectionCondition
-andConditionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-andConditionRight :: Phantoms.TTerm Expressions.AndCondition -> Phantoms.TTerm Expressions.SelectionCondition
-andConditionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-andConditionWithLeft :: Phantoms.TTerm Expressions.AndCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.AndCondition
-andConditionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-andConditionWithRight :: Phantoms.TTerm Expressions.AndCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.AndCondition
-andConditionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-baseExpressionPaths0 :: Phantoms.TTerm Expressions.GraphReference -> Phantoms.TTerm Expressions.BaseExpression
-baseExpressionPaths0 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.BaseExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paths0"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-baseExpressionPaths1 :: Phantoms.TTerm Expressions.GraphReference -> Phantoms.TTerm Expressions.BaseExpression
-baseExpressionPaths1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.BaseExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paths1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-baseExpressionPathsStar :: Phantoms.TTerm Expressions.GraphReference -> Phantoms.TTerm Expressions.BaseExpression
-baseExpressionPathsStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.BaseExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pathsStar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-comparisonOperatorEqual :: Phantoms.TTerm Expressions.ComparisonOperator
-comparisonOperatorEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorGreaterThan :: Phantoms.TTerm Expressions.ComparisonOperator
-comparisonOperatorGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorGreaterThanOrEqual :: Phantoms.TTerm Expressions.ComparisonOperator
-comparisonOperatorGreaterThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorLessThan :: Phantoms.TTerm Expressions.ComparisonOperator
-comparisonOperatorLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorLessThanOrEqual :: Phantoms.TTerm Expressions.ComparisonOperator
-comparisonOperatorLessThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorNotEqual :: Phantoms.TTerm Expressions.ComparisonOperator
-comparisonOperatorNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgePropertyRef :: Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.EdgePropertyRef
-edgePropertyRef element property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-edgePropertyRefElement :: Phantoms.TTerm Expressions.EdgePropertyRef -> Phantoms.TTerm Expressions.PathElement
-edgePropertyRefElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgePropertyRefProperty :: Phantoms.TTerm Expressions.EdgePropertyRef -> Phantoms.TTerm String
-edgePropertyRefProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgePropertyRefWithElement :: Phantoms.TTerm Expressions.EdgePropertyRef -> Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm Expressions.EdgePropertyRef
-edgePropertyRefWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgePropertyRefWithProperty :: Phantoms.TTerm Expressions.EdgePropertyRef -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.EdgePropertyRef
-edgePropertyRefWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphReference :: Phantoms.TTerm String -> Phantoms.TTerm Expressions.GraphReference
-graphReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GraphReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-groupByCriterionLength :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "length"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionNone :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionSource :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionSource =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "source"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionSourceLength :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionSourceLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceLength"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionSourceTarget :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionSourceTarget =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceTarget"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionSourceTargetLength :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionSourceTargetLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceTargetLength"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionTarget :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionTarget =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "target"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByCriterionTargetLength :: Phantoms.TTerm Expressions.GroupByCriterion
-groupByCriterionTargetLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "targetLength"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByExpression :: Phantoms.TTerm Expressions.GroupByCriterion -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.GroupByExpression
-groupByExpression criterion expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "criterion"),
-          Core.fieldTerm = (Phantoms.unTTerm criterion)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-groupByExpressionCriterion :: Phantoms.TTerm Expressions.GroupByExpression -> Phantoms.TTerm Expressions.GroupByCriterion
-groupByExpressionCriterion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-        Core.projectionField = (Core.Name "criterion")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-groupByExpressionExpression :: Phantoms.TTerm Expressions.GroupByExpression -> Phantoms.TTerm Expressions.PathExpression
-groupByExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-groupByExpressionWithCriterion :: Phantoms.TTerm Expressions.GroupByExpression -> Phantoms.TTerm Expressions.GroupByCriterion -> Phantoms.TTerm Expressions.GroupByExpression
-groupByExpressionWithCriterion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "criterion"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-groupByExpressionWithExpression :: Phantoms.TTerm Expressions.GroupByExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.GroupByExpression
-groupByExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "criterion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"),
-              Core.projectionField = (Core.Name "criterion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-joinExpression :: Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.JoinExpression
-joinExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-joinExpressionLeft :: Phantoms.TTerm Expressions.JoinExpression -> Phantoms.TTerm Expressions.PathExpression
-joinExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinExpressionRight :: Phantoms.TTerm Expressions.JoinExpression -> Phantoms.TTerm Expressions.PathExpression
-joinExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinExpressionWithLeft :: Phantoms.TTerm Expressions.JoinExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.JoinExpression
-joinExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinExpressionWithRight :: Phantoms.TTerm Expressions.JoinExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.JoinExpression
-joinExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labelCondition :: Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.LabelCondition
-labelCondition target value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-labelConditionTarget :: Phantoms.TTerm Expressions.LabelCondition -> Phantoms.TTerm Expressions.PathElement
-labelConditionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labelConditionValue :: Phantoms.TTerm Expressions.LabelCondition -> Phantoms.TTerm String
-labelConditionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labelConditionWithTarget :: Phantoms.TTerm Expressions.LabelCondition -> Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm Expressions.LabelCondition
-labelConditionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labelConditionWithValue :: Phantoms.TTerm Expressions.LabelCondition -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.LabelCondition
-labelConditionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lengthCondition :: Phantoms.TTerm Int -> Phantoms.TTerm Expressions.LengthCondition
-lengthCondition length =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LengthCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm length)}]}))
-
-lengthConditionLength :: Phantoms.TTerm Expressions.LengthCondition -> Phantoms.TTerm Int
-lengthConditionLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LengthCondition"),
-        Core.projectionField = (Core.Name "length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lengthConditionWithLength :: Phantoms.TTerm Expressions.LengthCondition -> Phantoms.TTerm Int -> Phantoms.TTerm Expressions.LengthCondition
-lengthConditionWithLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LengthCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalValueBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Expressions.LiteralValue
-literalValueBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LiteralValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalValueFloat :: Phantoms.TTerm Double -> Phantoms.TTerm Expressions.LiteralValue
-literalValueFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LiteralValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalValueInteger :: Phantoms.TTerm Int -> Phantoms.TTerm Expressions.LiteralValue
-literalValueInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LiteralValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalValueString :: Phantoms.TTerm String -> Phantoms.TTerm Expressions.LiteralValue
-literalValueString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.LiteralValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodePropertyRef :: Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.NodePropertyRef
-nodePropertyRef element property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-nodePropertyRefElement :: Phantoms.TTerm Expressions.NodePropertyRef -> Phantoms.TTerm Expressions.PathElement
-nodePropertyRefElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePropertyRefProperty :: Phantoms.TTerm Expressions.NodePropertyRef -> Phantoms.TTerm String
-nodePropertyRefProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePropertyRefWithElement :: Phantoms.TTerm Expressions.NodePropertyRef -> Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm Expressions.NodePropertyRef
-nodePropertyRefWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePropertyRefWithProperty :: Phantoms.TTerm Expressions.NodePropertyRef -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.NodePropertyRef
-nodePropertyRefWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-notCondition :: Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.NotCondition
-notCondition condition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NotCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)}]}))
-
-notConditionCondition :: Phantoms.TTerm Expressions.NotCondition -> Phantoms.TTerm Expressions.SelectionCondition
-notConditionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NotCondition"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notConditionWithCondition :: Phantoms.TTerm Expressions.NotCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.NotCondition
-notConditionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.NotCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orCondition :: Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.OrCondition
-orCondition left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-orConditionLeft :: Phantoms.TTerm Expressions.OrCondition -> Phantoms.TTerm Expressions.SelectionCondition
-orConditionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orConditionRight :: Phantoms.TTerm Expressions.OrCondition -> Phantoms.TTerm Expressions.SelectionCondition
-orConditionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orConditionWithLeft :: Phantoms.TTerm Expressions.OrCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.OrCondition
-orConditionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-orConditionWithRight :: Phantoms.TTerm Expressions.OrCondition -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.OrCondition
-orConditionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orderByCriterionGroup :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionGroup =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByCriterionGroupPath :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionGroupPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "groupPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByCriterionPartition :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionPartition =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partition"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByCriterionPartitionGroup :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionPartitionGroup =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partitionGroup"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByCriterionPartitionGroupPath :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionPartitionGroupPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partitionGroupPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByCriterionPartitionPath :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionPartitionPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partitionPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByCriterionPath :: Phantoms.TTerm Expressions.OrderByCriterion
-orderByCriterionPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByExpression :: Phantoms.TTerm Expressions.OrderByCriterion -> Phantoms.TTerm Expressions.SolutionSpaceExpression -> Phantoms.TTerm Expressions.OrderByExpression
-orderByExpression criterion expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "criterion"),
-          Core.fieldTerm = (Phantoms.unTTerm criterion)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-orderByExpressionCriterion :: Phantoms.TTerm Expressions.OrderByExpression -> Phantoms.TTerm Expressions.OrderByCriterion
-orderByExpressionCriterion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-        Core.projectionField = (Core.Name "criterion")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderByExpressionExpression :: Phantoms.TTerm Expressions.OrderByExpression -> Phantoms.TTerm Expressions.SolutionSpaceExpression
-orderByExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderByExpressionWithCriterion :: Phantoms.TTerm Expressions.OrderByExpression -> Phantoms.TTerm Expressions.OrderByCriterion -> Phantoms.TTerm Expressions.OrderByExpression
-orderByExpressionWithCriterion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "criterion"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-orderByExpressionWithExpression :: Phantoms.TTerm Expressions.OrderByExpression -> Phantoms.TTerm Expressions.SolutionSpaceExpression -> Phantoms.TTerm Expressions.OrderByExpression
-orderByExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "criterion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"),
-              Core.projectionField = (Core.Name "criterion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathElementEdge :: Phantoms.TTerm Int -> Phantoms.TTerm Expressions.PathElement
-pathElementEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathElementFirst :: Phantoms.TTerm Expressions.PathElement
-pathElementFirst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "first"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathElementLast :: Phantoms.TTerm Expressions.PathElement
-pathElementLast =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "last"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathElementNode :: Phantoms.TTerm Int -> Phantoms.TTerm Expressions.PathElement
-pathElementNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionBase :: Phantoms.TTerm Expressions.BaseExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionBase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "base"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionGroupBy :: Phantoms.TTerm Expressions.GroupByExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionGroupBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "groupBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionJoin :: Phantoms.TTerm Expressions.JoinExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionJoin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "join"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionOrderBy :: Phantoms.TTerm Expressions.OrderByExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionOrderBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orderBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionProjection :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionProjection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "projection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionRecursive :: Phantoms.TTerm Expressions.RecursiveExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionRecursive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recursive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionSelection :: Phantoms.TTerm Expressions.SelectionExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionSelection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "selection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathExpressionUnion :: Phantoms.TTerm Expressions.UnionExpression -> Phantoms.TTerm Expressions.PathExpression
-pathExpressionUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPropertyRefEndNode :: Phantoms.TTerm Expressions.PathPropertyRef
-pathPropertyRefEndNode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathPropertyRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endNode"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathPropertyRefLength :: Phantoms.TTerm Expressions.PathPropertyRef
-pathPropertyRefLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathPropertyRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "length"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathPropertyRefStartNode :: Phantoms.TTerm Expressions.PathPropertyRef
-pathPropertyRefStartNode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathPropertyRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "startNode"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathSemanticsAcyclic :: Phantoms.TTerm Expressions.PathSemantics
-pathSemanticsAcyclic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathSemantics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "acyclic"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathSemanticsShortest :: Phantoms.TTerm Expressions.PathSemantics
-pathSemanticsShortest =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathSemantics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shortest"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathSemanticsSimple :: Phantoms.TTerm Expressions.PathSemantics
-pathSemanticsSimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathSemantics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathSemanticsTrail :: Phantoms.TTerm Expressions.PathSemantics
-pathSemanticsTrail =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathSemantics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trail"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathSemanticsWalk :: Phantoms.TTerm Expressions.PathSemantics
-pathSemanticsWalk =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PathSemantics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "walk"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-projectionExpression :: Phantoms.TTerm Expressions.ProjectionSpec -> Phantoms.TTerm Expressions.ProjectionSpec -> Phantoms.TTerm Expressions.ProjectionSpec -> Phantoms.TTerm Expressions.SolutionSpaceExpression -> Phantoms.TTerm Expressions.ProjectionExpression
-projectionExpression partitions groups paths expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partitions"),
-          Core.fieldTerm = (Phantoms.unTTerm partitions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Phantoms.unTTerm groups)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paths"),
-          Core.fieldTerm = (Phantoms.unTTerm paths)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-projectionExpressionExpression :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.SolutionSpaceExpression
-projectionExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionExpressionGroups :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.ProjectionSpec
-projectionExpressionGroups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-        Core.projectionField = (Core.Name "groups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionExpressionPartitions :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.ProjectionSpec
-projectionExpressionPartitions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-        Core.projectionField = (Core.Name "partitions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionExpressionPaths :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.ProjectionSpec
-projectionExpressionPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-        Core.projectionField = (Core.Name "paths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionExpressionWithExpression :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.SolutionSpaceExpression -> Phantoms.TTerm Expressions.ProjectionExpression
-projectionExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "partitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "groups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "paths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projectionExpressionWithGroups :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.ProjectionSpec -> Phantoms.TTerm Expressions.ProjectionExpression
-projectionExpressionWithGroups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "partitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "paths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionExpressionWithPartitions :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.ProjectionSpec -> Phantoms.TTerm Expressions.ProjectionExpression
-projectionExpressionWithPartitions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partitions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "groups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "paths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionExpressionWithPaths :: Phantoms.TTerm Expressions.ProjectionExpression -> Phantoms.TTerm Expressions.ProjectionSpec -> Phantoms.TTerm Expressions.ProjectionExpression
-projectionExpressionWithPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "partitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "groups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionSpecAll :: Phantoms.TTerm Expressions.ProjectionSpec
-projectionSpecAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-projectionSpecLimited :: Phantoms.TTerm Int -> Phantoms.TTerm Expressions.ProjectionSpec
-projectionSpecLimited x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limited"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyComparisonCondition :: Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.ComparisonOperator -> Phantoms.TTerm Expressions.LiteralValue -> Phantoms.TTerm Expressions.PropertyComparisonCondition
-propertyComparisonCondition target property operator value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertyComparisonConditionOperator :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.ComparisonOperator
-propertyComparisonConditionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyComparisonConditionProperty :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm String
-propertyComparisonConditionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyComparisonConditionTarget :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.PathElement
-propertyComparisonConditionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyComparisonConditionValue :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.LiteralValue
-propertyComparisonConditionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyComparisonConditionWithOperator :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.ComparisonOperator -> Phantoms.TTerm Expressions.PropertyComparisonCondition
-propertyComparisonConditionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyComparisonConditionWithProperty :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.PropertyComparisonCondition
-propertyComparisonConditionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyComparisonConditionWithTarget :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm Expressions.PropertyComparisonCondition
-propertyComparisonConditionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyComparisonConditionWithValue :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.LiteralValue -> Phantoms.TTerm Expressions.PropertyComparisonCondition
-propertyComparisonConditionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyCondition :: Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.LiteralValue -> Phantoms.TTerm Expressions.PropertyCondition
-propertyCondition target property value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertyConditionProperty :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm String
-propertyConditionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyConditionTarget :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm Expressions.PathElement
-propertyConditionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyConditionValue :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm Expressions.LiteralValue
-propertyConditionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyConditionWithProperty :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm String -> Phantoms.TTerm Expressions.PropertyCondition
-propertyConditionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyConditionWithTarget :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm Expressions.PathElement -> Phantoms.TTerm Expressions.PropertyCondition
-propertyConditionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyConditionWithValue :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm Expressions.LiteralValue -> Phantoms.TTerm Expressions.PropertyCondition
-propertyConditionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyExtraction :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Expressions.PropertySource -> Phantoms.TTerm Expressions.PropertyExtraction
-propertyExtraction alias source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-propertyExtractionAlias :: Phantoms.TTerm Expressions.PropertyExtraction -> Phantoms.TTerm (Maybe String)
-propertyExtractionAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExtractionSource :: Phantoms.TTerm Expressions.PropertyExtraction -> Phantoms.TTerm Expressions.PropertySource
-propertyExtractionSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExtractionWithAlias :: Phantoms.TTerm Expressions.PropertyExtraction -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Expressions.PropertyExtraction
-propertyExtractionWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyExtractionWithSource :: Phantoms.TTerm Expressions.PropertyExtraction -> Phantoms.TTerm Expressions.PropertySource -> Phantoms.TTerm Expressions.PropertyExtraction
-propertyExtractionWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertySourceEdgeProperty :: Phantoms.TTerm Expressions.EdgePropertyRef -> Phantoms.TTerm Expressions.PropertySource
-propertySourceEdgeProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertySource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edgeProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertySourceNodeProperty :: Phantoms.TTerm Expressions.NodePropertyRef -> Phantoms.TTerm Expressions.PropertySource
-propertySourceNodeProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertySource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nodeProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertySourcePathProperty :: Phantoms.TTerm Expressions.PathPropertyRef -> Phantoms.TTerm Expressions.PropertySource
-propertySourcePathProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.PropertySource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pathProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryExpression :: Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm (Maybe Expressions.ResultProjection) -> Phantoms.TTerm Expressions.QueryExpression
-queryExpression pathExpression resultProjection =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm pathExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "resultProjection"),
-          Core.fieldTerm = (Phantoms.unTTerm resultProjection)}]}))
-
-queryExpressionPathExpression :: Phantoms.TTerm Expressions.QueryExpression -> Phantoms.TTerm Expressions.PathExpression
-queryExpressionPathExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-        Core.projectionField = (Core.Name "pathExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryExpressionResultProjection :: Phantoms.TTerm Expressions.QueryExpression -> Phantoms.TTerm (Maybe Expressions.ResultProjection)
-queryExpressionResultProjection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-        Core.projectionField = (Core.Name "resultProjection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryExpressionWithPathExpression :: Phantoms.TTerm Expressions.QueryExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.QueryExpression
-queryExpressionWithPathExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "resultProjection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-              Core.projectionField = (Core.Name "resultProjection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-queryExpressionWithResultProjection :: Phantoms.TTerm Expressions.QueryExpression -> Phantoms.TTerm (Maybe Expressions.ResultProjection) -> Phantoms.TTerm Expressions.QueryExpression
-queryExpressionWithResultProjection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"),
-              Core.projectionField = (Core.Name "pathExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "resultProjection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recursiveExpression :: Phantoms.TTerm Expressions.PathSemantics -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.RecursiveExpression
-recursiveExpression semantics expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "semantics"),
-          Core.fieldTerm = (Phantoms.unTTerm semantics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-recursiveExpressionExpression :: Phantoms.TTerm Expressions.RecursiveExpression -> Phantoms.TTerm Expressions.PathExpression
-recursiveExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recursiveExpressionSemantics :: Phantoms.TTerm Expressions.RecursiveExpression -> Phantoms.TTerm Expressions.PathSemantics
-recursiveExpressionSemantics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-        Core.projectionField = (Core.Name "semantics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recursiveExpressionWithExpression :: Phantoms.TTerm Expressions.RecursiveExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.RecursiveExpression
-recursiveExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "semantics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-              Core.projectionField = (Core.Name "semantics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recursiveExpressionWithSemantics :: Phantoms.TTerm Expressions.RecursiveExpression -> Phantoms.TTerm Expressions.PathSemantics -> Phantoms.TTerm Expressions.RecursiveExpression
-recursiveExpressionWithSemantics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "semantics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-resultProjection :: Phantoms.TTerm [Expressions.PropertyExtraction] -> Phantoms.TTerm Expressions.ResultProjection
-resultProjection projections =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ResultProjection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projections"),
-          Core.fieldTerm = (Phantoms.unTTerm projections)}]}))
-
-resultProjectionProjections :: Phantoms.TTerm Expressions.ResultProjection -> Phantoms.TTerm [Expressions.PropertyExtraction]
-resultProjectionProjections x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ResultProjection"),
-        Core.projectionField = (Core.Name "projections")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-resultProjectionWithProjections :: Phantoms.TTerm Expressions.ResultProjection -> Phantoms.TTerm [Expressions.PropertyExtraction] -> Phantoms.TTerm Expressions.ResultProjection
-resultProjectionWithProjections original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.ResultProjection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projections"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectionConditionAnd :: Phantoms.TTerm Expressions.AndCondition -> Phantoms.TTerm Expressions.SelectionCondition
-selectionConditionAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionConditionNot :: Phantoms.TTerm Expressions.NotCondition -> Phantoms.TTerm Expressions.SelectionCondition
-selectionConditionNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionConditionOr :: Phantoms.TTerm Expressions.OrCondition -> Phantoms.TTerm Expressions.SelectionCondition
-selectionConditionOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionConditionSimple :: Phantoms.TTerm Expressions.SimpleCondition -> Phantoms.TTerm Expressions.SelectionCondition
-selectionConditionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionExpression :: Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.SelectionExpression
-selectionExpression condition expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-selectionExpressionCondition :: Phantoms.TTerm Expressions.SelectionExpression -> Phantoms.TTerm Expressions.SelectionCondition
-selectionExpressionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectionExpressionExpression :: Phantoms.TTerm Expressions.SelectionExpression -> Phantoms.TTerm Expressions.PathExpression
-selectionExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectionExpressionWithCondition :: Phantoms.TTerm Expressions.SelectionExpression -> Phantoms.TTerm Expressions.SelectionCondition -> Phantoms.TTerm Expressions.SelectionExpression
-selectionExpressionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectionExpressionWithExpression :: Phantoms.TTerm Expressions.SelectionExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.SelectionExpression
-selectionExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleConditionLabelEquals :: Phantoms.TTerm Expressions.LabelCondition -> Phantoms.TTerm Expressions.SimpleCondition
-simpleConditionLabelEquals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SimpleCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labelEquals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleConditionLengthEquals :: Phantoms.TTerm Expressions.LengthCondition -> Phantoms.TTerm Expressions.SimpleCondition
-simpleConditionLengthEquals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SimpleCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lengthEquals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleConditionPropertyComparison :: Phantoms.TTerm Expressions.PropertyComparisonCondition -> Phantoms.TTerm Expressions.SimpleCondition
-simpleConditionPropertyComparison x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SimpleCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyComparison"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleConditionPropertyEquals :: Phantoms.TTerm Expressions.PropertyCondition -> Phantoms.TTerm Expressions.SimpleCondition
-simpleConditionPropertyEquals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SimpleCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyEquals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-solutionSpaceExpressionGroupBy :: Phantoms.TTerm Expressions.GroupByExpression -> Phantoms.TTerm Expressions.SolutionSpaceExpression
-solutionSpaceExpressionGroupBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SolutionSpaceExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "groupBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-solutionSpaceExpressionOrderBy :: Phantoms.TTerm Expressions.OrderByExpression -> Phantoms.TTerm Expressions.SolutionSpaceExpression
-solutionSpaceExpressionOrderBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.SolutionSpaceExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orderBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unGraphReference :: Phantoms.TTerm Expressions.GraphReference -> Phantoms.TTerm String
-unGraphReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "com.gdblab.pathAlgebra.expressions.GraphReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionExpression :: Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.UnionExpression
-unionExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-unionExpressionLeft :: Phantoms.TTerm Expressions.UnionExpression -> Phantoms.TTerm Expressions.PathExpression
-unionExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionExpressionRight :: Phantoms.TTerm Expressions.UnionExpression -> Phantoms.TTerm Expressions.PathExpression
-unionExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionExpressionWithLeft :: Phantoms.TTerm Expressions.UnionExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.UnionExpression
-unionExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionExpressionWithRight :: Phantoms.TTerm Expressions.UnionExpression -> Phantoms.TTerm Expressions.PathExpression -> Phantoms.TTerm Expressions.UnionExpression
-unionExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Com/Gdblab/PathAlgebra/Syntax.hs b/src/main/haskell/Hydra/Dsl/Com/Gdblab/PathAlgebra/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Com/Gdblab/PathAlgebra/Syntax.hs
+++ /dev/null
@@ -1,1817 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for com.gdblab.pathAlgebra.syntax
-
-module Hydra.Dsl.Com.Gdblab.PathAlgebra.Syntax where
-
-import qualified Com.Gdblab.PathAlgebra.Syntax as Syntax
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-alternation :: Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Alternation
-alternation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-alternationLeft :: Phantoms.TTerm Syntax.Alternation -> Phantoms.TTerm Syntax.Rpq
-alternationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-alternationRight :: Phantoms.TTerm Syntax.Alternation -> Phantoms.TTerm Syntax.Rpq
-alternationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-alternationWithLeft :: Phantoms.TTerm Syntax.Alternation -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Alternation
-alternationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-alternationWithRight :: Phantoms.TTerm Syntax.Alternation -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Alternation
-alternationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-boolOpAnd :: Phantoms.TTerm Syntax.BoolOp
-boolOpAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.BoolOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-boolOpOr :: Phantoms.TTerm Syntax.BoolOp
-boolOpOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.BoolOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareSymEqual :: Phantoms.TTerm Syntax.CompareSym
-compareSymEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareSymGreaterThan :: Phantoms.TTerm Syntax.CompareSym
-compareSymGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareSymGreaterThanOrEqual :: Phantoms.TTerm Syntax.CompareSym
-compareSymGreaterThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareSymLessThan :: Phantoms.TTerm Syntax.CompareSym
-compareSymLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareSymLessThanOrEqual :: Phantoms.TTerm Syntax.CompareSym
-compareSymLessThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareSymNotEqual :: Phantoms.TTerm Syntax.CompareSym
-compareSymNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-complexConditionCompound :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.ComplexCondition
-complexConditionCompound x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compound"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-complexConditionSimple :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.ComplexCondition
-complexConditionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-complexFunction :: Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.Function -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.ComplexFunction
-complexFunction name innerFunction additionalArg =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm innerFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "additionalArg"),
-          Core.fieldTerm = (Phantoms.unTTerm additionalArg)}]}))
-
-complexFunctionAdditionalArg :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Text
-complexFunctionAdditionalArg x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-        Core.projectionField = (Core.Name "additionalArg")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-complexFunctionInnerFunction :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Function
-complexFunctionInnerFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-        Core.projectionField = (Core.Name "innerFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-complexFunctionName :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Text
-complexFunctionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-complexFunctionWithAdditionalArg :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.ComplexFunction
-complexFunctionWithAdditionalArg original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-              Core.projectionField = (Core.Name "innerFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "additionalArg"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-complexFunctionWithInnerFunction :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Function -> Phantoms.TTerm Syntax.ComplexFunction
-complexFunctionWithInnerFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "additionalArg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-              Core.projectionField = (Core.Name "additionalArg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-complexFunctionWithName :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.ComplexFunction
-complexFunctionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-              Core.projectionField = (Core.Name "innerFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "additionalArg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"),
-              Core.projectionField = (Core.Name "additionalArg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundComplexCondition :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.BoolOp -> Phantoms.TTerm Syntax.ComplexCondition -> Phantoms.TTerm Syntax.CompoundComplexCondition
-compoundComplexCondition lhs operator rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-compoundComplexConditionLhs :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.Condition
-compoundComplexConditionLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compoundComplexConditionOperator :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.BoolOp
-compoundComplexConditionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compoundComplexConditionRhs :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.ComplexCondition
-compoundComplexConditionRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compoundComplexConditionWithLhs :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.CompoundComplexCondition
-compoundComplexConditionWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundComplexConditionWithOperator :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.BoolOp -> Phantoms.TTerm Syntax.CompoundComplexCondition
-compoundComplexConditionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundComplexConditionWithRhs :: Phantoms.TTerm Syntax.CompoundComplexCondition -> Phantoms.TTerm Syntax.ComplexCondition -> Phantoms.TTerm Syntax.CompoundComplexCondition
-compoundComplexConditionWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-concatenation :: Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Concatenation
-concatenation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-concatenationLeft :: Phantoms.TTerm Syntax.Concatenation -> Phantoms.TTerm Syntax.Rpq
-concatenationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-concatenationRight :: Phantoms.TTerm Syntax.Concatenation -> Phantoms.TTerm Syntax.Rpq
-concatenationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-concatenationWithLeft :: Phantoms.TTerm Syntax.Concatenation -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Concatenation
-concatenationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-concatenationWithRight :: Phantoms.TTerm Syntax.Concatenation -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Concatenation
-concatenationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-condition :: Phantoms.TTerm Syntax.Function -> Phantoms.TTerm Syntax.CompareSym -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.Condition
-condition function compareSym value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compareSym"),
-          Core.fieldTerm = (Phantoms.unTTerm compareSym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-conditionCompareSym :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.CompareSym
-conditionCompareSym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-        Core.projectionField = (Core.Name "compareSym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionFunction :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.Function
-conditionFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionValue :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.Text
-conditionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionWithCompareSym :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.CompareSym -> Phantoms.TTerm Syntax.Condition
-conditionWithCompareSym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compareSym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionWithFunction :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.Function -> Phantoms.TTerm Syntax.Condition
-conditionWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compareSym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-              Core.projectionField = (Core.Name "compareSym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionWithValue :: Phantoms.TTerm Syntax.Condition -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.Condition
-conditionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compareSym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Condition"),
-              Core.projectionField = (Core.Name "compareSym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeDirectionIncoming :: Phantoms.TTerm Syntax.EdgeDirection
-edgeDirectionIncoming =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgeDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "incoming"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeDirectionOutgoing :: Phantoms.TTerm Syntax.EdgeDirection
-edgeDirectionOutgoing =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgeDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outgoing"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeDirectionUndirected :: Phantoms.TTerm Syntax.EdgeDirection
-edgeDirectionUndirected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgeDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgePattern :: Phantoms.TTerm Syntax.EdgeDirection -> Phantoms.TTerm (Maybe Syntax.Rpq) -> Phantoms.TTerm Syntax.EdgePattern
-edgePattern direction rpq =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm direction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rpq"),
-          Core.fieldTerm = (Phantoms.unTTerm rpq)}]}))
-
-edgePatternDirection :: Phantoms.TTerm Syntax.EdgePattern -> Phantoms.TTerm Syntax.EdgeDirection
-edgePatternDirection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-        Core.projectionField = (Core.Name "direction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgePatternRpq :: Phantoms.TTerm Syntax.EdgePattern -> Phantoms.TTerm (Maybe Syntax.Rpq)
-edgePatternRpq x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-        Core.projectionField = (Core.Name "rpq")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgePatternWithDirection :: Phantoms.TTerm Syntax.EdgePattern -> Phantoms.TTerm Syntax.EdgeDirection -> Phantoms.TTerm Syntax.EdgePattern
-edgePatternWithDirection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rpq"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-              Core.projectionField = (Core.Name "rpq")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgePatternWithRpq :: Phantoms.TTerm Syntax.EdgePattern -> Phantoms.TTerm (Maybe Syntax.Rpq) -> Phantoms.TTerm Syntax.EdgePattern
-edgePatternWithRpq original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rpq"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionComplex :: Phantoms.TTerm Syntax.ComplexFunction -> Phantoms.TTerm Syntax.Function
-functionComplex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Function"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "complex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionNested :: Phantoms.TTerm Syntax.NestedFunction -> Phantoms.TTerm Syntax.Function
-functionNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Function"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionSimple :: Phantoms.TTerm Syntax.SimpleFunction -> Phantoms.TTerm Syntax.Function
-functionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Function"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-groupBy :: Phantoms.TTerm Syntax.GroupByOption -> Phantoms.TTerm Syntax.GroupBy
-groupBy x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupBy"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-groupByOptionLength :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "length"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByOptionSource :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionSource =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "source"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByOptionSourceLength :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionSourceLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceLength"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByOptionSourceTarget :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionSourceTarget =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceTarget"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByOptionSourceTargetLength :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionSourceTargetLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceTargetLength"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByOptionTarget :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionTarget =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "target"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupByOptionTargetLength :: Phantoms.TTerm Syntax.GroupByOption
-groupByOptionTargetLength =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "targetLength"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupProjAll :: Phantoms.TTerm Syntax.GroupProj
-groupProjAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupProj"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-groupProjLimited :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.GroupProj
-groupProjLimited x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.GroupProj"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limited"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nestedFunction :: Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.Function -> Phantoms.TTerm Syntax.NestedFunction
-nestedFunction name innerFunction =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm innerFunction)}]}))
-
-nestedFunctionInnerFunction :: Phantoms.TTerm Syntax.NestedFunction -> Phantoms.TTerm Syntax.Function
-nestedFunctionInnerFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-        Core.projectionField = (Core.Name "innerFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nestedFunctionName :: Phantoms.TTerm Syntax.NestedFunction -> Phantoms.TTerm Syntax.Text
-nestedFunctionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nestedFunctionWithInnerFunction :: Phantoms.TTerm Syntax.NestedFunction -> Phantoms.TTerm Syntax.Function -> Phantoms.TTerm Syntax.NestedFunction
-nestedFunctionWithInnerFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nestedFunctionWithName :: Phantoms.TTerm Syntax.NestedFunction -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.NestedFunction
-nestedFunctionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "innerFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"),
-              Core.projectionField = (Core.Name "innerFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePattern :: Phantoms.TTerm (Maybe Syntax.Variable) -> Phantoms.TTerm Syntax.NodePattern
-nodePattern variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NodePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-nodePatternVariable :: Phantoms.TTerm Syntax.NodePattern -> Phantoms.TTerm (Maybe Syntax.Variable)
-nodePatternVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NodePattern"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternWithVariable :: Phantoms.TTerm Syntax.NodePattern -> Phantoms.TTerm (Maybe Syntax.Variable) -> Phantoms.TTerm Syntax.NodePattern
-nodePatternWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.NodePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orderBy :: Phantoms.TTerm Syntax.OrderByOption -> Phantoms.TTerm Syntax.OrderBy
-orderBy x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderBy"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-orderByOptionGroup :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionGroup =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByOptionGroupPath :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionGroupPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "groupPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByOptionPartition :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionPartition =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partition"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByOptionPartitionGroup :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionPartitionGroup =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partitionGroup"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByOptionPartitionGroupPath :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionPartitionGroupPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partitionGroupPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByOptionPartitionPath :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionPartitionPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partitionPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderByOptionPath :: Phantoms.TTerm Syntax.OrderByOption
-orderByOptionPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-partProjAll :: Phantoms.TTerm Syntax.PartProj
-partProjAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PartProj"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-partProjLimited :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.PartProj
-partProjLimited x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PartProj"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limited"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPattern :: Phantoms.TTerm Syntax.PathName -> Phantoms.TTerm Syntax.NodePattern -> Phantoms.TTerm Syntax.EdgePattern -> Phantoms.TTerm Syntax.NodePattern -> Phantoms.TTerm (Maybe Syntax.ComplexCondition) -> Phantoms.TTerm Syntax.PathPattern
-pathPattern pathName startNode edge endNode condition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathName"),
-          Core.fieldTerm = (Phantoms.unTTerm pathName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Phantoms.unTTerm startNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Phantoms.unTTerm edge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Phantoms.unTTerm endNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)}]}))
-
-pathPatternCondition :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm (Maybe Syntax.ComplexCondition)
-pathPatternCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternEdge :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.EdgePattern
-pathPatternEdge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-        Core.projectionField = (Core.Name "edge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternEndNode :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.NodePattern
-pathPatternEndNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-        Core.projectionField = (Core.Name "endNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternPathName :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.PathName
-pathPatternPathName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-        Core.projectionField = (Core.Name "pathName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternStartNode :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.NodePattern
-pathPatternStartNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-        Core.projectionField = (Core.Name "startNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternWithCondition :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm (Maybe Syntax.ComplexCondition) -> Phantoms.TTerm Syntax.PathPattern
-pathPatternWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "pathName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathPatternWithEdge :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.EdgePattern -> Phantoms.TTerm Syntax.PathPattern
-pathPatternWithEdge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "pathName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathPatternWithEndNode :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.NodePattern -> Phantoms.TTerm Syntax.PathPattern
-pathPatternWithEndNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "pathName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathPatternWithPathName :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.PathName -> Phantoms.TTerm Syntax.PathPattern
-pathPatternWithPathName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathPatternWithStartNode :: Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.NodePattern -> Phantoms.TTerm Syntax.PathPattern
-pathPatternWithStartNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "pathName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathProjAll :: Phantoms.TTerm Syntax.PathProj
-pathProjAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathProj"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathProjLimited :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.PathProj
-pathProjLimited x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathProj"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limited"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathQuery :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm (Maybe Syntax.RestrictorExt) -> Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm (Maybe Syntax.GroupBy) -> Phantoms.TTerm (Maybe Syntax.OrderBy) -> Phantoms.TTerm Syntax.PathQuery
-pathQuery projection restrictorExt pathPattern groupBy orderBy =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm projection)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictorExt"),
-          Core.fieldTerm = (Phantoms.unTTerm restrictorExt)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pathPattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Phantoms.unTTerm groupBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm orderBy)}]}))
-
-pathQueryGroupBy :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm (Maybe Syntax.GroupBy)
-pathQueryGroupBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-        Core.projectionField = (Core.Name "groupBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathQueryOrderBy :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm (Maybe Syntax.OrderBy)
-pathQueryOrderBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-        Core.projectionField = (Core.Name "orderBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathQueryPathPattern :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm Syntax.PathPattern
-pathQueryPathPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-        Core.projectionField = (Core.Name "pathPattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathQueryProjection :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm Syntax.Projection
-pathQueryProjection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-        Core.projectionField = (Core.Name "projection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathQueryRestrictorExt :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm (Maybe Syntax.RestrictorExt)
-pathQueryRestrictorExt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-        Core.projectionField = (Core.Name "restrictorExt")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathQueryWithGroupBy :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm (Maybe Syntax.GroupBy) -> Phantoms.TTerm Syntax.PathQuery
-pathQueryWithGroupBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictorExt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "restrictorExt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "pathPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathQueryWithOrderBy :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm (Maybe Syntax.OrderBy) -> Phantoms.TTerm Syntax.PathQuery
-pathQueryWithOrderBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictorExt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "restrictorExt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "pathPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathQueryWithPathPattern :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm Syntax.PathPattern -> Phantoms.TTerm Syntax.PathQuery
-pathQueryWithPathPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictorExt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "restrictorExt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathQueryWithProjection :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.PathQuery
-pathQueryWithProjection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictorExt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "restrictorExt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "pathPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathQueryWithRestrictorExt :: Phantoms.TTerm Syntax.PathQuery -> Phantoms.TTerm (Maybe Syntax.RestrictorExt) -> Phantoms.TTerm Syntax.PathQuery
-pathQueryWithRestrictorExt original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictorExt"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "pathPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-plus :: Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm (Maybe Syntax.RpqRestrictor) -> Phantoms.TTerm Syntax.Plus
-plus expression restrictor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictor"),
-          Core.fieldTerm = (Phantoms.unTTerm restrictor)}]}))
-
-plusExpression :: Phantoms.TTerm Syntax.Plus -> Phantoms.TTerm Syntax.Rpq
-plusExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-plusRestrictor :: Phantoms.TTerm Syntax.Plus -> Phantoms.TTerm (Maybe Syntax.RpqRestrictor)
-plusRestrictor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-        Core.projectionField = (Core.Name "restrictor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-plusWithExpression :: Phantoms.TTerm Syntax.Plus -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Plus
-plusWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-              Core.projectionField = (Core.Name "restrictor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-plusWithRestrictor :: Phantoms.TTerm Syntax.Plus -> Phantoms.TTerm (Maybe Syntax.RpqRestrictor) -> Phantoms.TTerm Syntax.Plus
-plusWithRestrictor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Plus"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projection :: Phantoms.TTerm Syntax.PartProj -> Phantoms.TTerm Syntax.GroupProj -> Phantoms.TTerm Syntax.PathProj -> Phantoms.TTerm Syntax.Projection
-projection partProj groupProj pathProj =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partProj"),
-          Core.fieldTerm = (Phantoms.unTTerm partProj)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupProj"),
-          Core.fieldTerm = (Phantoms.unTTerm groupProj)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathProj"),
-          Core.fieldTerm = (Phantoms.unTTerm pathProj)}]}))
-
-projectionGroupProj :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.GroupProj
-projectionGroupProj x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-        Core.projectionField = (Core.Name "groupProj")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionPartProj :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.PartProj
-projectionPartProj x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-        Core.projectionField = (Core.Name "partProj")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionPathProj :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.PathProj
-projectionPathProj x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-        Core.projectionField = (Core.Name "pathProj")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionWithGroupProj :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.GroupProj -> Phantoms.TTerm Syntax.Projection
-projectionWithGroupProj original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partProj"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-              Core.projectionField = (Core.Name "partProj")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupProj"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathProj"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-              Core.projectionField = (Core.Name "pathProj")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionWithPartProj :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.PartProj -> Phantoms.TTerm Syntax.Projection
-projectionWithPartProj original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partProj"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupProj"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-              Core.projectionField = (Core.Name "groupProj")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathProj"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-              Core.projectionField = (Core.Name "pathProj")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionWithPathProj :: Phantoms.TTerm Syntax.Projection -> Phantoms.TTerm Syntax.PathProj -> Phantoms.TTerm Syntax.Projection
-projectionWithPathProj original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "partProj"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-              Core.projectionField = (Core.Name "partProj")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupProj"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Projection"),
-              Core.projectionField = (Core.Name "groupProj")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathProj"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-restrictorExtAcyclic :: Phantoms.TTerm Syntax.RestrictorExt
-restrictorExtAcyclic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.RestrictorExt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "acyclic"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-restrictorExtShortest :: Phantoms.TTerm Syntax.RestrictorExt
-restrictorExtShortest =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.RestrictorExt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shortest"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-restrictorExtSimple :: Phantoms.TTerm Syntax.RestrictorExt
-restrictorExtSimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.RestrictorExt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-restrictorExtTrail :: Phantoms.TTerm Syntax.RestrictorExt
-restrictorExtTrail =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.RestrictorExt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trail"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-restrictorExtWalk :: Phantoms.TTerm Syntax.RestrictorExt
-restrictorExtWalk =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.RestrictorExt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "walk"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-rpqAlternation :: Phantoms.TTerm Syntax.Alternation -> Phantoms.TTerm Syntax.Rpq
-rpqAlternation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alternation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqConcatenation :: Phantoms.TTerm Syntax.Concatenation -> Phantoms.TTerm Syntax.Rpq
-rpqConcatenation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "concatenation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqLabel :: Phantoms.TTerm Syntax.Label -> Phantoms.TTerm Syntax.Rpq
-rpqLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqNegated :: Phantoms.TTerm Syntax.Label -> Phantoms.TTerm Syntax.Rpq
-rpqNegated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqOptional :: Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Rpq
-rpqOptional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "optional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqParenthesis :: Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Rpq
-rpqParenthesis x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesis"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqPlus :: Phantoms.TTerm Syntax.Plus -> Phantoms.TTerm Syntax.Rpq
-rpqPlus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqRestrictor :: Phantoms.TTerm Syntax.RestrictorExt -> Phantoms.TTerm Syntax.RpqRestrictor
-rpqRestrictor x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.RpqRestrictor"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rpqReverse :: Phantoms.TTerm Syntax.Label -> Phantoms.TTerm Syntax.Rpq
-rpqReverse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reverse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rpqStar :: Phantoms.TTerm Syntax.Star -> Phantoms.TTerm Syntax.Rpq
-rpqStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleFunction :: Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.SimpleFunction
-simpleFunction name argument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))
-
-simpleFunctionArgument :: Phantoms.TTerm Syntax.SimpleFunction -> Phantoms.TTerm Syntax.Text
-simpleFunctionArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleFunctionName :: Phantoms.TTerm Syntax.SimpleFunction -> Phantoms.TTerm Syntax.Text
-simpleFunctionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleFunctionWithArgument :: Phantoms.TTerm Syntax.SimpleFunction -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.SimpleFunction
-simpleFunctionWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleFunctionWithName :: Phantoms.TTerm Syntax.SimpleFunction -> Phantoms.TTerm Syntax.Text -> Phantoms.TTerm Syntax.SimpleFunction
-simpleFunctionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-star :: Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm (Maybe Syntax.RpqRestrictor) -> Phantoms.TTerm Syntax.Star
-star expression restrictor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictor"),
-          Core.fieldTerm = (Phantoms.unTTerm restrictor)}]}))
-
-starExpression :: Phantoms.TTerm Syntax.Star -> Phantoms.TTerm Syntax.Rpq
-starExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-starRestrictor :: Phantoms.TTerm Syntax.Star -> Phantoms.TTerm (Maybe Syntax.RpqRestrictor)
-starRestrictor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-        Core.projectionField = (Core.Name "restrictor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-starWithExpression :: Phantoms.TTerm Syntax.Star -> Phantoms.TTerm Syntax.Rpq -> Phantoms.TTerm Syntax.Star
-starWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-              Core.projectionField = (Core.Name "restrictor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-starWithRestrictor :: Phantoms.TTerm Syntax.Star -> Phantoms.TTerm (Maybe Syntax.RpqRestrictor) -> Phantoms.TTerm Syntax.Star
-starWithRestrictor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "com.gdblab.pathAlgebra.syntax.Star"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unGroupBy :: Phantoms.TTerm Syntax.GroupBy -> Phantoms.TTerm Syntax.GroupByOption
-unGroupBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "com.gdblab.pathAlgebra.syntax.GroupBy")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unOrderBy :: Phantoms.TTerm Syntax.OrderBy -> Phantoms.TTerm Syntax.OrderByOption
-unOrderBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "com.gdblab.pathAlgebra.syntax.OrderBy")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRpqRestrictor :: Phantoms.TTerm Syntax.RpqRestrictor -> Phantoms.TTerm Syntax.RestrictorExt
-unRpqRestrictor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "com.gdblab.pathAlgebra.syntax.RpqRestrictor")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Context.hs b/src/main/haskell/Hydra/Dsl/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Context.hs
+++ /dev/null
@@ -1,166 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.context
-
-module Hydra.Dsl.Context where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-context :: Phantoms.TTerm [String] -> Phantoms.TTerm [String] -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Context.Context
-context trace messages other =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.Context"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trace"),
-          Core.fieldTerm = (Phantoms.unTTerm trace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "messages"),
-          Core.fieldTerm = (Phantoms.unTTerm messages)},
-        Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (Phantoms.unTTerm other)}]}))
-contextMessages :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String]
-contextMessages x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-        Core.projectionField = (Core.Name "messages")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-contextOther :: Phantoms.TTerm Context.Context -> Phantoms.TTerm (M.Map Core.Name Core.Term)
-contextOther x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-        Core.projectionField = (Core.Name "other")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-contextTrace :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String]
-contextTrace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-        Core.projectionField = (Core.Name "trace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-contextWithMessages :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String] -> Phantoms.TTerm Context.Context
-contextWithMessages original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.Context"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-              Core.projectionField = (Core.Name "trace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "messages"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-              Core.projectionField = (Core.Name "other")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-contextWithOther :: Phantoms.TTerm Context.Context -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Context.Context
-contextWithOther original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.Context"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-              Core.projectionField = (Core.Name "trace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "messages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-              Core.projectionField = (Core.Name "messages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-contextWithTrace :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String] -> Phantoms.TTerm Context.Context
-contextWithTrace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.Context"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "messages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-              Core.projectionField = (Core.Name "messages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-              Core.projectionField = (Core.Name "other")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-inContext :: Phantoms.TTerm e -> Phantoms.TTerm Context.Context -> Phantoms.TTerm (Context.InContext e)
-inContext object context =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.InContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm context)}]}))
-inContextContext :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm Context.Context
-inContextContext x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.context.InContext"),
-        Core.projectionField = (Core.Name "context")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inContextObject :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm e
-inContextObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.context.InContext"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inContextWithContext :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm Context.Context -> Phantoms.TTerm (Context.InContext e)
-inContextWithContext original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.InContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.InContext"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-inContextWithObject :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm e -> Phantoms.TTerm (Context.InContext e)
-inContextWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.InContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.context.InContext"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Coq/Environment.hs b/src/main/haskell/Hydra/Dsl/Coq/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Coq/Environment.hs
+++ /dev/null
@@ -1,183 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.coq.environment
-
-module Hydra.Dsl.Coq.Environment where
-
-import qualified Hydra.Coq.Environment as Environment
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-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
-
-coqEnvironment :: Phantoms.TTerm String -> Phantoms.TTerm (M.Map String Int) -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm Environment.CoqEnvironment
-coqEnvironment currentNamespace constructorCounts ambiguousNames sanitizedAccessors =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm currentNamespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructorCounts"),
-          Core.fieldTerm = (Phantoms.unTTerm constructorCounts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ambiguousNames"),
-          Core.fieldTerm = (Phantoms.unTTerm ambiguousNames)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sanitizedAccessors"),
-          Core.fieldTerm = (Phantoms.unTTerm sanitizedAccessors)}]}))
-
-coqEnvironmentAmbiguousNames :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm (S.Set String)
-coqEnvironmentAmbiguousNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-        Core.projectionField = (Core.Name "ambiguousNames")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-coqEnvironmentConstructorCounts :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm (M.Map String Int)
-coqEnvironmentConstructorCounts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-        Core.projectionField = (Core.Name "constructorCounts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-coqEnvironmentCurrentNamespace :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm String
-coqEnvironmentCurrentNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-        Core.projectionField = (Core.Name "currentNamespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-coqEnvironmentSanitizedAccessors :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm (S.Set String)
-coqEnvironmentSanitizedAccessors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-        Core.projectionField = (Core.Name "sanitizedAccessors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-coqEnvironmentWithAmbiguousNames :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm Environment.CoqEnvironment
-coqEnvironmentWithAmbiguousNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructorCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "constructorCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ambiguousNames"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sanitizedAccessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "sanitizedAccessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-coqEnvironmentWithConstructorCounts :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm (M.Map String Int) -> Phantoms.TTerm Environment.CoqEnvironment
-coqEnvironmentWithConstructorCounts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructorCounts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ambiguousNames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "ambiguousNames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sanitizedAccessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "sanitizedAccessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-coqEnvironmentWithCurrentNamespace :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm String -> Phantoms.TTerm Environment.CoqEnvironment
-coqEnvironmentWithCurrentNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructorCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "constructorCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ambiguousNames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "ambiguousNames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sanitizedAccessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "sanitizedAccessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-coqEnvironmentWithSanitizedAccessors :: Phantoms.TTerm Environment.CoqEnvironment -> Phantoms.TTerm (S.Set String) -> Phantoms.TTerm Environment.CoqEnvironment
-coqEnvironmentWithSanitizedAccessors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructorCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "constructorCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ambiguousNames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.environment.CoqEnvironment"),
-              Core.projectionField = (Core.Name "ambiguousNames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sanitizedAccessors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Coq/Syntax.hs b/src/main/haskell/Hydra/Dsl/Coq/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Coq/Syntax.hs
+++ /dev/null
@@ -1,6447 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.coq.syntax
-
-module Hydra.Dsl.Coq.Syntax where
-
-import qualified Hydra.Coq.Syntax as Syntax
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-annotatedApplication :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm [Syntax.Term1] -> Phantoms.TTerm Syntax.AnnotatedApplication
-annotatedApplication annot terms =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Phantoms.unTTerm annot)},
-        Core.Field {
-          Core.fieldName = (Core.Name "terms"),
-          Core.fieldTerm = (Phantoms.unTTerm terms)}]}))
-
-annotatedApplicationAnnot :: Phantoms.TTerm Syntax.AnnotatedApplication -> Phantoms.TTerm Syntax.QualidAnnotated
-annotatedApplicationAnnot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-        Core.projectionField = (Core.Name "annot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedApplicationTerms :: Phantoms.TTerm Syntax.AnnotatedApplication -> Phantoms.TTerm [Syntax.Term1]
-annotatedApplicationTerms x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-        Core.projectionField = (Core.Name "terms")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedApplicationWithAnnot :: Phantoms.TTerm Syntax.AnnotatedApplication -> Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm Syntax.AnnotatedApplication
-annotatedApplicationWithAnnot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "terms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-              Core.projectionField = (Core.Name "terms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotatedApplicationWithTerms :: Phantoms.TTerm Syntax.AnnotatedApplication -> Phantoms.TTerm [Syntax.Term1] -> Phantoms.TTerm Syntax.AnnotatedApplication
-annotatedApplicationWithTerms original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AnnotatedApplication"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "terms"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-applicationAnnotated :: Phantoms.TTerm Syntax.AnnotatedApplication -> Phantoms.TTerm Syntax.Application
-applicationAnnotated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Application"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-applicationNormal :: Phantoms.TTerm Syntax.NormalApplication -> Phantoms.TTerm Syntax.Application
-applicationNormal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Application"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argIdent :: Phantoms.TTerm Syntax.IdentArg -> Phantoms.TTerm Syntax.Arg
-argIdent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Arg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ident"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argNatural :: Phantoms.TTerm Syntax.NaturalArg -> Phantoms.TTerm Syntax.Arg
-argNatural x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Arg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "natural"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argTerm :: Phantoms.TTerm Syntax.Term1 -> Phantoms.TTerm Syntax.Arg
-argTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Arg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomDeclaration :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AxiomDeclaration
-axiomDeclaration name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-axiomDeclarationName :: Phantoms.TTerm Syntax.AxiomDeclaration -> Phantoms.TTerm Syntax.Ident
-axiomDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-axiomDeclarationType :: Phantoms.TTerm Syntax.AxiomDeclaration -> Phantoms.TTerm Syntax.Type
-axiomDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-axiomDeclarationWithName :: Phantoms.TTerm Syntax.AxiomDeclaration -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.AxiomDeclaration
-axiomDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-axiomDeclarationWithType :: Phantoms.TTerm Syntax.AxiomDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AxiomDeclaration
-axiomDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.AxiomDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binderGeneralizing :: Phantoms.TTerm Syntax.GeneralizingBinder -> Phantoms.TTerm Syntax.Binder
-binderGeneralizing x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Binder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "generalizing"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binderImplicit :: Phantoms.TTerm Syntax.ImplicitBinders -> Phantoms.TTerm Syntax.Binder
-binderImplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Binder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binderName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Binder
-binderName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Binder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binderPattern :: Phantoms.TTerm Syntax.Pattern0 -> Phantoms.TTerm Syntax.Binder
-binderPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Binder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binderTerm :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm Syntax.Binder
-binderTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Binder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binderType :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm Syntax.Binder
-binderType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Binder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseItem :: Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.CaseItem
-caseItem term as in_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)}]}))
-
-caseItemAs :: Phantoms.TTerm Syntax.CaseItem -> Phantoms.TTerm (Maybe Syntax.Name)
-caseItemAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseItemIn :: Phantoms.TTerm Syntax.CaseItem -> Phantoms.TTerm (Maybe Syntax.Pattern)
-caseItemIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseItemTerm :: Phantoms.TTerm Syntax.CaseItem -> Phantoms.TTerm Syntax.Term100
-caseItemTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseItemWithAs :: Phantoms.TTerm Syntax.CaseItem -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.CaseItem
-caseItemWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.coq.syntax.CaseItem"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseItemWithIn :: Phantoms.TTerm Syntax.CaseItem -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.CaseItem
-caseItemWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseItemWithTerm :: Phantoms.TTerm Syntax.CaseItem -> Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm Syntax.CaseItem
-caseItemWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CaseItem"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.coq.syntax.CaseItem"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cofix :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm (Maybe Syntax.CofixQual) -> Phantoms.TTerm Syntax.Cofix
-cofix body qual =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm qual)}]}))
-
-cofixBody :: Phantoms.TTerm Syntax.Cofix -> Phantoms.TTerm Syntax.CofixBody
-cofixBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixBodyBinders :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm [Syntax.Binder]
-cofixBodyBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixBodyIdent :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm Syntax.Ident
-cofixBodyIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-        Core.projectionField = (Core.Name "ident")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixBodyTerm :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm Syntax.Term
-cofixBodyTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixBodyType :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm (Maybe Syntax.Type)
-cofixBodyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixBodyWithBinders :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.CofixBody
-cofixBodyWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cofixBodyWithIdent :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.CofixBody
-cofixBodyWithIdent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cofixBodyWithTerm :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.CofixBody
-cofixBodyWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-cofixBodyWithType :: Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.CofixBody
-cofixBodyWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cofixBody_ :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.CofixBody
-cofixBody_ ident binders type_ term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm ident)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-cofixQual :: Phantoms.TTerm Syntax.Cofix -> Phantoms.TTerm (Maybe Syntax.CofixQual)
-cofixQual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-        Core.projectionField = (Core.Name "qual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixQualIn :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.CofixQual
-cofixQualIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.CofixQual"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-cofixQualWith :: Phantoms.TTerm Syntax.CofixWith -> Phantoms.TTerm Syntax.CofixQual
-cofixQualWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.CofixQual"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "with"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-cofixWith :: Phantoms.TTerm [Syntax.CofixBody] -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.CofixWith
-cofixWith with for =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm with)},
-        Core.Field {
-          Core.fieldName = (Core.Name "for"),
-          Core.fieldTerm = (Phantoms.unTTerm for)}]}))
-
-cofixWithBody :: Phantoms.TTerm Syntax.Cofix -> Phantoms.TTerm Syntax.CofixBody -> Phantoms.TTerm Syntax.Cofix
-cofixWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-              Core.projectionField = (Core.Name "qual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cofixWithFor :: Phantoms.TTerm Syntax.CofixWith -> Phantoms.TTerm (Maybe Syntax.Ident)
-cofixWithFor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-        Core.projectionField = (Core.Name "for")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixWithQual :: Phantoms.TTerm Syntax.Cofix -> Phantoms.TTerm (Maybe Syntax.CofixQual) -> Phantoms.TTerm Syntax.Cofix
-cofixWithQual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Cofix"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-cofixWithWith :: Phantoms.TTerm Syntax.CofixWith -> Phantoms.TTerm [Syntax.CofixBody]
-cofixWithWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-        Core.projectionField = (Core.Name "with")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cofixWithWithFor :: Phantoms.TTerm Syntax.CofixWith -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.CofixWith
-cofixWithWithFor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "for"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-cofixWithWithWith :: Phantoms.TTerm Syntax.CofixWith -> Phantoms.TTerm [Syntax.CofixBody] -> Phantoms.TTerm Syntax.CofixWith
-cofixWithWithWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "for"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.CofixWith"),
-              Core.projectionField = (Core.Name "for")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comment :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Comment
-comment x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.Comment"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constructor :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Constructor
-constructor name binders type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-constructorBinders :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm [Syntax.Binder]
-constructorBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorName :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm Syntax.Ident
-constructorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorType :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm (Maybe Syntax.Type)
-constructorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorWithBinders :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.Constructor
-constructorWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorWithName :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Constructor
-constructorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorWithType :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Constructor
-constructorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Constructor"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-definition :: Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Definition
-definition locality name binders type_ body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm locality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-definitionBinders :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm [Syntax.Binder]
-definitionBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionBody :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm Syntax.Term
-definitionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionLocality :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm (Maybe Syntax.Locality)
-definitionLocality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-        Core.projectionField = (Core.Name "locality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionName :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm Syntax.Ident
-definitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionType :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm (Maybe Syntax.Type)
-definitionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionWithBinders :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.Definition
-definitionWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-definitionWithBody :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Definition
-definitionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-definitionWithLocality :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.Definition
-definitionWithLocality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-definitionWithName :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Definition
-definitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-definitionWithType :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Definition
-definitionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Definition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-document :: Phantoms.TTerm [Syntax.Sentence] -> Phantoms.TTerm Syntax.Document
-document sentences =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Document"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Phantoms.unTTerm sentences)}]}))
-
-documentSentences :: Phantoms.TTerm Syntax.Document -> Phantoms.TTerm [Syntax.Sentence]
-documentSentences x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Document"),
-        Core.projectionField = (Core.Name "sentences")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentWithSentences :: Phantoms.TTerm Syntax.Document -> Phantoms.TTerm [Syntax.Sentence] -> Phantoms.TTerm Syntax.Document
-documentWithSentences original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Document"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-equation :: Phantoms.TTerm [[Syntax.Pattern]] -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Equation
-equation pattern term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-equationPattern :: Phantoms.TTerm Syntax.Equation -> Phantoms.TTerm [[Syntax.Pattern]]
-equationPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equationTerm :: Phantoms.TTerm Syntax.Equation -> Phantoms.TTerm Syntax.Term
-equationTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equationWithPattern :: Phantoms.TTerm Syntax.Equation -> Phantoms.TTerm [[Syntax.Pattern]] -> Phantoms.TTerm Syntax.Equation
-equationWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equationWithTerm :: Phantoms.TTerm Syntax.Equation -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Equation
-equationWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Equation"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-existentialVariable :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.ExistentialVariableVariant -> Phantoms.TTerm Syntax.ExistentialVariable
-existentialVariable ident variant =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm ident)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm variant)}]}))
-
-existentialVariableIdent :: Phantoms.TTerm Syntax.ExistentialVariable -> Phantoms.TTerm Syntax.Ident
-existentialVariableIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-        Core.projectionField = (Core.Name "ident")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-existentialVariableVariant :: Phantoms.TTerm Syntax.ExistentialVariable -> Phantoms.TTerm Syntax.ExistentialVariableVariant
-existentialVariableVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-        Core.projectionField = (Core.Name "variant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-existentialVariableVariantInside1 :: Phantoms.TTerm Syntax.ExistentialVariableVariant
-existentialVariableVariantInside1 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariableVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inside1"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-existentialVariableVariantInside2 :: Phantoms.TTerm Syntax.ExistentialVariableVariant
-existentialVariableVariantInside2 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariableVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inside2"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-existentialVariableVariantOutside :: Phantoms.TTerm (Maybe Syntax.IdentArg) -> Phantoms.TTerm Syntax.ExistentialVariableVariant
-existentialVariableVariantOutside x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariableVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outside"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existentialVariableVariantPlaceholder :: Phantoms.TTerm Syntax.ExistentialVariableVariant
-existentialVariableVariantPlaceholder =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariableVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "placeholder"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-existentialVariableWithIdent :: Phantoms.TTerm Syntax.ExistentialVariable -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.ExistentialVariable
-existentialVariableWithIdent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-existentialVariableWithVariant :: Phantoms.TTerm Syntax.ExistentialVariable -> Phantoms.TTerm Syntax.ExistentialVariableVariant -> Phantoms.TTerm Syntax.ExistentialVariable
-existentialVariableWithVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ExistentialVariable"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldIdent :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.FieldIdent
-fieldIdent x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.FieldIdent"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fixAnnotMeasure :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm Syntax.FixAnnot
-fixAnnotMeasure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "measure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixAnnotStruct :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.FixAnnot
-fixAnnotStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixAnnotWf :: Phantoms.TTerm Syntax.FixAnnot_Wf -> Phantoms.TTerm Syntax.FixAnnot
-fixAnnotWf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixAnnot_Measure :: Phantoms.TTerm Syntax.OneTerm -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm (Maybe Syntax.OneTerm) -> Phantoms.TTerm Syntax.FixAnnot_Measure
-fixAnnot_Measure term ident term2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm ident)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term2"),
-          Core.fieldTerm = (Phantoms.unTTerm term2)}]}))
-
-fixAnnot_MeasureIdent :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm (Maybe Syntax.Ident)
-fixAnnot_MeasureIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-        Core.projectionField = (Core.Name "ident")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixAnnot_MeasureTerm :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm Syntax.OneTerm
-fixAnnot_MeasureTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixAnnot_MeasureTerm2 :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm (Maybe Syntax.OneTerm)
-fixAnnot_MeasureTerm2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-        Core.projectionField = (Core.Name "term2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixAnnot_MeasureWithIdent :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.FixAnnot_Measure
-fixAnnot_MeasureWithIdent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-              Core.projectionField = (Core.Name "term2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixAnnot_MeasureWithTerm :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm Syntax.OneTerm -> Phantoms.TTerm Syntax.FixAnnot_Measure
-fixAnnot_MeasureWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-              Core.projectionField = (Core.Name "term2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixAnnot_MeasureWithTerm2 :: Phantoms.TTerm Syntax.FixAnnot_Measure -> Phantoms.TTerm (Maybe Syntax.OneTerm) -> Phantoms.TTerm Syntax.FixAnnot_Measure
-fixAnnot_MeasureWithTerm2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Measure"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fixAnnot_Wf :: Phantoms.TTerm Syntax.OneTerm -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.FixAnnot_Wf
-fixAnnot_Wf term ident =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm ident)}]}))
-
-fixAnnot_WfIdent :: Phantoms.TTerm Syntax.FixAnnot_Wf -> Phantoms.TTerm Syntax.Ident
-fixAnnot_WfIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-        Core.projectionField = (Core.Name "ident")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixAnnot_WfTerm :: Phantoms.TTerm Syntax.FixAnnot_Wf -> Phantoms.TTerm Syntax.OneTerm
-fixAnnot_WfTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixAnnot_WfWithIdent :: Phantoms.TTerm Syntax.FixAnnot_Wf -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.FixAnnot_Wf
-fixAnnot_WfWithIdent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fixAnnot_WfWithTerm :: Phantoms.TTerm Syntax.FixAnnot_Wf -> Phantoms.TTerm Syntax.OneTerm -> Phantoms.TTerm Syntax.FixAnnot_Wf
-fixAnnot_WfWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixAnnot_Wf"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixDecl :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm Syntax.Fix
-fixDecl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Fix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixQual :: Phantoms.TTerm (Maybe Syntax.Fix_Qual) -> Phantoms.TTerm Syntax.Fix
-fixQual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Fix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixWith :: Phantoms.TTerm [Syntax.Fix_Decl] -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.FixWith
-fixWith decls for =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decls"),
-          Core.fieldTerm = (Phantoms.unTTerm decls)},
-        Core.Field {
-          Core.fieldName = (Core.Name "for"),
-          Core.fieldTerm = (Phantoms.unTTerm for)}]}))
-
-fixWithDecls :: Phantoms.TTerm Syntax.FixWith -> Phantoms.TTerm [Syntax.Fix_Decl]
-fixWithDecls x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-        Core.projectionField = (Core.Name "decls")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixWithFor :: Phantoms.TTerm Syntax.FixWith -> Phantoms.TTerm (Maybe Syntax.Ident)
-fixWithFor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-        Core.projectionField = (Core.Name "for")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixWithWithDecls :: Phantoms.TTerm Syntax.FixWith -> Phantoms.TTerm [Syntax.Fix_Decl] -> Phantoms.TTerm Syntax.FixWith
-fixWithWithDecls original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decls"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "for"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-              Core.projectionField = (Core.Name "for")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixWithWithFor :: Phantoms.TTerm Syntax.FixWith -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.FixWith
-fixWithWithFor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixWith"),
-              Core.projectionField = (Core.Name "decls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "for"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fix_Decl :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.FixAnnot) -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Fix_Decl
-fix_Decl ident binders annot type_ term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm ident)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Phantoms.unTTerm annot)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-fix_DeclAnnot :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm (Maybe Syntax.FixAnnot)
-fix_DeclAnnot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-        Core.projectionField = (Core.Name "annot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fix_DeclBinders :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm [Syntax.Binder]
-fix_DeclBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fix_DeclIdent :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm Syntax.Ident
-fix_DeclIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-        Core.projectionField = (Core.Name "ident")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fix_DeclTerm :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm Syntax.Term
-fix_DeclTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fix_DeclType :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm (Maybe Syntax.Type)
-fix_DeclType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fix_DeclWithAnnot :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm (Maybe Syntax.FixAnnot) -> Phantoms.TTerm Syntax.Fix_Decl
-fix_DeclWithAnnot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fix_DeclWithBinders :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.Fix_Decl
-fix_DeclWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fix_DeclWithIdent :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Fix_Decl
-fix_DeclWithIdent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fix_DeclWithTerm :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Fix_Decl
-fix_DeclWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fix_DeclWithType :: Phantoms.TTerm Syntax.Fix_Decl -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Fix_Decl
-fix_DeclWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Decl"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fix_QualIn :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Fix_Qual
-fix_QualIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Qual"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fix_QualWith :: Phantoms.TTerm Syntax.FixWith -> Phantoms.TTerm Syntax.Fix_Qual
-fix_QualWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Fix_Qual"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "with"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixpointDefinition :: Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.FixAnnot) -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm [Syntax.Fix_Decl] -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinition locality name binders annot type_ body with =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm locality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Phantoms.unTTerm annot)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm with)}]}))
-
-fixpointDefinitionAnnot :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm (Maybe Syntax.FixAnnot)
-fixpointDefinitionAnnot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "annot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionBinders :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm [Syntax.Binder]
-fixpointDefinitionBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionBody :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm Syntax.Term
-fixpointDefinitionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionLocality :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm (Maybe Syntax.Locality)
-fixpointDefinitionLocality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "locality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionName :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm Syntax.Ident
-fixpointDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionType :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm (Maybe Syntax.Type)
-fixpointDefinitionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionWith :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm [Syntax.Fix_Decl]
-fixpointDefinitionWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-        Core.projectionField = (Core.Name "with")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixpointDefinitionWithAnnot :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm (Maybe Syntax.FixAnnot) -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithAnnot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixpointDefinitionWithBinders :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixpointDefinitionWithBody :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixpointDefinitionWithLocality :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithLocality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixpointDefinitionWithName :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixpointDefinitionWithType :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixpointDefinitionWithWith :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm [Syntax.Fix_Decl] -> Phantoms.TTerm Syntax.FixpointDefinition
-fixpointDefinitionWithWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "annot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.FixpointDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forall_ :: Phantoms.TTerm Syntax.OpenBinders -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Forall
-forall_ binders type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-forallBinders :: Phantoms.TTerm Syntax.Forall -> Phantoms.TTerm Syntax.OpenBinders
-forallBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forallOrFunForall :: Phantoms.TTerm Syntax.Forall -> Phantoms.TTerm Syntax.ForallOrFun
-forallOrFunForall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ForallOrFun"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forallOrFunFun :: Phantoms.TTerm Syntax.Fun -> Phantoms.TTerm Syntax.ForallOrFun
-forallOrFunFun x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ForallOrFun"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fun"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forallType :: Phantoms.TTerm Syntax.Forall -> Phantoms.TTerm Syntax.Type
-forallType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forallWithBinders :: Phantoms.TTerm Syntax.Forall -> Phantoms.TTerm Syntax.OpenBinders -> Phantoms.TTerm Syntax.Forall
-forallWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forallWithType :: Phantoms.TTerm Syntax.Forall -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Forall
-forallWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Forall"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fun :: Phantoms.TTerm Syntax.OpenBinders -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Fun
-fun binders body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-funBinders :: Phantoms.TTerm Syntax.Fun -> Phantoms.TTerm Syntax.OpenBinders
-funBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-funBody :: Phantoms.TTerm Syntax.Fun -> Phantoms.TTerm Syntax.Term
-funBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-funWithBinders :: Phantoms.TTerm Syntax.Fun -> Phantoms.TTerm Syntax.OpenBinders -> Phantoms.TTerm Syntax.Fun
-funWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-funWithBody :: Phantoms.TTerm Syntax.Fun -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Fun
-funWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Fun"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-generalizingBinderExplicit :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Syntax.GeneralizingBinder
-generalizingBinderExplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.GeneralizingBinder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalizingBinderImplicitMaximallyInserted :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Syntax.GeneralizingBinder
-generalizingBinderImplicitMaximallyInserted x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.GeneralizingBinder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicitMaximallyInserted"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalizingBinderImplicitNonMaximallyInserted :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Syntax.GeneralizingBinder
-generalizingBinderImplicitNonMaximallyInserted x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.GeneralizingBinder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicitNonMaximallyInserted"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ident :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.Ident
-ident x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.Ident"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-identArg :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.IdentArg
-identArg ident term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm ident)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-identArgIdent :: Phantoms.TTerm Syntax.IdentArg -> Phantoms.TTerm Syntax.Ident
-identArgIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-        Core.projectionField = (Core.Name "ident")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identArgTerm :: Phantoms.TTerm Syntax.IdentArg -> Phantoms.TTerm Syntax.Term
-identArgTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identArgWithIdent :: Phantoms.TTerm Syntax.IdentArg -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.IdentArg
-identArgWithIdent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identArgWithTerm :: Phantoms.TTerm Syntax.IdentArg -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.IdentArg
-identArgWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ident"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.IdentArg"),
-              Core.projectionField = (Core.Name "ident")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-if_ :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm (Maybe Syntax.ReturnAs) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.If
-if_ condition returnAs then_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Phantoms.unTTerm returnAs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm then_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-ifCondition :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term
-ifCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifElse :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term
-ifElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifReturnAs :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm (Maybe Syntax.ReturnAs)
-ifReturnAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-        Core.projectionField = (Core.Name "returnAs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThen :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term
-ifThen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-        Core.projectionField = (Core.Name "then")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifWithCondition :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.If
-ifWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "returnAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifWithElse :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.If
-ifWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "returnAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifWithReturnAs :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm (Maybe Syntax.ReturnAs) -> Phantoms.TTerm Syntax.If
-ifWithReturnAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifWithThen :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.If
-ifWithThen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "returnAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.If"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implicitBindersMaximallyInserted :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm Syntax.ImplicitBinders
-implicitBindersMaximallyInserted x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ImplicitBinders"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maximallyInserted"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implicitBindersNonMaximallyInserted :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm Syntax.ImplicitBinders
-implicitBindersNonMaximallyInserted x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ImplicitBinders"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonMaximallyInserted"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importQualificationExport :: Phantoms.TTerm Syntax.ImportQualification
-importQualificationExport =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ImportQualification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "export"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-importQualificationImport :: Phantoms.TTerm Syntax.ImportQualification
-importQualificationImport =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.ImportQualification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "import"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-inductiveBody :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm [Syntax.Constructor] -> Phantoms.TTerm Syntax.InductiveBody
-inductiveBody name binders type_ constructors =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Phantoms.unTTerm constructors)}]}))
-
-inductiveBodyBinders :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm [Syntax.Binder]
-inductiveBodyBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveBodyConstructors :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm [Syntax.Constructor]
-inductiveBodyConstructors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-        Core.projectionField = (Core.Name "constructors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveBodyName :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm Syntax.Ident
-inductiveBodyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveBodyType :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm (Maybe Syntax.Type)
-inductiveBodyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveBodyWithBinders :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.InductiveBody
-inductiveBodyWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inductiveBodyWithConstructors :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm [Syntax.Constructor] -> Phantoms.TTerm Syntax.InductiveBody
-inductiveBodyWithConstructors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inductiveBodyWithName :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.InductiveBody
-inductiveBodyWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inductiveBodyWithType :: Phantoms.TTerm Syntax.InductiveBody -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.InductiveBody
-inductiveBodyWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveBody"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inductiveDefinition :: Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.InductiveBody] -> Phantoms.TTerm Syntax.InductiveDefinition
-inductiveDefinition locality coinductive bodies =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm locality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "coinductive"),
-          Core.fieldTerm = (Phantoms.unTTerm coinductive)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodies"),
-          Core.fieldTerm = (Phantoms.unTTerm bodies)}]}))
-
-inductiveDefinitionBodies :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm [Syntax.InductiveBody]
-inductiveDefinitionBodies x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-        Core.projectionField = (Core.Name "bodies")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveDefinitionCoinductive :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm Bool
-inductiveDefinitionCoinductive x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-        Core.projectionField = (Core.Name "coinductive")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveDefinitionLocality :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm (Maybe Syntax.Locality)
-inductiveDefinitionLocality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-        Core.projectionField = (Core.Name "locality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inductiveDefinitionWithBodies :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm [Syntax.InductiveBody] -> Phantoms.TTerm Syntax.InductiveDefinition
-inductiveDefinitionWithBodies original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coinductive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-              Core.projectionField = (Core.Name "coinductive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodies"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inductiveDefinitionWithCoinductive :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.InductiveDefinition
-inductiveDefinitionWithCoinductive original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coinductive"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-              Core.projectionField = (Core.Name "bodies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inductiveDefinitionWithLocality :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.InductiveDefinition
-inductiveDefinitionWithLocality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "coinductive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-              Core.projectionField = (Core.Name "coinductive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.InductiveDefinition"),
-              Core.projectionField = (Core.Name "bodies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-let_ :: Phantoms.TTerm Syntax.LetBindings -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Let
-let_ bindings in_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)}]}))
-
-letBinder :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.LetBinder
-letBinder name type_ term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-letBinderName :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm Syntax.Name
-letBinderName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letBinderTerm :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm Syntax.Term
-letBinderTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letBinderType :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm (Maybe Syntax.Type)
-letBinderType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letBinderWithName :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.LetBinder
-letBinderWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letBinderWithTerm :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.LetBinder
-letBinderWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letBinderWithType :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.LetBinder
-letBinderWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetBinder"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letBindings :: Phantoms.TTerm Syntax.Let -> Phantoms.TTerm Syntax.LetBindings
-letBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Let"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letBindingsDestructuring :: Phantoms.TTerm Syntax.LetDestructuring -> Phantoms.TTerm Syntax.LetBindings
-letBindingsDestructuring x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.LetBindings"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "destructuring"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letBindingsNamed :: Phantoms.TTerm Syntax.LetNamed -> Phantoms.TTerm Syntax.LetBindings
-letBindingsNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.LetBindings"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letDestructuringVariant1 :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm Syntax.LetDestructuring
-letDestructuringVariant1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variant1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letDestructuringVariant2 :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm Syntax.LetDestructuring
-letDestructuringVariant2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variant2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letDestructuringVariant3 :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.LetDestructuring
-letDestructuringVariant3 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variant3"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letDestructuring_Variant1 :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm (Maybe Syntax.ReturnAs) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.LetDestructuring_Variant1
-letDestructuring_Variant1 names returnAs term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Phantoms.unTTerm returnAs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-letDestructuring_Variant1Names :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm [Syntax.Name]
-letDestructuring_Variant1Names x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant1ReturnAs :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm (Maybe Syntax.ReturnAs)
-letDestructuring_Variant1ReturnAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-        Core.projectionField = (Core.Name "returnAs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant1Term :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm Syntax.Term
-letDestructuring_Variant1Term x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant1WithNames :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.LetDestructuring_Variant1
-letDestructuring_Variant1WithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-              Core.projectionField = (Core.Name "returnAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letDestructuring_Variant1WithReturnAs :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm (Maybe Syntax.ReturnAs) -> Phantoms.TTerm Syntax.LetDestructuring_Variant1
-letDestructuring_Variant1WithReturnAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letDestructuring_Variant1WithTerm :: Phantoms.TTerm Syntax.LetDestructuring_Variant1 -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.LetDestructuring_Variant1
-letDestructuring_Variant1WithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant1"),
-              Core.projectionField = (Core.Name "returnAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letDestructuring_Variant2 :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm (Maybe Syntax.Term100) -> Phantoms.TTerm Syntax.LetDestructuring_Variant2
-letDestructuring_Variant2 pattern term return =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm return)}]}))
-
-letDestructuring_Variant2Pattern :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm Syntax.Pattern
-letDestructuring_Variant2Pattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant2Return :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm (Maybe Syntax.Term100)
-letDestructuring_Variant2Return x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-        Core.projectionField = (Core.Name "return")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant2Term :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm Syntax.Term
-letDestructuring_Variant2Term x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant2WithPattern :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.LetDestructuring_Variant2
-letDestructuring_Variant2WithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letDestructuring_Variant2WithReturn :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm (Maybe Syntax.Term100) -> Phantoms.TTerm Syntax.LetDestructuring_Variant2
-letDestructuring_Variant2WithReturn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letDestructuring_Variant2WithTerm :: Phantoms.TTerm Syntax.LetDestructuring_Variant2 -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.LetDestructuring_Variant2
-letDestructuring_Variant2WithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant2"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letDestructuring_Variant3 :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm Syntax.LetDestructuring_Variant3
-letDestructuring_Variant3 pattern1 pattern2 term return =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern1"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern1)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern2"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern2)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm return)}]}))
-
-letDestructuring_Variant3Pattern1 :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Pattern
-letDestructuring_Variant3Pattern1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-        Core.projectionField = (Core.Name "pattern1")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant3Pattern2 :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Pattern
-letDestructuring_Variant3Pattern2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-        Core.projectionField = (Core.Name "pattern2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant3Return :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Term100
-letDestructuring_Variant3Return x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-        Core.projectionField = (Core.Name "return")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant3Term :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Term
-letDestructuring_Variant3Term x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letDestructuring_Variant3WithPattern1 :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.LetDestructuring_Variant3
-letDestructuring_Variant3WithPattern1 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern1"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "pattern2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letDestructuring_Variant3WithPattern2 :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.LetDestructuring_Variant3
-letDestructuring_Variant3WithPattern2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "pattern1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letDestructuring_Variant3WithReturn :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm Syntax.LetDestructuring_Variant3
-letDestructuring_Variant3WithReturn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "pattern1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "pattern2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letDestructuring_Variant3WithTerm :: Phantoms.TTerm Syntax.LetDestructuring_Variant3 -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.LetDestructuring_Variant3
-letDestructuring_Variant3WithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "pattern1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "pattern2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetDestructuring_Variant3"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letIn :: Phantoms.TTerm Syntax.Let -> Phantoms.TTerm Syntax.Term
-letIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Let"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letNamed :: Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.LetNamed
-letNamed binder binders =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binder"),
-          Core.fieldTerm = (Phantoms.unTTerm binder)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)}]}))
-
-letNamedBinder :: Phantoms.TTerm Syntax.LetNamed -> Phantoms.TTerm Syntax.LetBinder
-letNamedBinder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-        Core.projectionField = (Core.Name "binder")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letNamedBinders :: Phantoms.TTerm Syntax.LetNamed -> Phantoms.TTerm [Syntax.Binder]
-letNamedBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letNamedWithBinder :: Phantoms.TTerm Syntax.LetNamed -> Phantoms.TTerm Syntax.LetBinder -> Phantoms.TTerm Syntax.LetNamed
-letNamedWithBinder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binder"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letNamedWithBinders :: Phantoms.TTerm Syntax.LetNamed -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.LetNamed
-letNamedWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.LetNamed"),
-              Core.projectionField = (Core.Name "binder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letWithBindings :: Phantoms.TTerm Syntax.Let -> Phantoms.TTerm Syntax.LetBindings -> Phantoms.TTerm Syntax.Let
-letWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.coq.syntax.Let"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letWithIn :: Phantoms.TTerm Syntax.Let -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Let
-letWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Let"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localityGlobal :: Phantoms.TTerm Syntax.Locality
-localityGlobal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Locality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "global"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-localityLocal :: Phantoms.TTerm Syntax.Locality
-localityLocal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Locality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "local"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-match :: Phantoms.TTerm [Syntax.CaseItem] -> Phantoms.TTerm (Maybe Syntax.Term100) -> Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.Equation] -> Phantoms.TTerm Syntax.Match
-match caseItems return pipe equations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseItems"),
-          Core.fieldTerm = (Phantoms.unTTerm caseItems)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm return)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pipe"),
-          Core.fieldTerm = (Phantoms.unTTerm pipe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "equations"),
-          Core.fieldTerm = (Phantoms.unTTerm equations)}]}))
-
-matchCaseItems :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm [Syntax.CaseItem]
-matchCaseItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-        Core.projectionField = (Core.Name "caseItems")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchEquations :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm [Syntax.Equation]
-matchEquations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-        Core.projectionField = (Core.Name "equations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchPipe :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm Bool
-matchPipe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-        Core.projectionField = (Core.Name "pipe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchReturn :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm (Maybe Syntax.Term100)
-matchReturn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-        Core.projectionField = (Core.Name "return")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchWithCaseItems :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm [Syntax.CaseItem] -> Phantoms.TTerm Syntax.Match
-matchWithCaseItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseItems"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pipe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "pipe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "equations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchWithEquations :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm [Syntax.Equation] -> Phantoms.TTerm Syntax.Match
-matchWithEquations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "caseItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pipe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "pipe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-matchWithPipe :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Match
-matchWithPipe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "caseItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pipe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "equations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "equations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchWithReturn :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm (Maybe Syntax.Term100) -> Phantoms.TTerm Syntax.Match
-matchWithReturn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "caseItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pipe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "pipe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Match"),
-              Core.projectionField = (Core.Name "equations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDefinition :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Sentence] -> Phantoms.TTerm Syntax.ModuleDefinition
-moduleDefinition name sentences =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Phantoms.unTTerm sentences)}]}))
-
-moduleDefinitionName :: Phantoms.TTerm Syntax.ModuleDefinition -> Phantoms.TTerm Syntax.Ident
-moduleDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDefinitionSentences :: Phantoms.TTerm Syntax.ModuleDefinition -> Phantoms.TTerm [Syntax.Sentence]
-moduleDefinitionSentences x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-        Core.projectionField = (Core.Name "sentences")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDefinitionWithName :: Phantoms.TTerm Syntax.ModuleDefinition -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.ModuleDefinition
-moduleDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-              Core.projectionField = (Core.Name "sentences")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDefinitionWithSentences :: Phantoms.TTerm Syntax.ModuleDefinition -> Phantoms.TTerm [Syntax.Sentence] -> Phantoms.TTerm Syntax.ModuleDefinition
-moduleDefinitionWithSentences original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ModuleDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-name :: Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.Name
-name x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.Name"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-natural :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.Natural
-natural x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.Natural"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-naturalArg :: Phantoms.TTerm Syntax.Natural -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.NaturalArg
-naturalArg natural term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "natural"),
-          Core.fieldTerm = (Phantoms.unTTerm natural)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-naturalArgNatural :: Phantoms.TTerm Syntax.NaturalArg -> Phantoms.TTerm Syntax.Natural
-naturalArgNatural x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-        Core.projectionField = (Core.Name "natural")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-naturalArgTerm :: Phantoms.TTerm Syntax.NaturalArg -> Phantoms.TTerm Syntax.Term
-naturalArgTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-naturalArgWithNatural :: Phantoms.TTerm Syntax.NaturalArg -> Phantoms.TTerm Syntax.Natural -> Phantoms.TTerm Syntax.NaturalArg
-naturalArgWithNatural original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "natural"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-naturalArgWithTerm :: Phantoms.TTerm Syntax.NaturalArg -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.NaturalArg
-naturalArgWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "natural"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NaturalArg"),
-              Core.projectionField = (Core.Name "natural")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalApplication :: Phantoms.TTerm Syntax.Term1 -> Phantoms.TTerm [Syntax.Arg] -> Phantoms.TTerm Syntax.NormalApplication
-normalApplication lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-normalApplicationLhs :: Phantoms.TTerm Syntax.NormalApplication -> Phantoms.TTerm Syntax.Term1
-normalApplicationLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalApplicationRhs :: Phantoms.TTerm Syntax.NormalApplication -> Phantoms.TTerm [Syntax.Arg]
-normalApplicationRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalApplicationWithLhs :: Phantoms.TTerm Syntax.NormalApplication -> Phantoms.TTerm Syntax.Term1 -> Phantoms.TTerm Syntax.NormalApplication
-normalApplicationWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalApplicationWithRhs :: Phantoms.TTerm Syntax.NormalApplication -> Phantoms.TTerm [Syntax.Arg] -> Phantoms.TTerm Syntax.NormalApplication
-normalApplicationWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NormalApplication"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-notationDeclaration :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm (Maybe Syntax.Natural) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.NotationDeclaration
-notationDeclaration notation definition level associativity =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notation"),
-          Core.fieldTerm = (Phantoms.unTTerm notation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definition"),
-          Core.fieldTerm = (Phantoms.unTTerm definition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "level"),
-          Core.fieldTerm = (Phantoms.unTTerm level)},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Phantoms.unTTerm associativity)}]}))
-
-notationDeclarationAssociativity :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm (Maybe String)
-notationDeclarationAssociativity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-        Core.projectionField = (Core.Name "associativity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notationDeclarationDefinition :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm Syntax.Term
-notationDeclarationDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-        Core.projectionField = (Core.Name "definition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notationDeclarationLevel :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm (Maybe Syntax.Natural)
-notationDeclarationLevel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-        Core.projectionField = (Core.Name "level")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notationDeclarationNotation :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm Syntax.String_
-notationDeclarationNotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-        Core.projectionField = (Core.Name "notation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notationDeclarationWithAssociativity :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.NotationDeclaration
-notationDeclarationWithAssociativity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "notation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "definition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "level"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "level")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-notationDeclarationWithDefinition :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.NotationDeclaration
-notationDeclarationWithDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "notation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "level"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "level")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "associativity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-notationDeclarationWithLevel :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm (Maybe Syntax.Natural) -> Phantoms.TTerm Syntax.NotationDeclaration
-notationDeclarationWithLevel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "notation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "definition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "level"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "associativity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-notationDeclarationWithNotation :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.NotationDeclaration
-notationDeclarationWithNotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "definition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "level"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "level")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.NotationDeclaration"),
-              Core.projectionField = (Core.Name "associativity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-number :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.Number
-number x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.Number"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-oneTermExplicit :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm Syntax.OneTerm
-oneTermExplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.OneTerm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-oneTermTerm1 :: Phantoms.TTerm Syntax.Term1 -> Phantoms.TTerm Syntax.OneTerm
-oneTermTerm1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.OneTerm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-openBindersBinders :: Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.OpenBinders
-openBindersBinders x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.OpenBinders"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binders"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-openBindersType :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm Syntax.OpenBinders
-openBindersType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.OpenBinders"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern0Number :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.Pattern0
-pattern0Number x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern0Parens :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern0
-pattern0Parens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern0Placeholder :: Phantoms.TTerm Syntax.Pattern0
-pattern0Placeholder =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "placeholder"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pattern0QualIdAndPattern :: Phantoms.TTerm Syntax.QualidAndPattern -> Phantoms.TTerm Syntax.Pattern0
-pattern0QualIdAndPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualIdAndPattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern0Qualid :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.Pattern0
-pattern0Qualid x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualid"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern0String :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.Pattern0
-pattern0String x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern1 :: Phantoms.TTerm Syntax.Pattern0 -> Phantoms.TTerm (Maybe Syntax.ScopeKey) -> Phantoms.TTerm Syntax.Pattern1
-pattern1 pattern scope =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)}]}))
-
-pattern10As :: Phantoms.TTerm Syntax.Pattern10_As -> Phantoms.TTerm Syntax.Pattern10
-pattern10As x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "as"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern10Patterns :: Phantoms.TTerm Syntax.Pattern10_Patterns -> Phantoms.TTerm Syntax.Pattern10
-pattern10Patterns x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "patterns"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern10Qualiid :: Phantoms.TTerm Syntax.Pattern10_Qualid -> Phantoms.TTerm Syntax.Pattern10
-pattern10Qualiid x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualiid"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pattern10_As :: Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern10_As
-pattern10_As pattern as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-pattern10_AsAs :: Phantoms.TTerm Syntax.Pattern10_As -> Phantoms.TTerm Syntax.Name
-pattern10_AsAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern10_AsPattern :: Phantoms.TTerm Syntax.Pattern10_As -> Phantoms.TTerm Syntax.Pattern1
-pattern10_AsPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern10_AsWithAs :: Phantoms.TTerm Syntax.Pattern10_As -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern10_As
-pattern10_AsWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pattern10_AsWithPattern :: Phantoms.TTerm Syntax.Pattern10_As -> Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm Syntax.Pattern10_As
-pattern10_AsWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_As"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pattern10_Patterns :: Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm [Syntax.Pattern1] -> Phantoms.TTerm Syntax.Pattern10_Patterns
-pattern10_Patterns pattern patterns =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm patterns)}]}))
-
-pattern10_PatternsPattern :: Phantoms.TTerm Syntax.Pattern10_Patterns -> Phantoms.TTerm Syntax.Pattern1
-pattern10_PatternsPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern10_PatternsPatterns :: Phantoms.TTerm Syntax.Pattern10_Patterns -> Phantoms.TTerm [Syntax.Pattern1]
-pattern10_PatternsPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-        Core.projectionField = (Core.Name "patterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern10_PatternsWithPattern :: Phantoms.TTerm Syntax.Pattern10_Patterns -> Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm Syntax.Pattern10_Patterns
-pattern10_PatternsWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-              Core.projectionField = (Core.Name "patterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pattern10_PatternsWithPatterns :: Phantoms.TTerm Syntax.Pattern10_Patterns -> Phantoms.TTerm [Syntax.Pattern1] -> Phantoms.TTerm Syntax.Pattern10_Patterns
-pattern10_PatternsWithPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Patterns"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pattern10_Qualid :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm [Syntax.Pattern1] -> Phantoms.TTerm Syntax.Pattern10_Qualid
-pattern10_Qualid qualid patterns =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Phantoms.unTTerm qualid)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm patterns)}]}))
-
-pattern10_QualidPatterns :: Phantoms.TTerm Syntax.Pattern10_Qualid -> Phantoms.TTerm [Syntax.Pattern1]
-pattern10_QualidPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-        Core.projectionField = (Core.Name "patterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern10_QualidQualid :: Phantoms.TTerm Syntax.Pattern10_Qualid -> Phantoms.TTerm Syntax.Qualid
-pattern10_QualidQualid x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-        Core.projectionField = (Core.Name "qualid")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern10_QualidWithPatterns :: Phantoms.TTerm Syntax.Pattern10_Qualid -> Phantoms.TTerm [Syntax.Pattern1] -> Phantoms.TTerm Syntax.Pattern10_Qualid
-pattern10_QualidWithPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-              Core.projectionField = (Core.Name "qualid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pattern10_QualidWithQualid :: Phantoms.TTerm Syntax.Pattern10_Qualid -> Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.Pattern10_Qualid
-pattern10_QualidWithQualid original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern10_Qualid"),
-              Core.projectionField = (Core.Name "patterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pattern1Pattern :: Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm Syntax.Pattern0
-pattern1Pattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern1Scope :: Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm (Maybe Syntax.ScopeKey)
-pattern1Scope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pattern1WithPattern :: Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm Syntax.Pattern0 -> Phantoms.TTerm Syntax.Pattern1
-pattern1WithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pattern1WithScope :: Phantoms.TTerm Syntax.Pattern1 -> Phantoms.TTerm (Maybe Syntax.ScopeKey) -> Phantoms.TTerm Syntax.Pattern1
-pattern1WithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Pattern1"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternPattern :: Phantoms.TTerm Syntax.Pattern10 -> Phantoms.TTerm Syntax.Pattern
-patternPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternTerm :: Phantoms.TTerm (Maybe Syntax.Term) -> Phantoms.TTerm Syntax.Pattern
-patternTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveNotationsNumber :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.PrimitiveNotations
-primitiveNotationsNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.PrimitiveNotations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveNotationsString :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.PrimitiveNotations
-primitiveNotationsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.PrimitiveNotations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-qualid :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.FieldIdent] -> Phantoms.TTerm Syntax.Qualid
-qualid id fieldIds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldIds"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldIds)}]}))
-
-qualidAndPattern :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.QualidAndPattern
-qualidAndPattern qualid pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Phantoms.unTTerm qualid)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-qualidAndPatternPattern :: Phantoms.TTerm Syntax.QualidAndPattern -> Phantoms.TTerm Syntax.Pattern
-qualidAndPatternPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualidAndPatternQualid :: Phantoms.TTerm Syntax.QualidAndPattern -> Phantoms.TTerm Syntax.Qualid
-qualidAndPatternQualid x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-        Core.projectionField = (Core.Name "qualid")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualidAndPatternWithPattern :: Phantoms.TTerm Syntax.QualidAndPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.QualidAndPattern
-qualidAndPatternWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-              Core.projectionField = (Core.Name "qualid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualidAndPatternWithQualid :: Phantoms.TTerm Syntax.QualidAndPattern -> Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.QualidAndPattern
-qualidAndPatternWithQualid original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAndPattern"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualidAnnotated :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm (Maybe Syntax.UnivAnnot) -> Phantoms.TTerm Syntax.QualidAnnotated
-qualidAnnotated qualid univAnnot =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Phantoms.unTTerm qualid)},
-        Core.Field {
-          Core.fieldName = (Core.Name "univAnnot"),
-          Core.fieldTerm = (Phantoms.unTTerm univAnnot)}]}))
-
-qualidAnnotatedQualid :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm Syntax.Qualid
-qualidAnnotatedQualid x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-        Core.projectionField = (Core.Name "qualid")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualidAnnotatedUnivAnnot :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm (Maybe Syntax.UnivAnnot)
-qualidAnnotatedUnivAnnot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-        Core.projectionField = (Core.Name "univAnnot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualidAnnotatedWithQualid :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.QualidAnnotated
-qualidAnnotatedWithQualid original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "univAnnot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-              Core.projectionField = (Core.Name "univAnnot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualidAnnotatedWithUnivAnnot :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm (Maybe Syntax.UnivAnnot) -> Phantoms.TTerm Syntax.QualidAnnotated
-qualidAnnotatedWithUnivAnnot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualid"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.QualidAnnotated"),
-              Core.projectionField = (Core.Name "qualid")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "univAnnot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualidFieldIds :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm [Syntax.FieldIdent]
-qualidFieldIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-        Core.projectionField = (Core.Name "fieldIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualidId :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.Ident
-qualidId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualidWithFieldIds :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm [Syntax.FieldIdent] -> Phantoms.TTerm Syntax.Qualid
-qualidWithFieldIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualidWithId :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Qualid
-qualidWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Qualid"),
-              Core.projectionField = (Core.Name "fieldIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordBody :: Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm [Syntax.RecordField] -> Phantoms.TTerm Syntax.RecordBody
-recordBody constructor fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm constructor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-
-recordBodyConstructor :: Phantoms.TTerm Syntax.RecordBody -> Phantoms.TTerm (Maybe Syntax.Ident)
-recordBodyConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-        Core.projectionField = (Core.Name "constructor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordBodyFields :: Phantoms.TTerm Syntax.RecordBody -> Phantoms.TTerm [Syntax.RecordField]
-recordBodyFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordBodyWithConstructor :: Phantoms.TTerm Syntax.RecordBody -> Phantoms.TTerm (Maybe Syntax.Ident) -> Phantoms.TTerm Syntax.RecordBody
-recordBodyWithConstructor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordBodyWithFields :: Phantoms.TTerm Syntax.RecordBody -> Phantoms.TTerm [Syntax.RecordField] -> Phantoms.TTerm Syntax.RecordBody
-recordBodyWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordBody"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordDefinition :: Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm (Maybe Syntax.Sort) -> Phantoms.TTerm Syntax.RecordBody -> Phantoms.TTerm Syntax.RecordDefinition
-recordDefinition locality name binders sort body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm locality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Phantoms.unTTerm sort)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-recordDefinitionBinders :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm [Syntax.Binder]
-recordDefinitionBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordDefinitionBody :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm Syntax.RecordBody
-recordDefinitionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordDefinitionLocality :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm (Maybe Syntax.Locality)
-recordDefinitionLocality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-        Core.projectionField = (Core.Name "locality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordDefinitionName :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm Syntax.Ident
-recordDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordDefinitionSort :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm (Maybe Syntax.Sort)
-recordDefinitionSort x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-        Core.projectionField = (Core.Name "sort")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordDefinitionWithBinders :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.RecordDefinition
-recordDefinitionWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "sort")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordDefinitionWithBody :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm Syntax.RecordBody -> Phantoms.TTerm Syntax.RecordDefinition
-recordDefinitionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "sort")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordDefinitionWithLocality :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm (Maybe Syntax.Locality) -> Phantoms.TTerm Syntax.RecordDefinition
-recordDefinitionWithLocality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "sort")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordDefinitionWithName :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.RecordDefinition
-recordDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "sort")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordDefinitionWithSort :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm (Maybe Syntax.Sort) -> Phantoms.TTerm Syntax.RecordDefinition
-recordDefinitionWithSort original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "locality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "locality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordField :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RecordField
-recordField name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-recordFieldName :: Phantoms.TTerm Syntax.RecordField -> Phantoms.TTerm Syntax.Ident
-recordFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldType :: Phantoms.TTerm Syntax.RecordField -> Phantoms.TTerm Syntax.Type
-recordFieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldWithName :: Phantoms.TTerm Syntax.RecordField -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.RecordField
-recordFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordFieldWithType :: Phantoms.TTerm Syntax.RecordField -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RecordField
-recordFieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RecordField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-requireImport :: Phantoms.TTerm (Maybe Syntax.Qualid) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Syntax.ImportQualification) -> Phantoms.TTerm [Syntax.Qualid] -> Phantoms.TTerm Syntax.RequireImport
-requireImport from require qualification modules =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm from)},
-        Core.Field {
-          Core.fieldName = (Core.Name "require"),
-          Core.fieldTerm = (Phantoms.unTTerm require)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualification"),
-          Core.fieldTerm = (Phantoms.unTTerm qualification)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm modules)}]}))
-
-requireImportFrom :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm (Maybe Syntax.Qualid)
-requireImportFrom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-        Core.projectionField = (Core.Name "from")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-requireImportModules :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm [Syntax.Qualid]
-requireImportModules x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-        Core.projectionField = (Core.Name "modules")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-requireImportQualification :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm (Maybe Syntax.ImportQualification)
-requireImportQualification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-        Core.projectionField = (Core.Name "qualification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-requireImportRequire :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm Bool
-requireImportRequire x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-        Core.projectionField = (Core.Name "require")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-requireImportWithFrom :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm (Maybe Syntax.Qualid) -> Phantoms.TTerm Syntax.RequireImport
-requireImportWithFrom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "require"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "require")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "qualification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-requireImportWithModules :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm [Syntax.Qualid] -> Phantoms.TTerm Syntax.RequireImport
-requireImportWithModules original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "require"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "require")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "qualification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-requireImportWithQualification :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm (Maybe Syntax.ImportQualification) -> Phantoms.TTerm Syntax.RequireImport
-requireImportWithQualification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "require"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "require")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-requireImportWithRequire :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RequireImport
-requireImportWithRequire original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "require"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "qualification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.RequireImport"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-returnAs :: Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm Syntax.ReturnAs
-returnAs as return =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm return)}]}))
-
-returnAsAs :: Phantoms.TTerm Syntax.ReturnAs -> Phantoms.TTerm (Maybe Syntax.Name)
-returnAsAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnAsReturn :: Phantoms.TTerm Syntax.ReturnAs -> Phantoms.TTerm Syntax.Term100
-returnAsReturn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-        Core.projectionField = (Core.Name "return")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnAsWithAs :: Phantoms.TTerm Syntax.ReturnAs -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.ReturnAs
-returnAsWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-returnAsWithReturn :: Phantoms.TTerm Syntax.ReturnAs -> Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm Syntax.ReturnAs
-returnAsWithReturn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.ReturnAs"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-scopeKey :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.ScopeKey
-scopeKey x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.ScopeKey"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-sectionDefinition :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Sentence] -> Phantoms.TTerm Syntax.SectionDefinition
-sectionDefinition name sentences =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Phantoms.unTTerm sentences)}]}))
-
-sectionDefinitionName :: Phantoms.TTerm Syntax.SectionDefinition -> Phantoms.TTerm Syntax.Ident
-sectionDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sectionDefinitionSentences :: Phantoms.TTerm Syntax.SectionDefinition -> Phantoms.TTerm [Syntax.Sentence]
-sectionDefinitionSentences x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-        Core.projectionField = (Core.Name "sentences")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sectionDefinitionWithName :: Phantoms.TTerm Syntax.SectionDefinition -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.SectionDefinition
-sectionDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-              Core.projectionField = (Core.Name "sentences")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sectionDefinitionWithSentences :: Phantoms.TTerm Syntax.SectionDefinition -> Phantoms.TTerm [Syntax.Sentence] -> Phantoms.TTerm Syntax.SectionDefinition
-sectionDefinitionWithSentences original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.SectionDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sentences"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sentence :: Phantoms.TTerm (Maybe Syntax.Comment) -> Phantoms.TTerm Syntax.SentenceContent -> Phantoms.TTerm Syntax.Sentence
-sentence comment content =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "content"),
-          Core.fieldTerm = (Phantoms.unTTerm content)}]}))
-
-sentenceComment :: Phantoms.TTerm Syntax.Sentence -> Phantoms.TTerm (Maybe Syntax.Comment)
-sentenceComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sentenceContent :: Phantoms.TTerm Syntax.Sentence -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-        Core.projectionField = (Core.Name "content")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sentenceContentAxiom :: Phantoms.TTerm Syntax.AxiomDeclaration -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentAxiom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "axiom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentDefinition :: Phantoms.TTerm Syntax.Definition -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "definition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentFixpoint :: Phantoms.TTerm Syntax.FixpointDefinition -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentFixpoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixpoint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentInductive :: Phantoms.TTerm Syntax.InductiveDefinition -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentInductive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inductive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentModule :: Phantoms.TTerm Syntax.ModuleDefinition -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentModule x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "module"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentNotation :: Phantoms.TTerm Syntax.NotationDeclaration -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentNotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentRecord :: Phantoms.TTerm Syntax.RecordDefinition -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentRequireImport :: Phantoms.TTerm Syntax.RequireImport -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentRequireImport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "requireImport"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentSection :: Phantoms.TTerm Syntax.SectionDefinition -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentSection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "section"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceContentTheorem :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.SentenceContent
-sentenceContentTheorem x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.SentenceContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "theorem"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sentenceWithComment :: Phantoms.TTerm Syntax.Sentence -> Phantoms.TTerm (Maybe Syntax.Comment) -> Phantoms.TTerm Syntax.Sentence
-sentenceWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "content"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-              Core.projectionField = (Core.Name "content")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sentenceWithContent :: Phantoms.TTerm Syntax.Sentence -> Phantoms.TTerm Syntax.SentenceContent -> Phantoms.TTerm Syntax.Sentence
-sentenceWithContent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Sentence"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "content"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sortProp :: Phantoms.TTerm Syntax.Sort
-sortProp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Sort"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prop"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sortSProp :: Phantoms.TTerm Syntax.Sort
-sortSProp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Sort"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sProp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sortSet :: Phantoms.TTerm Syntax.Sort
-sortSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Sort"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sortType :: Phantoms.TTerm Syntax.Sort
-sortType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Sort"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sortTypeWithAnyUniverse :: Phantoms.TTerm Syntax.Sort
-sortTypeWithAnyUniverse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Sort"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeWithAnyUniverse"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sortTypeWithUniverse :: Phantoms.TTerm Syntax.Universe -> Phantoms.TTerm Syntax.Sort
-sortTypeWithUniverse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Sort"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeWithUniverse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-string :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.String_
-string x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.String"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-term0Evar :: Phantoms.TTerm Syntax.ExistentialVariable -> Phantoms.TTerm Syntax.Term0
-term0Evar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "evar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term0Generalizing :: Phantoms.TTerm Syntax.Term0
-term0Generalizing =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "generalizing"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-term0Ltac :: Phantoms.TTerm Syntax.Term0
-term0Ltac =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ltac"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-term0Match :: Phantoms.TTerm Syntax.Match -> Phantoms.TTerm Syntax.Term0
-term0Match x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term0Parens :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Term0
-term0Parens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term0PrimitiveNotations :: Phantoms.TTerm Syntax.PrimitiveNotations -> Phantoms.TTerm Syntax.Term0
-term0PrimitiveNotations x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitiveNotations"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term0QualidAnnotated :: Phantoms.TTerm Syntax.QualidAnnotated -> Phantoms.TTerm Syntax.Term0
-term0QualidAnnotated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualidAnnotated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term0Record :: Phantoms.TTerm Syntax.Term0
-term0Record =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-term0Sort :: Phantoms.TTerm Syntax.Sort -> Phantoms.TTerm Syntax.Term0
-term0Sort x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term0"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sort"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term100Cast :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.Term100
-term100Cast x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term100"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cast"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term100Term10 :: Phantoms.TTerm Syntax.Term10 -> Phantoms.TTerm Syntax.Term100
-term100Term10 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term100"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term10"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term10Application :: Phantoms.TTerm Syntax.Application -> Phantoms.TTerm Syntax.Term10
-term10Application x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term10"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term10OneTerm :: Phantoms.TTerm Syntax.OneTerm -> Phantoms.TTerm Syntax.Term10
-term10OneTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term10"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "oneTerm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term1Projection :: Phantoms.TTerm Syntax.Term1
-term1Projection =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term1"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "projection"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-term1Scope :: Phantoms.TTerm Syntax.Term1
-term1Scope =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term1"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scope"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-term1Term0 :: Phantoms.TTerm Syntax.Term0 -> Phantoms.TTerm Syntax.Term1
-term1Term0 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term1"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term0"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termCofix :: Phantoms.TTerm Syntax.Cofix -> Phantoms.TTerm Syntax.Term
-termCofix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cofix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termFix :: Phantoms.TTerm Syntax.Fix -> Phantoms.TTerm Syntax.Term
-termFix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termForallOrFun :: Phantoms.TTerm Syntax.ForallOrFun -> Phantoms.TTerm Syntax.Term
-termForallOrFun x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forallOrFun"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termIf :: Phantoms.TTerm Syntax.If -> Phantoms.TTerm Syntax.Term
-termIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termLet :: Phantoms.TTerm Syntax.Let -> Phantoms.TTerm Syntax.Term
-termLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termTerm100 :: Phantoms.TTerm Syntax.Term100 -> Phantoms.TTerm Syntax.Term
-termTerm100 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term100"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-theoremBody :: Phantoms.TTerm Syntax.TheoremKind -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TheoremBody
-theoremBody kind name binders type_ proof =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm binders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "proof"),
-          Core.fieldTerm = (Phantoms.unTTerm proof)}]}))
-
-theoremBodyBinders :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm [Syntax.Binder]
-theoremBodyBinders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-        Core.projectionField = (Core.Name "binders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-theoremBodyKind :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.TheoremKind
-theoremBodyKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-theoremBodyName :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.Ident
-theoremBodyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-theoremBodyProof :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.Term
-theoremBodyProof x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-        Core.projectionField = (Core.Name "proof")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-theoremBodyType :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.Type
-theoremBodyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-theoremBodyWithBinders :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm [Syntax.Binder] -> Phantoms.TTerm Syntax.TheoremBody
-theoremBodyWithBinders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "proof"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "proof")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-theoremBodyWithKind :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.TheoremKind -> Phantoms.TTerm Syntax.TheoremBody
-theoremBodyWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "proof"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "proof")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-theoremBodyWithName :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.TheoremBody
-theoremBodyWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "proof"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "proof")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-theoremBodyWithProof :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TheoremBody
-theoremBodyWithProof original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "proof"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-theoremBodyWithType :: Phantoms.TTerm Syntax.TheoremBody -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TheoremBody
-theoremBodyWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "binders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "proof"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TheoremBody"),
-              Core.projectionField = (Core.Name "proof")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-theoremKindCorollary :: Phantoms.TTerm Syntax.TheoremKind
-theoremKindCorollary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TheoremKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "corollary"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-theoremKindExample :: Phantoms.TTerm Syntax.TheoremKind
-theoremKindExample =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TheoremKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "example"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-theoremKindLemma :: Phantoms.TTerm Syntax.TheoremKind
-theoremKindLemma =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TheoremKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lemma"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-theoremKindProposition :: Phantoms.TTerm Syntax.TheoremKind
-theoremKindProposition =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TheoremKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "proposition"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-theoremKindTheorem :: Phantoms.TTerm Syntax.TheoremKind
-theoremKindTheorem =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TheoremKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "theorem"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-type_ :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Type
-type_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.Type"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeBinders :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeBinders
-typeBinders names type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeBindersNames :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm [Syntax.Name]
-typeBindersNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBindersType :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm Syntax.Type
-typeBindersType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBindersWithNames :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.TypeBinders
-typeBindersWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeBindersWithType :: Phantoms.TTerm Syntax.TypeBinders -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeBinders
-typeBindersWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeBinders"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeCast :: Phantoms.TTerm Syntax.Term10 -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeCastOperator -> Phantoms.TTerm Syntax.TypeCast
-typeCast term type_ operator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)}]}))
-
-typeCastOperator :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.TypeCastOperator
-typeCastOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCastOperatorNativeCompute :: Phantoms.TTerm Syntax.TypeCastOperator
-typeCastOperatorNativeCompute =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TypeCastOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nativeCompute"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCastOperatorNormal :: Phantoms.TTerm Syntax.TypeCastOperator
-typeCastOperatorNormal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TypeCastOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCastOperatorVmCompute :: Phantoms.TTerm Syntax.TypeCastOperator
-typeCastOperatorVmCompute =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.TypeCastOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vmCompute"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeCastTerm :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.Term10
-typeCastTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCastType :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.Type
-typeCastType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCastWithOperator :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.TypeCastOperator -> Phantoms.TTerm Syntax.TypeCast
-typeCastWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeCastWithTerm :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.Term10 -> Phantoms.TTerm Syntax.TypeCast
-typeCastWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeCastWithType :: Phantoms.TTerm Syntax.TypeCast -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeCast
-typeCastWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeCast"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeclassConstraint :: Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TypeclassConstraint
-typeclassConstraint name generalizing term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generalizing"),
-          Core.fieldTerm = (Phantoms.unTTerm generalizing)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-
-typeclassConstraintGeneralizing :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Bool
-typeclassConstraintGeneralizing x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-        Core.projectionField = (Core.Name "generalizing")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeclassConstraintName :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm (Maybe Syntax.Name)
-typeclassConstraintName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeclassConstraintTerm :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Syntax.Term
-typeclassConstraintTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeclassConstraintWithGeneralizing :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypeclassConstraint
-typeclassConstraintWithGeneralizing original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generalizing"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeclassConstraintWithName :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.TypeclassConstraint
-typeclassConstraintWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generalizing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-              Core.projectionField = (Core.Name "generalizing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeclassConstraintWithTerm :: Phantoms.TTerm Syntax.TypeclassConstraint -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TypeclassConstraint
-typeclassConstraintWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generalizing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.TypeclassConstraint"),
-              Core.projectionField = (Core.Name "generalizing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unComment :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm String
-unComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.Comment")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFieldIdent :: Phantoms.TTerm Syntax.FieldIdent -> Phantoms.TTerm Syntax.Ident
-unFieldIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.FieldIdent")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdent :: Phantoms.TTerm Syntax.Ident -> Phantoms.TTerm Syntax.String_
-unIdent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.Ident")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Ident)
-unName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.Name")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNatural :: Phantoms.TTerm Syntax.Natural -> Phantoms.TTerm Integer
-unNatural x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.Natural")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNumber :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Double
-unNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.Number")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unScopeKey :: Phantoms.TTerm Syntax.ScopeKey -> Phantoms.TTerm Syntax.Ident
-unScopeKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.ScopeKey")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unString :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm String
-unString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.String")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Term
-unType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.Type")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnivAnnot :: Phantoms.TTerm Syntax.UnivAnnot -> Phantoms.TTerm [Syntax.UniverseLevel]
-unUnivAnnot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coq.syntax.UnivAnnot")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-univAnnot :: Phantoms.TTerm [Syntax.UniverseLevel] -> Phantoms.TTerm Syntax.UnivAnnot
-univAnnot x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coq.syntax.UnivAnnot"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-universeExpr :: Phantoms.TTerm Syntax.Universe_Expr -> Phantoms.TTerm Syntax.Universe
-universeExpr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Universe"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-universeLevelIgnored :: Phantoms.TTerm Syntax.UniverseLevel
-universeLevelIgnored =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseLevel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ignored"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-universeLevelProp :: Phantoms.TTerm Syntax.UniverseLevel
-universeLevelProp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseLevel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prop"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-universeLevelQualid :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.UniverseLevel
-universeLevelQualid x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseLevel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualid"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-universeLevelSet :: Phantoms.TTerm Syntax.UniverseLevel
-universeLevelSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseLevel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-universeLevelType :: Phantoms.TTerm Syntax.UniverseLevel
-universeLevelType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseLevel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-universeMax :: Phantoms.TTerm [Syntax.Universe_Expr] -> Phantoms.TTerm Syntax.Universe
-universeMax x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.Universe"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "max"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-universeNameProp :: Phantoms.TTerm Syntax.UniverseName
-universeNameProp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prop"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-universeNameQualid :: Phantoms.TTerm Syntax.Qualid -> Phantoms.TTerm Syntax.UniverseName
-universeNameQualid x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualid"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-universeNameSet :: Phantoms.TTerm Syntax.UniverseName
-universeNameSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.coq.syntax.UniverseName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-universe_Expr :: Phantoms.TTerm Syntax.UniverseName -> Phantoms.TTerm (Maybe Syntax.Natural) -> Phantoms.TTerm Syntax.Universe_Expr
-universe_Expr name number =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Phantoms.unTTerm number)}]}))
-
-universe_ExprName :: Phantoms.TTerm Syntax.Universe_Expr -> Phantoms.TTerm Syntax.UniverseName
-universe_ExprName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-universe_ExprNumber :: Phantoms.TTerm Syntax.Universe_Expr -> Phantoms.TTerm (Maybe Syntax.Natural)
-universe_ExprNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-        Core.projectionField = (Core.Name "number")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-universe_ExprWithName :: Phantoms.TTerm Syntax.Universe_Expr -> Phantoms.TTerm Syntax.UniverseName -> Phantoms.TTerm Syntax.Universe_Expr
-universe_ExprWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-universe_ExprWithNumber :: Phantoms.TTerm Syntax.Universe_Expr -> Phantoms.TTerm (Maybe Syntax.Natural) -> Phantoms.TTerm Syntax.Universe_Expr
-universe_ExprWithNumber original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.coq.syntax.Universe_Expr"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Core.hs b/src/main/haskell/Hydra/Dsl/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Core.hs
+++ /dev/null
@@ -1,1957 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.core
-
-module Hydra.Dsl.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-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
-annotatedTerm :: Phantoms.TTerm Core.Term -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedTerm
-annotatedTerm body annotation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm annotation)}]}))
-annotatedTermAnnotation :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm (M.Map Core.Name Core.Term)
-annotatedTermAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-        Core.projectionField = (Core.Name "annotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-annotatedTermBody :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm Core.Term
-annotatedTermBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-annotatedTermWithAnnotation :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedTerm
-annotatedTermWithAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-annotatedTermWithBody :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.AnnotatedTerm
-annotatedTermWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-              Core.projectionField = (Core.Name "annotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-annotatedType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedType
-annotatedType body annotation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm annotation)}]}))
-annotatedTypeAnnotation :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm (M.Map Core.Name Core.Term)
-annotatedTypeAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),
-        Core.projectionField = (Core.Name "annotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-annotatedTypeBody :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm Core.Type
-annotatedTypeBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-annotatedTypeWithAnnotation :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedType
-annotatedTypeWithAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-annotatedTypeWithBody :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.AnnotatedType
-annotatedTypeWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),
-              Core.projectionField = (Core.Name "annotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-application :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Application
-application function argument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))
-applicationArgument :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term
-applicationArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Application"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationFunction :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term
-applicationFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Application"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ApplicationType
-applicationType function argument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))
-applicationTypeArgument :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type
-applicationTypeArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationTypeFunction :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type
-applicationTypeFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationTypeWithArgument :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ApplicationType
-applicationTypeWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-applicationTypeWithFunction :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ApplicationType
-applicationTypeWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-applicationWithArgument :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Application
-applicationWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Application"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-applicationWithFunction :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Application
-applicationWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Application"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-binding :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Core.Binding
-binding name term typeScheme =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm typeScheme)}]}))
-bindingName :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Name
-bindingName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bindingTerm :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Term
-bindingTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bindingTypeScheme :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm (Maybe Core.TypeScheme)
-bindingTypeScheme x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-        Core.projectionField = (Core.Name "typeScheme")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-bindingWithName :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Binding
-bindingWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-bindingWithTerm :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Binding
-bindingWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-bindingWithTypeScheme :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Core.Binding
-bindingWithTypeScheme original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-caseStatement :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (Maybe Core.Term) -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.CaseStatement
-caseStatement typeName default_ cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-caseStatementCases :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm [Core.Field]
-caseStatementCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-caseStatementDefault :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm (Maybe Core.Term)
-caseStatementDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-caseStatementTypeName :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm Core.Name
-caseStatementTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-caseStatementWithCases :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.CaseStatement
-caseStatementWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-caseStatementWithDefault :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm (Maybe Core.Term) -> Phantoms.TTerm Core.CaseStatement
-caseStatementWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-caseStatementWithTypeName :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.CaseStatement
-caseStatementWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-eitherType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.EitherType
-eitherType left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-eitherTypeLeft :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type
-eitherTypeLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-eitherTypeRight :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type
-eitherTypeRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-eitherTypeWithLeft :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.EitherType
-eitherTypeWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-eitherTypeWithRight :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.EitherType
-eitherTypeWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-field :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Field
-field name term =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)}]}))
-fieldName :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Name
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldTerm :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Term
-fieldTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldType :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FieldType
-fieldType name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-fieldTypeName :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Name
-fieldTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldTypeType :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Type
-fieldTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldTypeWithName :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.FieldType
-fieldTypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-fieldTypeWithType :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FieldType
-fieldTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-fieldWithName :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-fieldWithTerm :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Field
-fieldWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-floatTypeBigfloat :: Phantoms.TTerm Core.FloatType
-floatTypeBigfloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigfloat"),
-        Core.fieldTerm = Core.TermUnit}}))
-floatTypeFloat32 :: Phantoms.TTerm Core.FloatType
-floatTypeFloat32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float32"),
-        Core.fieldTerm = Core.TermUnit}}))
-floatTypeFloat64 :: Phantoms.TTerm Core.FloatType
-floatTypeFloat64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float64"),
-        Core.fieldTerm = Core.TermUnit}}))
-floatValueBigfloat :: Phantoms.TTerm Double -> Phantoms.TTerm Core.FloatValue
-floatValueBigfloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigfloat"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-floatValueFloat32 :: Phantoms.TTerm Float -> Phantoms.TTerm Core.FloatValue
-floatValueFloat32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-floatValueFloat64 :: Phantoms.TTerm Double -> Phantoms.TTerm Core.FloatValue
-floatValueFloat64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-forallType :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ForallType
-forallType parameter body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-forallTypeBody :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Type
-forallTypeBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-forallTypeParameter :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Name
-forallTypeParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-forallTypeWithBody :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ForallType
-forallTypeWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-forallTypeWithParameter :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.ForallType
-forallTypeWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-functionType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FunctionType
-functionType domain codomain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Phantoms.unTTerm codomain)}]}))
-functionTypeCodomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type
-functionTypeCodomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),
-        Core.projectionField = (Core.Name "codomain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionTypeDomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type
-functionTypeDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionTypeWithCodomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FunctionType
-functionTypeWithCodomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-functionTypeWithDomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FunctionType
-functionTypeWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-injection :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Injection
-injection typeName field =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm field)}]}))
-injectionField :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Field
-injectionField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-        Core.projectionField = (Core.Name "field")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-injectionTypeName :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Name
-injectionTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-injectionWithField :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Injection
-injectionWithField original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-injectionWithTypeName :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Injection
-injectionWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-integerTypeBigint :: Phantoms.TTerm Core.IntegerType
-integerTypeBigint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigint"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeInt16 :: Phantoms.TTerm Core.IntegerType
-integerTypeInt16 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int16"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeInt32 :: Phantoms.TTerm Core.IntegerType
-integerTypeInt32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int32"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeInt64 :: Phantoms.TTerm Core.IntegerType
-integerTypeInt64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int64"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeInt8 :: Phantoms.TTerm Core.IntegerType
-integerTypeInt8 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int8"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeUint16 :: Phantoms.TTerm Core.IntegerType
-integerTypeUint16 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint16"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeUint32 :: Phantoms.TTerm Core.IntegerType
-integerTypeUint32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint32"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeUint64 :: Phantoms.TTerm Core.IntegerType
-integerTypeUint64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint64"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerTypeUint8 :: Phantoms.TTerm Core.IntegerType
-integerTypeUint8 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint8"),
-        Core.fieldTerm = Core.TermUnit}}))
-integerValueBigint :: Phantoms.TTerm Integer -> Phantoms.TTerm Core.IntegerValue
-integerValueBigint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueInt16 :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Core.IntegerValue
-integerValueInt16 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int16"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueInt32 :: Phantoms.TTerm Int -> Phantoms.TTerm Core.IntegerValue
-integerValueInt32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueInt64 :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Core.IntegerValue
-integerValueInt64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueInt8 :: Phantoms.TTerm I.Int8 -> Phantoms.TTerm Core.IntegerValue
-integerValueInt8 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int8"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueUint16 :: Phantoms.TTerm Int -> Phantoms.TTerm Core.IntegerValue
-integerValueUint16 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint16"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueUint32 :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Core.IntegerValue
-integerValueUint32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueUint64 :: Phantoms.TTerm Integer -> Phantoms.TTerm Core.IntegerValue
-integerValueUint64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-integerValueUint8 :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Core.IntegerValue
-integerValueUint8 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint8"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-lambda :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Lambda
-lambda parameter domain body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-lambdaBody :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Term
-lambdaBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-lambdaDomain :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm (Maybe Core.Type)
-lambdaDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-lambdaParameter :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Name
-lambdaParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-lambdaWithBody :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Lambda
-lambdaWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-lambdaWithDomain :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm Core.Lambda
-lambdaWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-lambdaWithParameter :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Lambda
-lambdaWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-let_ :: Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Let
-let_ bindings body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-letBindings :: Phantoms.TTerm Core.Let -> Phantoms.TTerm [Core.Binding]
-letBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Let"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-letBody :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Term
-letBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Let"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-letWithBindings :: Phantoms.TTerm Core.Let -> Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm Core.Let
-letWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Let"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-letWithBody :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Let
-letWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Let"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-literalBinary :: Phantoms.TTerm B.ByteString -> Phantoms.TTerm Core.Literal
-literalBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Core.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalDecimal :: Phantoms.TTerm Sci.Scientific -> Phantoms.TTerm Core.Literal
-literalDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalFloat :: Phantoms.TTerm Core.FloatValue -> Phantoms.TTerm Core.Literal
-literalFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalInteger :: Phantoms.TTerm Core.IntegerValue -> Phantoms.TTerm Core.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalString :: Phantoms.TTerm String -> Phantoms.TTerm Core.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalTypeBinary :: Phantoms.TTerm Core.LiteralType
-literalTypeBinary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalTypeBoolean :: Phantoms.TTerm Core.LiteralType
-literalTypeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalTypeDecimal :: Phantoms.TTerm Core.LiteralType
-literalTypeDecimal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalTypeFloat :: Phantoms.TTerm Core.FloatType -> Phantoms.TTerm Core.LiteralType
-literalTypeFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalTypeInteger :: Phantoms.TTerm Core.IntegerType -> Phantoms.TTerm Core.LiteralType
-literalTypeInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalTypeString :: Phantoms.TTerm Core.LiteralType
-literalTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-mapType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.MapType
-mapType keys values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-mapTypeKeys :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type
-mapTypeKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.MapType"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-mapTypeValues :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type
-mapTypeValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.MapType"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-mapTypeWithKeys :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.MapType
-mapTypeWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.MapType"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-mapTypeWithValues :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.MapType
-mapTypeWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.MapType"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-name :: Phantoms.TTerm String -> Phantoms.TTerm Core.Name
-name x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-pairType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.PairType
-pairType first second =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.PairType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm second)}]}))
-pairTypeFirst :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type
-pairTypeFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.PairType"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-pairTypeSecond :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type
-pairTypeSecond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.PairType"),
-        Core.projectionField = (Core.Name "second")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-pairTypeWithFirst :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.PairType
-pairTypeWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.PairType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.PairType"),
-              Core.projectionField = (Core.Name "second")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-pairTypeWithSecond :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.PairType
-pairTypeWithSecond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.PairType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.PairType"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-projection :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Projection
-projection typeName field =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm field)}]}))
-projectionField :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name
-projectionField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Projection"),
-        Core.projectionField = (Core.Name "field")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-projectionTypeName :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name
-projectionTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Projection"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-projectionWithField :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Projection
-projectionWithField original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Projection"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-projectionWithTypeName :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Projection
-projectionWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Projection"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-record :: Phantoms.TTerm Core.Name -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.Record
-record typeName fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Record"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-recordFields :: Phantoms.TTerm Core.Record -> Phantoms.TTerm [Core.Field]
-recordFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Record"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-recordTypeName :: Phantoms.TTerm Core.Record -> Phantoms.TTerm Core.Name
-recordTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.Record"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-recordWithFields :: Phantoms.TTerm Core.Record -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.Record
-recordWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Record"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Record"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-recordWithTypeName :: Phantoms.TTerm Core.Record -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Record
-recordWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Record"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.Record"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termAnnotated :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm Core.Term
-termAnnotated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termApplication :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term
-termApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termCases :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm Core.Term
-termCases x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cases"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termEither :: Phantoms.TTerm (Either Core.Term Core.Term) -> Phantoms.TTerm Core.Term
-termEither x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "either"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termInject :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Term
-termInject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termLambda :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Term
-termLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termLet :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Term
-termLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termList :: Phantoms.TTerm [Core.Term] -> Phantoms.TTerm Core.Term
-termList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termLiteral :: Phantoms.TTerm Core.Literal -> Phantoms.TTerm Core.Term
-termLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termMap :: Phantoms.TTerm (M.Map Core.Term Core.Term) -> Phantoms.TTerm Core.Term
-termMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termMaybe :: Phantoms.TTerm (Maybe Core.Term) -> Phantoms.TTerm Core.Term
-termMaybe x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybe"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termPair :: Phantoms.TTerm (Core.Term, Core.Term) -> Phantoms.TTerm Core.Term
-termPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termProject :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Term
-termProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termRecord :: Phantoms.TTerm Core.Record -> Phantoms.TTerm Core.Term
-termRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termSet :: Phantoms.TTerm (S.Set Core.Term) -> Phantoms.TTerm Core.Term
-termSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termTypeApplication :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Term
-termTypeApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeApplication"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termTypeLambda :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Term
-termTypeLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termUnit :: Phantoms.TTerm Core.Term
-termUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-termUnwrap :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term
-termUnwrap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unwrap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termVariable :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term
-termVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-termWrap :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Term
-termWrap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeAnnotated :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm Core.Type
-typeAnnotated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeApplication :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type
-typeApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeApplicationTerm :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.TypeApplicationTerm
-typeApplicationTerm body type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-typeApplicationTermBody :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Term
-typeApplicationTermBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeApplicationTermType :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Type
-typeApplicationTermType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeApplicationTermWithBody :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeApplicationTerm
-typeApplicationTermWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeApplicationTermWithType :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.TypeApplicationTerm
-typeApplicationTermWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeEither :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type
-typeEither x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "either"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeForall :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Type
-typeForall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeFunction :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type
-typeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeLambda :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeLambda
-typeLambda parameter body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-typeLambdaBody :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Term
-typeLambdaBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeLambdaParameter :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Name
-typeLambdaParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeLambdaWithBody :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeLambda
-typeLambdaWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeLambdaWithParameter :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.TypeLambda
-typeLambdaWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeList :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type
-typeList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeLiteral :: Phantoms.TTerm Core.LiteralType -> Phantoms.TTerm Core.Type
-typeLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeMap :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type
-typeMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeMaybe :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type
-typeMaybe x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybe"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typePair :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type
-typePair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeRecord :: Phantoms.TTerm [Core.FieldType] -> Phantoms.TTerm Core.Type
-typeRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeScheme :: Phantoms.TTerm [Core.Name] -> Phantoms.TTerm Core.Type -> Phantoms.TTerm (Maybe (M.Map Core.Name Core.TypeVariableMetadata)) -> Phantoms.TTerm Core.TypeScheme
-typeScheme variables body constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm variables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-typeSchemeBody :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Core.Type
-typeSchemeBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSchemeConstraints :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm (Maybe (M.Map Core.Name Core.TypeVariableMetadata))
-typeSchemeConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSchemeVariables :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm [Core.Name]
-typeSchemeVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-        Core.projectionField = (Core.Name "variables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSchemeWithBody :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.TypeScheme
-typeSchemeWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeSchemeWithConstraints :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm (Maybe (M.Map Core.Name Core.TypeVariableMetadata)) -> Phantoms.TTerm Core.TypeScheme
-typeSchemeWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeSchemeWithVariables :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm Core.TypeScheme
-typeSchemeWithVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeSet :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type
-typeSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeUnion :: Phantoms.TTerm [Core.FieldType] -> Phantoms.TTerm Core.Type
-typeUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeUnit :: Phantoms.TTerm Core.Type
-typeUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariable :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type
-typeVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeVariableMetadata :: Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Core.TypeVariableMetadata
-typeVariableMetadata classes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm classes)}]}))
-typeVariableMetadataClasses :: Phantoms.TTerm Core.TypeVariableMetadata -> Phantoms.TTerm (S.Set Core.Name)
-typeVariableMetadataClasses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),
-        Core.projectionField = (Core.Name "classes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeVariableMetadataWithClasses :: Phantoms.TTerm Core.TypeVariableMetadata -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Core.TypeVariableMetadata
-typeVariableMetadataWithClasses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeVoid :: Phantoms.TTerm Core.Type
-typeVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeWrap :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type
-typeWrap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-unName :: Phantoms.TTerm Core.Name -> Phantoms.TTerm String
-unName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-wrappedTerm :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.WrappedTerm
-wrappedTerm typeName body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-wrappedTermBody :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Term
-wrappedTermBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-wrappedTermTypeName :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Name
-wrappedTermTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-wrappedTermWithBody :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.WrappedTerm
-wrappedTermWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-wrappedTermWithTypeName :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.WrappedTerm
-wrappedTermWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Cpp/Environment.hs b/src/main/haskell/Hydra/Dsl/Cpp/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Cpp/Environment.hs
+++ /dev/null
@@ -1,73 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.cpp.environment
-
-module Hydra.Dsl.Cpp.Environment where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Cpp.Environment as Environment
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-cppEnvironment :: Phantoms.TTerm (Packaging.Namespaces String) -> Phantoms.TTerm ([Core.Name], (M.Map Core.Name String)) -> Phantoms.TTerm Environment.CppEnvironment
-cppEnvironment namespaces boundTypeVariables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Phantoms.unTTerm namespaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm boundTypeVariables)}]}))
-
-cppEnvironmentBoundTypeVariables :: Phantoms.TTerm Environment.CppEnvironment -> Phantoms.TTerm ([Core.Name], (M.Map Core.Name String))
-cppEnvironmentBoundTypeVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-        Core.projectionField = (Core.Name "boundTypeVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cppEnvironmentNamespaces :: Phantoms.TTerm Environment.CppEnvironment -> Phantoms.TTerm (Packaging.Namespaces String)
-cppEnvironmentNamespaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-        Core.projectionField = (Core.Name "namespaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cppEnvironmentWithBoundTypeVariables :: Phantoms.TTerm Environment.CppEnvironment -> Phantoms.TTerm ([Core.Name], (M.Map Core.Name String)) -> Phantoms.TTerm Environment.CppEnvironment
-cppEnvironmentWithBoundTypeVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-cppEnvironmentWithNamespaces :: Phantoms.TTerm Environment.CppEnvironment -> Phantoms.TTerm (Packaging.Namespaces String) -> Phantoms.TTerm Environment.CppEnvironment
-cppEnvironmentWithNamespaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.environment.CppEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Cpp/Syntax.hs b/src/main/haskell/Hydra/Dsl/Cpp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Cpp/Syntax.hs
+++ /dev/null
@@ -1,7729 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.cpp.syntax
-
-module Hydra.Dsl.Cpp.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Cpp.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-accessSpecifierNone :: Phantoms.TTerm Syntax.AccessSpecifier
-accessSpecifierNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AccessSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessSpecifierPrivate :: Phantoms.TTerm Syntax.AccessSpecifier
-accessSpecifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AccessSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessSpecifierProtected :: Phantoms.TTerm Syntax.AccessSpecifier
-accessSpecifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AccessSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessSpecifierPublic :: Phantoms.TTerm Syntax.AccessSpecifier
-accessSpecifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AccessSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addOperation :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AddOperation
-addOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-addOperationLeft :: Phantoms.TTerm Syntax.AddOperation -> Phantoms.TTerm Syntax.AdditiveExpression
-addOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addOperationRight :: Phantoms.TTerm Syntax.AddOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-addOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addOperationWithLeft :: Phantoms.TTerm Syntax.AddOperation -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.AddOperation
-addOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addOperationWithRight :: Phantoms.TTerm Syntax.AddOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AddOperation
-addOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.AddOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-additiveExpressionAdd :: Phantoms.TTerm Syntax.AddOperation -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionAdd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveExpressionMultiplicative :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionMultiplicative x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiplicative"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveExpressionSubtract :: Phantoms.TTerm Syntax.SubtractOperation -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionSubtract x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-andExpressionBitwiseAnd :: Phantoms.TTerm Syntax.BitwiseAndOperation -> Phantoms.TTerm Syntax.AndExpression
-andExpressionBitwiseAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAnd"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-andExpressionEquality :: Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.AndExpression
-andExpressionEquality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentExpressionAssignment :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentExpressionConditional :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentOperatorAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorBitwiseAndAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorBitwiseAndAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAndAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorBitwiseOrAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorBitwiseOrAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOrAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorBitwiseXorAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorBitwiseXorAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXorAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorDivideAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorDivideAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divideAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorLeftShiftAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorLeftShiftAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShiftAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorMinusAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorMinusAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minusAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorModuloAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorModuloAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "moduloAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorMultiplyAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorMultiplyAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiplyAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorPlusAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorPlusAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plusAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorRightShiftAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorRightShiftAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShiftAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-baseSpecifier :: Phantoms.TTerm Syntax.AccessSpecifier -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.BaseSpecifier
-baseSpecifier access name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "access"),
-          Core.fieldTerm = (Phantoms.unTTerm access)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-baseSpecifierAccess :: Phantoms.TTerm Syntax.BaseSpecifier -> Phantoms.TTerm Syntax.AccessSpecifier
-baseSpecifierAccess x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-        Core.projectionField = (Core.Name "access")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-baseSpecifierName :: Phantoms.TTerm Syntax.BaseSpecifier -> Phantoms.TTerm String
-baseSpecifierName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-baseSpecifierWithAccess :: Phantoms.TTerm Syntax.BaseSpecifier -> Phantoms.TTerm Syntax.AccessSpecifier -> Phantoms.TTerm Syntax.BaseSpecifier
-baseSpecifierWithAccess original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "access"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-baseSpecifierWithName :: Phantoms.TTerm Syntax.BaseSpecifier -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.BaseSpecifier
-baseSpecifierWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "access"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BaseSpecifier"),
-              Core.projectionField = (Core.Name "access")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-basicTypeAuto :: Phantoms.TTerm Syntax.BasicType
-basicTypeAuto =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "auto"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeBool :: Phantoms.TTerm Syntax.BasicType
-basicTypeBool =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeChar :: Phantoms.TTerm Syntax.BasicType
-basicTypeChar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeDouble :: Phantoms.TTerm Syntax.BasicType
-basicTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeFloat :: Phantoms.TTerm Syntax.BasicType
-basicTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeInt :: Phantoms.TTerm Syntax.BasicType
-basicTypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeNamed :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.BasicType
-basicTypeNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-basicTypeString :: Phantoms.TTerm Syntax.BasicType
-basicTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basicTypeVoid :: Phantoms.TTerm Syntax.BasicType
-basicTypeVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BasicType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorBitwiseAnd :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorBitwiseAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAnd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorBitwiseOr :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorBitwiseOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorBitwiseXor :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorBitwiseXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorDivide :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorGreater :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorGreater =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greater"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorGreaterEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorGreaterEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLeftShift :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLeftShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLess :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLess =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "less"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLessEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLessEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLogicalAnd :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLogicalAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalAnd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLogicalOr :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLogicalOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalOr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorMinus :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorModulo :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorModulo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulo"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorMultiply :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorNotEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorPlus :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorRightShift :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorRightShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-bitwiseAndOperation :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.BitwiseAndOperation
-bitwiseAndOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-bitwiseAndOperationLeft :: Phantoms.TTerm Syntax.BitwiseAndOperation -> Phantoms.TTerm Syntax.AndExpression
-bitwiseAndOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseAndOperationRight :: Phantoms.TTerm Syntax.BitwiseAndOperation -> Phantoms.TTerm Syntax.EqualityExpression
-bitwiseAndOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseAndOperationWithLeft :: Phantoms.TTerm Syntax.BitwiseAndOperation -> Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.BitwiseAndOperation
-bitwiseAndOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bitwiseAndOperationWithRight :: Phantoms.TTerm Syntax.BitwiseAndOperation -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.BitwiseAndOperation
-bitwiseAndOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseAndOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bitwiseOrOperation :: Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.BitwiseOrOperation
-bitwiseOrOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-bitwiseOrOperationLeft :: Phantoms.TTerm Syntax.BitwiseOrOperation -> Phantoms.TTerm Syntax.InclusiveOrExpression
-bitwiseOrOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseOrOperationRight :: Phantoms.TTerm Syntax.BitwiseOrOperation -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-bitwiseOrOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseOrOperationWithLeft :: Phantoms.TTerm Syntax.BitwiseOrOperation -> Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.BitwiseOrOperation
-bitwiseOrOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bitwiseOrOperationWithRight :: Phantoms.TTerm Syntax.BitwiseOrOperation -> Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.BitwiseOrOperation
-bitwiseOrOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseOrOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bitwiseXorOperation :: Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.BitwiseXorOperation
-bitwiseXorOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-bitwiseXorOperationLeft :: Phantoms.TTerm Syntax.BitwiseXorOperation -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-bitwiseXorOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseXorOperationRight :: Phantoms.TTerm Syntax.BitwiseXorOperation -> Phantoms.TTerm Syntax.AndExpression
-bitwiseXorOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseXorOperationWithLeft :: Phantoms.TTerm Syntax.BitwiseXorOperation -> Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.BitwiseXorOperation
-bitwiseXorOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bitwiseXorOperationWithRight :: Phantoms.TTerm Syntax.BitwiseXorOperation -> Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.BitwiseXorOperation
-bitwiseXorOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.BitwiseXorOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanLiteral :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.BooleanLiteral
-booleanLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.BooleanLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-capture :: Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Capture
-capture name byReference =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "byReference"),
-          Core.fieldTerm = (Phantoms.unTTerm byReference)}]}))
-
-captureByReference :: Phantoms.TTerm Syntax.Capture -> Phantoms.TTerm Bool
-captureByReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-        Core.projectionField = (Core.Name "byReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-captureListCaptureByValue :: Phantoms.TTerm Syntax.CaptureList
-captureListCaptureByValue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.CaptureList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "captureByValue"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-captureListCaptures :: Phantoms.TTerm [Syntax.Capture] -> Phantoms.TTerm Syntax.CaptureList
-captureListCaptures x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.CaptureList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "captures"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-captureName :: Phantoms.TTerm Syntax.Capture -> Phantoms.TTerm String
-captureName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-captureWithByReference :: Phantoms.TTerm Syntax.Capture -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Capture
-captureWithByReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "byReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-captureWithName :: Phantoms.TTerm Syntax.Capture -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Capture
-captureWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "byReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Capture"),
-              Core.projectionField = (Core.Name "byReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseStatementCase :: Phantoms.TTerm Syntax.CaseValue -> Phantoms.TTerm Syntax.CaseStatement
-caseStatementCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.CaseStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseStatementDefault :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.CaseStatement
-caseStatementDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.CaseStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseValue :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.CaseValue
-caseValue value statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-caseValueStatement :: Phantoms.TTerm Syntax.CaseValue -> Phantoms.TTerm Syntax.Statement
-caseValueStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseValueValue :: Phantoms.TTerm Syntax.CaseValue -> Phantoms.TTerm Syntax.Expression
-caseValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseValueWithStatement :: Phantoms.TTerm Syntax.CaseValue -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.CaseValue
-caseValueWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseValueWithValue :: Phantoms.TTerm Syntax.CaseValue -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseValue
-caseValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CaseValue"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-characterLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.CharacterLiteral
-characterLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.CharacterLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-classBody :: Phantoms.TTerm [Syntax.MemberSpecification] -> Phantoms.TTerm Syntax.ClassBody
-classBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.ClassBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-classDeclaration :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm (Maybe Syntax.ClassBody) -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclaration specifier body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Phantoms.unTTerm specifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-classDeclarationBody :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.ClassBody)
-classDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationSpecifier :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassSpecifier
-classDeclarationSpecifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "specifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationWithBody :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.ClassBody) -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "specifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classDeclarationWithSpecifier :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithSpecifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classKeyClass :: Phantoms.TTerm Syntax.ClassKey
-classKeyClass =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ClassKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classKeyEnum :: Phantoms.TTerm Syntax.ClassKey
-classKeyEnum =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ClassKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classKeyEnumClass :: Phantoms.TTerm Syntax.ClassKey
-classKeyEnumClass =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ClassKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enumClass"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classKeyStruct :: Phantoms.TTerm Syntax.ClassKey
-classKeyStruct =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ClassKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classSpecifier :: Phantoms.TTerm Syntax.ClassKey -> Phantoms.TTerm String -> Phantoms.TTerm [Syntax.BaseSpecifier] -> Phantoms.TTerm Syntax.ClassSpecifier
-classSpecifier key name inheritance =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inheritance"),
-          Core.fieldTerm = (Phantoms.unTTerm inheritance)}]}))
-
-classSpecifierInheritance :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm [Syntax.BaseSpecifier]
-classSpecifierInheritance x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-        Core.projectionField = (Core.Name "inheritance")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classSpecifierKey :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm Syntax.ClassKey
-classSpecifierKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classSpecifierName :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm String
-classSpecifierName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classSpecifierWithInheritance :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm [Syntax.BaseSpecifier] -> Phantoms.TTerm Syntax.ClassSpecifier
-classSpecifierWithInheritance original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-      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.cpp.syntax.ClassSpecifier"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inheritance"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classSpecifierWithKey :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm Syntax.ClassKey -> Phantoms.TTerm Syntax.ClassSpecifier
-classSpecifierWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inheritance"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-              Core.projectionField = (Core.Name "inheritance")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classSpecifierWithName :: Phantoms.TTerm Syntax.ClassSpecifier -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ClassSpecifier
-classSpecifierWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-      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.cpp.syntax.ClassSpecifier"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inheritance"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ClassSpecifier"),
-              Core.projectionField = (Core.Name "inheritance")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commaExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.CommaExpression
-commaExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-commaExpressionLeft :: Phantoms.TTerm Syntax.CommaExpression -> Phantoms.TTerm Syntax.Expression
-commaExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commaExpressionRight :: Phantoms.TTerm Syntax.CommaExpression -> Phantoms.TTerm Syntax.AssignmentExpression
-commaExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commaExpressionWithLeft :: Phantoms.TTerm Syntax.CommaExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CommaExpression
-commaExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commaExpressionWithRight :: Phantoms.TTerm Syntax.CommaExpression -> Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.CommaExpression
-commaExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.CommaExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-comment :: Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Comment
-comment text isMultiline =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "text"),
-          Core.fieldTerm = (Phantoms.unTTerm text)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isMultiline"),
-          Core.fieldTerm = (Phantoms.unTTerm isMultiline)}]}))
-
-commentIsMultiline :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm Bool
-commentIsMultiline x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-        Core.projectionField = (Core.Name "isMultiline")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commentText :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm String
-commentText x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-        Core.projectionField = (Core.Name "text")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commentWithIsMultiline :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Comment
-commentWithIsMultiline original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "text"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-              Core.projectionField = (Core.Name "text")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isMultiline"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-commentWithText :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Comment
-commentWithText original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "text"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isMultiline"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Comment"),
-              Core.projectionField = (Core.Name "isMultiline")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundStatement :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.CompoundStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-conditionalExpressionLogicalOr :: Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionLogicalOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalOr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpressionTernary :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionTernary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ternary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constructorDeclaration :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm [Syntax.MemInitializer] -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclaration name parameters initializers body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializers"),
-          Core.fieldTerm = (Phantoms.unTTerm initializers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-constructorDeclarationBody :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.FunctionBody
-constructorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationInitializers :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.MemInitializer]
-constructorDeclarationInitializers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "initializers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationName :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm String
-constructorDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationParameters :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.Parameter]
-constructorDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationWithBody :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "initializers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorDeclarationWithInitializers :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.MemInitializer] -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithInitializers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarationWithName :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "initializers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarationWithParameters :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "initializers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-containerDeclarationList :: Phantoms.TTerm Syntax.ListDeclaration -> Phantoms.TTerm Syntax.ContainerDeclaration
-containerDeclarationList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ContainerDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-containerDeclarationMap :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm Syntax.ContainerDeclaration
-containerDeclarationMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ContainerDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-containerDeclarationOptional :: Phantoms.TTerm Syntax.OptionalDeclaration -> Phantoms.TTerm Syntax.ContainerDeclaration
-containerDeclarationOptional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ContainerDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "optional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-containerDeclarationSet :: Phantoms.TTerm Syntax.SetDeclaration -> Phantoms.TTerm Syntax.ContainerDeclaration
-containerDeclarationSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ContainerDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationFunction :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationNamespace :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "namespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationPreprocessor :: Phantoms.TTerm Syntax.PreprocessorDirective -> Phantoms.TTerm Syntax.Declaration
-declarationPreprocessor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preprocessor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationTemplate :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationTemplate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "template"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationTypedef :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationTypedef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typedef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationVariable :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defineDirective :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe [String]) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.DefineDirective
-defineDirective name parameters replacement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "replacement"),
-          Core.fieldTerm = (Phantoms.unTTerm replacement)}]}))
-
-defineDirectiveName :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm String
-defineDirectiveName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defineDirectiveParameters :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm (Maybe [String])
-defineDirectiveParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defineDirectiveReplacement :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm (Maybe String)
-defineDirectiveReplacement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-        Core.projectionField = (Core.Name "replacement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defineDirectiveWithName :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.DefineDirective
-defineDirectiveWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replacement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-              Core.projectionField = (Core.Name "replacement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defineDirectiveWithParameters :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm (Maybe [String]) -> Phantoms.TTerm Syntax.DefineDirective
-defineDirectiveWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "replacement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-              Core.projectionField = (Core.Name "replacement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defineDirectiveWithReplacement :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.DefineDirective
-defineDirectiveWithReplacement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DefineDirective"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replacement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-destructorDeclaration :: Phantoms.TTerm [Syntax.FunctionSpecifierPrefix] -> Phantoms.TTerm String -> Phantoms.TTerm [Syntax.FunctionSpecifierSuffix] -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.DestructorDeclaration
-destructorDeclaration prefixSpecifiers name suffixSpecifiers body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm prefixSpecifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm suffixSpecifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-destructorDeclarationBody :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm Syntax.FunctionBody
-destructorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destructorDeclarationName :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm String
-destructorDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destructorDeclarationPrefixSpecifiers :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierPrefix]
-destructorDeclarationPrefixSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-        Core.projectionField = (Core.Name "prefixSpecifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destructorDeclarationSuffixSpecifiers :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierSuffix]
-destructorDeclarationSuffixSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-        Core.projectionField = (Core.Name "suffixSpecifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destructorDeclarationWithBody :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.DestructorDeclaration
-destructorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-destructorDeclarationWithName :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.DestructorDeclaration
-destructorDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-destructorDeclarationWithPrefixSpecifiers :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierPrefix] -> Phantoms.TTerm Syntax.DestructorDeclaration
-destructorDeclarationWithPrefixSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-destructorDeclarationWithSuffixSpecifiers :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierSuffix] -> Phantoms.TTerm Syntax.DestructorDeclaration
-destructorDeclarationWithSuffixSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DestructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-divideOperation :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.DivideOperation
-divideOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-divideOperationLeft :: Phantoms.TTerm Syntax.DivideOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-divideOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-divideOperationRight :: Phantoms.TTerm Syntax.DivideOperation -> Phantoms.TTerm Syntax.UnaryExpression
-divideOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-divideOperationWithLeft :: Phantoms.TTerm Syntax.DivideOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.DivideOperation
-divideOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-divideOperationWithRight :: Phantoms.TTerm Syntax.DivideOperation -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.DivideOperation
-divideOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DivideOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-doStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DoStatement
-doStatement body condition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)}]}))
-
-doStatementBody :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.Statement
-doStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doStatementCondition :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.Expression
-doStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doStatementWithBody :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.DoStatement
-doStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-doStatementWithCondition :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DoStatement
-doStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.DoStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elifDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ElifDirective
-elifDirective condition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ElifDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)}]}))
-
-elifDirectiveCondition :: Phantoms.TTerm Syntax.ElifDirective -> Phantoms.TTerm String
-elifDirectiveCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ElifDirective"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elifDirectiveWithCondition :: Phantoms.TTerm Syntax.ElifDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ElifDirective
-elifDirectiveWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ElifDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-equalOperation :: Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualOperation
-equalOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-equalOperationLeft :: Phantoms.TTerm Syntax.EqualOperation -> Phantoms.TTerm Syntax.EqualityExpression
-equalOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equalOperationRight :: Phantoms.TTerm Syntax.EqualOperation -> Phantoms.TTerm Syntax.RelationalExpression
-equalOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equalOperationWithLeft :: Phantoms.TTerm Syntax.EqualOperation -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.EqualOperation
-equalOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equalOperationWithRight :: Phantoms.TTerm Syntax.EqualOperation -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualOperation
-equalOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.EqualOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-equalityExpressionEqual :: Phantoms.TTerm Syntax.EqualOperation -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityExpressionNotEqual :: Phantoms.TTerm Syntax.NotEqualOperation -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionNotEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityExpressionRelational :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionRelational x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "relational"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-errorDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ErrorDirective
-errorDirective message =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ErrorDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)}]}))
-
-errorDirectiveMessage :: Phantoms.TTerm Syntax.ErrorDirective -> Phantoms.TTerm String
-errorDirectiveMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ErrorDirective"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-errorDirectiveWithMessage :: Phantoms.TTerm Syntax.ErrorDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ErrorDirective
-errorDirectiveWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ErrorDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exclusiveOrExpressionAnd :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-exclusiveOrExpressionAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ExclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exclusiveOrExpressionBitwiseXor :: Phantoms.TTerm Syntax.BitwiseXorOperation -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-exclusiveOrExpressionBitwiseXor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ExclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-explicitAssignment :: Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.ExplicitAssignment
-explicitAssignment left op right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-explicitAssignmentLeft :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.LogicalOrExpression
-explicitAssignmentLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitAssignmentOp :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.AssignmentOperator
-explicitAssignmentOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitAssignmentRight :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.AssignmentExpression
-explicitAssignmentRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitAssignmentWithLeft :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.ExplicitAssignment
-explicitAssignmentWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitAssignmentWithOp :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.ExplicitAssignment
-explicitAssignmentWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitAssignmentWithRight :: Phantoms.TTerm Syntax.ExplicitAssignment -> Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.ExplicitAssignment
-explicitAssignmentWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ExplicitAssignment"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-expressionAssignment :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression
-expressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionComma :: Phantoms.TTerm Syntax.CommaExpression -> Phantoms.TTerm Syntax.Expression
-expressionComma x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "comma"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ExpressionStatement
-expressionStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.ExpressionStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-floatingLiteral :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.FloatingLiteral
-floatingLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.FloatingLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-forInitDeclaration :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.ForInit
-forInitDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInitEmpty :: Phantoms.TTerm Syntax.ForInit
-forInitEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-forInitExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForInit
-forInitExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forStatement :: Phantoms.TTerm Syntax.ForInit -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForStatement
-forStatement init condition increment body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Phantoms.unTTerm increment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forStatementBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Statement
-forStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementCondition :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Expression
-forStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementIncrement :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Expression
-forStatementIncrement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "increment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementInit :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.ForInit
-forStatementInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementWithBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "increment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStatementWithCondition :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "increment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithIncrement :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithIncrement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithInit :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.ForInit -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "increment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionApplication :: Phantoms.TTerm Syntax.FunctionIdentifier -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.FunctionApplication
-functionApplication function arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-functionApplicationArguments :: Phantoms.TTerm Syntax.FunctionApplication -> Phantoms.TTerm [Syntax.Expression]
-functionApplicationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionApplicationFunction :: Phantoms.TTerm Syntax.FunctionApplication -> Phantoms.TTerm Syntax.FunctionIdentifier
-functionApplicationFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionApplicationWithArguments :: Phantoms.TTerm Syntax.FunctionApplication -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.FunctionApplication
-functionApplicationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionApplicationWithFunction :: Phantoms.TTerm Syntax.FunctionApplication -> Phantoms.TTerm Syntax.FunctionIdentifier -> Phantoms.TTerm Syntax.FunctionApplication
-functionApplicationWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionApplication"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionBodyCompound :: Phantoms.TTerm Syntax.CompoundStatement -> Phantoms.TTerm Syntax.FunctionBody
-functionBodyCompound x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compound"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionBodyDeclaration :: Phantoms.TTerm Syntax.FunctionBody
-functionBodyDeclaration =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionBodyDefault :: Phantoms.TTerm Syntax.FunctionBody
-functionBodyDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionBodyPure :: Phantoms.TTerm Syntax.FunctionBody
-functionBodyPure =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pure"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionCallOperation :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.FunctionCallOperation
-functionCallOperation function arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-functionCallOperationArguments :: Phantoms.TTerm Syntax.FunctionCallOperation -> Phantoms.TTerm [Syntax.Expression]
-functionCallOperationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionCallOperationFunction :: Phantoms.TTerm Syntax.FunctionCallOperation -> Phantoms.TTerm Syntax.PostfixExpression
-functionCallOperationFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionCallOperationWithArguments :: Phantoms.TTerm Syntax.FunctionCallOperation -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.FunctionCallOperation
-functionCallOperationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionCallOperationWithFunction :: Phantoms.TTerm Syntax.FunctionCallOperation -> Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.FunctionCallOperation
-functionCallOperationWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionCallOperation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclaration :: Phantoms.TTerm [Syntax.FunctionSpecifierPrefix] -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm [Syntax.FunctionSpecifierSuffix] -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclaration prefixSpecifiers returnType name parameters suffixSpecifiers body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm prefixSpecifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm suffixSpecifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-functionDeclarationBody :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.FunctionBody
-functionDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationName :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm String
-functionDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationParameters :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.Parameter]
-functionDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationPrefixSpecifiers :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierPrefix]
-functionDeclarationPrefixSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "prefixSpecifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationReturnType :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-functionDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationSuffixSpecifiers :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierSuffix]
-functionDeclarationSuffixSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "suffixSpecifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationWithBody :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionDeclarationWithName :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithParameters :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithPrefixSpecifiers :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierPrefix] -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithPrefixSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithReturnType :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "suffixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithSuffixSpecifiers :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.FunctionSpecifierSuffix] -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithSuffixSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "prefixSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffixSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionIdentifierQualified :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm Syntax.FunctionIdentifier
-functionIdentifierQualified x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionIdentifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualified"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionIdentifierSimple :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.FunctionIdentifier
-functionIdentifierSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionIdentifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionSpecifierPrefixExplicit :: Phantoms.TTerm Syntax.FunctionSpecifierPrefix
-functionSpecifierPrefixExplicit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierPrefixInline :: Phantoms.TTerm Syntax.FunctionSpecifierPrefix
-functionSpecifierPrefixInline =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inline"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierPrefixStatic :: Phantoms.TTerm Syntax.FunctionSpecifierPrefix
-functionSpecifierPrefixStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierPrefixVirtual :: Phantoms.TTerm Syntax.FunctionSpecifierPrefix
-functionSpecifierPrefixVirtual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "virtual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierSuffixConst :: Phantoms.TTerm Syntax.FunctionSpecifierSuffix
-functionSpecifierSuffixConst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierSuffixFinal :: Phantoms.TTerm Syntax.FunctionSpecifierSuffix
-functionSpecifierSuffixFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierSuffixNoexcept :: Phantoms.TTerm Syntax.FunctionSpecifierSuffix
-functionSpecifierSuffixNoexcept =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noexcept"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionSpecifierSuffixOverride :: Phantoms.TTerm Syntax.FunctionSpecifierSuffix
-functionSpecifierSuffixOverride =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionSpecifierSuffix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "override"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-functionType :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm Syntax.FunctionType
-functionType returnType parameters =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)}]}))
-
-functionTypeParameters :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm [Syntax.Parameter]
-functionTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeReturnType :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.TypeExpression
-functionTypeReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeWithParameters :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm Syntax.FunctionType
-functionTypeWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionTypeWithReturnType :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.FunctionType
-functionTypeWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.FunctionType"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-greaterEqualOperation :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.GreaterEqualOperation
-greaterEqualOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-greaterEqualOperationLeft :: Phantoms.TTerm Syntax.GreaterEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression
-greaterEqualOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-greaterEqualOperationRight :: Phantoms.TTerm Syntax.GreaterEqualOperation -> Phantoms.TTerm Syntax.ShiftExpression
-greaterEqualOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-greaterEqualOperationWithLeft :: Phantoms.TTerm Syntax.GreaterEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.GreaterEqualOperation
-greaterEqualOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-greaterEqualOperationWithRight :: Phantoms.TTerm Syntax.GreaterEqualOperation -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.GreaterEqualOperation
-greaterEqualOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterEqualOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-greaterOperation :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.GreaterOperation
-greaterOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-greaterOperationLeft :: Phantoms.TTerm Syntax.GreaterOperation -> Phantoms.TTerm Syntax.RelationalExpression
-greaterOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-greaterOperationRight :: Phantoms.TTerm Syntax.GreaterOperation -> Phantoms.TTerm Syntax.ShiftExpression
-greaterOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-greaterOperationWithLeft :: Phantoms.TTerm Syntax.GreaterOperation -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.GreaterOperation
-greaterOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-greaterOperationWithRight :: Phantoms.TTerm Syntax.GreaterOperation -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.GreaterOperation
-greaterOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.GreaterOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IfDirective
-ifDirective condition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IfDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)}]}))
-
-ifDirectiveCondition :: Phantoms.TTerm Syntax.IfDirective -> Phantoms.TTerm String
-ifDirectiveCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IfDirective"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifDirectiveWithCondition :: Phantoms.TTerm Syntax.IfDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.IfDirective
-ifDirectiveWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IfDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifdefDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IfdefDirective
-ifdefDirective identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IfdefDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-ifdefDirectiveIdentifier :: Phantoms.TTerm Syntax.IfdefDirective -> Phantoms.TTerm String
-ifdefDirectiveIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IfdefDirective"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifdefDirectiveWithIdentifier :: Phantoms.TTerm Syntax.IfdefDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.IfdefDirective
-ifdefDirectiveWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IfdefDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifndefDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IfndefDirective
-ifndefDirective identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IfndefDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-ifndefDirectiveIdentifier :: Phantoms.TTerm Syntax.IfndefDirective -> Phantoms.TTerm String
-ifndefDirectiveIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IfndefDirective"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifndefDirectiveWithIdentifier :: Phantoms.TTerm Syntax.IfndefDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.IfndefDirective
-ifndefDirectiveWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IfndefDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-includeDirective :: Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IncludeDirective
-includeDirective name isSystem =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSystem"),
-          Core.fieldTerm = (Phantoms.unTTerm isSystem)}]}))
-
-includeDirectiveIsSystem :: Phantoms.TTerm Syntax.IncludeDirective -> Phantoms.TTerm Bool
-includeDirectiveIsSystem x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-        Core.projectionField = (Core.Name "isSystem")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-includeDirectiveName :: Phantoms.TTerm Syntax.IncludeDirective -> Phantoms.TTerm String
-includeDirectiveName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-includeDirectiveWithIsSystem :: Phantoms.TTerm Syntax.IncludeDirective -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IncludeDirective
-includeDirectiveWithIsSystem original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSystem"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-includeDirectiveWithName :: Phantoms.TTerm Syntax.IncludeDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.IncludeDirective
-includeDirectiveWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSystem"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.IncludeDirective"),
-              Core.projectionField = (Core.Name "isSystem")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inclusiveOrExpressionBitwiseOr :: Phantoms.TTerm Syntax.BitwiseOrOperation -> Phantoms.TTerm Syntax.InclusiveOrExpression
-inclusiveOrExpressionBitwiseOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.InclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inclusiveOrExpressionExclusiveOr :: Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression
-inclusiveOrExpressionExclusiveOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.InclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exclusiveOr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralBinary :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralDecimal :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralHexadecimal :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralHexadecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hexadecimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralOctal :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralOctal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "octal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementDo :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementDo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "do"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementFor :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementRangeFor :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementRangeFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rangeFor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementWhile :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-jumpStatementBreak :: Phantoms.TTerm Syntax.JumpStatement
-jumpStatementBreak =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-jumpStatementContinue :: Phantoms.TTerm Syntax.JumpStatement
-jumpStatementContinue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-jumpStatementReturnValue :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.JumpStatement
-jumpStatementReturnValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "returnValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-jumpStatementReturnVoid :: Phantoms.TTerm Syntax.JumpStatement
-jumpStatementReturnVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "returnVoid"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-jumpStatementThrow :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.JumpStatement
-jumpStatementThrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "throw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labeledStatement :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatement label statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-labeledStatementLabel :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm String
-labeledStatementLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementStatement :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-labeledStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementWithLabel :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledStatementWithStatement :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LabeledStatement"),
-      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.cpp.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaExpression :: Phantoms.TTerm Syntax.CaptureList -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.CompoundStatement -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpression captures parameters returnType body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "captures"),
-          Core.fieldTerm = (Phantoms.unTTerm captures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-lambdaExpressionBody :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.CompoundStatement
-lambdaExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionCaptures :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.CaptureList
-lambdaExpressionCaptures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "captures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionParameters :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm [Syntax.Parameter]
-lambdaExpressionParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionReturnType :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm (Maybe Syntax.TypeExpression)
-lambdaExpressionReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionWithBody :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.CompoundStatement -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "captures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "captures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaExpressionWithCaptures :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.CaptureList -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithCaptures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "captures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaExpressionWithParameters :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm [Syntax.Parameter] -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "captures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "captures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaExpressionWithReturnType :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "captures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "captures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-leftShiftOperation :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.LeftShiftOperation
-leftShiftOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-leftShiftOperationLeft :: Phantoms.TTerm Syntax.LeftShiftOperation -> Phantoms.TTerm Syntax.ShiftExpression
-leftShiftOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-leftShiftOperationRight :: Phantoms.TTerm Syntax.LeftShiftOperation -> Phantoms.TTerm Syntax.AdditiveExpression
-leftShiftOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-leftShiftOperationWithLeft :: Phantoms.TTerm Syntax.LeftShiftOperation -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.LeftShiftOperation
-leftShiftOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-leftShiftOperationWithRight :: Phantoms.TTerm Syntax.LeftShiftOperation -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.LeftShiftOperation
-leftShiftOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LeftShiftOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lessEqualOperation :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.LessEqualOperation
-lessEqualOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-lessEqualOperationLeft :: Phantoms.TTerm Syntax.LessEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression
-lessEqualOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lessEqualOperationRight :: Phantoms.TTerm Syntax.LessEqualOperation -> Phantoms.TTerm Syntax.ShiftExpression
-lessEqualOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lessEqualOperationWithLeft :: Phantoms.TTerm Syntax.LessEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.LessEqualOperation
-lessEqualOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lessEqualOperationWithRight :: Phantoms.TTerm Syntax.LessEqualOperation -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.LessEqualOperation
-lessEqualOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessEqualOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lessOperation :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.LessOperation
-lessOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-lessOperationLeft :: Phantoms.TTerm Syntax.LessOperation -> Phantoms.TTerm Syntax.RelationalExpression
-lessOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lessOperationRight :: Phantoms.TTerm Syntax.LessOperation -> Phantoms.TTerm Syntax.ShiftExpression
-lessOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lessOperationWithLeft :: Phantoms.TTerm Syntax.LessOperation -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.LessOperation
-lessOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lessOperationWithRight :: Phantoms.TTerm Syntax.LessOperation -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.LessOperation
-lessOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LessOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lineDirective :: Phantoms.TTerm Int -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.LineDirective
-lineDirective lineNumber filename =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lineNumber"),
-          Core.fieldTerm = (Phantoms.unTTerm lineNumber)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filename"),
-          Core.fieldTerm = (Phantoms.unTTerm filename)}]}))
-
-lineDirectiveFilename :: Phantoms.TTerm Syntax.LineDirective -> Phantoms.TTerm (Maybe String)
-lineDirectiveFilename x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-        Core.projectionField = (Core.Name "filename")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lineDirectiveLineNumber :: Phantoms.TTerm Syntax.LineDirective -> Phantoms.TTerm Int
-lineDirectiveLineNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-        Core.projectionField = (Core.Name "lineNumber")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lineDirectiveWithFilename :: Phantoms.TTerm Syntax.LineDirective -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.LineDirective
-lineDirectiveWithFilename original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lineNumber"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-              Core.projectionField = (Core.Name "lineNumber")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filename"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lineDirectiveWithLineNumber :: Phantoms.TTerm Syntax.LineDirective -> Phantoms.TTerm Int -> Phantoms.TTerm Syntax.LineDirective
-lineDirectiveWithLineNumber original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lineNumber"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filename"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LineDirective"),
-              Core.projectionField = (Core.Name "filename")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listDeclaration :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ListDeclaration
-listDeclaration elementType name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-listDeclarationElementType :: Phantoms.TTerm Syntax.ListDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-listDeclarationElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listDeclarationName :: Phantoms.TTerm Syntax.ListDeclaration -> Phantoms.TTerm String
-listDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listDeclarationWithElementType :: Phantoms.TTerm Syntax.ListDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.ListDeclaration
-listDeclarationWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listDeclarationWithName :: Phantoms.TTerm Syntax.ListDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ListDeclaration
-listDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ListDeclaration"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalBoolean :: Phantoms.TTerm Syntax.BooleanLiteral -> Phantoms.TTerm Syntax.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalCharacter :: Phantoms.TTerm Syntax.CharacterLiteral -> Phantoms.TTerm Syntax.Literal
-literalCharacter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "character"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalFloating :: Phantoms.TTerm Syntax.FloatingLiteral -> Phantoms.TTerm Syntax.Literal
-literalFloating x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floating"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalInteger :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Syntax.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNull :: Phantoms.TTerm Syntax.Literal
-literalNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalString :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalAndExpressionInclusiveOr :: Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.LogicalAndExpression
-logicalAndExpressionInclusiveOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inclusiveOr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalAndExpressionLogicalAnd :: Phantoms.TTerm Syntax.LogicalAndOperation -> Phantoms.TTerm Syntax.LogicalAndExpression
-logicalAndExpressionLogicalAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalAnd"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalAndOperation :: Phantoms.TTerm Syntax.LogicalAndExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.LogicalAndOperation
-logicalAndOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-logicalAndOperationLeft :: Phantoms.TTerm Syntax.LogicalAndOperation -> Phantoms.TTerm Syntax.LogicalAndExpression
-logicalAndOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalAndOperationRight :: Phantoms.TTerm Syntax.LogicalAndOperation -> Phantoms.TTerm Syntax.InclusiveOrExpression
-logicalAndOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalAndOperationWithLeft :: Phantoms.TTerm Syntax.LogicalAndOperation -> Phantoms.TTerm Syntax.LogicalAndExpression -> Phantoms.TTerm Syntax.LogicalAndOperation
-logicalAndOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logicalAndOperationWithRight :: Phantoms.TTerm Syntax.LogicalAndOperation -> Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.LogicalAndOperation
-logicalAndOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalAndOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-logicalOrExpressionLogicalAnd :: Phantoms.TTerm Syntax.LogicalAndExpression -> Phantoms.TTerm Syntax.LogicalOrExpression
-logicalOrExpressionLogicalAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalAnd"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalOrExpressionLogicalOr :: Phantoms.TTerm Syntax.LogicalOrOperation -> Phantoms.TTerm Syntax.LogicalOrExpression
-logicalOrExpressionLogicalOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalOr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalOrOperation :: Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.LogicalAndExpression -> Phantoms.TTerm Syntax.LogicalOrOperation
-logicalOrOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-logicalOrOperationLeft :: Phantoms.TTerm Syntax.LogicalOrOperation -> Phantoms.TTerm Syntax.LogicalOrExpression
-logicalOrOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalOrOperationRight :: Phantoms.TTerm Syntax.LogicalOrOperation -> Phantoms.TTerm Syntax.LogicalAndExpression
-logicalOrOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalOrOperationWithLeft :: Phantoms.TTerm Syntax.LogicalOrOperation -> Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.LogicalOrOperation
-logicalOrOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logicalOrOperationWithRight :: Phantoms.TTerm Syntax.LogicalOrOperation -> Phantoms.TTerm Syntax.LogicalAndExpression -> Phantoms.TTerm Syntax.LogicalOrOperation
-logicalOrOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.LogicalOrOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-map :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm [Syntax.MapEntry] -> Phantoms.TTerm Syntax.Map
-map keyType valueType entries =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm keyType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "entries"),
-          Core.fieldTerm = (Phantoms.unTTerm entries)}]}))
-
-mapDeclaration :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MapDeclaration
-mapDeclaration keyType valueType name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm keyType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-mapDeclarationKeyType :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-mapDeclarationKeyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-        Core.projectionField = (Core.Name "keyType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapDeclarationName :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm String
-mapDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapDeclarationValueType :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-mapDeclarationValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapDeclarationWithKeyType :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.MapDeclaration
-mapDeclarationWithKeyType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapDeclarationWithName :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MapDeclaration
-mapDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapDeclarationWithValueType :: Phantoms.TTerm Syntax.MapDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.MapDeclaration
-mapDeclarationWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapEntries :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm [Syntax.MapEntry]
-mapEntries x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-        Core.projectionField = (Core.Name "entries")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapEntry :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MapEntry
-mapEntry key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapEntry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-mapEntryKey :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression
-mapEntryKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapEntry"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapEntryValue :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression
-mapEntryValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MapEntry"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapEntryWithKey :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MapEntry
-mapEntryWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapEntry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cpp.syntax.MapEntry"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapEntryWithValue :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MapEntry
-mapEntryWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MapEntry"),
-      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.cpp.syntax.MapEntry"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapKeyType :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.TypeExpression
-mapKeyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-        Core.projectionField = (Core.Name "keyType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapValueType :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.TypeExpression
-mapValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapWithEntries :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm [Syntax.MapEntry] -> Phantoms.TTerm Syntax.Map
-mapWithEntries original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "entries"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapWithKeyType :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.Map
-mapWithKeyType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "entries"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-              Core.projectionField = (Core.Name "entries")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapWithValueType :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.Map
-mapWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "entries"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Map"),
-              Core.projectionField = (Core.Name "entries")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memInitializer :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MemInitializer
-memInitializer name arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-memInitializerArguments :: Phantoms.TTerm Syntax.MemInitializer -> Phantoms.TTerm [Syntax.Expression]
-memInitializerArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memInitializerName :: Phantoms.TTerm Syntax.MemInitializer -> Phantoms.TTerm String
-memInitializerName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memInitializerWithArguments :: Phantoms.TTerm Syntax.MemInitializer -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MemInitializer
-memInitializerWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-memInitializerWithName :: Phantoms.TTerm Syntax.MemInitializer -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MemInitializer
-memInitializerWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemInitializer"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberAccessOperation :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MemberAccessOperation
-memberAccessOperation object member =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm member)}]}))
-
-memberAccessOperationMember :: Phantoms.TTerm Syntax.MemberAccessOperation -> Phantoms.TTerm String
-memberAccessOperationMember x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-        Core.projectionField = (Core.Name "member")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberAccessOperationObject :: Phantoms.TTerm Syntax.MemberAccessOperation -> Phantoms.TTerm Syntax.PostfixExpression
-memberAccessOperationObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberAccessOperationWithMember :: Phantoms.TTerm Syntax.MemberAccessOperation -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MemberAccessOperation
-memberAccessOperationWithMember original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-memberAccessOperationWithObject :: Phantoms.TTerm Syntax.MemberAccessOperation -> Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.MemberAccessOperation
-memberAccessOperationWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MemberAccessOperation"),
-              Core.projectionField = (Core.Name "member")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberDeclarationConstructor :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.MemberDeclaration
-memberDeclarationConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclarationDestructor :: Phantoms.TTerm Syntax.DestructorDeclaration -> Phantoms.TTerm Syntax.MemberDeclaration
-memberDeclarationDestructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "destructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclarationFunction :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.MemberDeclaration
-memberDeclarationFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclarationNestedClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.MemberDeclaration
-memberDeclarationNestedClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nestedClass"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclarationTemplate :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm Syntax.MemberDeclaration
-memberDeclarationTemplate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "template"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclarationVariable :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.MemberDeclaration
-memberDeclarationVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberSpecificationAccessLabel :: Phantoms.TTerm Syntax.AccessSpecifier -> Phantoms.TTerm Syntax.MemberSpecification
-memberSpecificationAccessLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "accessLabel"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberSpecificationMember :: Phantoms.TTerm Syntax.MemberDeclaration -> Phantoms.TTerm Syntax.MemberSpecification
-memberSpecificationMember x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MemberSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "member"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduloOperation :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.ModuloOperation
-moduloOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-moduloOperationLeft :: Phantoms.TTerm Syntax.ModuloOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-moduloOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduloOperationRight :: Phantoms.TTerm Syntax.ModuloOperation -> Phantoms.TTerm Syntax.UnaryExpression
-moduloOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduloOperationWithLeft :: Phantoms.TTerm Syntax.ModuloOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.ModuloOperation
-moduloOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduloOperationWithRight :: Phantoms.TTerm Syntax.ModuloOperation -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.ModuloOperation
-moduloOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ModuloOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiplicativeExpressionDivide :: Phantoms.TTerm Syntax.DivideOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionDivide x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionModulo :: Phantoms.TTerm Syntax.ModuloOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionModulo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulo"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionMultiply :: Phantoms.TTerm Syntax.MultiplyOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionMultiply x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionUnary :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplyOperation :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplyOperation
-multiplyOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-multiplyOperationLeft :: Phantoms.TTerm Syntax.MultiplyOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplyOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplyOperationRight :: Phantoms.TTerm Syntax.MultiplyOperation -> Phantoms.TTerm Syntax.UnaryExpression
-multiplyOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplyOperationWithLeft :: Phantoms.TTerm Syntax.MultiplyOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplyOperation
-multiplyOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiplyOperationWithRight :: Phantoms.TTerm Syntax.MultiplyOperation -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplyOperation
-multiplyOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.MultiplyOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namespaceDeclaration :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.Declaration] -> Phantoms.TTerm Syntax.NamespaceDeclaration
-namespaceDeclaration name declarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))
-
-namespaceDeclarationDeclarations :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm [Syntax.Declaration]
-namespaceDeclarationDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-        Core.projectionField = (Core.Name "declarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceDeclarationName :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm String
-namespaceDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceDeclarationWithDeclarations :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm [Syntax.Declaration] -> Phantoms.TTerm Syntax.NamespaceDeclaration
-namespaceDeclarationWithDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namespaceDeclarationWithName :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.NamespaceDeclaration
-namespaceDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NamespaceDeclaration"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-notEqualOperation :: Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.NotEqualOperation
-notEqualOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-notEqualOperationLeft :: Phantoms.TTerm Syntax.NotEqualOperation -> Phantoms.TTerm Syntax.EqualityExpression
-notEqualOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notEqualOperationRight :: Phantoms.TTerm Syntax.NotEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression
-notEqualOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notEqualOperationWithLeft :: Phantoms.TTerm Syntax.NotEqualOperation -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.NotEqualOperation
-notEqualOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-notEqualOperationWithRight :: Phantoms.TTerm Syntax.NotEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.NotEqualOperation
-notEqualOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.NotEqualOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optional :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Optional
-optional valueType value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Optional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-optionalDeclaration :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.OptionalDeclaration
-optionalDeclaration valueType name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-optionalDeclarationName :: Phantoms.TTerm Syntax.OptionalDeclaration -> Phantoms.TTerm String
-optionalDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalDeclarationValueType :: Phantoms.TTerm Syntax.OptionalDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-optionalDeclarationValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalDeclarationWithName :: Phantoms.TTerm Syntax.OptionalDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.OptionalDeclaration
-optionalDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optionalDeclarationWithValueType :: Phantoms.TTerm Syntax.OptionalDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.OptionalDeclaration
-optionalDeclarationWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.OptionalDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optionalValue :: Phantoms.TTerm Syntax.Optional -> Phantoms.TTerm (Maybe Syntax.Expression)
-optionalValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Optional"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalValueType :: Phantoms.TTerm Syntax.Optional -> Phantoms.TTerm Syntax.TypeExpression
-optionalValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Optional"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalWithValue :: Phantoms.TTerm Syntax.Optional -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Optional
-optionalWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Optional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Optional"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optionalWithValueType :: Phantoms.TTerm Syntax.Optional -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.Optional
-optionalWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Optional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cpp.syntax.Optional"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-overloadedLambdas :: Phantoms.TTerm [Syntax.LambdaExpression] -> Phantoms.TTerm Syntax.OverloadedLambdas
-overloadedLambdas x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.OverloadedLambdas"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-parameter :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Parameter
-parameter type_ name unnamed defaultValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unnamed"),
-          Core.fieldTerm = (Phantoms.unTTerm unnamed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultValue)}]}))
-
-parameterDefaultValue :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm (Maybe Syntax.Expression)
-parameterDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-        Core.projectionField = (Core.Name "defaultValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterName :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm String
-parameterName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterType :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm Syntax.TypeExpression
-parameterType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterUnnamed :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm Bool
-parameterUnnamed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-        Core.projectionField = (Core.Name "unnamed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterWithDefaultValue :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Parameter
-parameterWithDefaultValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unnamed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "unnamed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parameterWithName :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Parameter
-parameterWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unnamed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "unnamed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterWithType :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.Parameter
-parameterWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unnamed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "unnamed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterWithUnnamed :: Phantoms.TTerm Syntax.Parameter -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Parameter
-parameterWithUnnamed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unnamed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Parameter"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternMatch :: Phantoms.TTerm Syntax.Visitor -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PatternMatch
-patternMatch visitor variant =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "visitor"),
-          Core.fieldTerm = (Phantoms.unTTerm visitor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm variant)}]}))
-
-patternMatchVariant :: Phantoms.TTerm Syntax.PatternMatch -> Phantoms.TTerm Syntax.Expression
-patternMatchVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-        Core.projectionField = (Core.Name "variant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternMatchVisitor :: Phantoms.TTerm Syntax.PatternMatch -> Phantoms.TTerm Syntax.Visitor
-patternMatchVisitor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-        Core.projectionField = (Core.Name "visitor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternMatchWithVariant :: Phantoms.TTerm Syntax.PatternMatch -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PatternMatch
-patternMatchWithVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "visitor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-              Core.projectionField = (Core.Name "visitor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternMatchWithVisitor :: Phantoms.TTerm Syntax.PatternMatch -> Phantoms.TTerm Syntax.Visitor -> Phantoms.TTerm Syntax.PatternMatch
-patternMatchWithVisitor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "visitor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PatternMatch"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pointerMemberAccessOperation :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.PointerMemberAccessOperation
-pointerMemberAccessOperation pointer member =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm pointer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm member)}]}))
-
-pointerMemberAccessOperationMember :: Phantoms.TTerm Syntax.PointerMemberAccessOperation -> Phantoms.TTerm String
-pointerMemberAccessOperationMember x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-        Core.projectionField = (Core.Name "member")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerMemberAccessOperationPointer :: Phantoms.TTerm Syntax.PointerMemberAccessOperation -> Phantoms.TTerm Syntax.PostfixExpression
-pointerMemberAccessOperationPointer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-        Core.projectionField = (Core.Name "pointer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerMemberAccessOperationWithMember :: Phantoms.TTerm Syntax.PointerMemberAccessOperation -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.PointerMemberAccessOperation
-pointerMemberAccessOperationWithMember original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-              Core.projectionField = (Core.Name "pointer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pointerMemberAccessOperationWithPointer :: Phantoms.TTerm Syntax.PointerMemberAccessOperation -> Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.PointerMemberAccessOperation
-pointerMemberAccessOperationWithPointer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PointerMemberAccessOperation"),
-              Core.projectionField = (Core.Name "member")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-postfixExpressionFunctionCall :: Phantoms.TTerm Syntax.FunctionCallOperation -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionFunctionCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionCall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionMemberAccess :: Phantoms.TTerm Syntax.MemberAccessOperation -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "memberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPointerMemberAccess :: Phantoms.TTerm Syntax.PointerMemberAccessOperation -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPointerMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointerMemberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPostDecrement :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPostDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPostIncrement :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPostIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPrimary :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionSubscript :: Phantoms.TTerm Syntax.SubscriptOperation -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionSubscript x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subscript"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionTemplateFunctionCall :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionTemplateFunctionCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "templateFunctionCall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pragmaDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PragmaDirective
-pragmaDirective content =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PragmaDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "content"),
-          Core.fieldTerm = (Phantoms.unTTerm content)}]}))
-
-pragmaDirectiveContent :: Phantoms.TTerm Syntax.PragmaDirective -> Phantoms.TTerm String
-pragmaDirectiveContent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.PragmaDirective"),
-        Core.projectionField = (Core.Name "content")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pragmaDirectiveWithContent :: Phantoms.TTerm Syntax.PragmaDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.PragmaDirective
-pragmaDirectiveWithContent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.PragmaDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "content"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-preprocessorDirectiveDefine :: Phantoms.TTerm Syntax.DefineDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveDefine x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "define"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveElif :: Phantoms.TTerm Syntax.ElifDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveElif x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elif"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveElse :: Phantoms.TTerm Syntax.ElseDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveElse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "else"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveEndif :: Phantoms.TTerm Syntax.EndifDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveEndif x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endif"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveError :: Phantoms.TTerm Syntax.ErrorDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveError x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "error"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveIf :: Phantoms.TTerm Syntax.IfDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveIfdef :: Phantoms.TTerm Syntax.IfdefDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveIfdef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ifdef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveIfndef :: Phantoms.TTerm Syntax.IfndefDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveIfndef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ifndef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveInclude :: Phantoms.TTerm Syntax.IncludeDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveInclude x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "include"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveLine :: Phantoms.TTerm Syntax.LineDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveLine x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "line"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectivePragma :: Phantoms.TTerm Syntax.PragmaDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectivePragma x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pragma"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveUndef :: Phantoms.TTerm Syntax.UndefDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveUndef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preprocessorDirectiveWarning :: Phantoms.TTerm Syntax.WarningDirective -> Phantoms.TTerm Syntax.PreprocessorDirective
-preprocessorDirectiveWarning x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PreprocessorDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "warning"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExpressionIdentifier :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PrimaryExpression
-primaryExpressionIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PrimaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExpressionLambda :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.PrimaryExpression
-primaryExpressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PrimaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExpressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.PrimaryExpression
-primaryExpressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PrimaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExpressionParenthesized :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrimaryExpression
-primaryExpressionParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.PrimaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-productDeclaration :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.VariableDeclaration] -> Phantoms.TTerm Syntax.ProductDeclaration
-productDeclaration name fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-
-productDeclarationFields :: Phantoms.TTerm Syntax.ProductDeclaration -> Phantoms.TTerm [Syntax.VariableDeclaration]
-productDeclarationFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-productDeclarationName :: Phantoms.TTerm Syntax.ProductDeclaration -> Phantoms.TTerm String
-productDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-productDeclarationWithFields :: Phantoms.TTerm Syntax.ProductDeclaration -> Phantoms.TTerm [Syntax.VariableDeclaration] -> Phantoms.TTerm Syntax.ProductDeclaration
-productDeclarationWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-productDeclarationWithName :: Phantoms.TTerm Syntax.ProductDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ProductDeclaration
-productDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.ProductDeclaration"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-program :: Phantoms.TTerm [Syntax.PreprocessorDirective] -> Phantoms.TTerm [Syntax.IncludeDirective] -> Phantoms.TTerm [Syntax.Declaration] -> Phantoms.TTerm Syntax.Program
-program preprocessorDirectives includes declarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "preprocessorDirectives"),
-          Core.fieldTerm = (Phantoms.unTTerm preprocessorDirectives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Phantoms.unTTerm includes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))
-
-programDeclarations :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.Declaration]
-programDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-        Core.projectionField = (Core.Name "declarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programIncludes :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.IncludeDirective]
-programIncludes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-        Core.projectionField = (Core.Name "includes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programPreprocessorDirectives :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.PreprocessorDirective]
-programPreprocessorDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-        Core.projectionField = (Core.Name "preprocessorDirectives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programWithDeclarations :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.Declaration] -> Phantoms.TTerm Syntax.Program
-programWithDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "preprocessorDirectives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-              Core.projectionField = (Core.Name "preprocessorDirectives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-              Core.projectionField = (Core.Name "includes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-programWithIncludes :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.IncludeDirective] -> Phantoms.TTerm Syntax.Program
-programWithIncludes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "preprocessorDirectives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-              Core.projectionField = (Core.Name "preprocessorDirectives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-programWithPreprocessorDirectives :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.PreprocessorDirective] -> Phantoms.TTerm Syntax.Program
-programWithPreprocessorDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "preprocessorDirectives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-              Core.projectionField = (Core.Name "includes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Program"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedIdentifier :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.QualifiedIdentifier
-qualifiedIdentifier namespace name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-qualifiedIdentifierName :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm String
-qualifiedIdentifierName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedIdentifierNamespace :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm String
-qualifiedIdentifierNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedIdentifierWithName :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.QualifiedIdentifier
-qualifiedIdentifierWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedIdentifierWithNamespace :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.QualifiedIdentifier
-qualifiedIdentifierWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedIdentifier"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedType :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TypeQualifier -> Phantoms.TTerm Syntax.QualifiedType
-qualifiedType baseType qualifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "baseType"),
-          Core.fieldTerm = (Phantoms.unTTerm baseType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)}]}))
-
-qualifiedTypeBaseType :: Phantoms.TTerm Syntax.QualifiedType -> Phantoms.TTerm Syntax.TypeExpression
-qualifiedTypeBaseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-        Core.projectionField = (Core.Name "baseType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedTypeQualifier :: Phantoms.TTerm Syntax.QualifiedType -> Phantoms.TTerm Syntax.TypeQualifier
-qualifiedTypeQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedTypeWithBaseType :: Phantoms.TTerm Syntax.QualifiedType -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.QualifiedType
-qualifiedTypeWithBaseType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "baseType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedTypeWithQualifier :: Phantoms.TTerm Syntax.QualifiedType -> Phantoms.TTerm Syntax.TypeQualifier -> Phantoms.TTerm Syntax.QualifiedType
-qualifiedTypeWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "baseType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.QualifiedType"),
-              Core.projectionField = (Core.Name "baseType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeForStatement :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.RangeForStatement
-rangeForStatement type_ variable range body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-rangeForStatementBody :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.Statement
-rangeForStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeForStatementRange :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.Expression
-rangeForStatementRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeForStatementType :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.TypeExpression
-rangeForStatementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeForStatementVariable :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm String
-rangeForStatementVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeForStatementWithBody :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.RangeForStatement
-rangeForStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeForStatementWithRange :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RangeForStatement
-rangeForStatementWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeForStatementWithType :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.RangeForStatement
-rangeForStatementWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeForStatementWithVariable :: Phantoms.TTerm Syntax.RangeForStatement -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.RangeForStatement
-rangeForStatementWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RangeForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpressionGreater :: Phantoms.TTerm Syntax.GreaterOperation -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionGreater x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greater"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionGreaterEqual :: Phantoms.TTerm Syntax.GreaterEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionGreaterEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionLess :: Phantoms.TTerm Syntax.LessOperation -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionLess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "less"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionLessEqual :: Phantoms.TTerm Syntax.LessEqualOperation -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionLessEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionShift :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionShift x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shift"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rightShiftOperation :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.RightShiftOperation
-rightShiftOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-rightShiftOperationLeft :: Phantoms.TTerm Syntax.RightShiftOperation -> Phantoms.TTerm Syntax.ShiftExpression
-rightShiftOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rightShiftOperationRight :: Phantoms.TTerm Syntax.RightShiftOperation -> Phantoms.TTerm Syntax.AdditiveExpression
-rightShiftOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rightShiftOperationWithLeft :: Phantoms.TTerm Syntax.RightShiftOperation -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RightShiftOperation
-rightShiftOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rightShiftOperationWithRight :: Phantoms.TTerm Syntax.RightShiftOperation -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.RightShiftOperation
-rightShiftOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.RightShiftOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectionStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm (Maybe Syntax.Statement) -> Phantoms.TTerm Syntax.SelectionStatement
-selectionStatement condition thenBranch elseBranch =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm thenBranch)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm elseBranch)}]}))
-
-selectionStatementCondition :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm Syntax.Expression
-selectionStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectionStatementElseBranch :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm (Maybe Syntax.Statement)
-selectionStatementElseBranch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-        Core.projectionField = (Core.Name "elseBranch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectionStatementThenBranch :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm Syntax.Statement
-selectionStatementThenBranch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-        Core.projectionField = (Core.Name "thenBranch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectionStatementWithCondition :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SelectionStatement
-selectionStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-              Core.projectionField = (Core.Name "thenBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-              Core.projectionField = (Core.Name "elseBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectionStatementWithElseBranch :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm (Maybe Syntax.Statement) -> Phantoms.TTerm Syntax.SelectionStatement
-selectionStatementWithElseBranch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-              Core.projectionField = (Core.Name "thenBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectionStatementWithThenBranch :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.SelectionStatement
-selectionStatementWithThenBranch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SelectionStatement"),
-              Core.projectionField = (Core.Name "elseBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-set :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Set
-set elementType elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-setDeclaration :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.SetDeclaration
-setDeclaration elementType name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-setDeclarationElementType :: Phantoms.TTerm Syntax.SetDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-setDeclarationElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setDeclarationName :: Phantoms.TTerm Syntax.SetDeclaration -> Phantoms.TTerm String
-setDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setDeclarationWithElementType :: Phantoms.TTerm Syntax.SetDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.SetDeclaration
-setDeclarationWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setDeclarationWithName :: Phantoms.TTerm Syntax.SetDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.SetDeclaration
-setDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SetDeclaration"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-setElementType :: Phantoms.TTerm Syntax.Set -> Phantoms.TTerm Syntax.TypeExpression
-setElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setElements :: Phantoms.TTerm Syntax.Set -> Phantoms.TTerm [Syntax.Expression]
-setElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setWithElementType :: Phantoms.TTerm Syntax.Set -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.Set
-setWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setWithElements :: Phantoms.TTerm Syntax.Set -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Set
-setWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Set"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shiftExpressionAdditive :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionAdditive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "additive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionLeftShift :: Phantoms.TTerm Syntax.LeftShiftOperation -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionLeftShift x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShift"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionRightShift :: Phantoms.TTerm Syntax.RightShiftOperation -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionRightShift x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShift"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sizeofExpression :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.SizeofExpression
-sizeofExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.SizeofExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-statementCompound :: Phantoms.TTerm Syntax.CompoundStatement -> Phantoms.TTerm Syntax.Statement
-statementCompound x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compound"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementDeclaration :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.Statement
-statementDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement
-statementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementIteration :: Phantoms.TTerm Syntax.IterationStatement -> Phantoms.TTerm Syntax.Statement
-statementIteration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iteration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementJump :: Phantoms.TTerm Syntax.JumpStatement -> Phantoms.TTerm Syntax.Statement
-statementJump x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "jump"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLabeled :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-statementLabeled x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeled"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSelection :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm Syntax.Statement
-statementSelection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "selection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSwitch :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Statement
-statementSwitch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "switch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteral
-stringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cpp.syntax.StringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-subscriptOperation :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SubscriptOperation
-subscriptOperation array index =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm array)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm index)}]}))
-
-subscriptOperationArray :: Phantoms.TTerm Syntax.SubscriptOperation -> Phantoms.TTerm Syntax.PostfixExpression
-subscriptOperationArray x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-        Core.projectionField = (Core.Name "array")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subscriptOperationIndex :: Phantoms.TTerm Syntax.SubscriptOperation -> Phantoms.TTerm Syntax.Expression
-subscriptOperationIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-        Core.projectionField = (Core.Name "index")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subscriptOperationWithArray :: Phantoms.TTerm Syntax.SubscriptOperation -> Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.SubscriptOperation
-subscriptOperationWithArray original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-              Core.projectionField = (Core.Name "index")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subscriptOperationWithIndex :: Phantoms.TTerm Syntax.SubscriptOperation -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SubscriptOperation
-subscriptOperationWithIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubscriptOperation"),
-              Core.projectionField = (Core.Name "array")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subtractOperation :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.SubtractOperation
-subtractOperation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-subtractOperationLeft :: Phantoms.TTerm Syntax.SubtractOperation -> Phantoms.TTerm Syntax.AdditiveExpression
-subtractOperationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subtractOperationRight :: Phantoms.TTerm Syntax.SubtractOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression
-subtractOperationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subtractOperationWithLeft :: Phantoms.TTerm Syntax.SubtractOperation -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.SubtractOperation
-subtractOperationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subtractOperationWithRight :: Phantoms.TTerm Syntax.SubtractOperation -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.SubtractOperation
-subtractOperationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SubtractOperation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.CaseStatement] -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatement value cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-switchStatementCases :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm [Syntax.CaseStatement]
-switchStatementCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementValue :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression
-switchStatementValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementWithCases :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm [Syntax.CaseStatement] -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchStatementWithValue :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateArgumentType :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TemplateArgument
-templateArgumentType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-templateArgumentValue :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TemplateArgument
-templateArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-templateDeclaration :: Phantoms.TTerm Bool -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm Syntax.TemplateDeclaration
-templateDeclaration inline parameters declaration =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inline"),
-          Core.fieldTerm = (Phantoms.unTTerm inline)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Phantoms.unTTerm declaration)}]}))
-
-templateDeclarationDeclaration :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm Syntax.Declaration
-templateDeclarationDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-        Core.projectionField = (Core.Name "declaration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateDeclarationInline :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm Bool
-templateDeclarationInline x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-        Core.projectionField = (Core.Name "inline")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateDeclarationParameters :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm [String]
-templateDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateDeclarationWithDeclaration :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm Syntax.TemplateDeclaration
-templateDeclarationWithDeclaration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inline"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-              Core.projectionField = (Core.Name "inline")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-templateDeclarationWithInline :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TemplateDeclaration
-templateDeclarationWithInline original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inline"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-              Core.projectionField = (Core.Name "declaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateDeclarationWithParameters :: Phantoms.TTerm Syntax.TemplateDeclaration -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.TemplateDeclaration
-templateDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inline"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-              Core.projectionField = (Core.Name "inline")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateDeclaration"),
-              Core.projectionField = (Core.Name "declaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateFunctionCallOperation :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm [Syntax.TemplateArgument] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.TemplateFunctionCallOperation
-templateFunctionCallOperation function templateArguments arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "templateArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm templateArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-templateFunctionCallOperationArguments :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm [Syntax.Expression]
-templateFunctionCallOperationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateFunctionCallOperationFunction :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm Syntax.PostfixExpression
-templateFunctionCallOperationFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateFunctionCallOperationTemplateArguments :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm [Syntax.TemplateArgument]
-templateFunctionCallOperationTemplateArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-        Core.projectionField = (Core.Name "templateArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateFunctionCallOperationWithArguments :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.TemplateFunctionCallOperation
-templateFunctionCallOperationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "templateArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-              Core.projectionField = (Core.Name "templateArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-templateFunctionCallOperationWithFunction :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.TemplateFunctionCallOperation
-templateFunctionCallOperationWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "templateArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-              Core.projectionField = (Core.Name "templateArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateFunctionCallOperationWithTemplateArguments :: Phantoms.TTerm Syntax.TemplateFunctionCallOperation -> Phantoms.TTerm [Syntax.TemplateArgument] -> Phantoms.TTerm Syntax.TemplateFunctionCallOperation
-templateFunctionCallOperationWithTemplateArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "templateArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateFunctionCallOperation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateType :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.TemplateArgument] -> Phantoms.TTerm Syntax.TemplateType
-templateType name arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-templateTypeArguments :: Phantoms.TTerm Syntax.TemplateType -> Phantoms.TTerm [Syntax.TemplateArgument]
-templateTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateTypeName :: Phantoms.TTerm Syntax.TemplateType -> Phantoms.TTerm String
-templateTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateTypeWithArguments :: Phantoms.TTerm Syntax.TemplateType -> Phantoms.TTerm [Syntax.TemplateArgument] -> Phantoms.TTerm Syntax.TemplateType
-templateTypeWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-templateTypeWithName :: Phantoms.TTerm Syntax.TemplateType -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TemplateType
-templateTypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TemplateType"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ternaryExpression :: Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.TernaryExpression
-ternaryExpression condition trueExpr falseExpr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trueExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm trueExpr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "falseExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm falseExpr)}]}))
-
-ternaryExpressionCondition :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.LogicalOrExpression
-ternaryExpressionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ternaryExpressionFalseExpr :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-ternaryExpressionFalseExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-        Core.projectionField = (Core.Name "falseExpr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ternaryExpressionTrueExpr :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.Expression
-ternaryExpressionTrueExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-        Core.projectionField = (Core.Name "trueExpr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ternaryExpressionWithCondition :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.LogicalOrExpression -> Phantoms.TTerm Syntax.TernaryExpression
-ternaryExpressionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trueExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-              Core.projectionField = (Core.Name "trueExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "falseExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-              Core.projectionField = (Core.Name "falseExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ternaryExpressionWithFalseExpr :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.TernaryExpression
-ternaryExpressionWithFalseExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trueExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-              Core.projectionField = (Core.Name "trueExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "falseExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ternaryExpressionWithTrueExpr :: Phantoms.TTerm Syntax.TernaryExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TernaryExpression
-ternaryExpressionWithTrueExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trueExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "falseExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TernaryExpression"),
-              Core.projectionField = (Core.Name "falseExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeExpressionAuto :: Phantoms.TTerm Syntax.TypeExpression
-typeExpressionAuto =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "auto"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeExpressionBasic :: Phantoms.TTerm Syntax.BasicType -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionBasic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "basic"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionFunction :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionQualified :: Phantoms.TTerm Syntax.QualifiedType -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionQualified x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualified"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionTemplate :: Phantoms.TTerm Syntax.TemplateType -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionTemplate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "template"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeQualifierConst :: Phantoms.TTerm Syntax.TypeQualifier
-typeQualifierConst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeQualifierLvalueRef :: Phantoms.TTerm Syntax.TypeQualifier
-typeQualifierLvalueRef =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lvalueRef"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeQualifierPointer :: Phantoms.TTerm Syntax.TypeQualifier
-typeQualifierPointer =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeQualifierRvalueRef :: Phantoms.TTerm Syntax.TypeQualifier
-typeQualifierRvalueRef =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.TypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rvalueRef"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typedefDeclaration :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypedefDeclaration
-typedefDeclaration name type_ isUsing =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUsing"),
-          Core.fieldTerm = (Phantoms.unTTerm isUsing)}]}))
-
-typedefDeclarationIsUsing :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm Bool
-typedefDeclarationIsUsing x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-        Core.projectionField = (Core.Name "isUsing")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedefDeclarationName :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm String
-typedefDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedefDeclarationType :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm Syntax.TypeExpression
-typedefDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedefDeclarationWithIsUsing :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypedefDeclaration
-typedefDeclarationWithIsUsing original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUsing"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typedefDeclarationWithName :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TypedefDeclaration
-typedefDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUsing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-              Core.projectionField = (Core.Name "isUsing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedefDeclarationWithType :: Phantoms.TTerm Syntax.TypedefDeclaration -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TypedefDeclaration
-typedefDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isUsing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.TypedefDeclaration"),
-              Core.projectionField = (Core.Name "isUsing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unBooleanLiteral :: Phantoms.TTerm Syntax.BooleanLiteral -> Phantoms.TTerm Bool
-unBooleanLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.BooleanLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCharacterLiteral :: Phantoms.TTerm Syntax.CharacterLiteral -> Phantoms.TTerm String
-unCharacterLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.CharacterLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unClassBody :: Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm [Syntax.MemberSpecification]
-unClassBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.ClassBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCompoundStatement :: Phantoms.TTerm Syntax.CompoundStatement -> Phantoms.TTerm [Syntax.Statement]
-unCompoundStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.CompoundStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExpressionStatement :: Phantoms.TTerm Syntax.ExpressionStatement -> Phantoms.TTerm Syntax.Expression
-unExpressionStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.ExpressionStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFloatingLiteral :: Phantoms.TTerm Syntax.FloatingLiteral -> Phantoms.TTerm Double
-unFloatingLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.FloatingLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unOverloadedLambdas :: Phantoms.TTerm Syntax.OverloadedLambdas -> Phantoms.TTerm [Syntax.LambdaExpression]
-unOverloadedLambdas x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.OverloadedLambdas")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSizeofExpression :: Phantoms.TTerm Syntax.SizeofExpression -> Phantoms.TTerm Syntax.TypeExpression
-unSizeofExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.SizeofExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteral :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm String
-unStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cpp.syntax.StringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionPostfix :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPostfix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postfix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionSizeof :: Phantoms.TTerm Syntax.SizeofExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionSizeof x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sizeof"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionUnaryOp :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionUnaryOp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unaryOp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryOperation :: Phantoms.TTerm Syntax.UnaryOperator -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryOperation
-unaryOperation operator operand =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)}]}))
-
-unaryOperationOperand :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryExpression
-unaryOperationOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperationOperator :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryOperator
-unaryOperationOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperationWithOperand :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryOperation
-unaryOperationWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryOperationWithOperator :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryOperator -> Phantoms.TTerm Syntax.UnaryOperation
-unaryOperationWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperation"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryOperatorAddressOf :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorAddressOf =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addressOf"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorBitwiseNot :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorBitwiseNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseNot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorDereference :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorDereference =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dereference"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorLogicalNot :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorLogicalNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logicalNot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorMinus :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorPlus :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorPreDecrement :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorPreDecrement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preDecrement"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorPreIncrement :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorPreIncrement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preIncrement"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-undefDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.UndefDirective
-undefDirective name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.UndefDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-undefDirectiveName :: Phantoms.TTerm Syntax.UndefDirective -> Phantoms.TTerm String
-undefDirectiveName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.UndefDirective"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-undefDirectiveWithName :: Phantoms.TTerm Syntax.UndefDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.UndefDirective
-undefDirectiveWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.UndefDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDeclaration :: Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm String -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclaration type_ name initializer isAuto =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isAuto"),
-          Core.fieldTerm = (Phantoms.unTTerm isAuto)}]}))
-
-variableDeclarationInitializer :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm (Maybe Syntax.Expression)
-variableDeclarationInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclarationIsAuto :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Bool
-variableDeclarationIsAuto x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-        Core.projectionField = (Core.Name "isAuto")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclarationName :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm String
-variableDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclarationType :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm (Maybe Syntax.TypeExpression)
-variableDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclarationWithInitializer :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclarationWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isAuto"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "isAuto")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclarationWithIsAuto :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclarationWithIsAuto original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isAuto"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDeclarationWithName :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isAuto"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "isAuto")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclarationWithType :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isAuto"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "isAuto")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variantDeclaration :: Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.VariantDeclaration
-variantDeclaration types name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-variantDeclarationName :: Phantoms.TTerm Syntax.VariantDeclaration -> Phantoms.TTerm String
-variantDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variantDeclarationTypes :: Phantoms.TTerm Syntax.VariantDeclaration -> Phantoms.TTerm [Syntax.TypeExpression]
-variantDeclarationTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variantDeclarationWithName :: Phantoms.TTerm Syntax.VariantDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.VariantDeclaration
-variantDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variantDeclarationWithTypes :: Phantoms.TTerm Syntax.VariantDeclaration -> Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.VariantDeclaration
-variantDeclarationWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.VariantDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vector :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Vector
-vector elementType elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-vectorElementType :: Phantoms.TTerm Syntax.Vector -> Phantoms.TTerm Syntax.TypeExpression
-vectorElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vectorElements :: Phantoms.TTerm Syntax.Vector -> Phantoms.TTerm [Syntax.Expression]
-vectorElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vectorWithElementType :: Phantoms.TTerm Syntax.Vector -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.Vector
-vectorWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vectorWithElements :: Phantoms.TTerm Syntax.Vector -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Vector
-vectorWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.Vector"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-visitorLambda :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Visitor
-visitorLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Visitor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-visitorOverloaded :: Phantoms.TTerm Syntax.OverloadedLambdas -> Phantoms.TTerm Syntax.Visitor
-visitorOverloaded x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cpp.syntax.Visitor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overloaded"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-warningDirective :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.WarningDirective
-warningDirective message =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.WarningDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)}]}))
-
-warningDirectiveMessage :: Phantoms.TTerm Syntax.WarningDirective -> Phantoms.TTerm String
-warningDirectiveMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.WarningDirective"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-warningDirectiveWithMessage :: Phantoms.TTerm Syntax.WarningDirective -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.WarningDirective
-warningDirectiveWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.WarningDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatement condition body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-whileStatementBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement
-whileStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementCondition :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Expression
-whileStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementWithBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileStatementWithCondition :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cpp.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Csharp/Syntax.hs b/src/main/haskell/Hydra/Dsl/Csharp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Csharp/Syntax.hs
+++ /dev/null
@@ -1,23195 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.csharp.syntax
-
-module Hydra.Dsl.Csharp.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Csharp.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-accessorBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.AccessorBody
-accessorBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-accessorBodyEmpty :: Phantoms.TTerm Syntax.AccessorBody
-accessorBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AccessorBody
-accessorBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-accessorDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm (Maybe Syntax.AccessorModifier) -> Phantoms.TTerm Syntax.AccessorBody -> Phantoms.TTerm Syntax.AccessorDeclaration
-accessorDeclaration attributes modifier body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm modifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-accessorDeclarationAttributes :: Phantoms.TTerm Syntax.AccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-accessorDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorDeclarationBody :: Phantoms.TTerm Syntax.AccessorDeclaration -> Phantoms.TTerm Syntax.AccessorBody
-accessorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorDeclarationModifier :: Phantoms.TTerm Syntax.AccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.AccessorModifier)
-accessorDeclarationModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-        Core.projectionField = (Core.Name "modifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorDeclarationWithAttributes :: Phantoms.TTerm Syntax.AccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.AccessorDeclaration
-accessorDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-accessorDeclarationWithBody :: Phantoms.TTerm Syntax.AccessorDeclaration -> Phantoms.TTerm Syntax.AccessorBody -> Phantoms.TTerm Syntax.AccessorDeclaration
-accessorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-accessorDeclarationWithModifier :: Phantoms.TTerm Syntax.AccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.AccessorModifier) -> Phantoms.TTerm Syntax.AccessorDeclaration
-accessorDeclarationWithModifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-accessorDeclarationsGet :: Phantoms.TTerm (Maybe Syntax.AccessorDeclaration) -> Phantoms.TTerm Syntax.AccessorDeclarations
-accessorDeclarationsGet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclarations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "get"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-accessorDeclarationsSet :: Phantoms.TTerm (Maybe Syntax.AccessorDeclaration) -> Phantoms.TTerm Syntax.AccessorDeclarations
-accessorDeclarationsSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorDeclarations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-accessorModifierInternal :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorModifierInternalProtected :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierInternalProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internalProtected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorModifierPrivate :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorModifierPrivateProtected :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierPrivateProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "privateProtected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorModifierProtected :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorModifierProtectedInternal :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierProtectedInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protectedInternal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorModifierProtectedPrivate :: Phantoms.TTerm Syntax.AccessorModifier
-accessorModifierProtectedPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protectedPrivate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-accessorsEventDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.EventModifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.EventAccessorDeclarations -> Phantoms.TTerm Syntax.AccessorsEventDeclaration
-accessorsEventDeclaration attributes modifiers type_ name accessors =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm accessors)}]}))
-
-accessorsEventDeclarationAccessors :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.EventAccessorDeclarations
-accessorsEventDeclarationAccessors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-        Core.projectionField = (Core.Name "accessors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorsEventDeclarationAttributes :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-accessorsEventDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorsEventDeclarationModifiers :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm [Syntax.EventModifier]
-accessorsEventDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorsEventDeclarationName :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.MemberName
-accessorsEventDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorsEventDeclarationType :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.Type
-accessorsEventDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-accessorsEventDeclarationWithAccessors :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.EventAccessorDeclarations -> Phantoms.TTerm Syntax.AccessorsEventDeclaration
-accessorsEventDeclarationWithAccessors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-accessorsEventDeclarationWithAttributes :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.AccessorsEventDeclaration
-accessorsEventDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-accessorsEventDeclarationWithModifiers :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm [Syntax.EventModifier] -> Phantoms.TTerm Syntax.AccessorsEventDeclaration
-accessorsEventDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-accessorsEventDeclarationWithName :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.AccessorsEventDeclaration
-accessorsEventDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-accessorsEventDeclarationWithType :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AccessorsEventDeclaration
-accessorsEventDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AccessorsEventDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addRemoveAccessorDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration
-addRemoveAccessorDeclaration attributes body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-addRemoveAccessorDeclarationAttributes :: Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-addRemoveAccessorDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addRemoveAccessorDeclarationBody :: Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration -> Phantoms.TTerm Syntax.Block
-addRemoveAccessorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addRemoveAccessorDeclarationWithAttributes :: Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration
-addRemoveAccessorDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addRemoveAccessorDeclarationWithBody :: Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration
-addRemoveAccessorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AddRemoveAccessorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-additiveExpressionBinary :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveExpressionSimple :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveOperatorMinus :: Phantoms.TTerm Syntax.AdditiveOperator
-additiveOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AdditiveOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-additiveOperatorPlus :: Phantoms.TTerm Syntax.AdditiveOperator
-additiveOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AdditiveOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-andExpressionBinary :: Phantoms.TTerm Syntax.BinaryAndExpression -> Phantoms.TTerm Syntax.AndExpression
-andExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-andExpressionSimple :: Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.AndExpression
-andExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousFunctionBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.AnonymousFunctionBody
-anonymousFunctionBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousFunctionBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AnonymousFunctionBody
-anonymousFunctionBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousFunctionBodyNullConditionalInvocation :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm Syntax.AnonymousFunctionBody
-anonymousFunctionBodyNullConditionalInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousFunctionBodyRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.AnonymousFunctionBody
-anonymousFunctionBodyRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousFunctionParameterModifierIn :: Phantoms.TTerm Syntax.AnonymousFunctionParameterModifier
-anonymousFunctionParameterModifierIn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionParameterModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-anonymousFunctionParameterModifierOut :: Phantoms.TTerm Syntax.AnonymousFunctionParameterModifier
-anonymousFunctionParameterModifierOut =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionParameterModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "out"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-anonymousFunctionParameterModifierRef :: Phantoms.TTerm Syntax.AnonymousFunctionParameterModifier
-anonymousFunctionParameterModifierRef =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionParameterModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-anonymousFunctionSignatureExplicit :: Phantoms.TTerm [Syntax.ExplicitAnonymousFunctionParameter] -> Phantoms.TTerm Syntax.AnonymousFunctionSignature
-anonymousFunctionSignatureExplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionSignature"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousFunctionSignatureImplicit :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.AnonymousFunctionSignature
-anonymousFunctionSignatureImplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousFunctionSignature"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-anonymousMethodExpression :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.ExplicitAnonymousFunctionParameter] -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.AnonymousMethodExpression
-anonymousMethodExpression async signature body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm signature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-anonymousMethodExpressionAsync :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm Bool
-anonymousMethodExpressionAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anonymousMethodExpressionBody :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm Syntax.Block
-anonymousMethodExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anonymousMethodExpressionSignature :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm [Syntax.ExplicitAnonymousFunctionParameter]
-anonymousMethodExpressionSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-        Core.projectionField = (Core.Name "signature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anonymousMethodExpressionWithAsync :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.AnonymousMethodExpression
-anonymousMethodExpressionWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anonymousMethodExpressionWithBody :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.AnonymousMethodExpression
-anonymousMethodExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-anonymousMethodExpressionWithSignature :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm [Syntax.ExplicitAnonymousFunctionParameter] -> Phantoms.TTerm Syntax.AnonymousMethodExpression
-anonymousMethodExpressionWithSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AnonymousMethodExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-argument :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ArgumentValue -> Phantoms.TTerm Syntax.Argument
-argument name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Argument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-argumentList :: Phantoms.TTerm [Syntax.Argument] -> Phantoms.TTerm Syntax.ArgumentList
-argumentList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.ArgumentList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-argumentName :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm (Maybe Syntax.Identifier)
-argumentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Argument"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentValue :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm Syntax.ArgumentValue
-argumentValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Argument"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentValueExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArgumentValue
-argumentValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArgumentValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argumentValueIn :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.ArgumentValue
-argumentValueIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArgumentValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argumentValueOut :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.ArgumentValue
-argumentValueOut x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArgumentValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "out"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argumentValueRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.ArgumentValue
-argumentValueRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArgumentValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argumentWithName :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.Argument
-argumentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Argument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.Argument"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-argumentWithValue :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm Syntax.ArgumentValue -> Phantoms.TTerm Syntax.Argument
-argumentWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Argument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Argument"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayCreationExpressionArrayType :: Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionArrayType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrayType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpressionNonArrayType :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionNonArrayType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonArrayType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpressionRankSpecifier :: Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionRankSpecifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rankSpecifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayInitializer :: Phantoms.TTerm [Syntax.VariableInitializer] -> Phantoms.TTerm Syntax.ArrayInitializer
-arrayInitializer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.ArrayInitializer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrayType :: Phantoms.TTerm Syntax.NonArrayType -> Phantoms.TTerm [Syntax.RankSpecifier] -> Phantoms.TTerm Syntax.ArrayType
-arrayType type_ rank =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rank"),
-          Core.fieldTerm = (Phantoms.unTTerm rank)}]}))
-
-arrayTypeArrayCreationExpression :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression
-arrayTypeArrayCreationExpression type_ initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-arrayTypeArrayCreationExpressionInitializer :: Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayInitializer
-arrayTypeArrayCreationExpressionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeArrayCreationExpressionType :: Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeArrayCreationExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeArrayCreationExpressionWithInitializer :: Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression
-arrayTypeArrayCreationExpressionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayTypeArrayCreationExpressionWithType :: Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ArrayTypeArrayCreationExpression
-arrayTypeArrayCreationExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayTypeRank :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm [Syntax.RankSpecifier]
-arrayTypeRank x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "rank")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeType :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.NonArrayType
-arrayTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeWithRank :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm [Syntax.RankSpecifier] -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithRank original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rank"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayTypeWithType :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.NonArrayType -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rank"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "rank")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-asTypeExpression :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AsTypeExpression
-asTypeExpression expression type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-asTypeExpressionExpression :: Phantoms.TTerm Syntax.AsTypeExpression -> Phantoms.TTerm Syntax.RelationalExpression
-asTypeExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-asTypeExpressionType :: Phantoms.TTerm Syntax.AsTypeExpression -> Phantoms.TTerm Syntax.Type
-asTypeExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-asTypeExpressionWithExpression :: Phantoms.TTerm Syntax.AsTypeExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.AsTypeExpression
-asTypeExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-asTypeExpressionWithType :: Phantoms.TTerm Syntax.AsTypeExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AsTypeExpression
-asTypeExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AsTypeExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignment :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Assignment
-assignment left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-assignmentLeft :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.UnaryExpression
-assignmentLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentMemberDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentMemberDeclarator
-assignmentMemberDeclarator identifier expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-assignmentMemberDeclaratorExpression :: Phantoms.TTerm Syntax.AssignmentMemberDeclarator -> Phantoms.TTerm Syntax.Expression
-assignmentMemberDeclaratorExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentMemberDeclaratorIdentifier :: Phantoms.TTerm Syntax.AssignmentMemberDeclarator -> Phantoms.TTerm Syntax.Identifier
-assignmentMemberDeclaratorIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentMemberDeclaratorWithExpression :: Phantoms.TTerm Syntax.AssignmentMemberDeclarator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentMemberDeclarator
-assignmentMemberDeclaratorWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignmentMemberDeclaratorWithIdentifier :: Phantoms.TTerm Syntax.AssignmentMemberDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AssignmentMemberDeclarator
-assignmentMemberDeclaratorWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentMemberDeclarator"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentOperator :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentOperatorAndEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorAndEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "andEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorDivideEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorDivideEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divideEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorLeftShiftEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorLeftShiftEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShiftEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorMinusEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorMinusEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minusEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorModEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorModEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorOrEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorOrEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorPlusEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorPlusEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plusEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorRightShiftEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorRightShiftEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShiftEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorSimple :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentOperatorTimesEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorTimesEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timesEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorXorEquals :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorXorEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xorEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentRight :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.Expression
-assignmentRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentWithLeft :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.Assignment
-assignmentWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentWithOperator :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.Assignment
-assignmentWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentWithRight :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Assignment
-assignmentWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Assignment"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-attribute :: Phantoms.TTerm Syntax.AttributeName -> Phantoms.TTerm (Maybe Syntax.AttributeArguments) -> Phantoms.TTerm Syntax.Attribute
-attribute name arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-attributeArgumentExpression :: Phantoms.TTerm Syntax.NonAssignmentExpression -> Phantoms.TTerm Syntax.AttributeArgumentExpression
-attributeArgumentExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.AttributeArgumentExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-attributeArguments :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm (Maybe Syntax.AttributeArguments)
-attributeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeArgumentsNamed :: Phantoms.TTerm Syntax.AttributeArguments -> Phantoms.TTerm (Maybe Syntax.NamedArgumentList)
-attributeArgumentsNamed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-        Core.projectionField = (Core.Name "named")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeArgumentsPositonal :: Phantoms.TTerm Syntax.AttributeArguments -> Phantoms.TTerm (Maybe Syntax.PositionalArgumentList)
-attributeArgumentsPositonal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-        Core.projectionField = (Core.Name "positonal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeArgumentsWithNamed :: Phantoms.TTerm Syntax.AttributeArguments -> Phantoms.TTerm (Maybe Syntax.NamedArgumentList) -> Phantoms.TTerm Syntax.AttributeArguments
-attributeArgumentsWithNamed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positonal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-              Core.projectionField = (Core.Name "positonal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "named"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-attributeArgumentsWithPositonal :: Phantoms.TTerm Syntax.AttributeArguments -> Phantoms.TTerm (Maybe Syntax.PositionalArgumentList) -> Phantoms.TTerm Syntax.AttributeArguments
-attributeArgumentsWithPositonal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positonal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "named"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-              Core.projectionField = (Core.Name "named")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-attributeArguments_ :: Phantoms.TTerm (Maybe Syntax.PositionalArgumentList) -> Phantoms.TTerm (Maybe Syntax.NamedArgumentList) -> Phantoms.TTerm Syntax.AttributeArguments
-attributeArguments_ positonal named =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AttributeArguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positonal"),
-          Core.fieldTerm = (Phantoms.unTTerm positonal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "named"),
-          Core.fieldTerm = (Phantoms.unTTerm named)}]}))
-
-attributeList :: Phantoms.TTerm [Syntax.Attribute] -> Phantoms.TTerm Syntax.AttributeList
-attributeList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.AttributeList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-attributeName :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm Syntax.AttributeName
-attributeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeName_ :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.AttributeName
-attributeName_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.AttributeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-attributeSection :: Phantoms.TTerm (Maybe Syntax.AttributeTarget) -> Phantoms.TTerm Syntax.AttributeList -> Phantoms.TTerm Syntax.AttributeSection
-attributeSection target attributes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)}]}))
-
-attributeSectionAttributes :: Phantoms.TTerm Syntax.AttributeSection -> Phantoms.TTerm Syntax.AttributeList
-attributeSectionAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeSectionTarget :: Phantoms.TTerm Syntax.AttributeSection -> Phantoms.TTerm (Maybe Syntax.AttributeTarget)
-attributeSectionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeSectionWithAttributes :: Phantoms.TTerm Syntax.AttributeSection -> Phantoms.TTerm Syntax.AttributeList -> Phantoms.TTerm Syntax.AttributeSection
-attributeSectionWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-attributeSectionWithTarget :: Phantoms.TTerm Syntax.AttributeSection -> Phantoms.TTerm (Maybe Syntax.AttributeTarget) -> Phantoms.TTerm Syntax.AttributeSection
-attributeSectionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeSection"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-attributeTargetIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AttributeTarget
-attributeTargetIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-attributeTargetKeyword :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm Syntax.AttributeTarget
-attributeTargetKeyword x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.AttributeTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keyword"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-attributeWithArguments :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm (Maybe Syntax.AttributeArguments) -> Phantoms.TTerm Syntax.Attribute
-attributeWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-attributeWithName :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm Syntax.AttributeName -> Phantoms.TTerm Syntax.Attribute
-attributeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Attribute"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-attributes :: Phantoms.TTerm [Syntax.AttributeSection] -> Phantoms.TTerm Syntax.Attributes
-attributes x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.Attributes"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-baseAccessArguments :: Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm Syntax.BaseAccess
-baseAccessArguments x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.BaseAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arguments"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-baseAccessIdentifier :: Phantoms.TTerm Syntax.BaseAccessWithIdentifier -> Phantoms.TTerm Syntax.BaseAccess
-baseAccessIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.BaseAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-baseAccessWithIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.BaseAccessWithIdentifier
-baseAccessWithIdentifier identifier typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-baseAccessWithIdentifierIdentifier :: Phantoms.TTerm Syntax.BaseAccessWithIdentifier -> Phantoms.TTerm Syntax.Identifier
-baseAccessWithIdentifierIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-baseAccessWithIdentifierTypeArguments :: Phantoms.TTerm Syntax.BaseAccessWithIdentifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-baseAccessWithIdentifierTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-baseAccessWithIdentifierWithIdentifier :: Phantoms.TTerm Syntax.BaseAccessWithIdentifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.BaseAccessWithIdentifier
-baseAccessWithIdentifierWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-baseAccessWithIdentifierWithTypeArguments :: Phantoms.TTerm Syntax.BaseAccessWithIdentifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.BaseAccessWithIdentifier
-baseAccessWithIdentifierWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BaseAccessWithIdentifier"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryAdditiveExpression :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.AdditiveOperator -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.BinaryAdditiveExpression
-binaryAdditiveExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryAdditiveExpressionLeft :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.AdditiveExpression
-binaryAdditiveExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryAdditiveExpressionOperator :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.AdditiveOperator
-binaryAdditiveExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryAdditiveExpressionRight :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression
-binaryAdditiveExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryAdditiveExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.BinaryAdditiveExpression
-binaryAdditiveExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryAdditiveExpressionWithOperator :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.AdditiveOperator -> Phantoms.TTerm Syntax.BinaryAdditiveExpression
-binaryAdditiveExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryAdditiveExpressionWithRight :: Phantoms.TTerm Syntax.BinaryAdditiveExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.BinaryAdditiveExpression
-binaryAdditiveExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAdditiveExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryAndExpression :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.BinaryAndExpression
-binaryAndExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryAndExpressionLeft :: Phantoms.TTerm Syntax.BinaryAndExpression -> Phantoms.TTerm Syntax.AndExpression
-binaryAndExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryAndExpressionRight :: Phantoms.TTerm Syntax.BinaryAndExpression -> Phantoms.TTerm Syntax.EqualityExpression
-binaryAndExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryAndExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryAndExpression -> Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.BinaryAndExpression
-binaryAndExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryAndExpressionWithRight :: Phantoms.TTerm Syntax.BinaryAndExpression -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.BinaryAndExpression
-binaryAndExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryAndExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryConditionalAndExpression :: Phantoms.TTerm Syntax.ConditionalAndExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.BinaryConditionalAndExpression
-binaryConditionalAndExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryConditionalAndExpressionLeft :: Phantoms.TTerm Syntax.BinaryConditionalAndExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression
-binaryConditionalAndExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryConditionalAndExpressionRight :: Phantoms.TTerm Syntax.BinaryConditionalAndExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression
-binaryConditionalAndExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryConditionalAndExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryConditionalAndExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression -> Phantoms.TTerm Syntax.BinaryConditionalAndExpression
-binaryConditionalAndExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryConditionalAndExpressionWithRight :: Phantoms.TTerm Syntax.BinaryConditionalAndExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.BinaryConditionalAndExpression
-binaryConditionalAndExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalAndExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryConditionalOrExpression :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression -> Phantoms.TTerm Syntax.BinaryConditionalOrExpression
-binaryConditionalOrExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryConditionalOrExpressionLeft :: Phantoms.TTerm Syntax.BinaryConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalOrExpression
-binaryConditionalOrExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryConditionalOrExpressionRight :: Phantoms.TTerm Syntax.BinaryConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression
-binaryConditionalOrExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryConditionalOrExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.BinaryConditionalOrExpression
-binaryConditionalOrExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryConditionalOrExpressionWithRight :: Phantoms.TTerm Syntax.BinaryConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression -> Phantoms.TTerm Syntax.BinaryConditionalOrExpression
-binaryConditionalOrExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryConditionalOrExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryEqualityExpression :: Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.EqualityOperator -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.BinaryEqualityExpression
-binaryEqualityExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryEqualityExpressionLeft :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.EqualityExpression
-binaryEqualityExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryEqualityExpressionOperator :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.EqualityOperator
-binaryEqualityExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryEqualityExpressionRight :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.RelationalExpression
-binaryEqualityExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryEqualityExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.BinaryEqualityExpression
-binaryEqualityExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryEqualityExpressionWithOperator :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.EqualityOperator -> Phantoms.TTerm Syntax.BinaryEqualityExpression
-binaryEqualityExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryEqualityExpressionWithRight :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.BinaryEqualityExpression
-binaryEqualityExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryEqualityExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryExclusiveOrExpression :: Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.BinaryExclusiveOrExpression
-binaryExclusiveOrExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryExclusiveOrExpressionLeft :: Phantoms.TTerm Syntax.BinaryExclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-binaryExclusiveOrExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExclusiveOrExpressionRight :: Phantoms.TTerm Syntax.BinaryExclusiveOrExpression -> Phantoms.TTerm Syntax.AndExpression
-binaryExclusiveOrExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExclusiveOrExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryExclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.BinaryExclusiveOrExpression
-binaryExclusiveOrExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExclusiveOrExpressionWithRight :: Phantoms.TTerm Syntax.BinaryExclusiveOrExpression -> Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.BinaryExclusiveOrExpression
-binaryExclusiveOrExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryExclusiveOrExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryInclusiveOrExpression :: Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.BinaryInclusiveOrExpression
-binaryInclusiveOrExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryInclusiveOrExpressionLeft :: Phantoms.TTerm Syntax.BinaryInclusiveOrExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression
-binaryInclusiveOrExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryInclusiveOrExpressionRight :: Phantoms.TTerm Syntax.BinaryInclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-binaryInclusiveOrExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryInclusiveOrExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryInclusiveOrExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.BinaryInclusiveOrExpression
-binaryInclusiveOrExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryInclusiveOrExpressionWithRight :: Phantoms.TTerm Syntax.BinaryInclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.BinaryInclusiveOrExpression
-binaryInclusiveOrExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryInclusiveOrExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryMultiplicativeExpression :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeOperator -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.BinaryMultiplicativeExpression
-binaryMultiplicativeExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryMultiplicativeExpressionLeft :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression
-binaryMultiplicativeExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryMultiplicativeExpressionOperator :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeOperator
-binaryMultiplicativeExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryMultiplicativeExpressionRight :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.UnaryExpression
-binaryMultiplicativeExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryMultiplicativeExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.BinaryMultiplicativeExpression
-binaryMultiplicativeExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryMultiplicativeExpressionWithOperator :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeOperator -> Phantoms.TTerm Syntax.BinaryMultiplicativeExpression
-binaryMultiplicativeExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryMultiplicativeExpressionWithRight :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.BinaryMultiplicativeExpression
-binaryMultiplicativeExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryMultiplicativeExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryNullCoalescingExpression :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.BinaryNullCoalescingExpression
-binaryNullCoalescingExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryNullCoalescingExpressionLeft :: Phantoms.TTerm Syntax.BinaryNullCoalescingExpression -> Phantoms.TTerm Syntax.ConditionalOrExpression
-binaryNullCoalescingExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryNullCoalescingExpressionRight :: Phantoms.TTerm Syntax.BinaryNullCoalescingExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression
-binaryNullCoalescingExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryNullCoalescingExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryNullCoalescingExpression -> Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.BinaryNullCoalescingExpression
-binaryNullCoalescingExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryNullCoalescingExpressionWithRight :: Phantoms.TTerm Syntax.BinaryNullCoalescingExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.BinaryNullCoalescingExpression
-binaryNullCoalescingExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryNullCoalescingExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOperatorDeclarator :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.OverloadableBinaryOperator -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.BinaryOperatorDeclarator
-binaryOperatorDeclarator type_ operator left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryOperatorDeclaratorLeft :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter
-binaryOperatorDeclaratorLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryOperatorDeclaratorOperator :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.OverloadableBinaryOperator
-binaryOperatorDeclaratorOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryOperatorDeclaratorRight :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter
-binaryOperatorDeclaratorRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryOperatorDeclaratorType :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.Type
-binaryOperatorDeclaratorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryOperatorDeclaratorWithLeft :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.BinaryOperatorDeclarator
-binaryOperatorDeclaratorWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryOperatorDeclaratorWithOperator :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.OverloadableBinaryOperator -> Phantoms.TTerm Syntax.BinaryOperatorDeclarator
-binaryOperatorDeclaratorWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryOperatorDeclaratorWithRight :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.BinaryOperatorDeclarator
-binaryOperatorDeclaratorWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOperatorDeclaratorWithType :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.BinaryOperatorDeclarator
-binaryOperatorDeclaratorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryRelationalExpression :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.RelationalOperator -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.BinaryRelationalExpression
-binaryRelationalExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryRelationalExpressionLeft :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression
-binaryRelationalExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryRelationalExpressionOperator :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.RelationalOperator
-binaryRelationalExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryRelationalExpressionRight :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression
-binaryRelationalExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryRelationalExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.BinaryRelationalExpression
-binaryRelationalExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryRelationalExpressionWithOperator :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.RelationalOperator -> Phantoms.TTerm Syntax.BinaryRelationalExpression
-binaryRelationalExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryRelationalExpressionWithRight :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.BinaryRelationalExpression
-binaryRelationalExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryRelationalExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryShiftExpression :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.ShiftOperator -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.BinaryShiftExpression
-binaryShiftExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryShiftExpressionLeft :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.ShiftExpression
-binaryShiftExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryShiftExpressionOperator :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.ShiftOperator
-binaryShiftExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryShiftExpressionRight :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.AdditiveExpression
-binaryShiftExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryShiftExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.BinaryShiftExpression
-binaryShiftExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryShiftExpressionWithOperator :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.ShiftOperator -> Phantoms.TTerm Syntax.BinaryShiftExpression
-binaryShiftExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryShiftExpressionWithRight :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.BinaryShiftExpression
-binaryShiftExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BinaryShiftExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-block :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.Block
-block x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.Block"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-blockPropertyBody :: Phantoms.TTerm Syntax.AccessorDeclarations -> Phantoms.TTerm (Maybe Syntax.VariableInitializer) -> Phantoms.TTerm Syntax.BlockPropertyBody
-blockPropertyBody accessors initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm accessors)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-blockPropertyBodyAccessors :: Phantoms.TTerm Syntax.BlockPropertyBody -> Phantoms.TTerm Syntax.AccessorDeclarations
-blockPropertyBodyAccessors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-        Core.projectionField = (Core.Name "accessors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blockPropertyBodyInitializer :: Phantoms.TTerm Syntax.BlockPropertyBody -> Phantoms.TTerm (Maybe Syntax.VariableInitializer)
-blockPropertyBodyInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blockPropertyBodyWithAccessors :: Phantoms.TTerm Syntax.BlockPropertyBody -> Phantoms.TTerm Syntax.AccessorDeclarations -> Phantoms.TTerm Syntax.BlockPropertyBody
-blockPropertyBodyWithAccessors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-blockPropertyBodyWithInitializer :: Phantoms.TTerm Syntax.BlockPropertyBody -> Phantoms.TTerm (Maybe Syntax.VariableInitializer) -> Phantoms.TTerm Syntax.BlockPropertyBody
-blockPropertyBodyWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.BlockPropertyBody"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BooleanExpression
-booleanExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.BooleanExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-castExpression :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.CastExpression
-castExpression type_ expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-castExpressionExpression :: Phantoms.TTerm Syntax.CastExpression -> Phantoms.TTerm Syntax.UnaryExpression
-castExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpressionType :: Phantoms.TTerm Syntax.CastExpression -> Phantoms.TTerm Syntax.Type
-castExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpressionWithExpression :: Phantoms.TTerm Syntax.CastExpression -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.CastExpression
-castExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-castExpressionWithType :: Phantoms.TTerm Syntax.CastExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.CastExpression
-castExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CastExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catchClausesGeneral :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.CatchClauses
-catchClausesGeneral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.CatchClauses"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "general"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-catchClausesSpecific :: Phantoms.TTerm [Syntax.SpecificCatchClause] -> Phantoms.TTerm Syntax.CatchClauses
-catchClausesSpecific x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.CatchClauses"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "specific"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBaseClass :: Phantoms.TTerm (Maybe Syntax.ClassType) -> Phantoms.TTerm Syntax.ClassBase
-classBaseClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassBase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBaseInterfaces :: Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.ClassBase
-classBaseInterfaces x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassBase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interfaces"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBody :: Phantoms.TTerm [Syntax.ClassMemberDeclaration] -> Phantoms.TTerm Syntax.ClassBody
-classBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.ClassBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-classDeclaration :: Phantoms.TTerm [Syntax.AttributeSection] -> Phantoms.TTerm [Syntax.ClassModifier] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm (Maybe Syntax.ClassBase) -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclaration attributes modifiers partial name parameters base constraints body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm partial)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-classDeclarationAttributes :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm [Syntax.AttributeSection]
-classDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationBase :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.ClassBase)
-classDeclarationBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationBody :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassBody
-classDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationConstraints :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-classDeclarationConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationModifiers :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm [Syntax.ClassModifier]
-classDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationName :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.Identifier
-classDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationParameters :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.TypeParameterList)
-classDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationPartial :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Bool
-classDeclarationPartial x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "partial")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationWithAttributes :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm [Syntax.AttributeSection] -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithBase :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.ClassBase) -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithBody :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classDeclarationWithConstraints :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithModifiers :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm [Syntax.ClassModifier] -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithName :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithParameters :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithPartial :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithPartial original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classMemberDeclarationConstant :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationConstructor :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationEvent :: Phantoms.TTerm Syntax.EventDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationEvent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "event"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationField :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "field"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationFinalizer :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationFinalizer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "finalizer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationIndexer :: Phantoms.TTerm Syntax.IndexerDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationIndexer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indexer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationMethod :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationOperator :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationOperator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "operator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationProperty :: Phantoms.TTerm Syntax.PropertyDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationStaticConstructor :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationStaticConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "staticConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classModifierAbstract :: Phantoms.TTerm Syntax.ClassModifier
-classModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierInternal :: Phantoms.TTerm Syntax.ClassModifier
-classModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierNew :: Phantoms.TTerm Syntax.ClassModifier
-classModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierPrivate :: Phantoms.TTerm Syntax.ClassModifier
-classModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierProtected :: Phantoms.TTerm Syntax.ClassModifier
-classModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierPublic :: Phantoms.TTerm Syntax.ClassModifier
-classModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierSealed :: Phantoms.TTerm Syntax.ClassModifier
-classModifierSealed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sealed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierStatic :: Phantoms.TTerm Syntax.ClassModifier
-classModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierUnsafe :: Phantoms.TTerm Syntax.ClassModifier
-classModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classTypeObject :: Phantoms.TTerm Syntax.ClassType
-classTypeObject =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classTypeString :: Phantoms.TTerm Syntax.ClassType
-classTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classTypeTypeName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.ClassType
-classTypeTypeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ClassType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compilationUnit :: Phantoms.TTerm [Syntax.ExternAliasDirective] -> Phantoms.TTerm [Syntax.UsingDirective] -> Phantoms.TTerm [Syntax.GlobalAttributeSection] -> Phantoms.TTerm [Syntax.NamespaceMemberDeclaration] -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnit externs usings attributes members =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Phantoms.unTTerm externs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Phantoms.unTTerm usings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Phantoms.unTTerm members)}]}))
-
-compilationUnitAttributes :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.GlobalAttributeSection]
-compilationUnitAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compilationUnitExterns :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.ExternAliasDirective]
-compilationUnitExterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-        Core.projectionField = (Core.Name "externs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compilationUnitMembers :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.NamespaceMemberDeclaration]
-compilationUnitMembers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-        Core.projectionField = (Core.Name "members")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compilationUnitUsings :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.UsingDirective]
-compilationUnitUsings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-        Core.projectionField = (Core.Name "usings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compilationUnitWithAttributes :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.GlobalAttributeSection] -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnitWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "externs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "usings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "members")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compilationUnitWithExterns :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.ExternAliasDirective] -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnitWithExterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "usings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "members")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compilationUnitWithMembers :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.NamespaceMemberDeclaration] -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnitWithMembers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "externs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "usings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compilationUnitWithUsings :: Phantoms.TTerm Syntax.CompilationUnit -> Phantoms.TTerm [Syntax.UsingDirective] -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnitWithUsings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "externs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.CompilationUnit"),
-              Core.projectionField = (Core.Name "members")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalAndExpressionBinary :: Phantoms.TTerm Syntax.BinaryConditionalAndExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression
-conditionalAndExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalAndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalAndExpressionSimple :: Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm Syntax.ConditionalAndExpression
-conditionalAndExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalAndExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpressionRefConditional :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionRefConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refConditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpressionSimple :: Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpressionSimpleConditional :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionSimpleConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simpleConditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalOrExpressionBinary :: Phantoms.TTerm Syntax.BinaryConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalOrExpression
-conditionalOrExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalOrExpressionSimple :: Phantoms.TTerm Syntax.ConditionalAndExpression -> Phantoms.TTerm Syntax.ConditionalOrExpression
-conditionalOrExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConditionalOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constantDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.ConstantModifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.ConstantDeclarator] -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclaration attributes modifiers type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-constantDeclarationAttributes :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-constantDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationDeclarators :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantDeclarator]
-constantDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationModifiers :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantModifier]
-constantDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationType :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.Type
-constantDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationWithAttributes :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantDeclarationWithDeclarators :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantDeclarator] -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constantDeclarationWithModifiers :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantModifier] -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantDeclarationWithType :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.ConstantDeclarator
-constantDeclarator identifier expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-constantDeclaratorExpression :: Phantoms.TTerm Syntax.ConstantDeclarator -> Phantoms.TTerm Syntax.ConstantExpression
-constantDeclaratorExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclaratorIdentifier :: Phantoms.TTerm Syntax.ConstantDeclarator -> Phantoms.TTerm Syntax.Identifier
-constantDeclaratorIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclaratorWithExpression :: Phantoms.TTerm Syntax.ConstantDeclarator -> Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.ConstantDeclarator
-constantDeclaratorWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constantDeclaratorWithIdentifier :: Phantoms.TTerm Syntax.ConstantDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ConstantDeclarator
-constantDeclaratorWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantDeclarator"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConstantExpression
-constantExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.ConstantExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constantModifierInternal :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constantModifierNew :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constantModifierPrivate :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constantModifierProtected :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constantModifierPublic :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ConstructorBody
-constructorBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constructorBodyEmpty :: Phantoms.TTerm Syntax.ConstructorBody
-constructorBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConstructorBody
-constructorBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constructorDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.ConstructorModifier] -> Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclaration attributes modifiers declarator body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm declarator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-constructorDeclarationAttributes :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-constructorDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationBody :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorBody
-constructorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationDeclarator :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclarationDeclarator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "declarator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationModifiers :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.ConstructorModifier]
-constructorDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationWithAttributes :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarationWithBody :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorDeclarationWithDeclarator :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithDeclarator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarationWithModifiers :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.ConstructorModifier] -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm (Maybe Syntax.ConstructorInitializer) -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclarator name parameters initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-constructorDeclaratorInitializer :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.ConstructorInitializer)
-constructorDeclaratorInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorName :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.Identifier
-constructorDeclaratorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorParameters :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.FormalParameterList)
-constructorDeclaratorParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorWithInitializer :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.ConstructorInitializer) -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorDeclaratorWithName :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclaratorWithParameters :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorInitializerBase :: Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.ConstructorInitializer
-constructorInitializerBase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "base"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constructorInitializerThis :: Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.ConstructorInitializer
-constructorInitializerThis x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constructorModifierExtern :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierExtern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extern"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierInternal :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierPrivate :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierProtected :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierPublic :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierUnsafe :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-conversionKindExplicit :: Phantoms.TTerm Syntax.ConversionKind
-conversionKindExplicit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-conversionKindImplicit :: Phantoms.TTerm Syntax.ConversionKind
-conversionKindImplicit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-conversionOperatorDeclarator :: Phantoms.TTerm Syntax.ConversionKind -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.ConversionOperatorDeclarator
-conversionOperatorDeclarator kind type_ parameter =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)}]}))
-
-conversionOperatorDeclaratorKind :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.ConversionKind
-conversionOperatorDeclaratorKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conversionOperatorDeclaratorParameter :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter
-conversionOperatorDeclaratorParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conversionOperatorDeclaratorType :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.Type
-conversionOperatorDeclaratorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conversionOperatorDeclaratorWithKind :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.ConversionKind -> Phantoms.TTerm Syntax.ConversionOperatorDeclarator
-conversionOperatorDeclaratorWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conversionOperatorDeclaratorWithParameter :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.ConversionOperatorDeclarator
-conversionOperatorDeclaratorWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conversionOperatorDeclaratorWithType :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ConversionOperatorDeclarator
-conversionOperatorDeclaratorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ConversionOperatorDeclarator"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-declarationExpression :: Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.DeclarationExpression
-declarationExpression type_ identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-declarationExpressionIdentifier :: Phantoms.TTerm Syntax.DeclarationExpression -> Phantoms.TTerm Syntax.Identifier
-declarationExpressionIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-declarationExpressionType :: Phantoms.TTerm Syntax.DeclarationExpression -> Phantoms.TTerm Syntax.LocalVariableType
-declarationExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-declarationExpressionWithIdentifier :: Phantoms.TTerm Syntax.DeclarationExpression -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.DeclarationExpression
-declarationExpressionWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-declarationExpressionWithType :: Phantoms.TTerm Syntax.DeclarationExpression -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.DeclarationExpression
-declarationExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationExpression"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-declarationPattern :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Designation -> Phantoms.TTerm Syntax.DeclarationPattern
-declarationPattern type_ designation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "designation"),
-          Core.fieldTerm = (Phantoms.unTTerm designation)}]}))
-
-declarationPatternDesignation :: Phantoms.TTerm Syntax.DeclarationPattern -> Phantoms.TTerm Syntax.Designation
-declarationPatternDesignation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-        Core.projectionField = (Core.Name "designation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-declarationPatternType :: Phantoms.TTerm Syntax.DeclarationPattern -> Phantoms.TTerm Syntax.Type
-declarationPatternType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-declarationPatternWithDesignation :: Phantoms.TTerm Syntax.DeclarationPattern -> Phantoms.TTerm Syntax.Designation -> Phantoms.TTerm Syntax.DeclarationPattern
-declarationPatternWithDesignation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "designation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-declarationPatternWithType :: Phantoms.TTerm Syntax.DeclarationPattern -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.DeclarationPattern
-declarationPatternWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "designation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationPattern"),
-              Core.projectionField = (Core.Name "designation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-declarationStatementConstant :: Phantoms.TTerm Syntax.LocalConstantDeclaration -> Phantoms.TTerm Syntax.DeclarationStatement
-declarationStatementConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationStatementFunction :: Phantoms.TTerm Syntax.LocalFunctionDeclaration -> Phantoms.TTerm Syntax.DeclarationStatement
-declarationStatementFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationStatementVariable :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.DeclarationStatement
-declarationStatementVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DeclarationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-deconstructionElementIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.DeconstructionElement
-deconstructionElementIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DeconstructionElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-deconstructionElementTuple :: Phantoms.TTerm Syntax.DeconstructionTuple -> Phantoms.TTerm Syntax.DeconstructionElement
-deconstructionElementTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DeconstructionElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-deconstructionTuple :: Phantoms.TTerm [Syntax.DeconstructionElement] -> Phantoms.TTerm Syntax.DeconstructionTuple
-deconstructionTuple x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.DeconstructionTuple"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-defaultValueExpressionDefaultLiteral :: Phantoms.TTerm Syntax.DefaultValueExpression
-defaultValueExpressionDefaultLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DefaultValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "defaultLiteral"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-defaultValueExpressionExplicitlyTyped :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.DefaultValueExpression
-defaultValueExpressionExplicitlyTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DefaultValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicitlyTyped"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delegateCreationExpression :: Phantoms.TTerm Syntax.DelegateType -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DelegateCreationExpression
-delegateCreationExpression type_ expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-delegateCreationExpressionExpression :: Phantoms.TTerm Syntax.DelegateCreationExpression -> Phantoms.TTerm Syntax.Expression
-delegateCreationExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateCreationExpressionType :: Phantoms.TTerm Syntax.DelegateCreationExpression -> Phantoms.TTerm Syntax.DelegateType
-delegateCreationExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateCreationExpressionWithExpression :: Phantoms.TTerm Syntax.DelegateCreationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DelegateCreationExpression
-delegateCreationExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-delegateCreationExpressionWithType :: Phantoms.TTerm Syntax.DelegateCreationExpression -> Phantoms.TTerm Syntax.DelegateType -> Phantoms.TTerm Syntax.DelegateCreationExpression
-delegateCreationExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateCreationExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.DelegateModifier] -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclaration attributes modifiers returnType refKind refReturnType header =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Phantoms.unTTerm refReturnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)}]}))
-
-delegateDeclarationAttributes :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-delegateDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateDeclarationHeader :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm Syntax.DelegateHeader
-delegateDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateDeclarationModifiers :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm [Syntax.DelegateModifier]
-delegateDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateDeclarationRefKind :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind)
-delegateDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateDeclarationRefReturnType :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm (Maybe Syntax.Type)
-delegateDeclarationRefReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-        Core.projectionField = (Core.Name "refReturnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateDeclarationReturnType :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm Syntax.ReturnType
-delegateDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateDeclarationWithAttributes :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refReturnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateDeclarationWithHeader :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refReturnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-delegateDeclarationWithModifiers :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm [Syntax.DelegateModifier] -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refReturnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateDeclarationWithRefKind :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refReturnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateDeclarationWithRefReturnType :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclarationWithRefReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateDeclarationWithReturnType :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.DelegateDeclaration
-delegateDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refReturnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "refReturnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateHeader :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.VariantTypeParameters) -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.DelegateHeader
-delegateHeader name typeParameters parameters constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-
-delegateHeaderConstraints :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-delegateHeaderConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateHeaderName :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm Syntax.Identifier
-delegateHeaderName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateHeaderParameters :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm (Maybe Syntax.FormalParameterList)
-delegateHeaderParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateHeaderTypeParameters :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm (Maybe Syntax.VariantTypeParameters)
-delegateHeaderTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-        Core.projectionField = (Core.Name "typeParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-delegateHeaderWithConstraints :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.DelegateHeader
-delegateHeaderWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-delegateHeaderWithName :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.DelegateHeader
-delegateHeaderWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateHeaderWithParameters :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm Syntax.DelegateHeader
-delegateHeaderWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateHeaderWithTypeParameters :: Phantoms.TTerm Syntax.DelegateHeader -> Phantoms.TTerm (Maybe Syntax.VariantTypeParameters) -> Phantoms.TTerm Syntax.DelegateHeader
-delegateHeaderWithTypeParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-delegateModifierInternal :: Phantoms.TTerm Syntax.DelegateModifier
-delegateModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-delegateModifierNew :: Phantoms.TTerm Syntax.DelegateModifier
-delegateModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-delegateModifierPrivate :: Phantoms.TTerm Syntax.DelegateModifier
-delegateModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-delegateModifierProtected :: Phantoms.TTerm Syntax.DelegateModifier
-delegateModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-delegateModifierPublic :: Phantoms.TTerm Syntax.DelegateModifier
-delegateModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-delegateModifierUnsafe :: Phantoms.TTerm Syntax.DelegateModifier
-delegateModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DelegateModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-delegateType :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.DelegateType
-delegateType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.DelegateType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dependentAccessElementAccess :: Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm Syntax.DependentAccess
-dependentAccessElementAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dependentAccessForMember :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.DependentAccessForMember
-dependentAccessForMember identifier typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-dependentAccessForMemberIdentifier :: Phantoms.TTerm Syntax.DependentAccessForMember -> Phantoms.TTerm Syntax.Identifier
-dependentAccessForMemberIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dependentAccessForMemberTypeArguments :: Phantoms.TTerm Syntax.DependentAccessForMember -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-dependentAccessForMemberTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dependentAccessForMemberWithIdentifier :: Phantoms.TTerm Syntax.DependentAccessForMember -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.DependentAccessForMember
-dependentAccessForMemberWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dependentAccessForMemberWithTypeArguments :: Phantoms.TTerm Syntax.DependentAccessForMember -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.DependentAccessForMember
-dependentAccessForMemberWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccessForMember"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dependentAccessInvocation :: Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.DependentAccess
-dependentAccessInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dependentAccessMemberAccess :: Phantoms.TTerm Syntax.DependentAccessForMember -> Phantoms.TTerm Syntax.DependentAccess
-dependentAccessMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.DependentAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "memberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-designation :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Designation
-designation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.Designation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-doStatement :: Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.DoStatement
-doStatement body while =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "while"),
-          Core.fieldTerm = (Phantoms.unTTerm while)}]}))
-
-doStatementBody :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-doStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doStatementWhile :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.BooleanExpression
-doStatementWhile x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-        Core.projectionField = (Core.Name "while")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doStatementWithBody :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.DoStatement
-doStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "while"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-              Core.projectionField = (Core.Name "while")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-doStatementWithWhile :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.DoStatement
-doStatementWithWhile original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.DoStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "while"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementAccess :: Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm Syntax.ElementAccess
-elementAccess expression arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-elementAccessArguments :: Phantoms.TTerm Syntax.ElementAccess -> Phantoms.TTerm Syntax.ArgumentList
-elementAccessArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementAccessExpression :: Phantoms.TTerm Syntax.ElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-elementAccessExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementAccessWithArguments :: Phantoms.TTerm Syntax.ElementAccess -> Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm Syntax.ElementAccess
-elementAccessWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementAccessWithExpression :: Phantoms.TTerm Syntax.ElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.ElementAccess
-elementAccessWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ElementAccess"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementInitializerList :: Phantoms.TTerm Syntax.ExpressionList -> Phantoms.TTerm Syntax.ElementInitializer
-elementInitializerList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ElementInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementInitializerSingle :: Phantoms.TTerm Syntax.NonAssignmentExpression -> Phantoms.TTerm Syntax.ElementInitializer
-elementInitializerSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ElementInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementChecked :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementChecked x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "checked"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementEmpty :: Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-embeddedStatementExpression :: Phantoms.TTerm Syntax.StatementExpression -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementFixed :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementFixed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementIteration :: Phantoms.TTerm Syntax.IterationStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementIteration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iteration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementJump :: Phantoms.TTerm Syntax.JumpStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementJump x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "jump"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementLock :: Phantoms.TTerm Syntax.LockStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementLock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lock"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementSelection :: Phantoms.TTerm Syntax.SelectionStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementSelection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "selection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementTry :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementTry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "try"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementUnchecked :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementUnchecked x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unchecked"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementUnsafe :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementUnsafe x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementUsing :: Phantoms.TTerm Syntax.UsingStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementUsing x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "using"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedStatementYield :: Phantoms.TTerm Syntax.YieldStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-embeddedStatementYield x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EmbeddedStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "yield"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumBaseName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.EnumBase
-enumBaseName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumBase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumBaseType :: Phantoms.TTerm Syntax.IntegralType -> Phantoms.TTerm Syntax.EnumBase
-enumBaseType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumBase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumBody :: Phantoms.TTerm [Syntax.EnumMemberDeclaration] -> Phantoms.TTerm Syntax.EnumBody
-enumBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.EnumBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.EnumModifier] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.EnumBase) -> Phantoms.TTerm (Maybe Syntax.EnumBody) -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclaration attributes modifiers name base body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-enumDeclarationAttributes :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-enumDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationBase :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm (Maybe Syntax.EnumBase)
-enumDeclarationBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationBody :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm (Maybe Syntax.EnumBody)
-enumDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationModifiers :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm [Syntax.EnumModifier]
-enumDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationName :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.Identifier
-enumDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationWithAttributes :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDeclarationWithBase :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm (Maybe Syntax.EnumBase) -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDeclarationWithBody :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm (Maybe Syntax.EnumBody) -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumDeclarationWithModifiers :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm [Syntax.EnumModifier] -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDeclarationWithName :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumMemberDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.ConstantExpression) -> Phantoms.TTerm Syntax.EnumMemberDeclaration
-enumMemberDeclaration attributes name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-enumMemberDeclarationAttributes :: Phantoms.TTerm Syntax.EnumMemberDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-enumMemberDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumMemberDeclarationName :: Phantoms.TTerm Syntax.EnumMemberDeclaration -> Phantoms.TTerm Syntax.Identifier
-enumMemberDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumMemberDeclarationValue :: Phantoms.TTerm Syntax.EnumMemberDeclaration -> Phantoms.TTerm (Maybe Syntax.ConstantExpression)
-enumMemberDeclarationValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumMemberDeclarationWithAttributes :: Phantoms.TTerm Syntax.EnumMemberDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.EnumMemberDeclaration
-enumMemberDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.csharp.syntax.EnumMemberDeclaration"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumMemberDeclarationWithName :: Phantoms.TTerm Syntax.EnumMemberDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.EnumMemberDeclaration
-enumMemberDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.EnumMemberDeclaration"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumMemberDeclarationWithValue :: Phantoms.TTerm Syntax.EnumMemberDeclaration -> Phantoms.TTerm (Maybe Syntax.ConstantExpression) -> Phantoms.TTerm Syntax.EnumMemberDeclaration
-enumMemberDeclarationWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.EnumMemberDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumModifierInternal :: Phantoms.TTerm Syntax.EnumModifier
-enumModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-enumModifierNew :: Phantoms.TTerm Syntax.EnumModifier
-enumModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-enumModifierPrivate :: Phantoms.TTerm Syntax.EnumModifier
-enumModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-enumModifierProtected :: Phantoms.TTerm Syntax.EnumModifier
-enumModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-enumModifierPublic :: Phantoms.TTerm Syntax.EnumModifier
-enumModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EnumModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-enumType :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.EnumType
-enumType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.EnumType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-equalityExpressionBinary :: Phantoms.TTerm Syntax.BinaryEqualityExpression -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityExpressionSimple :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityOperatorEqual :: Phantoms.TTerm Syntax.EqualityOperator
-equalityOperatorEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EqualityOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-equalityOperatorNotEqual :: Phantoms.TTerm Syntax.EqualityOperator
-equalityOperatorNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EqualityOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventAccessorDeclarationsAdd :: Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration -> Phantoms.TTerm Syntax.EventAccessorDeclarations
-eventAccessorDeclarationsAdd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventAccessorDeclarations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventAccessorDeclarationsRemove :: Phantoms.TTerm Syntax.AddRemoveAccessorDeclaration -> Phantoms.TTerm Syntax.EventAccessorDeclarations
-eventAccessorDeclarationsRemove x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventAccessorDeclarations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "remove"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventDeclarationAccessors :: Phantoms.TTerm Syntax.AccessorsEventDeclaration -> Phantoms.TTerm Syntax.EventDeclaration
-eventDeclarationAccessors x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "accessors"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventDeclarationStandard :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm Syntax.EventDeclaration
-eventDeclarationStandard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "standard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventModifierAbstract :: Phantoms.TTerm Syntax.EventModifier
-eventModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierExtern :: Phantoms.TTerm Syntax.EventModifier
-eventModifierExtern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extern"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierInternal :: Phantoms.TTerm Syntax.EventModifier
-eventModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierNew :: Phantoms.TTerm Syntax.EventModifier
-eventModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierOverride :: Phantoms.TTerm Syntax.EventModifier
-eventModifierOverride =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "override"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierPrivate :: Phantoms.TTerm Syntax.EventModifier
-eventModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierProtected :: Phantoms.TTerm Syntax.EventModifier
-eventModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierPublic :: Phantoms.TTerm Syntax.EventModifier
-eventModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierSealed :: Phantoms.TTerm Syntax.EventModifier
-eventModifierSealed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sealed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierStatic :: Phantoms.TTerm Syntax.EventModifier
-eventModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierUnsafe :: Phantoms.TTerm Syntax.EventModifier
-eventModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-eventModifierVirtual :: Phantoms.TTerm Syntax.EventModifier
-eventModifierVirtual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.EventModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "virtual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-exceptionSpecifier :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ExceptionSpecifier
-exceptionSpecifier type_ identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-exceptionSpecifierIdentifier :: Phantoms.TTerm Syntax.ExceptionSpecifier -> Phantoms.TTerm (Maybe Syntax.Identifier)
-exceptionSpecifierIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptionSpecifierType :: Phantoms.TTerm Syntax.ExceptionSpecifier -> Phantoms.TTerm Syntax.Type
-exceptionSpecifierType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptionSpecifierWithIdentifier :: Phantoms.TTerm Syntax.ExceptionSpecifier -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ExceptionSpecifier
-exceptionSpecifierWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exceptionSpecifierWithType :: Phantoms.TTerm Syntax.ExceptionSpecifier -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ExceptionSpecifier
-exceptionSpecifierWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExceptionSpecifier"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exclusiveOrExpressionBinary :: Phantoms.TTerm Syntax.BinaryExclusiveOrExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-exclusiveOrExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ExclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exclusiveOrExpressionSimple :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-exclusiveOrExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ExclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-explicitAnonymousFunctionParameter :: Phantoms.TTerm (Maybe Syntax.AnonymousFunctionParameterModifier) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter
-explicitAnonymousFunctionParameter modifier type_ identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm modifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-explicitAnonymousFunctionParameterIdentifier :: Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter -> Phantoms.TTerm Syntax.Identifier
-explicitAnonymousFunctionParameterIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitAnonymousFunctionParameterModifier :: Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter -> Phantoms.TTerm (Maybe Syntax.AnonymousFunctionParameterModifier)
-explicitAnonymousFunctionParameterModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-        Core.projectionField = (Core.Name "modifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitAnonymousFunctionParameterType :: Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter -> Phantoms.TTerm Syntax.Type
-explicitAnonymousFunctionParameterType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitAnonymousFunctionParameterWithIdentifier :: Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter
-explicitAnonymousFunctionParameterWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-explicitAnonymousFunctionParameterWithModifier :: Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter -> Phantoms.TTerm (Maybe Syntax.AnonymousFunctionParameterModifier) -> Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter
-explicitAnonymousFunctionParameterWithModifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitAnonymousFunctionParameterWithType :: Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ExplicitAnonymousFunctionParameter
-explicitAnonymousFunctionParameterWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitAnonymousFunctionParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitlyTypedLocalVariableDeclaration :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.ExplicitlyTypedLocalVariableDeclarator] -> Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration
-explicitlyTypedLocalVariableDeclaration type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-explicitlyTypedLocalVariableDeclarationDeclarators :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm [Syntax.ExplicitlyTypedLocalVariableDeclarator]
-explicitlyTypedLocalVariableDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitlyTypedLocalVariableDeclarationType :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.Type
-explicitlyTypedLocalVariableDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitlyTypedLocalVariableDeclarationWithDeclarators :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm [Syntax.ExplicitlyTypedLocalVariableDeclarator] -> Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration
-explicitlyTypedLocalVariableDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-explicitlyTypedLocalVariableDeclarationWithType :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration
-explicitlyTypedLocalVariableDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitlyTypedLocalVariableDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.LocalVariableInitializer) -> Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator
-explicitlyTypedLocalVariableDeclarator identifier initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-explicitlyTypedLocalVariableDeclaratorIdentifier :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.Identifier
-explicitlyTypedLocalVariableDeclaratorIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitlyTypedLocalVariableDeclaratorInitializer :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm (Maybe Syntax.LocalVariableInitializer)
-explicitlyTypedLocalVariableDeclaratorInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitlyTypedLocalVariableDeclaratorWithIdentifier :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator
-explicitlyTypedLocalVariableDeclaratorWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitlyTypedLocalVariableDeclaratorWithInitializer :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm (Maybe Syntax.LocalVariableInitializer) -> Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclarator
-explicitlyTypedLocalVariableDeclaratorWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ExplicitlyTypedLocalVariableDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-expressionAssignment :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.Expression
-expressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionList :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ExpressionList
-expressionList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.ExpressionList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-expressionNonAssignment :: Phantoms.TTerm Syntax.NonAssignmentExpression -> Phantoms.TTerm Syntax.Expression
-expressionNonAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonAssignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-externAliasDirective :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExternAliasDirective
-externAliasDirective x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.ExternAliasDirective"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fieldDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.FieldModifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclaration attributes modifiers type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-fieldDeclarationAttributes :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-fieldDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationDeclarators :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator]
-fieldDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationModifiers :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.FieldModifier]
-fieldDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationType :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.Type
-fieldDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationWithAttributes :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDeclarationWithDeclarators :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldDeclarationWithModifiers :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.FieldModifier] -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDeclarationWithType :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldModifierInternal :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierNew :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierPrivate :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierProtected :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierPublic :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierReadonly :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierReadonly =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "readonly"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierStatic :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierUnsafe :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierVolatile :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierVolatile =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "volatile"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-finalizerBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.FinalizerBody
-finalizerBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-finalizerBodyEmpty :: Phantoms.TTerm Syntax.FinalizerBody
-finalizerBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-finalizerBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FinalizerBody
-finalizerBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-finalizerDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FinalizerBody -> Phantoms.TTerm Syntax.FinalizerDeclaration
-finalizerDeclaration attributes extern unsafe name body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Phantoms.unTTerm extern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm unsafe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-finalizerDeclarationAttributes :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-finalizerDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-finalizerDeclarationBody :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Syntax.FinalizerBody
-finalizerDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-finalizerDeclarationExtern :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Bool
-finalizerDeclarationExtern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-        Core.projectionField = (Core.Name "extern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-finalizerDeclarationName :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Syntax.Identifier
-finalizerDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-finalizerDeclarationUnsafe :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Bool
-finalizerDeclarationUnsafe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-        Core.projectionField = (Core.Name "unsafe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-finalizerDeclarationWithAttributes :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.FinalizerDeclaration
-finalizerDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "extern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-finalizerDeclarationWithBody :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Syntax.FinalizerBody -> Phantoms.TTerm Syntax.FinalizerDeclaration
-finalizerDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "extern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-finalizerDeclarationWithExtern :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FinalizerDeclaration
-finalizerDeclarationWithExtern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-finalizerDeclarationWithName :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FinalizerDeclaration
-finalizerDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "extern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-finalizerDeclarationWithUnsafe :: Phantoms.TTerm Syntax.FinalizerDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FinalizerDeclaration
-finalizerDeclarationWithUnsafe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "extern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FinalizerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedParameter :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm (Maybe Syntax.ParameterModifier) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FixedParameter
-fixedParameter attributes modifier type_ identifier defaultArgument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm modifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultArgument"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultArgument)}]}))
-
-fixedParameterAttributes :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm (Maybe Syntax.Attributes)
-fixedParameterAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedParameterDefaultArgument :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm (Maybe Syntax.Expression)
-fixedParameterDefaultArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-        Core.projectionField = (Core.Name "defaultArgument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedParameterIdentifier :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.Identifier
-fixedParameterIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedParameterModifier :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm (Maybe Syntax.ParameterModifier)
-fixedParameterModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-        Core.projectionField = (Core.Name "modifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedParameterType :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.Type
-fixedParameterType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedParameterWithAttributes :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.FixedParameter
-fixedParameterWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultArgument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "defaultArgument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedParameterWithDefaultArgument :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FixedParameter
-fixedParameterWithDefaultArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultArgument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fixedParameterWithIdentifier :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FixedParameter
-fixedParameterWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultArgument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "defaultArgument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedParameterWithModifier :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm (Maybe Syntax.ParameterModifier) -> Phantoms.TTerm Syntax.FixedParameter
-fixedParameterWithModifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultArgument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "defaultArgument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedParameterWithType :: Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FixedParameter
-fixedParameterWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultArgument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedParameter"),
-              Core.projectionField = (Core.Name "defaultArgument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedPointerDeclaratorExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FixedPointerDeclarator
-fixedPointerDeclaratorExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedPointerDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixedPointerDeclaratorReference :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.FixedPointerDeclarator
-fixedPointerDeclaratorReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedPointerDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fixedSizeBufferDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.FixedSizeBufferModifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.FixedSizeBufferDeclarator] -> Phantoms.TTerm Syntax.FixedSizeBufferDeclaration
-fixedSizeBufferDeclaration attributes modifiers elementType declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-fixedSizeBufferDeclarationAttributes :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-fixedSizeBufferDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedSizeBufferDeclarationDeclarators :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm [Syntax.FixedSizeBufferDeclarator]
-fixedSizeBufferDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedSizeBufferDeclarationElementType :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm Syntax.Type
-fixedSizeBufferDeclarationElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedSizeBufferDeclarationModifiers :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm [Syntax.FixedSizeBufferModifier]
-fixedSizeBufferDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedSizeBufferDeclarationWithAttributes :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.FixedSizeBufferDeclaration
-fixedSizeBufferDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedSizeBufferDeclarationWithDeclarators :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm [Syntax.FixedSizeBufferDeclarator] -> Phantoms.TTerm Syntax.FixedSizeBufferDeclaration
-fixedSizeBufferDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fixedSizeBufferDeclarationWithElementType :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FixedSizeBufferDeclaration
-fixedSizeBufferDeclarationWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedSizeBufferDeclarationWithModifiers :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm [Syntax.FixedSizeBufferModifier] -> Phantoms.TTerm Syntax.FixedSizeBufferDeclaration
-fixedSizeBufferDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedSizeBufferDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.FixedSizeBufferDeclarator
-fixedSizeBufferDeclarator name size =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Phantoms.unTTerm size)}]}))
-
-fixedSizeBufferDeclaratorName :: Phantoms.TTerm Syntax.FixedSizeBufferDeclarator -> Phantoms.TTerm Syntax.Identifier
-fixedSizeBufferDeclaratorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedSizeBufferDeclaratorSize :: Phantoms.TTerm Syntax.FixedSizeBufferDeclarator -> Phantoms.TTerm Syntax.ConstantExpression
-fixedSizeBufferDeclaratorSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-        Core.projectionField = (Core.Name "size")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedSizeBufferDeclaratorWithName :: Phantoms.TTerm Syntax.FixedSizeBufferDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FixedSizeBufferDeclarator
-fixedSizeBufferDeclaratorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedSizeBufferDeclaratorWithSize :: Phantoms.TTerm Syntax.FixedSizeBufferDeclarator -> Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.FixedSizeBufferDeclarator
-fixedSizeBufferDeclaratorWithSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferDeclarator"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fixedSizeBufferModifierInternal :: Phantoms.TTerm Syntax.FixedSizeBufferModifier
-fixedSizeBufferModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fixedSizeBufferModifierNew :: Phantoms.TTerm Syntax.FixedSizeBufferModifier
-fixedSizeBufferModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fixedSizeBufferModifierPrivate :: Phantoms.TTerm Syntax.FixedSizeBufferModifier
-fixedSizeBufferModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fixedSizeBufferModifierPublic :: Phantoms.TTerm Syntax.FixedSizeBufferModifier
-fixedSizeBufferModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fixedSizeBufferModifierUnsafe :: Phantoms.TTerm Syntax.FixedSizeBufferModifier
-fixedSizeBufferModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FixedSizeBufferModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fixedStatement :: Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm [Syntax.FixedPointerDeclarator] -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.FixedStatement
-fixedStatement pointerType declarators statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointerType"),
-          Core.fieldTerm = (Phantoms.unTTerm pointerType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-fixedStatementDeclarators :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm [Syntax.FixedPointerDeclarator]
-fixedStatementDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedStatementPointerType :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm Syntax.PointerType
-fixedStatementPointerType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-        Core.projectionField = (Core.Name "pointerType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedStatementStatement :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-fixedStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fixedStatementWithDeclarators :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm [Syntax.FixedPointerDeclarator] -> Phantoms.TTerm Syntax.FixedStatement
-fixedStatementWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointerType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-              Core.projectionField = (Core.Name "pointerType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedStatementWithPointerType :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm Syntax.FixedStatement
-fixedStatementWithPointerType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointerType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fixedStatementWithStatement :: Phantoms.TTerm Syntax.FixedStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.FixedStatement
-fixedStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointerType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-              Core.projectionField = (Core.Name "pointerType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FixedStatement"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatingPointTypeDouble :: Phantoms.TTerm Syntax.FloatingPointType
-floatingPointTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FloatingPointType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-floatingPointTypeFloat :: Phantoms.TTerm Syntax.FloatingPointType
-floatingPointTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.FloatingPointType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-forInitializerStatements :: Phantoms.TTerm Syntax.StatementExpressionList -> Phantoms.TTerm Syntax.ForInitializer
-forInitializerStatements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ForInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "statements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInitializerVariable :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.ForInitializer
-forInitializerVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ForInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forStatement :: Phantoms.TTerm (Maybe Syntax.ForInitializer) -> Phantoms.TTerm (Maybe Syntax.BooleanExpression) -> Phantoms.TTerm (Maybe Syntax.StatementExpressionList) -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.ForStatement
-forStatement initializer condition iterator body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iterator"),
-          Core.fieldTerm = (Phantoms.unTTerm iterator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forStatementBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-forStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementCondition :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.BooleanExpression)
-forStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementInitializer :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.ForInitializer)
-forStatementInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementIterator :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.StatementExpressionList)
-forStatementIterator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "iterator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementWithBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iterator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "iterator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStatementWithCondition :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.BooleanExpression) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iterator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "iterator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithInitializer :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.ForInitializer) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iterator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "iterator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithIterator :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.StatementExpressionList) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithIterator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iterator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-foreachStatement :: Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.ForeachStatement
-foreachStatement kind type_ identifier expression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-foreachStatementBody :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-foreachStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foreachStatementExpression :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.Expression
-foreachStatementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foreachStatementIdentifier :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.Identifier
-foreachStatementIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foreachStatementKind :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm (Maybe Syntax.RefKind)
-foreachStatementKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foreachStatementType :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.LocalVariableType
-foreachStatementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foreachStatementWithBody :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.ForeachStatement
-foreachStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-foreachStatementWithExpression :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForeachStatement
-foreachStatementWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-foreachStatementWithIdentifier :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ForeachStatement
-foreachStatementWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-foreachStatementWithKind :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.ForeachStatement
-foreachStatementWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-foreachStatementWithType :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.ForeachStatement
-foreachStatementWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ForeachStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-formalParameterList :: Phantoms.TTerm [Syntax.FixedParameter] -> Phantoms.TTerm (Maybe Syntax.ParameterArray) -> Phantoms.TTerm Syntax.FormalParameterList
-formalParameterList fixed array =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixed"),
-          Core.fieldTerm = (Phantoms.unTTerm fixed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm array)}]}))
-
-formalParameterListArray :: Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm (Maybe Syntax.ParameterArray)
-formalParameterListArray x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-        Core.projectionField = (Core.Name "array")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-formalParameterListFixed :: Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm [Syntax.FixedParameter]
-formalParameterListFixed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-        Core.projectionField = (Core.Name "fixed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-formalParameterListWithArray :: Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm (Maybe Syntax.ParameterArray) -> Phantoms.TTerm Syntax.FormalParameterList
-formalParameterListWithArray original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-              Core.projectionField = (Core.Name "fixed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-formalParameterListWithFixed :: Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm [Syntax.FixedParameter] -> Phantoms.TTerm Syntax.FormalParameterList
-formalParameterListWithFixed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FormalParameterList"),
-              Core.projectionField = (Core.Name "array")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fromClause :: Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FromClause
-fromClause type_ identifier in_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)}]}))
-
-fromClauseIdentifier :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.Identifier
-fromClauseIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fromClauseIn :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.Expression
-fromClauseIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fromClauseType :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm (Maybe Syntax.Type)
-fromClauseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fromClauseWithIdentifier :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FromClause
-fromClauseWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.FromClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fromClauseWithIn :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FromClause
-fromClauseWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fromClauseWithType :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.FromClause
-fromClauseWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.FromClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.csharp.syntax.FromClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-globalAttributeSection :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AttributeList -> Phantoms.TTerm Syntax.GlobalAttributeSection
-globalAttributeSection target attributes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)}]}))
-
-globalAttributeSectionAttributes :: Phantoms.TTerm Syntax.GlobalAttributeSection -> Phantoms.TTerm Syntax.AttributeList
-globalAttributeSectionAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-globalAttributeSectionTarget :: Phantoms.TTerm Syntax.GlobalAttributeSection -> Phantoms.TTerm Syntax.Identifier
-globalAttributeSectionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-globalAttributeSectionWithAttributes :: Phantoms.TTerm Syntax.GlobalAttributeSection -> Phantoms.TTerm Syntax.AttributeList -> Phantoms.TTerm Syntax.GlobalAttributeSection
-globalAttributeSectionWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-globalAttributeSectionWithTarget :: Phantoms.TTerm Syntax.GlobalAttributeSection -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.GlobalAttributeSection
-globalAttributeSectionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GlobalAttributeSection"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-gotoStatementCase :: Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.GotoStatement
-gotoStatementCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.GotoStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-gotoStatementDefault :: Phantoms.TTerm Syntax.GotoStatement
-gotoStatementDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.GotoStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-gotoStatementIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.GotoStatement
-gotoStatementIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.GotoStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-groupClause :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.GroupClause
-groupClause grouped by =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "grouped"),
-          Core.fieldTerm = (Phantoms.unTTerm grouped)},
-        Core.Field {
-          Core.fieldName = (Core.Name "by"),
-          Core.fieldTerm = (Phantoms.unTTerm by)}]}))
-
-groupClauseBy :: Phantoms.TTerm Syntax.GroupClause -> Phantoms.TTerm Syntax.Expression
-groupClauseBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-        Core.projectionField = (Core.Name "by")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-groupClauseGrouped :: Phantoms.TTerm Syntax.GroupClause -> Phantoms.TTerm Syntax.Expression
-groupClauseGrouped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-        Core.projectionField = (Core.Name "grouped")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-groupClauseWithBy :: Phantoms.TTerm Syntax.GroupClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.GroupClause
-groupClauseWithBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "grouped"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-              Core.projectionField = (Core.Name "grouped")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "by"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-groupClauseWithGrouped :: Phantoms.TTerm Syntax.GroupClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.GroupClause
-groupClauseWithGrouped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "grouped"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "by"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.GroupClause"),
-              Core.projectionField = (Core.Name "by")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identifier :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Identifier
-identifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.Identifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-identifierNamespaceOrTypeName :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName
-identifierNamespaceOrTypeName identifier arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-identifierNamespaceOrTypeNameArguments :: Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-identifierNamespaceOrTypeNameArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identifierNamespaceOrTypeNameIdentifier :: Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName -> Phantoms.TTerm Syntax.Identifier
-identifierNamespaceOrTypeNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identifierNamespaceOrTypeNameWithArguments :: Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName
-identifierNamespaceOrTypeNameWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-identifierNamespaceOrTypeNameWithIdentifier :: Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName
-identifierNamespaceOrTypeNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IdentifierNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStatement :: Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.IfStatement
-ifStatement condition ifBranch elseBranch =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm ifBranch)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm elseBranch)}]}))
-
-ifStatementCondition :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.BooleanExpression
-ifStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementElseBranch :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-ifStatementElseBranch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "elseBranch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementIfBranch :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-ifStatementIfBranch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "ifBranch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementWithCondition :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "ifBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "elseBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStatementWithElseBranch :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithElseBranch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "ifBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifStatementWithIfBranch :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithIfBranch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "elseBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implicitlyTypedLocalVariableDeclarationRefVar :: Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclaration
-implicitlyTypedLocalVariableDeclarationRefVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refVar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implicitlyTypedLocalVariableDeclarationVar :: Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclaration
-implicitlyTypedLocalVariableDeclarationVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implicitlyTypedLocalVariableDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator
-implicitlyTypedLocalVariableDeclarator identifier expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-implicitlyTypedLocalVariableDeclaratorExpression :: Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.Expression
-implicitlyTypedLocalVariableDeclaratorExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implicitlyTypedLocalVariableDeclaratorIdentifier :: Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.Identifier
-implicitlyTypedLocalVariableDeclaratorIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implicitlyTypedLocalVariableDeclaratorWithExpression :: Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator
-implicitlyTypedLocalVariableDeclaratorWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-implicitlyTypedLocalVariableDeclaratorWithIdentifier :: Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclarator
-implicitlyTypedLocalVariableDeclaratorWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ImplicitlyTypedLocalVariableDeclarator"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inclusiveOrExpressionBinary :: Phantoms.TTerm Syntax.BinaryInclusiveOrExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression
-inclusiveOrExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inclusiveOrExpressionSimple :: Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm Syntax.InclusiveOrExpression
-inclusiveOrExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InclusiveOrExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-indexerBodyBlock :: Phantoms.TTerm Syntax.AccessorDeclarations -> Phantoms.TTerm Syntax.IndexerBody
-indexerBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-indexerBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IndexerBody
-indexerBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-indexerDeclarationRef :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerDeclaration
-indexerDeclarationRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-indexerDeclarationStandard :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerDeclaration
-indexerDeclarationStandard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "standard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-indexerDeclarator :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.InterfaceType) -> Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm Syntax.IndexerDeclarator
-indexerDeclarator type_ interface parameters =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "interface"),
-          Core.fieldTerm = (Phantoms.unTTerm interface)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)}]}))
-
-indexerDeclaratorInterface :: Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm (Maybe Syntax.InterfaceType)
-indexerDeclaratorInterface x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-        Core.projectionField = (Core.Name "interface")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexerDeclaratorParameters :: Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.FormalParameterList
-indexerDeclaratorParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexerDeclaratorType :: Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.Type
-indexerDeclaratorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexerDeclaratorWithInterface :: Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm (Maybe Syntax.InterfaceType) -> Phantoms.TTerm Syntax.IndexerDeclarator
-indexerDeclaratorWithInterface original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interface"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-indexerDeclaratorWithParameters :: Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm Syntax.IndexerDeclarator
-indexerDeclaratorWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interface"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-              Core.projectionField = (Core.Name "interface")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-indexerDeclaratorWithType :: Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.IndexerDeclarator
-indexerDeclaratorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "interface"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-              Core.projectionField = (Core.Name "interface")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-indexerModifierAbstract :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierExtern :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierExtern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extern"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierInternal :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierNew :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierOverride :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierOverride =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "override"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierPrivate :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierProtected :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierPublic :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierSealed :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierSealed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sealed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierUnsafe :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-indexerModifierVirtual :: Phantoms.TTerm Syntax.IndexerModifier
-indexerModifierVirtual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IndexerModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "virtual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-initializerTargetArguments :: Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm Syntax.InitializerTarget
-initializerTargetArguments x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InitializerTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arguments"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-initializerTargetIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InitializerTarget
-initializerTargetIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InitializerTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-initializerValueExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InitializerValue
-initializerValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InitializerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-initializerValueObjectOrCollection :: Phantoms.TTerm Syntax.ObjectOrCollectionInitializer -> Phantoms.TTerm Syntax.InitializerValue
-initializerValueObjectOrCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InitializerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectOrCollection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralBinary :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralDecimal :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteralHexadecimal :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralHexadecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegerLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hexadecimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integralTypeByte :: Phantoms.TTerm Syntax.IntegralType
-integralTypeByte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeChar :: Phantoms.TTerm Syntax.IntegralType
-integralTypeChar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeInt :: Phantoms.TTerm Syntax.IntegralType
-integralTypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeLong :: Phantoms.TTerm Syntax.IntegralType
-integralTypeLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeSbyte :: Phantoms.TTerm Syntax.IntegralType
-integralTypeSbyte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sbyte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeShort :: Phantoms.TTerm Syntax.IntegralType
-integralTypeShort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeUint :: Phantoms.TTerm Syntax.IntegralType
-integralTypeUint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeUlong :: Phantoms.TTerm Syntax.IntegralType
-integralTypeUlong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ulong"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeUshort :: Phantoms.TTerm Syntax.IntegralType
-integralTypeUshort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ushort"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceAccessors :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceAccessors
-interfaceAccessors attributes get set =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "get"),
-          Core.fieldTerm = (Phantoms.unTTerm get)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm set)}]}))
-
-interfaceAccessorsAttributes :: Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceAccessorsAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceAccessorsGet :: Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceAccessorsGet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-        Core.projectionField = (Core.Name "get")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceAccessorsSet :: Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceAccessorsSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-        Core.projectionField = (Core.Name "set")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceAccessorsWithAttributes :: Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceAccessors
-interfaceAccessorsWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "get"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-              Core.projectionField = (Core.Name "get")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceAccessorsWithGet :: Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceAccessors
-interfaceAccessorsWithGet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "get"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceAccessorsWithSet :: Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceAccessors
-interfaceAccessorsWithSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "get"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceAccessors"),
-              Core.projectionField = (Core.Name "get")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.InterfaceModifier] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.VariantTypeParameters) -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm [Syntax.InterfaceMemberDeclaration] -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclaration attributes modifiers partial name parameters base constraints body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm partial)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-interfaceDeclarationAttributes :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationBase :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceType]
-interfaceDeclarationBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationBody :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceMemberDeclaration]
-interfaceDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationConstraints :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-interfaceDeclarationConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationModifiers :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceModifier]
-interfaceDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationName :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.Identifier
-interfaceDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationParameters :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm (Maybe Syntax.VariantTypeParameters)
-interfaceDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationPartial :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Bool
-interfaceDeclarationPartial x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-        Core.projectionField = (Core.Name "partial")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationWithAttributes :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceDeclarationWithBase :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceDeclarationWithBody :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceMemberDeclaration] -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceDeclarationWithConstraints :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceDeclarationWithModifiers :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceModifier] -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceDeclarationWithName :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceDeclarationWithParameters :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm (Maybe Syntax.VariantTypeParameters) -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceDeclarationWithPartial :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationWithPartial original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceEventDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InterfaceEventDeclaration
-interfaceEventDeclaration attributes new type_ name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm new)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-interfaceEventDeclarationAttributes :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceEventDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceEventDeclarationName :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Syntax.Identifier
-interfaceEventDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceEventDeclarationNew :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Bool
-interfaceEventDeclarationNew x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-        Core.projectionField = (Core.Name "new")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceEventDeclarationType :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Syntax.Type
-interfaceEventDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceEventDeclarationWithAttributes :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceEventDeclaration
-interfaceEventDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceEventDeclarationWithName :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InterfaceEventDeclaration
-interfaceEventDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceEventDeclarationWithNew :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.InterfaceEventDeclaration
-interfaceEventDeclarationWithNew original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceEventDeclarationWithType :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.InterfaceEventDeclaration
-interfaceEventDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceEventDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceIndexerDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclaration attributes new refKind type_ parameters accessors =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm new)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm accessors)}]}))
-
-interfaceIndexerDeclarationAccessors :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.InterfaceAccessors
-interfaceIndexerDeclarationAccessors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-        Core.projectionField = (Core.Name "accessors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceIndexerDeclarationAttributes :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceIndexerDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceIndexerDeclarationNew :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Bool
-interfaceIndexerDeclarationNew x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-        Core.projectionField = (Core.Name "new")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceIndexerDeclarationParameters :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.FormalParameterList
-interfaceIndexerDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceIndexerDeclarationRefKind :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind)
-interfaceIndexerDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceIndexerDeclarationType :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.Type
-interfaceIndexerDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceIndexerDeclarationWithAccessors :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclarationWithAccessors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceIndexerDeclarationWithAttributes :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceIndexerDeclarationWithNew :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclarationWithNew original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceIndexerDeclarationWithParameters :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceIndexerDeclarationWithRefKind :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceIndexerDeclarationWithType :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.InterfaceIndexerDeclaration
-interfaceIndexerDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceIndexerDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMemberDeclarationEvent :: Phantoms.TTerm Syntax.InterfaceEventDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationEvent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "event"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationIndexer :: Phantoms.TTerm Syntax.InterfaceIndexerDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationIndexer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indexer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationMethod :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationProperty :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMethodDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclaration attributes new returnType refKind header =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm new)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)}]}))
-
-interfaceMethodDeclarationAttributes :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfaceMethodDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationHeader :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.InterfaceMethodHeader
-interfaceMethodDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationNew :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Bool
-interfaceMethodDeclarationNew x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "new")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationRefKind :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind)
-interfaceMethodDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationReturnType :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.ReturnType
-interfaceMethodDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationWithAttributes :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodDeclarationWithHeader :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceMethodDeclarationWithNew :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithNew original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodDeclarationWithRefKind :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodDeclarationWithReturnType :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodHeader :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.InterfaceMethodHeader
-interfaceMethodHeader name parameters typeParameters constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-
-interfaceMethodHeaderConstraints :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-interfaceMethodHeaderConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodHeaderName :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm Syntax.Identifier
-interfaceMethodHeaderName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodHeaderParameters :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm (Maybe Syntax.FormalParameterList)
-interfaceMethodHeaderParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodHeaderTypeParameters :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm (Maybe Syntax.TypeParameterList)
-interfaceMethodHeaderTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-        Core.projectionField = (Core.Name "typeParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodHeaderWithConstraints :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.InterfaceMethodHeader
-interfaceMethodHeaderWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceMethodHeaderWithName :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InterfaceMethodHeader
-interfaceMethodHeaderWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodHeaderWithParameters :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm Syntax.InterfaceMethodHeader
-interfaceMethodHeaderWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodHeaderWithTypeParameters :: Phantoms.TTerm Syntax.InterfaceMethodHeader -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm Syntax.InterfaceMethodHeader
-interfaceMethodHeaderWithTypeParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceMethodHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceModifierInternal :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierNew :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierPrivate :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierProtected :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierPublic :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierUnsafe :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfacePropertyDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclaration attributes new refKind type_ name accessors =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm new)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm accessors)}]}))
-
-interfacePropertyDeclarationAccessors :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.InterfaceAccessors
-interfacePropertyDeclarationAccessors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-        Core.projectionField = (Core.Name "accessors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfacePropertyDeclarationAttributes :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-interfacePropertyDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfacePropertyDeclarationName :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.Identifier
-interfacePropertyDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfacePropertyDeclarationNew :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Bool
-interfacePropertyDeclarationNew x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-        Core.projectionField = (Core.Name "new")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfacePropertyDeclarationRefKind :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind)
-interfacePropertyDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfacePropertyDeclarationType :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.Type
-interfacePropertyDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfacePropertyDeclarationWithAccessors :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.InterfaceAccessors -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclarationWithAccessors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfacePropertyDeclarationWithAttributes :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfacePropertyDeclarationWithName :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfacePropertyDeclarationWithNew :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclarationWithNew original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfacePropertyDeclarationWithRefKind :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.RefKind) -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfacePropertyDeclarationWithType :: Phantoms.TTerm Syntax.InterfacePropertyDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.InterfacePropertyDeclaration
-interfacePropertyDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "accessors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InterfacePropertyDeclaration"),
-              Core.projectionField = (Core.Name "accessors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceType :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.InterfaceType
-interfaceType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.InterfaceType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-interpolatedRegularStringExpression :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.InterpolatedRegularStringExpression
-interpolatedRegularStringExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.InterpolatedRegularStringExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-interpolatedStringExpressionRegular :: Phantoms.TTerm Syntax.InterpolatedRegularStringExpression -> Phantoms.TTerm Syntax.InterpolatedStringExpression
-interpolatedStringExpressionRegular x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterpolatedStringExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regular"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interpolatedStringExpressionVerbatim :: Phantoms.TTerm Syntax.InterpolatedVerbatimStringExpression -> Phantoms.TTerm Syntax.InterpolatedStringExpression
-interpolatedStringExpressionVerbatim x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.InterpolatedStringExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "verbatim"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interpolatedVerbatimStringExpression :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.InterpolatedVerbatimStringExpression
-interpolatedVerbatimStringExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.InterpolatedVerbatimStringExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-invocationExpression :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.InvocationExpression
-invocationExpression expression arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-invocationExpressionArguments :: Phantoms.TTerm Syntax.InvocationExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList)
-invocationExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invocationExpressionExpression :: Phantoms.TTerm Syntax.InvocationExpression -> Phantoms.TTerm Syntax.PrimaryExpression
-invocationExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invocationExpressionWithArguments :: Phantoms.TTerm Syntax.InvocationExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.InvocationExpression
-invocationExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-invocationExpressionWithExpression :: Phantoms.TTerm Syntax.InvocationExpression -> Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.InvocationExpression
-invocationExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.InvocationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isPatternExpression :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.IsPatternExpression
-isPatternExpression expression pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-isPatternExpressionExpression :: Phantoms.TTerm Syntax.IsPatternExpression -> Phantoms.TTerm Syntax.RelationalExpression
-isPatternExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isPatternExpressionPattern :: Phantoms.TTerm Syntax.IsPatternExpression -> Phantoms.TTerm Syntax.Pattern
-isPatternExpressionPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isPatternExpressionWithExpression :: Phantoms.TTerm Syntax.IsPatternExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.IsPatternExpression
-isPatternExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isPatternExpressionWithPattern :: Phantoms.TTerm Syntax.IsPatternExpression -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.IsPatternExpression
-isPatternExpressionWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsPatternExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-isTypeExpression :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.IsTypeExpression
-isTypeExpression expression type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-isTypeExpressionExpression :: Phantoms.TTerm Syntax.IsTypeExpression -> Phantoms.TTerm Syntax.RelationalExpression
-isTypeExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isTypeExpressionType :: Phantoms.TTerm Syntax.IsTypeExpression -> Phantoms.TTerm Syntax.Type
-isTypeExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isTypeExpressionWithExpression :: Phantoms.TTerm Syntax.IsTypeExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.IsTypeExpression
-isTypeExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isTypeExpressionWithType :: Phantoms.TTerm Syntax.IsTypeExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.IsTypeExpression
-isTypeExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.IsTypeExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-iterationStatementDo :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementDo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "do"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementFor :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementForeach :: Phantoms.TTerm Syntax.ForeachStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementForeach x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "foreach"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iterationStatementWhile :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.IterationStatement
-iterationStatementWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.IterationStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-joinClause :: Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.JoinClause
-joinClause type_ identifier in_ on equals into =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Phantoms.unTTerm on)},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Phantoms.unTTerm equals)},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Phantoms.unTTerm into)}]}))
-
-joinClauseEquals :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Expression
-joinClauseEquals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-        Core.projectionField = (Core.Name "equals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinClauseIdentifier :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Identifier
-joinClauseIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinClauseIn :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Expression
-joinClauseIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinClauseInto :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm (Maybe Syntax.Identifier)
-joinClauseInto x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-        Core.projectionField = (Core.Name "into")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinClauseOn :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Expression
-joinClauseOn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-        Core.projectionField = (Core.Name "on")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinClauseType :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm (Maybe Syntax.Type)
-joinClauseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinClauseWithEquals :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.JoinClause
-joinClauseWithEquals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "into")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinClauseWithIdentifier :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.JoinClause
-joinClauseWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "equals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "into")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinClauseWithIn :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.JoinClause
-joinClauseWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "equals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "into")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinClauseWithInto :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.JoinClause
-joinClauseWithInto original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "equals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-joinClauseWithOn :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.JoinClause
-joinClauseWithOn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "equals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "into")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinClauseWithType :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.JoinClause
-joinClauseWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "equals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "equals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.JoinClause"),
-              Core.projectionField = (Core.Name "into")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-jumpStatementBreak :: Phantoms.TTerm Syntax.JumpStatement
-jumpStatementBreak =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-jumpStatementContinue :: Phantoms.TTerm Syntax.JumpStatement
-jumpStatementContinue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-jumpStatementGoto :: Phantoms.TTerm Syntax.GotoStatement -> Phantoms.TTerm Syntax.JumpStatement
-jumpStatementGoto x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "goto"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-jumpStatementReturn :: Phantoms.TTerm Syntax.ReturnStatement -> Phantoms.TTerm Syntax.JumpStatement
-jumpStatementReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-jumpStatementThrow :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.JumpStatement
-jumpStatementThrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.JumpStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "throw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keyword :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Keyword
-keyword x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.Keyword"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-labeledStatement :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatement label statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-labeledStatementLabel :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Identifier
-labeledStatementLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementStatement :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-labeledStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementWithLabel :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledStatementWithStatement :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LabeledStatement"),
-      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.csharp.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaExpression :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.AnonymousFunctionSignature -> Phantoms.TTerm Syntax.AnonymousFunctionBody -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpression async signature body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm signature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-lambdaExpressionAsync :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Bool
-lambdaExpressionAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionBody :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.AnonymousFunctionBody
-lambdaExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionSignature :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.AnonymousFunctionSignature
-lambdaExpressionSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "signature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionWithAsync :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaExpressionWithBody :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.AnonymousFunctionBody -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaExpressionWithSignature :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.AnonymousFunctionSignature -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letClause :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetClause
-letClause left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-letClauseLeft :: Phantoms.TTerm Syntax.LetClause -> Phantoms.TTerm Syntax.Identifier
-letClauseLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letClauseRight :: Phantoms.TTerm Syntax.LetClause -> Phantoms.TTerm Syntax.Expression
-letClauseRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letClauseWithLeft :: Phantoms.TTerm Syntax.LetClause -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LetClause
-letClauseWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letClauseWithRight :: Phantoms.TTerm Syntax.LetClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetClause
-letClauseWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LetClause"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalCharacter :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalCharacter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "character"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalInteger :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Syntax.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNull :: Phantoms.TTerm Syntax.Literal
-literalNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalReal :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.Literal
-literalReal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "real"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localConstantDeclaration :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.ConstantDeclarator] -> Phantoms.TTerm Syntax.LocalConstantDeclaration
-localConstantDeclaration type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-localConstantDeclarationDeclarators :: Phantoms.TTerm Syntax.LocalConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantDeclarator]
-localConstantDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localConstantDeclarationType :: Phantoms.TTerm Syntax.LocalConstantDeclaration -> Phantoms.TTerm Syntax.Type
-localConstantDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localConstantDeclarationWithDeclarators :: Phantoms.TTerm Syntax.LocalConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantDeclarator] -> Phantoms.TTerm Syntax.LocalConstantDeclaration
-localConstantDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localConstantDeclarationWithType :: Phantoms.TTerm Syntax.LocalConstantDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.LocalConstantDeclaration
-localConstantDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalConstantDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-localFunctionBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.LocalFunctionBody
-localFunctionBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localFunctionBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LocalFunctionBody
-localFunctionBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localFunctionBodyNullConditionalInvocation :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm Syntax.LocalFunctionBody
-localFunctionBodyNullConditionalInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localFunctionDeclarationRef :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionDeclaration
-localFunctionDeclarationRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localFunctionDeclarationStandard :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionDeclaration
-localFunctionDeclarationStandard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "standard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localFunctionHeader :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.LocalFunctionHeader
-localFunctionHeader identifier typeParameters parameters constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-
-localFunctionHeaderConstraints :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-localFunctionHeaderConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localFunctionHeaderIdentifier :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.Identifier
-localFunctionHeaderIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localFunctionHeaderParameters :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.FormalParameterList
-localFunctionHeaderParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localFunctionHeaderTypeParameters :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm (Maybe Syntax.TypeParameterList)
-localFunctionHeaderTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-        Core.projectionField = (Core.Name "typeParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localFunctionHeaderWithConstraints :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.LocalFunctionHeader
-localFunctionHeaderWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localFunctionHeaderWithIdentifier :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LocalFunctionHeader
-localFunctionHeaderWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-localFunctionHeaderWithParameters :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.FormalParameterList -> Phantoms.TTerm Syntax.LocalFunctionHeader
-localFunctionHeaderWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-localFunctionHeaderWithTypeParameters :: Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm Syntax.LocalFunctionHeader
-localFunctionHeaderWithTypeParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-localFunctionModifierAsync :: Phantoms.TTerm Syntax.LocalFunctionModifier
-localFunctionModifierAsync =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "async"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-localFunctionModifierRef :: Phantoms.TTerm Syntax.RefLocalFunctionModifier -> Phantoms.TTerm Syntax.LocalFunctionModifier
-localFunctionModifierRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalFunctionModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableDeclarationExplicitlyTyped :: Phantoms.TTerm Syntax.ExplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclarationExplicitlyTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicitlyTyped"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableDeclarationImplicitlyTyped :: Phantoms.TTerm Syntax.ImplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclarationImplicitlyTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicitlyTyped"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableDeclarationRef :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclarationRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableInitializerExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LocalVariableInitializer
-localVariableInitializerExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableInitializerInitializer :: Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.LocalVariableInitializer
-localVariableInitializerInitializer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "initializer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableTypeType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.LocalVariableType
-localVariableTypeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableTypeVar :: Phantoms.TTerm Syntax.LocalVariableType
-localVariableTypeVar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.LocalVariableType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-lockStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.LockStatement
-lockStatement expression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-lockStatementBody :: Phantoms.TTerm Syntax.LockStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-lockStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lockStatementExpression :: Phantoms.TTerm Syntax.LockStatement -> Phantoms.TTerm Syntax.Expression
-lockStatementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lockStatementWithBody :: Phantoms.TTerm Syntax.LockStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.LockStatement
-lockStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lockStatementWithExpression :: Phantoms.TTerm Syntax.LockStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LockStatement
-lockStatementWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.LockStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberAccess :: Phantoms.TTerm Syntax.MemberAccessHead -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.MemberAccess
-memberAccess head identifier typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-memberAccessHead :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm Syntax.MemberAccessHead
-memberAccessHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberAccessHeadPredefined :: Phantoms.TTerm Syntax.PredefinedType -> Phantoms.TTerm Syntax.MemberAccessHead
-memberAccessHeadPredefined x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccessHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predefined"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberAccessHeadPrimary :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.MemberAccessHead
-memberAccessHeadPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccessHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberAccessHeadQualifiedAlias :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.MemberAccessHead
-memberAccessHeadQualifiedAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccessHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualifiedAlias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberAccessIdentifier :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm Syntax.Identifier
-memberAccessIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberAccessTypeArguments :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-memberAccessTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberAccessWithHead :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm Syntax.MemberAccessHead -> Phantoms.TTerm Syntax.MemberAccess
-memberAccessWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberAccessWithIdentifier :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MemberAccess
-memberAccessWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberAccessWithTypeArguments :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.MemberAccess
-memberAccessWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberAccess"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-memberDeclaratorAssignment :: Phantoms.TTerm Syntax.AssignmentMemberDeclarator -> Phantoms.TTerm Syntax.MemberDeclarator
-memberDeclaratorAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclaratorBaseAccess :: Phantoms.TTerm Syntax.BaseAccess -> Phantoms.TTerm Syntax.MemberDeclarator
-memberDeclaratorBaseAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "baseAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclaratorList :: Phantoms.TTerm [Syntax.MemberDeclarator] -> Phantoms.TTerm Syntax.MemberDeclaratorList
-memberDeclaratorList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.MemberDeclaratorList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-memberDeclaratorMemberAccess :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm Syntax.MemberDeclarator
-memberDeclaratorMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "memberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclaratorName :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm Syntax.MemberDeclarator
-memberDeclaratorName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberDeclaratorNullConditionalProjectionInitializer :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm Syntax.MemberDeclarator
-memberDeclaratorNullConditionalProjectionInitializer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MemberDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalProjectionInitializer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberInitializer :: Phantoms.TTerm Syntax.InitializerTarget -> Phantoms.TTerm Syntax.InitializerValue -> Phantoms.TTerm Syntax.MemberInitializer
-memberInitializer target value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-memberInitializerTarget :: Phantoms.TTerm Syntax.MemberInitializer -> Phantoms.TTerm Syntax.InitializerTarget
-memberInitializerTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberInitializer"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberInitializerValue :: Phantoms.TTerm Syntax.MemberInitializer -> Phantoms.TTerm Syntax.InitializerValue
-memberInitializerValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberInitializer"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberInitializerWithTarget :: Phantoms.TTerm Syntax.MemberInitializer -> Phantoms.TTerm Syntax.InitializerTarget -> Phantoms.TTerm Syntax.MemberInitializer
-memberInitializerWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.MemberInitializer"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberInitializerWithValue :: Phantoms.TTerm Syntax.MemberInitializer -> Phantoms.TTerm Syntax.InitializerValue -> Phantoms.TTerm Syntax.MemberInitializer
-memberInitializerWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberInitializer"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-memberName :: Phantoms.TTerm (Maybe Syntax.TypeName) -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MemberName
-memberName interfaceType identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaceType"),
-          Core.fieldTerm = (Phantoms.unTTerm interfaceType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-memberNameIdentifier :: Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.Identifier
-memberNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberNameInterfaceType :: Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm (Maybe Syntax.TypeName)
-memberNameInterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-        Core.projectionField = (Core.Name "interfaceType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberNameWithIdentifier :: Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MemberName
-memberNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-              Core.projectionField = (Core.Name "interfaceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-memberNameWithInterfaceType :: Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm (Maybe Syntax.TypeName) -> Phantoms.TTerm Syntax.MemberName
-memberNameWithInterfaceType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaceType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MemberName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.MethodBody
-methodBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodBodyEmpty :: Phantoms.TTerm Syntax.MethodBody
-methodBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MethodBody
-methodBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodBodyNullConditionalInvocation :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm Syntax.MethodBody
-methodBodyNullConditionalInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodDeclarationRefReturn :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclarationRefReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refReturn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodDeclarationStandard :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclarationStandard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "standard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodHeader :: Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.MethodHeader
-methodHeader name typeParameters parameters constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-
-methodHeaderConstraints :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-methodHeaderConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderName :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MemberName
-methodHeaderName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderParameters :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm (Maybe Syntax.FormalParameterList)
-methodHeaderParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderTypeParameters :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm (Maybe Syntax.TypeParameterList)
-methodHeaderTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "typeParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderWithConstraints :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodHeaderWithName :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodHeaderWithParameters :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm (Maybe Syntax.FormalParameterList) -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodHeaderWithTypeParameters :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithTypeParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodModifierAsync :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierAsync =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "async"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierRef :: Phantoms.TTerm Syntax.RefMethodModifier -> Phantoms.TTerm Syntax.MethodModifier
-methodModifierRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodModifiers :: Phantoms.TTerm [Syntax.MethodModifier] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodModifiers
-methodModifiers modifiers partial =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm partial)}]}))
-
-methodModifiersModifiers :: Phantoms.TTerm Syntax.MethodModifiers -> Phantoms.TTerm [Syntax.MethodModifier]
-methodModifiersModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodModifiersPartial :: Phantoms.TTerm Syntax.MethodModifiers -> Phantoms.TTerm Bool
-methodModifiersPartial x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-        Core.projectionField = (Core.Name "partial")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodModifiersWithModifiers :: Phantoms.TTerm Syntax.MethodModifiers -> Phantoms.TTerm [Syntax.MethodModifier] -> Phantoms.TTerm Syntax.MethodModifiers
-methodModifiersWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodModifiersWithPartial :: Phantoms.TTerm Syntax.MethodModifiers -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodModifiers
-methodModifiersWithPartial original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.MethodModifiers"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiplicativeExpressionBinary :: Phantoms.TTerm Syntax.BinaryMultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionSimple :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeOperatorDivide :: Phantoms.TTerm Syntax.MultiplicativeOperator
-multiplicativeOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MultiplicativeOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-multiplicativeOperatorModulo :: Phantoms.TTerm Syntax.MultiplicativeOperator
-multiplicativeOperatorModulo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MultiplicativeOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulo"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-multiplicativeOperatorTimes :: Phantoms.TTerm Syntax.MultiplicativeOperator
-multiplicativeOperatorTimes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.MultiplicativeOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-namedArgument :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AttributeArgumentExpression -> Phantoms.TTerm Syntax.NamedArgument
-namedArgument name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-namedArgumentList :: Phantoms.TTerm [Syntax.NamedArgument] -> Phantoms.TTerm Syntax.NamedArgumentList
-namedArgumentList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.NamedArgumentList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-namedArgumentName :: Phantoms.TTerm Syntax.NamedArgument -> Phantoms.TTerm Syntax.Identifier
-namedArgumentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedArgument"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedArgumentValue :: Phantoms.TTerm Syntax.NamedArgument -> Phantoms.TTerm Syntax.AttributeArgumentExpression
-namedArgumentValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedArgument"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedArgumentWithName :: Phantoms.TTerm Syntax.NamedArgument -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.NamedArgument
-namedArgumentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.NamedArgument"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedArgumentWithValue :: Phantoms.TTerm Syntax.NamedArgument -> Phantoms.TTerm Syntax.AttributeArgumentExpression -> Phantoms.TTerm Syntax.NamedArgument
-namedArgumentWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedArgument"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedEntity :: Phantoms.TTerm Syntax.NamedEntityTarget -> Phantoms.TTerm [Syntax.NamedEntityPart] -> Phantoms.TTerm Syntax.NamedEntity
-namedEntity target parts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm parts)}]}))
-
-namedEntityPart :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.NamedEntityPart
-namedEntityPart identifier typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-namedEntityPartIdentifier :: Phantoms.TTerm Syntax.NamedEntityPart -> Phantoms.TTerm Syntax.Identifier
-namedEntityPartIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedEntityPartTypeArguments :: Phantoms.TTerm Syntax.NamedEntityPart -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-namedEntityPartTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedEntityPartWithIdentifier :: Phantoms.TTerm Syntax.NamedEntityPart -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.NamedEntityPart
-namedEntityPartWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedEntityPartWithTypeArguments :: Phantoms.TTerm Syntax.NamedEntityPart -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.NamedEntityPart
-namedEntityPartWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityPart"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedEntityParts :: Phantoms.TTerm Syntax.NamedEntity -> Phantoms.TTerm [Syntax.NamedEntityPart]
-namedEntityParts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-        Core.projectionField = (Core.Name "parts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedEntityTarget :: Phantoms.TTerm Syntax.NamedEntity -> Phantoms.TTerm Syntax.NamedEntityTarget
-namedEntityTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedEntityTargetBase :: Phantoms.TTerm Syntax.NamedEntityTarget
-namedEntityTargetBase =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "base"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-namedEntityTargetName :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm Syntax.NamedEntityTarget
-namedEntityTargetName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedEntityTargetPredefinedType :: Phantoms.TTerm Syntax.PredefinedType -> Phantoms.TTerm Syntax.NamedEntityTarget
-namedEntityTargetPredefinedType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predefinedType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedEntityTargetQualifiedAliasMember :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.NamedEntityTarget
-namedEntityTargetQualifiedAliasMember x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualifiedAliasMember"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedEntityTargetThis :: Phantoms.TTerm Syntax.NamedEntityTarget
-namedEntityTargetThis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntityTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-namedEntityWithParts :: Phantoms.TTerm Syntax.NamedEntity -> Phantoms.TTerm [Syntax.NamedEntityPart] -> Phantoms.TTerm Syntax.NamedEntity
-namedEntityWithParts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedEntityWithTarget :: Phantoms.TTerm Syntax.NamedEntity -> Phantoms.TTerm Syntax.NamedEntityTarget -> Phantoms.TTerm Syntax.NamedEntity
-namedEntityWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamedEntity"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namespaceBody :: Phantoms.TTerm [Syntax.ExternAliasDirective] -> Phantoms.TTerm [Syntax.UsingDirective] -> Phantoms.TTerm [Syntax.NamespaceMemberDeclaration] -> Phantoms.TTerm Syntax.NamespaceBody
-namespaceBody externs usings members =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Phantoms.unTTerm externs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Phantoms.unTTerm usings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Phantoms.unTTerm members)}]}))
-
-namespaceBodyExterns :: Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm [Syntax.ExternAliasDirective]
-namespaceBodyExterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-        Core.projectionField = (Core.Name "externs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceBodyMembers :: Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm [Syntax.NamespaceMemberDeclaration]
-namespaceBodyMembers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-        Core.projectionField = (Core.Name "members")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceBodyUsings :: Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm [Syntax.UsingDirective]
-namespaceBodyUsings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-        Core.projectionField = (Core.Name "usings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceBodyWithExterns :: Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm [Syntax.ExternAliasDirective] -> Phantoms.TTerm Syntax.NamespaceBody
-namespaceBodyWithExterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-              Core.projectionField = (Core.Name "usings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-              Core.projectionField = (Core.Name "members")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namespaceBodyWithMembers :: Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm [Syntax.NamespaceMemberDeclaration] -> Phantoms.TTerm Syntax.NamespaceBody
-namespaceBodyWithMembers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-              Core.projectionField = (Core.Name "externs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-              Core.projectionField = (Core.Name "usings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namespaceBodyWithUsings :: Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm [Syntax.UsingDirective] -> Phantoms.TTerm Syntax.NamespaceBody
-namespaceBodyWithUsings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "externs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-              Core.projectionField = (Core.Name "externs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "members"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceBody"),
-              Core.projectionField = (Core.Name "members")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namespaceDeclaration :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm Syntax.NamespaceDeclaration
-namespaceDeclaration name body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-namespaceDeclarationBody :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm Syntax.NamespaceBody
-namespaceDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceDeclarationName :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm Syntax.QualifiedIdentifier
-namespaceDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namespaceDeclarationWithBody :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm Syntax.NamespaceBody -> Phantoms.TTerm Syntax.NamespaceDeclaration
-namespaceDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namespaceDeclarationWithName :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm Syntax.NamespaceDeclaration
-namespaceDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namespaceMemberDeclarationNamespace :: Phantoms.TTerm Syntax.NamespaceDeclaration -> Phantoms.TTerm Syntax.NamespaceMemberDeclaration
-namespaceMemberDeclarationNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "namespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namespaceMemberDeclarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.NamespaceMemberDeclaration
-namespaceMemberDeclarationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namespaceName :: Phantoms.TTerm Syntax.NamespaceOrTypeName -> Phantoms.TTerm Syntax.NamespaceName
-namespaceName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.NamespaceName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-namespaceOrTypeNameAlias :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-namespaceOrTypeNameAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceOrTypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namespaceOrTypeNameIdentifier :: Phantoms.TTerm Syntax.IdentifierNamespaceOrTypeName -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-namespaceOrTypeNameIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceOrTypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namespaceOrTypeNameQualified :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-namespaceOrTypeNameQualified x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NamespaceOrTypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualified"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonArrayTypeArrayCreationExpression :: Phantoms.TTerm Syntax.NonArrayType -> Phantoms.TTerm Syntax.ExpressionList -> Phantoms.TTerm [Syntax.RankSpecifier] -> Phantoms.TTerm (Maybe Syntax.ArrayInitializer) -> Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression
-nonArrayTypeArrayCreationExpression type_ expressions rankSpecifiers initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm rankSpecifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-nonArrayTypeArrayCreationExpressionExpressions :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ExpressionList
-nonArrayTypeArrayCreationExpressionExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArrayTypeArrayCreationExpressionInitializer :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm (Maybe Syntax.ArrayInitializer)
-nonArrayTypeArrayCreationExpressionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArrayTypeArrayCreationExpressionRankSpecifiers :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm [Syntax.RankSpecifier]
-nonArrayTypeArrayCreationExpressionRankSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-        Core.projectionField = (Core.Name "rankSpecifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArrayTypeArrayCreationExpressionType :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeArrayCreationExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArrayTypeArrayCreationExpressionWithExpressions :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.ExpressionList -> Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression
-nonArrayTypeArrayCreationExpressionWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "rankSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nonArrayTypeArrayCreationExpressionWithInitializer :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm (Maybe Syntax.ArrayInitializer) -> Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression
-nonArrayTypeArrayCreationExpressionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "rankSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nonArrayTypeArrayCreationExpressionWithRankSpecifiers :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm [Syntax.RankSpecifier] -> Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression
-nonArrayTypeArrayCreationExpressionWithRankSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nonArrayTypeArrayCreationExpressionWithType :: Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression -> Phantoms.TTerm Syntax.NonArrayType -> Phantoms.TTerm Syntax.NonArrayTypeArrayCreationExpression
-nonArrayTypeArrayCreationExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "rankSpecifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayTypeArrayCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nonArrayTypeClass :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonArrayTypeDelegate :: Phantoms.TTerm Syntax.DelegateType -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeDelegate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delegate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonArrayTypeDynamic :: Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeDynamic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dynamic"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nonArrayTypeInterface :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonArrayTypeParameter :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeParameter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonArrayTypePointer :: Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypePointer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonArrayTypeValue :: Phantoms.TTerm Syntax.ValueType -> Phantoms.TTerm Syntax.NonArrayType
-nonArrayTypeValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonArrayType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonAssignmentExpressionConditional :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.NonAssignmentExpression
-nonAssignmentExpressionConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonAssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonAssignmentExpressionDeclaration :: Phantoms.TTerm Syntax.DeclarationExpression -> Phantoms.TTerm Syntax.NonAssignmentExpression
-nonAssignmentExpressionDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonAssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonAssignmentExpressionLambda :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.NonAssignmentExpression
-nonAssignmentExpressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonAssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonAssignmentExpressionQuery :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm Syntax.NonAssignmentExpression
-nonAssignmentExpressionQuery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NonAssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "query"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullCoalescingExpressionBinary :: Phantoms.TTerm Syntax.BinaryNullCoalescingExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression
-nullCoalescingExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NullCoalescingExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullCoalescingExpressionSimple :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression
-nullCoalescingExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NullCoalescingExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullCoalescingExpressionThrow :: Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression
-nullCoalescingExpressionThrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NullCoalescingExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "throw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullConditionalElementAccess :: Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm [Syntax.DependentAccess] -> Phantoms.TTerm Syntax.NullConditionalElementAccess
-nullConditionalElementAccess expression arguments dependentAccess =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm dependentAccess)}]}))
-
-nullConditionalElementAccessArguments :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm Syntax.ArgumentList
-nullConditionalElementAccessArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalElementAccessDependentAccess :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm [Syntax.DependentAccess]
-nullConditionalElementAccessDependentAccess x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-        Core.projectionField = (Core.Name "dependentAccess")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalElementAccessExpression :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-nullConditionalElementAccessExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalElementAccessWithArguments :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm Syntax.NullConditionalElementAccess
-nullConditionalElementAccessWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-              Core.projectionField = (Core.Name "dependentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalElementAccessWithDependentAccess :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm [Syntax.DependentAccess] -> Phantoms.TTerm Syntax.NullConditionalElementAccess
-nullConditionalElementAccessWithDependentAccess original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullConditionalElementAccessWithExpression :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.NullConditionalElementAccess
-nullConditionalElementAccessWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalElementAccess"),
-              Core.projectionField = (Core.Name "dependentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalInvocationExpression :: Phantoms.TTerm Syntax.NullConditionalInvocationExpressionHead -> Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.NullConditionalInvocationExpression
-nullConditionalInvocationExpression head arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-nullConditionalInvocationExpressionArguments :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList)
-nullConditionalInvocationExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalInvocationExpressionHead :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm Syntax.NullConditionalInvocationExpressionHead
-nullConditionalInvocationExpressionHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalInvocationExpressionHeadElement :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm Syntax.NullConditionalInvocationExpressionHead
-nullConditionalInvocationExpressionHeadElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpressionHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "element"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullConditionalInvocationExpressionHeadMember :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm Syntax.NullConditionalInvocationExpressionHead
-nullConditionalInvocationExpressionHeadMember x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpressionHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "member"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullConditionalInvocationExpressionWithArguments :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.NullConditionalInvocationExpression
-nullConditionalInvocationExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullConditionalInvocationExpressionWithHead :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm Syntax.NullConditionalInvocationExpressionHead -> Phantoms.TTerm Syntax.NullConditionalInvocationExpression
-nullConditionalInvocationExpressionWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalInvocationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalMemberAccess :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm [Syntax.DependentAccess] -> Phantoms.TTerm Syntax.NullConditionalMemberAccess
-nullConditionalMemberAccess expression identifier typeArguments dependentAccess =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm dependentAccess)}]}))
-
-nullConditionalMemberAccessDependentAccess :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm [Syntax.DependentAccess]
-nullConditionalMemberAccessDependentAccess x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-        Core.projectionField = (Core.Name "dependentAccess")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalMemberAccessExpression :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm Syntax.PrimaryExpression
-nullConditionalMemberAccessExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalMemberAccessIdentifier :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm Syntax.Identifier
-nullConditionalMemberAccessIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalMemberAccessTypeArguments :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-nullConditionalMemberAccessTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalMemberAccessWithDependentAccess :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm [Syntax.DependentAccess] -> Phantoms.TTerm Syntax.NullConditionalMemberAccess
-nullConditionalMemberAccessWithDependentAccess original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullConditionalMemberAccessWithExpression :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.NullConditionalMemberAccess
-nullConditionalMemberAccessWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "dependentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalMemberAccessWithIdentifier :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.NullConditionalMemberAccess
-nullConditionalMemberAccessWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "dependentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalMemberAccessWithTypeArguments :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.NullConditionalMemberAccess
-nullConditionalMemberAccessWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalMemberAccess"),
-              Core.projectionField = (Core.Name "dependentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalProjectionInitializer :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.NullConditionalProjectionInitializer
-nullConditionalProjectionInitializer expression identifier typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-nullConditionalProjectionInitializerExpression :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm Syntax.PrimaryExpression
-nullConditionalProjectionInitializerExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalProjectionInitializerIdentifier :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm Syntax.Identifier
-nullConditionalProjectionInitializerIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalProjectionInitializerTypeArguments :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-nullConditionalProjectionInitializerTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullConditionalProjectionInitializerWithExpression :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.NullConditionalProjectionInitializer
-nullConditionalProjectionInitializerWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalProjectionInitializerWithIdentifier :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.NullConditionalProjectionInitializer
-nullConditionalProjectionInitializerWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullConditionalProjectionInitializerWithTypeArguments :: Phantoms.TTerm Syntax.NullConditionalProjectionInitializer -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.NullConditionalProjectionInitializer
-nullConditionalProjectionInitializerWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.NullConditionalProjectionInitializer"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-numericTypeDecimal :: Phantoms.TTerm Syntax.NumericType
-numericTypeDecimal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-numericTypeFloatingPoint :: Phantoms.TTerm Syntax.FloatingPointType -> Phantoms.TTerm Syntax.NumericType
-numericTypeFloatingPoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floatingPoint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeIntegral :: Phantoms.TTerm Syntax.IntegralType -> Phantoms.TTerm Syntax.NumericType
-numericTypeIntegral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectCreationExpression :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm (Maybe Syntax.ObjectOrCollectionInitializer) -> Phantoms.TTerm Syntax.ObjectCreationExpression
-objectCreationExpression type_ arguments initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-objectCreationExpressionArguments :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList)
-objectCreationExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectCreationExpressionInitializer :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm (Maybe Syntax.ObjectOrCollectionInitializer)
-objectCreationExpressionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectCreationExpressionType :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm Syntax.Type
-objectCreationExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectCreationExpressionWithArguments :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm (Maybe Syntax.ArgumentList) -> Phantoms.TTerm Syntax.ObjectCreationExpression
-objectCreationExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectCreationExpressionWithInitializer :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm (Maybe Syntax.ObjectOrCollectionInitializer) -> Phantoms.TTerm Syntax.ObjectCreationExpression
-objectCreationExpressionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectCreationExpressionWithType :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ObjectCreationExpression
-objectCreationExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectOrCollectionInitializerCollection :: Phantoms.TTerm [Syntax.ElementInitializer] -> Phantoms.TTerm Syntax.ObjectOrCollectionInitializer
-objectOrCollectionInitializerCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectOrCollectionInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectOrCollectionInitializerObject :: Phantoms.TTerm [Syntax.MemberInitializer] -> Phantoms.TTerm Syntax.ObjectOrCollectionInitializer
-objectOrCollectionInitializerObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ObjectOrCollectionInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operatorBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.OperatorBody
-operatorBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operatorBodyEmpty :: Phantoms.TTerm Syntax.OperatorBody
-operatorBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-operatorBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.OperatorBody
-operatorBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operatorDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.OperatorModifier] -> Phantoms.TTerm Syntax.OperatorDeclarator -> Phantoms.TTerm Syntax.OperatorBody -> Phantoms.TTerm Syntax.OperatorDeclaration
-operatorDeclaration attributes modifiers declarator body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm declarator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-operatorDeclarationAttributes :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-operatorDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operatorDeclarationBody :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm Syntax.OperatorBody
-operatorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operatorDeclarationDeclarator :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm Syntax.OperatorDeclarator
-operatorDeclarationDeclarator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-        Core.projectionField = (Core.Name "declarator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operatorDeclarationModifiers :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm [Syntax.OperatorModifier]
-operatorDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operatorDeclarationWithAttributes :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.OperatorDeclaration
-operatorDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operatorDeclarationWithBody :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm Syntax.OperatorBody -> Phantoms.TTerm Syntax.OperatorDeclaration
-operatorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-operatorDeclarationWithDeclarator :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm Syntax.OperatorDeclarator -> Phantoms.TTerm Syntax.OperatorDeclaration
-operatorDeclarationWithDeclarator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operatorDeclarationWithModifiers :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm [Syntax.OperatorModifier] -> Phantoms.TTerm Syntax.OperatorDeclaration
-operatorDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operatorDeclaratorBinary :: Phantoms.TTerm Syntax.BinaryOperatorDeclarator -> Phantoms.TTerm Syntax.OperatorDeclarator
-operatorDeclaratorBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operatorDeclaratorConversion :: Phantoms.TTerm Syntax.ConversionOperatorDeclarator -> Phantoms.TTerm Syntax.OperatorDeclarator
-operatorDeclaratorConversion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conversion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operatorDeclaratorUnary :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.OperatorDeclarator
-operatorDeclaratorUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorDeclarator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operatorModifierExtern :: Phantoms.TTerm Syntax.OperatorModifier
-operatorModifierExtern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extern"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-operatorModifierPublic :: Phantoms.TTerm Syntax.OperatorModifier
-operatorModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-operatorModifierStatic :: Phantoms.TTerm Syntax.OperatorModifier
-operatorModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-operatorModifierUnsafe :: Phantoms.TTerm Syntax.OperatorModifier
-operatorModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OperatorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ordering :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.OrderingDirection) -> Phantoms.TTerm Syntax.Ordering
-ordering expression direction =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm direction)}]}))
-
-orderingDirection :: Phantoms.TTerm Syntax.Ordering -> Phantoms.TTerm (Maybe Syntax.OrderingDirection)
-orderingDirection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-        Core.projectionField = (Core.Name "direction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderingDirectionAscending :: Phantoms.TTerm Syntax.OrderingDirection
-orderingDirectionAscending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OrderingDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderingDirectionDescending :: Phantoms.TTerm Syntax.OrderingDirection
-orderingDirectionDescending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OrderingDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "descending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderingExpression :: Phantoms.TTerm Syntax.Ordering -> Phantoms.TTerm Syntax.Expression
-orderingExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderingWithDirection :: Phantoms.TTerm Syntax.Ordering -> Phantoms.TTerm (Maybe Syntax.OrderingDirection) -> Phantoms.TTerm Syntax.Ordering
-orderingWithDirection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orderingWithExpression :: Phantoms.TTerm Syntax.Ordering -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Ordering
-orderingWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.Ordering"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-overloadableBinaryOperatorAdd :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorAnd :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorDivide :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorEqual :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorGreaterThan :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorGreaterThanOrEqual :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorGreaterThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorLeftShift :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorLeftShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorLessThan :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorLessThanOrEqual :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorLessThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorModulus :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorModulus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorMultiply :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorNotEqual :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorOr :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorRightShift :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorRightShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorSubtract :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorSubtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableBinaryOperatorXor :: Phantoms.TTerm Syntax.OverloadableBinaryOperator
-overloadableBinaryOperatorXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableBinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorComplement :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorComplement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "complement"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorDecrement :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorDecrement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decrement"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorFalse :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "false"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorIncrement :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorIncrement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "increment"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorMinus :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorNot :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorPlus :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overloadableUnaryOperatorTrue :: Phantoms.TTerm Syntax.OverloadableUnaryOperator
-overloadableUnaryOperatorTrue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.OverloadableUnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "true"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parameterArray :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ParameterArray
-parameterArray attributes type_ identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-parameterArrayAttributes :: Phantoms.TTerm Syntax.ParameterArray -> Phantoms.TTerm (Maybe Syntax.Attributes)
-parameterArrayAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterArrayIdentifier :: Phantoms.TTerm Syntax.ParameterArray -> Phantoms.TTerm Syntax.Identifier
-parameterArrayIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterArrayType :: Phantoms.TTerm Syntax.ParameterArray -> Phantoms.TTerm Syntax.ArrayType
-parameterArrayType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterArrayWithAttributes :: Phantoms.TTerm Syntax.ParameterArray -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.ParameterArray
-parameterArrayWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterArrayWithIdentifier :: Phantoms.TTerm Syntax.ParameterArray -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ParameterArray
-parameterArrayWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parameterArrayWithType :: Phantoms.TTerm Syntax.ParameterArray -> Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ParameterArray
-parameterArrayWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterArray"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterModeModifierIn :: Phantoms.TTerm Syntax.ParameterModeModifier
-parameterModeModifierIn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterModeModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parameterModeModifierOut :: Phantoms.TTerm Syntax.ParameterModeModifier
-parameterModeModifierOut =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterModeModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "out"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parameterModeModifierRef :: Phantoms.TTerm Syntax.ParameterModeModifier
-parameterModeModifierRef =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterModeModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parameterModifierMode :: Phantoms.TTerm Syntax.ParameterModeModifier -> Phantoms.TTerm Syntax.ParameterModifier
-parameterModifierMode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mode"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parameterModifierThis :: Phantoms.TTerm Syntax.ParameterModifier
-parameterModifierThis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ParameterModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-patternConstant :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Pattern
-patternConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternDeclaration :: Phantoms.TTerm Syntax.DeclarationPattern -> Phantoms.TTerm Syntax.Pattern
-patternDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternVar :: Phantoms.TTerm Syntax.Designation -> Phantoms.TTerm Syntax.Pattern
-patternVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pointerElementAccess :: Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PointerElementAccess
-pointerElementAccess pointer index =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm pointer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm index)}]}))
-
-pointerElementAccessIndex :: Phantoms.TTerm Syntax.PointerElementAccess -> Phantoms.TTerm Syntax.Expression
-pointerElementAccessIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-        Core.projectionField = (Core.Name "index")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerElementAccessPointer :: Phantoms.TTerm Syntax.PointerElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-pointerElementAccessPointer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-        Core.projectionField = (Core.Name "pointer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerElementAccessWithIndex :: Phantoms.TTerm Syntax.PointerElementAccess -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PointerElementAccess
-pointerElementAccessWithIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-              Core.projectionField = (Core.Name "pointer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pointerElementAccessWithPointer :: Phantoms.TTerm Syntax.PointerElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.PointerElementAccess
-pointerElementAccessWithPointer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerElementAccess"),
-              Core.projectionField = (Core.Name "index")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pointerMemberAccess :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.PointerMemberAccess
-pointerMemberAccess pointer member typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm pointer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm member)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-pointerMemberAccessMember :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm Syntax.Identifier
-pointerMemberAccessMember x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-        Core.projectionField = (Core.Name "member")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerMemberAccessPointer :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm Syntax.PrimaryExpression
-pointerMemberAccessPointer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-        Core.projectionField = (Core.Name "pointer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerMemberAccessTypeArguments :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-pointerMemberAccessTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointerMemberAccessWithMember :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.PointerMemberAccess
-pointerMemberAccessWithMember original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-              Core.projectionField = (Core.Name "pointer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pointerMemberAccessWithPointer :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.PointerMemberAccess
-pointerMemberAccessWithPointer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-              Core.projectionField = (Core.Name "member")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pointerMemberAccessWithTypeArguments :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.PointerMemberAccess
-pointerMemberAccessWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-              Core.projectionField = (Core.Name "pointer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PointerMemberAccess"),
-              Core.projectionField = (Core.Name "member")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pointerTypePointerDepth :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.PointerType
-pointerTypePointerDepth x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PointerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointerDepth"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pointerTypeValueType :: Phantoms.TTerm (Maybe Syntax.ValueType) -> Phantoms.TTerm Syntax.PointerType
-pointerTypeValueType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PointerType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-positionalArgument :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.AttributeArgumentExpression -> Phantoms.TTerm Syntax.PositionalArgument
-positionalArgument name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-positionalArgumentList :: Phantoms.TTerm [Syntax.PositionalArgument] -> Phantoms.TTerm Syntax.PositionalArgumentList
-positionalArgumentList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgumentList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-positionalArgumentName :: Phantoms.TTerm Syntax.PositionalArgument -> Phantoms.TTerm (Maybe Syntax.Identifier)
-positionalArgumentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgument"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-positionalArgumentValue :: Phantoms.TTerm Syntax.PositionalArgument -> Phantoms.TTerm Syntax.AttributeArgumentExpression
-positionalArgumentValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgument"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-positionalArgumentWithName :: Phantoms.TTerm Syntax.PositionalArgument -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.PositionalArgument
-positionalArgumentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.csharp.syntax.PositionalArgument"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-positionalArgumentWithValue :: Phantoms.TTerm Syntax.PositionalArgument -> Phantoms.TTerm Syntax.AttributeArgumentExpression -> Phantoms.TTerm Syntax.PositionalArgument
-positionalArgumentWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.PositionalArgument"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-predefinedTypeBool :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeBool =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeByte :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeByte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeChar :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeChar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeDecimal :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeDecimal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeDouble :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeFloat :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeInt :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeLong :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeObject :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeObject =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeSbyte :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeSbyte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sbyte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeShort :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeShort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeString :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeUint :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeUint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeUlong :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeUlong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ulong"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeUshort :: Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeUshort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ushort"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primaryConstraintClass :: Phantoms.TTerm Syntax.PrimaryConstraint
-primaryConstraintClass =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primaryConstraintClassType :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.PrimaryConstraint
-primaryConstraintClassType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryConstraintStruct :: Phantoms.TTerm Syntax.PrimaryConstraint
-primaryConstraintStruct =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primaryConstraintUnmanaged :: Phantoms.TTerm Syntax.PrimaryConstraint
-primaryConstraintUnmanaged =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unmanaged"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primaryExpressionArray :: Phantoms.TTerm Syntax.ArrayCreationExpression -> Phantoms.TTerm Syntax.PrimaryExpression
-primaryExpressionArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExpressionNoArray :: Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression -> Phantoms.TTerm Syntax.PrimaryExpression
-primaryExpressionNoArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noArray"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionAnonymousMethod :: Phantoms.TTerm Syntax.AnonymousMethodExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionAnonymousMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymousMethod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionAnonymousObjectCreation :: Phantoms.TTerm (Maybe Syntax.MemberDeclaratorList) -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionAnonymousObjectCreation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymousObjectCreation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionBaseAccess :: Phantoms.TTerm Syntax.BaseAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionBaseAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "baseAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionChecked :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionChecked x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "checked"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionDefaultValue :: Phantoms.TTerm Syntax.DefaultValueExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionDefaultValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "defaultValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionDelegateCreation :: Phantoms.TTerm Syntax.DelegateCreationExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionDelegateCreation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delegateCreation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionElementAccess :: Phantoms.TTerm Syntax.ElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionElementAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionInterpolatedString :: Phantoms.TTerm Syntax.InterpolatedStringExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionInterpolatedString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interpolatedString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionInvocation :: Phantoms.TTerm Syntax.InvocationExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionMemberAccess :: Phantoms.TTerm Syntax.MemberAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "memberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionNameof :: Phantoms.TTerm Syntax.NamedEntity -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionNameof x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nameof"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionNullConditionalElementAccess :: Phantoms.TTerm Syntax.NullConditionalElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionNullConditionalElementAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalElementAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionNullConditionalMemberAccess :: Phantoms.TTerm Syntax.NullConditionalMemberAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionNullConditionalMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalMemberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionObjectCreation :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionObjectCreation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectCreation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionParenthesized :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionPointerElementAccess :: Phantoms.TTerm Syntax.PointerElementAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionPointerElementAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointerElementAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionPointerMemberAccess :: Phantoms.TTerm Syntax.PointerMemberAccess -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionPointerMemberAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointerMemberAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionPostDecrement :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionPostDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionPostIncrement :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionPostIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionSimpleName :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionSimpleName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simpleName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionSizeof :: Phantoms.TTerm Syntax.UnmanagedType -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionSizeof x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sizeof"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionStackalloc :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionStackalloc x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stackalloc"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionThisAccess :: Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionThisAccess =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "thisAccess"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primaryNoArrayCreationExpressionTuple :: Phantoms.TTerm Syntax.TupleExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionTypeof :: Phantoms.TTerm Syntax.TypeofExpression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionTypeof x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeof"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoArrayCreationExpressionUnchecked :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrimaryNoArrayCreationExpression
-primaryNoArrayCreationExpressionUnchecked x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PrimaryNoArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unchecked"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyBodyBlock :: Phantoms.TTerm Syntax.BlockPropertyBody -> Phantoms.TTerm Syntax.PropertyBody
-propertyBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PropertyBody
-propertyBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyDeclarationRefReturn :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.PropertyDeclaration
-propertyDeclarationRefReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refReturn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyDeclarationStandard :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.PropertyDeclaration
-propertyDeclarationStandard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "standard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyModifierAbstract :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierExtern :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierExtern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extern"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierInternal :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierNew :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierOverride :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierOverride =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "override"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierPrivate :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierProtected :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierPublic :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierSealed :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierSealed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sealed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierStatic :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierUnsafe :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyModifierVirtual :: Phantoms.TTerm Syntax.PropertyModifier
-propertyModifierVirtual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.PropertyModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "virtual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-qualifiedAliasMember :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.QualifiedAliasMember
-qualifiedAliasMember alias member arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm member)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-qualifiedAliasMemberAlias :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.Identifier
-qualifiedAliasMemberAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedAliasMemberArguments :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-qualifiedAliasMemberArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedAliasMemberMember :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.Identifier
-qualifiedAliasMemberMember x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-        Core.projectionField = (Core.Name "member")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedAliasMemberWithAlias :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QualifiedAliasMember
-qualifiedAliasMemberWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-              Core.projectionField = (Core.Name "member")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedAliasMemberWithArguments :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.QualifiedAliasMember
-qualifiedAliasMemberWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-              Core.projectionField = (Core.Name "member")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedAliasMemberWithMember :: Phantoms.TTerm Syntax.QualifiedAliasMember -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QualifiedAliasMember
-qualifiedAliasMemberWithMember original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "member"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedAliasMember"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedIdentifier :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.QualifiedIdentifier
-qualifiedIdentifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.QualifiedIdentifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-qualifiedNamespaceOrTypeName :: Phantoms.TTerm Syntax.NamespaceOrTypeName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName
-qualifiedNamespaceOrTypeName namespaceOrType identifier arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaceOrType"),
-          Core.fieldTerm = (Phantoms.unTTerm namespaceOrType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-qualifiedNamespaceOrTypeNameArguments :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-qualifiedNamespaceOrTypeNameArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNamespaceOrTypeNameIdentifier :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm Syntax.Identifier
-qualifiedNamespaceOrTypeNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNamespaceOrTypeNameNamespaceOrType :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-qualifiedNamespaceOrTypeNameNamespaceOrType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-        Core.projectionField = (Core.Name "namespaceOrType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNamespaceOrTypeNameWithArguments :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName
-qualifiedNamespaceOrTypeNameWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaceOrType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "namespaceOrType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedNamespaceOrTypeNameWithIdentifier :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName
-qualifiedNamespaceOrTypeNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaceOrType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "namespaceOrType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedNamespaceOrTypeNameWithNamespaceOrType :: Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName -> Phantoms.TTerm Syntax.NamespaceOrTypeName -> Phantoms.TTerm Syntax.QualifiedNamespaceOrTypeName
-qualifiedNamespaceOrTypeNameWithNamespaceOrType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaceOrType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QualifiedNamespaceOrTypeName"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-queryBody :: Phantoms.TTerm [Syntax.QueryBodyClause] -> Phantoms.TTerm Syntax.SelectOrGroupClause -> Phantoms.TTerm (Maybe Syntax.QueryContinuation) -> Phantoms.TTerm Syntax.QueryBody
-queryBody clauses selectOrGroup continuation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Phantoms.unTTerm clauses)},
-        Core.Field {
-          Core.fieldName = (Core.Name "selectOrGroup"),
-          Core.fieldTerm = (Phantoms.unTTerm selectOrGroup)},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Phantoms.unTTerm continuation)}]}))
-
-queryBodyClauseFrom :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.QueryBodyClause
-queryBodyClauseFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBodyClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "from"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryBodyClauseJoin :: Phantoms.TTerm Syntax.JoinClause -> Phantoms.TTerm Syntax.QueryBodyClause
-queryBodyClauseJoin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBodyClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "join"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryBodyClauseLet :: Phantoms.TTerm Syntax.LetClause -> Phantoms.TTerm Syntax.QueryBodyClause
-queryBodyClauseLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBodyClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryBodyClauseOrderby :: Phantoms.TTerm [Syntax.Ordering] -> Phantoms.TTerm Syntax.QueryBodyClause
-queryBodyClauseOrderby x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBodyClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orderby"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryBodyClauseWhere :: Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.QueryBodyClause
-queryBodyClauseWhere x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBodyClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "where"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryBodyClauses :: Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm [Syntax.QueryBodyClause]
-queryBodyClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-        Core.projectionField = (Core.Name "clauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryBodyContinuation :: Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm (Maybe Syntax.QueryContinuation)
-queryBodyContinuation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-        Core.projectionField = (Core.Name "continuation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryBodySelectOrGroup :: Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm Syntax.SelectOrGroupClause
-queryBodySelectOrGroup x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-        Core.projectionField = (Core.Name "selectOrGroup")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryBodyWithClauses :: Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm [Syntax.QueryBodyClause] -> Phantoms.TTerm Syntax.QueryBody
-queryBodyWithClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "selectOrGroup"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-              Core.projectionField = (Core.Name "selectOrGroup")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-              Core.projectionField = (Core.Name "continuation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-queryBodyWithContinuation :: Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm (Maybe Syntax.QueryContinuation) -> Phantoms.TTerm Syntax.QueryBody
-queryBodyWithContinuation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-              Core.projectionField = (Core.Name "clauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selectOrGroup"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-              Core.projectionField = (Core.Name "selectOrGroup")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-queryBodyWithSelectOrGroup :: Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm Syntax.SelectOrGroupClause -> Phantoms.TTerm Syntax.QueryBody
-queryBodyWithSelectOrGroup original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-              Core.projectionField = (Core.Name "clauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selectOrGroup"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryBody"),
-              Core.projectionField = (Core.Name "continuation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-queryContinuation :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm Syntax.QueryContinuation
-queryContinuation into body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Phantoms.unTTerm into)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-queryContinuationBody :: Phantoms.TTerm Syntax.QueryContinuation -> Phantoms.TTerm Syntax.QueryBody
-queryContinuationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryContinuationInto :: Phantoms.TTerm Syntax.QueryContinuation -> Phantoms.TTerm Syntax.Identifier
-queryContinuationInto x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-        Core.projectionField = (Core.Name "into")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryContinuationWithBody :: Phantoms.TTerm Syntax.QueryContinuation -> Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm Syntax.QueryContinuation
-queryContinuationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-              Core.projectionField = (Core.Name "into")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-queryContinuationWithInto :: Phantoms.TTerm Syntax.QueryContinuation -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QueryContinuation
-queryContinuationWithInto original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "into"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryContinuation"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-queryExpression :: Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm Syntax.QueryExpression
-queryExpression from body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm from)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-queryExpressionBody :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm Syntax.QueryBody
-queryExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryExpressionFrom :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm Syntax.FromClause
-queryExpressionFrom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-        Core.projectionField = (Core.Name "from")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-queryExpressionWithBody :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm Syntax.QueryBody -> Phantoms.TTerm Syntax.QueryExpression
-queryExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-queryExpressionWithFrom :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm Syntax.FromClause -> Phantoms.TTerm Syntax.QueryExpression
-queryExpressionWithFrom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.QueryExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rankSpecifier :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.RankSpecifier
-rankSpecifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rankSpecifierArrayCreationExpression :: Phantoms.TTerm Syntax.RankSpecifier -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression
-rankSpecifierArrayCreationExpression rankSpecifier initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifier"),
-          Core.fieldTerm = (Phantoms.unTTerm rankSpecifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-rankSpecifierArrayCreationExpressionInitializer :: Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayInitializer
-rankSpecifierArrayCreationExpressionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rankSpecifierArrayCreationExpressionRankSpecifier :: Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression -> Phantoms.TTerm Syntax.RankSpecifier
-rankSpecifierArrayCreationExpressionRankSpecifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-        Core.projectionField = (Core.Name "rankSpecifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rankSpecifierArrayCreationExpressionWithInitializer :: Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression
-rankSpecifierArrayCreationExpressionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-              Core.projectionField = (Core.Name "rankSpecifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rankSpecifierArrayCreationExpressionWithRankSpecifier :: Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression -> Phantoms.TTerm Syntax.RankSpecifier -> Phantoms.TTerm Syntax.RankSpecifierArrayCreationExpression
-rankSpecifierArrayCreationExpressionWithRankSpecifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "rankSpecifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RankSpecifierArrayCreationExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refAccessorBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.RefAccessorBody
-refAccessorBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefAccessorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refAccessorBodyEmpty :: Phantoms.TTerm Syntax.RefAccessorBody
-refAccessorBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefAccessorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refAccessorBodyRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefAccessorBody
-refAccessorBodyRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefAccessorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refConditionalExpression :: Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefConditionalExpression
-refConditionalExpression condition true false =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Phantoms.unTTerm true)},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Phantoms.unTTerm false)}]}))
-
-refConditionalExpressionCondition :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression
-refConditionalExpressionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refConditionalExpressionFalse :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.VariableReference
-refConditionalExpressionFalse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-        Core.projectionField = (Core.Name "false")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refConditionalExpressionTrue :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.VariableReference
-refConditionalExpressionTrue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-        Core.projectionField = (Core.Name "true")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refConditionalExpressionWithCondition :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.RefConditionalExpression
-refConditionalExpressionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-              Core.projectionField = (Core.Name "true")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-              Core.projectionField = (Core.Name "false")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refConditionalExpressionWithFalse :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefConditionalExpression
-refConditionalExpressionWithFalse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-              Core.projectionField = (Core.Name "true")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refConditionalExpressionWithTrue :: Phantoms.TTerm Syntax.RefConditionalExpression -> Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefConditionalExpression
-refConditionalExpressionWithTrue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefConditionalExpression"),
-              Core.projectionField = (Core.Name "false")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refGetAccessorDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm (Maybe Syntax.AccessorModifier) -> Phantoms.TTerm Syntax.RefAccessorBody -> Phantoms.TTerm Syntax.RefGetAccessorDeclaration
-refGetAccessorDeclaration attributes modifier body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm modifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-refGetAccessorDeclarationAttributes :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-refGetAccessorDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refGetAccessorDeclarationBody :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm Syntax.RefAccessorBody
-refGetAccessorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refGetAccessorDeclarationModifier :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.AccessorModifier)
-refGetAccessorDeclarationModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-        Core.projectionField = (Core.Name "modifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refGetAccessorDeclarationWithAttributes :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.RefGetAccessorDeclaration
-refGetAccessorDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refGetAccessorDeclarationWithBody :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm Syntax.RefAccessorBody -> Phantoms.TTerm Syntax.RefGetAccessorDeclaration
-refGetAccessorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refGetAccessorDeclarationWithModifier :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm (Maybe Syntax.AccessorModifier) -> Phantoms.TTerm Syntax.RefGetAccessorDeclaration
-refGetAccessorDeclarationWithModifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefGetAccessorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refIndexerBodyBlock :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm Syntax.RefIndexerBody
-refIndexerBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refIndexerBodyRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefIndexerBody
-refIndexerBodyRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refIndexerDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.IndexerModifier] -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.RefIndexerBody -> Phantoms.TTerm Syntax.RefIndexerDeclaration
-refIndexerDeclaration attributes modifiers refKind declarator body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm declarator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-refIndexerDeclarationAttributes :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-refIndexerDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refIndexerDeclarationBody :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.RefIndexerBody
-refIndexerDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refIndexerDeclarationDeclarator :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerDeclarator
-refIndexerDeclarationDeclarator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-        Core.projectionField = (Core.Name "declarator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refIndexerDeclarationModifiers :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm [Syntax.IndexerModifier]
-refIndexerDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refIndexerDeclarationRefKind :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.RefKind
-refIndexerDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refIndexerDeclarationWithAttributes :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.RefIndexerDeclaration
-refIndexerDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refIndexerDeclarationWithBody :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.RefIndexerBody -> Phantoms.TTerm Syntax.RefIndexerDeclaration
-refIndexerDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refIndexerDeclarationWithDeclarator :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.RefIndexerDeclaration
-refIndexerDeclarationWithDeclarator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refIndexerDeclarationWithModifiers :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm [Syntax.IndexerModifier] -> Phantoms.TTerm Syntax.RefIndexerDeclaration
-refIndexerDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refIndexerDeclarationWithRefKind :: Phantoms.TTerm Syntax.RefIndexerDeclaration -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefIndexerDeclaration
-refIndexerDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refKindRef :: Phantoms.TTerm Syntax.RefKind
-refKindRef =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refKindRefReadonly :: Phantoms.TTerm Syntax.RefKind
-refKindRefReadonly =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refReadonly"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refLocalFunctionBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.RefLocalFunctionBody
-refLocalFunctionBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refLocalFunctionBodyRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefLocalFunctionBody
-refLocalFunctionBodyRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refLocalFunctionDeclaration :: Phantoms.TTerm [Syntax.RefLocalFunctionModifier] -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.RefLocalFunctionBody -> Phantoms.TTerm Syntax.RefLocalFunctionDeclaration
-refLocalFunctionDeclaration modifiers refKind returnType header body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-refLocalFunctionDeclarationBody :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.RefLocalFunctionBody
-refLocalFunctionDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalFunctionDeclarationHeader :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionHeader
-refLocalFunctionDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalFunctionDeclarationModifiers :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm [Syntax.RefLocalFunctionModifier]
-refLocalFunctionDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalFunctionDeclarationRefKind :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.RefKind
-refLocalFunctionDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalFunctionDeclarationReturnType :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.Type
-refLocalFunctionDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalFunctionDeclarationWithBody :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.RefLocalFunctionBody -> Phantoms.TTerm Syntax.RefLocalFunctionDeclaration
-refLocalFunctionDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refLocalFunctionDeclarationWithHeader :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.RefLocalFunctionDeclaration
-refLocalFunctionDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalFunctionDeclarationWithModifiers :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm [Syntax.RefLocalFunctionModifier] -> Phantoms.TTerm Syntax.RefLocalFunctionDeclaration
-refLocalFunctionDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalFunctionDeclarationWithRefKind :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefLocalFunctionDeclaration
-refLocalFunctionDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalFunctionDeclarationWithReturnType :: Phantoms.TTerm Syntax.RefLocalFunctionDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RefLocalFunctionDeclaration
-refLocalFunctionDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalFunctionModifierStatic :: Phantoms.TTerm Syntax.RefLocalFunctionModifier
-refLocalFunctionModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refLocalFunctionModifierUnsafe :: Phantoms.TTerm Syntax.RefLocalFunctionModifier
-refLocalFunctionModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalFunctionModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refLocalVariableDeclaration :: Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.RefLocalVariableDeclarator] -> Phantoms.TTerm Syntax.RefLocalVariableDeclaration
-refLocalVariableDeclaration refKind type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-refLocalVariableDeclarationDeclarators :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm [Syntax.RefLocalVariableDeclarator]
-refLocalVariableDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalVariableDeclarationRefKind :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm Syntax.RefKind
-refLocalVariableDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalVariableDeclarationType :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm Syntax.Type
-refLocalVariableDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalVariableDeclarationWithDeclarators :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm [Syntax.RefLocalVariableDeclarator] -> Phantoms.TTerm Syntax.RefLocalVariableDeclaration
-refLocalVariableDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refLocalVariableDeclarationWithRefKind :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefLocalVariableDeclaration
-refLocalVariableDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalVariableDeclarationWithType :: Phantoms.TTerm Syntax.RefLocalVariableDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RefLocalVariableDeclaration
-refLocalVariableDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalVariableDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefLocalVariableDeclarator
-refLocalVariableDeclarator left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-refLocalVariableDeclaratorLeft :: Phantoms.TTerm Syntax.RefLocalVariableDeclarator -> Phantoms.TTerm Syntax.Identifier
-refLocalVariableDeclaratorLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalVariableDeclaratorRight :: Phantoms.TTerm Syntax.RefLocalVariableDeclarator -> Phantoms.TTerm Syntax.VariableReference
-refLocalVariableDeclaratorRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refLocalVariableDeclaratorWithLeft :: Phantoms.TTerm Syntax.RefLocalVariableDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.RefLocalVariableDeclarator
-refLocalVariableDeclaratorWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refLocalVariableDeclaratorWithRight :: Phantoms.TTerm Syntax.RefLocalVariableDeclarator -> Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefLocalVariableDeclarator
-refLocalVariableDeclaratorWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefLocalVariableDeclarator"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refMethodBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.RefMethodBody
-refMethodBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refMethodBodyEmpty :: Phantoms.TTerm Syntax.RefMethodBody
-refMethodBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodBodyRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefMethodBody
-refMethodBodyRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refMethodModifierAbstract :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierExtern :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierExtern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extern"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierInternal :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierNew :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierOverride :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierOverride =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "override"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierPrivate :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierProtected :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierPublic :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierSealed :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierSealed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sealed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierStatic :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierUnsafe :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refMethodModifierVirtual :: Phantoms.TTerm Syntax.RefMethodModifier
-refMethodModifierVirtual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "virtual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-refPropertyBodyBlock :: Phantoms.TTerm Syntax.RefGetAccessorDeclaration -> Phantoms.TTerm Syntax.RefPropertyBody
-refPropertyBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefPropertyBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refPropertyBodyRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.RefPropertyBody
-refPropertyBodyRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RefPropertyBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refReturnMethodDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.RefMethodModifier] -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.RefMethodBody -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclaration attributes modifiers kind returnType header body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-refReturnMethodDeclarationAttributes :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-refReturnMethodDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnMethodDeclarationBody :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.RefMethodBody
-refReturnMethodDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnMethodDeclarationHeader :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader
-refReturnMethodDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnMethodDeclarationKind :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.RefKind
-refReturnMethodDeclarationKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnMethodDeclarationModifiers :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm [Syntax.RefMethodModifier]
-refReturnMethodDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnMethodDeclarationReturnType :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.ReturnType
-refReturnMethodDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnMethodDeclarationWithAttributes :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnMethodDeclarationWithBody :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.RefMethodBody -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refReturnMethodDeclarationWithHeader :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnMethodDeclarationWithKind :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclarationWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnMethodDeclarationWithModifiers :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm [Syntax.RefMethodModifier] -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnMethodDeclarationWithReturnType :: Phantoms.TTerm Syntax.RefReturnMethodDeclaration -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.RefReturnMethodDeclaration
-refReturnMethodDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnPropertyDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.PropertyModifier] -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.RefPropertyBody -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclaration attributes modifiers refKind type_ name body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-refReturnPropertyDeclarationAttributes :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-refReturnPropertyDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnPropertyDeclarationBody :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.RefPropertyBody
-refReturnPropertyDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnPropertyDeclarationModifiers :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm [Syntax.PropertyModifier]
-refReturnPropertyDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnPropertyDeclarationName :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.MemberName
-refReturnPropertyDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnPropertyDeclarationRefKind :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.RefKind
-refReturnPropertyDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnPropertyDeclarationType :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.Type
-refReturnPropertyDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refReturnPropertyDeclarationWithAttributes :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnPropertyDeclarationWithBody :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.RefPropertyBody -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refReturnPropertyDeclarationWithModifiers :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm [Syntax.PropertyModifier] -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnPropertyDeclarationWithName :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnPropertyDeclarationWithRefKind :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refReturnPropertyDeclarationWithType :: Phantoms.TTerm Syntax.RefReturnPropertyDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RefReturnPropertyDeclaration
-refReturnPropertyDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefReturnPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refVarImplicitlyTypedLocalVariableDeclaration :: Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefLocalVariableDeclarator -> Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration
-refVarImplicitlyTypedLocalVariableDeclaration refKind declarator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm refKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm declarator)}]}))
-
-refVarImplicitlyTypedLocalVariableDeclarationDeclarator :: Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.RefLocalVariableDeclarator
-refVarImplicitlyTypedLocalVariableDeclarationDeclarator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "declarator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refVarImplicitlyTypedLocalVariableDeclarationRefKind :: Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.RefKind
-refVarImplicitlyTypedLocalVariableDeclarationRefKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "refKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refVarImplicitlyTypedLocalVariableDeclarationWithDeclarator :: Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.RefLocalVariableDeclarator -> Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration
-refVarImplicitlyTypedLocalVariableDeclarationWithDeclarator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "refKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refVarImplicitlyTypedLocalVariableDeclarationWithRefKind :: Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration -> Phantoms.TTerm Syntax.RefKind -> Phantoms.TTerm Syntax.RefVarImplicitlyTypedLocalVariableDeclaration
-refVarImplicitlyTypedLocalVariableDeclarationWithRefKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RefVarImplicitlyTypedLocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-referenceTypeArray :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceTypeClass :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceTypeDelegate :: Phantoms.TTerm Syntax.DelegateType -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeDelegate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delegate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceTypeDynamic :: Phantoms.TTerm Syntax.ReferenceType
-referenceTypeDynamic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dynamic"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-referenceTypeInterface :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-regularInterpolation :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.RegularInterpolation
-regularInterpolation expression width format =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Phantoms.unTTerm width)},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Phantoms.unTTerm format)}]}))
-
-regularInterpolationExpression :: Phantoms.TTerm Syntax.RegularInterpolation -> Phantoms.TTerm Syntax.Expression
-regularInterpolationExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regularInterpolationFormat :: Phantoms.TTerm Syntax.RegularInterpolation -> Phantoms.TTerm (Maybe String)
-regularInterpolationFormat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-        Core.projectionField = (Core.Name "format")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regularInterpolationWidth :: Phantoms.TTerm Syntax.RegularInterpolation -> Phantoms.TTerm (Maybe Syntax.Expression)
-regularInterpolationWidth x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-        Core.projectionField = (Core.Name "width")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regularInterpolationWithExpression :: Phantoms.TTerm Syntax.RegularInterpolation -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RegularInterpolation
-regularInterpolationWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-              Core.projectionField = (Core.Name "width")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-              Core.projectionField = (Core.Name "format")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-regularInterpolationWithFormat :: Phantoms.TTerm Syntax.RegularInterpolation -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.RegularInterpolation
-regularInterpolationWithFormat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-              Core.projectionField = (Core.Name "width")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-regularInterpolationWithWidth :: Phantoms.TTerm Syntax.RegularInterpolation -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.RegularInterpolation
-regularInterpolationWithWidth original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.RegularInterpolation"),
-              Core.projectionField = (Core.Name "format")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpressionAsType :: Phantoms.TTerm Syntax.AsTypeExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionAsType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionBinary :: Phantoms.TTerm Syntax.BinaryRelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionIsPattern :: Phantoms.TTerm Syntax.IsPatternExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionIsPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "isPattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionIsType :: Phantoms.TTerm Syntax.IsTypeExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionIsType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "isType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionSimple :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalOperatorGreaterThan :: Phantoms.TTerm Syntax.RelationalOperator
-relationalOperatorGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relationalOperatorGreaterThanOrEqual :: Phantoms.TTerm Syntax.RelationalOperator
-relationalOperatorGreaterThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relationalOperatorLessThan :: Phantoms.TTerm Syntax.RelationalOperator
-relationalOperatorLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relationalOperatorLessThanOrEqual :: Phantoms.TTerm Syntax.RelationalOperator
-relationalOperatorLessThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.RelationalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-resourceAcquisitionExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ResourceAcquisition
-resourceAcquisitionExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ResourceAcquisition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-resourceAcquisitionLocal :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.ResourceAcquisition
-resourceAcquisitionLocal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ResourceAcquisition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "local"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnStatementRef :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.ReturnStatement
-returnStatementRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReturnStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnStatementSimple :: Phantoms.TTerm Syntax.ReturnStatement
-returnStatementSimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReturnStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-returnStatementValue :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ReturnStatement
-returnStatementValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReturnStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnTypeRef :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ReturnType
-returnTypeRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReturnType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnTypeVoid :: Phantoms.TTerm Syntax.ReturnType
-returnTypeVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ReturnType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-secondaryConstraintInterface :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.SecondaryConstraint
-secondaryConstraintInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SecondaryConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-secondaryConstraintParameter :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.SecondaryConstraint
-secondaryConstraintParameter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SecondaryConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-secondaryConstraints :: Phantoms.TTerm [Syntax.SecondaryConstraint] -> Phantoms.TTerm Syntax.SecondaryConstraints
-secondaryConstraints x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.SecondaryConstraints"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-selectOrGroupClauseGroup :: Phantoms.TTerm Syntax.GroupClause -> Phantoms.TTerm Syntax.SelectOrGroupClause
-selectOrGroupClauseGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SelectOrGroupClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectOrGroupClauseSelect :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SelectOrGroupClause
-selectOrGroupClauseSelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SelectOrGroupClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionStatementIf :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.SelectionStatement
-selectionStatementIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SelectionStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionStatementSwitch :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.SelectionStatement
-selectionStatementSwitch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SelectionStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "switch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionBinary :: Phantoms.TTerm Syntax.BinaryShiftExpression -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionSimple :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftOperatorLeft :: Phantoms.TTerm Syntax.ShiftOperator
-shiftOperatorLeft =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ShiftOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "left"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shiftOperatorRight :: Phantoms.TTerm Syntax.ShiftOperator
-shiftOperatorRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ShiftOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "right"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-simpleConditionalExpression :: Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SimpleConditionalExpression
-simpleConditionalExpression condition true false =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Phantoms.unTTerm true)},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Phantoms.unTTerm false)}]}))
-
-simpleConditionalExpressionCondition :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression
-simpleConditionalExpressionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleConditionalExpressionFalse :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.Expression
-simpleConditionalExpressionFalse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-        Core.projectionField = (Core.Name "false")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleConditionalExpressionTrue :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.Expression
-simpleConditionalExpressionTrue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-        Core.projectionField = (Core.Name "true")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleConditionalExpressionWithCondition :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.NullCoalescingExpression -> Phantoms.TTerm Syntax.SimpleConditionalExpression
-simpleConditionalExpressionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-              Core.projectionField = (Core.Name "true")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-              Core.projectionField = (Core.Name "false")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleConditionalExpressionWithFalse :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SimpleConditionalExpression
-simpleConditionalExpressionWithFalse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-              Core.projectionField = (Core.Name "true")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleConditionalExpressionWithTrue :: Phantoms.TTerm Syntax.SimpleConditionalExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SimpleConditionalExpression
-simpleConditionalExpressionWithTrue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "true"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "false"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleConditionalExpression"),
-              Core.projectionField = (Core.Name "false")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleName :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.SimpleName
-simpleName identifier typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-simpleNameIdentifier :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm Syntax.Identifier
-simpleNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleNameTypeArguments :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList)
-simpleNameTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleNameWithIdentifier :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.SimpleName
-simpleNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleNameWithTypeArguments :: Phantoms.TTerm Syntax.SimpleName -> Phantoms.TTerm (Maybe Syntax.TypeArgumentList) -> Phantoms.TTerm Syntax.SimpleName
-simpleNameWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleTypeBool :: Phantoms.TTerm Syntax.SimpleType
-simpleTypeBool =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-simpleTypeNumeric :: Phantoms.TTerm Syntax.NumericType -> Phantoms.TTerm Syntax.SimpleType
-simpleTypeNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SimpleType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-specificCatchClause :: Phantoms.TTerm (Maybe Syntax.ExceptionSpecifier) -> Phantoms.TTerm (Maybe Syntax.BooleanExpression) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.SpecificCatchClause
-specificCatchClause specifier filter body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Phantoms.unTTerm specifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filter"),
-          Core.fieldTerm = (Phantoms.unTTerm filter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-specificCatchClauseBody :: Phantoms.TTerm Syntax.SpecificCatchClause -> Phantoms.TTerm Syntax.Block
-specificCatchClauseBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-specificCatchClauseFilter :: Phantoms.TTerm Syntax.SpecificCatchClause -> Phantoms.TTerm (Maybe Syntax.BooleanExpression)
-specificCatchClauseFilter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-        Core.projectionField = (Core.Name "filter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-specificCatchClauseSpecifier :: Phantoms.TTerm Syntax.SpecificCatchClause -> Phantoms.TTerm (Maybe Syntax.ExceptionSpecifier)
-specificCatchClauseSpecifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-        Core.projectionField = (Core.Name "specifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-specificCatchClauseWithBody :: Phantoms.TTerm Syntax.SpecificCatchClause -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.SpecificCatchClause
-specificCatchClauseWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-              Core.projectionField = (Core.Name "specifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-              Core.projectionField = (Core.Name "filter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-specificCatchClauseWithFilter :: Phantoms.TTerm Syntax.SpecificCatchClause -> Phantoms.TTerm (Maybe Syntax.BooleanExpression) -> Phantoms.TTerm Syntax.SpecificCatchClause
-specificCatchClauseWithFilter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-              Core.projectionField = (Core.Name "specifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-specificCatchClauseWithSpecifier :: Phantoms.TTerm Syntax.SpecificCatchClause -> Phantoms.TTerm (Maybe Syntax.ExceptionSpecifier) -> Phantoms.TTerm Syntax.SpecificCatchClause
-specificCatchClauseWithSpecifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-              Core.projectionField = (Core.Name "filter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SpecificCatchClause"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stackallocExpression :: Phantoms.TTerm (Maybe Syntax.UnmanagedType) -> Phantoms.TTerm (Maybe Syntax.ConstantExpression) -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.StackallocExpression
-stackallocExpression type_ expression initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-stackallocExpressionExpression :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm (Maybe Syntax.ConstantExpression)
-stackallocExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stackallocExpressionInitializer :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm [Syntax.Expression]
-stackallocExpressionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stackallocExpressionType :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm (Maybe Syntax.UnmanagedType)
-stackallocExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stackallocExpressionWithExpression :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm (Maybe Syntax.ConstantExpression) -> Phantoms.TTerm Syntax.StackallocExpression
-stackallocExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stackallocExpressionWithInitializer :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.StackallocExpression
-stackallocExpressionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stackallocExpressionWithType :: Phantoms.TTerm Syntax.StackallocExpression -> Phantoms.TTerm (Maybe Syntax.UnmanagedType) -> Phantoms.TTerm Syntax.StackallocExpression
-stackallocExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StackallocExpression"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardEventDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.EventModifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.VariableDeclarators -> Phantoms.TTerm Syntax.StandardEventDeclaration
-standardEventDeclaration attributes modifiers type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-standardEventDeclarationAttributes :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-standardEventDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardEventDeclarationDeclarators :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm Syntax.VariableDeclarators
-standardEventDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardEventDeclarationModifiers :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm [Syntax.EventModifier]
-standardEventDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardEventDeclarationType :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm Syntax.Type
-standardEventDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardEventDeclarationWithAttributes :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StandardEventDeclaration
-standardEventDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardEventDeclarationWithDeclarators :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm Syntax.VariableDeclarators -> Phantoms.TTerm Syntax.StandardEventDeclaration
-standardEventDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-standardEventDeclarationWithModifiers :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm [Syntax.EventModifier] -> Phantoms.TTerm Syntax.StandardEventDeclaration
-standardEventDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardEventDeclarationWithType :: Phantoms.TTerm Syntax.StandardEventDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.StandardEventDeclaration
-standardEventDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardEventDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardIndexerDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.IndexerModifier] -> Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.IndexerBody -> Phantoms.TTerm Syntax.StandardIndexerDeclaration
-standardIndexerDeclaration attributes modifiers declarator body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm declarator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-standardIndexerDeclarationAttributes :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-standardIndexerDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardIndexerDeclarationBody :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerBody
-standardIndexerDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardIndexerDeclarationDeclarator :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerDeclarator
-standardIndexerDeclarationDeclarator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-        Core.projectionField = (Core.Name "declarator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardIndexerDeclarationModifiers :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm [Syntax.IndexerModifier]
-standardIndexerDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardIndexerDeclarationWithAttributes :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StandardIndexerDeclaration
-standardIndexerDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardIndexerDeclarationWithBody :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerBody -> Phantoms.TTerm Syntax.StandardIndexerDeclaration
-standardIndexerDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-standardIndexerDeclarationWithDeclarator :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm Syntax.IndexerDeclarator -> Phantoms.TTerm Syntax.StandardIndexerDeclaration
-standardIndexerDeclarationWithDeclarator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardIndexerDeclarationWithModifiers :: Phantoms.TTerm Syntax.StandardIndexerDeclaration -> Phantoms.TTerm [Syntax.IndexerModifier] -> Phantoms.TTerm Syntax.StandardIndexerDeclaration
-standardIndexerDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardIndexerDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardLocalFunctionDeclaration :: Phantoms.TTerm [Syntax.LocalFunctionModifier] -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.LocalFunctionBody -> Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration
-standardLocalFunctionDeclaration modifiers returnType header body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-standardLocalFunctionDeclarationBody :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionBody
-standardLocalFunctionDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardLocalFunctionDeclarationHeader :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionHeader
-standardLocalFunctionDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardLocalFunctionDeclarationModifiers :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm [Syntax.LocalFunctionModifier]
-standardLocalFunctionDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardLocalFunctionDeclarationReturnType :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.ReturnType
-standardLocalFunctionDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardLocalFunctionDeclarationWithBody :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionBody -> Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration
-standardLocalFunctionDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-standardLocalFunctionDeclarationWithHeader :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.LocalFunctionHeader -> Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration
-standardLocalFunctionDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardLocalFunctionDeclarationWithModifiers :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm [Syntax.LocalFunctionModifier] -> Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration
-standardLocalFunctionDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardLocalFunctionDeclarationWithReturnType :: Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.StandardLocalFunctionDeclaration
-standardLocalFunctionDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardLocalFunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardMethodDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.MethodModifier] -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MethodBody -> Phantoms.TTerm Syntax.StandardMethodDeclaration
-standardMethodDeclaration attributes modifiers returnType header body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-standardMethodDeclarationAttributes :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-standardMethodDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardMethodDeclarationBody :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.MethodBody
-standardMethodDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardMethodDeclarationHeader :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader
-standardMethodDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardMethodDeclarationModifiers :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm [Syntax.MethodModifier]
-standardMethodDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardMethodDeclarationReturnType :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.ReturnType
-standardMethodDeclarationReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardMethodDeclarationWithAttributes :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StandardMethodDeclaration
-standardMethodDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardMethodDeclarationWithBody :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.MethodBody -> Phantoms.TTerm Syntax.StandardMethodDeclaration
-standardMethodDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-standardMethodDeclarationWithHeader :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.StandardMethodDeclaration
-standardMethodDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardMethodDeclarationWithModifiers :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm [Syntax.MethodModifier] -> Phantoms.TTerm Syntax.StandardMethodDeclaration
-standardMethodDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardMethodDeclarationWithReturnType :: Phantoms.TTerm Syntax.StandardMethodDeclaration -> Phantoms.TTerm Syntax.ReturnType -> Phantoms.TTerm Syntax.StandardMethodDeclaration
-standardMethodDeclarationWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardPropertyDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.PropertyModifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.PropertyBody -> Phantoms.TTerm Syntax.StandardPropertyDeclaration
-standardPropertyDeclaration attributes modifiers type_ name body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-standardPropertyDeclarationAttributes :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-standardPropertyDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardPropertyDeclarationBody :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.PropertyBody
-standardPropertyDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardPropertyDeclarationModifiers :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm [Syntax.PropertyModifier]
-standardPropertyDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardPropertyDeclarationName :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.MemberName
-standardPropertyDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardPropertyDeclarationType :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.Type
-standardPropertyDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standardPropertyDeclarationWithAttributes :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StandardPropertyDeclaration
-standardPropertyDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardPropertyDeclarationWithBody :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.PropertyBody -> Phantoms.TTerm Syntax.StandardPropertyDeclaration
-standardPropertyDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-standardPropertyDeclarationWithModifiers :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm [Syntax.PropertyModifier] -> Phantoms.TTerm Syntax.StandardPropertyDeclaration
-standardPropertyDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardPropertyDeclarationWithName :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.MemberName -> Phantoms.TTerm Syntax.StandardPropertyDeclaration
-standardPropertyDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standardPropertyDeclarationWithType :: Phantoms.TTerm Syntax.StandardPropertyDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.StandardPropertyDeclaration
-standardPropertyDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StandardPropertyDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statementDeclaration :: Phantoms.TTerm Syntax.DeclarationStatement -> Phantoms.TTerm Syntax.Statement
-statementDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementEmbedded :: Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.Statement
-statementEmbedded x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "embedded"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionAssignment :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionAwait :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionAwait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "await"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionInvocation :: Phantoms.TTerm Syntax.InvocationExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionList :: Phantoms.TTerm [Syntax.StatementExpression] -> Phantoms.TTerm Syntax.StatementExpressionList
-statementExpressionList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.StatementExpressionList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-statementExpressionNullConditionalInvocation :: Phantoms.TTerm Syntax.NullConditionalInvocationExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionNullConditionalInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullConditionalInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionObjectCreation :: Phantoms.TTerm Syntax.ObjectCreationExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionObjectCreation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectCreation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPostDecrement :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPostDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPostIncrement :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPostIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPreDecrement :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPreDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPreIncrement :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPreIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLabeled :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-statementLabeled x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeled"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-staticConstructorBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.StaticConstructorBody
-staticConstructorBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-staticConstructorBodyEmpty :: Phantoms.TTerm Syntax.StaticConstructorBody
-staticConstructorBodyEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-staticConstructorBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.StaticConstructorBody
-staticConstructorBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-staticConstructorDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StaticConstructorModifiers -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.StaticConstructorBody -> Phantoms.TTerm Syntax.StaticConstructorDeclaration
-staticConstructorDeclaration attributes modifiers name body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-staticConstructorDeclarationAttributes :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-staticConstructorDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticConstructorDeclarationBody :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.StaticConstructorBody
-staticConstructorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticConstructorDeclarationModifiers :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.StaticConstructorModifiers
-staticConstructorDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticConstructorDeclarationName :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.Identifier
-staticConstructorDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticConstructorDeclarationWithAttributes :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StaticConstructorDeclaration
-staticConstructorDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticConstructorDeclarationWithBody :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.StaticConstructorBody -> Phantoms.TTerm Syntax.StaticConstructorDeclaration
-staticConstructorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-staticConstructorDeclarationWithModifiers :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.StaticConstructorModifiers -> Phantoms.TTerm Syntax.StaticConstructorDeclaration
-staticConstructorDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticConstructorDeclarationWithName :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.StaticConstructorDeclaration
-staticConstructorDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticConstructorModifiers :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StaticConstructorModifiers
-staticConstructorModifiers extern unsafe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Phantoms.unTTerm extern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm unsafe)}]}))
-
-staticConstructorModifiersExtern :: Phantoms.TTerm Syntax.StaticConstructorModifiers -> Phantoms.TTerm Bool
-staticConstructorModifiersExtern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-        Core.projectionField = (Core.Name "extern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticConstructorModifiersUnsafe :: Phantoms.TTerm Syntax.StaticConstructorModifiers -> Phantoms.TTerm Bool
-staticConstructorModifiersUnsafe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-        Core.projectionField = (Core.Name "unsafe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticConstructorModifiersWithExtern :: Phantoms.TTerm Syntax.StaticConstructorModifiers -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StaticConstructorModifiers
-staticConstructorModifiersWithExtern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticConstructorModifiersWithUnsafe :: Phantoms.TTerm Syntax.StaticConstructorModifiers -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StaticConstructorModifiers
-staticConstructorModifiersWithUnsafe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "extern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StaticConstructorModifiers"),
-              Core.projectionField = (Core.Name "extern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structDeclaration :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm [Syntax.StructModifier] -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm [Syntax.StructMemberDeclaration] -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclaration attributes modifiers ref partial name parameters interfaces constraints body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm ref)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm partial)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm interfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-structDeclarationAttributes :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes)
-structDeclarationAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationBody :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.StructMemberDeclaration]
-structDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationConstraints :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause]
-structDeclarationConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationInterfaces :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.InterfaceType]
-structDeclarationInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "interfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationModifiers :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.StructModifier]
-structDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationName :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Syntax.Identifier
-structDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationParameters :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm (Maybe Syntax.TypeParameterList)
-structDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationPartial :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Bool
-structDeclarationPartial x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "partial")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationRef :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Bool
-structDeclarationRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-        Core.projectionField = (Core.Name "ref")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDeclarationWithAttributes :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithBody :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.StructMemberDeclaration] -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structDeclarationWithConstraints :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.TypeParameterConstraintsClause] -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithInterfaces :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithModifiers :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm [Syntax.StructModifier] -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithName :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithParameters :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm (Maybe Syntax.TypeParameterList) -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithPartial :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithPartial original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDeclarationWithRef :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StructDeclaration
-structDeclarationWithRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "partial"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "partial")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "interfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "interfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.StructDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structMemberDeclarationConstant :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationConstructor :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationEvent :: Phantoms.TTerm Syntax.EventDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationEvent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "event"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationField :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "field"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationFixedSizeBuffer :: Phantoms.TTerm Syntax.FixedSizeBufferDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationFixedSizeBuffer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixedSizeBuffer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationIndexer :: Phantoms.TTerm Syntax.IndexerDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationIndexer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indexer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationMethod :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationOperator :: Phantoms.TTerm Syntax.OperatorDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationOperator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "operator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationProperty :: Phantoms.TTerm Syntax.PropertyDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationStaticConstructor :: Phantoms.TTerm Syntax.StaticConstructorDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationStaticConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "staticConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structMemberDeclarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.StructMemberDeclaration
-structMemberDeclarationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structModifierInternal :: Phantoms.TTerm Syntax.StructModifier
-structModifierInternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "internal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structModifierNew :: Phantoms.TTerm Syntax.StructModifier
-structModifierNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structModifierPrivate :: Phantoms.TTerm Syntax.StructModifier
-structModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structModifierProtected :: Phantoms.TTerm Syntax.StructModifier
-structModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structModifierPublic :: Phantoms.TTerm Syntax.StructModifier
-structModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structModifierReadonly :: Phantoms.TTerm Syntax.StructModifier
-structModifierReadonly =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "readonly"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structModifierUnsafe :: Phantoms.TTerm Syntax.StructModifier
-structModifierUnsafe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsafe"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structOrEnumTypeEnum :: Phantoms.TTerm Syntax.EnumType -> Phantoms.TTerm Syntax.StructOrEnumType
-structOrEnumTypeEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructOrEnumType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structOrEnumTypeStruct :: Phantoms.TTerm Syntax.StructType -> Phantoms.TTerm Syntax.StructOrEnumType
-structOrEnumTypeStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructOrEnumType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structTypeSimple :: Phantoms.TTerm Syntax.SimpleType -> Phantoms.TTerm Syntax.StructType
-structTypeSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structTypeTuple :: Phantoms.TTerm Syntax.TupleType -> Phantoms.TTerm Syntax.StructType
-structTypeTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structTypeTypeName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.StructType
-structTypeTypeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.StructType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-switchBranch :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SwitchBranch
-switchBranch pattern guard =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm guard)}]}))
-
-switchBranchGuard :: Phantoms.TTerm Syntax.SwitchBranch -> Phantoms.TTerm (Maybe Syntax.Expression)
-switchBranchGuard x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-        Core.projectionField = (Core.Name "guard")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchBranchPattern :: Phantoms.TTerm Syntax.SwitchBranch -> Phantoms.TTerm Syntax.Pattern
-switchBranchPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchBranchWithGuard :: Phantoms.TTerm Syntax.SwitchBranch -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SwitchBranch
-switchBranchWithGuard original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchBranchWithPattern :: Phantoms.TTerm Syntax.SwitchBranch -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.SwitchBranch
-switchBranchWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchBranch"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-switchLabelBranch :: Phantoms.TTerm Syntax.SwitchBranch -> Phantoms.TTerm Syntax.SwitchLabel
-switchLabelBranch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "branch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-switchLabelDefault :: Phantoms.TTerm Syntax.SwitchLabel
-switchLabelDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-switchSection :: Phantoms.TTerm [Syntax.SwitchLabel] -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.SwitchSection
-switchSection labels statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-switchSectionLabels :: Phantoms.TTerm Syntax.SwitchSection -> Phantoms.TTerm [Syntax.SwitchLabel]
-switchSectionLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchSectionStatements :: Phantoms.TTerm Syntax.SwitchSection -> Phantoms.TTerm [Syntax.Statement]
-switchSectionStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchSectionWithLabels :: Phantoms.TTerm Syntax.SwitchSection -> Phantoms.TTerm [Syntax.SwitchLabel] -> Phantoms.TTerm Syntax.SwitchSection
-switchSectionWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-switchSectionWithStatements :: Phantoms.TTerm Syntax.SwitchSection -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.SwitchSection
-switchSectionWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchSection"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.SwitchSection] -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatement expression branches =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "branches"),
-          Core.fieldTerm = (Phantoms.unTTerm branches)}]}))
-
-switchStatementBranches :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm [Syntax.SwitchSection]
-switchStatementBranches x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "branches")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementExpression :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression
-switchStatementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementWithBranches :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm [Syntax.SwitchSection] -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithBranches original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branches"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchStatementWithExpression :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "branches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "branches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatement :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.CatchClauses -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryStatement
-tryStatement body catches finally =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm catches)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm finally)}]}))
-
-tryStatementBody :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.Block
-tryStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatementCatches :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.CatchClauses
-tryStatementCatches x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-        Core.projectionField = (Core.Name "catches")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatementFinally :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-tryStatementFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-        Core.projectionField = (Core.Name "finally")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatementWithBody :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatementWithCatches :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.CatchClauses -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithCatches original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatementWithFinally :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithFinally original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tupleElement :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TupleElement
-tupleElement name expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-tupleElementExpression :: Phantoms.TTerm Syntax.TupleElement -> Phantoms.TTerm Syntax.Expression
-tupleElementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleElementName :: Phantoms.TTerm Syntax.TupleElement -> Phantoms.TTerm (Maybe Syntax.Identifier)
-tupleElementName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleElementWithExpression :: Phantoms.TTerm Syntax.TupleElement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TupleElement
-tupleElementWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tupleElementWithName :: Phantoms.TTerm Syntax.TupleElement -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.TupleElement
-tupleElementWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleElement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tupleExpressionDeconstruction :: Phantoms.TTerm Syntax.DeconstructionTuple -> Phantoms.TTerm Syntax.TupleExpression
-tupleExpressionDeconstruction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TupleExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "deconstruction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tupleExpressionElements :: Phantoms.TTerm [Syntax.TupleElement] -> Phantoms.TTerm Syntax.TupleExpression
-tupleExpressionElements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TupleExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tupleType :: Phantoms.TTerm [Syntax.TupleTypeElement] -> Phantoms.TTerm Syntax.TupleType
-tupleType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.TupleType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tupleTypeElement :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.TupleTypeElement
-tupleTypeElement type_ identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-tupleTypeElementIdentifier :: Phantoms.TTerm Syntax.TupleTypeElement -> Phantoms.TTerm (Maybe Syntax.Identifier)
-tupleTypeElementIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleTypeElementType :: Phantoms.TTerm Syntax.TupleTypeElement -> Phantoms.TTerm Syntax.Type
-tupleTypeElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleTypeElementWithIdentifier :: Phantoms.TTerm Syntax.TupleTypeElement -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.TupleTypeElement
-tupleTypeElementWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tupleTypeElementWithType :: Phantoms.TTerm Syntax.TupleTypeElement -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TupleTypeElement
-tupleTypeElementWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TupleTypeElement"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeArgumentList :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.TypeArgumentList
-typeArgumentList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.TypeArgumentList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeDeclarationClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDeclarationDelegate :: Phantoms.TTerm Syntax.DelegateDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationDelegate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delegate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDeclarationEnum :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDeclarationInterface :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDeclarationStruct :: Phantoms.TTerm Syntax.StructDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeName :: Phantoms.TTerm Syntax.NamespaceOrTypeName -> Phantoms.TTerm Syntax.TypeName
-typeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.TypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeParam :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.Type
-typeParam x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "param"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeParameter :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.TypeParameter
-typeParameter x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.TypeParameter"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeParameterConstraints :: Phantoms.TTerm (Maybe Syntax.PrimaryConstraint) -> Phantoms.TTerm (Maybe Syntax.SecondaryConstraints) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypeParameterConstraints
-typeParameterConstraints primary secondary constructor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "secondary"),
-          Core.fieldTerm = (Phantoms.unTTerm secondary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm constructor)}]}))
-
-typeParameterConstraintsClause :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm [Syntax.TypeParameterConstraints] -> Phantoms.TTerm Syntax.TypeParameterConstraintsClause
-typeParameterConstraintsClause parameter constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-
-typeParameterConstraintsClauseConstraints :: Phantoms.TTerm Syntax.TypeParameterConstraintsClause -> Phantoms.TTerm [Syntax.TypeParameterConstraints]
-typeParameterConstraintsClauseConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterConstraintsClauseParameter :: Phantoms.TTerm Syntax.TypeParameterConstraintsClause -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterConstraintsClauseParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterConstraintsClauseWithConstraints :: Phantoms.TTerm Syntax.TypeParameterConstraintsClause -> Phantoms.TTerm [Syntax.TypeParameterConstraints] -> Phantoms.TTerm Syntax.TypeParameterConstraintsClause
-typeParameterConstraintsClauseWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeParameterConstraintsClauseWithParameter :: Phantoms.TTerm Syntax.TypeParameterConstraintsClause -> Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.TypeParameterConstraintsClause
-typeParameterConstraintsClauseWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraintsClause"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameterConstraintsConstructor :: Phantoms.TTerm Syntax.TypeParameterConstraints -> Phantoms.TTerm Bool
-typeParameterConstraintsConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-        Core.projectionField = (Core.Name "constructor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterConstraintsPrimary :: Phantoms.TTerm Syntax.TypeParameterConstraints -> Phantoms.TTerm (Maybe Syntax.PrimaryConstraint)
-typeParameterConstraintsPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterConstraintsSecondary :: Phantoms.TTerm Syntax.TypeParameterConstraints -> Phantoms.TTerm (Maybe Syntax.SecondaryConstraints)
-typeParameterConstraintsSecondary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-        Core.projectionField = (Core.Name "secondary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterConstraintsWithConstructor :: Phantoms.TTerm Syntax.TypeParameterConstraints -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypeParameterConstraints
-typeParameterConstraintsWithConstructor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "secondary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-              Core.projectionField = (Core.Name "secondary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeParameterConstraintsWithPrimary :: Phantoms.TTerm Syntax.TypeParameterConstraints -> Phantoms.TTerm (Maybe Syntax.PrimaryConstraint) -> Phantoms.TTerm Syntax.TypeParameterConstraints
-typeParameterConstraintsWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "secondary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-              Core.projectionField = (Core.Name "secondary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameterConstraintsWithSecondary :: Phantoms.TTerm Syntax.TypeParameterConstraints -> Phantoms.TTerm (Maybe Syntax.SecondaryConstraints) -> Phantoms.TTerm Syntax.TypeParameterConstraints
-typeParameterConstraintsWithSecondary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "secondary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterConstraints"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameterList :: Phantoms.TTerm [Syntax.TypeParameterPart] -> Phantoms.TTerm Syntax.TypeParameterList
-typeParameterList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeParameterPart :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.TypeParameterPart
-typeParameterPart attributes name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-typeParameterPartAttributes :: Phantoms.TTerm Syntax.TypeParameterPart -> Phantoms.TTerm (Maybe Syntax.Attributes)
-typeParameterPartAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterPartName :: Phantoms.TTerm Syntax.TypeParameterPart -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterPartName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterPartWithAttributes :: Phantoms.TTerm Syntax.TypeParameterPart -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.TypeParameterPart
-typeParameterPartWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameterPartWithName :: Phantoms.TTerm Syntax.TypeParameterPart -> Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.TypeParameterPart
-typeParameterPartWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.TypeParameterPart"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typePointer :: Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm Syntax.Type
-typePointer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeReference :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.Type
-typeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeValue :: Phantoms.TTerm Syntax.ValueType -> Phantoms.TTerm Syntax.Type
-typeValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeofExpressionType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeofExpression
-typeofExpressionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeofExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeofExpressionUnboundTypeName :: Phantoms.TTerm Syntax.UnboundTypeName -> Phantoms.TTerm Syntax.TypeofExpression
-typeofExpressionUnboundTypeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeofExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unboundTypeName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeofExpressionVoid :: Phantoms.TTerm Syntax.TypeofExpression
-typeofExpressionVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.TypeofExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unArgumentList :: Phantoms.TTerm Syntax.ArgumentList -> Phantoms.TTerm [Syntax.Argument]
-unArgumentList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.ArgumentList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayInitializer :: Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm [Syntax.VariableInitializer]
-unArrayInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.ArrayInitializer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAttributeArgumentExpression :: Phantoms.TTerm Syntax.AttributeArgumentExpression -> Phantoms.TTerm Syntax.NonAssignmentExpression
-unAttributeArgumentExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.AttributeArgumentExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAttributeList :: Phantoms.TTerm Syntax.AttributeList -> Phantoms.TTerm [Syntax.Attribute]
-unAttributeList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.AttributeList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAttributeName :: Phantoms.TTerm Syntax.AttributeName -> Phantoms.TTerm Syntax.TypeName
-unAttributeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.AttributeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAttributes :: Phantoms.TTerm Syntax.Attributes -> Phantoms.TTerm [Syntax.AttributeSection]
-unAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.Attributes")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.Statement]
-unBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.Block")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBooleanExpression :: Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.Expression
-unBooleanExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.BooleanExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unClassBody :: Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm [Syntax.ClassMemberDeclaration]
-unClassBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.ClassBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConstantExpression :: Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.Expression
-unConstantExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.ConstantExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDeconstructionTuple :: Phantoms.TTerm Syntax.DeconstructionTuple -> Phantoms.TTerm [Syntax.DeconstructionElement]
-unDeconstructionTuple x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.DeconstructionTuple")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDelegateType :: Phantoms.TTerm Syntax.DelegateType -> Phantoms.TTerm Syntax.TypeName
-unDelegateType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.DelegateType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDesignation :: Phantoms.TTerm Syntax.Designation -> Phantoms.TTerm Syntax.Identifier
-unDesignation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.Designation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumBody :: Phantoms.TTerm Syntax.EnumBody -> Phantoms.TTerm [Syntax.EnumMemberDeclaration]
-unEnumBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.EnumBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumType :: Phantoms.TTerm Syntax.EnumType -> Phantoms.TTerm Syntax.TypeName
-unEnumType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.EnumType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExpressionList :: Phantoms.TTerm Syntax.ExpressionList -> Phantoms.TTerm [Syntax.Expression]
-unExpressionList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.ExpressionList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExternAliasDirective :: Phantoms.TTerm Syntax.ExternAliasDirective -> Phantoms.TTerm Syntax.Identifier
-unExternAliasDirective x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.ExternAliasDirective")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm String
-unIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.Identifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterfaceType :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.TypeName
-unInterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.InterfaceType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterpolatedRegularStringExpression :: Phantoms.TTerm Syntax.InterpolatedRegularStringExpression -> Phantoms.TTerm String
-unInterpolatedRegularStringExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.InterpolatedRegularStringExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterpolatedVerbatimStringExpression :: Phantoms.TTerm Syntax.InterpolatedVerbatimStringExpression -> Phantoms.TTerm String
-unInterpolatedVerbatimStringExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.InterpolatedVerbatimStringExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unKeyword :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm String
-unKeyword x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.Keyword")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMemberDeclaratorList :: Phantoms.TTerm Syntax.MemberDeclaratorList -> Phantoms.TTerm [Syntax.MemberDeclarator]
-unMemberDeclaratorList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.MemberDeclaratorList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNamedArgumentList :: Phantoms.TTerm Syntax.NamedArgumentList -> Phantoms.TTerm [Syntax.NamedArgument]
-unNamedArgumentList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.NamedArgumentList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNamespaceName :: Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-unNamespaceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.NamespaceName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPositionalArgumentList :: Phantoms.TTerm Syntax.PositionalArgumentList -> Phantoms.TTerm [Syntax.PositionalArgument]
-unPositionalArgumentList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.PositionalArgumentList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unQualifiedIdentifier :: Phantoms.TTerm Syntax.QualifiedIdentifier -> Phantoms.TTerm [Syntax.Identifier]
-unQualifiedIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.QualifiedIdentifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRankSpecifier :: Phantoms.TTerm Syntax.RankSpecifier -> Phantoms.TTerm Int
-unRankSpecifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.RankSpecifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSecondaryConstraints :: Phantoms.TTerm Syntax.SecondaryConstraints -> Phantoms.TTerm [Syntax.SecondaryConstraint]
-unSecondaryConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.SecondaryConstraints")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStatementExpressionList :: Phantoms.TTerm Syntax.StatementExpressionList -> Phantoms.TTerm [Syntax.StatementExpression]
-unStatementExpressionList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.StatementExpressionList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTupleType :: Phantoms.TTerm Syntax.TupleType -> Phantoms.TTerm [Syntax.TupleTypeElement]
-unTupleType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.TupleType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeArgumentList :: Phantoms.TTerm Syntax.TypeArgumentList -> Phantoms.TTerm [Syntax.Type]
-unTypeArgumentList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.TypeArgumentList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-unTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.TypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeParameter :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.Identifier
-unTypeParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.TypeParameter")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeParameterList :: Phantoms.TTerm Syntax.TypeParameterList -> Phantoms.TTerm [Syntax.TypeParameterPart]
-unTypeParameterList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.TypeParameterList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnboundTypeName :: Phantoms.TTerm Syntax.UnboundTypeName -> Phantoms.TTerm [Syntax.UnboundTypeNamePart]
-unUnboundTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.UnboundTypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariableDeclarators :: Phantoms.TTerm Syntax.VariableDeclarators -> Phantoms.TTerm [Syntax.VariableDeclarator]
-unVariableDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.VariableDeclarators")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariableReference :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.Expression
-unVariableReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.VariableReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariantTypeParameters :: Phantoms.TTerm Syntax.VariantTypeParameters -> Phantoms.TTerm [Syntax.VariantTypeParameter]
-unVariantTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.csharp.syntax.VariantTypeParameters")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionAddressOf :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionAddressOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addressOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionAwait :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionAwait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "await"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionBitwiseComplement :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionBitwiseComplement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseComplement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionCast :: Phantoms.TTerm Syntax.CastExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionCast x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cast"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionMinus :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionMinus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionNot :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPlus :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPlus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPointerIndirection :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPointerIndirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointerIndirection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPreDecrement :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPreDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPreIncrement :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPreIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPrimary :: Phantoms.TTerm Syntax.PrimaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryOperatorDeclarator :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.OverloadableUnaryOperator -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.UnaryOperatorDeclarator
-unaryOperatorDeclarator type_ operator parameter =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)}]}))
-
-unaryOperatorDeclaratorOperator :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.OverloadableUnaryOperator
-unaryOperatorDeclaratorOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperatorDeclaratorParameter :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter
-unaryOperatorDeclaratorParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperatorDeclaratorType :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.Type
-unaryOperatorDeclaratorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperatorDeclaratorWithOperator :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.OverloadableUnaryOperator -> Phantoms.TTerm Syntax.UnaryOperatorDeclarator
-unaryOperatorDeclaratorWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryOperatorDeclaratorWithParameter :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.FixedParameter -> Phantoms.TTerm Syntax.UnaryOperatorDeclarator
-unaryOperatorDeclaratorWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryOperatorDeclaratorWithType :: Phantoms.TTerm Syntax.UnaryOperatorDeclarator -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.UnaryOperatorDeclarator
-unaryOperatorDeclaratorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnaryOperatorDeclarator"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unboundTypeName :: Phantoms.TTerm [Syntax.UnboundTypeNamePart] -> Phantoms.TTerm Syntax.UnboundTypeName
-unboundTypeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unboundTypeNamePart :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Syntax.UnboundTypeNamePart
-unboundTypeNamePart identifier aliased dimension =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliased"),
-          Core.fieldTerm = (Phantoms.unTTerm aliased)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimension"),
-          Core.fieldTerm = (Phantoms.unTTerm dimension)}]}))
-
-unboundTypeNamePartAliased :: Phantoms.TTerm Syntax.UnboundTypeNamePart -> Phantoms.TTerm Bool
-unboundTypeNamePartAliased x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-        Core.projectionField = (Core.Name "aliased")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unboundTypeNamePartDimension :: Phantoms.TTerm Syntax.UnboundTypeNamePart -> Phantoms.TTerm (Maybe Int)
-unboundTypeNamePartDimension x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-        Core.projectionField = (Core.Name "dimension")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unboundTypeNamePartIdentifier :: Phantoms.TTerm Syntax.UnboundTypeNamePart -> Phantoms.TTerm Syntax.Identifier
-unboundTypeNamePartIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unboundTypeNamePartWithAliased :: Phantoms.TTerm Syntax.UnboundTypeNamePart -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.UnboundTypeNamePart
-unboundTypeNamePartWithAliased original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliased"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-              Core.projectionField = (Core.Name "dimension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unboundTypeNamePartWithDimension :: Phantoms.TTerm Syntax.UnboundTypeNamePart -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Syntax.UnboundTypeNamePart
-unboundTypeNamePartWithDimension original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliased"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-              Core.projectionField = (Core.Name "aliased")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimension"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unboundTypeNamePartWithIdentifier :: Phantoms.TTerm Syntax.UnboundTypeNamePart -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.UnboundTypeNamePart
-unboundTypeNamePartWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliased"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-              Core.projectionField = (Core.Name "aliased")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UnboundTypeNamePart"),
-              Core.projectionField = (Core.Name "dimension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unmanagedTypePointer :: Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm Syntax.UnmanagedType
-unmanagedTypePointer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnmanagedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unmanagedTypeValue :: Phantoms.TTerm Syntax.ValueType -> Phantoms.TTerm Syntax.UnmanagedType
-unmanagedTypeValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UnmanagedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-usingAliasDirective :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.NamespaceOrTypeName -> Phantoms.TTerm Syntax.UsingAliasDirective
-usingAliasDirective alias name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-usingAliasDirectiveAlias :: Phantoms.TTerm Syntax.UsingAliasDirective -> Phantoms.TTerm Syntax.Identifier
-usingAliasDirectiveAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-usingAliasDirectiveName :: Phantoms.TTerm Syntax.UsingAliasDirective -> Phantoms.TTerm Syntax.NamespaceOrTypeName
-usingAliasDirectiveName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-usingAliasDirectiveWithAlias :: Phantoms.TTerm Syntax.UsingAliasDirective -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.UsingAliasDirective
-usingAliasDirectiveWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-usingAliasDirectiveWithName :: Phantoms.TTerm Syntax.UsingAliasDirective -> Phantoms.TTerm Syntax.NamespaceOrTypeName -> Phantoms.TTerm Syntax.UsingAliasDirective
-usingAliasDirectiveWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingAliasDirective"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-usingDirectiveAlias :: Phantoms.TTerm Syntax.UsingAliasDirective -> Phantoms.TTerm Syntax.UsingDirective
-usingDirectiveAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UsingDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-usingDirectiveNamespace :: Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm Syntax.UsingDirective
-usingDirectiveNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UsingDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "namespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-usingDirectiveStatic :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.UsingDirective
-usingDirectiveStatic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.UsingDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-usingStatement :: Phantoms.TTerm Syntax.ResourceAcquisition -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.UsingStatement
-usingStatement acquisition body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acquisition"),
-          Core.fieldTerm = (Phantoms.unTTerm acquisition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-usingStatementAcquisition :: Phantoms.TTerm Syntax.UsingStatement -> Phantoms.TTerm Syntax.ResourceAcquisition
-usingStatementAcquisition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-        Core.projectionField = (Core.Name "acquisition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-usingStatementBody :: Phantoms.TTerm Syntax.UsingStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-usingStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-usingStatementWithAcquisition :: Phantoms.TTerm Syntax.UsingStatement -> Phantoms.TTerm Syntax.ResourceAcquisition -> Phantoms.TTerm Syntax.UsingStatement
-usingStatementWithAcquisition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acquisition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-usingStatementWithBody :: Phantoms.TTerm Syntax.UsingStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.UsingStatement
-usingStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acquisition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.UsingStatement"),
-              Core.projectionField = (Core.Name "acquisition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valueTypeNonNullable :: Phantoms.TTerm Syntax.StructOrEnumType -> Phantoms.TTerm Syntax.ValueType
-valueTypeNonNullable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonNullable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeNullable :: Phantoms.TTerm Syntax.StructOrEnumType -> Phantoms.TTerm Syntax.ValueType
-valueTypeNullable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.VariableInitializer) -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclarator identifier initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-variableDeclaratorIdentifier :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm Syntax.Identifier
-variableDeclaratorIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorInitializer :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm (Maybe Syntax.VariableInitializer)
-variableDeclaratorInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorWithIdentifier :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclaratorWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclaratorWithInitializer :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm (Maybe Syntax.VariableInitializer) -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclaratorWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDeclarators :: Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.VariableDeclarators
-variableDeclarators x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.VariableDeclarators"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-variableInitializerArray :: Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.VariableInitializer
-variableInitializerArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.VariableInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableInitializerExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.VariableInitializer
-variableInitializerExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.VariableInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableReference :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.VariableReference
-variableReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.VariableReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-varianceAnnotationIn :: Phantoms.TTerm Syntax.VarianceAnnotation
-varianceAnnotationIn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.VarianceAnnotation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-varianceAnnotationOut :: Phantoms.TTerm Syntax.VarianceAnnotation
-varianceAnnotationOut =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.VarianceAnnotation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "out"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-variantTypeParameter :: Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm (Maybe Syntax.VarianceAnnotation) -> Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.VariantTypeParameter
-variantTypeParameter attributes variance parameter =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variance"),
-          Core.fieldTerm = (Phantoms.unTTerm variance)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)}]}))
-
-variantTypeParameterAttributes :: Phantoms.TTerm Syntax.VariantTypeParameter -> Phantoms.TTerm (Maybe Syntax.Attributes)
-variantTypeParameterAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variantTypeParameterParameter :: Phantoms.TTerm Syntax.VariantTypeParameter -> Phantoms.TTerm Syntax.TypeParameter
-variantTypeParameterParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variantTypeParameterVariance :: Phantoms.TTerm Syntax.VariantTypeParameter -> Phantoms.TTerm (Maybe Syntax.VarianceAnnotation)
-variantTypeParameterVariance x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-        Core.projectionField = (Core.Name "variance")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variantTypeParameterWithAttributes :: Phantoms.TTerm Syntax.VariantTypeParameter -> Phantoms.TTerm (Maybe Syntax.Attributes) -> Phantoms.TTerm Syntax.VariantTypeParameter
-variantTypeParameterWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variance"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-              Core.projectionField = (Core.Name "variance")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variantTypeParameterWithParameter :: Phantoms.TTerm Syntax.VariantTypeParameter -> Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.VariantTypeParameter
-variantTypeParameterWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variance"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-              Core.projectionField = (Core.Name "variance")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variantTypeParameterWithVariance :: Phantoms.TTerm Syntax.VariantTypeParameter -> Phantoms.TTerm (Maybe Syntax.VarianceAnnotation) -> Phantoms.TTerm Syntax.VariantTypeParameter
-variantTypeParameterWithVariance original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variance"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameter"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variantTypeParameters :: Phantoms.TTerm [Syntax.VariantTypeParameter] -> Phantoms.TTerm Syntax.VariantTypeParameters
-variantTypeParameters x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.csharp.syntax.VariantTypeParameters"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-verbatimInterpolation :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.ConstantExpression) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.VerbatimInterpolation
-verbatimInterpolation expression width format =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Phantoms.unTTerm width)},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Phantoms.unTTerm format)}]}))
-
-verbatimInterpolationExpression :: Phantoms.TTerm Syntax.VerbatimInterpolation -> Phantoms.TTerm Syntax.Expression
-verbatimInterpolationExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-verbatimInterpolationFormat :: Phantoms.TTerm Syntax.VerbatimInterpolation -> Phantoms.TTerm (Maybe String)
-verbatimInterpolationFormat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-        Core.projectionField = (Core.Name "format")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-verbatimInterpolationWidth :: Phantoms.TTerm Syntax.VerbatimInterpolation -> Phantoms.TTerm (Maybe Syntax.ConstantExpression)
-verbatimInterpolationWidth x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-        Core.projectionField = (Core.Name "width")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-verbatimInterpolationWithExpression :: Phantoms.TTerm Syntax.VerbatimInterpolation -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.VerbatimInterpolation
-verbatimInterpolationWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-              Core.projectionField = (Core.Name "width")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-              Core.projectionField = (Core.Name "format")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-verbatimInterpolationWithFormat :: Phantoms.TTerm Syntax.VerbatimInterpolation -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.VerbatimInterpolation
-verbatimInterpolationWithFormat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-              Core.projectionField = (Core.Name "width")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-verbatimInterpolationWithWidth :: Phantoms.TTerm Syntax.VerbatimInterpolation -> Phantoms.TTerm (Maybe Syntax.ConstantExpression) -> Phantoms.TTerm Syntax.VerbatimInterpolation
-verbatimInterpolationWithWidth original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "width"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "format"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.VerbatimInterpolation"),
-              Core.projectionField = (Core.Name "format")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whileStatement :: Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatement condition body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-whileStatementBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.EmbeddedStatement
-whileStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementCondition :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.BooleanExpression
-whileStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementWithBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.EmbeddedStatement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileStatementWithCondition :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.BooleanExpression -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.csharp.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-yieldStatementBreak :: Phantoms.TTerm Syntax.YieldStatement
-yieldStatementBreak =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.YieldStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-yieldStatementReturn :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.YieldStatement
-yieldStatementReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.csharp.syntax.YieldStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Cypher/Features.hs b/src/main/haskell/Hydra/Dsl/Cypher/Features.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Cypher/Features.hs
+++ /dev/null
@@ -1,26969 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.cypher.features
-
-module Hydra.Dsl.Cypher.Features where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Cypher.Features as Features
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-aggregateFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeatures avg collect count max min percentileCont percentileDisc stdev stdevp sum =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Phantoms.unTTerm avg)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Phantoms.unTTerm collect)},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm count)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm max)},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm min)},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Phantoms.unTTerm percentileCont)},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Phantoms.unTTerm percentileDisc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Phantoms.unTTerm stdev)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Phantoms.unTTerm stdevp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Phantoms.unTTerm sum)}]}))
-
-aggregateFunctionFeaturesAvg :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesAvg x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "avg")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesCollect :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesCollect x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "collect")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesCount :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "count")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesMax :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesMax x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "max")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesMin :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesMin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "min")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesPercentileCont :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesPercentileCont x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "percentileCont")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesPercentileDisc :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesPercentileDisc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "percentileDisc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesStdev :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesStdev x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "stdev")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesStdevp :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesStdevp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "stdevp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesSum :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool
-aggregateFunctionFeaturesSum x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-        Core.projectionField = (Core.Name "sum")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aggregateFunctionFeaturesWithAvg :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithAvg original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithCollect :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithCollect original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithCount :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithMax :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithMax original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithMin :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithMin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithPercentileCont :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithPercentileCont original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithPercentileDisc :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithPercentileDisc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithStdev :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithStdev original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithStdevp :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithStdevp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "sum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aggregateFunctionFeaturesWithSum :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AggregateFunctionFeatures
-aggregateFunctionFeaturesWithSum original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "avg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "avg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "collect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileCont"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileCont")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "percentileDisc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "percentileDisc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdev"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdev")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stdevp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AggregateFunctionFeatures"),
-              Core.projectionField = (Core.Name "stdevp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sum"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arithmeticFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeatures plus minus multiply divide modulus powerOf =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Phantoms.unTTerm plus)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Phantoms.unTTerm minus)},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Phantoms.unTTerm multiply)},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Phantoms.unTTerm divide)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Phantoms.unTTerm modulus)},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Phantoms.unTTerm powerOf)}]}))
-
-arithmeticFeaturesDivide :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool
-arithmeticFeaturesDivide x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-        Core.projectionField = (Core.Name "divide")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arithmeticFeaturesMinus :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool
-arithmeticFeaturesMinus x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-        Core.projectionField = (Core.Name "minus")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arithmeticFeaturesModulus :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool
-arithmeticFeaturesModulus x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-        Core.projectionField = (Core.Name "modulus")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arithmeticFeaturesMultiply :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool
-arithmeticFeaturesMultiply x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-        Core.projectionField = (Core.Name "multiply")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arithmeticFeaturesPlus :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool
-arithmeticFeaturesPlus x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-        Core.projectionField = (Core.Name "plus")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arithmeticFeaturesPowerOf :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool
-arithmeticFeaturesPowerOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-        Core.projectionField = (Core.Name "powerOf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arithmeticFeaturesWithDivide :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeaturesWithDivide original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "plus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "minus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "multiply")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "modulus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "powerOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arithmeticFeaturesWithMinus :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeaturesWithMinus original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "plus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "multiply")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "divide")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "modulus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "powerOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arithmeticFeaturesWithModulus :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeaturesWithModulus original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "plus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "minus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "multiply")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "divide")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "powerOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arithmeticFeaturesWithMultiply :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeaturesWithMultiply original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "plus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "minus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "divide")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "modulus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "powerOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arithmeticFeaturesWithPlus :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeaturesWithPlus original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "minus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "multiply")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "divide")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "modulus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "powerOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arithmeticFeaturesWithPowerOf :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ArithmeticFeatures
-arithmeticFeaturesWithPowerOf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "plus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "plus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "minus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "multiply"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "multiply")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "divide"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "divide")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modulus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ArithmeticFeatures"),
-              Core.projectionField = (Core.Name "modulus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "powerOf"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atomFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeatures caseExpression count existentialSubquery functionInvocation parameter patternComprehension patternPredicate variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm caseExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm count)},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Phantoms.unTTerm existentialSubquery)},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Phantoms.unTTerm functionInvocation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Phantoms.unTTerm patternComprehension)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Phantoms.unTTerm patternPredicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-atomFeaturesCaseExpression :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesCaseExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "caseExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesCount :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "count")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesExistentialSubquery :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesExistentialSubquery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "existentialSubquery")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesFunctionInvocation :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesFunctionInvocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "functionInvocation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesParameter :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesPatternComprehension :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesPatternComprehension x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "patternComprehension")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesPatternPredicate :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesPatternPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "patternPredicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesVariable :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool
-atomFeaturesVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomFeaturesWithCaseExpression :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithCaseExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithCount :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithExistentialSubquery :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithExistentialSubquery original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithFunctionInvocation :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithFunctionInvocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithParameter :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithPatternComprehension :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithPatternComprehension original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithPatternPredicate :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithPatternPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomFeaturesWithVariable :: Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.AtomFeatures
-atomFeaturesWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "caseExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "existentialSubquery"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "existentialSubquery")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionInvocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "functionInvocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.AtomFeatures"),
-              Core.projectionField = (Core.Name "patternPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-comparisonFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeatures equal greaterThan greaterThanOrEqual lessThan lessThanOrEqual notEqual =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Phantoms.unTTerm equal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Phantoms.unTTerm greaterThan)},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Phantoms.unTTerm greaterThanOrEqual)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Phantoms.unTTerm lessThan)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Phantoms.unTTerm lessThanOrEqual)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Phantoms.unTTerm notEqual)}]}))
-
-comparisonFeaturesEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool
-comparisonFeaturesEqual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-        Core.projectionField = (Core.Name "equal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonFeaturesGreaterThan :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool
-comparisonFeaturesGreaterThan x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-        Core.projectionField = (Core.Name "greaterThan")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonFeaturesGreaterThanOrEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool
-comparisonFeaturesGreaterThanOrEqual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-        Core.projectionField = (Core.Name "greaterThanOrEqual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonFeaturesLessThan :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool
-comparisonFeaturesLessThan x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-        Core.projectionField = (Core.Name "lessThan")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonFeaturesLessThanOrEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool
-comparisonFeaturesLessThanOrEqual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-        Core.projectionField = (Core.Name "lessThanOrEqual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonFeaturesNotEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool
-comparisonFeaturesNotEqual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-        Core.projectionField = (Core.Name "notEqual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonFeaturesWithEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeaturesWithEqual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "notEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonFeaturesWithGreaterThan :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeaturesWithGreaterThan original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "equal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "notEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonFeaturesWithGreaterThanOrEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeaturesWithGreaterThanOrEqual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "equal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "notEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonFeaturesWithLessThan :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeaturesWithLessThan original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "equal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "notEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonFeaturesWithLessThanOrEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeaturesWithLessThanOrEqual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "equal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "notEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonFeaturesWithNotEqual :: Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ComparisonFeatures
-comparisonFeaturesWithNotEqual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "equal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "greaterThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ComparisonFeatures"),
-              Core.projectionField = (Core.Name "lessThanOrEqual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-cypherFeatures :: Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Features.DeleteFeatures -> Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.ListFeatures -> Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Features.MatchFeatures -> Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Features.NullFeatures -> Phantoms.TTerm Features.PathFeatures -> Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Features.RemoveFeatures -> Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeatures arithmetic atom comparison delete function list literal logical match merge nodePattern null path procedureCall projection quantifier rangeLiteral reading relationshipDirection relationshipPattern remove set string updating =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Phantoms.unTTerm arithmetic)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Phantoms.unTTerm atom)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Phantoms.unTTerm comparison)},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Phantoms.unTTerm delete)},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Phantoms.unTTerm list)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm literal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Phantoms.unTTerm logical)},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Phantoms.unTTerm match)},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm merge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Phantoms.unTTerm nodePattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Phantoms.unTTerm null)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Phantoms.unTTerm procedureCall)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm projection)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Phantoms.unTTerm rangeLiteral)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Phantoms.unTTerm reading)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Phantoms.unTTerm relationshipDirection)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Phantoms.unTTerm relationshipPattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Phantoms.unTTerm remove)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm set)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Phantoms.unTTerm updating)}]}))
-
-cypherFeaturesArithmetic :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ArithmeticFeatures
-cypherFeaturesArithmetic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "arithmetic")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesAtom :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.AtomFeatures
-cypherFeaturesAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "atom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesComparison :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ComparisonFeatures
-cypherFeaturesComparison x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "comparison")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesDelete :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.DeleteFeatures
-cypherFeaturesDelete x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "delete")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesFunction :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.FunctionFeatures
-cypherFeaturesFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesList :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ListFeatures
-cypherFeaturesList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "list")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesLiteral :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.LiteralFeatures
-cypherFeaturesLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "literal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesLogical :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.LogicalFeatures
-cypherFeaturesLogical x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "logical")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesMatch :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.MatchFeatures
-cypherFeaturesMatch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "match")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesMerge :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.MergeFeatures
-cypherFeaturesMerge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "merge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesNodePattern :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.NodePatternFeatures
-cypherFeaturesNodePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "nodePattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesNull :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.NullFeatures
-cypherFeaturesNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "null")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesPath :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.PathFeatures
-cypherFeaturesPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesProcedureCall :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ProcedureCallFeatures
-cypherFeaturesProcedureCall x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "procedureCall")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesProjection :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ProjectionFeatures
-cypherFeaturesProjection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "projection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesQuantifier :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.QuantifierFeatures
-cypherFeaturesQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesRangeLiteral :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RangeLiteralFeatures
-cypherFeaturesRangeLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "rangeLiteral")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesReading :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ReadingFeatures
-cypherFeaturesReading x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "reading")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesRelationshipDirection :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RelationshipDirectionFeatures
-cypherFeaturesRelationshipDirection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "relationshipDirection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesRelationshipPattern :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RelationshipPatternFeatures
-cypherFeaturesRelationshipPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "relationshipPattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesRemove :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RemoveFeatures
-cypherFeaturesRemove x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "remove")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesSet :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.SetFeatures
-cypherFeaturesSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "set")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesString :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.StringFeatures
-cypherFeaturesString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesUpdating :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.UpdatingFeatures
-cypherFeaturesUpdating x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-        Core.projectionField = (Core.Name "updating")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-cypherFeaturesWithArithmetic :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ArithmeticFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithArithmetic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithAtom :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.AtomFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithComparison :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ComparisonFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithComparison original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithDelete :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.DeleteFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithDelete original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithFunction :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithList :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ListFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithLiteral :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithLogical :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithLogical original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithMatch :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.MatchFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithMatch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithMerge :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithMerge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithNodePattern :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithNodePattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithNull :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.NullFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithPath :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.PathFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithProcedureCall :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithProcedureCall original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithProjection :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithProjection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithQuantifier :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithRangeLiteral :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithRangeLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithReading :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithReading original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithRelationshipDirection :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithRelationshipDirection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithRelationshipPattern :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithRelationshipPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithRemove :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.RemoveFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithRemove original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithSet :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithString :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cypherFeaturesWithUpdating :: Phantoms.TTerm Features.CypherFeatures -> Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Features.CypherFeatures
-cypherFeaturesWithUpdating original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "arithmetic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "arithmetic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logical"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "logical")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "procedureCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rangeLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "rangeLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipDirection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipDirection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationshipPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "relationshipPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "remove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.CypherFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-databaseFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Features.DatabaseFunctionFeatures
-databaseFunctionFeatures dbNameFromElementId =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.DatabaseFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dbNameFromElementId"),
-          Core.fieldTerm = (Phantoms.unTTerm dbNameFromElementId)}]}))
-
-databaseFunctionFeaturesDbNameFromElementId :: Phantoms.TTerm Features.DatabaseFunctionFeatures -> Phantoms.TTerm Bool
-databaseFunctionFeaturesDbNameFromElementId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.DatabaseFunctionFeatures"),
-        Core.projectionField = (Core.Name "dbNameFromElementId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-databaseFunctionFeaturesWithDbNameFromElementId :: Phantoms.TTerm Features.DatabaseFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DatabaseFunctionFeatures
-databaseFunctionFeaturesWithDbNameFromElementId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.DatabaseFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dbNameFromElementId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-deleteFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DeleteFeatures
-deleteFeatures delete detachDelete =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Phantoms.unTTerm delete)},
-        Core.Field {
-          Core.fieldName = (Core.Name "detachDelete"),
-          Core.fieldTerm = (Phantoms.unTTerm detachDelete)}]}))
-
-deleteFeaturesDelete :: Phantoms.TTerm Features.DeleteFeatures -> Phantoms.TTerm Bool
-deleteFeaturesDelete x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-        Core.projectionField = (Core.Name "delete")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-deleteFeaturesDetachDelete :: Phantoms.TTerm Features.DeleteFeatures -> Phantoms.TTerm Bool
-deleteFeaturesDetachDelete x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-        Core.projectionField = (Core.Name "detachDelete")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-deleteFeaturesWithDelete :: Phantoms.TTerm Features.DeleteFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DeleteFeatures
-deleteFeaturesWithDelete original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "detachDelete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-              Core.projectionField = (Core.Name "detachDelete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-deleteFeaturesWithDetachDelete :: Phantoms.TTerm Features.DeleteFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DeleteFeatures
-deleteFeaturesWithDetachDelete original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "delete"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.DeleteFeatures"),
-              Core.projectionField = (Core.Name "delete")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "detachDelete"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionFeatures :: Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Features.DatabaseFunctionFeatures -> Phantoms.TTerm Features.GenAIFunctionFeatures -> Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Features.LoadCSVFunctionFeatures -> Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Features.VectorFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeatures aggregateFunction databaseFunction genAIFunction graphFunction listFunction loadCSVFunction logarithmicFunction numericFunction predicateFunction scalarFunction spatialFunction stringFunction temporalDurationFunction temporalInstantFunction trigonometricFunction vectorFunction =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm aggregateFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm databaseFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm genAIFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm graphFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm listFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm loadCSVFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm logarithmicFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm numericFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm predicateFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm scalarFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm spatialFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm stringFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm temporalDurationFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm temporalInstantFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm trigonometricFunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm vectorFunction)}]}))
-
-functionFeaturesAggregateFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.AggregateFunctionFeatures
-functionFeaturesAggregateFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "aggregateFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesDatabaseFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.DatabaseFunctionFeatures
-functionFeaturesDatabaseFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "databaseFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesGenAIFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.GenAIFunctionFeatures
-functionFeaturesGenAIFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "genAIFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesGraphFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.GraphFunctionFeatures
-functionFeaturesGraphFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "graphFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesListFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.ListFunctionFeatures
-functionFeaturesListFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "listFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesLoadCSVFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.LoadCSVFunctionFeatures
-functionFeaturesLoadCSVFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "loadCSVFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesLogarithmicFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-functionFeaturesLogarithmicFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "logarithmicFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesNumericFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.NumericFunctionFeatures
-functionFeaturesNumericFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "numericFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesPredicateFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.PredicateFunctionFeatures
-functionFeaturesPredicateFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "predicateFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesScalarFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.ScalarFunctionFeatures
-functionFeaturesScalarFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "scalarFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesSpatialFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.SpatialFunctionFeatures
-functionFeaturesSpatialFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "spatialFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesStringFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.StringFunctionFeatures
-functionFeaturesStringFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "stringFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesTemporalDurationFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-functionFeaturesTemporalDurationFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "temporalDurationFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesTemporalInstantFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-functionFeaturesTemporalInstantFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "temporalInstantFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesTrigonometricFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-functionFeaturesTrigonometricFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "trigonometricFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesVectorFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.VectorFunctionFeatures
-functionFeaturesVectorFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-        Core.projectionField = (Core.Name "vectorFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionFeaturesWithAggregateFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.AggregateFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithAggregateFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithDatabaseFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.DatabaseFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithDatabaseFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithGenAIFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.GenAIFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithGenAIFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithGraphFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithGraphFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithListFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithListFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithLoadCSVFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.LoadCSVFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithLoadCSVFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithLogarithmicFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithLogarithmicFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithNumericFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithNumericFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithPredicateFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithPredicateFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithScalarFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithScalarFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithSpatialFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithSpatialFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithStringFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithStringFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithTemporalDurationFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithTemporalDurationFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithTemporalInstantFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithTemporalInstantFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithTrigonometricFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithTrigonometricFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionFeaturesWithVectorFunction :: Phantoms.TTerm Features.FunctionFeatures -> Phantoms.TTerm Features.VectorFunctionFeatures -> Phantoms.TTerm Features.FunctionFeatures
-functionFeaturesWithVectorFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aggregateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "aggregateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "databaseFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "databaseFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genAIFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "genAIFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "graphFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "listFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "loadCSVFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "loadCSVFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logarithmicFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "logarithmicFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "numericFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicateFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "predicateFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scalarFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "scalarFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spatialFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "spatialFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "stringFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalDurationFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalInstantFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "temporalInstantFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trigonometricFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.FunctionFeatures"),
-              Core.projectionField = (Core.Name "trigonometricFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genAIFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Features.GenAIFunctionFeatures
-genAIFunctionFeatures genaiVectorEncode =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GenAIFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "genaiVectorEncode"),
-          Core.fieldTerm = (Phantoms.unTTerm genaiVectorEncode)}]}))
-
-genAIFunctionFeaturesGenaiVectorEncode :: Phantoms.TTerm Features.GenAIFunctionFeatures -> Phantoms.TTerm Bool
-genAIFunctionFeaturesGenaiVectorEncode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.GenAIFunctionFeatures"),
-        Core.projectionField = (Core.Name "genaiVectorEncode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genAIFunctionFeaturesWithGenaiVectorEncode :: Phantoms.TTerm Features.GenAIFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GenAIFunctionFeatures
-genAIFunctionFeaturesWithGenaiVectorEncode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GenAIFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "genaiVectorEncode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFunctionFeatures
-graphFunctionFeatures graphByElementId graphByName graphNames graphPropertiesByName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByElementId"),
-          Core.fieldTerm = (Phantoms.unTTerm graphByElementId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByName"),
-          Core.fieldTerm = (Phantoms.unTTerm graphByName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphNames"),
-          Core.fieldTerm = (Phantoms.unTTerm graphNames)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphPropertiesByName"),
-          Core.fieldTerm = (Phantoms.unTTerm graphPropertiesByName)}]}))
-
-graphFunctionFeaturesGraphByElementId :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool
-graphFunctionFeaturesGraphByElementId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-        Core.projectionField = (Core.Name "graphByElementId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFunctionFeaturesGraphByName :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool
-graphFunctionFeaturesGraphByName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-        Core.projectionField = (Core.Name "graphByName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFunctionFeaturesGraphNames :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool
-graphFunctionFeaturesGraphNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-        Core.projectionField = (Core.Name "graphNames")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFunctionFeaturesGraphPropertiesByName :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool
-graphFunctionFeaturesGraphPropertiesByName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-        Core.projectionField = (Core.Name "graphPropertiesByName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFunctionFeaturesWithGraphByElementId :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFunctionFeatures
-graphFunctionFeaturesWithGraphByElementId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByElementId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphByName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphNames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphNames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphPropertiesByName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphPropertiesByName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFunctionFeaturesWithGraphByName :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFunctionFeatures
-graphFunctionFeaturesWithGraphByName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByElementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphByElementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphNames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphNames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphPropertiesByName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphPropertiesByName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFunctionFeaturesWithGraphNames :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFunctionFeatures
-graphFunctionFeaturesWithGraphNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByElementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphByElementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphByName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphNames"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphPropertiesByName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphPropertiesByName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFunctionFeaturesWithGraphPropertiesByName :: Phantoms.TTerm Features.GraphFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFunctionFeatures
-graphFunctionFeaturesWithGraphPropertiesByName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByElementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphByElementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphByName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphByName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphNames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.GraphFunctionFeatures"),
-              Core.projectionField = (Core.Name "graphNames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphPropertiesByName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFeatures
-listFeatures listComprehension listRange =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listComprehension"),
-          Core.fieldTerm = (Phantoms.unTTerm listComprehension)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listRange"),
-          Core.fieldTerm = (Phantoms.unTTerm listRange)}]}))
-
-listFeaturesListComprehension :: Phantoms.TTerm Features.ListFeatures -> Phantoms.TTerm Bool
-listFeaturesListComprehension x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-        Core.projectionField = (Core.Name "listComprehension")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFeaturesListRange :: Phantoms.TTerm Features.ListFeatures -> Phantoms.TTerm Bool
-listFeaturesListRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-        Core.projectionField = (Core.Name "listRange")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFeaturesWithListComprehension :: Phantoms.TTerm Features.ListFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFeatures
-listFeaturesWithListComprehension original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listComprehension"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-              Core.projectionField = (Core.Name "listRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFeaturesWithListRange :: Phantoms.TTerm Features.ListFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFeatures
-listFeaturesWithListRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listComprehension"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFeatures"),
-              Core.projectionField = (Core.Name "listComprehension")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listRange"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeatures keys labels nodes range reduce relationships reverse tail toBooleanList toFloatList toIntegerList toStringList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Phantoms.unTTerm nodes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Phantoms.unTTerm reduce)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Phantoms.unTTerm relationships)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Phantoms.unTTerm reverse)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm tail)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Phantoms.unTTerm toBooleanList)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Phantoms.unTTerm toFloatList)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Phantoms.unTTerm toIntegerList)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Phantoms.unTTerm toStringList)}]}))
-
-listFunctionFeaturesKeys :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesLabels :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesNodes :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesNodes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "nodes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesRange :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesReduce :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesReduce x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "reduce")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesRelationships :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesRelationships x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "relationships")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesReverse :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesReverse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "reverse")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesTail :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesTail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "tail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesToBooleanList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesToBooleanList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "toBooleanList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesToFloatList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesToFloatList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "toFloatList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesToIntegerList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesToIntegerList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "toIntegerList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesToStringList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool
-listFunctionFeaturesToStringList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-        Core.projectionField = (Core.Name "toStringList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listFunctionFeaturesWithKeys :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithLabels :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithNodes :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithNodes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithRange :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithReduce :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithReduce original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithRelationships :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithRelationships original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithReverse :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithReverse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithTail :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithTail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithToBooleanList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithToBooleanList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithToFloatList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithToFloatList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithToIntegerList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithToIntegerList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listFunctionFeaturesWithToStringList :: Phantoms.TTerm Features.ListFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ListFunctionFeatures
-listFunctionFeaturesWithToStringList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reduce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reduce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "relationships"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "relationships")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ListFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeatures boolean double integer list map null string =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Phantoms.unTTerm boolean)},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Phantoms.unTTerm double)},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Phantoms.unTTerm integer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Phantoms.unTTerm list)},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Phantoms.unTTerm map)},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Phantoms.unTTerm null)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)}]}))
-
-literalFeaturesBoolean :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesBoolean x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "boolean")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesDouble :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesDouble x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "double")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesInteger :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "integer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesList :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "list")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesMap :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "map")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesNull :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "null")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesString :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool
-literalFeaturesString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalFeaturesWithBoolean :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithBoolean original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "double")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalFeaturesWithDouble :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithDouble original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "boolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalFeaturesWithInteger :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithInteger original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "boolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "double")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalFeaturesWithList :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "boolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "double")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalFeaturesWithMap :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithMap original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "boolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "double")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalFeaturesWithNull :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "boolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "double")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalFeaturesWithString :: Phantoms.TTerm Features.LiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LiteralFeatures
-literalFeaturesWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "boolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "double"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "double")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "list")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LiteralFeatures"),
-              Core.projectionField = (Core.Name "null")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-loadCSVFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LoadCSVFunctionFeatures
-loadCSVFunctionFeatures file linenumber =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "file"),
-          Core.fieldTerm = (Phantoms.unTTerm file)},
-        Core.Field {
-          Core.fieldName = (Core.Name "linenumber"),
-          Core.fieldTerm = (Phantoms.unTTerm linenumber)}]}))
-
-loadCSVFunctionFeaturesFile :: Phantoms.TTerm Features.LoadCSVFunctionFeatures -> Phantoms.TTerm Bool
-loadCSVFunctionFeaturesFile x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-        Core.projectionField = (Core.Name "file")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-loadCSVFunctionFeaturesLinenumber :: Phantoms.TTerm Features.LoadCSVFunctionFeatures -> Phantoms.TTerm Bool
-loadCSVFunctionFeaturesLinenumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-        Core.projectionField = (Core.Name "linenumber")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-loadCSVFunctionFeaturesWithFile :: Phantoms.TTerm Features.LoadCSVFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LoadCSVFunctionFeatures
-loadCSVFunctionFeaturesWithFile original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "file"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "linenumber"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-              Core.projectionField = (Core.Name "linenumber")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-loadCSVFunctionFeaturesWithLinenumber :: Phantoms.TTerm Features.LoadCSVFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LoadCSVFunctionFeatures
-loadCSVFunctionFeaturesWithLinenumber original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "file"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"),
-              Core.projectionField = (Core.Name "file")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "linenumber"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-logarithmicFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-logarithmicFunctionFeatures e exp log log10 sqrt =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "e"),
-          Core.fieldTerm = (Phantoms.unTTerm e)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exp"),
-          Core.fieldTerm = (Phantoms.unTTerm exp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "log"),
-          Core.fieldTerm = (Phantoms.unTTerm log)},
-        Core.Field {
-          Core.fieldName = (Core.Name "log10"),
-          Core.fieldTerm = (Phantoms.unTTerm log10)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sqrt"),
-          Core.fieldTerm = (Phantoms.unTTerm sqrt)}]}))
-
-logarithmicFunctionFeaturesE :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool
-logarithmicFunctionFeaturesE x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-        Core.projectionField = (Core.Name "e")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logarithmicFunctionFeaturesExp :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool
-logarithmicFunctionFeaturesExp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-        Core.projectionField = (Core.Name "exp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logarithmicFunctionFeaturesLog :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool
-logarithmicFunctionFeaturesLog x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-        Core.projectionField = (Core.Name "log")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logarithmicFunctionFeaturesLog10 :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool
-logarithmicFunctionFeaturesLog10 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-        Core.projectionField = (Core.Name "log10")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logarithmicFunctionFeaturesSqrt :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool
-logarithmicFunctionFeaturesSqrt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-        Core.projectionField = (Core.Name "sqrt")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logarithmicFunctionFeaturesWithE :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-logarithmicFunctionFeaturesWithE original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "e"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "exp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log10"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log10")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sqrt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "sqrt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logarithmicFunctionFeaturesWithExp :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-logarithmicFunctionFeaturesWithExp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "e"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "e")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "log"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log10"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log10")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sqrt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "sqrt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logarithmicFunctionFeaturesWithLog :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-logarithmicFunctionFeaturesWithLog original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "e"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "e")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "exp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "log10"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log10")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sqrt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "sqrt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logarithmicFunctionFeaturesWithLog10 :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-logarithmicFunctionFeaturesWithLog10 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "e"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "e")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "exp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log10"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sqrt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "sqrt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logarithmicFunctionFeaturesWithSqrt :: Phantoms.TTerm Features.LogarithmicFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogarithmicFunctionFeatures
-logarithmicFunctionFeaturesWithSqrt original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "e"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "e")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "exp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "log10"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"),
-              Core.projectionField = (Core.Name "log10")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sqrt"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-logicalFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogicalFeatures
-logicalFeatures and not or xor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "and"),
-          Core.fieldTerm = (Phantoms.unTTerm and)},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "or"),
-          Core.fieldTerm = (Phantoms.unTTerm or)},
-        Core.Field {
-          Core.fieldName = (Core.Name "xor"),
-          Core.fieldTerm = (Phantoms.unTTerm xor)}]}))
-
-logicalFeaturesAnd :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool
-logicalFeaturesAnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-        Core.projectionField = (Core.Name "and")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalFeaturesNot :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool
-logicalFeaturesNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalFeaturesOr :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool
-logicalFeaturesOr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-        Core.projectionField = (Core.Name "or")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-logicalFeaturesWithAnd :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogicalFeatures
-logicalFeaturesWithAnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "and"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "or"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "or")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "xor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "xor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logicalFeaturesWithNot :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogicalFeatures
-logicalFeaturesWithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "and"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "and")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "or"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "or")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "xor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "xor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logicalFeaturesWithOr :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogicalFeatures
-logicalFeaturesWithOr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "and"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "and")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "or"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "xor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "xor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-logicalFeaturesWithXor :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.LogicalFeatures
-logicalFeaturesWithXor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "and"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "and")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "or"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-              Core.projectionField = (Core.Name "or")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "xor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-logicalFeaturesXor :: Phantoms.TTerm Features.LogicalFeatures -> Phantoms.TTerm Bool
-logicalFeaturesXor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.LogicalFeatures"),
-        Core.projectionField = (Core.Name "xor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MatchFeatures
-matchFeatures match optionalMatch =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Phantoms.unTTerm match)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalMatch"),
-          Core.fieldTerm = (Phantoms.unTTerm optionalMatch)}]}))
-
-matchFeaturesMatch :: Phantoms.TTerm Features.MatchFeatures -> Phantoms.TTerm Bool
-matchFeaturesMatch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-        Core.projectionField = (Core.Name "match")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchFeaturesOptionalMatch :: Phantoms.TTerm Features.MatchFeatures -> Phantoms.TTerm Bool
-matchFeaturesOptionalMatch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-        Core.projectionField = (Core.Name "optionalMatch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchFeaturesWithMatch :: Phantoms.TTerm Features.MatchFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MatchFeatures
-matchFeaturesWithMatch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalMatch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-              Core.projectionField = (Core.Name "optionalMatch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchFeaturesWithOptionalMatch :: Phantoms.TTerm Features.MatchFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MatchFeatures
-matchFeaturesWithOptionalMatch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "match"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MatchFeatures"),
-              Core.projectionField = (Core.Name "match")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalMatch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mergeFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MergeFeatures
-mergeFeatures merge mergeOnCreate mergeOnMatch =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm merge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnCreate"),
-          Core.fieldTerm = (Phantoms.unTTerm mergeOnCreate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnMatch"),
-          Core.fieldTerm = (Phantoms.unTTerm mergeOnMatch)}]}))
-
-mergeFeaturesMerge :: Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Bool
-mergeFeaturesMerge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-        Core.projectionField = (Core.Name "merge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergeFeaturesMergeOnCreate :: Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Bool
-mergeFeaturesMergeOnCreate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-        Core.projectionField = (Core.Name "mergeOnCreate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergeFeaturesMergeOnMatch :: Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Bool
-mergeFeaturesMergeOnMatch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-        Core.projectionField = (Core.Name "mergeOnMatch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergeFeaturesWithMerge :: Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MergeFeatures
-mergeFeaturesWithMerge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnCreate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-              Core.projectionField = (Core.Name "mergeOnCreate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnMatch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-              Core.projectionField = (Core.Name "mergeOnMatch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mergeFeaturesWithMergeOnCreate :: Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MergeFeatures
-mergeFeaturesWithMergeOnCreate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnCreate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnMatch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-              Core.projectionField = (Core.Name "mergeOnMatch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mergeFeaturesWithMergeOnMatch :: Phantoms.TTerm Features.MergeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.MergeFeatures
-mergeFeaturesWithMergeOnMatch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnCreate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.MergeFeatures"),
-              Core.projectionField = (Core.Name "mergeOnCreate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mergeOnMatch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodePatternFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NodePatternFeatures
-nodePatternFeatures multipleLabels parameter propertyMap variableNode wildcardLabel =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleLabels"),
-          Core.fieldTerm = (Phantoms.unTTerm multipleLabels)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyMap"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyMap)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableNode"),
-          Core.fieldTerm = (Phantoms.unTTerm variableNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm wildcardLabel)}]}))
-
-nodePatternFeaturesMultipleLabels :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool
-nodePatternFeaturesMultipleLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-        Core.projectionField = (Core.Name "multipleLabels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternFeaturesParameter :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool
-nodePatternFeaturesParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternFeaturesPropertyMap :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool
-nodePatternFeaturesPropertyMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-        Core.projectionField = (Core.Name "propertyMap")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternFeaturesVariableNode :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool
-nodePatternFeaturesVariableNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-        Core.projectionField = (Core.Name "variableNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternFeaturesWildcardLabel :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool
-nodePatternFeaturesWildcardLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-        Core.projectionField = (Core.Name "wildcardLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternFeaturesWithMultipleLabels :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NodePatternFeatures
-nodePatternFeaturesWithMultipleLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleLabels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "propertyMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "variableNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "wildcardLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePatternFeaturesWithParameter :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NodePatternFeatures
-nodePatternFeaturesWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "multipleLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "propertyMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "variableNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "wildcardLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePatternFeaturesWithPropertyMap :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NodePatternFeatures
-nodePatternFeaturesWithPropertyMap original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "multipleLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyMap"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "variableNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "wildcardLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePatternFeaturesWithVariableNode :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NodePatternFeatures
-nodePatternFeaturesWithVariableNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "multipleLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "propertyMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "wildcardLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePatternFeaturesWithWildcardLabel :: Phantoms.TTerm Features.NodePatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NodePatternFeatures
-nodePatternFeaturesWithWildcardLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "multipleLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "propertyMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NodePatternFeatures"),
-              Core.projectionField = (Core.Name "variableNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NullFeatures
-nullFeatures isNull isNotNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isNull"),
-          Core.fieldTerm = (Phantoms.unTTerm isNull)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNotNull"),
-          Core.fieldTerm = (Phantoms.unTTerm isNotNull)}]}))
-
-nullFeaturesIsNotNull :: Phantoms.TTerm Features.NullFeatures -> Phantoms.TTerm Bool
-nullFeaturesIsNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-        Core.projectionField = (Core.Name "isNotNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullFeaturesIsNull :: Phantoms.TTerm Features.NullFeatures -> Phantoms.TTerm Bool
-nullFeaturesIsNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-        Core.projectionField = (Core.Name "isNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullFeaturesWithIsNotNull :: Phantoms.TTerm Features.NullFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NullFeatures
-nullFeaturesWithIsNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-              Core.projectionField = (Core.Name "isNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNotNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullFeaturesWithIsNull :: Phantoms.TTerm Features.NullFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NullFeatures
-nullFeaturesWithIsNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNotNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NullFeatures"),
-              Core.projectionField = (Core.Name "isNotNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeatures abs ceil floor isNaN rand round sign =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Phantoms.unTTerm abs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Phantoms.unTTerm ceil)},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Phantoms.unTTerm floor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Phantoms.unTTerm isNaN)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Phantoms.unTTerm rand)},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Phantoms.unTTerm round)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Phantoms.unTTerm sign)}]}))
-
-numericFunctionFeaturesAbs :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesAbs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "abs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesCeil :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesCeil x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "ceil")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesFloor :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesFloor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "floor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesIsNaN :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesIsNaN x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "isNaN")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesRand :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesRand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "rand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesRound :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesRound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "round")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesSign :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool
-numericFunctionFeaturesSign x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-        Core.projectionField = (Core.Name "sign")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFunctionFeaturesWithAbs :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithAbs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "ceil")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "floor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "isNaN")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "rand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "round")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeaturesWithCeil :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithCeil original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "abs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "floor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "isNaN")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "rand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "round")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeaturesWithFloor :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithFloor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "abs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "ceil")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "isNaN")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "rand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "round")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeaturesWithIsNaN :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithIsNaN original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "abs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "ceil")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "floor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "rand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "round")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeaturesWithRand :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithRand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "abs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "ceil")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "floor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "isNaN")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "round")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeaturesWithRound :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithRound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "abs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "ceil")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "floor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "isNaN")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "rand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFunctionFeaturesWithSign :: Phantoms.TTerm Features.NumericFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.NumericFunctionFeatures
-numericFunctionFeaturesWithSign original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "abs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "abs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ceil"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "ceil")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "floor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "floor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isNaN"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "isNaN")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "rand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "round"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.NumericFunctionFeatures"),
-              Core.projectionField = (Core.Name "round")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Features.PathFeatures
-pathFeatures shortestPath =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PathFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "shortestPath"),
-          Core.fieldTerm = (Phantoms.unTTerm shortestPath)}]}))
-
-pathFeaturesShortestPath :: Phantoms.TTerm Features.PathFeatures -> Phantoms.TTerm Bool
-pathFeaturesShortestPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PathFeatures"),
-        Core.projectionField = (Core.Name "shortestPath")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathFeaturesWithShortestPath :: Phantoms.TTerm Features.PathFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PathFeatures
-pathFeaturesWithShortestPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PathFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "shortestPath"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-predicateFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeatures all any exists isEmpty none single =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm all)},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Phantoms.unTTerm exists)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Phantoms.unTTerm isEmpty)},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Phantoms.unTTerm none)},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Phantoms.unTTerm single)}]}))
-
-predicateFunctionFeaturesAll :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool
-predicateFunctionFeaturesAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-        Core.projectionField = (Core.Name "all")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateFunctionFeaturesAny :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool
-predicateFunctionFeaturesAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateFunctionFeaturesExists :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool
-predicateFunctionFeaturesExists x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-        Core.projectionField = (Core.Name "exists")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateFunctionFeaturesIsEmpty :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool
-predicateFunctionFeaturesIsEmpty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-        Core.projectionField = (Core.Name "isEmpty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateFunctionFeaturesNone :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool
-predicateFunctionFeaturesNone x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-        Core.projectionField = (Core.Name "none")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateFunctionFeaturesSingle :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool
-predicateFunctionFeaturesSingle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-        Core.projectionField = (Core.Name "single")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateFunctionFeaturesWithAll :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeaturesWithAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "exists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "isEmpty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateFunctionFeaturesWithAny :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeaturesWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "exists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "isEmpty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateFunctionFeaturesWithExists :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeaturesWithExists original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "isEmpty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateFunctionFeaturesWithIsEmpty :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeaturesWithIsEmpty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "exists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateFunctionFeaturesWithNone :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeaturesWithNone original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "exists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "isEmpty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateFunctionFeaturesWithSingle :: Phantoms.TTerm Features.PredicateFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PredicateFunctionFeatures
-predicateFunctionFeaturesWithSingle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "exists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isEmpty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "isEmpty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.PredicateFunctionFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-procedureCallFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProcedureCallFeatures
-procedureCallFeatures inQueryCall standaloneCall yield =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inQueryCall"),
-          Core.fieldTerm = (Phantoms.unTTerm inQueryCall)},
-        Core.Field {
-          Core.fieldName = (Core.Name "standaloneCall"),
-          Core.fieldTerm = (Phantoms.unTTerm standaloneCall)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Phantoms.unTTerm yield)}]}))
-
-procedureCallFeaturesInQueryCall :: Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Bool
-procedureCallFeaturesInQueryCall x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-        Core.projectionField = (Core.Name "inQueryCall")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureCallFeaturesStandaloneCall :: Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Bool
-procedureCallFeaturesStandaloneCall x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-        Core.projectionField = (Core.Name "standaloneCall")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureCallFeaturesWithInQueryCall :: Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProcedureCallFeatures
-procedureCallFeaturesWithInQueryCall original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inQueryCall"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "standaloneCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-              Core.projectionField = (Core.Name "standaloneCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-              Core.projectionField = (Core.Name "yield")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-procedureCallFeaturesWithStandaloneCall :: Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProcedureCallFeatures
-procedureCallFeaturesWithStandaloneCall original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inQueryCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-              Core.projectionField = (Core.Name "inQueryCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "standaloneCall"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-              Core.projectionField = (Core.Name "yield")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-procedureCallFeaturesWithYield :: Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProcedureCallFeatures
-procedureCallFeaturesWithYield original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inQueryCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-              Core.projectionField = (Core.Name "inQueryCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "standaloneCall"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-              Core.projectionField = (Core.Name "standaloneCall")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-procedureCallFeaturesYield :: Phantoms.TTerm Features.ProcedureCallFeatures -> Phantoms.TTerm Bool
-procedureCallFeaturesYield x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProcedureCallFeatures"),
-        Core.projectionField = (Core.Name "yield")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeatures limit orderBy projectDistinct projectAll projectAs skip sortOrder =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm limit)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm orderBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Phantoms.unTTerm projectDistinct)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Phantoms.unTTerm projectAll)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Phantoms.unTTerm projectAs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Phantoms.unTTerm skip)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Phantoms.unTTerm sortOrder)}]}))
-
-projectionFeaturesLimit :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesLimit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "limit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesOrderBy :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesOrderBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "orderBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesProjectAll :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesProjectAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "projectAll")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesProjectAs :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesProjectAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "projectAs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesProjectDistinct :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesProjectDistinct x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "projectDistinct")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesSkip :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesSkip x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "skip")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesSortOrder :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool
-projectionFeaturesSortOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-        Core.projectionField = (Core.Name "sortOrder")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionFeaturesWithLimit :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithLimit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectDistinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "sortOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionFeaturesWithOrderBy :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithOrderBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectDistinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "sortOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionFeaturesWithProjectAll :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithProjectAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectDistinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "sortOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionFeaturesWithProjectAs :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithProjectAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectDistinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "sortOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionFeaturesWithProjectDistinct :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithProjectDistinct original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "sortOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionFeaturesWithSkip :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithSkip original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectDistinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "sortOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionFeaturesWithSortOrder :: Phantoms.TTerm Features.ProjectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ProjectionFeatures
-projectionFeaturesWithSortOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectDistinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectDistinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectAs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "projectAs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ProjectionFeatures"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortOrder"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quantifierFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.QuantifierFeatures
-quantifierFeatures all any none single =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm all)},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Phantoms.unTTerm none)},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Phantoms.unTTerm single)}]}))
-
-quantifierFeaturesAll :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool
-quantifierFeaturesAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-        Core.projectionField = (Core.Name "all")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifierFeaturesAny :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool
-quantifierFeaturesAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifierFeaturesNone :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool
-quantifierFeaturesNone x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-        Core.projectionField = (Core.Name "none")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifierFeaturesSingle :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool
-quantifierFeaturesSingle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-        Core.projectionField = (Core.Name "single")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifierFeaturesWithAll :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.QuantifierFeatures
-quantifierFeaturesWithAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quantifierFeaturesWithAny :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.QuantifierFeatures
-quantifierFeaturesWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quantifierFeaturesWithNone :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.QuantifierFeatures
-quantifierFeaturesWithNone original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "single")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quantifierFeaturesWithSingle :: Phantoms.TTerm Features.QuantifierFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.QuantifierFeatures
-quantifierFeaturesWithSingle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.QuantifierFeatures"),
-              Core.projectionField = (Core.Name "none")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "single"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeLiteralFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RangeLiteralFeatures
-rangeLiteralFeatures bounds exactRange lowerBound starRange upperBound =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exactRange"),
-          Core.fieldTerm = (Phantoms.unTTerm exactRange)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Phantoms.unTTerm lowerBound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starRange"),
-          Core.fieldTerm = (Phantoms.unTTerm starRange)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Phantoms.unTTerm upperBound)}]}))
-
-rangeLiteralFeaturesBounds :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool
-rangeLiteralFeaturesBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralFeaturesExactRange :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool
-rangeLiteralFeaturesExactRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-        Core.projectionField = (Core.Name "exactRange")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralFeaturesLowerBound :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool
-rangeLiteralFeaturesLowerBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-        Core.projectionField = (Core.Name "lowerBound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralFeaturesStarRange :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool
-rangeLiteralFeaturesStarRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-        Core.projectionField = (Core.Name "starRange")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralFeaturesUpperBound :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool
-rangeLiteralFeaturesUpperBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-        Core.projectionField = (Core.Name "upperBound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralFeaturesWithBounds :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RangeLiteralFeatures
-rangeLiteralFeaturesWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exactRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "exactRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "starRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeLiteralFeaturesWithExactRange :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RangeLiteralFeatures
-rangeLiteralFeaturesWithExactRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exactRange"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "starRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeLiteralFeaturesWithLowerBound :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RangeLiteralFeatures
-rangeLiteralFeaturesWithLowerBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exactRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "exactRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "starRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeLiteralFeaturesWithStarRange :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RangeLiteralFeatures
-rangeLiteralFeaturesWithStarRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exactRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "exactRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starRange"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeLiteralFeaturesWithUpperBound :: Phantoms.TTerm Features.RangeLiteralFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RangeLiteralFeatures
-rangeLiteralFeaturesWithUpperBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exactRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "exactRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RangeLiteralFeatures"),
-              Core.projectionField = (Core.Name "starRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-readingFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ReadingFeatures
-readingFeatures union unionAll unwind =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = (Phantoms.unTTerm union)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unionAll"),
-          Core.fieldTerm = (Phantoms.unTTerm unionAll)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unwind"),
-          Core.fieldTerm = (Phantoms.unTTerm unwind)}]}))
-
-readingFeaturesUnion :: Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Bool
-readingFeaturesUnion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-        Core.projectionField = (Core.Name "union")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-readingFeaturesUnionAll :: Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Bool
-readingFeaturesUnionAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-        Core.projectionField = (Core.Name "unionAll")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-readingFeaturesUnwind :: Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Bool
-readingFeaturesUnwind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-        Core.projectionField = (Core.Name "unwind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-readingFeaturesWithUnion :: Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ReadingFeatures
-readingFeaturesWithUnion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unionAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-              Core.projectionField = (Core.Name "unionAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unwind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-              Core.projectionField = (Core.Name "unwind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-readingFeaturesWithUnionAll :: Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ReadingFeatures
-readingFeaturesWithUnionAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-              Core.projectionField = (Core.Name "union")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unionAll"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unwind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-              Core.projectionField = (Core.Name "unwind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-readingFeaturesWithUnwind :: Phantoms.TTerm Features.ReadingFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ReadingFeatures
-readingFeaturesWithUnwind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-              Core.projectionField = (Core.Name "union")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unionAll"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ReadingFeatures"),
-              Core.projectionField = (Core.Name "unionAll")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unwind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationshipDirectionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipDirectionFeatures
-relationshipDirectionFeatures both left neither right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "both"),
-          Core.fieldTerm = (Phantoms.unTTerm both)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "neither"),
-          Core.fieldTerm = (Phantoms.unTTerm neither)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-relationshipDirectionFeaturesBoth :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool
-relationshipDirectionFeaturesBoth x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-        Core.projectionField = (Core.Name "both")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDirectionFeaturesLeft :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool
-relationshipDirectionFeaturesLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDirectionFeaturesNeither :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool
-relationshipDirectionFeaturesNeither x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-        Core.projectionField = (Core.Name "neither")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDirectionFeaturesRight :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool
-relationshipDirectionFeaturesRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDirectionFeaturesWithBoth :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipDirectionFeatures
-relationshipDirectionFeaturesWithBoth original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "both"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "neither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "neither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipDirectionFeaturesWithLeft :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipDirectionFeatures
-relationshipDirectionFeaturesWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "both"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "both")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "neither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "neither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipDirectionFeaturesWithNeither :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipDirectionFeatures
-relationshipDirectionFeaturesWithNeither original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "both"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "both")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "neither"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipDirectionFeaturesWithRight :: Phantoms.TTerm Features.RelationshipDirectionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipDirectionFeatures
-relationshipDirectionFeaturesWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "both"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "both")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "neither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"),
-              Core.projectionField = (Core.Name "neither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationshipPatternFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipPatternFeatures
-relationshipPatternFeatures multipleTypes variableRelationship wildcardType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm multipleTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableRelationship"),
-          Core.fieldTerm = (Phantoms.unTTerm variableRelationship)},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardType"),
-          Core.fieldTerm = (Phantoms.unTTerm wildcardType)}]}))
-
-relationshipPatternFeaturesMultipleTypes :: Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Bool
-relationshipPatternFeaturesMultipleTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-        Core.projectionField = (Core.Name "multipleTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipPatternFeaturesVariableRelationship :: Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Bool
-relationshipPatternFeaturesVariableRelationship x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-        Core.projectionField = (Core.Name "variableRelationship")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipPatternFeaturesWildcardType :: Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Bool
-relationshipPatternFeaturesWildcardType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-        Core.projectionField = (Core.Name "wildcardType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipPatternFeaturesWithMultipleTypes :: Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipPatternFeatures
-relationshipPatternFeaturesWithMultipleTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableRelationship"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-              Core.projectionField = (Core.Name "variableRelationship")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-              Core.projectionField = (Core.Name "wildcardType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipPatternFeaturesWithVariableRelationship :: Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipPatternFeatures
-relationshipPatternFeaturesWithVariableRelationship original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-              Core.projectionField = (Core.Name "multipleTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableRelationship"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-              Core.projectionField = (Core.Name "wildcardType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipPatternFeaturesWithWildcardType :: Phantoms.TTerm Features.RelationshipPatternFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RelationshipPatternFeatures
-relationshipPatternFeaturesWithWildcardType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "multipleTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-              Core.projectionField = (Core.Name "multipleTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableRelationship"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RelationshipPatternFeatures"),
-              Core.projectionField = (Core.Name "variableRelationship")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcardType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-removeFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RemoveFeatures
-removeFeatures byLabel byProperty =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "byLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm byLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "byProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm byProperty)}]}))
-
-removeFeaturesByLabel :: Phantoms.TTerm Features.RemoveFeatures -> Phantoms.TTerm Bool
-removeFeaturesByLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-        Core.projectionField = (Core.Name "byLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removeFeaturesByProperty :: Phantoms.TTerm Features.RemoveFeatures -> Phantoms.TTerm Bool
-removeFeaturesByProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-        Core.projectionField = (Core.Name "byProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removeFeaturesWithByLabel :: Phantoms.TTerm Features.RemoveFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RemoveFeatures
-removeFeaturesWithByLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "byLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "byProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-              Core.projectionField = (Core.Name "byProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-removeFeaturesWithByProperty :: Phantoms.TTerm Features.RemoveFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.RemoveFeatures
-removeFeaturesWithByProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "byLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.RemoveFeatures"),
-              Core.projectionField = (Core.Name "byLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "byProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-scalarFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeatures char_length character_length coalesce elementId endNode head id last length nullIf properties randomUUID size startNode toBoolean toBooleanOrNull toFloat toFloatOrNull toInteger toIntegerOrNull type_ valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Phantoms.unTTerm char_length)},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Phantoms.unTTerm character_length)},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Phantoms.unTTerm coalesce)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Phantoms.unTTerm elementId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Phantoms.unTTerm endNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Phantoms.unTTerm last)},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm length)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Phantoms.unTTerm nullIf)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Phantoms.unTTerm randomUUID)},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Phantoms.unTTerm size)},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Phantoms.unTTerm startNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Phantoms.unTTerm toBoolean)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm toBooleanOrNull)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Phantoms.unTTerm toFloat)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm toFloatOrNull)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Phantoms.unTTerm toInteger)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm toIntegerOrNull)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-scalarFunctionFeaturesChar_length :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesChar_length x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "char_length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesCharacter_length :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesCharacter_length x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "character_length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesCoalesce :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesCoalesce x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "coalesce")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesElementId :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesElementId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "elementId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesEndNode :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesEndNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "endNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesHead :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesId :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesLast :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesLast x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "last")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesLength :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesNullIf :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesNullIf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "nullIf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesProperties :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesRandomUUID :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesRandomUUID x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "randomUUID")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesSize :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "size")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesStartNode :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesStartNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "startNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesToBoolean :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesToBoolean x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "toBoolean")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesToBooleanOrNull :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesToBooleanOrNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "toBooleanOrNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesToFloat :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesToFloat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "toFloat")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesToFloatOrNull :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesToFloatOrNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "toFloatOrNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesToInteger :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesToInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "toInteger")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesToIntegerOrNull :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesToIntegerOrNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "toIntegerOrNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesType :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesValueType :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool
-scalarFunctionFeaturesValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarFunctionFeaturesWithChar_length :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithChar_length original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithCharacter_length :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithCharacter_length original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithCoalesce :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithCoalesce original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithElementId :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithElementId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithEndNode :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithEndNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithHead :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithId :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithLast :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithLast original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithLength :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithNullIf :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithNullIf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithProperties :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithRandomUUID :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithRandomUUID original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithSize :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithStartNode :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithStartNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithToBoolean :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithToBoolean original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithToBooleanOrNull :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithToBooleanOrNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithToFloat :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithToFloat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithToFloatOrNull :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithToFloatOrNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithToInteger :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithToInteger original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithToIntegerOrNull :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithToIntegerOrNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithType :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarFunctionFeaturesWithValueType :: Phantoms.TTerm Features.ScalarFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ScalarFunctionFeatures
-scalarFunctionFeaturesWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "char_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "char_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "character_length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "character_length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "coalesce"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "coalesce")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "elementId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "endNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "last"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "last")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullIf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "nullIf")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "randomUUID"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "randomUUID")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "size"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "size")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBoolean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBoolean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toBooleanOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toBooleanOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toFloatOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toFloatOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toInteger"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toInteger")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toIntegerOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "toIntegerOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.ScalarFunctionFeatures"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-setFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SetFeatures
-setFeatures propertyEquals variableEquals variablePlusEquals variableWithNodeLabels =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyEquals"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyEquals)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableEquals"),
-          Core.fieldTerm = (Phantoms.unTTerm variableEquals)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variablePlusEquals"),
-          Core.fieldTerm = (Phantoms.unTTerm variablePlusEquals)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableWithNodeLabels"),
-          Core.fieldTerm = (Phantoms.unTTerm variableWithNodeLabels)}]}))
-
-setFeaturesPropertyEquals :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool
-setFeaturesPropertyEquals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-        Core.projectionField = (Core.Name "propertyEquals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setFeaturesVariableEquals :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool
-setFeaturesVariableEquals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-        Core.projectionField = (Core.Name "variableEquals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setFeaturesVariablePlusEquals :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool
-setFeaturesVariablePlusEquals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-        Core.projectionField = (Core.Name "variablePlusEquals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setFeaturesVariableWithNodeLabels :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool
-setFeaturesVariableWithNodeLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-        Core.projectionField = (Core.Name "variableWithNodeLabels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setFeaturesWithPropertyEquals :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SetFeatures
-setFeaturesWithPropertyEquals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyEquals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variableEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variablePlusEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variablePlusEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableWithNodeLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variableWithNodeLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setFeaturesWithVariableEquals :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SetFeatures
-setFeaturesWithVariableEquals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "propertyEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableEquals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variablePlusEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variablePlusEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableWithNodeLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variableWithNodeLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setFeaturesWithVariablePlusEquals :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SetFeatures
-setFeaturesWithVariablePlusEquals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "propertyEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variableEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variablePlusEquals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableWithNodeLabels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variableWithNodeLabels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setFeaturesWithVariableWithNodeLabels :: Phantoms.TTerm Features.SetFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SetFeatures
-setFeaturesWithVariableWithNodeLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "propertyEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variableEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variablePlusEquals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SetFeatures"),
-              Core.projectionField = (Core.Name "variablePlusEquals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableWithNodeLabels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-spatialFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SpatialFunctionFeatures
-spatialFunctionFeatures pointDistance point pointWithinBBox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointDistance"),
-          Core.fieldTerm = (Phantoms.unTTerm pointDistance)},
-        Core.Field {
-          Core.fieldName = (Core.Name "point"),
-          Core.fieldTerm = (Phantoms.unTTerm point)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pointWithinBBox"),
-          Core.fieldTerm = (Phantoms.unTTerm pointWithinBBox)}]}))
-
-spatialFunctionFeaturesPoint :: Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Bool
-spatialFunctionFeaturesPoint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-        Core.projectionField = (Core.Name "point")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-spatialFunctionFeaturesPointDistance :: Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Bool
-spatialFunctionFeaturesPointDistance x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-        Core.projectionField = (Core.Name "pointDistance")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-spatialFunctionFeaturesPointWithinBBox :: Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Bool
-spatialFunctionFeaturesPointWithinBBox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-        Core.projectionField = (Core.Name "pointWithinBBox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-spatialFunctionFeaturesWithPoint :: Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SpatialFunctionFeatures
-spatialFunctionFeaturesWithPoint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointDistance"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-              Core.projectionField = (Core.Name "pointDistance")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "point"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pointWithinBBox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-              Core.projectionField = (Core.Name "pointWithinBBox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-spatialFunctionFeaturesWithPointDistance :: Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SpatialFunctionFeatures
-spatialFunctionFeaturesWithPointDistance original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointDistance"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "point"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-              Core.projectionField = (Core.Name "point")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pointWithinBBox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-              Core.projectionField = (Core.Name "pointWithinBBox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-spatialFunctionFeaturesWithPointWithinBBox :: Phantoms.TTerm Features.SpatialFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.SpatialFunctionFeatures
-spatialFunctionFeaturesWithPointWithinBBox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointDistance"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-              Core.projectionField = (Core.Name "pointDistance")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "point"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.SpatialFunctionFeatures"),
-              Core.projectionField = (Core.Name "point")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pointWithinBBox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFeatures
-stringFeatures contains endsWith in_ startsWith =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "contains"),
-          Core.fieldTerm = (Phantoms.unTTerm contains)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endsWith"),
-          Core.fieldTerm = (Phantoms.unTTerm endsWith)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "startsWith"),
-          Core.fieldTerm = (Phantoms.unTTerm startsWith)}]}))
-
-stringFeaturesContains :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool
-stringFeaturesContains x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-        Core.projectionField = (Core.Name "contains")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFeaturesEndsWith :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool
-stringFeaturesEndsWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-        Core.projectionField = (Core.Name "endsWith")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFeaturesIn :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool
-stringFeaturesIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFeaturesStartsWith :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool
-stringFeaturesStartsWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-        Core.projectionField = (Core.Name "startsWith")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFeaturesWithContains :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFeatures
-stringFeaturesWithContains original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "contains"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endsWith"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "endsWith")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startsWith"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "startsWith")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFeaturesWithEndsWith :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFeatures
-stringFeaturesWithEndsWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "contains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "contains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endsWith"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startsWith"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "startsWith")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFeaturesWithIn :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFeatures
-stringFeaturesWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "contains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "contains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endsWith"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "endsWith")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "startsWith"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "startsWith")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFeaturesWithStartsWith :: Phantoms.TTerm Features.StringFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFeatures
-stringFeaturesWithStartsWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "contains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "contains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endsWith"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "endsWith")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.features.StringFeatures"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "startsWith"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeatures btrim left lower ltrim normalize replace reverse right rtrim split substring toLower toString toStringOrNull toUpper trim upper =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Phantoms.unTTerm btrim)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Phantoms.unTTerm lower)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Phantoms.unTTerm ltrim)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Phantoms.unTTerm normalize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Phantoms.unTTerm replace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Phantoms.unTTerm reverse)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Phantoms.unTTerm rtrim)},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Phantoms.unTTerm split)},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Phantoms.unTTerm substring)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Phantoms.unTTerm toLower)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Phantoms.unTTerm toString)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm toStringOrNull)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Phantoms.unTTerm toUpper)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Phantoms.unTTerm trim)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Phantoms.unTTerm upper)}]}))
-
-stringFunctionFeaturesBtrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesBtrim x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "btrim")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesLeft :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesLower :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesLower x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "lower")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesLtrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesLtrim x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "ltrim")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesNormalize :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesNormalize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "normalize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesReplace :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesReplace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "replace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesReverse :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesReverse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "reverse")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesRight :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesRtrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesRtrim x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "rtrim")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesSplit :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesSplit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "split")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesSubstring :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesSubstring x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "substring")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesToLower :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesToLower x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "toLower")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesToString :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesToString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "toString")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesToStringOrNull :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesToStringOrNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "toStringOrNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesToUpper :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesToUpper x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "toUpper")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesTrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesTrim x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "trim")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesUpper :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool
-stringFunctionFeaturesUpper x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-        Core.projectionField = (Core.Name "upper")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFunctionFeaturesWithBtrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithBtrim original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithLeft :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithLower :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithLower original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithLtrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithLtrim original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithNormalize :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithNormalize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithReplace :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithReplace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithReverse :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithReverse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithRight :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithRtrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithRtrim original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithSplit :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithSplit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithSubstring :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithSubstring original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithToLower :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithToLower original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithToString :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithToString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithToStringOrNull :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithToStringOrNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithToUpper :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithToUpper original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithTrim :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithTrim original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "upper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringFunctionFeaturesWithUpper :: Phantoms.TTerm Features.StringFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.StringFunctionFeatures
-stringFunctionFeaturesWithUpper original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "btrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "btrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "lower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ltrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "ltrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "normalize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "replace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "replace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reverse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "reverse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rtrim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "rtrim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "split"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "split")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "substring"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "substring")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toLower"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toLower")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toStringOrNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toStringOrNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "toUpper"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "toUpper")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trim"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.StringFunctionFeatures"),
-              Core.projectionField = (Core.Name "trim")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upper"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-temporalDurationFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-temporalDurationFunctionFeatures duration durationBetween durationInDays durationInMonths durationInSeconds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Phantoms.unTTerm duration)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationBetween"),
-          Core.fieldTerm = (Phantoms.unTTerm durationBetween)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInDays"),
-          Core.fieldTerm = (Phantoms.unTTerm durationInDays)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInMonths"),
-          Core.fieldTerm = (Phantoms.unTTerm durationInMonths)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInSeconds"),
-          Core.fieldTerm = (Phantoms.unTTerm durationInSeconds)}]}))
-
-temporalDurationFunctionFeaturesDuration :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool
-temporalDurationFunctionFeaturesDuration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-        Core.projectionField = (Core.Name "duration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationFunctionFeaturesDurationBetween :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool
-temporalDurationFunctionFeaturesDurationBetween x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-        Core.projectionField = (Core.Name "durationBetween")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationFunctionFeaturesDurationInDays :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool
-temporalDurationFunctionFeaturesDurationInDays x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-        Core.projectionField = (Core.Name "durationInDays")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationFunctionFeaturesDurationInMonths :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool
-temporalDurationFunctionFeaturesDurationInMonths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-        Core.projectionField = (Core.Name "durationInMonths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationFunctionFeaturesDurationInSeconds :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool
-temporalDurationFunctionFeaturesDurationInSeconds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-        Core.projectionField = (Core.Name "durationInSeconds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationFunctionFeaturesWithDuration :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-temporalDurationFunctionFeaturesWithDuration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationBetween"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationBetween")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInDays"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInDays")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInMonths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInMonths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInSeconds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInSeconds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalDurationFunctionFeaturesWithDurationBetween :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-temporalDurationFunctionFeaturesWithDurationBetween original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "duration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationBetween"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInDays"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInDays")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInMonths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInMonths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInSeconds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInSeconds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalDurationFunctionFeaturesWithDurationInDays :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-temporalDurationFunctionFeaturesWithDurationInDays original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "duration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationBetween"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationBetween")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInDays"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInMonths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInMonths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInSeconds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInSeconds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalDurationFunctionFeaturesWithDurationInMonths :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-temporalDurationFunctionFeaturesWithDurationInMonths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "duration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationBetween"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationBetween")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInDays"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInDays")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInMonths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInSeconds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInSeconds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalDurationFunctionFeaturesWithDurationInSeconds :: Phantoms.TTerm Features.TemporalDurationFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalDurationFunctionFeatures
-temporalDurationFunctionFeaturesWithDurationInSeconds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "duration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationBetween"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationBetween")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInDays"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInDays")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInMonths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"),
-              Core.projectionField = (Core.Name "durationInMonths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "durationInSeconds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-temporalInstantFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeatures date dateRealtime dateStatement dateTransaction dateTruncate datetime datetimeFromepoch datetimeFromepochmillis datetimeRealtime datetimeStatement datetimeTransaction datetimeTruncate localdatetime localdatetimeRealtime localdatetimeStatement localdatetimeTransaction localdatetimeTruncate localtime localtimeRealtime localtimeStatement localtimeTransaction localtimeTruncate time timeRealtime timeStatement timeTransaction timeTruncate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Phantoms.unTTerm date)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm dateRealtime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm dateStatement)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm dateTransaction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm dateTruncate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Phantoms.unTTerm datetime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Phantoms.unTTerm datetimeFromepoch)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Phantoms.unTTerm datetimeFromepochmillis)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm datetimeRealtime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm datetimeStatement)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm datetimeTransaction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm datetimeTruncate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Phantoms.unTTerm localdatetime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm localdatetimeRealtime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm localdatetimeStatement)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm localdatetimeTransaction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm localdatetimeTruncate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Phantoms.unTTerm localtime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm localtimeRealtime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm localtimeStatement)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm localtimeTransaction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm localtimeTruncate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Phantoms.unTTerm time)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm timeRealtime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm timeStatement)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm timeTransaction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm timeTruncate)}]}))
-
-temporalInstantFunctionFeaturesDate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "date")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDateRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDateRealtime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "dateRealtime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDateStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDateStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "dateStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDateTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDateTransaction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "dateTransaction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDateTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDateTruncate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "dateTruncate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetimeFromepoch :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetimeFromepoch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetimeFromepoch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetimeFromepochmillis :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetimeFromepochmillis x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetimeRealtime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetimeRealtime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetimeStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetimeStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetimeTransaction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetimeTransaction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesDatetimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesDatetimeTruncate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "datetimeTruncate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaldatetime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaldatetime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localdatetime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaldatetimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaldatetimeRealtime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaldatetimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaldatetimeStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localdatetimeStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaldatetimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaldatetimeTransaction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaldatetimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaldatetimeTruncate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaltime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaltime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localtime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaltimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaltimeRealtime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localtimeRealtime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaltimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaltimeStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localtimeStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaltimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaltimeTransaction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localtimeTransaction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesLocaltimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesLocaltimeTruncate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "localtimeTruncate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesTime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesTime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "time")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesTimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesTimeRealtime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "timeRealtime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesTimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesTimeStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "timeStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesTimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesTimeTransaction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "timeTransaction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesTimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool
-temporalInstantFunctionFeaturesTimeTruncate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-        Core.projectionField = (Core.Name "timeTruncate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalInstantFunctionFeaturesWithDate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDateRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDateRealtime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDateStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDateStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDateTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDateTransaction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDateTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDateTruncate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetimeFromepoch :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetimeFromepoch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetimeFromepochmillis :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetimeFromepochmillis original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetimeRealtime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetimeStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetimeTransaction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithDatetimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithDatetimeTruncate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaldatetime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaldatetime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaldatetimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaldatetimeRealtime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaldatetimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaldatetimeStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaldatetimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaldatetimeTransaction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaldatetimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaldatetimeTruncate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaltime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaltime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaltimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaltimeRealtime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaltimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaltimeStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaltimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaltimeTransaction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithLocaltimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithLocaltimeTruncate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithTime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithTime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithTimeRealtime :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithTimeRealtime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithTimeStatement :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithTimeStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithTimeTransaction :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithTimeTransaction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantFunctionFeaturesWithTimeTruncate :: Phantoms.TTerm Features.TemporalInstantFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TemporalInstantFunctionFeatures
-temporalInstantFunctionFeaturesWithTimeTruncate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "date"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "date")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dateTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "dateTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepoch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepoch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeFromepochmillis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeFromepochmillis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "datetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localdatetimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localdatetimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localtimeTruncate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "localtimeTruncate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "time"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "time")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeRealtime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeRealtime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTransaction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"),
-              Core.projectionField = (Core.Name "timeTransaction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "timeTruncate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-trigonometricFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeatures acos asin atan atan2 cos cot degrees haversin pi radians sin tan =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Phantoms.unTTerm acos)},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Phantoms.unTTerm asin)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Phantoms.unTTerm atan)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Phantoms.unTTerm atan2)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Phantoms.unTTerm cos)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Phantoms.unTTerm cot)},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Phantoms.unTTerm degrees)},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Phantoms.unTTerm haversin)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Phantoms.unTTerm pi)},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Phantoms.unTTerm radians)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Phantoms.unTTerm sin)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Phantoms.unTTerm tan)}]}))
-
-trigonometricFunctionFeaturesAcos :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesAcos x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "acos")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesAsin :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesAsin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "asin")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesAtan :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesAtan x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "atan")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesAtan2 :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesAtan2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "atan2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesCos :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesCos x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "cos")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesCot :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesCot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "cot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesDegrees :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesDegrees x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "degrees")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesHaversin :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesHaversin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "haversin")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesPi :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesPi x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "pi")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesRadians :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesRadians x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "radians")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesSin :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesSin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "sin")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesTan :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool
-trigonometricFunctionFeaturesTan x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-        Core.projectionField = (Core.Name "tan")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionFeaturesWithAcos :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithAcos original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithAsin :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithAsin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithAtan :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithAtan original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithAtan2 :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithAtan2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithCos :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithCos original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithCot :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithCot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithDegrees :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithDegrees original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithHaversin :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithHaversin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithPi :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithPi original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithRadians :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithRadians original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithSin :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithSin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "tan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionFeaturesWithTan :: Phantoms.TTerm Features.TrigonometricFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.TrigonometricFunctionFeatures
-trigonometricFunctionFeaturesWithTan original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "acos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "acos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "asin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "asin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atan2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "atan2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cos"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cos")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "cot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "degrees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "degrees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "haversin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "haversin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "pi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "radians"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "radians")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sin"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"),
-              Core.projectionField = (Core.Name "sin")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tan"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-updatingFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.UpdatingFeatures
-updatingFeatures create set with =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "create"),
-          Core.fieldTerm = (Phantoms.unTTerm create)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm set)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm with)}]}))
-
-updatingFeaturesCreate :: Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Bool
-updatingFeaturesCreate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-        Core.projectionField = (Core.Name "create")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-updatingFeaturesSet :: Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Bool
-updatingFeaturesSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-        Core.projectionField = (Core.Name "set")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-updatingFeaturesWith :: Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Bool
-updatingFeaturesWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-        Core.projectionField = (Core.Name "with")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-updatingFeaturesWithCreate :: Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.UpdatingFeatures
-updatingFeaturesWithCreate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "create"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-updatingFeaturesWithSet :: Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.UpdatingFeatures
-updatingFeaturesWithSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "create"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-              Core.projectionField = (Core.Name "create")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-updatingFeaturesWithWith :: Phantoms.TTerm Features.UpdatingFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.UpdatingFeatures
-updatingFeaturesWithWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "create"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-              Core.projectionField = (Core.Name "create")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.UpdatingFeatures"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vectorFunctionFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VectorFunctionFeatures
-vectorFunctionFeatures vectorSimilarityCosine vectorSimilarityEuclidean =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorSimilarityCosine"),
-          Core.fieldTerm = (Phantoms.unTTerm vectorSimilarityCosine)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorSimilarityEuclidean"),
-          Core.fieldTerm = (Phantoms.unTTerm vectorSimilarityEuclidean)}]}))
-
-vectorFunctionFeaturesVectorSimilarityCosine :: Phantoms.TTerm Features.VectorFunctionFeatures -> Phantoms.TTerm Bool
-vectorFunctionFeaturesVectorSimilarityCosine x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-        Core.projectionField = (Core.Name "vectorSimilarityCosine")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vectorFunctionFeaturesVectorSimilarityEuclidean :: Phantoms.TTerm Features.VectorFunctionFeatures -> Phantoms.TTerm Bool
-vectorFunctionFeaturesVectorSimilarityEuclidean x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-        Core.projectionField = (Core.Name "vectorSimilarityEuclidean")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vectorFunctionFeaturesWithVectorSimilarityCosine :: Phantoms.TTerm Features.VectorFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VectorFunctionFeatures
-vectorFunctionFeaturesWithVectorSimilarityCosine original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorSimilarityCosine"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorSimilarityEuclidean"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorSimilarityEuclidean")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vectorFunctionFeaturesWithVectorSimilarityEuclidean :: Phantoms.TTerm Features.VectorFunctionFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VectorFunctionFeatures
-vectorFunctionFeaturesWithVectorSimilarityEuclidean original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorSimilarityCosine"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.features.VectorFunctionFeatures"),
-              Core.projectionField = (Core.Name "vectorSimilarityCosine")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vectorSimilarityEuclidean"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Cypher/OpenCypher.hs b/src/main/haskell/Hydra/Dsl/Cypher/OpenCypher.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Cypher/OpenCypher.hs
+++ /dev/null
@@ -1,5165 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.cypher.openCypher
-
-module Hydra.Dsl.Cypher.OpenCypher where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Cypher.OpenCypher as OpenCypher
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-addOrSubtractExpression :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm [OpenCypher.AddOrSubtractRightHandSide] -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression
-addOrSubtractExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-addOrSubtractExpressionLeft :: Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression
-addOrSubtractExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addOrSubtractExpressionRight :: Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm [OpenCypher.AddOrSubtractRightHandSide]
-addOrSubtractExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addOrSubtractExpressionWithLeft :: Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression
-addOrSubtractExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addOrSubtractExpressionWithRight :: Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm [OpenCypher.AddOrSubtractRightHandSide] -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression
-addOrSubtractExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-addOrSubtractOperatorAdd :: Phantoms.TTerm OpenCypher.AddOrSubtractOperator
-addOrSubtractOperatorAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addOrSubtractOperatorSubtract :: Phantoms.TTerm OpenCypher.AddOrSubtractOperator
-addOrSubtractOperatorSubtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addOrSubtractRightHandSide :: Phantoms.TTerm OpenCypher.AddOrSubtractOperator -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide
-addOrSubtractRightHandSide operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-addOrSubtractRightHandSideExpression :: Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression
-addOrSubtractRightHandSideExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addOrSubtractRightHandSideOperator :: Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide -> Phantoms.TTerm OpenCypher.AddOrSubtractOperator
-addOrSubtractRightHandSideOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addOrSubtractRightHandSideWithExpression :: Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide
-addOrSubtractRightHandSideWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-addOrSubtractRightHandSideWithOperator :: Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide -> Phantoms.TTerm OpenCypher.AddOrSubtractOperator -> Phantoms.TTerm OpenCypher.AddOrSubtractRightHandSide
-addOrSubtractRightHandSideWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-andExpression :: Phantoms.TTerm [OpenCypher.NotExpression] -> Phantoms.TTerm OpenCypher.AndExpression
-andExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.AndExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-anonymousPatternPart :: Phantoms.TTerm OpenCypher.PatternElement -> Phantoms.TTerm OpenCypher.AnonymousPatternPart
-anonymousPatternPart x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.AnonymousPatternPart"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-atomCase :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm OpenCypher.Atom
-atomCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomCountStar :: Phantoms.TTerm OpenCypher.Atom
-atomCountStar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "countStar"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atomExistentialSubquery :: Phantoms.TTerm OpenCypher.ExistentialSubquery -> Phantoms.TTerm OpenCypher.Atom
-atomExistentialSubquery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "existentialSubquery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomFunctionInvocation :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm OpenCypher.Atom
-atomFunctionInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomListComprehension :: Phantoms.TTerm OpenCypher.ListComprehension -> Phantoms.TTerm OpenCypher.Atom
-atomListComprehension x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listComprehension"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomLiteral :: Phantoms.TTerm OpenCypher.Literal -> Phantoms.TTerm OpenCypher.Atom
-atomLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomParameter :: Phantoms.TTerm OpenCypher.Parameter -> Phantoms.TTerm OpenCypher.Atom
-atomParameter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomParenthesized :: Phantoms.TTerm OpenCypher.ParenthesizedExpression -> Phantoms.TTerm OpenCypher.Atom
-atomParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomPatternComprehension :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm OpenCypher.Atom
-atomPatternComprehension x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "patternComprehension"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomPatternPredicate :: Phantoms.TTerm OpenCypher.PatternPredicate -> Phantoms.TTerm OpenCypher.Atom
-atomPatternPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "patternPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomQuantifier :: Phantoms.TTerm OpenCypher.Quantifier -> Phantoms.TTerm OpenCypher.Atom
-atomQuantifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quantifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomVariable :: Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.Atom
-atomVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseAlternative :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.CaseAlternative
-caseAlternative condition result =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm result)}]}))
-
-caseAlternativeCondition :: Phantoms.TTerm OpenCypher.CaseAlternative -> Phantoms.TTerm OpenCypher.Expression
-caseAlternativeCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseAlternativeResult :: Phantoms.TTerm OpenCypher.CaseAlternative -> Phantoms.TTerm OpenCypher.Expression
-caseAlternativeResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-        Core.projectionField = (Core.Name "result")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseAlternativeWithCondition :: Phantoms.TTerm OpenCypher.CaseAlternative -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.CaseAlternative
-caseAlternativeWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseAlternativeWithResult :: Phantoms.TTerm OpenCypher.CaseAlternative -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.CaseAlternative
-caseAlternativeWithResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseAlternative"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseExpression :: Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm [OpenCypher.CaseAlternative] -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.CaseExpression
-caseExpression expression alternatives else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Phantoms.unTTerm alternatives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-caseExpressionAlternatives :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm [OpenCypher.CaseAlternative]
-caseExpressionAlternatives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-        Core.projectionField = (Core.Name "alternatives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseExpressionElse :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression)
-caseExpressionElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseExpressionExpression :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression)
-caseExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseExpressionWithAlternatives :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm [OpenCypher.CaseAlternative] -> Phantoms.TTerm OpenCypher.CaseExpression
-caseExpressionWithAlternatives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseExpressionWithElse :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.CaseExpression
-caseExpressionWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-              Core.projectionField = (Core.Name "alternatives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseExpressionWithExpression :: Phantoms.TTerm OpenCypher.CaseExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.CaseExpression
-caseExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-              Core.projectionField = (Core.Name "alternatives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.CaseExpression"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonExpression :: Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm [OpenCypher.PartialComparisonExpression] -> Phantoms.TTerm OpenCypher.ComparisonExpression
-comparisonExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-comparisonExpressionLeft :: Phantoms.TTerm OpenCypher.ComparisonExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression
-comparisonExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonExpressionRight :: Phantoms.TTerm OpenCypher.ComparisonExpression -> Phantoms.TTerm [OpenCypher.PartialComparisonExpression]
-comparisonExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonExpressionWithLeft :: Phantoms.TTerm OpenCypher.ComparisonExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm OpenCypher.ComparisonExpression
-comparisonExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonExpressionWithRight :: Phantoms.TTerm OpenCypher.ComparisonExpression -> Phantoms.TTerm [OpenCypher.PartialComparisonExpression] -> Phantoms.TTerm OpenCypher.ComparisonExpression
-comparisonExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-comparisonOperatorEq :: Phantoms.TTerm OpenCypher.ComparisonOperator
-comparisonOperatorEq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorGt :: Phantoms.TTerm OpenCypher.ComparisonOperator
-comparisonOperatorGt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorGte :: Phantoms.TTerm OpenCypher.ComparisonOperator
-comparisonOperatorGte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorLt :: Phantoms.TTerm OpenCypher.ComparisonOperator
-comparisonOperatorLt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorLte :: Phantoms.TTerm OpenCypher.ComparisonOperator
-comparisonOperatorLte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorNeq :: Phantoms.TTerm OpenCypher.ComparisonOperator
-comparisonOperatorNeq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "neq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-create :: Phantoms.TTerm OpenCypher.Pattern -> Phantoms.TTerm OpenCypher.Create
-create x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Create"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-delete :: Phantoms.TTerm Bool -> Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.Delete
-delete detach expressions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "detach"),
-          Core.fieldTerm = (Phantoms.unTTerm detach)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)}]}))
-
-deleteDetach :: Phantoms.TTerm OpenCypher.Delete -> Phantoms.TTerm Bool
-deleteDetach x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-        Core.projectionField = (Core.Name "detach")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-deleteExpressions :: Phantoms.TTerm OpenCypher.Delete -> Phantoms.TTerm [OpenCypher.Expression]
-deleteExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-deleteWithDetach :: Phantoms.TTerm OpenCypher.Delete -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.Delete
-deleteWithDetach original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "detach"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-deleteWithExpressions :: Phantoms.TTerm OpenCypher.Delete -> Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.Delete
-deleteWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "detach"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Delete"),
-              Core.projectionField = (Core.Name "detach")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-existentialSubqueryPattern :: Phantoms.TTerm OpenCypher.PatternWhere -> Phantoms.TTerm OpenCypher.ExistentialSubquery
-existentialSubqueryPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ExistentialSubquery"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existentialSubqueryRegular :: Phantoms.TTerm OpenCypher.RegularQuery -> Phantoms.TTerm OpenCypher.ExistentialSubquery
-existentialSubqueryRegular x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ExistentialSubquery"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regular"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-explicitProcedureInvocation :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation
-explicitProcedureInvocation name arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-explicitProcedureInvocationArguments :: Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm [OpenCypher.Expression]
-explicitProcedureInvocationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitProcedureInvocationName :: Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm OpenCypher.QualifiedName
-explicitProcedureInvocationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitProcedureInvocationWithArguments :: Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation
-explicitProcedureInvocationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-explicitProcedureInvocationWithName :: Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation
-explicitProcedureInvocationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-expression :: Phantoms.TTerm OpenCypher.OrExpression -> Phantoms.TTerm OpenCypher.Expression
-expression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Expression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-filterExpression :: Phantoms.TTerm OpenCypher.IdInColl -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.FilterExpression
-filterExpression idInColl where_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "idInColl"),
-          Core.fieldTerm = (Phantoms.unTTerm idInColl)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)}]}))
-
-filterExpressionIdInColl :: Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm OpenCypher.IdInColl
-filterExpressionIdInColl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-        Core.projectionField = (Core.Name "idInColl")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-filterExpressionWhere :: Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm (Maybe OpenCypher.Where)
-filterExpressionWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-filterExpressionWithIdInColl :: Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm OpenCypher.IdInColl -> Phantoms.TTerm OpenCypher.FilterExpression
-filterExpressionWithIdInColl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "idInColl"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-filterExpressionWithWhere :: Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.FilterExpression
-filterExpressionWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "idInColl"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FilterExpression"),
-              Core.projectionField = (Core.Name "idInColl")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionInvocation :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm Bool -> Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.FunctionInvocation
-functionInvocation name distinct arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Phantoms.unTTerm distinct)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-functionInvocationArguments :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm [OpenCypher.Expression]
-functionInvocationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionInvocationDistinct :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm Bool
-functionInvocationDistinct x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-        Core.projectionField = (Core.Name "distinct")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionInvocationName :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm OpenCypher.QualifiedName
-functionInvocationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionInvocationWithArguments :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.FunctionInvocation
-functionInvocationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionInvocationWithDistinct :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.FunctionInvocation
-functionInvocationWithDistinct original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionInvocationWithName :: Phantoms.TTerm OpenCypher.FunctionInvocation -> Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm OpenCypher.FunctionInvocation
-functionInvocationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.FunctionInvocation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-idInColl :: Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.IdInColl
-idInColl variable expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-idInCollExpression :: Phantoms.TTerm OpenCypher.IdInColl -> Phantoms.TTerm OpenCypher.Expression
-idInCollExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-idInCollVariable :: Phantoms.TTerm OpenCypher.IdInColl -> Phantoms.TTerm OpenCypher.Variable
-idInCollVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-idInCollWithExpression :: Phantoms.TTerm OpenCypher.IdInColl -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.IdInColl
-idInCollWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-idInCollWithVariable :: Phantoms.TTerm OpenCypher.IdInColl -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.IdInColl
-idInCollWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.IdInColl"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implicitProcedureInvocation :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm OpenCypher.ImplicitProcedureInvocation
-implicitProcedureInvocation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.ImplicitProcedureInvocation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-inQueryCall :: Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm (Maybe OpenCypher.YieldItems) -> Phantoms.TTerm OpenCypher.InQueryCall
-inQueryCall call yieldItems =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Phantoms.unTTerm call)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldItems"),
-          Core.fieldTerm = (Phantoms.unTTerm yieldItems)}]}))
-
-inQueryCallCall :: Phantoms.TTerm OpenCypher.InQueryCall -> Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation
-inQueryCallCall x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-        Core.projectionField = (Core.Name "call")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inQueryCallWithCall :: Phantoms.TTerm OpenCypher.InQueryCall -> Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm OpenCypher.InQueryCall
-inQueryCallWithCall original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-              Core.projectionField = (Core.Name "yieldItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inQueryCallWithYieldItems :: Phantoms.TTerm OpenCypher.InQueryCall -> Phantoms.TTerm (Maybe OpenCypher.YieldItems) -> Phantoms.TTerm OpenCypher.InQueryCall
-inQueryCallWithYieldItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-              Core.projectionField = (Core.Name "call")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldItems"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inQueryCallYieldItems :: Phantoms.TTerm OpenCypher.InQueryCall -> Phantoms.TTerm (Maybe OpenCypher.YieldItems)
-inQueryCallYieldItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.InQueryCall"),
-        Core.projectionField = (Core.Name "yieldItems")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePair :: Phantoms.TTerm OpenCypher.PropertyKeyName -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.KeyValuePair
-keyValuePair key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.KeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-keyValuePairKey :: Phantoms.TTerm OpenCypher.KeyValuePair -> Phantoms.TTerm OpenCypher.PropertyKeyName
-keyValuePairKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.KeyValuePair"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePairValue :: Phantoms.TTerm OpenCypher.KeyValuePair -> Phantoms.TTerm OpenCypher.Expression
-keyValuePairValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.KeyValuePair"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePairWithKey :: Phantoms.TTerm OpenCypher.KeyValuePair -> Phantoms.TTerm OpenCypher.PropertyKeyName -> Phantoms.TTerm OpenCypher.KeyValuePair
-keyValuePairWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.KeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cypher.openCypher.KeyValuePair"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keyValuePairWithValue :: Phantoms.TTerm OpenCypher.KeyValuePair -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.KeyValuePair
-keyValuePairWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.KeyValuePair"),
-      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.cypher.openCypher.KeyValuePair"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-limit :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.Limit
-limit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Limit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-listComprehension :: Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.ListComprehension
-listComprehension left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-listComprehensionLeft :: Phantoms.TTerm OpenCypher.ListComprehension -> Phantoms.TTerm OpenCypher.FilterExpression
-listComprehensionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listComprehensionRight :: Phantoms.TTerm OpenCypher.ListComprehension -> Phantoms.TTerm (Maybe OpenCypher.Expression)
-listComprehensionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listComprehensionWithLeft :: Phantoms.TTerm OpenCypher.ListComprehension -> Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm OpenCypher.ListComprehension
-listComprehensionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listComprehensionWithRight :: Phantoms.TTerm OpenCypher.ListComprehension -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.ListComprehension
-listComprehensionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ListComprehension"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listLiteral :: Phantoms.TTerm [OpenCypher.Expression] -> Phantoms.TTerm OpenCypher.ListLiteral
-listLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.ListLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-listOperatorExpressionOrPropertyLookupList :: Phantoms.TTerm OpenCypher.ListOperatorExpression -> Phantoms.TTerm OpenCypher.ListOperatorExpressionOrPropertyLookup
-listOperatorExpressionOrPropertyLookupList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ListOperatorExpressionOrPropertyLookup"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listOperatorExpressionOrPropertyLookupProperty :: Phantoms.TTerm OpenCypher.PropertyLookup -> Phantoms.TTerm OpenCypher.ListOperatorExpressionOrPropertyLookup
-listOperatorExpressionOrPropertyLookupProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ListOperatorExpressionOrPropertyLookup"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listOperatorExpressionRange :: Phantoms.TTerm OpenCypher.RangeExpression -> Phantoms.TTerm OpenCypher.ListOperatorExpression
-listOperatorExpressionRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ListOperatorExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listOperatorExpressionSingle :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.ListOperatorExpression
-listOperatorExpressionSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ListOperatorExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listPredicateExpression :: Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm OpenCypher.ListPredicateExpression
-listPredicateExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.ListPredicateExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalList :: Phantoms.TTerm OpenCypher.ListLiteral -> Phantoms.TTerm OpenCypher.Literal
-literalList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalMap :: Phantoms.TTerm OpenCypher.MapLiteral -> Phantoms.TTerm OpenCypher.Literal
-literalMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNull :: Phantoms.TTerm OpenCypher.Literal
-literalNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalNumber :: Phantoms.TTerm OpenCypher.NumberLiteral -> Phantoms.TTerm OpenCypher.Literal
-literalNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalString :: Phantoms.TTerm OpenCypher.StringLiteral -> Phantoms.TTerm OpenCypher.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapLiteral :: Phantoms.TTerm [OpenCypher.KeyValuePair] -> Phantoms.TTerm OpenCypher.MapLiteral
-mapLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.MapLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-match :: Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.Pattern -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.Match
-match optional pattern where_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)}]}))
-
-matchOptional :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm Bool
-matchOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchOrCreateCreate :: Phantoms.TTerm OpenCypher.MatchOrCreate
-matchOrCreateCreate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.MatchOrCreate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "create"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-matchOrCreateMatch :: Phantoms.TTerm OpenCypher.MatchOrCreate
-matchOrCreateMatch =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.MatchOrCreate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-matchPattern :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm OpenCypher.Pattern
-matchPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchWhere :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm (Maybe OpenCypher.Where)
-matchWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchWithOptional :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.Match
-matchWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchWithPattern :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm OpenCypher.Pattern -> Phantoms.TTerm OpenCypher.Match
-matchWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchWithWhere :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.Match
-matchWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Match"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-merge :: Phantoms.TTerm OpenCypher.PatternPart -> Phantoms.TTerm [OpenCypher.MergeAction] -> Phantoms.TTerm OpenCypher.Merge
-merge patternPart actions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPart"),
-          Core.fieldTerm = (Phantoms.unTTerm patternPart)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actions"),
-          Core.fieldTerm = (Phantoms.unTTerm actions)}]}))
-
-mergeAction :: Phantoms.TTerm OpenCypher.MatchOrCreate -> Phantoms.TTerm OpenCypher.Set -> Phantoms.TTerm OpenCypher.MergeAction
-mergeAction action set =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "action"),
-          Core.fieldTerm = (Phantoms.unTTerm action)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm set)}]}))
-
-mergeActionAction :: Phantoms.TTerm OpenCypher.MergeAction -> Phantoms.TTerm OpenCypher.MatchOrCreate
-mergeActionAction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-        Core.projectionField = (Core.Name "action")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergeActionSet :: Phantoms.TTerm OpenCypher.MergeAction -> Phantoms.TTerm OpenCypher.Set
-mergeActionSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-        Core.projectionField = (Core.Name "set")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergeActionWithAction :: Phantoms.TTerm OpenCypher.MergeAction -> Phantoms.TTerm OpenCypher.MatchOrCreate -> Phantoms.TTerm OpenCypher.MergeAction
-mergeActionWithAction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "action"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mergeActionWithSet :: Phantoms.TTerm OpenCypher.MergeAction -> Phantoms.TTerm OpenCypher.Set -> Phantoms.TTerm OpenCypher.MergeAction
-mergeActionWithSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "action"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MergeAction"),
-              Core.projectionField = (Core.Name "action")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mergeActions :: Phantoms.TTerm OpenCypher.Merge -> Phantoms.TTerm [OpenCypher.MergeAction]
-mergeActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-        Core.projectionField = (Core.Name "actions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergePatternPart :: Phantoms.TTerm OpenCypher.Merge -> Phantoms.TTerm OpenCypher.PatternPart
-mergePatternPart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-        Core.projectionField = (Core.Name "patternPart")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mergeWithActions :: Phantoms.TTerm OpenCypher.Merge -> Phantoms.TTerm [OpenCypher.MergeAction] -> Phantoms.TTerm OpenCypher.Merge
-mergeWithActions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPart"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-              Core.projectionField = (Core.Name "patternPart")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mergeWithPatternPart :: Phantoms.TTerm OpenCypher.Merge -> Phantoms.TTerm OpenCypher.PatternPart -> Phantoms.TTerm OpenCypher.Merge
-mergeWithPatternPart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patternPart"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Merge"),
-              Core.projectionField = (Core.Name "actions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiPartQuery :: Phantoms.TTerm [OpenCypher.WithClause] -> Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm OpenCypher.MultiPartQuery
-multiPartQuery with body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm with)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-multiPartQueryBody :: Phantoms.TTerm OpenCypher.MultiPartQuery -> Phantoms.TTerm OpenCypher.SinglePartQuery
-multiPartQueryBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiPartQueryWith :: Phantoms.TTerm OpenCypher.MultiPartQuery -> Phantoms.TTerm [OpenCypher.WithClause]
-multiPartQueryWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-        Core.projectionField = (Core.Name "with")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiPartQueryWithBody :: Phantoms.TTerm OpenCypher.MultiPartQuery -> Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm OpenCypher.MultiPartQuery
-multiPartQueryWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiPartQueryWithWith :: Phantoms.TTerm OpenCypher.MultiPartQuery -> Phantoms.TTerm [OpenCypher.WithClause] -> Phantoms.TTerm OpenCypher.MultiPartQuery
-multiPartQueryWithWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiPartQuery"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiplyDivideModuloExpression :: Phantoms.TTerm OpenCypher.PowerOfExpression -> Phantoms.TTerm [OpenCypher.MultiplyDivideModuloRightHandSide] -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression
-multiplyDivideModuloExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-multiplyDivideModuloExpressionLeft :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm OpenCypher.PowerOfExpression
-multiplyDivideModuloExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplyDivideModuloExpressionRight :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm [OpenCypher.MultiplyDivideModuloRightHandSide]
-multiplyDivideModuloExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplyDivideModuloExpressionWithLeft :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm OpenCypher.PowerOfExpression -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression
-multiplyDivideModuloExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiplyDivideModuloExpressionWithRight :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression -> Phantoms.TTerm [OpenCypher.MultiplyDivideModuloRightHandSide] -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloExpression
-multiplyDivideModuloExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiplyDivideModuloOperatorDivide :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloOperator
-multiplyDivideModuloOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-multiplyDivideModuloOperatorModulo :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloOperator
-multiplyDivideModuloOperatorModulo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulo"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-multiplyDivideModuloOperatorMultiply :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloOperator
-multiplyDivideModuloOperatorMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-multiplyDivideModuloRightHandSide :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloOperator -> Phantoms.TTerm OpenCypher.PowerOfExpression -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide
-multiplyDivideModuloRightHandSide operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-multiplyDivideModuloRightHandSideExpression :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide -> Phantoms.TTerm OpenCypher.PowerOfExpression
-multiplyDivideModuloRightHandSideExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplyDivideModuloRightHandSideOperator :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloOperator
-multiplyDivideModuloRightHandSideOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplyDivideModuloRightHandSideWithExpression :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide -> Phantoms.TTerm OpenCypher.PowerOfExpression -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide
-multiplyDivideModuloRightHandSideWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiplyDivideModuloRightHandSideWithOperator :: Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloOperator -> Phantoms.TTerm OpenCypher.MultiplyDivideModuloRightHandSide
-multiplyDivideModuloRightHandSideWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeLabel :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.NodeLabel
-nodeLabel x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.NodeLabel"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nodeLabels :: Phantoms.TTerm [OpenCypher.NodeLabel] -> Phantoms.TTerm OpenCypher.NodeLabels
-nodeLabels x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.NodeLabels"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nodePattern :: Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm (Maybe OpenCypher.NodeLabels) -> Phantoms.TTerm (Maybe OpenCypher.Properties) -> Phantoms.TTerm OpenCypher.NodePattern
-nodePattern variable labels properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-nodePatternChain :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm [OpenCypher.PatternElementChain] -> Phantoms.TTerm OpenCypher.NodePatternChain
-nodePatternChain nodePattern chain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Phantoms.unTTerm nodePattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "chain"),
-          Core.fieldTerm = (Phantoms.unTTerm chain)}]}))
-
-nodePatternChainChain :: Phantoms.TTerm OpenCypher.NodePatternChain -> Phantoms.TTerm [OpenCypher.PatternElementChain]
-nodePatternChainChain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-        Core.projectionField = (Core.Name "chain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternChainNodePattern :: Phantoms.TTerm OpenCypher.NodePatternChain -> Phantoms.TTerm OpenCypher.NodePattern
-nodePatternChainNodePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-        Core.projectionField = (Core.Name "nodePattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternChainWithChain :: Phantoms.TTerm OpenCypher.NodePatternChain -> Phantoms.TTerm [OpenCypher.PatternElementChain] -> Phantoms.TTerm OpenCypher.NodePatternChain
-nodePatternChainWithChain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "chain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodePatternChainWithNodePattern :: Phantoms.TTerm OpenCypher.NodePatternChain -> Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm OpenCypher.NodePatternChain
-nodePatternChainWithNodePattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "chain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePatternChain"),
-              Core.projectionField = (Core.Name "chain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePatternLabels :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm (Maybe OpenCypher.NodeLabels)
-nodePatternLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternProperties :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm (Maybe OpenCypher.Properties)
-nodePatternProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternVariable :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm (Maybe OpenCypher.Variable)
-nodePatternVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodePatternWithLabels :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm (Maybe OpenCypher.NodeLabels) -> Phantoms.TTerm OpenCypher.NodePattern
-nodePatternWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cypher.openCypher.NodePattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodePatternWithProperties :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm (Maybe OpenCypher.Properties) -> Phantoms.TTerm OpenCypher.NodePattern
-nodePatternWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodePatternWithVariable :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.NodePattern
-nodePatternWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NodePattern"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.openCypher.NodePattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nonArithmeticOperatorExpression :: Phantoms.TTerm OpenCypher.Atom -> Phantoms.TTerm [OpenCypher.ListOperatorExpressionOrPropertyLookup] -> Phantoms.TTerm (Maybe OpenCypher.NodeLabels) -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression
-nonArithmeticOperatorExpression atom listsAndLookups labels =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Phantoms.unTTerm atom)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listsAndLookups"),
-          Core.fieldTerm = (Phantoms.unTTerm listsAndLookups)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)}]}))
-
-nonArithmeticOperatorExpressionAtom :: Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm OpenCypher.Atom
-nonArithmeticOperatorExpressionAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-        Core.projectionField = (Core.Name "atom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArithmeticOperatorExpressionLabels :: Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm (Maybe OpenCypher.NodeLabels)
-nonArithmeticOperatorExpressionLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArithmeticOperatorExpressionListsAndLookups :: Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm [OpenCypher.ListOperatorExpressionOrPropertyLookup]
-nonArithmeticOperatorExpressionListsAndLookups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-        Core.projectionField = (Core.Name "listsAndLookups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nonArithmeticOperatorExpressionWithAtom :: Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm OpenCypher.Atom -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression
-nonArithmeticOperatorExpressionWithAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listsAndLookups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-              Core.projectionField = (Core.Name "listsAndLookups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nonArithmeticOperatorExpressionWithLabels :: Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm (Maybe OpenCypher.NodeLabels) -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression
-nonArithmeticOperatorExpressionWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listsAndLookups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-              Core.projectionField = (Core.Name "listsAndLookups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nonArithmeticOperatorExpressionWithListsAndLookups :: Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm [OpenCypher.ListOperatorExpressionOrPropertyLookup] -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression
-nonArithmeticOperatorExpressionWithListsAndLookups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listsAndLookups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-notExpression :: Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.ComparisonExpression -> Phantoms.TTerm OpenCypher.NotExpression
-notExpression not expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-notExpressionExpression :: Phantoms.TTerm OpenCypher.NotExpression -> Phantoms.TTerm OpenCypher.ComparisonExpression
-notExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notExpressionNot :: Phantoms.TTerm OpenCypher.NotExpression -> Phantoms.TTerm Bool
-notExpressionNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notExpressionWithExpression :: Phantoms.TTerm OpenCypher.NotExpression -> Phantoms.TTerm OpenCypher.ComparisonExpression -> Phantoms.TTerm OpenCypher.NotExpression
-notExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-notExpressionWithNot :: Phantoms.TTerm OpenCypher.NotExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.NotExpression
-notExpressionWithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.NotExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullPredicateExpression :: Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.NullPredicateExpression
-nullPredicateExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.NullPredicateExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-numberLiteralDouble :: Phantoms.TTerm Double -> Phantoms.TTerm OpenCypher.NumberLiteral
-numberLiteralDouble x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.NumberLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numberLiteralInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm OpenCypher.NumberLiteral
-numberLiteralInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.NumberLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-orExpression :: Phantoms.TTerm [OpenCypher.XorExpression] -> Phantoms.TTerm OpenCypher.OrExpression
-orExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.OrExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-order :: Phantoms.TTerm [OpenCypher.SortItem] -> Phantoms.TTerm OpenCypher.Order
-order x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Order"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-parameterInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm OpenCypher.Parameter
-parameterInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Parameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parameterSymbolic :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.Parameter
-parameterSymbolic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Parameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "symbolic"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parenthesizedExpression :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.ParenthesizedExpression
-parenthesizedExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.ParenthesizedExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-partialComparisonExpression :: Phantoms.TTerm OpenCypher.ComparisonOperator -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm OpenCypher.PartialComparisonExpression
-partialComparisonExpression operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-partialComparisonExpressionOperator :: Phantoms.TTerm OpenCypher.PartialComparisonExpression -> Phantoms.TTerm OpenCypher.ComparisonOperator
-partialComparisonExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-partialComparisonExpressionRight :: Phantoms.TTerm OpenCypher.PartialComparisonExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression
-partialComparisonExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-partialComparisonExpressionWithOperator :: Phantoms.TTerm OpenCypher.PartialComparisonExpression -> Phantoms.TTerm OpenCypher.ComparisonOperator -> Phantoms.TTerm OpenCypher.PartialComparisonExpression
-partialComparisonExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-partialComparisonExpressionWithRight :: Phantoms.TTerm OpenCypher.PartialComparisonExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm OpenCypher.PartialComparisonExpression
-partialComparisonExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pattern :: Phantoms.TTerm [OpenCypher.PatternPart] -> Phantoms.TTerm OpenCypher.Pattern
-pattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Pattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-patternComprehension :: Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.PatternComprehension
-patternComprehension variable pattern where_ right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-patternComprehensionPattern :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm OpenCypher.RelationshipsPattern
-patternComprehensionPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternComprehensionRight :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm OpenCypher.Expression
-patternComprehensionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternComprehensionVariable :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm (Maybe OpenCypher.Variable)
-patternComprehensionVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternComprehensionWhere :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm (Maybe OpenCypher.Where)
-patternComprehensionWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternComprehensionWithPattern :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm OpenCypher.PatternComprehension
-patternComprehensionWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternComprehensionWithRight :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.PatternComprehension
-patternComprehensionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternComprehensionWithVariable :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.PatternComprehension
-patternComprehensionWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternComprehensionWithWhere :: Phantoms.TTerm OpenCypher.PatternComprehension -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.PatternComprehension
-patternComprehensionWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternComprehension"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternElementChain :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm OpenCypher.PatternElementChain
-patternElementChain relationship node =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "relationship"),
-          Core.fieldTerm = (Phantoms.unTTerm relationship)},
-        Core.Field {
-          Core.fieldName = (Core.Name "node"),
-          Core.fieldTerm = (Phantoms.unTTerm node)}]}))
-
-patternElementChainNode :: Phantoms.TTerm OpenCypher.PatternElementChain -> Phantoms.TTerm OpenCypher.NodePattern
-patternElementChainNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-        Core.projectionField = (Core.Name "node")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternElementChainRelationship :: Phantoms.TTerm OpenCypher.PatternElementChain -> Phantoms.TTerm OpenCypher.RelationshipPattern
-patternElementChainRelationship x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-        Core.projectionField = (Core.Name "relationship")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternElementChainWithNode :: Phantoms.TTerm OpenCypher.PatternElementChain -> Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm OpenCypher.PatternElementChain
-patternElementChainWithNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "relationship"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-              Core.projectionField = (Core.Name "relationship")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "node"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternElementChainWithRelationship :: Phantoms.TTerm OpenCypher.PatternElementChain -> Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm OpenCypher.PatternElementChain
-patternElementChainWithRelationship original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "relationship"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "node"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternElementChain"),
-              Core.projectionField = (Core.Name "node")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternElementChained :: Phantoms.TTerm OpenCypher.NodePatternChain -> Phantoms.TTerm OpenCypher.PatternElement
-patternElementChained x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "chained"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternElementParenthesized :: Phantoms.TTerm OpenCypher.PatternElement -> Phantoms.TTerm OpenCypher.PatternElement
-patternElementParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternPart :: Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.AnonymousPatternPart -> Phantoms.TTerm OpenCypher.PatternPart
-patternPart variable pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-patternPartPattern :: Phantoms.TTerm OpenCypher.PatternPart -> Phantoms.TTerm OpenCypher.AnonymousPatternPart
-patternPartPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternPartVariable :: Phantoms.TTerm OpenCypher.PatternPart -> Phantoms.TTerm (Maybe OpenCypher.Variable)
-patternPartVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternPartWithPattern :: Phantoms.TTerm OpenCypher.PatternPart -> Phantoms.TTerm OpenCypher.AnonymousPatternPart -> Phantoms.TTerm OpenCypher.PatternPart
-patternPartWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternPartWithVariable :: Phantoms.TTerm OpenCypher.PatternPart -> Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.PatternPart
-patternPartWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternPart"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternPredicate :: Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm OpenCypher.PatternPredicate
-patternPredicate x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.PatternPredicate"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-patternWhere :: Phantoms.TTerm OpenCypher.Pattern -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.PatternWhere
-patternWhere pattern where_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)}]}))
-
-patternWherePattern :: Phantoms.TTerm OpenCypher.PatternWhere -> Phantoms.TTerm OpenCypher.Pattern
-patternWherePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternWhereWhere :: Phantoms.TTerm OpenCypher.PatternWhere -> Phantoms.TTerm (Maybe OpenCypher.Where)
-patternWhereWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternWhereWithPattern :: Phantoms.TTerm OpenCypher.PatternWhere -> Phantoms.TTerm OpenCypher.Pattern -> Phantoms.TTerm OpenCypher.PatternWhere
-patternWhereWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternWhereWithWhere :: Phantoms.TTerm OpenCypher.PatternWhere -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.PatternWhere
-patternWhereWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PatternWhere"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-powerOfExpression :: Phantoms.TTerm [OpenCypher.UnaryAddOrSubtractExpression] -> Phantoms.TTerm OpenCypher.PowerOfExpression
-powerOfExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.PowerOfExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-procedureInvocationExplicit :: Phantoms.TTerm OpenCypher.ExplicitProcedureInvocation -> Phantoms.TTerm OpenCypher.ProcedureInvocation
-procedureInvocationExplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ProcedureInvocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-procedureInvocationImplicit :: Phantoms.TTerm OpenCypher.ImplicitProcedureInvocation -> Phantoms.TTerm OpenCypher.ProcedureInvocation
-procedureInvocationImplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ProcedureInvocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-procedureResultField :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.ProcedureResultField
-procedureResultField x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.ProcedureResultField"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-projectionBody :: Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.ProjectionItems -> Phantoms.TTerm (Maybe OpenCypher.Order) -> Phantoms.TTerm (Maybe OpenCypher.Skip) -> Phantoms.TTerm (Maybe OpenCypher.Limit) -> Phantoms.TTerm OpenCypher.ProjectionBody
-projectionBody distinct projectionItems order skip limit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Phantoms.unTTerm distinct)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectionItems"),
-          Core.fieldTerm = (Phantoms.unTTerm projectionItems)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm order)},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Phantoms.unTTerm skip)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm limit)}]}))
-
-projectionBodyDistinct :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm Bool
-projectionBodyDistinct x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-        Core.projectionField = (Core.Name "distinct")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionBodyLimit :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Limit)
-projectionBodyLimit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-        Core.projectionField = (Core.Name "limit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionBodyOrder :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Order)
-projectionBodyOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-        Core.projectionField = (Core.Name "order")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionBodyProjectionItems :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm OpenCypher.ProjectionItems
-projectionBodyProjectionItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-        Core.projectionField = (Core.Name "projectionItems")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionBodySkip :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Skip)
-projectionBodySkip x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-        Core.projectionField = (Core.Name "skip")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionBodyWithDistinct :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.ProjectionBody
-projectionBodyWithDistinct original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectionItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "projectionItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionBodyWithLimit :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Limit) -> Phantoms.TTerm OpenCypher.ProjectionBody
-projectionBodyWithLimit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectionItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "projectionItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projectionBodyWithOrder :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Order) -> Phantoms.TTerm OpenCypher.ProjectionBody
-projectionBodyWithOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectionItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "projectionItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionBodyWithProjectionItems :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm OpenCypher.ProjectionItems -> Phantoms.TTerm OpenCypher.ProjectionBody
-projectionBodyWithProjectionItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectionItems"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "skip")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionBodyWithSkip :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Skip) -> Phantoms.TTerm OpenCypher.ProjectionBody
-projectionBodyWithSkip original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projectionItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "projectionItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skip"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionBody"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionItem :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.ProjectionItem
-projectionItem expression variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-projectionItemExpression :: Phantoms.TTerm OpenCypher.ProjectionItem -> Phantoms.TTerm OpenCypher.Expression
-projectionItemExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionItemVariable :: Phantoms.TTerm OpenCypher.ProjectionItem -> Phantoms.TTerm (Maybe OpenCypher.Variable)
-projectionItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionItemWithExpression :: Phantoms.TTerm OpenCypher.ProjectionItem -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.ProjectionItem
-projectionItemWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionItemWithVariable :: Phantoms.TTerm OpenCypher.ProjectionItem -> Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.ProjectionItem
-projectionItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItem"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projectionItems :: Phantoms.TTerm Bool -> Phantoms.TTerm [OpenCypher.ProjectionItem] -> Phantoms.TTerm OpenCypher.ProjectionItems
-projectionItems star explicit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "star"),
-          Core.fieldTerm = (Phantoms.unTTerm star)},
-        Core.Field {
-          Core.fieldName = (Core.Name "explicit"),
-          Core.fieldTerm = (Phantoms.unTTerm explicit)}]}))
-
-projectionItemsExplicit :: Phantoms.TTerm OpenCypher.ProjectionItems -> Phantoms.TTerm [OpenCypher.ProjectionItem]
-projectionItemsExplicit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-        Core.projectionField = (Core.Name "explicit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionItemsStar :: Phantoms.TTerm OpenCypher.ProjectionItems -> Phantoms.TTerm Bool
-projectionItemsStar x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-        Core.projectionField = (Core.Name "star")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionItemsWithExplicit :: Phantoms.TTerm OpenCypher.ProjectionItems -> Phantoms.TTerm [OpenCypher.ProjectionItem] -> Phantoms.TTerm OpenCypher.ProjectionItems
-projectionItemsWithExplicit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "star"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-              Core.projectionField = (Core.Name "star")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "explicit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projectionItemsWithStar :: Phantoms.TTerm OpenCypher.ProjectionItems -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.ProjectionItems
-projectionItemsWithStar original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "star"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "explicit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.ProjectionItems"),
-              Core.projectionField = (Core.Name "explicit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertiesMap :: Phantoms.TTerm OpenCypher.MapLiteral -> Phantoms.TTerm OpenCypher.Properties
-propertiesMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Properties"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertiesParameter :: Phantoms.TTerm OpenCypher.Parameter -> Phantoms.TTerm OpenCypher.Properties
-propertiesParameter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Properties"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyEquals :: Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.PropertyEquals
-propertyEquals lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-propertyEqualsLhs :: Phantoms.TTerm OpenCypher.PropertyEquals -> Phantoms.TTerm OpenCypher.PropertyExpression
-propertyEqualsLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyEqualsRhs :: Phantoms.TTerm OpenCypher.PropertyEquals -> Phantoms.TTerm OpenCypher.Expression
-propertyEqualsRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyEqualsWithLhs :: Phantoms.TTerm OpenCypher.PropertyEquals -> Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm OpenCypher.PropertyEquals
-propertyEqualsWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyEqualsWithRhs :: Phantoms.TTerm OpenCypher.PropertyEquals -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.PropertyEquals
-propertyEqualsWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyEquals"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyExpression :: Phantoms.TTerm OpenCypher.Atom -> Phantoms.TTerm [OpenCypher.PropertyLookup] -> Phantoms.TTerm OpenCypher.PropertyExpression
-propertyExpression atom lookups =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Phantoms.unTTerm atom)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lookups"),
-          Core.fieldTerm = (Phantoms.unTTerm lookups)}]}))
-
-propertyExpressionAtom :: Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm OpenCypher.Atom
-propertyExpressionAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-        Core.projectionField = (Core.Name "atom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExpressionLookups :: Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm [OpenCypher.PropertyLookup]
-propertyExpressionLookups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-        Core.projectionField = (Core.Name "lookups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExpressionWithAtom :: Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm OpenCypher.Atom -> Phantoms.TTerm OpenCypher.PropertyExpression
-propertyExpressionWithAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lookups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-              Core.projectionField = (Core.Name "lookups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyExpressionWithLookups :: Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm [OpenCypher.PropertyLookup] -> Phantoms.TTerm OpenCypher.PropertyExpression
-propertyExpressionWithLookups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.PropertyExpression"),
-              Core.projectionField = (Core.Name "atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lookups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyKeyName :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.PropertyKeyName
-propertyKeyName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.PropertyKeyName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-propertyLookup :: Phantoms.TTerm OpenCypher.PropertyKeyName -> Phantoms.TTerm OpenCypher.PropertyLookup
-propertyLookup x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.PropertyLookup"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-qualifiedName :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.QualifiedName
-qualifiedName namespace local =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm local)}]}))
-
-qualifiedNameLocal :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm String
-qualifiedNameLocal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-        Core.projectionField = (Core.Name "local")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNameNamespace :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm String
-qualifiedNameNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNameWithLocal :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.QualifiedName
-qualifiedNameWithLocal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedNameWithNamespace :: Phantoms.TTerm OpenCypher.QualifiedName -> Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.QualifiedName
-qualifiedNameWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.QualifiedName"),
-              Core.projectionField = (Core.Name "local")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quantifier :: Phantoms.TTerm OpenCypher.QuantifierOperator -> Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm OpenCypher.Quantifier
-quantifier operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-quantifierExpression :: Phantoms.TTerm OpenCypher.Quantifier -> Phantoms.TTerm OpenCypher.FilterExpression
-quantifierExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifierOperator :: Phantoms.TTerm OpenCypher.Quantifier -> Phantoms.TTerm OpenCypher.QuantifierOperator
-quantifierOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifierOperatorAll :: Phantoms.TTerm OpenCypher.QuantifierOperator
-quantifierOperatorAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.QuantifierOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-quantifierOperatorAny :: Phantoms.TTerm OpenCypher.QuantifierOperator
-quantifierOperatorAny =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.QuantifierOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-quantifierOperatorNone :: Phantoms.TTerm OpenCypher.QuantifierOperator
-quantifierOperatorNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.QuantifierOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-quantifierOperatorSingle :: Phantoms.TTerm OpenCypher.QuantifierOperator
-quantifierOperatorSingle =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.QuantifierOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-quantifierWithExpression :: Phantoms.TTerm OpenCypher.Quantifier -> Phantoms.TTerm OpenCypher.FilterExpression -> Phantoms.TTerm OpenCypher.Quantifier
-quantifierWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quantifierWithOperator :: Phantoms.TTerm OpenCypher.Quantifier -> Phantoms.TTerm OpenCypher.QuantifierOperator -> Phantoms.TTerm OpenCypher.Quantifier
-quantifierWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Quantifier"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-queryRegular :: Phantoms.TTerm OpenCypher.RegularQuery -> Phantoms.TTerm OpenCypher.Query
-queryRegular x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regular"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryStandalone :: Phantoms.TTerm OpenCypher.StandaloneCall -> Phantoms.TTerm OpenCypher.Query
-queryStandalone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "standalone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rangeExpression :: Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.RangeExpression
-rangeExpression start end =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm start)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm end)}]}))
-
-rangeExpressionEnd :: Phantoms.TTerm OpenCypher.RangeExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression)
-rangeExpressionEnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-        Core.projectionField = (Core.Name "end")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeExpressionStart :: Phantoms.TTerm OpenCypher.RangeExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression)
-rangeExpressionStart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-        Core.projectionField = (Core.Name "start")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeExpressionWithEnd :: Phantoms.TTerm OpenCypher.RangeExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.RangeExpression
-rangeExpressionWithEnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeExpressionWithStart :: Phantoms.TTerm OpenCypher.RangeExpression -> Phantoms.TTerm (Maybe OpenCypher.Expression) -> Phantoms.TTerm OpenCypher.RangeExpression
-rangeExpressionWithStart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeExpression"),
-              Core.projectionField = (Core.Name "end")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeLiteral :: Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm OpenCypher.RangeLiteral
-rangeLiteral start end =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm start)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm end)}]}))
-
-rangeLiteralEnd :: Phantoms.TTerm OpenCypher.RangeLiteral -> Phantoms.TTerm (Maybe Integer)
-rangeLiteralEnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-        Core.projectionField = (Core.Name "end")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralStart :: Phantoms.TTerm OpenCypher.RangeLiteral -> Phantoms.TTerm (Maybe Integer)
-rangeLiteralStart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-        Core.projectionField = (Core.Name "start")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeLiteralWithEnd :: Phantoms.TTerm OpenCypher.RangeLiteral -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm OpenCypher.RangeLiteral
-rangeLiteralWithEnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeLiteralWithStart :: Phantoms.TTerm OpenCypher.RangeLiteral -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm OpenCypher.RangeLiteral
-rangeLiteralWithStart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RangeLiteral"),
-              Core.projectionField = (Core.Name "end")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-readingClauseInQueryCall :: Phantoms.TTerm OpenCypher.InQueryCall -> Phantoms.TTerm OpenCypher.ReadingClause
-readingClauseInQueryCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ReadingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inQueryCall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-readingClauseMatch :: Phantoms.TTerm OpenCypher.Match -> Phantoms.TTerm OpenCypher.ReadingClause
-readingClauseMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ReadingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-readingClauseUnwind :: Phantoms.TTerm OpenCypher.Unwind -> Phantoms.TTerm OpenCypher.ReadingClause
-readingClauseUnwind x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.ReadingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unwind"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-regularQuery :: Phantoms.TTerm OpenCypher.SingleQuery -> Phantoms.TTerm [OpenCypher.Union] -> Phantoms.TTerm OpenCypher.RegularQuery
-regularQuery head rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-regularQueryHead :: Phantoms.TTerm OpenCypher.RegularQuery -> Phantoms.TTerm OpenCypher.SingleQuery
-regularQueryHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regularQueryRest :: Phantoms.TTerm OpenCypher.RegularQuery -> Phantoms.TTerm [OpenCypher.Union]
-regularQueryRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regularQueryWithHead :: Phantoms.TTerm OpenCypher.RegularQuery -> Phantoms.TTerm OpenCypher.SingleQuery -> Phantoms.TTerm OpenCypher.RegularQuery
-regularQueryWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-regularQueryWithRest :: Phantoms.TTerm OpenCypher.RegularQuery -> Phantoms.TTerm [OpenCypher.Union] -> Phantoms.TTerm OpenCypher.RegularQuery
-regularQueryWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RegularQuery"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relTypeName :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.RelTypeName
-relTypeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.RelTypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-relationshipDetail :: Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm (Maybe OpenCypher.RelationshipTypes) -> Phantoms.TTerm (Maybe OpenCypher.RangeLiteral) -> Phantoms.TTerm (Maybe OpenCypher.Properties) -> Phantoms.TTerm OpenCypher.RelationshipDetail
-relationshipDetail variable types range properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-relationshipDetailProperties :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.Properties)
-relationshipDetailProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDetailRange :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.RangeLiteral)
-relationshipDetailRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDetailTypes :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.RelationshipTypes)
-relationshipDetailTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDetailVariable :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.Variable)
-relationshipDetailVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipDetailWithProperties :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.Properties) -> Phantoms.TTerm OpenCypher.RelationshipDetail
-relationshipDetailWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationshipDetailWithRange :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.RangeLiteral) -> Phantoms.TTerm OpenCypher.RelationshipDetail
-relationshipDetailWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipDetailWithTypes :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.RelationshipTypes) -> Phantoms.TTerm OpenCypher.RelationshipDetail
-relationshipDetailWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipDetailWithVariable :: Phantoms.TTerm OpenCypher.RelationshipDetail -> Phantoms.TTerm (Maybe OpenCypher.Variable) -> Phantoms.TTerm OpenCypher.RelationshipDetail
-relationshipDetailWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.cypher.openCypher.RelationshipDetail"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipPattern :: Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe OpenCypher.RelationshipDetail) -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.RelationshipPattern
-relationshipPattern leftArrow detail rightArrow =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArrow"),
-          Core.fieldTerm = (Phantoms.unTTerm leftArrow)},
-        Core.Field {
-          Core.fieldName = (Core.Name "detail"),
-          Core.fieldTerm = (Phantoms.unTTerm detail)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightArrow"),
-          Core.fieldTerm = (Phantoms.unTTerm rightArrow)}]}))
-
-relationshipPatternDetail :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm (Maybe OpenCypher.RelationshipDetail)
-relationshipPatternDetail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-        Core.projectionField = (Core.Name "detail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipPatternLeftArrow :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm Bool
-relationshipPatternLeftArrow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-        Core.projectionField = (Core.Name "leftArrow")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipPatternRightArrow :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm Bool
-relationshipPatternRightArrow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-        Core.projectionField = (Core.Name "rightArrow")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipPatternWithDetail :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm (Maybe OpenCypher.RelationshipDetail) -> Phantoms.TTerm OpenCypher.RelationshipPattern
-relationshipPatternWithDetail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArrow"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-              Core.projectionField = (Core.Name "leftArrow")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "detail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightArrow"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-              Core.projectionField = (Core.Name "rightArrow")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipPatternWithLeftArrow :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.RelationshipPattern
-relationshipPatternWithLeftArrow original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArrow"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "detail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-              Core.projectionField = (Core.Name "detail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightArrow"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-              Core.projectionField = (Core.Name "rightArrow")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationshipPatternWithRightArrow :: Phantoms.TTerm OpenCypher.RelationshipPattern -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.RelationshipPattern
-relationshipPatternWithRightArrow original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArrow"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-              Core.projectionField = (Core.Name "leftArrow")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "detail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipPattern"),
-              Core.projectionField = (Core.Name "detail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightArrow"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationshipTypes :: Phantoms.TTerm [OpenCypher.RelTypeName] -> Phantoms.TTerm OpenCypher.RelationshipTypes
-relationshipTypes x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipTypes"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-relationshipsPattern :: Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm [OpenCypher.PatternElementChain] -> Phantoms.TTerm OpenCypher.RelationshipsPattern
-relationshipsPattern nodePattern chain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Phantoms.unTTerm nodePattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "chain"),
-          Core.fieldTerm = (Phantoms.unTTerm chain)}]}))
-
-relationshipsPatternChain :: Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm [OpenCypher.PatternElementChain]
-relationshipsPatternChain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-        Core.projectionField = (Core.Name "chain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipsPatternNodePattern :: Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm OpenCypher.NodePattern
-relationshipsPatternNodePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-        Core.projectionField = (Core.Name "nodePattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationshipsPatternWithChain :: Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm [OpenCypher.PatternElementChain] -> Phantoms.TTerm OpenCypher.RelationshipsPattern
-relationshipsPatternWithChain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-              Core.projectionField = (Core.Name "nodePattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "chain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationshipsPatternWithNodePattern :: Phantoms.TTerm OpenCypher.RelationshipsPattern -> Phantoms.TTerm OpenCypher.NodePattern -> Phantoms.TTerm OpenCypher.RelationshipsPattern
-relationshipsPatternWithNodePattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodePattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "chain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.RelationshipsPattern"),
-              Core.projectionField = (Core.Name "chain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-remove :: Phantoms.TTerm [OpenCypher.RemoveItem] -> Phantoms.TTerm OpenCypher.Remove
-remove x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Remove"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-removeItemProperty :: Phantoms.TTerm OpenCypher.PropertyExpression -> Phantoms.TTerm OpenCypher.RemoveItem
-removeItemProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.RemoveItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-removeItemVariableLabels :: Phantoms.TTerm OpenCypher.VariableAndNodeLabels -> Phantoms.TTerm OpenCypher.RemoveItem
-removeItemVariableLabels x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.RemoveItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variableLabels"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-return :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm OpenCypher.Return
-return x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Return"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-set :: Phantoms.TTerm [OpenCypher.SetItem] -> Phantoms.TTerm OpenCypher.Set
-set x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Set"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-setItemProperty :: Phantoms.TTerm OpenCypher.PropertyEquals -> Phantoms.TTerm OpenCypher.SetItem
-setItemProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setItemVariableEqual :: Phantoms.TTerm OpenCypher.VariableEquals -> Phantoms.TTerm OpenCypher.SetItem
-setItemVariableEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variableEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setItemVariableLabels :: Phantoms.TTerm OpenCypher.VariableAndNodeLabels -> Phantoms.TTerm OpenCypher.SetItem
-setItemVariableLabels x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variableLabels"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setItemVariablePlusEqual :: Phantoms.TTerm OpenCypher.VariablePlusEquals -> Phantoms.TTerm OpenCypher.SetItem
-setItemVariablePlusEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variablePlusEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singlePartQuery :: Phantoms.TTerm [OpenCypher.ReadingClause] -> Phantoms.TTerm [OpenCypher.UpdatingClause] -> Phantoms.TTerm (Maybe OpenCypher.Return) -> Phantoms.TTerm OpenCypher.SinglePartQuery
-singlePartQuery reading updating return =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Phantoms.unTTerm reading)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Phantoms.unTTerm updating)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm return)}]}))
-
-singlePartQueryReading :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm [OpenCypher.ReadingClause]
-singlePartQueryReading x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-        Core.projectionField = (Core.Name "reading")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singlePartQueryReturn :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm (Maybe OpenCypher.Return)
-singlePartQueryReturn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-        Core.projectionField = (Core.Name "return")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singlePartQueryUpdating :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm [OpenCypher.UpdatingClause]
-singlePartQueryUpdating x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-        Core.projectionField = (Core.Name "updating")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singlePartQueryWithReading :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm [OpenCypher.ReadingClause] -> Phantoms.TTerm OpenCypher.SinglePartQuery
-singlePartQueryWithReading original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-singlePartQueryWithReturn :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm (Maybe OpenCypher.Return) -> Phantoms.TTerm OpenCypher.SinglePartQuery
-singlePartQueryWithReturn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-singlePartQueryWithUpdating :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm [OpenCypher.UpdatingClause] -> Phantoms.TTerm OpenCypher.SinglePartQuery
-singlePartQueryWithUpdating original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SinglePartQuery"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-singleQueryMultiPart :: Phantoms.TTerm OpenCypher.MultiPartQuery -> Phantoms.TTerm OpenCypher.SingleQuery
-singleQueryMultiPart x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SingleQuery"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiPart"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singleQuerySinglePart :: Phantoms.TTerm OpenCypher.SinglePartQuery -> Phantoms.TTerm OpenCypher.SingleQuery
-singleQuerySinglePart x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SingleQuery"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singlePart"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-skip :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.Skip
-skip x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Skip"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-sortItem :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm (Maybe OpenCypher.SortOrder) -> Phantoms.TTerm OpenCypher.SortItem
-sortItem expression order =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm order)}]}))
-
-sortItemExpression :: Phantoms.TTerm OpenCypher.SortItem -> Phantoms.TTerm OpenCypher.Expression
-sortItemExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortItemOrder :: Phantoms.TTerm OpenCypher.SortItem -> Phantoms.TTerm (Maybe OpenCypher.SortOrder)
-sortItemOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-        Core.projectionField = (Core.Name "order")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortItemWithExpression :: Phantoms.TTerm OpenCypher.SortItem -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.SortItem
-sortItemWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sortItemWithOrder :: Phantoms.TTerm OpenCypher.SortItem -> Phantoms.TTerm (Maybe OpenCypher.SortOrder) -> Phantoms.TTerm OpenCypher.SortItem
-sortItemWithOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.SortItem"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sortOrderAscending :: Phantoms.TTerm OpenCypher.SortOrder
-sortOrderAscending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SortOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sortOrderDescending :: Phantoms.TTerm OpenCypher.SortOrder
-sortOrderDescending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.SortOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "descending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-standaloneCall :: Phantoms.TTerm OpenCypher.ProcedureInvocation -> Phantoms.TTerm (Maybe OpenCypher.StarOrYieldItems) -> Phantoms.TTerm OpenCypher.StandaloneCall
-standaloneCall call yieldItems =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Phantoms.unTTerm call)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldItems"),
-          Core.fieldTerm = (Phantoms.unTTerm yieldItems)}]}))
-
-standaloneCallCall :: Phantoms.TTerm OpenCypher.StandaloneCall -> Phantoms.TTerm OpenCypher.ProcedureInvocation
-standaloneCallCall x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-        Core.projectionField = (Core.Name "call")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-standaloneCallWithCall :: Phantoms.TTerm OpenCypher.StandaloneCall -> Phantoms.TTerm OpenCypher.ProcedureInvocation -> Phantoms.TTerm OpenCypher.StandaloneCall
-standaloneCallWithCall original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldItems"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-              Core.projectionField = (Core.Name "yieldItems")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-standaloneCallWithYieldItems :: Phantoms.TTerm OpenCypher.StandaloneCall -> Phantoms.TTerm (Maybe OpenCypher.StarOrYieldItems) -> Phantoms.TTerm OpenCypher.StandaloneCall
-standaloneCallWithYieldItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-              Core.projectionField = (Core.Name "call")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldItems"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-standaloneCallYieldItems :: Phantoms.TTerm OpenCypher.StandaloneCall -> Phantoms.TTerm (Maybe OpenCypher.StarOrYieldItems)
-standaloneCallYieldItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StandaloneCall"),
-        Core.projectionField = (Core.Name "yieldItems")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-starOrYieldItemsItems :: Phantoms.TTerm OpenCypher.YieldItems -> Phantoms.TTerm OpenCypher.StarOrYieldItems
-starOrYieldItemsItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StarOrYieldItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "items"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starOrYieldItemsStar :: Phantoms.TTerm OpenCypher.StarOrYieldItems
-starOrYieldItemsStar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StarOrYieldItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringListNullPredicateExpression :: Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm [OpenCypher.StringListNullPredicateRightHandSide] -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression
-stringListNullPredicateExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-stringListNullPredicateExpressionLeft :: Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression
-stringListNullPredicateExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringListNullPredicateExpressionRight :: Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm [OpenCypher.StringListNullPredicateRightHandSide]
-stringListNullPredicateExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringListNullPredicateExpressionWithLeft :: Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression
-stringListNullPredicateExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringListNullPredicateExpressionWithRight :: Phantoms.TTerm OpenCypher.StringListNullPredicateExpression -> Phantoms.TTerm [OpenCypher.StringListNullPredicateRightHandSide] -> Phantoms.TTerm OpenCypher.StringListNullPredicateExpression
-stringListNullPredicateExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringListNullPredicateRightHandSideList :: Phantoms.TTerm OpenCypher.ListPredicateExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateRightHandSide
-stringListNullPredicateRightHandSideList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateRightHandSide"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringListNullPredicateRightHandSideNull :: Phantoms.TTerm OpenCypher.NullPredicateExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateRightHandSide
-stringListNullPredicateRightHandSideNull x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateRightHandSide"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringListNullPredicateRightHandSideString :: Phantoms.TTerm OpenCypher.StringPredicateExpression -> Phantoms.TTerm OpenCypher.StringListNullPredicateRightHandSide
-stringListNullPredicateRightHandSideString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StringListNullPredicateRightHandSide"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.StringLiteral
-stringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.StringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringPredicateExpression :: Phantoms.TTerm OpenCypher.StringPredicateOperator -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm OpenCypher.StringPredicateExpression
-stringPredicateExpression operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-stringPredicateExpressionExpression :: Phantoms.TTerm OpenCypher.StringPredicateExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression
-stringPredicateExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringPredicateExpressionOperator :: Phantoms.TTerm OpenCypher.StringPredicateExpression -> Phantoms.TTerm OpenCypher.StringPredicateOperator
-stringPredicateExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringPredicateExpressionWithExpression :: Phantoms.TTerm OpenCypher.StringPredicateExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression -> Phantoms.TTerm OpenCypher.StringPredicateExpression
-stringPredicateExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringPredicateExpressionWithOperator :: Phantoms.TTerm OpenCypher.StringPredicateExpression -> Phantoms.TTerm OpenCypher.StringPredicateOperator -> Phantoms.TTerm OpenCypher.StringPredicateExpression
-stringPredicateExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringPredicateOperatorContains :: Phantoms.TTerm OpenCypher.StringPredicateOperator
-stringPredicateOperatorContains =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "contains"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringPredicateOperatorEndsWith :: Phantoms.TTerm OpenCypher.StringPredicateOperator
-stringPredicateOperatorEndsWith =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endsWith"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringPredicateOperatorStartsWith :: Phantoms.TTerm OpenCypher.StringPredicateOperator
-stringPredicateOperatorStartsWith =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.StringPredicateOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "startsWith"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unAndExpression :: Phantoms.TTerm OpenCypher.AndExpression -> Phantoms.TTerm [OpenCypher.NotExpression]
-unAndExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.AndExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAnonymousPatternPart :: Phantoms.TTerm OpenCypher.AnonymousPatternPart -> Phantoms.TTerm OpenCypher.PatternElement
-unAnonymousPatternPart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.AnonymousPatternPart")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCreate :: Phantoms.TTerm OpenCypher.Create -> Phantoms.TTerm OpenCypher.Pattern
-unCreate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Create")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExpression :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.OrExpression
-unExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Expression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImplicitProcedureInvocation :: Phantoms.TTerm OpenCypher.ImplicitProcedureInvocation -> Phantoms.TTerm OpenCypher.QualifiedName
-unImplicitProcedureInvocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.ImplicitProcedureInvocation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLimit :: Phantoms.TTerm OpenCypher.Limit -> Phantoms.TTerm OpenCypher.Expression
-unLimit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Limit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unListLiteral :: Phantoms.TTerm OpenCypher.ListLiteral -> Phantoms.TTerm [OpenCypher.Expression]
-unListLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.ListLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unListPredicateExpression :: Phantoms.TTerm OpenCypher.ListPredicateExpression -> Phantoms.TTerm OpenCypher.AddOrSubtractExpression
-unListPredicateExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.ListPredicateExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMapLiteral :: Phantoms.TTerm OpenCypher.MapLiteral -> Phantoms.TTerm [OpenCypher.KeyValuePair]
-unMapLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.MapLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNodeLabel :: Phantoms.TTerm OpenCypher.NodeLabel -> Phantoms.TTerm String
-unNodeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.NodeLabel")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNodeLabels :: Phantoms.TTerm OpenCypher.NodeLabels -> Phantoms.TTerm [OpenCypher.NodeLabel]
-unNodeLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.NodeLabels")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNullPredicateExpression :: Phantoms.TTerm OpenCypher.NullPredicateExpression -> Phantoms.TTerm Bool
-unNullPredicateExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.NullPredicateExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unOrExpression :: Phantoms.TTerm OpenCypher.OrExpression -> Phantoms.TTerm [OpenCypher.XorExpression]
-unOrExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.OrExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unOrder :: Phantoms.TTerm OpenCypher.Order -> Phantoms.TTerm [OpenCypher.SortItem]
-unOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Order")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unParenthesizedExpression :: Phantoms.TTerm OpenCypher.ParenthesizedExpression -> Phantoms.TTerm OpenCypher.Expression
-unParenthesizedExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.ParenthesizedExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPattern :: Phantoms.TTerm OpenCypher.Pattern -> Phantoms.TTerm [OpenCypher.PatternPart]
-unPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Pattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPatternPredicate :: Phantoms.TTerm OpenCypher.PatternPredicate -> Phantoms.TTerm OpenCypher.RelationshipsPattern
-unPatternPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.PatternPredicate")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPowerOfExpression :: Phantoms.TTerm OpenCypher.PowerOfExpression -> Phantoms.TTerm [OpenCypher.UnaryAddOrSubtractExpression]
-unPowerOfExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.PowerOfExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unProcedureResultField :: Phantoms.TTerm OpenCypher.ProcedureResultField -> Phantoms.TTerm String
-unProcedureResultField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.ProcedureResultField")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPropertyKeyName :: Phantoms.TTerm OpenCypher.PropertyKeyName -> Phantoms.TTerm String
-unPropertyKeyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.PropertyKeyName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPropertyLookup :: Phantoms.TTerm OpenCypher.PropertyLookup -> Phantoms.TTerm OpenCypher.PropertyKeyName
-unPropertyLookup x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.PropertyLookup")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRelTypeName :: Phantoms.TTerm OpenCypher.RelTypeName -> Phantoms.TTerm String
-unRelTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.RelTypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRelationshipTypes :: Phantoms.TTerm OpenCypher.RelationshipTypes -> Phantoms.TTerm [OpenCypher.RelTypeName]
-unRelationshipTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.RelationshipTypes")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRemove :: Phantoms.TTerm OpenCypher.Remove -> Phantoms.TTerm [OpenCypher.RemoveItem]
-unRemove x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Remove")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReturn :: Phantoms.TTerm OpenCypher.Return -> Phantoms.TTerm OpenCypher.ProjectionBody
-unReturn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Return")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSet :: Phantoms.TTerm OpenCypher.Set -> Phantoms.TTerm [OpenCypher.SetItem]
-unSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Set")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSkip :: Phantoms.TTerm OpenCypher.Skip -> Phantoms.TTerm OpenCypher.Expression
-unSkip x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Skip")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteral :: Phantoms.TTerm OpenCypher.StringLiteral -> Phantoms.TTerm String
-unStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.StringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariable :: Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm String
-unVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Variable")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unWhere :: Phantoms.TTerm OpenCypher.Where -> Phantoms.TTerm OpenCypher.Expression
-unWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.Where")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unXorExpression :: Phantoms.TTerm OpenCypher.XorExpression -> Phantoms.TTerm [OpenCypher.AndExpression]
-unXorExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.cypher.openCypher.XorExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryAddOrSubtractExpression :: Phantoms.TTerm (Maybe OpenCypher.AddOrSubtractOperator) -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression
-unaryAddOrSubtractExpression operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-unaryAddOrSubtractExpressionExpression :: Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression
-unaryAddOrSubtractExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryAddOrSubtractExpressionOperator :: Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression -> Phantoms.TTerm (Maybe OpenCypher.AddOrSubtractOperator)
-unaryAddOrSubtractExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryAddOrSubtractExpressionWithExpression :: Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression -> Phantoms.TTerm OpenCypher.NonArithmeticOperatorExpression -> Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression
-unaryAddOrSubtractExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryAddOrSubtractExpressionWithOperator :: Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression -> Phantoms.TTerm (Maybe OpenCypher.AddOrSubtractOperator) -> Phantoms.TTerm OpenCypher.UnaryAddOrSubtractExpression
-unaryAddOrSubtractExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-union :: Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.SingleQuery -> Phantoms.TTerm OpenCypher.Union
-union all query =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm all)},
-        Core.Field {
-          Core.fieldName = (Core.Name "query"),
-          Core.fieldTerm = (Phantoms.unTTerm query)}]}))
-
-unionAll :: Phantoms.TTerm OpenCypher.Union -> Phantoms.TTerm Bool
-unionAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-        Core.projectionField = (Core.Name "all")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionQuery :: Phantoms.TTerm OpenCypher.Union -> Phantoms.TTerm OpenCypher.SingleQuery
-unionQuery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-        Core.projectionField = (Core.Name "query")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionWithAll :: Phantoms.TTerm OpenCypher.Union -> Phantoms.TTerm Bool -> Phantoms.TTerm OpenCypher.Union
-unionWithAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "query"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-              Core.projectionField = (Core.Name "query")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionWithQuery :: Phantoms.TTerm OpenCypher.Union -> Phantoms.TTerm OpenCypher.SingleQuery -> Phantoms.TTerm OpenCypher.Union
-unionWithQuery original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Union"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "query"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unwind :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.Unwind
-unwind expression variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-unwindExpression :: Phantoms.TTerm OpenCypher.Unwind -> Phantoms.TTerm OpenCypher.Expression
-unwindExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unwindVariable :: Phantoms.TTerm OpenCypher.Unwind -> Phantoms.TTerm OpenCypher.Variable
-unwindVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unwindWithExpression :: Phantoms.TTerm OpenCypher.Unwind -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.Unwind
-unwindWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unwindWithVariable :: Phantoms.TTerm OpenCypher.Unwind -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.Unwind
-unwindWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.Unwind"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-updatingClauseCreate :: Phantoms.TTerm OpenCypher.Create -> Phantoms.TTerm OpenCypher.UpdatingClause
-updatingClauseCreate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.UpdatingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "create"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-updatingClauseDelete :: Phantoms.TTerm OpenCypher.Delete -> Phantoms.TTerm OpenCypher.UpdatingClause
-updatingClauseDelete x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.UpdatingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delete"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-updatingClauseMerge :: Phantoms.TTerm OpenCypher.Merge -> Phantoms.TTerm OpenCypher.UpdatingClause
-updatingClauseMerge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.UpdatingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "merge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-updatingClauseRemove :: Phantoms.TTerm OpenCypher.Remove -> Phantoms.TTerm OpenCypher.UpdatingClause
-updatingClauseRemove x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.UpdatingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "remove"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-updatingClauseSet :: Phantoms.TTerm OpenCypher.Set -> Phantoms.TTerm OpenCypher.UpdatingClause
-updatingClauseSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.cypher.openCypher.UpdatingClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variable :: Phantoms.TTerm String -> Phantoms.TTerm OpenCypher.Variable
-variable x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Variable"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-variableAndNodeLabels :: Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.NodeLabels -> Phantoms.TTerm OpenCypher.VariableAndNodeLabels
-variableAndNodeLabels variable labels =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)}]}))
-
-variableAndNodeLabelsLabels :: Phantoms.TTerm OpenCypher.VariableAndNodeLabels -> Phantoms.TTerm OpenCypher.NodeLabels
-variableAndNodeLabelsLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableAndNodeLabelsVariable :: Phantoms.TTerm OpenCypher.VariableAndNodeLabels -> Phantoms.TTerm OpenCypher.Variable
-variableAndNodeLabelsVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableAndNodeLabelsWithLabels :: Phantoms.TTerm OpenCypher.VariableAndNodeLabels -> Phantoms.TTerm OpenCypher.NodeLabels -> Phantoms.TTerm OpenCypher.VariableAndNodeLabels
-variableAndNodeLabelsWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableAndNodeLabelsWithVariable :: Phantoms.TTerm OpenCypher.VariableAndNodeLabels -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.VariableAndNodeLabels
-variableAndNodeLabelsWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableEquals :: Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.VariableEquals
-variableEquals lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-variableEqualsLhs :: Phantoms.TTerm OpenCypher.VariableEquals -> Phantoms.TTerm OpenCypher.Variable
-variableEqualsLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableEqualsRhs :: Phantoms.TTerm OpenCypher.VariableEquals -> Phantoms.TTerm OpenCypher.Expression
-variableEqualsRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableEqualsWithLhs :: Phantoms.TTerm OpenCypher.VariableEquals -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.VariableEquals
-variableEqualsWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableEqualsWithRhs :: Phantoms.TTerm OpenCypher.VariableEquals -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.VariableEquals
-variableEqualsWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariableEquals"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variablePlusEquals :: Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.VariablePlusEquals
-variablePlusEquals lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-variablePlusEqualsLhs :: Phantoms.TTerm OpenCypher.VariablePlusEquals -> Phantoms.TTerm OpenCypher.Variable
-variablePlusEqualsLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variablePlusEqualsRhs :: Phantoms.TTerm OpenCypher.VariablePlusEquals -> Phantoms.TTerm OpenCypher.Expression
-variablePlusEqualsRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variablePlusEqualsWithLhs :: Phantoms.TTerm OpenCypher.VariablePlusEquals -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.VariablePlusEquals
-variablePlusEqualsWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variablePlusEqualsWithRhs :: Phantoms.TTerm OpenCypher.VariablePlusEquals -> Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.VariablePlusEquals
-variablePlusEqualsWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.VariablePlusEquals"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-where_ :: Phantoms.TTerm OpenCypher.Expression -> Phantoms.TTerm OpenCypher.Where
-where_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.Where"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-with :: Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.With
-with projection where_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm projection)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)}]}))
-
-withClause :: Phantoms.TTerm [OpenCypher.ReadingClause] -> Phantoms.TTerm [OpenCypher.UpdatingClause] -> Phantoms.TTerm OpenCypher.With -> Phantoms.TTerm OpenCypher.WithClause
-withClause reading updating with =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Phantoms.unTTerm reading)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Phantoms.unTTerm updating)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm with)}]}))
-
-withClauseReading :: Phantoms.TTerm OpenCypher.WithClause -> Phantoms.TTerm [OpenCypher.ReadingClause]
-withClauseReading x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-        Core.projectionField = (Core.Name "reading")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withClauseUpdating :: Phantoms.TTerm OpenCypher.WithClause -> Phantoms.TTerm [OpenCypher.UpdatingClause]
-withClauseUpdating x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-        Core.projectionField = (Core.Name "updating")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withClauseWith :: Phantoms.TTerm OpenCypher.WithClause -> Phantoms.TTerm OpenCypher.With
-withClauseWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-        Core.projectionField = (Core.Name "with")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withClauseWithReading :: Phantoms.TTerm OpenCypher.WithClause -> Phantoms.TTerm [OpenCypher.ReadingClause] -> Phantoms.TTerm OpenCypher.WithClause
-withClauseWithReading original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withClauseWithUpdating :: Phantoms.TTerm OpenCypher.WithClause -> Phantoms.TTerm [OpenCypher.UpdatingClause] -> Phantoms.TTerm OpenCypher.WithClause
-withClauseWithUpdating original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withClauseWithWith :: Phantoms.TTerm OpenCypher.WithClause -> Phantoms.TTerm OpenCypher.With -> Phantoms.TTerm OpenCypher.WithClause
-withClauseWithWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reading"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-              Core.projectionField = (Core.Name "reading")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "updating"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.WithClause"),
-              Core.projectionField = (Core.Name "updating")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-withProjection :: Phantoms.TTerm OpenCypher.With -> Phantoms.TTerm OpenCypher.ProjectionBody
-withProjection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-        Core.projectionField = (Core.Name "projection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withWhere :: Phantoms.TTerm OpenCypher.With -> Phantoms.TTerm (Maybe OpenCypher.Where)
-withWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withWithProjection :: Phantoms.TTerm OpenCypher.With -> Phantoms.TTerm OpenCypher.ProjectionBody -> Phantoms.TTerm OpenCypher.With
-withWithProjection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withWithWhere :: Phantoms.TTerm OpenCypher.With -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.With
-withWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.With"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-xorExpression :: Phantoms.TTerm [OpenCypher.AndExpression] -> Phantoms.TTerm OpenCypher.XorExpression
-xorExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.cypher.openCypher.XorExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-yieldItem :: Phantoms.TTerm (Maybe OpenCypher.ProcedureResultField) -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.YieldItem
-yieldItem field variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm field)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-yieldItemField :: Phantoms.TTerm OpenCypher.YieldItem -> Phantoms.TTerm (Maybe OpenCypher.ProcedureResultField)
-yieldItemField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-        Core.projectionField = (Core.Name "field")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-yieldItemVariable :: Phantoms.TTerm OpenCypher.YieldItem -> Phantoms.TTerm OpenCypher.Variable
-yieldItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-yieldItemWithField :: Phantoms.TTerm OpenCypher.YieldItem -> Phantoms.TTerm (Maybe OpenCypher.ProcedureResultField) -> Phantoms.TTerm OpenCypher.YieldItem
-yieldItemWithField original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-yieldItemWithVariable :: Phantoms.TTerm OpenCypher.YieldItem -> Phantoms.TTerm OpenCypher.Variable -> Phantoms.TTerm OpenCypher.YieldItem
-yieldItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItem"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-yieldItems :: Phantoms.TTerm [OpenCypher.YieldItem] -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.YieldItems
-yieldItems items where_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)}]}))
-
-yieldItemsItems :: Phantoms.TTerm OpenCypher.YieldItems -> Phantoms.TTerm [OpenCypher.YieldItem]
-yieldItemsItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-yieldItemsWhere :: Phantoms.TTerm OpenCypher.YieldItems -> Phantoms.TTerm (Maybe OpenCypher.Where)
-yieldItemsWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-yieldItemsWithItems :: Phantoms.TTerm OpenCypher.YieldItems -> Phantoms.TTerm [OpenCypher.YieldItem] -> Phantoms.TTerm OpenCypher.YieldItems
-yieldItemsWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-yieldItemsWithWhere :: Phantoms.TTerm OpenCypher.YieldItems -> Phantoms.TTerm (Maybe OpenCypher.Where) -> Phantoms.TTerm OpenCypher.YieldItems
-yieldItemsWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.cypher.openCypher.YieldItems"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Datalog/Syntax.hs b/src/main/haskell/Hydra/Dsl/Datalog/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Datalog/Syntax.hs
+++ /dev/null
@@ -1,499 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.datalog.syntax
-
-module Hydra.Dsl.Datalog.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Datalog.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-atom :: Phantoms.TTerm Syntax.Relation -> Phantoms.TTerm Syntax.TermList -> Phantoms.TTerm Syntax.Atom
-atom relation termList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Relation"),
-          Core.fieldTerm = (Phantoms.unTTerm relation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TermList"),
-          Core.fieldTerm = (Phantoms.unTTerm termList)}]}))
-
-atomListMultiple :: Phantoms.TTerm Syntax.AtomList_Multiple -> Phantoms.TTerm Syntax.AtomList
-atomListMultiple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.AtomList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomListSingle :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.AtomList
-atomListSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.AtomList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomList_Multiple :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.AtomList -> Phantoms.TTerm Syntax.AtomList_Multiple
-atomList_Multiple atom atomList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Atom"),
-          Core.fieldTerm = (Phantoms.unTTerm atom)},
-        Core.Field {
-          Core.fieldName = (Core.Name "AtomList"),
-          Core.fieldTerm = (Phantoms.unTTerm atomList)}]}))
-
-atomList_MultipleAtom :: Phantoms.TTerm Syntax.AtomList_Multiple -> Phantoms.TTerm Syntax.Atom
-atomList_MultipleAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-        Core.projectionField = (Core.Name "Atom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomList_MultipleAtomList :: Phantoms.TTerm Syntax.AtomList_Multiple -> Phantoms.TTerm Syntax.AtomList
-atomList_MultipleAtomList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-        Core.projectionField = (Core.Name "AtomList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomList_MultipleWithAtom :: Phantoms.TTerm Syntax.AtomList_Multiple -> Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.AtomList_Multiple
-atomList_MultipleWithAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Atom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "AtomList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-              Core.projectionField = (Core.Name "AtomList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomList_MultipleWithAtomList :: Phantoms.TTerm Syntax.AtomList_Multiple -> Phantoms.TTerm Syntax.AtomList -> Phantoms.TTerm Syntax.AtomList_Multiple
-atomList_MultipleWithAtomList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.AtomList_Multiple"),
-              Core.projectionField = (Core.Name "Atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "AtomList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atomRelation :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.Relation
-atomRelation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-        Core.projectionField = (Core.Name "Relation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomTermList :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.TermList
-atomTermList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-        Core.projectionField = (Core.Name "TermList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atomWithRelation :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.Relation -> Phantoms.TTerm Syntax.Atom
-atomWithRelation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Relation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TermList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-              Core.projectionField = (Core.Name "TermList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atomWithTermList :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.TermList -> Phantoms.TTerm Syntax.Atom
-atomWithTermList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Relation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Atom"),
-              Core.projectionField = (Core.Name "Relation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TermList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constant :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Constant
-constant x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.datalog.syntax.Constant"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constantListMultiple :: Phantoms.TTerm Syntax.ConstantList_Multiple -> Phantoms.TTerm Syntax.ConstantList
-constantListMultiple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.ConstantList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constantListSingle :: Phantoms.TTerm Syntax.Constant -> Phantoms.TTerm Syntax.ConstantList
-constantListSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.ConstantList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constantList_Multiple :: Phantoms.TTerm Syntax.Constant -> Phantoms.TTerm Syntax.ConstantList -> Phantoms.TTerm Syntax.ConstantList_Multiple
-constantList_Multiple constant constantList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Constant"),
-          Core.fieldTerm = (Phantoms.unTTerm constant)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ConstantList"),
-          Core.fieldTerm = (Phantoms.unTTerm constantList)}]}))
-
-constantList_MultipleConstant :: Phantoms.TTerm Syntax.ConstantList_Multiple -> Phantoms.TTerm Syntax.Constant
-constantList_MultipleConstant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-        Core.projectionField = (Core.Name "Constant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantList_MultipleConstantList :: Phantoms.TTerm Syntax.ConstantList_Multiple -> Phantoms.TTerm Syntax.ConstantList
-constantList_MultipleConstantList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-        Core.projectionField = (Core.Name "ConstantList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantList_MultipleWithConstant :: Phantoms.TTerm Syntax.ConstantList_Multiple -> Phantoms.TTerm Syntax.Constant -> Phantoms.TTerm Syntax.ConstantList_Multiple
-constantList_MultipleWithConstant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Constant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ConstantList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-              Core.projectionField = (Core.Name "ConstantList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantList_MultipleWithConstantList :: Phantoms.TTerm Syntax.ConstantList_Multiple -> Phantoms.TTerm Syntax.ConstantList -> Phantoms.TTerm Syntax.ConstantList_Multiple
-constantList_MultipleWithConstantList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Constant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.ConstantList_Multiple"),
-              Core.projectionField = (Core.Name "Constant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ConstantList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fact :: Phantoms.TTerm Syntax.Relation -> Phantoms.TTerm Syntax.ConstantList -> Phantoms.TTerm Syntax.Fact
-fact relation constantList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Relation"),
-          Core.fieldTerm = (Phantoms.unTTerm relation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ConstantList"),
-          Core.fieldTerm = (Phantoms.unTTerm constantList)}]}))
-
-factConstantList :: Phantoms.TTerm Syntax.Fact -> Phantoms.TTerm Syntax.ConstantList
-factConstantList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-        Core.projectionField = (Core.Name "ConstantList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-factRelation :: Phantoms.TTerm Syntax.Fact -> Phantoms.TTerm Syntax.Relation
-factRelation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-        Core.projectionField = (Core.Name "Relation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-factWithConstantList :: Phantoms.TTerm Syntax.Fact -> Phantoms.TTerm Syntax.ConstantList -> Phantoms.TTerm Syntax.Fact
-factWithConstantList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Relation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-              Core.projectionField = (Core.Name "Relation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ConstantList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-factWithRelation :: Phantoms.TTerm Syntax.Fact -> Phantoms.TTerm Syntax.Relation -> Phantoms.TTerm Syntax.Fact
-factWithRelation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Relation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ConstantList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Fact"),
-              Core.projectionField = (Core.Name "ConstantList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-program :: Phantoms.TTerm [Syntax.Program_Elmt] -> Phantoms.TTerm Syntax.Program
-program x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.datalog.syntax.Program"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-program_ElmtFact :: Phantoms.TTerm Syntax.Fact -> Phantoms.TTerm Syntax.Program_Elmt
-program_ElmtFact x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.Program_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Fact"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-program_ElmtRule :: Phantoms.TTerm Syntax.Rule -> Phantoms.TTerm Syntax.Program_Elmt
-program_ElmtRule x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.Program_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Rule"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relation :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Relation
-relation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.datalog.syntax.Relation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rule :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.AtomList -> Phantoms.TTerm Syntax.Rule
-rule atom atomList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Atom"),
-          Core.fieldTerm = (Phantoms.unTTerm atom)},
-        Core.Field {
-          Core.fieldName = (Core.Name "AtomList"),
-          Core.fieldTerm = (Phantoms.unTTerm atomList)}]}))
-
-ruleAtom :: Phantoms.TTerm Syntax.Rule -> Phantoms.TTerm Syntax.Atom
-ruleAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-        Core.projectionField = (Core.Name "Atom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ruleAtomList :: Phantoms.TTerm Syntax.Rule -> Phantoms.TTerm Syntax.AtomList
-ruleAtomList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-        Core.projectionField = (Core.Name "AtomList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ruleWithAtom :: Phantoms.TTerm Syntax.Rule -> Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.Rule
-ruleWithAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Atom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "AtomList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-              Core.projectionField = (Core.Name "AtomList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ruleWithAtomList :: Phantoms.TTerm Syntax.Rule -> Phantoms.TTerm Syntax.AtomList -> Phantoms.TTerm Syntax.Rule
-ruleWithAtomList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Atom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.Rule"),
-              Core.projectionField = (Core.Name "Atom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "AtomList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termConstant :: Phantoms.TTerm Syntax.Constant -> Phantoms.TTerm Syntax.Term
-termConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termListMultiple :: Phantoms.TTerm Syntax.TermList_Multiple -> Phantoms.TTerm Syntax.TermList
-termListMultiple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.TermList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termListSingle :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TermList
-termListSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.TermList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-termList_Multiple :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TermList -> Phantoms.TTerm Syntax.TermList_Multiple
-termList_Multiple term termList =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TermList"),
-          Core.fieldTerm = (Phantoms.unTTerm termList)}]}))
-
-termList_MultipleTerm :: Phantoms.TTerm Syntax.TermList_Multiple -> Phantoms.TTerm Syntax.Term
-termList_MultipleTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-        Core.projectionField = (Core.Name "Term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termList_MultipleTermList :: Phantoms.TTerm Syntax.TermList_Multiple -> Phantoms.TTerm Syntax.TermList
-termList_MultipleTermList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-        Core.projectionField = (Core.Name "TermList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termList_MultipleWithTerm :: Phantoms.TTerm Syntax.TermList_Multiple -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TermList_Multiple
-termList_MultipleWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TermList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-              Core.projectionField = (Core.Name "TermList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termList_MultipleWithTermList :: Phantoms.TTerm Syntax.TermList_Multiple -> Phantoms.TTerm Syntax.TermList -> Phantoms.TTerm Syntax.TermList_Multiple
-termList_MultipleWithTermList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.datalog.syntax.TermList_Multiple"),
-              Core.projectionField = (Core.Name "Term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TermList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termVariable :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.Term
-termVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.datalog.syntax.Term"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unConstant :: Phantoms.TTerm Syntax.Constant -> Phantoms.TTerm String
-unConstant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.datalog.syntax.Constant")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unProgram :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.Program_Elmt]
-unProgram x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.datalog.syntax.Program")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRelation :: Phantoms.TTerm Syntax.Relation -> Phantoms.TTerm String
-unRelation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.datalog.syntax.Relation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariable :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm String
-unVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.datalog.syntax.Variable")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variable :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Variable
-variable x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.datalog.syntax.Variable"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Deep/Lib/Math.hs b/src/main/haskell/Hydra/Dsl/Deep/Lib/Math.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Deep/Lib/Math.hs
+++ /dev/null
@@ -1,129 +0,0 @@
--- | Deep term DSL for the hydra.lib.math library.
---
--- These helpers construct Term-valued representations of math primitive
--- applications (TTerm Term), as opposed to the shallow DSL in
--- Hydra.Dsl.Meta.Lib.Math which works at the Haskell value level (TTerm Double, etc.).
-
-module Hydra.Dsl.Deep.Lib.Math where
-
-import Hydra.Kernel
-import qualified Hydra.Dsl.Meta.Core as Core
-import Hydra.Dsl.Meta.Phantoms (encodedName)
-import Hydra.Sources.Libraries
-
-
--- | Apply a unary math primitive to a deep term
-apply1 :: Name -> TTerm Term -> TTerm Term
-apply1 name arg = Core.termApplication $ Core.application (Core.termVariable $ encodedName name) arg
-
--- | Apply a binary math primitive to two deep terms
-apply2 :: Name -> TTerm Term -> TTerm Term -> TTerm Term
-apply2 name a b = Core.termApplication $ Core.application
-  (Core.termApplication $ Core.application (Core.termVariable $ encodedName name) a)
-  b
-
--- | Reference a math primitive as a deep term (for use as a first-class value)
-ref :: Name -> TTerm Term
-ref name = Core.termVariable $ encodedName name
-
-
--- Unary functions
-
-abs :: TTerm Term -> TTerm Term
-abs = apply1 _math_abs
-
-acos :: TTerm Term -> TTerm Term
-acos = apply1 _math_acos
-
-acosh :: TTerm Term -> TTerm Term
-acosh = apply1 _math_acosh
-
-asin :: TTerm Term -> TTerm Term
-asin = apply1 _math_asin
-
-asinh :: TTerm Term -> TTerm Term
-asinh = apply1 _math_asinh
-
-atan :: TTerm Term -> TTerm Term
-atan = apply1 _math_atan
-
-atanh :: TTerm Term -> TTerm Term
-atanh = apply1 _math_atanh
-
-ceiling :: TTerm Term -> TTerm Term
-ceiling = apply1 _math_ceiling
-
-cos :: TTerm Term -> TTerm Term
-cos = apply1 _math_cos
-
-cosh :: TTerm Term -> TTerm Term
-cosh = apply1 _math_cosh
-
-exp :: TTerm Term -> TTerm Term
-exp = apply1 _math_exp
-
-floor :: TTerm Term -> TTerm Term
-floor = apply1 _math_floor
-
-log :: TTerm Term -> TTerm Term
-log = apply1 _math_log
-
-negate :: TTerm Term -> TTerm Term
-negate = apply1 _math_negate
-
-negateFloat64 :: TTerm Term -> TTerm Term
-negateFloat64 = apply1 _math_negateFloat64
-
-round :: TTerm Term -> TTerm Term
-round = apply1 _math_round
-
-signum :: TTerm Term -> TTerm Term
-signum = apply1 _math_signum
-
-sin :: TTerm Term -> TTerm Term
-sin = apply1 _math_sin
-
-sinh :: TTerm Term -> TTerm Term
-sinh = apply1 _math_sinh
-
-sqrt :: TTerm Term -> TTerm Term
-sqrt = apply1 _math_sqrt
-
-tan :: TTerm Term -> TTerm Term
-tan = apply1 _math_tan
-
-tanh :: TTerm Term -> TTerm Term
-tanh = apply1 _math_tanh
-
-truncate :: TTerm Term -> TTerm Term
-truncate = apply1 _math_truncate
-
-
--- Binary functions
-
-add :: TTerm Term -> TTerm Term -> TTerm Term
-add = apply2 _math_add
-
-addFloat64 :: TTerm Term -> TTerm Term -> TTerm Term
-addFloat64 = apply2 _math_addFloat64
-
-atan2 :: TTerm Term -> TTerm Term -> TTerm Term
-atan2 = apply2 _math_atan2
-
-logBase :: TTerm Term -> TTerm Term -> TTerm Term
-logBase = apply2 _math_logBase
-
-mul :: TTerm Term -> TTerm Term -> TTerm Term
-mul = apply2 _math_mul
-
-mulFloat64 :: TTerm Term -> TTerm Term -> TTerm Term
-mulFloat64 = apply2 _math_mulFloat64
-
-pow :: TTerm Term -> TTerm Term -> TTerm Term
-pow = apply2 _math_pow
-
-sub :: TTerm Term -> TTerm Term -> TTerm Term
-sub = apply2 _math_sub
-
-subFloat64 :: TTerm Term -> TTerm Term -> TTerm Term
-subFloat64 = apply2 _math_subFloat64
diff --git a/src/main/haskell/Hydra/Dsl/Delta/Parquet.hs b/src/main/haskell/Hydra/Dsl/Delta/Parquet.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Delta/Parquet.hs
+++ /dev/null
@@ -1,501 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.delta.parquet
-
-module Hydra.Dsl.Delta.Parquet where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Delta.Parquet as Parquet
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-arrayType :: Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Bool -> Phantoms.TTerm Parquet.ArrayType
-arrayType elementType containsNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "containsNull"),
-          Core.fieldTerm = (Phantoms.unTTerm containsNull)}]}))
-
-arrayTypeContainsNull :: Phantoms.TTerm Parquet.ArrayType -> Phantoms.TTerm Bool
-arrayTypeContainsNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-        Core.projectionField = (Core.Name "containsNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeElementType :: Phantoms.TTerm Parquet.ArrayType -> Phantoms.TTerm Parquet.DataType
-arrayTypeElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeWithContainsNull :: Phantoms.TTerm Parquet.ArrayType -> Phantoms.TTerm Bool -> Phantoms.TTerm Parquet.ArrayType
-arrayTypeWithContainsNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "containsNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayTypeWithElementType :: Phantoms.TTerm Parquet.ArrayType -> Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Parquet.ArrayType
-arrayTypeWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "containsNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.ArrayType"),
-              Core.projectionField = (Core.Name "containsNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-basePrimitiveTypeBinary :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeBinary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeBoolean :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeByte :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeByte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeDate :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeDate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeDouble :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeFloat :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeInteger :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeLong :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeShort :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeShort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeString :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-basePrimitiveTypeTimestamp :: Phantoms.TTerm Parquet.BasePrimitiveType
-basePrimitiveTypeTimestamp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.BasePrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timestamp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dataTypeArray :: Phantoms.TTerm Parquet.ArrayType -> Phantoms.TTerm Parquet.DataType
-dataTypeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeBase :: Phantoms.TTerm Parquet.BasePrimitiveType -> Phantoms.TTerm Parquet.DataType
-dataTypeBase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "base"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeDecimal :: Phantoms.TTerm Parquet.DecimalType -> Phantoms.TTerm Parquet.DataType
-dataTypeDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeMap :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Parquet.DataType
-dataTypeMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeStruct :: Phantoms.TTerm Parquet.StructType -> Phantoms.TTerm Parquet.DataType
-dataTypeStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.delta.parquet.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-decimalType :: Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Parquet.DecimalType
-decimalType precision scale =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Phantoms.unTTerm scale)}]}))
-
-decimalTypePrecision :: Phantoms.TTerm Parquet.DecimalType -> Phantoms.TTerm Int
-decimalTypePrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decimalTypeScale :: Phantoms.TTerm Parquet.DecimalType -> Phantoms.TTerm Int
-decimalTypeScale x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-        Core.projectionField = (Core.Name "scale")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decimalTypeWithPrecision :: Phantoms.TTerm Parquet.DecimalType -> Phantoms.TTerm Int -> Phantoms.TTerm Parquet.DecimalType
-decimalTypeWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-              Core.projectionField = (Core.Name "scale")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decimalTypeWithScale :: Phantoms.TTerm Parquet.DecimalType -> Phantoms.TTerm Int -> Phantoms.TTerm Parquet.DecimalType
-decimalTypeWithScale original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.DecimalType"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapType :: Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Bool -> Phantoms.TTerm Parquet.MapType
-mapType keyType valueType valueContainsNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm keyType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueContainsNull"),
-          Core.fieldTerm = (Phantoms.unTTerm valueContainsNull)}]}))
-
-mapTypeKeyType :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Parquet.DataType
-mapTypeKeyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-        Core.projectionField = (Core.Name "keyType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeValueContainsNull :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Bool
-mapTypeValueContainsNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-        Core.projectionField = (Core.Name "valueContainsNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeValueType :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Parquet.DataType
-mapTypeValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeWithKeyType :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Parquet.MapType
-mapTypeWithKeyType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueContainsNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-              Core.projectionField = (Core.Name "valueContainsNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapTypeWithValueContainsNull :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Bool -> Phantoms.TTerm Parquet.MapType
-mapTypeWithValueContainsNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueContainsNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapTypeWithValueType :: Phantoms.TTerm Parquet.MapType -> Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Parquet.MapType
-mapTypeWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueContainsNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.MapType"),
-              Core.projectionField = (Core.Name "valueContainsNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structField :: Phantoms.TTerm String -> Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Bool -> Phantoms.TTerm Parquet.StructField
-structField name dataType nullable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataType"),
-          Core.fieldTerm = (Phantoms.unTTerm dataType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullable"),
-          Core.fieldTerm = (Phantoms.unTTerm nullable)}]}))
-
-structFieldDataType :: Phantoms.TTerm Parquet.StructField -> Phantoms.TTerm Parquet.DataType
-structFieldDataType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-        Core.projectionField = (Core.Name "dataType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldName :: Phantoms.TTerm Parquet.StructField -> Phantoms.TTerm String
-structFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldNullable :: Phantoms.TTerm Parquet.StructField -> Phantoms.TTerm Bool
-structFieldNullable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-        Core.projectionField = (Core.Name "nullable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldWithDataType :: Phantoms.TTerm Parquet.StructField -> Phantoms.TTerm Parquet.DataType -> Phantoms.TTerm Parquet.StructField
-structFieldWithDataType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-              Core.projectionField = (Core.Name "nullable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structFieldWithName :: Phantoms.TTerm Parquet.StructField -> Phantoms.TTerm String -> Phantoms.TTerm Parquet.StructField
-structFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-              Core.projectionField = (Core.Name "dataType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-              Core.projectionField = (Core.Name "nullable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structFieldWithNullable :: Phantoms.TTerm Parquet.StructField -> Phantoms.TTerm Bool -> Phantoms.TTerm Parquet.StructField
-structFieldWithNullable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructField"),
-              Core.projectionField = (Core.Name "dataType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structType :: Phantoms.TTerm [Parquet.StructField] -> Phantoms.TTerm Parquet.StructType
-structType fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.StructType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-
-structTypeFields :: Phantoms.TTerm Parquet.StructType -> Phantoms.TTerm [Parquet.StructField]
-structTypeFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.delta.parquet.StructType"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structTypeWithFields :: Phantoms.TTerm Parquet.StructType -> Phantoms.TTerm [Parquet.StructField] -> Phantoms.TTerm Parquet.StructType
-structTypeWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.delta.parquet.StructType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Error/Checking.hs b/src/main/haskell/Hydra/Dsl/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Error/Checking.hs
+++ /dev/null
@@ -1,747 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.error.checking
-
-module Hydra.Dsl.Error.Checking where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Typing as Typing
-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.Set as S
-checkingErrorIncorrectUnification :: Phantoms.TTerm Checking.IncorrectUnificationError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorIncorrectUnification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "incorrectUnification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorNotAForallType :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorNotAForallType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notAForallType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorNotAFunctionType :: Phantoms.TTerm Checking.NotAFunctionTypeError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorNotAFunctionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notAFunctionType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorOther :: Phantoms.TTerm Checking.OtherCheckingError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorTypeArityMismatch :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorTypeArityMismatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeArityMismatch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorTypeMismatch :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorTypeMismatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeMismatch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUnboundTypeVariables :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUnboundTypeVariables x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unboundTypeVariables"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUndefinedTermVariable :: Phantoms.TTerm Checking.UndefinedTermVariableCheckingError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUndefinedTermVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTermVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUnequalTypes :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUnequalTypes x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unequalTypes"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUnsupportedTermVariant :: Phantoms.TTerm Checking.UnsupportedTermVariantError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUnsupportedTermVariant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsupportedTermVariant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUntypedLambda :: Phantoms.TTerm Checking.UntypedLambdaError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUntypedLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "untypedLambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUntypedLetBinding :: Phantoms.TTerm Checking.UntypedLetBindingError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUntypedLetBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "untypedLetBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-checkingErrorUntypedTermVariable :: Phantoms.TTerm Checking.UntypedTermVariableCheckingError -> Phantoms.TTerm Checking.CheckingError
-checkingErrorUntypedTermVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "untypedTermVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-incorrectUnificationError :: Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm Checking.IncorrectUnificationError
-incorrectUnificationError substitution =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "substitution"),
-          Core.fieldTerm = (Phantoms.unTTerm substitution)}]}))
-incorrectUnificationErrorSubstitution :: Phantoms.TTerm Checking.IncorrectUnificationError -> Phantoms.TTerm Typing.TypeSubst
-incorrectUnificationErrorSubstitution x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),
-        Core.projectionField = (Core.Name "substitution")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-incorrectUnificationErrorWithSubstitution :: Phantoms.TTerm Checking.IncorrectUnificationError -> Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm Checking.IncorrectUnificationError
-incorrectUnificationErrorWithSubstitution original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "substitution"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-notAForallTypeError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.NotAForallTypeError
-notAForallTypeError type_ typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-notAForallTypeErrorType :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm Core.Type
-notAForallTypeErrorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-notAForallTypeErrorTypeArguments :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm [Core.Type]
-notAForallTypeErrorTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-notAForallTypeErrorWithType :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.NotAForallTypeError
-notAForallTypeErrorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-notAForallTypeErrorWithTypeArguments :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.NotAForallTypeError
-notAForallTypeErrorWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-notAFunctionTypeError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.NotAFunctionTypeError
-notAFunctionTypeError type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-notAFunctionTypeErrorType :: Phantoms.TTerm Checking.NotAFunctionTypeError -> Phantoms.TTerm Core.Type
-notAFunctionTypeErrorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-notAFunctionTypeErrorWithType :: Phantoms.TTerm Checking.NotAFunctionTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.NotAFunctionTypeError
-notAFunctionTypeErrorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-otherCheckingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm String -> Phantoms.TTerm Checking.OtherCheckingError
-otherCheckingError path message =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)}]}))
-otherCheckingErrorMessage :: Phantoms.TTerm Checking.OtherCheckingError -> Phantoms.TTerm String
-otherCheckingErrorMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-otherCheckingErrorPath :: Phantoms.TTerm Checking.OtherCheckingError -> Phantoms.TTerm Paths.SubtermPath
-otherCheckingErrorPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-otherCheckingErrorWithMessage :: Phantoms.TTerm Checking.OtherCheckingError -> Phantoms.TTerm String -> Phantoms.TTerm Checking.OtherCheckingError
-otherCheckingErrorWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-otherCheckingErrorWithPath :: Phantoms.TTerm Checking.OtherCheckingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Checking.OtherCheckingError
-otherCheckingErrorWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeArityMismatchError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.TypeArityMismatchError
-typeArityMismatchError type_ expectedArity actualArity typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedArity"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedArity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualArity"),
-          Core.fieldTerm = (Phantoms.unTTerm actualArity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-typeArityMismatchErrorActualArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int
-typeArityMismatchErrorActualArity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-        Core.projectionField = (Core.Name "actualArity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeArityMismatchErrorExpectedArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int
-typeArityMismatchErrorExpectedArity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-        Core.projectionField = (Core.Name "expectedArity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeArityMismatchErrorType :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Core.Type
-typeArityMismatchErrorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeArityMismatchErrorTypeArguments :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm [Core.Type]
-typeArityMismatchErrorTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeArityMismatchErrorWithActualArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int -> Phantoms.TTerm Checking.TypeArityMismatchError
-typeArityMismatchErrorWithActualArity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedArity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "expectedArity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualArity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeArityMismatchErrorWithExpectedArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int -> Phantoms.TTerm Checking.TypeArityMismatchError
-typeArityMismatchErrorWithExpectedArity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedArity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualArity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "actualArity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeArityMismatchErrorWithType :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeArityMismatchError
-typeArityMismatchErrorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedArity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "expectedArity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualArity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "actualArity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeArityMismatchErrorWithTypeArguments :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.TypeArityMismatchError
-typeArityMismatchErrorWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedArity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "expectedArity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualArity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-              Core.projectionField = (Core.Name "actualArity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeMismatchError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeMismatchError
-typeMismatchError expectedType actualType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (Phantoms.unTTerm actualType)}]}))
-typeMismatchErrorActualType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type
-typeMismatchErrorActualType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-        Core.projectionField = (Core.Name "actualType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeMismatchErrorExpectedType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type
-typeMismatchErrorExpectedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-        Core.projectionField = (Core.Name "expectedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeMismatchErrorWithActualType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeMismatchError
-typeMismatchErrorWithActualType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-              Core.projectionField = (Core.Name "expectedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeMismatchErrorWithExpectedType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeMismatchError
-typeMismatchErrorWithExpectedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-              Core.projectionField = (Core.Name "actualType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unboundTypeVariablesError :: Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.UnboundTypeVariablesError
-unboundTypeVariablesError variables type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm variables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-unboundTypeVariablesErrorType :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm Core.Type
-unboundTypeVariablesErrorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unboundTypeVariablesErrorVariables :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm (S.Set Core.Name)
-unboundTypeVariablesErrorVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-        Core.projectionField = (Core.Name "variables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unboundTypeVariablesErrorWithType :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.UnboundTypeVariablesError
-unboundTypeVariablesErrorWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unboundTypeVariablesErrorWithVariables :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Checking.UnboundTypeVariablesError
-unboundTypeVariablesErrorWithVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedTermVariableCheckingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Checking.UndefinedTermVariableCheckingError
-undefinedTermVariableCheckingError path name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-undefinedTermVariableCheckingErrorName :: Phantoms.TTerm Checking.UndefinedTermVariableCheckingError -> Phantoms.TTerm Core.Name
-undefinedTermVariableCheckingErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTermVariableCheckingErrorPath :: Phantoms.TTerm Checking.UndefinedTermVariableCheckingError -> Phantoms.TTerm Paths.SubtermPath
-undefinedTermVariableCheckingErrorPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTermVariableCheckingErrorWithName :: Phantoms.TTerm Checking.UndefinedTermVariableCheckingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Checking.UndefinedTermVariableCheckingError
-undefinedTermVariableCheckingErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedTermVariableCheckingErrorWithPath :: Phantoms.TTerm Checking.UndefinedTermVariableCheckingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Checking.UndefinedTermVariableCheckingError
-undefinedTermVariableCheckingErrorWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unequalTypesError :: Phantoms.TTerm [Core.Type] -> Phantoms.TTerm String -> Phantoms.TTerm Checking.UnequalTypesError
-unequalTypesError types description =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)}]}))
-unequalTypesErrorDescription :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm String
-unequalTypesErrorDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unequalTypesErrorTypes :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm [Core.Type]
-unequalTypesErrorTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unequalTypesErrorWithDescription :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm String -> Phantoms.TTerm Checking.UnequalTypesError
-unequalTypesErrorWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unequalTypesErrorWithTypes :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.UnequalTypesError
-unequalTypesErrorWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unsupportedTermVariantError :: Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Checking.UnsupportedTermVariantError
-unsupportedTermVariantError termVariant =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariant"),
-          Core.fieldTerm = (Phantoms.unTTerm termVariant)}]}))
-unsupportedTermVariantErrorTermVariant :: Phantoms.TTerm Checking.UnsupportedTermVariantError -> Phantoms.TTerm Variants.TermVariant
-unsupportedTermVariantErrorTermVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),
-        Core.projectionField = (Core.Name "termVariant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unsupportedTermVariantErrorWithTermVariant :: Phantoms.TTerm Checking.UnsupportedTermVariantError -> Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Checking.UnsupportedTermVariantError
-unsupportedTermVariantErrorWithTermVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-untypedLambdaError :: Phantoms.TTerm Checking.UntypedLambdaError
-untypedLambdaError =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLambdaError"),
-      Core.recordFields = []}))
-untypedLetBindingError :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Checking.UntypedLetBindingError
-untypedLetBindingError binding =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm binding)}]}))
-untypedLetBindingErrorBinding :: Phantoms.TTerm Checking.UntypedLetBindingError -> Phantoms.TTerm Core.Binding
-untypedLetBindingErrorBinding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),
-        Core.projectionField = (Core.Name "binding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-untypedLetBindingErrorWithBinding :: Phantoms.TTerm Checking.UntypedLetBindingError -> Phantoms.TTerm Core.Binding -> Phantoms.TTerm Checking.UntypedLetBindingError
-untypedLetBindingErrorWithBinding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-untypedTermVariableCheckingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Checking.UntypedTermVariableCheckingError
-untypedTermVariableCheckingError path name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-untypedTermVariableCheckingErrorName :: Phantoms.TTerm Checking.UntypedTermVariableCheckingError -> Phantoms.TTerm Core.Name
-untypedTermVariableCheckingErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-untypedTermVariableCheckingErrorPath :: Phantoms.TTerm Checking.UntypedTermVariableCheckingError -> Phantoms.TTerm Paths.SubtermPath
-untypedTermVariableCheckingErrorPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-untypedTermVariableCheckingErrorWithName :: Phantoms.TTerm Checking.UntypedTermVariableCheckingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Checking.UntypedTermVariableCheckingError
-untypedTermVariableCheckingErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-untypedTermVariableCheckingErrorWithPath :: Phantoms.TTerm Checking.UntypedTermVariableCheckingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Checking.UntypedTermVariableCheckingError
-untypedTermVariableCheckingErrorWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Error/Core.hs b/src/main/haskell/Hydra/Dsl/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Error/Core.hs
+++ /dev/null
@@ -1,2088 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.error.core
-
-module Hydra.Dsl.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-constantConditionError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Bool -> Phantoms.TTerm ErrorCore.ConstantConditionError
-constantConditionError location value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-constantConditionErrorLocation :: Phantoms.TTerm ErrorCore.ConstantConditionError -> Phantoms.TTerm Paths.SubtermPath
-constantConditionErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-constantConditionErrorValue :: Phantoms.TTerm ErrorCore.ConstantConditionError -> Phantoms.TTerm Bool
-constantConditionErrorValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-constantConditionErrorWithLocation :: Phantoms.TTerm ErrorCore.ConstantConditionError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.ConstantConditionError
-constantConditionErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.error.core.ConstantConditionError"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-constantConditionErrorWithValue :: Phantoms.TTerm ErrorCore.ConstantConditionError -> Phantoms.TTerm Bool -> Phantoms.TTerm ErrorCore.ConstantConditionError
-constantConditionErrorWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-duplicateBindingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateBindingError
-duplicateBindingError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-duplicateBindingErrorLocation :: Phantoms.TTerm ErrorCore.DuplicateBindingError -> Phantoms.TTerm Paths.SubtermPath
-duplicateBindingErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateBindingErrorName :: Phantoms.TTerm ErrorCore.DuplicateBindingError -> Phantoms.TTerm Core.Name
-duplicateBindingErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateBindingErrorWithLocation :: Phantoms.TTerm ErrorCore.DuplicateBindingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.DuplicateBindingError
-duplicateBindingErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-duplicateBindingErrorWithName :: Phantoms.TTerm ErrorCore.DuplicateBindingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateBindingError
-duplicateBindingErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-duplicateFieldError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateFieldError
-duplicateFieldError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-duplicateFieldErrorLocation :: Phantoms.TTerm ErrorCore.DuplicateFieldError -> Phantoms.TTerm Paths.SubtermPath
-duplicateFieldErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateFieldErrorName :: Phantoms.TTerm ErrorCore.DuplicateFieldError -> Phantoms.TTerm Core.Name
-duplicateFieldErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateFieldErrorWithLocation :: Phantoms.TTerm ErrorCore.DuplicateFieldError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.DuplicateFieldError
-duplicateFieldErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-duplicateFieldErrorWithName :: Phantoms.TTerm ErrorCore.DuplicateFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateFieldError
-duplicateFieldErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-duplicateRecordTypeFieldNamesError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError
-duplicateRecordTypeFieldNamesError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-duplicateRecordTypeFieldNamesErrorLocation :: Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath
-duplicateRecordTypeFieldNamesErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateRecordTypeFieldNamesErrorName :: Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Core.Name
-duplicateRecordTypeFieldNamesErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateRecordTypeFieldNamesErrorWithLocation :: Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError
-duplicateRecordTypeFieldNamesErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-duplicateRecordTypeFieldNamesErrorWithName :: Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError
-duplicateRecordTypeFieldNamesErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-duplicateUnionTypeFieldNamesError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError
-duplicateUnionTypeFieldNamesError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-duplicateUnionTypeFieldNamesErrorLocation :: Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath
-duplicateUnionTypeFieldNamesErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateUnionTypeFieldNamesErrorName :: Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Core.Name
-duplicateUnionTypeFieldNamesErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateUnionTypeFieldNamesErrorWithLocation :: Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError
-duplicateUnionTypeFieldNamesErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-duplicateUnionTypeFieldNamesErrorWithName :: Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError
-duplicateUnionTypeFieldNamesErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyCaseStatementError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.EmptyCaseStatementError
-emptyCaseStatementError location typeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))
-emptyCaseStatementErrorLocation :: Phantoms.TTerm ErrorCore.EmptyCaseStatementError -> Phantoms.TTerm Paths.SubtermPath
-emptyCaseStatementErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyCaseStatementErrorTypeName :: Phantoms.TTerm ErrorCore.EmptyCaseStatementError -> Phantoms.TTerm Core.Name
-emptyCaseStatementErrorTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyCaseStatementErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyCaseStatementError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyCaseStatementError
-emptyCaseStatementErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-emptyCaseStatementErrorWithTypeName :: Phantoms.TTerm ErrorCore.EmptyCaseStatementError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.EmptyCaseStatementError
-emptyCaseStatementErrorWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyLetBindingsError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyLetBindingsError
-emptyLetBindingsError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-emptyLetBindingsErrorLocation :: Phantoms.TTerm ErrorCore.EmptyLetBindingsError -> Phantoms.TTerm Paths.SubtermPath
-emptyLetBindingsErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyLetBindingsErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyLetBindingsError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyLetBindingsError
-emptyLetBindingsErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyRecordTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyRecordTypeError
-emptyRecordTypeError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-emptyRecordTypeErrorLocation :: Phantoms.TTerm ErrorCore.EmptyRecordTypeError -> Phantoms.TTerm Paths.SubtermPath
-emptyRecordTypeErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyRecordTypeErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyRecordTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyRecordTypeError
-emptyRecordTypeErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyTermAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyTermAnnotationError
-emptyTermAnnotationError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-emptyTermAnnotationErrorLocation :: Phantoms.TTerm ErrorCore.EmptyTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath
-emptyTermAnnotationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyTermAnnotationErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyTermAnnotationError
-emptyTermAnnotationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyTypeAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyTypeAnnotationError
-emptyTypeAnnotationError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-emptyTypeAnnotationErrorLocation :: Phantoms.TTerm ErrorCore.EmptyTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath
-emptyTypeAnnotationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyTypeAnnotationErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyTypeAnnotationError
-emptyTypeAnnotationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyTypeNameInTermError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyTypeNameInTermError
-emptyTypeNameInTermError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-emptyTypeNameInTermErrorLocation :: Phantoms.TTerm ErrorCore.EmptyTypeNameInTermError -> Phantoms.TTerm Paths.SubtermPath
-emptyTypeNameInTermErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyTypeNameInTermErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyTypeNameInTermError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyTypeNameInTermError
-emptyTypeNameInTermErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-emptyUnionTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyUnionTypeError
-emptyUnionTypeError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-emptyUnionTypeErrorLocation :: Phantoms.TTerm ErrorCore.EmptyUnionTypeError -> Phantoms.TTerm Paths.SubtermPath
-emptyUnionTypeErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-emptyUnionTypeErrorWithLocation :: Phantoms.TTerm ErrorCore.EmptyUnionTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.EmptyUnionTypeError
-emptyUnionTypeErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-invalidForallParameterNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidForallParameterNameError
-invalidForallParameterNameError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-invalidForallParameterNameErrorLocation :: Phantoms.TTerm ErrorCore.InvalidForallParameterNameError -> Phantoms.TTerm Paths.SubtermPath
-invalidForallParameterNameErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidForallParameterNameErrorName :: Phantoms.TTerm ErrorCore.InvalidForallParameterNameError -> Phantoms.TTerm Core.Name
-invalidForallParameterNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidForallParameterNameErrorWithLocation :: Phantoms.TTerm ErrorCore.InvalidForallParameterNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.InvalidForallParameterNameError
-invalidForallParameterNameErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-invalidForallParameterNameErrorWithName :: Phantoms.TTerm ErrorCore.InvalidForallParameterNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidForallParameterNameError
-invalidForallParameterNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-invalidLambdaParameterNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError
-invalidLambdaParameterNameError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-invalidLambdaParameterNameErrorLocation :: Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath
-invalidLambdaParameterNameErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidLambdaParameterNameErrorName :: Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError -> Phantoms.TTerm Core.Name
-invalidLambdaParameterNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidLambdaParameterNameErrorWithLocation :: Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError
-invalidLambdaParameterNameErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-invalidLambdaParameterNameErrorWithName :: Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError
-invalidLambdaParameterNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-invalidLetBindingNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidLetBindingNameError
-invalidLetBindingNameError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-invalidLetBindingNameErrorLocation :: Phantoms.TTerm ErrorCore.InvalidLetBindingNameError -> Phantoms.TTerm Paths.SubtermPath
-invalidLetBindingNameErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidLetBindingNameErrorName :: Phantoms.TTerm ErrorCore.InvalidLetBindingNameError -> Phantoms.TTerm Core.Name
-invalidLetBindingNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidLetBindingNameErrorWithLocation :: Phantoms.TTerm ErrorCore.InvalidLetBindingNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.InvalidLetBindingNameError
-invalidLetBindingNameErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-invalidLetBindingNameErrorWithName :: Phantoms.TTerm ErrorCore.InvalidLetBindingNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidLetBindingNameError
-invalidLetBindingNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-invalidTermErrorConstantCondition :: Phantoms.TTerm ErrorCore.ConstantConditionError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorConstantCondition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constantCondition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorDuplicateBinding :: Phantoms.TTerm ErrorCore.DuplicateBindingError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorDuplicateBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorDuplicateField :: Phantoms.TTerm ErrorCore.DuplicateFieldError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorDuplicateField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorEmptyCaseStatement :: Phantoms.TTerm ErrorCore.EmptyCaseStatementError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorEmptyCaseStatement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyCaseStatement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorEmptyLetBindings :: Phantoms.TTerm ErrorCore.EmptyLetBindingsError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorEmptyLetBindings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyLetBindings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorEmptyTermAnnotation :: Phantoms.TTerm ErrorCore.EmptyTermAnnotationError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorEmptyTermAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyTermAnnotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorEmptyTypeNameInTerm :: Phantoms.TTerm ErrorCore.EmptyTypeNameInTermError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorEmptyTypeNameInTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyTypeNameInTerm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorInvalidLambdaParameterName :: Phantoms.TTerm ErrorCore.InvalidLambdaParameterNameError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorInvalidLambdaParameterName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidLambdaParameterName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorInvalidLetBindingName :: Phantoms.TTerm ErrorCore.InvalidLetBindingNameError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorInvalidLetBindingName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidLetBindingName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorInvalidTypeLambdaParameterName :: Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorInvalidTypeLambdaParameterName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidTypeLambdaParameterName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorNestedTermAnnotation :: Phantoms.TTerm ErrorCore.NestedTermAnnotationError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorNestedTermAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nestedTermAnnotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorRedundantWrapUnwrap :: Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorRedundantWrapUnwrap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "redundantWrapUnwrap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorSelfApplication :: Phantoms.TTerm ErrorCore.SelfApplicationError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorSelfApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "selfApplication"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorTermVariableShadowing :: Phantoms.TTerm ErrorCore.TermVariableShadowingError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorTermVariableShadowing x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "termVariableShadowing"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorTypeVariableShadowingInTypeLambda :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorTypeVariableShadowingInTypeLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeVariableShadowingInTypeLambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUndefinedTermVariable :: Phantoms.TTerm ErrorCore.UndefinedTermVariableError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUndefinedTermVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTermVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUndefinedTypeVariableInBindingType :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUndefinedTypeVariableInBindingType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTypeVariableInBindingType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUndefinedTypeVariableInLambdaDomain :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUndefinedTypeVariableInLambdaDomain x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTypeVariableInLambdaDomain"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUndefinedTypeVariableInTypeApplication :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUndefinedTypeVariableInTypeApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTypeVariableInTypeApplication"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUnknownPrimitiveName :: Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUnknownPrimitiveName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unknownPrimitiveName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUnnecessaryIdentityApplication :: Phantoms.TTerm ErrorCore.UnnecessaryIdentityApplicationError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUnnecessaryIdentityApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unnecessaryIdentityApplication"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTermErrorUntypedTermVariable :: Phantoms.TTerm ErrorCore.UntypedTermVariableError -> Phantoms.TTerm ErrorCore.InvalidTermError
-invalidTermErrorUntypedTermVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "untypedTermVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorDuplicateRecordTypeFieldNames :: Phantoms.TTerm ErrorCore.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorDuplicateRecordTypeFieldNames x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateRecordTypeFieldNames"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorDuplicateUnionTypeFieldNames :: Phantoms.TTerm ErrorCore.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorDuplicateUnionTypeFieldNames x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateUnionTypeFieldNames"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorEmptyRecordType :: Phantoms.TTerm ErrorCore.EmptyRecordTypeError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorEmptyRecordType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyRecordType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorEmptyTypeAnnotation :: Phantoms.TTerm ErrorCore.EmptyTypeAnnotationError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorEmptyTypeAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyTypeAnnotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorEmptyUnionType :: Phantoms.TTerm ErrorCore.EmptyUnionTypeError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorEmptyUnionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyUnionType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorInvalidForallParameterName :: Phantoms.TTerm ErrorCore.InvalidForallParameterNameError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorInvalidForallParameterName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidForallParameterName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorInvalidTypeSchemeVariableName :: Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorInvalidTypeSchemeVariableName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidTypeSchemeVariableName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorNestedTypeAnnotation :: Phantoms.TTerm ErrorCore.NestedTypeAnnotationError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorNestedTypeAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nestedTypeAnnotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorNonComparableMapKeyType :: Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorNonComparableMapKeyType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonComparableMapKeyType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorNonComparableSetElementType :: Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorNonComparableSetElementType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonComparableSetElementType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorSingleVariantUnion :: Phantoms.TTerm ErrorCore.SingleVariantUnionError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorSingleVariantUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singleVariantUnion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorTypeVariableShadowingInForall :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorTypeVariableShadowingInForall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeVariableShadowingInForall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorUndefinedTypeVariable :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorUndefinedTypeVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTypeVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeErrorVoidInNonBottomPosition :: Phantoms.TTerm ErrorCore.VoidInNonBottomPositionError -> Phantoms.TTerm ErrorCore.InvalidTypeError
-invalidTypeErrorVoidInNonBottomPosition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "voidInNonBottomPosition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidTypeLambdaParameterNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError
-invalidTypeLambdaParameterNameError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-invalidTypeLambdaParameterNameErrorLocation :: Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath
-invalidTypeLambdaParameterNameErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidTypeLambdaParameterNameErrorName :: Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Core.Name
-invalidTypeLambdaParameterNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidTypeLambdaParameterNameErrorWithLocation :: Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError
-invalidTypeLambdaParameterNameErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-invalidTypeLambdaParameterNameErrorWithName :: Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidTypeLambdaParameterNameError
-invalidTypeLambdaParameterNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-invalidTypeSchemeVariableNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError
-invalidTypeSchemeVariableNameError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-invalidTypeSchemeVariableNameErrorLocation :: Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Paths.SubtermPath
-invalidTypeSchemeVariableNameErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidTypeSchemeVariableNameErrorName :: Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Core.Name
-invalidTypeSchemeVariableNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-invalidTypeSchemeVariableNameErrorWithLocation :: Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError
-invalidTypeSchemeVariableNameErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-invalidTypeSchemeVariableNameErrorWithName :: Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.InvalidTypeSchemeVariableNameError
-invalidTypeSchemeVariableNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-nestedTermAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.NestedTermAnnotationError
-nestedTermAnnotationError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-nestedTermAnnotationErrorLocation :: Phantoms.TTerm ErrorCore.NestedTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath
-nestedTermAnnotationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-nestedTermAnnotationErrorWithLocation :: Phantoms.TTerm ErrorCore.NestedTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.NestedTermAnnotationError
-nestedTermAnnotationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-nestedTypeAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.NestedTypeAnnotationError
-nestedTypeAnnotationError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-nestedTypeAnnotationErrorLocation :: Phantoms.TTerm ErrorCore.NestedTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath
-nestedTypeAnnotationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-nestedTypeAnnotationErrorWithLocation :: Phantoms.TTerm ErrorCore.NestedTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.NestedTypeAnnotationError
-nestedTypeAnnotationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-nonComparableMapKeyTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Type -> Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError
-nonComparableMapKeyTypeError location keyType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm keyType)}]}))
-nonComparableMapKeyTypeErrorKeyType :: Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError -> Phantoms.TTerm Core.Type
-nonComparableMapKeyTypeErrorKeyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-        Core.projectionField = (Core.Name "keyType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-nonComparableMapKeyTypeErrorLocation :: Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError -> Phantoms.TTerm Paths.SubtermPath
-nonComparableMapKeyTypeErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-nonComparableMapKeyTypeErrorWithKeyType :: Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError
-nonComparableMapKeyTypeErrorWithKeyType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-nonComparableMapKeyTypeErrorWithLocation :: Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.NonComparableMapKeyTypeError
-nonComparableMapKeyTypeErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-              Core.projectionField = (Core.Name "keyType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-nonComparableSetElementTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Type -> Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError
-nonComparableSetElementTypeError location elementType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm elementType)}]}))
-nonComparableSetElementTypeErrorElementType :: Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError -> Phantoms.TTerm Core.Type
-nonComparableSetElementTypeErrorElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-        Core.projectionField = (Core.Name "elementType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-nonComparableSetElementTypeErrorLocation :: Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError -> Phantoms.TTerm Paths.SubtermPath
-nonComparableSetElementTypeErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-nonComparableSetElementTypeErrorWithElementType :: Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError
-nonComparableSetElementTypeErrorWithElementType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-nonComparableSetElementTypeErrorWithLocation :: Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.NonComparableSetElementTypeError
-nonComparableSetElementTypeErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-              Core.projectionField = (Core.Name "elementType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-redundantWrapUnwrapError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError
-redundantWrapUnwrapError location typeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))
-redundantWrapUnwrapErrorLocation :: Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError -> Phantoms.TTerm Paths.SubtermPath
-redundantWrapUnwrapErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-redundantWrapUnwrapErrorTypeName :: Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError -> Phantoms.TTerm Core.Name
-redundantWrapUnwrapErrorTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-redundantWrapUnwrapErrorWithLocation :: Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError
-redundantWrapUnwrapErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-redundantWrapUnwrapErrorWithTypeName :: Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.RedundantWrapUnwrapError
-redundantWrapUnwrapErrorWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-selfApplicationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.SelfApplicationError
-selfApplicationError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-selfApplicationErrorLocation :: Phantoms.TTerm ErrorCore.SelfApplicationError -> Phantoms.TTerm Paths.SubtermPath
-selfApplicationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-selfApplicationErrorName :: Phantoms.TTerm ErrorCore.SelfApplicationError -> Phantoms.TTerm Core.Name
-selfApplicationErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-selfApplicationErrorWithLocation :: Phantoms.TTerm ErrorCore.SelfApplicationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.SelfApplicationError
-selfApplicationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-selfApplicationErrorWithName :: Phantoms.TTerm ErrorCore.SelfApplicationError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.SelfApplicationError
-selfApplicationErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-singleVariantUnionError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.SingleVariantUnionError
-singleVariantUnionError location fieldName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldName)}]}))
-singleVariantUnionErrorFieldName :: Phantoms.TTerm ErrorCore.SingleVariantUnionError -> Phantoms.TTerm Core.Name
-singleVariantUnionErrorFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-        Core.projectionField = (Core.Name "fieldName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-singleVariantUnionErrorLocation :: Phantoms.TTerm ErrorCore.SingleVariantUnionError -> Phantoms.TTerm Paths.SubtermPath
-singleVariantUnionErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-singleVariantUnionErrorWithFieldName :: Phantoms.TTerm ErrorCore.SingleVariantUnionError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.SingleVariantUnionError
-singleVariantUnionErrorWithFieldName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-singleVariantUnionErrorWithLocation :: Phantoms.TTerm ErrorCore.SingleVariantUnionError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.SingleVariantUnionError
-singleVariantUnionErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-              Core.projectionField = (Core.Name "fieldName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termVariableShadowingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.TermVariableShadowingError
-termVariableShadowingError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-termVariableShadowingErrorLocation :: Phantoms.TTerm ErrorCore.TermVariableShadowingError -> Phantoms.TTerm Paths.SubtermPath
-termVariableShadowingErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termVariableShadowingErrorName :: Phantoms.TTerm ErrorCore.TermVariableShadowingError -> Phantoms.TTerm Core.Name
-termVariableShadowingErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termVariableShadowingErrorWithLocation :: Phantoms.TTerm ErrorCore.TermVariableShadowingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.TermVariableShadowingError
-termVariableShadowingErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termVariableShadowingErrorWithName :: Phantoms.TTerm ErrorCore.TermVariableShadowingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.TermVariableShadowingError
-termVariableShadowingErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeVariableShadowingInForallError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError
-typeVariableShadowingInForallError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-typeVariableShadowingInForallErrorLocation :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError -> Phantoms.TTerm Paths.SubtermPath
-typeVariableShadowingInForallErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeVariableShadowingInForallErrorName :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError -> Phantoms.TTerm Core.Name
-typeVariableShadowingInForallErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeVariableShadowingInForallErrorWithLocation :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError
-typeVariableShadowingInForallErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeVariableShadowingInForallErrorWithName :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.TypeVariableShadowingInForallError
-typeVariableShadowingInForallErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeVariableShadowingInTypeLambdaError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError
-typeVariableShadowingInTypeLambdaError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-typeVariableShadowingInTypeLambdaErrorLocation :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Paths.SubtermPath
-typeVariableShadowingInTypeLambdaErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeVariableShadowingInTypeLambdaErrorName :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Core.Name
-typeVariableShadowingInTypeLambdaErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeVariableShadowingInTypeLambdaErrorWithLocation :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError
-typeVariableShadowingInTypeLambdaErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeVariableShadowingInTypeLambdaErrorWithName :: Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.TypeVariableShadowingInTypeLambdaError
-typeVariableShadowingInTypeLambdaErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedFieldError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedFieldError
-undefinedFieldError fieldName typeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))
-undefinedFieldErrorFieldName :: Phantoms.TTerm ErrorCore.UndefinedFieldError -> Phantoms.TTerm Core.Name
-undefinedFieldErrorFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-        Core.projectionField = (Core.Name "fieldName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedFieldErrorTypeName :: Phantoms.TTerm ErrorCore.UndefinedFieldError -> Phantoms.TTerm Core.Name
-undefinedFieldErrorTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedFieldErrorWithFieldName :: Phantoms.TTerm ErrorCore.UndefinedFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedFieldError
-undefinedFieldErrorWithFieldName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedFieldErrorWithTypeName :: Phantoms.TTerm ErrorCore.UndefinedFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedFieldError
-undefinedFieldErrorWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-              Core.projectionField = (Core.Name "fieldName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedTermVariableError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTermVariableError
-undefinedTermVariableError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-undefinedTermVariableErrorLocation :: Phantoms.TTerm ErrorCore.UndefinedTermVariableError -> Phantoms.TTerm Paths.SubtermPath
-undefinedTermVariableErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTermVariableErrorName :: Phantoms.TTerm ErrorCore.UndefinedTermVariableError -> Phantoms.TTerm Core.Name
-undefinedTermVariableErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTermVariableErrorWithLocation :: Phantoms.TTerm ErrorCore.UndefinedTermVariableError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UndefinedTermVariableError
-undefinedTermVariableErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedTermVariableErrorWithName :: Phantoms.TTerm ErrorCore.UndefinedTermVariableError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTermVariableError
-undefinedTermVariableErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedTypeVariableError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableError
-undefinedTypeVariableError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-undefinedTypeVariableErrorLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableError -> Phantoms.TTerm Paths.SubtermPath
-undefinedTypeVariableErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableErrorName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableError -> Phantoms.TTerm Core.Name
-undefinedTypeVariableErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableErrorWithLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableError
-undefinedTypeVariableErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedTypeVariableErrorWithName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableError
-undefinedTypeVariableErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedTypeVariableInBindingTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError
-undefinedTypeVariableInBindingTypeError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-undefinedTypeVariableInBindingTypeErrorLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Paths.SubtermPath
-undefinedTypeVariableInBindingTypeErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableInBindingTypeErrorName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Core.Name
-undefinedTypeVariableInBindingTypeErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableInBindingTypeErrorWithLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError
-undefinedTypeVariableInBindingTypeErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedTypeVariableInBindingTypeErrorWithName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInBindingTypeError
-undefinedTypeVariableInBindingTypeErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedTypeVariableInLambdaDomainError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError
-undefinedTypeVariableInLambdaDomainError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-undefinedTypeVariableInLambdaDomainErrorLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Paths.SubtermPath
-undefinedTypeVariableInLambdaDomainErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableInLambdaDomainErrorName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Core.Name
-undefinedTypeVariableInLambdaDomainErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableInLambdaDomainErrorWithLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError
-undefinedTypeVariableInLambdaDomainErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedTypeVariableInLambdaDomainErrorWithName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInLambdaDomainError
-undefinedTypeVariableInLambdaDomainErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-undefinedTypeVariableInTypeApplicationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError
-undefinedTypeVariableInTypeApplicationError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-undefinedTypeVariableInTypeApplicationErrorLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Paths.SubtermPath
-undefinedTypeVariableInTypeApplicationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableInTypeApplicationErrorName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Core.Name
-undefinedTypeVariableInTypeApplicationErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-undefinedTypeVariableInTypeApplicationErrorWithLocation :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError
-undefinedTypeVariableInTypeApplicationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-undefinedTypeVariableInTypeApplicationErrorWithName :: Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UndefinedTypeVariableInTypeApplicationError
-undefinedTypeVariableInTypeApplicationErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unexpectedTermVariantError :: Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Core.Term -> Phantoms.TTerm ErrorCore.UnexpectedTermVariantError
-unexpectedTermVariantError expectedVariant actualTerm =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedVariant)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualTerm"),
-          Core.fieldTerm = (Phantoms.unTTerm actualTerm)}]}))
-unexpectedTermVariantErrorActualTerm :: Phantoms.TTerm ErrorCore.UnexpectedTermVariantError -> Phantoms.TTerm Core.Term
-unexpectedTermVariantErrorActualTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-        Core.projectionField = (Core.Name "actualTerm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedTermVariantErrorExpectedVariant :: Phantoms.TTerm ErrorCore.UnexpectedTermVariantError -> Phantoms.TTerm Variants.TermVariant
-unexpectedTermVariantErrorExpectedVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-        Core.projectionField = (Core.Name "expectedVariant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedTermVariantErrorWithActualTerm :: Phantoms.TTerm ErrorCore.UnexpectedTermVariantError -> Phantoms.TTerm Core.Term -> Phantoms.TTerm ErrorCore.UnexpectedTermVariantError
-unexpectedTermVariantErrorWithActualTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-              Core.projectionField = (Core.Name "expectedVariant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualTerm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unexpectedTermVariantErrorWithExpectedVariant :: Phantoms.TTerm ErrorCore.UnexpectedTermVariantError -> Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm ErrorCore.UnexpectedTermVariantError
-unexpectedTermVariantErrorWithExpectedVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualTerm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-              Core.projectionField = (Core.Name "actualTerm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unexpectedTypeVariantError :: Phantoms.TTerm Variants.TypeVariant -> Phantoms.TTerm Core.Type -> Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError
-unexpectedTypeVariantError expectedVariant actualType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedVariant)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (Phantoms.unTTerm actualType)}]}))
-unexpectedTypeVariantErrorActualType :: Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError -> Phantoms.TTerm Core.Type
-unexpectedTypeVariantErrorActualType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-        Core.projectionField = (Core.Name "actualType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedTypeVariantErrorExpectedVariant :: Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError -> Phantoms.TTerm Variants.TypeVariant
-unexpectedTypeVariantErrorExpectedVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-        Core.projectionField = (Core.Name "expectedVariant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedTypeVariantErrorWithActualType :: Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError
-unexpectedTypeVariantErrorWithActualType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-              Core.projectionField = (Core.Name "expectedVariant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unexpectedTypeVariantErrorWithExpectedVariant :: Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError -> Phantoms.TTerm Variants.TypeVariant -> Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError
-unexpectedTypeVariantErrorWithExpectedVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-              Core.projectionField = (Core.Name "actualType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unknownPrimitiveNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError
-unknownPrimitiveNameError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-unknownPrimitiveNameErrorLocation :: Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError -> Phantoms.TTerm Paths.SubtermPath
-unknownPrimitiveNameErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unknownPrimitiveNameErrorName :: Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError -> Phantoms.TTerm Core.Name
-unknownPrimitiveNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unknownPrimitiveNameErrorWithLocation :: Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError
-unknownPrimitiveNameErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unknownPrimitiveNameErrorWithName :: Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UnknownPrimitiveNameError
-unknownPrimitiveNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unnecessaryIdentityApplicationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UnnecessaryIdentityApplicationError
-unnecessaryIdentityApplicationError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-unnecessaryIdentityApplicationErrorLocation :: Phantoms.TTerm ErrorCore.UnnecessaryIdentityApplicationError -> Phantoms.TTerm Paths.SubtermPath
-unnecessaryIdentityApplicationErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unnecessaryIdentityApplicationErrorWithLocation :: Phantoms.TTerm ErrorCore.UnnecessaryIdentityApplicationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UnnecessaryIdentityApplicationError
-unnecessaryIdentityApplicationErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-untypedTermVariableError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UntypedTermVariableError
-untypedTermVariableError location name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-untypedTermVariableErrorLocation :: Phantoms.TTerm ErrorCore.UntypedTermVariableError -> Phantoms.TTerm Paths.SubtermPath
-untypedTermVariableErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-untypedTermVariableErrorName :: Phantoms.TTerm ErrorCore.UntypedTermVariableError -> Phantoms.TTerm Core.Name
-untypedTermVariableErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-untypedTermVariableErrorWithLocation :: Phantoms.TTerm ErrorCore.UntypedTermVariableError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.UntypedTermVariableError
-untypedTermVariableErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-untypedTermVariableErrorWithName :: Phantoms.TTerm ErrorCore.UntypedTermVariableError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorCore.UntypedTermVariableError
-untypedTermVariableErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-              Core.projectionField = (Core.Name "location")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-voidInNonBottomPositionError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.VoidInNonBottomPositionError
-voidInNonBottomPositionError location =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm location)}]}))
-voidInNonBottomPositionErrorLocation :: Phantoms.TTerm ErrorCore.VoidInNonBottomPositionError -> Phantoms.TTerm Paths.SubtermPath
-voidInNonBottomPositionErrorLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),
-        Core.projectionField = (Core.Name "location")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-voidInNonBottomPositionErrorWithLocation :: Phantoms.TTerm ErrorCore.VoidInNonBottomPositionError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm ErrorCore.VoidInNonBottomPositionError
-voidInNonBottomPositionErrorWithLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Error/Packaging.hs b/src/main/haskell/Hydra/Dsl/Error/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Error/Packaging.hs
+++ /dev/null
@@ -1,401 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.error.packaging
-
-module Hydra.Dsl.Error.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Packaging as ErrorPackaging
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-conflictingModuleNamespaceError :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError
-conflictingModuleNamespaceError first second =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm second)}]}))
-conflictingModuleNamespaceErrorFirst :: Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace
-conflictingModuleNamespaceErrorFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-conflictingModuleNamespaceErrorSecond :: Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace
-conflictingModuleNamespaceErrorSecond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-        Core.projectionField = (Core.Name "second")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-conflictingModuleNamespaceErrorWithFirst :: Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError
-conflictingModuleNamespaceErrorWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-              Core.projectionField = (Core.Name "second")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-conflictingModuleNamespaceErrorWithSecond :: Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError
-conflictingModuleNamespaceErrorWithSecond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-conflictingVariantNameError :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError
-conflictingVariantNameError namespace typeName variantName conflictingName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variantName"),
-          Core.fieldTerm = (Phantoms.unTTerm variantName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "conflictingName"),
-          Core.fieldTerm = (Phantoms.unTTerm conflictingName)}]}))
-conflictingVariantNameErrorConflictingName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name
-conflictingVariantNameErrorConflictingName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-        Core.projectionField = (Core.Name "conflictingName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-conflictingVariantNameErrorNamespace :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Packaging.Namespace
-conflictingVariantNameErrorNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-conflictingVariantNameErrorTypeName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name
-conflictingVariantNameErrorTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-conflictingVariantNameErrorVariantName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name
-conflictingVariantNameErrorVariantName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-        Core.projectionField = (Core.Name "variantName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-conflictingVariantNameErrorWithConflictingName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError
-conflictingVariantNameErrorWithConflictingName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variantName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "variantName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "conflictingName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-conflictingVariantNameErrorWithNamespace :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError
-conflictingVariantNameErrorWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variantName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "variantName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "conflictingName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "conflictingName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-conflictingVariantNameErrorWithTypeName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError
-conflictingVariantNameErrorWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variantName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "variantName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "conflictingName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "conflictingName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-conflictingVariantNameErrorWithVariantName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError
-conflictingVariantNameErrorWithVariantName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variantName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "conflictingName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-              Core.projectionField = (Core.Name "conflictingName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-definitionNotInModuleNamespaceError :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError
-definitionNotInModuleNamespaceError namespace name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-definitionNotInModuleNamespaceErrorName :: Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Core.Name
-definitionNotInModuleNamespaceErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-definitionNotInModuleNamespaceErrorNamespace :: Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace
-definitionNotInModuleNamespaceErrorNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-definitionNotInModuleNamespaceErrorWithName :: Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError
-definitionNotInModuleNamespaceErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-definitionNotInModuleNamespaceErrorWithNamespace :: Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError
-definitionNotInModuleNamespaceErrorWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-duplicateDefinitionNameError :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError
-duplicateDefinitionNameError namespace name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-duplicateDefinitionNameErrorName :: Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError -> Phantoms.TTerm Core.Name
-duplicateDefinitionNameErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateDefinitionNameErrorNamespace :: Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError -> Phantoms.TTerm Packaging.Namespace
-duplicateDefinitionNameErrorNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateDefinitionNameErrorWithName :: Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError
-duplicateDefinitionNameErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-duplicateDefinitionNameErrorWithNamespace :: Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError
-duplicateDefinitionNameErrorWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-duplicateModuleNamespaceError :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.DuplicateModuleNamespaceError
-duplicateModuleNamespaceError namespace =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)}]}))
-duplicateModuleNamespaceErrorNamespace :: Phantoms.TTerm ErrorPackaging.DuplicateModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace
-duplicateModuleNamespaceErrorNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-duplicateModuleNamespaceErrorWithNamespace :: Phantoms.TTerm ErrorPackaging.DuplicateModuleNamespaceError -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm ErrorPackaging.DuplicateModuleNamespaceError
-duplicateModuleNamespaceErrorWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-invalidModuleErrorConflictingVariantName :: Phantoms.TTerm ErrorPackaging.ConflictingVariantNameError -> Phantoms.TTerm ErrorPackaging.InvalidModuleError
-invalidModuleErrorConflictingVariantName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conflictingVariantName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidModuleErrorDefinitionNotInModuleNamespace :: Phantoms.TTerm ErrorPackaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm ErrorPackaging.InvalidModuleError
-invalidModuleErrorDefinitionNotInModuleNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "definitionNotInModuleNamespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidModuleErrorDuplicateDefinitionName :: Phantoms.TTerm ErrorPackaging.DuplicateDefinitionNameError -> Phantoms.TTerm ErrorPackaging.InvalidModuleError
-invalidModuleErrorDuplicateDefinitionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateDefinitionName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidPackageErrorConflictingModuleNamespace :: Phantoms.TTerm ErrorPackaging.ConflictingModuleNamespaceError -> Phantoms.TTerm ErrorPackaging.InvalidPackageError
-invalidPackageErrorConflictingModuleNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conflictingModuleNamespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidPackageErrorDuplicateModuleNamespace :: Phantoms.TTerm ErrorPackaging.DuplicateModuleNamespaceError -> Phantoms.TTerm ErrorPackaging.InvalidPackageError
-invalidPackageErrorDuplicateModuleNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateModuleNamespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-invalidPackageErrorInvalidModule :: Phantoms.TTerm ErrorPackaging.InvalidModuleError -> Phantoms.TTerm ErrorPackaging.InvalidPackageError
-invalidPackageErrorInvalidModule x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidModule"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Error/Pg.hs b/src/main/haskell/Hydra/Dsl/Error/Pg.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Error/Pg.hs
+++ /dev/null
@@ -1,484 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.error.pg
-
-module Hydra.Dsl.Error.Pg where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Pg as Pg
-import qualified Hydra.Pg.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-invalidEdgeErrorId :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorId x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "id"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidEdgeErrorInVertexLabel :: Phantoms.TTerm Pg.WrongVertexLabelError -> Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorInVertexLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inVertexLabel"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidEdgeErrorInVertexNotFound :: Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorInVertexNotFound =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inVertexNotFound"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-invalidEdgeErrorLabel :: Phantoms.TTerm Pg.NoSuchEdgeLabelError -> Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidEdgeErrorOutVertexLabel :: Phantoms.TTerm Pg.WrongVertexLabelError -> Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorOutVertexLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outVertexLabel"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidEdgeErrorOutVertexNotFound :: Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorOutVertexNotFound =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outVertexNotFound"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-invalidEdgeErrorProperty :: Phantoms.TTerm Pg.InvalidElementPropertyError -> Phantoms.TTerm Pg.InvalidEdgeError
-invalidEdgeErrorProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidEdgeError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidElementPropertyError :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Pg.InvalidPropertyError -> Phantoms.TTerm Pg.InvalidElementPropertyError
-invalidElementPropertyError key error =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidElementPropertyError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Phantoms.unTTerm error)}]}))
-
-invalidElementPropertyErrorError :: Phantoms.TTerm Pg.InvalidElementPropertyError -> Phantoms.TTerm Pg.InvalidPropertyError
-invalidElementPropertyErrorError x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidElementPropertyError"),
-        Core.projectionField = (Core.Name "error")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidElementPropertyErrorKey :: Phantoms.TTerm Pg.InvalidElementPropertyError -> Phantoms.TTerm Model.PropertyKey
-invalidElementPropertyErrorKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidElementPropertyError"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidElementPropertyErrorWithError :: Phantoms.TTerm Pg.InvalidElementPropertyError -> Phantoms.TTerm Pg.InvalidPropertyError -> Phantoms.TTerm Pg.InvalidElementPropertyError
-invalidElementPropertyErrorWithError original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidElementPropertyError"),
-      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.error.pg.InvalidElementPropertyError"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-invalidElementPropertyErrorWithKey :: Phantoms.TTerm Pg.InvalidElementPropertyError -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Pg.InvalidElementPropertyError
-invalidElementPropertyErrorWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidElementPropertyError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidElementPropertyError"),
-              Core.projectionField = (Core.Name "error")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-invalidGraphEdgeError :: Phantoms.TTerm v -> Phantoms.TTerm Pg.InvalidEdgeError -> Phantoms.TTerm (Pg.InvalidGraphEdgeError v)
-invalidGraphEdgeError id error =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Phantoms.unTTerm error)}]}))
-
-invalidGraphEdgeErrorError :: Phantoms.TTerm (Pg.InvalidGraphEdgeError v) -> Phantoms.TTerm Pg.InvalidEdgeError
-invalidGraphEdgeErrorError x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-        Core.projectionField = (Core.Name "error")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidGraphEdgeErrorId :: Phantoms.TTerm (Pg.InvalidGraphEdgeError v) -> Phantoms.TTerm v
-invalidGraphEdgeErrorId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidGraphEdgeErrorWithError :: Phantoms.TTerm (Pg.InvalidGraphEdgeError v) -> Phantoms.TTerm Pg.InvalidEdgeError -> Phantoms.TTerm (Pg.InvalidGraphEdgeError v)
-invalidGraphEdgeErrorWithError original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-invalidGraphEdgeErrorWithId :: Phantoms.TTerm (Pg.InvalidGraphEdgeError v) -> Phantoms.TTerm v -> Phantoms.TTerm (Pg.InvalidGraphEdgeError v)
-invalidGraphEdgeErrorWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphEdgeError"),
-              Core.projectionField = (Core.Name "error")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-invalidGraphErrorEdge :: Phantoms.TTerm (Pg.InvalidGraphEdgeError v) -> Phantoms.TTerm (Pg.InvalidGraphError v)
-invalidGraphErrorEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidGraphErrorVertex :: Phantoms.TTerm (Pg.InvalidGraphVertexError v) -> Phantoms.TTerm (Pg.InvalidGraphError v)
-invalidGraphErrorVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidGraphVertexError :: Phantoms.TTerm v -> Phantoms.TTerm Pg.InvalidVertexError -> Phantoms.TTerm (Pg.InvalidGraphVertexError v)
-invalidGraphVertexError id error =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Phantoms.unTTerm error)}]}))
-
-invalidGraphVertexErrorError :: Phantoms.TTerm (Pg.InvalidGraphVertexError v) -> Phantoms.TTerm Pg.InvalidVertexError
-invalidGraphVertexErrorError x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-        Core.projectionField = (Core.Name "error")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidGraphVertexErrorId :: Phantoms.TTerm (Pg.InvalidGraphVertexError v) -> Phantoms.TTerm v
-invalidGraphVertexErrorId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidGraphVertexErrorWithError :: Phantoms.TTerm (Pg.InvalidGraphVertexError v) -> Phantoms.TTerm Pg.InvalidVertexError -> Phantoms.TTerm (Pg.InvalidGraphVertexError v)
-invalidGraphVertexErrorWithError original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-invalidGraphVertexErrorWithId :: Phantoms.TTerm (Pg.InvalidGraphVertexError v) -> Phantoms.TTerm v -> Phantoms.TTerm (Pg.InvalidGraphVertexError v)
-invalidGraphVertexErrorWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "error"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidGraphVertexError"),
-              Core.projectionField = (Core.Name "error")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-invalidPropertyErrorInvalidValue :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm Pg.InvalidPropertyError
-invalidPropertyErrorInvalidValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidPropertyError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "invalidValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidPropertyErrorMissingRequired :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Pg.InvalidPropertyError
-invalidPropertyErrorMissingRequired x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidPropertyError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "missingRequired"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidPropertyErrorUnexpectedKey :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Pg.InvalidPropertyError
-invalidPropertyErrorUnexpectedKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidPropertyError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unexpectedKey"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidValueError :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Pg.InvalidValueError
-invalidValueError expectedType value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidValueError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Phantoms.unTTerm expectedType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-invalidValueErrorExpectedType :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm String
-invalidValueErrorExpectedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidValueError"),
-        Core.projectionField = (Core.Name "expectedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidValueErrorValue :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm String
-invalidValueErrorValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidValueError"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-invalidValueErrorWithExpectedType :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm String -> Phantoms.TTerm Pg.InvalidValueError
-invalidValueErrorWithExpectedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidValueError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.error.pg.InvalidValueError"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-invalidValueErrorWithValue :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm String -> Phantoms.TTerm Pg.InvalidValueError
-invalidValueErrorWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.InvalidValueError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.InvalidValueError"),
-              Core.projectionField = (Core.Name "expectedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-invalidVertexErrorId :: Phantoms.TTerm Pg.InvalidValueError -> Phantoms.TTerm Pg.InvalidVertexError
-invalidVertexErrorId x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidVertexError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "id"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidVertexErrorLabel :: Phantoms.TTerm Pg.NoSuchVertexLabelError -> Phantoms.TTerm Pg.InvalidVertexError
-invalidVertexErrorLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidVertexError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-invalidVertexErrorProperty :: Phantoms.TTerm Pg.InvalidElementPropertyError -> Phantoms.TTerm Pg.InvalidVertexError
-invalidVertexErrorProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.error.pg.InvalidVertexError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-noSuchEdgeLabelError :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm Pg.NoSuchEdgeLabelError
-noSuchEdgeLabelError label =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.NoSuchEdgeLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)}]}))
-
-noSuchEdgeLabelErrorLabel :: Phantoms.TTerm Pg.NoSuchEdgeLabelError -> Phantoms.TTerm Model.EdgeLabel
-noSuchEdgeLabelErrorLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.NoSuchEdgeLabelError"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noSuchEdgeLabelErrorWithLabel :: Phantoms.TTerm Pg.NoSuchEdgeLabelError -> Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm Pg.NoSuchEdgeLabelError
-noSuchEdgeLabelErrorWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.NoSuchEdgeLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-noSuchVertexLabelError :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Pg.NoSuchVertexLabelError
-noSuchVertexLabelError label =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.NoSuchVertexLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)}]}))
-
-noSuchVertexLabelErrorLabel :: Phantoms.TTerm Pg.NoSuchVertexLabelError -> Phantoms.TTerm Model.VertexLabel
-noSuchVertexLabelErrorLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.NoSuchVertexLabelError"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noSuchVertexLabelErrorWithLabel :: Phantoms.TTerm Pg.NoSuchVertexLabelError -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Pg.NoSuchVertexLabelError
-noSuchVertexLabelErrorWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.NoSuchVertexLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-wrongVertexLabelError :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Pg.WrongVertexLabelError
-wrongVertexLabelError expected actual =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Phantoms.unTTerm expected)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Phantoms.unTTerm actual)}]}))
-
-wrongVertexLabelErrorActual :: Phantoms.TTerm Pg.WrongVertexLabelError -> Phantoms.TTerm Model.VertexLabel
-wrongVertexLabelErrorActual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-        Core.projectionField = (Core.Name "actual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-wrongVertexLabelErrorExpected :: Phantoms.TTerm Pg.WrongVertexLabelError -> Phantoms.TTerm Model.VertexLabel
-wrongVertexLabelErrorExpected x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-        Core.projectionField = (Core.Name "expected")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-wrongVertexLabelErrorWithActual :: Phantoms.TTerm Pg.WrongVertexLabelError -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Pg.WrongVertexLabelError
-wrongVertexLabelErrorWithActual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-              Core.projectionField = (Core.Name "expected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-wrongVertexLabelErrorWithExpected :: Phantoms.TTerm Pg.WrongVertexLabelError -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Pg.WrongVertexLabelError
-wrongVertexLabelErrorWithExpected original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.error.pg.WrongVertexLabelError"),
-              Core.projectionField = (Core.Name "actual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Errors.hs b/src/main/haskell/Hydra/Dsl/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Errors.hs
+++ /dev/null
@@ -1,626 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.errors
-
-module Hydra.Dsl.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-decodingError :: Phantoms.TTerm String -> Phantoms.TTerm Errors.DecodingError
-decodingError x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-errorChecking :: Phantoms.TTerm Checking.CheckingError -> Phantoms.TTerm Errors.Error
-errorChecking x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "checking"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorDecoding :: Phantoms.TTerm Errors.DecodingError -> Phantoms.TTerm Errors.Error
-errorDecoding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decoding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorDuplicateBinding :: Phantoms.TTerm ErrorCore.DuplicateBindingError -> Phantoms.TTerm Errors.Error
-errorDuplicateBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorDuplicateField :: Phantoms.TTerm ErrorCore.DuplicateFieldError -> Phantoms.TTerm Errors.Error
-errorDuplicateField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicateField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorExtraction :: Phantoms.TTerm Errors.ExtractionError -> Phantoms.TTerm Errors.Error
-errorExtraction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extraction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorInference :: Phantoms.TTerm Errors.InferenceError -> Phantoms.TTerm Errors.Error
-errorInference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorOther :: Phantoms.TTerm Errors.OtherError -> Phantoms.TTerm Errors.Error
-errorOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorResolution :: Phantoms.TTerm Errors.ResolutionError -> Phantoms.TTerm Errors.Error
-errorResolution x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "resolution"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorUndefinedField :: Phantoms.TTerm ErrorCore.UndefinedFieldError -> Phantoms.TTerm Errors.Error
-errorUndefinedField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorUndefinedTermVariable :: Phantoms.TTerm ErrorCore.UndefinedTermVariableError -> Phantoms.TTerm Errors.Error
-errorUndefinedTermVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefinedTermVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorUnexpectedTermVariant :: Phantoms.TTerm ErrorCore.UnexpectedTermVariantError -> Phantoms.TTerm Errors.Error
-errorUnexpectedTermVariant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unexpectedTermVariant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorUnexpectedTypeVariant :: Phantoms.TTerm ErrorCore.UnexpectedTypeVariantError -> Phantoms.TTerm Errors.Error
-errorUnexpectedTypeVariant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unexpectedTypeVariant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorUnification :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Errors.Error
-errorUnification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-errorUntypedTermVariable :: Phantoms.TTerm ErrorCore.UntypedTermVariableError -> Phantoms.TTerm Errors.Error
-errorUntypedTermVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "untypedTermVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorEmptyList :: Phantoms.TTerm Errors.EmptyListError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorEmptyList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyList"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorMultipleBindings :: Phantoms.TTerm Errors.MultipleBindingsError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorMultipleBindings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multipleBindings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorMultipleFields :: Phantoms.TTerm Errors.MultipleFieldsError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorMultipleFields x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multipleFields"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorNoMatchingField :: Phantoms.TTerm Errors.NoMatchingFieldError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorNoMatchingField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noMatchingField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorNoSuchBinding :: Phantoms.TTerm Errors.NoSuchBindingError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorNoSuchBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noSuchBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorNotEnoughCases :: Phantoms.TTerm Errors.NotEnoughCasesError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorNotEnoughCases x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEnoughCases"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-extractionErrorUnexpectedShape :: Phantoms.TTerm Errors.UnexpectedShapeError -> Phantoms.TTerm Errors.ExtractionError
-extractionErrorUnexpectedShape x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unexpectedShape"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-inferenceErrorChecking :: Phantoms.TTerm Checking.CheckingError -> Phantoms.TTerm Errors.InferenceError
-inferenceErrorChecking x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "checking"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-inferenceErrorOther :: Phantoms.TTerm Errors.OtherInferenceError -> Phantoms.TTerm Errors.InferenceError
-inferenceErrorOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-inferenceErrorUnification :: Phantoms.TTerm Errors.UnificationInferenceError -> Phantoms.TTerm Errors.InferenceError
-inferenceErrorUnification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-multipleBindingsError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.MultipleBindingsError
-multipleBindingsError name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.MultipleBindingsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-multipleBindingsErrorName :: Phantoms.TTerm Errors.MultipleBindingsError -> Phantoms.TTerm Core.Name
-multipleBindingsErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.MultipleBindingsError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-multipleBindingsErrorWithName :: Phantoms.TTerm Errors.MultipleBindingsError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.MultipleBindingsError
-multipleBindingsErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.MultipleBindingsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-multipleFieldsError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.MultipleFieldsError
-multipleFieldsError fieldName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.MultipleFieldsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldName)}]}))
-multipleFieldsErrorFieldName :: Phantoms.TTerm Errors.MultipleFieldsError -> Phantoms.TTerm Core.Name
-multipleFieldsErrorFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.MultipleFieldsError"),
-        Core.projectionField = (Core.Name "fieldName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-multipleFieldsErrorWithFieldName :: Phantoms.TTerm Errors.MultipleFieldsError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.MultipleFieldsError
-multipleFieldsErrorWithFieldName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.MultipleFieldsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-noMatchingFieldError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.NoMatchingFieldError
-noMatchingFieldError fieldName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoMatchingFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldName)}]}))
-noMatchingFieldErrorFieldName :: Phantoms.TTerm Errors.NoMatchingFieldError -> Phantoms.TTerm Core.Name
-noMatchingFieldErrorFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.NoMatchingFieldError"),
-        Core.projectionField = (Core.Name "fieldName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-noMatchingFieldErrorWithFieldName :: Phantoms.TTerm Errors.NoMatchingFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.NoMatchingFieldError
-noMatchingFieldErrorWithFieldName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoMatchingFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-noSuchBindingError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.NoSuchBindingError
-noSuchBindingError name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-noSuchBindingErrorName :: Phantoms.TTerm Errors.NoSuchBindingError -> Phantoms.TTerm Core.Name
-noSuchBindingErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.NoSuchBindingError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-noSuchBindingErrorWithName :: Phantoms.TTerm Errors.NoSuchBindingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.NoSuchBindingError
-noSuchBindingErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-noSuchPrimitiveError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.NoSuchPrimitiveError
-noSuchPrimitiveError name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchPrimitiveError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-noSuchPrimitiveErrorName :: Phantoms.TTerm Errors.NoSuchPrimitiveError -> Phantoms.TTerm Core.Name
-noSuchPrimitiveErrorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.NoSuchPrimitiveError"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-noSuchPrimitiveErrorWithName :: Phantoms.TTerm Errors.NoSuchPrimitiveError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Errors.NoSuchPrimitiveError
-noSuchPrimitiveErrorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchPrimitiveError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-otherError :: Phantoms.TTerm String -> Phantoms.TTerm Errors.OtherError
-otherError x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherError"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-otherInferenceError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm String -> Phantoms.TTerm Errors.OtherInferenceError
-otherInferenceError path message =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)}]}))
-otherInferenceErrorMessage :: Phantoms.TTerm Errors.OtherInferenceError -> Phantoms.TTerm String
-otherInferenceErrorMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-otherInferenceErrorPath :: Phantoms.TTerm Errors.OtherInferenceError -> Phantoms.TTerm Paths.SubtermPath
-otherInferenceErrorPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-otherInferenceErrorWithMessage :: Phantoms.TTerm Errors.OtherInferenceError -> Phantoms.TTerm String -> Phantoms.TTerm Errors.OtherInferenceError
-otherInferenceErrorWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-otherInferenceErrorWithPath :: Phantoms.TTerm Errors.OtherInferenceError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Errors.OtherInferenceError
-otherInferenceErrorWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-otherResolutionError :: Phantoms.TTerm String -> Phantoms.TTerm Errors.OtherResolutionError
-otherResolutionError x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherResolutionError"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-resolutionErrorNoMatchingField :: Phantoms.TTerm Errors.NoMatchingFieldError -> Phantoms.TTerm Errors.ResolutionError
-resolutionErrorNoMatchingField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noMatchingField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-resolutionErrorNoSuchBinding :: Phantoms.TTerm Errors.NoSuchBindingError -> Phantoms.TTerm Errors.ResolutionError
-resolutionErrorNoSuchBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noSuchBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-resolutionErrorNoSuchPrimitive :: Phantoms.TTerm Errors.NoSuchPrimitiveError -> Phantoms.TTerm Errors.ResolutionError
-resolutionErrorNoSuchPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noSuchPrimitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-resolutionErrorOther :: Phantoms.TTerm Errors.OtherResolutionError -> Phantoms.TTerm Errors.ResolutionError
-resolutionErrorOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-resolutionErrorUnexpectedShape :: Phantoms.TTerm Errors.UnexpectedShapeError -> Phantoms.TTerm Errors.ResolutionError
-resolutionErrorUnexpectedShape x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unexpectedShape"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-unDecodingError :: Phantoms.TTerm Errors.DecodingError -> Phantoms.TTerm String
-unDecodingError x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.errors.DecodingError")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unOtherError :: Phantoms.TTerm Errors.OtherError -> Phantoms.TTerm String
-unOtherError x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.errors.OtherError")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unOtherResolutionError :: Phantoms.TTerm Errors.OtherResolutionError -> Phantoms.TTerm String
-unOtherResolutionError x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.errors.OtherResolutionError")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedShapeError :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnexpectedShapeError
-unexpectedShapeError expected actual =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Phantoms.unTTerm expected)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Phantoms.unTTerm actual)}]}))
-unexpectedShapeErrorActual :: Phantoms.TTerm Errors.UnexpectedShapeError -> Phantoms.TTerm String
-unexpectedShapeErrorActual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-        Core.projectionField = (Core.Name "actual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedShapeErrorExpected :: Phantoms.TTerm Errors.UnexpectedShapeError -> Phantoms.TTerm String
-unexpectedShapeErrorExpected x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-        Core.projectionField = (Core.Name "expected")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unexpectedShapeErrorWithActual :: Phantoms.TTerm Errors.UnexpectedShapeError -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnexpectedShapeError
-unexpectedShapeErrorWithActual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-              Core.projectionField = (Core.Name "expected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unexpectedShapeErrorWithExpected :: Phantoms.TTerm Errors.UnexpectedShapeError -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnexpectedShapeError
-unexpectedShapeErrorWithExpected original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-              Core.projectionField = (Core.Name "actual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unificationError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnificationError
-unificationError leftType rightType message =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftType"),
-          Core.fieldTerm = (Phantoms.unTTerm leftType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightType"),
-          Core.fieldTerm = (Phantoms.unTTerm rightType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)}]}))
-unificationErrorLeftType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type
-unificationErrorLeftType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-        Core.projectionField = (Core.Name "leftType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unificationErrorMessage :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm String
-unificationErrorMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unificationErrorRightType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type
-unificationErrorRightType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-        Core.projectionField = (Core.Name "rightType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unificationErrorWithLeftType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Errors.UnificationError
-unificationErrorWithLeftType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-              Core.projectionField = (Core.Name "rightType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unificationErrorWithMessage :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnificationError
-unificationErrorWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-              Core.projectionField = (Core.Name "leftType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-              Core.projectionField = (Core.Name "rightType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unificationErrorWithRightType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Errors.UnificationError
-unificationErrorWithRightType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-              Core.projectionField = (Core.Name "leftType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unificationInferenceError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Errors.UnificationInferenceError
-unificationInferenceError path cause =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cause"),
-          Core.fieldTerm = (Phantoms.unTTerm cause)}]}))
-unificationInferenceErrorCause :: Phantoms.TTerm Errors.UnificationInferenceError -> Phantoms.TTerm Errors.UnificationError
-unificationInferenceErrorCause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-        Core.projectionField = (Core.Name "cause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unificationInferenceErrorPath :: Phantoms.TTerm Errors.UnificationInferenceError -> Phantoms.TTerm Paths.SubtermPath
-unificationInferenceErrorPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unificationInferenceErrorWithCause :: Phantoms.TTerm Errors.UnificationInferenceError -> Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Errors.UnificationInferenceError
-unificationInferenceErrorWithCause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unificationInferenceErrorWithPath :: Phantoms.TTerm Errors.UnificationInferenceError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Errors.UnificationInferenceError
-unificationInferenceErrorWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-              Core.projectionField = (Core.Name "cause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Geojson/Model.hs b/src/main/haskell/Hydra/Dsl/Geojson/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Geojson/Model.hs
+++ /dev/null
@@ -1,939 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.geojson.model
-
-module Hydra.Dsl.Geojson.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Geojson.Model as GeojsonModel
-import qualified Hydra.Json.Model as JsonModel
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-boundingBox :: Phantoms.TTerm [GeojsonModel.CoordinateRange] -> Phantoms.TTerm GeojsonModel.BoundingBox
-boundingBox x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.geojson.model.BoundingBox"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-coordinateRange :: Phantoms.TTerm Double -> Phantoms.TTerm Double -> Phantoms.TTerm GeojsonModel.CoordinateRange
-coordinateRange min max =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm min)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm max)}]}))
-
-coordinateRangeMax :: Phantoms.TTerm GeojsonModel.CoordinateRange -> Phantoms.TTerm Double
-coordinateRangeMax x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-        Core.projectionField = (Core.Name "max")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-coordinateRangeMin :: Phantoms.TTerm GeojsonModel.CoordinateRange -> Phantoms.TTerm Double
-coordinateRangeMin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-        Core.projectionField = (Core.Name "min")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-coordinateRangeWithMax :: Phantoms.TTerm GeojsonModel.CoordinateRange -> Phantoms.TTerm Double -> Phantoms.TTerm GeojsonModel.CoordinateRange
-coordinateRangeWithMax original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-coordinateRangeWithMin :: Phantoms.TTerm GeojsonModel.CoordinateRange -> Phantoms.TTerm Double -> Phantoms.TTerm GeojsonModel.CoordinateRange
-coordinateRangeWithMin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.CoordinateRange"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-feature :: Phantoms.TTerm (Maybe GeojsonModel.Geometry) -> Phantoms.TTerm (Maybe (M.Map String JsonModel.Value)) -> Phantoms.TTerm (Maybe GeojsonModel.Id) -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.Feature
-feature geometry properties id bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Feature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometry"),
-          Core.fieldTerm = (Phantoms.unTTerm geometry)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-featureBbox :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-featureBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featureCollection :: Phantoms.TTerm [GeojsonModel.Feature] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.FeatureCollection
-featureCollection features bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "features"),
-          Core.fieldTerm = (Phantoms.unTTerm features)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-featureCollectionBbox :: Phantoms.TTerm GeojsonModel.FeatureCollection -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-featureCollectionBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featureCollectionFeatures :: Phantoms.TTerm GeojsonModel.FeatureCollection -> Phantoms.TTerm [GeojsonModel.Feature]
-featureCollectionFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-        Core.projectionField = (Core.Name "features")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featureCollectionWithBbox :: Phantoms.TTerm GeojsonModel.FeatureCollection -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.FeatureCollection
-featureCollectionWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "features"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-              Core.projectionField = (Core.Name "features")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-featureCollectionWithFeatures :: Phantoms.TTerm GeojsonModel.FeatureCollection -> Phantoms.TTerm [GeojsonModel.Feature] -> Phantoms.TTerm GeojsonModel.FeatureCollection
-featureCollectionWithFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "features"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.FeatureCollection"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-featureGeometry :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe GeojsonModel.Geometry)
-featureGeometry x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-        Core.projectionField = (Core.Name "geometry")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featureId :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe GeojsonModel.Id)
-featureId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featureProperties :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe (M.Map String JsonModel.Value))
-featureProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featureWithBbox :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.Feature
-featureWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Feature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometry"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "geometry")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-featureWithGeometry :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe GeojsonModel.Geometry) -> Phantoms.TTerm GeojsonModel.Feature
-featureWithGeometry original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Feature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometry"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-featureWithId :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe GeojsonModel.Id) -> Phantoms.TTerm GeojsonModel.Feature
-featureWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Feature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometry"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "geometry")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-featureWithProperties :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm (Maybe (M.Map String JsonModel.Value)) -> Phantoms.TTerm GeojsonModel.Feature
-featureWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Feature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometry"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "geometry")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Feature"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-geometryCollection :: Phantoms.TTerm [GeojsonModel.Geometry] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.GeometryCollection
-geometryCollection geometries bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometries"),
-          Core.fieldTerm = (Phantoms.unTTerm geometries)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-geometryCollectionBbox :: Phantoms.TTerm GeojsonModel.GeometryCollection -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-geometryCollectionBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-geometryCollectionGeometries :: Phantoms.TTerm GeojsonModel.GeometryCollection -> Phantoms.TTerm [GeojsonModel.Geometry]
-geometryCollectionGeometries x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-        Core.projectionField = (Core.Name "geometries")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-geometryCollectionWithBbox :: Phantoms.TTerm GeojsonModel.GeometryCollection -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.GeometryCollection
-geometryCollectionWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometries"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-              Core.projectionField = (Core.Name "geometries")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-geometryCollectionWithGeometries :: Phantoms.TTerm GeojsonModel.GeometryCollection -> Phantoms.TTerm [GeojsonModel.Geometry] -> Phantoms.TTerm GeojsonModel.GeometryCollection
-geometryCollectionWithGeometries original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "geometries"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.GeometryCollection"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-geometryGeometryCollection :: Phantoms.TTerm GeojsonModel.GeometryCollection -> Phantoms.TTerm GeojsonModel.Geometry
-geometryGeometryCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "geometryCollection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-geometryLineString :: Phantoms.TTerm GeojsonModel.LineString -> Phantoms.TTerm GeojsonModel.Geometry
-geometryLineString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lineString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-geometryMultiLineString :: Phantoms.TTerm GeojsonModel.MultiLineString -> Phantoms.TTerm GeojsonModel.Geometry
-geometryMultiLineString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiLineString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-geometryMultiPoint :: Phantoms.TTerm GeojsonModel.MultiPoint -> Phantoms.TTerm GeojsonModel.Geometry
-geometryMultiPoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiPoint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-geometryMultiPolygon :: Phantoms.TTerm GeojsonModel.MultiPolygon -> Phantoms.TTerm GeojsonModel.Geometry
-geometryMultiPolygon x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiPolygon"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-geometryPoint :: Phantoms.TTerm GeojsonModel.Point -> Phantoms.TTerm GeojsonModel.Geometry
-geometryPoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "point"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-geometryPolygon :: Phantoms.TTerm GeojsonModel.Polygon -> Phantoms.TTerm GeojsonModel.Geometry
-geometryPolygon x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Geometry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "polygon"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-idNumber :: Phantoms.TTerm Double -> Phantoms.TTerm GeojsonModel.Id
-idNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Id"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-idString :: Phantoms.TTerm String -> Phantoms.TTerm GeojsonModel.Id
-idString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Id"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lineString :: Phantoms.TTerm [GeojsonModel.Position] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.LineString
-lineString coordinates bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.LineString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm coordinates)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-lineStringBbox :: Phantoms.TTerm GeojsonModel.LineString -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-lineStringBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.LineString"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lineStringCoordinates :: Phantoms.TTerm GeojsonModel.LineString -> Phantoms.TTerm [GeojsonModel.Position]
-lineStringCoordinates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.LineString"),
-        Core.projectionField = (Core.Name "coordinates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lineStringWithBbox :: Phantoms.TTerm GeojsonModel.LineString -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.LineString
-lineStringWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.LineString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.LineString"),
-              Core.projectionField = (Core.Name "coordinates")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lineStringWithCoordinates :: Phantoms.TTerm GeojsonModel.LineString -> Phantoms.TTerm [GeojsonModel.Position] -> Phantoms.TTerm GeojsonModel.LineString
-lineStringWithCoordinates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.LineString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.LineString"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiLineString :: Phantoms.TTerm [GeojsonModel.LineString] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.MultiLineString
-multiLineString coordinates bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm coordinates)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-multiLineStringBbox :: Phantoms.TTerm GeojsonModel.MultiLineString -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-multiLineStringBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiLineStringCoordinates :: Phantoms.TTerm GeojsonModel.MultiLineString -> Phantoms.TTerm [GeojsonModel.LineString]
-multiLineStringCoordinates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-        Core.projectionField = (Core.Name "coordinates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiLineStringWithBbox :: Phantoms.TTerm GeojsonModel.MultiLineString -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.MultiLineString
-multiLineStringWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-              Core.projectionField = (Core.Name "coordinates")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiLineStringWithCoordinates :: Phantoms.TTerm GeojsonModel.MultiLineString -> Phantoms.TTerm [GeojsonModel.LineString] -> Phantoms.TTerm GeojsonModel.MultiLineString
-multiLineStringWithCoordinates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiLineString"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiPoint :: Phantoms.TTerm [GeojsonModel.Point] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.MultiPoint
-multiPoint coordinates bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm coordinates)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-multiPointBbox :: Phantoms.TTerm GeojsonModel.MultiPoint -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-multiPointBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiPointCoordinates :: Phantoms.TTerm GeojsonModel.MultiPoint -> Phantoms.TTerm [GeojsonModel.Point]
-multiPointCoordinates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-        Core.projectionField = (Core.Name "coordinates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiPointWithBbox :: Phantoms.TTerm GeojsonModel.MultiPoint -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.MultiPoint
-multiPointWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-              Core.projectionField = (Core.Name "coordinates")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiPointWithCoordinates :: Phantoms.TTerm GeojsonModel.MultiPoint -> Phantoms.TTerm [GeojsonModel.Point] -> Phantoms.TTerm GeojsonModel.MultiPoint
-multiPointWithCoordinates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPoint"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiPolygon :: Phantoms.TTerm [GeojsonModel.Polygon] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.MultiPolygon
-multiPolygon coordinates bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm coordinates)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-multiPolygonBbox :: Phantoms.TTerm GeojsonModel.MultiPolygon -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-multiPolygonBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiPolygonCoordinates :: Phantoms.TTerm GeojsonModel.MultiPolygon -> Phantoms.TTerm [GeojsonModel.Polygon]
-multiPolygonCoordinates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-        Core.projectionField = (Core.Name "coordinates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiPolygonWithBbox :: Phantoms.TTerm GeojsonModel.MultiPolygon -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.MultiPolygon
-multiPolygonWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-              Core.projectionField = (Core.Name "coordinates")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiPolygonWithCoordinates :: Phantoms.TTerm GeojsonModel.MultiPolygon -> Phantoms.TTerm [GeojsonModel.Polygon] -> Phantoms.TTerm GeojsonModel.MultiPolygon
-multiPolygonWithCoordinates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.MultiPolygon"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectFeature :: Phantoms.TTerm GeojsonModel.Feature -> Phantoms.TTerm GeojsonModel.Object
-objectFeature x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Object"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "feature"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectFeatureCollection :: Phantoms.TTerm GeojsonModel.FeatureCollection -> Phantoms.TTerm GeojsonModel.Object
-objectFeatureCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Object"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "featureCollection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectGeometry :: Phantoms.TTerm GeojsonModel.Geometry -> Phantoms.TTerm GeojsonModel.Object
-objectGeometry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.geojson.model.Object"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "geometry"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-point :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.Point
-point coordinates bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Point"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm coordinates)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-pointBbox :: Phantoms.TTerm GeojsonModel.Point -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-pointBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Point"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointCoordinates :: Phantoms.TTerm GeojsonModel.Point -> Phantoms.TTerm GeojsonModel.Position
-pointCoordinates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Point"),
-        Core.projectionField = (Core.Name "coordinates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pointWithBbox :: Phantoms.TTerm GeojsonModel.Point -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.Point
-pointWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Point"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Point"),
-              Core.projectionField = (Core.Name "coordinates")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pointWithCoordinates :: Phantoms.TTerm GeojsonModel.Point -> Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm GeojsonModel.Point
-pointWithCoordinates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Point"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Point"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-polygon :: Phantoms.TTerm [GeojsonModel.Position] -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.Polygon
-polygon coordinates bbox =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm coordinates)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm bbox)}]}))
-
-polygonBbox :: Phantoms.TTerm GeojsonModel.Polygon -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox)
-polygonBbox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-        Core.projectionField = (Core.Name "bbox")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-polygonCoordinates :: Phantoms.TTerm GeojsonModel.Polygon -> Phantoms.TTerm [GeojsonModel.Position]
-polygonCoordinates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-        Core.projectionField = (Core.Name "coordinates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-polygonWithBbox :: Phantoms.TTerm GeojsonModel.Polygon -> Phantoms.TTerm (Maybe GeojsonModel.BoundingBox) -> Phantoms.TTerm GeojsonModel.Polygon
-polygonWithBbox original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-              Core.projectionField = (Core.Name "coordinates")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-polygonWithCoordinates :: Phantoms.TTerm GeojsonModel.Polygon -> Phantoms.TTerm [GeojsonModel.Position] -> Phantoms.TTerm GeojsonModel.Polygon
-polygonWithCoordinates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "coordinates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bbox"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Polygon"),
-              Core.projectionField = (Core.Name "bbox")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-position :: Phantoms.TTerm Double -> Phantoms.TTerm Double -> Phantoms.TTerm (Maybe Double) -> Phantoms.TTerm GeojsonModel.Position
-position latitude longitude altitude =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Position"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "latitude"),
-          Core.fieldTerm = (Phantoms.unTTerm latitude)},
-        Core.Field {
-          Core.fieldName = (Core.Name "longitude"),
-          Core.fieldTerm = (Phantoms.unTTerm longitude)},
-        Core.Field {
-          Core.fieldName = (Core.Name "altitude"),
-          Core.fieldTerm = (Phantoms.unTTerm altitude)}]}))
-
-positionAltitude :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm (Maybe Double)
-positionAltitude x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-        Core.projectionField = (Core.Name "altitude")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-positionLatitude :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm Double
-positionLatitude x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-        Core.projectionField = (Core.Name "latitude")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-positionLongitude :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm Double
-positionLongitude x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-        Core.projectionField = (Core.Name "longitude")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-positionWithAltitude :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm (Maybe Double) -> Phantoms.TTerm GeojsonModel.Position
-positionWithAltitude original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Position"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "latitude"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-              Core.projectionField = (Core.Name "latitude")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "longitude"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-              Core.projectionField = (Core.Name "longitude")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "altitude"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-positionWithLatitude :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm Double -> Phantoms.TTerm GeojsonModel.Position
-positionWithLatitude original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Position"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "latitude"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "longitude"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-              Core.projectionField = (Core.Name "longitude")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "altitude"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-              Core.projectionField = (Core.Name "altitude")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-positionWithLongitude :: Phantoms.TTerm GeojsonModel.Position -> Phantoms.TTerm Double -> Phantoms.TTerm GeojsonModel.Position
-positionWithLongitude original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.geojson.model.Position"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "latitude"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-              Core.projectionField = (Core.Name "latitude")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "longitude"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "altitude"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.geojson.model.Position"),
-              Core.projectionField = (Core.Name "altitude")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unBoundingBox :: Phantoms.TTerm GeojsonModel.BoundingBox -> Phantoms.TTerm [GeojsonModel.CoordinateRange]
-unBoundingBox x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.geojson.model.BoundingBox")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Go/Syntax.hs b/src/main/haskell/Hydra/Dsl/Go/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Go/Syntax.hs
+++ /dev/null
@@ -1,6017 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.go.syntax
-
-module Hydra.Dsl.Go.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Go.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-addOpAdd :: Phantoms.TTerm Syntax.AddOp
-addOpAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AddOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addOpBitwiseOr :: Phantoms.TTerm Syntax.AddOp
-addOpBitwiseOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AddOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addOpBitwiseXor :: Phantoms.TTerm Syntax.AddOp
-addOpBitwiseXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AddOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addOpSubtract :: Phantoms.TTerm Syntax.AddOp
-addOpSubtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AddOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-aliasDecl :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AliasDecl
-aliasDecl name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-aliasDeclName :: Phantoms.TTerm Syntax.AliasDecl -> Phantoms.TTerm Syntax.Identifier
-aliasDeclName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasDeclType :: Phantoms.TTerm Syntax.AliasDecl -> Phantoms.TTerm Syntax.Type
-aliasDeclType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasDeclWithName :: Phantoms.TTerm Syntax.AliasDecl -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AliasDecl
-aliasDeclWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasDeclWithType :: Phantoms.TTerm Syntax.AliasDecl -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.AliasDecl
-aliasDeclWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.AliasDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotatedDeclaration :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.TopLevelDecl -> Phantoms.TTerm Syntax.AnnotatedDeclaration
-annotatedDeclaration comment declaration =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Phantoms.unTTerm declaration)}]}))
-
-annotatedDeclarationComment :: Phantoms.TTerm Syntax.AnnotatedDeclaration -> Phantoms.TTerm String
-annotatedDeclarationComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedDeclarationDeclaration :: Phantoms.TTerm Syntax.AnnotatedDeclaration -> Phantoms.TTerm Syntax.TopLevelDecl
-annotatedDeclarationDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-        Core.projectionField = (Core.Name "declaration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedDeclarationWithComment :: Phantoms.TTerm Syntax.AnnotatedDeclaration -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.AnnotatedDeclaration
-annotatedDeclarationWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-              Core.projectionField = (Core.Name "declaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotatedDeclarationWithDeclaration :: Phantoms.TTerm Syntax.AnnotatedDeclaration -> Phantoms.TTerm Syntax.TopLevelDecl -> Phantoms.TTerm Syntax.AnnotatedDeclaration
-annotatedDeclarationWithDeclaration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.AnnotatedDeclaration"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declaration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arguments :: Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Arguments
-arguments typeArg expressions ellipsis =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArg"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArg)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ellipsis"),
-          Core.fieldTerm = (Phantoms.unTTerm ellipsis)}]}))
-
-argumentsEllipsis :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm Bool
-argumentsEllipsis x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-        Core.projectionField = (Core.Name "ellipsis")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentsExpressions :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm [Syntax.Expression]
-argumentsExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentsTypeArg :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm (Maybe Syntax.Type)
-argumentsTypeArg x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-        Core.projectionField = (Core.Name "typeArg")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentsWithEllipsis :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Arguments
-argumentsWithEllipsis original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-              Core.projectionField = (Core.Name "typeArg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ellipsis"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-argumentsWithExpressions :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Arguments
-argumentsWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-              Core.projectionField = (Core.Name "typeArg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ellipsis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-              Core.projectionField = (Core.Name "ellipsis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-argumentsWithTypeArg :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Arguments
-argumentsWithTypeArg original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArg"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ellipsis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Arguments"),
-              Core.projectionField = (Core.Name "ellipsis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayType :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ArrayType
-arrayType length element =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm length)},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)}]}))
-
-arrayTypeElement :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Type
-arrayTypeElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeLength :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Expression
-arrayTypeLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeWithElement :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayTypeWithLength :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignOpAdd :: Phantoms.TTerm Syntax.AddOp -> Phantoms.TTerm Syntax.AssignOp
-assignOpAdd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignOpMul :: Phantoms.TTerm Syntax.MulOp -> Phantoms.TTerm Syntax.AssignOp
-assignOpMul x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mul"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignOpSimple :: Phantoms.TTerm Syntax.AssignOp
-assignOpSimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.AssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignment :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.AssignOp -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Assignment
-assignment lhs op rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-assignmentLhs :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm [Syntax.Expression]
-assignmentLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentOp :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignOp
-assignmentOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentRhs :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm [Syntax.Expression]
-assignmentRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentWithLhs :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Assignment
-assignmentWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentWithOp :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignOp -> Phantoms.TTerm Syntax.Assignment
-assignmentWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentWithRhs :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Assignment
-assignmentWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Assignment"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-basicLitFloat :: Phantoms.TTerm Syntax.FloatLit -> Phantoms.TTerm Syntax.BasicLit
-basicLitFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BasicLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-basicLitImaginary :: Phantoms.TTerm Syntax.ImaginaryLit -> Phantoms.TTerm Syntax.BasicLit
-basicLitImaginary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BasicLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "imaginary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-basicLitInt :: Phantoms.TTerm Syntax.IntLit -> Phantoms.TTerm Syntax.BasicLit
-basicLitInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BasicLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-basicLitRune :: Phantoms.TTerm Syntax.RuneLit -> Phantoms.TTerm Syntax.BasicLit
-basicLitRune x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BasicLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rune"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-basicLitString :: Phantoms.TTerm Syntax.StringLit -> Phantoms.TTerm Syntax.BasicLit
-basicLitString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BasicLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binaryExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryOp -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExpr left op right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryExprLeft :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression
-binaryExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExprOp :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.BinaryOp
-binaryExprOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExprRight :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression
-binaryExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExprWithLeft :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExprWithOp :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.BinaryOp -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExprWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExprWithRight :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOpAdd :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpAnd :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitClear :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitClear =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitClear"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitwiseAnd :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitwiseAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAnd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitwiseOr :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitwiseOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitwiseXor :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitwiseXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpDivide :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpEqual :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpGreater :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpGreater =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greater"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpGreaterEqual :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpGreaterEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpLeftShift :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpLeftShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpLess :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpLess =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "less"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpLessEqual :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpLessEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpMultiply :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpNotEqual :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpOr :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpRemainder :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpRemainder =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "remainder"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpRightShift :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpRightShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpSubtract :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpSubtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-block :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.Block
-block x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.Block"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-breakStmt :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.BreakStmt
-breakStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.BreakStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-callExpr :: Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm Syntax.CallExpr
-callExpr function arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-callExprArguments :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.Arguments
-callExprArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExprFunction :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-callExprFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExprWithArguments :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm Syntax.CallExpr
-callExprWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-callExprWithFunction :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.CallExpr
-callExprWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.CallExpr"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-channelDirectionBidirectional :: Phantoms.TTerm Syntax.ChannelDirection
-channelDirectionBidirectional =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ChannelDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bidirectional"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-channelDirectionReceive :: Phantoms.TTerm Syntax.ChannelDirection
-channelDirectionReceive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ChannelDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "receive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-channelDirectionSend :: Phantoms.TTerm Syntax.ChannelDirection
-channelDirectionSend =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ChannelDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "send"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-channelType :: Phantoms.TTerm Syntax.ChannelDirection -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ChannelType
-channelType direction element =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm direction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)}]}))
-
-channelTypeDirection :: Phantoms.TTerm Syntax.ChannelType -> Phantoms.TTerm Syntax.ChannelDirection
-channelTypeDirection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-        Core.projectionField = (Core.Name "direction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-channelTypeElement :: Phantoms.TTerm Syntax.ChannelType -> Phantoms.TTerm Syntax.Type
-channelTypeElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-channelTypeWithDirection :: Phantoms.TTerm Syntax.ChannelType -> Phantoms.TTerm Syntax.ChannelDirection -> Phantoms.TTerm Syntax.ChannelType
-channelTypeWithDirection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-channelTypeWithElement :: Phantoms.TTerm Syntax.ChannelType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ChannelType
-channelTypeWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ChannelType"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-commCaseDefault :: Phantoms.TTerm Syntax.CommCase
-commCaseDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.CommCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commCaseReceive :: Phantoms.TTerm Syntax.ReceiveCase -> Phantoms.TTerm Syntax.CommCase
-commCaseReceive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.CommCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "receive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commCaseSend :: Phantoms.TTerm Syntax.SendStmt -> Phantoms.TTerm Syntax.CommCase
-commCaseSend x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.CommCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "send"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commClause :: Phantoms.TTerm Syntax.CommCase -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.CommClause
-commClause case_ statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm case_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-commClauseCase :: Phantoms.TTerm Syntax.CommClause -> Phantoms.TTerm Syntax.CommCase
-commClauseCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-        Core.projectionField = (Core.Name "case")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commClauseStatements :: Phantoms.TTerm Syntax.CommClause -> Phantoms.TTerm [Syntax.Statement]
-commClauseStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commClauseWithCase :: Phantoms.TTerm Syntax.CommClause -> Phantoms.TTerm Syntax.CommCase -> Phantoms.TTerm Syntax.CommClause
-commClauseWithCase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commClauseWithStatements :: Phantoms.TTerm Syntax.CommClause -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.CommClause
-commClauseWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.CommClause"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compositeLit :: Phantoms.TTerm Syntax.LiteralType -> Phantoms.TTerm Syntax.LiteralValue -> Phantoms.TTerm Syntax.CompositeLit
-compositeLit type_ value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CompositeLit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-compositeLitType :: Phantoms.TTerm Syntax.CompositeLit -> Phantoms.TTerm Syntax.LiteralType
-compositeLitType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.CompositeLit"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeLitValue :: Phantoms.TTerm Syntax.CompositeLit -> Phantoms.TTerm Syntax.LiteralValue
-compositeLitValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.CompositeLit"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeLitWithType :: Phantoms.TTerm Syntax.CompositeLit -> Phantoms.TTerm Syntax.LiteralType -> Phantoms.TTerm Syntax.CompositeLit
-compositeLitWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CompositeLit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.go.syntax.CompositeLit"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compositeLitWithValue :: Phantoms.TTerm Syntax.CompositeLit -> Phantoms.TTerm Syntax.LiteralValue -> Phantoms.TTerm Syntax.CompositeLit
-compositeLitWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.CompositeLit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.CompositeLit"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constDecl :: Phantoms.TTerm [Syntax.ConstSpec] -> Phantoms.TTerm Syntax.ConstDecl
-constDecl x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ConstDecl"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constSpec :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ConstSpec
-constSpec names type_ values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-constSpecNames :: Phantoms.TTerm Syntax.ConstSpec -> Phantoms.TTerm [Syntax.Identifier]
-constSpecNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constSpecType :: Phantoms.TTerm Syntax.ConstSpec -> Phantoms.TTerm (Maybe Syntax.Type)
-constSpecType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constSpecValues :: Phantoms.TTerm Syntax.ConstSpec -> Phantoms.TTerm [Syntax.Expression]
-constSpecValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constSpecWithNames :: Phantoms.TTerm Syntax.ConstSpec -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.ConstSpec
-constSpecWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constSpecWithType :: Phantoms.TTerm Syntax.ConstSpec -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ConstSpec
-constSpecWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constSpecWithValues :: Phantoms.TTerm Syntax.ConstSpec -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ConstSpec
-constSpecWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ConstSpec"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-continueStmt :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ContinueStmt
-continueStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ContinueStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-conversion :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Conversion
-conversion type_ expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-conversionExpression :: Phantoms.TTerm Syntax.Conversion -> Phantoms.TTerm Syntax.Expression
-conversionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conversionType :: Phantoms.TTerm Syntax.Conversion -> Phantoms.TTerm Syntax.Type
-conversionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conversionWithExpression :: Phantoms.TTerm Syntax.Conversion -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Conversion
-conversionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conversionWithType :: Phantoms.TTerm Syntax.Conversion -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Conversion
-conversionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Conversion"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-declarationConst :: Phantoms.TTerm Syntax.ConstDecl -> Phantoms.TTerm Syntax.Declaration
-declarationConst x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationType :: Phantoms.TTerm Syntax.TypeDecl -> Phantoms.TTerm Syntax.Declaration
-declarationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declarationVar :: Phantoms.TTerm Syntax.VarDecl -> Phantoms.TTerm Syntax.Declaration
-declarationVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-deferStmt :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DeferStmt
-deferStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.DeferStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-elementExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Element
-elementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Element"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementList :: Phantoms.TTerm [Syntax.KeyedElement] -> Phantoms.TTerm Syntax.ElementList
-elementList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ElementList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-elementLiteral :: Phantoms.TTerm Syntax.LiteralValue -> Phantoms.TTerm Syntax.Element
-elementLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Element"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elseClauseBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ElseClause
-elseClauseBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ElseClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elseClauseIf :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm Syntax.ElseClause
-elseClauseIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ElseClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-embeddedField :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm (Maybe Syntax.Tag) -> Phantoms.TTerm Syntax.EmbeddedField
-embeddedField pointer type_ tag =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm pointer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Phantoms.unTTerm tag)}]}))
-
-embeddedFieldPointer :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm Bool
-embeddedFieldPointer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-        Core.projectionField = (Core.Name "pointer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-embeddedFieldTag :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm (Maybe Syntax.Tag)
-embeddedFieldTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-        Core.projectionField = (Core.Name "tag")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-embeddedFieldType :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm Syntax.TypeName
-embeddedFieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-embeddedFieldWithPointer :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.EmbeddedField
-embeddedFieldWithPointer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-              Core.projectionField = (Core.Name "tag")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-embeddedFieldWithTag :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm (Maybe Syntax.Tag) -> Phantoms.TTerm Syntax.EmbeddedField
-embeddedFieldWithTag original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-              Core.projectionField = (Core.Name "pointer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-embeddedFieldWithType :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.EmbeddedField
-embeddedFieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pointer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-              Core.projectionField = (Core.Name "pointer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.EmbeddedField"),
-              Core.projectionField = (Core.Name "tag")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-emptyStmt :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.EmptyStmt
-emptyStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.EmptyStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-exprCaseClause :: Phantoms.TTerm (Maybe [Syntax.Expression]) -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.ExprCaseClause
-exprCaseClause case_ statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm case_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-exprCaseClauseCase :: Phantoms.TTerm Syntax.ExprCaseClause -> Phantoms.TTerm (Maybe [Syntax.Expression])
-exprCaseClauseCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-        Core.projectionField = (Core.Name "case")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprCaseClauseStatements :: Phantoms.TTerm Syntax.ExprCaseClause -> Phantoms.TTerm [Syntax.Statement]
-exprCaseClauseStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprCaseClauseWithCase :: Phantoms.TTerm Syntax.ExprCaseClause -> Phantoms.TTerm (Maybe [Syntax.Expression]) -> Phantoms.TTerm Syntax.ExprCaseClause
-exprCaseClauseWithCase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exprCaseClauseWithStatements :: Phantoms.TTerm Syntax.ExprCaseClause -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.ExprCaseClause
-exprCaseClauseWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprCaseClause"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exprSwitchStmt :: Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm [Syntax.ExprCaseClause] -> Phantoms.TTerm Syntax.ExprSwitchStmt
-exprSwitchStmt init expression cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-exprSwitchStmtCases :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm [Syntax.ExprCaseClause]
-exprSwitchStmtCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprSwitchStmtExpression :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm (Maybe Syntax.Expression)
-exprSwitchStmtExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprSwitchStmtInit :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm (Maybe Syntax.SimpleStmt)
-exprSwitchStmtInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprSwitchStmtWithCases :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm [Syntax.ExprCaseClause] -> Phantoms.TTerm Syntax.ExprSwitchStmt
-exprSwitchStmtWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exprSwitchStmtWithExpression :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ExprSwitchStmt
-exprSwitchStmtWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exprSwitchStmtWithInit :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.ExprSwitchStmt
-exprSwitchStmtWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ExprSwitchStmt"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-expressionBinary :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression
-expressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionStmt :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ExpressionStmt
-expressionStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ExpressionStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-expressionUnary :: Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.Expression
-expressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fallthroughStmt :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.FallthroughStmt
-fallthroughStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.FallthroughStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fieldDeclEmbedded :: Phantoms.TTerm Syntax.EmbeddedField -> Phantoms.TTerm Syntax.FieldDecl
-fieldDeclEmbedded x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.FieldDecl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "embedded"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldDeclNamed :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm Syntax.FieldDecl
-fieldDeclNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.FieldDecl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-floatLit :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.FloatLit
-floatLit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.FloatLit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-forClause :: Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.ForClause
-forClause init condition post =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "post"),
-          Core.fieldTerm = (Phantoms.unTTerm post)}]}))
-
-forClauseCondition :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm (Maybe Syntax.Expression)
-forClauseCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forClauseInit :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm (Maybe Syntax.SimpleStmt)
-forClauseInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forClauseOrRangeClause :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm Syntax.ForClauseOrRange
-forClauseOrRangeClause x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ForClauseOrRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "clause"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forClauseOrRangeCondition :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForClauseOrRange
-forClauseOrRangeCondition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ForClauseOrRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "condition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forClauseOrRangeRange :: Phantoms.TTerm Syntax.RangeClause -> Phantoms.TTerm Syntax.ForClauseOrRange
-forClauseOrRangeRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ForClauseOrRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forClausePost :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm (Maybe Syntax.SimpleStmt)
-forClausePost x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-        Core.projectionField = (Core.Name "post")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forClauseWithCondition :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ForClause
-forClauseWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "post"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-              Core.projectionField = (Core.Name "post")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forClauseWithInit :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.ForClause
-forClauseWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "post"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-              Core.projectionField = (Core.Name "post")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forClauseWithPost :: Phantoms.TTerm Syntax.ForClause -> Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.ForClause
-forClauseWithPost original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForClause"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "post"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStmt :: Phantoms.TTerm (Maybe Syntax.ForClauseOrRange) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ForStmt
-forStmt clause body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clause"),
-          Core.fieldTerm = (Phantoms.unTTerm clause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forStmtBody :: Phantoms.TTerm Syntax.ForStmt -> Phantoms.TTerm Syntax.Block
-forStmtBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStmtClause :: Phantoms.TTerm Syntax.ForStmt -> Phantoms.TTerm (Maybe Syntax.ForClauseOrRange)
-forStmtClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-        Core.projectionField = (Core.Name "clause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStmtWithBody :: Phantoms.TTerm Syntax.ForStmt -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ForStmt
-forStmtWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-              Core.projectionField = (Core.Name "clause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStmtWithClause :: Phantoms.TTerm Syntax.ForStmt -> Phantoms.TTerm (Maybe Syntax.ForClauseOrRange) -> Phantoms.TTerm Syntax.ForStmt
-forStmtWithClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ForStmt"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fullSlice :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FullSlice
-fullSlice low high max =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Phantoms.unTTerm low)},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Phantoms.unTTerm high)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm max)}]}))
-
-fullSliceHigh :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm Syntax.Expression
-fullSliceHigh x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-        Core.projectionField = (Core.Name "high")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fullSliceLow :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm (Maybe Syntax.Expression)
-fullSliceLow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-        Core.projectionField = (Core.Name "low")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fullSliceMax :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm Syntax.Expression
-fullSliceMax x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-        Core.projectionField = (Core.Name "max")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fullSliceWithHigh :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FullSlice
-fullSliceWithHigh original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-              Core.projectionField = (Core.Name "low")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fullSliceWithLow :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FullSlice
-fullSliceWithLow original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-              Core.projectionField = (Core.Name "high")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fullSliceWithMax :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FullSlice
-fullSliceWithMax original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-              Core.projectionField = (Core.Name "low")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FullSlice"),
-              Core.projectionField = (Core.Name "high")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionBody :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.FunctionBody
-functionBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.FunctionBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-functionDecl :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeParameters) -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm (Maybe Syntax.FunctionBody) -> Phantoms.TTerm Syntax.FunctionDecl
-functionDecl name typeParams signature body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm signature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-functionDeclBody :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm (Maybe Syntax.FunctionBody)
-functionDeclBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclName :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm Syntax.Identifier
-functionDeclName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclSignature :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm Syntax.Signature
-functionDeclSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-        Core.projectionField = (Core.Name "signature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclTypeParams :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm (Maybe Syntax.TypeParameters)
-functionDeclTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-        Core.projectionField = (Core.Name "typeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclWithBody :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm (Maybe Syntax.FunctionBody) -> Phantoms.TTerm Syntax.FunctionDecl
-functionDeclWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionDeclWithName :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FunctionDecl
-functionDeclWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclWithSignature :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.FunctionDecl
-functionDeclWithSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclWithTypeParams :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm (Maybe Syntax.TypeParameters) -> Phantoms.TTerm Syntax.FunctionDecl
-functionDeclWithTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionDecl"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionLit :: Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.FunctionLit
-functionLit signature body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm signature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-functionLitBody :: Phantoms.TTerm Syntax.FunctionLit -> Phantoms.TTerm Syntax.FunctionBody
-functionLitBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionLitSignature :: Phantoms.TTerm Syntax.FunctionLit -> Phantoms.TTerm Syntax.Signature
-functionLitSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-        Core.projectionField = (Core.Name "signature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionLitWithBody :: Phantoms.TTerm Syntax.FunctionLit -> Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.FunctionLit
-functionLitWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionLitWithSignature :: Phantoms.TTerm Syntax.FunctionLit -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.FunctionLit
-functionLitWithSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.FunctionLit"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionType :: Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.FunctionType
-functionType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.FunctionType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-goStmt :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.GoStmt
-goStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.GoStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-gotoStmt :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.GotoStmt
-gotoStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.GotoStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-identifier :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Identifier
-identifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.Identifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-ifStmt :: Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.ElseClause) -> Phantoms.TTerm Syntax.IfStmt
-ifStmt init condition then_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm then_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-ifStmtCondition :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm Syntax.Expression
-ifStmtCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStmtElse :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm (Maybe Syntax.ElseClause)
-ifStmtElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStmtInit :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm (Maybe Syntax.SimpleStmt)
-ifStmtInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStmtThen :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm Syntax.Block
-ifStmtThen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-        Core.projectionField = (Core.Name "then")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStmtWithCondition :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfStmt
-ifStmtWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStmtWithElse :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm (Maybe Syntax.ElseClause) -> Phantoms.TTerm Syntax.IfStmt
-ifStmtWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifStmtWithInit :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.IfStmt
-ifStmtWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStmtWithThen :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.IfStmt
-ifStmtWithThen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IfStmt"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-imaginaryLit :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.ImaginaryLit
-imaginaryLit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ImaginaryLit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importAliasDot :: Phantoms.TTerm Syntax.ImportAlias
-importAliasDot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ImportAlias"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-importAliasName :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImportAlias
-importAliasName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.ImportAlias"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importDecl :: Phantoms.TTerm [Syntax.ImportSpec] -> Phantoms.TTerm Syntax.ImportDecl
-importDecl x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ImportDecl"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importPath :: Phantoms.TTerm Syntax.StringLit -> Phantoms.TTerm Syntax.ImportPath
-importPath x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ImportPath"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importSpec :: Phantoms.TTerm (Maybe Syntax.ImportAlias) -> Phantoms.TTerm Syntax.ImportPath -> Phantoms.TTerm Syntax.ImportSpec
-importSpec alias path =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)}]}))
-
-importSpecAlias :: Phantoms.TTerm Syntax.ImportSpec -> Phantoms.TTerm (Maybe Syntax.ImportAlias)
-importSpecAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importSpecPath :: Phantoms.TTerm Syntax.ImportSpec -> Phantoms.TTerm Syntax.ImportPath
-importSpecPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importSpecWithAlias :: Phantoms.TTerm Syntax.ImportSpec -> Phantoms.TTerm (Maybe Syntax.ImportAlias) -> Phantoms.TTerm Syntax.ImportSpec
-importSpecWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importSpecWithPath :: Phantoms.TTerm Syntax.ImportSpec -> Phantoms.TTerm Syntax.ImportPath -> Phantoms.TTerm Syntax.ImportSpec
-importSpecWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ImportSpec"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-incDecStmt :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IncDecStmt
-incDecStmt expression increment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Phantoms.unTTerm increment)}]}))
-
-incDecStmtExpression :: Phantoms.TTerm Syntax.IncDecStmt -> Phantoms.TTerm Syntax.Expression
-incDecStmtExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-incDecStmtIncrement :: Phantoms.TTerm Syntax.IncDecStmt -> Phantoms.TTerm Bool
-incDecStmtIncrement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-        Core.projectionField = (Core.Name "increment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-incDecStmtWithExpression :: Phantoms.TTerm Syntax.IncDecStmt -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IncDecStmt
-incDecStmtWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-              Core.projectionField = (Core.Name "increment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-incDecStmtWithIncrement :: Phantoms.TTerm Syntax.IncDecStmt -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IncDecStmt
-incDecStmtWithIncrement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IncDecStmt"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "increment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-index :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Index
-index x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.Index"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-indexExpr :: Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IndexExpr
-indexExpr expr index =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm index)}]}))
-
-indexExprExpr :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-indexExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexExprIndex :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression
-indexExprIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-        Core.projectionField = (Core.Name "index")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexExprWithExpr :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.IndexExpr
-indexExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-              Core.projectionField = (Core.Name "index")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-indexExprWithIndex :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IndexExpr
-indexExprWithIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.IndexExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-intLit :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.IntLit
-intLit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.IntLit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-interfaceElemMethod :: Phantoms.TTerm Syntax.MethodElem -> Phantoms.TTerm Syntax.InterfaceElem
-interfaceElemMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.InterfaceElem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceElemType :: Phantoms.TTerm Syntax.TypeElem -> Phantoms.TTerm Syntax.InterfaceElem
-interfaceElemType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.InterfaceElem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceType :: Phantoms.TTerm [Syntax.InterfaceElem] -> Phantoms.TTerm Syntax.InterfaceType
-interfaceType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.InterfaceType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-interpretedStringLit :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.InterpretedStringLit
-interpretedStringLit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.InterpretedStringLit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-keyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Key
-keyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Key"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keyField :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Key
-keyField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Key"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "field"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keyLiteral :: Phantoms.TTerm Syntax.LiteralValue -> Phantoms.TTerm Syntax.Key
-keyLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Key"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keyedElement :: Phantoms.TTerm (Maybe Syntax.Key) -> Phantoms.TTerm Syntax.Element -> Phantoms.TTerm Syntax.KeyedElement
-keyedElement key element =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.KeyedElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)}]}))
-
-keyedElementElement :: Phantoms.TTerm Syntax.KeyedElement -> Phantoms.TTerm Syntax.Element
-keyedElementElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.KeyedElement"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyedElementKey :: Phantoms.TTerm Syntax.KeyedElement -> Phantoms.TTerm (Maybe Syntax.Key)
-keyedElementKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.KeyedElement"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyedElementWithElement :: Phantoms.TTerm Syntax.KeyedElement -> Phantoms.TTerm Syntax.Element -> Phantoms.TTerm Syntax.KeyedElement
-keyedElementWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.KeyedElement"),
-      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.go.syntax.KeyedElement"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-keyedElementWithKey :: Phantoms.TTerm Syntax.KeyedElement -> Phantoms.TTerm (Maybe Syntax.Key) -> Phantoms.TTerm Syntax.KeyedElement
-keyedElementWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.KeyedElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.KeyedElement"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledStmt :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStmt
-labeledStmt label statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.LabeledStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-labeledStmtLabel :: Phantoms.TTerm Syntax.LabeledStmt -> Phantoms.TTerm Syntax.Identifier
-labeledStmtLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.LabeledStmt"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStmtStatement :: Phantoms.TTerm Syntax.LabeledStmt -> Phantoms.TTerm Syntax.Statement
-labeledStmtStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.LabeledStmt"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStmtWithLabel :: Phantoms.TTerm Syntax.LabeledStmt -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LabeledStmt
-labeledStmtWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.LabeledStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.LabeledStmt"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledStmtWithStatement :: Phantoms.TTerm Syntax.LabeledStmt -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStmt
-labeledStmtWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.LabeledStmt"),
-      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.go.syntax.LabeledStmt"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalBasic :: Phantoms.TTerm Syntax.BasicLit -> Phantoms.TTerm Syntax.Literal
-literalBasic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "basic"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalComposite :: Phantoms.TTerm Syntax.CompositeLit -> Phantoms.TTerm Syntax.Literal
-literalComposite x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "composite"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalFunction :: Phantoms.TTerm Syntax.FunctionLit -> Phantoms.TTerm Syntax.Literal
-literalFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTypeArray :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.LiteralType
-literalTypeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTypeInferredArray :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.LiteralType
-literalTypeInferredArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inferredArray"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTypeMap :: Phantoms.TTerm Syntax.MapType -> Phantoms.TTerm Syntax.LiteralType
-literalTypeMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTypeName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.LiteralType
-literalTypeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTypeSlice :: Phantoms.TTerm Syntax.SliceType -> Phantoms.TTerm Syntax.LiteralType
-literalTypeSlice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTypeStruct :: Phantoms.TTerm Syntax.StructType -> Phantoms.TTerm Syntax.LiteralType
-literalTypeStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.LiteralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalValue :: Phantoms.TTerm [Syntax.KeyedElement] -> Phantoms.TTerm Syntax.LiteralValue
-literalValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.LiteralValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-mapType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MapType
-mapType key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-mapTypeKey :: Phantoms.TTerm Syntax.MapType -> Phantoms.TTerm Syntax.Type
-mapTypeKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MapType"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeValue :: Phantoms.TTerm Syntax.MapType -> Phantoms.TTerm Syntax.Type
-mapTypeValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MapType"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeWithKey :: Phantoms.TTerm Syntax.MapType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MapType
-mapTypeWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.go.syntax.MapType"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapTypeWithValue :: Phantoms.TTerm Syntax.MapType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MapType
-mapTypeWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MapType"),
-      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.go.syntax.MapType"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodDecl :: Phantoms.TTerm Syntax.Receiver -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm (Maybe Syntax.FunctionBody) -> Phantoms.TTerm Syntax.MethodDecl
-methodDecl receiver name signature body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Phantoms.unTTerm receiver)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm signature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-methodDeclBody :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm (Maybe Syntax.FunctionBody)
-methodDeclBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclName :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.Identifier
-methodDeclName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclReceiver :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.Receiver
-methodDeclReceiver x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-        Core.projectionField = (Core.Name "receiver")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclSignature :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.Signature
-methodDeclSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-        Core.projectionField = (Core.Name "signature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclWithBody :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm (Maybe Syntax.FunctionBody) -> Phantoms.TTerm Syntax.MethodDecl
-methodDeclWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodDeclWithName :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodDecl
-methodDeclWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDeclWithReceiver :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.Receiver -> Phantoms.TTerm Syntax.MethodDecl
-methodDeclWithReceiver original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDeclWithSignature :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.MethodDecl
-methodDeclWithSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodDecl"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodElem :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.MethodElem
-methodElem name signature =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm signature)}]}))
-
-methodElemName :: Phantoms.TTerm Syntax.MethodElem -> Phantoms.TTerm Syntax.Identifier
-methodElemName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodElemSignature :: Phantoms.TTerm Syntax.MethodElem -> Phantoms.TTerm Syntax.Signature
-methodElemSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-        Core.projectionField = (Core.Name "signature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodElemWithName :: Phantoms.TTerm Syntax.MethodElem -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodElem
-methodElemWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-              Core.projectionField = (Core.Name "signature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodElemWithSignature :: Phantoms.TTerm Syntax.MethodElem -> Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.MethodElem
-methodElemWithSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodElem"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "signature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodExpr :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodExpr
-methodExpr receiver method =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Phantoms.unTTerm receiver)},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Phantoms.unTTerm method)}]}))
-
-methodExprMethod :: Phantoms.TTerm Syntax.MethodExpr -> Phantoms.TTerm Syntax.Identifier
-methodExprMethod x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-        Core.projectionField = (Core.Name "method")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodExprReceiver :: Phantoms.TTerm Syntax.MethodExpr -> Phantoms.TTerm Syntax.Type
-methodExprReceiver x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-        Core.projectionField = (Core.Name "receiver")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodExprWithMethod :: Phantoms.TTerm Syntax.MethodExpr -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodExpr
-methodExprWithMethod original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodExprWithReceiver :: Phantoms.TTerm Syntax.MethodExpr -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.MethodExpr
-methodExprWithReceiver original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.MethodExpr"),
-              Core.projectionField = (Core.Name "method")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-module_ :: Phantoms.TTerm Syntax.PackageClause -> Phantoms.TTerm [Syntax.ImportDecl] -> Phantoms.TTerm [Syntax.TopLevelDecl] -> Phantoms.TTerm Syntax.Module
-module_ package imports declarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))
-
-moduleDeclarations :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.TopLevelDecl]
-moduleDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-        Core.projectionField = (Core.Name "declarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleImports :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.ImportDecl]
-moduleImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modulePackage :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm Syntax.PackageClause
-modulePackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleWithDeclarations :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.TopLevelDecl] -> Phantoms.TTerm Syntax.Module
-moduleWithDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleWithImports :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.ImportDecl] -> Phantoms.TTerm Syntax.Module
-moduleWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleWithPackage :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm Syntax.PackageClause -> Phantoms.TTerm Syntax.Module
-moduleWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Module"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mulOpBitClear :: Phantoms.TTerm Syntax.MulOp
-mulOpBitClear =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitClear"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mulOpBitwiseAnd :: Phantoms.TTerm Syntax.MulOp
-mulOpBitwiseAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAnd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mulOpDivide :: Phantoms.TTerm Syntax.MulOp
-mulOpDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mulOpLeftShift :: Phantoms.TTerm Syntax.MulOp
-mulOpLeftShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mulOpMultiply :: Phantoms.TTerm Syntax.MulOp
-mulOpMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mulOpRemainder :: Phantoms.TTerm Syntax.MulOp
-mulOpRemainder =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "remainder"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mulOpRightShift :: Phantoms.TTerm Syntax.MulOp
-mulOpRightShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.MulOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-namedField :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.Tag) -> Phantoms.TTerm Syntax.NamedField
-namedField names type_ tag =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Phantoms.unTTerm tag)}]}))
-
-namedFieldNames :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm [Syntax.Identifier]
-namedFieldNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedFieldTag :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm (Maybe Syntax.Tag)
-namedFieldTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-        Core.projectionField = (Core.Name "tag")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedFieldType :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm Syntax.Type
-namedFieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedFieldWithNames :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.NamedField
-namedFieldWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-              Core.projectionField = (Core.Name "tag")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedFieldWithTag :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm (Maybe Syntax.Tag) -> Phantoms.TTerm Syntax.NamedField
-namedFieldWithTag original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedFieldWithType :: Phantoms.TTerm Syntax.NamedField -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.NamedField
-namedFieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tag"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.NamedField"),
-              Core.projectionField = (Core.Name "tag")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operandLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Operand
-operandLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Operand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operandName :: Phantoms.TTerm Syntax.OperandName -> Phantoms.TTerm Syntax.Operand
-operandName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Operand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operandNameName :: Phantoms.TTerm Syntax.OperandName -> Phantoms.TTerm Syntax.QualifiedIdent
-operandNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operandNameTypeArgs :: Phantoms.TTerm Syntax.OperandName -> Phantoms.TTerm [Syntax.Type]
-operandNameTypeArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-        Core.projectionField = (Core.Name "typeArgs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operandNameWithName :: Phantoms.TTerm Syntax.OperandName -> Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm Syntax.OperandName
-operandNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArgs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-              Core.projectionField = (Core.Name "typeArgs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operandNameWithTypeArgs :: Phantoms.TTerm Syntax.OperandName -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.OperandName
-operandNameWithTypeArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArgs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-operandName_ :: Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.OperandName
-operandName_ name typeArgs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.OperandName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArgs"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArgs)}]}))
-
-operandParen :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Operand
-operandParen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Operand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paren"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-packageClause :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.PackageClause
-packageClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.PackageClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-parameterDecl :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ParameterDecl
-parameterDecl names variadic type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variadic"),
-          Core.fieldTerm = (Phantoms.unTTerm variadic)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-parameterDeclNames :: Phantoms.TTerm Syntax.ParameterDecl -> Phantoms.TTerm [Syntax.Identifier]
-parameterDeclNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterDeclType :: Phantoms.TTerm Syntax.ParameterDecl -> Phantoms.TTerm Syntax.Type
-parameterDeclType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterDeclVariadic :: Phantoms.TTerm Syntax.ParameterDecl -> Phantoms.TTerm Bool
-parameterDeclVariadic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-        Core.projectionField = (Core.Name "variadic")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterDeclWithNames :: Phantoms.TTerm Syntax.ParameterDecl -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.ParameterDecl
-parameterDeclWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variadic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-              Core.projectionField = (Core.Name "variadic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterDeclWithType :: Phantoms.TTerm Syntax.ParameterDecl -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ParameterDecl
-parameterDeclWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variadic"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-              Core.projectionField = (Core.Name "variadic")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parameterDeclWithVariadic :: Phantoms.TTerm Syntax.ParameterDecl -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ParameterDecl
-parameterDeclWithVariadic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variadic"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ParameterDecl"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameters :: Phantoms.TTerm [Syntax.ParameterDecl] -> Phantoms.TTerm Syntax.Parameters
-parameters x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.Parameters"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-pointerType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.PointerType
-pointerType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.PointerType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-primaryExprCall :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprConversion :: Phantoms.TTerm Syntax.Conversion -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprConversion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conversion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprIndex :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprIndex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "index"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprMethodExpr :: Phantoms.TTerm Syntax.MethodExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprMethodExpr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "methodExpr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprOperand :: Phantoms.TTerm Syntax.Operand -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprOperand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "operand"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprSelector :: Phantoms.TTerm Syntax.SelectorExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprSelector x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "selector"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprSlice :: Phantoms.TTerm Syntax.SliceExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprSlice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryExprTypeAssertion :: Phantoms.TTerm Syntax.TypeAssertionExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-primaryExprTypeAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.PrimaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-qualifiedIdent :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QualifiedIdent
-qualifiedIdent package name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-qualifiedIdentName :: Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm Syntax.Identifier
-qualifiedIdentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedIdentPackage :: Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm (Maybe Syntax.Identifier)
-qualifiedIdentPackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedIdentWithName :: Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.QualifiedIdent
-qualifiedIdentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedIdentWithPackage :: Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.QualifiedIdent
-qualifiedIdentWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.QualifiedIdent"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeClause :: Phantoms.TTerm (Maybe Syntax.RangeVars) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RangeClause
-rangeClause vars expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vars"),
-          Core.fieldTerm = (Phantoms.unTTerm vars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-rangeClauseExpression :: Phantoms.TTerm Syntax.RangeClause -> Phantoms.TTerm Syntax.Expression
-rangeClauseExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeClauseVars :: Phantoms.TTerm Syntax.RangeClause -> Phantoms.TTerm (Maybe Syntax.RangeVars)
-rangeClauseVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-        Core.projectionField = (Core.Name "vars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeClauseWithExpression :: Phantoms.TTerm Syntax.RangeClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RangeClause
-rangeClauseWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-              Core.projectionField = (Core.Name "vars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeClauseWithVars :: Phantoms.TTerm Syntax.RangeClause -> Phantoms.TTerm (Maybe Syntax.RangeVars) -> Phantoms.TTerm Syntax.RangeClause
-rangeClauseWithVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.RangeClause"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeVarsAssign :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.RangeVars
-rangeVarsAssign x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RangeVars"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assign"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rangeVarsDeclare :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.RangeVars
-rangeVarsDeclare x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RangeVars"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declare"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rawStringLit :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.RawStringLit
-rawStringLit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.RawStringLit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-receiveCase :: Phantoms.TTerm (Maybe Syntax.RangeVars) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ReceiveCase
-receiveCase vars expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vars"),
-          Core.fieldTerm = (Phantoms.unTTerm vars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-receiveCaseExpression :: Phantoms.TTerm Syntax.ReceiveCase -> Phantoms.TTerm Syntax.Expression
-receiveCaseExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiveCaseVars :: Phantoms.TTerm Syntax.ReceiveCase -> Phantoms.TTerm (Maybe Syntax.RangeVars)
-receiveCaseVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-        Core.projectionField = (Core.Name "vars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiveCaseWithExpression :: Phantoms.TTerm Syntax.ReceiveCase -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ReceiveCase
-receiveCaseWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-              Core.projectionField = (Core.Name "vars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-receiveCaseWithVars :: Phantoms.TTerm Syntax.ReceiveCase -> Phantoms.TTerm (Maybe Syntax.RangeVars) -> Phantoms.TTerm Syntax.ReceiveCase
-receiveCaseWithVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ReceiveCase"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-receiver :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Receiver
-receiver name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-receiverName :: Phantoms.TTerm Syntax.Receiver -> Phantoms.TTerm (Maybe Syntax.Identifier)
-receiverName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiverType :: Phantoms.TTerm Syntax.Receiver -> Phantoms.TTerm Syntax.Type
-receiverType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiverWithName :: Phantoms.TTerm Syntax.Receiver -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.Receiver
-receiverWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-receiverWithType :: Phantoms.TTerm Syntax.Receiver -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Receiver
-receiverWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Receiver"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relOpEqual :: Phantoms.TTerm Syntax.RelOp
-relOpEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RelOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relOpGreater :: Phantoms.TTerm Syntax.RelOp
-relOpGreater =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RelOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greater"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relOpGreaterEqual :: Phantoms.TTerm Syntax.RelOp
-relOpGreaterEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RelOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relOpLess :: Phantoms.TTerm Syntax.RelOp
-relOpLess =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RelOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "less"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relOpLessEqual :: Phantoms.TTerm Syntax.RelOp
-relOpLessEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RelOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relOpNotEqual :: Phantoms.TTerm Syntax.RelOp
-relOpNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.RelOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-resultParameters :: Phantoms.TTerm Syntax.Parameters -> Phantoms.TTerm Syntax.Result
-resultParameters x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Result"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameters"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-resultType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Result
-resultType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Result"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnStmt :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ReturnStmt
-returnStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.ReturnStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-runeLit :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.RuneLit
-runeLit x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.RuneLit"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-selectStmt :: Phantoms.TTerm [Syntax.CommClause] -> Phantoms.TTerm Syntax.SelectStmt
-selectStmt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.SelectStmt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-selector :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Selector
-selector x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.Selector"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-selectorExpr :: Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.SelectorExpr
-selectorExpr expr selector =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "selector"),
-          Core.fieldTerm = (Phantoms.unTTerm selector)}]}))
-
-selectorExprExpr :: Phantoms.TTerm Syntax.SelectorExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-selectorExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectorExprSelector :: Phantoms.TTerm Syntax.SelectorExpr -> Phantoms.TTerm Syntax.Identifier
-selectorExprSelector x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-        Core.projectionField = (Core.Name "selector")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectorExprWithExpr :: Phantoms.TTerm Syntax.SelectorExpr -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.SelectorExpr
-selectorExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "selector"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-              Core.projectionField = (Core.Name "selector")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectorExprWithSelector :: Phantoms.TTerm Syntax.SelectorExpr -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.SelectorExpr
-selectorExprWithSelector original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SelectorExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selector"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sendStmt :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SendStmt
-sendStmt channel value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SendStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "channel"),
-          Core.fieldTerm = (Phantoms.unTTerm channel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-sendStmtChannel :: Phantoms.TTerm Syntax.SendStmt -> Phantoms.TTerm Syntax.Expression
-sendStmtChannel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SendStmt"),
-        Core.projectionField = (Core.Name "channel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sendStmtValue :: Phantoms.TTerm Syntax.SendStmt -> Phantoms.TTerm Syntax.Expression
-sendStmtValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SendStmt"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sendStmtWithChannel :: Phantoms.TTerm Syntax.SendStmt -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SendStmt
-sendStmtWithChannel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SendStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "channel"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.go.syntax.SendStmt"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sendStmtWithValue :: Phantoms.TTerm Syntax.SendStmt -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SendStmt
-sendStmtWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SendStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "channel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SendStmt"),
-              Core.projectionField = (Core.Name "channel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shortVarDecl :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ShortVarDecl
-shortVarDecl names values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-shortVarDeclNames :: Phantoms.TTerm Syntax.ShortVarDecl -> Phantoms.TTerm [Syntax.Identifier]
-shortVarDeclNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shortVarDeclValues :: Phantoms.TTerm Syntax.ShortVarDecl -> Phantoms.TTerm [Syntax.Expression]
-shortVarDeclValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shortVarDeclWithNames :: Phantoms.TTerm Syntax.ShortVarDecl -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.ShortVarDecl
-shortVarDeclWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shortVarDeclWithValues :: Phantoms.TTerm Syntax.ShortVarDecl -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ShortVarDecl
-shortVarDeclWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.ShortVarDecl"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-signature :: Phantoms.TTerm Syntax.Parameters -> Phantoms.TTerm (Maybe Syntax.Result) -> Phantoms.TTerm Syntax.Signature
-signature parameters result =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Signature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm result)}]}))
-
-signatureParameters :: Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.Parameters
-signatureParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Signature"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signatureResult :: Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm (Maybe Syntax.Result)
-signatureResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.Signature"),
-        Core.projectionField = (Core.Name "result")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signatureWithParameters :: Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm Syntax.Parameters -> Phantoms.TTerm Syntax.Signature
-signatureWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Signature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Signature"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-signatureWithResult :: Phantoms.TTerm Syntax.Signature -> Phantoms.TTerm (Maybe Syntax.Result) -> Phantoms.TTerm Syntax.Signature
-signatureWithResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.Signature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.Signature"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleSlice :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SimpleSlice
-simpleSlice low high =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Phantoms.unTTerm low)},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Phantoms.unTTerm high)}]}))
-
-simpleSliceHigh :: Phantoms.TTerm Syntax.SimpleSlice -> Phantoms.TTerm (Maybe Syntax.Expression)
-simpleSliceHigh x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-        Core.projectionField = (Core.Name "high")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleSliceLow :: Phantoms.TTerm Syntax.SimpleSlice -> Phantoms.TTerm (Maybe Syntax.Expression)
-simpleSliceLow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-        Core.projectionField = (Core.Name "low")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleSliceWithHigh :: Phantoms.TTerm Syntax.SimpleSlice -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SimpleSlice
-simpleSliceWithHigh original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-              Core.projectionField = (Core.Name "low")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleSliceWithLow :: Phantoms.TTerm Syntax.SimpleSlice -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SimpleSlice
-simpleSliceWithLow original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "low"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "high"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SimpleSlice"),
-              Core.projectionField = (Core.Name "high")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleStmtAssignment :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.SimpleStmt
-simpleStmtAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SimpleStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStmtEmpty :: Phantoms.TTerm Syntax.EmptyStmt -> Phantoms.TTerm Syntax.SimpleStmt
-simpleStmtEmpty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SimpleStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStmtExpression :: Phantoms.TTerm Syntax.ExpressionStmt -> Phantoms.TTerm Syntax.SimpleStmt
-simpleStmtExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SimpleStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStmtIncDec :: Phantoms.TTerm Syntax.IncDecStmt -> Phantoms.TTerm Syntax.SimpleStmt
-simpleStmtIncDec x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SimpleStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "incDec"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStmtSend :: Phantoms.TTerm Syntax.SendStmt -> Phantoms.TTerm Syntax.SimpleStmt
-simpleStmtSend x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SimpleStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "send"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStmtShortVarDecl :: Phantoms.TTerm Syntax.ShortVarDecl -> Phantoms.TTerm Syntax.SimpleStmt
-simpleStmtShortVarDecl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SimpleStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shortVarDecl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sliceExpr :: Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.Slice -> Phantoms.TTerm Syntax.SliceExpr
-sliceExpr expr slice =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "slice"),
-          Core.fieldTerm = (Phantoms.unTTerm slice)}]}))
-
-sliceExprExpr :: Phantoms.TTerm Syntax.SliceExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-sliceExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sliceExprSlice :: Phantoms.TTerm Syntax.SliceExpr -> Phantoms.TTerm Syntax.Slice
-sliceExprSlice x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-        Core.projectionField = (Core.Name "slice")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sliceExprWithExpr :: Phantoms.TTerm Syntax.SliceExpr -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.SliceExpr
-sliceExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "slice"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-              Core.projectionField = (Core.Name "slice")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sliceExprWithSlice :: Phantoms.TTerm Syntax.SliceExpr -> Phantoms.TTerm Syntax.Slice -> Phantoms.TTerm Syntax.SliceExpr
-sliceExprWithSlice original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SliceExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "slice"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sliceFull :: Phantoms.TTerm Syntax.FullSlice -> Phantoms.TTerm Syntax.Slice
-sliceFull x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Slice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "full"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sliceSimple :: Phantoms.TTerm Syntax.SimpleSlice -> Phantoms.TTerm Syntax.Slice
-sliceSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Slice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sliceType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.SliceType
-sliceType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.SliceType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-sourceFile :: Phantoms.TTerm Syntax.PackageClause -> Phantoms.TTerm [Syntax.ImportDecl] -> Phantoms.TTerm [Syntax.TopLevelDecl] -> Phantoms.TTerm Syntax.SourceFile
-sourceFile package imports declarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))
-
-sourceFileDeclarations :: Phantoms.TTerm Syntax.SourceFile -> Phantoms.TTerm [Syntax.TopLevelDecl]
-sourceFileDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-        Core.projectionField = (Core.Name "declarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourceFileImports :: Phantoms.TTerm Syntax.SourceFile -> Phantoms.TTerm [Syntax.ImportDecl]
-sourceFileImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourceFilePackage :: Phantoms.TTerm Syntax.SourceFile -> Phantoms.TTerm Syntax.PackageClause
-sourceFilePackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourceFileWithDeclarations :: Phantoms.TTerm Syntax.SourceFile -> Phantoms.TTerm [Syntax.TopLevelDecl] -> Phantoms.TTerm Syntax.SourceFile
-sourceFileWithDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sourceFileWithImports :: Phantoms.TTerm Syntax.SourceFile -> Phantoms.TTerm [Syntax.ImportDecl] -> Phantoms.TTerm Syntax.SourceFile
-sourceFileWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sourceFileWithPackage :: Phantoms.TTerm Syntax.SourceFile -> Phantoms.TTerm Syntax.PackageClause -> Phantoms.TTerm Syntax.SourceFile
-sourceFileWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.SourceFile"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statementBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.Statement
-statementBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementBreak :: Phantoms.TTerm Syntax.BreakStmt -> Phantoms.TTerm Syntax.Statement
-statementBreak x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementContinue :: Phantoms.TTerm Syntax.ContinueStmt -> Phantoms.TTerm Syntax.Statement
-statementContinue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementDeclaration :: Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm Syntax.Statement
-statementDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementDefer :: Phantoms.TTerm Syntax.DeferStmt -> Phantoms.TTerm Syntax.Statement
-statementDefer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "defer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementFallthrough :: Phantoms.TTerm Syntax.FallthroughStmt -> Phantoms.TTerm Syntax.Statement
-statementFallthrough x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fallthrough"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementFor :: Phantoms.TTerm Syntax.ForStmt -> Phantoms.TTerm Syntax.Statement
-statementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementGo :: Phantoms.TTerm Syntax.GoStmt -> Phantoms.TTerm Syntax.Statement
-statementGo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "go"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementGoto :: Phantoms.TTerm Syntax.GotoStmt -> Phantoms.TTerm Syntax.Statement
-statementGoto x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "goto"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementIf :: Phantoms.TTerm Syntax.IfStmt -> Phantoms.TTerm Syntax.Statement
-statementIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLabeled :: Phantoms.TTerm Syntax.LabeledStmt -> Phantoms.TTerm Syntax.Statement
-statementLabeled x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeled"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementReturn :: Phantoms.TTerm Syntax.ReturnStmt -> Phantoms.TTerm Syntax.Statement
-statementReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSelect :: Phantoms.TTerm Syntax.SelectStmt -> Phantoms.TTerm Syntax.Statement
-statementSelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSimple :: Phantoms.TTerm Syntax.SimpleStmt -> Phantoms.TTerm Syntax.Statement
-statementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSwitch :: Phantoms.TTerm Syntax.SwitchStmt -> Phantoms.TTerm Syntax.Statement
-statementSwitch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "switch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLitInterpreted :: Phantoms.TTerm Syntax.InterpretedStringLit -> Phantoms.TTerm Syntax.StringLit
-stringLitInterpreted x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.StringLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interpreted"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLitRaw :: Phantoms.TTerm Syntax.RawStringLit -> Phantoms.TTerm Syntax.StringLit
-stringLitRaw x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.StringLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "raw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structType :: Phantoms.TTerm [Syntax.FieldDecl] -> Phantoms.TTerm Syntax.StructType
-structType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.StructType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-switchStmtExpression :: Phantoms.TTerm Syntax.ExprSwitchStmt -> Phantoms.TTerm Syntax.SwitchStmt
-switchStmtExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SwitchStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-switchStmtType :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm Syntax.SwitchStmt
-switchStmtType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.SwitchStmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tag :: Phantoms.TTerm Syntax.StringLit -> Phantoms.TTerm Syntax.Tag
-tag x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.Tag"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-topLevelDeclDeclaration :: Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm Syntax.TopLevelDecl
-topLevelDeclDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TopLevelDecl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelDeclFunction :: Phantoms.TTerm Syntax.FunctionDecl -> Phantoms.TTerm Syntax.TopLevelDecl
-topLevelDeclFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TopLevelDecl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelDeclMethod :: Phantoms.TTerm Syntax.MethodDecl -> Phantoms.TTerm Syntax.TopLevelDecl
-topLevelDeclMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TopLevelDecl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeAssertion :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeAssertion
-typeAssertion x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.TypeAssertion"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeAssertionExpr :: Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeAssertionExpr
-typeAssertionExpr expr type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeAssertionExprExpr :: Phantoms.TTerm Syntax.TypeAssertionExpr -> Phantoms.TTerm Syntax.PrimaryExpr
-typeAssertionExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAssertionExprType :: Phantoms.TTerm Syntax.TypeAssertionExpr -> Phantoms.TTerm Syntax.Type
-typeAssertionExprType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAssertionExprWithExpr :: Phantoms.TTerm Syntax.TypeAssertionExpr -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.TypeAssertionExpr
-typeAssertionExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAssertionExprWithType :: Phantoms.TTerm Syntax.TypeAssertionExpr -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeAssertionExpr
-typeAssertionExprWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeAssertionExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeCaseClause :: Phantoms.TTerm (Maybe [Syntax.Type]) -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.TypeCaseClause
-typeCaseClause case_ statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm case_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-typeCaseClauseCase :: Phantoms.TTerm Syntax.TypeCaseClause -> Phantoms.TTerm (Maybe [Syntax.Type])
-typeCaseClauseCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-        Core.projectionField = (Core.Name "case")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCaseClauseStatements :: Phantoms.TTerm Syntax.TypeCaseClause -> Phantoms.TTerm [Syntax.Statement]
-typeCaseClauseStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCaseClauseWithCase :: Phantoms.TTerm Syntax.TypeCaseClause -> Phantoms.TTerm (Maybe [Syntax.Type]) -> Phantoms.TTerm Syntax.TypeCaseClause
-typeCaseClauseWithCase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeCaseClauseWithStatements :: Phantoms.TTerm Syntax.TypeCaseClause -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.TypeCaseClause
-typeCaseClauseWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeCaseClause"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeConstraint :: Phantoms.TTerm Syntax.TypeElem -> Phantoms.TTerm Syntax.TypeConstraint
-typeConstraint x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.TypeConstraint"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeDecl :: Phantoms.TTerm [Syntax.TypeSpec] -> Phantoms.TTerm Syntax.TypeDecl
-typeDecl x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.TypeDecl"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeDef :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeParameters) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeDef
-typeDef name typeParams type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeDefName :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm Syntax.Identifier
-typeDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeDefType :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm Syntax.Type
-typeDefType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeDefTypeParams :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm (Maybe Syntax.TypeParameters)
-typeDefTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-        Core.projectionField = (Core.Name "typeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeDefWithName :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.TypeDef
-typeDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeDefWithType :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeDef
-typeDefWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeDefWithTypeParams :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm (Maybe Syntax.TypeParameters) -> Phantoms.TTerm Syntax.TypeDef
-typeDefWithTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeElem :: Phantoms.TTerm [Syntax.TypeTerm] -> Phantoms.TTerm Syntax.TypeElem
-typeElem x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.TypeElem"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeLitArray :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.TypeLit
-typeLitArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitChannel :: Phantoms.TTerm Syntax.ChannelType -> Phantoms.TTerm Syntax.TypeLit
-typeLitChannel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "channel"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitFunction :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.TypeLit
-typeLitFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitInterface :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.TypeLit
-typeLitInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitMap :: Phantoms.TTerm Syntax.MapType -> Phantoms.TTerm Syntax.TypeLit
-typeLitMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitPointer :: Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm Syntax.TypeLit
-typeLitPointer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitSlice :: Phantoms.TTerm Syntax.SliceType -> Phantoms.TTerm Syntax.TypeLit
-typeLitSlice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLitStruct :: Phantoms.TTerm Syntax.StructType -> Phantoms.TTerm Syntax.TypeLit
-typeLitStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeLit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLiteral :: Phantoms.TTerm Syntax.TypeLit -> Phantoms.TTerm Syntax.Type
-typeLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.Type
-typeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNameName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.QualifiedIdent
-typeNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeNameTypeArgs :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm [Syntax.Type]
-typeNameTypeArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-        Core.projectionField = (Core.Name "typeArgs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeNameWithName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm Syntax.TypeName
-typeNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArgs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-              Core.projectionField = (Core.Name "typeArgs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeNameWithTypeArgs :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.TypeName
-typeNameWithTypeArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArgs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeName_ :: Phantoms.TTerm Syntax.QualifiedIdent -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.TypeName
-typeName_ name typeArgs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArgs"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArgs)}]}))
-
-typeParamDecl :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.TypeConstraint -> Phantoms.TTerm Syntax.TypeParamDecl
-typeParamDecl names constraint =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Phantoms.unTTerm constraint)}]}))
-
-typeParamDeclConstraint :: Phantoms.TTerm Syntax.TypeParamDecl -> Phantoms.TTerm Syntax.TypeConstraint
-typeParamDeclConstraint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-        Core.projectionField = (Core.Name "constraint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParamDeclNames :: Phantoms.TTerm Syntax.TypeParamDecl -> Phantoms.TTerm [Syntax.Identifier]
-typeParamDeclNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParamDeclWithConstraint :: Phantoms.TTerm Syntax.TypeParamDecl -> Phantoms.TTerm Syntax.TypeConstraint -> Phantoms.TTerm Syntax.TypeParamDecl
-typeParamDeclWithConstraint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeParamDeclWithNames :: Phantoms.TTerm Syntax.TypeParamDecl -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.TypeParamDecl
-typeParamDeclWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeParamDecl"),
-              Core.projectionField = (Core.Name "constraint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameters :: Phantoms.TTerm [Syntax.TypeParamDecl] -> Phantoms.TTerm Syntax.TypeParameters
-typeParameters x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.TypeParameters"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeParen :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type
-typeParen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paren"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecAlias :: Phantoms.TTerm Syntax.AliasDecl -> Phantoms.TTerm Syntax.TypeSpec
-typeSpecAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecDefinition :: Phantoms.TTerm Syntax.TypeDef -> Phantoms.TTerm Syntax.TypeSpec
-typeSpecDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.TypeSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "definition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSwitchGuard :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.TypeSwitchGuard
-typeSwitchGuard name expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-typeSwitchGuardExpression :: Phantoms.TTerm Syntax.TypeSwitchGuard -> Phantoms.TTerm Syntax.PrimaryExpr
-typeSwitchGuardExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeSwitchGuardName :: Phantoms.TTerm Syntax.TypeSwitchGuard -> Phantoms.TTerm (Maybe Syntax.Identifier)
-typeSwitchGuardName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeSwitchGuardWithExpression :: Phantoms.TTerm Syntax.TypeSwitchGuard -> Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.TypeSwitchGuard
-typeSwitchGuardWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeSwitchGuardWithName :: Phantoms.TTerm Syntax.TypeSwitchGuard -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.TypeSwitchGuard
-typeSwitchGuardWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchGuard"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeSwitchStmt :: Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.TypeSwitchGuard -> Phantoms.TTerm [Syntax.TypeCaseClause] -> Phantoms.TTerm Syntax.TypeSwitchStmt
-typeSwitchStmt init guard cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm guard)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-typeSwitchStmtCases :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm [Syntax.TypeCaseClause]
-typeSwitchStmtCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeSwitchStmtGuard :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm Syntax.TypeSwitchGuard
-typeSwitchStmtGuard x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-        Core.projectionField = (Core.Name "guard")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeSwitchStmtInit :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm (Maybe Syntax.SimpleStmt)
-typeSwitchStmtInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeSwitchStmtWithCases :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm [Syntax.TypeCaseClause] -> Phantoms.TTerm Syntax.TypeSwitchStmt
-typeSwitchStmtWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeSwitchStmtWithGuard :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm Syntax.TypeSwitchGuard -> Phantoms.TTerm Syntax.TypeSwitchStmt
-typeSwitchStmtWithGuard original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeSwitchStmtWithInit :: Phantoms.TTerm Syntax.TypeSwitchStmt -> Phantoms.TTerm (Maybe Syntax.SimpleStmt) -> Phantoms.TTerm Syntax.TypeSwitchStmt
-typeSwitchStmtWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeSwitchStmt"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeTerm :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeTerm
-typeTerm underlying type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "underlying"),
-          Core.fieldTerm = (Phantoms.unTTerm underlying)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeTermType :: Phantoms.TTerm Syntax.TypeTerm -> Phantoms.TTerm Syntax.Type
-typeTermType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeTermUnderlying :: Phantoms.TTerm Syntax.TypeTerm -> Phantoms.TTerm Bool
-typeTermUnderlying x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-        Core.projectionField = (Core.Name "underlying")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeTermWithType :: Phantoms.TTerm Syntax.TypeTerm -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeTerm
-typeTermWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "underlying"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-              Core.projectionField = (Core.Name "underlying")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeTermWithUnderlying :: Phantoms.TTerm Syntax.TypeTerm -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypeTerm
-typeTermWithUnderlying original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "underlying"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.TypeTerm"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.Statement]
-unBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.Block")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBreakStmt :: Phantoms.TTerm Syntax.BreakStmt -> Phantoms.TTerm (Maybe Syntax.Identifier)
-unBreakStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.BreakStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConstDecl :: Phantoms.TTerm Syntax.ConstDecl -> Phantoms.TTerm [Syntax.ConstSpec]
-unConstDecl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ConstDecl")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unContinueStmt :: Phantoms.TTerm Syntax.ContinueStmt -> Phantoms.TTerm (Maybe Syntax.Identifier)
-unContinueStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ContinueStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDeferStmt :: Phantoms.TTerm Syntax.DeferStmt -> Phantoms.TTerm Syntax.Expression
-unDeferStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.DeferStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unElementList :: Phantoms.TTerm Syntax.ElementList -> Phantoms.TTerm [Syntax.KeyedElement]
-unElementList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ElementList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEmptyStmt :: Phantoms.TTerm Syntax.EmptyStmt -> Phantoms.TTerm ()
-unEmptyStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.EmptyStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExpressionStmt :: Phantoms.TTerm Syntax.ExpressionStmt -> Phantoms.TTerm Syntax.Expression
-unExpressionStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ExpressionStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFallthroughStmt :: Phantoms.TTerm Syntax.FallthroughStmt -> Phantoms.TTerm ()
-unFallthroughStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.FallthroughStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFloatLit :: Phantoms.TTerm Syntax.FloatLit -> Phantoms.TTerm Double
-unFloatLit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.FloatLit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFunctionBody :: Phantoms.TTerm Syntax.FunctionBody -> Phantoms.TTerm Syntax.Block
-unFunctionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.FunctionBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFunctionType :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Signature
-unFunctionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.FunctionType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGoStmt :: Phantoms.TTerm Syntax.GoStmt -> Phantoms.TTerm Syntax.Expression
-unGoStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.GoStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGotoStmt :: Phantoms.TTerm Syntax.GotoStmt -> Phantoms.TTerm Syntax.Identifier
-unGotoStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.GotoStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm String
-unIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.Identifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImaginaryLit :: Phantoms.TTerm Syntax.ImaginaryLit -> Phantoms.TTerm Double
-unImaginaryLit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ImaginaryLit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImportDecl :: Phantoms.TTerm Syntax.ImportDecl -> Phantoms.TTerm [Syntax.ImportSpec]
-unImportDecl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ImportDecl")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImportPath :: Phantoms.TTerm Syntax.ImportPath -> Phantoms.TTerm Syntax.StringLit
-unImportPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ImportPath")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIndex :: Phantoms.TTerm Syntax.Index -> Phantoms.TTerm [Syntax.Expression]
-unIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.Index")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntLit :: Phantoms.TTerm Syntax.IntLit -> Phantoms.TTerm Integer
-unIntLit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.IntLit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterfaceType :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm [Syntax.InterfaceElem]
-unInterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.InterfaceType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterpretedStringLit :: Phantoms.TTerm Syntax.InterpretedStringLit -> Phantoms.TTerm String
-unInterpretedStringLit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.InterpretedStringLit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLiteralValue :: Phantoms.TTerm Syntax.LiteralValue -> Phantoms.TTerm [Syntax.KeyedElement]
-unLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.LiteralValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPackageClause :: Phantoms.TTerm Syntax.PackageClause -> Phantoms.TTerm Syntax.Identifier
-unPackageClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.PackageClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unParameters :: Phantoms.TTerm Syntax.Parameters -> Phantoms.TTerm [Syntax.ParameterDecl]
-unParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.Parameters")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPointerType :: Phantoms.TTerm Syntax.PointerType -> Phantoms.TTerm Syntax.Type
-unPointerType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.PointerType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRawStringLit :: Phantoms.TTerm Syntax.RawStringLit -> Phantoms.TTerm String
-unRawStringLit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.RawStringLit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReturnStmt :: Phantoms.TTerm Syntax.ReturnStmt -> Phantoms.TTerm [Syntax.Expression]
-unReturnStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.ReturnStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRuneLit :: Phantoms.TTerm Syntax.RuneLit -> Phantoms.TTerm Int
-unRuneLit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.RuneLit")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSelectStmt :: Phantoms.TTerm Syntax.SelectStmt -> Phantoms.TTerm [Syntax.CommClause]
-unSelectStmt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.SelectStmt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSelector :: Phantoms.TTerm Syntax.Selector -> Phantoms.TTerm Syntax.Identifier
-unSelector x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.Selector")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSliceType :: Phantoms.TTerm Syntax.SliceType -> Phantoms.TTerm Syntax.Type
-unSliceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.SliceType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStructType :: Phantoms.TTerm Syntax.StructType -> Phantoms.TTerm [Syntax.FieldDecl]
-unStructType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.StructType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTag :: Phantoms.TTerm Syntax.Tag -> Phantoms.TTerm Syntax.StringLit
-unTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.Tag")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeAssertion :: Phantoms.TTerm Syntax.TypeAssertion -> Phantoms.TTerm Syntax.Type
-unTypeAssertion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.TypeAssertion")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeConstraint :: Phantoms.TTerm Syntax.TypeConstraint -> Phantoms.TTerm Syntax.TypeElem
-unTypeConstraint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.TypeConstraint")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeDecl :: Phantoms.TTerm Syntax.TypeDecl -> Phantoms.TTerm [Syntax.TypeSpec]
-unTypeDecl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.TypeDecl")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeElem :: Phantoms.TTerm Syntax.TypeElem -> Phantoms.TTerm [Syntax.TypeTerm]
-unTypeElem x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.TypeElem")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeParameters :: Phantoms.TTerm Syntax.TypeParameters -> Phantoms.TTerm [Syntax.TypeParamDecl]
-unTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.TypeParameters")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVarDecl :: Phantoms.TTerm Syntax.VarDecl -> Phantoms.TTerm [Syntax.VarSpec]
-unVarDecl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.go.syntax.VarDecl")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExprOp :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryExpr
-unaryExprOp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "op"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExprPrimary :: Phantoms.TTerm Syntax.PrimaryExpr -> Phantoms.TTerm Syntax.UnaryExpr
-unaryExprPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryOpAddressOf :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpAddressOf =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addressOf"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpDeref :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpDeref =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "deref"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpMinus :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpNot :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpPlus :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpReceive :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpReceive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "receive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpXor :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.go.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperation :: Phantoms.TTerm Syntax.UnaryOp -> Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.UnaryOperation
-unaryOperation op operand =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)}]}))
-
-unaryOperationOp :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryOp
-unaryOperationOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperationOperand :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryExpr
-unaryOperationOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryOperationWithOp :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryOp -> Phantoms.TTerm Syntax.UnaryOperation
-unaryOperationWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryOperationWithOperand :: Phantoms.TTerm Syntax.UnaryOperation -> Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.UnaryOperation
-unaryOperationWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.UnaryOperation"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-varDecl :: Phantoms.TTerm [Syntax.VarSpec] -> Phantoms.TTerm Syntax.VarDecl
-varDecl x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.go.syntax.VarDecl"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-varSpec :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.VarSpec
-varSpec names type_ values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm names)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-varSpecNames :: Phantoms.TTerm Syntax.VarSpec -> Phantoms.TTerm [Syntax.Identifier]
-varSpecNames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-        Core.projectionField = (Core.Name "names")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varSpecType :: Phantoms.TTerm Syntax.VarSpec -> Phantoms.TTerm (Maybe Syntax.Type)
-varSpecType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varSpecValues :: Phantoms.TTerm Syntax.VarSpec -> Phantoms.TTerm [Syntax.Expression]
-varSpecValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varSpecWithNames :: Phantoms.TTerm Syntax.VarSpec -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.VarSpec
-varSpecWithNames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-varSpecWithType :: Phantoms.TTerm Syntax.VarSpec -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.VarSpec
-varSpecWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-varSpecWithValues :: Phantoms.TTerm Syntax.VarSpec -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.VarSpec
-varSpecWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "names"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-              Core.projectionField = (Core.Name "names")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.go.syntax.VarSpec"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Graph.hs b/src/main/haskell/Hydra/Dsl/Graph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Graph.hs
+++ /dev/null
@@ -1,756 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.graph
-
-module Hydra.Dsl.Graph where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Phantoms as Phantoms
-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
-graph :: Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm (M.Map Core.Name Graph.Primitive) -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Graph.Graph
-graph boundTerms boundTypes classConstraints lambdaVariables metadata primitives schemaTypes typeVariables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Phantoms.unTTerm boundTerms)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm boundTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Phantoms.unTTerm classConstraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm lambdaVariables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Phantoms.unTTerm metadata)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Phantoms.unTTerm primitives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm schemaTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm typeVariables)}]}))
-graphBoundTerms :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term)
-graphBoundTerms x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "boundTerms")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphBoundTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme)
-graphBoundTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "boundTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphClassConstraints :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata)
-graphClassConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "classConstraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphLambdaVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name)
-graphLambdaVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "lambdaVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphMetadata :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term)
-graphMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "metadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphPrimitives :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Graph.Primitive)
-graphPrimitives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "primitives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphSchemaTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme)
-graphSchemaTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "schemaTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphTypeVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name)
-graphTypeVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-        Core.projectionField = (Core.Name "typeVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphWithBoundTerms :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Graph.Graph
-graphWithBoundTerms original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithBoundTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm Graph.Graph
-graphWithBoundTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithClassConstraints :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm Graph.Graph
-graphWithClassConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithLambdaVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Graph.Graph
-graphWithLambdaVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithMetadata :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Graph.Graph
-graphWithMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithPrimitives :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Graph.Primitive) -> Phantoms.TTerm Graph.Graph
-graphWithPrimitives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithSchemaTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm Graph.Graph
-graphWithSchemaTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphWithTypeVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Graph.Graph
-graphWithTypeVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTerms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTerms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "boundTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "lambdaVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),
-              Core.projectionField = (Core.Name "schemaTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-primitive :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm (Context.Context -> Graph.Graph -> [Core.Term] -> Either Errors.Error Core.Term) -> Phantoms.TTerm Graph.Primitive
-primitive name typeScheme implementation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm typeScheme)},
-        Core.Field {
-          Core.fieldName = (Core.Name "implementation"),
-          Core.fieldTerm = (Phantoms.unTTerm implementation)}]}))
-primitiveImplementation :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm (Context.Context -> Graph.Graph -> [Core.Term] -> Either Errors.Error Core.Term)
-primitiveImplementation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-        Core.projectionField = (Core.Name "implementation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-primitiveName :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.Name
-primitiveName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-primitiveTypeScheme :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.TypeScheme
-primitiveTypeScheme x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-        Core.projectionField = (Core.Name "typeScheme")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-primitiveWithImplementation :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm (Context.Context -> Graph.Graph -> [Core.Term] -> Either Errors.Error Core.Term) -> Phantoms.TTerm Graph.Primitive
-primitiveWithImplementation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implementation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-primitiveWithName :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Graph.Primitive
-primitiveWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implementation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-              Core.projectionField = (Core.Name "implementation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-primitiveWithTypeScheme :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Graph.Primitive
-primitiveWithTypeScheme original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "implementation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),
-              Core.projectionField = (Core.Name "implementation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termCoder :: Phantoms.TTerm Core.Type -> Phantoms.TTerm (Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error a) -> Phantoms.TTerm (Context.Context -> a -> Either Errors.Error Core.Term) -> Phantoms.TTerm (Graph.TermCoder a)
-termCoder type_ encode decode =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm encode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))
-termCoderDecode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> a -> Either Errors.Error Core.Term)
-termCoderDecode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-        Core.projectionField = (Core.Name "decode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termCoderEncode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error a)
-termCoderEncode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-        Core.projectionField = (Core.Name "encode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termCoderType :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm Core.Type
-termCoderType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termCoderWithDecode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> a -> Either Errors.Error Core.Term) -> Phantoms.TTerm (Graph.TermCoder a)
-termCoderWithDecode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-              Core.projectionField = (Core.Name "encode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-termCoderWithEncode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error a) -> Phantoms.TTerm (Graph.TermCoder a)
-termCoderWithEncode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-              Core.projectionField = (Core.Name "decode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termCoderWithType :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm Core.Type -> Phantoms.TTerm (Graph.TermCoder a)
-termCoderWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-              Core.projectionField = (Core.Name "encode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),
-              Core.projectionField = (Core.Name "decode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Graphql/Syntax.hs b/src/main/haskell/Hydra/Dsl/Graphql/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Graphql/Syntax.hs
+++ /dev/null
@@ -1,6341 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.graphql.syntax
-
-module Hydra.Dsl.Graphql.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Graphql.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-aliasColon :: Phantoms.TTerm Syntax.Alias
-aliasColon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Alias"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Colon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-aliasName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Alias
-aliasName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Alias"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-argument :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.Argument
-argument name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Argument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-argumentName :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm Syntax.Name
-argumentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Argument"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentValue :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm Syntax.Value
-argumentValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Argument"),
-        Core.projectionField = (Core.Name "Value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argumentWithName :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Argument
-argumentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Argument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphql.syntax.Argument"),
-              Core.projectionField = (Core.Name "Value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-argumentWithValue :: Phantoms.TTerm Syntax.Argument -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.Argument
-argumentWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Argument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Argument"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arguments :: Phantoms.TTerm [Syntax.Argument] -> Phantoms.TTerm Syntax.Arguments
-arguments x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.Arguments"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-argumentsDefinition :: Phantoms.TTerm [Syntax.InputValueDefinition] -> Phantoms.TTerm Syntax.ArgumentsDefinition
-argumentsDefinition x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.ArgumentsDefinition"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-booleanValueFalse :: Phantoms.TTerm Syntax.BooleanValue
-booleanValueFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.BooleanValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "False"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanValueTrue :: Phantoms.TTerm Syntax.BooleanValue
-booleanValueTrue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.BooleanValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "True"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-defaultValue :: Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.DefaultValue
-defaultValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.DefaultValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-definitionExecutable :: Phantoms.TTerm Syntax.ExecutableDefinition -> Phantoms.TTerm Syntax.Definition
-definitionExecutable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Definition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "executable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-definitionTypeSystem :: Phantoms.TTerm Syntax.TypeSystemDefinitionOrExtension -> Phantoms.TTerm Syntax.Definition
-definitionTypeSystem x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Definition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeSystem"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-description :: Phantoms.TTerm Syntax.StringValue -> Phantoms.TTerm Syntax.Description
-description x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.Description"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-directive :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Arguments) -> Phantoms.TTerm Syntax.Directive
-directive name arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-directiveArguments :: Phantoms.TTerm Syntax.Directive -> Phantoms.TTerm (Maybe Syntax.Arguments)
-directiveArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-        Core.projectionField = (Core.Name "Arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ArgumentsDefinition) -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.DirectiveLocations -> Phantoms.TTerm Syntax.DirectiveDefinition
-directiveDefinition description name argumentsDefinition repeatable directiveLocations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm argumentsDefinition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Repeatable"),
-          Core.fieldTerm = (Phantoms.unTTerm repeatable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Phantoms.unTTerm directiveLocations)}]}))
-
-directiveDefinitionArgumentsDefinition :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm (Maybe Syntax.ArgumentsDefinition)
-directiveDefinitionArgumentsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-        Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveDefinitionDescription :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-directiveDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveDefinitionDirectiveLocations :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm Syntax.DirectiveLocations
-directiveDefinitionDirectiveLocations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-        Core.projectionField = (Core.Name "DirectiveLocations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveDefinitionName :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm Syntax.Name
-directiveDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveDefinitionRepeatable :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm (Maybe ())
-directiveDefinitionRepeatable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-        Core.projectionField = (Core.Name "Repeatable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveDefinitionWithArgumentsDefinition :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm (Maybe Syntax.ArgumentsDefinition) -> Phantoms.TTerm Syntax.DirectiveDefinition
-directiveDefinitionWithArgumentsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Repeatable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Repeatable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "DirectiveLocations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directiveDefinitionWithDescription :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.DirectiveDefinition
-directiveDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Repeatable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Repeatable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "DirectiveLocations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directiveDefinitionWithDirectiveLocations :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm Syntax.DirectiveLocations -> Phantoms.TTerm Syntax.DirectiveDefinition
-directiveDefinitionWithDirectiveLocations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Repeatable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Repeatable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-directiveDefinitionWithName :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.DirectiveDefinition
-directiveDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Repeatable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Repeatable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "DirectiveLocations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directiveDefinitionWithRepeatable :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.DirectiveDefinition
-directiveDefinitionWithRepeatable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Repeatable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveDefinition"),
-              Core.projectionField = (Core.Name "DirectiveLocations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directiveLocationExecutable :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation -> Phantoms.TTerm Syntax.DirectiveLocation
-directiveLocationExecutable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "executable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-directiveLocationTypeSystem :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation -> Phantoms.TTerm Syntax.DirectiveLocation
-directiveLocationTypeSystem x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeSystem"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-directiveLocationsSequence :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence -> Phantoms.TTerm Syntax.DirectiveLocations
-directiveLocationsSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-directiveLocationsSequence2 :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence2 -> Phantoms.TTerm Syntax.DirectiveLocations
-directiveLocationsSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-directiveLocations_Sequence :: Phantoms.TTerm Syntax.DirectiveLocations -> Phantoms.TTerm Syntax.DirectiveLocation -> Phantoms.TTerm Syntax.DirectiveLocations_Sequence
-directiveLocations_Sequence directiveLocations directiveLocation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Phantoms.unTTerm directiveLocations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocation"),
-          Core.fieldTerm = (Phantoms.unTTerm directiveLocation)}]}))
-
-directiveLocations_Sequence2 :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.DirectiveLocation -> Phantoms.TTerm Syntax.DirectiveLocations_Sequence2
-directiveLocations_Sequence2 or directiveLocation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Or"),
-          Core.fieldTerm = (Phantoms.unTTerm or)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocation"),
-          Core.fieldTerm = (Phantoms.unTTerm directiveLocation)}]}))
-
-directiveLocations_Sequence2DirectiveLocation :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence2 -> Phantoms.TTerm Syntax.DirectiveLocation
-directiveLocations_Sequence2DirectiveLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-        Core.projectionField = (Core.Name "DirectiveLocation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveLocations_Sequence2Or :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence2 -> Phantoms.TTerm (Maybe ())
-directiveLocations_Sequence2Or x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-        Core.projectionField = (Core.Name "Or")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveLocations_Sequence2WithDirectiveLocation :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence2 -> Phantoms.TTerm Syntax.DirectiveLocation -> Phantoms.TTerm Syntax.DirectiveLocations_Sequence2
-directiveLocations_Sequence2WithDirectiveLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Or"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-              Core.projectionField = (Core.Name "Or")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-directiveLocations_Sequence2WithOr :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence2 -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.DirectiveLocations_Sequence2
-directiveLocations_Sequence2WithOr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Or"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"),
-              Core.projectionField = (Core.Name "DirectiveLocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directiveLocations_SequenceDirectiveLocation :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence -> Phantoms.TTerm Syntax.DirectiveLocation
-directiveLocations_SequenceDirectiveLocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-        Core.projectionField = (Core.Name "DirectiveLocation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveLocations_SequenceDirectiveLocations :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence -> Phantoms.TTerm Syntax.DirectiveLocations
-directiveLocations_SequenceDirectiveLocations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-        Core.projectionField = (Core.Name "DirectiveLocations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveLocations_SequenceWithDirectiveLocation :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence -> Phantoms.TTerm Syntax.DirectiveLocation -> Phantoms.TTerm Syntax.DirectiveLocations_Sequence
-directiveLocations_SequenceWithDirectiveLocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-              Core.projectionField = (Core.Name "DirectiveLocations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-directiveLocations_SequenceWithDirectiveLocations :: Phantoms.TTerm Syntax.DirectiveLocations_Sequence -> Phantoms.TTerm Syntax.DirectiveLocations -> Phantoms.TTerm Syntax.DirectiveLocations_Sequence
-directiveLocations_SequenceWithDirectiveLocations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DirectiveLocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"),
-              Core.projectionField = (Core.Name "DirectiveLocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directiveName :: Phantoms.TTerm Syntax.Directive -> Phantoms.TTerm Syntax.Name
-directiveName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directiveWithArguments :: Phantoms.TTerm Syntax.Directive -> Phantoms.TTerm (Maybe Syntax.Arguments) -> Phantoms.TTerm Syntax.Directive
-directiveWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-directiveWithName :: Phantoms.TTerm Syntax.Directive -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Directive
-directiveWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Directive"),
-              Core.projectionField = (Core.Name "Arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directives :: Phantoms.TTerm [Syntax.Directive] -> Phantoms.TTerm Syntax.Directives
-directives x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.Directives"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-document :: Phantoms.TTerm [Syntax.Definition] -> Phantoms.TTerm Syntax.Document
-document x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.Document"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumTypeDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm (Maybe Syntax.EnumValuesDefinition) -> Phantoms.TTerm Syntax.EnumTypeDefinition
-enumTypeDefinition description name directives enumValuesDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm enumValuesDefinition)}]}))
-
-enumTypeDefinitionDescription :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-enumTypeDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeDefinitionDirectives :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-enumTypeDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeDefinitionEnumValuesDefinition :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm (Maybe Syntax.EnumValuesDefinition)
-enumTypeDefinitionEnumValuesDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-        Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeDefinitionName :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm Syntax.Name
-enumTypeDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeDefinitionWithDescription :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.EnumTypeDefinition
-enumTypeDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumTypeDefinitionWithDirectives :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.EnumTypeDefinition
-enumTypeDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumTypeDefinitionWithEnumValuesDefinition :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm (Maybe Syntax.EnumValuesDefinition) -> Phantoms.TTerm Syntax.EnumTypeDefinition
-enumTypeDefinitionWithEnumValuesDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumTypeDefinitionWithName :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.EnumTypeDefinition
-enumTypeDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeDefinition"),
-              Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumTypeExtensionSequence :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm Syntax.EnumTypeExtension
-enumTypeExtensionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumTypeExtensionSequence2 :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.EnumTypeExtension
-enumTypeExtensionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumTypeExtension_Sequence :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.EnumValuesDefinition -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence
-enumTypeExtension_Sequence name directives enumValuesDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm enumValuesDefinition)}]}))
-
-enumTypeExtension_Sequence2 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2
-enumTypeExtension_Sequence2 name directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-enumTypeExtension_Sequence2Directives :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives
-enumTypeExtension_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeExtension_Sequence2Name :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name
-enumTypeExtension_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeExtension_Sequence2WithDirectives :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2
-enumTypeExtension_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumTypeExtension_Sequence2WithName :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence2
-enumTypeExtension_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumTypeExtension_SequenceDirectives :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-enumTypeExtension_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeExtension_SequenceEnumValuesDefinition :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm Syntax.EnumValuesDefinition
-enumTypeExtension_SequenceEnumValuesDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeExtension_SequenceName :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name
-enumTypeExtension_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumTypeExtension_SequenceWithDirectives :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence
-enumTypeExtension_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumTypeExtension_SequenceWithEnumValuesDefinition :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm Syntax.EnumValuesDefinition -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence
-enumTypeExtension_SequenceWithEnumValuesDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumTypeExtension_SequenceWithName :: Phantoms.TTerm Syntax.EnumTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.EnumTypeExtension_Sequence
-enumTypeExtension_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValuesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "EnumValuesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValue :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.EnumValue
-enumValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.EnumValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumValueDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.EnumValue -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.EnumValueDefinition
-enumValueDefinition description enumValue directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValue"),
-          Core.fieldTerm = (Phantoms.unTTerm enumValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-enumValueDefinitionDescription :: Phantoms.TTerm Syntax.EnumValueDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-enumValueDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueDefinitionDirectives :: Phantoms.TTerm Syntax.EnumValueDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-enumValueDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueDefinitionEnumValue :: Phantoms.TTerm Syntax.EnumValueDefinition -> Phantoms.TTerm Syntax.EnumValue
-enumValueDefinitionEnumValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-        Core.projectionField = (Core.Name "EnumValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueDefinitionWithDescription :: Phantoms.TTerm Syntax.EnumValueDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.EnumValueDefinition
-enumValueDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-              Core.projectionField = (Core.Name "EnumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueDefinitionWithDirectives :: Phantoms.TTerm Syntax.EnumValueDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.EnumValueDefinition
-enumValueDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-              Core.projectionField = (Core.Name "EnumValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumValueDefinitionWithEnumValue :: Phantoms.TTerm Syntax.EnumValueDefinition -> Phantoms.TTerm Syntax.EnumValue -> Phantoms.TTerm Syntax.EnumValueDefinition
-enumValueDefinitionWithEnumValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "EnumValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.EnumValueDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValuesDefinition :: Phantoms.TTerm [Syntax.EnumValueDefinition] -> Phantoms.TTerm Syntax.EnumValuesDefinition
-enumValuesDefinition x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.EnumValuesDefinition"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-executableDefinitionFragment :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.ExecutableDefinition
-executableDefinitionFragment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fragment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-executableDefinitionOperation :: Phantoms.TTerm Syntax.OperationDefinition -> Phantoms.TTerm Syntax.ExecutableDefinition
-executableDefinitionOperation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "operation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-executableDirectiveLocationFIELD :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationFIELD =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FIELD"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationFRAGMENT_DEFINITION :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationFRAGMENT_DEFINITION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FRAGMENT_DEFINITION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationFRAGMENT_SPREAD :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationFRAGMENT_SPREAD =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FRAGMENT_SPREAD"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationINLINE_FRAGMENT :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationINLINE_FRAGMENT =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "INLINE_FRAGMENT"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationMUTATION :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationMUTATION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MUTATION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationQUERY :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationQUERY =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "QUERY"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationSUBSCRIPTION :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationSUBSCRIPTION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "SUBSCRIPTION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDirectiveLocationVARIABLE_DEFINITION :: Phantoms.TTerm Syntax.ExecutableDirectiveLocation
-executableDirectiveLocationVARIABLE_DEFINITION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "VARIABLE_DEFINITION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-executableDocument :: Phantoms.TTerm [Syntax.ExecutableDefinition] -> Phantoms.TTerm Syntax.ExecutableDocument
-executableDocument x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.ExecutableDocument"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-field :: Phantoms.TTerm (Maybe Syntax.Alias) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Arguments) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm (Maybe Syntax.SelectionSet) -> Phantoms.TTerm Syntax.Field
-field alias name arguments directives selectionSet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm selectionSet)}]}))
-
-fieldAlias :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.Alias)
-fieldAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-        Core.projectionField = (Core.Name "Alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldArguments :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.Arguments)
-fieldArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-        Core.projectionField = (Core.Name "Arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ArgumentsDefinition) -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinition description name argumentsDefinition type_ directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm argumentsDefinition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-fieldDefinitionArgumentsDefinition :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.ArgumentsDefinition)
-fieldDefinitionArgumentsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionDescription :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-fieldDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionDirectives :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-fieldDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionName :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm Syntax.Name
-fieldDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionType :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm Syntax.Type
-fieldDefinitionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "Type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionWithArgumentsDefinition :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.ArgumentsDefinition) -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithArgumentsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDefinitionWithDescription :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDefinitionWithDirectives :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldDefinitionWithName :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDefinitionWithType :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArgumentsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "ArgumentsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDirectives :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.Directives)
-fieldDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldName :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Name
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldSelectionSet :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.SelectionSet)
-fieldSelectionSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-        Core.projectionField = (Core.Name "SelectionSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldWithAlias :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.Alias) -> Phantoms.TTerm Syntax.Field
-fieldWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithArguments :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.Arguments) -> Phantoms.TTerm Syntax.Field
-fieldWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithDirectives :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.Field
-fieldWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithName :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithSelectionSet :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe Syntax.SelectionSet) -> Phantoms.TTerm Syntax.Field
-fieldWithSelectionSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.Field"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldsDefinition :: Phantoms.TTerm [Syntax.FieldDefinition] -> Phantoms.TTerm Syntax.FieldsDefinition
-fieldsDefinition x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.FieldsDefinition"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-floatValue :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.FloatValue
-floatValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.FloatValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fragmentDefinition :: Phantoms.TTerm Syntax.FragmentName -> Phantoms.TTerm Syntax.TypeCondition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.FragmentDefinition
-fragmentDefinition fragmentName typeCondition directives selectionSet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Phantoms.unTTerm fragmentName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Phantoms.unTTerm typeCondition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm selectionSet)}]}))
-
-fragmentDefinitionDirectives :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-fragmentDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fragmentDefinitionFragmentName :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.FragmentName
-fragmentDefinitionFragmentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-        Core.projectionField = (Core.Name "FragmentName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fragmentDefinitionSelectionSet :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.SelectionSet
-fragmentDefinitionSelectionSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-        Core.projectionField = (Core.Name "SelectionSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fragmentDefinitionTypeCondition :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.TypeCondition
-fragmentDefinitionTypeCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-        Core.projectionField = (Core.Name "TypeCondition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fragmentDefinitionWithDirectives :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FragmentDefinition
-fragmentDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "FragmentName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "TypeCondition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fragmentDefinitionWithFragmentName :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.FragmentName -> Phantoms.TTerm Syntax.FragmentDefinition
-fragmentDefinitionWithFragmentName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "TypeCondition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fragmentDefinitionWithSelectionSet :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.FragmentDefinition
-fragmentDefinitionWithSelectionSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "FragmentName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "TypeCondition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fragmentDefinitionWithTypeCondition :: Phantoms.TTerm Syntax.FragmentDefinition -> Phantoms.TTerm Syntax.TypeCondition -> Phantoms.TTerm Syntax.FragmentDefinition
-fragmentDefinitionWithTypeCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "FragmentName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentDefinition"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fragmentName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.FragmentName
-fragmentName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.FragmentName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fragmentSpread :: Phantoms.TTerm Syntax.FragmentName -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FragmentSpread
-fragmentSpread fragmentName directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Phantoms.unTTerm fragmentName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-fragmentSpreadDirectives :: Phantoms.TTerm Syntax.FragmentSpread -> Phantoms.TTerm (Maybe Syntax.Directives)
-fragmentSpreadDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fragmentSpreadFragmentName :: Phantoms.TTerm Syntax.FragmentSpread -> Phantoms.TTerm Syntax.FragmentName
-fragmentSpreadFragmentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-        Core.projectionField = (Core.Name "FragmentName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fragmentSpreadWithDirectives :: Phantoms.TTerm Syntax.FragmentSpread -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FragmentSpread
-fragmentSpreadWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-              Core.projectionField = (Core.Name "FragmentName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fragmentSpreadWithFragmentName :: Phantoms.TTerm Syntax.FragmentSpread -> Phantoms.TTerm Syntax.FragmentName -> Phantoms.TTerm Syntax.FragmentSpread
-fragmentSpreadWithFragmentName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "FragmentName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.FragmentSpread"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implementsInterfacesSequence :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence -> Phantoms.TTerm Syntax.ImplementsInterfaces
-implementsInterfacesSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implementsInterfacesSequence2 :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2 -> Phantoms.TTerm Syntax.ImplementsInterfaces
-implementsInterfacesSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implementsInterfaces_Sequence :: Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence
-implementsInterfaces_Sequence implementsInterfaces namedType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm namedType)}]}))
-
-implementsInterfaces_Sequence2 :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2
-implementsInterfaces_Sequence2 amp namedType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Amp"),
-          Core.fieldTerm = (Phantoms.unTTerm amp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm namedType)}]}))
-
-implementsInterfaces_Sequence2Amp :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2 -> Phantoms.TTerm (Maybe ())
-implementsInterfaces_Sequence2Amp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-        Core.projectionField = (Core.Name "Amp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implementsInterfaces_Sequence2NamedType :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2 -> Phantoms.TTerm Syntax.NamedType
-implementsInterfaces_Sequence2NamedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-        Core.projectionField = (Core.Name "NamedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implementsInterfaces_Sequence2WithAmp :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2 -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2
-implementsInterfaces_Sequence2WithAmp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Amp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-              Core.projectionField = (Core.Name "NamedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implementsInterfaces_Sequence2WithNamedType :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2 -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence2
-implementsInterfaces_Sequence2WithNamedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Amp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"),
-              Core.projectionField = (Core.Name "Amp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-implementsInterfaces_SequenceImplementsInterfaces :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence -> Phantoms.TTerm Syntax.ImplementsInterfaces
-implementsInterfaces_SequenceImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implementsInterfaces_SequenceNamedType :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence -> Phantoms.TTerm Syntax.NamedType
-implementsInterfaces_SequenceNamedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-        Core.projectionField = (Core.Name "NamedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implementsInterfaces_SequenceWithImplementsInterfaces :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence
-implementsInterfaces_SequenceWithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-              Core.projectionField = (Core.Name "NamedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implementsInterfaces_SequenceWithNamedType :: Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.ImplementsInterfaces_Sequence
-implementsInterfaces_SequenceWithNamedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineFragment :: Phantoms.TTerm (Maybe Syntax.TypeCondition) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.InlineFragment
-inlineFragment typeCondition directives selectionSet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Phantoms.unTTerm typeCondition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm selectionSet)}]}))
-
-inlineFragmentDirectives :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm (Maybe Syntax.Directives)
-inlineFragmentDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineFragmentSelectionSet :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm Syntax.SelectionSet
-inlineFragmentSelectionSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-        Core.projectionField = (Core.Name "SelectionSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineFragmentTypeCondition :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm (Maybe Syntax.TypeCondition)
-inlineFragmentTypeCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-        Core.projectionField = (Core.Name "TypeCondition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineFragmentWithDirectives :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InlineFragment
-inlineFragmentWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-              Core.projectionField = (Core.Name "TypeCondition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inlineFragmentWithSelectionSet :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.InlineFragment
-inlineFragmentWithSelectionSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-              Core.projectionField = (Core.Name "TypeCondition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineFragmentWithTypeCondition :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm (Maybe Syntax.TypeCondition) -> Phantoms.TTerm Syntax.InlineFragment
-inlineFragmentWithTypeCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "TypeCondition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InlineFragment"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputFieldsDefinition :: Phantoms.TTerm [Syntax.InputValueDefinition] -> Phantoms.TTerm Syntax.InputFieldsDefinition
-inputFieldsDefinition x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.InputFieldsDefinition"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinitionSequence :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm Syntax.InputObjectTypeDefinition
-inputObjectTypeDefinitionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inputObjectTypeDefinitionSequence2 :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.InputObjectTypeDefinition
-inputObjectTypeDefinitionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inputObjectTypeDefinition_Sequence :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputFieldsDefinition -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence
-inputObjectTypeDefinition_Sequence description name directives inputFieldsDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm inputFieldsDefinition)}]}))
-
-inputObjectTypeDefinition_Sequence2 :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2
-inputObjectTypeDefinition_Sequence2 description name directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-inputObjectTypeDefinition_Sequence2Description :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Description)
-inputObjectTypeDefinition_Sequence2Description x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_Sequence2Directives :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Directives)
-inputObjectTypeDefinition_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_Sequence2Name :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.Name
-inputObjectTypeDefinition_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_Sequence2WithDescription :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2
-inputObjectTypeDefinition_Sequence2WithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeDefinition_Sequence2WithDirectives :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2
-inputObjectTypeDefinition_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inputObjectTypeDefinition_Sequence2WithName :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence2
-inputObjectTypeDefinition_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeDefinition_SequenceDescription :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Description)
-inputObjectTypeDefinition_SequenceDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_SequenceDirectives :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-inputObjectTypeDefinition_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_SequenceInputFieldsDefinition :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm Syntax.InputFieldsDefinition
-inputObjectTypeDefinition_SequenceInputFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_SequenceName :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm Syntax.Name
-inputObjectTypeDefinition_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeDefinition_SequenceWithDescription :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence
-inputObjectTypeDefinition_SequenceWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeDefinition_SequenceWithDirectives :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence
-inputObjectTypeDefinition_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeDefinition_SequenceWithInputFieldsDefinition :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm Syntax.InputFieldsDefinition -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence
-inputObjectTypeDefinition_SequenceWithInputFieldsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inputObjectTypeDefinition_SequenceWithName :: Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InputObjectTypeDefinition_Sequence
-inputObjectTypeDefinition_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeExtensionSequence :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.InputObjectTypeExtension
-inputObjectTypeExtensionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inputObjectTypeExtensionSequence2 :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.InputObjectTypeExtension
-inputObjectTypeExtensionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inputObjectTypeExtension_Sequence :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputFieldsDefinition -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence
-inputObjectTypeExtension_Sequence name directives inputFieldsDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm inputFieldsDefinition)}]}))
-
-inputObjectTypeExtension_Sequence2 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2
-inputObjectTypeExtension_Sequence2 name directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-inputObjectTypeExtension_Sequence2Directives :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives
-inputObjectTypeExtension_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeExtension_Sequence2Name :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name
-inputObjectTypeExtension_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeExtension_Sequence2WithDirectives :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2
-inputObjectTypeExtension_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inputObjectTypeExtension_Sequence2WithName :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence2
-inputObjectTypeExtension_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeExtension_SequenceDirectives :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-inputObjectTypeExtension_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeExtension_SequenceInputFieldsDefinition :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.InputFieldsDefinition
-inputObjectTypeExtension_SequenceInputFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeExtension_SequenceName :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name
-inputObjectTypeExtension_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputObjectTypeExtension_SequenceWithDirectives :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence
-inputObjectTypeExtension_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputObjectTypeExtension_SequenceWithInputFieldsDefinition :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.InputFieldsDefinition -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence
-inputObjectTypeExtension_SequenceWithInputFieldsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inputObjectTypeExtension_SequenceWithName :: Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InputObjectTypeExtension_Sequence
-inputObjectTypeExtension_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InputFieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "InputFieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputValueDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.DefaultValue) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputValueDefinition
-inputValueDefinition description name type_ defaultValue directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-inputValueDefinitionDefaultValue :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm (Maybe Syntax.DefaultValue)
-inputValueDefinitionDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-        Core.projectionField = (Core.Name "DefaultValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputValueDefinitionDescription :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-inputValueDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputValueDefinitionDirectives :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-inputValueDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputValueDefinitionName :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm Syntax.Name
-inputValueDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputValueDefinitionType :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm Syntax.Type
-inputValueDefinitionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-        Core.projectionField = (Core.Name "Type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inputValueDefinitionWithDefaultValue :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm (Maybe Syntax.DefaultValue) -> Phantoms.TTerm Syntax.InputValueDefinition
-inputValueDefinitionWithDefaultValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputValueDefinitionWithDescription :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.InputValueDefinition
-inputValueDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputValueDefinitionWithDirectives :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InputValueDefinition
-inputValueDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inputValueDefinitionWithName :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InputValueDefinition
-inputValueDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inputValueDefinitionWithType :: Phantoms.TTerm Syntax.InputValueDefinition -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.InputValueDefinition
-inputValueDefinitionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InputValueDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-intValue :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IntValue
-intValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.IntValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinitionSequence :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm Syntax.InterfaceTypeDefinition
-interfaceTypeDefinitionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceTypeDefinitionSequence2 :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.InterfaceTypeDefinition
-interfaceTypeDefinitionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceTypeDefinition_Sequence :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence
-interfaceTypeDefinition_Sequence description name implementsInterfaces directives fieldsDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldsDefinition)}]}))
-
-interfaceTypeDefinition_Sequence2 :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2
-interfaceTypeDefinition_Sequence2 description name implementsInterfaces directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-interfaceTypeDefinition_Sequence2Description :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Description)
-interfaceTypeDefinition_Sequence2Description x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_Sequence2Directives :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Directives)
-interfaceTypeDefinition_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_Sequence2ImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.ImplementsInterfaces
-interfaceTypeDefinition_Sequence2ImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_Sequence2Name :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.Name
-interfaceTypeDefinition_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_Sequence2WithDescription :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2
-interfaceTypeDefinition_Sequence2WithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeDefinition_Sequence2WithDirectives :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2
-interfaceTypeDefinition_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceTypeDefinition_Sequence2WithImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2
-interfaceTypeDefinition_Sequence2WithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeDefinition_Sequence2WithName :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence2
-interfaceTypeDefinition_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeDefinition_SequenceDescription :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Description)
-interfaceTypeDefinition_SequenceDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_SequenceDirectives :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-interfaceTypeDefinition_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_SequenceFieldsDefinition :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm Syntax.FieldsDefinition
-interfaceTypeDefinition_SequenceFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "FieldsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_SequenceImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces)
-interfaceTypeDefinition_SequenceImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_SequenceName :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm Syntax.Name
-interfaceTypeDefinition_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeDefinition_SequenceWithDescription :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence
-interfaceTypeDefinition_SequenceWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeDefinition_SequenceWithDirectives :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence
-interfaceTypeDefinition_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeDefinition_SequenceWithFieldsDefinition :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence
-interfaceTypeDefinition_SequenceWithFieldsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceTypeDefinition_SequenceWithImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence
-interfaceTypeDefinition_SequenceWithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeDefinition_SequenceWithName :: Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InterfaceTypeDefinition_Sequence
-interfaceTypeDefinition_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeExtensionSequence :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm Syntax.InterfaceTypeExtension
-interfaceTypeExtensionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceTypeExtensionSequence2 :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.InterfaceTypeExtension
-interfaceTypeExtensionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceTypeExtensionSequence3 :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.InterfaceTypeExtension
-interfaceTypeExtensionSequence3 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence3"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceTypeExtension_Sequence :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence
-interfaceTypeExtension_Sequence name implementsInterfaces directives fieldsDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldsDefinition)}]}))
-
-interfaceTypeExtension_Sequence2 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2
-interfaceTypeExtension_Sequence2 name implementsInterfaces directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-interfaceTypeExtension_Sequence2Directives :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives
-interfaceTypeExtension_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_Sequence2ImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces)
-interfaceTypeExtension_Sequence2ImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_Sequence2Name :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name
-interfaceTypeExtension_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_Sequence2WithDirectives :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2
-interfaceTypeExtension_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceTypeExtension_Sequence2WithImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2
-interfaceTypeExtension_Sequence2WithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeExtension_Sequence2WithName :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence2
-interfaceTypeExtension_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeExtension_Sequence3 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3
-interfaceTypeExtension_Sequence3 name implementsInterfaces =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)}]}))
-
-interfaceTypeExtension_Sequence3ImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.ImplementsInterfaces
-interfaceTypeExtension_Sequence3ImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_Sequence3Name :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.Name
-interfaceTypeExtension_Sequence3Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_Sequence3WithImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3
-interfaceTypeExtension_Sequence3WithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceTypeExtension_Sequence3WithName :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence3
-interfaceTypeExtension_Sequence3WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeExtension_SequenceDirectives :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-interfaceTypeExtension_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_SequenceFieldsDefinition :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm Syntax.FieldsDefinition
-interfaceTypeExtension_SequenceFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "FieldsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_SequenceImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces)
-interfaceTypeExtension_SequenceImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_SequenceName :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name
-interfaceTypeExtension_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceTypeExtension_SequenceWithDirectives :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence
-interfaceTypeExtension_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeExtension_SequenceWithFieldsDefinition :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence
-interfaceTypeExtension_SequenceWithFieldsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceTypeExtension_SequenceWithImplementsInterfaces :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence
-interfaceTypeExtension_SequenceWithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceTypeExtension_SequenceWithName :: Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.InterfaceTypeExtension_Sequence
-interfaceTypeExtension_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ListType
-listType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.ListType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-listValueSequence :: Phantoms.TTerm Syntax.ListValue_Sequence -> Phantoms.TTerm Syntax.ListValue
-listValueSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ListValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listValueSequence2 :: Phantoms.TTerm [Syntax.Value] -> Phantoms.TTerm Syntax.ListValue
-listValueSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ListValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listValue_Sequence :: Phantoms.TTerm Syntax.ListValue_Sequence
-listValue_Sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ListValue_Sequence"),
-      Core.recordFields = []}))
-
-name :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Name
-name x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.Name"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-namedType :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.NamedType
-namedType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.NamedType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nonNullTypeList :: Phantoms.TTerm Syntax.ListType -> Phantoms.TTerm Syntax.NonNullType
-nonNullTypeList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.NonNullType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonNullTypeNamed :: Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.NonNullType
-nonNullTypeNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.NonNullType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nullValue :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.NullValue
-nullValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.NullValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-objectField :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.ObjectField
-objectField name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-objectFieldName :: Phantoms.TTerm Syntax.ObjectField -> Phantoms.TTerm Syntax.Name
-objectFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectField"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectFieldValue :: Phantoms.TTerm Syntax.ObjectField -> Phantoms.TTerm Syntax.Value
-objectFieldValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectField"),
-        Core.projectionField = (Core.Name "Value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectFieldWithName :: Phantoms.TTerm Syntax.ObjectField -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ObjectField
-objectFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphql.syntax.ObjectField"),
-              Core.projectionField = (Core.Name "Value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectFieldWithValue :: Phantoms.TTerm Syntax.ObjectField -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.ObjectField
-objectFieldWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectField"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectTypeDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm (Maybe Syntax.FieldsDefinition) -> Phantoms.TTerm Syntax.ObjectTypeDefinition
-objectTypeDefinition description name implementsInterfaces directives fieldsDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldsDefinition)}]}))
-
-objectTypeDefinitionDescription :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-objectTypeDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeDefinitionDirectives :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-objectTypeDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeDefinitionFieldsDefinition :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.FieldsDefinition)
-objectTypeDefinitionFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-        Core.projectionField = (Core.Name "FieldsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeDefinitionImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces)
-objectTypeDefinitionImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeDefinitionName :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm Syntax.Name
-objectTypeDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeDefinitionWithDescription :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.ObjectTypeDefinition
-objectTypeDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeDefinitionWithDirectives :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.ObjectTypeDefinition
-objectTypeDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeDefinitionWithFieldsDefinition :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.FieldsDefinition) -> Phantoms.TTerm Syntax.ObjectTypeDefinition
-objectTypeDefinitionWithFieldsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectTypeDefinitionWithImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.ObjectTypeDefinition
-objectTypeDefinitionWithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeDefinitionWithName :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ObjectTypeDefinition
-objectTypeDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeExtensionSequence :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.ObjectTypeExtension
-objectTypeExtensionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectTypeExtensionSequence2 :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.ObjectTypeExtension
-objectTypeExtensionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectTypeExtensionSequence3 :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.ObjectTypeExtension
-objectTypeExtensionSequence3 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence3"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectTypeExtension_Sequence :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence
-objectTypeExtension_Sequence name implementsInterfaces directives fieldsDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldsDefinition)}]}))
-
-objectTypeExtension_Sequence2 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2
-objectTypeExtension_Sequence2 name implementsInterfaces directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-objectTypeExtension_Sequence2Directives :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Directives)
-objectTypeExtension_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_Sequence2ImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces)
-objectTypeExtension_Sequence2ImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_Sequence2Name :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name
-objectTypeExtension_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_Sequence2WithDirectives :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2
-objectTypeExtension_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectTypeExtension_Sequence2WithImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2
-objectTypeExtension_Sequence2WithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeExtension_Sequence2WithName :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence2
-objectTypeExtension_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeExtension_Sequence3 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3
-objectTypeExtension_Sequence3 name implementsInterfaces =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm implementsInterfaces)}]}))
-
-objectTypeExtension_Sequence3ImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.ImplementsInterfaces
-objectTypeExtension_Sequence3ImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_Sequence3Name :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.Name
-objectTypeExtension_Sequence3Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_Sequence3WithImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.ImplementsInterfaces -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3
-objectTypeExtension_Sequence3WithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectTypeExtension_Sequence3WithName :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence3
-objectTypeExtension_Sequence3WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeExtension_SequenceDirectives :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-objectTypeExtension_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_SequenceFieldsDefinition :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.FieldsDefinition
-objectTypeExtension_SequenceFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "FieldsDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_SequenceImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces)
-objectTypeExtension_SequenceImplementsInterfaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_SequenceName :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name
-objectTypeExtension_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectTypeExtension_SequenceWithDirectives :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence
-objectTypeExtension_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeExtension_SequenceWithFieldsDefinition :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence
-objectTypeExtension_SequenceWithFieldsDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectTypeExtension_SequenceWithImplementsInterfaces :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.ImplementsInterfaces) -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence
-objectTypeExtension_SequenceWithImplementsInterfaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectTypeExtension_SequenceWithName :: Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ObjectTypeExtension_Sequence
-objectTypeExtension_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ImplementsInterfaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "ImplementsInterfaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "FieldsDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "FieldsDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectValueSequence :: Phantoms.TTerm Syntax.ObjectValue_Sequence -> Phantoms.TTerm Syntax.ObjectValue
-objectValueSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectValueSequence2 :: Phantoms.TTerm [Syntax.ObjectField] -> Phantoms.TTerm Syntax.ObjectValue
-objectValueSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.ObjectValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectValue_Sequence :: Phantoms.TTerm Syntax.ObjectValue_Sequence
-objectValue_Sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ObjectValue_Sequence"),
-      Core.recordFields = []}))
-
-operationDefinitionSelectionSet :: Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.OperationDefinition
-operationDefinitionSelectionSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "SelectionSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operationDefinitionSequence :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm Syntax.OperationDefinition
-operationDefinitionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-operationDefinition_Sequence :: Phantoms.TTerm Syntax.OperationType -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm (Maybe Syntax.VariablesDefinition) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.OperationDefinition_Sequence
-operationDefinition_Sequence operationType name variablesDefinition directives selectionSet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Phantoms.unTTerm operationType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "VariablesDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm variablesDefinition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm selectionSet)}]}))
-
-operationDefinition_SequenceDirectives :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-operationDefinition_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operationDefinition_SequenceName :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Name)
-operationDefinition_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operationDefinition_SequenceOperationType :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm Syntax.OperationType
-operationDefinition_SequenceOperationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-        Core.projectionField = (Core.Name "OperationType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operationDefinition_SequenceSelectionSet :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm Syntax.SelectionSet
-operationDefinition_SequenceSelectionSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-        Core.projectionField = (Core.Name "SelectionSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operationDefinition_SequenceVariablesDefinition :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.VariablesDefinition)
-operationDefinition_SequenceVariablesDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-        Core.projectionField = (Core.Name "VariablesDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-operationDefinition_SequenceWithDirectives :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.OperationDefinition_Sequence
-operationDefinition_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "OperationType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "VariablesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "VariablesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operationDefinition_SequenceWithName :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.OperationDefinition_Sequence
-operationDefinition_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "OperationType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "VariablesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "VariablesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operationDefinition_SequenceWithOperationType :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm Syntax.OperationType -> Phantoms.TTerm Syntax.OperationDefinition_Sequence
-operationDefinition_SequenceWithOperationType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "VariablesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "VariablesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operationDefinition_SequenceWithSelectionSet :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm Syntax.OperationDefinition_Sequence
-operationDefinition_SequenceWithSelectionSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "OperationType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "VariablesDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "VariablesDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-operationDefinition_SequenceWithVariablesDefinition :: Phantoms.TTerm Syntax.OperationDefinition_Sequence -> Phantoms.TTerm (Maybe Syntax.VariablesDefinition) -> Phantoms.TTerm Syntax.OperationDefinition_Sequence
-operationDefinition_SequenceWithVariablesDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "OperationType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "VariablesDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SelectionSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"),
-              Core.projectionField = (Core.Name "SelectionSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-operationTypeMutation :: Phantoms.TTerm Syntax.OperationType
-operationTypeMutation =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.OperationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Mutation"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-operationTypeQuery :: Phantoms.TTerm Syntax.OperationType
-operationTypeQuery =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.OperationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Query"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-operationTypeSubscription :: Phantoms.TTerm Syntax.OperationType
-operationTypeSubscription =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.OperationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Subscription"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-rootOperationTypeDefinition :: Phantoms.TTerm Syntax.OperationType -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.RootOperationTypeDefinition
-rootOperationTypeDefinition operationType namedType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Phantoms.unTTerm operationType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm namedType)}]}))
-
-rootOperationTypeDefinitionNamedType :: Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.NamedType
-rootOperationTypeDefinitionNamedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-        Core.projectionField = (Core.Name "NamedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootOperationTypeDefinitionOperationType :: Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.OperationType
-rootOperationTypeDefinitionOperationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-        Core.projectionField = (Core.Name "OperationType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootOperationTypeDefinitionWithNamedType :: Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.RootOperationTypeDefinition
-rootOperationTypeDefinitionWithNamedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-              Core.projectionField = (Core.Name "OperationType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rootOperationTypeDefinitionWithOperationType :: Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.OperationType -> Phantoms.TTerm Syntax.RootOperationTypeDefinition
-rootOperationTypeDefinitionWithOperationType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "OperationType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"),
-              Core.projectionField = (Core.Name "NamedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarTypeDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.ScalarTypeDefinition
-scalarTypeDefinition description name directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-scalarTypeDefinitionDescription :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-scalarTypeDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarTypeDefinitionDirectives :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-scalarTypeDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarTypeDefinitionName :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm Syntax.Name
-scalarTypeDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarTypeDefinitionWithDescription :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.ScalarTypeDefinition
-scalarTypeDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarTypeDefinitionWithDirectives :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.ScalarTypeDefinition
-scalarTypeDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-scalarTypeDefinitionWithName :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ScalarTypeDefinition
-scalarTypeDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarTypeExtension :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.ScalarTypeExtension
-scalarTypeExtension name directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-scalarTypeExtensionDirectives :: Phantoms.TTerm Syntax.ScalarTypeExtension -> Phantoms.TTerm Syntax.Directives
-scalarTypeExtensionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarTypeExtensionName :: Phantoms.TTerm Syntax.ScalarTypeExtension -> Phantoms.TTerm Syntax.Name
-scalarTypeExtensionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalarTypeExtensionWithDirectives :: Phantoms.TTerm Syntax.ScalarTypeExtension -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.ScalarTypeExtension
-scalarTypeExtensionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-scalarTypeExtensionWithName :: Phantoms.TTerm Syntax.ScalarTypeExtension -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ScalarTypeExtension
-scalarTypeExtensionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.ScalarTypeExtension"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.SchemaDefinition
-schemaDefinition description directives rootOperationTypeDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm rootOperationTypeDefinition)}]}))
-
-schemaDefinitionDescription :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-schemaDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaDefinitionDirectives :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-schemaDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaDefinitionRootOperationTypeDefinition :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm Syntax.RootOperationTypeDefinition
-schemaDefinitionRootOperationTypeDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-        Core.projectionField = (Core.Name "RootOperationTypeDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaDefinitionWithDescription :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.SchemaDefinition
-schemaDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-              Core.projectionField = (Core.Name "RootOperationTypeDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaDefinitionWithDirectives :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.SchemaDefinition
-schemaDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-              Core.projectionField = (Core.Name "RootOperationTypeDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaDefinitionWithRootOperationTypeDefinition :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.SchemaDefinition
-schemaDefinitionWithRootOperationTypeDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaExtensionSequence :: Phantoms.TTerm Syntax.SchemaExtension_Sequence -> Phantoms.TTerm Syntax.SchemaExtension
-schemaExtensionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaExtensionSequence2 :: Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.SchemaExtension
-schemaExtensionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaExtension_Sequence :: Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.SchemaExtension_Sequence
-schemaExtension_Sequence directives rootOperationTypeDefinition =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm rootOperationTypeDefinition)}]}))
-
-schemaExtension_SequenceDirectives :: Phantoms.TTerm Syntax.SchemaExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-schemaExtension_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaExtension_SequenceRootOperationTypeDefinition :: Phantoms.TTerm Syntax.SchemaExtension_Sequence -> Phantoms.TTerm Syntax.RootOperationTypeDefinition
-schemaExtension_SequenceRootOperationTypeDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-        Core.projectionField = (Core.Name "RootOperationTypeDefinition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaExtension_SequenceWithDirectives :: Phantoms.TTerm Syntax.SchemaExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.SchemaExtension_Sequence
-schemaExtension_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-              Core.projectionField = (Core.Name "RootOperationTypeDefinition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaExtension_SequenceWithRootOperationTypeDefinition :: Phantoms.TTerm Syntax.SchemaExtension_Sequence -> Phantoms.TTerm Syntax.RootOperationTypeDefinition -> Phantoms.TTerm Syntax.SchemaExtension_Sequence
-schemaExtension_SequenceWithRootOperationTypeDefinition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "RootOperationTypeDefinition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectionField :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Selection
-selectionField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Selection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Field"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionFragmentSpread :: Phantoms.TTerm Syntax.FragmentSpread -> Phantoms.TTerm Syntax.Selection
-selectionFragmentSpread x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Selection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FragmentSpread"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionInlineFragment :: Phantoms.TTerm Syntax.InlineFragment -> Phantoms.TTerm Syntax.Selection
-selectionInlineFragment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Selection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "InlineFragment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectionSet :: Phantoms.TTerm [Syntax.Selection] -> Phantoms.TTerm Syntax.SelectionSet
-selectionSet x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.SelectionSet"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringValue :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringValue
-stringValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.StringValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeConditionNamedType :: Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.TypeCondition
-typeConditionNamedType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NamedType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeConditionOn :: Phantoms.TTerm Syntax.TypeCondition
-typeConditionOn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "On"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeDefinitionEnum :: Phantoms.TTerm Syntax.EnumTypeDefinition -> Phantoms.TTerm Syntax.TypeDefinition
-typeDefinitionEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDefinitionInputObject :: Phantoms.TTerm Syntax.InputObjectTypeDefinition -> Phantoms.TTerm Syntax.TypeDefinition
-typeDefinitionInputObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inputObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDefinitionInterface :: Phantoms.TTerm Syntax.InterfaceTypeDefinition -> Phantoms.TTerm Syntax.TypeDefinition
-typeDefinitionInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDefinitionObject :: Phantoms.TTerm Syntax.ObjectTypeDefinition -> Phantoms.TTerm Syntax.TypeDefinition
-typeDefinitionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDefinitionScalar :: Phantoms.TTerm Syntax.ScalarTypeDefinition -> Phantoms.TTerm Syntax.TypeDefinition
-typeDefinitionScalar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scalar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDefinitionUnion :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm Syntax.TypeDefinition
-typeDefinitionUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExtensionEnum :: Phantoms.TTerm Syntax.EnumTypeExtension -> Phantoms.TTerm Syntax.TypeExtension
-typeExtensionEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExtensionInputObject :: Phantoms.TTerm Syntax.InputObjectTypeExtension -> Phantoms.TTerm Syntax.TypeExtension
-typeExtensionInputObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inputObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExtensionInterface :: Phantoms.TTerm Syntax.InterfaceTypeExtension -> Phantoms.TTerm Syntax.TypeExtension
-typeExtensionInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExtensionObject :: Phantoms.TTerm Syntax.ObjectTypeExtension -> Phantoms.TTerm Syntax.TypeExtension
-typeExtensionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExtensionScalar :: Phantoms.TTerm Syntax.ScalarTypeExtension -> Phantoms.TTerm Syntax.TypeExtension
-typeExtensionScalar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scalar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExtensionUnion :: Phantoms.TTerm Syntax.UnionTypeExtension -> Phantoms.TTerm Syntax.TypeExtension
-typeExtensionUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeList :: Phantoms.TTerm Syntax.ListType -> Phantoms.TTerm Syntax.Type
-typeList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNamed :: Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.Type
-typeNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNonNull :: Phantoms.TTerm Syntax.NonNullType -> Phantoms.TTerm Syntax.Type
-typeNonNull x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonNull"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemDefinitionDirective :: Phantoms.TTerm Syntax.DirectiveDefinition -> Phantoms.TTerm Syntax.TypeSystemDefinition
-typeSystemDefinitionDirective x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemDefinitionOrExtensionDefinition :: Phantoms.TTerm Syntax.TypeSystemDefinition -> Phantoms.TTerm Syntax.TypeSystemDefinitionOrExtension
-typeSystemDefinitionOrExtensionDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDefinitionOrExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "definition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemDefinitionOrExtensionExtension :: Phantoms.TTerm Syntax.TypeSystemExtension -> Phantoms.TTerm Syntax.TypeSystemDefinitionOrExtension
-typeSystemDefinitionOrExtensionExtension x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDefinitionOrExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extension"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemDefinitionSchema :: Phantoms.TTerm Syntax.SchemaDefinition -> Phantoms.TTerm Syntax.TypeSystemDefinition
-typeSystemDefinitionSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemDefinitionType :: Phantoms.TTerm Syntax.TypeDefinition -> Phantoms.TTerm Syntax.TypeSystemDefinition
-typeSystemDefinitionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemDirectiveLocationARGUMENT_DEFINITION :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationARGUMENT_DEFINITION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ARGUMENT_DEFINITION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationENUM :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationENUM =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ENUM"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationENUM_VALUE :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationENUM_VALUE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ENUM_VALUE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationFIELD_DEFINITION :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationFIELD_DEFINITION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FIELD_DEFINITION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationINPUT_FIELD_DEFINITION :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationINPUT_FIELD_DEFINITION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "INPUT_FIELD_DEFINITION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationINPUT_OBJECT :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationINPUT_OBJECT =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "INPUT_OBJECT"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationINTERFACE :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationINTERFACE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "INTERFACE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationOBJECT :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationOBJECT =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "OBJECT"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationSCALAR :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationSCALAR =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "SCALAR"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationSCHEMA :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationSCHEMA =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "SCHEMA"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDirectiveLocationUNION :: Phantoms.TTerm Syntax.TypeSystemDirectiveLocation
-typeSystemDirectiveLocationUNION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "UNION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSystemDocment :: Phantoms.TTerm [Syntax.TypeSystemDefinition] -> Phantoms.TTerm Syntax.TypeSystemDocment
-typeSystemDocment x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemDocment"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeSystemExtensionDocument :: Phantoms.TTerm [Syntax.TypeSystemDefinitionOrExtension] -> Phantoms.TTerm Syntax.TypeSystemExtensionDocument
-typeSystemExtensionDocument x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemExtensionDocument"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeSystemExtensionSchema :: Phantoms.TTerm Syntax.SchemaExtension -> Phantoms.TTerm Syntax.TypeSystemExtension
-typeSystemExtensionSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSystemExtensionType :: Phantoms.TTerm Syntax.TypeExtension -> Phantoms.TTerm Syntax.TypeSystemExtension
-typeSystemExtensionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.TypeSystemExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unArguments :: Phantoms.TTerm Syntax.Arguments -> Phantoms.TTerm [Syntax.Argument]
-unArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.Arguments")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArgumentsDefinition :: Phantoms.TTerm Syntax.ArgumentsDefinition -> Phantoms.TTerm [Syntax.InputValueDefinition]
-unArgumentsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.ArgumentsDefinition")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDefaultValue :: Phantoms.TTerm Syntax.DefaultValue -> Phantoms.TTerm Syntax.Value
-unDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.DefaultValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDescription :: Phantoms.TTerm Syntax.Description -> Phantoms.TTerm Syntax.StringValue
-unDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.Description")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDirectives :: Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm [Syntax.Directive]
-unDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.Directives")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDocument :: Phantoms.TTerm Syntax.Document -> Phantoms.TTerm [Syntax.Definition]
-unDocument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.Document")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumValue :: Phantoms.TTerm Syntax.EnumValue -> Phantoms.TTerm Syntax.Name
-unEnumValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.EnumValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumValuesDefinition :: Phantoms.TTerm Syntax.EnumValuesDefinition -> Phantoms.TTerm [Syntax.EnumValueDefinition]
-unEnumValuesDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.EnumValuesDefinition")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExecutableDocument :: Phantoms.TTerm Syntax.ExecutableDocument -> Phantoms.TTerm [Syntax.ExecutableDefinition]
-unExecutableDocument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.ExecutableDocument")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFieldsDefinition :: Phantoms.TTerm Syntax.FieldsDefinition -> Phantoms.TTerm [Syntax.FieldDefinition]
-unFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.FieldsDefinition")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFloatValue :: Phantoms.TTerm Syntax.FloatValue -> Phantoms.TTerm String
-unFloatValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.FloatValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFragmentName :: Phantoms.TTerm Syntax.FragmentName -> Phantoms.TTerm Syntax.Name
-unFragmentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.FragmentName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInputFieldsDefinition :: Phantoms.TTerm Syntax.InputFieldsDefinition -> Phantoms.TTerm [Syntax.InputValueDefinition]
-unInputFieldsDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.InputFieldsDefinition")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntValue :: Phantoms.TTerm Syntax.IntValue -> Phantoms.TTerm String
-unIntValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.IntValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unListType :: Phantoms.TTerm Syntax.ListType -> Phantoms.TTerm Syntax.Type
-unListType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.ListType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm String
-unName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.Name")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNamedType :: Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.Name
-unNamedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.NamedType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNullValue :: Phantoms.TTerm Syntax.NullValue -> Phantoms.TTerm ()
-unNullValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.NullValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSelectionSet :: Phantoms.TTerm Syntax.SelectionSet -> Phantoms.TTerm [Syntax.Selection]
-unSelectionSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.SelectionSet")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringValue :: Phantoms.TTerm Syntax.StringValue -> Phantoms.TTerm String
-unStringValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.StringValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeSystemDocment :: Phantoms.TTerm Syntax.TypeSystemDocment -> Phantoms.TTerm [Syntax.TypeSystemDefinition]
-unTypeSystemDocment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.TypeSystemDocment")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeSystemExtensionDocument :: Phantoms.TTerm Syntax.TypeSystemExtensionDocument -> Phantoms.TTerm [Syntax.TypeSystemDefinitionOrExtension]
-unTypeSystemExtensionDocument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.TypeSystemExtensionDocument")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariable :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.Name
-unVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphql.syntax.Variable")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberTypesSequence :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence -> Phantoms.TTerm Syntax.UnionMemberTypes
-unionMemberTypesSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unionMemberTypesSequence2 :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2 -> Phantoms.TTerm Syntax.UnionMemberTypes
-unionMemberTypesSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unionMemberTypes_Sequence :: Phantoms.TTerm Syntax.UnionMemberTypes -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.UnionMemberTypes_Sequence
-unionMemberTypes_Sequence unionMemberTypes namedType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm unionMemberTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm namedType)}]}))
-
-unionMemberTypes_Sequence2 :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2
-unionMemberTypes_Sequence2 or namedType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Or"),
-          Core.fieldTerm = (Phantoms.unTTerm or)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm namedType)}]}))
-
-unionMemberTypes_Sequence2NamedType :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2 -> Phantoms.TTerm Syntax.NamedType
-unionMemberTypes_Sequence2NamedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-        Core.projectionField = (Core.Name "NamedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberTypes_Sequence2Or :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2 -> Phantoms.TTerm (Maybe ())
-unionMemberTypes_Sequence2Or x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-        Core.projectionField = (Core.Name "Or")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberTypes_Sequence2WithNamedType :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2 -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2
-unionMemberTypes_Sequence2WithNamedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Or"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-              Core.projectionField = (Core.Name "Or")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unionMemberTypes_Sequence2WithOr :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2 -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.UnionMemberTypes_Sequence2
-unionMemberTypes_Sequence2WithOr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Or"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"),
-              Core.projectionField = (Core.Name "NamedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionMemberTypes_SequenceNamedType :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence -> Phantoms.TTerm Syntax.NamedType
-unionMemberTypes_SequenceNamedType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-        Core.projectionField = (Core.Name "NamedType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberTypes_SequenceUnionMemberTypes :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence -> Phantoms.TTerm Syntax.UnionMemberTypes
-unionMemberTypes_SequenceUnionMemberTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-        Core.projectionField = (Core.Name "UnionMemberTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberTypes_SequenceWithNamedType :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence -> Phantoms.TTerm Syntax.NamedType -> Phantoms.TTerm Syntax.UnionMemberTypes_Sequence
-unionMemberTypes_SequenceWithNamedType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-              Core.projectionField = (Core.Name "UnionMemberTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unionMemberTypes_SequenceWithUnionMemberTypes :: Phantoms.TTerm Syntax.UnionMemberTypes_Sequence -> Phantoms.TTerm Syntax.UnionMemberTypes -> Phantoms.TTerm Syntax.UnionMemberTypes_Sequence
-unionMemberTypes_SequenceWithUnionMemberTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NamedType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"),
-              Core.projectionField = (Core.Name "NamedType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeDefinition :: Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm (Maybe Syntax.UnionMemberTypes) -> Phantoms.TTerm Syntax.UnionTypeDefinition
-unionTypeDefinition description name directives unionMemberTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm unionMemberTypes)}]}))
-
-unionTypeDefinitionDescription :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description)
-unionTypeDefinitionDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-        Core.projectionField = (Core.Name "Description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeDefinitionDirectives :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-unionTypeDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeDefinitionName :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm Syntax.Name
-unionTypeDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeDefinitionUnionMemberTypes :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm (Maybe Syntax.UnionMemberTypes)
-unionTypeDefinitionUnionMemberTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-        Core.projectionField = (Core.Name "UnionMemberTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeDefinitionWithDescription :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Description) -> Phantoms.TTerm Syntax.UnionTypeDefinition
-unionTypeDefinitionWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "UnionMemberTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeDefinitionWithDirectives :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.UnionTypeDefinition
-unionTypeDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "UnionMemberTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeDefinitionWithName :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.UnionTypeDefinition
-unionTypeDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "UnionMemberTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeDefinitionWithUnionMemberTypes :: Phantoms.TTerm Syntax.UnionTypeDefinition -> Phantoms.TTerm (Maybe Syntax.UnionMemberTypes) -> Phantoms.TTerm Syntax.UnionTypeDefinition
-unionTypeDefinitionWithUnionMemberTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unionTypeExtensionSequence :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm Syntax.UnionTypeExtension
-unionTypeExtensionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unionTypeExtensionSequence2 :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.UnionTypeExtension
-unionTypeExtensionSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unionTypeExtension_Sequence :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.UnionMemberTypes -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence
-unionTypeExtension_Sequence name directives unionMemberTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm unionMemberTypes)}]}))
-
-unionTypeExtension_Sequence2 :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2
-unionTypeExtension_Sequence2 name directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-unionTypeExtension_Sequence2Directives :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives
-unionTypeExtension_Sequence2Directives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeExtension_Sequence2Name :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name
-unionTypeExtension_Sequence2Name x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeExtension_Sequence2WithDirectives :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Directives -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2
-unionTypeExtension_Sequence2WithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unionTypeExtension_Sequence2WithName :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2 -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence2
-unionTypeExtension_Sequence2WithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeExtension_SequenceDirectives :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives)
-unionTypeExtension_SequenceDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeExtension_SequenceName :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name
-unionTypeExtension_SequenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "Name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeExtension_SequenceUnionMemberTypes :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm Syntax.UnionMemberTypes
-unionTypeExtension_SequenceUnionMemberTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-        Core.projectionField = (Core.Name "UnionMemberTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionTypeExtension_SequenceWithDirectives :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence
-unionTypeExtension_SequenceWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "UnionMemberTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeExtension_SequenceWithName :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence
-unionTypeExtension_SequenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "UnionMemberTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionTypeExtension_SequenceWithUnionMemberTypes :: Phantoms.TTerm Syntax.UnionTypeExtension_Sequence -> Phantoms.TTerm Syntax.UnionMemberTypes -> Phantoms.TTerm Syntax.UnionTypeExtension_Sequence
-unionTypeExtension_SequenceWithUnionMemberTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "UnionMemberTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valueBoolean :: Phantoms.TTerm Syntax.BooleanValue -> Phantoms.TTerm Syntax.Value
-valueBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueEnum :: Phantoms.TTerm Syntax.EnumValue -> Phantoms.TTerm Syntax.Value
-valueEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFloat :: Phantoms.TTerm Syntax.FloatValue -> Phantoms.TTerm Syntax.Value
-valueFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueInt :: Phantoms.TTerm Syntax.IntValue -> Phantoms.TTerm Syntax.Value
-valueInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueList :: Phantoms.TTerm Syntax.ListValue -> Phantoms.TTerm Syntax.Value
-valueList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueNull :: Phantoms.TTerm Syntax.NullValue -> Phantoms.TTerm Syntax.Value
-valueNull x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueObject :: Phantoms.TTerm Syntax.ObjectValue -> Phantoms.TTerm Syntax.Value
-valueObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueString :: Phantoms.TTerm Syntax.StringValue -> Phantoms.TTerm Syntax.Value
-valueString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueVariable :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.Value
-valueVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphql.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Variable
-variable x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphql.syntax.Variable"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-variablesDefinition :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.DefaultValue) -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.VariablesDefinition
-variablesDefinition variable type_ defaultValue directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-variablesDefinitionDefaultValue :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm (Maybe Syntax.DefaultValue)
-variablesDefinitionDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-        Core.projectionField = (Core.Name "DefaultValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variablesDefinitionDirectives :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm (Maybe Syntax.Directives)
-variablesDefinitionDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-        Core.projectionField = (Core.Name "Directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variablesDefinitionType :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm Syntax.Type
-variablesDefinitionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-        Core.projectionField = (Core.Name "Type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variablesDefinitionVariable :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm Syntax.Variable
-variablesDefinitionVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-        Core.projectionField = (Core.Name "Variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variablesDefinitionWithDefaultValue :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm (Maybe Syntax.DefaultValue) -> Phantoms.TTerm Syntax.VariablesDefinition
-variablesDefinitionWithDefaultValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variablesDefinitionWithDirectives :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm (Maybe Syntax.Directives) -> Phantoms.TTerm Syntax.VariablesDefinition
-variablesDefinitionWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variablesDefinitionWithType :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.VariablesDefinition
-variablesDefinitionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variablesDefinitionWithVariable :: Phantoms.TTerm Syntax.VariablesDefinition -> Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.VariablesDefinition
-variablesDefinitionWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "DefaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "DefaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphql.syntax.VariablesDefinition"),
-              Core.projectionField = (Core.Name "Directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Graphviz/Dot.hs b/src/main/haskell/Hydra/Dsl/Graphviz/Dot.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Graphviz/Dot.hs
+++ /dev/null
@@ -1,845 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.graphviz.dot
-
-module Hydra.Dsl.Graphviz.Dot where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Graphviz.Dot as Dot
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-attrList :: Phantoms.TTerm [[Dot.EqualityPair]] -> Phantoms.TTerm Dot.AttrList
-attrList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphviz.dot.AttrList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-attrStmt :: Phantoms.TTerm Dot.AttrType -> Phantoms.TTerm Dot.AttrList -> Phantoms.TTerm Dot.AttrStmt
-attrStmt type_ attributes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)}]}))
-
-attrStmtAttributes :: Phantoms.TTerm Dot.AttrStmt -> Phantoms.TTerm Dot.AttrList
-attrStmtAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attrStmtType :: Phantoms.TTerm Dot.AttrStmt -> Phantoms.TTerm Dot.AttrType
-attrStmtType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attrStmtWithAttributes :: Phantoms.TTerm Dot.AttrStmt -> Phantoms.TTerm Dot.AttrList -> Phantoms.TTerm Dot.AttrStmt
-attrStmtWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-attrStmtWithType :: Phantoms.TTerm Dot.AttrStmt -> Phantoms.TTerm Dot.AttrType -> Phantoms.TTerm Dot.AttrStmt
-attrStmtWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.AttrStmt"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-attrTypeEdge :: Phantoms.TTerm Dot.AttrType
-attrTypeEdge =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.AttrType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-attrTypeGraph :: Phantoms.TTerm Dot.AttrType
-attrTypeGraph =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.AttrType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-attrTypeNode :: Phantoms.TTerm Dot.AttrType
-attrTypeNode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.AttrType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtC :: Phantoms.TTerm Dot.CompassPt
-compassPtC =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "c"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtE :: Phantoms.TTerm Dot.CompassPt
-compassPtE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "e"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtN :: Phantoms.TTerm Dot.CompassPt
-compassPtN =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "n"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtNe :: Phantoms.TTerm Dot.CompassPt
-compassPtNe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ne"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtNone :: Phantoms.TTerm Dot.CompassPt
-compassPtNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtNw :: Phantoms.TTerm Dot.CompassPt
-compassPtNw =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nw"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtS :: Phantoms.TTerm Dot.CompassPt
-compassPtS =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "s"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtSe :: Phantoms.TTerm Dot.CompassPt
-compassPtSe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "se"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtSw :: Phantoms.TTerm Dot.CompassPt
-compassPtSw =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sw"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compassPtW :: Phantoms.TTerm Dot.CompassPt
-compassPtW =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.CompassPt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "w"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeStmt :: Phantoms.TTerm Dot.NodeOrSubgraph -> Phantoms.TTerm [Dot.NodeOrSubgraph] -> Phantoms.TTerm (Maybe Dot.AttrList) -> Phantoms.TTerm Dot.EdgeStmt
-edgeStmt left right attributes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)}]}))
-
-edgeStmtAttributes :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm (Maybe Dot.AttrList)
-edgeStmtAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeStmtLeft :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm Dot.NodeOrSubgraph
-edgeStmtLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeStmtRight :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm [Dot.NodeOrSubgraph]
-edgeStmtRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeStmtWithAttributes :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm (Maybe Dot.AttrList) -> Phantoms.TTerm Dot.EdgeStmt
-edgeStmtWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeStmtWithLeft :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm Dot.NodeOrSubgraph -> Phantoms.TTerm Dot.EdgeStmt
-edgeStmtWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeStmtWithRight :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm [Dot.NodeOrSubgraph] -> Phantoms.TTerm Dot.EdgeStmt
-edgeStmtWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EdgeStmt"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equalityPair :: Phantoms.TTerm Dot.Id -> Phantoms.TTerm Dot.Id -> Phantoms.TTerm Dot.EqualityPair
-equalityPair left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-equalityPairLeft :: Phantoms.TTerm Dot.EqualityPair -> Phantoms.TTerm Dot.Id
-equalityPairLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equalityPairRight :: Phantoms.TTerm Dot.EqualityPair -> Phantoms.TTerm Dot.Id
-equalityPairRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equalityPairWithLeft :: Phantoms.TTerm Dot.EqualityPair -> Phantoms.TTerm Dot.Id -> Phantoms.TTerm Dot.EqualityPair
-equalityPairWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equalityPairWithRight :: Phantoms.TTerm Dot.EqualityPair -> Phantoms.TTerm Dot.Id -> Phantoms.TTerm Dot.EqualityPair
-equalityPairWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.EqualityPair"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graph :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Dot.Id) -> Phantoms.TTerm [Dot.Stmt] -> Phantoms.TTerm Dot.Graph
-graph strict directed id statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "strict"),
-          Core.fieldTerm = (Phantoms.unTTerm strict)},
-        Core.Field {
-          Core.fieldName = (Core.Name "directed"),
-          Core.fieldTerm = (Phantoms.unTTerm directed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-graphDirected :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm Bool
-graphDirected x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-        Core.projectionField = (Core.Name "directed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphId :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm (Maybe Dot.Id)
-graphId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphStatements :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm [Dot.Stmt]
-graphStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphStrict :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm Bool
-graphStrict x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-        Core.projectionField = (Core.Name "strict")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphWithDirected :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm Bool -> Phantoms.TTerm Dot.Graph
-graphWithDirected original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "strict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "strict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directed"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphWithId :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm (Maybe Dot.Id) -> Phantoms.TTerm Dot.Graph
-graphWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "strict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "strict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "directed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphWithStatements :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm [Dot.Stmt] -> Phantoms.TTerm Dot.Graph
-graphWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "strict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "strict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "directed")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphWithStrict :: Phantoms.TTerm Dot.Graph -> Phantoms.TTerm Bool -> Phantoms.TTerm Dot.Graph
-graphWithStrict original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "strict"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "directed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "directed")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Graph"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-id :: Phantoms.TTerm String -> Phantoms.TTerm Dot.Id
-id x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphviz.dot.Id"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nodeId :: Phantoms.TTerm Dot.Id -> Phantoms.TTerm (Maybe Dot.Port) -> Phantoms.TTerm Dot.NodeId
-nodeId id port =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "port"),
-          Core.fieldTerm = (Phantoms.unTTerm port)}]}))
-
-nodeIdId :: Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm Dot.Id
-nodeIdId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeIdPort :: Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm (Maybe Dot.Port)
-nodeIdPort x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-        Core.projectionField = (Core.Name "port")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeIdWithId :: Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm Dot.Id -> Phantoms.TTerm Dot.NodeId
-nodeIdWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "port"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-              Core.projectionField = (Core.Name "port")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeIdWithPort :: Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm (Maybe Dot.Port) -> Phantoms.TTerm Dot.NodeId
-nodeIdWithPort original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeId"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "port"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeOrSubgraphNode :: Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm Dot.NodeOrSubgraph
-nodeOrSubgraphNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.NodeOrSubgraph"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeOrSubgraphSubgraph :: Phantoms.TTerm Dot.Subgraph -> Phantoms.TTerm Dot.NodeOrSubgraph
-nodeOrSubgraphSubgraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.NodeOrSubgraph"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subgraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeStmt :: Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm (Maybe Dot.AttrList) -> Phantoms.TTerm Dot.NodeStmt
-nodeStmt id attributes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm attributes)}]}))
-
-nodeStmtAttributes :: Phantoms.TTerm Dot.NodeStmt -> Phantoms.TTerm (Maybe Dot.AttrList)
-nodeStmtAttributes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-        Core.projectionField = (Core.Name "attributes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeStmtId :: Phantoms.TTerm Dot.NodeStmt -> Phantoms.TTerm Dot.NodeId
-nodeStmtId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeStmtWithAttributes :: Phantoms.TTerm Dot.NodeStmt -> Phantoms.TTerm (Maybe Dot.AttrList) -> Phantoms.TTerm Dot.NodeStmt
-nodeStmtWithAttributes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeStmtWithId :: Phantoms.TTerm Dot.NodeStmt -> Phantoms.TTerm Dot.NodeId -> Phantoms.TTerm Dot.NodeStmt
-nodeStmtWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "attributes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.NodeStmt"),
-              Core.projectionField = (Core.Name "attributes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-port :: Phantoms.TTerm (Maybe Dot.Id) -> Phantoms.TTerm (Maybe Dot.CompassPt) -> Phantoms.TTerm Dot.Port
-port id position =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "position"),
-          Core.fieldTerm = (Phantoms.unTTerm position)}]}))
-
-portId :: Phantoms.TTerm Dot.Port -> Phantoms.TTerm (Maybe Dot.Id)
-portId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-portPosition :: Phantoms.TTerm Dot.Port -> Phantoms.TTerm (Maybe Dot.CompassPt)
-portPosition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-        Core.projectionField = (Core.Name "position")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-portWithId :: Phantoms.TTerm Dot.Port -> Phantoms.TTerm (Maybe Dot.Id) -> Phantoms.TTerm Dot.Port
-portWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "position"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-              Core.projectionField = (Core.Name "position")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-portWithPosition :: Phantoms.TTerm Dot.Port -> Phantoms.TTerm (Maybe Dot.CompassPt) -> Phantoms.TTerm Dot.Port
-portWithPosition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Port"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "position"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stmtAttr :: Phantoms.TTerm Dot.AttrStmt -> Phantoms.TTerm Dot.Stmt
-stmtAttr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.Stmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "attr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stmtEdge :: Phantoms.TTerm Dot.EdgeStmt -> Phantoms.TTerm Dot.Stmt
-stmtEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.Stmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stmtEquals :: Phantoms.TTerm Dot.EqualityPair -> Phantoms.TTerm Dot.Stmt
-stmtEquals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.Stmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stmtNode :: Phantoms.TTerm Dot.NodeStmt -> Phantoms.TTerm Dot.Stmt
-stmtNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.Stmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stmtSubgraph :: Phantoms.TTerm Dot.Subgraph -> Phantoms.TTerm Dot.Stmt
-stmtSubgraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.graphviz.dot.Stmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subgraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-subgraph :: Phantoms.TTerm (Maybe Dot.SubgraphId) -> Phantoms.TTerm [Dot.Stmt] -> Phantoms.TTerm Dot.Subgraph
-subgraph subgraphId statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subgraphId"),
-          Core.fieldTerm = (Phantoms.unTTerm subgraphId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-subgraphId :: Phantoms.TTerm (Maybe Dot.Id) -> Phantoms.TTerm Dot.SubgraphId
-subgraphId x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.graphviz.dot.SubgraphId"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-subgraphStatements :: Phantoms.TTerm Dot.Subgraph -> Phantoms.TTerm [Dot.Stmt]
-subgraphStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subgraphSubgraphId :: Phantoms.TTerm Dot.Subgraph -> Phantoms.TTerm (Maybe Dot.SubgraphId)
-subgraphSubgraphId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-        Core.projectionField = (Core.Name "subgraphId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subgraphWithStatements :: Phantoms.TTerm Dot.Subgraph -> Phantoms.TTerm [Dot.Stmt] -> Phantoms.TTerm Dot.Subgraph
-subgraphWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subgraphId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-              Core.projectionField = (Core.Name "subgraphId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subgraphWithSubgraphId :: Phantoms.TTerm Dot.Subgraph -> Phantoms.TTerm (Maybe Dot.SubgraphId) -> Phantoms.TTerm Dot.Subgraph
-subgraphWithSubgraphId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subgraphId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.graphviz.dot.Subgraph"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unAttrList :: Phantoms.TTerm Dot.AttrList -> Phantoms.TTerm [[Dot.EqualityPair]]
-unAttrList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphviz.dot.AttrList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unId :: Phantoms.TTerm Dot.Id -> Phantoms.TTerm String
-unId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphviz.dot.Id")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSubgraphId :: Phantoms.TTerm Dot.SubgraphId -> Phantoms.TTerm (Maybe Dot.Id)
-unSubgraphId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.graphviz.dot.SubgraphId")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Haskell/Environment.hs b/src/main/haskell/Hydra/Dsl/Haskell/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Haskell/Environment.hs
+++ /dev/null
@@ -1,170 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.haskell.environment
-
-module Hydra.Dsl.Haskell.Environment where
-import qualified Hydra.Core as Core
-import qualified Hydra.Haskell.Environment as Environment
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-haskellModuleMetadata :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.HaskellModuleMetadata
-haskellModuleMetadata usesByteString usesInt usesMap usesSet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "usesByteString"),
-          Core.fieldTerm = (Phantoms.unTTerm usesByteString)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesInt"),
-          Core.fieldTerm = (Phantoms.unTTerm usesInt)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMap"),
-          Core.fieldTerm = (Phantoms.unTTerm usesMap)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesSet"),
-          Core.fieldTerm = (Phantoms.unTTerm usesSet)}]}))
-haskellModuleMetadataUsesByteString :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool
-haskellModuleMetadataUsesByteString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-        Core.projectionField = (Core.Name "usesByteString")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-haskellModuleMetadataUsesInt :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool
-haskellModuleMetadataUsesInt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-        Core.projectionField = (Core.Name "usesInt")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-haskellModuleMetadataUsesMap :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool
-haskellModuleMetadataUsesMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-        Core.projectionField = (Core.Name "usesMap")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-haskellModuleMetadataUsesSet :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool
-haskellModuleMetadataUsesSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-        Core.projectionField = (Core.Name "usesSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-haskellModuleMetadataWithUsesByteString :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.HaskellModuleMetadata
-haskellModuleMetadataWithUsesByteString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "usesByteString"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesInt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesInt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-haskellModuleMetadataWithUsesInt :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.HaskellModuleMetadata
-haskellModuleMetadataWithUsesInt original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "usesByteString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesByteString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesInt"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-haskellModuleMetadataWithUsesMap :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.HaskellModuleMetadata
-haskellModuleMetadataWithUsesMap original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "usesByteString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesByteString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesInt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesInt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMap"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-haskellModuleMetadataWithUsesSet :: Phantoms.TTerm Environment.HaskellModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.HaskellModuleMetadata
-haskellModuleMetadataWithUsesSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "usesByteString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesByteString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesInt"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesInt")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMap"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.environment.HaskellModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMap")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Haskell/Syntax.hs b/src/main/haskell/Hydra/Dsl/Haskell/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Haskell/Syntax.hs
+++ /dev/null
@@ -1,3440 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.haskell.syntax
-
-module Hydra.Dsl.Haskell.Syntax where
-import qualified Hydra.Core as Core
-import qualified Hydra.Haskell.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-alternative :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.CaseRhs -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.Alternative
-alternative pattern rhs binds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binds"),
-          Core.fieldTerm = (Phantoms.unTTerm binds)}]}))
-alternativeBinds :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm (Maybe Syntax.LocalBindings)
-alternativeBinds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-        Core.projectionField = (Core.Name "binds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-alternativePattern :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.Pattern
-alternativePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-alternativeRhs :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.CaseRhs
-alternativeRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-alternativeWithBinds :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.Alternative
-alternativeWithBinds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-alternativeWithPattern :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Alternative
-alternativeWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "binds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-              Core.projectionField = (Core.Name "binds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-alternativeWithRhs :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.CaseRhs -> Phantoms.TTerm Syntax.Alternative
-alternativeWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "binds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Alternative"),
-              Core.projectionField = (Core.Name "binds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-applicationDeclarationHead :: Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.ApplicationDeclarationHead
-applicationDeclarationHead function operand =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)}]}))
-applicationDeclarationHeadFunction :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead
-applicationDeclarationHeadFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationDeclarationHeadOperand :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.Variable
-applicationDeclarationHeadOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationDeclarationHeadWithFunction :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.ApplicationDeclarationHead
-applicationDeclarationHeadWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-applicationDeclarationHeadWithOperand :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.ApplicationDeclarationHead
-applicationDeclarationHeadWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-applicationExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ApplicationExpression
-applicationExpression function argument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))
-applicationExpressionArgument :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression
-applicationExpressionArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationExpressionFunction :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression
-applicationExpressionFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationExpressionWithArgument :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ApplicationExpression
-applicationExpressionWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-applicationExpressionWithFunction :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ApplicationExpression
-applicationExpressionWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationExpression"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-applicationPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ApplicationPattern
-applicationPattern name args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-applicationPatternArgs :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm [Syntax.Pattern]
-applicationPatternArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationPatternName :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm Syntax.Name
-applicationPatternName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationPatternWithArgs :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ApplicationPattern
-applicationPatternWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-applicationPatternWithName :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ApplicationPattern
-applicationPatternWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationPattern"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-applicationType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ApplicationType
-applicationType context argument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm context)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))
-applicationTypeArgument :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type
-applicationTypeArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationTypeContext :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type
-applicationTypeContext x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-        Core.projectionField = (Core.Name "context")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-applicationTypeWithArgument :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ApplicationType
-applicationTypeWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-applicationTypeWithContext :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ApplicationType
-applicationTypeWithContext original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ApplicationType"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-asPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.AsPattern
-asPattern name inner =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)}]}))
-asPatternInner :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern
-asPatternInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-asPatternName :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Name
-asPatternName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-asPatternWithInner :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.AsPattern
-asPatternWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-asPatternWithName :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.AsPattern
-asPatternWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.AsPattern"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-assertionClass :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm Syntax.Assertion
-assertionClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-assertionTuple :: Phantoms.TTerm [Syntax.Assertion] -> Phantoms.TTerm Syntax.Assertion
-assertionTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-caseExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.Alternative] -> Phantoms.TTerm Syntax.CaseExpression
-caseExpression case_ alternatives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm case_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Phantoms.unTTerm alternatives)}]}))
-caseExpressionAlternatives :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm [Syntax.Alternative]
-caseExpressionAlternatives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-        Core.projectionField = (Core.Name "alternatives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-caseExpressionCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression
-caseExpressionCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-        Core.projectionField = (Core.Name "case")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-caseExpressionWithAlternatives :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm [Syntax.Alternative] -> Phantoms.TTerm Syntax.CaseExpression
-caseExpressionWithAlternatives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-caseExpressionWithCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseExpression
-caseExpressionWithCase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternatives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "alternatives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-caseRhs :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseRhs
-caseRhs x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.CaseRhs"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-classAssertion :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.ClassAssertion
-classAssertion name types =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)}]}))
-classAssertionName :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm Syntax.Name
-classAssertionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-classAssertionTypes :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm [Syntax.Type]
-classAssertionTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-classAssertionWithName :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ClassAssertion
-classAssertionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-classAssertionWithTypes :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.ClassAssertion
-classAssertionWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-constructRecordExpression :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.ConstructRecordExpression
-constructRecordExpression name fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-constructRecordExpressionFields :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate]
-constructRecordExpressionFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-constructRecordExpressionName :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm Syntax.Name
-constructRecordExpressionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-constructRecordExpressionWithFields :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.ConstructRecordExpression
-constructRecordExpressionWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-constructRecordExpressionWithName :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ConstructRecordExpression
-constructRecordExpressionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructRecordExpression"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-constructorOrdinary :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm Syntax.Constructor
-constructorOrdinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Constructor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ordinary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-constructorRecord :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm Syntax.Constructor
-constructorRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Constructor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-constructorWithComments :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ConstructorWithComments
-constructorWithComments body comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-constructorWithCommentsBody :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm Syntax.Constructor
-constructorWithCommentsBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-constructorWithCommentsComments :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm (Maybe String)
-constructorWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-constructorWithCommentsWithBody :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm Syntax.ConstructorWithComments
-constructorWithCommentsWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-constructorWithCommentsWithComments :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ConstructorWithComments
-constructorWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ConstructorWithComments"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-contextType :: Phantoms.TTerm Syntax.Assertion -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ContextType
-contextType ctx type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ctx"),
-          Core.fieldTerm = (Phantoms.unTTerm ctx)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-contextTypeCtx :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Assertion
-contextTypeCtx x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-        Core.projectionField = (Core.Name "ctx")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-contextTypeType :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Type
-contextTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-contextTypeWithCtx :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Assertion -> Phantoms.TTerm Syntax.ContextType
-contextTypeWithCtx original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ctx"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-contextTypeWithType :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ContextType
-contextTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ctx"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ContextType"),
-              Core.projectionField = (Core.Name "ctx")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-dataDeclaration :: Phantoms.TTerm Syntax.DataOrNewtype -> Phantoms.TTerm [Syntax.Assertion] -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm [Syntax.ConstructorWithComments] -> Phantoms.TTerm [Syntax.Deriving] -> Phantoms.TTerm Syntax.DataDeclaration
-dataDeclaration keyword context head constructors deriving_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyword"),
-          Core.fieldTerm = (Phantoms.unTTerm keyword)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm context)},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Phantoms.unTTerm constructors)},
-        Core.Field {
-          Core.fieldName = (Core.Name "deriving"),
-          Core.fieldTerm = (Phantoms.unTTerm deriving_)}]}))
-dataDeclarationConstructors :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.ConstructorWithComments]
-dataDeclarationConstructors x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-        Core.projectionField = (Core.Name "constructors")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-dataDeclarationContext :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Assertion]
-dataDeclarationContext x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-        Core.projectionField = (Core.Name "context")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-dataDeclarationDeriving :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Deriving]
-dataDeclarationDeriving x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-        Core.projectionField = (Core.Name "deriving")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-dataDeclarationHead :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DeclarationHead
-dataDeclarationHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-dataDeclarationKeyword :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DataOrNewtype
-dataDeclarationKeyword x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-        Core.projectionField = (Core.Name "keyword")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-dataDeclarationWithConstructors :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.ConstructorWithComments] -> Phantoms.TTerm Syntax.DataDeclaration
-dataDeclarationWithConstructors original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyword"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "keyword")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "deriving"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "deriving")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-dataDeclarationWithContext :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Assertion] -> Phantoms.TTerm Syntax.DataDeclaration
-dataDeclarationWithContext original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyword"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "keyword")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deriving"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "deriving")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-dataDeclarationWithDeriving :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Deriving] -> Phantoms.TTerm Syntax.DataDeclaration
-dataDeclarationWithDeriving original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyword"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "keyword")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deriving"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-dataDeclarationWithHead :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.DataDeclaration
-dataDeclarationWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyword"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "keyword")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deriving"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "deriving")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-dataDeclarationWithKeyword :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DataOrNewtype -> Phantoms.TTerm Syntax.DataDeclaration
-dataDeclarationWithKeyword original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyword"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructors"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "constructors")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deriving"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DataDeclaration"),
-              Core.projectionField = (Core.Name "deriving")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-dataOrNewtypeData :: Phantoms.TTerm Syntax.DataOrNewtype
-dataOrNewtypeData =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.DataOrNewtype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "data"),
-        Core.fieldTerm = Core.TermUnit}}))
-dataOrNewtypeNewtype :: Phantoms.TTerm Syntax.DataOrNewtype
-dataOrNewtypeNewtype =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.DataOrNewtype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "newtype"),
-        Core.fieldTerm = Core.TermUnit}}))
-declarationData :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationData x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "data"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationHeadApplication :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead
-declarationHeadApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationHeadParens :: Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead
-declarationHeadParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationHeadSimple :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.DeclarationHead
-declarationHeadSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.Declaration
-declarationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationTypedBinding :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.Declaration
-declarationTypedBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typedBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationValueBinding :: Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.Declaration
-declarationValueBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Declaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-declarationWithComments :: Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.DeclarationWithComments
-declarationWithComments body comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-declarationWithCommentsBody :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm Syntax.Declaration
-declarationWithCommentsBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-declarationWithCommentsComments :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm (Maybe String)
-declarationWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-declarationWithCommentsWithBody :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm Syntax.DeclarationWithComments
-declarationWithCommentsWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-declarationWithCommentsWithComments :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.DeclarationWithComments
-declarationWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.DeclarationWithComments"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-deriving_ :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.Deriving
-deriving_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.Deriving"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-exportDeclaration :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm Syntax.Export
-exportDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Export"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-exportModule :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.Export
-exportModule x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Export"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "module"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionApplication :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression
-expressionApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression
-expressionCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionConstructRecord :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm Syntax.Expression
-expressionConstructRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructRecord"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionDo :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.Expression
-expressionDo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "do"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionIf :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-expressionIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionInfixApplication :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression
-expressionInfixApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "infixApplication"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionLambda :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression
-expressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionLeftSection :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression
-expressionLeftSection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftSection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionLet :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression
-expressionLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionList :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression
-expressionList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Expression
-expressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionParens :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionPrefixApplication :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Expression
-expressionPrefixApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prefixApplication"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionRightSection :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression
-expressionRightSection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightSection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionTuple :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression
-expressionTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionTypeSignature :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Expression
-expressionTypeSignature x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeSignature"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionUpdateRecord :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm Syntax.Expression
-expressionUpdateRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "updateRecord"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-expressionVariable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Expression
-expressionVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-field :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Field
-field name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-fieldName :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Name
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldType :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Type
-fieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldUpdate :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldUpdate
-fieldUpdate name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FieldUpdate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-fieldUpdateName :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Name
-fieldUpdateName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldUpdate"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldUpdateValue :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Expression
-fieldUpdateValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldUpdate"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldUpdateWithName :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.FieldUpdate
-fieldUpdateWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FieldUpdate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.haskell.syntax.FieldUpdate"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-fieldUpdateWithValue :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldUpdate
-fieldUpdateWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FieldUpdate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldUpdate"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-fieldWithComments :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FieldWithComments
-fieldWithComments field comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm field)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-fieldWithCommentsComments :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm (Maybe String)
-fieldWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldWithCommentsField :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm Syntax.Field
-fieldWithCommentsField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-        Core.projectionField = (Core.Name "field")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-fieldWithCommentsWithComments :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FieldWithComments
-fieldWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-fieldWithCommentsWithField :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.FieldWithComments
-fieldWithCommentsWithField original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FieldWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-fieldWithName :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-fieldWithType :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Field
-fieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-functionType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FunctionType
-functionType domain codomain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Phantoms.unTTerm codomain)}]}))
-functionTypeCodomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type
-functionTypeCodomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-        Core.projectionField = (Core.Name "codomain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionTypeDomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type
-functionTypeDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionTypeWithCodomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FunctionType
-functionTypeWithCodomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-functionTypeWithDomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FunctionType
-functionTypeWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.FunctionType"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-ifExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression
-ifExpression condition then_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm then_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-ifExpressionCondition :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-ifExpressionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-ifExpressionElse :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-ifExpressionElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-ifExpressionThen :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-ifExpressionThen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-        Core.projectionField = (Core.Name "then")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-ifExpressionWithCondition :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression
-ifExpressionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-ifExpressionWithElse :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression
-ifExpressionWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-ifExpressionWithThen :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression
-ifExpressionWithThen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-import_ :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm (Maybe Syntax.ModuleName) -> Phantoms.TTerm (Maybe Syntax.SpecImport) -> Phantoms.TTerm Syntax.Import
-import_ qualified module_ as spec =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualified"),
-          Core.fieldTerm = (Phantoms.unTTerm qualified)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm module_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Phantoms.unTTerm spec)}]}))
-importAs :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.ModuleName)
-importAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importExportSpec :: Phantoms.TTerm (Maybe Syntax.ImportModifier) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.SubspecImportExportSpec) -> Phantoms.TTerm Syntax.ImportExportSpec
-importExportSpec modifier name subspec =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm modifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subspec"),
-          Core.fieldTerm = (Phantoms.unTTerm subspec)}]}))
-importExportSpecModifier :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.ImportModifier)
-importExportSpecModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-        Core.projectionField = (Core.Name "modifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importExportSpecName :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm Syntax.Name
-importExportSpecName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importExportSpecSubspec :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.SubspecImportExportSpec)
-importExportSpecSubspec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-        Core.projectionField = (Core.Name "subspec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importExportSpecWithModifier :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.ImportModifier) -> Phantoms.TTerm Syntax.ImportExportSpec
-importExportSpecWithModifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subspec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-              Core.projectionField = (Core.Name "subspec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-importExportSpecWithName :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ImportExportSpec
-importExportSpecWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subspec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-              Core.projectionField = (Core.Name "subspec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-importExportSpecWithSubspec :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.SubspecImportExportSpec) -> Phantoms.TTerm Syntax.ImportExportSpec
-importExportSpecWithSubspec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-              Core.projectionField = (Core.Name "modifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ImportExportSpec"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subspec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-importModifierPattern :: Phantoms.TTerm Syntax.ImportModifier
-importModifierPattern =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.ImportModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = Core.TermUnit}}))
-importModifierType :: Phantoms.TTerm Syntax.ImportModifier
-importModifierType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.ImportModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = Core.TermUnit}}))
-importModule :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Syntax.ModuleName
-importModule x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-        Core.projectionField = (Core.Name "module")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importQualified :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Bool
-importQualified x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-        Core.projectionField = (Core.Name "qualified")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importSpec :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.SpecImport)
-importSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-        Core.projectionField = (Core.Name "spec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-importWithAs :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.ModuleName) -> Phantoms.TTerm Syntax.Import
-importWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "qualified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "spec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-importWithModule :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.Import
-importWithModule original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "qualified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "spec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-importWithQualified :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Import
-importWithQualified original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualified"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "spec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-importWithSpec :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.SpecImport) -> Phantoms.TTerm Syntax.Import
-importWithSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "qualified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Import"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-infixApplicationExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InfixApplicationExpression
-infixApplicationExpression lhs operator rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-infixApplicationExpressionLhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression
-infixApplicationExpressionLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-infixApplicationExpressionOperator :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Operator
-infixApplicationExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-infixApplicationExpressionRhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression
-infixApplicationExpressionRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-infixApplicationExpressionWithLhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InfixApplicationExpression
-infixApplicationExpressionWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-infixApplicationExpressionWithOperator :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixApplicationExpression
-infixApplicationExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-infixApplicationExpressionWithRhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InfixApplicationExpression
-infixApplicationExpressionWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixApplicationExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-infixType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixType
-infixType lhs operator rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-infixTypeLhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Type
-infixTypeLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-infixTypeOperator :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator
-infixTypeOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-infixTypeRhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator
-infixTypeRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-infixTypeWithLhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.InfixType
-infixTypeWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-infixTypeWithOperator :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixType
-infixTypeWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-infixTypeWithRhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixType
-infixTypeWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.InfixType"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-lambdaExpression :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpression bindings inner =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)}]}))
-lambdaExpressionBindings :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm [Syntax.Pattern]
-lambdaExpressionBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-lambdaExpressionInner :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression
-lambdaExpressionInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-lambdaExpressionWithBindings :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-lambdaExpressionWithInner :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-letExpression :: Phantoms.TTerm [Syntax.LocalBinding] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetExpression
-letExpression bindings inner =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)}]}))
-letExpressionBindings :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.LocalBinding]
-letExpressionBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-letExpressionInner :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression
-letExpressionInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-letExpressionWithBindings :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.LocalBinding] -> Phantoms.TTerm Syntax.LetExpression
-letExpressionWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-letExpressionWithInner :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetExpression
-letExpressionWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-literalChar :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Literal
-literalChar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalDouble :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.Literal
-literalDouble x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalFloat :: Phantoms.TTerm Float -> Phantoms.TTerm Syntax.Literal
-literalFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalInt :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Literal
-literalInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-literalString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-localBindingSignature :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.LocalBinding
-localBindingSignature x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.LocalBinding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "signature"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-localBindingValue :: Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.LocalBinding
-localBindingValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.LocalBinding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-localBindings :: Phantoms.TTerm [Syntax.LocalBinding] -> Phantoms.TTerm Syntax.LocalBindings
-localBindings x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.LocalBindings"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-module_ :: Phantoms.TTerm (Maybe Syntax.ModuleHead) -> Phantoms.TTerm [Syntax.Import] -> Phantoms.TTerm [Syntax.DeclarationWithComments] -> Phantoms.TTerm Syntax.Module
-module_ head imports declarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))
-moduleDeclarations :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.DeclarationWithComments]
-moduleDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-        Core.projectionField = (Core.Name "declarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleHead :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm (Maybe Syntax.ModuleHead)
-moduleHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleHeadComments :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm (Maybe String)
-moduleHeadComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleHeadExports :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm [Syntax.Export]
-moduleHeadExports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-        Core.projectionField = (Core.Name "exports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleHeadName :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm Syntax.ModuleName
-moduleHeadName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleHeadWithComments :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ModuleHead
-moduleHeadWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-              Core.projectionField = (Core.Name "exports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-moduleHeadWithExports :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm [Syntax.Export] -> Phantoms.TTerm Syntax.ModuleHead
-moduleHeadWithExports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-moduleHeadWithName :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.ModuleHead
-moduleHeadWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-              Core.projectionField = (Core.Name "exports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-moduleHead_ :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm [Syntax.Export] -> Phantoms.TTerm Syntax.ModuleHead
-moduleHead_ comments name exports =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.ModuleHead"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Phantoms.unTTerm exports)}]}))
-moduleImports :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.Import]
-moduleImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ModuleName
-moduleName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.ModuleName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-moduleWithDeclarations :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.DeclarationWithComments] -> Phantoms.TTerm Syntax.Module
-moduleWithDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-moduleWithHead :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm (Maybe Syntax.ModuleHead) -> Phantoms.TTerm Syntax.Module
-moduleWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-moduleWithImports :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.Import] -> Phantoms.TTerm Syntax.Module
-moduleWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.Module"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-nameImplicit :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Name
-nameImplicit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Name"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-nameNormal :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Name
-nameNormal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Name"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-nameParens :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Name
-nameParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Name"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-namePart :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.NamePart
-namePart x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.NamePart"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-operatorBacktick :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Operator
-operatorBacktick x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Operator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "backtick"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-operatorNormal :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Operator
-operatorNormal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Operator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-ordinaryConstructor :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.OrdinaryConstructor
-ordinaryConstructor name fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-ordinaryConstructorFields :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm [Syntax.Type]
-ordinaryConstructorFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-ordinaryConstructorName :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm Syntax.Name
-ordinaryConstructorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-ordinaryConstructorWithFields :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.OrdinaryConstructor
-ordinaryConstructorWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-ordinaryConstructorWithName :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.OrdinaryConstructor
-ordinaryConstructorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.OrdinaryConstructor"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-patternApplication :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm Syntax.Pattern
-patternApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternAs :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern
-patternAs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "as"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternField :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.PatternField
-patternField name pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-patternFieldName :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Name
-patternFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-patternFieldPattern :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Pattern
-patternFieldPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-patternFieldWithName :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.PatternField
-patternFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-patternFieldWithPattern :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.PatternField
-patternFieldWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PatternField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-patternList :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern
-patternList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Pattern
-patternLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern
-patternName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternParens :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Pattern
-patternParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternRecord :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm Syntax.Pattern
-patternRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternTuple :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern
-patternTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternTyped :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Pattern
-patternTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternWildcard :: Phantoms.TTerm Syntax.Pattern
-patternWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-prefixApplicationExpression :: Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrefixApplicationExpression
-prefixApplicationExpression operator rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-prefixApplicationExpressionOperator :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Operator
-prefixApplicationExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-prefixApplicationExpressionRhs :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Expression
-prefixApplicationExpressionRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-prefixApplicationExpressionWithOperator :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.PrefixApplicationExpression
-prefixApplicationExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-prefixApplicationExpressionWithRhs :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrefixApplicationExpression
-prefixApplicationExpressionWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-qualifiedName :: Phantoms.TTerm [Syntax.NamePart] -> Phantoms.TTerm Syntax.NamePart -> Phantoms.TTerm Syntax.QualifiedName
-qualifiedName qualifiers unqualified =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unqualified"),
-          Core.fieldTerm = (Phantoms.unTTerm unqualified)}]}))
-qualifiedNameQualifiers :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm [Syntax.NamePart]
-qualifiedNameQualifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-        Core.projectionField = (Core.Name "qualifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-qualifiedNameUnqualified :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.NamePart
-qualifiedNameUnqualified x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-        Core.projectionField = (Core.Name "unqualified")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-qualifiedNameWithQualifiers :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm [Syntax.NamePart] -> Phantoms.TTerm Syntax.QualifiedName
-qualifiedNameWithQualifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unqualified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-              Core.projectionField = (Core.Name "unqualified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-qualifiedNameWithUnqualified :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.NamePart -> Phantoms.TTerm Syntax.QualifiedName
-qualifiedNameWithUnqualified original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.QualifiedName"),
-              Core.projectionField = (Core.Name "qualifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unqualified"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-recordConstructor :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.FieldWithComments] -> Phantoms.TTerm Syntax.RecordConstructor
-recordConstructor name fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-recordConstructorFields :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm [Syntax.FieldWithComments]
-recordConstructorFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-recordConstructorName :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm Syntax.Name
-recordConstructorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-recordConstructorWithFields :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm [Syntax.FieldWithComments] -> Phantoms.TTerm Syntax.RecordConstructor
-recordConstructorWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-recordConstructorWithName :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.RecordConstructor
-recordConstructorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordConstructor"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-recordPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.PatternField] -> Phantoms.TTerm Syntax.RecordPattern
-recordPattern name fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-recordPatternFields :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm [Syntax.PatternField]
-recordPatternFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-recordPatternName :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm Syntax.Name
-recordPatternName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-recordPatternWithFields :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm [Syntax.PatternField] -> Phantoms.TTerm Syntax.RecordPattern
-recordPatternWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-recordPatternWithName :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.RecordPattern
-recordPatternWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.RecordPattern"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-rightHandSide :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RightHandSide
-rightHandSide x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.RightHandSide"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-sectionExpression :: Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SectionExpression
-sectionExpression operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-sectionExpressionExpression :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression
-sectionExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-sectionExpressionOperator :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Operator
-sectionExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-sectionExpressionWithExpression :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SectionExpression
-sectionExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-sectionExpressionWithOperator :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.SectionExpression
-sectionExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SectionExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-simpleValueBinding :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.RightHandSide -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.SimpleValueBinding
-simpleValueBinding pattern rhs localBindings =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localBindings"),
-          Core.fieldTerm = (Phantoms.unTTerm localBindings)}]}))
-simpleValueBindingLocalBindings :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm (Maybe Syntax.LocalBindings)
-simpleValueBindingLocalBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-        Core.projectionField = (Core.Name "localBindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-simpleValueBindingPattern :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.Pattern
-simpleValueBindingPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-simpleValueBindingRhs :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.RightHandSide
-simpleValueBindingRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-simpleValueBindingWithLocalBindings :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.SimpleValueBinding
-simpleValueBindingWithLocalBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localBindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-simpleValueBindingWithPattern :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.SimpleValueBinding
-simpleValueBindingWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "localBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-              Core.projectionField = (Core.Name "localBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-simpleValueBindingWithRhs :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.RightHandSide -> Phantoms.TTerm Syntax.SimpleValueBinding
-simpleValueBindingWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "localBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.SimpleValueBinding"),
-              Core.projectionField = (Core.Name "localBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-specImportHiding :: Phantoms.TTerm [Syntax.ImportExportSpec] -> Phantoms.TTerm Syntax.SpecImport
-specImportHiding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.SpecImport"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hiding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-specImportList :: Phantoms.TTerm [Syntax.ImportExportSpec] -> Phantoms.TTerm Syntax.SpecImport
-specImportList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.SpecImport"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-statement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement
-statement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.Statement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-subspecImportExportSpecAll :: Phantoms.TTerm Syntax.SubspecImportExportSpec
-subspecImportExportSpecAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.SubspecImportExportSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-subspecImportExportSpecList :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.SubspecImportExportSpec
-subspecImportExportSpecList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.SubspecImportExportSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeApplication :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type
-typeApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeCtx :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Type
-typeCtx x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ctx"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeDeclaration :: Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclaration name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-typeDeclarationName :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.DeclarationHead
-typeDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeDeclarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.Type
-typeDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeDeclarationWithName :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeDeclarationWithType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeFunction :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type
-typeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeInfix :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Type
-typeInfix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "infix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeList :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type
-typeList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeParens :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type
-typeParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeSignature :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignature
-typeSignature name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-typeSignatureExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignatureExpression
-typeSignatureExpression inner type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-typeSignatureExpressionInner :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Expression
-typeSignatureExpressionInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSignatureExpressionType :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Type
-typeSignatureExpressionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSignatureExpressionWithInner :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeSignatureExpression
-typeSignatureExpressionWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeSignatureExpressionWithType :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignatureExpression
-typeSignatureExpressionWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignatureExpression"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeSignatureName :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Name
-typeSignatureName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSignatureType :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Type
-typeSignatureType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeSignatureWithName :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.TypeSignature
-typeSignatureWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeSignatureWithType :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignature
-typeSignatureWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypeSignature"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeTuple :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type
-typeTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typeVariable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type
-typeVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-typedBinding :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.TypedBinding
-typedBinding typeSignature valueBinding =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeSignature"),
-          Core.fieldTerm = (Phantoms.unTTerm typeSignature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueBinding"),
-          Core.fieldTerm = (Phantoms.unTTerm valueBinding)}]}))
-typedBindingTypeSignature :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.TypeSignature
-typedBindingTypeSignature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-        Core.projectionField = (Core.Name "typeSignature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typedBindingValueBinding :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.ValueBinding
-typedBindingValueBinding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-        Core.projectionField = (Core.Name "valueBinding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typedBindingWithTypeSignature :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.TypedBinding
-typedBindingWithTypeSignature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeSignature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueBinding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-              Core.projectionField = (Core.Name "valueBinding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typedBindingWithValueBinding :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.TypedBinding
-typedBindingWithValueBinding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeSignature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedBinding"),
-              Core.projectionField = (Core.Name "typeSignature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueBinding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typedPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypedPattern
-typedPattern inner type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-typedPatternInner :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Pattern
-typedPatternInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typedPatternType :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Type
-typedPatternType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typedPatternWithInner :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.TypedPattern
-typedPatternWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typedPatternWithType :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypedPattern
-typedPatternWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.TypedPattern"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unCaseRhs :: Phantoms.TTerm Syntax.CaseRhs -> Phantoms.TTerm Syntax.Expression
-unCaseRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.CaseRhs")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unDeriving :: Phantoms.TTerm Syntax.Deriving -> Phantoms.TTerm [Syntax.Name]
-unDeriving x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.Deriving")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unLocalBindings :: Phantoms.TTerm Syntax.LocalBindings -> Phantoms.TTerm [Syntax.LocalBinding]
-unLocalBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.LocalBindings")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unModuleName :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm String
-unModuleName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.ModuleName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unNamePart :: Phantoms.TTerm Syntax.NamePart -> Phantoms.TTerm String
-unNamePart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.NamePart")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unRightHandSide :: Phantoms.TTerm Syntax.RightHandSide -> Phantoms.TTerm Syntax.Expression
-unRightHandSide x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.RightHandSide")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.Expression
-unStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.Statement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unVariable :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.Name
-unVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.haskell.syntax.Variable")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-updateRecordExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.UpdateRecordExpression
-updateRecordExpression inner fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-updateRecordExpressionFields :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate]
-updateRecordExpressionFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-updateRecordExpressionInner :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm Syntax.Expression
-updateRecordExpressionInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-updateRecordExpressionWithFields :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.UpdateRecordExpression
-updateRecordExpressionWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-updateRecordExpressionWithInner :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UpdateRecordExpression
-updateRecordExpressionWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.haskell.syntax.UpdateRecordExpression"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-valueBindingSimple :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.ValueBinding
-valueBindingSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.haskell.syntax.ValueBinding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-variable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Variable
-variable x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.haskell.syntax.Variable"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Iana/Linkrelations.hs b/src/main/haskell/Hydra/Dsl/Iana/Linkrelations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Iana/Linkrelations.hs
+++ /dev/null
@@ -1,979 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.iana.linkrelations
-
-module Hydra.Dsl.Iana.Linkrelations where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Iana.Linkrelations as Linkrelations
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-linkRelationTypeAbout :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeAbout =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "about"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeAcl :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeAcl =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "acl"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeAlternate :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeAlternate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alternate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeAmphtml :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeAmphtml =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "amphtml"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeAppendix :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeAppendix =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "appendix"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeApple_touch_icon :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeApple_touch_icon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "apple-touch-icon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeApple_touch_startup_image :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeApple_touch_startup_image =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "apple-touch-startup-image"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeArchives :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeArchives =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "archives"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeAuthor :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeAuthor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "author"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeBlocked_by :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeBlocked_by =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "blocked-by"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeBookmark :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeBookmark =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bookmark"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeCanonical :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeCanonical =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "canonical"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeChapter :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeChapter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "chapter"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeCite_as :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeCite_as =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cite-as"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeCollection :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeCollection =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeContents :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeContents =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "contents"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeConvertedfrom :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeConvertedfrom =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "convertedfrom"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeCopyright :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeCopyright =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "copyright"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeCreate_form :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeCreate_form =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "create-form"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeCurrent :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeCurrent =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "current"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeDescribedby :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeDescribedby =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "describedby"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeDescribes :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeDescribes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "describes"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeDisclosure :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeDisclosure =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disclosure"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeDns_prefetch :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeDns_prefetch =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dns-prefetch"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeDuplicate :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeDuplicate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duplicate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeEdit :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeEdit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeEdit_form :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeEdit_form =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edit-form"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeEdit_media :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeEdit_media =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edit-media"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeEnclosure :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeEnclosure =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enclosure"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeExternal :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeExternal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "external"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeFirst :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeFirst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "first"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeGlossary :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeGlossary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "glossary"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeHelp :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeHelp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "help"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeHosts :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeHosts =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hosts"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeHub :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeHub =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hub"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIcon :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIcon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "icon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIndex :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIndex =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "index"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalafter :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalafter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalafter"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalbefore :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalbefore =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalbefore"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalcontains :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalcontains =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalcontains"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervaldisjoint :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervaldisjoint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervaldisjoint"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalduring :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalduring =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalduring"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalequals :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalequals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalequals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalfinishedby :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalfinishedby =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalfinishedby"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalfinishes :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalfinishes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalfinishes"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalin :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalin"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalmeets :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalmeets =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalmeets"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalmetby :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalmetby =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalmetby"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervaloverlappedby :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervaloverlappedby =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervaloverlappedby"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervaloverlaps :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervaloverlaps =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervaloverlaps"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalstartedby :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalstartedby =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalstartedby"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeIntervalstarts :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeIntervalstarts =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intervalstarts"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeItem :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeItem =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "item"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeLast :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeLast =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "last"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeLatest_version :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeLatest_version =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "latest-version"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeLicense :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeLicense =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "license"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeLinkset :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeLinkset =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "linkset"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeLrdd :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeLrdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lrdd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeManifest :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeManifest =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "manifest"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeMask_icon :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeMask_icon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mask-icon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeMedia_feed :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeMedia_feed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "media-feed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeMemento :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeMemento =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "memento"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeMicropub :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeMicropub =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "micropub"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeModulepreload :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeModulepreload =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulepreload"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeMonitor :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeMonitor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "monitor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeMonitor_group :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeMonitor_group =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "monitor-group"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeNext :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeNext =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "next"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeNext_archive :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeNext_archive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "next-archive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeNofollow :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeNofollow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nofollow"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeNoopener :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeNoopener =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noopener"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeNoreferrer :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeNoreferrer =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noreferrer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeOpener :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeOpener =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "opener"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeOpenid2Local_id :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeOpenid2Local_id =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "openid2.local_id"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeOpenid2Provider :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeOpenid2Provider =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "openid2.provider"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeOriginal :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeOriginal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "original"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeP3pv1 :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeP3pv1 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "p3pv1"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePayment :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePayment =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "payment"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePingback :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePingback =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pingback"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePreconnect :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePreconnect =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preconnect"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePredecessor_version :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePredecessor_version =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predecessor-version"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePrefetch :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePrefetch =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prefetch"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePreload :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePreload =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preload"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePrerender :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePrerender =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prerender"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePrev :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePrev =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prev"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePrev_archive :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePrev_archive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "prev-archive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePreview :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePreview =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preview"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePrevious :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePrevious =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "previous"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePrivacy_policy :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePrivacy_policy =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "privacy-policy"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeProfile :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeProfile =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "profile"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypePublication :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypePublication =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "publication"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeRelated :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeRelated =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "related"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeReplies :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeReplies =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "replies"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeRestconf :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeRestconf =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "restconf"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeRuleinput :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeRuleinput =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ruleinput"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSearch :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSearch =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "search"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSection :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSection =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "section"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSelf :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSelf =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "self"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeService :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeService =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "service"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeService_desc :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeService_desc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "service-desc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeService_doc :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeService_doc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "service-doc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeService_meta :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeService_meta =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "service-meta"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSiptrunkingcapability :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSiptrunkingcapability =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "siptrunkingcapability"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSponsored :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSponsored =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sponsored"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeStart :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeStart =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "start"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeStatus :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeStatus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "status"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeStylesheet :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeStylesheet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stylesheet"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSubsection :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSubsection =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subsection"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSuccessor_version :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSuccessor_version =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "successor-version"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeSunset :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeSunset =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sunset"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeTag :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeTag =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tag"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeTerms_of_service :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeTerms_of_service =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "terms-of-service"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeTimegate :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeTimegate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timegate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeTimemap :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeTimemap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timemap"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeType :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeUgc :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeUgc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ugc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeUp :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeUp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "up"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeVersion_history :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeVersion_history =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "version-history"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeVia :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeVia =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "via"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeWebmention :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeWebmention =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "webmention"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeWorking_copy :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeWorking_copy =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "working-copy"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-linkRelationTypeWorking_copy_of :: Phantoms.TTerm Linkrelations.LinkRelationType
-linkRelationTypeWorking_copy_of =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.iana.linkrelations.LinkRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "working-copy-of"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Java/Environment.hs b/src/main/haskell/Hydra/Dsl/Java/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Java/Environment.hs
+++ /dev/null
@@ -1,1500 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.java.environment
-
-module Hydra.Dsl.Java.Environment where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Java.Environment as Environment
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Phantoms as Phantoms
-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
-
-aliases :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm (M.Map Packaging.Namespace Syntax.PackageName) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (M.Map Core.Name Core.Name) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (M.Map Core.Name Core.Name) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliases currentNamespace packages branchVars recursiveVars inScopeTypeParams polymorphicLocals inScopeJavaVars varRenames lambdaVars typeVarSubst trustedTypeVars methodCodomain thunkedVars =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm currentNamespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Phantoms.unTTerm packages)},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Phantoms.unTTerm branchVars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Phantoms.unTTerm recursiveVars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm inScopeTypeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Phantoms.unTTerm polymorphicLocals)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Phantoms.unTTerm inScopeJavaVars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Phantoms.unTTerm varRenames)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Phantoms.unTTerm lambdaVars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Phantoms.unTTerm typeVarSubst)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Phantoms.unTTerm trustedTypeVars)},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Phantoms.unTTerm methodCodomain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Phantoms.unTTerm thunkedVars)}]}))
-
-aliasesBranchVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesBranchVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "branchVars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesCurrentNamespace :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm Packaging.Namespace
-aliasesCurrentNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "currentNamespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesInScopeJavaVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesInScopeJavaVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "inScopeJavaVars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesInScopeTypeParams :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesInScopeTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "inScopeTypeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesLambdaVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesLambdaVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "lambdaVars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesMethodCodomain :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (Maybe Core.Type)
-aliasesMethodCodomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "methodCodomain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesPackages :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (M.Map Packaging.Namespace Syntax.PackageName)
-aliasesPackages x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "packages")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesPolymorphicLocals :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesPolymorphicLocals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "polymorphicLocals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesRecursiveVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesRecursiveVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "recursiveVars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesThunkedVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesThunkedVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "thunkedVars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesTrustedTypeVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name)
-aliasesTrustedTypeVars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "trustedTypeVars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesTypeVarSubst :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (M.Map Core.Name Core.Name)
-aliasesTypeVarSubst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "typeVarSubst")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesVarRenames :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (M.Map Core.Name Core.Name)
-aliasesVarRenames x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-        Core.projectionField = (Core.Name "varRenames")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aliasesWithBranchVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithBranchVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithCurrentNamespace :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Environment.Aliases
-aliasesWithCurrentNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithInScopeJavaVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithInScopeJavaVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithInScopeTypeParams :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithInScopeTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithLambdaVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithLambdaVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithMethodCodomain :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm Environment.Aliases
-aliasesWithMethodCodomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithPackages :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (M.Map Packaging.Namespace Syntax.PackageName) -> Phantoms.TTerm Environment.Aliases
-aliasesWithPackages original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithPolymorphicLocals :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithPolymorphicLocals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithRecursiveVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithRecursiveVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithThunkedVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithThunkedVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-aliasesWithTrustedTypeVars :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithTrustedTypeVars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithTypeVarSubst :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (M.Map Core.Name Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithTypeVarSubst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "varRenames")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aliasesWithVarRenames :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm (M.Map Core.Name Core.Name) -> Phantoms.TTerm Environment.Aliases
-aliasesWithVarRenames original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.Aliases"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "currentNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "currentNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "packages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "packages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "branchVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "branchVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "recursiveVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "recursiveVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeTypeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeTypeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "polymorphicLocals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "polymorphicLocals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inScopeJavaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "inScopeJavaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varRenames"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lambdaVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "lambdaVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVarSubst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "typeVarSubst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trustedTypeVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "trustedTypeVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "methodCodomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "methodCodomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thunkedVars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.Aliases"),
-              Core.projectionField = (Core.Name "thunkedVars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-javaEnvironment :: Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Environment.JavaEnvironment
-javaEnvironment aliases graph =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm aliases)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)}]}))
-
-javaEnvironmentAliases :: Phantoms.TTerm Environment.JavaEnvironment -> Phantoms.TTerm Environment.Aliases
-javaEnvironmentAliases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-        Core.projectionField = (Core.Name "aliases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-javaEnvironmentGraph :: Phantoms.TTerm Environment.JavaEnvironment -> Phantoms.TTerm Graph.Graph
-javaEnvironmentGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-javaEnvironmentWithAliases :: Phantoms.TTerm Environment.JavaEnvironment -> Phantoms.TTerm Environment.Aliases -> Phantoms.TTerm Environment.JavaEnvironment
-javaEnvironmentWithAliases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-javaEnvironmentWithGraph :: Phantoms.TTerm Environment.JavaEnvironment -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Environment.JavaEnvironment
-javaEnvironmentWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.environment.JavaEnvironment"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-javaFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Environment.JavaFeatures
-javaFeatures supportsDiamondOperator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.JavaFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDiamondOperator"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsDiamondOperator)}]}))
-
-javaFeaturesSupportsDiamondOperator :: Phantoms.TTerm Environment.JavaFeatures -> Phantoms.TTerm Bool
-javaFeaturesSupportsDiamondOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.environment.JavaFeatures"),
-        Core.projectionField = (Core.Name "supportsDiamondOperator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-javaFeaturesWithSupportsDiamondOperator :: Phantoms.TTerm Environment.JavaFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.JavaFeatures
-javaFeaturesWithSupportsDiamondOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.environment.JavaFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDiamondOperator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-javaSymbolClassConstant :: Phantoms.TTerm Environment.JavaSymbolClass
-javaSymbolClassConstant =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.environment.JavaSymbolClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-javaSymbolClassHoistedLambda :: Phantoms.TTerm Int -> Phantoms.TTerm Environment.JavaSymbolClass
-javaSymbolClassHoistedLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.environment.JavaSymbolClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hoistedLambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-javaSymbolClassLocalVariable :: Phantoms.TTerm Environment.JavaSymbolClass
-javaSymbolClassLocalVariable =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.environment.JavaSymbolClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localVariable"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-javaSymbolClassNullaryFunction :: Phantoms.TTerm Environment.JavaSymbolClass
-javaSymbolClassNullaryFunction =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.environment.JavaSymbolClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullaryFunction"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-javaSymbolClassUnaryFunction :: Phantoms.TTerm Environment.JavaSymbolClass
-javaSymbolClassUnaryFunction =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.environment.JavaSymbolClass"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unaryFunction"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Java/Helpers.hs b/src/main/haskell/Hydra/Dsl/Java/Helpers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Java/Helpers.hs
+++ /dev/null
@@ -1,433 +0,0 @@
--- | Convenience layer over the generated Java syntax DSL.
--- Re-exports all generated DSL functions and adds custom helpers
--- for common Java AST construction patterns.
-
-module Hydra.Dsl.Java.Helpers (
-  module Hydra.Dsl.Java.Helpers,
-  module Hydra.Dsl.Java.Syntax,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Phantoms as Phantoms
-import Hydra.Dsl.Java.Syntax hiding (
-  -- Hide functions whose types have changed since the hand-written DSL was created.
-  -- The hand-written versions are kept below for backward compatibility.
-  arrayInitializer,
-  classInstanceCreationExpression,
-  lambdaParametersTuple,
-  variableDeclaratorId)
-import qualified Hydra.Java.Syntax as Java
-
-import Prelude hiding (map)
-
-
--- Functions with signatures that differ from the generated versions.
--- These use the original types for backward compatibility with existing call sites.
-
-arrayInitializer :: TTerm [Java.VariableInitializer] -> TTerm Java.ArrayInitializer
-arrayInitializer = wrap Java._ArrayInitializer
-
-classInstanceCreationExpression :: TTerm (Maybe Java.Expression) -> TTerm Java.UnqualifiedClassInstanceCreationExpression -> TTerm Java.ClassInstanceCreationExpression
-classInstanceCreationExpression qual unqual = record Java._ClassInstanceCreationExpression [
-  Java._ClassInstanceCreationExpression_qualifier>>: qual,
-  Java._ClassInstanceCreationExpression_expression>>: unqual]
-
-lambdaParametersTuple :: TTerm [Java.FormalParameter] -> TTerm Java.LambdaParameters
-lambdaParametersTuple = inject Java._LambdaParameters Java._LambdaParameters_tuple
-
-variableDeclaratorId :: TTerm Java.Identifier -> TTerm (Maybe Java.Dims) -> TTerm Java.VariableDeclaratorId
-variableDeclaratorId ident dims_ = record Java._VariableDeclaratorId [
-  Java._VariableDeclaratorId_identifier>>: ident,
-  Java._VariableDeclaratorId_dims>>: dims_]
-
-
--- Custom helpers: expression type conversions
-
-literalToPrimary :: TTerm Java.Literal -> TTerm Java.Primary
-literalToPrimary lit = primaryNoNewArray (primaryLiteral lit)
-
-literalToExpression :: TTerm Java.Literal -> TTerm Java.Expression
-literalToExpression lit = primaryToExpression (literalToPrimary lit)
-
-literalToRelationalExpression :: TTerm Java.Literal -> TTerm Java.RelationalExpression
-literalToRelationalExpression lit =
-  relationalExpressionSimple
-    (shiftExpressionUnary
-      (additiveExpressionUnary
-        (multiplicativeExpressionUnary
-          (unaryExpressionOther
-            (unaryExpressionNotPlusMinusPostfix
-              (postfixExpressionPrimary (literalToPrimary lit)))))))
-
-literalToMultiplicativeExpression :: TTerm Java.Literal -> TTerm Java.MultiplicativeExpression
-literalToMultiplicativeExpression lit =
-  multiplicativeExpressionUnary
-    (unaryExpressionOther
-      (unaryExpressionNotPlusMinusPostfix
-        (postfixExpressionPrimary (literalToPrimary lit))))
-
-primaryToExpression :: TTerm Java.Primary -> TTerm Java.Expression
-primaryToExpression p = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [
-        conditionalAndExpression (list [
-          inclusiveOrExpression (list [
-            exclusiveOrExpression (list [
-              andExpression (list [
-                equalityExpressionUnary
-                  (relationalExpressionSimple
-                    (shiftExpressionUnary
-                      (additiveExpressionUnary
-                        (multiplicativeExpressionUnary
-                          (unaryExpressionOther
-                            (unaryExpressionNotPlusMinusPostfix
-                              (postfixExpressionPrimary p)))))))])])])])]))))
-
-postfixToExpression :: TTerm Java.PostfixExpression -> TTerm Java.Expression
-postfixToExpression pe = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [
-        conditionalAndExpression (list [
-          inclusiveOrExpression (list [
-            exclusiveOrExpression (list [
-              andExpression (list [
-                equalityExpressionUnary
-                  (relationalExpressionSimple
-                    (shiftExpressionUnary
-                      (additiveExpressionUnary
-                        (multiplicativeExpressionUnary
-                          (unaryExpressionOther
-                            (unaryExpressionNotPlusMinusPostfix pe))))))])])])])]))))
-
-postfixToInclusiveOr :: TTerm Java.PostfixExpression -> TTerm Java.InclusiveOrExpression
-postfixToInclusiveOr pe = inclusiveOrExpression (list [
-  exclusiveOrExpression (list [
-    andExpression (list [
-      equalityExpressionUnary
-        (relationalExpressionSimple
-          (shiftExpressionUnary
-            (additiveExpressionUnary
-              (multiplicativeExpressionUnary
-                (unaryExpressionOther
-                  (unaryExpressionNotPlusMinusPostfix pe))))))])])])
-
-postfixToRelationalExpression :: TTerm Java.PostfixExpression -> TTerm Java.RelationalExpression
-postfixToRelationalExpression pe =
-  relationalExpressionSimple
-    (shiftExpressionUnary
-      (additiveExpressionUnary
-        (multiplicativeExpressionUnary
-          (unaryExpressionOther
-            (unaryExpressionNotPlusMinusPostfix pe)))))
-
-unaryToExpression :: TTerm Java.UnaryExpression -> TTerm Java.Expression
-unaryToExpression ue = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [
-        conditionalAndExpression (list [
-          inclusiveOrExpression (list [
-            exclusiveOrExpression (list [
-              andExpression (list [
-                equalityExpressionUnary
-                  (relationalExpressionSimple
-                    (shiftExpressionUnary
-                      (additiveExpressionUnary
-                        (multiplicativeExpressionUnary ue))))])])])])]))))
-
-additiveToExpression :: TTerm Java.AdditiveExpression -> TTerm Java.Expression
-additiveToExpression ae = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [
-        conditionalAndExpression (list [
-          inclusiveOrExpression (list [
-            exclusiveOrExpression (list [
-              andExpression (list [
-                equalityExpressionUnary
-                  (relationalExpressionSimple
-                    (shiftExpressionUnary ae))])])])])]))))
-
-equalityToExpression :: TTerm Java.EqualityExpression -> TTerm Java.Expression
-equalityToExpression ee = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [
-        conditionalAndExpression (list [
-          equalityToInclusiveOr ee])]))))
-
-equalityToInclusiveOr :: TTerm Java.EqualityExpression -> TTerm Java.InclusiveOrExpression
-equalityToInclusiveOr ee = inclusiveOrExpression (list [
-  exclusiveOrExpression (list [
-    andExpression (list [ee])])])
-
-conditionalAndToExpression :: TTerm Java.ConditionalAndExpression -> TTerm Java.Expression
-conditionalAndToExpression cae = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [cae]))))
-
-castExpressionToExpression :: TTerm Java.CastExpression -> TTerm Java.Expression
-castExpressionToExpression ce = expressionAssignment
-  (assignmentExpressionConditional
-    (conditionalExpressionSimple
-      (conditionalOrExpression (list [
-        conditionalAndExpression (list [
-          inclusiveOrExpression (list [
-            exclusiveOrExpression (list [
-              andExpression (list [
-                equalityExpressionUnary
-                  (relationalExpressionSimple
-                    (shiftExpressionUnary
-                      (additiveExpressionUnary
-                        (multiplicativeExpressionUnary
-                          (unaryExpressionOther
-                            (unaryExpressionNotPlusMinusCast ce))))))])])])])]))))
-
-expressionNameToExpression :: TTerm Java.ExpressionName -> TTerm Java.Expression
-expressionNameToExpression en = postfixToExpression (postfixExpressionName en)
-
-identifierToExpression :: TTerm Java.Identifier -> TTerm Java.Expression
-identifierToExpression id_ = expressionNameToExpression (expressionName nothing id_)
-
-identifierToRelationalExpression :: TTerm Java.Identifier -> TTerm Java.RelationalExpression
-identifierToRelationalExpression id_ =
-  postfixToRelationalExpression (postfixExpressionName (expressionName nothing id_))
-
-identifierToUnary :: TTerm Java.Identifier -> TTerm Java.UnaryExpression
-identifierToUnary id_ = unaryExpressionOther
-  (unaryExpressionNotPlusMinusPostfix
-    (postfixExpressionName (expressionName nothing id_)))
-
-fieldAccessToExpression :: TTerm Java.FieldAccess -> TTerm Java.Expression
-fieldAccessToExpression fa = primaryToExpression (primaryNoNewArray (primaryFieldAccess fa))
-
-methodInvocationToExpression :: TTerm Java.MethodInvocation -> TTerm Java.Expression
-methodInvocationToExpression mi = primaryToExpression (primaryNoNewArray (primaryMethodInvocation mi))
-
-methodInvocationToPrimary :: TTerm Java.MethodInvocation -> TTerm Java.Primary
-methodInvocationToPrimary mi = primaryNoNewArray (primaryMethodInvocation mi)
-
-methodInvocationToPostfix :: TTerm Java.MethodInvocation -> TTerm Java.PostfixExpression
-methodInvocationToPostfix mi = postfixExpressionPrimary (primaryNoNewArray (primaryMethodInvocation mi))
-
-methodInvocationToStatement :: TTerm Java.MethodInvocation -> TTerm Java.Statement
-methodInvocationToStatement mi = statementWithoutTrailing
-  (stmtExpression (expressionStatement (stmtExprMethodInvocation mi)))
-
-expressionToPrimary :: TTerm Java.Expression -> TTerm Java.Primary
-expressionToPrimary e = primaryNoNewArray (primaryParens e)
-
-expressionToUnary :: TTerm Java.Expression -> TTerm Java.UnaryExpression
-expressionToUnary e = unaryExpressionOther
-  (unaryExpressionNotPlusMinusPostfix
-    (postfixExpressionPrimary (expressionToPrimary e)))
-
-primaryToUnary :: TTerm Java.UnaryExpression -> TTerm Java.Primary
-primaryToUnary ue = primaryNoNewArray (primaryParens (unaryToExpression ue))
-
-relationalToUnary :: TTerm Java.RelationalExpression -> TTerm Java.UnaryExpression
-relationalToUnary re = unaryExpressionOther
-  (unaryExpressionNotPlusMinusPostfix
-    (postfixExpressionPrimary
-      (primaryNoNewArray
-        (primaryParens
-          (expressionAssignment
-            (assignmentExpressionConditional
-              (conditionalExpressionSimple
-                (conditionalOrExpression (list [
-                  conditionalAndExpression (list [
-                    inclusiveOrExpression (list [
-                      exclusiveOrExpression (list [
-                        andExpression (list [
-                          equalityExpressionUnary re])])])])])))))))))
-
-
--- Custom helpers: binary expression constructors
-
-additiveExpressionBinary :: TTerm Java.AdditiveExpression -> TTerm Java.MultiplicativeExpression -> TTerm Java.AdditiveExpression_Binary
-additiveExpressionBinary lhs rhs = record Java._AdditiveExpression_Binary [
-  Java._AdditiveExpression_Binary_lhs>>: lhs,
-  Java._AdditiveExpression_Binary_rhs>>: rhs]
-
-equalityExpressionBinary :: TTerm Java.EqualityExpression -> TTerm Java.RelationalExpression -> TTerm Java.EqualityExpression_Binary
-equalityExpressionBinary lhs rhs = record Java._EqualityExpression_Binary [
-  Java._EqualityExpression_Binary_lhs>>: lhs,
-  Java._EqualityExpression_Binary_rhs>>: rhs]
-
-multiplicativeExpressionBinary :: TTerm Java.MultiplicativeExpression -> TTerm Java.UnaryExpression -> TTerm Java.MultiplicativeExpression_Binary
-multiplicativeExpressionBinary lhs rhs = record Java._MultiplicativeExpression_Binary [
-  Java._MultiplicativeExpression_Binary_lhs>>: lhs,
-  Java._MultiplicativeExpression_Binary_rhs>>: rhs]
-
-
--- Custom helpers: primary constructors
-
-primaryLiteral :: TTerm Java.Literal -> TTerm Java.PrimaryNoNewArrayExpression
-primaryLiteral = inject Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_literal
-
-primaryParens :: TTerm Java.Expression -> TTerm Java.PrimaryNoNewArrayExpression
-primaryParens = inject Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_parens
-
-primaryFieldAccess :: TTerm Java.FieldAccess -> TTerm Java.PrimaryNoNewArrayExpression
-primaryFieldAccess = inject Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_fieldAccess
-
-primaryMethodInvocation :: TTerm Java.MethodInvocation -> TTerm Java.PrimaryNoNewArrayExpression
-primaryMethodInvocation = inject Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_methodInvocation
-
-primaryThis :: TTerm Java.PrimaryNoNewArrayExpression
-primaryThis = injectUnit Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_this
-
-primaryClassInstance :: TTerm Java.ClassInstanceCreationExpression -> TTerm Java.PrimaryNoNewArrayExpression
-primaryClassInstance = inject Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_classInstance
-
-primaryArrayAccess :: TTerm Java.ArrayAccess -> TTerm Java.PrimaryNoNewArrayExpression
-primaryArrayAccess = inject Java._PrimaryNoNewArrayExpression Java._PrimaryNoNewArrayExpression_arrayAccess
-
-
--- Custom helpers: statement constructors
-
-stmtExpression :: TTerm Java.ExpressionStatement -> TTerm Java.StatementWithoutTrailingSubstatement
-stmtExpression = inject Java._StatementWithoutTrailingSubstatement Java._StatementWithoutTrailingSubstatement_expression
-
-stmtReturn :: TTerm Java.ReturnStatement -> TTerm Java.StatementWithoutTrailingSubstatement
-stmtReturn = inject Java._StatementWithoutTrailingSubstatement Java._StatementWithoutTrailingSubstatement_return
-
-stmtThrow :: TTerm Java.ThrowStatement -> TTerm Java.StatementWithoutTrailingSubstatement
-stmtThrow = inject Java._StatementWithoutTrailingSubstatement Java._StatementWithoutTrailingSubstatement_throw
-
-stmtEmpty :: TTerm Java.StatementWithoutTrailingSubstatement
-stmtEmpty = injectUnit Java._StatementWithoutTrailingSubstatement Java._StatementWithoutTrailingSubstatement_empty
-
-stmtBlock :: TTerm Java.Block -> TTerm Java.StatementWithoutTrailingSubstatement
-stmtBlock = inject Java._StatementWithoutTrailingSubstatement Java._StatementWithoutTrailingSubstatement_block
-
-stmtExprAssignment :: TTerm Java.Assignment -> TTerm Java.StatementExpression
-stmtExprAssignment = inject Java._StatementExpression Java._StatementExpression_assignment
-
-stmtExprMethodInvocation :: TTerm Java.MethodInvocation -> TTerm Java.StatementExpression
-stmtExprMethodInvocation = inject Java._StatementExpression Java._StatementExpression_methodInvocation
-
-stmtExprClassInstance :: TTerm Java.ClassInstanceCreationExpression -> TTerm Java.StatementExpression
-stmtExprClassInstance = inject Java._StatementExpression Java._StatementExpression_classInstanceCreation
-
-
--- Custom helpers: other constructors
-
-arrayCreationExpressionPrimitiveArray_ :: TTerm Java.PrimitiveTypeWithAnnotations -> TTerm Java.Dims -> TTerm Java.ArrayInitializer -> TTerm Java.ArrayCreationExpression_PrimitiveArray
-arrayCreationExpressionPrimitiveArray_ pt dims_ arr = record Java._ArrayCreationExpression_PrimitiveArray [
-  Java._ArrayCreationExpression_PrimitiveArray_type>>: pt,
-  Java._ArrayCreationExpression_PrimitiveArray_dims>>: dims_,
-  Java._ArrayCreationExpression_PrimitiveArray_array>>: arr]
-
-arrayTypeVariantPrimitive :: TTerm Java.PrimitiveTypeWithAnnotations -> TTerm Java.ArrayType_Variant
-arrayTypeVariantPrimitive = inject Java._ArrayType_Variant Java._ArrayType_Variant_primitive
-
-castExpressionNotPlusMinus_ :: TTerm Java.CastExpression_RefAndBounds -> TTerm Java.UnaryExpressionNotPlusMinus -> TTerm Java.CastExpression_NotPlusMinus
-castExpressionNotPlusMinus_ rb expr = record Java._CastExpression_NotPlusMinus [
-  Java._CastExpression_NotPlusMinus_refAndBounds>>: rb,
-  Java._CastExpression_NotPlusMinus_expression>>: expr]
-
-castExpressionPrimitive_ :: TTerm Java.PrimitiveTypeWithAnnotations -> TTerm Java.UnaryExpression -> TTerm Java.CastExpression_Primitive
-castExpressionPrimitive_ pt expr = record Java._CastExpression_Primitive [
-  Java._CastExpression_Primitive_type>>: pt,
-  Java._CastExpression_Primitive_expression>>: expr]
-
-castExpressionRefAndBounds :: TTerm Java.ReferenceType -> TTerm [Java.AdditionalBound] -> TTerm Java.CastExpression_RefAndBounds
-castExpressionRefAndBounds rt bounds = record Java._CastExpression_RefAndBounds [
-  Java._CastExpression_RefAndBounds_type>>: rt,
-  Java._CastExpression_RefAndBounds_bounds>>: bounds]
-
-fieldAccessQualifierPrimary :: TTerm Java.Primary -> TTerm Java.FieldAccess_Qualifier
-fieldAccessQualifierPrimary = inject Java._FieldAccess_Qualifier Java._FieldAccess_Qualifier_primary
-
-relationalExpressionInstanceOf :: TTerm Java.RelationalExpression_InstanceOf -> TTerm Java.RelationalExpression
-relationalExpressionInstanceOf = inject Java._RelationalExpression Java._RelationalExpression_instanceof
-
-relationalExpressionInstanceOf_ :: TTerm Java.RelationalExpression -> TTerm Java.ReferenceType -> TTerm Java.RelationalExpression_InstanceOf
-relationalExpressionInstanceOf_ expr rt = record Java._RelationalExpression_InstanceOf [
-  Java._RelationalExpression_InstanceOf_lhs>>: expr,
-  Java._RelationalExpression_InstanceOf_rhs>>: rt]
-
-methodInvocation_ :: TTerm Java.MethodInvocation_Header -> TTerm [Java.Expression] -> TTerm Java.MethodInvocation
-methodInvocation_ header args = record Java._MethodInvocation [
-  Java._MethodInvocation_header>>: header,
-  Java._MethodInvocation_arguments>>: args]
-
-methodInvocationHeaderSimple :: TTerm Java.MethodName -> TTerm Java.MethodInvocation_Header
-methodInvocationHeaderSimple = inject Java._MethodInvocation_Header Java._MethodInvocation_Header_simple
-
-methodInvocationHeaderComplex :: TTerm Java.MethodInvocation_Complex -> TTerm Java.MethodInvocation_Header
-methodInvocationHeaderComplex = inject Java._MethodInvocation_Header Java._MethodInvocation_Header_complex
-
-methodInvocationComplex :: TTerm Java.MethodInvocation_Variant -> TTerm [Java.TypeArgument] -> TTerm Java.Identifier -> TTerm Java.MethodInvocation_Complex
-methodInvocationComplex variant targs ident = record Java._MethodInvocation_Complex [
-  Java._MethodInvocation_Complex_variant>>: variant,
-  Java._MethodInvocation_Complex_typeArguments>>: targs,
-  Java._MethodInvocation_Complex_identifier>>: ident]
-
-methodInvocationVariantExpression :: TTerm Java.ExpressionName -> TTerm Java.MethodInvocation_Variant
-methodInvocationVariantExpression = inject Java._MethodInvocation_Variant Java._MethodInvocation_Variant_expression
-
-methodInvocationVariantPrimary :: TTerm Java.Primary -> TTerm Java.MethodInvocation_Variant
-methodInvocationVariantPrimary = inject Java._MethodInvocation_Variant Java._MethodInvocation_Variant_primary
-
-methodInvocationVariantType :: TTerm Java.TypeName -> TTerm Java.MethodInvocation_Variant
-methodInvocationVariantType = inject Java._MethodInvocation_Variant Java._MethodInvocation_Variant_type
-
-methodDeclaration_ :: TTerm [Java.Annotation] -> TTerm [Java.MethodModifier] -> TTerm Java.MethodHeader -> TTerm Java.MethodBody -> TTerm Java.MethodDeclaration
-methodDeclaration_ anns mods header body = record Java._MethodDeclaration [
-  Java._MethodDeclaration_annotations>>: anns,
-  Java._MethodDeclaration_modifiers>>: mods,
-  Java._MethodDeclaration_header>>: header,
-  Java._MethodDeclaration_body>>: body]
-
-interfaceMethodDeclaration_ :: TTerm [Java.InterfaceMethodModifier] -> TTerm Java.MethodHeader -> TTerm Java.MethodBody -> TTerm Java.InterfaceMethodDeclaration
-interfaceMethodDeclaration_ mods header body = record Java._InterfaceMethodDeclaration [
-  Java._InterfaceMethodDeclaration_modifiers>>: mods,
-  Java._InterfaceMethodDeclaration_header>>: header,
-  Java._InterfaceMethodDeclaration_body>>: body]
-
-formalParameterSimple_ :: TTerm [Java.VariableModifier] -> TTerm Java.UnannType -> TTerm Java.VariableDeclaratorId -> TTerm Java.FormalParameter_Simple
-formalParameterSimple_ mods ut vid = record Java._FormalParameter_Simple [
-  Java._FormalParameter_Simple_modifiers>>: mods,
-  Java._FormalParameter_Simple_type>>: ut,
-  Java._FormalParameter_Simple_id>>: vid]
-
-classBodyDeclClassMember :: TTerm Java.ClassMemberDeclaration -> TTerm Java.ClassBodyDeclaration
-classBodyDeclClassMember = inject Java._ClassBodyDeclaration Java._ClassBodyDeclaration_classMember
-
-classBodyDeclConstructor :: TTerm Java.ConstructorDeclaration -> TTerm Java.ClassBodyDeclaration
-classBodyDeclConstructor = inject Java._ClassBodyDeclaration Java._ClassBodyDeclaration_constructorDeclaration
-
-classMemberDeclField :: TTerm Java.FieldDeclaration -> TTerm Java.ClassMemberDeclaration
-classMemberDeclField = inject Java._ClassMemberDeclaration Java._ClassMemberDeclaration_field
-
-classMemberDeclMethod :: TTerm Java.MethodDeclaration -> TTerm Java.ClassMemberDeclaration
-classMemberDeclMethod = inject Java._ClassMemberDeclaration Java._ClassMemberDeclaration_method
-
-classMemberDeclClass :: TTerm Java.ClassDeclaration -> TTerm Java.ClassMemberDeclaration
-classMemberDeclClass = inject Java._ClassMemberDeclaration Java._ClassMemberDeclaration_class
-
-classMemberDeclInterface :: TTerm Java.InterfaceDeclaration -> TTerm Java.ClassMemberDeclaration
-classMemberDeclInterface = inject Java._ClassMemberDeclaration Java._ClassMemberDeclaration_interface
-
-interfaceMemberDeclConstant :: TTerm Java.ConstantDeclaration -> TTerm Java.InterfaceMemberDeclaration
-interfaceMemberDeclConstant = inject Java._InterfaceMemberDeclaration Java._InterfaceMemberDeclaration_constant
-
-interfaceMemberDeclInterfaceMethod :: TTerm Java.InterfaceMethodDeclaration -> TTerm Java.InterfaceMemberDeclaration
-interfaceMemberDeclInterfaceMethod = inject Java._InterfaceMemberDeclaration Java._InterfaceMemberDeclaration_interfaceMethod
-
-interfaceMemberDeclClass :: TTerm Java.ClassDeclaration -> TTerm Java.InterfaceMemberDeclaration
-interfaceMemberDeclClass = inject Java._InterfaceMemberDeclaration Java._InterfaceMemberDeclaration_class
-
-elementValueConditional :: TTerm Java.ConditionalExpression -> TTerm Java.ElementValue
-elementValueConditional = inject Java._ElementValue Java._ElementValue_conditionalExpression
-
-elementValueArray :: TTerm Java.ElementValueArrayInitializer -> TTerm Java.ElementValue
-elementValueArray = inject Java._ElementValue Java._ElementValue_elementValueArrayInitializer
-
-variableInitializerArray :: TTerm Java.ArrayInitializer -> TTerm Java.VariableInitializer
-variableInitializerArray = inject Java._VariableInitializer Java._VariableInitializer_arrayInitializer
diff --git a/src/main/haskell/Hydra/Dsl/Java/Syntax.hs b/src/main/haskell/Hydra/Dsl/Java/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Java/Syntax.hs
+++ /dev/null
@@ -1,13121 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.java.syntax
-
-module Hydra.Dsl.Java.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-additionalBound :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.AdditionalBound
-additionalBound x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.AdditionalBound"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-additiveExpressionMinus :: Phantoms.TTerm Syntax.AdditiveExpression_Binary -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionMinus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveExpressionPlus :: Phantoms.TTerm Syntax.AdditiveExpression_Binary -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionPlus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveExpressionUnary :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additiveExpression_Binary :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AdditiveExpression_Binary
-additiveExpression_Binary lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-additiveExpression_BinaryLhs :: Phantoms.TTerm Syntax.AdditiveExpression_Binary -> Phantoms.TTerm Syntax.AdditiveExpression
-additiveExpression_BinaryLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-additiveExpression_BinaryRhs :: Phantoms.TTerm Syntax.AdditiveExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression
-additiveExpression_BinaryRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-additiveExpression_BinaryWithLhs :: Phantoms.TTerm Syntax.AdditiveExpression_Binary -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.AdditiveExpression_Binary
-additiveExpression_BinaryWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-additiveExpression_BinaryWithRhs :: Phantoms.TTerm Syntax.AdditiveExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.AdditiveExpression_Binary
-additiveExpression_BinaryWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AdditiveExpression_Binary"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ambiguousName :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.AmbiguousName
-ambiguousName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.AmbiguousName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-andExpression :: Phantoms.TTerm [Syntax.EqualityExpression] -> Phantoms.TTerm Syntax.AndExpression
-andExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.AndExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-annotatedIdentifier :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AnnotatedIdentifier
-annotatedIdentifier annotations identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-annotatedIdentifierAnnotations :: Phantoms.TTerm Syntax.AnnotatedIdentifier -> Phantoms.TTerm [Syntax.Annotation]
-annotatedIdentifierAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedIdentifierIdentifier :: Phantoms.TTerm Syntax.AnnotatedIdentifier -> Phantoms.TTerm Syntax.Identifier
-annotatedIdentifierIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedIdentifierWithAnnotations :: Phantoms.TTerm Syntax.AnnotatedIdentifier -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.AnnotatedIdentifier
-annotatedIdentifierWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotatedIdentifierWithIdentifier :: Phantoms.TTerm Syntax.AnnotatedIdentifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AnnotatedIdentifier
-annotatedIdentifierWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotatedIdentifier"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationMarker :: Phantoms.TTerm Syntax.MarkerAnnotation -> Phantoms.TTerm Syntax.Annotation
-annotationMarker x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Annotation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "marker"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationNormal :: Phantoms.TTerm Syntax.NormalAnnotation -> Phantoms.TTerm Syntax.Annotation
-annotationNormal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Annotation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationSingleElement :: Phantoms.TTerm Syntax.SingleElementAnnotation -> Phantoms.TTerm Syntax.Annotation
-annotationSingleElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Annotation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singleElement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationTypeBody :: Phantoms.TTerm [[Syntax.AnnotationTypeMemberDeclaration]] -> Phantoms.TTerm Syntax.AnnotationTypeBody
-annotationTypeBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-annotationTypeDeclaration :: Phantoms.TTerm [Syntax.InterfaceModifier] -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.AnnotationTypeBody -> Phantoms.TTerm Syntax.AnnotationTypeDeclaration
-annotationTypeDeclaration modifiers identifier body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-annotationTypeDeclarationBody :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm Syntax.AnnotationTypeBody
-annotationTypeDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeDeclarationIdentifier :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier
-annotationTypeDeclarationIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeDeclarationModifiers :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm [Syntax.InterfaceModifier]
-annotationTypeDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeDeclarationWithBody :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm Syntax.AnnotationTypeBody -> Phantoms.TTerm Syntax.AnnotationTypeDeclaration
-annotationTypeDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationTypeDeclarationWithIdentifier :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.AnnotationTypeDeclaration
-annotationTypeDeclarationWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationTypeDeclarationWithModifiers :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm [Syntax.InterfaceModifier] -> Phantoms.TTerm Syntax.AnnotationTypeDeclaration
-annotationTypeDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationTypeElementDeclaration :: Phantoms.TTerm [Syntax.AnnotationTypeElementModifier] -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm (Maybe Syntax.DefaultValue) -> Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration
-annotationTypeElementDeclaration modifiers type_ identifier dims default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-annotationTypeElementDeclarationDefault :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm (Maybe Syntax.DefaultValue)
-annotationTypeElementDeclarationDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeElementDeclarationDims :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm (Maybe Syntax.Dims)
-annotationTypeElementDeclarationDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeElementDeclarationIdentifier :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm Syntax.Identifier
-annotationTypeElementDeclarationIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeElementDeclarationModifiers :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm [Syntax.AnnotationTypeElementModifier]
-annotationTypeElementDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeElementDeclarationType :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm Syntax.UnannType
-annotationTypeElementDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationTypeElementDeclarationWithDefault :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm (Maybe Syntax.DefaultValue) -> Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration
-annotationTypeElementDeclarationWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationTypeElementDeclarationWithDims :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration
-annotationTypeElementDeclarationWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationTypeElementDeclarationWithIdentifier :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration
-annotationTypeElementDeclarationWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationTypeElementDeclarationWithModifiers :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm [Syntax.AnnotationTypeElementModifier] -> Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration
-annotationTypeElementDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationTypeElementDeclarationWithType :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration
-annotationTypeElementDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationTypeElementModifierAbstract :: Phantoms.TTerm Syntax.AnnotationTypeElementModifier
-annotationTypeElementModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-annotationTypeElementModifierPublic :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.AnnotationTypeElementModifier
-annotationTypeElementModifierPublic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeElementModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationTypeMemberDeclarationAnnotationType :: Phantoms.TTerm Syntax.AnnotationTypeElementDeclaration -> Phantoms.TTerm Syntax.AnnotationTypeMemberDeclaration
-annotationTypeMemberDeclarationAnnotationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationTypeMemberDeclarationClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.AnnotationTypeMemberDeclaration
-annotationTypeMemberDeclarationClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationTypeMemberDeclarationConstant :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.AnnotationTypeMemberDeclaration
-annotationTypeMemberDeclarationConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationTypeMemberDeclarationInterface :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.AnnotationTypeMemberDeclaration
-annotationTypeMemberDeclarationInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AnnotationTypeMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayAccess :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ArrayAccess_Variant -> Phantoms.TTerm Syntax.ArrayAccess
-arrayAccess expression variant =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm variant)}]}))
-
-arrayAccessExpression :: Phantoms.TTerm Syntax.ArrayAccess -> Phantoms.TTerm (Maybe Syntax.Expression)
-arrayAccessExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayAccessVariant :: Phantoms.TTerm Syntax.ArrayAccess -> Phantoms.TTerm Syntax.ArrayAccess_Variant
-arrayAccessVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-        Core.projectionField = (Core.Name "variant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayAccessWithExpression :: Phantoms.TTerm Syntax.ArrayAccess -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ArrayAccess
-arrayAccessWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayAccessWithVariant :: Phantoms.TTerm Syntax.ArrayAccess -> Phantoms.TTerm Syntax.ArrayAccess_Variant -> Phantoms.TTerm Syntax.ArrayAccess
-arrayAccessWithVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayAccess"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayAccess_VariantName :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.ArrayAccess_Variant
-arrayAccess_VariantName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayAccess_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayAccess_VariantPrimary :: Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression -> Phantoms.TTerm Syntax.ArrayAccess_Variant
-arrayAccess_VariantPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayAccess_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpressionClassOrInterface :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionClassOrInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classOrInterface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpressionClassOrInterfaceArray :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionClassOrInterfaceArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classOrInterfaceArray"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpressionPrimitive :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpressionPrimitiveArray :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm Syntax.ArrayCreationExpression
-arrayCreationExpressionPrimitiveArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitiveArray"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayCreationExpression_ClassOrInterface :: Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm [Syntax.DimExpr] -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface
-arrayCreationExpression_ClassOrInterface type_ dimExprs dims =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Phantoms.unTTerm dimExprs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)}]}))
-
-arrayCreationExpression_ClassOrInterfaceArray :: Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm [Syntax.Dims] -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray
-arrayCreationExpression_ClassOrInterfaceArray type_ dims array =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm array)}]}))
-
-arrayCreationExpression_ClassOrInterfaceArrayArray :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm Syntax.ArrayInitializer
-arrayCreationExpression_ClassOrInterfaceArrayArray x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-        Core.projectionField = (Core.Name "array")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_ClassOrInterfaceArrayDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm [Syntax.Dims]
-arrayCreationExpression_ClassOrInterfaceArrayDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_ClassOrInterfaceArrayType :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm Syntax.ClassOrInterfaceType
-arrayCreationExpression_ClassOrInterfaceArrayType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_ClassOrInterfaceArrayWithArray :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray
-arrayCreationExpression_ClassOrInterfaceArrayWithArray original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayCreationExpression_ClassOrInterfaceArrayWithDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm [Syntax.Dims] -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray
-arrayCreationExpression_ClassOrInterfaceArrayWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-              Core.projectionField = (Core.Name "array")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_ClassOrInterfaceArrayWithType :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray -> Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterfaceArray
-arrayCreationExpression_ClassOrInterfaceArrayWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"),
-              Core.projectionField = (Core.Name "array")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_ClassOrInterfaceDimExprs :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm [Syntax.DimExpr]
-arrayCreationExpression_ClassOrInterfaceDimExprs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-        Core.projectionField = (Core.Name "dimExprs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_ClassOrInterfaceDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm (Maybe Syntax.Dims)
-arrayCreationExpression_ClassOrInterfaceDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_ClassOrInterfaceType :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm Syntax.ClassOrInterfaceType
-arrayCreationExpression_ClassOrInterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_ClassOrInterfaceWithDimExprs :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm [Syntax.DimExpr] -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface
-arrayCreationExpression_ClassOrInterfaceWithDimExprs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_ClassOrInterfaceWithDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface
-arrayCreationExpression_ClassOrInterfaceWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-              Core.projectionField = (Core.Name "dimExprs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayCreationExpression_ClassOrInterfaceWithType :: Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface -> Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm Syntax.ArrayCreationExpression_ClassOrInterface
-arrayCreationExpression_ClassOrInterfaceWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-              Core.projectionField = (Core.Name "dimExprs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_Primitive :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm [Syntax.DimExpr] -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive
-arrayCreationExpression_Primitive type_ dimExprs dims =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Phantoms.unTTerm dimExprs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)}]}))
-
-arrayCreationExpression_PrimitiveArray :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm [Syntax.Dims] -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray
-arrayCreationExpression_PrimitiveArray type_ dims array =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm array)}]}))
-
-arrayCreationExpression_PrimitiveArrayArray :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm Syntax.ArrayInitializer
-arrayCreationExpression_PrimitiveArrayArray x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-        Core.projectionField = (Core.Name "array")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_PrimitiveArrayDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm [Syntax.Dims]
-arrayCreationExpression_PrimitiveArrayDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_PrimitiveArrayType :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations
-arrayCreationExpression_PrimitiveArrayType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_PrimitiveArrayWithArray :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray
-arrayCreationExpression_PrimitiveArrayWithArray original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayCreationExpression_PrimitiveArrayWithDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm [Syntax.Dims] -> Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray
-arrayCreationExpression_PrimitiveArrayWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-              Core.projectionField = (Core.Name "array")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_PrimitiveArrayWithType :: Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.ArrayCreationExpression_PrimitiveArray
-arrayCreationExpression_PrimitiveArrayWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"),
-              Core.projectionField = (Core.Name "array")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_PrimitiveDimExprs :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm [Syntax.DimExpr]
-arrayCreationExpression_PrimitiveDimExprs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-        Core.projectionField = (Core.Name "dimExprs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_PrimitiveDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm (Maybe Syntax.Dims)
-arrayCreationExpression_PrimitiveDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_PrimitiveType :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations
-arrayCreationExpression_PrimitiveType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayCreationExpression_PrimitiveWithDimExprs :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm [Syntax.DimExpr] -> Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive
-arrayCreationExpression_PrimitiveWithDimExprs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayCreationExpression_PrimitiveWithDims :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive
-arrayCreationExpression_PrimitiveWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-              Core.projectionField = (Core.Name "dimExprs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayCreationExpression_PrimitiveWithType :: Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.ArrayCreationExpression_Primitive
-arrayCreationExpression_PrimitiveWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dimExprs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-              Core.projectionField = (Core.Name "dimExprs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayInitializer :: Phantoms.TTerm [[Syntax.VariableInitializer]] -> Phantoms.TTerm Syntax.ArrayInitializer
-arrayInitializer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ArrayInitializer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrayType :: Phantoms.TTerm Syntax.Dims -> Phantoms.TTerm Syntax.ArrayType_Variant -> Phantoms.TTerm Syntax.ArrayType
-arrayType dims variant =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm variant)}]}))
-
-arrayTypeDims :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Dims
-arrayTypeDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeVariant :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ArrayType_Variant
-arrayTypeVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "variant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeWithDims :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Dims -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayTypeWithVariant :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ArrayType_Variant -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayType_VariantClassOrInterface :: Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm Syntax.ArrayType_Variant
-arrayType_VariantClassOrInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayType_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classOrInterface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayType_VariantPrimitive :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.ArrayType_Variant
-arrayType_VariantPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayType_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayType_VariantVariable :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm Syntax.ArrayType_Variant
-arrayType_VariantVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ArrayType_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertStatementPair :: Phantoms.TTerm Syntax.AssertStatement_Pair -> Phantoms.TTerm Syntax.AssertStatement
-assertStatementPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssertStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertStatementSingle :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssertStatement
-assertStatementSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssertStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertStatement_Pair :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssertStatement_Pair
-assertStatement_Pair first second =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm second)}]}))
-
-assertStatement_PairFirst :: Phantoms.TTerm Syntax.AssertStatement_Pair -> Phantoms.TTerm Syntax.Expression
-assertStatement_PairFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assertStatement_PairSecond :: Phantoms.TTerm Syntax.AssertStatement_Pair -> Phantoms.TTerm Syntax.Expression
-assertStatement_PairSecond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-        Core.projectionField = (Core.Name "second")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assertStatement_PairWithFirst :: Phantoms.TTerm Syntax.AssertStatement_Pair -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssertStatement_Pair
-assertStatement_PairWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-              Core.projectionField = (Core.Name "second")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assertStatement_PairWithSecond :: Phantoms.TTerm Syntax.AssertStatement_Pair -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssertStatement_Pair
-assertStatement_PairWithSecond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.AssertStatement_Pair"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignment :: Phantoms.TTerm Syntax.LeftHandSide -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Assignment
-assignment lhs op expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-assignmentExpression :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.Expression
-assignmentExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentExpressionAssignment :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentExpressionConditional :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentLhs :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.LeftHandSide
-assignmentLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentOp :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentOperatorAnd :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorDiv :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorDiv =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "div"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorMinus :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorMod :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorMod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mod"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorOr :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorPlus :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorShiftLeft :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorShiftLeft =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shiftLeft"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorShiftRight :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorShiftRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shiftRight"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorShiftRightZeroFill :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorShiftRightZeroFill =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shiftRightZeroFill"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorSimple :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorSimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorTimes :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorTimes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorXor :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentWithExpression :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Assignment
-assignmentWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignmentWithLhs :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.LeftHandSide -> Phantoms.TTerm Syntax.Assignment
-assignmentWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentWithOp :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.Assignment
-assignmentWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Assignment"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-basicForStatement :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.BasicForStatement
-basicForStatement cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-basicForStatementBody :: Phantoms.TTerm Syntax.BasicForStatement -> Phantoms.TTerm Syntax.Statement
-basicForStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-basicForStatementCond :: Phantoms.TTerm Syntax.BasicForStatement -> Phantoms.TTerm Syntax.ForCond
-basicForStatementCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-basicForStatementNoShortIf :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.BasicForStatementNoShortIf
-basicForStatementNoShortIf cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-basicForStatementNoShortIfBody :: Phantoms.TTerm Syntax.BasicForStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-basicForStatementNoShortIfBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-basicForStatementNoShortIfCond :: Phantoms.TTerm Syntax.BasicForStatementNoShortIf -> Phantoms.TTerm Syntax.ForCond
-basicForStatementNoShortIfCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-basicForStatementNoShortIfWithBody :: Phantoms.TTerm Syntax.BasicForStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.BasicForStatementNoShortIf
-basicForStatementNoShortIfWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-basicForStatementNoShortIfWithCond :: Phantoms.TTerm Syntax.BasicForStatementNoShortIf -> Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm Syntax.BasicForStatementNoShortIf
-basicForStatementNoShortIfWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-basicForStatementWithBody :: Phantoms.TTerm Syntax.BasicForStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.BasicForStatement
-basicForStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-basicForStatementWithCond :: Phantoms.TTerm Syntax.BasicForStatement -> Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm Syntax.BasicForStatement
-basicForStatementWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.BasicForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-block :: Phantoms.TTerm [Syntax.BlockStatement] -> Phantoms.TTerm Syntax.Block
-block x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.Block"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-blockStatementClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.BlockStatement
-blockStatementClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.BlockStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-blockStatementLocalVariableDeclaration :: Phantoms.TTerm Syntax.LocalVariableDeclarationStatement -> Phantoms.TTerm Syntax.BlockStatement
-blockStatementLocalVariableDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.BlockStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localVariableDeclaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-blockStatementStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.BlockStatement
-blockStatementStatement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.BlockStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "statement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanArrayArray :: Phantoms.TTerm Syntax.BooleanArray -> Phantoms.TTerm Syntax.BooleanArray
-booleanArrayArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.BooleanArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanArraySimple :: Phantoms.TTerm Syntax.BooleanArray
-booleanArraySimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.BooleanArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-breakStatement :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.BreakStatement
-breakStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.BreakStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-castExpressionLambda :: Phantoms.TTerm Syntax.CastExpression_Lambda -> Phantoms.TTerm Syntax.CastExpression
-castExpressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.CastExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-castExpressionNotPlusMinus :: Phantoms.TTerm Syntax.CastExpression_NotPlusMinus -> Phantoms.TTerm Syntax.CastExpression
-castExpressionNotPlusMinus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.CastExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notPlusMinus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-castExpressionPrimitive :: Phantoms.TTerm Syntax.CastExpression_Primitive -> Phantoms.TTerm Syntax.CastExpression
-castExpressionPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.CastExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-castExpression_Lambda :: Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.CastExpression_Lambda
-castExpression_Lambda refAndBounds expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refAndBounds"),
-          Core.fieldTerm = (Phantoms.unTTerm refAndBounds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-castExpression_LambdaExpression :: Phantoms.TTerm Syntax.CastExpression_Lambda -> Phantoms.TTerm Syntax.LambdaExpression
-castExpression_LambdaExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_LambdaRefAndBounds :: Phantoms.TTerm Syntax.CastExpression_Lambda -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds
-castExpression_LambdaRefAndBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-        Core.projectionField = (Core.Name "refAndBounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_LambdaWithExpression :: Phantoms.TTerm Syntax.CastExpression_Lambda -> Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.CastExpression_Lambda
-castExpression_LambdaWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refAndBounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-              Core.projectionField = (Core.Name "refAndBounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-castExpression_LambdaWithRefAndBounds :: Phantoms.TTerm Syntax.CastExpression_Lambda -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm Syntax.CastExpression_Lambda
-castExpression_LambdaWithRefAndBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refAndBounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Lambda"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-castExpression_NotPlusMinus :: Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.CastExpression_NotPlusMinus
-castExpression_NotPlusMinus refAndBounds expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refAndBounds"),
-          Core.fieldTerm = (Phantoms.unTTerm refAndBounds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-castExpression_NotPlusMinusExpression :: Phantoms.TTerm Syntax.CastExpression_NotPlusMinus -> Phantoms.TTerm Syntax.UnaryExpression
-castExpression_NotPlusMinusExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_NotPlusMinusRefAndBounds :: Phantoms.TTerm Syntax.CastExpression_NotPlusMinus -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds
-castExpression_NotPlusMinusRefAndBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-        Core.projectionField = (Core.Name "refAndBounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_NotPlusMinusWithExpression :: Phantoms.TTerm Syntax.CastExpression_NotPlusMinus -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.CastExpression_NotPlusMinus
-castExpression_NotPlusMinusWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refAndBounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-              Core.projectionField = (Core.Name "refAndBounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-castExpression_NotPlusMinusWithRefAndBounds :: Phantoms.TTerm Syntax.CastExpression_NotPlusMinus -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm Syntax.CastExpression_NotPlusMinus
-castExpression_NotPlusMinusWithRefAndBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "refAndBounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-castExpression_Primitive :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.CastExpression_Primitive
-castExpression_Primitive type_ expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-castExpression_PrimitiveExpression :: Phantoms.TTerm Syntax.CastExpression_Primitive -> Phantoms.TTerm Syntax.UnaryExpression
-castExpression_PrimitiveExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_PrimitiveType :: Phantoms.TTerm Syntax.CastExpression_Primitive -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations
-castExpression_PrimitiveType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_PrimitiveWithExpression :: Phantoms.TTerm Syntax.CastExpression_Primitive -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.CastExpression_Primitive
-castExpression_PrimitiveWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-castExpression_PrimitiveWithType :: Phantoms.TTerm Syntax.CastExpression_Primitive -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.CastExpression_Primitive
-castExpression_PrimitiveWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_Primitive"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-castExpression_RefAndBounds :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm [Syntax.AdditionalBound] -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds
-castExpression_RefAndBounds type_ bounds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)}]}))
-
-castExpression_RefAndBoundsBounds :: Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm [Syntax.AdditionalBound]
-castExpression_RefAndBoundsBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_RefAndBoundsType :: Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm Syntax.ReferenceType
-castExpression_RefAndBoundsType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExpression_RefAndBoundsWithBounds :: Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm [Syntax.AdditionalBound] -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds
-castExpression_RefAndBoundsWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-castExpression_RefAndBoundsWithType :: Phantoms.TTerm Syntax.CastExpression_RefAndBounds -> Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.CastExpression_RefAndBounds
-castExpression_RefAndBoundsWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catchClause :: Phantoms.TTerm (Maybe Syntax.CatchFormalParameter) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.CatchClause
-catchClause parameter block =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)}]}))
-
-catchClauseBlock :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm Syntax.Block
-catchClauseBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchClauseParameter :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm (Maybe Syntax.CatchFormalParameter)
-catchClauseParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchClauseWithBlock :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.CatchClause
-catchClauseWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catchClauseWithParameter :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm (Maybe Syntax.CatchFormalParameter) -> Phantoms.TTerm Syntax.CatchClause
-catchClauseWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchClause"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catchFormalParameter :: Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.CatchType -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.CatchFormalParameter
-catchFormalParameter modifiers type_ id =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)}]}))
-
-catchFormalParameterId :: Phantoms.TTerm Syntax.CatchFormalParameter -> Phantoms.TTerm Syntax.VariableDeclaratorId
-catchFormalParameterId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchFormalParameterModifiers :: Phantoms.TTerm Syntax.CatchFormalParameter -> Phantoms.TTerm [Syntax.VariableModifier]
-catchFormalParameterModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchFormalParameterType :: Phantoms.TTerm Syntax.CatchFormalParameter -> Phantoms.TTerm Syntax.CatchType
-catchFormalParameterType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchFormalParameterWithId :: Phantoms.TTerm Syntax.CatchFormalParameter -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.CatchFormalParameter
-catchFormalParameterWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catchFormalParameterWithModifiers :: Phantoms.TTerm Syntax.CatchFormalParameter -> Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.CatchFormalParameter
-catchFormalParameterWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.java.syntax.CatchFormalParameter"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catchFormalParameterWithType :: Phantoms.TTerm Syntax.CatchFormalParameter -> Phantoms.TTerm Syntax.CatchType -> Phantoms.TTerm Syntax.CatchFormalParameter
-catchFormalParameterWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchFormalParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.java.syntax.CatchFormalParameter"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catchType :: Phantoms.TTerm Syntax.UnannClassType -> Phantoms.TTerm [Syntax.ClassType] -> Phantoms.TTerm Syntax.CatchType
-catchType type_ types =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)}]}))
-
-catchTypeType :: Phantoms.TTerm Syntax.CatchType -> Phantoms.TTerm Syntax.UnannClassType
-catchTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchTypeTypes :: Phantoms.TTerm Syntax.CatchType -> Phantoms.TTerm [Syntax.ClassType]
-catchTypeTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchTypeWithType :: Phantoms.TTerm Syntax.CatchType -> Phantoms.TTerm Syntax.UnannClassType -> Phantoms.TTerm Syntax.CatchType
-catchTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catchTypeWithTypes :: Phantoms.TTerm Syntax.CatchType -> Phantoms.TTerm [Syntax.ClassType] -> Phantoms.TTerm Syntax.CatchType
-catchTypeWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.CatchType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catches :: Phantoms.TTerm [Syntax.CatchClause] -> Phantoms.TTerm Syntax.Catches
-catches x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.Catches"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-classBody :: Phantoms.TTerm [Syntax.ClassBodyDeclarationWithComments] -> Phantoms.TTerm Syntax.ClassBody
-classBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ClassBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-classBodyDeclarationClassMember :: Phantoms.TTerm Syntax.ClassMemberDeclaration -> Phantoms.TTerm Syntax.ClassBodyDeclaration
-classBodyDeclarationClassMember x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classMember"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBodyDeclarationConstructorDeclaration :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ClassBodyDeclaration
-classBodyDeclarationConstructorDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructorDeclaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBodyDeclarationInstanceInitializer :: Phantoms.TTerm Syntax.InstanceInitializer -> Phantoms.TTerm Syntax.ClassBodyDeclaration
-classBodyDeclarationInstanceInitializer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "instanceInitializer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBodyDeclarationStaticInitializer :: Phantoms.TTerm Syntax.StaticInitializer -> Phantoms.TTerm Syntax.ClassBodyDeclaration
-classBodyDeclarationStaticInitializer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "staticInitializer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classBodyDeclarationWithComments :: Phantoms.TTerm Syntax.ClassBodyDeclaration -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments
-classBodyDeclarationWithComments value comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-
-classBodyDeclarationWithCommentsComments :: Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments -> Phantoms.TTerm (Maybe String)
-classBodyDeclarationWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classBodyDeclarationWithCommentsValue :: Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments -> Phantoms.TTerm Syntax.ClassBodyDeclaration
-classBodyDeclarationWithCommentsValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classBodyDeclarationWithCommentsWithComments :: Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments
-classBodyDeclarationWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classBodyDeclarationWithCommentsWithValue :: Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments -> Phantoms.TTerm Syntax.ClassBodyDeclaration -> Phantoms.TTerm Syntax.ClassBodyDeclarationWithComments
-classBodyDeclarationWithCommentsWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationEnum :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classDeclarationNormal :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationNormal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classInstanceCreationExpression :: Phantoms.TTerm (Maybe Syntax.ClassInstanceCreationExpression_Qualifier) -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm Syntax.ClassInstanceCreationExpression
-classInstanceCreationExpression qualifier expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-classInstanceCreationExpressionExpression :: Phantoms.TTerm Syntax.ClassInstanceCreationExpression -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression
-classInstanceCreationExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classInstanceCreationExpressionQualifier :: Phantoms.TTerm Syntax.ClassInstanceCreationExpression -> Phantoms.TTerm (Maybe Syntax.ClassInstanceCreationExpression_Qualifier)
-classInstanceCreationExpressionQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classInstanceCreationExpressionWithExpression :: Phantoms.TTerm Syntax.ClassInstanceCreationExpression -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm Syntax.ClassInstanceCreationExpression
-classInstanceCreationExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classInstanceCreationExpressionWithQualifier :: Phantoms.TTerm Syntax.ClassInstanceCreationExpression -> Phantoms.TTerm (Maybe Syntax.ClassInstanceCreationExpression_Qualifier) -> Phantoms.TTerm Syntax.ClassInstanceCreationExpression
-classInstanceCreationExpressionWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classInstanceCreationExpression_QualifierExpression :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.ClassInstanceCreationExpression_Qualifier
-classInstanceCreationExpression_QualifierExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression_Qualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classInstanceCreationExpression_QualifierPrimary :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.ClassInstanceCreationExpression_Qualifier
-classInstanceCreationExpression_QualifierPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassInstanceCreationExpression_Qualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classLiteralBoolean :: Phantoms.TTerm Syntax.BooleanArray -> Phantoms.TTerm Syntax.ClassLiteral
-classLiteralBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classLiteralNumericType :: Phantoms.TTerm Syntax.NumericTypeArray -> Phantoms.TTerm Syntax.ClassLiteral
-classLiteralNumericType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numericType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classLiteralType :: Phantoms.TTerm Syntax.TypeNameArray -> Phantoms.TTerm Syntax.ClassLiteral
-classLiteralType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classLiteralVoid :: Phantoms.TTerm Syntax.ClassLiteral
-classLiteralVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classMemberDeclarationClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationField :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "field"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationInterface :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationMethod :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classMemberDeclarationNone :: Phantoms.TTerm Syntax.ClassMemberDeclaration
-classMemberDeclarationNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierAbstract :: Phantoms.TTerm Syntax.ClassModifier
-classModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.ClassModifier
-classModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classModifierFinal :: Phantoms.TTerm Syntax.ClassModifier
-classModifierFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierPrivate :: Phantoms.TTerm Syntax.ClassModifier
-classModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierProtected :: Phantoms.TTerm Syntax.ClassModifier
-classModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierPublic :: Phantoms.TTerm Syntax.ClassModifier
-classModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierStatic :: Phantoms.TTerm Syntax.ClassModifier
-classModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classModifierStrictfp :: Phantoms.TTerm Syntax.ClassModifier
-classModifierStrictfp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strictfp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classOrInterfaceTypeClass :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.ClassOrInterfaceType
-classOrInterfaceTypeClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classOrInterfaceTypeInterface :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.ClassOrInterfaceType
-classOrInterfaceTypeInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classOrInterfaceTypeToInstantiate :: Phantoms.TTerm [Syntax.AnnotatedIdentifier] -> Phantoms.TTerm (Maybe Syntax.TypeArgumentsOrDiamond) -> Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate
-classOrInterfaceTypeToInstantiate identifiers typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm identifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-classOrInterfaceTypeToInstantiateIdentifiers :: Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate -> Phantoms.TTerm [Syntax.AnnotatedIdentifier]
-classOrInterfaceTypeToInstantiateIdentifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-        Core.projectionField = (Core.Name "identifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classOrInterfaceTypeToInstantiateTypeArguments :: Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate -> Phantoms.TTerm (Maybe Syntax.TypeArgumentsOrDiamond)
-classOrInterfaceTypeToInstantiateTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classOrInterfaceTypeToInstantiateWithIdentifiers :: Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate -> Phantoms.TTerm [Syntax.AnnotatedIdentifier] -> Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate
-classOrInterfaceTypeToInstantiateWithIdentifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classOrInterfaceTypeToInstantiateWithTypeArguments :: Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate -> Phantoms.TTerm (Maybe Syntax.TypeArgumentsOrDiamond) -> Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate
-classOrInterfaceTypeToInstantiateWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"),
-              Core.projectionField = (Core.Name "identifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classType :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.ClassTypeQualifier -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.ClassType
-classType annotations qualifier identifier arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-classTypeAnnotations :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm [Syntax.Annotation]
-classTypeAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classTypeArguments :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm [Syntax.TypeArgument]
-classTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classTypeIdentifier :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.TypeIdentifier
-classTypeIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classTypeQualifier :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.ClassTypeQualifier
-classTypeQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classTypeQualifierNone :: Phantoms.TTerm Syntax.ClassTypeQualifier
-classTypeQualifierNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassTypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-classTypeQualifierPackage :: Phantoms.TTerm Syntax.PackageName -> Phantoms.TTerm Syntax.ClassTypeQualifier
-classTypeQualifierPackage x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassTypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "package"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classTypeQualifierParent :: Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm Syntax.ClassTypeQualifier
-classTypeQualifierParent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ClassTypeQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classTypeWithAnnotations :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.ClassType
-classTypeWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classTypeWithArguments :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.ClassType
-classTypeWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classTypeWithIdentifier :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.ClassType
-classTypeWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classTypeWithQualifier :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.ClassTypeQualifier -> Phantoms.TTerm Syntax.ClassType
-classTypeWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ClassType"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compilationUnitModular :: Phantoms.TTerm Syntax.ModularCompilationUnit -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnitModular x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.CompilationUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modular"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compilationUnitOrdinary :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm Syntax.CompilationUnit
-compilationUnitOrdinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.CompilationUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ordinary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalAndExpression :: Phantoms.TTerm [Syntax.InclusiveOrExpression] -> Phantoms.TTerm Syntax.ConditionalAndExpression
-conditionalAndExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ConditionalAndExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-conditionalExpressionSimple :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpressionTernaryCond :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionTernaryCond x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ternaryCond"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpressionTernaryLambda :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionTernaryLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ternaryLambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpression_TernaryCond :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond
-conditionalExpression_TernaryCond cond ifTrue ifFalse =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Phantoms.unTTerm ifTrue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Phantoms.unTTerm ifFalse)}]}))
-
-conditionalExpression_TernaryCondCond :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.ConditionalOrExpression
-conditionalExpression_TernaryCondCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpression_TernaryCondIfFalse :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpression_TernaryCondIfFalse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-        Core.projectionField = (Core.Name "ifFalse")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpression_TernaryCondIfTrue :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.Expression
-conditionalExpression_TernaryCondIfTrue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-        Core.projectionField = (Core.Name "ifTrue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpression_TernaryCondWithCond :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond
-conditionalExpression_TernaryCondWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-              Core.projectionField = (Core.Name "ifTrue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-              Core.projectionField = (Core.Name "ifFalse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalExpression_TernaryCondWithIfFalse :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond
-conditionalExpression_TernaryCondWithIfFalse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-              Core.projectionField = (Core.Name "ifTrue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conditionalExpression_TernaryCondWithIfTrue :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryCond
-conditionalExpression_TernaryCondWithIfTrue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"),
-              Core.projectionField = (Core.Name "ifFalse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalExpression_TernaryLambda :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda
-conditionalExpression_TernaryLambda cond ifTrue ifFalse =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Phantoms.unTTerm ifTrue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Phantoms.unTTerm ifFalse)}]}))
-
-conditionalExpression_TernaryLambdaCond :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.ConditionalOrExpression
-conditionalExpression_TernaryLambdaCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpression_TernaryLambdaIfFalse :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.LambdaExpression
-conditionalExpression_TernaryLambdaIfFalse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-        Core.projectionField = (Core.Name "ifFalse")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpression_TernaryLambdaIfTrue :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.Expression
-conditionalExpression_TernaryLambdaIfTrue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-        Core.projectionField = (Core.Name "ifTrue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpression_TernaryLambdaWithCond :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda
-conditionalExpression_TernaryLambdaWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-              Core.projectionField = (Core.Name "ifTrue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-              Core.projectionField = (Core.Name "ifFalse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalExpression_TernaryLambdaWithIfFalse :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda
-conditionalExpression_TernaryLambdaWithIfFalse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-              Core.projectionField = (Core.Name "ifTrue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conditionalExpression_TernaryLambdaWithIfTrue :: Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression_TernaryLambda
-conditionalExpression_TernaryLambdaWithIfTrue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifTrue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifFalse"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"),
-              Core.projectionField = (Core.Name "ifFalse")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalOrExpression :: Phantoms.TTerm [Syntax.ConditionalAndExpression] -> Phantoms.TTerm Syntax.ConditionalOrExpression
-conditionalOrExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ConditionalOrExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constantDeclaration :: Phantoms.TTerm [Syntax.ConstantModifier] -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclaration modifiers type_ variables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm variables)}]}))
-
-constantDeclarationModifiers :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantModifier]
-constantDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationType :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.UnannType
-constantDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationVariables :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator]
-constantDeclarationVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-        Core.projectionField = (Core.Name "variables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDeclarationWithModifiers :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.ConstantModifier] -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantDeclarationWithType :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantDeclarationWithVariables :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.ConstantDeclaration
-constantDeclarationWithVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstantDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constantExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConstantExpression
-constantExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ConstantExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constantModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.ConstantModifier
-constantModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constantModifierFinal :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constantModifierPublic :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constantModifierStatic :: Phantoms.TTerm Syntax.ConstantModifier
-constantModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstantModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorBody :: Phantoms.TTerm (Maybe Syntax.ExplicitConstructorInvocation) -> Phantoms.TTerm [Syntax.BlockStatement] -> Phantoms.TTerm Syntax.ConstructorBody
-constructorBody invocation statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "invocation"),
-          Core.fieldTerm = (Phantoms.unTTerm invocation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-constructorBodyInvocation :: Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm (Maybe Syntax.ExplicitConstructorInvocation)
-constructorBodyInvocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-        Core.projectionField = (Core.Name "invocation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorBodyStatements :: Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm [Syntax.BlockStatement]
-constructorBodyStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorBodyWithInvocation :: Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm (Maybe Syntax.ExplicitConstructorInvocation) -> Phantoms.TTerm Syntax.ConstructorBody
-constructorBodyWithInvocation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "invocation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorBodyWithStatements :: Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm [Syntax.BlockStatement] -> Phantoms.TTerm Syntax.ConstructorBody
-constructorBodyWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "invocation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorBody"),
-              Core.projectionField = (Core.Name "invocation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorDeclaration :: Phantoms.TTerm [Syntax.ConstructorModifier] -> Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.Throws) -> Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclaration modifiers constructor throws body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm constructor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Phantoms.unTTerm throws)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-constructorDeclarationBody :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorBody
-constructorDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationConstructor :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclarationConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "constructor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationModifiers :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.ConstructorModifier]
-constructorDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationThrows :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm (Maybe Syntax.Throws)
-constructorDeclarationThrows x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-        Core.projectionField = (Core.Name "throws")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclarationWithBody :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorBody -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "throws")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorDeclarationWithConstructor :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithConstructor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "throws")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarationWithModifiers :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm [Syntax.ConstructorModifier] -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "throws")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarationWithThrows :: Phantoms.TTerm Syntax.ConstructorDeclaration -> Phantoms.TTerm (Maybe Syntax.Throws) -> Phantoms.TTerm Syntax.ConstructorDeclaration
-constructorDeclarationWithThrows original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclarator :: Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.SimpleTypeName -> Phantoms.TTerm (Maybe Syntax.ReceiverParameter) -> Phantoms.TTerm [Syntax.FormalParameter] -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclarator parameters name receiverParameter formalParameters =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Phantoms.unTTerm receiverParameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm formalParameters)}]}))
-
-constructorDeclaratorFormalParameters :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm [Syntax.FormalParameter]
-constructorDeclaratorFormalParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "formalParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorName :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.SimpleTypeName
-constructorDeclaratorName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorParameters :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm [Syntax.TypeParameter]
-constructorDeclaratorParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorReceiverParameter :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.ReceiverParameter)
-constructorDeclaratorReceiverParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-        Core.projectionField = (Core.Name "receiverParameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorDeclaratorWithFormalParameters :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm [Syntax.FormalParameter] -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithFormalParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "receiverParameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorDeclaratorWithName :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm Syntax.SimpleTypeName -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "receiverParameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "formalParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclaratorWithParameters :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "receiverParameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "formalParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorDeclaratorWithReceiverParameter :: Phantoms.TTerm Syntax.ConstructorDeclarator -> Phantoms.TTerm (Maybe Syntax.ReceiverParameter) -> Phantoms.TTerm Syntax.ConstructorDeclarator
-constructorDeclaratorWithReceiverParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ConstructorDeclarator"),
-              Core.projectionField = (Core.Name "formalParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-constructorModifierPrivate :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierProtected :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constructorModifierPublic :: Phantoms.TTerm Syntax.ConstructorModifier
-constructorModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ConstructorModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-continueStatement :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ContinueStatement
-continueStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ContinueStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-defaultValue :: Phantoms.TTerm Syntax.ElementValue -> Phantoms.TTerm Syntax.DefaultValue
-defaultValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.DefaultValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dimExpr :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.DimExpr
-dimExpr annotations expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-dimExprAnnotations :: Phantoms.TTerm Syntax.DimExpr -> Phantoms.TTerm [Syntax.Annotation]
-dimExprAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dimExprExpression :: Phantoms.TTerm Syntax.DimExpr -> Phantoms.TTerm (Maybe Syntax.Expression)
-dimExprExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dimExprWithAnnotations :: Phantoms.TTerm Syntax.DimExpr -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.DimExpr
-dimExprWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dimExprWithExpression :: Phantoms.TTerm Syntax.DimExpr -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.DimExpr
-dimExprWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.DimExpr"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dims :: Phantoms.TTerm [[Syntax.Annotation]] -> Phantoms.TTerm Syntax.Dims
-dims x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.Dims"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-doStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.DoStatement
-doStatement body conde =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "conde"),
-          Core.fieldTerm = (Phantoms.unTTerm conde)}]}))
-
-doStatementBody :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.Statement
-doStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doStatementConde :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-doStatementConde x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-        Core.projectionField = (Core.Name "conde")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doStatementWithBody :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.DoStatement
-doStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "conde"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-              Core.projectionField = (Core.Name "conde")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-doStatementWithConde :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.DoStatement
-doStatementWithConde original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.DoStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "conde"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementValueAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.ElementValue
-elementValueAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ElementValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementValueArrayInitializer :: Phantoms.TTerm [Syntax.ElementValue] -> Phantoms.TTerm Syntax.ElementValueArrayInitializer
-elementValueArrayInitializer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ElementValueArrayInitializer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-elementValueConditionalExpression :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.ElementValue
-elementValueConditionalExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ElementValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conditionalExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementValueElementValueArrayInitializer :: Phantoms.TTerm Syntax.ElementValueArrayInitializer -> Phantoms.TTerm Syntax.ElementValue
-elementValueElementValueArrayInitializer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ElementValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementValueArrayInitializer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementValuePair :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ElementValue -> Phantoms.TTerm Syntax.ElementValuePair
-elementValuePair key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ElementValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-elementValuePairKey :: Phantoms.TTerm Syntax.ElementValuePair -> Phantoms.TTerm Syntax.Identifier
-elementValuePairKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ElementValuePair"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementValuePairValue :: Phantoms.TTerm Syntax.ElementValuePair -> Phantoms.TTerm Syntax.ElementValue
-elementValuePairValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ElementValuePair"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementValuePairWithKey :: Phantoms.TTerm Syntax.ElementValuePair -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ElementValuePair
-elementValuePairWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ElementValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.java.syntax.ElementValuePair"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementValuePairWithValue :: Phantoms.TTerm Syntax.ElementValuePair -> Phantoms.TTerm Syntax.ElementValue -> Phantoms.TTerm Syntax.ElementValuePair
-elementValuePairWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ElementValuePair"),
-      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.java.syntax.ElementValuePair"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enhancedForCond :: Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForCond modifiers type_ id expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-enhancedForCondExpression :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.Expression
-enhancedForCondExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForCondId :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.VariableDeclaratorId
-enhancedForCondId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForCondModifiers :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm [Syntax.VariableModifier]
-enhancedForCondModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForCondType :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.LocalVariableType
-enhancedForCondType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForCondWithExpression :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForCondWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enhancedForCondWithId :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForCondWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enhancedForCondWithModifiers :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForCondWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enhancedForCondWithType :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForCondWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForCond"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enhancedForStatement :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.EnhancedForStatement
-enhancedForStatement cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-enhancedForStatementBody :: Phantoms.TTerm Syntax.EnhancedForStatement -> Phantoms.TTerm Syntax.Statement
-enhancedForStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForStatementCond :: Phantoms.TTerm Syntax.EnhancedForStatement -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForStatementCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForStatementNoShortIf :: Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf
-enhancedForStatementNoShortIf cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-enhancedForStatementNoShortIfBody :: Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-enhancedForStatementNoShortIfBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForStatementNoShortIfCond :: Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf -> Phantoms.TTerm Syntax.EnhancedForCond
-enhancedForStatementNoShortIfCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enhancedForStatementNoShortIfWithBody :: Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf
-enhancedForStatementNoShortIfWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enhancedForStatementNoShortIfWithCond :: Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf -> Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf
-enhancedForStatementNoShortIfWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enhancedForStatementWithBody :: Phantoms.TTerm Syntax.EnhancedForStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.EnhancedForStatement
-enhancedForStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enhancedForStatementWithCond :: Phantoms.TTerm Syntax.EnhancedForStatement -> Phantoms.TTerm Syntax.EnhancedForCond -> Phantoms.TTerm Syntax.EnhancedForStatement
-enhancedForStatementWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnhancedForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumBody :: Phantoms.TTerm [Syntax.EnumBody_Element] -> Phantoms.TTerm Syntax.EnumBody
-enumBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.EnumBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumBody_Element :: Phantoms.TTerm [Syntax.EnumConstant] -> Phantoms.TTerm [Syntax.ClassBodyDeclaration] -> Phantoms.TTerm Syntax.EnumBody_Element
-enumBody_Element constants bodyDeclarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constants"),
-          Core.fieldTerm = (Phantoms.unTTerm constants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodyDeclarations"),
-          Core.fieldTerm = (Phantoms.unTTerm bodyDeclarations)}]}))
-
-enumBody_ElementBodyDeclarations :: Phantoms.TTerm Syntax.EnumBody_Element -> Phantoms.TTerm [Syntax.ClassBodyDeclaration]
-enumBody_ElementBodyDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-        Core.projectionField = (Core.Name "bodyDeclarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumBody_ElementConstants :: Phantoms.TTerm Syntax.EnumBody_Element -> Phantoms.TTerm [Syntax.EnumConstant]
-enumBody_ElementConstants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-        Core.projectionField = (Core.Name "constants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumBody_ElementWithBodyDeclarations :: Phantoms.TTerm Syntax.EnumBody_Element -> Phantoms.TTerm [Syntax.ClassBodyDeclaration] -> Phantoms.TTerm Syntax.EnumBody_Element
-enumBody_ElementWithBodyDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-              Core.projectionField = (Core.Name "constants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodyDeclarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumBody_ElementWithConstants :: Phantoms.TTerm Syntax.EnumBody_Element -> Phantoms.TTerm [Syntax.EnumConstant] -> Phantoms.TTerm Syntax.EnumBody_Element
-enumBody_ElementWithConstants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bodyDeclarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumBody_Element"),
-              Core.projectionField = (Core.Name "bodyDeclarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumConstant :: Phantoms.TTerm [Syntax.EnumConstantModifier] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm [[Syntax.Expression]] -> Phantoms.TTerm (Maybe Syntax.ClassBody) -> Phantoms.TTerm Syntax.EnumConstant
-enumConstant modifiers identifier arguments body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-enumConstantArguments :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm [[Syntax.Expression]]
-enumConstantArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumConstantBody :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm (Maybe Syntax.ClassBody)
-enumConstantBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumConstantIdentifier :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm Syntax.Identifier
-enumConstantIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumConstantModifier :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.EnumConstantModifier
-enumConstantModifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.EnumConstantModifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumConstantModifiers :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm [Syntax.EnumConstantModifier]
-enumConstantModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumConstantName :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.EnumConstantName
-enumConstantName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.EnumConstantName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumConstantWithArguments :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm [[Syntax.Expression]] -> Phantoms.TTerm Syntax.EnumConstant
-enumConstantWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumConstantWithBody :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm (Maybe Syntax.ClassBody) -> Phantoms.TTerm Syntax.EnumConstant
-enumConstantWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumConstantWithIdentifier :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.EnumConstant
-enumConstantWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumConstantWithModifiers :: Phantoms.TTerm Syntax.EnumConstant -> Phantoms.TTerm [Syntax.EnumConstantModifier] -> Phantoms.TTerm Syntax.EnumConstant
-enumConstantWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumConstant"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDeclaration :: Phantoms.TTerm [Syntax.ClassModifier] -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.EnumBody -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclaration modifiers identifier implements body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Phantoms.unTTerm implements)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-enumDeclarationBody :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.EnumBody
-enumDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationIdentifier :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier
-enumDeclarationIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationImplements :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm [Syntax.InterfaceType]
-enumDeclarationImplements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "implements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationModifiers :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm [Syntax.ClassModifier]
-enumDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDeclarationWithBody :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.EnumBody -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumDeclarationWithIdentifier :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDeclarationWithImplements :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithImplements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDeclarationWithModifiers :: Phantoms.TTerm Syntax.EnumDeclaration -> Phantoms.TTerm [Syntax.ClassModifier] -> Phantoms.TTerm Syntax.EnumDeclaration
-enumDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EnumDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equalityExpressionEqual :: Phantoms.TTerm Syntax.EqualityExpression_Binary -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityExpressionNotEqual :: Phantoms.TTerm Syntax.EqualityExpression_Binary -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionNotEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityExpressionUnary :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equalityExpression_Binary :: Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualityExpression_Binary
-equalityExpression_Binary lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-equalityExpression_BinaryLhs :: Phantoms.TTerm Syntax.EqualityExpression_Binary -> Phantoms.TTerm Syntax.EqualityExpression
-equalityExpression_BinaryLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equalityExpression_BinaryRhs :: Phantoms.TTerm Syntax.EqualityExpression_Binary -> Phantoms.TTerm Syntax.RelationalExpression
-equalityExpression_BinaryRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equalityExpression_BinaryWithLhs :: Phantoms.TTerm Syntax.EqualityExpression_Binary -> Phantoms.TTerm Syntax.EqualityExpression -> Phantoms.TTerm Syntax.EqualityExpression_Binary
-equalityExpression_BinaryWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equalityExpression_BinaryWithRhs :: Phantoms.TTerm Syntax.EqualityExpression_Binary -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.EqualityExpression_Binary
-equalityExpression_BinaryWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.EqualityExpression_Binary"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exceptionTypeClass :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.ExceptionType
-exceptionTypeClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ExceptionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exceptionTypeVariable :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm Syntax.ExceptionType
-exceptionTypeVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ExceptionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exclusiveOrExpression :: Phantoms.TTerm [Syntax.AndExpression] -> Phantoms.TTerm Syntax.ExclusiveOrExpression
-exclusiveOrExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ExclusiveOrExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-explicitConstructorInvocation :: Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation_Variant -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation
-explicitConstructorInvocation typeArguments arguments variant =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm variant)}]}))
-
-explicitConstructorInvocationArguments :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation -> Phantoms.TTerm [Syntax.Expression]
-explicitConstructorInvocationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitConstructorInvocationTypeArguments :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation -> Phantoms.TTerm [Syntax.TypeArgument]
-explicitConstructorInvocationTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitConstructorInvocationVariant :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation_Variant
-explicitConstructorInvocationVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-        Core.projectionField = (Core.Name "variant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-explicitConstructorInvocationWithArguments :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation
-explicitConstructorInvocationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitConstructorInvocationWithTypeArguments :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation
-explicitConstructorInvocationWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-explicitConstructorInvocationWithVariant :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation_Variant -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation
-explicitConstructorInvocationWithVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-explicitConstructorInvocation_VariantPrimary :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation_Variant
-explicitConstructorInvocation_VariantPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-explicitConstructorInvocation_VariantSuper :: Phantoms.TTerm (Maybe Syntax.ExpressionName) -> Phantoms.TTerm Syntax.ExplicitConstructorInvocation_Variant
-explicitConstructorInvocation_VariantSuper x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-explicitConstructorInvocation_VariantThis :: Phantoms.TTerm Syntax.ExplicitConstructorInvocation_Variant
-explicitConstructorInvocation_VariantThis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ExplicitConstructorInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-expressionAssignment :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression
-expressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLambda :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression
-expressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionName :: Phantoms.TTerm (Maybe Syntax.AmbiguousName) -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExpressionName
-expressionName qualifier identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-expressionNameIdentifier :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.Identifier
-expressionNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-expressionNameQualifier :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm (Maybe Syntax.AmbiguousName)
-expressionNameQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-expressionNameWithIdentifier :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExpressionName
-expressionNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-expressionNameWithQualifier :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm (Maybe Syntax.AmbiguousName) -> Phantoms.TTerm Syntax.ExpressionName
-expressionNameWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ExpressionName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-expressionStatement :: Phantoms.TTerm Syntax.StatementExpression -> Phantoms.TTerm Syntax.ExpressionStatement
-expressionStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ExpressionStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fieldAccess :: Phantoms.TTerm Syntax.FieldAccess_Qualifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccess qualifier identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-fieldAccessIdentifier :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Identifier
-fieldAccessIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessQualifier :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.FieldAccess_Qualifier
-fieldAccessQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessWithIdentifier :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccessWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldAccessWithQualifier :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.FieldAccess_Qualifier -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccessWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldAccess_QualifierPrimary :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.FieldAccess_Qualifier
-fieldAccess_QualifierPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess_Qualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldAccess_QualifierSuper :: Phantoms.TTerm Syntax.FieldAccess_Qualifier
-fieldAccess_QualifierSuper =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess_Qualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldAccess_QualifierTyped :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.FieldAccess_Qualifier
-fieldAccess_QualifierTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldAccess_Qualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldDeclaration :: Phantoms.TTerm [Syntax.FieldModifier] -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclaration modifiers unannType variableDeclarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Phantoms.unTTerm unannType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclarators"),
-          Core.fieldTerm = (Phantoms.unTTerm variableDeclarators)}]}))
-
-fieldDeclarationModifiers :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.FieldModifier]
-fieldDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationUnannType :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.UnannType
-fieldDeclarationUnannType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "unannType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationVariableDeclarators :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator]
-fieldDeclarationVariableDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-        Core.projectionField = (Core.Name "variableDeclarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDeclarationWithModifiers :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.FieldModifier] -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "unannType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "variableDeclarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDeclarationWithUnannType :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithUnannType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "variableDeclarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldDeclarationWithVariableDeclarators :: Phantoms.TTerm Syntax.FieldDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.FieldDeclaration
-fieldDeclarationWithVariableDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FieldDeclaration"),
-              Core.projectionField = (Core.Name "unannType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.FieldModifier
-fieldModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldModifierFinal :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierPrivate :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierProtected :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierPublic :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierStatic :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierTransient :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierTransient =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "transient"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldModifierVolatile :: Phantoms.TTerm Syntax.FieldModifier
-fieldModifierVolatile =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FieldModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "volatile"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-finally :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.Finally
-finally x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.Finally"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-floatingPointLiteral :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.FloatingPointLiteral
-floatingPointLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.FloatingPointLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-floatingPointTypeDouble :: Phantoms.TTerm Syntax.FloatingPointType
-floatingPointTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FloatingPointType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-floatingPointTypeFloat :: Phantoms.TTerm Syntax.FloatingPointType
-floatingPointTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FloatingPointType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-forCond :: Phantoms.TTerm (Maybe Syntax.ForInit) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.ForUpdate) -> Phantoms.TTerm Syntax.ForCond
-forCond init cond update =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Phantoms.unTTerm update)}]}))
-
-forCondCond :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm (Maybe Syntax.Expression)
-forCondCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forCondInit :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm (Maybe Syntax.ForInit)
-forCondInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forCondUpdate :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm (Maybe Syntax.ForUpdate)
-forCondUpdate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-        Core.projectionField = (Core.Name "update")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forCondWithCond :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ForCond
-forCondWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-              Core.projectionField = (Core.Name "update")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forCondWithInit :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm (Maybe Syntax.ForInit) -> Phantoms.TTerm Syntax.ForCond
-forCondWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-              Core.projectionField = (Core.Name "update")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forCondWithUpdate :: Phantoms.TTerm Syntax.ForCond -> Phantoms.TTerm (Maybe Syntax.ForUpdate) -> Phantoms.TTerm Syntax.ForCond
-forCondWithUpdate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ForCond"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forInitLocalVariable :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.ForInit
-forInitLocalVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInitStatements :: Phantoms.TTerm [Syntax.StatementExpression] -> Phantoms.TTerm Syntax.ForInit
-forInitStatements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "statements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forStatementBasic :: Phantoms.TTerm Syntax.BasicForStatement -> Phantoms.TTerm Syntax.ForStatement
-forStatementBasic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ForStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "basic"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forStatementEnhanced :: Phantoms.TTerm Syntax.EnhancedForStatement -> Phantoms.TTerm Syntax.ForStatement
-forStatementEnhanced x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ForStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enhanced"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forStatementNoShortIfBasic :: Phantoms.TTerm Syntax.BasicForStatementNoShortIf -> Phantoms.TTerm Syntax.ForStatementNoShortIf
-forStatementNoShortIfBasic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ForStatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "basic"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forStatementNoShortIfEnhanced :: Phantoms.TTerm Syntax.EnhancedForStatementNoShortIf -> Phantoms.TTerm Syntax.ForStatementNoShortIf
-forStatementNoShortIfEnhanced x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ForStatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enhanced"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forUpdate :: Phantoms.TTerm [Syntax.StatementExpression] -> Phantoms.TTerm Syntax.ForUpdate
-forUpdate x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ForUpdate"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-formalParameterSimple :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm Syntax.FormalParameter
-formalParameterSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-formalParameterVariableArity :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.FormalParameter
-formalParameterVariableArity x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variableArity"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-formalParameter_Simple :: Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.FormalParameter_Simple
-formalParameter_Simple modifiers type_ id =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)}]}))
-
-formalParameter_SimpleId :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm Syntax.VariableDeclaratorId
-formalParameter_SimpleId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-formalParameter_SimpleModifiers :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm [Syntax.VariableModifier]
-formalParameter_SimpleModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-formalParameter_SimpleType :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm Syntax.UnannType
-formalParameter_SimpleType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-formalParameter_SimpleWithId :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.FormalParameter_Simple
-formalParameter_SimpleWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-formalParameter_SimpleWithModifiers :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.FormalParameter_Simple
-formalParameter_SimpleWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.java.syntax.FormalParameter_Simple"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-formalParameter_SimpleWithType :: Phantoms.TTerm Syntax.FormalParameter_Simple -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.FormalParameter_Simple
-formalParameter_SimpleWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.FormalParameter_Simple"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.java.syntax.FormalParameter_Simple"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identifier :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Identifier
-identifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.Identifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-ifThenElseStatement :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.IfThenElseStatement
-ifThenElseStatement cond then_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm then_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-ifThenElseStatementCond :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-ifThenElseStatementCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenElseStatementElse :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm Syntax.Statement
-ifThenElseStatementElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenElseStatementNoShortIf :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf
-ifThenElseStatementNoShortIf cond then_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm then_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-ifThenElseStatementNoShortIfCond :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm (Maybe Syntax.Expression)
-ifThenElseStatementNoShortIfCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenElseStatementNoShortIfElse :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-ifThenElseStatementNoShortIfElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenElseStatementNoShortIfThen :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-ifThenElseStatementNoShortIfThen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-        Core.projectionField = (Core.Name "then")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenElseStatementNoShortIfWithCond :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf
-ifThenElseStatementNoShortIfWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifThenElseStatementNoShortIfWithElse :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf
-ifThenElseStatementNoShortIfWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifThenElseStatementNoShortIfWithThen :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf
-ifThenElseStatementNoShortIfWithThen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifThenElseStatementThen :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm Syntax.StatementNoShortIf
-ifThenElseStatementThen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-        Core.projectionField = (Core.Name "then")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenElseStatementWithCond :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.IfThenElseStatement
-ifThenElseStatementWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifThenElseStatementWithElse :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.IfThenElseStatement
-ifThenElseStatementWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifThenElseStatementWithThen :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.IfThenElseStatement
-ifThenElseStatementWithThen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenElseStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifThenStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.IfThenStatement
-ifThenStatement expression statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-ifThenStatementExpression :: Phantoms.TTerm Syntax.IfThenStatement -> Phantoms.TTerm Syntax.Expression
-ifThenStatementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenStatementStatement :: Phantoms.TTerm Syntax.IfThenStatement -> Phantoms.TTerm Syntax.Statement
-ifThenStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifThenStatementWithExpression :: Phantoms.TTerm Syntax.IfThenStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfThenStatement
-ifThenStatementWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifThenStatementWithStatement :: Phantoms.TTerm Syntax.IfThenStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.IfThenStatement
-ifThenStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.IfThenStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importDeclarationSingleStaticImport :: Phantoms.TTerm Syntax.SingleStaticImportDeclaration -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationSingleStaticImport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ImportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singleStaticImport"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importDeclarationSingleType :: Phantoms.TTerm Syntax.SingleTypeImportDeclaration -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationSingleType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ImportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singleType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importDeclarationStaticImportOnDemand :: Phantoms.TTerm Syntax.StaticImportOnDemandDeclaration -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationStaticImportOnDemand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ImportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "staticImportOnDemand"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importDeclarationTypeImportOnDemand :: Phantoms.TTerm Syntax.TypeImportOnDemandDeclaration -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationTypeImportOnDemand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ImportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeImportOnDemand"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inclusiveOrExpression :: Phantoms.TTerm [Syntax.ExclusiveOrExpression] -> Phantoms.TTerm Syntax.InclusiveOrExpression
-inclusiveOrExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.InclusiveOrExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-instanceInitializer :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.InstanceInitializer
-instanceInitializer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.InstanceInitializer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-integerLiteral :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.IntegerLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-integralTypeByte :: Phantoms.TTerm Syntax.IntegralType
-integralTypeByte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeChar :: Phantoms.TTerm Syntax.IntegralType
-integralTypeChar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeInt :: Phantoms.TTerm Syntax.IntegralType
-integralTypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeLong :: Phantoms.TTerm Syntax.IntegralType
-integralTypeLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-integralTypeShort :: Phantoms.TTerm Syntax.IntegralType
-integralTypeShort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.IntegralType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceBody :: Phantoms.TTerm [Syntax.InterfaceMemberDeclaration] -> Phantoms.TTerm Syntax.InterfaceBody
-interfaceBody x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.InterfaceBody"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-interfaceDeclarationAnnotationType :: Phantoms.TTerm Syntax.AnnotationTypeDeclaration -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationAnnotationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceDeclarationNormalInterface :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm Syntax.InterfaceDeclaration
-interfaceDeclarationNormalInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normalInterface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationConstant :: Phantoms.TTerm Syntax.ConstantDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationInterface :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMemberDeclarationInterfaceMethod :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.InterfaceMemberDeclaration
-interfaceMemberDeclarationInterfaceMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMemberDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interfaceMethod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMethodDeclaration :: Phantoms.TTerm [Syntax.InterfaceMethodModifier] -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MethodBody -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclaration modifiers header body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-interfaceMethodDeclarationBody :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.MethodBody
-interfaceMethodDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationHeader :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader
-interfaceMethodDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationModifiers :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm [Syntax.InterfaceMethodModifier]
-interfaceMethodDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-interfaceMethodDeclarationWithBody :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.MethodBody -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-interfaceMethodDeclarationWithHeader :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodDeclarationWithModifiers :: Phantoms.TTerm Syntax.InterfaceMethodDeclaration -> Phantoms.TTerm [Syntax.InterfaceMethodModifier] -> Phantoms.TTerm Syntax.InterfaceMethodDeclaration
-interfaceMethodDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-interfaceMethodModifierAbstract :: Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceMethodModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceMethodModifierDefault :: Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceMethodModifierPrivate :: Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceMethodModifierPublic :: Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceMethodModifierStatic :: Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceMethodModifierStrictfp :: Phantoms.TTerm Syntax.InterfaceMethodModifier
-interfaceMethodModifierStrictfp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceMethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strictfp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierAbstract :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interfaceModifierPrivate :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierProtected :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierPublic :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierStatic :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceModifierStrictfb :: Phantoms.TTerm Syntax.InterfaceModifier
-interfaceModifierStrictfb =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.InterfaceModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strictfb"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-interfaceType :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.InterfaceType
-interfaceType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.InterfaceType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-labeledStatement :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatement identifier statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-labeledStatementIdentifier :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Identifier
-labeledStatementIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementNoShortIf :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.LabeledStatementNoShortIf
-labeledStatementNoShortIf identifier statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-labeledStatementNoShortIfIdentifier :: Phantoms.TTerm Syntax.LabeledStatementNoShortIf -> Phantoms.TTerm Syntax.Identifier
-labeledStatementNoShortIfIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementNoShortIfStatement :: Phantoms.TTerm Syntax.LabeledStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-labeledStatementNoShortIfStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementNoShortIfWithIdentifier :: Phantoms.TTerm Syntax.LabeledStatementNoShortIf -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LabeledStatementNoShortIf
-labeledStatementNoShortIfWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledStatementNoShortIfWithStatement :: Phantoms.TTerm Syntax.LabeledStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.LabeledStatementNoShortIf
-labeledStatementNoShortIfWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labeledStatementStatement :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-labeledStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementWithIdentifier :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledStatementWithStatement :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.LambdaBody
-lambdaBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LambdaBody
-lambdaBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaExpression :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm Syntax.LambdaBody -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpression parameters body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-lambdaExpressionBody :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.LambdaBody
-lambdaExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionParameters :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaExpressionParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaExpressionWithBody :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.LambdaBody -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaExpressionWithParameters :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm Syntax.LambdaExpression
-lambdaExpressionWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParameterNormal :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm Syntax.LambdaParameter
-lambdaParameterNormal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaParameterTypeType :: Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.LambdaParameterType
-lambdaParameterTypeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameterType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaParameterTypeVar :: Phantoms.TTerm Syntax.LambdaParameterType
-lambdaParameterTypeVar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameterType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-lambdaParameterVariableArity :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.LambdaParameter
-lambdaParameterVariableArity x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variableArity"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaParameter_Normal :: Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.LambdaParameterType -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.LambdaParameter_Normal
-lambdaParameter_Normal modifiers type_ id =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)}]}))
-
-lambdaParameter_NormalId :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm Syntax.VariableDeclaratorId
-lambdaParameter_NormalId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParameter_NormalModifiers :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm [Syntax.VariableModifier]
-lambdaParameter_NormalModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParameter_NormalType :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm Syntax.LambdaParameterType
-lambdaParameter_NormalType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParameter_NormalWithId :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.LambdaParameter_Normal
-lambdaParameter_NormalWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaParameter_NormalWithModifiers :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.LambdaParameter_Normal
-lambdaParameter_NormalWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.java.syntax.LambdaParameter_Normal"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParameter_NormalWithType :: Phantoms.TTerm Syntax.LambdaParameter_Normal -> Phantoms.TTerm Syntax.LambdaParameterType -> Phantoms.TTerm Syntax.LambdaParameter_Normal
-lambdaParameter_NormalWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameter_Normal"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.java.syntax.LambdaParameter_Normal"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParametersSingle :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParametersSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaParametersTuple :: Phantoms.TTerm [Syntax.LambdaParameters] -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParametersTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LambdaParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-leftHandSideArrayAccess :: Phantoms.TTerm Syntax.ArrayAccess -> Phantoms.TTerm Syntax.LeftHandSide
-leftHandSideArrayAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LeftHandSide"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrayAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-leftHandSideExpressionName :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.LeftHandSide
-leftHandSideExpressionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LeftHandSide"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expressionName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-leftHandSideFieldAccess :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.LeftHandSide
-leftHandSideFieldAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LeftHandSide"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fieldAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalCharacter :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Literal
-literalCharacter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "character"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalFloatingPoint :: Phantoms.TTerm Syntax.FloatingPointLiteral -> Phantoms.TTerm Syntax.Literal
-literalFloatingPoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floatingPoint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalInteger :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Syntax.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNull :: Phantoms.TTerm Syntax.Literal
-literalNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalString :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableDeclaration :: Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclaration modifiers type_ declarators =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm declarators)}]}))
-
-localVariableDeclarationDeclarators :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator]
-localVariableDeclarationDeclarators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "declarators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localVariableDeclarationModifiers :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm [Syntax.VariableModifier]
-localVariableDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localVariableDeclarationStatement :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.LocalVariableDeclarationStatement
-localVariableDeclarationStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclarationStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-localVariableDeclarationType :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.LocalVariableType
-localVariableDeclarationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localVariableDeclarationWithDeclarators :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclarationWithDeclarators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localVariableDeclarationWithModifiers :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-localVariableDeclarationWithType :: Phantoms.TTerm Syntax.LocalVariableDeclaration -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-localVariableDeclarationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableDeclaration"),
-              Core.projectionField = (Core.Name "declarators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-localVariableTypeType :: Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.LocalVariableType
-localVariableTypeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localVariableTypeVar :: Phantoms.TTerm Syntax.LocalVariableType
-localVariableTypeVar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.LocalVariableType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-markerAnnotation :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.MarkerAnnotation
-markerAnnotation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.MarkerAnnotation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-methodBodyBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.MethodBody
-methodBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodBodyNone :: Phantoms.TTerm Syntax.MethodBody
-methodBodyNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodDeclaration :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm [Syntax.MethodModifier] -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MethodBody -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclaration annotations modifiers header body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-methodDeclarationAnnotations :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm [Syntax.Annotation]
-methodDeclarationAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclarationBody :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.MethodBody
-methodDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclarationHeader :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader
-methodDeclarationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclarationModifiers :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm [Syntax.MethodModifier]
-methodDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclarationWithAnnotations :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclarationWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDeclarationWithBody :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.MethodBody -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodDeclarationWithHeader :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclarationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDeclarationWithModifiers :: Phantoms.TTerm Syntax.MethodDeclaration -> Phantoms.TTerm [Syntax.MethodModifier] -> Phantoms.TTerm Syntax.MethodDeclaration
-methodDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDeclarator :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.ReceiverParameter) -> Phantoms.TTerm [Syntax.FormalParameter] -> Phantoms.TTerm Syntax.MethodDeclarator
-methodDeclarator identifier receiverParameter formalParameters =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Phantoms.unTTerm receiverParameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm formalParameters)}]}))
-
-methodDeclaratorFormalParameters :: Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm [Syntax.FormalParameter]
-methodDeclaratorFormalParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-        Core.projectionField = (Core.Name "formalParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclaratorIdentifier :: Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm Syntax.Identifier
-methodDeclaratorIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclaratorReceiverParameter :: Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm (Maybe Syntax.ReceiverParameter)
-methodDeclaratorReceiverParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-        Core.projectionField = (Core.Name "receiverParameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDeclaratorWithFormalParameters :: Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm [Syntax.FormalParameter] -> Phantoms.TTerm Syntax.MethodDeclarator
-methodDeclaratorWithFormalParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-              Core.projectionField = (Core.Name "receiverParameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodDeclaratorWithIdentifier :: Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodDeclarator
-methodDeclaratorWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-              Core.projectionField = (Core.Name "receiverParameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-              Core.projectionField = (Core.Name "formalParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDeclaratorWithReceiverParameter :: Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm (Maybe Syntax.ReceiverParameter) -> Phantoms.TTerm Syntax.MethodDeclarator
-methodDeclaratorWithReceiverParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "receiverParameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "formalParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodDeclarator"),
-              Core.projectionField = (Core.Name "formalParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodHeader :: Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.Result -> Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm (Maybe Syntax.Throws) -> Phantoms.TTerm Syntax.MethodHeader
-methodHeader parameters result declarator throws =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm result)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm declarator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Phantoms.unTTerm throws)}]}))
-
-methodHeaderDeclarator :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MethodDeclarator
-methodHeaderDeclarator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "declarator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderParameters :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm [Syntax.TypeParameter]
-methodHeaderParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderResult :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.Result
-methodHeaderResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "result")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderThrows :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm (Maybe Syntax.Throws)
-methodHeaderThrows x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-        Core.projectionField = (Core.Name "throws")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodHeaderWithDeclarator :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.MethodDeclarator -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithDeclarator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "throws")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodHeaderWithParameters :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "throws")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodHeaderWithResult :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm Syntax.Result -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "throws")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodHeaderWithThrows :: Phantoms.TTerm Syntax.MethodHeader -> Phantoms.TTerm (Maybe Syntax.Throws) -> Phantoms.TTerm Syntax.MethodHeader
-methodHeaderWithThrows original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodHeader"),
-              Core.projectionField = (Core.Name "declarator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "throws"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodInvocation :: Phantoms.TTerm Syntax.MethodInvocation_Header -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MethodInvocation
-methodInvocation header arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-methodInvocationArguments :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm [Syntax.Expression]
-methodInvocationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodInvocationHeader :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm Syntax.MethodInvocation_Header
-methodInvocationHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodInvocationWithArguments :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MethodInvocation
-methodInvocationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodInvocationWithHeader :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm Syntax.MethodInvocation_Header -> Phantoms.TTerm Syntax.MethodInvocation
-methodInvocationWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodInvocation_Complex :: Phantoms.TTerm Syntax.MethodInvocation_Variant -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodInvocation_Complex
-methodInvocation_Complex variant typeArguments identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm variant)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-methodInvocation_ComplexIdentifier :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm Syntax.Identifier
-methodInvocation_ComplexIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodInvocation_ComplexTypeArguments :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm [Syntax.TypeArgument]
-methodInvocation_ComplexTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodInvocation_ComplexVariant :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm Syntax.MethodInvocation_Variant
-methodInvocation_ComplexVariant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-        Core.projectionField = (Core.Name "variant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodInvocation_ComplexWithIdentifier :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodInvocation_Complex
-methodInvocation_ComplexWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodInvocation_ComplexWithTypeArguments :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodInvocation_Complex
-methodInvocation_ComplexWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-              Core.projectionField = (Core.Name "variant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodInvocation_ComplexWithVariant :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm Syntax.MethodInvocation_Variant -> Phantoms.TTerm Syntax.MethodInvocation_Complex
-methodInvocation_ComplexWithVariant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Complex"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodInvocation_HeaderComplex :: Phantoms.TTerm Syntax.MethodInvocation_Complex -> Phantoms.TTerm Syntax.MethodInvocation_Header
-methodInvocation_HeaderComplex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Header"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "complex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodInvocation_HeaderSimple :: Phantoms.TTerm Syntax.MethodName -> Phantoms.TTerm Syntax.MethodInvocation_Header
-methodInvocation_HeaderSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Header"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodInvocation_VariantExpression :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.MethodInvocation_Variant
-methodInvocation_VariantExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodInvocation_VariantPrimary :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.MethodInvocation_Variant
-methodInvocation_VariantPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodInvocation_VariantSuper :: Phantoms.TTerm Syntax.MethodInvocation_Variant
-methodInvocation_VariantSuper =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodInvocation_VariantType :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.MethodInvocation_Variant
-methodInvocation_VariantType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodInvocation_VariantTypeSuper :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.MethodInvocation_Variant
-methodInvocation_VariantTypeSuper x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodInvocation_Variant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeSuper"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodModifierAbstract :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.MethodModifier
-methodModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodModifierFinal :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierNative :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierNative =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "native"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierPrivate :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierProtected :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierProtected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierPublic :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierStatic :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierStrictfb :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierStrictfb =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strictfb"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodModifierSynchronized :: Phantoms.TTerm Syntax.MethodModifier
-methodModifierSynchronized =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "synchronized"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodName :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodName
-methodName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.MethodName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-methodReferenceArray :: Phantoms.TTerm Syntax.MethodReference_Array -> Phantoms.TTerm Syntax.MethodReference
-methodReferenceArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodReferenceExpression :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm Syntax.MethodReference
-methodReferenceExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodReferenceNew :: Phantoms.TTerm Syntax.MethodReference_New -> Phantoms.TTerm Syntax.MethodReference
-methodReferenceNew x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodReferencePrimary :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm Syntax.MethodReference
-methodReferencePrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodReferenceReferenceType :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm Syntax.MethodReference
-methodReferenceReferenceType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "referenceType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodReferenceSuper :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm Syntax.MethodReference
-methodReferenceSuper x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MethodReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodReference_Array :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.MethodReference_Array
-methodReference_Array x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.MethodReference_Array"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-methodReference_Expression :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_Expression
-methodReference_Expression name typeArguments identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-methodReference_ExpressionIdentifier :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm Syntax.Identifier
-methodReference_ExpressionIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_ExpressionName :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm Syntax.ExpressionName
-methodReference_ExpressionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_ExpressionTypeArguments :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm [Syntax.TypeArgument]
-methodReference_ExpressionTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_ExpressionWithIdentifier :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_Expression
-methodReference_ExpressionWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodReference_ExpressionWithName :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.MethodReference_Expression
-methodReference_ExpressionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_ExpressionWithTypeArguments :: Phantoms.TTerm Syntax.MethodReference_Expression -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodReference_Expression
-methodReference_ExpressionWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Expression"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_New :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodReference_New
-methodReference_New classType typeArguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "classType"),
-          Core.fieldTerm = (Phantoms.unTTerm classType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))
-
-methodReference_NewClassType :: Phantoms.TTerm Syntax.MethodReference_New -> Phantoms.TTerm Syntax.ClassType
-methodReference_NewClassType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-        Core.projectionField = (Core.Name "classType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_NewTypeArguments :: Phantoms.TTerm Syntax.MethodReference_New -> Phantoms.TTerm [Syntax.TypeArgument]
-methodReference_NewTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_NewWithClassType :: Phantoms.TTerm Syntax.MethodReference_New -> Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.MethodReference_New
-methodReference_NewWithClassType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "classType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_NewWithTypeArguments :: Phantoms.TTerm Syntax.MethodReference_New -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodReference_New
-methodReference_NewWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "classType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_New"),
-              Core.projectionField = (Core.Name "classType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodReference_Primary :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_Primary
-methodReference_Primary primary typeArguments identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-methodReference_PrimaryIdentifier :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm Syntax.Identifier
-methodReference_PrimaryIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_PrimaryPrimary :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm Syntax.Primary
-methodReference_PrimaryPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_PrimaryTypeArguments :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm [Syntax.TypeArgument]
-methodReference_PrimaryTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_PrimaryWithIdentifier :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_Primary
-methodReference_PrimaryWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodReference_PrimaryWithPrimary :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.MethodReference_Primary
-methodReference_PrimaryWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_PrimaryWithTypeArguments :: Phantoms.TTerm Syntax.MethodReference_Primary -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodReference_Primary
-methodReference_PrimaryWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Primary"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_ReferenceType :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_ReferenceType
-methodReference_ReferenceType referenceType typeArguments identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "referenceType"),
-          Core.fieldTerm = (Phantoms.unTTerm referenceType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-methodReference_ReferenceTypeIdentifier :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm Syntax.Identifier
-methodReference_ReferenceTypeIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_ReferenceTypeReferenceType :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm Syntax.ReferenceType
-methodReference_ReferenceTypeReferenceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-        Core.projectionField = (Core.Name "referenceType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_ReferenceTypeTypeArguments :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm [Syntax.TypeArgument]
-methodReference_ReferenceTypeTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_ReferenceTypeWithIdentifier :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_ReferenceType
-methodReference_ReferenceTypeWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "referenceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-              Core.projectionField = (Core.Name "referenceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodReference_ReferenceTypeWithReferenceType :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.MethodReference_ReferenceType
-methodReference_ReferenceTypeWithReferenceType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "referenceType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_ReferenceTypeWithTypeArguments :: Phantoms.TTerm Syntax.MethodReference_ReferenceType -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodReference_ReferenceType
-methodReference_ReferenceTypeWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "referenceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-              Core.projectionField = (Core.Name "referenceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_ReferenceType"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_Super :: Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodReference_Super
-methodReference_Super typeArguments identifier super =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "super"),
-          Core.fieldTerm = (Phantoms.unTTerm super)}]}))
-
-methodReference_SuperIdentifier :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm Syntax.Identifier
-methodReference_SuperIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_SuperSuper :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm Bool
-methodReference_SuperSuper x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-        Core.projectionField = (Core.Name "super")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_SuperTypeArguments :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm [Syntax.TypeArgument]
-methodReference_SuperTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodReference_SuperWithIdentifier :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.MethodReference_Super
-methodReference_SuperWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "super"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-              Core.projectionField = (Core.Name "super")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodReference_SuperWithSuper :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodReference_Super
-methodReference_SuperWithSuper original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "super"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodReference_SuperWithTypeArguments :: Phantoms.TTerm Syntax.MethodReference_Super -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.MethodReference_Super
-methodReference_SuperWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "super"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MethodReference_Super"),
-              Core.projectionField = (Core.Name "super")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-modularCompilationUnit :: Phantoms.TTerm [Syntax.ImportDeclaration] -> Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm Syntax.ModularCompilationUnit
-modularCompilationUnit imports module_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm module_)}]}))
-
-modularCompilationUnitImports :: Phantoms.TTerm Syntax.ModularCompilationUnit -> Phantoms.TTerm [Syntax.ImportDeclaration]
-modularCompilationUnitImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modularCompilationUnitModule :: Phantoms.TTerm Syntax.ModularCompilationUnit -> Phantoms.TTerm Syntax.ModuleDeclaration
-modularCompilationUnitModule x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-        Core.projectionField = (Core.Name "module")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modularCompilationUnitWithImports :: Phantoms.TTerm Syntax.ModularCompilationUnit -> Phantoms.TTerm [Syntax.ImportDeclaration] -> Phantoms.TTerm Syntax.ModularCompilationUnit
-modularCompilationUnitWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-modularCompilationUnitWithModule :: Phantoms.TTerm Syntax.ModularCompilationUnit -> Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm Syntax.ModularCompilationUnit
-modularCompilationUnitWithModule original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModularCompilationUnit"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleDeclaration :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm [[Syntax.ModuleDirective]] -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclaration annotations open identifiers directives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Phantoms.unTTerm open)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm identifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "directives"),
-          Core.fieldTerm = (Phantoms.unTTerm directives)}]}))
-
-moduleDeclarationAnnotations :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm [Syntax.Annotation]
-moduleDeclarationAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDeclarationDirectives :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm [[Syntax.ModuleDirective]]
-moduleDeclarationDirectives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-        Core.projectionField = (Core.Name "directives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDeclarationIdentifiers :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm [Syntax.Identifier]
-moduleDeclarationIdentifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-        Core.projectionField = (Core.Name "identifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDeclarationOpen :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm Bool
-moduleDeclarationOpen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-        Core.projectionField = (Core.Name "open")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDeclarationWithAnnotations :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclarationWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "open")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "identifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDeclarationWithDirectives :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm [[Syntax.ModuleDirective]] -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclarationWithDirectives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "open")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "identifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleDeclarationWithIdentifiers :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclarationWithIdentifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "open")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDeclarationWithOpen :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclarationWithOpen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "identifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "directives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDirectiveExports :: Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens -> Phantoms.TTerm Syntax.ModuleDirective
-moduleDirectiveExports x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exports"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleDirectiveOpens :: Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens -> Phantoms.TTerm Syntax.ModuleDirective
-moduleDirectiveOpens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "opens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleDirectiveProvides :: Phantoms.TTerm Syntax.ModuleDirective_Provides -> Phantoms.TTerm Syntax.ModuleDirective
-moduleDirectiveProvides x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "provides"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleDirectiveRequires :: Phantoms.TTerm Syntax.ModuleDirective_Requires -> Phantoms.TTerm Syntax.ModuleDirective
-moduleDirectiveRequires x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "requires"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleDirectiveUses :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.ModuleDirective
-moduleDirectiveUses x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uses"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleDirective_ExportsOrOpens :: Phantoms.TTerm Syntax.PackageName -> Phantoms.TTerm [Syntax.ModuleName] -> Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens
-moduleDirective_ExportsOrOpens package modules =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm modules)}]}))
-
-moduleDirective_ExportsOrOpensModules :: Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens -> Phantoms.TTerm [Syntax.ModuleName]
-moduleDirective_ExportsOrOpensModules x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-        Core.projectionField = (Core.Name "modules")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDirective_ExportsOrOpensPackage :: Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens -> Phantoms.TTerm Syntax.PackageName
-moduleDirective_ExportsOrOpensPackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDirective_ExportsOrOpensWithModules :: Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens -> Phantoms.TTerm [Syntax.ModuleName] -> Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens
-moduleDirective_ExportsOrOpensWithModules original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleDirective_ExportsOrOpensWithPackage :: Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens -> Phantoms.TTerm Syntax.PackageName -> Phantoms.TTerm Syntax.ModuleDirective_ExportsOrOpens
-moduleDirective_ExportsOrOpensWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDirective_Provides :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm [Syntax.TypeName] -> Phantoms.TTerm Syntax.ModuleDirective_Provides
-moduleDirective_Provides to with =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm to)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm with)}]}))
-
-moduleDirective_ProvidesTo :: Phantoms.TTerm Syntax.ModuleDirective_Provides -> Phantoms.TTerm Syntax.TypeName
-moduleDirective_ProvidesTo x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-        Core.projectionField = (Core.Name "to")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDirective_ProvidesWith :: Phantoms.TTerm Syntax.ModuleDirective_Provides -> Phantoms.TTerm [Syntax.TypeName]
-moduleDirective_ProvidesWith x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-        Core.projectionField = (Core.Name "with")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDirective_ProvidesWithTo :: Phantoms.TTerm Syntax.ModuleDirective_Provides -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.ModuleDirective_Provides
-moduleDirective_ProvidesWithTo original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-              Core.projectionField = (Core.Name "with")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDirective_ProvidesWithWith :: Phantoms.TTerm Syntax.ModuleDirective_Provides -> Phantoms.TTerm [Syntax.TypeName] -> Phantoms.TTerm Syntax.ModuleDirective_Provides
-moduleDirective_ProvidesWithWith original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Provides"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "with"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleDirective_Requires :: Phantoms.TTerm [Syntax.RequiresModifier] -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.ModuleDirective_Requires
-moduleDirective_Requires modifiers module_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm module_)}]}))
-
-moduleDirective_RequiresModifiers :: Phantoms.TTerm Syntax.ModuleDirective_Requires -> Phantoms.TTerm [Syntax.RequiresModifier]
-moduleDirective_RequiresModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDirective_RequiresModule :: Phantoms.TTerm Syntax.ModuleDirective_Requires -> Phantoms.TTerm Syntax.ModuleName
-moduleDirective_RequiresModule x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-        Core.projectionField = (Core.Name "module")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDirective_RequiresWithModifiers :: Phantoms.TTerm Syntax.ModuleDirective_Requires -> Phantoms.TTerm [Syntax.RequiresModifier] -> Phantoms.TTerm Syntax.ModuleDirective_Requires
-moduleDirective_RequiresWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleDirective_RequiresWithModule :: Phantoms.TTerm Syntax.ModuleDirective_Requires -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.ModuleDirective_Requires
-moduleDirective_RequiresWithModule original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleDirective_Requires"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleName :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.ModuleName) -> Phantoms.TTerm Syntax.ModuleName
-moduleName identifier name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-moduleNameIdentifier :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.Identifier
-moduleNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleNameName :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm (Maybe Syntax.ModuleName)
-moduleNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleNameWithIdentifier :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ModuleName
-moduleNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleNameWithName :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm (Maybe Syntax.ModuleName) -> Phantoms.TTerm Syntax.ModuleName
-moduleNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ModuleName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiplicativeExpressionDivide :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionDivide x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionMod :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionMod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionTimes :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionTimes x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpressionUnary :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiplicativeExpression_Binary :: Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression_Binary
-multiplicativeExpression_Binary lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-multiplicativeExpression_BinaryLhs :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression
-multiplicativeExpression_BinaryLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplicativeExpression_BinaryRhs :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.UnaryExpression
-multiplicativeExpression_BinaryRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiplicativeExpression_BinaryWithLhs :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.MultiplicativeExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression_Binary
-multiplicativeExpression_BinaryWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiplicativeExpression_BinaryWithRhs :: Phantoms.TTerm Syntax.MultiplicativeExpression_Binary -> Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.MultiplicativeExpression_Binary
-multiplicativeExpression_BinaryWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalAnnotation :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm [Syntax.ElementValuePair] -> Phantoms.TTerm Syntax.NormalAnnotation
-normalAnnotation typeName pairs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pairs"),
-          Core.fieldTerm = (Phantoms.unTTerm pairs)}]}))
-
-normalAnnotationPairs :: Phantoms.TTerm Syntax.NormalAnnotation -> Phantoms.TTerm [Syntax.ElementValuePair]
-normalAnnotationPairs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-        Core.projectionField = (Core.Name "pairs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalAnnotationTypeName :: Phantoms.TTerm Syntax.NormalAnnotation -> Phantoms.TTerm Syntax.TypeName
-normalAnnotationTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalAnnotationWithPairs :: Phantoms.TTerm Syntax.NormalAnnotation -> Phantoms.TTerm [Syntax.ElementValuePair] -> Phantoms.TTerm Syntax.NormalAnnotation
-normalAnnotationWithPairs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pairs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalAnnotationWithTypeName :: Phantoms.TTerm Syntax.NormalAnnotation -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.NormalAnnotation
-normalAnnotationWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pairs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalAnnotation"),
-              Core.projectionField = (Core.Name "pairs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalClassDeclaration :: Phantoms.TTerm [Syntax.ClassModifier] -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm (Maybe Syntax.ClassType) -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclaration modifiers identifier parameters extends implements body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Phantoms.unTTerm extends)},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Phantoms.unTTerm implements)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-normalClassDeclarationBody :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm Syntax.ClassBody
-normalClassDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalClassDeclarationExtends :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm (Maybe Syntax.ClassType)
-normalClassDeclarationExtends x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-        Core.projectionField = (Core.Name "extends")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalClassDeclarationIdentifier :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier
-normalClassDeclarationIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalClassDeclarationImplements :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm [Syntax.InterfaceType]
-normalClassDeclarationImplements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-        Core.projectionField = (Core.Name "implements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalClassDeclarationModifiers :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm [Syntax.ClassModifier]
-normalClassDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalClassDeclarationParameters :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm [Syntax.TypeParameter]
-normalClassDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalClassDeclarationWithBody :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalClassDeclarationWithExtends :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm (Maybe Syntax.ClassType) -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclarationWithExtends original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalClassDeclarationWithIdentifier :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclarationWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalClassDeclarationWithImplements :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclarationWithImplements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalClassDeclarationWithModifiers :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm [Syntax.ClassModifier] -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalClassDeclarationWithParameters :: Phantoms.TTerm Syntax.NormalClassDeclaration -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.NormalClassDeclaration
-normalClassDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "implements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "implements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalInterfaceDeclaration :: Phantoms.TTerm [Syntax.InterfaceModifier] -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.InterfaceBody -> Phantoms.TTerm Syntax.NormalInterfaceDeclaration
-normalInterfaceDeclaration modifiers identifier parameters extends body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Phantoms.unTTerm extends)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-normalInterfaceDeclarationBody :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm Syntax.InterfaceBody
-normalInterfaceDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalInterfaceDeclarationExtends :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceType]
-normalInterfaceDeclarationExtends x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-        Core.projectionField = (Core.Name "extends")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalInterfaceDeclarationIdentifier :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier
-normalInterfaceDeclarationIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalInterfaceDeclarationModifiers :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceModifier]
-normalInterfaceDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalInterfaceDeclarationParameters :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm [Syntax.TypeParameter]
-normalInterfaceDeclarationParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalInterfaceDeclarationWithBody :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm Syntax.InterfaceBody -> Phantoms.TTerm Syntax.NormalInterfaceDeclaration
-normalInterfaceDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalInterfaceDeclarationWithExtends :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceType] -> Phantoms.TTerm Syntax.NormalInterfaceDeclaration
-normalInterfaceDeclarationWithExtends original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalInterfaceDeclarationWithIdentifier :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.NormalInterfaceDeclaration
-normalInterfaceDeclarationWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalInterfaceDeclarationWithModifiers :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm [Syntax.InterfaceModifier] -> Phantoms.TTerm Syntax.NormalInterfaceDeclaration
-normalInterfaceDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalInterfaceDeclarationWithParameters :: Phantoms.TTerm Syntax.NormalInterfaceDeclaration -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.NormalInterfaceDeclaration
-normalInterfaceDeclarationWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "extends"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "extends")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericTypeArrayArray :: Phantoms.TTerm Syntax.NumericTypeArray -> Phantoms.TTerm Syntax.NumericTypeArray
-numericTypeArrayArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.NumericTypeArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeArraySimple :: Phantoms.TTerm Syntax.NumericType -> Phantoms.TTerm Syntax.NumericTypeArray
-numericTypeArraySimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.NumericTypeArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeFloatingPoint :: Phantoms.TTerm Syntax.FloatingPointType -> Phantoms.TTerm Syntax.NumericType
-numericTypeFloatingPoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floatingPoint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeIntegral :: Phantoms.TTerm Syntax.IntegralType -> Phantoms.TTerm Syntax.NumericType
-numericTypeIntegral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ordinaryCompilationUnit :: Phantoms.TTerm (Maybe Syntax.PackageDeclaration) -> Phantoms.TTerm [Syntax.ImportDeclaration] -> Phantoms.TTerm [Syntax.TypeDeclarationWithComments] -> Phantoms.TTerm Syntax.OrdinaryCompilationUnit
-ordinaryCompilationUnit package imports types =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)}]}))
-
-ordinaryCompilationUnitImports :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm [Syntax.ImportDeclaration]
-ordinaryCompilationUnitImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ordinaryCompilationUnitPackage :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm (Maybe Syntax.PackageDeclaration)
-ordinaryCompilationUnitPackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ordinaryCompilationUnitTypes :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm [Syntax.TypeDeclarationWithComments]
-ordinaryCompilationUnitTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ordinaryCompilationUnitWithImports :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm [Syntax.ImportDeclaration] -> Phantoms.TTerm Syntax.OrdinaryCompilationUnit
-ordinaryCompilationUnitWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ordinaryCompilationUnitWithPackage :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm (Maybe Syntax.PackageDeclaration) -> Phantoms.TTerm Syntax.OrdinaryCompilationUnit
-ordinaryCompilationUnitWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ordinaryCompilationUnitWithTypes :: Phantoms.TTerm Syntax.OrdinaryCompilationUnit -> Phantoms.TTerm [Syntax.TypeDeclarationWithComments] -> Phantoms.TTerm Syntax.OrdinaryCompilationUnit
-ordinaryCompilationUnitWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-packageDeclaration :: Phantoms.TTerm [Syntax.PackageModifier] -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.PackageDeclaration
-packageDeclaration modifiers identifiers =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm identifiers)}]}))
-
-packageDeclarationIdentifiers :: Phantoms.TTerm Syntax.PackageDeclaration -> Phantoms.TTerm [Syntax.Identifier]
-packageDeclarationIdentifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-        Core.projectionField = (Core.Name "identifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageDeclarationModifiers :: Phantoms.TTerm Syntax.PackageDeclaration -> Phantoms.TTerm [Syntax.PackageModifier]
-packageDeclarationModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageDeclarationWithIdentifiers :: Phantoms.TTerm Syntax.PackageDeclaration -> Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.PackageDeclaration
-packageDeclarationWithIdentifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-packageDeclarationWithModifiers :: Phantoms.TTerm Syntax.PackageDeclaration -> Phantoms.TTerm [Syntax.PackageModifier] -> Phantoms.TTerm Syntax.PackageDeclaration
-packageDeclarationWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.PackageDeclaration"),
-              Core.projectionField = (Core.Name "identifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-packageModifier :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.PackageModifier
-packageModifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PackageModifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-packageName :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.PackageName
-packageName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PackageName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-packageOrTypeName :: Phantoms.TTerm [Syntax.Identifier] -> Phantoms.TTerm Syntax.PackageOrTypeName
-packageOrTypeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PackageOrTypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-postDecrementExpression :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.PostDecrementExpression
-postDecrementExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PostDecrementExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-postIncrementExpression :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.PostIncrementExpression
-postIncrementExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PostIncrementExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-postfixExpressionName :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPostDecrement :: Phantoms.TTerm Syntax.PostDecrementExpression -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPostDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPostIncrement :: Phantoms.TTerm Syntax.PostIncrementExpression -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPostIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-postfixExpressionPrimary :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.PostfixExpression
-postfixExpressionPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PostfixExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-preDecrementExpression :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.PreDecrementExpression
-preDecrementExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PreDecrementExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-preIncrementExpression :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.PreIncrementExpression
-preIncrementExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.PreIncrementExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-primaryArrayCreation :: Phantoms.TTerm Syntax.ArrayCreationExpression -> Phantoms.TTerm Syntax.Primary
-primaryArrayCreation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Primary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrayCreation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArray :: Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression -> Phantoms.TTerm Syntax.Primary
-primaryNoNewArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Primary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noNewArray"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionArrayAccess :: Phantoms.TTerm Syntax.ArrayAccess -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionArrayAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrayAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionClassInstance :: Phantoms.TTerm Syntax.ClassInstanceCreationExpression -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionClassInstance x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classInstance"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionClassLiteral :: Phantoms.TTerm Syntax.ClassLiteral -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionClassLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classLiteral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionDotThis :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionDotThis x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dotThis"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionFieldAccess :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionFieldAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fieldAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionMethodInvocation :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionMethodInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "methodInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionMethodReference :: Phantoms.TTerm Syntax.MethodReference -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionMethodReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "methodReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionParens :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryNoNewArrayExpressionThis :: Phantoms.TTerm Syntax.PrimaryNoNewArrayExpression
-primaryNoNewArrayExpressionThis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeBoolean :: Phantoms.TTerm Syntax.PrimitiveType
-primitiveTypeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeNumeric :: Phantoms.TTerm Syntax.NumericType -> Phantoms.TTerm Syntax.PrimitiveType
-primitiveTypeNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveTypeWithAnnotations :: Phantoms.TTerm Syntax.PrimitiveType -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations
-primitiveTypeWithAnnotations type_ annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-primitiveTypeWithAnnotationsAnnotations :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm [Syntax.Annotation]
-primitiveTypeWithAnnotationsAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-primitiveTypeWithAnnotationsType :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.PrimitiveType
-primitiveTypeWithAnnotationsType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-primitiveTypeWithAnnotationsWithAnnotations :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations
-primitiveTypeWithAnnotationsWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-primitiveTypeWithAnnotationsWithType :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.PrimitiveType -> Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations
-primitiveTypeWithAnnotationsWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-receiverParameter :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ReceiverParameter
-receiverParameter annotations unannType identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Phantoms.unTTerm unannType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-receiverParameterAnnotations :: Phantoms.TTerm Syntax.ReceiverParameter -> Phantoms.TTerm [Syntax.Annotation]
-receiverParameterAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiverParameterIdentifier :: Phantoms.TTerm Syntax.ReceiverParameter -> Phantoms.TTerm (Maybe Syntax.Identifier)
-receiverParameterIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiverParameterUnannType :: Phantoms.TTerm Syntax.ReceiverParameter -> Phantoms.TTerm Syntax.UnannType
-receiverParameterUnannType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-        Core.projectionField = (Core.Name "unannType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-receiverParameterWithAnnotations :: Phantoms.TTerm Syntax.ReceiverParameter -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.ReceiverParameter
-receiverParameterWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-              Core.projectionField = (Core.Name "unannType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-receiverParameterWithIdentifier :: Phantoms.TTerm Syntax.ReceiverParameter -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ReceiverParameter
-receiverParameterWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-              Core.projectionField = (Core.Name "unannType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-receiverParameterWithUnannType :: Phantoms.TTerm Syntax.ReceiverParameter -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.ReceiverParameter
-receiverParameterWithUnannType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unannType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ReceiverParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-referenceTypeArray :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceTypeClassOrInterface :: Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeClassOrInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classOrInterface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceTypeVariable :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ReferenceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionGreaterThan :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThan -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionGreaterThan x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionGreaterThanEqual :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionGreaterThanEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionInstanceof :: Phantoms.TTerm Syntax.RelationalExpression_InstanceOf -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionInstanceof x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "instanceof"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionLessThan :: Phantoms.TTerm Syntax.RelationalExpression_LessThan -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionLessThan x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionLessThanEqual :: Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionLessThanEqual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanEqual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpressionSimple :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationalExpression_GreaterThan :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_GreaterThan
-relationalExpression_GreaterThan lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-relationalExpression_GreaterThanEqual :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual
-relationalExpression_GreaterThanEqual lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-relationalExpression_GreaterThanEqualLhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpression_GreaterThanEqualLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_GreaterThanEqualRhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual -> Phantoms.TTerm Syntax.ShiftExpression
-relationalExpression_GreaterThanEqualRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_GreaterThanEqualWithLhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual
-relationalExpression_GreaterThanEqualWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpression_GreaterThanEqualWithRhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_GreaterThanEqual
-relationalExpression_GreaterThanEqualWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationalExpression_GreaterThanLhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThan -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpression_GreaterThanLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_GreaterThanRhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThan -> Phantoms.TTerm Syntax.ShiftExpression
-relationalExpression_GreaterThanRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_GreaterThanWithLhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThan -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression_GreaterThan
-relationalExpression_GreaterThanWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpression_GreaterThanWithRhs :: Phantoms.TTerm Syntax.RelationalExpression_GreaterThan -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_GreaterThan
-relationalExpression_GreaterThanWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationalExpression_InstanceOf :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.RelationalExpression_InstanceOf
-relationalExpression_InstanceOf lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-relationalExpression_InstanceOfLhs :: Phantoms.TTerm Syntax.RelationalExpression_InstanceOf -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpression_InstanceOfLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_InstanceOfRhs :: Phantoms.TTerm Syntax.RelationalExpression_InstanceOf -> Phantoms.TTerm Syntax.ReferenceType
-relationalExpression_InstanceOfRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_InstanceOfWithLhs :: Phantoms.TTerm Syntax.RelationalExpression_InstanceOf -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression_InstanceOf
-relationalExpression_InstanceOfWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpression_InstanceOfWithRhs :: Phantoms.TTerm Syntax.RelationalExpression_InstanceOf -> Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.RelationalExpression_InstanceOf
-relationalExpression_InstanceOfWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationalExpression_LessThan :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_LessThan
-relationalExpression_LessThan lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-relationalExpression_LessThanEqual :: Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual
-relationalExpression_LessThanEqual lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-relationalExpression_LessThanEqualLhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpression_LessThanEqualLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_LessThanEqualRhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual -> Phantoms.TTerm Syntax.ShiftExpression
-relationalExpression_LessThanEqualRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_LessThanEqualWithLhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual
-relationalExpression_LessThanEqualWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpression_LessThanEqualWithRhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_LessThanEqual
-relationalExpression_LessThanEqualWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relationalExpression_LessThanLhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThan -> Phantoms.TTerm Syntax.RelationalExpression
-relationalExpression_LessThanLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_LessThanRhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThan -> Phantoms.TTerm Syntax.ShiftExpression
-relationalExpression_LessThanRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relationalExpression_LessThanWithLhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThan -> Phantoms.TTerm Syntax.RelationalExpression -> Phantoms.TTerm Syntax.RelationalExpression_LessThan
-relationalExpression_LessThanWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relationalExpression_LessThanWithRhs :: Phantoms.TTerm Syntax.RelationalExpression_LessThan -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.RelationalExpression_LessThan
-relationalExpression_LessThanWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.RelationalExpression_LessThan"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-requiresModifierStatic :: Phantoms.TTerm Syntax.RequiresModifier
-requiresModifierStatic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RequiresModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-requiresModifierTransitive :: Phantoms.TTerm Syntax.RequiresModifier
-requiresModifierTransitive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.RequiresModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "transitive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-resourceLocal :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.Resource
-resourceLocal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Resource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "local"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-resourceSpecification :: Phantoms.TTerm [Syntax.Resource] -> Phantoms.TTerm Syntax.ResourceSpecification
-resourceSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ResourceSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-resourceVariable :: Phantoms.TTerm Syntax.VariableAccess -> Phantoms.TTerm Syntax.Resource
-resourceVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Resource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-resource_Local :: Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Resource_Local
-resource_Local modifiers type_ identifier expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-resource_LocalExpression :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.Expression
-resource_LocalExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-resource_LocalIdentifier :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.Identifier
-resource_LocalIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-resource_LocalModifiers :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm [Syntax.VariableModifier]
-resource_LocalModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-resource_LocalType :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.LocalVariableType
-resource_LocalType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-resource_LocalWithExpression :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Resource_Local
-resource_LocalWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-resource_LocalWithIdentifier :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Resource_Local
-resource_LocalWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-resource_LocalWithModifiers :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm [Syntax.VariableModifier] -> Phantoms.TTerm Syntax.Resource_Local
-resource_LocalWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-resource_LocalWithType :: Phantoms.TTerm Syntax.Resource_Local -> Phantoms.TTerm Syntax.LocalVariableType -> Phantoms.TTerm Syntax.Resource_Local
-resource_LocalWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Resource_Local"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-resultType :: Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.Result
-resultType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Result"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-resultVoid :: Phantoms.TTerm Syntax.Result
-resultVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Result"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-returnStatement :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ReturnStatement
-returnStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ReturnStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-shiftExpressionShiftLeft :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionShiftLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shiftLeft"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionShiftRight :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionShiftRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shiftRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionShiftRightZeroFill :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionShiftRightZeroFill x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shiftRightZeroFill"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpressionUnary :: Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shiftExpression_Binary :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.ShiftExpression_Binary
-shiftExpression_Binary lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-shiftExpression_BinaryLhs :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpression_BinaryLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shiftExpression_BinaryRhs :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.AdditiveExpression
-shiftExpression_BinaryRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shiftExpression_BinaryWithLhs :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.ShiftExpression_Binary
-shiftExpression_BinaryWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shiftExpression_BinaryWithRhs :: Phantoms.TTerm Syntax.ShiftExpression_Binary -> Phantoms.TTerm Syntax.AdditiveExpression -> Phantoms.TTerm Syntax.ShiftExpression_Binary
-shiftExpression_BinaryWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.ShiftExpression_Binary"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleTypeName :: Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.SimpleTypeName
-simpleTypeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.SimpleTypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-singleElementAnnotation :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm (Maybe Syntax.ElementValue) -> Phantoms.TTerm Syntax.SingleElementAnnotation
-singleElementAnnotation name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SingleElementAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-singleElementAnnotationName :: Phantoms.TTerm Syntax.SingleElementAnnotation -> Phantoms.TTerm Syntax.TypeName
-singleElementAnnotationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleElementAnnotation"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singleElementAnnotationValue :: Phantoms.TTerm Syntax.SingleElementAnnotation -> Phantoms.TTerm (Maybe Syntax.ElementValue)
-singleElementAnnotationValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleElementAnnotation"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singleElementAnnotationWithName :: Phantoms.TTerm Syntax.SingleElementAnnotation -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.SingleElementAnnotation
-singleElementAnnotationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SingleElementAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.java.syntax.SingleElementAnnotation"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-singleElementAnnotationWithValue :: Phantoms.TTerm Syntax.SingleElementAnnotation -> Phantoms.TTerm (Maybe Syntax.ElementValue) -> Phantoms.TTerm Syntax.SingleElementAnnotation
-singleElementAnnotationWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SingleElementAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleElementAnnotation"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-singleStaticImportDeclaration :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.SingleStaticImportDeclaration
-singleStaticImportDeclaration typeName identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-singleStaticImportDeclarationIdentifier :: Phantoms.TTerm Syntax.SingleStaticImportDeclaration -> Phantoms.TTerm Syntax.Identifier
-singleStaticImportDeclarationIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singleStaticImportDeclarationTypeName :: Phantoms.TTerm Syntax.SingleStaticImportDeclaration -> Phantoms.TTerm Syntax.TypeName
-singleStaticImportDeclarationTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singleStaticImportDeclarationWithIdentifier :: Phantoms.TTerm Syntax.SingleStaticImportDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.SingleStaticImportDeclaration
-singleStaticImportDeclarationWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-singleStaticImportDeclarationWithTypeName :: Phantoms.TTerm Syntax.SingleStaticImportDeclaration -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.SingleStaticImportDeclaration
-singleStaticImportDeclarationWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-singleTypeImportDeclaration :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.SingleTypeImportDeclaration
-singleTypeImportDeclaration x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.SingleTypeImportDeclaration"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-statementExpressionAssignment :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionClassInstanceCreation :: Phantoms.TTerm Syntax.ClassInstanceCreationExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionClassInstanceCreation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classInstanceCreation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionMethodInvocation :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionMethodInvocation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "methodInvocation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPostDecrement :: Phantoms.TTerm Syntax.PostDecrementExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPostDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPostIncrement :: Phantoms.TTerm Syntax.PostIncrementExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPostIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPreDecrement :: Phantoms.TTerm Syntax.PreDecrementExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPreDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementExpressionPreIncrement :: Phantoms.TTerm Syntax.PreIncrementExpression -> Phantoms.TTerm Syntax.StatementExpression
-statementExpressionPreIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementFor :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Statement
-statementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementIfThen :: Phantoms.TTerm Syntax.IfThenStatement -> Phantoms.TTerm Syntax.Statement
-statementIfThen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ifThen"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementIfThenElse :: Phantoms.TTerm Syntax.IfThenElseStatement -> Phantoms.TTerm Syntax.Statement
-statementIfThenElse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ifThenElse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLabeled :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-statementLabeled x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeled"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementNoShortIfFor :: Phantoms.TTerm Syntax.ForStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-statementNoShortIfFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementNoShortIfIfThenElse :: Phantoms.TTerm Syntax.IfThenElseStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-statementNoShortIfIfThenElse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ifThenElse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementNoShortIfLabeled :: Phantoms.TTerm Syntax.LabeledStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-statementNoShortIfLabeled x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeled"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementNoShortIfWhile :: Phantoms.TTerm Syntax.WhileStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-statementNoShortIfWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementNoShortIfWithoutTrailing :: Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement -> Phantoms.TTerm Syntax.StatementNoShortIf
-statementNoShortIfWithoutTrailing x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementNoShortIf"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withoutTrailing"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWhile :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement
-statementWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailing :: Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement -> Phantoms.TTerm Syntax.Statement
-statementWithoutTrailing x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withoutTrailing"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementAssert :: Phantoms.TTerm Syntax.AssertStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementAssert x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assert"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementBreak :: Phantoms.TTerm Syntax.BreakStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementBreak x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementContinue :: Phantoms.TTerm Syntax.ContinueStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementContinue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementDo :: Phantoms.TTerm Syntax.DoStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementDo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "do"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementEmpty :: Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-statementWithoutTrailingSubstatementExpression :: Phantoms.TTerm Syntax.ExpressionStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementReturn :: Phantoms.TTerm Syntax.ReturnStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementSwitch :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementSwitch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "switch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementSynchronized :: Phantoms.TTerm Syntax.SynchronizedStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementSynchronized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "synchronized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementThrow :: Phantoms.TTerm Syntax.ThrowStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementThrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "throw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithoutTrailingSubstatementTry :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.StatementWithoutTrailingSubstatement
-statementWithoutTrailingSubstatementTry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "try"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-staticImportOnDemandDeclaration :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.StaticImportOnDemandDeclaration
-staticImportOnDemandDeclaration x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.StaticImportOnDemandDeclaration"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-staticInitializer :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.StaticInitializer
-staticInitializer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.StaticInitializer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteral
-stringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.StringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-switchBlock :: Phantoms.TTerm [Syntax.SwitchBlock_Pair] -> Phantoms.TTerm Syntax.SwitchBlock
-switchBlock x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.SwitchBlock"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-switchBlockStatementGroup :: Phantoms.TTerm [Syntax.SwitchLabel] -> Phantoms.TTerm [Syntax.BlockStatement] -> Phantoms.TTerm Syntax.SwitchBlockStatementGroup
-switchBlockStatementGroup labels statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-switchBlockStatementGroupLabels :: Phantoms.TTerm Syntax.SwitchBlockStatementGroup -> Phantoms.TTerm [Syntax.SwitchLabel]
-switchBlockStatementGroupLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchBlockStatementGroupStatements :: Phantoms.TTerm Syntax.SwitchBlockStatementGroup -> Phantoms.TTerm [Syntax.BlockStatement]
-switchBlockStatementGroupStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchBlockStatementGroupWithLabels :: Phantoms.TTerm Syntax.SwitchBlockStatementGroup -> Phantoms.TTerm [Syntax.SwitchLabel] -> Phantoms.TTerm Syntax.SwitchBlockStatementGroup
-switchBlockStatementGroupWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-switchBlockStatementGroupWithStatements :: Phantoms.TTerm Syntax.SwitchBlockStatementGroup -> Phantoms.TTerm [Syntax.BlockStatement] -> Phantoms.TTerm Syntax.SwitchBlockStatementGroup
-switchBlockStatementGroupWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchBlock_Pair :: Phantoms.TTerm [Syntax.SwitchBlockStatementGroup] -> Phantoms.TTerm [Syntax.SwitchLabel] -> Phantoms.TTerm Syntax.SwitchBlock_Pair
-switchBlock_Pair statements labels =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)}]}))
-
-switchBlock_PairLabels :: Phantoms.TTerm Syntax.SwitchBlock_Pair -> Phantoms.TTerm [Syntax.SwitchLabel]
-switchBlock_PairLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchBlock_PairStatements :: Phantoms.TTerm Syntax.SwitchBlock_Pair -> Phantoms.TTerm [Syntax.SwitchBlockStatementGroup]
-switchBlock_PairStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchBlock_PairWithLabels :: Phantoms.TTerm Syntax.SwitchBlock_Pair -> Phantoms.TTerm [Syntax.SwitchLabel] -> Phantoms.TTerm Syntax.SwitchBlock_Pair
-switchBlock_PairWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchBlock_PairWithStatements :: Phantoms.TTerm Syntax.SwitchBlock_Pair -> Phantoms.TTerm [Syntax.SwitchBlockStatementGroup] -> Phantoms.TTerm Syntax.SwitchBlock_Pair
-switchBlock_PairWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchBlock_Pair"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-switchLabelConstant :: Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.SwitchLabel
-switchLabelConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.SwitchLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-switchLabelDefault :: Phantoms.TTerm Syntax.SwitchLabel
-switchLabelDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.SwitchLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-switchLabelEnumConstant :: Phantoms.TTerm Syntax.EnumConstantName -> Phantoms.TTerm Syntax.SwitchLabel
-switchLabelEnumConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.SwitchLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enumConstant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-switchStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SwitchBlock -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatement cond block =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)}]}))
-
-switchStatementBlock :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.SwitchBlock
-switchStatementBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementCond :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression
-switchStatementCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementWithBlock :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.SwitchBlock -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchStatementWithCond :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-synchronizedStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.SynchronizedStatement
-synchronizedStatement expression block =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)}]}))
-
-synchronizedStatementBlock :: Phantoms.TTerm Syntax.SynchronizedStatement -> Phantoms.TTerm Syntax.Block
-synchronizedStatementBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-synchronizedStatementExpression :: Phantoms.TTerm Syntax.SynchronizedStatement -> Phantoms.TTerm Syntax.Expression
-synchronizedStatementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-synchronizedStatementWithBlock :: Phantoms.TTerm Syntax.SynchronizedStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.SynchronizedStatement
-synchronizedStatementWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-synchronizedStatementWithExpression :: Phantoms.TTerm Syntax.SynchronizedStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SynchronizedStatement
-synchronizedStatementWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.SynchronizedStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-throwStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ThrowStatement
-throwStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.ThrowStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-throws :: Phantoms.TTerm [Syntax.ExceptionType] -> Phantoms.TTerm Syntax.Throws
-throws x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.Throws"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tryStatementSimple :: Phantoms.TTerm Syntax.TryStatement_Simple -> Phantoms.TTerm Syntax.TryStatement
-tryStatementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tryStatementWithFinally :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithFinally x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withFinally"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tryStatementWithResources :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithResources x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withResources"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tryStatement_Simple :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.Catches -> Phantoms.TTerm Syntax.TryStatement_Simple
-tryStatement_Simple block catches =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm catches)}]}))
-
-tryStatement_SimpleBlock :: Phantoms.TTerm Syntax.TryStatement_Simple -> Phantoms.TTerm Syntax.Block
-tryStatement_SimpleBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatement_SimpleCatches :: Phantoms.TTerm Syntax.TryStatement_Simple -> Phantoms.TTerm Syntax.Catches
-tryStatement_SimpleCatches x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-        Core.projectionField = (Core.Name "catches")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatement_SimpleWithBlock :: Phantoms.TTerm Syntax.TryStatement_Simple -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryStatement_Simple
-tryStatement_SimpleWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatement_SimpleWithCatches :: Phantoms.TTerm Syntax.TryStatement_Simple -> Phantoms.TTerm Syntax.Catches -> Phantoms.TTerm Syntax.TryStatement_Simple
-tryStatement_SimpleWithCatches original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_Simple"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryStatement_WithFinally :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Catches) -> Phantoms.TTerm Syntax.Finally -> Phantoms.TTerm Syntax.TryStatement_WithFinally
-tryStatement_WithFinally block catches finally =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm catches)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm finally)}]}))
-
-tryStatement_WithFinallyBlock :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm Syntax.Block
-tryStatement_WithFinallyBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatement_WithFinallyCatches :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm (Maybe Syntax.Catches)
-tryStatement_WithFinallyCatches x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-        Core.projectionField = (Core.Name "catches")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatement_WithFinallyFinally :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm Syntax.Finally
-tryStatement_WithFinallyFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-        Core.projectionField = (Core.Name "finally")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatement_WithFinallyWithBlock :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryStatement_WithFinally
-tryStatement_WithFinallyWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatement_WithFinallyWithCatches :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm (Maybe Syntax.Catches) -> Phantoms.TTerm Syntax.TryStatement_WithFinally
-tryStatement_WithFinallyWithCatches original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatement_WithFinallyWithFinally :: Phantoms.TTerm Syntax.TryStatement_WithFinally -> Phantoms.TTerm Syntax.Finally -> Phantoms.TTerm Syntax.TryStatement_WithFinally
-tryStatement_WithFinallyWithFinally original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryStatement_WithFinally"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryWithResourcesStatement :: Phantoms.TTerm Syntax.ResourceSpecification -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Catches) -> Phantoms.TTerm (Maybe Syntax.Finally) -> Phantoms.TTerm Syntax.TryWithResourcesStatement
-tryWithResourcesStatement resourceSpecification block catches finally =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "resourceSpecification"),
-          Core.fieldTerm = (Phantoms.unTTerm resourceSpecification)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm catches)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm finally)}]}))
-
-tryWithResourcesStatementBlock :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm Syntax.Block
-tryWithResourcesStatementBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryWithResourcesStatementCatches :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm (Maybe Syntax.Catches)
-tryWithResourcesStatementCatches x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-        Core.projectionField = (Core.Name "catches")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryWithResourcesStatementFinally :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm (Maybe Syntax.Finally)
-tryWithResourcesStatementFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-        Core.projectionField = (Core.Name "finally")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryWithResourcesStatementResourceSpecification :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm Syntax.ResourceSpecification
-tryWithResourcesStatementResourceSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-        Core.projectionField = (Core.Name "resourceSpecification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryWithResourcesStatementWithBlock :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryWithResourcesStatement
-tryWithResourcesStatementWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "resourceSpecification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "resourceSpecification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryWithResourcesStatementWithCatches :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm (Maybe Syntax.Catches) -> Phantoms.TTerm Syntax.TryWithResourcesStatement
-tryWithResourcesStatementWithCatches original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "resourceSpecification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "resourceSpecification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryWithResourcesStatementWithFinally :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm (Maybe Syntax.Finally) -> Phantoms.TTerm Syntax.TryWithResourcesStatement
-tryWithResourcesStatementWithFinally original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "resourceSpecification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "resourceSpecification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryWithResourcesStatementWithResourceSpecification :: Phantoms.TTerm Syntax.TryWithResourcesStatement -> Phantoms.TTerm Syntax.ResourceSpecification -> Phantoms.TTerm Syntax.TryWithResourcesStatement
-tryWithResourcesStatementWithResourceSpecification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "resourceSpecification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catches"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "catches")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TryWithResourcesStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeArgumentReference :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.TypeArgument
-typeArgumentReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeArgumentWildcard :: Phantoms.TTerm Syntax.Wildcard -> Phantoms.TTerm Syntax.TypeArgument
-typeArgumentWildcard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeArgumentsOrDiamondArguments :: Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.TypeArgumentsOrDiamond
-typeArgumentsOrDiamondArguments x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeArgumentsOrDiamond"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arguments"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeArgumentsOrDiamondDiamond :: Phantoms.TTerm Syntax.TypeArgumentsOrDiamond
-typeArgumentsOrDiamondDiamond =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeArgumentsOrDiamond"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "diamond"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeBoundClassOrInterface :: Phantoms.TTerm Syntax.TypeBound_ClassOrInterface -> Phantoms.TTerm Syntax.TypeBound
-typeBoundClassOrInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeBound"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classOrInterface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeBoundVariable :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm Syntax.TypeBound
-typeBoundVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeBound"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeBound_ClassOrInterface :: Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm [Syntax.AdditionalBound] -> Phantoms.TTerm Syntax.TypeBound_ClassOrInterface
-typeBound_ClassOrInterface type_ additional =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "additional"),
-          Core.fieldTerm = (Phantoms.unTTerm additional)}]}))
-
-typeBound_ClassOrInterfaceAdditional :: Phantoms.TTerm Syntax.TypeBound_ClassOrInterface -> Phantoms.TTerm [Syntax.AdditionalBound]
-typeBound_ClassOrInterfaceAdditional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-        Core.projectionField = (Core.Name "additional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBound_ClassOrInterfaceType :: Phantoms.TTerm Syntax.TypeBound_ClassOrInterface -> Phantoms.TTerm Syntax.ClassOrInterfaceType
-typeBound_ClassOrInterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBound_ClassOrInterfaceWithAdditional :: Phantoms.TTerm Syntax.TypeBound_ClassOrInterface -> Phantoms.TTerm [Syntax.AdditionalBound] -> Phantoms.TTerm Syntax.TypeBound_ClassOrInterface
-typeBound_ClassOrInterfaceWithAdditional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "additional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeBound_ClassOrInterfaceWithType :: Phantoms.TTerm Syntax.TypeBound_ClassOrInterface -> Phantoms.TTerm Syntax.ClassOrInterfaceType -> Phantoms.TTerm Syntax.TypeBound_ClassOrInterface
-typeBound_ClassOrInterfaceWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "additional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"),
-              Core.projectionField = (Core.Name "additional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeDeclarationClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDeclarationInterface :: Phantoms.TTerm Syntax.InterfaceDeclaration -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationInterface x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interface"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeDeclarationNone :: Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeDeclarationWithComments :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TypeDeclarationWithComments
-typeDeclarationWithComments value comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-
-typeDeclarationWithCommentsComments :: Phantoms.TTerm Syntax.TypeDeclarationWithComments -> Phantoms.TTerm (Maybe String)
-typeDeclarationWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeDeclarationWithCommentsValue :: Phantoms.TTerm Syntax.TypeDeclarationWithComments -> Phantoms.TTerm Syntax.TypeDeclaration
-typeDeclarationWithCommentsValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeDeclarationWithCommentsWithComments :: Phantoms.TTerm Syntax.TypeDeclarationWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TypeDeclarationWithComments
-typeDeclarationWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeDeclarationWithCommentsWithValue :: Phantoms.TTerm Syntax.TypeDeclarationWithComments -> Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.TypeDeclarationWithComments
-typeDeclarationWithCommentsWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeDeclarationWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.TypeIdentifier
-typeIdentifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.TypeIdentifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeImportOnDemandDeclaration :: Phantoms.TTerm Syntax.PackageOrTypeName -> Phantoms.TTerm Syntax.TypeImportOnDemandDeclaration
-typeImportOnDemandDeclaration x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.TypeImportOnDemandDeclaration"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeName :: Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm (Maybe Syntax.PackageOrTypeName) -> Phantoms.TTerm Syntax.TypeName
-typeName identifier qualifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)}]}))
-
-typeNameArrayArray :: Phantoms.TTerm Syntax.TypeNameArray -> Phantoms.TTerm Syntax.TypeNameArray
-typeNameArrayArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeNameArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNameArraySimple :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.TypeNameArray
-typeNameArraySimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.TypeNameArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNameIdentifier :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.TypeIdentifier
-typeNameIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeNameQualifier :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm (Maybe Syntax.PackageOrTypeName)
-typeNameQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeNameWithIdentifier :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.TypeName
-typeNameWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeNameWithQualifier :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm (Maybe Syntax.PackageOrTypeName) -> Phantoms.TTerm Syntax.TypeName
-typeNameWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeName"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeParameter :: Phantoms.TTerm [Syntax.TypeParameterModifier] -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm (Maybe Syntax.TypeBound) -> Phantoms.TTerm Syntax.TypeParameter
-typeParameter modifiers identifier bound =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)}]}))
-
-typeParameterBound :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm (Maybe Syntax.TypeBound)
-typeParameterBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterIdentifier :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.TypeIdentifier
-typeParameterIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterModifier :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.TypeParameterModifier
-typeParameterModifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.TypeParameterModifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeParameterModifiers :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm [Syntax.TypeParameterModifier]
-typeParameterModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterWithBound :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm (Maybe Syntax.TypeBound) -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeParameterWithIdentifier :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameterWithModifiers :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm [Syntax.TypeParameterModifier] -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typePrimitive :: Phantoms.TTerm Syntax.PrimitiveTypeWithAnnotations -> Phantoms.TTerm Syntax.Type
-typePrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeReference :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.Type
-typeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeVariable :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.TypeVariable
-typeVariable annotations identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-typeVariableAnnotations :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm [Syntax.Annotation]
-typeVariableAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeVariableIdentifier :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm Syntax.TypeIdentifier
-typeVariableIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeVariableWithAnnotations :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.TypeVariable
-typeVariableWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeVariableWithIdentifier :: Phantoms.TTerm Syntax.TypeVariable -> Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.TypeVariable
-typeVariableWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.TypeVariable"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unAdditionalBound :: Phantoms.TTerm Syntax.AdditionalBound -> Phantoms.TTerm Syntax.InterfaceType
-unAdditionalBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.AdditionalBound")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAmbiguousName :: Phantoms.TTerm Syntax.AmbiguousName -> Phantoms.TTerm [Syntax.Identifier]
-unAmbiguousName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.AmbiguousName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAndExpression :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm [Syntax.EqualityExpression]
-unAndExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.AndExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAnnotationTypeBody :: Phantoms.TTerm Syntax.AnnotationTypeBody -> Phantoms.TTerm [[Syntax.AnnotationTypeMemberDeclaration]]
-unAnnotationTypeBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.AnnotationTypeBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayInitializer :: Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm [[Syntax.VariableInitializer]]
-unArrayInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ArrayInitializer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.BlockStatement]
-unBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.Block")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBreakStatement :: Phantoms.TTerm Syntax.BreakStatement -> Phantoms.TTerm (Maybe Syntax.Identifier)
-unBreakStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.BreakStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCatches :: Phantoms.TTerm Syntax.Catches -> Phantoms.TTerm [Syntax.CatchClause]
-unCatches x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.Catches")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unClassBody :: Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm [Syntax.ClassBodyDeclarationWithComments]
-unClassBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ClassBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConditionalAndExpression :: Phantoms.TTerm Syntax.ConditionalAndExpression -> Phantoms.TTerm [Syntax.InclusiveOrExpression]
-unConditionalAndExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ConditionalAndExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConditionalOrExpression :: Phantoms.TTerm Syntax.ConditionalOrExpression -> Phantoms.TTerm [Syntax.ConditionalAndExpression]
-unConditionalOrExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ConditionalOrExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConstantExpression :: Phantoms.TTerm Syntax.ConstantExpression -> Phantoms.TTerm Syntax.Expression
-unConstantExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ConstantExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unContinueStatement :: Phantoms.TTerm Syntax.ContinueStatement -> Phantoms.TTerm (Maybe Syntax.Identifier)
-unContinueStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ContinueStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDefaultValue :: Phantoms.TTerm Syntax.DefaultValue -> Phantoms.TTerm Syntax.ElementValue
-unDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.DefaultValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDims :: Phantoms.TTerm Syntax.Dims -> Phantoms.TTerm [[Syntax.Annotation]]
-unDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.Dims")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unElementValueArrayInitializer :: Phantoms.TTerm Syntax.ElementValueArrayInitializer -> Phantoms.TTerm [Syntax.ElementValue]
-unElementValueArrayInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ElementValueArrayInitializer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumBody :: Phantoms.TTerm Syntax.EnumBody -> Phantoms.TTerm [Syntax.EnumBody_Element]
-unEnumBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.EnumBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumConstantModifier :: Phantoms.TTerm Syntax.EnumConstantModifier -> Phantoms.TTerm Syntax.Annotation
-unEnumConstantModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.EnumConstantModifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEnumConstantName :: Phantoms.TTerm Syntax.EnumConstantName -> Phantoms.TTerm Syntax.Identifier
-unEnumConstantName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.EnumConstantName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExclusiveOrExpression :: Phantoms.TTerm Syntax.ExclusiveOrExpression -> Phantoms.TTerm [Syntax.AndExpression]
-unExclusiveOrExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ExclusiveOrExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExpressionStatement :: Phantoms.TTerm Syntax.ExpressionStatement -> Phantoms.TTerm Syntax.StatementExpression
-unExpressionStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ExpressionStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFinally :: Phantoms.TTerm Syntax.Finally -> Phantoms.TTerm Syntax.Block
-unFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.Finally")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFloatingPointLiteral :: Phantoms.TTerm Syntax.FloatingPointLiteral -> Phantoms.TTerm Double
-unFloatingPointLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.FloatingPointLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unForUpdate :: Phantoms.TTerm Syntax.ForUpdate -> Phantoms.TTerm [Syntax.StatementExpression]
-unForUpdate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ForUpdate")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm String
-unIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.Identifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInclusiveOrExpression :: Phantoms.TTerm Syntax.InclusiveOrExpression -> Phantoms.TTerm [Syntax.ExclusiveOrExpression]
-unInclusiveOrExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.InclusiveOrExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInstanceInitializer :: Phantoms.TTerm Syntax.InstanceInitializer -> Phantoms.TTerm Syntax.Block
-unInstanceInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.InstanceInitializer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntegerLiteral :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Integer
-unIntegerLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.IntegerLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterfaceBody :: Phantoms.TTerm Syntax.InterfaceBody -> Phantoms.TTerm [Syntax.InterfaceMemberDeclaration]
-unInterfaceBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.InterfaceBody")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInterfaceType :: Phantoms.TTerm Syntax.InterfaceType -> Phantoms.TTerm Syntax.ClassType
-unInterfaceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.InterfaceType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLocalVariableDeclarationStatement :: Phantoms.TTerm Syntax.LocalVariableDeclarationStatement -> Phantoms.TTerm Syntax.LocalVariableDeclaration
-unLocalVariableDeclarationStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.LocalVariableDeclarationStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMarkerAnnotation :: Phantoms.TTerm Syntax.MarkerAnnotation -> Phantoms.TTerm Syntax.TypeName
-unMarkerAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.MarkerAnnotation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMethodName :: Phantoms.TTerm Syntax.MethodName -> Phantoms.TTerm Syntax.Identifier
-unMethodName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.MethodName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMethodReference_Array :: Phantoms.TTerm Syntax.MethodReference_Array -> Phantoms.TTerm Syntax.ArrayType
-unMethodReference_Array x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.MethodReference_Array")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPackageModifier :: Phantoms.TTerm Syntax.PackageModifier -> Phantoms.TTerm Syntax.Annotation
-unPackageModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PackageModifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPackageName :: Phantoms.TTerm Syntax.PackageName -> Phantoms.TTerm [Syntax.Identifier]
-unPackageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PackageName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPackageOrTypeName :: Phantoms.TTerm Syntax.PackageOrTypeName -> Phantoms.TTerm [Syntax.Identifier]
-unPackageOrTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PackageOrTypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPostDecrementExpression :: Phantoms.TTerm Syntax.PostDecrementExpression -> Phantoms.TTerm Syntax.PostfixExpression
-unPostDecrementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PostDecrementExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPostIncrementExpression :: Phantoms.TTerm Syntax.PostIncrementExpression -> Phantoms.TTerm Syntax.PostfixExpression
-unPostIncrementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PostIncrementExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPreDecrementExpression :: Phantoms.TTerm Syntax.PreDecrementExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unPreDecrementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PreDecrementExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPreIncrementExpression :: Phantoms.TTerm Syntax.PreIncrementExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unPreIncrementExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.PreIncrementExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unResourceSpecification :: Phantoms.TTerm Syntax.ResourceSpecification -> Phantoms.TTerm [Syntax.Resource]
-unResourceSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ResourceSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReturnStatement :: Phantoms.TTerm Syntax.ReturnStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-unReturnStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ReturnStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSimpleTypeName :: Phantoms.TTerm Syntax.SimpleTypeName -> Phantoms.TTerm Syntax.TypeIdentifier
-unSimpleTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.SimpleTypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSingleTypeImportDeclaration :: Phantoms.TTerm Syntax.SingleTypeImportDeclaration -> Phantoms.TTerm Syntax.TypeName
-unSingleTypeImportDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.SingleTypeImportDeclaration")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStaticImportOnDemandDeclaration :: Phantoms.TTerm Syntax.StaticImportOnDemandDeclaration -> Phantoms.TTerm Syntax.TypeName
-unStaticImportOnDemandDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.StaticImportOnDemandDeclaration")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStaticInitializer :: Phantoms.TTerm Syntax.StaticInitializer -> Phantoms.TTerm Syntax.Block
-unStaticInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.StaticInitializer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteral :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm String
-unStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.StringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSwitchBlock :: Phantoms.TTerm Syntax.SwitchBlock -> Phantoms.TTerm [Syntax.SwitchBlock_Pair]
-unSwitchBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.SwitchBlock")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unThrowStatement :: Phantoms.TTerm Syntax.ThrowStatement -> Phantoms.TTerm Syntax.Expression
-unThrowStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.ThrowStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unThrows :: Phantoms.TTerm Syntax.Throws -> Phantoms.TTerm [Syntax.ExceptionType]
-unThrows x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.Throws")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeIdentifier :: Phantoms.TTerm Syntax.TypeIdentifier -> Phantoms.TTerm Syntax.Identifier
-unTypeIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.TypeIdentifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeImportOnDemandDeclaration :: Phantoms.TTerm Syntax.TypeImportOnDemandDeclaration -> Phantoms.TTerm Syntax.PackageOrTypeName
-unTypeImportOnDemandDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.TypeImportOnDemandDeclaration")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeParameterModifier :: Phantoms.TTerm Syntax.TypeParameterModifier -> Phantoms.TTerm Syntax.Annotation
-unTypeParameterModifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.TypeParameterModifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnannClassType :: Phantoms.TTerm Syntax.UnannClassType -> Phantoms.TTerm Syntax.ClassType
-unUnannClassType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.UnannClassType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnannType :: Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.Type
-unUnannType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.java.syntax.UnannType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unannClassType :: Phantoms.TTerm Syntax.ClassType -> Phantoms.TTerm Syntax.UnannClassType
-unannClassType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.UnannClassType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unannType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.UnannType
-unannType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.java.syntax.UnannType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unaryExpressionMinus :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionMinus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionNotPlusMinusCast :: Phantoms.TTerm Syntax.CastExpression -> Phantoms.TTerm Syntax.UnaryExpressionNotPlusMinus
-unaryExpressionNotPlusMinusCast x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpressionNotPlusMinus"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cast"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionNotPlusMinusNot :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpressionNotPlusMinus
-unaryExpressionNotPlusMinusNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpressionNotPlusMinus"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionNotPlusMinusPostfix :: Phantoms.TTerm Syntax.PostfixExpression -> Phantoms.TTerm Syntax.UnaryExpressionNotPlusMinus
-unaryExpressionNotPlusMinusPostfix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpressionNotPlusMinus"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "postfix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionNotPlusMinusTilde :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpressionNotPlusMinus
-unaryExpressionNotPlusMinusTilde x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpressionNotPlusMinus"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tilde"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionOther :: Phantoms.TTerm Syntax.UnaryExpressionNotPlusMinus -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPlus :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPlus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPreDecrement :: Phantoms.TTerm Syntax.PreDecrementExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPreDecrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preDecrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryExpressionPreIncrement :: Phantoms.TTerm Syntax.PreIncrementExpression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionPreIncrement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.UnaryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preIncrement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unqualifiedClassInstanceCreationExpression :: Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm (Maybe Syntax.ClassBody) -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression
-unqualifiedClassInstanceCreationExpression typeArguments classOrInterface arguments body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm typeArguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classOrInterface"),
-          Core.fieldTerm = (Phantoms.unTTerm classOrInterface)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-unqualifiedClassInstanceCreationExpressionArguments :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm [Syntax.Expression]
-unqualifiedClassInstanceCreationExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unqualifiedClassInstanceCreationExpressionBody :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm (Maybe Syntax.ClassBody)
-unqualifiedClassInstanceCreationExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unqualifiedClassInstanceCreationExpressionClassOrInterface :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate
-unqualifiedClassInstanceCreationExpressionClassOrInterface x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-        Core.projectionField = (Core.Name "classOrInterface")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unqualifiedClassInstanceCreationExpressionTypeArguments :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm [Syntax.TypeArgument]
-unqualifiedClassInstanceCreationExpressionTypeArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-        Core.projectionField = (Core.Name "typeArguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unqualifiedClassInstanceCreationExpressionWithArguments :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression
-unqualifiedClassInstanceCreationExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classOrInterface"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "classOrInterface")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unqualifiedClassInstanceCreationExpressionWithBody :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm (Maybe Syntax.ClassBody) -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression
-unqualifiedClassInstanceCreationExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classOrInterface"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "classOrInterface")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unqualifiedClassInstanceCreationExpressionWithClassOrInterface :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm Syntax.ClassOrInterfaceTypeToInstantiate -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression
-unqualifiedClassInstanceCreationExpressionWithClassOrInterface original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "typeArguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classOrInterface"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unqualifiedClassInstanceCreationExpressionWithTypeArguments :: Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression -> Phantoms.TTerm [Syntax.TypeArgument] -> Phantoms.TTerm Syntax.UnqualifiedClassInstanceCreationExpression
-unqualifiedClassInstanceCreationExpressionWithTypeArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classOrInterface"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "classOrInterface")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableAccessExpressionName :: Phantoms.TTerm Syntax.ExpressionName -> Phantoms.TTerm Syntax.VariableAccess
-variableAccessExpressionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.VariableAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expressionName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableAccessFieldAccess :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.VariableAccess
-variableAccessFieldAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.VariableAccess"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fieldAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableArityParameter :: Phantoms.TTerm Syntax.VariableModifier -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.VariableArityParameter
-variableArityParameter modifiers type_ annotations identifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm modifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)}]}))
-
-variableArityParameterAnnotations :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm [Syntax.Annotation]
-variableArityParameterAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableArityParameterIdentifier :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.Identifier
-variableArityParameterIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableArityParameterModifiers :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.VariableModifier
-variableArityParameterModifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-        Core.projectionField = (Core.Name "modifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableArityParameterType :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.UnannType
-variableArityParameterType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableArityParameterWithAnnotations :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.VariableArityParameter
-variableArityParameterWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableArityParameterWithIdentifier :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.VariableArityParameter
-variableArityParameterWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableArityParameterWithModifiers :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.VariableModifier -> Phantoms.TTerm Syntax.VariableArityParameter
-variableArityParameterWithModifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableArityParameterWithType :: Phantoms.TTerm Syntax.VariableArityParameter -> Phantoms.TTerm Syntax.UnannType -> Phantoms.TTerm Syntax.VariableArityParameter
-variableArityParameterWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "modifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableArityParameter"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclarator :: Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm (Maybe Syntax.VariableInitializer) -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclarator id initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-variableDeclaratorId :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm Syntax.VariableDeclaratorId
-variableDeclaratorId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorIdDims :: Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm (Maybe Syntax.Dims)
-variableDeclaratorIdDims x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-        Core.projectionField = (Core.Name "dims")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorIdIdentifier :: Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.Identifier
-variableDeclaratorIdIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-        Core.projectionField = (Core.Name "identifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorIdWithDims :: Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.VariableDeclaratorId
-variableDeclaratorIdWithDims original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-              Core.projectionField = (Core.Name "identifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDeclaratorIdWithIdentifier :: Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.VariableDeclaratorId
-variableDeclaratorIdWithIdentifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-              Core.projectionField = (Core.Name "dims")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclaratorId_ :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.Dims) -> Phantoms.TTerm Syntax.VariableDeclaratorId
-variableDeclaratorId_ identifier dims =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableDeclaratorId"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "identifier"),
-          Core.fieldTerm = (Phantoms.unTTerm identifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dims"),
-          Core.fieldTerm = (Phantoms.unTTerm dims)}]}))
-
-variableDeclaratorInitializer :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm (Maybe Syntax.VariableInitializer)
-variableDeclaratorInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorWithId :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm Syntax.VariableDeclaratorId -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclaratorWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclaratorWithInitializer :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm (Maybe Syntax.VariableInitializer) -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclaratorWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.VariableDeclarator"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableInitializerArrayInitializer :: Phantoms.TTerm Syntax.ArrayInitializer -> Phantoms.TTerm Syntax.VariableInitializer
-variableInitializerArrayInitializer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.VariableInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrayInitializer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableInitializerExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.VariableInitializer
-variableInitializerExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.VariableInitializer"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableModifierAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.VariableModifier
-variableModifierAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.VariableModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-variableModifierFinal :: Phantoms.TTerm Syntax.VariableModifier
-variableModifierFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.VariableModifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-whileStatement :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatement cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-whileStatementBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement
-whileStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementCond :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-whileStatementCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementNoShortIf :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.WhileStatementNoShortIf
-whileStatementNoShortIf cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-whileStatementNoShortIfBody :: Phantoms.TTerm Syntax.WhileStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf
-whileStatementNoShortIfBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementNoShortIfCond :: Phantoms.TTerm Syntax.WhileStatementNoShortIf -> Phantoms.TTerm (Maybe Syntax.Expression)
-whileStatementNoShortIfCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementNoShortIfWithBody :: Phantoms.TTerm Syntax.WhileStatementNoShortIf -> Phantoms.TTerm Syntax.StatementNoShortIf -> Phantoms.TTerm Syntax.WhileStatementNoShortIf
-whileStatementNoShortIfWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileStatementNoShortIfWithCond :: Phantoms.TTerm Syntax.WhileStatementNoShortIf -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.WhileStatementNoShortIf
-whileStatementNoShortIfWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatementNoShortIf"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whileStatementWithBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileStatementWithCond :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-wildcard :: Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm (Maybe Syntax.WildcardBounds) -> Phantoms.TTerm Syntax.Wildcard
-wildcard annotations wildcard =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcard"),
-          Core.fieldTerm = (Phantoms.unTTerm wildcard)}]}))
-
-wildcardAnnotations :: Phantoms.TTerm Syntax.Wildcard -> Phantoms.TTerm [Syntax.Annotation]
-wildcardAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-wildcardBoundsExtends :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.WildcardBounds
-wildcardBoundsExtends x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.WildcardBounds"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extends"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-wildcardBoundsSuper :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.WildcardBounds
-wildcardBoundsSuper x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.java.syntax.WildcardBounds"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-wildcardWildcard :: Phantoms.TTerm Syntax.Wildcard -> Phantoms.TTerm (Maybe Syntax.WildcardBounds)
-wildcardWildcard x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-        Core.projectionField = (Core.Name "wildcard")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-wildcardWithAnnotations :: Phantoms.TTerm Syntax.Wildcard -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.Wildcard
-wildcardWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-              Core.projectionField = (Core.Name "wildcard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-wildcardWithWildcard :: Phantoms.TTerm Syntax.Wildcard -> Phantoms.TTerm (Maybe Syntax.WildcardBounds) -> Phantoms.TTerm Syntax.Wildcard
-wildcardWithWildcard original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.java.syntax.Wildcard"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "wildcard"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/JavaScript/Helpers.hs b/src/main/haskell/Hydra/Dsl/JavaScript/Helpers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/JavaScript/Helpers.hs
+++ /dev/null
@@ -1,623 +0,0 @@
--- | A DSL for constructing JavaScript syntax trees in Haskell.
-module Hydra.Dsl.JavaScript.Helpers where
-
-import Hydra.JavaScript.Syntax
-import qualified Data.Int as I
-
-
--- * Identifiers
-
--- | Create an identifier
--- Example: ident "foo"
-ident :: String -> Identifier
-ident = Identifier
-
--- | Create a qualified name from a list of strings
--- Example: qualifiedName ["module", "submodule", "name"]
-qualifiedName :: [String] -> QualifiedName
-qualifiedName = fmap Identifier
-
-
--- * Literals
-
--- | Create a string literal with double quotes
--- Example: stringLit "hello"
-stringLit :: String -> Literal
-stringLit s = LiteralString $ StringLiteral s False
-
--- | Create a string literal with single quotes
--- Example: stringLitSingle "hello"
-stringLitSingle :: String -> Literal
-stringLitSingle s = LiteralString $ StringLiteral s True
-
--- | Create an integer literal
--- Example: intLit 42
-intLit :: I.Int64 -> Literal
-intLit = LiteralNumber . NumericLiteralInteger
-
--- | Create a floating-point literal
--- Example: floatLit 3.14
-floatLit :: Double -> Literal
-floatLit = LiteralNumber . NumericLiteralFloat
-
--- | Create a boolean literal
--- Example: boolLit True
-boolLit :: Bool -> Literal
-boolLit = LiteralBoolean
-
--- | The null literal
-nullLit :: Literal
-nullLit = LiteralNull
-
--- | The undefined literal
-undefinedLit :: Literal
-undefinedLit = LiteralUndefined
-
--- | Create a BigInt literal
--- Example: bigIntLit 123
-bigIntLit :: Integer -> Literal
-bigIntLit = LiteralBigInt
-
-
--- * Expressions
-
--- | Create an identifier expression
--- Example: identExpr "foo"
-identExpr :: String -> Expression
-identExpr = ExpressionIdentifier . ident
-
--- | Create a literal expression
--- Example: litExpr (stringLit "hello")
-litExpr :: Literal -> Expression
-litExpr = ExpressionLiteral
-
--- | Create a string expression
--- Example: stringExpr "hello"
-stringExpr :: String -> Expression
-stringExpr = litExpr . stringLit
-
--- | Create an integer expression
--- Example: intExpr 42
-intExpr :: I.Int64 -> Expression
-intExpr = litExpr . intLit
-
--- | Create a floating-point expression
--- Example: floatExpr 3.14
-floatExpr :: Double -> Expression
-floatExpr = litExpr . floatLit
-
--- | Create a boolean expression
--- Example: boolExpr True
-boolExpr :: Bool -> Expression
-boolExpr = litExpr . boolLit
-
--- | The null expression
-nullExpr :: Expression
-nullExpr = litExpr nullLit
-
--- | The undefined expression
-undefinedExpr :: Expression
-undefinedExpr = litExpr undefinedLit
-
--- | Create an array expression
--- Example: arrayExpr [intExpr 1, intExpr 2, intExpr 3]
-arrayExpr :: [Expression] -> Expression
-arrayExpr = ExpressionArray . fmap ArrayElementExpression
-
--- | Create an object expression from key-value pairs
--- Example: objectExpr [("name", stringExpr "John"), ("age", intExpr 30)]
-objectExpr :: [(String, Expression)] -> Expression
-objectExpr pairs = ExpressionObject $ fmap toProperty pairs
-  where
-    toProperty (k, v) = Property (identExpr k) v PropertyKindInit False False
-
--- | Create a function call expression
--- Example: callExpr (identExpr "foo") [intExpr 1, intExpr 2]
-callExpr :: Expression -> [Expression] -> Expression
-callExpr callee args = ExpressionCall $ CallExpression callee args False
-
--- | Create an optional chaining call expression
--- Example: optionalCallExpr (identExpr "foo") [intExpr 1]
-optionalCallExpr :: Expression -> [Expression] -> Expression
-optionalCallExpr callee args = ExpressionCall $ CallExpression callee args True
-
--- | Create a member access expression (obj.prop)
--- Example: memberExpr (identExpr "obj") "prop"
-memberExpr :: Expression -> String -> Expression
-memberExpr obj prop = ExpressionMember $ MemberExpression obj (identExpr prop) False False
-
--- | Create a computed member access expression (obj[expr])
--- Example: computedMemberExpr (identExpr "arr") (intExpr 0)
-computedMemberExpr :: Expression -> Expression -> Expression
-computedMemberExpr obj prop = ExpressionMember $ MemberExpression obj prop True False
-
--- | Create an optional chaining member expression (obj?.prop)
--- Example: optionalMemberExpr (identExpr "obj") "prop"
-optionalMemberExpr :: Expression -> String -> Expression
-optionalMemberExpr obj prop = ExpressionMember $ MemberExpression obj (identExpr prop) False True
-
--- | Create a conditional (ternary) expression
--- Example: condExpr (identExpr "x") (intExpr 1) (intExpr 0)
-condExpr :: Expression -> Expression -> Expression -> Expression
-condExpr test consequent alternate = ExpressionConditional $
-  ConditionalExpression test consequent alternate
-
--- | Create a binary expression
--- Example: binaryExpr BinaryOperatorAdd (intExpr 1) (intExpr 2)
-binaryExpr :: BinaryOperator -> Expression -> Expression -> Expression
-binaryExpr op left right = ExpressionBinary $ BinaryExpression op left right
-
--- | Create an addition expression
--- Example: addExpr (intExpr 1) (intExpr 2)
-addExpr :: Expression -> Expression -> Expression
-addExpr = binaryExpr BinaryOperatorAdd
-
--- | Create a subtraction expression
--- Example: subExpr (intExpr 5) (intExpr 3)
-subExpr :: Expression -> Expression -> Expression
-subExpr = binaryExpr BinaryOperatorSubtract
-
--- | Create a multiplication expression
--- Example: mulExpr (intExpr 3) (intExpr 4)
-mulExpr :: Expression -> Expression -> Expression
-mulExpr = binaryExpr BinaryOperatorMultiply
-
--- | Create a division expression
--- Example: divExpr (intExpr 10) (intExpr 2)
-divExpr :: Expression -> Expression -> Expression
-divExpr = binaryExpr BinaryOperatorDivide
-
--- | Create a strict equality expression (===)
--- Example: eqExpr (identExpr "x") (intExpr 1)
-eqExpr :: Expression -> Expression -> Expression
-eqExpr = binaryExpr BinaryOperatorStrictEqual
-
--- | Create a strict inequality expression (!==)
--- Example: neqExpr (identExpr "x") (intExpr 1)
-neqExpr :: Expression -> Expression -> Expression
-neqExpr = binaryExpr BinaryOperatorStrictNotEqual
-
--- | Create a logical AND expression
--- Example: andExpr (identExpr "a") (identExpr "b")
-andExpr :: Expression -> Expression -> Expression
-andExpr = binaryExpr BinaryOperatorAnd
-
--- | Create a logical OR expression
--- Example: orExpr (identExpr "a") (identExpr "b")
-orExpr :: Expression -> Expression -> Expression
-orExpr = binaryExpr BinaryOperatorOr
-
--- | Create a unary expression
--- Example: unaryExpr UnaryOperatorNot (identExpr "x")
-unaryExpr :: UnaryOperator -> Expression -> Expression
-unaryExpr op arg = ExpressionUnary $ UnaryExpression op arg True
-
--- | Create a logical NOT expression
--- Example: notExpr (identExpr "x")
-notExpr :: Expression -> Expression
-notExpr = unaryExpr UnaryOperatorNot
-
--- | Create a negation expression
--- Example: negateExpr (identExpr "x")
-negateExpr :: Expression -> Expression
-negateExpr = unaryExpr UnaryOperatorNegate
-
--- | Create an assignment expression
--- Example: assignExpr (identPattern "x") (intExpr 42)
-assignExpr :: Pattern -> Expression -> Expression
-assignExpr left right = ExpressionAssignment $
-  AssignmentExpression AssignmentOperatorAssign left right
-
--- | The 'this' expression
-thisExpr :: Expression
-thisExpr = ExpressionThis
-
--- | Create a 'new' expression
--- Example: newExpr (identExpr "Date") []
-newExpr :: Expression -> [Expression] -> Expression
-newExpr callee args = ExpressionNew $ CallExpression callee args False
-
--- | Create an await expression
--- Example: awaitExpr (callExpr (identExpr "fetch") [stringExpr "url"])
-awaitExpr :: Expression -> Expression
-awaitExpr = ExpressionAwait
-
--- | Create a yield expression
--- Example: yieldExpr (Just (intExpr 1))
-yieldExpr :: Maybe Expression -> Expression
-yieldExpr = ExpressionYield
-
--- | Create a spread expression
--- Example: spreadExpr (identExpr "arr")
-spreadExpr :: Expression -> Expression
-spreadExpr = ExpressionSpread . SpreadElement
-
--- | Create a parenthesized expression
--- Example: parenExpr (addExpr (intExpr 1) (intExpr 2))
-parenExpr :: Expression -> Expression
-parenExpr = ExpressionParenthesized
-
-
--- * Arrow Functions
-
--- | Create an arrow function with an expression body
--- Example: arrowExpr ["x", "y"] (addExpr (identExpr "x") (identExpr "y"))
-arrowExpr :: [String] -> Expression -> Expression
-arrowExpr params body = ExpressionArrow $ ArrowFunctionExpression
-  (fmap identPattern params)
-  (ArrowFunctionBodyExpression body)
-  False
-
--- | Create an async arrow function with an expression body
--- Example: asyncArrowExpr ["x"] (awaitExpr (callExpr (identExpr "fetch") [identExpr "x"]))
-asyncArrowExpr :: [String] -> Expression -> Expression
-asyncArrowExpr params body = ExpressionArrow $ ArrowFunctionExpression
-  (fmap identPattern params)
-  (ArrowFunctionBodyExpression body)
-  True
-
--- | Create an arrow function with a block body
--- Example: arrowBlockExpr ["x"] [returnStmt (Just (identExpr "x"))]
-arrowBlockExpr :: [String] -> [Statement] -> Expression
-arrowBlockExpr params body = ExpressionArrow $ ArrowFunctionExpression
-  (fmap identPattern params)
-  (ArrowFunctionBodyBlock body)
-  False
-
-
--- * Patterns
-
--- | Create an identifier pattern
--- Example: identPattern "x"
-identPattern :: String -> Pattern
-identPattern = PatternIdentifier . ident
-
--- | Create an object destructuring pattern
--- Example: objectPattern [identPattern "a", identPattern "b"]
-objectPattern :: [Pattern] -> Pattern
-objectPattern ps = PatternObject $ ObjectPattern $ fmap toProperty ps
-  where
-    toProperty p = case p of
-      PatternIdentifier i -> ObjectPatternPropertyProperty $
-        Property (ExpressionIdentifier i) (ExpressionIdentifier i) PropertyKindInit False True
-      _ -> ObjectPatternPropertyProperty $
-        Property nullExpr (patternToExpr p) PropertyKindInit False False
-    patternToExpr (PatternIdentifier i) = ExpressionIdentifier i
-    patternToExpr _ = nullExpr
-
--- | Create an array destructuring pattern
--- Example: arrayPattern [Just (identPattern "a"), Nothing, Just (identPattern "b")]
-arrayPattern :: [Maybe Pattern] -> Pattern
-arrayPattern = PatternArray
-
--- | Create a rest pattern
--- Example: restPattern "args"
-restPattern :: String -> Pattern
-restPattern = PatternRest . RestElement . identPattern
-
--- | Create a pattern with a default value
--- Example: defaultPattern "x" (intExpr 0)
-defaultPattern :: String -> Expression -> Pattern
-defaultPattern name def = PatternAssignment $
-  AssignmentPattern (identPattern name) def
-
-
--- * Statements
-
--- | Create an expression statement
--- Example: exprStmt (callExpr (identExpr "console.log") [stringExpr "hello"])
-exprStmt :: Expression -> Statement
-exprStmt = StatementExpression
-
--- | Create a block statement
--- Example: blockStmt [exprStmt (intExpr 1), exprStmt (intExpr 2)]
-blockStmt :: [Statement] -> Statement
-blockStmt = StatementBlock
-
--- | Create a return statement
--- Example: returnStmt (Just (intExpr 42))
-returnStmt :: Maybe Expression -> Statement
-returnStmt = StatementReturn
-
--- | Create a throw statement
--- Example: throwStmt (newExpr (identExpr "Error") [stringExpr "oops"])
-throwStmt :: Expression -> Statement
-throwStmt = StatementThrow . ThrowStatement
-
--- | Create a break statement
--- Example: breakStmt Nothing
-breakStmt :: Maybe String -> Statement
-breakStmt = StatementBreak . fmap ident
-
--- | Create a continue statement
--- Example: continueStmt Nothing
-continueStmt :: Maybe String -> Statement
-continueStmt = StatementContinue . fmap ident
-
--- | Create an if statement
--- Example: ifStmt (identExpr "x") (returnStmt (Just (intExpr 1))) Nothing
-ifStmt :: Expression -> Statement -> Maybe Statement -> Statement
-ifStmt test consequent alternate = StatementIf $ IfStatement test consequent alternate
-
--- | Create a while statement
--- Example: whileStmt (boolExpr True) (blockStmt [breakStmt Nothing])
-whileStmt :: Expression -> Statement -> Statement
-whileStmt test body = StatementWhile $ WhileStatement test body
-
--- | Create a for statement
--- Example: forStmt (Just (ForInitVariable (constDecl "i" (intExpr 0)))) (Just (binaryExpr BinaryOperatorLessThan (identExpr "i") (intExpr 10))) (Just (unaryExpr UnaryOperatorIncrement (identExpr "i"))) (blockStmt [])
-forStmt :: Maybe ForInit -> Maybe Expression -> Maybe Expression -> Statement -> Statement
-forStmt init test update body = StatementFor $ ForStatement init test update body
-
--- | Create a for-of statement
--- Example: forOfStmt False (ForInLeftVariable (constDecl "item" Nothing)) (identExpr "items") (blockStmt [])
-forOfStmt :: Bool -> ForInLeft -> Expression -> Statement -> Statement
-forOfStmt await left right body = StatementForOf $ ForOfStatement await left right body
-
--- | Create a try statement
--- Example: tryStmt [exprStmt (callExpr (identExpr "riskyOp") [])] (Just (catchClause (Just (identPattern "e")) [throwStmt (identExpr "e")])) Nothing
-tryStmt :: [Statement] -> Maybe CatchClause -> Maybe [Statement] -> Statement
-tryStmt block handler finalizer = StatementTry $ TryStatement block handler finalizer
-
--- | Create a catch clause
--- Example: catchClause (Just (identPattern "e")) [throwStmt (identExpr "e")]
-catchClause :: Maybe Pattern -> [Statement] -> CatchClause
-catchClause = CatchClause
-
--- | Create a switch statement
--- Example: switchStmt (identExpr "x") [switchCase (Just (intExpr 1)) [returnStmt (Just (stringExpr "one"))], switchCase Nothing [returnStmt (Just (stringExpr "default"))]]
-switchStmt :: Expression -> [SwitchCase] -> Statement
-switchStmt discriminant cases = StatementSwitch $ SwitchStatement discriminant cases
-
--- | Create a switch case
--- Example: switchCase (Just (intExpr 1)) [returnStmt (Just (stringExpr "one"))]
-switchCase :: Maybe Expression -> [Statement] -> SwitchCase
-switchCase = SwitchCase
-
--- | An empty statement
-emptyStmt :: Statement
-emptyStmt = StatementEmpty
-
--- | A debugger statement
-debuggerStmt :: Statement
-debuggerStmt = StatementDebugger
-
-
--- * Variable Declarations
-
--- | Create a const declaration
--- Example: constDecl "x" (Just (intExpr 42))
-constDecl :: String -> Maybe Expression -> VariableDeclaration
-constDecl name init = VariableDeclaration VariableKindConst
-  [VariableDeclarator (identPattern name) init]
-
--- | Create a let declaration
--- Example: letDecl "x" (Just (intExpr 42))
-letDecl :: String -> Maybe Expression -> VariableDeclaration
-letDecl name init = VariableDeclaration VariableKindLet
-  [VariableDeclarator (identPattern name) init]
-
--- | Create a var declaration
--- Example: varDecl "x" (Just (intExpr 42))
-varDecl :: String -> Maybe Expression -> VariableDeclaration
-varDecl name init = VariableDeclaration VariableKindVar
-  [VariableDeclarator (identPattern name) init]
-
--- | Create a variable declaration statement
--- Example: varDeclStmt (constDecl "x" (Just (intExpr 42)))
-varDeclStmt :: VariableDeclaration -> Statement
-varDeclStmt = StatementVariableDeclaration
-
-
--- * Function Declarations
-
--- | Create a function declaration
--- Example: funcDecl "add" ["x", "y"] [returnStmt (Just (addExpr (identExpr "x") (identExpr "y")))]
-funcDecl :: String -> [String] -> [Statement] -> FunctionDeclaration
-funcDecl name params body = FunctionDeclaration
-  (ident name)
-  (fmap identPattern params)
-  body
-  False
-  False
-
--- | Create an async function declaration
--- Example: asyncFuncDecl "fetchData" ["url"] [returnStmt (Just (awaitExpr (callExpr (identExpr "fetch") [identExpr "url"])))]
-asyncFuncDecl :: String -> [String] -> [Statement] -> FunctionDeclaration
-asyncFuncDecl name params body = FunctionDeclaration
-  (ident name)
-  (fmap identPattern params)
-  body
-  True
-  False
-
--- | Create a function declaration statement
--- Example: funcDeclStmt (funcDecl "add" ["x", "y"] [returnStmt (Just (addExpr (identExpr "x") (identExpr "y")))])
-funcDeclStmt :: FunctionDeclaration -> Statement
-funcDeclStmt = StatementFunctionDeclaration
-
-
--- * Class Declarations
-
--- | Create a class declaration
--- Example: classDecl "Person" Nothing [methodDef "greet" [] [returnStmt (Just (stringExpr "hello"))]]
-classDecl :: String -> Maybe Expression -> [MethodDefinition] -> ClassDeclaration
-classDecl name superClass body = ClassDeclaration (ident name) superClass body
-
--- | Create a method definition
--- Example: methodDef "greet" [] [returnStmt (Just (stringExpr "hello"))]
-methodDef :: String -> [String] -> [Statement] -> MethodDefinition
-methodDef name params body = MethodDefinition
-  (identExpr name)
-  (FunctionExpression Nothing (fmap identPattern params) body False False)
-  MethodKindMethod
-  False
-  False
-
--- | Create a constructor definition
--- Example: constructorDef ["name"] [exprStmt (assignExpr (PatternIdentifier (ident "this.name")) (identExpr "name"))]
-constructorDef :: [String] -> [Statement] -> MethodDefinition
-constructorDef params body = MethodDefinition
-  (identExpr "constructor")
-  (FunctionExpression Nothing (fmap identPattern params) body False False)
-  MethodKindConstructor
-  False
-  False
-
--- | Create a static method definition
--- Example: staticMethodDef "create" [] [returnStmt (Just (newExpr (identExpr "Person") []))]
-staticMethodDef :: String -> [String] -> [Statement] -> MethodDefinition
-staticMethodDef name params body = MethodDefinition
-  (identExpr name)
-  (FunctionExpression Nothing (fmap identPattern params) body False False)
-  MethodKindMethod
-  False
-  True
-
--- | Create a class declaration statement
--- Example: classDeclStmt (classDecl "Person" Nothing [])
-classDeclStmt :: ClassDeclaration -> Statement
-classDeclStmt = StatementClassDeclaration
-
-
--- * Module Items
-
--- | Create a statement module item
--- Example: stmtItem (varDeclStmt (constDecl "x" (Just (intExpr 42))))
-stmtItem :: Statement -> ModuleItem
-stmtItem = ModuleItemStatement
-
--- | Create an import declaration
--- Example: importDecl [importNamed "foo" "foo"] "./module.js"
-importDecl :: [ImportClause] -> String -> ImportDeclaration
-importDecl specifiers source = ImportDeclaration specifiers (StringLiteral source False)
-
--- | Create a named import
--- Example: importNamed "foo" "bar"  -- import { foo as bar }
-importNamed :: String -> String -> ImportClause
-importNamed imported local = ImportClauseNamed $
-  ImportSpecifier (ident imported) (ident local)
-
--- | Create a default import
--- Example: importDefault "foo"  -- import foo from ...
-importDefault :: String -> ImportClause
-importDefault = ImportClauseDefault . ImportDefaultSpecifier . ident
-
--- | Create a namespace import
--- Example: importNamespace "foo"  -- import * as foo from ...
-importNamespace :: String -> ImportClause
-importNamespace = ImportClauseNamespace . ImportNamespaceSpecifier . ident
-
--- | Create an import module item
--- Example: importItem (importDecl [importDefault "React"] "react")
-importItem :: ImportDeclaration -> ModuleItem
-importItem = ModuleItemImport
-
--- | Create a named export declaration
--- Example: namedExportDecl [("foo", "foo")] Nothing
-namedExportDecl :: [(String, String)] -> Maybe String -> ExportDeclaration
-namedExportDecl specifiers source = ExportDeclarationNamed $ NamedExport
-  (fmap (\(local, exported) -> ExportSpecifier (ident local) (ident exported)) specifiers)
-  (fmap (\s -> StringLiteral s False) source)
-
--- | Create a default export declaration
--- Example: defaultExportDecl (identExpr "foo")
-defaultExportDecl :: Expression -> ExportDeclaration
-defaultExportDecl = ExportDeclarationDefault
-
--- | Create an export declaration for a statement
--- Example: exportDeclStmt (varDeclStmt (constDecl "x" (Just (intExpr 42))))
-exportDeclStmt :: Statement -> ExportDeclaration
-exportDeclStmt = ExportDeclarationDeclaration
-
--- | Create an export module item
--- Example: exportItem (defaultExportDecl (identExpr "foo"))
-exportItem :: ExportDeclaration -> ModuleItem
-exportItem = ModuleItemExport
-
-
--- * Programs
-
--- | Create a module program
--- Example: moduleProgram [importItem (importDecl [importDefault "foo"] "./foo.js"), stmtItem (varDeclStmt (constDecl "x" (Just (intExpr 42))))]
-moduleProgram :: [ModuleItem] -> Program
-moduleProgram body = Program body SourceTypeModule
-
--- | Create a script program
--- Example: scriptProgram [stmtItem (varDeclStmt (constDecl "x" (Just (intExpr 42))))]
-scriptProgram :: [ModuleItem] -> Program
-scriptProgram body = Program body SourceTypeScript
-
-
--- * Type Expressions
-
--- | Create an identifier type expression
--- Example: identType "string"
-identType :: String -> TypeExpression
-identType = TypeExpressionIdentifier . ident
-
--- | Create an array type expression
--- Example: arrayType (identType "number")
-arrayType :: TypeExpression -> TypeExpression
-arrayType = TypeExpressionArray . ArrayTypeExpression
-
--- | Create a union type expression
--- Example: unionType [identType "string", identType "number"]
-unionType :: [TypeExpression] -> TypeExpression
-unionType = TypeExpressionUnion
-
--- | Create an optional type expression
--- Example: optionalType (identType "string")
-optionalType :: TypeExpression -> TypeExpression
-optionalType = TypeExpressionOptional
-
--- | Create a parameterized type expression
--- Example: paramType (identType "Array") [identType "string"]
-paramType :: TypeExpression -> [TypeExpression] -> TypeExpression
-paramType base args = TypeExpressionParameterized $
-  ParameterizedTypeExpression base args
-
--- | The 'any' type
-anyType :: TypeExpression
-anyType = TypeExpressionAny
-
--- | The 'void' type
-voidType :: TypeExpression
-voidType = TypeExpressionVoid
-
--- | The 'never' type
-neverType :: TypeExpression
-neverType = TypeExpressionNever
-
-
--- * Comments and Documentation
-
--- | Create a line comment
--- Example: lineComment "This is a comment"
-lineComment :: String -> Comment
-lineComment = CommentLine
-
--- | Create a block comment
--- Example: blockComment "This is a\nmultiline comment"
-blockComment :: String -> Comment
-blockComment = CommentBlock
-
--- | Create a documentation comment
--- Example: docComment "Description of the function" [paramTag "x" (Just (identType "number")) "The input value"]
-docComment :: String -> [DocumentationTag] -> Comment
-docComment desc tags = CommentDocumentation $ DocumentationComment desc tags
-
--- | Create a @param documentation tag
--- Example: paramTag "x" (Just (identType "number")) "The input value"
-paramTag :: String -> Maybe TypeExpression -> String -> DocumentationTag
-paramTag name typ desc = DocumentationTag "param" typ (Just $ ident name) desc
-
--- | Create a @returns documentation tag
--- Example: returnsTag (Just (identType "number")) "The result"
-returnsTag :: Maybe TypeExpression -> String -> DocumentationTag
-returnsTag typ desc = DocumentationTag "returns" typ Nothing desc
-
--- | Create a @type documentation tag
--- Example: typeTag (identType "number")
-typeTag :: TypeExpression -> DocumentationTag
-typeTag typ = DocumentationTag "type" (Just typ) Nothing ""
diff --git a/src/main/haskell/Hydra/Dsl/JavaScript/Syntax.hs b/src/main/haskell/Hydra/Dsl/JavaScript/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/JavaScript/Syntax.hs
+++ /dev/null
@@ -1,5904 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.javaScript.syntax
-
-module Hydra.Dsl.JavaScript.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.JavaScript.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Int as I
-
-arrayElementExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayElement
-arrayElementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrayElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayElementHole :: Phantoms.TTerm Syntax.ArrayElement
-arrayElementHole =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrayElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hole"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-arrayElementSpread :: Phantoms.TTerm Syntax.SpreadElement -> Phantoms.TTerm Syntax.ArrayElement
-arrayElementSpread x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrayElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "spread"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayTypeExpression :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.ArrayTypeExpression
-arrayTypeExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.ArrayTypeExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrowFunctionBodyBlock :: Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.ArrowFunctionBody
-arrowFunctionBodyBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrowFunctionBodyExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrowFunctionBody
-arrowFunctionBodyExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrowFunctionExpression :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ArrowFunctionBody -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ArrowFunctionExpression
-arrowFunctionExpression params body async =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)}]}))
-
-arrowFunctionExpressionAsync :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm Bool
-arrowFunctionExpressionAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrowFunctionExpressionBody :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm Syntax.ArrowFunctionBody
-arrowFunctionExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrowFunctionExpressionParams :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm [Syntax.Pattern]
-arrowFunctionExpressionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrowFunctionExpressionWithAsync :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ArrowFunctionExpression
-arrowFunctionExpressionWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrowFunctionExpressionWithBody :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm Syntax.ArrowFunctionBody -> Phantoms.TTerm Syntax.ArrowFunctionExpression
-arrowFunctionExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrowFunctionExpressionWithParams :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ArrowFunctionExpression
-arrowFunctionExpressionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentExpression :: Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpression operator left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-assignmentExpressionLeft :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Pattern
-assignmentExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentExpressionOperator :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.AssignmentOperator
-assignmentExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentExpressionRight :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression
-assignmentExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentExpressionWithLeft :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentExpressionWithOperator :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.AssignmentOperator -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentExpressionWithRight :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignmentOperatorAddAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorAddAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorAndAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorAndAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "andAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorBitwiseAndAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorBitwiseAndAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAndAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorBitwiseOrAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorBitwiseOrAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOrAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorBitwiseXorAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorBitwiseXorAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXorAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorDivideAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorDivideAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divideAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorExponentiateAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorExponentiateAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exponentiateAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorLeftShiftAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorLeftShiftAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShiftAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorModuloAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorModuloAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "moduloAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorMultiplyAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorMultiplyAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiplyAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorNullishAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorNullishAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullishAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorOrAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorOrAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorRightShiftAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorRightShiftAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShiftAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorSubtractAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorSubtractAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtractAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentOperatorUnsignedRightShiftAssign :: Phantoms.TTerm Syntax.AssignmentOperator
-assignmentOperatorUnsignedRightShiftAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedRightShiftAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-assignmentPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentPattern
-assignmentPattern left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-assignmentPatternLeft :: Phantoms.TTerm Syntax.AssignmentPattern -> Phantoms.TTerm Syntax.Pattern
-assignmentPatternLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentPatternRight :: Phantoms.TTerm Syntax.AssignmentPattern -> Phantoms.TTerm Syntax.Expression
-assignmentPatternRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentPatternWithLeft :: Phantoms.TTerm Syntax.AssignmentPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.AssignmentPattern
-assignmentPatternWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentPatternWithRight :: Phantoms.TTerm Syntax.AssignmentPattern -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentPattern
-assignmentPatternWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.AssignmentPattern"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryExpression :: Phantoms.TTerm Syntax.BinaryOperator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpression
-binaryExpression operator left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryExpressionLeft :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.Expression
-binaryExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionOperator :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.BinaryOperator
-binaryExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionRight :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.Expression
-binaryExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionWithLeft :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpression
-binaryExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExpressionWithOperator :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.BinaryOperator -> Phantoms.TTerm Syntax.BinaryExpression
-binaryExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExpressionWithRight :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpression
-binaryExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOperatorAdd :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorAnd :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorBitwiseAnd :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorBitwiseAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseAnd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorBitwiseOr :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorBitwiseOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseOr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorBitwiseXor :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorBitwiseXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseXor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorDivide :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorExponentiate :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorExponentiate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exponentiate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorGreaterThan :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorGreaterThanOrEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorGreaterThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorIn :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorIn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorInstanceof :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorInstanceof =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "instanceof"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLeftShift :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLeftShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLessThan :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLessThanOrEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorLessThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorModulo :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorModulo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulo"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorMultiply :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorNotEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorNullishCoalescing :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorNullishCoalescing =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullishCoalescing"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorOr :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorRightShift :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorRightShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorStrictEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorStrictEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strictEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorStrictNotEqual :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorStrictNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strictNotEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorSubtract :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorSubtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorUnsignedRightShift :: Phantoms.TTerm Syntax.BinaryOperator
-binaryOperatorUnsignedRightShift =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedRightShift"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-callExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.CallExpression
-callExpression callee arguments optional =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "callee"),
-          Core.fieldTerm = (Phantoms.unTTerm callee)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)}]}))
-
-callExpressionArguments :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm [Syntax.Expression]
-callExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExpressionCallee :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm Syntax.Expression
-callExpressionCallee x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-        Core.projectionField = (Core.Name "callee")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExpressionOptional :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm Bool
-callExpressionOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExpressionWithArguments :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.CallExpression
-callExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "callee"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-              Core.projectionField = (Core.Name "callee")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-callExpressionWithCallee :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CallExpression
-callExpressionWithCallee original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "callee"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-callExpressionWithOptional :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.CallExpression
-callExpressionWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "callee"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-              Core.projectionField = (Core.Name "callee")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CallExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catchClause :: Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.CatchClause
-catchClause param body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-catchClauseBody :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm Syntax.BlockStatement
-catchClauseBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchClauseParam :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm (Maybe Syntax.Pattern)
-catchClauseParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catchClauseWithBody :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.CatchClause
-catchClauseWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catchClauseWithParam :: Phantoms.TTerm Syntax.CatchClause -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.CatchClause
-catchClauseWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.CatchClause"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclaration :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclaration id superClass body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Phantoms.unTTerm superClass)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-classDeclarationBody :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassBody
-classDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationId :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.Identifier
-classDeclarationId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationSuperClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.Expression)
-classDeclarationSuperClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-        Core.projectionField = (Core.Name "superClass")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationWithBody :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassBody -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "superClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classDeclarationWithComments :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.ClassDeclarationWithComments
-classDeclarationWithComments body comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-
-classDeclarationWithCommentsBody :: Phantoms.TTerm Syntax.ClassDeclarationWithComments -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithCommentsBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationWithCommentsComments :: Phantoms.TTerm Syntax.ClassDeclarationWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment)
-classDeclarationWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDeclarationWithCommentsWithBody :: Phantoms.TTerm Syntax.ClassDeclarationWithComments -> Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.ClassDeclarationWithComments
-classDeclarationWithCommentsWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithCommentsWithComments :: Phantoms.TTerm Syntax.ClassDeclarationWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.ClassDeclarationWithComments
-classDeclarationWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classDeclarationWithId :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "superClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDeclarationWithSuperClass :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ClassDeclaration
-classDeclarationWithSuperClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ClassDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commentBlock :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Comment
-commentBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Comment"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commentDocumentation :: Phantoms.TTerm Syntax.DocumentationComment -> Phantoms.TTerm Syntax.Comment
-commentDocumentation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Comment"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "documentation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commentLine :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Comment
-commentLine x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Comment"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "line"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditionalExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpression test consequent alternate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm test)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm consequent)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Phantoms.unTTerm alternate)}]}))
-
-conditionalExpressionAlternate :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression
-conditionalExpressionAlternate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-        Core.projectionField = (Core.Name "alternate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpressionConsequent :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression
-conditionalExpressionConsequent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-        Core.projectionField = (Core.Name "consequent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpressionTest :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression
-conditionalExpressionTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-        Core.projectionField = (Core.Name "test")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalExpressionWithAlternate :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionWithAlternate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-              Core.projectionField = (Core.Name "consequent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conditionalExpressionWithConsequent :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionWithConsequent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-              Core.projectionField = (Core.Name "alternate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalExpressionWithTest :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConditionalExpression
-conditionalExpressionWithTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-              Core.projectionField = (Core.Name "consequent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ConditionalExpression"),
-              Core.projectionField = (Core.Name "alternate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-doWhileStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DoWhileStatement
-doWhileStatement body test =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm test)}]}))
-
-doWhileStatementBody :: Phantoms.TTerm Syntax.DoWhileStatement -> Phantoms.TTerm Syntax.Statement
-doWhileStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doWhileStatementTest :: Phantoms.TTerm Syntax.DoWhileStatement -> Phantoms.TTerm Syntax.Expression
-doWhileStatementTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-        Core.projectionField = (Core.Name "test")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doWhileStatementWithBody :: Phantoms.TTerm Syntax.DoWhileStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.DoWhileStatement
-doWhileStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-doWhileStatementWithTest :: Phantoms.TTerm Syntax.DoWhileStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DoWhileStatement
-doWhileStatementWithTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DoWhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-documentationComment :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.DocumentationTag] -> Phantoms.TTerm Syntax.DocumentationComment
-documentationComment description tags =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Phantoms.unTTerm tags)}]}))
-
-documentationCommentDescription :: Phantoms.TTerm Syntax.DocumentationComment -> Phantoms.TTerm String
-documentationCommentDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentationCommentTags :: Phantoms.TTerm Syntax.DocumentationComment -> Phantoms.TTerm [Syntax.DocumentationTag]
-documentationCommentTags x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-        Core.projectionField = (Core.Name "tags")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentationCommentWithDescription :: Phantoms.TTerm Syntax.DocumentationComment -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.DocumentationComment
-documentationCommentWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-              Core.projectionField = (Core.Name "tags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-documentationCommentWithTags :: Phantoms.TTerm Syntax.DocumentationComment -> Phantoms.TTerm [Syntax.DocumentationTag] -> Phantoms.TTerm Syntax.DocumentationComment
-documentationCommentWithTags original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationComment"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-documentationTag :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.DocumentationTag
-documentationTag name type_ paramName description =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramName"),
-          Core.fieldTerm = (Phantoms.unTTerm paramName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)}]}))
-
-documentationTagDescription :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm String
-documentationTagDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentationTagName :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm String
-documentationTagName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentationTagParamName :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm (Maybe Syntax.Identifier)
-documentationTagParamName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-        Core.projectionField = (Core.Name "paramName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentationTagType :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm (Maybe Syntax.TypeExpression)
-documentationTagType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentationTagWithDescription :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.DocumentationTag
-documentationTagWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "paramName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-documentationTagWithName :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.DocumentationTag
-documentationTagWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "paramName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-documentationTagWithParamName :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.DocumentationTag
-documentationTagWithParamName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-documentationTagWithType :: Phantoms.TTerm Syntax.DocumentationTag -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.DocumentationTag
-documentationTagWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "paramName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.DocumentationTag"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exportAllDeclaration :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.ExportAllDeclaration
-exportAllDeclaration exported source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "exported"),
-          Core.fieldTerm = (Phantoms.unTTerm exported)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-exportAllDeclarationExported :: Phantoms.TTerm Syntax.ExportAllDeclaration -> Phantoms.TTerm (Maybe Syntax.Identifier)
-exportAllDeclarationExported x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-        Core.projectionField = (Core.Name "exported")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exportAllDeclarationSource :: Phantoms.TTerm Syntax.ExportAllDeclaration -> Phantoms.TTerm Syntax.StringLiteral
-exportAllDeclarationSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exportAllDeclarationWithExported :: Phantoms.TTerm Syntax.ExportAllDeclaration -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.ExportAllDeclaration
-exportAllDeclarationWithExported original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "exported"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exportAllDeclarationWithSource :: Phantoms.TTerm Syntax.ExportAllDeclaration -> Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.ExportAllDeclaration
-exportAllDeclarationWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "exported"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"),
-              Core.projectionField = (Core.Name "exported")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exportDeclarationAll :: Phantoms.TTerm Syntax.ExportAllDeclaration -> Phantoms.TTerm Syntax.ExportDeclaration
-exportDeclarationAll x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exportDeclarationDeclaration :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ExportDeclaration
-exportDeclarationDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exportDeclarationDefault :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ExportDeclaration
-exportDeclarationDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exportDeclarationNamed :: Phantoms.TTerm Syntax.NamedExport -> Phantoms.TTerm Syntax.ExportDeclaration
-exportDeclarationNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportDeclaration"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exportSpecifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExportSpecifier
-exportSpecifier local exported =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm local)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exported"),
-          Core.fieldTerm = (Phantoms.unTTerm exported)}]}))
-
-exportSpecifierExported :: Phantoms.TTerm Syntax.ExportSpecifier -> Phantoms.TTerm Syntax.Identifier
-exportSpecifierExported x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-        Core.projectionField = (Core.Name "exported")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exportSpecifierLocal :: Phantoms.TTerm Syntax.ExportSpecifier -> Phantoms.TTerm Syntax.Identifier
-exportSpecifierLocal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-        Core.projectionField = (Core.Name "local")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exportSpecifierWithExported :: Phantoms.TTerm Syntax.ExportSpecifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExportSpecifier
-exportSpecifierWithExported original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-              Core.projectionField = (Core.Name "local")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exported"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exportSpecifierWithLocal :: Phantoms.TTerm Syntax.ExportSpecifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ExportSpecifier
-exportSpecifierWithLocal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exported"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ExportSpecifier"),
-              Core.projectionField = (Core.Name "exported")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-expressionArray :: Phantoms.TTerm Syntax.ArrayExpression -> Phantoms.TTerm Syntax.Expression
-expressionArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionArrow :: Phantoms.TTerm Syntax.ArrowFunctionExpression -> Phantoms.TTerm Syntax.Expression
-expressionArrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrow"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionAssignment :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression
-expressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionAwait :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionAwait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "await"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBinary :: Phantoms.TTerm Syntax.BinaryExpression -> Phantoms.TTerm Syntax.Expression
-expressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCall :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm Syntax.Expression
-expressionCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionConditional :: Phantoms.TTerm Syntax.ConditionalExpression -> Phantoms.TTerm Syntax.Expression
-expressionConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionFunction :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Syntax.Expression
-expressionFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Expression
-expressionIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Expression
-expressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionMember :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Syntax.Expression
-expressionMember x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "member"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionNew :: Phantoms.TTerm Syntax.CallExpression -> Phantoms.TTerm Syntax.Expression
-expressionNew x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionObject :: Phantoms.TTerm Syntax.ObjectExpression -> Phantoms.TTerm Syntax.Expression
-expressionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionParenthesized :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionSequence :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression
-expressionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionSpread :: Phantoms.TTerm Syntax.SpreadElement -> Phantoms.TTerm Syntax.Expression
-expressionSpread x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "spread"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionThis :: Phantoms.TTerm Syntax.Expression
-expressionThis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-expressionUnary :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.Expression
-expressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionYield :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Expression
-expressionYield x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "yield"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInLeftPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.ForInLeft
-forInLeftPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInLeft"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInLeftVariable :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.ForInLeft
-forInLeftVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInLeft"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInStatement :: Phantoms.TTerm Syntax.ForInLeft -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForInStatement
-forInStatement left right body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forInStatementBody :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.Statement
-forInStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forInStatementLeft :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.ForInLeft
-forInStatementLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forInStatementRight :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.Expression
-forInStatementRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forInStatementWithBody :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForInStatement
-forInStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forInStatementWithLeft :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.ForInLeft -> Phantoms.TTerm Syntax.ForInStatement
-forInStatementWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forInStatementWithRight :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForInStatement
-forInStatementWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forInitExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForInit
-forInitExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forInitVariable :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.ForInit
-forInitVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ForInit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-forOfStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ForInLeft -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForOfStatement
-forOfStatement await left right body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Phantoms.unTTerm await)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forOfStatementAwait :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Bool
-forOfStatementAwait x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-        Core.projectionField = (Core.Name "await")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forOfStatementBody :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.Statement
-forOfStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forOfStatementLeft :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.ForInLeft
-forOfStatementLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forOfStatementRight :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.Expression
-forOfStatementRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forOfStatementWithAwait :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ForOfStatement
-forOfStatementWithAwait original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forOfStatementWithBody :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForOfStatement
-forOfStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "await")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forOfStatementWithLeft :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.ForInLeft -> Phantoms.TTerm Syntax.ForOfStatement
-forOfStatementWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "await")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forOfStatementWithRight :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForOfStatement
-forOfStatementWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "await")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForOfStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatement :: Phantoms.TTerm (Maybe Syntax.ForInit) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForStatement
-forStatement init test update body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm test)},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Phantoms.unTTerm update)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forStatementBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Statement
-forStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementInit :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.ForInit)
-forStatementInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementTest :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-forStatementTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "test")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementUpdate :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-forStatementUpdate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "update")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementWithBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "update")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStatementWithInit :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.ForInit) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "update")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithTest :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "update")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithUpdate :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithUpdate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "update"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclaration :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclaration id params body async generator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Phantoms.unTTerm generator)}]}))
-
-functionDeclarationAsync :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Bool
-functionDeclarationAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationBody :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.BlockStatement
-functionDeclarationBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationGenerator :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Bool
-functionDeclarationGenerator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "generator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationId :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.Identifier
-functionDeclarationId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationParams :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.Pattern]
-functionDeclarationParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationWithAsync :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithBody :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithComments :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.FunctionDeclarationWithComments
-functionDeclarationWithComments body comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-
-functionDeclarationWithCommentsBody :: Phantoms.TTerm Syntax.FunctionDeclarationWithComments -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithCommentsBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationWithCommentsComments :: Phantoms.TTerm Syntax.FunctionDeclarationWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment)
-functionDeclarationWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDeclarationWithCommentsWithBody :: Phantoms.TTerm Syntax.FunctionDeclarationWithComments -> Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.FunctionDeclarationWithComments
-functionDeclarationWithCommentsWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithCommentsWithComments :: Phantoms.TTerm Syntax.FunctionDeclarationWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.FunctionDeclarationWithComments
-functionDeclarationWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionDeclarationWithGenerator :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithGenerator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionDeclarationWithId :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDeclarationWithParams :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.FunctionDeclaration
-functionDeclarationWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionDeclaration"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionExpression :: Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionExpression
-functionExpression id params body async generator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Phantoms.unTTerm generator)}]}))
-
-functionExpressionAsync :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Bool
-functionExpressionAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionBody :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Syntax.BlockStatement
-functionExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionGenerator :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Bool
-functionExpressionGenerator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-        Core.projectionField = (Core.Name "generator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionId :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm (Maybe Syntax.Identifier)
-functionExpressionId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionParams :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm [Syntax.Pattern]
-functionExpressionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionWithAsync :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionExpression
-functionExpressionWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionExpressionWithBody :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.FunctionExpression
-functionExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionExpressionWithGenerator :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionExpression
-functionExpressionWithGenerator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionExpressionWithId :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm (Maybe Syntax.Identifier) -> Phantoms.TTerm Syntax.FunctionExpression
-functionExpressionWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionExpressionWithParams :: Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.FunctionExpression
-functionExpressionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionExpression"),
-              Core.projectionField = (Core.Name "generator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionTypeExpression :: Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.FunctionTypeExpression
-functionTypeExpression typeParameters parameters returnType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)}]}))
-
-functionTypeExpressionParameters :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm [Syntax.TypeExpression]
-functionTypeExpressionParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeExpressionReturnType :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-functionTypeExpressionReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeExpressionTypeParameters :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm [Syntax.TypeParameter]
-functionTypeExpressionTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-        Core.projectionField = (Core.Name "typeParameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeExpressionWithParameters :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.FunctionTypeExpression
-functionTypeExpressionWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionTypeExpressionWithReturnType :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.FunctionTypeExpression
-functionTypeExpressionWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-              Core.projectionField = (Core.Name "typeParameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionTypeExpressionWithTypeParameters :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.FunctionTypeExpression
-functionTypeExpressionWithTypeParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identifier :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Identifier
-identifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.Identifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-ifStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm (Maybe Syntax.Statement) -> Phantoms.TTerm Syntax.IfStatement
-ifStatement test consequent alternate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm test)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm consequent)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Phantoms.unTTerm alternate)}]}))
-
-ifStatementAlternate :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm (Maybe Syntax.Statement)
-ifStatementAlternate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "alternate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementConsequent :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Statement
-ifStatementConsequent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "consequent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementTest :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Expression
-ifStatementTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "test")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementWithAlternate :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm (Maybe Syntax.Statement) -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithAlternate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "consequent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifStatementWithConsequent :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithConsequent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "alternate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStatementWithTest :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "consequent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alternate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "alternate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importClauseDefault :: Phantoms.TTerm Syntax.ImportDefaultSpecifier -> Phantoms.TTerm Syntax.ImportClause
-importClauseDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importClauseNamed :: Phantoms.TTerm Syntax.ImportSpecifier -> Phantoms.TTerm Syntax.ImportClause
-importClauseNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importClauseNamespace :: Phantoms.TTerm Syntax.ImportNamespaceSpecifier -> Phantoms.TTerm Syntax.ImportClause
-importClauseNamespace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "namespace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importDeclaration :: Phantoms.TTerm [Syntax.ImportClause] -> Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclaration specifiers source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm specifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-importDeclarationSource :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.StringLiteral
-importDeclarationSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importDeclarationSpecifiers :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm [Syntax.ImportClause]
-importDeclarationSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-        Core.projectionField = (Core.Name "specifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importDeclarationWithSource :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-              Core.projectionField = (Core.Name "specifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importDeclarationWithSpecifiers :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm [Syntax.ImportClause] -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationWithSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportDeclaration"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importDefaultSpecifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImportDefaultSpecifier
-importDefaultSpecifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.ImportDefaultSpecifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importNamespaceSpecifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImportNamespaceSpecifier
-importNamespaceSpecifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.ImportNamespaceSpecifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importSpecifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImportSpecifier
-importSpecifier imported local =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "imported"),
-          Core.fieldTerm = (Phantoms.unTTerm imported)},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm local)}]}))
-
-importSpecifierImported :: Phantoms.TTerm Syntax.ImportSpecifier -> Phantoms.TTerm Syntax.Identifier
-importSpecifierImported x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-        Core.projectionField = (Core.Name "imported")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importSpecifierLocal :: Phantoms.TTerm Syntax.ImportSpecifier -> Phantoms.TTerm Syntax.Identifier
-importSpecifierLocal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-        Core.projectionField = (Core.Name "local")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importSpecifierWithImported :: Phantoms.TTerm Syntax.ImportSpecifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImportSpecifier
-importSpecifierWithImported original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "imported"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-              Core.projectionField = (Core.Name "local")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importSpecifierWithLocal :: Phantoms.TTerm Syntax.ImportSpecifier -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.ImportSpecifier
-importSpecifierWithLocal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "imported"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ImportSpecifier"),
-              Core.projectionField = (Core.Name "imported")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labeledStatement :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatement label body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-labeledStatementBody :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-labeledStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementLabel :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Identifier
-labeledStatementLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.LabeledStatement"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledStatementWithBody :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.LabeledStatement"),
-      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.javaScript.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labeledStatementWithLabel :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.LabeledStatement
-labeledStatementWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.LabeledStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.LabeledStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalBigInt :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.Literal
-literalBigInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigInt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNull :: Phantoms.TTerm Syntax.Literal
-literalNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalNumber :: Phantoms.TTerm Syntax.NumericLiteral -> Phantoms.TTerm Syntax.Literal
-literalNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalString :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalTemplate :: Phantoms.TTerm Syntax.TemplateLiteral -> Phantoms.TTerm Syntax.Literal
-literalTemplate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "template"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalUndefined :: Phantoms.TTerm Syntax.Literal
-literalUndefined =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefined"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-memberExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MemberExpression
-memberExpression object property computed optional =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Phantoms.unTTerm computed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)}]}))
-
-memberExpressionComputed :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Bool
-memberExpressionComputed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-        Core.projectionField = (Core.Name "computed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberExpressionObject :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Syntax.Expression
-memberExpressionObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberExpressionOptional :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Bool
-memberExpressionOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberExpressionProperty :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Syntax.Expression
-memberExpressionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-memberExpressionWithComputed :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MemberExpression
-memberExpressionWithComputed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberExpressionWithObject :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MemberExpression
-memberExpressionWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-memberExpressionWithOptional :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MemberExpression
-memberExpressionWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-memberExpressionWithProperty :: Phantoms.TTerm Syntax.MemberExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MemberExpression
-memberExpressionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MemberExpression"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDefinition :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Syntax.MethodKind -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodDefinition
-methodDefinition key value kind computed static =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Phantoms.unTTerm computed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "static"),
-          Core.fieldTerm = (Phantoms.unTTerm static)}]}))
-
-methodDefinitionComputed :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Bool
-methodDefinitionComputed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-        Core.projectionField = (Core.Name "computed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDefinitionKey :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Syntax.Expression
-methodDefinitionKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDefinitionKind :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Syntax.MethodKind
-methodDefinitionKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDefinitionStatic :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Bool
-methodDefinitionStatic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-        Core.projectionField = (Core.Name "static")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDefinitionValue :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Syntax.FunctionExpression
-methodDefinitionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodDefinitionWithComputed :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodDefinition
-methodDefinitionWithComputed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-      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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "static"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "static")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDefinitionWithKey :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MethodDefinition
-methodDefinitionWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "static"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "static")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDefinitionWithKind :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Syntax.MethodKind -> Phantoms.TTerm Syntax.MethodDefinition
-methodDefinitionWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-      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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "static"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "static")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodDefinitionWithStatic :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.MethodDefinition
-methodDefinitionWithStatic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-      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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "static"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodDefinitionWithValue :: Phantoms.TTerm Syntax.MethodDefinition -> Phantoms.TTerm Syntax.FunctionExpression -> Phantoms.TTerm Syntax.MethodDefinition
-methodDefinitionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-      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.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "static"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodDefinition"),
-              Core.projectionField = (Core.Name "static")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodKindConstructor :: Phantoms.TTerm Syntax.MethodKind
-methodKindConstructor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodKindGet :: Phantoms.TTerm Syntax.MethodKind
-methodKindGet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "get"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodKindMethod :: Phantoms.TTerm Syntax.MethodKind
-methodKindMethod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-methodKindSet :: Phantoms.TTerm Syntax.MethodKind
-methodKindSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.MethodKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-moduleItemExport :: Phantoms.TTerm Syntax.ExportDeclaration -> Phantoms.TTerm Syntax.ModuleItem
-moduleItemExport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "export"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleItemImport :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.ModuleItem
-moduleItemImport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "import"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleItemStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.ModuleItem
-moduleItemStatement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "statement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-moduleItemWithComments :: Phantoms.TTerm Syntax.ModuleItem -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.ModuleItemWithComments
-moduleItemWithComments body comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-
-moduleItemWithCommentsBody :: Phantoms.TTerm Syntax.ModuleItemWithComments -> Phantoms.TTerm Syntax.ModuleItem
-moduleItemWithCommentsBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleItemWithCommentsComments :: Phantoms.TTerm Syntax.ModuleItemWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment)
-moduleItemWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleItemWithCommentsWithBody :: Phantoms.TTerm Syntax.ModuleItemWithComments -> Phantoms.TTerm Syntax.ModuleItem -> Phantoms.TTerm Syntax.ModuleItemWithComments
-moduleItemWithCommentsWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-moduleItemWithCommentsWithComments :: Phantoms.TTerm Syntax.ModuleItemWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.ModuleItemWithComments
-moduleItemWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedExport :: Phantoms.TTerm [Syntax.ExportSpecifier] -> Phantoms.TTerm (Maybe Syntax.StringLiteral) -> Phantoms.TTerm Syntax.NamedExport
-namedExport specifiers source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm specifiers)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-namedExportSource :: Phantoms.TTerm Syntax.NamedExport -> Phantoms.TTerm (Maybe Syntax.StringLiteral)
-namedExportSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedExportSpecifiers :: Phantoms.TTerm Syntax.NamedExport -> Phantoms.TTerm [Syntax.ExportSpecifier]
-namedExportSpecifiers x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-        Core.projectionField = (Core.Name "specifiers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedExportWithSource :: Phantoms.TTerm Syntax.NamedExport -> Phantoms.TTerm (Maybe Syntax.StringLiteral) -> Phantoms.TTerm Syntax.NamedExport
-namedExportWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifiers"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-              Core.projectionField = (Core.Name "specifiers")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedExportWithSpecifiers :: Phantoms.TTerm Syntax.NamedExport -> Phantoms.TTerm [Syntax.ExportSpecifier] -> Phantoms.TTerm Syntax.NamedExport
-namedExportWithSpecifiers original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specifiers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.NamedExport"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericLiteralFloat :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.NumericLiteral
-numericLiteralFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericLiteralInteger :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Syntax.NumericLiteral
-numericLiteralInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPattern :: Phantoms.TTerm [Syntax.ObjectPatternProperty] -> Phantoms.TTerm Syntax.ObjectPattern
-objectPattern properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ObjectPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-objectPatternProperties :: Phantoms.TTerm Syntax.ObjectPattern -> Phantoms.TTerm [Syntax.ObjectPatternProperty]
-objectPatternProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ObjectPattern"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPatternPropertyProperty :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.ObjectPatternProperty
-objectPatternPropertyProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ObjectPatternProperty"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPatternPropertyRest :: Phantoms.TTerm Syntax.RestElement -> Phantoms.TTerm Syntax.ObjectPatternProperty
-objectPatternPropertyRest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.ObjectPatternProperty"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPatternWithProperties :: Phantoms.TTerm Syntax.ObjectPattern -> Phantoms.TTerm [Syntax.ObjectPatternProperty] -> Phantoms.TTerm Syntax.ObjectPattern
-objectPatternWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ObjectPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parameterizedTypeExpression :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.ParameterizedTypeExpression
-parameterizedTypeExpression base arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-parameterizedTypeExpressionArguments :: Phantoms.TTerm Syntax.ParameterizedTypeExpression -> Phantoms.TTerm [Syntax.TypeExpression]
-parameterizedTypeExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterizedTypeExpressionBase :: Phantoms.TTerm Syntax.ParameterizedTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-parameterizedTypeExpressionBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterizedTypeExpressionWithArguments :: Phantoms.TTerm Syntax.ParameterizedTypeExpression -> Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.ParameterizedTypeExpression
-parameterizedTypeExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parameterizedTypeExpressionWithBase :: Phantoms.TTerm Syntax.ParameterizedTypeExpression -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.ParameterizedTypeExpression
-parameterizedTypeExpressionWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternArray :: Phantoms.TTerm Syntax.ArrayPattern -> Phantoms.TTerm Syntax.Pattern
-patternArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternAssignment :: Phantoms.TTerm Syntax.AssignmentPattern -> Phantoms.TTerm Syntax.Pattern
-patternAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.Pattern
-patternIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternObject :: Phantoms.TTerm Syntax.ObjectPattern -> Phantoms.TTerm Syntax.Pattern
-patternObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternRest :: Phantoms.TTerm Syntax.RestElement -> Phantoms.TTerm Syntax.Pattern
-patternRest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-program :: Phantoms.TTerm [Syntax.ModuleItem] -> Phantoms.TTerm Syntax.SourceType -> Phantoms.TTerm Syntax.Program
-program body sourceType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceType"),
-          Core.fieldTerm = (Phantoms.unTTerm sourceType)}]}))
-
-programBody :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.ModuleItem]
-programBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programSourceType :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm Syntax.SourceType
-programSourceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-        Core.projectionField = (Core.Name "sourceType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programWithBody :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.ModuleItem] -> Phantoms.TTerm Syntax.Program
-programWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-              Core.projectionField = (Core.Name "sourceType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-programWithSourceType :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm Syntax.SourceType -> Phantoms.TTerm Syntax.Program
-programWithSourceType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Program"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-property :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PropertyKind -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Property
-property key value kind computed shorthand =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Phantoms.unTTerm computed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "shorthand"),
-          Core.fieldTerm = (Phantoms.unTTerm shorthand)}]}))
-
-propertyComputed :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Bool
-propertyComputed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-        Core.projectionField = (Core.Name "computed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyKey :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.Expression
-propertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyKind :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.PropertyKind
-propertyKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyKindGet :: Phantoms.TTerm Syntax.PropertyKind
-propertyKindGet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertyKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "get"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyKindInit :: Phantoms.TTerm Syntax.PropertyKind
-propertyKindInit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertyKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "init"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyKindSet :: Phantoms.TTerm Syntax.PropertyKind
-propertyKindSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertyKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-propertyShorthand :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Bool
-propertyShorthand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-        Core.projectionField = (Core.Name "shorthand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySignature :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.PropertySignature
-propertySignature name type_ optional readonly =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "readonly"),
-          Core.fieldTerm = (Phantoms.unTTerm readonly)}]}))
-
-propertySignatureName :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Syntax.Identifier
-propertySignatureName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySignatureOptional :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Bool
-propertySignatureOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySignatureReadonly :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Bool
-propertySignatureReadonly x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-        Core.projectionField = (Core.Name "readonly")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySignatureType :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Syntax.TypeExpression
-propertySignatureType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySignatureWithName :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.PropertySignature
-propertySignatureWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "readonly"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "readonly")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertySignatureWithOptional :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.PropertySignature
-propertySignatureWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "readonly"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "readonly")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertySignatureWithReadonly :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.PropertySignature
-propertySignatureWithReadonly original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "readonly"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertySignatureWithType :: Phantoms.TTerm Syntax.PropertySignature -> Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.PropertySignature
-propertySignatureWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "readonly"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.PropertySignature"),
-              Core.projectionField = (Core.Name "readonly")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyValue :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.Expression
-propertyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyWithComputed :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Property
-propertyWithComputed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "shorthand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "shorthand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithKey :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Property
-propertyWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "shorthand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "shorthand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithKind :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.PropertyKind -> Phantoms.TTerm Syntax.Property
-propertyWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "shorthand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "shorthand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithShorthand :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Property
-propertyWithShorthand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "shorthand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyWithValue :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Property
-propertyWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.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.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "computed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "computed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "shorthand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.Property"),
-              Core.projectionField = (Core.Name "shorthand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-restElement :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.RestElement
-restElement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.RestElement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-sourceTypeModule :: Phantoms.TTerm Syntax.SourceType
-sourceTypeModule =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.SourceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "module"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sourceTypeScript :: Phantoms.TTerm Syntax.SourceType
-sourceTypeScript =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.SourceType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "script"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-spreadElement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SpreadElement
-spreadElement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.SpreadElement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-statementBlock :: Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.Statement
-statementBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementBreak :: Phantoms.TTerm Syntax.BreakStatement -> Phantoms.TTerm Syntax.Statement
-statementBreak x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementClassDeclaration :: Phantoms.TTerm Syntax.ClassDeclaration -> Phantoms.TTerm Syntax.Statement
-statementClassDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classDeclaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementContinue :: Phantoms.TTerm Syntax.ContinueStatement -> Phantoms.TTerm Syntax.Statement
-statementContinue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementDebugger :: Phantoms.TTerm Syntax.Statement
-statementDebugger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "debugger"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-statementDoWhile :: Phantoms.TTerm Syntax.DoWhileStatement -> Phantoms.TTerm Syntax.Statement
-statementDoWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doWhile"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementEmpty :: Phantoms.TTerm Syntax.Statement
-statementEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-statementExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement
-statementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementFor :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Statement
-statementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementForIn :: Phantoms.TTerm Syntax.ForInStatement -> Phantoms.TTerm Syntax.Statement
-statementForIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forIn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementForOf :: Phantoms.TTerm Syntax.ForOfStatement -> Phantoms.TTerm Syntax.Statement
-statementForOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementFunctionDeclaration :: Phantoms.TTerm Syntax.FunctionDeclaration -> Phantoms.TTerm Syntax.Statement
-statementFunctionDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionDeclaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementIf :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Statement
-statementIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLabeled :: Phantoms.TTerm Syntax.LabeledStatement -> Phantoms.TTerm Syntax.Statement
-statementLabeled x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeled"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementReturn :: Phantoms.TTerm Syntax.ReturnStatement -> Phantoms.TTerm Syntax.Statement
-statementReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSwitch :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Statement
-statementSwitch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "switch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementThrow :: Phantoms.TTerm Syntax.ThrowStatement -> Phantoms.TTerm Syntax.Statement
-statementThrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "throw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementTry :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.Statement
-statementTry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "try"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementVariableDeclaration :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.Statement
-statementVariableDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variableDeclaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWhile :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement
-statementWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementWithComments :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.StatementWithComments
-statementWithComments body comments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))
-
-statementWithCommentsBody :: Phantoms.TTerm Syntax.StatementWithComments -> Phantoms.TTerm Syntax.Statement
-statementWithCommentsBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statementWithCommentsComments :: Phantoms.TTerm Syntax.StatementWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment)
-statementWithCommentsComments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-        Core.projectionField = (Core.Name "comments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statementWithCommentsWithBody :: Phantoms.TTerm Syntax.StatementWithComments -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.StatementWithComments
-statementWithCommentsWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-              Core.projectionField = (Core.Name "comments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statementWithCommentsWithComments :: Phantoms.TTerm Syntax.StatementWithComments -> Phantoms.TTerm (Maybe Syntax.DocumentationComment) -> Phantoms.TTerm Syntax.StatementWithComments
-statementWithCommentsWithComments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StatementWithComments"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StringLiteral
-stringLiteral value singleQuote =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "singleQuote"),
-          Core.fieldTerm = (Phantoms.unTTerm singleQuote)}]}))
-
-stringLiteralSingleQuote :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Bool
-stringLiteralSingleQuote x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-        Core.projectionField = (Core.Name "singleQuote")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringLiteralValue :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm String
-stringLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringLiteralWithSingleQuote :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StringLiteral
-stringLiteralWithSingleQuote original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "singleQuote"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringLiteralWithValue :: Phantoms.TTerm Syntax.StringLiteral -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteral
-stringLiteralWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "singleQuote"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.StringLiteral"),
-              Core.projectionField = (Core.Name "singleQuote")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-switchCase :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.SwitchCase
-switchCase test consequent =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm test)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm consequent)}]}))
-
-switchCaseConsequent :: Phantoms.TTerm Syntax.SwitchCase -> Phantoms.TTerm [Syntax.Statement]
-switchCaseConsequent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-        Core.projectionField = (Core.Name "consequent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchCaseTest :: Phantoms.TTerm Syntax.SwitchCase -> Phantoms.TTerm (Maybe Syntax.Expression)
-switchCaseTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-        Core.projectionField = (Core.Name "test")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchCaseWithConsequent :: Phantoms.TTerm Syntax.SwitchCase -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.SwitchCase
-switchCaseWithConsequent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchCaseWithTest :: Phantoms.TTerm Syntax.SwitchCase -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SwitchCase
-switchCaseWithTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchCase"),
-              Core.projectionField = (Core.Name "consequent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-switchStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.SwitchCase] -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatement discriminant cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "discriminant"),
-          Core.fieldTerm = (Phantoms.unTTerm discriminant)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-switchStatementCases :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm [Syntax.SwitchCase]
-switchStatementCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementDiscriminant :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression
-switchStatementDiscriminant x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-        Core.projectionField = (Core.Name "discriminant")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-switchStatementWithCases :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm [Syntax.SwitchCase] -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "discriminant"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "discriminant")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-switchStatementWithDiscriminant :: Phantoms.TTerm Syntax.SwitchStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SwitchStatement
-switchStatementWithDiscriminant original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "discriminant"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.SwitchStatement"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateElement :: Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TemplateElement
-templateElement value tail =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm tail)}]}))
-
-templateElementTail :: Phantoms.TTerm Syntax.TemplateElement -> Phantoms.TTerm Bool
-templateElementTail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-        Core.projectionField = (Core.Name "tail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateElementValue :: Phantoms.TTerm Syntax.TemplateElement -> Phantoms.TTerm String
-templateElementValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateElementWithTail :: Phantoms.TTerm Syntax.TemplateElement -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TemplateElement
-templateElementWithTail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-templateElementWithValue :: Phantoms.TTerm Syntax.TemplateElement -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TemplateElement
-templateElementWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateElement"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateLiteral :: Phantoms.TTerm [Syntax.TemplateElement] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.TemplateLiteral
-templateLiteral quasis expressions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quasis"),
-          Core.fieldTerm = (Phantoms.unTTerm quasis)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)}]}))
-
-templateLiteralExpressions :: Phantoms.TTerm Syntax.TemplateLiteral -> Phantoms.TTerm [Syntax.Expression]
-templateLiteralExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateLiteralQuasis :: Phantoms.TTerm Syntax.TemplateLiteral -> Phantoms.TTerm [Syntax.TemplateElement]
-templateLiteralQuasis x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-        Core.projectionField = (Core.Name "quasis")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateLiteralWithExpressions :: Phantoms.TTerm Syntax.TemplateLiteral -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.TemplateLiteral
-templateLiteralWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quasis"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-              Core.projectionField = (Core.Name "quasis")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-templateLiteralWithQuasis :: Phantoms.TTerm Syntax.TemplateLiteral -> Phantoms.TTerm [Syntax.TemplateElement] -> Phantoms.TTerm Syntax.TemplateLiteral
-templateLiteralWithQuasis original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quasis"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TemplateLiteral"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-throwStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ThrowStatement
-throwStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.ThrowStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tryStatement :: Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm (Maybe Syntax.CatchClause) -> Phantoms.TTerm (Maybe Syntax.BlockStatement) -> Phantoms.TTerm Syntax.TryStatement
-tryStatement block handler finalizer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)},
-        Core.Field {
-          Core.fieldName = (Core.Name "handler"),
-          Core.fieldTerm = (Phantoms.unTTerm handler)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finalizer"),
-          Core.fieldTerm = (Phantoms.unTTerm finalizer)}]}))
-
-tryStatementBlock :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.BlockStatement
-tryStatementBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatementFinalizer :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm (Maybe Syntax.BlockStatement)
-tryStatementFinalizer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-        Core.projectionField = (Core.Name "finalizer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatementHandler :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm (Maybe Syntax.CatchClause)
-tryStatementHandler x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-        Core.projectionField = (Core.Name "handler")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryStatementWithBlock :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.BlockStatement -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "handler"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "handler")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finalizer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "finalizer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryStatementWithFinalizer :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm (Maybe Syntax.BlockStatement) -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithFinalizer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "handler"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "handler")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finalizer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryStatementWithHandler :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm (Maybe Syntax.CatchClause) -> Phantoms.TTerm Syntax.TryStatement
-tryStatementWithHandler original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "handler"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finalizer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TryStatement"),
-              Core.projectionField = (Core.Name "finalizer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAnnotation :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TypeAnnotation
-typeAnnotation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.javaScript.syntax.TypeAnnotation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeExpressionAny :: Phantoms.TTerm Syntax.TypeExpression
-typeExpressionAny =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeExpressionArray :: Phantoms.TTerm Syntax.ArrayTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionFunction :: Phantoms.TTerm Syntax.FunctionTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionNever :: Phantoms.TTerm Syntax.TypeExpression
-typeExpressionNever =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "never"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeExpressionObject :: Phantoms.TTerm Syntax.ObjectTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionOptional :: Phantoms.TTerm Syntax.TypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionOptional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "optional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionParameterized :: Phantoms.TTerm Syntax.ParameterizedTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionParameterized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionUnion :: Phantoms.TTerm Syntax.UnionTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionVoid :: Phantoms.TTerm Syntax.TypeExpression
-typeExpressionVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeParameter :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.TypeParameter
-typeParameter name constraint default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Phantoms.unTTerm constraint)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-typeParameterConstraint :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm (Maybe Syntax.TypeExpression)
-typeParameterConstraint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-        Core.projectionField = (Core.Name "constraint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterDefault :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm (Maybe Syntax.TypeExpression)
-typeParameterDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterName :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.Identifier
-typeParameterName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeParameterWithConstraint :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterWithConstraint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeParameterWithDefault :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm (Maybe Syntax.TypeExpression) -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "constraint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeParameterWithName :: Phantoms.TTerm Syntax.TypeParameter -> Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "constraint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.TypeParameter"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unArrayTypeExpression :: Phantoms.TTerm Syntax.ArrayTypeExpression -> Phantoms.TTerm Syntax.TypeExpression
-unArrayTypeExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.ArrayTypeExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdentifier :: Phantoms.TTerm Syntax.Identifier -> Phantoms.TTerm String
-unIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.Identifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImportDefaultSpecifier :: Phantoms.TTerm Syntax.ImportDefaultSpecifier -> Phantoms.TTerm Syntax.Identifier
-unImportDefaultSpecifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.ImportDefaultSpecifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImportNamespaceSpecifier :: Phantoms.TTerm Syntax.ImportNamespaceSpecifier -> Phantoms.TTerm Syntax.Identifier
-unImportNamespaceSpecifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.ImportNamespaceSpecifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRestElement :: Phantoms.TTerm Syntax.RestElement -> Phantoms.TTerm Syntax.Pattern
-unRestElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.RestElement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSpreadElement :: Phantoms.TTerm Syntax.SpreadElement -> Phantoms.TTerm Syntax.Expression
-unSpreadElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.SpreadElement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unThrowStatement :: Phantoms.TTerm Syntax.ThrowStatement -> Phantoms.TTerm Syntax.Expression
-unThrowStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.ThrowStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeAnnotation :: Phantoms.TTerm Syntax.TypeAnnotation -> Phantoms.TTerm Syntax.TypeExpression
-unTypeAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.javaScript.syntax.TypeAnnotation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpression :: Phantoms.TTerm Syntax.UnaryOperator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpression operator argument prefix =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm prefix)}]}))
-
-unaryExpressionArgument :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.Expression
-unaryExpressionArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionOperator :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryOperator
-unaryExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionPrefix :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Bool
-unaryExpressionPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-        Core.projectionField = (Core.Name "prefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionWithArgument :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryExpressionWithOperator :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Syntax.UnaryOperator -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryExpressionWithPrefix :: Phantoms.TTerm Syntax.UnaryExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.UnaryExpression
-unaryExpressionWithPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryExpression"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryOperatorBitwiseNot :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorBitwiseNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitwiseNot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorDecrement :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorDecrement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decrement"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorDelete :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorDelete =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delete"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorIncrement :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorIncrement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "increment"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorNegate :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorNegate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorNot :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorPlus :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorTypeof :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorTypeof =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeof"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOperatorVoid :: Phantoms.TTerm Syntax.UnaryOperator
-unaryOperatorVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-variableDeclaration :: Phantoms.TTerm Syntax.VariableKind -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclaration kind declarations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))
-
-variableDeclarationDeclarations :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator]
-variableDeclarationDeclarations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-        Core.projectionField = (Core.Name "declarations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclarationKind :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.VariableKind
-variableDeclarationKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclarationWithDeclarations :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm [Syntax.VariableDeclarator] -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclarationWithDeclarations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDeclarationWithKind :: Phantoms.TTerm Syntax.VariableDeclaration -> Phantoms.TTerm Syntax.VariableKind -> Phantoms.TTerm Syntax.VariableDeclaration
-variableDeclarationWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "declarations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclaration"),
-              Core.projectionField = (Core.Name "declarations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclarator :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclarator id init =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)}]}))
-
-variableDeclaratorId :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm Syntax.Pattern
-variableDeclaratorId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorInit :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm (Maybe Syntax.Expression)
-variableDeclaratorInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDeclaratorWithId :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclaratorWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDeclaratorWithInit :: Phantoms.TTerm Syntax.VariableDeclarator -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.VariableDeclarator
-variableDeclaratorWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableDeclarator"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableKindConst :: Phantoms.TTerm Syntax.VariableKind
-variableKindConst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-variableKindLet :: Phantoms.TTerm Syntax.VariableKind
-variableKindLet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-variableKindVar :: Phantoms.TTerm Syntax.VariableKind
-variableKindVar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.javaScript.syntax.VariableKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-whileStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatement test body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm test)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-whileStatementBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement
-whileStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementTest :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Expression
-whileStatementTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "test")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementWithBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "test")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileStatementWithTest :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "test"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.javaScript.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Json/Model.hs b/src/main/haskell/Hydra/Dsl/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Json/Model.hs
+++ /dev/null
@@ -1,52 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.json.model
-
-module Hydra.Dsl.Json.Model where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-valueArray :: Phantoms.TTerm [Model.Value] -> Phantoms.TTerm Model.Value
-valueArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-valueBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Model.Value
-valueBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-valueNull :: Phantoms.TTerm Model.Value
-valueNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-valueNumber :: Phantoms.TTerm Sci.Scientific -> Phantoms.TTerm Model.Value
-valueNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-valueObject :: Phantoms.TTerm (M.Map String Model.Value) -> Phantoms.TTerm Model.Value
-valueObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-valueString :: Phantoms.TTerm String -> Phantoms.TTerm Model.Value
-valueString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Json/Schema.hs b/src/main/haskell/Hydra/Dsl/Json/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Json/Schema.hs
+++ /dev/null
@@ -1,605 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.json.schema
-
-module Hydra.Dsl.Json.Schema where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Json.Schema as Schema
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-additionalItemsAny :: Phantoms.TTerm Bool -> Phantoms.TTerm Schema.AdditionalItems
-additionalItemsAny x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.AdditionalItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-additionalItemsSchema :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.AdditionalItems
-additionalItemsSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.AdditionalItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayRestrictionAdditionalItems :: Phantoms.TTerm Schema.AdditionalItems -> Phantoms.TTerm Schema.ArrayRestriction
-arrayRestrictionAdditionalItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ArrayRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "additionalItems"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayRestrictionItems :: Phantoms.TTerm Schema.Items -> Phantoms.TTerm Schema.ArrayRestriction
-arrayRestrictionItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ArrayRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "items"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayRestrictionMaxItems :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.ArrayRestriction
-arrayRestrictionMaxItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ArrayRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxItems"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayRestrictionMinItems :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.ArrayRestriction
-arrayRestrictionMinItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ArrayRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minItems"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayRestrictionUniqueItems :: Phantoms.TTerm Bool -> Phantoms.TTerm Schema.ArrayRestriction
-arrayRestrictionUniqueItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ArrayRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uniqueItems"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-document :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe (M.Map Schema.Keyword Schema.Schema)) -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Document
-document id definitions root =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Document"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Phantoms.unTTerm definitions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Phantoms.unTTerm root)}]}))
-
-documentDefinitions :: Phantoms.TTerm Schema.Document -> Phantoms.TTerm (Maybe (M.Map Schema.Keyword Schema.Schema))
-documentDefinitions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-        Core.projectionField = (Core.Name "definitions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentId :: Phantoms.TTerm Schema.Document -> Phantoms.TTerm (Maybe String)
-documentId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentRoot :: Phantoms.TTerm Schema.Document -> Phantoms.TTerm Schema.Schema
-documentRoot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-        Core.projectionField = (Core.Name "root")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-documentWithDefinitions :: Phantoms.TTerm Schema.Document -> Phantoms.TTerm (Maybe (M.Map Schema.Keyword Schema.Schema)) -> Phantoms.TTerm Schema.Document
-documentWithDefinitions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Document"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-              Core.projectionField = (Core.Name "root")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-documentWithId :: Phantoms.TTerm Schema.Document -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Document
-documentWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Document"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-              Core.projectionField = (Core.Name "definitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-              Core.projectionField = (Core.Name "root")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-documentWithRoot :: Phantoms.TTerm Schema.Document -> Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Document
-documentWithRoot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Document"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Document"),
-              Core.projectionField = (Core.Name "definitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-itemsSameItems :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.Items
-itemsSameItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Items"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sameItems"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemsVarItems :: Phantoms.TTerm [Schema.Schema] -> Phantoms.TTerm Schema.Items
-itemsVarItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Items"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "varItems"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keyword :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Keyword
-keyword x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.json.schema.Keyword"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-limit :: Phantoms.TTerm Int -> Phantoms.TTerm Bool -> Phantoms.TTerm Schema.Limit
-limit value exclusive =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Limit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exclusive"),
-          Core.fieldTerm = (Phantoms.unTTerm exclusive)}]}))
-
-limitExclusive :: Phantoms.TTerm Schema.Limit -> Phantoms.TTerm Bool
-limitExclusive x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.json.schema.Limit"),
-        Core.projectionField = (Core.Name "exclusive")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-limitValue :: Phantoms.TTerm Schema.Limit -> Phantoms.TTerm Int
-limitValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.json.schema.Limit"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-limitWithExclusive :: Phantoms.TTerm Schema.Limit -> Phantoms.TTerm Bool -> Phantoms.TTerm Schema.Limit
-limitWithExclusive original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Limit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Limit"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exclusive"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-limitWithValue :: Phantoms.TTerm Schema.Limit -> Phantoms.TTerm Int -> Phantoms.TTerm Schema.Limit
-limitWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.json.schema.Limit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exclusive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.json.schema.Limit"),
-              Core.projectionField = (Core.Name "exclusive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multipleRestrictionAllOf :: Phantoms.TTerm [Schema.Schema] -> Phantoms.TTerm Schema.MultipleRestriction
-multipleRestrictionAllOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.MultipleRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "allOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multipleRestrictionAnyOf :: Phantoms.TTerm [Schema.Schema] -> Phantoms.TTerm Schema.MultipleRestriction
-multipleRestrictionAnyOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.MultipleRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multipleRestrictionEnum :: Phantoms.TTerm [Model.Value] -> Phantoms.TTerm Schema.MultipleRestriction
-multipleRestrictionEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.MultipleRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multipleRestrictionNot :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.MultipleRestriction
-multipleRestrictionNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.MultipleRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multipleRestrictionOneOf :: Phantoms.TTerm [Schema.Schema] -> Phantoms.TTerm Schema.MultipleRestriction
-multipleRestrictionOneOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.MultipleRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "oneOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericRestrictionMaximum :: Phantoms.TTerm Schema.Limit -> Phantoms.TTerm Schema.NumericRestriction
-numericRestrictionMaximum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.NumericRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maximum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericRestrictionMinimum :: Phantoms.TTerm Schema.Limit -> Phantoms.TTerm Schema.NumericRestriction
-numericRestrictionMinimum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.NumericRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minimum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericRestrictionMultipleOf :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.NumericRestriction
-numericRestrictionMultipleOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.NumericRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multipleOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionAdditionalProperties :: Phantoms.TTerm Schema.AdditionalItems -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionAdditionalProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "additionalProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionDependencies :: Phantoms.TTerm (M.Map Schema.Keyword Schema.SchemaOrArray) -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionDependencies x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dependencies"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionMaxProperties :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionMaxProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionMinProperties :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionMinProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionPatternProperties :: Phantoms.TTerm (M.Map Schema.RegularExpression Schema.Schema) -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionPatternProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "patternProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionProperties :: Phantoms.TTerm (M.Map Schema.Keyword Schema.Schema) -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "properties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectRestrictionRequired :: Phantoms.TTerm [Schema.Keyword] -> Phantoms.TTerm Schema.ObjectRestriction
-objectRestrictionRequired x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.ObjectRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "required"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-regularExpression :: Phantoms.TTerm String -> Phantoms.TTerm Schema.RegularExpression
-regularExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.json.schema.RegularExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-restrictionArray :: Phantoms.TTerm Schema.ArrayRestriction -> Phantoms.TTerm Schema.Restriction
-restrictionArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionDescription :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Restriction
-restrictionDescription x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "description"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionMultiple :: Phantoms.TTerm Schema.MultipleRestriction -> Phantoms.TTerm Schema.Restriction
-restrictionMultiple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionNumber :: Phantoms.TTerm Schema.NumericRestriction -> Phantoms.TTerm Schema.Restriction
-restrictionNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionObject :: Phantoms.TTerm Schema.ObjectRestriction -> Phantoms.TTerm Schema.Restriction
-restrictionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionReference :: Phantoms.TTerm Schema.SchemaReference -> Phantoms.TTerm Schema.Restriction
-restrictionReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionString :: Phantoms.TTerm Schema.StringRestriction -> Phantoms.TTerm Schema.Restriction
-restrictionString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionTitle :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Restriction
-restrictionTitle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "title"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-restrictionType :: Phantoms.TTerm Schema.Type -> Phantoms.TTerm Schema.Restriction
-restrictionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Restriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schema :: Phantoms.TTerm [Schema.Restriction] -> Phantoms.TTerm Schema.Schema
-schema x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.json.schema.Schema"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-schemaOrArrayArray :: Phantoms.TTerm [Schema.Keyword] -> Phantoms.TTerm Schema.SchemaOrArray
-schemaOrArrayArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.SchemaOrArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaOrArraySchema :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm Schema.SchemaOrArray
-schemaOrArraySchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.SchemaOrArray"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaReference :: Phantoms.TTerm String -> Phantoms.TTerm Schema.SchemaReference
-schemaReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.json.schema.SchemaReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringRestrictionMaxLength :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.StringRestriction
-stringRestrictionMaxLength x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.StringRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxLength"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringRestrictionMinLength :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.StringRestriction
-stringRestrictionMinLength x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.StringRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minLength"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringRestrictionPattern :: Phantoms.TTerm Schema.RegularExpression -> Phantoms.TTerm Schema.StringRestriction
-stringRestrictionPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.StringRestriction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeMultiple :: Phantoms.TTerm [Schema.TypeName] -> Phantoms.TTerm Schema.Type
-typeMultiple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNameArray :: Phantoms.TTerm Schema.TypeName
-typeNameArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeNameBoolean :: Phantoms.TTerm Schema.TypeName
-typeNameBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeNameInteger :: Phantoms.TTerm Schema.TypeName
-typeNameInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeNameNull :: Phantoms.TTerm Schema.TypeName
-typeNameNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeNameNumber :: Phantoms.TTerm Schema.TypeName
-typeNameNumber =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeNameObject :: Phantoms.TTerm Schema.TypeName
-typeNameObject =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeNameString :: Phantoms.TTerm Schema.TypeName
-typeNameString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.TypeName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeSingle :: Phantoms.TTerm Schema.TypeName -> Phantoms.TTerm Schema.Type
-typeSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.json.schema.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unKeyword :: Phantoms.TTerm Schema.Keyword -> Phantoms.TTerm String
-unKeyword x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.json.schema.Keyword")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRegularExpression :: Phantoms.TTerm Schema.RegularExpression -> Phantoms.TTerm String
-unRegularExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.json.schema.RegularExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSchema :: Phantoms.TTerm Schema.Schema -> Phantoms.TTerm [Schema.Restriction]
-unSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.json.schema.Schema")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSchemaReference :: Phantoms.TTerm Schema.SchemaReference -> Phantoms.TTerm String
-unSchemaReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.json.schema.SchemaReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Kusto/Kql.hs b/src/main/haskell/Hydra/Dsl/Kusto/Kql.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Kusto/Kql.hs
+++ /dev/null
@@ -1,2572 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.kusto.kql
-
-module Hydra.Dsl.Kusto.Kql where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Kusto.Kql as Kql
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Int as I
-
-betweenExpression :: Phantoms.TTerm Bool -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BetweenExpression
-betweenExpression not expression lowerBound upperBound =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Phantoms.unTTerm lowerBound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Phantoms.unTTerm upperBound)}]}))
-
-betweenExpressionExpression :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression
-betweenExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-betweenExpressionLowerBound :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression
-betweenExpressionLowerBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-        Core.projectionField = (Core.Name "lowerBound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-betweenExpressionNot :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Bool
-betweenExpressionNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-betweenExpressionUpperBound :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression
-betweenExpressionUpperBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-        Core.projectionField = (Core.Name "upperBound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-betweenExpressionWithExpression :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BetweenExpression
-betweenExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-betweenExpressionWithLowerBound :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BetweenExpression
-betweenExpressionWithLowerBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-betweenExpressionWithNot :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Kql.BetweenExpression
-betweenExpressionWithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-betweenExpressionWithUpperBound :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BetweenExpression
-betweenExpressionWithUpperBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BetweenExpression"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryExpression :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BinaryOperator -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BinaryExpression
-binaryExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryExpressionLeft :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.Expression
-binaryExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionOperator :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.BinaryOperator
-binaryExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionRight :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.Expression
-binaryExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionWithLeft :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BinaryExpression
-binaryExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExpressionWithOperator :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.BinaryOperator -> Phantoms.TTerm Kql.BinaryExpression
-binaryExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExpressionWithRight :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.BinaryExpression
-binaryExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.BinaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOperatorCaseInsensitiveEqual :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorCaseInsensitiveEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "caseInsensitiveEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorContains :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorContains =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "contains"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorDivide :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorEndsWith :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorEndsWith =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endsWith"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorEqual :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorGreater :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorGreater =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greater"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorGreaterOrEqual :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorGreaterOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorHas :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorHas =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "has"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorHasPrefix :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorHasPrefix =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasPrefix"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorHasSuffix :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorHasSuffix =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasSuffix"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLess :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorLess =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "less"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorLessOrEqual :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorLessOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorMatchesRegex :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorMatchesRegex =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "matchesRegex"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorMinus :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorNotEqual :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorPlus :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorStartsWith :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorStartsWith =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "startsWith"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOperatorTimes :: Phantoms.TTerm Kql.BinaryOperator
-binaryOperatorTimes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionAgo :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionAgo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ago"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionBin :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionBin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bin"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionCount :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionCount =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "count"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionDcount :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionDcount =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dcount"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionEndofday :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionEndofday =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endofday"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionExtract :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionExtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionFormat_datetime :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionFormat_datetime =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "format_datetime"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionMaterialize :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionMaterialize =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "materialize"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionNow :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionNow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "now"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionRange :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionRange =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionStartofday :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionStartofday =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "startofday"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionStrcat :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionStrcat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strcat"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-builtInFunctionTodynamic :: Phantoms.TTerm Kql.BuiltInFunction
-builtInFunctionTodynamic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.BuiltInFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "todynamic"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-columnAlias :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.ColumnAlias
-columnAlias column alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm column)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-columnAliasAlias :: Phantoms.TTerm Kql.ColumnAlias -> Phantoms.TTerm Kql.ColumnName
-columnAliasAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnAliasColumn :: Phantoms.TTerm Kql.ColumnAlias -> Phantoms.TTerm Kql.ColumnName
-columnAliasColumn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-        Core.projectionField = (Core.Name "column")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnAliasWithAlias :: Phantoms.TTerm Kql.ColumnAlias -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.ColumnAlias
-columnAliasWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-              Core.projectionField = (Core.Name "column")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnAliasWithColumn :: Phantoms.TTerm Kql.ColumnAlias -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.ColumnAlias
-columnAliasWithColumn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAlias"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnAssignment :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.ColumnAssignment
-columnAssignment column expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm column)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-columnAssignmentColumn :: Phantoms.TTerm Kql.ColumnAssignment -> Phantoms.TTerm Kql.ColumnName
-columnAssignmentColumn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-        Core.projectionField = (Core.Name "column")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnAssignmentExpression :: Phantoms.TTerm Kql.ColumnAssignment -> Phantoms.TTerm Kql.Expression
-columnAssignmentExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnAssignmentWithColumn :: Phantoms.TTerm Kql.ColumnAssignment -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.ColumnAssignment
-columnAssignmentWithColumn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnAssignmentWithExpression :: Phantoms.TTerm Kql.ColumnAssignment -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.ColumnAssignment
-columnAssignmentWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ColumnAssignment"),
-              Core.projectionField = (Core.Name "column")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnName :: Phantoms.TTerm String -> Phantoms.TTerm Kql.ColumnName
-columnName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.kusto.kql.ColumnName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-columnsAll :: Phantoms.TTerm Kql.Columns
-columnsAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Columns"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-columnsSingle :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.Columns
-columnsSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Columns"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandCount :: Phantoms.TTerm Kql.Command
-commandCount =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "count"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commandDistinct :: Phantoms.TTerm [Kql.ColumnName] -> Phantoms.TTerm Kql.Command
-commandDistinct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "distinct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandExtend :: Phantoms.TTerm [Kql.ColumnAssignment] -> Phantoms.TTerm Kql.Command
-commandExtend x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extend"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandJoin :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.Command
-commandJoin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "join"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandLimit :: Phantoms.TTerm Int -> Phantoms.TTerm Kql.Command
-commandLimit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandMvexpand :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.Command
-commandMvexpand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mvexpand"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandOrderBy :: Phantoms.TTerm [Kql.SortBy] -> Phantoms.TTerm Kql.Command
-commandOrderBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orderBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandParse :: Phantoms.TTerm Kql.ParseCommand -> Phantoms.TTerm Kql.Command
-commandParse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandPrint :: Phantoms.TTerm Kql.PrintCommand -> Phantoms.TTerm Kql.Command
-commandPrint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "print"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandProject :: Phantoms.TTerm [Kql.Projection] -> Phantoms.TTerm Kql.Command
-commandProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandProjectAway :: Phantoms.TTerm [Kql.ColumnName] -> Phantoms.TTerm Kql.Command
-commandProjectAway x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "projectAway"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandProjectRename :: Phantoms.TTerm [Kql.ColumnAlias] -> Phantoms.TTerm Kql.Command
-commandProjectRename x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "projectRename"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandRender :: Phantoms.TTerm String -> Phantoms.TTerm Kql.Command
-commandRender x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "render"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandSearch :: Phantoms.TTerm Kql.SearchCommand -> Phantoms.TTerm Kql.Command
-commandSearch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "search"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandSortBy :: Phantoms.TTerm [Kql.SortBy] -> Phantoms.TTerm Kql.Command
-commandSortBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sortBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandSummarize :: Phantoms.TTerm Kql.SummarizeCommand -> Phantoms.TTerm Kql.Command
-commandSummarize x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "summarize"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandTake :: Phantoms.TTerm Int -> Phantoms.TTerm Kql.Command
-commandTake x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "take"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandTop :: Phantoms.TTerm Kql.TopCommand -> Phantoms.TTerm Kql.Command
-commandTop x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "top"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandUnion :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm Kql.Command
-commandUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commandWhere :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.Command
-commandWhere x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Command"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "where"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetime :: Phantoms.TTerm String -> Phantoms.TTerm Kql.Datetime
-datetime x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.kusto.kql.Datetime"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-duration :: Phantoms.TTerm Int -> Phantoms.TTerm Kql.DurationUnit -> Phantoms.TTerm Kql.Duration
-duration value unit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm unit)}]}))
-
-durationUnit :: Phantoms.TTerm Kql.Duration -> Phantoms.TTerm Kql.DurationUnit
-durationUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-        Core.projectionField = (Core.Name "unit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-durationUnitHour :: Phantoms.TTerm Kql.DurationUnit
-durationUnitHour =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.DurationUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hour"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-durationUnitMinute :: Phantoms.TTerm Kql.DurationUnit
-durationUnitMinute =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.DurationUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minute"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-durationUnitSecond :: Phantoms.TTerm Kql.DurationUnit
-durationUnitSecond =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.DurationUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "second"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-durationValue :: Phantoms.TTerm Kql.Duration -> Phantoms.TTerm Int
-durationValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-durationWithUnit :: Phantoms.TTerm Kql.Duration -> Phantoms.TTerm Kql.DurationUnit -> Phantoms.TTerm Kql.Duration
-durationWithUnit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-durationWithValue :: Phantoms.TTerm Kql.Duration -> Phantoms.TTerm Int -> Phantoms.TTerm Kql.Duration
-durationWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Duration"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-expressionAnd :: Phantoms.TTerm [Kql.Expression] -> Phantoms.TTerm Kql.Expression
-expressionAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionAny :: Phantoms.TTerm Kql.Expression
-expressionAny =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-expressionBetween :: Phantoms.TTerm Kql.BetweenExpression -> Phantoms.TTerm Kql.Expression
-expressionBetween x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "between"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBinary :: Phantoms.TTerm Kql.BinaryExpression -> Phantoms.TTerm Kql.Expression
-expressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBraces :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.Expression
-expressionBraces x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "braces"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionColumn :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.Expression
-expressionColumn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "column"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionDataset :: Phantoms.TTerm Kql.TableName -> Phantoms.TTerm Kql.Expression
-expressionDataset x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataset"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionIndex :: Phantoms.TTerm Kql.IndexExpression -> Phantoms.TTerm Kql.Expression
-expressionIndex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "index"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionList :: Phantoms.TTerm [Kql.Expression] -> Phantoms.TTerm Kql.Expression
-expressionList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLiteral :: Phantoms.TTerm Kql.Literal -> Phantoms.TTerm Kql.Expression
-expressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionOr :: Phantoms.TTerm [Kql.Expression] -> Phantoms.TTerm Kql.Expression
-expressionOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionParentheses :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.Expression
-expressionParentheses x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parentheses"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionProperty :: Phantoms.TTerm Kql.PropertyExpression -> Phantoms.TTerm Kql.Expression
-expressionProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionUnary :: Phantoms.TTerm Kql.UnaryExpression -> Phantoms.TTerm Kql.Expression
-expressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionBuiltIn :: Phantoms.TTerm Kql.BuiltInFunction -> Phantoms.TTerm Kql.Function
-functionBuiltIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Function"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "builtIn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionCustom :: Phantoms.TTerm Kql.FunctionName -> Phantoms.TTerm Kql.Function
-functionCustom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Function"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "custom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-functionExpression :: Phantoms.TTerm Kql.Function -> Phantoms.TTerm [Kql.Expression] -> Phantoms.TTerm Kql.FunctionExpression
-functionExpression function arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-functionExpressionArguments :: Phantoms.TTerm Kql.FunctionExpression -> Phantoms.TTerm [Kql.Expression]
-functionExpressionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionFunction :: Phantoms.TTerm Kql.FunctionExpression -> Phantoms.TTerm Kql.Function
-functionExpressionFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionExpressionWithArguments :: Phantoms.TTerm Kql.FunctionExpression -> Phantoms.TTerm [Kql.Expression] -> Phantoms.TTerm Kql.FunctionExpression
-functionExpressionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionExpressionWithFunction :: Phantoms.TTerm Kql.FunctionExpression -> Phantoms.TTerm Kql.Function -> Phantoms.TTerm Kql.FunctionExpression
-functionExpressionWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.FunctionExpression"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionName :: Phantoms.TTerm String -> Phantoms.TTerm Kql.FunctionName
-functionName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.kusto.kql.FunctionName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-indexExpression :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm String -> Phantoms.TTerm Kql.IndexExpression
-indexExpression expression index =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm index)}]}))
-
-indexExpressionExpression :: Phantoms.TTerm Kql.IndexExpression -> Phantoms.TTerm Kql.Expression
-indexExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexExpressionIndex :: Phantoms.TTerm Kql.IndexExpression -> Phantoms.TTerm String
-indexExpressionIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-        Core.projectionField = (Core.Name "index")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexExpressionWithExpression :: Phantoms.TTerm Kql.IndexExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.IndexExpression
-indexExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-              Core.projectionField = (Core.Name "index")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-indexExpressionWithIndex :: Phantoms.TTerm Kql.IndexExpression -> Phantoms.TTerm String -> Phantoms.TTerm Kql.IndexExpression
-indexExpressionWithIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.IndexExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-joinCommand :: Phantoms.TTerm Kql.JoinKind -> Phantoms.TTerm Kql.TableName -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.JoinCommand
-joinCommand kind expression on =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Phantoms.unTTerm on)}]}))
-
-joinCommandExpression :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.TableName
-joinCommandExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinCommandKind :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.JoinKind
-joinCommandKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinCommandOn :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.Expression
-joinCommandOn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-        Core.projectionField = (Core.Name "on")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-joinCommandWithExpression :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.TableName -> Phantoms.TTerm Kql.JoinCommand
-joinCommandWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinCommandWithKind :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.JoinKind -> Phantoms.TTerm Kql.JoinCommand
-joinCommandWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-              Core.projectionField = (Core.Name "on")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-joinCommandWithOn :: Phantoms.TTerm Kql.JoinCommand -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.JoinCommand
-joinCommandWithOn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.JoinCommand"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "on"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-joinKindFullouter :: Phantoms.TTerm Kql.JoinKind
-joinKindFullouter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fullouter"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindInner :: Phantoms.TTerm Kql.JoinKind
-joinKindInner =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inner"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindInnerunique :: Phantoms.TTerm Kql.JoinKind
-joinKindInnerunique =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "innerunique"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindLeftanti :: Phantoms.TTerm Kql.JoinKind
-joinKindLeftanti =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftanti"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindLeftouter :: Phantoms.TTerm Kql.JoinKind
-joinKindLeftouter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftouter"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindLeftsemi :: Phantoms.TTerm Kql.JoinKind
-joinKindLeftsemi =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftsemi"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindRightanti :: Phantoms.TTerm Kql.JoinKind
-joinKindRightanti =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightanti"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindRightouter :: Phantoms.TTerm Kql.JoinKind
-joinKindRightouter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightouter"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-joinKindRightsemi :: Phantoms.TTerm Kql.JoinKind
-joinKindRightsemi =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.JoinKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightsemi"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-keyValuePair :: Phantoms.TTerm String -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.KeyValuePair
-keyValuePair key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.KeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-keyValuePairKey :: Phantoms.TTerm Kql.KeyValuePair -> Phantoms.TTerm String
-keyValuePairKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.KeyValuePair"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePairValue :: Phantoms.TTerm Kql.KeyValuePair -> Phantoms.TTerm Kql.Expression
-keyValuePairValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.KeyValuePair"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePairWithKey :: Phantoms.TTerm Kql.KeyValuePair -> Phantoms.TTerm String -> Phantoms.TTerm Kql.KeyValuePair
-keyValuePairWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.KeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.kusto.kql.KeyValuePair"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keyValuePairWithValue :: Phantoms.TTerm Kql.KeyValuePair -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.KeyValuePair
-keyValuePairWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.KeyValuePair"),
-      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.kusto.kql.KeyValuePair"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letBinding :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.LetBinding
-letBinding name expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-letBindingExpression :: Phantoms.TTerm Kql.LetBinding -> Phantoms.TTerm Kql.Expression
-letBindingExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letBindingName :: Phantoms.TTerm Kql.LetBinding -> Phantoms.TTerm Kql.ColumnName
-letBindingName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letBindingWithExpression :: Phantoms.TTerm Kql.LetBinding -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.LetBinding
-letBindingWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letBindingWithName :: Phantoms.TTerm Kql.LetBinding -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.LetBinding
-letBindingWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetBinding"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letExpression :: Phantoms.TTerm [Kql.LetBinding] -> Phantoms.TTerm Kql.TabularExpression -> Phantoms.TTerm Kql.LetExpression
-letExpression bindings expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-letExpressionBindings :: Phantoms.TTerm Kql.LetExpression -> Phantoms.TTerm [Kql.LetBinding]
-letExpressionBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letExpressionExpression :: Phantoms.TTerm Kql.LetExpression -> Phantoms.TTerm Kql.TabularExpression
-letExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letExpressionWithBindings :: Phantoms.TTerm Kql.LetExpression -> Phantoms.TTerm [Kql.LetBinding] -> Phantoms.TTerm Kql.LetExpression
-letExpressionWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letExpressionWithExpression :: Phantoms.TTerm Kql.LetExpression -> Phantoms.TTerm Kql.TabularExpression -> Phantoms.TTerm Kql.LetExpression
-letExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.LetExpression"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Kql.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalDatetime :: Phantoms.TTerm Kql.Datetime -> Phantoms.TTerm Kql.Literal
-literalDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalDouble :: Phantoms.TTerm Double -> Phantoms.TTerm Kql.Literal
-literalDouble x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalDuration :: Phantoms.TTerm Kql.Duration -> Phantoms.TTerm Kql.Literal
-literalDuration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalInt :: Phantoms.TTerm Int -> Phantoms.TTerm Kql.Literal
-literalInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalLong :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Kql.Literal
-literalLong x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalString :: Phantoms.TTerm String -> Phantoms.TTerm Kql.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-orderAscending :: Phantoms.TTerm Kql.Order
-orderAscending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Order"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderDescending :: Phantoms.TTerm Kql.Order
-orderDescending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.Order"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "descending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parameter :: Phantoms.TTerm String -> Phantoms.TTerm Kql.Literal -> Phantoms.TTerm Kql.Parameter
-parameter key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-parameterKey :: Phantoms.TTerm Kql.Parameter -> Phantoms.TTerm String
-parameterKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Parameter"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterValue :: Phantoms.TTerm Kql.Parameter -> Phantoms.TTerm Kql.Literal
-parameterValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Parameter"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterWithKey :: Phantoms.TTerm Kql.Parameter -> Phantoms.TTerm String -> Phantoms.TTerm Kql.Parameter
-parameterWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.kusto.kql.Parameter"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterWithValue :: Phantoms.TTerm Kql.Parameter -> Phantoms.TTerm Kql.Literal -> Phantoms.TTerm Kql.Parameter
-parameterWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Parameter"),
-      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.kusto.kql.Parameter"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parseCommand :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm [Kql.KeyValuePair] -> Phantoms.TTerm Kql.ParseCommand
-parseCommand column pairs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm column)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pairs"),
-          Core.fieldTerm = (Phantoms.unTTerm pairs)}]}))
-
-parseCommandColumn :: Phantoms.TTerm Kql.ParseCommand -> Phantoms.TTerm Kql.ColumnName
-parseCommandColumn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-        Core.projectionField = (Core.Name "column")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parseCommandPairs :: Phantoms.TTerm Kql.ParseCommand -> Phantoms.TTerm [Kql.KeyValuePair]
-parseCommandPairs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-        Core.projectionField = (Core.Name "pairs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parseCommandWithColumn :: Phantoms.TTerm Kql.ParseCommand -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.ParseCommand
-parseCommandWithColumn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pairs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-              Core.projectionField = (Core.Name "pairs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parseCommandWithPairs :: Phantoms.TTerm Kql.ParseCommand -> Phantoms.TTerm [Kql.KeyValuePair] -> Phantoms.TTerm Kql.ParseCommand
-parseCommandWithPairs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.ParseCommand"),
-              Core.projectionField = (Core.Name "column")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pairs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pipelineExpression :: Phantoms.TTerm [Kql.TabularExpression] -> Phantoms.TTerm Kql.PipelineExpression
-pipelineExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.kusto.kql.PipelineExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-printCommand :: Phantoms.TTerm (Maybe Kql.ColumnName) -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.PrintCommand
-printCommand column expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm column)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-printCommandColumn :: Phantoms.TTerm Kql.PrintCommand -> Phantoms.TTerm (Maybe Kql.ColumnName)
-printCommandColumn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-        Core.projectionField = (Core.Name "column")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-printCommandExpression :: Phantoms.TTerm Kql.PrintCommand -> Phantoms.TTerm Kql.Expression
-printCommandExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-printCommandWithColumn :: Phantoms.TTerm Kql.PrintCommand -> Phantoms.TTerm (Maybe Kql.ColumnName) -> Phantoms.TTerm Kql.PrintCommand
-printCommandWithColumn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-printCommandWithExpression :: Phantoms.TTerm Kql.PrintCommand -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.PrintCommand
-printCommandWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PrintCommand"),
-              Core.projectionField = (Core.Name "column")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projection :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm (Maybe Kql.ColumnName) -> Phantoms.TTerm Kql.Projection
-projection expression alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-projectionAlias :: Phantoms.TTerm Kql.Projection -> Phantoms.TTerm (Maybe Kql.ColumnName)
-projectionAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionExpression :: Phantoms.TTerm Kql.Projection -> Phantoms.TTerm Kql.Expression
-projectionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionWithAlias :: Phantoms.TTerm Kql.Projection -> Phantoms.TTerm (Maybe Kql.ColumnName) -> Phantoms.TTerm Kql.Projection
-projectionWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projectionWithExpression :: Phantoms.TTerm Kql.Projection -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.Projection
-projectionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.Projection"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyExpression :: Phantoms.TTerm Kql.Expression -> Phantoms.TTerm String -> Phantoms.TTerm Kql.PropertyExpression
-propertyExpression expression property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-propertyExpressionExpression :: Phantoms.TTerm Kql.PropertyExpression -> Phantoms.TTerm Kql.Expression
-propertyExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExpressionProperty :: Phantoms.TTerm Kql.PropertyExpression -> Phantoms.TTerm String
-propertyExpressionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExpressionWithExpression :: Phantoms.TTerm Kql.PropertyExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.PropertyExpression
-propertyExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyExpressionWithProperty :: Phantoms.TTerm Kql.PropertyExpression -> Phantoms.TTerm String -> Phantoms.TTerm Kql.PropertyExpression
-propertyExpressionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.PropertyExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-query :: Phantoms.TTerm Kql.TabularExpression -> Phantoms.TTerm Kql.Query
-query x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.kusto.kql.Query"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-searchCommand :: Phantoms.TTerm [Kql.TableName] -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.SearchCommand
-searchCommand datasets pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "datasets"),
-          Core.fieldTerm = (Phantoms.unTTerm datasets)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-searchCommandDatasets :: Phantoms.TTerm Kql.SearchCommand -> Phantoms.TTerm [Kql.TableName]
-searchCommandDatasets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-        Core.projectionField = (Core.Name "datasets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-searchCommandPattern :: Phantoms.TTerm Kql.SearchCommand -> Phantoms.TTerm Kql.Expression
-searchCommandPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-searchCommandWithDatasets :: Phantoms.TTerm Kql.SearchCommand -> Phantoms.TTerm [Kql.TableName] -> Phantoms.TTerm Kql.SearchCommand
-searchCommandWithDatasets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "datasets"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-searchCommandWithPattern :: Phantoms.TTerm Kql.SearchCommand -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.SearchCommand
-searchCommandWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "datasets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SearchCommand"),
-              Core.projectionField = (Core.Name "datasets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sortBy :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm (Maybe Kql.Order) -> Phantoms.TTerm Kql.SortBy
-sortBy column order =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm column)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm order)}]}))
-
-sortByColumn :: Phantoms.TTerm Kql.SortBy -> Phantoms.TTerm Kql.ColumnName
-sortByColumn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-        Core.projectionField = (Core.Name "column")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortByOrder :: Phantoms.TTerm Kql.SortBy -> Phantoms.TTerm (Maybe Kql.Order)
-sortByOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-        Core.projectionField = (Core.Name "order")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortByWithColumn :: Phantoms.TTerm Kql.SortBy -> Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm Kql.SortBy
-sortByWithColumn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sortByWithOrder :: Phantoms.TTerm Kql.SortBy -> Phantoms.TTerm (Maybe Kql.Order) -> Phantoms.TTerm Kql.SortBy
-sortByWithOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "column"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SortBy"),
-              Core.projectionField = (Core.Name "column")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-summarizeCommand :: Phantoms.TTerm [Kql.ColumnAssignment] -> Phantoms.TTerm [Kql.ColumnName] -> Phantoms.TTerm Kql.SummarizeCommand
-summarizeCommand columns by =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm columns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "by"),
-          Core.fieldTerm = (Phantoms.unTTerm by)}]}))
-
-summarizeCommandBy :: Phantoms.TTerm Kql.SummarizeCommand -> Phantoms.TTerm [Kql.ColumnName]
-summarizeCommandBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-        Core.projectionField = (Core.Name "by")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-summarizeCommandColumns :: Phantoms.TTerm Kql.SummarizeCommand -> Phantoms.TTerm [Kql.ColumnAssignment]
-summarizeCommandColumns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-        Core.projectionField = (Core.Name "columns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-summarizeCommandWithBy :: Phantoms.TTerm Kql.SummarizeCommand -> Phantoms.TTerm [Kql.ColumnName] -> Phantoms.TTerm Kql.SummarizeCommand
-summarizeCommandWithBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "by"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-summarizeCommandWithColumns :: Phantoms.TTerm Kql.SummarizeCommand -> Phantoms.TTerm [Kql.ColumnAssignment] -> Phantoms.TTerm Kql.SummarizeCommand
-summarizeCommandWithColumns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "by"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.SummarizeCommand"),
-              Core.projectionField = (Core.Name "by")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableName :: Phantoms.TTerm String -> Phantoms.TTerm Kql.TableName
-tableName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.kusto.kql.TableName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tabularExpressionCommand :: Phantoms.TTerm Kql.Command -> Phantoms.TTerm Kql.TabularExpression
-tabularExpressionCommand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.TabularExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "command"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tabularExpressionLet :: Phantoms.TTerm Kql.LetExpression -> Phantoms.TTerm Kql.TabularExpression
-tabularExpressionLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.TabularExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tabularExpressionPipeline :: Phantoms.TTerm Kql.PipelineExpression -> Phantoms.TTerm Kql.TabularExpression
-tabularExpressionPipeline x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.TabularExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pipeline"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tabularExpressionTable :: Phantoms.TTerm Kql.TableName -> Phantoms.TTerm Kql.TabularExpression
-tabularExpressionTable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.TabularExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "table"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topCommand :: Phantoms.TTerm Int -> Phantoms.TTerm [Kql.SortBy] -> Phantoms.TTerm Kql.TopCommand
-topCommand count sort =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm count)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Phantoms.unTTerm sort)}]}))
-
-topCommandCount :: Phantoms.TTerm Kql.TopCommand -> Phantoms.TTerm Int
-topCommandCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-        Core.projectionField = (Core.Name "count")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-topCommandSort :: Phantoms.TTerm Kql.TopCommand -> Phantoms.TTerm [Kql.SortBy]
-topCommandSort x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-        Core.projectionField = (Core.Name "sort")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-topCommandWithCount :: Phantoms.TTerm Kql.TopCommand -> Phantoms.TTerm Int -> Phantoms.TTerm Kql.TopCommand
-topCommandWithCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-              Core.projectionField = (Core.Name "sort")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-topCommandWithSort :: Phantoms.TTerm Kql.TopCommand -> Phantoms.TTerm [Kql.SortBy] -> Phantoms.TTerm Kql.TopCommand
-topCommandWithSort original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.TopCommand"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sort"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unColumnName :: Phantoms.TTerm Kql.ColumnName -> Phantoms.TTerm String
-unColumnName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.kusto.kql.ColumnName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDatetime :: Phantoms.TTerm Kql.Datetime -> Phantoms.TTerm String
-unDatetime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.kusto.kql.Datetime")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFunctionName :: Phantoms.TTerm Kql.FunctionName -> Phantoms.TTerm String
-unFunctionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.kusto.kql.FunctionName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPipelineExpression :: Phantoms.TTerm Kql.PipelineExpression -> Phantoms.TTerm [Kql.TabularExpression]
-unPipelineExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.kusto.kql.PipelineExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unQuery :: Phantoms.TTerm Kql.Query -> Phantoms.TTerm Kql.TabularExpression
-unQuery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.kusto.kql.Query")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTableName :: Phantoms.TTerm Kql.TableName -> Phantoms.TTerm String
-unTableName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.kusto.kql.TableName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpression :: Phantoms.TTerm Kql.UnaryOperator -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.UnaryExpression
-unaryExpression operator expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-unaryExpressionExpression :: Phantoms.TTerm Kql.UnaryExpression -> Phantoms.TTerm Kql.Expression
-unaryExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionOperator :: Phantoms.TTerm Kql.UnaryExpression -> Phantoms.TTerm Kql.UnaryOperator
-unaryExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionWithExpression :: Phantoms.TTerm Kql.UnaryExpression -> Phantoms.TTerm Kql.Expression -> Phantoms.TTerm Kql.UnaryExpression
-unaryExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryExpressionWithOperator :: Phantoms.TTerm Kql.UnaryExpression -> Phantoms.TTerm Kql.UnaryOperator -> Phantoms.TTerm Kql.UnaryExpression
-unaryExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnaryExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryOperatorNot :: Phantoms.TTerm Kql.UnaryOperator
-unaryOperatorNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unionCommand :: Phantoms.TTerm [Kql.Parameter] -> Phantoms.TTerm (Maybe Kql.UnionKind) -> Phantoms.TTerm (Maybe Kql.ColumnName) -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm [Kql.TableName] -> Phantoms.TTerm Kql.UnionCommand
-unionCommand parameters kind withSource isFuzzy tables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "withSource"),
-          Core.fieldTerm = (Phantoms.unTTerm withSource)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isFuzzy"),
-          Core.fieldTerm = (Phantoms.unTTerm isFuzzy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tables"),
-          Core.fieldTerm = (Phantoms.unTTerm tables)}]}))
-
-unionCommandIsFuzzy :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm (Maybe Bool)
-unionCommandIsFuzzy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-        Core.projectionField = (Core.Name "isFuzzy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionCommandKind :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm (Maybe Kql.UnionKind)
-unionCommandKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionCommandParameters :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm [Kql.Parameter]
-unionCommandParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionCommandTables :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm [Kql.TableName]
-unionCommandTables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-        Core.projectionField = (Core.Name "tables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionCommandWithIsFuzzy :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Kql.UnionCommand
-unionCommandWithIsFuzzy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withSource"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "withSource")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isFuzzy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "tables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionCommandWithKind :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm (Maybe Kql.UnionKind) -> Phantoms.TTerm Kql.UnionCommand
-unionCommandWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "withSource"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "withSource")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isFuzzy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "isFuzzy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "tables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionCommandWithParameters :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm [Kql.Parameter] -> Phantoms.TTerm Kql.UnionCommand
-unionCommandWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withSource"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "withSource")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isFuzzy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "isFuzzy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "tables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionCommandWithSource :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm (Maybe Kql.ColumnName)
-unionCommandWithSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-        Core.projectionField = (Core.Name "withSource")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionCommandWithTables :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm [Kql.TableName] -> Phantoms.TTerm Kql.UnionCommand
-unionCommandWithTables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withSource"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "withSource")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isFuzzy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "isFuzzy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unionCommandWithWithSource :: Phantoms.TTerm Kql.UnionCommand -> Phantoms.TTerm (Maybe Kql.ColumnName) -> Phantoms.TTerm Kql.UnionCommand
-unionCommandWithWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withSource"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isFuzzy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "isFuzzy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.kusto.kql.UnionCommand"),
-              Core.projectionField = (Core.Name "tables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionKindInner :: Phantoms.TTerm Kql.UnionKind
-unionKindInner =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.UnionKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inner"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unionKindOuter :: Phantoms.TTerm Kql.UnionKind
-unionKindOuter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.kusto.kql.UnionKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outer"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Lisp/Syntax.hs b/src/main/haskell/Hydra/Dsl/Lisp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Lisp/Syntax.hs
+++ /dev/null
@@ -1,4181 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.lisp.syntax
-
-module Hydra.Dsl.Lisp.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Lisp.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-andExpression :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.AndExpression
-andExpression expressions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.AndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)}]}))
-
-andExpressionExpressions :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm [Syntax.Expression]
-andExpressionExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.AndExpression"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-andExpressionWithExpressions :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.AndExpression
-andExpressionWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.AndExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-application :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Application
-application function arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-applicationArguments :: Phantoms.TTerm Syntax.Application -> Phantoms.TTerm [Syntax.Expression]
-applicationArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-applicationFunction :: Phantoms.TTerm Syntax.Application -> Phantoms.TTerm Syntax.Expression
-applicationFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-applicationWithArguments :: Phantoms.TTerm Syntax.Application -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Application
-applicationWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-applicationWithFunction :: Phantoms.TTerm Syntax.Application -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Application
-applicationWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Application"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-beginExpression :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.BeginExpression
-beginExpression expressions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.BeginExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)}]}))
-
-beginExpressionExpressions :: Phantoms.TTerm Syntax.BeginExpression -> Phantoms.TTerm [Syntax.Expression]
-beginExpressionExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.BeginExpression"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-beginExpressionWithExpressions :: Phantoms.TTerm Syntax.BeginExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.BeginExpression
-beginExpressionWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.BeginExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanStyleHashTF :: Phantoms.TTerm Syntax.BooleanStyle
-booleanStyleHashTF =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.BooleanStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hashTF"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanStyleTNil :: Phantoms.TTerm Syntax.BooleanStyle
-booleanStyleTNil =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.BooleanStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tNil"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanStyleTrueFalse :: Phantoms.TTerm Syntax.BooleanStyle
-booleanStyleTrueFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.BooleanStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trueFalse"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-caseClause :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseClause
-caseClause keys body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-caseClauseBody :: Phantoms.TTerm Syntax.CaseClause -> Phantoms.TTerm Syntax.Expression
-caseClauseBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseClauseKeys :: Phantoms.TTerm Syntax.CaseClause -> Phantoms.TTerm [Syntax.Expression]
-caseClauseKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseClauseWithBody :: Phantoms.TTerm Syntax.CaseClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseClause
-caseClauseWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseClauseWithKeys :: Phantoms.TTerm Syntax.CaseClause -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.CaseClause
-caseClauseWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseClause"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.CaseClause] -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.CaseExpression
-caseExpression scrutinee clauses default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Phantoms.unTTerm scrutinee)},
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Phantoms.unTTerm clauses)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-caseExpressionClauses :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm [Syntax.CaseClause]
-caseExpressionClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-        Core.projectionField = (Core.Name "clauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseExpressionDefault :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-caseExpressionDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseExpressionScrutinee :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression
-caseExpressionScrutinee x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-        Core.projectionField = (Core.Name "scrutinee")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseExpressionWithClauses :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm [Syntax.CaseClause] -> Phantoms.TTerm Syntax.CaseExpression
-caseExpressionWithClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "scrutinee")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseExpressionWithDefault :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.CaseExpression
-caseExpressionWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "scrutinee")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "clauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseExpressionWithScrutinee :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseExpression
-caseExpressionWithScrutinee original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "clauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CaseExpression"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-characterLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.CharacterLiteral
-characterLiteral value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CharacterLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-characterLiteralValue :: Phantoms.TTerm Syntax.CharacterLiteral -> Phantoms.TTerm String
-characterLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CharacterLiteral"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-characterLiteralWithValue :: Phantoms.TTerm Syntax.CharacterLiteral -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.CharacterLiteral
-characterLiteralWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CharacterLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-comment :: Phantoms.TTerm Syntax.CommentStyle -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Comment
-comment style text =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Phantoms.unTTerm style)},
-        Core.Field {
-          Core.fieldName = (Core.Name "text"),
-          Core.fieldTerm = (Phantoms.unTTerm text)}]}))
-
-commentStyle :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm Syntax.CommentStyle
-commentStyle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-        Core.projectionField = (Core.Name "style")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commentStyleBlock :: Phantoms.TTerm Syntax.CommentStyle
-commentStyleBlock =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.CommentStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commentStyleDatum :: Phantoms.TTerm Syntax.CommentStyle
-commentStyleDatum =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.CommentStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datum"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commentStyleLine :: Phantoms.TTerm Syntax.CommentStyle
-commentStyleLine =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.CommentStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "line"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commentText :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm String
-commentText x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-        Core.projectionField = (Core.Name "text")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commentWithStyle :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm Syntax.CommentStyle -> Phantoms.TTerm Syntax.Comment
-commentWithStyle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "text"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-              Core.projectionField = (Core.Name "text")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commentWithText :: Phantoms.TTerm Syntax.Comment -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Comment
-commentWithText original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Comment"),
-              Core.projectionField = (Core.Name "style")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "text"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-condClause :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CondClause
-condClause condition body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-condClauseBody :: Phantoms.TTerm Syntax.CondClause -> Phantoms.TTerm Syntax.Expression
-condClauseBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-condClauseCondition :: Phantoms.TTerm Syntax.CondClause -> Phantoms.TTerm Syntax.Expression
-condClauseCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-condClauseWithBody :: Phantoms.TTerm Syntax.CondClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CondClause
-condClauseWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-condClauseWithCondition :: Phantoms.TTerm Syntax.CondClause -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CondClause
-condClauseWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondClause"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-condExpression :: Phantoms.TTerm [Syntax.CondClause] -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.CondExpression
-condExpression clauses default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Phantoms.unTTerm clauses)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-condExpressionClauses :: Phantoms.TTerm Syntax.CondExpression -> Phantoms.TTerm [Syntax.CondClause]
-condExpressionClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-        Core.projectionField = (Core.Name "clauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-condExpressionDefault :: Phantoms.TTerm Syntax.CondExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-condExpressionDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-condExpressionWithClauses :: Phantoms.TTerm Syntax.CondExpression -> Phantoms.TTerm [Syntax.CondClause] -> Phantoms.TTerm Syntax.CondExpression
-condExpressionWithClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-condExpressionWithDefault :: Phantoms.TTerm Syntax.CondExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.CondExpression
-condExpressionWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "clauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.CondExpression"),
-              Core.projectionField = (Core.Name "clauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-consExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConsExpression
-consExpression head tail =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm tail)}]}))
-
-consExpressionHead :: Phantoms.TTerm Syntax.ConsExpression -> Phantoms.TTerm Syntax.Expression
-consExpressionHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-consExpressionTail :: Phantoms.TTerm Syntax.ConsExpression -> Phantoms.TTerm Syntax.Expression
-consExpressionTail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-        Core.projectionField = (Core.Name "tail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-consExpressionWithHead :: Phantoms.TTerm Syntax.ConsExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConsExpression
-consExpressionWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-consExpressionWithTail :: Phantoms.TTerm Syntax.ConsExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConsExpression
-consExpressionWithTail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConsExpression"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constantDefinition :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.ConstantDefinition
-constantDefinition name value doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-constantDefinitionDoc :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring)
-constantDefinitionDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDefinitionName :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm Syntax.Symbol
-constantDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDefinitionValue :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm Syntax.Expression
-constantDefinitionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constantDefinitionWithDoc :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.ConstantDefinition
-constantDefinitionWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.lisp.syntax.ConstantDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constantDefinitionWithName :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.ConstantDefinition
-constantDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.lisp.syntax.ConstantDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constantDefinitionWithValue :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConstantDefinition
-constantDefinitionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstantDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constructorPattern :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ConstructorPattern
-constructorPattern constructor arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm constructor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-constructorPatternArguments :: Phantoms.TTerm Syntax.ConstructorPattern -> Phantoms.TTerm [Syntax.Pattern]
-constructorPatternArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorPatternConstructor :: Phantoms.TTerm Syntax.ConstructorPattern -> Phantoms.TTerm Syntax.Symbol
-constructorPatternConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-        Core.projectionField = (Core.Name "constructor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constructorPatternWithArguments :: Phantoms.TTerm Syntax.ConstructorPattern -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ConstructorPattern
-constructorPatternWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-              Core.projectionField = (Core.Name "constructor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constructorPatternWithConstructor :: Phantoms.TTerm Syntax.ConstructorPattern -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.ConstructorPattern
-constructorPatternWithConstructor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constructor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ConstructorPattern"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-destructuringBinding :: Phantoms.TTerm Syntax.DestructuringPattern -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DestructuringBinding
-destructuringBinding pattern value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DestructuringBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-destructuringBindingPattern :: Phantoms.TTerm Syntax.DestructuringBinding -> Phantoms.TTerm Syntax.DestructuringPattern
-destructuringBindingPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DestructuringBinding"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destructuringBindingValue :: Phantoms.TTerm Syntax.DestructuringBinding -> Phantoms.TTerm Syntax.Expression
-destructuringBindingValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DestructuringBinding"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destructuringBindingWithPattern :: Phantoms.TTerm Syntax.DestructuringBinding -> Phantoms.TTerm Syntax.DestructuringPattern -> Phantoms.TTerm Syntax.DestructuringBinding
-destructuringBindingWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DestructuringBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.lisp.syntax.DestructuringBinding"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-destructuringBindingWithValue :: Phantoms.TTerm Syntax.DestructuringBinding -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DestructuringBinding
-destructuringBindingWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DestructuringBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DestructuringBinding"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-destructuringPatternAssociative :: Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.DestructuringPattern
-destructuringPatternAssociative x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.DestructuringPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "associative"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-destructuringPatternRest :: Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.DestructuringPattern
-destructuringPatternRest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.DestructuringPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-destructuringPatternSequential :: Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.DestructuringPattern
-destructuringPatternSequential x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.DestructuringPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequential"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dialectClojure :: Phantoms.TTerm Syntax.Dialect
-dialectClojure =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Dialect"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "clojure"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dialectCommonLisp :: Phantoms.TTerm Syntax.Dialect
-dialectCommonLisp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Dialect"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commonLisp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dialectEmacsLisp :: Phantoms.TTerm Syntax.Dialect
-dialectEmacsLisp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Dialect"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emacsLisp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dialectScheme :: Phantoms.TTerm Syntax.Dialect
-dialectScheme =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Dialect"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scheme"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-doExpression :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.DoExpression
-doExpression expressions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DoExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)}]}))
-
-doExpressionExpressions :: Phantoms.TTerm Syntax.DoExpression -> Phantoms.TTerm [Syntax.Expression]
-doExpressionExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DoExpression"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doExpressionWithExpressions :: Phantoms.TTerm Syntax.DoExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.DoExpression
-doExpressionWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DoExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-docstring :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Docstring
-docstring x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.lisp.syntax.Docstring"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dottedPair :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DottedPair
-dottedPair car cdr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "car"),
-          Core.fieldTerm = (Phantoms.unTTerm car)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cdr"),
-          Core.fieldTerm = (Phantoms.unTTerm cdr)}]}))
-
-dottedPairCar :: Phantoms.TTerm Syntax.DottedPair -> Phantoms.TTerm Syntax.Expression
-dottedPairCar x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-        Core.projectionField = (Core.Name "car")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dottedPairCdr :: Phantoms.TTerm Syntax.DottedPair -> Phantoms.TTerm Syntax.Expression
-dottedPairCdr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-        Core.projectionField = (Core.Name "cdr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dottedPairWithCar :: Phantoms.TTerm Syntax.DottedPair -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DottedPair
-dottedPairWithCar original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "car"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cdr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-              Core.projectionField = (Core.Name "cdr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dottedPairWithCdr :: Phantoms.TTerm Syntax.DottedPair -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.DottedPair
-dottedPairWithCdr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "car"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.DottedPair"),
-              Core.projectionField = (Core.Name "car")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cdr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exportDeclaration :: Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.ExportDeclaration
-exportDeclaration symbols =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ExportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbols"),
-          Core.fieldTerm = (Phantoms.unTTerm symbols)}]}))
-
-exportDeclarationSymbols :: Phantoms.TTerm Syntax.ExportDeclaration -> Phantoms.TTerm [Syntax.Symbol]
-exportDeclarationSymbols x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ExportDeclaration"),
-        Core.projectionField = (Core.Name "symbols")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exportDeclarationWithSymbols :: Phantoms.TTerm Syntax.ExportDeclaration -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.ExportDeclaration
-exportDeclarationWithSymbols original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ExportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbols"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-expressionAnd :: Phantoms.TTerm Syntax.AndExpression -> Phantoms.TTerm Syntax.Expression
-expressionAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionApplication :: Phantoms.TTerm Syntax.Application -> Phantoms.TTerm Syntax.Expression
-expressionApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBegin :: Phantoms.TTerm Syntax.BeginExpression -> Phantoms.TTerm Syntax.Expression
-expressionBegin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "begin"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression
-expressionCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCond :: Phantoms.TTerm Syntax.CondExpression -> Phantoms.TTerm Syntax.Expression
-expressionCond x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cond"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCons :: Phantoms.TTerm Syntax.ConsExpression -> Phantoms.TTerm Syntax.Expression
-expressionCons x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cons"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionDo :: Phantoms.TTerm Syntax.DoExpression -> Phantoms.TTerm Syntax.Expression
-expressionDo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "do"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionDottedPair :: Phantoms.TTerm Syntax.DottedPair -> Phantoms.TTerm Syntax.Expression
-expressionDottedPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dottedPair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionFieldAccess :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Expression
-expressionFieldAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fieldAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionIf :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-expressionIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLambda :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm Syntax.Expression
-expressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLet :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression
-expressionLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionList :: Phantoms.TTerm Syntax.ListLiteral -> Phantoms.TTerm Syntax.Expression
-expressionList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Expression
-expressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionMap :: Phantoms.TTerm Syntax.MapLiteral -> Phantoms.TTerm Syntax.Expression
-expressionMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionNot :: Phantoms.TTerm Syntax.NotExpression -> Phantoms.TTerm Syntax.Expression
-expressionNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionOr :: Phantoms.TTerm Syntax.OrExpression -> Phantoms.TTerm Syntax.Expression
-expressionOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionQuasiquote :: Phantoms.TTerm Syntax.QuasiquoteExpression -> Phantoms.TTerm Syntax.Expression
-expressionQuasiquote x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quasiquote"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionQuote :: Phantoms.TTerm Syntax.QuoteExpression -> Phantoms.TTerm Syntax.Expression
-expressionQuote x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quote"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionSExpression :: Phantoms.TTerm Syntax.SExpression -> Phantoms.TTerm Syntax.Expression
-expressionSExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionSet :: Phantoms.TTerm Syntax.SetLiteral -> Phantoms.TTerm Syntax.Expression
-expressionSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionSplicingUnquote :: Phantoms.TTerm Syntax.SplicingUnquoteExpression -> Phantoms.TTerm Syntax.Expression
-expressionSplicingUnquote x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "splicingUnquote"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionTypeAnnotation :: Phantoms.TTerm Syntax.TypeAnnotation -> Phantoms.TTerm Syntax.Expression
-expressionTypeAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeAnnotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionUnquote :: Phantoms.TTerm Syntax.UnquoteExpression -> Phantoms.TTerm Syntax.Expression
-expressionUnquote x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unquote"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionVariable :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.Expression
-expressionVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionVector :: Phantoms.TTerm Syntax.VectorLiteral -> Phantoms.TTerm Syntax.Expression
-expressionVector x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vector"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldAccess :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccess recordType field target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "recordType"),
-          Core.fieldTerm = (Phantoms.unTTerm recordType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm field)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-fieldAccessField :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Symbol
-fieldAccessField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-        Core.projectionField = (Core.Name "field")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessRecordType :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Symbol
-fieldAccessRecordType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-        Core.projectionField = (Core.Name "recordType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessTarget :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Expression
-fieldAccessTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessWithField :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccessWithField original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "recordType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "recordType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldAccessWithRecordType :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccessWithRecordType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "recordType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldAccessWithTarget :: Phantoms.TTerm Syntax.FieldAccess -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldAccess
-fieldAccessWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "recordType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "recordType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldAccess"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldDefinition :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinition name defaultValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultValue)}]}))
-
-fieldDefinitionDefaultValue :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.Expression)
-fieldDefinitionDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "defaultValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionName :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm Syntax.Symbol
-fieldDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldDefinitionWithDefaultValue :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithDefaultValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldDefinitionWithName :: Phantoms.TTerm Syntax.FieldDefinition -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.FieldDefinition
-fieldDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FieldDefinition"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-floatLiteral :: Phantoms.TTerm Double -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FloatLiteral
-floatLiteral value precision =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)}]}))
-
-floatLiteralPrecision :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm (Maybe String)
-floatLiteralPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-floatLiteralValue :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm Double
-floatLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-floatLiteralWithPrecision :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FloatLiteral
-floatLiteralWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatLiteralWithValue :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm Double -> Phantoms.TTerm Syntax.FloatLiteral
-floatLiteralWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FloatLiteral"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinition :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm [Syntax.TypeHint] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinition name params restParam doc typeHints body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Phantoms.unTTerm restParam)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Phantoms.unTTerm typeHints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-functionDefinitionBody :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm [Syntax.Expression]
-functionDefinitionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionDoc :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring)
-functionDefinitionDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionName :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm Syntax.Symbol
-functionDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionParams :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm [Syntax.Symbol]
-functionDefinitionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionRestParam :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm (Maybe Syntax.Symbol)
-functionDefinitionRestParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "restParam")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionTypeHints :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm [Syntax.TypeHint]
-functionDefinitionTypeHints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "typeHints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionWithBody :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "typeHints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionDefinitionWithDoc :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "typeHints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinitionWithName :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "typeHints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinitionWithParams :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "typeHints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinitionWithRestParam :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithRestParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "typeHints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinitionWithTypeHints :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm [Syntax.TypeHint] -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithTypeHints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeHints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.IfExpression
-ifExpression condition then_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm then_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-ifExpressionCondition :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-ifExpressionCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifExpressionElse :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-ifExpressionElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifExpressionThen :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression
-ifExpressionThen x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-        Core.projectionField = (Core.Name "then")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifExpressionWithCondition :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression
-ifExpressionWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifExpressionWithElse :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.IfExpression
-ifExpressionWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "then")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifExpressionWithThen :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression
-ifExpressionWithThen original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "then"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IfExpression"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importDeclaration :: Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm Syntax.ImportSpec -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclaration module_ spec =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm module_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Phantoms.unTTerm spec)}]}))
-
-importDeclarationModule :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.NamespaceName
-importDeclarationModule x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-        Core.projectionField = (Core.Name "module")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importDeclarationSpec :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.ImportSpec
-importDeclarationSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-        Core.projectionField = (Core.Name "spec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importDeclarationWithModule :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationWithModule original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-              Core.projectionField = (Core.Name "spec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importDeclarationWithSpec :: Phantoms.TTerm Syntax.ImportDeclaration -> Phantoms.TTerm Syntax.ImportSpec -> Phantoms.TTerm Syntax.ImportDeclaration
-importDeclarationWithSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ImportDeclaration"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importSpecAlias :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.ImportSpec
-importSpecAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.ImportSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importSpecAll :: Phantoms.TTerm Syntax.ImportSpec
-importSpecAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.ImportSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-importSpecOnly :: Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.ImportSpec
-importSpecOnly x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.ImportSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "only"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importSpecRename :: Phantoms.TTerm [[Syntax.Symbol]] -> Phantoms.TTerm Syntax.ImportSpec
-importSpecRename x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.ImportSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rename"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteral :: Phantoms.TTerm Integer -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteral value bigint =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bigint"),
-          Core.fieldTerm = (Phantoms.unTTerm bigint)}]}))
-
-integerLiteralBigint :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Bool
-integerLiteralBigint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-        Core.projectionField = (Core.Name "bigint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerLiteralValue :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Integer
-integerLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerLiteralWithBigint :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralWithBigint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bigint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integerLiteralWithValue :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bigint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.IntegerLiteral"),
-              Core.projectionField = (Core.Name "bigint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keyword :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Keyword
-keyword name namespace =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)}]}))
-
-keywordName :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm String
-keywordName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keywordNamespace :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm (Maybe String)
-keywordNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keywordWithName :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Keyword
-keywordWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keywordWithNamespace :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Keyword
-keywordWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Keyword"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambda :: Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Lambda
-lambda name params restParam body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Phantoms.unTTerm restParam)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-lambdaBody :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm [Syntax.Expression]
-lambdaBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaName :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm (Maybe Syntax.Symbol)
-lambdaName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParams :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm [Syntax.Symbol]
-lambdaParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaRestParam :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm (Maybe Syntax.Symbol)
-lambdaRestParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-        Core.projectionField = (Core.Name "restParam")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaWithBody :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Lambda
-lambdaWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaWithName :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm Syntax.Lambda
-lambdaWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaWithParams :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.Lambda
-lambdaWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaWithRestParam :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm Syntax.Lambda
-lambdaWithRestParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Lambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letBindingDestructuring :: Phantoms.TTerm Syntax.DestructuringBinding -> Phantoms.TTerm Syntax.LetBinding
-letBindingDestructuring x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.LetBinding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "destructuring"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letBindingSimple :: Phantoms.TTerm Syntax.SimpleBinding -> Phantoms.TTerm Syntax.LetBinding
-letBindingSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.LetBinding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letExpression :: Phantoms.TTerm Syntax.LetKind -> Phantoms.TTerm [Syntax.LetBinding] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.LetExpression
-letExpression kind bindings body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-letExpressionBindings :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.LetBinding]
-letExpressionBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letExpressionBody :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.Expression]
-letExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letExpressionKind :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.LetKind
-letExpressionKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letExpressionWithBindings :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.LetBinding] -> Phantoms.TTerm Syntax.LetExpression
-letExpressionWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letExpressionWithBody :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.LetExpression
-letExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letExpressionWithKind :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.LetKind -> Phantoms.TTerm Syntax.LetExpression
-letExpressionWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LetExpression"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letKindParallel :: Phantoms.TTerm Syntax.LetKind
-letKindParallel =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.LetKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parallel"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-letKindRecursive :: Phantoms.TTerm Syntax.LetKind
-letKindRecursive =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.LetKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recursive"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-letKindSequential :: Phantoms.TTerm Syntax.LetKind
-letKindSequential =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.LetKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequential"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-listLiteral :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ListLiteral
-listLiteral elements quoted =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quoted"),
-          Core.fieldTerm = (Phantoms.unTTerm quoted)}]}))
-
-listLiteralElements :: Phantoms.TTerm Syntax.ListLiteral -> Phantoms.TTerm [Syntax.Expression]
-listLiteralElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listLiteralQuoted :: Phantoms.TTerm Syntax.ListLiteral -> Phantoms.TTerm Bool
-listLiteralQuoted x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-        Core.projectionField = (Core.Name "quoted")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listLiteralWithElements :: Phantoms.TTerm Syntax.ListLiteral -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ListLiteral
-listLiteralWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quoted"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-              Core.projectionField = (Core.Name "quoted")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listLiteralWithQuoted :: Phantoms.TTerm Syntax.ListLiteral -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ListLiteral
-listLiteralWithQuoted original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ListLiteral"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quoted"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Literal
-literalBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalCharacter :: Phantoms.TTerm Syntax.CharacterLiteral -> Phantoms.TTerm Syntax.Literal
-literalCharacter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "character"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalFloat :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm Syntax.Literal
-literalFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalInteger :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Syntax.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalKeyword :: Phantoms.TTerm Syntax.Keyword -> Phantoms.TTerm Syntax.Literal
-literalKeyword x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keyword"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNil :: Phantoms.TTerm Syntax.Literal
-literalNil =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nil"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalPattern :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.LiteralPattern
-literalPattern value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.LiteralPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-literalPatternValue :: Phantoms.TTerm Syntax.LiteralPattern -> Phantoms.TTerm Syntax.Literal
-literalPatternValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.LiteralPattern"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalPatternWithValue :: Phantoms.TTerm Syntax.LiteralPattern -> Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.LiteralPattern
-literalPatternWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.LiteralPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalSymbol :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Literal
-literalSymbol x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "symbol"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-macroDefinition :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MacroDefinition
-macroDefinition name params restParam body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Phantoms.unTTerm restParam)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-macroDefinitionBody :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm [Syntax.Expression]
-macroDefinitionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroDefinitionName :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm Syntax.Symbol
-macroDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroDefinitionParams :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm [Syntax.Symbol]
-macroDefinitionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroDefinitionRestParam :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm (Maybe Syntax.Symbol)
-macroDefinitionRestParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-        Core.projectionField = (Core.Name "restParam")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroDefinitionWithBody :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MacroDefinition
-macroDefinitionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-macroDefinitionWithName :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.MacroDefinition
-macroDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-macroDefinitionWithParams :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm [Syntax.Symbol] -> Phantoms.TTerm Syntax.MacroDefinition
-macroDefinitionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "restParam")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-macroDefinitionWithRestParam :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm (Maybe Syntax.Symbol) -> Phantoms.TTerm Syntax.MacroDefinition
-macroDefinitionWithRestParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restParam"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MacroDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapEntry :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MapEntry
-mapEntry key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MapEntry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-mapEntryKey :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression
-mapEntryKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MapEntry"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapEntryValue :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression
-mapEntryValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MapEntry"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapEntryWithKey :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MapEntry
-mapEntryWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MapEntry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.lisp.syntax.MapEntry"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapEntryWithValue :: Phantoms.TTerm Syntax.MapEntry -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MapEntry
-mapEntryWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MapEntry"),
-      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.lisp.syntax.MapEntry"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mapLiteral :: Phantoms.TTerm [Syntax.MapEntry] -> Phantoms.TTerm Syntax.MapLiteral
-mapLiteral entries =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MapLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "entries"),
-          Core.fieldTerm = (Phantoms.unTTerm entries)}]}))
-
-mapLiteralEntries :: Phantoms.TTerm Syntax.MapLiteral -> Phantoms.TTerm [Syntax.MapEntry]
-mapLiteralEntries x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.MapLiteral"),
-        Core.projectionField = (Core.Name "entries")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapLiteralWithEntries :: Phantoms.TTerm Syntax.MapLiteral -> Phantoms.TTerm [Syntax.MapEntry] -> Phantoms.TTerm Syntax.MapLiteral
-mapLiteralWithEntries original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.MapLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "entries"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleDeclaration :: Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclaration name doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-moduleDeclarationDoc :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm (Maybe Syntax.Docstring)
-moduleDeclarationDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDeclarationName :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm Syntax.NamespaceName
-moduleDeclarationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-moduleDeclarationWithDoc :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclarationWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-moduleDeclarationWithName :: Phantoms.TTerm Syntax.ModuleDeclaration -> Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm Syntax.ModuleDeclaration
-moduleDeclarationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.ModuleDeclaration"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namespaceName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.NamespaceName
-namespaceName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.lisp.syntax.NamespaceName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nilStyleEmptyList :: Phantoms.TTerm Syntax.NilStyle
-nilStyleEmptyList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.NilStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyList"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nilStyleNil :: Phantoms.TTerm Syntax.NilStyle
-nilStyleNil =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.NilStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nil"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-notExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.NotExpression
-notExpression expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.NotExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-notExpressionExpression :: Phantoms.TTerm Syntax.NotExpression -> Phantoms.TTerm Syntax.Expression
-notExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.NotExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notExpressionWithExpression :: Phantoms.TTerm Syntax.NotExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.NotExpression
-notExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.NotExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orExpression :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.OrExpression
-orExpression expressions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.OrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)}]}))
-
-orExpressionExpressions :: Phantoms.TTerm Syntax.OrExpression -> Phantoms.TTerm [Syntax.Expression]
-orExpressionExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.OrExpression"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orExpressionWithExpressions :: Phantoms.TTerm Syntax.OrExpression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.OrExpression
-orExpressionWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.OrExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternConstructor :: Phantoms.TTerm Syntax.ConstructorPattern -> Phantoms.TTerm Syntax.Pattern
-patternConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternLiteral :: Phantoms.TTerm Syntax.LiteralPattern -> Phantoms.TTerm Syntax.Pattern
-patternLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternVariable :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Pattern
-patternVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternWildcard :: Phantoms.TTerm Syntax.WildcardPattern -> Phantoms.TTerm Syntax.Pattern
-patternWildcard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-program :: Phantoms.TTerm Syntax.Dialect -> Phantoms.TTerm (Maybe Syntax.ModuleDeclaration) -> Phantoms.TTerm [Syntax.ImportDeclaration] -> Phantoms.TTerm [Syntax.ExportDeclaration] -> Phantoms.TTerm [Syntax.TopLevelFormWithComments] -> Phantoms.TTerm Syntax.Program
-program dialect module_ imports exports forms =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dialect"),
-          Core.fieldTerm = (Phantoms.unTTerm dialect)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm module_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Phantoms.unTTerm exports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forms"),
-          Core.fieldTerm = (Phantoms.unTTerm forms)}]}))
-
-programDialect :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm Syntax.Dialect
-programDialect x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-        Core.projectionField = (Core.Name "dialect")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programExports :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.ExportDeclaration]
-programExports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-        Core.projectionField = (Core.Name "exports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programForms :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.TopLevelFormWithComments]
-programForms x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-        Core.projectionField = (Core.Name "forms")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programImports :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.ImportDeclaration]
-programImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programModule :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm (Maybe Syntax.ModuleDeclaration)
-programModule x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-        Core.projectionField = (Core.Name "module")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-programWithDialect :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm Syntax.Dialect -> Phantoms.TTerm Syntax.Program
-programWithDialect original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dialect"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "exports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "forms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-programWithExports :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.ExportDeclaration] -> Phantoms.TTerm Syntax.Program
-programWithExports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dialect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "dialect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "forms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-programWithForms :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.TopLevelFormWithComments] -> Phantoms.TTerm Syntax.Program
-programWithForms original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dialect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "dialect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "exports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forms"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-programWithImports :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm [Syntax.ImportDeclaration] -> Phantoms.TTerm Syntax.Program
-programWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dialect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "dialect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "module")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "exports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "forms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-programWithModule :: Phantoms.TTerm Syntax.Program -> Phantoms.TTerm (Maybe Syntax.ModuleDeclaration) -> Phantoms.TTerm Syntax.Program
-programWithModule original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dialect"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "dialect")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "module"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "exports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.Program"),
-              Core.projectionField = (Core.Name "forms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedSymbol :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.QualifiedSymbol
-qualifiedSymbol namespace name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-qualifiedSymbolName :: Phantoms.TTerm Syntax.QualifiedSymbol -> Phantoms.TTerm String
-qualifiedSymbolName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedSymbolNamespace :: Phantoms.TTerm Syntax.QualifiedSymbol -> Phantoms.TTerm String
-qualifiedSymbolNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedSymbolWithName :: Phantoms.TTerm Syntax.QualifiedSymbol -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.QualifiedSymbol
-qualifiedSymbolWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedSymbolWithNamespace :: Phantoms.TTerm Syntax.QualifiedSymbol -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.QualifiedSymbol
-qualifiedSymbolWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.QualifiedSymbol"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quasiquoteExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.QuasiquoteExpression
-quasiquoteExpression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QuasiquoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-quasiquoteExpressionBody :: Phantoms.TTerm Syntax.QuasiquoteExpression -> Phantoms.TTerm Syntax.Expression
-quasiquoteExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.QuasiquoteExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quasiquoteExpressionWithBody :: Phantoms.TTerm Syntax.QuasiquoteExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.QuasiquoteExpression
-quasiquoteExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QuasiquoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quoteExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.QuoteExpression
-quoteExpression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QuoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-quoteExpressionBody :: Phantoms.TTerm Syntax.QuoteExpression -> Phantoms.TTerm Syntax.Expression
-quoteExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.QuoteExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quoteExpressionWithBody :: Phantoms.TTerm Syntax.QuoteExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.QuoteExpression
-quoteExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.QuoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordTypeDefinition :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm [Syntax.FieldDefinition] -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.RecordTypeDefinition
-recordTypeDefinition name fields doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-recordTypeDefinitionDoc :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring)
-recordTypeDefinitionDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordTypeDefinitionFields :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm [Syntax.FieldDefinition]
-recordTypeDefinitionFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordTypeDefinitionName :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm Syntax.Symbol
-recordTypeDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordTypeDefinitionWithDoc :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.RecordTypeDefinition
-recordTypeDefinitionWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordTypeDefinitionWithFields :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm [Syntax.FieldDefinition] -> Phantoms.TTerm Syntax.RecordTypeDefinition
-recordTypeDefinitionWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordTypeDefinitionWithName :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.RecordTypeDefinition
-recordTypeDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.RecordTypeDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sExpressionAtom :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.SExpression
-sExpressionAtom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.SExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "atom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sExpressionList :: Phantoms.TTerm [Syntax.SExpression] -> Phantoms.TTerm Syntax.SExpression
-sExpressionList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.SExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setLiteral :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.SetLiteral
-setLiteral elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SetLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-setLiteralElements :: Phantoms.TTerm Syntax.SetLiteral -> Phantoms.TTerm [Syntax.Expression]
-setLiteralElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.SetLiteral"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setLiteralWithElements :: Phantoms.TTerm Syntax.SetLiteral -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.SetLiteral
-setLiteralWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SetLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleBinding :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SimpleBinding
-simpleBinding name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SimpleBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-simpleBindingName :: Phantoms.TTerm Syntax.SimpleBinding -> Phantoms.TTerm Syntax.Symbol
-simpleBindingName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.SimpleBinding"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleBindingValue :: Phantoms.TTerm Syntax.SimpleBinding -> Phantoms.TTerm Syntax.Expression
-simpleBindingValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.SimpleBinding"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleBindingWithName :: Phantoms.TTerm Syntax.SimpleBinding -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.SimpleBinding
-simpleBindingWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SimpleBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.lisp.syntax.SimpleBinding"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleBindingWithValue :: Phantoms.TTerm Syntax.SimpleBinding -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SimpleBinding
-simpleBindingWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SimpleBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.SimpleBinding"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-splicingUnquoteExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SplicingUnquoteExpression
-splicingUnquoteExpression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SplicingUnquoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-splicingUnquoteExpressionBody :: Phantoms.TTerm Syntax.SplicingUnquoteExpression -> Phantoms.TTerm Syntax.Expression
-splicingUnquoteExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.SplicingUnquoteExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-splicingUnquoteExpressionWithBody :: Phantoms.TTerm Syntax.SplicingUnquoteExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SplicingUnquoteExpression
-splicingUnquoteExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.SplicingUnquoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-symbol :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Symbol
-symbol x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.lisp.syntax.Symbol"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-topLevelFormConstant :: Phantoms.TTerm Syntax.ConstantDefinition -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelFormExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelFormFunction :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelFormMacro :: Phantoms.TTerm Syntax.MacroDefinition -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelFormRecordType :: Phantoms.TTerm Syntax.RecordTypeDefinition -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormRecordType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelFormVariable :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-topLevelFormWithComments :: Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm (Maybe Syntax.Comment) -> Phantoms.TTerm Syntax.TopLevelForm -> Phantoms.TTerm Syntax.TopLevelFormWithComments
-topLevelFormWithComments doc comment form =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "form"),
-          Core.fieldTerm = (Phantoms.unTTerm form)}]}))
-
-topLevelFormWithCommentsComment :: Phantoms.TTerm Syntax.TopLevelFormWithComments -> Phantoms.TTerm (Maybe Syntax.Comment)
-topLevelFormWithCommentsComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-topLevelFormWithCommentsDoc :: Phantoms.TTerm Syntax.TopLevelFormWithComments -> Phantoms.TTerm (Maybe Syntax.Docstring)
-topLevelFormWithCommentsDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-topLevelFormWithCommentsForm :: Phantoms.TTerm Syntax.TopLevelFormWithComments -> Phantoms.TTerm Syntax.TopLevelForm
-topLevelFormWithCommentsForm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-        Core.projectionField = (Core.Name "form")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-topLevelFormWithCommentsWithComment :: Phantoms.TTerm Syntax.TopLevelFormWithComments -> Phantoms.TTerm (Maybe Syntax.Comment) -> Phantoms.TTerm Syntax.TopLevelFormWithComments
-topLevelFormWithCommentsWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "form"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-              Core.projectionField = (Core.Name "form")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-topLevelFormWithCommentsWithDoc :: Phantoms.TTerm Syntax.TopLevelFormWithComments -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.TopLevelFormWithComments
-topLevelFormWithCommentsWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "form"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-              Core.projectionField = (Core.Name "form")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-topLevelFormWithCommentsWithForm :: Phantoms.TTerm Syntax.TopLevelFormWithComments -> Phantoms.TTerm Syntax.TopLevelForm -> Phantoms.TTerm Syntax.TopLevelFormWithComments
-topLevelFormWithCommentsWithForm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "form"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeAnnotation :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeAnnotation
-typeAnnotation expression type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeAnnotationExpression :: Phantoms.TTerm Syntax.TypeAnnotation -> Phantoms.TTerm Syntax.Expression
-typeAnnotationExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAnnotationType :: Phantoms.TTerm Syntax.TypeAnnotation -> Phantoms.TTerm Syntax.TypeSpecifier
-typeAnnotationType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAnnotationWithExpression :: Phantoms.TTerm Syntax.TypeAnnotation -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeAnnotation
-typeAnnotationWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAnnotationWithType :: Phantoms.TTerm Syntax.TypeAnnotation -> Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeAnnotation
-typeAnnotationWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeAnnotation"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeHint :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeHint
-typeHint name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeHintName :: Phantoms.TTerm Syntax.TypeHint -> Phantoms.TTerm Syntax.Symbol
-typeHintName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeHintType :: Phantoms.TTerm Syntax.TypeHint -> Phantoms.TTerm Syntax.TypeSpecifier
-typeHintType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeHintWithName :: Phantoms.TTerm Syntax.TypeHint -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.TypeHint
-typeHintWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeHintWithType :: Phantoms.TTerm Syntax.TypeHint -> Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeHint
-typeHintWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.TypeHint"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeSpecifierEither :: Phantoms.TTerm [Syntax.TypeSpecifier] -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierEither x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "either"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierFunction :: Phantoms.TTerm [Syntax.TypeSpecifier] -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierList :: Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierMap :: Phantoms.TTerm [Syntax.TypeSpecifier] -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierMaybe :: Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierMaybe x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybe"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierNamed :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierPair :: Phantoms.TTerm [Syntax.TypeSpecifier] -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierSet :: Phantoms.TTerm Syntax.TypeSpecifier -> Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSpecifierUnit :: Phantoms.TTerm Syntax.TypeSpecifier
-typeSpecifierUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.lisp.syntax.TypeSpecifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unDocstring :: Phantoms.TTerm Syntax.Docstring -> Phantoms.TTerm String
-unDocstring x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.lisp.syntax.Docstring")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNamespaceName :: Phantoms.TTerm Syntax.NamespaceName -> Phantoms.TTerm String
-unNamespaceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.lisp.syntax.NamespaceName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSymbol :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm String
-unSymbol x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.lisp.syntax.Symbol")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unquoteExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UnquoteExpression
-unquoteExpression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.UnquoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-unquoteExpressionBody :: Phantoms.TTerm Syntax.UnquoteExpression -> Phantoms.TTerm Syntax.Expression
-unquoteExpressionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.UnquoteExpression"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unquoteExpressionWithBody :: Phantoms.TTerm Syntax.UnquoteExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UnquoteExpression
-unquoteExpressionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.UnquoteExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDefinition :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.VariableDefinition
-variableDefinition name value doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-variableDefinitionDoc :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring)
-variableDefinitionDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDefinitionName :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm Syntax.Symbol
-variableDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDefinitionValue :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm Syntax.Expression
-variableDefinitionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableDefinitionWithDoc :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm (Maybe Syntax.Docstring) -> Phantoms.TTerm Syntax.VariableDefinition
-variableDefinitionWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.lisp.syntax.VariableDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableDefinitionWithName :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.VariableDefinition
-variableDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.lisp.syntax.VariableDefinition"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableDefinitionWithValue :: Phantoms.TTerm Syntax.VariableDefinition -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.VariableDefinition
-variableDefinitionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableDefinition"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableReference :: Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.VariableReference
-variableReference name functionNamespace =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm functionNamespace)}]}))
-
-variableReferenceFunctionNamespace :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Bool
-variableReferenceFunctionNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-        Core.projectionField = (Core.Name "functionNamespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableReferenceName :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.Symbol
-variableReferenceName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableReferenceWithFunctionNamespace :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.VariableReference
-variableReferenceWithFunctionNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionNamespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableReferenceWithName :: Phantoms.TTerm Syntax.VariableReference -> Phantoms.TTerm Syntax.Symbol -> Phantoms.TTerm Syntax.VariableReference
-variableReferenceWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "functionNamespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VariableReference"),
-              Core.projectionField = (Core.Name "functionNamespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vectorLiteral :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.VectorLiteral
-vectorLiteral elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VectorLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-vectorLiteralElements :: Phantoms.TTerm Syntax.VectorLiteral -> Phantoms.TTerm [Syntax.Expression]
-vectorLiteralElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.lisp.syntax.VectorLiteral"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vectorLiteralWithElements :: Phantoms.TTerm Syntax.VectorLiteral -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.VectorLiteral
-vectorLiteralWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.VectorLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-wildcardPattern :: Phantoms.TTerm Syntax.WildcardPattern
-wildcardPattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.lisp.syntax.WildcardPattern"),
-      Core.recordFields = []}))
diff --git a/src/main/haskell/Hydra/Dsl/LiteralTypes.hs b/src/main/haskell/Hydra/Dsl/LiteralTypes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/LiteralTypes.hs
+++ /dev/null
@@ -1,91 +0,0 @@
--- | A DSL for Hydra literal types in Haskell
-
-module Hydra.Dsl.LiteralTypes where
-
-import Hydra.Core
-
-
--- | Arbitrary-precision floating point type
--- Example: bigfloat
-bigfloat :: LiteralType
-bigfloat = float FloatTypeBigfloat
-
--- | Arbitrary-precision integer type
--- Example: bigint
-bigint :: LiteralType
-bigint = LiteralTypeInteger IntegerTypeBigint
-
--- | Binary data type
--- Example: binary
-binary :: LiteralType
-binary = LiteralTypeBinary
-
--- | Boolean type
--- Example: boolean
-boolean :: LiteralType
-boolean = LiteralTypeBoolean
-
--- | 32-bit floating point type
--- Example: float32
-float32 :: LiteralType
-float32 = float FloatTypeFloat32
-
--- | 64-bit floating point type
--- Example: float64
-float64 :: LiteralType
-float64 = float FloatTypeFloat64
-
--- | Create a floating point type with the specified precision
--- Example: float FloatTypeFloat32
-float :: FloatType -> LiteralType
-float = LiteralTypeFloat
-
--- | 16-bit signed integer type
--- Example: int16
-int16 :: LiteralType
-int16 = integer IntegerTypeInt16
-
--- | 32-bit signed integer type
--- Example: int32
-int32 :: LiteralType
-int32 = integer IntegerTypeInt32
-
--- | 64-bit signed integer type
--- Example: int64
-int64 :: LiteralType
-int64 = integer IntegerTypeInt64
-
--- | 8-bit signed integer type
--- Example: int8
-int8 :: LiteralType
-int8 = integer IntegerTypeInt8
-
--- | Create an integer type with the specified bit width
--- Example: integer IntegerTypeInt32
-integer :: IntegerType -> LiteralType
-integer = LiteralTypeInteger
-
--- | String type
--- Example: string
-string :: LiteralType
-string = LiteralTypeString
-
--- | 16-bit unsigned integer type
--- Example: uint16
-uint16 :: LiteralType
-uint16 = integer IntegerTypeUint16
-
--- | 32-bit unsigned integer type
--- Example: uint32
-uint32 :: LiteralType
-uint32 = integer IntegerTypeUint32
-
--- | 64-bit unsigned integer type
--- Example: uint64
-uint64 :: LiteralType
-uint64 = integer IntegerTypeUint64
-
--- | 8-bit unsigned integer type
--- Example: uint8
-uint8 :: LiteralType
-uint8 = integer IntegerTypeUint8
diff --git a/src/main/haskell/Hydra/Dsl/Literals.hs b/src/main/haskell/Hydra/Dsl/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Literals.hs
+++ /dev/null
@@ -1,100 +0,0 @@
--- | A DSL for constructing Hydra literal values in Haskell
-
-module Hydra.Dsl.Literals where
-
-import Hydra.Core
-
-import Data.Int
-import qualified Data.ByteString as B
-import qualified Data.Scientific as Sci
-
-
--- | Create an arbitrary-precision floating point literal
--- Example: bigfloat 3.14159265359
-bigfloat :: Double -> Literal
-bigfloat = float . FloatValueBigfloat
-
--- | Create an arbitrary-precision integer literal
--- Example: bigint 9223372036854775808
-bigint :: Integer -> Literal
-bigint = integer . IntegerValueBigint . fromIntegral
-
--- | Create a binary data literal
--- Example: binary (B.pack [0x48, 0x65, 0x6C, 0x6C, 0x6F])
-binary :: B.ByteString -> Literal
-binary = LiteralBinary
-
--- | Create a boolean literal
--- Example: boolean True
-boolean :: Bool -> Literal
-boolean = LiteralBoolean
-
--- | Create an arbitrary-precision decimal literal
--- Example: decimal (Sci.scientific 314159265359 (-11))
-decimal :: Sci.Scientific -> Literal
-decimal = LiteralDecimal
-
--- | Create a 32-bit floating point literal
--- Example: float32 3.14
-float32 :: Float -> Literal
-float32 = float . FloatValueFloat32
-
--- | Create a 64-bit floating point literal
--- Example: float64 3.14159265359
-float64 :: Double -> Literal
-float64 = float . FloatValueFloat64
-
--- | Create a floating-point literal with specified precision
--- Example: float (FloatValueFloat32 3.14)
-float :: FloatValue -> Literal
-float = LiteralFloat
-
--- | Create a 16-bit signed integer literal
--- Example: int16 32767
-int16 :: Int16 -> Literal
-int16 = integer . IntegerValueInt16 . fromIntegral
-
--- | Create a 32-bit signed integer literal
--- Example: int32 42
-int32 :: Int -> Literal
-int32 = integer . IntegerValueInt32
-
--- | Create a 64-bit signed integer literal
--- Example: int64 9223372036854775807
-int64 :: Int64 -> Literal
-int64 = integer . IntegerValueInt64 . fromIntegral
-
--- | Create an 8-bit signed integer literal
--- Example: int8 127
-int8 :: Int8 -> Literal
-int8 = integer . IntegerValueInt8 . fromIntegral
-
--- | Create an integer literal with specified bit width
--- Example: integer (IntegerValueInt32 42)
-integer :: IntegerValue -> Literal
-integer = LiteralInteger
-
--- | Create a string literal
--- Example: string "hello world"
-string :: String -> Literal
-string = LiteralString
-
--- | Create a 16-bit unsigned integer literal
--- Example: uint16 65535
-uint16 :: Int -> Literal
-uint16 = integer . IntegerValueUint16 . fromIntegral
-
--- | Create a 32-bit unsigned integer literal
--- Example: uint32 4294967295
-uint32 :: Int64 -> Literal
-uint32 = integer . IntegerValueUint32 . fromIntegral
-
--- | Create a 64-bit unsigned integer literal
--- Example: uint64 18446744073709551615
-uint64 :: Integer -> Literal
-uint64 = integer . IntegerValueUint64 . fromIntegral
-
--- | Create an 8-bit unsigned integer literal
--- Example: uint8 255
-uint8 :: Int16 -> Literal
-uint8 = integer . IntegerValueUint8 . fromIntegral
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Base.hs b/src/main/haskell/Hydra/Dsl/Meta/Base.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Base.hs
+++ /dev/null
@@ -1,28 +0,0 @@
--- | A basis for other DSLs which deal with term-encoded expressions.
-
-module Hydra.Dsl.Meta.Base (
-  module Hydra.Dsl.Meta.Phantoms,
-  module Hydra.Dsl.Meta.Base,
-  module Hydra.Sources.Libraries,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Phantoms(asTerm, AsTerm(..), definitionInModule, el, firstClassType, opt)
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Meta.Core as Core
-import Hydra.Sources.Libraries
-
-import qualified Data.Map as M
-import qualified Data.Maybe as Y
-
-
-infixr 0 >:
-(>:) :: String -> a -> (TTerm Name, a)
-n >: d = (name n, d)
-
-infixr 0 >>:
-(>>:) :: Name -> a -> (TTerm Name, a)
-n >>: d = (Core.nameLift n, d)
-
-name :: String -> TTerm Name
-name s = Core.nameLift $ Name s
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Common.hs b/src/main/haskell/Hydra/Dsl/Meta/Common.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Common.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-
--- | Common IsString instances for Term and Type, enabling OverloadedStrings
-
-module Hydra.Dsl.Meta.Common where
-
-import Hydra.Core
-import Hydra.Phantoms
-
-import Data.String(IsString(..))
-
-
-instance IsString Type where fromString = TypeVariable . Name
-instance IsString Term where fromString = TermLiteral . LiteralString
-instance IsString (TTerm a) where fromString = TTerm . TermLiteral . LiteralString
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Context.hs b/src/main/haskell/Hydra/Dsl/Meta/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Context.hs
+++ /dev/null
@@ -1,33 +0,0 @@
--- | Haskell-specific convenience layer over the generated Hydra.Dsl.Context module.
-
-module Hydra.Dsl.Meta.Context (
-  module Hydra.Dsl.Context,
-  module Hydra.Dsl.Meta.Context,
-  DslCtx.contextTrace,
-  DslCtx.contextMessages,
-  DslCtx.contextOther,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Phantoms
-import Hydra.Dsl.Context hiding (contextTrace, contextMessages, contextOther)
-import qualified Hydra.Dsl.Context as DslCtx
-
-import qualified Hydra.Dsl.Meta.Lib.Eithers as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Lists as Lists
-
-
--- | Identity function on Either (Context wrapping removed; retained for API compatibility during migration)
-withContext :: TTerm Context -> TTerm (Either e a) -> TTerm (Either e a)
-withContext _cx e = e
-
--- | Push a trace frame onto a Context
-pushTrace :: TTerm String -> TTerm Context -> TTerm Context
-pushTrace label cx = context
-    (Lists.cons label (DslCtx.contextTrace cx))
-    (DslCtx.contextMessages cx)
-    (DslCtx.contextOther cx)
-
--- | Create a Left error (Context parameter is ignored; retained for API compatibility during migration)
-failInContext :: TTerm e -> TTerm Context -> TTerm (Either e a)
-failInContext err _cx = left err
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Core.hs b/src/main/haskell/Hydra/Dsl/Meta/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Core.hs
+++ /dev/null
@@ -1,56 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Haskell-specific convenience layer over the generated Hydra.Dsl.Core module.
--- Re-exports all generated DSL functions and adds AsTerm-flexible overrides
--- for functions commonly called with TBinding arguments.
-
-module Hydra.Dsl.Meta.Core (
-  module Hydra.Dsl.Core,
-  module Hydra.Dsl.Meta.Core,
-  nameLift,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms (nameLift, var, (~>))
-import Hydra.Dsl.Core hiding (binding, injection, typeVariable)
-import qualified Hydra.Dsl.Core as Gen
-
--- For helpers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic as Logic
-
-import qualified Data.Map as M
-import Prelude hiding (map, product)
-
-
--- | AsTerm-flexible overrides of generated functions.
--- These allow passing TBinding values where TTerm is expected.
-
-binding :: AsTerm t Term => TTerm Name -> t -> TTerm (Maybe TypeScheme) -> TTerm Binding
-binding n t ts = Gen.binding n (asTerm t) ts
-
-injection :: AsTerm t Name => t -> TTerm Field -> TTerm Injection
-injection n f = Gen.injection (asTerm n) f
-
-typeVariable :: AsTerm t Name => t -> TTerm Type
-typeVariable n = Gen.typeVariable (asTerm n)
-
-
--- | Non-standard helpers (used in kernel source modules)
-
-equalName_ :: TTerm Name -> TTerm Name -> TTerm Bool
-equalName_ left right = Equality.equal (Gen.unName left) (Gen.unName right)
-
-equalNameList_ :: TTerm [Name] -> TTerm [Name] -> TTerm Bool
-equalNameList_ lefts rights = Logic.and
-  (Equality.equal (Lists.length lefts) (Lists.length rights))
-  (Logic.ands $ Lists.zipWith equalName lefts rights)
-  where
-    equalName = "left" ~> "right" ~> Equality.equal
-      (Gen.unName (var "left" :: TTerm Name))
-      (Gen.unName (var "right" :: TTerm Name))
-
-false :: TTerm Term
-false = termLiteral $ literalBoolean $ TTerm $ TermLiteral $ LiteralBoolean False
diff --git a/src/main/haskell/Hydra/Dsl/Meta/DeepCore.hs b/src/main/haskell/Hydra/Dsl/Meta/DeepCore.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/DeepCore.hs
+++ /dev/null
@@ -1,167 +0,0 @@
--- | A domain-specific language for constructing Hydra terms in Haskell.
---
--- This DSL provides helpers for constructing "deep" terms - i.e., terms that
--- represent Hydra terms as data (Term values), as opposed to the shallow DSL
--- that works at the Haskell level.
-module Hydra.Dsl.Meta.DeepCore where
-
-import Hydra.Kernel
-import qualified Hydra.Dsl.Meta.Core as Core
-import qualified Hydra.Dsl.Meta.Phantoms as P
-
-import qualified Data.Char as C
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-
-
---------------------------------------------------------------------------------
--- Application operators
---------------------------------------------------------------------------------
-
--- | Apply a function term to an argument term (infix operator, alias)
-(@@@) :: TTerm Term -> TTerm Term -> TTerm Term
-fun @@@ arg = apply fun arg
-
--- | Apply a function term to an argument term
-apply :: TTerm Term -> TTerm Term -> TTerm Term
-apply lhs rhs = Core.termApplication $ Core.application lhs rhs
-
---------------------------------------------------------------------------------
--- Case statements and pattern matching
---------------------------------------------------------------------------------
-
-cases :: Name -> TTerm Term -> TTerm (Maybe Term) -> [TTerm Field] -> TTerm Term
-cases tname arg dflt fields = match tname dflt fields @@@ arg
-
--- | Create a union case statement with optional default case
-match :: Name -> TTerm (Maybe Term) -> [TTerm Field] -> TTerm Term
-match tname dflt fields = Core.termCases $
-  Core.caseStatement
-    (Core.nameLift tname)
-    dflt
-    (P.list fields)
-
--- | Create a field for case matching
-field :: Name -> TTerm Term -> TTerm Field
-field fname body = Core.field (Core.nameLift fname) body
-
---------------------------------------------------------------------------------
--- Functions and lambdas
---------------------------------------------------------------------------------
-
--- | Create a lambda term with a variable name and body
-lambda :: String -> TTerm Term -> TTerm Term
-lambda v body = Core.termLambda $ Core.lambda (Core.name (P.string v)) P.nothing $ body
-
--- | Create a lambda term with a dynamic parameter name, optional domain, and body
-lambdaTyped :: TTerm Name -> TTerm (Maybe Type) -> TTerm Term -> TTerm Term
-lambdaTyped name domain body = Core.termLambda $ Core.lambda name domain body
-
-constant :: TTerm Term -> TTerm Term
-constant = lambda ignoredVariable
-
--- | Create a reference to a primitive function.
--- Uses termVariable; the name resolves via graphPrimitives fallthrough.
-primitive :: Name -> TTerm Term
-primitive name = Core.termVariable $ Core.nameLift name
-
--- TODO: this is probably equivalent to `primitive`.
--- | Create a reference to a primitive function using encodedName
--- (for primitives that need namespace encoding)
-primitiveEncoded :: Name -> TTerm Term
-primitiveEncoded name = Core.termVariable $ P.encodedName name
-
---------------------------------------------------------------------------------
--- Projections and eliminations
---------------------------------------------------------------------------------
-
--- | Create a record field projection
-project :: Name -> Name -> TTerm Term
-project tname fname = Core.termProject $
-  Core.projection (Core.nameLift tname) (Core.nameLift fname)
-
-unwrap :: Name -> TTerm Term
-unwrap name = unwrapDynamic (Core.nameLift name)
-
--- | Create an unwrap elimination for a wrapped type
-unwrapDynamic :: TTerm Name -> TTerm Term
-unwrapDynamic tname = Core.termUnwrap tname
-
---------------------------------------------------------------------------------
--- Literals and basic terms
---------------------------------------------------------------------------------
-
--- | Create a string literal term
-string :: TTerm String -> TTerm Term
-string s = Core.termLiteral $ Core.literalString s
-
--- | Create a variable reference term
-var :: String -> TTerm Term
-var s = Core.termVariable $ Core.name $ P.string s
-
--- | Create a unit term
-unit :: TTerm Term
-unit = Core.termUnit
-
---------------------------------------------------------------------------------
--- Compound terms (records, unions, wraps, lists)
---------------------------------------------------------------------------------
-
--- | Create a union injection term
-injection :: Name -> TTerm Field -> TTerm Term
-injection tname fld = Core.termInject $ Core.injection (Core.nameLift tname) fld
-
--- | Create a record term with a type name and fields
-record :: Name -> [TTerm Field] -> TTerm Term
-record tname fields = Core.termRecord $ Core.record (Core.nameLift tname) (P.list fields)
-
--- | Create a list term from a list of terms
-list :: TTerm [Term] -> TTerm Term
-list terms = Core.termList terms
-
-map :: TTerm (M.Map Term Term) -> TTerm Term
-map terms = Core.termMap terms
-
--- | Create an Either term (left or right)
-either :: TTerm (Either Term Term) -> TTerm Term
-either e = Core.termEither e
-
-left :: TTerm Term -> TTerm Term
-left (TTerm t) = Core.termEither $ TTerm $ TermEither $ Left t
-
-right :: TTerm Term -> TTerm Term
-right (TTerm t) = Core.termEither $ TTerm $ TermEither $ Right t
-
--- | Create a let expression with bindings and a body
--- Each binding is a (name, term) pair
-lets :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
-lets bindings body = Core.termLet $ Core.let_
-  (P.list [Core.binding (Core.name (P.string n)) t P.nothing | (n, t) <- bindings])
-  body
-
--- | Create a single let binding
-letn :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letn name value body = lets [(name, value)] body
-
-pair :: TTerm Term -> TTerm Term -> TTerm Term
-pair (TTerm first) (TTerm second) = Core.termPair $ TTerm $ TermPair (first, second)
-
--- | Create a Nothing term
-nothing :: TTerm Term
-nothing = TTerm $ TermMaybe Nothing
-
--- | Create a Just term
-just :: TTerm Term -> TTerm Term
-just (TTerm t) = TTerm $ TermMaybe $ Just t
-
-ref :: TTermDefinition a -> TTerm Term
-ref (TTermDefinition name _) = Core.termVariable $ Core.nameLift name
-
--- | Create a wrap term with a type name and body
-wrap :: Name -> TTerm Term -> TTerm Term
-wrap tname body = Core.termWrap $ Core.wrappedTerm (Core.nameLift tname) body
-
--- | Create a wrap term with a dynamic type name (TTerm Name)
-wrapDynamic :: TTerm Name -> TTerm Term -> TTerm Term
-wrapDynamic tname body = Core.termWrap $ Core.wrappedTerm tname body
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Graph.hs b/src/main/haskell/Hydra/Dsl/Meta/Graph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Graph.hs
+++ /dev/null
@@ -1,56 +0,0 @@
--- | Haskell-specific convenience layer over the generated Hydra.Dsl.Graph module.
--- Re-exports all generated DSL functions and adds non-standard helpers.
-
-module Hydra.Dsl.Meta.Graph (
-  module Hydra.Dsl.Graph,
-  module Hydra.Dsl.Meta.Graph,
-  DslGraph.primitiveName,
-  DslGraph.primitiveTypeScheme,
-  DslGraph.graphPrimitives,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Phantoms
-import Hydra.Dsl.Graph hiding (primitiveName, primitiveType, graphPrimitives)
-import qualified Hydra.Dsl.Graph as DslGraph
-
-import qualified Hydra.Dsl.Meta.Lib.Lists as Lists
-import qualified Hydra.Dsl.Meta.Lib.Maps as Maps
-import qualified Hydra.Dsl.Meta.Lib.Sets as Sets
-
-import qualified Data.Map as M
-import qualified Data.Set as S
-
-
--- | Non-standard helpers
-
-comparisonLessThan :: TTerm Comparison
-comparisonLessThan = injectUnit _Comparison _Comparison_lessThan
-
-comparisonEqualTo :: TTerm Comparison
-comparisonEqualTo = injectUnit _Comparison _Comparison_equalTo
-
-comparisonGreaterThan :: TTerm Comparison
-comparisonGreaterThan = injectUnit _Comparison _Comparison_greaterThan
-
-typeClassEquality :: TTerm TypeClass
-typeClassEquality = injectUnit _TypeClass _TypeClass_equality
-
-typeClassOrdering :: TTerm TypeClass
-typeClassOrdering = injectUnit _TypeClass _TypeClass_ordering
-
-emptyGraph :: TTerm Graph
-emptyGraph = graph
-    Maps.empty  -- boundTerms
-    Maps.empty  -- boundTypes
-    Maps.empty  -- classConstraints
-    Sets.empty  -- lambdaVariables
-    Maps.empty  -- metadata
-    Maps.empty  -- primitives
-    Maps.empty  -- schemaTypes
-    Sets.empty  -- typeVariables
-
-graphPrimitiveTypes :: TTerm Graph -> TTerm (M.Map Name TypeScheme)
-graphPrimitiveTypes g = Maps.fromList (Lists.map
-    ("_gpt_p" ~> pair (DslGraph.primitiveName $ var "_gpt_p") (DslGraph.primitiveTypeScheme $ var "_gpt_p"))
-    (Maps.elems $ DslGraph.graphPrimitives g))
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Chars.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Chars.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Chars.hs
+++ /dev/null
@@ -1,33 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.chars library
-
-module Hydra.Dsl.Meta.Lib.Chars where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Check whether a character is alphanumeric.
-isAlphaNum :: TTerm Int -> TTerm Bool
-isAlphaNum = primitive1 _chars_isAlphaNum
-
--- | Check whether a character is lowercase.
-isLower :: TTerm Int -> TTerm Bool
-isLower = primitive1 _chars_isLower
-
--- | Check whether a character is a whitespace character.
-isSpace :: TTerm Int -> TTerm Bool
-isSpace = primitive1 _chars_isSpace
-
--- | Check whether a character is uppercase.
-isUpper :: TTerm Int -> TTerm Bool
-isUpper = primitive1 _chars_isUpper
-
--- | Convert a character to lowercase.
-toLower :: TTerm Int -> TTerm Int
-toLower = primitive1 _chars_toLower
-
--- | Convert a character to uppercase.
-toUpper :: TTerm Int -> TTerm Int
-toUpper = primitive1 _chars_toUpper
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Eithers.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Eithers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Eithers.hs
+++ /dev/null
@@ -1,70 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.eithers library
-
-module Hydra.Dsl.Meta.Lib.Eithers where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-import qualified Data.Set as S
-
-
--- | Map over both sides of an Either value.
-bimap :: TTerm (a -> c) -> TTerm (b -> d) -> TTerm (Either a b) -> TTerm (Either c d)
-bimap = primitive3 _eithers_bimap
-
--- | Bind (flatMap) for Either: if Right, apply the function; if Left, return unchanged.
-bind :: TTerm (Either a b) -> TTerm (b -> Either a c) -> TTerm (Either a c)
-bind = primitive2 _eithers_bind
-
--- | Eliminate an Either value by applying one of two functions.
-either_ :: TTerm (a -> c) -> TTerm (b -> c) -> TTerm (Either a b) -> TTerm c
-either_ = primitive3 _eithers_either
-
--- | Left-fold over a list with an Either-returning function, short-circuiting on Left.
-foldl :: TTerm (a -> b -> Either c a) -> TTerm a -> TTerm [b] -> TTerm (Either c a)
-foldl = primitive3 _eithers_foldl
-
--- | Extract the Left value, or return a default.
-fromLeft :: TTerm a -> TTerm (Either a b) -> TTerm a
-fromLeft = primitive2 _eithers_fromLeft
-
--- | Extract the Right value, or return a default.
-fromRight :: TTerm b -> TTerm (Either a b) -> TTerm b
-fromRight = primitive2 _eithers_fromRight
-
--- | Check if an Either is a Left value.
-isLeft :: TTerm (Either a b) -> TTerm Bool
-isLeft = primitive1 _eithers_isLeft
-
--- | Check if an Either is a Right value.
-isRight :: TTerm (Either a b) -> TTerm Bool
-isRight = primitive1 _eithers_isRight
-
--- | Extract all Left values from a list of Eithers.
-lefts :: TTerm [Either a b] -> TTerm [a]
-lefts = primitive1 _eithers_lefts
-
--- | Map a function over the Right side of an Either (standard functor map).
-map :: TTerm (a -> b) -> TTerm (Either c a) -> TTerm (Either c b)
-map = primitive2 _eithers_map
-
--- | Map a function returning Either over a list, collecting results or short-circuiting on Left.
-mapList :: TTerm (a -> Either e b) -> TTerm [a] -> TTerm (Either e [b])
-mapList = primitive2 _eithers_mapList
-
--- | Map a function returning Either over a Maybe, or return Right Nothing if Nothing.
-mapMaybe :: TTerm (a -> Either c b) -> TTerm (Maybe a) -> TTerm (Either c (Maybe b))
-mapMaybe = primitive2 _eithers_mapMaybe
-
--- | Map a function returning Either over a Set, collecting results or short-circuiting on Left.
-mapSet :: TTerm (a -> Either c b) -> TTerm (S.Set a) -> TTerm (Either c (S.Set b))
-mapSet = primitive2 _eithers_mapSet
-
--- | Partition a list of Eithers into lefts and rights.
-partitionEithers :: TTerm [Either a b] -> TTerm ([a], [b])
-partitionEithers = primitive1 _eithers_partitionEithers
-
--- | Extract all Right values from a list of Eithers.
-rights :: TTerm [Either a b] -> TTerm [b]
-rights = primitive1 _eithers_rights
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Equality.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Equality.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Equality.hs
+++ /dev/null
@@ -1,51 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.equality library
-
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Dsl.Meta.Lib.Equality where
-
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms
-import Hydra.Phantoms
-import Hydra.Util
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-import Data.Int
-
-
--- | Compare two values and return a Comparison.
-compare :: AsTerm t2 a => TTerm a -> t2 -> TTerm Comparison
-compare t1 t2 = primitive2 _equality_compare t1 (asTerm t2)
-
--- | Check if two values are equal.
-equal :: AsTerm t2 a => TTerm a -> t2 -> TTerm Bool
-equal t1 t2 = primitive2 _equality_equal t1 (asTerm t2)
-
--- | Check if first value is greater than second.
-gt :: AsTerm t2 a => TTerm a -> t2 -> TTerm Bool
-gt t1 t2 = primitive2 _equality_gt t1 (asTerm t2)
-
--- | Check if first value is greater than or equal to second.
-gte :: AsTerm t2 a => TTerm a -> t2 -> TTerm Bool
-gte t1 t2 = primitive2 _equality_gte t1 (asTerm t2)
-
--- | Return a value unchanged.
-identity :: TTerm a -> TTerm a
-identity = primitive1 _equality_identity
-
--- | Check if first value is less than second.
-lt :: AsTerm t2 a => TTerm a -> t2 -> TTerm Bool
-lt t1 t2 = primitive2 _equality_lt t1 (asTerm t2)
-
--- | Check if first value is less than or equal to second.
-lte :: AsTerm t2 a => TTerm a -> t2 -> TTerm Bool
-lte t1 t2 = primitive2 _equality_lte t1 (asTerm t2)
-
--- | Return the maximum of two values.
-max :: AsTerm t2 a => TTerm a -> t2 -> TTerm a
-max t1 t2 = primitive2 _equality_max t1 (asTerm t2)
-
--- | Return the minimum of two values.
-min :: AsTerm t2 a => TTerm a -> t2 -> TTerm a
-min t1 t2 = primitive2 _equality_min t1 (asTerm t2)
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Lists.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Lists.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Lists.hs
+++ /dev/null
@@ -1,160 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.lists library
-
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Dsl.Meta.Lib.Lists where
-
-import Hydra.Phantoms
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Apply a list of functions to a list of values (applicative style).
-apply :: TTerm [a -> b] -> TTerm [a] -> TTerm [b]
-apply = primitive2 _lists_apply
-
--- | Apply a function that returns lists to each element and flatten results.
-bind :: TTerm [a] -> TTerm (a -> [b]) -> TTerm [b]
-bind = primitive2 _lists_bind
-
--- | Concatenate a list of lists.
-concat :: TTerm [[a]] -> TTerm [a]
-concat = primitive1 _lists_concat
-
--- | Concatenate two lists.
-concat2 :: TTerm [a] -> TTerm [a] -> TTerm [a]
-concat2 = primitive2 _lists_concat2
-
--- | Prepend a value to a list.
-cons :: TTerm a -> TTerm [a] -> TTerm [a]
-cons = primitive2 _lists_cons
-
--- | Drop the first n elements from a list.
-drop :: TTerm Int -> TTerm [a] -> TTerm [a]
-drop = primitive2 _lists_drop
-
--- | Drop elements from the beginning of a list while predicate is true.
-dropWhile :: TTerm (a -> Bool) -> TTerm [a] -> TTerm [a]
-dropWhile = primitive2 _lists_dropWhile
-
--- | Check if an element is in a list.
-elem :: Eq a => TTerm a -> TTerm [a] -> TTerm Bool
-elem = primitive2 _lists_elem
-
--- | Filter a list based on a predicate.
-filter :: AsTerm t [a] => TTerm (a -> Bool) -> t -> TTerm [a]
-filter p xs = primitive2 _lists_filter p (asTerm xs)
-
--- | Find the first element matching a predicate.
-find :: TTerm (a -> Bool) -> TTerm [a] -> TTerm (Maybe a)
-find = primitive2 _lists_find
-
--- | Fold a list from the left.
-foldl :: AsTerm f (b -> a -> b) => f -> TTerm b -> TTerm [a] -> TTerm b
-foldl f = primitive3 _lists_foldl (asTerm f)
-
--- | Fold a list from the right.
-foldr :: AsTerm f (a -> b -> b) => f -> TTerm b -> TTerm [a] -> TTerm b
-foldr f = primitive3 _lists_foldr (asTerm f)
-
--- | Group consecutive equal elements.
-group :: Eq a => TTerm [a] -> TTerm [[a]]
-group = primitive1 _lists_group
-
--- | Intercalate a list of lists with a separator list between each.
-intercalate :: TTerm [a] -> TTerm [[a]] -> TTerm [a]
-intercalate = primitive2 _lists_intercalate
-
--- | Intersperse a value between elements of a list.
-intersperse :: TTerm a -> TTerm [a] -> TTerm [a]
-intersperse = primitive2 _lists_intersperse
-
--- | Get the length of a list.
-length :: TTerm [a] -> TTerm Int
-length = primitive1 _lists_length
-
--- | Map a function over a list.
-map :: (AsTerm f (a -> b), AsTerm t [a]) => f -> t -> TTerm [b]
-map f l = primitive2 _lists_map (asTerm f) (asTerm l)
-
--- | Get the element at a specified index in a list, returning Nothing if out of bounds.
-maybeAt :: TTerm Int -> TTerm [a] -> TTerm (Maybe a)
-maybeAt = primitive2 _lists_maybeAt
-
--- | Get the first element of a list, returning Nothing if the list is empty.
-maybeHead :: TTerm [a] -> TTerm (Maybe a)
-maybeHead = primitive1 _lists_maybeHead
-
--- | Return all elements except the last one, returning Nothing if the list is empty.
-maybeInit :: TTerm [a] -> TTerm (Maybe [a])
-maybeInit = primitive1 _lists_maybeInit
-
--- | Get the last element of a list, returning Nothing if the list is empty.
-maybeLast :: TTerm [a] -> TTerm (Maybe a)
-maybeLast = primitive1 _lists_maybeLast
-
--- | Get all elements of a list except the first, returning Nothing if the list is empty.
-maybeTail :: TTerm [a] -> TTerm (Maybe [a])
-maybeTail = primitive1 _lists_maybeTail
-
--- | Remove duplicate elements from a list.
-nub :: Eq a => TTerm [a] -> TTerm [a]
-nub = primitive1 _lists_nub
-
--- | Check if a list is empty.
-null :: TTerm [a] -> TTerm Bool
-null = primitive1 _lists_null
-
--- | Partition a list into elements that satisfy a predicate and elements that do not.
-partition :: TTerm (a -> Bool) -> TTerm [a] -> TTerm ([a], [a])
-partition = primitive2 _lists_partition
-
--- | Create a list with a single element.
-pure :: TTerm a -> TTerm [a]
-pure = primitive1 _lists_pure
-
--- | Create a list with n copies of a value.
-replicate :: AsTerm t a => TTerm Int -> t -> TTerm [a]
-replicate n x = primitive2 _lists_replicate n (asTerm x)
-
--- | Reverse a list.
-reverse :: TTerm [a] -> TTerm [a]
-reverse = primitive1 _lists_reverse
-
--- | Create a single-element list.
-singleton :: TTerm a -> TTerm [a]
-singleton = primitive1 _lists_singleton
-
--- | Sort a list.
-sort :: TTerm [a] -> TTerm [a]
-sort = primitive1 _lists_sort
-
--- | Sort a list based on a key function.
-sortOn :: TTerm (a -> b) -> TTerm [a] -> TTerm [a]
-sortOn = primitive2 _lists_sortOn
-
--- | Split a list at the first element where predicate fails.
-span :: TTerm (a -> Bool) -> TTerm [a] -> TTerm ([a], [a])
-span = primitive2 _lists_span
-
--- | Take the first n elements from a list.
-take :: TTerm Int -> TTerm [a] -> TTerm [a]
-take = primitive2 _lists_take
-
--- | Transpose a list of lists.
-transpose :: TTerm [[a]] -> TTerm [[a]]
-transpose = primitive1 _lists_transpose
-
--- | Decompose a list into its head and tail, returning Nothing if the list is empty.
-uncons :: TTerm [a] -> TTerm (Maybe (a, [a]))
-uncons = primitive1 _lists_uncons
-
--- | Zip two lists into pairs.
-zip :: TTerm [a] -> TTerm [b] -> TTerm [(a, b)]
-zip = primitive2 _lists_zip
-
--- | Zip two lists with a combining function.
-zipWith :: TTerm (a -> b -> c) -> TTerm [a] -> TTerm [b] -> TTerm [c]
-zipWith = primitive3 _lists_zipWith
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Literals.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Literals.hs
+++ /dev/null
@@ -1,257 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.literals library
-
-module Hydra.Dsl.Meta.Lib.Literals where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-import qualified Data.ByteString as B
-import qualified Data.Scientific as Sci
-import Data.Int
-
-
--- | Convert a bigfloat (Double) to a bigint (Integer).
-bigfloatToBigint :: TTerm Double -> TTerm Integer
-bigfloatToBigint = primitive1 _literals_bigfloatToBigint
-
--- | Convert a bigfloat (Double) to a float32 (Float).
-bigfloatToFloat32 :: TTerm Double -> TTerm Float
-bigfloatToFloat32 = primitive1 _literals_bigfloatToFloat32
-
--- | Convert a bigfloat (Double) to a float64 (Double).
-bigfloatToFloat64 :: TTerm Double -> TTerm Double
-bigfloatToFloat64 = primitive1 _literals_bigfloatToFloat64
-
--- | Convert a bigint (Integer) to a bigfloat (Double).
-bigintToBigfloat :: TTerm Integer -> TTerm Double
-bigintToBigfloat = primitive1 _literals_bigintToBigfloat
-
--- | Convert a bigint (Integer) to a decimal (Scientific).
-bigintToDecimal :: TTerm Integer -> TTerm Sci.Scientific
-bigintToDecimal = primitive1 _literals_bigintToDecimal
-
--- | Convert a bigint (Integer) to an int8.
-bigintToInt8 :: TTerm Integer -> TTerm Int8
-bigintToInt8 = primitive1 _literals_bigintToInt8
-
--- | Convert a bigint (Integer) to an int16.
-bigintToInt16 :: TTerm Integer -> TTerm Int16
-bigintToInt16 = primitive1 _literals_bigintToInt16
-
--- | Convert a bigint (Integer) to an int32.
-bigintToInt32 :: TTerm Integer -> TTerm Int
-bigintToInt32 = primitive1 _literals_bigintToInt32
-
--- | Convert a bigint (Integer) to an int64.
-bigintToInt64 :: TTerm Integer -> TTerm Int64
-bigintToInt64 = primitive1 _literals_bigintToInt64
-
--- | Convert a bigint (Integer) to a uint8.
-bigintToUint8 :: TTerm Integer -> TTerm Int16
-bigintToUint8 = primitive1 _literals_bigintToUint8
-
--- | Convert a bigint (Integer) to a uint16.
-bigintToUint16 :: TTerm Integer -> TTerm Int
-bigintToUint16 = primitive1 _literals_bigintToUint16
-
--- | Convert a bigint (Integer) to a uint32.
-bigintToUint32 :: TTerm Integer -> TTerm Int64
-bigintToUint32 = primitive1 _literals_bigintToUint32
-
--- | Convert a bigint (Integer) to a uint64.
-bigintToUint64 :: TTerm Integer -> TTerm Integer
-bigintToUint64 = primitive1 _literals_bigintToUint64
-
--- | Convert binary to a list of byte values (0-255).
-binaryToBytes :: TTerm B.ByteString -> TTerm [Int]
-binaryToBytes = primitive1 _literals_binaryToBytes
-
--- | Convert binary to string by base64 encoding.
-binaryToString :: TTerm B.ByteString -> TTerm String
-binaryToString = primitive1 _literals_binaryToString
-
--- | Convert a decimal (Scientific) to a bigint (Integer) by truncating toward zero.
-decimalToBigint :: TTerm Sci.Scientific -> TTerm Integer
-decimalToBigint = primitive1 _literals_decimalToBigint
-
--- | Convert a decimal (Scientific) to a float32 (Float). May lose precision.
-decimalToFloat32 :: TTerm Sci.Scientific -> TTerm Float
-decimalToFloat32 = primitive1 _literals_decimalToFloat32
-
--- | Convert a decimal (Scientific) to a float64 (Double). May lose precision.
-decimalToFloat64 :: TTerm Sci.Scientific -> TTerm Double
-decimalToFloat64 = primitive1 _literals_decimalToFloat64
-
--- | Convert a float32 (Float) to a bigfloat (Double).
-float32ToBigfloat :: TTerm Float -> TTerm Double
-float32ToBigfloat = primitive1 _literals_float32ToBigfloat
-
--- | Convert a float32 (Float) to a decimal (Scientific).
-float32ToDecimal :: TTerm Float -> TTerm Sci.Scientific
-float32ToDecimal = primitive1 _literals_float32ToDecimal
-
--- | Convert a float64 (Double) to a bigfloat (Double).
-float64ToBigfloat :: TTerm Double -> TTerm Double
-float64ToBigfloat = primitive1 _literals_float64ToBigfloat
-
--- | Convert a float64 (Double) to a decimal (Scientific).
-float64ToDecimal :: TTerm Double -> TTerm Sci.Scientific
-float64ToDecimal = primitive1 _literals_float64ToDecimal
-
--- | Convert an int8 to a bigint (Integer).
-int8ToBigint :: TTerm Int8 -> TTerm Integer
-int8ToBigint = primitive1 _literals_int8ToBigint
-
--- | Convert an int16 to a bigint (Integer).
-int16ToBigint :: TTerm Int16 -> TTerm Integer
-int16ToBigint = primitive1 _literals_int16ToBigint
-
--- | Convert an int32 to a bigint (Integer).
-int32ToBigint :: TTerm Int -> TTerm Integer
-int32ToBigint = primitive1 _literals_int32ToBigint
-
--- | Convert an int64 to a bigint (Integer).
-int64ToBigint :: TTerm Int64 -> TTerm Integer
-int64ToBigint = primitive1 _literals_int64ToBigint
-
--- | Parse a string to a bigfloat (Double).
-readBigfloat :: TTerm String -> TTerm (Maybe Double)
-readBigfloat = primitive1 _literals_readBigfloat
-
--- | Parse a string to a bigint (Integer).
-readBigint :: TTerm String -> TTerm (Maybe Integer)
-readBigint = primitive1 _literals_readBigint
-
--- | Parse a string to a boolean.
-readBoolean :: TTerm String -> TTerm (Maybe Bool)
-readBoolean = primitive1 _literals_readBoolean
-
--- | Parse a string to a decimal (Scientific).
-readDecimal :: TTerm String -> TTerm (Maybe Sci.Scientific)
-readDecimal = primitive1 _literals_readDecimal
-
--- | Parse a string to a float32 (Float).
-readFloat32 :: TTerm String -> TTerm (Maybe Float)
-readFloat32 = primitive1 _literals_readFloat32
-
--- | Parse a string to a float64 (Double).
-readFloat64 :: TTerm String -> TTerm (Maybe Double)
-readFloat64 = primitive1 _literals_readFloat64
-
--- | Parse a string to an int8 (-128 to 127).
-readInt8 :: TTerm String -> TTerm (Maybe Int8)
-readInt8 = primitive1 _literals_readInt8
-
--- | Parse a string to an int16 (-32768 to 32767).
-readInt16 :: TTerm String -> TTerm (Maybe Int16)
-readInt16 = primitive1 _literals_readInt16
-
--- | Parse a string to an int32.
-readInt32 :: TTerm String -> TTerm (Maybe Int)
-readInt32 = primitive1 _literals_readInt32
-
--- | Parse a string to an int64.
-readInt64 :: TTerm String -> TTerm (Maybe Int64)
-readInt64 = primitive1 _literals_readInt64
-
--- | Parse a string literal.
-readString :: TTerm String -> TTerm (Maybe String)
-readString = primitive1 _literals_readString
-
--- | Parse a string to a uint8 (0 to 255).
-readUint8 :: TTerm String -> TTerm (Maybe Int16)
-readUint8 = primitive1 _literals_readUint8
-
--- | Parse a string to a uint16 (0 to 65535).
-readUint16 :: TTerm String -> TTerm (Maybe Int)
-readUint16 = primitive1 _literals_readUint16
-
--- | Parse a string to a uint32 (0 to 4294967295).
-readUint32 :: TTerm String -> TTerm (Maybe Int64)
-readUint32 = primitive1 _literals_readUint32
-
--- | Parse a string to a uint64 (0 to 18446744073709551615).
-readUint64 :: TTerm String -> TTerm (Maybe Integer)
-readUint64 = primitive1 _literals_readUint64
-
--- | Convert a bigfloat (Double) to string.
-showBigfloat :: TTerm Double -> TTerm String
-showBigfloat = primitive1 _literals_showBigfloat
-
--- | Convert a bigint (Integer) to string.
-showBigint :: TTerm Integer -> TTerm String
-showBigint = primitive1 _literals_showBigint
-
--- | Convert a boolean to string.
-showBoolean :: TTerm Bool -> TTerm String
-showBoolean = primitive1 _literals_showBoolean
-
--- | Convert a decimal (Scientific) to string.
-showDecimal :: TTerm Sci.Scientific -> TTerm String
-showDecimal = primitive1 _literals_showDecimal
-
--- | Convert a float32 (Float) to string.
-showFloat32 :: TTerm Float -> TTerm String
-showFloat32 = primitive1 _literals_showFloat32
-
--- | Convert a float64 (Double) to string.
-showFloat64 :: TTerm Double -> TTerm String
-showFloat64 = primitive1 _literals_showFloat64
-
--- | Convert an int8 to string.
-showInt8 :: TTerm Int8 -> TTerm String
-showInt8 = primitive1 _literals_showInt8
-
--- | Convert an int16 to string.
-showInt16 :: TTerm Int16 -> TTerm String
-showInt16 = primitive1 _literals_showInt16
-
--- | Convert an int32 to string.
-showInt32 :: TTerm Int -> TTerm String
-showInt32 = primitive1 _literals_showInt32
-
--- | Convert an int64 to string.
-showInt64 :: TTerm Int64 -> TTerm String
-showInt64 = primitive1 _literals_showInt64
-
--- | Convert a string to a quoted string representation.
-showString :: TTerm String -> TTerm String
-showString = primitive1 _literals_showString
-
--- | Convert a uint8 to string.
-showUint8 :: TTerm Int16 -> TTerm String
-showUint8 = primitive1 _literals_showUint8
-
--- | Convert a uint16 to string.
-showUint16 :: TTerm Int -> TTerm String
-showUint16 = primitive1 _literals_showUint16
-
--- | Convert a uint32 to string.
-showUint32 :: TTerm Int64 -> TTerm String
-showUint32 = primitive1 _literals_showUint32
-
--- | Convert a uint64 to string.
-showUint64 :: TTerm Integer -> TTerm String
-showUint64 = primitive1 _literals_showUint64
-
--- | Convert string to binary by base64 decoding.
-stringToBinary :: TTerm String -> TTerm B.ByteString
-stringToBinary = primitive1 _literals_stringToBinary
-
--- | Convert a uint8 to a bigint (Integer).
-uint8ToBigint :: TTerm Int16 -> TTerm Integer
-uint8ToBigint = primitive1 _literals_uint8ToBigint
-
--- | Convert a uint16 to a bigint (Integer).
-uint16ToBigint :: TTerm Int -> TTerm Integer
-uint16ToBigint = primitive1 _literals_uint16ToBigint
-
--- | Convert a uint32 to a bigint (Integer).
-uint32ToBigint :: TTerm Int64 -> TTerm Integer
-uint32ToBigint = primitive1 _literals_uint32ToBigint
-
--- | Convert a uint64 to a bigint (Integer).
-uint64ToBigint :: TTerm Integer -> TTerm Integer
-uint64ToBigint = primitive1 _literals_uint64ToBigint
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Logic.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Logic.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Logic.hs
+++ /dev/null
@@ -1,39 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.logic library
-
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Dsl.Meta.Lib.Logic where
-
-import Hydra.Phantoms
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Compute the logical AND of two boolean values.
-and :: TTerm Bool -> TTerm Bool -> TTerm Bool
-and = primitive2 _logic_and
-
--- | Compute a conditional expression.
-ifElse :: (AsTerm c Bool, AsTerm t a, AsTerm e a) => c -> t -> e -> TTerm a
-ifElse cond t e = primitive3 _logic_ifElse (asTerm cond) (asTerm t) (asTerm e)
-
--- | Compute the logical NOT of a boolean value.
-not :: TTerm Bool -> TTerm Bool
-not = primitive1 _logic_not
-
--- | Compute the logical OR of two boolean values.
-or :: TTerm Bool -> TTerm Bool -> TTerm Bool
-or = primitive2 _logic_or
-
-----------------------------------------
--- Helpers which are not primitives
-
--- | Fold a list of booleans with logical AND, returning True for an empty list.
-ands :: TTerm [Bool] -> TTerm Bool
-ands terms = fold (primitive _logic_and) @@ true @@ terms
-
--- | Fold a list of booleans with logical OR, returning False for an empty list.
-ors :: TTerm [Bool] -> TTerm Bool
-ors terms = fold (primitive _logic_or) @@ false @@ terms
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Maps.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Maps.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Maps.hs
+++ /dev/null
@@ -1,94 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Phantom-typed term DSL for the hydra.lib.maps library
-
-module Hydra.Dsl.Meta.Lib.Maps where
-
-import Hydra.Phantoms
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-import Data.Map
-
-
--- | Alter a value at a key using a function.
-alter :: TTerm (Maybe v -> Maybe v) -> TTerm k -> TTerm (Map k v) -> TTerm (Map k v)
-alter = primitive3 _maps_alter
-
--- | Map a function over the keys and values of a map.
-bimap :: TTerm (k1 -> k2) -> TTerm (v1 -> v2) -> TTerm (Map k1 v1) -> TTerm (Map k2 v2)
-bimap = primitive3 _maps_bimap
-
--- | Remove a key from a map.
-delete :: TTerm k -> TTerm (Map k v) -> TTerm (Map k v)
-delete = primitive2 _maps_delete
-
--- | Get the values of a map.
-elems :: TTerm (Map k v) -> TTerm [v]
-elems = primitive1 _maps_elems
-
--- | Create an empty map.
-empty :: TTerm (Map k v)
-empty = primitive _maps_empty
-
--- | Filter a map based on values.
-filter :: TTerm (v -> Bool) -> TTerm (Map k v) -> TTerm (Map k v)
-filter = primitive2 _maps_filter
-
--- | Filter a map based on key-value pairs.
-filterWithKey :: TTerm (k -> v -> Bool) -> TTerm (Map k v) -> TTerm (Map k v)
-filterWithKey = primitive2 _maps_filterWithKey
-
--- | Lookup a value with a default.
-findWithDefault :: AsTerm t v => t -> TTerm k -> TTerm (Map k v) -> TTerm v
-findWithDefault def = primitive3 _maps_findWithDefault (asTerm def)
-
--- | Create a map from a list of key-value pairs.
-fromList :: TTerm [(k, v)] -> TTerm (Map k v)
-fromList = primitive1 _maps_fromList
-
--- | Insert a key-value pair into a map.
-insert :: TTerm k -> TTerm v -> TTerm (Map k v) -> TTerm (Map k v)
-insert = primitive3 _maps_insert
-
--- | Get the keys of a map.
-keys :: TTerm (Map k v) -> TTerm [k]
-keys = primitive1 _maps_keys
-
--- | Lookup a value in a map.
-lookup :: AsTerm t k => t -> TTerm (Map k v) -> TTerm (Maybe v)
-lookup k = primitive2 _maps_lookup (asTerm k)
-
--- | Map a function over a map.
-map :: AsTerm f (v1 -> v2) => f -> TTerm (Map k v1) -> TTerm (Map k v2)
-map f = primitive2 _maps_map (asTerm f)
-
--- | Map a function over the keys of a map.
-mapKeys :: TTerm (k1 -> k2) -> TTerm (Map k1 v) -> TTerm (Map k2 v)
-mapKeys = primitive2 _maps_mapKeys
-
--- | Check if a key is present in a map.
-member :: TTerm k -> TTerm (Map k v) -> TTerm Bool
-member = primitive2 _maps_member
-
--- | Check if a map is empty.
-null :: TTerm (Map k v) -> TTerm Bool
-null = primitive1 _maps_null
-
--- | Create a map with a single key-value pair.
-singleton :: TTerm k -> TTerm v -> TTerm (Map k v)
-singleton = primitive2 _maps_singleton
-
--- | Get the size of a map.
-size :: TTerm (Map k v) -> TTerm Int
-size = primitive1 _maps_size
-
--- | Convert a map to a list of key-value pairs.
-toList :: TTerm (Map k v) -> TTerm [(k, v)]
-toList = primitive1 _maps_toList
-
--- | Union two maps, with the first taking precedence.
-union :: TTerm (Map k v) -> TTerm (Map k v) -> TTerm (Map k v)
-union = primitive2 _maps_union
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Math.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Math.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Math.hs
+++ /dev/null
@@ -1,205 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.math library
-
-module Hydra.Dsl.Meta.Lib.Math where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Return the absolute value.
-abs :: Num a => TTerm a -> TTerm a
-abs = primitive1 _math_abs
-
--- | Return the arc cosine of x in radians.
-acos :: TTerm Double -> TTerm Double
-acos = primitive1 _math_acos
-
--- | Return the inverse hyperbolic cosine of x.
-acosh :: TTerm Double -> TTerm Double
-acosh = primitive1 _math_acosh
-
--- | Add two numbers.
-add :: Num a => TTerm a -> TTerm a -> TTerm a
-add = primitive2 _math_add
-
--- | Add two Float64 numbers.
-addFloat64 :: TTerm Double -> TTerm Double -> TTerm Double
-addFloat64 = primitive2 _math_addFloat64
-
--- | Return the arc sine of x in radians.
-asin :: TTerm Double -> TTerm Double
-asin = primitive1 _math_asin
-
--- | Return the inverse hyperbolic sine of x.
-asinh :: TTerm Double -> TTerm Double
-asinh = primitive1 _math_asinh
-
--- | Return the arc tangent of x in radians.
-atan :: TTerm Double -> TTerm Double
-atan = primitive1 _math_atan
-
--- | Return the arc tangent of y/x in radians, using signs to determine quadrant.
-atan2 :: TTerm Double -> TTerm Double -> TTerm Double
-atan2 = primitive2 _math_atan2
-
--- | Return the inverse hyperbolic tangent of x.
-atanh :: TTerm Double -> TTerm Double
-atanh = primitive1 _math_atanh
-
--- | Return the ceiling of x as a float64.
--- DIVERGENCE FROM HASKELL: returns Double rather than Integer so that NaN and
--- ±Inf inputs propagate per IEEE 754.
-ceiling :: TTerm Double -> TTerm Double
-ceiling = primitive1 _math_ceiling
-
--- | Return the cosine of x radians.
-cos :: TTerm Double -> TTerm Double
-cos = primitive1 _math_cos
-
--- | Return the hyperbolic cosine of x.
-cosh :: TTerm Double -> TTerm Double
-cosh = primitive1 _math_cosh
-
--- | Euler's number (e = 2.71828).
-e :: TTerm Double
-e = primitive _math_e
-
--- | Check if an integer is even.
-even :: Integral a => TTerm a -> TTerm Bool
-even = primitive1 _math_even
-
--- | Return e raised to the power x.
-exp :: TTerm Double -> TTerm Double
-exp = primitive1 _math_exp
-
--- | Return the floor of x as a float64.
--- DIVERGENCE FROM HASKELL: returns Double rather than Integer so that NaN and
--- ±Inf inputs propagate per IEEE 754.
-floor :: TTerm Double -> TTerm Double
-floor = primitive1 _math_floor
-
--- | Return the natural logarithm of x.
-log :: TTerm Double -> TTerm Double
-log = primitive1 _math_log
-
--- | Return the logarithm of x to the given base.
-logBase :: TTerm Double -> TTerm Double -> TTerm Double
-logBase = primitive2 _math_logBase
-
--- | Return the maximum of two values.
-max :: Ord a => TTerm a -> TTerm a -> TTerm a
-max = primitive2 _math_max
-
--- | Divide two integers using integer division, returning Nothing on division by zero.
-maybeDiv :: TTerm Int -> TTerm Int -> TTerm (Maybe Int)
-maybeDiv = primitive2 _math_maybeDiv
-
--- | Return the minimum of two values.
-min :: Ord a => TTerm a -> TTerm a -> TTerm a
-min = primitive2 _math_min
-
--- | Mathematical modulo, returning Nothing on division by zero.
-maybeMod :: TTerm Int -> TTerm Int -> TTerm (Maybe Int)
-maybeMod = primitive2 _math_maybeMod
-
--- | Multiply two numbers.
-mul :: Num a => TTerm a -> TTerm a -> TTerm a
-mul = primitive2 _math_mul
-
--- | Multiply two Float64 numbers.
-mulFloat64 :: TTerm Double -> TTerm Double -> TTerm Double
-mulFloat64 = primitive2 _math_mulFloat64
-
--- | Negate a number.
-negate :: Num a => TTerm a -> TTerm a
-negate = primitive1 _math_negate
-
--- | Negate a Float64 number.
-negateFloat64 :: TTerm Double -> TTerm Double
-negateFloat64 = primitive1 _math_negateFloat64
-
--- | Check if an integer is odd.
-odd :: Integral a => TTerm a -> TTerm Bool
-odd = primitive1 _math_odd
-
--- | Pi (pi = 3.14159).
-pi :: TTerm Double
-pi = primitive _math_pi
-
--- | Return x raised to the power y.
-pow :: TTerm Double -> TTerm Double -> TTerm Double
-pow = primitive2 _math_pow
-
--- | Return the predecessor (x - 1), returning Nothing on minBound.
-maybePred :: TTerm Int -> TTerm (Maybe Int)
-maybePred = primitive1 _math_maybePred
-
--- | Generate a range of values from start to end (inclusive).
-range :: Enum a => TTerm a -> TTerm a -> TTerm [a]
-range start end = primitive2 _math_range start end
-
--- | Integer remainder, returning Nothing on division by zero.
-maybeRem :: TTerm Int -> TTerm Int -> TTerm (Maybe Int)
-maybeRem = primitive2 _math_maybeRem
-
--- | Return x rounded to the nearest integer, as a float64.
--- DIVERGENCE FROM HASKELL: returns Double rather than Integer so that NaN and
--- ±Inf inputs propagate per IEEE 754.
-round :: TTerm Double -> TTerm Double
-round = primitive1 _math_round
-
--- | Round a bigfloat to n significant digits.
-roundBigfloat :: TTerm Int -> TTerm Double -> TTerm Double
-roundBigfloat = primitive2 _math_roundBigfloat
-
--- | Round a float32 to n significant digits.
-roundFloat32 :: TTerm Int -> TTerm Float -> TTerm Float
-roundFloat32 = primitive2 _math_roundFloat32
-
--- | Round a float64 to n significant digits.
-roundFloat64 :: TTerm Int -> TTerm Double -> TTerm Double
-roundFloat64 = primitive2 _math_roundFloat64
-
--- | Return the sign of a number (-1, 0, or 1).
-signum :: Num a => TTerm a -> TTerm a
-signum = primitive1 _math_signum
-
--- | Return the sine of x radians.
-sin :: TTerm Double -> TTerm Double
-sin = primitive1 _math_sin
-
--- | Return the hyperbolic sine of x.
-sinh :: TTerm Double -> TTerm Double
-sinh = primitive1 _math_sinh
-
--- | Return the square root of x.
-sqrt :: TTerm Double -> TTerm Double
-sqrt = primitive1 _math_sqrt
-
--- | Subtract two numbers.
-sub :: Num a => TTerm a -> TTerm a -> TTerm a
-sub = primitive2 _math_sub
-
--- | Subtract two Float64 numbers.
-subFloat64 :: TTerm Double -> TTerm Double -> TTerm Double
-subFloat64 = primitive2 _math_subFloat64
-
--- | Return the successor (x + 1), returning Nothing on maxBound.
-maybeSucc :: TTerm Int -> TTerm (Maybe Int)
-maybeSucc = primitive1 _math_maybeSucc
-
--- | Return the tangent of x radians.
-tan :: TTerm Double -> TTerm Double
-tan = primitive1 _math_tan
-
--- | Return the hyperbolic tangent of x.
-tanh :: TTerm Double -> TTerm Double
-tanh = primitive1 _math_tanh
-
--- | Return x truncated (towards zero), as a float64.
--- DIVERGENCE FROM HASKELL: returns Double rather than Integer so that NaN and
--- ±Inf inputs propagate per IEEE 754.
-truncate :: TTerm Double -> TTerm Double
-truncate = primitive1 _math_truncate
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Maybes.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Maybes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Maybes.hs
+++ /dev/null
@@ -1,64 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Phantom-typed term DSL for the hydra.lib.maybes library
-
-module Hydra.Dsl.Meta.Lib.Maybes where
-
-import Hydra.Phantoms
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Apply a function to an argument (applicative).
-apply :: TTerm (Maybe (a -> b)) -> TTerm (Maybe a) -> TTerm (Maybe b)
-apply = primitive2 _maybes_apply
-
--- | Chain operations on optional values, handling Nothing cases automatically.
-bind :: TTerm (Maybe a) -> TTerm (a -> Maybe b) -> TTerm (Maybe b)
-bind = primitive2 _maybes_bind
-
--- | Handle an optional value with the maybe value as the first argument.
-cases :: TTerm (Maybe a) -> TTerm b -> TTerm (a -> b) -> TTerm b
-cases = primitive3 _maybes_cases
-
--- | Filter out Nothing values from a list.
-cat :: TTerm [Maybe a] -> TTerm [a]
-cat = primitive1 _maybes_cat
-
--- | Compose two Maybe-returning functions (Kleisli composition).
-compose :: TTerm (a -> Maybe b) -> TTerm (b -> Maybe c) -> TTerm (a -> Maybe c)
-compose = primitive2 _maybes_compose
-
--- | Get a value from an optional value, or return a default value.
-fromMaybe :: TTerm a -> TTerm (Maybe a) -> TTerm a
-fromMaybe = primitive2 _maybes_fromMaybe
-
--- | Check if a value is Just.
-isJust :: TTerm (Maybe a) -> TTerm Bool
-isJust = primitive1 _maybes_isJust
-
--- | Check if a value is Nothing.
-isNothing :: TTerm (Maybe a) -> TTerm Bool
-isNothing = primitive1 _maybes_isNothing
-
--- | Map a function over an optional value.
-map :: AsTerm f (a -> b) => f -> TTerm (Maybe a) -> TTerm (Maybe b)
-map f = primitive2 _maybes_map (asTerm f)
-
--- | Map a function over a list and collect Just results.
-mapMaybe :: TTerm (a -> Maybe b) -> TTerm [a] -> TTerm [b]
-mapMaybe = primitive2 _maybes_mapMaybe
-
--- | Eliminate an optional value with a default and a function.
-maybe :: (AsTerm t1 b, AsTerm t2 (a -> b)) => t1 -> t2 -> TTerm (Maybe a) -> TTerm b
-maybe def f = primitive3 _maybes_maybe (asTerm def) (asTerm f)
-
--- | Lift a value into the Maybe type.
-pure :: TTerm a -> TTerm (Maybe a)
-pure = primitive1 _maybes_pure
-
--- | Convert a Maybe to a list: Just x becomes [x], Nothing becomes [].
-toList :: TTerm (Maybe a) -> TTerm [a]
-toList = primitive1 _maybes_toList
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Pairs.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Pairs.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Pairs.hs
+++ /dev/null
@@ -1,21 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.pairs library
-
-module Hydra.Dsl.Meta.Lib.Pairs where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Map over both elements of a pair.
-bimap :: TTerm (a -> c) -> TTerm (b -> d) -> TTerm (a, b) -> TTerm (c, d)
-bimap = primitive3 _pairs_bimap
-
--- | Get the first element of a pair.
-first :: TTerm (a, b) -> TTerm a
-first = primitive1 _pairs_first
-
--- | Get the second element of a pair.
-second :: TTerm (a, b) -> TTerm b
-second = primitive1 _pairs_second
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Regex.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Regex.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Regex.hs
+++ /dev/null
@@ -1,33 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.regex library
-
-module Hydra.Dsl.Meta.Lib.Regex where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Find the first substring matching a regex pattern.
-find :: TTerm String -> TTerm String -> TTerm (Maybe String)
-find = primitive2 _regex_find
-
--- | Find all non-overlapping substrings matching a regex pattern.
-findAll :: TTerm String -> TTerm String -> TTerm [String]
-findAll = primitive2 _regex_findAll
-
--- | Check whether an entire string matches a regex pattern.
-matches :: TTerm String -> TTerm String -> TTerm Bool
-matches = primitive2 _regex_matches
-
--- | Replace the first occurrence of a regex pattern with a replacement string.
-replace :: TTerm String -> TTerm String -> TTerm String -> TTerm String
-replace = primitive3 _regex_replace
-
--- | Replace all non-overlapping occurrences of a regex pattern with a replacement string.
-replaceAll :: TTerm String -> TTerm String -> TTerm String -> TTerm String
-replaceAll = primitive3 _regex_replaceAll
-
--- | Split a string by a regex pattern.
-split :: TTerm String -> TTerm String -> TTerm [String]
-split = primitive2 _regex_split
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Sets.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Sets.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Sets.hs
+++ /dev/null
@@ -1,70 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Phantom-typed term DSL for the hydra.lib.sets library
-
-module Hydra.Dsl.Meta.Lib.Sets where
-
-import Hydra.Phantoms
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-import Data.Set
-
-
--- | Delete an element from a set.
-delete :: AsTerm t a => t -> TTerm (Set a) -> TTerm (Set a)
-delete x = primitive2 _sets_delete (asTerm x)
-
--- | Compute the difference of two sets.
-difference :: TTerm (Set a) -> TTerm (Set a) -> TTerm (Set a)
-difference = primitive2 _sets_difference
-
--- | Create an empty set.
-empty :: TTerm (Set a)
-empty = primitive _sets_empty
-
--- | Create a set from a list.
-fromList :: AsTerm t [a] => t -> TTerm (Set a)
-fromList xs = primitive1 _sets_fromList (asTerm xs)
-
--- | Insert an element into a set.
-insert :: TTerm a -> TTerm (Set a) -> TTerm (Set a)
-insert = primitive2 _sets_insert
-
--- | Compute the intersection of two sets.
-intersection :: TTerm (Set a) -> TTerm (Set a) -> TTerm (Set a)
-intersection = primitive2 _sets_intersection
-
--- | Map a function over a set.
-map :: TTerm (a -> b) -> TTerm (Set a) -> TTerm (Set b)
-map = primitive2 _sets_map
-
--- | Check if an element is in a set.
-member :: TTerm a -> TTerm (Set a) -> TTerm Bool
-member = primitive2 _sets_member
-
--- | Check if a set is empty.
-null :: TTerm (Set a) -> TTerm Bool
-null = primitive1 _sets_null
-
--- | Create a singleton set.
-singleton :: TTerm a -> TTerm (Set a)
-singleton = primitive1 _sets_singleton
-
--- | Get the size of a set.
-size :: TTerm (Set a) -> TTerm Int
-size = primitive1 _sets_size
-
--- | Convert a set to a list.
-toList :: TTerm (Set a) -> TTerm [a]
-toList = primitive1 _sets_toList
-
--- | Compute the union of two sets.
-union :: TTerm (Set a) -> TTerm (Set a) -> TTerm (Set a)
-union = primitive2 _sets_union
-
--- | Compute the union of multiple sets.
-unions :: TTerm [Set a] -> TTerm (Set a)
-unions = primitive1 _sets_unions
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Lib/Strings.hs b/src/main/haskell/Hydra/Dsl/Meta/Lib/Strings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Lib/Strings.hs
+++ /dev/null
@@ -1,67 +0,0 @@
--- | Phantom-typed term DSL for the hydra.lib.strings library
-
-module Hydra.Dsl.Meta.Lib.Strings where
-
-import Hydra.Phantoms
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-import Hydra.Sources.Libraries
-
-
--- | Concatenate a list of strings into a single string.
-cat :: TTerm [String] -> TTerm String
-cat = primitive1 _strings_cat
-
--- | Concatenate two strings.
-cat2 :: TTerm String -> TTerm String -> TTerm String
-cat2 = primitive2 _strings_cat2
-
--- | Convert a list of Unicode code points to a string.
-fromList :: TTerm [Int] -> TTerm String
-fromList = primitive1 _strings_fromList
-
--- | Join a list of strings with a separator between each element.
-intercalate :: TTerm String -> TTerm [String] -> TTerm String
-intercalate = primitive2 _strings_intercalate
-
--- | Return the length of a string.
-length :: TTerm String -> TTerm Int
-length = primitive1 _strings_length
-
--- | Get the Unicode code point of the character at a specific index, returning Nothing if out of bounds.
-maybeCharAt :: TTerm Int -> TTerm String -> TTerm (Maybe Int)
-maybeCharAt = primitive2 _strings_maybeCharAt
-
--- | Split a string into lines.
-lines :: TTerm String -> TTerm [String]
-lines = primitive1 _strings_lines
-
--- | Check whether a string is empty.
-null :: TTerm String -> TTerm Bool
-null = primitive1 _strings_null
-
--- | Split a string on a delimiter string.
-splitOn :: TTerm String -> TTerm String -> TTerm [String]
-splitOn = primitive2 _strings_splitOn
-
--- | Convert a string to a list of Unicode code points.
-toList :: TTerm String -> TTerm [Int]
-toList = primitive1 _strings_toList
-
--- | Convert a string to lowercase.
-toLower :: TTerm String -> TTerm String
-toLower = primitive1 _strings_toLower
-
--- | Convert a string to uppercase.
-toUpper :: TTerm String -> TTerm String
-toUpper = primitive1 _strings_toUpper
-
--- | Join a list of strings with newlines, appending a trailing newline.
-unlines :: TTerm [String] -> TTerm String
-unlines = primitive1 _strings_unlines
-
--- Helpers
-
--- | Concatenate a Haskell list of string terms into a single string.
-concat :: [TTerm String] -> TTerm String
-concat strings = primitive _strings_cat @@ list strings
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Literals.hs b/src/main/haskell/Hydra/Dsl/Meta/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Literals.hs
+++ /dev/null
@@ -1,87 +0,0 @@
--- | A DSL for constructing literal terms using Haskell's built-in datatypes
-
-module Hydra.Dsl.Meta.Literals where
-
-import Hydra.Phantoms
-import qualified Hydra.Dsl.Terms as Terms
-
-import Data.Int
-import qualified Data.ByteString as B
-import qualified Data.Scientific as Sci
-
-
--- Note: does not yet properly capture arbitrary-precision floating-point numbers,
---       because code generation does not.
-type Bigfloat = Double
-
--- Binary is now properly represented as ByteString
-type Binary = B.ByteString
-
-bigfloat :: Bigfloat -> TTerm Bigfloat
-bigfloat = TTerm . Terms.bigfloat
-
-bigint :: Integer -> TTerm Integer
-bigint = TTerm . Terms.bigint
-
-binary :: Binary -> TTerm Binary
-binary = TTerm . Terms.binary
-
-bool :: Bool -> TTerm Bool
-bool = TTerm . Terms.boolean
-
-boolean :: Bool -> TTerm Bool
-boolean = bool
-
-char :: Char -> TTerm Int
-char = TTerm . Terms.char
-
-decimal :: Sci.Scientific -> TTerm Sci.Scientific
-decimal = TTerm . Terms.decimal
-
-double :: Double -> TTerm Double
-double = float64
-
-false :: TTerm Bool
-false = bool False
-
-float :: Float -> TTerm Float
-float = float32
-
-float32 :: Float -> TTerm Float
-float32 = TTerm . Terms.float32
-
-float64 :: Double -> TTerm Double
-float64 = TTerm . Terms.float64
-
-int :: Int -> TTerm Int
-int = int32
-
-int8 :: Int8 -> TTerm Int8
-int8 = TTerm . Terms.int8
-
-int16 :: Int16 -> TTerm Int16
-int16 = TTerm . Terms.int16
-
-int32 :: Int -> TTerm Int
-int32 = TTerm . Terms.int32
-
-int64 :: Int64 -> TTerm Int64
-int64 = TTerm . Terms.int64
-
-string :: String -> TTerm String
-string = TTerm . Terms.string
-
-true :: TTerm Bool
-true = bool True
-
-uint8 :: Int16 -> TTerm Int16
-uint8 = TTerm . Terms.uint8
-
-uint16 :: Int -> TTerm Int
-uint16 = TTerm . Terms.uint16
-
-uint32 :: Int64 -> TTerm Int64
-uint32 = TTerm . Terms.uint32
-
-uint64 :: Integer -> TTerm Integer
-uint64 = TTerm . Terms.uint64
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Phantoms.hs b/src/main/haskell/Hydra/Dsl/Meta/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Phantoms.hs
+++ /dev/null
@@ -1,449 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Term-level DSL which makes use of phantom types. Use this DSL for defining programs as opposed to data type definitions.
--- The phantom types provide static type checking in Haskell prior to Hydra's runtime type checking.
-module Hydra.Dsl.Meta.Phantoms (
-  module Hydra.Dsl.Meta.Phantoms,
-  module Hydra.Dsl.Meta.Literals,
-  module Hydra.Dsl.AsTerm,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.AsTerm
-import Hydra.Dsl.Meta.Common
-import Hydra.Dsl.Meta.Literals
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Annotations as Ann
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Show.Core as ShowCore
-import Hydra.Encoding (encodeBindingName)
-import Hydra.Decoding (decodeBindingName)
-
-import Prelude hiding ((++))
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-
-
--- Operators
-
-infixr 0 ~>
-(~>) :: String -> TTerm x -> TTerm (a -> b)
-name ~> body = lambda name body
-
-infixl 1 <~
-(<~) :: String -> TTerm a -> TTerm b -> TTerm b
-name <~ value = let1 name value
-
-infixl 1 <<~
-(<<~) :: AsTerm t (Either e a) => String -> t -> TTerm (Either e b) -> TTerm (Either e b)
-name <<~ def = eitherBind name (asTerm def)
-
--- | Function composition operator: f <.> g creates a function that applies g then f
--- Example: toString <.> increment
--- Accepts TTerm or TBinding for both operands (via AsTerm)
-(<.>) :: (AsTerm f (b -> c), AsTerm g (a -> b)) => f -> g -> TTerm (a -> c)
-f <.> g = compose (asTerm f) (asTerm g)
-
--- | Function application operator: function @@ argument
--- Example: add @@ int32 1
--- Accepts TTerm or TBinding for both operands (via AsTerm)
-(@@) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-fun @@ arg = apply (asTerm fun) (asTerm arg)
-
-(++) :: (AsTerm f String, AsTerm g String) => f -> g -> TTerm String
-f ++ g = primitive2 _strings_cat2 (asTerm f) (asTerm g)
-
--- | Field definition operator for records: name>: value
--- Example: "name">: string "John"
--- Accepts TTerm or TBinding (via AsTerm)
-infixr 0 >:
-(>:) :: AsTerm t a => String -> t -> Field
-name>: term = Field (Name name) (unTTerm $ asTerm term)
-
--- | Field definition operator with pre-constructed name: fname>>: value
--- Example: _Person_name>>: string "John"
--- Accepts TTerm or TBinding (via AsTerm)
-infixr 0 >>:
-(>>:) :: AsTerm t a => Name -> t -> Field
-fname >>: d = field fname (asTerm d)
-
--- | Add an annotation to a term
--- Example: annot (Name "deprecated") (Just (boolean True)) myFunction
-annot :: Name -> Maybe Term -> TTerm a -> TTerm a
-annot key mvalue (TTerm term) = TTerm $ Ann.annotateTerm key mvalue term
-
--- | Apply a function to an argument
--- Example: apply (var "add") (int32 1)
-apply :: TTerm (a -> b) -> TTerm a -> TTerm b
-apply (TTerm lhs) (TTerm rhs) = TTerm $ Terms.apply lhs rhs
-
-
-
--- | Bind over Either: extracts the Right value into a variable, short-circuiting on Left
-eitherBind :: AsTerm t (Either e a) => String -> t -> TTerm (Either e b) -> TTerm (Either e b)
-eitherBind v def body = primitive2 _eithers_bind (asTerm def) $ lambda v $ body
-
-binaryFunction :: (TTerm a -> TTerm b -> TTerm c) -> TTerm (a -> b -> c)
-binaryFunction f = case (unTTerm $ f (var "x") (var "y")) of
-  TermApplication (Application (TermApplication (Application lhs _)) _) -> TTerm lhs
-  t -> TTerm $ Terms.string $ "unexpected term as binary function: " <> ShowCore.term t
-
-
-
--- | Apply a named case match to an argument
--- Example: cases resultTypeName myResult Nothing [onSuccess, onError]
--- See also: 'match'
-cases :: Name -> TTerm a -> Maybe (TTerm b) -> [Field] -> TTerm b
-cases name arg dflt fields = TTerm $ Terms.apply (Terms.match name (unTTerm <$> dflt) fields) (unTTerm arg)
-
--- | Compose two functions (g then f)
--- Example: compose (var "stringLength") (var "toString")
--- Accepts TTerm or TBinding for both operands (via AsTerm)
-compose :: (AsTerm f (b -> c), AsTerm g (a -> b)) => f -> g -> TTerm (a -> c)
-compose f g = TTerm $ Terms.compose (unTTerm $ asTerm f) (unTTerm $ asTerm g)
-
--- | Create a constant function that always returns the same value
--- Example: constant true
--- Accepts TTerm or TBinding (via AsTerm)
-constant :: AsTerm t a => t -> TTerm (b -> a)
-constant t = TTerm $ Terms.constant (unTTerm $ asTerm t)
-
--- | Create a definition in a module
--- Example: definitionInModule myModule "addInts" (lambda "x" (lambda "y" (add @@ var "x" @@ var "y")))
-definitionInModule :: Module -> String -> TTerm a -> TTermDefinition a
-definitionInModule mod = definitionInNamespace $ moduleNamespace mod
-
--- | Create a definition in a namespace
--- Example: definitionInNamespace (Namespace "com.example") "addInts" myFunction
-definitionInNamespace :: Namespace -> String -> TTerm a -> TTermDefinition a
-definitionInNamespace ns lname = TTermDefinition $ unqualifyName $ QualifiedName (Just ns) lname
-
--- | Add documentation to a term
--- Example: doc "Adds two integers" addFunction
--- Accepts TTerm or TBinding (via AsTerm)
-doc :: AsTerm t a => String -> t -> TTerm a
-doc s t = TTerm $ setTermDescription (Just s) (unTTerm $ asTerm t)
-
--- | Add documentation with line wrapping at the specified width
--- Example: docWrapped 80 "This is a long documentation string that will be wrapped..." myFunction
-docWrapped :: Int -> String -> TTerm a -> TTerm a
-docWrapped len = doc . wrapLine len
-
-encodedBinary :: TTerm String -> TTerm Term
-encodedBinary = encodedLiteral . inject _Literal _Literal_binary
-
-encodedBoolean :: TTerm Bool -> TTerm Term
-encodedBoolean = encodedLiteral . inject _Literal _Literal_boolean
-
-encodedCase :: AsTerm t (a -> Term) => Name -> Name -> t -> Field
-encodedCase tname fname enc = field fname $ "v" ~> encodedVariant tname fname (enc @@ var "v")
-
-encodedEither :: TTerm (Prelude.Either a b) -> TTerm Term
-encodedEither = inject _Term _Term_either
-
-encodedField :: Name -> TTerm Term -> TTerm Term
-encodedField fname term = encodedFieldRaw (encodedName fname) term
-
-encodedFieldRaw :: TTerm Name -> TTerm Term -> TTerm Term
-encodedFieldRaw (TTerm fname) (TTerm term) = TTerm $ Terms.record _Field [
-  Field _Field_name fname,
-  Field _Field_term term]
-
-encodedFloatValue :: TTerm FloatValue -> TTerm Term
-encodedFloatValue = encodedLiteral . inject _Literal _Literal_float
-
-encodedInjection :: Name -> Name -> TTerm Term -> TTerm Term
-encodedInjection tname fname term = TTerm $ Terms.record _Injection [
-  field _Injection_typeName $ encodedName tname,
-  field _Injection_field $ encodedField fname term]
-
-encodedInt32 :: TTerm Int -> TTerm Term
-encodedInt32 v = encodedIntegerValue $ inject _IntegerValue _IntegerValue_int32 v
-
-encodedIntegerValue :: TTerm IntegerValue -> TTerm Term
-encodedIntegerValue = encodedLiteral . inject _Literal _Literal_integer
-
-encodedList :: TTerm [a] -> TTerm Term
-encodedList = inject _Term _Term_list
-
-encodedLiteral :: TTerm Literal -> TTerm Term
-encodedLiteral = inject _Term _Term_literal
-
-encodedMap :: TTerm (M.Map k v) -> TTerm Term
-encodedMap = inject _Term _Term_map
-
-encodedName :: Name -> TTerm Name
-encodedName = wrap _Name . string . unName
-
-encodedUnit :: TTerm Term
-encodedUnit = injectUnit _Term _Term_unit
-
-encodedWrappedTerm :: Name -> TTerm Term -> TTerm Term
-encodedWrappedTerm name = encodedWrappedTermRaw (encodedName name)
-
-encodedWrappedTermRaw :: TTerm Name -> TTerm Term -> TTerm Term
-encodedWrappedTermRaw (TTerm name) (TTerm term) = TTerm $ Terms.inject _Term _Term_wrap $ Terms.record _WrappedTerm [
-  Field _WrappedTerm_typeName name,
-  Field _WrappedTerm_body term]
-
-encodedOptional :: TTerm (Maybe a) -> TTerm Term
-encodedOptional = inject _Term _Term_maybe
-
-encodedPair :: TTerm (a, b) -> TTerm Term
-encodedPair = inject _Term _Term_pair
-
-encodedRecord :: Name -> [Field] -> TTerm Term
-encodedRecord tname fields = TTerm $ Terms.inject _Term _Term_record $ Terms.record _Record [
-    field _Record_typeName $ encodedName tname,
-    field _Record_fields $ list (encField <$> fields)]
-  where
-    encField (Field fname term) = encodedField fname $ TTerm term
-
-encodedSet :: TTerm (S.Set a) -> TTerm Term
-encodedSet = inject _Term _Term_set
-
-encodedString :: TTerm String -> TTerm Term
-encodedString = encodedLiteral . inject _Literal _Literal_string
-
-encodedUnion :: TTerm Term -> TTerm Term
-encodedUnion = inject _Term _Term_inject
-
-encodedVariant :: Name -> Name -> TTerm Term -> TTerm Term
-encodedVariant tname fname term = encodedUnion $ encodedInjection tname fname term
-
--- | Get a reference to a decoder function in hydra.decode.core for a given type name
--- The decoder takes a graph context and a term, returning either a decoding error or the decoded value
-decoderFor :: Name -> TTerm (Graph -> Term -> Prelude.Either DecodingError a)
-decoderFor typeName = var $ unName $ decodeBindingName typeName
-
--- | Get a reference to an encoder function in hydra.encode.core for a given type name
-encoderFor :: Name -> TTerm (a -> Term)
-encoderFor typeName = var $ unName $ encodeBindingName typeName
-
--- | Convert a typed element to an untyped element (legacy name, prefer 'toBinding')
--- Example: el (definitionInModule myModule "addInts" myFunction)
-el :: TBinding a -> Binding
-el = toBinding
-
--- | Convert a phantom-typed term definition to a Definition for use in module definition lists
--- Example: toDefinition functionArity
-toDefinition :: TTermDefinition a -> Definition
-toDefinition (TTermDefinition name (TTerm term)) = DefinitionTerm $ TermDefinition name term Nothing
-
-
-
--- | Create a field with the given name and value
--- Example: field (Name "age") (int32 30)
-field :: Name -> TTerm a -> Field
-field fname (TTerm val) = Field fname val
-
--- | Mark a type as first-class
--- Example: firstClassType (record ...)
-firstClassType :: TTerm Type -> TTerm Type
-firstClassType typ = annot key_firstClassType (Just $ Terms.boolean True) typ
-
--- | Create a fold function to process lists
--- Example: fold (lambda "acc" (lambda "x" (add @@ var "acc" @@ var "x")))
-fold :: AsTerm t (b -> a -> b) => t -> TTerm (b -> [a] -> b)
-fold f = (primitive _lists_foldl) @@ asTerm f
-
--- | Identity function that returns its argument unchanged
--- Example: identity
-identity :: TTerm (a -> a)
-identity = TTerm Terms.identity
-
--- | Create a union injection
--- Example: inject (Name "Result") (Name "success") (string "ok")
-inject :: Name -> Name -> TTerm a -> TTerm b
-inject name fname (TTerm term) = TTerm $ Terms.inject name fname term
-
--- | Create a function that injects its argument into a union variant
--- Example: injectLambda (Name "Result") (Name "success")
-injectLambda :: Name -> Name -> TTerm (a -> b)
-injectLambda name fname = lambda "injected_" $ inject name fname $ var "injected_"
-
--- | Create a 'Just' optional value
--- Example: just (string "found")
--- Accepts TTerm or TBinding (via AsTerm)
-just :: AsTerm t a => t -> TTerm (Maybe a)
-just t = TTerm $ Terms.just (unTTerm $ asTerm t)
-
--- | Function that wraps a value in 'Just'
--- Example: just_ @@ myValue
-just_ :: TTerm (a -> Maybe a)
-just_ = TTerm $ Terms.lambda "just_" $ Terms.just $ Terms.var "just_"
-
--- | Create a 'Left' either value
--- Example: left (string "error")
-left :: TTerm a -> TTerm (Either a b)
-left (TTerm term) = TTerm $ Terms.left term
-
--- | Function that wraps a value in 'Left'
--- Example: left_ @@ myValue
-left_ :: TTerm (a -> Either a b)
-left_ = TTerm $ Terms.lambda "left_" $ Terms.left $ Terms.var "left_"
-
--- | Create a 'Right' either value
--- Example: right (int32 42)
-right :: TTerm b -> TTerm (Either a b)
-right (TTerm term) = TTerm $ Terms.right term
-
--- | Function that wraps a value in 'Right'
--- Example: right_ @@ myValue
-right_ :: TTerm (b -> Either a b)
-right_ = TTerm $ Terms.lambda "right_" $ Terms.right $ Terms.var "right_"
-
--- | Create a lambda function with one parameter
--- Example: lambda "x" (var "add" @@ var "x" @@ int32 1)
-lambda :: String -> TTerm x -> TTerm (a -> b)
-lambda v (TTerm body) = TTerm $ Terms.lambda v body
-
--- | Create a multi-parameter lambda function
--- Example: lambdas ["x", "y"] (add @@ var "x" @@ var "y")
-lambdas :: [String] -> TTerm x -> TTerm (a -> b)
-lambdas params (TTerm body) = TTerm $ Terms.lambdas params body
-
-let1 :: String -> TTerm a -> TTerm b -> TTerm b
-let1 name (TTerm value) (TTerm env) = TTerm $ TermLet $ Let [Binding (Name name) value Nothing] env
-
--- | Create a let expression with multiple bindings
--- Example: lets ["x">: int32 1, "y">: int32 2] (var "add" @@ var "x" @@ var "y")
-lets :: [Field] -> TTerm a -> TTerm a
-lets fields (TTerm env) = TTerm $ TermLet $ Let (toBinding <$> fields) env
-  where
-     toBinding (Field name value) = Binding name value Nothing
-
--- | Create a list of terms
--- Example: list [int32 1, int32 2, int32 3]
--- Accepts TTerm or TBinding elements (via AsTerm)
-list :: AsTerm t a => [t] -> TTerm [a]
-list els = TTerm $ Terms.list (unTTerm . asTerm <$> els)
-
--- | Create a map/dictionary term
--- Example: map (M.fromList [(string "a", int32 1), (string "b", int32 2)])
-map :: M.Map (TTerm a) (TTerm b) -> TTerm (M.Map a b)
-map = TTerm . Terms.map . M.fromList . fmap fromTTerm . M.toList
-  where
-    fromTTerm (TTerm k, TTerm v) = (k, v)
-
--- | Create a pattern match on a union term
--- Example: match (Name "Result") (Just $ string "what?") ["success">: string "yay", "error">: string "boo"]
-match :: Name -> Maybe (TTerm b) -> [Field] -> TTerm (a -> b)
-match name dflt fields = TTerm $ Terms.match name (unTTerm <$> dflt) fields
-
--- | Create a 'Nothing' optional value
--- Example: nothing
-nothing :: TTerm (Maybe a)
-nothing = TTerm Terms.nothing
-
--- | Create an optional value from a Maybe
--- Example: opt (Just myValue)
-opt :: Maybe (TTerm a) -> TTerm (Maybe a)
-opt mc = TTerm $ Terms.optional (unTTerm <$> mc)
-
-optCases :: AsTerm f (a -> b) => TTerm (Maybe a) -> TTerm b -> f -> TTerm b
-optCases arg ifNothing ifJust = primitive3 (Name "hydra.lib.maybes.maybe") ifNothing (asTerm ifJust) arg
-
--- | Create a pair
--- Example: pair (string "age") (int32 32)
--- Accepts TTerm or TBinding (via AsTerm)
-pair :: (AsTerm t1 a, AsTerm t2 b) => t1 -> t2 -> TTerm (a, b)
-pair l r = TTerm $ Terms.pair (unTTerm $ asTerm l) (unTTerm $ asTerm r)
-
--- | Primitive function by name
--- Example: primitive (Name "hydra.lib.strings.length")
-primitive :: Name -> TTerm a
-primitive = TTerm . Terms.primitive
-
--- | Apply a primitive function to one argument
--- Example: primitive1 _math_abs (int32 (-5))
-primitive1 :: Name -> TTerm a -> TTerm b
-primitive1 primName (TTerm a) = TTerm $ Terms.primitive primName Terms.@@ a
-
--- | Apply a primitive function to two arguments
--- Example: primitive2 _math_add (int32 2) (int32 3)
-primitive2 :: Name -> TTerm a -> TTerm b -> TTerm c
-primitive2 primName (TTerm a) (TTerm b) = TTerm $ Terms.primitive primName Terms.@@ a Terms.@@ b
-
--- | Apply a primitive function to three arguments
--- Example: primitive3 _string_replace (string "hello") (string "e") (string "a")
-primitive3 :: Name -> TTerm a -> TTerm b -> TTerm c -> TTerm d
-primitive3 primName (TTerm a) (TTerm b) (TTerm c) = TTerm $ Terms.primitive primName Terms.@@ a Terms.@@ b Terms.@@ c
-
--- | Extract a field from a record
--- Example: project (Name "Person") (Name "name")
-project :: Name -> Name -> TTerm (a -> b)
-project name fname = TTerm $ Terms.project name fname
-
--- | Create a record with named fields
--- Example: record (Name "Person") [field (Name "name") (string "John"), field (Name "age") (int32 30)]
-record :: Name -> [Field] -> TTerm a
-record name fields = TTerm $ Terms.record name fields
-
--- | Create a set of terms
--- Example: set [string "a", string "b", string "c"]
-set :: [TTerm a] -> TTerm (S.Set a)
-set = TTerm . Terms.set . S.fromList . fmap unTTerm
-
--- | Convert a typed binding to an untyped Binding for use in module element lists
--- Example: toBinding functionArity
-toBinding :: TBinding a -> Binding
-toBinding (TBinding name (TTerm term)) = Binding name term Nothing
-
--- | Convert a typed binding to a term Definition for use in module definition lists
--- Example: toTermDefinition functionArity
-toTermDefinition :: TBinding a -> Definition
-toTermDefinition (TBinding name (TTerm term)) = DefinitionTerm $ TermDefinition name term Nothing
-
-
-triple :: TTerm a -> TTerm b -> TTerm c -> TTerm (a, b, c)
-triple (TTerm a) (TTerm b) (TTerm c) = TTerm $ Terms.triple a b c
-
-tuple4 :: TTerm a -> TTerm b -> TTerm c -> TTerm d -> TTerm (a, b, c, d)
-tuple4 (TTerm a) (TTerm b) (TTerm c) (TTerm d) = TTerm $ Terms.tuple4 a b c d
-
-tuple5 :: TTerm a -> TTerm b -> TTerm c -> TTerm d -> TTerm e -> TTerm (a, b, c, d, e)
-tuple5 (TTerm a) (TTerm b) (TTerm c) (TTerm d) (TTerm e) = TTerm $ Terms.tuple5 a b c d e
-
-unaryFunction :: (TTerm a -> TTerm b) -> TTerm (a -> b)
-unaryFunction f = case (unTTerm $ f $ var "x") of
-  TermApplication (Application lhs _) -> TTerm lhs
-  TermEither (Prelude.Left _) -> lambda "x" $ TTerm $ TermEither $ Prelude.Left $ Terms.var "x"
-  TermEither (Prelude.Right _) -> lambda "x" $ TTerm $ TermEither $ Prelude.Right $ Terms.var "x"
-  TermMaybe (Just _) -> primitive _maybes_pure
-  TermInject (Injection tname (Field fname _)) -> lambda "x" $ inject tname fname $ var "x"
-  TermWrap (WrappedTerm tname _) -> lambda "x" $ wrap tname $ var "x"
-
--- | Unsafe phantom type cast. Used during bootstrap when changing Module field types.
-unsafeCast :: TTerm a -> TTerm b
-unsafeCast (TTerm t) = TTerm t
-
--- | Unit value (empty record)
-unit :: TTerm a
-unit = TTerm Terms.unit
-
--- | Create a unit variant of a union
--- Example: injectUnit (Name "Result") (Name "success")
-injectUnit :: Name -> Name -> TTerm a
-injectUnit name fname = TTerm $ Terms.inject name fname Terms.unit
-
--- | Create an unwrap function for a wrapped type
--- Example: unwrap (Name "Email")
-unwrap :: Name -> TTerm (a -> b)
-unwrap = TTerm . Terms.unwrap
-
--- | Create a variable reference
--- Example: var "x"
-var :: String -> TTerm a
-var v = TTerm $ Terms.var v
-
--- | Create a wrapped term (instance of a newtype)
--- Example: wrap (Name "Email") (string "user@example.com")
--- Note: the phantom types provide no guarantee of type safety in this case
-wrap :: Name -> TTerm a -> TTerm b
-wrap name (TTerm term) = TTerm $ Terms.wrap name term
-
--- | Lift a Haskell Name value to a phantom-typed TTerm Name
-nameLift :: Name -> TTerm Name
-nameLift (Name n) = wrap _Name $ string n
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Tabular.hs b/src/main/haskell/Hydra/Dsl/Meta/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Tabular.hs
+++ /dev/null
@@ -1,14 +0,0 @@
--- | DSL helpers for constructing tabular (relational) schemas
-
-module Hydra.Dsl.Meta.Tabular where
-
-import Hydra.Core
-import Hydra.Relational
-import Hydra.Tabular
-
-
-columnType :: String -> Type -> ColumnType
-columnType name typ = ColumnType (ColumnName name) typ
-
-tableType :: String -> [ColumnType] -> TableType
-tableType name columns = TableType (RelationName name) columns
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Terms.hs b/src/main/haskell/Hydra/Dsl/Meta/Terms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Terms.hs
+++ /dev/null
@@ -1,525 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | A domain-specific language for constructing term-encoded Hydra terms in Haskell;
---   these functions enable you to build terms (programs) which build terms.
-module Hydra.Dsl.Meta.Terms (
-  module Hydra.Dsl.Meta.Base,
-  module Hydra.Dsl.Meta.Terms,
-) where
-
-import Hydra.Kernel
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Meta.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import Hydra.Dsl.Meta.Base
-import qualified Hydra.Dsl.Meta.Phantoms as Phantoms
-
-import qualified Data.ByteString as B
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-import qualified Data.Maybe as Y
-import Data.Int
-import Prelude hiding (map, product, sum)
-
-
--- Operators
-
--- | Function composition operator for term-encoded terms: f <.> g creates a function that applies g then f
--- Example: var "stringLength" <.> var "toString"
-(<.>) :: TTerm Term -> TTerm Term -> TTerm Term
-f <.> g = compose f g
-
--- | Function application operator for term-encoded terms
--- Example: fun @@ arg
-(@@) :: TTerm Term -> TTerm Term -> TTerm Term
-f @@ x = apply f x
-
--- | Attach an annotation to a term-encoded term
--- Example: annot (Phantoms.map M.empty) (int32 42)
-annot :: TTerm (M.Map Name Term) -> TTerm Term -> TTerm Term
-annot annMap term = Core.termAnnotated $ Core.annotatedTerm term annMap
-
--- | Create a term-encoded annotated term (term with type annotations)
--- Example: annotated (int32 42) (Phantoms.map M.empty)
-annotated :: TTerm Term -> TTerm (M.Map Name Term) -> TTerm Term
-annotated term annMap = Core.termAnnotated $ Core.annotatedTerm term annMap
-
-annotatedTerm :: TTerm Term -> TTerm Term -> TTerm Term
-annotatedTerm body ann = inject (Core.nameLift _Term) "annotated" $ record (Core.nameLift _AnnotatedTerm) [
-  _AnnotatedTerm_body>>: body,
-  _AnnotatedTerm_annotation>>: ann]
-
--- | Apply a term-encoded function to a term-encoded argument
--- Example: apply (var "add") (int32 1)
-apply :: TTerm Term -> TTerm Term -> TTerm Term
-apply func arg = Core.termApplication $ Core.application func arg
-
--- | Create a term-encoded unlimited precision floating point literal
--- Example: bigfloat 3.14159
-bigfloat :: Double -> TTerm Term
-bigfloat = bigfloatLift . TTerm . Terms.bigfloat
-
--- | Lift a TTerm Double to a term-encoded bigfloat literal
-bigfloatLift :: TTerm Double -> TTerm Term
-bigfloatLift = Core.termLiteral . Core.literalFloat . Core.floatValueBigfloat
-
--- | Create a term-encoded unlimited precision integer
--- Example: bigint 42
-bigint :: Integer -> TTerm Term
-bigint = bigintLift . TTerm . Terms.bigint
-
--- | Lift a TTerm Integer to a term-encoded bigint literal
--- Example: bigintLift (varPhantom "x" :: TTerm Integer)
-bigintLift :: TTerm Integer -> TTerm Term
-bigintLift = Core.termLiteral . Core.literalInteger . Core.integerValueBigint
-
--- | Create a term-encoded arbitrary-precision exact decimal literal
--- Example: decimal 42
-decimal :: Sci.Scientific -> TTerm Term
-decimal = decimalLift . TTerm . Terms.decimal
-
--- | Lift a TTerm Scientific to a term-encoded decimal literal
-decimalLift :: TTerm Sci.Scientific -> TTerm Term
-decimalLift = Core.termLiteral . Core.literalDecimal
-
--- | Create a term-encoded boolean literal
--- Example: boolean True
-boolean :: Bool -> TTerm Term
-boolean = booleanLift . TTerm . Terms.boolean
-
--- | Lift a TTerm Bool to a term-encoded boolean literal
--- Example: booleanLift $ Phantoms.true
-booleanLift :: TTerm Bool -> TTerm Term
-booleanLift = Core.termLiteral . Core.literalBoolean
-
--- | Create a term-encoded binary (byte string) literal
--- Example: binary (B.pack [0x48, 0x65, 0x6C, 0x6C, 0x6F])
-binary :: B.ByteString -> TTerm Term
-binary = binaryLift . TTerm . Terms.binary
-
--- | Lift a TTerm ByteString to a term-encoded binary literal
-binaryLift :: TTerm B.ByteString -> TTerm Term
-binaryLift = Core.termLiteral . Core.literalBinary
-
--- | Create a term-encoded constant function that always returns the same term-encoded value
--- Example: constant (int32 42)
-constant :: TTerm Term -> TTerm Term
-constant = lambda ignoredVariable
-
--- | Term-encoded boolean false literal
-false :: TTerm Term
-false = boolean False
-
--- | Create a term-encoded field with the given name and term-encoded value
--- Example: field "age" (int32 30)
-field :: String -> TTerm Term -> TTerm Field
-field s = Core.field (name s)
-
--- | Create a term-encoded 32-bit floating point literal
--- Example: float32 3.14
-float32 :: Float -> TTerm Term
-float32 = float32Lift . TTerm . Terms.float32
-
--- | Lift a TTerm Float to a term-encoded float32 literal
--- Example: float32Lift (varPhantom "x" :: TTerm Float)
-float32Lift :: TTerm Float -> TTerm Term
-float32Lift = Core.termLiteral . Core.literalFloat . Core.floatValueFloat32
-
--- | Create a term-encoded 64-bit floating point literal
--- Example: float64 3.14159
-float64 :: Double -> TTerm Term
-float64 = float64Lift . TTerm . Terms.float64
-
--- | Lift a TTerm Float to a term-encoded float64 literal
--- Example: float64Lift (varPhantom "x" :: TTerm Float)
-float64Lift :: TTerm Double -> TTerm Term
-float64Lift = Core.termLiteral . Core.literalFloat . Core.floatValueFloat64
-
--- | Create a term-encoded floating-point literal with specified precision
--- Example: float (FloatValueFloat32 3.14)
-float :: TTerm FloatValue -> TTerm Term
-float = Core.termLiteral . Core.literalFloat
-
--- | Create a term-encoded union injection
--- Example: inject (name "Result") "success" (int32 42)
-inject :: AsTerm t Name => t -> String -> TTerm Term -> TTerm Term
-inject tname fname = Core.termInject . Core.injection (asTerm tname) . Core.field (name fname)
-
-injectUnit :: AsTerm t Name => t -> String -> TTerm Term
-injectUnit tname fname = inject tname fname unit
-
--- | Create a term-encoded 8-bit signed integer literal
--- Example: int8 127
-int8 :: Int8 -> TTerm Term
-int8 = int8Lift . TTerm . Terms.int8
-
--- | Lift a TTerm Int8 to a term-encoded int8 literal
--- Example: int8Lift (varPhantom "x" :: TTerm Int8)
-int8Lift :: TTerm Int8 -> TTerm Term
-int8Lift = Core.termLiteral . Core.literalInteger . Core.integerValueInt8
-
--- | Create a term-encoded 16-bit signed integer literal
--- Example: int16 32767
-int16 :: Int16 -> TTerm Term
-int16 = int16Lift . TTerm . Terms.int16
-
--- | Lift a TTerm Int16 to a term-encoded int16 literal
--- Example: int16Lift (varPhantom "x" :: TTerm Int16)
-int16Lift :: TTerm Int16 -> TTerm Term
-int16Lift = Core.termLiteral . Core.literalInteger . Core.integerValueInt16
-
--- | Create a term-encoded 32-bit signed integer literal
--- Example: int32 42
-int32 :: Int -> TTerm Term
-int32 = int32Lift . TTerm . Terms.int32
-
--- | Lift a TTerm Int to a term-encoded int32 literal
--- Example: int32Lift (varPhantom "x" :: TTerm Int)
-int32Lift :: TTerm Int -> TTerm Term
-int32Lift = Core.termLiteral . Core.literalInteger . Core.integerValueInt32
-
--- | Create a term-encoded 64-bit signed integer literal
--- Example: int64 9223372036854775807
-int64 :: Int64 -> TTerm Term
-int64 = int64Lift . TTerm . Terms.int64
-
--- | Lift a TTerm Int64 to a term-encoded int64 literal
--- Example: int64Lift (varPhantom "x" :: TTerm Int64)
-int64Lift :: TTerm Int64 -> TTerm Term
-int64Lift = Core.termLiteral . Core.literalInteger . Core.integerValueInt64
-
--- | Create a term-encoded integer literal with specified bit width
--- Example: integer (IntegerValueInt32 42)
-integer :: TTerm IntegerValue -> TTerm Term
-integer = Core.termLiteral . Core.literalInteger
-
--- | Create a term-encoded 'Just' optional value
--- Example: just (string "found")
-just :: TTerm Term -> TTerm (Maybe Term)
-just = Phantoms.just
-
--- | Create a term-encoded lambda function with one parameter
--- Example: lambda "x" (var "add" @@ var "x" @@ int32 1)
-lambda :: String -> TTerm Term -> TTerm Term
-lambda var body = Core.termLambda $ Core.lambda (name var) Phantoms.nothing body
-
--- | Create a term-encoded multi-parameter lambda function (curried form)
--- Example: lambdas ["x", "y"] (var "add" @@ var "x" @@ var "y")
-lambdas :: [String] -> TTerm Term -> TTerm Term
-lambdas params body = case params of
-  [] -> body
-  (h:rest) -> Core.termLambda $ Core.lambda (name h) Phantoms.nothing $ lambdas rest body
-
--- | Create a term-encoded let expression with multiple bindings
--- Example: lets ["x">: int32 1, "y">: int32 2] (var "add" @@ var "x" @@ var "y")
-lets :: [(TTerm Name, TTerm Term)] -> TTerm Term -> TTerm Term
-lets pairs body = Core.termLet $ Core.let_ (Phantoms.list $ toBinding pairs) body
-  where
-    toBinding = fmap (\(n, t) -> Core.binding n t Phantoms.nothing)
-
--- | Create a term-encoded left either value
--- Example: left (string "error")
-left :: TTerm Term -> TTerm Term
-left t = Core.termEither $ Phantoms.left t
-
--- | Create a term-encoded list
--- Example: list [int32 1, int32 2, int32 3]
-list :: [TTerm Term] -> TTerm Term
-list = Core.termList . Phantoms.list
-
--- | Create a term-encoded map/dictionary
--- Example: map (fromList [(string "key", int32 42)])
-map :: TTerm (M.Map Term Term) -> TTerm Term
-map = Core.termMap
-
-mapTerm1 :: TTerm (M.Map Term Term) -> TTerm Term
-mapTerm1 m = inject (Core.nameLift _Term) "map" $ Core.termMap m
-
--- | Create a term-encoded pattern match on a union
--- Example: match (name "Result") nothing ["success">: int32 42, "error">: string "fail"]
-match :: AsTerm t Name => t -> TTerm (Maybe Term) -> [(TTerm Name, TTerm Term)] -> TTerm Term
-match tname def pairs = Core.termCases
-    $ Core.caseStatement (asTerm tname) def $ Phantoms.list $ toField pairs
-  where
-    toField = fmap (\(n, t) -> Core.field n t)
-
---meta :: TTerm a -> TTerm Term
---meta (TTerm term) = TTerm $ EncodeCore.term term
-
-metaref :: TTermDefinition a -> TTerm Term
-metaref (TTermDefinition name _) = Core.termVariable $ Core.nameLift name
-
--- | Create a term-encoded 'Nothing' optional value
-nothing :: TTerm (Maybe Term)
-nothing = Phantoms.nothing
-
--- | Create a term-encoded optional value from a Maybe
--- Example: optional (just (int32 42))
-optional :: TTerm (Maybe Term) -> TTerm Term
-optional = Core.termMaybe
-
--- | Create a term-encoded pair
--- Example: pair (string "name") (int32 42)
-pair :: TTerm Term -> TTerm Term -> TTerm Term
-pair t1 t2 = Core.termPair $ Phantoms.pair t1 t2
-
--- | Create a term-encoded reference to a primitive function.
--- Uses termVariable; the name resolves via graphPrimitives fallthrough.
--- Example: primitive (Name "hydra.lib.strings.length")
-primitive :: Name -> TTerm Term
-primitive = Core.termVariable . TTerm . EncodeCore.name
-
--- | Create a term-encoded field projection function
--- Example: project (name "Person") (name "firstName")
-project :: (AsTerm t Name, AsTerm f Name) => t -> f -> TTerm Term
-project tname fname = Core.termProject
-  $ Core.projection (asTerm tname) (asTerm fname)
-
--- | Create a term-encoded record with named fields
--- Example: record (name "Person") ["name">: string "John", "age">: int32 30]
-record :: AsTerm t Name => t -> [(TTerm Name, TTerm Term)] -> TTerm Term
-record name pairs = Core.termRecord $ Core.record (asTerm name) $ Phantoms.list (toField <$> pairs)
-  where
-    toField (n, t) = Core.field n t
-
-recordLift :: Name -> [(TTerm Name, TTerm Term)] -> TTerm Term
-recordLift name pairs = record (TTerm $ EncodeCore.name name) pairs
-
--- | Create a term-encoded right either value
--- Example: right (int32 42)
-right :: TTerm Term -> TTerm Term
-right t = Core.termEither $ Phantoms.right t
-
--- | Create a term-encoded set
--- Example: set [string "a", string "b", string "c"]
-set :: [TTerm Term] -> TTerm Term
-set els = Core.termSet $ TTerm $ TermSet $ S.fromList (unTTerm <$> els)
-
--- | Create a term-encoded string literal
--- Example: string "hello world"
-string :: String -> TTerm Term
-string = stringLift . TTerm . Terms.string
-
--- | Lift a TTerm String to a term-encoded string literal
--- Example: stringLift $ Phantoms.string "hello world"
-stringLift :: TTerm String -> TTerm Term
-stringLift = Core.termLiteral . Core.literalString
-
-stringTerm :: String -> TTerm Term
-stringTerm s = inject (Core.nameLift _Term) "literal" $ inject (Core.nameLift _Literal) "string" $ string s
-
--- | Create a meta-level term encoding a 16-bit signed integer literal
--- Example: int16Term 100 creates a term that *represents* the int16 literal 100
-int16Term :: Int16 -> TTerm Term
-int16Term n = inject (Core.nameLift _Term) "literal" $
-  inject (Core.nameLift _Literal) "integer" $
-  inject (Core.nameLift _IntegerValue) "int16" $ int16 n
-
--- | Create a meta-level term encoding a 32-bit signed integer literal
--- Example: int32Term 42 creates a term that *represents* the int32 literal 42
-int32Term :: Int -> TTerm Term
-int32Term n = inject (Core.nameLift _Term) "literal" $
-  inject (Core.nameLift _Literal) "integer" $
-  inject (Core.nameLift _IntegerValue) "int32" $ int32 n
-
--- | Create a meta-level term encoding a 64-bit signed integer literal
--- Example: int64Term 137 creates a term that *represents* the int64 literal 137
-int64Term :: Int64 -> TTerm Term
-int64Term n = inject (Core.nameLift _Term) "literal" $
-  inject (Core.nameLift _Literal) "integer" $
-  inject (Core.nameLift _IntegerValue) "int64" $ int64 n
-
--- | Create a meta-level term encoding a boolean literal
--- Example: booleanTerm True creates a term that *represents* the boolean True
-booleanTerm :: Bool -> TTerm Term
-booleanTerm b = inject (Core.nameLift _Term) "literal" $ inject (Core.nameLift _Literal) "boolean" $ boolean b
-
--- | Create a meta-level term encoding a Name
--- Example: nameTerm "foo" creates a term that *represents* the name "foo"
-nameTerm :: String -> TTerm Term
-nameTerm s = wrap (Core.nameLift _Name) $ string s
-
--- | Term-encoded boolean true literal
-true :: TTerm Term
-true = boolean True
-
--- | Create a term-encoded tuple with multiple components using nested pairs
--- Example: tuple [string "name", int32 42, boolean True]
-tuple :: [TTerm Term] -> TTerm Term
-tuple [] = unit
-tuple [a] = a
-tuple [a, b] = pair a b
-tuple (a:rest) = pair a (tuple rest)
-
--- | Create a term-encoded 2-tuple (same as pair)
--- Example: tuple2 (string "name") (int32 42)
-tuple2 :: TTerm Term -> TTerm Term -> TTerm Term
-tuple2 = pair
-
--- | Create a term-encoded 8-bit unsigned integer literal
--- Example: uint8 255
-uint8 :: Int16 -> TTerm Term
-uint8 = uint8Lift . TTerm . Terms.uint8
-
-uint8Lift :: TTerm Int16 -> TTerm Term
-uint8Lift = Core.termLiteral . Core.literalInteger . Core.integerValueUint8
-
--- | Create a term-encoded 16-bit unsigned integer literal
--- Example: uint16 65535
-uint16 :: Int -> TTerm Term
-uint16 = uint16Lift . TTerm . Terms.uint16
-
--- | Lift a TTerm Int to a term-encoded uint16 literal
--- Example: uint16Lift (varPhantom "x" :: TTerm Int)
-uint16Lift :: TTerm Int -> TTerm Term
-uint16Lift = Core.termLiteral . Core.literalInteger . Core.integerValueUint16
-
--- | Create a term-encoded 32-bit unsigned integer literal
--- Example: uint32 4294967295
-uint32 :: Int64 -> TTerm Term
-uint32 = uint32Lift . TTerm . Terms.uint32
-
--- | Lift a TTerm Int64 to a term-encoded uint32 literal
-uint32Lift :: TTerm Int64 -> TTerm Term
-uint32Lift = Core.termLiteral . Core.literalInteger . Core.integerValueUint32
-
--- | Create a term-encoded 64-bit unsigned integer literal
--- Example: uint64 18446744073709551615
-uint64 :: Integer -> TTerm Term
-uint64 = uint64Lift . TTerm . Terms.uint64
-
--- | Lift a TTerm Integer to a term-encoded uint64 literal
--- Example: uint64Lift (varPhantom "x" :: TTerm Integer)
-uint64Lift :: TTerm Integer -> TTerm Term
-uint64Lift = Core.termLiteral . Core.literalInteger . Core.integerValueUint64
-
--- | Create a term-encoded unit value
--- Example: unit
-unit :: TTerm Term
-unit = Core.termUnit
-
-injectUnitPhantom :: Name -> Name -> TTerm Term
-injectUnitPhantom tname fname = injectPhantom tname fname Core.termUnit
-
--- | Create a term-encoded unwrap function for a wrapped type
--- Example: unwrap (name "Email")
-unwrap :: AsTerm t Name => t -> TTerm Term
-unwrap = Core.termUnwrap . asTerm
-
--- | Create a term-encoded variable reference from a string
--- Example: var "x"
-var :: String -> TTerm Term
-var = Core.termVariable . name
-
--- | Create a term-encoded variable reference from a Name
--- Example: varName (Name "x")
-varName :: Name -> TTerm Term
-varName (Name n) = Core.termVariable $ TTerm $ Terms.string n
-
--- | Create a phantom-typed variable reference from a Name
--- Example: varNamePhantom (Name "x") :: TTerm Int
-varNamePhantom :: Name -> TTerm a
-varNamePhantom = TTerm . TermVariable
-
--- | Maps a string to a phantom-typed variable term
--- Example: varPhantom "x" :: TTerm Int
-varPhantom :: String -> TTerm a
-varPhantom = TTerm . TermVariable . Name
-
-injectPhantom :: Name -> Name -> TTerm Term -> TTerm Term
-injectPhantom tname fname term = Core.termInject $ Core.injection (Core.nameLift tname) $ Core.field (Core.nameLift fname) term
-
--- | Create a term-encoded wrapped term (newtype)
--- Example: wrap (name "Email") (string "user@example.com")
-wrap :: AsTerm t Name => t -> TTerm Term -> TTerm Term
-wrap n = Core.termWrap . Core.wrappedTerm (asTerm n)
-
--- | Create a term-encoded lambda with a type annotation
--- Example: lambdaTyped "x" T.int32 (var "x")
-lambdaTyped :: String -> TTerm Type -> TTerm Term -> TTerm Term
-lambdaTyped param dom body = Core.termLambda $ Core.lambda (name param) (Phantoms.just dom) body
-
--- | Create a term-encoded type application
--- Example: tyapp (list []) T.int32
-tyapp :: TTerm Term -> TTerm Type -> TTerm Term
-tyapp term typ = Core.termTypeApplication $ Core.typeApplicationTerm term typ
-
--- | Apply multiple type arguments to a term
--- Example: tyapps (pair (int32 1) (string "a")) [T.int32, T.string]
-tyapps :: TTerm Term -> [TTerm Type] -> TTerm Term
-tyapps = L.foldl tyapp
-
--- | Apply type arguments to a polymorphic term (same as tyapps)
--- Example: typeApplication (list []) [T.int32]
-typeApplication :: TTerm Term -> [TTerm Type] -> TTerm Term
-typeApplication = tyapps
-
--- | Create a term-encoded type lambda (System F)
--- Example: tylam "t0" (lambda "x" $ var "x")
-tylam :: String -> TTerm Term -> TTerm Term
-tylam var body = Core.termTypeLambda $ Core.typeLambda (name var) body
-
--- | Create multiple term-encoded type lambdas
--- Example: tylams ["t0", "t1"] (lambda "x" $ var "x")
-tylams :: [String] -> TTerm Term -> TTerm Term
-tylams vars body = L.foldl (\b v -> Core.termTypeLambda $ Core.typeLambda (name v) b) body $ L.reverse vars
-
--- | Create term-encoded type lambda(s) (same as tylams)
--- Example: typeLambda ["t0"] (lambda "x" $ var "x")
-typeLambda :: [String] -> TTerm Term -> TTerm Term
-typeLambda = tylams
-
--- | Create a term-encoded let expression with type annotations on bindings
--- Example: letsTyped [("x", int32 1, T.mono T.int32)] (var "x")
-letsTyped :: [(String, TTerm Term, TTerm TypeScheme)] -> TTerm Term -> TTerm Term
-letsTyped bindings body = Core.termLet $ Core.let_ (Phantoms.list $ toBinding bindings) body
-  where
-    toBinding = fmap (\(n, t, ts) -> Core.binding (name n) t (Phantoms.just ts))
-
--- | Create a term-encoded literal from a Literal value
--- Example: literal (LiteralInteger (IntegerValueInt32 42))
-literal :: TTerm Literal -> TTerm Term
-literal = Core.termLiteral
-
--- | Create a term-encoded character literal via int32
--- Example: char 'A'
-char :: Char -> TTerm Term
-char = int32 . ord
-  where
-    ord = fromEnum
-
--- | Term-encoded function composition (apply g then f)
--- Example: compose f g creates a function that applies g then f
-compose :: TTerm Term -> TTerm Term -> TTerm Term
-compose f g = lambda "arg_" $ f @@ (g @@ var "arg_")
-
--- | Term-encoded identity function
--- Example: identity
-identity :: TTerm Term
-identity = lambda "x_" $ var "x_"
-
--- | Create a term-encoded 3-tuple using nested pairs
--- Example: triple (int32 1) (string "test") (boolean True)
-triple :: TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term
-triple t1 t2 t3 = pair t1 (pair t2 t3)
-
--- | Create a term-encoded 4-tuple using nested pairs
--- Example: tuple4 (int32 1) (string "test") (boolean True) (float32 3.14)
-tuple4 :: TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term
-tuple4 t1 t2 t3 t4 = pair t1 (pair t2 (pair t3 t4))
-
--- | Create a term-encoded 5-tuple using nested pairs
--- Example: tuple5 (int32 1) (string "a") (boolean True) (float32 3.14) (int32 42)
-tuple5 :: TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term
-tuple5 t1 t2 t3 t4 t5 = pair t1 (pair t2 (pair t3 (pair t4 t5)))
-
--- | Convert a Comparison enum value to a term-encoded term
--- Example: comparison ComparisonEqualTo
-comparison :: Comparison -> TTerm Term
-comparison t = case t of
-  ComparisonEqualTo -> Phantoms.injectUnit _Comparison _Comparison_equalTo
-  ComparisonLessThan -> Phantoms.injectUnit _Comparison _Comparison_lessThan
-  ComparisonGreaterThan -> Phantoms.injectUnit _Comparison _Comparison_greaterThan
-
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Testing.hs b/src/main/haskell/Hydra/Dsl/Meta/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Testing.hs
+++ /dev/null
@@ -1,295 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Meta-DSL for constructing test-related terms
--- TODO: merge with Hydra.Dsl.Tests
-
-module Hydra.Dsl.Meta.Testing (
-  module Hydra.Dsl.Testing,
-  module Hydra.Dsl.Meta.Testing,
-) where
-
-import Hydra.Dsl.Testing hiding (
-  tag, testCaseUniversal, testCaseWithMetadata,
-  testCaseWithMetadataCase, testCaseWithMetadataDescription,
-  testCaseWithMetadataName, testCaseWithMetadataTags, testGroup,
-  universalTestCase, unTag)
-import Hydra.Kernel
-import Hydra.Error.Core (InvalidTermError)
-import Hydra.Testing as Testing
-import Hydra.Dsl.Meta.Phantoms as Phantoms hiding ((++))
-import qualified Hydra.Dsl.Meta.Lib.Eithers as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-import qualified Hydra.Dsl.Meta.Terms as MetaTerms
-import qualified Hydra.Dsl.Meta.Types as T
-
-import qualified Data.Int as I
-import qualified Data.List as L
-import qualified Data.Map as M
-
-type Int32 = I.Int32
-
-
-tag_disabled = Tag "disabled"
-tag_disabledForMinimalInference = Tag "disabledForMinimalInference"
-
-noTags :: TTerm [Tag]
-noTags = Phantoms.list ([] :: [TTerm Tag])
-
-expectFailure :: AsTerm t Term => Int -> [Tag] -> t -> TTerm TestCaseWithMetadata
-expectFailure i tags term = infFailureTest ("#" ++ show i) tags (asTerm term)
-
-expectMono :: AsTerm t Term => Int -> [Tag] -> t -> TTerm Type -> TTerm TestCaseWithMetadata
-expectMono i tags term typ = infTest ("#" ++ show i) tags (asTerm term) $ T.mono typ
-
-expectPoly :: AsTerm t Term => Int -> [Tag] -> t -> [String] -> TTerm Type -> TTerm TestCaseWithMetadata
-expectPoly i tags term params typ = infTest ("#" ++ show i) tags (asTerm term) $ T.poly params typ
-
-expectPolyConstrained :: AsTerm t Term => Int -> [Tag] -> t -> [String] -> [(String, [String])] -> TTerm Type -> TTerm TestCaseWithMetadata
-expectPolyConstrained i tags term params constraints typ = infTest ("#" ++ show i) tags (asTerm term) $ T.polyConstrained params constraints typ
-
-groupRef = MetaTerms.varNamePhantom . bindingName
-
-primCase :: String -> Name -> [TTerm Term] -> TTerm Term -> TTerm TestCaseWithMetadata
-primCase cname primName args output = primCaseWithTags cname [] primName args output
-
-primCaseWithTags :: String -> [Tag] -> Name -> [TTerm Term] -> TTerm Term -> TTerm TestCaseWithMetadata
-primCaseWithTags cname tags primName args output = evalCaseWithTags cname tags input output
-  where
-    input = L.foldl (MetaTerms.@@) (MetaTerms.primitive primName) args
-
-evalCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-evalCase cname input output = evalCaseWithTags cname [] input output
-
--- | Create a universal test case that evaluates a Term via reduceTerm and compares the result.
-evalCaseWithTags :: String -> [Tag] -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-evalCaseWithTags cname tags input output = testCaseWithMetadata (Phantoms.string cname)
-  (testCaseUniversal $ universalTestCase
-    (retype $ Eithers.either_
-      (Phantoms.lambda "e" (Phantoms.string "<<eval error>>"))
-      (Phantoms.lambda "t" (showTermRef @@ Phantoms.var "t"))
-      (reduceTermRef @@ testContextRef @@ testGraphRef @@ true @@ input))
-    (retype $ showTermRef @@ output))
-  nothing (Phantoms.list $ tag . unTag <$> tags)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | References to kernel functions (avoids circular imports)
-testGraphRef :: TTerm Graph
-testGraphRef = TTerm $ TermVariable $ Name "hydra.test.testGraph.testGraph"
-
-testContextRef :: TTerm Context
-testContextRef = TTerm $ TermVariable $ Name "hydra.test.testGraph.testContext"
-
-showTermRef :: TTerm (Term -> String)
-showTermRef = TTerm $ TermVariable $ Name "hydra.show.core.term"
-
-showTypeRef :: TTerm (Type -> String)
-showTypeRef = TTerm $ TermVariable $ Name "hydra.show.core.type"
-
-inferTypeOfRef :: TTerm (Context -> Graph -> Term -> Either (InContext Error) ((Term, TypeScheme), Context))
-inferTypeOfRef = TTerm $ TermVariable $ Name "hydra.inference.inferTypeOf"
-
-alphaConvertRef :: TTerm (Name -> Name -> Term -> Term)
-alphaConvertRef = TTerm $ TermVariable $ Name "hydra.reduction.alphaConvert"
-
-betaReduceTypeRef :: TTerm (Context -> Graph -> Type -> Either (InContext Error) Type)
-betaReduceTypeRef = TTerm $ TermVariable $ Name "hydra.reduction.betaReduceType"
-
-validateCoreTermRef :: TTerm (Bool -> Graph -> Term -> Maybe InvalidTermError)
-validateCoreTermRef = TTerm $ TermVariable $ Name "hydra.validate.core.term"
-
-showInvalidTermErrorRef :: TTerm (InvalidTermError -> String)
-showInvalidTermErrorRef = TTerm $ TermVariable $ Name "hydra.show.error.core.invalidTermError"
-
-showTypeSchemeRef :: TTerm (TypeScheme -> String)
-showTypeSchemeRef = TTerm $ TermVariable $ Name "hydra.show.core.typeScheme"
-
-reduceTermRef :: TTerm (Context -> Graph -> Bool -> Term -> Either (InContext Error) Term)
-reduceTermRef = TTerm $ TermVariable $ Name "hydra.reduction.reduceTerm"
-
-removeTypesFromTermRef :: TTerm (Term -> Term)
-removeTypesFromTermRef = TTerm $ TermVariable $ Name "hydra.strip.removeTypesFromTerm"
-
-typeSchemeToFTypeRef :: TTerm (TypeScheme -> Type)
-typeSchemeToFTypeRef = TTerm $ TermVariable $ Name "hydra.scoping.typeSchemeToFType"
-
--- | Create a universal test case for an expression with a show function
-evalPair :: String -> TTerm (t -> String) -> TTerm t -> TTerm t -> TTerm TestCaseWithMetadata
-evalPair cname showFn logicalActual logicalExpected = universalCase cname
-  (retype $ showFn @@ logicalActual) (retype $ showFn @@ logicalExpected)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | evalPair for String-typed expressions (identity show)
-stringEvalPair :: String -> TTerm String -> TTerm String -> TTerm TestCaseWithMetadata
-stringEvalPair cname = evalPair cname (Phantoms.lambda "s" (Phantoms.var "s"))
-
--- | evalPair with tags
-evalPairWithTags :: String -> [Tag] -> TTerm (t -> String) -> TTerm t -> TTerm t -> TTerm TestCaseWithMetadata
-evalPairWithTags cname tags showFn logicalActual logicalExpected = testCaseWithMetadata (Phantoms.string cname)
-  (testCaseUniversal $ universalTestCase (retype $ showFn @@ logicalActual) (retype $ showFn @@ logicalExpected))
-  nothing (Phantoms.list $ tag . unTag <$> tags)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | Type checking test: infers the type and compares with expected.
-checkTest :: String -> [Tag] -> TTerm Term -> TTerm Term -> TTerm Type -> TTerm TestCaseWithMetadata
-checkTest name tags input _outputTerm outputType = testCaseWithMetadata (Phantoms.string name)
-  (testCaseUniversal $ universalTestCase
-    (retype $ Eithers.either_
-      (Phantoms.lambda "e" (Phantoms.string "<<inference error>>"))
-      (Phantoms.lambda "result"
-        (showTypeRef @@ (typeSchemeToFTypeRef @@ Pairs.second (Pairs.first (Phantoms.var "result")))))
-      (inferTypeOfRef @@ testContextRef @@ testGraphRef @@ input))
-    (retype $ showTypeRef @@ outputType))
-  nothing (Phantoms.list $ tag . unTag <$> tags)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | Type checking test where term doesn't change (just check the inferred type)
-noChange :: String -> TTerm Term -> TTerm Type -> TTerm TestCaseWithMetadata
-noChange name term typ = checkTest name [] term term typ
-
-universalCase :: String -> TTerm a -> TTerm b -> TTerm TestCaseWithMetadata
-universalCase cname actual expected = testCaseWithMetadata (Phantoms.string cname)
-  (testCaseUniversal $ universalTestCase (retype actual) (retype expected))
-  nothing noTags
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | Inference failure test: expects inference to fail.
-infFailureTest :: String -> [Tag] -> TTerm Term -> TTerm TestCaseWithMetadata
-infFailureTest name tags term = testCaseWithMetadata (Phantoms.string name)
-  (testCaseUniversal $ universalTestCase
-    (retype $ Eithers.either_
-      (Phantoms.lambda "e" (Phantoms.string "FAIL"))
-      (Phantoms.lambda "result" (Strings.cat2 (Phantoms.string "unexpected: ")
-        (showTypeSchemeRef @@ Pairs.second (Pairs.first (Phantoms.var "result")))))
-      (inferTypeOfRef @@ testContextRef @@ testGraphRef @@ term))
-    (Phantoms.string "FAIL"))
-  nothing (Phantoms.list $ tag . unTag <$> tags)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | Inference test: infer type and compare with expected type scheme.
-infTest :: String -> [Tag] -> TTerm Term -> TTerm TypeScheme -> TTerm TestCaseWithMetadata
-infTest name tags term ts = testCaseWithMetadata (Phantoms.string name)
-  (testCaseUniversal $ universalTestCase
-    (retype $ Eithers.either_
-      (Phantoms.lambda "e" (Strings.cat2 (Phantoms.string "INFERENCE ERROR: ") (Phantoms.string "failed")))
-      (Phantoms.lambda "result"
-        (showTypeSchemeRef @@ Pairs.second (Pairs.first (Phantoms.var "result"))))
-      (inferTypeOfRef @@ testContextRef @@ testGraphRef @@ term))
-    (retype $ showTypeSchemeRef @@ ts))
-  nothing (Phantoms.list $ tag . unTag <$> tags)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
-isDisabled tcase = tag_disabled `L.elem` Testing.testCaseWithMetadataTags tcase
-isDisabledForMinimalInference tcase = tag_disabledForMinimalInference `L.elem` Testing.testCaseWithMetadataTags tcase
-
-mapTerm :: [(TTerm Term, TTerm Term)] -> TTerm Term
-mapTerm pairs = TTerm $ TermInject $ Injection _Term $ Field _Term_map $ TermMap $ M.fromList [(unTTerm k, unTTerm v) | (k, v) <- pairs]
-
-mapTermEmpty :: TTerm (M.Map k v)
-mapTermEmpty = TTerm $ TermMap M.empty
-
-subgroup :: AsTerm t TestCaseWithMetadata => String -> [t] -> TTerm TestGroup
-subgroup name cases = tgroup name Nothing [] (asTerm <$> cases)
-
-supergroup :: AsTerm t TestGroup => String -> [t] -> TTerm TestGroup
-supergroup name subgroups = tgroup name Nothing (asTerm <$> subgroups) []
-
-tag :: String -> TTerm Tag
-tag = Phantoms.wrap _Tag . Phantoms.string
-
-tgroup :: String -> Maybe String -> [TTerm TestGroup] -> [TTerm TestCaseWithMetadata] -> TTerm TestGroup
-tgroup name mdesc subgroups cases = testGroup (Phantoms.string name) (opt (Phantoms.string <$> mdesc)) (Phantoms.list subgroups) (Phantoms.list cases)
-
-----------------------------------------
-
-encodedTestGroupToBinding :: Namespace -> String -> TTerm TestGroup -> Binding
-encodedTestGroupToBinding ns lname group = Binding name (unTTerm group)
-    $ Just $ TypeScheme [] typ Nothing
-  where
-    name = unqualifyName $ QualifiedName (Just ns) lname
-    typ = TypeVariable _TestGroup
-
-testCaseUniversal :: TTerm UniversalTestCase -> TTerm TestCase
-testCaseUniversal = inject _TestCase _TestCase_universal
-
-universalTestCase :: TTerm String -> TTerm String -> TTerm UniversalTestCase
-universalTestCase actual expected = Phantoms.record _UniversalTestCase [
-  _UniversalTestCase_actual Phantoms.>>: actual,
-  _UniversalTestCase_expected Phantoms.>>: expected]
-
--- | Convenience function for creating alpha conversion test cases
-alphaCase :: String -> TTerm Term -> TTerm Name -> TTerm Name -> TTerm Term -> TTerm TestCaseWithMetadata
-alphaCase cname term oldVar newVar result = universalCase cname
-  (retype $ showTermRef @@ (alphaConvertRef @@ oldVar @@ newVar @@ term))
-  (retype $ showTermRef @@ result)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
--- | Convenience function for creating type reduction test cases
-typeRedCase :: String -> TTerm Type -> TTerm Type -> TTerm TestCaseWithMetadata
-typeRedCase cname input output = universalCase cname
-  (retype $ Eithers.either_
-    (Phantoms.lambda "e" (Phantoms.string "<<type reduction error>>"))
-    (Phantoms.lambda "t" (showTypeRef @@ Phantoms.var "t"))
-    (betaReduceTypeRef @@ testContextRef @@ testGraphRef @@ input))
-  (retype $ showTypeRef @@ output)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
-
-testCaseWithMetadata :: TTerm String -> TTerm TestCase -> TTerm (Maybe String) -> TTerm [Tag] -> TTerm TestCaseWithMetadata
-testCaseWithMetadata name tcase description tags = Phantoms.record _TestCaseWithMetadata [
-  _TestCaseWithMetadata_name>>: name,
-  _TestCaseWithMetadata_case>>: tcase,
-  _TestCaseWithMetadata_description>>: description,
-  _TestCaseWithMetadata_tags>>: tags]
-
-testCaseWithMetadataName :: TTerm (TestCaseWithMetadata -> String)
-testCaseWithMetadataName = Phantoms.project _TestCaseWithMetadata _TestCaseWithMetadata_name
-
-testCaseWithMetadataCase :: TTerm (TestCaseWithMetadata -> TestCase)
-testCaseWithMetadataCase = Phantoms.project _TestCaseWithMetadata _TestCaseWithMetadata_case
-
-testCaseWithMetadataDescription :: TTerm (TestCaseWithMetadata -> Maybe String)
-testCaseWithMetadataDescription = Phantoms.project _TestCaseWithMetadata _TestCaseWithMetadata_description
-
-testCaseWithMetadataTags :: TTerm (TestCaseWithMetadata -> [Tag])
-testCaseWithMetadataTags = Phantoms.project _TestCaseWithMetadata _TestCaseWithMetadata_tags
-
-testGroup :: TTerm String -> TTerm (Maybe String) -> TTerm [TestGroup] -> TTerm [TestCaseWithMetadata] -> TTerm TestGroup
-testGroup name description subgroups cases = Phantoms.record _TestGroup [
-  _TestGroup_name>>: name,
-  _TestGroup_description>>: description,
-  _TestGroup_subgroups>>: subgroups,
-  _TestGroup_cases>>: cases]
-
--- | Convenience function for creating validation test cases
-validateCoreTermCase :: String -> TTerm Bool -> TTerm Term -> TTerm (Maybe InvalidTermError) -> TTerm TestCaseWithMetadata
-validateCoreTermCase cname typed input expected = universalCase cname
-  (retype $ Maybes.maybe
-    (Phantoms.string "valid")
-    (Phantoms.lambda "e" (showInvalidTermErrorRef @@ Phantoms.var "e"))
-    (validateCoreTermRef @@ typed @@ testGraphRef @@ input))
-  (retype $ Maybes.maybe
-    (Phantoms.string "valid")
-    (Phantoms.lambda "e" (showInvalidTermErrorRef @@ Phantoms.var "e"))
-    expected)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm t) = TTerm t
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Types.hs b/src/main/haskell/Hydra/Dsl/Meta/Types.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Types.hs
+++ /dev/null
@@ -1,305 +0,0 @@
--- | A domain-specific language for constructing term-encoded Hydra types in Haskell;
---   these functions enable you to build terms (programs) which build types.
-
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Dsl.Meta.Types (
-  module Hydra.Dsl.Meta.Base,
-  module Hydra.Dsl.Meta.Types,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.AsTerm
-import qualified Hydra.Dsl.Meta.Phantoms as Phantoms
-import Hydra.Dsl.Meta.Core as Core hiding (name, unName)
-import Hydra.Dsl.Meta.Base
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Maybe as Y
-import qualified Data.Set as S
-import Prelude hiding (either, map, maybe, product, sum)
-
-
--- Operators
-
--- | Type application operator
--- Example: typeConstructor @@ typeArg
-(@@) :: TTerm Type -> TTerm Type -> TTerm Type
-(@@) = apply
-
--- | Function type constructor operator
--- Example: int32 --> string
-(-->) :: TTerm Type -> TTerm Type -> TTerm Type
-(-->) = function
-
-
--- | Apply a term-encoded type to a type argument
--- Example: apply (var "Maybe") int32
-apply :: TTerm Type -> TTerm Type -> TTerm Type
-apply l r = typeApplication $ applicationType l r
-
-applys :: TTerm Type -> [TTerm Type] -> TTerm Type
-applys t ts = L.foldl apply t ts
-
--- | Create a term-encoded binary type
--- Example: binary
-binary :: TTerm Type
-binary = typeLiteral literalTypeBinary
-
--- | Create a term-encoded boolean type
--- Example: boolean
-boolean :: TTerm Type
-boolean = typeLiteral literalTypeBoolean
-
--- | Create a term-encoded field with the given name and type
--- Example: field "age" int32
-field :: String -> TTerm Type -> TTerm FieldType
-field s = fieldType (name s)
-
--- | Create a term-encoded FloatType representation
--- Example: float FloatTypeFloat64
-float :: FloatType -> TTerm FloatType
-float t = Phantoms.injectUnit _FloatType $ case t of
-  FloatTypeBigfloat -> _FloatType_bigfloat
-  FloatTypeFloat32 -> _FloatType_float32
-  FloatTypeFloat64 -> _FloatType_float64
-
--- | Create a term-encoded 32-bit floating point type
--- Example: float32
-float32 :: TTerm Type
-float32 = typeLiteral $ literalTypeFloat $ float FloatTypeFloat32
-
--- | Create a term-encoded 64-bit floating point type
--- Example: float64
-float64 :: TTerm Type
-float64 = typeLiteral $ literalTypeFloat $ float FloatTypeFloat64
-
--- | Create a term-encoded arbitrary-precision floating point type
--- Example: bigfloat
-bigfloat :: TTerm Type
-bigfloat = typeLiteral $ literalTypeFloat $ float FloatTypeBigfloat
-
--- | Create a term-encoded arbitrary-precision decimal type
--- Example: decimal
-decimal :: TTerm Type
-decimal = typeLiteral literalTypeDecimal
-
--- | Create a term-encoded either type
--- Example: either_ string int32
-either_ :: TTerm Type -> TTerm Type -> TTerm Type
-either_ l r = typeEither $ eitherType l r
-
--- | Create a term-encoded universal quantification (polymorphic type)
--- Example: forAll "a" (var "a" --> var "a")
-forAll :: String -> TTerm Type -> TTerm Type
-forAll var body = typeForall $ forallType (name var) body
-
-forAlls :: [String] -> TTerm Type -> TTerm Type
-forAlls vs body = L.foldr forAll body vs
-
--- | Create a term-encoded function type
--- Example: function int32 string
-function :: TTerm Type -> TTerm Type -> TTerm Type
-function dom cod = typeFunction $ functionType dom cod
-
--- | Create a term-encoded multi-parameter function type
--- Example: functionMany [int32, string, boolean]
-functionMany :: [TTerm Type] -> TTerm Type
-functionMany types = case types of
-  [t] -> t
-  t:ts -> function t $ functionMany ts
-
--- | Create a term-encoded arbitrary-precision integer type
--- Example: bigint
-bigint :: TTerm Type
-bigint = typeLiteral $ literalTypeInteger integerTypeBigint
-
--- | Create a term-encoded 8-bit signed integer type
--- Example: int8
-int8 :: TTerm Type
-int8 = typeLiteral $ literalTypeInteger integerTypeInt8
-
--- | Create a term-encoded 16-bit signed integer type
--- Example: int16
-int16 :: TTerm Type
-int16 = typeLiteral $ literalTypeInteger integerTypeInt16
-
--- | Create a term-encoded 32-bit signed integer type
--- Example: int32
-int32 :: TTerm Type
-int32 = typeLiteral $ literalTypeInteger integerTypeInt32
-
--- | Create a term-encoded 64-bit signed integer type
--- Example: int64
-int64 :: TTerm Type
-int64 = typeLiteral $ literalTypeInteger integerTypeInt64
-
--- | Create a term-encoded IntegerType representation
--- Example: integer IntegerTypeInt32
-integer :: IntegerType -> TTerm IntegerType
-integer t = Phantoms.injectUnit _IntegerType $ case t of
-  IntegerTypeBigint -> _IntegerType_bigint
-  IntegerTypeInt8 -> _IntegerType_int8
-  IntegerTypeInt16 -> _IntegerType_int16
-  IntegerTypeInt32 -> _IntegerType_int32
-  IntegerTypeInt64 -> _IntegerType_int64
-  IntegerTypeUint8 -> _IntegerType_uint8
-  IntegerTypeUint16 -> _IntegerType_uint16
-  IntegerTypeUint32 -> _IntegerType_uint32
-  IntegerTypeUint64 -> _IntegerType_uint64
-
--- | Create a term-encoded list type
--- Example: list string
-list :: TTerm Type -> TTerm Type
-list = typeList
-
--- | Create a term-encoded literal type from a LiteralType value
--- Example: literal (literalTypeInteger integerTypeInt32)
-literal :: TTerm LiteralType -> TTerm Type
-literal = typeLiteral
-
--- | Create a term-encoded map/dictionary type
--- Example: map string int32
-map :: TTerm Type -> TTerm Type -> TTerm Type
-map k v = typeMap $ mapType k v
-
--- | Create a term-encoded monomorphic type scheme
--- Example: mono int32
-mono :: TTerm Type -> TTerm TypeScheme
-mono t = Phantoms.record _TypeScheme [
-  Phantoms.field _TypeScheme_variables $ Phantoms.list ([] :: [TTerm Name]),
-  Phantoms.field _TypeScheme_body t,
-  Phantoms.field _TypeScheme_constraints Phantoms.nothing]
-
--- | Create a term-encoded maybe (optional/nullable) type
--- Example: maybe string
-maybe :: TTerm Type -> TTerm Type
-maybe = typeMaybe
-
--- | Create a term-encoded optional (nullable) type (alias for 'maybe')
--- Example: optional string
-optional :: TTerm Type -> TTerm Type
-optional = maybe
-
--- | Create a term-encoded pair type
--- Example: pair string int32
-pair :: TTerm Type -> TTerm Type -> TTerm Type
-pair first second = Core.typePair $ Core.pairType first second
-
--- | Create a term-encoded polymorphic type scheme
--- Example: poly ["a", "b"] (var "a" --> var "b")
-poly :: [String] -> TTerm Type -> TTerm TypeScheme
-poly params t = Phantoms.record _TypeScheme [
-  Phantoms.field _TypeScheme_variables (Phantoms.list (name <$> params)),
-  Phantoms.field _TypeScheme_body t,
-  Phantoms.field _TypeScheme_constraints Phantoms.nothing]
-
--- | Create a term-encoded polymorphic type scheme with class constraints
--- Example: polyConstrained ["k", "v"] [("k", ["ordering"])] (map (var "k") (var "v"))
-polyConstrained :: [String] -> [(String, [String])] -> TTerm Type -> TTerm TypeScheme
-polyConstrained params constraints t = Phantoms.record _TypeScheme [
-  Phantoms.field _TypeScheme_variables (Phantoms.list (name <$> params)),
-  Phantoms.field _TypeScheme_body t,
-  Phantoms.field _TypeScheme_constraints constraintsTerm]
-  where
-    constraintsTerm = Phantoms.just $ Phantoms.map $ M.fromList
-      [(name v, Core.typeVariableMetadata (Phantoms.set (name <$> classes)))
-      | (v, classes) <- constraints]
-
--- | Create a term-encoded product type (tuple) with multiple components using nested pairs
--- Example: product [string, int32, boolean]
-product :: [TTerm Type] -> TTerm Type
-product [] = unit
-product [a] = a
-product [a, b] = pair a b
-product (a:rest) = pair a (product rest)
-
--- | Create a term-encoded record type with named fields
--- Example: record (name "Person") ["name">: string, "age">: int32]
--- Note: the name parameter is now ignored; record types no longer carry a type name
-record :: AsTerm t Name => t -> [(TTerm Name, TTerm Type)] -> TTerm Type
-record _n pairs = typeRecord $ Phantoms.list (toField <$> pairs)
-  where
-    toField (fn, t) = fieldType fn t
-
--- | Create a term-encoded set type
--- Example: set string
-set :: TTerm Type -> TTerm Type
-set = typeSet
-
--- | Create a term-encoded string type
--- Example: string
-string :: TTerm Type
-string = typeLiteral literalTypeString
-
--- | Create a term-encoded 8-bit unsigned integer type
--- Example: uint8
-uint8 :: TTerm Type
-uint8 = typeLiteral $ literalTypeInteger integerTypeUint8
-
--- | Create a term-encoded 16-bit unsigned integer type
--- Example: uint16
-uint16 :: TTerm Type
-uint16 = typeLiteral $ literalTypeInteger integerTypeUint16
-
--- | Create a term-encoded 32-bit unsigned integer type
--- Example: uint32
-uint32 :: TTerm Type
-uint32 = typeLiteral $ literalTypeInteger integerTypeUint32
-
--- | Create a term-encoded 64-bit unsigned integer type
--- Example: uint64
-uint64 :: TTerm Type
-uint64 = typeLiteral $ literalTypeInteger integerTypeUint64
-
--- | Create a term-encoded union type with named variants
--- Example: union (name "Result") ["success">: int32, "error">: string]
--- Note: the name parameter is now ignored; union types no longer carry a type name
-union :: AsTerm t Name => t -> [(TTerm Name, TTerm Type)] -> TTerm Type
-union _n pairs = typeUnion $ Phantoms.list (toField <$> pairs)
-  where
-    toField (fn, ft) = fieldType fn ft
-
--- | Term-encoded unit type (empty record type)
--- Example: unit
-unit :: TTerm Type
-unit = typeUnit
-
--- | Term-encoded void type (uninhabited / bottom type)
--- Example: void
-void :: TTerm Type
-void = typeVoid
-
--- | Create a term-encoded type variable
--- Example: variable "a"
-variable :: String -> TTerm Type
-variable = typeVariable . name
-
--- | Create a term-encoded type variable (alias for 'variable')
--- Example: var "a"
-var :: String -> TTerm Type
-var = variable
-
--- | Create a term-encoded wrapped type (newtype)
--- Note: the name parameter is now ignored; wrapped types no longer carry a type name
-wrap :: AsTerm t Name => t -> TTerm Type -> TTerm Type
-wrap _n t = typeWrap t
-
--- | Create a term-encoded enum type with the given variant names (conventionally in camelCase)
--- Example: enum (name "Color") ["red", "green", "blue"]
--- Accepts TTerm Name or TBinding Name (via AsTerm)
-enum :: AsTerm t Name => t -> [String] -> TTerm Type
-enum tname names = union tname $ (\n -> (name n, unit)) <$> names
-
--- | Term-encoded non-negative 32-bit integer type
--- Currently an alias for int32; intended for semantic annotation
--- In future versions, this may include validation constraints
--- Example: nonNegativeInt32
-nonNegativeInt32 :: TTerm Type
-nonNegativeInt32 = Hydra.Dsl.Meta.Types.int32
-
--- | Attach an annotation to a term-encoded type
--- Example: annot annotationMap myType
-annot :: TTerm (M.Map Name Term) -> TTerm Type -> TTerm Type
-annot ann typ = typeAnnotated $ annotatedType typ ann
diff --git a/src/main/haskell/Hydra/Dsl/Meta/Variants.hs b/src/main/haskell/Hydra/Dsl/Meta/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Meta/Variants.hs
+++ /dev/null
@@ -1,68 +0,0 @@
--- | Haskell-specific convenience layer over the generated Hydra.Dsl.Variants module.
--- Adds Haskell enum -> TTerm converter functions.
-
-module Hydra.Dsl.Meta.Variants (
-  module Hydra.Dsl.Variants,
-  module Hydra.Dsl.Meta.Variants,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Phantoms
-import Hydra.Dsl.Variants
-
-
--- | Convert a Haskell LiteralVariant to a TTerm
-literalVariant :: LiteralVariant -> TTerm LiteralVariant
-literalVariant v = injectUnit _LiteralVariant $ case v of
-  LiteralVariantBinary -> _LiteralVariant_binary
-  LiteralVariantBoolean -> _LiteralVariant_boolean
-  LiteralVariantDecimal -> _LiteralVariant_decimal
-  LiteralVariantFloat -> _LiteralVariant_float
-  LiteralVariantInteger -> _LiteralVariant_integer
-  LiteralVariantString -> _LiteralVariant_string
-
--- | Convert a Haskell TermVariant to a TTerm
-termVariant :: TermVariant -> TTerm TermVariant
-termVariant v = injectUnit _TermVariant $ case v of
-  TermVariantAnnotated -> _TermVariant_annotated
-  TermVariantApplication -> _TermVariant_application
-  TermVariantCases -> _TermVariant_cases
-  TermVariantEither -> _TermVariant_either
-  TermVariantLambda -> _TermVariant_lambda
-  TermVariantLet -> _TermVariant_let
-  TermVariantList -> _TermVariant_list
-  TermVariantLiteral -> _TermVariant_literal
-  TermVariantMap -> _TermVariant_map
-  TermVariantMaybe -> _TermVariant_maybe
-  TermVariantPair -> _TermVariant_pair
-  TermVariantProject -> _TermVariant_project
-  TermVariantRecord -> _TermVariant_record
-  TermVariantSet -> _TermVariant_set
-  TermVariantTypeLambda -> _TermVariant_typeLambda
-  TermVariantTypeApplication -> _TermVariant_typeApplication
-  TermVariantInject -> _TermVariant_inject
-  TermVariantUnit -> _TermVariant_unit
-  TermVariantUnwrap -> _TermVariant_unwrap
-  TermVariantVariable -> _TermVariant_variable
-  TermVariantWrap -> _TermVariant_wrap
-
--- | Convert a Haskell TypeVariant to a TTerm
-typeVariant :: TypeVariant -> TTerm TypeVariant
-typeVariant v = injectUnit _TypeVariant $ case v of
-  TypeVariantAnnotated -> _TypeVariant_annotated
-  TypeVariantApplication -> _TypeVariant_application
-  TypeVariantEither -> _TypeVariant_either
-  TypeVariantFunction -> _TypeVariant_function
-  TypeVariantForall -> _TypeVariant_forall
-  TypeVariantList -> _TypeVariant_list
-  TypeVariantLiteral -> _TypeVariant_literal
-  TypeVariantMap -> _TypeVariant_map
-  TypeVariantMaybe -> _TypeVariant_maybe
-  TypeVariantPair -> _TypeVariant_pair
-  TypeVariantRecord -> _TypeVariant_record
-  TypeVariantSet -> _TypeVariant_set
-  TypeVariantUnion -> _TypeVariant_union
-  TypeVariantUnit -> _TypeVariant_unit
-  TypeVariantVariable -> _TypeVariant_variable
-  TypeVariantVoid -> _TypeVariant_void
-  TypeVariantWrap -> _TypeVariant_wrap
diff --git a/src/main/haskell/Hydra/Dsl/OpenGql/Grammar.hs b/src/main/haskell/Hydra/Dsl/OpenGql/Grammar.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/OpenGql/Grammar.hs
+++ /dev/null
@@ -1,22495 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for openGql.grammar
-
-module Hydra.Dsl.OpenGql.Grammar where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified OpenGql.Grammar as Grammar
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-abbreviatedEdgePatternLeftArrow :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternLeftArrow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftArrow"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-abbreviatedEdgePatternLeftArrowTilde :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternLeftArrowTilde =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftArrowTilde"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-abbreviatedEdgePatternLeftMinusRight :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternLeftMinusRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftMinusRight"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-abbreviatedEdgePatternMinusSign :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternMinusSign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minusSign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-abbreviatedEdgePatternRightArrow :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternRightArrow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightArrow"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-abbreviatedEdgePatternTilde :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternTilde =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tilde"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-abbreviatedEdgePatternTildeRightArrow :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern
-abbreviatedEdgePatternTildeRightArrow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbbreviatedEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tildeRightArrow"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-absoluteCatalogSchemaReferenceDirectoryAndSchema :: Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema -> Phantoms.TTerm Grammar.AbsoluteCatalogSchemaReference
-absoluteCatalogSchemaReferenceDirectoryAndSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbsoluteCatalogSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directoryAndSchema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-absoluteCatalogSchemaReferenceRoot :: Phantoms.TTerm Grammar.AbsoluteCatalogSchemaReference
-absoluteCatalogSchemaReferenceRoot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AbsoluteCatalogSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "root"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-absoluteDirectoryAndSchema :: Phantoms.TTerm Grammar.AbsoluteDirectoryPath -> Phantoms.TTerm Grammar.SchemaName -> Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema
-absoluteDirectoryAndSchema directoryPath schemaName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directoryPath"),
-          Core.fieldTerm = (Phantoms.unTTerm directoryPath)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaName"),
-          Core.fieldTerm = (Phantoms.unTTerm schemaName)}]}))
-
-absoluteDirectoryAndSchemaDirectoryPath :: Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema -> Phantoms.TTerm Grammar.AbsoluteDirectoryPath
-absoluteDirectoryAndSchemaDirectoryPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-        Core.projectionField = (Core.Name "directoryPath")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-absoluteDirectoryAndSchemaSchemaName :: Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema -> Phantoms.TTerm Grammar.SchemaName
-absoluteDirectoryAndSchemaSchemaName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-        Core.projectionField = (Core.Name "schemaName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-absoluteDirectoryAndSchemaWithDirectoryPath :: Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema -> Phantoms.TTerm Grammar.AbsoluteDirectoryPath -> Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema
-absoluteDirectoryAndSchemaWithDirectoryPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directoryPath"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-              Core.projectionField = (Core.Name "schemaName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-absoluteDirectoryAndSchemaWithSchemaName :: Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema -> Phantoms.TTerm Grammar.SchemaName -> Phantoms.TTerm Grammar.AbsoluteDirectoryAndSchema
-absoluteDirectoryAndSchemaWithSchemaName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directoryPath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"),
-              Core.projectionField = (Core.Name "directoryPath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-addSubNumericValueExpression :: Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.AddSubtractOperator -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.AddSubNumericValueExpression
-addSubNumericValueExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-addSubNumericValueExpressionLeft :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-addSubNumericValueExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addSubNumericValueExpressionOperator :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.AddSubtractOperator
-addSubNumericValueExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addSubNumericValueExpressionRight :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-addSubNumericValueExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addSubNumericValueExpressionWithLeft :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.AddSubNumericValueExpression
-addSubNumericValueExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addSubNumericValueExpressionWithOperator :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.AddSubtractOperator -> Phantoms.TTerm Grammar.AddSubNumericValueExpression
-addSubNumericValueExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addSubNumericValueExpressionWithRight :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.AddSubNumericValueExpression
-addSubNumericValueExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubNumericValueExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-addSubtractExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.AddSubtractOperator -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.AddSubtractExpr
-addSubtractExpr left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-addSubtractExprLeft :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.ValueExpression
-addSubtractExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addSubtractExprOperator :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.AddSubtractOperator
-addSubtractExprOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addSubtractExprRight :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.ValueExpression
-addSubtractExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-addSubtractExprWithLeft :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.AddSubtractExpr
-addSubtractExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addSubtractExprWithOperator :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.AddSubtractOperator -> Phantoms.TTerm Grammar.AddSubtractExpr
-addSubtractExprWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-addSubtractExprWithRight :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.AddSubtractExpr
-addSubtractExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AddSubtractExpr"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-addSubtractOperatorAdd :: Phantoms.TTerm Grammar.AddSubtractOperator
-addSubtractOperatorAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AddSubtractOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-addSubtractOperatorSubtract :: Phantoms.TTerm Grammar.AddSubtractOperator
-addSubtractOperatorSubtract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AddSubtractOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-aggregateFunctionBinarySetFunction :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.AggregateFunction
-aggregateFunctionBinarySetFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AggregateFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binarySetFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-aggregateFunctionCountAll :: Phantoms.TTerm Grammar.AggregateFunction
-aggregateFunctionCountAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AggregateFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "countAll"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-aggregateFunctionGeneralSetFunction :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm Grammar.AggregateFunction
-aggregateFunctionGeneralSetFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AggregateFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "generalSetFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-allDifferentPredicate :: Phantoms.TTerm [Grammar.ElementVariableReference] -> Phantoms.TTerm Grammar.AllDifferentPredicate
-allDifferentPredicate references =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllDifferentPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Phantoms.unTTerm references)}]}))
-
-allDifferentPredicateReferences :: Phantoms.TTerm Grammar.AllDifferentPredicate -> Phantoms.TTerm [Grammar.ElementVariableReference]
-allDifferentPredicateReferences x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllDifferentPredicate"),
-        Core.projectionField = (Core.Name "references")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allDifferentPredicateWithReferences :: Phantoms.TTerm Grammar.AllDifferentPredicate -> Phantoms.TTerm [Grammar.ElementVariableReference] -> Phantoms.TTerm Grammar.AllDifferentPredicate
-allDifferentPredicateWithReferences original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllDifferentPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-allParametersOrCharacteristics :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ParametersOrCharacteristics -> Phantoms.TTerm Grammar.AllParametersOrCharacteristics
-allParametersOrCharacteristics all type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm all)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-allParametersOrCharacteristicsAll :: Phantoms.TTerm Grammar.AllParametersOrCharacteristics -> Phantoms.TTerm Bool
-allParametersOrCharacteristicsAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-        Core.projectionField = (Core.Name "all")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allParametersOrCharacteristicsType :: Phantoms.TTerm Grammar.AllParametersOrCharacteristics -> Phantoms.TTerm Grammar.ParametersOrCharacteristics
-allParametersOrCharacteristicsType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allParametersOrCharacteristicsWithAll :: Phantoms.TTerm Grammar.AllParametersOrCharacteristics -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.AllParametersOrCharacteristics
-allParametersOrCharacteristicsWithAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-allParametersOrCharacteristicsWithType :: Phantoms.TTerm Grammar.AllParametersOrCharacteristics -> Phantoms.TTerm Grammar.ParametersOrCharacteristics -> Phantoms.TTerm Grammar.AllParametersOrCharacteristics
-allParametersOrCharacteristicsWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AllParametersOrCharacteristics"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-allPathSearch :: Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AllPathSearch
-allPathSearch mode orPaths =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)}]}))
-
-allPathSearchMode :: Phantoms.TTerm Grammar.AllPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode)
-allPathSearchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allPathSearchOrPaths :: Phantoms.TTerm Grammar.AllPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-allPathSearchOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allPathSearchWithMode :: Phantoms.TTerm Grammar.AllPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm Grammar.AllPathSearch
-allPathSearchWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-allPathSearchWithOrPaths :: Phantoms.TTerm Grammar.AllPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AllPathSearch
-allPathSearchWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AllPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-allShortestPathSearch :: Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AllShortestPathSearch
-allShortestPathSearch mode orPaths =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)}]}))
-
-allShortestPathSearchMode :: Phantoms.TTerm Grammar.AllShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode)
-allShortestPathSearchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allShortestPathSearchOrPaths :: Phantoms.TTerm Grammar.AllShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-allShortestPathSearchOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-allShortestPathSearchWithMode :: Phantoms.TTerm Grammar.AllShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm Grammar.AllShortestPathSearch
-allShortestPathSearchWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-allShortestPathSearchWithOrPaths :: Phantoms.TTerm Grammar.AllShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AllShortestPathSearch
-allShortestPathSearchWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AllShortestPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ambientLinearDataModifyingStatementBody :: Phantoms.TTerm Grammar.SimpleLinearDataAccessingStatement -> Phantoms.TTerm (Maybe Grammar.PrimitiveResultStatement) -> Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody
-ambientLinearDataModifyingStatementBody simpleAccess primitiveResult =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm simpleAccess)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm primitiveResult)}]}))
-
-ambientLinearDataModifyingStatementBodyPrimitiveResult :: Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody -> Phantoms.TTerm (Maybe Grammar.PrimitiveResultStatement)
-ambientLinearDataModifyingStatementBodyPrimitiveResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-        Core.projectionField = (Core.Name "primitiveResult")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ambientLinearDataModifyingStatementBodySimpleAccess :: Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.SimpleLinearDataAccessingStatement
-ambientLinearDataModifyingStatementBodySimpleAccess x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-        Core.projectionField = (Core.Name "simpleAccess")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ambientLinearDataModifyingStatementBodyWithPrimitiveResult :: Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody -> Phantoms.TTerm (Maybe Grammar.PrimitiveResultStatement) -> Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody
-ambientLinearDataModifyingStatementBodyWithPrimitiveResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "simpleAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ambientLinearDataModifyingStatementBodyWithSimpleAccess :: Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.SimpleLinearDataAccessingStatement -> Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody
-ambientLinearDataModifyingStatementBodyWithSimpleAccess original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ambientLinearDataModifyingStatementNested :: Phantoms.TTerm Grammar.NestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatement
-ambientLinearDataModifyingStatementNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ambientLinearDataModifyingStatementSimple :: Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatement
-ambientLinearDataModifyingStatementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AmbientLinearDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ambientLinearQueryStatementNested :: Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.AmbientLinearQueryStatement
-ambientLinearQueryStatementNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ambientLinearQueryStatementSimple :: Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult -> Phantoms.TTerm Grammar.AmbientLinearQueryStatement
-ambientLinearQueryStatementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ambientLinearQueryStatementSimpleAndPrimitiveResult :: Phantoms.TTerm (Maybe Grammar.SimpleLinearQueryStatement) -> Phantoms.TTerm Grammar.PrimitiveResultStatement -> Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult
-ambientLinearQueryStatementSimpleAndPrimitiveResult simple primitiveResult =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Phantoms.unTTerm simple)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm primitiveResult)}]}))
-
-ambientLinearQueryStatementSimpleAndPrimitiveResultPrimitiveResult :: Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult -> Phantoms.TTerm Grammar.PrimitiveResultStatement
-ambientLinearQueryStatementSimpleAndPrimitiveResultPrimitiveResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-        Core.projectionField = (Core.Name "primitiveResult")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ambientLinearQueryStatementSimpleAndPrimitiveResultSimple :: Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult -> Phantoms.TTerm (Maybe Grammar.SimpleLinearQueryStatement)
-ambientLinearQueryStatementSimpleAndPrimitiveResultSimple x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-        Core.projectionField = (Core.Name "simple")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ambientLinearQueryStatementSimpleAndPrimitiveResultWithPrimitiveResult :: Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult -> Phantoms.TTerm Grammar.PrimitiveResultStatement -> Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult
-ambientLinearQueryStatementSimpleAndPrimitiveResultWithPrimitiveResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-              Core.projectionField = (Core.Name "simple")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ambientLinearQueryStatementSimpleAndPrimitiveResultWithSimple :: Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult -> Phantoms.TTerm (Maybe Grammar.SimpleLinearQueryStatement) -> Phantoms.TTerm Grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult
-ambientLinearQueryStatementSimpleAndPrimitiveResultWithSimple original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anyPathSearch :: Phantoms.TTerm (Maybe Grammar.NumberOfPaths) -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AnyPathSearch
-anyPathSearch numberOfPaths mode orPaths =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm numberOfPaths)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)}]}))
-
-anyPathSearchMode :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode)
-anyPathSearchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyPathSearchNumberOfPaths :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm (Maybe Grammar.NumberOfPaths)
-anyPathSearchNumberOfPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-        Core.projectionField = (Core.Name "numberOfPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyPathSearchOrPaths :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-anyPathSearchOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyPathSearchWithMode :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm Grammar.AnyPathSearch
-anyPathSearchWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-              Core.projectionField = (Core.Name "numberOfPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anyPathSearchWithNumberOfPaths :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm (Maybe Grammar.NumberOfPaths) -> Phantoms.TTerm Grammar.AnyPathSearch
-anyPathSearchWithNumberOfPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anyPathSearchWithOrPaths :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AnyPathSearch
-anyPathSearchWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-              Core.projectionField = (Core.Name "numberOfPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-anyRecordType :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.AnyRecordType
-anyRecordType any notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-anyRecordTypeAny :: Phantoms.TTerm Grammar.AnyRecordType -> Phantoms.TTerm Bool
-anyRecordTypeAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyRecordTypeNotNull :: Phantoms.TTerm Grammar.AnyRecordType -> Phantoms.TTerm Bool
-anyRecordTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyRecordTypeWithAny :: Phantoms.TTerm Grammar.AnyRecordType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.AnyRecordType
-anyRecordTypeWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anyRecordTypeWithNotNull :: Phantoms.TTerm Grammar.AnyRecordType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.AnyRecordType
-anyRecordTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyRecordType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-anyShortestPathSearch :: Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AnyShortestPathSearch
-anyShortestPathSearch mode orPaths =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)}]}))
-
-anyShortestPathSearchMode :: Phantoms.TTerm Grammar.AnyShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode)
-anyShortestPathSearchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyShortestPathSearchOrPaths :: Phantoms.TTerm Grammar.AnyShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-anyShortestPathSearchOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyShortestPathSearchWithMode :: Phantoms.TTerm Grammar.AnyShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm Grammar.AnyShortestPathSearch
-anyShortestPathSearchWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anyShortestPathSearchWithOrPaths :: Phantoms.TTerm Grammar.AnyShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.AnyShortestPathSearch
-anyShortestPathSearchWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.AnyShortestPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-approximateNumericLiteralCommonWithSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ApproximateNumericLiteral
-approximateNumericLiteralCommonWithSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commonWithSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericLiteralIntegerWithSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ApproximateNumericLiteral
-approximateNumericLiteralIntegerWithSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integerWithSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericLiteralScientificWithSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ApproximateNumericLiteral
-approximateNumericLiteralScientificWithSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scientificWithSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericLiteralScientificWithoutSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ApproximateNumericLiteral
-approximateNumericLiteralScientificWithoutSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scientificWithoutSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeDoubleWithPrecision :: Phantoms.TTerm Grammar.DoubleTypeWithPrecision -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeDoubleWithPrecision x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doubleWithPrecision"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeFloat128 :: Phantoms.TTerm Grammar.Float128Type -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeFloat128 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float128"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeFloat16 :: Phantoms.TTerm Grammar.Float16Type -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeFloat16 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float16"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeFloat256 :: Phantoms.TTerm Grammar.Float256Type -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeFloat256 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float256"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeFloat32 :: Phantoms.TTerm Grammar.Float32Type -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeFloat32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeFloat64 :: Phantoms.TTerm Grammar.Float64Type -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeFloat64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeFloatWithPrecision :: Phantoms.TTerm Grammar.FloatTypeWithPrecision -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeFloatWithPrecision x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floatWithPrecision"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeReal :: Phantoms.TTerm Grammar.RealType -> Phantoms.TTerm Grammar.ApproximateNumericType
-approximateNumericTypeReal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "real"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bigIntType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BigIntType
-bigIntType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BigIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-bigIntTypeNotNull :: Phantoms.TTerm Grammar.BigIntType -> Phantoms.TTerm Bool
-bigIntTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BigIntType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bigIntTypeWithNotNull :: Phantoms.TTerm Grammar.BigIntType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BigIntType
-bigIntTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BigIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bigIntegerType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BigIntegerType
-bigIntegerType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BigIntegerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-bigIntegerTypeNotNull :: Phantoms.TTerm Grammar.BigIntegerType -> Phantoms.TTerm Bool
-bigIntegerTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BigIntegerType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bigIntegerTypeWithNotNull :: Phantoms.TTerm Grammar.BigIntegerType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BigIntegerType
-bigIntegerTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BigIntegerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryExactNumericTypeSigned :: Phantoms.TTerm Grammar.SignedBinaryExactNumericType -> Phantoms.TTerm Grammar.BinaryExactNumericType
-binaryExactNumericTypeSigned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "signed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binaryExactNumericTypeUnsigned :: Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType -> Phantoms.TTerm Grammar.BinaryExactNumericType
-binaryExactNumericTypeUnsigned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsigned"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binarySetFunction :: Phantoms.TTerm Grammar.BinarySetFunctionType -> Phantoms.TTerm Grammar.DependentValueExpression -> Phantoms.TTerm Grammar.IndependentValueExpression -> Phantoms.TTerm Grammar.BinarySetFunction
-binarySetFunction functionType dependentValue independentValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Phantoms.unTTerm functionType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentValue"),
-          Core.fieldTerm = (Phantoms.unTTerm dependentValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "independentValue"),
-          Core.fieldTerm = (Phantoms.unTTerm independentValue)}]}))
-
-binarySetFunctionDependentValue :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.DependentValueExpression
-binarySetFunctionDependentValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-        Core.projectionField = (Core.Name "dependentValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binarySetFunctionFunctionType :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.BinarySetFunctionType
-binarySetFunctionFunctionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-        Core.projectionField = (Core.Name "functionType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binarySetFunctionIndependentValue :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.IndependentValueExpression
-binarySetFunctionIndependentValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-        Core.projectionField = (Core.Name "independentValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binarySetFunctionTypePercentileCont :: Phantoms.TTerm Grammar.BinarySetFunctionType
-binarySetFunctionTypePercentileCont =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BinarySetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "percentileCont"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binarySetFunctionTypePercentileDisc :: Phantoms.TTerm Grammar.BinarySetFunctionType
-binarySetFunctionTypePercentileDisc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BinarySetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "percentileDisc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binarySetFunctionWithDependentValue :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.DependentValueExpression -> Phantoms.TTerm Grammar.BinarySetFunction
-binarySetFunctionWithDependentValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-              Core.projectionField = (Core.Name "functionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "independentValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-              Core.projectionField = (Core.Name "independentValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binarySetFunctionWithFunctionType :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.BinarySetFunctionType -> Phantoms.TTerm Grammar.BinarySetFunction
-binarySetFunctionWithFunctionType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-              Core.projectionField = (Core.Name "dependentValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "independentValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-              Core.projectionField = (Core.Name "independentValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binarySetFunctionWithIndependentValue :: Phantoms.TTerm Grammar.BinarySetFunction -> Phantoms.TTerm Grammar.IndependentValueExpression -> Phantoms.TTerm Grammar.BinarySetFunction
-binarySetFunctionWithIndependentValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-              Core.projectionField = (Core.Name "functionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependentValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinarySetFunction"),
-              Core.projectionField = (Core.Name "dependentValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "independentValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryType :: Phantoms.TTerm (Maybe Grammar.FixedLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BinaryType
-binaryType fixedLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinaryType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixedLength"),
-          Core.fieldTerm = (Phantoms.unTTerm fixedLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-binaryTypeFixedLength :: Phantoms.TTerm Grammar.BinaryType -> Phantoms.TTerm (Maybe Grammar.FixedLength)
-binaryTypeFixedLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BinaryType"),
-        Core.projectionField = (Core.Name "fixedLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryTypeNotNull :: Phantoms.TTerm Grammar.BinaryType -> Phantoms.TTerm Bool
-binaryTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BinaryType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryTypeWithFixedLength :: Phantoms.TTerm Grammar.BinaryType -> Phantoms.TTerm (Maybe Grammar.FixedLength) -> Phantoms.TTerm Grammar.BinaryType
-binaryTypeWithFixedLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinaryType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixedLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinaryType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryTypeWithNotNull :: Phantoms.TTerm Grammar.BinaryType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BinaryType
-binaryTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BinaryType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixedLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BinaryType"),
-              Core.projectionField = (Core.Name "fixedLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bindingEqualsValue :: Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.BindingEqualsValue
-bindingEqualsValue binding value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm binding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-bindingEqualsValueBinding :: Phantoms.TTerm Grammar.BindingEqualsValue -> Phantoms.TTerm Grammar.BindingVariable
-bindingEqualsValueBinding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-        Core.projectionField = (Core.Name "binding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingEqualsValueValue :: Phantoms.TTerm Grammar.BindingEqualsValue -> Phantoms.TTerm Grammar.ValueExpression
-bindingEqualsValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingEqualsValueWithBinding :: Phantoms.TTerm Grammar.BindingEqualsValue -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.BindingEqualsValue
-bindingEqualsValueWithBinding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bindingEqualsValueWithValue :: Phantoms.TTerm Grammar.BindingEqualsValue -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.BindingEqualsValue
-bindingEqualsValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingEqualsValue"),
-              Core.projectionField = (Core.Name "binding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bindingTableExpressionName :: Phantoms.TTerm Grammar.ObjectNameOrBindingVariable -> Phantoms.TTerm Grammar.BindingTableExpression
-bindingTableExpressionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableExpressionNested :: Phantoms.TTerm Grammar.NestedBindingTableQuerySpecification -> Phantoms.TTerm Grammar.BindingTableExpression
-bindingTableExpressionNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableExpressionObject :: Phantoms.TTerm Grammar.ObjectExpressionPrimary -> Phantoms.TTerm Grammar.BindingTableExpression
-bindingTableExpressionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableExpressionTable :: Phantoms.TTerm Grammar.BindingTableReference -> Phantoms.TTerm Grammar.BindingTableExpression
-bindingTableExpressionTable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "table"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableNameDelimitedBindingTableName :: Phantoms.TTerm Grammar.DelimitedBindingTableName -> Phantoms.TTerm Grammar.BindingTableName
-bindingTableNameDelimitedBindingTableName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delimitedBindingTableName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableNameRegularIdentifier :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.BindingTableName
-bindingTableNameRegularIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regularIdentifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableReferenceDelimitedBindingTableName :: Phantoms.TTerm Grammar.DelimitedBindingTableName -> Phantoms.TTerm Grammar.BindingTableReference
-bindingTableReferenceDelimitedBindingTableName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delimitedBindingTableName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableReferenceParameterSpecification :: Phantoms.TTerm Grammar.ReferenceParameterSpecification -> Phantoms.TTerm Grammar.BindingTableReference
-bindingTableReferenceParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableReferenceParentAndTableName :: Phantoms.TTerm Grammar.ParentAndTableName -> Phantoms.TTerm Grammar.BindingTableReference
-bindingTableReferenceParentAndTableName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingTableReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parentAndTableName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingTableReferenceValueType :: Phantoms.TTerm Grammar.BindingTableType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BindingTableReferenceValueType
-bindingTableReferenceValueType bindingTableType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindingTableType"),
-          Core.fieldTerm = (Phantoms.unTTerm bindingTableType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-bindingTableReferenceValueTypeBindingTableType :: Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Grammar.BindingTableType
-bindingTableReferenceValueTypeBindingTableType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-        Core.projectionField = (Core.Name "bindingTableType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Bool
-bindingTableReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableReferenceValueTypeWithBindingTableType :: Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Grammar.BindingTableType -> Phantoms.TTerm Grammar.BindingTableReferenceValueType
-bindingTableReferenceValueTypeWithBindingTableType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindingTableType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bindingTableReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BindingTableReferenceValueType
-bindingTableReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindingTableType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableReferenceValueType"),
-              Core.projectionField = (Core.Name "bindingTableType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bindingTableType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.FieldTypesSpecification -> Phantoms.TTerm Grammar.BindingTableType
-bindingTableType binding fieldTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm binding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldTypes)}]}))
-
-bindingTableTypeBinding :: Phantoms.TTerm Grammar.BindingTableType -> Phantoms.TTerm Bool
-bindingTableTypeBinding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-        Core.projectionField = (Core.Name "binding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableTypeFieldTypes :: Phantoms.TTerm Grammar.BindingTableType -> Phantoms.TTerm Grammar.FieldTypesSpecification
-bindingTableTypeFieldTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-        Core.projectionField = (Core.Name "fieldTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableTypeWithBinding :: Phantoms.TTerm Grammar.BindingTableType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BindingTableType
-bindingTableTypeWithBinding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-              Core.projectionField = (Core.Name "fieldTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bindingTableTypeWithFieldTypes :: Phantoms.TTerm Grammar.BindingTableType -> Phantoms.TTerm Grammar.FieldTypesSpecification -> Phantoms.TTerm Grammar.BindingTableType
-bindingTableTypeWithFieldTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableType"),
-              Core.projectionField = (Core.Name "binding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bindingTableVariableDefinition :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm Grammar.BindingTableVariableDefinition
-bindingTableVariableDefinition binding variable initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm binding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-bindingTableVariableDefinitionBinding :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Bool
-bindingTableVariableDefinitionBinding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-        Core.projectionField = (Core.Name "binding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableVariableDefinitionInitializer :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer
-bindingTableVariableDefinitionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableVariableDefinitionVariable :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Grammar.BindingVariable
-bindingTableVariableDefinitionVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingTableVariableDefinitionWithBinding :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BindingTableVariableDefinition
-bindingTableVariableDefinitionWithBinding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bindingTableVariableDefinitionWithInitializer :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm Grammar.BindingTableVariableDefinition
-bindingTableVariableDefinitionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-              Core.projectionField = (Core.Name "binding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bindingTableVariableDefinitionWithVariable :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.BindingTableVariableDefinition
-bindingTableVariableDefinitionWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-              Core.projectionField = (Core.Name "binding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BindingTableVariableDefinition"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bindingVariableDefinitionGraph :: Phantoms.TTerm Grammar.GraphVariableDefinition -> Phantoms.TTerm Grammar.BindingVariableDefinition
-bindingVariableDefinitionGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingVariableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingVariableDefinitionTable :: Phantoms.TTerm Grammar.BindingTableVariableDefinition -> Phantoms.TTerm Grammar.BindingVariableDefinition
-bindingVariableDefinitionTable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingVariableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "table"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bindingVariableDefinitionValue :: Phantoms.TTerm Grammar.ValueVariableDefinition -> Phantoms.TTerm Grammar.BindingVariableDefinition
-bindingVariableDefinitionValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BindingVariableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanLiteralFalse :: Phantoms.TTerm Grammar.BooleanLiteral
-booleanLiteralFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "false"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanLiteralTrue :: Phantoms.TTerm Grammar.BooleanLiteral
-booleanLiteralTrue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "true"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanLiteralUnknown :: Phantoms.TTerm Grammar.BooleanLiteral
-booleanLiteralUnknown =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unknown"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BooleanType
-booleanType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BooleanType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-booleanTypeNotNull :: Phantoms.TTerm Grammar.BooleanType -> Phantoms.TTerm Bool
-booleanTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BooleanType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTypeWithNotNull :: Phantoms.TTerm Grammar.BooleanType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BooleanType
-booleanTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BooleanType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-byteStringTypeBinaryType :: Phantoms.TTerm Grammar.BinaryType -> Phantoms.TTerm Grammar.ByteStringType
-byteStringTypeBinaryType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ByteStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binaryType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byteStringTypeBytesType :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm Grammar.ByteStringType
-byteStringTypeBytesType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ByteStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bytesType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byteStringTypeVarbinaryType :: Phantoms.TTerm Grammar.VarbinaryType -> Phantoms.TTerm Grammar.ByteStringType
-byteStringTypeVarbinaryType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ByteStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "varbinaryType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-bytesType :: Phantoms.TTerm (Maybe Grammar.MinLength) -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BytesType
-bytesType minLength maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BytesType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Phantoms.unTTerm minLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-bytesTypeMaxLength :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-bytesTypeMaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bytesTypeMinLength :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm (Maybe Grammar.MinLength)
-bytesTypeMinLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-        Core.projectionField = (Core.Name "minLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bytesTypeNotNull :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm Bool
-bytesTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bytesTypeWithMaxLength :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.BytesType
-bytesTypeWithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BytesType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-              Core.projectionField = (Core.Name "minLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bytesTypeWithMinLength :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm (Maybe Grammar.MinLength) -> Phantoms.TTerm Grammar.BytesType
-bytesTypeWithMinLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BytesType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bytesTypeWithNotNull :: Phantoms.TTerm Grammar.BytesType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.BytesType
-bytesTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.BytesType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-              Core.projectionField = (Core.Name "minLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.BytesType"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-callProcedureStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ProcedureCall -> Phantoms.TTerm Grammar.CallProcedureStatement
-callProcedureStatement optional call =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Phantoms.unTTerm call)}]}))
-
-callProcedureStatementCall :: Phantoms.TTerm Grammar.CallProcedureStatement -> Phantoms.TTerm Grammar.ProcedureCall
-callProcedureStatementCall x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-        Core.projectionField = (Core.Name "call")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callProcedureStatementOptional :: Phantoms.TTerm Grammar.CallProcedureStatement -> Phantoms.TTerm Bool
-callProcedureStatementOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callProcedureStatementWithCall :: Phantoms.TTerm Grammar.CallProcedureStatement -> Phantoms.TTerm Grammar.ProcedureCall -> Phantoms.TTerm Grammar.CallProcedureStatement
-callProcedureStatementWithCall original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-callProcedureStatementWithOptional :: Phantoms.TTerm Grammar.CallProcedureStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CallProcedureStatement
-callProcedureStatementWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "call"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CallProcedureStatement"),
-              Core.projectionField = (Core.Name "call")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-cardinalityExpressionCardinality :: Phantoms.TTerm Grammar.CardinalityArgumentExpression -> Phantoms.TTerm Grammar.CardinalityExpression
-cardinalityExpressionCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CardinalityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-cardinalityExpressionSize :: Phantoms.TTerm Grammar.ListValueExpression -> Phantoms.TTerm Grammar.CardinalityExpression
-cardinalityExpressionSize x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CardinalityExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "size"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseAbbreviationCoalesce :: Phantoms.TTerm [Grammar.ValueExpression] -> Phantoms.TTerm Grammar.CaseAbbreviation
-caseAbbreviationCoalesce x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseAbbreviation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "coalesce"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseAbbreviationNullIf :: Phantoms.TTerm Grammar.NullIfAbbreviation -> Phantoms.TTerm Grammar.CaseAbbreviation
-caseAbbreviationNullIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseAbbreviation"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullIf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseExpressionAbbreviation :: Phantoms.TTerm Grammar.CaseAbbreviation -> Phantoms.TTerm Grammar.CaseExpression
-caseExpressionAbbreviation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abbreviation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseExpressionSpecification :: Phantoms.TTerm Grammar.CaseSpecification -> Phantoms.TTerm Grammar.CaseExpression
-caseExpressionSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "specification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseLower :: Phantoms.TTerm Grammar.Case
-caseLower =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Case"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lower"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-caseOperandElementReference :: Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.CaseOperand
-caseOperandElementReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseOperandValueExpression :: Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpression -> Phantoms.TTerm Grammar.CaseOperand
-caseOperandValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseSpecificationSearched :: Phantoms.TTerm Grammar.SearchedCase -> Phantoms.TTerm Grammar.CaseSpecification
-caseSpecificationSearched x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "searched"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseSpecificationSimple :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm Grammar.CaseSpecification
-caseSpecificationSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CaseSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseUpper :: Phantoms.TTerm Grammar.Case
-caseUpper =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Case"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "upper"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-castOperandNullLiteral :: Phantoms.TTerm Grammar.CastOperand
-castOperandNullLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CastOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullLiteral"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-castOperandValueExpression :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.CastOperand
-castOperandValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CastOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-castSpecification :: Phantoms.TTerm Grammar.CastOperand -> Phantoms.TTerm Grammar.CastTarget -> Phantoms.TTerm Grammar.CastSpecification
-castSpecification operand target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-castSpecificationOperand :: Phantoms.TTerm Grammar.CastSpecification -> Phantoms.TTerm Grammar.CastOperand
-castSpecificationOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castSpecificationTarget :: Phantoms.TTerm Grammar.CastSpecification -> Phantoms.TTerm Grammar.CastTarget
-castSpecificationTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castSpecificationWithOperand :: Phantoms.TTerm Grammar.CastSpecification -> Phantoms.TTerm Grammar.CastOperand -> Phantoms.TTerm Grammar.CastSpecification
-castSpecificationWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-castSpecificationWithTarget :: Phantoms.TTerm Grammar.CastSpecification -> Phantoms.TTerm Grammar.CastTarget -> Phantoms.TTerm Grammar.CastSpecification
-castSpecificationWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CastSpecification"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catalogGraphParentAndName :: Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference) -> Phantoms.TTerm Grammar.GraphName -> Phantoms.TTerm Grammar.CatalogGraphParentAndName
-catalogGraphParentAndName parentReference graphName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm parentReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphName"),
-          Core.fieldTerm = (Phantoms.unTTerm graphName)}]}))
-
-catalogGraphParentAndNameGraphName :: Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm Grammar.GraphName
-catalogGraphParentAndNameGraphName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-        Core.projectionField = (Core.Name "graphName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catalogGraphParentAndNameParentReference :: Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference)
-catalogGraphParentAndNameParentReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-        Core.projectionField = (Core.Name "parentReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catalogGraphParentAndNameWithGraphName :: Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm Grammar.GraphName -> Phantoms.TTerm Grammar.CatalogGraphParentAndName
-catalogGraphParentAndNameWithGraphName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-              Core.projectionField = (Core.Name "parentReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catalogGraphParentAndNameWithParentReference :: Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference) -> Phantoms.TTerm Grammar.CatalogGraphParentAndName
-catalogGraphParentAndNameWithParentReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphParentAndName"),
-              Core.projectionField = (Core.Name "graphName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catalogGraphTypeParentAndName :: Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference) -> Phantoms.TTerm Grammar.GraphTypeName -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName
-catalogGraphTypeParentAndName parentReference graphTypeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm parentReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm graphTypeName)}]}))
-
-catalogGraphTypeParentAndNameGraphTypeName :: Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.GraphTypeName
-catalogGraphTypeParentAndNameGraphTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-        Core.projectionField = (Core.Name "graphTypeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catalogGraphTypeParentAndNameParentReference :: Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference)
-catalogGraphTypeParentAndNameParentReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-        Core.projectionField = (Core.Name "parentReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catalogGraphTypeParentAndNameWithGraphTypeName :: Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.GraphTypeName -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName
-catalogGraphTypeParentAndNameWithGraphTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-              Core.projectionField = (Core.Name "parentReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-catalogGraphTypeParentAndNameWithParentReference :: Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference) -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName
-catalogGraphTypeParentAndNameWithParentReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphTypeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"),
-              Core.projectionField = (Core.Name "graphTypeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catalogObjectParentReferenceObjectsOnly :: Phantoms.TTerm [Grammar.ObjectName] -> Phantoms.TTerm Grammar.CatalogObjectParentReference
-catalogObjectParentReferenceObjectsOnly x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CatalogObjectParentReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectsOnly"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-catalogObjectParentReferenceSchemaAndObjects :: Phantoms.TTerm Grammar.SchemaAndObjects -> Phantoms.TTerm Grammar.CatalogObjectParentReference
-catalogObjectParentReferenceSchemaAndObjects x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CatalogObjectParentReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schemaAndObjects"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-catalogProcedureParentAndName :: Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference) -> Phantoms.TTerm Grammar.ProcedureName -> Phantoms.TTerm Grammar.CatalogProcedureParentAndName
-catalogProcedureParentAndName parentReference procedureName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm parentReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureName"),
-          Core.fieldTerm = (Phantoms.unTTerm procedureName)}]}))
-
-catalogProcedureParentAndNameParentReference :: Phantoms.TTerm Grammar.CatalogProcedureParentAndName -> Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference)
-catalogProcedureParentAndNameParentReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-        Core.projectionField = (Core.Name "parentReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catalogProcedureParentAndNameProcedureName :: Phantoms.TTerm Grammar.CatalogProcedureParentAndName -> Phantoms.TTerm Grammar.ProcedureName
-catalogProcedureParentAndNameProcedureName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-        Core.projectionField = (Core.Name "procedureName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-catalogProcedureParentAndNameWithParentReference :: Phantoms.TTerm Grammar.CatalogProcedureParentAndName -> Phantoms.TTerm (Maybe Grammar.CatalogObjectParentReference) -> Phantoms.TTerm Grammar.CatalogProcedureParentAndName
-catalogProcedureParentAndNameWithParentReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-              Core.projectionField = (Core.Name "procedureName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-catalogProcedureParentAndNameWithProcedureName :: Phantoms.TTerm Grammar.CatalogProcedureParentAndName -> Phantoms.TTerm Grammar.ProcedureName -> Phantoms.TTerm Grammar.CatalogProcedureParentAndName
-catalogProcedureParentAndNameWithProcedureName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CatalogProcedureParentAndName"),
-              Core.projectionField = (Core.Name "parentReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-charType :: Phantoms.TTerm (Maybe Grammar.FixedLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CharType
-charType fixedLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CharType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixedLength"),
-          Core.fieldTerm = (Phantoms.unTTerm fixedLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-charTypeFixedLength :: Phantoms.TTerm Grammar.CharType -> Phantoms.TTerm (Maybe Grammar.FixedLength)
-charTypeFixedLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CharType"),
-        Core.projectionField = (Core.Name "fixedLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-charTypeNotNull :: Phantoms.TTerm Grammar.CharType -> Phantoms.TTerm Bool
-charTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CharType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-charTypeWithFixedLength :: Phantoms.TTerm Grammar.CharType -> Phantoms.TTerm (Maybe Grammar.FixedLength) -> Phantoms.TTerm Grammar.CharType
-charTypeWithFixedLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CharType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixedLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CharType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-charTypeWithNotNull :: Phantoms.TTerm Grammar.CharType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CharType
-charTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CharType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fixedLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CharType"),
-              Core.projectionField = (Core.Name "fixedLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-characterOrByteStringFunctionFold :: Phantoms.TTerm Grammar.FoldCharacterString -> Phantoms.TTerm Grammar.CharacterOrByteStringFunction
-characterOrByteStringFunctionFold x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterOrByteStringFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fold"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterOrByteStringFunctionNormalize :: Phantoms.TTerm Grammar.NormalizeCharacterString -> Phantoms.TTerm Grammar.CharacterOrByteStringFunction
-characterOrByteStringFunctionNormalize x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterOrByteStringFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normalize"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterOrByteStringFunctionSub :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.CharacterOrByteStringFunction
-characterOrByteStringFunctionSub x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterOrByteStringFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sub"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterOrByteStringFunctionTrimMultiCharacter :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm Grammar.CharacterOrByteStringFunction
-characterOrByteStringFunctionTrimMultiCharacter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterOrByteStringFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trimMultiCharacter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterOrByteStringFunctionTrimSingle :: Phantoms.TTerm Grammar.TrimSingleCharacterOrByteString -> Phantoms.TTerm Grammar.CharacterOrByteStringFunction
-characterOrByteStringFunctionTrimSingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterOrByteStringFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trimSingle"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeCharType :: Phantoms.TTerm Grammar.CharType -> Phantoms.TTerm Grammar.CharacterStringType
-characterStringTypeCharType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "charType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeStringType :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm Grammar.CharacterStringType
-characterStringTypeStringType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stringType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeVarcharType :: Phantoms.TTerm Grammar.VarcharType -> Phantoms.TTerm Grammar.CharacterStringType
-characterStringTypeVarcharType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "varcharType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedDynamicUnionTypeAlt1 :: Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm [Grammar.ValueType] -> Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1
-closedDynamicUnionTypeAlt1 anyValue valueTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "anyValue"),
-          Core.fieldTerm = (Phantoms.unTTerm anyValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm valueTypes)}]}))
-
-closedDynamicUnionTypeAlt1AnyValue :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1 -> Phantoms.TTerm (Maybe Bool)
-closedDynamicUnionTypeAlt1AnyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-        Core.projectionField = (Core.Name "anyValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedDynamicUnionTypeAlt1ValueTypes :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1 -> Phantoms.TTerm [Grammar.ValueType]
-closedDynamicUnionTypeAlt1ValueTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-        Core.projectionField = (Core.Name "valueTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedDynamicUnionTypeAlt1WithAnyValue :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1 -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1
-closedDynamicUnionTypeAlt1WithAnyValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "anyValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-              Core.projectionField = (Core.Name "valueTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closedDynamicUnionTypeAlt1WithValueTypes :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1 -> Phantoms.TTerm [Grammar.ValueType] -> Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1
-closedDynamicUnionTypeAlt1WithValueTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "anyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"),
-              Core.projectionField = (Core.Name "anyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closedDynamicUnionTypeAlt2 :: Phantoms.TTerm [Grammar.ValueType] -> Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt2
-closedDynamicUnionTypeAlt2 valueTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm valueTypes)}]}))
-
-closedDynamicUnionTypeAlt2ValueTypes :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt2 -> Phantoms.TTerm [Grammar.ValueType]
-closedDynamicUnionTypeAlt2ValueTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt2"),
-        Core.projectionField = (Core.Name "valueTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedDynamicUnionTypeAlt2WithValueTypes :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt2 -> Phantoms.TTerm [Grammar.ValueType] -> Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt2
-closedDynamicUnionTypeAlt2WithValueTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closedEdgeReferenceValueType :: Phantoms.TTerm Grammar.EdgeTypeSpecification -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType
-closedEdgeReferenceValueType edgeTypeSpec notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeTypeSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeTypeSpec)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-closedEdgeReferenceValueTypeEdgeTypeSpec :: Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType -> Phantoms.TTerm Grammar.EdgeTypeSpecification
-closedEdgeReferenceValueTypeEdgeTypeSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-        Core.projectionField = (Core.Name "edgeTypeSpec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedEdgeReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType -> Phantoms.TTerm Bool
-closedEdgeReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedEdgeReferenceValueTypeWithEdgeTypeSpec :: Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType -> Phantoms.TTerm Grammar.EdgeTypeSpecification -> Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType
-closedEdgeReferenceValueTypeWithEdgeTypeSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeTypeSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closedEdgeReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType
-closedEdgeReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeTypeSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "edgeTypeSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closedGraphReferenceValueType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.NestedGraphTypeSpecification -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedGraphReferenceValueType
-closedGraphReferenceValueType property nestedSpec notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm nestedSpec)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-closedGraphReferenceValueTypeNestedSpec :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Grammar.NestedGraphTypeSpecification
-closedGraphReferenceValueTypeNestedSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "nestedSpec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedGraphReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Bool
-closedGraphReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedGraphReferenceValueTypeProperty :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Bool
-closedGraphReferenceValueTypeProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedGraphReferenceValueTypeWithNestedSpec :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Grammar.NestedGraphTypeSpecification -> Phantoms.TTerm Grammar.ClosedGraphReferenceValueType
-closedGraphReferenceValueTypeWithNestedSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closedGraphReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedGraphReferenceValueType
-closedGraphReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "nestedSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closedGraphReferenceValueTypeWithProperty :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedGraphReferenceValueType
-closedGraphReferenceValueTypeWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "nestedSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closedNodeReferenceValueType :: Phantoms.TTerm Grammar.NodeTypeSpecification -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedNodeReferenceValueType
-closedNodeReferenceValueType nodeTypeSpec notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeTypeSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeTypeSpec)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-closedNodeReferenceValueTypeNodeTypeSpec :: Phantoms.TTerm Grammar.ClosedNodeReferenceValueType -> Phantoms.TTerm Grammar.NodeTypeSpecification
-closedNodeReferenceValueTypeNodeTypeSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-        Core.projectionField = (Core.Name "nodeTypeSpec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedNodeReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.ClosedNodeReferenceValueType -> Phantoms.TTerm Bool
-closedNodeReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedNodeReferenceValueTypeWithNodeTypeSpec :: Phantoms.TTerm Grammar.ClosedNodeReferenceValueType -> Phantoms.TTerm Grammar.NodeTypeSpecification -> Phantoms.TTerm Grammar.ClosedNodeReferenceValueType
-closedNodeReferenceValueTypeWithNodeTypeSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeTypeSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closedNodeReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.ClosedNodeReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ClosedNodeReferenceValueType
-closedNodeReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeTypeSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ClosedNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "nodeTypeSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compOpEquals :: Phantoms.TTerm Grammar.CompOp
-compOpEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compOpGreaterThan :: Phantoms.TTerm Grammar.CompOp
-compOpGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compOpGreaterThanOrEquals :: Phantoms.TTerm Grammar.CompOp
-compOpGreaterThanOrEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compOpLessThan :: Phantoms.TTerm Grammar.CompOp
-compOpLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compOpLessThanOrEquals :: Phantoms.TTerm Grammar.CompOp
-compOpLessThanOrEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compOpNotEquals :: Phantoms.TTerm Grammar.CompOp
-compOpNotEquals =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEquals"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.ComparisonExpr
-comparisonExpr valueExpression comparison =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Phantoms.unTTerm comparison)}]}))
-
-comparisonExprComparison :: Phantoms.TTerm Grammar.ComparisonExpr -> Phantoms.TTerm Grammar.ComparisonPredicatePart2
-comparisonExprComparison x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-        Core.projectionField = (Core.Name "comparison")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonExprValueExpression :: Phantoms.TTerm Grammar.ComparisonExpr -> Phantoms.TTerm Grammar.ValueExpression
-comparisonExprValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonExprWithComparison :: Phantoms.TTerm Grammar.ComparisonExpr -> Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.ComparisonExpr
-comparisonExprWithComparison original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-comparisonExprWithValueExpression :: Phantoms.TTerm Grammar.ComparisonExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ComparisonExpr
-comparisonExprWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comparison"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonExpr"),
-              Core.projectionField = (Core.Name "comparison")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonPredicatePart2 :: Phantoms.TTerm Grammar.CompOp -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ComparisonPredicatePart2
-comparisonPredicatePart2 compOp valueExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "compOp"),
-          Core.fieldTerm = (Phantoms.unTTerm compOp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)}]}))
-
-comparisonPredicatePart2CompOp :: Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.CompOp
-comparisonPredicatePart2CompOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-        Core.projectionField = (Core.Name "compOp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonPredicatePart2ValueExpression :: Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.ValueExpression
-comparisonPredicatePart2ValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonPredicatePart2WithCompOp :: Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.CompOp -> Phantoms.TTerm Grammar.ComparisonPredicatePart2
-comparisonPredicatePart2WithCompOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "compOp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonPredicatePart2WithValueExpression :: Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ComparisonPredicatePart2
-comparisonPredicatePart2WithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "compOp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ComparisonPredicatePart2"),
-              Core.projectionField = (Core.Name "compOp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compositeQueryExpressionConjunction :: Phantoms.TTerm Grammar.CompositeQueryExpression -> Phantoms.TTerm Grammar.QueryConjunction -> Phantoms.TTerm Grammar.CompositeQueryPrimary -> Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction
-compositeQueryExpressionConjunction left conjunction right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "conjunction"),
-          Core.fieldTerm = (Phantoms.unTTerm conjunction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-compositeQueryExpressionConjunctionConjunction :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.QueryConjunction
-compositeQueryExpressionConjunctionConjunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-        Core.projectionField = (Core.Name "conjunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeQueryExpressionConjunctionLeft :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.CompositeQueryExpression
-compositeQueryExpressionConjunctionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeQueryExpressionConjunctionRight :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.CompositeQueryPrimary
-compositeQueryExpressionConjunctionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeQueryExpressionConjunctionWithConjunction :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.QueryConjunction -> Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction
-compositeQueryExpressionConjunctionWithConjunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "conjunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compositeQueryExpressionConjunctionWithLeft :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.CompositeQueryExpression -> Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction
-compositeQueryExpressionConjunctionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "conjunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-              Core.projectionField = (Core.Name "conjunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compositeQueryExpressionConjunctionWithRight :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.CompositeQueryPrimary -> Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction
-compositeQueryExpressionConjunctionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "conjunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"),
-              Core.projectionField = (Core.Name "conjunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compositeQueryExpressionPrimary :: Phantoms.TTerm Grammar.CompositeQueryPrimary -> Phantoms.TTerm Grammar.CompositeQueryExpression
-compositeQueryExpressionPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compositeQueryExpressionSimple :: Phantoms.TTerm Grammar.CompositeQueryExpressionConjunction -> Phantoms.TTerm Grammar.CompositeQueryExpression
-compositeQueryExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CompositeQueryExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-concatenationExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ConcatenationExpr
-concatenationExpr left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-concatenationExprLeft :: Phantoms.TTerm Grammar.ConcatenationExpr -> Phantoms.TTerm Grammar.ValueExpression
-concatenationExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-concatenationExprRight :: Phantoms.TTerm Grammar.ConcatenationExpr -> Phantoms.TTerm Grammar.ValueExpression
-concatenationExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-concatenationExprWithLeft :: Phantoms.TTerm Grammar.ConcatenationExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ConcatenationExpr
-concatenationExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-concatenationExprWithRight :: Phantoms.TTerm Grammar.ConcatenationExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ConcatenationExpr
-concatenationExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ConcatenationExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conjunctionLabelExpression :: Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.ConjunctionLabelExpression
-conjunctionLabelExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-conjunctionLabelExpressionLeft :: Phantoms.TTerm Grammar.ConjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-conjunctionLabelExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conjunctionLabelExpressionRight :: Phantoms.TTerm Grammar.ConjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-conjunctionLabelExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conjunctionLabelExpressionWithLeft :: Phantoms.TTerm Grammar.ConjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.ConjunctionLabelExpression
-conjunctionLabelExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conjunctionLabelExpressionWithRight :: Phantoms.TTerm Grammar.ConjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.ConjunctionLabelExpression
-conjunctionLabelExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctionLabelExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conjunctiveExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ConjunctiveExpr
-conjunctiveExpr left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-conjunctiveExprLeft :: Phantoms.TTerm Grammar.ConjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression
-conjunctiveExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conjunctiveExprRight :: Phantoms.TTerm Grammar.ConjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression
-conjunctiveExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conjunctiveExprWithLeft :: Phantoms.TTerm Grammar.ConjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ConjunctiveExpr
-conjunctiveExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conjunctiveExprWithRight :: Phantoms.TTerm Grammar.ConjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ConjunctiveExpr
-conjunctiveExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ConjunctiveExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-connectorPointingRightRightArrow :: Phantoms.TTerm Grammar.ConnectorPointingRight
-connectorPointingRightRightArrow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ConnectorPointingRight"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightArrow"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-connectorPointingRightTo :: Phantoms.TTerm Grammar.ConnectorPointingRight
-connectorPointingRightTo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ConnectorPointingRight"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "to"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-connectorUndirectedTilde :: Phantoms.TTerm Grammar.ConnectorUndirected
-connectorUndirectedTilde =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ConnectorUndirected"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tilde"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-connectorUndirectedTo :: Phantoms.TTerm Grammar.ConnectorUndirected
-connectorUndirectedTo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ConnectorUndirected"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "to"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-countedShortestGroupSearch :: Phantoms.TTerm (Maybe Grammar.NumberOfGroups) -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CountedShortestGroupSearch
-countedShortestGroupSearch numberOfGroups mode orPaths groups =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfGroups"),
-          Core.fieldTerm = (Phantoms.unTTerm numberOfGroups)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Phantoms.unTTerm groups)}]}))
-
-countedShortestGroupSearchGroups :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm Bool
-countedShortestGroupSearchGroups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-        Core.projectionField = (Core.Name "groups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestGroupSearchMode :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm (Maybe Grammar.PathMode)
-countedShortestGroupSearchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestGroupSearchNumberOfGroups :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm (Maybe Grammar.NumberOfGroups)
-countedShortestGroupSearchNumberOfGroups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-        Core.projectionField = (Core.Name "numberOfGroups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestGroupSearchOrPaths :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-countedShortestGroupSearchOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestGroupSearchWithGroups :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CountedShortestGroupSearch
-countedShortestGroupSearchWithGroups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "numberOfGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-countedShortestGroupSearchWithMode :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm Grammar.CountedShortestGroupSearch
-countedShortestGroupSearchWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "numberOfGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "groups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-countedShortestGroupSearchWithNumberOfGroups :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm (Maybe Grammar.NumberOfGroups) -> Phantoms.TTerm Grammar.CountedShortestGroupSearch
-countedShortestGroupSearchWithNumberOfGroups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfGroups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "groups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-countedShortestGroupSearchWithOrPaths :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.CountedShortestGroupSearch
-countedShortestGroupSearchWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "numberOfGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestGroupSearch"),
-              Core.projectionField = (Core.Name "groups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-countedShortestPathSearch :: Phantoms.TTerm Grammar.NumberOfPaths -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.CountedShortestPathSearch
-countedShortestPathSearch numberOfPaths mode orPaths =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm numberOfPaths)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)}]}))
-
-countedShortestPathSearchMode :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode)
-countedShortestPathSearchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestPathSearchNumberOfPaths :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm Grammar.NumberOfPaths
-countedShortestPathSearchNumberOfPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-        Core.projectionField = (Core.Name "numberOfPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestPathSearchOrPaths :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-countedShortestPathSearchOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-countedShortestPathSearchWithMode :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathMode) -> Phantoms.TTerm Grammar.CountedShortestPathSearch
-countedShortestPathSearchWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-              Core.projectionField = (Core.Name "numberOfPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-countedShortestPathSearchWithNumberOfPaths :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm Grammar.NumberOfPaths -> Phantoms.TTerm Grammar.CountedShortestPathSearch
-countedShortestPathSearchWithNumberOfPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-countedShortestPathSearchWithOrPaths :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.CountedShortestPathSearch
-countedShortestPathSearchWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numberOfPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-              Core.projectionField = (Core.Name "numberOfPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CountedShortestPathSearch"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-createGraphOptionGraphIfNotExists :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CreateGraphOption
-createGraphOptionGraphIfNotExists x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CreateGraphOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphIfNotExists"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-createGraphOptionOrReplace :: Phantoms.TTerm Grammar.CreateGraphOption
-createGraphOptionOrReplace =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CreateGraphOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orReplace"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-createGraphStatement :: Phantoms.TTerm Grammar.CreateGraphOption -> Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm Grammar.GraphTypeOption -> Phantoms.TTerm (Maybe Grammar.GraphSource) -> Phantoms.TTerm Grammar.CreateGraphStatement
-createGraphStatement createOption parentAndName type_ source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Phantoms.unTTerm createOption)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm parentAndName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-createGraphStatementCreateOption :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.CreateGraphOption
-createGraphStatementCreateOption x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-        Core.projectionField = (Core.Name "createOption")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphStatementParentAndName :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.CatalogGraphParentAndName
-createGraphStatementParentAndName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-        Core.projectionField = (Core.Name "parentAndName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphStatementSource :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm (Maybe Grammar.GraphSource)
-createGraphStatementSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphStatementType :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.GraphTypeOption
-createGraphStatementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphStatementWithCreateOption :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.CreateGraphOption -> Phantoms.TTerm Grammar.CreateGraphStatement
-createGraphStatementWithCreateOption original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-createGraphStatementWithParentAndName :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm Grammar.CreateGraphStatement
-createGraphStatementWithParentAndName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "createOption")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-createGraphStatementWithSource :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm (Maybe Grammar.GraphSource) -> Phantoms.TTerm Grammar.CreateGraphStatement
-createGraphStatementWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "createOption")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-createGraphStatementWithType :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.GraphTypeOption -> Phantoms.TTerm Grammar.CreateGraphStatement
-createGraphStatementWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "createOption")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphStatement"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-createGraphTypeOptionOrReplace :: Phantoms.TTerm Grammar.CreateGraphTypeOption
-createGraphTypeOptionOrReplace =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orReplace"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-createGraphTypeOptionTypeIfNotExists :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CreateGraphTypeOption
-createGraphTypeOptionTypeIfNotExists x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeIfNotExists"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-createGraphTypeStatement :: Phantoms.TTerm Grammar.CreateGraphTypeOption -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.GraphTypeSource -> Phantoms.TTerm Grammar.CreateGraphTypeStatement
-createGraphTypeStatement createOption parentAndName source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Phantoms.unTTerm createOption)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm parentAndName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-createGraphTypeStatementCreateOption :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.CreateGraphTypeOption
-createGraphTypeStatementCreateOption x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-        Core.projectionField = (Core.Name "createOption")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphTypeStatementParentAndName :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName
-createGraphTypeStatementParentAndName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-        Core.projectionField = (Core.Name "parentAndName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphTypeStatementSource :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.GraphTypeSource
-createGraphTypeStatementSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createGraphTypeStatementWithCreateOption :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.CreateGraphTypeOption -> Phantoms.TTerm Grammar.CreateGraphTypeStatement
-createGraphTypeStatementWithCreateOption original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-createGraphTypeStatementWithParentAndName :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.CreateGraphTypeStatement
-createGraphTypeStatementWithParentAndName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-              Core.projectionField = (Core.Name "createOption")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-createGraphTypeStatementWithSource :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.GraphTypeSource -> Phantoms.TTerm Grammar.CreateGraphTypeStatement
-createGraphTypeStatementWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "createOption"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-              Core.projectionField = (Core.Name "createOption")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateGraphTypeStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-createSchemaStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CatalogSchemaParentAndName -> Phantoms.TTerm Grammar.CreateSchemaStatement
-createSchemaStatement ifNotExists parentAndName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifNotExists"),
-          Core.fieldTerm = (Phantoms.unTTerm ifNotExists)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm parentAndName)}]}))
-
-createSchemaStatementIfNotExists :: Phantoms.TTerm Grammar.CreateSchemaStatement -> Phantoms.TTerm Bool
-createSchemaStatementIfNotExists x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-        Core.projectionField = (Core.Name "ifNotExists")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createSchemaStatementParentAndName :: Phantoms.TTerm Grammar.CreateSchemaStatement -> Phantoms.TTerm Grammar.CatalogSchemaParentAndName
-createSchemaStatementParentAndName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-        Core.projectionField = (Core.Name "parentAndName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-createSchemaStatementWithIfNotExists :: Phantoms.TTerm Grammar.CreateSchemaStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CreateSchemaStatement
-createSchemaStatementWithIfNotExists original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifNotExists"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-createSchemaStatementWithParentAndName :: Phantoms.TTerm Grammar.CreateSchemaStatement -> Phantoms.TTerm Grammar.CatalogSchemaParentAndName -> Phantoms.TTerm Grammar.CreateSchemaStatement
-createSchemaStatementWithParentAndName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifNotExists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.CreateSchemaStatement"),
-              Core.projectionField = (Core.Name "ifNotExists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-currentGraphGraph :: Phantoms.TTerm Grammar.CurrentGraph
-currentGraphGraph =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CurrentGraph"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-currentGraphPropertyGraph :: Phantoms.TTerm Grammar.CurrentGraph
-currentGraphPropertyGraph =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.CurrentGraph"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyGraph"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dateFunctionCurrentDate :: Phantoms.TTerm Grammar.DateFunction
-dateFunctionCurrentDate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DateFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "currentDate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dateFunctionDateWithParams :: Phantoms.TTerm (Maybe Grammar.DateFunctionParameters) -> Phantoms.TTerm Grammar.DateFunction
-dateFunctionDateWithParams x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DateFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateWithParams"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateFunctionParametersDateString :: Phantoms.TTerm Grammar.DateString -> Phantoms.TTerm Grammar.DateFunctionParameters
-dateFunctionParametersDateString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DateFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateFunctionParametersRecordConstructor :: Phantoms.TTerm Grammar.RecordConstructor -> Phantoms.TTerm Grammar.DateFunctionParameters
-dateFunctionParametersRecordConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DateFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DateType
-dateType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DateType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-dateTypeNotNull :: Phantoms.TTerm Grammar.DateType -> Phantoms.TTerm Bool
-dateTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DateType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dateTypeWithNotNull :: Phantoms.TTerm Grammar.DateType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DateType
-dateTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DateType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-datetimeFunctionCurrentTimestamp :: Phantoms.TTerm Grammar.DatetimeFunction
-datetimeFunctionCurrentTimestamp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "currentTimestamp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datetimeFunctionParametersDatetimeString :: Phantoms.TTerm Grammar.DatetimeString -> Phantoms.TTerm Grammar.DatetimeFunctionParameters
-datetimeFunctionParametersDatetimeString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetimeString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeFunctionParametersRecordConstructor :: Phantoms.TTerm Grammar.RecordConstructor -> Phantoms.TTerm Grammar.DatetimeFunctionParameters
-datetimeFunctionParametersRecordConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeFunctionZonedDatetimeWithParams :: Phantoms.TTerm (Maybe Grammar.DatetimeFunctionParameters) -> Phantoms.TTerm Grammar.DatetimeFunction
-datetimeFunctionZonedDatetimeWithParams x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zonedDatetimeWithParams"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeSubtraction :: Phantoms.TTerm Grammar.DatetimeSubtractionParameters -> Phantoms.TTerm (Maybe Grammar.TemporalDurationQualifier) -> Phantoms.TTerm Grammar.DatetimeSubtraction
-datetimeSubtraction parameters temporalDurationQualifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationQualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm temporalDurationQualifier)}]}))
-
-datetimeSubtractionParameters :: Phantoms.TTerm Grammar.DatetimeSubtraction -> Phantoms.TTerm Grammar.DatetimeSubtractionParameters
-datetimeSubtractionParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datetimeSubtractionParametersExpression1 :: Phantoms.TTerm Grammar.DatetimeSubtractionParameters -> Phantoms.TTerm Grammar.DatetimeValueExpression1
-datetimeSubtractionParametersExpression1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-        Core.projectionField = (Core.Name "expression1")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datetimeSubtractionParametersExpression2 :: Phantoms.TTerm Grammar.DatetimeSubtractionParameters -> Phantoms.TTerm Grammar.DatetimeValueExpression2
-datetimeSubtractionParametersExpression2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-        Core.projectionField = (Core.Name "expression2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datetimeSubtractionParametersWithExpression1 :: Phantoms.TTerm Grammar.DatetimeSubtractionParameters -> Phantoms.TTerm Grammar.DatetimeValueExpression1 -> Phantoms.TTerm Grammar.DatetimeSubtractionParameters
-datetimeSubtractionParametersWithExpression1 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression1"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-              Core.projectionField = (Core.Name "expression2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-datetimeSubtractionParametersWithExpression2 :: Phantoms.TTerm Grammar.DatetimeSubtractionParameters -> Phantoms.TTerm Grammar.DatetimeValueExpression2 -> Phantoms.TTerm Grammar.DatetimeSubtractionParameters
-datetimeSubtractionParametersWithExpression2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-              Core.projectionField = (Core.Name "expression1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-datetimeSubtractionParameters_ :: Phantoms.TTerm Grammar.DatetimeValueExpression1 -> Phantoms.TTerm Grammar.DatetimeValueExpression2 -> Phantoms.TTerm Grammar.DatetimeSubtractionParameters
-datetimeSubtractionParameters_ expression1 expression2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DatetimeSubtractionParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression1"),
-          Core.fieldTerm = (Phantoms.unTTerm expression1)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression2"),
-          Core.fieldTerm = (Phantoms.unTTerm expression2)}]}))
-
-datetimeSubtractionTemporalDurationQualifier :: Phantoms.TTerm Grammar.DatetimeSubtraction -> Phantoms.TTerm (Maybe Grammar.TemporalDurationQualifier)
-datetimeSubtractionTemporalDurationQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-        Core.projectionField = (Core.Name "temporalDurationQualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datetimeSubtractionWithParameters :: Phantoms.TTerm Grammar.DatetimeSubtraction -> Phantoms.TTerm Grammar.DatetimeSubtractionParameters -> Phantoms.TTerm Grammar.DatetimeSubtraction
-datetimeSubtractionWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationQualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-              Core.projectionField = (Core.Name "temporalDurationQualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-datetimeSubtractionWithTemporalDurationQualifier :: Phantoms.TTerm Grammar.DatetimeSubtraction -> Phantoms.TTerm (Maybe Grammar.TemporalDurationQualifier) -> Phantoms.TTerm Grammar.DatetimeSubtraction
-datetimeSubtractionWithTemporalDurationQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DatetimeSubtraction"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "temporalDurationQualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-datetimeTypeTimestampWithTimeZone :: Phantoms.TTerm Grammar.TimestampWithTimeZoneType -> Phantoms.TTerm Grammar.DatetimeType
-datetimeTypeTimestampWithTimeZone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timestampWithTimeZone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeTypeZonedDatetime :: Phantoms.TTerm Grammar.ZonedDatetimeType -> Phantoms.TTerm Grammar.DatetimeType
-datetimeTypeZonedDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zonedDatetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeValueFunctionDateFunction :: Phantoms.TTerm Grammar.DateFunction -> Phantoms.TTerm Grammar.DatetimeValueFunction
-datetimeValueFunctionDateFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeValueFunctionDatetimeFunction :: Phantoms.TTerm Grammar.DatetimeFunction -> Phantoms.TTerm Grammar.DatetimeValueFunction
-datetimeValueFunctionDatetimeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetimeFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeValueFunctionLocaldatetimeFunction :: Phantoms.TTerm Grammar.LocaldatetimeFunction -> Phantoms.TTerm Grammar.DatetimeValueFunction
-datetimeValueFunctionLocaldatetimeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localdatetimeFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeValueFunctionLocaltimeFunction :: Phantoms.TTerm Grammar.LocaltimeFunction -> Phantoms.TTerm Grammar.DatetimeValueFunction
-datetimeValueFunctionLocaltimeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localtimeFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeValueFunctionTimeFunction :: Phantoms.TTerm Grammar.TimeFunction -> Phantoms.TTerm Grammar.DatetimeValueFunction
-datetimeValueFunctionTimeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DatetimeValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-deleteStatement :: Phantoms.TTerm (Maybe Grammar.DetachOption) -> Phantoms.TTerm Grammar.DeleteItemList -> Phantoms.TTerm Grammar.DeleteStatement
-deleteStatement detach items =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "detach"),
-          Core.fieldTerm = (Phantoms.unTTerm detach)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)}]}))
-
-deleteStatementDetach :: Phantoms.TTerm Grammar.DeleteStatement -> Phantoms.TTerm (Maybe Grammar.DetachOption)
-deleteStatementDetach x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-        Core.projectionField = (Core.Name "detach")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-deleteStatementItems :: Phantoms.TTerm Grammar.DeleteStatement -> Phantoms.TTerm Grammar.DeleteItemList
-deleteStatementItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-deleteStatementWithDetach :: Phantoms.TTerm Grammar.DeleteStatement -> Phantoms.TTerm (Maybe Grammar.DetachOption) -> Phantoms.TTerm Grammar.DeleteStatement
-deleteStatementWithDetach original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "detach"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-deleteStatementWithItems :: Phantoms.TTerm Grammar.DeleteStatement -> Phantoms.TTerm Grammar.DeleteItemList -> Phantoms.TTerm Grammar.DeleteStatement
-deleteStatementWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "detach"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DeleteStatement"),
-              Core.projectionField = (Core.Name "detach")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dependentValueExpression :: Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.DependentValueExpression
-dependentValueExpression setQuantifier numericValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm setQuantifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericValue"),
-          Core.fieldTerm = (Phantoms.unTTerm numericValue)}]}))
-
-dependentValueExpressionNumericValue :: Phantoms.TTerm Grammar.DependentValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-dependentValueExpressionNumericValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-        Core.projectionField = (Core.Name "numericValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dependentValueExpressionSetQuantifier :: Phantoms.TTerm Grammar.DependentValueExpression -> Phantoms.TTerm (Maybe Grammar.SetQuantifier)
-dependentValueExpressionSetQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-        Core.projectionField = (Core.Name "setQuantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dependentValueExpressionWithNumericValue :: Phantoms.TTerm Grammar.DependentValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.DependentValueExpression
-dependentValueExpressionWithNumericValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-              Core.projectionField = (Core.Name "setQuantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dependentValueExpressionWithSetQuantifier :: Phantoms.TTerm Grammar.DependentValueExpression -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.DependentValueExpression
-dependentValueExpressionWithSetQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DependentValueExpression"),
-              Core.projectionField = (Core.Name "numericValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-destinationNodeTypeReferenceAlias :: Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.DestinationNodeTypeReference
-destinationNodeTypeReferenceAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DestinationNodeTypeReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-destinationNodeTypeReferenceFiller :: Phantoms.TTerm (Maybe Grammar.NodeTypeFiller) -> Phantoms.TTerm Grammar.DestinationNodeTypeReference
-destinationNodeTypeReferenceFiller x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DestinationNodeTypeReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "filler"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-destinationPredicate :: Phantoms.TTerm Grammar.NodeReference -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.EdgeReference -> Phantoms.TTerm Grammar.DestinationPredicate
-destinationPredicate nodeReference not destinationOf =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationOf"),
-          Core.fieldTerm = (Phantoms.unTTerm destinationOf)}]}))
-
-destinationPredicateDestinationOf :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Grammar.EdgeReference
-destinationPredicateDestinationOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-        Core.projectionField = (Core.Name "destinationOf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destinationPredicateNodeReference :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Grammar.NodeReference
-destinationPredicateNodeReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-        Core.projectionField = (Core.Name "nodeReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destinationPredicateNot :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Bool
-destinationPredicateNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-destinationPredicateWithDestinationOf :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Grammar.EdgeReference -> Phantoms.TTerm Grammar.DestinationPredicate
-destinationPredicateWithDestinationOf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-              Core.projectionField = (Core.Name "nodeReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationOf"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-destinationPredicateWithNodeReference :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Grammar.NodeReference -> Phantoms.TTerm Grammar.DestinationPredicate
-destinationPredicateWithNodeReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-              Core.projectionField = (Core.Name "destinationOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-destinationPredicateWithNot :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DestinationPredicate
-destinationPredicateWithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-              Core.projectionField = (Core.Name "nodeReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DestinationPredicate"),
-              Core.projectionField = (Core.Name "destinationOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-detachOptionDetach :: Phantoms.TTerm Grammar.DetachOption
-detachOptionDetach =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DetachOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "detach"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-detachOptionNoDetach :: Phantoms.TTerm Grammar.DetachOption
-detachOptionNoDetach =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DetachOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noDetach"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-directedPredicate :: Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.DirectedPredicatePart2 -> Phantoms.TTerm Grammar.DirectedPredicate
-directedPredicate elementVariableReference directedPart =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Phantoms.unTTerm elementVariableReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "directedPart"),
-          Core.fieldTerm = (Phantoms.unTTerm directedPart)}]}))
-
-directedPredicateDirectedPart :: Phantoms.TTerm Grammar.DirectedPredicate -> Phantoms.TTerm Grammar.DirectedPredicatePart2
-directedPredicateDirectedPart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-        Core.projectionField = (Core.Name "directedPart")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directedPredicateElementVariableReference :: Phantoms.TTerm Grammar.DirectedPredicate -> Phantoms.TTerm Grammar.ElementVariableReference
-directedPredicateElementVariableReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-        Core.projectionField = (Core.Name "elementVariableReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directedPredicatePart2 :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DirectedPredicatePart2
-directedPredicatePart2 not =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DirectedPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)}]}))
-
-directedPredicatePart2Not :: Phantoms.TTerm Grammar.DirectedPredicatePart2 -> Phantoms.TTerm Bool
-directedPredicatePart2Not x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DirectedPredicatePart2"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directedPredicatePart2WithNot :: Phantoms.TTerm Grammar.DirectedPredicatePart2 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DirectedPredicatePart2
-directedPredicatePart2WithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DirectedPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-directedPredicateWithDirectedPart :: Phantoms.TTerm Grammar.DirectedPredicate -> Phantoms.TTerm Grammar.DirectedPredicatePart2 -> Phantoms.TTerm Grammar.DirectedPredicate
-directedPredicateWithDirectedPart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-              Core.projectionField = (Core.Name "elementVariableReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "directedPart"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-directedPredicateWithElementVariableReference :: Phantoms.TTerm Grammar.DirectedPredicate -> Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.DirectedPredicate
-directedPredicateWithElementVariableReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "directedPart"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DirectedPredicate"),
-              Core.projectionField = (Core.Name "directedPart")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjunctionLabelExpression :: Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.DisjunctionLabelExpression
-disjunctionLabelExpression left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-disjunctionLabelExpressionLeft :: Phantoms.TTerm Grammar.DisjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-disjunctionLabelExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjunctionLabelExpressionRight :: Phantoms.TTerm Grammar.DisjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-disjunctionLabelExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjunctionLabelExpressionWithLeft :: Phantoms.TTerm Grammar.DisjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.DisjunctionLabelExpression
-disjunctionLabelExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjunctionLabelExpressionWithRight :: Phantoms.TTerm Grammar.DisjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.DisjunctionLabelExpression
-disjunctionLabelExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctionLabelExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-disjunctiveExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.DisjunctiveOperator -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.DisjunctiveExpr
-disjunctiveExpr left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-disjunctiveExprLeft :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression
-disjunctiveExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjunctiveExprOperator :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.DisjunctiveOperator
-disjunctiveExprOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjunctiveExprRight :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression
-disjunctiveExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjunctiveExprWithLeft :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.DisjunctiveExpr
-disjunctiveExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjunctiveExprWithOperator :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.DisjunctiveOperator -> Phantoms.TTerm Grammar.DisjunctiveExpr
-disjunctiveExprWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjunctiveExprWithRight :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.DisjunctiveExpr
-disjunctiveExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DisjunctiveExpr"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-disjunctiveOperatorOr :: Phantoms.TTerm Grammar.DisjunctiveOperator
-disjunctiveOperatorOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DisjunctiveOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-disjunctiveOperatorXor :: Phantoms.TTerm Grammar.DisjunctiveOperator
-disjunctiveOperatorXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DisjunctiveOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-doubleTypeWithPrecision :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DoubleTypeWithPrecision
-doubleTypeWithPrecision precision notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-doubleTypeWithPrecisionNotNull :: Phantoms.TTerm Grammar.DoubleTypeWithPrecision -> Phantoms.TTerm Bool
-doubleTypeWithPrecisionNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doubleTypeWithPrecisionPrecision :: Phantoms.TTerm Grammar.DoubleTypeWithPrecision -> Phantoms.TTerm Bool
-doubleTypeWithPrecisionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doubleTypeWithPrecisionWithNotNull :: Phantoms.TTerm Grammar.DoubleTypeWithPrecision -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DoubleTypeWithPrecision
-doubleTypeWithPrecisionWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-doubleTypeWithPrecisionWithPrecision :: Phantoms.TTerm Grammar.DoubleTypeWithPrecision -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DoubleTypeWithPrecision
-doubleTypeWithPrecisionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DoubleTypeWithPrecision"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dropGraphStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm Grammar.DropGraphStatement
-dropGraphStatement ifExists parentAndName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Phantoms.unTTerm ifExists)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm parentAndName)}]}))
-
-dropGraphStatementIfExists :: Phantoms.TTerm Grammar.DropGraphStatement -> Phantoms.TTerm Bool
-dropGraphStatementIfExists x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-        Core.projectionField = (Core.Name "ifExists")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dropGraphStatementParentAndName :: Phantoms.TTerm Grammar.DropGraphStatement -> Phantoms.TTerm Grammar.CatalogGraphParentAndName
-dropGraphStatementParentAndName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-        Core.projectionField = (Core.Name "parentAndName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dropGraphStatementWithIfExists :: Phantoms.TTerm Grammar.DropGraphStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DropGraphStatement
-dropGraphStatementWithIfExists original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dropGraphStatementWithParentAndName :: Phantoms.TTerm Grammar.DropGraphStatement -> Phantoms.TTerm Grammar.CatalogGraphParentAndName -> Phantoms.TTerm Grammar.DropGraphStatement
-dropGraphStatementWithParentAndName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphStatement"),
-              Core.projectionField = (Core.Name "ifExists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dropGraphTypeStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.DropGraphTypeStatement
-dropGraphTypeStatement ifExists parentAndName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Phantoms.unTTerm ifExists)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm parentAndName)}]}))
-
-dropGraphTypeStatementIfExists :: Phantoms.TTerm Grammar.DropGraphTypeStatement -> Phantoms.TTerm Bool
-dropGraphTypeStatementIfExists x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-        Core.projectionField = (Core.Name "ifExists")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dropGraphTypeStatementParentAndName :: Phantoms.TTerm Grammar.DropGraphTypeStatement -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName
-dropGraphTypeStatementParentAndName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-        Core.projectionField = (Core.Name "parentAndName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dropGraphTypeStatementWithIfExists :: Phantoms.TTerm Grammar.DropGraphTypeStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DropGraphTypeStatement
-dropGraphTypeStatementWithIfExists original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dropGraphTypeStatementWithParentAndName :: Phantoms.TTerm Grammar.DropGraphTypeStatement -> Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.DropGraphTypeStatement
-dropGraphTypeStatementWithParentAndName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DropGraphTypeStatement"),
-              Core.projectionField = (Core.Name "ifExists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dropSchemaStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.CatalogSchemaParentAndName -> Phantoms.TTerm Grammar.DropSchemaStatement
-dropSchemaStatement ifExists parentAndName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Phantoms.unTTerm ifExists)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm parentAndName)}]}))
-
-dropSchemaStatementIfExists :: Phantoms.TTerm Grammar.DropSchemaStatement -> Phantoms.TTerm Bool
-dropSchemaStatementIfExists x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-        Core.projectionField = (Core.Name "ifExists")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dropSchemaStatementParentAndName :: Phantoms.TTerm Grammar.DropSchemaStatement -> Phantoms.TTerm Grammar.CatalogSchemaParentAndName
-dropSchemaStatementParentAndName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-        Core.projectionField = (Core.Name "parentAndName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dropSchemaStatementWithIfExists :: Phantoms.TTerm Grammar.DropSchemaStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DropSchemaStatement
-dropSchemaStatementWithIfExists original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-              Core.projectionField = (Core.Name "parentAndName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dropSchemaStatementWithParentAndName :: Phantoms.TTerm Grammar.DropSchemaStatement -> Phantoms.TTerm Grammar.CatalogSchemaParentAndName -> Phantoms.TTerm Grammar.DropSchemaStatement
-dropSchemaStatementWithParentAndName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifExists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DropSchemaStatement"),
-              Core.projectionField = (Core.Name "ifExists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parentAndName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-durationFunctionParametersDurationString :: Phantoms.TTerm Grammar.DurationString -> Phantoms.TTerm Grammar.DurationFunctionParameters
-durationFunctionParametersDurationString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DurationFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "durationString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-durationFunctionParametersRecordConstructor :: Phantoms.TTerm Grammar.RecordConstructor -> Phantoms.TTerm Grammar.DurationFunctionParameters
-durationFunctionParametersRecordConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DurationFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-durationValueFunctionAbsoluteValue :: Phantoms.TTerm Grammar.AbsoluteValueExpression -> Phantoms.TTerm Grammar.DurationValueFunction
-durationValueFunctionAbsoluteValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DurationValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "absoluteValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-durationValueFunctionDurationFunction :: Phantoms.TTerm Grammar.DurationFunction -> Phantoms.TTerm Grammar.DurationValueFunction
-durationValueFunctionDurationFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.DurationValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "durationFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dynamicPropertyValueType :: Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm () -> Phantoms.TTerm () -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DynamicPropertyValueType
-dynamicPropertyValueType any property value notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-dynamicPropertyValueTypeAny :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm (Maybe Bool)
-dynamicPropertyValueTypeAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dynamicPropertyValueTypeNotNull :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm Bool
-dynamicPropertyValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dynamicPropertyValueTypeProperty :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm ()
-dynamicPropertyValueTypeProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dynamicPropertyValueTypeValue :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm ()
-dynamicPropertyValueTypeValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dynamicPropertyValueTypeWithAny :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Grammar.DynamicPropertyValueType
-dynamicPropertyValueTypeWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dynamicPropertyValueTypeWithNotNull :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.DynamicPropertyValueType
-dynamicPropertyValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dynamicPropertyValueTypeWithProperty :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm () -> Phantoms.TTerm Grammar.DynamicPropertyValueType
-dynamicPropertyValueTypeWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dynamicPropertyValueTypeWithValue :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm () -> Phantoms.TTerm Grammar.DynamicPropertyValueType
-dynamicPropertyValueTypeWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.DynamicPropertyValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeBindingsOrEdgesEdgeBindings :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.EdgeBindingsOrEdges
-edgeBindingsOrEdgesEdgeBindings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeBindingsOrEdges"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edgeBindings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeBindingsOrEdgesEdges :: Phantoms.TTerm Grammar.EdgeBindingsOrEdges
-edgeBindingsOrEdgesEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeBindingsOrEdges"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeKeyLabelSetWithContent :: Phantoms.TTerm Grammar.EdgeTypeKeyLabelSet -> Phantoms.TTerm (Maybe Grammar.EdgeTypeImpliedContent) -> Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent
-edgeKeyLabelSetWithContent keyLabelSet impliedContent =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyLabelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm keyLabelSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "impliedContent"),
-          Core.fieldTerm = (Phantoms.unTTerm impliedContent)}]}))
-
-edgeKeyLabelSetWithContentImpliedContent :: Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent -> Phantoms.TTerm (Maybe Grammar.EdgeTypeImpliedContent)
-edgeKeyLabelSetWithContentImpliedContent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-        Core.projectionField = (Core.Name "impliedContent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeKeyLabelSetWithContentKeyLabelSet :: Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent -> Phantoms.TTerm Grammar.EdgeTypeKeyLabelSet
-edgeKeyLabelSetWithContentKeyLabelSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-        Core.projectionField = (Core.Name "keyLabelSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeKeyLabelSetWithContentWithImpliedContent :: Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent -> Phantoms.TTerm (Maybe Grammar.EdgeTypeImpliedContent) -> Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent
-edgeKeyLabelSetWithContentWithImpliedContent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyLabelSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-              Core.projectionField = (Core.Name "keyLabelSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "impliedContent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeKeyLabelSetWithContentWithKeyLabelSet :: Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent -> Phantoms.TTerm Grammar.EdgeTypeKeyLabelSet -> Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent
-edgeKeyLabelSetWithContentWithKeyLabelSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyLabelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "impliedContent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"),
-              Core.projectionField = (Core.Name "impliedContent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeKindAndSynonym :: Phantoms.TTerm (Maybe Grammar.EdgeKind) -> Phantoms.TTerm Grammar.EdgeSynonym -> Phantoms.TTerm (Maybe Grammar.EdgeTypeName) -> Phantoms.TTerm Grammar.EdgeKindAndSynonym
-edgeKindAndSynonym kind synonym typeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm synonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))
-
-edgeKindAndSynonymKind :: Phantoms.TTerm Grammar.EdgeKindAndSynonym -> Phantoms.TTerm (Maybe Grammar.EdgeKind)
-edgeKindAndSynonymKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeKindAndSynonymSynonym :: Phantoms.TTerm Grammar.EdgeKindAndSynonym -> Phantoms.TTerm Grammar.EdgeSynonym
-edgeKindAndSynonymSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-        Core.projectionField = (Core.Name "synonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeKindAndSynonymTypeName :: Phantoms.TTerm Grammar.EdgeKindAndSynonym -> Phantoms.TTerm (Maybe Grammar.EdgeTypeName)
-edgeKindAndSynonymTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeKindAndSynonymWithKind :: Phantoms.TTerm Grammar.EdgeKindAndSynonym -> Phantoms.TTerm (Maybe Grammar.EdgeKind) -> Phantoms.TTerm Grammar.EdgeKindAndSynonym
-edgeKindAndSynonymWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeKindAndSynonymWithSynonym :: Phantoms.TTerm Grammar.EdgeKindAndSynonym -> Phantoms.TTerm Grammar.EdgeSynonym -> Phantoms.TTerm Grammar.EdgeKindAndSynonym
-edgeKindAndSynonymWithSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeKindAndSynonymWithTypeName :: Phantoms.TTerm Grammar.EdgeKindAndSynonym -> Phantoms.TTerm (Maybe Grammar.EdgeTypeName) -> Phantoms.TTerm Grammar.EdgeKindAndSynonym
-edgeKindAndSynonymWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeKindAndSynonym"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeKindDirected :: Phantoms.TTerm Grammar.EdgeKind
-edgeKindDirected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeKindUndirected :: Phantoms.TTerm Grammar.EdgeKind
-edgeKindUndirected =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirected"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeLabelSetWithProperties :: Phantoms.TTerm Grammar.EdgeTypeLabelSet -> Phantoms.TTerm Grammar.EdgeTypePropertyTypes -> Phantoms.TTerm Grammar.EdgeLabelSetWithProperties
-edgeLabelSetWithProperties labelSet propertyTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm labelSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyTypes)}]}))
-
-edgeLabelSetWithPropertiesLabelSet :: Phantoms.TTerm Grammar.EdgeLabelSetWithProperties -> Phantoms.TTerm Grammar.EdgeTypeLabelSet
-edgeLabelSetWithPropertiesLabelSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-        Core.projectionField = (Core.Name "labelSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeLabelSetWithPropertiesPropertyTypes :: Phantoms.TTerm Grammar.EdgeLabelSetWithProperties -> Phantoms.TTerm Grammar.EdgeTypePropertyTypes
-edgeLabelSetWithPropertiesPropertyTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-        Core.projectionField = (Core.Name "propertyTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeLabelSetWithPropertiesWithLabelSet :: Phantoms.TTerm Grammar.EdgeLabelSetWithProperties -> Phantoms.TTerm Grammar.EdgeTypeLabelSet -> Phantoms.TTerm Grammar.EdgeLabelSetWithProperties
-edgeLabelSetWithPropertiesWithLabelSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeLabelSetWithPropertiesWithPropertyTypes :: Phantoms.TTerm Grammar.EdgeLabelSetWithProperties -> Phantoms.TTerm Grammar.EdgeTypePropertyTypes -> Phantoms.TTerm Grammar.EdgeLabelSetWithProperties
-edgeLabelSetWithPropertiesWithPropertyTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeLabelSetWithProperties"),
-              Core.projectionField = (Core.Name "labelSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgePatternAbbreviatedEdge :: Phantoms.TTerm Grammar.AbbreviatedEdgePattern -> Phantoms.TTerm Grammar.EdgePattern
-edgePatternAbbreviatedEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abbreviatedEdge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgePatternFullEdge :: Phantoms.TTerm Grammar.FullEdgePattern -> Phantoms.TTerm Grammar.EdgePattern
-edgePatternFullEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fullEdge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeReferenceValueTypeClosed :: Phantoms.TTerm Grammar.ClosedEdgeReferenceValueType -> Phantoms.TTerm Grammar.EdgeReferenceValueType
-edgeReferenceValueTypeClosed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeReferenceValueTypeOpen :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Grammar.EdgeReferenceValueType
-edgeReferenceValueTypeOpen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "open"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeSynonymEdge :: Phantoms.TTerm Grammar.EdgeSynonym
-edgeSynonymEdge =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeSynonymRelationship :: Phantoms.TTerm Grammar.EdgeSynonym
-edgeSynonymRelationship =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "relationship"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeTypeFillerImpliedContent :: Phantoms.TTerm Grammar.EdgeTypeImpliedContent -> Phantoms.TTerm Grammar.EdgeTypeFiller
-edgeTypeFillerImpliedContent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "impliedContent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypeFillerKeyLabelSetWithContent :: Phantoms.TTerm Grammar.EdgeKeyLabelSetWithContent -> Phantoms.TTerm Grammar.EdgeTypeFiller
-edgeTypeFillerKeyLabelSetWithContent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keyLabelSetWithContent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypeImpliedContentLabelSet :: Phantoms.TTerm Grammar.EdgeTypeLabelSet -> Phantoms.TTerm Grammar.EdgeTypeImpliedContent
-edgeTypeImpliedContentLabelSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeImpliedContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labelSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypeImpliedContentLabelSetWithProperties :: Phantoms.TTerm Grammar.EdgeLabelSetWithProperties -> Phantoms.TTerm Grammar.EdgeTypeImpliedContent
-edgeTypeImpliedContentLabelSetWithProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeImpliedContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labelSetWithProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypeImpliedContentPropertyTypes :: Phantoms.TTerm Grammar.EdgeTypePropertyTypes -> Phantoms.TTerm Grammar.EdgeTypeImpliedContent
-edgeTypeImpliedContentPropertyTypes x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeImpliedContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyTypes"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypeNameWithFiller :: Phantoms.TTerm Grammar.EdgeTypeName -> Phantoms.TTerm (Maybe Grammar.EdgeTypeFiller) -> Phantoms.TTerm Grammar.EdgeTypeNameWithFiller
-edgeTypeNameWithFiller typeName filler =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Phantoms.unTTerm filler)}]}))
-
-edgeTypeNameWithFillerFiller :: Phantoms.TTerm Grammar.EdgeTypeNameWithFiller -> Phantoms.TTerm (Maybe Grammar.EdgeTypeFiller)
-edgeTypeNameWithFillerFiller x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-        Core.projectionField = (Core.Name "filler")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeNameWithFillerTypeName :: Phantoms.TTerm Grammar.EdgeTypeNameWithFiller -> Phantoms.TTerm Grammar.EdgeTypeName
-edgeTypeNameWithFillerTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeNameWithFillerWithFiller :: Phantoms.TTerm Grammar.EdgeTypeNameWithFiller -> Phantoms.TTerm (Maybe Grammar.EdgeTypeFiller) -> Phantoms.TTerm Grammar.EdgeTypeNameWithFiller
-edgeTypeNameWithFillerWithFiller original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeTypeNameWithFillerWithTypeName :: Phantoms.TTerm Grammar.EdgeTypeNameWithFiller -> Phantoms.TTerm Grammar.EdgeTypeName -> Phantoms.TTerm Grammar.EdgeTypeNameWithFiller
-edgeTypeNameWithFillerWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypeNameWithFiller"),
-              Core.projectionField = (Core.Name "filler")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePattern :: Phantoms.TTerm (Maybe Grammar.EdgeKindAndSynonym) -> Phantoms.TTerm Grammar.EdgeTypePatternType -> Phantoms.TTerm Grammar.EdgeTypePattern
-edgeTypePattern kindAndSynonym patternType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kindAndSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm kindAndSynonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternType"),
-          Core.fieldTerm = (Phantoms.unTTerm patternType)}]}))
-
-edgeTypePatternDirectedPointingLeft :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.EdgeTypePatternDirected
-edgeTypePatternDirectedPointingLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternDirected"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingLeft"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypePatternDirectedPointingRight :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.EdgeTypePatternDirected
-edgeTypePatternDirectedPointingRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternDirected"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypePatternKindAndSynonym :: Phantoms.TTerm Grammar.EdgeTypePattern -> Phantoms.TTerm (Maybe Grammar.EdgeKindAndSynonym)
-edgeTypePatternKindAndSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-        Core.projectionField = (Core.Name "kindAndSynonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPatternType :: Phantoms.TTerm Grammar.EdgeTypePattern -> Phantoms.TTerm Grammar.EdgeTypePatternType
-edgeTypePatternPatternType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-        Core.projectionField = (Core.Name "patternType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingLeft :: Phantoms.TTerm Grammar.DestinationNodeTypeReference -> Phantoms.TTerm Grammar.ArcTypePointingLeft -> Phantoms.TTerm Grammar.SourceNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft
-edgeTypePatternPointingLeft destination arc source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Phantoms.unTTerm destination)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Phantoms.unTTerm arc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-edgeTypePatternPointingLeftArc :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.ArcTypePointingLeft
-edgeTypePatternPointingLeftArc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-        Core.projectionField = (Core.Name "arc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingLeftDestination :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.DestinationNodeTypeReference
-edgeTypePatternPointingLeftDestination x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-        Core.projectionField = (Core.Name "destination")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingLeftSource :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.SourceNodeTypeReference
-edgeTypePatternPointingLeftSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingLeftWithArc :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.ArcTypePointingLeft -> Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft
-edgeTypePatternPointingLeftWithArc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-              Core.projectionField = (Core.Name "destination")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternPointingLeftWithDestination :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.DestinationNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft
-edgeTypePatternPointingLeftWithDestination original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-              Core.projectionField = (Core.Name "arc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternPointingLeftWithSource :: Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft -> Phantoms.TTerm Grammar.SourceNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternPointingLeft
-edgeTypePatternPointingLeftWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-              Core.projectionField = (Core.Name "destination")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"),
-              Core.projectionField = (Core.Name "arc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeTypePatternPointingRight :: Phantoms.TTerm Grammar.SourceNodeTypeReference -> Phantoms.TTerm Grammar.ArcTypePointingRight -> Phantoms.TTerm Grammar.DestinationNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternPointingRight
-edgeTypePatternPointingRight source arc destination =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Phantoms.unTTerm arc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Phantoms.unTTerm destination)}]}))
-
-edgeTypePatternPointingRightArc :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.ArcTypePointingRight
-edgeTypePatternPointingRightArc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-        Core.projectionField = (Core.Name "arc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingRightDestination :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.DestinationNodeTypeReference
-edgeTypePatternPointingRightDestination x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-        Core.projectionField = (Core.Name "destination")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingRightSource :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.SourceNodeTypeReference
-edgeTypePatternPointingRightSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternPointingRightWithArc :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.ArcTypePointingRight -> Phantoms.TTerm Grammar.EdgeTypePatternPointingRight
-edgeTypePatternPointingRightWithArc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-              Core.projectionField = (Core.Name "destination")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternPointingRightWithDestination :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.DestinationNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternPointingRight
-edgeTypePatternPointingRightWithDestination original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-              Core.projectionField = (Core.Name "arc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeTypePatternPointingRightWithSource :: Phantoms.TTerm Grammar.EdgeTypePatternPointingRight -> Phantoms.TTerm Grammar.SourceNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternPointingRight
-edgeTypePatternPointingRightWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-              Core.projectionField = (Core.Name "arc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternPointingRight"),
-              Core.projectionField = (Core.Name "destination")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternTypeDirected :: Phantoms.TTerm Grammar.EdgeTypePatternDirected -> Phantoms.TTerm Grammar.EdgeTypePatternType
-edgeTypePatternTypeDirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypePatternTypeUndirected :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.EdgeTypePatternType
-edgeTypePatternTypeUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypePatternUndirected :: Phantoms.TTerm Grammar.SourceNodeTypeReference -> Phantoms.TTerm Grammar.ArcTypeUndirected -> Phantoms.TTerm Grammar.DestinationNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternUndirected
-edgeTypePatternUndirected source arc destination =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Phantoms.unTTerm arc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Phantoms.unTTerm destination)}]}))
-
-edgeTypePatternUndirectedArc :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.ArcTypeUndirected
-edgeTypePatternUndirectedArc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-        Core.projectionField = (Core.Name "arc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternUndirectedDestination :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.DestinationNodeTypeReference
-edgeTypePatternUndirectedDestination x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-        Core.projectionField = (Core.Name "destination")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternUndirectedSource :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.SourceNodeTypeReference
-edgeTypePatternUndirectedSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePatternUndirectedWithArc :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.ArcTypeUndirected -> Phantoms.TTerm Grammar.EdgeTypePatternUndirected
-edgeTypePatternUndirectedWithArc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-              Core.projectionField = (Core.Name "destination")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternUndirectedWithDestination :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.DestinationNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternUndirected
-edgeTypePatternUndirectedWithDestination original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-              Core.projectionField = (Core.Name "arc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeTypePatternUndirectedWithSource :: Phantoms.TTerm Grammar.EdgeTypePatternUndirected -> Phantoms.TTerm Grammar.SourceNodeTypeReference -> Phantoms.TTerm Grammar.EdgeTypePatternUndirected
-edgeTypePatternUndirectedWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-              Core.projectionField = (Core.Name "arc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destination"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePatternUndirected"),
-              Core.projectionField = (Core.Name "destination")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternWithKindAndSynonym :: Phantoms.TTerm Grammar.EdgeTypePattern -> Phantoms.TTerm (Maybe Grammar.EdgeKindAndSynonym) -> Phantoms.TTerm Grammar.EdgeTypePattern
-edgeTypePatternWithKindAndSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kindAndSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-              Core.projectionField = (Core.Name "patternType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePatternWithPatternType :: Phantoms.TTerm Grammar.EdgeTypePattern -> Phantoms.TTerm Grammar.EdgeTypePatternType -> Phantoms.TTerm Grammar.EdgeTypePattern
-edgeTypePatternWithPatternType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kindAndSynonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePattern"),
-              Core.projectionField = (Core.Name "kindAndSynonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patternType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeTypePhrase :: Phantoms.TTerm Grammar.EdgeKind -> Phantoms.TTerm Grammar.EdgeSynonym -> Phantoms.TTerm Grammar.EdgeTypePhraseFiller -> Phantoms.TTerm Grammar.EndpointPairPhrase -> Phantoms.TTerm Grammar.EdgeTypePhrase
-edgeTypePhrase kind synonym typeNameAndFiller endpointPair =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm kind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm synonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeNameAndFiller"),
-          Core.fieldTerm = (Phantoms.unTTerm typeNameAndFiller)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endpointPair"),
-          Core.fieldTerm = (Phantoms.unTTerm endpointPair)}]}))
-
-edgeTypePhraseEndpointPair :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EndpointPairPhrase
-edgeTypePhraseEndpointPair x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-        Core.projectionField = (Core.Name "endpointPair")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePhraseFillerFillerOnly :: Phantoms.TTerm Grammar.EdgeTypeFiller -> Phantoms.TTerm Grammar.EdgeTypePhraseFiller
-edgeTypePhraseFillerFillerOnly x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhraseFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fillerOnly"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypePhraseFillerTypeNameWithFiller :: Phantoms.TTerm Grammar.EdgeTypeNameWithFiller -> Phantoms.TTerm Grammar.EdgeTypePhraseFiller
-edgeTypePhraseFillerTypeNameWithFiller x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhraseFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeNameWithFiller"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypePhraseKind :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeKind
-edgeTypePhraseKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-        Core.projectionField = (Core.Name "kind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePhraseSynonym :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeSynonym
-edgeTypePhraseSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-        Core.projectionField = (Core.Name "synonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePhraseTypeNameAndFiller :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeTypePhraseFiller
-edgeTypePhraseTypeNameAndFiller x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-        Core.projectionField = (Core.Name "typeNameAndFiller")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypePhraseWithEndpointPair :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EndpointPairPhrase -> Phantoms.TTerm Grammar.EdgeTypePhrase
-edgeTypePhraseWithEndpointPair original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeNameAndFiller"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "typeNameAndFiller")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endpointPair"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeTypePhraseWithKind :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeKind -> Phantoms.TTerm Grammar.EdgeTypePhrase
-edgeTypePhraseWithKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeNameAndFiller"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "typeNameAndFiller")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endpointPair"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "endpointPair")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePhraseWithSynonym :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeSynonym -> Phantoms.TTerm Grammar.EdgeTypePhrase
-edgeTypePhraseWithSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeNameAndFiller"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "typeNameAndFiller")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "endpointPair"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "endpointPair")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypePhraseWithTypeNameAndFiller :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeTypePhraseFiller -> Phantoms.TTerm Grammar.EdgeTypePhrase
-edgeTypePhraseWithTypeNameAndFiller original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "kind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeNameAndFiller"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "endpointPair"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EdgeTypePhrase"),
-              Core.projectionField = (Core.Name "endpointPair")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypeSpecificationPattern :: Phantoms.TTerm Grammar.EdgeTypePattern -> Phantoms.TTerm Grammar.EdgeTypeSpecification
-edgeTypeSpecificationPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgeTypeSpecificationPhrase :: Phantoms.TTerm Grammar.EdgeTypePhrase -> Phantoms.TTerm Grammar.EdgeTypeSpecification
-edgeTypeSpecificationPhrase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgeTypeSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "phrase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-edgesSynonymEdges :: Phantoms.TTerm Grammar.EdgesSynonym
-edgesSynonymEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgesSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgesSynonymRelationships :: Phantoms.TTerm Grammar.EdgesSynonym
-edgesSynonymRelationships =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EdgesSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "relationships"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-elementBindingsOrElementsElementBindings :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ElementBindingsOrElements
-elementBindingsOrElementsElementBindings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementBindingsOrElements"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementBindings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementBindingsOrElementsElements :: Phantoms.TTerm Grammar.ElementBindingsOrElements
-elementBindingsOrElementsElements =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementBindingsOrElements"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elements"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-elementPatternEdge :: Phantoms.TTerm Grammar.EdgePattern -> Phantoms.TTerm Grammar.ElementPattern
-elementPatternEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementPatternFiller :: Phantoms.TTerm (Maybe Grammar.ElementVariableDeclaration) -> Phantoms.TTerm (Maybe Grammar.IsLabelExpression) -> Phantoms.TTerm (Maybe Grammar.ElementPatternPredicate) -> Phantoms.TTerm Grammar.ElementPatternFiller
-elementPatternFiller variableDeclaration isLabelExpression predicate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm variableDeclaration)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabelExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm isLabelExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)}]}))
-
-elementPatternFillerIsLabelExpression :: Phantoms.TTerm Grammar.ElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.IsLabelExpression)
-elementPatternFillerIsLabelExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-        Core.projectionField = (Core.Name "isLabelExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementPatternFillerPredicate :: Phantoms.TTerm Grammar.ElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.ElementPatternPredicate)
-elementPatternFillerPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementPatternFillerVariableDeclaration :: Phantoms.TTerm Grammar.ElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.ElementVariableDeclaration)
-elementPatternFillerVariableDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-        Core.projectionField = (Core.Name "variableDeclaration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementPatternFillerWithIsLabelExpression :: Phantoms.TTerm Grammar.ElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.IsLabelExpression) -> Phantoms.TTerm Grammar.ElementPatternFiller
-elementPatternFillerWithIsLabelExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-              Core.projectionField = (Core.Name "variableDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabelExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementPatternFillerWithPredicate :: Phantoms.TTerm Grammar.ElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.ElementPatternPredicate) -> Phantoms.TTerm Grammar.ElementPatternFiller
-elementPatternFillerWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-              Core.projectionField = (Core.Name "variableDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabelExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-              Core.projectionField = (Core.Name "isLabelExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementPatternFillerWithVariableDeclaration :: Phantoms.TTerm Grammar.ElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.ElementVariableDeclaration) -> Phantoms.TTerm Grammar.ElementPatternFiller
-elementPatternFillerWithVariableDeclaration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabelExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-              Core.projectionField = (Core.Name "isLabelExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementPatternFiller"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementPatternNode :: Phantoms.TTerm Grammar.NodePattern -> Phantoms.TTerm Grammar.ElementPattern
-elementPatternNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementPatternPredicatePropertySpecification :: Phantoms.TTerm Grammar.ElementPropertySpecification -> Phantoms.TTerm Grammar.ElementPatternPredicate
-elementPatternPredicatePropertySpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementPatternPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertySpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementPatternPredicateWhereClause :: Phantoms.TTerm Grammar.ElementPatternWhereClause -> Phantoms.TTerm Grammar.ElementPatternPredicate
-elementPatternPredicateWhereClause x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementPatternPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "whereClause"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementTypeSpecificationEdgeType :: Phantoms.TTerm Grammar.EdgeTypeSpecification -> Phantoms.TTerm Grammar.ElementTypeSpecification
-elementTypeSpecificationEdgeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementTypeSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edgeType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementTypeSpecificationNodeType :: Phantoms.TTerm Grammar.NodeTypeSpecification -> Phantoms.TTerm Grammar.ElementTypeSpecification
-elementTypeSpecificationNodeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ElementTypeSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nodeType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementVariableDeclaration :: Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Grammar.ElementVariable -> Phantoms.TTerm Grammar.ElementVariableDeclaration
-elementVariableDeclaration temp variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "temp"),
-          Core.fieldTerm = (Phantoms.unTTerm temp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-elementVariableDeclarationTemp :: Phantoms.TTerm Grammar.ElementVariableDeclaration -> Phantoms.TTerm (Maybe Bool)
-elementVariableDeclarationTemp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-        Core.projectionField = (Core.Name "temp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementVariableDeclarationVariable :: Phantoms.TTerm Grammar.ElementVariableDeclaration -> Phantoms.TTerm Grammar.ElementVariable
-elementVariableDeclarationVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementVariableDeclarationWithTemp :: Phantoms.TTerm Grammar.ElementVariableDeclaration -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Grammar.ElementVariableDeclaration
-elementVariableDeclarationWithTemp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "temp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementVariableDeclarationWithVariable :: Phantoms.TTerm Grammar.ElementVariableDeclaration -> Phantoms.TTerm Grammar.ElementVariable -> Phantoms.TTerm Grammar.ElementVariableDeclaration
-elementVariableDeclarationWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "temp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ElementVariableDeclaration"),
-              Core.projectionField = (Core.Name "temp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-endTransactionCommandCommit :: Phantoms.TTerm Grammar.CommitCommand -> Phantoms.TTerm Grammar.EndTransactionCommand
-endTransactionCommandCommit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EndTransactionCommand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-endTransactionCommandRollback :: Phantoms.TTerm Grammar.RollbackCommand -> Phantoms.TTerm Grammar.EndTransactionCommand
-endTransactionCommandRollback x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EndTransactionCommand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rollback"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-endpointPairDirectedPair :: Phantoms.TTerm Grammar.EndpointPairDirected -> Phantoms.TTerm Grammar.EndpointPair
-endpointPairDirectedPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EndpointPair"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directedPair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-endpointPairDirectedPointingLeft :: Phantoms.TTerm Grammar.EndpointPairPointingLeft -> Phantoms.TTerm Grammar.EndpointPairDirected
-endpointPairDirectedPointingLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EndpointPairDirected"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingLeft"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-endpointPairDirectedPointingRight :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.EndpointPairDirected
-endpointPairDirectedPointingRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EndpointPairDirected"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-endpointPairPointingLeft :: Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairPointingLeft
-endpointPairPointingLeft destinationAlias sourceAlias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm destinationAlias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm sourceAlias)}]}))
-
-endpointPairPointingLeftDestinationAlias :: Phantoms.TTerm Grammar.EndpointPairPointingLeft -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias
-endpointPairPointingLeftDestinationAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-        Core.projectionField = (Core.Name "destinationAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairPointingLeftSourceAlias :: Phantoms.TTerm Grammar.EndpointPairPointingLeft -> Phantoms.TTerm Grammar.SourceNodeTypeAlias
-endpointPairPointingLeftSourceAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-        Core.projectionField = (Core.Name "sourceAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairPointingLeftWithDestinationAlias :: Phantoms.TTerm Grammar.EndpointPairPointingLeft -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairPointingLeft
-endpointPairPointingLeftWithDestinationAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-              Core.projectionField = (Core.Name "sourceAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-endpointPairPointingLeftWithSourceAlias :: Phantoms.TTerm Grammar.EndpointPairPointingLeft -> Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairPointingLeft
-endpointPairPointingLeftWithSourceAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingLeft"),
-              Core.projectionField = (Core.Name "destinationAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-endpointPairPointingRight :: Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.ConnectorPointingRight -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairPointingRight
-endpointPairPointingRight sourceAlias connector destinationAlias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm sourceAlias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Phantoms.unTTerm connector)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm destinationAlias)}]}))
-
-endpointPairPointingRightConnector :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.ConnectorPointingRight
-endpointPairPointingRightConnector x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-        Core.projectionField = (Core.Name "connector")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairPointingRightDestinationAlias :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias
-endpointPairPointingRightDestinationAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-        Core.projectionField = (Core.Name "destinationAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairPointingRightSourceAlias :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.SourceNodeTypeAlias
-endpointPairPointingRightSourceAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-        Core.projectionField = (Core.Name "sourceAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairPointingRightWithConnector :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.ConnectorPointingRight -> Phantoms.TTerm Grammar.EndpointPairPointingRight
-endpointPairPointingRightWithConnector original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-              Core.projectionField = (Core.Name "sourceAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-              Core.projectionField = (Core.Name "destinationAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-endpointPairPointingRightWithDestinationAlias :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairPointingRight
-endpointPairPointingRightWithDestinationAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-              Core.projectionField = (Core.Name "sourceAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-              Core.projectionField = (Core.Name "connector")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-endpointPairPointingRightWithSourceAlias :: Phantoms.TTerm Grammar.EndpointPairPointingRight -> Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairPointingRight
-endpointPairPointingRightWithSourceAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-              Core.projectionField = (Core.Name "connector")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairPointingRight"),
-              Core.projectionField = (Core.Name "destinationAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-endpointPairUndirected :: Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.ConnectorUndirected -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairUndirected
-endpointPairUndirected sourceAlias connector destinationAlias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm sourceAlias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Phantoms.unTTerm connector)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm destinationAlias)}]}))
-
-endpointPairUndirectedConnector :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.ConnectorUndirected
-endpointPairUndirectedConnector x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-        Core.projectionField = (Core.Name "connector")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairUndirectedDestinationAlias :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias
-endpointPairUndirectedDestinationAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-        Core.projectionField = (Core.Name "destinationAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairUndirectedPair :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.EndpointPair
-endpointPairUndirectedPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.EndpointPair"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirectedPair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-endpointPairUndirectedSourceAlias :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.SourceNodeTypeAlias
-endpointPairUndirectedSourceAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-        Core.projectionField = (Core.Name "sourceAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-endpointPairUndirectedWithConnector :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.ConnectorUndirected -> Phantoms.TTerm Grammar.EndpointPairUndirected
-endpointPairUndirectedWithConnector original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-              Core.projectionField = (Core.Name "sourceAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-              Core.projectionField = (Core.Name "destinationAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-endpointPairUndirectedWithDestinationAlias :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.DestinationNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairUndirected
-endpointPairUndirectedWithDestinationAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-              Core.projectionField = (Core.Name "sourceAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-              Core.projectionField = (Core.Name "connector")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-endpointPairUndirectedWithSourceAlias :: Phantoms.TTerm Grammar.EndpointPairUndirected -> Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.EndpointPairUndirected
-endpointPairUndirectedWithSourceAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "connector"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-              Core.projectionField = (Core.Name "connector")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destinationAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.EndpointPairUndirected"),
-              Core.projectionField = (Core.Name "destinationAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exactNumericLiteralCommonWithSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ExactNumericLiteral
-exactNumericLiteralCommonWithSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commonWithSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericLiteralCommonWithoutSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ExactNumericLiteral
-exactNumericLiteralCommonWithoutSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commonWithoutSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericLiteralIntegerWithSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ExactNumericLiteral
-exactNumericLiteralIntegerWithSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integerWithSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericLiteralScientificWithSuffix :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.ExactNumericLiteral
-exactNumericLiteralScientificWithSuffix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scientificWithSuffix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericLiteralUnsignedInteger :: Phantoms.TTerm Grammar.UnsignedInteger -> Phantoms.TTerm Grammar.ExactNumericLiteral
-exactNumericLiteralUnsignedInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedInteger"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericTypeBinary :: Phantoms.TTerm Grammar.BinaryExactNumericType -> Phantoms.TTerm Grammar.ExactNumericType
-exactNumericTypeBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericTypeDecimal :: Phantoms.TTerm Grammar.DecimalExactNumericType -> Phantoms.TTerm Grammar.ExactNumericType
-exactNumericTypeDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existsPredicateGraphPatternBrace :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm Grammar.ExistsPredicate
-existsPredicateGraphPatternBrace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExistsPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphPatternBrace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existsPredicateGraphPatternParen :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm Grammar.ExistsPredicate
-existsPredicateGraphPatternParen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExistsPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphPatternParen"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existsPredicateMatchBlockBrace :: Phantoms.TTerm Grammar.MatchStatementBlock -> Phantoms.TTerm Grammar.ExistsPredicate
-existsPredicateMatchBlockBrace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExistsPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "matchBlockBrace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existsPredicateMatchBlockParen :: Phantoms.TTerm Grammar.MatchStatementBlock -> Phantoms.TTerm Grammar.ExistsPredicate
-existsPredicateMatchBlockParen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExistsPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "matchBlockParen"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-existsPredicateNestedQuery :: Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.ExistsPredicate
-existsPredicateNestedQuery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ExistsPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nestedQuery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-field :: Phantoms.TTerm Grammar.FieldName -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.Field
-field name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-fieldName :: Phantoms.TTerm Grammar.Field -> Phantoms.TTerm Grammar.FieldName
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Field"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldType :: Phantoms.TTerm Grammar.FieldName -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.FieldType
-fieldType fieldName typed valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-fieldTypeFieldName :: Phantoms.TTerm Grammar.FieldType -> Phantoms.TTerm Grammar.FieldName
-fieldTypeFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-        Core.projectionField = (Core.Name "fieldName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldTypeTyped :: Phantoms.TTerm Grammar.FieldType -> Phantoms.TTerm (Maybe Grammar.Typed)
-fieldTypeTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldTypeValueType :: Phantoms.TTerm Grammar.FieldType -> Phantoms.TTerm Grammar.ValueType
-fieldTypeValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldTypeWithFieldName :: Phantoms.TTerm Grammar.FieldType -> Phantoms.TTerm Grammar.FieldName -> Phantoms.TTerm Grammar.FieldType
-fieldTypeWithFieldName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldTypeWithTyped :: Phantoms.TTerm Grammar.FieldType -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.FieldType
-fieldTypeWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-              Core.projectionField = (Core.Name "fieldName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldTypeWithValueType :: Phantoms.TTerm Grammar.FieldType -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.FieldType
-fieldTypeWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-              Core.projectionField = (Core.Name "fieldName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FieldType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldValue :: Phantoms.TTerm Grammar.Field -> Phantoms.TTerm Grammar.ValueExpression
-fieldValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Field"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldWithName :: Phantoms.TTerm Grammar.Field -> Phantoms.TTerm Grammar.FieldName -> Phantoms.TTerm Grammar.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.Field"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithValue :: Phantoms.TTerm Grammar.Field -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.Field
-fieldWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-filterStatementSearchCondition :: Phantoms.TTerm Grammar.SearchCondition -> Phantoms.TTerm Grammar.FilterStatement
-filterStatementSearchCondition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FilterStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "searchCondition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-filterStatementWhereClause :: Phantoms.TTerm Grammar.WhereClause -> Phantoms.TTerm Grammar.FilterStatement
-filterStatementWhereClause x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FilterStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "whereClause"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-float128Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float128Type
-float128Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-float128TypeNotNull :: Phantoms.TTerm Grammar.Float128Type -> Phantoms.TTerm Bool
-float128TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Float128Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-float128TypeWithNotNull :: Phantoms.TTerm Grammar.Float128Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float128Type
-float128TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-float16Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float16Type
-float16Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-float16TypeNotNull :: Phantoms.TTerm Grammar.Float16Type -> Phantoms.TTerm Bool
-float16TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Float16Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-float16TypeWithNotNull :: Phantoms.TTerm Grammar.Float16Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float16Type
-float16TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-float256Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float256Type
-float256Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-float256TypeNotNull :: Phantoms.TTerm Grammar.Float256Type -> Phantoms.TTerm Bool
-float256TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Float256Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-float256TypeWithNotNull :: Phantoms.TTerm Grammar.Float256Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float256Type
-float256TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-float32Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float32Type
-float32Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-float32TypeNotNull :: Phantoms.TTerm Grammar.Float32Type -> Phantoms.TTerm Bool
-float32TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Float32Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-float32TypeWithNotNull :: Phantoms.TTerm Grammar.Float32Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float32Type
-float32TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-float64Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float64Type
-float64Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-float64TypeNotNull :: Phantoms.TTerm Grammar.Float64Type -> Phantoms.TTerm Bool
-float64TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Float64Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-float64TypeWithNotNull :: Phantoms.TTerm Grammar.Float64Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Float64Type
-float64TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Float64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatTypeWithPrecision :: Phantoms.TTerm (Maybe Grammar.PrecisionAndScale) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.FloatTypeWithPrecision
-floatTypeWithPrecision precisionAndScale notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precisionAndScale"),
-          Core.fieldTerm = (Phantoms.unTTerm precisionAndScale)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-floatTypeWithPrecisionNotNull :: Phantoms.TTerm Grammar.FloatTypeWithPrecision -> Phantoms.TTerm Bool
-floatTypeWithPrecisionNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-floatTypeWithPrecisionPrecisionAndScale :: Phantoms.TTerm Grammar.FloatTypeWithPrecision -> Phantoms.TTerm (Maybe Grammar.PrecisionAndScale)
-floatTypeWithPrecisionPrecisionAndScale x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-        Core.projectionField = (Core.Name "precisionAndScale")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-floatTypeWithPrecisionWithNotNull :: Phantoms.TTerm Grammar.FloatTypeWithPrecision -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.FloatTypeWithPrecision
-floatTypeWithPrecisionWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precisionAndScale"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-              Core.projectionField = (Core.Name "precisionAndScale")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatTypeWithPrecisionWithPrecisionAndScale :: Phantoms.TTerm Grammar.FloatTypeWithPrecision -> Phantoms.TTerm (Maybe Grammar.PrecisionAndScale) -> Phantoms.TTerm Grammar.FloatTypeWithPrecision
-floatTypeWithPrecisionWithPrecisionAndScale original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precisionAndScale"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FloatTypeWithPrecision"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearDataModifyingStatementBody :: Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.SimpleLinearDataAccessingStatement -> Phantoms.TTerm (Maybe Grammar.PrimitiveResultStatement) -> Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody
-focusedLinearDataModifyingStatementBody useGraph simpleAccess primitiveResult =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm useGraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm simpleAccess)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm primitiveResult)}]}))
-
-focusedLinearDataModifyingStatementBodyPrimitiveResult :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm (Maybe Grammar.PrimitiveResultStatement)
-focusedLinearDataModifyingStatementBodyPrimitiveResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-        Core.projectionField = (Core.Name "primitiveResult")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearDataModifyingStatementBodySimpleAccess :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.SimpleLinearDataAccessingStatement
-focusedLinearDataModifyingStatementBodySimpleAccess x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-        Core.projectionField = (Core.Name "simpleAccess")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearDataModifyingStatementBodyUseGraph :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.UseGraphClause
-focusedLinearDataModifyingStatementBodyUseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-        Core.projectionField = (Core.Name "useGraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearDataModifyingStatementBodyWithPrimitiveResult :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm (Maybe Grammar.PrimitiveResultStatement) -> Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody
-focusedLinearDataModifyingStatementBodyWithPrimitiveResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "simpleAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedLinearDataModifyingStatementBodyWithSimpleAccess :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.SimpleLinearDataAccessingStatement -> Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody
-focusedLinearDataModifyingStatementBodyWithSimpleAccess original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearDataModifyingStatementBodyWithUseGraph :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody
-focusedLinearDataModifyingStatementBodyWithUseGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simpleAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "simpleAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearDataModifyingStatementNested :: Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatement
-focusedLinearDataModifyingStatementNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-focusedLinearDataModifyingStatementSimple :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatementBody -> Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatement
-focusedLinearDataModifyingStatementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FocusedLinearDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-focusedLinearQueryAndPrimitiveResultStatementPart :: Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.SimpleLinearQueryStatement -> Phantoms.TTerm Grammar.PrimitiveResultStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart
-focusedLinearQueryAndPrimitiveResultStatementPart useGraph simple primitiveResult =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm useGraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Phantoms.unTTerm simple)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm primitiveResult)}]}))
-
-focusedLinearQueryAndPrimitiveResultStatementPartPrimitiveResult :: Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.PrimitiveResultStatement
-focusedLinearQueryAndPrimitiveResultStatementPartPrimitiveResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-        Core.projectionField = (Core.Name "primitiveResult")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryAndPrimitiveResultStatementPartSimple :: Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.SimpleLinearQueryStatement
-focusedLinearQueryAndPrimitiveResultStatementPartSimple x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-        Core.projectionField = (Core.Name "simple")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryAndPrimitiveResultStatementPartUseGraph :: Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.UseGraphClause
-focusedLinearQueryAndPrimitiveResultStatementPartUseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-        Core.projectionField = (Core.Name "useGraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryAndPrimitiveResultStatementPartWithPrimitiveResult :: Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.PrimitiveResultStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart
-focusedLinearQueryAndPrimitiveResultStatementPartWithPrimitiveResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-              Core.projectionField = (Core.Name "simple")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedLinearQueryAndPrimitiveResultStatementPartWithSimple :: Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.SimpleLinearQueryStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart
-focusedLinearQueryAndPrimitiveResultStatementPartWithSimple original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearQueryAndPrimitiveResultStatementPartWithUseGraph :: Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart
-focusedLinearQueryAndPrimitiveResultStatementPartWithUseGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-              Core.projectionField = (Core.Name "simple")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearQueryStatementNested :: Phantoms.TTerm Grammar.FocusedNestedQuerySpecification -> Phantoms.TTerm Grammar.FocusedLinearQueryStatement
-focusedLinearQueryStatementNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-focusedLinearQueryStatementPart :: Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.SimpleLinearQueryStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart
-focusedLinearQueryStatementPart useGraph simple =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm useGraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Phantoms.unTTerm simple)}]}))
-
-focusedLinearQueryStatementPartSimple :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart -> Phantoms.TTerm Grammar.SimpleLinearQueryStatement
-focusedLinearQueryStatementPartSimple x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-        Core.projectionField = (Core.Name "simple")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryStatementPartUseGraph :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart -> Phantoms.TTerm Grammar.UseGraphClause
-focusedLinearQueryStatementPartUseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-        Core.projectionField = (Core.Name "useGraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryStatementPartWithSimple :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart -> Phantoms.TTerm Grammar.SimpleLinearQueryStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart
-focusedLinearQueryStatementPartWithSimple original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedLinearQueryStatementPartWithUseGraph :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart -> Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.FocusedLinearQueryStatementPart
-focusedLinearQueryStatementPartWithUseGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simple"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"),
-              Core.projectionField = (Core.Name "simple")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearQueryStatementParts :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult -> Phantoms.TTerm Grammar.FocusedLinearQueryStatement
-focusedLinearQueryStatementParts x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parts"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-focusedLinearQueryStatementPartsAndResult :: Phantoms.TTerm [Grammar.FocusedLinearQueryStatementPart] -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult
-focusedLinearQueryStatementPartsAndResult parts result =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm parts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm result)}]}))
-
-focusedLinearQueryStatementPartsAndResultParts :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult -> Phantoms.TTerm [Grammar.FocusedLinearQueryStatementPart]
-focusedLinearQueryStatementPartsAndResultParts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-        Core.projectionField = (Core.Name "parts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryStatementPartsAndResultResult :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart
-focusedLinearQueryStatementPartsAndResultResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-        Core.projectionField = (Core.Name "result")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedLinearQueryStatementPartsAndResultWithParts :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult -> Phantoms.TTerm [Grammar.FocusedLinearQueryStatementPart] -> Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult
-focusedLinearQueryStatementPartsAndResultWithParts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedLinearQueryStatementPartsAndResultWithResult :: Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult -> Phantoms.TTerm Grammar.FocusedLinearQueryAndPrimitiveResultStatementPart -> Phantoms.TTerm Grammar.FocusedLinearQueryStatementPartsAndResult
-focusedLinearQueryStatementPartsAndResultWithResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedLinearQueryStatementPrimitive :: Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryStatement
-focusedLinearQueryStatementPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-focusedLinearQueryStatementSelect :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm Grammar.FocusedLinearQueryStatement
-focusedLinearQueryStatementSelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FocusedLinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-focusedNestedDataModifyingProcedureSpecification :: Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.NestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification
-focusedNestedDataModifyingProcedureSpecification useGraph nestedSpec =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm useGraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm nestedSpec)}]}))
-
-focusedNestedDataModifyingProcedureSpecificationNestedSpec :: Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.NestedDataModifyingProcedureSpecification
-focusedNestedDataModifyingProcedureSpecificationNestedSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-        Core.projectionField = (Core.Name "nestedSpec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedNestedDataModifyingProcedureSpecificationUseGraph :: Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.UseGraphClause
-focusedNestedDataModifyingProcedureSpecificationUseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-        Core.projectionField = (Core.Name "useGraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedNestedDataModifyingProcedureSpecificationWithNestedSpec :: Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.NestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification
-focusedNestedDataModifyingProcedureSpecificationWithNestedSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedNestedDataModifyingProcedureSpecificationWithUseGraph :: Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification -> Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.FocusedNestedDataModifyingProcedureSpecification
-focusedNestedDataModifyingProcedureSpecificationWithUseGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nestedSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"),
-              Core.projectionField = (Core.Name "nestedSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedNestedQuerySpecification :: Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.FocusedNestedQuerySpecification
-focusedNestedQuerySpecification useGraph nested =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm useGraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Phantoms.unTTerm nested)}]}))
-
-focusedNestedQuerySpecificationNested :: Phantoms.TTerm Grammar.FocusedNestedQuerySpecification -> Phantoms.TTerm Grammar.NestedQuerySpecification
-focusedNestedQuerySpecificationNested x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-        Core.projectionField = (Core.Name "nested")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedNestedQuerySpecificationUseGraph :: Phantoms.TTerm Grammar.FocusedNestedQuerySpecification -> Phantoms.TTerm Grammar.UseGraphClause
-focusedNestedQuerySpecificationUseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-        Core.projectionField = (Core.Name "useGraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedNestedQuerySpecificationWithNested :: Phantoms.TTerm Grammar.FocusedNestedQuerySpecification -> Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.FocusedNestedQuerySpecification
-focusedNestedQuerySpecificationWithNested original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedNestedQuerySpecificationWithUseGraph :: Phantoms.TTerm Grammar.FocusedNestedQuerySpecification -> Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.FocusedNestedQuerySpecification
-focusedNestedQuerySpecificationWithUseGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedNestedQuerySpecification"),
-              Core.projectionField = (Core.Name "nested")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-focusedPrimitiveResultStatement :: Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.PrimitiveResultStatement -> Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement
-focusedPrimitiveResultStatement useGraph primitiveResult =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm useGraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm primitiveResult)}]}))
-
-focusedPrimitiveResultStatementPrimitiveResult :: Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement -> Phantoms.TTerm Grammar.PrimitiveResultStatement
-focusedPrimitiveResultStatementPrimitiveResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-        Core.projectionField = (Core.Name "primitiveResult")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedPrimitiveResultStatementUseGraph :: Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement -> Phantoms.TTerm Grammar.UseGraphClause
-focusedPrimitiveResultStatementUseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-        Core.projectionField = (Core.Name "useGraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-focusedPrimitiveResultStatementWithPrimitiveResult :: Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement -> Phantoms.TTerm Grammar.PrimitiveResultStatement -> Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement
-focusedPrimitiveResultStatementWithPrimitiveResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-              Core.projectionField = (Core.Name "useGraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-focusedPrimitiveResultStatementWithUseGraph :: Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement -> Phantoms.TTerm Grammar.UseGraphClause -> Phantoms.TTerm Grammar.FocusedPrimitiveResultStatement
-focusedPrimitiveResultStatementWithUseGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "useGraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitiveResult"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"),
-              Core.projectionField = (Core.Name "primitiveResult")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-foldCharacterString :: Phantoms.TTerm Grammar.Case -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.FoldCharacterString
-foldCharacterString case_ valueExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm case_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)}]}))
-
-foldCharacterStringCase :: Phantoms.TTerm Grammar.FoldCharacterString -> Phantoms.TTerm Grammar.Case
-foldCharacterStringCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-        Core.projectionField = (Core.Name "case")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foldCharacterStringValueExpression :: Phantoms.TTerm Grammar.FoldCharacterString -> Phantoms.TTerm Grammar.ValueExpression
-foldCharacterStringValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-foldCharacterStringWithCase :: Phantoms.TTerm Grammar.FoldCharacterString -> Phantoms.TTerm Grammar.Case -> Phantoms.TTerm Grammar.FoldCharacterString
-foldCharacterStringWithCase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-foldCharacterStringWithValueExpression :: Phantoms.TTerm Grammar.FoldCharacterString -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.FoldCharacterString
-foldCharacterStringWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.FoldCharacterString"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forItem :: Phantoms.TTerm Grammar.ForItemAlias -> Phantoms.TTerm Grammar.ForItemSource -> Phantoms.TTerm Grammar.ForItem
-forItem alias source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-forItemAlias :: Phantoms.TTerm Grammar.ForItem -> Phantoms.TTerm Grammar.ForItemAlias
-forItemAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ForItem"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forItemSource :: Phantoms.TTerm Grammar.ForItem -> Phantoms.TTerm Grammar.ForItemSource
-forItemSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ForItem"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forItemWithAlias :: Phantoms.TTerm Grammar.ForItem -> Phantoms.TTerm Grammar.ForItemAlias -> Phantoms.TTerm Grammar.ForItem
-forItemWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ForItem"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forItemWithSource :: Phantoms.TTerm Grammar.ForItem -> Phantoms.TTerm Grammar.ForItemSource -> Phantoms.TTerm Grammar.ForItem
-forItemWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ForItem"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forOrdinalityOrOffset :: Phantoms.TTerm Grammar.OrdinalityOrOffsetType -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.ForOrdinalityOrOffset
-forOrdinalityOrOffset type_ variable =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)}]}))
-
-forOrdinalityOrOffsetType :: Phantoms.TTerm Grammar.ForOrdinalityOrOffset -> Phantoms.TTerm Grammar.OrdinalityOrOffsetType
-forOrdinalityOrOffsetType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forOrdinalityOrOffsetVariable :: Phantoms.TTerm Grammar.ForOrdinalityOrOffset -> Phantoms.TTerm Grammar.BindingVariable
-forOrdinalityOrOffsetVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forOrdinalityOrOffsetWithType :: Phantoms.TTerm Grammar.ForOrdinalityOrOffset -> Phantoms.TTerm Grammar.OrdinalityOrOffsetType -> Phantoms.TTerm Grammar.ForOrdinalityOrOffset
-forOrdinalityOrOffsetWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forOrdinalityOrOffsetWithVariable :: Phantoms.TTerm Grammar.ForOrdinalityOrOffset -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.ForOrdinalityOrOffset
-forOrdinalityOrOffsetWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ForOrdinalityOrOffset"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStatement :: Phantoms.TTerm Grammar.ForItem -> Phantoms.TTerm (Maybe Grammar.ForOrdinalityOrOffset) -> Phantoms.TTerm Grammar.ForStatement
-forStatement item ordinalityOrOffset =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Phantoms.unTTerm item)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinalityOrOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm ordinalityOrOffset)}]}))
-
-forStatementItem :: Phantoms.TTerm Grammar.ForStatement -> Phantoms.TTerm Grammar.ForItem
-forStatementItem x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ForStatement"),
-        Core.projectionField = (Core.Name "item")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementOrdinalityOrOffset :: Phantoms.TTerm Grammar.ForStatement -> Phantoms.TTerm (Maybe Grammar.ForOrdinalityOrOffset)
-forStatementOrdinalityOrOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ForStatement"),
-        Core.projectionField = (Core.Name "ordinalityOrOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementWithItem :: Phantoms.TTerm Grammar.ForStatement -> Phantoms.TTerm Grammar.ForItem -> Phantoms.TTerm Grammar.ForStatement
-forStatementWithItem original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinalityOrOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ForStatement"),
-              Core.projectionField = (Core.Name "ordinalityOrOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithOrdinalityOrOffset :: Phantoms.TTerm Grammar.ForStatement -> Phantoms.TTerm (Maybe Grammar.ForOrdinalityOrOffset) -> Phantoms.TTerm Grammar.ForStatement
-forStatementWithOrdinalityOrOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ForStatement"),
-              Core.projectionField = (Core.Name "item")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinalityOrOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fullEdgePatternAnyDirection :: Phantoms.TTerm Grammar.FullEdgeAnyDirection -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternAnyDirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyDirection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fullEdgePatternLeftOrRight :: Phantoms.TTerm Grammar.FullEdgeLeftOrRight -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternLeftOrRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftOrRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fullEdgePatternLeftOrUndirected :: Phantoms.TTerm Grammar.FullEdgeLeftOrUndirected -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternLeftOrUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftOrUndirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fullEdgePatternPointingLeft :: Phantoms.TTerm Grammar.FullEdgePointingLeft -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternPointingLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingLeft"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fullEdgePatternPointingRight :: Phantoms.TTerm Grammar.FullEdgePointingRight -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternPointingRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fullEdgePatternUndirected :: Phantoms.TTerm Grammar.FullEdgeUndirected -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fullEdgePatternUndirectedOrRight :: Phantoms.TTerm Grammar.FullEdgeUndirectedOrRight -> Phantoms.TTerm Grammar.FullEdgePattern
-fullEdgePatternUndirectedOrRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.FullEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirectedOrRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralBoolean :: Phantoms.TTerm Grammar.BooleanLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralByteString :: Phantoms.TTerm Grammar.ByteStringLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralByteString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byteString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralCharacterString :: Phantoms.TTerm Grammar.CharacterStringLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralCharacterString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "characterString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralDuration :: Phantoms.TTerm Grammar.DurationLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralDuration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralList :: Phantoms.TTerm Grammar.ListLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralNullLiteral :: Phantoms.TTerm Grammar.NullLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralNullLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullLiteral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralRecord :: Phantoms.TTerm Grammar.RecordLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralTemporal :: Phantoms.TTerm Grammar.TemporalLiteral -> Phantoms.TTerm Grammar.GeneralLiteral
-generalLiteralTemporal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "temporal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLogarithmFunction :: Phantoms.TTerm Grammar.GeneralLogarithmBase -> Phantoms.TTerm Grammar.GeneralLogarithmArgument -> Phantoms.TTerm Grammar.GeneralLogarithmFunction
-generalLogarithmFunction base argument =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))
-
-generalLogarithmFunctionArgument :: Phantoms.TTerm Grammar.GeneralLogarithmFunction -> Phantoms.TTerm Grammar.GeneralLogarithmArgument
-generalLogarithmFunctionArgument x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-        Core.projectionField = (Core.Name "argument")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalLogarithmFunctionBase :: Phantoms.TTerm Grammar.GeneralLogarithmFunction -> Phantoms.TTerm Grammar.GeneralLogarithmBase
-generalLogarithmFunctionBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalLogarithmFunctionWithArgument :: Phantoms.TTerm Grammar.GeneralLogarithmFunction -> Phantoms.TTerm Grammar.GeneralLogarithmArgument -> Phantoms.TTerm Grammar.GeneralLogarithmFunction
-generalLogarithmFunctionWithArgument original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-generalLogarithmFunctionWithBase :: Phantoms.TTerm Grammar.GeneralLogarithmFunction -> Phantoms.TTerm Grammar.GeneralLogarithmBase -> Phantoms.TTerm Grammar.GeneralLogarithmFunction
-generalLogarithmFunctionWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralLogarithmFunction"),
-              Core.projectionField = (Core.Name "argument")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-generalQuantifier :: Phantoms.TTerm (Maybe Grammar.LowerBound) -> Phantoms.TTerm (Maybe Grammar.UpperBound) -> Phantoms.TTerm Grammar.GeneralQuantifier
-generalQuantifier lowerBound upperBound =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Phantoms.unTTerm lowerBound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Phantoms.unTTerm upperBound)}]}))
-
-generalQuantifierLowerBound :: Phantoms.TTerm Grammar.GeneralQuantifier -> Phantoms.TTerm (Maybe Grammar.LowerBound)
-generalQuantifierLowerBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-        Core.projectionField = (Core.Name "lowerBound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalQuantifierUpperBound :: Phantoms.TTerm Grammar.GeneralQuantifier -> Phantoms.TTerm (Maybe Grammar.UpperBound)
-generalQuantifierUpperBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-        Core.projectionField = (Core.Name "upperBound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalQuantifierWithLowerBound :: Phantoms.TTerm Grammar.GeneralQuantifier -> Phantoms.TTerm (Maybe Grammar.LowerBound) -> Phantoms.TTerm Grammar.GeneralQuantifier
-generalQuantifierWithLowerBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-              Core.projectionField = (Core.Name "upperBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-generalQuantifierWithUpperBound :: Phantoms.TTerm Grammar.GeneralQuantifier -> Phantoms.TTerm (Maybe Grammar.UpperBound) -> Phantoms.TTerm Grammar.GeneralQuantifier
-generalQuantifierWithUpperBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lowerBound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralQuantifier"),
-              Core.projectionField = (Core.Name "lowerBound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "upperBound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-generalSetFunction :: Phantoms.TTerm Grammar.GeneralSetFunctionType -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.GeneralSetFunction
-generalSetFunction functionType setQuantifier valueExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Phantoms.unTTerm functionType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm setQuantifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)}]}))
-
-generalSetFunctionFunctionType :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionFunctionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-        Core.projectionField = (Core.Name "functionType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalSetFunctionSetQuantifier :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm (Maybe Grammar.SetQuantifier)
-generalSetFunctionSetQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-        Core.projectionField = (Core.Name "setQuantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalSetFunctionTypeAvg :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeAvg =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "avg"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeCollectList :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeCollectList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collectList"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeCount :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeCount =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "count"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeMax :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeMax =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "max"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeMin :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeMin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "min"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeStddevPop :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeStddevPop =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stddevPop"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeStddevSamp :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeStddevSamp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stddevSamp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionTypeSum :: Phantoms.TTerm Grammar.GeneralSetFunctionType
-generalSetFunctionTypeSum =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sum"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-generalSetFunctionValueExpression :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm Grammar.ValueExpression
-generalSetFunctionValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-generalSetFunctionWithFunctionType :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm Grammar.GeneralSetFunctionType -> Phantoms.TTerm Grammar.GeneralSetFunction
-generalSetFunctionWithFunctionType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-              Core.projectionField = (Core.Name "setQuantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-generalSetFunctionWithSetQuantifier :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.GeneralSetFunction
-generalSetFunctionWithSetQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-              Core.projectionField = (Core.Name "functionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-generalSetFunctionWithValueExpression :: Phantoms.TTerm Grammar.GeneralSetFunction -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.GeneralSetFunction
-generalSetFunctionWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "functionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-              Core.projectionField = (Core.Name "functionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "setQuantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GeneralSetFunction"),
-              Core.projectionField = (Core.Name "setQuantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-generalValueSpecificationDynamicParameterSpecification :: Phantoms.TTerm Grammar.DynamicParameterSpecification -> Phantoms.TTerm Grammar.GeneralValueSpecification
-generalValueSpecificationDynamicParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralValueSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dynamicParameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalValueSpecificationSessionUser :: Phantoms.TTerm Grammar.GeneralValueSpecification
-generalValueSpecificationSessionUser =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GeneralValueSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sessionUser"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-gqlProgram :: Phantoms.TTerm (Maybe Grammar.ProgramActivity) -> Phantoms.TTerm (Maybe Grammar.SessionCloseCommand) -> Phantoms.TTerm Grammar.GqlProgram
-gqlProgram activity close =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "activity"),
-          Core.fieldTerm = (Phantoms.unTTerm activity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (Phantoms.unTTerm close)}]}))
-
-gqlProgramActivity :: Phantoms.TTerm Grammar.GqlProgram -> Phantoms.TTerm (Maybe Grammar.ProgramActivity)
-gqlProgramActivity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-        Core.projectionField = (Core.Name "activity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-gqlProgramClose :: Phantoms.TTerm Grammar.GqlProgram -> Phantoms.TTerm (Maybe Grammar.SessionCloseCommand)
-gqlProgramClose x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-        Core.projectionField = (Core.Name "close")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-gqlProgramWithActivity :: Phantoms.TTerm Grammar.GqlProgram -> Phantoms.TTerm (Maybe Grammar.ProgramActivity) -> Phantoms.TTerm Grammar.GqlProgram
-gqlProgramWithActivity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "activity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-              Core.projectionField = (Core.Name "close")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-gqlProgramWithClose :: Phantoms.TTerm Grammar.GqlProgram -> Phantoms.TTerm (Maybe Grammar.SessionCloseCommand) -> Phantoms.TTerm Grammar.GqlProgram
-gqlProgramWithClose original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "activity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GqlProgram"),
-              Core.projectionField = (Core.Name "activity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphAndNestedQuerySpecification :: Phantoms.TTerm Grammar.GraphExpression -> Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification
-graphAndNestedQuerySpecification graphExpression nested =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm graphExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Phantoms.unTTerm nested)}]}))
-
-graphAndNestedQuerySpecificationGraphExpression :: Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification -> Phantoms.TTerm Grammar.GraphExpression
-graphAndNestedQuerySpecificationGraphExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-        Core.projectionField = (Core.Name "graphExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphAndNestedQuerySpecificationNested :: Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification -> Phantoms.TTerm Grammar.NestedQuerySpecification
-graphAndNestedQuerySpecificationNested x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-        Core.projectionField = (Core.Name "nested")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphAndNestedQuerySpecificationWithGraphExpression :: Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification -> Phantoms.TTerm Grammar.GraphExpression -> Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification
-graphAndNestedQuerySpecificationWithGraphExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-              Core.projectionField = (Core.Name "nested")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphAndNestedQuerySpecificationWithNested :: Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification -> Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification
-graphAndNestedQuerySpecificationWithNested original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"),
-              Core.projectionField = (Core.Name "graphExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphExpressionCurrent :: Phantoms.TTerm Grammar.CurrentGraph -> Phantoms.TTerm Grammar.GraphExpression
-graphExpressionCurrent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "current"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphExpressionName :: Phantoms.TTerm Grammar.ObjectNameOrBindingVariable -> Phantoms.TTerm Grammar.GraphExpression
-graphExpressionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphExpressionObject :: Phantoms.TTerm Grammar.ObjectExpressionPrimary -> Phantoms.TTerm Grammar.GraphExpression
-graphExpressionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphExpressionReference :: Phantoms.TTerm Grammar.GraphReference -> Phantoms.TTerm Grammar.GraphExpression
-graphExpressionReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphPattern :: Phantoms.TTerm (Maybe Grammar.MatchMode) -> Phantoms.TTerm Grammar.PathPatternList -> Phantoms.TTerm (Maybe Grammar.KeepClause) -> Phantoms.TTerm (Maybe Grammar.GraphPatternWhereClause) -> Phantoms.TTerm Grammar.GraphPattern
-graphPattern matchMode pathPatterns keepClause whereClause =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "matchMode"),
-          Core.fieldTerm = (Phantoms.unTTerm matchMode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPatterns"),
-          Core.fieldTerm = (Phantoms.unTTerm pathPatterns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keepClause"),
-          Core.fieldTerm = (Phantoms.unTTerm keepClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)}]}))
-
-graphPatternBindingTable :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.GraphPatternYieldClause) -> Phantoms.TTerm Grammar.GraphPatternBindingTable
-graphPatternBindingTable pattern yieldClause =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldClause"),
-          Core.fieldTerm = (Phantoms.unTTerm yieldClause)}]}))
-
-graphPatternBindingTablePattern :: Phantoms.TTerm Grammar.GraphPatternBindingTable -> Phantoms.TTerm Grammar.GraphPattern
-graphPatternBindingTablePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphPatternBindingTableWithPattern :: Phantoms.TTerm Grammar.GraphPatternBindingTable -> Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm Grammar.GraphPatternBindingTable
-graphPatternBindingTableWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-              Core.projectionField = (Core.Name "yieldClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphPatternBindingTableWithYieldClause :: Phantoms.TTerm Grammar.GraphPatternBindingTable -> Phantoms.TTerm (Maybe Grammar.GraphPatternYieldClause) -> Phantoms.TTerm Grammar.GraphPatternBindingTable
-graphPatternBindingTableWithYieldClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphPatternBindingTableYieldClause :: Phantoms.TTerm Grammar.GraphPatternBindingTable -> Phantoms.TTerm (Maybe Grammar.GraphPatternYieldClause)
-graphPatternBindingTableYieldClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPatternBindingTable"),
-        Core.projectionField = (Core.Name "yieldClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphPatternKeepClause :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.KeepClause)
-graphPatternKeepClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-        Core.projectionField = (Core.Name "keepClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphPatternMatchMode :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.MatchMode)
-graphPatternMatchMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-        Core.projectionField = (Core.Name "matchMode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphPatternPathPatterns :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm Grammar.PathPatternList
-graphPatternPathPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-        Core.projectionField = (Core.Name "pathPatterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphPatternQuantifierAsterisk :: Phantoms.TTerm Grammar.GraphPatternQuantifier
-graphPatternQuantifierAsterisk =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphPatternQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asterisk"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-graphPatternQuantifierFixed :: Phantoms.TTerm Grammar.FixedQuantifier -> Phantoms.TTerm Grammar.GraphPatternQuantifier
-graphPatternQuantifierFixed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphPatternQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphPatternQuantifierGeneral :: Phantoms.TTerm Grammar.GeneralQuantifier -> Phantoms.TTerm Grammar.GraphPatternQuantifier
-graphPatternQuantifierGeneral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphPatternQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "general"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphPatternQuantifierPlusSign :: Phantoms.TTerm Grammar.GraphPatternQuantifier
-graphPatternQuantifierPlusSign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphPatternQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plusSign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-graphPatternWhereClause :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.GraphPatternWhereClause)
-graphPatternWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphPatternWithKeepClause :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.KeepClause) -> Phantoms.TTerm Grammar.GraphPattern
-graphPatternWithKeepClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "matchMode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "matchMode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "pathPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keepClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphPatternWithMatchMode :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.MatchMode) -> Phantoms.TTerm Grammar.GraphPattern
-graphPatternWithMatchMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "matchMode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "pathPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keepClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "keepClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphPatternWithPathPatterns :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm Grammar.PathPatternList -> Phantoms.TTerm Grammar.GraphPattern
-graphPatternWithPathPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "matchMode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "matchMode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPatterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keepClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "keepClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphPatternWithWhereClause :: Phantoms.TTerm Grammar.GraphPattern -> Phantoms.TTerm (Maybe Grammar.GraphPatternWhereClause) -> Phantoms.TTerm Grammar.GraphPattern
-graphPatternWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "matchMode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "matchMode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "pathPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keepClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphPattern"),
-              Core.projectionField = (Core.Name "keepClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphPatternYieldItemListItems :: Phantoms.TTerm [Grammar.GraphPatternYieldItem] -> Phantoms.TTerm Grammar.GraphPatternYieldItemList
-graphPatternYieldItemListItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphPatternYieldItemList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "items"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphPatternYieldItemListNoBindings :: Phantoms.TTerm Grammar.GraphPatternYieldItemList
-graphPatternYieldItemListNoBindings =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphPatternYieldItemList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noBindings"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-graphReferenceDelimitedGraphName :: Phantoms.TTerm Grammar.DelimitedGraphName -> Phantoms.TTerm Grammar.GraphReference
-graphReferenceDelimitedGraphName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delimitedGraphName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphReferenceHomeGraph :: Phantoms.TTerm Grammar.HomeGraph -> Phantoms.TTerm Grammar.GraphReference
-graphReferenceHomeGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "homeGraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphReferenceParameterSpecification :: Phantoms.TTerm Grammar.ReferenceParameterSpecification -> Phantoms.TTerm Grammar.GraphReference
-graphReferenceParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphReferenceParentAndGraphName :: Phantoms.TTerm Grammar.ParentAndGraphName -> Phantoms.TTerm Grammar.GraphReference
-graphReferenceParentAndGraphName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parentAndGraphName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphReferenceValueTypeClosed :: Phantoms.TTerm Grammar.ClosedGraphReferenceValueType -> Phantoms.TTerm Grammar.GraphReferenceValueType
-graphReferenceValueTypeClosed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphReferenceValueTypeOpen :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm Grammar.GraphReferenceValueType
-graphReferenceValueTypeOpen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "open"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeOptionOfGraphType :: Phantoms.TTerm Grammar.OfGraphType -> Phantoms.TTerm Grammar.GraphTypeOption
-graphTypeOptionOfGraphType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ofGraphType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeOptionOpenGraphType :: Phantoms.TTerm Grammar.OpenGraphType -> Phantoms.TTerm Grammar.GraphTypeOption
-graphTypeOptionOpenGraphType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeOption"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "openGraphType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeReferenceParameterSpecification :: Phantoms.TTerm Grammar.ReferenceParameterSpecification -> Phantoms.TTerm Grammar.GraphTypeReference
-graphTypeReferenceParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeReferenceParentAndTypeName :: Phantoms.TTerm Grammar.CatalogGraphTypeParentAndName -> Phantoms.TTerm Grammar.GraphTypeReference
-graphTypeReferenceParentAndTypeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parentAndTypeName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeSourceCopyOf :: Phantoms.TTerm Grammar.CopyOfGraphType -> Phantoms.TTerm Grammar.GraphTypeSource
-graphTypeSourceCopyOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "copyOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeSourceLikeGraph :: Phantoms.TTerm Grammar.GraphTypeLikeGraph -> Phantoms.TTerm Grammar.GraphTypeSource
-graphTypeSourceLikeGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "likeGraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphTypeSourceNestedSpecification :: Phantoms.TTerm Grammar.NestedGraphTypeSpecification -> Phantoms.TTerm Grammar.GraphTypeSource
-graphTypeSourceNestedSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GraphTypeSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nestedSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graphVariableDefinition :: Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm Grammar.GraphVariableDefinition
-graphVariableDefinition variable initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-graphVariableDefinitionInitializer :: Phantoms.TTerm Grammar.GraphVariableDefinition -> Phantoms.TTerm Grammar.OptTypedGraphInitializer
-graphVariableDefinitionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphVariableDefinitionVariable :: Phantoms.TTerm Grammar.GraphVariableDefinition -> Phantoms.TTerm Grammar.BindingVariable
-graphVariableDefinitionVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphVariableDefinitionWithInitializer :: Phantoms.TTerm Grammar.GraphVariableDefinition -> Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm Grammar.GraphVariableDefinition
-graphVariableDefinitionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphVariableDefinitionWithVariable :: Phantoms.TTerm Grammar.GraphVariableDefinition -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.GraphVariableDefinition
-graphVariableDefinitionWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.GraphVariableDefinition"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-groupingElementListElements :: Phantoms.TTerm [Grammar.GroupingElement] -> Phantoms.TTerm Grammar.GroupingElementList
-groupingElementListElements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GroupingElementList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-groupingElementListEmptySet :: Phantoms.TTerm Grammar.GroupingElementList
-groupingElementListEmptySet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.GroupingElementList"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptySet"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-homeGraphHomeGraph :: Phantoms.TTerm Grammar.HomeGraph
-homeGraphHomeGraph =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.HomeGraph"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "homeGraph"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-homeGraphHomePropertyGraph :: Phantoms.TTerm Grammar.HomeGraph
-homeGraphHomePropertyGraph =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.HomeGraph"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "homePropertyGraph"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-immaterialValueTypeEmptyType :: Phantoms.TTerm Grammar.EmptyType -> Phantoms.TTerm Grammar.ImmaterialValueType
-immaterialValueTypeEmptyType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ImmaterialValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emptyType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-immaterialValueTypeNullType :: Phantoms.TTerm Grammar.NullType -> Phantoms.TTerm Grammar.ImmaterialValueType
-immaterialValueTypeNullType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ImmaterialValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-impliesImplies :: Phantoms.TTerm Grammar.Implies
-impliesImplies =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Implies"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implies"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-impliesRightDoubleArrow :: Phantoms.TTerm Grammar.Implies
-impliesRightDoubleArrow =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Implies"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightDoubleArrow"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-inlineProcedureCall :: Phantoms.TTerm (Maybe Grammar.VariableScopeClause) -> Phantoms.TTerm Grammar.NestedProcedureSpecification -> Phantoms.TTerm Grammar.InlineProcedureCall
-inlineProcedureCall scope nested =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Phantoms.unTTerm nested)}]}))
-
-inlineProcedureCallNested :: Phantoms.TTerm Grammar.InlineProcedureCall -> Phantoms.TTerm Grammar.NestedProcedureSpecification
-inlineProcedureCallNested x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-        Core.projectionField = (Core.Name "nested")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineProcedureCallScope :: Phantoms.TTerm Grammar.InlineProcedureCall -> Phantoms.TTerm (Maybe Grammar.VariableScopeClause)
-inlineProcedureCallScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineProcedureCallWithNested :: Phantoms.TTerm Grammar.InlineProcedureCall -> Phantoms.TTerm Grammar.NestedProcedureSpecification -> Phantoms.TTerm Grammar.InlineProcedureCall
-inlineProcedureCallWithNested original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineProcedureCallWithScope :: Phantoms.TTerm Grammar.InlineProcedureCall -> Phantoms.TTerm (Maybe Grammar.VariableScopeClause) -> Phantoms.TTerm Grammar.InlineProcedureCall
-inlineProcedureCallWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nested"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InlineProcedureCall"),
-              Core.projectionField = (Core.Name "nested")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-insertEdgeAndNode :: Phantoms.TTerm Grammar.InsertEdgePattern -> Phantoms.TTerm Grammar.InsertNodePattern -> Phantoms.TTerm Grammar.InsertEdgeAndNode
-insertEdgeAndNode edge node =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Phantoms.unTTerm edge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "node"),
-          Core.fieldTerm = (Phantoms.unTTerm node)}]}))
-
-insertEdgeAndNodeEdge :: Phantoms.TTerm Grammar.InsertEdgeAndNode -> Phantoms.TTerm Grammar.InsertEdgePattern
-insertEdgeAndNodeEdge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-        Core.projectionField = (Core.Name "edge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertEdgeAndNodeNode :: Phantoms.TTerm Grammar.InsertEdgeAndNode -> Phantoms.TTerm Grammar.InsertNodePattern
-insertEdgeAndNodeNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-        Core.projectionField = (Core.Name "node")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertEdgeAndNodeWithEdge :: Phantoms.TTerm Grammar.InsertEdgeAndNode -> Phantoms.TTerm Grammar.InsertEdgePattern -> Phantoms.TTerm Grammar.InsertEdgeAndNode
-insertEdgeAndNodeWithEdge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "node"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-              Core.projectionField = (Core.Name "node")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-insertEdgeAndNodeWithNode :: Phantoms.TTerm Grammar.InsertEdgeAndNode -> Phantoms.TTerm Grammar.InsertNodePattern -> Phantoms.TTerm Grammar.InsertEdgeAndNode
-insertEdgeAndNodeWithNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InsertEdgeAndNode"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "node"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-insertEdgePatternPointingLeft :: Phantoms.TTerm Grammar.InsertEdgePointingLeft -> Phantoms.TTerm Grammar.InsertEdgePattern
-insertEdgePatternPointingLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.InsertEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingLeft"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-insertEdgePatternPointingRight :: Phantoms.TTerm Grammar.InsertEdgePointingRight -> Phantoms.TTerm Grammar.InsertEdgePattern
-insertEdgePatternPointingRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.InsertEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pointingRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-insertEdgePatternUndirected :: Phantoms.TTerm Grammar.InsertEdgeUndirected -> Phantoms.TTerm Grammar.InsertEdgePattern
-insertEdgePatternUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.InsertEdgePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-insertElementPatternFiller :: Phantoms.TTerm (Maybe Grammar.ElementVariableDeclaration) -> Phantoms.TTerm (Maybe Grammar.LabelAndPropertySetSpecification) -> Phantoms.TTerm Grammar.InsertElementPatternFiller
-insertElementPatternFiller variableDeclaration labelAndProperties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm variableDeclaration)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelAndProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm labelAndProperties)}]}))
-
-insertElementPatternFillerLabelAndProperties :: Phantoms.TTerm Grammar.InsertElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.LabelAndPropertySetSpecification)
-insertElementPatternFillerLabelAndProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-        Core.projectionField = (Core.Name "labelAndProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertElementPatternFillerVariableDeclaration :: Phantoms.TTerm Grammar.InsertElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.ElementVariableDeclaration)
-insertElementPatternFillerVariableDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-        Core.projectionField = (Core.Name "variableDeclaration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertElementPatternFillerWithLabelAndProperties :: Phantoms.TTerm Grammar.InsertElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.LabelAndPropertySetSpecification) -> Phantoms.TTerm Grammar.InsertElementPatternFiller
-insertElementPatternFillerWithLabelAndProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-              Core.projectionField = (Core.Name "variableDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelAndProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-insertElementPatternFillerWithVariableDeclaration :: Phantoms.TTerm Grammar.InsertElementPatternFiller -> Phantoms.TTerm (Maybe Grammar.ElementVariableDeclaration) -> Phantoms.TTerm Grammar.InsertElementPatternFiller
-insertElementPatternFillerWithVariableDeclaration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelAndProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InsertElementPatternFiller"),
-              Core.projectionField = (Core.Name "labelAndProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-insertPathPattern :: Phantoms.TTerm Grammar.InsertNodePattern -> Phantoms.TTerm [Grammar.InsertEdgeAndNode] -> Phantoms.TTerm Grammar.InsertPathPattern
-insertPathPattern startNode edgesAndNodes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Phantoms.unTTerm startNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgesAndNodes"),
-          Core.fieldTerm = (Phantoms.unTTerm edgesAndNodes)}]}))
-
-insertPathPatternEdgesAndNodes :: Phantoms.TTerm Grammar.InsertPathPattern -> Phantoms.TTerm [Grammar.InsertEdgeAndNode]
-insertPathPatternEdgesAndNodes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-        Core.projectionField = (Core.Name "edgesAndNodes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertPathPatternStartNode :: Phantoms.TTerm Grammar.InsertPathPattern -> Phantoms.TTerm Grammar.InsertNodePattern
-insertPathPatternStartNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-        Core.projectionField = (Core.Name "startNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertPathPatternWithEdgesAndNodes :: Phantoms.TTerm Grammar.InsertPathPattern -> Phantoms.TTerm [Grammar.InsertEdgeAndNode] -> Phantoms.TTerm Grammar.InsertPathPattern
-insertPathPatternWithEdgesAndNodes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-              Core.projectionField = (Core.Name "startNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgesAndNodes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-insertPathPatternWithStartNode :: Phantoms.TTerm Grammar.InsertPathPattern -> Phantoms.TTerm Grammar.InsertNodePattern -> Phantoms.TTerm Grammar.InsertPathPattern
-insertPathPatternWithStartNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "startNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgesAndNodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.InsertPathPattern"),
-              Core.projectionField = (Core.Name "edgesAndNodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-int128Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int128Type
-int128Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-int128TypeNotNull :: Phantoms.TTerm Grammar.Int128Type -> Phantoms.TTerm Bool
-int128TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Int128Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-int128TypeWithNotNull :: Phantoms.TTerm Grammar.Int128Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int128Type
-int128TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-int16Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int16Type
-int16Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-int16TypeNotNull :: Phantoms.TTerm Grammar.Int16Type -> Phantoms.TTerm Bool
-int16TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Int16Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-int16TypeWithNotNull :: Phantoms.TTerm Grammar.Int16Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int16Type
-int16TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-int256Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int256Type
-int256Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-int256TypeNotNull :: Phantoms.TTerm Grammar.Int256Type -> Phantoms.TTerm Bool
-int256TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Int256Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-int256TypeWithNotNull :: Phantoms.TTerm Grammar.Int256Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int256Type
-int256TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-int32Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int32Type
-int32Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-int32TypeNotNull :: Phantoms.TTerm Grammar.Int32Type -> Phantoms.TTerm Bool
-int32TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Int32Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-int32TypeWithNotNull :: Phantoms.TTerm Grammar.Int32Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int32Type
-int32TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-int64Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int64Type
-int64Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-int64TypeNotNull :: Phantoms.TTerm Grammar.Int64Type -> Phantoms.TTerm Bool
-int64TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Int64Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-int64TypeWithNotNull :: Phantoms.TTerm Grammar.Int64Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int64Type
-int64TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-int8Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int8Type
-int8Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int8Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-int8TypeNotNull :: Phantoms.TTerm Grammar.Int8Type -> Phantoms.TTerm Bool
-int8TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Int8Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-int8TypeWithNotNull :: Phantoms.TTerm Grammar.Int8Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Int8Type
-int8TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Int8Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-intWithPrecision :: Phantoms.TTerm (Maybe Grammar.Precision) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.IntWithPrecision
-intWithPrecision precision notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-intWithPrecisionNotNull :: Phantoms.TTerm Grammar.IntWithPrecision -> Phantoms.TTerm Bool
-intWithPrecisionNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-intWithPrecisionPrecision :: Phantoms.TTerm Grammar.IntWithPrecision -> Phantoms.TTerm (Maybe Grammar.Precision)
-intWithPrecisionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-intWithPrecisionWithNotNull :: Phantoms.TTerm Grammar.IntWithPrecision -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.IntWithPrecision
-intWithPrecisionWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-intWithPrecisionWithPrecision :: Phantoms.TTerm Grammar.IntWithPrecision -> Phantoms.TTerm (Maybe Grammar.Precision) -> Phantoms.TTerm Grammar.IntWithPrecision
-intWithPrecisionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IntWithPrecision"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-integer128Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer128Type
-integer128Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integer128TypeNotNull :: Phantoms.TTerm Grammar.Integer128Type -> Phantoms.TTerm Bool
-integer128TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Integer128Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integer128TypeWithNotNull :: Phantoms.TTerm Grammar.Integer128Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer128Type
-integer128TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integer16Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer16Type
-integer16Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integer16TypeNotNull :: Phantoms.TTerm Grammar.Integer16Type -> Phantoms.TTerm Bool
-integer16TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Integer16Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integer16TypeWithNotNull :: Phantoms.TTerm Grammar.Integer16Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer16Type
-integer16TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integer256Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer256Type
-integer256Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integer256TypeNotNull :: Phantoms.TTerm Grammar.Integer256Type -> Phantoms.TTerm Bool
-integer256TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Integer256Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integer256TypeWithNotNull :: Phantoms.TTerm Grammar.Integer256Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer256Type
-integer256TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integer32Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer32Type
-integer32Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integer32TypeNotNull :: Phantoms.TTerm Grammar.Integer32Type -> Phantoms.TTerm Bool
-integer32TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Integer32Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integer32TypeWithNotNull :: Phantoms.TTerm Grammar.Integer32Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer32Type
-integer32TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integer64Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer64Type
-integer64Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integer64TypeNotNull :: Phantoms.TTerm Grammar.Integer64Type -> Phantoms.TTerm Bool
-integer64TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Integer64Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integer64TypeWithNotNull :: Phantoms.TTerm Grammar.Integer64Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer64Type
-integer64TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integer8Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer8Type
-integer8Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer8Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integer8TypeNotNull :: Phantoms.TTerm Grammar.Integer8Type -> Phantoms.TTerm Bool
-integer8TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Integer8Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integer8TypeWithNotNull :: Phantoms.TTerm Grammar.Integer8Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Integer8Type
-integer8TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Integer8Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integerWithPrecision :: Phantoms.TTerm (Maybe Grammar.Precision) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.IntegerWithPrecision
-integerWithPrecision precision notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-integerWithPrecisionNotNull :: Phantoms.TTerm Grammar.IntegerWithPrecision -> Phantoms.TTerm Bool
-integerWithPrecisionNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerWithPrecisionPrecision :: Phantoms.TTerm Grammar.IntegerWithPrecision -> Phantoms.TTerm (Maybe Grammar.Precision)
-integerWithPrecisionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerWithPrecisionWithNotNull :: Phantoms.TTerm Grammar.IntegerWithPrecision -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.IntegerWithPrecision
-integerWithPrecisionWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integerWithPrecisionWithPrecision :: Phantoms.TTerm Grammar.IntegerWithPrecision -> Phantoms.TTerm (Maybe Grammar.Precision) -> Phantoms.TTerm Grammar.IntegerWithPrecision
-integerWithPrecisionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IntegerWithPrecision"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isLabelExpression :: Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.IsLabelExpression
-isLabelExpression isOrColon label =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm isOrColon)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)}]}))
-
-isLabelExpressionIsOrColon :: Phantoms.TTerm Grammar.IsLabelExpression -> Phantoms.TTerm Grammar.IsOrColon
-isLabelExpressionIsOrColon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-        Core.projectionField = (Core.Name "isOrColon")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isLabelExpressionLabel :: Phantoms.TTerm Grammar.IsLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-isLabelExpressionLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isLabelExpressionWithIsOrColon :: Phantoms.TTerm Grammar.IsLabelExpression -> Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.IsLabelExpression
-isLabelExpressionWithIsOrColon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isLabelExpressionWithLabel :: Phantoms.TTerm Grammar.IsLabelExpression -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.IsLabelExpression
-isLabelExpressionWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsLabelExpression"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-isLabeledOrColonColon :: Phantoms.TTerm Grammar.IsLabeledOrColon
-isLabeledOrColonColon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.IsLabeledOrColon"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "colon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-isLabeledOrColonNot :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.IsLabeledOrColon
-isLabeledOrColonNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.IsLabeledOrColon"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-isNotExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TruthValue -> Phantoms.TTerm Grammar.IsNotExpr
-isNotExpr valueExpression not truthValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "truthValue"),
-          Core.fieldTerm = (Phantoms.unTTerm truthValue)}]}))
-
-isNotExprNot :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Bool
-isNotExprNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isNotExprTruthValue :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Grammar.TruthValue
-isNotExprTruthValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-        Core.projectionField = (Core.Name "truthValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isNotExprValueExpression :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Grammar.ValueExpression
-isNotExprValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isNotExprWithNot :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.IsNotExpr
-isNotExprWithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "truthValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-              Core.projectionField = (Core.Name "truthValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isNotExprWithTruthValue :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Grammar.TruthValue -> Phantoms.TTerm Grammar.IsNotExpr
-isNotExprWithTruthValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "truthValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-isNotExprWithValueExpression :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.IsNotExpr
-isNotExprWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "truthValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsNotExpr"),
-              Core.projectionField = (Core.Name "truthValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isOrColonColon :: Phantoms.TTerm Grammar.IsOrColon
-isOrColonColon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.IsOrColon"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "colon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-isOrColonIs :: Phantoms.TTerm Grammar.IsOrColon
-isOrColonIs =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.IsOrColon"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "is"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-isOrColonWithLabels :: Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.LabelSetSpecification -> Phantoms.TTerm Grammar.IsOrColonWithLabels
-isOrColonWithLabels isOrColon labels =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm isOrColon)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm labels)}]}))
-
-isOrColonWithLabelsIsOrColon :: Phantoms.TTerm Grammar.IsOrColonWithLabels -> Phantoms.TTerm Grammar.IsOrColon
-isOrColonWithLabelsIsOrColon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-        Core.projectionField = (Core.Name "isOrColon")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isOrColonWithLabelsLabels :: Phantoms.TTerm Grammar.IsOrColonWithLabels -> Phantoms.TTerm Grammar.LabelSetSpecification
-isOrColonWithLabelsLabels x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-        Core.projectionField = (Core.Name "labels")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-isOrColonWithLabelsWithIsOrColon :: Phantoms.TTerm Grammar.IsOrColonWithLabels -> Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.IsOrColonWithLabels
-isOrColonWithLabelsWithIsOrColon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-              Core.projectionField = (Core.Name "labels")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-isOrColonWithLabelsWithLabels :: Phantoms.TTerm Grammar.IsOrColonWithLabels -> Phantoms.TTerm Grammar.LabelSetSpecification -> Phantoms.TTerm Grammar.IsOrColonWithLabels
-isOrColonWithLabelsWithLabels original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.IsOrColonWithLabels"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labels"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labelAndPropertySetSpecification :: Phantoms.TTerm (Maybe Grammar.IsOrColon) -> Phantoms.TTerm (Maybe Grammar.LabelSetSpecification) -> Phantoms.TTerm (Maybe Grammar.ElementPropertySpecification) -> Phantoms.TTerm Grammar.LabelAndPropertySetSpecification
-labelAndPropertySetSpecification isOrColon labelSet propertySpecification =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm isOrColon)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm labelSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertySpecification"),
-          Core.fieldTerm = (Phantoms.unTTerm propertySpecification)}]}))
-
-labelAndPropertySetSpecificationIsOrColon :: Phantoms.TTerm Grammar.LabelAndPropertySetSpecification -> Phantoms.TTerm (Maybe Grammar.IsOrColon)
-labelAndPropertySetSpecificationIsOrColon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-        Core.projectionField = (Core.Name "isOrColon")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labelAndPropertySetSpecificationLabelSet :: Phantoms.TTerm Grammar.LabelAndPropertySetSpecification -> Phantoms.TTerm (Maybe Grammar.LabelSetSpecification)
-labelAndPropertySetSpecificationLabelSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-        Core.projectionField = (Core.Name "labelSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labelAndPropertySetSpecificationPropertySpecification :: Phantoms.TTerm Grammar.LabelAndPropertySetSpecification -> Phantoms.TTerm (Maybe Grammar.ElementPropertySpecification)
-labelAndPropertySetSpecificationPropertySpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-        Core.projectionField = (Core.Name "propertySpecification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labelAndPropertySetSpecificationWithIsOrColon :: Phantoms.TTerm Grammar.LabelAndPropertySetSpecification -> Phantoms.TTerm (Maybe Grammar.IsOrColon) -> Phantoms.TTerm Grammar.LabelAndPropertySetSpecification
-labelAndPropertySetSpecificationWithIsOrColon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-              Core.projectionField = (Core.Name "labelSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertySpecification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-              Core.projectionField = (Core.Name "propertySpecification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labelAndPropertySetSpecificationWithLabelSet :: Phantoms.TTerm Grammar.LabelAndPropertySetSpecification -> Phantoms.TTerm (Maybe Grammar.LabelSetSpecification) -> Phantoms.TTerm Grammar.LabelAndPropertySetSpecification
-labelAndPropertySetSpecificationWithLabelSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertySpecification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-              Core.projectionField = (Core.Name "propertySpecification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labelAndPropertySetSpecificationWithPropertySpecification :: Phantoms.TTerm Grammar.LabelAndPropertySetSpecification -> Phantoms.TTerm (Maybe Grammar.ElementPropertySpecification) -> Phantoms.TTerm Grammar.LabelAndPropertySetSpecification
-labelAndPropertySetSpecificationWithPropertySpecification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabelAndPropertySetSpecification"),
-              Core.projectionField = (Core.Name "labelSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertySpecification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labelExpressionConjunction :: Phantoms.TTerm Grammar.ConjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-labelExpressionConjunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conjunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelExpressionDisjunction :: Phantoms.TTerm Grammar.DisjunctionLabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-labelExpressionDisjunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelExpressionName :: Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.LabelExpression
-labelExpressionName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelExpressionNegation :: Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-labelExpressionNegation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelExpressionParenthesized :: Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.LabelExpression
-labelExpressionParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelExpressionWildcard :: Phantoms.TTerm Grammar.LabelExpression
-labelExpressionWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-labelSetPhraseIsOrColonWithLabels :: Phantoms.TTerm Grammar.IsOrColonWithLabels -> Phantoms.TTerm Grammar.LabelSetPhrase
-labelSetPhraseIsOrColonWithLabels x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelSetPhrase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "isOrColonWithLabels"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelSetPhraseMultipleLabels :: Phantoms.TTerm Grammar.LabelSetSpecification -> Phantoms.TTerm Grammar.LabelSetPhrase
-labelSetPhraseMultipleLabels x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelSetPhrase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multipleLabels"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelSetPhraseSingleLabel :: Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.LabelSetPhrase
-labelSetPhraseSingleLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LabelSetPhrase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singleLabel"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labeledPredicate :: Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.LabeledPredicate
-labeledPredicate elementVariableReference labeledPart =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Phantoms.unTTerm elementVariableReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labeledPart"),
-          Core.fieldTerm = (Phantoms.unTTerm labeledPart)}]}))
-
-labeledPredicateElementVariableReference :: Phantoms.TTerm Grammar.LabeledPredicate -> Phantoms.TTerm Grammar.ElementVariableReference
-labeledPredicateElementVariableReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-        Core.projectionField = (Core.Name "elementVariableReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledPredicateLabeledPart :: Phantoms.TTerm Grammar.LabeledPredicate -> Phantoms.TTerm Grammar.LabeledPredicatePart2
-labeledPredicateLabeledPart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-        Core.projectionField = (Core.Name "labeledPart")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledPredicatePart2 :: Phantoms.TTerm Grammar.IsLabeledOrColon -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.LabeledPredicatePart2
-labeledPredicatePart2 isLabeledOrColon labelExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabeledOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm isLabeledOrColon)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm labelExpression)}]}))
-
-labeledPredicatePart2IsLabeledOrColon :: Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.IsLabeledOrColon
-labeledPredicatePart2IsLabeledOrColon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-        Core.projectionField = (Core.Name "isLabeledOrColon")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledPredicatePart2LabelExpression :: Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.LabelExpression
-labeledPredicatePart2LabelExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-        Core.projectionField = (Core.Name "labelExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-labeledPredicatePart2WithIsLabeledOrColon :: Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.IsLabeledOrColon -> Phantoms.TTerm Grammar.LabeledPredicatePart2
-labeledPredicatePart2WithIsLabeledOrColon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabeledOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-              Core.projectionField = (Core.Name "labelExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledPredicatePart2WithLabelExpression :: Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.LabelExpression -> Phantoms.TTerm Grammar.LabeledPredicatePart2
-labeledPredicatePart2WithLabelExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isLabeledOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicatePart2"),
-              Core.projectionField = (Core.Name "isLabeledOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labelExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-labeledPredicateWithElementVariableReference :: Phantoms.TTerm Grammar.LabeledPredicate -> Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.LabeledPredicate
-labeledPredicateWithElementVariableReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "labeledPart"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-              Core.projectionField = (Core.Name "labeledPart")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labeledPredicateWithLabeledPart :: Phantoms.TTerm Grammar.LabeledPredicate -> Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.LabeledPredicate
-labeledPredicateWithLabeledPart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LabeledPredicate"),
-              Core.projectionField = (Core.Name "elementVariableReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "labeledPart"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lengthExpressionByte :: Phantoms.TTerm Grammar.ByteLengthExpression -> Phantoms.TTerm Grammar.LengthExpression
-lengthExpressionByte x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LengthExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lengthExpressionChar :: Phantoms.TTerm Grammar.CharLengthExpression -> Phantoms.TTerm Grammar.LengthExpression
-lengthExpressionChar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LengthExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lengthExpressionPath :: Phantoms.TTerm Grammar.PathLengthExpression -> Phantoms.TTerm Grammar.LengthExpression
-lengthExpressionPath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LengthExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letValueExpression :: Phantoms.TTerm Grammar.LetVariableDefinitionList -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.LetValueExpression
-letValueExpression letVariables valueExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "letVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm letVariables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)}]}))
-
-letValueExpressionLetVariables :: Phantoms.TTerm Grammar.LetValueExpression -> Phantoms.TTerm Grammar.LetVariableDefinitionList
-letValueExpressionLetVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-        Core.projectionField = (Core.Name "letVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letValueExpressionValueExpression :: Phantoms.TTerm Grammar.LetValueExpression -> Phantoms.TTerm Grammar.ValueExpression
-letValueExpressionValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letValueExpressionWithLetVariables :: Phantoms.TTerm Grammar.LetValueExpression -> Phantoms.TTerm Grammar.LetVariableDefinitionList -> Phantoms.TTerm Grammar.LetValueExpression
-letValueExpressionWithLetVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "letVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letValueExpressionWithValueExpression :: Phantoms.TTerm Grammar.LetValueExpression -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.LetValueExpression
-letValueExpressionWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "letVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.LetValueExpression"),
-              Core.projectionField = (Core.Name "letVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letVariableDefinitionBindingEqualsValue :: Phantoms.TTerm Grammar.BindingEqualsValue -> Phantoms.TTerm Grammar.LetVariableDefinition
-letVariableDefinitionBindingEqualsValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LetVariableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bindingEqualsValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letVariableDefinitionValueVariable :: Phantoms.TTerm Grammar.ValueVariableDefinition -> Phantoms.TTerm Grammar.LetVariableDefinition
-letVariableDefinitionValueVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LetVariableDefinition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-linearDataModifyingStatementAmbient :: Phantoms.TTerm Grammar.AmbientLinearDataModifyingStatement -> Phantoms.TTerm Grammar.LinearDataModifyingStatement
-linearDataModifyingStatementAmbient x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LinearDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ambient"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-linearDataModifyingStatementFocused :: Phantoms.TTerm Grammar.FocusedLinearDataModifyingStatement -> Phantoms.TTerm Grammar.LinearDataModifyingStatement
-linearDataModifyingStatementFocused x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LinearDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "focused"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-linearQueryStatementAmbient :: Phantoms.TTerm Grammar.AmbientLinearQueryStatement -> Phantoms.TTerm Grammar.LinearQueryStatement
-linearQueryStatementAmbient x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ambient"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-linearQueryStatementFocused :: Phantoms.TTerm Grammar.FocusedLinearQueryStatement -> Phantoms.TTerm Grammar.LinearQueryStatement
-linearQueryStatementFocused x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LinearQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "focused"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listValueConstructorByEnumeration :: Phantoms.TTerm (Maybe Grammar.ListValueTypeName) -> Phantoms.TTerm (Maybe Grammar.ListElementList) -> Phantoms.TTerm Grammar.ListValueConstructorByEnumeration
-listValueConstructorByEnumeration listValueTypeName elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listValueTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm listValueTypeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-listValueConstructorByEnumerationElements :: Phantoms.TTerm Grammar.ListValueConstructorByEnumeration -> Phantoms.TTerm (Maybe Grammar.ListElementList)
-listValueConstructorByEnumerationElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueConstructorByEnumerationListValueTypeName :: Phantoms.TTerm Grammar.ListValueConstructorByEnumeration -> Phantoms.TTerm (Maybe Grammar.ListValueTypeName)
-listValueConstructorByEnumerationListValueTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-        Core.projectionField = (Core.Name "listValueTypeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueConstructorByEnumerationWithElements :: Phantoms.TTerm Grammar.ListValueConstructorByEnumeration -> Phantoms.TTerm (Maybe Grammar.ListElementList) -> Phantoms.TTerm Grammar.ListValueConstructorByEnumeration
-listValueConstructorByEnumerationWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listValueTypeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "listValueTypeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listValueConstructorByEnumerationWithListValueTypeName :: Phantoms.TTerm Grammar.ListValueConstructorByEnumeration -> Phantoms.TTerm (Maybe Grammar.ListValueTypeName) -> Phantoms.TTerm Grammar.ListValueConstructorByEnumeration
-listValueConstructorByEnumerationWithListValueTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listValueTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueFunctionElements :: Phantoms.TTerm Grammar.ElementsFunction -> Phantoms.TTerm Grammar.ListValueFunction
-listValueFunctionElements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ListValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listValueFunctionTrim :: Phantoms.TTerm Grammar.TrimListFunction -> Phantoms.TTerm Grammar.ListValueFunction
-listValueFunctionTrim x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ListValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trim"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-listValueTypeAlt1 :: Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeAlt1
-listValueTypeAlt1 typeName valueType maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-listValueTypeAlt1MaxLength :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-listValueTypeAlt1MaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt1NotNull :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Bool
-listValueTypeAlt1NotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt1TypeName :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Grammar.ListValueTypeName
-listValueTypeAlt1TypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt1ValueType :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Grammar.ValueType
-listValueTypeAlt1ValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt1WithMaxLength :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.ListValueTypeAlt1
-listValueTypeAlt1WithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt1WithNotNull :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeAlt1
-listValueTypeAlt1WithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listValueTypeAlt1WithTypeName :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Grammar.ListValueTypeAlt1
-listValueTypeAlt1WithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt1WithValueType :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.ListValueTypeAlt1
-listValueTypeAlt1WithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt1"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt2 :: Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeAlt2
-listValueTypeAlt2 valueType typeName maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-listValueTypeAlt2MaxLength :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-listValueTypeAlt2MaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt2NotNull :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Bool
-listValueTypeAlt2NotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt2TypeName :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Grammar.ListValueTypeName
-listValueTypeAlt2TypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt2ValueType :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Grammar.ValueType
-listValueTypeAlt2ValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt2WithMaxLength :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.ListValueTypeAlt2
-listValueTypeAlt2WithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt2WithNotNull :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeAlt2
-listValueTypeAlt2WithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listValueTypeAlt2WithTypeName :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Grammar.ListValueTypeAlt2
-listValueTypeAlt2WithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt2WithValueType :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.ListValueTypeAlt2
-listValueTypeAlt2WithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt2"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt3 :: Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeAlt3
-listValueTypeAlt3 typeName maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-listValueTypeAlt3MaxLength :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-listValueTypeAlt3MaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt3NotNull :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm Bool
-listValueTypeAlt3NotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt3TypeName :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm Grammar.ListValueTypeName
-listValueTypeAlt3TypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeAlt3WithMaxLength :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.ListValueTypeAlt3
-listValueTypeAlt3WithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeAlt3WithNotNull :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeAlt3
-listValueTypeAlt3WithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-listValueTypeAlt3WithTypeName :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Grammar.ListValueTypeAlt3
-listValueTypeAlt3WithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeAlt3"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeName :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeNameSynonym -> Phantoms.TTerm Grammar.ListValueTypeName
-listValueTypeName group synonym =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "group"),
-          Core.fieldTerm = (Phantoms.unTTerm group)},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm synonym)}]}))
-
-listValueTypeNameGroup :: Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Bool
-listValueTypeNameGroup x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-        Core.projectionField = (Core.Name "group")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeNameSynonym :: Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Grammar.ListValueTypeNameSynonym
-listValueTypeNameSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-        Core.projectionField = (Core.Name "synonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listValueTypeNameSynonymArray :: Phantoms.TTerm Grammar.ListValueTypeNameSynonym
-listValueTypeNameSynonymArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ListValueTypeNameSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-listValueTypeNameSynonymList :: Phantoms.TTerm Grammar.ListValueTypeNameSynonym
-listValueTypeNameSynonymList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ListValueTypeNameSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-listValueTypeNameWithGroup :: Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ListValueTypeName
-listValueTypeNameWithGroup original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "group"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listValueTypeNameWithSynonym :: Phantoms.TTerm Grammar.ListValueTypeName -> Phantoms.TTerm Grammar.ListValueTypeNameSynonym -> Phantoms.TTerm Grammar.ListValueTypeName
-listValueTypeNameWithSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "group"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ListValueTypeName"),
-              Core.projectionField = (Core.Name "group")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localDatetimeType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.LocalDatetimeType
-localDatetimeType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LocalDatetimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-localDatetimeTypeChoiceLocalDatetime :: Phantoms.TTerm Grammar.LocalDatetimeType -> Phantoms.TTerm Grammar.LocalDatetimeTypeChoice
-localDatetimeTypeChoiceLocalDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LocalDatetimeTypeChoice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localDatetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localDatetimeTypeChoiceTimestampWithoutTimeZone :: Phantoms.TTerm Grammar.TimestampWithoutTimeZoneType -> Phantoms.TTerm Grammar.LocalDatetimeTypeChoice
-localDatetimeTypeChoiceTimestampWithoutTimeZone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LocalDatetimeTypeChoice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timestampWithoutTimeZone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localDatetimeTypeNotNull :: Phantoms.TTerm Grammar.LocalDatetimeType -> Phantoms.TTerm Bool
-localDatetimeTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LocalDatetimeType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localDatetimeTypeWithNotNull :: Phantoms.TTerm Grammar.LocalDatetimeType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.LocalDatetimeType
-localDatetimeTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LocalDatetimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localTimeType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.LocalTimeType
-localTimeType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LocalTimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-localTimeTypeChoiceLocalTime :: Phantoms.TTerm Grammar.LocalTimeType -> Phantoms.TTerm Grammar.LocalTimeTypeChoice
-localTimeTypeChoiceLocalTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LocalTimeTypeChoice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localTime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localTimeTypeChoiceTimeWithoutTimeZone :: Phantoms.TTerm Grammar.TimeWithoutTimeZoneType -> Phantoms.TTerm Grammar.LocalTimeTypeChoice
-localTimeTypeChoiceTimeWithoutTimeZone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LocalTimeTypeChoice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeWithoutTimeZone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localTimeTypeNotNull :: Phantoms.TTerm Grammar.LocalTimeType -> Phantoms.TTerm Bool
-localTimeTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.LocalTimeType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-localTimeTypeWithNotNull :: Phantoms.TTerm Grammar.LocalTimeType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.LocalTimeType
-localTimeTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.LocalTimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-localdatetimeFunctionLocalDatetimeWithParams :: Phantoms.TTerm (Maybe Grammar.DatetimeFunctionParameters) -> Phantoms.TTerm Grammar.LocaldatetimeFunction
-localdatetimeFunctionLocalDatetimeWithParams x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LocaldatetimeFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localDatetimeWithParams"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-localdatetimeFunctionLocalTimestamp :: Phantoms.TTerm Grammar.LocaldatetimeFunction
-localdatetimeFunctionLocalTimestamp =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.LocaldatetimeFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localTimestamp"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-matchModeDifferentEdges :: Phantoms.TTerm Grammar.DifferentEdgesMatchMode -> Phantoms.TTerm Grammar.MatchMode
-matchModeDifferentEdges x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.MatchMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "differentEdges"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-matchModeRepeatableElements :: Phantoms.TTerm Grammar.RepeatableElementsMatchMode -> Phantoms.TTerm Grammar.MatchMode
-matchModeRepeatableElements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.MatchMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeatableElements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-matchStatementOptional :: Phantoms.TTerm Grammar.OptionalMatchStatement -> Phantoms.TTerm Grammar.MatchStatement
-matchStatementOptional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.MatchStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "optional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-matchStatementSimple :: Phantoms.TTerm Grammar.SimpleMatchStatement -> Phantoms.TTerm Grammar.MatchStatement
-matchStatementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.MatchStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-modulusExpression :: Phantoms.TTerm Grammar.NumericValueExpressionDividend -> Phantoms.TTerm Grammar.NumericValueExpressionDivisor -> Phantoms.TTerm Grammar.ModulusExpression
-modulusExpression dividend divisor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dividend"),
-          Core.fieldTerm = (Phantoms.unTTerm dividend)},
-        Core.Field {
-          Core.fieldName = (Core.Name "divisor"),
-          Core.fieldTerm = (Phantoms.unTTerm divisor)}]}))
-
-modulusExpressionDividend :: Phantoms.TTerm Grammar.ModulusExpression -> Phantoms.TTerm Grammar.NumericValueExpressionDividend
-modulusExpressionDividend x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-        Core.projectionField = (Core.Name "dividend")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modulusExpressionDivisor :: Phantoms.TTerm Grammar.ModulusExpression -> Phantoms.TTerm Grammar.NumericValueExpressionDivisor
-modulusExpressionDivisor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-        Core.projectionField = (Core.Name "divisor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modulusExpressionWithDividend :: Phantoms.TTerm Grammar.ModulusExpression -> Phantoms.TTerm Grammar.NumericValueExpressionDividend -> Phantoms.TTerm Grammar.ModulusExpression
-modulusExpressionWithDividend original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dividend"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "divisor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-              Core.projectionField = (Core.Name "divisor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-modulusExpressionWithDivisor :: Phantoms.TTerm Grammar.ModulusExpression -> Phantoms.TTerm Grammar.NumericValueExpressionDivisor -> Phantoms.TTerm Grammar.ModulusExpression
-modulusExpressionWithDivisor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dividend"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ModulusExpression"),
-              Core.projectionField = (Core.Name "dividend")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "divisor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mulDivNumericValueExpression :: Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.MultDivOperator -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.MulDivNumericValueExpression
-mulDivNumericValueExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-mulDivNumericValueExpressionLeft :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-mulDivNumericValueExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mulDivNumericValueExpressionOperator :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.MultDivOperator
-mulDivNumericValueExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mulDivNumericValueExpressionRight :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-mulDivNumericValueExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mulDivNumericValueExpressionWithLeft :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.MulDivNumericValueExpression
-mulDivNumericValueExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mulDivNumericValueExpressionWithOperator :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.MultDivOperator -> Phantoms.TTerm Grammar.MulDivNumericValueExpression
-mulDivNumericValueExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mulDivNumericValueExpressionWithRight :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.MulDivNumericValueExpression
-mulDivNumericValueExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MulDivNumericValueExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multDivExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.MultDivOperator -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.MultDivExpr
-multDivExpr left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-multDivExprLeft :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.ValueExpression
-multDivExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multDivExprOperator :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.MultDivOperator
-multDivExprOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multDivExprRight :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.ValueExpression
-multDivExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multDivExprWithLeft :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.MultDivExpr
-multDivExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multDivExprWithOperator :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.MultDivOperator -> Phantoms.TTerm Grammar.MultDivExpr
-multDivExprWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multDivExprWithRight :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.MultDivExpr
-multDivExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.MultDivExpr"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multDivOperatorDivide :: Phantoms.TTerm Grammar.MultDivOperator
-multDivOperatorDivide =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.MultDivOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divide"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-multDivOperatorMultiply :: Phantoms.TTerm Grammar.MultDivOperator
-multDivOperatorMultiply =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.MultDivOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiply"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-namedProcedureCall :: Phantoms.TTerm Grammar.ProcedureReference -> Phantoms.TTerm (Maybe Grammar.ProcedureArgumentList) -> Phantoms.TTerm (Maybe Grammar.YieldClause) -> Phantoms.TTerm Grammar.NamedProcedureCall
-namedProcedureCall reference arguments yield =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Phantoms.unTTerm reference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Phantoms.unTTerm yield)}]}))
-
-namedProcedureCallArguments :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm (Maybe Grammar.ProcedureArgumentList)
-namedProcedureCallArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedProcedureCallReference :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm Grammar.ProcedureReference
-namedProcedureCallReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-        Core.projectionField = (Core.Name "reference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedProcedureCallWithArguments :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm (Maybe Grammar.ProcedureArgumentList) -> Phantoms.TTerm Grammar.NamedProcedureCall
-namedProcedureCallWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-              Core.projectionField = (Core.Name "reference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-              Core.projectionField = (Core.Name "yield")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedProcedureCallWithReference :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm Grammar.ProcedureReference -> Phantoms.TTerm Grammar.NamedProcedureCall
-namedProcedureCallWithReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-              Core.projectionField = (Core.Name "yield")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedProcedureCallWithYield :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm (Maybe Grammar.YieldClause) -> Phantoms.TTerm Grammar.NamedProcedureCall
-namedProcedureCallWithYield original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-              Core.projectionField = (Core.Name "reference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "yield"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedProcedureCallYield :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm (Maybe Grammar.YieldClause)
-namedProcedureCallYield x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NamedProcedureCall"),
-        Core.projectionField = (Core.Name "yield")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nextStatement :: Phantoms.TTerm (Maybe Grammar.YieldClause) -> Phantoms.TTerm Grammar.Statement -> Phantoms.TTerm Grammar.NextStatement
-nextStatement yieldClause statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NextStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldClause"),
-          Core.fieldTerm = (Phantoms.unTTerm yieldClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-nextStatementStatement :: Phantoms.TTerm Grammar.NextStatement -> Phantoms.TTerm Grammar.Statement
-nextStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NextStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nextStatementWithStatement :: Phantoms.TTerm Grammar.NextStatement -> Phantoms.TTerm Grammar.Statement -> Phantoms.TTerm Grammar.NextStatement
-nextStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NextStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NextStatement"),
-              Core.projectionField = (Core.Name "yieldClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nextStatementWithYieldClause :: Phantoms.TTerm Grammar.NextStatement -> Phantoms.TTerm (Maybe Grammar.YieldClause) -> Phantoms.TTerm Grammar.NextStatement
-nextStatementWithYieldClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NextStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "yieldClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NextStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nextStatementYieldClause :: Phantoms.TTerm Grammar.NextStatement -> Phantoms.TTerm (Maybe Grammar.YieldClause)
-nextStatementYieldClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NextStatement"),
-        Core.projectionField = (Core.Name "yieldClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeKeyLabelSetWithContent :: Phantoms.TTerm Grammar.NodeTypeKeyLabelSet -> Phantoms.TTerm (Maybe Grammar.NodeTypeImpliedContent) -> Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent
-nodeKeyLabelSetWithContent keyLabelSet impliedContent =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyLabelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm keyLabelSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "impliedContent"),
-          Core.fieldTerm = (Phantoms.unTTerm impliedContent)}]}))
-
-nodeKeyLabelSetWithContentImpliedContent :: Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent -> Phantoms.TTerm (Maybe Grammar.NodeTypeImpliedContent)
-nodeKeyLabelSetWithContentImpliedContent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-        Core.projectionField = (Core.Name "impliedContent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeKeyLabelSetWithContentKeyLabelSet :: Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent -> Phantoms.TTerm Grammar.NodeTypeKeyLabelSet
-nodeKeyLabelSetWithContentKeyLabelSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-        Core.projectionField = (Core.Name "keyLabelSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeKeyLabelSetWithContentWithImpliedContent :: Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent -> Phantoms.TTerm (Maybe Grammar.NodeTypeImpliedContent) -> Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent
-nodeKeyLabelSetWithContentWithImpliedContent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyLabelSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-              Core.projectionField = (Core.Name "keyLabelSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "impliedContent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeKeyLabelSetWithContentWithKeyLabelSet :: Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent -> Phantoms.TTerm Grammar.NodeTypeKeyLabelSet -> Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent
-nodeKeyLabelSetWithContentWithKeyLabelSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keyLabelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "impliedContent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"),
-              Core.projectionField = (Core.Name "impliedContent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeLabelSetWithProperties :: Phantoms.TTerm Grammar.NodeTypeLabelSet -> Phantoms.TTerm Grammar.NodeTypePropertyTypes -> Phantoms.TTerm Grammar.NodeLabelSetWithProperties
-nodeLabelSetWithProperties labelSet propertyTypes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm labelSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyTypes)}]}))
-
-nodeLabelSetWithPropertiesLabelSet :: Phantoms.TTerm Grammar.NodeLabelSetWithProperties -> Phantoms.TTerm Grammar.NodeTypeLabelSet
-nodeLabelSetWithPropertiesLabelSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-        Core.projectionField = (Core.Name "labelSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeLabelSetWithPropertiesPropertyTypes :: Phantoms.TTerm Grammar.NodeLabelSetWithProperties -> Phantoms.TTerm Grammar.NodeTypePropertyTypes
-nodeLabelSetWithPropertiesPropertyTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-        Core.projectionField = (Core.Name "propertyTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeLabelSetWithPropertiesWithLabelSet :: Phantoms.TTerm Grammar.NodeLabelSetWithProperties -> Phantoms.TTerm Grammar.NodeTypeLabelSet -> Phantoms.TTerm Grammar.NodeLabelSetWithProperties
-nodeLabelSetWithPropertiesWithLabelSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeLabelSetWithPropertiesWithPropertyTypes :: Phantoms.TTerm Grammar.NodeLabelSetWithProperties -> Phantoms.TTerm Grammar.NodeTypePropertyTypes -> Phantoms.TTerm Grammar.NodeLabelSetWithProperties
-nodeLabelSetWithPropertiesWithPropertyTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "labelSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeLabelSetWithProperties"),
-              Core.projectionField = (Core.Name "labelSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeReferenceValueTypeClosed :: Phantoms.TTerm Grammar.ClosedNodeReferenceValueType -> Phantoms.TTerm Grammar.NodeReferenceValueType
-nodeReferenceValueTypeClosed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeReferenceValueTypeOpen :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Grammar.NodeReferenceValueType
-nodeReferenceValueTypeOpen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "open"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeSynonymAndTypeName :: Phantoms.TTerm Grammar.NodeSynonym -> Phantoms.TTerm (Maybe Grammar.NodeTypeName) -> Phantoms.TTerm Grammar.NodeSynonymAndTypeName
-nodeSynonymAndTypeName nodeSynonym typeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeSynonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))
-
-nodeSynonymAndTypeNameNodeSynonym :: Phantoms.TTerm Grammar.NodeSynonymAndTypeName -> Phantoms.TTerm Grammar.NodeSynonym
-nodeSynonymAndTypeNameNodeSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-        Core.projectionField = (Core.Name "nodeSynonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeSynonymAndTypeNameTypeName :: Phantoms.TTerm Grammar.NodeSynonymAndTypeName -> Phantoms.TTerm (Maybe Grammar.NodeTypeName)
-nodeSynonymAndTypeNameTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeSynonymAndTypeNameWithNodeSynonym :: Phantoms.TTerm Grammar.NodeSynonymAndTypeName -> Phantoms.TTerm Grammar.NodeSynonym -> Phantoms.TTerm Grammar.NodeSynonymAndTypeName
-nodeSynonymAndTypeNameWithNodeSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeSynonymAndTypeNameWithTypeName :: Phantoms.TTerm Grammar.NodeSynonymAndTypeName -> Phantoms.TTerm (Maybe Grammar.NodeTypeName) -> Phantoms.TTerm Grammar.NodeSynonymAndTypeName
-nodeSynonymAndTypeNameWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeSynonymAndTypeName"),
-              Core.projectionField = (Core.Name "nodeSynonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeSynonymNode :: Phantoms.TTerm Grammar.NodeSynonym
-nodeSynonymNode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeSynonymVertex :: Phantoms.TTerm Grammar.NodeSynonym
-nodeSynonymVertex =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeTypeFillerImpliedContent :: Phantoms.TTerm Grammar.NodeTypeImpliedContent -> Phantoms.TTerm Grammar.NodeTypeFiller
-nodeTypeFillerImpliedContent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "impliedContent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypeFillerKeyLabelSet :: Phantoms.TTerm Grammar.NodeKeyLabelSetWithContent -> Phantoms.TTerm Grammar.NodeTypeFiller
-nodeTypeFillerKeyLabelSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keyLabelSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypeImpliedContentLabelSet :: Phantoms.TTerm Grammar.NodeTypeLabelSet -> Phantoms.TTerm Grammar.NodeTypeImpliedContent
-nodeTypeImpliedContentLabelSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeImpliedContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labelSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypeImpliedContentLabelSetWithProperties :: Phantoms.TTerm Grammar.NodeLabelSetWithProperties -> Phantoms.TTerm Grammar.NodeTypeImpliedContent
-nodeTypeImpliedContentLabelSetWithProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeImpliedContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labelSetWithProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypeImpliedContentPropertyTypes :: Phantoms.TTerm Grammar.NodeTypePropertyTypes -> Phantoms.TTerm Grammar.NodeTypeImpliedContent
-nodeTypeImpliedContentPropertyTypes x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeImpliedContent"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyTypes"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypeNameWithFiller :: Phantoms.TTerm Grammar.NodeTypeName -> Phantoms.TTerm (Maybe Grammar.NodeTypeFiller) -> Phantoms.TTerm Grammar.NodeTypeNameWithFiller
-nodeTypeNameWithFiller typeName filler =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Phantoms.unTTerm filler)}]}))
-
-nodeTypeNameWithFillerFiller :: Phantoms.TTerm Grammar.NodeTypeNameWithFiller -> Phantoms.TTerm (Maybe Grammar.NodeTypeFiller)
-nodeTypeNameWithFillerFiller x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-        Core.projectionField = (Core.Name "filler")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypeNameWithFillerTypeName :: Phantoms.TTerm Grammar.NodeTypeNameWithFiller -> Phantoms.TTerm Grammar.NodeTypeName
-nodeTypeNameWithFillerTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypeNameWithFillerWithFiller :: Phantoms.TTerm Grammar.NodeTypeNameWithFiller -> Phantoms.TTerm (Maybe Grammar.NodeTypeFiller) -> Phantoms.TTerm Grammar.NodeTypeNameWithFiller
-nodeTypeNameWithFillerWithFiller original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeTypeNameWithFillerWithTypeName :: Phantoms.TTerm Grammar.NodeTypeNameWithFiller -> Phantoms.TTerm Grammar.NodeTypeName -> Phantoms.TTerm Grammar.NodeTypeNameWithFiller
-nodeTypeNameWithFillerWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypeNameWithFiller"),
-              Core.projectionField = (Core.Name "filler")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeTypePattern :: Phantoms.TTerm (Maybe Grammar.NodeSynonymAndTypeName) -> Phantoms.TTerm (Maybe Grammar.LocalNodeTypeAlias) -> Phantoms.TTerm (Maybe Grammar.NodeTypeFiller) -> Phantoms.TTerm Grammar.NodeTypePattern
-nodeTypePattern synonymAndTypeName alias filler =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonymAndTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm synonymAndTypeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Phantoms.unTTerm filler)}]}))
-
-nodeTypePatternAlias :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm (Maybe Grammar.LocalNodeTypeAlias)
-nodeTypePatternAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypePatternFiller :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm (Maybe Grammar.NodeTypeFiller)
-nodeTypePatternFiller x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-        Core.projectionField = (Core.Name "filler")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypePatternSynonymAndTypeName :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm (Maybe Grammar.NodeSynonymAndTypeName)
-nodeTypePatternSynonymAndTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-        Core.projectionField = (Core.Name "synonymAndTypeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypePatternWithAlias :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm (Maybe Grammar.LocalNodeTypeAlias) -> Phantoms.TTerm Grammar.NodeTypePattern
-nodeTypePatternWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonymAndTypeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-              Core.projectionField = (Core.Name "synonymAndTypeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-              Core.projectionField = (Core.Name "filler")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeTypePatternWithFiller :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm (Maybe Grammar.NodeTypeFiller) -> Phantoms.TTerm Grammar.NodeTypePattern
-nodeTypePatternWithFiller original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonymAndTypeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-              Core.projectionField = (Core.Name "synonymAndTypeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeTypePatternWithSynonymAndTypeName :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm (Maybe Grammar.NodeSynonymAndTypeName) -> Phantoms.TTerm Grammar.NodeTypePattern
-nodeTypePatternWithSynonymAndTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonymAndTypeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "filler"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePattern"),
-              Core.projectionField = (Core.Name "filler")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeTypePhrase :: Phantoms.TTerm Grammar.NodeSynonym -> Phantoms.TTerm Grammar.NodeTypePhraseFiller -> Phantoms.TTerm (Maybe Grammar.LocalNodeTypeAlias) -> Phantoms.TTerm Grammar.NodeTypePhrase
-nodeTypePhrase synonym typePhraseFiller alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm synonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typePhraseFiller"),
-          Core.fieldTerm = (Phantoms.unTTerm typePhraseFiller)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-nodeTypePhraseAlias :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm (Maybe Grammar.LocalNodeTypeAlias)
-nodeTypePhraseAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypePhraseFillerFillerOnly :: Phantoms.TTerm Grammar.NodeTypeFiller -> Phantoms.TTerm Grammar.NodeTypePhraseFiller
-nodeTypePhraseFillerFillerOnly x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypePhraseFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fillerOnly"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypePhraseFillerTypeName :: Phantoms.TTerm Grammar.NodeTypeNameWithFiller -> Phantoms.TTerm Grammar.NodeTypePhraseFiller
-nodeTypePhraseFillerTypeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypePhraseFiller"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypePhraseSynonym :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm Grammar.NodeSynonym
-nodeTypePhraseSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-        Core.projectionField = (Core.Name "synonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypePhraseTypePhraseFiller :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm Grammar.NodeTypePhraseFiller
-nodeTypePhraseTypePhraseFiller x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-        Core.projectionField = (Core.Name "typePhraseFiller")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeTypePhraseWithAlias :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm (Maybe Grammar.LocalNodeTypeAlias) -> Phantoms.TTerm Grammar.NodeTypePhrase
-nodeTypePhraseWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typePhraseFiller"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-              Core.projectionField = (Core.Name "typePhraseFiller")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeTypePhraseWithSynonym :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm Grammar.NodeSynonym -> Phantoms.TTerm Grammar.NodeTypePhrase
-nodeTypePhraseWithSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typePhraseFiller"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-              Core.projectionField = (Core.Name "typePhraseFiller")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeTypePhraseWithTypePhraseFiller :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm Grammar.NodeTypePhraseFiller -> Phantoms.TTerm Grammar.NodeTypePhrase
-nodeTypePhraseWithTypePhraseFiller original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typePhraseFiller"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NodeTypePhrase"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeTypeSpecificationPattern :: Phantoms.TTerm Grammar.NodeTypePattern -> Phantoms.TTerm Grammar.NodeTypeSpecification
-nodeTypeSpecificationPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeTypeSpecificationPhrase :: Phantoms.TTerm Grammar.NodeTypePhrase -> Phantoms.TTerm Grammar.NodeTypeSpecification
-nodeTypeSpecificationPhrase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NodeTypeSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "phrase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonNegativeIntegerSpecificationDynamicParameterSpecification :: Phantoms.TTerm Grammar.DynamicParameterSpecification -> Phantoms.TTerm Grammar.NonNegativeIntegerSpecification
-nonNegativeIntegerSpecificationDynamicParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonNegativeIntegerSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dynamicParameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonNegativeIntegerSpecificationUnsignedInteger :: Phantoms.TTerm Grammar.UnsignedInteger -> Phantoms.TTerm Grammar.NonNegativeIntegerSpecification
-nonNegativeIntegerSpecificationUnsignedInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonNegativeIntegerSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedInteger"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionBindingVariable :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpression
-nonParenthesizedPrimaryValueExpressionBindingVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bindingVariable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecial :: Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpression
-nonParenthesizedPrimaryValueExpressionSpecial x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "special"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseAggregateFunction :: Phantoms.TTerm Grammar.AggregateFunction -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseAggregateFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aggregateFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseCaseExpression :: Phantoms.TTerm Grammar.CaseExpression -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseCaseExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "caseExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseCastSpecification :: Phantoms.TTerm Grammar.CastSpecification -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseCastSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "castSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseElementIdFunction :: Phantoms.TTerm Grammar.ElementIdFunction -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseElementIdFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementIdFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseLetValueExpression :: Phantoms.TTerm Grammar.LetValueExpression -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseLetValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "letValueExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCasePathValueConstructor :: Phantoms.TTerm Grammar.PathValueConstructor -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCasePathValueConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pathValueConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCasePropertyReference :: Phantoms.TTerm Grammar.PropertyReference -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCasePropertyReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseUnsignedValueSpecification :: Phantoms.TTerm Grammar.UnsignedValueSpecification -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseUnsignedValueSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedValueSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonParenthesizedPrimaryValueExpressionSpecialCaseValueQueryExpression :: Phantoms.TTerm Grammar.ValueQueryExpression -> Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase
-nonParenthesizedPrimaryValueExpressionSpecialCaseValueQueryExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueQueryExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-normalFormNfc :: Phantoms.TTerm Grammar.NormalForm
-normalFormNfc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NormalForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nfc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-normalFormNfd :: Phantoms.TTerm Grammar.NormalForm
-normalFormNfd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NormalForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nfd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-normalFormNfkc :: Phantoms.TTerm Grammar.NormalForm
-normalFormNfkc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NormalForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nfkc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-normalFormNfkd :: Phantoms.TTerm Grammar.NormalForm
-normalFormNfkd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NormalForm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nfkd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-normalizeCharacterString :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm (Maybe Grammar.NormalForm) -> Phantoms.TTerm Grammar.NormalizeCharacterString
-normalizeCharacterString valueExpression normalForm =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalForm"),
-          Core.fieldTerm = (Phantoms.unTTerm normalForm)}]}))
-
-normalizeCharacterStringNormalForm :: Phantoms.TTerm Grammar.NormalizeCharacterString -> Phantoms.TTerm (Maybe Grammar.NormalForm)
-normalizeCharacterStringNormalForm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-        Core.projectionField = (Core.Name "normalForm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalizeCharacterStringValueExpression :: Phantoms.TTerm Grammar.NormalizeCharacterString -> Phantoms.TTerm Grammar.ValueExpression
-normalizeCharacterStringValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalizeCharacterStringWithNormalForm :: Phantoms.TTerm Grammar.NormalizeCharacterString -> Phantoms.TTerm (Maybe Grammar.NormalForm) -> Phantoms.TTerm Grammar.NormalizeCharacterString
-normalizeCharacterStringWithNormalForm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalForm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalizeCharacterStringWithValueExpression :: Phantoms.TTerm Grammar.NormalizeCharacterString -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.NormalizeCharacterString
-normalizeCharacterStringWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalForm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizeCharacterString"),
-              Core.projectionField = (Core.Name "normalForm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalizedPredicateExpr :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm Grammar.NormalizedPredicateExpr
-normalizedPredicateExpr valueExpression normalizedPredicate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalizedPredicate"),
-          Core.fieldTerm = (Phantoms.unTTerm normalizedPredicate)}]}))
-
-normalizedPredicateExprNormalizedPredicate :: Phantoms.TTerm Grammar.NormalizedPredicateExpr -> Phantoms.TTerm Grammar.NormalizedPredicatePart2
-normalizedPredicateExprNormalizedPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-        Core.projectionField = (Core.Name "normalizedPredicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalizedPredicateExprValueExpression :: Phantoms.TTerm Grammar.NormalizedPredicateExpr -> Phantoms.TTerm Grammar.ValueExpression
-normalizedPredicateExprValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalizedPredicateExprWithNormalizedPredicate :: Phantoms.TTerm Grammar.NormalizedPredicateExpr -> Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm Grammar.NormalizedPredicateExpr
-normalizedPredicateExprWithNormalizedPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalizedPredicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalizedPredicateExprWithValueExpression :: Phantoms.TTerm Grammar.NormalizedPredicateExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.NormalizedPredicateExpr
-normalizedPredicateExprWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalizedPredicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicateExpr"),
-              Core.projectionField = (Core.Name "normalizedPredicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-normalizedPredicatePart2 :: Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Grammar.NormalForm) -> Phantoms.TTerm Grammar.NormalizedPredicatePart2
-normalizedPredicatePart2 not normalForm =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalForm"),
-          Core.fieldTerm = (Phantoms.unTTerm normalForm)}]}))
-
-normalizedPredicatePart2NormalForm :: Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm (Maybe Grammar.NormalForm)
-normalizedPredicatePart2NormalForm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-        Core.projectionField = (Core.Name "normalForm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalizedPredicatePart2Not :: Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm Bool
-normalizedPredicatePart2Not x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-normalizedPredicatePart2WithNormalForm :: Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm (Maybe Grammar.NormalForm) -> Phantoms.TTerm Grammar.NormalizedPredicatePart2
-normalizedPredicatePart2WithNormalForm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalForm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-normalizedPredicatePart2WithNot :: Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.NormalizedPredicatePart2
-normalizedPredicatePart2WithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "normalForm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NormalizedPredicatePart2"),
-              Core.projectionField = (Core.Name "normalForm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullIfAbbreviation :: Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.NullIfAbbreviation
-nullIfAbbreviation first second =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm second)}]}))
-
-nullIfAbbreviationFirst :: Phantoms.TTerm Grammar.NullIfAbbreviation -> Phantoms.TTerm Grammar.ValueExpression
-nullIfAbbreviationFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullIfAbbreviationSecond :: Phantoms.TTerm Grammar.NullIfAbbreviation -> Phantoms.TTerm Grammar.ValueExpression
-nullIfAbbreviationSecond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-        Core.projectionField = (Core.Name "second")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullIfAbbreviationWithFirst :: Phantoms.TTerm Grammar.NullIfAbbreviation -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.NullIfAbbreviation
-nullIfAbbreviationWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-              Core.projectionField = (Core.Name "second")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nullIfAbbreviationWithSecond :: Phantoms.TTerm Grammar.NullIfAbbreviation -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.NullIfAbbreviation
-nullIfAbbreviationWithSecond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NullIfAbbreviation"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullOrderingNullsFirst :: Phantoms.TTerm Grammar.NullOrdering
-nullOrderingNullsFirst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NullOrdering"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullsFirst"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nullOrderingNullsLast :: Phantoms.TTerm Grammar.NullOrdering
-nullOrderingNullsLast =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NullOrdering"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullsLast"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nullPredicate :: Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.NullPredicatePart2 -> Phantoms.TTerm Grammar.NullPredicate
-nullPredicate valueExpression nullPart =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPart"),
-          Core.fieldTerm = (Phantoms.unTTerm nullPart)}]}))
-
-nullPredicateNullPart :: Phantoms.TTerm Grammar.NullPredicate -> Phantoms.TTerm Grammar.NullPredicatePart2
-nullPredicateNullPart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-        Core.projectionField = (Core.Name "nullPart")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullPredicatePart2 :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.NullPredicatePart2
-nullPredicatePart2 not =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)}]}))
-
-nullPredicatePart2Not :: Phantoms.TTerm Grammar.NullPredicatePart2 -> Phantoms.TTerm Bool
-nullPredicatePart2Not x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NullPredicatePart2"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullPredicatePart2WithNot :: Phantoms.TTerm Grammar.NullPredicatePart2 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.NullPredicatePart2
-nullPredicatePart2WithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullPredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullPredicateValueExpression :: Phantoms.TTerm Grammar.NullPredicate -> Phantoms.TTerm Grammar.PrimaryValueExpression
-nullPredicateValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nullPredicateWithNullPart :: Phantoms.TTerm Grammar.NullPredicate -> Phantoms.TTerm Grammar.NullPredicatePart2 -> Phantoms.TTerm Grammar.NullPredicate
-nullPredicateWithNullPart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPart"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nullPredicateWithValueExpression :: Phantoms.TTerm Grammar.NullPredicate -> Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.NullPredicate
-nullPredicateWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPart"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.NullPredicate"),
-              Core.projectionField = (Core.Name "nullPart")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericTypeApproximate :: Phantoms.TTerm Grammar.ApproximateNumericType -> Phantoms.TTerm Grammar.NumericType
-numericTypeApproximate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "approximate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeExact :: Phantoms.TTerm Grammar.ExactNumericType -> Phantoms.TTerm Grammar.NumericType
-numericTypeExact x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exact"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueExpressionAdditionOrSubtraction :: Phantoms.TTerm Grammar.AddSubNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-numericValueExpressionAdditionOrSubtraction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "additionOrSubtraction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueExpressionFunction :: Phantoms.TTerm Grammar.NumericValueFunction -> Phantoms.TTerm Grammar.NumericValueExpression
-numericValueExpressionFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueExpressionMultiplicationOrDivision :: Phantoms.TTerm Grammar.MulDivNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-numericValueExpressionMultiplicationOrDivision x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiplicationOrDivision"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueExpressionPrimary :: Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-numericValueExpressionPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueExpressionSigned :: Phantoms.TTerm Grammar.SignedNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-numericValueExpressionSigned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "signed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionAbsoluteValue :: Phantoms.TTerm Grammar.AbsoluteValueExpression -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionAbsoluteValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "absoluteValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionCardinality :: Phantoms.TTerm Grammar.CardinalityExpression -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionCeiling :: Phantoms.TTerm Grammar.CeilingFunction -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionCeiling x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ceiling"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionCommonLogarithm :: Phantoms.TTerm Grammar.CommonLogarithm -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionCommonLogarithm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commonLogarithm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionExponential :: Phantoms.TTerm Grammar.ExponentialFunction -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionExponential x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exponential"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionFloor :: Phantoms.TTerm Grammar.FloorFunction -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionFloor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionLength :: Phantoms.TTerm Grammar.LengthExpression -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionLength x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "length"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionLogarithm :: Phantoms.TTerm Grammar.GeneralLogarithmFunction -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionLogarithm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "logarithm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionModulus :: Phantoms.TTerm Grammar.ModulusExpression -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionModulus x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modulus"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionNaturalLogarithm :: Phantoms.TTerm Grammar.NaturalLogarithm -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionNaturalLogarithm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "naturalLogarithm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionPower :: Phantoms.TTerm Grammar.PowerFunction -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionPower x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "power"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionSquareRoot :: Phantoms.TTerm Grammar.SquareRoot -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionSquareRoot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "squareRoot"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueFunctionTrigonometric :: Phantoms.TTerm Grammar.TrigonometricFunction -> Phantoms.TTerm Grammar.NumericValueFunction
-numericValueFunctionTrigonometric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.NumericValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trigonometric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectExpressionPrimaryNonParenthesized :: Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpressionSpecialCase -> Phantoms.TTerm Grammar.ObjectExpressionPrimary
-objectExpressionPrimaryNonParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ObjectExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonParenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectExpressionPrimaryParenthesized :: Phantoms.TTerm Grammar.ParenthesizedValueExpression -> Phantoms.TTerm Grammar.ObjectExpressionPrimary
-objectExpressionPrimaryParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ObjectExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectExpressionPrimaryVariable :: Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.ObjectExpressionPrimary
-objectExpressionPrimaryVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ObjectExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ofGraphTypeLikeGraph :: Phantoms.TTerm Grammar.GraphTypeLikeGraph -> Phantoms.TTerm Grammar.OfGraphType
-ofGraphTypeLikeGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OfGraphType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "likeGraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ofGraphTypeNested :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm Grammar.OfGraphType
-ofGraphTypeNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OfGraphType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ofGraphTypeReference :: Phantoms.TTerm Grammar.TypedGraphTypeReference -> Phantoms.TTerm Grammar.OfGraphType
-ofGraphTypeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OfGraphType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-offsetAndOptionalLimit :: Phantoms.TTerm Grammar.OffsetClause -> Phantoms.TTerm (Maybe Grammar.LimitClause) -> Phantoms.TTerm Grammar.OffsetAndOptionalLimit
-offsetAndOptionalLimit offset limit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm offset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm limit)}]}))
-
-offsetAndOptionalLimitLimit :: Phantoms.TTerm Grammar.OffsetAndOptionalLimit -> Phantoms.TTerm (Maybe Grammar.LimitClause)
-offsetAndOptionalLimitLimit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-        Core.projectionField = (Core.Name "limit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-offsetAndOptionalLimitOffset :: Phantoms.TTerm Grammar.OffsetAndOptionalLimit -> Phantoms.TTerm Grammar.OffsetClause
-offsetAndOptionalLimitOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-        Core.projectionField = (Core.Name "offset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-offsetAndOptionalLimitWithLimit :: Phantoms.TTerm Grammar.OffsetAndOptionalLimit -> Phantoms.TTerm (Maybe Grammar.LimitClause) -> Phantoms.TTerm Grammar.OffsetAndOptionalLimit
-offsetAndOptionalLimitWithLimit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-offsetAndOptionalLimitWithOffset :: Phantoms.TTerm Grammar.OffsetAndOptionalLimit -> Phantoms.TTerm Grammar.OffsetClause -> Phantoms.TTerm Grammar.OffsetAndOptionalLimit
-offsetAndOptionalLimitWithOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetAndOptionalLimit"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-offsetClause :: Phantoms.TTerm Grammar.OffsetSynonym -> Phantoms.TTerm Grammar.NonNegativeIntegerSpecification -> Phantoms.TTerm Grammar.OffsetClause
-offsetClause synonym value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm synonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-offsetClauseSynonym :: Phantoms.TTerm Grammar.OffsetClause -> Phantoms.TTerm Grammar.OffsetSynonym
-offsetClauseSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-        Core.projectionField = (Core.Name "synonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-offsetClauseValue :: Phantoms.TTerm Grammar.OffsetClause -> Phantoms.TTerm Grammar.NonNegativeIntegerSpecification
-offsetClauseValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-offsetClauseWithSynonym :: Phantoms.TTerm Grammar.OffsetClause -> Phantoms.TTerm Grammar.OffsetSynonym -> Phantoms.TTerm Grammar.OffsetClause
-offsetClauseWithSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-offsetClauseWithValue :: Phantoms.TTerm Grammar.OffsetClause -> Phantoms.TTerm Grammar.NonNegativeIntegerSpecification -> Phantoms.TTerm Grammar.OffsetClause
-offsetClauseWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "synonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OffsetClause"),
-              Core.projectionField = (Core.Name "synonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-offsetSynonymOffset :: Phantoms.TTerm Grammar.OffsetSynonym
-offsetSynonymOffset =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OffsetSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "offset"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-offsetSynonymSkipReservedWord :: Phantoms.TTerm Grammar.OffsetSynonym
-offsetSynonymSkipReservedWord =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OffsetSynonym"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "skipReservedWord"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-openDynamicUnionType :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenDynamicUnionType
-openDynamicUnionType value notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-openDynamicUnionTypeNotNull :: Phantoms.TTerm Grammar.OpenDynamicUnionType -> Phantoms.TTerm Bool
-openDynamicUnionTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openDynamicUnionTypeValue :: Phantoms.TTerm Grammar.OpenDynamicUnionType -> Phantoms.TTerm Bool
-openDynamicUnionTypeValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openDynamicUnionTypeWithNotNull :: Phantoms.TTerm Grammar.OpenDynamicUnionType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenDynamicUnionType
-openDynamicUnionTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-openDynamicUnionTypeWithValue :: Phantoms.TTerm Grammar.OpenDynamicUnionType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenDynamicUnionType
-openDynamicUnionTypeWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenDynamicUnionType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openEdgeReferenceValueType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.EdgeSynonym -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenEdgeReferenceValueType
-openEdgeReferenceValueType any edgeSynonym notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeSynonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-openEdgeReferenceValueTypeAny :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Bool
-openEdgeReferenceValueTypeAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openEdgeReferenceValueTypeEdgeSynonym :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Grammar.EdgeSynonym
-openEdgeReferenceValueTypeEdgeSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-        Core.projectionField = (Core.Name "edgeSynonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openEdgeReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Bool
-openEdgeReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openEdgeReferenceValueTypeWithAny :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenEdgeReferenceValueType
-openEdgeReferenceValueTypeWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeSynonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "edgeSynonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openEdgeReferenceValueTypeWithEdgeSynonym :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Grammar.EdgeSynonym -> Phantoms.TTerm Grammar.OpenEdgeReferenceValueType
-openEdgeReferenceValueTypeWithEdgeSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openEdgeReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.OpenEdgeReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenEdgeReferenceValueType
-openEdgeReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeSynonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenEdgeReferenceValueType"),
-              Core.projectionField = (Core.Name "edgeSynonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-openGraphReferenceValueType :: Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenGraphReferenceValueType
-openGraphReferenceValueType any property notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-openGraphReferenceValueTypeAny :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm (Maybe Bool)
-openGraphReferenceValueTypeAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openGraphReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm Bool
-openGraphReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openGraphReferenceValueTypeProperty :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm Bool
-openGraphReferenceValueTypeProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openGraphReferenceValueTypeWithAny :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Grammar.OpenGraphReferenceValueType
-openGraphReferenceValueTypeWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openGraphReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenGraphReferenceValueType
-openGraphReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-openGraphReferenceValueTypeWithProperty :: Phantoms.TTerm Grammar.OpenGraphReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenGraphReferenceValueType
-openGraphReferenceValueTypeWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openGraphType :: Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenGraphType
-openGraphType typed graph =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)}]}))
-
-openGraphTypeGraph :: Phantoms.TTerm Grammar.OpenGraphType -> Phantoms.TTerm Bool
-openGraphTypeGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openGraphTypeTyped :: Phantoms.TTerm Grammar.OpenGraphType -> Phantoms.TTerm (Maybe Grammar.Typed)
-openGraphTypeTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openGraphTypeWithGraph :: Phantoms.TTerm Grammar.OpenGraphType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenGraphType
-openGraphTypeWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-openGraphTypeWithTyped :: Phantoms.TTerm Grammar.OpenGraphType -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.OpenGraphType
-openGraphTypeWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenGraphType"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openNodeReferenceValueType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.NodeSynonym -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenNodeReferenceValueType
-openNodeReferenceValueType any nodeSynonym notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm any)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeSynonym)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-openNodeReferenceValueTypeAny :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Bool
-openNodeReferenceValueTypeAny x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-        Core.projectionField = (Core.Name "any")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openNodeReferenceValueTypeNodeSynonym :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Grammar.NodeSynonym
-openNodeReferenceValueTypeNodeSynonym x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-        Core.projectionField = (Core.Name "nodeSynonym")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openNodeReferenceValueTypeNotNull :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Bool
-openNodeReferenceValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openNodeReferenceValueTypeWithAny :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenNodeReferenceValueType
-openNodeReferenceValueTypeWithAny original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "nodeSynonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openNodeReferenceValueTypeWithNodeSynonym :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Grammar.NodeSynonym -> Phantoms.TTerm Grammar.OpenNodeReferenceValueType
-openNodeReferenceValueTypeWithNodeSynonym original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openNodeReferenceValueTypeWithNotNull :: Phantoms.TTerm Grammar.OpenNodeReferenceValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.OpenNodeReferenceValueType
-openNodeReferenceValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "any"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "any")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeSynonym"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OpenNodeReferenceValueType"),
-              Core.projectionField = (Core.Name "nodeSynonym")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optTypedBindingTableInitializer :: Phantoms.TTerm (Maybe Grammar.TypedBindingTableReferenceValueType) -> Phantoms.TTerm Grammar.BindingTableInitializer -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer
-optTypedBindingTableInitializer type_ initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-optTypedBindingTableInitializerInitializer :: Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm Grammar.BindingTableInitializer
-optTypedBindingTableInitializerInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optTypedBindingTableInitializerType :: Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm (Maybe Grammar.TypedBindingTableReferenceValueType)
-optTypedBindingTableInitializerType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optTypedBindingTableInitializerWithInitializer :: Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm Grammar.BindingTableInitializer -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer
-optTypedBindingTableInitializerWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optTypedBindingTableInitializerWithType :: Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm (Maybe Grammar.TypedBindingTableReferenceValueType) -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer
-optTypedBindingTableInitializerWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedBindingTableInitializer"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optTypedGraphInitializer :: Phantoms.TTerm (Maybe Grammar.TypedGraphReferenceValueType) -> Phantoms.TTerm Grammar.GraphInitializer -> Phantoms.TTerm Grammar.OptTypedGraphInitializer
-optTypedGraphInitializer type_ initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-optTypedGraphInitializerInitializer :: Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm Grammar.GraphInitializer
-optTypedGraphInitializerInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optTypedGraphInitializerType :: Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm (Maybe Grammar.TypedGraphReferenceValueType)
-optTypedGraphInitializerType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optTypedGraphInitializerWithInitializer :: Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm Grammar.GraphInitializer -> Phantoms.TTerm Grammar.OptTypedGraphInitializer
-optTypedGraphInitializerWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optTypedGraphInitializerWithType :: Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm (Maybe Grammar.TypedGraphReferenceValueType) -> Phantoms.TTerm Grammar.OptTypedGraphInitializer
-optTypedGraphInitializerWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedGraphInitializer"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optTypedValueInitializer :: Phantoms.TTerm (Maybe Grammar.TypedValueType) -> Phantoms.TTerm Grammar.ValueInitializer -> Phantoms.TTerm Grammar.OptTypedValueInitializer
-optTypedValueInitializer type_ initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-optTypedValueInitializerInitializer :: Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm Grammar.ValueInitializer
-optTypedValueInitializerInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optTypedValueInitializerType :: Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm (Maybe Grammar.TypedValueType)
-optTypedValueInitializerType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optTypedValueInitializerWithInitializer :: Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm Grammar.ValueInitializer -> Phantoms.TTerm Grammar.OptTypedValueInitializer
-optTypedValueInitializerWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optTypedValueInitializerWithType :: Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm (Maybe Grammar.TypedValueType) -> Phantoms.TTerm Grammar.OptTypedValueInitializer
-optTypedValueInitializerWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OptTypedValueInitializer"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optionalOperandBraceBlock :: Phantoms.TTerm Grammar.MatchStatementBlock -> Phantoms.TTerm Grammar.OptionalOperand
-optionalOperandBraceBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OptionalOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "braceBlock"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionalOperandParenBlock :: Phantoms.TTerm Grammar.MatchStatementBlock -> Phantoms.TTerm Grammar.OptionalOperand
-optionalOperandParenBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OptionalOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenBlock"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionalOperandSimple :: Phantoms.TTerm Grammar.SimpleMatchStatement -> Phantoms.TTerm Grammar.OptionalOperand
-optionalOperandSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OptionalOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-orderByAndOptionalOffsetAndLimit :: Phantoms.TTerm Grammar.OrderByClause -> Phantoms.TTerm (Maybe Grammar.OffsetClause) -> Phantoms.TTerm (Maybe Grammar.LimitClause) -> Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit
-orderByAndOptionalOffsetAndLimit orderBy offset limit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm orderBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm offset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm limit)}]}))
-
-orderByAndOptionalOffsetAndLimitLimit :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm (Maybe Grammar.LimitClause)
-orderByAndOptionalOffsetAndLimitLimit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-        Core.projectionField = (Core.Name "limit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderByAndOptionalOffsetAndLimitOffset :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm (Maybe Grammar.OffsetClause)
-orderByAndOptionalOffsetAndLimitOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-        Core.projectionField = (Core.Name "offset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderByAndOptionalOffsetAndLimitOrderBy :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm Grammar.OrderByClause
-orderByAndOptionalOffsetAndLimitOrderBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-        Core.projectionField = (Core.Name "orderBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-orderByAndOptionalOffsetAndLimitWithLimit :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm (Maybe Grammar.LimitClause) -> Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit
-orderByAndOptionalOffsetAndLimitWithLimit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orderByAndOptionalOffsetAndLimitWithOffset :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm (Maybe Grammar.OffsetClause) -> Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit
-orderByAndOptionalOffsetAndLimitWithOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-orderByAndOptionalOffsetAndLimitWithOrderBy :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm Grammar.OrderByClause -> Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit
-orderByAndOptionalOffsetAndLimitWithOrderBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-orderByAndPageStatementLimitOnly :: Phantoms.TTerm Grammar.LimitClause -> Phantoms.TTerm Grammar.OrderByAndPageStatement
-orderByAndPageStatementLimitOnly x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrderByAndPageStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limitOnly"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-orderByAndPageStatementOffsetAndOptionalLimit :: Phantoms.TTerm Grammar.OffsetAndOptionalLimit -> Phantoms.TTerm Grammar.OrderByAndPageStatement
-orderByAndPageStatementOffsetAndOptionalLimit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrderByAndPageStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "offsetAndOptionalLimit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-orderByAndPageStatementOrderByAndOptionalOffsetAndLimit :: Phantoms.TTerm Grammar.OrderByAndOptionalOffsetAndLimit -> Phantoms.TTerm Grammar.OrderByAndPageStatement
-orderByAndPageStatementOrderByAndOptionalOffsetAndLimit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrderByAndPageStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orderByAndOptionalOffsetAndLimit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-orderingSpecificationAscending :: Phantoms.TTerm Grammar.OrderingSpecification
-orderingSpecificationAscending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrderingSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-orderingSpecificationDescending :: Phantoms.TTerm Grammar.OrderingSpecification
-orderingSpecificationDescending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrderingSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "descending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ordinalityOrOffsetTypeOffset :: Phantoms.TTerm Grammar.OrdinalityOrOffsetType
-ordinalityOrOffsetTypeOffset =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrdinalityOrOffsetType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "offset"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ordinalityOrOffsetTypeOrdinality :: Phantoms.TTerm Grammar.OrdinalityOrOffsetType
-ordinalityOrOffsetTypeOrdinality =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.OrdinalityOrOffsetType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ordinality"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parameterSessionSpecification :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SessionParameterSpecification -> Phantoms.TTerm Grammar.ParameterSessionSpecification
-parameterSessionSpecification parameter sessionParameterSpecification =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sessionParameterSpecification"),
-          Core.fieldTerm = (Phantoms.unTTerm sessionParameterSpecification)}]}))
-
-parameterSessionSpecificationParameter :: Phantoms.TTerm Grammar.ParameterSessionSpecification -> Phantoms.TTerm Bool
-parameterSessionSpecificationParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterSessionSpecificationSessionParameterSpecification :: Phantoms.TTerm Grammar.ParameterSessionSpecification -> Phantoms.TTerm Grammar.SessionParameterSpecification
-parameterSessionSpecificationSessionParameterSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-        Core.projectionField = (Core.Name "sessionParameterSpecification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterSessionSpecificationWithParameter :: Phantoms.TTerm Grammar.ParameterSessionSpecification -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ParameterSessionSpecification
-parameterSessionSpecificationWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sessionParameterSpecification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-              Core.projectionField = (Core.Name "sessionParameterSpecification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterSessionSpecificationWithSessionParameterSpecification :: Phantoms.TTerm Grammar.ParameterSessionSpecification -> Phantoms.TTerm Grammar.SessionParameterSpecification -> Phantoms.TTerm Grammar.ParameterSessionSpecification
-parameterSessionSpecificationWithSessionParameterSpecification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParameterSessionSpecification"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sessionParameterSpecification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parametersOrCharacteristicsCharacteristics :: Phantoms.TTerm Grammar.ParametersOrCharacteristics
-parametersOrCharacteristicsCharacteristics =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ParametersOrCharacteristics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "characteristics"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parametersOrCharacteristicsParameters :: Phantoms.TTerm Grammar.ParametersOrCharacteristics
-parametersOrCharacteristicsParameters =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ParametersOrCharacteristics"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameters"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parentAndGraphName :: Phantoms.TTerm Grammar.CatalogObjectParentReference -> Phantoms.TTerm Grammar.GraphName -> Phantoms.TTerm Grammar.ParentAndGraphName
-parentAndGraphName parentReference graphName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm parentReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphName"),
-          Core.fieldTerm = (Phantoms.unTTerm graphName)}]}))
-
-parentAndGraphNameGraphName :: Phantoms.TTerm Grammar.ParentAndGraphName -> Phantoms.TTerm Grammar.GraphName
-parentAndGraphNameGraphName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-        Core.projectionField = (Core.Name "graphName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parentAndGraphNameParentReference :: Phantoms.TTerm Grammar.ParentAndGraphName -> Phantoms.TTerm Grammar.CatalogObjectParentReference
-parentAndGraphNameParentReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-        Core.projectionField = (Core.Name "parentReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parentAndGraphNameWithGraphName :: Phantoms.TTerm Grammar.ParentAndGraphName -> Phantoms.TTerm Grammar.GraphName -> Phantoms.TTerm Grammar.ParentAndGraphName
-parentAndGraphNameWithGraphName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-              Core.projectionField = (Core.Name "parentReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parentAndGraphNameWithParentReference :: Phantoms.TTerm Grammar.ParentAndGraphName -> Phantoms.TTerm Grammar.CatalogObjectParentReference -> Phantoms.TTerm Grammar.ParentAndGraphName
-parentAndGraphNameWithParentReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graphName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndGraphName"),
-              Core.projectionField = (Core.Name "graphName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parentAndTableName :: Phantoms.TTerm Grammar.CatalogObjectParentReference -> Phantoms.TTerm Grammar.BindingTableName -> Phantoms.TTerm Grammar.ParentAndTableName
-parentAndTableName parentReference tableName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm parentReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tableName"),
-          Core.fieldTerm = (Phantoms.unTTerm tableName)}]}))
-
-parentAndTableNameParentReference :: Phantoms.TTerm Grammar.ParentAndTableName -> Phantoms.TTerm Grammar.CatalogObjectParentReference
-parentAndTableNameParentReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-        Core.projectionField = (Core.Name "parentReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parentAndTableNameTableName :: Phantoms.TTerm Grammar.ParentAndTableName -> Phantoms.TTerm Grammar.BindingTableName
-parentAndTableNameTableName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-        Core.projectionField = (Core.Name "tableName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parentAndTableNameWithParentReference :: Phantoms.TTerm Grammar.ParentAndTableName -> Phantoms.TTerm Grammar.CatalogObjectParentReference -> Phantoms.TTerm Grammar.ParentAndTableName
-parentAndTableNameWithParentReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tableName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-              Core.projectionField = (Core.Name "tableName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parentAndTableNameWithTableName :: Phantoms.TTerm Grammar.ParentAndTableName -> Phantoms.TTerm Grammar.BindingTableName -> Phantoms.TTerm Grammar.ParentAndTableName
-parentAndTableNameWithTableName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParentAndTableName"),
-              Core.projectionField = (Core.Name "parentReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tableName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parenthesizedPathPatternExpression :: Phantoms.TTerm (Maybe Grammar.SubpathVariableDeclaration) -> Phantoms.TTerm (Maybe Grammar.PathModePrefix) -> Phantoms.TTerm Grammar.PathPatternExpression -> Phantoms.TTerm (Maybe Grammar.ParenthesizedPathPatternWhereClause) -> Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression
-parenthesizedPathPatternExpression subpathDeclaration pathMode expression whereClause =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subpathDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm subpathDeclaration)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathMode"),
-          Core.fieldTerm = (Phantoms.unTTerm pathMode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)}]}))
-
-parenthesizedPathPatternExpressionExpression :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm Grammar.PathPatternExpression
-parenthesizedPathPatternExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parenthesizedPathPatternExpressionPathMode :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm (Maybe Grammar.PathModePrefix)
-parenthesizedPathPatternExpressionPathMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-        Core.projectionField = (Core.Name "pathMode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parenthesizedPathPatternExpressionSubpathDeclaration :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm (Maybe Grammar.SubpathVariableDeclaration)
-parenthesizedPathPatternExpressionSubpathDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-        Core.projectionField = (Core.Name "subpathDeclaration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parenthesizedPathPatternExpressionWhereClause :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm (Maybe Grammar.ParenthesizedPathPatternWhereClause)
-parenthesizedPathPatternExpressionWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parenthesizedPathPatternExpressionWithExpression :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm Grammar.PathPatternExpression -> Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression
-parenthesizedPathPatternExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subpathDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "subpathDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathMode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "pathMode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parenthesizedPathPatternExpressionWithPathMode :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm (Maybe Grammar.PathModePrefix) -> Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression
-parenthesizedPathPatternExpressionWithPathMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subpathDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "subpathDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathMode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parenthesizedPathPatternExpressionWithSubpathDeclaration :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm (Maybe Grammar.SubpathVariableDeclaration) -> Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression
-parenthesizedPathPatternExpressionWithSubpathDeclaration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subpathDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathMode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "pathMode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parenthesizedPathPatternExpressionWithWhereClause :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm (Maybe Grammar.ParenthesizedPathPatternWhereClause) -> Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression
-parenthesizedPathPatternExpressionWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subpathDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "subpathDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathMode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "pathMode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathElementList :: Phantoms.TTerm Grammar.PathElementListStart -> Phantoms.TTerm [Grammar.PathElementListStep] -> Phantoms.TTerm Grammar.PathElementList
-pathElementList start steps =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm start)},
-        Core.Field {
-          Core.fieldName = (Core.Name "steps"),
-          Core.fieldTerm = (Phantoms.unTTerm steps)}]}))
-
-pathElementListStart :: Phantoms.TTerm Grammar.PathElementList -> Phantoms.TTerm Grammar.PathElementListStart
-pathElementListStart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementList"),
-        Core.projectionField = (Core.Name "start")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathElementListStep :: Phantoms.TTerm Grammar.EdgeReferenceValueExpression -> Phantoms.TTerm Grammar.NodeReferenceValueExpression -> Phantoms.TTerm Grammar.PathElementListStep
-pathElementListStep edgeReference nodeReference =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeReference"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeReference)}]}))
-
-pathElementListStepEdgeReference :: Phantoms.TTerm Grammar.PathElementListStep -> Phantoms.TTerm Grammar.EdgeReferenceValueExpression
-pathElementListStepEdgeReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-        Core.projectionField = (Core.Name "edgeReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathElementListStepNodeReference :: Phantoms.TTerm Grammar.PathElementListStep -> Phantoms.TTerm Grammar.NodeReferenceValueExpression
-pathElementListStepNodeReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-        Core.projectionField = (Core.Name "nodeReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathElementListStepWithEdgeReference :: Phantoms.TTerm Grammar.PathElementListStep -> Phantoms.TTerm Grammar.EdgeReferenceValueExpression -> Phantoms.TTerm Grammar.PathElementListStep
-pathElementListStepWithEdgeReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-              Core.projectionField = (Core.Name "nodeReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathElementListStepWithNodeReference :: Phantoms.TTerm Grammar.PathElementListStep -> Phantoms.TTerm Grammar.NodeReferenceValueExpression -> Phantoms.TTerm Grammar.PathElementListStep
-pathElementListStepWithNodeReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementListStep"),
-              Core.projectionField = (Core.Name "edgeReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nodeReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathElementListSteps :: Phantoms.TTerm Grammar.PathElementList -> Phantoms.TTerm [Grammar.PathElementListStep]
-pathElementListSteps x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementList"),
-        Core.projectionField = (Core.Name "steps")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathElementListWithStart :: Phantoms.TTerm Grammar.PathElementList -> Phantoms.TTerm Grammar.PathElementListStart -> Phantoms.TTerm Grammar.PathElementList
-pathElementListWithStart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "steps"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementList"),
-              Core.projectionField = (Core.Name "steps")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathElementListWithSteps :: Phantoms.TTerm Grammar.PathElementList -> Phantoms.TTerm [Grammar.PathElementListStep] -> Phantoms.TTerm Grammar.PathElementList
-pathElementListWithSteps original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathElementList"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "steps"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathFactorPrimary :: Phantoms.TTerm Grammar.PathPrimary -> Phantoms.TTerm Grammar.PathFactor
-pathFactorPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathFactor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathFactorQuantifiedPrimary :: Phantoms.TTerm Grammar.QuantifiedPathPrimary -> Phantoms.TTerm Grammar.PathFactor
-pathFactorQuantifiedPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathFactor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quantifiedPrimary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathFactorQuestionedPrimary :: Phantoms.TTerm Grammar.QuestionedPathPrimary -> Phantoms.TTerm Grammar.PathFactor
-pathFactorQuestionedPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathFactor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "questionedPrimary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathModeAcyclic :: Phantoms.TTerm Grammar.PathMode
-pathModeAcyclic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "acyclic"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathModePrefix :: Phantoms.TTerm Grammar.PathMode -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.PathModePrefix
-pathModePrefix mode orPaths =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm mode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm orPaths)}]}))
-
-pathModePrefixMode :: Phantoms.TTerm Grammar.PathModePrefix -> Phantoms.TTerm Grammar.PathMode
-pathModePrefixMode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-        Core.projectionField = (Core.Name "mode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathModePrefixOrPaths :: Phantoms.TTerm Grammar.PathModePrefix -> Phantoms.TTerm (Maybe Grammar.PathOrPaths)
-pathModePrefixOrPaths x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-        Core.projectionField = (Core.Name "orPaths")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathModePrefixWithMode :: Phantoms.TTerm Grammar.PathModePrefix -> Phantoms.TTerm Grammar.PathMode -> Phantoms.TTerm Grammar.PathModePrefix
-pathModePrefixWithMode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-              Core.projectionField = (Core.Name "orPaths")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathModePrefixWithOrPaths :: Phantoms.TTerm Grammar.PathModePrefix -> Phantoms.TTerm (Maybe Grammar.PathOrPaths) -> Phantoms.TTerm Grammar.PathModePrefix
-pathModePrefixWithOrPaths original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathModePrefix"),
-              Core.projectionField = (Core.Name "mode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orPaths"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathModeSimple :: Phantoms.TTerm Grammar.PathMode
-pathModeSimple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathModeTrail :: Phantoms.TTerm Grammar.PathMode
-pathModeTrail =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trail"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathModeWalk :: Phantoms.TTerm Grammar.PathMode
-pathModeWalk =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "walk"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathOrPathsPath :: Phantoms.TTerm Grammar.PathOrPaths
-pathOrPathsPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathOrPaths"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathOrPathsPaths :: Phantoms.TTerm Grammar.PathOrPaths
-pathOrPathsPaths =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathOrPaths"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paths"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pathPattern :: Phantoms.TTerm (Maybe Grammar.PathVariableDeclaration) -> Phantoms.TTerm (Maybe Grammar.PathPatternPrefix) -> Phantoms.TTerm Grammar.PathPatternExpression -> Phantoms.TTerm Grammar.PathPattern
-pathPattern variableDeclaration prefix expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm variableDeclaration)},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm prefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-pathPatternExpression :: Phantoms.TTerm Grammar.PathPattern -> Phantoms.TTerm Grammar.PathPatternExpression
-pathPatternExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternExpressionMultisetAlternation :: Phantoms.TTerm [Grammar.PathTerm] -> Phantoms.TTerm Grammar.PathPatternExpression
-pathPatternExpressionMultisetAlternation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multisetAlternation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPatternExpressionPatternUnion :: Phantoms.TTerm [Grammar.PathTerm] -> Phantoms.TTerm Grammar.PathPatternExpression
-pathPatternExpressionPatternUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "patternUnion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPatternExpressionTerm :: Phantoms.TTerm Grammar.PathTerm -> Phantoms.TTerm Grammar.PathPatternExpression
-pathPatternExpressionTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPatternPrefix :: Phantoms.TTerm Grammar.PathPattern -> Phantoms.TTerm (Maybe Grammar.PathPatternPrefix)
-pathPatternPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-        Core.projectionField = (Core.Name "prefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternPrefixModePrefix :: Phantoms.TTerm Grammar.PathModePrefix -> Phantoms.TTerm Grammar.PathPatternPrefix
-pathPatternPrefixModePrefix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPatternPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modePrefix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPatternPrefixSearchPrefix :: Phantoms.TTerm Grammar.PathSearchPrefix -> Phantoms.TTerm Grammar.PathPatternPrefix
-pathPatternPrefixSearchPrefix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPatternPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "searchPrefix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPatternVariableDeclaration :: Phantoms.TTerm Grammar.PathPattern -> Phantoms.TTerm (Maybe Grammar.PathVariableDeclaration)
-pathPatternVariableDeclaration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-        Core.projectionField = (Core.Name "variableDeclaration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathPatternWithExpression :: Phantoms.TTerm Grammar.PathPattern -> Phantoms.TTerm Grammar.PathPatternExpression -> Phantoms.TTerm Grammar.PathPattern
-pathPatternWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-              Core.projectionField = (Core.Name "variableDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathPatternWithPrefix :: Phantoms.TTerm Grammar.PathPattern -> Phantoms.TTerm (Maybe Grammar.PathPatternPrefix) -> Phantoms.TTerm Grammar.PathPattern
-pathPatternWithPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-              Core.projectionField = (Core.Name "variableDeclaration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathPatternWithVariableDeclaration :: Phantoms.TTerm Grammar.PathPattern -> Phantoms.TTerm (Maybe Grammar.PathVariableDeclaration) -> Phantoms.TTerm Grammar.PathPattern
-pathPatternWithVariableDeclaration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variableDeclaration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PathPattern"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pathPrimaryElementPattern :: Phantoms.TTerm Grammar.ElementPattern -> Phantoms.TTerm Grammar.PathPrimary
-pathPrimaryElementPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementPattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPrimaryParenthesizedExpression :: Phantoms.TTerm Grammar.ParenthesizedPathPatternExpression -> Phantoms.TTerm Grammar.PathPrimary
-pathPrimaryParenthesizedExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesizedExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathPrimarySimplifiedExpression :: Phantoms.TTerm Grammar.SimplifiedPathPatternExpression -> Phantoms.TTerm Grammar.PathPrimary
-pathPrimarySimplifiedExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simplifiedExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathSearchPrefixAll :: Phantoms.TTerm Grammar.AllPathSearch -> Phantoms.TTerm Grammar.PathSearchPrefix
-pathSearchPrefixAll x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathSearchPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathSearchPrefixAny :: Phantoms.TTerm Grammar.AnyPathSearch -> Phantoms.TTerm Grammar.PathSearchPrefix
-pathSearchPrefixAny x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathSearchPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathSearchPrefixShortest :: Phantoms.TTerm Grammar.ShortestPathSearch -> Phantoms.TTerm Grammar.PathSearchPrefix
-pathSearchPrefixShortest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PathSearchPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shortest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pathValueType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.PathValueType
-pathValueType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-pathValueTypeNotNull :: Phantoms.TTerm Grammar.PathValueType -> Phantoms.TTerm Bool
-pathValueTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PathValueType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathValueTypeWithNotNull :: Phantoms.TTerm Grammar.PathValueType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.PathValueType
-pathValueTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PathValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-powerFunction :: Phantoms.TTerm Grammar.NumericValueExpressionBase -> Phantoms.TTerm Grammar.NumericValueExpressionExponent -> Phantoms.TTerm Grammar.PowerFunction
-powerFunction base exponent =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exponent"),
-          Core.fieldTerm = (Phantoms.unTTerm exponent)}]}))
-
-powerFunctionBase :: Phantoms.TTerm Grammar.PowerFunction -> Phantoms.TTerm Grammar.NumericValueExpressionBase
-powerFunctionBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-powerFunctionExponent :: Phantoms.TTerm Grammar.PowerFunction -> Phantoms.TTerm Grammar.NumericValueExpressionExponent
-powerFunctionExponent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-        Core.projectionField = (Core.Name "exponent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-powerFunctionWithBase :: Phantoms.TTerm Grammar.PowerFunction -> Phantoms.TTerm Grammar.NumericValueExpressionBase -> Phantoms.TTerm Grammar.PowerFunction
-powerFunctionWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "exponent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-              Core.projectionField = (Core.Name "exponent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-powerFunctionWithExponent :: Phantoms.TTerm Grammar.PowerFunction -> Phantoms.TTerm Grammar.NumericValueExpressionExponent -> Phantoms.TTerm Grammar.PowerFunction
-powerFunctionWithExponent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PowerFunction"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "exponent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-precisionAndScale :: Phantoms.TTerm Grammar.Precision -> Phantoms.TTerm (Maybe Grammar.Scale) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.PrecisionAndScale
-precisionAndScale precision scale notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Phantoms.unTTerm scale)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-precisionAndScaleNotNull :: Phantoms.TTerm Grammar.PrecisionAndScale -> Phantoms.TTerm Bool
-precisionAndScaleNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-precisionAndScalePrecision :: Phantoms.TTerm Grammar.PrecisionAndScale -> Phantoms.TTerm Grammar.Precision
-precisionAndScalePrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-precisionAndScaleScale :: Phantoms.TTerm Grammar.PrecisionAndScale -> Phantoms.TTerm (Maybe Grammar.Scale)
-precisionAndScaleScale x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-        Core.projectionField = (Core.Name "scale")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-precisionAndScaleWithNotNull :: Phantoms.TTerm Grammar.PrecisionAndScale -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.PrecisionAndScale
-precisionAndScaleWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-              Core.projectionField = (Core.Name "scale")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-precisionAndScaleWithPrecision :: Phantoms.TTerm Grammar.PrecisionAndScale -> Phantoms.TTerm Grammar.Precision -> Phantoms.TTerm Grammar.PrecisionAndScale
-precisionAndScaleWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-              Core.projectionField = (Core.Name "scale")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-precisionAndScaleWithScale :: Phantoms.TTerm Grammar.PrecisionAndScale -> Phantoms.TTerm (Maybe Grammar.Scale) -> Phantoms.TTerm Grammar.PrecisionAndScale
-precisionAndScaleWithScale original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PrecisionAndScale"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predefinedSchemaReferenceCurrentSchema :: Phantoms.TTerm Grammar.PredefinedSchemaReference
-predefinedSchemaReferenceCurrentSchema =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "currentSchema"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedSchemaReferenceHomeSchema :: Phantoms.TTerm Grammar.PredefinedSchemaReference
-predefinedSchemaReferenceHomeSchema =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "homeSchema"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedSchemaReferencePeriod :: Phantoms.TTerm Grammar.PredefinedSchemaReference
-predefinedSchemaReferencePeriod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "period"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-predefinedTypeBooleanType :: Phantoms.TTerm Grammar.BooleanType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeBooleanType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "booleanType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeByteStringType :: Phantoms.TTerm Grammar.ByteStringType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeByteStringType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byteStringType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeCharacterStringType :: Phantoms.TTerm Grammar.CharacterStringType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeCharacterStringType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "characterStringType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeImmaterialValueType :: Phantoms.TTerm Grammar.ImmaterialValueType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeImmaterialValueType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "immaterialValueType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeNumericType :: Phantoms.TTerm Grammar.NumericType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeNumericType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numericType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeReferenceValueType :: Phantoms.TTerm Grammar.ReferenceValueType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeReferenceValueType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "referenceValueType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeTemporalType :: Phantoms.TTerm Grammar.TemporalType -> Phantoms.TTerm Grammar.PredefinedType
-predefinedTypeTemporalType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "temporalType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateAllDifferentPredicate :: Phantoms.TTerm Grammar.AllDifferentPredicate -> Phantoms.TTerm Grammar.Predicate
-predicateAllDifferentPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "allDifferentPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateDirectedPredicate :: Phantoms.TTerm Grammar.DirectedPredicate -> Phantoms.TTerm Grammar.Predicate
-predicateDirectedPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directedPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateExistsPredicate :: Phantoms.TTerm Grammar.ExistsPredicate -> Phantoms.TTerm Grammar.Predicate
-predicateExistsPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "existsPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateLabeledPredicate :: Phantoms.TTerm Grammar.LabeledPredicate -> Phantoms.TTerm Grammar.Predicate
-predicateLabeledPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeledPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateNullPredicate :: Phantoms.TTerm Grammar.NullPredicate -> Phantoms.TTerm Grammar.Predicate
-predicateNullPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicatePropertyExistsPredicate :: Phantoms.TTerm Grammar.PropertyExistsPredicate -> Phantoms.TTerm Grammar.Predicate
-predicatePropertyExistsPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyExistsPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateSamePredicate :: Phantoms.TTerm Grammar.SamePredicate -> Phantoms.TTerm Grammar.Predicate
-predicateSamePredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "samePredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateSourceDestinationPredicate :: Phantoms.TTerm Grammar.SourceDestinationPredicate -> Phantoms.TTerm Grammar.Predicate
-predicateSourceDestinationPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourceDestinationPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateValueTypePredicate :: Phantoms.TTerm Grammar.ValueTypePredicate -> Phantoms.TTerm Grammar.Predicate
-predicateValueTypePredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueTypePredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionAggregateFunction :: Phantoms.TTerm Grammar.AggregateFunction -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionAggregateFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aggregateFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionBindingVariableReference :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionBindingVariableReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bindingVariableReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionCaseExpression :: Phantoms.TTerm Grammar.CaseExpression -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionCaseExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "caseExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionCastSpecification :: Phantoms.TTerm Grammar.CastSpecification -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionCastSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "castSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionElementIdFunction :: Phantoms.TTerm Grammar.ElementIdFunction -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionElementIdFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementIdFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionLetValueExpression :: Phantoms.TTerm Grammar.LetValueExpression -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionLetValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "letValueExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionParenthesized :: Phantoms.TTerm Grammar.ParenthesizedValueExpression -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionPathValueConstructor :: Phantoms.TTerm Grammar.PathValueConstructor -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionPathValueConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pathValueConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionPropertyReference :: Phantoms.TTerm Grammar.PropertyReference -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionPropertyReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionUnsignedValueSpecification :: Phantoms.TTerm Grammar.UnsignedValueSpecification -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionUnsignedValueSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedValueSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryValueExpressionValueQueryExpression :: Phantoms.TTerm Grammar.ValueQueryExpression -> Phantoms.TTerm Grammar.PrimaryValueExpression
-primaryValueExpressionValueQueryExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimaryValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueQueryExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveCatalogModifyingStatementCreateGraph :: Phantoms.TTerm Grammar.CreateGraphStatement -> Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement
-primitiveCatalogModifyingStatementCreateGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "createGraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveCatalogModifyingStatementCreateGraphType :: Phantoms.TTerm Grammar.CreateGraphTypeStatement -> Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement
-primitiveCatalogModifyingStatementCreateGraphType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "createGraphType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveCatalogModifyingStatementCreateSchema :: Phantoms.TTerm Grammar.CreateSchemaStatement -> Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement
-primitiveCatalogModifyingStatementCreateSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "createSchema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveCatalogModifyingStatementDropGraph :: Phantoms.TTerm Grammar.DropGraphStatement -> Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement
-primitiveCatalogModifyingStatementDropGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dropGraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveCatalogModifyingStatementDropGraphType :: Phantoms.TTerm Grammar.DropGraphTypeStatement -> Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement
-primitiveCatalogModifyingStatementDropGraphType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dropGraphType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveCatalogModifyingStatementDropSchema :: Phantoms.TTerm Grammar.DropSchemaStatement -> Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement
-primitiveCatalogModifyingStatementDropSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dropSchema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveDataModifyingStatementDelete :: Phantoms.TTerm Grammar.DeleteStatement -> Phantoms.TTerm Grammar.PrimitiveDataModifyingStatement
-primitiveDataModifyingStatementDelete x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delete"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveDataModifyingStatementInsert :: Phantoms.TTerm Grammar.InsertStatement -> Phantoms.TTerm Grammar.PrimitiveDataModifyingStatement
-primitiveDataModifyingStatementInsert x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "insert"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveDataModifyingStatementRemove :: Phantoms.TTerm Grammar.RemoveStatement -> Phantoms.TTerm Grammar.PrimitiveDataModifyingStatement
-primitiveDataModifyingStatementRemove x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "remove"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveDataModifyingStatementSet :: Phantoms.TTerm Grammar.SetStatement -> Phantoms.TTerm Grammar.PrimitiveDataModifyingStatement
-primitiveDataModifyingStatementSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveQueryStatementFilter :: Phantoms.TTerm Grammar.FilterStatement -> Phantoms.TTerm Grammar.PrimitiveQueryStatement
-primitiveQueryStatementFilter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "filter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveQueryStatementFor :: Phantoms.TTerm Grammar.ForStatement -> Phantoms.TTerm Grammar.PrimitiveQueryStatement
-primitiveQueryStatementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveQueryStatementLet :: Phantoms.TTerm Grammar.LetStatement -> Phantoms.TTerm Grammar.PrimitiveQueryStatement
-primitiveQueryStatementLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveQueryStatementMatch :: Phantoms.TTerm Grammar.MatchStatement -> Phantoms.TTerm Grammar.PrimitiveQueryStatement
-primitiveQueryStatementMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveQueryStatementOrderByAndPage :: Phantoms.TTerm Grammar.OrderByAndPageStatement -> Phantoms.TTerm Grammar.PrimitiveQueryStatement
-primitiveQueryStatementOrderByAndPage x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "orderByAndPage"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primitiveResultStatementFinish :: Phantoms.TTerm Grammar.PrimitiveResultStatement
-primitiveResultStatementFinish =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveResultStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "finish"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveResultStatementReturnAndOptionalOrderBy :: Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage -> Phantoms.TTerm Grammar.PrimitiveResultStatement
-primitiveResultStatementReturnAndOptionalOrderBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.PrimitiveResultStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "returnAndOptionalOrderBy"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-procedureAndMaybeEnd :: Phantoms.TTerm Grammar.ProcedureSpecification -> Phantoms.TTerm (Maybe Grammar.EndTransactionCommand) -> Phantoms.TTerm Grammar.ProcedureAndMaybeEnd
-procedureAndMaybeEnd procedure end =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "procedure"),
-          Core.fieldTerm = (Phantoms.unTTerm procedure)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm end)}]}))
-
-procedureAndMaybeEndEnd :: Phantoms.TTerm Grammar.ProcedureAndMaybeEnd -> Phantoms.TTerm (Maybe Grammar.EndTransactionCommand)
-procedureAndMaybeEndEnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-        Core.projectionField = (Core.Name "end")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureAndMaybeEndProcedure :: Phantoms.TTerm Grammar.ProcedureAndMaybeEnd -> Phantoms.TTerm Grammar.ProcedureSpecification
-procedureAndMaybeEndProcedure x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-        Core.projectionField = (Core.Name "procedure")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureAndMaybeEndWithEnd :: Phantoms.TTerm Grammar.ProcedureAndMaybeEnd -> Phantoms.TTerm (Maybe Grammar.EndTransactionCommand) -> Phantoms.TTerm Grammar.ProcedureAndMaybeEnd
-procedureAndMaybeEndWithEnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "procedure"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-              Core.projectionField = (Core.Name "procedure")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-procedureAndMaybeEndWithProcedure :: Phantoms.TTerm Grammar.ProcedureAndMaybeEnd -> Phantoms.TTerm Grammar.ProcedureSpecification -> Phantoms.TTerm Grammar.ProcedureAndMaybeEnd
-procedureAndMaybeEndWithProcedure original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "procedure"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureAndMaybeEnd"),
-              Core.projectionField = (Core.Name "end")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-procedureBody :: Phantoms.TTerm (Maybe Grammar.AtSchemaClause) -> Phantoms.TTerm (Maybe Grammar.BindingVariableDefinitionBlock) -> Phantoms.TTerm Grammar.StatementBlock -> Phantoms.TTerm Grammar.ProcedureBody
-procedureBody atSchema bindings statements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm atSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)}]}))
-
-procedureBodyAtSchema :: Phantoms.TTerm Grammar.ProcedureBody -> Phantoms.TTerm (Maybe Grammar.AtSchemaClause)
-procedureBodyAtSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-        Core.projectionField = (Core.Name "atSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureBodyBindings :: Phantoms.TTerm Grammar.ProcedureBody -> Phantoms.TTerm (Maybe Grammar.BindingVariableDefinitionBlock)
-procedureBodyBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureBodyStatements :: Phantoms.TTerm Grammar.ProcedureBody -> Phantoms.TTerm Grammar.StatementBlock
-procedureBodyStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-procedureBodyWithAtSchema :: Phantoms.TTerm Grammar.ProcedureBody -> Phantoms.TTerm (Maybe Grammar.AtSchemaClause) -> Phantoms.TTerm Grammar.ProcedureBody
-procedureBodyWithAtSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-procedureBodyWithBindings :: Phantoms.TTerm Grammar.ProcedureBody -> Phantoms.TTerm (Maybe Grammar.BindingVariableDefinitionBlock) -> Phantoms.TTerm Grammar.ProcedureBody
-procedureBodyWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-              Core.projectionField = (Core.Name "atSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-procedureBodyWithStatements :: Phantoms.TTerm Grammar.ProcedureBody -> Phantoms.TTerm Grammar.StatementBlock -> Phantoms.TTerm Grammar.ProcedureBody
-procedureBodyWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "atSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-              Core.projectionField = (Core.Name "atSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ProcedureBody"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-procedureCallInline :: Phantoms.TTerm Grammar.InlineProcedureCall -> Phantoms.TTerm Grammar.ProcedureCall
-procedureCallInline x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ProcedureCall"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inline"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-procedureCallNamed :: Phantoms.TTerm Grammar.NamedProcedureCall -> Phantoms.TTerm Grammar.ProcedureCall
-procedureCallNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ProcedureCall"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-procedureReferenceParameterSpecification :: Phantoms.TTerm Grammar.ReferenceParameterSpecification -> Phantoms.TTerm Grammar.ProcedureReference
-procedureReferenceParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ProcedureReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-procedureReferenceParentAndProcedureName :: Phantoms.TTerm Grammar.CatalogProcedureParentAndName -> Phantoms.TTerm Grammar.ProcedureReference
-procedureReferenceParentAndProcedureName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ProcedureReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parentAndProcedureName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-programActivitySession :: Phantoms.TTerm Grammar.SessionActivity -> Phantoms.TTerm Grammar.ProgramActivity
-programActivitySession x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ProgramActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "session"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-programActivityTransaction :: Phantoms.TTerm Grammar.TransactionActivity -> Phantoms.TTerm Grammar.ProgramActivity
-programActivityTransaction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ProgramActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "transaction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyExistsPredicate :: Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.PropertyExistsPredicate
-propertyExistsPredicate elementVariableReference propertyName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Phantoms.unTTerm elementVariableReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyName)}]}))
-
-propertyExistsPredicateElementVariableReference :: Phantoms.TTerm Grammar.PropertyExistsPredicate -> Phantoms.TTerm Grammar.ElementVariableReference
-propertyExistsPredicateElementVariableReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-        Core.projectionField = (Core.Name "elementVariableReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExistsPredicatePropertyName :: Phantoms.TTerm Grammar.PropertyExistsPredicate -> Phantoms.TTerm Grammar.PropertyName
-propertyExistsPredicatePropertyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-        Core.projectionField = (Core.Name "propertyName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyExistsPredicateWithElementVariableReference :: Phantoms.TTerm Grammar.PropertyExistsPredicate -> Phantoms.TTerm Grammar.ElementVariableReference -> Phantoms.TTerm Grammar.PropertyExistsPredicate
-propertyExistsPredicateWithElementVariableReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-              Core.projectionField = (Core.Name "propertyName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyExistsPredicateWithPropertyName :: Phantoms.TTerm Grammar.PropertyExistsPredicate -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.PropertyExistsPredicate
-propertyExistsPredicateWithPropertyName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementVariableReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyExistsPredicate"),
-              Core.projectionField = (Core.Name "elementVariableReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyKeyValuePair :: Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.PropertyKeyValuePair
-propertyKeyValuePair name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertyKeyValuePairName :: Phantoms.TTerm Grammar.PropertyKeyValuePair -> Phantoms.TTerm Grammar.PropertyName
-propertyKeyValuePairName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyKeyValuePairValue :: Phantoms.TTerm Grammar.PropertyKeyValuePair -> Phantoms.TTerm Grammar.ValueExpression
-propertyKeyValuePairValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyKeyValuePairWithName :: Phantoms.TTerm Grammar.PropertyKeyValuePair -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.PropertyKeyValuePair
-propertyKeyValuePairWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyKeyValuePairWithValue :: Phantoms.TTerm Grammar.PropertyKeyValuePair -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.PropertyKeyValuePair
-propertyKeyValuePairWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyKeyValuePair"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyReference :: Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.PropertyReference
-propertyReference valueExpression propertyName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyName)}]}))
-
-propertyReferencePropertyName :: Phantoms.TTerm Grammar.PropertyReference -> Phantoms.TTerm Grammar.PropertyName
-propertyReferencePropertyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-        Core.projectionField = (Core.Name "propertyName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyReferenceValueExpression :: Phantoms.TTerm Grammar.PropertyReference -> Phantoms.TTerm Grammar.PrimaryValueExpression
-propertyReferenceValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyReferenceWithPropertyName :: Phantoms.TTerm Grammar.PropertyReference -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.PropertyReference
-propertyReferenceWithPropertyName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyReferenceWithValueExpression :: Phantoms.TTerm Grammar.PropertyReference -> Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.PropertyReference
-propertyReferenceWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyReference"),
-              Core.projectionField = (Core.Name "propertyName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyType :: Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.PropertyValueType -> Phantoms.TTerm Grammar.PropertyType
-propertyType name typed valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-propertyTypeName :: Phantoms.TTerm Grammar.PropertyType -> Phantoms.TTerm Grammar.PropertyName
-propertyTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyTypeTyped :: Phantoms.TTerm Grammar.PropertyType -> Phantoms.TTerm (Maybe Grammar.Typed)
-propertyTypeTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyTypeValueType :: Phantoms.TTerm Grammar.PropertyType -> Phantoms.TTerm Grammar.PropertyValueType
-propertyTypeValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyTypeWithName :: Phantoms.TTerm Grammar.PropertyType -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.PropertyType
-propertyTypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyTypeWithTyped :: Phantoms.TTerm Grammar.PropertyType -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.PropertyType
-propertyTypeWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyTypeWithValueType :: Phantoms.TTerm Grammar.PropertyType -> Phantoms.TTerm Grammar.PropertyValueType -> Phantoms.TTerm Grammar.PropertyType
-propertyTypeWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.PropertyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.PropertyType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quantifiedPathPrimary :: Phantoms.TTerm Grammar.PathPrimary -> Phantoms.TTerm Grammar.GraphPatternQuantifier -> Phantoms.TTerm Grammar.QuantifiedPathPrimary
-quantifiedPathPrimary primary quantifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)}]}))
-
-quantifiedPathPrimaryPrimary :: Phantoms.TTerm Grammar.QuantifiedPathPrimary -> Phantoms.TTerm Grammar.PathPrimary
-quantifiedPathPrimaryPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifiedPathPrimaryQuantifier :: Phantoms.TTerm Grammar.QuantifiedPathPrimary -> Phantoms.TTerm Grammar.GraphPatternQuantifier
-quantifiedPathPrimaryQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quantifiedPathPrimaryWithPrimary :: Phantoms.TTerm Grammar.QuantifiedPathPrimary -> Phantoms.TTerm Grammar.PathPrimary -> Phantoms.TTerm Grammar.QuantifiedPathPrimary
-quantifiedPathPrimaryWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quantifiedPathPrimaryWithQuantifier :: Phantoms.TTerm Grammar.QuantifiedPathPrimary -> Phantoms.TTerm Grammar.GraphPatternQuantifier -> Phantoms.TTerm Grammar.QuantifiedPathPrimary
-quantifiedPathPrimaryWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.QuantifiedPathPrimary"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-queryConjunctionOtherwise :: Phantoms.TTerm Grammar.QueryConjunction
-queryConjunctionOtherwise =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.QueryConjunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "otherwise"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-queryConjunctionSetOperator :: Phantoms.TTerm Grammar.SetOperator -> Phantoms.TTerm Grammar.QueryConjunction
-queryConjunctionSetOperator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.QueryConjunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "setOperator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-realType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.RealType
-realType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RealType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-realTypeNotNull :: Phantoms.TTerm Grammar.RealType -> Phantoms.TTerm Bool
-realTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RealType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-realTypeWithNotNull :: Phantoms.TTerm Grammar.RealType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.RealType
-realTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RealType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordTypeAnyRecord :: Phantoms.TTerm Grammar.AnyRecordType -> Phantoms.TTerm Grammar.RecordType
-recordTypeAnyRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.RecordType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyRecord"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-recordTypeSpecifiedRecord :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Grammar.RecordType
-recordTypeSpecifiedRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.RecordType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "specifiedRecord"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceValueTypeBindingTable :: Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Grammar.ReferenceValueType
-referenceValueTypeBindingTable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bindingTable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceValueTypeEdge :: Phantoms.TTerm Grammar.EdgeReferenceValueType -> Phantoms.TTerm Grammar.ReferenceValueType
-referenceValueTypeEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceValueTypeGraph :: Phantoms.TTerm Grammar.GraphReferenceValueType -> Phantoms.TTerm Grammar.ReferenceValueType
-referenceValueTypeGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceValueTypeNode :: Phantoms.TTerm Grammar.NodeReferenceValueType -> Phantoms.TTerm Grammar.ReferenceValueType
-referenceValueTypeNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReferenceValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relativeCatalogSchemaReferenceDirectoryAndSchema :: Phantoms.TTerm Grammar.RelativeDirectoryAndSchema -> Phantoms.TTerm Grammar.RelativeCatalogSchemaReference
-relativeCatalogSchemaReferenceDirectoryAndSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.RelativeCatalogSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directoryAndSchema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relativeCatalogSchemaReferencePredefinedReference :: Phantoms.TTerm Grammar.PredefinedSchemaReference -> Phantoms.TTerm Grammar.RelativeCatalogSchemaReference
-relativeCatalogSchemaReferencePredefinedReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.RelativeCatalogSchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predefinedReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relativeDirectoryAndSchema :: Phantoms.TTerm Grammar.RelativeDirectoryPath -> Phantoms.TTerm Grammar.SchemaName -> Phantoms.TTerm Grammar.RelativeDirectoryAndSchema
-relativeDirectoryAndSchema directoryPath schemaName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directoryPath"),
-          Core.fieldTerm = (Phantoms.unTTerm directoryPath)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaName"),
-          Core.fieldTerm = (Phantoms.unTTerm schemaName)}]}))
-
-relativeDirectoryAndSchemaDirectoryPath :: Phantoms.TTerm Grammar.RelativeDirectoryAndSchema -> Phantoms.TTerm Grammar.RelativeDirectoryPath
-relativeDirectoryAndSchemaDirectoryPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-        Core.projectionField = (Core.Name "directoryPath")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relativeDirectoryAndSchemaSchemaName :: Phantoms.TTerm Grammar.RelativeDirectoryAndSchema -> Phantoms.TTerm Grammar.SchemaName
-relativeDirectoryAndSchemaSchemaName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-        Core.projectionField = (Core.Name "schemaName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relativeDirectoryAndSchemaWithDirectoryPath :: Phantoms.TTerm Grammar.RelativeDirectoryAndSchema -> Phantoms.TTerm Grammar.RelativeDirectoryPath -> Phantoms.TTerm Grammar.RelativeDirectoryAndSchema
-relativeDirectoryAndSchemaWithDirectoryPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directoryPath"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-              Core.projectionField = (Core.Name "schemaName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relativeDirectoryAndSchemaWithSchemaName :: Phantoms.TTerm Grammar.RelativeDirectoryAndSchema -> Phantoms.TTerm Grammar.SchemaName -> Phantoms.TTerm Grammar.RelativeDirectoryAndSchema
-relativeDirectoryAndSchemaWithSchemaName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directoryPath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryAndSchema"),
-              Core.projectionField = (Core.Name "directoryPath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-relativeDirectoryPath :: Phantoms.TTerm Int -> Phantoms.TTerm (Maybe Grammar.SimpleDirectoryPath) -> Phantoms.TTerm Grammar.RelativeDirectoryPath
-relativeDirectoryPath parentDirectories simplePath =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentDirectories"),
-          Core.fieldTerm = (Phantoms.unTTerm parentDirectories)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simplePath"),
-          Core.fieldTerm = (Phantoms.unTTerm simplePath)}]}))
-
-relativeDirectoryPathParentDirectories :: Phantoms.TTerm Grammar.RelativeDirectoryPath -> Phantoms.TTerm Int
-relativeDirectoryPathParentDirectories x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-        Core.projectionField = (Core.Name "parentDirectories")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relativeDirectoryPathSimplePath :: Phantoms.TTerm Grammar.RelativeDirectoryPath -> Phantoms.TTerm (Maybe Grammar.SimpleDirectoryPath)
-relativeDirectoryPathSimplePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-        Core.projectionField = (Core.Name "simplePath")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-relativeDirectoryPathWithParentDirectories :: Phantoms.TTerm Grammar.RelativeDirectoryPath -> Phantoms.TTerm Int -> Phantoms.TTerm Grammar.RelativeDirectoryPath
-relativeDirectoryPathWithParentDirectories original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentDirectories"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "simplePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-              Core.projectionField = (Core.Name "simplePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-relativeDirectoryPathWithSimplePath :: Phantoms.TTerm Grammar.RelativeDirectoryPath -> Phantoms.TTerm (Maybe Grammar.SimpleDirectoryPath) -> Phantoms.TTerm Grammar.RelativeDirectoryPath
-relativeDirectoryPathWithSimplePath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parentDirectories"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RelativeDirectoryPath"),
-              Core.projectionField = (Core.Name "parentDirectories")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "simplePath"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-removeItemLabel :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.RemoveItem
-removeItemLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.RemoveItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-removeItemProperty :: Phantoms.TTerm Grammar.RemovePropertyItem -> Phantoms.TTerm Grammar.RemoveItem
-removeItemProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.RemoveItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-removeLabelItem :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.RemoveLabelItem
-removeLabelItem variable isOrColon label =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm isOrColon)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)}]}))
-
-removeLabelItemIsOrColon :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.IsOrColon
-removeLabelItemIsOrColon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-        Core.projectionField = (Core.Name "isOrColon")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removeLabelItemLabel :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.LabelName
-removeLabelItemLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removeLabelItemVariable :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.BindingVariableReference
-removeLabelItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removeLabelItemWithIsOrColon :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.RemoveLabelItem
-removeLabelItemWithIsOrColon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-removeLabelItemWithLabel :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.RemoveLabelItem
-removeLabelItemWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-removeLabelItemWithVariable :: Phantoms.TTerm Grammar.RemoveLabelItem -> Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.RemoveLabelItem
-removeLabelItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemoveLabelItem"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-removePropertyItem :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.RemovePropertyItem
-removePropertyItem variable propertyName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyName)}]}))
-
-removePropertyItemPropertyName :: Phantoms.TTerm Grammar.RemovePropertyItem -> Phantoms.TTerm Grammar.PropertyName
-removePropertyItemPropertyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-        Core.projectionField = (Core.Name "propertyName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removePropertyItemVariable :: Phantoms.TTerm Grammar.RemovePropertyItem -> Phantoms.TTerm Grammar.BindingVariableReference
-removePropertyItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-removePropertyItemWithPropertyName :: Phantoms.TTerm Grammar.RemovePropertyItem -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.RemovePropertyItem
-removePropertyItemWithPropertyName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-removePropertyItemWithVariable :: Phantoms.TTerm Grammar.RemovePropertyItem -> Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.RemovePropertyItem
-removePropertyItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.RemovePropertyItem"),
-              Core.projectionField = (Core.Name "propertyName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-resultNullLiteral :: Phantoms.TTerm Grammar.Result
-resultNullLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Result"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullLiteral"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-resultSimple :: Phantoms.TTerm Grammar.ResultExpression -> Phantoms.TTerm Grammar.Result
-resultSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Result"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnAndOptionalOrderByAndPage :: Phantoms.TTerm Grammar.ReturnStatement -> Phantoms.TTerm (Maybe Grammar.OrderByAndPageStatement) -> Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage
-returnAndOptionalOrderByAndPage return orderByAndPage =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm return)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderByAndPage"),
-          Core.fieldTerm = (Phantoms.unTTerm orderByAndPage)}]}))
-
-returnAndOptionalOrderByAndPageOrderByAndPage :: Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage -> Phantoms.TTerm (Maybe Grammar.OrderByAndPageStatement)
-returnAndOptionalOrderByAndPageOrderByAndPage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-        Core.projectionField = (Core.Name "orderByAndPage")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnAndOptionalOrderByAndPageReturn :: Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage -> Phantoms.TTerm Grammar.ReturnStatement
-returnAndOptionalOrderByAndPageReturn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-        Core.projectionField = (Core.Name "return")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnAndOptionalOrderByAndPageWithOrderByAndPage :: Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage -> Phantoms.TTerm (Maybe Grammar.OrderByAndPageStatement) -> Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage
-returnAndOptionalOrderByAndPageWithOrderByAndPage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-              Core.projectionField = (Core.Name "return")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderByAndPage"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-returnAndOptionalOrderByAndPageWithReturn :: Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage -> Phantoms.TTerm Grammar.ReturnStatement -> Phantoms.TTerm Grammar.ReturnAndOptionalOrderByAndPage
-returnAndOptionalOrderByAndPageWithReturn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "return"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderByAndPage"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"),
-              Core.projectionField = (Core.Name "orderByAndPage")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-returnItem :: Phantoms.TTerm Grammar.AggregatingValueExpression -> Phantoms.TTerm (Maybe Grammar.ReturnItemAlias) -> Phantoms.TTerm Grammar.ReturnItem
-returnItem expression alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-returnItemAlias :: Phantoms.TTerm Grammar.ReturnItem -> Phantoms.TTerm (Maybe Grammar.ReturnItemAlias)
-returnItemAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnItemExpression :: Phantoms.TTerm Grammar.ReturnItem -> Phantoms.TTerm Grammar.AggregatingValueExpression
-returnItemExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnItemWithAlias :: Phantoms.TTerm Grammar.ReturnItem -> Phantoms.TTerm (Maybe Grammar.ReturnItemAlias) -> Phantoms.TTerm Grammar.ReturnItem
-returnItemWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-returnItemWithExpression :: Phantoms.TTerm Grammar.ReturnItem -> Phantoms.TTerm Grammar.AggregatingValueExpression -> Phantoms.TTerm Grammar.ReturnItem
-returnItemWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItem"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-returnItemsAndGroupBy :: Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.ReturnItems -> Phantoms.TTerm (Maybe Grammar.GroupByClause) -> Phantoms.TTerm Grammar.ReturnItemsAndGroupBy
-returnItemsAndGroupBy quantifier items groupBy =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Phantoms.unTTerm groupBy)}]}))
-
-returnItemsAndGroupByGroupBy :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm (Maybe Grammar.GroupByClause)
-returnItemsAndGroupByGroupBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-        Core.projectionField = (Core.Name "groupBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnItemsAndGroupByItems :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm Grammar.ReturnItems
-returnItemsAndGroupByItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnItemsAndGroupByQuantifier :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm (Maybe Grammar.SetQuantifier)
-returnItemsAndGroupByQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-returnItemsAndGroupByWithGroupBy :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm (Maybe Grammar.GroupByClause) -> Phantoms.TTerm Grammar.ReturnItemsAndGroupBy
-returnItemsAndGroupByWithGroupBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-returnItemsAndGroupByWithItems :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm Grammar.ReturnItems -> Phantoms.TTerm Grammar.ReturnItemsAndGroupBy
-returnItemsAndGroupByWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-returnItemsAndGroupByWithQuantifier :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.ReturnItemsAndGroupBy
-returnItemsAndGroupByWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ReturnItemsAndGroupBy"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-returnItemsAsterisk :: Phantoms.TTerm Grammar.ReturnItems
-returnItemsAsterisk =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReturnItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asterisk"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-returnItemsItemList :: Phantoms.TTerm Grammar.ReturnItemList -> Phantoms.TTerm Grammar.ReturnItems
-returnItemsItemList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReturnItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "itemList"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnStatementBodyItems :: Phantoms.TTerm Grammar.ReturnItemsAndGroupBy -> Phantoms.TTerm Grammar.ReturnStatementBody
-returnStatementBodyItems x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReturnStatementBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "items"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-returnStatementBodyNoBindings :: Phantoms.TTerm Grammar.ReturnStatementBody
-returnStatementBodyNoBindings =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ReturnStatementBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noBindings"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-samePredicate :: Phantoms.TTerm [Grammar.ElementVariableReference] -> Phantoms.TTerm Grammar.SamePredicate
-samePredicate references =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SamePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Phantoms.unTTerm references)}]}))
-
-samePredicateReferences :: Phantoms.TTerm Grammar.SamePredicate -> Phantoms.TTerm [Grammar.ElementVariableReference]
-samePredicateReferences x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SamePredicate"),
-        Core.projectionField = (Core.Name "references")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-samePredicateWithReferences :: Phantoms.TTerm Grammar.SamePredicate -> Phantoms.TTerm [Grammar.ElementVariableReference] -> Phantoms.TTerm Grammar.SamePredicate
-samePredicateWithReferences original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SamePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaAndObjects :: Phantoms.TTerm Grammar.SchemaReference -> Phantoms.TTerm [Grammar.ObjectName] -> Phantoms.TTerm Grammar.SchemaAndObjects
-schemaAndObjects schemaReference objects =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaReference"),
-          Core.fieldTerm = (Phantoms.unTTerm schemaReference)},
-        Core.Field {
-          Core.fieldName = (Core.Name "objects"),
-          Core.fieldTerm = (Phantoms.unTTerm objects)}]}))
-
-schemaAndObjectsObjects :: Phantoms.TTerm Grammar.SchemaAndObjects -> Phantoms.TTerm [Grammar.ObjectName]
-schemaAndObjectsObjects x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-        Core.projectionField = (Core.Name "objects")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaAndObjectsSchemaReference :: Phantoms.TTerm Grammar.SchemaAndObjects -> Phantoms.TTerm Grammar.SchemaReference
-schemaAndObjectsSchemaReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-        Core.projectionField = (Core.Name "schemaReference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaAndObjectsWithObjects :: Phantoms.TTerm Grammar.SchemaAndObjects -> Phantoms.TTerm [Grammar.ObjectName] -> Phantoms.TTerm Grammar.SchemaAndObjects
-schemaAndObjectsWithObjects original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaReference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-              Core.projectionField = (Core.Name "schemaReference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "objects"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaAndObjectsWithSchemaReference :: Phantoms.TTerm Grammar.SchemaAndObjects -> Phantoms.TTerm Grammar.SchemaReference -> Phantoms.TTerm Grammar.SchemaAndObjects
-schemaAndObjectsWithSchemaReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaReference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "objects"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SchemaAndObjects"),
-              Core.projectionField = (Core.Name "objects")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaReferenceAbsoluteReference :: Phantoms.TTerm Grammar.AbsoluteCatalogSchemaReference -> Phantoms.TTerm Grammar.SchemaReference
-schemaReferenceAbsoluteReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "absoluteReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaReferenceParameterSpecification :: Phantoms.TTerm Grammar.ReferenceParameterSpecification -> Phantoms.TTerm Grammar.SchemaReference
-schemaReferenceParameterSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaReferenceRelativeReference :: Phantoms.TTerm Grammar.RelativeCatalogSchemaReference -> Phantoms.TTerm Grammar.SchemaReference
-schemaReferenceRelativeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SchemaReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "relativeReference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-searchedCase :: Phantoms.TTerm [Grammar.SearchedWhenClause] -> Phantoms.TTerm (Maybe Grammar.ElseClause) -> Phantoms.TTerm Grammar.SearchedCase
-searchedCase whenClauses elseClause =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm whenClauses)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Phantoms.unTTerm elseClause)}]}))
-
-searchedCaseElseClause :: Phantoms.TTerm Grammar.SearchedCase -> Phantoms.TTerm (Maybe Grammar.ElseClause)
-searchedCaseElseClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-        Core.projectionField = (Core.Name "elseClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-searchedCaseWhenClauses :: Phantoms.TTerm Grammar.SearchedCase -> Phantoms.TTerm [Grammar.SearchedWhenClause]
-searchedCaseWhenClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-        Core.projectionField = (Core.Name "whenClauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-searchedCaseWithElseClause :: Phantoms.TTerm Grammar.SearchedCase -> Phantoms.TTerm (Maybe Grammar.ElseClause) -> Phantoms.TTerm Grammar.SearchedCase
-searchedCaseWithElseClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-              Core.projectionField = (Core.Name "whenClauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-searchedCaseWithWhenClauses :: Phantoms.TTerm Grammar.SearchedCase -> Phantoms.TTerm [Grammar.SearchedWhenClause] -> Phantoms.TTerm Grammar.SearchedCase
-searchedCaseWithWhenClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedCase"),
-              Core.projectionField = (Core.Name "elseClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-searchedWhenClause :: Phantoms.TTerm Grammar.SearchCondition -> Phantoms.TTerm Grammar.Result -> Phantoms.TTerm Grammar.SearchedWhenClause
-searchedWhenClause searchCondition result =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "searchCondition"),
-          Core.fieldTerm = (Phantoms.unTTerm searchCondition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm result)}]}))
-
-searchedWhenClauseResult :: Phantoms.TTerm Grammar.SearchedWhenClause -> Phantoms.TTerm Grammar.Result
-searchedWhenClauseResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-        Core.projectionField = (Core.Name "result")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-searchedWhenClauseSearchCondition :: Phantoms.TTerm Grammar.SearchedWhenClause -> Phantoms.TTerm Grammar.SearchCondition
-searchedWhenClauseSearchCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-        Core.projectionField = (Core.Name "searchCondition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-searchedWhenClauseWithResult :: Phantoms.TTerm Grammar.SearchedWhenClause -> Phantoms.TTerm Grammar.Result -> Phantoms.TTerm Grammar.SearchedWhenClause
-searchedWhenClauseWithResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "searchCondition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-              Core.projectionField = (Core.Name "searchCondition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-searchedWhenClauseWithSearchCondition :: Phantoms.TTerm Grammar.SearchedWhenClause -> Phantoms.TTerm Grammar.SearchCondition -> Phantoms.TTerm Grammar.SearchedWhenClause
-searchedWhenClauseWithSearchCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "searchCondition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SearchedWhenClause"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectGraphMatch :: Phantoms.TTerm Grammar.GraphExpression -> Phantoms.TTerm Grammar.MatchStatement -> Phantoms.TTerm Grammar.SelectGraphMatch
-selectGraphMatch graphExpression matchStatement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm graphExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "matchStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm matchStatement)}]}))
-
-selectGraphMatchGraphExpression :: Phantoms.TTerm Grammar.SelectGraphMatch -> Phantoms.TTerm Grammar.GraphExpression
-selectGraphMatchGraphExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-        Core.projectionField = (Core.Name "graphExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectGraphMatchMatchStatement :: Phantoms.TTerm Grammar.SelectGraphMatch -> Phantoms.TTerm Grammar.MatchStatement
-selectGraphMatchMatchStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-        Core.projectionField = (Core.Name "matchStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectGraphMatchWithGraphExpression :: Phantoms.TTerm Grammar.SelectGraphMatch -> Phantoms.TTerm Grammar.GraphExpression -> Phantoms.TTerm Grammar.SelectGraphMatch
-selectGraphMatchWithGraphExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "matchStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-              Core.projectionField = (Core.Name "matchStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectGraphMatchWithMatchStatement :: Phantoms.TTerm Grammar.SelectGraphMatch -> Phantoms.TTerm Grammar.MatchStatement -> Phantoms.TTerm Grammar.SelectGraphMatch
-selectGraphMatchWithMatchStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graphExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectGraphMatch"),
-              Core.projectionField = (Core.Name "graphExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "matchStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectItem :: Phantoms.TTerm Grammar.AggregatingValueExpression -> Phantoms.TTerm (Maybe Grammar.SelectItemAlias) -> Phantoms.TTerm Grammar.SelectItem
-selectItem expression alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-selectItemAlias :: Phantoms.TTerm Grammar.SelectItem -> Phantoms.TTerm (Maybe Grammar.SelectItemAlias)
-selectItemAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectItem"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectItemExpression :: Phantoms.TTerm Grammar.SelectItem -> Phantoms.TTerm Grammar.AggregatingValueExpression
-selectItemExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectItem"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectItemWithAlias :: Phantoms.TTerm Grammar.SelectItem -> Phantoms.TTerm (Maybe Grammar.SelectItemAlias) -> Phantoms.TTerm Grammar.SelectItem
-selectItemWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectItem"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectItemWithExpression :: Phantoms.TTerm Grammar.SelectItem -> Phantoms.TTerm Grammar.AggregatingValueExpression -> Phantoms.TTerm Grammar.SelectItem
-selectItemWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectItem"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectItemsAsterisk :: Phantoms.TTerm Grammar.SelectItems
-selectItemsAsterisk =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SelectItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asterisk"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-selectItemsItemList :: Phantoms.TTerm Grammar.SelectItemList -> Phantoms.TTerm Grammar.SelectItems
-selectItemsItemList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SelectItems"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "itemList"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectQuerySpecificationGraphAndNested :: Phantoms.TTerm Grammar.GraphAndNestedQuerySpecification -> Phantoms.TTerm Grammar.SelectQuerySpecification
-selectQuerySpecificationGraphAndNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SelectQuerySpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphAndNested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectQuerySpecificationNested :: Phantoms.TTerm Grammar.NestedQuerySpecification -> Phantoms.TTerm Grammar.SelectQuerySpecification
-selectQuerySpecificationNested x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SelectQuerySpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nested"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectStatement :: Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.SelectItems -> Phantoms.TTerm (Maybe Grammar.SelectStatementBodyAndClauses) -> Phantoms.TTerm Grammar.SelectStatement
-selectStatement quantifier items body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-selectStatementBody :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm (Maybe Grammar.SelectStatementBodyAndClauses)
-selectStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClauses :: Phantoms.TTerm Grammar.SelectStatementBody -> Phantoms.TTerm (Maybe Grammar.WhereClause) -> Phantoms.TTerm (Maybe Grammar.GroupByClause) -> Phantoms.TTerm (Maybe Grammar.HavingClause) -> Phantoms.TTerm (Maybe Grammar.OrderByClause) -> Phantoms.TTerm (Maybe Grammar.OffsetClause) -> Phantoms.TTerm (Maybe Grammar.LimitClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClauses body where_ groupBy having orderBy offset limit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Phantoms.unTTerm groupBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Phantoms.unTTerm having)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm orderBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm offset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm limit)}]}))
-
-selectStatementBodyAndClausesBody :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm Grammar.SelectStatementBody
-selectStatementBodyAndClausesBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesGroupBy :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.GroupByClause)
-selectStatementBodyAndClausesGroupBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "groupBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesHaving :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.HavingClause)
-selectStatementBodyAndClausesHaving x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "having")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesLimit :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.LimitClause)
-selectStatementBodyAndClausesLimit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "limit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesOffset :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.OffsetClause)
-selectStatementBodyAndClausesOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "offset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesOrderBy :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.OrderByClause)
-selectStatementBodyAndClausesOrderBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "orderBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesWhere :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.WhereClause)
-selectStatementBodyAndClausesWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementBodyAndClausesWithBody :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm Grammar.SelectStatementBody -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "having")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementBodyAndClausesWithGroupBy :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.GroupByClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithGroupBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "having")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementBodyAndClausesWithHaving :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.HavingClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithHaving original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementBodyAndClausesWithLimit :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.LimitClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithLimit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "having")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectStatementBodyAndClausesWithOffset :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.OffsetClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "having")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementBodyAndClausesWithOrderBy :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.OrderByClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithOrderBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "having")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementBodyAndClausesWithWhere :: Phantoms.TTerm Grammar.SelectStatementBodyAndClauses -> Phantoms.TTerm (Maybe Grammar.WhereClause) -> Phantoms.TTerm Grammar.SelectStatementBodyAndClauses
-selectStatementBodyAndClausesWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "groupBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "groupBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "having"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "having")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "orderBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "orderBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "limit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatementBodyAndClauses"),
-              Core.projectionField = (Core.Name "limit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementBodyGraphMatchList :: Phantoms.TTerm Grammar.SelectGraphMatchList -> Phantoms.TTerm Grammar.SelectStatementBody
-selectStatementBodyGraphMatchList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SelectStatementBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphMatchList"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectStatementBodyQuerySpecification :: Phantoms.TTerm Grammar.SelectQuerySpecification -> Phantoms.TTerm Grammar.SelectStatementBody
-selectStatementBodyQuerySpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SelectStatementBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "querySpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectStatementItems :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm Grammar.SelectItems
-selectStatementItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementQuantifier :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm (Maybe Grammar.SetQuantifier)
-selectStatementQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectStatementWithBody :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm (Maybe Grammar.SelectStatementBodyAndClauses) -> Phantoms.TTerm Grammar.SelectStatement
-selectStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectStatementWithItems :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm Grammar.SelectItems -> Phantoms.TTerm Grammar.SelectStatement
-selectStatementWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectStatementWithQuantifier :: Phantoms.TTerm Grammar.SelectStatement -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.SelectStatement
-selectStatementWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SelectStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sessionActivityReset :: Phantoms.TTerm [Grammar.SessionResetCommand] -> Phantoms.TTerm Grammar.SessionActivity
-sessionActivityReset x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reset"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionActivitySetAndResetCommands :: Phantoms.TTerm Grammar.SessionSetAndResetCommands -> Phantoms.TTerm Grammar.SessionActivity
-sessionActivitySetAndResetCommands x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "setAndResetCommands"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionResetArgumentsGraph :: Phantoms.TTerm Grammar.SessionResetArguments
-sessionResetArgumentsGraph =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionResetArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sessionResetArgumentsParameterSessionSpecification :: Phantoms.TTerm Grammar.ParameterSessionSpecification -> Phantoms.TTerm Grammar.SessionResetArguments
-sessionResetArgumentsParameterSessionSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionResetArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameterSessionSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionResetArgumentsParametersOrCharacteristics :: Phantoms.TTerm Grammar.AllParametersOrCharacteristics -> Phantoms.TTerm Grammar.SessionResetArguments
-sessionResetArgumentsParametersOrCharacteristics x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionResetArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parametersOrCharacteristics"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionResetArgumentsSchema :: Phantoms.TTerm Grammar.SessionResetArguments
-sessionResetArgumentsSchema =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionResetArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schema"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sessionResetArgumentsTimeZone :: Phantoms.TTerm Grammar.SessionResetArguments
-sessionResetArgumentsTimeZone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionResetArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeZone"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sessionSetAndResetCommands :: Phantoms.TTerm [Grammar.SessionSetCommand] -> Phantoms.TTerm [Grammar.SessionResetCommand] -> Phantoms.TTerm Grammar.SessionSetAndResetCommands
-sessionSetAndResetCommands set reset =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm set)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reset"),
-          Core.fieldTerm = (Phantoms.unTTerm reset)}]}))
-
-sessionSetAndResetCommandsReset :: Phantoms.TTerm Grammar.SessionSetAndResetCommands -> Phantoms.TTerm [Grammar.SessionResetCommand]
-sessionSetAndResetCommandsReset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-        Core.projectionField = (Core.Name "reset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetAndResetCommandsSet :: Phantoms.TTerm Grammar.SessionSetAndResetCommands -> Phantoms.TTerm [Grammar.SessionSetCommand]
-sessionSetAndResetCommandsSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-        Core.projectionField = (Core.Name "set")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetAndResetCommandsWithReset :: Phantoms.TTerm Grammar.SessionSetAndResetCommands -> Phantoms.TTerm [Grammar.SessionResetCommand] -> Phantoms.TTerm Grammar.SessionSetAndResetCommands
-sessionSetAndResetCommandsWithReset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-              Core.projectionField = (Core.Name "set")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sessionSetAndResetCommandsWithSet :: Phantoms.TTerm Grammar.SessionSetAndResetCommands -> Phantoms.TTerm [Grammar.SessionSetCommand] -> Phantoms.TTerm Grammar.SessionSetAndResetCommands
-sessionSetAndResetCommandsWithSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetAndResetCommands"),
-              Core.projectionField = (Core.Name "reset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sessionSetBindingTableParameterClause :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause
-sessionSetBindingTableParameterClause binding param init =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm binding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)}]}))
-
-sessionSetBindingTableParameterClauseBinding :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Bool
-sessionSetBindingTableParameterClauseBinding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-        Core.projectionField = (Core.Name "binding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetBindingTableParameterClauseInit :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer
-sessionSetBindingTableParameterClauseInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetBindingTableParameterClauseParam :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterName
-sessionSetBindingTableParameterClauseParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetBindingTableParameterClauseWithBinding :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause
-sessionSetBindingTableParameterClauseWithBinding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sessionSetBindingTableParameterClauseWithInit :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Grammar.OptTypedBindingTableInitializer -> Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause
-sessionSetBindingTableParameterClauseWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-              Core.projectionField = (Core.Name "binding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sessionSetBindingTableParameterClauseWithParam :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause
-sessionSetBindingTableParameterClauseWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-              Core.projectionField = (Core.Name "binding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sessionSetCommandGraph :: Phantoms.TTerm Grammar.SessionSetGraphClause -> Phantoms.TTerm Grammar.SessionSetCommand
-sessionSetCommandGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetCommand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetCommandParameter :: Phantoms.TTerm Grammar.SessionSetParameterClause -> Phantoms.TTerm Grammar.SessionSetCommand
-sessionSetCommandParameter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetCommand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parameter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetCommandSchema :: Phantoms.TTerm Grammar.SessionSetSchemaClause -> Phantoms.TTerm Grammar.SessionSetCommand
-sessionSetCommandSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetCommand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "schema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetCommandTimeZone :: Phantoms.TTerm Grammar.SessionSetTimeZoneClause -> Phantoms.TTerm Grammar.SessionSetCommand
-sessionSetCommandTimeZone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetCommand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeZone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetGraphParameterClause :: Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm Grammar.SessionSetGraphParameterClause
-sessionSetGraphParameterClause graph initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-sessionSetGraphParameterClauseGraph :: Phantoms.TTerm Grammar.SessionSetGraphParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterName
-sessionSetGraphParameterClauseGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetGraphParameterClauseInitializer :: Phantoms.TTerm Grammar.SessionSetGraphParameterClause -> Phantoms.TTerm Grammar.OptTypedGraphInitializer
-sessionSetGraphParameterClauseInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetGraphParameterClauseWithGraph :: Phantoms.TTerm Grammar.SessionSetGraphParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.SessionSetGraphParameterClause
-sessionSetGraphParameterClauseWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sessionSetGraphParameterClauseWithInitializer :: Phantoms.TTerm Grammar.SessionSetGraphParameterClause -> Phantoms.TTerm Grammar.OptTypedGraphInitializer -> Phantoms.TTerm Grammar.SessionSetGraphParameterClause
-sessionSetGraphParameterClauseWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetGraphParameterClause"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sessionSetParameterClauseBindings :: Phantoms.TTerm Grammar.SessionSetBindingTableParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterClause
-sessionSetParameterClauseBindings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bindings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetParameterClauseGraph :: Phantoms.TTerm Grammar.SessionSetGraphParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterClause
-sessionSetParameterClauseGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetParameterClauseValue :: Phantoms.TTerm Grammar.SessionSetValueParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterClause
-sessionSetParameterClauseValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sessionSetParameterName :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SessionParameterSpecification -> Phantoms.TTerm Grammar.SessionSetParameterName
-sessionSetParameterName ifNotExists parameter =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifNotExists"),
-          Core.fieldTerm = (Phantoms.unTTerm ifNotExists)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm parameter)}]}))
-
-sessionSetParameterNameIfNotExists :: Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Bool
-sessionSetParameterNameIfNotExists x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-        Core.projectionField = (Core.Name "ifNotExists")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetParameterNameParameter :: Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.SessionParameterSpecification
-sessionSetParameterNameParameter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-        Core.projectionField = (Core.Name "parameter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetParameterNameWithIfNotExists :: Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SessionSetParameterName
-sessionSetParameterNameWithIfNotExists original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifNotExists"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-              Core.projectionField = (Core.Name "parameter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sessionSetParameterNameWithParameter :: Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.SessionParameterSpecification -> Phantoms.TTerm Grammar.SessionSetParameterName
-sessionSetParameterNameWithParameter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ifNotExists"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetParameterName"),
-              Core.projectionField = (Core.Name "ifNotExists")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sessionSetValueParameterClause :: Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm Grammar.SessionSetValueParameterClause
-sessionSetValueParameterClause value initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-sessionSetValueParameterClauseInitializer :: Phantoms.TTerm Grammar.SessionSetValueParameterClause -> Phantoms.TTerm Grammar.OptTypedValueInitializer
-sessionSetValueParameterClauseInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetValueParameterClauseValue :: Phantoms.TTerm Grammar.SessionSetValueParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterName
-sessionSetValueParameterClauseValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sessionSetValueParameterClauseWithInitializer :: Phantoms.TTerm Grammar.SessionSetValueParameterClause -> Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm Grammar.SessionSetValueParameterClause
-sessionSetValueParameterClauseWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sessionSetValueParameterClauseWithValue :: Phantoms.TTerm Grammar.SessionSetValueParameterClause -> Phantoms.TTerm Grammar.SessionSetParameterName -> Phantoms.TTerm Grammar.SessionSetValueParameterClause
-sessionSetValueParameterClauseWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SessionSetValueParameterClause"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setAllPropertiesItem :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm (Maybe Grammar.PropertyKeyValuePairList) -> Phantoms.TTerm Grammar.SetAllPropertiesItem
-setAllPropertiesItem variable properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-setAllPropertiesItemProperties :: Phantoms.TTerm Grammar.SetAllPropertiesItem -> Phantoms.TTerm (Maybe Grammar.PropertyKeyValuePairList)
-setAllPropertiesItemProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setAllPropertiesItemVariable :: Phantoms.TTerm Grammar.SetAllPropertiesItem -> Phantoms.TTerm Grammar.BindingVariableReference
-setAllPropertiesItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setAllPropertiesItemWithProperties :: Phantoms.TTerm Grammar.SetAllPropertiesItem -> Phantoms.TTerm (Maybe Grammar.PropertyKeyValuePairList) -> Phantoms.TTerm Grammar.SetAllPropertiesItem
-setAllPropertiesItemWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-setAllPropertiesItemWithVariable :: Phantoms.TTerm Grammar.SetAllPropertiesItem -> Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.SetAllPropertiesItem
-setAllPropertiesItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetAllPropertiesItem"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setItemAllProperties :: Phantoms.TTerm Grammar.SetAllPropertiesItem -> Phantoms.TTerm Grammar.SetItem
-setItemAllProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "allProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setItemLabel :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.SetItem
-setItemLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setItemProperty :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.SetItem
-setItemProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-setLabelItem :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.SetLabelItem
-setLabelItem variable isOrColon label =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm isOrColon)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)}]}))
-
-setLabelItemIsOrColon :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.IsOrColon
-setLabelItemIsOrColon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-        Core.projectionField = (Core.Name "isOrColon")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setLabelItemLabel :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.LabelName
-setLabelItemLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setLabelItemVariable :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.BindingVariableReference
-setLabelItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setLabelItemWithIsOrColon :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.IsOrColon -> Phantoms.TTerm Grammar.SetLabelItem
-setLabelItemWithIsOrColon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setLabelItemWithLabel :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.SetLabelItem
-setLabelItemWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-setLabelItemWithVariable :: Phantoms.TTerm Grammar.SetLabelItem -> Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.SetLabelItem
-setLabelItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isOrColon"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-              Core.projectionField = (Core.Name "isOrColon")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetLabelItem"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setOperator :: Phantoms.TTerm Grammar.SetOperatorType -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.SetOperator
-setOperator operatorType quantifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetOperator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operatorType"),
-          Core.fieldTerm = (Phantoms.unTTerm operatorType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)}]}))
-
-setOperatorOperatorType :: Phantoms.TTerm Grammar.SetOperator -> Phantoms.TTerm Grammar.SetOperatorType
-setOperatorOperatorType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetOperator"),
-        Core.projectionField = (Core.Name "operatorType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setOperatorQuantifier :: Phantoms.TTerm Grammar.SetOperator -> Phantoms.TTerm (Maybe Grammar.SetQuantifier)
-setOperatorQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetOperator"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setOperatorTypeExcept :: Phantoms.TTerm Grammar.SetOperatorType
-setOperatorTypeExcept =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetOperatorType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "except"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-setOperatorTypeIntersect :: Phantoms.TTerm Grammar.SetOperatorType
-setOperatorTypeIntersect =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetOperatorType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intersect"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-setOperatorTypeUnion :: Phantoms.TTerm Grammar.SetOperatorType
-setOperatorTypeUnion =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetOperatorType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-setOperatorWithOperatorType :: Phantoms.TTerm Grammar.SetOperator -> Phantoms.TTerm Grammar.SetOperatorType -> Phantoms.TTerm Grammar.SetOperator
-setOperatorWithOperatorType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetOperator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operatorType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetOperator"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setOperatorWithQuantifier :: Phantoms.TTerm Grammar.SetOperator -> Phantoms.TTerm (Maybe Grammar.SetQuantifier) -> Phantoms.TTerm Grammar.SetOperator
-setOperatorWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetOperator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operatorType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetOperator"),
-              Core.projectionField = (Core.Name "operatorType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-setPropertyItem :: Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.SetPropertyItem
-setPropertyItem variable propertyName value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-setPropertyItemPropertyName :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.PropertyName
-setPropertyItemPropertyName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-        Core.projectionField = (Core.Name "propertyName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setPropertyItemValue :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.ValueExpression
-setPropertyItemValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setPropertyItemVariable :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.BindingVariableReference
-setPropertyItemVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setPropertyItemWithPropertyName :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.PropertyName -> Phantoms.TTerm Grammar.SetPropertyItem
-setPropertyItemWithPropertyName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setPropertyItemWithValue :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.SetPropertyItem
-setPropertyItemWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-              Core.projectionField = (Core.Name "propertyName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-setPropertyItemWithVariable :: Phantoms.TTerm Grammar.SetPropertyItem -> Phantoms.TTerm Grammar.BindingVariableReference -> Phantoms.TTerm Grammar.SetPropertyItem
-setPropertyItemWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-              Core.projectionField = (Core.Name "propertyName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SetPropertyItem"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setQuantifierAll :: Phantoms.TTerm Grammar.SetQuantifier
-setQuantifierAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-setQuantifierDistinct :: Phantoms.TTerm Grammar.SetQuantifier
-setQuantifierDistinct =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SetQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "distinct"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shortestPathSearchAllShortest :: Phantoms.TTerm Grammar.AllShortestPathSearch -> Phantoms.TTerm Grammar.ShortestPathSearch
-shortestPathSearchAllShortest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ShortestPathSearch"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "allShortest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shortestPathSearchAnyShortest :: Phantoms.TTerm Grammar.AnyShortestPathSearch -> Phantoms.TTerm Grammar.ShortestPathSearch
-shortestPathSearchAnyShortest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ShortestPathSearch"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyShortest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shortestPathSearchCountedShortest :: Phantoms.TTerm Grammar.CountedShortestPathSearch -> Phantoms.TTerm Grammar.ShortestPathSearch
-shortestPathSearchCountedShortest x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ShortestPathSearch"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "countedShortest"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shortestPathSearchCountedShortestGroup :: Phantoms.TTerm Grammar.CountedShortestGroupSearch -> Phantoms.TTerm Grammar.ShortestPathSearch
-shortestPathSearchCountedShortestGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ShortestPathSearch"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "countedShortestGroup"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sideLeft :: Phantoms.TTerm Grammar.Side
-sideLeft =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Side"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "left"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sideRight :: Phantoms.TTerm Grammar.Side
-sideRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Side"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "right"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-signMinus :: Phantoms.TTerm Grammar.Sign
-signMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Sign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-signPlus :: Phantoms.TTerm Grammar.Sign
-signPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Sign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-signedBinaryExactNumericTypeBigInt :: Phantoms.TTerm Grammar.BigIntType -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeBigInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigInt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeInt128 :: Phantoms.TTerm Grammar.Int128Type -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeInt128 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int128"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeInt16 :: Phantoms.TTerm Grammar.Int16Type -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeInt16 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int16"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeInt256 :: Phantoms.TTerm Grammar.Int256Type -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeInt256 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int256"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeInt32 :: Phantoms.TTerm Grammar.Int32Type -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeInt32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeInt64 :: Phantoms.TTerm Grammar.Int64Type -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeInt64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeInt8 :: Phantoms.TTerm Grammar.Int8Type -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeInt8 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int8"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeIntWithPrecision :: Phantoms.TTerm Grammar.IntWithPrecision -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeIntWithPrecision x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intWithPrecision"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeSignedVerboseType :: Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeSignedVerboseType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "signedVerboseType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedBinaryExactNumericTypeSmallInt :: Phantoms.TTerm Grammar.SmallIntType -> Phantoms.TTerm Grammar.SignedBinaryExactNumericType
-signedBinaryExactNumericTypeSmallInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "smallInt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedExpr :: Phantoms.TTerm Grammar.Sign -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.SignedExpr
-signedExpr sign valueExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Phantoms.unTTerm sign)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)}]}))
-
-signedExprSign :: Phantoms.TTerm Grammar.SignedExpr -> Phantoms.TTerm Grammar.Sign
-signedExprSign x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-        Core.projectionField = (Core.Name "sign")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signedExprValueExpression :: Phantoms.TTerm Grammar.SignedExpr -> Phantoms.TTerm Grammar.ValueExpression
-signedExprValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signedExprWithSign :: Phantoms.TTerm Grammar.SignedExpr -> Phantoms.TTerm Grammar.Sign -> Phantoms.TTerm Grammar.SignedExpr
-signedExprWithSign original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-signedExprWithValueExpression :: Phantoms.TTerm Grammar.SignedExpr -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.SignedExpr
-signedExprWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SignedExpr"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-signedNumericValueExpression :: Phantoms.TTerm Grammar.Sign -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.SignedNumericValueExpression
-signedNumericValueExpression sign expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Phantoms.unTTerm sign)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-signedNumericValueExpressionExpression :: Phantoms.TTerm Grammar.SignedNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression
-signedNumericValueExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signedNumericValueExpressionSign :: Phantoms.TTerm Grammar.SignedNumericValueExpression -> Phantoms.TTerm Grammar.Sign
-signedNumericValueExpressionSign x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-        Core.projectionField = (Core.Name "sign")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signedNumericValueExpressionWithExpression :: Phantoms.TTerm Grammar.SignedNumericValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.SignedNumericValueExpression
-signedNumericValueExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-              Core.projectionField = (Core.Name "sign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-signedNumericValueExpressionWithSign :: Phantoms.TTerm Grammar.SignedNumericValueExpression -> Phantoms.TTerm Grammar.Sign -> Phantoms.TTerm Grammar.SignedNumericValueExpression
-signedNumericValueExpressionWithSign original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sign"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SignedNumericValueExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-signedVerboseBinaryExactNumericType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType -> Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType
-signedVerboseBinaryExactNumericType signed verboseType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "signed"),
-          Core.fieldTerm = (Phantoms.unTTerm signed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "verboseType"),
-          Core.fieldTerm = (Phantoms.unTTerm verboseType)}]}))
-
-signedVerboseBinaryExactNumericTypeSigned :: Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType -> Phantoms.TTerm Bool
-signedVerboseBinaryExactNumericTypeSigned x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-        Core.projectionField = (Core.Name "signed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signedVerboseBinaryExactNumericTypeVerboseType :: Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-signedVerboseBinaryExactNumericTypeVerboseType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-        Core.projectionField = (Core.Name "verboseType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-signedVerboseBinaryExactNumericTypeWithSigned :: Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType
-signedVerboseBinaryExactNumericTypeWithSigned original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "signed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "verboseType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-              Core.projectionField = (Core.Name "verboseType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-signedVerboseBinaryExactNumericTypeWithVerboseType :: Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType -> Phantoms.TTerm Grammar.SignedVerboseBinaryExactNumericType
-signedVerboseBinaryExactNumericTypeWithVerboseType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "signed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"),
-              Core.projectionField = (Core.Name "signed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "verboseType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleCase :: Phantoms.TTerm Grammar.CaseOperand -> Phantoms.TTerm [Grammar.SimpleWhenClause] -> Phantoms.TTerm (Maybe Grammar.ElseClause) -> Phantoms.TTerm Grammar.SimpleCase
-simpleCase caseOperand whenClauses elseClause =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseOperand"),
-          Core.fieldTerm = (Phantoms.unTTerm caseOperand)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm whenClauses)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Phantoms.unTTerm elseClause)}]}))
-
-simpleCaseCaseOperand :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm Grammar.CaseOperand
-simpleCaseCaseOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-        Core.projectionField = (Core.Name "caseOperand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleCaseElseClause :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm (Maybe Grammar.ElseClause)
-simpleCaseElseClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-        Core.projectionField = (Core.Name "elseClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleCaseWhenClauses :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm [Grammar.SimpleWhenClause]
-simpleCaseWhenClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-        Core.projectionField = (Core.Name "whenClauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleCaseWithCaseOperand :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm Grammar.CaseOperand -> Phantoms.TTerm Grammar.SimpleCase
-simpleCaseWithCaseOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseOperand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-              Core.projectionField = (Core.Name "whenClauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-              Core.projectionField = (Core.Name "elseClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleCaseWithElseClause :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm (Maybe Grammar.ElseClause) -> Phantoms.TTerm Grammar.SimpleCase
-simpleCaseWithElseClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseOperand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-              Core.projectionField = (Core.Name "caseOperand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-              Core.projectionField = (Core.Name "whenClauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleCaseWithWhenClauses :: Phantoms.TTerm Grammar.SimpleCase -> Phantoms.TTerm [Grammar.SimpleWhenClause] -> Phantoms.TTerm Grammar.SimpleCase
-simpleCaseWithWhenClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "caseOperand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-              Core.projectionField = (Core.Name "caseOperand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whenClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleCase"),
-              Core.projectionField = (Core.Name "elseClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleCatalogModifyingStatementCallProcedure :: Phantoms.TTerm Grammar.CallCatalogModifyingProcedureStatement -> Phantoms.TTerm Grammar.SimpleCatalogModifyingStatement
-simpleCatalogModifyingStatementCallProcedure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "callProcedure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleCatalogModifyingStatementPrimitive :: Phantoms.TTerm Grammar.PrimitiveCatalogModifyingStatement -> Phantoms.TTerm Grammar.SimpleCatalogModifyingStatement
-simpleCatalogModifyingStatementPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleCatalogModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleDataAccessingStatementModifying :: Phantoms.TTerm Grammar.SimpleDataModifyingStatement -> Phantoms.TTerm Grammar.SimpleDataAccessingStatement
-simpleDataAccessingStatementModifying x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleDataAccessingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "modifying"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleDataAccessingStatementQuery :: Phantoms.TTerm Grammar.SimpleQueryStatement -> Phantoms.TTerm Grammar.SimpleDataAccessingStatement
-simpleDataAccessingStatementQuery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleDataAccessingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "query"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleDataModifyingStatementCallProcedure :: Phantoms.TTerm Grammar.CallDataModifyingProcedureStatement -> Phantoms.TTerm Grammar.SimpleDataModifyingStatement
-simpleDataModifyingStatementCallProcedure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "callProcedure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleDataModifyingStatementPrimitive :: Phantoms.TTerm Grammar.PrimitiveDataModifyingStatement -> Phantoms.TTerm Grammar.SimpleDataModifyingStatement
-simpleDataModifyingStatementPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleDataModifyingStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleQueryStatementCall :: Phantoms.TTerm Grammar.CallQueryStatement -> Phantoms.TTerm Grammar.SimpleQueryStatement
-simpleQueryStatementCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleQueryStatementPrimitive :: Phantoms.TTerm Grammar.PrimitiveQueryStatement -> Phantoms.TTerm Grammar.SimpleQueryStatement
-simpleQueryStatementPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimpleQueryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleWhenClause :: Phantoms.TTerm Grammar.WhenOperandList -> Phantoms.TTerm Grammar.Result -> Phantoms.TTerm Grammar.SimpleWhenClause
-simpleWhenClause whenOperands result =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "whenOperands"),
-          Core.fieldTerm = (Phantoms.unTTerm whenOperands)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm result)}]}))
-
-simpleWhenClauseResult :: Phantoms.TTerm Grammar.SimpleWhenClause -> Phantoms.TTerm Grammar.Result
-simpleWhenClauseResult x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-        Core.projectionField = (Core.Name "result")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleWhenClauseWhenOperands :: Phantoms.TTerm Grammar.SimpleWhenClause -> Phantoms.TTerm Grammar.WhenOperandList
-simpleWhenClauseWhenOperands x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-        Core.projectionField = (Core.Name "whenOperands")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleWhenClauseWithResult :: Phantoms.TTerm Grammar.SimpleWhenClause -> Phantoms.TTerm Grammar.Result -> Phantoms.TTerm Grammar.SimpleWhenClause
-simpleWhenClauseWithResult original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "whenOperands"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-              Core.projectionField = (Core.Name "whenOperands")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleWhenClauseWithWhenOperands :: Phantoms.TTerm Grammar.SimpleWhenClause -> Phantoms.TTerm Grammar.WhenOperandList -> Phantoms.TTerm Grammar.SimpleWhenClause
-simpleWhenClauseWithWhenOperands original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "whenOperands"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "result"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimpleWhenClause"),
-              Core.projectionField = (Core.Name "result")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simplifiedConcatenation :: Phantoms.TTerm Grammar.SimplifiedTerm -> Phantoms.TTerm Grammar.SimplifiedFactorLow -> Phantoms.TTerm Grammar.SimplifiedConcatenation
-simplifiedConcatenation initialTerm nextFactor =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initialTerm"),
-          Core.fieldTerm = (Phantoms.unTTerm initialTerm)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nextFactor"),
-          Core.fieldTerm = (Phantoms.unTTerm nextFactor)}]}))
-
-simplifiedConcatenationInitialTerm :: Phantoms.TTerm Grammar.SimplifiedConcatenation -> Phantoms.TTerm Grammar.SimplifiedTerm
-simplifiedConcatenationInitialTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-        Core.projectionField = (Core.Name "initialTerm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simplifiedConcatenationNextFactor :: Phantoms.TTerm Grammar.SimplifiedConcatenation -> Phantoms.TTerm Grammar.SimplifiedFactorLow
-simplifiedConcatenationNextFactor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-        Core.projectionField = (Core.Name "nextFactor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simplifiedConcatenationWithInitialTerm :: Phantoms.TTerm Grammar.SimplifiedConcatenation -> Phantoms.TTerm Grammar.SimplifiedTerm -> Phantoms.TTerm Grammar.SimplifiedConcatenation
-simplifiedConcatenationWithInitialTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initialTerm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nextFactor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-              Core.projectionField = (Core.Name "nextFactor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simplifiedConcatenationWithNextFactor :: Phantoms.TTerm Grammar.SimplifiedConcatenation -> Phantoms.TTerm Grammar.SimplifiedFactorLow -> Phantoms.TTerm Grammar.SimplifiedConcatenation
-simplifiedConcatenationWithNextFactor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "initialTerm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConcatenation"),
-              Core.projectionField = (Core.Name "initialTerm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nextFactor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simplifiedConjunction :: Phantoms.TTerm Grammar.SimplifiedFactorLow -> Phantoms.TTerm Grammar.SimplifiedFactorHigh -> Phantoms.TTerm Grammar.SimplifiedConjunction
-simplifiedConjunction left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-simplifiedConjunctionLeft :: Phantoms.TTerm Grammar.SimplifiedConjunction -> Phantoms.TTerm Grammar.SimplifiedFactorLow
-simplifiedConjunctionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simplifiedConjunctionRight :: Phantoms.TTerm Grammar.SimplifiedConjunction -> Phantoms.TTerm Grammar.SimplifiedFactorHigh
-simplifiedConjunctionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simplifiedConjunctionWithLeft :: Phantoms.TTerm Grammar.SimplifiedConjunction -> Phantoms.TTerm Grammar.SimplifiedFactorLow -> Phantoms.TTerm Grammar.SimplifiedConjunction
-simplifiedConjunctionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simplifiedConjunctionWithRight :: Phantoms.TTerm Grammar.SimplifiedConjunction -> Phantoms.TTerm Grammar.SimplifiedFactorHigh -> Phantoms.TTerm Grammar.SimplifiedConjunction
-simplifiedConjunctionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedConjunction"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simplifiedContentsMultisetAlternation :: Phantoms.TTerm Grammar.SimplifiedMultisetAlternation -> Phantoms.TTerm Grammar.SimplifiedContents
-simplifiedContentsMultisetAlternation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedContents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multisetAlternation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedContentsPathUnion :: Phantoms.TTerm Grammar.SimplifiedPathUnion -> Phantoms.TTerm Grammar.SimplifiedContents
-simplifiedContentsPathUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedContents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pathUnion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedContentsTerm :: Phantoms.TTerm Grammar.SimplifiedTerm -> Phantoms.TTerm Grammar.SimplifiedContents
-simplifiedContentsTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedContents"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideAnyDirection :: Phantoms.TTerm Grammar.SimplifiedOverrideAnyDirection -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideAnyDirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideAnyDirection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideLeft :: Phantoms.TTerm Grammar.SimplifiedOverrideLeft -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideLeft"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideLeftOrRight :: Phantoms.TTerm Grammar.SimplifiedOverrideLeftOrRight -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideLeftOrRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideLeftOrRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideLeftOrUndirected :: Phantoms.TTerm Grammar.SimplifiedOverrideLeftOrUndirected -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideLeftOrUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideLeftOrUndirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideRight :: Phantoms.TTerm Grammar.SimplifiedOverrideRight -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideUndirected :: Phantoms.TTerm Grammar.SimplifiedOverrideUndirected -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideUndirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedDirectionOverrideOverrideUndirectedOrRight :: Phantoms.TTerm Grammar.SimplifiedOverrideUndirectedOrRight -> Phantoms.TTerm Grammar.SimplifiedDirectionOverride
-simplifiedDirectionOverrideOverrideUndirectedOrRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedDirectionOverride"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overrideUndirectedOrRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedFactorHighQuantified :: Phantoms.TTerm Grammar.SimplifiedQuantified -> Phantoms.TTerm Grammar.SimplifiedFactorHigh
-simplifiedFactorHighQuantified x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedFactorHigh"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quantified"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedFactorHighQuestioned :: Phantoms.TTerm Grammar.SimplifiedQuestioned -> Phantoms.TTerm Grammar.SimplifiedFactorHigh
-simplifiedFactorHighQuestioned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedFactorHigh"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "questioned"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedFactorHighTertiary :: Phantoms.TTerm Grammar.SimplifiedTertiary -> Phantoms.TTerm Grammar.SimplifiedFactorHigh
-simplifiedFactorHighTertiary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedFactorHigh"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tertiary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedFactorLowConjunction :: Phantoms.TTerm Grammar.SimplifiedConjunction -> Phantoms.TTerm Grammar.SimplifiedFactorLow
-simplifiedFactorLowConjunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedFactorLow"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conjunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedFactorLowFactorHigh :: Phantoms.TTerm Grammar.SimplifiedFactorHigh -> Phantoms.TTerm Grammar.SimplifiedFactorLow
-simplifiedFactorLowFactorHigh x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedFactorLow"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "factorHigh"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionAnyDirection :: Phantoms.TTerm Grammar.SimplifiedDefaultingAnyDirection -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionAnyDirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyDirection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionLeft :: Phantoms.TTerm Grammar.SimplifiedDefaultingLeft -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionLeft x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "left"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionLeftOrRight :: Phantoms.TTerm Grammar.SimplifiedDefaultingLeftOrRight -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionLeftOrRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftOrRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionLeftOrUndirected :: Phantoms.TTerm Grammar.SimplifiedDefaultingLeftOrUndirected -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionLeftOrUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftOrUndirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionRight :: Phantoms.TTerm Grammar.SimplifiedDefaultingRight -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "right"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionUndirected :: Phantoms.TTerm Grammar.SimplifiedDefaultingUndirected -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionUndirected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPathPatternExpressionUndirectedOrRight :: Phantoms.TTerm Grammar.SimplifiedDefaultingUndirectedOrRight -> Phantoms.TTerm Grammar.SimplifiedPathPatternExpression
-simplifiedPathPatternExpressionUndirectedOrRight x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPathPatternExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undirectedOrRight"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPrimaryLabelName :: Phantoms.TTerm Grammar.LabelName -> Phantoms.TTerm Grammar.SimplifiedPrimary
-simplifiedPrimaryLabelName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labelName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedPrimaryParenthesizedContents :: Phantoms.TTerm Grammar.SimplifiedContents -> Phantoms.TTerm Grammar.SimplifiedPrimary
-simplifiedPrimaryParenthesizedContents x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesizedContents"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedQuantified :: Phantoms.TTerm Grammar.SimplifiedTertiary -> Phantoms.TTerm Grammar.GraphPatternQuantifier -> Phantoms.TTerm Grammar.SimplifiedQuantified
-simplifiedQuantified tertiary quantifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tertiary"),
-          Core.fieldTerm = (Phantoms.unTTerm tertiary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)}]}))
-
-simplifiedQuantifiedQuantifier :: Phantoms.TTerm Grammar.SimplifiedQuantified -> Phantoms.TTerm Grammar.GraphPatternQuantifier
-simplifiedQuantifiedQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simplifiedQuantifiedTertiary :: Phantoms.TTerm Grammar.SimplifiedQuantified -> Phantoms.TTerm Grammar.SimplifiedTertiary
-simplifiedQuantifiedTertiary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-        Core.projectionField = (Core.Name "tertiary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simplifiedQuantifiedWithQuantifier :: Phantoms.TTerm Grammar.SimplifiedQuantified -> Phantoms.TTerm Grammar.GraphPatternQuantifier -> Phantoms.TTerm Grammar.SimplifiedQuantified
-simplifiedQuantifiedWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tertiary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-              Core.projectionField = (Core.Name "tertiary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simplifiedQuantifiedWithTertiary :: Phantoms.TTerm Grammar.SimplifiedQuantified -> Phantoms.TTerm Grammar.SimplifiedTertiary -> Phantoms.TTerm Grammar.SimplifiedQuantified
-simplifiedQuantifiedWithTertiary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tertiary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SimplifiedQuantified"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simplifiedSecondaryNegation :: Phantoms.TTerm Grammar.SimplifiedNegation -> Phantoms.TTerm Grammar.SimplifiedSecondary
-simplifiedSecondaryNegation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedSecondary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedSecondaryPrimary :: Phantoms.TTerm Grammar.SimplifiedPrimary -> Phantoms.TTerm Grammar.SimplifiedSecondary
-simplifiedSecondaryPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedSecondary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedTermConcatenation :: Phantoms.TTerm Grammar.SimplifiedConcatenation -> Phantoms.TTerm Grammar.SimplifiedTerm
-simplifiedTermConcatenation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedTerm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "concatenation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedTermFactorLow :: Phantoms.TTerm Grammar.SimplifiedFactorLow -> Phantoms.TTerm Grammar.SimplifiedTerm
-simplifiedTermFactorLow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedTerm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "factorLow"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedTertiaryDirectionOverride :: Phantoms.TTerm Grammar.SimplifiedDirectionOverride -> Phantoms.TTerm Grammar.SimplifiedTertiary
-simplifiedTertiaryDirectionOverride x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedTertiary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directionOverride"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simplifiedTertiarySecondary :: Phantoms.TTerm Grammar.SimplifiedSecondary -> Phantoms.TTerm Grammar.SimplifiedTertiary
-simplifiedTertiarySecondary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SimplifiedTertiary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "secondary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-smallIntType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SmallIntType
-smallIntType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SmallIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-smallIntTypeNotNull :: Phantoms.TTerm Grammar.SmallIntType -> Phantoms.TTerm Bool
-smallIntTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SmallIntType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-smallIntTypeWithNotNull :: Phantoms.TTerm Grammar.SmallIntType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SmallIntType
-smallIntTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SmallIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-smallIntegerType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SmallIntegerType
-smallIntegerType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SmallIntegerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-smallIntegerTypeNotNull :: Phantoms.TTerm Grammar.SmallIntegerType -> Phantoms.TTerm Bool
-smallIntegerTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SmallIntegerType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-smallIntegerTypeWithNotNull :: Phantoms.TTerm Grammar.SmallIntegerType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SmallIntegerType
-smallIntegerTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SmallIntegerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sortSpecification :: Phantoms.TTerm Grammar.SortKey -> Phantoms.TTerm (Maybe Grammar.OrderingSpecification) -> Phantoms.TTerm (Maybe Grammar.NullOrdering) -> Phantoms.TTerm Grammar.SortSpecification
-sortSpecification sortKey ordering nullOrdering =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sortKey"),
-          Core.fieldTerm = (Phantoms.unTTerm sortKey)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordering"),
-          Core.fieldTerm = (Phantoms.unTTerm ordering)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullOrdering"),
-          Core.fieldTerm = (Phantoms.unTTerm nullOrdering)}]}))
-
-sortSpecificationNullOrdering :: Phantoms.TTerm Grammar.SortSpecification -> Phantoms.TTerm (Maybe Grammar.NullOrdering)
-sortSpecificationNullOrdering x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-        Core.projectionField = (Core.Name "nullOrdering")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortSpecificationOrdering :: Phantoms.TTerm Grammar.SortSpecification -> Phantoms.TTerm (Maybe Grammar.OrderingSpecification)
-sortSpecificationOrdering x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-        Core.projectionField = (Core.Name "ordering")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortSpecificationSortKey :: Phantoms.TTerm Grammar.SortSpecification -> Phantoms.TTerm Grammar.SortKey
-sortSpecificationSortKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-        Core.projectionField = (Core.Name "sortKey")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortSpecificationWithNullOrdering :: Phantoms.TTerm Grammar.SortSpecification -> Phantoms.TTerm (Maybe Grammar.NullOrdering) -> Phantoms.TTerm Grammar.SortSpecification
-sortSpecificationWithNullOrdering original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sortKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-              Core.projectionField = (Core.Name "sortKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordering"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-              Core.projectionField = (Core.Name "ordering")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullOrdering"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sortSpecificationWithOrdering :: Phantoms.TTerm Grammar.SortSpecification -> Phantoms.TTerm (Maybe Grammar.OrderingSpecification) -> Phantoms.TTerm Grammar.SortSpecification
-sortSpecificationWithOrdering original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sortKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-              Core.projectionField = (Core.Name "sortKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordering"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullOrdering"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-              Core.projectionField = (Core.Name "nullOrdering")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sortSpecificationWithSortKey :: Phantoms.TTerm Grammar.SortSpecification -> Phantoms.TTerm Grammar.SortKey -> Phantoms.TTerm Grammar.SortSpecification
-sortSpecificationWithSortKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "sortKey"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordering"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-              Core.projectionField = (Core.Name "ordering")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullOrdering"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SortSpecification"),
-              Core.projectionField = (Core.Name "nullOrdering")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sourceDestinationPredicateDestinationPredicate :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Grammar.SourceDestinationPredicate
-sourceDestinationPredicateDestinationPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SourceDestinationPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "destinationPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sourceDestinationPredicateSourcePredicate :: Phantoms.TTerm Grammar.SourcePredicate -> Phantoms.TTerm Grammar.SourceDestinationPredicate
-sourceDestinationPredicateSourcePredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SourceDestinationPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourcePredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sourceNodeTypeReferenceAlias :: Phantoms.TTerm Grammar.SourceNodeTypeAlias -> Phantoms.TTerm Grammar.SourceNodeTypeReference
-sourceNodeTypeReferenceAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SourceNodeTypeReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sourceNodeTypeReferenceFiller :: Phantoms.TTerm (Maybe Grammar.NodeTypeFiller) -> Phantoms.TTerm Grammar.SourceNodeTypeReference
-sourceNodeTypeReferenceFiller x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.SourceNodeTypeReference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "filler"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sourcePredicate :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.EdgeReference -> Phantoms.TTerm Grammar.SourcePredicate
-sourcePredicate not sourceOf =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceOf"),
-          Core.fieldTerm = (Phantoms.unTTerm sourceOf)}]}))
-
-sourcePredicateNot :: Phantoms.TTerm Grammar.SourcePredicate -> Phantoms.TTerm Bool
-sourcePredicateNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourcePredicateSourceOf :: Phantoms.TTerm Grammar.SourcePredicate -> Phantoms.TTerm Grammar.EdgeReference
-sourcePredicateSourceOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-        Core.projectionField = (Core.Name "sourceOf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourcePredicateWithNot :: Phantoms.TTerm Grammar.SourcePredicate -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SourcePredicate
-sourcePredicateWithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-              Core.projectionField = (Core.Name "sourceOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sourcePredicateWithSourceOf :: Phantoms.TTerm Grammar.SourcePredicate -> Phantoms.TTerm Grammar.EdgeReference -> Phantoms.TTerm Grammar.SourcePredicate
-sourcePredicateWithSourceOf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SourcePredicate"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sourceOf"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-specifiedRecordType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.FieldTypesSpecification -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SpecifiedRecordType
-specifiedRecordType record fieldTypes notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (Phantoms.unTTerm record)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-specifiedRecordTypeFieldTypes :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Grammar.FieldTypesSpecification
-specifiedRecordTypeFieldTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-        Core.projectionField = (Core.Name "fieldTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-specifiedRecordTypeNotNull :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Bool
-specifiedRecordTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-specifiedRecordTypeRecord :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Bool
-specifiedRecordTypeRecord x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-        Core.projectionField = (Core.Name "record")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-specifiedRecordTypeWithFieldTypes :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Grammar.FieldTypesSpecification -> Phantoms.TTerm Grammar.SpecifiedRecordType
-specifiedRecordTypeWithFieldTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-              Core.projectionField = (Core.Name "record")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-specifiedRecordTypeWithNotNull :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SpecifiedRecordType
-specifiedRecordTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-              Core.projectionField = (Core.Name "record")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-              Core.projectionField = (Core.Name "fieldTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-specifiedRecordTypeWithRecord :: Phantoms.TTerm Grammar.SpecifiedRecordType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.SpecifiedRecordType
-specifiedRecordTypeWithRecord original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-              Core.projectionField = (Core.Name "fieldTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SpecifiedRecordType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-startAndMaybeProcedureAndMaybeEnd :: Phantoms.TTerm Grammar.StartTransactionCommand -> Phantoms.TTerm (Maybe Grammar.ProcedureAndMaybeEnd) -> Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd
-startAndMaybeProcedureAndMaybeEnd start procedureAndEnd =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm start)},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureAndEnd"),
-          Core.fieldTerm = (Phantoms.unTTerm procedureAndEnd)}]}))
-
-startAndMaybeProcedureAndMaybeEndProcedureAndEnd :: Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd -> Phantoms.TTerm (Maybe Grammar.ProcedureAndMaybeEnd)
-startAndMaybeProcedureAndMaybeEndProcedureAndEnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-        Core.projectionField = (Core.Name "procedureAndEnd")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-startAndMaybeProcedureAndMaybeEndStart :: Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd -> Phantoms.TTerm Grammar.StartTransactionCommand
-startAndMaybeProcedureAndMaybeEndStart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-        Core.projectionField = (Core.Name "start")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-startAndMaybeProcedureAndMaybeEndWithProcedureAndEnd :: Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd -> Phantoms.TTerm (Maybe Grammar.ProcedureAndMaybeEnd) -> Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd
-startAndMaybeProcedureAndMaybeEndWithProcedureAndEnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureAndEnd"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-startAndMaybeProcedureAndMaybeEndWithStart :: Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd -> Phantoms.TTerm Grammar.StartTransactionCommand -> Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd
-startAndMaybeProcedureAndMaybeEndWithStart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "procedureAndEnd"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"),
-              Core.projectionField = (Core.Name "procedureAndEnd")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statementBlock :: Phantoms.TTerm Grammar.Statement -> Phantoms.TTerm [Grammar.NextStatement] -> Phantoms.TTerm Grammar.StatementBlock
-statementBlock statement nextStatements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nextStatements"),
-          Core.fieldTerm = (Phantoms.unTTerm nextStatements)}]}))
-
-statementBlockNextStatements :: Phantoms.TTerm Grammar.StatementBlock -> Phantoms.TTerm [Grammar.NextStatement]
-statementBlockNextStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-        Core.projectionField = (Core.Name "nextStatements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statementBlockStatement :: Phantoms.TTerm Grammar.StatementBlock -> Phantoms.TTerm Grammar.Statement
-statementBlockStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statementBlockWithNextStatements :: Phantoms.TTerm Grammar.StatementBlock -> Phantoms.TTerm [Grammar.NextStatement] -> Phantoms.TTerm Grammar.StatementBlock
-statementBlockWithNextStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nextStatements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-statementBlockWithStatement :: Phantoms.TTerm Grammar.StatementBlock -> Phantoms.TTerm Grammar.Statement -> Phantoms.TTerm Grammar.StatementBlock
-statementBlockWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nextStatements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StatementBlock"),
-              Core.projectionField = (Core.Name "nextStatements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statementCompositeQuery :: Phantoms.TTerm Grammar.CompositeQueryStatement -> Phantoms.TTerm Grammar.Statement
-statementCompositeQuery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compositeQuery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLinearCatalogModifying :: Phantoms.TTerm Grammar.LinearCatalogModifyingStatement -> Phantoms.TTerm Grammar.Statement
-statementLinearCatalogModifying x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "linearCatalogModifying"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLinearDataModifying :: Phantoms.TTerm Grammar.LinearDataModifyingStatement -> Phantoms.TTerm Grammar.Statement
-statementLinearDataModifying x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "linearDataModifying"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringType :: Phantoms.TTerm (Maybe Grammar.MinLength) -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.StringType
-stringType minLength maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StringType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Phantoms.unTTerm minLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-stringTypeMaxLength :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-stringTypeMaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringTypeMinLength :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm (Maybe Grammar.MinLength)
-stringTypeMinLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-        Core.projectionField = (Core.Name "minLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringTypeNotNull :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm Bool
-stringTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringTypeWithMaxLength :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.StringType
-stringTypeWithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StringType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-              Core.projectionField = (Core.Name "minLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringTypeWithMinLength :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm (Maybe Grammar.MinLength) -> Phantoms.TTerm Grammar.StringType
-stringTypeWithMinLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StringType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringTypeWithNotNull :: Phantoms.TTerm Grammar.StringType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.StringType
-stringTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.StringType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "minLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-              Core.projectionField = (Core.Name "minLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.StringType"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subCharacterOrByteString :: Phantoms.TTerm Grammar.Side -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.StringLength -> Phantoms.TTerm Grammar.SubCharacterOrByteString
-subCharacterOrByteString side valueExpression stringLength =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "side"),
-          Core.fieldTerm = (Phantoms.unTTerm side)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringLength"),
-          Core.fieldTerm = (Phantoms.unTTerm stringLength)}]}))
-
-subCharacterOrByteStringSide :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.Side
-subCharacterOrByteStringSide x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-        Core.projectionField = (Core.Name "side")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subCharacterOrByteStringStringLength :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.StringLength
-subCharacterOrByteStringStringLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-        Core.projectionField = (Core.Name "stringLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subCharacterOrByteStringValueExpression :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.ValueExpression
-subCharacterOrByteStringValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subCharacterOrByteStringWithSide :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.Side -> Phantoms.TTerm Grammar.SubCharacterOrByteString
-subCharacterOrByteStringWithSide original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "side"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-              Core.projectionField = (Core.Name "stringLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subCharacterOrByteStringWithStringLength :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.StringLength -> Phantoms.TTerm Grammar.SubCharacterOrByteString
-subCharacterOrByteStringWithStringLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "side"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-              Core.projectionField = (Core.Name "side")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subCharacterOrByteStringWithValueExpression :: Phantoms.TTerm Grammar.SubCharacterOrByteString -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.SubCharacterOrByteString
-subCharacterOrByteStringWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "side"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-              Core.projectionField = (Core.Name "side")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stringLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.SubCharacterOrByteString"),
-              Core.projectionField = (Core.Name "stringLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalDurationQualifierDayToSecond :: Phantoms.TTerm Grammar.TemporalDurationQualifier
-temporalDurationQualifierDayToSecond =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalDurationQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dayToSecond"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-temporalDurationQualifierYearToMonth :: Phantoms.TTerm Grammar.TemporalDurationQualifier
-temporalDurationQualifierYearToMonth =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalDurationQualifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "yearToMonth"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-temporalDurationType :: Phantoms.TTerm Grammar.TemporalDurationQualifier -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TemporalDurationType
-temporalDurationType qualifier notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifier)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-temporalDurationTypeNotNull :: Phantoms.TTerm Grammar.TemporalDurationType -> Phantoms.TTerm Bool
-temporalDurationTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationTypeQualifier :: Phantoms.TTerm Grammar.TemporalDurationType -> Phantoms.TTerm Grammar.TemporalDurationQualifier
-temporalDurationTypeQualifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-        Core.projectionField = (Core.Name "qualifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-temporalDurationTypeWithNotNull :: Phantoms.TTerm Grammar.TemporalDurationType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TemporalDurationType
-temporalDurationTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-              Core.projectionField = (Core.Name "qualifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-temporalDurationTypeWithQualifier :: Phantoms.TTerm Grammar.TemporalDurationType -> Phantoms.TTerm Grammar.TemporalDurationQualifier -> Phantoms.TTerm Grammar.TemporalDurationType
-temporalDurationTypeWithQualifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TemporalDurationType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-temporalInstantTypeDateType :: Phantoms.TTerm Grammar.DateType -> Phantoms.TTerm Grammar.TemporalInstantType
-temporalInstantTypeDateType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalInstantType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalInstantTypeDatetimeType :: Phantoms.TTerm Grammar.DatetimeType -> Phantoms.TTerm Grammar.TemporalInstantType
-temporalInstantTypeDatetimeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalInstantType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetimeType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalInstantTypeLocalDatetimeTypeChoice :: Phantoms.TTerm Grammar.LocalDatetimeTypeChoice -> Phantoms.TTerm Grammar.TemporalInstantType
-temporalInstantTypeLocalDatetimeTypeChoice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalInstantType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localDatetimeTypeChoice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalInstantTypeLocalTimeTypeChoice :: Phantoms.TTerm Grammar.LocalTimeTypeChoice -> Phantoms.TTerm Grammar.TemporalInstantType
-temporalInstantTypeLocalTimeTypeChoice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalInstantType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "localTimeTypeChoice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalInstantTypeTimeType :: Phantoms.TTerm Grammar.TimeType -> Phantoms.TTerm Grammar.TemporalInstantType
-temporalInstantTypeTimeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalInstantType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalLiteralDate :: Phantoms.TTerm Grammar.DateLiteral -> Phantoms.TTerm Grammar.TemporalLiteral
-temporalLiteralDate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalLiteralDatetime :: Phantoms.TTerm Grammar.DatetimeLiteral -> Phantoms.TTerm Grammar.TemporalLiteral
-temporalLiteralDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalLiteralTime :: Phantoms.TTerm Grammar.TimeLiteral -> Phantoms.TTerm Grammar.TemporalLiteral
-temporalLiteralTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "time"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalTypeDurationType :: Phantoms.TTerm Grammar.TemporalDurationType -> Phantoms.TTerm Grammar.TemporalType
-temporalTypeDurationType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "durationType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-temporalTypeInstantType :: Phantoms.TTerm Grammar.TemporalInstantType -> Phantoms.TTerm Grammar.TemporalType
-temporalTypeInstantType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TemporalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "instantType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-timeFunctionCurrentTime :: Phantoms.TTerm Grammar.TimeFunction
-timeFunctionCurrentTime =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TimeFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "currentTime"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-timeFunctionParametersRecordConstructor :: Phantoms.TTerm Grammar.RecordConstructor -> Phantoms.TTerm Grammar.TimeFunctionParameters
-timeFunctionParametersRecordConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TimeFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordConstructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-timeFunctionParametersTimeString :: Phantoms.TTerm Grammar.TimeString -> Phantoms.TTerm Grammar.TimeFunctionParameters
-timeFunctionParametersTimeString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TimeFunctionParameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-timeFunctionZonedTimeWithParams :: Phantoms.TTerm (Maybe Grammar.TimeFunctionParameters) -> Phantoms.TTerm Grammar.TimeFunction
-timeFunctionZonedTimeWithParams x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TimeFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zonedTimeWithParams"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-timeTypeTimeWithTimeZone :: Phantoms.TTerm Grammar.TimeWithTimeZoneType -> Phantoms.TTerm Grammar.TimeType
-timeTypeTimeWithTimeZone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TimeType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timeWithTimeZone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-timeTypeZonedTime :: Phantoms.TTerm Grammar.ZonedTimeType -> Phantoms.TTerm Grammar.TimeType
-timeTypeZonedTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TimeType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zonedTime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-timeWithTimeZoneType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimeWithTimeZoneType
-timeWithTimeZoneType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimeWithTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-timeWithTimeZoneTypeNotNull :: Phantoms.TTerm Grammar.TimeWithTimeZoneType -> Phantoms.TTerm Bool
-timeWithTimeZoneTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TimeWithTimeZoneType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timeWithTimeZoneTypeWithNotNull :: Phantoms.TTerm Grammar.TimeWithTimeZoneType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimeWithTimeZoneType
-timeWithTimeZoneTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimeWithTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-timeWithoutTimeZoneType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimeWithoutTimeZoneType
-timeWithoutTimeZoneType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimeWithoutTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-timeWithoutTimeZoneTypeNotNull :: Phantoms.TTerm Grammar.TimeWithoutTimeZoneType -> Phantoms.TTerm Bool
-timeWithoutTimeZoneTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TimeWithoutTimeZoneType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timeWithoutTimeZoneTypeWithNotNull :: Phantoms.TTerm Grammar.TimeWithoutTimeZoneType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimeWithoutTimeZoneType
-timeWithoutTimeZoneTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimeWithoutTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-timestampWithTimeZoneType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimestampWithTimeZoneType
-timestampWithTimeZoneType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimestampWithTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-timestampWithTimeZoneTypeNotNull :: Phantoms.TTerm Grammar.TimestampWithTimeZoneType -> Phantoms.TTerm Bool
-timestampWithTimeZoneTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TimestampWithTimeZoneType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timestampWithTimeZoneTypeWithNotNull :: Phantoms.TTerm Grammar.TimestampWithTimeZoneType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimestampWithTimeZoneType
-timestampWithTimeZoneTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimestampWithTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-timestampWithoutTimeZoneType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimestampWithoutTimeZoneType
-timestampWithoutTimeZoneType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimestampWithoutTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-timestampWithoutTimeZoneTypeNotNull :: Phantoms.TTerm Grammar.TimestampWithoutTimeZoneType -> Phantoms.TTerm Bool
-timestampWithoutTimeZoneTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TimestampWithoutTimeZoneType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timestampWithoutTimeZoneTypeWithNotNull :: Phantoms.TTerm Grammar.TimestampWithoutTimeZoneType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TimestampWithoutTimeZoneType
-timestampWithoutTimeZoneTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TimestampWithoutTimeZoneType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-transactionAccessModeReadOnly :: Phantoms.TTerm Grammar.TransactionAccessMode
-transactionAccessModeReadOnly =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TransactionAccessMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "readOnly"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-transactionAccessModeReadWrite :: Phantoms.TTerm Grammar.TransactionAccessMode
-transactionAccessModeReadWrite =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TransactionAccessMode"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "readWrite"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-transactionActivityEnd :: Phantoms.TTerm Grammar.EndTransactionCommand -> Phantoms.TTerm Grammar.TransactionActivity
-transactionActivityEnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TransactionActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "end"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-transactionActivityProcedure :: Phantoms.TTerm Grammar.ProcedureAndMaybeEnd -> Phantoms.TTerm Grammar.TransactionActivity
-transactionActivityProcedure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TransactionActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "procedure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-transactionActivityStart :: Phantoms.TTerm Grammar.StartAndMaybeProcedureAndMaybeEnd -> Phantoms.TTerm Grammar.TransactionActivity
-transactionActivityStart x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TransactionActivity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "start"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-trigonometricFunction :: Phantoms.TTerm Grammar.TrigonometricFunctionName -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.TrigonometricFunction
-trigonometricFunction name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-trigonometricFunctionName :: Phantoms.TTerm Grammar.TrigonometricFunction -> Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionNameAcos :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameAcos =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "acos"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameAsin :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameAsin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asin"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameAtan :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameAtan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "atan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameCos :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameCos =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cos"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameCosh :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameCosh =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cosh"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameCot :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameCot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameDegrees :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameDegrees =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "degrees"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameRadians :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameRadians =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "radians"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameSin :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameSin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sin"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameSinh :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameSinh =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sinh"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameTan :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameTan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionNameTanh :: Phantoms.TTerm Grammar.TrigonometricFunctionName
-trigonometricFunctionNameTanh =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunctionName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tanh"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trigonometricFunctionValue :: Phantoms.TTerm Grammar.TrigonometricFunction -> Phantoms.TTerm Grammar.NumericValueExpression
-trigonometricFunctionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trigonometricFunctionWithName :: Phantoms.TTerm Grammar.TrigonometricFunction -> Phantoms.TTerm Grammar.TrigonometricFunctionName -> Phantoms.TTerm Grammar.TrigonometricFunction
-trigonometricFunctionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trigonometricFunctionWithValue :: Phantoms.TTerm Grammar.TrigonometricFunction -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.TrigonometricFunction
-trigonometricFunctionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrigonometricFunction"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-trimListFunction :: Phantoms.TTerm Grammar.ListValueExpression -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.TrimListFunction
-trimListFunction listValue numericValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listValue"),
-          Core.fieldTerm = (Phantoms.unTTerm listValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericValue"),
-          Core.fieldTerm = (Phantoms.unTTerm numericValue)}]}))
-
-trimListFunctionListValue :: Phantoms.TTerm Grammar.TrimListFunction -> Phantoms.TTerm Grammar.ListValueExpression
-trimListFunctionListValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-        Core.projectionField = (Core.Name "listValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimListFunctionNumericValue :: Phantoms.TTerm Grammar.TrimListFunction -> Phantoms.TTerm Grammar.NumericValueExpression
-trimListFunctionNumericValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-        Core.projectionField = (Core.Name "numericValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimListFunctionWithListValue :: Phantoms.TTerm Grammar.TrimListFunction -> Phantoms.TTerm Grammar.ListValueExpression -> Phantoms.TTerm Grammar.TrimListFunction
-trimListFunctionWithListValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-              Core.projectionField = (Core.Name "numericValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trimListFunctionWithNumericValue :: Phantoms.TTerm Grammar.TrimListFunction -> Phantoms.TTerm Grammar.NumericValueExpression -> Phantoms.TTerm Grammar.TrimListFunction
-trimListFunctionWithNumericValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimListFunction"),
-              Core.projectionField = (Core.Name "listValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numericValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-trimMultiCharacterCharacterString :: Phantoms.TTerm Grammar.TrimType -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm (Maybe Grammar.ValueExpression) -> Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString
-trimMultiCharacterCharacterString trimType valueExpression optionalValueExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trimType"),
-          Core.fieldTerm = (Phantoms.unTTerm trimType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalValueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm optionalValueExpression)}]}))
-
-trimMultiCharacterCharacterStringOptionalValueExpression :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm (Maybe Grammar.ValueExpression)
-trimMultiCharacterCharacterStringOptionalValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-        Core.projectionField = (Core.Name "optionalValueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimMultiCharacterCharacterStringTrimType :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm Grammar.TrimType
-trimMultiCharacterCharacterStringTrimType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-        Core.projectionField = (Core.Name "trimType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimMultiCharacterCharacterStringValueExpression :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm Grammar.ValueExpression
-trimMultiCharacterCharacterStringValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimMultiCharacterCharacterStringWithOptionalValueExpression :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm (Maybe Grammar.ValueExpression) -> Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString
-trimMultiCharacterCharacterStringWithOptionalValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trimType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-              Core.projectionField = (Core.Name "trimType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalValueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-trimMultiCharacterCharacterStringWithTrimType :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm Grammar.TrimType -> Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString
-trimMultiCharacterCharacterStringWithTrimType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trimType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalValueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-              Core.projectionField = (Core.Name "optionalValueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trimMultiCharacterCharacterStringWithValueExpression :: Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString -> Phantoms.TTerm Grammar.ValueExpression -> Phantoms.TTerm Grammar.TrimMultiCharacterCharacterString
-trimMultiCharacterCharacterStringWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trimType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-              Core.projectionField = (Core.Name "trimType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optionalValueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"),
-              Core.projectionField = (Core.Name "optionalValueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trimOperands :: Phantoms.TTerm (Maybe Grammar.TrimSpecification) -> Phantoms.TTerm (Maybe Grammar.TrimCharacterOrByteString) -> Phantoms.TTerm Grammar.TrimCharacterOrByteStringSource -> Phantoms.TTerm Grammar.TrimOperands
-trimOperands specification characterOrByteString source =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Phantoms.unTTerm specification)},
-        Core.Field {
-          Core.fieldName = (Core.Name "characterOrByteString"),
-          Core.fieldTerm = (Phantoms.unTTerm characterOrByteString)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)}]}))
-
-trimOperandsCharacterOrByteString :: Phantoms.TTerm Grammar.TrimOperands -> Phantoms.TTerm (Maybe Grammar.TrimCharacterOrByteString)
-trimOperandsCharacterOrByteString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-        Core.projectionField = (Core.Name "characterOrByteString")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimOperandsSource :: Phantoms.TTerm Grammar.TrimOperands -> Phantoms.TTerm Grammar.TrimCharacterOrByteStringSource
-trimOperandsSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimOperandsSpecification :: Phantoms.TTerm Grammar.TrimOperands -> Phantoms.TTerm (Maybe Grammar.TrimSpecification)
-trimOperandsSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-        Core.projectionField = (Core.Name "specification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-trimOperandsWithCharacterOrByteString :: Phantoms.TTerm Grammar.TrimOperands -> Phantoms.TTerm (Maybe Grammar.TrimCharacterOrByteString) -> Phantoms.TTerm Grammar.TrimOperands
-trimOperandsWithCharacterOrByteString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-              Core.projectionField = (Core.Name "specification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "characterOrByteString"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trimOperandsWithSource :: Phantoms.TTerm Grammar.TrimOperands -> Phantoms.TTerm Grammar.TrimCharacterOrByteStringSource -> Phantoms.TTerm Grammar.TrimOperands
-trimOperandsWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-              Core.projectionField = (Core.Name "specification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "characterOrByteString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-              Core.projectionField = (Core.Name "characterOrByteString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-trimOperandsWithSpecification :: Phantoms.TTerm Grammar.TrimOperands -> Phantoms.TTerm (Maybe Grammar.TrimSpecification) -> Phantoms.TTerm Grammar.TrimOperands
-trimOperandsWithSpecification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "characterOrByteString"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-              Core.projectionField = (Core.Name "characterOrByteString")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TrimOperands"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-trimSpecificationBoth :: Phantoms.TTerm Grammar.TrimSpecification
-trimSpecificationBoth =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrimSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "both"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trimSpecificationLeading :: Phantoms.TTerm Grammar.TrimSpecification
-trimSpecificationLeading =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrimSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leading"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trimSpecificationTrailing :: Phantoms.TTerm Grammar.TrimSpecification
-trimSpecificationTrailing =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrimSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trailing"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trimTypeBtrim :: Phantoms.TTerm Grammar.TrimType
-trimTypeBtrim =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrimType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "btrim"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trimTypeLtrim :: Phantoms.TTerm Grammar.TrimType
-trimTypeLtrim =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrimType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ltrim"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-trimTypeRtrim :: Phantoms.TTerm Grammar.TrimType
-trimTypeRtrim =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.TrimType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rtrim"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typedBindingTableReferenceValueType :: Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType
-typedBindingTableReferenceValueType typed valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-typedBindingTableReferenceValueTypeTyped :: Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType -> Phantoms.TTerm (Maybe Grammar.Typed)
-typedBindingTableReferenceValueTypeTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedBindingTableReferenceValueTypeValueType :: Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType -> Phantoms.TTerm Grammar.BindingTableReferenceValueType
-typedBindingTableReferenceValueTypeValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedBindingTableReferenceValueTypeWithTyped :: Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType
-typedBindingTableReferenceValueTypeWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedBindingTableReferenceValueTypeWithValueType :: Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType -> Phantoms.TTerm Grammar.BindingTableReferenceValueType -> Phantoms.TTerm Grammar.TypedBindingTableReferenceValueType
-typedBindingTableReferenceValueTypeWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typedGraphReferenceValueType :: Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.GraphReferenceValueType -> Phantoms.TTerm Grammar.TypedGraphReferenceValueType
-typedGraphReferenceValueType typed valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-typedGraphReferenceValueTypeTyped :: Phantoms.TTerm Grammar.TypedGraphReferenceValueType -> Phantoms.TTerm (Maybe Grammar.Typed)
-typedGraphReferenceValueTypeTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedGraphReferenceValueTypeValueType :: Phantoms.TTerm Grammar.TypedGraphReferenceValueType -> Phantoms.TTerm Grammar.GraphReferenceValueType
-typedGraphReferenceValueTypeValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedGraphReferenceValueTypeWithTyped :: Phantoms.TTerm Grammar.TypedGraphReferenceValueType -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.TypedGraphReferenceValueType
-typedGraphReferenceValueTypeWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedGraphReferenceValueTypeWithValueType :: Phantoms.TTerm Grammar.TypedGraphReferenceValueType -> Phantoms.TTerm Grammar.GraphReferenceValueType -> Phantoms.TTerm Grammar.TypedGraphReferenceValueType
-typedGraphReferenceValueTypeWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphReferenceValueType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typedGraphTypeReference :: Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.GraphTypeReference -> Phantoms.TTerm Grammar.TypedGraphTypeReference
-typedGraphTypeReference typed reference =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Phantoms.unTTerm reference)}]}))
-
-typedGraphTypeReferenceReference :: Phantoms.TTerm Grammar.TypedGraphTypeReference -> Phantoms.TTerm Grammar.GraphTypeReference
-typedGraphTypeReferenceReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-        Core.projectionField = (Core.Name "reference")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedGraphTypeReferenceTyped :: Phantoms.TTerm Grammar.TypedGraphTypeReference -> Phantoms.TTerm (Maybe Grammar.Typed)
-typedGraphTypeReferenceTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedGraphTypeReferenceWithReference :: Phantoms.TTerm Grammar.TypedGraphTypeReference -> Phantoms.TTerm Grammar.GraphTypeReference -> Phantoms.TTerm Grammar.TypedGraphTypeReference
-typedGraphTypeReferenceWithReference original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typedGraphTypeReferenceWithTyped :: Phantoms.TTerm Grammar.TypedGraphTypeReference -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.TypedGraphTypeReference
-typedGraphTypeReferenceWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "reference"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedGraphTypeReference"),
-              Core.projectionField = (Core.Name "reference")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedNestedGraphTypeSpecification :: Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.NestedGraphTypeSpecification -> Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification
-typedNestedGraphTypeSpecification typed graph specification =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Phantoms.unTTerm specification)}]}))
-
-typedNestedGraphTypeSpecificationGraph :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm Bool
-typedNestedGraphTypeSpecificationGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedNestedGraphTypeSpecificationSpecification :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm Grammar.NestedGraphTypeSpecification
-typedNestedGraphTypeSpecificationSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-        Core.projectionField = (Core.Name "specification")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedNestedGraphTypeSpecificationTyped :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm (Maybe Grammar.Typed)
-typedNestedGraphTypeSpecificationTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedNestedGraphTypeSpecificationWithGraph :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification
-typedNestedGraphTypeSpecificationWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-              Core.projectionField = (Core.Name "specification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedNestedGraphTypeSpecificationWithSpecification :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm Grammar.NestedGraphTypeSpecification -> Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification
-typedNestedGraphTypeSpecificationWithSpecification original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typedNestedGraphTypeSpecificationWithTyped :: Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.TypedNestedGraphTypeSpecification
-typedNestedGraphTypeSpecificationWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "specification"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"),
-              Core.projectionField = (Core.Name "specification")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedValueType :: Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.TypedValueType
-typedValueType typed valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-typedValueTypeTyped :: Phantoms.TTerm Grammar.TypedValueType -> Phantoms.TTerm (Maybe Grammar.Typed)
-typedValueTypeTyped x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedValueTypeValueType :: Phantoms.TTerm Grammar.TypedValueType -> Phantoms.TTerm Grammar.ValueType
-typedValueTypeValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedValueTypeWithTyped :: Phantoms.TTerm Grammar.TypedValueType -> Phantoms.TTerm (Maybe Grammar.Typed) -> Phantoms.TTerm Grammar.TypedValueType
-typedValueTypeWithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedValueTypeWithValueType :: Phantoms.TTerm Grammar.TypedValueType -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.TypedValueType
-typedValueTypeWithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.TypedValueType"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uBigIntType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.UBigIntType
-uBigIntType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.UBigIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uBigIntTypeNotNull :: Phantoms.TTerm Grammar.UBigIntType -> Phantoms.TTerm Bool
-uBigIntTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.UBigIntType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uBigIntTypeWithNotNull :: Phantoms.TTerm Grammar.UBigIntType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.UBigIntType
-uBigIntTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.UBigIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uSmallIntType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.USmallIntType
-uSmallIntType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.USmallIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uSmallIntTypeNotNull :: Phantoms.TTerm Grammar.USmallIntType -> Phantoms.TTerm Bool
-uSmallIntTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.USmallIntType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uSmallIntTypeWithNotNull :: Phantoms.TTerm Grammar.USmallIntType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.USmallIntType
-uSmallIntTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.USmallIntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uint128Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint128Type
-uint128Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uint128TypeNotNull :: Phantoms.TTerm Grammar.Uint128Type -> Phantoms.TTerm Bool
-uint128TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Uint128Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uint128TypeWithNotNull :: Phantoms.TTerm Grammar.Uint128Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint128Type
-uint128TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint128Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uint16Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint16Type
-uint16Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uint16TypeNotNull :: Phantoms.TTerm Grammar.Uint16Type -> Phantoms.TTerm Bool
-uint16TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Uint16Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uint16TypeWithNotNull :: Phantoms.TTerm Grammar.Uint16Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint16Type
-uint16TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint16Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uint256Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint256Type
-uint256Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uint256TypeNotNull :: Phantoms.TTerm Grammar.Uint256Type -> Phantoms.TTerm Bool
-uint256TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Uint256Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uint256TypeWithNotNull :: Phantoms.TTerm Grammar.Uint256Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint256Type
-uint256TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint256Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uint32Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint32Type
-uint32Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uint32TypeNotNull :: Phantoms.TTerm Grammar.Uint32Type -> Phantoms.TTerm Bool
-uint32TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Uint32Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uint32TypeWithNotNull :: Phantoms.TTerm Grammar.Uint32Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint32Type
-uint32TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint32Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uint64Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint64Type
-uint64Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uint64TypeNotNull :: Phantoms.TTerm Grammar.Uint64Type -> Phantoms.TTerm Bool
-uint64TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Uint64Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uint64TypeWithNotNull :: Phantoms.TTerm Grammar.Uint64Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint64Type
-uint64TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint64Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uint8Type :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint8Type
-uint8Type notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint8Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uint8TypeNotNull :: Phantoms.TTerm Grammar.Uint8Type -> Phantoms.TTerm Bool
-uint8TypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.Uint8Type"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uint8TypeWithNotNull :: Phantoms.TTerm Grammar.Uint8Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Uint8Type
-uint8TypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.Uint8Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uintWithPrecision :: Phantoms.TTerm (Maybe Grammar.Precision) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.UintWithPrecision
-uintWithPrecision precision notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-uintWithPrecisionNotNull :: Phantoms.TTerm Grammar.UintWithPrecision -> Phantoms.TTerm Bool
-uintWithPrecisionNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uintWithPrecisionPrecision :: Phantoms.TTerm Grammar.UintWithPrecision -> Phantoms.TTerm (Maybe Grammar.Precision)
-uintWithPrecisionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uintWithPrecisionWithNotNull :: Phantoms.TTerm Grammar.UintWithPrecision -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.UintWithPrecision
-uintWithPrecisionWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uintWithPrecisionWithPrecision :: Phantoms.TTerm Grammar.UintWithPrecision -> Phantoms.TTerm (Maybe Grammar.Precision) -> Phantoms.TTerm Grammar.UintWithPrecision
-uintWithPrecisionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.UintWithPrecision"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unsignedBinaryExactNumericTypeUBigInt :: Phantoms.TTerm Grammar.UBigIntType -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUBigInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uBigInt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUSmallInt :: Phantoms.TTerm Grammar.USmallIntType -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUSmallInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uSmallInt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUint128 :: Phantoms.TTerm Grammar.Uint128Type -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUint128 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint128"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUint16 :: Phantoms.TTerm Grammar.Uint16Type -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUint16 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint16"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUint256 :: Phantoms.TTerm Grammar.Uint256Type -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUint256 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint256"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUint32 :: Phantoms.TTerm Grammar.Uint32Type -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUint32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUint64 :: Phantoms.TTerm Grammar.Uint64Type -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUint64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUint8 :: Phantoms.TTerm Grammar.Uint8Type -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUint8 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint8"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUintWithPrecision :: Phantoms.TTerm Grammar.UintWithPrecision -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUintWithPrecision x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uintWithPrecision"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedBinaryExactNumericTypeUnsigned :: Phantoms.TTerm Grammar.VerboseBinaryExactNumericType -> Phantoms.TTerm Grammar.UnsignedBinaryExactNumericType
-unsignedBinaryExactNumericTypeUnsigned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsigned"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedIntegerBinary :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.UnsignedInteger
-unsignedIntegerBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedInteger"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedIntegerDecimal :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.UnsignedInteger
-unsignedIntegerDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedInteger"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedIntegerHexadecimal :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.UnsignedInteger
-unsignedIntegerHexadecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedInteger"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hexadecimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedIntegerOctal :: Phantoms.TTerm String -> Phantoms.TTerm Grammar.UnsignedInteger
-unsignedIntegerOctal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedInteger"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "octal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedLiteralGeneral :: Phantoms.TTerm Grammar.GeneralLiteral -> Phantoms.TTerm Grammar.UnsignedLiteral
-unsignedLiteralGeneral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "general"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedLiteralNumeric :: Phantoms.TTerm Grammar.UnsignedNumericLiteral -> Phantoms.TTerm Grammar.UnsignedLiteral
-unsignedLiteralNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedNumericLiteralApproximate :: Phantoms.TTerm Grammar.ApproximateNumericLiteral -> Phantoms.TTerm Grammar.UnsignedNumericLiteral
-unsignedNumericLiteralApproximate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "approximate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedNumericLiteralExact :: Phantoms.TTerm Grammar.ExactNumericLiteral -> Phantoms.TTerm Grammar.UnsignedNumericLiteral
-unsignedNumericLiteralExact x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exact"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedValueSpecificationGeneralValueSpecification :: Phantoms.TTerm Grammar.GeneralValueSpecification -> Phantoms.TTerm Grammar.UnsignedValueSpecification
-unsignedValueSpecificationGeneralValueSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedValueSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "generalValueSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedValueSpecificationUnsignedLiteral :: Phantoms.TTerm Grammar.UnsignedLiteral -> Phantoms.TTerm Grammar.UnsignedValueSpecification
-unsignedValueSpecificationUnsignedLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.UnsignedValueSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedLiteral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionAddSubtract :: Phantoms.TTerm Grammar.AddSubtractExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionAddSubtract x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addSubtract"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionBindingTable :: Phantoms.TTerm Grammar.BindingTableExpression -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionBindingTable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bindingTable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionComparison :: Phantoms.TTerm Grammar.ComparisonExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionComparison x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "comparison"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionConcatenation :: Phantoms.TTerm Grammar.ConcatenationExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionConcatenation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "concatenation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionConjunctive :: Phantoms.TTerm Grammar.ConjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionConjunctive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conjunctive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionDisjunctive :: Phantoms.TTerm Grammar.DisjunctiveExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionDisjunctive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjunctive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionIsNot :: Phantoms.TTerm Grammar.IsNotExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionIsNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "isNot"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionMultDiv :: Phantoms.TTerm Grammar.MultDivExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionMultDiv x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multDiv"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionNormalizedPredicate :: Phantoms.TTerm Grammar.NormalizedPredicateExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionNormalizedPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normalizedPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionNot :: Phantoms.TTerm Grammar.NotExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionPredicate :: Phantoms.TTerm Grammar.Predicate -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionPrimary :: Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionPropertyGraph :: Phantoms.TTerm Grammar.GraphExpression -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionPropertyGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyGraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionSigned :: Phantoms.TTerm Grammar.SignedExpr -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionSigned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "signed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionValueFunction :: Phantoms.TTerm Grammar.ValueFunction -> Phantoms.TTerm Grammar.ValueExpression
-valueExpressionValueFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFunctionCharacterOrByteString :: Phantoms.TTerm Grammar.CharacterOrByteStringFunction -> Phantoms.TTerm Grammar.ValueFunction
-valueFunctionCharacterOrByteString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "characterOrByteString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFunctionDatetime :: Phantoms.TTerm Grammar.DatetimeValueFunction -> Phantoms.TTerm Grammar.ValueFunction
-valueFunctionDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFunctionDatetimeSubtraction :: Phantoms.TTerm Grammar.DatetimeSubtraction -> Phantoms.TTerm Grammar.ValueFunction
-valueFunctionDatetimeSubtraction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetimeSubtraction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFunctionDuration :: Phantoms.TTerm Grammar.DurationValueFunction -> Phantoms.TTerm Grammar.ValueFunction
-valueFunctionDuration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFunctionList :: Phantoms.TTerm Grammar.ListValueFunction -> Phantoms.TTerm Grammar.ValueFunction
-valueFunctionList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFunctionNumeric :: Phantoms.TTerm Grammar.NumericValueFunction -> Phantoms.TTerm Grammar.ValueFunction
-valueFunctionNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeClosedDynamicUnionTypeAlt1 :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt1 -> Phantoms.TTerm Grammar.ValueType
-valueTypeClosedDynamicUnionTypeAlt1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closedDynamicUnionTypeAlt1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeClosedDynamicUnionTypeAlt2 :: Phantoms.TTerm Grammar.ClosedDynamicUnionTypeAlt2 -> Phantoms.TTerm Grammar.ValueType
-valueTypeClosedDynamicUnionTypeAlt2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closedDynamicUnionTypeAlt2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeDynamicPropertyValueType :: Phantoms.TTerm Grammar.DynamicPropertyValueType -> Phantoms.TTerm Grammar.ValueType
-valueTypeDynamicPropertyValueType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dynamicPropertyValueType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeListValueTypeAlt1 :: Phantoms.TTerm Grammar.ListValueTypeAlt1 -> Phantoms.TTerm Grammar.ValueType
-valueTypeListValueTypeAlt1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listValueTypeAlt1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeListValueTypeAlt2 :: Phantoms.TTerm Grammar.ListValueTypeAlt2 -> Phantoms.TTerm Grammar.ValueType
-valueTypeListValueTypeAlt2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listValueTypeAlt2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeListValueTypeAlt3 :: Phantoms.TTerm Grammar.ListValueTypeAlt3 -> Phantoms.TTerm Grammar.ValueType
-valueTypeListValueTypeAlt3 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listValueTypeAlt3"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypeOpenDynamicUnionType :: Phantoms.TTerm Grammar.OpenDynamicUnionType -> Phantoms.TTerm Grammar.ValueType
-valueTypeOpenDynamicUnionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "openDynamicUnionType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypePathValueType :: Phantoms.TTerm Grammar.PathValueType -> Phantoms.TTerm Grammar.ValueType
-valueTypePathValueType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pathValueType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypePredefinedType :: Phantoms.TTerm Grammar.PredefinedType -> Phantoms.TTerm Grammar.ValueType
-valueTypePredefinedType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predefinedType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueTypePredicate :: Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.ValueTypePredicate
-valueTypePredicate valueExpression valueTypePart =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm valueExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypePart"),
-          Core.fieldTerm = (Phantoms.unTTerm valueTypePart)}]}))
-
-valueTypePredicatePart2 :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.Typed -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.ValueTypePredicatePart2
-valueTypePredicatePart2 not typed valueType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm not)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm typed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm valueType)}]}))
-
-valueTypePredicatePart2Not :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Bool
-valueTypePredicatePart2Not x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-        Core.projectionField = (Core.Name "not")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueTypePredicatePart2Typed :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.Typed
-valueTypePredicatePart2Typed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-        Core.projectionField = (Core.Name "typed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueTypePredicatePart2ValueType :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.ValueType
-valueTypePredicatePart2ValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-        Core.projectionField = (Core.Name "valueType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueTypePredicatePart2WithNot :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ValueTypePredicatePart2
-valueTypePredicatePart2WithNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-valueTypePredicatePart2WithTyped :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.Typed -> Phantoms.TTerm Grammar.ValueTypePredicatePart2
-valueTypePredicatePart2WithTyped original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-              Core.projectionField = (Core.Name "valueType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-valueTypePredicatePart2WithValueType :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.ValueType -> Phantoms.TTerm Grammar.ValueTypePredicatePart2
-valueTypePredicatePart2WithValueType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "not"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-              Core.projectionField = (Core.Name "not")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicatePart2"),
-              Core.projectionField = (Core.Name "typed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valueTypePredicateValueExpression :: Phantoms.TTerm Grammar.ValueTypePredicate -> Phantoms.TTerm Grammar.PrimaryValueExpression
-valueTypePredicateValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-        Core.projectionField = (Core.Name "valueExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueTypePredicateValueTypePart :: Phantoms.TTerm Grammar.ValueTypePredicate -> Phantoms.TTerm Grammar.ValueTypePredicatePart2
-valueTypePredicateValueTypePart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-        Core.projectionField = (Core.Name "valueTypePart")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueTypePredicateWithValueExpression :: Phantoms.TTerm Grammar.ValueTypePredicate -> Phantoms.TTerm Grammar.PrimaryValueExpression -> Phantoms.TTerm Grammar.ValueTypePredicate
-valueTypePredicateWithValueExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypePart"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-              Core.projectionField = (Core.Name "valueTypePart")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-valueTypePredicateWithValueTypePart :: Phantoms.TTerm Grammar.ValueTypePredicate -> Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.ValueTypePredicate
-valueTypePredicateWithValueTypePart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "valueExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueTypePredicate"),
-              Core.projectionField = (Core.Name "valueExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "valueTypePart"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valueTypeRecordType :: Phantoms.TTerm Grammar.RecordType -> Phantoms.TTerm Grammar.ValueType
-valueTypeRecordType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.ValueType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueVariableDefinition :: Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm Grammar.ValueVariableDefinition
-valueVariableDefinition variable initializer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm initializer)}]}))
-
-valueVariableDefinitionInitializer :: Phantoms.TTerm Grammar.ValueVariableDefinition -> Phantoms.TTerm Grammar.OptTypedValueInitializer
-valueVariableDefinitionInitializer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-        Core.projectionField = (Core.Name "initializer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueVariableDefinitionVariable :: Phantoms.TTerm Grammar.ValueVariableDefinition -> Phantoms.TTerm Grammar.BindingVariable
-valueVariableDefinitionVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueVariableDefinitionWithInitializer :: Phantoms.TTerm Grammar.ValueVariableDefinition -> Phantoms.TTerm Grammar.OptTypedValueInitializer -> Phantoms.TTerm Grammar.ValueVariableDefinition
-valueVariableDefinitionWithInitializer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valueVariableDefinitionWithVariable :: Phantoms.TTerm Grammar.ValueVariableDefinition -> Phantoms.TTerm Grammar.BindingVariable -> Phantoms.TTerm Grammar.ValueVariableDefinition
-valueVariableDefinitionWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "initializer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.ValueVariableDefinition"),
-              Core.projectionField = (Core.Name "initializer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-varbinaryType :: Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.VarbinaryType
-varbinaryType maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-varbinaryTypeMaxLength :: Phantoms.TTerm Grammar.VarbinaryType -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-varbinaryTypeMaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varbinaryTypeNotNull :: Phantoms.TTerm Grammar.VarbinaryType -> Phantoms.TTerm Bool
-varbinaryTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varbinaryTypeWithMaxLength :: Phantoms.TTerm Grammar.VarbinaryType -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.VarbinaryType
-varbinaryTypeWithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-varbinaryTypeWithNotNull :: Phantoms.TTerm Grammar.VarbinaryType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.VarbinaryType
-varbinaryTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.VarbinaryType"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-varcharType :: Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.VarcharType
-varcharType maxLength notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.VarcharType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm maxLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-varcharTypeMaxLength :: Phantoms.TTerm Grammar.VarcharType -> Phantoms.TTerm (Maybe Grammar.MaxLength)
-varcharTypeMaxLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.VarcharType"),
-        Core.projectionField = (Core.Name "maxLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varcharTypeNotNull :: Phantoms.TTerm Grammar.VarcharType -> Phantoms.TTerm Bool
-varcharTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.VarcharType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-varcharTypeWithMaxLength :: Phantoms.TTerm Grammar.VarcharType -> Phantoms.TTerm (Maybe Grammar.MaxLength) -> Phantoms.TTerm Grammar.VarcharType
-varcharTypeWithMaxLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.VarcharType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.VarcharType"),
-              Core.projectionField = (Core.Name "notNull")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-varcharTypeWithNotNull :: Phantoms.TTerm Grammar.VarcharType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.VarcharType
-varcharTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.VarcharType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "maxLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.VarcharType"),
-              Core.projectionField = (Core.Name "maxLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-verboseBinaryExactNumericTypeBigInteger :: Phantoms.TTerm Grammar.BigIntegerType -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeBigInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigInteger"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeInteger128 :: Phantoms.TTerm Grammar.Integer128Type -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeInteger128 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer128"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeInteger16 :: Phantoms.TTerm Grammar.Integer16Type -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeInteger16 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer16"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeInteger256 :: Phantoms.TTerm Grammar.Integer256Type -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeInteger256 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer256"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeInteger32 :: Phantoms.TTerm Grammar.Integer32Type -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeInteger32 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer32"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeInteger64 :: Phantoms.TTerm Grammar.Integer64Type -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeInteger64 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer64"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeInteger8 :: Phantoms.TTerm Grammar.Integer8Type -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeInteger8 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer8"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeIntegerWithPrecision :: Phantoms.TTerm Grammar.IntegerWithPrecision -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeIntegerWithPrecision x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integerWithPrecision"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-verboseBinaryExactNumericTypeSmallInteger :: Phantoms.TTerm Grammar.SmallIntegerType -> Phantoms.TTerm Grammar.VerboseBinaryExactNumericType
-verboseBinaryExactNumericTypeSmallInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.VerboseBinaryExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "smallInteger"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandComparison :: Phantoms.TTerm Grammar.ComparisonPredicatePart2 -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandComparison x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "comparison"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandDestinationPredicate :: Phantoms.TTerm Grammar.DestinationPredicate -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandDestinationPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "destinationPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandDirectedPredicate :: Phantoms.TTerm Grammar.DirectedPredicatePart2 -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandDirectedPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "directedPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandLabeledPredicate :: Phantoms.TTerm Grammar.LabeledPredicatePart2 -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandLabeledPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labeledPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandNormalizedPredicate :: Phantoms.TTerm Grammar.NormalizedPredicatePart2 -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandNormalizedPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normalizedPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandNullPredicate :: Phantoms.TTerm Grammar.NullPredicatePart2 -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandNullPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nullPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandSourcePredicate :: Phantoms.TTerm Grammar.SourcePredicate -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandSourcePredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sourcePredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandValueExpression :: Phantoms.TTerm Grammar.NonParenthesizedPrimaryValueExpression -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandValueExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whenOperandValueTypePredicate :: Phantoms.TTerm Grammar.ValueTypePredicatePart2 -> Phantoms.TTerm Grammar.WhenOperand
-whenOperandValueTypePredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "openGql.grammar.WhenOperand"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueTypePredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-yieldItem :: Phantoms.TTerm Grammar.YieldItemName -> Phantoms.TTerm (Maybe Grammar.YieldItemAlias) -> Phantoms.TTerm Grammar.YieldItem
-yieldItem name alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.YieldItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-yieldItemAlias :: Phantoms.TTerm Grammar.YieldItem -> Phantoms.TTerm (Maybe Grammar.YieldItemAlias)
-yieldItemAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.YieldItem"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-yieldItemName :: Phantoms.TTerm Grammar.YieldItem -> Phantoms.TTerm Grammar.YieldItemName
-yieldItemName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.YieldItem"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-yieldItemWithAlias :: Phantoms.TTerm Grammar.YieldItem -> Phantoms.TTerm (Maybe Grammar.YieldItemAlias) -> Phantoms.TTerm Grammar.YieldItem
-yieldItemWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.YieldItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.YieldItem"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-yieldItemWithName :: Phantoms.TTerm Grammar.YieldItem -> Phantoms.TTerm Grammar.YieldItemName -> Phantoms.TTerm Grammar.YieldItem
-yieldItemWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.YieldItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "openGql.grammar.YieldItem"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-zonedDatetimeType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ZonedDatetimeType
-zonedDatetimeType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ZonedDatetimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-zonedDatetimeTypeNotNull :: Phantoms.TTerm Grammar.ZonedDatetimeType -> Phantoms.TTerm Bool
-zonedDatetimeTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ZonedDatetimeType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-zonedDatetimeTypeWithNotNull :: Phantoms.TTerm Grammar.ZonedDatetimeType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ZonedDatetimeType
-zonedDatetimeTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ZonedDatetimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-zonedTimeType :: Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ZonedTimeType
-zonedTimeType notNull =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ZonedTimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm notNull)}]}))
-
-zonedTimeTypeNotNull :: Phantoms.TTerm Grammar.ZonedTimeType -> Phantoms.TTerm Bool
-zonedTimeTypeNotNull x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "openGql.grammar.ZonedTimeType"),
-        Core.projectionField = (Core.Name "notNull")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-zonedTimeTypeWithNotNull :: Phantoms.TTerm Grammar.ZonedTimeType -> Phantoms.TTerm Bool -> Phantoms.TTerm Grammar.ZonedTimeType
-zonedTimeTypeWithNotNull original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "openGql.grammar.ZonedTimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "notNull"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Osv/Schema.hs b/src/main/haskell/Hydra/Dsl/Osv/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Osv/Schema.hs
+++ /dev/null
@@ -1,2061 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.osv.schema
-
-module Hydra.Dsl.Osv.Schema where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Osv.Schema as Schema
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-credited :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe [Schema.Url]) -> Phantoms.TTerm Schema.Credited
-credited name contact =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Credited"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "contact"),
-          Core.fieldTerm = (Phantoms.unTTerm contact)}]}))
-
-creditedContact :: Phantoms.TTerm Schema.Credited -> Phantoms.TTerm (Maybe [Schema.Url])
-creditedContact x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Credited"),
-        Core.projectionField = (Core.Name "contact")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-creditedName :: Phantoms.TTerm Schema.Credited -> Phantoms.TTerm String
-creditedName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Credited"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-creditedWithContact :: Phantoms.TTerm Schema.Credited -> Phantoms.TTerm (Maybe [Schema.Url]) -> Phantoms.TTerm Schema.Credited
-creditedWithContact original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Credited"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Credited"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "contact"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-creditedWithName :: Phantoms.TTerm Schema.Credited -> Phantoms.TTerm String -> Phantoms.TTerm Schema.Credited
-creditedWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Credited"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "contact"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Credited"),
-              Core.projectionField = (Core.Name "contact")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ecosystem :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Ecosystem
-ecosystem x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.Ecosystem"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-entry :: Phantoms.TTerm (Maybe Schema.OsvVersion) -> Phantoms.TTerm Schema.Id -> Phantoms.TTerm Schema.Timestamp -> Phantoms.TTerm (Maybe Schema.Timestamp) -> Phantoms.TTerm (Maybe Schema.Timestamp) -> Phantoms.TTerm (Maybe [Schema.Id]) -> Phantoms.TTerm (Maybe [Schema.Id]) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Schema.Markdown) -> Phantoms.TTerm (Maybe [Schema.Severity]) -> Phantoms.TTerm (Maybe [Schema.PackageVersions]) -> Phantoms.TTerm (Maybe [Schema.Reference]) -> Phantoms.TTerm (Maybe [Schema.Credited]) -> Phantoms.TTerm Schema.Entry
-entry schemaVersion id modified published withdrawn aliases related summary details severity affected references credits =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Phantoms.unTTerm schemaVersion)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Phantoms.unTTerm modified)},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Phantoms.unTTerm published)},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Phantoms.unTTerm withdrawn)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm aliases)},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Phantoms.unTTerm related)},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Phantoms.unTTerm summary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Phantoms.unTTerm details)},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Phantoms.unTTerm severity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Phantoms.unTTerm affected)},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Phantoms.unTTerm references)},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Phantoms.unTTerm credits)}]}))
-
-entryAffected :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.PackageVersions])
-entryAffected x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "affected")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryAliases :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Id])
-entryAliases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "aliases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryCredits :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Credited])
-entryCredits x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "credits")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryDetails :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.Markdown)
-entryDetails x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "details")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryId :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm Schema.Id
-entryId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryModified :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm Schema.Timestamp
-entryModified x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "modified")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryPublished :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.Timestamp)
-entryPublished x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "published")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryReferences :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Reference])
-entryReferences x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "references")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryRelated :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Id])
-entryRelated x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "related")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entrySchemaVersion :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.OsvVersion)
-entrySchemaVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "schemaVersion")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entrySeverity :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Severity])
-entrySeverity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "severity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entrySummary :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe String)
-entrySummary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "summary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-entryWithAffected :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.PackageVersions]) -> Phantoms.TTerm Schema.Entry
-entryWithAffected original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithAliases :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Id]) -> Phantoms.TTerm Schema.Entry
-entryWithAliases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithCredits :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Credited]) -> Phantoms.TTerm Schema.Entry
-entryWithCredits original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-entryWithDetails :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.Markdown) -> Phantoms.TTerm Schema.Entry
-entryWithDetails original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithId :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm Schema.Id -> Phantoms.TTerm Schema.Entry
-entryWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithModified :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm Schema.Timestamp -> Phantoms.TTerm Schema.Entry
-entryWithModified original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithPublished :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.Timestamp) -> Phantoms.TTerm Schema.Entry
-entryWithPublished original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithReferences :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Reference]) -> Phantoms.TTerm Schema.Entry
-entryWithReferences original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithRelated :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Id]) -> Phantoms.TTerm Schema.Entry
-entryWithRelated original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithSchemaVersion :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.OsvVersion) -> Phantoms.TTerm Schema.Entry
-entryWithSchemaVersion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithSeverity :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe [Schema.Severity]) -> Phantoms.TTerm Schema.Entry
-entryWithSeverity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithSummary :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Schema.Entry
-entryWithSummary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "withdrawn")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithWithdrawn :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.Timestamp) -> Phantoms.TTerm Schema.Entry
-entryWithWithdrawn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Entry"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "schemaVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modified"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "modified")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "published"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "published")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "withdrawn"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aliases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "aliases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "related"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "related")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "summary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "summary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "details"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "details")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "affected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "affected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "references"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "references")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "credits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-              Core.projectionField = (Core.Name "credits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-entryWithdrawn :: Phantoms.TTerm Schema.Entry -> Phantoms.TTerm (Maybe Schema.Timestamp)
-entryWithdrawn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Entry"),
-        Core.projectionField = (Core.Name "withdrawn")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-eventFixed :: Phantoms.TTerm Schema.Version -> Phantoms.TTerm Schema.Event
-eventFixed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.osv.schema.Event"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventIntroduced :: Phantoms.TTerm Schema.VersionOrZero -> Phantoms.TTerm Schema.Event
-eventIntroduced x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.osv.schema.Event"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "introduced"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventLastAffected :: Phantoms.TTerm Schema.Version -> Phantoms.TTerm Schema.Event
-eventLastAffected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.osv.schema.Event"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lastAffected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eventLimit :: Phantoms.TTerm Schema.VersionOrStar -> Phantoms.TTerm Schema.Event
-eventLimit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.osv.schema.Event"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-id :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Id
-id x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.Id"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-markdown :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Markdown
-markdown x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.Markdown"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-osvVersion :: Phantoms.TTerm String -> Phantoms.TTerm Schema.OsvVersion
-osvVersion x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.OsvVersion"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-package :: Phantoms.TTerm Schema.Ecosystem -> Phantoms.TTerm String -> Phantoms.TTerm (Maybe Schema.Url) -> Phantoms.TTerm Schema.Package
-package ecosystem name purl =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ecosystem"),
-          Core.fieldTerm = (Phantoms.unTTerm ecosystem)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "purl"),
-          Core.fieldTerm = (Phantoms.unTTerm purl)}]}))
-
-packageEcosystem :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm Schema.Ecosystem
-packageEcosystem x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-        Core.projectionField = (Core.Name "ecosystem")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageName :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm String
-packageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packagePurl :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm (Maybe Schema.Url)
-packagePurl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-        Core.projectionField = (Core.Name "purl")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageVersions :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm (Maybe [Schema.VersionRange]) -> Phantoms.TTerm (Maybe [Schema.Version]) -> Phantoms.TTerm Schema.PackageVersions
-packageVersions package ranges versions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ranges"),
-          Core.fieldTerm = (Phantoms.unTTerm ranges)},
-        Core.Field {
-          Core.fieldName = (Core.Name "versions"),
-          Core.fieldTerm = (Phantoms.unTTerm versions)}]}))
-
-packageVersionsPackage :: Phantoms.TTerm Schema.PackageVersions -> Phantoms.TTerm Schema.Package
-packageVersionsPackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageVersionsRanges :: Phantoms.TTerm Schema.PackageVersions -> Phantoms.TTerm (Maybe [Schema.VersionRange])
-packageVersionsRanges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-        Core.projectionField = (Core.Name "ranges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageVersionsVersions :: Phantoms.TTerm Schema.PackageVersions -> Phantoms.TTerm (Maybe [Schema.Version])
-packageVersionsVersions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-        Core.projectionField = (Core.Name "versions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-packageVersionsWithPackage :: Phantoms.TTerm Schema.PackageVersions -> Phantoms.TTerm Schema.Package -> Phantoms.TTerm Schema.PackageVersions
-packageVersionsWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ranges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-              Core.projectionField = (Core.Name "ranges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "versions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-              Core.projectionField = (Core.Name "versions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-packageVersionsWithRanges :: Phantoms.TTerm Schema.PackageVersions -> Phantoms.TTerm (Maybe [Schema.VersionRange]) -> Phantoms.TTerm Schema.PackageVersions
-packageVersionsWithRanges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ranges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "versions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-              Core.projectionField = (Core.Name "versions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-packageVersionsWithVersions :: Phantoms.TTerm Schema.PackageVersions -> Phantoms.TTerm (Maybe [Schema.Version]) -> Phantoms.TTerm Schema.PackageVersions
-packageVersionsWithVersions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ranges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.PackageVersions"),
-              Core.projectionField = (Core.Name "ranges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "versions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-packageWithEcosystem :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm Schema.Ecosystem -> Phantoms.TTerm Schema.Package
-packageWithEcosystem original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ecosystem"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "purl"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-              Core.projectionField = (Core.Name "purl")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-packageWithName :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm String -> Phantoms.TTerm Schema.Package
-packageWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ecosystem"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-              Core.projectionField = (Core.Name "ecosystem")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "purl"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-              Core.projectionField = (Core.Name "purl")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-packageWithPurl :: Phantoms.TTerm Schema.Package -> Phantoms.TTerm (Maybe Schema.Url) -> Phantoms.TTerm Schema.Package
-packageWithPurl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ecosystem"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-              Core.projectionField = (Core.Name "ecosystem")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Package"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "purl"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-reference :: Phantoms.TTerm Schema.ReferenceType -> Phantoms.TTerm Schema.Url -> Phantoms.TTerm Schema.Reference
-reference type_ url =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Reference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "url"),
-          Core.fieldTerm = (Phantoms.unTTerm url)}]}))
-
-referenceType :: Phantoms.TTerm Schema.Reference -> Phantoms.TTerm Schema.ReferenceType
-referenceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Reference"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-referenceType_ :: Phantoms.TTerm String -> Phantoms.TTerm Schema.ReferenceType
-referenceType_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.ReferenceType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-referenceUrl :: Phantoms.TTerm Schema.Reference -> Phantoms.TTerm Schema.Url
-referenceUrl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Reference"),
-        Core.projectionField = (Core.Name "url")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-referenceWithType :: Phantoms.TTerm Schema.Reference -> Phantoms.TTerm Schema.ReferenceType -> Phantoms.TTerm Schema.Reference
-referenceWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Reference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "url"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Reference"),
-              Core.projectionField = (Core.Name "url")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-referenceWithUrl :: Phantoms.TTerm Schema.Reference -> Phantoms.TTerm Schema.Url -> Phantoms.TTerm Schema.Reference
-referenceWithUrl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Reference"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Reference"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "url"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-severity :: Phantoms.TTerm Schema.SeverityType -> Phantoms.TTerm Schema.SeverityScore -> Phantoms.TTerm Schema.Severity
-severity type_ score =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Severity"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "score"),
-          Core.fieldTerm = (Phantoms.unTTerm score)}]}))
-
-severityScore :: Phantoms.TTerm Schema.Severity -> Phantoms.TTerm Schema.SeverityScore
-severityScore x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Severity"),
-        Core.projectionField = (Core.Name "score")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-severityScore_ :: Phantoms.TTerm String -> Phantoms.TTerm Schema.SeverityScore
-severityScore_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.SeverityScore"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-severityType :: Phantoms.TTerm Schema.Severity -> Phantoms.TTerm Schema.SeverityType
-severityType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.Severity"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-severityType_ :: Phantoms.TTerm String -> Phantoms.TTerm Schema.SeverityType
-severityType_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.SeverityType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-severityWithScore :: Phantoms.TTerm Schema.Severity -> Phantoms.TTerm Schema.SeverityScore -> Phantoms.TTerm Schema.Severity
-severityWithScore original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Severity"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Severity"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "score"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-severityWithType :: Phantoms.TTerm Schema.Severity -> Phantoms.TTerm Schema.SeverityType -> Phantoms.TTerm Schema.Severity
-severityWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.Severity"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "score"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.Severity"),
-              Core.projectionField = (Core.Name "score")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-timestamp :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Timestamp
-timestamp x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.Timestamp"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unEcosystem :: Phantoms.TTerm Schema.Ecosystem -> Phantoms.TTerm String
-unEcosystem x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.Ecosystem")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unId :: Phantoms.TTerm Schema.Id -> Phantoms.TTerm String
-unId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.Id")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMarkdown :: Phantoms.TTerm Schema.Markdown -> Phantoms.TTerm String
-unMarkdown x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.Markdown")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unOsvVersion :: Phantoms.TTerm Schema.OsvVersion -> Phantoms.TTerm String
-unOsvVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.OsvVersion")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReferenceType :: Phantoms.TTerm Schema.ReferenceType -> Phantoms.TTerm String
-unReferenceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.ReferenceType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSeverityScore :: Phantoms.TTerm Schema.SeverityScore -> Phantoms.TTerm String
-unSeverityScore x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.SeverityScore")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSeverityType :: Phantoms.TTerm Schema.SeverityType -> Phantoms.TTerm String
-unSeverityType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.SeverityType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTimestamp :: Phantoms.TTerm Schema.Timestamp -> Phantoms.TTerm String
-unTimestamp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.Timestamp")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUrl :: Phantoms.TTerm Schema.Url -> Phantoms.TTerm String
-unUrl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.Url")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVersion :: Phantoms.TTerm Schema.Version -> Phantoms.TTerm String
-unVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.Version")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVersionOrStar :: Phantoms.TTerm Schema.VersionOrStar -> Phantoms.TTerm String
-unVersionOrStar x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.VersionOrStar")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVersionOrZero :: Phantoms.TTerm Schema.VersionOrZero -> Phantoms.TTerm String
-unVersionOrZero x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.VersionOrZero")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVersionType :: Phantoms.TTerm Schema.VersionType -> Phantoms.TTerm String
-unVersionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.osv.schema.VersionType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-url :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Url
-url x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.Url"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-version :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Version
-version x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.Version"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-versionOrStar :: Phantoms.TTerm String -> Phantoms.TTerm Schema.VersionOrStar
-versionOrStar x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.VersionOrStar"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-versionOrZero :: Phantoms.TTerm String -> Phantoms.TTerm Schema.VersionOrZero
-versionOrZero x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.VersionOrZero"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-versionRange :: Phantoms.TTerm Schema.VersionType -> Phantoms.TTerm (Maybe Schema.Url) -> Phantoms.TTerm [Schema.Event] -> Phantoms.TTerm Schema.VersionRange
-versionRange type_ repo events =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repo"),
-          Core.fieldTerm = (Phantoms.unTTerm repo)},
-        Core.Field {
-          Core.fieldName = (Core.Name "events"),
-          Core.fieldTerm = (Phantoms.unTTerm events)}]}))
-
-versionRangeEvents :: Phantoms.TTerm Schema.VersionRange -> Phantoms.TTerm [Schema.Event]
-versionRangeEvents x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-        Core.projectionField = (Core.Name "events")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-versionRangeRepo :: Phantoms.TTerm Schema.VersionRange -> Phantoms.TTerm (Maybe Schema.Url)
-versionRangeRepo x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-        Core.projectionField = (Core.Name "repo")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-versionRangeType :: Phantoms.TTerm Schema.VersionRange -> Phantoms.TTerm Schema.VersionType
-versionRangeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-versionRangeWithEvents :: Phantoms.TTerm Schema.VersionRange -> Phantoms.TTerm [Schema.Event] -> Phantoms.TTerm Schema.VersionRange
-versionRangeWithEvents original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repo"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-              Core.projectionField = (Core.Name "repo")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "events"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-versionRangeWithRepo :: Phantoms.TTerm Schema.VersionRange -> Phantoms.TTerm (Maybe Schema.Url) -> Phantoms.TTerm Schema.VersionRange
-versionRangeWithRepo original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repo"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "events"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-              Core.projectionField = (Core.Name "events")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-versionRangeWithType :: Phantoms.TTerm Schema.VersionRange -> Phantoms.TTerm Schema.VersionType -> Phantoms.TTerm Schema.VersionRange
-versionRangeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repo"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-              Core.projectionField = (Core.Name "repo")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "events"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.osv.schema.VersionRange"),
-              Core.projectionField = (Core.Name "events")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-versionType :: Phantoms.TTerm String -> Phantoms.TTerm Schema.VersionType
-versionType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.osv.schema.VersionType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Owl/Syntax.hs b/src/main/haskell/Hydra/Dsl/Owl/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Owl/Syntax.hs
+++ /dev/null
@@ -1,5785 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.owl.syntax
-
-module Hydra.Dsl.Owl.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Owl.Syntax as OwlSyntax
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Rdf.Syntax as RdfSyntax
-import qualified Hydra.Xml.Schema as Schema
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-annotation :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.AnnotationValue -> Phantoms.TTerm OwlSyntax.Annotation
-annotation annotations property value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-annotationAnnotations :: Phantoms.TTerm OwlSyntax.Annotation -> Phantoms.TTerm [OwlSyntax.Annotation]
-annotationAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationAssertion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.AnnotationSubject -> Phantoms.TTerm OwlSyntax.AnnotationValue -> Phantoms.TTerm OwlSyntax.AnnotationAssertion
-annotationAssertion annotations property subject value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm subject)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-annotationAssertionAnnotations :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm [OwlSyntax.Annotation]
-annotationAssertionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationAssertionProperty :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-annotationAssertionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationAssertionSubject :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationSubject
-annotationAssertionSubject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-        Core.projectionField = (Core.Name "subject")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationAssertionValue :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationValue
-annotationAssertionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationAssertionWithAnnotations :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationAssertion
-annotationAssertionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationAssertionWithProperty :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.AnnotationAssertion
-annotationAssertionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationAssertionWithSubject :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationSubject -> Phantoms.TTerm OwlSyntax.AnnotationAssertion
-annotationAssertionWithSubject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationAssertionWithValue :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationValue -> Phantoms.TTerm OwlSyntax.AnnotationAssertion
-annotationAssertionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAssertion"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationAxiomAnnotationAssertion :: Phantoms.TTerm OwlSyntax.AnnotationAssertion -> Phantoms.TTerm OwlSyntax.AnnotationAxiom
-annotationAxiomAnnotationAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationAxiomAnnotationPropertyDomain :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm OwlSyntax.AnnotationAxiom
-annotationAxiomAnnotationPropertyDomain x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationPropertyDomain"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationAxiomAnnotationPropertyRange :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm OwlSyntax.AnnotationAxiom
-annotationAxiomAnnotationPropertyRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationPropertyRange"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationAxiomSubAnnotationPropertyOf :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm OwlSyntax.AnnotationAxiom
-annotationAxiomSubAnnotationPropertyOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subAnnotationPropertyOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationProperty :: Phantoms.TTerm OwlSyntax.Annotation -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-annotationProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyDomain :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain
-annotationPropertyDomain annotations property iri =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Phantoms.unTTerm iri)}]}))
-
-annotationPropertyDomainAnnotations :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm [OwlSyntax.Annotation]
-annotationPropertyDomainAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyDomainIri :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm RdfSyntax.Iri
-annotationPropertyDomainIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-        Core.projectionField = (Core.Name "iri")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyDomainProperty :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-annotationPropertyDomainProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyDomainWithAnnotations :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain
-annotationPropertyDomainWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-              Core.projectionField = (Core.Name "iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationPropertyDomainWithIri :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain
-annotationPropertyDomainWithIri original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationPropertyDomainWithProperty :: Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.AnnotationPropertyDomain
-annotationPropertyDomainWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"),
-              Core.projectionField = (Core.Name "iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationPropertyRange :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.AnnotationPropertyRange
-annotationPropertyRange annotations property iri =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Phantoms.unTTerm iri)}]}))
-
-annotationPropertyRangeAnnotations :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm [OwlSyntax.Annotation]
-annotationPropertyRangeAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyRangeIri :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm RdfSyntax.Iri
-annotationPropertyRangeIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-        Core.projectionField = (Core.Name "iri")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyRangeProperty :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-annotationPropertyRangeProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPropertyRangeWithAnnotations :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationPropertyRange
-annotationPropertyRangeWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-              Core.projectionField = (Core.Name "iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationPropertyRangeWithIri :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.AnnotationPropertyRange
-annotationPropertyRangeWithIri original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationPropertyRangeWithProperty :: Phantoms.TTerm OwlSyntax.AnnotationPropertyRange -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.AnnotationPropertyRange
-annotationPropertyRangeWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationPropertyRange"),
-              Core.projectionField = (Core.Name "iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationProperty_ :: Phantoms.TTerm () -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-annotationProperty_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.AnnotationProperty"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-annotationSubjectAnonymousIndividual :: Phantoms.TTerm OwlSyntax.AnonymousIndividual -> Phantoms.TTerm OwlSyntax.AnnotationSubject
-annotationSubjectAnonymousIndividual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationSubject"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymousIndividual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationSubjectIri :: Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.AnnotationSubject
-annotationSubjectIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationSubject"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationValue :: Phantoms.TTerm OwlSyntax.Annotation -> Phantoms.TTerm OwlSyntax.AnnotationValue
-annotationValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationValueAnonymousIndividual :: Phantoms.TTerm OwlSyntax.AnonymousIndividual -> Phantoms.TTerm OwlSyntax.AnnotationValue
-annotationValueAnonymousIndividual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymousIndividual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationValueIri :: Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.AnnotationValue
-annotationValueIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationValueLiteral :: Phantoms.TTerm RdfSyntax.Literal -> Phantoms.TTerm OwlSyntax.AnnotationValue
-annotationValueLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.AnnotationValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotationWithAnnotations :: Phantoms.TTerm OwlSyntax.Annotation -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.Annotation
-annotationWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.owl.syntax.Annotation"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationWithProperty :: Phantoms.TTerm OwlSyntax.Annotation -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.Annotation
-annotationWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.Annotation"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationWithValue :: Phantoms.TTerm OwlSyntax.Annotation -> Phantoms.TTerm OwlSyntax.AnnotationValue -> Phantoms.TTerm OwlSyntax.Annotation
-annotationWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Annotation"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-anonymousIndividual :: Phantoms.TTerm () -> Phantoms.TTerm OwlSyntax.AnonymousIndividual
-anonymousIndividual x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.AnonymousIndividual"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-assertionClassAssertion :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm OwlSyntax.Assertion
-assertionClassAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertionDataPropertyAssertion :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Assertion
-assertionDataPropertyAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataPropertyAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertionDifferentIndividuals :: Phantoms.TTerm OwlSyntax.DifferentIndividuals -> Phantoms.TTerm OwlSyntax.Assertion
-assertionDifferentIndividuals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "differentIndividuals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertionNegativeDataPropertyAssertion :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Assertion
-assertionNegativeDataPropertyAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negativeDataPropertyAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertionNegativeObjectPropertyAssertion :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Assertion
-assertionNegativeObjectPropertyAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negativeObjectPropertyAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertionObjectPropertyAssertion :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Assertion
-assertionObjectPropertyAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectPropertyAssertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assertionSameIndividual :: Phantoms.TTerm OwlSyntax.SameIndividual -> Phantoms.TTerm OwlSyntax.Assertion
-assertionSameIndividual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Assertion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sameIndividual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-asymmetricObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty
-asymmetricObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-asymmetricObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-asymmetricObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-asymmetricObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-asymmetricObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-asymmetricObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty
-asymmetricObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-asymmetricObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty
-asymmetricObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-axiomAnnotationAxiom :: Phantoms.TTerm OwlSyntax.AnnotationAxiom -> Phantoms.TTerm OwlSyntax.Axiom
-axiomAnnotationAxiom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationAxiom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomAssertion :: Phantoms.TTerm OwlSyntax.Assertion -> Phantoms.TTerm OwlSyntax.Axiom
-axiomAssertion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assertion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomClassAxiom :: Phantoms.TTerm OwlSyntax.ClassAxiom -> Phantoms.TTerm OwlSyntax.Axiom
-axiomClassAxiom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classAxiom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomDataPropertyAxiom :: Phantoms.TTerm OwlSyntax.DataPropertyAxiom -> Phantoms.TTerm OwlSyntax.Axiom
-axiomDataPropertyAxiom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataPropertyAxiom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomDatatypeDefinition :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm OwlSyntax.Axiom
-axiomDatatypeDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datatypeDefinition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomDeclaration :: Phantoms.TTerm OwlSyntax.Declaration -> Phantoms.TTerm OwlSyntax.Axiom
-axiomDeclaration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "declaration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomHasKey :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm OwlSyntax.Axiom
-axiomHasKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasKey"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-axiomObjectPropertyAxiom :: Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom -> Phantoms.TTerm OwlSyntax.Axiom
-axiomObjectPropertyAxiom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Axiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectPropertyAxiom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-class_ :: Phantoms.TTerm () -> Phantoms.TTerm OwlSyntax.Class
-class_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.Class"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-classAssertion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ClassAssertion
-classAssertion annotations class_ individual =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Phantoms.unTTerm individual)}]}))
-
-classAssertionAnnotations :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm [OwlSyntax.Annotation]
-classAssertionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classAssertionClass :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm OwlSyntax.ClassExpression
-classAssertionClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classAssertionIndividual :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm OwlSyntax.Individual
-classAssertionIndividual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-        Core.projectionField = (Core.Name "individual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classAssertionWithAnnotations :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ClassAssertion
-classAssertionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "individual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classAssertionWithClass :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ClassAssertion
-classAssertionWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "individual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classAssertionWithIndividual :: Phantoms.TTerm OwlSyntax.ClassAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ClassAssertion
-classAssertionWithIndividual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ClassAssertion"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classAxiomDisjointClasses :: Phantoms.TTerm OwlSyntax.DisjointClasses -> Phantoms.TTerm OwlSyntax.ClassAxiom
-classAxiomDisjointClasses x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjointClasses"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classAxiomDisjointUnion :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm OwlSyntax.ClassAxiom
-classAxiomDisjointUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjointUnion"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classAxiomEquivalentClasses :: Phantoms.TTerm OwlSyntax.EquivalentClasses -> Phantoms.TTerm OwlSyntax.ClassAxiom
-classAxiomEquivalentClasses x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equivalentClasses"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classAxiomSubClassOf :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm OwlSyntax.ClassAxiom
-classAxiomSubClassOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subClassOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionClass :: Phantoms.TTerm OwlSyntax.Class -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionDataAllValuesFrom :: Phantoms.TTerm OwlSyntax.DataAllValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionDataAllValuesFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataAllValuesFrom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionDataExactCardinality :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionDataExactCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataExactCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionDataHasValue :: Phantoms.TTerm OwlSyntax.DataHasValue -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionDataHasValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataHasValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionDataMaxCardinality :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionDataMaxCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataMaxCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionDataMinCardinality :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionDataMinCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataMinCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionDataSomeValuesFrom :: Phantoms.TTerm OwlSyntax.DataSomeValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionDataSomeValuesFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataSomeValuesFrom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectAllValuesFrom :: Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectAllValuesFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectAllValuesFrom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectExactCardinality :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectExactCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectExactCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectHasSelf :: Phantoms.TTerm OwlSyntax.ObjectHasSelf -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectHasSelf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectHasSelf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectHasValue :: Phantoms.TTerm OwlSyntax.ObjectHasValue -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectHasValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectHasValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectIntersectionOf :: Phantoms.TTerm OwlSyntax.ObjectIntersectionOf -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectIntersectionOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectIntersectionOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectMaxCardinality :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectMaxCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectMaxCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectMinCardinality :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectMinCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectMinCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectOneOf :: Phantoms.TTerm OwlSyntax.ObjectOneOf -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectOneOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectOneOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectSomeValuesFrom :: Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectSomeValuesFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectSomeValuesFrom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-classExpressionObjectUnionOf :: Phantoms.TTerm OwlSyntax.ObjectUnionOf -> Phantoms.TTerm OwlSyntax.ClassExpression
-classExpressionObjectUnionOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ClassExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectUnionOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataAllValuesFrom :: Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DataAllValuesFrom
-dataAllValuesFrom property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-dataAllValuesFromProperty :: Phantoms.TTerm OwlSyntax.DataAllValuesFrom -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression]
-dataAllValuesFromProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataAllValuesFromRange :: Phantoms.TTerm OwlSyntax.DataAllValuesFrom -> Phantoms.TTerm OwlSyntax.DataRange
-dataAllValuesFromRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataAllValuesFromWithProperty :: Phantoms.TTerm OwlSyntax.DataAllValuesFrom -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.DataAllValuesFrom
-dataAllValuesFromWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataAllValuesFromWithRange :: Phantoms.TTerm OwlSyntax.DataAllValuesFrom -> Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DataAllValuesFrom
-dataAllValuesFromWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataAllValuesFrom"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataComplementOf :: Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DataComplementOf
-dataComplementOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.DataComplementOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataExactCardinality :: Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataExactCardinality
-dataExactCardinality bound property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-dataExactCardinalityBound :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm Integer
-dataExactCardinalityBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataExactCardinalityProperty :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataExactCardinalityProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataExactCardinalityRange :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm [OwlSyntax.DataRange]
-dataExactCardinalityRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataExactCardinalityWithBound :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.DataExactCardinality
-dataExactCardinalityWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataExactCardinalityWithProperty :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataExactCardinality
-dataExactCardinalityWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataExactCardinalityWithRange :: Phantoms.TTerm OwlSyntax.DataExactCardinality -> Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataExactCardinality
-dataExactCardinalityWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataExactCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataHasValue :: Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm RdfSyntax.Literal -> Phantoms.TTerm OwlSyntax.DataHasValue
-dataHasValue property value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataHasValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-dataHasValueProperty :: Phantoms.TTerm OwlSyntax.DataHasValue -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataHasValueProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataHasValue"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataHasValueValue :: Phantoms.TTerm OwlSyntax.DataHasValue -> Phantoms.TTerm RdfSyntax.Literal
-dataHasValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataHasValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataHasValueWithProperty :: Phantoms.TTerm OwlSyntax.DataHasValue -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataHasValue
-dataHasValueWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataHasValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.DataHasValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataHasValueWithValue :: Phantoms.TTerm OwlSyntax.DataHasValue -> Phantoms.TTerm RdfSyntax.Literal -> Phantoms.TTerm OwlSyntax.DataHasValue
-dataHasValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataHasValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataHasValue"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataIntersectionOf :: Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataIntersectionOf
-dataIntersectionOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.DataIntersectionOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataMaxCardinality :: Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataMaxCardinality
-dataMaxCardinality bound property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-dataMaxCardinalityBound :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm Integer
-dataMaxCardinalityBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataMaxCardinalityProperty :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataMaxCardinalityProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataMaxCardinalityRange :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm [OwlSyntax.DataRange]
-dataMaxCardinalityRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataMaxCardinalityWithBound :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.DataMaxCardinality
-dataMaxCardinalityWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataMaxCardinalityWithProperty :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataMaxCardinality
-dataMaxCardinalityWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataMaxCardinalityWithRange :: Phantoms.TTerm OwlSyntax.DataMaxCardinality -> Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataMaxCardinality
-dataMaxCardinalityWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMaxCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataMinCardinality :: Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataMinCardinality
-dataMinCardinality bound property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-dataMinCardinalityBound :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm Integer
-dataMinCardinalityBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataMinCardinalityProperty :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataMinCardinalityProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataMinCardinalityRange :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm [OwlSyntax.DataRange]
-dataMinCardinalityRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataMinCardinalityWithBound :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.DataMinCardinality
-dataMinCardinalityWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataMinCardinalityWithProperty :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataMinCardinality
-dataMinCardinalityWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataMinCardinalityWithRange :: Phantoms.TTerm OwlSyntax.DataMinCardinality -> Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataMinCardinality
-dataMinCardinalityWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataMinCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataOneOf :: Phantoms.TTerm [RdfSyntax.Literal] -> Phantoms.TTerm OwlSyntax.DataOneOf
-dataOneOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.DataOneOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataProperty :: Phantoms.TTerm () -> Phantoms.TTerm OwlSyntax.DataProperty
-dataProperty x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.DataProperty"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataPropertyAssertion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.DataPropertyAssertion
-dataPropertyAssertion annotations property source target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-dataPropertyAssertionAnnotations :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation]
-dataPropertyAssertionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyAssertionProperty :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataPropertyAssertionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyAssertionSource :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-dataPropertyAssertionSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyAssertionTarget :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-dataPropertyAssertionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyAssertionWithAnnotations :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyAssertion
-dataPropertyAssertionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyAssertionWithProperty :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataPropertyAssertion
-dataPropertyAssertionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyAssertionWithSource :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.DataPropertyAssertion
-dataPropertyAssertionWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyAssertionWithTarget :: Phantoms.TTerm OwlSyntax.DataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.DataPropertyAssertion
-dataPropertyAssertionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataPropertyAxiomDataPropertyAxiom :: Phantoms.TTerm OwlSyntax.DataPropertyAxiom -> Phantoms.TTerm OwlSyntax.DataPropertyAxiom
-dataPropertyAxiomDataPropertyAxiom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataPropertyAxiom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPropertyAxiomDataPropertyRange :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm OwlSyntax.DataPropertyAxiom
-dataPropertyAxiomDataPropertyRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataPropertyRange"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPropertyAxiomDisjointDataProperties :: Phantoms.TTerm OwlSyntax.DisjointDataProperties -> Phantoms.TTerm OwlSyntax.DataPropertyAxiom
-dataPropertyAxiomDisjointDataProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjointDataProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPropertyAxiomEquivalentDataProperties :: Phantoms.TTerm OwlSyntax.EquivalentDataProperties -> Phantoms.TTerm OwlSyntax.DataPropertyAxiom
-dataPropertyAxiomEquivalentDataProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equivalentDataProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPropertyAxiomFunctionalDataProperty :: Phantoms.TTerm OwlSyntax.FunctionalDataProperty -> Phantoms.TTerm OwlSyntax.DataPropertyAxiom
-dataPropertyAxiomFunctionalDataProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionalDataProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPropertyAxiomSubDataPropertyOf :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm OwlSyntax.DataPropertyAxiom
-dataPropertyAxiomSubDataPropertyOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subDataPropertyOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPropertyDomain :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.DataPropertyDomain
-dataPropertyDomain annotations property domain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)}]}))
-
-dataPropertyDomainAnnotations :: Phantoms.TTerm OwlSyntax.DataPropertyDomain -> Phantoms.TTerm [OwlSyntax.Annotation]
-dataPropertyDomainAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyDomainDomain :: Phantoms.TTerm OwlSyntax.DataPropertyDomain -> Phantoms.TTerm OwlSyntax.ClassExpression
-dataPropertyDomainDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyDomainProperty :: Phantoms.TTerm OwlSyntax.DataPropertyDomain -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataPropertyDomainProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyDomainWithAnnotations :: Phantoms.TTerm OwlSyntax.DataPropertyDomain -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyDomain
-dataPropertyDomainWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyDomainWithDomain :: Phantoms.TTerm OwlSyntax.DataPropertyDomain -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.DataPropertyDomain
-dataPropertyDomainWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataPropertyDomainWithProperty :: Phantoms.TTerm OwlSyntax.DataPropertyDomain -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataPropertyDomain
-dataPropertyDomainWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyDomain"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyExpression :: Phantoms.TTerm OwlSyntax.DataProperty -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataPropertyExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.DataPropertyExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataPropertyRange :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.DataPropertyRange
-dataPropertyRange annotations property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-dataPropertyRangeAnnotations :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm [OwlSyntax.Annotation]
-dataPropertyRangeAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyRangeProperty :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-dataPropertyRangeProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyRangeRange :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm OwlSyntax.ClassExpression
-dataPropertyRangeRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPropertyRangeWithAnnotations :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyRange
-dataPropertyRangeWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyRangeWithProperty :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataPropertyRange
-dataPropertyRangeWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPropertyRangeWithRange :: Phantoms.TTerm OwlSyntax.DataPropertyRange -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.DataPropertyRange
-dataPropertyRangeWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataPropertyRange"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataRangeDataComplementOf :: Phantoms.TTerm OwlSyntax.DataComplementOf -> Phantoms.TTerm OwlSyntax.DataRange
-dataRangeDataComplementOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataComplementOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRangeDataIntersectionOf :: Phantoms.TTerm OwlSyntax.DataIntersectionOf -> Phantoms.TTerm OwlSyntax.DataRange
-dataRangeDataIntersectionOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataIntersectionOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRangeDataOneOf :: Phantoms.TTerm OwlSyntax.DataOneOf -> Phantoms.TTerm OwlSyntax.DataRange
-dataRangeDataOneOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataOneOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRangeDataUnionOf :: Phantoms.TTerm OwlSyntax.DataUnionOf -> Phantoms.TTerm OwlSyntax.DataRange
-dataRangeDataUnionOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataUnionOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRangeDatatype :: Phantoms.TTerm OwlSyntax.Datatype -> Phantoms.TTerm OwlSyntax.DataRange
-dataRangeDatatype x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datatype"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRangeDatatypeRestriction :: Phantoms.TTerm OwlSyntax.DatatypeRestriction -> Phantoms.TTerm OwlSyntax.DataRange
-dataRangeDatatypeRestriction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DataRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datatypeRestriction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataSomeValuesFrom :: Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DataSomeValuesFrom
-dataSomeValuesFrom property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-dataSomeValuesFromProperty :: Phantoms.TTerm OwlSyntax.DataSomeValuesFrom -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression]
-dataSomeValuesFromProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataSomeValuesFromRange :: Phantoms.TTerm OwlSyntax.DataSomeValuesFrom -> Phantoms.TTerm OwlSyntax.DataRange
-dataSomeValuesFromRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataSomeValuesFromWithProperty :: Phantoms.TTerm OwlSyntax.DataSomeValuesFrom -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.DataSomeValuesFrom
-dataSomeValuesFromWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataSomeValuesFromWithRange :: Phantoms.TTerm OwlSyntax.DataSomeValuesFrom -> Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DataSomeValuesFrom
-dataSomeValuesFromWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DataSomeValuesFrom"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataUnionOf :: Phantoms.TTerm [OwlSyntax.DataRange] -> Phantoms.TTerm OwlSyntax.DataUnionOf
-dataUnionOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.DataUnionOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-datatypeDefinition :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.Datatype -> Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DatatypeDefinition
-datatypeDefinition annotations datatype range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Phantoms.unTTerm datatype)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-datatypeDefinitionAnnotations :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm [OwlSyntax.Annotation]
-datatypeDefinitionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeDefinitionDatatype :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm OwlSyntax.Datatype
-datatypeDefinitionDatatype x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-        Core.projectionField = (Core.Name "datatype")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeDefinitionRange :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm OwlSyntax.DataRange
-datatypeDefinitionRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeDefinitionWithAnnotations :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DatatypeDefinition
-datatypeDefinitionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-              Core.projectionField = (Core.Name "datatype")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-datatypeDefinitionWithDatatype :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm OwlSyntax.Datatype -> Phantoms.TTerm OwlSyntax.DatatypeDefinition
-datatypeDefinitionWithDatatype original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-datatypeDefinitionWithRange :: Phantoms.TTerm OwlSyntax.DatatypeDefinition -> Phantoms.TTerm OwlSyntax.DataRange -> Phantoms.TTerm OwlSyntax.DatatypeDefinition
-datatypeDefinitionWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeDefinition"),
-              Core.projectionField = (Core.Name "datatype")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-datatypeOther :: Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.Datatype
-datatypeOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datatypeRestriction :: Phantoms.TTerm OwlSyntax.Datatype -> Phantoms.TTerm [OwlSyntax.DatatypeRestriction_Constraint] -> Phantoms.TTerm OwlSyntax.DatatypeRestriction
-datatypeRestriction datatype constraints =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Phantoms.unTTerm datatype)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))
-
-datatypeRestrictionConstraints :: Phantoms.TTerm OwlSyntax.DatatypeRestriction -> Phantoms.TTerm [OwlSyntax.DatatypeRestriction_Constraint]
-datatypeRestrictionConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeRestrictionDatatype :: Phantoms.TTerm OwlSyntax.DatatypeRestriction -> Phantoms.TTerm OwlSyntax.Datatype
-datatypeRestrictionDatatype x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-        Core.projectionField = (Core.Name "datatype")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeRestrictionWithConstraints :: Phantoms.TTerm OwlSyntax.DatatypeRestriction -> Phantoms.TTerm [OwlSyntax.DatatypeRestriction_Constraint] -> Phantoms.TTerm OwlSyntax.DatatypeRestriction
-datatypeRestrictionWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-              Core.projectionField = (Core.Name "datatype")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-datatypeRestrictionWithDatatype :: Phantoms.TTerm OwlSyntax.DatatypeRestriction -> Phantoms.TTerm OwlSyntax.Datatype -> Phantoms.TTerm OwlSyntax.DatatypeRestriction
-datatypeRestrictionWithDatatype original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "datatype"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-datatypeRestriction_ConstrainingFacetOther :: Phantoms.TTerm RdfSyntax.Iri -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_ConstrainingFacet
-datatypeRestriction_ConstrainingFacetOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_ConstrainingFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datatypeRestriction_ConstrainingFacetXmlSchema :: Phantoms.TTerm Schema.ConstrainingFacet -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_ConstrainingFacet
-datatypeRestriction_ConstrainingFacetXmlSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_ConstrainingFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xmlSchema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datatypeRestriction_Constraint :: Phantoms.TTerm OwlSyntax.DatatypeRestriction_ConstrainingFacet -> Phantoms.TTerm RdfSyntax.Literal -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint
-datatypeRestriction_Constraint constrainingFacet restrictionValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constrainingFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm constrainingFacet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictionValue"),
-          Core.fieldTerm = (Phantoms.unTTerm restrictionValue)}]}))
-
-datatypeRestriction_ConstraintConstrainingFacet :: Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_ConstrainingFacet
-datatypeRestriction_ConstraintConstrainingFacet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-        Core.projectionField = (Core.Name "constrainingFacet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeRestriction_ConstraintRestrictionValue :: Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint -> Phantoms.TTerm RdfSyntax.Literal
-datatypeRestriction_ConstraintRestrictionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-        Core.projectionField = (Core.Name "restrictionValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-datatypeRestriction_ConstraintWithConstrainingFacet :: Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_ConstrainingFacet -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint
-datatypeRestriction_ConstraintWithConstrainingFacet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constrainingFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictionValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-              Core.projectionField = (Core.Name "restrictionValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-datatypeRestriction_ConstraintWithRestrictionValue :: Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint -> Phantoms.TTerm RdfSyntax.Literal -> Phantoms.TTerm OwlSyntax.DatatypeRestriction_Constraint
-datatypeRestriction_ConstraintWithRestrictionValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constrainingFacet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"),
-              Core.projectionField = (Core.Name "constrainingFacet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "restrictionValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-datatypeXmlSchema :: Phantoms.TTerm Schema.Datatype -> Phantoms.TTerm OwlSyntax.Datatype
-datatypeXmlSchema x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xmlSchema"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declaration :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.Entity -> Phantoms.TTerm OwlSyntax.Declaration
-declaration annotations entity =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "entity"),
-          Core.fieldTerm = (Phantoms.unTTerm entity)}]}))
-
-declarationAnnotations :: Phantoms.TTerm OwlSyntax.Declaration -> Phantoms.TTerm [OwlSyntax.Annotation]
-declarationAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-declarationEntity :: Phantoms.TTerm OwlSyntax.Declaration -> Phantoms.TTerm OwlSyntax.Entity
-declarationEntity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-        Core.projectionField = (Core.Name "entity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-declarationWithAnnotations :: Phantoms.TTerm OwlSyntax.Declaration -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.Declaration
-declarationWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "entity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-              Core.projectionField = (Core.Name "entity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-declarationWithEntity :: Phantoms.TTerm OwlSyntax.Declaration -> Phantoms.TTerm OwlSyntax.Entity -> Phantoms.TTerm OwlSyntax.Declaration
-declarationWithEntity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Declaration"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "entity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-differentIndividuals :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.Individual] -> Phantoms.TTerm OwlSyntax.DifferentIndividuals
-differentIndividuals annotations individuals =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individuals"),
-          Core.fieldTerm = (Phantoms.unTTerm individuals)}]}))
-
-differentIndividualsAnnotations :: Phantoms.TTerm OwlSyntax.DifferentIndividuals -> Phantoms.TTerm [OwlSyntax.Annotation]
-differentIndividualsAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-differentIndividualsIndividuals :: Phantoms.TTerm OwlSyntax.DifferentIndividuals -> Phantoms.TTerm [OwlSyntax.Individual]
-differentIndividualsIndividuals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-        Core.projectionField = (Core.Name "individuals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-differentIndividualsWithAnnotations :: Phantoms.TTerm OwlSyntax.DifferentIndividuals -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DifferentIndividuals
-differentIndividualsWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individuals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-              Core.projectionField = (Core.Name "individuals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-differentIndividualsWithIndividuals :: Phantoms.TTerm OwlSyntax.DifferentIndividuals -> Phantoms.TTerm [OwlSyntax.Individual] -> Phantoms.TTerm OwlSyntax.DifferentIndividuals
-differentIndividualsWithIndividuals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DifferentIndividuals"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "individuals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-disjointClasses :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.DisjointClasses
-disjointClasses annotations classes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm classes)}]}))
-
-disjointClassesAnnotations :: Phantoms.TTerm OwlSyntax.DisjointClasses -> Phantoms.TTerm [OwlSyntax.Annotation]
-disjointClassesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointClassesClasses :: Phantoms.TTerm OwlSyntax.DisjointClasses -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-disjointClassesClasses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-        Core.projectionField = (Core.Name "classes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointClassesWithAnnotations :: Phantoms.TTerm OwlSyntax.DisjointClasses -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DisjointClasses
-disjointClassesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-              Core.projectionField = (Core.Name "classes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjointClassesWithClasses :: Phantoms.TTerm OwlSyntax.DisjointClasses -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.DisjointClasses
-disjointClassesWithClasses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointClasses"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-disjointDataProperties :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.DisjointDataProperties
-disjointDataProperties annotations properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointDataProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-disjointDataPropertiesAnnotations :: Phantoms.TTerm OwlSyntax.DisjointDataProperties -> Phantoms.TTerm [OwlSyntax.Annotation]
-disjointDataPropertiesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointDataProperties"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointDataPropertiesProperties :: Phantoms.TTerm OwlSyntax.DisjointDataProperties -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression]
-disjointDataPropertiesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointDataProperties"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointDataPropertiesWithAnnotations :: Phantoms.TTerm OwlSyntax.DisjointDataProperties -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DisjointDataProperties
-disjointDataPropertiesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointDataProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.DisjointDataProperties"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjointDataPropertiesWithProperties :: Phantoms.TTerm OwlSyntax.DisjointDataProperties -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.DisjointDataProperties
-disjointDataPropertiesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointDataProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointDataProperties"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-disjointObjectProperties :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.DisjointObjectProperties
-disjointObjectProperties annotations properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-disjointObjectPropertiesAnnotations :: Phantoms.TTerm OwlSyntax.DisjointObjectProperties -> Phantoms.TTerm [OwlSyntax.Annotation]
-disjointObjectPropertiesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointObjectProperties"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointObjectPropertiesProperties :: Phantoms.TTerm OwlSyntax.DisjointObjectProperties -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression]
-disjointObjectPropertiesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointObjectProperties"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointObjectPropertiesWithAnnotations :: Phantoms.TTerm OwlSyntax.DisjointObjectProperties -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DisjointObjectProperties
-disjointObjectPropertiesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.DisjointObjectProperties"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjointObjectPropertiesWithProperties :: Phantoms.TTerm OwlSyntax.DisjointObjectProperties -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.DisjointObjectProperties
-disjointObjectPropertiesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointObjectProperties"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-disjointUnion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.Class -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.DisjointUnion
-disjointUnion annotations class_ classes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm classes)}]}))
-
-disjointUnionAnnotations :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm [OwlSyntax.Annotation]
-disjointUnionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointUnionClass :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm OwlSyntax.Class
-disjointUnionClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointUnionClasses :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-disjointUnionClasses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-        Core.projectionField = (Core.Name "classes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-disjointUnionWithAnnotations :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DisjointUnion
-disjointUnionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-              Core.projectionField = (Core.Name "classes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjointUnionWithClass :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm OwlSyntax.Class -> Phantoms.TTerm OwlSyntax.DisjointUnion
-disjointUnionWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-              Core.projectionField = (Core.Name "classes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjointUnionWithClasses :: Phantoms.TTerm OwlSyntax.DisjointUnion -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.DisjointUnion
-disjointUnionWithClasses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.DisjointUnion"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-entityAnnotationProperty :: Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.Entity
-entityAnnotationProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Entity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotationProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-entityClass :: Phantoms.TTerm OwlSyntax.Class -> Phantoms.TTerm OwlSyntax.Entity
-entityClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Entity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-entityDataProperty :: Phantoms.TTerm OwlSyntax.DataProperty -> Phantoms.TTerm OwlSyntax.Entity
-entityDataProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Entity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-entityDatatype :: Phantoms.TTerm OwlSyntax.Datatype -> Phantoms.TTerm OwlSyntax.Entity
-entityDatatype x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Entity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datatype"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-entityNamedIndividual :: Phantoms.TTerm OwlSyntax.NamedIndividual -> Phantoms.TTerm OwlSyntax.Entity
-entityNamedIndividual x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Entity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "namedIndividual"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-entityObjectProperty :: Phantoms.TTerm OwlSyntax.ObjectProperty -> Phantoms.TTerm OwlSyntax.Entity
-entityObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Entity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-equivalentClasses :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.EquivalentClasses
-equivalentClasses annotations classes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm classes)}]}))
-
-equivalentClassesAnnotations :: Phantoms.TTerm OwlSyntax.EquivalentClasses -> Phantoms.TTerm [OwlSyntax.Annotation]
-equivalentClassesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equivalentClassesClasses :: Phantoms.TTerm OwlSyntax.EquivalentClasses -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-equivalentClassesClasses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-        Core.projectionField = (Core.Name "classes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equivalentClassesWithAnnotations :: Phantoms.TTerm OwlSyntax.EquivalentClasses -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.EquivalentClasses
-equivalentClassesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-              Core.projectionField = (Core.Name "classes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equivalentClassesWithClasses :: Phantoms.TTerm OwlSyntax.EquivalentClasses -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.EquivalentClasses
-equivalentClassesWithClasses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentClasses"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-equivalentDataProperties :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.EquivalentDataProperties
-equivalentDataProperties annotations properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentDataProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-equivalentDataPropertiesAnnotations :: Phantoms.TTerm OwlSyntax.EquivalentDataProperties -> Phantoms.TTerm [OwlSyntax.Annotation]
-equivalentDataPropertiesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentDataProperties"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equivalentDataPropertiesProperties :: Phantoms.TTerm OwlSyntax.EquivalentDataProperties -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression]
-equivalentDataPropertiesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentDataProperties"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equivalentDataPropertiesWithAnnotations :: Phantoms.TTerm OwlSyntax.EquivalentDataProperties -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.EquivalentDataProperties
-equivalentDataPropertiesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentDataProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.EquivalentDataProperties"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equivalentDataPropertiesWithProperties :: Phantoms.TTerm OwlSyntax.EquivalentDataProperties -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.EquivalentDataProperties
-equivalentDataPropertiesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentDataProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentDataProperties"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-equivalentObjectProperties :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.EquivalentObjectProperties
-equivalentObjectProperties annotations properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-equivalentObjectPropertiesAnnotations :: Phantoms.TTerm OwlSyntax.EquivalentObjectProperties -> Phantoms.TTerm [OwlSyntax.Annotation]
-equivalentObjectPropertiesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentObjectProperties"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equivalentObjectPropertiesProperties :: Phantoms.TTerm OwlSyntax.EquivalentObjectProperties -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression]
-equivalentObjectPropertiesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentObjectProperties"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-equivalentObjectPropertiesWithAnnotations :: Phantoms.TTerm OwlSyntax.EquivalentObjectProperties -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.EquivalentObjectProperties
-equivalentObjectPropertiesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.owl.syntax.EquivalentObjectProperties"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-equivalentObjectPropertiesWithProperties :: Phantoms.TTerm OwlSyntax.EquivalentObjectProperties -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.EquivalentObjectProperties
-equivalentObjectPropertiesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.EquivalentObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.EquivalentObjectProperties"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionalDataProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.FunctionalDataProperty
-functionalDataProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-functionalDataPropertyAnnotations :: Phantoms.TTerm OwlSyntax.FunctionalDataProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-functionalDataPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionalDataPropertyProperty :: Phantoms.TTerm OwlSyntax.FunctionalDataProperty -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-functionalDataPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionalDataPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.FunctionalDataProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.FunctionalDataProperty
-functionalDataPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionalDataPropertyWithProperty :: Phantoms.TTerm OwlSyntax.FunctionalDataProperty -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.FunctionalDataProperty
-functionalDataPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalDataProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionalObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.FunctionalObjectProperty
-functionalObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-functionalObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.FunctionalObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-functionalObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionalObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.FunctionalObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-functionalObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionalObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.FunctionalObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.FunctionalObjectProperty
-functionalObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionalObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.FunctionalObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.FunctionalObjectProperty
-functionalObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.FunctionalObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-hasKey :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.HasKey
-hasKey annotations class_ objectProperties dataProperties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "objectProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm objectProperties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm dataProperties)}]}))
-
-hasKeyAnnotations :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm [OwlSyntax.Annotation]
-hasKeyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasKeyClass :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm OwlSyntax.ClassExpression
-hasKeyClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasKeyDataProperties :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression]
-hasKeyDataProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-        Core.projectionField = (Core.Name "dataProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasKeyObjectProperties :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression]
-hasKeyObjectProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-        Core.projectionField = (Core.Name "objectProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasKeyWithAnnotations :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.HasKey
-hasKeyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "objectProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "objectProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "dataProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-hasKeyWithClass :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.HasKey
-hasKeyWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "objectProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "objectProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "dataProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-hasKeyWithDataProperties :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm [OwlSyntax.DataPropertyExpression] -> Phantoms.TTerm OwlSyntax.HasKey
-hasKeyWithDataProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "objectProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "objectProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-hasKeyWithObjectProperties :: Phantoms.TTerm OwlSyntax.HasKey -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.HasKey
-hasKeyWithObjectProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "objectProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.HasKey"),
-              Core.projectionField = (Core.Name "dataProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-individualAnonymous :: Phantoms.TTerm OwlSyntax.AnonymousIndividual -> Phantoms.TTerm OwlSyntax.Individual
-individualAnonymous x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Individual"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymous"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-individualNamed :: Phantoms.TTerm OwlSyntax.NamedIndividual -> Phantoms.TTerm OwlSyntax.Individual
-individualNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.Individual"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inverseFunctionalObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty
-inverseFunctionalObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-inverseFunctionalObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-inverseFunctionalObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inverseFunctionalObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-inverseFunctionalObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inverseFunctionalObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty
-inverseFunctionalObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inverseFunctionalObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty
-inverseFunctionalObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inverseObjectProperties :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.InverseObjectProperties
-inverseObjectProperties annotations property1 property2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property1"),
-          Core.fieldTerm = (Phantoms.unTTerm property1)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property2"),
-          Core.fieldTerm = (Phantoms.unTTerm property2)}]}))
-
-inverseObjectPropertiesAnnotations :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm [OwlSyntax.Annotation]
-inverseObjectPropertiesAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inverseObjectPropertiesProperty1 :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-inverseObjectPropertiesProperty1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-        Core.projectionField = (Core.Name "property1")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inverseObjectPropertiesProperty2 :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-inverseObjectPropertiesProperty2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-        Core.projectionField = (Core.Name "property2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inverseObjectPropertiesWithAnnotations :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.InverseObjectProperties
-inverseObjectPropertiesWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-              Core.projectionField = (Core.Name "property1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-              Core.projectionField = (Core.Name "property2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inverseObjectPropertiesWithProperty1 :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.InverseObjectProperties
-inverseObjectPropertiesWithProperty1 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property1"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-              Core.projectionField = (Core.Name "property2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inverseObjectPropertiesWithProperty2 :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.InverseObjectProperties
-inverseObjectPropertiesWithProperty2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperties"),
-              Core.projectionField = (Core.Name "property1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inverseObjectProperty :: Phantoms.TTerm OwlSyntax.ObjectProperty -> Phantoms.TTerm OwlSyntax.InverseObjectProperty
-inverseObjectProperty x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.InverseObjectProperty"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-irreflexiveObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty
-irreflexiveObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-irreflexiveObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-irreflexiveObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-irreflexiveObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-irreflexiveObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-irreflexiveObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty
-irreflexiveObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-irreflexiveObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty
-irreflexiveObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedIndividual :: Phantoms.TTerm () -> Phantoms.TTerm OwlSyntax.NamedIndividual
-namedIndividual x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.NamedIndividual"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-negativeDataPropertyAssertion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion
-negativeDataPropertyAssertion annotations property source target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-negativeDataPropertyAssertionAnnotations :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation]
-negativeDataPropertyAssertionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeDataPropertyAssertionProperty :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-negativeDataPropertyAssertionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeDataPropertyAssertionSource :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-negativeDataPropertyAssertionSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeDataPropertyAssertionTarget :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-negativeDataPropertyAssertionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeDataPropertyAssertionWithAnnotations :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion
-negativeDataPropertyAssertionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-negativeDataPropertyAssertionWithProperty :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion
-negativeDataPropertyAssertionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-negativeDataPropertyAssertionWithSource :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion
-negativeDataPropertyAssertionWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-negativeDataPropertyAssertionWithTarget :: Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.NegativeDataPropertyAssertion
-negativeDataPropertyAssertionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-negativeObjectPropertyAssertion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion
-negativeObjectPropertyAssertion annotations property source target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-negativeObjectPropertyAssertionAnnotations :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation]
-negativeObjectPropertyAssertionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeObjectPropertyAssertionProperty :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-negativeObjectPropertyAssertionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeObjectPropertyAssertionSource :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-negativeObjectPropertyAssertionSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeObjectPropertyAssertionTarget :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-negativeObjectPropertyAssertionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-negativeObjectPropertyAssertionWithAnnotations :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion
-negativeObjectPropertyAssertionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-negativeObjectPropertyAssertionWithProperty :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion
-negativeObjectPropertyAssertionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-negativeObjectPropertyAssertionWithSource :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion
-negativeObjectPropertyAssertionWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-negativeObjectPropertyAssertionWithTarget :: Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.NegativeObjectPropertyAssertion
-negativeObjectPropertyAssertionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectAllValuesFrom :: Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom
-objectAllValuesFrom property class_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)}]}))
-
-objectAllValuesFromClass :: Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression
-objectAllValuesFromClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectAllValuesFromProperty :: Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectAllValuesFromProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectAllValuesFromWithClass :: Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom
-objectAllValuesFromWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectAllValuesFromWithProperty :: Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectAllValuesFrom
-objectAllValuesFromWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectComplementOf :: Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectComplementOf
-objectComplementOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.ObjectComplementOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-objectExactCardinality :: Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectExactCardinality
-objectExactCardinality bound property class_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)}]}))
-
-objectExactCardinalityBound :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm Integer
-objectExactCardinalityBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectExactCardinalityClass :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-objectExactCardinalityClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectExactCardinalityProperty :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectExactCardinalityProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectExactCardinalityWithBound :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.ObjectExactCardinality
-objectExactCardinalityWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectExactCardinalityWithClass :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectExactCardinality
-objectExactCardinalityWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectExactCardinalityWithProperty :: Phantoms.TTerm OwlSyntax.ObjectExactCardinality -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectExactCardinality
-objectExactCardinalityWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectExactCardinality"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectHasSelf :: Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectHasSelf
-objectHasSelf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.ObjectHasSelf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-objectHasValue :: Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ObjectHasValue
-objectHasValue property individual =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Phantoms.unTTerm individual)}]}))
-
-objectHasValueIndividual :: Phantoms.TTerm OwlSyntax.ObjectHasValue -> Phantoms.TTerm OwlSyntax.Individual
-objectHasValueIndividual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-        Core.projectionField = (Core.Name "individual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectHasValueProperty :: Phantoms.TTerm OwlSyntax.ObjectHasValue -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectHasValueProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectHasValueWithIndividual :: Phantoms.TTerm OwlSyntax.ObjectHasValue -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ObjectHasValue
-objectHasValueWithIndividual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectHasValueWithProperty :: Phantoms.TTerm OwlSyntax.ObjectHasValue -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectHasValue
-objectHasValueWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectHasValue"),
-              Core.projectionField = (Core.Name "individual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectIntersectionOf :: Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectIntersectionOf
-objectIntersectionOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.ObjectIntersectionOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-objectMaxCardinality :: Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectMaxCardinality
-objectMaxCardinality bound property class_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)}]}))
-
-objectMaxCardinalityBound :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm Integer
-objectMaxCardinalityBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectMaxCardinalityClass :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-objectMaxCardinalityClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectMaxCardinalityProperty :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectMaxCardinalityProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectMaxCardinalityWithBound :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.ObjectMaxCardinality
-objectMaxCardinalityWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectMaxCardinalityWithClass :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectMaxCardinality
-objectMaxCardinalityWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectMaxCardinalityWithProperty :: Phantoms.TTerm OwlSyntax.ObjectMaxCardinality -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectMaxCardinality
-objectMaxCardinalityWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMaxCardinality"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectMinCardinality :: Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectMinCardinality
-objectMinCardinality bound property class_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)}]}))
-
-objectMinCardinalityBound :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm Integer
-objectMinCardinalityBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectMinCardinalityClass :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-objectMinCardinalityClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectMinCardinalityProperty :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectMinCardinalityProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectMinCardinalityWithBound :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm Integer -> Phantoms.TTerm OwlSyntax.ObjectMinCardinality
-objectMinCardinalityWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectMinCardinalityWithClass :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectMinCardinality
-objectMinCardinalityWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectMinCardinalityWithProperty :: Phantoms.TTerm OwlSyntax.ObjectMinCardinality -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectMinCardinality
-objectMinCardinalityWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectMinCardinality"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectOneOf :: Phantoms.TTerm [OwlSyntax.Individual] -> Phantoms.TTerm OwlSyntax.ObjectOneOf
-objectOneOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.ObjectOneOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-objectProperty :: Phantoms.TTerm () -> Phantoms.TTerm OwlSyntax.ObjectProperty
-objectProperty x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.ObjectProperty"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-objectPropertyAssertion :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion
-objectPropertyAssertion annotations property source target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-objectPropertyAssertionAnnotations :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation]
-objectPropertyAssertionAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyAssertionProperty :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectPropertyAssertionProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyAssertionSource :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-objectPropertyAssertionSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyAssertionTarget :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual
-objectPropertyAssertionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyAssertionWithAnnotations :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion
-objectPropertyAssertionWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyAssertionWithProperty :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion
-objectPropertyAssertionWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyAssertionWithSource :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion
-objectPropertyAssertionWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyAssertionWithTarget :: Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion -> Phantoms.TTerm OwlSyntax.Individual -> Phantoms.TTerm OwlSyntax.ObjectPropertyAssertion
-objectPropertyAssertionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectPropertyAxiomAsymmetricObjectProperty :: Phantoms.TTerm OwlSyntax.AsymmetricObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomAsymmetricObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asymmetricObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomDisjointObjectProperties :: Phantoms.TTerm OwlSyntax.DisjointObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomDisjointObjectProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjointObjectProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomEquivalentObjectProperties :: Phantoms.TTerm OwlSyntax.EquivalentObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomEquivalentObjectProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equivalentObjectProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomFunctionalObjectProperty :: Phantoms.TTerm OwlSyntax.FunctionalObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomFunctionalObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionalObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomInverseFunctionalObjectProperty :: Phantoms.TTerm OwlSyntax.InverseFunctionalObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomInverseFunctionalObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inverseFunctionalObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomInverseObjectProperties :: Phantoms.TTerm OwlSyntax.InverseObjectProperties -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomInverseObjectProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inverseObjectProperties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomIrreflexiveObjectProperty :: Phantoms.TTerm OwlSyntax.IrreflexiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomIrreflexiveObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "irreflexiveObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomObjectPropertyDomain :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomObjectPropertyDomain x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectPropertyDomain"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomObjectPropertyRange :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomObjectPropertyRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectPropertyRange"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomReflexiveObjectProperty :: Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomReflexiveObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reflexiveObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomSubObjectPropertyOf :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomSubObjectPropertyOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subObjectPropertyOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomSymmetricObjectProperty :: Phantoms.TTerm OwlSyntax.SymmetricObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomSymmetricObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "symmetricObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyAxiomTransitiveObjectProperty :: Phantoms.TTerm OwlSyntax.TransitiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyAxiom
-objectPropertyAxiomTransitiveObjectProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "transitiveObjectProperty"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyDomain :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyDomain
-objectPropertyDomain annotations property domain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)}]}))
-
-objectPropertyDomainAnnotations :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm [OwlSyntax.Annotation]
-objectPropertyDomainAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyDomainDomain :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm OwlSyntax.ClassExpression
-objectPropertyDomainDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyDomainProperty :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectPropertyDomainProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyDomainWithAnnotations :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyDomain
-objectPropertyDomainWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyDomainWithDomain :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyDomain
-objectPropertyDomainWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectPropertyDomainWithProperty :: Phantoms.TTerm OwlSyntax.ObjectPropertyDomain -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyDomain
-objectPropertyDomainWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyDomain"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyExpressionInverseObject :: Phantoms.TTerm OwlSyntax.InverseObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectPropertyExpressionInverseObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inverseObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyExpressionObject :: Phantoms.TTerm OwlSyntax.ObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectPropertyExpressionObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-objectPropertyRange :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyRange
-objectPropertyRange annotations property range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-objectPropertyRangeAnnotations :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm [OwlSyntax.Annotation]
-objectPropertyRangeAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyRangeProperty :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectPropertyRangeProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyRangeRange :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm OwlSyntax.ClassExpression
-objectPropertyRangeRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectPropertyRangeWithAnnotations :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyRange
-objectPropertyRangeWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyRangeWithProperty :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyRange
-objectPropertyRangeWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectPropertyRangeWithRange :: Phantoms.TTerm OwlSyntax.ObjectPropertyRange -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectPropertyRange
-objectPropertyRangeWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectPropertyRange"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectSomeValuesFrom :: Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom
-objectSomeValuesFrom property class_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)}]}))
-
-objectSomeValuesFromClass :: Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression
-objectSomeValuesFromClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectSomeValuesFromProperty :: Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-objectSomeValuesFromProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-objectSomeValuesFromWithClass :: Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom
-objectSomeValuesFromWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-objectSomeValuesFromWithProperty :: Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ObjectSomeValuesFrom
-objectSomeValuesFromWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-objectUnionOf :: Phantoms.TTerm [OwlSyntax.ClassExpression] -> Phantoms.TTerm OwlSyntax.ObjectUnionOf
-objectUnionOf x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.owl.syntax.ObjectUnionOf"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-ontology :: Phantoms.TTerm [OwlSyntax.Ontology] -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.Axiom] -> Phantoms.TTerm OwlSyntax.Ontology
-ontology directImports annotations axioms =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directImports"),
-          Core.fieldTerm = (Phantoms.unTTerm directImports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "axioms"),
-          Core.fieldTerm = (Phantoms.unTTerm axioms)}]}))
-
-ontologyAnnotations :: Phantoms.TTerm OwlSyntax.Ontology -> Phantoms.TTerm [OwlSyntax.Annotation]
-ontologyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ontologyAxioms :: Phantoms.TTerm OwlSyntax.Ontology -> Phantoms.TTerm [OwlSyntax.Axiom]
-ontologyAxioms x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-        Core.projectionField = (Core.Name "axioms")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ontologyDirectImports :: Phantoms.TTerm OwlSyntax.Ontology -> Phantoms.TTerm [OwlSyntax.Ontology]
-ontologyDirectImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-        Core.projectionField = (Core.Name "directImports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ontologyWithAnnotations :: Phantoms.TTerm OwlSyntax.Ontology -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.Ontology
-ontologyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directImports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-              Core.projectionField = (Core.Name "directImports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "axioms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-              Core.projectionField = (Core.Name "axioms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ontologyWithAxioms :: Phantoms.TTerm OwlSyntax.Ontology -> Phantoms.TTerm [OwlSyntax.Axiom] -> Phantoms.TTerm OwlSyntax.Ontology
-ontologyWithAxioms original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directImports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-              Core.projectionField = (Core.Name "directImports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "axioms"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ontologyWithDirectImports :: Phantoms.TTerm OwlSyntax.Ontology -> Phantoms.TTerm [OwlSyntax.Ontology] -> Phantoms.TTerm OwlSyntax.Ontology
-ontologyWithDirectImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "directImports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "axioms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.Ontology"),
-              Core.projectionField = (Core.Name "axioms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-reflexiveObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty
-reflexiveObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-reflexiveObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-reflexiveObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-reflexiveObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-reflexiveObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-reflexiveObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty
-reflexiveObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-reflexiveObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.ReflexiveObjectProperty
-reflexiveObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sameIndividual :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.Individual] -> Phantoms.TTerm OwlSyntax.SameIndividual
-sameIndividual annotations individuals =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individuals"),
-          Core.fieldTerm = (Phantoms.unTTerm individuals)}]}))
-
-sameIndividualAnnotations :: Phantoms.TTerm OwlSyntax.SameIndividual -> Phantoms.TTerm [OwlSyntax.Annotation]
-sameIndividualAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sameIndividualIndividuals :: Phantoms.TTerm OwlSyntax.SameIndividual -> Phantoms.TTerm [OwlSyntax.Individual]
-sameIndividualIndividuals x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-        Core.projectionField = (Core.Name "individuals")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sameIndividualWithAnnotations :: Phantoms.TTerm OwlSyntax.SameIndividual -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.SameIndividual
-sameIndividualWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "individuals"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-              Core.projectionField = (Core.Name "individuals")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sameIndividualWithIndividuals :: Phantoms.TTerm OwlSyntax.SameIndividual -> Phantoms.TTerm [OwlSyntax.Individual] -> Phantoms.TTerm OwlSyntax.SameIndividual
-sameIndividualWithIndividuals original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SameIndividual"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "individuals"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subAnnotationPropertyOf :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf
-subAnnotationPropertyOf annotations subProperty superProperty =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm subProperty)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm superProperty)}]}))
-
-subAnnotationPropertyOfAnnotations :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm [OwlSyntax.Annotation]
-subAnnotationPropertyOfAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subAnnotationPropertyOfSubProperty :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-subAnnotationPropertyOfSubProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-        Core.projectionField = (Core.Name "subProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subAnnotationPropertyOfSuperProperty :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm OwlSyntax.AnnotationProperty
-subAnnotationPropertyOfSuperProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-        Core.projectionField = (Core.Name "superProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subAnnotationPropertyOfWithAnnotations :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf
-subAnnotationPropertyOfWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-              Core.projectionField = (Core.Name "subProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-              Core.projectionField = (Core.Name "superProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subAnnotationPropertyOfWithSubProperty :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf
-subAnnotationPropertyOfWithSubProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-              Core.projectionField = (Core.Name "superProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subAnnotationPropertyOfWithSuperProperty :: Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf -> Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm OwlSyntax.SubAnnotationPropertyOf
-subAnnotationPropertyOfWithSuperProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"),
-              Core.projectionField = (Core.Name "subProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subClassOf :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.SubClassOf
-subClassOf annotations subClass superClass =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subClass"),
-          Core.fieldTerm = (Phantoms.unTTerm subClass)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Phantoms.unTTerm superClass)}]}))
-
-subClassOfAnnotations :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm [OwlSyntax.Annotation]
-subClassOfAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subClassOfSubClass :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm OwlSyntax.ClassExpression
-subClassOfSubClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-        Core.projectionField = (Core.Name "subClass")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subClassOfSuperClass :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm OwlSyntax.ClassExpression
-subClassOfSuperClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-        Core.projectionField = (Core.Name "superClass")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subClassOfWithAnnotations :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.SubClassOf
-subClassOfWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-              Core.projectionField = (Core.Name "subClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-              Core.projectionField = (Core.Name "superClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subClassOfWithSubClass :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.SubClassOf
-subClassOfWithSubClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subClass"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-              Core.projectionField = (Core.Name "superClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subClassOfWithSuperClass :: Phantoms.TTerm OwlSyntax.SubClassOf -> Phantoms.TTerm OwlSyntax.ClassExpression -> Phantoms.TTerm OwlSyntax.SubClassOf
-subClassOfWithSuperClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubClassOf"),
-              Core.projectionField = (Core.Name "subClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superClass"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subDataPropertyOf :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.SubDataPropertyOf
-subDataPropertyOf annotations subProperty superProperty =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm subProperty)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm superProperty)}]}))
-
-subDataPropertyOfAnnotations :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm [OwlSyntax.Annotation]
-subDataPropertyOfAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subDataPropertyOfSubProperty :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-subDataPropertyOfSubProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-        Core.projectionField = (Core.Name "subProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subDataPropertyOfSuperProperty :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm OwlSyntax.DataPropertyExpression
-subDataPropertyOfSuperProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-        Core.projectionField = (Core.Name "superProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subDataPropertyOfWithAnnotations :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.SubDataPropertyOf
-subDataPropertyOfWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-              Core.projectionField = (Core.Name "subProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-              Core.projectionField = (Core.Name "superProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subDataPropertyOfWithSubProperty :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.SubDataPropertyOf
-subDataPropertyOfWithSubProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-              Core.projectionField = (Core.Name "superProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subDataPropertyOfWithSuperProperty :: Phantoms.TTerm OwlSyntax.SubDataPropertyOf -> Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.SubDataPropertyOf
-subDataPropertyOfWithSuperProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubDataPropertyOf"),
-              Core.projectionField = (Core.Name "subProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-subObjectPropertyOf :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.SubObjectPropertyOf
-subObjectPropertyOf annotations subProperty superProperty =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm subProperty)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm superProperty)}]}))
-
-subObjectPropertyOfAnnotations :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm [OwlSyntax.Annotation]
-subObjectPropertyOfAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subObjectPropertyOfSubProperty :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression]
-subObjectPropertyOfSubProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-        Core.projectionField = (Core.Name "subProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subObjectPropertyOfSuperProperty :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-subObjectPropertyOfSuperProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-        Core.projectionField = (Core.Name "superProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-subObjectPropertyOfWithAnnotations :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.SubObjectPropertyOf
-subObjectPropertyOfWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-              Core.projectionField = (Core.Name "subProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-              Core.projectionField = (Core.Name "superProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subObjectPropertyOfWithSubProperty :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm [OwlSyntax.ObjectPropertyExpression] -> Phantoms.TTerm OwlSyntax.SubObjectPropertyOf
-subObjectPropertyOfWithSubProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-              Core.projectionField = (Core.Name "superProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subObjectPropertyOfWithSuperProperty :: Phantoms.TTerm OwlSyntax.SubObjectPropertyOf -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.SubObjectPropertyOf
-subObjectPropertyOfWithSuperProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SubObjectPropertyOf"),
-              Core.projectionField = (Core.Name "subProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-symmetricObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.SymmetricObjectProperty
-symmetricObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-symmetricObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.SymmetricObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-symmetricObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-symmetricObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.SymmetricObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-symmetricObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-symmetricObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.SymmetricObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.SymmetricObjectProperty
-symmetricObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-symmetricObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.SymmetricObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.SymmetricObjectProperty
-symmetricObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.SymmetricObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-transitiveObjectProperty :: Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.TransitiveObjectProperty
-transitiveObjectProperty annotations property =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm property)}]}))
-
-transitiveObjectPropertyAnnotations :: Phantoms.TTerm OwlSyntax.TransitiveObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation]
-transitiveObjectPropertyAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-transitiveObjectPropertyProperty :: Phantoms.TTerm OwlSyntax.TransitiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-transitiveObjectPropertyProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-        Core.projectionField = (Core.Name "property")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-transitiveObjectPropertyWithAnnotations :: Phantoms.TTerm OwlSyntax.TransitiveObjectProperty -> Phantoms.TTerm [OwlSyntax.Annotation] -> Phantoms.TTerm OwlSyntax.TransitiveObjectProperty
-transitiveObjectPropertyWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-              Core.projectionField = (Core.Name "property")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-transitiveObjectPropertyWithProperty :: Phantoms.TTerm OwlSyntax.TransitiveObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression -> Phantoms.TTerm OwlSyntax.TransitiveObjectProperty
-transitiveObjectPropertyWithProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.owl.syntax.TransitiveObjectProperty"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "property"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unAnnotationProperty :: Phantoms.TTerm OwlSyntax.AnnotationProperty -> Phantoms.TTerm ()
-unAnnotationProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.AnnotationProperty")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAnonymousIndividual :: Phantoms.TTerm OwlSyntax.AnonymousIndividual -> Phantoms.TTerm ()
-unAnonymousIndividual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.AnonymousIndividual")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unClass :: Phantoms.TTerm OwlSyntax.Class -> Phantoms.TTerm ()
-unClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.Class")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataComplementOf :: Phantoms.TTerm OwlSyntax.DataComplementOf -> Phantoms.TTerm OwlSyntax.DataRange
-unDataComplementOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.DataComplementOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataIntersectionOf :: Phantoms.TTerm OwlSyntax.DataIntersectionOf -> Phantoms.TTerm [OwlSyntax.DataRange]
-unDataIntersectionOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.DataIntersectionOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataOneOf :: Phantoms.TTerm OwlSyntax.DataOneOf -> Phantoms.TTerm [RdfSyntax.Literal]
-unDataOneOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.DataOneOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataProperty :: Phantoms.TTerm OwlSyntax.DataProperty -> Phantoms.TTerm ()
-unDataProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.DataProperty")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataPropertyExpression :: Phantoms.TTerm OwlSyntax.DataPropertyExpression -> Phantoms.TTerm OwlSyntax.DataProperty
-unDataPropertyExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.DataPropertyExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataUnionOf :: Phantoms.TTerm OwlSyntax.DataUnionOf -> Phantoms.TTerm [OwlSyntax.DataRange]
-unDataUnionOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.DataUnionOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInverseObjectProperty :: Phantoms.TTerm OwlSyntax.InverseObjectProperty -> Phantoms.TTerm OwlSyntax.ObjectProperty
-unInverseObjectProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.InverseObjectProperty")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNamedIndividual :: Phantoms.TTerm OwlSyntax.NamedIndividual -> Phantoms.TTerm ()
-unNamedIndividual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.NamedIndividual")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unObjectComplementOf :: Phantoms.TTerm OwlSyntax.ObjectComplementOf -> Phantoms.TTerm OwlSyntax.ClassExpression
-unObjectComplementOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.ObjectComplementOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unObjectHasSelf :: Phantoms.TTerm OwlSyntax.ObjectHasSelf -> Phantoms.TTerm OwlSyntax.ObjectPropertyExpression
-unObjectHasSelf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.ObjectHasSelf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unObjectIntersectionOf :: Phantoms.TTerm OwlSyntax.ObjectIntersectionOf -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-unObjectIntersectionOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.ObjectIntersectionOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unObjectOneOf :: Phantoms.TTerm OwlSyntax.ObjectOneOf -> Phantoms.TTerm [OwlSyntax.Individual]
-unObjectOneOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.ObjectOneOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unObjectProperty :: Phantoms.TTerm OwlSyntax.ObjectProperty -> Phantoms.TTerm ()
-unObjectProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.ObjectProperty")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unObjectUnionOf :: Phantoms.TTerm OwlSyntax.ObjectUnionOf -> Phantoms.TTerm [OwlSyntax.ClassExpression]
-unObjectUnionOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.owl.syntax.ObjectUnionOf")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Packaging.hs b/src/main/haskell/Hydra/Dsl/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Packaging.hs
+++ /dev/null
@@ -1,818 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.packaging
-
-module Hydra.Dsl.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-definitionTerm :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm Packaging.Definition
-definitionTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.packaging.Definition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-definitionType :: Phantoms.TTerm Packaging.TypeDefinition -> Phantoms.TTerm Packaging.Definition
-definitionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.packaging.Definition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-fileExtension :: Phantoms.TTerm String -> Phantoms.TTerm Packaging.FileExtension
-fileExtension x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.FileExtension"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-library :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm String -> Phantoms.TTerm [Graph.Primitive] -> Phantoms.TTerm Packaging.Library
-library namespace prefix primitives =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Library"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm prefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Phantoms.unTTerm primitives)}]}))
-libraryNamespace :: Phantoms.TTerm Packaging.Library -> Phantoms.TTerm Packaging.Namespace
-libraryNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-libraryPrefix :: Phantoms.TTerm Packaging.Library -> Phantoms.TTerm String
-libraryPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-        Core.projectionField = (Core.Name "prefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-libraryPrimitives :: Phantoms.TTerm Packaging.Library -> Phantoms.TTerm [Graph.Primitive]
-libraryPrimitives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-        Core.projectionField = (Core.Name "primitives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-libraryWithNamespace :: Phantoms.TTerm Packaging.Library -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Packaging.Library
-libraryWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Library"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-libraryWithPrefix :: Phantoms.TTerm Packaging.Library -> Phantoms.TTerm String -> Phantoms.TTerm Packaging.Library
-libraryWithPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Library"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-              Core.projectionField = (Core.Name "primitives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-libraryWithPrimitives :: Phantoms.TTerm Packaging.Library -> Phantoms.TTerm [Graph.Primitive] -> Phantoms.TTerm Packaging.Library
-libraryWithPrimitives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Library"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Library"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primitives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-module_ :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm [Packaging.Namespace] -> Phantoms.TTerm [Packaging.Namespace] -> Phantoms.TTerm [Packaging.Definition] -> Phantoms.TTerm Packaging.Module
-module_ description namespace termDependencies typeDependencies definitions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm termDependencies)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm typeDependencies)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Phantoms.unTTerm definitions)}]}))
-moduleDefinitions :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm [Packaging.Definition]
-moduleDefinitions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-        Core.projectionField = (Core.Name "definitions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleDescription :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm (Maybe String)
-moduleDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleNamespace :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm Packaging.Namespace
-moduleNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleTermDependencies :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm [Packaging.Namespace]
-moduleTermDependencies x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-        Core.projectionField = (Core.Name "termDependencies")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleTypeDependencies :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm [Packaging.Namespace]
-moduleTypeDependencies x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-        Core.projectionField = (Core.Name "typeDependencies")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-moduleWithDefinitions :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm [Packaging.Definition] -> Phantoms.TTerm Packaging.Module
-moduleWithDefinitions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "termDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "typeDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-moduleWithDescription :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Packaging.Module
-moduleWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "termDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "typeDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "definitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-moduleWithNamespace :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm Packaging.Module
-moduleWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "termDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "typeDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "definitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-moduleWithTermDependencies :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm [Packaging.Namespace] -> Phantoms.TTerm Packaging.Module
-moduleWithTermDependencies original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "typeDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "definitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-moduleWithTypeDependencies :: Phantoms.TTerm Packaging.Module -> Phantoms.TTerm [Packaging.Namespace] -> Phantoms.TTerm Packaging.Module
-moduleWithTypeDependencies original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "termDependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-              Core.projectionField = (Core.Name "definitions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-namespace :: Phantoms.TTerm String -> Phantoms.TTerm Packaging.Namespace
-namespace x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.Namespace"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-namespaces :: Phantoms.TTerm (Packaging.Namespace, n) -> Phantoms.TTerm (M.Map Packaging.Namespace n) -> Phantoms.TTerm (Packaging.Namespaces n)
-namespaces focus mapping =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Namespaces"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "focus"),
-          Core.fieldTerm = (Phantoms.unTTerm focus)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapping"),
-          Core.fieldTerm = (Phantoms.unTTerm mapping)}]}))
-namespacesFocus :: Phantoms.TTerm (Packaging.Namespaces n) -> Phantoms.TTerm (Packaging.Namespace, n)
-namespacesFocus x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Namespaces"),
-        Core.projectionField = (Core.Name "focus")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-namespacesMapping :: Phantoms.TTerm (Packaging.Namespaces n) -> Phantoms.TTerm (M.Map Packaging.Namespace n)
-namespacesMapping x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Namespaces"),
-        Core.projectionField = (Core.Name "mapping")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-namespacesWithFocus :: Phantoms.TTerm (Packaging.Namespaces n) -> Phantoms.TTerm (Packaging.Namespace, n) -> Phantoms.TTerm (Packaging.Namespaces n)
-namespacesWithFocus original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Namespaces"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "focus"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapping"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Namespaces"),
-              Core.projectionField = (Core.Name "mapping")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-namespacesWithMapping :: Phantoms.TTerm (Packaging.Namespaces n) -> Phantoms.TTerm (M.Map Packaging.Namespace n) -> Phantoms.TTerm (Packaging.Namespaces n)
-namespacesWithMapping original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Namespaces"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "focus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Namespaces"),
-              Core.projectionField = (Core.Name "focus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapping"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-package :: Phantoms.TTerm Packaging.PackageName -> Phantoms.TTerm [Packaging.Module] -> Phantoms.TTerm [Packaging.PackageName] -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Packaging.Package
-package name modules dependencies description =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm modules)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm dependencies)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)}]}))
-packageDependencies :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Packaging.PackageName]
-packageDependencies x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-        Core.projectionField = (Core.Name "dependencies")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-packageDescription :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm (Maybe String)
-packageDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-packageModules :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Packaging.Module]
-packageModules x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-        Core.projectionField = (Core.Name "modules")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-packageName :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm Packaging.PackageName
-packageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-packageName_ :: Phantoms.TTerm String -> Phantoms.TTerm Packaging.PackageName
-packageName_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.PackageName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-packageWithDependencies :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Packaging.PackageName] -> Phantoms.TTerm Packaging.Package
-packageWithDependencies original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-packageWithDescription :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Packaging.Package
-packageWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "dependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-packageWithModules :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Packaging.Module] -> Phantoms.TTerm Packaging.Package
-packageWithModules original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.packaging.Package"),
-              Core.projectionField = (Core.Name "dependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-packageWithName :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm Packaging.PackageName -> Phantoms.TTerm Packaging.Package
-packageWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "dependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-qualifiedName :: Phantoms.TTerm (Maybe Packaging.Namespace) -> Phantoms.TTerm String -> Phantoms.TTerm Packaging.QualifiedName
-qualifiedName namespace local =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm local)}]}))
-qualifiedNameLocal :: Phantoms.TTerm Packaging.QualifiedName -> Phantoms.TTerm String
-qualifiedNameLocal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-        Core.projectionField = (Core.Name "local")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-qualifiedNameNamespace :: Phantoms.TTerm Packaging.QualifiedName -> Phantoms.TTerm (Maybe Packaging.Namespace)
-qualifiedNameNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-qualifiedNameWithLocal :: Phantoms.TTerm Packaging.QualifiedName -> Phantoms.TTerm String -> Phantoms.TTerm Packaging.QualifiedName
-qualifiedNameWithLocal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-qualifiedNameWithNamespace :: Phantoms.TTerm Packaging.QualifiedName -> Phantoms.TTerm (Maybe Packaging.Namespace) -> Phantoms.TTerm Packaging.QualifiedName
-qualifiedNameWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-              Core.projectionField = (Core.Name "local")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termDefinition :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Packaging.TermDefinition
-termDefinition name term typeScheme =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm typeScheme)}]}))
-termDefinitionName :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm Core.Name
-termDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termDefinitionTerm :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm Core.Term
-termDefinitionTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termDefinitionTypeScheme :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm (Maybe Core.TypeScheme)
-termDefinitionTypeScheme x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-        Core.projectionField = (Core.Name "typeScheme")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-termDefinitionWithName :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.TermDefinition
-termDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termDefinitionWithTerm :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Packaging.TermDefinition
-termDefinitionWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termDefinitionWithTypeScheme :: Phantoms.TTerm Packaging.TermDefinition -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Packaging.TermDefinition
-termDefinitionWithTypeScheme original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeDefinition :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Packaging.TypeDefinition
-typeDefinition name typeScheme =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm typeScheme)}]}))
-typeDefinitionName :: Phantoms.TTerm Packaging.TypeDefinition -> Phantoms.TTerm Core.Name
-typeDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeDefinitionTypeScheme :: Phantoms.TTerm Packaging.TypeDefinition -> Phantoms.TTerm Core.TypeScheme
-typeDefinitionTypeScheme x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-        Core.projectionField = (Core.Name "typeScheme")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeDefinitionWithName :: Phantoms.TTerm Packaging.TypeDefinition -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.TypeDefinition
-typeDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-              Core.projectionField = (Core.Name "typeScheme")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeDefinitionWithTypeScheme :: Phantoms.TTerm Packaging.TypeDefinition -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Packaging.TypeDefinition
-typeDefinitionWithTypeScheme original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-unFileExtension :: Phantoms.TTerm Packaging.FileExtension -> Phantoms.TTerm String
-unFileExtension x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.packaging.FileExtension")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unNamespace :: Phantoms.TTerm Packaging.Namespace -> Phantoms.TTerm String
-unNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.packaging.Namespace")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unPackageName :: Phantoms.TTerm Packaging.PackageName -> Phantoms.TTerm String
-unPackageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.packaging.PackageName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Parquet/Format.hs b/src/main/haskell/Hydra/Dsl/Parquet/Format.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Parquet/Format.hs
+++ /dev/null
@@ -1,7335 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.parquet.format
-
-module Hydra.Dsl.Parquet.Format where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Parquet.Format as Format
-import qualified Hydra.Phantoms as Phantoms
-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
-
-aesGcmCtrV1 :: Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.AesGcmCtrV1
-aesGcmCtrV1 aadPrefix aadFileUnique supplyAadPrefix =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm aadPrefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Phantoms.unTTerm aadFileUnique)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm supplyAadPrefix)}]}))
-
-aesGcmCtrV1AadFileUnique :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm (Maybe B.ByteString)
-aesGcmCtrV1AadFileUnique x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-        Core.projectionField = (Core.Name "aadFileUnique")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aesGcmCtrV1AadPrefix :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm (Maybe B.ByteString)
-aesGcmCtrV1AadPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-        Core.projectionField = (Core.Name "aadPrefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aesGcmCtrV1SupplyAadPrefix :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm (Maybe Bool)
-aesGcmCtrV1SupplyAadPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-        Core.projectionField = (Core.Name "supplyAadPrefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aesGcmCtrV1WithAadFileUnique :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.AesGcmCtrV1
-aesGcmCtrV1WithAadFileUnique original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-              Core.projectionField = (Core.Name "aadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-              Core.projectionField = (Core.Name "supplyAadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aesGcmCtrV1WithAadPrefix :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.AesGcmCtrV1
-aesGcmCtrV1WithAadPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-              Core.projectionField = (Core.Name "aadFileUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-              Core.projectionField = (Core.Name "supplyAadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aesGcmCtrV1WithSupplyAadPrefix :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.AesGcmCtrV1
-aesGcmCtrV1WithSupplyAadPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-              Core.projectionField = (Core.Name "aadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmCtrV1"),
-              Core.projectionField = (Core.Name "aadFileUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-aesGcmV1 :: Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.AesGcmV1
-aesGcmV1 aadPrefix aadFileUnique supplyAadPrefix =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm aadPrefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Phantoms.unTTerm aadFileUnique)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm supplyAadPrefix)}]}))
-
-aesGcmV1AadFileUnique :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm (Maybe B.ByteString)
-aesGcmV1AadFileUnique x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-        Core.projectionField = (Core.Name "aadFileUnique")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aesGcmV1AadPrefix :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm (Maybe B.ByteString)
-aesGcmV1AadPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-        Core.projectionField = (Core.Name "aadPrefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aesGcmV1SupplyAadPrefix :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm (Maybe Bool)
-aesGcmV1SupplyAadPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-        Core.projectionField = (Core.Name "supplyAadPrefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-aesGcmV1WithAadFileUnique :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.AesGcmV1
-aesGcmV1WithAadFileUnique original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-              Core.projectionField = (Core.Name "aadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-              Core.projectionField = (Core.Name "supplyAadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aesGcmV1WithAadPrefix :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.AesGcmV1
-aesGcmV1WithAadPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-              Core.projectionField = (Core.Name "aadFileUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-              Core.projectionField = (Core.Name "supplyAadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-aesGcmV1WithSupplyAadPrefix :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.AesGcmV1
-aesGcmV1WithSupplyAadPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "aadPrefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-              Core.projectionField = (Core.Name "aadPrefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "aadFileUnique"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.AesGcmV1"),
-              Core.projectionField = (Core.Name "aadFileUnique")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supplyAadPrefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bloomFilterAlgorithmBlock :: Phantoms.TTerm Format.BloomFilterAlgorithm
-bloomFilterAlgorithmBlock =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterAlgorithm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-bloomFilterCompressionUncompressed :: Phantoms.TTerm Format.BloomFilterCompression
-bloomFilterCompressionUncompressed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterCompression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uncompressed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-bloomFilterHashXxhash :: Phantoms.TTerm Format.BloomFilterHash
-bloomFilterHashXxhash =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHash"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xxhash"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-bloomFilterHeader :: Phantoms.TTerm Int -> Phantoms.TTerm Format.BloomFilterAlgorithm -> Phantoms.TTerm Format.BloomFilterHash -> Phantoms.TTerm Format.BloomFilterCompression -> Phantoms.TTerm Format.BloomFilterHeader
-bloomFilterHeader numBytes algorithm hash compression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numBytes"),
-          Core.fieldTerm = (Phantoms.unTTerm numBytes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "algorithm"),
-          Core.fieldTerm = (Phantoms.unTTerm algorithm)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hash"),
-          Core.fieldTerm = (Phantoms.unTTerm hash)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compression"),
-          Core.fieldTerm = (Phantoms.unTTerm compression)}]}))
-
-bloomFilterHeaderAlgorithm :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Format.BloomFilterAlgorithm
-bloomFilterHeaderAlgorithm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-        Core.projectionField = (Core.Name "algorithm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bloomFilterHeaderCompression :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Format.BloomFilterCompression
-bloomFilterHeaderCompression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-        Core.projectionField = (Core.Name "compression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bloomFilterHeaderHash :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Format.BloomFilterHash
-bloomFilterHeaderHash x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-        Core.projectionField = (Core.Name "hash")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bloomFilterHeaderNumBytes :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Int
-bloomFilterHeaderNumBytes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-        Core.projectionField = (Core.Name "numBytes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bloomFilterHeaderWithAlgorithm :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Format.BloomFilterAlgorithm -> Phantoms.TTerm Format.BloomFilterHeader
-bloomFilterHeaderWithAlgorithm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numBytes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "numBytes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "algorithm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hash"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "hash")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "compression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bloomFilterHeaderWithCompression :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Format.BloomFilterCompression -> Phantoms.TTerm Format.BloomFilterHeader
-bloomFilterHeaderWithCompression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numBytes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "numBytes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "algorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "algorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hash"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "hash")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bloomFilterHeaderWithHash :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Format.BloomFilterHash -> Phantoms.TTerm Format.BloomFilterHeader
-bloomFilterHeaderWithHash original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numBytes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "numBytes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "algorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "algorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hash"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "compression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bloomFilterHeaderWithNumBytes :: Phantoms.TTerm Format.BloomFilterHeader -> Phantoms.TTerm Int -> Phantoms.TTerm Format.BloomFilterHeader
-bloomFilterHeaderWithNumBytes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numBytes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "algorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "algorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hash"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "hash")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.BloomFilterHeader"),
-              Core.projectionField = (Core.Name "compression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-boundaryOrderAscending :: Phantoms.TTerm Format.BoundaryOrder
-boundaryOrderAscending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.BoundaryOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-boundaryOrderDescending :: Phantoms.TTerm Format.BoundaryOrder
-boundaryOrderDescending =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.BoundaryOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "descending"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-boundaryOrderUnordered :: Phantoms.TTerm Format.BoundaryOrder
-boundaryOrderUnordered =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.BoundaryOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unordered"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-columnChunk :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm (Maybe Format.ColumnMetaData) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe Format.ColumnCryptoMetaData) -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.ColumnChunk
-columnChunk filePath fileOffset metaData offsetIndexOffset offsetIndexLength columnIndexOffset columnIndexLength cryptoMetadata encryptedColumnMetadata =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Phantoms.unTTerm filePath)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm fileOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Phantoms.unTTerm metaData)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm offsetIndexOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Phantoms.unTTerm offsetIndexLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm columnIndexOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Phantoms.unTTerm columnIndexLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm cryptoMetadata)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm encryptedColumnMetadata)}]}))
-
-columnChunkColumnIndexLength :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Int)
-columnChunkColumnIndexLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "columnIndexLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkColumnIndexOffset :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe I.Int64)
-columnChunkColumnIndexOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "columnIndexOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkCryptoMetadata :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Format.ColumnCryptoMetaData)
-columnChunkCryptoMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "cryptoMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkEncryptedColumnMetadata :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe B.ByteString)
-columnChunkEncryptedColumnMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkFileOffset :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm I.Int64
-columnChunkFileOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "fileOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkFilePath :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe String)
-columnChunkFilePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "filePath")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkMetaData :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Format.ColumnMetaData)
-columnChunkMetaData x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "metaData")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkOffsetIndexLength :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Int)
-columnChunkOffsetIndexLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "offsetIndexLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkOffsetIndexOffset :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe I.Int64)
-columnChunkOffsetIndexOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-        Core.projectionField = (Core.Name "offsetIndexOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnChunkWithColumnIndexLength :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithColumnIndexLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithColumnIndexOffset :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithColumnIndexOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithCryptoMetadata :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Format.ColumnCryptoMetaData) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithCryptoMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithEncryptedColumnMetadata :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithEncryptedColumnMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnChunkWithFileOffset :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithFileOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithFilePath :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithFilePath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithMetaData :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Format.ColumnMetaData) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithMetaData original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithOffsetIndexLength :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithOffsetIndexLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnChunkWithOffsetIndexOffset :: Phantoms.TTerm Format.ColumnChunk -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.ColumnChunk
-columnChunkWithOffsetIndexOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "filePath"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "filePath")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metaData"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "metaData")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "offsetIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "offsetIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIndexLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "columnIndexLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cryptoMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "cryptoMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptedColumnMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnChunk"),
-              Core.projectionField = (Core.Name "encryptedColumnMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnCryptoMetaDataEncryptionWithColumnKey :: Phantoms.TTerm Format.EncryptionWithColumnKey -> Phantoms.TTerm Format.ColumnCryptoMetaData
-columnCryptoMetaDataEncryptionWithColumnKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.ColumnCryptoMetaData"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "encryptionWithColumnKey"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnCryptoMetaDataEncryptionWithFooterKey :: Phantoms.TTerm Format.EncryptionWithFooterKey -> Phantoms.TTerm Format.ColumnCryptoMetaData
-columnCryptoMetaDataEncryptionWithFooterKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.ColumnCryptoMetaData"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "encryptionWithFooterKey"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnIndex :: Phantoms.TTerm [Bool] -> Phantoms.TTerm [B.ByteString] -> Phantoms.TTerm [B.ByteString] -> Phantoms.TTerm Format.BoundaryOrder -> Phantoms.TTerm (Maybe [I.Int64]) -> Phantoms.TTerm Format.ColumnIndex
-columnIndex nullPages minValues maxValues boundaryOrder nullCounts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPages"),
-          Core.fieldTerm = (Phantoms.unTTerm nullPages)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValues"),
-          Core.fieldTerm = (Phantoms.unTTerm minValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValues"),
-          Core.fieldTerm = (Phantoms.unTTerm maxValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundaryOrder"),
-          Core.fieldTerm = (Phantoms.unTTerm boundaryOrder)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCounts"),
-          Core.fieldTerm = (Phantoms.unTTerm nullCounts)}]}))
-
-columnIndexBoundaryOrder :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm Format.BoundaryOrder
-columnIndexBoundaryOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-        Core.projectionField = (Core.Name "boundaryOrder")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnIndexMaxValues :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm [B.ByteString]
-columnIndexMaxValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-        Core.projectionField = (Core.Name "maxValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnIndexMinValues :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm [B.ByteString]
-columnIndexMinValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-        Core.projectionField = (Core.Name "minValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnIndexNullCounts :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm (Maybe [I.Int64])
-columnIndexNullCounts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-        Core.projectionField = (Core.Name "nullCounts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnIndexNullPages :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm [Bool]
-columnIndexNullPages x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-        Core.projectionField = (Core.Name "nullPages")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnIndexWithBoundaryOrder :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm Format.BoundaryOrder -> Phantoms.TTerm Format.ColumnIndex
-columnIndexWithBoundaryOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullPages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "minValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "maxValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundaryOrder"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnIndexWithMaxValues :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm [B.ByteString] -> Phantoms.TTerm Format.ColumnIndex
-columnIndexWithMaxValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullPages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "minValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundaryOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "boundaryOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnIndexWithMinValues :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm [B.ByteString] -> Phantoms.TTerm Format.ColumnIndex
-columnIndexWithMinValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullPages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "maxValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundaryOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "boundaryOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnIndexWithNullCounts :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm (Maybe [I.Int64]) -> Phantoms.TTerm Format.ColumnIndex
-columnIndexWithNullCounts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPages"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullPages")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "minValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "maxValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundaryOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "boundaryOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCounts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnIndexWithNullPages :: Phantoms.TTerm Format.ColumnIndex -> Phantoms.TTerm [Bool] -> Phantoms.TTerm Format.ColumnIndex
-columnIndexWithNullPages original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullPages"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "minValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "maxValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundaryOrder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "boundaryOrder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCounts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnIndex"),
-              Core.projectionField = (Core.Name "nullCounts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaData :: Phantoms.TTerm Format.Type -> Phantoms.TTerm [Format.Encoding] -> Phantoms.TTerm [String] -> Phantoms.TTerm Format.CompressionCodec -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm (Maybe [Format.KeyValue]) -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe Format.Statistics) -> Phantoms.TTerm (Maybe [Format.PageEncodingStats]) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaData type_ encodings pathInSchema codec numValues totalUncompressedSize totalCompressedSize keyValueMetadata dataPageOffset indexPageOffset dictionaryPageOffset statistics encodingStats bloomFilterOffset =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Phantoms.unTTerm encodings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm pathInSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Phantoms.unTTerm codec)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm numValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Phantoms.unTTerm totalUncompressedSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Phantoms.unTTerm totalCompressedSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm keyValueMetadata)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm dataPageOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm indexPageOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm dictionaryPageOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Phantoms.unTTerm statistics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Phantoms.unTTerm encodingStats)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm bloomFilterOffset)}]}))
-
-columnMetaDataBloomFilterOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe I.Int64)
-columnMetaDataBloomFilterOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "bloomFilterOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataCodec :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm Format.CompressionCodec
-columnMetaDataCodec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "codec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataDataPageOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64
-columnMetaDataDataPageOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "dataPageOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataDictionaryPageOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe I.Int64)
-columnMetaDataDictionaryPageOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataEncodingStats :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe [Format.PageEncodingStats])
-columnMetaDataEncodingStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "encodingStats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataEncodings :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm [Format.Encoding]
-columnMetaDataEncodings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "encodings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataIndexPageOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe I.Int64)
-columnMetaDataIndexPageOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "indexPageOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataKeyValueMetadata :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe [Format.KeyValue])
-columnMetaDataKeyValueMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "keyValueMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataNumValues :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64
-columnMetaDataNumValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "numValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataPathInSchema :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm [String]
-columnMetaDataPathInSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "pathInSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataStatistics :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe Format.Statistics)
-columnMetaDataStatistics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "statistics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataTotalCompressedSize :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64
-columnMetaDataTotalCompressedSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "totalCompressedSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataTotalUncompressedSize :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64
-columnMetaDataTotalUncompressedSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "totalUncompressedSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataType :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm Format.Type
-columnMetaDataType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnMetaDataWithBloomFilterOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithBloomFilterOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnMetaDataWithCodec :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm Format.CompressionCodec -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithCodec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithDataPageOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithDataPageOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithDictionaryPageOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithDictionaryPageOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithEncodingStats :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe [Format.PageEncodingStats]) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithEncodingStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithEncodings :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm [Format.Encoding] -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithEncodings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithIndexPageOffset :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithIndexPageOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithKeyValueMetadata :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe [Format.KeyValue]) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithKeyValueMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithNumValues :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithNumValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithPathInSchema :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm [String] -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithPathInSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithStatistics :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm (Maybe Format.Statistics) -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithStatistics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithTotalCompressedSize :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithTotalCompressedSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithTotalUncompressedSize :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithTotalUncompressedSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnMetaDataWithType :: Phantoms.TTerm Format.ColumnMetaData -> Phantoms.TTerm Format.Type -> Phantoms.TTerm Format.ColumnMetaData
-columnMetaDataWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "codec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalUncompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalUncompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dataPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "indexPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "dictionaryPageOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodingStats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "encodingStats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bloomFilterOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.ColumnMetaData"),
-              Core.projectionField = (Core.Name "bloomFilterOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnOrderTypeOrder :: Phantoms.TTerm Format.ColumnOrder
-columnOrderTypeOrder =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.ColumnOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeOrder"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecBrotli :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecBrotli =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "brotli"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecGzip :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecGzip =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gzip"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecLz4Raw :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecLz4Raw =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lz4Raw"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecLzo :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecLzo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lzo"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecSnappy :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecSnappy =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "snappy"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecUncompressed :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecUncompressed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uncompressed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compressionCodecZstd :: Phantoms.TTerm Format.CompressionCodec
-compressionCodecZstd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.CompressionCodec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zstd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dataPageHeader :: Phantoms.TTerm Int -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm (Maybe Format.Statistics) -> Phantoms.TTerm Format.DataPageHeader
-dataPageHeader numValues encoding definitionLevelEncoding repetitionLevelEncoding statistics =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm numValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm encoding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelEncoding"),
-          Core.fieldTerm = (Phantoms.unTTerm definitionLevelEncoding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelEncoding"),
-          Core.fieldTerm = (Phantoms.unTTerm repetitionLevelEncoding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Phantoms.unTTerm statistics)}]}))
-
-dataPageHeaderDefinitionLevelEncoding :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Format.Encoding
-dataPageHeaderDefinitionLevelEncoding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-        Core.projectionField = (Core.Name "definitionLevelEncoding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderEncoding :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Format.Encoding
-dataPageHeaderEncoding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-        Core.projectionField = (Core.Name "encoding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderNumValues :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Int
-dataPageHeaderNumValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-        Core.projectionField = (Core.Name "numValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderRepetitionLevelEncoding :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Format.Encoding
-dataPageHeaderRepetitionLevelEncoding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-        Core.projectionField = (Core.Name "repetitionLevelEncoding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderStatistics :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm (Maybe Format.Statistics)
-dataPageHeaderStatistics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-        Core.projectionField = (Core.Name "statistics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2 :: Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm (Maybe Format.Statistics) -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2 numValues numNulls numRows encoding definitionLevelsByteLength repetitionLevelsByteLength isCompressed statistics =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm numValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Phantoms.unTTerm numNulls)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Phantoms.unTTerm numRows)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm encoding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Phantoms.unTTerm definitionLevelsByteLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Phantoms.unTTerm repetitionLevelsByteLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Phantoms.unTTerm isCompressed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Phantoms.unTTerm statistics)}]}))
-
-dataPageHeaderV2DefinitionLevelsByteLength :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int
-dataPageHeaderV2DefinitionLevelsByteLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2Encoding :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Format.Encoding
-dataPageHeaderV2Encoding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "encoding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2IsCompressed :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm (Maybe Bool)
-dataPageHeaderV2IsCompressed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "isCompressed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2NumNulls :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int
-dataPageHeaderV2NumNulls x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "numNulls")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2NumRows :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int
-dataPageHeaderV2NumRows x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "numRows")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2NumValues :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int
-dataPageHeaderV2NumValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "numValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2RepetitionLevelsByteLength :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int
-dataPageHeaderV2RepetitionLevelsByteLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2Statistics :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm (Maybe Format.Statistics)
-dataPageHeaderV2Statistics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-        Core.projectionField = (Core.Name "statistics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataPageHeaderV2WithDefinitionLevelsByteLength :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithDefinitionLevelsByteLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithEncoding :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithEncoding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithIsCompressed :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithIsCompressed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithNumNulls :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithNumNulls original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithNumRows :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithNumRows original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithNumValues :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithNumValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithRepetitionLevelsByteLength :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithRepetitionLevelsByteLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderV2WithStatistics :: Phantoms.TTerm Format.DataPageHeaderV2 -> Phantoms.TTerm (Maybe Format.Statistics) -> Phantoms.TTerm Format.DataPageHeaderV2
-dataPageHeaderV2WithStatistics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numNulls"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numNulls")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "definitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelsByteLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "repetitionLevelsByteLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isCompressed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeaderV2"),
-              Core.projectionField = (Core.Name "isCompressed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataPageHeaderWithDefinitionLevelEncoding :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.DataPageHeader
-dataPageHeaderWithDefinitionLevelEncoding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelEncoding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "repetitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderWithEncoding :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.DataPageHeader
-dataPageHeaderWithEncoding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "definitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "repetitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderWithNumValues :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DataPageHeader
-dataPageHeaderWithNumValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "definitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "repetitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderWithRepetitionLevelEncoding :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.DataPageHeader
-dataPageHeaderWithRepetitionLevelEncoding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "definitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelEncoding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "statistics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataPageHeaderWithStatistics :: Phantoms.TTerm Format.DataPageHeader -> Phantoms.TTerm (Maybe Format.Statistics) -> Phantoms.TTerm Format.DataPageHeader
-dataPageHeaderWithStatistics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "definitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionLevelEncoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DataPageHeader"),
-              Core.projectionField = (Core.Name "repetitionLevelEncoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statistics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decimalType :: Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DecimalType
-decimalType scale precision =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Phantoms.unTTerm scale)},
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)}]}))
-
-decimalTypePrecision :: Phantoms.TTerm Format.DecimalType -> Phantoms.TTerm Int
-decimalTypePrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-        Core.projectionField = (Core.Name "precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decimalTypeScale :: Phantoms.TTerm Format.DecimalType -> Phantoms.TTerm Int
-decimalTypeScale x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-        Core.projectionField = (Core.Name "scale")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decimalTypeWithPrecision :: Phantoms.TTerm Format.DecimalType -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DecimalType
-decimalTypeWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-              Core.projectionField = (Core.Name "scale")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decimalTypeWithScale :: Phantoms.TTerm Format.DecimalType -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DecimalType
-decimalTypeWithScale original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scale"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DecimalType"),
-              Core.projectionField = (Core.Name "precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dictionaryPageHeader :: Phantoms.TTerm Int -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.DictionaryPageHeader
-dictionaryPageHeader numValues encoding isSorted =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm numValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm encoding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSorted"),
-          Core.fieldTerm = (Phantoms.unTTerm isSorted)}]}))
-
-dictionaryPageHeaderEncoding :: Phantoms.TTerm Format.DictionaryPageHeader -> Phantoms.TTerm Format.Encoding
-dictionaryPageHeaderEncoding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-        Core.projectionField = (Core.Name "encoding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dictionaryPageHeaderIsSorted :: Phantoms.TTerm Format.DictionaryPageHeader -> Phantoms.TTerm (Maybe Bool)
-dictionaryPageHeaderIsSorted x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-        Core.projectionField = (Core.Name "isSorted")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dictionaryPageHeaderNumValues :: Phantoms.TTerm Format.DictionaryPageHeader -> Phantoms.TTerm Int
-dictionaryPageHeaderNumValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-        Core.projectionField = (Core.Name "numValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dictionaryPageHeaderWithEncoding :: Phantoms.TTerm Format.DictionaryPageHeader -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.DictionaryPageHeader
-dictionaryPageHeaderWithEncoding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSorted"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-              Core.projectionField = (Core.Name "isSorted")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dictionaryPageHeaderWithIsSorted :: Phantoms.TTerm Format.DictionaryPageHeader -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Format.DictionaryPageHeader
-dictionaryPageHeaderWithIsSorted original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-              Core.projectionField = (Core.Name "numValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSorted"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dictionaryPageHeaderWithNumValues :: Phantoms.TTerm Format.DictionaryPageHeader -> Phantoms.TTerm Int -> Phantoms.TTerm Format.DictionaryPageHeader
-dictionaryPageHeaderWithNumValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "numValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSorted"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.DictionaryPageHeader"),
-              Core.projectionField = (Core.Name "isSorted")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-encodingBitPacked :: Phantoms.TTerm Format.Encoding
-encodingBitPacked =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitPacked"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingByteStreamSplit :: Phantoms.TTerm Format.Encoding
-encodingByteStreamSplit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byteStreamSplit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingDeltaBinaryPacked :: Phantoms.TTerm Format.Encoding
-encodingDeltaBinaryPacked =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "deltaBinaryPacked"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingDeltaByteArray :: Phantoms.TTerm Format.Encoding
-encodingDeltaByteArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "deltaByteArray"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingDeltaLengthByteArray :: Phantoms.TTerm Format.Encoding
-encodingDeltaLengthByteArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "deltaLengthByteArray"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingPlain :: Phantoms.TTerm Format.Encoding
-encodingPlain =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plain"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingRle :: Phantoms.TTerm Format.Encoding
-encodingRle =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rle"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encodingRleDictionary :: Phantoms.TTerm Format.Encoding
-encodingRleDictionary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Encoding"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rleDictionary"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-encryptionAlgorithmAesGcmCtrV1 :: Phantoms.TTerm Format.AesGcmCtrV1 -> Phantoms.TTerm Format.EncryptionAlgorithm
-encryptionAlgorithmAesGcmCtrV1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.EncryptionAlgorithm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aesGcmCtrV1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-encryptionAlgorithmAesGcmV1 :: Phantoms.TTerm Format.AesGcmV1 -> Phantoms.TTerm Format.EncryptionAlgorithm
-encryptionAlgorithmAesGcmV1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.EncryptionAlgorithm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aesGcmV1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-encryptionWithColumnKey :: Phantoms.TTerm [String] -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.EncryptionWithColumnKey
-encryptionWithColumnKey pathInSchema keyMetadata =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm pathInSchema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm keyMetadata)}]}))
-
-encryptionWithColumnKeyKeyMetadata :: Phantoms.TTerm Format.EncryptionWithColumnKey -> Phantoms.TTerm (Maybe B.ByteString)
-encryptionWithColumnKeyKeyMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-        Core.projectionField = (Core.Name "keyMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-encryptionWithColumnKeyPathInSchema :: Phantoms.TTerm Format.EncryptionWithColumnKey -> Phantoms.TTerm [String]
-encryptionWithColumnKeyPathInSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-        Core.projectionField = (Core.Name "pathInSchema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-encryptionWithColumnKeyWithKeyMetadata :: Phantoms.TTerm Format.EncryptionWithColumnKey -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.EncryptionWithColumnKey
-encryptionWithColumnKeyWithKeyMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-              Core.projectionField = (Core.Name "pathInSchema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-encryptionWithColumnKeyWithPathInSchema :: Phantoms.TTerm Format.EncryptionWithColumnKey -> Phantoms.TTerm [String] -> Phantoms.TTerm Format.EncryptionWithColumnKey
-encryptionWithColumnKeyWithPathInSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pathInSchema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.EncryptionWithColumnKey"),
-              Core.projectionField = (Core.Name "keyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-encryptionWithFooterKey :: Phantoms.TTerm Format.EncryptionWithFooterKey
-encryptionWithFooterKey =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.EncryptionWithFooterKey"),
-      Core.recordFields = []}))
-
-fieldRepetitionTypeOptional :: Phantoms.TTerm Format.FieldRepetitionType
-fieldRepetitionTypeOptional =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.FieldRepetitionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "optional"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldRepetitionTypeRepeated :: Phantoms.TTerm Format.FieldRepetitionType
-fieldRepetitionTypeRepeated =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.FieldRepetitionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeated"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fieldRepetitionTypeRequired :: Phantoms.TTerm Format.FieldRepetitionType
-fieldRepetitionTypeRequired =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.FieldRepetitionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "required"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-fileCryptoMetaData :: Phantoms.TTerm Format.EncryptionAlgorithm -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.FileCryptoMetaData
-fileCryptoMetaData encryptionAlgorithm keyMetadata =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Phantoms.unTTerm encryptionAlgorithm)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm keyMetadata)}]}))
-
-fileCryptoMetaDataEncryptionAlgorithm :: Phantoms.TTerm Format.FileCryptoMetaData -> Phantoms.TTerm Format.EncryptionAlgorithm
-fileCryptoMetaDataEncryptionAlgorithm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-        Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileCryptoMetaDataKeyMetadata :: Phantoms.TTerm Format.FileCryptoMetaData -> Phantoms.TTerm (Maybe B.ByteString)
-fileCryptoMetaDataKeyMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-        Core.projectionField = (Core.Name "keyMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileCryptoMetaDataWithEncryptionAlgorithm :: Phantoms.TTerm Format.FileCryptoMetaData -> Phantoms.TTerm Format.EncryptionAlgorithm -> Phantoms.TTerm Format.FileCryptoMetaData
-fileCryptoMetaDataWithEncryptionAlgorithm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-              Core.projectionField = (Core.Name "keyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileCryptoMetaDataWithKeyMetadata :: Phantoms.TTerm Format.FileCryptoMetaData -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.FileCryptoMetaData
-fileCryptoMetaDataWithKeyMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileCryptoMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fileMetaData :: Phantoms.TTerm Int -> Phantoms.TTerm [Format.SchemaElement] -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm [Format.RowGroup] -> Phantoms.TTerm (Maybe [Format.KeyValue]) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe [Format.ColumnOrder]) -> Phantoms.TTerm (Maybe Format.EncryptionAlgorithm) -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.FileMetaData
-fileMetaData version schema numRows rowGroups keyValueMetadata createdBy columnOrders encryptionAlgorithm footerSigningKeyMetadata =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Phantoms.unTTerm version)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm schema)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Phantoms.unTTerm numRows)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Phantoms.unTTerm rowGroups)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm keyValueMetadata)},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Phantoms.unTTerm createdBy)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Phantoms.unTTerm columnOrders)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Phantoms.unTTerm encryptionAlgorithm)},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm footerSigningKeyMetadata)}]}))
-
-fileMetaDataColumnOrders :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe [Format.ColumnOrder])
-fileMetaDataColumnOrders x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "columnOrders")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataCreatedBy :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe String)
-fileMetaDataCreatedBy x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "createdBy")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataEncryptionAlgorithm :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe Format.EncryptionAlgorithm)
-fileMetaDataEncryptionAlgorithm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataFooterSigningKeyMetadata :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe B.ByteString)
-fileMetaDataFooterSigningKeyMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataKeyValueMetadata :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe [Format.KeyValue])
-fileMetaDataKeyValueMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "keyValueMetadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataNumRows :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm I.Int64
-fileMetaDataNumRows x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "numRows")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataRowGroups :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm [Format.RowGroup]
-fileMetaDataRowGroups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "rowGroups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataSchema :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm [Format.SchemaElement]
-fileMetaDataSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "schema")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataVersion :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm Int
-fileMetaDataVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-        Core.projectionField = (Core.Name "version")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fileMetaDataWithColumnOrders :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe [Format.ColumnOrder]) -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithColumnOrders original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithCreatedBy :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithCreatedBy original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithEncryptionAlgorithm :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe Format.EncryptionAlgorithm) -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithEncryptionAlgorithm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithFooterSigningKeyMetadata :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithFooterSigningKeyMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fileMetaDataWithKeyValueMetadata :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm (Maybe [Format.KeyValue]) -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithKeyValueMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithNumRows :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithNumRows original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithRowGroups :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm [Format.RowGroup] -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithRowGroups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithSchema :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm [Format.SchemaElement] -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithSchema original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileMetaDataWithVersion :: Phantoms.TTerm Format.FileMetaData -> Phantoms.TTerm Int -> Phantoms.TTerm Format.FileMetaData
-fileMetaDataWithVersion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schema"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "schema")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rowGroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "rowGroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyValueMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "keyValueMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "createdBy"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "createdBy")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnOrders"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "columnOrders")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encryptionAlgorithm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "encryptionAlgorithm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "footerSigningKeyMetadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.FileMetaData"),
-              Core.projectionField = (Core.Name "footerSigningKeyMetadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-indexPageHeader :: Phantoms.TTerm Format.IndexPageHeader
-indexPageHeader =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.IndexPageHeader"),
-      Core.recordFields = []}))
-
-intType :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.IntType
-intType bitWidth isSigned =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.IntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bitWidth"),
-          Core.fieldTerm = (Phantoms.unTTerm bitWidth)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSigned"),
-          Core.fieldTerm = (Phantoms.unTTerm isSigned)}]}))
-
-intTypeBitWidth :: Phantoms.TTerm Format.IntType -> Phantoms.TTerm I.Int16
-intTypeBitWidth x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.IntType"),
-        Core.projectionField = (Core.Name "bitWidth")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-intTypeIsSigned :: Phantoms.TTerm Format.IntType -> Phantoms.TTerm Bool
-intTypeIsSigned x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.IntType"),
-        Core.projectionField = (Core.Name "isSigned")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-intTypeWithBitWidth :: Phantoms.TTerm Format.IntType -> Phantoms.TTerm I.Int16 -> Phantoms.TTerm Format.IntType
-intTypeWithBitWidth original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.IntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bitWidth"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSigned"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.IntType"),
-              Core.projectionField = (Core.Name "isSigned")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-intTypeWithIsSigned :: Phantoms.TTerm Format.IntType -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.IntType
-intTypeWithIsSigned original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.IntType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bitWidth"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.IntType"),
-              Core.projectionField = (Core.Name "bitWidth")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "isSigned"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-keyValue :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Format.KeyValue
-keyValue key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.KeyValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-keyValueKey :: Phantoms.TTerm Format.KeyValue -> Phantoms.TTerm String
-keyValueKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.KeyValue"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValueValue :: Phantoms.TTerm Format.KeyValue -> Phantoms.TTerm (Maybe String)
-keyValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.KeyValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValueWithKey :: Phantoms.TTerm Format.KeyValue -> Phantoms.TTerm String -> Phantoms.TTerm Format.KeyValue
-keyValueWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.KeyValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.parquet.format.KeyValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keyValueWithValue :: Phantoms.TTerm Format.KeyValue -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Format.KeyValue
-keyValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.KeyValue"),
-      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.parquet.format.KeyValue"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-logicalTypeBson :: Phantoms.TTerm Format.LogicalType
-logicalTypeBson =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bson"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeDate :: Phantoms.TTerm Format.LogicalType
-logicalTypeDate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeDecimal :: Phantoms.TTerm Format.DecimalType -> Phantoms.TTerm Format.LogicalType
-logicalTypeDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalTypeEnum :: Phantoms.TTerm Format.LogicalType
-logicalTypeEnum =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeInteger :: Phantoms.TTerm Format.IntType -> Phantoms.TTerm Format.LogicalType
-logicalTypeInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalTypeJson :: Phantoms.TTerm Format.LogicalType
-logicalTypeJson =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "json"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeList :: Phantoms.TTerm Format.LogicalType
-logicalTypeList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeMap :: Phantoms.TTerm Format.LogicalType
-logicalTypeMap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeString :: Phantoms.TTerm Format.LogicalType
-logicalTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeTime :: Phantoms.TTerm Format.TimeType -> Phantoms.TTerm Format.LogicalType
-logicalTypeTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "time"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalTypeTimestamp :: Phantoms.TTerm Format.TimestampType -> Phantoms.TTerm Format.LogicalType
-logicalTypeTimestamp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timestamp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-logicalTypeUnknown :: Phantoms.TTerm Format.LogicalType
-logicalTypeUnknown =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unknown"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-logicalTypeUuid :: Phantoms.TTerm Format.LogicalType
-logicalTypeUuid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.LogicalType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uuid"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-offsetIndex :: Phantoms.TTerm [Format.PageLocation] -> Phantoms.TTerm Format.OffsetIndex
-offsetIndex pageLocations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.OffsetIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pageLocations"),
-          Core.fieldTerm = (Phantoms.unTTerm pageLocations)}]}))
-
-offsetIndexPageLocations :: Phantoms.TTerm Format.OffsetIndex -> Phantoms.TTerm [Format.PageLocation]
-offsetIndexPageLocations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.OffsetIndex"),
-        Core.projectionField = (Core.Name "pageLocations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-offsetIndexWithPageLocations :: Phantoms.TTerm Format.OffsetIndex -> Phantoms.TTerm [Format.PageLocation] -> Phantoms.TTerm Format.OffsetIndex
-offsetIndexWithPageLocations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.OffsetIndex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pageLocations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pageEncodingStats :: Phantoms.TTerm Format.PageType -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Int -> Phantoms.TTerm Format.PageEncodingStats
-pageEncodingStats pageType encoding count =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pageType"),
-          Core.fieldTerm = (Phantoms.unTTerm pageType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm encoding)},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm count)}]}))
-
-pageEncodingStatsCount :: Phantoms.TTerm Format.PageEncodingStats -> Phantoms.TTerm Int
-pageEncodingStatsCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-        Core.projectionField = (Core.Name "count")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageEncodingStatsEncoding :: Phantoms.TTerm Format.PageEncodingStats -> Phantoms.TTerm Format.Encoding
-pageEncodingStatsEncoding x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-        Core.projectionField = (Core.Name "encoding")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageEncodingStatsPageType :: Phantoms.TTerm Format.PageEncodingStats -> Phantoms.TTerm Format.PageType
-pageEncodingStatsPageType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-        Core.projectionField = (Core.Name "pageType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageEncodingStatsWithCount :: Phantoms.TTerm Format.PageEncodingStats -> Phantoms.TTerm Int -> Phantoms.TTerm Format.PageEncodingStats
-pageEncodingStatsWithCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pageType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-              Core.projectionField = (Core.Name "pageType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pageEncodingStatsWithEncoding :: Phantoms.TTerm Format.PageEncodingStats -> Phantoms.TTerm Format.Encoding -> Phantoms.TTerm Format.PageEncodingStats
-pageEncodingStatsWithEncoding original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pageType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-              Core.projectionField = (Core.Name "pageType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageEncodingStatsWithPageType :: Phantoms.TTerm Format.PageEncodingStats -> Phantoms.TTerm Format.PageType -> Phantoms.TTerm Format.PageEncodingStats
-pageEncodingStatsWithPageType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pageType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encoding"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-              Core.projectionField = (Core.Name "encoding")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "count"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageEncodingStats"),
-              Core.projectionField = (Core.Name "count")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeader :: Phantoms.TTerm Format.PageType -> Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe Format.DataPageHeader) -> Phantoms.TTerm (Maybe Format.IndexPageHeader) -> Phantoms.TTerm (Maybe Format.DictionaryPageHeader) -> Phantoms.TTerm (Maybe Format.DataPageHeaderV2) -> Phantoms.TTerm Format.PageHeader
-pageHeader type_ uncompressedPageSize compressedPageSize crc dataPageHeader indexPageHeader dictionaryPageHeader dataPageHeaderV2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Phantoms.unTTerm uncompressedPageSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Phantoms.unTTerm compressedPageSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Phantoms.unTTerm crc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Phantoms.unTTerm dataPageHeader)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Phantoms.unTTerm indexPageHeader)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Phantoms.unTTerm dictionaryPageHeader)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Phantoms.unTTerm dataPageHeaderV2)}]}))
-
-pageHeaderCompressedPageSize :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm Int
-pageHeaderCompressedPageSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "compressedPageSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderCrc :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Int)
-pageHeaderCrc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "crc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderDataPageHeader :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.DataPageHeader)
-pageHeaderDataPageHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "dataPageHeader")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderDataPageHeaderV2 :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.DataPageHeaderV2)
-pageHeaderDataPageHeaderV2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderDictionaryPageHeader :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.DictionaryPageHeader)
-pageHeaderDictionaryPageHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderIndexPageHeader :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.IndexPageHeader)
-pageHeaderIndexPageHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "indexPageHeader")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderType :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm Format.PageType
-pageHeaderType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderUncompressedPageSize :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm Int
-pageHeaderUncompressedPageSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-        Core.projectionField = (Core.Name "uncompressedPageSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageHeaderWithCompressedPageSize :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm Int -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithCompressedPageSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeaderWithCrc :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithCrc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeaderWithDataPageHeader :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.DataPageHeader) -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithDataPageHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeaderWithDataPageHeaderV2 :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.DataPageHeaderV2) -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithDataPageHeaderV2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pageHeaderWithDictionaryPageHeader :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.DictionaryPageHeader) -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithDictionaryPageHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeaderWithIndexPageHeader :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm (Maybe Format.IndexPageHeader) -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithIndexPageHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeaderWithType :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm Format.PageType -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "uncompressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageHeaderWithUncompressedPageSize :: Phantoms.TTerm Format.PageHeader -> Phantoms.TTerm Int -> Phantoms.TTerm Format.PageHeader
-pageHeaderWithUncompressedPageSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "uncompressedPageSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "crc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "crc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indexPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "indexPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dictionaryPageHeader"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dictionaryPageHeader")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dataPageHeaderV2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageHeader"),
-              Core.projectionField = (Core.Name "dataPageHeaderV2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageLocation :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Int -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.PageLocation
-pageLocation offset compressedPageSize firstRowIndex =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm offset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Phantoms.unTTerm compressedPageSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "firstRowIndex"),
-          Core.fieldTerm = (Phantoms.unTTerm firstRowIndex)}]}))
-
-pageLocationCompressedPageSize :: Phantoms.TTerm Format.PageLocation -> Phantoms.TTerm Int
-pageLocationCompressedPageSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-        Core.projectionField = (Core.Name "compressedPageSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageLocationFirstRowIndex :: Phantoms.TTerm Format.PageLocation -> Phantoms.TTerm I.Int64
-pageLocationFirstRowIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-        Core.projectionField = (Core.Name "firstRowIndex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageLocationOffset :: Phantoms.TTerm Format.PageLocation -> Phantoms.TTerm I.Int64
-pageLocationOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-        Core.projectionField = (Core.Name "offset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pageLocationWithCompressedPageSize :: Phantoms.TTerm Format.PageLocation -> Phantoms.TTerm Int -> Phantoms.TTerm Format.PageLocation
-pageLocationWithCompressedPageSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "firstRowIndex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-              Core.projectionField = (Core.Name "firstRowIndex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageLocationWithFirstRowIndex :: Phantoms.TTerm Format.PageLocation -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.PageLocation
-pageLocationWithFirstRowIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-              Core.projectionField = (Core.Name "offset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "firstRowIndex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pageLocationWithOffset :: Phantoms.TTerm Format.PageLocation -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.PageLocation
-pageLocationWithOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "offset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "compressedPageSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-              Core.projectionField = (Core.Name "compressedPageSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "firstRowIndex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.PageLocation"),
-              Core.projectionField = (Core.Name "firstRowIndex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pageTypeDataPage :: Phantoms.TTerm Format.PageType
-pageTypeDataPage =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.PageType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataPage"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pageTypeDataPageV2 :: Phantoms.TTerm Format.PageType
-pageTypeDataPageV2 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.PageType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dataPageV2"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pageTypeDictionaryPage :: Phantoms.TTerm Format.PageType
-pageTypeDictionaryPage =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.PageType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dictionaryPage"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pageTypeIndexPage :: Phantoms.TTerm Format.PageType
-pageTypeIndexPage =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.PageType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indexPage"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-rowGroup :: Phantoms.TTerm [Format.ColumnChunk] -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm (Maybe [Format.SortingColumn]) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm (Maybe I.Int16) -> Phantoms.TTerm Format.RowGroup
-rowGroup columns totalByteSize numRows sortingColumns fileOffset totalCompressedSize ordinal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm columns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Phantoms.unTTerm totalByteSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Phantoms.unTTerm numRows)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Phantoms.unTTerm sortingColumns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm fileOffset)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Phantoms.unTTerm totalCompressedSize)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Phantoms.unTTerm ordinal)}]}))
-
-rowGroupColumns :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm [Format.ColumnChunk]
-rowGroupColumns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "columns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupFileOffset :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe I.Int64)
-rowGroupFileOffset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "fileOffset")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupNumRows :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm I.Int64
-rowGroupNumRows x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "numRows")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupOrdinal :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe I.Int16)
-rowGroupOrdinal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "ordinal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupSortingColumns :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe [Format.SortingColumn])
-rowGroupSortingColumns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "sortingColumns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupTotalByteSize :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm I.Int64
-rowGroupTotalByteSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "totalByteSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupTotalCompressedSize :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe I.Int64)
-rowGroupTotalCompressedSize x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-        Core.projectionField = (Core.Name "totalCompressedSize")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rowGroupWithColumns :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm [Format.ColumnChunk] -> Phantoms.TTerm Format.RowGroup
-rowGroupWithColumns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalByteSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "sortingColumns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "ordinal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rowGroupWithFileOffset :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.RowGroup
-rowGroupWithFileOffset original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalByteSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "sortingColumns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "ordinal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rowGroupWithNumRows :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.RowGroup
-rowGroupWithNumRows original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalByteSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "sortingColumns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "ordinal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rowGroupWithOrdinal :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe I.Int16) -> Phantoms.TTerm Format.RowGroup
-rowGroupWithOrdinal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalByteSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "sortingColumns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rowGroupWithSortingColumns :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe [Format.SortingColumn]) -> Phantoms.TTerm Format.RowGroup
-rowGroupWithSortingColumns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalByteSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "ordinal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rowGroupWithTotalByteSize :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm I.Int64 -> Phantoms.TTerm Format.RowGroup
-rowGroupWithTotalByteSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "sortingColumns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalCompressedSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "ordinal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rowGroupWithTotalCompressedSize :: Phantoms.TTerm Format.RowGroup -> Phantoms.TTerm (Maybe I.Int64) -> Phantoms.TTerm Format.RowGroup
-rowGroupWithTotalCompressedSize original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalByteSize"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "totalByteSize")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numRows"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "numRows")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sortingColumns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "sortingColumns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fileOffset"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "fileOffset")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "totalCompressedSize"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ordinal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.RowGroup"),
-              Core.projectionField = (Core.Name "ordinal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaElement :: Phantoms.TTerm (Maybe Format.Type) -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe Format.FieldRepetitionType) -> Phantoms.TTerm String -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm (Maybe Format.LogicalType) -> Phantoms.TTerm Format.SchemaElement
-schemaElement type_ typeLength repetitionType name numChildren fieldId logicalType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Phantoms.unTTerm typeLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Phantoms.unTTerm repetitionType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Phantoms.unTTerm numChildren)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Phantoms.unTTerm fieldId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Phantoms.unTTerm logicalType)}]}))
-
-schemaElementFieldId :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Int)
-schemaElementFieldId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "fieldId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementLogicalType :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Format.LogicalType)
-schemaElementLogicalType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "logicalType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementName :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm String
-schemaElementName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementNumChildren :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Int)
-schemaElementNumChildren x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "numChildren")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementRepetitionType :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Format.FieldRepetitionType)
-schemaElementRepetitionType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "repetitionType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementType :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Format.Type)
-schemaElementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementTypeLength :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Int)
-schemaElementTypeLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-        Core.projectionField = (Core.Name "typeLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaElementWithFieldId :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithFieldId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "typeLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "repetitionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "numChildren")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "logicalType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaElementWithLogicalType :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Format.LogicalType) -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithLogicalType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "typeLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "repetitionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "numChildren")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "fieldId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaElementWithName :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm String -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "typeLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "repetitionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "numChildren")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "fieldId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "logicalType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaElementWithNumChildren :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithNumChildren original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "typeLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "repetitionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "fieldId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "logicalType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaElementWithRepetitionType :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Format.FieldRepetitionType) -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithRepetitionType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "typeLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "numChildren")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "fieldId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "logicalType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaElementWithType :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Format.Type) -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "typeLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "repetitionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "numChildren")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "fieldId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "logicalType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaElementWithTypeLength :: Phantoms.TTerm Format.SchemaElement -> Phantoms.TTerm (Maybe Int) -> Phantoms.TTerm Format.SchemaElement
-schemaElementWithTypeLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "repetitionType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "repetitionType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "numChildren"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "numChildren")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "fieldId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "logicalType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SchemaElement"),
-              Core.projectionField = (Core.Name "logicalType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sortingColumn :: Phantoms.TTerm Int -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.SortingColumn
-sortingColumn columnIdx descending nullsFirst =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIdx"),
-          Core.fieldTerm = (Phantoms.unTTerm columnIdx)},
-        Core.Field {
-          Core.fieldName = (Core.Name "descending"),
-          Core.fieldTerm = (Phantoms.unTTerm descending)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullsFirst"),
-          Core.fieldTerm = (Phantoms.unTTerm nullsFirst)}]}))
-
-sortingColumnColumnIdx :: Phantoms.TTerm Format.SortingColumn -> Phantoms.TTerm Int
-sortingColumnColumnIdx x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-        Core.projectionField = (Core.Name "columnIdx")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortingColumnDescending :: Phantoms.TTerm Format.SortingColumn -> Phantoms.TTerm Bool
-sortingColumnDescending x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-        Core.projectionField = (Core.Name "descending")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortingColumnNullsFirst :: Phantoms.TTerm Format.SortingColumn -> Phantoms.TTerm Bool
-sortingColumnNullsFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-        Core.projectionField = (Core.Name "nullsFirst")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sortingColumnWithColumnIdx :: Phantoms.TTerm Format.SortingColumn -> Phantoms.TTerm Int -> Phantoms.TTerm Format.SortingColumn
-sortingColumnWithColumnIdx original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIdx"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "descending"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-              Core.projectionField = (Core.Name "descending")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullsFirst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-              Core.projectionField = (Core.Name "nullsFirst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sortingColumnWithDescending :: Phantoms.TTerm Format.SortingColumn -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.SortingColumn
-sortingColumnWithDescending original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIdx"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-              Core.projectionField = (Core.Name "columnIdx")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "descending"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullsFirst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-              Core.projectionField = (Core.Name "nullsFirst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sortingColumnWithNullsFirst :: Phantoms.TTerm Format.SortingColumn -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.SortingColumn
-sortingColumnWithNullsFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columnIdx"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-              Core.projectionField = (Core.Name "columnIdx")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "descending"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.SortingColumn"),
-              Core.projectionField = (Core.Name "descending")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullsFirst"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-statistics :: Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.Statistics
-statistics nullCount distinctCount maxValue minValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCount"),
-          Core.fieldTerm = (Phantoms.unTTerm nullCount)},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinctCount"),
-          Core.fieldTerm = (Phantoms.unTTerm distinctCount)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValue"),
-          Core.fieldTerm = (Phantoms.unTTerm maxValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValue"),
-          Core.fieldTerm = (Phantoms.unTTerm minValue)}]}))
-
-statisticsDistinctCount :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe Integer)
-statisticsDistinctCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-        Core.projectionField = (Core.Name "distinctCount")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statisticsMaxValue :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe B.ByteString)
-statisticsMaxValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-        Core.projectionField = (Core.Name "maxValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statisticsMinValue :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe B.ByteString)
-statisticsMinValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-        Core.projectionField = (Core.Name "minValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statisticsNullCount :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe Integer)
-statisticsNullCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-        Core.projectionField = (Core.Name "nullCount")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-statisticsWithDistinctCount :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm Format.Statistics
-statisticsWithDistinctCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "nullCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinctCount"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "maxValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "minValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statisticsWithMaxValue :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.Statistics
-statisticsWithMaxValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "nullCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinctCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "distinctCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "minValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-statisticsWithMinValue :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe B.ByteString) -> Phantoms.TTerm Format.Statistics
-statisticsWithMinValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "nullCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinctCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "distinctCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "maxValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-statisticsWithNullCount :: Phantoms.TTerm Format.Statistics -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm Format.Statistics
-statisticsWithNullCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nullCount"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "distinctCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "distinctCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "maxValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "maxValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "minValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.Statistics"),
-              Core.projectionField = (Core.Name "minValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-timeType :: Phantoms.TTerm Bool -> Phantoms.TTerm Format.TimeUnit -> Phantoms.TTerm Format.TimeType
-timeType isAdjustedToUtc unit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isAdjustedToUtc"),
-          Core.fieldTerm = (Phantoms.unTTerm isAdjustedToUtc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm unit)}]}))
-
-timeTypeIsAdjustedToUtc :: Phantoms.TTerm Format.TimeType -> Phantoms.TTerm Bool
-timeTypeIsAdjustedToUtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-        Core.projectionField = (Core.Name "isAdjustedToUtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timeTypeUnit :: Phantoms.TTerm Format.TimeType -> Phantoms.TTerm Format.TimeUnit
-timeTypeUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-        Core.projectionField = (Core.Name "unit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timeTypeWithIsAdjustedToUtc :: Phantoms.TTerm Format.TimeType -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.TimeType
-timeTypeWithIsAdjustedToUtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isAdjustedToUtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-timeTypeWithUnit :: Phantoms.TTerm Format.TimeType -> Phantoms.TTerm Format.TimeUnit -> Phantoms.TTerm Format.TimeType
-timeTypeWithUnit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isAdjustedToUtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimeType"),
-              Core.projectionField = (Core.Name "isAdjustedToUtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-timeUnitMicros :: Phantoms.TTerm Format.TimeUnit
-timeUnitMicros =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.TimeUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "micros"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-timeUnitMillis :: Phantoms.TTerm Format.TimeUnit
-timeUnitMillis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.TimeUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "millis"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-timeUnitNanos :: Phantoms.TTerm Format.TimeUnit
-timeUnitNanos =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.TimeUnit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nanos"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-timestampType :: Phantoms.TTerm Bool -> Phantoms.TTerm Format.TimeUnit -> Phantoms.TTerm Format.TimestampType
-timestampType isAdjustedToUtc unit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isAdjustedToUtc"),
-          Core.fieldTerm = (Phantoms.unTTerm isAdjustedToUtc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm unit)}]}))
-
-timestampTypeIsAdjustedToUtc :: Phantoms.TTerm Format.TimestampType -> Phantoms.TTerm Bool
-timestampTypeIsAdjustedToUtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-        Core.projectionField = (Core.Name "isAdjustedToUtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timestampTypeUnit :: Phantoms.TTerm Format.TimestampType -> Phantoms.TTerm Format.TimeUnit
-timestampTypeUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-        Core.projectionField = (Core.Name "unit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-timestampTypeWithIsAdjustedToUtc :: Phantoms.TTerm Format.TimestampType -> Phantoms.TTerm Bool -> Phantoms.TTerm Format.TimestampType
-timestampTypeWithIsAdjustedToUtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isAdjustedToUtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-timestampTypeWithUnit :: Phantoms.TTerm Format.TimestampType -> Phantoms.TTerm Format.TimeUnit -> Phantoms.TTerm Format.TimestampType
-timestampTypeWithUnit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isAdjustedToUtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parquet.format.TimestampType"),
-              Core.projectionField = (Core.Name "isAdjustedToUtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeBoolean :: Phantoms.TTerm Format.Type
-typeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeByteArray :: Phantoms.TTerm Format.Type
-typeByteArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byteArray"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeDouble :: Phantoms.TTerm Format.Type
-typeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeFixedLenByteArray :: Phantoms.TTerm Format.Type
-typeFixedLenByteArray =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixedLenByteArray"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeFloat :: Phantoms.TTerm Format.Type
-typeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeInt32 :: Phantoms.TTerm Format.Type
-typeInt32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int32"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeInt64 :: Phantoms.TTerm Format.Type
-typeInt64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parquet.format.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int64"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Parsing.hs b/src/main/haskell/Hydra/Dsl/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Parsing.hs
+++ /dev/null
@@ -1,143 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.parsing
-
-module Hydra.Dsl.Parsing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Parsing as Parsing
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-parseError :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Parsing.ParseError
-parseError message remainder =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = (Phantoms.unTTerm remainder)}]}))
-parseErrorMessage :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String
-parseErrorMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-parseErrorRemainder :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String
-parseErrorRemainder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),
-        Core.projectionField = (Core.Name "remainder")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-parseErrorWithMessage :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String -> Phantoms.TTerm Parsing.ParseError
-parseErrorWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),
-              Core.projectionField = (Core.Name "remainder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-parseErrorWithRemainder :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String -> Phantoms.TTerm Parsing.ParseError
-parseErrorWithRemainder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-parseResultFailure :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm (Parsing.ParseResult a)
-parseResultFailure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "failure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-parseResultSuccess :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm (Parsing.ParseResult a)
-parseResultSuccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "success"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-parseSuccess :: Phantoms.TTerm a -> Phantoms.TTerm String -> Phantoms.TTerm (Parsing.ParseSuccess a)
-parseSuccess value remainder =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = (Phantoms.unTTerm remainder)}]}))
-parseSuccessRemainder :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm String
-parseSuccessRemainder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-        Core.projectionField = (Core.Name "remainder")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-parseSuccessValue :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm a
-parseSuccessValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-parseSuccessWithRemainder :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm String -> Phantoms.TTerm (Parsing.ParseSuccess a)
-parseSuccessWithRemainder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-parseSuccessWithValue :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm a -> Phantoms.TTerm (Parsing.ParseSuccess a)
-parseSuccessWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-              Core.projectionField = (Core.Name "remainder")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-parser :: Phantoms.TTerm (String -> Parsing.ParseResult a) -> Phantoms.TTerm (Parsing.Parser a)
-parser x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.parsing.Parser"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-unParser :: Phantoms.TTerm (Parsing.Parser a) -> Phantoms.TTerm (String -> Parsing.ParseResult a)
-unParser x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.parsing.Parser")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Paths.hs b/src/main/haskell/Hydra/Dsl/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Paths.hs
+++ /dev/null
@@ -1,809 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.paths
-
-module Hydra.Dsl.Paths where
-import qualified Hydra.Core as Core
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-subtermEdge :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermEdge
-subtermEdge source path target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-subtermEdgePath :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermPath
-subtermEdgePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermEdgeSource :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode
-subtermEdgeSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermEdgeTarget :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode
-subtermEdgeTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermEdgeWithPath :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Paths.SubtermEdge
-subtermEdgeWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtermEdgeWithSource :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermEdge
-subtermEdgeWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtermEdgeWithTarget :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermEdge
-subtermEdgeWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-subtermGraph :: Phantoms.TTerm [Paths.SubtermNode] -> Phantoms.TTerm [Paths.SubtermEdge] -> Phantoms.TTerm Paths.SubtermGraph
-subtermGraph nodes edges =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Phantoms.unTTerm nodes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))
-subtermGraphEdges :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermEdge]
-subtermGraphEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-        Core.projectionField = (Core.Name "edges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermGraphNodes :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermNode]
-subtermGraphNodes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-        Core.projectionField = (Core.Name "nodes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermGraphWithEdges :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermEdge] -> Phantoms.TTerm Paths.SubtermGraph
-subtermGraphWithEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-subtermGraphWithNodes :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermNode] -> Phantoms.TTerm Paths.SubtermGraph
-subtermGraphWithNodes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.paths.SubtermGraph"),
-              Core.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtermNode :: Phantoms.TTerm Core.Name -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtermNode
-subtermNode name label id =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)}]}))
-subtermNodeId :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String
-subtermNodeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermNodeLabel :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String
-subtermNodeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermNodeName :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Core.Name
-subtermNodeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtermNodeWithId :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtermNode
-subtermNodeWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-subtermNodeWithLabel :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtermNode
-subtermNodeWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.paths.SubtermNode"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtermNodeWithName :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermNode
-subtermNodeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.paths.SubtermNode"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtermPath :: Phantoms.TTerm [Paths.SubtermStep] -> Phantoms.TTerm Paths.SubtermPath
-subtermPath x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtermPath"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-subtermStepAnnotatedBody :: Phantoms.TTerm Paths.SubtermStep
-subtermStepAnnotatedBody =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotatedBody"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepApplicationArgument :: Phantoms.TTerm Paths.SubtermStep
-subtermStepApplicationArgument =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applicationArgument"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepApplicationFunction :: Phantoms.TTerm Paths.SubtermStep
-subtermStepApplicationFunction =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applicationFunction"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepInjectionTerm :: Phantoms.TTerm Paths.SubtermStep
-subtermStepInjectionTerm =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "injectionTerm"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepLambdaBody :: Phantoms.TTerm Paths.SubtermStep
-subtermStepLambdaBody =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambdaBody"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepLetBinding :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermStep
-subtermStepLetBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "letBinding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepLetBody :: Phantoms.TTerm Paths.SubtermStep
-subtermStepLetBody =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "letBody"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepListElement :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep
-subtermStepListElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listElement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepMapKey :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep
-subtermStepMapKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mapKey"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepMapValue :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep
-subtermStepMapValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mapValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepMaybeTerm :: Phantoms.TTerm Paths.SubtermStep
-subtermStepMaybeTerm =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybeTerm"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepProductTerm :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep
-subtermStepProductTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "productTerm"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepRecordField :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermStep
-subtermStepRecordField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepSetElement :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep
-subtermStepSetElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "setElement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepSumTerm :: Phantoms.TTerm Paths.SubtermStep
-subtermStepSumTerm =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sumTerm"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepTypeApplicationTerm :: Phantoms.TTerm Paths.SubtermStep
-subtermStepTypeApplicationTerm =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeApplicationTerm"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepTypeLambdaBody :: Phantoms.TTerm Paths.SubtermStep
-subtermStepTypeLambdaBody =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLambdaBody"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepUnionCasesBranch :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermStep
-subtermStepUnionCasesBranch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unionCasesBranch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtermStepUnionCasesDefault :: Phantoms.TTerm Paths.SubtermStep
-subtermStepUnionCasesDefault =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unionCasesDefault"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtermStepWrappedTerm :: Phantoms.TTerm Paths.SubtermStep
-subtermStepWrappedTerm =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrappedTerm"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeEdge :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypePath -> Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypeEdge
-subtypeEdge source path target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-subtypeEdgePath :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypePath
-subtypeEdgePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeEdgeSource :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode
-subtypeEdgeSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeEdgeTarget :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode
-subtypeEdgeTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeEdgeWithPath :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypePath -> Phantoms.TTerm Paths.SubtypeEdge
-subtypeEdgeWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtypeEdgeWithSource :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypeEdge
-subtypeEdgeWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtypeEdgeWithTarget :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypeEdge
-subtypeEdgeWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-subtypeGraph :: Phantoms.TTerm [Paths.SubtypeNode] -> Phantoms.TTerm [Paths.SubtypeEdge] -> Phantoms.TTerm Paths.SubtypeGraph
-subtypeGraph nodes edges =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Phantoms.unTTerm nodes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))
-subtypeGraphEdges :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeEdge]
-subtypeGraphEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-        Core.projectionField = (Core.Name "edges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeGraphNodes :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeNode]
-subtypeGraphNodes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-        Core.projectionField = (Core.Name "nodes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeGraphWithEdges :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeEdge] -> Phantoms.TTerm Paths.SubtypeGraph
-subtypeGraphWithEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-              Core.projectionField = (Core.Name "nodes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-subtypeGraphWithNodes :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeNode] -> Phantoms.TTerm Paths.SubtypeGraph
-subtypeGraphWithNodes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.paths.SubtypeGraph"),
-              Core.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtypeNode :: Phantoms.TTerm Core.Name -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtypeNode
-subtypeNode name label id =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)}]}))
-subtypeNodeId :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String
-subtypeNodeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeNodeLabel :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String
-subtypeNodeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeNodeName :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Core.Name
-subtypeNodeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-subtypeNodeWithId :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtypeNode
-subtypeNodeWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-subtypeNodeWithLabel :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtypeNode
-subtypeNodeWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.paths.SubtypeNode"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtypeNodeWithName :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtypeNode
-subtypeNodeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.paths.SubtypeNode"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-subtypePath :: Phantoms.TTerm [Paths.SubtypeStep] -> Phantoms.TTerm Paths.SubtypePath
-subtypePath x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtypePath"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-subtypeStepAnnotatedBody :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepAnnotatedBody =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotatedBody"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepApplicationArgument :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepApplicationArgument =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applicationArgument"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepApplicationFunction :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepApplicationFunction =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applicationFunction"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepEitherLeft :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepEitherLeft =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eitherLeft"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepEitherRight :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepEitherRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eitherRight"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepForallBody :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepForallBody =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forallBody"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepFunctionCodomain :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepFunctionCodomain =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionCodomain"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepFunctionDomain :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepFunctionDomain =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionDomain"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepListElement :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepListElement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listElement"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepMapKeys :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepMapKeys =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mapKeys"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepMapValues :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepMapValues =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mapValues"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepMaybeElement :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepMaybeElement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybeElement"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepPairFirst :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepPairFirst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pairFirst"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepPairSecond :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepPairSecond =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pairSecond"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepRecordField :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtypeStep
-subtypeStepRecordField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "recordField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtypeStepSetElement :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepSetElement =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "setElement"),
-        Core.fieldTerm = Core.TermUnit}}))
-subtypeStepUnionField :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtypeStep
-subtypeStepUnionField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unionField"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-subtypeStepWrappedType :: Phantoms.TTerm Paths.SubtypeStep
-subtypeStepWrappedType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrappedType"),
-        Core.fieldTerm = Core.TermUnit}}))
-unSubtermPath :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm [Paths.SubtermStep]
-unSubtermPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.paths.SubtermPath")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unSubtypePath :: Phantoms.TTerm Paths.SubtypePath -> Phantoms.TTerm [Paths.SubtypeStep]
-unSubtypePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.paths.SubtypePath")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Pegasus/Pdl.hs b/src/main/haskell/Hydra/Dsl/Pegasus/Pdl.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pegasus/Pdl.hs
+++ /dev/null
@@ -1,1198 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.pegasus.pdl
-
-module Hydra.Dsl.Pegasus.Pdl where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Pegasus.Pdl as Pdl
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-annotations :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Bool -> Phantoms.TTerm Pdl.Annotations
-annotations doc deprecated =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "deprecated"),
-          Core.fieldTerm = (Phantoms.unTTerm deprecated)}]}))
-
-annotationsDeprecated :: Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Bool
-annotationsDeprecated x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-        Core.projectionField = (Core.Name "deprecated")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationsDoc :: Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm (Maybe String)
-annotationsDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationsWithDeprecated :: Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Bool -> Phantoms.TTerm Pdl.Annotations
-annotationsWithDeprecated original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deprecated"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationsWithDoc :: Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Pdl.Annotations
-annotationsWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "deprecated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.Annotations"),
-              Core.projectionField = (Core.Name "deprecated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumField :: Phantoms.TTerm Pdl.EnumFieldName -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.EnumField
-enumField name annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-enumFieldAnnotations :: Phantoms.TTerm Pdl.EnumField -> Phantoms.TTerm Pdl.Annotations
-enumFieldAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumFieldName :: Phantoms.TTerm Pdl.EnumField -> Phantoms.TTerm Pdl.EnumFieldName
-enumFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumFieldName_ :: Phantoms.TTerm String -> Phantoms.TTerm Pdl.EnumFieldName
-enumFieldName_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.EnumFieldName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumFieldWithAnnotations :: Phantoms.TTerm Pdl.EnumField -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.EnumField
-enumFieldWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumFieldWithName :: Phantoms.TTerm Pdl.EnumField -> Phantoms.TTerm Pdl.EnumFieldName -> Phantoms.TTerm Pdl.EnumField
-enumFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.EnumField"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumSchema :: Phantoms.TTerm [Pdl.EnumField] -> Phantoms.TTerm Pdl.EnumSchema
-enumSchema fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.EnumSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-
-enumSchemaFields :: Phantoms.TTerm Pdl.EnumSchema -> Phantoms.TTerm [Pdl.EnumField]
-enumSchemaFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.EnumSchema"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumSchemaWithFields :: Phantoms.TTerm Pdl.EnumSchema -> Phantoms.TTerm [Pdl.EnumField] -> Phantoms.TTerm Pdl.EnumSchema
-enumSchemaWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.EnumSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldName :: Phantoms.TTerm String -> Phantoms.TTerm Pdl.FieldName
-fieldName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.FieldName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-name :: Phantoms.TTerm String -> Phantoms.TTerm Pdl.Name
-name x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.Name"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-namedSchema :: Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm Pdl.NamedSchemaType -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.NamedSchema
-namedSchema qualifiedName type_ annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedName"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifiedName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-namedSchemaAnnotations :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.Annotations
-namedSchemaAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedSchemaQualifiedName :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.QualifiedName
-namedSchemaQualifiedName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-        Core.projectionField = (Core.Name "qualifiedName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedSchemaType :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.NamedSchemaType
-namedSchemaType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-namedSchemaTypeEnum :: Phantoms.TTerm Pdl.EnumSchema -> Phantoms.TTerm Pdl.NamedSchemaType
-namedSchemaTypeEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchemaType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedSchemaTypeRecord :: Phantoms.TTerm Pdl.RecordSchema -> Phantoms.TTerm Pdl.NamedSchemaType
-namedSchemaTypeRecord x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchemaType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedSchemaTypeTyperef :: Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Pdl.NamedSchemaType
-namedSchemaTypeTyperef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchemaType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedSchemaWithAnnotations :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.NamedSchema
-namedSchemaWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-              Core.projectionField = (Core.Name "qualifiedName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-namedSchemaWithQualifiedName :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm Pdl.NamedSchema
-namedSchemaWithQualifiedName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namedSchemaWithType :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.NamedSchemaType -> Phantoms.TTerm Pdl.NamedSchema
-namedSchemaWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-              Core.projectionField = (Core.Name "qualifiedName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.NamedSchema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-namespace :: Phantoms.TTerm String -> Phantoms.TTerm Pdl.Namespace
-namespace x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.Namespace"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-package :: Phantoms.TTerm String -> Phantoms.TTerm Pdl.Package
-package x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.Package"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-primitiveTypeBoolean :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeBytes :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeBytes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bytes"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeDouble :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeFloat :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeInt :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeLong :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeString :: Phantoms.TTerm Pdl.PrimitiveType
-primitiveTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-property :: Phantoms.TTerm Pdl.PropertyKey -> Phantoms.TTerm (Maybe Model.Value) -> Phantoms.TTerm Pdl.Property
-property key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertyKey :: Phantoms.TTerm String -> Phantoms.TTerm Pdl.PropertyKey
-propertyKey x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.PropertyKey"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-propertyKey_ :: Phantoms.TTerm Pdl.Property -> Phantoms.TTerm Pdl.PropertyKey
-propertyKey_ x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.Property"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyValue :: Phantoms.TTerm Pdl.Property -> Phantoms.TTerm (Maybe Model.Value)
-propertyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.Property"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyWithKey :: Phantoms.TTerm Pdl.Property -> Phantoms.TTerm Pdl.PropertyKey -> Phantoms.TTerm Pdl.Property
-propertyWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.pegasus.pdl.Property"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithValue :: Phantoms.TTerm Pdl.Property -> Phantoms.TTerm (Maybe Model.Value) -> Phantoms.TTerm Pdl.Property
-propertyWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.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.pegasus.pdl.Property"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedName :: Phantoms.TTerm Pdl.Name -> Phantoms.TTerm (Maybe Pdl.Namespace) -> Phantoms.TTerm Pdl.QualifiedName
-qualifiedName name namespace =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)}]}))
-
-qualifiedNameName :: Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm Pdl.Name
-qualifiedNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNameNamespace :: Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm (Maybe Pdl.Namespace)
-qualifiedNameNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedNameWithName :: Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm Pdl.Name -> Phantoms.TTerm Pdl.QualifiedName
-qualifiedNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedNameWithNamespace :: Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm (Maybe Pdl.Namespace) -> Phantoms.TTerm Pdl.QualifiedName
-qualifiedNameWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.QualifiedName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordField :: Phantoms.TTerm Pdl.FieldName -> Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Model.Value) -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.RecordField
-recordField name value optional default_ annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-recordFieldAnnotations :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Pdl.Annotations
-recordFieldAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldDefault :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm (Maybe Model.Value)
-recordFieldDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldName :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Pdl.FieldName
-recordFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldOptional :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Bool
-recordFieldOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldValue :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Pdl.Schema
-recordFieldValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordFieldWithAnnotations :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.RecordField
-recordFieldWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-recordFieldWithDefault :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm (Maybe Model.Value) -> Phantoms.TTerm Pdl.RecordField
-recordFieldWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordFieldWithName :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Pdl.FieldName -> Phantoms.TTerm Pdl.RecordField
-recordFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordFieldWithOptional :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Bool -> Phantoms.TTerm Pdl.RecordField
-recordFieldWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordFieldWithValue :: Phantoms.TTerm Pdl.RecordField -> Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Pdl.RecordField
-recordFieldWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordField"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordSchema :: Phantoms.TTerm [Pdl.RecordField] -> Phantoms.TTerm [Pdl.NamedSchema] -> Phantoms.TTerm Pdl.RecordSchema
-recordSchema fields includes =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Phantoms.unTTerm includes)}]}))
-
-recordSchemaFields :: Phantoms.TTerm Pdl.RecordSchema -> Phantoms.TTerm [Pdl.RecordField]
-recordSchemaFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordSchemaIncludes :: Phantoms.TTerm Pdl.RecordSchema -> Phantoms.TTerm [Pdl.NamedSchema]
-recordSchemaIncludes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-        Core.projectionField = (Core.Name "includes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-recordSchemaWithFields :: Phantoms.TTerm Pdl.RecordSchema -> Phantoms.TTerm [Pdl.RecordField] -> Phantoms.TTerm Pdl.RecordSchema
-recordSchemaWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-              Core.projectionField = (Core.Name "includes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-recordSchemaWithIncludes :: Phantoms.TTerm Pdl.RecordSchema -> Phantoms.TTerm [Pdl.NamedSchema] -> Phantoms.TTerm Pdl.RecordSchema
-recordSchemaWithIncludes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.RecordSchema"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "includes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaArray :: Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Pdl.Schema
-schemaArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaFile :: Phantoms.TTerm Pdl.Namespace -> Phantoms.TTerm (Maybe Pdl.Package) -> Phantoms.TTerm [Pdl.QualifiedName] -> Phantoms.TTerm [Pdl.NamedSchema] -> Phantoms.TTerm Pdl.SchemaFile
-schemaFile namespace package imports schemas =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm namespace)},
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Phantoms.unTTerm schemas)}]}))
-
-schemaFileImports :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm [Pdl.QualifiedName]
-schemaFileImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaFileNamespace :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm Pdl.Namespace
-schemaFileNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-        Core.projectionField = (Core.Name "namespace")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaFilePackage :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm (Maybe Pdl.Package)
-schemaFilePackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaFileSchemas :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm [Pdl.NamedSchema]
-schemaFileSchemas x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-        Core.projectionField = (Core.Name "schemas")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaFileWithImports :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm [Pdl.QualifiedName] -> Phantoms.TTerm Pdl.SchemaFile
-schemaFileWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaFileWithNamespace :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm Pdl.Namespace -> Phantoms.TTerm Pdl.SchemaFile
-schemaFileWithNamespace original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaFileWithPackage :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm (Maybe Pdl.Package) -> Phantoms.TTerm Pdl.SchemaFile
-schemaFileWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "schemas")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaFileWithSchemas :: Phantoms.TTerm Pdl.SchemaFile -> Phantoms.TTerm [Pdl.NamedSchema] -> Phantoms.TTerm Pdl.SchemaFile
-schemaFileWithSchemas original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "namespace")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.SchemaFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemas"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaFixed :: Phantoms.TTerm Int -> Phantoms.TTerm Pdl.Schema
-schemaFixed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaInline :: Phantoms.TTerm Pdl.NamedSchema -> Phantoms.TTerm Pdl.Schema
-schemaInline x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inline"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaMap :: Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Pdl.Schema
-schemaMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaNamed :: Phantoms.TTerm Pdl.QualifiedName -> Phantoms.TTerm Pdl.Schema
-schemaNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaNull :: Phantoms.TTerm Pdl.Schema
-schemaNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-schemaPrimitive :: Phantoms.TTerm Pdl.PrimitiveType -> Phantoms.TTerm Pdl.Schema
-schemaPrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaUnion :: Phantoms.TTerm Pdl.UnionSchema -> Phantoms.TTerm Pdl.Schema
-schemaUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pegasus.pdl.Schema"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unEnumFieldName :: Phantoms.TTerm Pdl.EnumFieldName -> Phantoms.TTerm String
-unEnumFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.EnumFieldName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFieldName :: Phantoms.TTerm Pdl.FieldName -> Phantoms.TTerm String
-unFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.FieldName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unName :: Phantoms.TTerm Pdl.Name -> Phantoms.TTerm String
-unName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.Name")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNamespace :: Phantoms.TTerm Pdl.Namespace -> Phantoms.TTerm String
-unNamespace x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.Namespace")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPackage :: Phantoms.TTerm Pdl.Package -> Phantoms.TTerm String
-unPackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.Package")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPropertyKey :: Phantoms.TTerm Pdl.PropertyKey -> Phantoms.TTerm String
-unPropertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.PropertyKey")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnionSchema :: Phantoms.TTerm Pdl.UnionSchema -> Phantoms.TTerm [Pdl.UnionMember]
-unUnionSchema x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pegasus.pdl.UnionSchema")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMember :: Phantoms.TTerm (Maybe Pdl.FieldName) -> Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.UnionMember
-unionMember alias value annotations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)}]}))
-
-unionMemberAlias :: Phantoms.TTerm Pdl.UnionMember -> Phantoms.TTerm (Maybe Pdl.FieldName)
-unionMemberAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberAnnotations :: Phantoms.TTerm Pdl.UnionMember -> Phantoms.TTerm Pdl.Annotations
-unionMemberAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberValue :: Phantoms.TTerm Pdl.UnionMember -> Phantoms.TTerm Pdl.Schema
-unionMemberValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unionMemberWithAlias :: Phantoms.TTerm Pdl.UnionMember -> Phantoms.TTerm (Maybe Pdl.FieldName) -> Phantoms.TTerm Pdl.UnionMember
-unionMemberWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.pegasus.pdl.UnionMember"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionMemberWithAnnotations :: Phantoms.TTerm Pdl.UnionMember -> Phantoms.TTerm Pdl.Annotations -> Phantoms.TTerm Pdl.UnionMember
-unionMemberWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.pegasus.pdl.UnionMember"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unionMemberWithValue :: Phantoms.TTerm Pdl.UnionMember -> Phantoms.TTerm Pdl.Schema -> Phantoms.TTerm Pdl.UnionMember
-unionMemberWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pegasus.pdl.UnionMember"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unionSchema :: Phantoms.TTerm [Pdl.UnionMember] -> Phantoms.TTerm Pdl.UnionSchema
-unionSchema x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pegasus.pdl.UnionSchema"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Graphson/Syntax.hs b/src/main/haskell/Hydra/Dsl/Pg/Graphson/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Graphson/Syntax.hs
+++ /dev/null
@@ -1,947 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.pg.graphson.syntax
-
-module Hydra.Dsl.Pg.Graphson.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Pg.Graphson.Syntax as Syntax
-import qualified Hydra.Phantoms as Phantoms
-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
-
-adjacentEdge :: Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm (M.Map Syntax.PropertyKey Syntax.Value) -> Phantoms.TTerm Syntax.AdjacentEdge
-adjacentEdge id vertexId properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm vertexId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-adjacentEdgeId :: Phantoms.TTerm Syntax.AdjacentEdge -> Phantoms.TTerm Syntax.Value
-adjacentEdgeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeProperties :: Phantoms.TTerm Syntax.AdjacentEdge -> Phantoms.TTerm (M.Map Syntax.PropertyKey Syntax.Value)
-adjacentEdgeProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeVertexId :: Phantoms.TTerm Syntax.AdjacentEdge -> Phantoms.TTerm Syntax.Value
-adjacentEdgeVertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-        Core.projectionField = (Core.Name "vertexId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeWithId :: Phantoms.TTerm Syntax.AdjacentEdge -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.AdjacentEdge
-adjacentEdgeWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.graphson.syntax.AdjacentEdge"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-adjacentEdgeWithProperties :: Phantoms.TTerm Syntax.AdjacentEdge -> Phantoms.TTerm (M.Map Syntax.PropertyKey Syntax.Value) -> Phantoms.TTerm Syntax.AdjacentEdge
-adjacentEdgeWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-      Core.recordFields = [
-        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.graphson.syntax.AdjacentEdge"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-adjacentEdgeWithVertexId :: Phantoms.TTerm Syntax.AdjacentEdge -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.AdjacentEdge
-adjacentEdgeWithVertexId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"),
-      Core.recordFields = [
-        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.graphson.syntax.AdjacentEdge"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphson.syntax.AdjacentEdge"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bigDecimalValue :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.BigDecimalValue
-bigDecimalValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.BigDecimalValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-compositeTypedValue :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.CompositeTypedValue
-compositeTypedValue type_ fields =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))
-
-compositeTypedValueFields :: Phantoms.TTerm Syntax.CompositeTypedValue -> Phantoms.TTerm Syntax.Map
-compositeTypedValueFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeTypedValueType :: Phantoms.TTerm Syntax.CompositeTypedValue -> Phantoms.TTerm Syntax.TypeName
-compositeTypedValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compositeTypedValueWithFields :: Phantoms.TTerm Syntax.CompositeTypedValue -> Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.CompositeTypedValue
-compositeTypedValueWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compositeTypedValueWithType :: Phantoms.TTerm Syntax.CompositeTypedValue -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.CompositeTypedValue
-compositeTypedValueWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dateTime :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.DateTime
-dateTime x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.DateTime"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-doubleValueFinite :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.DoubleValue
-doubleValueFinite x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.DoubleValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "finite"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-doubleValueInfinity :: Phantoms.TTerm Syntax.DoubleValue
-doubleValueInfinity =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.DoubleValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "infinity"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-doubleValueNegativeInfinity :: Phantoms.TTerm Syntax.DoubleValue
-doubleValueNegativeInfinity =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.DoubleValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negativeInfinity"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-doubleValueNotANumber :: Phantoms.TTerm Syntax.DoubleValue
-doubleValueNotANumber =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.DoubleValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notANumber"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-duration :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Duration
-duration x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.Duration"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-edgeLabel :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.EdgeLabel
-edgeLabel x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.EdgeLabel"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-floatValueFinite :: Phantoms.TTerm Float -> Phantoms.TTerm Syntax.FloatValue
-floatValueFinite x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "finite"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-floatValueInfinity :: Phantoms.TTerm Syntax.FloatValue
-floatValueInfinity =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "infinity"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-floatValueNegativeInfinity :: Phantoms.TTerm Syntax.FloatValue
-floatValueNegativeInfinity =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negativeInfinity"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-floatValueNotANumber :: Phantoms.TTerm Syntax.FloatValue
-floatValueNotANumber =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notANumber"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-map :: Phantoms.TTerm [Syntax.ValuePair] -> Phantoms.TTerm Syntax.Map
-map x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.Map"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-primitiveTypedValue :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.PrimitiveTypedValue
-primitiveTypedValue type_ value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-primitiveTypedValueType :: Phantoms.TTerm Syntax.PrimitiveTypedValue -> Phantoms.TTerm Syntax.TypeName
-primitiveTypedValueType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-primitiveTypedValueValue :: Phantoms.TTerm Syntax.PrimitiveTypedValue -> Phantoms.TTerm String
-primitiveTypedValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-primitiveTypedValueWithType :: Phantoms.TTerm Syntax.PrimitiveTypedValue -> Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm Syntax.PrimitiveTypedValue
-primitiveTypedValueWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphson.syntax.PrimitiveTypedValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-primitiveTypedValueWithValue :: Phantoms.TTerm Syntax.PrimitiveTypedValue -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.PrimitiveTypedValue
-primitiveTypedValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyKey :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PropertyKey
-propertyKey x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.PropertyKey"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.TypeName
-typeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.TypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unBigDecimalValue :: Phantoms.TTerm Syntax.BigDecimalValue -> Phantoms.TTerm String
-unBigDecimalValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.BigDecimalValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDateTime :: Phantoms.TTerm Syntax.DateTime -> Phantoms.TTerm String
-unDateTime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.DateTime")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDuration :: Phantoms.TTerm Syntax.Duration -> Phantoms.TTerm String
-unDuration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.Duration")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEdgeLabel :: Phantoms.TTerm Syntax.EdgeLabel -> Phantoms.TTerm String
-unEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.EdgeLabel")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMap :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm [Syntax.ValuePair]
-unMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.Map")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPropertyKey :: Phantoms.TTerm Syntax.PropertyKey -> Phantoms.TTerm String
-unPropertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.PropertyKey")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeName :: Phantoms.TTerm Syntax.TypeName -> Phantoms.TTerm String
-unTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.TypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUuid :: Phantoms.TTerm Syntax.Uuid -> Phantoms.TTerm String
-unUuid x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.Uuid")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVertexLabel :: Phantoms.TTerm Syntax.VertexLabel -> Phantoms.TTerm String
-unVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.graphson.syntax.VertexLabel")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uuid :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Uuid
-uuid x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.Uuid"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-valueBigDecimal :: Phantoms.TTerm Syntax.BigDecimalValue -> Phantoms.TTerm Syntax.Value
-valueBigDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigDecimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueBigInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.Value
-valueBigInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigInteger"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueBinary :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Value
-valueBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Value
-valueBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueByte :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Syntax.Value
-valueByte x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueChar :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Syntax.Value
-valueChar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueComposite :: Phantoms.TTerm Syntax.CompositeTypedValue -> Phantoms.TTerm Syntax.Value
-valueComposite x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "composite"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueDateTime :: Phantoms.TTerm Syntax.DateTime -> Phantoms.TTerm Syntax.Value
-valueDateTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateTime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueDouble :: Phantoms.TTerm Syntax.DoubleValue -> Phantoms.TTerm Syntax.Value
-valueDouble x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueDuration :: Phantoms.TTerm Syntax.Duration -> Phantoms.TTerm Syntax.Value
-valueDuration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueFloat :: Phantoms.TTerm Syntax.FloatValue -> Phantoms.TTerm Syntax.Value
-valueFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueInteger :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Value
-valueInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueList :: Phantoms.TTerm [Syntax.Value] -> Phantoms.TTerm Syntax.Value
-valueList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueLong :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Syntax.Value
-valueLong x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueMap :: Phantoms.TTerm Syntax.Map -> Phantoms.TTerm Syntax.Value
-valueMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueNull :: Phantoms.TTerm Syntax.Value
-valueNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-valuePair :: Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.ValuePair
-valuePair first second =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm second)}]}))
-
-valuePairFirst :: Phantoms.TTerm Syntax.ValuePair -> Phantoms.TTerm Syntax.Value
-valuePairFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valuePairSecond :: Phantoms.TTerm Syntax.ValuePair -> Phantoms.TTerm Syntax.Value
-valuePairSecond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-        Core.projectionField = (Core.Name "second")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valuePairWithFirst :: Phantoms.TTerm Syntax.ValuePair -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.ValuePair
-valuePairWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-              Core.projectionField = (Core.Name "second")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-valuePairWithSecond :: Phantoms.TTerm Syntax.ValuePair -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.ValuePair
-valuePairWithSecond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.ValuePair"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valuePrimitive :: Phantoms.TTerm Syntax.PrimitiveTypedValue -> Phantoms.TTerm Syntax.Value
-valuePrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueSet :: Phantoms.TTerm [Syntax.Value] -> Phantoms.TTerm Syntax.Value
-valueSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueShort :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Syntax.Value
-valueShort x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Value
-valueString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueUuid :: Phantoms.TTerm Syntax.Uuid -> Phantoms.TTerm Syntax.Value
-valueUuid x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uuid"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-vertex :: Phantoms.TTerm Syntax.Value -> Phantoms.TTerm (Maybe Syntax.VertexLabel) -> Phantoms.TTerm (M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge]) -> Phantoms.TTerm (M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge]) -> Phantoms.TTerm (M.Map Syntax.PropertyKey [Syntax.VertexPropertyValue]) -> Phantoms.TTerm Syntax.Vertex
-vertex id label inEdges outEdges properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm inEdges)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm outEdges)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-vertexId :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm Syntax.Value
-vertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexInEdges :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge])
-vertexInEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-        Core.projectionField = (Core.Name "inEdges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexLabel :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (Maybe Syntax.VertexLabel)
-vertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexLabel_ :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.VertexLabel
-vertexLabel_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.graphson.syntax.VertexLabel"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-vertexOutEdges :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge])
-vertexOutEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-        Core.projectionField = (Core.Name "outEdges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexProperties :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (M.Map Syntax.PropertyKey [Syntax.VertexPropertyValue])
-vertexProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyValue :: Phantoms.TTerm (Maybe Syntax.Value) -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.VertexPropertyValue
-vertexPropertyValue id value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.VertexPropertyValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-vertexPropertyValueId :: Phantoms.TTerm Syntax.VertexPropertyValue -> Phantoms.TTerm (Maybe Syntax.Value)
-vertexPropertyValueId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.VertexPropertyValue"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyValueValue :: Phantoms.TTerm Syntax.VertexPropertyValue -> Phantoms.TTerm Syntax.Value
-vertexPropertyValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.VertexPropertyValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyValueWithId :: Phantoms.TTerm Syntax.VertexPropertyValue -> Phantoms.TTerm (Maybe Syntax.Value) -> Phantoms.TTerm Syntax.VertexPropertyValue
-vertexPropertyValueWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.VertexPropertyValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphson.syntax.VertexPropertyValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexPropertyValueWithValue :: Phantoms.TTerm Syntax.VertexPropertyValue -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.VertexPropertyValue
-vertexPropertyValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.VertexPropertyValue"),
-      Core.recordFields = [
-        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.graphson.syntax.VertexPropertyValue"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vertexWithId :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm Syntax.Value -> Phantoms.TTerm Syntax.Vertex
-vertexWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "inEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "outEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithInEdges :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge]) -> Phantoms.TTerm Syntax.Vertex
-vertexWithInEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-      Core.recordFields = [
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "outEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithLabel :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (Maybe Syntax.VertexLabel) -> Phantoms.TTerm Syntax.Vertex
-vertexWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-      Core.recordFields = [
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "inEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "outEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithOutEdges :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge]) -> Phantoms.TTerm Syntax.Vertex
-vertexWithOutEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-      Core.recordFields = [
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "inEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithProperties :: Phantoms.TTerm Syntax.Vertex -> Phantoms.TTerm (M.Map Syntax.PropertyKey [Syntax.VertexPropertyValue]) -> Phantoms.TTerm Syntax.Vertex
-vertexWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-      Core.recordFields = [
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "inEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.graphson.syntax.Vertex"),
-              Core.projectionField = (Core.Name "outEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Mapping.hs b/src/main/haskell/Hydra/Dsl/Pg/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Mapping.hs
+++ /dev/null
@@ -1,2925 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.pg.mapping
-
-module Hydra.Dsl.Pg.Mapping where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Pg.Mapping as Mapping
-import qualified Hydra.Pg.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-annotationSchema :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchema vertexLabel edgeLabel vertexId edgeId propertyKey propertyValue outVertex outVertexLabel inVertex inVertexLabel outEdge outEdgeLabel inEdge inEdgeLabel ignore =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm vertexLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm vertexId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyKey)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Phantoms.unTTerm outVertex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm outVertexLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Phantoms.unTTerm inVertex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm inVertexLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Phantoms.unTTerm outEdge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm outEdgeLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Phantoms.unTTerm inEdge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm inEdgeLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Phantoms.unTTerm ignore)}]}))
-
-annotationSchemaEdgeId :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaEdgeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "edgeId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaEdgeLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "edgeLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaIgnore :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaIgnore x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "ignore")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaInEdge :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaInEdge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "inEdge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaInEdgeLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaInEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "inEdgeLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaInVertex :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaInVertex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "inVertex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaInVertexLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaInVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "inVertexLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaOutEdge :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaOutEdge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "outEdge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaOutEdgeLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaOutEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "outEdgeLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaOutVertex :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaOutVertex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "outVertex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaOutVertexLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaOutVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "outVertexLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaPropertyKey :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaPropertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "propertyKey")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaPropertyValue :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaPropertyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "propertyValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaVertexId :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaVertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "vertexId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaVertexLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String
-annotationSchemaVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-        Core.projectionField = (Core.Name "vertexLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationSchemaWithEdgeId :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithEdgeId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithEdgeLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithEdgeLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithIgnore :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithIgnore original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationSchemaWithInEdge :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithInEdge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithInEdgeLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithInEdgeLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithInVertex :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithInVertex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithInVertexLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithInVertexLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithOutEdge :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithOutEdge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithOutEdgeLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithOutEdgeLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithOutVertex :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithOutVertex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithOutVertexLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithOutVertexLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithPropertyKey :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithPropertyKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithPropertyValue :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithPropertyValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithVertexId :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithVertexId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotationSchemaWithVertexLabel :: Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm String -> Phantoms.TTerm Mapping.AnnotationSchema
-annotationSchemaWithVertexLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "vertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "edgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "propertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "outEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "inEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignore"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-              Core.projectionField = (Core.Name "ignore")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeSpec :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm [Mapping.PropertySpec] -> Phantoms.TTerm Mapping.EdgeSpec
-edgeSpec label id out in_ properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm out)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-edgeSpecId :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ValueSpec
-edgeSpecId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeSpecIn :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ValueSpec
-edgeSpecIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeSpecLabel :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Model.EdgeLabel
-edgeSpecLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeSpecOut :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ValueSpec
-edgeSpecOut x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-        Core.projectionField = (Core.Name "out")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeSpecProperties :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm [Mapping.PropertySpec]
-edgeSpecProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeSpecWithId :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.EdgeSpec
-edgeSpecWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-      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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeSpecWithIn :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.EdgeSpec
-edgeSpecWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-      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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeSpecWithLabel :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm Mapping.EdgeSpec
-edgeSpecWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeSpecWithOut :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.EdgeSpec
-edgeSpecWithOut original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-      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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeSpecWithProperties :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm [Mapping.PropertySpec] -> Phantoms.TTerm Mapping.EdgeSpec
-edgeSpecWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-      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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.EdgeSpec"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementSpecEdge :: Phantoms.TTerm Mapping.EdgeSpec -> Phantoms.TTerm Mapping.ElementSpec
-elementSpecEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementSpecVertex :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm Mapping.ElementSpec
-elementSpecVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertySpec :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.PropertySpec
-propertySpec key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertySpecKey :: Phantoms.TTerm Mapping.PropertySpec -> Phantoms.TTerm Model.PropertyKey
-propertySpecKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySpecValue :: Phantoms.TTerm Mapping.PropertySpec -> Phantoms.TTerm Mapping.ValueSpec
-propertySpecValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySpecWithKey :: Phantoms.TTerm Mapping.PropertySpec -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Mapping.PropertySpec
-propertySpecWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.PropertySpec"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertySpecWithValue :: Phantoms.TTerm Mapping.PropertySpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.PropertySpec
-propertySpecWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-      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.mapping.PropertySpec"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schema :: Phantoms.TTerm (Coders.Coder Core.Type t) -> Phantoms.TTerm (Coders.Coder Core.Term v) -> Phantoms.TTerm (Coders.Coder Core.Type t) -> Phantoms.TTerm (Coders.Coder Core.Term v) -> Phantoms.TTerm (Coders.Coder Core.Type t) -> Phantoms.TTerm (Coders.Coder Core.Term v) -> Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm v -> Phantoms.TTerm v -> Phantoms.TTerm (Mapping.Schema s t v)
-schema vertexIdTypes vertexIds edgeIdTypes edgeIds propertyTypes propertyValues annotations defaultVertexId defaultEdgeId =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm vertexIdTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Phantoms.unTTerm vertexIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeIdTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Phantoms.unTTerm edgeIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyTypes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm annotations)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultVertexId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultEdgeId)}]}))
-
-schemaAnnotations :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm Mapping.AnnotationSchema
-schemaAnnotations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "annotations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaDefaultEdgeId :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm v
-schemaDefaultEdgeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "defaultEdgeId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaDefaultVertexId :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm v
-schemaDefaultVertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "defaultVertexId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaEdgeIdTypes :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Type t)
-schemaEdgeIdTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "edgeIdTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaEdgeIds :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Term v)
-schemaEdgeIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "edgeIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaPropertyTypes :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Type t)
-schemaPropertyTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "propertyTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaPropertyValues :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Term v)
-schemaPropertyValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "propertyValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaVertexIdTypes :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Type t)
-schemaVertexIdTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "vertexIdTypes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaVertexIds :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Term v)
-schemaVertexIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-        Core.projectionField = (Core.Name "vertexIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-schemaWithAnnotations :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm Mapping.AnnotationSchema -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithAnnotations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithDefaultEdgeId :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm v -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithDefaultEdgeId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaWithDefaultVertexId :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm v -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithDefaultVertexId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithEdgeIdTypes :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Type t) -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithEdgeIdTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithEdgeIds :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Term v) -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithEdgeIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithPropertyTypes :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Type t) -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithPropertyTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithPropertyValues :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Term v) -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithPropertyValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithVertexIdTypes :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Type t) -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithVertexIdTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-schemaWithVertexIds :: Phantoms.TTerm (Mapping.Schema s t v) -> Phantoms.TTerm (Coders.Coder Core.Term v) -> Phantoms.TTerm (Mapping.Schema s t v)
-schemaWithVertexIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "vertexIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertexIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIdTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIdTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edgeIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "edgeIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyTypes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyTypes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "propertyValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "annotations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.mapping.Schema"),
-              Core.projectionField = (Core.Name "defaultEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-valueSpecPattern :: Phantoms.TTerm String -> Phantoms.TTerm Mapping.ValueSpec
-valueSpecPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ValueSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueSpecValue :: Phantoms.TTerm Mapping.ValueSpec
-valueSpecValue =
-    Phantoms.TTerm (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}}))
-
-vertexSpec :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm [Mapping.PropertySpec] -> Phantoms.TTerm Mapping.VertexSpec
-vertexSpec label id properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-vertexSpecId :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm Mapping.ValueSpec
-vertexSpecId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexSpecLabel :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm Model.VertexLabel
-vertexSpecLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexSpecProperties :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm [Mapping.PropertySpec]
-vertexSpecProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexSpecWithId :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm Mapping.ValueSpec -> Phantoms.TTerm Mapping.VertexSpec
-vertexSpecWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-      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.mapping.VertexSpec"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.VertexSpec"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexSpecWithLabel :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Mapping.VertexSpec
-vertexSpecWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.mapping.VertexSpec"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.VertexSpec"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexSpecWithProperties :: Phantoms.TTerm Mapping.VertexSpec -> Phantoms.TTerm [Mapping.PropertySpec] -> Phantoms.TTerm Mapping.VertexSpec
-vertexSpecWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-      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.mapping.VertexSpec"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.mapping.VertexSpec"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Mappings.hs b/src/main/haskell/Hydra/Dsl/Pg/Mappings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Mappings.hs
+++ /dev/null
@@ -1,65 +0,0 @@
--- | A DSL for defining mappings between relational data and property graphs in Hydra.
-module Hydra.Dsl.Pg.Mappings where
-
-import Hydra.Core
-import Hydra.Phantoms
-import Hydra.Rewriting
-import Hydra.Pg.Model
-import Hydra.Dsl.Meta.Phantoms
-
-import qualified Data.Map as M
-
--- * Helpers
-
-temporaryTableName = "(((temp)))"
-
-replaceTableName tableName = rewriteTerm $ \recurse term -> case term of
-  TermProject (Projection tname fname) -> if unName tname == temporaryTableName
-    then TermProject $ Projection (Name tableName) fname
-    else term
-  _ -> recurse term
-
--- * Graph construction functions
-
--- | Create a mapping function that selects a specified column from a table
-column :: String -> TTerm (r -> Maybe a)
-column sourceColumn = project (Name temporaryTableName) (Name sourceColumn)
-
--- | Create an edge with the given label, ID, source vertex, target vertex, and properties
--- Example: edge "social_network.csv" "knows" (constant unit) (column "person_1") (column "person_2")
---            [property "since" $ column "knows_since"]
-edge :: String -> String -> TTerm e -> TTerm vo -> TTerm vi -> [Property Term] -> Edge Term
-edge tableName label (TTerm idValue) (TTerm outValue) (TTerm inValue) propertiesList = Edge
-  (EdgeLabel label)
-  (replaceTableName tableName idValue)
-  (replaceTableName tableName outValue)
-  (replaceTableName tableName inValue)
-  (M.fromList $ fmap (\(Property k v) -> (k, replaceTableName tableName v)) propertiesList)
-
--- | Create an edge with a unit ID (when the edge id isn't significant)
--- Example: simpleEdge "social_network.csv" "knows" (column "person_1") (column "person_2")
---            [property "since" $ column "knows_since"]
-edgeNoId :: String -> String -> TTerm vo -> TTerm vi -> [Property Term] -> Edge Term
-edgeNoId tableName label = edge tableName label (constant unit)
-
--- | Create a lazy graph from vertices and edges, without enforcing id uniqueness
--- Example: graph [person1, person2] [knows]
--- Where:
---   person1 = vertex "Person" (string "p1") [property "name" (string "John")]
---   person2 = vertex "Person" (string "p2") [property "name" (string "Jane")]
---   knows = edge "knows" (string "e1") person1 person2 [property "since" (int32 2020)]
-graph :: [Vertex v] -> [Edge v] -> LazyGraph v
-graph = LazyGraph
-
--- | Create a property with the given key and value
--- Example: property "name" (string "John")
-property :: String -> TTerm v -> Property Term
-property key (TTerm value) = Property (PropertyKey key) value
-
--- | Create a vertex derived from the given table with the given label, ID, and properties
--- Example: vertex "people.csv" "Person" personId [property "name" (column "full_name"), property "age" (column "age)]
-vertex :: String -> String -> TTerm v -> [Property Term] -> Vertex Term
-vertex tableName label (TTerm idValue) propertiesList = Vertex
-  (VertexLabel label)
-  (replaceTableName tableName idValue)
-  (M.fromList $ fmap (\(Property k v) -> (k, replaceTableName tableName v)) propertiesList)
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Model.hs b/src/main/haskell/Hydra/Dsl/Pg/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Model.hs
+++ /dev/null
@@ -1,1598 +0,0 @@
--- 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.Pg.Model as Model
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-adjacentEdge :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm v -> Phantoms.TTerm v -> Phantoms.TTerm (M.Map Model.PropertyKey v) -> Phantoms.TTerm (Model.AdjacentEdge v)
-adjacentEdge label id vertex properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm vertex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-adjacentEdgeId :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm v
-adjacentEdgeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeLabel :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm Model.EdgeLabel
-adjacentEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeProperties :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm (M.Map Model.PropertyKey v)
-adjacentEdgeProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeVertex :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm v
-adjacentEdgeVertex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-        Core.projectionField = (Core.Name "vertex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-adjacentEdgeWithId :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.AdjacentEdge v)
-adjacentEdgeWithId original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-adjacentEdgeWithLabel :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm (Model.AdjacentEdge v)
-adjacentEdgeWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-adjacentEdgeWithProperties :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm (M.Map Model.PropertyKey v) -> Phantoms.TTerm (Model.AdjacentEdge v)
-adjacentEdgeWithProperties original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-adjacentEdgeWithVertex :: Phantoms.TTerm (Model.AdjacentEdge v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.AdjacentEdge v)
-adjacentEdgeWithVertex original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directionBoth :: Phantoms.TTerm Model.Direction
-directionBoth =
-    Phantoms.TTerm (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}}))
-
-directionIn :: Phantoms.TTerm Model.Direction
-directionIn =
-    Phantoms.TTerm (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}}))
-
-directionOut :: Phantoms.TTerm Model.Direction
-directionOut =
-    Phantoms.TTerm (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}}))
-
-directionUndirected :: Phantoms.TTerm Model.Direction
-directionUndirected =
-    Phantoms.TTerm (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}}))
-
-edge :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm v -> Phantoms.TTerm v -> Phantoms.TTerm v -> Phantoms.TTerm (M.Map Model.PropertyKey v) -> Phantoms.TTerm (Model.Edge v)
-edge label id out in_ properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm out)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-edgeId :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm v
-edgeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeIn :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm v
-edgeIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeLabel :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm Model.EdgeLabel
-edgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeLabel_ :: Phantoms.TTerm String -> Phantoms.TTerm Model.EdgeLabel
-edgeLabel_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.EdgeLabel"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-edgeOut :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm v
-edgeOut x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-        Core.projectionField = (Core.Name "out")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeProperties :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm (M.Map Model.PropertyKey v)
-edgeProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeType :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm t -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm [Model.PropertyType t] -> Phantoms.TTerm (Model.EdgeType t)
-edgeType label id out in_ properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm out)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-edgeTypeId :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm t
-edgeTypeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeIn :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm Model.VertexLabel
-edgeTypeIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeLabel :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm Model.EdgeLabel
-edgeTypeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeOut :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm Model.VertexLabel
-edgeTypeOut x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-        Core.projectionField = (Core.Name "out")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeProperties :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm [Model.PropertyType t]
-edgeTypeProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeTypeWithId :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm t -> Phantoms.TTerm (Model.EdgeType t)
-edgeTypeWithId original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypeWithIn :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm (Model.EdgeType t)
-edgeTypeWithIn original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypeWithLabel :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm (Model.EdgeType t)
-edgeTypeWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypeWithOut :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm (Model.EdgeType t)
-edgeTypeWithOut original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeTypeWithProperties :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm [Model.PropertyType t] -> Phantoms.TTerm (Model.EdgeType t)
-edgeTypeWithProperties original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeWithId :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.Edge v)
-edgeWithId original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeWithIn :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.Edge v)
-edgeWithIn original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeWithLabel :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm (Model.Edge v)
-edgeWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeWithOut :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.Edge v)
-edgeWithOut original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeWithProperties :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm (M.Map Model.PropertyKey v) -> Phantoms.TTerm (Model.Edge v)
-edgeWithProperties original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementEdge :: Phantoms.TTerm (Model.Edge v) -> Phantoms.TTerm (Model.Element v)
-elementEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementKindEdge :: Phantoms.TTerm Model.ElementKind
-elementKindEdge =
-    Phantoms.TTerm (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}}))
-
-elementKindVertex :: Phantoms.TTerm Model.ElementKind
-elementKindVertex =
-    Phantoms.TTerm (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}}))
-
-elementTree :: Phantoms.TTerm (Model.Element v) -> Phantoms.TTerm [Model.ElementTree v] -> Phantoms.TTerm (Model.ElementTree v)
-elementTree self dependencies =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Phantoms.unTTerm self)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm dependencies)}]}))
-
-elementTreeDependencies :: Phantoms.TTerm (Model.ElementTree v) -> Phantoms.TTerm [Model.ElementTree v]
-elementTreeDependencies x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-        Core.projectionField = (Core.Name "dependencies")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementTreeSelf :: Phantoms.TTerm (Model.ElementTree v) -> Phantoms.TTerm (Model.Element v)
-elementTreeSelf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-        Core.projectionField = (Core.Name "self")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementTreeWithDependencies :: Phantoms.TTerm (Model.ElementTree v) -> Phantoms.TTerm [Model.ElementTree v] -> Phantoms.TTerm (Model.ElementTree v)
-elementTreeWithDependencies original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "self")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementTreeWithSelf :: Phantoms.TTerm (Model.ElementTree v) -> Phantoms.TTerm (Model.Element v) -> Phantoms.TTerm (Model.ElementTree v)
-elementTreeWithSelf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "dependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementTypeEdge :: Phantoms.TTerm (Model.EdgeType t) -> Phantoms.TTerm (Model.ElementType t)
-elementTypeEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementTypeTree :: Phantoms.TTerm (Model.ElementType t) -> Phantoms.TTerm [Model.ElementTypeTree t] -> Phantoms.TTerm (Model.ElementTypeTree t)
-elementTypeTree self dependencies =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Phantoms.unTTerm self)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm dependencies)}]}))
-
-elementTypeTreeDependencies :: Phantoms.TTerm (Model.ElementTypeTree t) -> Phantoms.TTerm [Model.ElementTypeTree t]
-elementTypeTreeDependencies x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-        Core.projectionField = (Core.Name "dependencies")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementTypeTreeSelf :: Phantoms.TTerm (Model.ElementTypeTree t) -> Phantoms.TTerm (Model.ElementType t)
-elementTypeTreeSelf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-        Core.projectionField = (Core.Name "self")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementTypeTreeWithDependencies :: Phantoms.TTerm (Model.ElementTypeTree t) -> Phantoms.TTerm [Model.ElementTypeTree t] -> Phantoms.TTerm (Model.ElementTypeTree t)
-elementTypeTreeWithDependencies original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "self")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementTypeTreeWithSelf :: Phantoms.TTerm (Model.ElementTypeTree t) -> Phantoms.TTerm (Model.ElementType t) -> Phantoms.TTerm (Model.ElementTypeTree t)
-elementTypeTreeWithSelf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "dependencies")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementTypeVertex :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm (Model.ElementType t)
-elementTypeVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-elementVertex :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm (Model.Element v)
-elementVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-graph :: Ord v => (Phantoms.TTerm (M.Map v (Model.Vertex v)) -> Phantoms.TTerm (M.Map v (Model.Edge v)) -> Phantoms.TTerm (Model.Graph v))
-graph vertices edges =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertices"),
-          Core.fieldTerm = (Phantoms.unTTerm vertices)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))
-
-graphEdges :: Ord v => (Phantoms.TTerm (Model.Graph v) -> Phantoms.TTerm (M.Map v (Model.Edge v)))
-graphEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
-        Core.projectionField = (Core.Name "edges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphSchema :: Phantoms.TTerm (M.Map Model.VertexLabel (Model.VertexType t)) -> Phantoms.TTerm (M.Map Model.EdgeLabel (Model.EdgeType t)) -> Phantoms.TTerm (Model.GraphSchema t)
-graphSchema vertices edges =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertices"),
-          Core.fieldTerm = (Phantoms.unTTerm vertices)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))
-
-graphSchemaEdges :: Phantoms.TTerm (Model.GraphSchema t) -> Phantoms.TTerm (M.Map Model.EdgeLabel (Model.EdgeType t))
-graphSchemaEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-        Core.projectionField = (Core.Name "edges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphSchemaVertices :: Phantoms.TTerm (Model.GraphSchema t) -> Phantoms.TTerm (M.Map Model.VertexLabel (Model.VertexType t))
-graphSchemaVertices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-        Core.projectionField = (Core.Name "vertices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphSchemaWithEdges :: Phantoms.TTerm (Model.GraphSchema t) -> Phantoms.TTerm (M.Map Model.EdgeLabel (Model.EdgeType t)) -> Phantoms.TTerm (Model.GraphSchema t)
-graphSchemaWithEdges original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "vertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphSchemaWithVertices :: Phantoms.TTerm (Model.GraphSchema t) -> Phantoms.TTerm (M.Map Model.VertexLabel (Model.VertexType t)) -> Phantoms.TTerm (Model.GraphSchema t)
-graphSchemaWithVertices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertices"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphVertices :: Ord v => (Phantoms.TTerm (Model.Graph v) -> Phantoms.TTerm (M.Map v (Model.Vertex v)))
-graphVertices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
-        Core.projectionField = (Core.Name "vertices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphWithEdges :: Ord v => (Phantoms.TTerm (Model.Graph v) -> Phantoms.TTerm (M.Map v (Model.Edge v)) -> Phantoms.TTerm (Model.Graph v))
-graphWithEdges original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "vertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphWithVertices :: Ord v => (Phantoms.TTerm (Model.Graph v) -> Phantoms.TTerm (M.Map v (Model.Vertex v)) -> Phantoms.TTerm (Model.Graph v))
-graphWithVertices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertices"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-labelEdge :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm Model.Label
-labelEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-labelVertex :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm Model.Label
-labelVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lazyGraph :: Phantoms.TTerm [Model.Vertex v] -> Phantoms.TTerm [Model.Edge v] -> Phantoms.TTerm (Model.LazyGraph v)
-lazyGraph vertices edges =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertices"),
-          Core.fieldTerm = (Phantoms.unTTerm vertices)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))
-
-lazyGraphEdges :: Phantoms.TTerm (Model.LazyGraph v) -> Phantoms.TTerm [Model.Edge v]
-lazyGraphEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-        Core.projectionField = (Core.Name "edges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lazyGraphVertices :: Phantoms.TTerm (Model.LazyGraph v) -> Phantoms.TTerm [Model.Vertex v]
-lazyGraphVertices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-        Core.projectionField = (Core.Name "vertices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lazyGraphWithEdges :: Phantoms.TTerm (Model.LazyGraph v) -> Phantoms.TTerm [Model.Edge v] -> Phantoms.TTerm (Model.LazyGraph v)
-lazyGraphWithEdges original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "vertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lazyGraphWithVertices :: Phantoms.TTerm (Model.LazyGraph v) -> Phantoms.TTerm [Model.Vertex v] -> Phantoms.TTerm (Model.LazyGraph v)
-lazyGraphWithVertices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertices"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-property :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm v -> Phantoms.TTerm (Model.Property v)
-property key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertyKey :: Phantoms.TTerm (Model.Property v) -> Phantoms.TTerm Model.PropertyKey
-propertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyKey_ :: Phantoms.TTerm String -> Phantoms.TTerm Model.PropertyKey
-propertyKey_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.PropertyKey"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-propertyType :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm t -> Phantoms.TTerm Bool -> Phantoms.TTerm (Model.PropertyType t)
-propertyType key value required =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "required"),
-          Core.fieldTerm = (Phantoms.unTTerm required)}]}))
-
-propertyTypeKey :: Phantoms.TTerm (Model.PropertyType t) -> Phantoms.TTerm Model.PropertyKey
-propertyTypeKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyTypeRequired :: Phantoms.TTerm (Model.PropertyType t) -> Phantoms.TTerm Bool
-propertyTypeRequired x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-        Core.projectionField = (Core.Name "required")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyTypeValue :: Phantoms.TTerm (Model.PropertyType t) -> Phantoms.TTerm t
-propertyTypeValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyTypeWithKey :: Phantoms.TTerm (Model.PropertyType t) -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm (Model.PropertyType t)
-propertyTypeWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "required")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyTypeWithRequired :: Phantoms.TTerm (Model.PropertyType t) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Model.PropertyType t)
-propertyTypeWithRequired original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "required"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyTypeWithValue :: Phantoms.TTerm (Model.PropertyType t) -> Phantoms.TTerm t -> Phantoms.TTerm (Model.PropertyType t)
-propertyTypeWithValue original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "required")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyValue :: Phantoms.TTerm (Model.Property v) -> Phantoms.TTerm v
-propertyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyWithKey :: Phantoms.TTerm (Model.Property v) -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm (Model.Property v)
-propertyWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithValue :: Phantoms.TTerm (Model.Property v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.Property v)
-propertyWithValue original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unEdgeLabel :: Phantoms.TTerm Model.EdgeLabel -> Phantoms.TTerm String
-unEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.EdgeLabel")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPropertyKey :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm String
-unPropertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.PropertyKey")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVertexLabel :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm String
-unVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.VertexLabel")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertex :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm v -> Phantoms.TTerm (M.Map Model.PropertyKey v) -> Phantoms.TTerm (Model.Vertex v)
-vertex label id properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-vertexId :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm v
-vertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexLabel :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm Model.VertexLabel
-vertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexLabel_ :: Phantoms.TTerm String -> Phantoms.TTerm Model.VertexLabel
-vertexLabel_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.VertexLabel"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-vertexProperties :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm (M.Map Model.PropertyKey v)
-vertexProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexType :: Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm t -> Phantoms.TTerm [Model.PropertyType t] -> Phantoms.TTerm (Model.VertexType t)
-vertexType label id properties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)}]}))
-
-vertexTypeId :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm t
-vertexTypeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexTypeLabel :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm Model.VertexLabel
-vertexTypeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexTypeProperties :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm [Model.PropertyType t]
-vertexTypeProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexTypeWithId :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm t -> Phantoms.TTerm (Model.VertexType t)
-vertexTypeWithId original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexTypeWithLabel :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm (Model.VertexType t)
-vertexTypeWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexTypeWithProperties :: Phantoms.TTerm (Model.VertexType t) -> Phantoms.TTerm [Model.PropertyType t] -> Phantoms.TTerm (Model.VertexType t)
-vertexTypeWithProperties original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vertexWithAdjacentEdges :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm [Model.AdjacentEdge v] -> Phantoms.TTerm [Model.AdjacentEdge v] -> Phantoms.TTerm (Model.VertexWithAdjacentEdges v)
-vertexWithAdjacentEdges vertex ins outs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm vertex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ins"),
-          Core.fieldTerm = (Phantoms.unTTerm ins)},
-        Core.Field {
-          Core.fieldName = (Core.Name "outs"),
-          Core.fieldTerm = (Phantoms.unTTerm outs)}]}))
-
-vertexWithAdjacentEdgesIns :: Phantoms.TTerm (Model.VertexWithAdjacentEdges v) -> Phantoms.TTerm [Model.AdjacentEdge v]
-vertexWithAdjacentEdgesIns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-        Core.projectionField = (Core.Name "ins")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexWithAdjacentEdgesOuts :: Phantoms.TTerm (Model.VertexWithAdjacentEdges v) -> Phantoms.TTerm [Model.AdjacentEdge v]
-vertexWithAdjacentEdgesOuts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-        Core.projectionField = (Core.Name "outs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexWithAdjacentEdgesVertex :: Phantoms.TTerm (Model.VertexWithAdjacentEdges v) -> Phantoms.TTerm (Model.Vertex v)
-vertexWithAdjacentEdgesVertex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-        Core.projectionField = (Core.Name "vertex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexWithAdjacentEdgesWithIns :: Phantoms.TTerm (Model.VertexWithAdjacentEdges v) -> Phantoms.TTerm [Model.AdjacentEdge v] -> Phantoms.TTerm (Model.VertexWithAdjacentEdges v)
-vertexWithAdjacentEdgesWithIns original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ins"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "outs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithAdjacentEdgesWithOuts :: Phantoms.TTerm (Model.VertexWithAdjacentEdges v) -> Phantoms.TTerm [Model.AdjacentEdge v] -> Phantoms.TTerm (Model.VertexWithAdjacentEdges v)
-vertexWithAdjacentEdgesWithOuts original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "ins")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "outs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vertexWithAdjacentEdgesWithVertex :: Phantoms.TTerm (Model.VertexWithAdjacentEdges v) -> Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm (Model.VertexWithAdjacentEdges v)
-vertexWithAdjacentEdgesWithVertex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "ins")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "outs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithId :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm v -> Phantoms.TTerm (Model.Vertex v)
-vertexWithId original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithLabel :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm Model.VertexLabel -> Phantoms.TTerm (Model.Vertex v)
-vertexWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexWithProperties :: Phantoms.TTerm (Model.Vertex v) -> Phantoms.TTerm (M.Map Model.PropertyKey v) -> Phantoms.TTerm (Model.Vertex v)
-vertexWithProperties original newVal =
-    Phantoms.TTerm (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.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Query.hs b/src/main/haskell/Hydra/Dsl/Pg/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Query.hs
+++ /dev/null
@@ -1,1368 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.pg.query
-
-module Hydra.Dsl.Pg.Query where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Pg.Model as Model
-import qualified Hydra.Pg.Query as Query
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-aggregationQueryCount :: Phantoms.TTerm Query.AggregationQuery
-aggregationQueryCount =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.AggregationQuery"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "count"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-applicationQuery :: Phantoms.TTerm [Query.Query] -> Phantoms.TTerm Query.ApplicationQuery
-applicationQuery x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.query.ApplicationQuery"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-associativeExpression :: Phantoms.TTerm Query.BinaryOperator -> Phantoms.TTerm [Query.Expression] -> Phantoms.TTerm Query.AssociativeExpression
-associativeExpression operator operands =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operands"),
-          Core.fieldTerm = (Phantoms.unTTerm operands)}]}))
-
-associativeExpressionOperands :: Phantoms.TTerm Query.AssociativeExpression -> Phantoms.TTerm [Query.Expression]
-associativeExpressionOperands x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-        Core.projectionField = (Core.Name "operands")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-associativeExpressionOperator :: Phantoms.TTerm Query.AssociativeExpression -> Phantoms.TTerm Query.BinaryOperator
-associativeExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-associativeExpressionWithOperands :: Phantoms.TTerm Query.AssociativeExpression -> Phantoms.TTerm [Query.Expression] -> Phantoms.TTerm Query.AssociativeExpression
-associativeExpressionWithOperands original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operands"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-associativeExpressionWithOperator :: Phantoms.TTerm Query.AssociativeExpression -> Phantoms.TTerm Query.BinaryOperator -> Phantoms.TTerm Query.AssociativeExpression
-associativeExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operands"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.AssociativeExpression"),
-              Core.projectionField = (Core.Name "operands")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryBooleanOperatorAnd :: Phantoms.TTerm Query.BinaryBooleanOperator
-binaryBooleanOperatorAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.BinaryBooleanOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryBooleanOperatorOr :: Phantoms.TTerm Query.BinaryBooleanOperator
-binaryBooleanOperatorOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.BinaryBooleanOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryBooleanOperatorXor :: Phantoms.TTerm Query.BinaryBooleanOperator
-binaryBooleanOperatorXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.BinaryBooleanOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryExpression :: Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.BinaryOperator -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.BinaryExpression
-binaryExpression left operator right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryExpressionLeft :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.Expression
-binaryExpressionLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionOperator :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.BinaryOperator
-binaryExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionRight :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.Expression
-binaryExpressionRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExpressionWithLeft :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.BinaryExpression
-binaryExpressionWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExpressionWithOperator :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.BinaryOperator -> Phantoms.TTerm Query.BinaryExpression
-binaryExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExpressionWithRight :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.BinaryExpression
-binaryExpressionWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.BinaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOperatorBoolean :: Phantoms.TTerm Query.BinaryBooleanOperator -> Phantoms.TTerm Query.BinaryOperator
-binaryOperatorBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binaryOperatorComparison :: Phantoms.TTerm Query.ComparisonOperator -> Phantoms.TTerm Query.BinaryOperator
-binaryOperatorComparison x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "comparison"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binaryOperatorPower :: Phantoms.TTerm Query.BinaryOperator
-binaryOperatorPower =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.BinaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "power"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binding :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm Query.Query -> Phantoms.TTerm Query.Binding
-binding key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-bindingKey :: Phantoms.TTerm Query.Binding -> Phantoms.TTerm Query.Variable
-bindingKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.Binding"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingValue :: Phantoms.TTerm Query.Binding -> Phantoms.TTerm Query.Query
-bindingValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.Binding"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bindingWithKey :: Phantoms.TTerm Query.Binding -> Phantoms.TTerm Query.Variable -> Phantoms.TTerm Query.Binding
-bindingWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.Binding"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bindingWithValue :: Phantoms.TTerm Query.Binding -> Phantoms.TTerm Query.Query -> Phantoms.TTerm Query.Binding
-bindingWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Binding"),
-      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.query.Binding"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-comparisonOperatorEq :: Phantoms.TTerm Query.ComparisonOperator
-comparisonOperatorEq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorGt :: Phantoms.TTerm Query.ComparisonOperator
-comparisonOperatorGt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorGte :: Phantoms.TTerm Query.ComparisonOperator
-comparisonOperatorGte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorLt :: Phantoms.TTerm Query.ComparisonOperator
-comparisonOperatorLt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorLte :: Phantoms.TTerm Query.ComparisonOperator
-comparisonOperatorLte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparisonOperatorNeq :: Phantoms.TTerm Query.ComparisonOperator
-comparisonOperatorNeq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.ComparisonOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "neq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-edgeProjectionPattern :: Phantoms.TTerm Model.Direction -> Phantoms.TTerm (Maybe Model.EdgeLabel) -> Phantoms.TTerm [Query.PropertyPattern] -> Phantoms.TTerm (Maybe Query.VertexPattern) -> Phantoms.TTerm Query.EdgeProjectionPattern
-edgeProjectionPattern direction label properties vertex =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm direction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm vertex)}]}))
-
-edgeProjectionPatternDirection :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm Model.Direction
-edgeProjectionPatternDirection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-        Core.projectionField = (Core.Name "direction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeProjectionPatternLabel :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm (Maybe Model.EdgeLabel)
-edgeProjectionPatternLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeProjectionPatternProperties :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm [Query.PropertyPattern]
-edgeProjectionPatternProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeProjectionPatternVertex :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm (Maybe Query.VertexPattern)
-edgeProjectionPatternVertex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-        Core.projectionField = (Core.Name "vertex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeProjectionPatternWithDirection :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm Model.Direction -> Phantoms.TTerm Query.EdgeProjectionPattern
-edgeProjectionPatternWithDirection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeProjectionPatternWithLabel :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm (Maybe Model.EdgeLabel) -> Phantoms.TTerm Query.EdgeProjectionPattern
-edgeProjectionPatternWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeProjectionPatternWithProperties :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm [Query.PropertyPattern] -> Phantoms.TTerm Query.EdgeProjectionPattern
-edgeProjectionPatternWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeProjectionPatternWithVertex :: Phantoms.TTerm Query.EdgeProjectionPattern -> Phantoms.TTerm (Maybe Query.VertexPattern) -> Phantoms.TTerm Query.EdgeProjectionPattern
-edgeProjectionPatternWithVertex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.EdgeProjectionPattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-expressionAssociative :: Phantoms.TTerm Query.AssociativeExpression -> Phantoms.TTerm Query.Expression
-expressionAssociative x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "associative"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBinary :: Phantoms.TTerm Query.BinaryExpression -> Phantoms.TTerm Query.Expression
-expressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionProperty :: Phantoms.TTerm Query.PropertyProjection -> Phantoms.TTerm Query.Expression
-expressionProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionUnary :: Phantoms.TTerm Query.UnaryExpression -> Phantoms.TTerm Query.Expression
-expressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionVariable :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm Query.Expression
-expressionVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionVertex :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm Query.Expression
-expressionVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-letQuery :: Phantoms.TTerm [Query.Binding] -> Phantoms.TTerm Query.Query -> Phantoms.TTerm Query.LetQuery
-letQuery bindings environment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Phantoms.unTTerm environment)}]}))
-
-letQueryBindings :: Phantoms.TTerm Query.LetQuery -> Phantoms.TTerm [Query.Binding]
-letQueryBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letQueryEnvironment :: Phantoms.TTerm Query.LetQuery -> Phantoms.TTerm Query.Query
-letQueryEnvironment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-        Core.projectionField = (Core.Name "environment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letQueryWithBindings :: Phantoms.TTerm Query.LetQuery -> Phantoms.TTerm [Query.Binding] -> Phantoms.TTerm Query.LetQuery
-letQueryWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letQueryWithEnvironment :: Phantoms.TTerm Query.LetQuery -> Phantoms.TTerm Query.Query -> Phantoms.TTerm Query.LetQuery
-letQueryWithEnvironment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.LetQuery"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-matchQuery :: Phantoms.TTerm Bool -> Phantoms.TTerm [Query.Projection] -> Phantoms.TTerm (Maybe Query.Expression) -> Phantoms.TTerm Query.MatchQuery
-matchQuery optional pattern where_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm optional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm where_)}]}))
-
-matchQueryOptional :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm Bool
-matchQueryOptional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-        Core.projectionField = (Core.Name "optional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchQueryPattern :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm [Query.Projection]
-matchQueryPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchQueryWhere :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm (Maybe Query.Expression)
-matchQueryWhere x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-        Core.projectionField = (Core.Name "where")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchQueryWithOptional :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm Bool -> Phantoms.TTerm Query.MatchQuery
-matchQueryWithOptional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchQueryWithPattern :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm [Query.Projection] -> Phantoms.TTerm Query.MatchQuery
-matchQueryWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-              Core.projectionField = (Core.Name "where")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchQueryWithWhere :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm (Maybe Query.Expression) -> Phantoms.TTerm Query.MatchQuery
-matchQueryWithWhere original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "optional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-              Core.projectionField = (Core.Name "optional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.MatchQuery"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "where"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projection :: Phantoms.TTerm Query.Expression -> Phantoms.TTerm (Maybe Query.Variable) -> Phantoms.TTerm Query.Projection
-projection value as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-projectionAs :: Phantoms.TTerm Query.Projection -> Phantoms.TTerm (Maybe Query.Variable)
-projectionAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.Projection"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionValue :: Phantoms.TTerm Query.Projection -> Phantoms.TTerm Query.Expression
-projectionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.Projection"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionWithAs :: Phantoms.TTerm Query.Projection -> Phantoms.TTerm (Maybe Query.Variable) -> Phantoms.TTerm Query.Projection
-projectionWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Projection"),
-      Core.recordFields = [
-        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.query.Projection"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-projectionWithValue :: Phantoms.TTerm Query.Projection -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.Projection
-projectionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.Projection"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projections :: Phantoms.TTerm Bool -> Phantoms.TTerm [Query.Projection] -> Phantoms.TTerm Query.Projections
-projections all explicit =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Projections"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm all)},
-        Core.Field {
-          Core.fieldName = (Core.Name "explicit"),
-          Core.fieldTerm = (Phantoms.unTTerm explicit)}]}))
-
-projectionsAll :: Phantoms.TTerm Query.Projections -> Phantoms.TTerm Bool
-projectionsAll x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.Projections"),
-        Core.projectionField = (Core.Name "all")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionsExplicit :: Phantoms.TTerm Query.Projections -> Phantoms.TTerm [Query.Projection]
-projectionsExplicit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.Projections"),
-        Core.projectionField = (Core.Name "explicit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-projectionsWithAll :: Phantoms.TTerm Query.Projections -> Phantoms.TTerm Bool -> Phantoms.TTerm Query.Projections
-projectionsWithAll original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Projections"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "explicit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.Projections"),
-              Core.projectionField = (Core.Name "explicit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-projectionsWithExplicit :: Phantoms.TTerm Query.Projections -> Phantoms.TTerm [Query.Projection] -> Phantoms.TTerm Query.Projections
-projectionsWithExplicit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.Projections"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "all"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.Projections"),
-              Core.projectionField = (Core.Name "all")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "explicit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyPattern :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Query.PropertyValuePattern -> Phantoms.TTerm Query.PropertyPattern
-propertyPattern key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.PropertyPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-propertyPatternKey :: Phantoms.TTerm Query.PropertyPattern -> Phantoms.TTerm Model.PropertyKey
-propertyPatternKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.PropertyPattern"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyPatternValue :: Phantoms.TTerm Query.PropertyPattern -> Phantoms.TTerm Query.PropertyValuePattern
-propertyPatternValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.PropertyPattern"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyPatternWithKey :: Phantoms.TTerm Query.PropertyPattern -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Query.PropertyPattern
-propertyPatternWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.PropertyPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.PropertyPattern"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyPatternWithValue :: Phantoms.TTerm Query.PropertyPattern -> Phantoms.TTerm Query.PropertyValuePattern -> Phantoms.TTerm Query.PropertyPattern
-propertyPatternWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.PropertyPattern"),
-      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.query.PropertyPattern"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyProjection :: Phantoms.TTerm Query.Expression -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Query.PropertyProjection
-propertyProjection base key =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.PropertyProjection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm base)},
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)}]}))
-
-propertyProjectionBase :: Phantoms.TTerm Query.PropertyProjection -> Phantoms.TTerm Query.Expression
-propertyProjectionBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.PropertyProjection"),
-        Core.projectionField = (Core.Name "base")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyProjectionKey :: Phantoms.TTerm Query.PropertyProjection -> Phantoms.TTerm Model.PropertyKey
-propertyProjectionKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.PropertyProjection"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyProjectionWithBase :: Phantoms.TTerm Query.PropertyProjection -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.PropertyProjection
-propertyProjectionWithBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.PropertyProjection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        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.query.PropertyProjection"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyProjectionWithKey :: Phantoms.TTerm Query.PropertyProjection -> Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Query.PropertyProjection
-propertyProjectionWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.PropertyProjection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "base"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.PropertyProjection"),
-              Core.projectionField = (Core.Name "base")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyValue :: Phantoms.TTerm String -> Phantoms.TTerm Query.PropertyValue
-propertyValue x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.query.PropertyValue"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-propertyValuePatternValue :: Phantoms.TTerm String -> Phantoms.TTerm Query.PropertyValuePattern
-propertyValuePatternValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.PropertyValuePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyValuePatternVariable :: Phantoms.TTerm Model.PropertyKey -> Phantoms.TTerm Query.PropertyValuePattern
-propertyValuePatternVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.PropertyValuePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryAggregate :: Phantoms.TTerm Query.AggregationQuery -> Phantoms.TTerm Query.Query
-queryAggregate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aggregate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryApplication :: Phantoms.TTerm Query.ApplicationQuery -> Phantoms.TTerm Query.Query
-queryApplication x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryLetQuery :: Phantoms.TTerm Query.LetQuery -> Phantoms.TTerm Query.Query
-queryLetQuery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "LetQuery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryMatch :: Phantoms.TTerm Query.MatchQuery -> Phantoms.TTerm Query.Query
-queryMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-querySelect :: Phantoms.TTerm Query.SelectQuery -> Phantoms.TTerm Query.Query
-querySelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryValue :: Phantoms.TTerm String -> Phantoms.TTerm Query.Query
-queryValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectQuery :: Phantoms.TTerm Bool -> Phantoms.TTerm Query.Projections -> Phantoms.TTerm Query.SelectQuery
-selectQuery distinct projection =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Phantoms.unTTerm distinct)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm projection)}]}))
-
-selectQueryDistinct :: Phantoms.TTerm Query.SelectQuery -> Phantoms.TTerm Bool
-selectQueryDistinct x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-        Core.projectionField = (Core.Name "distinct")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectQueryProjection :: Phantoms.TTerm Query.SelectQuery -> Phantoms.TTerm Query.Projections
-selectQueryProjection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-        Core.projectionField = (Core.Name "projection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-selectQueryWithDistinct :: Phantoms.TTerm Query.SelectQuery -> Phantoms.TTerm Bool -> Phantoms.TTerm Query.SelectQuery
-selectQueryWithDistinct original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-              Core.projectionField = (Core.Name "projection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-selectQueryWithProjection :: Phantoms.TTerm Query.SelectQuery -> Phantoms.TTerm Query.Projections -> Phantoms.TTerm Query.SelectQuery
-selectQueryWithProjection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "distinct"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.SelectQuery"),
-              Core.projectionField = (Core.Name "distinct")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "projection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unApplicationQuery :: Phantoms.TTerm Query.ApplicationQuery -> Phantoms.TTerm [Query.Query]
-unApplicationQuery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.query.ApplicationQuery")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPropertyValue :: Phantoms.TTerm Query.PropertyValue -> Phantoms.TTerm String
-unPropertyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.query.PropertyValue")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unVariable :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm String
-unVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.query.Variable")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpression :: Phantoms.TTerm Query.UnaryOperator -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.UnaryExpression
-unaryExpression operator operand =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)}]}))
-
-unaryExpressionOperand :: Phantoms.TTerm Query.UnaryExpression -> Phantoms.TTerm Query.Expression
-unaryExpressionOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionOperator :: Phantoms.TTerm Query.UnaryExpression -> Phantoms.TTerm Query.UnaryOperator
-unaryExpressionOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExpressionWithOperand :: Phantoms.TTerm Query.UnaryExpression -> Phantoms.TTerm Query.Expression -> Phantoms.TTerm Query.UnaryExpression
-unaryExpressionWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryExpressionWithOperator :: Phantoms.TTerm Query.UnaryExpression -> Phantoms.TTerm Query.UnaryOperator -> Phantoms.TTerm Query.UnaryExpression
-unaryExpressionWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.UnaryExpression"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryOperatorNegate :: Phantoms.TTerm Query.UnaryOperator
-unaryOperatorNegate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.pg.query.UnaryOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-variable :: Phantoms.TTerm String -> Phantoms.TTerm Query.Variable
-variable x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.pg.query.Variable"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-vertexPattern :: Phantoms.TTerm (Maybe Query.Variable) -> Phantoms.TTerm (Maybe Model.VertexLabel) -> Phantoms.TTerm [Query.PropertyPattern] -> Phantoms.TTerm [Query.EdgeProjectionPattern] -> Phantoms.TTerm Query.VertexPattern
-vertexPattern variable label properties edges =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm variable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))
-
-vertexPatternEdges :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm [Query.EdgeProjectionPattern]
-vertexPatternEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-        Core.projectionField = (Core.Name "edges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPatternLabel :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm (Maybe Model.VertexLabel)
-vertexPatternLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPatternProperties :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm [Query.PropertyPattern]
-vertexPatternProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPatternVariable :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm (Maybe Query.Variable)
-vertexPatternVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-        Core.projectionField = (Core.Name "variable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPatternWithEdges :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm [Query.EdgeProjectionPattern] -> Phantoms.TTerm Query.VertexPattern
-vertexPatternWithEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vertexPatternWithLabel :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm (Maybe Model.VertexLabel) -> Phantoms.TTerm Query.VertexPattern
-vertexPatternWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexPatternWithProperties :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm [Query.PropertyPattern] -> Phantoms.TTerm Query.VertexPattern
-vertexPatternWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-              Core.projectionField = (Core.Name "variable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexPatternWithVariable :: Phantoms.TTerm Query.VertexPattern -> Phantoms.TTerm (Maybe Query.Variable) -> Phantoms.TTerm Query.VertexPattern
-vertexPatternWithVariable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.query.VertexPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        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.query.VertexPattern"),
-              Core.projectionField = (Core.Name "edges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Rdf/Environment.hs b/src/main/haskell/Hydra/Dsl/Pg/Rdf/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Rdf/Environment.hs
+++ /dev/null
@@ -1,349 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.pg.rdf.environment
-
-module Hydra.Dsl.Pg.Rdf.Environment where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Pg.Model as Model
-import qualified Hydra.Pg.Rdf.Environment as Environment
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Rdf.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-pgRdfEnvironment :: Phantoms.TTerm (v -> Syntax.Iri) -> Phantoms.TTerm (Model.VertexLabel -> Syntax.Iri) -> Phantoms.TTerm (v -> Syntax.Iri) -> Phantoms.TTerm (Model.EdgeLabel -> Syntax.Iri) -> Phantoms.TTerm (Model.PropertyKey -> Syntax.Iri) -> Phantoms.TTerm (v -> Syntax.Literal) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironment encodeVertexId encodeVertexLabel encodeEdgeId encodeEdgeLabel encodePropertyKey encodePropertyValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm encodeVertexId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm encodeVertexLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Phantoms.unTTerm encodeEdgeId)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm encodeEdgeLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Phantoms.unTTerm encodePropertyKey)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Phantoms.unTTerm encodePropertyValue)}]}))
-
-pgRdfEnvironmentEncodeEdgeId :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (v -> Syntax.Iri)
-pgRdfEnvironmentEncodeEdgeId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-        Core.projectionField = (Core.Name "encodeEdgeId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pgRdfEnvironmentEncodeEdgeLabel :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (Model.EdgeLabel -> Syntax.Iri)
-pgRdfEnvironmentEncodeEdgeLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-        Core.projectionField = (Core.Name "encodeEdgeLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pgRdfEnvironmentEncodePropertyKey :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (Model.PropertyKey -> Syntax.Iri)
-pgRdfEnvironmentEncodePropertyKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-        Core.projectionField = (Core.Name "encodePropertyKey")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pgRdfEnvironmentEncodePropertyValue :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (v -> Syntax.Literal)
-pgRdfEnvironmentEncodePropertyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-        Core.projectionField = (Core.Name "encodePropertyValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pgRdfEnvironmentEncodeVertexId :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (v -> Syntax.Iri)
-pgRdfEnvironmentEncodeVertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-        Core.projectionField = (Core.Name "encodeVertexId")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pgRdfEnvironmentEncodeVertexLabel :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (Model.VertexLabel -> Syntax.Iri)
-pgRdfEnvironmentEncodeVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-        Core.projectionField = (Core.Name "encodeVertexLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pgRdfEnvironmentWithEncodeEdgeId :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (v -> Syntax.Iri) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironmentWithEncodeEdgeId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pgRdfEnvironmentWithEncodeEdgeLabel :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (Model.EdgeLabel -> Syntax.Iri) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironmentWithEncodeEdgeLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pgRdfEnvironmentWithEncodePropertyKey :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (Model.PropertyKey -> Syntax.Iri) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironmentWithEncodePropertyKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pgRdfEnvironmentWithEncodePropertyValue :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (v -> Syntax.Literal) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironmentWithEncodePropertyValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pgRdfEnvironmentWithEncodeVertexId :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (v -> Syntax.Iri) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironmentWithEncodeVertexId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pgRdfEnvironmentWithEncodeVertexLabel :: Phantoms.TTerm (Environment.PgRdfEnvironment v) -> Phantoms.TTerm (Model.VertexLabel -> Syntax.Iri) -> Phantoms.TTerm (Environment.PgRdfEnvironment v)
-pgRdfEnvironmentWithEncodeVertexLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeVertexId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeVertexLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeId"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeId")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodeEdgeLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodeEdgeLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyKey"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyKey")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "encodePropertyValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"),
-              Core.projectionField = (Core.Name "encodePropertyValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Schemas.hs b/src/main/haskell/Hydra/Dsl/Pg/Schemas.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Pg/Schemas.hs
+++ /dev/null
@@ -1,76 +0,0 @@
--- | A DSL for constructing property graph schemas and instances in Hydra.
-module Hydra.Dsl.Pg.Schemas where
-
-import Hydra.Pg.Model
-import Hydra.Core
-import qualified Hydra.Dsl.Types as Types
-import qualified Hydra.Dsl.Terms as Terms
-
-import qualified Data.Map as M
-
--- * Type-level functions (for schema definitions)
-
--- | Create a property type definition with the given key and type
--- Example: propertyType "name" Types.string
-propertyType :: String -> t -> PropertyType t
-propertyType key typ = PropertyType (PropertyKey key) typ False
-
--- | Mark a property type as required
--- Example: required (propertyType "name" Types.string)
-required :: PropertyType t -> PropertyType t
-required (PropertyType key typ _) = PropertyType key typ True
-
--- | Define a vertex type with the given label, ID type, and property types
--- Example: vertexType "Person" Types.string [required (propertyType "name" Types.string), propertyType "age" Types.int32]
-vertexType :: String -> t -> [PropertyType t] -> VertexType t
-vertexType label id properties = VertexType (VertexLabel label) id properties
-
--- | Define an edge type with the given label, ID type, source vertex label, target vertex label, and property types
--- Example: edgeType "KNOWS" Types.string "Person" "Person" [propertyType "since" Types.int32]
-edgeType :: String -> t -> String -> String -> [PropertyType t] -> EdgeType t
-edgeType label id outLabel inLabel properties = EdgeType (EdgeLabel label) id (VertexLabel outLabel) (VertexLabel inLabel) properties
-
--- | Define a simple edge type with a unit ID type
--- Example: simpleEdgeType "KNOWS" "Person" "Person" [propertyType "since" Types.int32]
-simpleEdgeType :: String -> String -> String -> [PropertyType Type] -> EdgeType Type
-simpleEdgeType label = edgeType label Types.unit
-
--- | Create a graph schema from vertex types and edge types
--- Example: schema [personType] [knowsType]
--- Where:
---   personType = vertexType "Person" Types.string [required (propertyType "name" Types.string)]
---   knowsType = edgeType "KNOWS" Types.string "Person" "Person" [propertyType "since" Types.int32]
-schema :: [VertexType t] -> [EdgeType t] -> GraphSchema t
-schema vtypes etypes = GraphSchema
-  (M.fromList $ fmap (\vt -> (vertexTypeLabel vt, vt)) vtypes)
-  (M.fromList $ fmap (\et -> (edgeTypeLabel et, et)) etypes)
-
--- * Term-level functions (for graph instances)
-
--- | Create a property with the given key and value
--- Example: property "name" (Terms.string "John")
-property :: String -> v -> Property v
-property key value = Property (PropertyKey key) value
-
--- | Create a vertex with the given label, ID, and properties
--- Example: vertex "Person" (Terms.string "p1") [property "name" (Terms.string "John"), property "age" (Terms.int32 42)]
-vertex :: String -> v -> [Property v] -> Vertex v
-vertex label idValue propertiesList = Vertex (VertexLabel label) idValue $
-  M.fromList $ fmap (\(Property k v) -> (k, v)) propertiesList
-
--- | Create an edge with the given label, ID, source vertex, target vertex, and properties
--- Example: edge "KNOWS" (Terms.string "e1") person1 person2 [property "since" (Terms.int32 2020)]
-edge :: String -> v -> v -> v -> [Property v] -> Edge v
-edge label idValue outValue inValue propertiesList = Edge (EdgeLabel label) idValue outValue inValue $
-  M.fromList $ fmap (\(Property k v) -> (k, v)) propertiesList
-
--- | Create a graph from vertices and edges
--- Example: graph [person1, person2] [knows]
--- Where:
---   person1 = vertex "Person" (Terms.string "p1") [property "name" (Terms.string "John")]
---   person2 = vertex "Person" (Terms.string "p2") [property "name" (Terms.string "Jane")]
---   knows = edge "KNOWS" (Terms.string "e1") person1 person2 [property "since" (Terms.int32 2020)]
-graph :: Ord v => [Vertex v] -> [Edge v] -> Graph v
-graph vertices edges = Graph
-  (M.fromList $ fmap (\v -> (vertexId v, v)) vertices)
-  (M.fromList $ fmap (\e -> (edgeId e, e)) edges)
diff --git a/src/main/haskell/Hydra/Dsl/Prims.hs b/src/main/haskell/Hydra/Dsl/Prims.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Prims.hs
+++ /dev/null
@@ -1,370 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-} -- for IsString with nontrivial parameters
-
--- | A DSL for constructing primitive function definitions
-module Hydra.Dsl.Prims where
-
-import Hydra.Core
-import Hydra.Classes
-import Hydra.Graph
-import Hydra.Util
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Context as Context
-import qualified Hydra.Errors as Error
-import qualified Hydra.Extract.Util as ExtractUtil
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Types as Types
-import qualified Hydra.Show.Core as ShowCore
-
-import Data.Int
-import qualified Data.ByteString as B
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-import qualified Data.Maybe as Y
-import Hydra.Strip (removeTermAnnotations)
-import Data.String(IsString(..))
-import Data.Either (Either)
-
--- | A helper to create an Error from a string message and context
-otherErr :: Context.Context -> String -> Error.Error
-otherErr _cx msg = Error.ErrorOther (Error.OtherError msg)
-
--- | Unwrap InContext to extract just the error (bridge for gen-main functions that still return InContext)
-dropContext :: Prelude.Either (Context.InContext Error.Error) a -> Prelude.Either Error.Error a
-dropContext (Left ic) = Left (Context.inContextObject ic)
-dropContext (Right a) = Right a
-
--- | Lift an Error back to InContext (bridge for passing new-style callbacks to gen-main functions)
-liftContext :: (a -> Prelude.Either Error.Error b) -> (a -> Prelude.Either (Context.InContext Error.Error) b)
-liftContext f x = case f x of
-  Left e -> Left (Context.InContext e (Context.Context [] [] M.empty))
-  Right v -> Right v
-
--- | A type variable specification with optional class constraints
-data TypeVar = TypeVar {
-  typeVarName :: String,
-  typeVarClasses :: [Name]
-}
-
--- | Create an unconstrained type variable
-v :: String -> TypeVar
-v name = TypeVar name []
-
--- | Create a type variable with Ord constraint
-vOrd :: String -> TypeVar
-vOrd name = TypeVar name [_TypeClass_ordering]
-
--- | Create a type variable with Eq constraint
-vEq :: String -> TypeVar
-vEq name = TypeVar name [_TypeClass_equality]
-
--- | Convert a list of TypeVars to the format needed by polyConstrained
--- Filters out variables with no constraints
-typeVarsToConstraints :: [TypeVar] -> [(String, [Name])]
-typeVarsToConstraints = filter (not . L.null . snd) . fmap (\tv -> (typeVarName tv, typeVarClasses tv))
-
--- | Get just the variable names from a list of TypeVars
-typeVarNames :: [TypeVar] -> [String]
-typeVarNames = fmap typeVarName
-
--- | Build a TypeScheme from type variables and a type
--- Uses polyConstrained if there are any constraints, otherwise poly
-buildTypeScheme :: [TypeVar] -> Type -> TypeScheme
-buildTypeScheme vars typ =
-  let constraints = typeVarsToConstraints vars
-  in if L.null constraints
-     then Types.poly (typeVarNames vars) typ
-     else Types.polyConstrained (fmap (\tv -> (typeVarName tv, typeVarClasses tv)) vars) typ
-
-instance IsString (TermCoder Term) where fromString = variable
-
-bigfloat :: TermCoder Double
-bigfloat = TermCoder Types.bigfloat encode decode
-  where
-    encode _cx g = ExtractCore.bigfloat g
-    decode _cx = Right . Terms.bigfloat
-
-bigint :: TermCoder Integer
-bigint = TermCoder Types.bigint encode decode
-  where
-    encode _cx g = ExtractCore.bigint g
-    decode _cx = Right . Terms.bigint
-
-binary :: TermCoder B.ByteString
-binary = TermCoder Types.binary encode decode
-  where
-    encode _cx g = ExtractCore.binary g
-    decode _cx = Right . Terms.binary
-
-boolean :: TermCoder Bool
-boolean = TermCoder Types.boolean encode decode
-  where
-    encode _cx g = ExtractCore.boolean g
-    decode _cx = Right . Terms.boolean
-
-comparison :: TermCoder Comparison
-comparison = TermCoder (TypeVariable _Comparison) encode decode
-  where
-    encode _cx g = ExtractUtil.comparison _cx g
-    decode _cx = Right . Terms.comparison
-
-decimal :: TermCoder Sci.Scientific
-decimal = TermCoder Types.decimal encode decode
-  where
-    encode _cx g = ExtractCore.decimal g
-    decode _cx = Right . Terms.decimal
-
-either_ :: TermCoder x -> TermCoder y -> TermCoder (Prelude.Either x y)
-either_ xCoder yCoder = TermCoder (Types.either_ (termCoderType xCoder) (termCoderType yCoder)) encode decode
-  where
-    encode cx g term = case term of
-      TermEither (Prelude.Left l) -> Prelude.Left <$> termCoderEncode xCoder cx g l
-      TermEither (Prelude.Right r) -> Prelude.Right <$> termCoderEncode yCoder cx g r
-      _ -> Left $ otherErr cx $ "expected either term, got: " ++ show term
-    decode cx ev = case ev of
-      Prelude.Left x -> do
-        xTerm <- termCoderDecode xCoder cx x
-        return $ Terms.left xTerm
-      Prelude.Right y -> do
-        yTerm <- termCoderDecode yCoder cx y
-        return $ Terms.right yTerm
-
-floatType :: TermCoder FloatType
-floatType = TermCoder (TypeVariable _FloatType) encode decode
-  where
-    encode _cx g term = case DecodeCore.floatType g term of
-      Left err -> Left $ Error.ErrorDecoding err
-      Right v -> Right v
-    decode _cx = Right . EncodeCore.floatType
-
-floatValue :: TermCoder FloatValue
-floatValue = TermCoder (TypeVariable _FloatValue) encode decode
-  where
-    encode _cx g = ExtractCore.floatValue g
-    decode _cx = Right . Terms.float
-
-float32 :: TermCoder Float
-float32 = TermCoder Types.float32 encode decode
-  where
-    encode _cx g = ExtractCore.float32 g
-    decode _cx = Right . Terms.float32
-
-float64 :: TermCoder Double
-float64 = TermCoder Types.float64 encode decode
-  where
-    encode _cx g = ExtractCore.float64 g
-    decode _cx = Right . Terms.float64
-
-function :: TermCoder x -> TermCoder y -> TermCoder (x -> y)
-function dom cod = TermCoder (Types.function (termCoderType dom) (termCoderType cod)) encode decode
-  where
-    encode cx _g term = Left $ otherErr cx $ "cannot encode term to a function: " ++ ShowCore.term term
-    decode cx _val = Left $ otherErr cx "cannot decode functions to terms"
-
--- | A TermCoder for function types, using a reducer to bridge term-level functions to native functions.
---   The reducer is called to evaluate function application at the term level.
---   Failures in reduction or encoding/decoding will result in a runtime error.
-functionWithReduce :: (Context.Context -> Graph -> Term -> Either Error.Error Term) -> TermCoder x -> TermCoder y -> TermCoder (x -> y)
-functionWithReduce reduce dom cod = TermCoder (Types.function (termCoderType dom) (termCoderType cod)) encode decode
-  where
-    encode cx g funTerm = Right $ \x ->
-      let argTerm = case termCoderDecode dom cx x of
-            Left _ -> error "functionWithReduce: failed to encode argument"
-            Right t -> t
-          resultTerm = case reduce cx g (TermApplication (Application funTerm argTerm)) of
-            Left _ -> error "functionWithReduce: failed to reduce application"
-            Right t -> t
-      in case termCoderEncode cod cx g resultTerm of
-           Left _ -> error "functionWithReduce: failed to decode result"
-           Right v -> v
-    decode cx _val = Left $ otherErr cx "cannot decode functions to terms"
-
-integerType :: TermCoder IntegerType
-integerType = TermCoder (TypeVariable _IntegerType) encode decode
-  where
-    encode _cx g term = case DecodeCore.integerType g term of
-      Left err -> Left $ Error.ErrorDecoding err
-      Right v -> Right v
-    decode _cx = Right . EncodeCore.integerType
-
-integerValue :: TermCoder IntegerValue
-integerValue = TermCoder (TypeVariable _IntegerValue) encode decode
-  where
-    encode _cx g = ExtractCore.integerValue g
-    decode _cx = Right . Terms.integer
-
-int8 :: TermCoder Int8
-int8 = TermCoder Types.int8 encode decode
-  where
-    encode _cx g = ExtractCore.int8 g
-    decode _cx = Right . Terms.int8
-
-int16 :: TermCoder Int16
-int16 = TermCoder Types.int16 encode decode
-  where
-    encode _cx g = ExtractCore.int16 g
-    decode _cx = Right . Terms.int16
-
-int32 :: TermCoder Int
-int32 = TermCoder Types.int32 encode decode
-  where
-    encode _cx g = ExtractCore.int32 g
-    decode _cx = Right . Terms.int32
-
-int64 :: TermCoder Int64
-int64 = TermCoder Types.int64 encode decode
-  where
-    encode _cx g = ExtractCore.int64 g
-    decode _cx = Right . Terms.int64
-
-list :: TermCoder x -> TermCoder [x]
-list els = TermCoder (Types.list $ termCoderType els) encode decode
-  where
-    encode cx g = ExtractCore.listOf (termCoderEncode els cx g) g
-    decode cx l = Terms.list <$> mapM (termCoderDecode els cx) l
-
-literal :: TermCoder Literal
-literal = TermCoder (TypeVariable _Literal) encode decode
-  where
-    encode _cx g = ExtractCore.literal g
-    decode _cx = Right . Terms.literal
-
-literalType :: TermCoder LiteralType
-literalType = TermCoder (TypeVariable _LiteralType) encode decode
-  where
-    encode _cx g term = case DecodeCore.literalType g term of
-      Left err -> Left $ Error.ErrorDecoding err
-      Right v -> Right v
-    decode _cx = Right . EncodeCore.literalType
-
-map :: Ord k => TermCoder k -> TermCoder v -> TermCoder (M.Map k v)
-map keys values = TermCoder (Types.map (termCoderType keys) (termCoderType values)) encode decode
-  where
-    encode cx g = ExtractCore.map (termCoderEncode keys cx g) (termCoderEncode values cx g) g
-    decode cx m = Terms.map . M.fromList <$> mapM decodePair (M.toList m)
-      where
-        decodePair (k, v) = do
-          ke <- termCoderDecode keys cx k
-          ve <- termCoderDecode values cx v
-          return (ke, ve)
-
-optional :: TermCoder x -> TermCoder (Y.Maybe x)
-optional mel = TermCoder (Types.optional $ termCoderType mel) encode decode
-  where
-    encode cx g = ExtractCore.maybeTerm (termCoderEncode mel cx g) g
-    decode cx mv = Terms.optional <$> case mv of
-      Nothing -> pure Nothing
-      Just v -> Just <$> termCoderDecode mel cx v
-
-pair :: TermCoder x -> TermCoder y -> TermCoder (x, y)
-pair xCoder yCoder = TermCoder (Types.pair (termCoderType xCoder) (termCoderType yCoder)) encode decode
-  where
-    encode cx g = ExtractCore.pair (termCoderEncode xCoder cx g) (termCoderEncode yCoder cx g) g
-    decode cx (x, y) = do
-      xTerm <- termCoderDecode xCoder cx x
-      yTerm <- termCoderDecode yCoder cx y
-      return $ Terms.pair xTerm yTerm
-
-prim0 :: Name -> x -> [TypeVar] -> TermCoder x -> Primitive
-prim0 name value vars output = Primitive name typ impl
-  where
-    typ = buildTypeScheme vars $ termCoderType output
-    impl cx _g _args = termCoderDecode output cx value
-
-prim1 :: Name -> (x -> y) -> [TypeVar] -> TermCoder x -> TermCoder y -> Primitive
-prim1 name compute vars input1 output = Primitive name typ impl
-  where
-    typ = buildTypeScheme vars $ Types.functionMany [
-      termCoderType input1,
-      termCoderType output]
-    impl cx g args = do
-      ExtractCore.nArgs name 1 args
-      arg1 <- termCoderEncode input1 cx g (args !! 0)
-      termCoderDecode output cx $ compute arg1
-
-prim2 :: Name -> (x -> y -> z) -> [TypeVar] -> TermCoder x -> TermCoder y -> TermCoder z -> Primitive
-prim2 name compute vars input1 input2 output = Primitive name typ impl
-  where
-    typ = buildTypeScheme vars $ Types.functionMany [
-      termCoderType input1,
-      termCoderType input2,
-      termCoderType output]
-    impl cx g args = do
-      ExtractCore.nArgs name 2 args
-      arg1 <- termCoderEncode input1 cx g (args !! 0)
-      arg2 <- termCoderEncode input2 cx g (args !! 1)
-      termCoderDecode output cx $ compute arg1 arg2
-
-prim3 :: Name -> (w -> x -> y -> z) -> [TypeVar] -> TermCoder w -> TermCoder x -> TermCoder y -> TermCoder z -> Primitive
-prim3 name compute vars input1 input2 input3 output = Primitive name typ impl
-  where
-    typ = buildTypeScheme vars $ Types.functionMany [
-      termCoderType input1,
-      termCoderType input2,
-      termCoderType input3,
-      termCoderType output]
-    impl cx g args = do
-      ExtractCore.nArgs name 3 args
-      arg1 <- termCoderEncode input1 cx g (args !! 0)
-      arg2 <- termCoderEncode input2 cx g (args !! 1)
-      arg3 <- termCoderEncode input3 cx g (args !! 2)
-      termCoderDecode output cx $ compute arg1 arg2 arg3
-
-set :: Ord x => TermCoder x -> TermCoder (S.Set x)
-set els = TermCoder (Types.set $ termCoderType els) encode decode
-  where
-    encode cx g = ExtractCore.setOf (termCoderEncode els cx g) g
-    decode cx s = Terms.set . S.fromList <$> mapM (termCoderDecode els cx) (S.toList s)
-
-string :: TermCoder String
-string = TermCoder Types.string encode decode
-  where
-    encode _cx g = ExtractCore.string g
-    decode _cx = Right . Terms.string
-
-term :: TermCoder Term
-term = TermCoder (TypeVariable _Term) encode decode
-  where
-    encode _cx _g = Right
-    decode _cx = Right
-
-type_ :: TermCoder Type
-type_ = TermCoder (TypeVariable _Type) encode decode
-  where
-    encode _cx g t = case DecodeCore.type_ g t of
-      Left err -> Left $ Error.ErrorDecoding err
-      Right v -> Right v
-    decode _cx = Right . EncodeCore.type_
-
-uint8 :: TermCoder Int16
-uint8 = TermCoder Types.uint8 encode decode
-  where
-    encode _cx g = ExtractCore.uint8 g
-    decode _cx = Right . Terms.uint8
-
-uint16 :: TermCoder Int
-uint16 = TermCoder Types.uint16 encode decode
-  where
-    encode _cx g = ExtractCore.uint16 g
-    decode _cx = Right . Terms.uint16
-
-uint32 :: TermCoder Int64
-uint32 = TermCoder Types.uint32 encode decode
-  where
-    encode _cx g = ExtractCore.uint32 g
-    decode _cx = Right . Terms.uint32
-
-uint64 :: TermCoder Integer
-uint64 = TermCoder Types.uint64 encode decode
-  where
-    encode _cx g = ExtractCore.uint64 g
-    decode _cx = Right . Terms.uint64
-
-variable :: String -> TermCoder Term
-variable v = TermCoder (Types.var v) encode decode
-  where
-    encode _cx _g = Right
-    decode _cx = Right
diff --git a/src/main/haskell/Hydra/Dsl/Protobuf/Any.hs b/src/main/haskell/Hydra/Dsl/Protobuf/Any.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Protobuf/Any.hs
+++ /dev/null
@@ -1,72 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.protobuf.any
-
-module Hydra.Dsl.Protobuf.Any where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Protobuf.Any as Any
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.ByteString as B
-
-any :: Phantoms.TTerm String -> Phantoms.TTerm B.ByteString -> Phantoms.TTerm Any.Any
-any typeUrl value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.any.Any"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeUrl"),
-          Core.fieldTerm = (Phantoms.unTTerm typeUrl)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-anyTypeUrl :: Phantoms.TTerm Any.Any -> Phantoms.TTerm String
-anyTypeUrl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.any.Any"),
-        Core.projectionField = (Core.Name "typeUrl")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyValue :: Phantoms.TTerm Any.Any -> Phantoms.TTerm B.ByteString
-anyValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.any.Any"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-anyWithTypeUrl :: Phantoms.TTerm Any.Any -> Phantoms.TTerm String -> Phantoms.TTerm Any.Any
-anyWithTypeUrl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.any.Any"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeUrl"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.protobuf.any.Any"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-anyWithValue :: Phantoms.TTerm Any.Any -> Phantoms.TTerm B.ByteString -> Phantoms.TTerm Any.Any
-anyWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.any.Any"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeUrl"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.any.Any"),
-              Core.projectionField = (Core.Name "typeUrl")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Protobuf/Environment.hs b/src/main/haskell/Hydra/Dsl/Protobuf/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Protobuf/Environment.hs
+++ /dev/null
@@ -1,27 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.protobuf.environment
-
-module Hydra.Dsl.Protobuf.Environment where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Protobuf.Environment as Environment
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-structuralTypeRefEither :: Phantoms.TTerm (Core.Type, Core.Type) -> Phantoms.TTerm Environment.StructuralTypeRef
-structuralTypeRefEither x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.environment.StructuralTypeRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "either"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structuralTypeRefPair :: Phantoms.TTerm (Core.Type, Core.Type) -> Phantoms.TTerm Environment.StructuralTypeRef
-structuralTypeRefPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.environment.StructuralTypeRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Protobuf/Proto3.hs b/src/main/haskell/Hydra/Dsl/Protobuf/Proto3.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Protobuf/Proto3.hs
+++ /dev/null
@@ -1,1143 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.protobuf.proto3
-
-module Hydra.Dsl.Protobuf.Proto3 where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Protobuf.Proto3 as Proto3
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-definitionEnum :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm Proto3.Definition
-definitionEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.Definition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-definitionMessage :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm Proto3.Definition
-definitionMessage x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.Definition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "message"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumDefinition :: Phantoms.TTerm Proto3.TypeName -> Phantoms.TTerm [Proto3.EnumValue] -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.EnumDefinition
-enumDefinition name values options =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)}]}))
-
-enumDefinitionName :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm Proto3.TypeName
-enumDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefinitionOptions :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm [Proto3.Option]
-enumDefinitionOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefinitionValues :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm [Proto3.EnumValue]
-enumDefinitionValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefinitionWithName :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm Proto3.TypeName -> Phantoms.TTerm Proto3.EnumDefinition
-enumDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDefinitionWithOptions :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.EnumDefinition
-enumDefinitionWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumDefinitionWithValues :: Phantoms.TTerm Proto3.EnumDefinition -> Phantoms.TTerm [Proto3.EnumValue] -> Phantoms.TTerm Proto3.EnumDefinition
-enumDefinitionWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumDefinition"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValue :: Phantoms.TTerm Proto3.EnumValueName -> Phantoms.TTerm Int -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.EnumValue
-enumValue name number options =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Phantoms.unTTerm number)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)}]}))
-
-enumValueName :: Phantoms.TTerm Proto3.EnumValue -> Phantoms.TTerm Proto3.EnumValueName
-enumValueName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueName_ :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.EnumValueName
-enumValueName_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.protobuf.proto3.EnumValueName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-enumValueNumber :: Phantoms.TTerm Proto3.EnumValue -> Phantoms.TTerm Int
-enumValueNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-        Core.projectionField = (Core.Name "number")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueOptions :: Phantoms.TTerm Proto3.EnumValue -> Phantoms.TTerm [Proto3.Option]
-enumValueOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumValueWithName :: Phantoms.TTerm Proto3.EnumValue -> Phantoms.TTerm Proto3.EnumValueName -> Phantoms.TTerm Proto3.EnumValue
-enumValueWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueWithNumber :: Phantoms.TTerm Proto3.EnumValue -> Phantoms.TTerm Int -> Phantoms.TTerm Proto3.EnumValue
-enumValueWithNumber original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumValueWithOptions :: Phantoms.TTerm Proto3.EnumValue -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.EnumValue
-enumValueWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.EnumValue"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-field :: Phantoms.TTerm Proto3.FieldName -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Proto3.FieldType -> Phantoms.TTerm Int -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.Field
-field name jsonName type_ number options =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "jsonName"),
-          Core.fieldTerm = (Phantoms.unTTerm jsonName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Phantoms.unTTerm number)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)}]}))
-
-fieldJsonName :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm (Maybe String)
-fieldJsonName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-        Core.projectionField = (Core.Name "jsonName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldName :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm Proto3.FieldName
-fieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldName_ :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.FieldName
-fieldName_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.protobuf.proto3.FieldName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fieldNumber :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm Int
-fieldNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-        Core.projectionField = (Core.Name "number")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldOptions :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm [Proto3.Option]
-fieldOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldType :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm Proto3.FieldType
-fieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldTypeMap :: Phantoms.TTerm Proto3.MapType -> Phantoms.TTerm Proto3.FieldType
-fieldTypeMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.FieldType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldTypeOneof :: Phantoms.TTerm [Proto3.Field] -> Phantoms.TTerm Proto3.FieldType
-fieldTypeOneof x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.FieldType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "oneof"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldTypeRepeated :: Phantoms.TTerm Proto3.SimpleType -> Phantoms.TTerm Proto3.FieldType
-fieldTypeRepeated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.FieldType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldTypeSimple :: Phantoms.TTerm Proto3.SimpleType -> Phantoms.TTerm Proto3.FieldType
-fieldTypeSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.FieldType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldWithJsonName :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Proto3.Field
-fieldWithJsonName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "jsonName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithName :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm Proto3.FieldName -> Phantoms.TTerm Proto3.Field
-fieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "jsonName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "jsonName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithNumber :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm Int -> Phantoms.TTerm Proto3.Field
-fieldWithNumber original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "jsonName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "jsonName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldWithOptions :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.Field
-fieldWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "jsonName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "jsonName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldWithType :: Phantoms.TTerm Proto3.Field -> Phantoms.TTerm Proto3.FieldType -> Phantoms.TTerm Proto3.Field
-fieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "jsonName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "jsonName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "number")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Field"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fileReference :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.FileReference
-fileReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.protobuf.proto3.FileReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-mapType :: Phantoms.TTerm Proto3.SimpleType -> Phantoms.TTerm Proto3.SimpleType -> Phantoms.TTerm Proto3.MapType
-mapType keys values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-mapTypeKeys :: Phantoms.TTerm Proto3.MapType -> Phantoms.TTerm Proto3.SimpleType
-mapTypeKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeValues :: Phantoms.TTerm Proto3.MapType -> Phantoms.TTerm Proto3.SimpleType
-mapTypeValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mapTypeWithKeys :: Phantoms.TTerm Proto3.MapType -> Phantoms.TTerm Proto3.SimpleType -> Phantoms.TTerm Proto3.MapType
-mapTypeWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mapTypeWithValues :: Phantoms.TTerm Proto3.MapType -> Phantoms.TTerm Proto3.SimpleType -> Phantoms.TTerm Proto3.MapType
-mapTypeWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MapType"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-messageDefinition :: Phantoms.TTerm Proto3.TypeName -> Phantoms.TTerm [Proto3.Field] -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.MessageDefinition
-messageDefinition name fields options =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)}]}))
-
-messageDefinitionFields :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm [Proto3.Field]
-messageDefinitionFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-messageDefinitionName :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm Proto3.TypeName
-messageDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-messageDefinitionOptions :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm [Proto3.Option]
-messageDefinitionOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-messageDefinitionWithFields :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm [Proto3.Field] -> Phantoms.TTerm Proto3.MessageDefinition
-messageDefinitionWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-messageDefinitionWithName :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm Proto3.TypeName -> Phantoms.TTerm Proto3.MessageDefinition
-messageDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-messageDefinitionWithOptions :: Phantoms.TTerm Proto3.MessageDefinition -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.MessageDefinition
-messageDefinitionWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.MessageDefinition"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-option :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.Value -> Phantoms.TTerm Proto3.Option
-option name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-optionName :: Phantoms.TTerm Proto3.Option -> Phantoms.TTerm String
-optionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Option"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionValue :: Phantoms.TTerm Proto3.Option -> Phantoms.TTerm Proto3.Value
-optionValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Option"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionWithName :: Phantoms.TTerm Proto3.Option -> Phantoms.TTerm String -> Phantoms.TTerm Proto3.Option
-optionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.protobuf.proto3.Option"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optionWithValue :: Phantoms.TTerm Proto3.Option -> Phantoms.TTerm Proto3.Value -> Phantoms.TTerm Proto3.Option
-optionWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.Option"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-packageName :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.PackageName
-packageName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.protobuf.proto3.PackageName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-protoFile :: Phantoms.TTerm Proto3.PackageName -> Phantoms.TTerm [Proto3.FileReference] -> Phantoms.TTerm [Proto3.Definition] -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.ProtoFile
-protoFile package imports types options =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm package)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm imports)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm types)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm options)}]}))
-
-protoFileImports :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm [Proto3.FileReference]
-protoFileImports x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-        Core.projectionField = (Core.Name "imports")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-protoFileOptions :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm [Proto3.Option]
-protoFileOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-        Core.projectionField = (Core.Name "options")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-protoFilePackage :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm Proto3.PackageName
-protoFilePackage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-        Core.projectionField = (Core.Name "package")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-protoFileTypes :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm [Proto3.Definition]
-protoFileTypes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-        Core.projectionField = (Core.Name "types")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-protoFileWithImports :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm [Proto3.FileReference] -> Phantoms.TTerm Proto3.ProtoFile
-protoFileWithImports original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-protoFileWithOptions :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm [Proto3.Option] -> Phantoms.TTerm Proto3.ProtoFile
-protoFileWithOptions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-protoFileWithPackage :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm Proto3.PackageName -> Phantoms.TTerm Proto3.ProtoFile
-protoFileWithPackage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "types")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-protoFileWithTypes :: Phantoms.TTerm Proto3.ProtoFile -> Phantoms.TTerm [Proto3.Definition] -> Phantoms.TTerm Proto3.ProtoFile
-protoFileWithTypes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "package"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "package")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imports"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "imports")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "options"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.protobuf.proto3.ProtoFile"),
-              Core.projectionField = (Core.Name "options")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scalarTypeBool :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeBool =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeBytes :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeBytes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bytes"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeDouble :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeFixed32 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeFixed32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed32"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeFixed64 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeFixed64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fixed64"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeFloat :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeInt32 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeInt32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int32"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeInt64 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeInt64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int64"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeSfixed32 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeSfixed32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sfixed32"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeSfixed64 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeSfixed64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sfixed64"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeSint32 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeSint32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sint32"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeSint64 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeSint64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sint64"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeString :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeUint32 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeUint32 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint32"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-scalarTypeUint64 :: Phantoms.TTerm Proto3.ScalarType
-scalarTypeUint64 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.ScalarType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uint64"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-simpleTypeReference :: Phantoms.TTerm Proto3.TypeName -> Phantoms.TTerm Proto3.SimpleType
-simpleTypeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.SimpleType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleTypeScalar :: Phantoms.TTerm Proto3.ScalarType -> Phantoms.TTerm Proto3.SimpleType
-simpleTypeScalar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.SimpleType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scalar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeName :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.TypeName
-typeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.protobuf.proto3.TypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeReference :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.TypeReference
-typeReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.protobuf.proto3.TypeReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unEnumValueName :: Phantoms.TTerm Proto3.EnumValueName -> Phantoms.TTerm String
-unEnumValueName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.protobuf.proto3.EnumValueName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFieldName :: Phantoms.TTerm Proto3.FieldName -> Phantoms.TTerm String
-unFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.protobuf.proto3.FieldName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFileReference :: Phantoms.TTerm Proto3.FileReference -> Phantoms.TTerm String
-unFileReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.protobuf.proto3.FileReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPackageName :: Phantoms.TTerm Proto3.PackageName -> Phantoms.TTerm String
-unPackageName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.protobuf.proto3.PackageName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeName :: Phantoms.TTerm Proto3.TypeName -> Phantoms.TTerm String
-unTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.protobuf.proto3.TypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeReference :: Phantoms.TTerm Proto3.TypeReference -> Phantoms.TTerm String
-unTypeReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.protobuf.proto3.TypeReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Proto3.Value
-valueBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueString :: Phantoms.TTerm String -> Phantoms.TTerm Proto3.Value
-valueString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.protobuf.proto3.Value"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Protobuf/SourceContext.hs b/src/main/haskell/Hydra/Dsl/Protobuf/SourceContext.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Protobuf/SourceContext.hs
+++ /dev/null
@@ -1,37 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.protobuf.sourceContext
-
-module Hydra.Dsl.Protobuf.SourceContext where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Protobuf.SourceContext as SourceContext
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-sourceContext :: Phantoms.TTerm String -> Phantoms.TTerm SourceContext.SourceContext
-sourceContext fileName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.sourceContext.SourceContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fileName"),
-          Core.fieldTerm = (Phantoms.unTTerm fileName)}]}))
-
-sourceContextFileName :: Phantoms.TTerm SourceContext.SourceContext -> Phantoms.TTerm String
-sourceContextFileName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.protobuf.sourceContext.SourceContext"),
-        Core.projectionField = (Core.Name "fileName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourceContextWithFileName :: Phantoms.TTerm SourceContext.SourceContext -> Phantoms.TTerm String -> Phantoms.TTerm SourceContext.SourceContext
-sourceContextWithFileName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.protobuf.sourceContext.SourceContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fileName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Python/Environment.hs b/src/main/haskell/Hydra/Dsl/Python/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Python/Environment.hs
+++ /dev/null
@@ -1,4212 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.python.environment
-
-module Hydra.Dsl.Python.Environment where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Python.Environment as Environment
-import qualified Hydra.Python.Syntax as Syntax
-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
-
-pyGraph :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Environment.PyGraph
-pyGraph graph metadata =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Phantoms.unTTerm metadata)}]}))
-
-pyGraphGraph :: Phantoms.TTerm Environment.PyGraph -> Phantoms.TTerm Graph.Graph
-pyGraphGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pyGraphMetadata :: Phantoms.TTerm Environment.PyGraph -> Phantoms.TTerm Environment.PythonModuleMetadata
-pyGraphMetadata x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-        Core.projectionField = (Core.Name "metadata")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pyGraphWithGraph :: Phantoms.TTerm Environment.PyGraph -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Environment.PyGraph
-pyGraphWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-              Core.projectionField = (Core.Name "metadata")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pyGraphWithMetadata :: Phantoms.TTerm Environment.PyGraph -> Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Environment.PyGraph
-pyGraphWithMetadata original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PyGraph"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "metadata"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pythonEnvironment :: Phantoms.TTerm (Packaging.Namespaces Syntax.DottedName) -> Phantoms.TTerm ([Core.Name], (M.Map Core.Name Syntax.Name)) -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.PythonVersion -> Phantoms.TTerm Bool -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironment namespaces boundTypeVariables graph nullaryBindings version skipCasts inlineVariables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Phantoms.unTTerm namespaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm boundTypeVariables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Phantoms.unTTerm nullaryBindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Phantoms.unTTerm version)},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Phantoms.unTTerm skipCasts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm inlineVariables)}]}))
-
-pythonEnvironmentBoundTypeVariables :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm ([Core.Name], (M.Map Core.Name Syntax.Name))
-pythonEnvironmentBoundTypeVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "boundTypeVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentGraph :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm Graph.Graph
-pythonEnvironmentGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentInlineVariables :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm (S.Set Core.Name)
-pythonEnvironmentInlineVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "inlineVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentNamespaces :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm (Packaging.Namespaces Syntax.DottedName)
-pythonEnvironmentNamespaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "namespaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentNullaryBindings :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm (S.Set Core.Name)
-pythonEnvironmentNullaryBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "nullaryBindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentSkipCasts :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm Bool
-pythonEnvironmentSkipCasts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "skipCasts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentVersion :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm Environment.PythonVersion
-pythonEnvironmentVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-        Core.projectionField = (Core.Name "version")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonEnvironmentWithBoundTypeVariables :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm ([Core.Name], (M.Map Core.Name Syntax.Name)) -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithBoundTypeVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "nullaryBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "skipCasts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "inlineVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonEnvironmentWithGraph :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "nullaryBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "skipCasts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "inlineVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonEnvironmentWithInlineVariables :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithInlineVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "nullaryBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "skipCasts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pythonEnvironmentWithNamespaces :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm (Packaging.Namespaces Syntax.DottedName) -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithNamespaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "nullaryBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "skipCasts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "inlineVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonEnvironmentWithNullaryBindings :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithNullaryBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "skipCasts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "inlineVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonEnvironmentWithSkipCasts :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithSkipCasts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "nullaryBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "version")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "inlineVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonEnvironmentWithVersion :: Phantoms.TTerm Environment.PythonEnvironment -> Phantoms.TTerm Environment.PythonVersion -> Phantoms.TTerm Environment.PythonEnvironment
-pythonEnvironmentWithVersion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "boundTypeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "boundTypeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "nullaryBindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "nullaryBindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "version"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "skipCasts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "skipCasts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inlineVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonEnvironment"),
-              Core.projectionField = (Core.Name "inlineVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadata :: Phantoms.TTerm (Packaging.Namespaces Syntax.DottedName) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadata namespaces typeVariables usesAnnotated usesCallable usesCast usesLruCache usesTypeAlias usesDataclass usesDecimal usesEither usesEnum usesFrozenDict usesFrozenList usesGeneric usesJust usesLeft usesMaybe usesName usesNode usesNothing usesRight usesTypeVar =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Phantoms.unTTerm namespaces)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm typeVariables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Phantoms.unTTerm usesAnnotated)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Phantoms.unTTerm usesCallable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Phantoms.unTTerm usesCast)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Phantoms.unTTerm usesLruCache)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm usesTypeAlias)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Phantoms.unTTerm usesDataclass)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Phantoms.unTTerm usesDecimal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Phantoms.unTTerm usesEither)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Phantoms.unTTerm usesEnum)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Phantoms.unTTerm usesFrozenDict)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Phantoms.unTTerm usesFrozenList)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Phantoms.unTTerm usesGeneric)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Phantoms.unTTerm usesJust)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Phantoms.unTTerm usesLeft)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Phantoms.unTTerm usesMaybe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Phantoms.unTTerm usesName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Phantoms.unTTerm usesNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Phantoms.unTTerm usesNothing)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Phantoms.unTTerm usesRight)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Phantoms.unTTerm usesTypeVar)}]}))
-
-pythonModuleMetadataNamespaces :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm (Packaging.Namespaces Syntax.DottedName)
-pythonModuleMetadataNamespaces x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "namespaces")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataTypeVariables :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm (S.Set Core.Name)
-pythonModuleMetadataTypeVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "typeVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesAnnotated :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesAnnotated x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesAnnotated")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesCallable :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesCallable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesCallable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesCast :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesCast x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesCast")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesDataclass :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesDataclass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesDataclass")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesDecimal :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesDecimal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesDecimal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesEither :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesEither x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesEither")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesEnum :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesEnum x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesEnum")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesFrozenDict :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesFrozenDict x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesFrozenDict")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesFrozenList :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesFrozenList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesFrozenList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesGeneric :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesGeneric x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesGeneric")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesJust :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesJust x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesJust")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesLeft :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesLeft")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesLruCache :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesLruCache x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesLruCache")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesMaybe :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesMaybe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesMaybe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesName :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesNode :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesNothing :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesNothing x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesNothing")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesRight :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesRight")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesTypeAlias :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesTypeAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesTypeAlias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataUsesTypeVar :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool
-pythonModuleMetadataUsesTypeVar x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-        Core.projectionField = (Core.Name "usesTypeVar")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pythonModuleMetadataWithNamespaces :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm (Packaging.Namespaces Syntax.DottedName) -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithNamespaces original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithTypeVariables :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithTypeVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesAnnotated :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesAnnotated original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesCallable :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesCallable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesCast :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesCast original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesDataclass :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesDataclass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesDecimal :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesDecimal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesEither :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesEither original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesEnum :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesEnum original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesFrozenDict :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesFrozenDict original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesFrozenList :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesFrozenList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesGeneric :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesGeneric original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesJust :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesJust original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesLeft :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesLruCache :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesLruCache original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesMaybe :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesMaybe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesName :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesNode :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesNothing :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesNothing original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesRight :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesTypeAlias :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesTypeAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeVar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pythonModuleMetadataWithUsesTypeVar :: Phantoms.TTerm Environment.PythonModuleMetadata -> Phantoms.TTerm Bool -> Phantoms.TTerm Environment.PythonModuleMetadata
-pythonModuleMetadataWithUsesTypeVar original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespaces"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "namespaces")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "typeVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesAnnotated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesAnnotated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCallable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCallable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesCast"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesCast")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLruCache"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLruCache")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeAlias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesTypeAlias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDataclass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDataclass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesDecimal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesDecimal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEither"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEither")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesEnum"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesEnum")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenDict"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenDict")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesFrozenList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesFrozenList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesGeneric"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesGeneric")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesJust"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesJust")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesLeft"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesLeft")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesMaybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesMaybe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesNothing"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesNothing")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesRight"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.environment.PythonModuleMetadata"),
-              Core.projectionField = (Core.Name "usesRight")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "usesTypeVar"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pythonVersionPython310 :: Phantoms.TTerm Environment.PythonVersion
-pythonVersionPython310 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.environment.PythonVersion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "python310"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pythonVersionPython312 :: Phantoms.TTerm Environment.PythonVersion
-pythonVersionPython312 =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.environment.PythonVersion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "python312"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Python/Helpers.hs b/src/main/haskell/Hydra/Dsl/Python/Helpers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Python/Helpers.hs
+++ /dev/null
@@ -1,143 +0,0 @@
--- | Convenience layer over the generated Python syntax DSL.
--- Re-exports all generated DSL functions and adds custom helpers
--- for common Python AST construction patterns.
-
-module Hydra.Dsl.Python.Helpers (
-  module Gen,
-  module Hydra.Dsl.Python.Helpers,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Python.Syntax as Gen hiding (list)
-import Hydra.Dsl.Meta.Phantoms (nothing, just, false, list, record, inject, injectUnit, project, wrap, unwrap, (>>:), (@@))
-import qualified Hydra.Python.Syntax as Py
-
-import Prelude hiding (map)
-
-
--- Custom helpers
-
-argsPositionalOnly :: TTerm [Py.PosArg] -> TTerm Py.Args
-argsPositionalOnly pos = args pos
-  (list ([] :: [TTerm Py.KwargOrStarred]))
-  (list ([] :: [TTerm Py.KwargOrDoubleStarred]))
-
-classPatternSimple :: TTerm Py.NameOrAttribute -> TTerm Py.ClassPattern
-classPatternSimple nameOrAttr = classPattern nameOrAttr nothing nothing
-
-classPatternWithKeywords :: TTerm Py.NameOrAttribute -> TTerm Py.KeywordPatterns -> TTerm Py.ClassPattern
-classPatternWithKeywords nameOrAttr kwPatterns = classPattern nameOrAttr nothing (just kwPatterns)
-
-compPairEq :: TTerm Py.BitwiseOr -> TTerm Py.CompareOpBitwiseOrPair
-compPairEq rhs = compareOpBitwiseOrPair compareOpEq rhs
-
-doubleQuotedString :: TTerm String -> TTerm Py.String_
-doubleQuotedString val = string_ val quoteStyleDouble
-
-functionDefRawSimple :: TTerm Py.Name -> TTerm (Maybe Py.Parameters) -> TTerm Py.Block -> TTerm Py.FunctionDefRaw
-functionDefRawSimple name_ params block_ = functionDefRaw false name_ (list ([] :: [TTerm Py.TypeParameter])) params nothing nothing block_
-
-functionDefinitionSimple :: TTerm Py.FunctionDefRaw -> TTerm Py.FunctionDefinition
-functionDefinitionSimple raw = functionDefinition nothing raw
-
-lambdaParametersEmpty :: TTerm Py.LambdaParameters
-lambdaParametersEmpty = lambdaParameters nothing
-  (list ([] :: [TTerm Py.LambdaParamNoDefault]))
-  (list ([] :: [TTerm Py.LambdaParamWithDefault]))
-  nothing
-
-lambdaParametersSimple :: TTerm [Py.LambdaParamNoDefault] -> TTerm Py.LambdaParameters
-lambdaParametersSimple params = lambdaParameters nothing params
-  (list ([] :: [TTerm Py.LambdaParamWithDefault]))
-  nothing
-
-lambda_ :: TTerm Py.LambdaParameters -> TTerm Py.Expression -> TTerm Py.Lambda
-lambda_ = Gen.lambda
-
-list_ :: TTerm [Py.StarNamedExpression] -> TTerm Py.List
-list_ = wrap Py._List
-
-paramNoDefaultParametersSimple :: TTerm [Py.ParamNoDefault] -> TTerm Py.ParamNoDefaultParameters
-paramNoDefaultParametersSimple noDefault = paramNoDefaultParameters noDefault (list ([] :: [TTerm Py.ParamWithDefault])) nothing
-
-paramNoDefaultSimple :: TTerm Py.Param -> TTerm Py.ParamNoDefault
-paramNoDefaultSimple p = paramNoDefault p nothing
-
-paramSimple :: TTerm Py.Name -> TTerm Py.Param
-paramSimple n = param n nothing
-
-simpleTypeParameterSimple :: TTerm Py.Name -> TTerm Py.SimpleTypeParameter
-simpleTypeParameterSimple n = simpleTypeParameter n nothing nothing
-
-sliceSlice :: TTerm Py.SliceExpression -> TTerm Py.Slice
-sliceSlice = inject Py._Slice Py._Slice_slice_
-
-string_ :: TTerm String -> TTerm Py.QuoteStyle -> TTerm Py.String_
-string_ val style = record Py._String [
-  Py._String_value>>: val,
-  Py._String_quoteStyle>>: style]
-
-untypedAssignmentSimple :: TTerm [Py.StarTarget] -> TTerm Py.AnnotatedRhs -> TTerm Py.UntypedAssignment
-untypedAssignmentSimple targets rhs = untypedAssignment targets rhs nothing
-
--- Expression conversion pipeline: Primary -> ... -> Expression
-
-pyPrimaryToPyExpression :: TTerm Py.Primary -> TTerm Py.Expression
-pyPrimaryToPyExpression p = expressionSimple (pyPrimaryToPyDisjunction p)
-
-pyPrimaryToPyDisjunction :: TTerm Py.Primary -> TTerm Py.Disjunction
-pyPrimaryToPyDisjunction p = wrap Py._Disjunction (list [pyPrimaryToPyConjunction p])
-
-pyPrimaryToPyConjunction :: TTerm Py.Primary -> TTerm Py.Conjunction
-pyPrimaryToPyConjunction p = wrap Py._Conjunction (list [pyPrimaryToPyInversion p])
-
-pyPrimaryToPyInversion :: TTerm Py.Primary -> TTerm Py.Inversion
-pyPrimaryToPyInversion p = inversionSimple (pyPrimaryToPyComparison p)
-
-pyPrimaryToPyComparison :: TTerm Py.Primary -> TTerm Py.Comparison
-pyPrimaryToPyComparison p = comparison (pyPrimaryToPyBitwiseOr p) (list ([] :: [TTerm Py.CompareOpBitwiseOrPair]))
-
-pyPrimaryToPyBitwiseOr :: TTerm Py.Primary -> TTerm Py.BitwiseOr
-pyPrimaryToPyBitwiseOr p = bitwiseOr nothing (pyPrimaryToPyBitwiseXor p)
-
-pyPrimaryToPyBitwiseXor :: TTerm Py.Primary -> TTerm Py.BitwiseXor
-pyPrimaryToPyBitwiseXor p = bitwiseXor nothing (pyPrimaryToPyBitwiseAnd p)
-
-pyPrimaryToPyBitwiseAnd :: TTerm Py.Primary -> TTerm Py.BitwiseAnd
-pyPrimaryToPyBitwiseAnd p = bitwiseAnd nothing (pyPrimaryToPyShiftExpression p)
-
-pyPrimaryToPyShiftExpression :: TTerm Py.Primary -> TTerm Py.ShiftExpression
-pyPrimaryToPyShiftExpression p = shiftExpression nothing (pyPrimaryToPySum p)
-
-pyPrimaryToPySum :: TTerm Py.Primary -> TTerm Py.Sum
-pyPrimaryToPySum p = Gen.sum nothing (pyPrimaryToPyTerm p)
-
-pyPrimaryToPyTerm :: TTerm Py.Primary -> TTerm Py.Term
-pyPrimaryToPyTerm p = Gen.term nothing (pyPrimaryToPyFactor p)
-
-pyPrimaryToPyFactor :: TTerm Py.Primary -> TTerm Py.Factor
-pyPrimaryToPyFactor p = factorSimple (pyPrimaryToPyPower p)
-
-pyPrimaryToPyPower :: TTerm Py.Primary -> TTerm Py.Power
-pyPrimaryToPyPower p = power (pyPrimaryToPyAwaitPrimary p) nothing
-
-pyPrimaryToPyAwaitPrimary :: TTerm Py.Primary -> TTerm Py.AwaitPrimary
-pyPrimaryToPyAwaitPrimary p = awaitPrimary false p
-
-pyComparisonToPyExpression :: TTerm Py.Comparison -> TTerm Py.Expression
-pyComparisonToPyExpression c = expressionSimple
-  (wrap Py._Disjunction (list [
-    wrap Py._Conjunction (list [
-      inversionSimple c])]))
-
-pyNameToPyPrimary :: TTerm Py.Name -> TTerm Py.Primary
-pyNameToPyPrimary n = primarySimple (atomName n)
-
-pyNameToPyExpression :: TTerm Py.Name -> TTerm Py.Expression
-pyNameToPyExpression n = pyPrimaryToPyExpression (pyNameToPyPrimary n)
-
-pyStringToPyExpression :: TTerm Py.String_ -> TTerm Py.Expression
-pyStringToPyExpression s = pyPrimaryToPyExpression (primarySimple (atomString s))
-
-raiseExpressionException :: TTerm Py.RaiseExpression -> TTerm Py.Expression
-raiseExpressionException re = project Py._RaiseExpression Py._RaiseExpression_expression @@ re
diff --git a/src/main/haskell/Hydra/Dsl/Python/Syntax.hs b/src/main/haskell/Hydra/Dsl/Python/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Python/Syntax.hs
+++ /dev/null
@@ -1,10063 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.python.syntax
-
-module Hydra.Dsl.Python.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Python.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-annotatedRhsStar :: Phantoms.TTerm [Syntax.StarExpression] -> Phantoms.TTerm Syntax.AnnotatedRhs
-annotatedRhsStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AnnotatedRhs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotatedRhsYield :: Phantoms.TTerm Syntax.YieldExpression -> Phantoms.TTerm Syntax.AnnotatedRhs
-annotatedRhsYield x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AnnotatedRhs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "yield"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotatedStatement :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.AnnotatedStatement
-annotatedStatement comment statement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm statement)}]}))
-
-annotatedStatementComment :: Phantoms.TTerm Syntax.AnnotatedStatement -> Phantoms.TTerm String
-annotatedStatementComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedStatementStatement :: Phantoms.TTerm Syntax.AnnotatedStatement -> Phantoms.TTerm Syntax.Statement
-annotatedStatementStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-        Core.projectionField = (Core.Name "statement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotatedStatementWithComment :: Phantoms.TTerm Syntax.AnnotatedStatement -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.AnnotatedStatement
-annotatedStatementWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-              Core.projectionField = (Core.Name "statement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotatedStatementWithStatement :: Phantoms.TTerm Syntax.AnnotatedStatement -> Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.AnnotatedStatement
-annotatedStatementWithStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AnnotatedStatement"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "statement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotation :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Annotation
-annotation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Annotation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-args :: Phantoms.TTerm [Syntax.PosArg] -> Phantoms.TTerm [Syntax.KwargOrStarred] -> Phantoms.TTerm [Syntax.KwargOrDoubleStarred] -> Phantoms.TTerm Syntax.Args
-args positional kwargOrStarred kwargOrDoubleStarred =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Args"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positional"),
-          Core.fieldTerm = (Phantoms.unTTerm positional)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrStarred"),
-          Core.fieldTerm = (Phantoms.unTTerm kwargOrStarred)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrDoubleStarred"),
-          Core.fieldTerm = (Phantoms.unTTerm kwargOrDoubleStarred)}]}))
-
-argsKwargOrDoubleStarred :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm [Syntax.KwargOrDoubleStarred]
-argsKwargOrDoubleStarred x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-        Core.projectionField = (Core.Name "kwargOrDoubleStarred")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argsKwargOrStarred :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm [Syntax.KwargOrStarred]
-argsKwargOrStarred x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-        Core.projectionField = (Core.Name "kwargOrStarred")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argsPositional :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm [Syntax.PosArg]
-argsPositional x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-        Core.projectionField = (Core.Name "positional")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-argsWithKwargOrDoubleStarred :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm [Syntax.KwargOrDoubleStarred] -> Phantoms.TTerm Syntax.Args
-argsWithKwargOrDoubleStarred original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Args"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-              Core.projectionField = (Core.Name "positional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrStarred"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-              Core.projectionField = (Core.Name "kwargOrStarred")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrDoubleStarred"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-argsWithKwargOrStarred :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm [Syntax.KwargOrStarred] -> Phantoms.TTerm Syntax.Args
-argsWithKwargOrStarred original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Args"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positional"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-              Core.projectionField = (Core.Name "positional")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrStarred"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrDoubleStarred"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-              Core.projectionField = (Core.Name "kwargOrDoubleStarred")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-argsWithPositional :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm [Syntax.PosArg] -> Phantoms.TTerm Syntax.Args
-argsWithPositional original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Args"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "positional"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrStarred"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-              Core.projectionField = (Core.Name "kwargOrStarred")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "kwargOrDoubleStarred"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Args"),
-              Core.projectionField = (Core.Name "kwargOrDoubleStarred")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-asPattern :: Phantoms.TTerm Syntax.OrPattern -> Phantoms.TTerm Syntax.PatternCaptureTarget -> Phantoms.TTerm Syntax.AsPattern
-asPattern pattern as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-asPatternAs :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.PatternCaptureTarget
-asPatternAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-asPatternPattern :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.OrPattern
-asPatternPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-asPatternWithAs :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.PatternCaptureTarget -> Phantoms.TTerm Syntax.AsPattern
-asPatternWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-asPatternWithPattern :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.OrPattern -> Phantoms.TTerm Syntax.AsPattern
-asPatternWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AsPattern"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assertStatement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.AssertStatement
-assertStatement expression1 expression2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression1"),
-          Core.fieldTerm = (Phantoms.unTTerm expression1)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression2"),
-          Core.fieldTerm = (Phantoms.unTTerm expression2)}]}))
-
-assertStatementExpression1 :: Phantoms.TTerm Syntax.AssertStatement -> Phantoms.TTerm Syntax.Expression
-assertStatementExpression1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-        Core.projectionField = (Core.Name "expression1")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assertStatementExpression2 :: Phantoms.TTerm Syntax.AssertStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-assertStatementExpression2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-        Core.projectionField = (Core.Name "expression2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assertStatementWithExpression1 :: Phantoms.TTerm Syntax.AssertStatement -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssertStatement
-assertStatementWithExpression1 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression1"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-              Core.projectionField = (Core.Name "expression2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assertStatementWithExpression2 :: Phantoms.TTerm Syntax.AssertStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.AssertStatement
-assertStatementWithExpression2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssertStatement"),
-              Core.projectionField = (Core.Name "expression1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignmentAug :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.Assignment
-assignmentAug x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Assignment"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aug"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentExpression :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpression name expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-assignmentExpressionExpression :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression
-assignmentExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentExpressionName :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Name
-assignmentExpressionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignmentExpressionWithExpression :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignmentExpressionWithName :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.AssignmentExpression
-assignmentExpressionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AssignmentExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignmentTyped :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm Syntax.Assignment
-assignmentTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Assignment"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-assignmentUntyped :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm Syntax.Assignment
-assignmentUntyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Assignment"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "untyped"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomDict :: Phantoms.TTerm Syntax.Dict -> Phantoms.TTerm Syntax.Atom
-atomDict x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dict"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomDictcomp :: Phantoms.TTerm Syntax.Dictcomp -> Phantoms.TTerm Syntax.Atom
-atomDictcomp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dictcomp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomEllipsis :: Phantoms.TTerm Syntax.Atom
-atomEllipsis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ellipsis"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atomFalse :: Phantoms.TTerm Syntax.Atom
-atomFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "false"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atomGenexp :: Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.Atom
-atomGenexp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "genexp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomGroup :: Phantoms.TTerm Syntax.Group -> Phantoms.TTerm Syntax.Atom
-atomGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomList :: Phantoms.TTerm Syntax.List -> Phantoms.TTerm Syntax.Atom
-atomList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomListcomp :: Phantoms.TTerm Syntax.Listcomp -> Phantoms.TTerm Syntax.Atom
-atomListcomp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listcomp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Atom
-atomName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomNone :: Phantoms.TTerm Syntax.Atom
-atomNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atomNumber :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.Atom
-atomNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomSet :: Phantoms.TTerm Syntax.Set -> Phantoms.TTerm Syntax.Atom
-atomSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomSetcomp :: Phantoms.TTerm Syntax.Setcomp -> Phantoms.TTerm Syntax.Atom
-atomSetcomp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "setcomp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomString :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.Atom
-atomString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atomTrue :: Phantoms.TTerm Syntax.Atom
-atomTrue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "true"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-atomTuple :: Phantoms.TTerm Syntax.Tuple -> Phantoms.TTerm Syntax.Atom
-atomTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Atom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-attribute :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.Attribute
-attribute x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Attribute"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-augAssignAmpersandEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignAmpersandEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ampersandEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignAtEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignAtEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "atEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignBarEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignBarEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "barEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignCaretEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignCaretEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "caretEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignDoubleSlashEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignDoubleSlashEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doubleSlashEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignLeftShiftEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignLeftShiftEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "leftShiftEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignMinusEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignMinusEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minusEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignPercentEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignPercentEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "percentEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignPlusEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignPlusEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plusEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignRightShiftEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignRightShiftEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rightShiftEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignSlashEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignSlashEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slashEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignStarStarEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignStarStarEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starStarEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignTimesEqual :: Phantoms.TTerm Syntax.AugAssign
-augAssignTimesEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.AugAssign"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timesEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-augAssignment :: Phantoms.TTerm Syntax.SingleTarget -> Phantoms.TTerm Syntax.AugAssign -> Phantoms.TTerm Syntax.AnnotatedRhs -> Phantoms.TTerm Syntax.AugAssignment
-augAssignment lhs augassign rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "augassign"),
-          Core.fieldTerm = (Phantoms.unTTerm augassign)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-augAssignmentAugassign :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.AugAssign
-augAssignmentAugassign x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-        Core.projectionField = (Core.Name "augassign")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-augAssignmentLhs :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.SingleTarget
-augAssignmentLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-augAssignmentRhs :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.AnnotatedRhs
-augAssignmentRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-augAssignmentWithAugassign :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.AugAssign -> Phantoms.TTerm Syntax.AugAssignment
-augAssignmentWithAugassign original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "augassign"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-augAssignmentWithLhs :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.SingleTarget -> Phantoms.TTerm Syntax.AugAssignment
-augAssignmentWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "augassign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-              Core.projectionField = (Core.Name "augassign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-augAssignmentWithRhs :: Phantoms.TTerm Syntax.AugAssignment -> Phantoms.TTerm Syntax.AnnotatedRhs -> Phantoms.TTerm Syntax.AugAssignment
-augAssignmentWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "augassign"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AugAssignment"),
-              Core.projectionField = (Core.Name "augassign")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-awaitPrimary :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.AwaitPrimary
-awaitPrimary await primary =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Phantoms.unTTerm await)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)}]}))
-
-awaitPrimaryAwait :: Phantoms.TTerm Syntax.AwaitPrimary -> Phantoms.TTerm Bool
-awaitPrimaryAwait x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-        Core.projectionField = (Core.Name "await")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-awaitPrimaryPrimary :: Phantoms.TTerm Syntax.AwaitPrimary -> Phantoms.TTerm Syntax.Primary
-awaitPrimaryPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-awaitPrimaryWithAwait :: Phantoms.TTerm Syntax.AwaitPrimary -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.AwaitPrimary
-awaitPrimaryWithAwait original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-awaitPrimaryWithPrimary :: Phantoms.TTerm Syntax.AwaitPrimary -> Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.AwaitPrimary
-awaitPrimaryWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "await"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.AwaitPrimary"),
-              Core.projectionField = (Core.Name "await")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bitwiseAnd :: Phantoms.TTerm (Maybe Syntax.BitwiseAnd) -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.BitwiseAnd
-bitwiseAnd lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-bitwiseAndLhs :: Phantoms.TTerm Syntax.BitwiseAnd -> Phantoms.TTerm (Maybe Syntax.BitwiseAnd)
-bitwiseAndLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseAndRhs :: Phantoms.TTerm Syntax.BitwiseAnd -> Phantoms.TTerm Syntax.ShiftExpression
-bitwiseAndRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseAndWithLhs :: Phantoms.TTerm Syntax.BitwiseAnd -> Phantoms.TTerm (Maybe Syntax.BitwiseAnd) -> Phantoms.TTerm Syntax.BitwiseAnd
-bitwiseAndWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bitwiseAndWithRhs :: Phantoms.TTerm Syntax.BitwiseAnd -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.BitwiseAnd
-bitwiseAndWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseAnd"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bitwiseOr :: Phantoms.TTerm (Maybe Syntax.BitwiseOr) -> Phantoms.TTerm Syntax.BitwiseXor -> Phantoms.TTerm Syntax.BitwiseOr
-bitwiseOr lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-bitwiseOrLhs :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm (Maybe Syntax.BitwiseOr)
-bitwiseOrLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseOrRhs :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.BitwiseXor
-bitwiseOrRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseOrWithLhs :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm (Maybe Syntax.BitwiseOr) -> Phantoms.TTerm Syntax.BitwiseOr
-bitwiseOrWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bitwiseOrWithRhs :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.BitwiseXor -> Phantoms.TTerm Syntax.BitwiseOr
-bitwiseOrWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseOr"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-bitwiseXor :: Phantoms.TTerm (Maybe Syntax.BitwiseXor) -> Phantoms.TTerm Syntax.BitwiseAnd -> Phantoms.TTerm Syntax.BitwiseXor
-bitwiseXor lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-bitwiseXorLhs :: Phantoms.TTerm Syntax.BitwiseXor -> Phantoms.TTerm (Maybe Syntax.BitwiseXor)
-bitwiseXorLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseXorRhs :: Phantoms.TTerm Syntax.BitwiseXor -> Phantoms.TTerm Syntax.BitwiseAnd
-bitwiseXorRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bitwiseXorWithLhs :: Phantoms.TTerm Syntax.BitwiseXor -> Phantoms.TTerm (Maybe Syntax.BitwiseXor) -> Phantoms.TTerm Syntax.BitwiseXor
-bitwiseXorWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bitwiseXorWithRhs :: Phantoms.TTerm Syntax.BitwiseXor -> Phantoms.TTerm Syntax.BitwiseAnd -> Phantoms.TTerm Syntax.BitwiseXor
-bitwiseXorWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.BitwiseXor"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-blockIndented :: Phantoms.TTerm [[Syntax.Statement]] -> Phantoms.TTerm Syntax.Block
-blockIndented x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Block"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indented"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-blockSimple :: Phantoms.TTerm [Syntax.SimpleStatement] -> Phantoms.TTerm Syntax.Block
-blockSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Block"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-capturePattern :: Phantoms.TTerm Syntax.PatternCaptureTarget -> Phantoms.TTerm Syntax.CapturePattern
-capturePattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.CapturePattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-caseBlock :: Phantoms.TTerm Syntax.Patterns -> Phantoms.TTerm (Maybe Syntax.Guard) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.CaseBlock
-caseBlock patterns guard body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm patterns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm guard)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-caseBlockBody :: Phantoms.TTerm Syntax.CaseBlock -> Phantoms.TTerm Syntax.Block
-caseBlockBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseBlockGuard :: Phantoms.TTerm Syntax.CaseBlock -> Phantoms.TTerm (Maybe Syntax.Guard)
-caseBlockGuard x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-        Core.projectionField = (Core.Name "guard")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseBlockPatterns :: Phantoms.TTerm Syntax.CaseBlock -> Phantoms.TTerm Syntax.Patterns
-caseBlockPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-        Core.projectionField = (Core.Name "patterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseBlockWithBody :: Phantoms.TTerm Syntax.CaseBlock -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.CaseBlock
-caseBlockWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-              Core.projectionField = (Core.Name "patterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseBlockWithGuard :: Phantoms.TTerm Syntax.CaseBlock -> Phantoms.TTerm (Maybe Syntax.Guard) -> Phantoms.TTerm Syntax.CaseBlock
-caseBlockWithGuard original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-              Core.projectionField = (Core.Name "patterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseBlockWithPatterns :: Phantoms.TTerm Syntax.CaseBlock -> Phantoms.TTerm Syntax.Patterns -> Phantoms.TTerm Syntax.CaseBlock
-caseBlockWithPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CaseBlock"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDefinition :: Phantoms.TTerm (Maybe Syntax.Decorators) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm (Maybe Syntax.Args) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ClassDefinition
-classDefinition decorators name typeParams arguments body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Phantoms.unTTerm decorators)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-classDefinitionArguments :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm (Maybe Syntax.Args)
-classDefinitionArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDefinitionBody :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm Syntax.Block
-classDefinitionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDefinitionDecorators :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm (Maybe Syntax.Decorators)
-classDefinitionDecorators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-        Core.projectionField = (Core.Name "decorators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDefinitionName :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm Syntax.Name
-classDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDefinitionTypeParams :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm [Syntax.TypeParameter]
-classDefinitionTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-        Core.projectionField = (Core.Name "typeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classDefinitionWithArguments :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm (Maybe Syntax.Args) -> Phantoms.TTerm Syntax.ClassDefinition
-classDefinitionWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "decorators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDefinitionWithBody :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ClassDefinition
-classDefinitionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "decorators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classDefinitionWithDecorators :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm (Maybe Syntax.Decorators) -> Phantoms.TTerm Syntax.ClassDefinition
-classDefinitionWithDecorators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDefinitionWithName :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ClassDefinition
-classDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "decorators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classDefinitionWithTypeParams :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.ClassDefinition
-classDefinitionWithTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "decorators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassDefinition"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classPattern :: Phantoms.TTerm Syntax.NameOrAttribute -> Phantoms.TTerm (Maybe Syntax.PositionalPatterns) -> Phantoms.TTerm (Maybe Syntax.KeywordPatterns) -> Phantoms.TTerm Syntax.ClassPattern
-classPattern nameOrAttribute positionalPatterns keywordPatterns =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nameOrAttribute"),
-          Core.fieldTerm = (Phantoms.unTTerm nameOrAttribute)},
-        Core.Field {
-          Core.fieldName = (Core.Name "positionalPatterns"),
-          Core.fieldTerm = (Phantoms.unTTerm positionalPatterns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywordPatterns"),
-          Core.fieldTerm = (Phantoms.unTTerm keywordPatterns)}]}))
-
-classPatternKeywordPatterns :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm (Maybe Syntax.KeywordPatterns)
-classPatternKeywordPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-        Core.projectionField = (Core.Name "keywordPatterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classPatternNameOrAttribute :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm Syntax.NameOrAttribute
-classPatternNameOrAttribute x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-        Core.projectionField = (Core.Name "nameOrAttribute")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classPatternPositionalPatterns :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm (Maybe Syntax.PositionalPatterns)
-classPatternPositionalPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-        Core.projectionField = (Core.Name "positionalPatterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-classPatternWithKeywordPatterns :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm (Maybe Syntax.KeywordPatterns) -> Phantoms.TTerm Syntax.ClassPattern
-classPatternWithKeywordPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nameOrAttribute"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-              Core.projectionField = (Core.Name "nameOrAttribute")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "positionalPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-              Core.projectionField = (Core.Name "positionalPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywordPatterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-classPatternWithNameOrAttribute :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm Syntax.NameOrAttribute -> Phantoms.TTerm Syntax.ClassPattern
-classPatternWithNameOrAttribute original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nameOrAttribute"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "positionalPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-              Core.projectionField = (Core.Name "positionalPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywordPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-              Core.projectionField = (Core.Name "keywordPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-classPatternWithPositionalPatterns :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm (Maybe Syntax.PositionalPatterns) -> Phantoms.TTerm Syntax.ClassPattern
-classPatternWithPositionalPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nameOrAttribute"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-              Core.projectionField = (Core.Name "nameOrAttribute")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "positionalPatterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywordPatterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ClassPattern"),
-              Core.projectionField = (Core.Name "keywordPatterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closedPatternCapture :: Phantoms.TTerm Syntax.CapturePattern -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternCapture x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "capture"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternClass :: Phantoms.TTerm Syntax.ClassPattern -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternGroup :: Phantoms.TTerm Syntax.GroupPattern -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternLiteral :: Phantoms.TTerm Syntax.LiteralExpression -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternMapping :: Phantoms.TTerm Syntax.MappingPattern -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternMapping x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mapping"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternSequence :: Phantoms.TTerm Syntax.SequencePattern -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternValue :: Phantoms.TTerm Syntax.ValuePattern -> Phantoms.TTerm Syntax.ClosedPattern
-closedPatternValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-closedPatternWildcard :: Phantoms.TTerm Syntax.ClosedPattern
-closedPatternWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ClosedPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-commaStarEtc :: Phantoms.TTerm [Syntax.ParamMaybeDefault] -> Phantoms.TTerm (Maybe Syntax.Keywords) -> Phantoms.TTerm Syntax.CommaStarEtc
-commaStarEtc paramMaybeDefault keywords =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramMaybeDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Phantoms.unTTerm keywords)}]}))
-
-commaStarEtcKeywords :: Phantoms.TTerm Syntax.CommaStarEtc -> Phantoms.TTerm (Maybe Syntax.Keywords)
-commaStarEtcKeywords x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-        Core.projectionField = (Core.Name "keywords")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commaStarEtcParamMaybeDefault :: Phantoms.TTerm Syntax.CommaStarEtc -> Phantoms.TTerm [Syntax.ParamMaybeDefault]
-commaStarEtcParamMaybeDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-        Core.projectionField = (Core.Name "paramMaybeDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commaStarEtcWithKeywords :: Phantoms.TTerm Syntax.CommaStarEtc -> Phantoms.TTerm (Maybe Syntax.Keywords) -> Phantoms.TTerm Syntax.CommaStarEtc
-commaStarEtcWithKeywords original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-              Core.projectionField = (Core.Name "paramMaybeDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-commaStarEtcWithParamMaybeDefault :: Phantoms.TTerm Syntax.CommaStarEtc -> Phantoms.TTerm [Syntax.ParamMaybeDefault] -> Phantoms.TTerm Syntax.CommaStarEtc
-commaStarEtcWithParamMaybeDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CommaStarEtc"),
-              Core.projectionField = (Core.Name "keywords")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compareOpBitwiseOrPair :: Phantoms.TTerm Syntax.CompareOp -> Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.CompareOpBitwiseOrPair
-compareOpBitwiseOrPair operator rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-compareOpBitwiseOrPairOperator :: Phantoms.TTerm Syntax.CompareOpBitwiseOrPair -> Phantoms.TTerm Syntax.CompareOp
-compareOpBitwiseOrPairOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compareOpBitwiseOrPairRhs :: Phantoms.TTerm Syntax.CompareOpBitwiseOrPair -> Phantoms.TTerm Syntax.BitwiseOr
-compareOpBitwiseOrPairRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compareOpBitwiseOrPairWithOperator :: Phantoms.TTerm Syntax.CompareOpBitwiseOrPair -> Phantoms.TTerm Syntax.CompareOp -> Phantoms.TTerm Syntax.CompareOpBitwiseOrPair
-compareOpBitwiseOrPairWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compareOpBitwiseOrPairWithRhs :: Phantoms.TTerm Syntax.CompareOpBitwiseOrPair -> Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.CompareOpBitwiseOrPair
-compareOpBitwiseOrPairWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compareOpEq :: Phantoms.TTerm Syntax.CompareOp
-compareOpEq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpGt :: Phantoms.TTerm Syntax.CompareOp
-compareOpGt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpGte :: Phantoms.TTerm Syntax.CompareOp
-compareOpGte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpIn :: Phantoms.TTerm Syntax.CompareOp
-compareOpIn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpIs :: Phantoms.TTerm Syntax.CompareOp
-compareOpIs =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "is"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpIsnot :: Phantoms.TTerm Syntax.CompareOp
-compareOpIsnot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "isnot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpLt :: Phantoms.TTerm Syntax.CompareOp
-compareOpLt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpLte :: Phantoms.TTerm Syntax.CompareOp
-compareOpLte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpNoteq :: Phantoms.TTerm Syntax.CompareOp
-compareOpNoteq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noteq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compareOpNotin :: Phantoms.TTerm Syntax.CompareOp
-compareOpNotin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompareOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notin"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-comparison :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm [Syntax.CompareOpBitwiseOrPair] -> Phantoms.TTerm Syntax.Comparison
-comparison lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-comparisonLhs :: Phantoms.TTerm Syntax.Comparison -> Phantoms.TTerm Syntax.BitwiseOr
-comparisonLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonRhs :: Phantoms.TTerm Syntax.Comparison -> Phantoms.TTerm [Syntax.CompareOpBitwiseOrPair]
-comparisonRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-comparisonWithLhs :: Phantoms.TTerm Syntax.Comparison -> Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.Comparison
-comparisonWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-comparisonWithRhs :: Phantoms.TTerm Syntax.Comparison -> Phantoms.TTerm [Syntax.CompareOpBitwiseOrPair] -> Phantoms.TTerm Syntax.Comparison
-comparisonWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Comparison"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-complexNumber :: Phantoms.TTerm Syntax.SignedRealNumber -> Phantoms.TTerm Syntax.PlusOrMinus -> Phantoms.TTerm Syntax.ImaginaryNumber -> Phantoms.TTerm Syntax.ComplexNumber
-complexNumber real plusOrMinus imaginary =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "real"),
-          Core.fieldTerm = (Phantoms.unTTerm real)},
-        Core.Field {
-          Core.fieldName = (Core.Name "plusOrMinus"),
-          Core.fieldTerm = (Phantoms.unTTerm plusOrMinus)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imaginary"),
-          Core.fieldTerm = (Phantoms.unTTerm imaginary)}]}))
-
-complexNumberImaginary :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.ImaginaryNumber
-complexNumberImaginary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-        Core.projectionField = (Core.Name "imaginary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-complexNumberPlusOrMinus :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.PlusOrMinus
-complexNumberPlusOrMinus x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-        Core.projectionField = (Core.Name "plusOrMinus")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-complexNumberReal :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.SignedRealNumber
-complexNumberReal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-        Core.projectionField = (Core.Name "real")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-complexNumberWithImaginary :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.ImaginaryNumber -> Phantoms.TTerm Syntax.ComplexNumber
-complexNumberWithImaginary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "real"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-              Core.projectionField = (Core.Name "real")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "plusOrMinus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-              Core.projectionField = (Core.Name "plusOrMinus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imaginary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-complexNumberWithPlusOrMinus :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.PlusOrMinus -> Phantoms.TTerm Syntax.ComplexNumber
-complexNumberWithPlusOrMinus original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "real"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-              Core.projectionField = (Core.Name "real")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "plusOrMinus"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "imaginary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-              Core.projectionField = (Core.Name "imaginary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-complexNumberWithReal :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.SignedRealNumber -> Phantoms.TTerm Syntax.ComplexNumber
-complexNumberWithReal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "real"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "plusOrMinus"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-              Core.projectionField = (Core.Name "plusOrMinus")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "imaginary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ComplexNumber"),
-              Core.projectionField = (Core.Name "imaginary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundStatementClassDef :: Phantoms.TTerm Syntax.ClassDefinition -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementClassDef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "classDef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementFor :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementFunction :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementIf :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementMatch :: Phantoms.TTerm Syntax.MatchStatement -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementTry :: Phantoms.TTerm Syntax.TryStatement -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementTry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "try"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementWhile :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-compoundStatementWith :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm Syntax.CompoundStatement
-compoundStatementWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.CompoundStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "with"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-conditional :: Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Conditional
-conditional body if_ else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "if"),
-          Core.fieldTerm = (Phantoms.unTTerm if_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-conditionalBody :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Disjunction
-conditionalBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalElse :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Expression
-conditionalElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalIf :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Disjunction
-conditionalIf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-        Core.projectionField = (Core.Name "if")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-conditionalWithBody :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm Syntax.Conditional
-conditionalWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "if"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-              Core.projectionField = (Core.Name "if")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conditionalWithElse :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Conditional
-conditionalWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "if"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-              Core.projectionField = (Core.Name "if")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-conditionalWithIf :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm Syntax.Conditional
-conditionalWithIf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "if"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Conditional"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-conjunction :: Phantoms.TTerm [Syntax.Inversion] -> Phantoms.TTerm Syntax.Conjunction
-conjunction x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Conjunction"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-decorators :: Phantoms.TTerm [Syntax.NamedExpression] -> Phantoms.TTerm Syntax.Decorators
-decorators x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Decorators"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-default_ :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Default
-default_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Default"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-delStatement :: Phantoms.TTerm Syntax.DelTargets -> Phantoms.TTerm Syntax.DelStatement
-delStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.DelStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-delTAtomName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.DelTAtom
-delTAtomName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DelTAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delTAtomTarget :: Phantoms.TTerm Syntax.DelTarget -> Phantoms.TTerm Syntax.DelTAtom
-delTAtomTarget x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DelTAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "target"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delTAtomTargets :: Phantoms.TTerm Syntax.DelTargets -> Phantoms.TTerm Syntax.DelTAtom
-delTAtomTargets x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DelTAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "targets"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delTargetDelTAtom :: Phantoms.TTerm Syntax.DelTAtom -> Phantoms.TTerm Syntax.DelTarget
-delTargetDelTAtom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DelTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delTAtom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delTargetPrimaryAndName :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.DelTarget
-delTargetPrimaryAndName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DelTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delTargetPrimaryAndSlices :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.DelTarget
-delTargetPrimaryAndSlices x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DelTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndSlices"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-delTargets :: Phantoms.TTerm [Syntax.DelTarget] -> Phantoms.TTerm Syntax.DelTargets
-delTargets x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.DelTargets"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dict :: Phantoms.TTerm [Syntax.DoubleStarredKvpair] -> Phantoms.TTerm Syntax.Dict
-dict x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Dict"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dictcomp :: Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Dictcomp
-dictcomp kvpair forIfClauses =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kvpair"),
-          Core.fieldTerm = (Phantoms.unTTerm kvpair)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm forIfClauses)}]}))
-
-dictcompForIfClauses :: Phantoms.TTerm Syntax.Dictcomp -> Phantoms.TTerm Syntax.ForIfClauses
-dictcompForIfClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-        Core.projectionField = (Core.Name "forIfClauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dictcompKvpair :: Phantoms.TTerm Syntax.Dictcomp -> Phantoms.TTerm Syntax.Kvpair
-dictcompKvpair x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-        Core.projectionField = (Core.Name "kvpair")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dictcompWithForIfClauses :: Phantoms.TTerm Syntax.Dictcomp -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Dictcomp
-dictcompWithForIfClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kvpair"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-              Core.projectionField = (Core.Name "kvpair")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dictcompWithKvpair :: Phantoms.TTerm Syntax.Dictcomp -> Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.Dictcomp
-dictcompWithKvpair original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "kvpair"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Dictcomp"),
-              Core.projectionField = (Core.Name "forIfClauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-disjunction :: Phantoms.TTerm [Syntax.Conjunction] -> Phantoms.TTerm Syntax.Disjunction
-disjunction x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Disjunction"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dottedAsName :: Phantoms.TTerm Syntax.DottedName -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.DottedAsName
-dottedAsName name as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-dottedAsNameAs :: Phantoms.TTerm Syntax.DottedAsName -> Phantoms.TTerm (Maybe Syntax.Name)
-dottedAsNameAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dottedAsNameName :: Phantoms.TTerm Syntax.DottedAsName -> Phantoms.TTerm Syntax.DottedName
-dottedAsNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dottedAsNameWithAs :: Phantoms.TTerm Syntax.DottedAsName -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.DottedAsName
-dottedAsNameWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dottedAsNameWithName :: Phantoms.TTerm Syntax.DottedAsName -> Phantoms.TTerm Syntax.DottedName -> Phantoms.TTerm Syntax.DottedAsName
-dottedAsNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.DottedAsName"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dottedName :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.DottedName
-dottedName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.DottedName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-doubleStarPattern :: Phantoms.TTerm Syntax.PatternCaptureTarget -> Phantoms.TTerm Syntax.DoubleStarPattern
-doubleStarPattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.DoubleStarPattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-doubleStarTypeParameter :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.DoubleStarTypeParameter
-doubleStarTypeParameter name default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-doubleStarTypeParameterDefault :: Phantoms.TTerm Syntax.DoubleStarTypeParameter -> Phantoms.TTerm (Maybe Syntax.Expression)
-doubleStarTypeParameterDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doubleStarTypeParameterName :: Phantoms.TTerm Syntax.DoubleStarTypeParameter -> Phantoms.TTerm Syntax.Name
-doubleStarTypeParameterName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-doubleStarTypeParameterWithDefault :: Phantoms.TTerm Syntax.DoubleStarTypeParameter -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.DoubleStarTypeParameter
-doubleStarTypeParameterWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-doubleStarTypeParameterWithName :: Phantoms.TTerm Syntax.DoubleStarTypeParameter -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.DoubleStarTypeParameter
-doubleStarTypeParameterWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.DoubleStarTypeParameter"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-doubleStarredKvpairPair :: Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.DoubleStarredKvpair
-doubleStarredKvpairPair x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DoubleStarredKvpair"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-doubleStarredKvpairStarred :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.DoubleStarredKvpair
-doubleStarredKvpairStarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.DoubleStarredKvpair"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-eval :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Eval
-eval x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Eval"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-exceptBlock :: Phantoms.TTerm (Maybe Syntax.ExceptExpression) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ExceptBlock
-exceptBlock expression body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-exceptBlockBody :: Phantoms.TTerm Syntax.ExceptBlock -> Phantoms.TTerm Syntax.Block
-exceptBlockBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptBlockExpression :: Phantoms.TTerm Syntax.ExceptBlock -> Phantoms.TTerm (Maybe Syntax.ExceptExpression)
-exceptBlockExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptBlockWithBody :: Phantoms.TTerm Syntax.ExceptBlock -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ExceptBlock
-exceptBlockWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exceptBlockWithExpression :: Phantoms.TTerm Syntax.ExceptBlock -> Phantoms.TTerm (Maybe Syntax.ExceptExpression) -> Phantoms.TTerm Syntax.ExceptBlock
-exceptBlockWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptBlock"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exceptExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.ExceptExpression
-exceptExpression expression as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-exceptExpressionAs :: Phantoms.TTerm Syntax.ExceptExpression -> Phantoms.TTerm (Maybe Syntax.Name)
-exceptExpressionAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptExpressionExpression :: Phantoms.TTerm Syntax.ExceptExpression -> Phantoms.TTerm Syntax.Expression
-exceptExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptExpressionWithAs :: Phantoms.TTerm Syntax.ExceptExpression -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.ExceptExpression
-exceptExpressionWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exceptExpressionWithExpression :: Phantoms.TTerm Syntax.ExceptExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ExceptExpression
-exceptExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptExpression"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exceptStarBlock :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ExceptStarBlock
-exceptStarBlock expression as body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-exceptStarBlockAs :: Phantoms.TTerm Syntax.ExceptStarBlock -> Phantoms.TTerm (Maybe Syntax.Name)
-exceptStarBlockAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptStarBlockBody :: Phantoms.TTerm Syntax.ExceptStarBlock -> Phantoms.TTerm Syntax.Block
-exceptStarBlockBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptStarBlockExpression :: Phantoms.TTerm Syntax.ExceptStarBlock -> Phantoms.TTerm Syntax.Expression
-exceptStarBlockExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exceptStarBlockWithAs :: Phantoms.TTerm Syntax.ExceptStarBlock -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.ExceptStarBlock
-exceptStarBlockWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exceptStarBlockWithBody :: Phantoms.TTerm Syntax.ExceptStarBlock -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ExceptStarBlock
-exceptStarBlockWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exceptStarBlockWithExpression :: Phantoms.TTerm Syntax.ExceptStarBlock -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ExceptStarBlock
-exceptStarBlockWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ExceptStarBlock"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-expressionConditional :: Phantoms.TTerm Syntax.Conditional -> Phantoms.TTerm Syntax.Expression
-expressionConditional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conditional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLambda :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm Syntax.Expression
-expressionLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionSimple :: Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm Syntax.Expression
-expressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-factorComplement :: Phantoms.TTerm Syntax.Factor -> Phantoms.TTerm Syntax.Factor
-factorComplement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Factor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "complement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-factorNegative :: Phantoms.TTerm Syntax.Factor -> Phantoms.TTerm Syntax.Factor
-factorNegative x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Factor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negative"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-factorPositive :: Phantoms.TTerm Syntax.Factor -> Phantoms.TTerm Syntax.Factor
-factorPositive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Factor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "positive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-factorSimple :: Phantoms.TTerm Syntax.Power -> Phantoms.TTerm Syntax.Factor
-factorSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Factor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-file :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.File
-file x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.File"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-forIfClause :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm [Syntax.Disjunction] -> Phantoms.TTerm Syntax.ForIfClause
-forIfClause async targets in_ ifs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm targets)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifs"),
-          Core.fieldTerm = (Phantoms.unTTerm ifs)}]}))
-
-forIfClauseAsync :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm Bool
-forIfClauseAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forIfClauseIfs :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm [Syntax.Disjunction]
-forIfClauseIfs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-        Core.projectionField = (Core.Name "ifs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forIfClauseIn :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm Syntax.Disjunction
-forIfClauseIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forIfClauseTargets :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm [Syntax.StarTarget]
-forIfClauseTargets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-        Core.projectionField = (Core.Name "targets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forIfClauseWithAsync :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ForIfClause
-forIfClauseWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "ifs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forIfClauseWithIfs :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm [Syntax.Disjunction] -> Phantoms.TTerm Syntax.ForIfClause
-forIfClauseWithIfs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forIfClauseWithIn :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm Syntax.ForIfClause
-forIfClauseWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "ifs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forIfClauseWithTargets :: Phantoms.TTerm Syntax.ForIfClause -> Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.ForIfClause
-forIfClauseWithTargets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ifs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForIfClause"),
-              Core.projectionField = (Core.Name "ifs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forIfClauses :: Phantoms.TTerm [Syntax.ForIfClause] -> Phantoms.TTerm Syntax.ForIfClauses
-forIfClauses x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.ForIfClauses"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-forStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm [Syntax.StarExpression] -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.ForStatement
-forStatement async targets expressions typeComment body else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm targets)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm expressions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-forStatementAsync :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Bool
-forStatementAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Block
-forStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementElse :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-forStatementElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementExpressions :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm [Syntax.StarExpression]
-forStatementExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "expressions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementTargets :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm [Syntax.StarTarget]
-forStatementTargets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "targets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementTypeComment :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-forStatementTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forStatementWithAsync :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithBody :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithElse :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forStatementWithExpressions :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm [Syntax.StarExpression] -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithExpressions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithTargets :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithTargets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forStatementWithTypeComment :: Phantoms.TTerm Syntax.ForStatement -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ForStatement
-forStatementWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expressions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "expressions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ForStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-funcType :: Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FuncType
-funcType type_ body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-funcTypeBody :: Phantoms.TTerm Syntax.FuncType -> Phantoms.TTerm Syntax.Expression
-funcTypeBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-funcTypeComment :: Phantoms.TTerm Syntax.TypeComment -> Phantoms.TTerm Syntax.FuncTypeComment
-funcTypeComment x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.FuncTypeComment"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-funcTypeType :: Phantoms.TTerm Syntax.FuncType -> Phantoms.TTerm [Syntax.TypeExpression]
-funcTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-funcTypeWithBody :: Phantoms.TTerm Syntax.FuncType -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FuncType
-funcTypeWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-funcTypeWithType :: Phantoms.TTerm Syntax.FuncType -> Phantoms.TTerm [Syntax.TypeExpression] -> Phantoms.TTerm Syntax.FuncType
-funcTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FuncType"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefRaw :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm (Maybe Syntax.Parameters) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.FuncTypeComment) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRaw async name typeParams params returnType funcTypeComment block =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm funcTypeComment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm block)}]}))
-
-functionDefRawAsync :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Bool
-functionDefRawAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawBlock :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Syntax.Block
-functionDefRawBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "block")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawFuncTypeComment :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm (Maybe Syntax.FuncTypeComment)
-functionDefRawFuncTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "funcTypeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawName :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Syntax.Name
-functionDefRawName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawParams :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm (Maybe Syntax.Parameters)
-functionDefRawParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawReturnType :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm (Maybe Syntax.Expression)
-functionDefRawReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawTypeParams :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm [Syntax.TypeParameter]
-functionDefRawTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-        Core.projectionField = (Core.Name "typeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefRawWithAsync :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "funcTypeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefRawWithBlock :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "funcTypeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-functionDefRawWithFuncTypeComment :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm (Maybe Syntax.FuncTypeComment) -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithFuncTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefRawWithName :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "funcTypeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefRawWithParams :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm (Maybe Syntax.Parameters) -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "funcTypeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefRawWithReturnType :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "funcTypeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefRawWithTypeParams :: Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefRawWithTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "funcTypeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "funcTypeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "block"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefRaw"),
-              Core.projectionField = (Core.Name "block")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinition :: Phantoms.TTerm (Maybe Syntax.Decorators) -> Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinition decorators raw =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Phantoms.unTTerm decorators)},
-        Core.Field {
-          Core.fieldName = (Core.Name "raw"),
-          Core.fieldTerm = (Phantoms.unTTerm raw)}]}))
-
-functionDefinitionDecorators :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm (Maybe Syntax.Decorators)
-functionDefinitionDecorators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "decorators")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionRaw :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm Syntax.FunctionDefRaw
-functionDefinitionRaw x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-        Core.projectionField = (Core.Name "raw")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionDefinitionWithDecorators :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm (Maybe Syntax.Decorators) -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithDecorators original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "raw"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "raw")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionDefinitionWithRaw :: Phantoms.TTerm Syntax.FunctionDefinition -> Phantoms.TTerm Syntax.FunctionDefRaw -> Phantoms.TTerm Syntax.FunctionDefinition
-functionDefinitionWithRaw original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "decorators"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.FunctionDefinition"),
-              Core.projectionField = (Core.Name "decorators")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "raw"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genexp :: Phantoms.TTerm Syntax.GenexpHead -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Genexp
-genexp head tail =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm tail)}]}))
-
-genexpHead :: Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.GenexpHead
-genexpHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genexpHeadAssignment :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.GenexpHead
-genexpHeadAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.GenexpHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genexpHeadExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.GenexpHead
-genexpHeadExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.GenexpHead"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genexpTail :: Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.ForIfClauses
-genexpTail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-        Core.projectionField = (Core.Name "tail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genexpWithHead :: Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.GenexpHead -> Phantoms.TTerm Syntax.Genexp
-genexpWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-genexpWithTail :: Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Genexp
-genexpWithTail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Genexp"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-groupExpression :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Group
-groupExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Group"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-groupPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.GroupPattern
-groupPattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.GroupPattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-groupYield :: Phantoms.TTerm Syntax.YieldExpression -> Phantoms.TTerm Syntax.Group
-groupYield x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Group"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "yield"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-guard :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Guard
-guard x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Guard"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-ifStatement :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.IfTail) -> Phantoms.TTerm Syntax.IfStatement
-ifStatement condition body continuation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Phantoms.unTTerm continuation)}]}))
-
-ifStatementBody :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Block
-ifStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementCondition :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.NamedExpression
-ifStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementContinuation :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm (Maybe Syntax.IfTail)
-ifStatementContinuation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-        Core.projectionField = (Core.Name "continuation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifStatementWithBody :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "continuation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStatementWithCondition :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "continuation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifStatementWithContinuation :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm (Maybe Syntax.IfTail) -> Phantoms.TTerm Syntax.IfStatement
-ifStatementWithContinuation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.IfStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "continuation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifTailElif :: Phantoms.TTerm Syntax.IfStatement -> Phantoms.TTerm Syntax.IfTail
-ifTailElif x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.IfTail"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elif"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ifTailElse :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.IfTail
-ifTailElse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.IfTail"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "else"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-imaginaryNumber :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.ImaginaryNumber
-imaginaryNumber x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.ImaginaryNumber"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importFrom :: Phantoms.TTerm [Syntax.RelativeImportPrefix] -> Phantoms.TTerm (Maybe Syntax.DottedName) -> Phantoms.TTerm Syntax.ImportFromTargets -> Phantoms.TTerm Syntax.ImportFrom
-importFrom prefixes dottedName targets =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixes"),
-          Core.fieldTerm = (Phantoms.unTTerm prefixes)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dottedName"),
-          Core.fieldTerm = (Phantoms.unTTerm dottedName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm targets)}]}))
-
-importFromAsName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.ImportFromAsName
-importFromAsName name as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-importFromAsNameAs :: Phantoms.TTerm Syntax.ImportFromAsName -> Phantoms.TTerm (Maybe Syntax.Name)
-importFromAsNameAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importFromAsNameName :: Phantoms.TTerm Syntax.ImportFromAsName -> Phantoms.TTerm Syntax.Name
-importFromAsNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importFromAsNameWithAs :: Phantoms.TTerm Syntax.ImportFromAsName -> Phantoms.TTerm (Maybe Syntax.Name) -> Phantoms.TTerm Syntax.ImportFromAsName
-importFromAsNameWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importFromAsNameWithName :: Phantoms.TTerm Syntax.ImportFromAsName -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ImportFromAsName
-importFromAsNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFromAsName"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importFromDottedName :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm (Maybe Syntax.DottedName)
-importFromDottedName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-        Core.projectionField = (Core.Name "dottedName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importFromPrefixes :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm [Syntax.RelativeImportPrefix]
-importFromPrefixes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-        Core.projectionField = (Core.Name "prefixes")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importFromTargets :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm Syntax.ImportFromTargets
-importFromTargets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-        Core.projectionField = (Core.Name "targets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importFromTargetsParens :: Phantoms.TTerm [Syntax.ImportFromAsName] -> Phantoms.TTerm Syntax.ImportFromTargets
-importFromTargetsParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ImportFromTargets"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importFromTargetsSimple :: Phantoms.TTerm [Syntax.ImportFromAsName] -> Phantoms.TTerm Syntax.ImportFromTargets
-importFromTargetsSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ImportFromTargets"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importFromTargetsStar :: Phantoms.TTerm Syntax.ImportFromTargets
-importFromTargetsStar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ImportFromTargets"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-importFromWithDottedName :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm (Maybe Syntax.DottedName) -> Phantoms.TTerm Syntax.ImportFrom
-importFromWithDottedName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-              Core.projectionField = (Core.Name "prefixes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dottedName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importFromWithPrefixes :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm [Syntax.RelativeImportPrefix] -> Phantoms.TTerm Syntax.ImportFrom
-importFromWithPrefixes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixes"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "dottedName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-              Core.projectionField = (Core.Name "dottedName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importFromWithTargets :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm Syntax.ImportFromTargets -> Phantoms.TTerm Syntax.ImportFrom
-importFromWithTargets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefixes"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-              Core.projectionField = (Core.Name "prefixes")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dottedName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ImportFrom"),
-              Core.projectionField = (Core.Name "dottedName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importName :: Phantoms.TTerm [Syntax.DottedAsName] -> Phantoms.TTerm Syntax.ImportName
-importName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.ImportName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-importStatementFrom :: Phantoms.TTerm Syntax.ImportFrom -> Phantoms.TTerm Syntax.ImportStatement
-importStatementFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ImportStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "from"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importStatementName :: Phantoms.TTerm Syntax.ImportName -> Phantoms.TTerm Syntax.ImportStatement
-importStatementName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ImportStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-interactive :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.Interactive
-interactive x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Interactive"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-inversionNot :: Phantoms.TTerm Syntax.Inversion -> Phantoms.TTerm Syntax.Inversion
-inversionNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Inversion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inversionSimple :: Phantoms.TTerm Syntax.Comparison -> Phantoms.TTerm Syntax.Inversion
-inversionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Inversion"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemsPattern :: Phantoms.TTerm [Syntax.KeyValuePattern] -> Phantoms.TTerm Syntax.ItemsPattern
-itemsPattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.ItemsPattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-keyValuePattern :: Phantoms.TTerm Syntax.LiteralExpressionOrAttribute -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.KeyValuePattern
-keyValuePattern key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.KeyValuePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-keyValuePatternKey :: Phantoms.TTerm Syntax.KeyValuePattern -> Phantoms.TTerm Syntax.LiteralExpressionOrAttribute
-keyValuePatternKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.KeyValuePattern"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePatternValue :: Phantoms.TTerm Syntax.KeyValuePattern -> Phantoms.TTerm Syntax.Pattern
-keyValuePatternValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.KeyValuePattern"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keyValuePatternWithKey :: Phantoms.TTerm Syntax.KeyValuePattern -> Phantoms.TTerm Syntax.LiteralExpressionOrAttribute -> Phantoms.TTerm Syntax.KeyValuePattern
-keyValuePatternWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.KeyValuePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.python.syntax.KeyValuePattern"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keyValuePatternWithValue :: Phantoms.TTerm Syntax.KeyValuePattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.KeyValuePattern
-keyValuePatternWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.KeyValuePattern"),
-      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.python.syntax.KeyValuePattern"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-keywordPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.KeywordPattern
-keywordPattern name pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-keywordPatternName :: Phantoms.TTerm Syntax.KeywordPattern -> Phantoms.TTerm Syntax.Name
-keywordPatternName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keywordPatternPattern :: Phantoms.TTerm Syntax.KeywordPattern -> Phantoms.TTerm Syntax.Pattern
-keywordPatternPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-keywordPatternWithName :: Phantoms.TTerm Syntax.KeywordPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.KeywordPattern
-keywordPatternWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-keywordPatternWithPattern :: Phantoms.TTerm Syntax.KeywordPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.KeywordPattern
-keywordPatternWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.KeywordPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-keywordPatterns :: Phantoms.TTerm [Syntax.KeywordPattern] -> Phantoms.TTerm Syntax.KeywordPatterns
-keywordPatterns x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.KeywordPatterns"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-keywords :: Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm Syntax.Keywords
-keywords x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Keywords"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-kvpair :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Kvpair
-kvpair key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Kvpair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-kvpairKey :: Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.Expression
-kvpairKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Kvpair"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-kvpairValue :: Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.Expression
-kvpairValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Kvpair"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-kvpairWithKey :: Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Kvpair
-kvpairWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Kvpair"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.python.syntax.Kvpair"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-kvpairWithValue :: Phantoms.TTerm Syntax.Kvpair -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Kvpair
-kvpairWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Kvpair"),
-      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.python.syntax.Kvpair"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-kwarg :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Kwarg
-kwarg name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Kwarg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-kwargName :: Phantoms.TTerm Syntax.Kwarg -> Phantoms.TTerm Syntax.Name
-kwargName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Kwarg"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-kwargOrDoubleStarredDoubleStarred :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.KwargOrDoubleStarred
-kwargOrDoubleStarredDoubleStarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.KwargOrDoubleStarred"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doubleStarred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-kwargOrDoubleStarredKwarg :: Phantoms.TTerm Syntax.Kwarg -> Phantoms.TTerm Syntax.KwargOrDoubleStarred
-kwargOrDoubleStarredKwarg x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.KwargOrDoubleStarred"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "kwarg"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-kwargOrStarredKwarg :: Phantoms.TTerm Syntax.Kwarg -> Phantoms.TTerm Syntax.KwargOrStarred
-kwargOrStarredKwarg x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.KwargOrStarred"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "kwarg"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-kwargOrStarredStarred :: Phantoms.TTerm Syntax.StarredExpression -> Phantoms.TTerm Syntax.KwargOrStarred
-kwargOrStarredStarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.KwargOrStarred"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-kwargValue :: Phantoms.TTerm Syntax.Kwarg -> Phantoms.TTerm Syntax.Expression
-kwargValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Kwarg"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-kwargWithName :: Phantoms.TTerm Syntax.Kwarg -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Kwarg
-kwargWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Kwarg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.python.syntax.Kwarg"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-kwargWithValue :: Phantoms.TTerm Syntax.Kwarg -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Kwarg
-kwargWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Kwarg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Kwarg"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambda :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Lambda
-lambda params body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-lambdaBody :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm Syntax.Expression
-lambdaBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaKwds :: Phantoms.TTerm Syntax.LambdaParamNoDefault -> Phantoms.TTerm Syntax.LambdaKwds
-lambdaKwds x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.LambdaKwds"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-lambdaParamMaybeDefault :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Default) -> Phantoms.TTerm Syntax.LambdaParamMaybeDefault
-lambdaParamMaybeDefault param default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-lambdaParamMaybeDefaultDefault :: Phantoms.TTerm Syntax.LambdaParamMaybeDefault -> Phantoms.TTerm (Maybe Syntax.Default)
-lambdaParamMaybeDefaultDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParamMaybeDefaultParam :: Phantoms.TTerm Syntax.LambdaParamMaybeDefault -> Phantoms.TTerm Syntax.Name
-lambdaParamMaybeDefaultParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParamMaybeDefaultWithDefault :: Phantoms.TTerm Syntax.LambdaParamMaybeDefault -> Phantoms.TTerm (Maybe Syntax.Default) -> Phantoms.TTerm Syntax.LambdaParamMaybeDefault
-lambdaParamMaybeDefaultWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaParamMaybeDefaultWithParam :: Phantoms.TTerm Syntax.LambdaParamMaybeDefault -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.LambdaParamMaybeDefault
-lambdaParamMaybeDefaultWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParamNoDefault :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.LambdaParamNoDefault
-lambdaParamNoDefault x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.LambdaParamNoDefault"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-lambdaParamWithDefault :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Default) -> Phantoms.TTerm Syntax.LambdaParamWithDefault
-lambdaParamWithDefault param default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-lambdaParamWithDefaultDefault :: Phantoms.TTerm Syntax.LambdaParamWithDefault -> Phantoms.TTerm (Maybe Syntax.Default)
-lambdaParamWithDefaultDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParamWithDefaultParam :: Phantoms.TTerm Syntax.LambdaParamWithDefault -> Phantoms.TTerm Syntax.Name
-lambdaParamWithDefaultParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParamWithDefaultWithDefault :: Phantoms.TTerm Syntax.LambdaParamWithDefault -> Phantoms.TTerm (Maybe Syntax.Default) -> Phantoms.TTerm Syntax.LambdaParamWithDefault
-lambdaParamWithDefaultWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaParamWithDefaultWithParam :: Phantoms.TTerm Syntax.LambdaParamWithDefault -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.LambdaParamWithDefault
-lambdaParamWithDefaultWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParamWithDefault"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParameters :: Phantoms.TTerm (Maybe Syntax.LambdaSlashNoDefault) -> Phantoms.TTerm [Syntax.LambdaParamNoDefault] -> Phantoms.TTerm [Syntax.LambdaParamWithDefault] -> Phantoms.TTerm (Maybe Syntax.LambdaStarEtc) -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParameters slashNoDefault paramNoDefault paramWithDefault starEtc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slashNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm slashNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm starEtc)}]}))
-
-lambdaParametersParamNoDefault :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm [Syntax.LambdaParamNoDefault]
-lambdaParametersParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParametersParamWithDefault :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm [Syntax.LambdaParamWithDefault]
-lambdaParametersParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParametersSlashNoDefault :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm (Maybe Syntax.LambdaSlashNoDefault)
-lambdaParametersSlashNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-        Core.projectionField = (Core.Name "slashNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParametersStarEtc :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm (Maybe Syntax.LambdaStarEtc)
-lambdaParametersStarEtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-        Core.projectionField = (Core.Name "starEtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaParametersWithParamNoDefault :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm [Syntax.LambdaParamNoDefault] -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParametersWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slashNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "slashNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParametersWithParamWithDefault :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm [Syntax.LambdaParamWithDefault] -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParametersWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slashNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "slashNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParametersWithSlashNoDefault :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm (Maybe Syntax.LambdaSlashNoDefault) -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParametersWithSlashNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slashNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaParametersWithStarEtc :: Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm (Maybe Syntax.LambdaStarEtc) -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParametersWithStarEtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slashNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "slashNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaParams :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm Syntax.LambdaParameters
-lambdaParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaSlashNoDefault :: Phantoms.TTerm [Syntax.LambdaParamNoDefault] -> Phantoms.TTerm Syntax.LambdaSlashNoDefault
-lambdaSlashNoDefault parameters =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaSlashNoDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)}]}))
-
-lambdaSlashNoDefaultParameters :: Phantoms.TTerm Syntax.LambdaSlashNoDefault -> Phantoms.TTerm [Syntax.LambdaParamNoDefault]
-lambdaSlashNoDefaultParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaSlashNoDefault"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaSlashNoDefaultWithParameters :: Phantoms.TTerm Syntax.LambdaSlashNoDefault -> Phantoms.TTerm [Syntax.LambdaParamNoDefault] -> Phantoms.TTerm Syntax.LambdaSlashNoDefault
-lambdaSlashNoDefaultWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaSlashNoDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaSlashWithDefault :: Phantoms.TTerm [Syntax.LambdaParamNoDefault] -> Phantoms.TTerm [Syntax.LambdaParamWithDefault] -> Phantoms.TTerm Syntax.LambdaSlashWithDefault
-lambdaSlashWithDefault paramNoDefault paramWithDefault =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)}]}))
-
-lambdaSlashWithDefaultParamNoDefault :: Phantoms.TTerm Syntax.LambdaSlashWithDefault -> Phantoms.TTerm [Syntax.LambdaParamNoDefault]
-lambdaSlashWithDefaultParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaSlashWithDefaultParamWithDefault :: Phantoms.TTerm Syntax.LambdaSlashWithDefault -> Phantoms.TTerm [Syntax.LambdaParamWithDefault]
-lambdaSlashWithDefaultParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lambdaSlashWithDefaultWithParamNoDefault :: Phantoms.TTerm Syntax.LambdaSlashWithDefault -> Phantoms.TTerm [Syntax.LambdaParamNoDefault] -> Phantoms.TTerm Syntax.LambdaSlashWithDefault
-lambdaSlashWithDefaultWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lambdaSlashWithDefaultWithParamWithDefault :: Phantoms.TTerm Syntax.LambdaSlashWithDefault -> Phantoms.TTerm [Syntax.LambdaParamWithDefault] -> Phantoms.TTerm Syntax.LambdaSlashWithDefault
-lambdaSlashWithDefaultWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.LambdaSlashWithDefault"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaStarEtcKwds :: Phantoms.TTerm Syntax.LambdaKwds -> Phantoms.TTerm Syntax.LambdaStarEtc
-lambdaStarEtcKwds x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LambdaStarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "kwds"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaStarEtcParamMaybeDefault :: Phantoms.TTerm [Syntax.LambdaParamMaybeDefault] -> Phantoms.TTerm Syntax.LambdaStarEtc
-lambdaStarEtcParamMaybeDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LambdaStarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paramMaybeDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaStarEtcParamNoDefault :: Phantoms.TTerm Syntax.LambdaParamNoDefault -> Phantoms.TTerm Syntax.LambdaStarEtc
-lambdaStarEtcParamNoDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LambdaStarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paramNoDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaStarEtcStar :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.LambdaStarEtc
-lambdaStarEtcStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LambdaStarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-lambdaWithBody :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Lambda
-lambdaWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-lambdaWithParams :: Phantoms.TTerm Syntax.Lambda -> Phantoms.TTerm Syntax.LambdaParameters -> Phantoms.TTerm Syntax.Lambda
-lambdaWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Lambda"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-list :: Phantoms.TTerm [Syntax.StarNamedExpression] -> Phantoms.TTerm Syntax.List
-list x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.List"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-listcomp :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Listcomp
-listcomp expression forIfClauses =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm forIfClauses)}]}))
-
-listcompExpression :: Phantoms.TTerm Syntax.Listcomp -> Phantoms.TTerm Syntax.NamedExpression
-listcompExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listcompForIfClauses :: Phantoms.TTerm Syntax.Listcomp -> Phantoms.TTerm Syntax.ForIfClauses
-listcompForIfClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-        Core.projectionField = (Core.Name "forIfClauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-listcompWithExpression :: Phantoms.TTerm Syntax.Listcomp -> Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Listcomp
-listcompWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-              Core.projectionField = (Core.Name "forIfClauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-listcompWithForIfClauses :: Phantoms.TTerm Syntax.Listcomp -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Listcomp
-listcompWithForIfClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Listcomp"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalExpressionComplex :: Phantoms.TTerm Syntax.ComplexNumber -> Phantoms.TTerm Syntax.LiteralExpression
-literalExpressionComplex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "complex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalExpressionFalse :: Phantoms.TTerm Syntax.LiteralExpression
-literalExpressionFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "false"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalExpressionNone :: Phantoms.TTerm Syntax.LiteralExpression
-literalExpressionNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-literalExpressionNumber :: Phantoms.TTerm Syntax.SignedNumber -> Phantoms.TTerm Syntax.LiteralExpression
-literalExpressionNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalExpressionOrAttributeAttribute :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm Syntax.LiteralExpressionOrAttribute
-literalExpressionOrAttributeAttribute x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpressionOrAttribute"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "attribute"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalExpressionOrAttributeLiteral :: Phantoms.TTerm Syntax.LiteralExpression -> Phantoms.TTerm Syntax.LiteralExpressionOrAttribute
-literalExpressionOrAttributeLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpressionOrAttribute"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalExpressionString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.LiteralExpression
-literalExpressionString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalExpressionTrue :: Phantoms.TTerm Syntax.LiteralExpression
-literalExpressionTrue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.LiteralExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "true"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mappingPattern :: Phantoms.TTerm (Maybe Syntax.ItemsPattern) -> Phantoms.TTerm (Maybe Syntax.DoubleStarPattern) -> Phantoms.TTerm Syntax.MappingPattern
-mappingPattern items doubleStar =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doubleStar"),
-          Core.fieldTerm = (Phantoms.unTTerm doubleStar)}]}))
-
-mappingPatternDoubleStar :: Phantoms.TTerm Syntax.MappingPattern -> Phantoms.TTerm (Maybe Syntax.DoubleStarPattern)
-mappingPatternDoubleStar x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-        Core.projectionField = (Core.Name "doubleStar")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mappingPatternItems :: Phantoms.TTerm Syntax.MappingPattern -> Phantoms.TTerm (Maybe Syntax.ItemsPattern)
-mappingPatternItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mappingPatternWithDoubleStar :: Phantoms.TTerm Syntax.MappingPattern -> Phantoms.TTerm (Maybe Syntax.DoubleStarPattern) -> Phantoms.TTerm Syntax.MappingPattern
-mappingPatternWithDoubleStar original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doubleStar"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mappingPatternWithItems :: Phantoms.TTerm Syntax.MappingPattern -> Phantoms.TTerm (Maybe Syntax.ItemsPattern) -> Phantoms.TTerm Syntax.MappingPattern
-mappingPatternWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doubleStar"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.MappingPattern"),
-              Core.projectionField = (Core.Name "doubleStar")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchStatement :: Phantoms.TTerm Syntax.SubjectExpression -> Phantoms.TTerm [Syntax.CaseBlock] -> Phantoms.TTerm Syntax.MatchStatement
-matchStatement subject cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm subject)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-matchStatementCases :: Phantoms.TTerm Syntax.MatchStatement -> Phantoms.TTerm [Syntax.CaseBlock]
-matchStatementCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchStatementSubject :: Phantoms.TTerm Syntax.MatchStatement -> Phantoms.TTerm Syntax.SubjectExpression
-matchStatementSubject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-        Core.projectionField = (Core.Name "subject")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchStatementWithCases :: Phantoms.TTerm Syntax.MatchStatement -> Phantoms.TTerm [Syntax.CaseBlock] -> Phantoms.TTerm Syntax.MatchStatement
-matchStatementWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-matchStatementWithSubject :: Phantoms.TTerm Syntax.MatchStatement -> Phantoms.TTerm Syntax.SubjectExpression -> Phantoms.TTerm Syntax.MatchStatement
-matchStatementWithSubject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.MatchStatement"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-maybeSequencePattern :: Phantoms.TTerm [Syntax.MaybeStarPattern] -> Phantoms.TTerm Syntax.MaybeSequencePattern
-maybeSequencePattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.MaybeSequencePattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-maybeStarPatternPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.MaybeStarPattern
-maybeStarPatternPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.MaybeStarPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-maybeStarPatternStar :: Phantoms.TTerm Syntax.StarPattern -> Phantoms.TTerm Syntax.MaybeStarPattern
-maybeStarPatternStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.MaybeStarPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-module_ :: Phantoms.TTerm [[Syntax.Statement]] -> Phantoms.TTerm Syntax.Module
-module_ x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Module"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-name :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Name
-name x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Name"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nameOrAttribute :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.NameOrAttribute
-nameOrAttribute x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.NameOrAttribute"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-namedExpressionAssignment :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.NamedExpression
-namedExpressionAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.NamedExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-namedExpressionSimple :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.NamedExpression
-namedExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.NamedExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-noDefaultStarAnnotationStarEtc :: Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation -> Phantoms.TTerm [Syntax.ParamMaybeDefault] -> Phantoms.TTerm (Maybe Syntax.Keywords) -> Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc
-noDefaultStarAnnotationStarEtc paramNoDefaultStarAnnotation paramMaybeDefault keywords =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefaultStarAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefaultStarAnnotation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramMaybeDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Phantoms.unTTerm keywords)}]}))
-
-noDefaultStarAnnotationStarEtcKeywords :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm (Maybe Syntax.Keywords)
-noDefaultStarAnnotationStarEtcKeywords x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-        Core.projectionField = (Core.Name "keywords")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noDefaultStarAnnotationStarEtcParamMaybeDefault :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm [Syntax.ParamMaybeDefault]
-noDefaultStarAnnotationStarEtcParamMaybeDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-        Core.projectionField = (Core.Name "paramMaybeDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noDefaultStarAnnotationStarEtcParamNoDefaultStarAnnotation :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation
-noDefaultStarAnnotationStarEtcParamNoDefaultStarAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-        Core.projectionField = (Core.Name "paramNoDefaultStarAnnotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noDefaultStarAnnotationStarEtcWithKeywords :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm (Maybe Syntax.Keywords) -> Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc
-noDefaultStarAnnotationStarEtcWithKeywords original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefaultStarAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-              Core.projectionField = (Core.Name "paramNoDefaultStarAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-              Core.projectionField = (Core.Name "paramMaybeDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-noDefaultStarAnnotationStarEtcWithParamMaybeDefault :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm [Syntax.ParamMaybeDefault] -> Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc
-noDefaultStarAnnotationStarEtcWithParamMaybeDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefaultStarAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-              Core.projectionField = (Core.Name "paramNoDefaultStarAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-              Core.projectionField = (Core.Name "keywords")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-noDefaultStarAnnotationStarEtcWithParamNoDefaultStarAnnotation :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation -> Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc
-noDefaultStarAnnotationStarEtcWithParamNoDefaultStarAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefaultStarAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-              Core.projectionField = (Core.Name "paramMaybeDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"),
-              Core.projectionField = (Core.Name "keywords")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-noDefaultStarEtc :: Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm [Syntax.ParamMaybeDefault] -> Phantoms.TTerm (Maybe Syntax.Keywords) -> Phantoms.TTerm Syntax.NoDefaultStarEtc
-noDefaultStarEtc paramNoDefault paramMaybeDefault keywords =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramMaybeDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Phantoms.unTTerm keywords)}]}))
-
-noDefaultStarEtcKeywords :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm (Maybe Syntax.Keywords)
-noDefaultStarEtcKeywords x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-        Core.projectionField = (Core.Name "keywords")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noDefaultStarEtcParamMaybeDefault :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm [Syntax.ParamMaybeDefault]
-noDefaultStarEtcParamMaybeDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-        Core.projectionField = (Core.Name "paramMaybeDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noDefaultStarEtcParamNoDefault :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm Syntax.ParamNoDefault
-noDefaultStarEtcParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-noDefaultStarEtcWithKeywords :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm (Maybe Syntax.Keywords) -> Phantoms.TTerm Syntax.NoDefaultStarEtc
-noDefaultStarEtcWithKeywords original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-              Core.projectionField = (Core.Name "paramMaybeDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-noDefaultStarEtcWithParamMaybeDefault :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm [Syntax.ParamMaybeDefault] -> Phantoms.TTerm Syntax.NoDefaultStarEtc
-noDefaultStarEtcWithParamMaybeDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-              Core.projectionField = (Core.Name "keywords")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-noDefaultStarEtcWithParamNoDefault :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm Syntax.NoDefaultStarEtc
-noDefaultStarEtcWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramMaybeDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-              Core.projectionField = (Core.Name "paramMaybeDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keywords"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.NoDefaultStarEtc"),
-              Core.projectionField = (Core.Name "keywords")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numberFloat :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.Number
-numberFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Number"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numberInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.Number
-numberInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Number"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-openSequencePattern :: Phantoms.TTerm Syntax.MaybeStarPattern -> Phantoms.TTerm (Maybe Syntax.MaybeSequencePattern) -> Phantoms.TTerm Syntax.OpenSequencePattern
-openSequencePattern head tail =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm tail)}]}))
-
-openSequencePatternHead :: Phantoms.TTerm Syntax.OpenSequencePattern -> Phantoms.TTerm Syntax.MaybeStarPattern
-openSequencePatternHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openSequencePatternTail :: Phantoms.TTerm Syntax.OpenSequencePattern -> Phantoms.TTerm (Maybe Syntax.MaybeSequencePattern)
-openSequencePatternTail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-        Core.projectionField = (Core.Name "tail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-openSequencePatternWithHead :: Phantoms.TTerm Syntax.OpenSequencePattern -> Phantoms.TTerm Syntax.MaybeStarPattern -> Phantoms.TTerm Syntax.OpenSequencePattern
-openSequencePatternWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-openSequencePatternWithTail :: Phantoms.TTerm Syntax.OpenSequencePattern -> Phantoms.TTerm (Maybe Syntax.MaybeSequencePattern) -> Phantoms.TTerm Syntax.OpenSequencePattern
-openSequencePatternWithTail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.OpenSequencePattern"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-orPattern :: Phantoms.TTerm [Syntax.ClosedPattern] -> Phantoms.TTerm Syntax.OrPattern
-orPattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.OrPattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-param :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Annotation) -> Phantoms.TTerm Syntax.Param
-param name annotation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm annotation)}]}))
-
-paramAnnotation :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm (Maybe Syntax.Annotation)
-paramAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Param"),
-        Core.projectionField = (Core.Name "annotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramMaybeDefault :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm (Maybe Syntax.Default) -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamMaybeDefault
-paramMaybeDefault param default_ typeComment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)}]}))
-
-paramMaybeDefaultDefault :: Phantoms.TTerm Syntax.ParamMaybeDefault -> Phantoms.TTerm (Maybe Syntax.Default)
-paramMaybeDefaultDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramMaybeDefaultParam :: Phantoms.TTerm Syntax.ParamMaybeDefault -> Phantoms.TTerm Syntax.Param
-paramMaybeDefaultParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramMaybeDefaultTypeComment :: Phantoms.TTerm Syntax.ParamMaybeDefault -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-paramMaybeDefaultTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramMaybeDefaultWithDefault :: Phantoms.TTerm Syntax.ParamMaybeDefault -> Phantoms.TTerm (Maybe Syntax.Default) -> Phantoms.TTerm Syntax.ParamMaybeDefault
-paramMaybeDefaultWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramMaybeDefaultWithParam :: Phantoms.TTerm Syntax.ParamMaybeDefault -> Phantoms.TTerm Syntax.Param -> Phantoms.TTerm Syntax.ParamMaybeDefault
-paramMaybeDefaultWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramMaybeDefaultWithTypeComment :: Phantoms.TTerm Syntax.ParamMaybeDefault -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamMaybeDefault
-paramMaybeDefaultWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamMaybeDefault"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramName :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm Syntax.Name
-paramName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Param"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefault :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamNoDefault
-paramNoDefault param typeComment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)}]}))
-
-paramNoDefaultParam :: Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm Syntax.Param
-paramNoDefaultParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultParameters :: Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.ParamNoDefaultParameters
-paramNoDefaultParameters paramNoDefault paramWithDefault starEtc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm starEtc)}]}))
-
-paramNoDefaultParametersParamNoDefault :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamNoDefault]
-paramNoDefaultParametersParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultParametersParamWithDefault :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault]
-paramNoDefaultParametersParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultParametersStarEtc :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc)
-paramNoDefaultParametersStarEtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-        Core.projectionField = (Core.Name "starEtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultParametersWithParamNoDefault :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm Syntax.ParamNoDefaultParameters
-paramNoDefaultParametersWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramNoDefaultParametersWithParamWithDefault :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm Syntax.ParamNoDefaultParameters
-paramNoDefaultParametersWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramNoDefaultParametersWithStarEtc :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.ParamNoDefaultParameters
-paramNoDefaultParametersWithStarEtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramNoDefaultStarAnnotation :: Phantoms.TTerm Syntax.ParamStarAnnotation -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation
-paramNoDefaultStarAnnotation paramStarAnnotation typeComment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramStarAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm paramStarAnnotation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)}]}))
-
-paramNoDefaultStarAnnotationParamStarAnnotation :: Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation -> Phantoms.TTerm Syntax.ParamStarAnnotation
-paramNoDefaultStarAnnotationParamStarAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-        Core.projectionField = (Core.Name "paramStarAnnotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultStarAnnotationTypeComment :: Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-paramNoDefaultStarAnnotationTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultStarAnnotationWithParamStarAnnotation :: Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation -> Phantoms.TTerm Syntax.ParamStarAnnotation -> Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation
-paramNoDefaultStarAnnotationWithParamStarAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramStarAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramNoDefaultStarAnnotationWithTypeComment :: Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamNoDefaultStarAnnotation
-paramNoDefaultStarAnnotationWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramStarAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"),
-              Core.projectionField = (Core.Name "paramStarAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramNoDefaultTypeComment :: Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-paramNoDefaultTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramNoDefaultWithParam :: Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm Syntax.Param -> Phantoms.TTerm Syntax.ParamNoDefault
-paramNoDefaultWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramNoDefaultWithTypeComment :: Phantoms.TTerm Syntax.ParamNoDefault -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamNoDefault
-paramNoDefaultWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamNoDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramStarAnnotation :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.StarAnnotation -> Phantoms.TTerm Syntax.ParamStarAnnotation
-paramStarAnnotation name annotation =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm annotation)}]}))
-
-paramStarAnnotationAnnotation :: Phantoms.TTerm Syntax.ParamStarAnnotation -> Phantoms.TTerm Syntax.StarAnnotation
-paramStarAnnotationAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-        Core.projectionField = (Core.Name "annotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramStarAnnotationName :: Phantoms.TTerm Syntax.ParamStarAnnotation -> Phantoms.TTerm Syntax.Name
-paramStarAnnotationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramStarAnnotationWithAnnotation :: Phantoms.TTerm Syntax.ParamStarAnnotation -> Phantoms.TTerm Syntax.StarAnnotation -> Phantoms.TTerm Syntax.ParamStarAnnotation
-paramStarAnnotationWithAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramStarAnnotationWithName :: Phantoms.TTerm Syntax.ParamStarAnnotation -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ParamStarAnnotation
-paramStarAnnotationWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamStarAnnotation"),
-              Core.projectionField = (Core.Name "annotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramWithAnnotation :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm (Maybe Syntax.Annotation) -> Phantoms.TTerm Syntax.Param
-paramWithAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramWithDefault :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm Syntax.Default -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamWithDefault
-paramWithDefault param default_ typeComment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm param)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)}]}))
-
-paramWithDefaultDefault :: Phantoms.TTerm Syntax.ParamWithDefault -> Phantoms.TTerm Syntax.Default
-paramWithDefaultDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramWithDefaultParam :: Phantoms.TTerm Syntax.ParamWithDefault -> Phantoms.TTerm Syntax.Param
-paramWithDefaultParam x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-        Core.projectionField = (Core.Name "param")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramWithDefaultParameters :: Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.ParamWithDefaultParameters
-paramWithDefaultParameters paramWithDefault starEtc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm starEtc)}]}))
-
-paramWithDefaultParametersParamWithDefault :: Phantoms.TTerm Syntax.ParamWithDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault]
-paramWithDefaultParametersParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramWithDefaultParametersStarEtc :: Phantoms.TTerm Syntax.ParamWithDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc)
-paramWithDefaultParametersStarEtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-        Core.projectionField = (Core.Name "starEtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramWithDefaultParametersWithParamWithDefault :: Phantoms.TTerm Syntax.ParamWithDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm Syntax.ParamWithDefaultParameters
-paramWithDefaultParametersWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramWithDefaultParametersWithStarEtc :: Phantoms.TTerm Syntax.ParamWithDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.ParamWithDefaultParameters
-paramWithDefaultParametersWithStarEtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramWithDefaultTypeComment :: Phantoms.TTerm Syntax.ParamWithDefault -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-paramWithDefaultTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-paramWithDefaultWithDefault :: Phantoms.TTerm Syntax.ParamWithDefault -> Phantoms.TTerm Syntax.Default -> Phantoms.TTerm Syntax.ParamWithDefault
-paramWithDefaultWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramWithDefaultWithParam :: Phantoms.TTerm Syntax.ParamWithDefault -> Phantoms.TTerm Syntax.Param -> Phantoms.TTerm Syntax.ParamWithDefault
-paramWithDefaultWithParam original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-paramWithDefaultWithTypeComment :: Phantoms.TTerm Syntax.ParamWithDefault -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.ParamWithDefault
-paramWithDefaultWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "param"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-              Core.projectionField = (Core.Name "param")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ParamWithDefault"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-paramWithName :: Phantoms.TTerm Syntax.Param -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Param
-paramWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Param"),
-              Core.projectionField = (Core.Name "annotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parametersParamNoDefault :: Phantoms.TTerm Syntax.ParamNoDefaultParameters -> Phantoms.TTerm Syntax.Parameters
-parametersParamNoDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Parameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paramNoDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parametersParamWithDefault :: Phantoms.TTerm Syntax.ParamWithDefaultParameters -> Phantoms.TTerm Syntax.Parameters
-parametersParamWithDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Parameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paramWithDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parametersSlashNoDefault :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm Syntax.Parameters
-parametersSlashNoDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Parameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slashNoDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parametersSlashWithDefault :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm Syntax.Parameters
-parametersSlashWithDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Parameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slashWithDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-parametersStarEtc :: Phantoms.TTerm Syntax.StarEtc -> Phantoms.TTerm Syntax.Parameters
-parametersStarEtc x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Parameters"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starEtc"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternAs :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern
-patternAs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "as"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternCaptureTarget :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.PatternCaptureTarget
-patternCaptureTarget x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.PatternCaptureTarget"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-patternOr :: Phantoms.TTerm Syntax.OrPattern -> Phantoms.TTerm Syntax.Pattern
-patternOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternsPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Patterns
-patternsPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Patterns"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternsSequence :: Phantoms.TTerm Syntax.OpenSequencePattern -> Phantoms.TTerm Syntax.Patterns
-patternsSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Patterns"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-plusOrMinusMinus :: Phantoms.TTerm Syntax.PlusOrMinus
-plusOrMinusMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PlusOrMinus"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-plusOrMinusPlus :: Phantoms.TTerm Syntax.PlusOrMinus
-plusOrMinusPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PlusOrMinus"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-posArgAssignment :: Phantoms.TTerm Syntax.AssignmentExpression -> Phantoms.TTerm Syntax.PosArg
-posArgAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PosArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-posArgExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PosArg
-posArgExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PosArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-posArgStarred :: Phantoms.TTerm Syntax.StarredExpression -> Phantoms.TTerm Syntax.PosArg
-posArgStarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PosArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-positionalPatterns :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.PositionalPatterns
-positionalPatterns x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.PositionalPatterns"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-power :: Phantoms.TTerm Syntax.AwaitPrimary -> Phantoms.TTerm (Maybe Syntax.Factor) -> Phantoms.TTerm Syntax.Power
-power lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Power"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-powerLhs :: Phantoms.TTerm Syntax.Power -> Phantoms.TTerm Syntax.AwaitPrimary
-powerLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Power"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-powerRhs :: Phantoms.TTerm Syntax.Power -> Phantoms.TTerm (Maybe Syntax.Factor)
-powerRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Power"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-powerWithLhs :: Phantoms.TTerm Syntax.Power -> Phantoms.TTerm Syntax.AwaitPrimary -> Phantoms.TTerm Syntax.Power
-powerWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Power"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Power"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-powerWithRhs :: Phantoms.TTerm Syntax.Power -> Phantoms.TTerm (Maybe Syntax.Factor) -> Phantoms.TTerm Syntax.Power
-powerWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Power"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Power"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-primaryCompound :: Phantoms.TTerm Syntax.PrimaryWithRhs -> Phantoms.TTerm Syntax.Primary
-primaryCompound x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Primary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compound"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryRhsCall :: Phantoms.TTerm Syntax.Args -> Phantoms.TTerm Syntax.PrimaryRhs
-primaryRhsCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PrimaryRhs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryRhsGenexp :: Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.PrimaryRhs
-primaryRhsGenexp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PrimaryRhs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "genexp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryRhsProject :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.PrimaryRhs
-primaryRhsProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PrimaryRhs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryRhsSlices :: Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm Syntax.PrimaryRhs
-primaryRhsSlices x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.PrimaryRhs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slices"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primarySimple :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.Primary
-primarySimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Primary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-primaryWithRhs :: Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.PrimaryRhs -> Phantoms.TTerm Syntax.PrimaryWithRhs
-primaryWithRhs primary rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-primaryWithRhsPrimary :: Phantoms.TTerm Syntax.PrimaryWithRhs -> Phantoms.TTerm Syntax.Primary
-primaryWithRhsPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-primaryWithRhsRhs :: Phantoms.TTerm Syntax.PrimaryWithRhs -> Phantoms.TTerm Syntax.PrimaryRhs
-primaryWithRhsRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-primaryWithRhsWithPrimary :: Phantoms.TTerm Syntax.PrimaryWithRhs -> Phantoms.TTerm Syntax.Primary -> Phantoms.TTerm Syntax.PrimaryWithRhs
-primaryWithRhsWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-primaryWithRhsWithRhs :: Phantoms.TTerm Syntax.PrimaryWithRhs -> Phantoms.TTerm Syntax.PrimaryRhs -> Phantoms.TTerm Syntax.PrimaryWithRhs
-primaryWithRhsWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.PrimaryWithRhs"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quoteStyleDouble :: Phantoms.TTerm Syntax.QuoteStyle
-quoteStyleDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.QuoteStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-quoteStyleSingle :: Phantoms.TTerm Syntax.QuoteStyle
-quoteStyleSingle =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.QuoteStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-quoteStyleTriple :: Phantoms.TTerm Syntax.QuoteStyle
-quoteStyleTriple =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.QuoteStyle"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "triple"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-raiseExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.RaiseExpression
-raiseExpression expression from =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm from)}]}))
-
-raiseExpressionExpression :: Phantoms.TTerm Syntax.RaiseExpression -> Phantoms.TTerm Syntax.Expression
-raiseExpressionExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-raiseExpressionFrom :: Phantoms.TTerm Syntax.RaiseExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-raiseExpressionFrom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-        Core.projectionField = (Core.Name "from")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-raiseExpressionWithExpression :: Phantoms.TTerm Syntax.RaiseExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RaiseExpression
-raiseExpressionWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-raiseExpressionWithFrom :: Phantoms.TTerm Syntax.RaiseExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.RaiseExpression
-raiseExpressionWithFrom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.RaiseExpression"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-raiseStatement :: Phantoms.TTerm (Maybe Syntax.RaiseExpression) -> Phantoms.TTerm Syntax.RaiseStatement
-raiseStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.RaiseStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-realNumber :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.RealNumber
-realNumber x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.RealNumber"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-relativeImportPrefixDot :: Phantoms.TTerm Syntax.RelativeImportPrefix
-relativeImportPrefixDot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.RelativeImportPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-relativeImportPrefixEllipsis :: Phantoms.TTerm Syntax.RelativeImportPrefix
-relativeImportPrefixEllipsis =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.RelativeImportPrefix"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ellipsis"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-returnStatement :: Phantoms.TTerm [Syntax.StarExpression] -> Phantoms.TTerm Syntax.ReturnStatement
-returnStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.ReturnStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-sequencePatternList :: Phantoms.TTerm (Maybe Syntax.MaybeSequencePattern) -> Phantoms.TTerm Syntax.SequencePattern
-sequencePatternList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SequencePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sequencePatternTuple :: Phantoms.TTerm (Maybe Syntax.OpenSequencePattern) -> Phantoms.TTerm Syntax.SequencePattern
-sequencePatternTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SequencePattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-set :: Phantoms.TTerm [Syntax.StarNamedExpression] -> Phantoms.TTerm Syntax.Set
-set x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Set"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-setcomp :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Setcomp
-setcomp expression forIfClauses =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm forIfClauses)}]}))
-
-setcompExpression :: Phantoms.TTerm Syntax.Setcomp -> Phantoms.TTerm Syntax.NamedExpression
-setcompExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setcompForIfClauses :: Phantoms.TTerm Syntax.Setcomp -> Phantoms.TTerm Syntax.ForIfClauses
-setcompForIfClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-        Core.projectionField = (Core.Name "forIfClauses")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-setcompWithExpression :: Phantoms.TTerm Syntax.Setcomp -> Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Setcomp
-setcompWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-              Core.projectionField = (Core.Name "forIfClauses")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-setcompWithForIfClauses :: Phantoms.TTerm Syntax.Setcomp -> Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm Syntax.Setcomp
-setcompWithForIfClauses original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Setcomp"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "forIfClauses"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shiftExpression :: Phantoms.TTerm (Maybe Syntax.ShiftLhs) -> Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpression lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-shiftExpressionLhs :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm (Maybe Syntax.ShiftLhs)
-shiftExpressionLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shiftExpressionRhs :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.Sum
-shiftExpressionRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shiftExpressionWithLhs :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm (Maybe Syntax.ShiftLhs) -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shiftExpressionWithRhs :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm Syntax.ShiftExpression
-shiftExpressionWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftExpression"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shiftLhs :: Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.ShiftOp -> Phantoms.TTerm Syntax.ShiftLhs
-shiftLhs operand operator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)}]}))
-
-shiftLhsOperand :: Phantoms.TTerm Syntax.ShiftLhs -> Phantoms.TTerm Syntax.ShiftExpression
-shiftLhsOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shiftLhsOperator :: Phantoms.TTerm Syntax.ShiftLhs -> Phantoms.TTerm Syntax.ShiftOp
-shiftLhsOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shiftLhsWithOperand :: Phantoms.TTerm Syntax.ShiftLhs -> Phantoms.TTerm Syntax.ShiftExpression -> Phantoms.TTerm Syntax.ShiftLhs
-shiftLhsWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shiftLhsWithOperator :: Phantoms.TTerm Syntax.ShiftLhs -> Phantoms.TTerm Syntax.ShiftOp -> Phantoms.TTerm Syntax.ShiftLhs
-shiftLhsWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.ShiftLhs"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shiftOpLeft :: Phantoms.TTerm Syntax.ShiftOp
-shiftOpLeft =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ShiftOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "left"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shiftOpRight :: Phantoms.TTerm Syntax.ShiftOp
-shiftOpRight =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.ShiftOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "right"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-signedNumberNumber :: Phantoms.TTerm Syntax.Number -> Phantoms.TTerm Syntax.SignedNumber
-signedNumberNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SignedNumber"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedNumberSign :: Phantoms.TTerm Syntax.PlusOrMinus -> Phantoms.TTerm Syntax.SignedNumber
-signedNumberSign x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SignedNumber"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sign"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedRealNumberNumber :: Phantoms.TTerm Syntax.RealNumber -> Phantoms.TTerm Syntax.SignedRealNumber
-signedRealNumberNumber x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SignedRealNumber"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-signedRealNumberSign :: Phantoms.TTerm Syntax.PlusOrMinus -> Phantoms.TTerm Syntax.SignedRealNumber
-signedRealNumberSign x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SignedRealNumber"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sign"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementAssert :: Phantoms.TTerm Syntax.AssertStatement -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementAssert x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assert"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementAssignment :: Phantoms.TTerm Syntax.Assignment -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementAssignment x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assignment"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementBreak :: Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementBreak =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-simpleStatementContinue :: Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementContinue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-simpleStatementDel :: Phantoms.TTerm Syntax.DelStatement -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementDel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "del"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementGlobal :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementGlobal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "global"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementImport :: Phantoms.TTerm Syntax.ImportStatement -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementImport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "import"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementNonlocal :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementNonlocal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonlocal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementPass :: Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementPass =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pass"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-simpleStatementRaise :: Phantoms.TTerm Syntax.RaiseStatement -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementRaise x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "raise"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementReturn :: Phantoms.TTerm Syntax.ReturnStatement -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementStarExpressions :: Phantoms.TTerm [Syntax.StarExpression] -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementStarExpressions x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starExpressions"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementTypeAlias :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementTypeAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeAlias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleStatementYield :: Phantoms.TTerm Syntax.YieldStatement -> Phantoms.TTerm Syntax.SimpleStatement
-simpleStatementYield x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SimpleStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "yield"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-simpleTypeParameter :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SimpleTypeParameter
-simpleTypeParameter name bound default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm bound)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-simpleTypeParameterBound :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm (Maybe Syntax.Expression)
-simpleTypeParameterBound x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-        Core.projectionField = (Core.Name "bound")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleTypeParameterDefault :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm (Maybe Syntax.Expression)
-simpleTypeParameterDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleTypeParameterName :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm Syntax.Name
-simpleTypeParameterName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-simpleTypeParameterWithBound :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SimpleTypeParameter
-simpleTypeParameterWithBound original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-simpleTypeParameterWithDefault :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SimpleTypeParameter
-simpleTypeParameterWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-simpleTypeParameterWithName :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.SimpleTypeParameter
-simpleTypeParameterWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bound"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-              Core.projectionField = (Core.Name "bound")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SimpleTypeParameter"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-singleSubscriptAttributeTargetPrimaryAndName :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.SingleSubscriptAttributeTarget
-singleSubscriptAttributeTargetPrimaryAndName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SingleSubscriptAttributeTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singleSubscriptAttributeTargetPrimaryAndSlices :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.SingleSubscriptAttributeTarget
-singleSubscriptAttributeTargetPrimaryAndSlices x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SingleSubscriptAttributeTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndSlices"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singleTargetName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.SingleTarget
-singleTargetName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SingleTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singleTargetParens :: Phantoms.TTerm Syntax.SingleTarget -> Phantoms.TTerm Syntax.SingleTarget
-singleTargetParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SingleTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singleTargetSubscriptAttributeTarget :: Phantoms.TTerm Syntax.SingleSubscriptAttributeTarget -> Phantoms.TTerm Syntax.SingleTarget
-singleTargetSubscriptAttributeTarget x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SingleTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subscriptAttributeTarget"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-slashNoDefault :: Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm Syntax.SlashNoDefault
-slashNoDefault x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.SlashNoDefault"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-slashNoDefaultParameters :: Phantoms.TTerm Syntax.SlashNoDefault -> Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.SlashNoDefaultParameters
-slashNoDefaultParameters slash paramNoDefault paramWithDefault starEtc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slash"),
-          Core.fieldTerm = (Phantoms.unTTerm slash)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm starEtc)}]}))
-
-slashNoDefaultParametersParamNoDefault :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamNoDefault]
-slashNoDefaultParametersParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashNoDefaultParametersParamWithDefault :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault]
-slashNoDefaultParametersParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashNoDefaultParametersSlash :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm Syntax.SlashNoDefault
-slashNoDefaultParametersSlash x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-        Core.projectionField = (Core.Name "slash")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashNoDefaultParametersStarEtc :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc)
-slashNoDefaultParametersStarEtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-        Core.projectionField = (Core.Name "starEtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashNoDefaultParametersWithParamNoDefault :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm Syntax.SlashNoDefaultParameters
-slashNoDefaultParametersWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slash"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "slash")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slashNoDefaultParametersWithParamWithDefault :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm Syntax.SlashNoDefaultParameters
-slashNoDefaultParametersWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slash"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "slash")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slashNoDefaultParametersWithSlash :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm Syntax.SlashNoDefault -> Phantoms.TTerm Syntax.SlashNoDefaultParameters
-slashNoDefaultParametersWithSlash original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slash"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slashNoDefaultParametersWithStarEtc :: Phantoms.TTerm Syntax.SlashNoDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.SlashNoDefaultParameters
-slashNoDefaultParametersWithStarEtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "slash"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "slash")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashNoDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-slashWithDefault :: Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm Syntax.SlashWithDefault
-slashWithDefault paramNoDefault paramWithDefault =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)}]}))
-
-slashWithDefaultParamNoDefault :: Phantoms.TTerm Syntax.SlashWithDefault -> Phantoms.TTerm [Syntax.ParamNoDefault]
-slashWithDefaultParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashWithDefaultParamWithDefault :: Phantoms.TTerm Syntax.SlashWithDefault -> Phantoms.TTerm [Syntax.ParamWithDefault]
-slashWithDefaultParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashWithDefaultParameters :: Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.SlashWithDefaultParameters
-slashWithDefaultParameters paramNoDefault paramWithDefault starEtc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramNoDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm paramWithDefault)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm starEtc)}]}))
-
-slashWithDefaultParametersParamNoDefault :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm [Syntax.ParamNoDefault]
-slashWithDefaultParametersParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-        Core.projectionField = (Core.Name "paramNoDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashWithDefaultParametersParamWithDefault :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault]
-slashWithDefaultParametersParamWithDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-        Core.projectionField = (Core.Name "paramWithDefault")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashWithDefaultParametersStarEtc :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc)
-slashWithDefaultParametersStarEtc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-        Core.projectionField = (Core.Name "starEtc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slashWithDefaultParametersWithParamNoDefault :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm Syntax.SlashWithDefaultParameters
-slashWithDefaultParametersWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slashWithDefaultParametersWithParamWithDefault :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm Syntax.SlashWithDefaultParameters
-slashWithDefaultParametersWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-              Core.projectionField = (Core.Name "starEtc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slashWithDefaultParametersWithStarEtc :: Phantoms.TTerm Syntax.SlashWithDefaultParameters -> Phantoms.TTerm (Maybe Syntax.StarEtc) -> Phantoms.TTerm Syntax.SlashWithDefaultParameters
-slashWithDefaultParametersWithStarEtc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefaultParameters"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "starEtc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-slashWithDefaultWithParamNoDefault :: Phantoms.TTerm Syntax.SlashWithDefault -> Phantoms.TTerm [Syntax.ParamNoDefault] -> Phantoms.TTerm Syntax.SlashWithDefault
-slashWithDefaultWithParamNoDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-              Core.projectionField = (Core.Name "paramWithDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slashWithDefaultWithParamWithDefault :: Phantoms.TTerm Syntax.SlashWithDefault -> Phantoms.TTerm [Syntax.ParamWithDefault] -> Phantoms.TTerm Syntax.SlashWithDefault
-slashWithDefaultWithParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramNoDefault"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SlashWithDefault"),
-              Core.projectionField = (Core.Name "paramNoDefault")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramWithDefault"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sliceExpression :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SliceExpression
-sliceExpression start stop step =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm start)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stop"),
-          Core.fieldTerm = (Phantoms.unTTerm stop)},
-        Core.Field {
-          Core.fieldName = (Core.Name "step"),
-          Core.fieldTerm = (Phantoms.unTTerm step)}]}))
-
-sliceExpressionStart :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-sliceExpressionStart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-        Core.projectionField = (Core.Name "start")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sliceExpressionStep :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-sliceExpressionStep x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-        Core.projectionField = (Core.Name "step")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sliceExpressionStop :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm (Maybe Syntax.Expression)
-sliceExpressionStop x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-        Core.projectionField = (Core.Name "stop")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sliceExpressionWithStart :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SliceExpression
-sliceExpressionWithStart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stop"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-              Core.projectionField = (Core.Name "stop")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "step"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-              Core.projectionField = (Core.Name "step")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sliceExpressionWithStep :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SliceExpression
-sliceExpressionWithStep original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stop"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-              Core.projectionField = (Core.Name "stop")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "step"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sliceExpressionWithStop :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.SliceExpression
-sliceExpressionWithStop original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stop"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "step"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SliceExpression"),
-              Core.projectionField = (Core.Name "step")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sliceNamed :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Slice
-sliceNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Slice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sliceOrStarredExpressionSlice :: Phantoms.TTerm Syntax.Slice -> Phantoms.TTerm Syntax.SliceOrStarredExpression
-sliceOrStarredExpressionSlice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SliceOrStarredExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sliceOrStarredExpressionStarred :: Phantoms.TTerm Syntax.StarredExpression -> Phantoms.TTerm Syntax.SliceOrStarredExpression
-sliceOrStarredExpressionStarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SliceOrStarredExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sliceSlice_ :: Phantoms.TTerm Syntax.SliceExpression -> Phantoms.TTerm Syntax.Slice
-sliceSlice_ x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Slice"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice_"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-slices :: Phantoms.TTerm Syntax.Slice -> Phantoms.TTerm [Syntax.SliceOrStarredExpression] -> Phantoms.TTerm Syntax.Slices
-slices head tail =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Slices"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm head)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm tail)}]}))
-
-slicesHead :: Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm Syntax.Slice
-slicesHead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Slices"),
-        Core.projectionField = (Core.Name "head")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slicesTail :: Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm [Syntax.SliceOrStarredExpression]
-slicesTail x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Slices"),
-        Core.projectionField = (Core.Name "tail")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-slicesWithHead :: Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm Syntax.Slice -> Phantoms.TTerm Syntax.Slices
-slicesWithHead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Slices"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Slices"),
-              Core.projectionField = (Core.Name "tail")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-slicesWithTail :: Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm [Syntax.SliceOrStarredExpression] -> Phantoms.TTerm Syntax.Slices
-slicesWithTail original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Slices"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "head"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Slices"),
-              Core.projectionField = (Core.Name "head")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tail"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-starAnnotation :: Phantoms.TTerm Syntax.StarExpression -> Phantoms.TTerm Syntax.StarAnnotation
-starAnnotation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.StarAnnotation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-starAtomName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.StarAtom
-starAtomName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starAtomStarTargetsListSeq :: Phantoms.TTerm (Maybe Syntax.StarTargetsListSeq) -> Phantoms.TTerm Syntax.StarAtom
-starAtomStarTargetsListSeq x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starTargetsListSeq"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starAtomStarTargetsTupleSeq :: Phantoms.TTerm (Maybe Syntax.StarTargetsTupleSeq) -> Phantoms.TTerm Syntax.StarAtom
-starAtomStarTargetsTupleSeq x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starTargetsTupleSeq"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starAtomTargetWithStarAtom :: Phantoms.TTerm Syntax.TargetWithStarAtom -> Phantoms.TTerm Syntax.StarAtom
-starAtomTargetWithStarAtom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "targetWithStarAtom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starEtcKeywords :: Phantoms.TTerm Syntax.Keywords -> Phantoms.TTerm Syntax.StarEtc
-starEtcKeywords x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keywords"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starEtcStarComma :: Phantoms.TTerm Syntax.CommaStarEtc -> Phantoms.TTerm Syntax.StarEtc
-starEtcStarComma x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starComma"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starEtcStarNoDefault :: Phantoms.TTerm Syntax.NoDefaultStarEtc -> Phantoms.TTerm Syntax.StarEtc
-starEtcStarNoDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starNoDefault"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starEtcStarNoDefaultStarAnnotation :: Phantoms.TTerm Syntax.NoDefaultStarAnnotationStarEtc -> Phantoms.TTerm Syntax.StarEtc
-starEtcStarNoDefaultStarAnnotation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarEtc"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starNoDefaultStarAnnotation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starExpressionSimple :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.StarExpression
-starExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starExpressionStar :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.StarExpression
-starExpressionStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starNamedExpressionSimple :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.StarNamedExpression
-starNamedExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarNamedExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starNamedExpressionStar :: Phantoms.TTerm Syntax.BitwiseOr -> Phantoms.TTerm Syntax.StarNamedExpression
-starNamedExpressionStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarNamedExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starNamedExpressions :: Phantoms.TTerm [Syntax.StarNamedExpression] -> Phantoms.TTerm Syntax.StarNamedExpressions
-starNamedExpressions x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.StarNamedExpressions"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-starPatternCapture :: Phantoms.TTerm Syntax.PatternCaptureTarget -> Phantoms.TTerm Syntax.StarPattern
-starPatternCapture x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "capture"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starPatternWildcard :: Phantoms.TTerm Syntax.StarPattern
-starPatternWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarPattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-starTargetStarred :: Phantoms.TTerm Syntax.StarTarget -> Phantoms.TTerm Syntax.StarTarget
-starTargetStarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starTargetUnstarred :: Phantoms.TTerm Syntax.TargetWithStarAtom -> Phantoms.TTerm Syntax.StarTarget
-starTargetUnstarred x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.StarTarget"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unstarred"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-starTargetsListSeq :: Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.StarTargetsListSeq
-starTargetsListSeq x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.StarTargetsListSeq"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-starTargetsTupleSeq :: Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.StarTargetsTupleSeq
-starTargetsTupleSeq x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.StarTargetsTupleSeq"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-starTypeParameter :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.StarExpression) -> Phantoms.TTerm Syntax.StarTypeParameter
-starTypeParameter name default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-starTypeParameterDefault :: Phantoms.TTerm Syntax.StarTypeParameter -> Phantoms.TTerm (Maybe Syntax.StarExpression)
-starTypeParameterDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-starTypeParameterName :: Phantoms.TTerm Syntax.StarTypeParameter -> Phantoms.TTerm Syntax.Name
-starTypeParameterName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-starTypeParameterWithDefault :: Phantoms.TTerm Syntax.StarTypeParameter -> Phantoms.TTerm (Maybe Syntax.StarExpression) -> Phantoms.TTerm Syntax.StarTypeParameter
-starTypeParameterWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-starTypeParameterWithName :: Phantoms.TTerm Syntax.StarTypeParameter -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.StarTypeParameter
-starTypeParameterWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.StarTypeParameter"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-starredExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.StarredExpression
-starredExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.StarredExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-statementAnnotated :: Phantoms.TTerm Syntax.AnnotatedStatement -> Phantoms.TTerm Syntax.Statement
-statementAnnotated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementCompound :: Phantoms.TTerm Syntax.CompoundStatement -> Phantoms.TTerm Syntax.Statement
-statementCompound x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compound"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementSimple :: Phantoms.TTerm [Syntax.SimpleStatement] -> Phantoms.TTerm Syntax.Statement
-statementSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-string :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.QuoteStyle -> Phantoms.TTerm Syntax.String_
-string value quoteStyle =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quoteStyle"),
-          Core.fieldTerm = (Phantoms.unTTerm quoteStyle)}]}))
-
-stringQuoteStyle :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.QuoteStyle
-stringQuoteStyle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.String"),
-        Core.projectionField = (Core.Name "quoteStyle")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringValue :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm String
-stringValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.String"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringWithQuoteStyle :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.QuoteStyle -> Phantoms.TTerm Syntax.String_
-stringWithQuoteStyle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.String"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quoteStyle"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringWithValue :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.String_
-stringWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quoteStyle"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.String"),
-              Core.projectionField = (Core.Name "quoteStyle")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-subjectExpressionSimple :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.SubjectExpression
-subjectExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SubjectExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-subjectExpressionTuple :: Phantoms.TTerm [Syntax.StarNamedExpression] -> Phantoms.TTerm Syntax.SubjectExpression
-subjectExpressionTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SubjectExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-sum :: Phantoms.TTerm (Maybe Syntax.SumLhs) -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Sum
-sum lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Sum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-sumLhs :: Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm (Maybe Syntax.SumLhs)
-sumLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Sum"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sumLhsOperand :: Phantoms.TTerm Syntax.SumLhs -> Phantoms.TTerm Syntax.Sum
-sumLhsOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sumLhsOperator :: Phantoms.TTerm Syntax.SumLhs -> Phantoms.TTerm Syntax.SumOp
-sumLhsOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sumLhsWithOperand :: Phantoms.TTerm Syntax.SumLhs -> Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm Syntax.SumLhs
-sumLhsWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sumLhsWithOperator :: Phantoms.TTerm Syntax.SumLhs -> Phantoms.TTerm Syntax.SumOp -> Phantoms.TTerm Syntax.SumLhs
-sumLhsWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-sumLhs_ :: Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm Syntax.SumOp -> Phantoms.TTerm Syntax.SumLhs
-sumLhs_ operand operator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.SumLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)}]}))
-
-sumOpAdd :: Phantoms.TTerm Syntax.SumOp
-sumOpAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SumOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sumOpSub :: Phantoms.TTerm Syntax.SumOp
-sumOpSub =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.SumOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sub"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-sumRhs :: Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm Syntax.Term
-sumRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Sum"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sumWithLhs :: Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm (Maybe Syntax.SumLhs) -> Phantoms.TTerm Syntax.Sum
-sumWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Sum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Sum"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-sumWithRhs :: Phantoms.TTerm Syntax.Sum -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Sum
-sumWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Sum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Sum"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tPrimaryAndArguments :: Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm (Maybe Syntax.Args) -> Phantoms.TTerm Syntax.TPrimaryAndArguments
-tPrimaryAndArguments primary arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-tPrimaryAndArgumentsArguments :: Phantoms.TTerm Syntax.TPrimaryAndArguments -> Phantoms.TTerm (Maybe Syntax.Args)
-tPrimaryAndArgumentsArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndArgumentsPrimary :: Phantoms.TTerm Syntax.TPrimaryAndArguments -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryAndArgumentsPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndArgumentsWithArguments :: Phantoms.TTerm Syntax.TPrimaryAndArguments -> Phantoms.TTerm (Maybe Syntax.Args) -> Phantoms.TTerm Syntax.TPrimaryAndArguments
-tPrimaryAndArgumentsWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tPrimaryAndArgumentsWithPrimary :: Phantoms.TTerm Syntax.TPrimaryAndArguments -> Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.TPrimaryAndArguments
-tPrimaryAndArgumentsWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndArguments"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tPrimaryAndGenexp :: Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.TPrimaryAndGenexp
-tPrimaryAndGenexp primary genexp =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "genexp"),
-          Core.fieldTerm = (Phantoms.unTTerm genexp)}]}))
-
-tPrimaryAndGenexpGenexp :: Phantoms.TTerm Syntax.TPrimaryAndGenexp -> Phantoms.TTerm Syntax.Genexp
-tPrimaryAndGenexpGenexp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-        Core.projectionField = (Core.Name "genexp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndGenexpPrimary :: Phantoms.TTerm Syntax.TPrimaryAndGenexp -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryAndGenexpPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndGenexpWithGenexp :: Phantoms.TTerm Syntax.TPrimaryAndGenexp -> Phantoms.TTerm Syntax.Genexp -> Phantoms.TTerm Syntax.TPrimaryAndGenexp
-tPrimaryAndGenexpWithGenexp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "genexp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tPrimaryAndGenexpWithPrimary :: Phantoms.TTerm Syntax.TPrimaryAndGenexp -> Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.TPrimaryAndGenexp
-tPrimaryAndGenexpWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "genexp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndGenexp"),
-              Core.projectionField = (Core.Name "genexp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tPrimaryAndName :: Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.TPrimaryAndName
-tPrimaryAndName primary name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-tPrimaryAndNameName :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.Name
-tPrimaryAndNameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndNamePrimary :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryAndNamePrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndNameWithName :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.TPrimaryAndName
-tPrimaryAndNameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tPrimaryAndNameWithPrimary :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.TPrimaryAndName
-tPrimaryAndNameWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndName"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tPrimaryAndSlices :: Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm Syntax.TPrimaryAndSlices
-tPrimaryAndSlices primary slices =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm primary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "slices"),
-          Core.fieldTerm = (Phantoms.unTTerm slices)}]}))
-
-tPrimaryAndSlicesPrimary :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryAndSlicesPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-        Core.projectionField = (Core.Name "primary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndSlicesSlices :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.Slices
-tPrimaryAndSlicesSlices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-        Core.projectionField = (Core.Name "slices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tPrimaryAndSlicesWithPrimary :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.TPrimary -> Phantoms.TTerm Syntax.TPrimaryAndSlices
-tPrimaryAndSlicesWithPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "slices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-              Core.projectionField = (Core.Name "slices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tPrimaryAndSlicesWithSlices :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.Slices -> Phantoms.TTerm Syntax.TPrimaryAndSlices
-tPrimaryAndSlicesWithSlices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "primary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TPrimaryAndSlices"),
-              Core.projectionField = (Core.Name "primary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "slices"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tPrimaryAtom :: Phantoms.TTerm Syntax.Atom -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryAtom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "atom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tPrimaryPrimaryAndArguments :: Phantoms.TTerm Syntax.TPrimaryAndArguments -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryPrimaryAndArguments x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndArguments"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tPrimaryPrimaryAndGenexp :: Phantoms.TTerm Syntax.TPrimaryAndGenexp -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryPrimaryAndGenexp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndGenexp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tPrimaryPrimaryAndName :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryPrimaryAndName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tPrimaryPrimaryAndSlices :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.TPrimary
-tPrimaryPrimaryAndSlices x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primaryAndSlices"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-targetWithStarAtomAtom :: Phantoms.TTerm Syntax.StarAtom -> Phantoms.TTerm Syntax.TargetWithStarAtom
-targetWithStarAtomAtom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TargetWithStarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "atom"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-targetWithStarAtomProject :: Phantoms.TTerm Syntax.TPrimaryAndName -> Phantoms.TTerm Syntax.TargetWithStarAtom
-targetWithStarAtomProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TargetWithStarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-targetWithStarAtomSlices :: Phantoms.TTerm Syntax.TPrimaryAndSlices -> Phantoms.TTerm Syntax.TargetWithStarAtom
-targetWithStarAtomSlices x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TargetWithStarAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slices"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-term :: Phantoms.TTerm (Maybe Syntax.TermLhs) -> Phantoms.TTerm Syntax.Factor -> Phantoms.TTerm Syntax.Term
-term lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Term"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-termLhs :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm (Maybe Syntax.TermLhs)
-termLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Term"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLhsOperand :: Phantoms.TTerm Syntax.TermLhs -> Phantoms.TTerm Syntax.Term
-termLhsOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLhsOperator :: Phantoms.TTerm Syntax.TermLhs -> Phantoms.TTerm Syntax.TermOp
-termLhsOperator x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-        Core.projectionField = (Core.Name "operator")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termLhsWithOperand :: Phantoms.TTerm Syntax.TermLhs -> Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TermLhs
-termLhsWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-              Core.projectionField = (Core.Name "operator")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termLhsWithOperator :: Phantoms.TTerm Syntax.TermLhs -> Phantoms.TTerm Syntax.TermOp -> Phantoms.TTerm Syntax.TermLhs
-termLhsWithOperator original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-termLhs_ :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.TermOp -> Phantoms.TTerm Syntax.TermLhs
-termLhs_ operand operator =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TermLhs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operator"),
-          Core.fieldTerm = (Phantoms.unTTerm operator)}]}))
-
-termOpDiv :: Phantoms.TTerm Syntax.TermOp
-termOpDiv =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TermOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "div"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-termOpFloordiv :: Phantoms.TTerm Syntax.TermOp
-termOpFloordiv =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TermOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "floordiv"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-termOpMatmul :: Phantoms.TTerm Syntax.TermOp
-termOpMatmul =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TermOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "matmul"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-termOpMod :: Phantoms.TTerm Syntax.TermOp
-termOpMod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TermOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mod"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-termOpMul :: Phantoms.TTerm Syntax.TermOp
-termOpMul =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TermOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mul"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-termRhs :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Factor
-termRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.Term"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-termWithLhs :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm (Maybe Syntax.TermLhs) -> Phantoms.TTerm Syntax.Term
-termWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Term"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Term"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-termWithRhs :: Phantoms.TTerm Syntax.Term -> Phantoms.TTerm Syntax.Factor -> Phantoms.TTerm Syntax.Term
-termWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.Term"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.Term"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryExceptStarStatement :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.ExceptStarBlock] -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryExceptStarStatement
-tryExceptStarStatement body excepts else_ finally =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Phantoms.unTTerm excepts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm finally)}]}))
-
-tryExceptStarStatementBody :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm Syntax.Block
-tryExceptStarStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStarStatementElse :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-tryExceptStarStatementElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStarStatementExcepts :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm [Syntax.ExceptStarBlock]
-tryExceptStarStatementExcepts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-        Core.projectionField = (Core.Name "excepts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStarStatementFinally :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-tryExceptStarStatementFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-        Core.projectionField = (Core.Name "finally")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStarStatementWithBody :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryExceptStarStatement
-tryExceptStarStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "excepts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryExceptStarStatementWithElse :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryExceptStarStatement
-tryExceptStarStatementWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "excepts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryExceptStarStatementWithExcepts :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm [Syntax.ExceptStarBlock] -> Phantoms.TTerm Syntax.TryExceptStarStatement
-tryExceptStarStatementWithExcepts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryExceptStarStatementWithFinally :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryExceptStarStatement
-tryExceptStarStatementWithFinally original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "excepts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStarStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryExceptStatement :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.ExceptBlock] -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryExceptStatement
-tryExceptStatement body excepts else_ finally =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Phantoms.unTTerm excepts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm finally)}]}))
-
-tryExceptStatementBody :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm Syntax.Block
-tryExceptStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStatementElse :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-tryExceptStatementElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStatementExcepts :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm [Syntax.ExceptBlock]
-tryExceptStatementExcepts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-        Core.projectionField = (Core.Name "excepts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStatementFinally :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-tryExceptStatementFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-        Core.projectionField = (Core.Name "finally")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryExceptStatementWithBody :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryExceptStatement
-tryExceptStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "excepts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryExceptStatementWithElse :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryExceptStatement
-tryExceptStatementWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "excepts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryExceptStatementWithExcepts :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm [Syntax.ExceptBlock] -> Phantoms.TTerm Syntax.TryExceptStatement
-tryExceptStatementWithExcepts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryExceptStatementWithFinally :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TryExceptStatement
-tryExceptStatementWithFinally original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "excepts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "excepts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryExceptStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryFinallyStatement :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryFinallyStatement
-tryFinallyStatement body finally =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm finally)}]}))
-
-tryFinallyStatementBody :: Phantoms.TTerm Syntax.TryFinallyStatement -> Phantoms.TTerm Syntax.Block
-tryFinallyStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryFinallyStatementFinally :: Phantoms.TTerm Syntax.TryFinallyStatement -> Phantoms.TTerm Syntax.Block
-tryFinallyStatementFinally x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-        Core.projectionField = (Core.Name "finally")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tryFinallyStatementWithBody :: Phantoms.TTerm Syntax.TryFinallyStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryFinallyStatement
-tryFinallyStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-              Core.projectionField = (Core.Name "finally")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tryFinallyStatementWithFinally :: Phantoms.TTerm Syntax.TryFinallyStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.TryFinallyStatement
-tryFinallyStatementWithFinally original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TryFinallyStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finally"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tryStatementExcept :: Phantoms.TTerm Syntax.TryExceptStatement -> Phantoms.TTerm Syntax.TryStatement
-tryStatementExcept x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "except"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tryStatementExceptStar :: Phantoms.TTerm Syntax.TryExceptStarStatement -> Phantoms.TTerm Syntax.TryStatement
-tryStatementExceptStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exceptStar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tryStatementFinally :: Phantoms.TTerm Syntax.TryFinallyStatement -> Phantoms.TTerm Syntax.TryStatement
-tryStatementFinally x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TryStatement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "finally"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tuple :: Phantoms.TTerm [Syntax.StarNamedExpression] -> Phantoms.TTerm Syntax.Tuple
-tuple x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.Tuple"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeAlias :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeAlias
-typeAlias name typeParams expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-typeAliasExpression :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Expression
-typeAliasExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasName :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Name
-typeAliasName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasTypeParams :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm [Syntax.TypeParameter]
-typeAliasTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "typeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasWithExpression :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeAliasWithName :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAliasWithTypeParams :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm [Syntax.TypeParameter] -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeComment :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.TypeComment
-typeComment x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.TypeComment"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-typeExpressionDoubleStarredExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionDoubleStarredExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doubleStarredExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeExpressionStarredExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeExpression
-typeExpressionStarredExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TypeExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "starredExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeParameterDoubleStar :: Phantoms.TTerm Syntax.DoubleStarTypeParameter -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterDoubleStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TypeParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "doubleStar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeParameterSimple :: Phantoms.TTerm Syntax.SimpleTypeParameter -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TypeParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeParameterStar :: Phantoms.TTerm Syntax.StarTypeParameter -> Phantoms.TTerm Syntax.TypeParameter
-typeParameterStar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.TypeParameter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "star"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typedAssignment :: Phantoms.TTerm Syntax.SingleTarget -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.AnnotatedRhs) -> Phantoms.TTerm Syntax.TypedAssignment
-typedAssignment lhs type_ rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-typedAssignmentLhs :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm Syntax.SingleTarget
-typedAssignmentLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedAssignmentRhs :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm (Maybe Syntax.AnnotatedRhs)
-typedAssignmentRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedAssignmentType :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm Syntax.Expression
-typedAssignmentType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typedAssignmentWithLhs :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm Syntax.SingleTarget -> Phantoms.TTerm Syntax.TypedAssignment
-typedAssignmentWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typedAssignmentWithRhs :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm (Maybe Syntax.AnnotatedRhs) -> Phantoms.TTerm Syntax.TypedAssignment
-typedAssignmentWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typedAssignmentWithType :: Phantoms.TTerm Syntax.TypedAssignment -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypedAssignment
-typedAssignmentWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.TypedAssignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unAnnotation :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.Expression
-unAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Annotation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAttribute :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm [Syntax.Name]
-unAttribute x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Attribute")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCapturePattern :: Phantoms.TTerm Syntax.CapturePattern -> Phantoms.TTerm Syntax.PatternCaptureTarget
-unCapturePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.CapturePattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConjunction :: Phantoms.TTerm Syntax.Conjunction -> Phantoms.TTerm [Syntax.Inversion]
-unConjunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Conjunction")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDecorators :: Phantoms.TTerm Syntax.Decorators -> Phantoms.TTerm [Syntax.NamedExpression]
-unDecorators x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Decorators")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDefault :: Phantoms.TTerm Syntax.Default -> Phantoms.TTerm Syntax.Expression
-unDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Default")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDelStatement :: Phantoms.TTerm Syntax.DelStatement -> Phantoms.TTerm Syntax.DelTargets
-unDelStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.DelStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDelTargets :: Phantoms.TTerm Syntax.DelTargets -> Phantoms.TTerm [Syntax.DelTarget]
-unDelTargets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.DelTargets")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDict :: Phantoms.TTerm Syntax.Dict -> Phantoms.TTerm [Syntax.DoubleStarredKvpair]
-unDict x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Dict")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDisjunction :: Phantoms.TTerm Syntax.Disjunction -> Phantoms.TTerm [Syntax.Conjunction]
-unDisjunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Disjunction")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDottedName :: Phantoms.TTerm Syntax.DottedName -> Phantoms.TTerm [Syntax.Name]
-unDottedName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.DottedName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDoubleStarPattern :: Phantoms.TTerm Syntax.DoubleStarPattern -> Phantoms.TTerm Syntax.PatternCaptureTarget
-unDoubleStarPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.DoubleStarPattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEval :: Phantoms.TTerm Syntax.Eval -> Phantoms.TTerm [Syntax.Expression]
-unEval x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Eval")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFile :: Phantoms.TTerm Syntax.File -> Phantoms.TTerm [Syntax.Statement]
-unFile x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.File")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unForIfClauses :: Phantoms.TTerm Syntax.ForIfClauses -> Phantoms.TTerm [Syntax.ForIfClause]
-unForIfClauses x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.ForIfClauses")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFuncTypeComment :: Phantoms.TTerm Syntax.FuncTypeComment -> Phantoms.TTerm Syntax.TypeComment
-unFuncTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.FuncTypeComment")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGroupPattern :: Phantoms.TTerm Syntax.GroupPattern -> Phantoms.TTerm Syntax.Pattern
-unGroupPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.GroupPattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGuard :: Phantoms.TTerm Syntax.Guard -> Phantoms.TTerm Syntax.NamedExpression
-unGuard x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Guard")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImaginaryNumber :: Phantoms.TTerm Syntax.ImaginaryNumber -> Phantoms.TTerm Syntax.Number
-unImaginaryNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.ImaginaryNumber")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unImportName :: Phantoms.TTerm Syntax.ImportName -> Phantoms.TTerm [Syntax.DottedAsName]
-unImportName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.ImportName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInteractive :: Phantoms.TTerm Syntax.Interactive -> Phantoms.TTerm Syntax.Statement
-unInteractive x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Interactive")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unItemsPattern :: Phantoms.TTerm Syntax.ItemsPattern -> Phantoms.TTerm [Syntax.KeyValuePattern]
-unItemsPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.ItemsPattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unKeywordPatterns :: Phantoms.TTerm Syntax.KeywordPatterns -> Phantoms.TTerm [Syntax.KeywordPattern]
-unKeywordPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.KeywordPatterns")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unKeywords :: Phantoms.TTerm Syntax.Keywords -> Phantoms.TTerm Syntax.ParamNoDefault
-unKeywords x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Keywords")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLambdaKwds :: Phantoms.TTerm Syntax.LambdaKwds -> Phantoms.TTerm Syntax.LambdaParamNoDefault
-unLambdaKwds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.LambdaKwds")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLambdaParamNoDefault :: Phantoms.TTerm Syntax.LambdaParamNoDefault -> Phantoms.TTerm Syntax.Name
-unLambdaParamNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.LambdaParamNoDefault")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unList :: Phantoms.TTerm Syntax.List -> Phantoms.TTerm [Syntax.StarNamedExpression]
-unList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.List")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMaybeSequencePattern :: Phantoms.TTerm Syntax.MaybeSequencePattern -> Phantoms.TTerm [Syntax.MaybeStarPattern]
-unMaybeSequencePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.MaybeSequencePattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unModule :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [[Syntax.Statement]]
-unModule x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Module")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm String
-unName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Name")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNameOrAttribute :: Phantoms.TTerm Syntax.NameOrAttribute -> Phantoms.TTerm [Syntax.Name]
-unNameOrAttribute x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.NameOrAttribute")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unOrPattern :: Phantoms.TTerm Syntax.OrPattern -> Phantoms.TTerm [Syntax.ClosedPattern]
-unOrPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.OrPattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPatternCaptureTarget :: Phantoms.TTerm Syntax.PatternCaptureTarget -> Phantoms.TTerm Syntax.Name
-unPatternCaptureTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.PatternCaptureTarget")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPositionalPatterns :: Phantoms.TTerm Syntax.PositionalPatterns -> Phantoms.TTerm [Syntax.Pattern]
-unPositionalPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.PositionalPatterns")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRaiseStatement :: Phantoms.TTerm Syntax.RaiseStatement -> Phantoms.TTerm (Maybe Syntax.RaiseExpression)
-unRaiseStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.RaiseStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRealNumber :: Phantoms.TTerm Syntax.RealNumber -> Phantoms.TTerm Syntax.Number
-unRealNumber x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.RealNumber")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReturnStatement :: Phantoms.TTerm Syntax.ReturnStatement -> Phantoms.TTerm [Syntax.StarExpression]
-unReturnStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.ReturnStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSet :: Phantoms.TTerm Syntax.Set -> Phantoms.TTerm [Syntax.StarNamedExpression]
-unSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Set")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSlashNoDefault :: Phantoms.TTerm Syntax.SlashNoDefault -> Phantoms.TTerm [Syntax.ParamNoDefault]
-unSlashNoDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.SlashNoDefault")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStarAnnotation :: Phantoms.TTerm Syntax.StarAnnotation -> Phantoms.TTerm Syntax.StarExpression
-unStarAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.StarAnnotation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStarNamedExpressions :: Phantoms.TTerm Syntax.StarNamedExpressions -> Phantoms.TTerm [Syntax.StarNamedExpression]
-unStarNamedExpressions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.StarNamedExpressions")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStarTargetsListSeq :: Phantoms.TTerm Syntax.StarTargetsListSeq -> Phantoms.TTerm [Syntax.StarTarget]
-unStarTargetsListSeq x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.StarTargetsListSeq")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStarTargetsTupleSeq :: Phantoms.TTerm Syntax.StarTargetsTupleSeq -> Phantoms.TTerm [Syntax.StarTarget]
-unStarTargetsTupleSeq x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.StarTargetsTupleSeq")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStarredExpression :: Phantoms.TTerm Syntax.StarredExpression -> Phantoms.TTerm Syntax.Expression
-unStarredExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.StarredExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTuple :: Phantoms.TTerm Syntax.Tuple -> Phantoms.TTerm [Syntax.StarNamedExpression]
-unTuple x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.Tuple")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTypeComment :: Phantoms.TTerm Syntax.TypeComment -> Phantoms.TTerm String
-unTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.TypeComment")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unValuePattern :: Phantoms.TTerm Syntax.ValuePattern -> Phantoms.TTerm Syntax.Attribute
-unValuePattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.ValuePattern")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unYieldStatement :: Phantoms.TTerm Syntax.YieldStatement -> Phantoms.TTerm Syntax.YieldExpression
-unYieldStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.python.syntax.YieldStatement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-untypedAssignment :: Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.AnnotatedRhs -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.UntypedAssignment
-untypedAssignment targets rhs typeComment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm targets)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)}]}))
-
-untypedAssignmentRhs :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm Syntax.AnnotatedRhs
-untypedAssignmentRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-untypedAssignmentTargets :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm [Syntax.StarTarget]
-untypedAssignmentTargets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-        Core.projectionField = (Core.Name "targets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-untypedAssignmentTypeComment :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-untypedAssignmentTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-untypedAssignmentWithRhs :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm Syntax.AnnotatedRhs -> Phantoms.TTerm Syntax.UntypedAssignment
-untypedAssignmentWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-untypedAssignmentWithTargets :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm [Syntax.StarTarget] -> Phantoms.TTerm Syntax.UntypedAssignment
-untypedAssignmentWithTargets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-untypedAssignmentWithTypeComment :: Phantoms.TTerm Syntax.UntypedAssignment -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.UntypedAssignment
-untypedAssignmentWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "targets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-              Core.projectionField = (Core.Name "targets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.UntypedAssignment"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valuePattern :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm Syntax.ValuePattern
-valuePattern x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.ValuePattern"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-whileStatement :: Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.WhileStatement
-whileStatement condition body else_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))
-
-whileStatementBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Block
-whileStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementCondition :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.NamedExpression
-whileStatementCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementElse :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm (Maybe Syntax.Block)
-whileStatementElse x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-        Core.projectionField = (Core.Name "else")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileStatementWithBody :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whileStatementWithCondition :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm Syntax.NamedExpression -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "else")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whileStatementWithElse :: Phantoms.TTerm Syntax.WhileStatement -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.WhileStatement
-whileStatementWithElse original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WhileStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "else"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-withItem :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm (Maybe Syntax.StarTarget) -> Phantoms.TTerm Syntax.WithItem
-withItem expression as =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm as)}]}))
-
-withItemAs :: Phantoms.TTerm Syntax.WithItem -> Phantoms.TTerm (Maybe Syntax.StarTarget)
-withItemAs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-        Core.projectionField = (Core.Name "as")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withItemExpression :: Phantoms.TTerm Syntax.WithItem -> Phantoms.TTerm Syntax.Expression
-withItemExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withItemWithAs :: Phantoms.TTerm Syntax.WithItem -> Phantoms.TTerm (Maybe Syntax.StarTarget) -> Phantoms.TTerm Syntax.WithItem
-withItemWithAs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-withItemWithExpression :: Phantoms.TTerm Syntax.WithItem -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.WithItem
-withItemWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "as"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithItem"),
-              Core.projectionField = (Core.Name "as")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withStatement :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.WithItem] -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.WithStatement
-withStatement async items typeComment body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm typeComment)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-withStatementAsync :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm Bool
-withStatementAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withStatementBody :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm Syntax.Block
-withStatementBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withStatementItems :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm [Syntax.WithItem]
-withStatementItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withStatementTypeComment :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm (Maybe Syntax.TypeComment)
-withStatementTypeComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-        Core.projectionField = (Core.Name "typeComment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withStatementWithAsync :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.WithStatement
-withStatementWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withStatementWithBody :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.WithStatement
-withStatementWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-withStatementWithItems :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm [Syntax.WithItem] -> Phantoms.TTerm Syntax.WithStatement
-withStatementWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "typeComment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withStatementWithTypeComment :: Phantoms.TTerm Syntax.WithStatement -> Phantoms.TTerm (Maybe Syntax.TypeComment) -> Phantoms.TTerm Syntax.WithStatement
-withStatementWithTypeComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeComment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.python.syntax.WithStatement"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-yieldExpressionFrom :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.YieldExpression
-yieldExpressionFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.YieldExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "from"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-yieldExpressionSimple :: Phantoms.TTerm [Syntax.StarExpression] -> Phantoms.TTerm Syntax.YieldExpression
-yieldExpressionSimple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.python.syntax.YieldExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-yieldStatement :: Phantoms.TTerm Syntax.YieldExpression -> Phantoms.TTerm Syntax.YieldStatement
-yieldStatement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.python.syntax.YieldStatement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Query.hs b/src/main/haskell/Hydra/Dsl/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Query.hs
+++ /dev/null
@@ -1,740 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.query
-
-module Hydra.Dsl.Query where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Query as Query
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-comparisonConstraintEqual :: Phantoms.TTerm Query.ComparisonConstraint
-comparisonConstraintEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equal"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonConstraintGreaterThan :: Phantoms.TTerm Query.ComparisonConstraint
-comparisonConstraintGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonConstraintGreaterThanOrEqual :: Phantoms.TTerm Query.ComparisonConstraint
-comparisonConstraintGreaterThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonConstraintLessThan :: Phantoms.TTerm Query.ComparisonConstraint
-comparisonConstraintLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonConstraintLessThanOrEqual :: Phantoms.TTerm Query.ComparisonConstraint
-comparisonConstraintLessThanOrEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonConstraintNotEqual :: Phantoms.TTerm Query.ComparisonConstraint
-comparisonConstraintNotEqual =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEqual"),
-        Core.fieldTerm = Core.TermUnit}}))
-edge :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm Query.Edge
-edge type_ out in_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm out)},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm in_)}]}))
-edgeIn :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name)
-edgeIn x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-        Core.projectionField = (Core.Name "in")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-edgeOut :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name)
-edgeOut x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-        Core.projectionField = (Core.Name "out")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-edgeType :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm Core.Name
-edgeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-edgeWithIn :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm Query.Edge
-edgeWithIn original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.Edge"),
-              Core.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-edgeWithOut :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm Query.Edge
-edgeWithOut original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.Edge"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-edgeWithType :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Query.Edge
-edgeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.query.Edge"),
-              Core.projectionField = (Core.Name "out")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.query.Edge"),
-              Core.projectionField = (Core.Name "in")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphPattern :: Phantoms.TTerm Core.Name -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.GraphPattern
-graphPattern graph patterns =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm patterns)}]}))
-graphPatternGraph :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm Core.Name
-graphPatternGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphPatternPatterns :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm [Query.Pattern]
-graphPatternPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),
-        Core.projectionField = (Core.Name "patterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-graphPatternWithGraph :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Query.GraphPattern
-graphPatternWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),
-              Core.projectionField = (Core.Name "patterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-graphPatternWithPatterns :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.GraphPattern
-graphPatternWithPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-nodeTerm :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Query.Node
-nodeTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-nodeVariable :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm Query.Node
-nodeVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-nodeWildcard :: Phantoms.TTerm Query.Node
-nodeWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-pathEquation :: Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.PathEquation
-pathEquation left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-pathEquationLeft :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path
-pathEquationLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-pathEquationRight :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path
-pathEquationRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-pathEquationWithLeft :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.PathEquation
-pathEquationWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-pathEquationWithRight :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.PathEquation
-pathEquationWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-pathInverse :: Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.Path
-pathInverse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inverse"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-pathRegex :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.Path
-pathRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-pathStep :: Phantoms.TTerm Query.Step -> Phantoms.TTerm Query.Path
-pathStep x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "step"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternConjunction :: Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Pattern
-patternConjunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conjunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternDisjunction :: Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Pattern
-patternDisjunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternGraph :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm Query.Pattern
-patternGraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternImplication :: Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.PatternImplication
-patternImplication antecedent consequent =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "antecedent"),
-          Core.fieldTerm = (Phantoms.unTTerm antecedent)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm consequent)}]}))
-patternImplicationAntecedent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern
-patternImplicationAntecedent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),
-        Core.projectionField = (Core.Name "antecedent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-patternImplicationConsequent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern
-patternImplicationConsequent x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),
-        Core.projectionField = (Core.Name "consequent")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-patternImplicationWithAntecedent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.PatternImplication
-patternImplicationWithAntecedent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "antecedent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),
-              Core.projectionField = (Core.Name "consequent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-patternImplicationWithConsequent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.PatternImplication
-patternImplicationWithConsequent original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "antecedent"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),
-              Core.projectionField = (Core.Name "antecedent")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-patternNegation :: Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.Pattern
-patternNegation x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negation"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-patternTriple :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Pattern
-patternTriple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "triple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-query :: Phantoms.TTerm [Query.Variable] -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Query
-query variables patterns =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Query"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm variables)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm patterns)}]}))
-queryPatterns :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Pattern]
-queryPatterns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Query"),
-        Core.projectionField = (Core.Name "patterns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-queryVariables :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Variable]
-queryVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Query"),
-        Core.projectionField = (Core.Name "variables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-queryWithPatterns :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Query
-queryWithPatterns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Query"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.Query"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-queryWithVariables :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Variable] -> Phantoms.TTerm Query.Query
-queryWithVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Query"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.Query"),
-              Core.projectionField = (Core.Name "patterns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-range :: Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Query.Range
-range min max =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Range"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm min)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm max)}]}))
-rangeMax :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int
-rangeMax x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Range"),
-        Core.projectionField = (Core.Name "max")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-rangeMin :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int
-rangeMin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.Range"),
-        Core.projectionField = (Core.Name "min")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-rangeWithMax :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int -> Phantoms.TTerm Query.Range
-rangeWithMax original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Range"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.Range"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-rangeWithMin :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int -> Phantoms.TTerm Query.Range
-rangeWithMin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Range"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.Range"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-regexQuantifierAtLeast :: Phantoms.TTerm Int -> Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierAtLeast x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "atLeast"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-regexQuantifierExactly :: Phantoms.TTerm Int -> Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierExactly x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exactly"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-regexQuantifierOne :: Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierOne =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "one"),
-        Core.fieldTerm = Core.TermUnit}}))
-regexQuantifierOneOrMore :: Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierOneOrMore =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "oneOrMore"),
-        Core.fieldTerm = Core.TermUnit}}))
-regexQuantifierRange :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-regexQuantifierZeroOrMore :: Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierZeroOrMore =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zeroOrMore"),
-        Core.fieldTerm = Core.TermUnit}}))
-regexQuantifierZeroOrOne :: Phantoms.TTerm Query.RegexQuantifier
-regexQuantifierZeroOrOne =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "zeroOrOne"),
-        Core.fieldTerm = Core.TermUnit}}))
-regexSequence :: Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.RegexQuantifier -> Phantoms.TTerm Query.RegexSequence
-regexSequence path quantifier =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm quantifier)}]}))
-regexSequencePath :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.Path
-regexSequencePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-regexSequenceQuantifier :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.RegexQuantifier
-regexSequenceQuantifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),
-        Core.projectionField = (Core.Name "quantifier")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-regexSequenceWithPath :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.RegexSequence
-regexSequenceWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),
-              Core.projectionField = (Core.Name "quantifier")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-regexSequenceWithQuantifier :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.RegexQuantifier -> Phantoms.TTerm Query.RegexSequence
-regexSequenceWithQuantifier original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-stepCompare :: Phantoms.TTerm Query.ComparisonConstraint -> Phantoms.TTerm Query.Step
-stepCompare x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compare"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-stepEdge :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm Query.Step
-stepEdge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-stepProject :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Query.Step
-stepProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-triplePattern :: Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.TriplePattern
-triplePattern subject predicate object =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm subject)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)}]}))
-triplePatternObject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node
-triplePatternObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-triplePatternPredicate :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Path
-triplePatternPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-triplePatternSubject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node
-triplePatternSubject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-        Core.projectionField = (Core.Name "subject")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-triplePatternWithObject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.TriplePattern
-triplePatternWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-triplePatternWithPredicate :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.TriplePattern
-triplePatternWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-triplePatternWithSubject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.TriplePattern
-triplePatternWithSubject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unVariable :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm String
-unVariable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.query.Variable")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-variable :: Phantoms.TTerm String -> Phantoms.TTerm Query.Variable
-variable x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.query.Variable"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Rdf/Syntax.hs b/src/main/haskell/Hydra/Dsl/Rdf/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Rdf/Syntax.hs
+++ /dev/null
@@ -1,707 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.rdf.syntax
-
-module Hydra.Dsl.Rdf.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Rdf.Syntax as Syntax
-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
-
-blankNode :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.BlankNode
-blankNode x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.BlankNode"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataset :: Phantoms.TTerm (S.Set Syntax.Quad) -> Phantoms.TTerm Syntax.Dataset
-dataset x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.Dataset"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-description :: Phantoms.TTerm Syntax.Node -> Phantoms.TTerm Syntax.Graph -> Phantoms.TTerm Syntax.Description
-description subject graph =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm subject)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)}]}))
-
-descriptionGraph :: Phantoms.TTerm Syntax.Description -> Phantoms.TTerm Syntax.Graph
-descriptionGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-descriptionSubject :: Phantoms.TTerm Syntax.Description -> Phantoms.TTerm Syntax.Node
-descriptionSubject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-        Core.projectionField = (Core.Name "subject")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-descriptionWithGraph :: Phantoms.TTerm Syntax.Description -> Phantoms.TTerm Syntax.Graph -> Phantoms.TTerm Syntax.Description
-descriptionWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-descriptionWithSubject :: Phantoms.TTerm Syntax.Description -> Phantoms.TTerm Syntax.Node -> Phantoms.TTerm Syntax.Description
-descriptionWithSubject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Description"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graph :: Phantoms.TTerm (S.Set Syntax.Triple) -> Phantoms.TTerm Syntax.Graph
-graph x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.Graph"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iri :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Iri
-iri x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.Iri"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iriOrLiteralIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.IriOrLiteral
-iriOrLiteralIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.IriOrLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iriOrLiteralLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.IriOrLiteral
-iriOrLiteralLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.IriOrLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-langStrings :: Phantoms.TTerm (M.Map (Maybe Syntax.LanguageTag) String) -> Phantoms.TTerm Syntax.LangStrings
-langStrings x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.LangStrings"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-languageTag :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.LanguageTag
-languageTag x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.LanguageTag"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-literal :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm (Maybe Syntax.LanguageTag) -> Phantoms.TTerm Syntax.Literal
-literal lexicalForm datatypeIri languageTag =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lexicalForm"),
-          Core.fieldTerm = (Phantoms.unTTerm lexicalForm)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatypeIri"),
-          Core.fieldTerm = (Phantoms.unTTerm datatypeIri)},
-        Core.Field {
-          Core.fieldName = (Core.Name "languageTag"),
-          Core.fieldTerm = (Phantoms.unTTerm languageTag)}]}))
-
-literalDatatypeIri :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Iri
-literalDatatypeIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-        Core.projectionField = (Core.Name "datatypeIri")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalLanguageTag :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm (Maybe Syntax.LanguageTag)
-literalLanguageTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-        Core.projectionField = (Core.Name "languageTag")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalLexicalForm :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm String
-literalLexicalForm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-        Core.projectionField = (Core.Name "lexicalForm")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-literalWithDatatypeIri :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Literal
-literalWithDatatypeIri original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lexicalForm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-              Core.projectionField = (Core.Name "lexicalForm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatypeIri"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "languageTag"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-              Core.projectionField = (Core.Name "languageTag")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-literalWithLanguageTag :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm (Maybe Syntax.LanguageTag) -> Phantoms.TTerm Syntax.Literal
-literalWithLanguageTag original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lexicalForm"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-              Core.projectionField = (Core.Name "lexicalForm")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatypeIri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-              Core.projectionField = (Core.Name "datatypeIri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "languageTag"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalWithLexicalForm :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalWithLexicalForm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lexicalForm"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "datatypeIri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-              Core.projectionField = (Core.Name "datatypeIri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "languageTag"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Literal"),
-              Core.projectionField = (Core.Name "languageTag")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeBnode :: Phantoms.TTerm Syntax.BlankNode -> Phantoms.TTerm Syntax.Node
-nodeBnode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bnode"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Node
-nodeIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Node
-nodeLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-property :: Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Syntax.Property
-property domain range subPropertyOf =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subPropertyOf"),
-          Core.fieldTerm = (Phantoms.unTTerm subPropertyOf)}]}))
-
-propertyDomain :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm (S.Set Syntax.RdfsClass)
-propertyDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyRange :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm (S.Set Syntax.RdfsClass)
-propertyRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertySubPropertyOf :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm (S.Set Syntax.Property)
-propertySubPropertyOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-        Core.projectionField = (Core.Name "subPropertyOf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyWithDomain :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm Syntax.Property
-propertyWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subPropertyOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-              Core.projectionField = (Core.Name "subPropertyOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithRange :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm Syntax.Property
-propertyWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subPropertyOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-              Core.projectionField = (Core.Name "subPropertyOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyWithSubPropertyOf :: Phantoms.TTerm Syntax.Property -> Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Syntax.Property
-propertyWithSubPropertyOf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Property"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subPropertyOf"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quad :: Phantoms.TTerm Syntax.Resource -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Node -> Phantoms.TTerm (Maybe Syntax.Iri) -> Phantoms.TTerm Syntax.Quad
-quad subject predicate object graph =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm subject)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)}]}))
-
-quadGraph :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm (Maybe Syntax.Iri)
-quadGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quadObject :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm Syntax.Node
-quadObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quadPredicate :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm Syntax.Iri
-quadPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quadSubject :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm Syntax.Resource
-quadSubject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-        Core.projectionField = (Core.Name "subject")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-quadWithGraph :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm (Maybe Syntax.Iri) -> Phantoms.TTerm Syntax.Quad
-quadWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-quadWithObject :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm Syntax.Node -> Phantoms.TTerm Syntax.Quad
-quadWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quadWithPredicate :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Quad
-quadWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-quadWithSubject :: Phantoms.TTerm Syntax.Quad -> Phantoms.TTerm Syntax.Resource -> Phantoms.TTerm Syntax.Quad
-quadWithSubject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Quad"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rdfsClass :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.RdfsClass
-rdfsClass x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.rdf.syntax.RdfsClass"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-resourceBnode :: Phantoms.TTerm Syntax.BlankNode -> Phantoms.TTerm Syntax.Resource
-resourceBnode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.Resource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bnode"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-resourceIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Resource
-resourceIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rdf.syntax.Resource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-triple :: Phantoms.TTerm Syntax.Resource -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Node -> Phantoms.TTerm Syntax.Triple
-triple subject predicate object =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm subject)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)}]}))
-
-tripleObject :: Phantoms.TTerm Syntax.Triple -> Phantoms.TTerm Syntax.Node
-tripleObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-triplePredicate :: Phantoms.TTerm Syntax.Triple -> Phantoms.TTerm Syntax.Iri
-triplePredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleSubject :: Phantoms.TTerm Syntax.Triple -> Phantoms.TTerm Syntax.Resource
-tripleSubject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-        Core.projectionField = (Core.Name "subject")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleWithObject :: Phantoms.TTerm Syntax.Triple -> Phantoms.TTerm Syntax.Node -> Phantoms.TTerm Syntax.Triple
-tripleWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tripleWithPredicate :: Phantoms.TTerm Syntax.Triple -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Triple
-tripleWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-              Core.projectionField = (Core.Name "subject")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tripleWithSubject :: Phantoms.TTerm Syntax.Triple -> Phantoms.TTerm Syntax.Resource -> Phantoms.TTerm Syntax.Triple
-tripleWithSubject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rdf.syntax.Triple"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unBlankNode :: Phantoms.TTerm Syntax.BlankNode -> Phantoms.TTerm String
-unBlankNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.BlankNode")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDataset :: Phantoms.TTerm Syntax.Dataset -> Phantoms.TTerm (S.Set Syntax.Quad)
-unDataset x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.Dataset")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGraph :: Phantoms.TTerm Syntax.Graph -> Phantoms.TTerm (S.Set Syntax.Triple)
-unGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.Graph")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm String
-unIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.Iri")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLangStrings :: Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm (M.Map (Maybe Syntax.LanguageTag) String)
-unLangStrings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.LangStrings")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLanguageTag :: Phantoms.TTerm Syntax.LanguageTag -> Phantoms.TTerm String
-unLanguageTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.LanguageTag")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRdfsClass :: Phantoms.TTerm Syntax.RdfsClass -> Phantoms.TTerm ()
-unRdfsClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.rdf.syntax.RdfsClass")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Relational.hs b/src/main/haskell/Hydra/Dsl/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Relational.hs
+++ /dev/null
@@ -1,342 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.relational
-
-module Hydra.Dsl.Relational where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Relational as Relational
-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
-columnName :: Phantoms.TTerm String -> Phantoms.TTerm Relational.ColumnName
-columnName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.ColumnName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-columnSchema :: Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm t -> Phantoms.TTerm (Relational.ColumnSchema t)
-columnSchema name domain =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm domain)}]}))
-columnSchemaDomain :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm t
-columnSchemaDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-        Core.projectionField = (Core.Name "domain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-columnSchemaName :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm Relational.ColumnName
-columnSchemaName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-columnSchemaWithDomain :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm t -> Phantoms.TTerm (Relational.ColumnSchema t)
-columnSchemaWithDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-columnSchemaWithName :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm (Relational.ColumnSchema t)
-columnSchemaWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-              Core.projectionField = (Core.Name "domain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-foreignKey :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm (M.Map Relational.ColumnName Relational.ColumnName) -> Phantoms.TTerm Relational.ForeignKey
-foreignKey foreignRelation keys =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignRelation"),
-          Core.fieldTerm = (Phantoms.unTTerm foreignRelation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)}]}))
-foreignKeyForeignRelation :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm Relational.RelationName
-foreignKeyForeignRelation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),
-        Core.projectionField = (Core.Name "foreignRelation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-foreignKeyKeys :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm (M.Map Relational.ColumnName Relational.ColumnName)
-foreignKeyKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-foreignKeyWithForeignRelation :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm Relational.ForeignKey
-foreignKeyWithForeignRelation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignRelation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-foreignKeyWithKeys :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm (M.Map Relational.ColumnName Relational.ColumnName) -> Phantoms.TTerm Relational.ForeignKey
-foreignKeyWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignRelation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),
-              Core.projectionField = (Core.Name "foreignRelation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-primaryKey :: Phantoms.TTerm [Relational.ColumnName] -> Phantoms.TTerm Relational.PrimaryKey
-primaryKey x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.PrimaryKey"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-relation :: Phantoms.TTerm [Relational.Row v] -> Phantoms.TTerm (Relational.Relation v)
-relation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-relationName :: Phantoms.TTerm String -> Phantoms.TTerm Relational.RelationName
-relationName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.RelationName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-relationSchema :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm [Relational.ColumnSchema t] -> Phantoms.TTerm [Relational.PrimaryKey] -> Phantoms.TTerm [Relational.ForeignKey] -> Phantoms.TTerm (Relational.RelationSchema t)
-relationSchema name columns primaryKeys foreignKeys =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm columns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primaryKeys"),
-          Core.fieldTerm = (Phantoms.unTTerm primaryKeys)},
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignKeys"),
-          Core.fieldTerm = (Phantoms.unTTerm foreignKeys)}]}))
-relationSchemaColumns :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ColumnSchema t]
-relationSchemaColumns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-        Core.projectionField = (Core.Name "columns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-relationSchemaForeignKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ForeignKey]
-relationSchemaForeignKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-        Core.projectionField = (Core.Name "foreignKeys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-relationSchemaName :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm Relational.RelationName
-relationSchemaName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-relationSchemaPrimaryKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.PrimaryKey]
-relationSchemaPrimaryKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-        Core.projectionField = (Core.Name "primaryKeys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-relationSchemaWithColumns :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ColumnSchema t] -> Phantoms.TTerm (Relational.RelationSchema t)
-relationSchemaWithColumns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "primaryKeys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "primaryKeys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignKeys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "foreignKeys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-relationSchemaWithForeignKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ForeignKey] -> Phantoms.TTerm (Relational.RelationSchema t)
-relationSchemaWithForeignKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primaryKeys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "primaryKeys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignKeys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-relationSchemaWithName :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm (Relational.RelationSchema t)
-relationSchemaWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primaryKeys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "primaryKeys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignKeys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "foreignKeys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-relationSchemaWithPrimaryKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.PrimaryKey] -> Phantoms.TTerm (Relational.RelationSchema t)
-relationSchemaWithPrimaryKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primaryKeys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignKeys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-              Core.projectionField = (Core.Name "foreignKeys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-relationship :: Phantoms.TTerm (S.Set (M.Map Relational.ColumnName v)) -> Phantoms.TTerm (Relational.Relationship v)
-relationship x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relationship"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-row :: Phantoms.TTerm [v] -> Phantoms.TTerm (Relational.Row v)
-row x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Row"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-unColumnName :: Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm String
-unColumnName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.ColumnName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unPrimaryKey :: Phantoms.TTerm Relational.PrimaryKey -> Phantoms.TTerm [Relational.ColumnName]
-unPrimaryKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.PrimaryKey")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unRelation :: Phantoms.TTerm (Relational.Relation v) -> Phantoms.TTerm [Relational.Row v]
-unRelation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.Relation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unRelationName :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm String
-unRelationName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.RelationName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unRelationship :: Phantoms.TTerm (Relational.Relationship v) -> Phantoms.TTerm (S.Set (M.Map Relational.ColumnName v))
-unRelationship x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.Relationship")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unRow :: Phantoms.TTerm (Relational.Row v) -> Phantoms.TTerm [v]
-unRow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.Row")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Rust/Syntax.hs b/src/main/haskell/Hydra/Dsl/Rust/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Rust/Syntax.hs
+++ /dev/null
@@ -1,11235 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.rust.syntax
-
-module Hydra.Dsl.Rust.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Rust.Syntax as Syntax
-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
-
-angleBracketedArgs :: Phantoms.TTerm [Syntax.GenericArg] -> Phantoms.TTerm Syntax.AngleBracketedArgs
-angleBracketedArgs args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.AngleBracketedArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-angleBracketedArgsArgs :: Phantoms.TTerm Syntax.AngleBracketedArgs -> Phantoms.TTerm [Syntax.GenericArg]
-angleBracketedArgsArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.AngleBracketedArgs"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-angleBracketedArgsWithArgs :: Phantoms.TTerm Syntax.AngleBracketedArgs -> Phantoms.TTerm [Syntax.GenericArg] -> Phantoms.TTerm Syntax.AngleBracketedArgs
-angleBracketedArgsWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.AngleBracketedArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayExprElements :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.ArrayExpr
-arrayExprElements x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.ArrayExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elements"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayExprRepeat :: Phantoms.TTerm Syntax.ArrayRepeat -> Phantoms.TTerm Syntax.ArrayExpr
-arrayExprRepeat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.ArrayExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeat"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayRepeat :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayRepeat
-arrayRepeat element length =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm length)}]}))
-
-arrayRepeatElement :: Phantoms.TTerm Syntax.ArrayRepeat -> Phantoms.TTerm Syntax.Expression
-arrayRepeatElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayRepeatLength :: Phantoms.TTerm Syntax.ArrayRepeat -> Phantoms.TTerm Syntax.Expression
-arrayRepeatLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-        Core.projectionField = (Core.Name "length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayRepeatWithElement :: Phantoms.TTerm Syntax.ArrayRepeat -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayRepeat
-arrayRepeatWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayRepeatWithLength :: Phantoms.TTerm Syntax.ArrayRepeat -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayRepeat
-arrayRepeatWithLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayRepeat"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayType
-arrayType element length =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm element)},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm length)}]}))
-
-arrayTypeElement :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Type
-arrayTypeElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "element")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeLength :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Expression
-arrayTypeLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-        Core.projectionField = (Core.Name "length")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayTypeWithElement :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithElement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "length")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayTypeWithLength :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ArrayType
-arrayTypeWithLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "element"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ArrayType"),
-              Core.projectionField = (Core.Name "element")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "length"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assignExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignExpr
-assignExpr target value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.AssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-assignExprTarget :: Phantoms.TTerm Syntax.AssignExpr -> Phantoms.TTerm Syntax.Expression
-assignExprTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.AssignExpr"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignExprValue :: Phantoms.TTerm Syntax.AssignExpr -> Phantoms.TTerm Syntax.Expression
-assignExprValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.AssignExpr"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assignExprWithTarget :: Phantoms.TTerm Syntax.AssignExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignExpr
-assignExprWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.AssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.rust.syntax.AssignExpr"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assignExprWithValue :: Phantoms.TTerm Syntax.AssignExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.AssignExpr
-assignExprWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.AssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.AssignExpr"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-attribute :: Phantoms.TTerm Bool -> Phantoms.TTerm [String] -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Attribute
-attribute inner path tokens =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm inner)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Phantoms.unTTerm tokens)}]}))
-
-attributeInner :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm Bool
-attributeInner x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-        Core.projectionField = (Core.Name "inner")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributePath :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm [String]
-attributePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeTokens :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm (Maybe String)
-attributeTokens x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-        Core.projectionField = (Core.Name "tokens")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-attributeWithInner :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Attribute
-attributeWithInner original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-              Core.projectionField = (Core.Name "tokens")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-attributeWithPath :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.Attribute
-attributeWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-              Core.projectionField = (Core.Name "tokens")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-attributeWithTokens :: Phantoms.TTerm Syntax.Attribute -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Attribute
-attributeWithTokens original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inner"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-              Core.projectionField = (Core.Name "inner")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Attribute"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryOp -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExpr left op right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-binaryExprLeft :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression
-binaryExprLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExprOp :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.BinaryOp
-binaryExprOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExprRight :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression
-binaryExprRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-binaryExprWithLeft :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExprWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExprWithOp :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.BinaryOp -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExprWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-binaryExprWithRight :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.BinaryExpr
-binaryExprWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.BinaryExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-binaryOpAdd :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpAdd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "add"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpAnd :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitAnd :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitAnd"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitOr :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitOr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpBitXor :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpBitXor =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitXor"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpDiv :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpDiv =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "div"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpEq :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpEq =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eq"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpGe :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpGe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ge"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpGt :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpGt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpLe :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpLe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "le"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpLt :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpLt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpMul :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpMul =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mul"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpNe :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpNe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ne"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpOr :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpRem :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpRem =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rem"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpShl :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpShl =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shl"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpShr :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpShr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-binaryOpSub :: Phantoms.TTerm Syntax.BinaryOp
-binaryOpSub =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.BinaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sub"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-block :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Block
-block statements expression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Block"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm statements)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))
-
-blockExpression :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Expression)
-blockExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Block"),
-        Core.projectionField = (Core.Name "expression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blockStatements :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.Statement]
-blockStatements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Block"),
-        Core.projectionField = (Core.Name "statements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blockWithExpression :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Block
-blockWithExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Block"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Block"),
-              Core.projectionField = (Core.Name "statements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-blockWithStatements :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.Block
-blockWithStatements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Block"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "statements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Block"),
-              Core.projectionField = (Core.Name "expression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-callExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.CallExpr
-callExpr function args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm function)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-callExprArgs :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm [Syntax.Expression]
-callExprArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExprFunction :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.Expression
-callExprFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-        Core.projectionField = (Core.Name "function")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-callExprWithArgs :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.CallExpr
-callExprWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-              Core.projectionField = (Core.Name "function")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-callExprWithFunction :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CallExpr
-callExprWithFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CallExpr"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-castExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.CastExpr
-castExpr expr type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-castExprExpr :: Phantoms.TTerm Syntax.CastExpr -> Phantoms.TTerm Syntax.Expression
-castExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExprType :: Phantoms.TTerm Syntax.CastExpr -> Phantoms.TTerm Syntax.Type
-castExprType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-castExprWithExpr :: Phantoms.TTerm Syntax.CastExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CastExpr
-castExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-castExprWithType :: Phantoms.TTerm Syntax.CastExpr -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.CastExpr
-castExprWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CastExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closureExpr :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.ClosureParam] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ClosureExpr
-closureExpr move params returnType body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "move"),
-          Core.fieldTerm = (Phantoms.unTTerm move)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-closureExprBody :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm Syntax.Expression
-closureExprBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closureExprMove :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm Bool
-closureExprMove x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-        Core.projectionField = (Core.Name "move")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closureExprParams :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm [Syntax.ClosureParam]
-closureExprParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closureExprReturnType :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm (Maybe Syntax.Type)
-closureExprReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closureExprWithBody :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ClosureExpr
-closureExprWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "move"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "move")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closureExprWithMove :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ClosureExpr
-closureExprWithMove original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "move"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closureExprWithParams :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm [Syntax.ClosureParam] -> Phantoms.TTerm Syntax.ClosureExpr
-closureExprWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "move"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "move")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closureExprWithReturnType :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ClosureExpr
-closureExprWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "move"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "move")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closureParam :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ClosureParam
-closureParam pattern type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-closureParamPattern :: Phantoms.TTerm Syntax.ClosureParam -> Phantoms.TTerm Syntax.Pattern
-closureParamPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closureParamType :: Phantoms.TTerm Syntax.ClosureParam -> Phantoms.TTerm (Maybe Syntax.Type)
-closureParamType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closureParamWithPattern :: Phantoms.TTerm Syntax.ClosureParam -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.ClosureParam
-closureParamWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-closureParamWithType :: Phantoms.TTerm Syntax.ClosureParam -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ClosureParam
-closureParamWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ClosureParam"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compoundAssignExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CompoundAssignOp -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CompoundAssignExpr
-compoundAssignExpr target op value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-compoundAssignExprOp :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignExprOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compoundAssignExprTarget :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.Expression
-compoundAssignExprTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compoundAssignExprValue :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.Expression
-compoundAssignExprValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-compoundAssignExprWithOp :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.CompoundAssignOp -> Phantoms.TTerm Syntax.CompoundAssignExpr
-compoundAssignExprWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.rust.syntax.CompoundAssignExpr"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundAssignExprWithTarget :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CompoundAssignExpr
-compoundAssignExprWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.CompoundAssignExpr"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-compoundAssignExprWithValue :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CompoundAssignExpr
-compoundAssignExprWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-compoundAssignOpAddAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpAddAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpBitAndAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpBitAndAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitAndAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpBitOrAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpBitOrAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitOrAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpBitXorAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpBitXorAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bitXorAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpDivAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpDivAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "divAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpMulAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpMulAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mulAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpRemAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpRemAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "remAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpShlAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpShlAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shlAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpShrAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpShrAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shrAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-compoundAssignOpSubAssign :: Phantoms.TTerm Syntax.CompoundAssignOp
-compoundAssignOpSubAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.CompoundAssignOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subAssign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-constDef :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ConstDef
-constDef name type_ value public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-constDefDoc :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm (Maybe String)
-constDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constDefName :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm String
-constDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constDefPublic :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Bool
-constDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constDefType :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Syntax.Type
-constDefType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constDefValue :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Syntax.Expression
-constDefValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-constDefWithDoc :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ConstDef
-constDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-constDefWithName :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ConstDef
-constDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constDefWithPublic :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ConstDef
-constDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constDefWithType :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ConstDef
-constDefWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-constDefWithValue :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ConstDef
-constDefWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ConstDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-crate :: Phantoms.TTerm [Syntax.ItemWithComments] -> Phantoms.TTerm Syntax.Crate
-crate items =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Crate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)}]}))
-
-crateItems :: Phantoms.TTerm Syntax.Crate -> Phantoms.TTerm [Syntax.ItemWithComments]
-crateItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Crate"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-crateWithItems :: Phantoms.TTerm Syntax.Crate -> Phantoms.TTerm [Syntax.ItemWithComments] -> Phantoms.TTerm Syntax.Crate
-crateWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Crate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumDef :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm [Syntax.EnumVariant] -> Phantoms.TTerm [String] -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.EnumDef
-enumDef name generics whereClause variants derives public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Phantoms.unTTerm variants)},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Phantoms.unTTerm derives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-enumDefDerives :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm [String]
-enumDefDerives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "derives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefDoc :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm (Maybe String)
-enumDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefGenerics :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm [Syntax.GenericParam]
-enumDefGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefName :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm String
-enumDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefPublic :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm Bool
-enumDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefVariants :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm [Syntax.EnumVariant]
-enumDefVariants x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "variants")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefWhereClause :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-enumDefWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumDefWithDerives :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithDerives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "variants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDefWithDoc :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "variants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumDefWithGenerics :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "variants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDefWithName :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "variants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDefWithPublic :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "variants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDefWithVariants :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm [Syntax.EnumVariant] -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithVariants original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumDefWithWhereClause :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.EnumDef
-enumDefWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variants"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "variants")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumVariant :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.EnumVariantBody -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.EnumVariant
-enumVariant name body doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-enumVariantBody :: Phantoms.TTerm Syntax.EnumVariant -> Phantoms.TTerm Syntax.EnumVariantBody
-enumVariantBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumVariantBodyStruct :: Phantoms.TTerm [Syntax.StructField] -> Phantoms.TTerm Syntax.EnumVariantBody
-enumVariantBodyStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariantBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumVariantBodyTuple :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.EnumVariantBody
-enumVariantBodyTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariantBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumVariantBodyUnit :: Phantoms.TTerm Syntax.EnumVariantBody
-enumVariantBodyUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariantBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-enumVariantDoc :: Phantoms.TTerm Syntax.EnumVariant -> Phantoms.TTerm (Maybe String)
-enumVariantDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumVariantName :: Phantoms.TTerm Syntax.EnumVariant -> Phantoms.TTerm String
-enumVariantName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumVariantWithBody :: Phantoms.TTerm Syntax.EnumVariant -> Phantoms.TTerm Syntax.EnumVariantBody -> Phantoms.TTerm Syntax.EnumVariant
-enumVariantWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumVariantWithDoc :: Phantoms.TTerm Syntax.EnumVariant -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.EnumVariant
-enumVariantWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumVariantWithName :: Phantoms.TTerm Syntax.EnumVariant -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.EnumVariant
-enumVariantWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.EnumVariant"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exprPath :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.PathSegment] -> Phantoms.TTerm Syntax.ExprPath
-exprPath global segments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "global"),
-          Core.fieldTerm = (Phantoms.unTTerm global)},
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Phantoms.unTTerm segments)}]}))
-
-exprPathGlobal :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Bool
-exprPathGlobal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-        Core.projectionField = (Core.Name "global")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprPathSegments :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm [Syntax.PathSegment]
-exprPathSegments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-        Core.projectionField = (Core.Name "segments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exprPathWithGlobal :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ExprPath
-exprPathWithGlobal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "global"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-              Core.projectionField = (Core.Name "segments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exprPathWithSegments :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm [Syntax.PathSegment] -> Phantoms.TTerm Syntax.ExprPath
-exprPathWithSegments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "global"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ExprPath"),
-              Core.projectionField = (Core.Name "global")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-expressionArray :: Phantoms.TTerm Syntax.ArrayExpr -> Phantoms.TTerm Syntax.Expression
-expressionArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionAssign :: Phantoms.TTerm Syntax.AssignExpr -> Phantoms.TTerm Syntax.Expression
-expressionAssign x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assign"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionAwait :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionAwait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "await"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBinary :: Phantoms.TTerm Syntax.BinaryExpr -> Phantoms.TTerm Syntax.Expression
-expressionBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBlock :: Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.Expression
-expressionBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionBreak :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Expression
-expressionBreak x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "break"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCall :: Phantoms.TTerm Syntax.CallExpr -> Phantoms.TTerm Syntax.Expression
-expressionCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCast :: Phantoms.TTerm Syntax.CastExpr -> Phantoms.TTerm Syntax.Expression
-expressionCast x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cast"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionClosure :: Phantoms.TTerm Syntax.ClosureExpr -> Phantoms.TTerm Syntax.Expression
-expressionClosure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionCompoundAssign :: Phantoms.TTerm Syntax.CompoundAssignExpr -> Phantoms.TTerm Syntax.Expression
-expressionCompoundAssign x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "compoundAssign"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionContinue :: Phantoms.TTerm Syntax.Expression
-expressionContinue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "continue"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-expressionDereference :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionDereference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dereference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionFieldAccess :: Phantoms.TTerm Syntax.FieldAccessExpr -> Phantoms.TTerm Syntax.Expression
-expressionFieldAccess x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fieldAccess"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionFor :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Expression
-expressionFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionIf :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm Syntax.Expression
-expressionIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionIndex :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression
-expressionIndex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "index"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Expression
-expressionLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionLoop :: Phantoms.TTerm Syntax.LoopExpr -> Phantoms.TTerm Syntax.Expression
-expressionLoop x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "loop"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionMacro :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm Syntax.Expression
-expressionMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionMatch :: Phantoms.TTerm Syntax.MatchExpr -> Phantoms.TTerm Syntax.Expression
-expressionMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionMethodCall :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm Syntax.Expression
-expressionMethodCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "methodCall"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionParen :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionParen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paren"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionPath :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Syntax.Expression
-expressionPath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionRange :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm Syntax.Expression
-expressionRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionReference :: Phantoms.TTerm Syntax.RefExpr -> Phantoms.TTerm Syntax.Expression
-expressionReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionReturn :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Expression
-expressionReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionStruct :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm Syntax.Expression
-expressionStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionTry :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression
-expressionTry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "try"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionTuple :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression
-expressionTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionTupleIndex :: Phantoms.TTerm Syntax.TupleIndexExpr -> Phantoms.TTerm Syntax.Expression
-expressionTupleIndex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tupleIndex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionTypeAscription :: Phantoms.TTerm Syntax.TypeAscriptionExpr -> Phantoms.TTerm Syntax.Expression
-expressionTypeAscription x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeAscription"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionUnary :: Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.Expression
-expressionUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-expressionWhile :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm Syntax.Expression
-expressionWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Expression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fieldAccessExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.FieldAccessExpr
-fieldAccessExpr object field =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm field)}]}))
-
-fieldAccessExprField :: Phantoms.TTerm Syntax.FieldAccessExpr -> Phantoms.TTerm String
-fieldAccessExprField x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-        Core.projectionField = (Core.Name "field")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessExprObject :: Phantoms.TTerm Syntax.FieldAccessExpr -> Phantoms.TTerm Syntax.Expression
-fieldAccessExprObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldAccessExprWithField :: Phantoms.TTerm Syntax.FieldAccessExpr -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.FieldAccessExpr
-fieldAccessExprWithField original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldAccessExprWithObject :: Phantoms.TTerm Syntax.FieldAccessExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldAccessExpr
-fieldAccessExprWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldAccessExpr"),
-              Core.projectionField = (Core.Name "field")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldPattern :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.FieldPattern
-fieldPattern name pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-fieldPatternName :: Phantoms.TTerm Syntax.FieldPattern -> Phantoms.TTerm String
-fieldPatternName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldPatternPattern :: Phantoms.TTerm Syntax.FieldPattern -> Phantoms.TTerm (Maybe Syntax.Pattern)
-fieldPatternPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldPatternWithName :: Phantoms.TTerm Syntax.FieldPattern -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.FieldPattern
-fieldPatternWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldPatternWithPattern :: Phantoms.TTerm Syntax.FieldPattern -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.FieldPattern
-fieldPatternWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldValue :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FieldValue
-fieldValue name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-fieldValueName :: Phantoms.TTerm Syntax.FieldValue -> Phantoms.TTerm String
-fieldValueName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldValue"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldValueValue :: Phantoms.TTerm Syntax.FieldValue -> Phantoms.TTerm (Maybe Syntax.Expression)
-fieldValueValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldValue"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fieldValueWithName :: Phantoms.TTerm Syntax.FieldValue -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.FieldValue
-fieldValueWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.rust.syntax.FieldValue"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fieldValueWithValue :: Phantoms.TTerm Syntax.FieldValue -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.FieldValue
-fieldValueWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FieldValue"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FieldValue"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatLiteral :: Phantoms.TTerm Double -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FloatLiteral
-floatLiteral value suffix =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffix"),
-          Core.fieldTerm = (Phantoms.unTTerm suffix)}]}))
-
-floatLiteralSuffix :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm (Maybe String)
-floatLiteralSuffix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-        Core.projectionField = (Core.Name "suffix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-floatLiteralValue :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm Double
-floatLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-floatLiteralWithSuffix :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FloatLiteral
-floatLiteralWithSuffix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatLiteralWithValue :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm Double -> Phantoms.TTerm Syntax.FloatLiteral
-floatLiteralWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FloatLiteral"),
-              Core.projectionField = (Core.Name "suffix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDef :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm [Syntax.FnParam] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FnDef
-fnDef name generics whereClause params returnType body public async const unsafe doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm async)},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Phantoms.unTTerm const)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm unsafe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-fnDefAsync :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool
-fnDefAsync x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "async")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefBody :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Syntax.Block
-fnDefBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefConst :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool
-fnDefConst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "const")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefDoc :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm (Maybe String)
-fnDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefGenerics :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm [Syntax.GenericParam]
-fnDefGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefName :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm String
-fnDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefParams :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm [Syntax.FnParam]
-fnDefParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefPublic :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool
-fnDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefReturnType :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm (Maybe Syntax.Type)
-fnDefReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefUnsafe :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool
-fnDefUnsafe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "unsafe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefWhereClause :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-fnDefWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnDefWithAsync :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FnDef
-fnDefWithAsync original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithBody :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.FnDef
-fnDefWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithConst :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FnDef
-fnDefWithConst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithDoc :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FnDef
-fnDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fnDefWithGenerics :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.FnDef
-fnDefWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithName :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.FnDef
-fnDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithParams :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm [Syntax.FnParam] -> Phantoms.TTerm Syntax.FnDef
-fnDefWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithPublic :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FnDef
-fnDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithReturnType :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.FnDef
-fnDefWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithUnsafe :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.FnDef
-fnDefWithUnsafe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnDefWithWhereClause :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.FnDef
-fnDefWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "async"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "async")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "const")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnParam :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FnParam
-fnParam pattern type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-fnParamPattern :: Phantoms.TTerm Syntax.FnParam -> Phantoms.TTerm Syntax.Pattern
-fnParamPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnParamType :: Phantoms.TTerm Syntax.FnParam -> Phantoms.TTerm Syntax.Type
-fnParamType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnParamWithPattern :: Phantoms.TTerm Syntax.FnParam -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.FnParam
-fnParamWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnParamWithType :: Phantoms.TTerm Syntax.FnParam -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FnParam
-fnParamWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnParam"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fnPointerType :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FnPointerType
-fnPointerType params returnType =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)}]}))
-
-fnPointerTypeParams :: Phantoms.TTerm Syntax.FnPointerType -> Phantoms.TTerm [Syntax.Type]
-fnPointerTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnPointerTypeReturnType :: Phantoms.TTerm Syntax.FnPointerType -> Phantoms.TTerm Syntax.Type
-fnPointerTypeReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fnPointerTypeWithParams :: Phantoms.TTerm Syntax.FnPointerType -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.FnPointerType
-fnPointerTypeWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fnPointerTypeWithReturnType :: Phantoms.TTerm Syntax.FnPointerType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FnPointerType
-fnPointerTypeWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.FnPointerType"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forExpr :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ForExpr
-forExpr label pattern iter body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iter"),
-          Core.fieldTerm = (Phantoms.unTTerm iter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-forExprBody :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Block
-forExprBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forExprIter :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Expression
-forExprIter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-        Core.projectionField = (Core.Name "iter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forExprLabel :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm (Maybe String)
-forExprLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forExprPattern :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Pattern
-forExprPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-forExprWithBody :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ForExpr
-forExprWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-      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.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "iter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-forExprWithIter :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ForExpr
-forExprWithIter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-      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.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forExprWithLabel :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ForExpr
-forExprWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "iter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "iter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-forExprWithPattern :: Phantoms.TTerm Syntax.ForExpr -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.ForExpr
-forExprWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-      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.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "iter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "iter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ForExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-genericArgBinding :: Phantoms.TTerm Syntax.TypeBinding -> Phantoms.TTerm Syntax.GenericArg
-genericArgBinding x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binding"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericArgConst :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.GenericArg
-genericArgConst x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericArgLifetime :: Phantoms.TTerm Syntax.Lifetime -> Phantoms.TTerm Syntax.GenericArg
-genericArgLifetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lifetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericArgType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.GenericArg
-genericArgType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArg"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericArgumentsAngleBracketed :: Phantoms.TTerm Syntax.AngleBracketedArgs -> Phantoms.TTerm Syntax.GenericArguments
-genericArgumentsAngleBracketed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "angleBracketed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericArgumentsNone :: Phantoms.TTerm Syntax.GenericArguments
-genericArgumentsNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-genericArgumentsParenthesized :: Phantoms.TTerm Syntax.ParenthesizedArgs -> Phantoms.TTerm Syntax.GenericArguments
-genericArgumentsParenthesized x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.GenericArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parenthesized"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericParam :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.GenericParam
-genericParam name bounds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)}]}))
-
-genericParamBounds :: Phantoms.TTerm Syntax.GenericParam -> Phantoms.TTerm [Syntax.TypeParamBound]
-genericParamBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericParamName :: Phantoms.TTerm Syntax.GenericParam -> Phantoms.TTerm String
-genericParamName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericParamWithBounds :: Phantoms.TTerm Syntax.GenericParam -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.GenericParam
-genericParamWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genericParamWithName :: Phantoms.TTerm Syntax.GenericParam -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.GenericParam
-genericParamWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.GenericParam"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identifierPattern :: Phantoms.TTerm String -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.IdentifierPattern
-identifierPattern name mutable atPattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atPattern"),
-          Core.fieldTerm = (Phantoms.unTTerm atPattern)}]}))
-
-identifierPatternAtPattern :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm (Maybe Syntax.Pattern)
-identifierPatternAtPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-        Core.projectionField = (Core.Name "atPattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identifierPatternMutable :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm Bool
-identifierPatternMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identifierPatternName :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm String
-identifierPatternName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-identifierPatternWithAtPattern :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.IdentifierPattern
-identifierPatternWithAtPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atPattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-identifierPatternWithMutable :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.IdentifierPattern
-identifierPatternWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "atPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-              Core.projectionField = (Core.Name "atPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identifierPatternWithName :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.IdentifierPattern
-identifierPatternWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "atPattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IdentifierPattern"),
-              Core.projectionField = (Core.Name "atPattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifConditionBool :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfCondition
-ifConditionBool x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.IfCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ifConditionLet :: Phantoms.TTerm Syntax.LetCondition -> Phantoms.TTerm Syntax.IfCondition
-ifConditionLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.IfCondition"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ifExpr :: Phantoms.TTerm Syntax.IfCondition -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.IfExpr
-ifExpr condition thenBlock elseBranch =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBlock"),
-          Core.fieldTerm = (Phantoms.unTTerm thenBlock)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm elseBranch)}]}))
-
-ifExprCondition :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm Syntax.IfCondition
-ifExprCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifExprElseBranch :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm (Maybe Syntax.Expression)
-ifExprElseBranch x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-        Core.projectionField = (Core.Name "elseBranch")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifExprThenBlock :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm Syntax.Block
-ifExprThenBlock x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-        Core.projectionField = (Core.Name "thenBlock")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ifExprWithCondition :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm Syntax.IfCondition -> Phantoms.TTerm Syntax.IfExpr
-ifExprWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBlock"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-              Core.projectionField = (Core.Name "thenBlock")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-              Core.projectionField = (Core.Name "elseBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ifExprWithElseBranch :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.IfExpr
-ifExprWithElseBranch original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBlock"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-              Core.projectionField = (Core.Name "thenBlock")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ifExprWithThenBlock :: Phantoms.TTerm Syntax.IfExpr -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.IfExpr
-ifExprWithThenBlock original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenBlock"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elseBranch"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IfExpr"),
-              Core.projectionField = (Core.Name "elseBranch")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implBlock :: Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm (Maybe Syntax.TypePath) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.ImplItem] -> Phantoms.TTerm Syntax.ImplBlock
-implBlock generics whereClause trait negative selfType items =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Phantoms.unTTerm trait)},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Phantoms.unTTerm negative)},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Phantoms.unTTerm selfType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)}]}))
-
-implBlockGenerics :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm [Syntax.GenericParam]
-implBlockGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implBlockItems :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm [Syntax.ImplItem]
-implBlockItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implBlockNegative :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm Bool
-implBlockNegative x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-        Core.projectionField = (Core.Name "negative")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implBlockSelfType :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm Syntax.Type
-implBlockSelfType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-        Core.projectionField = (Core.Name "selfType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implBlockTrait :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm (Maybe Syntax.TypePath)
-implBlockTrait x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-        Core.projectionField = (Core.Name "trait")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implBlockWhereClause :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-implBlockWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implBlockWithGenerics :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.ImplBlock
-implBlockWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "trait")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "negative")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "selfType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implBlockWithItems :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm [Syntax.ImplItem] -> Phantoms.TTerm Syntax.ImplBlock
-implBlockWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "trait")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "negative")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "selfType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-implBlockWithNegative :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ImplBlock
-implBlockWithNegative original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "trait")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "selfType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implBlockWithSelfType :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ImplBlock
-implBlockWithSelfType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "trait")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "negative")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implBlockWithTrait :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm (Maybe Syntax.TypePath) -> Phantoms.TTerm Syntax.ImplBlock
-implBlockWithTrait original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "negative")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "selfType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implBlockWithWhereClause :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.ImplBlock
-implBlockWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trait"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "trait")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "negative"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "negative")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "selfType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "selfType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplBlock"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implItemConst :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Syntax.ImplItem
-implItemConst x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.ImplItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implItemMethod :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Syntax.ImplItem
-implItemMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.ImplItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implItemType :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.ImplItem
-implItemType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.ImplItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-implMethod :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm [Syntax.MethodParam] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ImplMethod
-implMethod name generics whereClause params returnType body public default_ doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-implMethodBody :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Syntax.Block
-implMethodBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodDefault :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Bool
-implMethodDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodDoc :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm (Maybe String)
-implMethodDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodGenerics :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm [Syntax.GenericParam]
-implMethodGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodName :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm String
-implMethodName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodParams :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm [Syntax.MethodParam]
-implMethodParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodPublic :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Bool
-implMethodPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodReturnType :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm (Maybe Syntax.Type)
-implMethodReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodWhereClause :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-implMethodWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-implMethodWithBody :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithDefault :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithDoc :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-implMethodWithGenerics :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithName :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithParams :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm [Syntax.MethodParam] -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithPublic :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithReturnType :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-implMethodWithWhereClause :: Phantoms.TTerm Syntax.ImplMethod -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.ImplMethod
-implMethodWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ImplMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-indexExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IndexExpr
-indexExpr object index =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm index)}]}))
-
-indexExprIndex :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression
-indexExprIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-        Core.projectionField = (Core.Name "index")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexExprObject :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression
-indexExprObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-indexExprWithIndex :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IndexExpr
-indexExprWithIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-indexExprWithObject :: Phantoms.TTerm Syntax.IndexExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IndexExpr
-indexExprWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IndexExpr"),
-              Core.projectionField = (Core.Name "index")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-integerLiteral :: Phantoms.TTerm Integer -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteral value suffix =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffix"),
-          Core.fieldTerm = (Phantoms.unTTerm suffix)}]}))
-
-integerLiteralSuffix :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm (Maybe String)
-integerLiteralSuffix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-        Core.projectionField = (Core.Name "suffix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerLiteralValue :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Integer
-integerLiteralValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerLiteralWithSuffix :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralWithSuffix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-integerLiteralWithValue :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.IntegerLiteral
-integerLiteralWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "suffix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.IntegerLiteral"),
-              Core.projectionField = (Core.Name "suffix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-itemConst :: Phantoms.TTerm Syntax.ConstDef -> Phantoms.TTerm Syntax.Item
-itemConst x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemEnum :: Phantoms.TTerm Syntax.EnumDef -> Phantoms.TTerm Syntax.Item
-itemEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemFn :: Phantoms.TTerm Syntax.FnDef -> Phantoms.TTerm Syntax.Item
-itemFn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemImpl :: Phantoms.TTerm Syntax.ImplBlock -> Phantoms.TTerm Syntax.Item
-itemImpl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "impl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemMacro :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm Syntax.Item
-itemMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemMod :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm Syntax.Item
-itemMod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemStatic :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Syntax.Item
-itemStatic x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "static"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemStruct :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm Syntax.Item
-itemStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemTrait :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm Syntax.Item
-itemTrait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trait"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemTypeAlias :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Item
-itemTypeAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeAlias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemUse :: Phantoms.TTerm Syntax.UseDeclaration -> Phantoms.TTerm Syntax.Item
-itemUse x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Item"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "use"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-itemWithComments :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Visibility -> Phantoms.TTerm Syntax.Item -> Phantoms.TTerm Syntax.ItemWithComments
-itemWithComments doc visibility item =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)},
-        Core.Field {
-          Core.fieldName = (Core.Name "visibility"),
-          Core.fieldTerm = (Phantoms.unTTerm visibility)},
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Phantoms.unTTerm item)}]}))
-
-itemWithCommentsDoc :: Phantoms.TTerm Syntax.ItemWithComments -> Phantoms.TTerm (Maybe String)
-itemWithCommentsDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemWithCommentsItem :: Phantoms.TTerm Syntax.ItemWithComments -> Phantoms.TTerm Syntax.Item
-itemWithCommentsItem x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-        Core.projectionField = (Core.Name "item")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemWithCommentsVisibility :: Phantoms.TTerm Syntax.ItemWithComments -> Phantoms.TTerm Syntax.Visibility
-itemWithCommentsVisibility x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-        Core.projectionField = (Core.Name "visibility")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemWithCommentsWithDoc :: Phantoms.TTerm Syntax.ItemWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ItemWithComments
-itemWithCommentsWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "visibility"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-              Core.projectionField = (Core.Name "visibility")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-              Core.projectionField = (Core.Name "item")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-itemWithCommentsWithItem :: Phantoms.TTerm Syntax.ItemWithComments -> Phantoms.TTerm Syntax.Item -> Phantoms.TTerm Syntax.ItemWithComments
-itemWithCommentsWithItem original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "visibility"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-              Core.projectionField = (Core.Name "visibility")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-itemWithCommentsWithVisibility :: Phantoms.TTerm Syntax.ItemWithComments -> Phantoms.TTerm Syntax.Visibility -> Phantoms.TTerm Syntax.ItemWithComments
-itemWithCommentsWithVisibility original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "visibility"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "item"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ItemWithComments"),
-              Core.projectionField = (Core.Name "item")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letCondition :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetCondition
-letCondition pattern expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-letConditionExpr :: Phantoms.TTerm Syntax.LetCondition -> Phantoms.TTerm Syntax.Expression
-letConditionExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letConditionPattern :: Phantoms.TTerm Syntax.LetCondition -> Phantoms.TTerm Syntax.Pattern
-letConditionPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letConditionWithExpr :: Phantoms.TTerm Syntax.LetCondition -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetCondition
-letConditionWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letConditionWithPattern :: Phantoms.TTerm Syntax.LetCondition -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.LetCondition
-letConditionWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetCondition"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letStatement :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.LetStatement
-letStatement pattern mutable type_ init =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)}]}))
-
-letStatementInit :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm (Maybe Syntax.Expression)
-letStatementInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letStatementMutable :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm Bool
-letStatementMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letStatementPattern :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm Syntax.Pattern
-letStatementPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letStatementType :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm (Maybe Syntax.Type)
-letStatementType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-letStatementWithInit :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.LetStatement
-letStatementWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-letStatementWithMutable :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.LetStatement
-letStatementWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letStatementWithPattern :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.LetStatement
-letStatementWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-letStatementWithType :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.LetStatement
-letStatementWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LetStatement"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-lifetime :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Lifetime
-lifetime name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Lifetime"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-lifetimeName :: Phantoms.TTerm Syntax.Lifetime -> Phantoms.TTerm String
-lifetimeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.Lifetime"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-lifetimeWithName :: Phantoms.TTerm Syntax.Lifetime -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Lifetime
-lifetimeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.Lifetime"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-literalBool :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Literal
-literalBool x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalByte :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Syntax.Literal
-literalByte x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalByteString :: Phantoms.TTerm B.ByteString -> Phantoms.TTerm Syntax.Literal
-literalByteString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byteString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalChar :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Syntax.Literal
-literalChar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalFloat :: Phantoms.TTerm Syntax.FloatLiteral -> Phantoms.TTerm Syntax.Literal
-literalFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalInteger :: Phantoms.TTerm Syntax.IntegerLiteral -> Phantoms.TTerm Syntax.Literal
-literalInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalRawString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalRawString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rawString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal
-literalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-loopExpr :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.LoopExpr
-loopExpr label body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LoopExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-loopExprBody :: Phantoms.TTerm Syntax.LoopExpr -> Phantoms.TTerm Syntax.Block
-loopExprBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LoopExpr"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-loopExprLabel :: Phantoms.TTerm Syntax.LoopExpr -> Phantoms.TTerm (Maybe String)
-loopExprLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LoopExpr"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-loopExprWithBody :: Phantoms.TTerm Syntax.LoopExpr -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.LoopExpr
-loopExprWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LoopExpr"),
-      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.rust.syntax.LoopExpr"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-loopExprWithLabel :: Phantoms.TTerm Syntax.LoopExpr -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.LoopExpr
-loopExprWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.LoopExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.LoopExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-macroDelimiterBrace :: Phantoms.TTerm Syntax.MacroDelimiter
-macroDelimiterBrace =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.MacroDelimiter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "brace"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-macroDelimiterBracket :: Phantoms.TTerm Syntax.MacroDelimiter
-macroDelimiterBracket =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.MacroDelimiter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bracket"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-macroDelimiterParen :: Phantoms.TTerm Syntax.MacroDelimiter
-macroDelimiterParen =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.MacroDelimiter"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paren"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-macroInvocation :: Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.MacroDelimiter -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MacroInvocation
-macroInvocation path delimiter tokens =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Phantoms.unTTerm delimiter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Phantoms.unTTerm tokens)}]}))
-
-macroInvocationDelimiter :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm Syntax.MacroDelimiter
-macroInvocationDelimiter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-        Core.projectionField = (Core.Name "delimiter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroInvocationPath :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm [String]
-macroInvocationPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroInvocationTokens :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm String
-macroInvocationTokens x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-        Core.projectionField = (Core.Name "tokens")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-macroInvocationWithDelimiter :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm Syntax.MacroDelimiter -> Phantoms.TTerm Syntax.MacroInvocation
-macroInvocationWithDelimiter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-              Core.projectionField = (Core.Name "tokens")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-macroInvocationWithPath :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.MacroInvocation
-macroInvocationWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-              Core.projectionField = (Core.Name "delimiter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-              Core.projectionField = (Core.Name "tokens")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-macroInvocationWithTokens :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MacroInvocation
-macroInvocationWithTokens original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MacroInvocation"),
-              Core.projectionField = (Core.Name "delimiter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tokens"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-matchArm :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MatchArm
-matchArm pattern guard body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm guard)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-matchArmBody :: Phantoms.TTerm Syntax.MatchArm -> Phantoms.TTerm Syntax.Expression
-matchArmBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchArmGuard :: Phantoms.TTerm Syntax.MatchArm -> Phantoms.TTerm (Maybe Syntax.Expression)
-matchArmGuard x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-        Core.projectionField = (Core.Name "guard")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchArmPattern :: Phantoms.TTerm Syntax.MatchArm -> Phantoms.TTerm Syntax.Pattern
-matchArmPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchArmWithBody :: Phantoms.TTerm Syntax.MatchArm -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MatchArm
-matchArmWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-matchArmWithGuard :: Phantoms.TTerm Syntax.MatchArm -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.MatchArm
-matchArmWithGuard original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchArmWithPattern :: Phantoms.TTerm Syntax.MatchArm -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.MatchArm
-matchArmWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "guard"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-              Core.projectionField = (Core.Name "guard")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchArm"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-matchExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.MatchArm] -> Phantoms.TTerm Syntax.MatchExpr
-matchExpr scrutinee arms =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Phantoms.unTTerm scrutinee)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arms"),
-          Core.fieldTerm = (Phantoms.unTTerm arms)}]}))
-
-matchExprArms :: Phantoms.TTerm Syntax.MatchExpr -> Phantoms.TTerm [Syntax.MatchArm]
-matchExprArms x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-        Core.projectionField = (Core.Name "arms")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchExprScrutinee :: Phantoms.TTerm Syntax.MatchExpr -> Phantoms.TTerm Syntax.Expression
-matchExprScrutinee x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-        Core.projectionField = (Core.Name "scrutinee")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-matchExprWithArms :: Phantoms.TTerm Syntax.MatchExpr -> Phantoms.TTerm [Syntax.MatchArm] -> Phantoms.TTerm Syntax.MatchExpr
-matchExprWithArms original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-              Core.projectionField = (Core.Name "scrutinee")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arms"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-matchExprWithScrutinee :: Phantoms.TTerm Syntax.MatchExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MatchExpr
-matchExprWithScrutinee original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scrutinee"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arms"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MatchExpr"),
-              Core.projectionField = (Core.Name "arms")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodCallExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm String -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MethodCallExpr
-methodCallExpr receiver method turbofish args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Phantoms.unTTerm receiver)},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Phantoms.unTTerm method)},
-        Core.Field {
-          Core.fieldName = (Core.Name "turbofish"),
-          Core.fieldTerm = (Phantoms.unTTerm turbofish)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-methodCallExprArgs :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm [Syntax.Expression]
-methodCallExprArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodCallExprMethod :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm String
-methodCallExprMethod x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-        Core.projectionField = (Core.Name "method")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodCallExprReceiver :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm Syntax.Expression
-methodCallExprReceiver x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-        Core.projectionField = (Core.Name "receiver")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodCallExprTurbofish :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm [Syntax.Type]
-methodCallExprTurbofish x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-        Core.projectionField = (Core.Name "turbofish")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-methodCallExprWithArgs :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.MethodCallExpr
-methodCallExprWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "method")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "turbofish"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "turbofish")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-methodCallExprWithMethod :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.MethodCallExpr
-methodCallExprWithMethod original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "turbofish"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "turbofish")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodCallExprWithReceiver :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.MethodCallExpr
-methodCallExprWithReceiver original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "method")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "turbofish"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "turbofish")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodCallExprWithTurbofish :: Phantoms.TTerm Syntax.MethodCallExpr -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.MethodCallExpr
-methodCallExprWithTurbofish original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "receiver"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "receiver")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "method"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "method")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "turbofish"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.MethodCallExpr"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-methodParamRegular :: Phantoms.TTerm Syntax.FnParam -> Phantoms.TTerm Syntax.MethodParam
-methodParamRegular x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.MethodParam"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regular"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-methodParamSelf :: Phantoms.TTerm Syntax.SelfParam -> Phantoms.TTerm Syntax.MethodParam
-methodParamSelf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.MethodParam"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "self"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-modDef :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe [Syntax.Item]) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ModDef
-modDef name body public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-modDefBody :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm (Maybe [Syntax.Item])
-modDefBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modDefDoc :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm (Maybe String)
-modDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modDefName :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm String
-modDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modDefPublic :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm Bool
-modDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-modDefWithBody :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm (Maybe [Syntax.Item]) -> Phantoms.TTerm Syntax.ModDef
-modDefWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-modDefWithDoc :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ModDef
-modDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-modDefWithName :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ModDef
-modDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-modDefWithPublic :: Phantoms.TTerm Syntax.ModDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ModDef
-modDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ModDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parenthesizedArgs :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ParenthesizedArgs
-parenthesizedArgs inputs output =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inputs"),
-          Core.fieldTerm = (Phantoms.unTTerm inputs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "output"),
-          Core.fieldTerm = (Phantoms.unTTerm output)}]}))
-
-parenthesizedArgsInputs :: Phantoms.TTerm Syntax.ParenthesizedArgs -> Phantoms.TTerm [Syntax.Type]
-parenthesizedArgsInputs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-        Core.projectionField = (Core.Name "inputs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parenthesizedArgsOutput :: Phantoms.TTerm Syntax.ParenthesizedArgs -> Phantoms.TTerm (Maybe Syntax.Type)
-parenthesizedArgsOutput x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-        Core.projectionField = (Core.Name "output")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parenthesizedArgsWithInputs :: Phantoms.TTerm Syntax.ParenthesizedArgs -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.ParenthesizedArgs
-parenthesizedArgsWithInputs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inputs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "output"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-              Core.projectionField = (Core.Name "output")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parenthesizedArgsWithOutput :: Phantoms.TTerm Syntax.ParenthesizedArgs -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.ParenthesizedArgs
-parenthesizedArgsWithOutput original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "inputs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ParenthesizedArgs"),
-              Core.projectionField = (Core.Name "inputs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "output"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathSegment :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.GenericArguments -> Phantoms.TTerm Syntax.PathSegment
-pathSegment name arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-pathSegmentArguments :: Phantoms.TTerm Syntax.PathSegment -> Phantoms.TTerm Syntax.GenericArguments
-pathSegmentArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathSegmentName :: Phantoms.TTerm Syntax.PathSegment -> Phantoms.TTerm String
-pathSegmentName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pathSegmentWithArguments :: Phantoms.TTerm Syntax.PathSegment -> Phantoms.TTerm Syntax.GenericArguments -> Phantoms.TTerm Syntax.PathSegment
-pathSegmentWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pathSegmentWithName :: Phantoms.TTerm Syntax.PathSegment -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.PathSegment
-pathSegmentWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.PathSegment"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-patternIdentifier :: Phantoms.TTerm Syntax.IdentifierPattern -> Phantoms.TTerm Syntax.Pattern
-patternIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Pattern
-patternLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternOr :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern
-patternOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternParen :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Pattern
-patternParen x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "paren"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternPath :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Syntax.Pattern
-patternPath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternRange :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm Syntax.Pattern
-patternRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternReference :: Phantoms.TTerm Syntax.RefPattern -> Phantoms.TTerm Syntax.Pattern
-patternReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternRest :: Phantoms.TTerm Syntax.Pattern
-patternRest =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rest"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-patternSlice :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern
-patternSlice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternStruct :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm Syntax.Pattern
-patternStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "struct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternTuple :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern
-patternTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternTupleStruct :: Phantoms.TTerm Syntax.TupleStructPattern -> Phantoms.TTerm Syntax.Pattern
-patternTupleStruct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tupleStruct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patternWildcard :: Phantoms.TTerm Syntax.Pattern
-patternWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Pattern"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-rangeExpr :: Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RangeExpr
-rangeExpr from to inclusive =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm from)},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm to)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Phantoms.unTTerm inclusive)}]}))
-
-rangeExprFrom :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm (Maybe Syntax.Expression)
-rangeExprFrom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-        Core.projectionField = (Core.Name "from")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeExprInclusive :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm Bool
-rangeExprInclusive x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-        Core.projectionField = (Core.Name "inclusive")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeExprTo :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm (Maybe Syntax.Expression)
-rangeExprTo x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-        Core.projectionField = (Core.Name "to")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeExprWithFrom :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.RangeExpr
-rangeExprWithFrom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-              Core.projectionField = (Core.Name "inclusive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeExprWithInclusive :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RangeExpr
-rangeExprWithInclusive original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeExprWithTo :: Phantoms.TTerm Syntax.RangeExpr -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.RangeExpr
-rangeExprWithTo original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangeExpr"),
-              Core.projectionField = (Core.Name "inclusive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangePattern :: Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RangePattern
-rangePattern from to inclusive =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm from)},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm to)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Phantoms.unTTerm inclusive)}]}))
-
-rangePatternFrom :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm (Maybe Syntax.Pattern)
-rangePatternFrom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-        Core.projectionField = (Core.Name "from")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangePatternInclusive :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm Bool
-rangePatternInclusive x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-        Core.projectionField = (Core.Name "inclusive")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangePatternTo :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm (Maybe Syntax.Pattern)
-rangePatternTo x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-        Core.projectionField = (Core.Name "to")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangePatternWithFrom :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.RangePattern
-rangePatternWithFrom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-              Core.projectionField = (Core.Name "inclusive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangePatternWithInclusive :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RangePattern
-rangePatternWithInclusive original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangePatternWithTo :: Phantoms.TTerm Syntax.RangePattern -> Phantoms.TTerm (Maybe Syntax.Pattern) -> Phantoms.TTerm Syntax.RangePattern
-rangePatternWithTo original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inclusive"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RangePattern"),
-              Core.projectionField = (Core.Name "inclusive")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rawPointerType :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RawPointerType
-rawPointerType mutable type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-rawPointerTypeMutable :: Phantoms.TTerm Syntax.RawPointerType -> Phantoms.TTerm Bool
-rawPointerTypeMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rawPointerTypeType :: Phantoms.TTerm Syntax.RawPointerType -> Phantoms.TTerm Syntax.Type
-rawPointerTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rawPointerTypeWithMutable :: Phantoms.TTerm Syntax.RawPointerType -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RawPointerType
-rawPointerTypeWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rawPointerTypeWithType :: Phantoms.TTerm Syntax.RawPointerType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.RawPointerType
-rawPointerTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RawPointerType"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refExpr :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RefExpr
-refExpr mutable expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-refExprExpr :: Phantoms.TTerm Syntax.RefExpr -> Phantoms.TTerm Syntax.Expression
-refExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refExprMutable :: Phantoms.TTerm Syntax.RefExpr -> Phantoms.TTerm Bool
-refExprMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refExprWithExpr :: Phantoms.TTerm Syntax.RefExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RefExpr
-refExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-refExprWithMutable :: Phantoms.TTerm Syntax.RefExpr -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RefExpr
-refExprWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refPattern :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.RefPattern
-refPattern mutable pattern =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))
-
-refPatternMutable :: Phantoms.TTerm Syntax.RefPattern -> Phantoms.TTerm Bool
-refPatternMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refPatternPattern :: Phantoms.TTerm Syntax.RefPattern -> Phantoms.TTerm Syntax.Pattern
-refPatternPattern x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-        Core.projectionField = (Core.Name "pattern")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-refPatternWithMutable :: Phantoms.TTerm Syntax.RefPattern -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.RefPattern
-refPatternWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-              Core.projectionField = (Core.Name "pattern")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-refPatternWithPattern :: Phantoms.TTerm Syntax.RefPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.RefPattern
-refPatternWithPattern original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.RefPattern"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pattern"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-referenceType :: Phantoms.TTerm (Maybe Syntax.Lifetime) -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ReferenceType
-referenceType lifetime mutable type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lifetime"),
-          Core.fieldTerm = (Phantoms.unTTerm lifetime)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-referenceTypeLifetime :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm (Maybe Syntax.Lifetime)
-referenceTypeLifetime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-        Core.projectionField = (Core.Name "lifetime")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-referenceTypeMutable :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Bool
-referenceTypeMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-referenceTypeType :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.Type
-referenceTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-referenceTypeWithLifetime :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm (Maybe Syntax.Lifetime) -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeWithLifetime original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lifetime"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-referenceTypeWithMutable :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lifetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-              Core.projectionField = (Core.Name "lifetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-referenceTypeWithType :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ReferenceType
-referenceTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lifetime"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-              Core.projectionField = (Core.Name "lifetime")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.ReferenceType"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selfParamOwned :: Phantoms.TTerm Syntax.SelfParam
-selfParamOwned =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.SelfParam"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "owned"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-selfParamRef :: Phantoms.TTerm Syntax.SelfParam
-selfParamRef =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.SelfParam"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-selfParamRefMut :: Phantoms.TTerm Syntax.SelfParam
-selfParamRefMut =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.SelfParam"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refMut"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-statementEmpty :: Phantoms.TTerm Syntax.Statement
-statementEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-statementExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement
-statementExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "expression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementItem :: Phantoms.TTerm Syntax.Item -> Phantoms.TTerm Syntax.Statement
-statementItem x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "item"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementLet :: Phantoms.TTerm Syntax.LetStatement -> Phantoms.TTerm Syntax.Statement
-statementLet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-staticDef :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.StaticDef
-staticDef name type_ value mutable public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm mutable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-staticDefDoc :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm (Maybe String)
-staticDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticDefMutable :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Bool
-staticDefMutable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-        Core.projectionField = (Core.Name "mutable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticDefName :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm String
-staticDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticDefPublic :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Bool
-staticDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticDefType :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Syntax.Type
-staticDefType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticDefValue :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Syntax.Expression
-staticDefValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-staticDefWithDoc :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.StaticDef
-staticDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-staticDefWithMutable :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StaticDef
-staticDefWithMutable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticDefWithName :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StaticDef
-staticDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticDefWithPublic :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StaticDef
-staticDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticDefWithType :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.StaticDef
-staticDefWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-staticDefWithValue :: Phantoms.TTerm Syntax.StaticDef -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.StaticDef
-staticDefWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "mutable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "mutable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StaticDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structBodyNamed :: Phantoms.TTerm [Syntax.StructField] -> Phantoms.TTerm Syntax.StructBody
-structBodyNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.StructBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structBodyTuple :: Phantoms.TTerm [Syntax.TupleField] -> Phantoms.TTerm Syntax.StructBody
-structBodyTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.StructBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structBodyUnit :: Phantoms.TTerm Syntax.StructBody
-structBodyUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.StructBody"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-structDef :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.StructBody -> Phantoms.TTerm [String] -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.StructDef
-structDef name generics whereClause body derives public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Phantoms.unTTerm derives)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-structDefBody :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm Syntax.StructBody
-structDefBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefDerives :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm [String]
-structDefDerives x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "derives")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefDoc :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm (Maybe String)
-structDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefGenerics :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm [Syntax.GenericParam]
-structDefGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefName :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm String
-structDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefPublic :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm Bool
-structDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefWhereClause :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-structDefWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structDefWithBody :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm Syntax.StructBody -> Phantoms.TTerm Syntax.StructDef
-structDefWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDefWithDerives :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.StructDef
-structDefWithDerives original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDefWithDoc :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.StructDef
-structDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structDefWithGenerics :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.StructDef
-structDefWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDefWithName :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StructDef
-structDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDefWithPublic :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StructDef
-structDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structDefWithWhereClause :: Phantoms.TTerm Syntax.StructDef -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.StructDef
-structDefWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "derives"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "derives")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structExpr :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm [Syntax.FieldValue] -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.StructExpr
-structExpr path fields rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-structExprFields :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm [Syntax.FieldValue]
-structExprFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structExprPath :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm Syntax.ExprPath
-structExprPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structExprRest :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm (Maybe Syntax.Expression)
-structExprRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structExprWithFields :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm [Syntax.FieldValue] -> Phantoms.TTerm Syntax.StructExpr
-structExprWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structExprWithPath :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Syntax.StructExpr
-structExprWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structExprWithRest :: Phantoms.TTerm Syntax.StructExpr -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.StructExpr
-structExprWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructExpr"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structField :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.StructField
-structField name type_ public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-structFieldDoc :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm (Maybe String)
-structFieldDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldName :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm String
-structFieldName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldPublic :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm Bool
-structFieldPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldType :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm Syntax.Type
-structFieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structFieldWithDoc :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.StructField
-structFieldWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structFieldWithName :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StructField
-structFieldWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structFieldWithPublic :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StructField
-structFieldWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structFieldWithType :: Phantoms.TTerm Syntax.StructField -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.StructField
-structFieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructField"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structPattern :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm [Syntax.FieldPattern] -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StructPattern
-structPattern path fields rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm fields)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-structPatternFields :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm [Syntax.FieldPattern]
-structPatternFields x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-        Core.projectionField = (Core.Name "fields")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structPatternPath :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm Syntax.ExprPath
-structPatternPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structPatternRest :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm Bool
-structPatternRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structPatternWithFields :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm [Syntax.FieldPattern] -> Phantoms.TTerm Syntax.StructPattern
-structPatternWithFields original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structPatternWithPath :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Syntax.StructPattern
-structPatternWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structPatternWithRest :: Phantoms.TTerm Syntax.StructPattern -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.StructPattern
-structPatternWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.StructPattern"),
-              Core.projectionField = (Core.Name "fields")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traitConst :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitConst
-traitConst name type_ default_ doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-traitConstDefault :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm (Maybe Syntax.Expression)
-traitConstDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitConstDoc :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm (Maybe String)
-traitConstDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitConstName :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm String
-traitConstName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitConstType :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm Syntax.Type
-traitConstType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitConstWithDefault :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm (Maybe Syntax.Expression) -> Phantoms.TTerm Syntax.TraitConst
-traitConstWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitConstWithDoc :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitConst
-traitConstWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traitConstWithName :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TraitConst
-traitConstWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitConstWithType :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TraitConst
-traitConstWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitConst"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDef :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm [Syntax.TraitItem] -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitDef
-traitDef name generics whereClause superTraits items public unsafe doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Phantoms.unTTerm superTraits)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm items)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm unsafe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-traitDefDoc :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm (Maybe String)
-traitDefDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefGenerics :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm [Syntax.GenericParam]
-traitDefGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefItems :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm [Syntax.TraitItem]
-traitDefItems x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "items")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefName :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm String
-traitDefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefPublic :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm Bool
-traitDefPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefSuperTraits :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm [Syntax.TypeParamBound]
-traitDefSuperTraits x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "superTraits")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefUnsafe :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm Bool
-traitDefUnsafe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "unsafe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefWhereClause :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-traitDefWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitDefWithDoc :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traitDefWithGenerics :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDefWithItems :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm [Syntax.TraitItem] -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithItems original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDefWithName :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDefWithPublic :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDefWithSuperTraits :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithSuperTraits original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDefWithUnsafe :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithUnsafe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitDefWithWhereClause :: Phantoms.TTerm Syntax.TraitDef -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.TraitDef
-traitDefWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superTraits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "superTraits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "items"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "items")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "unsafe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "unsafe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitDef"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitItemConst :: Phantoms.TTerm Syntax.TraitConst -> Phantoms.TTerm Syntax.TraitItem
-traitItemConst x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.TraitItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "const"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traitItemMethod :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm Syntax.TraitItem
-traitItemMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.TraitItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traitItemType :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm Syntax.TraitItem
-traitItemType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.TraitItem"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traitMethod :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm [Syntax.MethodParam] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitMethod
-traitMethod name generics whereClause params returnType defaultBody doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm whereClause)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm returnType)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultBody)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-traitMethodDefaultBody :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe Syntax.Block)
-traitMethodDefaultBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "defaultBody")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodDoc :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe String)
-traitMethodDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodGenerics :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm [Syntax.GenericParam]
-traitMethodGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodName :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm String
-traitMethodName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodParams :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm [Syntax.MethodParam]
-traitMethodParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodReturnType :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe Syntax.Type)
-traitMethodReturnType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "returnType")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodWhereClause :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe Syntax.WhereClause)
-traitMethodWhereClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-        Core.projectionField = (Core.Name "whereClause")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitMethodWithDefaultBody :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe Syntax.Block) -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithDefaultBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitMethodWithDoc :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "defaultBody")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traitMethodWithGenerics :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "defaultBody")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitMethodWithName :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "defaultBody")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitMethodWithParams :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm [Syntax.MethodParam] -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "defaultBody")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitMethodWithReturnType :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithReturnType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "whereClause")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "defaultBody")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitMethodWithWhereClause :: Phantoms.TTerm Syntax.TraitMethod -> Phantoms.TTerm (Maybe Syntax.WhereClause) -> Phantoms.TTerm Syntax.TraitMethod
-traitMethodWithWhereClause original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "whereClause"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "returnType"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "returnType")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultBody"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "defaultBody")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitMethod"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitType :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitType
-traitType name bounds default_ doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-traitTypeBounds :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm [Syntax.TypeParamBound]
-traitTypeBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitTypeDefault :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm (Maybe Syntax.Type)
-traitTypeDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitTypeDoc :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm (Maybe String)
-traitTypeDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitTypeName :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm String
-traitTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traitTypeWithBounds :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.TraitType
-traitTypeWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitTypeWithDefault :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.TraitType
-traitTypeWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traitTypeWithDoc :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TraitType
-traitTypeWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traitTypeWithName :: Phantoms.TTerm Syntax.TraitType -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TraitType
-traitTypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TraitType"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tupleField :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TupleField
-tupleField type_ public =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)}]}))
-
-tupleFieldPublic :: Phantoms.TTerm Syntax.TupleField -> Phantoms.TTerm Bool
-tupleFieldPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleFieldType :: Phantoms.TTerm Syntax.TupleField -> Phantoms.TTerm Syntax.Type
-tupleFieldType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleFieldWithPublic :: Phantoms.TTerm Syntax.TupleField -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TupleField
-tupleFieldWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tupleFieldWithType :: Phantoms.TTerm Syntax.TupleField -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TupleField
-tupleFieldWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleField"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tupleIndexExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Int -> Phantoms.TTerm Syntax.TupleIndexExpr
-tupleIndexExpr tuple index =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tuple"),
-          Core.fieldTerm = (Phantoms.unTTerm tuple)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm index)}]}))
-
-tupleIndexExprIndex :: Phantoms.TTerm Syntax.TupleIndexExpr -> Phantoms.TTerm Int
-tupleIndexExprIndex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-        Core.projectionField = (Core.Name "index")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleIndexExprTuple :: Phantoms.TTerm Syntax.TupleIndexExpr -> Phantoms.TTerm Syntax.Expression
-tupleIndexExprTuple x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-        Core.projectionField = (Core.Name "tuple")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleIndexExprWithIndex :: Phantoms.TTerm Syntax.TupleIndexExpr -> Phantoms.TTerm Int -> Phantoms.TTerm Syntax.TupleIndexExpr
-tupleIndexExprWithIndex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tuple"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-              Core.projectionField = (Core.Name "tuple")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tupleIndexExprWithTuple :: Phantoms.TTerm Syntax.TupleIndexExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TupleIndexExpr
-tupleIndexExprWithTuple original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tuple"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "index"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleIndexExpr"),
-              Core.projectionField = (Core.Name "index")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tupleStructPattern :: Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.TupleStructPattern
-tupleStructPattern path elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-tupleStructPatternElements :: Phantoms.TTerm Syntax.TupleStructPattern -> Phantoms.TTerm [Syntax.Pattern]
-tupleStructPatternElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleStructPatternPath :: Phantoms.TTerm Syntax.TupleStructPattern -> Phantoms.TTerm Syntax.ExprPath
-tupleStructPatternPath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tupleStructPatternWithElements :: Phantoms.TTerm Syntax.TupleStructPattern -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.TupleStructPattern
-tupleStructPatternWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tupleStructPatternWithPath :: Phantoms.TTerm Syntax.TupleStructPattern -> Phantoms.TTerm Syntax.ExprPath -> Phantoms.TTerm Syntax.TupleStructPattern
-tupleStructPatternWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TupleStructPattern"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAlias :: Phantoms.TTerm String -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TypeAlias
-typeAlias name generics type_ public doc =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm generics)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm doc)}]}))
-
-typeAliasDoc :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm (Maybe String)
-typeAliasDoc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "doc")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasGenerics :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm [Syntax.GenericParam]
-typeAliasGenerics x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "generics")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasName :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm String
-typeAliasName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasPublic :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Bool
-typeAliasPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasType :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Type
-typeAliasType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAliasWithDoc :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithDoc original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeAliasWithGenerics :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm [Syntax.GenericParam] -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithGenerics original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAliasWithName :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAliasWithPublic :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAliasWithType :: Phantoms.TTerm Syntax.TypeAlias -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeAlias
-typeAliasWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "generics"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "generics")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "doc"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAlias"),
-              Core.projectionField = (Core.Name "doc")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeArray :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.Type
-typeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeAscriptionExpr :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeAscriptionExpr
-typeAscriptionExpr expr type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeAscriptionExprExpr :: Phantoms.TTerm Syntax.TypeAscriptionExpr -> Phantoms.TTerm Syntax.Expression
-typeAscriptionExprExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAscriptionExprType :: Phantoms.TTerm Syntax.TypeAscriptionExpr -> Phantoms.TTerm Syntax.Type
-typeAscriptionExprType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeAscriptionExprWithExpr :: Phantoms.TTerm Syntax.TypeAscriptionExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeAscriptionExpr
-typeAscriptionExprWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeAscriptionExprWithType :: Phantoms.TTerm Syntax.TypeAscriptionExpr -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeAscriptionExpr
-typeAscriptionExprWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeAscriptionExpr"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeBinding :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeBinding
-typeBinding name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-typeBindingName :: Phantoms.TTerm Syntax.TypeBinding -> Phantoms.TTerm String
-typeBindingName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBindingType :: Phantoms.TTerm Syntax.TypeBinding -> Phantoms.TTerm Syntax.Type
-typeBindingType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBindingWithName :: Phantoms.TTerm Syntax.TypeBinding -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.TypeBinding
-typeBindingWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeBindingWithType :: Phantoms.TTerm Syntax.TypeBinding -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeBinding
-typeBindingWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypeBinding"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeDynTrait :: Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.Type
-typeDynTrait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dynTrait"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeFnPointer :: Phantoms.TTerm Syntax.FnPointerType -> Phantoms.TTerm Syntax.Type
-typeFnPointer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fnPointer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeImplTrait :: Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.Type
-typeImplTrait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implTrait"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeInferred :: Phantoms.TTerm Syntax.Type
-typeInferred =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inferred"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeMacro :: Phantoms.TTerm Syntax.MacroInvocation -> Phantoms.TTerm Syntax.Type
-typeMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNever :: Phantoms.TTerm Syntax.Type
-typeNever =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "never"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeParamBoundLifetime :: Phantoms.TTerm Syntax.Lifetime -> Phantoms.TTerm Syntax.TypeParamBound
-typeParamBoundLifetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.TypeParamBound"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lifetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeParamBoundTrait :: Phantoms.TTerm Syntax.TypePath -> Phantoms.TTerm Syntax.TypeParamBound
-typeParamBoundTrait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.TypeParamBound"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trait"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typePath :: Phantoms.TTerm Syntax.TypePath -> Phantoms.TTerm Syntax.Type
-typePath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typePathGlobal :: Phantoms.TTerm Syntax.TypePath -> Phantoms.TTerm Bool
-typePathGlobal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-        Core.projectionField = (Core.Name "global")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typePathSegments :: Phantoms.TTerm Syntax.TypePath -> Phantoms.TTerm [Syntax.PathSegment]
-typePathSegments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-        Core.projectionField = (Core.Name "segments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typePathWithGlobal :: Phantoms.TTerm Syntax.TypePath -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.TypePath
-typePathWithGlobal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "global"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-              Core.projectionField = (Core.Name "segments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typePathWithSegments :: Phantoms.TTerm Syntax.TypePath -> Phantoms.TTerm [Syntax.PathSegment] -> Phantoms.TTerm Syntax.TypePath
-typePathWithSegments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "global"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-              Core.projectionField = (Core.Name "global")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typePath_ :: Phantoms.TTerm Bool -> Phantoms.TTerm [Syntax.PathSegment] -> Phantoms.TTerm Syntax.TypePath
-typePath_ global segments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.TypePath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "global"),
-          Core.fieldTerm = (Phantoms.unTTerm global)},
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Phantoms.unTTerm segments)}]}))
-
-typeRawPointer :: Phantoms.TTerm Syntax.RawPointerType -> Phantoms.TTerm Syntax.Type
-typeRawPointer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rawPointer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeReference :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.Type
-typeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeSlice :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type
-typeSlice x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "slice"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeTuple :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type
-typeTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeUnit :: Phantoms.TTerm Syntax.Type
-typeUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryExpr :: Phantoms.TTerm Syntax.UnaryOp -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UnaryExpr
-unaryExpr op operand =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm operand)}]}))
-
-unaryExprOp :: Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.UnaryOp
-unaryExprOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExprOperand :: Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.Expression
-unaryExprOperand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-        Core.projectionField = (Core.Name "operand")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryExprWithOp :: Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.UnaryOp -> Phantoms.TTerm Syntax.UnaryExpr
-unaryExprWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-              Core.projectionField = (Core.Name "operand")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryExprWithOperand :: Phantoms.TTerm Syntax.UnaryExpr -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UnaryExpr
-unaryExprWithOperand original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UnaryExpr"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "operand"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryOpNeg :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpNeg =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "neg"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unaryOpNot :: Phantoms.TTerm Syntax.UnaryOp
-unaryOpNot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.UnaryOp"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-useDeclaration :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.UseTree -> Phantoms.TTerm Syntax.UseDeclaration
-useDeclaration public tree =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm public)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tree"),
-          Core.fieldTerm = (Phantoms.unTTerm tree)}]}))
-
-useDeclarationPublic :: Phantoms.TTerm Syntax.UseDeclaration -> Phantoms.TTerm Bool
-useDeclarationPublic x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-        Core.projectionField = (Core.Name "public")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-useDeclarationTree :: Phantoms.TTerm Syntax.UseDeclaration -> Phantoms.TTerm Syntax.UseTree
-useDeclarationTree x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-        Core.projectionField = (Core.Name "tree")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-useDeclarationWithPublic :: Phantoms.TTerm Syntax.UseDeclaration -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.UseDeclaration
-useDeclarationWithPublic original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tree"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-              Core.projectionField = (Core.Name "tree")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-useDeclarationWithTree :: Phantoms.TTerm Syntax.UseDeclaration -> Phantoms.TTerm Syntax.UseTree -> Phantoms.TTerm Syntax.UseDeclaration
-useDeclarationWithTree original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "public"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseDeclaration"),
-              Core.projectionField = (Core.Name "public")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tree"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-useGroup :: Phantoms.TTerm [String] -> Phantoms.TTerm [Syntax.UseTree] -> Phantoms.TTerm Syntax.UseGroup
-useGroup prefix trees =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm prefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trees"),
-          Core.fieldTerm = (Phantoms.unTTerm trees)}]}))
-
-useGroupPrefix :: Phantoms.TTerm Syntax.UseGroup -> Phantoms.TTerm [String]
-useGroupPrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-        Core.projectionField = (Core.Name "prefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-useGroupTrees :: Phantoms.TTerm Syntax.UseGroup -> Phantoms.TTerm [Syntax.UseTree]
-useGroupTrees x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-        Core.projectionField = (Core.Name "trees")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-useGroupWithPrefix :: Phantoms.TTerm Syntax.UseGroup -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.UseGroup
-useGroupWithPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "trees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-              Core.projectionField = (Core.Name "trees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-useGroupWithTrees :: Phantoms.TTerm Syntax.UseGroup -> Phantoms.TTerm [Syntax.UseTree] -> Phantoms.TTerm Syntax.UseGroup
-useGroupWithTrees original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseGroup"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "trees"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-usePath :: Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.UsePath
-usePath segments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UsePath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Phantoms.unTTerm segments)}]}))
-
-usePathSegments :: Phantoms.TTerm Syntax.UsePath -> Phantoms.TTerm [String]
-usePathSegments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UsePath"),
-        Core.projectionField = (Core.Name "segments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-usePathWithSegments :: Phantoms.TTerm Syntax.UsePath -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.UsePath
-usePathWithSegments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UsePath"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "segments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-useRename :: Phantoms.TTerm [String] -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.UseRename
-useRename path alias =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm alias)}]}))
-
-useRenameAlias :: Phantoms.TTerm Syntax.UseRename -> Phantoms.TTerm String
-useRenameAlias x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-        Core.projectionField = (Core.Name "alias")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-useRenamePath :: Phantoms.TTerm Syntax.UseRename -> Phantoms.TTerm [String]
-useRenamePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-useRenameWithAlias :: Phantoms.TTerm Syntax.UseRename -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.UseRename
-useRenameWithAlias original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-useRenameWithPath :: Phantoms.TTerm Syntax.UseRename -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.UseRename
-useRenameWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alias"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.UseRename"),
-              Core.projectionField = (Core.Name "alias")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-useTreeGlob :: Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.UseTree
-useTreeGlob x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.UseTree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "glob"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-useTreeGroup :: Phantoms.TTerm Syntax.UseGroup -> Phantoms.TTerm Syntax.UseTree
-useTreeGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.UseTree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-useTreePath :: Phantoms.TTerm Syntax.UsePath -> Phantoms.TTerm Syntax.UseTree
-useTreePath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.UseTree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-useTreeRename :: Phantoms.TTerm Syntax.UseRename -> Phantoms.TTerm Syntax.UseTree
-useTreeRename x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.UseTree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rename"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-visibilityCrate :: Phantoms.TTerm Syntax.Visibility
-visibilityCrate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Visibility"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "crate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-visibilityPrivate :: Phantoms.TTerm Syntax.Visibility
-visibilityPrivate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Visibility"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-visibilityPublic :: Phantoms.TTerm Syntax.Visibility
-visibilityPublic =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Visibility"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "public"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-visibilityRestricted :: Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.Visibility
-visibilityRestricted x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.rust.syntax.Visibility"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "restricted"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whereClause :: Phantoms.TTerm [Syntax.WherePredicate] -> Phantoms.TTerm Syntax.WhereClause
-whereClause predicates =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WhereClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicates"),
-          Core.fieldTerm = (Phantoms.unTTerm predicates)}]}))
-
-whereClausePredicates :: Phantoms.TTerm Syntax.WhereClause -> Phantoms.TTerm [Syntax.WherePredicate]
-whereClausePredicates x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhereClause"),
-        Core.projectionField = (Core.Name "predicates")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whereClauseWithPredicates :: Phantoms.TTerm Syntax.WhereClause -> Phantoms.TTerm [Syntax.WherePredicate] -> Phantoms.TTerm Syntax.WhereClause
-whereClauseWithPredicates original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WhereClause"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicates"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-wherePredicate :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.WherePredicate
-wherePredicate type_ bounds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)}]}))
-
-wherePredicateBounds :: Phantoms.TTerm Syntax.WherePredicate -> Phantoms.TTerm [Syntax.TypeParamBound]
-wherePredicateBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-wherePredicateType :: Phantoms.TTerm Syntax.WherePredicate -> Phantoms.TTerm Syntax.Type
-wherePredicateType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-wherePredicateWithBounds :: Phantoms.TTerm Syntax.WherePredicate -> Phantoms.TTerm [Syntax.TypeParamBound] -> Phantoms.TTerm Syntax.WherePredicate
-wherePredicateWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-wherePredicateWithType :: Phantoms.TTerm Syntax.WherePredicate -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.WherePredicate
-wherePredicateWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WherePredicate"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whileExpr :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.IfCondition -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.WhileExpr
-whileExpr label condition body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm condition)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-whileExprBody :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm Syntax.Block
-whileExprBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileExprCondition :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm Syntax.IfCondition
-whileExprCondition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-        Core.projectionField = (Core.Name "condition")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileExprLabel :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm (Maybe String)
-whileExprLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whileExprWithBody :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm Syntax.Block -> Phantoms.TTerm Syntax.WhileExpr
-whileExprWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-      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.rust.syntax.WhileExpr"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-whileExprWithCondition :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm Syntax.IfCondition -> Phantoms.TTerm Syntax.WhileExpr
-whileExprWithCondition original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-      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.rust.syntax.WhileExpr"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whileExprWithLabel :: Phantoms.TTerm Syntax.WhileExpr -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.WhileExpr
-whileExprWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "condition"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-              Core.projectionField = (Core.Name "condition")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.rust.syntax.WhileExpr"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Scala/Syntax.hs b/src/main/haskell/Hydra/Dsl/Scala/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Scala/Syntax.hs
+++ /dev/null
@@ -1,11608 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.scala.syntax
-
-module Hydra.Dsl.Scala.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Scala.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Int as I
-
-case_ :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Case
-case_ pat cond body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Case"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm pat)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-caseBody :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm Syntax.Data
-caseBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseCond :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm (Maybe Syntax.Data)
-caseCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-casePat :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm Syntax.Pat
-casePat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-        Core.projectionField = (Core.Name "pat")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-caseTreeCase :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm Syntax.CaseTree
-caseTreeCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.CaseTree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseTreeTypeCase :: Phantoms.TTerm Syntax.TypeCase -> Phantoms.TTerm Syntax.CaseTree
-caseTreeTypeCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.CaseTree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeCase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-caseWithBody :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Case
-caseWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Case"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-              Core.projectionField = (Core.Name "pat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseWithCond :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Case
-caseWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Case"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-              Core.projectionField = (Core.Name "pat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-caseWithPat :: Phantoms.TTerm Syntax.Case -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Case
-caseWithPat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Case"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Case"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctorPrimary :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Ctor
-ctorPrimary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Ctor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ctorSecondary :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm Syntax.Ctor
-ctorSecondary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Ctor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "secondary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ctor_Primary :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Ctor_Primary
-ctor_Primary mods name paramss =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm paramss)}]}))
-
-ctor_PrimaryMods :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm [Syntax.Mod]
-ctor_PrimaryMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_PrimaryName :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Name
-ctor_PrimaryName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_PrimaryParamss :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm [[Syntax.Data_Param]]
-ctor_PrimaryParamss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-        Core.projectionField = (Core.Name "paramss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_PrimaryWithMods :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Ctor_Primary
-ctor_PrimaryWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctor_PrimaryWithName :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Ctor_Primary
-ctor_PrimaryWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctor_PrimaryWithParamss :: Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Ctor_Primary
-ctor_PrimaryWithParamss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Primary"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ctor_Secondary :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Init -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Ctor_Secondary
-ctor_Secondary mods name paramss init stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm paramss)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-ctor_SecondaryInit :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm Syntax.Init
-ctor_SecondaryInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_SecondaryMods :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm [Syntax.Mod]
-ctor_SecondaryMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_SecondaryName :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm Syntax.Name
-ctor_SecondaryName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_SecondaryParamss :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm [[Syntax.Data_Param]]
-ctor_SecondaryParamss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-        Core.projectionField = (Core.Name "paramss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_SecondaryStats :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm [Syntax.Stat]
-ctor_SecondaryStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-ctor_SecondaryWithInit :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Ctor_Secondary
-ctor_SecondaryWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctor_SecondaryWithMods :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Ctor_Secondary
-ctor_SecondaryWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctor_SecondaryWithName :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Ctor_Secondary
-ctor_SecondaryWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctor_SecondaryWithParamss :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Ctor_Secondary
-ctor_SecondaryWithParamss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-ctor_SecondaryWithStats :: Phantoms.TTerm Syntax.Ctor_Secondary -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Ctor_Secondary
-ctor_SecondaryWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Ctor_Secondary"),
-              Core.projectionField = (Core.Name "init")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dataAnnotate :: Phantoms.TTerm Syntax.Data_Annotate -> Phantoms.TTerm Syntax.Data
-dataAnnotate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataApply :: Phantoms.TTerm Syntax.Data_Apply -> Phantoms.TTerm Syntax.Data
-dataApply x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "apply"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataApplyType :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm Syntax.Data
-dataApplyType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applyType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataApplyUsing :: Phantoms.TTerm Syntax.Data_ApplyUsing -> Phantoms.TTerm Syntax.Data
-dataApplyUsing x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applyUsing"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataAscribe :: Phantoms.TTerm Syntax.Data_Ascribe -> Phantoms.TTerm Syntax.Data
-dataAscribe x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ascribe"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataAssign :: Phantoms.TTerm Syntax.Data_Assign -> Phantoms.TTerm Syntax.Data
-dataAssign x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assign"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataBlock :: Phantoms.TTerm Syntax.Data_Block -> Phantoms.TTerm Syntax.Data
-dataBlock x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "block"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataDo :: Phantoms.TTerm Syntax.Data_Do -> Phantoms.TTerm Syntax.Data
-dataDo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "do"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataEndMarker :: Phantoms.TTerm Syntax.Data_EndMarker -> Phantoms.TTerm Syntax.Data
-dataEndMarker x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endMarker"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataEta :: Phantoms.TTerm Syntax.Data_Eta -> Phantoms.TTerm Syntax.Data
-dataEta x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eta"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataFor :: Phantoms.TTerm Syntax.Data_For -> Phantoms.TTerm Syntax.Data
-dataFor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "for"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataForYield :: Phantoms.TTerm Syntax.Data_ForYield -> Phantoms.TTerm Syntax.Data
-dataForYield x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forYield"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataFunctionData :: Phantoms.TTerm Syntax.Data_FunctionData -> Phantoms.TTerm Syntax.Data
-dataFunctionData x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionData"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataIf :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data
-dataIf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "if"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataInterpolate :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm Syntax.Data
-dataInterpolate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interpolate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataLit :: Phantoms.TTerm Syntax.Lit -> Phantoms.TTerm Syntax.Data
-dataLit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataMatch :: Phantoms.TTerm Syntax.Data_Match -> Phantoms.TTerm Syntax.Data
-dataMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataNew :: Phantoms.TTerm Syntax.Data_New -> Phantoms.TTerm Syntax.Data
-dataNew x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataNewAnonymous :: Phantoms.TTerm Syntax.Data_NewAnonymous -> Phantoms.TTerm Syntax.Data
-dataNewAnonymous x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "newAnonymous"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataParam :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm Syntax.Data
-dataParam x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "param"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPartialFunction :: Phantoms.TTerm Syntax.Data_PartialFunction -> Phantoms.TTerm Syntax.Data
-dataPartialFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "partialFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataPlaceholder :: Phantoms.TTerm Syntax.Data
-dataPlaceholder =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "placeholder"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dataPolyFunction :: Phantoms.TTerm Syntax.Data_PolyFunction -> Phantoms.TTerm Syntax.Data
-dataPolyFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "polyFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataQuotedMacroExpr :: Phantoms.TTerm Syntax.Data_QuotedMacroExpr -> Phantoms.TTerm Syntax.Data
-dataQuotedMacroExpr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quotedMacroExpr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataQuotedMacroType :: Phantoms.TTerm Syntax.Data_QuotedMacroType -> Phantoms.TTerm Syntax.Data
-dataQuotedMacroType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quotedMacroType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRef :: Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Data
-dataRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataRepeated :: Phantoms.TTerm Syntax.Data_Repeated -> Phantoms.TTerm Syntax.Data
-dataRepeated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataReturn :: Phantoms.TTerm Syntax.Data_Return -> Phantoms.TTerm Syntax.Data
-dataReturn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "return"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataSplicedMacroExpr :: Phantoms.TTerm Syntax.Data_SplicedMacroExpr -> Phantoms.TTerm Syntax.Data
-dataSplicedMacroExpr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "splicedMacroExpr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataThrow :: Phantoms.TTerm Syntax.Data_Throw -> Phantoms.TTerm Syntax.Data
-dataThrow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "throw"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTry :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm Syntax.Data
-dataTry x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "try"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTryWithHandler :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm Syntax.Data
-dataTryWithHandler x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tryWithHandler"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTuple :: Phantoms.TTerm Syntax.Data_Tuple -> Phantoms.TTerm Syntax.Data
-dataTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataWhile :: Phantoms.TTerm Syntax.Data_While -> Phantoms.TTerm Syntax.Data
-dataWhile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "while"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataXml :: Phantoms.TTerm Syntax.Data_Xml -> Phantoms.TTerm Syntax.Data
-dataXml x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xml"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_Annotate :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm [Syntax.Mod_Annot] -> Phantoms.TTerm Syntax.Data_Annotate
-data_Annotate expr annots =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annots"),
-          Core.fieldTerm = (Phantoms.unTTerm annots)}]}))
-
-data_AnnotateAnnots :: Phantoms.TTerm Syntax.Data_Annotate -> Phantoms.TTerm [Syntax.Mod_Annot]
-data_AnnotateAnnots x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-        Core.projectionField = (Core.Name "annots")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_AnnotateExpr :: Phantoms.TTerm Syntax.Data_Annotate -> Phantoms.TTerm Syntax.Data
-data_AnnotateExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_AnnotateWithAnnots :: Phantoms.TTerm Syntax.Data_Annotate -> Phantoms.TTerm [Syntax.Mod_Annot] -> Phantoms.TTerm Syntax.Data_Annotate
-data_AnnotateWithAnnots original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annots"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_AnnotateWithExpr :: Phantoms.TTerm Syntax.Data_Annotate -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Annotate
-data_AnnotateWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annots"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Annotate"),
-              Core.projectionField = (Core.Name "annots")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Anonymous :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.Data_Anonymous
-data_Anonymous x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.scala.syntax.Data_Anonymous"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-data_Apply :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Apply
-data_Apply fun args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Phantoms.unTTerm fun)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-data_ApplyArgs :: Phantoms.TTerm Syntax.Data_Apply -> Phantoms.TTerm [Syntax.Data]
-data_ApplyArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyFun :: Phantoms.TTerm Syntax.Data_Apply -> Phantoms.TTerm Syntax.Data
-data_ApplyFun x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-        Core.projectionField = (Core.Name "fun")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyInfix :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_ApplyInfix
-data_ApplyInfix lhs op targs args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Phantoms.unTTerm targs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-data_ApplyInfixArgs :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm [Syntax.Data]
-data_ApplyInfixArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyInfixLhs :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm Syntax.Data
-data_ApplyInfixLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyInfixOp :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm Syntax.Data_Name
-data_ApplyInfixOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyInfixTargs :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm [Syntax.Type]
-data_ApplyInfixTargs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-        Core.projectionField = (Core.Name "targs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyInfixWithArgs :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_ApplyInfix
-data_ApplyInfixWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ApplyInfixWithLhs :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ApplyInfix
-data_ApplyInfixWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyInfixWithOp :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_ApplyInfix
-data_ApplyInfixWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyInfixWithTargs :: Phantoms.TTerm Syntax.Data_ApplyInfix -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Data_ApplyInfix
-data_ApplyInfixWithTargs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyInfix"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyType :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_ApplyType
-data_ApplyType lhs op targs args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Phantoms.unTTerm targs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-data_ApplyTypeArgs :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm [Syntax.Data]
-data_ApplyTypeArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyTypeLhs :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm Syntax.Data
-data_ApplyTypeLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyTypeOp :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm Syntax.Data_Name
-data_ApplyTypeOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyTypeTargs :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm [Syntax.Type]
-data_ApplyTypeTargs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-        Core.projectionField = (Core.Name "targs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyTypeWithArgs :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_ApplyType
-data_ApplyTypeWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ApplyTypeWithLhs :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ApplyType
-data_ApplyTypeWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyTypeWithOp :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_ApplyType
-data_ApplyTypeWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyTypeWithTargs :: Phantoms.TTerm Syntax.Data_ApplyType -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Data_ApplyType
-data_ApplyTypeWithTargs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyType"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyUnary :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ApplyUnary
-data_ApplyUnary op arg =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arg"),
-          Core.fieldTerm = (Phantoms.unTTerm arg)}]}))
-
-data_ApplyUnaryArg :: Phantoms.TTerm Syntax.Data_ApplyUnary -> Phantoms.TTerm Syntax.Data
-data_ApplyUnaryArg x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-        Core.projectionField = (Core.Name "arg")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyUnaryOp :: Phantoms.TTerm Syntax.Data_ApplyUnary -> Phantoms.TTerm Syntax.Data_Name
-data_ApplyUnaryOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyUnaryWithArg :: Phantoms.TTerm Syntax.Data_ApplyUnary -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ApplyUnary
-data_ApplyUnaryWithArg original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arg"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ApplyUnaryWithOp :: Phantoms.TTerm Syntax.Data_ApplyUnary -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_ApplyUnary
-data_ApplyUnaryWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUnary"),
-              Core.projectionField = (Core.Name "arg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyUsing :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_ApplyUsing
-data_ApplyUsing fun targs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Phantoms.unTTerm fun)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Phantoms.unTTerm targs)}]}))
-
-data_ApplyUsingFun :: Phantoms.TTerm Syntax.Data_ApplyUsing -> Phantoms.TTerm Syntax.Data
-data_ApplyUsingFun x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-        Core.projectionField = (Core.Name "fun")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyUsingTargs :: Phantoms.TTerm Syntax.Data_ApplyUsing -> Phantoms.TTerm [Syntax.Data]
-data_ApplyUsingTargs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-        Core.projectionField = (Core.Name "targs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ApplyUsingWithFun :: Phantoms.TTerm Syntax.Data_ApplyUsing -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ApplyUsing
-data_ApplyUsingWithFun original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-              Core.projectionField = (Core.Name "targs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ApplyUsingWithTargs :: Phantoms.TTerm Syntax.Data_ApplyUsing -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_ApplyUsing
-data_ApplyUsingWithTargs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ApplyUsing"),
-              Core.projectionField = (Core.Name "fun")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ApplyWithArgs :: Phantoms.TTerm Syntax.Data_Apply -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Apply
-data_ApplyWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-              Core.projectionField = (Core.Name "fun")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ApplyWithFun :: Phantoms.TTerm Syntax.Data_Apply -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Apply
-data_ApplyWithFun original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Apply"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Ascribe :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Data_Ascribe
-data_Ascribe expr tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-data_AscribeExpr :: Phantoms.TTerm Syntax.Data_Ascribe -> Phantoms.TTerm Syntax.Data
-data_AscribeExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_AscribeTpe :: Phantoms.TTerm Syntax.Data_Ascribe -> Phantoms.TTerm Syntax.Type
-data_AscribeTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_AscribeWithExpr :: Phantoms.TTerm Syntax.Data_Ascribe -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Ascribe
-data_AscribeWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_AscribeWithTpe :: Phantoms.TTerm Syntax.Data_Ascribe -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Data_Ascribe
-data_AscribeWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ascribe"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Assign :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Assign
-data_Assign lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-data_AssignLhs :: Phantoms.TTerm Syntax.Data_Assign -> Phantoms.TTerm Syntax.Data
-data_AssignLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_AssignRhs :: Phantoms.TTerm Syntax.Data_Assign -> Phantoms.TTerm Syntax.Data
-data_AssignRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_AssignWithLhs :: Phantoms.TTerm Syntax.Data_Assign -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Assign
-data_AssignWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_AssignWithRhs :: Phantoms.TTerm Syntax.Data_Assign -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Assign
-data_AssignWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Assign"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Block :: Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Data_Block
-data_Block stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Block"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-data_BlockStats :: Phantoms.TTerm Syntax.Data_Block -> Phantoms.TTerm [Syntax.Stat]
-data_BlockStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Block"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_BlockWithStats :: Phantoms.TTerm Syntax.Data_Block -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Data_Block
-data_BlockWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Block"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ContextFunction :: Phantoms.TTerm [Syntax.Data_Param] -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ContextFunction
-data_ContextFunction params body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-data_ContextFunctionBody :: Phantoms.TTerm Syntax.Data_ContextFunction -> Phantoms.TTerm Syntax.Data
-data_ContextFunctionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ContextFunctionParams :: Phantoms.TTerm Syntax.Data_ContextFunction -> Phantoms.TTerm [Syntax.Data_Param]
-data_ContextFunctionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ContextFunctionWithBody :: Phantoms.TTerm Syntax.Data_ContextFunction -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_ContextFunction
-data_ContextFunctionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ContextFunctionWithParams :: Phantoms.TTerm Syntax.Data_ContextFunction -> Phantoms.TTerm [Syntax.Data_Param] -> Phantoms.TTerm Syntax.Data_ContextFunction
-data_ContextFunctionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ContextFunction"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Do :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Do
-data_Do body expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-data_DoBody :: Phantoms.TTerm Syntax.Data_Do -> Phantoms.TTerm Syntax.Data
-data_DoBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_DoExpr :: Phantoms.TTerm Syntax.Data_Do -> Phantoms.TTerm Syntax.Data
-data_DoExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_DoWithBody :: Phantoms.TTerm Syntax.Data_Do -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Do
-data_DoWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_DoWithExpr :: Phantoms.TTerm Syntax.Data_Do -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Do
-data_DoWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Do"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_EndMarker :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_EndMarker
-data_EndMarker name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_EndMarker"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-data_EndMarkerName :: Phantoms.TTerm Syntax.Data_EndMarker -> Phantoms.TTerm Syntax.Data_Name
-data_EndMarkerName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_EndMarker"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_EndMarkerWithName :: Phantoms.TTerm Syntax.Data_EndMarker -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_EndMarker
-data_EndMarkerWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_EndMarker"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Eta :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Eta
-data_Eta expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Eta"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-data_EtaExpr :: Phantoms.TTerm Syntax.Data_Eta -> Phantoms.TTerm Syntax.Data
-data_EtaExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Eta"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_EtaWithExpr :: Phantoms.TTerm Syntax.Data_Eta -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Eta
-data_EtaWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Eta"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_For :: Phantoms.TTerm [Syntax.Enumerator] -> Phantoms.TTerm Syntax.Data_For
-data_For enums =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_For"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "enums"),
-          Core.fieldTerm = (Phantoms.unTTerm enums)}]}))
-
-data_ForEnums :: Phantoms.TTerm Syntax.Data_For -> Phantoms.TTerm [Syntax.Enumerator]
-data_ForEnums x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_For"),
-        Core.projectionField = (Core.Name "enums")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ForWithEnums :: Phantoms.TTerm Syntax.Data_For -> Phantoms.TTerm [Syntax.Enumerator] -> Phantoms.TTerm Syntax.Data_For
-data_ForWithEnums original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_For"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "enums"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ForYield :: Phantoms.TTerm [Syntax.Enumerator] -> Phantoms.TTerm Syntax.Data_ForYield
-data_ForYield enums =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ForYield"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "enums"),
-          Core.fieldTerm = (Phantoms.unTTerm enums)}]}))
-
-data_ForYieldEnums :: Phantoms.TTerm Syntax.Data_ForYield -> Phantoms.TTerm [Syntax.Enumerator]
-data_ForYieldEnums x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_ForYield"),
-        Core.projectionField = (Core.Name "enums")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ForYieldWithEnums :: Phantoms.TTerm Syntax.Data_ForYield -> Phantoms.TTerm [Syntax.Enumerator] -> Phantoms.TTerm Syntax.Data_ForYield
-data_ForYieldWithEnums original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_ForYield"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "enums"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Function :: Phantoms.TTerm [Syntax.Data_Param] -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Function
-data_Function params body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-data_FunctionBody :: Phantoms.TTerm Syntax.Data_Function -> Phantoms.TTerm Syntax.Data
-data_FunctionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_FunctionDataContextFunction :: Phantoms.TTerm Syntax.Data_ContextFunction -> Phantoms.TTerm Syntax.Data_FunctionData
-data_FunctionDataContextFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_FunctionData"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "contextFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_FunctionDataFunction :: Phantoms.TTerm Syntax.Data_Function -> Phantoms.TTerm Syntax.Data_FunctionData
-data_FunctionDataFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_FunctionData"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_FunctionParams :: Phantoms.TTerm Syntax.Data_Function -> Phantoms.TTerm [Syntax.Data_Param]
-data_FunctionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_FunctionWithBody :: Phantoms.TTerm Syntax.Data_Function -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Function
-data_FunctionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_FunctionWithParams :: Phantoms.TTerm Syntax.Data_Function -> Phantoms.TTerm [Syntax.Data_Param] -> Phantoms.TTerm Syntax.Data_Function
-data_FunctionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Function"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_If :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_If
-data_If cond thenp elsep =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenp"),
-          Core.fieldTerm = (Phantoms.unTTerm thenp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elsep"),
-          Core.fieldTerm = (Phantoms.unTTerm elsep)}]}))
-
-data_IfCond :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data
-data_IfCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_IfElsep :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data
-data_IfElsep x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-        Core.projectionField = (Core.Name "elsep")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_IfThenp :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data
-data_IfThenp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-        Core.projectionField = (Core.Name "thenp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_IfWithCond :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_If
-data_IfWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-              Core.projectionField = (Core.Name "thenp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elsep"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-              Core.projectionField = (Core.Name "elsep")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_IfWithElsep :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_If
-data_IfWithElsep original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-              Core.projectionField = (Core.Name "thenp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elsep"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_IfWithThenp :: Phantoms.TTerm Syntax.Data_If -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_If
-data_IfWithThenp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-              Core.projectionField = (Core.Name "cond")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "thenp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elsep"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_If"),
-              Core.projectionField = (Core.Name "elsep")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Interpolate :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Interpolate
-data_Interpolate prefix parts args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm prefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm parts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-data_InterpolateArgs :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm [Syntax.Data]
-data_InterpolateArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_InterpolateParts :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm [Syntax.Lit]
-data_InterpolateParts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-        Core.projectionField = (Core.Name "parts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_InterpolatePrefix :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm Syntax.Data_Name
-data_InterpolatePrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-        Core.projectionField = (Core.Name "prefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_InterpolateWithArgs :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Interpolate
-data_InterpolateWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_InterpolateWithParts :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm Syntax.Data_Interpolate
-data_InterpolateWithParts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_InterpolateWithPrefix :: Phantoms.TTerm Syntax.Data_Interpolate -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_Interpolate
-data_InterpolateWithPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Interpolate"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Match :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm [Syntax.Case] -> Phantoms.TTerm Syntax.Data_Match
-data_Match expr cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-data_MatchCases :: Phantoms.TTerm Syntax.Data_Match -> Phantoms.TTerm [Syntax.Case]
-data_MatchCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_MatchExpr :: Phantoms.TTerm Syntax.Data_Match -> Phantoms.TTerm Syntax.Data
-data_MatchExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_MatchWithCases :: Phantoms.TTerm Syntax.Data_Match -> Phantoms.TTerm [Syntax.Case] -> Phantoms.TTerm Syntax.Data_Match
-data_MatchWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_MatchWithExpr :: Phantoms.TTerm Syntax.Data_Match -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Match
-data_MatchWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Match"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Name :: Phantoms.TTerm Syntax.PredefString -> Phantoms.TTerm Syntax.Data_Name
-data_Name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Name"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-data_NameValue :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.PredefString
-data_NameValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Name"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_NameWithValue :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.PredefString -> Phantoms.TTerm Syntax.Data_Name
-data_NameWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Name"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_New :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Data_New
-data_New init =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_New"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)}]}))
-
-data_NewAnonymous :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Data_NewAnonymous
-data_NewAnonymous templ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_NewAnonymous"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Phantoms.unTTerm templ)}]}))
-
-data_NewAnonymousTempl :: Phantoms.TTerm Syntax.Data_NewAnonymous -> Phantoms.TTerm Syntax.Template
-data_NewAnonymousTempl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_NewAnonymous"),
-        Core.projectionField = (Core.Name "templ")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_NewAnonymousWithTempl :: Phantoms.TTerm Syntax.Data_NewAnonymous -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Data_NewAnonymous
-data_NewAnonymousWithTempl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_NewAnonymous"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_NewInit :: Phantoms.TTerm Syntax.Data_New -> Phantoms.TTerm Syntax.Init
-data_NewInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_New"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_NewWithInit :: Phantoms.TTerm Syntax.Data_New -> Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Data_New
-data_NewWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_New"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Param :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data_Param
-data_Param mods name decltpe default_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm default_)}]}))
-
-data_ParamDecltpe :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm (Maybe Syntax.Type)
-data_ParamDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ParamDefault :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm (Maybe Syntax.Data)
-data_ParamDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-        Core.projectionField = (Core.Name "default")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ParamMods :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm [Syntax.Mod]
-data_ParamMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ParamName :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm Syntax.Name
-data_ParamName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ParamWithDecltpe :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Data_Param
-data_ParamWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ParamWithDefault :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data_Param
-data_ParamWithDefault original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_ParamWithMods :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Param
-data_ParamWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_ParamWithName :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Data_Param
-data_ParamWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Param"),
-              Core.projectionField = (Core.Name "default")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_PartialFunction :: Phantoms.TTerm [Syntax.Case] -> Phantoms.TTerm Syntax.Data_PartialFunction
-data_PartialFunction cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_PartialFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-data_PartialFunctionCases :: Phantoms.TTerm Syntax.Data_PartialFunction -> Phantoms.TTerm [Syntax.Case]
-data_PartialFunctionCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_PartialFunction"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_PartialFunctionWithCases :: Phantoms.TTerm Syntax.Data_PartialFunction -> Phantoms.TTerm [Syntax.Case] -> Phantoms.TTerm Syntax.Data_PartialFunction
-data_PartialFunctionWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_PartialFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_PolyFunction :: Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_PolyFunction
-data_PolyFunction tparams body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-data_PolyFunctionBody :: Phantoms.TTerm Syntax.Data_PolyFunction -> Phantoms.TTerm Syntax.Data
-data_PolyFunctionBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_PolyFunctionTparams :: Phantoms.TTerm Syntax.Data_PolyFunction -> Phantoms.TTerm [Syntax.Type_Param]
-data_PolyFunctionTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_PolyFunctionWithBody :: Phantoms.TTerm Syntax.Data_PolyFunction -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_PolyFunction
-data_PolyFunctionWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_PolyFunctionWithTparams :: Phantoms.TTerm Syntax.Data_PolyFunction -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Data_PolyFunction
-data_PolyFunctionWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_PolyFunction"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_QuotedMacroExpr :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_QuotedMacroExpr
-data_QuotedMacroExpr body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_QuotedMacroExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-data_QuotedMacroExprBody :: Phantoms.TTerm Syntax.Data_QuotedMacroExpr -> Phantoms.TTerm Syntax.Data
-data_QuotedMacroExprBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_QuotedMacroExpr"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_QuotedMacroExprWithBody :: Phantoms.TTerm Syntax.Data_QuotedMacroExpr -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_QuotedMacroExpr
-data_QuotedMacroExprWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_QuotedMacroExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_QuotedMacroType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Data_QuotedMacroType
-data_QuotedMacroType tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_QuotedMacroType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-data_QuotedMacroTypeTpe :: Phantoms.TTerm Syntax.Data_QuotedMacroType -> Phantoms.TTerm Syntax.Type
-data_QuotedMacroTypeTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_QuotedMacroType"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_QuotedMacroTypeWithTpe :: Phantoms.TTerm Syntax.Data_QuotedMacroType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Data_QuotedMacroType
-data_QuotedMacroTypeWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_QuotedMacroType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_RefAnonymous :: Phantoms.TTerm Syntax.Data_Anonymous -> Phantoms.TTerm Syntax.Data_Ref
-data_RefAnonymous x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymous"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_RefApplyUnary :: Phantoms.TTerm Syntax.Data_ApplyUnary -> Phantoms.TTerm Syntax.Data_Ref
-data_RefApplyUnary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applyUnary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_RefName :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_Ref
-data_RefName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_RefSelect :: Phantoms.TTerm Syntax.Data_Select -> Phantoms.TTerm Syntax.Data_Ref
-data_RefSelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_RefSuper :: Phantoms.TTerm Syntax.Data_Super -> Phantoms.TTerm Syntax.Data_Ref
-data_RefSuper x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_RefThis :: Phantoms.TTerm Syntax.Data_This -> Phantoms.TTerm Syntax.Data_Ref
-data_RefThis x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Data_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "this"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-data_Repeated :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Repeated
-data_Repeated expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Repeated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-data_RepeatedExpr :: Phantoms.TTerm Syntax.Data_Repeated -> Phantoms.TTerm Syntax.Data
-data_RepeatedExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Repeated"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_RepeatedWithExpr :: Phantoms.TTerm Syntax.Data_Repeated -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Repeated
-data_RepeatedWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Repeated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Return :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Return
-data_Return expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Return"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-data_ReturnExpr :: Phantoms.TTerm Syntax.Data_Return -> Phantoms.TTerm Syntax.Data
-data_ReturnExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Return"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ReturnWithExpr :: Phantoms.TTerm Syntax.Data_Return -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Return
-data_ReturnWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Return"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Select :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_Select
-data_Select qual name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm qual)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-data_SelectName :: Phantoms.TTerm Syntax.Data_Select -> Phantoms.TTerm Syntax.Data_Name
-data_SelectName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_SelectQual :: Phantoms.TTerm Syntax.Data_Select -> Phantoms.TTerm Syntax.Data
-data_SelectQual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-        Core.projectionField = (Core.Name "qual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_SelectWithName :: Phantoms.TTerm Syntax.Data_Select -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_Select
-data_SelectWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-              Core.projectionField = (Core.Name "qual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_SelectWithQual :: Phantoms.TTerm Syntax.Data_Select -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Select
-data_SelectWithQual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Select"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_SplicedMacroExpr :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_SplicedMacroExpr
-data_SplicedMacroExpr body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_SplicedMacroExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-data_SplicedMacroExprBody :: Phantoms.TTerm Syntax.Data_SplicedMacroExpr -> Phantoms.TTerm Syntax.Data
-data_SplicedMacroExprBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_SplicedMacroExpr"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_SplicedMacroExprWithBody :: Phantoms.TTerm Syntax.Data_SplicedMacroExpr -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_SplicedMacroExpr
-data_SplicedMacroExprWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_SplicedMacroExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Super :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Data_Super
-data_Super thisp superp =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "thisp"),
-          Core.fieldTerm = (Phantoms.unTTerm thisp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superp"),
-          Core.fieldTerm = (Phantoms.unTTerm superp)}]}))
-
-data_SuperSuperp :: Phantoms.TTerm Syntax.Data_Super -> Phantoms.TTerm Syntax.Name
-data_SuperSuperp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-        Core.projectionField = (Core.Name "superp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_SuperThisp :: Phantoms.TTerm Syntax.Data_Super -> Phantoms.TTerm Syntax.Name
-data_SuperThisp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-        Core.projectionField = (Core.Name "thisp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_SuperWithSuperp :: Phantoms.TTerm Syntax.Data_Super -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Data_Super
-data_SuperWithSuperp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "thisp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-              Core.projectionField = (Core.Name "thisp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "superp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_SuperWithThisp :: Phantoms.TTerm Syntax.Data_Super -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Data_Super
-data_SuperWithThisp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "thisp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "superp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Super"),
-              Core.projectionField = (Core.Name "superp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_This :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.Data_This
-data_This x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.scala.syntax.Data_This"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-data_Throw :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Throw
-data_Throw expr =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Throw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))
-
-data_ThrowExpr :: Phantoms.TTerm Syntax.Data_Throw -> Phantoms.TTerm Syntax.Data
-data_ThrowExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Throw"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_ThrowWithExpr :: Phantoms.TTerm Syntax.Data_Throw -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Throw
-data_ThrowWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Throw"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Try :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm [Syntax.Case] -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data_Try
-data_Try expr catchp finallyp =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Phantoms.unTTerm catchp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Phantoms.unTTerm finallyp)}]}))
-
-data_TryCatchp :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm [Syntax.Case]
-data_TryCatchp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-        Core.projectionField = (Core.Name "catchp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TryExpr :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm Syntax.Data
-data_TryExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TryFinallyp :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm (Maybe Syntax.Data)
-data_TryFinallyp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-        Core.projectionField = (Core.Name "finallyp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TryWithCatchp :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm [Syntax.Case] -> Phantoms.TTerm Syntax.Data_Try
-data_TryWithCatchp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-              Core.projectionField = (Core.Name "finallyp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_TryWithExpr :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_Try
-data_TryWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-              Core.projectionField = (Core.Name "catchp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-              Core.projectionField = (Core.Name "finallyp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_TryWithFinallyp :: Phantoms.TTerm Syntax.Data_Try -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data_Try
-data_TryWithFinallyp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Try"),
-              Core.projectionField = (Core.Name "catchp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_TryWithHandler :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data_TryWithHandler
-data_TryWithHandler expr catchp finallyp =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Phantoms.unTTerm catchp)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Phantoms.unTTerm finallyp)}]}))
-
-data_TryWithHandlerCatchp :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm Syntax.Data
-data_TryWithHandlerCatchp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-        Core.projectionField = (Core.Name "catchp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TryWithHandlerExpr :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm Syntax.Data
-data_TryWithHandlerExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TryWithHandlerFinallyp :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm (Maybe Syntax.Data)
-data_TryWithHandlerFinallyp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-        Core.projectionField = (Core.Name "finallyp")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TryWithHandlerWithCatchp :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_TryWithHandler
-data_TryWithHandlerWithCatchp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-              Core.projectionField = (Core.Name "finallyp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_TryWithHandlerWithExpr :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_TryWithHandler
-data_TryWithHandlerWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-              Core.projectionField = (Core.Name "catchp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-              Core.projectionField = (Core.Name "finallyp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_TryWithHandlerWithFinallyp :: Phantoms.TTerm Syntax.Data_TryWithHandler -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Data_TryWithHandler
-data_TryWithHandlerWithFinallyp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "catchp"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_TryWithHandler"),
-              Core.projectionField = (Core.Name "catchp")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "finallyp"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_Tuple :: Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Tuple
-data_Tuple args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Tuple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-data_TupleArgs :: Phantoms.TTerm Syntax.Data_Tuple -> Phantoms.TTerm [Syntax.Data]
-data_TupleArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Tuple"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_TupleWithArgs :: Phantoms.TTerm Syntax.Data_Tuple -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Tuple
-data_TupleWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Tuple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_While :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_While
-data_While expr body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm expr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-data_WhileBody :: Phantoms.TTerm Syntax.Data_While -> Phantoms.TTerm Syntax.Data
-data_WhileBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_WhileExpr :: Phantoms.TTerm Syntax.Data_While -> Phantoms.TTerm Syntax.Data
-data_WhileExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-        Core.projectionField = (Core.Name "expr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_WhileWithBody :: Phantoms.TTerm Syntax.Data_While -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_While
-data_WhileWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-              Core.projectionField = (Core.Name "expr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_WhileWithExpr :: Phantoms.TTerm Syntax.Data_While -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Data_While
-data_WhileWithExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_While"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-data_Xml :: Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Xml
-data_Xml parts args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm parts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-data_XmlArgs :: Phantoms.TTerm Syntax.Data_Xml -> Phantoms.TTerm [Syntax.Data]
-data_XmlArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_XmlParts :: Phantoms.TTerm Syntax.Data_Xml -> Phantoms.TTerm [Syntax.Lit]
-data_XmlParts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-        Core.projectionField = (Core.Name "parts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-data_XmlWithArgs :: Phantoms.TTerm Syntax.Data_Xml -> Phantoms.TTerm [Syntax.Data] -> Phantoms.TTerm Syntax.Data_Xml
-data_XmlWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-data_XmlWithParts :: Phantoms.TTerm Syntax.Data_Xml -> Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm Syntax.Data_Xml
-data_XmlWithParts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Data_Xml"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-declDef :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm Syntax.Decl
-declDef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Decl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "def"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declGiven :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm Syntax.Decl
-declGiven x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Decl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "given"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declType :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm Syntax.Decl
-declType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Decl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declVal :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm Syntax.Decl
-declVal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Decl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "val"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-declVar :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm Syntax.Decl
-declVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Decl"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-decl_Def :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Def
-decl_Def mods name tparams paramss decltpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm paramss)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)}]}))
-
-decl_DefDecltpe :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm Syntax.Type
-decl_DefDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_DefMods :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm [Syntax.Mod]
-decl_DefMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_DefName :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm Syntax.Data_Name
-decl_DefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_DefParamss :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm [[Syntax.Data_Param]]
-decl_DefParamss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-        Core.projectionField = (Core.Name "paramss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_DefTparams :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm [Syntax.Type_Param]
-decl_DefTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_DefWithDecltpe :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Def
-decl_DefWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decl_DefWithMods :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Decl_Def
-decl_DefWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_DefWithName :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Decl_Def
-decl_DefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_DefWithParamss :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Decl_Def
-decl_DefWithParamss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_DefWithTparams :: Phantoms.TTerm Syntax.Decl_Def -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Decl_Def
-decl_DefWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_Given :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Given
-decl_Given mods name tparams sparams decltpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Phantoms.unTTerm sparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)}]}))
-
-decl_GivenDecltpe :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm Syntax.Type
-decl_GivenDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_GivenMods :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm [Syntax.Mod]
-decl_GivenMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_GivenName :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm Syntax.Data_Name
-decl_GivenName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_GivenSparams :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm [[Syntax.Data_Param]]
-decl_GivenSparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-        Core.projectionField = (Core.Name "sparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_GivenTparams :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm [Syntax.Type_Param]
-decl_GivenTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_GivenWithDecltpe :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Given
-decl_GivenWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decl_GivenWithMods :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Decl_Given
-decl_GivenWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_GivenWithName :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Decl_Given
-decl_GivenWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_GivenWithSparams :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Decl_Given
-decl_GivenWithSparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_GivenWithTparams :: Phantoms.TTerm Syntax.Decl_Given -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Decl_Given
-decl_GivenWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Given"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_Type :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm Syntax.Decl_Type
-decl_Type mods name tparams bounds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)}]}))
-
-decl_TypeBounds :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm Syntax.TypeBounds
-decl_TypeBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_TypeMods :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm [Syntax.Mod]
-decl_TypeMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_TypeName :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm Syntax.Type_Name
-decl_TypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_TypeTparams :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm [Syntax.Type_Param]
-decl_TypeTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_TypeWithBounds :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm Syntax.Decl_Type
-decl_TypeWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decl_TypeWithMods :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Decl_Type
-decl_TypeWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_TypeWithName :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Decl_Type
-decl_TypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_TypeWithTparams :: Phantoms.TTerm Syntax.Decl_Type -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Decl_Type
-decl_TypeWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Type"),
-              Core.projectionField = (Core.Name "bounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_Val :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Val
-decl_Val mods pats decltpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm pats)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)}]}))
-
-decl_ValDecltpe :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm Syntax.Type
-decl_ValDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_ValMods :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm [Syntax.Mod]
-decl_ValMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_ValPats :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm [Syntax.Pat]
-decl_ValPats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-        Core.projectionField = (Core.Name "pats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_ValWithDecltpe :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Val
-decl_ValWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decl_ValWithMods :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Decl_Val
-decl_ValWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_ValWithPats :: Phantoms.TTerm Syntax.Decl_Val -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Decl_Val
-decl_ValWithPats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Val"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_Var :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Var
-decl_Var mods pats decltpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm pats)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)}]}))
-
-decl_VarDecltpe :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm Syntax.Type
-decl_VarDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_VarMods :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm [Syntax.Mod]
-decl_VarMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_VarPats :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm [Syntax.Pat]
-decl_VarPats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-        Core.projectionField = (Core.Name "pats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-decl_VarWithDecltpe :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Decl_Var
-decl_VarWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-decl_VarWithMods :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Decl_Var
-decl_VarWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-decl_VarWithPats :: Phantoms.TTerm Syntax.Decl_Var -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Decl_Var
-decl_VarWithPats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Decl_Var"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defnClass :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Defn
-defnClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnDef :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm Syntax.Defn
-defnDef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "def"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnEnum :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Defn
-defnEnum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnEnumCase :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm Syntax.Defn
-defnEnumCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enumCase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnExtensionGroup :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm Syntax.Defn
-defnExtensionGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extensionGroup"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnGiven :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm Syntax.Defn
-defnGiven x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "given"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnGivenAlias :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Defn
-defnGivenAlias x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "givenAlias"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnMacro :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm Syntax.Defn
-defnMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnObject :: Phantoms.TTerm Syntax.Defn_Object -> Phantoms.TTerm Syntax.Defn
-defnObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnRepeatedEnumCase :: Phantoms.TTerm Syntax.Defn_RepeatedEnumCase -> Phantoms.TTerm Syntax.Defn
-defnRepeatedEnumCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeatedEnumCase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnTrait :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Defn
-defnTrait x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trait"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnType :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm Syntax.Defn
-defnType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnVal :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm Syntax.Defn
-defnVal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "val"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defnVar :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm Syntax.Defn
-defnVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Defn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-defn_Class :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Class
-defn_Class mods name tparams ctor template =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm ctor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm template)}]}))
-
-defn_ClassCtor :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Ctor_Primary
-defn_ClassCtor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-        Core.projectionField = (Core.Name "ctor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ClassMods :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm [Syntax.Mod]
-defn_ClassMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ClassName :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Type_Name
-defn_ClassName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ClassTemplate :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Template
-defn_ClassTemplate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-        Core.projectionField = (Core.Name "template")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ClassTparams :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm [Syntax.Type_Param]
-defn_ClassTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ClassWithCtor :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Defn_Class
-defn_ClassWithCtor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ClassWithMods :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Class
-defn_ClassWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ClassWithName :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Defn_Class
-defn_ClassWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ClassWithTemplate :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Class
-defn_ClassWithTemplate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_ClassWithTparams :: Phantoms.TTerm Syntax.Defn_Class -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_Class
-defn_ClassWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Class"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Def :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_Def
-defn_Def mods name tparams paramss decltpe body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm paramss)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-defn_DefBody :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm Syntax.Data
-defn_DefBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_DefDecltpe :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm (Maybe Syntax.Type)
-defn_DefDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_DefMods :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm [Syntax.Mod]
-defn_DefMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_DefName :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm Syntax.Data_Name
-defn_DefName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_DefParamss :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm [[Syntax.Data_Param]]
-defn_DefParamss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-        Core.projectionField = (Core.Name "paramss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_DefTparams :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm [Syntax.Type_Param]
-defn_DefTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_DefWithBody :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_Def
-defn_DefWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_DefWithDecltpe :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Defn_Def
-defn_DefWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_DefWithMods :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Def
-defn_DefWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_DefWithName :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Defn_Def
-defn_DefWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_DefWithParamss :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Defn_Def
-defn_DefWithParamss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_DefWithTparams :: Phantoms.TTerm Syntax.Defn_Def -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_Def
-defn_DefWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Def"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Enum :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Enum
-defn_Enum mods name tparams ctor template =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm ctor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm template)}]}))
-
-defn_EnumCase :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm [Syntax.Init] -> Phantoms.TTerm Syntax.Defn_EnumCase
-defn_EnumCase mods name tparams ctor inits =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm ctor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Phantoms.unTTerm inits)}]}))
-
-defn_EnumCaseCtor :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm Syntax.Ctor_Primary
-defn_EnumCaseCtor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-        Core.projectionField = (Core.Name "ctor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumCaseInits :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm [Syntax.Init]
-defn_EnumCaseInits x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-        Core.projectionField = (Core.Name "inits")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumCaseMods :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm [Syntax.Mod]
-defn_EnumCaseMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumCaseName :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm Syntax.Data_Name
-defn_EnumCaseName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumCaseTparams :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm [Syntax.Type_Param]
-defn_EnumCaseTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumCaseWithCtor :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Defn_EnumCase
-defn_EnumCaseWithCtor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumCaseWithInits :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm [Syntax.Init] -> Phantoms.TTerm Syntax.Defn_EnumCase
-defn_EnumCaseWithInits original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_EnumCaseWithMods :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_EnumCase
-defn_EnumCaseWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumCaseWithName :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Defn_EnumCase
-defn_EnumCaseWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumCaseWithTparams :: Phantoms.TTerm Syntax.Defn_EnumCase -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_EnumCase
-defn_EnumCaseWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_EnumCase"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumCtor :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Ctor_Primary
-defn_EnumCtor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-        Core.projectionField = (Core.Name "ctor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumMods :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm [Syntax.Mod]
-defn_EnumMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumName :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Type_Name
-defn_EnumName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumTemplate :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Template
-defn_EnumTemplate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-        Core.projectionField = (Core.Name "template")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumTparams :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm [Syntax.Type_Param]
-defn_EnumTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_EnumWithCtor :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Defn_Enum
-defn_EnumWithCtor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumWithMods :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Enum
-defn_EnumWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumWithName :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Defn_Enum
-defn_EnumWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_EnumWithTemplate :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Enum
-defn_EnumWithTemplate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_EnumWithTparams :: Phantoms.TTerm Syntax.Defn_Enum -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_Enum
-defn_EnumWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Enum"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ExtensionGroup :: Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Stat -> Phantoms.TTerm Syntax.Defn_ExtensionGroup
-defn_ExtensionGroup tparams parmss body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parmss"),
-          Core.fieldTerm = (Phantoms.unTTerm parmss)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-defn_ExtensionGroupBody :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm Syntax.Stat
-defn_ExtensionGroupBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ExtensionGroupParmss :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm [[Syntax.Data_Param]]
-defn_ExtensionGroupParmss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-        Core.projectionField = (Core.Name "parmss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ExtensionGroupTparams :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm [Syntax.Type_Param]
-defn_ExtensionGroupTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ExtensionGroupWithBody :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm Syntax.Stat -> Phantoms.TTerm Syntax.Defn_ExtensionGroup
-defn_ExtensionGroupWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parmss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-              Core.projectionField = (Core.Name "parmss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_ExtensionGroupWithParmss :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Defn_ExtensionGroup
-defn_ExtensionGroupWithParmss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parmss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ExtensionGroupWithTparams :: Phantoms.TTerm Syntax.Defn_ExtensionGroup -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_ExtensionGroup
-defn_ExtensionGroupWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parmss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-              Core.projectionField = (Core.Name "parmss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Given :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [[Syntax.Type_Param]] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Given
-defn_Given mods name tparams sparams templ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Phantoms.unTTerm sparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Phantoms.unTTerm templ)}]}))
-
-defn_GivenAlias :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [[Syntax.Type_Param]] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAlias mods name tparams sparams decltpe body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Phantoms.unTTerm sparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-defn_GivenAliasBody :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Data
-defn_GivenAliasBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenAliasDecltpe :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Type
-defn_GivenAliasDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenAliasMods :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm [Syntax.Mod]
-defn_GivenAliasMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenAliasName :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Name
-defn_GivenAliasName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenAliasSparams :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm [[Syntax.Data_Param]]
-defn_GivenAliasSparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-        Core.projectionField = (Core.Name "sparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenAliasTparams :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm [[Syntax.Type_Param]]
-defn_GivenAliasTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenAliasWithBody :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAliasWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_GivenAliasWithDecltpe :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAliasWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenAliasWithMods :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAliasWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenAliasWithName :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAliasWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenAliasWithSparams :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAliasWithSparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenAliasWithTparams :: Phantoms.TTerm Syntax.Defn_GivenAlias -> Phantoms.TTerm [[Syntax.Type_Param]] -> Phantoms.TTerm Syntax.Defn_GivenAlias
-defn_GivenAliasWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_GivenAlias"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenMods :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm [Syntax.Mod]
-defn_GivenMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenName :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm Syntax.Name
-defn_GivenName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenSparams :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm [[Syntax.Data_Param]]
-defn_GivenSparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-        Core.projectionField = (Core.Name "sparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenTempl :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm Syntax.Template
-defn_GivenTempl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-        Core.projectionField = (Core.Name "templ")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenTparams :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm [[Syntax.Type_Param]]
-defn_GivenTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_GivenWithMods :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Given
-defn_GivenWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "templ")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenWithName :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Defn_Given
-defn_GivenWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "templ")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenWithSparams :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Defn_Given
-defn_GivenWithSparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "templ")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_GivenWithTempl :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Given
-defn_GivenWithTempl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_GivenWithTparams :: Phantoms.TTerm Syntax.Defn_Given -> Phantoms.TTerm [[Syntax.Type_Param]] -> Phantoms.TTerm Syntax.Defn_Given
-defn_GivenWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "sparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "templ"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Given"),
-              Core.projectionField = (Core.Name "templ")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Macro :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_Macro
-defn_Macro mods name tparams paramss decltpe body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm paramss)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-defn_MacroBody :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm Syntax.Data
-defn_MacroBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_MacroDecltpe :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm (Maybe Syntax.Type)
-defn_MacroDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_MacroMods :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm [Syntax.Mod]
-defn_MacroMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_MacroName :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm Syntax.Data_Name
-defn_MacroName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_MacroParamss :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm [[Syntax.Data_Param]]
-defn_MacroParamss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-        Core.projectionField = (Core.Name "paramss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_MacroTparams :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm [Syntax.Type_Param]
-defn_MacroTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_MacroWithBody :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_Macro
-defn_MacroWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_MacroWithDecltpe :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Defn_Macro
-defn_MacroWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_MacroWithMods :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Macro
-defn_MacroWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_MacroWithName :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Defn_Macro
-defn_MacroWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_MacroWithParamss :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Defn_Macro
-defn_MacroWithParamss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_MacroWithTparams :: Phantoms.TTerm Syntax.Defn_Macro -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_Macro
-defn_MacroWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Macro"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Object :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Defn_Object
-defn_Object name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-defn_ObjectName :: Phantoms.TTerm Syntax.Defn_Object -> Phantoms.TTerm Syntax.Data_Name
-defn_ObjectName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Object"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ObjectWithName :: Phantoms.TTerm Syntax.Defn_Object -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Defn_Object
-defn_ObjectWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_RepeatedEnumCase :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm [Syntax.Data_Name] -> Phantoms.TTerm Syntax.Defn_RepeatedEnumCase
-defn_RepeatedEnumCase mods cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-defn_RepeatedEnumCaseCases :: Phantoms.TTerm Syntax.Defn_RepeatedEnumCase -> Phantoms.TTerm [Syntax.Data_Name]
-defn_RepeatedEnumCaseCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_RepeatedEnumCaseMods :: Phantoms.TTerm Syntax.Defn_RepeatedEnumCase -> Phantoms.TTerm [Syntax.Mod]
-defn_RepeatedEnumCaseMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_RepeatedEnumCaseWithCases :: Phantoms.TTerm Syntax.Defn_RepeatedEnumCase -> Phantoms.TTerm [Syntax.Data_Name] -> Phantoms.TTerm Syntax.Defn_RepeatedEnumCase
-defn_RepeatedEnumCaseWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_RepeatedEnumCaseWithMods :: Phantoms.TTerm Syntax.Defn_RepeatedEnumCase -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_RepeatedEnumCase
-defn_RepeatedEnumCaseWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Trait :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Trait
-defn_Trait mods name tparams ctor template =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm ctor)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm template)}]}))
-
-defn_TraitCtor :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Ctor_Primary
-defn_TraitCtor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-        Core.projectionField = (Core.Name "ctor")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TraitMods :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm [Syntax.Mod]
-defn_TraitMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TraitName :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Type_Name
-defn_TraitName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TraitTemplate :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Template
-defn_TraitTemplate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-        Core.projectionField = (Core.Name "template")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TraitTparams :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm [Syntax.Type_Param]
-defn_TraitTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TraitWithCtor :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Ctor_Primary -> Phantoms.TTerm Syntax.Defn_Trait
-defn_TraitWithCtor original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_TraitWithMods :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Trait
-defn_TraitWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_TraitWithName :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Defn_Trait
-defn_TraitWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_TraitWithTemplate :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Defn_Trait
-defn_TraitWithTemplate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_TraitWithTparams :: Phantoms.TTerm Syntax.Defn_Trait -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_Trait
-defn_TraitWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ctor"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "ctor")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Trait"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Type :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Defn_Type
-defn_Type mods name tparams body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-defn_TypeBody :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm Syntax.Type
-defn_TypeBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TypeMods :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm [Syntax.Mod]
-defn_TypeMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TypeName :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm Syntax.Type_Name
-defn_TypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TypeTparams :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm [Syntax.Type_Param]
-defn_TypeTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_TypeWithBody :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Defn_Type
-defn_TypeWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_TypeWithMods :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Type
-defn_TypeWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_TypeWithName :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Defn_Type
-defn_TypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_TypeWithTparams :: Phantoms.TTerm Syntax.Defn_Type -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Defn_Type
-defn_TypeWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Type"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_Val :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_Val
-defn_Val mods pats decltpe rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm pats)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-defn_ValDecltpe :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm (Maybe Syntax.Type)
-defn_ValDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ValMods :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm [Syntax.Mod]
-defn_ValMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ValPats :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm [Syntax.Pat]
-defn_ValPats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-        Core.projectionField = (Core.Name "pats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ValRhs :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm Syntax.Data
-defn_ValRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_ValWithDecltpe :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Defn_Val
-defn_ValWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ValWithMods :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Val
-defn_ValWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ValWithPats :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Defn_Val
-defn_ValWithPats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_ValWithRhs :: Phantoms.TTerm Syntax.Defn_Val -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Defn_Val
-defn_ValWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Val"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-defn_Var :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Defn_Var
-defn_Var mods pats decltpe rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm pats)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm decltpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-defn_VarDecltpe :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm Syntax.Type
-defn_VarDecltpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-        Core.projectionField = (Core.Name "decltpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_VarMods :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm [Syntax.Mod]
-defn_VarMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_VarPats :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm [Syntax.Pat]
-defn_VarPats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-        Core.projectionField = (Core.Name "pats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_VarRhs :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm (Maybe Syntax.Data)
-defn_VarRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-defn_VarWithDecltpe :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Defn_Var
-defn_VarWithDecltpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_VarWithMods :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Defn_Var
-defn_VarWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_VarWithPats :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Defn_Var
-defn_VarWithPats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-defn_VarWithRhs :: Phantoms.TTerm Syntax.Defn_Var -> Phantoms.TTerm (Maybe Syntax.Data) -> Phantoms.TTerm Syntax.Defn_Var
-defn_VarWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "pats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "pats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decltpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Defn_Var"),
-              Core.projectionField = (Core.Name "decltpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumeratorCaseGenerator :: Phantoms.TTerm Syntax.Enumerator_CaseGenerator -> Phantoms.TTerm Syntax.Enumerator
-enumeratorCaseGenerator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "caseGenerator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumeratorGenerator :: Phantoms.TTerm Syntax.Enumerator_Generator -> Phantoms.TTerm Syntax.Enumerator
-enumeratorGenerator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "generator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumeratorGuard :: Phantoms.TTerm Syntax.Enumerator_Guard -> Phantoms.TTerm Syntax.Enumerator
-enumeratorGuard x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "guard"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumeratorVal :: Phantoms.TTerm Syntax.Enumerator_Val -> Phantoms.TTerm Syntax.Enumerator
-enumeratorVal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "val"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-enumerator_CaseGenerator :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_CaseGenerator
-enumerator_CaseGenerator pat rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm pat)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-enumerator_CaseGeneratorPat :: Phantoms.TTerm Syntax.Enumerator_CaseGenerator -> Phantoms.TTerm Syntax.Pat
-enumerator_CaseGeneratorPat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-        Core.projectionField = (Core.Name "pat")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_CaseGeneratorRhs :: Phantoms.TTerm Syntax.Enumerator_CaseGenerator -> Phantoms.TTerm Syntax.Data
-enumerator_CaseGeneratorRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_CaseGeneratorWithPat :: Phantoms.TTerm Syntax.Enumerator_CaseGenerator -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Enumerator_CaseGenerator
-enumerator_CaseGeneratorWithPat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumerator_CaseGeneratorWithRhs :: Phantoms.TTerm Syntax.Enumerator_CaseGenerator -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_CaseGenerator
-enumerator_CaseGeneratorWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"),
-              Core.projectionField = (Core.Name "pat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumerator_Generator :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_Generator
-enumerator_Generator pat rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm pat)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-enumerator_GeneratorPat :: Phantoms.TTerm Syntax.Enumerator_Generator -> Phantoms.TTerm Syntax.Pat
-enumerator_GeneratorPat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-        Core.projectionField = (Core.Name "pat")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_GeneratorRhs :: Phantoms.TTerm Syntax.Enumerator_Generator -> Phantoms.TTerm Syntax.Data
-enumerator_GeneratorRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_GeneratorWithPat :: Phantoms.TTerm Syntax.Enumerator_Generator -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Enumerator_Generator
-enumerator_GeneratorWithPat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumerator_GeneratorWithRhs :: Phantoms.TTerm Syntax.Enumerator_Generator -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_Generator
-enumerator_GeneratorWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Generator"),
-              Core.projectionField = (Core.Name "pat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumerator_Guard :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_Guard
-enumerator_Guard cond =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Guard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm cond)}]}))
-
-enumerator_GuardCond :: Phantoms.TTerm Syntax.Enumerator_Guard -> Phantoms.TTerm Syntax.Data
-enumerator_GuardCond x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Guard"),
-        Core.projectionField = (Core.Name "cond")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_GuardWithCond :: Phantoms.TTerm Syntax.Enumerator_Guard -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_Guard
-enumerator_GuardWithCond original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Guard"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cond"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-enumerator_Val :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_Val
-enumerator_Val pat rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm pat)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-enumerator_ValPat :: Phantoms.TTerm Syntax.Enumerator_Val -> Phantoms.TTerm Syntax.Pat
-enumerator_ValPat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-        Core.projectionField = (Core.Name "pat")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_ValRhs :: Phantoms.TTerm Syntax.Enumerator_Val -> Phantoms.TTerm Syntax.Data
-enumerator_ValRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-enumerator_ValWithPat :: Phantoms.TTerm Syntax.Enumerator_Val -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Enumerator_Val
-enumerator_ValWithPat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-enumerator_ValWithRhs :: Phantoms.TTerm Syntax.Enumerator_Val -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Enumerator_Val
-enumerator_ValWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Enumerator_Val"),
-              Core.projectionField = (Core.Name "pat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-export :: Phantoms.TTerm [Syntax.Importer] -> Phantoms.TTerm Syntax.Export
-export importers =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Export"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "importers"),
-          Core.fieldTerm = (Phantoms.unTTerm importers)}]}))
-
-exportImporters :: Phantoms.TTerm Syntax.Export -> Phantoms.TTerm [Syntax.Importer]
-exportImporters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Export"),
-        Core.projectionField = (Core.Name "importers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exportWithImporters :: Phantoms.TTerm Syntax.Export -> Phantoms.TTerm [Syntax.Importer] -> Phantoms.TTerm Syntax.Export
-exportWithImporters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Export"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "importers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-import_ :: Phantoms.TTerm [Syntax.Importer] -> Phantoms.TTerm Syntax.Import
-import_ importers =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "importers"),
-          Core.fieldTerm = (Phantoms.unTTerm importers)}]}))
-
-importExportStatExport :: Phantoms.TTerm Syntax.Export -> Phantoms.TTerm Syntax.ImportExportStat
-importExportStatExport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.ImportExportStat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "export"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importExportStatImport :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Syntax.ImportExportStat
-importExportStatImport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.ImportExportStat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "import"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importImporters :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm [Syntax.Importer]
-importImporters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Import"),
-        Core.projectionField = (Core.Name "importers")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importWithImporters :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm [Syntax.Importer] -> Phantoms.TTerm Syntax.Import
-importWithImporters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Import"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "importers"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importeeGiven :: Phantoms.TTerm Syntax.Importee_Given -> Phantoms.TTerm Syntax.Importee
-importeeGiven x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Importee"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "given"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importeeGivenAll :: Phantoms.TTerm Syntax.Importee
-importeeGivenAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Importee"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "givenAll"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-importeeName :: Phantoms.TTerm Syntax.Importee_Name -> Phantoms.TTerm Syntax.Importee
-importeeName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Importee"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importeeRename :: Phantoms.TTerm Syntax.Importee_Rename -> Phantoms.TTerm Syntax.Importee
-importeeRename x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Importee"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rename"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importeeUnimport :: Phantoms.TTerm Syntax.Importee_Unimport -> Phantoms.TTerm Syntax.Importee
-importeeUnimport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Importee"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unimport"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-importeeWildcard :: Phantoms.TTerm Syntax.Importee
-importeeWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Importee"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-importee_Given :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Importee_Given
-importee_Given tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-importee_GivenTpe :: Phantoms.TTerm Syntax.Importee_Given -> Phantoms.TTerm Syntax.Type
-importee_GivenTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Given"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importee_GivenWithTpe :: Phantoms.TTerm Syntax.Importee_Given -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Importee_Given
-importee_GivenWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importee_Name :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Name
-importee_Name name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Name"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-importee_NameName :: Phantoms.TTerm Syntax.Importee_Name -> Phantoms.TTerm Syntax.Name
-importee_NameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Name"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importee_NameWithName :: Phantoms.TTerm Syntax.Importee_Name -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Name
-importee_NameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Name"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importee_Rename :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Rename
-importee_Rename name rename =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rename"),
-          Core.fieldTerm = (Phantoms.unTTerm rename)}]}))
-
-importee_RenameName :: Phantoms.TTerm Syntax.Importee_Rename -> Phantoms.TTerm Syntax.Name
-importee_RenameName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importee_RenameRename :: Phantoms.TTerm Syntax.Importee_Rename -> Phantoms.TTerm Syntax.Name
-importee_RenameRename x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-        Core.projectionField = (Core.Name "rename")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importee_RenameWithName :: Phantoms.TTerm Syntax.Importee_Rename -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Rename
-importee_RenameWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rename"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-              Core.projectionField = (Core.Name "rename")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-importee_RenameWithRename :: Phantoms.TTerm Syntax.Importee_Rename -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Rename
-importee_RenameWithRename original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Rename"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rename"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importee_Unimport :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Unimport
-importee_Unimport name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Unimport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-importee_UnimportName :: Phantoms.TTerm Syntax.Importee_Unimport -> Phantoms.TTerm Syntax.Name
-importee_UnimportName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importee_Unimport"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importee_UnimportWithName :: Phantoms.TTerm Syntax.Importee_Unimport -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Importee_Unimport
-importee_UnimportWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importee_Unimport"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importer :: Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm [Syntax.Importee] -> Phantoms.TTerm Syntax.Importer
-importer ref importees =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm ref)},
-        Core.Field {
-          Core.fieldName = (Core.Name "importees"),
-          Core.fieldTerm = (Phantoms.unTTerm importees)}]}))
-
-importerImportees :: Phantoms.TTerm Syntax.Importer -> Phantoms.TTerm [Syntax.Importee]
-importerImportees x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-        Core.projectionField = (Core.Name "importees")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importerRef :: Phantoms.TTerm Syntax.Importer -> Phantoms.TTerm Syntax.Data_Ref
-importerRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-        Core.projectionField = (Core.Name "ref")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-importerWithImportees :: Phantoms.TTerm Syntax.Importer -> Phantoms.TTerm [Syntax.Importee] -> Phantoms.TTerm Syntax.Importer
-importerWithImportees original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "importees"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-importerWithRef :: Phantoms.TTerm Syntax.Importer -> Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Importer
-importerWithRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "importees"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Importer"),
-              Core.projectionField = (Core.Name "importees")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-init :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [[Syntax.Data]] -> Phantoms.TTerm Syntax.Init
-init tpe name argss =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Init"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argss"),
-          Core.fieldTerm = (Phantoms.unTTerm argss)}]}))
-
-initArgss :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm [[Syntax.Data]]
-initArgss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-        Core.projectionField = (Core.Name "argss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-initName :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Name
-initName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-initTpe :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Type
-initTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-initWithArgss :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm [[Syntax.Data]] -> Phantoms.TTerm Syntax.Init
-initWithArgss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Init"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-initWithName :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Init
-initWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Init"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "argss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-              Core.projectionField = (Core.Name "argss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-initWithTpe :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Init
-initWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Init"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Init"),
-              Core.projectionField = (Core.Name "argss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-litBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Lit
-litBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litByte :: Phantoms.TTerm I.Int8 -> Phantoms.TTerm Syntax.Lit
-litByte x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litBytes :: Phantoms.TTerm [Int] -> Phantoms.TTerm Syntax.Lit
-litBytes x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bytes"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litChar :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Lit
-litChar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litDouble :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.Lit
-litDouble x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litFloat :: Phantoms.TTerm Float -> Phantoms.TTerm Syntax.Lit
-litFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litInt :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Lit
-litInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litLong :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Syntax.Lit
-litLong x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litNull :: Phantoms.TTerm Syntax.Lit
-litNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-litShort :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Syntax.Lit
-litShort x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Lit
-litString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litSymbol :: Phantoms.TTerm Syntax.ScalaSymbol -> Phantoms.TTerm Syntax.Lit
-litSymbol x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "symbol"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-litUnit :: Phantoms.TTerm Syntax.Lit
-litUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Lit"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-memberSelf :: Phantoms.TTerm Syntax.Self -> Phantoms.TTerm Syntax.Member
-memberSelf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "self"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberTerm :: Phantoms.TTerm Syntax.Member_Data -> Phantoms.TTerm Syntax.Member
-memberTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberTermParam :: Phantoms.TTerm Syntax.Data_Param -> Phantoms.TTerm Syntax.Member
-memberTermParam x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "termParam"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberType :: Phantoms.TTerm Syntax.Member_Type -> Phantoms.TTerm Syntax.Member
-memberType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-memberTypeParam :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm Syntax.Member
-memberTypeParam x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeParam"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-member_DataObject :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm Syntax.Member_Data
-member_DataObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member_Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-member_DataPkg :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm Syntax.Member_Data
-member_DataPkg x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Member_Data"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pkg"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-member_Type :: Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Member_Type
-member_Type name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Member_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-member_TypeName :: Phantoms.TTerm Syntax.Member_Type -> Phantoms.TTerm Syntax.Type_Name
-member_TypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Member_Type"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-member_TypeWithName :: Phantoms.TTerm Syntax.Member_Type -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Member_Type
-member_TypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Member_Type"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-modAbstract :: Phantoms.TTerm Syntax.Mod
-modAbstract =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "abstract"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modAnnot :: Phantoms.TTerm Syntax.Mod_Annot -> Phantoms.TTerm Syntax.Mod
-modAnnot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annot"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-modCase :: Phantoms.TTerm Syntax.Mod
-modCase =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "case"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modContravariant :: Phantoms.TTerm Syntax.Mod
-modContravariant =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "contravariant"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modCovariant :: Phantoms.TTerm Syntax.Mod
-modCovariant =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "covariant"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modFinal :: Phantoms.TTerm Syntax.Mod
-modFinal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "final"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modImplicit :: Phantoms.TTerm Syntax.Mod
-modImplicit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modInfix :: Phantoms.TTerm Syntax.Mod
-modInfix =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "infix"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modInline :: Phantoms.TTerm Syntax.Mod
-modInline =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inline"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modLazy :: Phantoms.TTerm Syntax.Mod
-modLazy =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lazy"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modOpaque :: Phantoms.TTerm Syntax.Mod
-modOpaque =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "opaque"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modOpen :: Phantoms.TTerm Syntax.Mod
-modOpen =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "open"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modOverride :: Phantoms.TTerm Syntax.Mod
-modOverride =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "override"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modPrivate :: Phantoms.TTerm Syntax.Mod_Private -> Phantoms.TTerm Syntax.Mod
-modPrivate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "private"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-modProtected :: Phantoms.TTerm Syntax.Mod_Protected -> Phantoms.TTerm Syntax.Mod
-modProtected x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "protected"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-modSealed :: Phantoms.TTerm Syntax.Mod
-modSealed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sealed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modSuper :: Phantoms.TTerm Syntax.Mod
-modSuper =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "super"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modTransparent :: Phantoms.TTerm Syntax.Mod
-modTransparent =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "transparent"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modUsing :: Phantoms.TTerm Syntax.Mod
-modUsing =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "using"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modValParam :: Phantoms.TTerm Syntax.Mod
-modValParam =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valParam"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-modVarParam :: Phantoms.TTerm Syntax.Mod
-modVarParam =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Mod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "varParam"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mod_Annot :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Mod_Annot
-mod_Annot init =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Mod_Annot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm init)}]}))
-
-mod_AnnotInit :: Phantoms.TTerm Syntax.Mod_Annot -> Phantoms.TTerm Syntax.Init
-mod_AnnotInit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Mod_Annot"),
-        Core.projectionField = (Core.Name "init")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mod_AnnotWithInit :: Phantoms.TTerm Syntax.Mod_Annot -> Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Mod_Annot
-mod_AnnotWithInit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Mod_Annot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "init"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mod_Private :: Phantoms.TTerm Syntax.Ref -> Phantoms.TTerm Syntax.Mod_Private
-mod_Private within =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Mod_Private"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "within"),
-          Core.fieldTerm = (Phantoms.unTTerm within)}]}))
-
-mod_PrivateWithWithin :: Phantoms.TTerm Syntax.Mod_Private -> Phantoms.TTerm Syntax.Ref -> Phantoms.TTerm Syntax.Mod_Private
-mod_PrivateWithWithin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Mod_Private"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "within"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mod_PrivateWithin :: Phantoms.TTerm Syntax.Mod_Private -> Phantoms.TTerm Syntax.Ref
-mod_PrivateWithin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Mod_Private"),
-        Core.projectionField = (Core.Name "within")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-mod_Protected :: Phantoms.TTerm Syntax.Ref -> Phantoms.TTerm Syntax.Mod_Protected
-mod_Protected within =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Mod_Protected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "within"),
-          Core.fieldTerm = (Phantoms.unTTerm within)}]}))
-
-mod_ProtectedWithWithin :: Phantoms.TTerm Syntax.Mod_Protected -> Phantoms.TTerm Syntax.Ref -> Phantoms.TTerm Syntax.Mod_Protected
-mod_ProtectedWithWithin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Mod_Protected"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "within"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-mod_ProtectedWithin :: Phantoms.TTerm Syntax.Mod_Protected -> Phantoms.TTerm Syntax.Ref
-mod_ProtectedWithin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Mod_Protected"),
-        Core.projectionField = (Core.Name "within")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nameAnonymous :: Phantoms.TTerm Syntax.Name
-nameAnonymous =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Name"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymous"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nameIndeterminate :: Phantoms.TTerm Syntax.PredefString -> Phantoms.TTerm Syntax.Name
-nameIndeterminate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Name"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "indeterminate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nameValue :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Name
-nameValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Name"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patAlternative :: Phantoms.TTerm Syntax.Pat_Alternative -> Phantoms.TTerm Syntax.Pat
-patAlternative x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "alternative"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patBind :: Phantoms.TTerm Syntax.Pat_Bind -> Phantoms.TTerm Syntax.Pat
-patBind x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bind"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patExtract :: Phantoms.TTerm Syntax.Pat_Extract -> Phantoms.TTerm Syntax.Pat
-patExtract x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extract"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patExtractInfix :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm Syntax.Pat
-patExtractInfix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "extractInfix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patGiven :: Phantoms.TTerm Syntax.Pat_Given -> Phantoms.TTerm Syntax.Pat
-patGiven x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "given"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patInterpolate :: Phantoms.TTerm Syntax.Pat_Interpolate -> Phantoms.TTerm Syntax.Pat
-patInterpolate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interpolate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patMacro :: Phantoms.TTerm Syntax.Pat_Macro -> Phantoms.TTerm Syntax.Pat
-patMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patRepeated :: Phantoms.TTerm Syntax.Pat_Repeated -> Phantoms.TTerm Syntax.Pat
-patRepeated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patSeqWildcard :: Phantoms.TTerm Syntax.Pat
-patSeqWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "seqWildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-patTuple :: Phantoms.TTerm Syntax.Pat_Tuple -> Phantoms.TTerm Syntax.Pat
-patTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patTyped :: Phantoms.TTerm Syntax.Pat_Typed -> Phantoms.TTerm Syntax.Pat
-patTyped x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patVar :: Phantoms.TTerm Syntax.Pat_Var -> Phantoms.TTerm Syntax.Pat
-patVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-patWildcard :: Phantoms.TTerm Syntax.Pat
-patWildcard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wildcard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-patXml :: Phantoms.TTerm Syntax.Pat_Xml -> Phantoms.TTerm Syntax.Pat
-patXml x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Pat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xml"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pat_Alternative :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Alternative
-pat_Alternative lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-pat_AlternativeLhs :: Phantoms.TTerm Syntax.Pat_Alternative -> Phantoms.TTerm Syntax.Pat
-pat_AlternativeLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_AlternativeRhs :: Phantoms.TTerm Syntax.Pat_Alternative -> Phantoms.TTerm Syntax.Pat
-pat_AlternativeRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_AlternativeWithLhs :: Phantoms.TTerm Syntax.Pat_Alternative -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Alternative
-pat_AlternativeWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_AlternativeWithRhs :: Phantoms.TTerm Syntax.Pat_Alternative -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Alternative
-pat_AlternativeWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Alternative"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Bind :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Bind
-pat_Bind lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-pat_BindLhs :: Phantoms.TTerm Syntax.Pat_Bind -> Phantoms.TTerm Syntax.Pat
-pat_BindLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_BindRhs :: Phantoms.TTerm Syntax.Pat_Bind -> Phantoms.TTerm Syntax.Pat
-pat_BindRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_BindWithLhs :: Phantoms.TTerm Syntax.Pat_Bind -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Bind
-pat_BindWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_BindWithRhs :: Phantoms.TTerm Syntax.Pat_Bind -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Bind
-pat_BindWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Bind"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Extract :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_Extract
-pat_Extract fun args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Phantoms.unTTerm fun)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-pat_ExtractArgs :: Phantoms.TTerm Syntax.Pat_Extract -> Phantoms.TTerm [Syntax.Pat]
-pat_ExtractArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_ExtractFun :: Phantoms.TTerm Syntax.Pat_Extract -> Phantoms.TTerm Syntax.Data
-pat_ExtractFun x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-        Core.projectionField = (Core.Name "fun")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_ExtractInfix :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_ExtractInfix
-pat_ExtractInfix lhs op rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-pat_ExtractInfixLhs :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm Syntax.Pat
-pat_ExtractInfixLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_ExtractInfixOp :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm Syntax.Data_Name
-pat_ExtractInfixOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_ExtractInfixRhs :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm [Syntax.Pat]
-pat_ExtractInfixRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_ExtractInfixWithLhs :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_ExtractInfix
-pat_ExtractInfixWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_ExtractInfixWithOp :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pat_ExtractInfix
-pat_ExtractInfixWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_ExtractInfixWithRhs :: Phantoms.TTerm Syntax.Pat_ExtractInfix -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_ExtractInfix
-pat_ExtractInfixWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_ExtractInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_ExtractWithArgs :: Phantoms.TTerm Syntax.Pat_Extract -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_Extract
-pat_ExtractWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-              Core.projectionField = (Core.Name "fun")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_ExtractWithFun :: Phantoms.TTerm Syntax.Pat_Extract -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Pat_Extract
-pat_ExtractWithFun original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fun"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Extract"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_Given :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Pat_Given
-pat_Given tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-pat_GivenTpe :: Phantoms.TTerm Syntax.Pat_Given -> Phantoms.TTerm Syntax.Type
-pat_GivenTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Given"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_GivenWithTpe :: Phantoms.TTerm Syntax.Pat_Given -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Pat_Given
-pat_GivenWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Given"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Interpolate :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm Syntax.Pat_Interpolate
-pat_Interpolate prefix parts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm prefix)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm parts)}]}))
-
-pat_InterpolateParts :: Phantoms.TTerm Syntax.Pat_Interpolate -> Phantoms.TTerm [Syntax.Lit]
-pat_InterpolateParts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-        Core.projectionField = (Core.Name "parts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_InterpolatePrefix :: Phantoms.TTerm Syntax.Pat_Interpolate -> Phantoms.TTerm Syntax.Data_Name
-pat_InterpolatePrefix x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-        Core.projectionField = (Core.Name "prefix")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_InterpolateWithParts :: Phantoms.TTerm Syntax.Pat_Interpolate -> Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm Syntax.Pat_Interpolate
-pat_InterpolateWithParts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-              Core.projectionField = (Core.Name "prefix")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_InterpolateWithPrefix :: Phantoms.TTerm Syntax.Pat_Interpolate -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pat_Interpolate
-pat_InterpolateWithPrefix original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "prefix"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Interpolate"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_Macro :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Pat_Macro
-pat_Macro body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-pat_MacroBody :: Phantoms.TTerm Syntax.Pat_Macro -> Phantoms.TTerm Syntax.Data
-pat_MacroBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Macro"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_MacroWithBody :: Phantoms.TTerm Syntax.Pat_Macro -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Pat_Macro
-pat_MacroWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Repeated :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pat_Repeated
-pat_Repeated name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Repeated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-pat_RepeatedName :: Phantoms.TTerm Syntax.Pat_Repeated -> Phantoms.TTerm Syntax.Data_Name
-pat_RepeatedName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Repeated"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_RepeatedWithName :: Phantoms.TTerm Syntax.Pat_Repeated -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pat_Repeated
-pat_RepeatedWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Repeated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Tuple :: Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_Tuple
-pat_Tuple args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Tuple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-pat_TupleArgs :: Phantoms.TTerm Syntax.Pat_Tuple -> Phantoms.TTerm [Syntax.Pat]
-pat_TupleArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Tuple"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_TupleWithArgs :: Phantoms.TTerm Syntax.Pat_Tuple -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_Tuple
-pat_TupleWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Tuple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Typed :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Pat_Typed
-pat_Typed lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-pat_TypedLhs :: Phantoms.TTerm Syntax.Pat_Typed -> Phantoms.TTerm Syntax.Pat
-pat_TypedLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_TypedRhs :: Phantoms.TTerm Syntax.Pat_Typed -> Phantoms.TTerm Syntax.Type
-pat_TypedRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_TypedWithLhs :: Phantoms.TTerm Syntax.Pat_Typed -> Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Pat_Typed
-pat_TypedWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pat_TypedWithRhs :: Phantoms.TTerm Syntax.Pat_Typed -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Pat_Typed
-pat_TypedWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Typed"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Var :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pat_Var
-pat_Var name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-pat_VarName :: Phantoms.TTerm Syntax.Pat_Var -> Phantoms.TTerm Syntax.Data_Name
-pat_VarName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Var"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_VarWithName :: Phantoms.TTerm Syntax.Pat_Var -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pat_Var
-pat_VarWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_Xml :: Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_Xml
-pat_Xml parts args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm parts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-pat_XmlArgs :: Phantoms.TTerm Syntax.Pat_Xml -> Phantoms.TTerm [Syntax.Pat]
-pat_XmlArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_XmlParts :: Phantoms.TTerm Syntax.Pat_Xml -> Phantoms.TTerm [Syntax.Lit]
-pat_XmlParts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-        Core.projectionField = (Core.Name "parts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pat_XmlWithArgs :: Phantoms.TTerm Syntax.Pat_Xml -> Phantoms.TTerm [Syntax.Pat] -> Phantoms.TTerm Syntax.Pat_Xml
-pat_XmlWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-              Core.projectionField = (Core.Name "parts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pat_XmlWithParts :: Phantoms.TTerm Syntax.Pat_Xml -> Phantoms.TTerm [Syntax.Lit] -> Phantoms.TTerm Syntax.Pat_Xml
-pat_XmlWithParts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pat_Xml"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pkg :: Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Pkg
-pkg name ref stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm ref)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-pkgName :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm Syntax.Data_Name
-pkgName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pkgRef :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm Syntax.Data_Ref
-pkgRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-        Core.projectionField = (Core.Name "ref")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pkgStats :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm [Syntax.Stat]
-pkgStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pkgWithName :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pkg
-pkgWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pkgWithRef :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Pkg
-pkgWithRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pkgWithStats :: Phantoms.TTerm Syntax.Pkg -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Pkg
-pkgWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg"),
-              Core.projectionField = (Core.Name "ref")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pkg_Object :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Pkg_Object
-pkg_Object mods name template =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm template)}]}))
-
-pkg_ObjectMods :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm [Syntax.Mod]
-pkg_ObjectMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pkg_ObjectName :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm Syntax.Data_Name
-pkg_ObjectName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pkg_ObjectTemplate :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm Syntax.Template
-pkg_ObjectTemplate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-        Core.projectionField = (Core.Name "template")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pkg_ObjectWithMods :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Pkg_Object
-pkg_ObjectWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pkg_ObjectWithName :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm Syntax.Data_Name -> Phantoms.TTerm Syntax.Pkg_Object
-pkg_ObjectWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-              Core.projectionField = (Core.Name "template")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pkg_ObjectWithTemplate :: Phantoms.TTerm Syntax.Pkg_Object -> Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Pkg_Object
-pkg_ObjectWithTemplate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Pkg_Object"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "template"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-predefString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PredefString
-predefString x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.scala.syntax.PredefString"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-quasi :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.Quasi
-quasi x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.scala.syntax.Quasi"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-refInit :: Phantoms.TTerm Syntax.Init -> Phantoms.TTerm Syntax.Ref
-refInit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "init"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-refName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Ref
-refName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-scalaSymbol :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ScalaSymbol
-scalaSymbol name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.ScalaSymbol"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-scalaSymbolName :: Phantoms.TTerm Syntax.ScalaSymbol -> Phantoms.TTerm String
-scalaSymbolName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.ScalaSymbol"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scalaSymbolWithName :: Phantoms.TTerm Syntax.ScalaSymbol -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.ScalaSymbol
-scalaSymbolWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.ScalaSymbol"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-self :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.Self
-self x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.scala.syntax.Self"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-source :: Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Source
-source stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Source"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-sourceStats :: Phantoms.TTerm Syntax.Source -> Phantoms.TTerm [Syntax.Stat]
-sourceStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Source"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-sourceWithStats :: Phantoms.TTerm Syntax.Source -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Source
-sourceWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Source"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-statDecl :: Phantoms.TTerm Syntax.Decl -> Phantoms.TTerm Syntax.Stat
-statDecl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Stat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statDefn :: Phantoms.TTerm Syntax.Defn -> Phantoms.TTerm Syntax.Stat
-statDefn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Stat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "defn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statImportExport :: Phantoms.TTerm Syntax.ImportExportStat -> Phantoms.TTerm Syntax.Stat
-statImportExport x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Stat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "importExport"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statTerm :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Stat
-statTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Stat"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-template :: Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm [Syntax.Init] -> Phantoms.TTerm Syntax.Self -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Template
-template early inits self stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Template"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "early"),
-          Core.fieldTerm = (Phantoms.unTTerm early)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Phantoms.unTTerm inits)},
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Phantoms.unTTerm self)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-templateEarly :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm [Syntax.Stat]
-templateEarly x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-        Core.projectionField = (Core.Name "early")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateInits :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm [Syntax.Init]
-templateInits x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-        Core.projectionField = (Core.Name "inits")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateSelf :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Self
-templateSelf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-        Core.projectionField = (Core.Name "self")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateStats :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm [Syntax.Stat]
-templateStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-templateWithEarly :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Template
-templateWithEarly original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Template"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "early"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "self")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateWithInits :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm [Syntax.Init] -> Phantoms.TTerm Syntax.Template
-templateWithInits original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Template"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "early"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "early")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "self")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateWithSelf :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Self -> Phantoms.TTerm Syntax.Template
-templateWithSelf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Template"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "early"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "early")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-templateWithStats :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Template
-templateWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Template"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "early"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "early")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "inits"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "inits")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "self"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Template"),
-              Core.projectionField = (Core.Name "self")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-treeBounds :: Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm Syntax.Tree
-treeBounds x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bounds"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeCaseTree :: Phantoms.TTerm Syntax.CaseTree -> Phantoms.TTerm Syntax.Tree
-treeCaseTree x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "caseTree"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeCtor :: Phantoms.TTerm Syntax.Ctor -> Phantoms.TTerm Syntax.Tree
-treeCtor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ctor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeEnumerator :: Phantoms.TTerm Syntax.Enumerator -> Phantoms.TTerm Syntax.Tree
-treeEnumerator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enumerator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeImportee :: Phantoms.TTerm Syntax.Importee -> Phantoms.TTerm Syntax.Tree
-treeImportee x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "importee"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeImporter :: Phantoms.TTerm Syntax.Importer -> Phantoms.TTerm Syntax.Tree
-treeImporter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "importer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeMember :: Phantoms.TTerm Syntax.Member -> Phantoms.TTerm Syntax.Tree
-treeMember x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "member"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeMod :: Phantoms.TTerm Syntax.Mod -> Phantoms.TTerm Syntax.Tree
-treeMod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treePat :: Phantoms.TTerm Syntax.Pat -> Phantoms.TTerm Syntax.Tree
-treePat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pat"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeQuasi :: Phantoms.TTerm Syntax.Quasi -> Phantoms.TTerm Syntax.Tree
-treeQuasi x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "quasi"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeRef :: Phantoms.TTerm Syntax.Ref -> Phantoms.TTerm Syntax.Tree
-treeRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeSource :: Phantoms.TTerm Syntax.Source -> Phantoms.TTerm Syntax.Tree
-treeSource x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "source"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeStat :: Phantoms.TTerm Syntax.Stat -> Phantoms.TTerm Syntax.Tree
-treeStat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stat"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeTemplate :: Phantoms.TTerm Syntax.Template -> Phantoms.TTerm Syntax.Tree
-treeTemplate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "template"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-treeType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Tree
-treeType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Tree"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "type"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeAnd :: Phantoms.TTerm Syntax.Type_And -> Phantoms.TTerm Syntax.Type
-typeAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeAnnotate :: Phantoms.TTerm Syntax.Type_Annotate -> Phantoms.TTerm Syntax.Type
-typeAnnotate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeAnonymousName :: Phantoms.TTerm Syntax.Type_AnonymousName -> Phantoms.TTerm Syntax.Type
-typeAnonymousName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymousName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeApply :: Phantoms.TTerm Syntax.Type_Apply -> Phantoms.TTerm Syntax.Type
-typeApply x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "apply"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeApplyInfix :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type
-typeApplyInfix x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "applyInfix"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeBounds :: Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.TypeBounds
-typeBounds lo hi =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lo"),
-          Core.fieldTerm = (Phantoms.unTTerm lo)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hi"),
-          Core.fieldTerm = (Phantoms.unTTerm hi)}]}))
-
-typeBoundsHi :: Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm (Maybe Syntax.Type)
-typeBoundsHi x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-        Core.projectionField = (Core.Name "hi")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBoundsLo :: Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm (Maybe Syntax.Type)
-typeBoundsLo x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-        Core.projectionField = (Core.Name "lo")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeBoundsWithHi :: Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.TypeBounds
-typeBoundsWithHi original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lo"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-              Core.projectionField = (Core.Name "lo")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "hi"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeBoundsWithLo :: Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.TypeBounds
-typeBoundsWithLo original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lo"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "hi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeBounds"),
-              Core.projectionField = (Core.Name "hi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeByName :: Phantoms.TTerm Syntax.Type_ByName -> Phantoms.TTerm Syntax.Type
-typeByName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeCase :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeCase
-typeCase pat body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm pat)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-typeCaseBody :: Phantoms.TTerm Syntax.TypeCase -> Phantoms.TTerm Syntax.Type
-typeCaseBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCasePat :: Phantoms.TTerm Syntax.TypeCase -> Phantoms.TTerm Syntax.Type
-typeCasePat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-        Core.projectionField = (Core.Name "pat")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-typeCaseWithBody :: Phantoms.TTerm Syntax.TypeCase -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeCase
-typeCaseWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-              Core.projectionField = (Core.Name "pat")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-typeCaseWithPat :: Phantoms.TTerm Syntax.TypeCase -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeCase
-typeCaseWithPat original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pat"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.TypeCase"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-typeExistential :: Phantoms.TTerm Syntax.Type_Existential -> Phantoms.TTerm Syntax.Type
-typeExistential x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "existential"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeFunctionType :: Phantoms.TTerm Syntax.Type_FunctionType -> Phantoms.TTerm Syntax.Type
-typeFunctionType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "functionType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeImplicitFunction :: Phantoms.TTerm Syntax.Type_ImplicitFunction -> Phantoms.TTerm Syntax.Type
-typeImplicitFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "implicitFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeLambda :: Phantoms.TTerm Syntax.Type_Lambda -> Phantoms.TTerm Syntax.Type
-typeLambda x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeMacro :: Phantoms.TTerm Syntax.Type_Macro -> Phantoms.TTerm Syntax.Type
-typeMacro x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "macro"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeMatch :: Phantoms.TTerm Syntax.Type_Match -> Phantoms.TTerm Syntax.Type
-typeMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeMethod :: Phantoms.TTerm Syntax.Type_Method -> Phantoms.TTerm Syntax.Type
-typeMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeOr :: Phantoms.TTerm Syntax.Type_Or -> Phantoms.TTerm Syntax.Type
-typeOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typePlaceholder :: Phantoms.TTerm Syntax.Type_Placeholder -> Phantoms.TTerm Syntax.Type
-typePlaceholder x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "placeholder"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typePolyFunction :: Phantoms.TTerm Syntax.Type_PolyFunction -> Phantoms.TTerm Syntax.Type
-typePolyFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "polyFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeRef :: Phantoms.TTerm Syntax.Type_Ref -> Phantoms.TTerm Syntax.Type
-typeRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ref"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeRefine :: Phantoms.TTerm Syntax.Type_Refine -> Phantoms.TTerm Syntax.Type
-typeRefine x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "refine"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeRepeated :: Phantoms.TTerm Syntax.Type_Repeated -> Phantoms.TTerm Syntax.Type
-typeRepeated x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeated"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeTuple :: Phantoms.TTerm Syntax.Type_Tuple -> Phantoms.TTerm Syntax.Type
-typeTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeTypedParam :: Phantoms.TTerm Syntax.Type_TypedParam -> Phantoms.TTerm Syntax.Type
-typeTypedParam x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typedParam"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeVar :: Phantoms.TTerm Syntax.Type_Var -> Phantoms.TTerm Syntax.Type
-typeVar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "var"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeWith :: Phantoms.TTerm Syntax.Type_With -> Phantoms.TTerm Syntax.Type
-typeWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "with"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_And :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_And
-type_And lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-type_AndLhs :: Phantoms.TTerm Syntax.Type_And -> Phantoms.TTerm Syntax.Type
-type_AndLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_AndRhs :: Phantoms.TTerm Syntax.Type_And -> Phantoms.TTerm Syntax.Type
-type_AndRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_AndWithLhs :: Phantoms.TTerm Syntax.Type_And -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_And
-type_AndWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_AndWithRhs :: Phantoms.TTerm Syntax.Type_And -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_And
-type_AndWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_And"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Annotate :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.Mod_Annot] -> Phantoms.TTerm Syntax.Type_Annotate
-type_Annotate tpe annots =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annots"),
-          Core.fieldTerm = (Phantoms.unTTerm annots)}]}))
-
-type_AnnotateAnnots :: Phantoms.TTerm Syntax.Type_Annotate -> Phantoms.TTerm [Syntax.Mod_Annot]
-type_AnnotateAnnots x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-        Core.projectionField = (Core.Name "annots")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_AnnotateTpe :: Phantoms.TTerm Syntax.Type_Annotate -> Phantoms.TTerm Syntax.Type
-type_AnnotateTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_AnnotateWithAnnots :: Phantoms.TTerm Syntax.Type_Annotate -> Phantoms.TTerm [Syntax.Mod_Annot] -> Phantoms.TTerm Syntax.Type_Annotate
-type_AnnotateWithAnnots original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annots"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_AnnotateWithTpe :: Phantoms.TTerm Syntax.Type_Annotate -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Annotate
-type_AnnotateWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "annots"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Annotate"),
-              Core.projectionField = (Core.Name "annots")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_AnonymousName :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.Type_AnonymousName
-type_AnonymousName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.scala.syntax.Type_AnonymousName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-type_Apply :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Apply
-type_Apply tpe args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-type_ApplyArgs :: Phantoms.TTerm Syntax.Type_Apply -> Phantoms.TTerm [Syntax.Type]
-type_ApplyArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ApplyInfix :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ApplyInfix
-type_ApplyInfix lhs op rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm op)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-type_ApplyInfixLhs :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type
-type_ApplyInfixLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ApplyInfixOp :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type_Name
-type_ApplyInfixOp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-        Core.projectionField = (Core.Name "op")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ApplyInfixRhs :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type
-type_ApplyInfixRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ApplyInfixWithLhs :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ApplyInfix
-type_ApplyInfixWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ApplyInfixWithOp :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_ApplyInfix
-type_ApplyInfixWithOp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ApplyInfixWithRhs :: Phantoms.TTerm Syntax.Type_ApplyInfix -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ApplyInfix
-type_ApplyInfixWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ApplyInfix"),
-              Core.projectionField = (Core.Name "op")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ApplyTpe :: Phantoms.TTerm Syntax.Type_Apply -> Phantoms.TTerm Syntax.Type
-type_ApplyTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ApplyWithArgs :: Phantoms.TTerm Syntax.Type_Apply -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Apply
-type_ApplyWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ApplyWithTpe :: Phantoms.TTerm Syntax.Type_Apply -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Apply
-type_ApplyWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Apply"),
-              Core.projectionField = (Core.Name "args")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ByName :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ByName
-type_ByName tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ByName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-type_ByNameTpe :: Phantoms.TTerm Syntax.Type_ByName -> Phantoms.TTerm Syntax.Type
-type_ByNameTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ByName"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ByNameWithTpe :: Phantoms.TTerm Syntax.Type_ByName -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ByName
-type_ByNameWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ByName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ContextFunction :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ContextFunction
-type_ContextFunction params res =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Phantoms.unTTerm res)}]}))
-
-type_ContextFunctionParams :: Phantoms.TTerm Syntax.Type_ContextFunction -> Phantoms.TTerm [Syntax.Type]
-type_ContextFunctionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ContextFunctionRes :: Phantoms.TTerm Syntax.Type_ContextFunction -> Phantoms.TTerm Syntax.Type
-type_ContextFunctionRes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-        Core.projectionField = (Core.Name "res")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ContextFunctionWithParams :: Phantoms.TTerm Syntax.Type_ContextFunction -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_ContextFunction
-type_ContextFunctionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-              Core.projectionField = (Core.Name "res")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ContextFunctionWithRes :: Phantoms.TTerm Syntax.Type_ContextFunction -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ContextFunction
-type_ContextFunctionWithRes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ContextFunction"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Existential :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Type_Existential
-type_Existential tpe stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-type_ExistentialStats :: Phantoms.TTerm Syntax.Type_Existential -> Phantoms.TTerm [Syntax.Stat]
-type_ExistentialStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ExistentialTpe :: Phantoms.TTerm Syntax.Type_Existential -> Phantoms.TTerm Syntax.Type
-type_ExistentialTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ExistentialWithStats :: Phantoms.TTerm Syntax.Type_Existential -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Type_Existential
-type_ExistentialWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ExistentialWithTpe :: Phantoms.TTerm Syntax.Type_Existential -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Existential
-type_ExistentialWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Existential"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_Function :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Function
-type_Function params res =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Phantoms.unTTerm res)}]}))
-
-type_FunctionParams :: Phantoms.TTerm Syntax.Type_Function -> Phantoms.TTerm [Syntax.Type]
-type_FunctionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_FunctionRes :: Phantoms.TTerm Syntax.Type_Function -> Phantoms.TTerm Syntax.Type
-type_FunctionRes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-        Core.projectionField = (Core.Name "res")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_FunctionTypeContextFunction :: Phantoms.TTerm Syntax.Type_ContextFunction -> Phantoms.TTerm Syntax.Type_FunctionType
-type_FunctionTypeContextFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type_FunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "contextFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_FunctionTypeFunction :: Phantoms.TTerm Syntax.Type_Function -> Phantoms.TTerm Syntax.Type_FunctionType
-type_FunctionTypeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type_FunctionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_FunctionWithParams :: Phantoms.TTerm Syntax.Type_Function -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Function
-type_FunctionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-              Core.projectionField = (Core.Name "res")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_FunctionWithRes :: Phantoms.TTerm Syntax.Type_Function -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Function
-type_FunctionWithRes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Function"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ImplicitFunction :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ImplicitFunction
-type_ImplicitFunction params res =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Phantoms.unTTerm res)}]}))
-
-type_ImplicitFunctionParams :: Phantoms.TTerm Syntax.Type_ImplicitFunction -> Phantoms.TTerm [Syntax.Type]
-type_ImplicitFunctionParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ImplicitFunctionRes :: Phantoms.TTerm Syntax.Type_ImplicitFunction -> Phantoms.TTerm Syntax.Type
-type_ImplicitFunctionRes x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-        Core.projectionField = (Core.Name "res")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ImplicitFunctionWithParams :: Phantoms.TTerm Syntax.Type_ImplicitFunction -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_ImplicitFunction
-type_ImplicitFunctionWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-              Core.projectionField = (Core.Name "res")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ImplicitFunctionWithRes :: Phantoms.TTerm Syntax.Type_ImplicitFunction -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_ImplicitFunction
-type_ImplicitFunctionWithRes original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_ImplicitFunction"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "res"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Lambda :: Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Lambda
-type_Lambda tparams tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-type_LambdaTparams :: Phantoms.TTerm Syntax.Type_Lambda -> Phantoms.TTerm [Syntax.Type_Param]
-type_LambdaTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_LambdaTpe :: Phantoms.TTerm Syntax.Type_Lambda -> Phantoms.TTerm Syntax.Type
-type_LambdaTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_LambdaWithTparams :: Phantoms.TTerm Syntax.Type_Lambda -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Type_Lambda
-type_LambdaWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_LambdaWithTpe :: Phantoms.TTerm Syntax.Type_Lambda -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Lambda
-type_LambdaWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Lambda"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Macro :: Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Type_Macro
-type_Macro body =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)}]}))
-
-type_MacroBody :: Phantoms.TTerm Syntax.Type_Macro -> Phantoms.TTerm Syntax.Data
-type_MacroBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Macro"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_MacroWithBody :: Phantoms.TTerm Syntax.Type_Macro -> Phantoms.TTerm Syntax.Data -> Phantoms.TTerm Syntax.Type_Macro
-type_MacroWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Macro"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Match :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm [Syntax.TypeCase] -> Phantoms.TTerm Syntax.Type_Match
-type_Match tpe cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-
-type_MatchCases :: Phantoms.TTerm Syntax.Type_Match -> Phantoms.TTerm [Syntax.TypeCase]
-type_MatchCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_MatchTpe :: Phantoms.TTerm Syntax.Type_Match -> Phantoms.TTerm Syntax.Type
-type_MatchTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_MatchWithCases :: Phantoms.TTerm Syntax.Type_Match -> Phantoms.TTerm [Syntax.TypeCase] -> Phantoms.TTerm Syntax.Type_Match
-type_MatchWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_MatchWithTpe :: Phantoms.TTerm Syntax.Type_Match -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Match
-type_MatchWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Match"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_Method :: Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Method
-type_Method paramss tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm paramss)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-type_MethodParamss :: Phantoms.TTerm Syntax.Type_Method -> Phantoms.TTerm [[Syntax.Data_Param]]
-type_MethodParamss x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-        Core.projectionField = (Core.Name "paramss")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_MethodTpe :: Phantoms.TTerm Syntax.Type_Method -> Phantoms.TTerm Syntax.Type
-type_MethodTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_MethodWithParamss :: Phantoms.TTerm Syntax.Type_Method -> Phantoms.TTerm [[Syntax.Data_Param]] -> Phantoms.TTerm Syntax.Type_Method
-type_MethodWithParamss original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_MethodWithTpe :: Phantoms.TTerm Syntax.Type_Method -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Method
-type_MethodWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "paramss"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Method"),
-              Core.projectionField = (Core.Name "paramss")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Name :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type_Name
-type_Name value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Name"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-type_NameValue :: Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm String
-type_NameValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Name"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_NameWithValue :: Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.Type_Name
-type_NameWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Name"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Or :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Or
-type_Or lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-type_OrLhs :: Phantoms.TTerm Syntax.Type_Or -> Phantoms.TTerm Syntax.Type
-type_OrLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_OrRhs :: Phantoms.TTerm Syntax.Type_Or -> Phantoms.TTerm Syntax.Type
-type_OrRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_OrWithLhs :: Phantoms.TTerm Syntax.Type_Or -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Or
-type_OrWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_OrWithRhs :: Phantoms.TTerm Syntax.Type_Or -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Or
-type_OrWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Or"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Param :: Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm [Syntax.TypeBounds] -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Param
-type_Param mods name tparams tbounds vbounds cbounds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm mods)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Phantoms.unTTerm tbounds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Phantoms.unTTerm vbounds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Phantoms.unTTerm cbounds)}]}))
-
-type_ParamCbounds :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Type]
-type_ParamCbounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-        Core.projectionField = (Core.Name "cbounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ParamMods :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Mod]
-type_ParamMods x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-        Core.projectionField = (Core.Name "mods")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ParamName :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm Syntax.Name
-type_ParamName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ParamTbounds :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.TypeBounds]
-type_ParamTbounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-        Core.projectionField = (Core.Name "tbounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ParamTparams :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Type_Param]
-type_ParamTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ParamVbounds :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Type]
-type_ParamVbounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-        Core.projectionField = (Core.Name "vbounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ParamWithCbounds :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Param
-type_ParamWithCbounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "vbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ParamWithMods :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Mod] -> Phantoms.TTerm Syntax.Type_Param
-type_ParamWithMods original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "vbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "cbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ParamWithName :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type_Param
-type_ParamWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "vbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "cbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ParamWithTbounds :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.TypeBounds] -> Phantoms.TTerm Syntax.Type_Param
-type_ParamWithTbounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "vbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "cbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ParamWithTparams :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Type_Param
-type_ParamWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "vbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "cbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_ParamWithVbounds :: Phantoms.TTerm Syntax.Type_Param -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Param
-type_ParamWithVbounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "mods"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "mods")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "tbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vbounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cbounds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Param"),
-              Core.projectionField = (Core.Name "cbounds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_Placeholder :: Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm Syntax.Type_Placeholder
-type_Placeholder bounds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Placeholder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm bounds)}]}))
-
-type_PlaceholderBounds :: Phantoms.TTerm Syntax.Type_Placeholder -> Phantoms.TTerm Syntax.TypeBounds
-type_PlaceholderBounds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Placeholder"),
-        Core.projectionField = (Core.Name "bounds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_PlaceholderWithBounds :: Phantoms.TTerm Syntax.Type_Placeholder -> Phantoms.TTerm Syntax.TypeBounds -> Phantoms.TTerm Syntax.Type_Placeholder
-type_PlaceholderWithBounds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Placeholder"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bounds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_PolyFunction :: Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_PolyFunction
-type_PolyFunction tparams tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm tparams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-type_PolyFunctionTparams :: Phantoms.TTerm Syntax.Type_PolyFunction -> Phantoms.TTerm [Syntax.Type_Param]
-type_PolyFunctionTparams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-        Core.projectionField = (Core.Name "tparams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_PolyFunctionTpe :: Phantoms.TTerm Syntax.Type_PolyFunction -> Phantoms.TTerm Syntax.Type
-type_PolyFunctionTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_PolyFunctionWithTparams :: Phantoms.TTerm Syntax.Type_PolyFunction -> Phantoms.TTerm [Syntax.Type_Param] -> Phantoms.TTerm Syntax.Type_PolyFunction
-type_PolyFunctionWithTparams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_PolyFunctionWithTpe :: Phantoms.TTerm Syntax.Type_PolyFunction -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_PolyFunction
-type_PolyFunctionWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tparams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_PolyFunction"),
-              Core.projectionField = (Core.Name "tparams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Project :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Project
-type_Project qual name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm qual)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-type_ProjectName :: Phantoms.TTerm Syntax.Type_Project -> Phantoms.TTerm Syntax.Type_Name
-type_ProjectName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ProjectQual :: Phantoms.TTerm Syntax.Type_Project -> Phantoms.TTerm Syntax.Type
-type_ProjectQual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-        Core.projectionField = (Core.Name "qual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_ProjectWithName :: Phantoms.TTerm Syntax.Type_Project -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Project
-type_ProjectWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-              Core.projectionField = (Core.Name "qual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_ProjectWithQual :: Phantoms.TTerm Syntax.Type_Project -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Project
-type_ProjectWithQual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Project"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_RefName :: Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Ref
-type_RefName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_RefProject :: Phantoms.TTerm Syntax.Type_Project -> Phantoms.TTerm Syntax.Type_Ref
-type_RefProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_RefSelect :: Phantoms.TTerm Syntax.Type_Select -> Phantoms.TTerm Syntax.Type_Ref
-type_RefSelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_RefSingleton :: Phantoms.TTerm Syntax.Type_Singleton -> Phantoms.TTerm Syntax.Type_Ref
-type_RefSingleton x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.scala.syntax.Type_Ref"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "singleton"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-type_Refine :: Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Type_Refine
-type_Refine tpe stats =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm stats)}]}))
-
-type_RefineStats :: Phantoms.TTerm Syntax.Type_Refine -> Phantoms.TTerm [Syntax.Stat]
-type_RefineStats x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-        Core.projectionField = (Core.Name "stats")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_RefineTpe :: Phantoms.TTerm Syntax.Type_Refine -> Phantoms.TTerm (Maybe Syntax.Type)
-type_RefineTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_RefineWithStats :: Phantoms.TTerm Syntax.Type_Refine -> Phantoms.TTerm [Syntax.Stat] -> Phantoms.TTerm Syntax.Type_Refine
-type_RefineWithStats original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-              Core.projectionField = (Core.Name "tpe")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_RefineWithTpe :: Phantoms.TTerm Syntax.Type_Refine -> Phantoms.TTerm (Maybe Syntax.Type) -> Phantoms.TTerm Syntax.Type_Refine
-type_RefineWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stats"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Refine"),
-              Core.projectionField = (Core.Name "stats")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_Repeated :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Repeated
-type_Repeated tpe =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Repeated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm tpe)}]}))
-
-type_RepeatedTpe :: Phantoms.TTerm Syntax.Type_Repeated -> Phantoms.TTerm Syntax.Type
-type_RepeatedTpe x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Repeated"),
-        Core.projectionField = (Core.Name "tpe")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_RepeatedWithTpe :: Phantoms.TTerm Syntax.Type_Repeated -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_Repeated
-type_RepeatedWithTpe original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Repeated"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "tpe"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Select :: Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Select
-type_Select qual name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm qual)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-type_SelectName :: Phantoms.TTerm Syntax.Type_Select -> Phantoms.TTerm Syntax.Type_Name
-type_SelectName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_SelectQual :: Phantoms.TTerm Syntax.Type_Select -> Phantoms.TTerm Syntax.Data_Ref
-type_SelectQual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-        Core.projectionField = (Core.Name "qual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_SelectWithName :: Phantoms.TTerm Syntax.Type_Select -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Select
-type_SelectWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-              Core.projectionField = (Core.Name "qual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_SelectWithQual :: Phantoms.TTerm Syntax.Type_Select -> Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Type_Select
-type_SelectWithQual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Select"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_Singleton :: Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Type_Singleton
-type_Singleton ref =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Singleton"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm ref)}]}))
-
-type_SingletonRef :: Phantoms.TTerm Syntax.Type_Singleton -> Phantoms.TTerm Syntax.Data_Ref
-type_SingletonRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Singleton"),
-        Core.projectionField = (Core.Name "ref")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_SingletonWithRef :: Phantoms.TTerm Syntax.Type_Singleton -> Phantoms.TTerm Syntax.Data_Ref -> Phantoms.TTerm Syntax.Type_Singleton
-type_SingletonWithRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Singleton"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ref"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Tuple :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Tuple
-type_Tuple args =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Tuple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm args)}]}))
-
-type_TupleArgs :: Phantoms.TTerm Syntax.Type_Tuple -> Phantoms.TTerm [Syntax.Type]
-type_TupleArgs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Tuple"),
-        Core.projectionField = (Core.Name "args")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_TupleWithArgs :: Phantoms.TTerm Syntax.Type_Tuple -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type_Tuple
-type_TupleWithArgs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Tuple"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "args"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_TypedParam :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_TypedParam
-type_TypedParam name typ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typ"),
-          Core.fieldTerm = (Phantoms.unTTerm typ)}]}))
-
-type_TypedParamName :: Phantoms.TTerm Syntax.Type_TypedParam -> Phantoms.TTerm Syntax.Name
-type_TypedParamName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_TypedParamTyp :: Phantoms.TTerm Syntax.Type_TypedParam -> Phantoms.TTerm Syntax.Type
-type_TypedParamTyp x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-        Core.projectionField = (Core.Name "typ")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_TypedParamWithName :: Phantoms.TTerm Syntax.Type_TypedParam -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type_TypedParam
-type_TypedParamWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typ"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-              Core.projectionField = (Core.Name "typ")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_TypedParamWithTyp :: Phantoms.TTerm Syntax.Type_TypedParam -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_TypedParam
-type_TypedParamWithTyp original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_TypedParam"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typ"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_Var :: Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Var
-type_Var name =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)}]}))
-
-type_VarName :: Phantoms.TTerm Syntax.Type_Var -> Phantoms.TTerm Syntax.Type_Name
-type_VarName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_Var"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_VarWithName :: Phantoms.TTerm Syntax.Type_Var -> Phantoms.TTerm Syntax.Type_Name -> Phantoms.TTerm Syntax.Type_Var
-type_VarWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_Var"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-type_With :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_With
-type_With lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-type_WithLhs :: Phantoms.TTerm Syntax.Type_With -> Phantoms.TTerm Syntax.Type
-type_WithLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_WithRhs :: Phantoms.TTerm Syntax.Type_With -> Phantoms.TTerm Syntax.Type
-type_WithRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-type_WithWithLhs :: Phantoms.TTerm Syntax.Type_With -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_With
-type_WithWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-type_WithWithRhs :: Phantoms.TTerm Syntax.Type_With -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type_With
-type_WithWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.scala.syntax.Type_With"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unData_Anonymous :: Phantoms.TTerm Syntax.Data_Anonymous -> Phantoms.TTerm ()
-unData_Anonymous x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.scala.syntax.Data_Anonymous")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unData_This :: Phantoms.TTerm Syntax.Data_This -> Phantoms.TTerm ()
-unData_This x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.scala.syntax.Data_This")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPredefString :: Phantoms.TTerm Syntax.PredefString -> Phantoms.TTerm String
-unPredefString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.scala.syntax.PredefString")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unQuasi :: Phantoms.TTerm Syntax.Quasi -> Phantoms.TTerm ()
-unQuasi x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.scala.syntax.Quasi")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSelf :: Phantoms.TTerm Syntax.Self -> Phantoms.TTerm ()
-unSelf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.scala.syntax.Self")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unType_AnonymousName :: Phantoms.TTerm Syntax.Type_AnonymousName -> Phantoms.TTerm ()
-unType_AnonymousName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.scala.syntax.Type_AnonymousName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Shacl/Model.hs b/src/main/haskell/Hydra/Dsl/Shacl/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Shacl/Model.hs
+++ /dev/null
@@ -1,1735 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.shacl.model
-
-module Hydra.Dsl.Shacl.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Rdf.Syntax as Syntax
-import qualified Hydra.Shacl.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-
-closed :: Phantoms.TTerm Bool -> Phantoms.TTerm (Maybe (S.Set Syntax.Property)) -> Phantoms.TTerm Model.Closed
-closed isClosed ignoredProperties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Closed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isClosed"),
-          Core.fieldTerm = (Phantoms.unTTerm isClosed)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignoredProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm ignoredProperties)}]}))
-
-closedIgnoredProperties :: Phantoms.TTerm Model.Closed -> Phantoms.TTerm (Maybe (S.Set Syntax.Property))
-closedIgnoredProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.Closed"),
-        Core.projectionField = (Core.Name "ignoredProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedIsClosed :: Phantoms.TTerm Model.Closed -> Phantoms.TTerm Bool
-closedIsClosed x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.Closed"),
-        Core.projectionField = (Core.Name "isClosed")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-closedWithIgnoredProperties :: Phantoms.TTerm Model.Closed -> Phantoms.TTerm (Maybe (S.Set Syntax.Property)) -> Phantoms.TTerm Model.Closed
-closedWithIgnoredProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Closed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isClosed"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.Closed"),
-              Core.projectionField = (Core.Name "isClosed")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignoredProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-closedWithIsClosed :: Phantoms.TTerm Model.Closed -> Phantoms.TTerm Bool -> Phantoms.TTerm Model.Closed
-closedWithIsClosed original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Closed"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "isClosed"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ignoredProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.Closed"),
-              Core.projectionField = (Core.Name "ignoredProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonConstraintAnd :: Phantoms.TTerm (S.Set (Model.Reference Model.Shape)) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintClass :: Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintClass x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "class"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintClosed :: Phantoms.TTerm Model.Closed -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintClosed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "closed"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintDatatype :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintDatatype x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datatype"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintDisjoint :: Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintDisjoint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjoint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintEquals :: Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintEquals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintHasValue :: Phantoms.TTerm (S.Set Syntax.Node) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintHasValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintIn :: Phantoms.TTerm [Syntax.Node] -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintLanguageIn :: Phantoms.TTerm (S.Set Syntax.LanguageTag) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintLanguageIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "languageIn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintMaxExclusive :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintMaxExclusive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxExclusive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintMaxInclusive :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintMaxInclusive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxInclusive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintMaxLength :: Phantoms.TTerm Integer -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintMaxLength x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxLength"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintMinExclusive :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintMinExclusive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minExclusive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintMinInclusive :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintMinInclusive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minInclusive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintMinLength :: Phantoms.TTerm Integer -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintMinLength x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minLength"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintNode :: Phantoms.TTerm (S.Set (Model.Reference Model.NodeShape)) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintNodeKind :: Phantoms.TTerm Model.NodeKind -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintNodeKind x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nodeKind"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintNot :: Phantoms.TTerm (S.Set (Model.Reference Model.Shape)) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintOr :: Phantoms.TTerm (S.Set (Model.Reference Model.Shape)) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintPattern :: Phantoms.TTerm Model.Pattern -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintPattern x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pattern"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintProperty :: Phantoms.TTerm (S.Set (Model.Reference Model.PropertyShape)) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonConstraintXone :: Phantoms.TTerm (S.Set (Model.Reference Model.Shape)) -> Phantoms.TTerm Model.CommonConstraint
-commonConstraintXone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.CommonConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "xone"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonProperties :: Phantoms.TTerm (S.Set Model.CommonConstraint) -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm Model.Severity -> Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm (S.Set Syntax.IriOrLiteral) -> Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.CommonProperties
-commonProperties constraints deactivated message severity targetClass targetNode targetObjectsOf targetSubjectsOf =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Phantoms.unTTerm deactivated)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm message)},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Phantoms.unTTerm severity)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Phantoms.unTTerm targetClass)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Phantoms.unTTerm targetNode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Phantoms.unTTerm targetObjectsOf)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Phantoms.unTTerm targetSubjectsOf)}]}))
-
-commonPropertiesConstraints :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Model.CommonConstraint)
-commonPropertiesConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesDeactivated :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (Maybe Bool)
-commonPropertiesDeactivated x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "deactivated")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesMessage :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Syntax.LangStrings
-commonPropertiesMessage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "message")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesSeverity :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Model.Severity
-commonPropertiesSeverity x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "severity")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesTargetClass :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.RdfsClass)
-commonPropertiesTargetClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "targetClass")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesTargetNode :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.IriOrLiteral)
-commonPropertiesTargetNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "targetNode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesTargetObjectsOf :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.Property)
-commonPropertiesTargetObjectsOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "targetObjectsOf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesTargetSubjectsOf :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.Property)
-commonPropertiesTargetSubjectsOf x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-        Core.projectionField = (Core.Name "targetSubjectsOf")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-commonPropertiesWithConstraints :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Model.CommonConstraint) -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithDeactivated :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithDeactivated original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithMessage :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithMessage original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithSeverity :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Model.Severity -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithSeverity original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithTargetClass :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.RdfsClass) -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithTargetClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithTargetNode :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.IriOrLiteral) -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithTargetNode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithTargetObjectsOf :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithTargetObjectsOf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetSubjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-commonPropertiesWithTargetSubjectsOf :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.CommonProperties
-commonPropertiesWithTargetSubjectsOf original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "deactivated"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "deactivated")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "message")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "severity"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "severity")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetClass"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetClass")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetNode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetNode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetObjectsOf"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.CommonProperties"),
-              Core.projectionField = (Core.Name "targetObjectsOf")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "targetSubjectsOf"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-definition :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm a -> Phantoms.TTerm (Model.Definition a)
-definition iri target =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Phantoms.unTTerm iri)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)}]}))
-
-definitionIri :: Phantoms.TTerm (Model.Definition a) -> Phantoms.TTerm Syntax.Iri
-definitionIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.Definition"),
-        Core.projectionField = (Core.Name "iri")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionTarget :: Phantoms.TTerm (Model.Definition a) -> Phantoms.TTerm a
-definitionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.Definition"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-definitionWithIri :: Phantoms.TTerm (Model.Definition a) -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm (Model.Definition a)
-definitionWithIri original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.Definition"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-definitionWithTarget :: Phantoms.TTerm (Model.Definition a) -> Phantoms.TTerm a -> Phantoms.TTerm (Model.Definition a)
-definitionWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Definition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.Definition"),
-              Core.projectionField = (Core.Name "iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeKindBlankNode :: Phantoms.TTerm Model.NodeKind
-nodeKindBlankNode =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.NodeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "blankNode"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeKindBlankNodeOrIri :: Phantoms.TTerm Model.NodeKind
-nodeKindBlankNodeOrIri =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.NodeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "blankNodeOrIri"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeKindBlankNodeOrLiteral :: Phantoms.TTerm Model.NodeKind
-nodeKindBlankNodeOrLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.NodeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "blankNodeOrLiteral"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeKindIri :: Phantoms.TTerm Model.NodeKind
-nodeKindIri =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.NodeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iri"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeKindIriOrLiteral :: Phantoms.TTerm Model.NodeKind
-nodeKindIriOrLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.NodeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iriOrLiteral"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeKindLiteral :: Phantoms.TTerm Model.NodeKind
-nodeKindLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.NodeKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nodeShape :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Model.NodeShape
-nodeShape common =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.NodeShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Phantoms.unTTerm common)}]}))
-
-nodeShapeCommon :: Phantoms.TTerm Model.NodeShape -> Phantoms.TTerm Model.CommonProperties
-nodeShapeCommon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.NodeShape"),
-        Core.projectionField = (Core.Name "common")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeShapeWithCommon :: Phantoms.TTerm Model.NodeShape -> Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Model.NodeShape
-nodeShapeWithCommon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.NodeShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pattern :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Model.Pattern
-pattern regex flags =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Phantoms.unTTerm regex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "flags"),
-          Core.fieldTerm = (Phantoms.unTTerm flags)}]}))
-
-patternFlags :: Phantoms.TTerm Model.Pattern -> Phantoms.TTerm (Maybe String)
-patternFlags x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-        Core.projectionField = (Core.Name "flags")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternRegex :: Phantoms.TTerm Model.Pattern -> Phantoms.TTerm String
-patternRegex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-        Core.projectionField = (Core.Name "regex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-patternWithFlags :: Phantoms.TTerm Model.Pattern -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Model.Pattern
-patternWithFlags original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-              Core.projectionField = (Core.Name "regex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "flags"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-patternWithRegex :: Phantoms.TTerm Model.Pattern -> Phantoms.TTerm String -> Phantoms.TTerm Model.Pattern
-patternWithRegex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "flags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.Pattern"),
-              Core.projectionField = (Core.Name "flags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShape :: Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm (S.Set Model.PropertyShapeConstraint) -> Phantoms.TTerm (Maybe Syntax.Node) -> Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Model.PropertyShape
-propertyShape common constraints defaultValue description name order path =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Phantoms.unTTerm common)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultValue)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm order)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm path)}]}))
-
-propertyShapeCommon :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Model.CommonProperties
-propertyShapeCommon x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "common")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapeConstraintLessThan :: Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.PropertyShapeConstraint
-propertyShapeConstraintLessThan x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.PropertyShapeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyShapeConstraintLessThanOrEquals :: Phantoms.TTerm (S.Set Syntax.Property) -> Phantoms.TTerm Model.PropertyShapeConstraint
-propertyShapeConstraintLessThanOrEquals x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.PropertyShapeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThanOrEquals"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyShapeConstraintMaxCount :: Phantoms.TTerm Integer -> Phantoms.TTerm Model.PropertyShapeConstraint
-propertyShapeConstraintMaxCount x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.PropertyShapeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxCount"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyShapeConstraintMinCount :: Phantoms.TTerm Integer -> Phantoms.TTerm Model.PropertyShapeConstraint
-propertyShapeConstraintMinCount x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.PropertyShapeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minCount"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyShapeConstraintQualifiedValueShape :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm Model.PropertyShapeConstraint
-propertyShapeConstraintQualifiedValueShape x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.PropertyShapeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qualifiedValueShape"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyShapeConstraintUniqueLang :: Phantoms.TTerm Bool -> Phantoms.TTerm Model.PropertyShapeConstraint
-propertyShapeConstraintUniqueLang x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.PropertyShapeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "uniqueLang"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyShapeConstraints :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm (S.Set Model.PropertyShapeConstraint)
-propertyShapeConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapeDefaultValue :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm (Maybe Syntax.Node)
-propertyShapeDefaultValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "defaultValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapeDescription :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Syntax.LangStrings
-propertyShapeDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapeName :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Syntax.LangStrings
-propertyShapeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapeOrder :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm (Maybe Integer)
-propertyShapeOrder x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "order")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapePath :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Syntax.Iri
-propertyShapePath x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-        Core.projectionField = (Core.Name "path")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyShapeWithCommon :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Model.CommonProperties -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithCommon original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShapeWithConstraints :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm (S.Set Model.PropertyShapeConstraint) -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "common")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShapeWithDefaultValue :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm (Maybe Syntax.Node) -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithDefaultValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "common")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShapeWithDescription :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "common")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShapeWithName :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Syntax.LangStrings -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "common")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShapeWithOrder :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm (Maybe Integer) -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithOrder original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "common")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "path")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyShapeWithPath :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Model.PropertyShape
-propertyShapeWithPath original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "common"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "common")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "defaultValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "order"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.PropertyShape"),
-              Core.projectionField = (Core.Name "order")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-qualifiedValueShape :: Phantoms.TTerm (Model.Reference Model.Shape) -> Phantoms.TTerm Integer -> Phantoms.TTerm Integer -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Model.QualifiedValueShape
-qualifiedValueShape qualifiedValueShape qualifiedMaxCount qualifiedMinCount qualifiedValueShapesDisjoint =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShape"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifiedValueShape)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMaxCount"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifiedMaxCount)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMinCount"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifiedMinCount)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShapesDisjoint"),
-          Core.fieldTerm = (Phantoms.unTTerm qualifiedValueShapesDisjoint)}]}))
-
-qualifiedValueShapeQualifiedMaxCount :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm Integer
-qualifiedValueShapeQualifiedMaxCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-        Core.projectionField = (Core.Name "qualifiedMaxCount")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedValueShapeQualifiedMinCount :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm Integer
-qualifiedValueShapeQualifiedMinCount x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-        Core.projectionField = (Core.Name "qualifiedMinCount")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedValueShapeQualifiedValueShape :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm (Model.Reference Model.Shape)
-qualifiedValueShapeQualifiedValueShape x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-        Core.projectionField = (Core.Name "qualifiedValueShape")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedValueShapeQualifiedValueShapesDisjoint :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm (Maybe Bool)
-qualifiedValueShapeQualifiedValueShapesDisjoint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-        Core.projectionField = (Core.Name "qualifiedValueShapesDisjoint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-qualifiedValueShapeWithQualifiedMaxCount :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm Integer -> Phantoms.TTerm Model.QualifiedValueShape
-qualifiedValueShapeWithQualifiedMaxCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShape"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedValueShape")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMaxCount"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShapesDisjoint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedValueShapesDisjoint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedValueShapeWithQualifiedMinCount :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm Integer -> Phantoms.TTerm Model.QualifiedValueShape
-qualifiedValueShapeWithQualifiedMinCount original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShape"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedValueShape")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMinCount"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShapesDisjoint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedValueShapesDisjoint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedValueShapeWithQualifiedValueShape :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm (Model.Reference Model.Shape) -> Phantoms.TTerm Model.QualifiedValueShape
-qualifiedValueShapeWithQualifiedValueShape original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShape"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShapesDisjoint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedValueShapesDisjoint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-qualifiedValueShapeWithQualifiedValueShapesDisjoint :: Phantoms.TTerm Model.QualifiedValueShape -> Phantoms.TTerm (Maybe Bool) -> Phantoms.TTerm Model.QualifiedValueShape
-qualifiedValueShapeWithQualifiedValueShapesDisjoint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShape"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedValueShape")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMaxCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedMaxCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedMinCount"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shacl.model.QualifiedValueShape"),
-              Core.projectionField = (Core.Name "qualifiedMinCount")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "qualifiedValueShapesDisjoint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-referenceAnonymous :: Phantoms.TTerm a -> Phantoms.TTerm (Model.Reference a)
-referenceAnonymous x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Reference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymous"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceDefinition :: Phantoms.TTerm (Model.Definition a) -> Phantoms.TTerm (Model.Reference a)
-referenceDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Reference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "definition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-referenceNamed :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm (Model.Reference a)
-referenceNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Reference"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-severityInfo :: Phantoms.TTerm Model.Severity
-severityInfo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Severity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "info"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-severityViolation :: Phantoms.TTerm Model.Severity
-severityViolation =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Severity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "violation"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-severityWarning :: Phantoms.TTerm Model.Severity
-severityWarning =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Severity"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "warning"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shapeNode :: Phantoms.TTerm Model.NodeShape -> Phantoms.TTerm Model.Shape
-shapeNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Shape"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "node"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeProperty :: Phantoms.TTerm Model.PropertyShape -> Phantoms.TTerm Model.Shape
-shapeProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shacl.model.Shape"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapesGraph :: Phantoms.TTerm (S.Set (Model.Definition Model.Shape)) -> Phantoms.TTerm Model.ShapesGraph
-shapesGraph x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shacl.model.ShapesGraph"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unShapesGraph :: Phantoms.TTerm Model.ShapesGraph -> Phantoms.TTerm (S.Set (Model.Definition Model.Shape))
-unShapesGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shacl.model.ShapesGraph")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Shex/Syntax.hs b/src/main/haskell/Hydra/Dsl/Shex/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Shex/Syntax.hs
+++ /dev/null
@@ -1,5639 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.shex.syntax
-
-module Hydra.Dsl.Shex.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Shex.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-annotation :: Phantoms.TTerm Syntax.Predicate -> Phantoms.TTerm Syntax.Annotation_Alts -> Phantoms.TTerm Syntax.Annotation
-annotation predicate alts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)}]}))
-
-annotationAlts :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.Annotation_Alts
-annotationAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationPredicate :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.Predicate
-annotationPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-        Core.projectionField = (Core.Name "Predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-annotationWithAlts :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.Annotation_Alts -> Phantoms.TTerm Syntax.Annotation
-annotationWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-              Core.projectionField = (Core.Name "Predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-annotationWithPredicate :: Phantoms.TTerm Syntax.Annotation -> Phantoms.TTerm Syntax.Predicate -> Phantoms.TTerm Syntax.Annotation
-annotationWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Annotation"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-annotation_AltsIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Annotation_Alts
-annotation_AltsIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Annotation_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-annotation_AltsLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Annotation_Alts
-annotation_AltsLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Annotation_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-atpNameLn :: Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm Syntax.AtpNameLn
-atpNameLn pnameNs pnLocal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Phantoms.unTTerm pnameNs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnLocal"),
-          Core.fieldTerm = (Phantoms.unTTerm pnLocal)}]}))
-
-atpNameLnPnLocal :: Phantoms.TTerm Syntax.AtpNameLn -> Phantoms.TTerm Syntax.PnLocal
-atpNameLnPnLocal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-        Core.projectionField = (Core.Name "PnLocal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atpNameLnPnameNs :: Phantoms.TTerm Syntax.AtpNameLn -> Phantoms.TTerm Syntax.PnameNs
-atpNameLnPnameNs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-        Core.projectionField = (Core.Name "PnameNs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-atpNameLnWithPnLocal :: Phantoms.TTerm Syntax.AtpNameLn -> Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm Syntax.AtpNameLn
-atpNameLnWithPnLocal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-              Core.projectionField = (Core.Name "PnameNs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnLocal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-atpNameLnWithPnameNs :: Phantoms.TTerm Syntax.AtpNameLn -> Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.AtpNameLn
-atpNameLnWithPnameNs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnLocal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.AtpNameLn"),
-              Core.projectionField = (Core.Name "PnLocal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-atpNameNs :: Phantoms.TTerm (Maybe Syntax.PnPrefix) -> Phantoms.TTerm Syntax.AtpNameNs
-atpNameNs x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.AtpNameNs"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-baseDecl :: Phantoms.TTerm Syntax.IriRef -> Phantoms.TTerm Syntax.BaseDecl
-baseDecl x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.BaseDecl"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-blankNode :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm Syntax.BlankNode
-blankNode x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.BlankNode"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-blankNodeLabel :: Phantoms.TTerm Syntax.BlankNodeLabel_Alts -> Phantoms.TTerm (Maybe [Syntax.BlankNodeLabel_ListOfAlts_Option_Elmt]) -> Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.BlankNodeLabel
-blankNodeLabel alts listOfAlts pnChars =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ListOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAlts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Phantoms.unTTerm pnChars)}]}))
-
-blankNodeLabelAlts :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm Syntax.BlankNodeLabel_Alts
-blankNodeLabelAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blankNodeLabelListOfAlts :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm (Maybe [Syntax.BlankNodeLabel_ListOfAlts_Option_Elmt])
-blankNodeLabelListOfAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-        Core.projectionField = (Core.Name "ListOfAlts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blankNodeLabelPnChars :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm Syntax.PnChars
-blankNodeLabelPnChars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-        Core.projectionField = (Core.Name "PnChars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-blankNodeLabelWithAlts :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm Syntax.BlankNodeLabel_Alts -> Phantoms.TTerm Syntax.BlankNodeLabel
-blankNodeLabelWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ListOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-              Core.projectionField = (Core.Name "ListOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-              Core.projectionField = (Core.Name "PnChars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-blankNodeLabelWithListOfAlts :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm (Maybe [Syntax.BlankNodeLabel_ListOfAlts_Option_Elmt]) -> Phantoms.TTerm Syntax.BlankNodeLabel
-blankNodeLabelWithListOfAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ListOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-              Core.projectionField = (Core.Name "PnChars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-blankNodeLabelWithPnChars :: Phantoms.TTerm Syntax.BlankNodeLabel -> Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.BlankNodeLabel
-blankNodeLabelWithPnChars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ListOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel"),
-              Core.projectionField = (Core.Name "ListOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-blankNodeLabel_AltsPnCharsU :: Phantoms.TTerm Syntax.PnCharsU -> Phantoms.TTerm Syntax.BlankNodeLabel_Alts
-blankNodeLabel_AltsPnCharsU x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnCharsU"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-blankNodeLabel_AltsRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.BlankNodeLabel_Alts
-blankNodeLabel_AltsRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-blankNodeLabel_ListOfAlts_Option_ElmtPeriod :: Phantoms.TTerm Syntax.BlankNodeLabel_ListOfAlts_Option_Elmt
-blankNodeLabel_ListOfAlts_Option_ElmtPeriod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel_ListOfAlts_Option_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Period"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-blankNodeLabel_ListOfAlts_Option_ElmtPnChars :: Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.BlankNodeLabel_ListOfAlts_Option_Elmt
-blankNodeLabel_ListOfAlts_Option_ElmtPnChars x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.BlankNodeLabel_ListOfAlts_Option_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnChars"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanLiteralFalse :: Phantoms.TTerm Syntax.BooleanLiteral
-booleanLiteralFalse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "False"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanLiteralTrue :: Phantoms.TTerm Syntax.BooleanLiteral
-booleanLiteralTrue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "True"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-bracketedTripleExpr :: Phantoms.TTerm Syntax.InnerTripleExpr -> Phantoms.TTerm (Maybe Syntax.Cardinality) -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm Syntax.BracketedTripleExpr
-bracketedTripleExpr innerTripleExpr cardinality listOfAnnotation semanticActions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InnerTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm innerTripleExpr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm cardinality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAnnotation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Phantoms.unTTerm semanticActions)}]}))
-
-bracketedTripleExprCardinality :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm (Maybe Syntax.Cardinality)
-bracketedTripleExprCardinality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-        Core.projectionField = (Core.Name "Cardinality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bracketedTripleExprInnerTripleExpr :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm Syntax.InnerTripleExpr
-bracketedTripleExprInnerTripleExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-        Core.projectionField = (Core.Name "InnerTripleExpr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bracketedTripleExprListOfAnnotation :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm [Syntax.Annotation]
-bracketedTripleExprListOfAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-        Core.projectionField = (Core.Name "listOfAnnotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bracketedTripleExprSemanticActions :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm Syntax.SemanticActions
-bracketedTripleExprSemanticActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-        Core.projectionField = (Core.Name "SemanticActions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-bracketedTripleExprWithCardinality :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm (Maybe Syntax.Cardinality) -> Phantoms.TTerm Syntax.BracketedTripleExpr
-bracketedTripleExprWithCardinality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InnerTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "InnerTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bracketedTripleExprWithInnerTripleExpr :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm Syntax.InnerTripleExpr -> Phantoms.TTerm Syntax.BracketedTripleExpr
-bracketedTripleExprWithInnerTripleExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InnerTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bracketedTripleExprWithListOfAnnotation :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.BracketedTripleExpr
-bracketedTripleExprWithListOfAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InnerTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "InnerTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-bracketedTripleExprWithSemanticActions :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm Syntax.BracketedTripleExpr
-bracketedTripleExprWithSemanticActions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InnerTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "InnerTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.BracketedTripleExpr"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-cardinalityAst :: Phantoms.TTerm Syntax.Cardinality
-cardinalityAst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Ast"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-cardinalityPlus :: Phantoms.TTerm Syntax.Cardinality
-cardinalityPlus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Plus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-cardinalityQuest :: Phantoms.TTerm Syntax.Cardinality
-cardinalityQuest =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Quest"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-cardinalityRepeatRange :: Phantoms.TTerm Syntax.RepeatRange -> Phantoms.TTerm Syntax.Cardinality
-cardinalityRepeatRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Cardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "RepeatRange"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-code :: Phantoms.TTerm [Syntax.Code_Elmt] -> Phantoms.TTerm Syntax.Code
-code x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Code"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-codeDecl :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.CodeDecl_Alts -> Phantoms.TTerm Syntax.CodeDecl
-codeDecl iri alts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Iri"),
-          Core.fieldTerm = (Phantoms.unTTerm iri)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)}]}))
-
-codeDeclAlts :: Phantoms.TTerm Syntax.CodeDecl -> Phantoms.TTerm Syntax.CodeDecl_Alts
-codeDeclAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-codeDeclIri :: Phantoms.TTerm Syntax.CodeDecl -> Phantoms.TTerm Syntax.Iri
-codeDeclIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-        Core.projectionField = (Core.Name "Iri")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-codeDeclWithAlts :: Phantoms.TTerm Syntax.CodeDecl -> Phantoms.TTerm Syntax.CodeDecl_Alts -> Phantoms.TTerm Syntax.CodeDecl
-codeDeclWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-              Core.projectionField = (Core.Name "Iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-codeDeclWithIri :: Phantoms.TTerm Syntax.CodeDecl -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.CodeDecl
-codeDeclWithIri original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Iri"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.CodeDecl"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-codeDecl_AltsCode :: Phantoms.TTerm Syntax.Code -> Phantoms.TTerm Syntax.CodeDecl_Alts
-codeDecl_AltsCode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.CodeDecl_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Code"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-codeDecl_AltsPercnt :: Phantoms.TTerm Syntax.CodeDecl_Alts
-codeDecl_AltsPercnt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.CodeDecl_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Percnt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-code_ElmtRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Code_Elmt
-code_ElmtRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Code_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-code_ElmtSequence :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Code_Elmt
-code_ElmtSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Code_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-code_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.Code_Elmt
-code_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Code_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datatype :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Datatype
-datatype x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Datatype"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-decimal :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Decimal
-decimal x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Decimal"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-directiveBaseDecl :: Phantoms.TTerm Syntax.BaseDecl -> Phantoms.TTerm Syntax.Directive
-directiveBaseDecl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Directive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "BaseDecl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-directivePrefixDecl :: Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.Directive
-directivePrefixDecl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Directive"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PrefixDecl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-double :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Double_
-double x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Double"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-echar :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Echar
-echar x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Echar"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-exclusion :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Exclusion
-exclusion x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Exclusion"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-extraPropertySet :: Phantoms.TTerm [Syntax.Predicate] -> Phantoms.TTerm Syntax.ExtraPropertySet
-extraPropertySet x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.ExtraPropertySet"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-groupTripleExprMultiElementGroup :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm Syntax.GroupTripleExpr
-groupTripleExprMultiElementGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.GroupTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MultiElementGroup"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-groupTripleExprSingleElementGroup :: Phantoms.TTerm Syntax.SingleElementGroup -> Phantoms.TTerm Syntax.GroupTripleExpr
-groupTripleExprSingleElementGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.GroupTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "SingleElementGroup"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Hex
-hex x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Hex"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-include :: Phantoms.TTerm Syntax.TripleExprLabel -> Phantoms.TTerm Syntax.Include
-include x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Include"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-includeSet :: Phantoms.TTerm [Syntax.ShapeExprLabel] -> Phantoms.TTerm Syntax.IncludeSet
-includeSet x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.IncludeSet"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-inlineShapeAnd :: Phantoms.TTerm Syntax.InlineShapeNot -> Phantoms.TTerm [Syntax.InlineShapeNot] -> Phantoms.TTerm Syntax.InlineShapeAnd
-inlineShapeAnd inlineShapeNot listOfSequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeNot"),
-          Core.fieldTerm = (Phantoms.unTTerm inlineShapeNot)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfSequence)}]}))
-
-inlineShapeAndInlineShapeNot :: Phantoms.TTerm Syntax.InlineShapeAnd -> Phantoms.TTerm Syntax.InlineShapeNot
-inlineShapeAndInlineShapeNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-        Core.projectionField = (Core.Name "InlineShapeNot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeAndListOfSequence :: Phantoms.TTerm Syntax.InlineShapeAnd -> Phantoms.TTerm [Syntax.InlineShapeNot]
-inlineShapeAndListOfSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-        Core.projectionField = (Core.Name "listOfSequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeAndWithInlineShapeNot :: Phantoms.TTerm Syntax.InlineShapeAnd -> Phantoms.TTerm Syntax.InlineShapeNot -> Phantoms.TTerm Syntax.InlineShapeAnd
-inlineShapeAndWithInlineShapeNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeNot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inlineShapeAndWithListOfSequence :: Phantoms.TTerm Syntax.InlineShapeAnd -> Phantoms.TTerm [Syntax.InlineShapeNot] -> Phantoms.TTerm Syntax.InlineShapeAnd
-inlineShapeAndWithListOfSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeNot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAnd"),
-              Core.projectionField = (Core.Name "InlineShapeNot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineShapeAtomPeriod :: Phantoms.TTerm Syntax.InlineShapeAtom
-inlineShapeAtomPeriod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Period"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-inlineShapeAtomSequence :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence -> Phantoms.TTerm Syntax.InlineShapeAtom
-inlineShapeAtomSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeAtomSequence2 :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2 -> Phantoms.TTerm Syntax.InlineShapeAtom
-inlineShapeAtomSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeAtomSequence3 :: Phantoms.TTerm Syntax.ShapeExpression -> Phantoms.TTerm Syntax.InlineShapeAtom
-inlineShapeAtomSequence3 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence3"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeAtom_Sequence :: Phantoms.TTerm Syntax.NodeConstraint -> Phantoms.TTerm (Maybe Syntax.InlineShapeOrRef) -> Phantoms.TTerm Syntax.InlineShapeAtom_Sequence
-inlineShapeAtom_Sequence nodeConstraint inlineShapeOrRef =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeConstraint)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeOrRef"),
-          Core.fieldTerm = (Phantoms.unTTerm inlineShapeOrRef)}]}))
-
-inlineShapeAtom_Sequence2 :: Phantoms.TTerm Syntax.InlineShapeOrRef -> Phantoms.TTerm (Maybe Syntax.NodeConstraint) -> Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2
-inlineShapeAtom_Sequence2 inlineShapeOrRef nodeConstraint =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeOrRef"),
-          Core.fieldTerm = (Phantoms.unTTerm inlineShapeOrRef)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeConstraint)}]}))
-
-inlineShapeAtom_Sequence2InlineShapeOrRef :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2 -> Phantoms.TTerm Syntax.InlineShapeOrRef
-inlineShapeAtom_Sequence2InlineShapeOrRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-        Core.projectionField = (Core.Name "InlineShapeOrRef")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeAtom_Sequence2NodeConstraint :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2 -> Phantoms.TTerm (Maybe Syntax.NodeConstraint)
-inlineShapeAtom_Sequence2NodeConstraint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-        Core.projectionField = (Core.Name "NodeConstraint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeAtom_Sequence2WithInlineShapeOrRef :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2 -> Phantoms.TTerm Syntax.InlineShapeOrRef -> Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2
-inlineShapeAtom_Sequence2WithInlineShapeOrRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeOrRef"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-              Core.projectionField = (Core.Name "NodeConstraint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inlineShapeAtom_Sequence2WithNodeConstraint :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2 -> Phantoms.TTerm (Maybe Syntax.NodeConstraint) -> Phantoms.TTerm Syntax.InlineShapeAtom_Sequence2
-inlineShapeAtom_Sequence2WithNodeConstraint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeOrRef"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"),
-              Core.projectionField = (Core.Name "InlineShapeOrRef")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineShapeAtom_SequenceInlineShapeOrRef :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence -> Phantoms.TTerm (Maybe Syntax.InlineShapeOrRef)
-inlineShapeAtom_SequenceInlineShapeOrRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-        Core.projectionField = (Core.Name "InlineShapeOrRef")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeAtom_SequenceNodeConstraint :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence -> Phantoms.TTerm Syntax.NodeConstraint
-inlineShapeAtom_SequenceNodeConstraint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-        Core.projectionField = (Core.Name "NodeConstraint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeAtom_SequenceWithInlineShapeOrRef :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence -> Phantoms.TTerm (Maybe Syntax.InlineShapeOrRef) -> Phantoms.TTerm Syntax.InlineShapeAtom_Sequence
-inlineShapeAtom_SequenceWithInlineShapeOrRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-              Core.projectionField = (Core.Name "NodeConstraint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeOrRef"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineShapeAtom_SequenceWithNodeConstraint :: Phantoms.TTerm Syntax.InlineShapeAtom_Sequence -> Phantoms.TTerm Syntax.NodeConstraint -> Phantoms.TTerm Syntax.InlineShapeAtom_Sequence
-inlineShapeAtom_SequenceWithNodeConstraint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeOrRef"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"),
-              Core.projectionField = (Core.Name "InlineShapeOrRef")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inlineShapeDefinition :: Phantoms.TTerm [Syntax.InlineShapeDefinition_ListOfAlts_Elmt] -> Phantoms.TTerm (Maybe Syntax.TripleExpression) -> Phantoms.TTerm Syntax.InlineShapeDefinition
-inlineShapeDefinition listOfAlts tripleExpression =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAlts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm tripleExpression)}]}))
-
-inlineShapeDefinitionListOfAlts :: Phantoms.TTerm Syntax.InlineShapeDefinition -> Phantoms.TTerm [Syntax.InlineShapeDefinition_ListOfAlts_Elmt]
-inlineShapeDefinitionListOfAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-        Core.projectionField = (Core.Name "listOfAlts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeDefinitionTripleExpression :: Phantoms.TTerm Syntax.InlineShapeDefinition -> Phantoms.TTerm (Maybe Syntax.TripleExpression)
-inlineShapeDefinitionTripleExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-        Core.projectionField = (Core.Name "TripleExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeDefinitionWithListOfAlts :: Phantoms.TTerm Syntax.InlineShapeDefinition -> Phantoms.TTerm [Syntax.InlineShapeDefinition_ListOfAlts_Elmt] -> Phantoms.TTerm Syntax.InlineShapeDefinition
-inlineShapeDefinitionWithListOfAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-              Core.projectionField = (Core.Name "TripleExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inlineShapeDefinitionWithTripleExpression :: Phantoms.TTerm Syntax.InlineShapeDefinition -> Phantoms.TTerm (Maybe Syntax.TripleExpression) -> Phantoms.TTerm Syntax.InlineShapeDefinition
-inlineShapeDefinitionWithTripleExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineShapeDefinition_ListOfAlts_ElmtCLOSED :: Phantoms.TTerm Syntax.InlineShapeDefinition_ListOfAlts_Elmt
-inlineShapeDefinition_ListOfAlts_ElmtCLOSED =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "CLOSED"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-inlineShapeDefinition_ListOfAlts_ElmtExtraPropertySet :: Phantoms.TTerm Syntax.ExtraPropertySet -> Phantoms.TTerm Syntax.InlineShapeDefinition_ListOfAlts_Elmt
-inlineShapeDefinition_ListOfAlts_ElmtExtraPropertySet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ExtraPropertySet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeDefinition_ListOfAlts_ElmtIncludeSet :: Phantoms.TTerm Syntax.IncludeSet -> Phantoms.TTerm Syntax.InlineShapeDefinition_ListOfAlts_Elmt
-inlineShapeDefinition_ListOfAlts_ElmtIncludeSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeDefinition_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IncludeSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeExpression :: Phantoms.TTerm Syntax.InlineShapeOr -> Phantoms.TTerm Syntax.InlineShapeExpression
-inlineShapeExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.InlineShapeExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-inlineShapeNot :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.InlineShapeAtom -> Phantoms.TTerm Syntax.InlineShapeNot
-inlineShapeNot nOT inlineShapeAtom =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm nOT)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeAtom"),
-          Core.fieldTerm = (Phantoms.unTTerm inlineShapeAtom)}]}))
-
-inlineShapeNotInlineShapeAtom :: Phantoms.TTerm Syntax.InlineShapeNot -> Phantoms.TTerm Syntax.InlineShapeAtom
-inlineShapeNotInlineShapeAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-        Core.projectionField = (Core.Name "InlineShapeAtom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeNotNOT :: Phantoms.TTerm Syntax.InlineShapeNot -> Phantoms.TTerm (Maybe ())
-inlineShapeNotNOT x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-        Core.projectionField = (Core.Name "NOT")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeNotWithInlineShapeAtom :: Phantoms.TTerm Syntax.InlineShapeNot -> Phantoms.TTerm Syntax.InlineShapeAtom -> Phantoms.TTerm Syntax.InlineShapeNot
-inlineShapeNotWithInlineShapeAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-              Core.projectionField = (Core.Name "NOT")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeAtom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineShapeNotWithNOT :: Phantoms.TTerm Syntax.InlineShapeNot -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.InlineShapeNot
-inlineShapeNotWithNOT original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeAtom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeNot"),
-              Core.projectionField = (Core.Name "InlineShapeAtom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-inlineShapeOr :: Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm [Syntax.InlineShapeAnd] -> Phantoms.TTerm Syntax.InlineShapeOr
-inlineShapeOr shapeAnd listOfSequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAnd"),
-          Core.fieldTerm = (Phantoms.unTTerm shapeAnd)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfSequence)}]}))
-
-inlineShapeOrListOfSequence :: Phantoms.TTerm Syntax.InlineShapeOr -> Phantoms.TTerm [Syntax.InlineShapeAnd]
-inlineShapeOrListOfSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-        Core.projectionField = (Core.Name "listOfSequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeOrRefAtpNameLn :: Phantoms.TTerm Syntax.AtpNameLn -> Phantoms.TTerm Syntax.InlineShapeOrRef
-inlineShapeOrRefAtpNameLn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "AtpNameLn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeOrRefAtpNameNs :: Phantoms.TTerm Syntax.AtpNameNs -> Phantoms.TTerm Syntax.InlineShapeOrRef
-inlineShapeOrRefAtpNameNs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "AtpNameNs"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeOrRefInlineShapeDefinition :: Phantoms.TTerm Syntax.InlineShapeDefinition -> Phantoms.TTerm Syntax.InlineShapeOrRef
-inlineShapeOrRefInlineShapeDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "InlineShapeDefinition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeOrRefSequence :: Phantoms.TTerm Syntax.ShapeExprLabel -> Phantoms.TTerm Syntax.InlineShapeOrRef
-inlineShapeOrRefSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-inlineShapeOrShapeAnd :: Phantoms.TTerm Syntax.InlineShapeOr -> Phantoms.TTerm Syntax.ShapeAnd
-inlineShapeOrShapeAnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-        Core.projectionField = (Core.Name "ShapeAnd")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-inlineShapeOrWithListOfSequence :: Phantoms.TTerm Syntax.InlineShapeOr -> Phantoms.TTerm [Syntax.InlineShapeAnd] -> Phantoms.TTerm Syntax.InlineShapeOr
-inlineShapeOrWithListOfSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAnd"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-              Core.projectionField = (Core.Name "ShapeAnd")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-inlineShapeOrWithShapeAnd :: Phantoms.TTerm Syntax.InlineShapeOr -> Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm Syntax.InlineShapeOr
-inlineShapeOrWithShapeAnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAnd"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.InlineShapeOr"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-innerTripleExprMultiElementGroup :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm Syntax.InnerTripleExpr
-innerTripleExprMultiElementGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InnerTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MultiElementGroup"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-innerTripleExprMultiElementOneOf :: Phantoms.TTerm Syntax.MultiElementOneOf -> Phantoms.TTerm Syntax.InnerTripleExpr
-innerTripleExprMultiElementOneOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.InnerTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MultiElementOneOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integer :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Integer_
-integer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.Integer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iriIriRef :: Phantoms.TTerm Syntax.IriRef -> Phantoms.TTerm Syntax.Iri
-iriIriRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Iri"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IriRef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iriPrefixedName :: Phantoms.TTerm Syntax.PrefixedName -> Phantoms.TTerm Syntax.Iri
-iriPrefixedName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Iri"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PrefixedName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iriRangeSequence :: Phantoms.TTerm Syntax.IriRange_Sequence -> Phantoms.TTerm Syntax.IriRange
-iriRangeSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.IriRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iriRangeSequence2 :: Phantoms.TTerm [Syntax.Exclusion] -> Phantoms.TTerm Syntax.IriRange
-iriRangeSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.IriRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iriRange_Sequence :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm (Maybe [Syntax.Exclusion]) -> Phantoms.TTerm Syntax.IriRange_Sequence
-iriRange_Sequence iri sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Iri"),
-          Core.fieldTerm = (Phantoms.unTTerm iri)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-iriRange_SequenceIri :: Phantoms.TTerm Syntax.IriRange_Sequence -> Phantoms.TTerm Syntax.Iri
-iriRange_SequenceIri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-        Core.projectionField = (Core.Name "Iri")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-iriRange_SequenceSequence :: Phantoms.TTerm Syntax.IriRange_Sequence -> Phantoms.TTerm (Maybe [Syntax.Exclusion])
-iriRange_SequenceSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-iriRange_SequenceWithIri :: Phantoms.TTerm Syntax.IriRange_Sequence -> Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.IriRange_Sequence
-iriRange_SequenceWithIri original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Iri"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-iriRange_SequenceWithSequence :: Phantoms.TTerm Syntax.IriRange_Sequence -> Phantoms.TTerm (Maybe [Syntax.Exclusion]) -> Phantoms.TTerm Syntax.IriRange_Sequence
-iriRange_SequenceWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Iri"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.IriRange_Sequence"),
-              Core.projectionField = (Core.Name "Iri")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-iriRef :: Phantoms.TTerm [Syntax.IriRef_Elmt] -> Phantoms.TTerm Syntax.IriRef
-iriRef x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.IriRef"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iriRef_ElmtRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.IriRef_Elmt
-iriRef_ElmtRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.IriRef_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-iriRef_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.IriRef_Elmt
-iriRef_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.IriRef_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-langTag :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.LangTag
-langTag x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.LangTag"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-literalBooleanLiteral :: Phantoms.TTerm Syntax.BooleanLiteral -> Phantoms.TTerm Syntax.Literal
-literalBooleanLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "BooleanLiteral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalNumericLiteral :: Phantoms.TTerm Syntax.NumericLiteral -> Phantoms.TTerm Syntax.Literal
-literalNumericLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NumericLiteral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-literalRdfLiteral :: Phantoms.TTerm Syntax.RdfLiteral -> Phantoms.TTerm Syntax.Literal
-literalRdfLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Literal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "RdfLiteral"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-multiElementGroup :: Phantoms.TTerm Syntax.UnaryTripleExpr -> Phantoms.TTerm [Syntax.UnaryTripleExpr] -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.MultiElementGroup
-multiElementGroup unaryTripleExpr listOfSequence semi =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm unaryTripleExpr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfSequence)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Phantoms.unTTerm semi)}]}))
-
-multiElementGroupListOfSequence :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm [Syntax.UnaryTripleExpr]
-multiElementGroupListOfSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-        Core.projectionField = (Core.Name "listOfSequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiElementGroupSemi :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm (Maybe ())
-multiElementGroupSemi x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-        Core.projectionField = (Core.Name "Semi")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiElementGroupUnaryTripleExpr :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm Syntax.UnaryTripleExpr
-multiElementGroupUnaryTripleExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-        Core.projectionField = (Core.Name "UnaryTripleExpr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiElementGroupWithListOfSequence :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm [Syntax.UnaryTripleExpr] -> Phantoms.TTerm Syntax.MultiElementGroup
-multiElementGroupWithListOfSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-              Core.projectionField = (Core.Name "UnaryTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-              Core.projectionField = (Core.Name "Semi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiElementGroupWithSemi :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.MultiElementGroup
-multiElementGroupWithSemi original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-              Core.projectionField = (Core.Name "UnaryTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-multiElementGroupWithUnaryTripleExpr :: Phantoms.TTerm Syntax.MultiElementGroup -> Phantoms.TTerm Syntax.UnaryTripleExpr -> Phantoms.TTerm Syntax.MultiElementGroup
-multiElementGroupWithUnaryTripleExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementGroup"),
-              Core.projectionField = (Core.Name "Semi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiElementOneOf :: Phantoms.TTerm Syntax.GroupTripleExpr -> Phantoms.TTerm [Syntax.GroupTripleExpr] -> Phantoms.TTerm Syntax.MultiElementOneOf
-multiElementOneOf groupTripleExpr listOfSequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "GroupTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm groupTripleExpr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfSequence)}]}))
-
-multiElementOneOfGroupTripleExpr :: Phantoms.TTerm Syntax.MultiElementOneOf -> Phantoms.TTerm Syntax.GroupTripleExpr
-multiElementOneOfGroupTripleExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-        Core.projectionField = (Core.Name "GroupTripleExpr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiElementOneOfListOfSequence :: Phantoms.TTerm Syntax.MultiElementOneOf -> Phantoms.TTerm [Syntax.GroupTripleExpr]
-multiElementOneOfListOfSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-        Core.projectionField = (Core.Name "listOfSequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-multiElementOneOfWithGroupTripleExpr :: Phantoms.TTerm Syntax.MultiElementOneOf -> Phantoms.TTerm Syntax.GroupTripleExpr -> Phantoms.TTerm Syntax.MultiElementOneOf
-multiElementOneOfWithGroupTripleExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "GroupTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-multiElementOneOfWithListOfSequence :: Phantoms.TTerm Syntax.MultiElementOneOf -> Phantoms.TTerm [Syntax.GroupTripleExpr] -> Phantoms.TTerm Syntax.MultiElementOneOf
-multiElementOneOfWithListOfSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "GroupTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.MultiElementOneOf"),
-              Core.projectionField = (Core.Name "GroupTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeConstraintListOfXsFacet :: Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint
-nodeConstraintListOfXsFacet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "listOfXsFacet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeConstraintSequence :: Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint
-nodeConstraintSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeConstraintSequence2 :: Phantoms.TTerm Syntax.NodeConstraint_Sequence2 -> Phantoms.TTerm Syntax.NodeConstraint
-nodeConstraintSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeConstraintSequence3 :: Phantoms.TTerm Syntax.NodeConstraint_Sequence3 -> Phantoms.TTerm Syntax.NodeConstraint
-nodeConstraintSequence3 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence3"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeConstraintSequence4 :: Phantoms.TTerm Syntax.NodeConstraint_Sequence4 -> Phantoms.TTerm Syntax.NodeConstraint
-nodeConstraintSequence4 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence4"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeConstraintSequence5 :: Phantoms.TTerm Syntax.NodeConstraint_Sequence5 -> Phantoms.TTerm Syntax.NodeConstraint
-nodeConstraintSequence5 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence5"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nodeConstraint_Sequence2 :: Phantoms.TTerm Syntax.NonLiteralKind -> Phantoms.TTerm [Syntax.StringFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence2
-nodeConstraint_Sequence2 nonLiteralKind listOfStringFacet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NonLiteralKind"),
-          Core.fieldTerm = (Phantoms.unTTerm nonLiteralKind)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfStringFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfStringFacet)}]}))
-
-nodeConstraint_Sequence2ListOfStringFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence2 -> Phantoms.TTerm [Syntax.StringFacet]
-nodeConstraint_Sequence2ListOfStringFacet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-        Core.projectionField = (Core.Name "listOfStringFacet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence2NonLiteralKind :: Phantoms.TTerm Syntax.NodeConstraint_Sequence2 -> Phantoms.TTerm Syntax.NonLiteralKind
-nodeConstraint_Sequence2NonLiteralKind x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-        Core.projectionField = (Core.Name "NonLiteralKind")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence2WithListOfStringFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence2 -> Phantoms.TTerm [Syntax.StringFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence2
-nodeConstraint_Sequence2WithListOfStringFacet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NonLiteralKind"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-              Core.projectionField = (Core.Name "NonLiteralKind")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfStringFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeConstraint_Sequence2WithNonLiteralKind :: Phantoms.TTerm Syntax.NodeConstraint_Sequence2 -> Phantoms.TTerm Syntax.NonLiteralKind -> Phantoms.TTerm Syntax.NodeConstraint_Sequence2
-nodeConstraint_Sequence2WithNonLiteralKind original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NonLiteralKind"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfStringFacet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"),
-              Core.projectionField = (Core.Name "listOfStringFacet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeConstraint_Sequence3 :: Phantoms.TTerm Syntax.Datatype -> Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence3
-nodeConstraint_Sequence3 datatype listOfXsFacet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Datatype"),
-          Core.fieldTerm = (Phantoms.unTTerm datatype)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfXsFacet)}]}))
-
-nodeConstraint_Sequence3Datatype :: Phantoms.TTerm Syntax.NodeConstraint_Sequence3 -> Phantoms.TTerm Syntax.Datatype
-nodeConstraint_Sequence3Datatype x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-        Core.projectionField = (Core.Name "Datatype")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence3ListOfXsFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence3 -> Phantoms.TTerm [Syntax.XsFacet]
-nodeConstraint_Sequence3ListOfXsFacet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-        Core.projectionField = (Core.Name "listOfXsFacet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence3WithDatatype :: Phantoms.TTerm Syntax.NodeConstraint_Sequence3 -> Phantoms.TTerm Syntax.Datatype -> Phantoms.TTerm Syntax.NodeConstraint_Sequence3
-nodeConstraint_Sequence3WithDatatype original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Datatype"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-              Core.projectionField = (Core.Name "listOfXsFacet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeConstraint_Sequence3WithListOfXsFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence3 -> Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence3
-nodeConstraint_Sequence3WithListOfXsFacet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Datatype"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"),
-              Core.projectionField = (Core.Name "Datatype")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeConstraint_Sequence4 :: Phantoms.TTerm Syntax.ValueSet -> Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence4
-nodeConstraint_Sequence4 valueSet listOfXsFacet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ValueSet"),
-          Core.fieldTerm = (Phantoms.unTTerm valueSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfXsFacet)}]}))
-
-nodeConstraint_Sequence4ListOfXsFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence4 -> Phantoms.TTerm [Syntax.XsFacet]
-nodeConstraint_Sequence4ListOfXsFacet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-        Core.projectionField = (Core.Name "listOfXsFacet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence4ValueSet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence4 -> Phantoms.TTerm Syntax.ValueSet
-nodeConstraint_Sequence4ValueSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-        Core.projectionField = (Core.Name "ValueSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence4WithListOfXsFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence4 -> Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence4
-nodeConstraint_Sequence4WithListOfXsFacet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ValueSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-              Core.projectionField = (Core.Name "ValueSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeConstraint_Sequence4WithValueSet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence4 -> Phantoms.TTerm Syntax.ValueSet -> Phantoms.TTerm Syntax.NodeConstraint_Sequence4
-nodeConstraint_Sequence4WithValueSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ValueSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"),
-              Core.projectionField = (Core.Name "listOfXsFacet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nodeConstraint_Sequence5 :: Phantoms.TTerm Syntax.ValueSet -> Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence5
-nodeConstraint_Sequence5 valueSet listOfXsFacet =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ValueSet"),
-          Core.fieldTerm = (Phantoms.unTTerm valueSet)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfXsFacet)}]}))
-
-nodeConstraint_Sequence5ListOfXsFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence5 -> Phantoms.TTerm [Syntax.XsFacet]
-nodeConstraint_Sequence5ListOfXsFacet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-        Core.projectionField = (Core.Name "listOfXsFacet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence5ValueSet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence5 -> Phantoms.TTerm Syntax.ValueSet
-nodeConstraint_Sequence5ValueSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-        Core.projectionField = (Core.Name "ValueSet")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nodeConstraint_Sequence5WithListOfXsFacet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence5 -> Phantoms.TTerm [Syntax.XsFacet] -> Phantoms.TTerm Syntax.NodeConstraint_Sequence5
-nodeConstraint_Sequence5WithListOfXsFacet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ValueSet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-              Core.projectionField = (Core.Name "ValueSet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nodeConstraint_Sequence5WithValueSet :: Phantoms.TTerm Syntax.NodeConstraint_Sequence5 -> Phantoms.TTerm Syntax.ValueSet -> Phantoms.TTerm Syntax.NodeConstraint_Sequence5
-nodeConstraint_Sequence5WithValueSet original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ValueSet"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfXsFacet"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"),
-              Core.projectionField = (Core.Name "listOfXsFacet")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nonLiteralKindBNODE :: Phantoms.TTerm Syntax.NonLiteralKind
-nonLiteralKindBNODE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NonLiteralKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "BNODE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nonLiteralKindIRI :: Phantoms.TTerm Syntax.NonLiteralKind
-nonLiteralKindIRI =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NonLiteralKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IRI"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-nonLiteralKindNONLITERAL :: Phantoms.TTerm Syntax.NonLiteralKind
-nonLiteralKindNONLITERAL =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NonLiteralKind"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NONLITERAL"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-notStartActionShapeExprDecl :: Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl -> Phantoms.TTerm Syntax.NotStartAction
-notStartActionShapeExprDecl x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shapeExprDecl"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-notStartActionStart :: Phantoms.TTerm Syntax.ShapeExpression -> Phantoms.TTerm Syntax.NotStartAction
-notStartActionStart x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "start"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-notStartAction_ShapeExprDecl :: Phantoms.TTerm Syntax.ShapeExprLabel -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl_Alts -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl
-notStartAction_ShapeExprDecl shapeExprLabel alts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeExprLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm shapeExprLabel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)}]}))
-
-notStartAction_ShapeExprDeclAlts :: Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl_Alts
-notStartAction_ShapeExprDeclAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notStartAction_ShapeExprDeclShapeExprLabel :: Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl -> Phantoms.TTerm Syntax.ShapeExprLabel
-notStartAction_ShapeExprDeclShapeExprLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-        Core.projectionField = (Core.Name "ShapeExprLabel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-notStartAction_ShapeExprDeclWithAlts :: Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl_Alts -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl
-notStartAction_ShapeExprDeclWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeExprLabel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-              Core.projectionField = (Core.Name "ShapeExprLabel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-notStartAction_ShapeExprDeclWithShapeExprLabel :: Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl -> Phantoms.TTerm Syntax.ShapeExprLabel -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl
-notStartAction_ShapeExprDeclWithShapeExprLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeExprLabel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-notStartAction_ShapeExprDecl_AltsEXTERNAL :: Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl_Alts
-notStartAction_ShapeExprDecl_AltsEXTERNAL =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "EXTERNAL"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-notStartAction_ShapeExprDecl_AltsShapeExpression :: Phantoms.TTerm Syntax.ShapeExpression -> Phantoms.TTerm Syntax.NotStartAction_ShapeExprDecl_Alts
-notStartAction_ShapeExprDecl_AltsShapeExpression x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ShapeExpression"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericFacetSequence :: Phantoms.TTerm Syntax.NumericFacet_Sequence -> Phantoms.TTerm Syntax.NumericFacet
-numericFacetSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericFacetSequence2 :: Phantoms.TTerm Syntax.NumericFacet_Sequence2 -> Phantoms.TTerm Syntax.NumericFacet
-numericFacetSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericFacet_Sequence :: Phantoms.TTerm Syntax.NumericRange -> Phantoms.TTerm Syntax.NumericLiteral -> Phantoms.TTerm Syntax.NumericFacet_Sequence
-numericFacet_Sequence numericRange numericLiteral =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericRange"),
-          Core.fieldTerm = (Phantoms.unTTerm numericRange)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericLiteral"),
-          Core.fieldTerm = (Phantoms.unTTerm numericLiteral)}]}))
-
-numericFacet_Sequence2 :: Phantoms.TTerm Syntax.NumericLength -> Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.NumericFacet_Sequence2
-numericFacet_Sequence2 numericLength integer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericLength"),
-          Core.fieldTerm = (Phantoms.unTTerm numericLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Phantoms.unTTerm integer)}]}))
-
-numericFacet_Sequence2Integer :: Phantoms.TTerm Syntax.NumericFacet_Sequence2 -> Phantoms.TTerm Syntax.Integer_
-numericFacet_Sequence2Integer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-        Core.projectionField = (Core.Name "Integer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFacet_Sequence2NumericLength :: Phantoms.TTerm Syntax.NumericFacet_Sequence2 -> Phantoms.TTerm Syntax.NumericLength
-numericFacet_Sequence2NumericLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-        Core.projectionField = (Core.Name "NumericLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFacet_Sequence2WithInteger :: Phantoms.TTerm Syntax.NumericFacet_Sequence2 -> Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.NumericFacet_Sequence2
-numericFacet_Sequence2WithInteger original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-              Core.projectionField = (Core.Name "NumericLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-numericFacet_Sequence2WithNumericLength :: Phantoms.TTerm Syntax.NumericFacet_Sequence2 -> Phantoms.TTerm Syntax.NumericLength -> Phantoms.TTerm Syntax.NumericFacet_Sequence2
-numericFacet_Sequence2WithNumericLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"),
-              Core.projectionField = (Core.Name "Integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericFacet_SequenceNumericLiteral :: Phantoms.TTerm Syntax.NumericFacet_Sequence -> Phantoms.TTerm Syntax.NumericLiteral
-numericFacet_SequenceNumericLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-        Core.projectionField = (Core.Name "NumericLiteral")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFacet_SequenceNumericRange :: Phantoms.TTerm Syntax.NumericFacet_Sequence -> Phantoms.TTerm Syntax.NumericRange
-numericFacet_SequenceNumericRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-        Core.projectionField = (Core.Name "NumericRange")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-numericFacet_SequenceWithNumericLiteral :: Phantoms.TTerm Syntax.NumericFacet_Sequence -> Phantoms.TTerm Syntax.NumericLiteral -> Phantoms.TTerm Syntax.NumericFacet_Sequence
-numericFacet_SequenceWithNumericLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericRange"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-              Core.projectionField = (Core.Name "NumericRange")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericLiteral"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-numericFacet_SequenceWithNumericRange :: Phantoms.TTerm Syntax.NumericFacet_Sequence -> Phantoms.TTerm Syntax.NumericRange -> Phantoms.TTerm Syntax.NumericFacet_Sequence
-numericFacet_SequenceWithNumericRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericRange"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "NumericLiteral"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.NumericFacet_Sequence"),
-              Core.projectionField = (Core.Name "NumericLiteral")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-numericLengthFRACTIONDIGITS :: Phantoms.TTerm Syntax.NumericLength
-numericLengthFRACTIONDIGITS =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericLength"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FRACTIONDIGITS"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-numericLengthTOTALDIGITS :: Phantoms.TTerm Syntax.NumericLength
-numericLengthTOTALDIGITS =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericLength"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "TOTALDIGITS"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-numericLiteralDecimal :: Phantoms.TTerm Syntax.Decimal -> Phantoms.TTerm Syntax.NumericLiteral
-numericLiteralDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericLiteralDouble :: Phantoms.TTerm Syntax.Double_ -> Phantoms.TTerm Syntax.NumericLiteral
-numericLiteralDouble x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Double"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericLiteralInteger :: Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.NumericLiteral
-numericLiteralInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericRangeMAXEXCLUSIVE :: Phantoms.TTerm Syntax.NumericRange
-numericRangeMAXEXCLUSIVE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MAXEXCLUSIVE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-numericRangeMAXINCLUSIVE :: Phantoms.TTerm Syntax.NumericRange
-numericRangeMAXINCLUSIVE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MAXINCLUSIVE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-numericRangeMINEXCLUSIVE :: Phantoms.TTerm Syntax.NumericRange
-numericRangeMINEXCLUSIVE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MINEXCLUSIVE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-numericRangeMININCLUSIVE :: Phantoms.TTerm Syntax.NumericRange
-numericRangeMININCLUSIVE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.NumericRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MININCLUSIVE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-oneOfTripleExprGroupTripleExpr :: Phantoms.TTerm Syntax.GroupTripleExpr -> Phantoms.TTerm Syntax.OneOfTripleExpr
-oneOfTripleExprGroupTripleExpr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.OneOfTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "GroupTripleExpr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-oneOfTripleExprMultiElementOneOf :: Phantoms.TTerm Syntax.MultiElementOneOf -> Phantoms.TTerm Syntax.OneOfTripleExpr
-oneOfTripleExprMultiElementOneOf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.OneOfTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MultiElementOneOf"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-percent :: Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Percent
-percent hex hex2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Phantoms.unTTerm hex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Phantoms.unTTerm hex2)}]}))
-
-percentHex :: Phantoms.TTerm Syntax.Percent -> Phantoms.TTerm Syntax.Hex
-percentHex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-        Core.projectionField = (Core.Name "Hex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-percentHex2 :: Phantoms.TTerm Syntax.Percent -> Phantoms.TTerm Syntax.Hex
-percentHex2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-        Core.projectionField = (Core.Name "Hex2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-percentWithHex :: Phantoms.TTerm Syntax.Percent -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Percent
-percentWithHex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-percentWithHex2 :: Phantoms.TTerm Syntax.Percent -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Percent
-percentWithHex2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Percent"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-plxPercent :: Phantoms.TTerm Syntax.Percent -> Phantoms.TTerm Syntax.Plx
-plxPercent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Plx"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Percent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-plxPnLocalEsc :: Phantoms.TTerm Syntax.PnLocalEsc -> Phantoms.TTerm Syntax.Plx
-plxPnLocalEsc x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Plx"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnLocalEsc"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnCharsBaseRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PnCharsBase
-pnCharsBaseRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnCharsBase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnCharsBaseRegex2 :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PnCharsBase
-pnCharsBaseRegex2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnCharsBase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnCharsMinus :: Phantoms.TTerm Syntax.PnChars
-pnCharsMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnChars"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnCharsPnCharsU :: Phantoms.TTerm Syntax.PnCharsU -> Phantoms.TTerm Syntax.PnChars
-pnCharsPnCharsU x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnChars"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnCharsU"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnCharsRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PnChars
-pnCharsRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnChars"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnCharsULowbar :: Phantoms.TTerm Syntax.PnCharsU
-pnCharsULowbar =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnCharsU"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Lowbar"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnCharsUPnCharsBase :: Phantoms.TTerm Syntax.PnCharsBase -> Phantoms.TTerm Syntax.PnCharsU
-pnCharsUPnCharsBase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnCharsU"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnCharsBase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal :: Phantoms.TTerm Syntax.PnLocal_Alts -> Phantoms.TTerm (Maybe Syntax.PnLocal_Sequence_Option) -> Phantoms.TTerm Syntax.PnLocal
-pnLocal alts sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-pnLocalAlts :: Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm Syntax.PnLocal_Alts
-pnLocalAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnLocalEsc :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PnLocalEsc
-pnLocalEsc x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.PnLocalEsc"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-pnLocalSequence :: Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm (Maybe Syntax.PnLocal_Sequence_Option)
-pnLocalSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnLocalWithAlts :: Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm Syntax.PnLocal_Alts -> Phantoms.TTerm Syntax.PnLocal
-pnLocalWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pnLocalWithSequence :: Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm (Maybe Syntax.PnLocal_Sequence_Option) -> Phantoms.TTerm Syntax.PnLocal
-pnLocalWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pnLocal_AltsColon :: Phantoms.TTerm Syntax.PnLocal_Alts
-pnLocal_AltsColon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Colon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnLocal_AltsPlx :: Phantoms.TTerm Syntax.Plx -> Phantoms.TTerm Syntax.PnLocal_Alts
-pnLocal_AltsPlx x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Plx"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal_AltsPnCharsU :: Phantoms.TTerm Syntax.PnCharsU -> Phantoms.TTerm Syntax.PnLocal_Alts
-pnLocal_AltsPnCharsU x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnCharsU"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal_AltsRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PnLocal_Alts
-pnLocal_AltsRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal_Sequence_Option :: Phantoms.TTerm [Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt] -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_Alts -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option
-pnLocal_Sequence_Option listOfAlts alts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAlts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)}]}))
-
-pnLocal_Sequence_OptionAlts :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_Alts
-pnLocal_Sequence_OptionAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnLocal_Sequence_OptionListOfAlts :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option -> Phantoms.TTerm [Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt]
-pnLocal_Sequence_OptionListOfAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-        Core.projectionField = (Core.Name "listOfAlts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnLocal_Sequence_OptionWithAlts :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_Alts -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option
-pnLocal_Sequence_OptionWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-              Core.projectionField = (Core.Name "listOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pnLocal_Sequence_OptionWithListOfAlts :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option -> Phantoms.TTerm [Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt] -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option
-pnLocal_Sequence_OptionWithListOfAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pnLocal_Sequence_Option_AltsColon :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option_Alts
-pnLocal_Sequence_Option_AltsColon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Colon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnLocal_Sequence_Option_AltsPlx :: Phantoms.TTerm Syntax.Plx -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_Alts
-pnLocal_Sequence_Option_AltsPlx x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Plx"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal_Sequence_Option_AltsPnChars :: Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_Alts
-pnLocal_Sequence_Option_AltsPnChars x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnChars"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal_Sequence_Option_ListOfAlts_ElmtColon :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt
-pnLocal_Sequence_Option_ListOfAlts_ElmtColon =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Colon"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnLocal_Sequence_Option_ListOfAlts_ElmtPeriod :: Phantoms.TTerm Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt
-pnLocal_Sequence_Option_ListOfAlts_ElmtPeriod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Period"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnLocal_Sequence_Option_ListOfAlts_ElmtPlx :: Phantoms.TTerm Syntax.Plx -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt
-pnLocal_Sequence_Option_ListOfAlts_ElmtPlx x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Plx"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnLocal_Sequence_Option_ListOfAlts_ElmtPnChars :: Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt
-pnLocal_Sequence_Option_ListOfAlts_ElmtPnChars x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnChars"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnPrefix :: Phantoms.TTerm Syntax.PnCharsBase -> Phantoms.TTerm (Maybe Syntax.PnPrefix_Sequence_Option) -> Phantoms.TTerm Syntax.PnPrefix
-pnPrefix pnCharsBase sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnCharsBase"),
-          Core.fieldTerm = (Phantoms.unTTerm pnCharsBase)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-pnPrefixPnCharsBase :: Phantoms.TTerm Syntax.PnPrefix -> Phantoms.TTerm Syntax.PnCharsBase
-pnPrefixPnCharsBase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-        Core.projectionField = (Core.Name "PnCharsBase")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnPrefixSequence :: Phantoms.TTerm Syntax.PnPrefix -> Phantoms.TTerm (Maybe Syntax.PnPrefix_Sequence_Option)
-pnPrefixSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnPrefixWithPnCharsBase :: Phantoms.TTerm Syntax.PnPrefix -> Phantoms.TTerm Syntax.PnCharsBase -> Phantoms.TTerm Syntax.PnPrefix
-pnPrefixWithPnCharsBase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnCharsBase"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pnPrefixWithSequence :: Phantoms.TTerm Syntax.PnPrefix -> Phantoms.TTerm (Maybe Syntax.PnPrefix_Sequence_Option) -> Phantoms.TTerm Syntax.PnPrefix
-pnPrefixWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnCharsBase"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix"),
-              Core.projectionField = (Core.Name "PnCharsBase")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pnPrefix_Sequence_Option :: Phantoms.TTerm Syntax.PnPrefix_Sequence_Option_Alts -> Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.PnPrefix_Sequence_Option
-pnPrefix_Sequence_Option alts pnChars =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Phantoms.unTTerm pnChars)}]}))
-
-pnPrefix_Sequence_OptionAlts :: Phantoms.TTerm Syntax.PnPrefix_Sequence_Option -> Phantoms.TTerm Syntax.PnPrefix_Sequence_Option_Alts
-pnPrefix_Sequence_OptionAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnPrefix_Sequence_OptionPnChars :: Phantoms.TTerm Syntax.PnPrefix_Sequence_Option -> Phantoms.TTerm Syntax.PnChars
-pnPrefix_Sequence_OptionPnChars x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-        Core.projectionField = (Core.Name "PnChars")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnPrefix_Sequence_OptionWithAlts :: Phantoms.TTerm Syntax.PnPrefix_Sequence_Option -> Phantoms.TTerm Syntax.PnPrefix_Sequence_Option_Alts -> Phantoms.TTerm Syntax.PnPrefix_Sequence_Option
-pnPrefix_Sequence_OptionWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-              Core.projectionField = (Core.Name "PnChars")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pnPrefix_Sequence_OptionWithPnChars :: Phantoms.TTerm Syntax.PnPrefix_Sequence_Option -> Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.PnPrefix_Sequence_Option
-pnPrefix_Sequence_OptionWithPnChars original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnChars"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pnPrefix_Sequence_Option_AltsPeriod :: Phantoms.TTerm Syntax.PnPrefix_Sequence_Option_Alts
-pnPrefix_Sequence_Option_AltsPeriod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Period"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pnPrefix_Sequence_Option_AltsPnChars :: Phantoms.TTerm Syntax.PnChars -> Phantoms.TTerm Syntax.PnPrefix_Sequence_Option_Alts
-pnPrefix_Sequence_Option_AltsPnChars x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnChars"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-pnameLn :: Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm Syntax.PnameLn
-pnameLn pnameNs pnLocal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Phantoms.unTTerm pnameNs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnLocal"),
-          Core.fieldTerm = (Phantoms.unTTerm pnLocal)}]}))
-
-pnameLnPnLocal :: Phantoms.TTerm Syntax.PnameLn -> Phantoms.TTerm Syntax.PnLocal
-pnameLnPnLocal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-        Core.projectionField = (Core.Name "PnLocal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnameLnPnameNs :: Phantoms.TTerm Syntax.PnameLn -> Phantoms.TTerm Syntax.PnameNs
-pnameLnPnameNs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-        Core.projectionField = (Core.Name "PnameNs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-pnameLnWithPnLocal :: Phantoms.TTerm Syntax.PnameLn -> Phantoms.TTerm Syntax.PnLocal -> Phantoms.TTerm Syntax.PnameLn
-pnameLnWithPnLocal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-              Core.projectionField = (Core.Name "PnameNs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnLocal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pnameLnWithPnameNs :: Phantoms.TTerm Syntax.PnameLn -> Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.PnameLn
-pnameLnWithPnameNs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PnLocal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PnameLn"),
-              Core.projectionField = (Core.Name "PnLocal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-pnameNs :: Phantoms.TTerm (Maybe Syntax.PnPrefix) -> Phantoms.TTerm Syntax.PnameNs
-pnameNs x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.PnameNs"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-predicateIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.Predicate
-predicateIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateRdfType :: Phantoms.TTerm Syntax.RdfType -> Phantoms.TTerm Syntax.Predicate
-predicateRdfType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Predicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "RdfType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-prefixDecl :: Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.IriRef -> Phantoms.TTerm Syntax.PrefixDecl
-prefixDecl pnameNs iriRef =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Phantoms.unTTerm pnameNs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "IriRef"),
-          Core.fieldTerm = (Phantoms.unTTerm iriRef)}]}))
-
-prefixDeclIriRef :: Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.IriRef
-prefixDeclIriRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-        Core.projectionField = (Core.Name "IriRef")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-prefixDeclPnameNs :: Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.PnameNs
-prefixDeclPnameNs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-        Core.projectionField = (Core.Name "PnameNs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-prefixDeclWithIriRef :: Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.IriRef -> Phantoms.TTerm Syntax.PrefixDecl
-prefixDeclWithIriRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-              Core.projectionField = (Core.Name "PnameNs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "IriRef"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-prefixDeclWithPnameNs :: Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.PrefixDecl
-prefixDeclWithPnameNs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "PnameNs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "IriRef"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.PrefixDecl"),
-              Core.projectionField = (Core.Name "IriRef")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-prefixedNamePnameLn :: Phantoms.TTerm Syntax.PnameLn -> Phantoms.TTerm Syntax.PrefixedName
-prefixedNamePnameLn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PrefixedName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnameLn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-prefixedNamePnameNs :: Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm Syntax.PrefixedName
-prefixedNamePnameNs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.PrefixedName"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "PnameNs"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rdfLiteral :: Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm (Maybe Syntax.RdfLiteral_Alts_Option) -> Phantoms.TTerm Syntax.RdfLiteral
-rdfLiteral string alts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "String"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)}]}))
-
-rdfLiteralAlts :: Phantoms.TTerm Syntax.RdfLiteral -> Phantoms.TTerm (Maybe Syntax.RdfLiteral_Alts_Option)
-rdfLiteralAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-        Core.projectionField = (Core.Name "Alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rdfLiteralString :: Phantoms.TTerm Syntax.RdfLiteral -> Phantoms.TTerm Syntax.String_
-rdfLiteralString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-        Core.projectionField = (Core.Name "String")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rdfLiteralWithAlts :: Phantoms.TTerm Syntax.RdfLiteral -> Phantoms.TTerm (Maybe Syntax.RdfLiteral_Alts_Option) -> Phantoms.TTerm Syntax.RdfLiteral
-rdfLiteralWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "String"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-              Core.projectionField = (Core.Name "String")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rdfLiteralWithString :: Phantoms.TTerm Syntax.RdfLiteral -> Phantoms.TTerm Syntax.String_ -> Phantoms.TTerm Syntax.RdfLiteral
-rdfLiteralWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "String"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral"),
-              Core.projectionField = (Core.Name "Alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rdfLiteral_Alts_OptionLangTag :: Phantoms.TTerm Syntax.LangTag -> Phantoms.TTerm Syntax.RdfLiteral_Alts_Option
-rdfLiteral_Alts_OptionLangTag x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral_Alts_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "LangTag"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rdfLiteral_Alts_OptionSequence :: Phantoms.TTerm Syntax.Datatype -> Phantoms.TTerm Syntax.RdfLiteral_Alts_Option
-rdfLiteral_Alts_OptionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.RdfLiteral_Alts_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rdfType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.RdfType
-rdfType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.RdfType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-regexp :: Phantoms.TTerm [Syntax.Regexp_ListOfAlts_Elmt] -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.Regexp
-regexp listOfAlts listOfRegex =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAlts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfRegex"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfRegex)}]}))
-
-regexpListOfAlts :: Phantoms.TTerm Syntax.Regexp -> Phantoms.TTerm [Syntax.Regexp_ListOfAlts_Elmt]
-regexpListOfAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-        Core.projectionField = (Core.Name "listOfAlts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regexpListOfRegex :: Phantoms.TTerm Syntax.Regexp -> Phantoms.TTerm [String]
-regexpListOfRegex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-        Core.projectionField = (Core.Name "listOfRegex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-regexpWithListOfAlts :: Phantoms.TTerm Syntax.Regexp -> Phantoms.TTerm [Syntax.Regexp_ListOfAlts_Elmt] -> Phantoms.TTerm Syntax.Regexp
-regexpWithListOfAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfRegex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-              Core.projectionField = (Core.Name "listOfRegex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-regexpWithListOfRegex :: Phantoms.TTerm Syntax.Regexp -> Phantoms.TTerm [String] -> Phantoms.TTerm Syntax.Regexp
-regexpWithListOfRegex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Regexp"),
-              Core.projectionField = (Core.Name "listOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfRegex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-regexp_ListOfAlts_ElmtRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Regexp_ListOfAlts_Elmt
-regexp_ListOfAlts_ElmtRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Regexp_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-regexp_ListOfAlts_ElmtSequence :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Regexp_ListOfAlts_Elmt
-regexp_ListOfAlts_ElmtSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Regexp_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-regexp_ListOfAlts_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.Regexp_ListOfAlts_Elmt
-regexp_ListOfAlts_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Regexp_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-repeatRange :: Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm (Maybe (Maybe (Maybe Syntax.RepeatRange_Sequence_Option_Option_Option))) -> Phantoms.TTerm Syntax.RepeatRange
-repeatRange integer sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Phantoms.unTTerm integer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-repeatRangeInteger :: Phantoms.TTerm Syntax.RepeatRange -> Phantoms.TTerm Syntax.Integer_
-repeatRangeInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-        Core.projectionField = (Core.Name "Integer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-repeatRangeSequence :: Phantoms.TTerm Syntax.RepeatRange -> Phantoms.TTerm (Maybe (Maybe (Maybe Syntax.RepeatRange_Sequence_Option_Option_Option)))
-repeatRangeSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-repeatRangeWithInteger :: Phantoms.TTerm Syntax.RepeatRange -> Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.RepeatRange
-repeatRangeWithInteger original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-repeatRangeWithSequence :: Phantoms.TTerm Syntax.RepeatRange -> Phantoms.TTerm (Maybe (Maybe (Maybe Syntax.RepeatRange_Sequence_Option_Option_Option))) -> Phantoms.TTerm Syntax.RepeatRange
-repeatRangeWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.RepeatRange"),
-              Core.projectionField = (Core.Name "Integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-repeatRange_Sequence_Option_Option_OptionAst :: Phantoms.TTerm Syntax.RepeatRange_Sequence_Option_Option_Option
-repeatRange_Sequence_Option_Option_OptionAst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.RepeatRange_Sequence_Option_Option_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Ast"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-repeatRange_Sequence_Option_Option_OptionInteger :: Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.RepeatRange_Sequence_Option_Option_Option
-repeatRange_Sequence_Option_Option_OptionInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.RepeatRange_Sequence_Option_Option_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-semanticActions :: Phantoms.TTerm [Syntax.CodeDecl] -> Phantoms.TTerm Syntax.SemanticActions
-semanticActions x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.SemanticActions"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-senseFlags :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.SenseFlags
-senseFlags x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.SenseFlags"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-shapeAnd :: Phantoms.TTerm Syntax.ShapeNot -> Phantoms.TTerm [Syntax.ShapeNot] -> Phantoms.TTerm Syntax.ShapeAnd
-shapeAnd shapeNot listOfSequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeNot"),
-          Core.fieldTerm = (Phantoms.unTTerm shapeNot)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfSequence)}]}))
-
-shapeAndListOfSequence :: Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm [Syntax.ShapeNot]
-shapeAndListOfSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-        Core.projectionField = (Core.Name "listOfSequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeAndShapeNot :: Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm Syntax.ShapeNot
-shapeAndShapeNot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-        Core.projectionField = (Core.Name "ShapeNot")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeAndWithListOfSequence :: Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm [Syntax.ShapeNot] -> Phantoms.TTerm Syntax.ShapeAnd
-shapeAndWithListOfSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeNot"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-              Core.projectionField = (Core.Name "ShapeNot")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shapeAndWithShapeNot :: Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm Syntax.ShapeNot -> Phantoms.TTerm Syntax.ShapeAnd
-shapeAndWithShapeNot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeNot"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAnd"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shapeAtomPeriod :: Phantoms.TTerm Syntax.ShapeAtom
-shapeAtomPeriod =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Period"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shapeAtomSequence :: Phantoms.TTerm Syntax.ShapeAtom_Sequence -> Phantoms.TTerm Syntax.ShapeAtom
-shapeAtomSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeAtomSequence2 :: Phantoms.TTerm Syntax.ShapeExpression -> Phantoms.TTerm Syntax.ShapeAtom
-shapeAtomSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeAtomShapeOrRef :: Phantoms.TTerm Syntax.ShapeOrRef -> Phantoms.TTerm Syntax.ShapeAtom
-shapeAtomShapeOrRef x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ShapeOrRef"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeAtom_Sequence :: Phantoms.TTerm Syntax.NodeConstraint -> Phantoms.TTerm (Maybe Syntax.ShapeOrRef) -> Phantoms.TTerm Syntax.ShapeAtom_Sequence
-shapeAtom_Sequence nodeConstraint shapeOrRef =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Phantoms.unTTerm nodeConstraint)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeOrRef"),
-          Core.fieldTerm = (Phantoms.unTTerm shapeOrRef)}]}))
-
-shapeAtom_SequenceNodeConstraint :: Phantoms.TTerm Syntax.ShapeAtom_Sequence -> Phantoms.TTerm Syntax.NodeConstraint
-shapeAtom_SequenceNodeConstraint x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-        Core.projectionField = (Core.Name "NodeConstraint")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeAtom_SequenceShapeOrRef :: Phantoms.TTerm Syntax.ShapeAtom_Sequence -> Phantoms.TTerm (Maybe Syntax.ShapeOrRef)
-shapeAtom_SequenceShapeOrRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-        Core.projectionField = (Core.Name "ShapeOrRef")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeAtom_SequenceWithNodeConstraint :: Phantoms.TTerm Syntax.ShapeAtom_Sequence -> Phantoms.TTerm Syntax.NodeConstraint -> Phantoms.TTerm Syntax.ShapeAtom_Sequence
-shapeAtom_SequenceWithNodeConstraint original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeOrRef"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-              Core.projectionField = (Core.Name "ShapeOrRef")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shapeAtom_SequenceWithShapeOrRef :: Phantoms.TTerm Syntax.ShapeAtom_Sequence -> Phantoms.TTerm (Maybe Syntax.ShapeOrRef) -> Phantoms.TTerm Syntax.ShapeAtom_Sequence
-shapeAtom_SequenceWithShapeOrRef original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NodeConstraint"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"),
-              Core.projectionField = (Core.Name "NodeConstraint")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeOrRef"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shapeDefinition :: Phantoms.TTerm [Syntax.ShapeDefinition_ListOfAlts_Elmt] -> Phantoms.TTerm (Maybe Syntax.TripleExpression) -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm Syntax.ShapeDefinition
-shapeDefinition listOfAlts tripleExpression listOfAnnotation semanticActions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAlts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm tripleExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAnnotation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Phantoms.unTTerm semanticActions)}]}))
-
-shapeDefinitionListOfAlts :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm [Syntax.ShapeDefinition_ListOfAlts_Elmt]
-shapeDefinitionListOfAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-        Core.projectionField = (Core.Name "listOfAlts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeDefinitionListOfAnnotation :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm [Syntax.Annotation]
-shapeDefinitionListOfAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-        Core.projectionField = (Core.Name "listOfAnnotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeDefinitionSemanticActions :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm Syntax.SemanticActions
-shapeDefinitionSemanticActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-        Core.projectionField = (Core.Name "SemanticActions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeDefinitionTripleExpression :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm (Maybe Syntax.TripleExpression)
-shapeDefinitionTripleExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-        Core.projectionField = (Core.Name "TripleExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeDefinitionWithListOfAlts :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm [Syntax.ShapeDefinition_ListOfAlts_Elmt] -> Phantoms.TTerm Syntax.ShapeDefinition
-shapeDefinitionWithListOfAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "TripleExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shapeDefinitionWithListOfAnnotation :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.ShapeDefinition
-shapeDefinitionWithListOfAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "TripleExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shapeDefinitionWithSemanticActions :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm Syntax.ShapeDefinition
-shapeDefinitionWithSemanticActions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "TripleExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shapeDefinitionWithTripleExpression :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm (Maybe Syntax.TripleExpression) -> Phantoms.TTerm Syntax.ShapeDefinition
-shapeDefinitionWithTripleExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAlts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAlts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TripleExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shapeDefinition_ListOfAlts_ElmtCLOSED :: Phantoms.TTerm Syntax.ShapeDefinition_ListOfAlts_Elmt
-shapeDefinition_ListOfAlts_ElmtCLOSED =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "CLOSED"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shapeDefinition_ListOfAlts_ElmtExtraPropertySet :: Phantoms.TTerm Syntax.ExtraPropertySet -> Phantoms.TTerm Syntax.ShapeDefinition_ListOfAlts_Elmt
-shapeDefinition_ListOfAlts_ElmtExtraPropertySet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ExtraPropertySet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeDefinition_ListOfAlts_ElmtIncludeSet :: Phantoms.TTerm Syntax.IncludeSet -> Phantoms.TTerm Syntax.ShapeDefinition_ListOfAlts_Elmt
-shapeDefinition_ListOfAlts_ElmtIncludeSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeDefinition_ListOfAlts_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IncludeSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeExprLabelBlankNode :: Phantoms.TTerm Syntax.BlankNode -> Phantoms.TTerm Syntax.ShapeExprLabel
-shapeExprLabelBlankNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeExprLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "BlankNode"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeExprLabelIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.ShapeExprLabel
-shapeExprLabelIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeExprLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeExpression :: Phantoms.TTerm Syntax.ShapeOr -> Phantoms.TTerm Syntax.ShapeExpression
-shapeExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.ShapeExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-shapeNot :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.ShapeAtom -> Phantoms.TTerm Syntax.ShapeNot
-shapeNot nOT shapeAtom =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm nOT)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAtom"),
-          Core.fieldTerm = (Phantoms.unTTerm shapeAtom)}]}))
-
-shapeNotNOT :: Phantoms.TTerm Syntax.ShapeNot -> Phantoms.TTerm (Maybe ())
-shapeNotNOT x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-        Core.projectionField = (Core.Name "NOT")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeNotShapeAtom :: Phantoms.TTerm Syntax.ShapeNot -> Phantoms.TTerm Syntax.ShapeAtom
-shapeNotShapeAtom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-        Core.projectionField = (Core.Name "ShapeAtom")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeNotWithNOT :: Phantoms.TTerm Syntax.ShapeNot -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.ShapeNot
-shapeNotWithNOT original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAtom"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-              Core.projectionField = (Core.Name "ShapeAtom")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shapeNotWithShapeAtom :: Phantoms.TTerm Syntax.ShapeNot -> Phantoms.TTerm Syntax.ShapeAtom -> Phantoms.TTerm Syntax.ShapeNot
-shapeNotWithShapeAtom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeNot"),
-              Core.projectionField = (Core.Name "NOT")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAtom"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shapeOr :: Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm [Syntax.ShapeAnd] -> Phantoms.TTerm Syntax.ShapeOr
-shapeOr shapeAnd listOfSequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAnd"),
-          Core.fieldTerm = (Phantoms.unTTerm shapeAnd)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfSequence)}]}))
-
-shapeOrListOfSequence :: Phantoms.TTerm Syntax.ShapeOr -> Phantoms.TTerm [Syntax.ShapeAnd]
-shapeOrListOfSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-        Core.projectionField = (Core.Name "listOfSequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeOrRefAtpNameLn :: Phantoms.TTerm Syntax.AtpNameLn -> Phantoms.TTerm Syntax.ShapeOrRef
-shapeOrRefAtpNameLn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "AtpNameLn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeOrRefAtpNameNs :: Phantoms.TTerm Syntax.AtpNameNs -> Phantoms.TTerm Syntax.ShapeOrRef
-shapeOrRefAtpNameNs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "AtpNameNs"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeOrRefSequence :: Phantoms.TTerm Syntax.ShapeExprLabel -> Phantoms.TTerm Syntax.ShapeOrRef
-shapeOrRefSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeOrRefShapeDefinition :: Phantoms.TTerm Syntax.ShapeDefinition -> Phantoms.TTerm Syntax.ShapeOrRef
-shapeOrRefShapeDefinition x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOrRef"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ShapeDefinition"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shapeOrShapeAnd :: Phantoms.TTerm Syntax.ShapeOr -> Phantoms.TTerm Syntax.ShapeAnd
-shapeOrShapeAnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-        Core.projectionField = (Core.Name "ShapeAnd")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shapeOrWithListOfSequence :: Phantoms.TTerm Syntax.ShapeOr -> Phantoms.TTerm [Syntax.ShapeAnd] -> Phantoms.TTerm Syntax.ShapeOr
-shapeOrWithListOfSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAnd"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-              Core.projectionField = (Core.Name "ShapeAnd")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shapeOrWithShapeAnd :: Phantoms.TTerm Syntax.ShapeOr -> Phantoms.TTerm Syntax.ShapeAnd -> Phantoms.TTerm Syntax.ShapeOr
-shapeOrWithShapeAnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "ShapeAnd"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfSequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShapeOr"),
-              Core.projectionField = (Core.Name "listOfSequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shexDoc :: Phantoms.TTerm [Syntax.Directive] -> Phantoms.TTerm (Maybe Syntax.ShexDoc_Sequence_Option) -> Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.ShexDoc
-shexDoc listOfDirective sequence prefixDecl =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfDirective"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfDirective)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PrefixDecl"),
-          Core.fieldTerm = (Phantoms.unTTerm prefixDecl)}]}))
-
-shexDocListOfDirective :: Phantoms.TTerm Syntax.ShexDoc -> Phantoms.TTerm [Syntax.Directive]
-shexDocListOfDirective x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-        Core.projectionField = (Core.Name "listOfDirective")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shexDocPrefixDecl :: Phantoms.TTerm Syntax.ShexDoc -> Phantoms.TTerm Syntax.PrefixDecl
-shexDocPrefixDecl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-        Core.projectionField = (Core.Name "PrefixDecl")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shexDocSequence :: Phantoms.TTerm Syntax.ShexDoc -> Phantoms.TTerm (Maybe Syntax.ShexDoc_Sequence_Option)
-shexDocSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shexDocWithListOfDirective :: Phantoms.TTerm Syntax.ShexDoc -> Phantoms.TTerm [Syntax.Directive] -> Phantoms.TTerm Syntax.ShexDoc
-shexDocWithListOfDirective original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfDirective"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PrefixDecl"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-              Core.projectionField = (Core.Name "PrefixDecl")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shexDocWithPrefixDecl :: Phantoms.TTerm Syntax.ShexDoc -> Phantoms.TTerm Syntax.PrefixDecl -> Phantoms.TTerm Syntax.ShexDoc
-shexDocWithPrefixDecl original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfDirective"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-              Core.projectionField = (Core.Name "listOfDirective")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "PrefixDecl"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shexDocWithSequence :: Phantoms.TTerm Syntax.ShexDoc -> Phantoms.TTerm (Maybe Syntax.ShexDoc_Sequence_Option) -> Phantoms.TTerm Syntax.ShexDoc
-shexDocWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfDirective"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-              Core.projectionField = (Core.Name "listOfDirective")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "PrefixDecl"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc"),
-              Core.projectionField = (Core.Name "PrefixDecl")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shexDoc_Sequence_Option :: Phantoms.TTerm Syntax.ShexDoc_Sequence_Option_Alts -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option
-shexDoc_Sequence_Option alts listOfStatement =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfStatement)}]}))
-
-shexDoc_Sequence_OptionAlts :: Phantoms.TTerm Syntax.ShexDoc_Sequence_Option -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option_Alts
-shexDoc_Sequence_OptionAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shexDoc_Sequence_OptionListOfStatement :: Phantoms.TTerm Syntax.ShexDoc_Sequence_Option -> Phantoms.TTerm [Syntax.Statement]
-shexDoc_Sequence_OptionListOfStatement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-        Core.projectionField = (Core.Name "listOfStatement")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-shexDoc_Sequence_OptionWithAlts :: Phantoms.TTerm Syntax.ShexDoc_Sequence_Option -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option_Alts -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option
-shexDoc_Sequence_OptionWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfStatement"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-              Core.projectionField = (Core.Name "listOfStatement")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shexDoc_Sequence_OptionWithListOfStatement :: Phantoms.TTerm Syntax.ShexDoc_Sequence_Option -> Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option
-shexDoc_Sequence_OptionWithListOfStatement original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfStatement"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-shexDoc_Sequence_Option_AltsNotStartAction :: Phantoms.TTerm Syntax.NotStartAction -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option_Alts
-shexDoc_Sequence_Option_AltsNotStartAction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NotStartAction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-shexDoc_Sequence_Option_AltsStartActions :: Phantoms.TTerm Syntax.StartActions -> Phantoms.TTerm Syntax.ShexDoc_Sequence_Option_Alts
-shexDoc_Sequence_Option_AltsStartActions x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "StartActions"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-singleElementGroup :: Phantoms.TTerm Syntax.UnaryTripleExpr -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.SingleElementGroup
-singleElementGroup unaryTripleExpr semi =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm unaryTripleExpr)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Phantoms.unTTerm semi)}]}))
-
-singleElementGroupSemi :: Phantoms.TTerm Syntax.SingleElementGroup -> Phantoms.TTerm (Maybe ())
-singleElementGroupSemi x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-        Core.projectionField = (Core.Name "Semi")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singleElementGroupUnaryTripleExpr :: Phantoms.TTerm Syntax.SingleElementGroup -> Phantoms.TTerm Syntax.UnaryTripleExpr
-singleElementGroupUnaryTripleExpr x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-        Core.projectionField = (Core.Name "UnaryTripleExpr")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-singleElementGroupWithSemi :: Phantoms.TTerm Syntax.SingleElementGroup -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.SingleElementGroup
-singleElementGroupWithSemi original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-              Core.projectionField = (Core.Name "UnaryTripleExpr")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-singleElementGroupWithUnaryTripleExpr :: Phantoms.TTerm Syntax.SingleElementGroup -> Phantoms.TTerm Syntax.UnaryTripleExpr -> Phantoms.TTerm Syntax.SingleElementGroup
-singleElementGroupWithUnaryTripleExpr original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "UnaryTripleExpr"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Semi"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.SingleElementGroup"),
-              Core.projectionField = (Core.Name "Semi")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-startActions :: Phantoms.TTerm [Syntax.CodeDecl] -> Phantoms.TTerm Syntax.StartActions
-startActions x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.StartActions"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-statementDirective :: Phantoms.TTerm Syntax.Directive -> Phantoms.TTerm Syntax.Statement
-statementDirective x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Directive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-statementNotStartAction :: Phantoms.TTerm Syntax.NotStartAction -> Phantoms.TTerm Syntax.Statement
-statementNotStartAction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Statement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NotStartAction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringFacetRegexp :: Phantoms.TTerm Syntax.Regexp -> Phantoms.TTerm Syntax.StringFacet
-stringFacetRegexp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Regexp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringFacetSequence :: Phantoms.TTerm Syntax.StringFacet_Sequence -> Phantoms.TTerm Syntax.StringFacet
-stringFacetSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringFacet_Sequence :: Phantoms.TTerm Syntax.StringLength -> Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.StringFacet_Sequence
-stringFacet_Sequence stringLength integer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "StringLength"),
-          Core.fieldTerm = (Phantoms.unTTerm stringLength)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Phantoms.unTTerm integer)}]}))
-
-stringFacet_SequenceInteger :: Phantoms.TTerm Syntax.StringFacet_Sequence -> Phantoms.TTerm Syntax.Integer_
-stringFacet_SequenceInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-        Core.projectionField = (Core.Name "Integer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFacet_SequenceStringLength :: Phantoms.TTerm Syntax.StringFacet_Sequence -> Phantoms.TTerm Syntax.StringLength
-stringFacet_SequenceStringLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-        Core.projectionField = (Core.Name "StringLength")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringFacet_SequenceWithInteger :: Phantoms.TTerm Syntax.StringFacet_Sequence -> Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm Syntax.StringFacet_Sequence
-stringFacet_SequenceWithInteger original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "StringLength"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-              Core.projectionField = (Core.Name "StringLength")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringFacet_SequenceWithStringLength :: Phantoms.TTerm Syntax.StringFacet_Sequence -> Phantoms.TTerm Syntax.StringLength -> Phantoms.TTerm Syntax.StringFacet_Sequence
-stringFacet_SequenceWithStringLength original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "StringLength"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringFacet_Sequence"),
-              Core.projectionField = (Core.Name "Integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringLengthLENGTH :: Phantoms.TTerm Syntax.StringLength
-stringLengthLENGTH =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLength"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "LENGTH"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringLengthMAXLENGTH :: Phantoms.TTerm Syntax.StringLength
-stringLengthMAXLENGTH =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLength"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MAXLENGTH"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringLengthMINLENGTH :: Phantoms.TTerm Syntax.StringLength
-stringLengthMINLENGTH =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLength"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "MINLENGTH"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringLiteral1 :: Phantoms.TTerm [Syntax.StringLiteral1_Elmt] -> Phantoms.TTerm Syntax.StringLiteral1
-stringLiteral1 x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.StringLiteral1"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringLiteral1_ElmtEchar :: Phantoms.TTerm Syntax.Echar -> Phantoms.TTerm Syntax.StringLiteral1_Elmt
-stringLiteral1_ElmtEchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteral1_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Echar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral1_ElmtRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteral1_Elmt
-stringLiteral1_ElmtRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteral1_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral1_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.StringLiteral1_Elmt
-stringLiteral1_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteral1_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral2 :: Phantoms.TTerm [Syntax.StringLiteral2_Elmt] -> Phantoms.TTerm Syntax.StringLiteral2
-stringLiteral2 x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.StringLiteral2"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringLiteral2_ElmtEchar :: Phantoms.TTerm Syntax.Echar -> Phantoms.TTerm Syntax.StringLiteral2_Elmt
-stringLiteral2_ElmtEchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteral2_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Echar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral2_ElmtRegex :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteral2_Elmt
-stringLiteral2_ElmtRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteral2_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteral2_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.StringLiteral2_Elmt
-stringLiteral2_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteral2_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong1 :: Phantoms.TTerm [Syntax.StringLiteralLong1_Elmt] -> Phantoms.TTerm Syntax.StringLiteralLong1
-stringLiteralLong1 x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringLiteralLong1_ElmtEchar :: Phantoms.TTerm Syntax.Echar -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt
-stringLiteralLong1_ElmtEchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Echar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong1_ElmtSequence :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt
-stringLiteralLong1_ElmtSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong1_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt
-stringLiteralLong1_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong1_Elmt_Sequence :: Phantoms.TTerm (Maybe Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option) -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence
-stringLiteralLong1_Elmt_Sequence alts regex =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Phantoms.unTTerm regex)}]}))
-
-stringLiteralLong1_Elmt_SequenceAlts :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence -> Phantoms.TTerm (Maybe Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option)
-stringLiteralLong1_Elmt_SequenceAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-        Core.projectionField = (Core.Name "Alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringLiteralLong1_Elmt_SequenceRegex :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence -> Phantoms.TTerm String
-stringLiteralLong1_Elmt_SequenceRegex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-        Core.projectionField = (Core.Name "regex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringLiteralLong1_Elmt_SequenceWithAlts :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence -> Phantoms.TTerm (Maybe Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option) -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence
-stringLiteralLong1_Elmt_SequenceWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-              Core.projectionField = (Core.Name "regex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringLiteralLong1_Elmt_SequenceWithRegex :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence
-stringLiteralLong1_Elmt_SequenceWithRegex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"),
-              Core.projectionField = (Core.Name "Alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringLiteralLong1_Elmt_Sequence_Alts_OptionApos :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option
-stringLiteralLong1_Elmt_Sequence_Alts_OptionApos =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Apos"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringLiteralLong1_Elmt_Sequence_Alts_OptionSequence :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence -> Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option
-stringLiteralLong1_Elmt_Sequence_Alts_OptionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence :: Phantoms.TTerm Syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence
-stringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence"),
-      Core.recordFields = []}))
-
-stringLiteralLong2 :: Phantoms.TTerm [Syntax.StringLiteralLong2_Elmt] -> Phantoms.TTerm Syntax.StringLiteralLong2
-stringLiteralLong2 x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringLiteralLong2_ElmtEchar :: Phantoms.TTerm Syntax.Echar -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt
-stringLiteralLong2_ElmtEchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Echar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong2_ElmtSequence :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt
-stringLiteralLong2_ElmtSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong2_ElmtUchar :: Phantoms.TTerm Syntax.Uchar -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt
-stringLiteralLong2_ElmtUchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Uchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong2_Elmt_Sequence :: Phantoms.TTerm (Maybe Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option) -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence
-stringLiteralLong2_Elmt_Sequence alts regex =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)},
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Phantoms.unTTerm regex)}]}))
-
-stringLiteralLong2_Elmt_SequenceAlts :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence -> Phantoms.TTerm (Maybe Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option)
-stringLiteralLong2_Elmt_SequenceAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-        Core.projectionField = (Core.Name "Alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringLiteralLong2_Elmt_SequenceRegex :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence -> Phantoms.TTerm String
-stringLiteralLong2_Elmt_SequenceRegex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-        Core.projectionField = (Core.Name "regex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringLiteralLong2_Elmt_SequenceWithAlts :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence -> Phantoms.TTerm (Maybe Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option) -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence
-stringLiteralLong2_Elmt_SequenceWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-              Core.projectionField = (Core.Name "regex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringLiteralLong2_Elmt_SequenceWithRegex :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence -> Phantoms.TTerm String -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence
-stringLiteralLong2_Elmt_SequenceWithRegex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"),
-              Core.projectionField = (Core.Name "Alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringLiteralLong2_Elmt_Sequence_Alts_OptionQuot :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option
-stringLiteralLong2_Elmt_Sequence_Alts_OptionQuot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Quot"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stringLiteralLong2_Elmt_Sequence_Alts_OptionSequence :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence -> Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option
-stringLiteralLong2_Elmt_Sequence_Alts_OptionSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence :: Phantoms.TTerm Syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence
-stringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence"),
-      Core.recordFields = []}))
-
-stringStringLiteral1 :: Phantoms.TTerm Syntax.StringLiteral1 -> Phantoms.TTerm Syntax.String_
-stringStringLiteral1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.String"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "StringLiteral1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringStringLiteral2 :: Phantoms.TTerm Syntax.StringLiteral2 -> Phantoms.TTerm Syntax.String_
-stringStringLiteral2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.String"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "StringLiteral2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringStringLiteralLong1 :: Phantoms.TTerm Syntax.StringLiteralLong1 -> Phantoms.TTerm Syntax.String_
-stringStringLiteralLong1 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.String"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "StringLiteralLong1"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringStringLiteralLong2 :: Phantoms.TTerm Syntax.StringLiteralLong2 -> Phantoms.TTerm Syntax.String_
-stringStringLiteralLong2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.String"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "StringLiteralLong2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tripleConstraint :: Phantoms.TTerm (Maybe Syntax.SenseFlags) -> Phantoms.TTerm Syntax.Predicate -> Phantoms.TTerm Syntax.InlineShapeExpression -> Phantoms.TTerm (Maybe Syntax.Cardinality) -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraint senseFlags predicate inlineShapeExpression cardinality listOfAnnotation semanticActions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Phantoms.unTTerm senseFlags)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm inlineShapeExpression)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm cardinality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm listOfAnnotation)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Phantoms.unTTerm semanticActions)}]}))
-
-tripleConstraintCardinality :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm (Maybe Syntax.Cardinality)
-tripleConstraintCardinality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-        Core.projectionField = (Core.Name "Cardinality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleConstraintInlineShapeExpression :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.InlineShapeExpression
-tripleConstraintInlineShapeExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-        Core.projectionField = (Core.Name "InlineShapeExpression")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleConstraintListOfAnnotation :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm [Syntax.Annotation]
-tripleConstraintListOfAnnotation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-        Core.projectionField = (Core.Name "listOfAnnotation")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleConstraintPredicate :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.Predicate
-tripleConstraintPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-        Core.projectionField = (Core.Name "Predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleConstraintSemanticActions :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.SemanticActions
-tripleConstraintSemanticActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-        Core.projectionField = (Core.Name "SemanticActions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleConstraintSenseFlags :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm (Maybe Syntax.SenseFlags)
-tripleConstraintSenseFlags x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-        Core.projectionField = (Core.Name "SenseFlags")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tripleConstraintWithCardinality :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm (Maybe Syntax.Cardinality) -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraintWithCardinality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SenseFlags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "InlineShapeExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tripleConstraintWithInlineShapeExpression :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.InlineShapeExpression -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraintWithInlineShapeExpression original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SenseFlags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tripleConstraintWithListOfAnnotation :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm [Syntax.Annotation] -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraintWithListOfAnnotation original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SenseFlags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "InlineShapeExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tripleConstraintWithPredicate :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.Predicate -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraintWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SenseFlags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "InlineShapeExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tripleConstraintWithSemanticActions :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraintWithSemanticActions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SenseFlags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "InlineShapeExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tripleConstraintWithSenseFlags :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm (Maybe Syntax.SenseFlags) -> Phantoms.TTerm Syntax.TripleConstraint
-tripleConstraintWithSenseFlags original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "SenseFlags"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "InlineShapeExpression"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "InlineShapeExpression")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "Cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "listOfAnnotation"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "listOfAnnotation")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "SemanticActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.TripleConstraint"),
-              Core.projectionField = (Core.Name "SemanticActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tripleExprLabelBlankNode :: Phantoms.TTerm Syntax.BlankNode -> Phantoms.TTerm Syntax.TripleExprLabel
-tripleExprLabelBlankNode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.TripleExprLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "BlankNode"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tripleExprLabelIri :: Phantoms.TTerm Syntax.Iri -> Phantoms.TTerm Syntax.TripleExprLabel
-tripleExprLabelIri x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.TripleExprLabel"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Iri"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tripleExpression :: Phantoms.TTerm Syntax.OneOfTripleExpr -> Phantoms.TTerm Syntax.TripleExpression
-tripleExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.TripleExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-ucharSequence :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Uchar
-ucharSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Uchar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-ucharSequence2 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Uchar
-ucharSequence2 x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.Uchar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence2"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-uchar_Sequence :: Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence
-uchar_Sequence hex hex2 hex3 hex4 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Phantoms.unTTerm hex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Phantoms.unTTerm hex2)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Phantoms.unTTerm hex3)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Phantoms.unTTerm hex4)}]}))
-
-uchar_Sequence2 :: Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2 hex hex2 hex3 hex4 hex5 hex6 hex7 hex8 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Phantoms.unTTerm hex)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Phantoms.unTTerm hex2)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Phantoms.unTTerm hex3)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Phantoms.unTTerm hex4)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Phantoms.unTTerm hex5)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Phantoms.unTTerm hex6)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Phantoms.unTTerm hex7)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Phantoms.unTTerm hex8)}]}))
-
-uchar_Sequence2Hex :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex2 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex3 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex3 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex3")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex4 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex4 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex4")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex5 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex5 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex5")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex6 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex6 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex6")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex7 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex7 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex7")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2Hex8 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex
-uchar_Sequence2Hex8 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-        Core.projectionField = (Core.Name "Hex8")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_Sequence2WithHex :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex2 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex3 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex3 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex4 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex4 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex5 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex5 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex6 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex6 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex7 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex7 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex8")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_Sequence2WithHex8 :: Phantoms.TTerm Syntax.Uchar_Sequence2 -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence2
-uchar_Sequence2WithHex8 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex5"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex5")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex6"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex6")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex7"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence2"),
-              Core.projectionField = (Core.Name "Hex7")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex8"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-uchar_SequenceHex :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex
-uchar_SequenceHex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-        Core.projectionField = (Core.Name "Hex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_SequenceHex2 :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex
-uchar_SequenceHex2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-        Core.projectionField = (Core.Name "Hex2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_SequenceHex3 :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex
-uchar_SequenceHex3 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-        Core.projectionField = (Core.Name "Hex3")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_SequenceHex4 :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex
-uchar_SequenceHex4 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-        Core.projectionField = (Core.Name "Hex4")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uchar_SequenceWithHex :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence
-uchar_SequenceWithHex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_SequenceWithHex2 :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence
-uchar_SequenceWithHex2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_SequenceWithHex3 :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence
-uchar_SequenceWithHex3 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex4")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-uchar_SequenceWithHex4 :: Phantoms.TTerm Syntax.Uchar_Sequence -> Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm Syntax.Uchar_Sequence
-uchar_SequenceWithHex4 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.Uchar_Sequence"),
-              Core.projectionField = (Core.Name "Hex3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Hex4"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unAtpNameNs :: Phantoms.TTerm Syntax.AtpNameNs -> Phantoms.TTerm (Maybe Syntax.PnPrefix)
-unAtpNameNs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.AtpNameNs")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBaseDecl :: Phantoms.TTerm Syntax.BaseDecl -> Phantoms.TTerm Syntax.IriRef
-unBaseDecl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.BaseDecl")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBlankNode :: Phantoms.TTerm Syntax.BlankNode -> Phantoms.TTerm Syntax.BlankNodeLabel
-unBlankNode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.BlankNode")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCode :: Phantoms.TTerm Syntax.Code -> Phantoms.TTerm [Syntax.Code_Elmt]
-unCode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Code")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDatatype :: Phantoms.TTerm Syntax.Datatype -> Phantoms.TTerm Syntax.Iri
-unDatatype x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Datatype")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDecimal :: Phantoms.TTerm Syntax.Decimal -> Phantoms.TTerm String
-unDecimal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Decimal")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDouble :: Phantoms.TTerm Syntax.Double_ -> Phantoms.TTerm String
-unDouble x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Double")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unEchar :: Phantoms.TTerm Syntax.Echar -> Phantoms.TTerm String
-unEchar x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Echar")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExclusion :: Phantoms.TTerm Syntax.Exclusion -> Phantoms.TTerm Syntax.Iri
-unExclusion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Exclusion")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExtraPropertySet :: Phantoms.TTerm Syntax.ExtraPropertySet -> Phantoms.TTerm [Syntax.Predicate]
-unExtraPropertySet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.ExtraPropertySet")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unHex :: Phantoms.TTerm Syntax.Hex -> Phantoms.TTerm String
-unHex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Hex")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInclude :: Phantoms.TTerm Syntax.Include -> Phantoms.TTerm Syntax.TripleExprLabel
-unInclude x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Include")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIncludeSet :: Phantoms.TTerm Syntax.IncludeSet -> Phantoms.TTerm [Syntax.ShapeExprLabel]
-unIncludeSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.IncludeSet")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInlineShapeExpression :: Phantoms.TTerm Syntax.InlineShapeExpression -> Phantoms.TTerm Syntax.InlineShapeOr
-unInlineShapeExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.InlineShapeExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInteger :: Phantoms.TTerm Syntax.Integer_ -> Phantoms.TTerm String
-unInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.Integer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIriRef :: Phantoms.TTerm Syntax.IriRef -> Phantoms.TTerm [Syntax.IriRef_Elmt]
-unIriRef x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.IriRef")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLangTag :: Phantoms.TTerm Syntax.LangTag -> Phantoms.TTerm String
-unLangTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.LangTag")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPnLocalEsc :: Phantoms.TTerm Syntax.PnLocalEsc -> Phantoms.TTerm String
-unPnLocalEsc x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.PnLocalEsc")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPnameNs :: Phantoms.TTerm Syntax.PnameNs -> Phantoms.TTerm (Maybe Syntax.PnPrefix)
-unPnameNs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.PnameNs")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRdfType :: Phantoms.TTerm Syntax.RdfType -> Phantoms.TTerm ()
-unRdfType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.RdfType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSemanticActions :: Phantoms.TTerm Syntax.SemanticActions -> Phantoms.TTerm [Syntax.CodeDecl]
-unSemanticActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.SemanticActions")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSenseFlags :: Phantoms.TTerm Syntax.SenseFlags -> Phantoms.TTerm ()
-unSenseFlags x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.SenseFlags")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unShapeExpression :: Phantoms.TTerm Syntax.ShapeExpression -> Phantoms.TTerm Syntax.ShapeOr
-unShapeExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.ShapeExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStartActions :: Phantoms.TTerm Syntax.StartActions -> Phantoms.TTerm [Syntax.CodeDecl]
-unStartActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.StartActions")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteral1 :: Phantoms.TTerm Syntax.StringLiteral1 -> Phantoms.TTerm [Syntax.StringLiteral1_Elmt]
-unStringLiteral1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.StringLiteral1")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteral2 :: Phantoms.TTerm Syntax.StringLiteral2 -> Phantoms.TTerm [Syntax.StringLiteral2_Elmt]
-unStringLiteral2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.StringLiteral2")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteralLong1 :: Phantoms.TTerm Syntax.StringLiteralLong1 -> Phantoms.TTerm [Syntax.StringLiteralLong1_Elmt]
-unStringLiteralLong1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.StringLiteralLong1")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringLiteralLong2 :: Phantoms.TTerm Syntax.StringLiteralLong2 -> Phantoms.TTerm [Syntax.StringLiteralLong2_Elmt]
-unStringLiteralLong2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.StringLiteralLong2")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTripleExpression :: Phantoms.TTerm Syntax.TripleExpression -> Phantoms.TTerm Syntax.OneOfTripleExpr
-unTripleExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.TripleExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unValueSet :: Phantoms.TTerm Syntax.ValueSet -> Phantoms.TTerm [Syntax.ValueSetValue]
-unValueSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.shex.syntax.ValueSet")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryTripleExprInclude :: Phantoms.TTerm Syntax.Include -> Phantoms.TTerm Syntax.UnaryTripleExpr
-unaryTripleExprInclude x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Include"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryTripleExprSequence :: Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence -> Phantoms.TTerm Syntax.UnaryTripleExpr
-unaryTripleExprSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryTripleExpr_Sequence :: Phantoms.TTerm (Maybe Syntax.TripleExprLabel) -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence_Alts -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence
-unaryTripleExpr_Sequence sequence alts =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm alts)}]}))
-
-unaryTripleExpr_SequenceAlts :: Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence_Alts
-unaryTripleExpr_SequenceAlts x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-        Core.projectionField = (Core.Name "alts")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryTripleExpr_SequenceSequence :: Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence -> Phantoms.TTerm (Maybe Syntax.TripleExprLabel)
-unaryTripleExpr_SequenceSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unaryTripleExpr_SequenceWithAlts :: Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence_Alts -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence
-unaryTripleExpr_SequenceWithAlts original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unaryTripleExpr_SequenceWithSequence :: Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence -> Phantoms.TTerm (Maybe Syntax.TripleExprLabel) -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence
-unaryTripleExpr_SequenceWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "alts"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"),
-              Core.projectionField = (Core.Name "alts")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-unaryTripleExpr_Sequence_AltsBracketedTripleExpr :: Phantoms.TTerm Syntax.BracketedTripleExpr -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence_Alts
-unaryTripleExpr_Sequence_AltsBracketedTripleExpr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "BracketedTripleExpr"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unaryTripleExpr_Sequence_AltsTripleConstraint :: Phantoms.TTerm Syntax.TripleConstraint -> Phantoms.TTerm Syntax.UnaryTripleExpr_Sequence_Alts
-unaryTripleExpr_Sequence_AltsTripleConstraint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence_Alts"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "TripleConstraint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueSet :: Phantoms.TTerm [Syntax.ValueSetValue] -> Phantoms.TTerm Syntax.ValueSet
-valueSet x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.shex.syntax.ValueSet"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-valueSetValueIriRange :: Phantoms.TTerm Syntax.IriRange -> Phantoms.TTerm Syntax.ValueSetValue
-valueSetValueIriRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ValueSetValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IriRange"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueSetValueLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.ValueSetValue
-valueSetValueLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.ValueSetValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "Literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-xsFacetNumericFacet :: Phantoms.TTerm Syntax.NumericFacet -> Phantoms.TTerm Syntax.XsFacet
-xsFacetNumericFacet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.XsFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NumericFacet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-xsFacetStringFacet :: Phantoms.TTerm Syntax.StringFacet -> Phantoms.TTerm Syntax.XsFacet
-xsFacetStringFacet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.shex.syntax.XsFacet"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "StringFacet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Sql/Syntax.hs b/src/main/haskell/Hydra/Dsl/Sql/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Sql/Syntax.hs
+++ /dev/null
@@ -1,3833 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.sql.syntax
-
-module Hydra.Dsl.Sql.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Sql.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-approximateNumericLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ApproximateNumericLiteral
-approximateNumericLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ApproximateNumericLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-approximateNumericTypeDouble :: Phantoms.TTerm Syntax.ApproximateNumericType
-approximateNumericTypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-approximateNumericTypeFloat :: Phantoms.TTerm (Maybe Syntax.Precision) -> Phantoms.TTerm Syntax.ApproximateNumericType
-approximateNumericTypeFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-approximateNumericTypeReal :: Phantoms.TTerm Syntax.ApproximateNumericType
-approximateNumericTypeReal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ApproximateNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "real"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-arrayElement :: Phantoms.TTerm Syntax.ValueExpression -> Phantoms.TTerm Syntax.ArrayElement
-arrayElement x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ArrayElement"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrayElementList :: Phantoms.TTerm Syntax.ArrayElement -> Phantoms.TTerm [Syntax.ArrayElement] -> Phantoms.TTerm Syntax.ArrayElementList
-arrayElementList first rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-arrayElementListFirst :: Phantoms.TTerm Syntax.ArrayElementList -> Phantoms.TTerm Syntax.ArrayElement
-arrayElementListFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayElementListRest :: Phantoms.TTerm Syntax.ArrayElementList -> Phantoms.TTerm [Syntax.ArrayElement]
-arrayElementListRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayElementListWithFirst :: Phantoms.TTerm Syntax.ArrayElementList -> Phantoms.TTerm Syntax.ArrayElement -> Phantoms.TTerm Syntax.ArrayElementList
-arrayElementListWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayElementListWithRest :: Phantoms.TTerm Syntax.ArrayElementList -> Phantoms.TTerm [Syntax.ArrayElement] -> Phantoms.TTerm Syntax.ArrayElementList
-arrayElementListWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayElementList"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayElementReference :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ArrayElementReference
-arrayElementReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ArrayElementReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrayType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ArrayType
-arrayType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ArrayType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrayValueConstructorByEnumeration :: Phantoms.TTerm Syntax.LeftBracketOrTrigraph -> Phantoms.TTerm Syntax.ArrayElementList -> Phantoms.TTerm Syntax.RightBracketOrTrigraph -> Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration
-arrayValueConstructorByEnumeration leftBracketOrTrigraph arrayElementList rightBracketOrTrigraph =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "LeftBracketOrTrigraph"),
-          Core.fieldTerm = (Phantoms.unTTerm leftBracketOrTrigraph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArrayElementList"),
-          Core.fieldTerm = (Phantoms.unTTerm arrayElementList)},
-        Core.Field {
-          Core.fieldName = (Core.Name "RightBracketOrTrigraph"),
-          Core.fieldTerm = (Phantoms.unTTerm rightBracketOrTrigraph)}]}))
-
-arrayValueConstructorByEnumerationArrayElementList :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.ArrayElementList
-arrayValueConstructorByEnumerationArrayElementList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-        Core.projectionField = (Core.Name "ArrayElementList")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayValueConstructorByEnumerationLeftBracketOrTrigraph :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.LeftBracketOrTrigraph
-arrayValueConstructorByEnumerationLeftBracketOrTrigraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-        Core.projectionField = (Core.Name "LeftBracketOrTrigraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayValueConstructorByEnumerationRightBracketOrTrigraph :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.RightBracketOrTrigraph
-arrayValueConstructorByEnumerationRightBracketOrTrigraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-        Core.projectionField = (Core.Name "RightBracketOrTrigraph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-arrayValueConstructorByEnumerationWithArrayElementList :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.ArrayElementList -> Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration
-arrayValueConstructorByEnumerationWithArrayElementList original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "LeftBracketOrTrigraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "LeftBracketOrTrigraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArrayElementList"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "RightBracketOrTrigraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "RightBracketOrTrigraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayValueConstructorByEnumerationWithLeftBracketOrTrigraph :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.LeftBracketOrTrigraph -> Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration
-arrayValueConstructorByEnumerationWithLeftBracketOrTrigraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "LeftBracketOrTrigraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArrayElementList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "ArrayElementList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "RightBracketOrTrigraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "RightBracketOrTrigraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-arrayValueConstructorByEnumerationWithRightBracketOrTrigraph :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.RightBracketOrTrigraph -> Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration
-arrayValueConstructorByEnumerationWithRightBracketOrTrigraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "LeftBracketOrTrigraph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "LeftBracketOrTrigraph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "ArrayElementList"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"),
-              Core.projectionField = (Core.Name "ArrayElementList")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "RightBracketOrTrigraph"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-arrayValueConstructorByQuery :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ArrayValueConstructorByQuery
-arrayValueConstructorByQuery x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructorByQuery"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-arrayValueConstructorEnumeration :: Phantoms.TTerm Syntax.ArrayValueConstructorByEnumeration -> Phantoms.TTerm Syntax.ArrayValueConstructor
-arrayValueConstructorEnumeration x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "enumeration"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayValueConstructorQuery :: Phantoms.TTerm Syntax.ArrayValueConstructorByQuery -> Phantoms.TTerm Syntax.ArrayValueConstructor
-arrayValueConstructorQuery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ArrayValueConstructor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "query"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-arrayValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ArrayValueExpression
-arrayValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ArrayValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-asSubqueryClause :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.AsSubqueryClause
-asSubqueryClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.AsSubqueryClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-attributeOrMethodReference :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.AttributeOrMethodReference
-attributeOrMethodReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.AttributeOrMethodReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-binaryLargeObjectStringTypeBinary :: Phantoms.TTerm (Maybe Syntax.LargeObjectLength) -> Phantoms.TTerm Syntax.BinaryLargeObjectStringType
-binaryLargeObjectStringTypeBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BinaryLargeObjectStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binaryLargeObjectStringTypeBlob :: Phantoms.TTerm (Maybe Syntax.LargeObjectLength) -> Phantoms.TTerm Syntax.BinaryLargeObjectStringType
-binaryLargeObjectStringTypeBlob x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BinaryLargeObjectStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "blob"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-binaryStringLiteral :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.BinaryStringLiteral
-binaryStringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.BinaryStringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-booleanFactor :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.BooleanTest -> Phantoms.TTerm Syntax.BooleanFactor
-booleanFactor nOT booleanTest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm nOT)},
-        Core.Field {
-          Core.fieldName = (Core.Name "BooleanTest"),
-          Core.fieldTerm = (Phantoms.unTTerm booleanTest)}]}))
-
-booleanFactorBooleanTest :: Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm Syntax.BooleanTest
-booleanFactorBooleanTest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-        Core.projectionField = (Core.Name "BooleanTest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanFactorNOT :: Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm (Maybe ())
-booleanFactorNOT x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-        Core.projectionField = (Core.Name "NOT")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanFactorWithBooleanTest :: Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm Syntax.BooleanTest -> Phantoms.TTerm Syntax.BooleanFactor
-booleanFactorWithBooleanTest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-              Core.projectionField = (Core.Name "NOT")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "BooleanTest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanFactorWithNOT :: Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.BooleanFactor
-booleanFactorWithNOT original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "BooleanTest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanFactor"),
-              Core.projectionField = (Core.Name "BooleanTest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-booleanLiteralFALSE :: Phantoms.TTerm Syntax.BooleanLiteral
-booleanLiteralFALSE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FALSE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanLiteralTRUE :: Phantoms.TTerm Syntax.BooleanLiteral
-booleanLiteralTRUE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "TRUE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanLiteralUNKNOWN :: Phantoms.TTerm Syntax.BooleanLiteral
-booleanLiteralUNKNOWN =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "UNKNOWN"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-booleanPredicand :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.BooleanPredicand
-booleanPredicand x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.BooleanPredicand"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-booleanPrimaryPredicand :: Phantoms.TTerm Syntax.BooleanPredicand -> Phantoms.TTerm Syntax.BooleanPrimary
-booleanPrimaryPredicand x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicand"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanPrimaryPredicate :: Phantoms.TTerm Syntax.Predicate -> Phantoms.TTerm Syntax.BooleanPrimary
-booleanPrimaryPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanTermAnd :: Phantoms.TTerm Syntax.BooleanTerm_And -> Phantoms.TTerm Syntax.BooleanTerm
-booleanTermAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanTermFactor :: Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm Syntax.BooleanTerm
-booleanTermFactor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "factor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanTerm_And :: Phantoms.TTerm Syntax.BooleanTerm -> Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm Syntax.BooleanTerm_And
-booleanTerm_And lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-booleanTerm_AndLhs :: Phantoms.TTerm Syntax.BooleanTerm_And -> Phantoms.TTerm Syntax.BooleanTerm
-booleanTerm_AndLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTerm_AndRhs :: Phantoms.TTerm Syntax.BooleanTerm_And -> Phantoms.TTerm Syntax.BooleanFactor
-booleanTerm_AndRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTerm_AndWithLhs :: Phantoms.TTerm Syntax.BooleanTerm_And -> Phantoms.TTerm Syntax.BooleanTerm -> Phantoms.TTerm Syntax.BooleanTerm_And
-booleanTerm_AndWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-booleanTerm_AndWithRhs :: Phantoms.TTerm Syntax.BooleanTerm_And -> Phantoms.TTerm Syntax.BooleanFactor -> Phantoms.TTerm Syntax.BooleanTerm_And
-booleanTerm_AndWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTerm_And"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanTest :: Phantoms.TTerm Syntax.BooleanPrimary -> Phantoms.TTerm (Maybe Syntax.BooleanTest_Sequence_Option) -> Phantoms.TTerm Syntax.BooleanTest
-booleanTest booleanPrimary sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "BooleanPrimary"),
-          Core.fieldTerm = (Phantoms.unTTerm booleanPrimary)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-booleanTestBooleanPrimary :: Phantoms.TTerm Syntax.BooleanTest -> Phantoms.TTerm Syntax.BooleanPrimary
-booleanTestBooleanPrimary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-        Core.projectionField = (Core.Name "BooleanPrimary")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTestSequence :: Phantoms.TTerm Syntax.BooleanTest -> Phantoms.TTerm (Maybe Syntax.BooleanTest_Sequence_Option)
-booleanTestSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTestWithBooleanPrimary :: Phantoms.TTerm Syntax.BooleanTest -> Phantoms.TTerm Syntax.BooleanPrimary -> Phantoms.TTerm Syntax.BooleanTest
-booleanTestWithBooleanPrimary original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "BooleanPrimary"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-booleanTestWithSequence :: Phantoms.TTerm Syntax.BooleanTest -> Phantoms.TTerm (Maybe Syntax.BooleanTest_Sequence_Option) -> Phantoms.TTerm Syntax.BooleanTest
-booleanTestWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "BooleanPrimary"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest"),
-              Core.projectionField = (Core.Name "BooleanPrimary")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanTest_Sequence_Option :: Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.TruthValue -> Phantoms.TTerm Syntax.BooleanTest_Sequence_Option
-booleanTest_Sequence_Option nOT truthValue =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm nOT)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TruthValue"),
-          Core.fieldTerm = (Phantoms.unTTerm truthValue)}]}))
-
-booleanTest_Sequence_OptionNOT :: Phantoms.TTerm Syntax.BooleanTest_Sequence_Option -> Phantoms.TTerm (Maybe ())
-booleanTest_Sequence_OptionNOT x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-        Core.projectionField = (Core.Name "NOT")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTest_Sequence_OptionTruthValue :: Phantoms.TTerm Syntax.BooleanTest_Sequence_Option -> Phantoms.TTerm Syntax.TruthValue
-booleanTest_Sequence_OptionTruthValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-        Core.projectionField = (Core.Name "TruthValue")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanTest_Sequence_OptionWithNOT :: Phantoms.TTerm Syntax.BooleanTest_Sequence_Option -> Phantoms.TTerm (Maybe ()) -> Phantoms.TTerm Syntax.BooleanTest_Sequence_Option
-booleanTest_Sequence_OptionWithNOT original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "TruthValue"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-              Core.projectionField = (Core.Name "TruthValue")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-booleanTest_Sequence_OptionWithTruthValue :: Phantoms.TTerm Syntax.BooleanTest_Sequence_Option -> Phantoms.TTerm Syntax.TruthValue -> Phantoms.TTerm Syntax.BooleanTest_Sequence_Option
-booleanTest_Sequence_OptionWithTruthValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "NOT"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"),
-              Core.projectionField = (Core.Name "NOT")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "TruthValue"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-booleanType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.BooleanType
-booleanType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.BooleanType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-booleanValueExpressionOr :: Phantoms.TTerm Syntax.BooleanValueExpression_Or -> Phantoms.TTerm Syntax.BooleanValueExpression
-booleanValueExpressionOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanValueExpressionTerm :: Phantoms.TTerm Syntax.BooleanTerm -> Phantoms.TTerm Syntax.BooleanValueExpression
-booleanValueExpressionTerm x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "term"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanValueExpression_Or :: Phantoms.TTerm Syntax.BooleanValueExpression -> Phantoms.TTerm Syntax.BooleanTerm -> Phantoms.TTerm Syntax.BooleanValueExpression_Or
-booleanValueExpression_Or lhs rhs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm lhs)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))
-
-booleanValueExpression_OrLhs :: Phantoms.TTerm Syntax.BooleanValueExpression_Or -> Phantoms.TTerm Syntax.BooleanValueExpression
-booleanValueExpression_OrLhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-        Core.projectionField = (Core.Name "lhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanValueExpression_OrRhs :: Phantoms.TTerm Syntax.BooleanValueExpression_Or -> Phantoms.TTerm Syntax.BooleanTerm
-booleanValueExpression_OrRhs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-        Core.projectionField = (Core.Name "rhs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-booleanValueExpression_OrWithLhs :: Phantoms.TTerm Syntax.BooleanValueExpression_Or -> Phantoms.TTerm Syntax.BooleanValueExpression -> Phantoms.TTerm Syntax.BooleanValueExpression_Or
-booleanValueExpression_OrWithLhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-              Core.projectionField = (Core.Name "rhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-booleanValueExpression_OrWithRhs :: Phantoms.TTerm Syntax.BooleanValueExpression_Or -> Phantoms.TTerm Syntax.BooleanTerm -> Phantoms.TTerm Syntax.BooleanValueExpression_Or
-booleanValueExpression_OrWithRhs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"),
-              Core.projectionField = (Core.Name "lhs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-caseExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.CaseExpression
-caseExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.CaseExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-castSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.CastSpecification
-castSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.CastSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-characterSetSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.CharacterSetSpecification
-characterSetSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.CharacterSetSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-characterStringLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.CharacterStringLiteral
-characterStringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.CharacterStringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-characterStringTypeChar :: Phantoms.TTerm (Maybe Syntax.Length) -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeChar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "char"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeCharLargeObject :: Phantoms.TTerm (Maybe Syntax.LargeObjectLength) -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeCharLargeObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "charLargeObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeCharVarying :: Phantoms.TTerm Syntax.Length -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeCharVarying x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "charVarying"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeCharacter :: Phantoms.TTerm (Maybe Syntax.Length) -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeCharacter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "character"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeCharacterLargeObject :: Phantoms.TTerm (Maybe Syntax.LargeObjectLength) -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeCharacterLargeObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "characterLargeObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeCharacterVarying :: Phantoms.TTerm Syntax.Length -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeCharacterVarying x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "characterVarying"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeClob :: Phantoms.TTerm (Maybe Syntax.LargeObjectLength) -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeClob x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "clob"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-characterStringTypeVarchar :: Phantoms.TTerm Syntax.Length -> Phantoms.TTerm Syntax.CharacterStringType
-characterStringTypeVarchar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CharacterStringType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "varchar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-collateClause :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.CollateClause
-collateClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.CollateClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-collectionTypeArray :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm Syntax.CollectionType
-collectionTypeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CollectionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-collectionTypeMultiset :: Phantoms.TTerm Syntax.MultisetType -> Phantoms.TTerm Syntax.CollectionType
-collectionTypeMultiset x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CollectionType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiset"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-collectionValueConstructorArray :: Phantoms.TTerm Syntax.ArrayValueConstructor -> Phantoms.TTerm Syntax.CollectionValueConstructor
-collectionValueConstructorArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CollectionValueConstructor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-collectionValueConstructorMultiset :: Phantoms.TTerm Syntax.MultisetValueConstructor -> Phantoms.TTerm Syntax.CollectionValueConstructor
-collectionValueConstructorMultiset x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CollectionValueConstructor"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiset"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-collectionValueExpressionArray :: Phantoms.TTerm Syntax.ArrayValueExpression -> Phantoms.TTerm Syntax.CollectionValueExpression
-collectionValueExpressionArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CollectionValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-collectionValueExpressionMultiset :: Phantoms.TTerm Syntax.MultisetValueExpression -> Phantoms.TTerm Syntax.CollectionValueExpression
-collectionValueExpressionMultiset x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CollectionValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multiset"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnConstraintDefinition :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ColumnConstraintDefinition
-columnConstraintDefinition x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ColumnConstraintDefinition"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-columnDefinition :: Phantoms.TTerm Syntax.ColumnName -> Phantoms.TTerm (Maybe Syntax.ColumnDefinition_TypeOrDomain_Option) -> Phantoms.TTerm (Maybe Syntax.ReferenceScopeCheck) -> Phantoms.TTerm (Maybe Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option) -> Phantoms.TTerm [Syntax.ColumnConstraintDefinition] -> Phantoms.TTerm (Maybe Syntax.CollateClause) -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinition name typeOrDomain refScope defaultOrIdentityOrGeneration constraints collate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Phantoms.unTTerm typeOrDomain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Phantoms.unTTerm refScope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Phantoms.unTTerm defaultOrIdentityOrGeneration)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm constraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Phantoms.unTTerm collate)}]}))
-
-columnDefinitionCollate :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.CollateClause)
-columnDefinitionCollate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-        Core.projectionField = (Core.Name "collate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnDefinitionConstraints :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm [Syntax.ColumnConstraintDefinition]
-columnDefinitionConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-        Core.projectionField = (Core.Name "constraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnDefinitionDefaultOrIdentityOrGeneration :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option)
-columnDefinitionDefaultOrIdentityOrGeneration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-        Core.projectionField = (Core.Name "defaultOrIdentityOrGeneration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnDefinitionName :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm Syntax.ColumnName
-columnDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnDefinitionRefScope :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.ReferenceScopeCheck)
-columnDefinitionRefScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-        Core.projectionField = (Core.Name "refScope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnDefinitionTypeOrDomain :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.ColumnDefinition_TypeOrDomain_Option)
-columnDefinitionTypeOrDomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-        Core.projectionField = (Core.Name "typeOrDomain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnDefinitionWithCollate :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.CollateClause) -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinitionWithCollate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "typeOrDomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "refScope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "defaultOrIdentityOrGeneration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnDefinitionWithConstraints :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm [Syntax.ColumnConstraintDefinition] -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinitionWithConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "typeOrDomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "refScope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "defaultOrIdentityOrGeneration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnDefinitionWithDefaultOrIdentityOrGeneration :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option) -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinitionWithDefaultOrIdentityOrGeneration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "typeOrDomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "refScope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnDefinitionWithName :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm Syntax.ColumnName -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "typeOrDomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "refScope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "defaultOrIdentityOrGeneration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnDefinitionWithRefScope :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.ReferenceScopeCheck) -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinitionWithRefScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "typeOrDomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "defaultOrIdentityOrGeneration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnDefinitionWithTypeOrDomain :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm (Maybe Syntax.ColumnDefinition_TypeOrDomain_Option) -> Phantoms.TTerm Syntax.ColumnDefinition
-columnDefinitionWithTypeOrDomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeOrDomain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "refScope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "refScope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "defaultOrIdentityOrGeneration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "defaultOrIdentityOrGeneration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "constraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnDefinition_DefaultOrIdentityOrGeneration_OptionDefaultClause :: Phantoms.TTerm Syntax.DefaultClause -> Phantoms.TTerm Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
-columnDefinition_DefaultOrIdentityOrGeneration_OptionDefaultClause x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "DefaultClause"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnDefinition_DefaultOrIdentityOrGeneration_OptionGenerationClause :: Phantoms.TTerm Syntax.GenerationClause -> Phantoms.TTerm Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
-columnDefinition_DefaultOrIdentityOrGeneration_OptionGenerationClause x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "GenerationClause"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnDefinition_DefaultOrIdentityOrGeneration_OptionIdentityColumnSpecification :: Phantoms.TTerm Syntax.IdentityColumnSpecification -> Phantoms.TTerm Syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option
-columnDefinition_DefaultOrIdentityOrGeneration_OptionIdentityColumnSpecification x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IdentityColumnSpecification"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnDefinition_TypeOrDomain_OptionDataType :: Phantoms.TTerm Syntax.DataType -> Phantoms.TTerm Syntax.ColumnDefinition_TypeOrDomain_Option
-columnDefinition_TypeOrDomain_OptionDataType x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition_TypeOrDomain_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "DataType"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnDefinition_TypeOrDomain_OptionDomainName :: Phantoms.TTerm Syntax.DomainName -> Phantoms.TTerm Syntax.ColumnDefinition_TypeOrDomain_Option
-columnDefinition_TypeOrDomain_OptionDomainName x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ColumnDefinition_TypeOrDomain_Option"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "DomainName"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-columnName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ColumnName
-columnName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ColumnName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-columnNameList :: Phantoms.TTerm Syntax.ColumnName -> Phantoms.TTerm [Syntax.ColumnName] -> Phantoms.TTerm Syntax.ColumnNameList
-columnNameList first rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-columnNameListFirst :: Phantoms.TTerm Syntax.ColumnNameList -> Phantoms.TTerm Syntax.ColumnName
-columnNameListFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnNameListRest :: Phantoms.TTerm Syntax.ColumnNameList -> Phantoms.TTerm [Syntax.ColumnName]
-columnNameListRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-columnNameListWithFirst :: Phantoms.TTerm Syntax.ColumnNameList -> Phantoms.TTerm Syntax.ColumnName -> Phantoms.TTerm Syntax.ColumnNameList
-columnNameListWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-columnNameListWithRest :: Phantoms.TTerm Syntax.ColumnNameList -> Phantoms.TTerm [Syntax.ColumnName] -> Phantoms.TTerm Syntax.ColumnNameList
-columnNameListWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ColumnNameList"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-columnOptions :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ColumnOptions
-columnOptions x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ColumnOptions"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-columnReference :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ColumnReference
-columnReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ColumnReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-commonValueExpressionCollection :: Phantoms.TTerm Syntax.CollectionValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonValueExpressionDatetime :: Phantoms.TTerm Syntax.DatetimeValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonValueExpressionInterval :: Phantoms.TTerm Syntax.IntervalValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionInterval x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interval"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonValueExpressionNumeric :: Phantoms.TTerm Syntax.NumericValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonValueExpressionReference :: Phantoms.TTerm Syntax.ReferenceValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonValueExpressionString :: Phantoms.TTerm Syntax.StringValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-commonValueExpressionUserDefined :: Phantoms.TTerm Syntax.UserDefinedTypeValueExpression -> Phantoms.TTerm Syntax.CommonValueExpression
-commonValueExpressionUserDefined x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.CommonValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "userDefined"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-contextuallyTypedRowValueConstructor :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueConstructor
-contextuallyTypedRowValueConstructor x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueConstructor"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-contextuallyTypedRowValueExpressionConstructor :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueConstructor -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpression
-contextuallyTypedRowValueExpressionConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-contextuallyTypedRowValueExpressionList :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpression -> Phantoms.TTerm [Syntax.ContextuallyTypedRowValueExpression] -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList
-contextuallyTypedRowValueExpressionList first rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-contextuallyTypedRowValueExpressionListFirst :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpression
-contextuallyTypedRowValueExpressionListFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-contextuallyTypedRowValueExpressionListRest :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList -> Phantoms.TTerm [Syntax.ContextuallyTypedRowValueExpression]
-contextuallyTypedRowValueExpressionListRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-contextuallyTypedRowValueExpressionListWithFirst :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpression -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList
-contextuallyTypedRowValueExpressionListWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-contextuallyTypedRowValueExpressionListWithRest :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList -> Phantoms.TTerm [Syntax.ContextuallyTypedRowValueExpression] -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList
-contextuallyTypedRowValueExpressionListWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-contextuallyTypedRowValueExpressionSpecialCase :: Phantoms.TTerm Syntax.RowValueSpecialCase -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpression
-contextuallyTypedRowValueExpressionSpecialCase x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "specialCase"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-contextuallyTypedTableValueConstructor :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList -> Phantoms.TTerm Syntax.ContextuallyTypedTableValueConstructor
-contextuallyTypedTableValueConstructor x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ContextuallyTypedTableValueConstructor"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dataTypeCollection :: Phantoms.TTerm Syntax.CollectionType -> Phantoms.TTerm Syntax.DataType
-dataTypeCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeNamed :: Phantoms.TTerm Syntax.PathResolvedUserDefinedTypeName -> Phantoms.TTerm Syntax.DataType
-dataTypeNamed x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "named"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypePredefined :: Phantoms.TTerm Syntax.PredefinedType -> Phantoms.TTerm Syntax.DataType
-dataTypePredefined x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predefined"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeReference :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm Syntax.DataType
-dataTypeReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dataTypeRow :: Phantoms.TTerm Syntax.RowType -> Phantoms.TTerm Syntax.DataType
-dataTypeRow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DataType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "row"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateLiteral :: Phantoms.TTerm Syntax.DateString -> Phantoms.TTerm Syntax.DateLiteral
-dateLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.DateLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dateString :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.DateString
-dateString x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.DateString"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-datetimeLiteralDate :: Phantoms.TTerm Syntax.DateLiteral -> Phantoms.TTerm Syntax.DatetimeLiteral
-datetimeLiteralDate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DatetimeLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeLiteralTime :: Phantoms.TTerm Syntax.TimeLiteral -> Phantoms.TTerm Syntax.DatetimeLiteral
-datetimeLiteralTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DatetimeLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "time"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeLiteralTimestamp :: Phantoms.TTerm Syntax.TimestampLiteral -> Phantoms.TTerm Syntax.DatetimeLiteral
-datetimeLiteralTimestamp x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.DatetimeLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "timestamp"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-datetimeType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.DatetimeType
-datetimeType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.DatetimeType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-datetimeValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.DatetimeValueExpression
-datetimeValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.DatetimeValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-defaultClause :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.DefaultClause
-defaultClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.DefaultClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-domainName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.DomainName
-domainName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.DomainName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-exactNumericLiteral :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ExactNumericLiteral
-exactNumericLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ExactNumericLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-exactNumericTypeBigint :: Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeBigint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigint"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-exactNumericTypeDec :: Phantoms.TTerm (Maybe Syntax.ExactNumericType_Dec_Option) -> Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeDec x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dec"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericTypeDecimal :: Phantoms.TTerm (Maybe Syntax.ExactNumericType_Decimal_Option) -> Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericTypeInt :: Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-exactNumericTypeInteger :: Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-exactNumericTypeNumeric :: Phantoms.TTerm (Maybe Syntax.ExactNumericType_Numeric_Option) -> Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-exactNumericTypeSmallint :: Phantoms.TTerm Syntax.ExactNumericType
-exactNumericTypeSmallint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "smallint"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-exactNumericType_Dec_Option :: Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm (Maybe Syntax.Scale) -> Phantoms.TTerm Syntax.ExactNumericType_Dec_Option
-exactNumericType_Dec_Option precision sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-exactNumericType_Dec_OptionPrecision :: Phantoms.TTerm Syntax.ExactNumericType_Dec_Option -> Phantoms.TTerm Syntax.Precision
-exactNumericType_Dec_OptionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-        Core.projectionField = (Core.Name "Precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exactNumericType_Dec_OptionSequence :: Phantoms.TTerm Syntax.ExactNumericType_Dec_Option -> Phantoms.TTerm (Maybe Syntax.Scale)
-exactNumericType_Dec_OptionSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exactNumericType_Dec_OptionWithPrecision :: Phantoms.TTerm Syntax.ExactNumericType_Dec_Option -> Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm Syntax.ExactNumericType_Dec_Option
-exactNumericType_Dec_OptionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exactNumericType_Dec_OptionWithSequence :: Phantoms.TTerm Syntax.ExactNumericType_Dec_Option -> Phantoms.TTerm (Maybe Syntax.Scale) -> Phantoms.TTerm Syntax.ExactNumericType_Dec_Option
-exactNumericType_Dec_OptionWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"),
-              Core.projectionField = (Core.Name "Precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exactNumericType_Decimal_Option :: Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm (Maybe Syntax.Scale) -> Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option
-exactNumericType_Decimal_Option precision sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-exactNumericType_Decimal_OptionPrecision :: Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option -> Phantoms.TTerm Syntax.Precision
-exactNumericType_Decimal_OptionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-        Core.projectionField = (Core.Name "Precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exactNumericType_Decimal_OptionSequence :: Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option -> Phantoms.TTerm (Maybe Syntax.Scale)
-exactNumericType_Decimal_OptionSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exactNumericType_Decimal_OptionWithPrecision :: Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option -> Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option
-exactNumericType_Decimal_OptionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exactNumericType_Decimal_OptionWithSequence :: Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option -> Phantoms.TTerm (Maybe Syntax.Scale) -> Phantoms.TTerm Syntax.ExactNumericType_Decimal_Option
-exactNumericType_Decimal_OptionWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"),
-              Core.projectionField = (Core.Name "Precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-exactNumericType_Numeric_Option :: Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm (Maybe Syntax.Scale) -> Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option
-exactNumericType_Numeric_Option precision sequence =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Phantoms.unTTerm precision)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm sequence)}]}))
-
-exactNumericType_Numeric_OptionPrecision :: Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option -> Phantoms.TTerm Syntax.Precision
-exactNumericType_Numeric_OptionPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-        Core.projectionField = (Core.Name "Precision")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exactNumericType_Numeric_OptionSequence :: Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option -> Phantoms.TTerm (Maybe Syntax.Scale)
-exactNumericType_Numeric_OptionSequence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-        Core.projectionField = (Core.Name "Sequence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-exactNumericType_Numeric_OptionWithPrecision :: Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option -> Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option
-exactNumericType_Numeric_OptionWithPrecision original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-              Core.projectionField = (Core.Name "Sequence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-exactNumericType_Numeric_OptionWithSequence :: Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option -> Phantoms.TTerm (Maybe Syntax.Scale) -> Phantoms.TTerm Syntax.ExactNumericType_Numeric_Option
-exactNumericType_Numeric_OptionWithSequence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "Precision"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"),
-              Core.projectionField = (Core.Name "Precision")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "Sequence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fieldReference :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.FieldReference
-fieldReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.FieldReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fromConstructor :: Phantoms.TTerm (Maybe Syntax.InsertColumnList) -> Phantoms.TTerm (Maybe Syntax.OverrideClause) -> Phantoms.TTerm Syntax.ContextuallyTypedTableValueConstructor -> Phantoms.TTerm Syntax.FromConstructor
-fromConstructor columns override values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm columns)},
-        Core.Field {
-          Core.fieldName = (Core.Name "override"),
-          Core.fieldTerm = (Phantoms.unTTerm override)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-fromConstructorColumns :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm (Maybe Syntax.InsertColumnList)
-fromConstructorColumns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-        Core.projectionField = (Core.Name "columns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fromConstructorOverride :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm (Maybe Syntax.OverrideClause)
-fromConstructorOverride x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-        Core.projectionField = (Core.Name "override")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fromConstructorValues :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm Syntax.ContextuallyTypedTableValueConstructor
-fromConstructorValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-fromConstructorWithColumns :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm (Maybe Syntax.InsertColumnList) -> Phantoms.TTerm Syntax.FromConstructor
-fromConstructorWithColumns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "override"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-              Core.projectionField = (Core.Name "override")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fromConstructorWithOverride :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm (Maybe Syntax.OverrideClause) -> Phantoms.TTerm Syntax.FromConstructor
-fromConstructorWithOverride original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "override"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-fromConstructorWithValues :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm Syntax.ContextuallyTypedTableValueConstructor -> Phantoms.TTerm Syntax.FromConstructor
-fromConstructorWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "override"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.FromConstructor"),
-              Core.projectionField = (Core.Name "override")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-fromDefault :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.FromDefault
-fromDefault x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.FromDefault"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fromSubquery :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.FromSubquery
-fromSubquery x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.FromSubquery"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-generalLiteralBinary :: Phantoms.TTerm Syntax.BinaryStringLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralBinary x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralBoolean :: Phantoms.TTerm Syntax.BooleanLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralDateTime :: Phantoms.TTerm Syntax.DatetimeLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralDateTime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateTime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralInterval :: Phantoms.TTerm Syntax.IntervalLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralInterval x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interval"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralNationalString :: Phantoms.TTerm Syntax.NationalCharacterStringLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralNationalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nationalString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralString :: Phantoms.TTerm Syntax.CharacterStringLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalLiteralUnicode :: Phantoms.TTerm Syntax.UnicodeCharacterStringLiteral -> Phantoms.TTerm Syntax.GeneralLiteral
-generalLiteralUnicode x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GeneralLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unicode"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-generalValueSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.GeneralValueSpecification
-generalValueSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.GeneralValueSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-generationClause :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.GenerationClause
-generationClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.GenerationClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-globalOrLocalGlobal :: Phantoms.TTerm Syntax.GlobalOrLocal
-globalOrLocalGlobal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GlobalOrLocal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "global"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-globalOrLocalLocal :: Phantoms.TTerm Syntax.GlobalOrLocal
-globalOrLocalLocal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.GlobalOrLocal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "local"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-identityColumnSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.IdentityColumnSpecification
-identityColumnSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.IdentityColumnSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-insertColumnList :: Phantoms.TTerm Syntax.ColumnNameList -> Phantoms.TTerm Syntax.InsertColumnList
-insertColumnList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.InsertColumnList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-insertColumnsAndSourceConstructor :: Phantoms.TTerm Syntax.FromConstructor -> Phantoms.TTerm Syntax.InsertColumnsAndSource
-insertColumnsAndSourceConstructor x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.InsertColumnsAndSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constructor"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-insertColumnsAndSourceDefault :: Phantoms.TTerm Syntax.FromDefault -> Phantoms.TTerm Syntax.InsertColumnsAndSource
-insertColumnsAndSourceDefault x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.InsertColumnsAndSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "default"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-insertColumnsAndSourceSubquery :: Phantoms.TTerm Syntax.FromSubquery -> Phantoms.TTerm Syntax.InsertColumnsAndSource
-insertColumnsAndSourceSubquery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.InsertColumnsAndSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subquery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-insertStatement :: Phantoms.TTerm Syntax.InsertionTarget -> Phantoms.TTerm Syntax.InsertColumnsAndSource -> Phantoms.TTerm Syntax.InsertStatement
-insertStatement target columnsAndSource =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm target)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnsAndSource"),
-          Core.fieldTerm = (Phantoms.unTTerm columnsAndSource)}]}))
-
-insertStatementColumnsAndSource :: Phantoms.TTerm Syntax.InsertStatement -> Phantoms.TTerm Syntax.InsertColumnsAndSource
-insertStatementColumnsAndSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-        Core.projectionField = (Core.Name "columnsAndSource")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertStatementTarget :: Phantoms.TTerm Syntax.InsertStatement -> Phantoms.TTerm Syntax.InsertionTarget
-insertStatementTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-        Core.projectionField = (Core.Name "target")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-insertStatementWithColumnsAndSource :: Phantoms.TTerm Syntax.InsertStatement -> Phantoms.TTerm Syntax.InsertColumnsAndSource -> Phantoms.TTerm Syntax.InsertStatement
-insertStatementWithColumnsAndSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-              Core.projectionField = (Core.Name "target")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnsAndSource"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-insertStatementWithTarget :: Phantoms.TTerm Syntax.InsertStatement -> Phantoms.TTerm Syntax.InsertionTarget -> Phantoms.TTerm Syntax.InsertStatement
-insertStatementWithTarget original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columnsAndSource"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.InsertStatement"),
-              Core.projectionField = (Core.Name "columnsAndSource")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-insertionTarget :: Phantoms.TTerm Syntax.TableName -> Phantoms.TTerm Syntax.InsertionTarget
-insertionTarget x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.InsertionTarget"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-intervalLiteral :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.IntervalLiteral
-intervalLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.IntervalLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-intervalType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.IntervalType
-intervalType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.IntervalType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-intervalValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.IntervalValueExpression
-intervalValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.IntervalValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-largeObjectLength :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.LargeObjectLength
-largeObjectLength x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.LargeObjectLength"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-leftBracketOrTrigraph :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.LeftBracketOrTrigraph
-leftBracketOrTrigraph x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.LeftBracketOrTrigraph"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-length :: Phantoms.TTerm Syntax.UnsignedInteger -> Phantoms.TTerm Syntax.Length
-length x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.Length"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-likeClause :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.LikeClause
-likeClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.LikeClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-methodInvocation :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.MethodInvocation
-methodInvocation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.MethodInvocation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-multisetElementReference :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.MultisetElementReference
-multisetElementReference x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.MultisetElementReference"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-multisetType :: Phantoms.TTerm Syntax.DataType -> Phantoms.TTerm Syntax.MultisetType
-multisetType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.MultisetType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-multisetValueConstructor :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.MultisetValueConstructor
-multisetValueConstructor x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.MultisetValueConstructor"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-multisetValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.MultisetValueExpression
-multisetValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.MultisetValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nationalCharacterStringLiteral :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.NationalCharacterStringLiteral
-nationalCharacterStringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.NationalCharacterStringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nationalCharacterStringType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.NationalCharacterStringType
-nationalCharacterStringType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.NationalCharacterStringType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-newSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.NewSpecification
-newSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.NewSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nextValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.NextValueExpression
-nextValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.NextValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nonparenthesizedValueExpressionPrimaryArrayElement :: Phantoms.TTerm Syntax.ArrayElementReference -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryArrayElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arrayElement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryAttributeOrMethod :: Phantoms.TTerm Syntax.AttributeOrMethodReference -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryAttributeOrMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "attributeOrMethod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryCases :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryCases x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cases"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryCast :: Phantoms.TTerm Syntax.CastSpecification -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryCast x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cast"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryCollection :: Phantoms.TTerm Syntax.CollectionValueConstructor -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryColumn :: Phantoms.TTerm Syntax.ColumnReference -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryColumn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "column"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryField :: Phantoms.TTerm Syntax.FieldReference -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryField x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "field"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryMethod :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryMultisetElement :: Phantoms.TTerm Syntax.MultisetElementReference -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryMultisetElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "multisetElement"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryNew :: Phantoms.TTerm Syntax.NewSpecification -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryNew x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryNext :: Phantoms.TTerm Syntax.NextValueExpression -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryNext x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "next"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryReference :: Phantoms.TTerm Syntax.ReferenceResolution -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryReference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryRoutine :: Phantoms.TTerm Syntax.RoutineInvocation -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryRoutine x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "routine"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryScalarSubquery :: Phantoms.TTerm Syntax.ScalarSubquery -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryScalarSubquery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scalarSubquery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimarySetFunction :: Phantoms.TTerm Syntax.SetFunctionSpecification -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimarySetFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "setFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryStaticMethod :: Phantoms.TTerm Syntax.StaticMethodInvocation -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryStaticMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "staticMethod"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimarySubtype :: Phantoms.TTerm Syntax.SubtypeTreatment -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimarySubtype x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtype"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryUnsigned :: Phantoms.TTerm Syntax.UnsignedValueSpecification -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryUnsigned x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsigned"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nonparenthesizedValueExpressionPrimaryWindowFunction :: Phantoms.TTerm Syntax.WindowFunction -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-nonparenthesizedValueExpressionPrimaryWindowFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "windowFunction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeApproximate :: Phantoms.TTerm Syntax.ApproximateNumericType -> Phantoms.TTerm Syntax.NumericType
-numericTypeApproximate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "approximate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericTypeExact :: Phantoms.TTerm Syntax.ExactNumericType -> Phantoms.TTerm Syntax.NumericType
-numericTypeExact x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.NumericType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exact"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.NumericValueExpression
-numericValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.NumericValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-overrideClauseOVERRIDINGspSYSTEMspVALUE :: Phantoms.TTerm Syntax.OverrideClause
-overrideClauseOVERRIDINGspSYSTEMspVALUE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.OverrideClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "OVERRIDINGspSYSTEMspVALUE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-overrideClauseOVERRIDINGspUSERspVALUE :: Phantoms.TTerm Syntax.OverrideClause
-overrideClauseOVERRIDINGspUSERspVALUE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.OverrideClause"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "OVERRIDINGspUSERspVALUE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-parenthesizedValueExpression :: Phantoms.TTerm Syntax.ValueExpression -> Phantoms.TTerm Syntax.ParenthesizedValueExpression
-parenthesizedValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ParenthesizedValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-pathResolvedUserDefinedTypeName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.PathResolvedUserDefinedTypeName
-pathResolvedUserDefinedTypeName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.PathResolvedUserDefinedTypeName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-precision :: Phantoms.TTerm Syntax.UnsignedInteger -> Phantoms.TTerm Syntax.Precision
-precision x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.Precision"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-predefinedTypeBlob :: Phantoms.TTerm Syntax.BinaryLargeObjectStringType -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeBlob x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "blob"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeBoolean :: Phantoms.TTerm Syntax.BooleanType -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeDatetime :: Phantoms.TTerm Syntax.DatetimeType -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeDatetime x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "datetime"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeInterval :: Phantoms.TTerm Syntax.IntervalType -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeInterval x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "interval"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeNationalString :: Phantoms.TTerm Syntax.PredefinedType_NationalString -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeNationalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nationalString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeNumeric :: Phantoms.TTerm Syntax.NumericType -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedTypeString :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm Syntax.PredefinedType
-predefinedTypeString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predefinedType_NationalString :: Phantoms.TTerm Syntax.NationalCharacterStringType -> Phantoms.TTerm (Maybe Syntax.CollateClause) -> Phantoms.TTerm Syntax.PredefinedType_NationalString
-predefinedType_NationalString type_ collate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Phantoms.unTTerm collate)}]}))
-
-predefinedType_NationalStringCollate :: Phantoms.TTerm Syntax.PredefinedType_NationalString -> Phantoms.TTerm (Maybe Syntax.CollateClause)
-predefinedType_NationalStringCollate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-        Core.projectionField = (Core.Name "collate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predefinedType_NationalStringType :: Phantoms.TTerm Syntax.PredefinedType_NationalString -> Phantoms.TTerm Syntax.NationalCharacterStringType
-predefinedType_NationalStringType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predefinedType_NationalStringWithCollate :: Phantoms.TTerm Syntax.PredefinedType_NationalString -> Phantoms.TTerm (Maybe Syntax.CollateClause) -> Phantoms.TTerm Syntax.PredefinedType_NationalString
-predefinedType_NationalStringWithCollate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-predefinedType_NationalStringWithType :: Phantoms.TTerm Syntax.PredefinedType_NationalString -> Phantoms.TTerm Syntax.NationalCharacterStringType -> Phantoms.TTerm Syntax.PredefinedType_NationalString
-predefinedType_NationalStringWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_NationalString"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predefinedType_String :: Phantoms.TTerm Syntax.CharacterStringType -> Phantoms.TTerm (Maybe Syntax.CharacterSetSpecification) -> Phantoms.TTerm (Maybe Syntax.CollateClause) -> Phantoms.TTerm Syntax.PredefinedType_String
-predefinedType_String type_ characters collate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "characters"),
-          Core.fieldTerm = (Phantoms.unTTerm characters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Phantoms.unTTerm collate)}]}))
-
-predefinedType_StringCharacters :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm (Maybe Syntax.CharacterSetSpecification)
-predefinedType_StringCharacters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-        Core.projectionField = (Core.Name "characters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predefinedType_StringCollate :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm (Maybe Syntax.CollateClause)
-predefinedType_StringCollate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-        Core.projectionField = (Core.Name "collate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predefinedType_StringType :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm Syntax.CharacterStringType
-predefinedType_StringType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predefinedType_StringWithCharacters :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm (Maybe Syntax.CharacterSetSpecification) -> Phantoms.TTerm Syntax.PredefinedType_String
-predefinedType_StringWithCharacters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "characters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predefinedType_StringWithCollate :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm (Maybe Syntax.CollateClause) -> Phantoms.TTerm Syntax.PredefinedType_String
-predefinedType_StringWithCollate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "characters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-              Core.projectionField = (Core.Name "characters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-predefinedType_StringWithType :: Phantoms.TTerm Syntax.PredefinedType_String -> Phantoms.TTerm Syntax.CharacterStringType -> Phantoms.TTerm Syntax.PredefinedType_String
-predefinedType_StringWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "characters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-              Core.projectionField = (Core.Name "characters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.PredefinedType_String"),
-              Core.projectionField = (Core.Name "collate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicate :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.Predicate
-predicate x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.Predicate"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-queryExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.QueryExpression
-queryExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.QueryExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-referenceResolution :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ReferenceResolution
-referenceResolution x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ReferenceResolution"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-referenceScopeCheck :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ReferenceScopeCheck
-referenceScopeCheck x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ReferenceScopeCheck"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-referenceType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.ReferenceType
-referenceType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ReferenceType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-referenceValueExpression :: Phantoms.TTerm Syntax.ValueExpressionPrimary -> Phantoms.TTerm Syntax.ReferenceValueExpression
-referenceValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ReferenceValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rightBracketOrTrigraph :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.RightBracketOrTrigraph
-rightBracketOrTrigraph x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.RightBracketOrTrigraph"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-routineInvocation :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.RoutineInvocation
-routineInvocation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.RoutineInvocation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rowType :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.RowType
-rowType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.RowType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rowValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.RowValueExpression
-rowValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.RowValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-rowValueSpecialCase :: Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary -> Phantoms.TTerm Syntax.RowValueSpecialCase
-rowValueSpecialCase x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.RowValueSpecialCase"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-scalarSubquery :: Phantoms.TTerm Syntax.Subquery -> Phantoms.TTerm Syntax.ScalarSubquery
-scalarSubquery x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.ScalarSubquery"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-scale :: Phantoms.TTerm Syntax.UnsignedInteger -> Phantoms.TTerm Syntax.Scale
-scale x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.Scale"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-selfReferencingColumnSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.SelfReferencingColumnSpecification
-selfReferencingColumnSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.SelfReferencingColumnSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-setFunctionSpecification :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.SetFunctionSpecification
-setFunctionSpecification x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.SetFunctionSpecification"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-staticMethodInvocation :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.StaticMethodInvocation
-staticMethodInvocation x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.StaticMethodInvocation"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-stringValueExpression :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.StringValueExpression
-stringValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.StringValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-subquery :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm Syntax.Subquery
-subquery x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.Subquery"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-subtableClause :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.SubtableClause
-subtableClause x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.SubtableClause"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-subtypeTreatment :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.SubtypeTreatment
-subtypeTreatment x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.SubtypeTreatment"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tableCommitActionDelete :: Phantoms.TTerm Syntax.TableCommitAction
-tableCommitActionDelete =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableCommitAction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "delete"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-tableCommitActionPreserve :: Phantoms.TTerm Syntax.TableCommitAction
-tableCommitActionPreserve =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableCommitAction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "preserve"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-tableConstraintDefinition :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.TableConstraintDefinition
-tableConstraintDefinition x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.TableConstraintDefinition"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tableContentsSourceList :: Phantoms.TTerm Syntax.TableElementList -> Phantoms.TTerm Syntax.TableContentsSource
-tableContentsSourceList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableContentsSourceSubquery :: Phantoms.TTerm Syntax.AsSubqueryClause -> Phantoms.TTerm Syntax.TableContentsSource
-tableContentsSourceSubquery x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subquery"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableContentsSourceSubtable :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm Syntax.TableContentsSource
-tableContentsSourceSubtable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subtable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableContentsSource_Subtable :: Phantoms.TTerm Syntax.PathResolvedUserDefinedTypeName -> Phantoms.TTerm (Maybe Syntax.SubtableClause) -> Phantoms.TTerm (Maybe Syntax.TableElementList) -> Phantoms.TTerm Syntax.TableContentsSource_Subtable
-tableContentsSource_Subtable type_ subtable elements =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subtable"),
-          Core.fieldTerm = (Phantoms.unTTerm subtable)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))
-
-tableContentsSource_SubtableElements :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm (Maybe Syntax.TableElementList)
-tableContentsSource_SubtableElements x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-        Core.projectionField = (Core.Name "elements")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableContentsSource_SubtableSubtable :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm (Maybe Syntax.SubtableClause)
-tableContentsSource_SubtableSubtable x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-        Core.projectionField = (Core.Name "subtable")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableContentsSource_SubtableType :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm Syntax.PathResolvedUserDefinedTypeName
-tableContentsSource_SubtableType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableContentsSource_SubtableWithElements :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm (Maybe Syntax.TableElementList) -> Phantoms.TTerm Syntax.TableContentsSource_Subtable
-tableContentsSource_SubtableWithElements original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subtable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-              Core.projectionField = (Core.Name "subtable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tableContentsSource_SubtableWithSubtable :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm (Maybe Syntax.SubtableClause) -> Phantoms.TTerm Syntax.TableContentsSource_Subtable
-tableContentsSource_SubtableWithSubtable original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subtable"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableContentsSource_SubtableWithType :: Phantoms.TTerm Syntax.TableContentsSource_Subtable -> Phantoms.TTerm Syntax.PathResolvedUserDefinedTypeName -> Phantoms.TTerm Syntax.TableContentsSource_Subtable
-tableContentsSource_SubtableWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subtable"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-              Core.projectionField = (Core.Name "subtable")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"),
-              Core.projectionField = (Core.Name "elements")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableDefinition :: Phantoms.TTerm (Maybe Syntax.TableScope) -> Phantoms.TTerm Syntax.TableName -> Phantoms.TTerm Syntax.TableContentsSource -> Phantoms.TTerm (Maybe Syntax.TableCommitAction) -> Phantoms.TTerm Syntax.TableDefinition
-tableDefinition scope name source commitActions =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "commitActions"),
-          Core.fieldTerm = (Phantoms.unTTerm commitActions)}]}))
-
-tableDefinitionCommitActions :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm (Maybe Syntax.TableCommitAction)
-tableDefinitionCommitActions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-        Core.projectionField = (Core.Name "commitActions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableDefinitionName :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm Syntax.TableName
-tableDefinitionName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableDefinitionScope :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm (Maybe Syntax.TableScope)
-tableDefinitionScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableDefinitionSource :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm Syntax.TableContentsSource
-tableDefinitionSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableDefinitionWithCommitActions :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm (Maybe Syntax.TableCommitAction) -> Phantoms.TTerm Syntax.TableDefinition
-tableDefinitionWithCommitActions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commitActions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tableDefinitionWithName :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm Syntax.TableName -> Phantoms.TTerm Syntax.TableDefinition
-tableDefinitionWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commitActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "commitActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableDefinitionWithScope :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm (Maybe Syntax.TableScope) -> Phantoms.TTerm Syntax.TableDefinition
-tableDefinitionWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "commitActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "commitActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableDefinitionWithSource :: Phantoms.TTerm Syntax.TableDefinition -> Phantoms.TTerm Syntax.TableContentsSource -> Phantoms.TTerm Syntax.TableDefinition
-tableDefinitionWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "commitActions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableDefinition"),
-              Core.projectionField = (Core.Name "commitActions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableElementColumOptions :: Phantoms.TTerm Syntax.ColumnOptions -> Phantoms.TTerm Syntax.TableElement
-tableElementColumOptions x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "columOptions"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableElementColumn :: Phantoms.TTerm Syntax.ColumnDefinition -> Phantoms.TTerm Syntax.TableElement
-tableElementColumn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "column"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableElementLike :: Phantoms.TTerm Syntax.LikeClause -> Phantoms.TTerm Syntax.TableElement
-tableElementLike x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "like"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableElementList :: Phantoms.TTerm Syntax.TableElement -> Phantoms.TTerm [Syntax.TableElement] -> Phantoms.TTerm Syntax.TableElementList
-tableElementList first rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-tableElementListFirst :: Phantoms.TTerm Syntax.TableElementList -> Phantoms.TTerm Syntax.TableElement
-tableElementListFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableElementListRest :: Phantoms.TTerm Syntax.TableElementList -> Phantoms.TTerm [Syntax.TableElement]
-tableElementListRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tableElementListWithFirst :: Phantoms.TTerm Syntax.TableElementList -> Phantoms.TTerm Syntax.TableElement -> Phantoms.TTerm Syntax.TableElementList
-tableElementListWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tableElementListWithRest :: Phantoms.TTerm Syntax.TableElementList -> Phantoms.TTerm [Syntax.TableElement] -> Phantoms.TTerm Syntax.TableElementList
-tableElementListWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.sql.syntax.TableElementList"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tableElementSelfReferencingColumn :: Phantoms.TTerm Syntax.SelfReferencingColumnSpecification -> Phantoms.TTerm Syntax.TableElement
-tableElementSelfReferencingColumn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "selfReferencingColumn"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableElementTableConstraint :: Phantoms.TTerm Syntax.TableConstraintDefinition -> Phantoms.TTerm Syntax.TableElement
-tableElementTableConstraint x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TableElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tableConstraint"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-tableName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.TableName
-tableName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.TableName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-tableScope :: Phantoms.TTerm Syntax.GlobalOrLocal -> Phantoms.TTerm Syntax.TableScope
-tableScope x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.TableScope"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-timeLiteral :: Phantoms.TTerm Syntax.TimeString -> Phantoms.TTerm Syntax.TimeLiteral
-timeLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.TimeLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-timeString :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.TimeString
-timeString x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.TimeString"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-timestampLiteral :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.TimestampLiteral
-timestampLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.TimestampLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-truthValueFALSE :: Phantoms.TTerm Syntax.TruthValue
-truthValueFALSE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TruthValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "FALSE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-truthValueTRUE :: Phantoms.TTerm Syntax.TruthValue
-truthValueTRUE =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TruthValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "TRUE"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-truthValueUNKNOWN :: Phantoms.TTerm Syntax.TruthValue
-truthValueUNKNOWN =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.TruthValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "UNKNOWN"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-unApproximateNumericLiteral :: Phantoms.TTerm Syntax.ApproximateNumericLiteral -> Phantoms.TTerm String
-unApproximateNumericLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ApproximateNumericLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayElement :: Phantoms.TTerm Syntax.ArrayElement -> Phantoms.TTerm Syntax.ValueExpression
-unArrayElement x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ArrayElement")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayElementReference :: Phantoms.TTerm Syntax.ArrayElementReference -> Phantoms.TTerm ()
-unArrayElementReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ArrayElementReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayType :: Phantoms.TTerm Syntax.ArrayType -> Phantoms.TTerm ()
-unArrayType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ArrayType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayValueConstructorByQuery :: Phantoms.TTerm Syntax.ArrayValueConstructorByQuery -> Phantoms.TTerm ()
-unArrayValueConstructorByQuery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ArrayValueConstructorByQuery")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unArrayValueExpression :: Phantoms.TTerm Syntax.ArrayValueExpression -> Phantoms.TTerm ()
-unArrayValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ArrayValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAsSubqueryClause :: Phantoms.TTerm Syntax.AsSubqueryClause -> Phantoms.TTerm ()
-unAsSubqueryClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.AsSubqueryClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAttributeOrMethodReference :: Phantoms.TTerm Syntax.AttributeOrMethodReference -> Phantoms.TTerm ()
-unAttributeOrMethodReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.AttributeOrMethodReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBinaryStringLiteral :: Phantoms.TTerm Syntax.BinaryStringLiteral -> Phantoms.TTerm ()
-unBinaryStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.BinaryStringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBooleanPredicand :: Phantoms.TTerm Syntax.BooleanPredicand -> Phantoms.TTerm ()
-unBooleanPredicand x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.BooleanPredicand")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBooleanType :: Phantoms.TTerm Syntax.BooleanType -> Phantoms.TTerm ()
-unBooleanType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.BooleanType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCaseExpression :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm ()
-unCaseExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.CaseExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCastSpecification :: Phantoms.TTerm Syntax.CastSpecification -> Phantoms.TTerm ()
-unCastSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.CastSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCharacterSetSpecification :: Phantoms.TTerm Syntax.CharacterSetSpecification -> Phantoms.TTerm ()
-unCharacterSetSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.CharacterSetSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCharacterStringLiteral :: Phantoms.TTerm Syntax.CharacterStringLiteral -> Phantoms.TTerm String
-unCharacterStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.CharacterStringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unCollateClause :: Phantoms.TTerm Syntax.CollateClause -> Phantoms.TTerm ()
-unCollateClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.CollateClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unColumnConstraintDefinition :: Phantoms.TTerm Syntax.ColumnConstraintDefinition -> Phantoms.TTerm ()
-unColumnConstraintDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ColumnConstraintDefinition")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unColumnName :: Phantoms.TTerm Syntax.ColumnName -> Phantoms.TTerm String
-unColumnName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ColumnName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unColumnOptions :: Phantoms.TTerm Syntax.ColumnOptions -> Phantoms.TTerm ()
-unColumnOptions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ColumnOptions")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unColumnReference :: Phantoms.TTerm Syntax.ColumnReference -> Phantoms.TTerm ()
-unColumnReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ColumnReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unContextuallyTypedRowValueConstructor :: Phantoms.TTerm Syntax.ContextuallyTypedRowValueConstructor -> Phantoms.TTerm ()
-unContextuallyTypedRowValueConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueConstructor")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unContextuallyTypedTableValueConstructor :: Phantoms.TTerm Syntax.ContextuallyTypedTableValueConstructor -> Phantoms.TTerm Syntax.ContextuallyTypedRowValueExpressionList
-unContextuallyTypedTableValueConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ContextuallyTypedTableValueConstructor")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDateLiteral :: Phantoms.TTerm Syntax.DateLiteral -> Phantoms.TTerm Syntax.DateString
-unDateLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.DateLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDateString :: Phantoms.TTerm Syntax.DateString -> Phantoms.TTerm ()
-unDateString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.DateString")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDatetimeType :: Phantoms.TTerm Syntax.DatetimeType -> Phantoms.TTerm ()
-unDatetimeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.DatetimeType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDatetimeValueExpression :: Phantoms.TTerm Syntax.DatetimeValueExpression -> Phantoms.TTerm ()
-unDatetimeValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.DatetimeValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDefaultClause :: Phantoms.TTerm Syntax.DefaultClause -> Phantoms.TTerm ()
-unDefaultClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.DefaultClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDomainName :: Phantoms.TTerm Syntax.DomainName -> Phantoms.TTerm String
-unDomainName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.DomainName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unExactNumericLiteral :: Phantoms.TTerm Syntax.ExactNumericLiteral -> Phantoms.TTerm String
-unExactNumericLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ExactNumericLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFieldReference :: Phantoms.TTerm Syntax.FieldReference -> Phantoms.TTerm ()
-unFieldReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.FieldReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFromDefault :: Phantoms.TTerm Syntax.FromDefault -> Phantoms.TTerm ()
-unFromDefault x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.FromDefault")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFromSubquery :: Phantoms.TTerm Syntax.FromSubquery -> Phantoms.TTerm ()
-unFromSubquery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.FromSubquery")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGeneralValueSpecification :: Phantoms.TTerm Syntax.GeneralValueSpecification -> Phantoms.TTerm ()
-unGeneralValueSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.GeneralValueSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGenerationClause :: Phantoms.TTerm Syntax.GenerationClause -> Phantoms.TTerm ()
-unGenerationClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.GenerationClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdentityColumnSpecification :: Phantoms.TTerm Syntax.IdentityColumnSpecification -> Phantoms.TTerm ()
-unIdentityColumnSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.IdentityColumnSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInsertColumnList :: Phantoms.TTerm Syntax.InsertColumnList -> Phantoms.TTerm Syntax.ColumnNameList
-unInsertColumnList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.InsertColumnList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInsertionTarget :: Phantoms.TTerm Syntax.InsertionTarget -> Phantoms.TTerm Syntax.TableName
-unInsertionTarget x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.InsertionTarget")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntervalLiteral :: Phantoms.TTerm Syntax.IntervalLiteral -> Phantoms.TTerm ()
-unIntervalLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.IntervalLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntervalType :: Phantoms.TTerm Syntax.IntervalType -> Phantoms.TTerm ()
-unIntervalType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.IntervalType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntervalValueExpression :: Phantoms.TTerm Syntax.IntervalValueExpression -> Phantoms.TTerm ()
-unIntervalValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.IntervalValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLargeObjectLength :: Phantoms.TTerm Syntax.LargeObjectLength -> Phantoms.TTerm ()
-unLargeObjectLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.LargeObjectLength")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLeftBracketOrTrigraph :: Phantoms.TTerm Syntax.LeftBracketOrTrigraph -> Phantoms.TTerm String
-unLeftBracketOrTrigraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.LeftBracketOrTrigraph")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLength :: Phantoms.TTerm Syntax.Length -> Phantoms.TTerm Syntax.UnsignedInteger
-unLength x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.Length")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLikeClause :: Phantoms.TTerm Syntax.LikeClause -> Phantoms.TTerm ()
-unLikeClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.LikeClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMethodInvocation :: Phantoms.TTerm Syntax.MethodInvocation -> Phantoms.TTerm ()
-unMethodInvocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.MethodInvocation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMultisetElementReference :: Phantoms.TTerm Syntax.MultisetElementReference -> Phantoms.TTerm ()
-unMultisetElementReference x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.MultisetElementReference")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMultisetType :: Phantoms.TTerm Syntax.MultisetType -> Phantoms.TTerm Syntax.DataType
-unMultisetType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.MultisetType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMultisetValueConstructor :: Phantoms.TTerm Syntax.MultisetValueConstructor -> Phantoms.TTerm ()
-unMultisetValueConstructor x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.MultisetValueConstructor")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unMultisetValueExpression :: Phantoms.TTerm Syntax.MultisetValueExpression -> Phantoms.TTerm ()
-unMultisetValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.MultisetValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNationalCharacterStringLiteral :: Phantoms.TTerm Syntax.NationalCharacterStringLiteral -> Phantoms.TTerm ()
-unNationalCharacterStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.NationalCharacterStringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNationalCharacterStringType :: Phantoms.TTerm Syntax.NationalCharacterStringType -> Phantoms.TTerm ()
-unNationalCharacterStringType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.NationalCharacterStringType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNewSpecification :: Phantoms.TTerm Syntax.NewSpecification -> Phantoms.TTerm ()
-unNewSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.NewSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNextValueExpression :: Phantoms.TTerm Syntax.NextValueExpression -> Phantoms.TTerm ()
-unNextValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.NextValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNumericValueExpression :: Phantoms.TTerm Syntax.NumericValueExpression -> Phantoms.TTerm ()
-unNumericValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.NumericValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unParenthesizedValueExpression :: Phantoms.TTerm Syntax.ParenthesizedValueExpression -> Phantoms.TTerm Syntax.ValueExpression
-unParenthesizedValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ParenthesizedValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPathResolvedUserDefinedTypeName :: Phantoms.TTerm Syntax.PathResolvedUserDefinedTypeName -> Phantoms.TTerm String
-unPathResolvedUserDefinedTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.PathResolvedUserDefinedTypeName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPrecision :: Phantoms.TTerm Syntax.Precision -> Phantoms.TTerm Syntax.UnsignedInteger
-unPrecision x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.Precision")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPredicate :: Phantoms.TTerm Syntax.Predicate -> Phantoms.TTerm ()
-unPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.Predicate")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unQueryExpression :: Phantoms.TTerm Syntax.QueryExpression -> Phantoms.TTerm ()
-unQueryExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.QueryExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReferenceResolution :: Phantoms.TTerm Syntax.ReferenceResolution -> Phantoms.TTerm ()
-unReferenceResolution x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ReferenceResolution")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReferenceScopeCheck :: Phantoms.TTerm Syntax.ReferenceScopeCheck -> Phantoms.TTerm ()
-unReferenceScopeCheck x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ReferenceScopeCheck")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReferenceType :: Phantoms.TTerm Syntax.ReferenceType -> Phantoms.TTerm ()
-unReferenceType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ReferenceType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unReferenceValueExpression :: Phantoms.TTerm Syntax.ReferenceValueExpression -> Phantoms.TTerm Syntax.ValueExpressionPrimary
-unReferenceValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ReferenceValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRightBracketOrTrigraph :: Phantoms.TTerm Syntax.RightBracketOrTrigraph -> Phantoms.TTerm String
-unRightBracketOrTrigraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.RightBracketOrTrigraph")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRoutineInvocation :: Phantoms.TTerm Syntax.RoutineInvocation -> Phantoms.TTerm ()
-unRoutineInvocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.RoutineInvocation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRowType :: Phantoms.TTerm Syntax.RowType -> Phantoms.TTerm ()
-unRowType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.RowType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRowValueExpression :: Phantoms.TTerm Syntax.RowValueExpression -> Phantoms.TTerm ()
-unRowValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.RowValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unRowValueSpecialCase :: Phantoms.TTerm Syntax.RowValueSpecialCase -> Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary
-unRowValueSpecialCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.RowValueSpecialCase")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unScalarSubquery :: Phantoms.TTerm Syntax.ScalarSubquery -> Phantoms.TTerm Syntax.Subquery
-unScalarSubquery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.ScalarSubquery")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unScale :: Phantoms.TTerm Syntax.Scale -> Phantoms.TTerm Syntax.UnsignedInteger
-unScale x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.Scale")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSelfReferencingColumnSpecification :: Phantoms.TTerm Syntax.SelfReferencingColumnSpecification -> Phantoms.TTerm ()
-unSelfReferencingColumnSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.SelfReferencingColumnSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSetFunctionSpecification :: Phantoms.TTerm Syntax.SetFunctionSpecification -> Phantoms.TTerm ()
-unSetFunctionSpecification x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.SetFunctionSpecification")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStaticMethodInvocation :: Phantoms.TTerm Syntax.StaticMethodInvocation -> Phantoms.TTerm ()
-unStaticMethodInvocation x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.StaticMethodInvocation")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStringValueExpression :: Phantoms.TTerm Syntax.StringValueExpression -> Phantoms.TTerm ()
-unStringValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.StringValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSubquery :: Phantoms.TTerm Syntax.Subquery -> Phantoms.TTerm Syntax.QueryExpression
-unSubquery x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.Subquery")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSubtableClause :: Phantoms.TTerm Syntax.SubtableClause -> Phantoms.TTerm ()
-unSubtableClause x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.SubtableClause")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unSubtypeTreatment :: Phantoms.TTerm Syntax.SubtypeTreatment -> Phantoms.TTerm ()
-unSubtypeTreatment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.SubtypeTreatment")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTableConstraintDefinition :: Phantoms.TTerm Syntax.TableConstraintDefinition -> Phantoms.TTerm ()
-unTableConstraintDefinition x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.TableConstraintDefinition")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTableName :: Phantoms.TTerm Syntax.TableName -> Phantoms.TTerm String
-unTableName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.TableName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTableScope :: Phantoms.TTerm Syntax.TableScope -> Phantoms.TTerm Syntax.GlobalOrLocal
-unTableScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.TableScope")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTimeLiteral :: Phantoms.TTerm Syntax.TimeLiteral -> Phantoms.TTerm Syntax.TimeString
-unTimeLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.TimeLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTimeString :: Phantoms.TTerm Syntax.TimeString -> Phantoms.TTerm ()
-unTimeString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.TimeString")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTimestampLiteral :: Phantoms.TTerm Syntax.TimestampLiteral -> Phantoms.TTerm ()
-unTimestampLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.TimestampLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnicodeCharacterStringLiteral :: Phantoms.TTerm Syntax.UnicodeCharacterStringLiteral -> Phantoms.TTerm ()
-unUnicodeCharacterStringLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.UnicodeCharacterStringLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnsignedInteger :: Phantoms.TTerm Syntax.UnsignedInteger -> Phantoms.TTerm String
-unUnsignedInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.UnsignedInteger")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUserDefinedTypeValueExpression :: Phantoms.TTerm Syntax.UserDefinedTypeValueExpression -> Phantoms.TTerm Syntax.ValueExpressionPrimary
-unUserDefinedTypeValueExpression x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.UserDefinedTypeValueExpression")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unWindowFunction :: Phantoms.TTerm Syntax.WindowFunction -> Phantoms.TTerm ()
-unWindowFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.sql.syntax.WindowFunction")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unicodeCharacterStringLiteral :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.UnicodeCharacterStringLiteral
-unicodeCharacterStringLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.UnicodeCharacterStringLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unsignedInteger :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.UnsignedInteger
-unsignedInteger x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.UnsignedInteger"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unsignedLiteralGeneral :: Phantoms.TTerm Syntax.GeneralLiteral -> Phantoms.TTerm Syntax.UnsignedLiteral
-unsignedLiteralGeneral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.UnsignedLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "general"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedLiteralNumeric :: Phantoms.TTerm Syntax.UnsignedNumericLiteral -> Phantoms.TTerm Syntax.UnsignedLiteral
-unsignedLiteralNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.UnsignedLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedNumericLiteralApproximate :: Phantoms.TTerm Syntax.ApproximateNumericLiteral -> Phantoms.TTerm Syntax.UnsignedNumericLiteral
-unsignedNumericLiteralApproximate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.UnsignedNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "approximate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedNumericLiteralExact :: Phantoms.TTerm Syntax.ExactNumericLiteral -> Phantoms.TTerm Syntax.UnsignedNumericLiteral
-unsignedNumericLiteralExact x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.UnsignedNumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "exact"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedValueSpecificationGeneral :: Phantoms.TTerm Syntax.GeneralValueSpecification -> Phantoms.TTerm Syntax.UnsignedValueSpecification
-unsignedValueSpecificationGeneral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.UnsignedValueSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "general"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-unsignedValueSpecificationLiteral :: Phantoms.TTerm Syntax.UnsignedLiteral -> Phantoms.TTerm Syntax.UnsignedValueSpecification
-unsignedValueSpecificationLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.UnsignedValueSpecification"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-userDefinedTypeValueExpression :: Phantoms.TTerm Syntax.ValueExpressionPrimary -> Phantoms.TTerm Syntax.UserDefinedTypeValueExpression
-userDefinedTypeValueExpression x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.UserDefinedTypeValueExpression"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-valueExpressionBoolean :: Phantoms.TTerm Syntax.BooleanValueExpression -> Phantoms.TTerm Syntax.ValueExpression
-valueExpressionBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionCommon :: Phantoms.TTerm Syntax.CommonValueExpression -> Phantoms.TTerm Syntax.ValueExpression
-valueExpressionCommon x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "common"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionPrimaryNoparens :: Phantoms.TTerm Syntax.NonparenthesizedValueExpressionPrimary -> Phantoms.TTerm Syntax.ValueExpressionPrimary
-valueExpressionPrimaryNoparens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "noparens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionPrimaryParens :: Phantoms.TTerm Syntax.ParenthesizedValueExpression -> Phantoms.TTerm Syntax.ValueExpressionPrimary
-valueExpressionPrimaryParens x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ValueExpressionPrimary"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parens"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueExpressionRow :: Phantoms.TTerm Syntax.RowValueExpression -> Phantoms.TTerm Syntax.ValueExpression
-valueExpressionRow x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.sql.syntax.ValueExpression"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "row"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-windowFunction :: Phantoms.TTerm () -> Phantoms.TTerm Syntax.WindowFunction
-windowFunction x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.sql.syntax.WindowFunction"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Stac/Items.hs b/src/main/haskell/Hydra/Dsl/Stac/Items.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Stac/Items.hs
+++ /dev/null
@@ -1,918 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.stac.items
-
-module Hydra.Dsl.Stac.Items where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Geojson.Model as Model
-import qualified Hydra.Iana.Linkrelations as Linkrelations
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Stac.Items as Items
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-asset :: Phantoms.TTerm Items.Uri -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm (Maybe Items.MediaType) -> Phantoms.TTerm [Items.Role] -> Phantoms.TTerm Items.Asset
-asset href title description type_ roles =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Asset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Phantoms.unTTerm href)},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Phantoms.unTTerm title)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "roles"),
-          Core.fieldTerm = (Phantoms.unTTerm roles)}]}))
-
-assetDescription :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm (Maybe String)
-assetDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assetHref :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm Items.Uri
-assetHref x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-        Core.projectionField = (Core.Name "href")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assetRoles :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm [Items.Role]
-assetRoles x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-        Core.projectionField = (Core.Name "roles")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assetTitle :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm (Maybe String)
-assetTitle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-        Core.projectionField = (Core.Name "title")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assetType :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm (Maybe Items.MediaType)
-assetType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-assetWithDescription :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Items.Asset
-assetWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Asset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "roles"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "roles")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assetWithHref :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm Items.Uri -> Phantoms.TTerm Items.Asset
-assetWithHref original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Asset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "roles"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "roles")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assetWithRoles :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm [Items.Role] -> Phantoms.TTerm Items.Asset
-assetWithRoles original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Asset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "roles"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-assetWithTitle :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Items.Asset
-assetWithTitle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Asset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "roles"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "roles")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-assetWithType :: Phantoms.TTerm Items.Asset -> Phantoms.TTerm (Maybe Items.MediaType) -> Phantoms.TTerm Items.Asset
-assetWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Asset"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "roles"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Asset"),
-              Core.projectionField = (Core.Name "roles")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-item :: Phantoms.TTerm Model.Feature -> Phantoms.TTerm Items.StacVersion -> Phantoms.TTerm [Items.Url] -> Phantoms.TTerm [Items.Link] -> Phantoms.TTerm (M.Map String Items.Asset) -> Phantoms.TTerm (Maybe Model.Id) -> Phantoms.TTerm Items.Item
-item feature stacVersion stacExtensions links assets collection =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Phantoms.unTTerm feature)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Phantoms.unTTerm stacVersion)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Phantoms.unTTerm stacExtensions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Phantoms.unTTerm links)},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Phantoms.unTTerm assets)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Phantoms.unTTerm collection)}]}))
-
-itemAssets :: Phantoms.TTerm Items.Item -> Phantoms.TTerm (M.Map String Items.Asset)
-itemAssets x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-        Core.projectionField = (Core.Name "assets")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemCollection :: Phantoms.TTerm Items.Item -> Phantoms.TTerm (Maybe Model.Id)
-itemCollection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-        Core.projectionField = (Core.Name "collection")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemFeature :: Phantoms.TTerm Items.Item -> Phantoms.TTerm Model.Feature
-itemFeature x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-        Core.projectionField = (Core.Name "feature")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemLinks :: Phantoms.TTerm Items.Item -> Phantoms.TTerm [Items.Link]
-itemLinks x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-        Core.projectionField = (Core.Name "links")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemStacExtensions :: Phantoms.TTerm Items.Item -> Phantoms.TTerm [Items.Url]
-itemStacExtensions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-        Core.projectionField = (Core.Name "stacExtensions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemStacVersion :: Phantoms.TTerm Items.Item -> Phantoms.TTerm Items.StacVersion
-itemStacVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-        Core.projectionField = (Core.Name "stacVersion")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-itemWithAssets :: Phantoms.TTerm Items.Item -> Phantoms.TTerm (M.Map String Items.Asset) -> Phantoms.TTerm Items.Item
-itemWithAssets original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "feature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacExtensions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "links")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "collection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-itemWithCollection :: Phantoms.TTerm Items.Item -> Phantoms.TTerm (Maybe Model.Id) -> Phantoms.TTerm Items.Item
-itemWithCollection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "feature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacExtensions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "links")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "assets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-itemWithFeature :: Phantoms.TTerm Items.Item -> Phantoms.TTerm Model.Feature -> Phantoms.TTerm Items.Item
-itemWithFeature original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacExtensions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "links")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "assets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "collection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-itemWithLinks :: Phantoms.TTerm Items.Item -> Phantoms.TTerm [Items.Link] -> Phantoms.TTerm Items.Item
-itemWithLinks original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "feature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacExtensions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "assets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "collection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-itemWithStacExtensions :: Phantoms.TTerm Items.Item -> Phantoms.TTerm [Items.Url] -> Phantoms.TTerm Items.Item
-itemWithStacExtensions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "feature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacVersion")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "links")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "assets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "collection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-itemWithStacVersion :: Phantoms.TTerm Items.Item -> Phantoms.TTerm Items.StacVersion -> Phantoms.TTerm Items.Item
-itemWithStacVersion original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Item"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "feature"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "feature")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacVersion"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stacExtensions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "stacExtensions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "links"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "links")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "assets"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "assets")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "collection"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Item"),
-              Core.projectionField = (Core.Name "collection")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-link :: Phantoms.TTerm Items.Url -> Phantoms.TTerm Items.RelationType -> Phantoms.TTerm (Maybe Items.MediaType) -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Items.Link
-link href rel type_ title =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Link"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Phantoms.unTTerm href)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rel"),
-          Core.fieldTerm = (Phantoms.unTTerm rel)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Phantoms.unTTerm title)}]}))
-
-linkHref :: Phantoms.TTerm Items.Link -> Phantoms.TTerm Items.Url
-linkHref x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-        Core.projectionField = (Core.Name "href")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-linkRel :: Phantoms.TTerm Items.Link -> Phantoms.TTerm Items.RelationType
-linkRel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-        Core.projectionField = (Core.Name "rel")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-linkTitle :: Phantoms.TTerm Items.Link -> Phantoms.TTerm (Maybe String)
-linkTitle x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-        Core.projectionField = (Core.Name "title")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-linkType :: Phantoms.TTerm Items.Link -> Phantoms.TTerm (Maybe Items.MediaType)
-linkType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-linkWithHref :: Phantoms.TTerm Items.Link -> Phantoms.TTerm Items.Url -> Phantoms.TTerm Items.Link
-linkWithHref original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Link"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "rel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-linkWithRel :: Phantoms.TTerm Items.Link -> Phantoms.TTerm Items.RelationType -> Phantoms.TTerm Items.Link
-linkWithRel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Link"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rel"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-linkWithTitle :: Phantoms.TTerm Items.Link -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Items.Link
-linkWithTitle original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Link"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "rel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-linkWithType :: Phantoms.TTerm Items.Link -> Phantoms.TTerm (Maybe Items.MediaType) -> Phantoms.TTerm Items.Link
-linkWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.stac.items.Link"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "href"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "href")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rel"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "rel")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "title"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.stac.items.Link"),
-              Core.projectionField = (Core.Name "title")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-mediaType :: Phantoms.TTerm String -> Phantoms.TTerm Items.MediaType
-mediaType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.stac.items.MediaType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-relationTypeIana :: Phantoms.TTerm Linkrelations.LinkRelationType -> Phantoms.TTerm Items.RelationType
-relationTypeIana x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.RelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iana"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationTypeOther :: Phantoms.TTerm String -> Phantoms.TTerm Items.RelationType
-relationTypeOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.RelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-relationTypeStac :: Phantoms.TTerm Items.StacRelationType -> Phantoms.TTerm Items.RelationType
-relationTypeStac x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.RelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stac"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-roleData :: Phantoms.TTerm Items.Role
-roleData =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.Role"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "data"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-roleMetadata :: Phantoms.TTerm Items.Role
-roleMetadata =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.Role"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "metadata"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-roleOther :: Phantoms.TTerm String -> Phantoms.TTerm Items.Role
-roleOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.Role"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-roleOverview :: Phantoms.TTerm Items.Role
-roleOverview =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.Role"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "overview"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-roleThumbnail :: Phantoms.TTerm Items.Role
-roleThumbnail =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.Role"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "thumbnail"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stacRelationTypeCollection :: Phantoms.TTerm Items.StacRelationType
-stacRelationTypeCollection =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.StacRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stacRelationTypeDerivedFrom :: Phantoms.TTerm Items.StacRelationType
-stacRelationTypeDerivedFrom =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.StacRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "derivedFrom"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stacRelationTypeParent :: Phantoms.TTerm Items.StacRelationType
-stacRelationTypeParent =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.StacRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "parent"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stacRelationTypeRoot :: Phantoms.TTerm Items.StacRelationType
-stacRelationTypeRoot =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.StacRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "root"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stacRelationTypeSelf :: Phantoms.TTerm Items.StacRelationType
-stacRelationTypeSelf =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.stac.items.StacRelationType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "self"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-stacVersion :: Phantoms.TTerm String -> Phantoms.TTerm Items.StacVersion
-stacVersion x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.stac.items.StacVersion"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unMediaType :: Phantoms.TTerm Items.MediaType -> Phantoms.TTerm String
-unMediaType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.stac.items.MediaType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unStacVersion :: Phantoms.TTerm Items.StacVersion -> Phantoms.TTerm String
-unStacVersion x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.stac.items.StacVersion")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUri :: Phantoms.TTerm Items.Uri -> Phantoms.TTerm String
-unUri x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.stac.items.Uri")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUrl :: Phantoms.TTerm Items.Url -> Phantoms.TTerm String
-unUrl x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.stac.items.Url")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-uri :: Phantoms.TTerm String -> Phantoms.TTerm Items.Uri
-uri x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.stac.items.Uri"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-url :: Phantoms.TTerm String -> Phantoms.TTerm Items.Url
-url x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.stac.items.Url"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Tabular.hs b/src/main/haskell/Hydra/Dsl/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Tabular.hs
+++ /dev/null
@@ -1,195 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.tabular
-
-module Hydra.Dsl.Tabular where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Relational as Relational
-import qualified Hydra.Tabular as Tabular
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-columnType :: Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Tabular.ColumnType
-columnType name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-columnTypeName :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Relational.ColumnName
-columnTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-columnTypeType :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Core.Type
-columnTypeType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-columnTypeWithName :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm Tabular.ColumnType
-columnTypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-columnTypeWithType :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Tabular.ColumnType
-columnTypeWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-dataRow :: Phantoms.TTerm [Maybe v] -> Phantoms.TTerm (Tabular.DataRow v)
-dataRow x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.DataRow"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-headerRow :: Phantoms.TTerm [String] -> Phantoms.TTerm Tabular.HeaderRow
-headerRow x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.HeaderRow"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-table :: Phantoms.TTerm (Maybe Tabular.HeaderRow) -> Phantoms.TTerm [Tabular.DataRow v] -> Phantoms.TTerm (Tabular.Table v)
-table header data_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm header)},
-        Core.Field {
-          Core.fieldName = (Core.Name "data"),
-          Core.fieldTerm = (Phantoms.unTTerm data_)}]}))
-tableData :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm [Tabular.DataRow v]
-tableData x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),
-        Core.projectionField = (Core.Name "data")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tableHeader :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm (Maybe Tabular.HeaderRow)
-tableHeader x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),
-        Core.projectionField = (Core.Name "header")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tableType :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm [Tabular.ColumnType] -> Phantoms.TTerm Tabular.TableType
-tableType name columns =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm columns)}]}))
-tableTypeColumns :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm [Tabular.ColumnType]
-tableTypeColumns x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),
-        Core.projectionField = (Core.Name "columns")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tableTypeName :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm Relational.RelationName
-tableTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tableTypeWithColumns :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm [Tabular.ColumnType] -> Phantoms.TTerm Tabular.TableType
-tableTypeWithColumns original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-tableTypeWithName :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm Tabular.TableType
-tableTypeWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),
-              Core.projectionField = (Core.Name "columns")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-tableWithData :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm [Tabular.DataRow v] -> Phantoms.TTerm (Tabular.Table v)
-tableWithData original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),
-              Core.projectionField = (Core.Name "header")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "data"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-tableWithHeader :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm (Maybe Tabular.HeaderRow) -> Phantoms.TTerm (Tabular.Table v)
-tableWithHeader original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "data"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),
-              Core.projectionField = (Core.Name "data")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unDataRow :: Phantoms.TTerm (Tabular.DataRow v) -> Phantoms.TTerm [Maybe v]
-unDataRow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tabular.DataRow")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unHeaderRow :: Phantoms.TTerm Tabular.HeaderRow -> Phantoms.TTerm [String]
-unHeaderRow x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tabular.HeaderRow")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Terms.hs b/src/main/haskell/Hydra/Dsl/Terms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Terms.hs
+++ /dev/null
@@ -1,379 +0,0 @@
--- | A domain-specific language for constructing Hydra terms in Haskell.
-module Hydra.Dsl.Terms where
-
-import Hydra.Constants
-import Hydra.Core
-import Hydra.Graph
-import Hydra.Util
-import Hydra.Dsl.Meta.Common
-import qualified Hydra.Dsl.Literals as Literals
-
-import Prelude hiding (map, product)
-import Data.Int
-import qualified Data.ByteString as B
-import qualified Data.Char as C
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-
-
--- | Function composition operator: f <.> g creates a function that applies g then f
--- Example: var "stringLength" <.> var "toString"
-(<.>) :: Term -> Term -> Term
-f <.> g = compose f g
-
--- | Term application operator: function @@ argument
--- Example: var "add" @@ int32 1
-(@@) :: Term -> Term -> Term
-fun @@ arg = apply fun arg
-
--- | Field definition operator: name>: value
--- Example: "name">: string "John"
-infixr 0 >:
-(>:) :: String -> Term -> Field
-name>: term = field name term
-
--- | Attach an annotation to a term
--- Example: annot (M.fromList [(Name "comment", string "A User ID")]) (var "userId")
-annot :: M.Map Name Term -> Term -> Term
-annot ann term = TermAnnotated $ AnnotatedTerm term ann
-
--- | Attach an annotation to a term
--- Example: annotated (var "userId") (M.fromList [(Name "comment", string "A User ID")])
-annotated :: Term -> M.Map Name Term -> Term
-annotated term ann = TermAnnotated $ AnnotatedTerm term ann
-
--- | Apply a function term to an argument
--- Example: apply (var "capitalize") (string "arthur")
-apply :: Term -> Term -> Term
-apply fun arg = TermApplication $ Application fun arg
-
--- | Create a binary data literal from a ByteString.
--- Example: binary (B.pack [0x48, 0x65, 0x00, 0xff, 0x20, 0x7a, 0x1b, 0x80])
-binary :: B.ByteString -> Term
-binary = literal . Literals.binary
-
--- | Create a bigfloat literal. Note: in practice, precision is limited to 64 bits (same as Double) in Haskell.
--- Example: bigfloat 3.14159265359
-bigfloat :: Double -> Term
-bigfloat = literal . Literals.bigfloat
-
--- | Create a bigint literal
--- Example: bigint 9223372036854775808
-bigint :: Integer -> Term
-bigint = literal . Literals.bigint
-
--- | Create a boolean literal
--- Example: boolean True
-boolean :: Bool -> Term
-boolean = literal . Literals.boolean
-
--- | Create an arbitrary-precision decimal literal.
--- Example: decimal (Sci.scientific 314159265359 (-11))
-decimal :: Sci.Scientific -> Term
-decimal = literal . Literals.decimal
-
-char :: Char -> Term
-char = int32 . C.ord
-
-comparison :: Comparison -> Term
-comparison t = case t of
-  ComparisonEqualTo -> injectUnit _Comparison _Comparison_equalTo
-  ComparisonLessThan -> injectUnit _Comparison _Comparison_lessThan
-  ComparisonGreaterThan -> injectUnit _Comparison _Comparison_greaterThan
-
--- | Compose two functions (apply g then f) to create a new function
--- Example: compose (var "stringLength") (var "toString")
--- This creates a function equivalent to \x -> stringLength(toString(x))
--- Function composition applies right-to-left: (f ∘ g)(x) = f(g(x))
-compose :: Term -> Term -> Term
-compose f g = lambda "arg_" $ apply f (apply g $ var "arg_")
-
--- | Create a constant function that always returns the same value
--- Example: constant true
-constant :: Term -> Term
-constant = lambda ignoredVariable
-
--- | Boolean false literal
-false :: Term
-false = boolean False
-
--- | Create a field with the given name and value
--- Example: field "age" (int32 30)
-field :: String -> Term -> Field
-field n = Field (Name n)
-
--- | First element projection function for pairs
-first :: Term
-first = primitive $ Name "hydra.lib.pairs.first"
-
--- | Create a floating-point literal with specified precision
--- Example: float (FloatValueFloat32 3.14)
-float :: FloatValue -> Term
-float = literal . Literals.float
-
--- | Create a float32 literal
--- Example: float32 3.14
-float32 :: Float -> Term
-float32 = literal . Literals.float32
-
--- | Create a float64 literal
--- Example: float64 3.14159265359
-float64 :: Double -> Term
-float64 = literal . Literals.float64
-
--- | Identity function
-identity :: Term
-identity = lambda "x_" $ var "x_"
-
--- | Create a union value by injecting a value into a specific variant
--- Example: inject (Name "Result") (Name "success") (int32 42)
--- This creates a "Result" union with the "success" variant containing value 42
--- Use this to construct values of union types at runtime
-inject :: Name -> Name -> Term -> Term
-inject tname fname term = TermInject $ Injection tname $ Field fname term
-
--- | Create a unit variant of a union (convenience function)
--- Example: injectUnit (Name "Result") (Name "success")
--- Equivalent to inject but automatically uses unit as the value
-injectUnit :: Name -> Name -> Term
-injectUnit tname fname = inject tname fname unit
-
--- | Create an int8 literal
--- Example: int8 127
-int8 :: Int8 -> Term
-int8 = literal . Literals.int8
-
--- | Create an int16 literal
--- Example: int16 32767
-int16 :: Int16 -> Term
-int16 = literal . Literals.int16
-
--- | Create an int32 literal
--- Example: int32 42
-int32 :: Int -> Term
-int32 = literal . Literals.int32
-
--- | Create an int64 literal
--- Example: int64 9223372036854775807
-int64 :: Int64 -> Term
-int64 = literal . Literals.int64
-
--- | Create an integer literal with specified bit width
--- Example: integer (IntegerValueInt32 42)
-integer :: IntegerValue -> Term
-integer = literal . Literals.integer
-
--- | Create a 'Just' optional value
--- Example: just (string "found")
-just :: Term -> Term
-just = optional . Just
-
--- | Create a 'Left' either value
--- Example: left (string "error")
-left :: Term -> Term
-left term = TermEither (Left term)
-
--- | Create a lambda function with one parameter
--- Example: lambda "x" (var "x" @@ int32 1)
-lambda :: String -> Term -> Term
-lambda param body = TermLambda $ Lambda (Name param) Nothing body
-
--- | Create a multi-parameter lambda function (curried)
--- Example: lambdas ["x", "y"] (var "add" @@ var "x" @@ var "y")
--- This creates the function \x.\y.add x y
-lambdas :: [String] -> Term -> Term
-lambdas params body = case params of
-  [] -> body
-  (h:r) -> lambda h $ lambdas r body
-
--- | Create a lambda function with a given domain
--- Example: lambdaTyped "x" Types.int32 (list [var "x"])
-lambdaTyped :: String -> Type -> Term -> Term
-lambdaTyped param dom body = TermLambda $ Lambda (Name param) (Just dom) body
-
--- | Create a let term with any number of bindings
--- Example: lets ["x">: int32 1, "y">: int32 2] (pair (var "x") (var "y"))
-lets :: [Field] -> Term -> Term
-lets bindings env = TermLet $ Let (toBinding <$> bindings) env
-  where
-    toBinding (Field name value) = Binding name value Nothing
-
-letsTyped :: [(String, Term, TypeScheme)] -> Term -> Term
-letsTyped bindings env = TermLet $ Let (toBinding <$> bindings) env
-  where
-    toBinding (name, value, ts) = Binding (Name name) value (Just ts)
-
--- | Create a list of terms
--- Example: list [int32 1, int32 2, int32 3]
-list :: [Term] -> Term
-list = TermList
-
--- | Create a term from a literal value
--- Example: literal (LiteralString "hello")
-literal :: Literal -> Term
-literal = TermLiteral
-
--- | Create a map/dictionary term
--- Example: map (M.fromList [(string "January", int32 31), (string "February", int32 28)])
-map :: M.Map Term Term -> Term
-map = TermMap
-
--- | Create a pattern match on a union type
--- Example: match (Name "Result") (Just (string "unknown"))
---               ["success">: lambda "s" (var "processSuccess" @@ var "s"),
---                "error">: lambda "e" (var "handleError" @@ var "e")]
--- This allows handling different cases of a union type with specific logic for each variant.
--- The optional second parameter provides a default case for any unmatched variants.
-match :: Name -> Maybe Term -> [Field] -> Term
-match tname def fields = TermCases $ CaseStatement tname def fields
-
--- | Create a 'Nothing' optional value
-nothing :: Term
-nothing = optional Nothing
-
--- | Create a Maybe (nullable) term
--- Example: optional (Just (string "found"))
-optional :: Maybe Term -> Term
-optional = TermMaybe
-
--- | Create a pair
--- Example: pair (string "name") (int32 42)
-pair :: Term -> Term -> Term
-pair a b = TermPair (a, b)
-
--- | Create a reference to a primitive function.
--- Uses TermVariable; the name resolves via graphPrimitives fallthrough.
--- Example: primitive (Name "hydra.lib.strings.length")
-primitive :: Name -> Term
-primitive = TermVariable
-
--- | Create a field projection function
--- Example: project (Name "Person") (Name "firstName")
-project :: Name -> Name -> Term
-project tname fname = TermProject $ Projection tname fname
-
--- | Create a record with named fields of the specified type
--- Example: record (Name "Person") [
---            "name">: string "John",
---            "age">: int32 30,
---            "email">: string "john@example.com"]
--- Records are products of named fields with values that can be accessed by field name
-record :: Name -> [Field] -> Term
-record tname fields = TermRecord $ Record tname fields
-
--- | Create a 'Right' either value
--- Example: right (int32 42)
-right :: Term -> Term
-right term = TermEither (Right term)
-
--- | Second element projection function for pairs
-second :: Term
-second = primitive $ Name "hydra.lib.pairs.second"
-
--- | Create a set of terms
--- Example: set (S.fromList [string "a", string "b", string "c"])
-set :: S.Set Term -> Term
-set = TermSet
-
--- | Create a string literal
--- Example: string "hello world"
-string :: String -> Term
-string = TermLiteral . LiteralString
-
-triple :: Term -> Term -> Term -> Term
-triple a b c = pair a (pair b c)
-
--- | Boolean true literal
-true :: Term
-true = boolean True
-
--- | Create a tuple using nested pairs (deprecated: use pair directly)
--- Example: tuple2 a b creates pair a b
--- Example: tuple3 a b c creates pair a (pair b c)
-tuple :: [Term] -> Term
-tuple [] = unit
-tuple [a] = a
-tuple [a, b] = pair a b
-tuple (a:rest) = pair a (tuple rest)
-
--- | Create a 2-tuple (same as pair)
-tuple2 :: Term -> Term -> Term
-tuple2 = pair
-
-tuple3 :: Term -> Term -> Term -> Term
-tuple3 a b c = pair a (pair b c)
-
-tuple4 :: Term -> Term -> Term -> Term -> Term
-tuple4 a b c d = pair a (pair b (pair c d))
-
-tuple5 :: Term -> Term -> Term -> Term -> Term -> Term
-tuple5 a b c d e = pair a (pair b (pair c (pair d e)))
-
-tyapp :: Term -> Type -> Term
-tyapp term typ = TermTypeApplication $ TypeApplicationTerm term typ
-
-tyapps = typeApplication
-
-tylam :: String -> Term -> Term
-tylam var body = TermTypeLambda $ TypeLambda (Name var) body
-
-tylams :: [String] -> Term -> Term
-tylams vars body = L.foldl (\b v -> TermTypeLambda $ TypeLambda (Name v) b) body $ L.reverse vars
-
--- | Create a type abstraction (universal quantification)
--- Example: typeLambda [Name "a", Name "b"] (lambdaTyped "f" (Types.function (Types.var "a") (Types.var "b"))
---                                               (lambdaTyped "x" (Types.var "a") (var "f" @@ var "x")))
--- This creates a polymorphic term with type variables.
--- The example creates a higher-order function with type 'forall a b. (a -> b) -> a -> b',
--- which is the polymorphic apply function that works for any types a and b.
-typeLambda :: [Name] -> Term -> Term
-typeLambda vars body = L.foldl (\b v -> TermTypeLambda $ TypeLambda v b) body vars
-
--- | Apply type arguments to a polymorphic term
--- Example: typeApplication (var "map") [Types.int32, Types.string]
--- This instantiates a polymorphic function with concrete types.
--- For instance, if 'map' has type 'forall a b. (a -> b) -> list a -> list b',
--- the example would instantiate it to '(int32 -> string) -> list int32 -> list string'.
-typeApplication :: Term -> [Type] -> Term
-typeApplication term types = L.foldl (\t ty -> TermTypeApplication $ TypeApplicationTerm t ty) term types
-
--- | Create a uint8 literal
--- Example: uint8 255
-uint8 :: Int16 -> Term
-uint8 = literal . Literals.uint8
-
--- | Create a uint16 literal
--- Example: uint16 65535
-uint16 :: Int -> Term
-uint16 = literal . Literals.uint16
-
--- | Create a uint32 literal
--- Example: uint32 4294967295
-uint32 :: Int64 -> Term
-uint32 = literal . Literals.uint32
-
--- | Create a uint64 literal
--- Example: uint64 18446744073709551615
-uint64 :: Integer -> Term
-uint64 = literal . Literals.uint64
-
--- | Unit value (empty record)
-unit :: Term
-unit = TermUnit
-
--- | Create an unwrap function for a wrapped type
--- Example: unwrap (Name "Email")
-unwrap :: Name -> Term
-unwrap = TermUnwrap
-
--- | Create a variable reference
--- Example: var "x"
-var :: String -> Term
-var = TermVariable . Name
-
--- | Create a wrapped term
--- Example: wrap (Name "Email") (string "user@example.com")
-wrap :: Name -> Term -> Term
-wrap name term = TermWrap $ WrappedTerm name term
diff --git a/src/main/haskell/Hydra/Dsl/Testing.hs b/src/main/haskell/Hydra/Dsl/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Testing.hs
+++ /dev/null
@@ -1,403 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.testing
-
-module Hydra.Dsl.Testing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-tag :: Phantoms.TTerm String -> Phantoms.TTerm Testing.Tag
-tag x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.testing.Tag"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-testCaseUniversal :: Phantoms.TTerm Testing.UniversalTestCase -> Phantoms.TTerm Testing.TestCase
-testCaseUniversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "universal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-testCaseWithMetadata :: Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCase -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm [Testing.Tag] -> Phantoms.TTerm Testing.TestCaseWithMetadata
-testCaseWithMetadata name case_ description tags =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm case_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Phantoms.unTTerm tags)}]}))
-testCaseWithMetadataCase :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm Testing.TestCase
-testCaseWithMetadataCase x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-        Core.projectionField = (Core.Name "case")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testCaseWithMetadataDescription :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm (Maybe String)
-testCaseWithMetadataDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testCaseWithMetadataName :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm String
-testCaseWithMetadataName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testCaseWithMetadataTags :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm [Testing.Tag]
-testCaseWithMetadataTags x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-        Core.projectionField = (Core.Name "tags")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testCaseWithMetadataWithCase :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm Testing.TestCase -> Phantoms.TTerm Testing.TestCaseWithMetadata
-testCaseWithMetadataWithCase original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "tags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-testCaseWithMetadataWithDescription :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Testing.TestCaseWithMetadata
-testCaseWithMetadataWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "tags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-testCaseWithMetadataWithName :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCaseWithMetadata
-testCaseWithMetadataWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "tags")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-testCaseWithMetadataWithTags :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm [Testing.Tag] -> Phantoms.TTerm Testing.TestCaseWithMetadata
-testCaseWithMetadataWithTags original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "case")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-testGroup :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm [Testing.TestGroup] -> Phantoms.TTerm [Testing.TestCaseWithMetadata] -> Phantoms.TTerm Testing.TestGroup
-testGroup name description subgroups cases =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm description)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subgroups"),
-          Core.fieldTerm = (Phantoms.unTTerm subgroups)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))
-testGroupCases :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestCaseWithMetadata]
-testGroupCases x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-        Core.projectionField = (Core.Name "cases")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testGroupDescription :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm (Maybe String)
-testGroupDescription x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-        Core.projectionField = (Core.Name "description")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testGroupName :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm String
-testGroupName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testGroupSubgroups :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestGroup]
-testGroupSubgroups x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-        Core.projectionField = (Core.Name "subgroups")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-testGroupWithCases :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestCaseWithMetadata] -> Phantoms.TTerm Testing.TestGroup
-testGroupWithCases original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subgroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "subgroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-testGroupWithDescription :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Testing.TestGroup
-testGroupWithDescription original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subgroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "subgroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-testGroupWithName :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestGroup
-testGroupWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subgroups"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "subgroups")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-testGroupWithSubgroups :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestGroup] -> Phantoms.TTerm Testing.TestGroup
-testGroupWithSubgroups original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "description")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subgroups"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-              Core.projectionField = (Core.Name "cases")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-unTag :: Phantoms.TTerm Testing.Tag -> Phantoms.TTerm String
-unTag x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.testing.Tag")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-universalTestCase :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Testing.UniversalTestCase
-universalTestCase actual expected =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Phantoms.unTTerm actual)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))
-universalTestCaseActual :: Phantoms.TTerm Testing.UniversalTestCase -> Phantoms.TTerm String
-universalTestCaseActual x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-        Core.projectionField = (Core.Name "actual")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-universalTestCaseExpected :: Phantoms.TTerm Testing.UniversalTestCase -> Phantoms.TTerm String
-universalTestCaseExpected x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-        Core.projectionField = (Core.Name "expected")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-universalTestCaseWithActual :: Phantoms.TTerm Testing.UniversalTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.UniversalTestCase
-universalTestCaseWithActual original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-              Core.projectionField = (Core.Name "expected")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-universalTestCaseWithExpected :: Phantoms.TTerm Testing.UniversalTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.UniversalTestCase
-universalTestCaseWithExpected original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-              Core.projectionField = (Core.Name "actual")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Tests.hs b/src/main/haskell/Hydra/Dsl/Tests.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Tests.hs
+++ /dev/null
@@ -1,29 +0,0 @@
--- | Convenience functions for writing Hydra test cases
-
-module Hydra.Dsl.Tests (
-    module Hydra.Testing,
-    module Hydra.Sources.Libraries,
-    module Hydra.Dsl.Terms,
-    module Hydra.Dsl.Tests,
-) where
-
-import Hydra.Core
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import Hydra.Dsl.Terms
-
-import qualified Data.List as L
-import qualified Data.Set as S
-
-
-intList :: [Int] -> Term
-intList els = list (int32 <$> els)
-
-intListList :: [[Int]] -> Term
-intListList lists = list (intList <$> lists)
-
-stringList :: [String] -> Term
-stringList els = list (string <$> els)
-
-stringSet :: S.Set String -> Term
-stringSet strings = set $ S.fromList $ string <$> S.toList strings
diff --git a/src/main/haskell/Hydra/Dsl/Tinkerpop/Features.hs b/src/main/haskell/Hydra/Dsl/Tinkerpop/Features.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Tinkerpop/Features.hs
+++ /dev/null
@@ -1,4889 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.tinkerpop.features
-
-module Hydra.Dsl.Tinkerpop.Features where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Tinkerpop.Features as Features
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-dataTypeFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeatures supportsBooleanArrayValues supportsBooleanValues supportsByteArrayValues supportsByteValues supportsDoubleArrayValues supportsDoubleValues supportsFloatArrayValues supportsFloatValues supportsIntegerArrayValues supportsIntegerValues supportsLongArrayValues supportsLongValues supportsMapValues supportsMixedListValues supportsSerializableValues supportsStringArrayValues supportsStringValues supportsUniformListValues =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsBooleanArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsBooleanValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsByteArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsByteValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsDoubleArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsDoubleValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsFloatArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsFloatValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsIntegerArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsIntegerValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsLongArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsLongValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsMapValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsMixedListValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsSerializableValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsStringArrayValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsStringValues)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsUniformListValues)}]}))
-
-dataTypeFeaturesSupportsBooleanArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsBooleanArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsBooleanValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsBooleanValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsBooleanValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsByteArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsByteArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsByteValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsByteValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsByteValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsDoubleArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsDoubleArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsDoubleValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsDoubleValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsDoubleValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsFloatArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsFloatArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsFloatValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsFloatValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsFloatValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsIntegerArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsIntegerArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsIntegerValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsIntegerValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsIntegerValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsLongArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsLongArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsLongValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsLongValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsLongValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsMapValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsMapValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsMapValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsMixedListValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsMixedListValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsMixedListValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsSerializableValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsSerializableValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsSerializableValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsStringArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsStringArrayValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsStringValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsStringValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsStringValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesSupportsUniformListValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool
-dataTypeFeaturesSupportsUniformListValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-        Core.projectionField = (Core.Name "supportsUniformListValues")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dataTypeFeaturesWithSupportsBooleanArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsBooleanArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsBooleanValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsBooleanValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsByteArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsByteArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsByteValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsByteValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsDoubleArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsDoubleArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsDoubleValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsDoubleValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsFloatArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsFloatArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsFloatValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsFloatValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsIntegerArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsIntegerArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsIntegerValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsIntegerValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsLongArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsLongArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsLongValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsLongValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsMapValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsMapValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsMixedListValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsMixedListValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsSerializableValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsSerializableValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsStringArrayValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsStringArrayValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsStringValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsStringValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsUniformListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dataTypeFeaturesWithSupportsUniformListValues :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.DataTypeFeatures
-dataTypeFeaturesWithSupportsUniformListValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsBooleanValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsBooleanValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsByteValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsByteValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDoubleValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsDoubleValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsFloatValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsFloatValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIntegerValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsIntegerValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsLongValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsLongValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMapValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMixedListValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsMixedListValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsSerializableValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsSerializableValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringArrayValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringArrayValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringValues"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.DataTypeFeatures"),
-              Core.projectionField = (Core.Name "supportsStringValues")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUniformListValues"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgeFeatures :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Features.EdgePropertyFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.EdgeFeatures
-edgeFeatures elementFeatures properties supportsAddEdges supportsRemoveEdges supportsUpsert =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm elementFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsAddEdges)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsRemoveEdges)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsUpsert)}]}))
-
-edgeFeaturesElementFeatures :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Features.ElementFeatures
-edgeFeaturesElementFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-        Core.projectionField = (Core.Name "elementFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeFeaturesProperties :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Features.EdgePropertyFeatures
-edgeFeaturesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeFeaturesSupportsAddEdges :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Bool
-edgeFeaturesSupportsAddEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-        Core.projectionField = (Core.Name "supportsAddEdges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeFeaturesSupportsRemoveEdges :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Bool
-edgeFeaturesSupportsRemoveEdges x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-        Core.projectionField = (Core.Name "supportsRemoveEdges")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeFeaturesSupportsUpsert :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Bool
-edgeFeaturesSupportsUpsert x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-        Core.projectionField = (Core.Name "supportsUpsert")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgeFeaturesWithElementFeatures :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Features.EdgeFeatures
-edgeFeaturesWithElementFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsAddEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeFeaturesWithProperties :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Features.EdgePropertyFeatures -> Phantoms.TTerm Features.EdgeFeatures
-edgeFeaturesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsAddEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeFeaturesWithSupportsAddEdges :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.EdgeFeatures
-edgeFeaturesWithSupportsAddEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeFeaturesWithSupportsRemoveEdges :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.EdgeFeatures
-edgeFeaturesWithSupportsRemoveEdges original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsAddEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveEdges"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-edgeFeaturesWithSupportsUpsert :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.EdgeFeatures
-edgeFeaturesWithSupportsUpsert original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsAddEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveEdges"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgeFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveEdges")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-edgePropertyFeatures :: Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Features.EdgePropertyFeatures
-edgePropertyFeatures propertyFeatures =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgePropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyFeatures)}]}))
-
-edgePropertyFeaturesPropertyFeatures :: Phantoms.TTerm Features.EdgePropertyFeatures -> Phantoms.TTerm Features.PropertyFeatures
-edgePropertyFeaturesPropertyFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.EdgePropertyFeatures"),
-        Core.projectionField = (Core.Name "propertyFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-edgePropertyFeaturesWithPropertyFeatures :: Phantoms.TTerm Features.EdgePropertyFeatures -> Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Features.EdgePropertyFeatures
-edgePropertyFeaturesWithPropertyFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.EdgePropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-elementFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeatures supportsAddProperty supportsAnyIds supportsCustomIds supportsNumericIds supportsRemoveProperty supportsStringIds supportsUserSuppliedIds supportsUuidIds =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsAddProperty)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsAnyIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsCustomIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsNumericIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsRemoveProperty)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsStringIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsUserSuppliedIds)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsUuidIds)}]}))
-
-elementFeaturesSupportsAddProperty :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsAddProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsAddProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsAnyIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsAnyIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsAnyIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsCustomIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsCustomIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsCustomIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsNumericIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsNumericIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsNumericIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsRemoveProperty :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsRemoveProperty x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsStringIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsStringIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsStringIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsUserSuppliedIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsUserSuppliedIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesSupportsUuidIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool
-elementFeaturesSupportsUuidIds x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-        Core.projectionField = (Core.Name "supportsUuidIds")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-elementFeaturesWithSupportsAddProperty :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsAddProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsAnyIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsAnyIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsCustomIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsCustomIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsNumericIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsNumericIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsRemoveProperty :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsRemoveProperty original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsStringIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsStringIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsUserSuppliedIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsUserSuppliedIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUuidIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-elementFeaturesWithSupportsUuidIds :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.ElementFeatures
-elementFeaturesWithSupportsUuidIds original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAddProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAnyIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsAnyIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsCustomIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsCustomIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsNumericIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsNumericIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveProperty"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveProperty")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsStringIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsStringIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUserSuppliedIds"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ElementFeatures"),
-              Core.projectionField = (Core.Name "supportsUserSuppliedIds")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUuidIds"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-extraFeatures :: Phantoms.TTerm (Core.Type -> Bool) -> Phantoms.TTerm (Features.ExtraFeatures a)
-extraFeatures supportsMapKey =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ExtraFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapKey"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsMapKey)}]}))
-
-extraFeaturesSupportsMapKey :: Phantoms.TTerm (Features.ExtraFeatures a) -> Phantoms.TTerm (Core.Type -> Bool)
-extraFeaturesSupportsMapKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.ExtraFeatures"),
-        Core.projectionField = (Core.Name "supportsMapKey")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-extraFeaturesWithSupportsMapKey :: Phantoms.TTerm (Features.ExtraFeatures a) -> Phantoms.TTerm (Core.Type -> Bool) -> Phantoms.TTerm (Features.ExtraFeatures a)
-extraFeaturesWithSupportsMapKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.ExtraFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMapKey"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-features :: Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Features.Features
-features edge graph vertex =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Phantoms.unTTerm edge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm graph)},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm vertex)}]}))
-
-featuresEdge :: Phantoms.TTerm Features.Features -> Phantoms.TTerm Features.EdgeFeatures
-featuresEdge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-        Core.projectionField = (Core.Name "edge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featuresGraph :: Phantoms.TTerm Features.Features -> Phantoms.TTerm Features.GraphFeatures
-featuresGraph x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-        Core.projectionField = (Core.Name "graph")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featuresVertex :: Phantoms.TTerm Features.Features -> Phantoms.TTerm Features.VertexFeatures
-featuresVertex x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-        Core.projectionField = (Core.Name "vertex")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-featuresWithEdge :: Phantoms.TTerm Features.Features -> Phantoms.TTerm Features.EdgeFeatures -> Phantoms.TTerm Features.Features
-featuresWithEdge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.Features"),
-              Core.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-featuresWithGraph :: Phantoms.TTerm Features.Features -> Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Features.Features
-featuresWithGraph original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.tinkerpop.features.Features"),
-              Core.projectionField = (Core.Name "vertex")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-featuresWithVertex :: Phantoms.TTerm Features.Features -> Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Features.Features
-featuresWithVertex original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-              Core.projectionField = (Core.Name "edge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.Features"),
-              Core.projectionField = (Core.Name "graph")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "vertex"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-graphFeatures :: Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VariableFeatures -> Phantoms.TTerm Features.GraphFeatures
-graphFeatures supportsComputer supportsConcurrentAccess supportsIoRead supportsIoWrite supportsPersistence supportsThreadedTransactions supportsTransactions variables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsComputer)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsConcurrentAccess)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsIoRead)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsIoWrite)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsPersistence)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsThreadedTransactions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsTransactions)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm variables)}]}))
-
-graphFeaturesSupportsComputer :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsComputer x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsComputer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesSupportsConcurrentAccess :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsConcurrentAccess x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesSupportsIoRead :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsIoRead x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsIoRead")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesSupportsIoWrite :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsIoWrite x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsIoWrite")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesSupportsPersistence :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsPersistence x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsPersistence")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesSupportsThreadedTransactions :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsThreadedTransactions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesSupportsTransactions :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool
-graphFeaturesSupportsTransactions x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "supportsTransactions")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesVariables :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Features.VariableFeatures
-graphFeaturesVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-        Core.projectionField = (Core.Name "variables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-graphFeaturesWithSupportsComputer :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsComputer original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithSupportsConcurrentAccess :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsConcurrentAccess original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithSupportsIoRead :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsIoRead original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithSupportsIoWrite :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsIoWrite original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithSupportsPersistence :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsPersistence original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithSupportsThreadedTransactions :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsThreadedTransactions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithSupportsTransactions :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithSupportsTransactions original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "variables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-graphFeaturesWithVariables :: Phantoms.TTerm Features.GraphFeatures -> Phantoms.TTerm Features.VariableFeatures -> Phantoms.TTerm Features.GraphFeatures
-graphFeaturesWithVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsComputer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsComputer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsConcurrentAccess"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsConcurrentAccess")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoRead"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoRead")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsIoWrite"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsIoWrite")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsPersistence"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsPersistence")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsThreadedTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsThreadedTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsTransactions"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.GraphFeatures"),
-              Core.projectionField = (Core.Name "supportsTransactions")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyFeatures :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PropertyFeatures
-propertyFeatures dataTypeFeatures supportsProperties =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm dataTypeFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsProperties)}]}))
-
-propertyFeaturesDataTypeFeatures :: Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Features.DataTypeFeatures
-propertyFeaturesDataTypeFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-        Core.projectionField = (Core.Name "dataTypeFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyFeaturesSupportsProperties :: Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Bool
-propertyFeaturesSupportsProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-        Core.projectionField = (Core.Name "supportsProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-propertyFeaturesWithDataTypeFeatures :: Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Features.PropertyFeatures
-propertyFeaturesWithDataTypeFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-              Core.projectionField = (Core.Name "supportsProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-propertyFeaturesWithSupportsProperties :: Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.PropertyFeatures
-propertyFeaturesWithSupportsProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.PropertyFeatures"),
-              Core.projectionField = (Core.Name "dataTypeFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-variableFeatures :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VariableFeatures
-variableFeatures dataTypeFeatures supportsVariables =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm dataTypeFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsVariables)}]}))
-
-variableFeaturesDataTypeFeatures :: Phantoms.TTerm Features.VariableFeatures -> Phantoms.TTerm Features.DataTypeFeatures
-variableFeaturesDataTypeFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-        Core.projectionField = (Core.Name "dataTypeFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableFeaturesSupportsVariables :: Phantoms.TTerm Features.VariableFeatures -> Phantoms.TTerm Bool
-variableFeaturesSupportsVariables x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-        Core.projectionField = (Core.Name "supportsVariables")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-variableFeaturesWithDataTypeFeatures :: Phantoms.TTerm Features.VariableFeatures -> Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Features.VariableFeatures
-variableFeaturesWithDataTypeFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsVariables"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-              Core.projectionField = (Core.Name "supportsVariables")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-variableFeaturesWithSupportsVariables :: Phantoms.TTerm Features.VariableFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VariableFeatures
-variableFeaturesWithSupportsVariables original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VariableFeatures"),
-              Core.projectionField = (Core.Name "dataTypeFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsVariables"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vertexFeatures :: Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeatures elementFeatures properties supportsAddVertices supportsDuplicateMultiProperties supportsMetaProperties supportsMultiProperties supportsRemoveVertices supportsUpsert =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm elementFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm properties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsAddVertices)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsDuplicateMultiProperties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsMetaProperties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsMultiProperties)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsRemoveVertices)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsUpsert)}]}))
-
-vertexFeaturesElementFeatures :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Features.ElementFeatures
-vertexFeaturesElementFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "elementFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Features.VertexPropertyFeatures
-vertexFeaturesProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "properties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesSupportsAddVertices :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool
-vertexFeaturesSupportsAddVertices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "supportsAddVertices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesSupportsDuplicateMultiProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool
-vertexFeaturesSupportsDuplicateMultiProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesSupportsMetaProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool
-vertexFeaturesSupportsMetaProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "supportsMetaProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesSupportsMultiProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool
-vertexFeaturesSupportsMultiProperties x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "supportsMultiProperties")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesSupportsRemoveVertices :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool
-vertexFeaturesSupportsRemoveVertices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesSupportsUpsert :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool
-vertexFeaturesSupportsUpsert x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-        Core.projectionField = (Core.Name "supportsUpsert")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexFeaturesWithElementFeatures :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithElementFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "properties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithSupportsAddVertices :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithSupportsAddVertices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithSupportsDuplicateMultiProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithSupportsDuplicateMultiProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithSupportsMetaProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithSupportsMetaProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithSupportsMultiProperties :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithSupportsMultiProperties original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithSupportsRemoveVertices :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithSupportsRemoveVertices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsUpsert")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexFeaturesWithSupportsUpsert :: Phantoms.TTerm Features.VertexFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexFeatures
-vertexFeaturesWithSupportsUpsert original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "properties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsAddVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsAddVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsDuplicateMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsDuplicateMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMetaProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMetaProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsMultiProperties"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsMultiProperties")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemoveVertices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexFeatures"),
-              Core.projectionField = (Core.Name "supportsRemoveVertices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsUpsert"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-vertexPropertyFeatures :: Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexPropertyFeatures
-vertexPropertyFeatures dataTypeFeatures propertyFeatures elementFeatures supportsRemove =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm dataTypeFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm propertyFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm elementFeatures)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemove"),
-          Core.fieldTerm = (Phantoms.unTTerm supportsRemove)}]}))
-
-vertexPropertyFeaturesDataTypeFeatures :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.DataTypeFeatures
-vertexPropertyFeaturesDataTypeFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-        Core.projectionField = (Core.Name "dataTypeFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyFeaturesElementFeatures :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.ElementFeatures
-vertexPropertyFeaturesElementFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-        Core.projectionField = (Core.Name "elementFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyFeaturesPropertyFeatures :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.PropertyFeatures
-vertexPropertyFeaturesPropertyFeatures x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-        Core.projectionField = (Core.Name "propertyFeatures")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyFeaturesSupportsRemove :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Bool
-vertexPropertyFeaturesSupportsRemove x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-        Core.projectionField = (Core.Name "supportsRemove")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-vertexPropertyFeaturesWithDataTypeFeatures :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.DataTypeFeatures -> Phantoms.TTerm Features.VertexPropertyFeatures
-vertexPropertyFeaturesWithDataTypeFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "propertyFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "supportsRemove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexPropertyFeaturesWithElementFeatures :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.ElementFeatures -> Phantoms.TTerm Features.VertexPropertyFeatures
-vertexPropertyFeaturesWithElementFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "dataTypeFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "propertyFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "supportsRemove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexPropertyFeaturesWithPropertyFeatures :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Features.PropertyFeatures -> Phantoms.TTerm Features.VertexPropertyFeatures
-vertexPropertyFeaturesWithPropertyFeatures original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "dataTypeFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemove"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "supportsRemove")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-vertexPropertyFeaturesWithSupportsRemove :: Phantoms.TTerm Features.VertexPropertyFeatures -> Phantoms.TTerm Bool -> Phantoms.TTerm Features.VertexPropertyFeatures
-vertexPropertyFeaturesWithSupportsRemove original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "dataTypeFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "dataTypeFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "propertyFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "propertyFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementFeatures"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"),
-              Core.projectionField = (Core.Name "elementFeatures")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "supportsRemove"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Tinkerpop/Gremlin.hs b/src/main/haskell/Hydra/Dsl/Tinkerpop/Gremlin.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Tinkerpop/Gremlin.hs
+++ /dev/null
@@ -1,6819 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.tinkerpop.gremlin
-
-module Hydra.Dsl.Tinkerpop.Gremlin where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Tinkerpop.Gremlin as Gremlin
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-booleanArgumentValue :: Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.BooleanArgument
-booleanArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.BooleanArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-booleanArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.BooleanArgument
-booleanArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.BooleanArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byArgsOrder :: Phantoms.TTerm Gremlin.TraversalOrderArgument -> Phantoms.TTerm Gremlin.ByArgs
-byArgsOrder x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ByArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "order"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byArgsOther :: Phantoms.TTerm Gremlin.ByOtherArgs -> Phantoms.TTerm Gremlin.ByArgs
-byArgsOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ByArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byArgsToken :: Phantoms.TTerm Gremlin.TraversalTokenArgument -> Phantoms.TTerm Gremlin.ByArgs
-byArgsToken x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ByArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "token"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byOtherArgsComparator :: Phantoms.TTerm (Maybe Gremlin.TraversalComparatorArgument) -> Phantoms.TTerm Gremlin.ByOtherArgs
-byOtherArgsComparator x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ByOtherArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "comparator"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-byOtherArgsOther :: Phantoms.TTerm (Maybe Gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal) -> Phantoms.TTerm Gremlin.ByOtherArgs
-byOtherArgsOther x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ByOtherArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "other"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-chainedTraversal :: Phantoms.TTerm Gremlin.TraversalMethod -> Phantoms.TTerm Gremlin.ChainedTraversalElement -> Phantoms.TTerm Gremlin.ChainedTraversal
-chainedTraversal first rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-chainedTraversalElementMethod :: Phantoms.TTerm Gremlin.TraversalMethod -> Phantoms.TTerm Gremlin.ChainedTraversalElement
-chainedTraversalElementMethod x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversalElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "method"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-chainedTraversalElementSelf :: Phantoms.TTerm Gremlin.TraversalSelfMethod -> Phantoms.TTerm Gremlin.ChainedTraversalElement
-chainedTraversalElementSelf x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversalElement"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "self"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-chainedTraversalFirst :: Phantoms.TTerm Gremlin.ChainedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-chainedTraversalFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-chainedTraversalRest :: Phantoms.TTerm Gremlin.ChainedTraversal -> Phantoms.TTerm Gremlin.ChainedTraversalElement
-chainedTraversalRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-chainedTraversalWithFirst :: Phantoms.TTerm Gremlin.ChainedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod -> Phantoms.TTerm Gremlin.ChainedTraversal
-chainedTraversalWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-chainedTraversalWithRest :: Phantoms.TTerm Gremlin.ChainedTraversal -> Phantoms.TTerm Gremlin.ChainedTraversalElement -> Phantoms.TTerm Gremlin.ChainedTraversal
-chainedTraversalWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-chooseArgsFunction :: Phantoms.TTerm Gremlin.TraversalFunctionArgument -> Phantoms.TTerm Gremlin.ChooseArgs
-chooseArgsFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChooseArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-chooseArgsPredicateTraversal :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm Gremlin.ChooseArgs
-chooseArgsPredicateTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChooseArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicateTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-chooseArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm Gremlin.ChooseArgs
-chooseArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ChooseArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-concatArgsString :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.ConcatArgs
-concatArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ConcatArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-concatArgsTraversal :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.ConcatArgs
-concatArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ConcatArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-configuration :: Phantoms.TTerm Gremlin.KeywordOrIdentifier -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.Configuration
-configuration key value =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.Configuration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm key)},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)}]}))
-
-configurationKey :: Phantoms.TTerm Gremlin.Configuration -> Phantoms.TTerm Gremlin.KeywordOrIdentifier
-configurationKey x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Configuration"),
-        Core.projectionField = (Core.Name "key")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-configurationValue :: Phantoms.TTerm Gremlin.Configuration -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-configurationValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Configuration"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-configurationWithKey :: Phantoms.TTerm Gremlin.Configuration -> Phantoms.TTerm Gremlin.KeywordOrIdentifier -> Phantoms.TTerm Gremlin.Configuration
-configurationWithKey original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.Configuration"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "key"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.tinkerpop.gremlin.Configuration"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-configurationWithValue :: Phantoms.TTerm Gremlin.Configuration -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.Configuration
-configurationWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.Configuration"),
-      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.tinkerpop.gremlin.Configuration"),
-              Core.projectionField = (Core.Name "key")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-connectedComponentConstantsComponent :: Phantoms.TTerm Gremlin.ConnectedComponentConstants
-connectedComponentConstantsComponent =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ConnectedComponentConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "component"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-connectedComponentConstantsEdges :: Phantoms.TTerm Gremlin.ConnectedComponentConstants
-connectedComponentConstantsEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ConnectedComponentConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-connectedComponentConstantsPropertyName :: Phantoms.TTerm Gremlin.ConnectedComponentConstants
-connectedComponentConstantsPropertyName =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ConnectedComponentConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyName"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-dateAddArgs :: Phantoms.TTerm Gremlin.TraversalDTArgument -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.DateAddArgs
-dateAddArgs unit duration =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm unit)},
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Phantoms.unTTerm duration)}]}))
-
-dateAddArgsDuration :: Phantoms.TTerm Gremlin.DateAddArgs -> Phantoms.TTerm Gremlin.IntegerArgument
-dateAddArgsDuration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-        Core.projectionField = (Core.Name "duration")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dateAddArgsUnit :: Phantoms.TTerm Gremlin.DateAddArgs -> Phantoms.TTerm Gremlin.TraversalDTArgument
-dateAddArgsUnit x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-        Core.projectionField = (Core.Name "unit")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-dateAddArgsWithDuration :: Phantoms.TTerm Gremlin.DateAddArgs -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.DateAddArgs
-dateAddArgsWithDuration original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-              Core.projectionField = (Core.Name "unit")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-dateAddArgsWithUnit :: Phantoms.TTerm Gremlin.DateAddArgs -> Phantoms.TTerm Gremlin.TraversalDTArgument -> Phantoms.TTerm Gremlin.DateAddArgs
-dateAddArgsWithUnit original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "duration"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"),
-              Core.projectionField = (Core.Name "duration")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-dateArgumentValue :: Phantoms.TTerm Gremlin.DateLiteral -> Phantoms.TTerm Gremlin.DateArgument
-dateArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.DateArgument
-dateArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateDiffArgsDate :: Phantoms.TTerm Gremlin.DateArgument -> Phantoms.TTerm Gremlin.DateDiffArgs
-dateDiffArgsDate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateDiffArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateDiffArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.DateDiffArgs
-dateDiffArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateDiffArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dateLiteral :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.DateLiteral
-dateLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.DateLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dedupArgsScopeString :: Phantoms.TTerm Gremlin.ScopeStringArgument -> Phantoms.TTerm Gremlin.DedupArgs
-dedupArgsScopeString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DedupArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scopeString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-dedupArgsString :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.DedupArgs
-dedupArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DedupArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-directionAndVarargs :: Phantoms.TTerm Gremlin.TraversalDirectionArgument -> Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.DirectionAndVarargs
-directionAndVarargs direction varargs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm direction)},
-        Core.Field {
-          Core.fieldName = (Core.Name "varargs"),
-          Core.fieldTerm = (Phantoms.unTTerm varargs)}]}))
-
-directionAndVarargsDirection :: Phantoms.TTerm Gremlin.DirectionAndVarargs -> Phantoms.TTerm Gremlin.TraversalDirectionArgument
-directionAndVarargsDirection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-        Core.projectionField = (Core.Name "direction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directionAndVarargsVarargs :: Phantoms.TTerm Gremlin.DirectionAndVarargs -> Phantoms.TTerm [Gremlin.StringNullableArgument]
-directionAndVarargsVarargs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-        Core.projectionField = (Core.Name "varargs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-directionAndVarargsWithDirection :: Phantoms.TTerm Gremlin.DirectionAndVarargs -> Phantoms.TTerm Gremlin.TraversalDirectionArgument -> Phantoms.TTerm Gremlin.DirectionAndVarargs
-directionAndVarargsWithDirection original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "varargs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-              Core.projectionField = (Core.Name "varargs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-directionAndVarargsWithVarargs :: Phantoms.TTerm Gremlin.DirectionAndVarargs -> Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.DirectionAndVarargs
-directionAndVarargsWithVarargs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "direction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"),
-              Core.projectionField = (Core.Name "direction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "varargs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-floatArgumentValue :: Phantoms.TTerm Gremlin.FloatLiteral -> Phantoms.TTerm Gremlin.FloatArgument
-floatArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.FloatArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-floatArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.FloatArgument
-floatArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.FloatArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-floatLiteral :: Phantoms.TTerm Double -> Phantoms.TTerm Gremlin.FloatLiteral
-floatLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.FloatLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-fromArgsString :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.FromArgs
-fromArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.FromArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fromArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.FromArgs
-fromArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.FromArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-fromArgsVertex :: Phantoms.TTerm Gremlin.StructureVertexArgument -> Phantoms.TTerm Gremlin.FromArgs
-fromArgsVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.FromArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralArgumentAndNestedTraversal :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal
-genericLiteralArgumentAndNestedTraversal object traversal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal)}]}))
-
-genericLiteralArgumentAndNestedTraversalObject :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-genericLiteralArgumentAndNestedTraversalObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralArgumentAndNestedTraversalTraversal :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-genericLiteralArgumentAndNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "traversal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralArgumentAndNestedTraversalWithObject :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal
-genericLiteralArgumentAndNestedTraversalWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "traversal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-genericLiteralArgumentAndNestedTraversalWithTraversal :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal
-genericLiteralArgumentAndNestedTraversalWithTraversal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgument :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalBiFunctionArgument) -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgument literal biFunction =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm literal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "biFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm biFunction)}]}))
-
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentBiFunction :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalBiFunctionArgument)
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentBiFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-        Core.projectionField = (Core.Name "biFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentLiteral :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-        Core.projectionField = (Core.Name "literal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentWithBiFunction :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalBiFunctionArgument) -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentWithBiFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "biFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentWithLiteral :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentWithLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "biFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"),
-              Core.projectionField = (Core.Name "biFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-genericLiteralArgumentAndTraversalBiFunctionArgument :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument
-genericLiteralArgumentAndTraversalBiFunctionArgument literal biFunction =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm literal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "biFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm biFunction)}]}))
-
-genericLiteralArgumentAndTraversalBiFunctionArgumentBiFunction :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.TraversalBiFunctionArgument
-genericLiteralArgumentAndTraversalBiFunctionArgumentBiFunction x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-        Core.projectionField = (Core.Name "biFunction")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralArgumentAndTraversalBiFunctionArgumentLiteral :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-genericLiteralArgumentAndTraversalBiFunctionArgumentLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-        Core.projectionField = (Core.Name "literal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralArgumentAndTraversalBiFunctionArgumentWithBiFunction :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.TraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument
-genericLiteralArgumentAndTraversalBiFunctionArgumentWithBiFunction original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "biFunction"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genericLiteralArgumentAndTraversalBiFunctionArgumentWithLiteral :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument
-genericLiteralArgumentAndTraversalBiFunctionArgumentWithLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "biFunction"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"),
-              Core.projectionField = (Core.Name "biFunction")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-genericLiteralArgumentAndTraversalPredicateLiteral :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalPredicate
-genericLiteralArgumentAndTraversalPredicateLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralArgumentAndTraversalPredicatePredicate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalPredicate
-genericLiteralArgumentAndTraversalPredicatePredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralArgumentValue :: Phantoms.TTerm Gremlin.GenericLiteral -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-genericLiteralArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-genericLiteralArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralCollection :: Phantoms.TTerm [Gremlin.GenericLiteral] -> Phantoms.TTerm Gremlin.GenericLiteralCollection
-genericLiteralCollection x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralCollection"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-genericLiteralDate :: Phantoms.TTerm Gremlin.DateLiteral -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralDate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralGenericLiteralCollection :: Phantoms.TTerm Gremlin.GenericLiteralCollection -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralGenericLiteralCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "genericLiteralCollection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralGenericLiteralMap :: Phantoms.TTerm Gremlin.GenericLiteralMap -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralGenericLiteralMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "genericLiteralMap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralGenericLiteralRange :: Phantoms.TTerm Gremlin.GenericLiteralRange -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralGenericLiteralRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "genericLiteralRange"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralGenericLiteralSet :: Phantoms.TTerm Gremlin.GenericLiteralSet -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralGenericLiteralSet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "genericLiteralSet"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralInf :: Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralInf =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inf"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-genericLiteralList :: Phantoms.TTerm [Gremlin.GenericLiteral] -> Phantoms.TTerm Gremlin.GenericLiteralList
-genericLiteralList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-genericLiteralListArgumentValue :: Phantoms.TTerm Gremlin.GenericLiteralList -> Phantoms.TTerm Gremlin.GenericLiteralListArgument
-genericLiteralListArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralListArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralListArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.GenericLiteralListArgument
-genericLiteralListArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralListArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralMap :: Phantoms.TTerm [Gremlin.MapEntry] -> Phantoms.TTerm Gremlin.GenericLiteralMap
-genericLiteralMap x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMap"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-genericLiteralMapArgumentValue :: Phantoms.TTerm Gremlin.GenericLiteralMap -> Phantoms.TTerm Gremlin.GenericLiteralMapArgument
-genericLiteralMapArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralMapArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.GenericLiteralMapArgument
-genericLiteralMapArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgument :: Phantoms.TTerm Gremlin.TraversalCardinalityArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgument cardinality object =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm cardinality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm object)}]}))
-
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentCardinality :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument -> Phantoms.TTerm Gremlin.TraversalCardinalityArgument
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentCardinality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-        Core.projectionField = (Core.Name "cardinality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentObject :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentObject x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-        Core.projectionField = (Core.Name "object")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentWithCardinality :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument -> Phantoms.TTerm Gremlin.TraversalCardinalityArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentWithCardinality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-              Core.projectionField = (Core.Name "object")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentWithObject :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentWithObject original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-genericLiteralMapNullableArgumentOrNestedTraversalMap :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal
-genericLiteralMapNullableArgumentOrNestedTraversalMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralMapNullableArgumentOrNestedTraversalTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal
-genericLiteralMapNullableArgumentOrNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralMapNullableArgumentValue :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralMap) -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument
-genericLiteralMapNullableArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralMapNullableArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument
-genericLiteralMapNullableArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralNan :: Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralNan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nan"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-genericLiteralNestedTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralNestedTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nestedTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralNull :: Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-genericLiteralNumeric :: Phantoms.TTerm Gremlin.NumericLiteral -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralRangeInteger :: Phantoms.TTerm Gremlin.IntegerRange -> Phantoms.TTerm Gremlin.GenericLiteralRange
-genericLiteralRangeInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralRangeString :: Phantoms.TTerm Gremlin.StringRange -> Phantoms.TTerm Gremlin.GenericLiteralRange
-genericLiteralRangeString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralRange"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralSet :: Phantoms.TTerm [Gremlin.GenericLiteral] -> Phantoms.TTerm Gremlin.GenericLiteralSet
-genericLiteralSet x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralSet"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-genericLiteralString :: Phantoms.TTerm String -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralStructureVertex :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralStructureVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "structureVertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTerminatedTraversal :: Phantoms.TTerm Gremlin.TerminatedTraversal -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTerminatedTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "terminatedTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTraversalCardinality :: Phantoms.TTerm Gremlin.TraversalCardinality -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTraversalCardinality x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalCardinality"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTraversalDT :: Phantoms.TTerm Gremlin.TraversalDT -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTraversalDT x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalDT"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTraversalDirection :: Phantoms.TTerm Gremlin.TraversalDirection -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTraversalDirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalDirection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTraversalMerge :: Phantoms.TTerm Gremlin.TraversalMerge -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTraversalMerge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalMerge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTraversalPick :: Phantoms.TTerm Gremlin.TraversalPick -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTraversalPick x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalPick"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-genericLiteralTraversalToken :: Phantoms.TTerm Gremlin.TraversalToken -> Phantoms.TTerm Gremlin.GenericLiteral
-genericLiteralTraversalToken x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalToken"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasArgsString :: Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.HasArgs
-hasArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasArgsTraversalToken :: Phantoms.TTerm Gremlin.HasTraversalTokenArgs -> Phantoms.TTerm Gremlin.HasArgs
-hasArgsTraversalToken x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalToken"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasStringArgumentAndOptionalStringLiteralVarargs :: Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm (Maybe Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest) -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs
-hasStringArgumentAndOptionalStringLiteralVarargs string rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsRest :: Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm (Maybe Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest)
-hasStringArgumentAndOptionalStringLiteralVarargsRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsRestObject :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest
-hasStringArgumentAndOptionalStringLiteralVarargsRestObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsRestPredicate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest
-hasStringArgumentAndOptionalStringLiteralVarargsRestPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsRestStringObject :: Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest
-hasStringArgumentAndOptionalStringLiteralVarargsRestStringObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stringObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsRestStringPredicate :: Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest
-hasStringArgumentAndOptionalStringLiteralVarargsRestStringPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "stringPredicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsRestTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest
-hasStringArgumentAndOptionalStringLiteralVarargsRestTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsString :: Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.StringNullableArgument
-hasStringArgumentAndOptionalStringLiteralVarargsString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsWithRest :: Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm (Maybe Gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest) -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs
-hasStringArgumentAndOptionalStringLiteralVarargsWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-hasStringArgumentAndOptionalStringLiteralVarargsWithString :: Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.HasStringArgumentAndOptionalStringLiteralVarargs
-hasStringArgumentAndOptionalStringLiteralVarargsWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-hasTraversalTokenArgs :: Phantoms.TTerm Gremlin.TraversalTokenArgument -> Phantoms.TTerm Gremlin.HasTraversalTokenArgsRest -> Phantoms.TTerm Gremlin.HasTraversalTokenArgs
-hasTraversalTokenArgs traversalToken rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversalToken"),
-          Core.fieldTerm = (Phantoms.unTTerm traversalToken)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-hasTraversalTokenArgsRest :: Phantoms.TTerm Gremlin.HasTraversalTokenArgs -> Phantoms.TTerm Gremlin.HasTraversalTokenArgsRest
-hasTraversalTokenArgsRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasTraversalTokenArgsRestLiteral :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.HasTraversalTokenArgsRest
-hasTraversalTokenArgsRestLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasTraversalTokenArgsRestPredicate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.HasTraversalTokenArgsRest
-hasTraversalTokenArgsRestPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasTraversalTokenArgsRestTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.HasTraversalTokenArgsRest
-hasTraversalTokenArgsRestTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgsRest"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-hasTraversalTokenArgsTraversalToken :: Phantoms.TTerm Gremlin.HasTraversalTokenArgs -> Phantoms.TTerm Gremlin.TraversalTokenArgument
-hasTraversalTokenArgsTraversalToken x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-        Core.projectionField = (Core.Name "traversalToken")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hasTraversalTokenArgsWithRest :: Phantoms.TTerm Gremlin.HasTraversalTokenArgs -> Phantoms.TTerm Gremlin.HasTraversalTokenArgsRest -> Phantoms.TTerm Gremlin.HasTraversalTokenArgs
-hasTraversalTokenArgsWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversalToken"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-              Core.projectionField = (Core.Name "traversalToken")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-hasTraversalTokenArgsWithTraversalToken :: Phantoms.TTerm Gremlin.HasTraversalTokenArgs -> Phantoms.TTerm Gremlin.TraversalTokenArgument -> Phantoms.TTerm Gremlin.HasTraversalTokenArgs
-hasTraversalTokenArgsWithTraversalToken original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversalToken"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-identifier :: Phantoms.TTerm String -> Phantoms.TTerm Gremlin.Identifier
-identifier x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.Identifier"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-integerArgumentValue :: Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Gremlin.IntegerArgument
-integerArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.IntegerArgument
-integerArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-integerLiteral :: Phantoms.TTerm Integer -> Phantoms.TTerm Gremlin.IntegerLiteral
-integerLiteral x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerLiteral"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-integerRange :: Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Gremlin.IntegerRange
-integerRange left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-integerRangeLeft :: Phantoms.TTerm Gremlin.IntegerRange -> Phantoms.TTerm Gremlin.IntegerLiteral
-integerRangeLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerRangeRight :: Phantoms.TTerm Gremlin.IntegerRange -> Phantoms.TTerm Gremlin.IntegerLiteral
-integerRangeRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-integerRangeWithLeft :: Phantoms.TTerm Gremlin.IntegerRange -> Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Gremlin.IntegerRange
-integerRangeWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-integerRangeWithRight :: Phantoms.TTerm Gremlin.IntegerRange -> Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Gremlin.IntegerRange
-integerRangeWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IntegerRange"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-ioOptionsKeysReader :: Phantoms.TTerm Gremlin.IoOptionsKeys
-ioOptionsKeysReader =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IoOptionsKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reader"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ioOptionsKeysWriter :: Phantoms.TTerm Gremlin.IoOptionsKeys
-ioOptionsKeysWriter =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IoOptionsKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "writer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ioOptionsValuesGraphml :: Phantoms.TTerm Gremlin.IoOptionsValues
-ioOptionsValuesGraphml =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IoOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphml"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ioOptionsValuesGraphson :: Phantoms.TTerm Gremlin.IoOptionsValues
-ioOptionsValuesGraphson =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IoOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "graphson"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-ioOptionsValuesGryo :: Phantoms.TTerm Gremlin.IoOptionsValues
-ioOptionsValuesGryo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.IoOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gryo"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-keywordEdges :: Phantoms.TTerm Gremlin.Keyword
-keywordEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Keyword"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-keywordKeys :: Phantoms.TTerm Gremlin.Keyword
-keywordKeys =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Keyword"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keys"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-keywordNew :: Phantoms.TTerm Gremlin.Keyword
-keywordNew =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Keyword"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "new"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-keywordOrIdentifierIdentifier :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.KeywordOrIdentifier
-keywordOrIdentifierIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.KeywordOrIdentifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keywordOrIdentifierKeyword :: Phantoms.TTerm Gremlin.Keyword -> Phantoms.TTerm Gremlin.KeywordOrIdentifier
-keywordOrIdentifierKeyword x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.KeywordOrIdentifier"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keyword"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-keywordValues :: Phantoms.TTerm Gremlin.Keyword
-keywordValues =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Keyword"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "values"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-mapEntryKey :: Phantoms.TTerm Gremlin.MapKey -> Phantoms.TTerm Gremlin.MapEntry
-mapEntryKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapEntry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "key"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapEntryValue :: Phantoms.TTerm Gremlin.GenericLiteral -> Phantoms.TTerm Gremlin.MapEntry
-mapEntryValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapEntry"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyCollection :: Phantoms.TTerm Gremlin.GenericLiteralCollection -> Phantoms.TTerm Gremlin.MapKey
-mapKeyCollection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "collection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyIdentifier :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.MapKey
-mapKeyIdentifier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identifier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyKeyword :: Phantoms.TTerm Gremlin.Keyword -> Phantoms.TTerm Gremlin.MapKey
-mapKeyKeyword x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keyword"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyMap :: Phantoms.TTerm Gremlin.GenericLiteralMap -> Phantoms.TTerm Gremlin.MapKey
-mapKeyMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyNumeric :: Phantoms.TTerm Gremlin.NumericLiteral -> Phantoms.TTerm Gremlin.MapKey
-mapKeyNumeric x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "numeric"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeySet :: Phantoms.TTerm Gremlin.GenericLiteralSet -> Phantoms.TTerm Gremlin.MapKey
-mapKeySet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyString :: Phantoms.TTerm String -> Phantoms.TTerm Gremlin.MapKey
-mapKeyString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyTraversalDirection :: Phantoms.TTerm Gremlin.TraversalDirection -> Phantoms.TTerm Gremlin.MapKey
-mapKeyTraversalDirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalDirection"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-mapKeyTraversalToken :: Phantoms.TTerm Gremlin.TraversalToken -> Phantoms.TTerm Gremlin.MapKey
-mapKeyTraversalToken x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.MapKey"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalToken"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nestedTraversalAnonymous :: Phantoms.TTerm Gremlin.ChainedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-nestedTraversalAnonymous x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anonymous"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nestedTraversalArgument :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm Gremlin.NestedTraversalArgument
-nestedTraversalArgument traversal1 traversal2 traversal3 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal1)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal2)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal3"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal3)}]}))
-
-nestedTraversalArgumentTraversal1 :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm Gremlin.NestedTraversal
-nestedTraversalArgumentTraversal1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-        Core.projectionField = (Core.Name "traversal1")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nestedTraversalArgumentTraversal2 :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal)
-nestedTraversalArgumentTraversal2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-        Core.projectionField = (Core.Name "traversal2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nestedTraversalArgumentTraversal3 :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal)
-nestedTraversalArgumentTraversal3 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-        Core.projectionField = (Core.Name "traversal3")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-nestedTraversalArgumentWithTraversal1 :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversalArgument
-nestedTraversalArgumentWithTraversal1 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nestedTraversalArgumentWithTraversal2 :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm Gremlin.NestedTraversalArgument
-nestedTraversalArgumentWithTraversal2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal3"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal3")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-nestedTraversalArgumentWithTraversal3 :: Phantoms.TTerm Gremlin.NestedTraversalArgument -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm Gremlin.NestedTraversalArgument
-nestedTraversalArgumentWithTraversal3 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal3"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-nestedTraversalChained :: Phantoms.TTerm Gremlin.ChainedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-nestedTraversalChained x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "chained"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-nestedTraversalRoot :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-nestedTraversalRoot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "root"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericLiteralFloat :: Phantoms.TTerm Gremlin.FloatLiteral -> Phantoms.TTerm Gremlin.NumericLiteral
-numericLiteralFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-numericLiteralInteger :: Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Gremlin.NumericLiteral
-numericLiteralInteger x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.NumericLiteral"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionArgsMergeMap :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.OptionArgs
-optionArgsMergeMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mergeMap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionArgsMergeTraversal :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.OptionArgs
-optionArgsMergeTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mergeTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionArgsObjectTraversal :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.OptionArgs
-optionArgsObjectTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionArgsPredicateTraversal :: Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal -> Phantoms.TTerm Gremlin.OptionArgs
-optionArgsPredicateTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicateTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.OptionArgs
-optionArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-optionalStringArgumentAndNestedTraversal :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal
-optionalStringArgumentAndNestedTraversal string traversal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal)}]}))
-
-optionalStringArgumentAndNestedTraversalString :: Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal -> Phantoms.TTerm (Maybe Gremlin.StringArgument)
-optionalStringArgumentAndNestedTraversalString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalStringArgumentAndNestedTraversalTraversal :: Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-optionalStringArgumentAndNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "traversal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalStringArgumentAndNestedTraversalWithString :: Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal -> Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal
-optionalStringArgumentAndNestedTraversalWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "traversal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optionalStringArgumentAndNestedTraversalWithTraversal :: Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal
-optionalStringArgumentAndNestedTraversalWithTraversal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optionalTraversalScopeArgumentAndIntegerArgument :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument
-optionalTraversalScopeArgumentAndIntegerArgument scope long =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "long"),
-          Core.fieldTerm = (Phantoms.unTTerm long)}]}))
-
-optionalTraversalScopeArgumentAndIntegerArgumentLong :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm Gremlin.IntegerArgument
-optionalTraversalScopeArgumentAndIntegerArgumentLong x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-        Core.projectionField = (Core.Name "long")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalTraversalScopeArgumentAndIntegerArgumentScope :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-optionalTraversalScopeArgumentAndIntegerArgumentScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalTraversalScopeArgumentAndIntegerArgumentWithLong :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument
-optionalTraversalScopeArgumentAndIntegerArgumentWithLong original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "long"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-optionalTraversalScopeArgumentAndIntegerArgumentWithScope :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument
-optionalTraversalScopeArgumentAndIntegerArgumentWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "long"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"),
-              Core.projectionField = (Core.Name "long")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optionalTraversalScopeArgumentAndStringArgument :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument
-optionalTraversalScopeArgumentAndStringArgument scope string =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)}]}))
-
-optionalTraversalScopeArgumentAndStringArgumentScope :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-optionalTraversalScopeArgumentAndStringArgumentScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalTraversalScopeArgumentAndStringArgumentString :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument -> Phantoms.TTerm Gremlin.StringArgument
-optionalTraversalScopeArgumentAndStringArgumentString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-optionalTraversalScopeArgumentAndStringArgumentWithScope :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument
-optionalTraversalScopeArgumentAndStringArgumentWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-optionalTraversalScopeArgumentAndStringArgumentWithString :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument
-optionalTraversalScopeArgumentAndStringArgumentWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-pageRankConstantsEdges :: Phantoms.TTerm Gremlin.PageRankConstants
-pageRankConstantsEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PageRankConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pageRankConstantsPropertyName :: Phantoms.TTerm Gremlin.PageRankConstants
-pageRankConstantsPropertyName =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PageRankConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyName"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-pageRankConstantsTimes :: Phantoms.TTerm Gremlin.PageRankConstants
-pageRankConstantsTimes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PageRankConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-peerPressureConstantsEdges :: Phantoms.TTerm Gremlin.PeerPressureConstants
-peerPressureConstantsEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PeerPressureConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-peerPressureConstantsPropertyName :: Phantoms.TTerm Gremlin.PeerPressureConstants
-peerPressureConstantsPropertyName =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PeerPressureConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyName"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-peerPressureConstantsTimes :: Phantoms.TTerm Gremlin.PeerPressureConstants
-peerPressureConstantsTimes =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PeerPressureConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-popStringsArgument :: Phantoms.TTerm Gremlin.TraversalPopArgument -> Phantoms.TTerm [Gremlin.StringArgument] -> Phantoms.TTerm Gremlin.PopStringsArgument
-popStringsArgument pop string =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pop"),
-          Core.fieldTerm = (Phantoms.unTTerm pop)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)}]}))
-
-popStringsArgumentPop :: Phantoms.TTerm Gremlin.PopStringsArgument -> Phantoms.TTerm Gremlin.TraversalPopArgument
-popStringsArgumentPop x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-        Core.projectionField = (Core.Name "pop")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-popStringsArgumentString :: Phantoms.TTerm Gremlin.PopStringsArgument -> Phantoms.TTerm [Gremlin.StringArgument]
-popStringsArgumentString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-popStringsArgumentWithPop :: Phantoms.TTerm Gremlin.PopStringsArgument -> Phantoms.TTerm Gremlin.TraversalPopArgument -> Phantoms.TTerm Gremlin.PopStringsArgument
-popStringsArgumentWithPop original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pop"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-popStringsArgumentWithString :: Phantoms.TTerm Gremlin.PopStringsArgument -> Phantoms.TTerm [Gremlin.StringArgument] -> Phantoms.TTerm Gremlin.PopStringsArgument
-popStringsArgumentWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pop"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"),
-              Core.projectionField = (Core.Name "pop")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-predicateOrTraversalPredicate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.PredicateOrTraversal
-predicateOrTraversalPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateOrTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateOrTraversalTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.PredicateOrTraversal
-predicateOrTraversalTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateOrTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-predicateTraversalArgument :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm Gremlin.PredicateTraversalArgument
-predicateTraversalArgument predicate traversal1 traversal2 =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal1)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal2)}]}))
-
-predicateTraversalArgumentPredicate :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-predicateTraversalArgumentPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateTraversalArgumentTraversal1 :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm Gremlin.NestedTraversal
-predicateTraversalArgumentTraversal1 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-        Core.projectionField = (Core.Name "traversal1")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateTraversalArgumentTraversal2 :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal)
-predicateTraversalArgumentTraversal2 x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-        Core.projectionField = (Core.Name "traversal2")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-predicateTraversalArgumentWithPredicate :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.PredicateTraversalArgument
-predicateTraversalArgumentWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateTraversalArgumentWithTraversal1 :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.PredicateTraversalArgument
-predicateTraversalArgumentWithTraversal1 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal2")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-predicateTraversalArgumentWithTraversal2 :: Phantoms.TTerm Gremlin.PredicateTraversalArgument -> Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm Gremlin.PredicateTraversalArgument
-predicateTraversalArgumentWithTraversal2 original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal1"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"),
-              Core.projectionField = (Core.Name "traversal1")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal2"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-propertyArgsCardinalityObject :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument -> Phantoms.TTerm Gremlin.PropertyArgs
-propertyArgsCardinalityObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PropertyArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cardinalityObject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyArgsCardinalityObjects :: Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects -> Phantoms.TTerm Gremlin.PropertyArgs
-propertyArgsCardinalityObjects x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PropertyArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cardinalityObjects"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyArgsObject :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.PropertyArgs
-propertyArgsObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PropertyArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-propertyArgsObjects :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.PropertyArgs
-propertyArgsObjects x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.PropertyArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objects"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryEmpty :: Phantoms.TTerm Gremlin.Query
-queryEmpty =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "empty"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-queryList :: Phantoms.TTerm [Gremlin.Query] -> Phantoms.TTerm Gremlin.QueryList
-queryList x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.QueryList"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-queryRootTraversal :: Phantoms.TTerm Gremlin.RootTraversalQuery -> Phantoms.TTerm Gremlin.Query
-queryRootTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rootTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-queryToString :: Phantoms.TTerm Gremlin.Query
-queryToString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toString"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-queryTraversalSource :: Phantoms.TTerm Gremlin.TraversalSourceQuery -> Phantoms.TTerm Gremlin.Query
-queryTraversalSource x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.Query"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversalSource"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-rangeArgs :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.RangeArgs
-rangeArgs scope min max =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm min)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm max)}]}))
-
-rangeArgsMax :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm Gremlin.IntegerArgument
-rangeArgsMax x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-        Core.projectionField = (Core.Name "max")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeArgsMin :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm Gremlin.IntegerArgument
-rangeArgsMin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-        Core.projectionField = (Core.Name "min")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeArgsScope :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-rangeArgsScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeArgsWithMax :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.RangeArgs
-rangeArgsWithMax original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeArgsWithMin :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.RangeArgs
-rangeArgsWithMin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeArgsWithScope :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.RangeArgs
-rangeArgsWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgs"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rangeArgument :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.RangeArgument
-rangeArgument min max =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm min)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm max)}]}))
-
-rangeArgumentMax :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-rangeArgumentMax x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-        Core.projectionField = (Core.Name "max")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeArgumentMin :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-rangeArgumentMin x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-        Core.projectionField = (Core.Name "min")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rangeArgumentWithMax :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.RangeArgument
-rangeArgumentWithMax original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-              Core.projectionField = (Core.Name "min")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rangeArgumentWithMin :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.RangeArgument
-rangeArgumentWithMin original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RangeArgument"),
-              Core.projectionField = (Core.Name "max")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-replaceArgs :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.ReplaceArgs
-replaceArgs scope from to =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm from)},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm to)}]}))
-
-replaceArgsFrom :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm Gremlin.StringNullableArgument
-replaceArgsFrom x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-        Core.projectionField = (Core.Name "from")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-replaceArgsScope :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-replaceArgsScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-replaceArgsTo :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm Gremlin.StringNullableArgument
-replaceArgsTo x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-        Core.projectionField = (Core.Name "to")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-replaceArgsWithFrom :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.ReplaceArgs
-replaceArgsWithFrom original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-replaceArgsWithScope :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.ReplaceArgs
-replaceArgsWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-              Core.projectionField = (Core.Name "to")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-replaceArgsWithTo :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.ReplaceArgs
-replaceArgsWithTo original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "from"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"),
-              Core.projectionField = (Core.Name "from")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "to"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rootTraversal :: Phantoms.TTerm Gremlin.TraversalSource -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod -> Phantoms.TTerm [Gremlin.ChainedTraversalElement] -> Phantoms.TTerm Gremlin.RootTraversal
-rootTraversal source spawnMethod chained =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spawnMethod"),
-          Core.fieldTerm = (Phantoms.unTTerm spawnMethod)},
-        Core.Field {
-          Core.fieldName = (Core.Name "chained"),
-          Core.fieldTerm = (Phantoms.unTTerm chained)}]}))
-
-rootTraversalChained :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm [Gremlin.ChainedTraversalElement]
-rootTraversalChained x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-        Core.projectionField = (Core.Name "chained")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootTraversalQuery :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm (Maybe Gremlin.TraversalTerminalMethod) -> Phantoms.TTerm Gremlin.RootTraversalQuery
-rootTraversalQuery root terminalMethod =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Phantoms.unTTerm root)},
-        Core.Field {
-          Core.fieldName = (Core.Name "terminalMethod"),
-          Core.fieldTerm = (Phantoms.unTTerm terminalMethod)}]}))
-
-rootTraversalQueryRoot :: Phantoms.TTerm Gremlin.RootTraversalQuery -> Phantoms.TTerm Gremlin.RootTraversal
-rootTraversalQueryRoot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-        Core.projectionField = (Core.Name "root")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootTraversalQueryTerminalMethod :: Phantoms.TTerm Gremlin.RootTraversalQuery -> Phantoms.TTerm (Maybe Gremlin.TraversalTerminalMethod)
-rootTraversalQueryTerminalMethod x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-        Core.projectionField = (Core.Name "terminalMethod")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootTraversalQueryWithRoot :: Phantoms.TTerm Gremlin.RootTraversalQuery -> Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.RootTraversalQuery
-rootTraversalQueryWithRoot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "terminalMethod"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-              Core.projectionField = (Core.Name "terminalMethod")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rootTraversalQueryWithTerminalMethod :: Phantoms.TTerm Gremlin.RootTraversalQuery -> Phantoms.TTerm (Maybe Gremlin.TraversalTerminalMethod) -> Phantoms.TTerm Gremlin.RootTraversalQuery
-rootTraversalQueryWithTerminalMethod original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"),
-              Core.projectionField = (Core.Name "root")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "terminalMethod"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rootTraversalSource :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.TraversalSource
-rootTraversalSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootTraversalSpawnMethod :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-rootTraversalSpawnMethod x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-        Core.projectionField = (Core.Name "spawnMethod")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-rootTraversalWithChained :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm [Gremlin.ChainedTraversalElement] -> Phantoms.TTerm Gremlin.RootTraversal
-rootTraversalWithChained original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spawnMethod"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-              Core.projectionField = (Core.Name "spawnMethod")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "chained"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-rootTraversalWithSource :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.TraversalSource -> Phantoms.TTerm Gremlin.RootTraversal
-rootTraversalWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "spawnMethod"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-              Core.projectionField = (Core.Name "spawnMethod")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "chained"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-              Core.projectionField = (Core.Name "chained")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-rootTraversalWithSpawnMethod :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod -> Phantoms.TTerm Gremlin.RootTraversal
-rootTraversalWithSpawnMethod original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "spawnMethod"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "chained"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.RootTraversal"),
-              Core.projectionField = (Core.Name "chained")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scopeStringArgument :: Phantoms.TTerm Gremlin.TraversalScopeArgument -> Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.ScopeStringArgument
-scopeStringArgument scope strings =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "strings"),
-          Core.fieldTerm = (Phantoms.unTTerm strings)}]}))
-
-scopeStringArgumentScope :: Phantoms.TTerm Gremlin.ScopeStringArgument -> Phantoms.TTerm Gremlin.TraversalScopeArgument
-scopeStringArgumentScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scopeStringArgumentStrings :: Phantoms.TTerm Gremlin.ScopeStringArgument -> Phantoms.TTerm [Gremlin.StringNullableArgument]
-scopeStringArgumentStrings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-        Core.projectionField = (Core.Name "strings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-scopeStringArgumentWithScope :: Phantoms.TTerm Gremlin.ScopeStringArgument -> Phantoms.TTerm Gremlin.TraversalScopeArgument -> Phantoms.TTerm Gremlin.ScopeStringArgument
-scopeStringArgumentWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "strings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-              Core.projectionField = (Core.Name "strings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-scopeStringArgumentWithStrings :: Phantoms.TTerm Gremlin.ScopeStringArgument -> Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.ScopeStringArgument
-scopeStringArgumentWithStrings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "strings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-selectArgsColumn :: Phantoms.TTerm Gremlin.TraversalColumnArgument -> Phantoms.TTerm Gremlin.SelectArgs
-selectArgsColumn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SelectArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "column"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectArgsPopStrings :: Phantoms.TTerm Gremlin.PopStringsArgument -> Phantoms.TTerm Gremlin.SelectArgs
-selectArgsPopStrings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SelectArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "popStrings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectArgsPopTraversal :: Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.SelectArgs
-selectArgsPopTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SelectArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "popTraversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectArgsStrings :: Phantoms.TTerm [Gremlin.StringArgument] -> Phantoms.TTerm Gremlin.SelectArgs
-selectArgsStrings x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SelectArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "strings"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-selectArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.SelectArgs
-selectArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SelectArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-serviceArgumentsMap :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralMapArgument) -> Phantoms.TTerm Gremlin.ServiceArguments
-serviceArgumentsMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-serviceArgumentsTraversal :: Phantoms.TTerm (Maybe Gremlin.NestedTraversal) -> Phantoms.TTerm Gremlin.ServiceArguments
-serviceArgumentsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceArguments"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-serviceCall :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.ServiceArguments -> Phantoms.TTerm Gremlin.ServiceCall
-serviceCall service arguments =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "service"),
-          Core.fieldTerm = (Phantoms.unTTerm service)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm arguments)}]}))
-
-serviceCallArguments :: Phantoms.TTerm Gremlin.ServiceCall -> Phantoms.TTerm Gremlin.ServiceArguments
-serviceCallArguments x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-        Core.projectionField = (Core.Name "arguments")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-serviceCallService :: Phantoms.TTerm Gremlin.ServiceCall -> Phantoms.TTerm Gremlin.StringArgument
-serviceCallService x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-        Core.projectionField = (Core.Name "service")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-serviceCallWithArguments :: Phantoms.TTerm Gremlin.ServiceCall -> Phantoms.TTerm Gremlin.ServiceArguments -> Phantoms.TTerm Gremlin.ServiceCall
-serviceCallWithArguments original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "service"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-              Core.projectionField = (Core.Name "service")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-serviceCallWithService :: Phantoms.TTerm Gremlin.ServiceCall -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.ServiceCall
-serviceCallWithService original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "service"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "arguments"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ServiceCall"),
-              Core.projectionField = (Core.Name "arguments")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-shortestPathConstantsDistance :: Phantoms.TTerm Gremlin.ShortestPathConstants
-shortestPathConstantsDistance =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ShortestPathConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "distance"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shortestPathConstantsEdges :: Phantoms.TTerm Gremlin.ShortestPathConstants
-shortestPathConstantsEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ShortestPathConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "edges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shortestPathConstantsIncludeEdges :: Phantoms.TTerm Gremlin.ShortestPathConstants
-shortestPathConstantsIncludeEdges =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ShortestPathConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "includeEdges"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shortestPathConstantsMaxDistance :: Phantoms.TTerm Gremlin.ShortestPathConstants
-shortestPathConstantsMaxDistance =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ShortestPathConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maxDistance"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-shortestPathConstantsTarget :: Phantoms.TTerm Gremlin.ShortestPathConstants
-shortestPathConstantsTarget =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ShortestPathConstants"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "target"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-splitArgs :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.SplitArgs
-splitArgs scope delimiter =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Phantoms.unTTerm delimiter)}]}))
-
-splitArgsDelimiter :: Phantoms.TTerm Gremlin.SplitArgs -> Phantoms.TTerm Gremlin.StringNullableArgument
-splitArgsDelimiter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-        Core.projectionField = (Core.Name "delimiter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-splitArgsScope :: Phantoms.TTerm Gremlin.SplitArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-splitArgsScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-splitArgsWithDelimiter :: Phantoms.TTerm Gremlin.SplitArgs -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.SplitArgs
-splitArgsWithDelimiter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-splitArgsWithScope :: Phantoms.TTerm Gremlin.SplitArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.SplitArgs
-splitArgsWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "delimiter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SplitArgs"),
-              Core.projectionField = (Core.Name "delimiter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringArgumentAndGenericLiteralArgument :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument
-stringArgumentAndGenericLiteralArgument string literal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm literal)}]}))
-
-stringArgumentAndGenericLiteralArgumentLiteral :: Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-stringArgumentAndGenericLiteralArgumentLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-        Core.projectionField = (Core.Name "literal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringArgumentAndGenericLiteralArgumentString :: Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgument
-stringArgumentAndGenericLiteralArgumentString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringArgumentAndGenericLiteralArgumentWithLiteral :: Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument
-stringArgumentAndGenericLiteralArgumentWithLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringArgumentAndGenericLiteralArgumentWithString :: Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument
-stringArgumentAndGenericLiteralArgumentWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringArgumentAndOptionalGenericLiteralArgument :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm (Maybe Gremlin.GenericLiteralArgument) -> Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument
-stringArgumentAndOptionalGenericLiteralArgument string literal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm literal)}]}))
-
-stringArgumentAndOptionalGenericLiteralArgumentLiteral :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument -> Phantoms.TTerm (Maybe Gremlin.GenericLiteralArgument)
-stringArgumentAndOptionalGenericLiteralArgumentLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-        Core.projectionField = (Core.Name "literal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringArgumentAndOptionalGenericLiteralArgumentString :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgument
-stringArgumentAndOptionalGenericLiteralArgumentString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringArgumentAndOptionalGenericLiteralArgumentWithLiteral :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument -> Phantoms.TTerm (Maybe Gremlin.GenericLiteralArgument) -> Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument
-stringArgumentAndOptionalGenericLiteralArgumentWithLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringArgumentAndOptionalGenericLiteralArgumentWithString :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument
-stringArgumentAndOptionalGenericLiteralArgumentWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringArgumentAndOptionalStringLiteralVarargs :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs
-stringArgumentAndOptionalStringLiteralVarargs first rest =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm first)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm rest)}]}))
-
-stringArgumentAndOptionalStringLiteralVarargsFirst :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.StringArgument
-stringArgumentAndOptionalStringLiteralVarargsFirst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-        Core.projectionField = (Core.Name "first")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringArgumentAndOptionalStringLiteralVarargsRest :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm [Gremlin.StringNullableArgument]
-stringArgumentAndOptionalStringLiteralVarargsRest x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-        Core.projectionField = (Core.Name "rest")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringArgumentAndOptionalStringLiteralVarargsWithFirst :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs
-stringArgumentAndOptionalStringLiteralVarargsWithFirst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-              Core.projectionField = (Core.Name "rest")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringArgumentAndOptionalStringLiteralVarargsWithRest :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs
-stringArgumentAndOptionalStringLiteralVarargsWithRest original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"),
-              Core.projectionField = (Core.Name "first")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rest"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringArgumentOrNestedTraversalString :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.StringArgumentOrNestedTraversal
-stringArgumentOrNestedTraversalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringArgumentOrNestedTraversalTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.StringArgumentOrNestedTraversal
-stringArgumentOrNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringArgumentValue :: Phantoms.TTerm String -> Phantoms.TTerm Gremlin.StringArgument
-stringArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.StringArgument
-stringArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringNullableArgumentAndGenericLiteralArgument :: Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument
-stringNullableArgumentAndGenericLiteralArgument string literal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm literal)}]}))
-
-stringNullableArgumentAndGenericLiteralArgumentLiteral :: Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-stringNullableArgumentAndGenericLiteralArgumentLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-        Core.projectionField = (Core.Name "literal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringNullableArgumentAndGenericLiteralArgumentString :: Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.StringNullableArgument
-stringNullableArgumentAndGenericLiteralArgumentString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringNullableArgumentAndGenericLiteralArgumentWithLiteral :: Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument
-stringNullableArgumentAndGenericLiteralArgumentWithLiteral original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringNullableArgumentAndGenericLiteralArgumentWithString :: Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.StringNullableArgumentAndGenericLiteralArgument
-stringNullableArgumentAndGenericLiteralArgumentWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"),
-              Core.projectionField = (Core.Name "literal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringNullableArgumentAndTraversalPredicate :: Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate
-stringNullableArgumentAndTraversalPredicate string predicate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm string)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)}]}))
-
-stringNullableArgumentAndTraversalPredicatePredicate :: Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicate
-stringNullableArgumentAndTraversalPredicatePredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringNullableArgumentAndTraversalPredicateString :: Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate -> Phantoms.TTerm Gremlin.StringNullableArgument
-stringNullableArgumentAndTraversalPredicateString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-        Core.projectionField = (Core.Name "string")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringNullableArgumentAndTraversalPredicateWithPredicate :: Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate
-stringNullableArgumentAndTraversalPredicateWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-              Core.projectionField = (Core.Name "string")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-stringNullableArgumentAndTraversalPredicateWithString :: Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate -> Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.StringNullableArgumentAndTraversalPredicate
-stringNullableArgumentAndTraversalPredicateWithString original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringNullableArgumentValue :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Gremlin.StringNullableArgument
-stringNullableArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringNullableArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.StringNullableArgument
-stringNullableArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringNullableArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-stringRange :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Gremlin.StringRange
-stringRange left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-stringRangeLeft :: Phantoms.TTerm Gremlin.StringRange -> Phantoms.TTerm String
-stringRangeLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringRangeRight :: Phantoms.TTerm Gremlin.StringRange -> Phantoms.TTerm String
-stringRangeRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-stringRangeWithLeft :: Phantoms.TTerm Gremlin.StringRange -> Phantoms.TTerm String -> Phantoms.TTerm Gremlin.StringRange
-stringRangeWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-stringRangeWithRight :: Phantoms.TTerm Gremlin.StringRange -> Phantoms.TTerm String -> Phantoms.TTerm Gremlin.StringRange
-stringRangeWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StringRange"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structureVertex :: Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.StructureVertex
-structureVertex new id label =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm new)},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm id)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm label)}]}))
-
-structureVertexArgumentValue :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Gremlin.StructureVertexArgument
-structureVertexArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertexArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structureVertexArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.StructureVertexArgument
-structureVertexArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertexArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-structureVertexId :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Gremlin.GenericLiteralArgument
-structureVertexId x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-        Core.projectionField = (Core.Name "id")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structureVertexLabel :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Gremlin.StringArgument
-structureVertexLabel x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-        Core.projectionField = (Core.Name "label")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structureVertexNew :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Bool
-structureVertexNew x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-        Core.projectionField = (Core.Name "new")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-structureVertexWithId :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.StructureVertex
-structureVertexWithId original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-structureVertexWithLabel :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.StructureVertex
-structureVertexWithLabel original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm 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.tinkerpop.gremlin.StructureVertex"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-structureVertexWithNew :: Phantoms.TTerm Gremlin.StructureVertex -> Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.StructureVertex
-structureVertexWithNew original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm 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.tinkerpop.gremlin.StructureVertex"),
-              Core.projectionField = (Core.Name "id")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.StructureVertex"),
-              Core.projectionField = (Core.Name "label")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-substringArgs :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm (Maybe Gremlin.IntegerArgument) -> Phantoms.TTerm Gremlin.SubstringArgs
-substringArgs scope start end =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm start)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm end)}]}))
-
-substringArgsEnd :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm (Maybe Gremlin.IntegerArgument)
-substringArgsEnd x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-        Core.projectionField = (Core.Name "end")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-substringArgsScope :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-substringArgsScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-substringArgsStart :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm Gremlin.IntegerArgument
-substringArgsStart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-        Core.projectionField = (Core.Name "start")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-substringArgsWithEnd :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm (Maybe Gremlin.IntegerArgument) -> Phantoms.TTerm Gremlin.SubstringArgs
-substringArgsWithEnd original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-substringArgsWithScope :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.SubstringArgs
-substringArgsWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-              Core.projectionField = (Core.Name "start")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-              Core.projectionField = (Core.Name "end")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-substringArgsWithStart :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.SubstringArgs
-substringArgsWithStart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "start"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "end"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"),
-              Core.projectionField = (Core.Name "end")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-tailArgs :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm (Maybe Gremlin.IntegerArgument) -> Phantoms.TTerm Gremlin.TailArgs
-tailArgs scope integer =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm scope)},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Phantoms.unTTerm integer)}]}))
-
-tailArgsInteger :: Phantoms.TTerm Gremlin.TailArgs -> Phantoms.TTerm (Maybe Gremlin.IntegerArgument)
-tailArgsInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-        Core.projectionField = (Core.Name "integer")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tailArgsScope :: Phantoms.TTerm Gremlin.TailArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument)
-tailArgsScope x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-        Core.projectionField = (Core.Name "scope")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-tailArgsWithInteger :: Phantoms.TTerm Gremlin.TailArgs -> Phantoms.TTerm (Maybe Gremlin.IntegerArgument) -> Phantoms.TTerm Gremlin.TailArgs
-tailArgsWithInteger original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-              Core.projectionField = (Core.Name "scope")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-tailArgsWithScope :: Phantoms.TTerm Gremlin.TailArgs -> Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TailArgs
-tailArgsWithScope original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "scope"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TailArgs"),
-              Core.projectionField = (Core.Name "integer")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-terminatedTraversal :: Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.TraversalTerminalMethod -> Phantoms.TTerm Gremlin.TerminatedTraversal
-terminatedTraversal root terminal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Phantoms.unTTerm root)},
-        Core.Field {
-          Core.fieldName = (Core.Name "terminal"),
-          Core.fieldTerm = (Phantoms.unTTerm terminal)}]}))
-
-terminatedTraversalRoot :: Phantoms.TTerm Gremlin.TerminatedTraversal -> Phantoms.TTerm Gremlin.RootTraversal
-terminatedTraversalRoot x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-        Core.projectionField = (Core.Name "root")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-terminatedTraversalTerminal :: Phantoms.TTerm Gremlin.TerminatedTraversal -> Phantoms.TTerm Gremlin.TraversalTerminalMethod
-terminatedTraversalTerminal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-        Core.projectionField = (Core.Name "terminal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-terminatedTraversalWithRoot :: Phantoms.TTerm Gremlin.TerminatedTraversal -> Phantoms.TTerm Gremlin.RootTraversal -> Phantoms.TTerm Gremlin.TerminatedTraversal
-terminatedTraversalWithRoot original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "terminal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-              Core.projectionField = (Core.Name "terminal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-terminatedTraversalWithTerminal :: Phantoms.TTerm Gremlin.TerminatedTraversal -> Phantoms.TTerm Gremlin.TraversalTerminalMethod -> Phantoms.TTerm Gremlin.TerminatedTraversal
-terminatedTraversalWithTerminal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "root"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"),
-              Core.projectionField = (Core.Name "root")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "terminal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-toArgsDirection :: Phantoms.TTerm Gremlin.DirectionAndVarargs -> Phantoms.TTerm Gremlin.ToArgs
-toArgsDirection x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ToArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "direction"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-toArgsString :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.ToArgs
-toArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ToArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-toArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.ToArgs
-toArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ToArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-toArgsVertex :: Phantoms.TTerm Gremlin.StructureVertexArgument -> Phantoms.TTerm Gremlin.ToArgs
-toArgsVertex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ToArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "vertex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-transactionPartBegin :: Phantoms.TTerm Gremlin.TransactionPart
-transactionPartBegin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TransactionPart"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "begin"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-transactionPartCommit :: Phantoms.TTerm Gremlin.TransactionPart
-transactionPartCommit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TransactionPart"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "commit"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-transactionPartRollback :: Phantoms.TTerm Gremlin.TransactionPart
-transactionPartRollback =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TransactionPart"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rollback"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalBiFunctionArgumentValue :: Phantoms.TTerm Gremlin.TraversalOperator -> Phantoms.TTerm Gremlin.TraversalBiFunctionArgument
-traversalBiFunctionArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalBiFunctionArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalBiFunctionArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalBiFunctionArgument
-traversalBiFunctionArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalBiFunctionArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalCardinalityArgumentAndObjects :: Phantoms.TTerm Gremlin.TraversalCardinalityArgument -> Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects
-traversalCardinalityArgumentAndObjects cardinality objects =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm cardinality)},
-        Core.Field {
-          Core.fieldName = (Core.Name "objects"),
-          Core.fieldTerm = (Phantoms.unTTerm objects)}]}))
-
-traversalCardinalityArgumentAndObjectsCardinality :: Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects -> Phantoms.TTerm Gremlin.TraversalCardinalityArgument
-traversalCardinalityArgumentAndObjectsCardinality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-        Core.projectionField = (Core.Name "cardinality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalCardinalityArgumentAndObjectsObjects :: Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects -> Phantoms.TTerm [Gremlin.GenericLiteralArgument]
-traversalCardinalityArgumentAndObjectsObjects x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-        Core.projectionField = (Core.Name "objects")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalCardinalityArgumentAndObjectsWithCardinality :: Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects -> Phantoms.TTerm Gremlin.TraversalCardinalityArgument -> Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects
-traversalCardinalityArgumentAndObjectsWithCardinality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "objects"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-              Core.projectionField = (Core.Name "objects")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalCardinalityArgumentAndObjectsWithObjects :: Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects -> Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalCardinalityArgumentAndObjects
-traversalCardinalityArgumentAndObjectsWithObjects original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "objects"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalCardinalityArgumentValue :: Phantoms.TTerm Gremlin.TraversalCardinality -> Phantoms.TTerm Gremlin.TraversalCardinalityArgument
-traversalCardinalityArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalCardinalityArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalCardinalityArgument
-traversalCardinalityArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalCardinalityList :: Phantoms.TTerm Gremlin.GenericLiteral -> Phantoms.TTerm Gremlin.TraversalCardinality
-traversalCardinalityList x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalCardinalitySet :: Phantoms.TTerm Gremlin.GenericLiteral -> Phantoms.TTerm Gremlin.TraversalCardinality
-traversalCardinalitySet x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalCardinalitySingle :: Phantoms.TTerm Gremlin.GenericLiteral -> Phantoms.TTerm Gremlin.TraversalCardinality
-traversalCardinalitySingle x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalCardinality"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "single"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalColumnArgumentValue :: Phantoms.TTerm Gremlin.TraversalColumn -> Phantoms.TTerm Gremlin.TraversalColumnArgument
-traversalColumnArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalColumnArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalColumnArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalColumnArgument
-traversalColumnArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalColumnArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalColumnKeys :: Phantoms.TTerm Gremlin.TraversalColumn
-traversalColumnKeys =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalColumn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keys"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalColumnValues :: Phantoms.TTerm Gremlin.TraversalColumn
-traversalColumnValues =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalColumn"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "values"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalComparatorArgumentValue :: Phantoms.TTerm Gremlin.TraversalOrder -> Phantoms.TTerm Gremlin.TraversalComparatorArgument
-traversalComparatorArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalComparatorArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalComparatorArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalComparatorArgument
-traversalComparatorArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalComparatorArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalDTArgumentValue :: Phantoms.TTerm Gremlin.TraversalDT -> Phantoms.TTerm Gremlin.TraversalDTArgument
-traversalDTArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDTArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalDTArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalDTArgument
-traversalDTArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDTArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalDTDay :: Phantoms.TTerm Gremlin.TraversalDT
-traversalDTDay =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDT"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "day"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalDTHour :: Phantoms.TTerm Gremlin.TraversalDT
-traversalDTHour =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDT"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hour"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalDTMinute :: Phantoms.TTerm Gremlin.TraversalDT
-traversalDTMinute =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDT"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minute"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalDTSecond :: Phantoms.TTerm Gremlin.TraversalDT
-traversalDTSecond =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDT"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "second"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalDirectionArgumentValue :: Phantoms.TTerm Gremlin.TraversalDirection -> Phantoms.TTerm Gremlin.TraversalDirectionArgument
-traversalDirectionArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDirectionArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalDirectionArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalDirectionArgument
-traversalDirectionArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDirectionArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalDirectionBoth :: Phantoms.TTerm Gremlin.TraversalDirection
-traversalDirectionBoth =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "both"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalDirectionIn :: Phantoms.TTerm Gremlin.TraversalDirection
-traversalDirectionIn =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalDirectionOut :: Phantoms.TTerm Gremlin.TraversalDirection
-traversalDirectionOut =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalDirection"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "out"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalFunctionArgumentOrStringArgumentOrNestedTraversalFunction :: Phantoms.TTerm Gremlin.TraversalFunctionArgument -> Phantoms.TTerm Gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal
-traversalFunctionArgumentOrStringArgumentOrNestedTraversalFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalFunctionArgumentOrStringArgumentOrNestedTraversalString :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal
-traversalFunctionArgumentOrStringArgumentOrNestedTraversalString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalFunctionArgumentOrStringArgumentOrNestedTraversalTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal
-traversalFunctionArgumentOrStringArgumentOrNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalFunctionArgumentValue :: Phantoms.TTerm Gremlin.TraversalFunction -> Phantoms.TTerm Gremlin.TraversalFunctionArgument
-traversalFunctionArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalFunctionArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalFunctionArgument
-traversalFunctionArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalFunctionColumn :: Phantoms.TTerm Gremlin.TraversalColumn -> Phantoms.TTerm Gremlin.TraversalFunction
-traversalFunctionColumn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "column"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalFunctionToken :: Phantoms.TTerm Gremlin.TraversalToken -> Phantoms.TTerm Gremlin.TraversalFunction
-traversalFunctionToken x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalFunction"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "token"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgument :: Phantoms.TTerm Gremlin.TraversalMergeArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalCardinality) -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument
-traversalMergeArgumentAndGenericLiteralMapNullableArgument merge map cardinality =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm merge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Phantoms.unTTerm map)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm cardinality)}]}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentCardinality :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalCardinality)
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentCardinality x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-        Core.projectionField = (Core.Name "cardinality")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentMap :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-        Core.projectionField = (Core.Name "map")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentMerge :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.TraversalMergeArgument
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentMerge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-        Core.projectionField = (Core.Name "merge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentWithCardinality :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm (Maybe Gremlin.TraversalCardinality) -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentWithCardinality original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentWithMap :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentWithMap original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentWithMerge :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument -> Phantoms.TTerm Gremlin.TraversalMergeArgument -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument
-traversalMergeArgumentAndGenericLiteralMapNullableArgumentWithMerge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-              Core.projectionField = (Core.Name "map")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cardinality"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"),
-              Core.projectionField = (Core.Name "cardinality")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalMergeArgumentAndNestedTraversal :: Phantoms.TTerm Gremlin.TraversalMergeArgument -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal
-traversalMergeArgumentAndNestedTraversal merge traversal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm merge)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal)}]}))
-
-traversalMergeArgumentAndNestedTraversalMerge :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalMergeArgument
-traversalMergeArgumentAndNestedTraversalMerge x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "merge")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalMergeArgumentAndNestedTraversalTraversal :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-traversalMergeArgumentAndNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "traversal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalMergeArgumentAndNestedTraversalWithMerge :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalMergeArgument -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal
-traversalMergeArgumentAndNestedTraversalWithMerge original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "traversal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalMergeArgumentAndNestedTraversalWithTraversal :: Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMergeArgumentAndNestedTraversal
-traversalMergeArgumentAndNestedTraversalWithTraversal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "merge"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "merge")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalMergeArgumentValue :: Phantoms.TTerm Gremlin.TraversalMerge -> Phantoms.TTerm Gremlin.TraversalMergeArgument
-traversalMergeArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMergeArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalMergeArgument
-traversalMergeArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMergeInV :: Phantoms.TTerm Gremlin.TraversalMerge
-traversalMergeInV =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMerge"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inV"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMergeOnCreate :: Phantoms.TTerm Gremlin.TraversalMerge
-traversalMergeOnCreate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMerge"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "onCreate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMergeOnMatch :: Phantoms.TTerm Gremlin.TraversalMerge
-traversalMergeOnMatch =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMerge"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "onMatch"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMergeOutV :: Phantoms.TTerm Gremlin.TraversalMerge
-traversalMergeOutV =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMerge"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outV"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodAddE :: Phantoms.TTerm Gremlin.StringArgumentOrNestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAddE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAddV :: Phantoms.TTerm (Maybe Gremlin.StringArgumentOrNestedTraversal) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAddV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addV"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAggregate :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndStringArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAggregate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "aggregate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAll :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAll x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAnd :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAny :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAny x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAs :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "as"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodAsDate :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAsDate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asDate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodAsString :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodAsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asString"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodBarrier :: Phantoms.TTerm (Maybe Gremlin.TraversalSackMethodArgumentOrIntegerArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodBarrier x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "barrier"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodBoth :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodBoth x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "both"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodBothE :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodBothE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bothE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodBothV :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodBothV =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bothV"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodBranch :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodBranch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "branch"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodBy :: Phantoms.TTerm Gremlin.ByArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodBy x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "by"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCall :: Phantoms.TTerm Gremlin.ServiceCall -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCap :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodChoose :: Phantoms.TTerm Gremlin.ChooseArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodChoose x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "choose"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCoalesce :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCoalesce x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "coalesce"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCoin :: Phantoms.TTerm Gremlin.FloatArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCoin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "coin"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCombine :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCombine x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "combine"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodConcat :: Phantoms.TTerm Gremlin.ConcatArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodConcat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "concat"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodConjoin :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodConjoin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "conjoin"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodConnectedComponent :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodConnectedComponent =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "connectedComponent"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodConstant :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodConstant x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "constant"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCount :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCount x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "count"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodCyclicPath :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodCyclicPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cyclicPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodDateAdd :: Phantoms.TTerm Gremlin.DateAddArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodDateAdd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateAdd"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodDateDiff :: Phantoms.TTerm Gremlin.DateDiffArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodDateDiff x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateDiff"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodDedup :: Phantoms.TTerm Gremlin.DedupArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodDedup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dedup"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodDifference :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodDifference x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "difference"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodDisjunct :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodDisjunct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "disjunct"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodDrop :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodDrop =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "drop"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodE :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "e"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodElement :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodElement x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "element"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodElementMap :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodElementMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elementMap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodEmit :: Phantoms.TTerm (Maybe Gremlin.PredicateOrTraversal) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodEmit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "emit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodFail :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodFail x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fail"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodFilter :: Phantoms.TTerm Gremlin.PredicateOrTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodFilter x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "filter"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodFlatMap :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodFlatMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "flatMap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodFold :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodFold x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "fold"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodFormat :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodFormat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "format"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodFrom :: Phantoms.TTerm Gremlin.FromArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodFrom x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "from"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodGroup :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodGroup x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "group"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodGroupCount :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodGroupCount x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "groupCount"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodHas :: Phantoms.TTerm Gremlin.HasArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodHas x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "has"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodHasId :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndTraversalPredicate -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodHasId x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasId"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodHasKey :: Phantoms.TTerm Gremlin.TraversalPredicateOrStringLiteralVarargs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodHasKey x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasKey"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodHasLabel :: Phantoms.TTerm Gremlin.TraversalPredicateOrStringLiteralVarargs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodHasLabel x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasLabel"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodHasNot :: Phantoms.TTerm Gremlin.StringNullableArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodHasNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasNot"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodHasValue :: Phantoms.TTerm Gremlin.TraversalPredicateOrGenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodHasValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasValue"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodId :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodId =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "id"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodIdentity :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodIdentity =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "identity"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodIn :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodIn x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "in"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodInE :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodInE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodInV :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodInV =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inV"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodIndex :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodIndex =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "index"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodInject :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodInject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodIntersect :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodIntersect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "intersect"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodIs :: Phantoms.TTerm Gremlin.TraversalPredicateOrGenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodIs x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "is"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodKey :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodKey =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "key"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodLTrim :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodLTrim x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lTrim"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodLabel :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodLabel =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodLength :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodLength x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "length"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodLimit :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodLimit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "limit"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodLocal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodLocal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "local"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodLoops :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodLoops x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "loops"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMap :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMatch :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMatch x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "match"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMath :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "math"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMax :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMax x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "max"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMean :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMerge :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMerge x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "merge"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMergeE :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMergeE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mergeE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMergeV :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMergeV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mergeV"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodMin :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodMin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "min"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodNone :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodNone x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodNot :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOption :: Phantoms.TTerm Gremlin.OptionArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOption x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "option"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOptional :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOptional x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "optional"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOr :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOrder :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOrder x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "order"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOtherV :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOtherV =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "otherV"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodOut :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOut x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "out"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOutE :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOutE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodOutV :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodOutV =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outV"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodPageRank :: Phantoms.TTerm (Maybe Gremlin.FloatArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodPageRank x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pageRank"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodPath :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "path"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodPeerPressure :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodPeerPressure =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "peerPressure"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodProduct :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodProduct x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "product"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodProfile :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodProfile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "profile"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodProject :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalStringLiteralVarargs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodProject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodProperties :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodProperties x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "properties"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodProperty :: Phantoms.TTerm Gremlin.PropertyArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodProperty x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "property"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodPropertyMap :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodPropertyMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "propertyMap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodRTrim :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodRTrim x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "rTrim"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodRange :: Phantoms.TTerm Gremlin.RangeArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodRange x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "range"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodRead :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodRead =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "read"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodRepeat :: Phantoms.TTerm Gremlin.OptionalStringArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodRepeat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "repeat"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodReplace :: Phantoms.TTerm Gremlin.ReplaceArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodReplace x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "replace"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodReverse :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodReverse =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "reverse"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodSack :: Phantoms.TTerm (Maybe Gremlin.TraversalBiFunctionArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSack x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sack"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSample :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSample x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sample"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSelect :: Phantoms.TTerm Gremlin.SelectArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSelect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "select"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodShortestPath :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodShortestPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shortestPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodSideEffect :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSideEffect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sideEffect"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSimplePath :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSimplePath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "simplePath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodSkip :: Phantoms.TTerm Gremlin.OptionalTraversalScopeArgumentAndIntegerArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSkip x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "skip"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSplit :: Phantoms.TTerm Gremlin.SplitArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSplit x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "split"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodStore :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodStore x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "store"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSubgraph :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSubgraph x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "subgraph"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSubstring :: Phantoms.TTerm Gremlin.SubstringArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSubstring x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "substring"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodSum :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodSum x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sum"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodTail :: Phantoms.TTerm (Maybe Gremlin.TailArgs) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodTail x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tail"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodTimes :: Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodTimes x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "times"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodTo :: Phantoms.TTerm Gremlin.ToArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodTo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "to"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodToE :: Phantoms.TTerm Gremlin.DirectionAndVarargs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodToE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodToLower :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodToLower x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toLower"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodToUpper :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodToUpper x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toUpper"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodToV :: Phantoms.TTerm Gremlin.TraversalDirectionArgument -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodToV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toV"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodTree :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodTree x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tree"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodTrim :: Phantoms.TTerm (Maybe Gremlin.TraversalScopeArgument) -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodTrim x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "trim"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodUnfold :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodUnfold =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unfold"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodUnion :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodUntil :: Phantoms.TTerm Gremlin.PredicateOrTraversal -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodUntil x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "until"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodV :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "v"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodValue :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodValue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalMethodValueMap :: Phantoms.TTerm Gremlin.ValueMapArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodValueMap x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "valueMap"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodValues :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodValues x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "values"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodWhere :: Phantoms.TTerm Gremlin.WhereArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodWhere x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "where"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodWith :: Phantoms.TTerm Gremlin.WithArgs -> Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "with"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalMethodWrite :: Phantoms.TTerm Gremlin.TraversalMethod
-traversalMethodWrite =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "write"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorAddAll :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorAddAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addAll"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorAnd :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorAnd =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorAssign :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorAssign =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "assign"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorDiv :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorDiv =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "div"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorMax :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorMax =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "max"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorMin :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorMin =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "min"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorMinus :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorMinus =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "minus"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorMult :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorMult =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mult"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorOr :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorOr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorSum :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorSum =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sum"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOperatorSumLong :: Phantoms.TTerm Gremlin.TraversalOperator
-traversalOperatorSumLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sumLong"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOrderArgumentValue :: Phantoms.TTerm Gremlin.TraversalOrder -> Phantoms.TTerm Gremlin.TraversalOrderArgument
-traversalOrderArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrderArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalOrderArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalOrderArgument
-traversalOrderArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrderArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalOrderAsc :: Phantoms.TTerm Gremlin.TraversalOrder
-traversalOrderAsc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "asc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOrderDecr :: Phantoms.TTerm Gremlin.TraversalOrder
-traversalOrderDecr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOrderDesc :: Phantoms.TTerm Gremlin.TraversalOrder
-traversalOrderDesc =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "desc"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOrderIncr :: Phantoms.TTerm Gremlin.TraversalOrder
-traversalOrderIncr =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "incr"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalOrderShuffle :: Phantoms.TTerm Gremlin.TraversalOrder
-traversalOrderShuffle =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shuffle"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPickAny :: Phantoms.TTerm Gremlin.TraversalPick
-traversalPickAny =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPick"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "any"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPickNone :: Phantoms.TTerm Gremlin.TraversalPick
-traversalPickNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPick"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPopAll :: Phantoms.TTerm Gremlin.TraversalPop
-traversalPopAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPop"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPopArgumentAndNestedTraversal :: Phantoms.TTerm Gremlin.TraversalPopArgument -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal
-traversalPopArgumentAndNestedTraversal pop traversal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pop"),
-          Core.fieldTerm = (Phantoms.unTTerm pop)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal)}]}))
-
-traversalPopArgumentAndNestedTraversalPop :: Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalPopArgument
-traversalPopArgumentAndNestedTraversalPop x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "pop")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalPopArgumentAndNestedTraversalTraversal :: Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-traversalPopArgumentAndNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-        Core.projectionField = (Core.Name "traversal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalPopArgumentAndNestedTraversalWithPop :: Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalPopArgument -> Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal
-traversalPopArgumentAndNestedTraversalWithPop original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pop"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "traversal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalPopArgumentAndNestedTraversalWithTraversal :: Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalPopArgumentAndNestedTraversal
-traversalPopArgumentAndNestedTraversalWithTraversal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "pop"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"),
-              Core.projectionField = (Core.Name "pop")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalPopArgumentValue :: Phantoms.TTerm Gremlin.TraversalPop -> Phantoms.TTerm Gremlin.TraversalPopArgument
-traversalPopArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPopArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalPopArgument
-traversalPopArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPopFirst :: Phantoms.TTerm Gremlin.TraversalPop
-traversalPopFirst =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPop"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "first"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPopLast :: Phantoms.TTerm Gremlin.TraversalPop
-traversalPopLast =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPop"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "last"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPopMixed :: Phantoms.TTerm Gremlin.TraversalPop
-traversalPopMixed =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPop"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mixed"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalPredicateAnd :: Phantoms.TTerm Gremlin.TwoTraversalPredicates -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateAnd x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "and"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateAndNestedTraversal :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal
-traversalPredicateAndNestedTraversal predicate traversal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm traversal)}]}))
-
-traversalPredicateAndNestedTraversalPredicate :: Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateAndNestedTraversalPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalPredicateAndNestedTraversalTraversal :: Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal
-traversalPredicateAndNestedTraversalTraversal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-        Core.projectionField = (Core.Name "traversal")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalPredicateAndNestedTraversalWithPredicate :: Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal
-traversalPredicateAndNestedTraversalWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-              Core.projectionField = (Core.Name "traversal")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalPredicateAndNestedTraversalWithTraversal :: Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal -> Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.TraversalPredicateAndNestedTraversal
-traversalPredicateAndNestedTraversalWithTraversal original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "traversal"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalPredicateBetween :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateBetween x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "between"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateContaining :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateContaining x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "containing"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateEndingWith :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateEndingWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "endingWith"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateEq :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateEq x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "eq"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateGt :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateGt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateGte :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateGte x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gte"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateInside :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateInside x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inside"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateLt :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateLt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lt"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateLte :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateLte x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lte"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNegate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNegate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNeq :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNeq x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "neq"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNot :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNot x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "not"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNotContaining :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNotContaining x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notContaining"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNotEndingWith :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNotEndingWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notEndingWith"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNotRegex :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNotRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notRegex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateNotStartingWith :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateNotStartingWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "notStartingWith"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateOr :: Phantoms.TTerm Gremlin.TwoTraversalPredicates -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateOr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "or"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateOrGenericLiteralArgumentLiteral :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalPredicateOrGenericLiteralArgument
-traversalPredicateOrGenericLiteralArgumentLiteral x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateOrGenericLiteralArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateOrGenericLiteralArgumentPredicate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicateOrGenericLiteralArgument
-traversalPredicateOrGenericLiteralArgumentPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateOrGenericLiteralArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateOrStringLiteralVarargsPredicate :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicateOrStringLiteralVarargs
-traversalPredicateOrStringLiteralVarargsPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateOrStringLiteralVarargs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateOrStringLiteralVarargsString :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.TraversalPredicateOrStringLiteralVarargs
-traversalPredicateOrStringLiteralVarargsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateOrStringLiteralVarargs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateOutside :: Phantoms.TTerm Gremlin.RangeArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateOutside x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "outside"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateRegex :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateRegex x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "regex"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateStartingWith :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateStartingWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "startingWith"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateWithin :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralArgument) -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateWithin x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "within"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalPredicateWithout :: Phantoms.TTerm (Maybe Gremlin.GenericLiteralArgument) -> Phantoms.TTerm Gremlin.TraversalPredicate
-traversalPredicateWithout x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "without"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSackMethodArgumentOrIntegerArgumentConsumer :: Phantoms.TTerm Gremlin.TraversalSackMethodArgument -> Phantoms.TTerm Gremlin.TraversalSackMethodArgumentOrIntegerArgument
-traversalSackMethodArgumentOrIntegerArgumentConsumer x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSackMethodArgumentOrIntegerArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "consumer"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSackMethodArgumentOrIntegerArgumentInt :: Phantoms.TTerm Gremlin.IntegerArgument -> Phantoms.TTerm Gremlin.TraversalSackMethodArgumentOrIntegerArgument
-traversalSackMethodArgumentOrIntegerArgumentInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSackMethodArgumentOrIntegerArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSackMethodArgumentValue :: Phantoms.TTerm Gremlin.TraversalSackMethodArgument
-traversalSackMethodArgumentValue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSackMethodArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalSackMethodArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalSackMethodArgument
-traversalSackMethodArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSackMethodArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalScopeArgumentValue :: Phantoms.TTerm Gremlin.TraversalScope -> Phantoms.TTerm Gremlin.TraversalScopeArgument
-traversalScopeArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalScopeArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalScopeArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalScopeArgument
-traversalScopeArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalScopeArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalScopeGlobal :: Phantoms.TTerm Gremlin.TraversalScope
-traversalScopeGlobal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalScope"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "global"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalScopeLocal :: Phantoms.TTerm Gremlin.TraversalScope
-traversalScopeLocal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalScope"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "local"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalSelfMethodDiscard :: Phantoms.TTerm Gremlin.TraversalSelfMethod
-traversalSelfMethodDiscard =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "discard"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalSource :: Phantoms.TTerm [Gremlin.TraversalSourceSelfMethod] -> Phantoms.TTerm Gremlin.TraversalSource
-traversalSource x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSource"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-traversalSourceQuery :: Phantoms.TTerm Gremlin.TraversalSource -> Phantoms.TTerm (Maybe Gremlin.TransactionPart) -> Phantoms.TTerm Gremlin.TraversalSourceQuery
-traversalSourceQuery source transactionPart =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm source)},
-        Core.Field {
-          Core.fieldName = (Core.Name "transactionPart"),
-          Core.fieldTerm = (Phantoms.unTTerm transactionPart)}]}))
-
-traversalSourceQuerySource :: Phantoms.TTerm Gremlin.TraversalSourceQuery -> Phantoms.TTerm Gremlin.TraversalSource
-traversalSourceQuerySource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-        Core.projectionField = (Core.Name "source")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalSourceQueryTransactionPart :: Phantoms.TTerm Gremlin.TraversalSourceQuery -> Phantoms.TTerm (Maybe Gremlin.TransactionPart)
-traversalSourceQueryTransactionPart x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-        Core.projectionField = (Core.Name "transactionPart")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalSourceQueryWithSource :: Phantoms.TTerm Gremlin.TraversalSourceQuery -> Phantoms.TTerm Gremlin.TraversalSource -> Phantoms.TTerm Gremlin.TraversalSourceQuery
-traversalSourceQueryWithSource original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "transactionPart"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-              Core.projectionField = (Core.Name "transactionPart")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalSourceQueryWithTransactionPart :: Phantoms.TTerm Gremlin.TraversalSourceQuery -> Phantoms.TTerm (Maybe Gremlin.TransactionPart) -> Phantoms.TTerm Gremlin.TraversalSourceQuery
-traversalSourceQueryWithTransactionPart original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"),
-              Core.projectionField = (Core.Name "source")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "transactionPart"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalSourceSelfMethodWith :: Phantoms.TTerm Gremlin.StringArgumentAndOptionalGenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWith x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "with"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSelfMethodWithBulk :: Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWithBulk x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withBulk"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSelfMethodWithPath :: Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWithPath =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withPath"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalSourceSelfMethodWithSack :: Phantoms.TTerm Gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument -> Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWithSack x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withSack"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSelfMethodWithSideEffect :: Phantoms.TTerm Gremlin.StringArgumentAndGenericLiteralArgument -> Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWithSideEffect x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withSideEffect"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSelfMethodWithStrategies :: Phantoms.TTerm [Gremlin.TraversalStrategy] -> Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWithStrategies x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withStrategies"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSelfMethodWithoutStrategies :: Phantoms.TTerm [Gremlin.Identifier] -> Phantoms.TTerm Gremlin.TraversalSourceSelfMethod
-traversalSourceSelfMethodWithoutStrategies x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withoutStrategies"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodAddE :: Phantoms.TTerm Gremlin.StringArgumentOrNestedTraversal -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodAddE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodAddV :: Phantoms.TTerm (Maybe Gremlin.StringArgumentOrNestedTraversal) -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodAddV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "addV"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodCall :: Phantoms.TTerm (Maybe Gremlin.ServiceCall) -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodCall x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "call"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodE :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "e"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodInject :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodInject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inject"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodIo :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodIo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "io"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodMergeE :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodMergeE x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mergeE"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodMergeV :: Phantoms.TTerm Gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodMergeV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mergeV"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodUnion :: Phantoms.TTerm [Gremlin.NestedTraversal] -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodUnion x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalSourceSpawnMethodV :: Phantoms.TTerm [Gremlin.GenericLiteralArgument] -> Phantoms.TTerm Gremlin.TraversalSourceSpawnMethod
-traversalSourceSpawnMethodV x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "v"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalStrategy :: Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm [Gremlin.Configuration] -> Phantoms.TTerm Gremlin.TraversalStrategy
-traversalStrategy new class_ configurations =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm new)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm class_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "configurations"),
-          Core.fieldTerm = (Phantoms.unTTerm configurations)}]}))
-
-traversalStrategyClass :: Phantoms.TTerm Gremlin.TraversalStrategy -> Phantoms.TTerm Gremlin.Identifier
-traversalStrategyClass x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-        Core.projectionField = (Core.Name "class")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalStrategyConfigurations :: Phantoms.TTerm Gremlin.TraversalStrategy -> Phantoms.TTerm [Gremlin.Configuration]
-traversalStrategyConfigurations x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-        Core.projectionField = (Core.Name "configurations")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalStrategyNew :: Phantoms.TTerm Gremlin.TraversalStrategy -> Phantoms.TTerm Bool
-traversalStrategyNew x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-        Core.projectionField = (Core.Name "new")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-traversalStrategyWithClass :: Phantoms.TTerm Gremlin.TraversalStrategy -> Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalStrategy
-traversalStrategyWithClass original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "configurations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-              Core.projectionField = (Core.Name "configurations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalStrategyWithConfigurations :: Phantoms.TTerm Gremlin.TraversalStrategy -> Phantoms.TTerm [Gremlin.Configuration] -> Phantoms.TTerm Gremlin.TraversalStrategy
-traversalStrategyWithConfigurations original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-              Core.projectionField = (Core.Name "new")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "configurations"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-traversalStrategyWithNew :: Phantoms.TTerm Gremlin.TraversalStrategy -> Phantoms.TTerm Bool -> Phantoms.TTerm Gremlin.TraversalStrategy
-traversalStrategyWithNew original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "new"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "class"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-              Core.projectionField = (Core.Name "class")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "configurations"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"),
-              Core.projectionField = (Core.Name "configurations")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-traversalTerminalMethodExplain :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodExplain =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "explain"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTerminalMethodHasNext :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodHasNext =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hasNext"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTerminalMethodIterate :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodIterate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "iterate"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTerminalMethodNext :: Phantoms.TTerm (Maybe Gremlin.IntegerLiteral) -> Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodNext x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "next"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalTerminalMethodToBulkSet :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodToBulkSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toBulkSet"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTerminalMethodToList :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodToList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toList"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTerminalMethodToSet :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodToSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "toSet"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTerminalMethodTryNext :: Phantoms.TTerm Gremlin.TraversalTerminalMethod
-traversalTerminalMethodTryNext =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tryNext"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTokenArgumentValue :: Phantoms.TTerm Gremlin.TraversalToken -> Phantoms.TTerm Gremlin.TraversalTokenArgument
-traversalTokenArgumentValue x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTokenArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalTokenArgumentVariable :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm Gremlin.TraversalTokenArgument
-traversalTokenArgumentVariable x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalTokenArgument"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-traversalTokenId :: Phantoms.TTerm Gremlin.TraversalToken
-traversalTokenId =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalToken"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "id"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTokenKey :: Phantoms.TTerm Gremlin.TraversalToken
-traversalTokenKey =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalToken"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "key"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTokenLabel :: Phantoms.TTerm Gremlin.TraversalToken
-traversalTokenLabel =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalToken"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "label"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-traversalTokenValue :: Phantoms.TTerm Gremlin.TraversalToken
-traversalTokenValue =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TraversalToken"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "value"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-twoTraversalPredicates :: Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TwoTraversalPredicates
-twoTraversalPredicates left right =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)}]}))
-
-twoTraversalPredicatesLeft :: Phantoms.TTerm Gremlin.TwoTraversalPredicates -> Phantoms.TTerm Gremlin.TraversalPredicate
-twoTraversalPredicatesLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-twoTraversalPredicatesRight :: Phantoms.TTerm Gremlin.TwoTraversalPredicates -> Phantoms.TTerm Gremlin.TraversalPredicate
-twoTraversalPredicatesRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-twoTraversalPredicatesWithLeft :: Phantoms.TTerm Gremlin.TwoTraversalPredicates -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TwoTraversalPredicates
-twoTraversalPredicatesWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-twoTraversalPredicatesWithRight :: Phantoms.TTerm Gremlin.TwoTraversalPredicates -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.TwoTraversalPredicates
-twoTraversalPredicatesWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-unDateLiteral :: Phantoms.TTerm Gremlin.DateLiteral -> Phantoms.TTerm (Maybe Gremlin.StringArgument)
-unDateLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.DateLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFloatLiteral :: Phantoms.TTerm Gremlin.FloatLiteral -> Phantoms.TTerm Double
-unFloatLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.FloatLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGenericLiteralCollection :: Phantoms.TTerm Gremlin.GenericLiteralCollection -> Phantoms.TTerm [Gremlin.GenericLiteral]
-unGenericLiteralCollection x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralCollection")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGenericLiteralList :: Phantoms.TTerm Gremlin.GenericLiteralList -> Phantoms.TTerm [Gremlin.GenericLiteral]
-unGenericLiteralList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGenericLiteralMap :: Phantoms.TTerm Gremlin.GenericLiteralMap -> Phantoms.TTerm [Gremlin.MapEntry]
-unGenericLiteralMap x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMap")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGenericLiteralSet :: Phantoms.TTerm Gremlin.GenericLiteralSet -> Phantoms.TTerm [Gremlin.GenericLiteral]
-unGenericLiteralSet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.GenericLiteralSet")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIdentifier :: Phantoms.TTerm Gremlin.Identifier -> Phantoms.TTerm String
-unIdentifier x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.Identifier")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIntegerLiteral :: Phantoms.TTerm Gremlin.IntegerLiteral -> Phantoms.TTerm Integer
-unIntegerLiteral x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.IntegerLiteral")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unQueryList :: Phantoms.TTerm Gremlin.QueryList -> Phantoms.TTerm [Gremlin.Query]
-unQueryList x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.QueryList")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTraversalSource :: Phantoms.TTerm Gremlin.TraversalSource -> Phantoms.TTerm [Gremlin.TraversalSourceSelfMethod]
-unTraversalSource x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tinkerpop.gremlin.TraversalSource")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueMapArgsBoolean :: Phantoms.TTerm Gremlin.ValueMapBooleanArgs -> Phantoms.TTerm Gremlin.ValueMapArgs
-valueMapArgsBoolean x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueMapArgsString :: Phantoms.TTerm [Gremlin.StringNullableArgument] -> Phantoms.TTerm Gremlin.ValueMapArgs
-valueMapArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-valueMapBooleanArgs :: Phantoms.TTerm Gremlin.BooleanArgument -> Phantoms.TTerm (Maybe [Gremlin.StringNullableArgument]) -> Phantoms.TTerm Gremlin.ValueMapBooleanArgs
-valueMapBooleanArgs value keys =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm value)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)}]}))
-
-valueMapBooleanArgsKeys :: Phantoms.TTerm Gremlin.ValueMapBooleanArgs -> Phantoms.TTerm (Maybe [Gremlin.StringNullableArgument])
-valueMapBooleanArgsKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueMapBooleanArgsValue :: Phantoms.TTerm Gremlin.ValueMapBooleanArgs -> Phantoms.TTerm Gremlin.BooleanArgument
-valueMapBooleanArgsValue x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-        Core.projectionField = (Core.Name "value")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-valueMapBooleanArgsWithKeys :: Phantoms.TTerm Gremlin.ValueMapBooleanArgs -> Phantoms.TTerm (Maybe [Gremlin.StringNullableArgument]) -> Phantoms.TTerm Gremlin.ValueMapBooleanArgs
-valueMapBooleanArgsWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-              Core.projectionField = (Core.Name "value")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-valueMapBooleanArgsWithValue :: Phantoms.TTerm Gremlin.ValueMapBooleanArgs -> Phantoms.TTerm Gremlin.BooleanArgument -> Phantoms.TTerm Gremlin.ValueMapBooleanArgs
-valueMapBooleanArgsWithValue original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whereArgsPredicate :: Phantoms.TTerm Gremlin.WhereWithPredicateArgs -> Phantoms.TTerm Gremlin.WhereArgs
-whereArgsPredicate x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "predicate"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whereArgsString :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.WhereArgs
-whereArgsString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whereArgsTraversal :: Phantoms.TTerm Gremlin.NestedTraversal -> Phantoms.TTerm Gremlin.WhereArgs
-whereArgsTraversal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereArgs"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "traversal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-whereWithPredicateArgs :: Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.WhereWithPredicateArgs
-whereWithPredicateArgs leftArg predicate =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArg"),
-          Core.fieldTerm = (Phantoms.unTTerm leftArg)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm predicate)}]}))
-
-whereWithPredicateArgsLeftArg :: Phantoms.TTerm Gremlin.WhereWithPredicateArgs -> Phantoms.TTerm (Maybe Gremlin.StringArgument)
-whereWithPredicateArgsLeftArg x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-        Core.projectionField = (Core.Name "leftArg")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whereWithPredicateArgsPredicate :: Phantoms.TTerm Gremlin.WhereWithPredicateArgs -> Phantoms.TTerm Gremlin.TraversalPredicate
-whereWithPredicateArgsPredicate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-        Core.projectionField = (Core.Name "predicate")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-whereWithPredicateArgsWithLeftArg :: Phantoms.TTerm Gremlin.WhereWithPredicateArgs -> Phantoms.TTerm (Maybe Gremlin.StringArgument) -> Phantoms.TTerm Gremlin.WhereWithPredicateArgs
-whereWithPredicateArgsWithLeftArg original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArg"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-              Core.projectionField = (Core.Name "predicate")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-whereWithPredicateArgsWithPredicate :: Phantoms.TTerm Gremlin.WhereWithPredicateArgs -> Phantoms.TTerm Gremlin.TraversalPredicate -> Phantoms.TTerm Gremlin.WhereWithPredicateArgs
-whereWithPredicateArgsWithPredicate original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftArg"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"),
-              Core.projectionField = (Core.Name "leftArg")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-withArgs :: Phantoms.TTerm Gremlin.WithArgsKeys -> Phantoms.TTerm (Maybe Gremlin.WithArgsValues) -> Phantoms.TTerm Gremlin.WithArgs
-withArgs keys values =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm keys)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm values)}]}))
-
-withArgsKeys :: Phantoms.TTerm Gremlin.WithArgs -> Phantoms.TTerm Gremlin.WithArgsKeys
-withArgsKeys x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-        Core.projectionField = (Core.Name "keys")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withArgsKeysString :: Phantoms.TTerm Gremlin.StringArgument -> Phantoms.TTerm Gremlin.WithArgsKeys
-withArgsKeysString x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgsKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withArgsKeysWithOption :: Phantoms.TTerm Gremlin.WithOptionKeys -> Phantoms.TTerm Gremlin.WithArgsKeys
-withArgsKeysWithOption x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgsKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withOption"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withArgsValues :: Phantoms.TTerm Gremlin.WithArgs -> Phantoms.TTerm (Maybe Gremlin.WithArgsValues)
-withArgsValues x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-        Core.projectionField = (Core.Name "values")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-withArgsValuesIo :: Phantoms.TTerm Gremlin.IoOptionsValues -> Phantoms.TTerm Gremlin.WithArgsValues
-withArgsValuesIo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "io"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withArgsValuesObject :: Phantoms.TTerm Gremlin.GenericLiteralArgument -> Phantoms.TTerm Gremlin.WithArgsValues
-withArgsValuesObject x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withArgsValuesWithOptions :: Phantoms.TTerm Gremlin.WithOptionsValues -> Phantoms.TTerm Gremlin.WithArgsValues
-withArgsValuesWithOptions x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withOptions"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withArgsWithKeys :: Phantoms.TTerm Gremlin.WithArgs -> Phantoms.TTerm Gremlin.WithArgsKeys -> Phantoms.TTerm Gremlin.WithArgs
-withArgsWithKeys original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-              Core.projectionField = (Core.Name "values")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-withArgsWithValues :: Phantoms.TTerm Gremlin.WithArgs -> Phantoms.TTerm (Maybe Gremlin.WithArgsValues) -> Phantoms.TTerm Gremlin.WithArgs
-withArgsWithValues original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithArgs"),
-              Core.projectionField = (Core.Name "keys")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-withOptionKeysConnectedComponent :: Phantoms.TTerm Gremlin.ConnectedComponentConstants -> Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysConnectedComponent x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "connectedComponent"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withOptionKeysIo :: Phantoms.TTerm Gremlin.IoOptionsKeys -> Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysIo x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "io"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withOptionKeysPageRank :: Phantoms.TTerm Gremlin.PageRankConstants -> Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysPageRank x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pageRank"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withOptionKeysPeerPressure :: Phantoms.TTerm Gremlin.PeerPressureConstants -> Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysPeerPressure x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "peerPressure"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withOptionKeysShortestPath :: Phantoms.TTerm Gremlin.ShortestPathConstants -> Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysShortestPath x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "shortestPath"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-withOptionKeysWithOptionsIndexer :: Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysWithOptionsIndexer =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withOptionsIndexer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionKeysWithOptionsTokens :: Phantoms.TTerm Gremlin.WithOptionKeys
-withOptionKeysWithOptionsTokens =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "withOptionsTokens"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesAll :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesAll =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "all"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesIds :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesIds =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ids"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesKeys :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesKeys =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "keys"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesLabels :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesLabels =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "labels"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesList :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesMap :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesMap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesNone :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesNone =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "none"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesTokens :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesTokens =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tokens"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-withOptionsValuesValues :: Phantoms.TTerm Gremlin.WithOptionsValues
-withOptionsValuesValues =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "values"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Topology.hs b/src/main/haskell/Hydra/Dsl/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Topology.hs
+++ /dev/null
@@ -1,389 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.topology
-
-module Hydra.Dsl.Topology where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Topology as Topology
-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
-orderingIsomorphism :: Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm (Topology.OrderingIsomorphism a)
-orderingIsomorphism encode decode =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm encode)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))
-orderingIsomorphismDecode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a])
-orderingIsomorphismDecode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-        Core.projectionField = (Core.Name "decode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-orderingIsomorphismEncode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a])
-orderingIsomorphismEncode x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-        Core.projectionField = (Core.Name "encode")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-orderingIsomorphismWithDecode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm (Topology.OrderingIsomorphism a)
-orderingIsomorphismWithDecode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-              Core.projectionField = (Core.Name "encode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-orderingIsomorphismWithEncode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm (Topology.OrderingIsomorphism a)
-orderingIsomorphismWithEncode original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),
-              Core.projectionField = (Core.Name "decode")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-tarjanState :: Phantoms.TTerm Int -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm [Topology.Vertex] -> Phantoms.TTerm (S.Set Topology.Vertex) -> Phantoms.TTerm [[Topology.Vertex]] -> Phantoms.TTerm Topology.TarjanState
-tarjanState counter indices lowLinks stack onStack sccs =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Phantoms.unTTerm counter)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Phantoms.unTTerm indices)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Phantoms.unTTerm lowLinks)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Phantoms.unTTerm stack)},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Phantoms.unTTerm onStack)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Phantoms.unTTerm sccs)}]}))
-tarjanStateCounter :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm Int
-tarjanStateCounter x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-        Core.projectionField = (Core.Name "counter")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tarjanStateIndices :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int)
-tarjanStateIndices x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-        Core.projectionField = (Core.Name "indices")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tarjanStateLowLinks :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int)
-tarjanStateLowLinks x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-        Core.projectionField = (Core.Name "lowLinks")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tarjanStateOnStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (S.Set Topology.Vertex)
-tarjanStateOnStack x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-        Core.projectionField = (Core.Name "onStack")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tarjanStateSccs :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [[Topology.Vertex]]
-tarjanStateSccs x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-        Core.projectionField = (Core.Name "sccs")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tarjanStateStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [Topology.Vertex]
-tarjanStateStack x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-        Core.projectionField = (Core.Name "stack")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-tarjanStateWithCounter :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm Int -> Phantoms.TTerm Topology.TarjanState
-tarjanStateWithCounter original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "indices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "lowLinks")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "stack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "onStack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "sccs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-tarjanStateWithIndices :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm Topology.TarjanState
-tarjanStateWithIndices original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "counter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "lowLinks")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "stack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "onStack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "sccs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-tarjanStateWithLowLinks :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm Topology.TarjanState
-tarjanStateWithLowLinks original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "counter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "indices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "stack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "onStack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "sccs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-tarjanStateWithOnStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (S.Set Topology.Vertex) -> Phantoms.TTerm Topology.TarjanState
-tarjanStateWithOnStack original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "counter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "indices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "lowLinks")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "stack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "sccs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-tarjanStateWithSccs :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [[Topology.Vertex]] -> Phantoms.TTerm Topology.TarjanState
-tarjanStateWithSccs original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "counter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "indices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "lowLinks")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "stack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "onStack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-tarjanStateWithStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [Topology.Vertex] -> Phantoms.TTerm Topology.TarjanState
-tarjanStateWithStack original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "counter")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "indices")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "lowLinks")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "onStack")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-              Core.projectionField = (Core.Name "sccs")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/TypeScript/Model.hs b/src/main/haskell/Hydra/Dsl/TypeScript/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/TypeScript/Model.hs
+++ /dev/null
@@ -1,259 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.typeScript.model
-
-module Hydra.Dsl.TypeScript.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.TypeScript.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-functionType :: Phantoms.TTerm [Model.Parameter] -> Phantoms.TTerm Model.Type -> Phantoms.TTerm Model.FunctionType
-functionType parameters range =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm parameters)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm range)}]}))
-
-functionTypeParameters :: Phantoms.TTerm Model.FunctionType -> Phantoms.TTerm [Model.Parameter]
-functionTypeParameters x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-        Core.projectionField = (Core.Name "parameters")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeRange :: Phantoms.TTerm Model.FunctionType -> Phantoms.TTerm Model.Type
-functionTypeRange x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-        Core.projectionField = (Core.Name "range")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-functionTypeWithParameters :: Phantoms.TTerm Model.FunctionType -> Phantoms.TTerm [Model.Parameter] -> Phantoms.TTerm Model.FunctionType
-functionTypeWithParameters original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-              Core.projectionField = (Core.Name "range")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-functionTypeWithRange :: Phantoms.TTerm Model.FunctionType -> Phantoms.TTerm Model.Type -> Phantoms.TTerm Model.FunctionType
-functionTypeWithRange original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameters"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typeScript.model.FunctionType"),
-              Core.projectionField = (Core.Name "parameters")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-parameter :: Phantoms.TTerm String -> Phantoms.TTerm Model.Type -> Phantoms.TTerm Model.Parameter
-parameter name type_ =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))
-
-parameterName :: Phantoms.TTerm Model.Parameter -> Phantoms.TTerm String
-parameterName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterType :: Phantoms.TTerm Model.Parameter -> Phantoms.TTerm Model.Type
-parameterType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-parameterWithName :: Phantoms.TTerm Model.Parameter -> Phantoms.TTerm String -> Phantoms.TTerm Model.Parameter
-parameterWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-parameterWithType :: Phantoms.TTerm Model.Parameter -> Phantoms.TTerm Model.Type -> Phantoms.TTerm Model.Parameter
-parameterWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typeScript.model.Parameter"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-primitiveTypeBigint :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeBigint =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bigint"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeBoolean :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeNull :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeNumber :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeNumber =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "number"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeObject :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeObject =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "object"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeString :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeSymbol :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeSymbol =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "symbol"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-primitiveTypeUndefined :: Phantoms.TTerm Model.PrimitiveType
-primitiveTypeUndefined =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.PrimitiveType"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "undefined"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeArray :: Phantoms.TTerm Model.Type -> Phantoms.TTerm Model.Type
-typeArray x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "array"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeFunction :: Phantoms.TTerm Model.FunctionType -> Phantoms.TTerm Model.Type
-typeFunction x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeNever :: Phantoms.TTerm Model.Type
-typeNever =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "never"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeObjectLiteral :: Phantoms.TTerm Model.Type
-typeObjectLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "objectLiteral"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typePrimitive :: Phantoms.TTerm Model.PrimitiveType -> Phantoms.TTerm Model.Type
-typePrimitive x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "primitive"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeTuple :: Phantoms.TTerm [Model.Type] -> Phantoms.TTerm Model.Type
-typeTuple x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "tuple"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-typeUnknown :: Phantoms.TTerm Model.Type
-typeUnknown =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unknown"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-typeVoid :: Phantoms.TTerm Model.Type
-typeVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.typeScript.model.Type"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Types.hs b/src/main/haskell/Hydra/Dsl/Types.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Types.hs
+++ /dev/null
@@ -1,273 +0,0 @@
--- | A domain-specific language for constructing Hydra types in Haskell.
-module Hydra.Dsl.Types where
-
-import Prelude hiding (maybe, product)
-
-import Hydra.Core
-import Hydra.Dsl.AsType
-import Hydra.Dsl.Meta.Common
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-
-
--- Operators
-
--- | Function type constructor with infix syntax
--- Example: int32 ~> string
--- Use this for more readable function type definitions
-infixr 0 ~>
-(~>) :: (AsType a, AsType b) => a -> b -> Type
-dom ~> cod = function (asType dom) (asType cod)
-
--- | Function type constructor with infix syntax (deprecated, use ~> instead)
--- Example: int32 --> string
-infixr 0 -->
-(-->) :: (AsType a, AsType b) => a -> b -> Type
-dom --> cod = function (asType dom) (asType cod)
-
--- | Type application operator
--- Example: list @@ int32
-(@@) :: (AsType a, AsType b) => a -> b -> Type
-fun @@ arg = apply (asType fun) (asType arg)
-
--- | Field definition operator
--- Example: "name">: string
-infixr 0 >:
-(>:) :: AsType a => String -> a -> FieldType
-name>: typ = field name (asType typ)
-
-
--- | Attach an annotation to a type
--- Example: annot (M.fromList [(Name "min", int32 0), (Name "max", int32 100)]) int32
-annot :: AsType a => M.Map Name Term -> a -> Type
-annot ann typ = TypeAnnotated $ AnnotatedType (asType typ) ann
-
--- | Apply a type to a type argument
--- Example: apply (var "f") int32
-apply :: (AsType a, AsType b) => a -> b -> Type
-apply lhs rhs = TypeApplication (ApplicationType (asType lhs) (asType rhs))
-
--- | Apply a type to multiple type arguments
--- Example: applys (var "Either") [string, int32]
-applys :: AsType a => a -> [Type] -> Type
-applys t ts = L.foldl apply (asType t) ts
-
--- | Arbitrary-precision floating point type
-bigfloat :: Type
-bigfloat = float FloatTypeBigfloat
-
--- | Arbitrary-precision integer type
-bigint :: Type
-bigint = integer IntegerTypeBigint
-
--- | Arbitrary-precision decimal type
-decimal :: Type
-decimal = literal LiteralTypeDecimal
-
--- | Binary data type
-binary :: Type
-binary = literal LiteralTypeBinary
-
--- | Boolean type
-boolean :: Type
-boolean = literal LiteralTypeBoolean
-
--- | Create an either type (a choice between two types)
--- Example: either_ string int32
-either_ :: (AsType a, AsType b) => a -> b -> Type
-either_ left right = TypeEither $ EitherType (asType left) (asType right)
-
--- | Create an enum type with the given variant names (conventionally in camelCase)
--- Example: enum ["red", "green", "blue"]
-enum :: [String] -> Type
-enum names = union $ (`field` unit) <$> names
-
--- | Create a field with the given name and type
--- Example: field "age" int32
-field :: AsType a => String -> a -> FieldType
-field fn t = FieldType (Name fn) (asType t)
-
--- | Create a floating point type with the specified precision
--- Example: float FloatTypeFloat32
-float :: FloatType -> Type
-float = literal . LiteralTypeFloat
-
--- | 32-bit floating point type
-float32 :: Type
-float32 = float FloatTypeFloat32
-
--- | 64-bit floating point type
-float64 :: Type
-float64 = float FloatTypeFloat64
-
--- | Create a universally quantified type (polymorphic type) with a singe variable
--- Example: forAll "a" (var "a" --> var "a")
--- This creates the polymorphic identity function type: ∀a. a -> a
--- Universal quantification introduces type variables that can be used in the body
-forAll :: AsType a => String -> a -> Type
-forAll v body = TypeForall $ ForallType (Name v) (asType body)
-
--- | Universal quantification with multiple variables
--- Example: forAlls ["a", "b"] (var "a" --> var "b")
-forAlls :: AsType a => [String] -> a -> Type
-forAlls vs body = L.foldr forAll (asType body) vs
-
--- | Create a function type
--- Example: function int32 string
-function :: (AsType a, AsType b) => a -> b -> Type
-function dom cod = TypeFunction $ FunctionType (asType dom) (asType cod)
-
--- | Create an n-ary function type
--- Example: functionMany [int32, string, boolean]
-functionMany :: [Type] -> Type
-functionMany ts = L.foldl (\cod dom -> function dom cod) (L.head r) (L.tail r)
-  where
-    r = L.reverse ts
-
--- | 8-bit signed integer type
-int8 :: Type
-int8 = integer IntegerTypeInt8
-
--- | 16-bit signed integer type
-int16 :: Type
-int16 = integer IntegerTypeInt16
-
--- | 32-bit signed integer type
-int32 :: Type
-int32 = integer IntegerTypeInt32
-
--- | 64-bit signed integer type
-int64 :: Type
-int64 = integer IntegerTypeInt64
-
--- | Create an integer type with the specified bit width
--- Example: integer IntegerTypeInt32
-integer :: IntegerType -> Type
-integer = literal . LiteralTypeInteger
-
--- | List type
--- Example: list string
-list :: AsType a => a -> Type
-list = TypeList . asType
-
--- | Literal primitive type
--- Example: literal LiteralTypeString
-literal :: LiteralType -> Type
-literal = TypeLiteral
-
--- | Map/dictionary type with key and value types
--- Example: map string int32
-map :: (AsType a, AsType b) => a -> b -> Type
-map keys vals = TypeMap $ MapType (asType keys) (asType vals)
-
--- | Create a monomorphic type scheme
--- Example: mono int32
-mono :: AsType a => a -> TypeScheme
-mono t = TypeScheme [] (asType t) Nothing
-
--- | Non-negative 32-bit integer type
--- Currently an alias for int32; intended for semantic annotation
--- In future versions, this may include validation constraints
-nonNegativeInt32 :: Type
-nonNegativeInt32 = int32
-
--- | Maybe (nullable) type
--- Example: maybe string
-maybe :: AsType a => a -> Type
-maybe = TypeMaybe . asType
-
--- | Maybe (nullable) type (alias for 'maybe')
--- Example: optional string
-optional :: AsType a => a -> Type
-optional = maybe
-
--- | Create a pair type
--- Example: pair string int32
-pair :: (AsType a, AsType b) => a -> b -> Type
-pair first second = TypePair $ PairType (asType first) (asType second)
-
--- | Create a polymorphic type scheme with explicit type variables
--- Example: poly ["a", "b"] (var "a" --> var "b")
--- This represents a type forall a b. a -> b that can be instantiated with different types
-poly :: AsType a => [String] -> a -> TypeScheme
-poly vs t = TypeScheme (Name <$> vs) (asType t) Nothing
-
--- | Create a polymorphic type scheme with explicit type variables and constraints
--- Example: polyConstrained [("a", [Name "hydra.core.Eq"])] (var "a" --> var "a" --> boolean)
--- This represents a type forall a. (Eq a) => a -> a -> Boolean
-polyConstrained :: AsType a => [(String, [Name])] -> a -> TypeScheme
-polyConstrained vsWithConstraints t = TypeScheme vars (asType t) (Just constraintMap)
-  where
-    vars = Name . fst <$> vsWithConstraints
-    constraintMap = M.fromList
-      [(Name v, TypeVariableMetadata $ S.fromList classes) | (v, classes) <- vsWithConstraints, not (L.null classes)]
-
--- | Create a product type using nested pairs (deprecated: use pair directly)
--- Example: product [string, int32, boolean] creates pair string (pair int32 boolean)
-product :: [Type] -> Type
-product [] = unit
-product [a] = a
-product [a, b] = pair a b
-product (a:rest) = pair a (product rest)
-
--- | Create a record type with the given fields
--- Example: record ["name">: string, "age">: int32]
-record :: [FieldType] -> Type
-record = TypeRecord
-
--- | Set type
--- Example: set string
-set :: AsType a => a -> Type
-set = TypeSet . asType
-
--- | String type
-string :: Type
-string = literal LiteralTypeString
-
--- | 8-bit unsigned integer type
-uint8 :: Type
-uint8 = integer IntegerTypeUint8
-
--- | 16-bit unsigned integer type
-uint16 :: Type
-uint16 = integer IntegerTypeUint16
-
--- | 32-bit unsigned integer type
-uint32 :: Type
-uint32 = integer IntegerTypeUint32
-
--- | 64-bit unsigned integer type
-uint64 :: Type
-uint64 = integer IntegerTypeUint64
-
--- | Unit type (empty record type)
-unit :: Type
-unit = TypeUnit
-
--- | Void type (uninhabited / bottom type)
-void :: Type
-void = TypeVoid
-
--- | Create a union type with the given variants
--- Example: union ["success">: int32, "failure">: string]
--- This creates a tagged union type (sum type with named variants)
--- Similar to sum [int32, string] but with named branches
-union :: [FieldType] -> Type
-union = TypeUnion
-
--- | Create a type variable with the given name
--- Example: variable "a"
-variable :: String -> Type
-variable = TypeVariable . Name
-
--- | Create a type variable with the given name (alias for 'variable')
--- Example: var "a"
-var :: String -> Type
-var = variable
-
--- | Create a wrapped type (newtype) with a provided base type
--- Example: wrap string
-wrap :: AsType a => a -> Type
-wrap = TypeWrap . asType
diff --git a/src/main/haskell/Hydra/Dsl/Typing.hs b/src/main/haskell/Hydra/Dsl/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Typing.hs
+++ /dev/null
@@ -1,792 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.typing
-
-module Hydra.Dsl.Typing where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-functionStructure :: Phantoms.TTerm [Core.Name] -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm Core.Term -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm env -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructure typeParams params bindings body domains codomain environment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm typeParams)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm params)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm bindings)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm body)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Phantoms.unTTerm domains)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Phantoms.unTTerm codomain)},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Phantoms.unTTerm environment)}]}))
-functionStructureBindings :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Binding]
-functionStructureBindings x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "bindings")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureBody :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm Core.Term
-functionStructureBody x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "body")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureCodomain :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm (Maybe Core.Type)
-functionStructureCodomain x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "codomain")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureDomains :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Type]
-functionStructureDomains x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "domains")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureEnvironment :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm env
-functionStructureEnvironment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "environment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name]
-functionStructureParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "params")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureTypeParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name]
-functionStructureTypeParams x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-        Core.projectionField = (Core.Name "typeParams")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-functionStructureWithBindings :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithBindings original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "domains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-functionStructureWithBody :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithBody original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "domains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-functionStructureWithCodomain :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithCodomain original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "domains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-functionStructureWithDomains :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithDomains original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-functionStructureWithEnvironment :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm env -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithEnvironment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "domains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-functionStructureWithParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "typeParams")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "domains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-functionStructureWithTypeParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm (Typing.FunctionStructure env)
-functionStructureWithTypeParams original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "params")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "bindings")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "body")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "domains")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "codomain")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-              Core.projectionField = (Core.Name "environment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-inferenceResult :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm Context.Context -> Phantoms.TTerm Typing.InferenceResult
-inferenceResult term type_ subst classConstraints context =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm term)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm type_)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (Phantoms.unTTerm subst)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Phantoms.unTTerm classConstraints)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm context)}]}))
-inferenceResultClassConstraints :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata)
-inferenceResultClassConstraints x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-        Core.projectionField = (Core.Name "classConstraints")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inferenceResultContext :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Context.Context
-inferenceResultContext x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-        Core.projectionField = (Core.Name "context")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inferenceResultSubst :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Typing.TypeSubst
-inferenceResultSubst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-        Core.projectionField = (Core.Name "subst")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inferenceResultTerm :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Term
-inferenceResultTerm x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-        Core.projectionField = (Core.Name "term")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inferenceResultType :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Type
-inferenceResultType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-        Core.projectionField = (Core.Name "type")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-inferenceResultWithClassConstraints :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm Typing.InferenceResult
-inferenceResultWithClassConstraints original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "subst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-inferenceResultWithContext :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Context.Context -> Phantoms.TTerm Typing.InferenceResult
-inferenceResultWithContext original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "subst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-inferenceResultWithSubst :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm Typing.InferenceResult
-inferenceResultWithSubst original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-inferenceResultWithTerm :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Typing.InferenceResult
-inferenceResultWithTerm original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "type")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "subst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-inferenceResultWithType :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.InferenceResult
-inferenceResultWithType original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "term")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "subst")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "classConstraints")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-              Core.projectionField = (Core.Name "context")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-termSubst :: Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Typing.TermSubst
-termSubst x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TermSubst"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-typeConstraint :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm String -> Phantoms.TTerm Typing.TypeConstraint
-typeConstraint left right comment =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm left)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm right)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm comment)}]}))
-typeConstraintComment :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm String
-typeConstraintComment x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-        Core.projectionField = (Core.Name "comment")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeConstraintLeft :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type
-typeConstraintLeft x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-        Core.projectionField = (Core.Name "left")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeConstraintRight :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type
-typeConstraintRight x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-        Core.projectionField = (Core.Name "right")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-typeConstraintWithComment :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm String -> Phantoms.TTerm Typing.TypeConstraint
-typeConstraintWithComment original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-typeConstraintWithLeft :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.TypeConstraint
-typeConstraintWithLeft original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-              Core.projectionField = (Core.Name "right")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeConstraintWithRight :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.TypeConstraint
-typeConstraintWithRight original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-              Core.projectionField = (Core.Name "left")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-              Core.projectionField = (Core.Name "comment")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-typeSubst :: Phantoms.TTerm (M.Map Core.Name Core.Type) -> Phantoms.TTerm Typing.TypeSubst
-typeSubst x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TypeSubst"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-unTermSubst :: Phantoms.TTerm Typing.TermSubst -> Phantoms.TTerm (M.Map Core.Name Core.Term)
-unTermSubst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typing.TermSubst")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-unTypeSubst :: Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm (M.Map Core.Name Core.Type)
-unTypeSubst x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typing.TypeSubst")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Util.hs b/src/main/haskell/Hydra/Dsl/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Util.hs
+++ /dev/null
@@ -1,72 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.util
-
-module Hydra.Dsl.Util where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-caseConventionCamel :: Phantoms.TTerm Util.CaseConvention
-caseConventionCamel =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "camel"),
-        Core.fieldTerm = Core.TermUnit}}))
-caseConventionLowerSnake :: Phantoms.TTerm Util.CaseConvention
-caseConventionLowerSnake =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lowerSnake"),
-        Core.fieldTerm = Core.TermUnit}}))
-caseConventionPascal :: Phantoms.TTerm Util.CaseConvention
-caseConventionPascal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pascal"),
-        Core.fieldTerm = Core.TermUnit}}))
-caseConventionUpperSnake :: Phantoms.TTerm Util.CaseConvention
-caseConventionUpperSnake =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "upperSnake"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonEqualTo :: Phantoms.TTerm Util.Comparison
-comparisonEqualTo =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "equalTo"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonGreaterThan :: Phantoms.TTerm Util.Comparison
-comparisonGreaterThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "greaterThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-comparisonLessThan :: Phantoms.TTerm Util.Comparison
-comparisonLessThan =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lessThan"),
-        Core.fieldTerm = Core.TermUnit}}))
-precisionArbitrary :: Phantoms.TTerm Util.Precision
-precisionArbitrary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.Precision"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "arbitrary"),
-        Core.fieldTerm = Core.TermUnit}}))
-precisionBits :: Phantoms.TTerm Int -> Phantoms.TTerm Util.Precision
-precisionBits x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.Precision"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bits"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsl/Variants.hs b/src/main/haskell/Hydra/Dsl/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Variants.hs
+++ /dev/null
@@ -1,352 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.variants
-
-module Hydra.Dsl.Variants where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-eliminationVariantRecord :: Phantoms.TTerm Variants.EliminationVariant
-eliminationVariantRecord =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = Core.TermUnit}}))
-eliminationVariantUnion :: Phantoms.TTerm Variants.EliminationVariant
-eliminationVariantUnion =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = Core.TermUnit}}))
-eliminationVariantWrap :: Phantoms.TTerm Variants.EliminationVariant
-eliminationVariantWrap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrap"),
-        Core.fieldTerm = Core.TermUnit}}))
-functionVariantElimination :: Phantoms.TTerm Variants.FunctionVariant
-functionVariantElimination =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "elimination"),
-        Core.fieldTerm = Core.TermUnit}}))
-functionVariantLambda :: Phantoms.TTerm Variants.FunctionVariant
-functionVariantLambda =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalVariantBinary :: Phantoms.TTerm Variants.LiteralVariant
-literalVariantBinary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "binary"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalVariantBoolean :: Phantoms.TTerm Variants.LiteralVariant
-literalVariantBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalVariantDecimal :: Phantoms.TTerm Variants.LiteralVariant
-literalVariantDecimal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalVariantFloat :: Phantoms.TTerm Variants.LiteralVariant
-literalVariantFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalVariantInteger :: Phantoms.TTerm Variants.LiteralVariant
-literalVariantInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = Core.TermUnit}}))
-literalVariantString :: Phantoms.TTerm Variants.LiteralVariant
-literalVariantString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantAnnotated :: Phantoms.TTerm Variants.TermVariant
-termVariantAnnotated =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotated"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantApplication :: Phantoms.TTerm Variants.TermVariant
-termVariantApplication =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantCases :: Phantoms.TTerm Variants.TermVariant
-termVariantCases =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "cases"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantEither :: Phantoms.TTerm Variants.TermVariant
-termVariantEither =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "either"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantInject :: Phantoms.TTerm Variants.TermVariant
-termVariantInject =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "inject"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantLambda :: Phantoms.TTerm Variants.TermVariant
-termVariantLambda =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "lambda"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantLet :: Phantoms.TTerm Variants.TermVariant
-termVariantLet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "let"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantList :: Phantoms.TTerm Variants.TermVariant
-termVariantList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantLiteral :: Phantoms.TTerm Variants.TermVariant
-termVariantLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantMap :: Phantoms.TTerm Variants.TermVariant
-termVariantMap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantMaybe :: Phantoms.TTerm Variants.TermVariant
-termVariantMaybe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybe"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantPair :: Phantoms.TTerm Variants.TermVariant
-termVariantPair =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantProject :: Phantoms.TTerm Variants.TermVariant
-termVariantProject =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "project"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantRecord :: Phantoms.TTerm Variants.TermVariant
-termVariantRecord =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantSet :: Phantoms.TTerm Variants.TermVariant
-termVariantSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantTypeApplication :: Phantoms.TTerm Variants.TermVariant
-termVariantTypeApplication =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeApplication"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantTypeLambda :: Phantoms.TTerm Variants.TermVariant
-termVariantTypeLambda =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "typeLambda"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantUnit :: Phantoms.TTerm Variants.TermVariant
-termVariantUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantUnwrap :: Phantoms.TTerm Variants.TermVariant
-termVariantUnwrap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unwrap"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantVariable :: Phantoms.TTerm Variants.TermVariant
-termVariantVariable =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = Core.TermUnit}}))
-termVariantWrap :: Phantoms.TTerm Variants.TermVariant
-termVariantWrap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrap"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantAnnotated :: Phantoms.TTerm Variants.TypeVariant
-typeVariantAnnotated =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "annotated"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantApplication :: Phantoms.TTerm Variants.TypeVariant
-typeVariantApplication =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "application"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantEither :: Phantoms.TTerm Variants.TypeVariant
-typeVariantEither =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "either"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantForall :: Phantoms.TTerm Variants.TypeVariant
-typeVariantForall =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "forall"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantFunction :: Phantoms.TTerm Variants.TypeVariant
-typeVariantFunction =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "function"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantList :: Phantoms.TTerm Variants.TypeVariant
-typeVariantList =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "list"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantLiteral :: Phantoms.TTerm Variants.TypeVariant
-typeVariantLiteral =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "literal"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantMap :: Phantoms.TTerm Variants.TypeVariant
-typeVariantMap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "map"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantMaybe :: Phantoms.TTerm Variants.TypeVariant
-typeVariantMaybe =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "maybe"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantPair :: Phantoms.TTerm Variants.TypeVariant
-typeVariantPair =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "pair"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantRecord :: Phantoms.TTerm Variants.TypeVariant
-typeVariantRecord =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "record"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantSet :: Phantoms.TTerm Variants.TypeVariant
-typeVariantSet =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "set"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantUnion :: Phantoms.TTerm Variants.TypeVariant
-typeVariantUnion =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "union"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantUnit :: Phantoms.TTerm Variants.TypeVariant
-typeVariantUnit =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unit"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantVariable :: Phantoms.TTerm Variants.TypeVariant
-typeVariantVariable =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "variable"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantVoid :: Phantoms.TTerm Variants.TypeVariant
-typeVariantVoid =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "void"),
-        Core.fieldTerm = Core.TermUnit}}))
-typeVariantWrap :: Phantoms.TTerm Variants.TypeVariant
-typeVariantWrap =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "wrap"),
-        Core.fieldTerm = Core.TermUnit}}))
diff --git a/src/main/haskell/Hydra/Dsl/Workflow.hs b/src/main/haskell/Hydra/Dsl/Workflow.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Workflow.hs
+++ /dev/null
@@ -1,266 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.workflow
-
-module Hydra.Dsl.Workflow where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Workflow as Workflow
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-hydraSchemaSpec :: Phantoms.TTerm [Packaging.Module] -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Workflow.HydraSchemaSpec
-hydraSchemaSpec modules typeName =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm modules)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))
-
-hydraSchemaSpecModules :: Phantoms.TTerm Workflow.HydraSchemaSpec -> Phantoms.TTerm [Packaging.Module]
-hydraSchemaSpecModules x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-        Core.projectionField = (Core.Name "modules")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hydraSchemaSpecTypeName :: Phantoms.TTerm Workflow.HydraSchemaSpec -> Phantoms.TTerm Core.Name
-hydraSchemaSpecTypeName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-        Core.projectionField = (Core.Name "typeName")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-hydraSchemaSpecWithModules :: Phantoms.TTerm Workflow.HydraSchemaSpec -> Phantoms.TTerm [Packaging.Module] -> Phantoms.TTerm Workflow.HydraSchemaSpec
-hydraSchemaSpecWithModules original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-              Core.projectionField = (Core.Name "typeName")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-hydraSchemaSpecWithTypeName :: Phantoms.TTerm Workflow.HydraSchemaSpec -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Workflow.HydraSchemaSpec
-hydraSchemaSpecWithTypeName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.HydraSchemaSpec"),
-              Core.projectionField = (Core.Name "modules")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-schemaSpecFile :: Phantoms.TTerm String -> Phantoms.TTerm Workflow.SchemaSpec
-schemaSpecFile x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.workflow.SchemaSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "file"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaSpecHydra :: Phantoms.TTerm Workflow.HydraSchemaSpec -> Phantoms.TTerm Workflow.SchemaSpec
-schemaSpecHydra x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.workflow.SchemaSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hydra"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-
-schemaSpecProvided :: Phantoms.TTerm Workflow.SchemaSpec
-schemaSpecProvided =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.workflow.SchemaSpec"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "provided"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-transformWorkflow :: Phantoms.TTerm String -> Phantoms.TTerm Workflow.SchemaSpec -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Workflow.TransformWorkflow
-transformWorkflow name schemaSpec srcDir destDir =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm name)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm schemaSpec)},
-        Core.Field {
-          Core.fieldName = (Core.Name "srcDir"),
-          Core.fieldTerm = (Phantoms.unTTerm srcDir)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destDir"),
-          Core.fieldTerm = (Phantoms.unTTerm destDir)}]}))
-
-transformWorkflowDestDir :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm String
-transformWorkflowDestDir x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-        Core.projectionField = (Core.Name "destDir")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-transformWorkflowName :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm String
-transformWorkflowName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-        Core.projectionField = (Core.Name "name")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-transformWorkflowSchemaSpec :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm Workflow.SchemaSpec
-transformWorkflowSchemaSpec x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-        Core.projectionField = (Core.Name "schemaSpec")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-transformWorkflowSrcDir :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm String
-transformWorkflowSrcDir x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-        Core.projectionField = (Core.Name "srcDir")})),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-transformWorkflowWithDestDir :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm String -> Phantoms.TTerm Workflow.TransformWorkflow
-transformWorkflowWithDestDir original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "schemaSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "srcDir"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "srcDir")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destDir"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
-
-transformWorkflowWithName :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm String -> Phantoms.TTerm Workflow.TransformWorkflow
-transformWorkflowWithName original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "schemaSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "srcDir"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "srcDir")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destDir"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "destDir")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-transformWorkflowWithSchemaSpec :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm Workflow.SchemaSpec -> Phantoms.TTerm Workflow.TransformWorkflow
-transformWorkflowWithSchemaSpec original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaSpec"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "srcDir"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "srcDir")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "destDir"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "destDir")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
-
-transformWorkflowWithSrcDir :: Phantoms.TTerm Workflow.TransformWorkflow -> Phantoms.TTerm String -> Phantoms.TTerm Workflow.TransformWorkflow
-transformWorkflowWithSrcDir original newVal =
-    Phantoms.TTerm (Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "name")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "schemaSpec"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "schemaSpec")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))},
-        Core.Field {
-          Core.fieldName = (Core.Name "srcDir"),
-          Core.fieldTerm = (Phantoms.unTTerm newVal)},
-        Core.Field {
-          Core.fieldName = (Core.Name "destDir"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = (Core.Name "hydra.workflow.TransformWorkflow"),
-              Core.projectionField = (Core.Name "destDir")})),
-            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
diff --git a/src/main/haskell/Hydra/Dsl/Xml/Schema.hs b/src/main/haskell/Hydra/Dsl/Xml/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Xml/Schema.hs
+++ /dev/null
@@ -1,904 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | DSL functions for hydra.xml.schema
-
-module Hydra.Dsl.Xml.Schema where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Xml.Schema as Schema
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Int as I
-
-anySimpleType :: Phantoms.TTerm String -> Phantoms.TTerm Schema.AnySimpleType
-anySimpleType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.AnySimpleType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-anyType :: Phantoms.TTerm String -> Phantoms.TTerm Schema.AnyType
-anyType x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.AnyType"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-anyURI :: Phantoms.TTerm String -> Phantoms.TTerm Schema.AnyURI
-anyURI x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.AnyURI"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-base64Binary :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Base64Binary
-base64Binary x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Base64Binary"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-boolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Schema.Boolean
-boolean x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Boolean"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-byte :: Phantoms.TTerm I.Int8 -> Phantoms.TTerm Schema.Byte
-byte x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Byte"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-constrainingFacet :: Phantoms.TTerm () -> Phantoms.TTerm Schema.ConstrainingFacet
-constrainingFacet x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.ConstrainingFacet"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-datatypeAnySimpleType :: Phantoms.TTerm Schema.Datatype
-datatypeAnySimpleType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anySimpleType"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeAnyType :: Phantoms.TTerm Schema.Datatype
-datatypeAnyType =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyType"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeAnyURI :: Phantoms.TTerm Schema.Datatype
-datatypeAnyURI =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "anyURI"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeBase64Binary :: Phantoms.TTerm Schema.Datatype
-datatypeBase64Binary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "base64Binary"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeBoolean :: Phantoms.TTerm Schema.Datatype
-datatypeBoolean =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "boolean"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeByte :: Phantoms.TTerm Schema.Datatype
-datatypeByte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "byte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeDate :: Phantoms.TTerm Schema.Datatype
-datatypeDate =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "date"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeDateTime :: Phantoms.TTerm Schema.Datatype
-datatypeDateTime =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "dateTime"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeDecimal :: Phantoms.TTerm Schema.Datatype
-datatypeDecimal =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeDouble :: Phantoms.TTerm Schema.Datatype
-datatypeDouble =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "double"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeDuration :: Phantoms.TTerm Schema.Datatype
-datatypeDuration =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "duration"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeENTITIES :: Phantoms.TTerm Schema.Datatype
-datatypeENTITIES =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ENTITIES"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeENTITY :: Phantoms.TTerm Schema.Datatype
-datatypeENTITY =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ENTITY"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeFloat :: Phantoms.TTerm Schema.Datatype
-datatypeFloat =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeGDay :: Phantoms.TTerm Schema.Datatype
-datatypeGDay =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gDay"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeGMonth :: Phantoms.TTerm Schema.Datatype
-datatypeGMonth =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gMonth"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeGMonthDay :: Phantoms.TTerm Schema.Datatype
-datatypeGMonthDay =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gMonthDay"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeGYear :: Phantoms.TTerm Schema.Datatype
-datatypeGYear =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gYear"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeGYearMonth :: Phantoms.TTerm Schema.Datatype
-datatypeGYearMonth =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "gYearMonth"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeHexBinary :: Phantoms.TTerm Schema.Datatype
-datatypeHexBinary =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "hexBinary"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeID :: Phantoms.TTerm Schema.Datatype
-datatypeID =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "ID"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeIDREF :: Phantoms.TTerm Schema.Datatype
-datatypeIDREF =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IDREF"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeIDREFS :: Phantoms.TTerm Schema.Datatype
-datatypeIDREFS =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "IDREFS"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeInt :: Phantoms.TTerm Schema.Datatype
-datatypeInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeInteger :: Phantoms.TTerm Schema.Datatype
-datatypeInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "integer"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeLanguage :: Phantoms.TTerm Schema.Datatype
-datatypeLanguage =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "language"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeLong :: Phantoms.TTerm Schema.Datatype
-datatypeLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "long"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeNMTOKEN :: Phantoms.TTerm Schema.Datatype
-datatypeNMTOKEN =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NMTOKEN"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeNOTATION :: Phantoms.TTerm Schema.Datatype
-datatypeNOTATION =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "NOTATION"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeName :: Phantoms.TTerm Schema.Datatype
-datatypeName =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "name"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeNegativeInteger :: Phantoms.TTerm Schema.Datatype
-datatypeNegativeInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "negativeInteger"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeNonNegativeInteger :: Phantoms.TTerm Schema.Datatype
-datatypeNonNegativeInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonNegativeInteger"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeNonPositiveInteger :: Phantoms.TTerm Schema.Datatype
-datatypeNonPositiveInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "nonPositiveInteger"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeNormalizedString :: Phantoms.TTerm Schema.Datatype
-datatypeNormalizedString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "normalizedString"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypePositiveInteger :: Phantoms.TTerm Schema.Datatype
-datatypePositiveInteger =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "positiveInteger"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeQName :: Phantoms.TTerm Schema.Datatype
-datatypeQName =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "qName"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeShort :: Phantoms.TTerm Schema.Datatype
-datatypeShort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "short"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeString :: Phantoms.TTerm Schema.Datatype
-datatypeString =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "string"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeTime :: Phantoms.TTerm Schema.Datatype
-datatypeTime =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "time"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeToken :: Phantoms.TTerm Schema.Datatype
-datatypeToken =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "token"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeUnsignedByte :: Phantoms.TTerm Schema.Datatype
-datatypeUnsignedByte =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedByte"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeUnsignedInt :: Phantoms.TTerm Schema.Datatype
-datatypeUnsignedInt =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedInt"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeUnsignedLong :: Phantoms.TTerm Schema.Datatype
-datatypeUnsignedLong =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedLong"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-datatypeUnsignedShort :: Phantoms.TTerm Schema.Datatype
-datatypeUnsignedShort =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.xml.schema.Datatype"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "unsignedShort"),
-        Core.fieldTerm = Core.TermUnit}}))
-
-date :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Date
-date x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Date"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-dateTime :: Phantoms.TTerm String -> Phantoms.TTerm Schema.DateTime
-dateTime x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.DateTime"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-decimal :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Decimal
-decimal x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Decimal"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-double :: Phantoms.TTerm Double -> Phantoms.TTerm Schema.Double_
-double x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Double"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-duration :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Duration
-duration x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Duration"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-eNTITIES :: Phantoms.TTerm String -> Phantoms.TTerm Schema.ENTITIES
-eNTITIES x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.ENTITIES"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-eNTITY :: Phantoms.TTerm String -> Phantoms.TTerm Schema.ENTITY
-eNTITY x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.ENTITY"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-float :: Phantoms.TTerm Float -> Phantoms.TTerm Schema.Float_
-float x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Float"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-gDay :: Phantoms.TTerm String -> Phantoms.TTerm Schema.GDay
-gDay x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.GDay"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-gMonth :: Phantoms.TTerm String -> Phantoms.TTerm Schema.GMonth
-gMonth x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.GMonth"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-gMonthDay :: Phantoms.TTerm String -> Phantoms.TTerm Schema.GMonthDay
-gMonthDay x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.GMonthDay"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-gYear :: Phantoms.TTerm String -> Phantoms.TTerm Schema.GYear
-gYear x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.GYear"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-gYearMonth :: Phantoms.TTerm String -> Phantoms.TTerm Schema.GYearMonth
-gYearMonth x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.GYearMonth"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-hexBinary :: Phantoms.TTerm String -> Phantoms.TTerm Schema.HexBinary
-hexBinary x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.HexBinary"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iD :: Phantoms.TTerm String -> Phantoms.TTerm Schema.ID
-iD x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.ID"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iDREF :: Phantoms.TTerm String -> Phantoms.TTerm Schema.IDREF
-iDREF x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.IDREF"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-iDREFS :: Phantoms.TTerm String -> Phantoms.TTerm Schema.IDREFS
-iDREFS x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.IDREFS"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-int :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.Int_
-int x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Int"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-integer :: Phantoms.TTerm Integer -> Phantoms.TTerm Schema.Integer_
-integer x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Integer"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-language :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Language
-language x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Language"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-long :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Schema.Long
-long x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Long"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nMTOKEN :: Phantoms.TTerm String -> Phantoms.TTerm Schema.NMTOKEN
-nMTOKEN x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.NMTOKEN"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nOTATION :: Phantoms.TTerm String -> Phantoms.TTerm Schema.NOTATION
-nOTATION x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.NOTATION"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-name :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Name
-name x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Name"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-negativeInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Schema.NegativeInteger
-negativeInteger x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.NegativeInteger"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nonNegativeInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Schema.NonNegativeInteger
-nonNegativeInteger x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.NonNegativeInteger"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-nonPositiveInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Schema.NonPositiveInteger
-nonPositiveInteger x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.NonPositiveInteger"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-normalizedString :: Phantoms.TTerm String -> Phantoms.TTerm Schema.NormalizedString
-normalizedString x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.NormalizedString"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-positiveInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Schema.PositiveInteger
-positiveInteger x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.PositiveInteger"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-qName :: Phantoms.TTerm String -> Phantoms.TTerm Schema.QName
-qName x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.QName"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-short :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Schema.Short
-short x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Short"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-string :: Phantoms.TTerm String -> Phantoms.TTerm Schema.String_
-string x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.String"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-time :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Time
-time x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Time"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-token :: Phantoms.TTerm String -> Phantoms.TTerm Schema.Token
-token x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.Token"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unAnySimpleType :: Phantoms.TTerm Schema.AnySimpleType -> Phantoms.TTerm String
-unAnySimpleType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.AnySimpleType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAnyType :: Phantoms.TTerm Schema.AnyType -> Phantoms.TTerm String
-unAnyType x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.AnyType")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unAnyURI :: Phantoms.TTerm Schema.AnyURI -> Phantoms.TTerm String
-unAnyURI x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.AnyURI")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBase64Binary :: Phantoms.TTerm Schema.Base64Binary -> Phantoms.TTerm String
-unBase64Binary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Base64Binary")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unBoolean :: Phantoms.TTerm Schema.Boolean -> Phantoms.TTerm Bool
-unBoolean x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Boolean")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unByte :: Phantoms.TTerm Schema.Byte -> Phantoms.TTerm I.Int8
-unByte x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Byte")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unConstrainingFacet :: Phantoms.TTerm Schema.ConstrainingFacet -> Phantoms.TTerm ()
-unConstrainingFacet x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.ConstrainingFacet")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDate :: Phantoms.TTerm Schema.Date -> Phantoms.TTerm String
-unDate x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Date")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDateTime :: Phantoms.TTerm Schema.DateTime -> Phantoms.TTerm String
-unDateTime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.DateTime")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDecimal :: Phantoms.TTerm Schema.Decimal -> Phantoms.TTerm String
-unDecimal x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Decimal")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDouble :: Phantoms.TTerm Schema.Double_ -> Phantoms.TTerm Double
-unDouble x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Double")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unDuration :: Phantoms.TTerm Schema.Duration -> Phantoms.TTerm String
-unDuration x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Duration")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unENTITIES :: Phantoms.TTerm Schema.ENTITIES -> Phantoms.TTerm String
-unENTITIES x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.ENTITIES")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unENTITY :: Phantoms.TTerm Schema.ENTITY -> Phantoms.TTerm String
-unENTITY x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.ENTITY")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unFloat :: Phantoms.TTerm Schema.Float_ -> Phantoms.TTerm Float
-unFloat x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Float")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGDay :: Phantoms.TTerm Schema.GDay -> Phantoms.TTerm String
-unGDay x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.GDay")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGMonth :: Phantoms.TTerm Schema.GMonth -> Phantoms.TTerm String
-unGMonth x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.GMonth")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGMonthDay :: Phantoms.TTerm Schema.GMonthDay -> Phantoms.TTerm String
-unGMonthDay x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.GMonthDay")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGYear :: Phantoms.TTerm Schema.GYear -> Phantoms.TTerm String
-unGYear x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.GYear")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unGYearMonth :: Phantoms.TTerm Schema.GYearMonth -> Phantoms.TTerm String
-unGYearMonth x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.GYearMonth")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unHexBinary :: Phantoms.TTerm Schema.HexBinary -> Phantoms.TTerm String
-unHexBinary x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.HexBinary")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unID :: Phantoms.TTerm Schema.ID -> Phantoms.TTerm String
-unID x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.ID")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIDREF :: Phantoms.TTerm Schema.IDREF -> Phantoms.TTerm String
-unIDREF x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.IDREF")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unIDREFS :: Phantoms.TTerm Schema.IDREFS -> Phantoms.TTerm String
-unIDREFS x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.IDREFS")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInt :: Phantoms.TTerm Schema.Int_ -> Phantoms.TTerm Int
-unInt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Int")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unInteger :: Phantoms.TTerm Schema.Integer_ -> Phantoms.TTerm Integer
-unInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Integer")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLanguage :: Phantoms.TTerm Schema.Language -> Phantoms.TTerm String
-unLanguage x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Language")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unLong :: Phantoms.TTerm Schema.Long -> Phantoms.TTerm I.Int64
-unLong x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Long")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNMTOKEN :: Phantoms.TTerm Schema.NMTOKEN -> Phantoms.TTerm String
-unNMTOKEN x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.NMTOKEN")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNOTATION :: Phantoms.TTerm Schema.NOTATION -> Phantoms.TTerm String
-unNOTATION x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.NOTATION")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unName :: Phantoms.TTerm Schema.Name -> Phantoms.TTerm String
-unName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Name")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNegativeInteger :: Phantoms.TTerm Schema.NegativeInteger -> Phantoms.TTerm Integer
-unNegativeInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.NegativeInteger")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNonNegativeInteger :: Phantoms.TTerm Schema.NonNegativeInteger -> Phantoms.TTerm Integer
-unNonNegativeInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.NonNegativeInteger")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNonPositiveInteger :: Phantoms.TTerm Schema.NonPositiveInteger -> Phantoms.TTerm Integer
-unNonPositiveInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.NonPositiveInteger")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unNormalizedString :: Phantoms.TTerm Schema.NormalizedString -> Phantoms.TTerm String
-unNormalizedString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.NormalizedString")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unPositiveInteger :: Phantoms.TTerm Schema.PositiveInteger -> Phantoms.TTerm Integer
-unPositiveInteger x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.PositiveInteger")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unQName :: Phantoms.TTerm Schema.QName -> Phantoms.TTerm String
-unQName x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.QName")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unShort :: Phantoms.TTerm Schema.Short -> Phantoms.TTerm I.Int16
-unShort x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Short")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unString :: Phantoms.TTerm Schema.String_ -> Phantoms.TTerm String
-unString x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.String")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unTime :: Phantoms.TTerm Schema.Time -> Phantoms.TTerm String
-unTime x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Time")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unToken :: Phantoms.TTerm Schema.Token -> Phantoms.TTerm String
-unToken x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.Token")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnsignedByte :: Phantoms.TTerm Schema.UnsignedByte -> Phantoms.TTerm I.Int16
-unUnsignedByte x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.UnsignedByte")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnsignedInt :: Phantoms.TTerm Schema.UnsignedInt -> Phantoms.TTerm I.Int64
-unUnsignedInt x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.UnsignedInt")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnsignedLong :: Phantoms.TTerm Schema.UnsignedLong -> Phantoms.TTerm Integer
-unUnsignedLong x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.UnsignedLong")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unUnsignedShort :: Phantoms.TTerm Schema.UnsignedShort -> Phantoms.TTerm Int
-unUnsignedShort x =
-    Phantoms.TTerm (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.xml.schema.UnsignedShort")),
-      Core.applicationArgument = (Phantoms.unTTerm x)}))
-
-unsignedByte :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Schema.UnsignedByte
-unsignedByte x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.UnsignedByte"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unsignedInt :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Schema.UnsignedInt
-unsignedInt x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.UnsignedInt"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unsignedLong :: Phantoms.TTerm Integer -> Phantoms.TTerm Schema.UnsignedLong
-unsignedLong x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.UnsignedLong"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
-
-unsignedShort :: Phantoms.TTerm Int -> Phantoms.TTerm Schema.UnsignedShort
-unsignedShort x =
-    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.xml.schema.UnsignedShort"),
-      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
diff --git a/src/main/haskell/Hydra/Dsl/Yaml/Model.hs b/src/main/haskell/Hydra/Dsl/Yaml/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsl/Yaml/Model.hs
+++ /dev/null
@@ -1,73 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | DSL functions for hydra.yaml.model
-
-module Hydra.Dsl.Yaml.Model where
-import qualified Hydra.Core as Core
-import qualified Hydra.Phantoms as Phantoms
-import qualified Hydra.Yaml.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
-nodeMapping :: Phantoms.TTerm (M.Map Model.Node Model.Node) -> Phantoms.TTerm Model.Node
-nodeMapping x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "mapping"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-nodeScalar :: Phantoms.TTerm Model.Scalar -> Phantoms.TTerm Model.Node
-nodeScalar x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "scalar"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-nodeSequence :: Phantoms.TTerm [Model.Node] -> Phantoms.TTerm Model.Node
-nodeSequence x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Node"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "sequence"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-scalarBool :: Phantoms.TTerm Bool -> Phantoms.TTerm Model.Scalar
-scalarBool x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Scalar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "bool"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-scalarDecimal :: Phantoms.TTerm Sci.Scientific -> Phantoms.TTerm Model.Scalar
-scalarDecimal x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Scalar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "decimal"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-scalarFloat :: Phantoms.TTerm Double -> Phantoms.TTerm Model.Scalar
-scalarFloat x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Scalar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "float"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-scalarInt :: Phantoms.TTerm Integer -> Phantoms.TTerm Model.Scalar
-scalarInt x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Scalar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "int"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
-scalarNull :: Phantoms.TTerm Model.Scalar
-scalarNull =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Scalar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "null"),
-        Core.fieldTerm = Core.TermUnit}}))
-scalarStr :: Phantoms.TTerm String -> Phantoms.TTerm Model.Scalar
-scalarStr x =
-    Phantoms.TTerm (Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.yaml.model.Scalar"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = (Core.Name "str"),
-        Core.fieldTerm = (Phantoms.unTTerm x)}}))
diff --git a/src/main/haskell/Hydra/Dsls.hs b/src/main/haskell/Hydra/Dsls.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Dsls.hs
+++ /dev/null
@@ -1,533 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for generating domain-specific DSL modules from type modules
-
-module Hydra.Dsls where
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Collect forall type variable names from a type
-collectForallVars :: Core.Type -> [Core.Name]
-collectForallVars typ =
-    case typ of
-      Core.TypeAnnotated v0 -> collectForallVars (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (collectForallVars (Core.forallTypeBody v0))
-      _ -> []
--- | Deduplicate bindings by appending underscore suffixes to duplicate names
-deduplicateBindings :: [Core.Binding] -> [Core.Binding]
-deduplicateBindings bindings =
-    Lists.foldl (\acc -> \b ->
-      let n = Core.unName (Core.bindingName b)
-          usedNames = Lists.map (\a -> Core.unName (Core.bindingName a)) acc
-          uniqueName = findUniqueName n usedNames
-      in (Lists.concat2 acc [
-        Core.Binding {
-          Core.bindingName = (Core.Name uniqueName),
-          Core.bindingTerm = (Core.bindingTerm b),
-          Core.bindingTypeScheme = (Core.bindingTypeScheme b)}])) [] bindings
--- | Generate a binding name for a DSL function from a type name
-dslBindingName :: Core.Name -> Core.Name
-dslBindingName n =
-
-      let parts = Strings.splitOn "." (Core.unName n)
-          localPart = Formatting.decapitalize (Names.localNameOf n)
-          localResult = Core.Name localPart
-      in (Maybes.maybe localResult (\nsParts -> Maybes.maybe localResult (\nsHeadTail ->
-        let dslNsParts =
-                Logic.ifElse (Equality.equal (Pairs.first nsHeadTail) "hydra") (Lists.concat2 [
-                  "hydra",
-                  "dsl"] (Pairs.second nsHeadTail)) (Lists.concat2 [
-                  "hydra",
-                  "dsl"] nsParts)
-        in (Core.Name (Strings.intercalate "." (Lists.concat2 dslNsParts [
-          localPart])))) (Lists.uncons nsParts)) (Lists.maybeInit parts))
--- | Generate a qualified DSL element name from a type name and local element name
-dslDefinitionName :: Core.Name -> String -> Core.Name
-dslDefinitionName typeName localName =
-
-      let parts = Strings.splitOn "." (Core.unName typeName)
-      in (Maybes.maybe (Core.Name localName) (\nsParts ->
-        let dslNsParts =
-                Maybes.maybe [
-                  "hydra",
-                  "dsl"] (\nsHeadTail -> Logic.ifElse (Equality.equal (Pairs.first nsHeadTail) "hydra") (Lists.concat2 [
-                  "hydra",
-                  "dsl"] (Pairs.second nsHeadTail)) (Lists.concat2 [
-                  "hydra",
-                  "dsl"] nsParts)) (Lists.uncons nsParts)
-        in (Core.Name (Strings.intercalate "." (Lists.concat2 dslNsParts [
-          localName])))) (Lists.maybeInit parts))
--- | Transform a type module into a DSL module
-dslModule :: t0 -> Graph.Graph -> Packaging.Module -> Either Errors.Error (Maybe Packaging.Module)
-dslModule cx graph mod =
-    Eithers.bind (filterTypeBindings cx graph (Maybes.cat (Lists.map (\d -> case d of
-      Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-        let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-            dataTerm =
-                    Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (EncodeCore.type_ typ),
-                      Core.annotatedTermAnnotation = (Maps.fromList [
-                        (Constants.key_type, schemaTerm)])}))
-        in Core.Binding {
-          Core.bindingName = name,
-          Core.bindingTerm = dataTerm,
-          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-            Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-      _ -> Nothing) (Packaging.moduleDefinitions mod)))) (\typeBindings -> Logic.ifElse (Lists.null typeBindings) (Right Nothing) (Eithers.bind (Eithers.mapList (\b -> Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\x -> x) (generateBindingsForType cx graph b)) typeBindings) (\dslBindings -> Right (Just (Packaging.Module {
-      Packaging.moduleDescription = (Just (Strings.cat [
-        "DSL functions for ",
-        (Packaging.unNamespace (Packaging.moduleNamespace mod))])),
-      Packaging.moduleNamespace = (dslNamespace (Packaging.moduleNamespace mod)),
-      Packaging.moduleTermDependencies = (Lists.nub (Lists.map dslNamespace (Packaging.moduleTypeDependencies mod))),
-      Packaging.moduleTypeDependencies = (Lists.nub (Lists.concat2 [
-        Packaging.moduleNamespace mod,
-        (Packaging.Namespace "hydra.phantoms")] (Packaging.moduleTypeDependencies mod))),
-      Packaging.moduleDefinitions = (Lists.map (\b -> Packaging.DefinitionTerm (Packaging.TermDefinition {
-        Packaging.termDefinitionName = (Core.bindingName b),
-        Packaging.termDefinitionTerm = (Core.bindingTerm b),
-        Packaging.termDefinitionTypeScheme = (Core.bindingTypeScheme b)})) (deduplicateBindings (Lists.concat dslBindings)))})))))
--- | Generate a DSL module namespace from a source module namespace
-dslNamespace :: Packaging.Namespace -> Packaging.Namespace
-dslNamespace ns =
-
-      let parts = Strings.splitOn "." (Packaging.unNamespace ns)
-          prefixFull =
-                  Packaging.Namespace (Strings.cat [
-                    "hydra.dsl.",
-                    (Packaging.unNamespace ns)])
-      in (Maybes.maybe prefixFull (\ht -> Logic.ifElse (Equality.equal (Pairs.first ht) "hydra") (Packaging.Namespace (Strings.cat [
-        "hydra.dsl.",
-        (Strings.intercalate "." (Pairs.second ht))])) prefixFull) (Lists.uncons parts))
--- | Build a TypeScheme with TTerm-wrapped parameter and result types
-dslTypeScheme :: Core.Type -> [Core.Type] -> Core.Type -> Core.TypeScheme
-dslTypeScheme origType paramTypes resultType =
-
-      let typeVars = collectForallVars origType
-          wrappedResult =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = resultType})
-          funType =
-                  Lists.foldr (\paramType -> \acc -> Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                      Core.applicationTypeArgument = paramType})),
-                    Core.functionTypeCodomain = acc})) wrappedResult paramTypes
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = typeVars,
-        Core.typeSchemeBody = funType,
-        Core.typeSchemeConstraints = Nothing}
--- | Filter bindings to only DSL-eligible type definitions
-filterTypeBindings :: t0 -> t1 -> [Core.Binding] -> Either t2 [Core.Binding]
-filterTypeBindings cx graph bindings =
-    Eithers.map Maybes.cat (Eithers.mapList (isDslEligibleBinding cx graph) (Lists.filter Annotations.isNativeType bindings))
--- | Find a unique name by appending underscores
-findUniqueName :: String -> [String] -> String
-findUniqueName candidate usedNames =
-    Logic.ifElse (Lists.null (Lists.filter (Equality.equal candidate) usedNames)) candidate (findUniqueName (Strings.cat [
-      candidate,
-      "_"]) usedNames)
--- | Generate all DSL bindings for a type binding
-generateBindingsForType :: t0 -> Graph.Graph -> Core.Binding -> Either Errors.DecodingError [Core.Binding]
-generateBindingsForType cx graph b =
-
-      let typeName = Core.bindingName b
-      in (Eithers.bind (DecodeCore.type_ graph (Core.bindingTerm b)) (\rawType ->
-        let typ = Strip.deannotateTypeParameters (Strip.deannotateType rawType)
-        in (Right (case typ of
-          Core.TypeRecord v0 -> Lists.concat [
-            generateRecordConstructor rawType typeName v0,
-            (Lists.map (generateRecordAccessor rawType typeName) v0),
-            (Lists.map (generateRecordWithUpdater rawType typeName v0) v0)]
-          Core.TypeUnion v0 -> Lists.map (generateUnionInjector rawType typeName) v0
-          Core.TypeWrap v0 -> generateWrappedTypeAccessors rawType typeName v0
-          _ -> []))))
--- | Generate a record field accessor function
-generateRecordAccessor :: Core.Type -> Core.Name -> Core.FieldType -> Core.Binding
-generateRecordAccessor origType typeName ft =
-
-      let fieldName = Core.fieldTypeName ft
-          accessorLocalName =
-                  Strings.cat [
-                    Formatting.decapitalize (Names.localNameOf typeName),
-                    (Strings.intercalate "" (Lists.map (\s -> Formatting.capitalize s) (Strings.splitOn "." (Core.unName fieldName))))]
-          accessorName = dslDefinitionName typeName accessorLocalName
-          paramDomain =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = (nominalResultType typeName origType)})
-          body =
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just paramDomain),
-                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                      Core.wrappedTermBody = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "application"),
-                          Core.fieldTerm = (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Application"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "function"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "project"),
-                                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "typeName"),
-                                          Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "field"),
-                                          Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName fieldName)))}))}]}))}}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "argument"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))}}))}))})
-          ts = dslTypeScheme origType [
-                nominalResultType typeName origType] (Core.fieldTypeType ft)
-      in Core.Binding {
-        Core.bindingName = accessorName,
-        Core.bindingTerm = body,
-        Core.bindingTypeScheme = (Just ts)}
--- | Generate a record constructor function
-generateRecordConstructor :: Core.Type -> Core.Name -> [Core.FieldType] -> [Core.Binding]
-generateRecordConstructor origType typeName fieldTypes =
-
-      let dFields =
-              Lists.map (\ft -> Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "name"),
-                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "term"),
-                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name (Formatting.decapitalize (Names.localNameOf (Core.fieldTypeName ft)))))}))}]})) fieldTypes
-          recordTerm =
-                  Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                    Core.wrappedTermBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "record"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "fields"),
-                              Core.fieldTerm = (Core.TermList dFields)}]}))}}))})
-          paramPairs =
-                  Lists.map (\ft -> (Formatting.decapitalize (Names.localNameOf (Core.fieldTypeName ft)), (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = (Core.fieldTypeType ft)})))) fieldTypes
-          body =
-                  Lists.foldl (\acc -> \pp -> Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name (Pairs.first pp)),
-                    Core.lambdaDomain = (Just (Pairs.second pp)),
-                    Core.lambdaBody = acc})) recordTerm (Lists.reverse paramPairs)
-          paramTypes = Lists.map (\ft -> Core.fieldTypeType ft) fieldTypes
-          resultType = nominalResultType typeName origType
-          ts = dslTypeScheme origType paramTypes resultType
-      in [
-        Core.Binding {
-          Core.bindingName = (dslBindingName typeName),
-          Core.bindingTerm = body,
-          Core.bindingTypeScheme = (Just ts)}]
--- | Generate a withXxx record field updater function
-generateRecordWithUpdater :: Core.Type -> Core.Name -> [Core.FieldType] -> Core.FieldType -> Core.Binding
-generateRecordWithUpdater origType typeName allFields targetField =
-
-      let targetFieldName = Core.fieldTypeName targetField
-          updaterLocalName =
-                  Strings.cat [
-                    Formatting.decapitalize (Names.localNameOf typeName),
-                    "With",
-                    (Strings.intercalate "" (Lists.map (\s -> Formatting.capitalize s) (Strings.splitOn "." (Core.unName targetFieldName))))]
-          updaterName = dslDefinitionName typeName updaterLocalName
-          dFields =
-                  Lists.map (\ft -> Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "name"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "term"),
-                        Core.fieldTerm = (Logic.ifElse (Equality.equal (Core.unName (Core.fieldTypeName ft)) (Core.unName targetFieldName)) (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "newVal"))})) (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "application"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Application"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "function"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "project"),
-                                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                        Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-                                        Core.recordFields = [
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "typeName"),
-                                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "field"),
-                                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}))}]}))}}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "argument"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "original"))}))}]}))}})))}]})) allFields
-          recDomain =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = (nominalResultType typeName origType)})
-          fieldDomain =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = (Core.fieldTypeType targetField)})
-          body =
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "original"),
-                    Core.lambdaDomain = (Just recDomain),
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "newVal"),
-                      Core.lambdaDomain = (Just fieldDomain),
-                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                        Core.wrappedTermBody = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "typeName"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "fields"),
-                                  Core.fieldTerm = (Core.TermList dFields)}]}))}}))}))}))})
-          recType = nominalResultType typeName origType
-          ts =
-                  dslTypeScheme origType [
-                    recType,
-                    (Core.fieldTypeType targetField)] recType
-      in Core.Binding {
-        Core.bindingName = updaterName,
-        Core.bindingTerm = body,
-        Core.bindingTypeScheme = (Just ts)}
--- | Generate a union injection helper
-generateUnionInjector :: Core.Type -> Core.Name -> Core.FieldType -> Core.Binding
-generateUnionInjector origType typeName ft =
-
-      let fieldName = Core.fieldTypeName ft
-          fieldType = Core.fieldTypeType ft
-          injectorLocalName =
-                  Strings.cat [
-                    Formatting.decapitalize (Names.localNameOf typeName),
-                    (Strings.intercalate "" (Lists.map (\s -> Formatting.capitalize s) (Strings.splitOn "." (Core.unName fieldName))))]
-          injectorName = dslDefinitionName typeName injectorLocalName
-          isUnit =
-                  (\t -> case (Strip.deannotateType t) of
-                    Core.TypeUnit -> True
-                    _ -> False) fieldType
-          dFieldValue =
-                  Logic.ifElse isUnit (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "unit"),
-                      Core.fieldTerm = Core.TermUnit}})) (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))
-          injectionTerm =
-                  Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                    Core.wrappedTermBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName fieldName)))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = dFieldValue}]}))}]}))}}))})
-          variantDomain =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = (Core.fieldTypeType ft)})
-          body =
-                  Logic.ifElse isUnit injectionTerm (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just variantDomain),
-                    Core.lambdaBody = injectionTerm}))
-          unionType = nominalResultType typeName origType
-          ts = Logic.ifElse isUnit (dslTypeScheme origType [] unionType) (dslTypeScheme origType [
-                Core.fieldTypeType ft] unionType)
-      in Core.Binding {
-        Core.bindingName = injectorName,
-        Core.bindingTerm = body,
-        Core.bindingTypeScheme = (Just ts)}
--- | Generate wrap/unwrap accessors for a wrapped type
-generateWrappedTypeAccessors :: Core.Type -> Core.Name -> Core.Type -> [Core.Binding]
-generateWrappedTypeAccessors origType typeName innerType =
-
-      let localName = Names.localNameOf typeName
-          wrapName = dslDefinitionName typeName (Formatting.decapitalize localName)
-          unwrapLocalName =
-                  Strings.cat [
-                    "un",
-                    localName]
-          unwrapName = dslDefinitionName typeName unwrapLocalName
-          wrapperType = nominalResultType typeName origType
-          wrapDomain =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = innerType})
-          wrapBody =
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just wrapDomain),
-                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                      Core.wrappedTermBody = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "wrap"),
-                          Core.fieldTerm = (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "typeName"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "body"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))}}))}))})
-          unwrapDomain =
-                  Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                    Core.applicationTypeArgument = wrapperType})
-          unwrapBody =
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just unwrapDomain),
-                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                      Core.wrappedTermBody = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "application"),
-                          Core.fieldTerm = (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Application"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "function"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "unwrap"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))}}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "argument"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))}}))}))})
-          wrapTs = dslTypeScheme origType [
-                innerType] wrapperType
-          unwrapTs = dslTypeScheme origType [
-                wrapperType] innerType
-      in [
-        Core.Binding {
-          Core.bindingName = wrapName,
-          Core.bindingTerm = wrapBody,
-          Core.bindingTypeScheme = (Just wrapTs)},
-        Core.Binding {
-          Core.bindingName = unwrapName,
-          Core.bindingTerm = unwrapBody,
-          Core.bindingTypeScheme = (Just unwrapTs)}]
--- | Check if a binding is eligible for DSL generation
-isDslEligibleBinding :: t0 -> t1 -> Core.Binding -> Either t2 (Maybe Core.Binding)
-isDslEligibleBinding cx graph b =
-
-      let ns = Names.namespaceOf (Core.bindingName b)
-      in (Logic.ifElse (Equality.equal (Maybes.maybe "" Packaging.unNamespace ns) "hydra.phantoms") (Right Nothing) (Right (Just b)))
--- | Build the nominal result type with type applications for forall variables
-nominalResultType :: Core.Name -> Core.Type -> Core.Type
-nominalResultType typeName origType =
-
-      let vars = collectForallVars origType
-      in (Lists.foldl (\acc -> \v -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = acc,
-        Core.applicationTypeArgument = (Core.TypeVariable v)})) (Core.TypeVariable typeName) vars)
diff --git a/src/main/haskell/Hydra/Encode/Ast.hs b/src/main/haskell/Hydra/Encode/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Ast.hs
+++ /dev/null
@@ -1,215 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.ast
-
-module Hydra.Encode.Ast where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-associativity :: Ast.Associativity -> Core.Term
-associativity x =
-    case x of
-      Ast.AssociativityNone -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = Core.TermUnit}})
-      Ast.AssociativityLeft -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = Core.TermUnit}})
-      Ast.AssociativityRight -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = Core.TermUnit}})
-      Ast.AssociativityBoth -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "both"),
-          Core.fieldTerm = Core.TermUnit}})
-blockStyle :: Ast.BlockStyle -> Core.Term
-blockStyle x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "indent"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) opt)) (Ast.blockStyleIndent x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineBeforeContent"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralBoolean x2)) (Ast.blockStyleNewlineBeforeContent x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "newlineAfterContent"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralBoolean x2)) (Ast.blockStyleNewlineAfterContent x))}]})
-bracketExpr :: Ast.BracketExpr -> Core.Term
-bracketExpr x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "brackets"),
-          Core.fieldTerm = (brackets (Ast.bracketExprBrackets x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "enclosed"),
-          Core.fieldTerm = (expr (Ast.bracketExprEnclosed x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (blockStyle (Ast.bracketExprStyle x))}]})
-brackets :: Ast.Brackets -> Core.Term
-brackets x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "open"),
-          Core.fieldTerm = (symbol (Ast.bracketsOpen x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "close"),
-          Core.fieldTerm = (symbol (Ast.bracketsClose x))}]})
-expr :: Ast.Expr -> Core.Term
-expr x =
-    case x of
-      Ast.ExprConst v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "const"),
-          Core.fieldTerm = (symbol v0)}})
-      Ast.ExprIndent v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "indent"),
-          Core.fieldTerm = (indentedExpression v0)}})
-      Ast.ExprOp v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (opExpr v0)}})
-      Ast.ExprBrackets v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "brackets"),
-          Core.fieldTerm = (bracketExpr v0)}})
-      Ast.ExprSeq v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "seq"),
-          Core.fieldTerm = (seqExpr v0)}})
-indentStyle :: Ast.IndentStyle -> Core.Term
-indentStyle x =
-    case x of
-      Ast.IndentStyleAllLines v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "allLines"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
-      Ast.IndentStyleSubsequentLines v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "subsequentLines"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
-indentedExpression :: Ast.IndentedExpression -> Core.Term
-indentedExpression x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "style"),
-          Core.fieldTerm = (indentStyle (Ast.indentedExpressionStyle x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expr"),
-          Core.fieldTerm = (expr (Ast.indentedExpressionExpr x))}]})
-op :: Ast.Op -> Core.Term
-op x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "symbol"),
-          Core.fieldTerm = (symbol (Ast.opSymbol x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "padding"),
-          Core.fieldTerm = (padding (Ast.opPadding x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "precedence"),
-          Core.fieldTerm = (precedence (Ast.opPrecedence x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "associativity"),
-          Core.fieldTerm = (associativity (Ast.opAssociativity x))}]})
-opExpr :: Ast.OpExpr -> Core.Term
-opExpr x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (op (Ast.opExprOp x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lhs"),
-          Core.fieldTerm = (expr (Ast.opExprLhs x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rhs"),
-          Core.fieldTerm = (expr (Ast.opExprRhs x))}]})
-padding :: Ast.Padding -> Core.Term
-padding x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (ws (Ast.paddingLeft x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (ws (Ast.paddingRight x))}]})
-precedence :: Ast.Precedence -> Core.Term
-precedence x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Precedence"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Ast.unPrecedence x))})
-seqExpr :: Ast.SeqExpr -> Core.Term
-seqExpr x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "op"),
-          Core.fieldTerm = (op (Ast.seqExprOp x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elements"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map expr xs)) (Ast.seqExprElements x))}]})
-symbol :: Ast.Symbol -> Core.Term
-symbol x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Symbol"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Ast.unSymbol x))})
-ws :: Ast.Ws -> Core.Term
-ws x =
-    case x of
-      Ast.WsNone -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "none"),
-          Core.fieldTerm = Core.TermUnit}})
-      Ast.WsSpace -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "space"),
-          Core.fieldTerm = Core.TermUnit}})
-      Ast.WsBreak -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "break"),
-          Core.fieldTerm = Core.TermUnit}})
-      Ast.WsBreakAndIndent v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "breakAndIndent"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
-      Ast.WsDoubleBreak -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "doubleBreak"),
-          Core.fieldTerm = Core.TermUnit}})
diff --git a/src/main/haskell/Hydra/Encode/Classes.hs b/src/main/haskell/Hydra/Encode/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Classes.hs
+++ /dev/null
@@ -1,21 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.classes
-
-module Hydra.Encode.Classes where
-import qualified Hydra.Classes as Classes
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-typeClass :: Classes.TypeClass -> Core.Term
-typeClass x =
-    case x of
-      Classes.TypeClassEquality -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "equality"),
-          Core.fieldTerm = Core.TermUnit}})
-      Classes.TypeClassOrdering -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "ordering"),
-          Core.fieldTerm = Core.TermUnit}})
diff --git a/src/main/haskell/Hydra/Encode/Coders.hs b/src/main/haskell/Hydra/Encode/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Coders.hs
+++ /dev/null
@@ -1,39 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.coders
-
-module Hydra.Encode.Coders where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-coderDirection :: Coders.CoderDirection -> Core.Term
-coderDirection x =
-    case x of
-      Coders.CoderDirectionEncode -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "encode"),
-          Core.fieldTerm = Core.TermUnit}})
-      Coders.CoderDirectionDecode -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "decode"),
-          Core.fieldTerm = Core.TermUnit}})
-languageName :: Coders.LanguageName -> Core.Term
-languageName x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.coders.LanguageName"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Coders.unLanguageName x))})
-traversalOrder :: Coders.TraversalOrder -> Core.Term
-traversalOrder x =
-    case x of
-      Coders.TraversalOrderPre -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pre"),
-          Core.fieldTerm = Core.TermUnit}})
-      Coders.TraversalOrderPost -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "post"),
-          Core.fieldTerm = Core.TermUnit}})
diff --git a/src/main/haskell/Hydra/Encode/Context.hs b/src/main/haskell/Hydra/Encode/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Context.hs
+++ /dev/null
@@ -1,36 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.context
-
-module Hydra.Encode.Context where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-context :: Context.Context -> Core.Term
-context x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.Context"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "trace"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) xs)) (Context.contextTrace x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "messages"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) xs)) (Context.contextMessages x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap EncodeCore.name EncodeCore.term m)) (Context.contextOther x))}]})
-inContext :: (t0 -> Core.Term) -> Context.InContext t0 -> Core.Term
-inContext e x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.context.InContext"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (e (Context.inContextObject x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (context (Context.inContextContext x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Core.hs b/src/main/haskell/Hydra/Encode/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Core.hs
+++ /dev/null
@@ -1,674 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.core
-
-module Hydra.Encode.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-annotatedTerm :: Core.AnnotatedTerm -> Core.Term
-annotatedTerm x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (term (Core.annotatedTermBody x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap name term m)) (Core.annotatedTermAnnotation x))}]})
-annotatedType :: Core.AnnotatedType -> Core.Term
-annotatedType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (type_ (Core.annotatedTypeBody x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "annotation"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap name term m)) (Core.annotatedTypeAnnotation x))}]})
-application :: Core.Application -> Core.Term
-application x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Application"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (term (Core.applicationFunction x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (term (Core.applicationArgument x))}]})
-applicationType :: Core.ApplicationType -> Core.Term
-applicationType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (type_ (Core.applicationTypeFunction x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "argument"),
-          Core.fieldTerm = (type_ (Core.applicationTypeArgument x))}]})
-binding :: Core.Binding -> Core.Term
-binding x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Binding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (name (Core.bindingName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (term (Core.bindingTerm x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map typeScheme opt)) (Core.bindingTypeScheme x))}]})
-caseStatement :: Core.CaseStatement -> Core.Term
-caseStatement x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (name (Core.caseStatementTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "default"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map term opt)) (Core.caseStatementDefault x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map field xs)) (Core.caseStatementCases x))}]})
-eitherType :: Core.EitherType -> Core.Term
-eitherType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (type_ (Core.eitherTypeLeft x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (type_ (Core.eitherTypeRight x))}]})
-field :: Core.Field -> Core.Term
-field x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Field"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (name (Core.fieldName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (term (Core.fieldTerm x))}]})
-fieldType :: Core.FieldType -> Core.Term
-fieldType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (name (Core.fieldTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (type_ (Core.fieldTypeType x))}]})
-floatType :: Core.FloatType -> Core.Term
-floatType x =
-    case x of
-      Core.FloatTypeBigfloat -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "bigfloat"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.FloatTypeFloat32 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float32"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.FloatTypeFloat64 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float64"),
-          Core.fieldTerm = Core.TermUnit}})
-floatValue :: Core.FloatValue -> Core.Term
-floatValue x =
-    case x of
-      Core.FloatValueBigfloat v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "bigfloat"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat v0)))}})
-      Core.FloatValueFloat32 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float32"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 v0)))}})
-      Core.FloatValueFloat64 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float64"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 v0)))}})
-forallType :: Core.ForallType -> Core.Term
-forallType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (name (Core.forallTypeParameter x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (type_ (Core.forallTypeBody x))}]})
-functionType :: Core.FunctionType -> Core.Term
-functionType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (type_ (Core.functionTypeDomain x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = (type_ (Core.functionTypeCodomain x))}]})
-injection :: Core.Injection -> Core.Term
-injection x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (name (Core.injectionTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (field (Core.injectionField x))}]})
-integerType :: Core.IntegerType -> Core.Term
-integerType x =
-    case x of
-      Core.IntegerTypeBigint -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "bigint"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeInt8 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int8"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeInt16 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int16"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeInt32 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int32"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeInt64 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int64"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeUint8 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint8"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeUint16 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint16"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeUint32 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint32"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.IntegerTypeUint64 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint64"),
-          Core.fieldTerm = Core.TermUnit}})
-integerValue :: Core.IntegerValue -> Core.Term
-integerValue x =
-    case x of
-      Core.IntegerValueBigint v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "bigint"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint v0)))}})
-      Core.IntegerValueInt8 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int8"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 v0)))}})
-      Core.IntegerValueInt16 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int16"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 v0)))}})
-      Core.IntegerValueInt32 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int32"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Core.IntegerValueInt64 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "int64"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 v0)))}})
-      Core.IntegerValueUint8 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint8"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 v0)))}})
-      Core.IntegerValueUint16 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint16"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 v0)))}})
-      Core.IntegerValueUint32 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint32"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 v0)))}})
-      Core.IntegerValueUint64 v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "uint64"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 v0)))}})
-lambda :: Core.Lambda -> Core.Term
-lambda x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (name (Core.lambdaParameter x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map type_ opt)) (Core.lambdaDomain x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (term (Core.lambdaBody x))}]})
-let_ :: Core.Let -> Core.Term
-let_ x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Let"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map binding xs)) (Core.letBindings x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (term (Core.letBody x))}]})
-literal :: Core.Literal -> Core.Term
-literal x =
-    case x of
-      Core.LiteralBinary v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "binary"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBinary v0))}})
-      Core.LiteralBoolean v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean v0))}})
-      Core.LiteralDecimal v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "decimal"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralDecimal v0))}})
-      Core.LiteralFloat v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float"),
-          Core.fieldTerm = (floatValue v0)}})
-      Core.LiteralInteger v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (integerValue v0)}})
-      Core.LiteralString v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
-literalType :: Core.LiteralType -> Core.Term
-literalType x =
-    case x of
-      Core.LiteralTypeBinary -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "binary"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.LiteralTypeBoolean -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.LiteralTypeDecimal -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "decimal"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.LiteralTypeFloat v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float"),
-          Core.fieldTerm = (floatType v0)}})
-      Core.LiteralTypeInteger v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = (integerType v0)}})
-      Core.LiteralTypeString -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = Core.TermUnit}})
-mapType :: Core.MapType -> Core.Term
-mapType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.MapType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = (type_ (Core.mapTypeKeys x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "values"),
-          Core.fieldTerm = (type_ (Core.mapTypeValues x))}]})
-name :: Core.Name -> Core.Term
-name x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Core.unName x))})
-pairType :: Core.PairType -> Core.Term
-pairType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.PairType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "first"),
-          Core.fieldTerm = (type_ (Core.pairTypeFirst x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "second"),
-          Core.fieldTerm = (type_ (Core.pairTypeSecond x))}]})
-projection :: Core.Projection -> Core.Term
-projection x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (name (Core.projectionTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = (name (Core.projectionField x))}]})
-record :: Core.Record -> Core.Term
-record x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Record"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (name (Core.recordTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fields"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map field xs)) (Core.recordFields x))}]})
-term :: Core.Term -> Core.Term
-term x =
-    case x of
-      Core.TermAnnotated v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "annotated"),
-          Core.fieldTerm = (annotatedTerm v0)}})
-      Core.TermApplication v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "application"),
-          Core.fieldTerm = (application v0)}})
-      Core.TermCases v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = (caseStatement v0)}})
-      Core.TermEither v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "either"),
-          Core.fieldTerm = (Core.TermEither (Eithers.bimap term term v0))}})
-      Core.TermInject v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "inject"),
-          Core.fieldTerm = (injection v0)}})
-      Core.TermLambda v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lambda"),
-          Core.fieldTerm = (lambda v0)}})
-      Core.TermLet v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "let"),
-          Core.fieldTerm = (let_ v0)}})
-      Core.TermList v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermList (Lists.map term v0))}})
-      Core.TermLiteral v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (literal v0)}})
-      Core.TermMap v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermMap (Maps.bimap term term v0))}})
-      Core.TermMaybe v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybe"),
-          Core.fieldTerm = (Core.TermMaybe (Maybes.map term v0))}})
-      Core.TermPair v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pair"),
-          Core.fieldTerm = (Core.TermPair (Pairs.bimap term term v0))}})
-      Core.TermProject v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "project"),
-          Core.fieldTerm = (projection v0)}})
-      Core.TermRecord v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (record v0)}})
-      Core.TermSet v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermSet (Sets.map term v0))}})
-      Core.TermTypeApplication v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeApplication"),
-          Core.fieldTerm = (typeApplicationTerm v0)}})
-      Core.TermTypeLambda v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeLambda"),
-          Core.fieldTerm = (typeLambda v0)}})
-      Core.TermUnit -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.TermUnwrap v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unwrap"),
-          Core.fieldTerm = (name v0)}})
-      Core.TermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (name v0)}})
-      Core.TermWrap v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrap"),
-          Core.fieldTerm = (wrappedTerm v0)}})
-type_ :: Core.Type -> Core.Term
-type_ x =
-    case x of
-      Core.TypeAnnotated v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "annotated"),
-          Core.fieldTerm = (annotatedType v0)}})
-      Core.TypeApplication v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "application"),
-          Core.fieldTerm = (applicationType v0)}})
-      Core.TypeEither v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "either"),
-          Core.fieldTerm = (eitherType v0)}})
-      Core.TypeForall v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "forall"),
-          Core.fieldTerm = (forallType v0)}})
-      Core.TypeFunction v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = (functionType v0)}})
-      Core.TypeList v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (type_ v0)}})
-      Core.TypeLiteral v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = (literalType v0)}})
-      Core.TypeMap v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (mapType v0)}})
-      Core.TypeMaybe v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybe"),
-          Core.fieldTerm = (type_ v0)}})
-      Core.TypePair v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pair"),
-          Core.fieldTerm = (pairType v0)}})
-      Core.TypeRecord v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (Core.TermList (Lists.map fieldType v0))}})
-      Core.TypeSet v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (type_ v0)}})
-      Core.TypeUnion v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = (Core.TermList (Lists.map fieldType v0))}})
-      Core.TypeUnit -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.TypeVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (name v0)}})
-      Core.TypeVoid -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "void"),
-          Core.fieldTerm = Core.TermUnit}})
-      Core.TypeWrap v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrap"),
-          Core.fieldTerm = (type_ v0)}})
-typeApplicationTerm :: Core.TypeApplicationTerm -> Core.Term
-typeApplicationTerm x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (term (Core.typeApplicationTermBody x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (type_ (Core.typeApplicationTermType x))}]})
-typeLambda :: Core.TypeLambda -> Core.Term
-typeLambda x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "parameter"),
-          Core.fieldTerm = (name (Core.typeLambdaParameter x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (term (Core.typeLambdaBody x))}]})
-typeScheme :: Core.TypeScheme -> Core.Term
-typeScheme x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map name xs)) (Core.typeSchemeVariables x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (type_ (Core.typeSchemeBody x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "constraints"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\m -> Core.TermMap (Maps.bimap name typeVariableMetadata m)) opt)) (Core.typeSchemeConstraints x))}]})
-typeVariableMetadata :: Core.TypeVariableMetadata -> Core.Term
-typeVariableMetadata x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "classes"),
-          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map name s)) (Core.typeVariableMetadataClasses x))}]})
-wrappedTerm :: Core.WrappedTerm -> Core.Term
-wrappedTerm x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (name (Core.wrappedTermTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (term (Core.wrappedTermBody x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Error/Checking.hs b/src/main/haskell/Hydra/Encode/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Error/Checking.hs
+++ /dev/null
@@ -1,213 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.error.checking
-
-module Hydra.Encode.Error.Checking where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Encode.Paths as Paths
-import qualified Hydra.Encode.Typing as Typing
-import qualified Hydra.Encode.Variants as Variants
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-checkingError :: Checking.CheckingError -> Core.Term
-checkingError x =
-    case x of
-      Checking.CheckingErrorIncorrectUnification v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "incorrectUnification"),
-          Core.fieldTerm = (incorrectUnificationError v0)}})
-      Checking.CheckingErrorNotAForallType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "notAForallType"),
-          Core.fieldTerm = (notAForallTypeError v0)}})
-      Checking.CheckingErrorNotAFunctionType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "notAFunctionType"),
-          Core.fieldTerm = (notAFunctionTypeError v0)}})
-      Checking.CheckingErrorOther v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (otherCheckingError v0)}})
-      Checking.CheckingErrorTypeArityMismatch v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeArityMismatch"),
-          Core.fieldTerm = (typeArityMismatchError v0)}})
-      Checking.CheckingErrorTypeMismatch v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeMismatch"),
-          Core.fieldTerm = (typeMismatchError v0)}})
-      Checking.CheckingErrorUnboundTypeVariables v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unboundTypeVariables"),
-          Core.fieldTerm = (unboundTypeVariablesError v0)}})
-      Checking.CheckingErrorUndefinedTermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTermVariable"),
-          Core.fieldTerm = (undefinedTermVariableCheckingError v0)}})
-      Checking.CheckingErrorUnequalTypes v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unequalTypes"),
-          Core.fieldTerm = (unequalTypesError v0)}})
-      Checking.CheckingErrorUnsupportedTermVariant v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unsupportedTermVariant"),
-          Core.fieldTerm = (unsupportedTermVariantError v0)}})
-      Checking.CheckingErrorUntypedLambda v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "untypedLambda"),
-          Core.fieldTerm = (untypedLambdaError v0)}})
-      Checking.CheckingErrorUntypedLetBinding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "untypedLetBinding"),
-          Core.fieldTerm = (untypedLetBindingError v0)}})
-      Checking.CheckingErrorUntypedTermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "untypedTermVariable"),
-          Core.fieldTerm = (untypedTermVariableCheckingError v0)}})
-incorrectUnificationError :: Checking.IncorrectUnificationError -> Core.Term
-incorrectUnificationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "substitution"),
-          Core.fieldTerm = (Typing.typeSubst (Checking.incorrectUnificationErrorSubstitution x))}]})
-notAForallTypeError :: Checking.NotAForallTypeError -> Core.Term
-notAForallTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.type_ (Checking.notAForallTypeErrorType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.type_ xs)) (Checking.notAForallTypeErrorTypeArguments x))}]})
-notAFunctionTypeError :: Checking.NotAFunctionTypeError -> Core.Term
-notAFunctionTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.type_ (Checking.notAFunctionTypeErrorType x))}]})
-otherCheckingError :: Checking.OtherCheckingError -> Core.Term
-otherCheckingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Paths.subtermPath (Checking.otherCheckingErrorPath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Checking.otherCheckingErrorMessage x))}]})
-typeArityMismatchError :: Checking.TypeArityMismatchError -> Core.Term
-typeArityMismatchError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.type_ (Checking.typeArityMismatchErrorType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedArity"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Checking.typeArityMismatchErrorExpectedArity x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualArity"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Checking.typeArityMismatchErrorActualArity x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeArguments"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.type_ xs)) (Checking.typeArityMismatchErrorTypeArguments x))}]})
-typeMismatchError :: Checking.TypeMismatchError -> Core.Term
-typeMismatchError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedType"),
-          Core.fieldTerm = (EncodeCore.type_ (Checking.typeMismatchErrorExpectedType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (EncodeCore.type_ (Checking.typeMismatchErrorActualType x))}]})
-unboundTypeVariablesError :: Checking.UnboundTypeVariablesError -> Core.Term
-unboundTypeVariablesError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map EncodeCore.name s)) (Checking.unboundTypeVariablesErrorVariables x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.type_ (Checking.unboundTypeVariablesErrorType x))}]})
-undefinedTermVariableCheckingError :: Checking.UndefinedTermVariableCheckingError -> Core.Term
-undefinedTermVariableCheckingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Paths.subtermPath (Checking.undefinedTermVariableCheckingErrorPath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Checking.undefinedTermVariableCheckingErrorName x))}]})
-unequalTypesError :: Checking.UnequalTypesError -> Core.Term
-unequalTypesError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "types"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.type_ xs)) (Checking.unequalTypesErrorTypes x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Checking.unequalTypesErrorDescription x))}]})
-unsupportedTermVariantError :: Checking.UnsupportedTermVariantError -> Core.Term
-unsupportedTermVariantError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "termVariant"),
-          Core.fieldTerm = (Variants.termVariant (Checking.unsupportedTermVariantErrorTermVariant x))}]})
-untypedLambdaError :: t0 -> Core.Term
-untypedLambdaError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLambdaError"),
-      Core.recordFields = []})
-untypedLetBindingError :: Checking.UntypedLetBindingError -> Core.Term
-untypedLetBindingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "binding"),
-          Core.fieldTerm = (EncodeCore.binding (Checking.untypedLetBindingErrorBinding x))}]})
-untypedTermVariableCheckingError :: Checking.UntypedTermVariableCheckingError -> Core.Term
-untypedTermVariableCheckingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Paths.subtermPath (Checking.untypedTermVariableCheckingErrorPath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Checking.untypedTermVariableCheckingErrorName x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Error/Core.hs b/src/main/haskell/Hydra/Encode/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Error/Core.hs
+++ /dev/null
@@ -1,596 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.error.core
-
-module Hydra.Encode.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Encode.Paths as Paths
-import qualified Hydra.Encode.Variants as Variants
-import qualified Hydra.Error.Core as ErrorCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-constantConditionError :: ErrorCore.ConstantConditionError -> Core.Term
-constantConditionError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.constantConditionErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralBoolean x2)) (ErrorCore.constantConditionErrorValue x))}]})
-duplicateBindingError :: ErrorCore.DuplicateBindingError -> Core.Term
-duplicateBindingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.duplicateBindingErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.duplicateBindingErrorName x))}]})
-duplicateFieldError :: ErrorCore.DuplicateFieldError -> Core.Term
-duplicateFieldError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.duplicateFieldErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.duplicateFieldErrorName x))}]})
-duplicateRecordTypeFieldNamesError :: ErrorCore.DuplicateRecordTypeFieldNamesError -> Core.Term
-duplicateRecordTypeFieldNamesError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.duplicateRecordTypeFieldNamesErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.duplicateRecordTypeFieldNamesErrorName x))}]})
-duplicateUnionTypeFieldNamesError :: ErrorCore.DuplicateUnionTypeFieldNamesError -> Core.Term
-duplicateUnionTypeFieldNamesError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.duplicateUnionTypeFieldNamesErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.duplicateUnionTypeFieldNamesErrorName x))}]})
-emptyCaseStatementError :: ErrorCore.EmptyCaseStatementError -> Core.Term
-emptyCaseStatementError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyCaseStatementErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.emptyCaseStatementErrorTypeName x))}]})
-emptyLetBindingsError :: ErrorCore.EmptyLetBindingsError -> Core.Term
-emptyLetBindingsError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyLetBindingsErrorLocation x))}]})
-emptyRecordTypeError :: ErrorCore.EmptyRecordTypeError -> Core.Term
-emptyRecordTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyRecordTypeErrorLocation x))}]})
-emptyTermAnnotationError :: ErrorCore.EmptyTermAnnotationError -> Core.Term
-emptyTermAnnotationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyTermAnnotationErrorLocation x))}]})
-emptyTypeAnnotationError :: ErrorCore.EmptyTypeAnnotationError -> Core.Term
-emptyTypeAnnotationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyTypeAnnotationErrorLocation x))}]})
-emptyTypeNameInTermError :: ErrorCore.EmptyTypeNameInTermError -> Core.Term
-emptyTypeNameInTermError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyTypeNameInTermErrorLocation x))}]})
-emptyUnionTypeError :: ErrorCore.EmptyUnionTypeError -> Core.Term
-emptyUnionTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.emptyUnionTypeErrorLocation x))}]})
-invalidForallParameterNameError :: ErrorCore.InvalidForallParameterNameError -> Core.Term
-invalidForallParameterNameError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.invalidForallParameterNameErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.invalidForallParameterNameErrorName x))}]})
-invalidLambdaParameterNameError :: ErrorCore.InvalidLambdaParameterNameError -> Core.Term
-invalidLambdaParameterNameError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.invalidLambdaParameterNameErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.invalidLambdaParameterNameErrorName x))}]})
-invalidLetBindingNameError :: ErrorCore.InvalidLetBindingNameError -> Core.Term
-invalidLetBindingNameError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.invalidLetBindingNameErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.invalidLetBindingNameErrorName x))}]})
-invalidTermError :: ErrorCore.InvalidTermError -> Core.Term
-invalidTermError x =
-    case x of
-      ErrorCore.InvalidTermErrorConstantCondition v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "constantCondition"),
-          Core.fieldTerm = (constantConditionError v0)}})
-      ErrorCore.InvalidTermErrorDuplicateBinding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "duplicateBinding"),
-          Core.fieldTerm = (duplicateBindingError v0)}})
-      ErrorCore.InvalidTermErrorDuplicateField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "duplicateField"),
-          Core.fieldTerm = (duplicateFieldError v0)}})
-      ErrorCore.InvalidTermErrorEmptyCaseStatement v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyCaseStatement"),
-          Core.fieldTerm = (emptyCaseStatementError v0)}})
-      ErrorCore.InvalidTermErrorEmptyLetBindings v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyLetBindings"),
-          Core.fieldTerm = (emptyLetBindingsError v0)}})
-      ErrorCore.InvalidTermErrorEmptyTermAnnotation v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyTermAnnotation"),
-          Core.fieldTerm = (emptyTermAnnotationError v0)}})
-      ErrorCore.InvalidTermErrorEmptyTypeNameInTerm v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyTypeNameInTerm"),
-          Core.fieldTerm = (emptyTypeNameInTermError v0)}})
-      ErrorCore.InvalidTermErrorInvalidLambdaParameterName v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "invalidLambdaParameterName"),
-          Core.fieldTerm = (invalidLambdaParameterNameError v0)}})
-      ErrorCore.InvalidTermErrorInvalidLetBindingName v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "invalidLetBindingName"),
-          Core.fieldTerm = (invalidLetBindingNameError v0)}})
-      ErrorCore.InvalidTermErrorInvalidTypeLambdaParameterName v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "invalidTypeLambdaParameterName"),
-          Core.fieldTerm = (invalidTypeLambdaParameterNameError v0)}})
-      ErrorCore.InvalidTermErrorNestedTermAnnotation v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "nestedTermAnnotation"),
-          Core.fieldTerm = (nestedTermAnnotationError v0)}})
-      ErrorCore.InvalidTermErrorRedundantWrapUnwrap v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "redundantWrapUnwrap"),
-          Core.fieldTerm = (redundantWrapUnwrapError v0)}})
-      ErrorCore.InvalidTermErrorSelfApplication v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "selfApplication"),
-          Core.fieldTerm = (selfApplicationError v0)}})
-      ErrorCore.InvalidTermErrorTermVariableShadowing v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "termVariableShadowing"),
-          Core.fieldTerm = (termVariableShadowingError v0)}})
-      ErrorCore.InvalidTermErrorTypeVariableShadowingInTypeLambda v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeVariableShadowingInTypeLambda"),
-          Core.fieldTerm = (typeVariableShadowingInTypeLambdaError v0)}})
-      ErrorCore.InvalidTermErrorUndefinedTermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTermVariable"),
-          Core.fieldTerm = (undefinedTermVariableError v0)}})
-      ErrorCore.InvalidTermErrorUndefinedTypeVariableInBindingType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTypeVariableInBindingType"),
-          Core.fieldTerm = (undefinedTypeVariableInBindingTypeError v0)}})
-      ErrorCore.InvalidTermErrorUndefinedTypeVariableInLambdaDomain v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTypeVariableInLambdaDomain"),
-          Core.fieldTerm = (undefinedTypeVariableInLambdaDomainError v0)}})
-      ErrorCore.InvalidTermErrorUndefinedTypeVariableInTypeApplication v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTypeVariableInTypeApplication"),
-          Core.fieldTerm = (undefinedTypeVariableInTypeApplicationError v0)}})
-      ErrorCore.InvalidTermErrorUnknownPrimitiveName v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unknownPrimitiveName"),
-          Core.fieldTerm = (unknownPrimitiveNameError v0)}})
-      ErrorCore.InvalidTermErrorUnnecessaryIdentityApplication v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unnecessaryIdentityApplication"),
-          Core.fieldTerm = (unnecessaryIdentityApplicationError v0)}})
-      ErrorCore.InvalidTermErrorUntypedTermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "untypedTermVariable"),
-          Core.fieldTerm = (untypedTermVariableError v0)}})
-invalidTypeError :: ErrorCore.InvalidTypeError -> Core.Term
-invalidTypeError x =
-    case x of
-      ErrorCore.InvalidTypeErrorDuplicateRecordTypeFieldNames v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "duplicateRecordTypeFieldNames"),
-          Core.fieldTerm = (duplicateRecordTypeFieldNamesError v0)}})
-      ErrorCore.InvalidTypeErrorDuplicateUnionTypeFieldNames v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "duplicateUnionTypeFieldNames"),
-          Core.fieldTerm = (duplicateUnionTypeFieldNamesError v0)}})
-      ErrorCore.InvalidTypeErrorEmptyRecordType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyRecordType"),
-          Core.fieldTerm = (emptyRecordTypeError v0)}})
-      ErrorCore.InvalidTypeErrorEmptyTypeAnnotation v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyTypeAnnotation"),
-          Core.fieldTerm = (emptyTypeAnnotationError v0)}})
-      ErrorCore.InvalidTypeErrorEmptyUnionType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyUnionType"),
-          Core.fieldTerm = (emptyUnionTypeError v0)}})
-      ErrorCore.InvalidTypeErrorInvalidForallParameterName v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "invalidForallParameterName"),
-          Core.fieldTerm = (invalidForallParameterNameError v0)}})
-      ErrorCore.InvalidTypeErrorInvalidTypeSchemeVariableName v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "invalidTypeSchemeVariableName"),
-          Core.fieldTerm = (invalidTypeSchemeVariableNameError v0)}})
-      ErrorCore.InvalidTypeErrorNestedTypeAnnotation v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "nestedTypeAnnotation"),
-          Core.fieldTerm = (nestedTypeAnnotationError v0)}})
-      ErrorCore.InvalidTypeErrorNonComparableMapKeyType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "nonComparableMapKeyType"),
-          Core.fieldTerm = (nonComparableMapKeyTypeError v0)}})
-      ErrorCore.InvalidTypeErrorNonComparableSetElementType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "nonComparableSetElementType"),
-          Core.fieldTerm = (nonComparableSetElementTypeError v0)}})
-      ErrorCore.InvalidTypeErrorSingleVariantUnion v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "singleVariantUnion"),
-          Core.fieldTerm = (singleVariantUnionError v0)}})
-      ErrorCore.InvalidTypeErrorTypeVariableShadowingInForall v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeVariableShadowingInForall"),
-          Core.fieldTerm = (typeVariableShadowingInForallError v0)}})
-      ErrorCore.InvalidTypeErrorUndefinedTypeVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTypeVariable"),
-          Core.fieldTerm = (undefinedTypeVariableError v0)}})
-      ErrorCore.InvalidTypeErrorVoidInNonBottomPosition v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "voidInNonBottomPosition"),
-          Core.fieldTerm = (voidInNonBottomPositionError v0)}})
-invalidTypeLambdaParameterNameError :: ErrorCore.InvalidTypeLambdaParameterNameError -> Core.Term
-invalidTypeLambdaParameterNameError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.invalidTypeLambdaParameterNameErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.invalidTypeLambdaParameterNameErrorName x))}]})
-invalidTypeSchemeVariableNameError :: ErrorCore.InvalidTypeSchemeVariableNameError -> Core.Term
-invalidTypeSchemeVariableNameError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.invalidTypeSchemeVariableNameErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.invalidTypeSchemeVariableNameErrorName x))}]})
-nestedTermAnnotationError :: ErrorCore.NestedTermAnnotationError -> Core.Term
-nestedTermAnnotationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.nestedTermAnnotationErrorLocation x))}]})
-nestedTypeAnnotationError :: ErrorCore.NestedTypeAnnotationError -> Core.Term
-nestedTypeAnnotationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.nestedTypeAnnotationErrorLocation x))}]})
-nonComparableMapKeyTypeError :: ErrorCore.NonComparableMapKeyTypeError -> Core.Term
-nonComparableMapKeyTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.nonComparableMapKeyTypeErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keyType"),
-          Core.fieldTerm = (EncodeCore.type_ (ErrorCore.nonComparableMapKeyTypeErrorKeyType x))}]})
-nonComparableSetElementTypeError :: ErrorCore.NonComparableSetElementTypeError -> Core.Term
-nonComparableSetElementTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.nonComparableSetElementTypeErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "elementType"),
-          Core.fieldTerm = (EncodeCore.type_ (ErrorCore.nonComparableSetElementTypeErrorElementType x))}]})
-redundantWrapUnwrapError :: ErrorCore.RedundantWrapUnwrapError -> Core.Term
-redundantWrapUnwrapError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.redundantWrapUnwrapErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.redundantWrapUnwrapErrorTypeName x))}]})
-selfApplicationError :: ErrorCore.SelfApplicationError -> Core.Term
-selfApplicationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.selfApplicationErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.selfApplicationErrorName x))}]})
-singleVariantUnionError :: ErrorCore.SingleVariantUnionError -> Core.Term
-singleVariantUnionError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.singleVariantUnionErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.singleVariantUnionErrorFieldName x))}]})
-termVariableShadowingError :: ErrorCore.TermVariableShadowingError -> Core.Term
-termVariableShadowingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.termVariableShadowingErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.termVariableShadowingErrorName x))}]})
-typeVariableShadowingInForallError :: ErrorCore.TypeVariableShadowingInForallError -> Core.Term
-typeVariableShadowingInForallError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.typeVariableShadowingInForallErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.typeVariableShadowingInForallErrorName x))}]})
-typeVariableShadowingInTypeLambdaError :: ErrorCore.TypeVariableShadowingInTypeLambdaError -> Core.Term
-typeVariableShadowingInTypeLambdaError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.typeVariableShadowingInTypeLambdaErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.typeVariableShadowingInTypeLambdaErrorName x))}]})
-undefinedFieldError :: ErrorCore.UndefinedFieldError -> Core.Term
-undefinedFieldError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedFieldErrorFieldName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedFieldErrorTypeName x))}]})
-undefinedTermVariableError :: ErrorCore.UndefinedTermVariableError -> Core.Term
-undefinedTermVariableError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.undefinedTermVariableErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedTermVariableErrorName x))}]})
-undefinedTypeVariableError :: ErrorCore.UndefinedTypeVariableError -> Core.Term
-undefinedTypeVariableError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.undefinedTypeVariableErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedTypeVariableErrorName x))}]})
-undefinedTypeVariableInBindingTypeError :: ErrorCore.UndefinedTypeVariableInBindingTypeError -> Core.Term
-undefinedTypeVariableInBindingTypeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.undefinedTypeVariableInBindingTypeErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedTypeVariableInBindingTypeErrorName x))}]})
-undefinedTypeVariableInLambdaDomainError :: ErrorCore.UndefinedTypeVariableInLambdaDomainError -> Core.Term
-undefinedTypeVariableInLambdaDomainError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.undefinedTypeVariableInLambdaDomainErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedTypeVariableInLambdaDomainErrorName x))}]})
-undefinedTypeVariableInTypeApplicationError :: ErrorCore.UndefinedTypeVariableInTypeApplicationError -> Core.Term
-undefinedTypeVariableInTypeApplicationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.undefinedTypeVariableInTypeApplicationErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.undefinedTypeVariableInTypeApplicationErrorName x))}]})
-unexpectedTermVariantError :: ErrorCore.UnexpectedTermVariantError -> Core.Term
-unexpectedTermVariantError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Variants.termVariant (ErrorCore.unexpectedTermVariantErrorExpectedVariant x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualTerm"),
-          Core.fieldTerm = (EncodeCore.term (ErrorCore.unexpectedTermVariantErrorActualTerm x))}]})
-unexpectedTypeVariantError :: ErrorCore.UnexpectedTypeVariantError -> Core.Term
-unexpectedTypeVariantError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expectedVariant"),
-          Core.fieldTerm = (Variants.typeVariant (ErrorCore.unexpectedTypeVariantErrorExpectedVariant x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actualType"),
-          Core.fieldTerm = (EncodeCore.type_ (ErrorCore.unexpectedTypeVariantErrorActualType x))}]})
-unknownPrimitiveNameError :: ErrorCore.UnknownPrimitiveNameError -> Core.Term
-unknownPrimitiveNameError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.unknownPrimitiveNameErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.unknownPrimitiveNameErrorName x))}]})
-unnecessaryIdentityApplicationError :: ErrorCore.UnnecessaryIdentityApplicationError -> Core.Term
-unnecessaryIdentityApplicationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.unnecessaryIdentityApplicationErrorLocation x))}]})
-untypedTermVariableError :: ErrorCore.UntypedTermVariableError -> Core.Term
-untypedTermVariableError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.untypedTermVariableErrorLocation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (ErrorCore.untypedTermVariableErrorName x))}]})
-voidInNonBottomPositionError :: ErrorCore.VoidInNonBottomPositionError -> Core.Term
-voidInNonBottomPositionError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "location"),
-          Core.fieldTerm = (Paths.subtermPath (ErrorCore.voidInNonBottomPositionErrorLocation x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Errors.hs b/src/main/haskell/Hydra/Encode/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Errors.hs
+++ /dev/null
@@ -1,275 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.errors
-
-module Hydra.Encode.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Encode.Error.Checking as Checking
-import qualified Hydra.Encode.Error.Core as ErrorCore
-import qualified Hydra.Encode.Paths as Paths
-import qualified Hydra.Errors as Errors
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-decodingError :: Errors.DecodingError -> Core.Term
-decodingError x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.unDecodingError x))})
-emptyListError :: t0 -> Core.Term
-emptyListError _ = Core.TermUnit
-error :: Errors.Error -> Core.Term
-error x =
-    case x of
-      Errors.ErrorChecking v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "checking"),
-          Core.fieldTerm = (Checking.checkingError v0)}})
-      Errors.ErrorDecoding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "decoding"),
-          Core.fieldTerm = (decodingError v0)}})
-      Errors.ErrorDuplicateBinding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "duplicateBinding"),
-          Core.fieldTerm = (ErrorCore.duplicateBindingError v0)}})
-      Errors.ErrorDuplicateField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "duplicateField"),
-          Core.fieldTerm = (ErrorCore.duplicateFieldError v0)}})
-      Errors.ErrorExtraction v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "extraction"),
-          Core.fieldTerm = (extractionError v0)}})
-      Errors.ErrorInference v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "inference"),
-          Core.fieldTerm = (inferenceError v0)}})
-      Errors.ErrorOther v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (otherError v0)}})
-      Errors.ErrorResolution v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "resolution"),
-          Core.fieldTerm = (resolutionError v0)}})
-      Errors.ErrorUndefinedField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedField"),
-          Core.fieldTerm = (ErrorCore.undefinedFieldError v0)}})
-      Errors.ErrorUndefinedTermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "undefinedTermVariable"),
-          Core.fieldTerm = (ErrorCore.undefinedTermVariableError v0)}})
-      Errors.ErrorUntypedTermVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "untypedTermVariable"),
-          Core.fieldTerm = (ErrorCore.untypedTermVariableError v0)}})
-      Errors.ErrorUnexpectedTermVariant v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unexpectedTermVariant"),
-          Core.fieldTerm = (ErrorCore.unexpectedTermVariantError v0)}})
-      Errors.ErrorUnexpectedTypeVariant v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unexpectedTypeVariant"),
-          Core.fieldTerm = (ErrorCore.unexpectedTypeVariantError v0)}})
-      Errors.ErrorUnification v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unification"),
-          Core.fieldTerm = (unificationError v0)}})
-extractionError :: Errors.ExtractionError -> Core.Term
-extractionError x =
-    case x of
-      Errors.ExtractionErrorEmptyList v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "emptyList"),
-          Core.fieldTerm = (emptyListError v0)}})
-      Errors.ExtractionErrorMultipleBindings v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "multipleBindings"),
-          Core.fieldTerm = (multipleBindingsError v0)}})
-      Errors.ExtractionErrorMultipleFields v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "multipleFields"),
-          Core.fieldTerm = (multipleFieldsError v0)}})
-      Errors.ExtractionErrorNoMatchingField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "noMatchingField"),
-          Core.fieldTerm = (noMatchingFieldError v0)}})
-      Errors.ExtractionErrorNoSuchBinding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "noSuchBinding"),
-          Core.fieldTerm = (noSuchBindingError v0)}})
-      Errors.ExtractionErrorNotEnoughCases v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "notEnoughCases"),
-          Core.fieldTerm = (notEnoughCasesError v0)}})
-      Errors.ExtractionErrorUnexpectedShape v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unexpectedShape"),
-          Core.fieldTerm = (unexpectedShapeError v0)}})
-inferenceError :: Errors.InferenceError -> Core.Term
-inferenceError x =
-    case x of
-      Errors.InferenceErrorChecking v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "checking"),
-          Core.fieldTerm = (Checking.checkingError v0)}})
-      Errors.InferenceErrorOther v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (otherInferenceError v0)}})
-      Errors.InferenceErrorUnification v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unification"),
-          Core.fieldTerm = (unificationInferenceError v0)}})
-multipleBindingsError :: Errors.MultipleBindingsError -> Core.Term
-multipleBindingsError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.MultipleBindingsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Errors.multipleBindingsErrorName x))}]})
-multipleFieldsError :: Errors.MultipleFieldsError -> Core.Term
-multipleFieldsError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.MultipleFieldsError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (EncodeCore.name (Errors.multipleFieldsErrorFieldName x))}]})
-noMatchingFieldError :: Errors.NoMatchingFieldError -> Core.Term
-noMatchingFieldError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoMatchingFieldError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "fieldName"),
-          Core.fieldTerm = (EncodeCore.name (Errors.noMatchingFieldErrorFieldName x))}]})
-noSuchBindingError :: Errors.NoSuchBindingError -> Core.Term
-noSuchBindingError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchBindingError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Errors.noSuchBindingErrorName x))}]})
-noSuchPrimitiveError :: Errors.NoSuchPrimitiveError -> Core.Term
-noSuchPrimitiveError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchPrimitiveError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Errors.noSuchPrimitiveErrorName x))}]})
-notEnoughCasesError :: t0 -> Core.Term
-notEnoughCasesError _ = Core.TermUnit
-otherError :: Errors.OtherError -> Core.Term
-otherError x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherError"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.unOtherError x))})
-otherInferenceError :: Errors.OtherInferenceError -> Core.Term
-otherInferenceError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Paths.subtermPath (Errors.otherInferenceErrorPath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.otherInferenceErrorMessage x))}]})
-otherResolutionError :: Errors.OtherResolutionError -> Core.Term
-otherResolutionError x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherResolutionError"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.unOtherResolutionError x))})
-resolutionError :: Errors.ResolutionError -> Core.Term
-resolutionError x =
-    case x of
-      Errors.ResolutionErrorNoSuchBinding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "noSuchBinding"),
-          Core.fieldTerm = (noSuchBindingError v0)}})
-      Errors.ResolutionErrorNoSuchPrimitive v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "noSuchPrimitive"),
-          Core.fieldTerm = (noSuchPrimitiveError v0)}})
-      Errors.ResolutionErrorNoMatchingField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "noMatchingField"),
-          Core.fieldTerm = (noMatchingFieldError v0)}})
-      Errors.ResolutionErrorOther v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "other"),
-          Core.fieldTerm = (otherResolutionError v0)}})
-      Errors.ResolutionErrorUnexpectedShape v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unexpectedShape"),
-          Core.fieldTerm = (unexpectedShapeError v0)}})
-unexpectedShapeError :: Errors.UnexpectedShapeError -> Core.Term
-unexpectedShapeError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.unexpectedShapeErrorExpected x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.unexpectedShapeErrorActual x))}]})
-unificationError :: Errors.UnificationError -> Core.Term
-unificationError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "leftType"),
-          Core.fieldTerm = (EncodeCore.type_ (Errors.unificationErrorLeftType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "rightType"),
-          Core.fieldTerm = (EncodeCore.type_ (Errors.unificationErrorRightType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Errors.unificationErrorMessage x))}]})
-unificationInferenceError :: Errors.UnificationInferenceError -> Core.Term
-unificationInferenceError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (Paths.subtermPath (Errors.unificationInferenceErrorPath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cause"),
-          Core.fieldTerm = (unificationError (Errors.unificationInferenceErrorCause x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Json/Model.hs b/src/main/haskell/Hydra/Encode/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Json/Model.hs
+++ /dev/null
@@ -1,43 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.json.model
-
-module Hydra.Encode.Json.Model where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-value :: Model.Value -> Core.Term
-value x =
-    case x of
-      Model.ValueArray v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "array"),
-          Core.fieldTerm = (Core.TermList (Lists.map value v0))}})
-      Model.ValueBoolean v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean v0))}})
-      Model.ValueNull -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "null"),
-          Core.fieldTerm = Core.TermUnit}})
-      Model.ValueNumber v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "number"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralDecimal v0))}})
-      Model.ValueObject v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (Core.TermMap (Maps.bimap (\x -> Core.TermLiteral (Core.LiteralString x)) value v0))}})
-      Model.ValueString v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
diff --git a/src/main/haskell/Hydra/Encode/Packaging.hs b/src/main/haskell/Hydra/Encode/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Packaging.hs
+++ /dev/null
@@ -1,125 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.packaging
-
-module Hydra.Encode.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-definition :: Packaging.Definition -> Core.Term
-definition x =
-    case x of
-      Packaging.DefinitionTerm v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.packaging.Definition"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (termDefinition v0)}})
-      Packaging.DefinitionType v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.packaging.Definition"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (typeDefinition v0)}})
-fileExtension :: Packaging.FileExtension -> Core.Term
-fileExtension x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.FileExtension"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Packaging.unFileExtension x))})
-module_ :: Packaging.Module -> Core.Term
-module_ x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) opt)) (Packaging.moduleDescription x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = (namespace (Packaging.moduleNamespace x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "termDependencies"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map namespace xs)) (Packaging.moduleTermDependencies x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeDependencies"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map namespace xs)) (Packaging.moduleTypeDependencies x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "definitions"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map definition xs)) (Packaging.moduleDefinitions x))}]})
-namespace :: Packaging.Namespace -> Core.Term
-namespace x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.Namespace"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Packaging.unNamespace x))})
-namespaces :: (t0 -> Core.Term) -> Packaging.Namespaces t0 -> Core.Term
-namespaces n x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Namespaces"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "focus"),
-          Core.fieldTerm = ((\p -> Core.TermPair (Pairs.bimap namespace n p)) (Packaging.namespacesFocus x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "mapping"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap namespace n m)) (Packaging.namespacesMapping x))}]})
-package :: Packaging.Package -> Core.Term
-package x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (packageName (Packaging.packageName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "modules"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map module_ xs)) (Packaging.packageModules x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "dependencies"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map packageName xs)) (Packaging.packageDependencies x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) opt)) (Packaging.packageDescription x))}]})
-packageName :: Packaging.PackageName -> Core.Term
-packageName x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.PackageName"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Packaging.unPackageName x))})
-qualifiedName :: Packaging.QualifiedName -> Core.Term
-qualifiedName x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "namespace"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map namespace opt)) (Packaging.qualifiedNameNamespace x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "local"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Packaging.qualifiedNameLocal x))}]})
-termDefinition :: Packaging.TermDefinition -> Core.Term
-termDefinition x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Packaging.termDefinitionName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (EncodeCore.term (Packaging.termDefinitionTerm x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map EncodeCore.typeScheme opt)) (Packaging.termDefinitionTypeScheme x))}]})
-typeDefinition :: Packaging.TypeDefinition -> Core.Term
-typeDefinition x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Packaging.typeDefinitionName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "typeScheme"),
-          Core.fieldTerm = (EncodeCore.typeScheme (Packaging.typeDefinitionTypeScheme x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Parsing.hs b/src/main/haskell/Hydra/Encode/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Parsing.hs
+++ /dev/null
@@ -1,43 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.parsing
-
-module Hydra.Encode.Parsing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Parsing as Parsing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-parseError :: Parsing.ParseError -> Core.Term
-parseError x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "message"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Parsing.parseErrorMessage x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Parsing.parseErrorRemainder x))}]})
-parseResult :: (t0 -> Core.Term) -> Parsing.ParseResult t0 -> Core.Term
-parseResult a x =
-    case x of
-      Parsing.ParseResultSuccess v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "success"),
-          Core.fieldTerm = (parseSuccess a v0)}})
-      Parsing.ParseResultFailure v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "failure"),
-          Core.fieldTerm = (parseError v0)}})
-parseSuccess :: (t0 -> Core.Term) -> Parsing.ParseSuccess t0 -> Core.Term
-parseSuccess a x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "value"),
-          Core.fieldTerm = (a (Parsing.parseSuccessValue x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "remainder"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Parsing.parseSuccessRemainder x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Paths.hs b/src/main/haskell/Hydra/Encode/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Paths.hs
+++ /dev/null
@@ -1,294 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.paths
-
-module Hydra.Encode.Paths where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Paths as Paths
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-subtermEdge :: Paths.SubtermEdge -> Core.Term
-subtermEdge x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (subtermNode (Paths.subtermEdgeSource x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (subtermPath (Paths.subtermEdgePath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (subtermNode (Paths.subtermEdgeTarget x))}]})
-subtermGraph :: Paths.SubtermGraph -> Core.Term
-subtermGraph x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map subtermNode xs)) (Paths.subtermGraphNodes x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map subtermEdge xs)) (Paths.subtermGraphEdges x))}]})
-subtermNode :: Paths.SubtermNode -> Core.Term
-subtermNode x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Paths.subtermNodeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Paths.subtermNodeLabel x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Paths.subtermNodeId x))}]})
-subtermPath :: Paths.SubtermPath -> Core.Term
-subtermPath x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtermPath"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map subtermStep xs)) (Paths.unSubtermPath x))})
-subtermStep :: Paths.SubtermStep -> Core.Term
-subtermStep x =
-    case x of
-      Paths.SubtermStepAnnotatedBody -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "annotatedBody"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepApplicationFunction -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "applicationFunction"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepApplicationArgument -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "applicationArgument"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepLambdaBody -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lambdaBody"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepUnionCasesDefault -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unionCasesDefault"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepUnionCasesBranch v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unionCasesBranch"),
-          Core.fieldTerm = (EncodeCore.name v0)}})
-      Paths.SubtermStepLetBody -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "letBody"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepLetBinding v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "letBinding"),
-          Core.fieldTerm = (EncodeCore.name v0)}})
-      Paths.SubtermStepListElement v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "listElement"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Paths.SubtermStepMapKey v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "mapKey"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Paths.SubtermStepMapValue v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "mapValue"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Paths.SubtermStepMaybeTerm -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybeTerm"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepProductTerm v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "productTerm"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Paths.SubtermStepRecordField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "recordField"),
-          Core.fieldTerm = (EncodeCore.name v0)}})
-      Paths.SubtermStepSetElement v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "setElement"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Paths.SubtermStepSumTerm -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "sumTerm"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepTypeLambdaBody -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeLambdaBody"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepTypeApplicationTerm -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeApplicationTerm"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepInjectionTerm -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "injectionTerm"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtermStepWrappedTerm -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrappedTerm"),
-          Core.fieldTerm = Core.TermUnit}})
-subtypeEdge :: Paths.SubtypeEdge -> Core.Term
-subtypeEdge x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "source"),
-          Core.fieldTerm = (subtypeNode (Paths.subtypeEdgeSource x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (subtypePath (Paths.subtypeEdgePath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "target"),
-          Core.fieldTerm = (subtypeNode (Paths.subtypeEdgeTarget x))}]})
-subtypeGraph :: Paths.SubtypeGraph -> Core.Term
-subtypeGraph x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "nodes"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map subtypeNode xs)) (Paths.subtypeGraphNodes x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "edges"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map subtypeEdge xs)) (Paths.subtypeGraphEdges x))}]})
-subtypeNode :: Paths.SubtypeNode -> Core.Term
-subtypeNode x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Paths.subtypeNodeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "label"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Paths.subtypeNodeLabel x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "id"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Paths.subtypeNodeId x))}]})
-subtypePath :: Paths.SubtypePath -> Core.Term
-subtypePath x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtypePath"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map subtypeStep xs)) (Paths.unSubtypePath x))})
-subtypeStep :: Paths.SubtypeStep -> Core.Term
-subtypeStep x =
-    case x of
-      Paths.SubtypeStepAnnotatedBody -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "annotatedBody"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepApplicationFunction -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "applicationFunction"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepApplicationArgument -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "applicationArgument"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepEitherLeft -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "eitherLeft"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepEitherRight -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "eitherRight"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepForallBody -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "forallBody"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepFunctionDomain -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "functionDomain"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepFunctionCodomain -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "functionCodomain"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepListElement -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "listElement"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepMapKeys -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "mapKeys"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepMapValues -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "mapValues"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepMaybeElement -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybeElement"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepPairFirst -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pairFirst"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepPairSecond -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pairSecond"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepRecordField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "recordField"),
-          Core.fieldTerm = (EncodeCore.name v0)}})
-      Paths.SubtypeStepSetElement -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "setElement"),
-          Core.fieldTerm = Core.TermUnit}})
-      Paths.SubtypeStepUnionField v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unionField"),
-          Core.fieldTerm = (EncodeCore.name v0)}})
-      Paths.SubtypeStepWrappedType -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrappedType"),
-          Core.fieldTerm = Core.TermUnit}})
diff --git a/src/main/haskell/Hydra/Encode/Pg/Mapping.hs b/src/main/haskell/Hydra/Encode/Pg/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Pg/Mapping.hs
+++ /dev/null
@@ -1,139 +0,0 @@
--- 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.Pg.Model as Model
-import qualified Hydra.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
-
-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))}]})
-
-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))}]})
-
-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)}})
-
-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))}]})
-
-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))}})
-
-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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Pg/Model.hs
+++ /dev/null
@@ -1,302 +0,0 @@
--- 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.Lib.Lists as Lists
-import qualified Hydra.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
-
-adjacentEdge :: (t0 -> Core.Term) -> Model.AdjacentEdge t0 -> 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))}]})
-
-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}})
-
-edge :: (t0 -> Core.Term) -> Model.Edge t0 -> 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))}]})
-
-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))})
-
-edgeType :: (t0 -> Core.Term) -> Model.EdgeType t0 -> 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))}]})
-
-element :: (t0 -> Core.Term) -> Model.Element t0 -> 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)}})
-
-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}})
-
-elementTree :: (t0 -> Core.Term) -> Model.ElementTree t0 -> 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))}]})
-
-elementType :: (t0 -> Core.Term) -> Model.ElementType t0 -> 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)}})
-
-elementTypeTree :: (t0 -> Core.Term) -> Model.ElementTypeTree t0 -> 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))}]})
-
-graph :: Ord t0 => ((t0 -> Core.Term) -> Model.Graph t0 -> 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))}]})
-
-graphSchema :: (t0 -> Core.Term) -> Model.GraphSchema t0 -> 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))}]})
-
-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)}})
-
-lazyGraph :: (t0 -> Core.Term) -> Model.LazyGraph t0 -> 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))}]})
-
-property :: (t0 -> Core.Term) -> Model.Property t0 -> 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))}]})
-
-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))})
-
-propertyType :: (t0 -> Core.Term) -> Model.PropertyType t0 -> 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))}]})
-
-vertex :: (t0 -> Core.Term) -> Model.Vertex t0 -> 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))}]})
-
-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))})
-
-vertexType :: (t0 -> Core.Term) -> Model.VertexType t0 -> 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))}]})
-
-vertexWithAdjacentEdges :: (t0 -> Core.Term) -> Model.VertexWithAdjacentEdges t0 -> 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/Encode/Phantoms.hs b/src/main/haskell/Hydra/Encode/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Phantoms.hs
+++ /dev/null
@@ -1,36 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.phantoms
-
-module Hydra.Encode.Phantoms where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Phantoms as Phantoms
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-tBinding :: t0 -> Phantoms.TBinding t1 -> Core.Term
-tBinding a x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.phantoms.TBinding"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Phantoms.tBindingName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (tTerm a (Phantoms.tBindingTerm x))}]})
-tTerm :: t0 -> Phantoms.TTerm t1 -> Core.Term
-tTerm a x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-      Core.wrappedTermBody = (EncodeCore.term (Phantoms.unTTerm x))})
-tTermDefinition :: t0 -> Phantoms.TTermDefinition t1 -> Core.Term
-tTermDefinition a x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.phantoms.TTermDefinition"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (EncodeCore.name (Phantoms.tTermDefinitionName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (tTerm a (Phantoms.tTermDefinitionTerm x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Query.hs b/src/main/haskell/Hydra/Encode/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Query.hs
+++ /dev/null
@@ -1,263 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.query
-
-module Hydra.Encode.Query where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Query as Query
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-comparisonConstraint :: Query.ComparisonConstraint -> Core.Term
-comparisonConstraint x =
-    case x of
-      Query.ComparisonConstraintEqual -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "equal"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.ComparisonConstraintNotEqual -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "notEqual"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.ComparisonConstraintLessThan -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.ComparisonConstraintGreaterThan -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.ComparisonConstraintLessThanOrEqual -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lessThanOrEqual"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.ComparisonConstraintGreaterThanOrEqual -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "greaterThanOrEqual"),
-          Core.fieldTerm = Core.TermUnit}})
-edge :: Query.Edge -> Core.Term
-edge x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Edge"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.name (Query.edgeType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "out"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map EncodeCore.name opt)) (Query.edgeOut x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "in"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map EncodeCore.name opt)) (Query.edgeIn x))}]})
-graphPattern :: Query.GraphPattern -> Core.Term
-graphPattern x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (EncodeCore.name (Query.graphPatternGraph x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map pattern xs)) (Query.graphPatternPatterns x))}]})
-node :: Query.Node -> Core.Term
-node x =
-    case x of
-      Query.NodeTerm v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (EncodeCore.term v0)}})
-      Query.NodeVariable v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = (variable v0)}})
-      Query.NodeWildcard -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wildcard"),
-          Core.fieldTerm = Core.TermUnit}})
-path :: Query.Path -> Core.Term
-path x =
-    case x of
-      Query.PathStep v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "step"),
-          Core.fieldTerm = (step v0)}})
-      Query.PathRegex v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "regex"),
-          Core.fieldTerm = (regexSequence v0)}})
-      Query.PathInverse v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "inverse"),
-          Core.fieldTerm = (path v0)}})
-pathEquation :: Query.PathEquation -> Core.Term
-pathEquation x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (path (Query.pathEquationLeft x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (path (Query.pathEquationRight x))}]})
-pattern :: Query.Pattern -> Core.Term
-pattern x =
-    case x of
-      Query.PatternTriple v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "triple"),
-          Core.fieldTerm = (triplePattern v0)}})
-      Query.PatternNegation v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "negation"),
-          Core.fieldTerm = (pattern v0)}})
-      Query.PatternConjunction v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "conjunction"),
-          Core.fieldTerm = (Core.TermList (Lists.map pattern v0))}})
-      Query.PatternDisjunction v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "disjunction"),
-          Core.fieldTerm = (Core.TermList (Lists.map pattern v0))}})
-      Query.PatternGraph v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "graph"),
-          Core.fieldTerm = (graphPattern v0)}})
-patternImplication :: Query.PatternImplication -> Core.Term
-patternImplication x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "antecedent"),
-          Core.fieldTerm = (pattern (Query.patternImplicationAntecedent x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "consequent"),
-          Core.fieldTerm = (pattern (Query.patternImplicationConsequent x))}]})
-query :: Query.Query -> Core.Term
-query x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Query"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "variables"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map variable xs)) (Query.queryVariables x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "patterns"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map pattern xs)) (Query.queryPatterns x))}]})
-range :: Query.Range -> Core.Term
-range x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.Range"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "min"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Query.rangeMin x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "max"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Query.rangeMax x))}]})
-regexQuantifier :: Query.RegexQuantifier -> Core.Term
-regexQuantifier x =
-    case x of
-      Query.RegexQuantifierOne -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "one"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.RegexQuantifierZeroOrOne -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "zeroOrOne"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.RegexQuantifierZeroOrMore -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "zeroOrMore"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.RegexQuantifierOneOrMore -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "oneOrMore"),
-          Core.fieldTerm = Core.TermUnit}})
-      Query.RegexQuantifierExactly v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "exactly"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Query.RegexQuantifierAtLeast v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "atLeast"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
-      Query.RegexQuantifierRange v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "range"),
-          Core.fieldTerm = (range v0)}})
-regexSequence :: Query.RegexSequence -> Core.Term
-regexSequence x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "path"),
-          Core.fieldTerm = (path (Query.regexSequencePath x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "quantifier"),
-          Core.fieldTerm = (regexQuantifier (Query.regexSequenceQuantifier x))}]})
-step :: Query.Step -> Core.Term
-step x =
-    case x of
-      Query.StepEdge v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "edge"),
-          Core.fieldTerm = (edge v0)}})
-      Query.StepProject v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "project"),
-          Core.fieldTerm = (EncodeCore.projection v0)}})
-      Query.StepCompare v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "compare"),
-          Core.fieldTerm = (comparisonConstraint v0)}})
-triplePattern :: Query.TriplePattern -> Core.Term
-triplePattern x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "subject"),
-          Core.fieldTerm = (node (Query.triplePatternSubject x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "predicate"),
-          Core.fieldTerm = (path (Query.triplePatternPredicate x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "object"),
-          Core.fieldTerm = (node (Query.triplePatternObject x))}]})
-variable :: Query.Variable -> Core.Term
-variable x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.query.Variable"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Query.unVariable x))})
diff --git a/src/main/haskell/Hydra/Encode/Relational.hs b/src/main/haskell/Hydra/Encode/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Relational.hs
+++ /dev/null
@@ -1,80 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.relational
-
-module Hydra.Encode.Relational where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Relational as Relational
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-columnName :: Relational.ColumnName -> Core.Term
-columnName x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.ColumnName"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Relational.unColumnName x))})
-columnSchema :: (t0 -> Core.Term) -> Relational.ColumnSchema t0 -> Core.Term
-columnSchema t x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (columnName (Relational.columnSchemaName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domain"),
-          Core.fieldTerm = (t (Relational.columnSchemaDomain x))}]})
-foreignKey :: Relational.ForeignKey -> Core.Term
-foreignKey x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignRelation"),
-          Core.fieldTerm = (relationName (Relational.foreignKeyForeignRelation x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "keys"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap columnName columnName m)) (Relational.foreignKeyKeys x))}]})
-primaryKey :: Relational.PrimaryKey -> Core.Term
-primaryKey x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.PrimaryKey"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map columnName xs)) (Relational.unPrimaryKey x))})
-relation :: (t0 -> Core.Term) -> Relational.Relation t0 -> Core.Term
-relation v x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relation"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map (row v) xs)) (Relational.unRelation x))})
-relationName :: Relational.RelationName -> Core.Term
-relationName x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.RelationName"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Relational.unRelationName x))})
-relationSchema :: (t0 -> Core.Term) -> Relational.RelationSchema t0 -> Core.Term
-relationSchema t x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (relationName (Relational.relationSchemaName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (columnSchema t) xs)) (Relational.relationSchemaColumns x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "primaryKeys"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map primaryKey xs)) (Relational.relationSchemaPrimaryKeys x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "foreignKeys"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map foreignKey xs)) (Relational.relationSchemaForeignKeys x))}]})
-relationship :: Ord t0 => ((t0 -> Core.Term) -> Relational.Relationship t0 -> Core.Term)
-relationship v x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relationship"),
-      Core.wrappedTermBody = ((\s -> Core.TermSet (Sets.map (\m -> Core.TermMap (Maps.bimap columnName v m)) s)) (Relational.unRelationship x))})
-row :: (t0 -> Core.Term) -> Relational.Row t0 -> Core.Term
-row v x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Row"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map v xs)) (Relational.unRow x))})
diff --git a/src/main/haskell/Hydra/Encode/Tabular.hs b/src/main/haskell/Hydra/Encode/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Tabular.hs
+++ /dev/null
@@ -1,55 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.tabular
-
-module Hydra.Encode.Tabular where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Encode.Relational as Relational
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Tabular as Tabular
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-columnType :: Tabular.ColumnType -> Core.Term
-columnType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Relational.columnName (Tabular.columnTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.type_ (Tabular.columnTypeType x))}]})
-dataRow :: (t0 -> Core.Term) -> Tabular.DataRow t0 -> Core.Term
-dataRow v x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.DataRow"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map (\opt -> Core.TermMaybe (Maybes.map v opt)) xs)) (Tabular.unDataRow x))})
-headerRow :: Tabular.HeaderRow -> Core.Term
-headerRow x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.HeaderRow"),
-      Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) xs)) (Tabular.unHeaderRow x))})
-table :: (t0 -> Core.Term) -> Tabular.Table t0 -> Core.Term
-table v x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "header"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map headerRow opt)) (Tabular.tableHeader x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "data"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (dataRow v) xs)) (Tabular.tableData x))}]})
-tableType :: Tabular.TableType -> Core.Term
-tableType x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = (Relational.relationName (Tabular.tableTypeName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "columns"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map columnType xs)) (Tabular.tableTypeColumns x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Testing.hs b/src/main/haskell/Hydra/Encode/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Testing.hs
+++ /dev/null
@@ -1,68 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.testing
-
-module Hydra.Encode.Testing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-tag :: Testing.Tag -> Core.Term
-tag x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.testing.Tag"),
-      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Testing.unTag x))})
-testCase :: Testing.TestCase -> Core.Term
-testCase x =
-    case x of
-      Testing.TestCaseUniversal v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "universal"),
-          Core.fieldTerm = (universalTestCase v0)}})
-testCaseWithMetadata :: Testing.TestCaseWithMetadata -> Core.Term
-testCaseWithMetadata x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Testing.testCaseWithMetadataName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "case"),
-          Core.fieldTerm = (testCase (Testing.testCaseWithMetadataCase x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) opt)) (Testing.testCaseWithMetadataDescription x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "tags"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map tag xs)) (Testing.testCaseWithMetadataTags x))}]})
-testGroup :: Testing.TestGroup -> Core.Term
-testGroup x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "name"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Testing.testGroupName x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "description"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) opt)) (Testing.testGroupDescription x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subgroups"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map testGroup xs)) (Testing.testGroupSubgroups x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map testCaseWithMetadata xs)) (Testing.testGroupCases x))}]})
-universalTestCase :: Testing.UniversalTestCase -> Core.Term
-universalTestCase x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "actual"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Testing.universalTestCaseActual x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "expected"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Testing.universalTestCaseExpected x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Topology.hs b/src/main/haskell/Hydra/Encode/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Topology.hs
+++ /dev/null
@@ -1,39 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.topology
-
-module Hydra.Encode.Topology where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Topology as Topology
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-graph :: M.Map Int [Int] -> Core.Term
-graph m = Core.TermMap (Maps.bimap vertex (\xs -> Core.TermList (Lists.map vertex xs)) m)
-tarjanState :: Topology.TarjanState -> Core.Term
-tarjanState x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "counter"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Topology.tarjanStateCounter x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "indices"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap vertex (\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) m)) (Topology.tarjanStateIndices x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lowLinks"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap vertex (\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) m)) (Topology.tarjanStateLowLinks x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "stack"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map vertex xs)) (Topology.tarjanStateStack x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "onStack"),
-          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map vertex s)) (Topology.tarjanStateOnStack x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "sccs"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\xs2 -> Core.TermList (Lists.map vertex xs2)) xs)) (Topology.tarjanStateSccs x))}]})
-vertex :: Int -> Core.Term
-vertex x = Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x))
diff --git a/src/main/haskell/Hydra/Encode/Typing.hs b/src/main/haskell/Hydra/Encode/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Typing.hs
+++ /dev/null
@@ -1,83 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.typing
-
-module Hydra.Encode.Typing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Context as Context
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-functionStructure :: (t0 -> Core.Term) -> Typing.FunctionStructure t0 -> Core.Term
-functionStructure env x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeParams"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.name xs)) (Typing.functionStructureTypeParams x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "params"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.name xs)) (Typing.functionStructureParams x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "bindings"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.binding xs)) (Typing.functionStructureBindings x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "body"),
-          Core.fieldTerm = (EncodeCore.term (Typing.functionStructureBody x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "domains"),
-          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map EncodeCore.type_ xs)) (Typing.functionStructureDomains x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "codomain"),
-          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map EncodeCore.type_ opt)) (Typing.functionStructureCodomain x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "environment"),
-          Core.fieldTerm = (env (Typing.functionStructureEnvironment x))}]})
-inferenceResult :: Typing.InferenceResult -> Core.Term
-inferenceResult x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "term"),
-          Core.fieldTerm = (EncodeCore.term (Typing.inferenceResultTerm x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "type"),
-          Core.fieldTerm = (EncodeCore.type_ (Typing.inferenceResultType x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "subst"),
-          Core.fieldTerm = (typeSubst (Typing.inferenceResultSubst x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "classConstraints"),
-          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap EncodeCore.name EncodeCore.typeVariableMetadata m)) (Typing.inferenceResultClassConstraints x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "context"),
-          Core.fieldTerm = (Context.context (Typing.inferenceResultContext x))}]})
-termSubst :: Typing.TermSubst -> Core.Term
-termSubst x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TermSubst"),
-      Core.wrappedTermBody = ((\m -> Core.TermMap (Maps.bimap EncodeCore.name EncodeCore.term m)) (Typing.unTermSubst x))})
-typeConstraint :: Typing.TypeConstraint -> Core.Term
-typeConstraint x =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "left"),
-          Core.fieldTerm = (EncodeCore.type_ (Typing.typeConstraintLeft x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "right"),
-          Core.fieldTerm = (EncodeCore.type_ (Typing.typeConstraintRight x))},
-        Core.Field {
-          Core.fieldName = (Core.Name "comment"),
-          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Typing.typeConstraintComment x))}]})
-typeSubst :: Typing.TypeSubst -> Core.Term
-typeSubst x =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TypeSubst"),
-      Core.wrappedTermBody = ((\m -> Core.TermMap (Maps.bimap EncodeCore.name EncodeCore.type_ m)) (Typing.unTypeSubst x))})
diff --git a/src/main/haskell/Hydra/Encode/Util.hs b/src/main/haskell/Hydra/Encode/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Util.hs
+++ /dev/null
@@ -1,62 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.util
-
-module Hydra.Encode.Util where
-import qualified Hydra.Core as Core
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-caseConvention :: Util.CaseConvention -> Core.Term
-caseConvention x =
-    case x of
-      Util.CaseConventionCamel -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "camel"),
-          Core.fieldTerm = Core.TermUnit}})
-      Util.CaseConventionPascal -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pascal"),
-          Core.fieldTerm = Core.TermUnit}})
-      Util.CaseConventionLowerSnake -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lowerSnake"),
-          Core.fieldTerm = Core.TermUnit}})
-      Util.CaseConventionUpperSnake -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "upperSnake"),
-          Core.fieldTerm = Core.TermUnit}})
-comparison :: Util.Comparison -> Core.Term
-comparison x =
-    case x of
-      Util.ComparisonLessThan -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lessThan"),
-          Core.fieldTerm = Core.TermUnit}})
-      Util.ComparisonEqualTo -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "equalTo"),
-          Core.fieldTerm = Core.TermUnit}})
-      Util.ComparisonGreaterThan -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "greaterThan"),
-          Core.fieldTerm = Core.TermUnit}})
-precision :: Util.Precision -> Core.Term
-precision x =
-    case x of
-      Util.PrecisionArbitrary -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.Precision"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "arbitrary"),
-          Core.fieldTerm = Core.TermUnit}})
-      Util.PrecisionBits v0 -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.util.Precision"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "bits"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})
diff --git a/src/main/haskell/Hydra/Encode/Variants.hs b/src/main/haskell/Hydra/Encode/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encode/Variants.hs
+++ /dev/null
@@ -1,268 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term encoders for hydra.variants
-
-module Hydra.Encode.Variants where
-import qualified Hydra.Core as Core
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-eliminationVariant :: Variants.EliminationVariant -> Core.Term
-eliminationVariant x =
-    case x of
-      Variants.EliminationVariantRecord -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.EliminationVariantUnion -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.EliminationVariantWrap -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrap"),
-          Core.fieldTerm = Core.TermUnit}})
-functionVariant :: Variants.FunctionVariant -> Core.Term
-functionVariant x =
-    case x of
-      Variants.FunctionVariantElimination -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "elimination"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.FunctionVariantLambda -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lambda"),
-          Core.fieldTerm = Core.TermUnit}})
-literalVariant :: Variants.LiteralVariant -> Core.Term
-literalVariant x =
-    case x of
-      Variants.LiteralVariantBinary -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "binary"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.LiteralVariantBoolean -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "boolean"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.LiteralVariantDecimal -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "decimal"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.LiteralVariantFloat -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "float"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.LiteralVariantInteger -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "integer"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.LiteralVariantString -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "string"),
-          Core.fieldTerm = Core.TermUnit}})
-termVariant :: Variants.TermVariant -> Core.Term
-termVariant x =
-    case x of
-      Variants.TermVariantAnnotated -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "annotated"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantApplication -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "application"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantCases -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "cases"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantEither -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "either"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantInject -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "inject"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantLambda -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "lambda"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantLet -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "let"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantList -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantLiteral -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantMap -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantMaybe -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybe"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantPair -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pair"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantProject -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "project"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantRecord -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantSet -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantTypeApplication -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeApplication"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantTypeLambda -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "typeLambda"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantUnit -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantUnwrap -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unwrap"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantVariable -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TermVariantWrap -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrap"),
-          Core.fieldTerm = Core.TermUnit}})
-typeVariant :: Variants.TypeVariant -> Core.Term
-typeVariant x =
-    case x of
-      Variants.TypeVariantAnnotated -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "annotated"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantApplication -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "application"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantEither -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "either"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantForall -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "forall"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantFunction -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "function"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantList -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantLiteral -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "literal"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantMap -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantMaybe -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybe"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantPair -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pair"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantRecord -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantSet -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantUnion -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "union"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantUnit -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "unit"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantVariable -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "variable"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantVoid -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "void"),
-          Core.fieldTerm = Core.TermUnit}})
-      Variants.TypeVariantWrap -> Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrap"),
-          Core.fieldTerm = Core.TermUnit}})
diff --git a/src/main/haskell/Hydra/Encoding.hs b/src/main/haskell/Hydra/Encoding.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Encoding.hs
+++ /dev/null
@@ -1,682 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for generating term encoders from type modules
-
-module Hydra.Encoding where
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Transform a type binding into an encoder binding
-encodeBinding :: t0 -> Graph.Graph -> Core.Binding -> Either Errors.DecodingError Core.Binding
-encodeBinding cx graph b =
-    Eithers.bind (DecodeCore.type_ graph (Core.bindingTerm b)) (\typ -> Right (Core.Binding {
-      Core.bindingName = (encodeBindingName (Core.bindingName b)),
-      Core.bindingTerm = (encodeTypeNamed (Core.bindingName b) typ),
-      Core.bindingTypeScheme = (Just (encoderTypeSchemeNamed (Core.bindingName b) typ))}))
--- | Generate a binding name for an encoder function from a type name
-encodeBindingName :: Core.Name -> Core.Name
-encodeBindingName n =
-
-      let parts = Strings.splitOn "." (Core.unName n)
-          localPart = Formatting.decapitalize (Names.localNameOf n)
-          localResult = Core.Name localPart
-      in (Maybes.maybe localResult (\nsParts -> Maybes.maybe localResult (\nsUc ->
-        let tail = Pairs.second nsUc
-        in (Core.Name (Strings.intercalate "." (Lists.concat2 [
-          "hydra",
-          "encode"] (Lists.concat2 tail [
-          localPart]))))) (Lists.uncons nsParts)) (Lists.maybeInit parts))
--- | Generate an encoder for an Either type
-encodeEitherType :: Core.EitherType -> Core.Term
-encodeEitherType et =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "e"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "either"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bimap")),
-                Core.applicationArgument = (encodeType (Core.eitherTypeLeft et))})),
-              Core.applicationArgument = (encodeType (Core.eitherTypeRight et))})),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}}))})
--- | Generate the encoder for a field's value
-encodeFieldValue :: Core.Name -> Core.Name -> Core.Type -> Core.Term
-encodeFieldValue typeName fieldName fieldType =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "y"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "inject"),
-          Core.fieldTerm = (encodeInjection typeName fieldName (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (encodeType fieldType),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))}}))})
--- | Encode a float value based on its float type
-encodeFloatValue :: Core.FloatType -> Core.Term -> Core.Term
-encodeFloatValue floatType valTerm =
-    Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = case floatType of
-          Core.FloatTypeBigfloat -> Core.Name "bigfloat"
-          Core.FloatTypeFloat32 -> Core.Name "float32"
-          Core.FloatTypeFloat64 -> Core.Name "float64",
-        Core.fieldTerm = valTerm}})
--- | Generate an encoder for a polymorphic (forall) type
-encodeForallType :: Core.ForallType -> Core.Term
-encodeForallType ft =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (encodeBindingName (Core.forallTypeParameter ft)),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (encodeType (Core.forallTypeBody ft))})
--- | Encode an Injection as a term
-encodeInjection :: Core.Name -> Core.Name -> Core.Term -> Core.Term
-encodeInjection typeName fieldName fieldTerm =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "typeName"),
-          Core.fieldTerm = (encodeName typeName)},
-        Core.Field {
-          Core.fieldName = (Core.Name "field"),
-          Core.fieldTerm = ((\fname -> \fterm -> Core.TermRecord (Core.Record {
-            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-            Core.recordFields = [
-              Core.Field {
-                Core.fieldName = (Core.Name "name"),
-                Core.fieldTerm = (encodeName fname)},
-              Core.Field {
-                Core.fieldName = (Core.Name "term"),
-                Core.fieldTerm = fterm}]})) fieldName fieldTerm)}]})
--- | Encode an integer value based on its integer type
-encodeIntegerValue :: Core.IntegerType -> Core.Term -> Core.Term
-encodeIntegerValue intType valTerm =
-    Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = case intType of
-          Core.IntegerTypeBigint -> Core.Name "bigint"
-          Core.IntegerTypeInt8 -> Core.Name "int8"
-          Core.IntegerTypeInt16 -> Core.Name "int16"
-          Core.IntegerTypeInt32 -> Core.Name "int32"
-          Core.IntegerTypeInt64 -> Core.Name "int64"
-          Core.IntegerTypeUint8 -> Core.Name "uint8"
-          Core.IntegerTypeUint16 -> Core.Name "uint16"
-          Core.IntegerTypeUint32 -> Core.Name "uint32"
-          Core.IntegerTypeUint64 -> Core.Name "uint64",
-        Core.fieldTerm = valTerm}})
--- | Generate an encoder for a list type
-encodeListType :: Core.Type -> Core.Term
-encodeListType elemType =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "xs"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "list"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-              Core.applicationArgument = (encodeType elemType)})),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})
--- | Generate an encoder for a literal type
-encodeLiteralType :: Core.LiteralType -> Core.Term
-encodeLiteralType x =
-    case x of
-      Core.LiteralTypeBinary -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "literal"),
-            Core.fieldTerm = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "binary"),
-                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})
-      Core.LiteralTypeBoolean -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "literal"),
-            Core.fieldTerm = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "boolean"),
-                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})
-      Core.LiteralTypeDecimal -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "literal"),
-            Core.fieldTerm = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "decimal"),
-                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})
-      Core.LiteralTypeString -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "literal"),
-            Core.fieldTerm = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "string"),
-                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})
-      Core.LiteralTypeInteger v0 -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "literal"),
-            Core.fieldTerm = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "integer"),
-                Core.fieldTerm = (encodeIntegerValue v0 (Core.TermVariable (Core.Name "x")))}}))}}))})
-      Core.LiteralTypeFloat v0 -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "literal"),
-            Core.fieldTerm = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "float"),
-                Core.fieldTerm = (encodeFloatValue v0 (Core.TermVariable (Core.Name "x")))}}))}}))})
-      _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})
--- | Generate an encoder for a map type
-encodeMapType :: Core.MapType -> Core.Term
-encodeMapType mt =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "m"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "map"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                Core.applicationArgument = (encodeType (Core.mapTypeKeys mt))})),
-              Core.applicationArgument = (encodeType (Core.mapTypeValues mt))})),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})
--- | Transform a type module into an encoder module
-encodeModule :: Context.Context -> Graph.Graph -> Packaging.Module -> Either Errors.Error (Maybe Packaging.Module)
-encodeModule cx graph mod =
-    Eithers.bind (filterTypeBindings cx graph (Maybes.cat (Lists.map (\d -> case d of
-      Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-        let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-            dataTerm =
-                    Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (EncodeCore.type_ typ),
-                      Core.annotatedTermAnnotation = (Maps.fromList [
-                        (Constants.key_type, schemaTerm)])}))
-        in Core.Binding {
-          Core.bindingName = name,
-          Core.bindingTerm = dataTerm,
-          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-            Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-      _ -> Nothing) (Packaging.moduleDefinitions mod)))) (\typeBindings -> Logic.ifElse (Lists.null typeBindings) (Right Nothing) (Eithers.bind (Eithers.mapList (\b -> Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\x -> x) (encodeBinding cx graph b)) typeBindings) (\encodedBindings -> Right (Just (Packaging.Module {
-      Packaging.moduleDescription = (Just (Strings.cat [
-        "Term encoders for ",
-        (Packaging.unNamespace (Packaging.moduleNamespace mod))])),
-      Packaging.moduleNamespace = (encodeNamespace (Packaging.moduleNamespace mod)),
-      Packaging.moduleTermDependencies = (Lists.nub (Lists.concat2 (Lists.map encodeNamespace (Packaging.moduleTypeDependencies mod)) (Lists.map encodeNamespace (Packaging.moduleTermDependencies mod)))),
-      Packaging.moduleTypeDependencies = [
-        Packaging.moduleNamespace mod],
-      Packaging.moduleDefinitions = (Lists.map (\b -> Packaging.DefinitionTerm (Packaging.TermDefinition {
-        Packaging.termDefinitionName = (Core.bindingName b),
-        Packaging.termDefinitionTerm = (Core.bindingTerm b),
-        Packaging.termDefinitionTypeScheme = (Core.bindingTypeScheme b)})) encodedBindings)})))))
--- | Encode a Name as a term
-encodeName :: Core.Name -> Core.Term
-encodeName n =
-    Core.TermWrap (Core.WrappedTerm {
-      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName n)))})
--- | Generate an encoder module namespace from a source module namespace
-encodeNamespace :: Packaging.Namespace -> Packaging.Namespace
-encodeNamespace ns =
-
-      let parts = Strings.splitOn "." (Packaging.unNamespace ns)
-          fallback = Packaging.Namespace (Packaging.unNamespace ns)
-      in (Maybes.maybe fallback (\uc -> Packaging.Namespace (Strings.cat [
-        "hydra.encode.",
-        (Strings.intercalate "." (Pairs.second uc))])) (Lists.uncons parts))
--- | Generate an encoder for a Maybe type
-encodeOptionalType :: Core.Type -> Core.Term
-encodeOptionalType elemType =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "opt"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "maybe"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-              Core.applicationArgument = (encodeType elemType)})),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})
--- | Generate an encoder for a pair type
-encodePairType :: Core.PairType -> Core.Term
-encodePairType pt =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "p"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "pair"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.bimap")),
-                Core.applicationArgument = (encodeType (Core.pairTypeFirst pt))})),
-              Core.applicationArgument = (encodeType (Core.pairTypeSecond pt))})),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}}))})
--- | Generate an encoder for a record type (unnamed — should not be called directly)
-encodeRecordType :: [Core.FieldType] -> Core.Term
-encodeRecordType rt = encodeRecordTypeNamed (Core.Name "unknown") rt
--- | Generate an encoder for a record type with the given element name
-encodeRecordTypeNamed :: Core.Name -> [Core.FieldType] -> Core.Term
-encodeRecordTypeNamed ename rt =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "record"),
-          Core.fieldTerm = (Core.TermRecord (Core.Record {
-            Core.recordTypeName = (Core.Name "hydra.core.Record"),
-            Core.recordFields = [
-              Core.Field {
-                Core.fieldName = (Core.Name "typeName"),
-                Core.fieldTerm = (encodeName ename)},
-              Core.Field {
-                Core.fieldName = (Core.Name "fields"),
-                Core.fieldTerm = (Core.TermList (Lists.map ((\tname -> \recType -> \ft -> Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (encodeName (Core.fieldTypeName ft))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "term"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (encodeType (Core.fieldTypeType ft)),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = tname,
-                            Core.projectionField = (Core.fieldTypeName ft)})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})) ename rt) rt))}]}))}}))})
--- | Generate an encoder for a set type
-encodeSetType :: Core.Type -> Core.Term
-encodeSetType elemType =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "s"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "set"),
-          Core.fieldTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-              Core.applicationArgument = (encodeType elemType)})),
-            Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}}))})
--- | Generate an encoder term for a Type
-encodeType :: Core.Type -> Core.Term
-encodeType x =
-    case x of
-      Core.TypeAnnotated v0 -> encodeType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (encodeType (Core.applicationTypeFunction v0)),
-        Core.applicationArgument = (encodeType (Core.applicationTypeArgument v0))})
-      Core.TypeEither v0 -> encodeEitherType v0
-      Core.TypeForall v0 -> encodeForallType v0
-      Core.TypeFunction _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})
-      Core.TypeList v0 -> encodeListType v0
-      Core.TypeLiteral v0 -> encodeLiteralType v0
-      Core.TypeMap v0 -> encodeMapType v0
-      Core.TypeMaybe v0 -> encodeOptionalType v0
-      Core.TypePair v0 -> encodePairType v0
-      Core.TypeRecord v0 -> encodeRecordType v0
-      Core.TypeSet v0 -> encodeSetType v0
-      Core.TypeUnion v0 -> encodeUnionType v0
-      Core.TypeWrap v0 -> encodeWrappedType v0
-      Core.TypeUnit -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "_"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "unit"),
-            Core.fieldTerm = Core.TermUnit}}))})
-      Core.TypeVoid -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "_"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "unit"),
-            Core.fieldTerm = Core.TermUnit}}))})
-      Core.TypeVariable v0 -> Core.TermVariable (encodeBindingName v0)
-      _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})
--- | Generate an encoder term for a Type, with the element name for nominal types
-encodeTypeNamed :: Core.Name -> Core.Type -> Core.Term
-encodeTypeNamed ename typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encodeTypeNamed ename (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (encodeType (Core.applicationTypeFunction v0)),
-        Core.applicationArgument = (encodeType (Core.applicationTypeArgument v0))})
-      Core.TypeEither v0 -> encodeEitherType v0
-      Core.TypeForall v0 -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (encodeBindingName (Core.forallTypeParameter v0)),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (encodeTypeNamed ename (Core.forallTypeBody v0))})
-      Core.TypeFunction _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})
-      Core.TypeList v0 -> encodeListType v0
-      Core.TypeLiteral v0 -> encodeLiteralType v0
-      Core.TypeMap v0 -> encodeMapType v0
-      Core.TypeMaybe v0 -> encodeOptionalType v0
-      Core.TypePair v0 -> encodePairType v0
-      Core.TypeRecord v0 -> encodeRecordTypeNamed ename v0
-      Core.TypeSet v0 -> encodeSetType v0
-      Core.TypeUnion v0 -> encodeUnionTypeNamed ename v0
-      Core.TypeWrap v0 -> encodeWrappedTypeNamed ename v0
-      Core.TypeUnit -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "_"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "unit"),
-            Core.fieldTerm = Core.TermUnit}}))})
-      Core.TypeVoid -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "_"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermInject (Core.Injection {
-          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-          Core.injectionField = Core.Field {
-            Core.fieldName = (Core.Name "unit"),
-            Core.fieldTerm = Core.TermUnit}}))})
-      Core.TypeVariable v0 -> Core.TermVariable (encodeBindingName v0)
-      _ -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "x"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})
--- | Generate an encoder for a union type (placeholder name)
-encodeUnionType :: [Core.FieldType] -> Core.Term
-encodeUnionType rt = encodeUnionTypeNamed (Core.Name "unknown") rt
--- | Generate an encoder for a union type with the given element name
-encodeUnionTypeNamed :: Core.Name -> [Core.FieldType] -> Core.Term
-encodeUnionTypeNamed ename rt =
-    Core.TermCases (Core.CaseStatement {
-      Core.caseStatementTypeName = ename,
-      Core.caseStatementDefault = Nothing,
-      Core.caseStatementCases = (Lists.map (\ft -> Core.Field {
-        Core.fieldName = (Core.fieldTypeName ft),
-        Core.fieldTerm = (encodeFieldValue ename (Core.fieldTypeName ft) (Core.fieldTypeType ft))}) rt)})
--- | Generate an encoder for a wrapped type (placeholder name)
-encodeWrappedType :: Core.Type -> Core.Term
-encodeWrappedType wt = encodeWrappedTypeNamed (Core.Name "unknown") wt
--- | Generate an encoder for a wrapped type with the given element name
-encodeWrappedTypeNamed :: Core.Name -> Core.Type -> Core.Term
-encodeWrappedTypeNamed ename wt =
-    Core.TermLambda (Core.Lambda {
-      Core.lambdaParameter = (Core.Name "x"),
-      Core.lambdaDomain = Nothing,
-      Core.lambdaBody = (Core.TermInject (Core.Injection {
-        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-        Core.injectionField = Core.Field {
-          Core.fieldName = (Core.Name "wrap"),
-          Core.fieldTerm = (Core.TermRecord (Core.Record {
-            Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-            Core.recordFields = [
-              Core.Field {
-                Core.fieldName = (Core.Name "typeName"),
-                Core.fieldTerm = (encodeName ename)},
-              Core.Field {
-                Core.fieldName = (Core.Name "body"),
-                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (encodeType wt),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermUnwrap ename),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})
--- | Collect forall type variable names from a type
-encoderCollectForallVariables :: Core.Type -> [Core.Name]
-encoderCollectForallVariables typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encoderCollectForallVariables (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (encoderCollectForallVariables (Core.forallTypeBody v0))
-      _ -> []
--- | Collect type variables needing Ord constraints
-encoderCollectOrdVars :: Core.Type -> [Core.Name]
-encoderCollectOrdVars typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encoderCollectOrdVars (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Lists.concat2 (encoderCollectOrdVars (Core.applicationTypeFunction v0)) (encoderCollectOrdVars (Core.applicationTypeArgument v0))
-      Core.TypeEither v0 -> Lists.concat2 (encoderCollectOrdVars (Core.eitherTypeLeft v0)) (encoderCollectOrdVars (Core.eitherTypeRight v0))
-      Core.TypeForall v0 -> encoderCollectOrdVars (Core.forallTypeBody v0)
-      Core.TypeList v0 -> encoderCollectOrdVars v0
-      Core.TypeMap v0 -> Lists.concat [
-        encoderCollectTypeVarsFromType (Core.mapTypeKeys v0),
-        (encoderCollectOrdVars (Core.mapTypeKeys v0)),
-        (encoderCollectOrdVars (Core.mapTypeValues v0))]
-      Core.TypeMaybe v0 -> encoderCollectOrdVars v0
-      Core.TypePair v0 -> Lists.concat2 (encoderCollectOrdVars (Core.pairTypeFirst v0)) (encoderCollectOrdVars (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Lists.concat (Lists.map (\ft -> encoderCollectOrdVars (Core.fieldTypeType ft)) v0)
-      Core.TypeSet v0 -> Lists.concat2 (encoderCollectTypeVarsFromType v0) (encoderCollectOrdVars v0)
-      Core.TypeUnion v0 -> Lists.concat (Lists.map (\ft -> encoderCollectOrdVars (Core.fieldTypeType ft)) v0)
-      Core.TypeWrap v0 -> encoderCollectOrdVars v0
-      _ -> []
--- | Collect all type variable names from a type expression
-encoderCollectTypeVarsFromType :: Core.Type -> [Core.Name]
-encoderCollectTypeVarsFromType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encoderCollectTypeVarsFromType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Lists.concat2 (encoderCollectTypeVarsFromType (Core.applicationTypeFunction v0)) (encoderCollectTypeVarsFromType (Core.applicationTypeArgument v0))
-      Core.TypeForall v0 -> encoderCollectTypeVarsFromType (Core.forallTypeBody v0)
-      Core.TypeList v0 -> encoderCollectTypeVarsFromType v0
-      Core.TypeMap v0 -> Lists.concat2 (encoderCollectTypeVarsFromType (Core.mapTypeKeys v0)) (encoderCollectTypeVarsFromType (Core.mapTypeValues v0))
-      Core.TypeMaybe v0 -> encoderCollectTypeVarsFromType v0
-      Core.TypePair v0 -> Lists.concat2 (encoderCollectTypeVarsFromType (Core.pairTypeFirst v0)) (encoderCollectTypeVarsFromType (Core.pairTypeSecond v0))
-      Core.TypeRecord v0 -> Lists.concat (Lists.map (\ft -> encoderCollectTypeVarsFromType (Core.fieldTypeType ft)) v0)
-      Core.TypeSet v0 -> encoderCollectTypeVarsFromType v0
-      Core.TypeUnion v0 -> Lists.concat (Lists.map (\ft -> encoderCollectTypeVarsFromType (Core.fieldTypeType ft)) v0)
-      Core.TypeVariable v0 -> [
-        v0]
-      Core.TypeWrap v0 -> encoderCollectTypeVarsFromType v0
-      _ -> []
--- | Get full result type for encoder input
-encoderFullResultType :: Core.Type -> Core.Type
-encoderFullResultType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encoderFullResultType (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (encoderFullResultType (Core.applicationTypeFunction v0)),
-        Core.applicationTypeArgument = (Core.applicationTypeArgument v0)})
-      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-        Core.eitherTypeLeft = (encoderFullResultType (Core.eitherTypeLeft v0)),
-        Core.eitherTypeRight = (encoderFullResultType (Core.eitherTypeRight v0))})
-      Core.TypeForall v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (encoderFullResultType (Core.forallTypeBody v0)),
-        Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v0))})
-      Core.TypeList v0 -> Core.TypeList (encoderFullResultType v0)
-      Core.TypeLiteral _ -> Core.TypeVariable (Core.Name "hydra.core.Literal")
-      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (encoderFullResultType (Core.mapTypeKeys v0)),
-        Core.mapTypeValues = (encoderFullResultType (Core.mapTypeValues v0))})
-      Core.TypeMaybe v0 -> Core.TypeMaybe (encoderFullResultType v0)
-      Core.TypePair v0 -> Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (encoderFullResultType (Core.pairTypeFirst v0)),
-        Core.pairTypeSecond = (encoderFullResultType (Core.pairTypeSecond v0))})
-      Core.TypeRecord _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
-      Core.TypeSet v0 -> Core.TypeSet (encoderFullResultType v0)
-      Core.TypeUnion _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
-      Core.TypeUnit -> Core.TypeUnit
-      Core.TypeVariable v0 -> Core.TypeVariable v0
-      Core.TypeVoid -> Core.TypeVoid
-      Core.TypeWrap _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
-      _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
--- | Get full result type for encoder input, using element name for nominal types
-encoderFullResultTypeNamed :: Core.Name -> Core.Type -> Core.Type
-encoderFullResultTypeNamed ename typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encoderFullResultTypeNamed ename (Core.annotatedTypeBody v0)
-      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (encoderFullResultType (Core.applicationTypeFunction v0)),
-        Core.applicationTypeArgument = (Core.applicationTypeArgument v0)})
-      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-        Core.eitherTypeLeft = (encoderFullResultType (Core.eitherTypeLeft v0)),
-        Core.eitherTypeRight = (encoderFullResultType (Core.eitherTypeRight v0))})
-      Core.TypeForall v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (encoderFullResultTypeNamed ename (Core.forallTypeBody v0)),
-        Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v0))})
-      Core.TypeList v0 -> Core.TypeList (encoderFullResultType v0)
-      Core.TypeLiteral _ -> Core.TypeVariable (Core.Name "hydra.core.Literal")
-      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (encoderFullResultType (Core.mapTypeKeys v0)),
-        Core.mapTypeValues = (encoderFullResultType (Core.mapTypeValues v0))})
-      Core.TypeMaybe v0 -> Core.TypeMaybe (encoderFullResultType v0)
-      Core.TypePair v0 -> Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (encoderFullResultType (Core.pairTypeFirst v0)),
-        Core.pairTypeSecond = (encoderFullResultType (Core.pairTypeSecond v0))})
-      Core.TypeRecord _ -> Core.TypeVariable ename
-      Core.TypeSet v0 -> Core.TypeSet (encoderFullResultType v0)
-      Core.TypeUnion _ -> Core.TypeVariable ename
-      Core.TypeUnit -> Core.TypeUnit
-      Core.TypeVariable v0 -> Core.TypeVariable v0
-      Core.TypeVoid -> Core.TypeVoid
-      Core.TypeWrap _ -> Core.TypeVariable ename
-      _ -> Core.TypeVariable (Core.Name "hydra.core.Term")
--- | Build encoder function type
-encoderType :: Core.Type -> Core.Type
-encoderType typ =
-
-      let resultType = encoderFullResultType typ
-          baseType =
-                  Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = resultType,
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})
-      in (prependForallEncoders baseType typ)
--- | Build encoder function type with element name for nominal types
-encoderTypeNamed :: Core.Name -> Core.Type -> Core.Type
-encoderTypeNamed ename typ =
-
-      let resultType = encoderFullResultTypeNamed ename typ
-          baseType =
-                  Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = resultType,
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})
-      in (prependForallEncoders baseType typ)
--- | Construct a TypeScheme for an encoder function from a source type
-encoderTypeScheme :: Core.Type -> Core.TypeScheme
-encoderTypeScheme typ =
-
-      let typeVars = encoderCollectForallVariables typ
-          encoderFunType = encoderType typ
-          allOrdVars = encoderCollectOrdVars typ
-          ordVars = Lists.filter (\v -> Lists.elem v typeVars) allOrdVars
-          constraints =
-                  Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {
-                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars)))
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = typeVars,
-        Core.typeSchemeBody = encoderFunType,
-        Core.typeSchemeConstraints = constraints}
--- | Construct a TypeScheme for an encoder function, with element name for nominal types
-encoderTypeSchemeNamed :: Core.Name -> Core.Type -> Core.TypeScheme
-encoderTypeSchemeNamed ename typ =
-
-      let typeVars = encoderCollectForallVariables typ
-          encoderFunType = encoderTypeNamed ename typ
-          allOrdVars = encoderCollectOrdVars typ
-          ordVars = Lists.filter (\v -> Lists.elem v typeVars) allOrdVars
-          constraints =
-                  Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {
-                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars)))
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = typeVars,
-        Core.typeSchemeBody = encoderFunType,
-        Core.typeSchemeConstraints = constraints}
--- | Filter bindings to only encodable type definitions
-filterTypeBindings :: Context.Context -> Graph.Graph -> [Core.Binding] -> Either Errors.Error [Core.Binding]
-filterTypeBindings cx graph bindings =
-    Eithers.map Maybes.cat (Eithers.mapList (isEncodableBinding cx graph) (Lists.filter Annotations.isNativeType bindings))
--- | Check if a binding is encodable (serializable type)
-isEncodableBinding :: Context.Context -> Graph.Graph -> Core.Binding -> Either Errors.Error (Maybe Core.Binding)
-isEncodableBinding cx graph b =
-    Eithers.bind (Predicates.isSerializableByName cx graph (Core.bindingName b)) (\serializable -> Right (Logic.ifElse serializable (Just b) Nothing))
--- | Check whether a type is the unit type
-isUnitType :: Core.Type -> Bool
-isUnitType x =
-    case x of
-      Core.TypeUnit -> True
-      _ -> False
--- | Prepend encoder types for forall parameters to base type
-prependForallEncoders :: Core.Type -> Core.Type -> Core.Type
-prependForallEncoders baseType typ =
-    case typ of
-      Core.TypeAnnotated v0 -> prependForallEncoders baseType (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Core.TypeFunction (Core.FunctionType {
-        Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = (Core.TypeVariable (Core.forallTypeParameter v0)),
-          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-        Core.functionTypeCodomain = (prependForallEncoders baseType (Core.forallTypeBody v0))})
-      _ -> baseType
diff --git a/src/main/haskell/Hydra/Environment.hs b/src/main/haskell/Hydra/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Environment.hs
+++ /dev/null
@@ -1,149 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Graph to type environment conversions
-
-module Hydra.Environment where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variables as Variables
-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 definition to a typed term
-definitionAsTypeApplicationTerm :: Core.Binding -> Either Errors.Error Core.TypeApplicationTerm
-definitionAsTypeApplicationTerm el =
-    Maybes.maybe (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-      Errors.unexpectedShapeErrorExpected = "typed binding",
-      Errors.unexpectedShapeErrorActual = "untyped binding"})))) (\ts -> Right (Core.TypeApplicationTerm {
-      Core.typeApplicationTermBody = (Core.bindingTerm el),
-      Core.typeApplicationTermType = (Core.typeSchemeBody ts)})) (Core.bindingTypeScheme el)
--- | Convert bindings and a body to a let expression
-graphAsLet :: [Core.Binding] -> Core.Term -> Core.Let
-graphAsLet bindings body =
-    Core.Let {
-      Core.letBindings = bindings,
-      Core.letBody = body}
--- | Convert bindings and a body to a term, using let-term duality
-graphAsTerm :: [Core.Binding] -> Core.Term -> Core.Term
-graphAsTerm bindings body = Core.TermLet (graphAsLet bindings body)
--- | Decode a list of type-encoding bindings into a map of named types
-graphAsTypes :: Graph.Graph -> [Core.Binding] -> Either Errors.DecodingError (M.Map Core.Name Core.Type)
-graphAsTypes graph els =
-
-      let toPair = \el -> Eithers.map (\typ -> (Core.bindingName el, typ)) (DecodeCore.type_ graph (Core.bindingTerm el))
-      in (Eithers.map Maps.fromList (Eithers.mapList toPair els))
--- | Partition a list of definitions into type definitions and term definitions
-partitionDefinitions :: [Packaging.Definition] -> ([Packaging.TypeDefinition], [Packaging.TermDefinition])
-partitionDefinitions defs =
-
-      let getType =
-              \def -> case def of
-                Packaging.DefinitionType v0 -> Just v0
-                Packaging.DefinitionTerm _ -> Nothing
-          getTerm =
-                  \def -> case def of
-                    Packaging.DefinitionType _ -> Nothing
-                    Packaging.DefinitionTerm v0 -> Just v0
-      in (Maybes.cat (Lists.map getType defs), (Maybes.cat (Lists.map getTerm defs)))
--- | Reorder definitions: types first (with hydra.core.Name first among types), then topologically sorted terms
-reorderDefs :: [Packaging.Definition] -> [Packaging.Definition]
-reorderDefs defs =
-
-      let partitioned = partitionDefinitions defs
-          typeDefsRaw = Pairs.first partitioned
-          nameFirst =
-                  Lists.filter (\td -> Equality.equal (Packaging.typeDefinitionName td) (Core.Name "hydra.core.Name")) typeDefsRaw
-          nameRest =
-                  Lists.filter (\td -> Logic.not (Equality.equal (Packaging.typeDefinitionName td) (Core.Name "hydra.core.Name"))) typeDefsRaw
-          typeDefs =
-                  Lists.concat [
-                    Lists.map (\td -> Packaging.DefinitionType td) nameFirst,
-                    (Lists.map (\td -> Packaging.DefinitionType td) nameRest)]
-          termDefsWrapped = Lists.map (\td -> Packaging.DefinitionTerm td) (Pairs.second partitioned)
-          sortedTermDefs =
-                  Lists.concat (Sorting.topologicalSortNodes (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Packaging.termDefinitionName v0) (\d -> case d of
-                    Packaging.DefinitionTerm v0 -> Sets.toList (Variables.freeVariablesInTerm (Packaging.termDefinitionTerm v0))
-                    _ -> []) termDefsWrapped)
-      in (Lists.concat [
-        typeDefs,
-        sortedTermDefs])
--- | Convert a schema graph to a typing environment (Either version)
-schemaGraphToTypingEnvironment :: Graph.Graph -> Either Errors.Error (M.Map Core.Name Core.TypeScheme)
-schemaGraphToTypingEnvironment g =
-
-      let toTypeScheme =
-              \vars -> \typ -> case (Strip.deannotateType typ) of
-                Core.TypeForall v0 -> toTypeScheme (Lists.cons (Core.forallTypeParameter v0) vars) (Core.forallTypeBody v0)
-                _ -> Core.TypeScheme {
-                  Core.typeSchemeVariables = (Lists.reverse vars),
-                  Core.typeSchemeBody = typ,
-                  Core.typeSchemeConstraints = Nothing}
-          decodeType = \term -> Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\_a -> _a) (DecodeCore.type_ g term)
-          decodeTypeScheme = \term -> Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\_a -> _a) (DecodeCore.typeScheme g term)
-          toPair =
-                  \el ->
-                    let forTerm =
-                            \term -> case term of
-                              Core.TermRecord v0 -> Logic.ifElse (Equality.equal (Core.recordTypeName v0) (Core.Name "hydra.core.TypeScheme")) (Eithers.map Maybes.pure (decodeTypeScheme (Core.bindingTerm el))) (Right Nothing)
-                              Core.TermInject v0 -> Logic.ifElse (Equality.equal (Core.injectionTypeName v0) (Core.Name "hydra.core.Type")) (Eithers.map (\decoded -> Just (toTypeScheme [] decoded)) (decodeType (Core.bindingTerm el))) (Right Nothing)
-                              _ -> Right Nothing
-                    in (Eithers.bind (Maybes.maybe (Eithers.map (\typ -> Just (Scoping.fTypeToTypeScheme typ)) (decodeType (Core.bindingTerm el))) (\ts -> Logic.ifElse (Equality.equal ts (Core.TypeScheme {
-                      Core.typeSchemeVariables = [],
-                      Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme")),
-                      Core.typeSchemeConstraints = Nothing})) (Eithers.map Maybes.pure (decodeTypeScheme (Core.bindingTerm el))) (Logic.ifElse (Equality.equal ts (Core.TypeScheme {
-                      Core.typeSchemeVariables = [],
-                      Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                      Core.typeSchemeConstraints = Nothing})) (Eithers.map (\decoded -> Just (toTypeScheme [] decoded)) (decodeType (Core.bindingTerm el))) (forTerm (Strip.deannotateTerm (Core.bindingTerm el))))) (Core.bindingTypeScheme el)) (\mts -> Right (Maybes.map (\ts -> (Core.bindingName el, ts)) mts)))
-      in (Eithers.map (\mpairs -> Maps.fromList (Maybes.cat mpairs)) (Eithers.mapList toPair (Lexical.graphToBindings g)))
--- | Extract the bindings from a let term, or return an empty list for other terms
-termAsBindings :: Core.Term -> [Core.Binding]
-termAsBindings term =
-    case (Strip.deannotateTerm term) of
-      Core.TermLet v0 -> Core.letBindings v0
-      _ -> []
--- | Encode a map of named types to a list of bindings
-typesToDefinitions :: M.Map Core.Name Core.Type -> [Core.Binding]
-typesToDefinitions typeMap =
-
-      let toElement =
-              \pair ->
-                let name = Pairs.first pair
-                in Core.Binding {
-                  Core.bindingName = name,
-                  Core.bindingTerm = (EncodeCore.type_ (Pairs.second pair)),
-                  Core.bindingTypeScheme = Nothing}
-      in (Lists.map toElement (Maps.toList typeMap))
--- | Execute a computation in the context of a lambda body, extending the type context with the lambda parameter
-withLambdaContext :: (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t1) -> t0 -> Core.Lambda -> (t1 -> t2) -> t2
-withLambdaContext getContext setContext env lam body =
-
-      let newContext = Scoping.extendGraphForLambda (getContext env) lam
-      in (body (setContext newContext env))
--- | Execute a computation in the context of a let body, extending the type context with the let bindings
-withLetContext :: (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t1) -> (Graph.Graph -> Core.Binding -> Maybe Core.Term) -> t0 -> Core.Let -> (t1 -> t2) -> t2
-withLetContext getContext setContext forBinding env letrec body =
-
-      let newContext = Scoping.extendGraphForLet forBinding (getContext env) letrec
-      in (body (setContext newContext env))
--- | Execute a computation in the context of a type lambda body, extending the type context with the type parameter
-withTypeLambdaContext :: (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t1) -> t0 -> Core.TypeLambda -> (t1 -> t2) -> t2
-withTypeLambdaContext getContext setContext env tlam body =
-
-      let newContext = Scoping.extendGraphForTypeLambda (getContext env) tlam
-      in (body (setContext newContext env))
diff --git a/src/main/haskell/Hydra/Error/Checking.hs b/src/main/haskell/Hydra/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Error/Checking.hs
+++ /dev/null
@@ -1,185 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Error types for type checking
-
-module Hydra.Error.Checking where
-import qualified Hydra.Core as Core
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Typing as Typing
-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.Set as S
--- | An error that occurred during type checking
-data CheckingError =
-  -- | A post-unification consistency check failure
-  CheckingErrorIncorrectUnification IncorrectUnificationError |
-  -- | A type that is not a forall type when one was expected
-  CheckingErrorNotAForallType NotAForallTypeError |
-  -- | A type that is not a function type when one was expected
-  CheckingErrorNotAFunctionType NotAFunctionTypeError |
-  -- | A generic checking error
-  CheckingErrorOther OtherCheckingError |
-  -- | A type constructor applied to the wrong number of arguments
-  CheckingErrorTypeArityMismatch TypeArityMismatchError |
-  -- | A type mismatch between expected and actual types
-  CheckingErrorTypeMismatch TypeMismatchError |
-  -- | Type variables that are not bound in scope
-  CheckingErrorUnboundTypeVariables UnboundTypeVariablesError |
-  -- | A reference to a term variable that is not bound in scope, encountered during checking
-  CheckingErrorUndefinedTermVariable UndefinedTermVariableCheckingError |
-  -- | Multiple types that should be equal but are not
-  CheckingErrorUnequalTypes UnequalTypesError |
-  -- | A term variant that the type checker does not support
-  CheckingErrorUnsupportedTermVariant UnsupportedTermVariantError |
-  -- | A lambda expression without a type annotation on its parameter
-  CheckingErrorUntypedLambda UntypedLambdaError |
-  -- | A let binding without a type annotation
-  CheckingErrorUntypedLetBinding UntypedLetBindingError |
-  -- | A reference to a term variable whose type is not known, encountered during checking
-  CheckingErrorUntypedTermVariable UntypedTermVariableCheckingError
-  deriving (Eq, Ord, Read, Show)
-_CheckingError = Core.Name "hydra.error.checking.CheckingError"
-_CheckingError_incorrectUnification = Core.Name "incorrectUnification"
-_CheckingError_notAForallType = Core.Name "notAForallType"
-_CheckingError_notAFunctionType = Core.Name "notAFunctionType"
-_CheckingError_other = Core.Name "other"
-_CheckingError_typeArityMismatch = Core.Name "typeArityMismatch"
-_CheckingError_typeMismatch = Core.Name "typeMismatch"
-_CheckingError_unboundTypeVariables = Core.Name "unboundTypeVariables"
-_CheckingError_undefinedTermVariable = Core.Name "undefinedTermVariable"
-_CheckingError_unequalTypes = Core.Name "unequalTypes"
-_CheckingError_unsupportedTermVariant = Core.Name "unsupportedTermVariant"
-_CheckingError_untypedLambda = Core.Name "untypedLambda"
-_CheckingError_untypedLetBinding = Core.Name "untypedLetBinding"
-_CheckingError_untypedTermVariable = Core.Name "untypedTermVariable"
--- | A post-unification consistency check failure
-data IncorrectUnificationError =
-  IncorrectUnificationError {
-    -- | The substitution that failed the consistency check
-    incorrectUnificationErrorSubstitution :: Typing.TypeSubst}
-  deriving (Eq, Ord, Read, Show)
-_IncorrectUnificationError = Core.Name "hydra.error.checking.IncorrectUnificationError"
-_IncorrectUnificationError_substitution = Core.Name "substitution"
--- | A type that is not a forall type when type arguments are being applied
-data NotAForallTypeError =
-  NotAForallTypeError {
-    -- | The actual type encountered
-    notAForallTypeErrorType :: Core.Type,
-    -- | The type arguments that were being applied
-    notAForallTypeErrorTypeArguments :: [Core.Type]}
-  deriving (Eq, Ord, Read, Show)
-_NotAForallTypeError = Core.Name "hydra.error.checking.NotAForallTypeError"
-_NotAForallTypeError_type = Core.Name "type"
-_NotAForallTypeError_typeArguments = Core.Name "typeArguments"
--- | A type that is not a function type when one was expected in an application
-data NotAFunctionTypeError =
-  NotAFunctionTypeError {
-    -- | The actual type encountered
-    notAFunctionTypeErrorType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_NotAFunctionTypeError = Core.Name "hydra.error.checking.NotAFunctionTypeError"
-_NotAFunctionTypeError_type = Core.Name "type"
--- | A generic checking error: message + subterm path
-data OtherCheckingError =
-  OtherCheckingError {
-    -- | The subterm path at which the error was observed
-    otherCheckingErrorPath :: Paths.SubtermPath,
-    -- | A human-readable error message
-    otherCheckingErrorMessage :: String}
-  deriving (Eq, Ord, Read, Show)
-_OtherCheckingError = Core.Name "hydra.error.checking.OtherCheckingError"
-_OtherCheckingError_path = Core.Name "path"
-_OtherCheckingError_message = Core.Name "message"
--- | A type constructor applied to the wrong number of type arguments
-data TypeArityMismatchError =
-  TypeArityMismatchError {
-    -- | The type being checked
-    typeArityMismatchErrorType :: Core.Type,
-    -- | The expected number of type arguments
-    typeArityMismatchErrorExpectedArity :: Int,
-    -- | The actual number of type arguments provided
-    typeArityMismatchErrorActualArity :: Int,
-    -- | The type arguments that were provided
-    typeArityMismatchErrorTypeArguments :: [Core.Type]}
-  deriving (Eq, Ord, Read, Show)
-_TypeArityMismatchError = Core.Name "hydra.error.checking.TypeArityMismatchError"
-_TypeArityMismatchError_type = Core.Name "type"
-_TypeArityMismatchError_expectedArity = Core.Name "expectedArity"
-_TypeArityMismatchError_actualArity = Core.Name "actualArity"
-_TypeArityMismatchError_typeArguments = Core.Name "typeArguments"
--- | A type mismatch between expected and actual types
-data TypeMismatchError =
-  TypeMismatchError {
-    -- | The expected type
-    typeMismatchErrorExpectedType :: Core.Type,
-    -- | The actual type encountered
-    typeMismatchErrorActualType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_TypeMismatchError = Core.Name "hydra.error.checking.TypeMismatchError"
-_TypeMismatchError_expectedType = Core.Name "expectedType"
-_TypeMismatchError_actualType = Core.Name "actualType"
--- | Type variables that appear free in a type but are not bound in scope
-data UnboundTypeVariablesError =
-  UnboundTypeVariablesError {
-    -- | The set of unbound type variable names
-    unboundTypeVariablesErrorVariables :: (S.Set Core.Name),
-    -- | The type containing the unbound variables
-    unboundTypeVariablesErrorType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_UnboundTypeVariablesError = Core.Name "hydra.error.checking.UnboundTypeVariablesError"
-_UnboundTypeVariablesError_variables = Core.Name "variables"
-_UnboundTypeVariablesError_type = Core.Name "type"
--- | A reference to a term variable that is not bound in scope, encountered during checking
-data UndefinedTermVariableCheckingError =
-  UndefinedTermVariableCheckingError {
-    -- | The subterm path at which the variable was referenced
-    undefinedTermVariableCheckingErrorPath :: Paths.SubtermPath,
-    -- | The name of the undefined variable
-    undefinedTermVariableCheckingErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedTermVariableCheckingError = Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"
-_UndefinedTermVariableCheckingError_path = Core.Name "path"
-_UndefinedTermVariableCheckingError_name = Core.Name "name"
--- | Multiple types that should all be equal but are not
-data UnequalTypesError =
-  UnequalTypesError {
-    -- | The list of types that are not all equal
-    unequalTypesErrorTypes :: [Core.Type],
-    -- | A description of the context in which the types were expected to be equal
-    unequalTypesErrorDescription :: String}
-  deriving (Eq, Ord, Read, Show)
-_UnequalTypesError = Core.Name "hydra.error.checking.UnequalTypesError"
-_UnequalTypesError_types = Core.Name "types"
-_UnequalTypesError_description = Core.Name "description"
--- | A term variant that the type checker does not support
-data UnsupportedTermVariantError =
-  UnsupportedTermVariantError {
-    -- | The unsupported term variant
-    unsupportedTermVariantErrorTermVariant :: Variants.TermVariant}
-  deriving (Eq, Ord, Read, Show)
-_UnsupportedTermVariantError = Core.Name "hydra.error.checking.UnsupportedTermVariantError"
-_UnsupportedTermVariantError_termVariant = Core.Name "termVariant"
--- | A lambda expression without a type annotation on its parameter
-data UntypedLambdaError =
-  UntypedLambdaError {}
-  deriving (Eq, Ord, Read, Show)
-_UntypedLambdaError = Core.Name "hydra.error.checking.UntypedLambdaError"
--- | A let binding without a type annotation
-data UntypedLetBindingError =
-  UntypedLetBindingError {
-    -- | The untyped binding
-    untypedLetBindingErrorBinding :: Core.Binding}
-  deriving (Eq, Ord, Read, Show)
-_UntypedLetBindingError = Core.Name "hydra.error.checking.UntypedLetBindingError"
-_UntypedLetBindingError_binding = Core.Name "binding"
--- | A reference to a term variable whose type is not known, encountered during checking
-data UntypedTermVariableCheckingError =
-  UntypedTermVariableCheckingError {
-    -- | The subterm path at which the variable was referenced
-    untypedTermVariableCheckingErrorPath :: Paths.SubtermPath,
-    -- | The name of the untyped variable
-    untypedTermVariableCheckingErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UntypedTermVariableCheckingError = Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"
-_UntypedTermVariableCheckingError_path = Core.Name "path"
-_UntypedTermVariableCheckingError_name = Core.Name "name"
diff --git a/src/main/haskell/Hydra/Error/Core.hs b/src/main/haskell/Hydra/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Error/Core.hs
+++ /dev/null
@@ -1,524 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Error types for core type and term validation
-
-module Hydra.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | A duplicate binding name in a let expression
-data DuplicateBindingError =
-  DuplicateBindingError {
-    -- | The path to the duplicate binding within the term
-    duplicateBindingErrorLocation :: Paths.SubtermPath,
-    -- | The duplicated binding name
-    duplicateBindingErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_DuplicateBindingError = Core.Name "hydra.error.core.DuplicateBindingError"
-_DuplicateBindingError_location = Core.Name "location"
-_DuplicateBindingError_name = Core.Name "name"
--- | A duplicate field name in a record or union type
-data DuplicateFieldError =
-  DuplicateFieldError {
-    -- | The path to the duplicate field within the term
-    duplicateFieldErrorLocation :: Paths.SubtermPath,
-    -- | The duplicated field name
-    duplicateFieldErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_DuplicateFieldError = Core.Name "hydra.error.core.DuplicateFieldError"
-_DuplicateFieldError_location = Core.Name "location"
-_DuplicateFieldError_name = Core.Name "name"
--- | A reference to a field that does not exist in the given type
-data UndefinedFieldError =
-  UndefinedFieldError {
-    -- | The name of the undefined field
-    undefinedFieldErrorFieldName :: Core.Name,
-    -- | The name of the type in which the field was expected
-    undefinedFieldErrorTypeName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedFieldError = Core.Name "hydra.error.core.UndefinedFieldError"
-_UndefinedFieldError_fieldName = Core.Name "fieldName"
-_UndefinedFieldError_typeName = Core.Name "typeName"
--- | An unexpected term variant was encountered
-data UnexpectedTermVariantError =
-  UnexpectedTermVariantError {
-    -- | The expected term variant
-    unexpectedTermVariantErrorExpectedVariant :: Variants.TermVariant,
-    -- | The actual term that was encountered
-    unexpectedTermVariantErrorActualTerm :: Core.Term}
-  deriving (Eq, Ord, Read, Show)
-_UnexpectedTermVariantError = Core.Name "hydra.error.core.UnexpectedTermVariantError"
-_UnexpectedTermVariantError_expectedVariant = Core.Name "expectedVariant"
-_UnexpectedTermVariantError_actualTerm = Core.Name "actualTerm"
--- | An unexpected type variant was encountered
-data UnexpectedTypeVariantError =
-  UnexpectedTypeVariantError {
-    -- | The expected type variant
-    unexpectedTypeVariantErrorExpectedVariant :: Variants.TypeVariant,
-    -- | The actual type that was encountered
-    unexpectedTypeVariantErrorActualType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_UnexpectedTypeVariantError = Core.Name "hydra.error.core.UnexpectedTypeVariantError"
-_UnexpectedTypeVariantError_expectedVariant = Core.Name "expectedVariant"
-_UnexpectedTypeVariantError_actualType = Core.Name "actualType"
--- | An application of ifElse where the condition is a literal boolean, creating a dead branch (optional)
-data ConstantConditionError =
-  ConstantConditionError {
-    -- | The path to the constant condition within the term
-    constantConditionErrorLocation :: Paths.SubtermPath,
-    -- | The constant boolean value of the condition
-    constantConditionErrorValue :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_ConstantConditionError = Core.Name "hydra.error.core.ConstantConditionError"
-_ConstantConditionError_location = Core.Name "location"
-_ConstantConditionError_value = Core.Name "value"
--- | A case statement with no cases and no default (optional)
-data EmptyCaseStatementError =
-  EmptyCaseStatementError {
-    -- | The path to the empty case statement within the term
-    emptyCaseStatementErrorLocation :: Paths.SubtermPath,
-    -- | The name of the union type being matched
-    emptyCaseStatementErrorTypeName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_EmptyCaseStatementError = Core.Name "hydra.error.core.EmptyCaseStatementError"
-_EmptyCaseStatementError_location = Core.Name "location"
-_EmptyCaseStatementError_typeName = Core.Name "typeName"
--- | A let expression with an empty list of bindings (optional)
-data EmptyLetBindingsError =
-  EmptyLetBindingsError {
-    -- | The path to the empty let expression within the term
-    emptyLetBindingsErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_EmptyLetBindingsError = Core.Name "hydra.error.core.EmptyLetBindingsError"
-_EmptyLetBindingsError_location = Core.Name "location"
--- | A term annotation with an empty annotation map (optional)
-data EmptyTermAnnotationError =
-  EmptyTermAnnotationError {
-    -- | The path to the empty annotation within the term
-    emptyTermAnnotationErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_EmptyTermAnnotationError = Core.Name "hydra.error.core.EmptyTermAnnotationError"
-_EmptyTermAnnotationError_location = Core.Name "location"
--- | A record, injection, projection, or case statement with an empty type name (optional)
-data EmptyTypeNameInTermError =
-  EmptyTypeNameInTermError {
-    -- | The path to the term with the empty type name
-    emptyTypeNameInTermErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_EmptyTypeNameInTermError = Core.Name "hydra.error.core.EmptyTypeNameInTermError"
-_EmptyTypeNameInTermError_location = Core.Name "location"
--- | A lambda parameter name that violates naming conventions (optional)
-data InvalidLambdaParameterNameError =
-  InvalidLambdaParameterNameError {
-    -- | The path to the lambda within the term
-    invalidLambdaParameterNameErrorLocation :: Paths.SubtermPath,
-    -- | The invalid parameter name
-    invalidLambdaParameterNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_InvalidLambdaParameterNameError = Core.Name "hydra.error.core.InvalidLambdaParameterNameError"
-_InvalidLambdaParameterNameError_location = Core.Name "location"
-_InvalidLambdaParameterNameError_name = Core.Name "name"
--- | A let binding name that violates naming conventions (optional)
-data InvalidLetBindingNameError =
-  InvalidLetBindingNameError {
-    -- | The path to the binding within the term
-    invalidLetBindingNameErrorLocation :: Paths.SubtermPath,
-    -- | The invalid binding name
-    invalidLetBindingNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_InvalidLetBindingNameError = Core.Name "hydra.error.core.InvalidLetBindingNameError"
-_InvalidLetBindingNameError_location = Core.Name "location"
-_InvalidLetBindingNameError_name = Core.Name "name"
--- | A type lambda parameter name that violates naming conventions (optional)
-data InvalidTypeLambdaParameterNameError =
-  InvalidTypeLambdaParameterNameError {
-    -- | The path to the type lambda within the term
-    invalidTypeLambdaParameterNameErrorLocation :: Paths.SubtermPath,
-    -- | The invalid type lambda parameter name
-    invalidTypeLambdaParameterNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_InvalidTypeLambdaParameterNameError = Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"
-_InvalidTypeLambdaParameterNameError_location = Core.Name "location"
-_InvalidTypeLambdaParameterNameError_name = Core.Name "name"
--- | A term annotation directly wrapping another term annotation; annotations should be merged (optional)
-data NestedTermAnnotationError =
-  NestedTermAnnotationError {
-    -- | The path to the outer annotation within the term
-    nestedTermAnnotationErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_NestedTermAnnotationError = Core.Name "hydra.error.core.NestedTermAnnotationError"
-_NestedTermAnnotationError_location = Core.Name "location"
--- | An unwrap elimination applied to a wrap term of the same type, forming a no-op round-trip (optional)
-data RedundantWrapUnwrapError =
-  RedundantWrapUnwrapError {
-    -- | The path to the redundant wrap/unwrap within the term
-    redundantWrapUnwrapErrorLocation :: Paths.SubtermPath,
-    -- | The type name of the wrapper
-    redundantWrapUnwrapErrorTypeName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_RedundantWrapUnwrapError = Core.Name "hydra.error.core.RedundantWrapUnwrapError"
-_RedundantWrapUnwrapError_location = Core.Name "location"
-_RedundantWrapUnwrapError_typeName = Core.Name "typeName"
--- | A variable applied to itself, which is almost always a mistake in Hydra's type system (optional)
-data SelfApplicationError =
-  SelfApplicationError {
-    -- | The path to the self-application within the term
-    selfApplicationErrorLocation :: Paths.SubtermPath,
-    -- | The name of the variable applied to itself
-    selfApplicationErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_SelfApplicationError = Core.Name "hydra.error.core.SelfApplicationError"
-_SelfApplicationError_location = Core.Name "location"
-_SelfApplicationError_name = Core.Name "name"
--- | A lambda parameter or let binding name that shadows a variable already in scope (optional)
-data TermVariableShadowingError =
-  TermVariableShadowingError {
-    -- | The path to the shadowing binding within the term
-    termVariableShadowingErrorLocation :: Paths.SubtermPath,
-    -- | The name of the shadowed variable
-    termVariableShadowingErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_TermVariableShadowingError = Core.Name "hydra.error.core.TermVariableShadowingError"
-_TermVariableShadowingError_location = Core.Name "location"
-_TermVariableShadowingError_name = Core.Name "name"
--- | A type lambda parameter that shadows a type variable already in scope (optional)
-data TypeVariableShadowingInTypeLambdaError =
-  TypeVariableShadowingInTypeLambdaError {
-    -- | The path to the type lambda within the term
-    typeVariableShadowingInTypeLambdaErrorLocation :: Paths.SubtermPath,
-    -- | The name of the shadowed type variable
-    typeVariableShadowingInTypeLambdaErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_TypeVariableShadowingInTypeLambdaError = Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"
-_TypeVariableShadowingInTypeLambdaError_location = Core.Name "location"
-_TypeVariableShadowingInTypeLambdaError_name = Core.Name "name"
--- | A variable reference to a term name that is not bound in scope
-data UndefinedTermVariableError =
-  UndefinedTermVariableError {
-    -- | The path to the undefined variable within the term
-    undefinedTermVariableErrorLocation :: Paths.SubtermPath,
-    -- | The name of the undefined variable
-    undefinedTermVariableErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedTermVariableError = Core.Name "hydra.error.core.UndefinedTermVariableError"
-_UndefinedTermVariableError_location = Core.Name "location"
-_UndefinedTermVariableError_name = Core.Name "name"
--- | A type variable in a let binding's type scheme that is not bound by the scheme or enclosing scope
-data UndefinedTypeVariableInBindingTypeError =
-  UndefinedTypeVariableInBindingTypeError {
-    -- | The path to the binding within the term
-    undefinedTypeVariableInBindingTypeErrorLocation :: Paths.SubtermPath,
-    -- | The name of the undefined type variable
-    undefinedTypeVariableInBindingTypeErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedTypeVariableInBindingTypeError = Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"
-_UndefinedTypeVariableInBindingTypeError_location = Core.Name "location"
-_UndefinedTypeVariableInBindingTypeError_name = Core.Name "name"
--- | A type variable in a lambda domain annotation that is not bound in scope
-data UndefinedTypeVariableInLambdaDomainError =
-  UndefinedTypeVariableInLambdaDomainError {
-    -- | The path to the lambda within the term
-    undefinedTypeVariableInLambdaDomainErrorLocation :: Paths.SubtermPath,
-    -- | The name of the undefined type variable
-    undefinedTypeVariableInLambdaDomainErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedTypeVariableInLambdaDomainError = Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"
-_UndefinedTypeVariableInLambdaDomainError_location = Core.Name "location"
-_UndefinedTypeVariableInLambdaDomainError_name = Core.Name "name"
--- | A type variable in a type application term that is not bound in scope
-data UndefinedTypeVariableInTypeApplicationError =
-  UndefinedTypeVariableInTypeApplicationError {
-    -- | The path to the type application within the term
-    undefinedTypeVariableInTypeApplicationErrorLocation :: Paths.SubtermPath,
-    -- | The name of the undefined type variable
-    undefinedTypeVariableInTypeApplicationErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedTypeVariableInTypeApplicationError = Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"
-_UndefinedTypeVariableInTypeApplicationError_location = Core.Name "location"
-_UndefinedTypeVariableInTypeApplicationError_name = Core.Name "name"
--- | A primitive function reference to a name not in the known primitive registry
-data UnknownPrimitiveNameError =
-  UnknownPrimitiveNameError {
-    -- | The path to the primitive reference within the term
-    unknownPrimitiveNameErrorLocation :: Paths.SubtermPath,
-    -- | The unknown primitive name
-    unknownPrimitiveNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UnknownPrimitiveNameError = Core.Name "hydra.error.core.UnknownPrimitiveNameError"
-_UnknownPrimitiveNameError_location = Core.Name "location"
-_UnknownPrimitiveNameError_name = Core.Name "name"
--- | An application of an identity lambda to an argument, which simplifies to the argument (optional)
-data UnnecessaryIdentityApplicationError =
-  UnnecessaryIdentityApplicationError {
-    -- | The path to the identity application within the term
-    unnecessaryIdentityApplicationErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_UnnecessaryIdentityApplicationError = Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"
-_UnnecessaryIdentityApplicationError_location = Core.Name "location"
--- | A term variable whose type is not known in the current scope
-data UntypedTermVariableError =
-  UntypedTermVariableError {
-    -- | The path to the untyped variable within the term
-    untypedTermVariableErrorLocation :: Paths.SubtermPath,
-    -- | The name of the untyped variable
-    untypedTermVariableErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UntypedTermVariableError = Core.Name "hydra.error.core.UntypedTermVariableError"
-_UntypedTermVariableError_location = Core.Name "location"
-_UntypedTermVariableError_name = Core.Name "name"
--- | An error indicating that a term is invalid
-data InvalidTermError =
-  -- | An ifElse with a literal boolean condition (optional)
-  InvalidTermErrorConstantCondition ConstantConditionError |
-  -- | A duplicate binding name in a let expression
-  InvalidTermErrorDuplicateBinding DuplicateBindingError |
-  -- | A duplicate field name in a record or case statement
-  InvalidTermErrorDuplicateField DuplicateFieldError |
-  -- | A case statement with no cases and no default (optional)
-  InvalidTermErrorEmptyCaseStatement EmptyCaseStatementError |
-  -- | A let expression with no bindings (optional)
-  InvalidTermErrorEmptyLetBindings EmptyLetBindingsError |
-  -- | A term annotation with an empty annotation map (optional)
-  InvalidTermErrorEmptyTermAnnotation EmptyTermAnnotationError |
-  -- | A term with an empty type name (optional)
-  InvalidTermErrorEmptyTypeNameInTerm EmptyTypeNameInTermError |
-  -- | A lambda parameter name violating naming conventions (optional)
-  InvalidTermErrorInvalidLambdaParameterName InvalidLambdaParameterNameError |
-  -- | A let binding name violating naming conventions (optional)
-  InvalidTermErrorInvalidLetBindingName InvalidLetBindingNameError |
-  -- | A type lambda parameter name violating naming conventions (optional)
-  InvalidTermErrorInvalidTypeLambdaParameterName InvalidTypeLambdaParameterNameError |
-  -- | Nested term annotations that should be merged (optional)
-  InvalidTermErrorNestedTermAnnotation NestedTermAnnotationError |
-  -- | A no-op unwrap-of-wrap round-trip (optional)
-  InvalidTermErrorRedundantWrapUnwrap RedundantWrapUnwrapError |
-  -- | A variable applied to itself (optional)
-  InvalidTermErrorSelfApplication SelfApplicationError |
-  -- | A binding that shadows a variable already in scope (optional)
-  InvalidTermErrorTermVariableShadowing TermVariableShadowingError |
-  -- | A type lambda parameter that shadows a type variable in scope (optional)
-  InvalidTermErrorTypeVariableShadowingInTypeLambda TypeVariableShadowingInTypeLambdaError |
-  -- | A variable reference to an unbound term name
-  InvalidTermErrorUndefinedTermVariable UndefinedTermVariableError |
-  -- | An unbound type variable in a let binding's type scheme
-  InvalidTermErrorUndefinedTypeVariableInBindingType UndefinedTypeVariableInBindingTypeError |
-  -- | An unbound type variable in a lambda domain annotation
-  InvalidTermErrorUndefinedTypeVariableInLambdaDomain UndefinedTypeVariableInLambdaDomainError |
-  -- | An unbound type variable in a type application term
-  InvalidTermErrorUndefinedTypeVariableInTypeApplication UndefinedTypeVariableInTypeApplicationError |
-  -- | A reference to an unknown primitive function
-  InvalidTermErrorUnknownPrimitiveName UnknownPrimitiveNameError |
-  -- | An identity lambda applied to an argument (optional)
-  InvalidTermErrorUnnecessaryIdentityApplication UnnecessaryIdentityApplicationError |
-  -- | A term variable whose type is not known
-  InvalidTermErrorUntypedTermVariable UntypedTermVariableError
-  deriving (Eq, Ord, Read, Show)
-_InvalidTermError = Core.Name "hydra.error.core.InvalidTermError"
-_InvalidTermError_constantCondition = Core.Name "constantCondition"
-_InvalidTermError_duplicateBinding = Core.Name "duplicateBinding"
-_InvalidTermError_duplicateField = Core.Name "duplicateField"
-_InvalidTermError_emptyCaseStatement = Core.Name "emptyCaseStatement"
-_InvalidTermError_emptyLetBindings = Core.Name "emptyLetBindings"
-_InvalidTermError_emptyTermAnnotation = Core.Name "emptyTermAnnotation"
-_InvalidTermError_emptyTypeNameInTerm = Core.Name "emptyTypeNameInTerm"
-_InvalidTermError_invalidLambdaParameterName = Core.Name "invalidLambdaParameterName"
-_InvalidTermError_invalidLetBindingName = Core.Name "invalidLetBindingName"
-_InvalidTermError_invalidTypeLambdaParameterName = Core.Name "invalidTypeLambdaParameterName"
-_InvalidTermError_nestedTermAnnotation = Core.Name "nestedTermAnnotation"
-_InvalidTermError_redundantWrapUnwrap = Core.Name "redundantWrapUnwrap"
-_InvalidTermError_selfApplication = Core.Name "selfApplication"
-_InvalidTermError_termVariableShadowing = Core.Name "termVariableShadowing"
-_InvalidTermError_typeVariableShadowingInTypeLambda = Core.Name "typeVariableShadowingInTypeLambda"
-_InvalidTermError_undefinedTermVariable = Core.Name "undefinedTermVariable"
-_InvalidTermError_undefinedTypeVariableInBindingType = Core.Name "undefinedTypeVariableInBindingType"
-_InvalidTermError_undefinedTypeVariableInLambdaDomain = Core.Name "undefinedTypeVariableInLambdaDomain"
-_InvalidTermError_undefinedTypeVariableInTypeApplication = Core.Name "undefinedTypeVariableInTypeApplication"
-_InvalidTermError_unknownPrimitiveName = Core.Name "unknownPrimitiveName"
-_InvalidTermError_unnecessaryIdentityApplication = Core.Name "unnecessaryIdentityApplication"
-_InvalidTermError_untypedTermVariable = Core.Name "untypedTermVariable"
--- | A record type with duplicate field names
-data DuplicateRecordTypeFieldNamesError =
-  DuplicateRecordTypeFieldNamesError {
-    -- | The path to the record type with duplicate fields
-    duplicateRecordTypeFieldNamesErrorLocation :: Paths.SubtermPath,
-    -- | The duplicated field name
-    duplicateRecordTypeFieldNamesErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_DuplicateRecordTypeFieldNamesError = Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"
-_DuplicateRecordTypeFieldNamesError_location = Core.Name "location"
-_DuplicateRecordTypeFieldNamesError_name = Core.Name "name"
--- | A union type with duplicate field names
-data DuplicateUnionTypeFieldNamesError =
-  DuplicateUnionTypeFieldNamesError {
-    -- | The path to the union type with duplicate fields
-    duplicateUnionTypeFieldNamesErrorLocation :: Paths.SubtermPath,
-    -- | The duplicated field name
-    duplicateUnionTypeFieldNamesErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_DuplicateUnionTypeFieldNamesError = Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"
-_DuplicateUnionTypeFieldNamesError_location = Core.Name "location"
-_DuplicateUnionTypeFieldNamesError_name = Core.Name "name"
--- | A record type with no fields; TypeUnit is preferred for the unit-like case (optional)
-data EmptyRecordTypeError =
-  EmptyRecordTypeError {
-    -- | The path to the empty record type
-    emptyRecordTypeErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_EmptyRecordTypeError = Core.Name "hydra.error.core.EmptyRecordTypeError"
-_EmptyRecordTypeError_location = Core.Name "location"
--- | A type annotation with an empty annotation map (optional)
-data EmptyTypeAnnotationError =
-  EmptyTypeAnnotationError {
-    -- | The path to the empty annotation
-    emptyTypeAnnotationErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_EmptyTypeAnnotationError = Core.Name "hydra.error.core.EmptyTypeAnnotationError"
-_EmptyTypeAnnotationError_location = Core.Name "location"
--- | A union type with no alternatives; TypeVoid is preferred (optional)
-data EmptyUnionTypeError =
-  EmptyUnionTypeError {
-    -- | The path to the empty union type
-    emptyUnionTypeErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_EmptyUnionTypeError = Core.Name "hydra.error.core.EmptyUnionTypeError"
-_EmptyUnionTypeError_location = Core.Name "location"
--- | A forall type parameter name that violates type variable naming conventions (optional)
-data InvalidForallParameterNameError =
-  InvalidForallParameterNameError {
-    -- | The path to the forall type
-    invalidForallParameterNameErrorLocation :: Paths.SubtermPath,
-    -- | The invalid parameter name
-    invalidForallParameterNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_InvalidForallParameterNameError = Core.Name "hydra.error.core.InvalidForallParameterNameError"
-_InvalidForallParameterNameError_location = Core.Name "location"
-_InvalidForallParameterNameError_name = Core.Name "name"
--- | A type scheme variable name that violates type variable naming conventions (optional)
-data InvalidTypeSchemeVariableNameError =
-  InvalidTypeSchemeVariableNameError {
-    -- | The path to the type scheme
-    invalidTypeSchemeVariableNameErrorLocation :: Paths.SubtermPath,
-    -- | The invalid variable name
-    invalidTypeSchemeVariableNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_InvalidTypeSchemeVariableNameError = Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"
-_InvalidTypeSchemeVariableNameError_location = Core.Name "location"
-_InvalidTypeSchemeVariableNameError_name = Core.Name "name"
--- | A type annotation directly wrapping another type annotation; annotations should be merged (optional)
-data NestedTypeAnnotationError =
-  NestedTypeAnnotationError {
-    -- | The path to the outer annotation
-    nestedTypeAnnotationErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_NestedTypeAnnotationError = Core.Name "hydra.error.core.NestedTypeAnnotationError"
-_NestedTypeAnnotationError_location = Core.Name "location"
--- | A map type whose key type is or directly contains a function type, which cannot be compared for equality
-data NonComparableMapKeyTypeError =
-  NonComparableMapKeyTypeError {
-    -- | The path to the map type
-    nonComparableMapKeyTypeErrorLocation :: Paths.SubtermPath,
-    -- | The non-comparable key type
-    nonComparableMapKeyTypeErrorKeyType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_NonComparableMapKeyTypeError = Core.Name "hydra.error.core.NonComparableMapKeyTypeError"
-_NonComparableMapKeyTypeError_location = Core.Name "location"
-_NonComparableMapKeyTypeError_keyType = Core.Name "keyType"
--- | A set type whose element type is or directly contains a function type, which cannot be compared for equality
-data NonComparableSetElementTypeError =
-  NonComparableSetElementTypeError {
-    -- | The path to the set type
-    nonComparableSetElementTypeErrorLocation :: Paths.SubtermPath,
-    -- | The non-comparable element type
-    nonComparableSetElementTypeErrorElementType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_NonComparableSetElementTypeError = Core.Name "hydra.error.core.NonComparableSetElementTypeError"
-_NonComparableSetElementTypeError_location = Core.Name "location"
-_NonComparableSetElementTypeError_elementType = Core.Name "elementType"
--- | A union type with exactly one field; could be a wrapped type or record instead (optional)
-data SingleVariantUnionError =
-  SingleVariantUnionError {
-    -- | The path to the single-variant union type
-    singleVariantUnionErrorLocation :: Paths.SubtermPath,
-    -- | The name of the single field
-    singleVariantUnionErrorFieldName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_SingleVariantUnionError = Core.Name "hydra.error.core.SingleVariantUnionError"
-_SingleVariantUnionError_location = Core.Name "location"
-_SingleVariantUnionError_fieldName = Core.Name "fieldName"
--- | A forall type parameter that shadows a type variable already in scope (optional)
-data TypeVariableShadowingInForallError =
-  TypeVariableShadowingInForallError {
-    -- | The path to the shadowing forall type
-    typeVariableShadowingInForallErrorLocation :: Paths.SubtermPath,
-    -- | The name of the shadowed type variable
-    typeVariableShadowingInForallErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_TypeVariableShadowingInForallError = Core.Name "hydra.error.core.TypeVariableShadowingInForallError"
-_TypeVariableShadowingInForallError_location = Core.Name "location"
-_TypeVariableShadowingInForallError_name = Core.Name "name"
--- | A type variable reference to a name that is not bound in scope
-data UndefinedTypeVariableError =
-  UndefinedTypeVariableError {
-    -- | The path to the undefined type variable
-    undefinedTypeVariableErrorLocation :: Paths.SubtermPath,
-    -- | The name of the undefined type variable
-    undefinedTypeVariableErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_UndefinedTypeVariableError = Core.Name "hydra.error.core.UndefinedTypeVariableError"
-_UndefinedTypeVariableError_location = Core.Name "location"
-_UndefinedTypeVariableError_name = Core.Name "name"
--- | TypeVoid appearing in a position where no value can be constructed, such as a record field, list element, map key/value, set element, pair component, or function codomain (optional)
-data VoidInNonBottomPositionError =
-  VoidInNonBottomPositionError {
-    -- | The path to the void type in a non-bottom position
-    voidInNonBottomPositionErrorLocation :: Paths.SubtermPath}
-  deriving (Eq, Ord, Read, Show)
-_VoidInNonBottomPositionError = Core.Name "hydra.error.core.VoidInNonBottomPositionError"
-_VoidInNonBottomPositionError_location = Core.Name "location"
--- | An error indicating that a type is invalid
-data InvalidTypeError =
-  -- | A record type with duplicate field names
-  InvalidTypeErrorDuplicateRecordTypeFieldNames DuplicateRecordTypeFieldNamesError |
-  -- | A union type with duplicate field names
-  InvalidTypeErrorDuplicateUnionTypeFieldNames DuplicateUnionTypeFieldNamesError |
-  -- | A record type with no fields (optional)
-  InvalidTypeErrorEmptyRecordType EmptyRecordTypeError |
-  -- | A type annotation with an empty annotation map (optional)
-  InvalidTypeErrorEmptyTypeAnnotation EmptyTypeAnnotationError |
-  -- | A union type with no alternatives (optional)
-  InvalidTypeErrorEmptyUnionType EmptyUnionTypeError |
-  -- | A forall parameter name violating naming conventions (optional)
-  InvalidTypeErrorInvalidForallParameterName InvalidForallParameterNameError |
-  -- | A type scheme variable name violating naming conventions (optional)
-  InvalidTypeErrorInvalidTypeSchemeVariableName InvalidTypeSchemeVariableNameError |
-  -- | Nested type annotations that should be merged (optional)
-  InvalidTypeErrorNestedTypeAnnotation NestedTypeAnnotationError |
-  -- | A map with a non-comparable key type
-  InvalidTypeErrorNonComparableMapKeyType NonComparableMapKeyTypeError |
-  -- | A set with a non-comparable element type
-  InvalidTypeErrorNonComparableSetElementType NonComparableSetElementTypeError |
-  -- | A union type with only one variant (optional)
-  InvalidTypeErrorSingleVariantUnion SingleVariantUnionError |
-  -- | A forall parameter that shadows a type variable in scope (optional)
-  InvalidTypeErrorTypeVariableShadowingInForall TypeVariableShadowingInForallError |
-  -- | A type variable reference to an unbound name
-  InvalidTypeErrorUndefinedTypeVariable UndefinedTypeVariableError |
-  -- | TypeVoid in a position where no value can be constructed (optional)
-  InvalidTypeErrorVoidInNonBottomPosition VoidInNonBottomPositionError
-  deriving (Eq, Ord, Read, Show)
-_InvalidTypeError = Core.Name "hydra.error.core.InvalidTypeError"
-_InvalidTypeError_duplicateRecordTypeFieldNames = Core.Name "duplicateRecordTypeFieldNames"
-_InvalidTypeError_duplicateUnionTypeFieldNames = Core.Name "duplicateUnionTypeFieldNames"
-_InvalidTypeError_emptyRecordType = Core.Name "emptyRecordType"
-_InvalidTypeError_emptyTypeAnnotation = Core.Name "emptyTypeAnnotation"
-_InvalidTypeError_emptyUnionType = Core.Name "emptyUnionType"
-_InvalidTypeError_invalidForallParameterName = Core.Name "invalidForallParameterName"
-_InvalidTypeError_invalidTypeSchemeVariableName = Core.Name "invalidTypeSchemeVariableName"
-_InvalidTypeError_nestedTypeAnnotation = Core.Name "nestedTypeAnnotation"
-_InvalidTypeError_nonComparableMapKeyType = Core.Name "nonComparableMapKeyType"
-_InvalidTypeError_nonComparableSetElementType = Core.Name "nonComparableSetElementType"
-_InvalidTypeError_singleVariantUnion = Core.Name "singleVariantUnion"
-_InvalidTypeError_typeVariableShadowingInForall = Core.Name "typeVariableShadowingInForall"
-_InvalidTypeError_undefinedTypeVariable = Core.Name "undefinedTypeVariable"
-_InvalidTypeError_voidInNonBottomPosition = Core.Name "voidInNonBottomPosition"
diff --git a/src/main/haskell/Hydra/Error/Packaging.hs b/src/main/haskell/Hydra/Error/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Error/Packaging.hs
+++ /dev/null
@@ -1,92 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Error types for module and package validation
-
-module Hydra.Error.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | A module namespace which, when mapped to a target language's directory or package structure, conflicts with another module's mapped namespace. For example, hydra.foo.bar and hydra.fooBar might both map to the same directory in a case-insensitive filesystem.
-data ConflictingModuleNamespaceError =
-  ConflictingModuleNamespaceError {
-    -- | The first module namespace
-    conflictingModuleNamespaceErrorFirst :: Packaging.Namespace,
-    -- | The second module namespace that conflicts with the first
-    conflictingModuleNamespaceErrorSecond :: Packaging.Namespace}
-  deriving (Eq, Ord, Read, Show)
-_ConflictingModuleNamespaceError = Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"
-_ConflictingModuleNamespaceError_first = Core.Name "first"
-_ConflictingModuleNamespaceError_second = Core.Name "second"
--- | A union type variant name which, when capitalized and concatenated with its type name, conflicts with another type definition name. For example, a union type Foo with a variant bar produces FooBar, which conflicts with an existing type definition FooBar. This is currently a problem only for the Haskell target.
-data ConflictingVariantNameError =
-  ConflictingVariantNameError {
-    -- | The namespace of the module containing the conflict
-    conflictingVariantNameErrorNamespace :: Packaging.Namespace,
-    -- | The name of the union type
-    conflictingVariantNameErrorTypeName :: Core.Name,
-    -- | The name of the variant field causing the conflict
-    conflictingVariantNameErrorVariantName :: Core.Name,
-    -- | The name of the other type definition that conflicts with the generated constructor name
-    conflictingVariantNameErrorConflictingName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_ConflictingVariantNameError = Core.Name "hydra.error.packaging.ConflictingVariantNameError"
-_ConflictingVariantNameError_namespace = Core.Name "namespace"
-_ConflictingVariantNameError_typeName = Core.Name "typeName"
-_ConflictingVariantNameError_variantName = Core.Name "variantName"
-_ConflictingVariantNameError_conflictingName = Core.Name "conflictingName"
--- | A definition whose name does not have the module's namespace as a prefix. If the module namespace is foo.bar, all definition names must have the form foo.bar.quux.
-data DefinitionNotInModuleNamespaceError =
-  DefinitionNotInModuleNamespaceError {
-    -- | The namespace of the module
-    definitionNotInModuleNamespaceErrorNamespace :: Packaging.Namespace,
-    -- | The definition name that does not match the module namespace
-    definitionNotInModuleNamespaceErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_DefinitionNotInModuleNamespaceError = Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"
-_DefinitionNotInModuleNamespaceError_namespace = Core.Name "namespace"
-_DefinitionNotInModuleNamespaceError_name = Core.Name "name"
--- | Two or more definitions in the same module share the same name
-data DuplicateDefinitionNameError =
-  DuplicateDefinitionNameError {
-    -- | The namespace of the module containing the duplicates
-    duplicateDefinitionNameErrorNamespace :: Packaging.Namespace,
-    -- | The duplicated definition name
-    duplicateDefinitionNameErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_DuplicateDefinitionNameError = Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"
-_DuplicateDefinitionNameError_namespace = Core.Name "namespace"
-_DuplicateDefinitionNameError_name = Core.Name "name"
--- | Two or more modules in the same package share the same namespace
-data DuplicateModuleNamespaceError =
-  DuplicateModuleNamespaceError {
-    -- | The duplicated module namespace
-    duplicateModuleNamespaceErrorNamespace :: Packaging.Namespace}
-  deriving (Eq, Ord, Read, Show)
-_DuplicateModuleNamespaceError = Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"
-_DuplicateModuleNamespaceError_namespace = Core.Name "namespace"
--- | An error indicating that a module is invalid
-data InvalidModuleError =
-  -- | A union variant name that conflicts with another type definition when mapped to a target language
-  InvalidModuleErrorConflictingVariantName ConflictingVariantNameError |
-  -- | A definition whose name does not have the module's namespace as a prefix
-  InvalidModuleErrorDefinitionNotInModuleNamespace DefinitionNotInModuleNamespaceError |
-  -- | Two or more definitions in the same module share the same name
-  InvalidModuleErrorDuplicateDefinitionName DuplicateDefinitionNameError
-  deriving (Eq, Ord, Read, Show)
-_InvalidModuleError = Core.Name "hydra.error.packaging.InvalidModuleError"
-_InvalidModuleError_conflictingVariantName = Core.Name "conflictingVariantName"
-_InvalidModuleError_definitionNotInModuleNamespace = Core.Name "definitionNotInModuleNamespace"
-_InvalidModuleError_duplicateDefinitionName = Core.Name "duplicateDefinitionName"
--- | An error indicating that a package is invalid
-data InvalidPackageError =
-  -- | Two module namespaces that conflict when mapped to a target language
-  InvalidPackageErrorConflictingModuleNamespace ConflictingModuleNamespaceError |
-  -- | Two or more modules in the same package share the same namespace
-  InvalidPackageErrorDuplicateModuleNamespace DuplicateModuleNamespaceError |
-  -- | A module within the package is invalid
-  InvalidPackageErrorInvalidModule InvalidModuleError
-  deriving (Eq, Ord, Read, Show)
-_InvalidPackageError = Core.Name "hydra.error.packaging.InvalidPackageError"
-_InvalidPackageError_conflictingModuleNamespace = Core.Name "conflictingModuleNamespace"
-_InvalidPackageError_duplicateModuleNamespace = Core.Name "duplicateModuleNamespace"
-_InvalidPackageError_invalidModule = Core.Name "invalidModule"
diff --git a/src/main/haskell/Hydra/Error/Pg.hs b/src/main/haskell/Hydra/Error/Pg.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Error/Pg.hs
+++ /dev/null
@@ -1,191 +0,0 @@
--- 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/Errors.hs b/src/main/haskell/Hydra/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Errors.hs
+++ /dev/null
@@ -1,224 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Top-level error types for the Hydra kernel
-
-module Hydra.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Paths as Paths
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | An error that occurred during decoding of a term
-newtype DecodingError =
-  DecodingError {
-    unDecodingError :: String}
-  deriving (Eq, Ord, Read, Show)
-_DecodingError = Core.Name "hydra.errors.DecodingError"
--- | An empty list was encountered where a non-empty list was required
-type EmptyListError = ()
-_EmptyListError = Core.Name "hydra.errors.EmptyListError"
--- | An error of any kind, with kernel errors particularly differentiated
-data Error =
-  -- | A type checking error
-  ErrorChecking Checking.CheckingError |
-  -- | An error that occurred during decoding of a term
-  ErrorDecoding DecodingError |
-  -- | A duplicate binding name error
-  ErrorDuplicateBinding ErrorCore.DuplicateBindingError |
-  -- | A duplicate field name error
-  ErrorDuplicateField ErrorCore.DuplicateFieldError |
-  -- | An error that occurred while extracting a value from a term
-  ErrorExtraction ExtractionError |
-  -- | A type inference error
-  ErrorInference InferenceError |
-  -- | Any other error
-  ErrorOther OtherError |
-  -- | A name-resolution error
-  ErrorResolution ResolutionError |
-  -- | A reference to an undefined field
-  ErrorUndefinedField ErrorCore.UndefinedFieldError |
-  -- | A reference to an undefined term variable
-  ErrorUndefinedTermVariable ErrorCore.UndefinedTermVariableError |
-  -- | A term variable whose type is not known
-  ErrorUntypedTermVariable ErrorCore.UntypedTermVariableError |
-  -- | An unexpected term variant
-  ErrorUnexpectedTermVariant ErrorCore.UnexpectedTermVariantError |
-  -- | An unexpected type variant
-  ErrorUnexpectedTypeVariant ErrorCore.UnexpectedTypeVariantError |
-  -- | A type unification error
-  ErrorUnification UnificationError
-  deriving (Eq, Ord, Read, Show)
-_Error = Core.Name "hydra.errors.Error"
-_Error_checking = Core.Name "checking"
-_Error_decoding = Core.Name "decoding"
-_Error_duplicateBinding = Core.Name "duplicateBinding"
-_Error_duplicateField = Core.Name "duplicateField"
-_Error_extraction = Core.Name "extraction"
-_Error_inference = Core.Name "inference"
-_Error_other = Core.Name "other"
-_Error_resolution = Core.Name "resolution"
-_Error_undefinedField = Core.Name "undefinedField"
-_Error_undefinedTermVariable = Core.Name "undefinedTermVariable"
-_Error_untypedTermVariable = Core.Name "untypedTermVariable"
-_Error_unexpectedTermVariant = Core.Name "unexpectedTermVariant"
-_Error_unexpectedTypeVariant = Core.Name "unexpectedTypeVariant"
-_Error_unification = Core.Name "unification"
--- | An error that occurred while extracting a typed value from a term
-data ExtractionError =
-  -- | An empty list was encountered where a non-empty list was required
-  ExtractionErrorEmptyList EmptyListError |
-  -- | Multiple let bindings were found with the same name
-  ExtractionErrorMultipleBindings MultipleBindingsError |
-  -- | Multiple record fields were found with the same field name
-  ExtractionErrorMultipleFields MultipleFieldsError |
-  -- | No field with the expected name was found in a record
-  ExtractionErrorNoMatchingField NoMatchingFieldError |
-  -- | No let binding with the expected name was found
-  ExtractionErrorNoSuchBinding NoSuchBindingError |
-  -- | A case statement did not contain enough cases to match the target
-  ExtractionErrorNotEnoughCases NotEnoughCasesError |
-  -- | A term, type, literal, or other value had an unexpected shape
-  ExtractionErrorUnexpectedShape UnexpectedShapeError
-  deriving (Eq, Ord, Read, Show)
-_ExtractionError = Core.Name "hydra.errors.ExtractionError"
-_ExtractionError_emptyList = Core.Name "emptyList"
-_ExtractionError_multipleBindings = Core.Name "multipleBindings"
-_ExtractionError_multipleFields = Core.Name "multipleFields"
-_ExtractionError_noMatchingField = Core.Name "noMatchingField"
-_ExtractionError_noSuchBinding = Core.Name "noSuchBinding"
-_ExtractionError_notEnoughCases = Core.Name "notEnoughCases"
-_ExtractionError_unexpectedShape = Core.Name "unexpectedShape"
--- | An error that occurred during type inference
-data InferenceError =
-  -- | A type checking error encountered during inference
-  InferenceErrorChecking Checking.CheckingError |
-  -- | A generic inference error carrying a message and a subterm path. Placeholder arm; sites should migrate to typed variants.
-  InferenceErrorOther OtherInferenceError |
-  -- | A unification failure encountered while inferring types
-  InferenceErrorUnification UnificationInferenceError
-  deriving (Eq, Ord, Read, Show)
-_InferenceError = Core.Name "hydra.errors.InferenceError"
-_InferenceError_checking = Core.Name "checking"
-_InferenceError_other = Core.Name "other"
-_InferenceError_unification = Core.Name "unification"
--- | Multiple let bindings with the same name were found
-data MultipleBindingsError =
-  MultipleBindingsError {
-    -- | The binding name which was duplicated
-    multipleBindingsErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_MultipleBindingsError = Core.Name "hydra.errors.MultipleBindingsError"
-_MultipleBindingsError_name = Core.Name "name"
--- | Multiple fields with the same name were found in a record
-data MultipleFieldsError =
-  MultipleFieldsError {
-    -- | The field name which appeared more than once
-    multipleFieldsErrorFieldName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_MultipleFieldsError = Core.Name "hydra.errors.MultipleFieldsError"
-_MultipleFieldsError_fieldName = Core.Name "fieldName"
--- | No field with the expected name was present
-data NoMatchingFieldError =
-  NoMatchingFieldError {
-    -- | The field name which was not found
-    noMatchingFieldErrorFieldName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_NoMatchingFieldError = Core.Name "hydra.errors.NoMatchingFieldError"
-_NoMatchingFieldError_fieldName = Core.Name "fieldName"
--- | No let binding with the expected name was present
-data NoSuchBindingError =
-  NoSuchBindingError {
-    -- | The binding name which was not found
-    noSuchBindingErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_NoSuchBindingError = Core.Name "hydra.errors.NoSuchBindingError"
-_NoSuchBindingError_name = Core.Name "name"
--- | No primitive function with the expected name was registered in the graph
-data NoSuchPrimitiveError =
-  NoSuchPrimitiveError {
-    -- | The primitive name which was not found
-    noSuchPrimitiveErrorName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-_NoSuchPrimitiveError = Core.Name "hydra.errors.NoSuchPrimitiveError"
-_NoSuchPrimitiveError_name = Core.Name "name"
--- | A case statement was missing a case for the requested variant
-type NotEnoughCasesError = ()
-_NotEnoughCasesError = Core.Name "hydra.errors.NotEnoughCasesError"
--- | Any other error
-newtype OtherError =
-  OtherError {
-    unOtherError :: String}
-  deriving (Eq, Ord, Read, Show)
-_OtherError = Core.Name "hydra.errors.OtherError"
--- | A generic inference error: message + subterm path
-data OtherInferenceError =
-  OtherInferenceError {
-    -- | The subterm path at which the error was observed
-    otherInferenceErrorPath :: Paths.SubtermPath,
-    -- | A human-readable error message
-    otherInferenceErrorMessage :: String}
-  deriving (Eq, Ord, Read, Show)
-_OtherInferenceError = Core.Name "hydra.errors.OtherInferenceError"
-_OtherInferenceError_path = Core.Name "path"
-_OtherInferenceError_message = Core.Name "message"
--- | A generic resolution error: message
-newtype OtherResolutionError =
-  OtherResolutionError {
-    unOtherResolutionError :: String}
-  deriving (Eq, Ord, Read, Show)
-_OtherResolutionError = Core.Name "hydra.errors.OtherResolutionError"
--- | An error that occurred while resolving a name, primitive, or record/union shape in a graph
-data ResolutionError =
-  -- | No binding with the expected name was found in the graph
-  ResolutionErrorNoSuchBinding NoSuchBindingError |
-  -- | No primitive function with the expected name was found in the graph
-  ResolutionErrorNoSuchPrimitive NoSuchPrimitiveError |
-  -- | No field with the expected name was present in a record or case statement
-  ResolutionErrorNoMatchingField NoMatchingFieldError |
-  -- | A generic resolution error carrying a message
-  ResolutionErrorOther OtherResolutionError |
-  -- | A term had a shape other than the one expected (e.g. a record, an injection)
-  ResolutionErrorUnexpectedShape UnexpectedShapeError
-  deriving (Eq, Ord, Read, Show)
-_ResolutionError = Core.Name "hydra.errors.ResolutionError"
-_ResolutionError_noSuchBinding = Core.Name "noSuchBinding"
-_ResolutionError_noSuchPrimitive = Core.Name "noSuchPrimitive"
-_ResolutionError_noMatchingField = Core.Name "noMatchingField"
-_ResolutionError_other = Core.Name "other"
-_ResolutionError_unexpectedShape = Core.Name "unexpectedShape"
--- | A term, type, literal, or related value had a shape other than the one expected
-data UnexpectedShapeError =
-  UnexpectedShapeError {
-    -- | A description of the expected shape
-    unexpectedShapeErrorExpected :: String,
-    -- | A description of the shape actually encountered
-    unexpectedShapeErrorActual :: String}
-  deriving (Eq, Ord, Read, Show)
-_UnexpectedShapeError = Core.Name "hydra.errors.UnexpectedShapeError"
-_UnexpectedShapeError_expected = Core.Name "expected"
-_UnexpectedShapeError_actual = Core.Name "actual"
--- | An error that occurred during type unification
-data UnificationError =
-  UnificationError {
-    -- | The left-hand type in the unification
-    unificationErrorLeftType :: Core.Type,
-    -- | The right-hand type in the unification
-    unificationErrorRightType :: Core.Type,
-    -- | A human-readable error message
-    unificationErrorMessage :: String}
-  deriving (Eq, Ord, Read, Show)
-_UnificationError = Core.Name "hydra.errors.UnificationError"
-_UnificationError_leftType = Core.Name "leftType"
-_UnificationError_rightType = Core.Name "rightType"
-_UnificationError_message = Core.Name "message"
--- | A unification failure at a specific subterm locus during inference
-data UnificationInferenceError =
-  UnificationInferenceError {
-    -- | The subterm path at which the unification failure was observed
-    unificationInferenceErrorPath :: Paths.SubtermPath,
-    -- | The underlying unification error
-    unificationInferenceErrorCause :: UnificationError}
-  deriving (Eq, Ord, Read, Show)
-_UnificationInferenceError = Core.Name "hydra.errors.UnificationInferenceError"
-_UnificationInferenceError_path = Core.Name "path"
-_UnificationInferenceError_cause = Core.Name "cause"
diff --git a/src/main/haskell/Hydra/Eval/Lib/Eithers.hs b/src/main/haskell/Hydra/Eval/Lib/Eithers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Eithers.hs
+++ /dev/null
@@ -1,223 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Either functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Eithers where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Show.Core as ShowCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly bimap for Either terms.
-bimap :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-bimap cx g leftFun rightFun eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\val -> Core.TermEither (Left (Core.TermApplication (Core.Application {
-        Core.applicationFunction = leftFun,
-        Core.applicationArgument = val})))) (\val -> Core.TermEither (Right (Core.TermApplication (Core.Application {
-        Core.applicationFunction = rightFun,
-        Core.applicationArgument = val})))) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly bind for Either terms.
-bind :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-bind cx g eitherTerm funTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\val -> Core.TermEither (Left val)) (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = val})) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly case analysis for Either terms.
-either :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-either cx g leftFun rightFun eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = leftFun,
-        Core.applicationArgument = val})) (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = rightFun,
-        Core.applicationArgument = val})) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly foldl for Either.
-foldl :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-foldl cx g funTerm initTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Lists.foldl (\acc -> \el -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "err"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "a"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = funTerm,
-              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-            Core.applicationArgument = el}))}))})),
-      Core.applicationArgument = acc})) (Core.TermEither (Right initTerm)) elements))
--- | Interpreter-friendly fromLeft for Either terms.
-fromLeft :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-fromLeft cx g defaultTerm eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\val -> val) (\_ -> defaultTerm) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly fromRight for Either terms.
-fromRight :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-fromRight cx g defaultTerm eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\_ -> defaultTerm) (\val -> val) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly isLeft for Either terms.
-isLeft :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-isLeft cx g eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\_ -> Core.TermLiteral (Core.LiteralBoolean True)) (\_ -> Core.TermLiteral (Core.LiteralBoolean False)) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly isRight for Either terms.
-isRight :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-isRight cx g eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\_ -> Core.TermLiteral (Core.LiteralBoolean False)) (\_ -> Core.TermLiteral (Core.LiteralBoolean True)) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly lefts for list of Either terms.
-lefts :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-lefts cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermList (Lists.foldl (\acc -> \el -> case el of
-      Core.TermEither v0 -> Eithers.either (\val -> Lists.concat2 acc (Lists.pure val)) (\_ -> acc) v0
-      _ -> acc) [] elements)))
--- | Interpreter-friendly map for Either terms.
-map :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-map cx g rightFun eitherTerm =
-    case eitherTerm of
-      Core.TermEither v0 -> Right (Eithers.either (\val -> Core.TermEither (Left val)) (\val -> Core.TermEither (Right (Core.TermApplication (Core.Application {
-        Core.applicationFunction = rightFun,
-        Core.applicationArgument = val})))) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term eitherTerm)})))
--- | Interpreter-friendly mapList for Either (traverse).
-mapList :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-mapList cx g funTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Lists.foldl (\acc -> \el -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "err"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "y"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "accErr"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "accErr"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "ys"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermEither (Right (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "ys"))}))))}))})),
-            Core.applicationArgument = acc}))}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = el}))})) (Core.TermEither (Right (Core.TermList []))) (Lists.reverse elements)))
--- | Interpreter-friendly mapMaybe for Either (traverse over Maybe).
-mapMaybe :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-mapMaybe cx g funTerm maybeTerm =
-    case maybeTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe (Core.TermEither (Right (Core.TermMaybe Nothing))) (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "err"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "y"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermEither (Right (Core.TermMaybe (Just (Core.TermVariable (Core.Name "y"))))))}))})),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = funTerm,
-          Core.applicationArgument = val}))})) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "maybe value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term maybeTerm)})))
--- | Interpreter-friendly mapSet for Either (traverse over Set).
-mapSet :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-mapSet cx g funTerm setTerm =
-    Eithers.bind (ExtractCore.set g setTerm) (\elements -> Right (Lists.foldl (\acc -> \el -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "err"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "y"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "accErr"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "accErr"))))}))})),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "ys"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermEither (Right (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.insert")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "ys"))}))))}))})),
-            Core.applicationArgument = acc}))}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = el}))})) (Core.TermEither (Right (Core.TermSet (Sets.fromList [])))) (Sets.toList elements)))
--- | Interpreter-friendly partitionEithers for list of Either terms.
-partitionEithers :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error ([Core.Term], [Core.Term])
-partitionEithers cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Lists.foldl (\acc -> \el ->
-      let ls = Pairs.first acc
-          rs = Pairs.second acc
-      in case el of
-        Core.TermEither v0 -> Eithers.either (\val -> (Lists.concat2 ls (Lists.pure val), rs)) (\val -> (ls, (Lists.concat2 rs (Lists.pure val)))) v0
-        _ -> acc) ([], []) elements))
--- | Interpreter-friendly rights for list of Either terms.
-rights :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-rights cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermList (Lists.foldl (\acc -> \el -> case el of
-      Core.TermEither v0 -> Eithers.either (\_ -> acc) (\val -> Lists.concat2 acc (Lists.pure val)) v0
-      _ -> acc) [] elements)))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Equality.hs b/src/main/haskell/Hydra/Eval/Lib/Equality.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Equality.hs
+++ /dev/null
@@ -1,38 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Equality functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Equality where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly identity function.
-identity :: t0 -> t1 -> t2 -> Either t3 t2
-identity cx g x = Right x
--- | Interpreter-friendly max.
-max :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-max cx g x y =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gte")),
-              Core.applicationArgument = x})),
-            Core.applicationArgument = y}))})),
-        Core.applicationArgument = x})),
-      Core.applicationArgument = y}))
--- | Interpreter-friendly min.
-min :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-min cx g x y =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lte")),
-              Core.applicationArgument = x})),
-            Core.applicationArgument = y}))})),
-        Core.applicationArgument = x})),
-      Core.applicationArgument = y}))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Lists.hs b/src/main/haskell/Hydra/Eval/Lib/Lists.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Lists.hs
+++ /dev/null
@@ -1,420 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of List functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Lists where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Reduction as Reduction
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly applicative apply for List terms.
-apply :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-apply cx g funsTerm argsTerm =
-    Eithers.bind (ExtractCore.list g funsTerm) (\funs -> Eithers.bind (ExtractCore.list g argsTerm) (\arguments ->
-      let applyOne =
-              \f -> Lists.map (\arg -> Core.TermApplication (Core.Application {
-                Core.applicationFunction = f,
-                Core.applicationArgument = arg})) arguments
-      in (Right (Core.TermList (Lists.concat (Lists.map applyOne funs))))))
--- | Interpreter-friendly monadic bind for List terms.
-bind :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-bind cx g listTerm funTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-      Core.applicationArgument = (Core.TermList (Lists.map (\el -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = el})) elements))})))
--- | Interpreter-friendly concat2 for List terms.
-concat2 :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-concat2 cx g list1 list2 =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-      Core.applicationArgument = (Core.TermList [
-        list1,
-        list2])}))
--- | Interpreter-friendly dropWhile for List terms.
-dropWhile :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-dropWhile cx g predTerm listTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
-          Core.applicationArgument = predTerm})),
-        Core.applicationArgument = listTerm}))}))
--- | Interpreter-friendly elem for List terms.
-elem :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-elem cx g x listTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.isJust")),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-            Core.applicationArgument = x}))})),
-        Core.applicationArgument = listTerm}))}))
--- | Interpreter-friendly filter for List terms.
-filter :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-filter cx g predTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-      Core.applicationArgument = (Core.TermList (Lists.map (\el -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = predTerm,
-              Core.applicationArgument = el}))})),
-          Core.applicationArgument = (Core.TermList (Lists.pure el))})),
-        Core.applicationArgument = (Core.TermList [])})) elements))})))
--- | Interpreter-friendly find for List terms.
-find :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-find cx g predTerm listTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
-          Core.applicationArgument = predTerm})),
-        Core.applicationArgument = listTerm}))}))
--- | Interpreter-friendly left fold for List terms.
-foldl :: Context.Context -> Graph.Graph -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-foldl cx g funTerm initTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Lists.foldl (\acc -> \el -> Eithers.bind acc (\reducedAcc -> Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = reducedAcc})),
-      Core.applicationArgument = el})))) (Right initTerm) elements)
--- | Interpreter-friendly right fold for List terms.
-foldr :: Context.Context -> Graph.Graph -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-foldr cx g funTerm initTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Lists.foldr (\el -> \acc -> Eithers.bind acc (\reducedAcc -> Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = el})),
-      Core.applicationArgument = reducedAcc})))) (Right initTerm) elements)
--- | Interpreter-friendly group for List terms.
-group :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-group cx g listTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.Name "foldResult"),
-        Core.lambdaDomain = Nothing,
-        Core.lambdaBody = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "foldResult"))}))}))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "foldResult"))}))})),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "foldResult"))}))})),
-            Core.applicationArgument = (Core.TermList [
-              Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "foldResult"))})])}))}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "acc"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "el"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                      Core.applicationArgument = (Core.TermPair (Core.TermList [
-                        Core.TermVariable (Core.Name "el")], (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))}))))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "h"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "el"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "h"))}))})),
-                          Core.applicationArgument = (Core.TermPair (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))}))})),
-                            Core.applicationArgument = (Core.TermList [
-                              Core.TermVariable (Core.Name "el")])}), (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))}))))})),
-                        Core.applicationArgument = (Core.TermPair (Core.TermList [
-                          Core.TermVariable (Core.Name "el")], (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))}))})),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))})])}))))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))}))}))}))}))}))})),
-          Core.applicationArgument = (Core.TermPair (Core.TermList [], (Core.TermList [])))})),
-        Core.applicationArgument = listTerm}))}))
--- | Interpreter-friendly intercalate for List terms.
-intercalate :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-intercalate cx g sep listsTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
-          Core.applicationArgument = sep})),
-        Core.applicationArgument = listsTerm}))}))
--- | Interpreter-friendly intersperse for List terms.
-intersperse :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-intersperse cx g sep listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermList (Maybes.maybe [] (\p -> Lists.cons (Pairs.first p) (Lists.concat (Lists.map (\el -> [
-      sep,
-      el]) (Pairs.second p)))) (Lists.uncons elements))))
--- | Interpreter-friendly map for List terms.
-map :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-map cx g funTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermList (Lists.reverse (Lists.foldl (\acc -> \el -> Lists.cons (Core.TermApplication (Core.Application {
-      Core.applicationFunction = funTerm,
-      Core.applicationArgument = el})) acc) [] elements))))
--- | Interpreter-friendly maybeHead for List terms.
-maybeHead :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-maybeHead cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermMaybe (Maybes.maybe Nothing (\p -> Just (Pairs.first p)) (Lists.uncons elements))))
--- | Interpreter-friendly nub for List terms.
-nub :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-nub cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "acc"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))}))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermVariable (Core.Name "x")])}))}))}))}))})),
-        Core.applicationArgument = (Core.TermList [])})),
-      Core.applicationArgument = listTerm})))
--- | Interpreter-friendly partition for List terms.
-partition :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-partition cx g predTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements ->
-      let initialState = Core.TermPair (Core.TermList [], (Core.TermList []))
-          finalState =
-                  Lists.foldl (\acc -> \el ->
-                    let yeses =
-                            Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                              Core.applicationArgument = acc})
-                        nos =
-                                Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                                  Core.applicationArgument = acc})
-                    in (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = predTerm,
-                            Core.applicationArgument = el}))})),
-                        Core.applicationArgument = (Core.TermPair (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                            Core.applicationArgument = yeses})),
-                          Core.applicationArgument = (Core.TermList [
-                            el])}), nos))})),
-                      Core.applicationArgument = (Core.TermPair (yeses, (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                          Core.applicationArgument = nos})),
-                        Core.applicationArgument = (Core.TermList [
-                          el])}))))}))) initialState elements
-      in (Right finalState))
--- | Interpreter-friendly pure for List terms.
-pure :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-pure cx g x = Right (Core.TermList [
-  x])
--- | Interpreter-friendly replicate for List terms.
-replicate :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-replicate cx g n x =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-          Core.lambdaParameter = (Core.Name "_"),
-          Core.lambdaDomain = Nothing,
-          Core.lambdaBody = x}))})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.range")),
-          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-        Core.applicationArgument = n}))}))
--- | Interpreter-friendly singleton for List terms.
-singleton :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-singleton cx g x = Right (Core.TermList [
-  x])
--- | Interpreter-friendly sort for List terms.
-sort :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-sort cx g listTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortOn")),
-        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.equality.identity"))})),
-      Core.applicationArgument = listTerm}))
--- | Interpreter-friendly sortOn for List terms.
-sortOn :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-sortOn cx g projTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Lists.foldl (\sorted -> \x ->
-      let splitResult =
-              Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lte")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = projTerm,
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = projTerm,
-                        Core.applicationArgument = x}))}))}))})),
-                Core.applicationArgument = sorted})
-          before =
-                  Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                    Core.applicationArgument = splitResult})
-          after =
-                  Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                    Core.applicationArgument = splitResult})
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-          Core.applicationArgument = before})),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-            Core.applicationArgument = x})),
-          Core.applicationArgument = after}))}))) (Core.TermList []) elements))
--- | Interpreter-friendly span for List terms.
-span :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-span cx g predTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements ->
-      let initialState =
-              Core.TermPair (Core.TermPair (Core.TermLiteral (Core.LiteralBoolean True), (Core.TermList [])), (Core.TermList []))
-          finalState =
-                  Lists.foldl (\acc -> \el ->
-                    let takingLeft =
-                            Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                              Core.applicationArgument = acc})
-                        right =
-                                Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                                  Core.applicationArgument = acc})
-                        taking =
-                                Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                                  Core.applicationArgument = takingLeft})
-                        left =
-                                Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                                  Core.applicationArgument = takingLeft})
-                    in (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.and")),
-                              Core.applicationArgument = taking})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = predTerm,
-                              Core.applicationArgument = el}))}))})),
-                        Core.applicationArgument = (Core.TermPair (Core.TermPair (Core.TermLiteral (Core.LiteralBoolean True), (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                            Core.applicationArgument = left})),
-                          Core.applicationArgument = (Core.TermList [
-                            el])}))), right))})),
-                      Core.applicationArgument = (Core.TermPair (Core.TermPair (Core.TermLiteral (Core.LiteralBoolean False), left), (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                          Core.applicationArgument = right})),
-                        Core.applicationArgument = (Core.TermList [
-                          el])}))))}))) initialState elements
-      in (Right (Core.TermPair (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-          Core.applicationArgument = finalState}))}), (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-        Core.applicationArgument = finalState}))))))
--- | Interpreter-friendly uncons for List terms.
-uncons :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-uncons cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermMaybe (Maybes.maybe Nothing (\h -> Just (Core.TermPair (h, (Core.TermList (Lists.drop 1 elements))))) (Lists.maybeAt 0 elements))))
--- | Interpreter-friendly zipWith for List terms.
-zipWith :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-zipWith cx g funTerm listTerm1 listTerm2 =
-    Eithers.bind (ExtractCore.list g listTerm1) (\elements1 -> Eithers.bind (ExtractCore.list g listTerm2) (\elements2 -> Right (Core.TermList (Lists.map (\p ->
-      let a = Pairs.first p
-          b = Pairs.second p
-      in (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = funTerm,
-          Core.applicationArgument = a})),
-        Core.applicationArgument = b}))) (Lists.zip elements1 elements2)))))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Logic.hs b/src/main/haskell/Hydra/Eval/Lib/Logic.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Logic.hs
+++ /dev/null
@@ -1,37 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Logic functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Logic where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly logical AND.
-and :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-and cx g a b =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = a})),
-        Core.applicationArgument = b})),
-      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))}))
--- | Interpreter-friendly logical NOT.
-not :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-not cx g a =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = a})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))}))
--- | Interpreter-friendly logical OR.
-or :: t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Core.Term
-or cx g a b =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = a})),
-        Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-      Core.applicationArgument = b}))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Maps.hs b/src/main/haskell/Hydra/Eval/Lib/Maps.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Maps.hs
+++ /dev/null
@@ -1,155 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Map functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Maps where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Show.Core as ShowCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly alter for Map terms.
-alter :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-alter cx g funTerm keyTerm mapTerm =
-    case mapTerm of
-      Core.TermMap v0 ->
-        let currentVal = Maps.lookup keyTerm v0
-            newVal =
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = funTerm,
-                      Core.applicationArgument = (Core.TermMaybe currentVal)})
-        in (Right (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.delete")),
-                  Core.applicationArgument = keyTerm})),
-                Core.applicationArgument = mapTerm}))})),
-            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "newV"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.insert")),
-                    Core.applicationArgument = keyTerm})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "newV"))})),
-                Core.applicationArgument = mapTerm}))}))})),
-          Core.applicationArgument = newVal})))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "map value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term mapTerm)})))
--- | Interpreter-friendly bimap for Map terms.
-bimap :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-bimap cx g keyFun valFun mapTerm =
-    case mapTerm of
-      Core.TermMap v0 ->
-        let pairs = Maps.toList v0
-        in (Right (Core.TermMap (Maps.fromList (Lists.map (\p ->
-          let k = Pairs.first p
-              v = Pairs.second p
-          in (Core.TermApplication (Core.Application {
-            Core.applicationFunction = keyFun,
-            Core.applicationArgument = k}), (Core.TermApplication (Core.Application {
-            Core.applicationFunction = valFun,
-            Core.applicationArgument = v})))) pairs))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "map value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term mapTerm)})))
--- | Interpreter-friendly filter for Map terms.
-filter :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-filter cx g valPred mapTerm =
-    case mapTerm of
-      Core.TermMap v0 ->
-        let pairs = Maps.toList v0
-        in (Right (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-            Core.applicationArgument = (Core.TermList (Lists.map (\p ->
-              let v = Pairs.second p
-              in (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = valPred,
-                      Core.applicationArgument = v}))})),
-                  Core.applicationArgument = (Core.TermList (Lists.pure (Core.TermPair (Pairs.first p, v))))})),
-                Core.applicationArgument = (Core.TermList [])}))) pairs))}))})))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "map value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term mapTerm)})))
--- | Interpreter-friendly filterWithKey for Map terms.
-filterWithKey :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-filterWithKey cx g pred mapTerm =
-    case mapTerm of
-      Core.TermMap v0 ->
-        let pairs = Maps.toList v0
-        in (Right (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-            Core.applicationArgument = (Core.TermList (Lists.map (\p ->
-              let k = Pairs.first p
-                  v = Pairs.second p
-              in (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = pred,
-                        Core.applicationArgument = k})),
-                      Core.applicationArgument = v}))})),
-                  Core.applicationArgument = (Core.TermList (Lists.pure (Core.TermPair (k, v))))})),
-                Core.applicationArgument = (Core.TermList [])}))) pairs))}))})))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "map value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term mapTerm)})))
--- | Interpreter-friendly findWithDefault for Map terms.
-findWithDefault :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either t2 Core.Term
-findWithDefault cx g defaultTerm keyTerm mapTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.fromMaybe")),
-        Core.applicationArgument = defaultTerm})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-          Core.applicationArgument = keyTerm})),
-        Core.applicationArgument = mapTerm}))}))
--- | Interpreter-friendly map for Map terms.
-map :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-map cx g valFun mapTerm =
-    case mapTerm of
-      Core.TermMap v0 ->
-        let pairs = Maps.toList v0
-        in (Right (Core.TermMap (Maps.fromList (Lists.map (\p ->
-          let k = Pairs.first p
-              v = Pairs.second p
-          in (k, (Core.TermApplication (Core.Application {
-            Core.applicationFunction = valFun,
-            Core.applicationArgument = v})))) pairs))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "map value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term mapTerm)})))
--- | Interpreter-friendly mapKeys for Map terms.
-mapKeys :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-mapKeys cx g keyFun mapTerm =
-    case mapTerm of
-      Core.TermMap v0 ->
-        let pairs = Maps.toList v0
-        in (Right (Core.TermMap (Maps.fromList (Lists.map (\p ->
-          let k = Pairs.first p
-              v = Pairs.second p
-          in (Core.TermApplication (Core.Application {
-            Core.applicationFunction = keyFun,
-            Core.applicationArgument = k}), v)) pairs))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "map value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term mapTerm)})))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Math.hs b/src/main/haskell/Hydra/Eval/Lib/Math.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Math.hs
+++ /dev/null
@@ -1,31 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Math functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Math where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly even.
-even :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-even cx g x =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.fromMaybe")),
-            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-              Core.applicationArgument = x})),
-            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))})),
-      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))
--- | Interpreter-friendly odd.
-odd :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-odd cx g x =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.not")),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-        Core.applicationArgument = x}))}))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Maybes.hs b/src/main/haskell/Hydra/Eval/Lib/Maybes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Maybes.hs
+++ /dev/null
@@ -1,137 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Maybe functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Maybes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Show.Core as ShowCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly applicative apply for Maybe terms.
-apply :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-apply cx g funOptTerm argOptTerm =
-    case funOptTerm of
-      Core.TermMaybe v0 -> case argOptTerm of
-        Core.TermMaybe v1 -> Right (Core.TermMaybe (Maybes.bind v0 (\f -> Maybes.map (\x -> Core.TermApplication (Core.Application {
-          Core.applicationFunction = f,
-          Core.applicationArgument = x})) v1)))
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "optional value",
-          Errors.unexpectedShapeErrorActual = (ShowCore.term argOptTerm)})))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional function",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term funOptTerm)})))
--- | Interpreter-friendly monadic bind for Maybe terms.
-bind :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-bind cx g optTerm funTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe (Core.TermMaybe Nothing) (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = val})) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly case analysis for Maybe terms (cases argument order).
-cases :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-cases cx g optTerm defaultTerm funTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe defaultTerm (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = val})) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly cat for list of Maybe terms.
-cat :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error [Core.Term]
-cat cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Lists.foldl (\acc -> \el -> case el of
-      Core.TermMaybe v0 -> Maybes.maybe acc (\v -> Lists.concat2 acc (Lists.pure v)) v0
-      _ -> acc) [] elements))
--- | Interpreter-friendly Kleisli composition for Maybe.
-compose :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either t2 Core.Term
-compose cx g funF funG xTerm =
-    Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.bind")),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = funF,
-          Core.applicationArgument = xTerm}))})),
-      Core.applicationArgument = funG}))
--- | Interpreter-friendly fromJust for Maybe terms.
-fromJust :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-fromJust cx g optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Maybes.maybe (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "Just value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))) (\val -> Right val) v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly fromMaybe for Maybe terms.
-fromMaybe :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-fromMaybe cx g defaultTerm optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe defaultTerm (\val -> val) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly isJust for Maybe terms.
-isJust :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-isJust cx g optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe (Core.TermLiteral (Core.LiteralBoolean False)) (\_ -> Core.TermLiteral (Core.LiteralBoolean True)) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly isNothing for Maybe terms.
-isNothing :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-isNothing cx g optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe (Core.TermLiteral (Core.LiteralBoolean True)) (\_ -> Core.TermLiteral (Core.LiteralBoolean False)) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly map for Maybe terms.
-map :: t0 -> t1 -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-map cx g funTerm optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Core.TermMaybe (Maybes.map (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = val})) v0))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly mapMaybe for List terms.
-mapMaybe :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-mapMaybe cx g funTerm listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.cat")),
-      Core.applicationArgument = (Core.TermList (Lists.map (\el -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = el})) elements))})))
--- | Interpreter-friendly case analysis for Maybe terms.
-maybe :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-maybe cx g defaultTerm funTerm optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Maybes.maybe defaultTerm (\val -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = funTerm,
-        Core.applicationArgument = val})) v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
--- | Interpreter-friendly pure for Maybe terms.
-pure :: t0 -> t1 -> Core.Term -> Either t2 Core.Term
-pure cx g x = Right (Core.TermMaybe (Just x))
--- | Interpreter-friendly toList for Maybe terms.
-toList :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-toList cx g optTerm =
-    case optTerm of
-      Core.TermMaybe v0 -> Right (Core.TermList (Maybes.maybe [] (\val -> Lists.pure val) v0))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "optional value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term optTerm)})))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Pairs.hs b/src/main/haskell/Hydra/Eval/Lib/Pairs.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Pairs.hs
+++ /dev/null
@@ -1,41 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Pair functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Pairs where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Show.Core as ShowCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly bimap for Pair terms.
-bimap :: t0 -> t1 -> Core.Term -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-bimap cx g firstFun secondFun pairTerm =
-    case pairTerm of
-      Core.TermPair v0 ->
-        let fst = Pairs.first v0
-            snd = Pairs.second v0
-        in (Right (Core.TermPair (Core.TermApplication (Core.Application {
-          Core.applicationFunction = firstFun,
-          Core.applicationArgument = fst}), (Core.TermApplication (Core.Application {
-          Core.applicationFunction = secondFun,
-          Core.applicationArgument = snd})))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "pair value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term pairTerm)})))
--- | Interpreter-friendly first for Pair terms.
-first :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-first cx g pairTerm =
-    case pairTerm of
-      Core.TermPair v0 -> Right (Pairs.first v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "pair value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term pairTerm)})))
--- | Interpreter-friendly second for Pair terms.
-second :: t0 -> t1 -> Core.Term -> Either Errors.Error Core.Term
-second cx g pairTerm =
-    case pairTerm of
-      Core.TermPair v0 -> Right (Pairs.second v0)
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "pair value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term pairTerm)})))
diff --git a/src/main/haskell/Hydra/Eval/Lib/Sets.hs b/src/main/haskell/Hydra/Eval/Lib/Sets.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Eval/Lib/Sets.hs
+++ /dev/null
@@ -1,73 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Evaluation-level implementations of Set functions for the Hydra interpreter.
-
-module Hydra.Eval.Lib.Sets where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Interpreter-friendly set difference.
-difference :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-difference cx g set1Term set2Term =
-    Eithers.bind (ExtractCore.set g set1Term) (\elements -> Right (Lists.foldl (\acc -> \el -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.member")),
-              Core.applicationArgument = el})),
-            Core.applicationArgument = set2Term}))})),
-        Core.applicationArgument = acc})),
-      Core.applicationArgument = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.insert")),
-          Core.applicationArgument = el})),
-        Core.applicationArgument = acc}))})) (Core.TermSet (Sets.fromList [])) (Sets.toList elements)))
--- | Interpreter-friendly set intersection.
-intersection :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-intersection cx g set1Term set2Term =
-    Eithers.bind (ExtractCore.set g set1Term) (\elements -> Right (Lists.foldl (\acc -> \el -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-          Core.applicationArgument = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.member")),
-              Core.applicationArgument = el})),
-            Core.applicationArgument = set2Term}))})),
-        Core.applicationArgument = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.insert")),
-            Core.applicationArgument = el})),
-          Core.applicationArgument = acc}))})),
-      Core.applicationArgument = acc})) (Core.TermSet (Sets.fromList [])) (Sets.toList elements)))
--- | Interpreter-friendly map for Set terms.
-map :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-map cx g fun setTerm =
-    Eithers.bind (ExtractCore.set g setTerm) (\elements -> Right (Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-      Core.applicationArgument = (Core.TermList (Lists.map (\el -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = fun,
-        Core.applicationArgument = el})) (Sets.toList elements)))})))
--- | Interpreter-friendly set union.
-union :: t0 -> Graph.Graph -> Core.Term -> Core.Term -> Either Errors.Error Core.Term
-union cx g set1Term set2Term =
-    Eithers.bind (ExtractCore.set g set1Term) (\elements -> Right (Lists.foldl (\acc -> \el -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.insert")),
-        Core.applicationArgument = el})),
-      Core.applicationArgument = acc})) set2Term (Sets.toList elements)))
--- | Interpreter-friendly unions for list of Set terms.
-unions :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-unions cx g listTerm =
-    Eithers.bind (ExtractCore.list g listTerm) (\elements -> Right (Lists.foldl (\acc -> \s -> Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.union")),
-        Core.applicationArgument = acc})),
-      Core.applicationArgument = s})) (Core.TermSet (Sets.fromList [])) elements))
diff --git a/src/main/haskell/Hydra/ExtGeneration.hs b/src/main/haskell/Hydra/ExtGeneration.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/ExtGeneration.hs
+++ /dev/null
@@ -1,333 +0,0 @@
--- | Entry point for code generation in hydra-ext; provides additional sources and coders not found in hydra-haskell.
-
-module Hydra.ExtGeneration (
-  module Hydra.ExtGeneration,
-  module Hydra.Sources.Ext,
-  module Hydra.Generation,
-  module Hydra.Haskell.Generation,
-  module Hydra.Sources.All,
-) where
-
-import Hydra.Kernel
-import Hydra.Generation
-import Hydra.Haskell.Generation
-import Hydra.Sources.Ext
-import Hydra.Sources.All
-
-import Hydra.Cpp.Language (cppLanguage)
-import Hydra.Java.Language
-import Hydra.Json.Schema.Language (jsonSchemaLanguage)
-import Hydra.Protobuf.Language (protobufLanguage)
-import Hydra.Python.Language
-import Hydra.Pegasus.Language (pdlLanguage)
-import Hydra.Scala.Language (scalaLanguage)
-import Hydra.Cpp.Coder (moduleToCpp)
-import Hydra.Graphql.Coder (moduleToGraphql)
-import Hydra.Graphql.Language (graphqlLanguage)
-import Hydra.Java.Coder (moduleToJava)
-import Hydra.Json.Schema.Coder
-import Hydra.Pegasus.Coder (moduleToPdl)
-import Hydra.Protobuf.Coder (moduleToProtobuf)
-import Hydra.Python.Coder (moduleToPython)
-import Hydra.Rust.Coder (moduleToRust)
-import Hydra.Rust.Language (rustLanguage)
-import Hydra.Wasm.Coder (moduleToWasm)
-import Hydra.Wasm.Language (wasmLanguage)
-import Hydra.Lisp.Coder (moduleToLisp)
-import Hydra.Lisp.Language (lispLanguage)
-import Hydra.Lisp.Serde (programToExpr)
-import qualified Hydra.Lisp.Syntax as LispSyntax
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Names as Names
-import qualified Hydra.Util as Util
-import Hydra.Scala.Coder (moduleToScala)
-import Hydra.Coq.GenerateDriver (moduleToCoq)
-import Hydra.Coq.Generate (globalFieldMapping, globalConstructorCounts, globalAmbiguousNames, globalSanitizedAccessors)
-import Hydra.Coq.Language (coqLanguage)
-
-import Control.Monad (when)
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as Set
-import qualified System.Directory as SD
-import qualified System.FilePath as FP
-import qualified System.IO as SIO
-
-
--- | Options for JSON Schema code generation (was previously in Staging module)
-data JsonSchemaOptions = JsonSchemaOptions {
-  jsonSchemaOptionsShortNames :: Bool
-}
-
--- | Generate C++ source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeCpp :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeCpp = generateSources moduleToCpp cppLanguage True False False False
-
--- | Generate GraphQL source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeGraphql :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeGraphql = generateSources moduleToGraphql graphqlLanguage True False False False
-
--- | Generate GraphQL source files without type adaptation.
--- Useful when the source types include constructs (like forall) that the adapter doesn't handle,
--- but the coder can encode directly.
-writeGraphqlRaw :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeGraphqlRaw = generateSources moduleToGraphql graphqlLanguage False False False False
-
--- | Generate Java source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
--- Note: Java uses doHoistPolymorphicLetBindings=True to hoist polymorphic let bindings to class level
-writeJava :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeJava = generateSources moduleToJava javaLanguage True True False True
-
--- | Generate JSON Schema files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeJsonSchema :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeJsonSchema = generateSources (moduleToJsonSchema (JsonSchemaOptions True)) jsonSchemaLanguage True False False False
-
--- | Generate PDL (Pegasus) source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writePdl :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writePdl = generateSources moduleToPdl pdlLanguage True False False False
-
--- | Generate Protocol Buffers source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeProtobuf :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeProtobuf = generateSources moduleToProtobuf protobufLanguage True False False False
-
--- | Generate Python source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
--- Note: Python uses doHoistCaseStatements=True to hoist case statements to let bindings
-writePython :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writePython = generateSources moduleToPython pythonLanguage True True True False
-
--- | Generate Rust source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeRust :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeRust = generateSources moduleToRust rustLanguage True False False False
-
--- | Generate Coq (.v) source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeCoq :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeCoq basePath universeModules modulesToGenerate =
-  let allMods = universeModules ++ modulesToGenerate
-      fm = globalFieldMapping allMods
-      cc = globalConstructorCounts allMods
-      -- Hydra primitive library functions are not Hydra modules — they are
-      -- implemented host-side (in this case as Coq Definitions/Axioms in
-      -- `hydra/lib/*.v`) and are therefore invisible to `globalAmbiguousNames`.
-      -- Collisions like `hydra.lib.maybes.maybe` vs `hydra.show.core.maybe`
-      -- only manifest at Coq's import level. Inject the lib primitive names
-      -- into the ambiguous set so that cross-module references in the
-      -- non-lib source (`hydra.show.core.maybe`) stay fully qualified.
-      an = Set.union (globalAmbiguousNames allMods) coqLibPrimitiveNames
-      sa = globalSanitizedAccessors allMods
-  in generateSources (moduleToCoq fm cc an sa) coqLanguage True False False False basePath universeModules modulesToGenerate
-
--- | Names of Hydra primitive library functions exported by `hydra.lib.*`
--- Coq modules. These are invisible to `globalAmbiguousNames` (which walks
--- Hydra module definitions) because the lib modules are implemented
--- host-side in hand-written Coq. Used to disambiguate references like
--- `hydra.show.core.maybe` that would otherwise collide with bare imports
--- of the lib modules.
-coqLibPrimitiveNames :: Set.Set String
-coqLibPrimitiveNames = Set.fromList [
-  "abs","acos","acosh","add","addFloat64","alter","and","apply","asin",
-  "asinh","at","atan","atan2","atanh","bigfloatToBigint","bigfloatToFloat32",
-  "bigfloatToFloat64","bigintToBigfloat","bigintToDecimal","bigintToInt16",
-  "bigintToInt32","bigintToInt64","bigintToInt8","bigintToUint16",
-  "bigintToUint32","bigintToUint64","bigintToUint8","bimap","binaryToBytes",
-  "binaryToString","bind","cases","cat","cat2","ceiling","charAt","compare",
-  "compose","concat","concat2","cons","contains","cos","cosh",
-  "decimalToBigint","decimalToFloat32","decimalToFloat64","delete",
-  "difference","div","drop","dropWhile","e","either","elem","elems","empty",
-  "equal","even","exp","filter","filterWithKey","find","findAll",
-  "findWithDefault","first","float32ToBigfloat","float32ToDecimal",
-  "float64ToBigfloat","float64ToDecimal","floor","foldl","foldr","fromJust",
-  "fromLeft","fromList","fromMaybe","fromRight","group","gt","gte","head",
-  "identity","ifElse","init","insert","int16ToBigint","int32ToBigint",
-  "int64ToBigint","int8ToBigint","intercalate","intersection","intersperse",
-  "isAlphaNum","isJust","isLeft","isLower","isNothing","isRight","isSpace",
-  "isUpper","keys","last","lefts","length","lines","log","logBase","lookup",
-  "lt","lte","map","mapKeys","mapList","mapMaybe","mapSet","matches","max",
-  "maybe","maybeAt","maybeCharAt","maybeDiv","maybeHead","maybeInit",
-  "maybeLast","maybeMod","maybePred","maybeRem","maybeSucc","maybeTail",
-  "member","min","mod","mul","mulFloat64","negate","negateFloat64","not",
-  "nub","null","odd","or","partition","partitionEithers","pi","pow","pred",
-  "pure","range","readBigfloat","readBigint","readBoolean","readDecimal",
-  "readFloat32","readFloat64","readInt16","readInt32","readInt64","readInt8",
-  "readString","readUint16","readUint32","readUint64","readUint8","rem",
-  "replace","replaceAll","replicate","reverse","rights","round",
-  "roundBigfloat","roundFloat32","roundFloat64","safeHead","second",
-  "showBigfloat","showBigint","showBoolean","showDecimal","showFloat32",
-  "showFloat64","showInt16","showInt32","showInt64","showInt8","showString",
-  "showUint16","showUint32","showUint64","showUint8","signum","sin",
-  "singleton","sinh","size","sort","sortOn","span","split","splitOn","sqrt",
-  "stringToBinary","sub","subFloat64","succ","tail","take","tan","tanh",
-  "toList","toLower","toUpper","transpose","truncate","uint16ToBigint",
-  "uint32ToBigint","uint64ToBigint","uint8ToBigint","union","unions",
-  "unlines","zip","zipWith"]
-
--- | Wrap moduleToLisp for a specific dialect
-moduleToLispDialect
-  :: LispSyntax.Dialect -> String
-  -> Module -> [Definition] -> Context -> Graph
-  -> Either Error (M.Map FilePath String)
-moduleToLispDialect dialect ext mod defs cx g =
-  case moduleToLisp dialect mod defs cx g of
-    Left err -> Left err
-    Right program ->
-      let code = Serialization.printExpr (Serialization.parenthesize (programToExpr program))
-          caseConvention = case dialect of
-            LispSyntax.DialectClojure -> Util.CaseConventionCamel
-            _ -> Util.CaseConventionLowerSnake
-          filePath = Names.namespaceToFilePath caseConvention (FileExtension ext) (moduleNamespace mod)
-      in Right (M.singleton filePath code)
-
-writeClojure :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeClojure = generateSources (moduleToLispDialect LispSyntax.DialectClojure "clj") lispLanguage True False False False
-
-writeScheme :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeScheme = generateSources (moduleToLispDialect LispSyntax.DialectScheme "scm") lispLanguage True False False False
-
-writeCommonLisp :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeCommonLisp = generateSources (moduleToLispDialect LispSyntax.DialectCommonLisp "lisp") lispLanguage True False False False
-
-writeEmacsLisp :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeEmacsLisp = generateSources (moduleToLispDialect LispSyntax.DialectEmacsLisp "el") lispLanguage True False False False
-
--- | Generate Scala source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
---
--- After generation, walks the output directory and wraps long lines in each
--- generated .scala file via 'wrapLongScalaLines'. This avoids the Scala
--- compiler's memory issues on extremely long single-line expressions, and
--- replaces the previously-external break-long-lines.py post-processor.
-writeScala :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeScala basePath universeMods mods = do
-  n <- generateSources moduleToScala scalaLanguage True True False False basePath universeMods mods
-  wrapLongLinesInScalaTree basePath
-  return n
-
--- | Generate WebAssembly text format (WAT) files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeWasm :: FP.FilePath -> [Module] -> [Module] -> IO Int
-writeWasm = generateSources moduleToWasm wasmLanguage True False False False
-
--- | Soft maximum line length for generated source files in any target
---   language. Lines longer than this are broken at the first eligible break
---   point; segments below this length are left intact even if they could be
---   broken further. The target is readability first; the secondary goal is
---   to keep individual lines short enough that downstream compilers do not
---   blow their stacks on a single megaline.
-maxLineLength :: Int
-maxLineLength = 120
-
--- | Once the current segment exceeds this length, the next ',' is a break
---   point. Smaller than 'maxLineLength' so that the post-break continuation
---   has room before the next forced wrap.
-commaBreakThreshold :: Int
-commaBreakThreshold = 80
-
--- | Once the current segment exceeds this length, '=>' immediately after
---   a ')' becomes a break point.
-arrowBreakThreshold :: Int
-arrowBreakThreshold = 60
-
--- | Walk a directory tree and wrap long lines in every .scala file.
-wrapLongLinesInScalaTree :: FP.FilePath -> IO ()
-wrapLongLinesInScalaTree dir = do
-    exists <- SD.doesDirectoryExist dir
-    when exists $ do
-      entries <- SD.listDirectory dir
-      mapM_ visit entries
-  where
-    visit name = do
-      let path = dir FP.</> name
-      isDir <- SD.doesDirectoryExist path
-      if isDir
-        then wrapLongLinesInScalaTree path
-        else when (FP.takeExtension path == ".scala") $ do
-          -- Read strictly to release the file handle before writing back.
-          contents <- SIO.withFile path SIO.ReadMode $ \h -> do
-            cs <- SIO.hGetContents h
-            length cs `seq` return cs
-          let wrapped = wrapLongScalaText contents
-          when (wrapped /= contents) (writeFile path wrapped)
-
--- | Apply line-wrapping to every line in a Scala source file. Lines under
---   the max length pass through unchanged; long lines are broken at safe
---   points (commas outside string literals, when the segment is long).
-wrapLongScalaText :: String -> String
-wrapLongScalaText = unlines . fmap wrapLongScalaLine . lines
-
--- | Break a single long line at safe break points. If the line is short
---   enough, returns it unchanged. Otherwise walks character-by-character,
---   tracking string-literal state, and breaks at:
---     * a ',' after the current segment exceeds 'commaBreakThreshold' chars
---     * '=>' immediately after ')' (lambda body), after the current segment
---       exceeds 'arrowBreakThreshold' chars
-wrapLongScalaLine :: String -> String
-wrapLongScalaLine line
-  | length line <= maxLineLength = line
-  | otherwise =
-      let indent = takeWhile (== ' ') line
-          commaCont = indent ++ "  "
-          arrowCont = indent ++ "    "
-          (segments, lastSeg) = scan line "" [] False '\NUL' commaCont arrowCont
-          -- Drop a whitespace-only trailing segment: when scan breaks at the
-          -- final comma in the input, the residual `cur` is just `commaCont`
-          -- (the indent prefix) with no real content. Emitting it adds a
-          -- blank-but-indented line at the end, which the post-strip used to
-          -- silently fix; with the strip removed, we filter here at source.
-          isWhitespaceOnly = all (== ' ')
-          allSegments = if null lastSeg || isWhitespaceOnly lastSeg
-                          then segments
-                          else segments ++ [lastSeg]
-      in if length allSegments <= 1
-           then line
-           else L.intercalate "\n" allSegments
-  where
-    scan :: String -> String -> [String] -> Bool -> Char -> String -> String -> ([String], String)
-    scan [] cur acc _ _ _ _ = (acc, cur)
-    scan (c:rest) cur acc inString prevChar commaCont arrowCont =
-      let cur' = cur ++ [c]
-          inString' = if c == '"' && prevChar /= '\\'
-                        then not inString
-                        else inString
-          isArrowStart = not inString' && c == '=' && case rest of
-                           ('>':_) -> True
-                           _       -> False
-          arrowAfterParen = isArrowStart && prevChar == ')' && length cur' > arrowBreakThreshold
-          shouldBreakComma = c == ',' && not inString' && length cur' > commaBreakThreshold
-      in if arrowAfterParen
-           then -- consume '>', emit segment "...=>", continue with arrow indent
-                let cur'' = cur' ++ ['>']
-                    rest' = drop 1 rest
-                in scan rest' arrowCont (acc ++ [cur'']) inString' '>' commaCont arrowCont
-           else if shouldBreakComma
-             then scan rest commaCont (acc ++ [cur']) inString' c commaCont arrowCont
-             else scan rest cur' acc inString' c commaCont arrowCont
diff --git a/src/main/haskell/Hydra/Extract/Core.hs b/src/main/haskell/Hydra/Extract/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Extract/Core.hs
+++ /dev/null
@@ -1,571 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Extraction and validation for hydra.core types
-
-module Hydra.Extract.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Show.Errors as ShowErrors
-import qualified Hydra.Strip as Strip
-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
--- | Extract an arbitrary-precision floating-point value from a term
-bigfloat :: Graph.Graph -> Core.Term -> Either Errors.Error Double
-bigfloat graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (floatLiteral l) (\f -> bigfloatValue f))
--- | Extract a bigfloat value from a FloatValue
-bigfloatValue :: Core.FloatValue -> Either Errors.Error Double
-bigfloatValue v =
-    case v of
-      Core.FloatValueBigfloat v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "bigfloat",
-        Errors.unexpectedShapeErrorActual = (ShowCore.float v)})))
--- | Extract an arbitrary-precision integer value from a term
-bigint :: Graph.Graph -> Core.Term -> Either Errors.Error Integer
-bigint graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> bigintValue i))
--- | Extract a bigint value from an IntegerValue
-bigintValue :: Core.IntegerValue -> Either Errors.Error Integer
-bigintValue v =
-    case v of
-      Core.IntegerValueBigint v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "bigint",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract a binary data value from a term
-binary :: Graph.Graph -> Core.Term -> Either Errors.Error B.ByteString
-binary graph t = Eithers.bind (literal graph t) (\l -> binaryLiteral l)
--- | Extract a binary literal from a Literal value
-binaryLiteral :: Core.Literal -> Either Errors.Error B.ByteString
-binaryLiteral v =
-    case v of
-      Core.LiteralBinary v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "binary",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal v)})))
--- | Extract a boolean value from a term
-boolean :: Graph.Graph -> Core.Term -> Either Errors.Error Bool
-boolean graph t = Eithers.bind (literal graph t) (\l -> booleanLiteral l)
--- | Extract a boolean literal from a Literal value
-booleanLiteral :: Core.Literal -> Either Errors.Error Bool
-booleanLiteral v =
-    case v of
-      Core.LiteralBoolean v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "boolean",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal v)})))
--- | Extract a specific case handler from a case statement term
-caseField :: Core.Name -> String -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Field
-caseField name n graph term =
-
-      let fieldName = Core.Name n
-      in (Eithers.bind (cases name graph term) (\cs ->
-        let matching =
-                Lists.find (\f -> Equality.equal (Core.unName (Core.fieldName f)) (Core.unName fieldName)) (Core.caseStatementCases cs)
-        in (Maybes.maybe (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "matching case",
-          Errors.unexpectedShapeErrorActual = "no matching case"})))) (\mf -> Right mf) matching)))
--- | Extract case statement from a term
-cases :: Core.Name -> Graph.Graph -> Core.Term -> Either Errors.Error Core.CaseStatement
-cases name graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermCases v0 -> Logic.ifElse (Equality.equal (Core.unName (Core.caseStatementTypeName v0)) (Core.unName name)) (Right v0) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = (Strings.cat2 "case statement for type " (Core.unName name)),
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "case statement",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract an arbitrary-precision decimal value from a term
-decimal :: Graph.Graph -> Core.Term -> Either Errors.Error Sci.Scientific
-decimal graph t = Eithers.bind (literal graph t) (\l -> decimalLiteral l)
--- | Extract a decimal literal from a Literal value
-decimalLiteral :: Core.Literal -> Either Errors.Error Sci.Scientific
-decimalLiteral v =
-    case v of
-      Core.LiteralDecimal v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "decimal",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal v)})))
--- | Decode an Either value using the provided left and right decoders
-decodeEither :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> (Graph.Graph -> Core.Term -> Either Errors.DecodingError t1) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Either t0 t1)
-decodeEither leftDecoder rightDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermEither v0 -> Eithers.either (\lv -> Eithers.map (\x -> Left x) (leftDecoder g lv)) (\rv -> Eithers.map (\x -> Right x) (rightDecoder g rv)) v0
-      _ -> Left (Errors.DecodingError "expected either value"))
--- | Decode a list of elements using the provided element decoder
-decodeList :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError [t0]
-decodeList elemDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermList v0 -> Eithers.mapList (elemDecoder g) v0
-      _ -> Left (Errors.DecodingError "expected list"))
--- | Decode a Map using the provided key and value decoders
-decodeMap :: Ord t0 => ((Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> (Graph.Graph -> Core.Term -> Either Errors.DecodingError t1) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (M.Map t0 t1))
-decodeMap keyDecoder valDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermMap v0 -> Eithers.map Maps.fromList (Eithers.mapList (\kv -> Eithers.bind (keyDecoder g (Pairs.first kv)) (\k -> Eithers.map (\v -> (k, v)) (valDecoder g (Pairs.second kv)))) (Maps.toList v0))
-      _ -> Left (Errors.DecodingError "expected map"))
--- | Decode a Maybe value using the provided element decoder
-decodeMaybe :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Maybe t0)
-decodeMaybe elemDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermMaybe v0 -> Eithers.mapMaybe (elemDecoder g) v0
-      _ -> Left (Errors.DecodingError "expected optional value"))
--- | Decode a Pair using the provided first and second decoders
-decodePair :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> (Graph.Graph -> Core.Term -> Either Errors.DecodingError t1) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (t0, t1)
-decodePair firstDecoder secondDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermPair v0 -> Eithers.bind (firstDecoder g (Pairs.first v0)) (\f -> Eithers.map (\s -> (f, s)) (secondDecoder g (Pairs.second v0)))
-      _ -> Left (Errors.DecodingError "expected pair"))
--- | Decode a Set using the provided element decoder
-decodeSet :: Ord t0 => ((Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (S.Set t0))
-decodeSet elemDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermSet v0 -> Eithers.map Sets.fromList (Eithers.mapList (elemDecoder g) (Sets.toList v0))
-      _ -> Left (Errors.DecodingError "expected set"))
--- | Decode a unit value
-decodeUnit :: Graph.Graph -> Core.Term -> Either Errors.DecodingError ()
-decodeUnit g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermUnit -> Right ()
-      _ -> Left (Errors.DecodingError "expected a unit value"))
--- | Decode a wrapped value using the provided body decoder
-decodeWrapped :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError t0
-decodeWrapped bodyDecoder g term =
-    Eithers.bind (stripWithDecodingError g term) (\stripped -> case stripped of
-      Core.TermWrap v0 -> bodyDecoder g (Core.wrappedTermBody v0)
-      _ -> Left (Errors.DecodingError "expected wrapped value"))
--- | Extract an either value from a term, applying functions to the left and right values
-eitherTerm :: (Core.Term -> Either Errors.Error t0) -> (Core.Term -> Either Errors.Error t1) -> Graph.Graph -> Core.Term -> Either Errors.Error (Either t0 t1)
-eitherTerm leftFun rightFun graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermEither v0 -> Eithers.either (\l -> Eithers.map (\x -> Left x) (leftFun l)) (\r -> Eithers.map (\x -> Right x) (rightFun r)) v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "either value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract the left and right types from an either type
-eitherType :: Core.Type -> Either Errors.Error Core.EitherType
-eitherType typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeEither v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "either type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Extract a field value from a list of fields
-field :: Core.Name -> (Core.Term -> Either Errors.Error t0) -> Graph.Graph -> [Core.Field] -> Either Errors.Error t0
-field fname mapping graph fields =
-
-      let matchingFields = Lists.filter (\f -> Equality.equal (Core.unName (Core.fieldName f)) (Core.unName fname)) fields
-          noMatchErr =
-                  Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-                    Errors.unexpectedShapeErrorExpected = (Strings.cat2 "field " (Core.unName fname)),
-                    Errors.unexpectedShapeErrorActual = "no matching field"})))
-      in (Logic.ifElse (Lists.null matchingFields) noMatchErr (Logic.ifElse (Equality.equal (Lists.length matchingFields) 1) (Maybes.maybe noMatchErr (\mf -> Eithers.bind (Lexical.stripAndDereferenceTerm graph (Core.fieldTerm mf)) (\stripped -> mapping stripped)) (Lists.maybeHead matchingFields)) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "single field",
-        Errors.unexpectedShapeErrorActual = (Strings.cat2 "multiple fields named " (Core.unName fname))}))))))
--- | Extract a 32-bit floating-point value from a term
-float32 :: Graph.Graph -> Core.Term -> Either Errors.Error Float
-float32 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (floatLiteral l) (\f -> float32Value f))
--- | Extract a float32 value from a FloatValue
-float32Value :: Core.FloatValue -> Either Errors.Error Float
-float32Value v =
-    case v of
-      Core.FloatValueFloat32 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "float32",
-        Errors.unexpectedShapeErrorActual = (ShowCore.float v)})))
--- | Extract a 64-bit floating-point value from a term
-float64 :: Graph.Graph -> Core.Term -> Either Errors.Error Double
-float64 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (floatLiteral l) (\f -> float64Value f))
--- | Extract a float64 value from a FloatValue
-float64Value :: Core.FloatValue -> Either Errors.Error Double
-float64Value v =
-    case v of
-      Core.FloatValueFloat64 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "float64",
-        Errors.unexpectedShapeErrorActual = (ShowCore.float v)})))
--- | Extract a floating-point literal from a Literal value
-floatLiteral :: Core.Literal -> Either Errors.Error Core.FloatValue
-floatLiteral lit =
-    case lit of
-      Core.LiteralFloat v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "floating-point value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal lit)})))
--- | Extract a float value from a term
-floatValue :: Graph.Graph -> Core.Term -> Either Errors.Error Core.FloatValue
-floatValue graph t = Eithers.bind (literal graph t) (\l -> floatLiteral l)
--- | Extract a function type from a type
-functionType :: Core.Type -> Either Errors.Error Core.FunctionType
-functionType typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeFunction v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "function type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Extract a field from a union term
-injection :: Core.Name -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Field
-injection expected graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermInject v0 -> Logic.ifElse (Equality.equal (Core.unName (Core.injectionTypeName v0)) (Core.unName expected)) (Right (Core.injectionField v0)) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = (Strings.cat2 "injection of type " (Core.unName expected)),
-        Errors.unexpectedShapeErrorActual = (Core.unName (Core.injectionTypeName v0))}))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "injection",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract a 16-bit signed integer value from a term
-int16 :: Graph.Graph -> Core.Term -> Either Errors.Error I.Int16
-int16 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> int16Value i))
--- | Extract an int16 value from an IntegerValue
-int16Value :: Core.IntegerValue -> Either Errors.Error I.Int16
-int16Value v =
-    case v of
-      Core.IntegerValueInt16 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "int16",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract a 32-bit signed integer value from a term
-int32 :: Graph.Graph -> Core.Term -> Either Errors.Error Int
-int32 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> int32Value i))
--- | Extract an int32 value from an IntegerValue
-int32Value :: Core.IntegerValue -> Either Errors.Error Int
-int32Value v =
-    case v of
-      Core.IntegerValueInt32 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "int32",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract a 64-bit signed integer value from a term
-int64 :: Graph.Graph -> Core.Term -> Either Errors.Error I.Int64
-int64 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> int64Value i))
--- | Extract an int64 value from an IntegerValue
-int64Value :: Core.IntegerValue -> Either Errors.Error I.Int64
-int64Value v =
-    case v of
-      Core.IntegerValueInt64 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "int64",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract an 8-bit signed integer value from a term
-int8 :: Graph.Graph -> Core.Term -> Either Errors.Error I.Int8
-int8 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> int8Value i))
--- | Extract an int8 value from an IntegerValue
-int8Value :: Core.IntegerValue -> Either Errors.Error I.Int8
-int8Value v =
-    case v of
-      Core.IntegerValueInt8 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "int8",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract an integer literal from a Literal value
-integerLiteral :: Core.Literal -> Either Errors.Error Core.IntegerValue
-integerLiteral lit =
-    case lit of
-      Core.LiteralInteger v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "integer value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal lit)})))
--- | Extract an integer value from a term
-integerValue :: Graph.Graph -> Core.Term -> Either Errors.Error Core.IntegerValue
-integerValue graph t = Eithers.bind (literal graph t) (\l -> integerLiteral l)
--- | Extract a lambda from a term
-lambda :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Lambda
-lambda graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermLambda v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "lambda",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract the body of a lambda term
-lambdaBody :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-lambdaBody graph term = Eithers.map Core.lambdaBody (lambda graph term)
--- | Extract a let expression from a term
-let_ :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Let
-let_ graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermLet v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "let term",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract a binding with the given name from a let term
-letBinding :: String -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-letBinding n graph term =
-
-      let name = Core.Name n
-      in (Eithers.bind (let_ graph term) (\letExpr ->
-        let matchingBindings =
-                Lists.filter (\b -> Equality.equal (Core.unName (Core.bindingName b)) (Core.unName name)) (Core.letBindings letExpr)
-            noBindingErr =
-                    Left (Errors.ErrorExtraction (Errors.ExtractionErrorNoSuchBinding (Errors.NoSuchBindingError {
-                      Errors.noSuchBindingErrorName = name})))
-        in (Logic.ifElse (Lists.null matchingBindings) noBindingErr (Logic.ifElse (Equality.equal (Lists.length matchingBindings) 1) (Maybes.maybe noBindingErr (\b -> Right (Core.bindingTerm b)) (Lists.maybeHead matchingBindings)) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorMultipleBindings (Errors.MultipleBindingsError {
-          Errors.multipleBindingsErrorName = name}))))))))
--- | Extract a list of terms from a term
-list :: Graph.Graph -> Core.Term -> Either Errors.Error [Core.Term]
-list graph term =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term) (\stripped -> case stripped of
-      Core.TermList v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "list",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term stripped)}))))
--- | Extract the first element of a list term
-listHead :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-listHead graph term =
-    Eithers.bind (list graph term) (\l -> Maybes.maybe (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-      Errors.unexpectedShapeErrorExpected = "non-empty list",
-      Errors.unexpectedShapeErrorActual = "empty list"})))) (\h -> Right h) (Lists.maybeHead l))
--- | Extract a list of values from a term, mapping a function over each element
-listOf :: (Core.Term -> Either Errors.Error t0) -> Graph.Graph -> Core.Term -> Either Errors.Error [t0]
-listOf f graph term = Eithers.bind (list graph term) (\els -> Eithers.mapList f els)
--- | Extract the element type from a list type
-listType :: Core.Type -> Either Errors.Error Core.Type
-listType typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeList v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "list type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Extract a literal value from a term
-literal :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Literal
-literal graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermLiteral v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "literal",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract a map of key-value pairs from a term, mapping functions over each key and value
-map :: Ord t0 => ((Core.Term -> Either Errors.Error t0) -> (Core.Term -> Either Errors.Error t1) -> Graph.Graph -> Core.Term -> Either Errors.Error (M.Map t0 t1))
-map fk fv graph term0 =
-
-      let pair =
-              \kvPair ->
-                let kterm = Pairs.first kvPair
-                    vterm = Pairs.second kvPair
-                in (Eithers.bind (fk kterm) (\kval -> Eithers.bind (fv vterm) (\vval -> Right (kval, vval))))
-      in (Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-        Core.TermMap v0 -> Eithers.map Maps.fromList (Eithers.mapList pair (Maps.toList v0))
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "map",
-          Errors.unexpectedShapeErrorActual = (ShowCore.term term)})))))
--- | Extract the key and value types from a map type
-mapType :: Core.Type -> Either Errors.Error Core.MapType
-mapType typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeMap v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "map type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Extract an optional value from a term, applying a function to the value if present
-maybeTerm :: (Core.Term -> Either Errors.Error t0) -> Graph.Graph -> Core.Term -> Either Errors.Error (Maybe t0)
-maybeTerm f graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermMaybe v0 -> Maybes.maybe (Right Nothing) (\t -> Eithers.map Maybes.pure (f t)) v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "maybe value",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract the base type from an optional type
-maybeType :: Core.Type -> Either Errors.Error Core.Type
-maybeType typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeMaybe v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "maybe type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Ensure a function has the expected number of arguments
-nArgs :: Core.Name -> Int -> [t0] -> Either Errors.Error ()
-nArgs name n args =
-    Logic.ifElse (Equality.equal (Lists.length args) n) (Right ()) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-      Errors.unexpectedShapeErrorExpected = (Strings.cat [
-        Literals.showInt32 n,
-        " arguments to primitive ",
-        (Literals.showString (Core.unName name))]),
-      Errors.unexpectedShapeErrorActual = (Literals.showInt32 (Lists.length args))}))))
--- | Extract a pair of values from a term, applying functions to each component
-pair :: (Core.Term -> Either Errors.Error t0) -> (Core.Term -> Either Errors.Error t1) -> Graph.Graph -> Core.Term -> Either Errors.Error (t0, t1)
-pair kf vf graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermPair v0 -> Eithers.bind (kf (Pairs.first v0)) (\kVal -> Eithers.bind (vf (Pairs.second v0)) (\vVal -> Right (kVal, vVal)))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "pair",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract a record's fields from a term
-record :: Core.Name -> Graph.Graph -> Core.Term -> Either Errors.Error [Core.Field]
-record expected graph term0 =
-    Eithers.bind (termRecord graph term0) (\record -> Logic.ifElse (Equality.equal (Core.recordTypeName record) expected) (Right (Core.recordFields record)) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-      Errors.unexpectedShapeErrorExpected = (Strings.cat2 "record of type " (Core.unName expected)),
-      Errors.unexpectedShapeErrorActual = (Core.unName (Core.recordTypeName record))})))))
--- | Extract the field types from a record type
-recordType :: t0 -> Core.Type -> Either Errors.Error [Core.FieldType]
-recordType ename typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeRecord v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "record type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Require a field from a record's field map and decode it
-requireField :: String -> (t0 -> t1 -> Either Errors.DecodingError t2) -> M.Map Core.Name t1 -> t0 -> Either Errors.DecodingError t2
-requireField fieldName decoder fieldMap g =
-    Maybes.maybe (Left (Errors.DecodingError (Strings.cat [
-      "missing field ",
-      fieldName,
-      " in record"]))) (\fieldTerm -> decoder g fieldTerm) (Maps.lookup (Core.Name fieldName) fieldMap)
--- | Extract a set of terms from a term
-set :: Graph.Graph -> Core.Term -> Either Errors.Error (S.Set Core.Term)
-set graph term =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term) (\stripped -> case stripped of
-      Core.TermSet v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "set",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term stripped)}))))
--- | Extract a set of values from a term, mapping a function over each element
-setOf :: Ord t0 => ((Core.Term -> Either Errors.Error t0) -> Graph.Graph -> Core.Term -> Either Errors.Error (S.Set t0))
-setOf f graph term = Eithers.bind (set graph term) (\els -> Eithers.mapSet f els)
--- | Extract the element type from a set type
-setType :: Core.Type -> Either Errors.Error Core.Type
-setType typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeSet v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "set type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Extract a string value from a term
-string :: Graph.Graph -> Core.Term -> Either Errors.Error String
-string graph t = Eithers.bind (literal graph t) (\l -> stringLiteral l)
--- | Extract a string literal from a Literal value
-stringLiteral :: Core.Literal -> Either Errors.Error String
-stringLiteral v =
-    case v of
-      Core.LiteralString v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "string",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal v)})))
--- | Strip annotations and dereference variables, returning Either DecodingError Term
-stripWithDecodingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Term
-stripWithDecodingError g term =
-    Eithers.bimap (\_e -> Errors.DecodingError (ShowErrors.error _e)) (\x -> x) (Lexical.stripAndDereferenceTermEither g term)
--- | Extract a record from a term
-termRecord :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Record
-termRecord graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermRecord v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "record",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Convert a Record's fields to a Map from Name to Term
-toFieldMap :: Core.Record -> M.Map Core.Name Core.Term
-toFieldMap record = Maps.fromList (Lists.map (\f -> (Core.fieldName f, (Core.fieldTerm f))) (Core.recordFields record))
--- | Extract a 16-bit unsigned integer value from a term
-uint16 :: Graph.Graph -> Core.Term -> Either Errors.Error Int
-uint16 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> uint16Value i))
--- | Extract a uint16 value from an IntegerValue
-uint16Value :: Core.IntegerValue -> Either Errors.Error Int
-uint16Value v =
-    case v of
-      Core.IntegerValueUint16 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "uint16",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract a 32-bit unsigned integer value from a term
-uint32 :: Graph.Graph -> Core.Term -> Either Errors.Error I.Int64
-uint32 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> uint32Value i))
--- | Extract a uint32 value from an IntegerValue
-uint32Value :: Core.IntegerValue -> Either Errors.Error I.Int64
-uint32Value v =
-    case v of
-      Core.IntegerValueUint32 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "uint32",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract a 64-bit unsigned integer value from a term
-uint64 :: Graph.Graph -> Core.Term -> Either Errors.Error Integer
-uint64 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> uint64Value i))
--- | Extract a uint64 value from an IntegerValue
-uint64Value :: Core.IntegerValue -> Either Errors.Error Integer
-uint64Value v =
-    case v of
-      Core.IntegerValueUint64 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "uint64",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract an 8-bit unsigned integer value from a term
-uint8 :: Graph.Graph -> Core.Term -> Either Errors.Error I.Int16
-uint8 graph t = Eithers.bind (literal graph t) (\l -> Eithers.bind (integerLiteral l) (\i -> uint8Value i))
--- | Extract a uint8 value from an IntegerValue
-uint8Value :: Core.IntegerValue -> Either Errors.Error I.Int16
-uint8Value v =
-    case v of
-      Core.IntegerValueUint8 v0 -> Right v0
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "uint8",
-        Errors.unexpectedShapeErrorActual = (ShowCore.integer v)})))
--- | Extract the field types from a union type
-unionType :: t0 -> Core.Type -> Either Errors.Error [Core.FieldType]
-unionType ename typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeUnion v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "union type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Extract a unit value from a term
-unit :: Core.Term -> Either Errors.Error ()
-unit term =
-    case term of
-      Core.TermUnit -> Right ()
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "unit",
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)})))
--- | Extract a unit variant (a variant with an empty record value) from a union term
-unitVariant :: Core.Name -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Name
-unitVariant tname graph term =
-    Eithers.bind (injection tname graph term) (\field -> Eithers.bind (unit (Core.fieldTerm field)) (\ignored -> Right (Core.fieldName field)))
--- | Extract the wrapped value from a wrapped term
-wrap :: Core.Name -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-wrap expected graph term0 =
-    Eithers.bind (Lexical.stripAndDereferenceTerm graph term0) (\term -> case term of
-      Core.TermWrap v0 -> Logic.ifElse (Equality.equal (Core.unName (Core.wrappedTermTypeName v0)) (Core.unName expected)) (Right (Core.wrappedTermBody v0)) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = (Strings.cat2 "wrapper of type " (Core.unName expected)),
-        Errors.unexpectedShapeErrorActual = (Core.unName (Core.wrappedTermTypeName v0))}))))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = (Strings.cat2 (Strings.cat2 "wrap(" (Core.unName expected)) ")"),
-        Errors.unexpectedShapeErrorActual = (ShowCore.term term)}))))
--- | Extract the wrapped type from a wrapper type
-wrappedType :: t0 -> Core.Type -> Either Errors.Error Core.Type
-wrappedType ename typ =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeWrap v0 -> Right v0
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "wrapped type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
diff --git a/src/main/haskell/Hydra/Extract/Json.hs b/src/main/haskell/Hydra/Extract/Json.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Extract/Json.hs
+++ /dev/null
@@ -1,64 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for extracting values from JSON objects
-
-module Hydra.Extract.Json where
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Extract an array from a JSON value, failing if the value is not an array
-expectArray :: Model.Value -> Either String [Model.Value]
-expectArray value =
-    case value of
-      Model.ValueArray v0 -> Right v0
-      _ -> Left (Strings.cat2 (Strings.cat2 "expected " "JSON array") (Strings.cat2 " but found " (showValue value)))
--- | Extract a number from a JSON value, failing if the value is not a number
-expectNumber :: Model.Value -> Either String Sci.Scientific
-expectNumber value =
-    case value of
-      Model.ValueNumber v0 -> Right v0
-      _ -> Left (Strings.cat2 (Strings.cat2 "expected " "JSON number") (Strings.cat2 " but found " (showValue value)))
--- | Extract an object from a JSON value, failing if the value is not an object
-expectObject :: Model.Value -> Either String (M.Map String Model.Value)
-expectObject value =
-    case value of
-      Model.ValueObject v0 -> Right v0
-      _ -> Left (Strings.cat2 (Strings.cat2 "expected " "JSON object") (Strings.cat2 " but found " (showValue value)))
--- | Extract a string from a JSON value, failing if the value is not a string
-expectString :: Model.Value -> Either String String
-expectString value =
-    case value of
-      Model.ValueString v0 -> Right v0
-      _ -> Left (Strings.cat2 (Strings.cat2 "expected " "JSON string") (Strings.cat2 " but found " (showValue value)))
--- | Look up an optional field in a JSON object
-opt :: Ord t0 => (t0 -> M.Map t0 t1 -> Maybe t1)
-opt fname m = Maps.lookup fname m
--- | Look up an optional array field in a JSON object
-optArray :: Ord t0 => (t0 -> M.Map t0 Model.Value -> Either String (Maybe [Model.Value]))
-optArray fname m = Maybes.maybe (Right Nothing) (\a -> Eithers.map (\x -> Just x) (expectArray a)) (opt fname m)
--- | Look up an optional string field in a JSON object
-optString :: Ord t0 => (t0 -> M.Map t0 Model.Value -> Either String (Maybe String))
-optString fname m = Maybes.maybe (Right Nothing) (\s -> Eithers.map (\x -> Just x) (expectString s)) (opt fname m)
--- | Look up a required field in a JSON object, failing if not found
-require :: Ord t0 => (t0 -> M.Map t0 t1 -> Either String t1)
-require fname m =
-    Maybes.maybe (Left (Strings.cat [
-      "required attribute ",
-      (showValue fname),
-      " not found"])) (\value -> Right value) (Maps.lookup fname m)
--- | Look up a required array field in a JSON object
-requireArray :: Ord t0 => (t0 -> M.Map t0 Model.Value -> Either String [Model.Value])
-requireArray fname m = Eithers.bind (require fname m) expectArray
--- | Look up a required number field in a JSON object
-requireNumber :: Ord t0 => (t0 -> M.Map t0 Model.Value -> Either String Sci.Scientific)
-requireNumber fname m = Eithers.bind (require fname m) expectNumber
--- | Look up a required string field in a JSON object
-requireString :: Ord t0 => (t0 -> M.Map t0 Model.Value -> Either String String)
-requireString fname m = Eithers.bind (require fname m) expectString
--- | Show a JSON value as a string (placeholder implementation)
-showValue :: t0 -> String
-showValue value = "TODO: implement showValue"
diff --git a/src/main/haskell/Hydra/Extract/Util.hs b/src/main/haskell/Hydra/Extract/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Extract/Util.hs
+++ /dev/null
@@ -1,20 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Extraction and validation for hydra.util types
-
-module Hydra.Extract.Util where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Extract a comparison from a term
-comparison :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Util.Comparison
-comparison cx graph term =
-    Eithers.bind (ExtractCore.unitVariant (Core.Name "hydra.util.Comparison") graph term) (\fname -> Logic.ifElse (Equality.equal (Core.unName fname) "equalTo") (Right Util.ComparisonEqualTo) (Logic.ifElse (Equality.equal (Core.unName fname) "lessThan") (Right Util.ComparisonLessThan) (Logic.ifElse (Equality.equal (Core.unName fname) "greaterThan") (Right Util.ComparisonGreaterThan) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-      Errors.unexpectedShapeErrorExpected = "comparison",
-      Errors.unexpectedShapeErrorActual = (Core.unName fname)})))))))
diff --git a/src/main/haskell/Hydra/Formatting.hs b/src/main/haskell/Hydra/Formatting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Formatting.hs
+++ /dev/null
@@ -1,175 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String formatting types and functions.
-
-module Hydra.Formatting where
-import qualified Hydra.Lib.Chars as Chars
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Capitalize the first letter of a string
-capitalize :: String -> String
-capitalize = mapFirstLetter Strings.toUpper
--- | Convert a string from one case convention to another
-convertCase :: Util.CaseConvention -> Util.CaseConvention -> String -> String
-convertCase from to original =
-
-      let parts =
-
-                let byCaps =
-
-                          let splitOnUppercase =
-                                  \acc -> \c -> Lists.concat2 (Logic.ifElse (Chars.isUpper c) [
-                                    []] []) (Maybes.fromMaybe acc (Maybes.map (\uc -> Lists.cons (Lists.cons c (Pairs.first uc)) (Pairs.second uc)) (Lists.uncons acc)))
-                          in (Lists.map Strings.fromList (Lists.foldl splitOnUppercase [
-                            []] (Lists.reverse (Strings.toList (decapitalize original)))))
-                    byUnderscores = Strings.splitOn "_" original
-                in case from of
-                  Util.CaseConventionCamel -> byCaps
-                  Util.CaseConventionPascal -> byCaps
-                  Util.CaseConventionLowerSnake -> byUnderscores
-                  Util.CaseConventionUpperSnake -> byUnderscores
-      in case to of
-        Util.CaseConventionCamel -> decapitalize (Strings.cat (Lists.map (\arg_ -> capitalize (Strings.toLower arg_)) parts))
-        Util.CaseConventionPascal -> Strings.cat (Lists.map (\arg_ -> capitalize (Strings.toLower arg_)) parts)
-        Util.CaseConventionLowerSnake -> Strings.intercalate "_" (Lists.map Strings.toLower parts)
-        Util.CaseConventionUpperSnake -> Strings.intercalate "_" (Lists.map Strings.toUpper parts)
--- | Convert a string from camel case (possibly with underscores) to lower snake case. Splits on underscores first, then converts each part from camel case.
-convertCaseCamelOrUnderscoreToLowerSnake :: String -> String
-convertCaseCamelOrUnderscoreToLowerSnake s =
-
-      let parts = Strings.splitOn "_" s
-          snakeParts = Lists.map (\p -> convertCaseCamelToLowerSnake p) parts
-      in (Strings.intercalate "_" snakeParts)
--- | Convert a string from camel case to lower snake case
-convertCaseCamelToLowerSnake :: String -> String
-convertCaseCamelToLowerSnake = convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake
--- | Convert a string from camel case to upper snake case
-convertCaseCamelToUpperSnake :: String -> String
-convertCaseCamelToUpperSnake = convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake
--- | Convert a string from pascal case to upper snake case
-convertCasePascalToUpperSnake :: String -> String
-convertCasePascalToUpperSnake = convertCase Util.CaseConventionPascal Util.CaseConventionUpperSnake
--- | Decapitalize the first letter of a string
-decapitalize :: String -> String
-decapitalize = mapFirstLetter Strings.toLower
--- | Escape reserved words by appending an underscore
-escapeWithUnderscore :: S.Set String -> String -> String
-escapeWithUnderscore reserved s = Logic.ifElse (Sets.member s reserved) (Strings.cat2 s "_") s
--- | Indent each line of a string with four spaces
-indentLines :: String -> String
-indentLines s =
-
-      let indent = \l -> Strings.cat2 "    " l
-      in (Strings.unlines (Lists.map indent (Strings.lines s)))
--- | Format a string as a Java-style block comment
-javaStyleComment :: String -> String
-javaStyleComment s = Strings.cat2 (Strings.cat2 (Strings.cat2 "/**\n" " * ") s) "\n */"
--- | A helper which maps the first letter of a string to another string
-mapFirstLetter :: (String -> String) -> String -> String
-mapFirstLetter mapping s =
-    Logic.ifElse (Strings.null s) s (
-      let list = Strings.toList s
-      in (Maybes.fromMaybe s (Maybes.map (\uc ->
-        let firstLetter = mapping (Strings.fromList (Lists.pure (Pairs.first uc)))
-        in (Strings.cat2 firstLetter (Strings.fromList (Pairs.second uc)))) (Lists.uncons list))))
--- | Replace sequences of non-alphanumeric characters with single underscores
-nonAlnumToUnderscores :: String -> String
-nonAlnumToUnderscores input =
-
-      let isAlnum =
-              \c -> Logic.or (Logic.and (Equality.gte c 65) (Equality.lte c 90)) (Logic.or (Logic.and (Equality.gte c 97) (Equality.lte c 122)) (Logic.and (Equality.gte c 48) (Equality.lte c 57)))
-          replace =
-                  \p -> \c ->
-                    let s = Pairs.first p
-                        b = Pairs.second p
-                    in (Logic.ifElse (isAlnum c) (Lists.cons c s, False) (Logic.ifElse b (s, True) (Lists.cons 95 s, True)))
-          result = Lists.foldl replace ([], False) (Strings.toList input)
-      in (Strings.fromList (Lists.reverse (Pairs.first result)))
--- | Normalize a comment string for consistent output across coders
-normalizeComment :: String -> String
-normalizeComment s =
-
-      let stripped = stripLeadingAndTrailingWhitespace s
-      in (Logic.ifElse (Strings.null stripped) "" (
-        let lastIdx = Math.sub (Strings.length stripped) 1
-            appended = Strings.cat2 stripped "."
-        in (Maybes.maybe appended (\lastChar -> Logic.ifElse (Equality.equal lastChar 46) stripped appended) (Strings.maybeCharAt lastIdx stripped))))
--- | Sanitize a string by replacing non-alphanumeric characters and escaping reserved words
-sanitizeWithUnderscores :: S.Set String -> String -> String
-sanitizeWithUnderscores reserved s = escapeWithUnderscore reserved (nonAlnumToUnderscores s)
--- | Format a list of elements as a bracketed, comma-separated string
-showList :: (t0 -> String) -> [t0] -> String
-showList f els =
-    Strings.cat [
-      "[",
-      (Strings.intercalate ", " (Lists.map f els)),
-      "]"]
--- | Remove leading and trailing whitespace from a string
-stripLeadingAndTrailingWhitespace :: String -> String
-stripLeadingAndTrailingWhitespace s =
-    Strings.fromList (Lists.dropWhile Chars.isSpace (Lists.reverse (Lists.dropWhile Chars.isSpace (Lists.reverse (Strings.toList s)))))
--- | Replace special characters with their alphanumeric aliases
-withCharacterAliases :: String -> String
-withCharacterAliases original =
-
-      let aliases =
-              Maps.fromList [
-                (32, "sp"),
-                (33, "excl"),
-                (34, "quot"),
-                (35, "num"),
-                (36, "dollar"),
-                (37, "percnt"),
-                (38, "amp"),
-                (39, "apos"),
-                (40, "lpar"),
-                (41, "rpar"),
-                (42, "ast"),
-                (43, "plus"),
-                (44, "comma"),
-                (45, "minus"),
-                (46, "period"),
-                (47, "sol"),
-                (58, "colon"),
-                (59, "semi"),
-                (60, "lt"),
-                (61, "equals"),
-                (62, "gt"),
-                (63, "quest"),
-                (64, "commat"),
-                (91, "lsqb"),
-                (92, "bsol"),
-                (93, "rsqb"),
-                (94, "circ"),
-                (95, "lowbar"),
-                (96, "grave"),
-                (123, "lcub"),
-                (124, "verbar"),
-                (125, "rcub"),
-                (126, "tilde")]
-          alias = \c -> Maybes.fromMaybe (Lists.pure c) (Maybes.map Strings.toList (Maps.lookup c aliases))
-      in (Strings.fromList (Lists.filter Chars.isAlphaNum (Lists.concat (Lists.map alias (Strings.toList original)))))
--- | A simple soft line wrap which is suitable for code comments
-wrapLine :: Int -> String -> String
-wrapLine maxlen input =
-
-      let helper =
-              \prev -> \rem ->
-                let trunc = Lists.take maxlen rem
-                    spanResult =
-                            Lists.span (\c -> Logic.and (Logic.not (Equality.equal c 32)) (Logic.not (Equality.equal c 9))) (Lists.reverse trunc)
-                    prefix = Lists.reverse (Pairs.second spanResult)
-                    suffix = Lists.reverse (Pairs.first spanResult)
-                in (Logic.ifElse (Equality.lte (Lists.length rem) maxlen) (Lists.reverse (Lists.cons rem prev)) (Logic.ifElse (Lists.null prefix) (helper (Lists.cons trunc prev) (Lists.drop maxlen rem)) (Maybes.fromMaybe (helper (Lists.cons trunc prev) (Lists.drop maxlen rem)) (Maybes.map (\pfxInit -> helper (Lists.cons pfxInit prev) (Lists.concat2 suffix (Lists.drop maxlen rem))) (Lists.maybeInit prefix)))))
-      in (Strings.fromList (Lists.intercalate [
-        10] (helper [] (Strings.toList input))))
diff --git a/src/main/haskell/Hydra/Generation.hs b/src/main/haskell/Hydra/Generation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Generation.hs
+++ /dev/null
@@ -1,763 +0,0 @@
--- | Entry point for Hydra code generation utilities
-
-module Hydra.Generation (
-  module Hydra.Generation,
-) where
-
-import Hydra.Kernel
-import Hydra.Dsl.Annotations
-import Hydra.Dsl.Bootstrap
-import Hydra.PackageRouting (groupByPackage, namespaceToPackage)
-import Hydra.Packaging (_Module)
-import Hydra.Testing (TestGroup(..))
-import qualified Hydra.Json.Model as Json
-import qualified Hydra.Json.Writer as JsonWriter
-import Hydra.Sources.Libraries
-import qualified Hydra.Context as Context
-import qualified Hydra.Decoding as Decoding
-import qualified Hydra.Digest as Digest
-import qualified Hydra.Dsls as Dsls
-import qualified Hydra.Encoding as Encoding
-import qualified Hydra.Errors as Error
-import qualified Hydra.Show.Errors as ShowError
-import qualified Hydra.Sources.Eval.Lib.All as EvalLib
-import qualified Hydra.Codegen as CodeGeneration
-
-import qualified Control.Exception as E
-import qualified Control.Monad as CM
-import qualified Data.Aeson as A
-import qualified Data.Aeson.KeyMap as AKM
-import qualified Data.Aeson.Key as AK
-import qualified Data.ByteString.Lazy as BS
-import qualified Data.Scientific as SC
-import qualified Data.Vector as V
-import qualified System.FilePath as FP
-import qualified Data.List as L
-import qualified Data.List.Split as LS
-import qualified Data.Map as M
-import qualified Data.Text as T
-import qualified System.Directory as SD
-import qualified Data.Maybe as Y
-import Data.Char (isAlphaNum, toUpper)
-
-
-
--- | Format an InContext Error with trace information
-formatError :: Context.InContext Error.Error -> String
-formatError ic = showError (Context.inContextObject ic) ++ traceInfo
-  where
-    cx = Context.inContextContext ic
-    stack = Context.contextTrace cx
-    traceInfo = if L.null stack then "" else " (" ++ L.intercalate " > " (reverse stack) ++ ")"
-
-showError :: Error.Error -> String
-showError = ShowError.error
-
--- | Generate source files and write them to disk.
--- This is a thin I/O wrapper around 'generateSourceFiles'.
-generateSources
-  :: (Module -> [Definition] -> Context.Context -> Graph -> Either Error.Error (M.Map FilePath String))
-  -> Language
-  -> Bool  -- ^ doInfer
-  -> Bool  -- ^ doExpand
-  -> Bool  -- ^ doHoistCaseStatements
-  -> Bool  -- ^ doHoistPolymorphicLetBindings
-  -> FilePath
-  -> [Module]  -- ^ Universe
-  -> [Module]  -- ^ Modules to generate
-  -> IO Int  -- ^ Number of files written
-generateSources printDefinitions lang doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings basePath universeModules modulesToGenerate = do
-    let cx = Context.Context [] [] M.empty
-    case CodeGeneration.generateSourceFiles printDefinitions lang doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings bootstrapGraph universeModules modulesToGenerate cx of
-      Left err -> fail $ "Failed to generate source files: " ++ showError err
-      Right files -> do
-        mapM_ writePair files
-        return $ length files
-  where
-    writePair (path, s) = do
-        let fullPath = FP.combine basePath path
-        SD.createDirectoryIfMissing True $ FP.takeDirectory fullPath
-        -- Skip writes when content is byte-identical. Rewriting the file with
-        -- the same bytes bumps its mtime and triggers Stack (and every other
-        -- mtime-based incremental build tool) to invalidate downstream
-        -- artifacts, even though nothing actually changed. Hashing the file
-        -- and comparing would be stricter but reading + comparing is
-        -- adequate for generated source files under 1 MB.
-        exists <- SD.doesFileExist fullPath
-        skip <- if exists
-                  then do old <- readFile fullPath
-                          -- Force the whole string so the handle closes before
-                          -- the subsequent writeFile reopens the path.
-                          -- Comparing via == is lazy and can leave the handle
-                          -- open, causing resource-busy errors on rewrite.
-                          length old `seq` return (old == withNewline)
-                  else return False
-        CM.unless skip $ writeFile fullPath withNewline
-      where
-        -- Trailing whitespace is the coder's responsibility. The Hydra
-        -- serialization layer in `hydra.serialization` and per-coder
-        -- writers (e.g. the Haskell `toHaskellComments` formatter)
-        -- avoid emitting trailing whitespace at the source. This
-        -- writer just adds the final newline.
-        withNewline = if L.isSuffixOf "\n" s then s else s ++ "\n"
-
--- | Build a graph from a list of modules using the Haskell bootstrapGraph.
--- Thin wrapper around modulesToGraphWith.
-modulesToGraph :: [Module] -> [Module] -> Graph
-modulesToGraph = CodeGeneration.modulesToGraph bootstrapGraph
-
-
--- | Generate and write the lexicon file (IO wrapper).
-writeLexicon :: FilePath -> [Module] -> IO ()
-writeLexicon path kernelModules = do
-  case CodeGeneration.inferAndGenerateLexicon (Context [] [] M.empty) bootstrapGraph kernelModules of
-    Left err -> fail $ "Lexicon generation failed: " ++ showError err
-    Right content -> do
-      writeFile path content
-      putStrLn $ "Lexicon written to " ++ path
-
-----------------------------------------
-
--- | IO wrapper for generateCoderModules. Evaluates the Either and handles errors.
-generateCoderModulesIO :: (Context.Context -> Graph -> Module -> Either Error.Error (Maybe Module)) -> String -> [Module] -> [Module] -> IO [Module]
-generateCoderModulesIO codec label universeModules typeModules = do
-    let cx = Context.Context [] [] M.empty
-    case CodeGeneration.generateCoderModules codec bootstrapGraph universeModules typeModules cx of
-      Left err -> fail $ "Failed to generate " ++ label ++ " modules: " ++ showError err
-      Right results -> return results
-
-generateDecoderModules :: [Module] -> [Module] -> IO [Module]
-generateDecoderModules = generateCoderModulesIO Decoding.decodeModule "decoder"
-
-generateEncoderModules :: [Module] -> [Module] -> IO [Module]
-generateEncoderModules = generateCoderModulesIO Encoding.encodeModule "encoder"
-
-----------------------------------------
-
--- | Generate encoder/decoder Source modules for a list of type modules.
--- These are Source modules that define `module_` bindings containing the encoder Modules as Terms.
-generateCoderSourceModules :: ([Module] -> [Module] -> IO [Module]) -> [Module] -> [Module] -> IO [Module]
-generateCoderSourceModules generate universeModules typeModules = do
-  sourceMods <- generate universeModules typeModules
-  return $ fmap CodeGeneration.moduleToSourceModule sourceMods
-
-generateDecoderSourceModules :: [Module] -> [Module] -> IO [Module]
-generateDecoderSourceModules = generateCoderSourceModules generateDecoderModules
-
-generateEncoderSourceModules :: [Module] -> [Module] -> IO [Module]
-generateEncoderSourceModules = generateCoderSourceModules generateEncoderModules
-
-----------------------------------------
--- DSL Module Generation
-----------------------------------------
-
-generateDslModules :: [Module] -> [Module] -> IO [Module]
-generateDslModules = generateCoderModulesIO Dsls.dslModule "DSL"
-
-----------------------------------------
--- Module Inference
-----------------------------------------
-
--- | IO wrapper for inferModules. Evaluates the Either and handles errors.
-inferModulesIO :: [Module] -> [Module] -> IO [Module]
-inferModulesIO universeMods targetMods = do
-  case CodeGeneration.inferModules (Context [] [] M.empty) bootstrapGraph universeMods targetMods of
-    Left err -> fail $ "Type inference failed: " ++ showError err
-    Right mods -> return mods
-
--- | IO wrapper for inferModulesGiven (incremental inference). The
--- universe modules already carry inferred TypeSchemes on their term
--- bindings (loaded from JSON); only the target modules are re-inferred,
--- using the typed universe as context.
-inferModulesGivenIO :: [Module] -> [Module] -> IO [Module]
-inferModulesGivenIO universeMods targetMods = do
-  case CodeGeneration.inferModulesGiven (Context [] [] M.empty) bootstrapGraph universeMods targetMods of
-    Left err -> fail $ "Incremental type inference failed: " ++ showError err
-    Right mods -> return mods
-
-----------------------------------------
--- JSON Module Export
-----------------------------------------
-
--- | Build a schema map (Name -> Type) from a graph's schema types.
--- Used by the JSON encoder/decoder to resolve type variables.
-buildSchemaMap :: Graph -> M.Map Name Type
-buildSchemaMap g = M.map extractType (graphSchemaTypes g)
-  where
-    extractType (TypeScheme _ t _) = stripTop t
-    stripTop (TypeAnnotated (AnnotatedType t _)) = stripTop t
-    stripTop t = t
-
--- | Write a single module to a JSON file.
--- The file path is derived from the module namespace.
-writeModuleJson :: M.Map Name Type -> FilePath -> Module -> IO ()
-writeModuleJson schemaMap basePath mod = do
-    case CodeGeneration.moduleToJson schemaMap mod of
-      Left err -> fail $ "Failed to convert module to JSON: " ++ unNamespace (moduleNamespace mod) ++ ": " ++ showError err
-      Right jsonStr -> do
-        let filePath = basePath FP.</> CodeGeneration.namespaceToPath (moduleNamespace mod) ++ ".json"
-            newContent = jsonStr ++ "\n"
-        SD.createDirectoryIfMissing True $ FP.takeDirectory filePath
-        -- Skip the write (and the putStrLn spam) when the on-disk content
-        -- is byte-identical. Important for DSL-wrapper generation, which
-        -- runs unconditionally after a cache-hit main pass; without this,
-        -- warm runs rewrite ~25 DSL-wrapper JSON files every time.
-        exists <- SD.doesFileExist filePath
-        skip <- if exists
-                  then do old <- readFile filePath
-                          -- Force the whole string so the handle closes
-                          -- before the subsequent writeFile reopens the path.
-                          length old `seq` return (old == newContent)
-                  else return False
-        CM.unless skip $ do
-          writeFile filePath newContent
-          putStrLn $ "Wrote: " ++ filePath
-
--- | Write multiple modules to JSON files.
--- Each module is written to basePath/<namespace-path>.json
--- If doInfer is True, type inference is performed on the modules first.
--- The universe modules are used for type inference context (may include more modules
--- than those being written). If not inferring, the universe is ignored.
---
--- When doInfer is True, this honors a content-hash cache at
--- <digestPath basePath>: if every universe module's DSL source hash matches
--- the stored digest and every target module's JSON file already exists,
--- inference and writes are skipped entirely. Otherwise the full path runs
--- and the digest is overwritten on success. The cache is all-or-nothing
--- (per the 2026-04-16 inferModulesGiven redesign).
-writeModulesJson :: Bool -> FilePath -> [Module] -> [Module] -> IO ()
-writeModulesJson doInfer basePath universeMods mods = do
-  hit <- if doInfer then tryCacheHit basePath universeMods mods else return Nothing
-  case hit of
-    Just _ ->
-      putStrLn $ "  Cache hit (" ++ show (length universeMods) ++ " modules clean); skipping inference and writes."
-    Nothing -> do
-      mods' <- if doInfer then inferModulesIO universeMods mods else return mods
-      let graph = modulesToGraph universeMods universeMods
-          schemaMap = buildSchemaMap graph
-      mapM_ (writeModuleJson schemaMap basePath) mods'
-      CM.when doInfer $ refreshDigest basePath universeMods
-
--- | Write multiple modules to JSON files, routing each module to the
--- dist/json/<package>/src/main/json/ directory of its owning package.
---
--- Like 'writeModulesJson', but fans the modules out across package
--- subdirectories based on 'namespaceToPackage'. Inference and schema-map
--- construction happen once over the full universe, so each per-module write
--- is as cheap as the single-directory version.
---
--- Cache layout (after 2026-04-18 split):
---
---   * Per-package digest at dist/json/<pkg>/digest.json — covers the
---     namespaces routed to <pkg>. Stage 3+ will exploit per-package
---     freshness; for now it's recorded so callers can rely on it.
---   * Universe-wide digest at <distJsonRoot>/digest.main.json — kept
---     for backwards compatibility with the existing cache-hit semantics
---     (universe-wide all-or-nothing). Removed once per-package
---     freshness checks are wired in.
---
--- See 'writeModulesJson' for the (non-split) caching semantics.
-writeModulesJsonPackageSplit :: Bool -> FilePath -> [Module] -> [Module] -> IO ()
-writeModulesJsonPackageSplit doInfer distJsonRoot universeMods mods = do
-  hit <- if doInfer then tryCacheHitSplit distJsonRoot universeMods mods else return Nothing
-  case hit of
-    Just _ -> do
-      putStrLn $ "  Cache hit (" ++ show (length universeMods) ++ " modules clean); skipping inference and writes."
-      -- Even on a cache hit, ensure per-package digests exist on disk
-      -- so downstream tools (Stage 3 per-target freshness checks) have
-      -- something to compare against. Cheap because hashing reads the
-      -- DSL files but skips inference + JSON writes.
-      CM.when doInfer $ ensurePerPackageDigests distJsonRoot mods
-    Nothing -> do
-      -- Try the incremental path: partition modules into clean
-      -- (DSL hash unchanged) and dirty. Re-infer only the dirty ones
-      -- against a typed universe loaded from JSON, and write JSON only
-      -- for the dirty subset. Falls through to full inference if
-      -- the incremental setup fails.
-      result <- if doInfer
-                  then tryIncrementalInference distJsonRoot universeMods mods
-                  else return (Just (IncrementalFull mods))
-      case result of
-        Just (IncrementalFull allMods) -> do
-          -- Full inference was needed; write JSON for every module.
-          writePackageSplitJson distJsonRoot universeMods allMods allMods
-          CM.when doInfer $ do
-            refreshDigestAt (packageSplitDigestAnchor distJsonRoot) universeMods
-            refreshPerPackageDigests distJsonRoot universeMods allMods
-        Just (IncrementalPartial allMods dirtyMods) -> do
-          -- Incremental inference succeeded; only rewrite JSON for the
-          -- dirty modules. Clean modules' on-disk JSON is already
-          -- up-to-date (we loaded them from there to build the typed
-          -- universe).
-          putStrLn $ "  Writing JSON for " ++ show (length dirtyMods)
-            ++ " dirty modules (skipping " ++ show (length allMods - length dirtyMods)
-            ++ " clean)"
-          writePackageSplitJson distJsonRoot universeMods allMods dirtyMods
-          CM.when doInfer $ do
-            refreshDigestAt (packageSplitDigestAnchor distJsonRoot) universeMods
-            refreshPerPackageDigests distJsonRoot universeMods allMods
-        Nothing -> do
-          putStrLn "  Incremental inference unavailable; running full inference."
-          allMods <- inferModulesIO universeMods mods
-          writePackageSplitJson distJsonRoot universeMods allMods allMods
-          CM.when doInfer $ do
-            refreshDigestAt (packageSplitDigestAnchor distJsonRoot) universeMods
-            refreshPerPackageDigests distJsonRoot universeMods allMods
-
--- | Incremental inference result. 'IncrementalFull mods' means all
--- modules need a fresh write; 'IncrementalPartial all dirty' means
--- only the dirty subset needs writing (the clean modules' on-disk
--- JSON is already correct).
-data IncrementalResult
-  = IncrementalFull [Module]
-  | IncrementalPartial [Module] [Module]
-  -- ^ IncrementalPartial all-modules dirty-modules
-
--- | Shared writer: build the schemaMap from the full module universe
--- and write the subset that needs to hit disk. 'universeForSchema' is
--- the complete post-inference module set used to seed the schema's
--- type-dependency closure; passing a narrow set (e.g. only DSL
--- wrappers, which don't declare hydra.packaging as a type dep) produces
--- a schemaMap missing hydra.packaging.Module and causes the encoder to
--- mis-serialize outer module frames (e.g. Maybe String as nested Maybe).
--- Callers should pass the full universe here for a complete schemaMap.
--- 'toWrite' is the subset that actually needs its JSON rewritten
--- (full set on a cache miss; dirty subset on an incremental hit).
-writePackageSplitJson :: FilePath -> [Module] -> [Module] -> [Module] -> IO ()
-writePackageSplitJson distJsonRoot universeMods universeForSchema toWrite = do
-  -- Seed the graph's schema with the broader of the two inputs so
-  -- hydra.packaging.Module (and every other universe type) is always
-  -- reachable from the schemaMap, even when 'toWrite' is a narrow set
-  -- like DSL wrappers whose declared type-deps omit packaging.
-  let graph = modulesToGraph universeMods (universeMods ++ universeForSchema)
-      schemaMap = buildSchemaMap graph
-      groups = groupByPackage toWrite
-  CM.forM_ groups $ \(pkg, pkgMods) -> do
-    let pkgDir = distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "json"
-    putStrLn $ "  " ++ pkg ++ ": " ++ show (length pkgMods) ++ " modules -> " ++ pkgDir
-    mapM_ (writeModuleJson schemaMap pkgDir) pkgMods
-
--- | Digest file for 'writeModulesJsonPackageSplit'. Single well-known
--- location shared across all packages the universe touches. Will be
--- removed once per-package freshness checks fully replace the
--- universe-wide cache (Stage 3+).
-packageSplitDigestAnchor :: FilePath -> FilePath
-packageSplitDigestAnchor distJsonRoot = distJsonRoot FP.</> "digest.main.json"
-
--- | Per-package main-source-set digest path:
--- dist/json/<pkg>/src/main/digest.json. The digest covers the DSL
--- sources whose namespaces route to <pkg> and live in the main
--- source set. The parallel test path is at <pkg>/src/test/digest.json.
-perPackageDigestPath :: FilePath -> String -> FilePath
-perPackageDigestPath distJsonRoot pkg =
-  distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "digest.json"
-
--- | After a successful regen, write per-package digest files. Each
--- package's digest hashes only its own DSL sources (the modules that
--- route to that package), letting Stage 3+ check freshness per
--- package without consulting the universe-wide digest.
---
--- 'targetMods' is the post-inference module set (from
--- writeModulesJsonPackageSplit's mods'); we partition it by owning
--- package and hash each package's modules.
-refreshPerPackageDigests :: FilePath -> [Module] -> [Module] -> IO ()
-refreshPerPackageDigests distJsonRoot _universeMods targetMods = do
-  nsFiles <- Digest.discoverNamespaceFiles
-  let groups = groupByPackage targetMods
-  CM.forM_ groups $ \(pkg, pkgMods) -> do
-    pkgDigest <- Digest.hashUniverse nsFiles pkgMods
-    -- Some packages (e.g. hydra-haskell with its synthesized coder
-    -- modules, hydra-coq with no DSL sources at all) won't have any
-    -- DSL files discoverable; skip writing an empty digest.
-    CM.when (not (M.null pkgDigest)) $ do
-      let dpath = perPackageDigestPath distJsonRoot pkg
-      Digest.writeDigest dpath pkgDigest
-      putStrLn $ "  Per-package digest: " ++ dpath
-        ++ " (" ++ show (M.size pkgDigest) ++ " entries)"
-
--- | Ensure per-package digest files exist on disk. Called on cache
--- hit so that Stage 3+ tooling has digests to read even when no
--- regen ran. Compared to refreshPerPackageDigests, this is a no-op
--- if every per-package digest already exists; cheap to call.
-ensurePerPackageDigests :: FilePath -> [Module] -> IO ()
-ensurePerPackageDigests distJsonRoot mods = do
-  let groups = groupByPackage mods
-      paths  = [ perPackageDigestPath distJsonRoot pkg | (pkg, _) <- groups ]
-  allExist <- fmap and (mapM SD.doesFileExist paths)
-  CM.unless allExist $ refreshPerPackageDigests distJsonRoot [] mods
-
--- | Try the incremental inference path: partition universeMods into
---   * cleanMods — DSL hash matches recorded digest AND existing JSON
---                 file is loadable (carries inferred TypeSchemes).
---   * dirtyMods — DSL hash mismatch OR no recorded hash OR JSON
---                 missing/unloadable.
---
--- If dirtyMods is empty, returns the loaded clean universe (no
--- inference needed; caller still writes JSON because we got here
--- via a cache miss on the universe-wide digest, meaning at least
--- one module's JSON is newer than the digest).
---
--- If dirtyMods is non-empty AND clean modules loaded successfully,
--- runs inferModulesGiven on (cleanLoaded ++ dirtyMods) targeting
--- dirtyMods, returns the full universe with refreshed dirty mods.
---
--- If anything goes wrong (no digest yet, JSON load failure, etc.),
--- returns Nothing — caller falls back to full inferModulesIO.
-tryIncrementalInference :: FilePath -> [Module] -> [Module] -> IO (Maybe IncrementalResult)
-tryIncrementalInference distJsonRoot universeMods _targetMods = do
-  -- Read the universe-wide digest to learn which sources were clean
-  -- as of the last successful regen.
-  let digestFile = packageSplitDigestAnchor distJsonRoot
-  stored <- Digest.readDigest digestFile
-  if M.null stored
-    then return Nothing
-    else do
-      -- Encoder identity check: if the JSON encode/decode/model/writer
-      -- DSL has changed since the digest was written, every module's
-      -- on-disk JSON is potentially stale (it was written by the old
-      -- encoder). Force a full re-encode.
-      storedEnc <- Digest.readEncoderId digestFile
-      currentEnc <- Digest.computeEncoderId
-      if storedEnc /= currentEnc
-        then do
-          putStrLn $ "  Encoder identity changed; falling back to full inference."
-          return Nothing
-        else do
-          nsFiles <- Digest.discoverNamespaceFiles
-          currentDigest <- Digest.hashUniverse nsFiles universeMods
-          if M.null currentDigest
-            then return Nothing
-            else do
-              -- Partition: a module is "clean" if its current DSL source
-              -- hash matches the stored hash for its namespace. Modules
-              -- without a discoverable DSL source (e.g. demos under
-              -- demos/src/, modules from heads/haskell/src/) are treated
-              -- as clean — their definition is determined by code we
-              -- don't have direct access to here, but if they aren't
-              -- in stored AND aren't in currentDigest, no source change
-              -- is detectable so they're effectively unchanged.
-              let isClean m =
-                    let ns = moduleNamespace m
-                    in case (M.lookup ns currentDigest, M.lookup ns stored) of
-                         (Just c, Just s) -> c == s
-                         (Nothing, Nothing) -> True
-                         _                -> False
-                  (cleanMods, dirtyMods) = L.partition isClean universeMods
-
-              if Prelude.null dirtyMods
-                then do
-                  -- Everything is clean per the digest, but tryCacheHitSplit
-                  -- said miss. That means a JSON file is missing or the
-                  -- digest is stale. Fall through to full inference.
-                  return Nothing
-                else do
-                  putStrLn $ "  Incremental inference: "
-                    ++ show (length dirtyMods) ++ " dirty / "
-                    ++ show (length cleanMods) ++ " clean"
-                  -- Load clean modules from JSON (they carry inferred types).
-                  let cleanNs = fmap moduleNamespace cleanMods
-                  loaded <- E.try (loadCleanFromJson distJsonRoot universeMods cleanNs)
-                            :: IO (Either E.SomeException [Module])
-                  case loaded of
-                    Left e -> do
-                      putStrLn $ "  Incremental load failed: " ++ show e
-                      return Nothing
-                    Right cleanLoaded -> do
-                      let typedUniverse = cleanLoaded ++ dirtyMods
-                      inferred <- inferModulesGivenIO typedUniverse dirtyMods
-                      -- Return:
-                      --   * all modules (cleanLoaded ++ inferred), so the
-                      --     schemaMap can be built over the complete set.
-                      --   * dirty subset (inferred), so the caller writes
-                      --     JSON only for the modules that actually changed.
-                      return (Just (IncrementalPartial (cleanLoaded ++ inferred) inferred))
-
--- | Load modules from per-package JSON paths. The dist-json-root
--- layout is dist/json/<pkg>/src/main/json/<ns-path>.json; we route
--- each namespace through namespaceToPackage to find its package
--- subdirectory.
-loadCleanFromJson :: FilePath -> [Module] -> [Namespace] -> IO [Module]
-loadCleanFromJson distJsonRoot universeModules namespaces =
-  CM.forM namespaces $ \ns -> do
-    let pkg = namespaceToPackage ns
-        pkgDir = distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "json"
-        filePath = pkgDir FP.</> CodeGeneration.namespaceToPath ns ++ ".json"
-    parseResult <- parseJsonFile filePath
-    case parseResult of
-      Left err -> fail $ "Incremental: JSON parse error for "
-        ++ unNamespace ns ++ " at " ++ filePath ++ ": " ++ err
-      Right jsonVal -> case CodeGeneration.decodeModuleFromJson bootstrapGraph universeModules jsonVal of
-        Left err -> fail $ "Incremental: module decode error for "
-          ++ unNamespace ns ++ ": " ++ showError err
-        Right m  -> return m
-
--- | If every universe module's DSL source hash matches the stored digest,
--- and every target module's JSON file already exists, return the current
--- digest (indicating a cache hit, so the caller can skip the slow path).
--- Otherwise return Nothing.
-tryCacheHit :: FilePath -> [Module] -> [Module] -> IO (Maybe Digest.DigestMap)
-tryCacheHit basePath universeMods targetMods = do
-  let digestFile = Digest.digestPath basePath
-      targetPaths = [basePath FP.</> CodeGeneration.namespaceToPath (moduleNamespace m) ++ ".json" | m <- targetMods]
-  checkCacheHit digestFile universeMods targetPaths
-
-tryCacheHitSplit :: FilePath -> [Module] -> [Module] -> IO (Maybe Digest.DigestMap)
-tryCacheHitSplit distJsonRoot universeMods targetMods = do
-  let digestFile = packageSplitDigestAnchor distJsonRoot
-      targetPaths = [ distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "json"
-                                    FP.</> CodeGeneration.namespaceToPath (moduleNamespace m) ++ ".json"
-                    | (pkg, pkgMods) <- groupByPackage targetMods, m <- pkgMods]
-  checkCacheHit digestFile universeMods targetPaths
-
--- | Shared logic: compare current source-file hashes against the stored
--- digest and check that every target JSON file exists on disk.
---
--- Only modules whose DSL source was discoverable contribute hashes; derived
--- modules without a `ns = Namespace "..."` source file (e.g. kernel
--- decode/encode modules generated from 'Hydra.Sources.Kernel.Terms.*') are
--- transparently handled because their generator's source IS in the map, so
--- any change upstream invalidates the cache.
---
--- Additionally, the universe-wide digest carries an `encoderId` (a hash of
--- the JSON encode/decode/model/writer DSL files). When the on-disk
--- encoderId doesn't match the current one, every namespace's stored JSON
--- is potentially stale even if its DSL source is unchanged — we treat
--- this as a universal cache miss. Per-package digests don't carry an
--- encoderId because the universe-wide check fires first (before any
--- per-package read).
-checkCacheHit :: FilePath -> [Module] -> [FilePath] -> IO (Maybe Digest.DigestMap)
-checkCacheHit digestFile universeMods targetPaths = do
-  nsFiles <- Digest.discoverNamespaceFiles
-  currentDigest <- Digest.hashUniverse nsFiles universeMods
-  if M.null currentDigest
-    then return Nothing  -- nothing to verify against; always recompute
-    else do
-      stored <- Digest.readDigest digestFile
-      storedEnc <- Digest.readEncoderId digestFile
-      currentEnc <- Digest.computeEncoderId
-      let encoderMatches = storedEnc == currentEnc
-      if not encoderMatches
-        then do
-          putStrLn $ "  Encoder identity changed; invalidating universe cache."
-          return Nothing
-        else if stored /= currentDigest
-          then return Nothing
-          else do
-            existFlags <- mapM SD.doesFileExist targetPaths
-            if and existFlags then return (Just currentDigest) else return Nothing
-
--- | After a successful slow-path run, overwrite the digest with fresh hashes.
-refreshDigest :: FilePath -> [Module] -> IO ()
-refreshDigest basePath universeMods = refreshDigestAt (Digest.digestPath basePath) universeMods
-
-refreshDigestAt :: FilePath -> [Module] -> IO ()
-refreshDigestAt digestFile universeMods = do
-  nsFiles <- Digest.discoverNamespaceFiles
-  current <- Digest.hashUniverse nsFiles universeMods
-  encoderId <- Digest.computeEncoderId
-  Digest.writeUniverseDigest digestFile encoderId current
-  putStrLn $ "  Digest refreshed: " ++ digestFile ++ " (" ++ show (M.size current) ++ " entries)"
-
--- | Write DSL modules to JSON files.
-writeDslJson :: FilePath -> [Module] -> [Module] -> IO ()
-writeDslJson basePath universeModules typeModules = do
-    dslMods <- generateDslModules universeModules typeModules
-    let nonEmpty = filter (not . null . moduleDefinitions) dslMods
-    writeModulesJson False basePath universeModules nonEmpty
-
--- | Write DSL modules to JSON files, routed per package. Like 'writeDslJson'
--- but uses 'writeModulesJsonPackageSplit' under the hood.
-writeDslJsonPackageSplit :: FilePath -> [Module] -> [Module] -> IO ()
-writeDslJsonPackageSplit distJsonRoot universeModules typeModules = do
-    dslMods <- generateDslModules universeModules typeModules
-    let nonEmpty = filter (not . null . moduleDefinitions) dslMods
-    writeModulesJsonPackageSplit False distJsonRoot universeModules nonEmpty
-
--- | Write a manifest.json listing module namespaces for kernelModules, mainModules, and testModules.
--- This allows Java and Python hosts to load the correct set of modules without directory scanning.
---
--- Takes the module sets as arguments because the set of "main modules" depends on
--- which host language is generating code.
-writeManifestJson :: FilePath
-                  -> [Module] -- ^ kernelModules
-                  -> [Module] -- ^ kernelTypesModules (for DSL generation)
-                  -> [Module] -- ^ mainModules
-                  -> [Module] -- ^ testModules
-                  -> IO ()
-writeManifestJson basePath kernelModules kernelTypesModules mainModules testModules = do
-    dslMods <- generateDslModules mainModules kernelTypesModules
-    let nonEmptyDsls = filter (not . null . moduleDefinitions) dslMods
-    let jsonVal = Json.ValueObject $ M.fromList [
-            ("dslModules", namespacesJson nonEmptyDsls),
-            ("evalLibModules", namespacesJson EvalLib.evalLibModules),
-            ("kernelModules", namespacesJson kernelModules),
-            ("mainModules", namespacesJson mainModules),
-            ("testModules", namespacesJson testModules)]
-        jsonStr = JsonWriter.printJson jsonVal
-        filePath = basePath FP.</> "manifest.json"
-    writeFile filePath (jsonStr ++ "\n")
-    putStrLn $ "Wrote manifest: " ++ filePath
-  where
-    -- Sort namespace strings lexicographically for cross-host byte stability;
-    -- see docs/json-format.md "Stability of byte order".
-    namespacesJson mods = Json.ValueArray $ fmap Json.ValueString
-      (L.sort (fmap (unNamespace . moduleNamespace) mods))
-
--- | Write per-package manifest.json files at
--- <root>/<pkg>/src/main/json/manifest.json for every package owning at least
--- one module in the given lists.
---
--- Each per-package manifest has the same schema as the legacy monolithic
--- manifest, but the field values are scoped to modules owned by that package.
--- A package appears only if it owns at least one module in mainModules
--- (testModules alone aren't enough — test packages use their own
--- src/test/json/manifest.json path, not covered here).
---
--- The 'kernelTypesModules' argument is used only for DSL synthesis, same as
--- 'writeManifestJson'. 'dslSynthUniverse' is the module universe passed to
--- the DSL generator.
-writePerPackageManifestsJson :: FilePath
-                             -> [Module] -- ^ dslSynthUniverse (for DSL generation)
-                             -> [Module] -- ^ kernelTypesModules
-                             -> [Module] -- ^ mainModules (to partition)
-                             -> [Module] -- ^ testModules (today always hydra-kernel)
-                             -> IO ()
-writePerPackageManifestsJson distJsonRoot dslSynthUniverse kernelTypesModules mainModules testModules = do
-    dslMods <- generateDslModules dslSynthUniverse kernelTypesModules
-    let nonEmptyDsls = filter (not . null . moduleDefinitions) dslMods
-    let mainByPkg = groupByPackage mainModules
-    let dslByPkg  = M.fromList (groupByPackage nonEmptyDsls)
-    let testByPkg = M.fromList (groupByPackage testModules)
-    let evalLibSet = M.fromList (groupByPackage EvalLib.evalLibModules)
-    let packages = L.nub
-          $ fmap fst mainByPkg
-          ++ M.keys dslByPkg
-          ++ M.keys testByPkg
-          ++ M.keys evalLibSet
-    CM.forM_ (L.sort packages) $ \pkg -> do
-      let mainForPkg   = Y.fromMaybe [] (lookup pkg mainByPkg)
-          dslForPkg    = M.findWithDefault [] pkg dslByPkg
-          testForPkg   = M.findWithDefault [] pkg testByPkg
-          evalForPkg   = M.findWithDefault [] pkg evalLibSet
-          jsonVal = Json.ValueObject $ M.fromList [
-              ("package",        Json.ValueString pkg),
-              ("dslModules",     namespacesJson dslForPkg),
-              ("evalLibModules", namespacesJson evalForPkg),
-              ("mainModules",    namespacesJson mainForPkg),
-              ("testModules",    namespacesJson testForPkg)]
-          jsonStr = JsonWriter.printJson jsonVal
-          pkgDir  = distJsonRoot FP.</> pkg FP.</> "src" FP.</> "main" FP.</> "json"
-          filePath = pkgDir FP.</> "manifest.json"
-      SD.createDirectoryIfMissing True pkgDir
-      writeFile filePath (jsonStr ++ "\n")
-      putStrLn $ "Wrote manifest: " ++ filePath
-  where
-    -- Sort namespace strings lexicographically for cross-host byte stability;
-    -- see docs/json-format.md "Stability of byte order".
-    namespacesJson mods = Json.ValueArray $ fmap Json.ValueString
-      (L.sort (fmap (unNamespace . moduleNamespace) mods))
-
-----------------------------------------
--- JSON Module Import
-----------------------------------------
-
--- | Convert an Aeson JSON value to a Hydra JSON value.
-aesonToHydra :: A.Value -> Json.Value
-aesonToHydra v = case v of
-  A.Object km -> Json.ValueObject $ M.fromList (mapPair <$> AKM.toList km)
-    where
-      mapPair (k, v') = (AK.toString k, aesonToHydra v')
-  A.Array a -> Json.ValueArray (aesonToHydra <$> V.toList a)
-  A.String t -> Json.ValueString $ T.unpack t
-  A.Number s -> Json.ValueNumber s
-  A.Bool b -> Json.ValueBoolean b
-  A.Null -> Json.ValueNull
-
--- | Parse a JSON file using Aeson and convert to Hydra JSON.
--- Pre-processes the content to escape control characters that the Hydra JSON writer
--- doesn't escape (e.g. null bytes in string literals).
-parseJsonFile :: FilePath -> IO (Either String Json.Value)
-parseJsonFile fp = do
-  content <- BS.readFile fp
-  let escaped = escapeControlCharsInJson content
-  return $ aesonToHydra <$> A.eitherDecode escaped
-
--- | Escape unescaped control characters (< 0x20) inside JSON string literals.
--- Thin ByteString wrapper around CodeGeneration.escapeControlCharsInJson (which operates on [Int]).
-escapeControlCharsInJson :: BS.ByteString -> BS.ByteString
-escapeControlCharsInJson input =
-  BS.pack $ fmap fromIntegral $ CodeGeneration.escapeControlCharsInJson $ fmap fromIntegral $ BS.unpack input
-
--- | Read a field from manifest.json as a list of Namespaces.
-readManifestField :: FilePath -> String -> IO [Namespace]
-readManifestField basePath fieldName = do
-    let manifestPath = basePath FP.</> "manifest.json"
-    parseResult <- parseJsonFile manifestPath
-    case parseResult of
-      Left err -> fail $ "Failed to parse manifest.json: " ++ err
-      Right jsonVal -> case jsonVal of
-        Json.ValueObject obj -> case M.lookup fieldName obj of
-          Nothing -> fail $ "manifest.json missing field: " ++ fieldName
-          Just (Json.ValueArray arr) -> return $ fmap toNamespace arr
-          Just _ -> fail $ "manifest.json field " ++ fieldName ++ " is not an array"
-        _ -> fail "manifest.json is not a JSON object"
-  where
-    toNamespace (Json.ValueString s) = Namespace s
-    toNamespace _ = error $ "manifest.json: expected string in " ++ fieldName
-
--- | Read a manifest field or return an empty list if the field (or the
--- manifest itself) is missing. Differs from 'readManifestField', which
--- fails hard on a missing field.
-readManifestFieldOrEmpty :: FilePath -> String -> IO [Namespace]
-readManifestFieldOrEmpty basePath fieldName = do
-    let manifestPath = basePath FP.</> "manifest.json"
-    exists <- SD.doesFileExist manifestPath
-    if not exists
-      then return []
-      else do
-        parseResult <- parseJsonFile manifestPath
-        case parseResult of
-          Left _ -> return []
-          Right jsonVal -> case jsonVal of
-            Json.ValueObject obj -> case M.lookup fieldName obj of
-              Just (Json.ValueArray arr) -> return $ fmap toNamespace arr
-              _                          -> return []
-            _ -> return []
-  where
-    toNamespace (Json.ValueString s) = Namespace s
-    toNamespace _ = error $ "manifest.json: expected string in " ++ fieldName
-
--- | Read a manifest field, trying a primary name first and falling back to an alternative.
-readManifestFieldWithFallback :: FilePath -> String -> String -> IO [Namespace]
-readManifestFieldWithFallback basePath primaryField fallbackField = do
-    let manifestPath = basePath FP.</> "manifest.json"
-    parseResult <- parseJsonFile manifestPath
-    case parseResult of
-      Left err -> fail $ "Failed to parse manifest.json: " ++ err
-      Right jsonVal -> case jsonVal of
-        Json.ValueObject obj -> case M.lookup primaryField obj of
-          Just (Json.ValueArray arr) -> return $ fmap toNamespace arr
-          _ -> case M.lookup fallbackField obj of
-            Just (Json.ValueArray arr) -> return $ fmap toNamespace arr
-            Nothing -> fail $ "manifest.json missing fields: " ++ primaryField ++ " and " ++ fallbackField
-            Just _ -> fail $ "manifest.json field " ++ fallbackField ++ " is not an array"
-        _ -> fail "manifest.json is not a JSON object"
-  where
-    toNamespace (Json.ValueString s) = Namespace s
-    toNamespace _ = error $ "manifest.json: expected string in " ++ primaryField ++ "/" ++ fallbackField
-
--- | Load modules from JSON files for a list of namespaces.
--- Uses the universe modules to build the graph for type resolution.
-loadModulesFromJson :: FilePath -> [Module] -> [Namespace] -> IO [Module]
-loadModulesFromJson basePath universeModules namespaces = do
-    CM.forM namespaces $ \ns -> do
-      let filePath = basePath FP.</> CodeGeneration.namespaceToPath ns ++ ".json"
-      parseResult <- parseJsonFile filePath
-      case parseResult of
-        Left err -> fail $ "JSON parse error for " ++ unNamespace ns ++ ": " ++ err
-        Right jsonVal -> case CodeGeneration.decodeModuleFromJson bootstrapGraph universeModules jsonVal of
-          Left err -> fail $ "Module decode error for " ++ unNamespace ns ++ ": " ++ showError err
-          Right mod -> do
-            putStrLn $ "  Loaded: " ++ unNamespace ns
-            return mod
-
diff --git a/src/main/haskell/Hydra/Geojson/Model.hs b/src/main/haskell/Hydra/Geojson/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Geojson/Model.hs
+++ /dev/null
@@ -1,227 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A GeoJSON model based on the specification at https://www.rfc-editor.org/rfc/rfc7946. This model provides some additional structure beyond the JSON encoding described in the specification; For example, it provides MultiPoint not as an object with an array of coordinates which encode points, but as an array of Points. A BoundingBox is not simply an list of numbers, but a list of CoordinateRanges.
-
-module Hydra.Geojson.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.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
-
--- | A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections.  The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point.  The axes order of a bbox follows the axes order of geometries.
-newtype BoundingBox =
-  BoundingBox {
-    unBoundingBox :: [CoordinateRange]}
-  deriving (Eq, Ord, Read, Show)
-
-_BoundingBox = Core.Name "hydra.geojson.model.BoundingBox"
-
-data CoordinateRange =
-  CoordinateRange {
-    coordinateRangeMin :: Double,
-    coordinateRangeMax :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_CoordinateRange = Core.Name "hydra.geojson.model.CoordinateRange"
-
-_CoordinateRange_min = Core.Name "min"
-
-_CoordinateRange_max = Core.Name "max"
-
--- | A Feature object represents a spatially bounded thing.  Every Feature object is a GeoJSON object no matter where it occurs in a GeoJSON text.
-data Feature =
-  Feature {
-    -- | A Feature object has a member with the name "geometry".  The value of the geometry member SHALL be either a Geometry object as defined above or, in the case that the Feature is unlocated, a JSON null value.
-    featureGeometry :: (Maybe Geometry),
-    -- | A Feature object has a member with the name "properties".  The value of the properties member is an object (any JSON object or a JSON null value).
-    featureProperties :: (Maybe (M.Map String Model.Value)),
-    -- | If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number.
-    featureId :: (Maybe Id),
-    featureBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_Feature = Core.Name "hydra.geojson.model.Feature"
-
-_Feature_geometry = Core.Name "geometry"
-
-_Feature_properties = Core.Name "properties"
-
-_Feature_id = Core.Name "id"
-
-_Feature_bbox = Core.Name "bbox"
-
--- | A GeoJSON object with the type "FeatureCollection" is a FeatureCollection object.  A FeatureCollection object has a member with the name "features".  The value of "features" is a JSON array. Each element of the array is a Feature object as defined above.  It is possible for this array to be empty.
-data FeatureCollection =
-  FeatureCollection {
-    featureCollectionFeatures :: [Feature],
-    featureCollectionBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_FeatureCollection = Core.Name "hydra.geojson.model.FeatureCollection"
-
-_FeatureCollection_features = Core.Name "features"
-
-_FeatureCollection_bbox = Core.Name "bbox"
-
--- | A GeoJSON object with type "GeometryCollection" is a Geometry object. A GeometryCollection has a member with the name "geometries".  The value of "geometries" is an array.  Each element of this array is a GeoJSON Geometry object.  It is possible for this array to be empty.
-data GeometryCollection =
-  GeometryCollection {
-    geometryCollectionGeometries :: [Geometry],
-    geometryCollectionBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_GeometryCollection = Core.Name "hydra.geojson.model.GeometryCollection"
-
-_GeometryCollection_geometries = Core.Name "geometries"
-
-_GeometryCollection_bbox = Core.Name "bbox"
-
--- | A Geometry object represents points, curves, and surfaces in coordinate space.  Every Geometry object is a GeoJSON object no matter where it occurs in a GeoJSON text.
-data Geometry =
-  GeometryPoint Point |
-  GeometryMultiPoint MultiPoint |
-  GeometryLineString LineString |
-  GeometryMultiLineString MultiLineString |
-  GeometryPolygon Polygon |
-  GeometryMultiPolygon MultiPolygon |
-  GeometryGeometryCollection GeometryCollection
-  deriving (Eq, Ord, Read, Show)
-
-_Geometry = Core.Name "hydra.geojson.model.Geometry"
-
-_Geometry_point = Core.Name "point"
-
-_Geometry_multiPoint = Core.Name "multiPoint"
-
-_Geometry_lineString = Core.Name "lineString"
-
-_Geometry_multiLineString = Core.Name "multiLineString"
-
-_Geometry_polygon = Core.Name "polygon"
-
-_Geometry_multiPolygon = Core.Name "multiPolygon"
-
-_Geometry_geometryCollection = Core.Name "geometryCollection"
-
-data Id =
-  IdNumber Double |
-  IdString String
-  deriving (Eq, Ord, Read, Show)
-
-_Id = Core.Name "hydra.geojson.model.Id"
-
-_Id_number = Core.Name "number"
-
-_Id_string = Core.Name "string"
-
--- | For type "LineString", the "coordinates" member is an array of two or more positions.
-data LineString =
-  LineString {
-    lineStringCoordinates :: [Position],
-    lineStringBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_LineString = Core.Name "hydra.geojson.model.LineString"
-
-_LineString_coordinates = Core.Name "coordinates"
-
-_LineString_bbox = Core.Name "bbox"
-
--- | For type "MultiLineString", the "coordinates" member is an array of LineString coordinate arrays.
-data MultiLineString =
-  MultiLineString {
-    multiLineStringCoordinates :: [LineString],
-    multiLineStringBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_MultiLineString = Core.Name "hydra.geojson.model.MultiLineString"
-
-_MultiLineString_coordinates = Core.Name "coordinates"
-
-_MultiLineString_bbox = Core.Name "bbox"
-
--- | For type "MultiPoint", the "coordinates" member is an array of positions.
-data MultiPoint =
-  MultiPoint {
-    multiPointCoordinates :: [Point],
-    multiPointBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_MultiPoint = Core.Name "hydra.geojson.model.MultiPoint"
-
-_MultiPoint_coordinates = Core.Name "coordinates"
-
-_MultiPoint_bbox = Core.Name "bbox"
-
--- | For type "MultiPolygon", the "coordinates" member is an array of Polygon coordinate arrays.
-data MultiPolygon =
-  MultiPolygon {
-    multiPolygonCoordinates :: [Polygon],
-    multiPolygonBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_MultiPolygon = Core.Name "hydra.geojson.model.MultiPolygon"
-
-_MultiPolygon_coordinates = Core.Name "coordinates"
-
-_MultiPolygon_bbox = Core.Name "bbox"
-
--- | A GeoJSON object represents a Geometry, Feature, or collection of Features.
-data Object =
-  ObjectGeometry Geometry |
-  ObjectFeature Feature |
-  ObjectFeatureCollection FeatureCollection
-  deriving (Eq, Ord, Read, Show)
-
-_Object = Core.Name "hydra.geojson.model.Object"
-
-_Object_geometry = Core.Name "geometry"
-
-_Object_feature = Core.Name "feature"
-
-_Object_featureCollection = Core.Name "featureCollection"
-
--- | For type "Point", the "coordinates" member is a single position.
-data Point =
-  Point {
-    pointCoordinates :: Position,
-    pointBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_Point = Core.Name "hydra.geojson.model.Point"
-
-_Point_coordinates = Core.Name "coordinates"
-
-_Point_bbox = Core.Name "bbox"
-
--- | For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays.
--- | For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings.  The exterior ring bounds the surface, and the interior rings (if present) bound holes within the surface.
-data Polygon =
-  Polygon {
-    polygonCoordinates :: [Position],
-    polygonBbox :: (Maybe BoundingBox)}
-  deriving (Eq, Ord, Read, Show)
-
-_Polygon = Core.Name "hydra.geojson.model.Polygon"
-
-_Polygon_coordinates = Core.Name "coordinates"
-
-_Polygon_bbox = Core.Name "bbox"
-
--- | A position is an array of numbers.  There MUST be two or more elements.  The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers.  Altitude or elevation MAY be included as an optional third element.
-data Position =
-  Position {
-    positionLatitude :: Double,
-    positionLongitude :: Double,
-    positionAltitude :: (Maybe Double)}
-  deriving (Eq, Ord, Read, Show)
-
-_Position = Core.Name "hydra.geojson.model.Position"
-
-_Position_latitude = Core.Name "latitude"
-
-_Position_longitude = Core.Name "longitude"
-
-_Position_altitude = Core.Name "altitude"
diff --git a/src/main/haskell/Hydra/Go/Language.hs b/src/main/haskell/Hydra/Go/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Go/Language.hs
+++ /dev/null
@@ -1,197 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for Go 1.22+
-
-module Hydra.Go.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
--- | Language constraints for Go 1.22+
-goLanguage :: Coders.Language
-goLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.go"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeBigint,
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint8,
-          Core.IntegerTypeUint16,
-          Core.IntegerTypeUint32,
-          Core.IntegerTypeUint64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
--- | A set of reserved words in Go
-goReservedWords :: S.Set String
-goReservedWords =
-    Sets.fromList (Lists.concat [
-      goKeywords,
-      goPredeclaredIdentifiers,
-      hydraGoKeywords])
-  where
-    goKeywords =
-        [
-          "break",
-          "case",
-          "chan",
-          "const",
-          "continue",
-          "default",
-          "defer",
-          "else",
-          "fallthrough",
-          "for",
-          "func",
-          "go",
-          "goto",
-          "if",
-          "import",
-          "interface",
-          "map",
-          "package",
-          "range",
-          "return",
-          "select",
-          "struct",
-          "switch",
-          "type",
-          "var"]
-    goPredeclaredIdentifiers =
-        [
-          "any",
-          "bool",
-          "byte",
-          "comparable",
-          "complex64",
-          "complex128",
-          "error",
-          "float32",
-          "float64",
-          "int",
-          "int8",
-          "int16",
-          "int32",
-          "int64",
-          "rune",
-          "string",
-          "uint",
-          "uint8",
-          "uint16",
-          "uint32",
-          "uint64",
-          "uintptr",
-          "true",
-          "false",
-          "iota",
-          "nil",
-          "append",
-          "cap",
-          "clear",
-          "close",
-          "complex",
-          "copy",
-          "delete",
-          "imag",
-          "len",
-          "make",
-          "max",
-          "min",
-          "new",
-          "panic",
-          "print",
-          "println",
-          "real",
-          "recover"]
-    hydraGoKeywords =
-        [
-          "Node",
-          "Maybe",
-          "Either",
-          "Left",
-          "Right",
-          "Just",
-          "Nothing",
-          "Unit",
-          "Pair"]
diff --git a/src/main/haskell/Hydra/Go/Syntax.hs b/src/main/haskell/Hydra/Go/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Go/Syntax.hs
+++ /dev/null
@@ -1,1623 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A Go syntax model, based on the Go Language Specification retrieved on 2025-02-05 from https://go.dev/ref/spec
-
-module Hydra.Go.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
-
-data AnnotatedDeclaration =
-  AnnotatedDeclaration {
-    annotatedDeclarationComment :: String,
-    annotatedDeclarationDeclaration :: TopLevelDecl}
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotatedDeclaration = Core.Name "hydra.go.syntax.AnnotatedDeclaration"
-
-_AnnotatedDeclaration_comment = Core.Name "comment"
-
-_AnnotatedDeclaration_declaration = Core.Name "declaration"
-
-data Module =
-  Module {
-    modulePackage :: PackageClause,
-    moduleImports :: [ImportDecl],
-    moduleDeclarations :: [TopLevelDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_Module = Core.Name "hydra.go.syntax.Module"
-
-_Module_package = Core.Name "package"
-
-_Module_imports = Core.Name "imports"
-
-_Module_declarations = Core.Name "declarations"
-
-newtype Identifier =
-  Identifier {
-    unIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Identifier = Core.Name "hydra.go.syntax.Identifier"
-
-newtype IntLit =
-  IntLit {
-    unIntLit :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_IntLit = Core.Name "hydra.go.syntax.IntLit"
-
-newtype FloatLit =
-  FloatLit {
-    unFloatLit :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_FloatLit = Core.Name "hydra.go.syntax.FloatLit"
-
-newtype ImaginaryLit =
-  ImaginaryLit {
-    unImaginaryLit :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_ImaginaryLit = Core.Name "hydra.go.syntax.ImaginaryLit"
-
-newtype RuneLit =
-  RuneLit {
-    unRuneLit :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_RuneLit = Core.Name "hydra.go.syntax.RuneLit"
-
-data StringLit =
-  StringLitRaw RawStringLit |
-  StringLitInterpreted InterpretedStringLit
-  deriving (Eq, Ord, Read, Show)
-
-_StringLit = Core.Name "hydra.go.syntax.StringLit"
-
-_StringLit_raw = Core.Name "raw"
-
-_StringLit_interpreted = Core.Name "interpreted"
-
-newtype RawStringLit =
-  RawStringLit {
-    unRawStringLit :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_RawStringLit = Core.Name "hydra.go.syntax.RawStringLit"
-
-newtype InterpretedStringLit =
-  InterpretedStringLit {
-    unInterpretedStringLit :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_InterpretedStringLit = Core.Name "hydra.go.syntax.InterpretedStringLit"
-
-data SourceFile =
-  SourceFile {
-    sourceFilePackage :: PackageClause,
-    sourceFileImports :: [ImportDecl],
-    sourceFileDeclarations :: [TopLevelDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_SourceFile = Core.Name "hydra.go.syntax.SourceFile"
-
-_SourceFile_package = Core.Name "package"
-
-_SourceFile_imports = Core.Name "imports"
-
-_SourceFile_declarations = Core.Name "declarations"
-
-newtype PackageClause =
-  PackageClause {
-    unPackageClause :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_PackageClause = Core.Name "hydra.go.syntax.PackageClause"
-
-newtype ImportDecl =
-  ImportDecl {
-    unImportDecl :: [ImportSpec]}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportDecl = Core.Name "hydra.go.syntax.ImportDecl"
-
-data ImportSpec =
-  ImportSpec {
-    importSpecAlias :: (Maybe ImportAlias),
-    importSpecPath :: ImportPath}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportSpec = Core.Name "hydra.go.syntax.ImportSpec"
-
-_ImportSpec_alias = Core.Name "alias"
-
-_ImportSpec_path = Core.Name "path"
-
-data ImportAlias =
-  ImportAliasDot  |
-  ImportAliasName Identifier
-  deriving (Eq, Ord, Read, Show)
-
-_ImportAlias = Core.Name "hydra.go.syntax.ImportAlias"
-
-_ImportAlias_dot = Core.Name "dot"
-
-_ImportAlias_name = Core.Name "name"
-
-newtype ImportPath =
-  ImportPath {
-    unImportPath :: StringLit}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportPath = Core.Name "hydra.go.syntax.ImportPath"
-
-data Declaration =
-  DeclarationConst ConstDecl |
-  DeclarationType TypeDecl |
-  DeclarationVar VarDecl
-  deriving (Eq, Ord, Read, Show)
-
-_Declaration = Core.Name "hydra.go.syntax.Declaration"
-
-_Declaration_const = Core.Name "const"
-
-_Declaration_type = Core.Name "type"
-
-_Declaration_var = Core.Name "var"
-
-data TopLevelDecl =
-  TopLevelDeclDeclaration Declaration |
-  TopLevelDeclFunction FunctionDecl |
-  TopLevelDeclMethod MethodDecl
-  deriving (Eq, Ord, Read, Show)
-
-_TopLevelDecl = Core.Name "hydra.go.syntax.TopLevelDecl"
-
-_TopLevelDecl_declaration = Core.Name "declaration"
-
-_TopLevelDecl_function = Core.Name "function"
-
-_TopLevelDecl_method = Core.Name "method"
-
-newtype ConstDecl =
-  ConstDecl {
-    unConstDecl :: [ConstSpec]}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstDecl = Core.Name "hydra.go.syntax.ConstDecl"
-
-data ConstSpec =
-  ConstSpec {
-    constSpecNames :: [Identifier],
-    constSpecType :: (Maybe Type),
-    constSpecValues :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstSpec = Core.Name "hydra.go.syntax.ConstSpec"
-
-_ConstSpec_names = Core.Name "names"
-
-_ConstSpec_type = Core.Name "type"
-
-_ConstSpec_values = Core.Name "values"
-
-newtype VarDecl =
-  VarDecl {
-    unVarDecl :: [VarSpec]}
-  deriving (Eq, Ord, Read, Show)
-
-_VarDecl = Core.Name "hydra.go.syntax.VarDecl"
-
-data VarSpec =
-  VarSpec {
-    varSpecNames :: [Identifier],
-    varSpecType :: (Maybe Type),
-    varSpecValues :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_VarSpec = Core.Name "hydra.go.syntax.VarSpec"
-
-_VarSpec_names = Core.Name "names"
-
-_VarSpec_type = Core.Name "type"
-
-_VarSpec_values = Core.Name "values"
-
-data ShortVarDecl =
-  ShortVarDecl {
-    shortVarDeclNames :: [Identifier],
-    shortVarDeclValues :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ShortVarDecl = Core.Name "hydra.go.syntax.ShortVarDecl"
-
-_ShortVarDecl_names = Core.Name "names"
-
-_ShortVarDecl_values = Core.Name "values"
-
-newtype TypeDecl =
-  TypeDecl {
-    unTypeDecl :: [TypeSpec]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeDecl = Core.Name "hydra.go.syntax.TypeDecl"
-
-data TypeSpec =
-  TypeSpecAlias AliasDecl |
-  TypeSpecDefinition TypeDef
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSpec = Core.Name "hydra.go.syntax.TypeSpec"
-
-_TypeSpec_alias = Core.Name "alias"
-
-_TypeSpec_definition = Core.Name "definition"
-
-data AliasDecl =
-  AliasDecl {
-    aliasDeclName :: Identifier,
-    aliasDeclType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_AliasDecl = Core.Name "hydra.go.syntax.AliasDecl"
-
-_AliasDecl_name = Core.Name "name"
-
-_AliasDecl_type = Core.Name "type"
-
-data TypeDef =
-  TypeDef {
-    typeDefName :: Identifier,
-    typeDefTypeParams :: (Maybe TypeParameters),
-    typeDefType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeDef = Core.Name "hydra.go.syntax.TypeDef"
-
-_TypeDef_name = Core.Name "name"
-
-_TypeDef_typeParams = Core.Name "typeParams"
-
-_TypeDef_type = Core.Name "type"
-
-newtype TypeParameters =
-  TypeParameters {
-    unTypeParameters :: [TypeParamDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameters = Core.Name "hydra.go.syntax.TypeParameters"
-
-data TypeParamDecl =
-  TypeParamDecl {
-    typeParamDeclNames :: [Identifier],
-    typeParamDeclConstraint :: TypeConstraint}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParamDecl = Core.Name "hydra.go.syntax.TypeParamDecl"
-
-_TypeParamDecl_names = Core.Name "names"
-
-_TypeParamDecl_constraint = Core.Name "constraint"
-
-newtype TypeConstraint =
-  TypeConstraint {
-    unTypeConstraint :: TypeElem}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeConstraint = Core.Name "hydra.go.syntax.TypeConstraint"
-
-data FunctionDecl =
-  FunctionDecl {
-    functionDeclName :: Identifier,
-    functionDeclTypeParams :: (Maybe TypeParameters),
-    functionDeclSignature :: Signature,
-    functionDeclBody :: (Maybe FunctionBody)}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionDecl = Core.Name "hydra.go.syntax.FunctionDecl"
-
-_FunctionDecl_name = Core.Name "name"
-
-_FunctionDecl_typeParams = Core.Name "typeParams"
-
-_FunctionDecl_signature = Core.Name "signature"
-
-_FunctionDecl_body = Core.Name "body"
-
-newtype FunctionBody =
-  FunctionBody {
-    unFunctionBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionBody = Core.Name "hydra.go.syntax.FunctionBody"
-
-data MethodDecl =
-  MethodDecl {
-    methodDeclReceiver :: Receiver,
-    methodDeclName :: Identifier,
-    methodDeclSignature :: Signature,
-    methodDeclBody :: (Maybe FunctionBody)}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodDecl = Core.Name "hydra.go.syntax.MethodDecl"
-
-_MethodDecl_receiver = Core.Name "receiver"
-
-_MethodDecl_name = Core.Name "name"
-
-_MethodDecl_signature = Core.Name "signature"
-
-_MethodDecl_body = Core.Name "body"
-
-data Receiver =
-  Receiver {
-    receiverName :: (Maybe Identifier),
-    receiverType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_Receiver = Core.Name "hydra.go.syntax.Receiver"
-
-_Receiver_name = Core.Name "name"
-
-_Receiver_type = Core.Name "type"
-
-data Type =
-  TypeName_ TypeName |
-  TypeLiteral TypeLit |
-  TypeParen Type
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.go.syntax.Type"
-
-_Type_name = Core.Name "name"
-
-_Type_literal = Core.Name "literal"
-
-_Type_paren = Core.Name "paren"
-
-data TypeName =
-  TypeName {
-    typeNameName :: QualifiedIdent,
-    typeNameTypeArgs :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeName = Core.Name "hydra.go.syntax.TypeName"
-
-_TypeName_name = Core.Name "name"
-
-_TypeName_typeArgs = Core.Name "typeArgs"
-
-data QualifiedIdent =
-  QualifiedIdent {
-    qualifiedIdentPackage :: (Maybe Identifier),
-    qualifiedIdentName :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedIdent = Core.Name "hydra.go.syntax.QualifiedIdent"
-
-_QualifiedIdent_package = Core.Name "package"
-
-_QualifiedIdent_name = Core.Name "name"
-
-data TypeLit =
-  TypeLitArray ArrayType |
-  TypeLitStruct StructType |
-  TypeLitPointer PointerType |
-  TypeLitFunction FunctionType |
-  TypeLitInterface InterfaceType |
-  TypeLitSlice SliceType |
-  TypeLitMap MapType |
-  TypeLitChannel ChannelType
-  deriving (Eq, Ord, Read, Show)
-
-_TypeLit = Core.Name "hydra.go.syntax.TypeLit"
-
-_TypeLit_array = Core.Name "array"
-
-_TypeLit_struct = Core.Name "struct"
-
-_TypeLit_pointer = Core.Name "pointer"
-
-_TypeLit_function = Core.Name "function"
-
-_TypeLit_interface = Core.Name "interface"
-
-_TypeLit_slice = Core.Name "slice"
-
-_TypeLit_map = Core.Name "map"
-
-_TypeLit_channel = Core.Name "channel"
-
-data ArrayType =
-  ArrayType {
-    arrayTypeLength :: Expression,
-    arrayTypeElement :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayType = Core.Name "hydra.go.syntax.ArrayType"
-
-_ArrayType_length = Core.Name "length"
-
-_ArrayType_element = Core.Name "element"
-
-newtype SliceType =
-  SliceType {
-    unSliceType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_SliceType = Core.Name "hydra.go.syntax.SliceType"
-
-newtype StructType =
-  StructType {
-    unStructType :: [FieldDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_StructType = Core.Name "hydra.go.syntax.StructType"
-
-data FieldDecl =
-  FieldDeclNamed NamedField |
-  FieldDeclEmbedded EmbeddedField
-  deriving (Eq, Ord, Read, Show)
-
-_FieldDecl = Core.Name "hydra.go.syntax.FieldDecl"
-
-_FieldDecl_named = Core.Name "named"
-
-_FieldDecl_embedded = Core.Name "embedded"
-
-data NamedField =
-  NamedField {
-    namedFieldNames :: [Identifier],
-    namedFieldType :: Type,
-    namedFieldTag :: (Maybe Tag)}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedField = Core.Name "hydra.go.syntax.NamedField"
-
-_NamedField_names = Core.Name "names"
-
-_NamedField_type = Core.Name "type"
-
-_NamedField_tag = Core.Name "tag"
-
-data EmbeddedField =
-  EmbeddedField {
-    embeddedFieldPointer :: Bool,
-    embeddedFieldType :: TypeName,
-    embeddedFieldTag :: (Maybe Tag)}
-  deriving (Eq, Ord, Read, Show)
-
-_EmbeddedField = Core.Name "hydra.go.syntax.EmbeddedField"
-
-_EmbeddedField_pointer = Core.Name "pointer"
-
-_EmbeddedField_type = Core.Name "type"
-
-_EmbeddedField_tag = Core.Name "tag"
-
-newtype Tag =
-  Tag {
-    unTag :: StringLit}
-  deriving (Eq, Ord, Read, Show)
-
-_Tag = Core.Name "hydra.go.syntax.Tag"
-
-newtype PointerType =
-  PointerType {
-    unPointerType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_PointerType = Core.Name "hydra.go.syntax.PointerType"
-
-newtype FunctionType =
-  FunctionType {
-    unFunctionType :: Signature}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionType = Core.Name "hydra.go.syntax.FunctionType"
-
-data Signature =
-  Signature {
-    signatureParameters :: Parameters,
-    signatureResult :: (Maybe Result)}
-  deriving (Eq, Ord, Read, Show)
-
-_Signature = Core.Name "hydra.go.syntax.Signature"
-
-_Signature_parameters = Core.Name "parameters"
-
-_Signature_result = Core.Name "result"
-
-data Result =
-  ResultParameters Parameters |
-  ResultType Type
-  deriving (Eq, Ord, Read, Show)
-
-_Result = Core.Name "hydra.go.syntax.Result"
-
-_Result_parameters = Core.Name "parameters"
-
-_Result_type = Core.Name "type"
-
-newtype Parameters =
-  Parameters {
-    unParameters :: [ParameterDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_Parameters = Core.Name "hydra.go.syntax.Parameters"
-
-data ParameterDecl =
-  ParameterDecl {
-    parameterDeclNames :: [Identifier],
-    parameterDeclVariadic :: Bool,
-    parameterDeclType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_ParameterDecl = Core.Name "hydra.go.syntax.ParameterDecl"
-
-_ParameterDecl_names = Core.Name "names"
-
-_ParameterDecl_variadic = Core.Name "variadic"
-
-_ParameterDecl_type = Core.Name "type"
-
-newtype InterfaceType =
-  InterfaceType {
-    unInterfaceType :: [InterfaceElem]}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceType = Core.Name "hydra.go.syntax.InterfaceType"
-
-data InterfaceElem =
-  InterfaceElemMethod MethodElem |
-  InterfaceElemType TypeElem
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceElem = Core.Name "hydra.go.syntax.InterfaceElem"
-
-_InterfaceElem_method = Core.Name "method"
-
-_InterfaceElem_type = Core.Name "type"
-
-data MethodElem =
-  MethodElem {
-    methodElemName :: Identifier,
-    methodElemSignature :: Signature}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodElem = Core.Name "hydra.go.syntax.MethodElem"
-
-_MethodElem_name = Core.Name "name"
-
-_MethodElem_signature = Core.Name "signature"
-
-newtype TypeElem =
-  TypeElem {
-    unTypeElem :: [TypeTerm]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeElem = Core.Name "hydra.go.syntax.TypeElem"
-
-data TypeTerm =
-  TypeTerm {
-    typeTermUnderlying :: Bool,
-    typeTermType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeTerm = Core.Name "hydra.go.syntax.TypeTerm"
-
-_TypeTerm_underlying = Core.Name "underlying"
-
-_TypeTerm_type = Core.Name "type"
-
-data MapType =
-  MapType {
-    mapTypeKey :: Type,
-    mapTypeValue :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_MapType = Core.Name "hydra.go.syntax.MapType"
-
-_MapType_key = Core.Name "key"
-
-_MapType_value = Core.Name "value"
-
-data ChannelType =
-  ChannelType {
-    channelTypeDirection :: ChannelDirection,
-    channelTypeElement :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_ChannelType = Core.Name "hydra.go.syntax.ChannelType"
-
-_ChannelType_direction = Core.Name "direction"
-
-_ChannelType_element = Core.Name "element"
-
-data ChannelDirection =
-  ChannelDirectionBidirectional  |
-  ChannelDirectionSend  |
-  ChannelDirectionReceive
-  deriving (Eq, Ord, Read, Show)
-
-_ChannelDirection = Core.Name "hydra.go.syntax.ChannelDirection"
-
-_ChannelDirection_bidirectional = Core.Name "bidirectional"
-
-_ChannelDirection_send = Core.Name "send"
-
-_ChannelDirection_receive = Core.Name "receive"
-
-data Expression =
-  ExpressionUnary UnaryExpr |
-  ExpressionBinary BinaryExpr
-  deriving (Eq, Ord, Read, Show)
-
-_Expression = Core.Name "hydra.go.syntax.Expression"
-
-_Expression_unary = Core.Name "unary"
-
-_Expression_binary = Core.Name "binary"
-
-data UnaryExpr =
-  UnaryExprPrimary PrimaryExpr |
-  UnaryExprOp UnaryOperation
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryExpr = Core.Name "hydra.go.syntax.UnaryExpr"
-
-_UnaryExpr_primary = Core.Name "primary"
-
-_UnaryExpr_op = Core.Name "op"
-
-data UnaryOperation =
-  UnaryOperation {
-    unaryOperationOp :: UnaryOp,
-    unaryOperationOperand :: UnaryExpr}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOperation = Core.Name "hydra.go.syntax.UnaryOperation"
-
-_UnaryOperation_op = Core.Name "op"
-
-_UnaryOperation_operand = Core.Name "operand"
-
-data BinaryExpr =
-  BinaryExpr {
-    binaryExprLeft :: Expression,
-    binaryExprOp :: BinaryOp,
-    binaryExprRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryExpr = Core.Name "hydra.go.syntax.BinaryExpr"
-
-_BinaryExpr_left = Core.Name "left"
-
-_BinaryExpr_op = Core.Name "op"
-
-_BinaryExpr_right = Core.Name "right"
-
-data BinaryOp =
-  BinaryOpOr  |
-  BinaryOpAnd  |
-  BinaryOpEqual  |
-  BinaryOpNotEqual  |
-  BinaryOpLess  |
-  BinaryOpLessEqual  |
-  BinaryOpGreater  |
-  BinaryOpGreaterEqual  |
-  BinaryOpAdd  |
-  BinaryOpSubtract  |
-  BinaryOpBitwiseOr  |
-  BinaryOpBitwiseXor  |
-  BinaryOpMultiply  |
-  BinaryOpDivide  |
-  BinaryOpRemainder  |
-  BinaryOpLeftShift  |
-  BinaryOpRightShift  |
-  BinaryOpBitwiseAnd  |
-  BinaryOpBitClear
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryOp = Core.Name "hydra.go.syntax.BinaryOp"
-
-_BinaryOp_or = Core.Name "or"
-
-_BinaryOp_and = Core.Name "and"
-
-_BinaryOp_equal = Core.Name "equal"
-
-_BinaryOp_notEqual = Core.Name "notEqual"
-
-_BinaryOp_less = Core.Name "less"
-
-_BinaryOp_lessEqual = Core.Name "lessEqual"
-
-_BinaryOp_greater = Core.Name "greater"
-
-_BinaryOp_greaterEqual = Core.Name "greaterEqual"
-
-_BinaryOp_add = Core.Name "add"
-
-_BinaryOp_subtract = Core.Name "subtract"
-
-_BinaryOp_bitwiseOr = Core.Name "bitwiseOr"
-
-_BinaryOp_bitwiseXor = Core.Name "bitwiseXor"
-
-_BinaryOp_multiply = Core.Name "multiply"
-
-_BinaryOp_divide = Core.Name "divide"
-
-_BinaryOp_remainder = Core.Name "remainder"
-
-_BinaryOp_leftShift = Core.Name "leftShift"
-
-_BinaryOp_rightShift = Core.Name "rightShift"
-
-_BinaryOp_bitwiseAnd = Core.Name "bitwiseAnd"
-
-_BinaryOp_bitClear = Core.Name "bitClear"
-
-data PrimaryExpr =
-  PrimaryExprOperand Operand |
-  PrimaryExprConversion Conversion |
-  PrimaryExprMethodExpr MethodExpr |
-  PrimaryExprSelector SelectorExpr |
-  PrimaryExprIndex IndexExpr |
-  PrimaryExprSlice SliceExpr |
-  PrimaryExprTypeAssertion TypeAssertionExpr |
-  PrimaryExprCall CallExpr
-  deriving (Eq, Ord, Read, Show)
-
-_PrimaryExpr = Core.Name "hydra.go.syntax.PrimaryExpr"
-
-_PrimaryExpr_operand = Core.Name "operand"
-
-_PrimaryExpr_conversion = Core.Name "conversion"
-
-_PrimaryExpr_methodExpr = Core.Name "methodExpr"
-
-_PrimaryExpr_selector = Core.Name "selector"
-
-_PrimaryExpr_index = Core.Name "index"
-
-_PrimaryExpr_slice = Core.Name "slice"
-
-_PrimaryExpr_typeAssertion = Core.Name "typeAssertion"
-
-_PrimaryExpr_call = Core.Name "call"
-
-data SelectorExpr =
-  SelectorExpr {
-    selectorExprExpr :: PrimaryExpr,
-    selectorExprSelector :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_SelectorExpr = Core.Name "hydra.go.syntax.SelectorExpr"
-
-_SelectorExpr_expr = Core.Name "expr"
-
-_SelectorExpr_selector = Core.Name "selector"
-
-data IndexExpr =
-  IndexExpr {
-    indexExprExpr :: PrimaryExpr,
-    indexExprIndex :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_IndexExpr = Core.Name "hydra.go.syntax.IndexExpr"
-
-_IndexExpr_expr = Core.Name "expr"
-
-_IndexExpr_index = Core.Name "index"
-
-data SliceExpr =
-  SliceExpr {
-    sliceExprExpr :: PrimaryExpr,
-    sliceExprSlice :: Slice}
-  deriving (Eq, Ord, Read, Show)
-
-_SliceExpr = Core.Name "hydra.go.syntax.SliceExpr"
-
-_SliceExpr_expr = Core.Name "expr"
-
-_SliceExpr_slice = Core.Name "slice"
-
-data TypeAssertionExpr =
-  TypeAssertionExpr {
-    typeAssertionExprExpr :: PrimaryExpr,
-    typeAssertionExprType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeAssertionExpr = Core.Name "hydra.go.syntax.TypeAssertionExpr"
-
-_TypeAssertionExpr_expr = Core.Name "expr"
-
-_TypeAssertionExpr_type = Core.Name "type"
-
-data CallExpr =
-  CallExpr {
-    callExprFunction :: PrimaryExpr,
-    callExprArguments :: Arguments}
-  deriving (Eq, Ord, Read, Show)
-
-_CallExpr = Core.Name "hydra.go.syntax.CallExpr"
-
-_CallExpr_function = Core.Name "function"
-
-_CallExpr_arguments = Core.Name "arguments"
-
-data Operand =
-  OperandLiteral Literal |
-  OperandName_ OperandName |
-  OperandParen Expression
-  deriving (Eq, Ord, Read, Show)
-
-_Operand = Core.Name "hydra.go.syntax.Operand"
-
-_Operand_literal = Core.Name "literal"
-
-_Operand_name = Core.Name "name"
-
-_Operand_paren = Core.Name "paren"
-
-data OperandName =
-  OperandName {
-    operandNameName :: QualifiedIdent,
-    operandNameTypeArgs :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-
-_OperandName = Core.Name "hydra.go.syntax.OperandName"
-
-_OperandName_name = Core.Name "name"
-
-_OperandName_typeArgs = Core.Name "typeArgs"
-
-data Literal =
-  LiteralBasic BasicLit |
-  LiteralComposite CompositeLit |
-  LiteralFunction FunctionLit
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.go.syntax.Literal"
-
-_Literal_basic = Core.Name "basic"
-
-_Literal_composite = Core.Name "composite"
-
-_Literal_function = Core.Name "function"
-
-data BasicLit =
-  BasicLitInt IntLit |
-  BasicLitFloat FloatLit |
-  BasicLitImaginary ImaginaryLit |
-  BasicLitRune RuneLit |
-  BasicLitString StringLit
-  deriving (Eq, Ord, Read, Show)
-
-_BasicLit = Core.Name "hydra.go.syntax.BasicLit"
-
-_BasicLit_int = Core.Name "int"
-
-_BasicLit_float = Core.Name "float"
-
-_BasicLit_imaginary = Core.Name "imaginary"
-
-_BasicLit_rune = Core.Name "rune"
-
-_BasicLit_string = Core.Name "string"
-
-data CompositeLit =
-  CompositeLit {
-    compositeLitType :: LiteralType,
-    compositeLitValue :: LiteralValue}
-  deriving (Eq, Ord, Read, Show)
-
-_CompositeLit = Core.Name "hydra.go.syntax.CompositeLit"
-
-_CompositeLit_type = Core.Name "type"
-
-_CompositeLit_value = Core.Name "value"
-
-data LiteralType =
-  LiteralTypeStruct StructType |
-  LiteralTypeArray ArrayType |
-  LiteralTypeInferredArray Type |
-  LiteralTypeSlice SliceType |
-  LiteralTypeMap MapType |
-  LiteralTypeName TypeName
-  deriving (Eq, Ord, Read, Show)
-
-_LiteralType = Core.Name "hydra.go.syntax.LiteralType"
-
-_LiteralType_struct = Core.Name "struct"
-
-_LiteralType_array = Core.Name "array"
-
-_LiteralType_inferredArray = Core.Name "inferredArray"
-
-_LiteralType_slice = Core.Name "slice"
-
-_LiteralType_map = Core.Name "map"
-
-_LiteralType_name = Core.Name "name"
-
-newtype LiteralValue =
-  LiteralValue {
-    unLiteralValue :: [KeyedElement]}
-  deriving (Eq, Ord, Read, Show)
-
-_LiteralValue = Core.Name "hydra.go.syntax.LiteralValue"
-
-newtype ElementList =
-  ElementList {
-    unElementList :: [KeyedElement]}
-  deriving (Eq, Ord, Read, Show)
-
-_ElementList = Core.Name "hydra.go.syntax.ElementList"
-
-data KeyedElement =
-  KeyedElement {
-    keyedElementKey :: (Maybe Key),
-    keyedElementElement :: Element}
-  deriving (Eq, Ord, Read, Show)
-
-_KeyedElement = Core.Name "hydra.go.syntax.KeyedElement"
-
-_KeyedElement_key = Core.Name "key"
-
-_KeyedElement_element = Core.Name "element"
-
-data Key =
-  KeyField Identifier |
-  KeyExpression Expression |
-  KeyLiteral LiteralValue
-  deriving (Eq, Ord, Read, Show)
-
-_Key = Core.Name "hydra.go.syntax.Key"
-
-_Key_field = Core.Name "field"
-
-_Key_expression = Core.Name "expression"
-
-_Key_literal = Core.Name "literal"
-
-data Element =
-  ElementExpression Expression |
-  ElementLiteral LiteralValue
-  deriving (Eq, Ord, Read, Show)
-
-_Element = Core.Name "hydra.go.syntax.Element"
-
-_Element_expression = Core.Name "expression"
-
-_Element_literal = Core.Name "literal"
-
-data FunctionLit =
-  FunctionLit {
-    functionLitSignature :: Signature,
-    functionLitBody :: FunctionBody}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionLit = Core.Name "hydra.go.syntax.FunctionLit"
-
-_FunctionLit_signature = Core.Name "signature"
-
-_FunctionLit_body = Core.Name "body"
-
-newtype Selector =
-  Selector {
-    unSelector :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_Selector = Core.Name "hydra.go.syntax.Selector"
-
-newtype Index =
-  Index {
-    unIndex :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_Index = Core.Name "hydra.go.syntax.Index"
-
-data Slice =
-  SliceSimple SimpleSlice |
-  SliceFull FullSlice
-  deriving (Eq, Ord, Read, Show)
-
-_Slice = Core.Name "hydra.go.syntax.Slice"
-
-_Slice_simple = Core.Name "simple"
-
-_Slice_full = Core.Name "full"
-
-data SimpleSlice =
-  SimpleSlice {
-    simpleSliceLow :: (Maybe Expression),
-    simpleSliceHigh :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_SimpleSlice = Core.Name "hydra.go.syntax.SimpleSlice"
-
-_SimpleSlice_low = Core.Name "low"
-
-_SimpleSlice_high = Core.Name "high"
-
-data FullSlice =
-  FullSlice {
-    fullSliceLow :: (Maybe Expression),
-    fullSliceHigh :: Expression,
-    fullSliceMax :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_FullSlice = Core.Name "hydra.go.syntax.FullSlice"
-
-_FullSlice_low = Core.Name "low"
-
-_FullSlice_high = Core.Name "high"
-
-_FullSlice_max = Core.Name "max"
-
-newtype TypeAssertion =
-  TypeAssertion {
-    unTypeAssertion :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeAssertion = Core.Name "hydra.go.syntax.TypeAssertion"
-
-data Arguments =
-  Arguments {
-    argumentsTypeArg :: (Maybe Type),
-    argumentsExpressions :: [Expression],
-    argumentsEllipsis :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Arguments = Core.Name "hydra.go.syntax.Arguments"
-
-_Arguments_typeArg = Core.Name "typeArg"
-
-_Arguments_expressions = Core.Name "expressions"
-
-_Arguments_ellipsis = Core.Name "ellipsis"
-
-data MethodExpr =
-  MethodExpr {
-    methodExprReceiver :: Type,
-    methodExprMethod :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodExpr = Core.Name "hydra.go.syntax.MethodExpr"
-
-_MethodExpr_receiver = Core.Name "receiver"
-
-_MethodExpr_method = Core.Name "method"
-
-data Conversion =
-  Conversion {
-    conversionType :: Type,
-    conversionExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_Conversion = Core.Name "hydra.go.syntax.Conversion"
-
-_Conversion_type = Core.Name "type"
-
-_Conversion_expression = Core.Name "expression"
-
-data Statement =
-  StatementDeclaration Declaration |
-  StatementLabeled LabeledStmt |
-  StatementSimple SimpleStmt |
-  StatementGo GoStmt |
-  StatementReturn ReturnStmt |
-  StatementBreak BreakStmt |
-  StatementContinue ContinueStmt |
-  StatementGoto GotoStmt |
-  StatementFallthrough FallthroughStmt |
-  StatementBlock Block |
-  StatementIf IfStmt |
-  StatementSwitch SwitchStmt |
-  StatementSelect SelectStmt |
-  StatementFor ForStmt |
-  StatementDefer DeferStmt
-  deriving (Eq, Ord, Read, Show)
-
-_Statement = Core.Name "hydra.go.syntax.Statement"
-
-_Statement_declaration = Core.Name "declaration"
-
-_Statement_labeled = Core.Name "labeled"
-
-_Statement_simple = Core.Name "simple"
-
-_Statement_go = Core.Name "go"
-
-_Statement_return = Core.Name "return"
-
-_Statement_break = Core.Name "break"
-
-_Statement_continue = Core.Name "continue"
-
-_Statement_goto = Core.Name "goto"
-
-_Statement_fallthrough = Core.Name "fallthrough"
-
-_Statement_block = Core.Name "block"
-
-_Statement_if = Core.Name "if"
-
-_Statement_switch = Core.Name "switch"
-
-_Statement_select = Core.Name "select"
-
-_Statement_for = Core.Name "for"
-
-_Statement_defer = Core.Name "defer"
-
-data SimpleStmt =
-  SimpleStmtEmpty EmptyStmt |
-  SimpleStmtExpression ExpressionStmt |
-  SimpleStmtSend SendStmt |
-  SimpleStmtIncDec IncDecStmt |
-  SimpleStmtAssignment Assignment |
-  SimpleStmtShortVarDecl ShortVarDecl
-  deriving (Eq, Ord, Read, Show)
-
-_SimpleStmt = Core.Name "hydra.go.syntax.SimpleStmt"
-
-_SimpleStmt_empty = Core.Name "empty"
-
-_SimpleStmt_expression = Core.Name "expression"
-
-_SimpleStmt_send = Core.Name "send"
-
-_SimpleStmt_incDec = Core.Name "incDec"
-
-_SimpleStmt_assignment = Core.Name "assignment"
-
-_SimpleStmt_shortVarDecl = Core.Name "shortVarDecl"
-
-newtype EmptyStmt =
-  EmptyStmt {
-    unEmptyStmt :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_EmptyStmt = Core.Name "hydra.go.syntax.EmptyStmt"
-
-data LabeledStmt =
-  LabeledStmt {
-    labeledStmtLabel :: Identifier,
-    labeledStmtStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_LabeledStmt = Core.Name "hydra.go.syntax.LabeledStmt"
-
-_LabeledStmt_label = Core.Name "label"
-
-_LabeledStmt_statement = Core.Name "statement"
-
-newtype ExpressionStmt =
-  ExpressionStmt {
-    unExpressionStmt :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ExpressionStmt = Core.Name "hydra.go.syntax.ExpressionStmt"
-
-data SendStmt =
-  SendStmt {
-    sendStmtChannel :: Expression,
-    sendStmtValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_SendStmt = Core.Name "hydra.go.syntax.SendStmt"
-
-_SendStmt_channel = Core.Name "channel"
-
-_SendStmt_value = Core.Name "value"
-
-data IncDecStmt =
-  IncDecStmt {
-    incDecStmtExpression :: Expression,
-    incDecStmtIncrement :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_IncDecStmt = Core.Name "hydra.go.syntax.IncDecStmt"
-
-_IncDecStmt_expression = Core.Name "expression"
-
-_IncDecStmt_increment = Core.Name "increment"
-
-data Assignment =
-  Assignment {
-    assignmentLhs :: [Expression],
-    assignmentOp :: AssignOp,
-    assignmentRhs :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_Assignment = Core.Name "hydra.go.syntax.Assignment"
-
-_Assignment_lhs = Core.Name "lhs"
-
-_Assignment_op = Core.Name "op"
-
-_Assignment_rhs = Core.Name "rhs"
-
-data AssignOp =
-  AssignOpSimple  |
-  AssignOpAdd AddOp |
-  AssignOpMul MulOp
-  deriving (Eq, Ord, Read, Show)
-
-_AssignOp = Core.Name "hydra.go.syntax.AssignOp"
-
-_AssignOp_simple = Core.Name "simple"
-
-_AssignOp_add = Core.Name "add"
-
-_AssignOp_mul = Core.Name "mul"
-
-data IfStmt =
-  IfStmt {
-    ifStmtInit :: (Maybe SimpleStmt),
-    ifStmtCondition :: Expression,
-    ifStmtThen :: Block,
-    ifStmtElse :: (Maybe ElseClause)}
-  deriving (Eq, Ord, Read, Show)
-
-_IfStmt = Core.Name "hydra.go.syntax.IfStmt"
-
-_IfStmt_init = Core.Name "init"
-
-_IfStmt_condition = Core.Name "condition"
-
-_IfStmt_then = Core.Name "then"
-
-_IfStmt_else = Core.Name "else"
-
-data ElseClause =
-  ElseClauseIf IfStmt |
-  ElseClauseBlock Block
-  deriving (Eq, Ord, Read, Show)
-
-_ElseClause = Core.Name "hydra.go.syntax.ElseClause"
-
-_ElseClause_if = Core.Name "if"
-
-_ElseClause_block = Core.Name "block"
-
-data SwitchStmt =
-  SwitchStmtExpression ExprSwitchStmt |
-  SwitchStmtType TypeSwitchStmt
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchStmt = Core.Name "hydra.go.syntax.SwitchStmt"
-
-_SwitchStmt_expression = Core.Name "expression"
-
-_SwitchStmt_type = Core.Name "type"
-
-data ExprSwitchStmt =
-  ExprSwitchStmt {
-    exprSwitchStmtInit :: (Maybe SimpleStmt),
-    exprSwitchStmtExpression :: (Maybe Expression),
-    exprSwitchStmtCases :: [ExprCaseClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExprSwitchStmt = Core.Name "hydra.go.syntax.ExprSwitchStmt"
-
-_ExprSwitchStmt_init = Core.Name "init"
-
-_ExprSwitchStmt_expression = Core.Name "expression"
-
-_ExprSwitchStmt_cases = Core.Name "cases"
-
-data ExprCaseClause =
-  ExprCaseClause {
-    exprCaseClauseCase :: (Maybe [Expression]),
-    exprCaseClauseStatements :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExprCaseClause = Core.Name "hydra.go.syntax.ExprCaseClause"
-
-_ExprCaseClause_case = Core.Name "case"
-
-_ExprCaseClause_statements = Core.Name "statements"
-
-data TypeSwitchStmt =
-  TypeSwitchStmt {
-    typeSwitchStmtInit :: (Maybe SimpleStmt),
-    typeSwitchStmtGuard :: TypeSwitchGuard,
-    typeSwitchStmtCases :: [TypeCaseClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSwitchStmt = Core.Name "hydra.go.syntax.TypeSwitchStmt"
-
-_TypeSwitchStmt_init = Core.Name "init"
-
-_TypeSwitchStmt_guard = Core.Name "guard"
-
-_TypeSwitchStmt_cases = Core.Name "cases"
-
-data TypeSwitchGuard =
-  TypeSwitchGuard {
-    typeSwitchGuardName :: (Maybe Identifier),
-    typeSwitchGuardExpression :: PrimaryExpr}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSwitchGuard = Core.Name "hydra.go.syntax.TypeSwitchGuard"
-
-_TypeSwitchGuard_name = Core.Name "name"
-
-_TypeSwitchGuard_expression = Core.Name "expression"
-
-data TypeCaseClause =
-  TypeCaseClause {
-    typeCaseClauseCase :: (Maybe [Type]),
-    typeCaseClauseStatements :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeCaseClause = Core.Name "hydra.go.syntax.TypeCaseClause"
-
-_TypeCaseClause_case = Core.Name "case"
-
-_TypeCaseClause_statements = Core.Name "statements"
-
-data ForStmt =
-  ForStmt {
-    forStmtClause :: (Maybe ForClauseOrRange),
-    forStmtBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_ForStmt = Core.Name "hydra.go.syntax.ForStmt"
-
-_ForStmt_clause = Core.Name "clause"
-
-_ForStmt_body = Core.Name "body"
-
-data ForClauseOrRange =
-  ForClauseOrRangeCondition Expression |
-  ForClauseOrRangeClause ForClause |
-  ForClauseOrRangeRange RangeClause
-  deriving (Eq, Ord, Read, Show)
-
-_ForClauseOrRange = Core.Name "hydra.go.syntax.ForClauseOrRange"
-
-_ForClauseOrRange_condition = Core.Name "condition"
-
-_ForClauseOrRange_clause = Core.Name "clause"
-
-_ForClauseOrRange_range = Core.Name "range"
-
-data ForClause =
-  ForClause {
-    forClauseInit :: (Maybe SimpleStmt),
-    forClauseCondition :: (Maybe Expression),
-    forClausePost :: (Maybe SimpleStmt)}
-  deriving (Eq, Ord, Read, Show)
-
-_ForClause = Core.Name "hydra.go.syntax.ForClause"
-
-_ForClause_init = Core.Name "init"
-
-_ForClause_condition = Core.Name "condition"
-
-_ForClause_post = Core.Name "post"
-
-data RangeClause =
-  RangeClause {
-    rangeClauseVars :: (Maybe RangeVars),
-    rangeClauseExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_RangeClause = Core.Name "hydra.go.syntax.RangeClause"
-
-_RangeClause_vars = Core.Name "vars"
-
-_RangeClause_expression = Core.Name "expression"
-
-data RangeVars =
-  RangeVarsAssign [Expression] |
-  RangeVarsDeclare [Identifier]
-  deriving (Eq, Ord, Read, Show)
-
-_RangeVars = Core.Name "hydra.go.syntax.RangeVars"
-
-_RangeVars_assign = Core.Name "assign"
-
-_RangeVars_declare = Core.Name "declare"
-
-newtype GoStmt =
-  GoStmt {
-    unGoStmt :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_GoStmt = Core.Name "hydra.go.syntax.GoStmt"
-
-newtype SelectStmt =
-  SelectStmt {
-    unSelectStmt :: [CommClause]}
-  deriving (Eq, Ord, Read, Show)
-
-_SelectStmt = Core.Name "hydra.go.syntax.SelectStmt"
-
-data CommClause =
-  CommClause {
-    commClauseCase :: CommCase,
-    commClauseStatements :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_CommClause = Core.Name "hydra.go.syntax.CommClause"
-
-_CommClause_case = Core.Name "case"
-
-_CommClause_statements = Core.Name "statements"
-
-data CommCase =
-  CommCaseSend SendStmt |
-  CommCaseReceive ReceiveCase |
-  CommCaseDefault
-  deriving (Eq, Ord, Read, Show)
-
-_CommCase = Core.Name "hydra.go.syntax.CommCase"
-
-_CommCase_send = Core.Name "send"
-
-_CommCase_receive = Core.Name "receive"
-
-_CommCase_default = Core.Name "default"
-
-data ReceiveCase =
-  ReceiveCase {
-    receiveCaseVars :: (Maybe RangeVars),
-    receiveCaseExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ReceiveCase = Core.Name "hydra.go.syntax.ReceiveCase"
-
-_ReceiveCase_vars = Core.Name "vars"
-
-_ReceiveCase_expression = Core.Name "expression"
-
-newtype ReturnStmt =
-  ReturnStmt {
-    unReturnStmt :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ReturnStmt = Core.Name "hydra.go.syntax.ReturnStmt"
-
-newtype BreakStmt =
-  BreakStmt {
-    unBreakStmt :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-
-_BreakStmt = Core.Name "hydra.go.syntax.BreakStmt"
-
-newtype ContinueStmt =
-  ContinueStmt {
-    unContinueStmt :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-
-_ContinueStmt = Core.Name "hydra.go.syntax.ContinueStmt"
-
-newtype GotoStmt =
-  GotoStmt {
-    unGotoStmt :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_GotoStmt = Core.Name "hydra.go.syntax.GotoStmt"
-
-newtype FallthroughStmt =
-  FallthroughStmt {
-    unFallthroughStmt :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_FallthroughStmt = Core.Name "hydra.go.syntax.FallthroughStmt"
-
-newtype DeferStmt =
-  DeferStmt {
-    unDeferStmt :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_DeferStmt = Core.Name "hydra.go.syntax.DeferStmt"
-
-newtype Block =
-  Block {
-    unBlock :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_Block = Core.Name "hydra.go.syntax.Block"
-
-data UnaryOp =
-  UnaryOpPlus  |
-  UnaryOpMinus  |
-  UnaryOpNot  |
-  UnaryOpXor  |
-  UnaryOpDeref  |
-  UnaryOpAddressOf  |
-  UnaryOpReceive
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOp = Core.Name "hydra.go.syntax.UnaryOp"
-
-_UnaryOp_plus = Core.Name "plus"
-
-_UnaryOp_minus = Core.Name "minus"
-
-_UnaryOp_not = Core.Name "not"
-
-_UnaryOp_xor = Core.Name "xor"
-
-_UnaryOp_deref = Core.Name "deref"
-
-_UnaryOp_addressOf = Core.Name "addressOf"
-
-_UnaryOp_receive = Core.Name "receive"
-
-data MulOp =
-  MulOpMultiply  |
-  MulOpDivide  |
-  MulOpRemainder  |
-  MulOpLeftShift  |
-  MulOpRightShift  |
-  MulOpBitwiseAnd  |
-  MulOpBitClear
-  deriving (Eq, Ord, Read, Show)
-
-_MulOp = Core.Name "hydra.go.syntax.MulOp"
-
-_MulOp_multiply = Core.Name "multiply"
-
-_MulOp_divide = Core.Name "divide"
-
-_MulOp_remainder = Core.Name "remainder"
-
-_MulOp_leftShift = Core.Name "leftShift"
-
-_MulOp_rightShift = Core.Name "rightShift"
-
-_MulOp_bitwiseAnd = Core.Name "bitwiseAnd"
-
-_MulOp_bitClear = Core.Name "bitClear"
-
-data AddOp =
-  AddOpAdd  |
-  AddOpSubtract  |
-  AddOpBitwiseOr  |
-  AddOpBitwiseXor
-  deriving (Eq, Ord, Read, Show)
-
-_AddOp = Core.Name "hydra.go.syntax.AddOp"
-
-_AddOp_add = Core.Name "add"
-
-_AddOp_subtract = Core.Name "subtract"
-
-_AddOp_bitwiseOr = Core.Name "bitwiseOr"
-
-_AddOp_bitwiseXor = Core.Name "bitwiseXor"
-
-data RelOp =
-  RelOpEqual  |
-  RelOpNotEqual  |
-  RelOpLess  |
-  RelOpLessEqual  |
-  RelOpGreater  |
-  RelOpGreaterEqual
-  deriving (Eq, Ord, Read, Show)
-
-_RelOp = Core.Name "hydra.go.syntax.RelOp"
-
-_RelOp_equal = Core.Name "equal"
-
-_RelOp_notEqual = Core.Name "notEqual"
-
-_RelOp_less = Core.Name "less"
-
-_RelOp_lessEqual = Core.Name "lessEqual"
-
-_RelOp_greater = Core.Name "greater"
-
-_RelOp_greaterEqual = Core.Name "greaterEqual"
diff --git a/src/main/haskell/Hydra/Graph.hs b/src/main/haskell/Hydra/Graph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graph.hs
+++ /dev/null
@@ -1,65 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | The extension to graphs of Hydra's core type system (hydra.core)
-
-module Hydra.Graph where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-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
--- | A graph, or lexical environment which binds names to terms, types, primitives, and metadata
-data Graph =
-  Graph {
-    -- | The terms bound by all term variables in scope
-    graphBoundTerms :: (M.Map Core.Name Core.Term),
-    -- | The type schemes of all term variables in scope
-    graphBoundTypes :: (M.Map Core.Name Core.TypeScheme),
-    -- | A mutable map from type variable names to their accumulated class constraints. This is populated during type inference when operations requiring Eq or Ord are encountered.
-    graphClassConstraints :: (M.Map Core.Name Core.TypeVariableMetadata),
-    -- | The set of term variables introduced by specifically by lambdas
-    graphLambdaVariables :: (S.Set Core.Name),
-    -- | Any additional metadata bound to term variables in scope
-    graphMetadata :: (M.Map Core.Name Core.Term),
-    -- | All primitive functions and constants by name
-    graphPrimitives :: (M.Map Core.Name Primitive),
-    -- | All schema types (type schemes) in scope
-    graphSchemaTypes :: (M.Map Core.Name Core.TypeScheme),
-    -- | The set of type variables introduced specifically by type lambdas
-    graphTypeVariables :: (S.Set Core.Name)}
-_Graph = Core.Name "hydra.graph.Graph"
-_Graph_boundTerms = Core.Name "boundTerms"
-_Graph_boundTypes = Core.Name "boundTypes"
-_Graph_classConstraints = Core.Name "classConstraints"
-_Graph_lambdaVariables = Core.Name "lambdaVariables"
-_Graph_metadata = Core.Name "metadata"
-_Graph_primitives = Core.Name "primitives"
-_Graph_schemaTypes = Core.Name "schemaTypes"
-_Graph_typeVariables = Core.Name "typeVariables"
--- | A built-in function or constant
-data Primitive =
-  Primitive {
-    -- | The unique name of the primitive function
-    primitiveName :: Core.Name,
-    -- | The type scheme of the primitive function
-    primitiveTypeScheme :: Core.TypeScheme,
-    -- | A concrete implementation of the primitive function. The Context and Graph parameters are needed by higher-order primitives (e.g. lists.map, lists.foldl, eithers.bind) which must evaluate function arguments via term reduction; the Graph provides variable and primitive bindings, while the Context supports tracing and error reporting.
-    primitiveImplementation :: (Context.Context -> Graph -> [Core.Term] -> Either Errors.Error Core.Term)}
-_Primitive = Core.Name "hydra.graph.Primitive"
-_Primitive_name = Core.Name "name"
-_Primitive_typeScheme = Core.Name "typeScheme"
-_Primitive_implementation = Core.Name "implementation"
--- | A type together with a coder for mapping terms into arguments for primitive functions, and mapping computed results into terms.
-data TermCoder a =
-  TermCoder {
-    -- | The Hydra type of encoded terms
-    termCoderType :: Core.Type,
-    -- | An encode function from terms to native values
-    termCoderEncode :: (Context.Context -> Graph -> Core.Term -> Either Errors.Error a),
-    -- | A decode function from native values to terms
-    termCoderDecode :: (Context.Context -> a -> Either Errors.Error Core.Term)}
-_TermCoder = Core.Name "hydra.graph.TermCoder"
-_TermCoder_type = Core.Name "type"
-_TermCoder_encode = Core.Name "encode"
-_TermCoder_decode = Core.Name "decode"
diff --git a/src/main/haskell/Hydra/Graphql/Coder.hs b/src/main/haskell/Hydra/Graphql/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphql/Coder.hs
+++ /dev/null
@@ -1,225 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | GraphQL code generator: converts Hydra modules to GraphQL schema definitions
-
-module Hydra.Graphql.Coder where
-
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Core as Core
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Graphql.Language as Language
-import qualified Hydra.Graphql.Serde as Serde
-import qualified Hydra.Graphql.Syntax as Syntax
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-descriptionFromType :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error (Maybe Syntax.Description)
-descriptionFromType cx g typ =
-    Eithers.map (\mval -> Maybes.map (\s -> Syntax.Description (Syntax.StringValue s)) mval) (Annotations.getTypeDescription cx g typ)
-
-encodeEnumFieldName :: Core.Name -> Syntax.EnumValue
-encodeEnumFieldName name = Syntax.EnumValue (Syntax.Name (sanitize (Core.unName name)))
-
-encodeEnumFieldType :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error Syntax.EnumValueDefinition
-encodeEnumFieldType cx g ft =
-    Eithers.bind (descriptionFromType cx g (Core.fieldTypeType ft)) (\desc -> Right (Syntax.EnumValueDefinition {
-      Syntax.enumValueDefinitionDescription = desc,
-      Syntax.enumValueDefinitionEnumValue = (encodeEnumFieldName (Core.fieldTypeName ft)),
-      Syntax.enumValueDefinitionDirectives = Nothing}))
-
-encodeFieldName :: Core.Name -> Syntax.Name
-encodeFieldName name = Syntax.Name (sanitize (Core.unName name))
-
-encodeFieldType :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.FieldType -> Either Errors.Error Syntax.FieldDefinition
-encodeFieldType cx g prefixes ft =
-    Eithers.bind (encodeType cx g prefixes (Core.fieldTypeType ft)) (\gtype -> Eithers.bind (descriptionFromType cx g (Core.fieldTypeType ft)) (\desc -> Right (Syntax.FieldDefinition {
-      Syntax.fieldDefinitionDescription = desc,
-      Syntax.fieldDefinitionName = (encodeFieldName (Core.fieldTypeName ft)),
-      Syntax.fieldDefinitionArgumentsDefinition = Nothing,
-      Syntax.fieldDefinitionType = gtype,
-      Syntax.fieldDefinitionDirectives = Nothing})))
-
-encodeLiteralType :: t0 -> Core.LiteralType -> Either Errors.Error Syntax.NamedType
-encodeLiteralType cx lt =
-    case lt of
-      Core.LiteralTypeBoolean -> Right (Syntax.NamedType (Syntax.Name "Boolean"))
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeFloat64 -> Right (Syntax.NamedType (Syntax.Name "Float"))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected 64-bit float type, found: " (ShowCore.floatType v0))))
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeInt32 -> Right (Syntax.NamedType (Syntax.Name "Int"))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected 32-bit signed integer type, found: " (ShowCore.integerType v0))))
-      Core.LiteralTypeString -> Right (Syntax.NamedType (Syntax.Name "String"))
-      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected GraphQL-compatible literal type, found: " (ShowCore.literalType lt))))
-
-encodeNamedType :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.Name -> Core.Type -> Either Errors.Error Syntax.TypeDefinition
-encodeNamedType cx g prefixes name typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (\f -> encodeFieldType cx g prefixes f) v0) (\gfields -> Eithers.bind (descriptionFromType cx g typ) (\desc -> Right (Syntax.TypeDefinitionObject (Syntax.ObjectTypeDefinition {
-        Syntax.objectTypeDefinitionDescription = desc,
-        Syntax.objectTypeDefinitionName = (encodeTypeName prefixes name),
-        Syntax.objectTypeDefinitionImplementsInterfaces = Nothing,
-        Syntax.objectTypeDefinitionDirectives = Nothing,
-        Syntax.objectTypeDefinitionFieldsDefinition = (Just (Syntax.FieldsDefinition gfields))}))))
-      Core.TypeUnion v0 -> Logic.ifElse (Predicates.isEnumRowType v0) (Eithers.bind (Eithers.mapList (\f -> encodeEnumFieldType cx g f) v0) (\values -> Eithers.bind (descriptionFromType cx g typ) (\desc -> Right (Syntax.TypeDefinitionEnum (Syntax.EnumTypeDefinition {
-        Syntax.enumTypeDefinitionDescription = desc,
-        Syntax.enumTypeDefinitionName = (encodeTypeName prefixes name),
-        Syntax.enumTypeDefinitionDirectives = Nothing,
-        Syntax.enumTypeDefinitionEnumValuesDefinition = (Just (Syntax.EnumValuesDefinition values))}))))) (Eithers.bind (Eithers.mapList (\f -> encodeUnionFieldType cx g prefixes f) v0) (\gfields -> Eithers.bind (descriptionFromType cx g typ) (\desc -> Right (Syntax.TypeDefinitionObject (Syntax.ObjectTypeDefinition {
-        Syntax.objectTypeDefinitionDescription = desc,
-        Syntax.objectTypeDefinitionName = (encodeTypeName prefixes name),
-        Syntax.objectTypeDefinitionImplementsInterfaces = Nothing,
-        Syntax.objectTypeDefinitionDirectives = Nothing,
-        Syntax.objectTypeDefinitionFieldsDefinition = (Just (Syntax.FieldsDefinition gfields))})))))
-      Core.TypeEither v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "left"),
-          Core.fieldTypeType = (Core.TypeMaybe (Core.eitherTypeLeft v0))},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "right"),
-          Core.fieldTypeType = (Core.TypeMaybe (Core.eitherTypeRight v0))}])
-      Core.TypePair v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "first"),
-          Core.fieldTypeType = (Core.pairTypeFirst v0)},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "second"),
-          Core.fieldTypeType = (Core.pairTypeSecond v0)}])
-      Core.TypeList v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.TypeList v0)}])
-      Core.TypeSet v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.TypeList v0)}])
-      Core.TypeMap v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "key"),
-          Core.fieldTypeType = (Core.mapTypeKeys v0)},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.mapTypeValues v0)}])
-      Core.TypeLiteral v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.TypeLiteral v0)}])
-      Core.TypeVariable v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.TypeVariable v0)}])
-      Core.TypeWrap v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = v0}])
-      Core.TypeUnit -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeBoolean)}])
-      Core.TypeForall v0 -> encodeNamedType cx g prefixes name (Core.forallTypeBody v0)
-      Core.TypeApplication v0 -> encodeNamedType cx g prefixes name (Core.applicationTypeFunction v0)
-      Core.TypeFunction v0 -> encodeNamedType cx g prefixes name (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "domain"),
-          Core.fieldTypeType = (Core.functionTypeDomain v0)},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "codomain"),
-          Core.fieldTypeType = (Core.functionTypeCodomain v0)}])
-      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected record or union type, found: " (ShowCore.type_ typ))))
-
-encodeType :: t0 -> t1 -> M.Map Packaging.Namespace String -> Core.Type -> Either Errors.Error Syntax.Type
-encodeType cx g prefixes typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeMaybe v0 -> case (Strip.deannotateType v0) of
-        Core.TypeList v1 -> Eithers.map (\gt -> Syntax.TypeList (Syntax.ListType gt)) (encodeType cx g prefixes v1)
-        Core.TypeSet v1 -> Eithers.map (\gt -> Syntax.TypeList (Syntax.ListType gt)) (encodeType cx g prefixes v1)
-        Core.TypeMap v1 -> Eithers.map (\gt -> Syntax.TypeList (Syntax.ListType gt)) (encodeType cx g prefixes (Core.mapTypeValues v1))
-        Core.TypeLiteral v1 -> Eithers.map (\nt -> Syntax.TypeNamed nt) (encodeLiteralType cx v1)
-        Core.TypePair _ -> Right (Syntax.TypeNamed (Syntax.NamedType (encodeTypeName prefixes (Core.Name "hydra.util.Pair"))))
-        Core.TypeEither _ -> Right (Syntax.TypeNamed (Syntax.NamedType (encodeTypeName prefixes (Core.Name "hydra.util.Either"))))
-        Core.TypeRecord _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous record type"))
-        Core.TypeUnion _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous union type"))
-        Core.TypeWrap v1 -> encodeType cx g prefixes (Core.TypeMaybe v1)
-        Core.TypeVariable v1 -> Right (Syntax.TypeNamed (Syntax.NamedType (encodeTypeName prefixes v1)))
-        Core.TypeForall v1 -> encodeType cx g prefixes (Core.TypeMaybe (Core.forallTypeBody v1))
-        Core.TypeApplication v1 -> encodeType cx g prefixes (Core.TypeMaybe (Core.applicationTypeFunction v1))
-        Core.TypeFunction _ -> Right (Syntax.TypeNamed (Syntax.NamedType (Syntax.Name "String")))
-        Core.TypeUnit -> Right (Syntax.TypeNamed (Syntax.NamedType (Syntax.Name "Boolean")))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected GraphQL-compatible type, found: " (ShowCore.type_ v0))))
-      Core.TypeList v0 -> Eithers.map (\gt -> Syntax.TypeNonNull (Syntax.NonNullTypeList (Syntax.ListType gt))) (encodeType cx g prefixes v0)
-      Core.TypeSet v0 -> Eithers.map (\gt -> Syntax.TypeNonNull (Syntax.NonNullTypeList (Syntax.ListType gt))) (encodeType cx g prefixes v0)
-      Core.TypeMap v0 -> Eithers.map (\gt -> Syntax.TypeNonNull (Syntax.NonNullTypeList (Syntax.ListType gt))) (encodeType cx g prefixes (Core.mapTypeValues v0))
-      Core.TypeLiteral v0 -> Eithers.map (\nt -> Syntax.TypeNonNull (Syntax.NonNullTypeNamed nt)) (encodeLiteralType cx v0)
-      Core.TypePair _ -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (encodeTypeName prefixes (Core.Name "hydra.util.Pair")))))
-      Core.TypeEither _ -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (encodeTypeName prefixes (Core.Name "hydra.util.Either")))))
-      Core.TypeRecord _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous record type"))
-      Core.TypeUnion _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous union type"))
-      Core.TypeVariable v0 -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (encodeTypeName prefixes v0))))
-      Core.TypeWrap v0 -> encodeType cx g prefixes v0
-      Core.TypeForall v0 -> encodeType cx g prefixes (Core.forallTypeBody v0)
-      Core.TypeApplication v0 -> encodeType cx g prefixes (Core.applicationTypeFunction v0)
-      Core.TypeFunction _ -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (Syntax.Name "String"))))
-      Core.TypeUnit -> Right (Syntax.TypeNonNull (Syntax.NonNullTypeNamed (Syntax.NamedType (Syntax.Name "Boolean"))))
-      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected GraphQL-compatible type, found: " (ShowCore.type_ typ))))
-
-encodeTypeDefinition :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Packaging.TypeDefinition -> Either Errors.Error Syntax.TypeDefinition
-encodeTypeDefinition cx g prefixes tdef =
-    encodeNamedType cx g prefixes (Packaging.typeDefinitionName tdef) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme tdef))
-
-encodeTypeName :: M.Map Packaging.Namespace String -> Core.Name -> Syntax.Name
-encodeTypeName prefixes name =
-
-      let qualName = Names.qualifyName name
-          local = Packaging.qualifiedNameLocal qualName
-          mns = Packaging.qualifiedNameNamespace qualName
-          prefix = Maybes.maybe "" (\ns_ -> Maybes.maybe "" (\p -> p) (Maps.lookup ns_ prefixes)) mns
-      in (Syntax.Name (Strings.cat2 prefix (sanitize local)))
-
-encodeUnionFieldType :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.FieldType -> Either Errors.Error Syntax.FieldDefinition
-encodeUnionFieldType cx g prefixes ft =
-
-      let innerType = Core.fieldTypeType ft
-          isUnit = Predicates.isUnitType (Strip.deannotateType innerType)
-          effectiveType = Logic.ifElse isUnit (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeBoolean)) (Core.TypeMaybe innerType)
-      in (Eithers.bind (encodeType cx g prefixes effectiveType) (\gtype -> Eithers.bind (descriptionFromType cx g innerType) (\desc -> Right (Syntax.FieldDefinition {
-        Syntax.fieldDefinitionDescription = desc,
-        Syntax.fieldDefinitionName = (encodeFieldName (Core.fieldTypeName ft)),
-        Syntax.fieldDefinitionArgumentsDefinition = Nothing,
-        Syntax.fieldDefinitionType = gtype,
-        Syntax.fieldDefinitionDirectives = Nothing}))))
-
-moduleToGraphql :: Packaging.Module -> [Packaging.Definition] -> t0 -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToGraphql mod defs cx g =
-
-      let partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-          prefixes =
-                  (\modNs -> \tdefs ->
-                    let namespaces = Lists.nub (Maybes.cat (Lists.map (\td -> Names.namespaceOf (Packaging.typeDefinitionName td)) tdefs))
-                    in (Maps.fromList (Lists.map (\ns_ -> (ns_, (Logic.ifElse (Equality.equal ns_ modNs) "" (Strings.cat2 (Formatting.sanitizeWithUnderscores Sets.empty (Packaging.unNamespace ns_)) "_")))) namespaces))) (Packaging.moduleNamespace mod) typeDefs
-          filePath =
-                  Names.namespaceToFilePath Util.CaseConventionCamel (Packaging.FileExtension "graphql") (Packaging.moduleNamespace mod)
-      in (Eithers.bind (Eithers.mapList (\td -> encodeTypeDefinition cx g prefixes td) typeDefs) (\gtdefs -> Right (Maps.fromList (Lists.pure (filePath, (Serialization.printExpr (Serialization.parenthesize (Serde.exprDocument (Syntax.Document (Lists.map (\gtdef -> Syntax.DefinitionTypeSystem (Syntax.TypeSystemDefinitionOrExtensionDefinition (Syntax.TypeSystemDefinitionType gtdef))) gtdefs))))))))))
-
-sanitize :: String -> String
-sanitize s = Formatting.sanitizeWithUnderscores Language.graphqlReservedWords s
diff --git a/src/main/haskell/Hydra/Graphql/Language.hs b/src/main/haskell/Hydra/Graphql/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphql/Language.hs
+++ /dev/null
@@ -1,79 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for GraphQL
-
-module Hydra.Graphql.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-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.Set as S
-
--- | Language constraints for GraphQL
-graphqlLanguage :: Coders.Language
-graphqlLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.graphql"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes = Sets.fromList [
-      Core.FloatTypeFloat64]
-    functionVariants = Sets.empty
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeInt32]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord,
-          Variants.TermVariantInject]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantWrap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantVariable]
-    typePredicate =
-        \typ -> case (Strip.deannotateType typ) of
-          Core.TypeMaybe v0 -> case (Strip.deannotateType v0) of
-            Core.TypeMaybe _ -> False
-            _ -> True
-          _ -> True
-
--- | A set of reserved words in GraphQL
-graphqlReservedWords :: S.Set String
-graphqlReservedWords =
-    Sets.fromList [
-      "true",
-      "false"]
diff --git a/src/main/haskell/Hydra/Graphql/Serde.hs b/src/main/haskell/Hydra/Graphql/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphql/Serde.hs
+++ /dev/null
@@ -1,158 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting GraphQL AST to abstract expressions
-
-module Hydra.Graphql.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Graphql.Syntax as Syntax
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Convert a GraphQL definition to an expression
-exprDefinition :: Syntax.Definition -> Ast.Expr
-exprDefinition def =
-    case def of
-      Syntax.DefinitionExecutable _ -> Serialization.cst "Unsupported: executable definition"
-      Syntax.DefinitionTypeSystem v0 -> exprTypeSystemDefinitionOrExtension v0
-
--- | Convert a GraphQL description to a triple-quoted comment
-exprDescription :: Syntax.Description -> Ast.Expr
-exprDescription desc =
-
-      let delim = Serialization.cst "\"\"\""
-          text = Syntax.unStringValue (Syntax.unDescription desc)
-      in (Serialization.newlineSep [
-        delim,
-        (Serialization.cst text),
-        delim])
-
--- | Convert a GraphQL document to an expression
-exprDocument :: Syntax.Document -> Ast.Expr
-exprDocument d = Serialization.doubleNewlineSep (Lists.map exprDefinition (Syntax.unDocument d))
-
--- | Convert a GraphQL enum type definition to an expression
-exprEnumTypeDefinition :: Syntax.EnumTypeDefinition -> Ast.Expr
-exprEnumTypeDefinition def =
-
-      let desc = Syntax.enumTypeDefinitionDescription def
-          name = Syntax.enumTypeDefinitionName def
-          values = Syntax.enumTypeDefinitionEnumValuesDefinition def
-          valuesExpr = Maybes.maybe [] (\vs -> Lists.map exprEnumValueDefinition (Syntax.unEnumValuesDefinition vs)) values
-      in (withDescription desc (Serialization.spaceSep [
-        Serialization.cst "enum",
-        (exprName name),
-        (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle valuesExpr)]))
-
--- | Convert a GraphQL enum value to an expression
-exprEnumValue :: Syntax.EnumValue -> Ast.Expr
-exprEnumValue ev = exprName (Syntax.unEnumValue ev)
-
--- | Convert a GraphQL enum value definition to an expression
-exprEnumValueDefinition :: Syntax.EnumValueDefinition -> Ast.Expr
-exprEnumValueDefinition def =
-
-      let desc = Syntax.enumValueDefinitionDescription def
-          ev = Syntax.enumValueDefinitionEnumValue def
-      in (withDescription desc (exprEnumValue ev))
-
--- | Convert a GraphQL field definition to an expression
-exprFieldDefinition :: Syntax.FieldDefinition -> Ast.Expr
-exprFieldDefinition def =
-
-      let desc = Syntax.fieldDefinitionDescription def
-          name = Syntax.fieldDefinitionName def
-          typ = Syntax.fieldDefinitionType def
-          namePart =
-                  Serialization.noSep [
-                    exprName name,
-                    (Serialization.cst ":")]
-          typePart = exprType typ
-      in (withDescription desc (Serialization.spaceSep [
-        namePart,
-        typePart]))
-
--- | Convert a GraphQL list type to an expression
-exprListType :: Syntax.ListType -> Ast.Expr
-exprListType lt =
-    Serialization.noSep [
-      Serialization.cst "[",
-      (exprType (Syntax.unListType lt)),
-      (Serialization.cst "]")]
-
--- | Convert a GraphQL name to an expression
-exprName :: Syntax.Name -> Ast.Expr
-exprName n = Serialization.cst (Syntax.unName n)
-
--- | Convert a GraphQL named type to an expression
-exprNamedType :: Syntax.NamedType -> Ast.Expr
-exprNamedType nt = exprName (Syntax.unNamedType nt)
-
--- | Convert a GraphQL non-null type to an expression
-exprNonNullType :: Syntax.NonNullType -> Ast.Expr
-exprNonNullType nnt =
-
-      let typeExpr =
-              case nnt of
-                Syntax.NonNullTypeNamed v0 -> exprNamedType v0
-                Syntax.NonNullTypeList v0 -> exprListType v0
-      in (Serialization.noSep [
-        typeExpr,
-        (Serialization.cst "!")])
-
--- | Convert a GraphQL object type definition to an expression
-exprObjectTypeDefinition :: Syntax.ObjectTypeDefinition -> Ast.Expr
-exprObjectTypeDefinition def =
-
-      let desc = Syntax.objectTypeDefinitionDescription def
-          name = Syntax.objectTypeDefinitionName def
-          fields = Syntax.objectTypeDefinitionFieldsDefinition def
-          fieldsExpr = Maybes.maybe [] (\fs -> Lists.map exprFieldDefinition (Syntax.unFieldsDefinition fs)) fields
-      in (withDescription desc (Serialization.spaceSep [
-        Serialization.cst "type",
-        (exprName name),
-        (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle fieldsExpr)]))
-
--- | Convert a GraphQL type to an expression
-exprType :: Syntax.Type -> Ast.Expr
-exprType typ =
-    case typ of
-      Syntax.TypeNamed v0 -> exprNamedType v0
-      Syntax.TypeList v0 -> exprListType v0
-      Syntax.TypeNonNull v0 -> exprNonNullType v0
-
--- | Convert a GraphQL type definition to an expression
-exprTypeDefinition :: Syntax.TypeDefinition -> Ast.Expr
-exprTypeDefinition def =
-    case def of
-      Syntax.TypeDefinitionScalar _ -> Serialization.cst "Unsupported: scalar type definition"
-      Syntax.TypeDefinitionObject v0 -> exprObjectTypeDefinition v0
-      Syntax.TypeDefinitionInterface _ -> Serialization.cst "Unsupported: interface type definition"
-      Syntax.TypeDefinitionUnion _ -> Serialization.cst "Unsupported: union type definition"
-      Syntax.TypeDefinitionEnum v0 -> exprEnumTypeDefinition v0
-      Syntax.TypeDefinitionInputObject _ -> Serialization.cst "Unsupported: input object type definition"
-
--- | Convert a GraphQL type system definition to an expression
-exprTypeSystemDefinition :: Syntax.TypeSystemDefinition -> Ast.Expr
-exprTypeSystemDefinition def =
-    case def of
-      Syntax.TypeSystemDefinitionSchema _ -> Serialization.cst "Unsupported: schema definition"
-      Syntax.TypeSystemDefinitionType v0 -> exprTypeDefinition v0
-      Syntax.TypeSystemDefinitionDirective _ -> Serialization.cst "Unsupported: directive definition"
-
--- | Convert a GraphQL type system definition or extension to an expression
-exprTypeSystemDefinitionOrExtension :: Syntax.TypeSystemDefinitionOrExtension -> Ast.Expr
-exprTypeSystemDefinitionOrExtension de =
-    case de of
-      Syntax.TypeSystemDefinitionOrExtensionDefinition v0 -> exprTypeSystemDefinition v0
-      Syntax.TypeSystemDefinitionOrExtensionExtension _ -> Serialization.cst "Unsupported: type system extension"
-
--- | Prepend an optional description to an expression
-withDescription :: Maybe Syntax.Description -> Ast.Expr -> Ast.Expr
-withDescription mdesc expr =
-    Serialization.newlineSep (Maybes.cat [
-      Maybes.map exprDescription mdesc,
-      (Maybes.pure expr)])
diff --git a/src/main/haskell/Hydra/Graphql/Syntax.hs b/src/main/haskell/Hydra/Graphql/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphql/Syntax.hs
+++ /dev/null
@@ -1,1300 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A GraphQL model. Based on the (extended) BNF at:
--- |   https://spec.graphql.org/draft/#sec-Appendix-Grammar-Summary
-
-module Hydra.Graphql.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
-
-newtype Name =
-  Name {
-    unName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Name = Core.Name "hydra.graphql.syntax.Name"
-
-newtype IntValue =
-  IntValue {
-    unIntValue :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IntValue = Core.Name "hydra.graphql.syntax.IntValue"
-
-newtype FloatValue =
-  FloatValue {
-    unFloatValue :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_FloatValue = Core.Name "hydra.graphql.syntax.FloatValue"
-
-newtype StringValue =
-  StringValue {
-    unStringValue :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_StringValue = Core.Name "hydra.graphql.syntax.StringValue"
-
-newtype Document =
-  Document {
-    unDocument :: [Definition]}
-  deriving (Eq, Ord, Read, Show)
-
-_Document = Core.Name "hydra.graphql.syntax.Document"
-
-data Definition =
-  DefinitionExecutable ExecutableDefinition |
-  DefinitionTypeSystem TypeSystemDefinitionOrExtension
-  deriving (Eq, Ord, Read, Show)
-
-_Definition = Core.Name "hydra.graphql.syntax.Definition"
-
-_Definition_executable = Core.Name "executable"
-
-_Definition_typeSystem = Core.Name "typeSystem"
-
-newtype ExecutableDocument =
-  ExecutableDocument {
-    unExecutableDocument :: [ExecutableDefinition]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExecutableDocument = Core.Name "hydra.graphql.syntax.ExecutableDocument"
-
-data ExecutableDefinition =
-  ExecutableDefinitionOperation OperationDefinition |
-  ExecutableDefinitionFragment FragmentDefinition
-  deriving (Eq, Ord, Read, Show)
-
-_ExecutableDefinition = Core.Name "hydra.graphql.syntax.ExecutableDefinition"
-
-_ExecutableDefinition_operation = Core.Name "operation"
-
-_ExecutableDefinition_fragment = Core.Name "fragment"
-
-data OperationDefinition =
-  OperationDefinitionSequence OperationDefinition_Sequence |
-  OperationDefinitionSelectionSet SelectionSet
-  deriving (Eq, Ord, Read, Show)
-
-_OperationDefinition = Core.Name "hydra.graphql.syntax.OperationDefinition"
-
-_OperationDefinition_sequence = Core.Name "sequence"
-
-_OperationDefinition_SelectionSet = Core.Name "SelectionSet"
-
-data OperationDefinition_Sequence =
-  OperationDefinition_Sequence {
-    operationDefinition_SequenceOperationType :: OperationType,
-    operationDefinition_SequenceName :: (Maybe Name),
-    operationDefinition_SequenceVariablesDefinition :: (Maybe VariablesDefinition),
-    operationDefinition_SequenceDirectives :: (Maybe Directives),
-    operationDefinition_SequenceSelectionSet :: SelectionSet}
-  deriving (Eq, Ord, Read, Show)
-
-_OperationDefinition_Sequence = Core.Name "hydra.graphql.syntax.OperationDefinition_Sequence"
-
-_OperationDefinition_Sequence_OperationType = Core.Name "OperationType"
-
-_OperationDefinition_Sequence_Name = Core.Name "Name"
-
-_OperationDefinition_Sequence_VariablesDefinition = Core.Name "VariablesDefinition"
-
-_OperationDefinition_Sequence_Directives = Core.Name "Directives"
-
-_OperationDefinition_Sequence_SelectionSet = Core.Name "SelectionSet"
-
-data OperationType =
-  OperationTypeQuery  |
-  OperationTypeMutation  |
-  OperationTypeSubscription
-  deriving (Eq, Ord, Read, Show)
-
-_OperationType = Core.Name "hydra.graphql.syntax.OperationType"
-
-_OperationType_Query = Core.Name "Query"
-
-_OperationType_Mutation = Core.Name "Mutation"
-
-_OperationType_Subscription = Core.Name "Subscription"
-
-newtype SelectionSet =
-  SelectionSet {
-    unSelectionSet :: [Selection]}
-  deriving (Eq, Ord, Read, Show)
-
-_SelectionSet = Core.Name "hydra.graphql.syntax.SelectionSet"
-
-data Selection =
-  SelectionField Field |
-  SelectionFragmentSpread FragmentSpread |
-  SelectionInlineFragment InlineFragment
-  deriving (Eq, Ord, Read, Show)
-
-_Selection = Core.Name "hydra.graphql.syntax.Selection"
-
-_Selection_Field = Core.Name "Field"
-
-_Selection_FragmentSpread = Core.Name "FragmentSpread"
-
-_Selection_InlineFragment = Core.Name "InlineFragment"
-
-data Field =
-  Field {
-    fieldAlias :: (Maybe Alias),
-    fieldName :: Name,
-    fieldArguments :: (Maybe Arguments),
-    fieldDirectives :: (Maybe Directives),
-    fieldSelectionSet :: (Maybe SelectionSet)}
-  deriving (Eq, Ord, Read, Show)
-
-_Field = Core.Name "hydra.graphql.syntax.Field"
-
-_Field_Alias = Core.Name "Alias"
-
-_Field_Name = Core.Name "Name"
-
-_Field_Arguments = Core.Name "Arguments"
-
-_Field_Directives = Core.Name "Directives"
-
-_Field_SelectionSet = Core.Name "SelectionSet"
-
-data Alias =
-  AliasName Name |
-  AliasColon
-  deriving (Eq, Ord, Read, Show)
-
-_Alias = Core.Name "hydra.graphql.syntax.Alias"
-
-_Alias_Name = Core.Name "Name"
-
-_Alias_Colon = Core.Name "Colon"
-
-newtype Arguments =
-  Arguments {
-    unArguments :: [Argument]}
-  deriving (Eq, Ord, Read, Show)
-
-_Arguments = Core.Name "hydra.graphql.syntax.Arguments"
-
-data Argument =
-  Argument {
-    argumentName :: Name,
-    argumentValue :: Value}
-  deriving (Eq, Ord, Read, Show)
-
-_Argument = Core.Name "hydra.graphql.syntax.Argument"
-
-_Argument_Name = Core.Name "Name"
-
-_Argument_Value = Core.Name "Value"
-
-data FragmentSpread =
-  FragmentSpread {
-    fragmentSpreadFragmentName :: FragmentName,
-    fragmentSpreadDirectives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_FragmentSpread = Core.Name "hydra.graphql.syntax.FragmentSpread"
-
-_FragmentSpread_FragmentName = Core.Name "FragmentName"
-
-_FragmentSpread_Directives = Core.Name "Directives"
-
-data InlineFragment =
-  InlineFragment {
-    inlineFragmentTypeCondition :: (Maybe TypeCondition),
-    inlineFragmentDirectives :: (Maybe Directives),
-    inlineFragmentSelectionSet :: SelectionSet}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineFragment = Core.Name "hydra.graphql.syntax.InlineFragment"
-
-_InlineFragment_TypeCondition = Core.Name "TypeCondition"
-
-_InlineFragment_Directives = Core.Name "Directives"
-
-_InlineFragment_SelectionSet = Core.Name "SelectionSet"
-
-data FragmentDefinition =
-  FragmentDefinition {
-    fragmentDefinitionFragmentName :: FragmentName,
-    fragmentDefinitionTypeCondition :: TypeCondition,
-    fragmentDefinitionDirectives :: (Maybe Directives),
-    fragmentDefinitionSelectionSet :: SelectionSet}
-  deriving (Eq, Ord, Read, Show)
-
-_FragmentDefinition = Core.Name "hydra.graphql.syntax.FragmentDefinition"
-
-_FragmentDefinition_FragmentName = Core.Name "FragmentName"
-
-_FragmentDefinition_TypeCondition = Core.Name "TypeCondition"
-
-_FragmentDefinition_Directives = Core.Name "Directives"
-
-_FragmentDefinition_SelectionSet = Core.Name "SelectionSet"
-
-newtype FragmentName =
-  FragmentName {
-    unFragmentName :: Name}
-  deriving (Eq, Ord, Read, Show)
-
-_FragmentName = Core.Name "hydra.graphql.syntax.FragmentName"
-
-data TypeCondition =
-  TypeConditionOn  |
-  TypeConditionNamedType NamedType
-  deriving (Eq, Ord, Read, Show)
-
-_TypeCondition = Core.Name "hydra.graphql.syntax.TypeCondition"
-
-_TypeCondition_On = Core.Name "On"
-
-_TypeCondition_NamedType = Core.Name "NamedType"
-
-data Value =
-  ValueVariable Variable |
-  ValueInt IntValue |
-  ValueFloat FloatValue |
-  ValueString StringValue |
-  ValueBoolean BooleanValue |
-  ValueNull NullValue |
-  ValueEnum EnumValue |
-  ValueList ListValue |
-  ValueObject ObjectValue
-  deriving (Eq, Ord, Read, Show)
-
-_Value = Core.Name "hydra.graphql.syntax.Value"
-
-_Value_Variable = Core.Name "Variable"
-
-_Value_int = Core.Name "int"
-
-_Value_float = Core.Name "float"
-
-_Value_string = Core.Name "string"
-
-_Value_boolean = Core.Name "boolean"
-
-_Value_null = Core.Name "null"
-
-_Value_enum = Core.Name "enum"
-
-_Value_list = Core.Name "list"
-
-_Value_object = Core.Name "object"
-
-data BooleanValue =
-  BooleanValueTrue  |
-  BooleanValueFalse
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanValue = Core.Name "hydra.graphql.syntax.BooleanValue"
-
-_BooleanValue_True = Core.Name "True"
-
-_BooleanValue_False = Core.Name "False"
-
-newtype NullValue =
-  NullValue {
-    unNullValue :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NullValue = Core.Name "hydra.graphql.syntax.NullValue"
-
-newtype EnumValue =
-  EnumValue {
-    unEnumValue :: Name}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumValue = Core.Name "hydra.graphql.syntax.EnumValue"
-
-data ListValue =
-  ListValueSequence ListValue_Sequence |
-  ListValueSequence2 [Value]
-  deriving (Eq, Ord, Read, Show)
-
-_ListValue = Core.Name "hydra.graphql.syntax.ListValue"
-
-_ListValue_sequence = Core.Name "sequence"
-
-_ListValue_sequence2 = Core.Name "sequence2"
-
-data ListValue_Sequence =
-  ListValue_Sequence {}
-  deriving (Eq, Ord, Read, Show)
-
-_ListValue_Sequence = Core.Name "hydra.graphql.syntax.ListValue_Sequence"
-
-data ObjectValue =
-  ObjectValueSequence ObjectValue_Sequence |
-  ObjectValueSequence2 [ObjectField]
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectValue = Core.Name "hydra.graphql.syntax.ObjectValue"
-
-_ObjectValue_sequence = Core.Name "sequence"
-
-_ObjectValue_sequence2 = Core.Name "sequence2"
-
-data ObjectValue_Sequence =
-  ObjectValue_Sequence {}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectValue_Sequence = Core.Name "hydra.graphql.syntax.ObjectValue_Sequence"
-
-data ObjectField =
-  ObjectField {
-    objectFieldName :: Name,
-    objectFieldValue :: Value}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectField = Core.Name "hydra.graphql.syntax.ObjectField"
-
-_ObjectField_Name = Core.Name "Name"
-
-_ObjectField_Value = Core.Name "Value"
-
-data VariablesDefinition =
-  VariablesDefinition {
-    variablesDefinitionVariable :: Variable,
-    variablesDefinitionType :: Type,
-    variablesDefinitionDefaultValue :: (Maybe DefaultValue),
-    variablesDefinitionDirectives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_VariablesDefinition = Core.Name "hydra.graphql.syntax.VariablesDefinition"
-
-_VariablesDefinition_Variable = Core.Name "Variable"
-
-_VariablesDefinition_Type = Core.Name "Type"
-
-_VariablesDefinition_DefaultValue = Core.Name "DefaultValue"
-
-_VariablesDefinition_Directives = Core.Name "Directives"
-
-newtype Variable =
-  Variable {
-    unVariable :: Name}
-  deriving (Eq, Ord, Read, Show)
-
-_Variable = Core.Name "hydra.graphql.syntax.Variable"
-
-newtype DefaultValue =
-  DefaultValue {
-    unDefaultValue :: Value}
-  deriving (Eq, Ord, Read, Show)
-
-_DefaultValue = Core.Name "hydra.graphql.syntax.DefaultValue"
-
-data Type =
-  TypeNamed NamedType |
-  TypeList ListType |
-  TypeNonNull NonNullType
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.graphql.syntax.Type"
-
-_Type_named = Core.Name "named"
-
-_Type_list = Core.Name "list"
-
-_Type_nonNull = Core.Name "nonNull"
-
-newtype NamedType =
-  NamedType {
-    unNamedType :: Name}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedType = Core.Name "hydra.graphql.syntax.NamedType"
-
-newtype ListType =
-  ListType {
-    unListType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_ListType = Core.Name "hydra.graphql.syntax.ListType"
-
-data NonNullType =
-  NonNullTypeNamed NamedType |
-  NonNullTypeList ListType
-  deriving (Eq, Ord, Read, Show)
-
-_NonNullType = Core.Name "hydra.graphql.syntax.NonNullType"
-
-_NonNullType_named = Core.Name "named"
-
-_NonNullType_list = Core.Name "list"
-
-newtype Directives =
-  Directives {
-    unDirectives :: [Directive]}
-  deriving (Eq, Ord, Read, Show)
-
-_Directives = Core.Name "hydra.graphql.syntax.Directives"
-
-data Directive =
-  Directive {
-    directiveName :: Name,
-    directiveArguments :: (Maybe Arguments)}
-  deriving (Eq, Ord, Read, Show)
-
-_Directive = Core.Name "hydra.graphql.syntax.Directive"
-
-_Directive_Name = Core.Name "Name"
-
-_Directive_Arguments = Core.Name "Arguments"
-
-newtype TypeSystemDocment =
-  TypeSystemDocment {
-    unTypeSystemDocment :: [TypeSystemDefinition]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSystemDocment = Core.Name "hydra.graphql.syntax.TypeSystemDocment"
-
-data TypeSystemDefinition =
-  TypeSystemDefinitionSchema SchemaDefinition |
-  TypeSystemDefinitionType TypeDefinition |
-  TypeSystemDefinitionDirective DirectiveDefinition
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSystemDefinition = Core.Name "hydra.graphql.syntax.TypeSystemDefinition"
-
-_TypeSystemDefinition_schema = Core.Name "schema"
-
-_TypeSystemDefinition_type = Core.Name "type"
-
-_TypeSystemDefinition_directive = Core.Name "directive"
-
-newtype TypeSystemExtensionDocument =
-  TypeSystemExtensionDocument {
-    unTypeSystemExtensionDocument :: [TypeSystemDefinitionOrExtension]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSystemExtensionDocument = Core.Name "hydra.graphql.syntax.TypeSystemExtensionDocument"
-
-data TypeSystemDefinitionOrExtension =
-  TypeSystemDefinitionOrExtensionDefinition TypeSystemDefinition |
-  TypeSystemDefinitionOrExtensionExtension TypeSystemExtension
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSystemDefinitionOrExtension = Core.Name "hydra.graphql.syntax.TypeSystemDefinitionOrExtension"
-
-_TypeSystemDefinitionOrExtension_definition = Core.Name "definition"
-
-_TypeSystemDefinitionOrExtension_extension = Core.Name "extension"
-
-data TypeSystemExtension =
-  TypeSystemExtensionSchema SchemaExtension |
-  TypeSystemExtensionType TypeExtension
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSystemExtension = Core.Name "hydra.graphql.syntax.TypeSystemExtension"
-
-_TypeSystemExtension_schema = Core.Name "schema"
-
-_TypeSystemExtension_type = Core.Name "type"
-
-data SchemaDefinition =
-  SchemaDefinition {
-    schemaDefinitionDescription :: (Maybe Description),
-    schemaDefinitionDirectives :: (Maybe Directives),
-    schemaDefinitionRootOperationTypeDefinition :: RootOperationTypeDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaDefinition = Core.Name "hydra.graphql.syntax.SchemaDefinition"
-
-_SchemaDefinition_Description = Core.Name "Description"
-
-_SchemaDefinition_Directives = Core.Name "Directives"
-
-_SchemaDefinition_RootOperationTypeDefinition = Core.Name "RootOperationTypeDefinition"
-
-data SchemaExtension =
-  SchemaExtensionSequence SchemaExtension_Sequence |
-  SchemaExtensionSequence2 Directives
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaExtension = Core.Name "hydra.graphql.syntax.SchemaExtension"
-
-_SchemaExtension_sequence = Core.Name "sequence"
-
-_SchemaExtension_sequence2 = Core.Name "sequence2"
-
-data SchemaExtension_Sequence =
-  SchemaExtension_Sequence {
-    schemaExtension_SequenceDirectives :: (Maybe Directives),
-    schemaExtension_SequenceRootOperationTypeDefinition :: RootOperationTypeDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaExtension_Sequence = Core.Name "hydra.graphql.syntax.SchemaExtension_Sequence"
-
-_SchemaExtension_Sequence_Directives = Core.Name "Directives"
-
-_SchemaExtension_Sequence_RootOperationTypeDefinition = Core.Name "RootOperationTypeDefinition"
-
-data RootOperationTypeDefinition =
-  RootOperationTypeDefinition {
-    rootOperationTypeDefinitionOperationType :: OperationType,
-    rootOperationTypeDefinitionNamedType :: NamedType}
-  deriving (Eq, Ord, Read, Show)
-
-_RootOperationTypeDefinition = Core.Name "hydra.graphql.syntax.RootOperationTypeDefinition"
-
-_RootOperationTypeDefinition_OperationType = Core.Name "OperationType"
-
-_RootOperationTypeDefinition_NamedType = Core.Name "NamedType"
-
-newtype Description =
-  Description {
-    unDescription :: StringValue}
-  deriving (Eq, Ord, Read, Show)
-
-_Description = Core.Name "hydra.graphql.syntax.Description"
-
-data TypeDefinition =
-  TypeDefinitionScalar ScalarTypeDefinition |
-  TypeDefinitionObject ObjectTypeDefinition |
-  TypeDefinitionInterface InterfaceTypeDefinition |
-  TypeDefinitionUnion UnionTypeDefinition |
-  TypeDefinitionEnum EnumTypeDefinition |
-  TypeDefinitionInputObject InputObjectTypeDefinition
-  deriving (Eq, Ord, Read, Show)
-
-_TypeDefinition = Core.Name "hydra.graphql.syntax.TypeDefinition"
-
-_TypeDefinition_scalar = Core.Name "scalar"
-
-_TypeDefinition_object = Core.Name "object"
-
-_TypeDefinition_interface = Core.Name "interface"
-
-_TypeDefinition_union = Core.Name "union"
-
-_TypeDefinition_enum = Core.Name "enum"
-
-_TypeDefinition_inputObject = Core.Name "inputObject"
-
-data TypeExtension =
-  TypeExtensionScalar ScalarTypeExtension |
-  TypeExtensionObject ObjectTypeExtension |
-  TypeExtensionInterface InterfaceTypeExtension |
-  TypeExtensionUnion UnionTypeExtension |
-  TypeExtensionEnum EnumTypeExtension |
-  TypeExtensionInputObject InputObjectTypeExtension
-  deriving (Eq, Ord, Read, Show)
-
-_TypeExtension = Core.Name "hydra.graphql.syntax.TypeExtension"
-
-_TypeExtension_scalar = Core.Name "scalar"
-
-_TypeExtension_object = Core.Name "object"
-
-_TypeExtension_interface = Core.Name "interface"
-
-_TypeExtension_union = Core.Name "union"
-
-_TypeExtension_enum = Core.Name "enum"
-
-_TypeExtension_inputObject = Core.Name "inputObject"
-
-data ScalarTypeDefinition =
-  ScalarTypeDefinition {
-    scalarTypeDefinitionDescription :: (Maybe Description),
-    scalarTypeDefinitionName :: Name,
-    scalarTypeDefinitionDirectives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_ScalarTypeDefinition = Core.Name "hydra.graphql.syntax.ScalarTypeDefinition"
-
-_ScalarTypeDefinition_Description = Core.Name "Description"
-
-_ScalarTypeDefinition_Name = Core.Name "Name"
-
-_ScalarTypeDefinition_Directives = Core.Name "Directives"
-
-data ScalarTypeExtension =
-  ScalarTypeExtension {
-    scalarTypeExtensionName :: Name,
-    scalarTypeExtensionDirectives :: Directives}
-  deriving (Eq, Ord, Read, Show)
-
-_ScalarTypeExtension = Core.Name "hydra.graphql.syntax.ScalarTypeExtension"
-
-_ScalarTypeExtension_Name = Core.Name "Name"
-
-_ScalarTypeExtension_Directives = Core.Name "Directives"
-
-data ObjectTypeDefinition =
-  ObjectTypeDefinition {
-    objectTypeDefinitionDescription :: (Maybe Description),
-    objectTypeDefinitionName :: Name,
-    objectTypeDefinitionImplementsInterfaces :: (Maybe ImplementsInterfaces),
-    objectTypeDefinitionDirectives :: (Maybe Directives),
-    objectTypeDefinitionFieldsDefinition :: (Maybe FieldsDefinition)}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectTypeDefinition = Core.Name "hydra.graphql.syntax.ObjectTypeDefinition"
-
-_ObjectTypeDefinition_Description = Core.Name "Description"
-
-_ObjectTypeDefinition_Name = Core.Name "Name"
-
-_ObjectTypeDefinition_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_ObjectTypeDefinition_Directives = Core.Name "Directives"
-
-_ObjectTypeDefinition_FieldsDefinition = Core.Name "FieldsDefinition"
-
-data ObjectTypeExtension =
-  ObjectTypeExtensionSequence ObjectTypeExtension_Sequence |
-  ObjectTypeExtensionSequence2 ObjectTypeExtension_Sequence2 |
-  ObjectTypeExtensionSequence3 ObjectTypeExtension_Sequence3
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectTypeExtension = Core.Name "hydra.graphql.syntax.ObjectTypeExtension"
-
-_ObjectTypeExtension_sequence = Core.Name "sequence"
-
-_ObjectTypeExtension_sequence2 = Core.Name "sequence2"
-
-_ObjectTypeExtension_sequence3 = Core.Name "sequence3"
-
-data ObjectTypeExtension_Sequence =
-  ObjectTypeExtension_Sequence {
-    objectTypeExtension_SequenceName :: Name,
-    objectTypeExtension_SequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),
-    objectTypeExtension_SequenceDirectives :: (Maybe Directives),
-    objectTypeExtension_SequenceFieldsDefinition :: FieldsDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence"
-
-_ObjectTypeExtension_Sequence_Name = Core.Name "Name"
-
-_ObjectTypeExtension_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_ObjectTypeExtension_Sequence_Directives = Core.Name "Directives"
-
-_ObjectTypeExtension_Sequence_FieldsDefinition = Core.Name "FieldsDefinition"
-
-data ObjectTypeExtension_Sequence2 =
-  ObjectTypeExtension_Sequence2 {
-    objectTypeExtension_Sequence2Name :: Name,
-    objectTypeExtension_Sequence2ImplementsInterfaces :: (Maybe ImplementsInterfaces),
-    objectTypeExtension_Sequence2Directives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence2"
-
-_ObjectTypeExtension_Sequence2_Name = Core.Name "Name"
-
-_ObjectTypeExtension_Sequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_ObjectTypeExtension_Sequence2_Directives = Core.Name "Directives"
-
-data ObjectTypeExtension_Sequence3 =
-  ObjectTypeExtension_Sequence3 {
-    objectTypeExtension_Sequence3Name :: Name,
-    objectTypeExtension_Sequence3ImplementsInterfaces :: ImplementsInterfaces}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectTypeExtension_Sequence3 = Core.Name "hydra.graphql.syntax.ObjectTypeExtension_Sequence3"
-
-_ObjectTypeExtension_Sequence3_Name = Core.Name "Name"
-
-_ObjectTypeExtension_Sequence3_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-data ImplementsInterfaces =
-  ImplementsInterfacesSequence ImplementsInterfaces_Sequence |
-  ImplementsInterfacesSequence2 ImplementsInterfaces_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_ImplementsInterfaces = Core.Name "hydra.graphql.syntax.ImplementsInterfaces"
-
-_ImplementsInterfaces_sequence = Core.Name "sequence"
-
-_ImplementsInterfaces_sequence2 = Core.Name "sequence2"
-
-data ImplementsInterfaces_Sequence =
-  ImplementsInterfaces_Sequence {
-    implementsInterfaces_SequenceImplementsInterfaces :: ImplementsInterfaces,
-    implementsInterfaces_SequenceNamedType :: NamedType}
-  deriving (Eq, Ord, Read, Show)
-
-_ImplementsInterfaces_Sequence = Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence"
-
-_ImplementsInterfaces_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_ImplementsInterfaces_Sequence_NamedType = Core.Name "NamedType"
-
-data ImplementsInterfaces_Sequence2 =
-  ImplementsInterfaces_Sequence2 {
-    implementsInterfaces_Sequence2Amp :: (Maybe ()),
-    implementsInterfaces_Sequence2NamedType :: NamedType}
-  deriving (Eq, Ord, Read, Show)
-
-_ImplementsInterfaces_Sequence2 = Core.Name "hydra.graphql.syntax.ImplementsInterfaces_Sequence2"
-
-_ImplementsInterfaces_Sequence2_Amp = Core.Name "Amp"
-
-_ImplementsInterfaces_Sequence2_NamedType = Core.Name "NamedType"
-
-newtype FieldsDefinition =
-  FieldsDefinition {
-    unFieldsDefinition :: [FieldDefinition]}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldsDefinition = Core.Name "hydra.graphql.syntax.FieldsDefinition"
-
-data FieldDefinition =
-  FieldDefinition {
-    fieldDefinitionDescription :: (Maybe Description),
-    fieldDefinitionName :: Name,
-    fieldDefinitionArgumentsDefinition :: (Maybe ArgumentsDefinition),
-    fieldDefinitionType :: Type,
-    fieldDefinitionDirectives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldDefinition = Core.Name "hydra.graphql.syntax.FieldDefinition"
-
-_FieldDefinition_Description = Core.Name "Description"
-
-_FieldDefinition_Name = Core.Name "Name"
-
-_FieldDefinition_ArgumentsDefinition = Core.Name "ArgumentsDefinition"
-
-_FieldDefinition_Type = Core.Name "Type"
-
-_FieldDefinition_Directives = Core.Name "Directives"
-
-newtype ArgumentsDefinition =
-  ArgumentsDefinition {
-    unArgumentsDefinition :: [InputValueDefinition]}
-  deriving (Eq, Ord, Read, Show)
-
-_ArgumentsDefinition = Core.Name "hydra.graphql.syntax.ArgumentsDefinition"
-
-data InputValueDefinition =
-  InputValueDefinition {
-    inputValueDefinitionDescription :: (Maybe Description),
-    inputValueDefinitionName :: Name,
-    inputValueDefinitionType :: Type,
-    inputValueDefinitionDefaultValue :: (Maybe DefaultValue),
-    inputValueDefinitionDirectives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_InputValueDefinition = Core.Name "hydra.graphql.syntax.InputValueDefinition"
-
-_InputValueDefinition_Description = Core.Name "Description"
-
-_InputValueDefinition_Name = Core.Name "Name"
-
-_InputValueDefinition_Type = Core.Name "Type"
-
-_InputValueDefinition_DefaultValue = Core.Name "DefaultValue"
-
-_InputValueDefinition_Directives = Core.Name "Directives"
-
-data InterfaceTypeDefinition =
-  InterfaceTypeDefinitionSequence InterfaceTypeDefinition_Sequence |
-  InterfaceTypeDefinitionSequence2 InterfaceTypeDefinition_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeDefinition = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition"
-
-_InterfaceTypeDefinition_sequence = Core.Name "sequence"
-
-_InterfaceTypeDefinition_sequence2 = Core.Name "sequence2"
-
-data InterfaceTypeDefinition_Sequence =
-  InterfaceTypeDefinition_Sequence {
-    interfaceTypeDefinition_SequenceDescription :: (Maybe Description),
-    interfaceTypeDefinition_SequenceName :: Name,
-    interfaceTypeDefinition_SequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),
-    interfaceTypeDefinition_SequenceDirectives :: (Maybe Directives),
-    interfaceTypeDefinition_SequenceFieldsDefinition :: FieldsDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeDefinition_Sequence = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence"
-
-_InterfaceTypeDefinition_Sequence_Description = Core.Name "Description"
-
-_InterfaceTypeDefinition_Sequence_Name = Core.Name "Name"
-
-_InterfaceTypeDefinition_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_InterfaceTypeDefinition_Sequence_Directives = Core.Name "Directives"
-
-_InterfaceTypeDefinition_Sequence_FieldsDefinition = Core.Name "FieldsDefinition"
-
-data InterfaceTypeDefinition_Sequence2 =
-  InterfaceTypeDefinition_Sequence2 {
-    interfaceTypeDefinition_Sequence2Description :: (Maybe Description),
-    interfaceTypeDefinition_Sequence2Name :: Name,
-    interfaceTypeDefinition_Sequence2ImplementsInterfaces :: ImplementsInterfaces,
-    interfaceTypeDefinition_Sequence2Directives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeDefinition_Sequence2 = Core.Name "hydra.graphql.syntax.InterfaceTypeDefinition_Sequence2"
-
-_InterfaceTypeDefinition_Sequence2_Description = Core.Name "Description"
-
-_InterfaceTypeDefinition_Sequence2_Name = Core.Name "Name"
-
-_InterfaceTypeDefinition_Sequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_InterfaceTypeDefinition_Sequence2_Directives = Core.Name "Directives"
-
-data InterfaceTypeExtension =
-  InterfaceTypeExtensionSequence InterfaceTypeExtension_Sequence |
-  InterfaceTypeExtensionSequence2 InterfaceTypeExtension_Sequence2 |
-  InterfaceTypeExtensionSequence3 InterfaceTypeExtension_Sequence3
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeExtension = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension"
-
-_InterfaceTypeExtension_sequence = Core.Name "sequence"
-
-_InterfaceTypeExtension_sequence2 = Core.Name "sequence2"
-
-_InterfaceTypeExtension_sequence3 = Core.Name "sequence3"
-
-data InterfaceTypeExtension_Sequence =
-  InterfaceTypeExtension_Sequence {
-    interfaceTypeExtension_SequenceName :: Name,
-    interfaceTypeExtension_SequenceImplementsInterfaces :: (Maybe ImplementsInterfaces),
-    interfaceTypeExtension_SequenceDirectives :: (Maybe Directives),
-    interfaceTypeExtension_SequenceFieldsDefinition :: FieldsDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence"
-
-_InterfaceTypeExtension_Sequence_Name = Core.Name "Name"
-
-_InterfaceTypeExtension_Sequence_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_InterfaceTypeExtension_Sequence_Directives = Core.Name "Directives"
-
-_InterfaceTypeExtension_Sequence_FieldsDefinition = Core.Name "FieldsDefinition"
-
-data InterfaceTypeExtension_Sequence2 =
-  InterfaceTypeExtension_Sequence2 {
-    interfaceTypeExtension_Sequence2Name :: Name,
-    interfaceTypeExtension_Sequence2ImplementsInterfaces :: (Maybe ImplementsInterfaces),
-    interfaceTypeExtension_Sequence2Directives :: Directives}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence2"
-
-_InterfaceTypeExtension_Sequence2_Name = Core.Name "Name"
-
-_InterfaceTypeExtension_Sequence2_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-_InterfaceTypeExtension_Sequence2_Directives = Core.Name "Directives"
-
-data InterfaceTypeExtension_Sequence3 =
-  InterfaceTypeExtension_Sequence3 {
-    interfaceTypeExtension_Sequence3Name :: Name,
-    interfaceTypeExtension_Sequence3ImplementsInterfaces :: ImplementsInterfaces}
-  deriving (Eq, Ord, Read, Show)
-
-_InterfaceTypeExtension_Sequence3 = Core.Name "hydra.graphql.syntax.InterfaceTypeExtension_Sequence3"
-
-_InterfaceTypeExtension_Sequence3_Name = Core.Name "Name"
-
-_InterfaceTypeExtension_Sequence3_ImplementsInterfaces = Core.Name "ImplementsInterfaces"
-
-data UnionTypeDefinition =
-  UnionTypeDefinition {
-    unionTypeDefinitionDescription :: (Maybe Description),
-    unionTypeDefinitionName :: Name,
-    unionTypeDefinitionDirectives :: (Maybe Directives),
-    unionTypeDefinitionUnionMemberTypes :: (Maybe UnionMemberTypes)}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionTypeDefinition = Core.Name "hydra.graphql.syntax.UnionTypeDefinition"
-
-_UnionTypeDefinition_Description = Core.Name "Description"
-
-_UnionTypeDefinition_Name = Core.Name "Name"
-
-_UnionTypeDefinition_Directives = Core.Name "Directives"
-
-_UnionTypeDefinition_UnionMemberTypes = Core.Name "UnionMemberTypes"
-
-data UnionMemberTypes =
-  UnionMemberTypesSequence UnionMemberTypes_Sequence |
-  UnionMemberTypesSequence2 UnionMemberTypes_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_UnionMemberTypes = Core.Name "hydra.graphql.syntax.UnionMemberTypes"
-
-_UnionMemberTypes_sequence = Core.Name "sequence"
-
-_UnionMemberTypes_sequence2 = Core.Name "sequence2"
-
-data UnionMemberTypes_Sequence =
-  UnionMemberTypes_Sequence {
-    unionMemberTypes_SequenceUnionMemberTypes :: UnionMemberTypes,
-    unionMemberTypes_SequenceNamedType :: NamedType}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionMemberTypes_Sequence = Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence"
-
-_UnionMemberTypes_Sequence_UnionMemberTypes = Core.Name "UnionMemberTypes"
-
-_UnionMemberTypes_Sequence_NamedType = Core.Name "NamedType"
-
-data UnionMemberTypes_Sequence2 =
-  UnionMemberTypes_Sequence2 {
-    unionMemberTypes_Sequence2Or :: (Maybe ()),
-    unionMemberTypes_Sequence2NamedType :: NamedType}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionMemberTypes_Sequence2 = Core.Name "hydra.graphql.syntax.UnionMemberTypes_Sequence2"
-
-_UnionMemberTypes_Sequence2_Or = Core.Name "Or"
-
-_UnionMemberTypes_Sequence2_NamedType = Core.Name "NamedType"
-
-data UnionTypeExtension =
-  UnionTypeExtensionSequence UnionTypeExtension_Sequence |
-  UnionTypeExtensionSequence2 UnionTypeExtension_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_UnionTypeExtension = Core.Name "hydra.graphql.syntax.UnionTypeExtension"
-
-_UnionTypeExtension_sequence = Core.Name "sequence"
-
-_UnionTypeExtension_sequence2 = Core.Name "sequence2"
-
-data UnionTypeExtension_Sequence =
-  UnionTypeExtension_Sequence {
-    unionTypeExtension_SequenceName :: Name,
-    unionTypeExtension_SequenceDirectives :: (Maybe Directives),
-    unionTypeExtension_SequenceUnionMemberTypes :: UnionMemberTypes}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence"
-
-_UnionTypeExtension_Sequence_Name = Core.Name "Name"
-
-_UnionTypeExtension_Sequence_Directives = Core.Name "Directives"
-
-_UnionTypeExtension_Sequence_UnionMemberTypes = Core.Name "UnionMemberTypes"
-
-data UnionTypeExtension_Sequence2 =
-  UnionTypeExtension_Sequence2 {
-    unionTypeExtension_Sequence2Name :: Name,
-    unionTypeExtension_Sequence2Directives :: Directives}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.UnionTypeExtension_Sequence2"
-
-_UnionTypeExtension_Sequence2_Name = Core.Name "Name"
-
-_UnionTypeExtension_Sequence2_Directives = Core.Name "Directives"
-
-data EnumTypeDefinition =
-  EnumTypeDefinition {
-    enumTypeDefinitionDescription :: (Maybe Description),
-    enumTypeDefinitionName :: Name,
-    enumTypeDefinitionDirectives :: (Maybe Directives),
-    enumTypeDefinitionEnumValuesDefinition :: (Maybe EnumValuesDefinition)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumTypeDefinition = Core.Name "hydra.graphql.syntax.EnumTypeDefinition"
-
-_EnumTypeDefinition_Description = Core.Name "Description"
-
-_EnumTypeDefinition_Name = Core.Name "Name"
-
-_EnumTypeDefinition_Directives = Core.Name "Directives"
-
-_EnumTypeDefinition_EnumValuesDefinition = Core.Name "EnumValuesDefinition"
-
-newtype EnumValuesDefinition =
-  EnumValuesDefinition {
-    unEnumValuesDefinition :: [EnumValueDefinition]}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumValuesDefinition = Core.Name "hydra.graphql.syntax.EnumValuesDefinition"
-
-data EnumValueDefinition =
-  EnumValueDefinition {
-    enumValueDefinitionDescription :: (Maybe Description),
-    enumValueDefinitionEnumValue :: EnumValue,
-    enumValueDefinitionDirectives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumValueDefinition = Core.Name "hydra.graphql.syntax.EnumValueDefinition"
-
-_EnumValueDefinition_Description = Core.Name "Description"
-
-_EnumValueDefinition_EnumValue = Core.Name "EnumValue"
-
-_EnumValueDefinition_Directives = Core.Name "Directives"
-
-data EnumTypeExtension =
-  EnumTypeExtensionSequence EnumTypeExtension_Sequence |
-  EnumTypeExtensionSequence2 EnumTypeExtension_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_EnumTypeExtension = Core.Name "hydra.graphql.syntax.EnumTypeExtension"
-
-_EnumTypeExtension_sequence = Core.Name "sequence"
-
-_EnumTypeExtension_sequence2 = Core.Name "sequence2"
-
-data EnumTypeExtension_Sequence =
-  EnumTypeExtension_Sequence {
-    enumTypeExtension_SequenceName :: Name,
-    enumTypeExtension_SequenceDirectives :: (Maybe Directives),
-    enumTypeExtension_SequenceEnumValuesDefinition :: EnumValuesDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence"
-
-_EnumTypeExtension_Sequence_Name = Core.Name "Name"
-
-_EnumTypeExtension_Sequence_Directives = Core.Name "Directives"
-
-_EnumTypeExtension_Sequence_EnumValuesDefinition = Core.Name "EnumValuesDefinition"
-
-data EnumTypeExtension_Sequence2 =
-  EnumTypeExtension_Sequence2 {
-    enumTypeExtension_Sequence2Name :: Name,
-    enumTypeExtension_Sequence2Directives :: Directives}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.EnumTypeExtension_Sequence2"
-
-_EnumTypeExtension_Sequence2_Name = Core.Name "Name"
-
-_EnumTypeExtension_Sequence2_Directives = Core.Name "Directives"
-
-data InputObjectTypeDefinition =
-  InputObjectTypeDefinitionSequence InputObjectTypeDefinition_Sequence |
-  InputObjectTypeDefinitionSequence2 InputObjectTypeDefinition_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_InputObjectTypeDefinition = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition"
-
-_InputObjectTypeDefinition_sequence = Core.Name "sequence"
-
-_InputObjectTypeDefinition_sequence2 = Core.Name "sequence2"
-
-data InputObjectTypeDefinition_Sequence =
-  InputObjectTypeDefinition_Sequence {
-    inputObjectTypeDefinition_SequenceDescription :: (Maybe Description),
-    inputObjectTypeDefinition_SequenceName :: Name,
-    inputObjectTypeDefinition_SequenceDirectives :: (Maybe Directives),
-    inputObjectTypeDefinition_SequenceInputFieldsDefinition :: InputFieldsDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_InputObjectTypeDefinition_Sequence = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence"
-
-_InputObjectTypeDefinition_Sequence_Description = Core.Name "Description"
-
-_InputObjectTypeDefinition_Sequence_Name = Core.Name "Name"
-
-_InputObjectTypeDefinition_Sequence_Directives = Core.Name "Directives"
-
-_InputObjectTypeDefinition_Sequence_InputFieldsDefinition = Core.Name "InputFieldsDefinition"
-
-data InputObjectTypeDefinition_Sequence2 =
-  InputObjectTypeDefinition_Sequence2 {
-    inputObjectTypeDefinition_Sequence2Description :: (Maybe Description),
-    inputObjectTypeDefinition_Sequence2Name :: Name,
-    inputObjectTypeDefinition_Sequence2Directives :: (Maybe Directives)}
-  deriving (Eq, Ord, Read, Show)
-
-_InputObjectTypeDefinition_Sequence2 = Core.Name "hydra.graphql.syntax.InputObjectTypeDefinition_Sequence2"
-
-_InputObjectTypeDefinition_Sequence2_Description = Core.Name "Description"
-
-_InputObjectTypeDefinition_Sequence2_Name = Core.Name "Name"
-
-_InputObjectTypeDefinition_Sequence2_Directives = Core.Name "Directives"
-
-newtype InputFieldsDefinition =
-  InputFieldsDefinition {
-    unInputFieldsDefinition :: [InputValueDefinition]}
-  deriving (Eq, Ord, Read, Show)
-
-_InputFieldsDefinition = Core.Name "hydra.graphql.syntax.InputFieldsDefinition"
-
-data InputObjectTypeExtension =
-  InputObjectTypeExtensionSequence InputObjectTypeExtension_Sequence |
-  InputObjectTypeExtensionSequence2 InputObjectTypeExtension_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_InputObjectTypeExtension = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension"
-
-_InputObjectTypeExtension_sequence = Core.Name "sequence"
-
-_InputObjectTypeExtension_sequence2 = Core.Name "sequence2"
-
-data InputObjectTypeExtension_Sequence =
-  InputObjectTypeExtension_Sequence {
-    inputObjectTypeExtension_SequenceName :: Name,
-    inputObjectTypeExtension_SequenceDirectives :: (Maybe Directives),
-    inputObjectTypeExtension_SequenceInputFieldsDefinition :: InputFieldsDefinition}
-  deriving (Eq, Ord, Read, Show)
-
-_InputObjectTypeExtension_Sequence = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence"
-
-_InputObjectTypeExtension_Sequence_Name = Core.Name "Name"
-
-_InputObjectTypeExtension_Sequence_Directives = Core.Name "Directives"
-
-_InputObjectTypeExtension_Sequence_InputFieldsDefinition = Core.Name "InputFieldsDefinition"
-
-data InputObjectTypeExtension_Sequence2 =
-  InputObjectTypeExtension_Sequence2 {
-    inputObjectTypeExtension_Sequence2Name :: Name,
-    inputObjectTypeExtension_Sequence2Directives :: Directives}
-  deriving (Eq, Ord, Read, Show)
-
-_InputObjectTypeExtension_Sequence2 = Core.Name "hydra.graphql.syntax.InputObjectTypeExtension_Sequence2"
-
-_InputObjectTypeExtension_Sequence2_Name = Core.Name "Name"
-
-_InputObjectTypeExtension_Sequence2_Directives = Core.Name "Directives"
-
-data DirectiveDefinition =
-  DirectiveDefinition {
-    directiveDefinitionDescription :: (Maybe Description),
-    directiveDefinitionName :: Name,
-    directiveDefinitionArgumentsDefinition :: (Maybe ArgumentsDefinition),
-    directiveDefinitionRepeatable :: (Maybe ()),
-    directiveDefinitionDirectiveLocations :: DirectiveLocations}
-  deriving (Eq, Ord, Read, Show)
-
-_DirectiveDefinition = Core.Name "hydra.graphql.syntax.DirectiveDefinition"
-
-_DirectiveDefinition_Description = Core.Name "Description"
-
-_DirectiveDefinition_Name = Core.Name "Name"
-
-_DirectiveDefinition_ArgumentsDefinition = Core.Name "ArgumentsDefinition"
-
-_DirectiveDefinition_Repeatable = Core.Name "Repeatable"
-
-_DirectiveDefinition_DirectiveLocations = Core.Name "DirectiveLocations"
-
-data DirectiveLocations =
-  DirectiveLocationsSequence DirectiveLocations_Sequence |
-  DirectiveLocationsSequence2 DirectiveLocations_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_DirectiveLocations = Core.Name "hydra.graphql.syntax.DirectiveLocations"
-
-_DirectiveLocations_sequence = Core.Name "sequence"
-
-_DirectiveLocations_sequence2 = Core.Name "sequence2"
-
-data DirectiveLocations_Sequence =
-  DirectiveLocations_Sequence {
-    directiveLocations_SequenceDirectiveLocations :: DirectiveLocations,
-    directiveLocations_SequenceDirectiveLocation :: DirectiveLocation}
-  deriving (Eq, Ord, Read, Show)
-
-_DirectiveLocations_Sequence = Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence"
-
-_DirectiveLocations_Sequence_DirectiveLocations = Core.Name "DirectiveLocations"
-
-_DirectiveLocations_Sequence_DirectiveLocation = Core.Name "DirectiveLocation"
-
-data DirectiveLocations_Sequence2 =
-  DirectiveLocations_Sequence2 {
-    directiveLocations_Sequence2Or :: (Maybe ()),
-    directiveLocations_Sequence2DirectiveLocation :: DirectiveLocation}
-  deriving (Eq, Ord, Read, Show)
-
-_DirectiveLocations_Sequence2 = Core.Name "hydra.graphql.syntax.DirectiveLocations_Sequence2"
-
-_DirectiveLocations_Sequence2_Or = Core.Name "Or"
-
-_DirectiveLocations_Sequence2_DirectiveLocation = Core.Name "DirectiveLocation"
-
-data DirectiveLocation =
-  DirectiveLocationExecutable ExecutableDirectiveLocation |
-  DirectiveLocationTypeSystem TypeSystemDirectiveLocation
-  deriving (Eq, Ord, Read, Show)
-
-_DirectiveLocation = Core.Name "hydra.graphql.syntax.DirectiveLocation"
-
-_DirectiveLocation_executable = Core.Name "executable"
-
-_DirectiveLocation_typeSystem = Core.Name "typeSystem"
-
-data ExecutableDirectiveLocation =
-  ExecutableDirectiveLocationQUERY  |
-  ExecutableDirectiveLocationMUTATION  |
-  ExecutableDirectiveLocationSUBSCRIPTION  |
-  ExecutableDirectiveLocationFIELD  |
-  ExecutableDirectiveLocationFRAGMENT_DEFINITION  |
-  ExecutableDirectiveLocationFRAGMENT_SPREAD  |
-  ExecutableDirectiveLocationINLINE_FRAGMENT  |
-  ExecutableDirectiveLocationVARIABLE_DEFINITION
-  deriving (Eq, Ord, Read, Show)
-
-_ExecutableDirectiveLocation = Core.Name "hydra.graphql.syntax.ExecutableDirectiveLocation"
-
-_ExecutableDirectiveLocation_QUERY = Core.Name "QUERY"
-
-_ExecutableDirectiveLocation_MUTATION = Core.Name "MUTATION"
-
-_ExecutableDirectiveLocation_SUBSCRIPTION = Core.Name "SUBSCRIPTION"
-
-_ExecutableDirectiveLocation_FIELD = Core.Name "FIELD"
-
-_ExecutableDirectiveLocation_FRAGMENT_DEFINITION = Core.Name "FRAGMENT_DEFINITION"
-
-_ExecutableDirectiveLocation_FRAGMENT_SPREAD = Core.Name "FRAGMENT_SPREAD"
-
-_ExecutableDirectiveLocation_INLINE_FRAGMENT = Core.Name "INLINE_FRAGMENT"
-
-_ExecutableDirectiveLocation_VARIABLE_DEFINITION = Core.Name "VARIABLE_DEFINITION"
-
-data TypeSystemDirectiveLocation =
-  TypeSystemDirectiveLocationSCHEMA  |
-  TypeSystemDirectiveLocationSCALAR  |
-  TypeSystemDirectiveLocationOBJECT  |
-  TypeSystemDirectiveLocationFIELD_DEFINITION  |
-  TypeSystemDirectiveLocationARGUMENT_DEFINITION  |
-  TypeSystemDirectiveLocationINTERFACE  |
-  TypeSystemDirectiveLocationUNION  |
-  TypeSystemDirectiveLocationENUM  |
-  TypeSystemDirectiveLocationENUM_VALUE  |
-  TypeSystemDirectiveLocationINPUT_OBJECT  |
-  TypeSystemDirectiveLocationINPUT_FIELD_DEFINITION
-  deriving (Eq, Ord, Read, Show)
-
-_TypeSystemDirectiveLocation = Core.Name "hydra.graphql.syntax.TypeSystemDirectiveLocation"
-
-_TypeSystemDirectiveLocation_SCHEMA = Core.Name "SCHEMA"
-
-_TypeSystemDirectiveLocation_SCALAR = Core.Name "SCALAR"
-
-_TypeSystemDirectiveLocation_OBJECT = Core.Name "OBJECT"
-
-_TypeSystemDirectiveLocation_FIELD_DEFINITION = Core.Name "FIELD_DEFINITION"
-
-_TypeSystemDirectiveLocation_ARGUMENT_DEFINITION = Core.Name "ARGUMENT_DEFINITION"
-
-_TypeSystemDirectiveLocation_INTERFACE = Core.Name "INTERFACE"
-
-_TypeSystemDirectiveLocation_UNION = Core.Name "UNION"
-
-_TypeSystemDirectiveLocation_ENUM = Core.Name "ENUM"
-
-_TypeSystemDirectiveLocation_ENUM_VALUE = Core.Name "ENUM_VALUE"
-
-_TypeSystemDirectiveLocation_INPUT_OBJECT = Core.Name "INPUT_OBJECT"
-
-_TypeSystemDirectiveLocation_INPUT_FIELD_DEFINITION = Core.Name "INPUT_FIELD_DEFINITION"
diff --git a/src/main/haskell/Hydra/Graphviz/Coder.hs b/src/main/haskell/Hydra/Graphviz/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphviz/Coder.hs
+++ /dev/null
@@ -1,311 +0,0 @@
--- 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.Core as Core
-import qualified Hydra.Graphviz.Dot as Dot
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Show.Paths as ShowPaths
-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.Namespace String
-standardNamespaces =
-    M.fromList [
-      (Packaging.Namespace "hydra.lib.chars", "chars"),
-      (Packaging.Namespace "hydra.lib.eithers", "eithers"),
-      (Packaging.Namespace "hydra.lib.equality", "equality"),
-      (Packaging.Namespace "hydra.lib.lists", "lists"),
-      (Packaging.Namespace "hydra.lib.literals", "literals"),
-      (Packaging.Namespace "hydra.lib.logic", "logic"),
-      (Packaging.Namespace "hydra.lib.maps", "maps"),
-      (Packaging.Namespace "hydra.lib.math", "math"),
-      (Packaging.Namespace "hydra.lib.maybes", "maybes"),
-      (Packaging.Namespace "hydra.lib.pairs", "pairs"),
-      (Packaging.Namespace "hydra.lib.regex", "regex"),
-      (Packaging.Namespace "hydra.lib.sets", "sets"),
-      (Packaging.Namespace "hydra.lib.strings", "strings")]
-
--- | Compute a label and node style for a term
-termLabel :: Bool -> M.Map Packaging.Namespace 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.projectionField 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.FloatValueBigfloat v2 -> Literals.showBigfloat v2
-            Core.FloatValueFloat32 v2 -> Literals.showFloat32 v2
-            Core.FloatValueFloat64 v2 -> Literals.showFloat64 v2
-            _ -> "?"
-          Core.LiteralString v1 -> v1
-          _ -> "?")
-        Core.TermMap _ -> simpleLabel (Logic.ifElse compact "<,>" "map")
-        Core.TermMaybe _ -> 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.Namespace 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.uniqueLabel vis l, s)
-                    labstyle = Maybes.maybe (labelOf visited currentTerm) (\ls -> ls) mlabstyle
-                    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 (Maybes.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 = Maybes.maybe [] (\parent -> [
-                          toAccessorEdgeStmt accessor style parent selfId]) mparent
-                    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.uniqueLabel 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 (Maybes.fromMaybe (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 -> Maybes.maybe dflt (\i -> (Lists.concat2 stmts [
-                    toAccessorEdgeStmt accessor style (Maybes.fromMaybe selfId mparent) i], visited)) (Maps.lookup v0 ids)
-                  _ -> 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.Namespace 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 "/" (Maybes.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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphviz/Dot.hs
+++ /dev/null
@@ -1,215 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Graphviz/Serde.hs
+++ /dev/null
@@ -1,184 +0,0 @@
--- 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.Graphviz.Dot as Dot
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Convert an attribute list to an expression
-writeAttrList :: Dot.AttrList -> Ast.Expr
-writeAttrList al =
-    Serialization.spaceSep (Lists.map (\alist -> Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.commaSep Serialization.inlineStyle (Lists.map writeEqualityPair alist))) (Dot.unAttrList al))
-
--- | Convert an attribute statement to an expression
-writeAttrStmt :: Dot.AttrStmt -> Ast.Expr
-writeAttrStmt as =
-
-      let t = Dot.attrStmtType as
-          attr = Dot.attrStmtAttributes as
-      in (Serialization.spaceSep [
-        writeAttrType t,
-        (writeAttrList attr)])
-
--- | Convert an attribute type to an expression
-writeAttrType :: Dot.AttrType -> Ast.Expr
-writeAttrType 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
-writeCompassPt :: Dot.CompassPt -> Ast.Expr
-writeCompassPt 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
-writeEdgeStmt :: Bool -> Dot.EdgeStmt -> Ast.Expr
-writeEdgeStmt 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,
-                    (writeNodeOrSubgraph directed n)]) r)
-          attrParts = Maybes.maybe [] (\a -> [
-                writeAttrList a]) attr
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          writeNodeOrSubgraph directed l],
-        rhsParts,
-        attrParts]))
-
--- | Convert an equality pair to an expression
-writeEqualityPair :: Dot.EqualityPair -> Ast.Expr
-writeEqualityPair eq =
-
-      let l = Dot.equalityPairLeft eq
-          r = Dot.equalityPairRight eq
-      in (Serialization.spaceSep [
-        writeId l,
-        (Serialization.cst "="),
-        (writeId r)])
-
--- | Convert a graph to an expression
-writeGraph :: Dot.Graph -> Ast.Expr
-writeGraph 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 (writeStmt directed) stmts))
-      in (Serialization.spaceSep [
-        graphExpr,
-        body])
-
--- | Convert an identifier to an expression
-writeId :: Dot.Id -> Ast.Expr
-writeId i =
-    Serialization.cst (Strings.cat [
-      "\"",
-      (Dot.unId i),
-      "\""])
-
--- | Convert a node identifier to an expression
-writeNodeId :: Dot.NodeId -> Ast.Expr
-writeNodeId nid =
-
-      let i = Dot.nodeIdId nid
-          mp = Dot.nodeIdPort nid
-      in (Serialization.noSep (Maybes.cat [
-        Maybes.pure (writeId i),
-        (Maybes.map writePort mp)]))
-
--- | Convert a node or subgraph to an expression
-writeNodeOrSubgraph :: Bool -> Dot.NodeOrSubgraph -> Ast.Expr
-writeNodeOrSubgraph directed ns =
-    case ns of
-      Dot.NodeOrSubgraphNode v0 -> writeNodeId v0
-      Dot.NodeOrSubgraphSubgraph v0 -> writeSubgraph directed v0
-
--- | Convert a node statement to an expression
-writeNodeStmt :: Dot.NodeStmt -> Ast.Expr
-writeNodeStmt ns =
-
-      let i = Dot.nodeStmtId ns
-          attr = Dot.nodeStmtAttributes ns
-      in (Serialization.spaceSep (Maybes.cat [
-        Maybes.pure (writeNodeId i),
-        (Maybes.map writeAttrList attr)]))
-
--- | Convert a port to an expression
-writePort :: Dot.Port -> Ast.Expr
-writePort p =
-
-      let mi = Dot.portId p
-          mp = Dot.portPosition p
-          pre =
-                  Maybes.maybe [] (\i -> [
-                    Serialization.cst ":",
-                    (writeId i)]) mi
-          suf =
-                  Maybes.maybe [] (\cp -> [
-                    Serialization.cst ":",
-                    (writeCompassPt cp)]) mp
-      in (Serialization.noSep (Lists.concat [
-        pre,
-        suf]))
-
--- | Convert a statement to an expression
-writeStmt :: Bool -> Dot.Stmt -> Ast.Expr
-writeStmt directed s =
-    case s of
-      Dot.StmtNode v0 -> writeNodeStmt v0
-      Dot.StmtEdge v0 -> writeEdgeStmt directed v0
-      Dot.StmtAttr v0 -> writeAttrStmt v0
-      Dot.StmtEquals v0 -> writeEqualityPair v0
-      Dot.StmtSubgraph v0 -> writeSubgraph directed v0
-
--- | Convert a subgraph to an expression
-writeSubgraph :: Bool -> Dot.Subgraph -> Ast.Expr
-writeSubgraph directed sg =
-
-      let mid = Dot.subgraphSubgraphId sg
-          stmts = Dot.subgraphStatements sg
-          body =
-                  Serialization.brackets Serialization.curlyBraces Serialization.inlineStyle (Serialization.spaceSep (Lists.map (writeStmt directed) stmts))
-      in (Serialization.spaceSep (Maybes.cat [
-        Maybes.map writeSubgraphId mid,
-        (Maybes.pure body)]))
-
--- | Convert a subgraph identifier to an expression
-writeSubgraphId :: Dot.SubgraphId -> Ast.Expr
-writeSubgraphId sid =
-    Serialization.spaceSep (Maybes.cat [
-      Maybes.pure (Serialization.cst "subgraph"),
-      (Maybes.map writeId (Dot.unSubgraphId sid))])
diff --git a/src/main/haskell/Hydra/Haskell/Coder.hs b/src/main/haskell/Hydra/Haskell/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Coder.hs
+++ /dev/null
@@ -1,843 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for encoding Hydra modules as Haskell modules
-
-module Hydra.Haskell.Coder where
-import qualified Hydra.Adapt as Adapt
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Classes as Classes
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Haskell.Environment as Environment
-import qualified Hydra.Haskell.Language as Language
-import qualified Hydra.Haskell.Serde as Serde
-import qualified Hydra.Haskell.Syntax as Syntax
-import qualified Hydra.Haskell.Utils as Utils
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Util as Util
-import qualified Hydra.Variables as Variables
-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
--- | Adapt a Hydra type to Haskell's type system and encode it
-adaptTypeToHaskellAndEncode :: Packaging.Namespaces Syntax.ModuleName -> Core.Type -> t0 -> t1 -> Either Errors.Error Syntax.Type
-adaptTypeToHaskellAndEncode namespaces typ cx g =
-
-      let enc = \t -> encodeType namespaces t cx g
-      in case (Strip.deannotateType typ) of
-        Core.TypeVariable _ -> enc typ
-        _ -> Eithers.bind (Adapt.adaptTypeForLanguage Language.haskellLanguage typ) (\adaptedType -> enc adaptedType)
--- | Generate a constant name for a field (e.g., '_TypeName_fieldName')
-constantForFieldName :: Core.Name -> Core.Name -> String
-constantForFieldName tname fname =
-    Strings.cat [
-      "_",
-      (Names.localNameOf tname),
-      "_",
-      (Core.unName fname)]
--- | Generate a constant name for a type (e.g., '_TypeName')
-constantForTypeName :: Core.Name -> String
-constantForTypeName tname = Strings.cat2 "_" (Names.localNameOf tname)
--- | Construct a Haskell module from a Hydra module and its definitions
-constructModule :: Packaging.Namespaces Syntax.ModuleName -> Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Module
-constructModule namespaces mod defs cx g =
-
-      let h = \namespace -> Packaging.unNamespace namespace
-          createDeclarations =
-                  \def -> case def of
-                    Packaging.DefinitionType v0 ->
-                      let name = Packaging.typeDefinitionName v0
-                          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)
-                      in (toTypeDeclarationsFrom namespaces name typ cx g)
-                    Packaging.DefinitionTerm v0 -> Eithers.bind (toDataDeclaration namespaces v0 cx g) (\d -> Right [
-                      d])
-          importName =
-                  \name -> Syntax.ModuleName (Strings.intercalate "." (Lists.map Formatting.capitalize (Strings.splitOn "." name)))
-          imports = Lists.concat2 domainImports standardImports
-          domainImports =
-
-                    let toImport =
-                            \pair ->
-                              let namespace = Pairs.first pair
-                                  alias = Pairs.second pair
-                                  name = h namespace
-                              in Syntax.Import {
-                                Syntax.importQualified = True,
-                                Syntax.importModule = (importName name),
-                                Syntax.importAs = (Just alias),
-                                Syntax.importSpec = Nothing}
-                    in (Lists.map toImport (Maps.toList (Packaging.namespacesMapping namespaces)))
-          meta = gatherMetadata defs
-          condImport = \flag -> \triple -> Logic.ifElse flag [
-                triple] []
-          standardImports =
-
-                    let toImport =
-                            \triple ->
-                              let name = Pairs.first (Pairs.first triple)
-                                  malias = Pairs.second (Pairs.first triple)
-                                  hidden = Pairs.second triple
-                                  spec =
-                                          Logic.ifElse (Lists.null hidden) Nothing (Just (Syntax.SpecImportHiding (Lists.map (\n -> Syntax.ImportExportSpec {
-                                            Syntax.importExportSpecModifier = Nothing,
-                                            Syntax.importExportSpecName = (Utils.simpleName n),
-                                            Syntax.importExportSpecSubspec = Nothing}) hidden)))
-                              in Syntax.Import {
-                                Syntax.importQualified = (Maybes.isJust malias),
-                                Syntax.importModule = (Syntax.ModuleName name),
-                                Syntax.importAs = (Maybes.map (\x -> Syntax.ModuleName x) malias),
-                                Syntax.importSpec = spec}
-                    in (Lists.map toImport (Lists.concat [
-                      [
-                        (("Prelude", Nothing), [
-                          "Enum",
-                          "Ordering",
-                          "decodeFloat",
-                          "encodeFloat",
-                          "fail",
-                          "map",
-                          "pure",
-                          "sum"])],
-                      [
-                        (("Data.Scientific", (Just "Sci")), [])],
-                      (condImport (Environment.haskellModuleMetadataUsesByteString meta) (("Data.ByteString", (Just "B")), [])),
-                      (condImport (Environment.haskellModuleMetadataUsesInt meta) (("Data.Int", (Just "I")), [])),
-                      (condImport (Environment.haskellModuleMetadataUsesMap meta) (("Data.Map", (Just "M")), [])),
-                      (condImport (Environment.haskellModuleMetadataUsesSet meta) (("Data.Set", (Just "S")), [])),
-                      (Logic.ifElse (Logic.or (Analysis.moduleContainsBinaryLiterals mod) (Analysis.moduleContainsDecimalLiterals mod)) [
-                        (("Hydra.Lib.Literals", (Just "Literals")), [])] [])]))
-      in (Eithers.bind (Eithers.mapList createDeclarations defs) (\declLists ->
-        let decls = Lists.concat declLists
-            mc = Packaging.moduleDescription mod
-        in (Right (Syntax.Module {
-          Syntax.moduleHead = (Just (Syntax.ModuleHead {
-            Syntax.moduleHeadComments = mc,
-            Syntax.moduleHeadName = (importName (h (Packaging.moduleNamespace mod))),
-            Syntax.moduleHeadExports = []})),
-          Syntax.moduleImports = imports,
-          Syntax.moduleDeclarations = decls}))))
--- | Create an initial empty metadata record with all flags set to false
-emptyMetadata :: Environment.HaskellModuleMetadata
-emptyMetadata =
-    Environment.HaskellModuleMetadata {
-      Environment.haskellModuleMetadataUsesByteString = False,
-      Environment.haskellModuleMetadataUsesInt = False,
-      Environment.haskellModuleMetadataUsesMap = False,
-      Environment.haskellModuleMetadataUsesSet = False}
--- | Encode a Hydra case statement as a Haskell case expression with a given scrutinee
-encodeCaseExpression :: Int -> Packaging.Namespaces Syntax.ModuleName -> Core.CaseStatement -> Syntax.Expression -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeCaseExpression depth namespaces stmt scrutinee cx g =
-
-      let dn = Core.caseStatementTypeName stmt
-          def = Core.caseStatementDefault stmt
-          fields = Core.caseStatementCases stmt
-          toAlt =
-                  \fieldMap -> \field ->
-                    let fn = Core.fieldName field
-                        fun_ = Core.fieldTerm field
-                        v0 = Strings.cat2 "v" (Literals.showInt32 depth)
-                        raw =
-                                Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = fun_,
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name v0))})
-                        rhsTerm = Dependencies.simplifyTerm raw
-                        v1 = Logic.ifElse (Variables.isFreeVariableInTerm (Core.Name v0) rhsTerm) Constants.ignoredVariable v0
-                        hname =
-                                Utils.unionFieldReference (Sets.union (Sets.fromList (Maps.keys (Graph.graphBoundTerms g))) (Sets.fromList (Maps.keys (Graph.graphSchemaTypes g)))) namespaces dn fn
-                    in (Eithers.bind (Maybes.cases (Maps.lookup fn fieldMap) (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-                      Errors.noMatchingFieldErrorFieldName = fn})))) (\fieldType ->
-                      let ft = Core.fieldTypeType fieldType
-                          noArgs = []
-                          singleArg = [
-                                Syntax.PatternName (Utils.rawName v1)]
-                      in case (Strip.deannotateType ft) of
-                        Core.TypeUnit -> Right noArgs
-                        _ -> Right singleArg)) (\args ->
-                      let lhs = Utils.applicationPattern hname args
-                      in (Eithers.bind (Eithers.map (\x -> Syntax.CaseRhs x) (encodeTerm (Math.add depth 1) namespaces rhsTerm cx g)) (\rhs -> Right (Syntax.Alternative {
-                        Syntax.alternativePattern = lhs,
-                        Syntax.alternativeRhs = rhs,
-                        Syntax.alternativeBinds = Nothing})))))
-      in (Eithers.bind (Resolution.requireUnionType cx g dn) (\rt ->
-        let toFieldMapEntry = \f -> (Core.fieldTypeName f, f)
-            fieldMap = Maps.fromList (Lists.map toFieldMapEntry rt)
-        in (Eithers.bind (Eithers.mapList (toAlt fieldMap) fields) (\ecases -> Eithers.bind (Maybes.cases def (Right []) (\d -> Eithers.bind (Eithers.map (\x -> Syntax.CaseRhs x) (encodeTerm depth namespaces d cx g)) (\cs ->
-          let lhs = Syntax.PatternName (Utils.rawName Constants.ignoredVariable)
-              alt =
-                      Syntax.Alternative {
-                        Syntax.alternativePattern = lhs,
-                        Syntax.alternativeRhs = cs,
-                        Syntax.alternativeBinds = Nothing}
-          in (Right [
-            alt])))) (\dcases -> Right (Syntax.ExpressionCase (Syntax.CaseExpression {
-          Syntax.caseExpressionCase = scrutinee,
-          Syntax.caseExpressionAlternatives = (Lists.concat2 ecases dcases)})))))))
--- | Encode a Hydra lambda as a Haskell expression
-encodeLambdaTerm :: Int -> Packaging.Namespaces Syntax.ModuleName -> Core.Lambda -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeLambdaTerm depth namespaces lam cx g =
-
-      let v = Core.lambdaParameter lam
-          body = Core.lambdaBody lam
-      in (Eithers.bind (encodeTerm depth namespaces body cx g) (\hbody -> Right (Utils.hslambda (Utils.elementReference namespaces v) hbody)))
--- | Encode a Hydra literal as a Haskell expression
-encodeLiteral :: Core.Literal -> t0 -> Either Errors.Error Syntax.Expression
-encodeLiteral l cx =
-    case l of
-      Core.LiteralBinary v0 -> Right (Utils.hsapp (Utils.hsvar "Literals.stringToBinary") (Utils.hslit (Syntax.LiteralString (Literals.binaryToString v0))))
-      Core.LiteralBoolean v0 -> Right (Utils.hsvar (Logic.ifElse v0 "True" "False"))
-      Core.LiteralDecimal v0 -> Right (Utils.hsapp (Utils.hsvar "Literals.stringToDecimal") (Utils.hslit (Syntax.LiteralString (Literals.showDecimal v0))))
-      Core.LiteralFloat v0 -> case v0 of
-        Core.FloatValueFloat32 v1 -> Right (Utils.hslit (Syntax.LiteralFloat v1))
-        Core.FloatValueFloat64 v1 -> Right (Utils.hslit (Syntax.LiteralDouble v1))
-        Core.FloatValueBigfloat v1 -> Right (Utils.hslit (Syntax.LiteralDouble (Literals.bigfloatToFloat64 v1)))
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueBigint v1 -> Right (Utils.hslit (Syntax.LiteralInteger v1))
-        Core.IntegerValueInt8 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.int8ToBigint v1)))
-        Core.IntegerValueInt16 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.int16ToBigint v1)))
-        Core.IntegerValueInt32 v1 -> Right (Utils.hslit (Syntax.LiteralInt v1))
-        Core.IntegerValueInt64 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.int64ToBigint v1)))
-        Core.IntegerValueUint8 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.uint8ToBigint v1)))
-        Core.IntegerValueUint16 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.uint16ToBigint v1)))
-        Core.IntegerValueUint32 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.uint32ToBigint v1)))
-        Core.IntegerValueUint64 v1 -> Right (Utils.hslit (Syntax.LiteralInteger (Literals.uint64ToBigint v1)))
-      Core.LiteralString v0 -> Right (Utils.hslit (Syntax.LiteralString v0))
-      _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "supported literal",
-        Errors.unexpectedShapeErrorActual = (ShowCore.literal l)})))
--- | Encode a record projection as a Haskell expression
-encodeProjection :: Packaging.Namespaces Syntax.ModuleName -> Core.Projection -> Either t0 Syntax.Expression
-encodeProjection namespaces proj =
-
-      let dn = Core.projectionTypeName proj
-          fname = Core.projectionField proj
-      in (Right (Syntax.ExpressionVariable (Utils.recordFieldReference namespaces dn fname)))
--- | Encode a standalone (un-applied) case statement as a Haskell lambda over a case expression
-encodeStandaloneCases :: Int -> Packaging.Namespaces Syntax.ModuleName -> Core.CaseStatement -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeStandaloneCases depth namespaces stmt cx g =
-    Eithers.map (Utils.hslambda (Utils.rawName "x")) (encodeCaseExpression depth namespaces stmt (Utils.hsvar "x") cx g)
--- | Encode a Hydra term as a Haskell expression
-encodeTerm :: Int -> Packaging.Namespaces Syntax.ModuleName -> Core.Term -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeTerm depth namespaces term cx g =
-
-      let encode = \t -> encodeTerm depth namespaces t cx g
-          nonemptyMap =
-                  \m ->
-                    let lhs = Utils.hsvar "M.fromList"
-                        encodePair =
-                                \pair ->
-                                  let k = Pairs.first pair
-                                      v = Pairs.second pair
-                                  in (Eithers.bind (encode k) (\hk -> Eithers.bind (encode v) (\hv -> Right (Syntax.ExpressionTuple [
-                                    hk,
-                                    hv]))))
-                    in (Eithers.bind (Eithers.map (\x -> Syntax.ExpressionList x) (Eithers.mapList encodePair (Maps.toList m))) (\rhs -> Right (Utils.hsapp lhs rhs)))
-          nonemptySet =
-                  \s ->
-                    let lhs = Utils.hsvar "S.fromList"
-                    in (Eithers.bind (encodeTerm depth namespaces (Core.TermList (Sets.toList s)) cx g) (\rhs -> Right (Utils.hsapp lhs rhs)))
-      in case (Strip.deannotateTerm term) of
-        Core.TermApplication v0 ->
-          let fun = Core.applicationFunction v0
-              arg = Core.applicationArgument v0
-              deannotatedFun = Strip.deannotateTerm fun
-          in case deannotatedFun of
-            Core.TermCases v1 -> Eithers.bind (encode arg) (\harg -> encodeCaseExpression depth namespaces v1 harg cx g)
-            _ -> Eithers.bind (encode fun) (\hfun -> Eithers.bind (encode arg) (\harg -> Right (Utils.hsapp hfun harg)))
-        Core.TermCases v0 -> encodeStandaloneCases depth namespaces v0 cx g
-        Core.TermEither v0 -> Eithers.either (\l -> Eithers.bind (encode l) (\hl -> Right (Utils.hsapp (Utils.hsvar "Left") hl))) (\r -> Eithers.bind (encode r) (\hr -> Right (Utils.hsapp (Utils.hsvar "Right") hr))) v0
-        Core.TermLambda v0 -> encodeLambdaTerm depth namespaces v0 cx g
-        Core.TermProject v0 -> encodeProjection namespaces v0
-        Core.TermUnwrap v0 -> encodeUnwrap namespaces v0
-        Core.TermLet v0 ->
-          let collectBindings =
-                  \lt ->
-                    let bs = Core.letBindings lt
-                        body = Core.letBody lt
-                    in case (Strip.deannotateTerm body) of
-                      Core.TermLet v1 ->
-                        let innerResult = collectBindings v1
-                        in (Lists.concat2 bs (Pairs.first innerResult), (Pairs.second innerResult))
-                      _ -> (bs, body)
-              collected = collectBindings v0
-              allBindings = Pairs.first collected
-              finalBody = Pairs.second collected
-              encodeBinding =
-                      \binding ->
-                        let name = Core.bindingName binding
-                            term_ = Core.bindingTerm binding
-                            hname = Utils.simpleName (Core.unName name)
-                        in (Eithers.bind (encode term_) (\hexpr -> Right (Syntax.LocalBindingValue (Utils.simpleValueBinding hname hexpr Nothing))))
-          in (Eithers.bind (Eithers.mapList encodeBinding allBindings) (\hbindings -> Eithers.bind (encode finalBody) (\hinner -> Right (Syntax.ExpressionLet (Syntax.LetExpression {
-            Syntax.letExpressionBindings = hbindings,
-            Syntax.letExpressionInner = hinner})))))
-        Core.TermList v0 -> Eithers.bind (Eithers.mapList encode v0) (\helems -> Right (Syntax.ExpressionList helems))
-        Core.TermLiteral v0 -> encodeLiteral v0 cx
-        Core.TermMap v0 -> Logic.ifElse (Maps.null v0) (Right (Utils.hsvar "M.empty")) (nonemptyMap v0)
-        Core.TermMaybe v0 -> Maybes.cases v0 (Right (Utils.hsvar "Nothing")) (\t -> Eithers.bind (encode t) (\ht -> Right (Utils.hsapp (Utils.hsvar "Just") ht)))
-        Core.TermPair v0 -> Eithers.bind (encode (Pairs.first v0)) (\f -> Eithers.bind (encode (Pairs.second v0)) (\s -> Right (Syntax.ExpressionTuple [
-          f,
-          s])))
-        Core.TermRecord v0 ->
-          let sname = Core.recordTypeName v0
-              fields = Core.recordFields v0
-              toFieldUpdate =
-                      \field ->
-                        let fn = Core.fieldName field
-                            ft = Core.fieldTerm field
-                            fieldRef = Utils.recordFieldReference namespaces sname fn
-                        in (Eithers.bind (encode ft) (\hft -> Right (Syntax.FieldUpdate {
-                          Syntax.fieldUpdateName = fieldRef,
-                          Syntax.fieldUpdateValue = hft})))
-              typeName = Utils.elementReference namespaces sname
-          in (Eithers.bind (Eithers.mapList toFieldUpdate fields) (\updates -> Right (Syntax.ExpressionConstructRecord (Syntax.ConstructRecordExpression {
-            Syntax.constructRecordExpressionName = typeName,
-            Syntax.constructRecordExpressionFields = updates}))))
-        Core.TermSet v0 -> Logic.ifElse (Sets.null v0) (Right (Utils.hsvar "S.empty")) (nonemptySet v0)
-        Core.TermTypeLambda v0 ->
-          let term1 = Core.typeLambdaBody v0
-          in (encode term1)
-        Core.TermTypeApplication v0 ->
-          let term1 = Core.typeApplicationTermBody v0
-          in (encode term1)
-        Core.TermInject v0 ->
-          let sname = Core.injectionTypeName v0
-              field = Core.injectionField v0
-              fn = Core.fieldName field
-              ft = Core.fieldTerm field
-              lhs =
-                      Syntax.ExpressionVariable (Utils.unionFieldReference (Sets.union (Sets.fromList (Maps.keys (Graph.graphBoundTerms g))) (Sets.fromList (Maps.keys (Graph.graphSchemaTypes g)))) namespaces sname fn)
-              dflt = Eithers.map (Utils.hsapp lhs) (encode ft)
-          in (Eithers.bind (Resolution.requireUnionField cx g sname fn) (\ftyp -> case (Strip.deannotateType ftyp) of
-            Core.TypeUnit -> Right lhs
-            _ -> dflt))
-        Core.TermUnit -> Right (Syntax.ExpressionTuple [])
-        Core.TermVariable v0 -> Right (Syntax.ExpressionVariable (Utils.elementReference namespaces v0))
-        Core.TermWrap v0 ->
-          let tname = Core.wrappedTermTypeName v0
-              term_ = Core.wrappedTermBody v0
-              lhs = Syntax.ExpressionVariable (Utils.elementReference namespaces tname)
-          in (Eithers.bind (encode term_) (\rhs -> Right (Utils.hsapp lhs rhs)))
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "supported term",
-          Errors.unexpectedShapeErrorActual = (ShowCore.term term)})))
--- | Encode a Hydra type as a Haskell type
-encodeType :: Packaging.Namespaces Syntax.ModuleName -> Core.Type -> t0 -> t1 -> Either Errors.Error Syntax.Type
-encodeType namespaces typ cx g =
-
-      let encode = \t -> encodeType namespaces t cx g
-          ref = \name -> Right (Syntax.TypeVariable (Utils.elementReference namespaces name))
-          unitTuple = Syntax.TypeTuple []
-      in case (Strip.deannotateType typ) of
-        Core.TypeApplication v0 ->
-          let lhs = Core.applicationTypeFunction v0
-              rhs = Core.applicationTypeArgument v0
-          in (Eithers.bind (encode lhs) (\hlhs -> Eithers.bind (encode rhs) (\hrhs -> Right (Utils.toTypeApplication [
-            hlhs,
-            hrhs]))))
-        Core.TypeEither v0 ->
-          let left_ = Core.eitherTypeLeft v0
-              right_ = Core.eitherTypeRight v0
-          in (Eithers.bind (encode left_) (\hleft -> Eithers.bind (encode right_) (\hright -> Right (Utils.toTypeApplication [
-            Syntax.TypeVariable (Utils.rawName "Either"),
-            hleft,
-            hright]))))
-        Core.TypeFunction v0 ->
-          let dom = Core.functionTypeDomain v0
-              cod = Core.functionTypeCodomain v0
-          in (Eithers.bind (encode dom) (\hdom -> Eithers.bind (encode cod) (\hcod -> Right (Syntax.TypeFunction (Syntax.FunctionType {
-            Syntax.functionTypeDomain = hdom,
-            Syntax.functionTypeCodomain = hcod})))))
-        Core.TypeForall v0 ->
-          let v = Core.forallTypeParameter v0
-              body = Core.forallTypeBody v0
-          in (encode body)
-        Core.TypeList v0 -> Eithers.bind (encode v0) (\hlt -> Right (Syntax.TypeList hlt))
-        Core.TypeLiteral v0 -> case v0 of
-          Core.LiteralTypeBinary -> Right (Syntax.TypeVariable (Utils.rawName "B.ByteString"))
-          Core.LiteralTypeBoolean -> Right (Syntax.TypeVariable (Utils.rawName "Bool"))
-          Core.LiteralTypeDecimal -> Right (Syntax.TypeVariable (Utils.rawName "Sci.Scientific"))
-          Core.LiteralTypeFloat v1 -> case v1 of
-            Core.FloatTypeFloat32 -> Right (Syntax.TypeVariable (Utils.rawName "Float"))
-            Core.FloatTypeFloat64 -> Right (Syntax.TypeVariable (Utils.rawName "Double"))
-            Core.FloatTypeBigfloat -> Right (Syntax.TypeVariable (Utils.rawName "Double"))
-          Core.LiteralTypeInteger v1 -> case v1 of
-            Core.IntegerTypeBigint -> Right (Syntax.TypeVariable (Utils.rawName "Integer"))
-            Core.IntegerTypeInt8 -> Right (Syntax.TypeVariable (Utils.rawName "I.Int8"))
-            Core.IntegerTypeInt16 -> Right (Syntax.TypeVariable (Utils.rawName "I.Int16"))
-            Core.IntegerTypeInt32 -> Right (Syntax.TypeVariable (Utils.rawName "Int"))
-            Core.IntegerTypeInt64 -> Right (Syntax.TypeVariable (Utils.rawName "I.Int64"))
-            _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-              Errors.unexpectedShapeErrorExpected = "supported integer type",
-              Errors.unexpectedShapeErrorActual = (ShowCore.integerType v1)})))
-          Core.LiteralTypeString -> Right (Syntax.TypeVariable (Utils.rawName "String"))
-          _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-            Errors.unexpectedShapeErrorExpected = "supported literal type",
-            Errors.unexpectedShapeErrorActual = (ShowCore.literalType v0)})))
-        Core.TypeMap v0 ->
-          let kt = Core.mapTypeKeys v0
-              vt = Core.mapTypeValues v0
-          in (Eithers.bind (encode kt) (\hkt -> Eithers.bind (encode vt) (\hvt -> Right (Utils.toTypeApplication [
-            Syntax.TypeVariable (Utils.rawName "M.Map"),
-            hkt,
-            hvt]))))
-        Core.TypeMaybe v0 -> Eithers.bind (encode v0) (\hot -> Right (Utils.toTypeApplication [
-          Syntax.TypeVariable (Utils.rawName "Maybe"),
-          hot]))
-        Core.TypePair v0 -> Eithers.bind (encode (Core.pairTypeFirst v0)) (\f -> Eithers.bind (encode (Core.pairTypeSecond v0)) (\s -> Right (Syntax.TypeTuple [
-          f,
-          s])))
-        Core.TypeRecord _ -> ref (Core.Name "placeholder")
-        Core.TypeSet v0 -> Eithers.bind (encode v0) (\hst -> Right (Utils.toTypeApplication [
-          Syntax.TypeVariable (Utils.rawName "S.Set"),
-          hst]))
-        Core.TypeUnion _ -> ref (Core.Name "placeholder")
-        Core.TypeUnit -> Right unitTuple
-        Core.TypeVariable v0 -> ref v0
-        Core.TypeVoid -> Right (Syntax.TypeVariable (Utils.rawName "Void"))
-        Core.TypeWrap _ -> ref (Core.Name "placeholder")
-        _ -> Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "supported type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ typ)})))
--- | Encode a Hydra type as a Haskell type with typeclass assertions
-encodeTypeWithClassAssertions :: Packaging.Namespaces Syntax.ModuleName -> M.Map Core.Name (S.Set Classes.TypeClass) -> Core.Type -> t0 -> t1 -> Either Errors.Error Syntax.Type
-encodeTypeWithClassAssertions namespaces explicitClasses typ cx g =
-
-      let classes = Maps.union explicitClasses (getImplicitTypeClasses typ)
-          implicitClasses = getImplicitTypeClasses typ
-          encodeAssertion =
-                  \pair ->
-                    let name = Pairs.first pair
-                        cls = Pairs.second pair
-                        hname =
-                                Utils.rawName (case cls of
-                                  Classes.TypeClassEquality -> "Eq"
-                                  Classes.TypeClassOrdering -> "Ord")
-                        htype = Syntax.TypeVariable (Utils.rawName (Core.unName name))
-                    in (Syntax.AssertionClass (Syntax.ClassAssertion {
-                      Syntax.classAssertionName = hname,
-                      Syntax.classAssertionTypes = [
-                        htype]}))
-          assertPairs = Lists.concat (Lists.map toPairs (Maps.toList classes))
-          toPairs =
-                  \mapEntry ->
-                    let name = Pairs.first mapEntry
-                        clsSet = Pairs.second mapEntry
-                        toPair = \c -> (name, c)
-                    in (Lists.map toPair (Sets.toList clsSet))
-      in (Eithers.bind (adaptTypeToHaskellAndEncode namespaces typ cx g) (\htyp -> Logic.ifElse (Lists.null assertPairs) (Right htyp) (
-        let encoded = Lists.map encodeAssertion assertPairs
-            hassert =
-                    Logic.ifElse (Equality.equal (Lists.length encoded) 1) (Maybes.fromMaybe (Syntax.AssertionTuple encoded) (Lists.maybeHead encoded)) (Syntax.AssertionTuple encoded)
-        in (Right (Syntax.TypeCtx (Syntax.ContextType {
-          Syntax.contextTypeCtx = hassert,
-          Syntax.contextTypeType = htyp}))))))
--- | Encode an unwrap term as a Haskell expression
-encodeUnwrap :: Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Either t0 Syntax.Expression
-encodeUnwrap namespaces name =
-    Right (Syntax.ExpressionVariable (Utils.elementReference namespaces (Names.qname (Maybes.fromMaybe (Packaging.Namespace "") (Names.namespaceOf name)) (Utils.newtypeAccessorName name))))
--- | Extend metadata by analyzing a term for standard import usage (bottom-up step function)
-extendMetaForTerm :: Environment.HaskellModuleMetadata -> Core.Term -> Environment.HaskellModuleMetadata
-extendMetaForTerm meta term =
-    case term of
-      Core.TermMap _ -> setMetaUsesMap True meta
-      Core.TermSet _ -> setMetaUsesSet True meta
-      _ -> meta
--- | Extend metadata by analyzing a type for standard import usage (bottom-up step function)
-extendMetaForType :: Environment.HaskellModuleMetadata -> Core.Type -> Environment.HaskellModuleMetadata
-extendMetaForType meta typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeLiteral v0 -> case v0 of
-        Core.LiteralTypeBinary -> setMetaUsesByteString True meta
-        Core.LiteralTypeInteger v1 -> case v1 of
-          Core.IntegerTypeInt8 -> setMetaUsesInt True meta
-          Core.IntegerTypeInt16 -> setMetaUsesInt True meta
-          Core.IntegerTypeInt64 -> setMetaUsesInt True meta
-          _ -> meta
-        _ -> meta
-      Core.TypeMap _ -> setMetaUsesMap True meta
-      Core.TypeSet _ -> setMetaUsesSet True meta
-      _ -> meta
--- | Find type variables that require an Ord constraint (used in maps or sets)
-findOrdVariables :: Core.Type -> S.Set Core.Name
-findOrdVariables typ =
-
-      let fold =
-              \names -> \typ_ -> case typ_ of
-                Core.TypeMap v0 ->
-                  let kt = Core.mapTypeKeys v0
-                  in (tryType names kt)
-                Core.TypeSet v0 -> tryType names v0
-                _ -> names
-          isTypeVariable = \v -> Maybes.isNothing (Names.namespaceOf v)
-          tryType =
-                  \names -> \t -> case (Strip.deannotateType t) of
-                    Core.TypeVariable v0 -> Logic.ifElse (isTypeVariable v0) (Sets.insert v0 names) names
-                    _ -> names
-      in (Rewriting.foldOverType Coders.TraversalOrderPre fold Sets.empty typ)
--- | Gather metadata from definitions by bottom-up traversal of all terms and types
-gatherMetadata :: [Packaging.Definition] -> Environment.HaskellModuleMetadata
-gatherMetadata defs =
-
-      let addDef =
-              \meta -> \def -> case def of
-                Packaging.DefinitionTerm v0 ->
-                  let term = Packaging.termDefinitionTerm v0
-                      metaWithTerm = Rewriting.foldOverTerm Coders.TraversalOrderPre (\m -> \t -> extendMetaForTerm m t) meta term
-                  in (Maybes.maybe metaWithTerm (\ts -> Rewriting.foldOverType Coders.TraversalOrderPre (\m -> \t -> extendMetaForType m t) metaWithTerm (Core.typeSchemeBody ts)) (Packaging.termDefinitionTypeScheme v0))
-                Packaging.DefinitionType v0 ->
-                  let typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)
-                  in (Rewriting.foldOverType Coders.TraversalOrderPre (\m -> \t -> extendMetaForType m t) meta typ)
-      in (Lists.foldl addDef emptyMetadata defs)
--- | Get implicit typeclass constraints for type variables that need Ord
-getImplicitTypeClasses :: Core.Type -> M.Map Core.Name (S.Set Classes.TypeClass)
-getImplicitTypeClasses typ =
-
-      let toPair = \name -> (name, (Sets.fromList [
-            Classes.TypeClassOrdering]))
-      in (Maps.fromList (Lists.map toPair (Sets.toList (findOrdVariables typ))))
--- | Whether to include type definitions in generated Haskell modules
-includeTypeDefinitions :: Bool
-includeTypeDefinitions = False
--- | The key used to track Haskell variable depth in annotations
-keyHaskellVar :: Core.Name
-keyHaskellVar = Core.Name "haskellVar"
--- | Convert a Hydra module to Haskell source code as a filepath-to-content map
-moduleToHaskell :: Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToHaskell mod defs cx g =
-    Eithers.bind (moduleToHaskellModule mod defs cx g) (\hsmod ->
-      let s = Serialization.printExpr (Serialization.parenthesize (Serde.moduleToExpr hsmod))
-          filepath =
-                  Names.namespaceToFilePath Util.CaseConventionPascal (Packaging.FileExtension "hs") (Packaging.moduleNamespace mod)
-      in (Right (Maps.singleton filepath s)))
--- | Convert a Hydra module and definitions to a Haskell module AST
-moduleToHaskellModule :: Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Module
-moduleToHaskellModule mod defs cx g =
-    Eithers.bind (Utils.namespacesForModule mod cx g) (\namespaces -> constructModule namespaces mod defs cx g)
--- | Generate Haskell declarations for type and field name constants
-nameDecls :: Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Core.Type -> [Syntax.DeclarationWithComments]
-nameDecls namespaces name typ =
-
-      let nm = Core.unName name
-          toDecl =
-                  \n -> \pair ->
-                    let k = Pairs.first pair
-                        v = Pairs.second pair
-                        decl =
-                                Syntax.DeclarationValueBinding (Syntax.ValueBindingSimple (Syntax.SimpleValueBinding {
-                                  Syntax.simpleValueBindingPattern = (Utils.applicationPattern (Utils.simpleName k) []),
-                                  Syntax.simpleValueBindingRhs = (Syntax.RightHandSide (Syntax.ExpressionApplication (Syntax.ApplicationExpression {
-                                    Syntax.applicationExpressionFunction = (Syntax.ExpressionVariable (Utils.elementReference namespaces n)),
-                                    Syntax.applicationExpressionArgument = (Syntax.ExpressionLiteral (Syntax.LiteralString v))}))),
-                                  Syntax.simpleValueBindingLocalBindings = Nothing}))
-                    in Syntax.DeclarationWithComments {
-                      Syntax.declarationWithCommentsBody = decl,
-                      Syntax.declarationWithCommentsComments = Nothing}
-          nameDecl = (constantForTypeName name, nm)
-          fieldDecls = Lists.map toConstant (Lexical.fieldsOf typ)
-          toConstant =
-                  \fieldType ->
-                    let fname = Core.fieldTypeName fieldType
-                    in (constantForFieldName name fname, (Core.unName fname))
-      in (Logic.ifElse useCoreImport (Lists.cons (toDecl (Core.Name "hydra.core.Name") nameDecl) (Lists.map (toDecl (Core.Name "hydra.core.Name")) fieldDecls)) [])
-setMetaUsesByteString :: Bool -> Environment.HaskellModuleMetadata -> Environment.HaskellModuleMetadata
-setMetaUsesByteString b m =
-    Environment.HaskellModuleMetadata {
-      Environment.haskellModuleMetadataUsesByteString = b,
-      Environment.haskellModuleMetadataUsesInt = (Environment.haskellModuleMetadataUsesInt m),
-      Environment.haskellModuleMetadataUsesMap = (Environment.haskellModuleMetadataUsesMap m),
-      Environment.haskellModuleMetadataUsesSet = (Environment.haskellModuleMetadataUsesSet m)}
-setMetaUsesInt :: Bool -> Environment.HaskellModuleMetadata -> Environment.HaskellModuleMetadata
-setMetaUsesInt b m =
-    Environment.HaskellModuleMetadata {
-      Environment.haskellModuleMetadataUsesByteString = (Environment.haskellModuleMetadataUsesByteString m),
-      Environment.haskellModuleMetadataUsesInt = b,
-      Environment.haskellModuleMetadataUsesMap = (Environment.haskellModuleMetadataUsesMap m),
-      Environment.haskellModuleMetadataUsesSet = (Environment.haskellModuleMetadataUsesSet m)}
-setMetaUsesMap :: Bool -> Environment.HaskellModuleMetadata -> Environment.HaskellModuleMetadata
-setMetaUsesMap b m =
-    Environment.HaskellModuleMetadata {
-      Environment.haskellModuleMetadataUsesByteString = (Environment.haskellModuleMetadataUsesByteString m),
-      Environment.haskellModuleMetadataUsesInt = (Environment.haskellModuleMetadataUsesInt m),
-      Environment.haskellModuleMetadataUsesMap = b,
-      Environment.haskellModuleMetadataUsesSet = (Environment.haskellModuleMetadataUsesSet m)}
-setMetaUsesSet :: Bool -> Environment.HaskellModuleMetadata -> Environment.HaskellModuleMetadata
-setMetaUsesSet b m =
-    Environment.HaskellModuleMetadata {
-      Environment.haskellModuleMetadataUsesByteString = (Environment.haskellModuleMetadataUsesByteString m),
-      Environment.haskellModuleMetadataUsesInt = (Environment.haskellModuleMetadataUsesInt m),
-      Environment.haskellModuleMetadataUsesMap = (Environment.haskellModuleMetadataUsesMap m),
-      Environment.haskellModuleMetadataUsesSet = b}
--- | Convert a Hydra term definition to a Haskell declaration with comments
-toDataDeclaration :: Packaging.Namespaces Syntax.ModuleName -> Packaging.TermDefinition -> t0 -> Graph.Graph -> Either Errors.Error Syntax.DeclarationWithComments
-toDataDeclaration namespaces def cx g =
-
-      let name = Packaging.termDefinitionName def
-          term = Packaging.termDefinitionTerm def
-          typ = Packaging.termDefinitionTypeScheme def
-          hname = Utils.simpleName (Names.localNameOf name)
-          rewriteValueBinding =
-                  \vb -> case vb of
-                    Syntax.ValueBindingSimple v0 ->
-                      let pattern_ = Syntax.simpleValueBindingPattern v0
-                          rhs = Syntax.simpleValueBindingRhs v0
-                          bindings = Syntax.simpleValueBindingLocalBindings v0
-                      in case pattern_ of
-                        Syntax.PatternApplication v1 ->
-                          let name_ = Syntax.applicationPatternName v1
-                              args = Syntax.applicationPatternArgs v1
-                              rhsExpr = Syntax.unRightHandSide rhs
-                          in case rhsExpr of
-                            Syntax.ExpressionLambda v2 ->
-                              let vars = Syntax.lambdaExpressionBindings v2
-                                  body = Syntax.lambdaExpressionInner v2
-                                  newPattern = Utils.applicationPattern name_ (Lists.concat2 args vars)
-                                  newRhs = Syntax.RightHandSide body
-                              in (rewriteValueBinding (Syntax.ValueBindingSimple (Syntax.SimpleValueBinding {
-                                Syntax.simpleValueBindingPattern = newPattern,
-                                Syntax.simpleValueBindingRhs = newRhs,
-                                Syntax.simpleValueBindingLocalBindings = bindings})))
-                            _ -> vb
-                        _ -> vb
-          toDecl =
-                  \comments -> \hname_ -> \term_ -> \bindings -> case (Strip.deannotateTerm term_) of
-                    Core.TermLet v0 ->
-                      let lbindings = Core.letBindings v0
-                          env = Core.letBody v0
-                          toTermDefinition = \hname_ -> \hterm_ -> Syntax.LocalBindingValue (Utils.simpleValueBinding hname_ hterm_ Nothing)
-                          hnames = Lists.map (\binding -> Utils.simpleName (Core.unName (Core.bindingName binding))) lbindings
-                          terms = Lists.map Core.bindingTerm lbindings
-                      in (Eithers.bind (Eithers.mapList (\t -> encodeTerm 0 namespaces t cx g) terms) (\hterms ->
-                        let hbindings = Lists.zipWith toTermDefinition hnames hterms
-                            prevBindings = Maybes.maybe [] (\lb -> Syntax.unLocalBindings lb) bindings
-                            allBindings = Lists.concat2 prevBindings hbindings
-                        in (toDecl comments hname_ env (Just (Syntax.LocalBindings allBindings)))))
-                    _ -> Eithers.bind (encodeTerm 0 namespaces term_ cx g) (\hterm ->
-                      let vb = Utils.simpleValueBinding hname_ hterm bindings
-                          schemeConstraints = Maybes.maybe Nothing (\ts -> Core.typeSchemeConstraints ts) typ
-                          schemeClasses = typeSchemeConstraintsToClassMap schemeConstraints
-                      in (Eithers.bind (Annotations.getTypeClasses cx g (Strip.removeTypesFromTerm term)) (\explicitClasses ->
-                        let combinedClasses = Maps.union schemeClasses explicitClasses
-                            schemeType = Maybes.maybe Core.TypeUnit (\ts -> Core.typeSchemeBody ts) typ
-                        in (Eithers.bind (encodeTypeWithClassAssertions namespaces combinedClasses schemeType cx g) (\htype ->
-                          let decl =
-                                  Syntax.DeclarationTypedBinding (Syntax.TypedBinding {
-                                    Syntax.typedBindingTypeSignature = Syntax.TypeSignature {
-                                      Syntax.typeSignatureName = hname_,
-                                      Syntax.typeSignatureType = htype},
-                                    Syntax.typedBindingValueBinding = (rewriteValueBinding vb)})
-                          in (Right (Syntax.DeclarationWithComments {
-                            Syntax.declarationWithCommentsBody = decl,
-                            Syntax.declarationWithCommentsComments = comments})))))))
-      in (Eithers.bind (Annotations.getTermDescription cx g term) (\comments -> toDecl comments hname term Nothing))
--- | Convert a Hydra type definition to Haskell declarations
-toTypeDeclarationsFrom :: Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Core.Type -> Context.Context -> Graph.Graph -> Either Errors.Error [Syntax.DeclarationWithComments]
-toTypeDeclarationsFrom namespaces elementName typ cx g =
-
-      let lname = Names.localNameOf elementName
-          hname = Utils.simpleName lname
-          declHead =
-                  \name -> \vars_ -> Maybes.fromMaybe (Syntax.DeclarationHeadSimple name) (Maybes.map (\p ->
-                    let h = Pairs.first p
-                        rest = Pairs.second p
-                        hvar = Syntax.Variable (Utils.simpleName (Core.unName h))
-                    in (Syntax.DeclarationHeadApplication (Syntax.ApplicationDeclarationHead {
-                      Syntax.applicationDeclarationHeadFunction = (declHead name rest),
-                      Syntax.applicationDeclarationHeadOperand = hvar}))) (Lists.uncons vars_))
-          newtypeCons =
-                  \tname -> \typ_ ->
-                    let hname0 = Utils.simpleName (Utils.newtypeAccessorName tname)
-                    in (Eithers.bind (adaptTypeToHaskellAndEncode namespaces typ_ cx g) (\htype ->
-                      let hfield =
-                              Syntax.FieldWithComments {
-                                Syntax.fieldWithCommentsField = Syntax.Field {
-                                  Syntax.fieldName = hname0,
-                                  Syntax.fieldType = htype},
-                                Syntax.fieldWithCommentsComments = Nothing}
-                          constructorName = Utils.simpleName (Names.localNameOf tname)
-                      in (Right (Syntax.ConstructorWithComments {
-                        Syntax.constructorWithCommentsBody = (Syntax.ConstructorRecord (Syntax.RecordConstructor {
-                          Syntax.recordConstructorName = constructorName,
-                          Syntax.recordConstructorFields = [
-                            hfield]})),
-                        Syntax.constructorWithCommentsComments = Nothing}))))
-          recordCons =
-                  \lname_ -> \fields ->
-                    let toField =
-                            \fieldType ->
-                              let fname = Core.fieldTypeName fieldType
-                                  ftype = Core.fieldTypeType fieldType
-                                  hname_ = Utils.simpleName (Strings.cat2 (Formatting.decapitalize lname_) (Formatting.capitalize (Core.unName fname)))
-                              in (Eithers.bind (adaptTypeToHaskellAndEncode namespaces ftype cx g) (\htype -> Eithers.bind (Annotations.getTypeDescription cx g ftype) (\comments -> Right (Syntax.FieldWithComments {
-                                Syntax.fieldWithCommentsField = Syntax.Field {
-                                  Syntax.fieldName = hname_,
-                                  Syntax.fieldType = htype},
-                                Syntax.fieldWithCommentsComments = comments}))))
-                    in (Eithers.bind (Eithers.mapList toField fields) (\hFields -> Right (Syntax.ConstructorWithComments {
-                      Syntax.constructorWithCommentsBody = (Syntax.ConstructorRecord (Syntax.RecordConstructor {
-                        Syntax.recordConstructorName = (Utils.simpleName lname_),
-                        Syntax.recordConstructorFields = hFields})),
-                      Syntax.constructorWithCommentsComments = Nothing})))
-          unionCons =
-                  \boundNames_ -> \lname_ -> \fieldType ->
-                    let fname = Core.fieldTypeName fieldType
-                        ftype = Core.fieldTypeType fieldType
-                        deconflict =
-                                \name ->
-                                  let tname =
-                                          Names.unqualifyName (Packaging.QualifiedName {
-                                            Packaging.qualifiedNameNamespace = (Just (Pairs.first (Packaging.namespacesFocus namespaces))),
-                                            Packaging.qualifiedNameLocal = name})
-                                  in (Logic.ifElse (Sets.member tname boundNames_) (deconflict (Strings.cat2 name "_")) name)
-                    in (Eithers.bind (Annotations.getTypeDescription cx g ftype) (\comments ->
-                      let nm = deconflict (Strings.cat2 (Formatting.capitalize lname_) (Formatting.capitalize (Core.unName fname)))
-                      in (Eithers.bind (Logic.ifElse (Equality.equal (Strip.deannotateType ftype) Core.TypeUnit) (Right []) (Eithers.bind (adaptTypeToHaskellAndEncode namespaces ftype cx g) (\htype -> Right [
-                        htype]))) (\typeList -> Right (Syntax.ConstructorWithComments {
-                        Syntax.constructorWithCommentsBody = (Syntax.ConstructorOrdinary (Syntax.OrdinaryConstructor {
-                          Syntax.ordinaryConstructorName = (Utils.simpleName nm),
-                          Syntax.ordinaryConstructorFields = typeList})),
-                        Syntax.constructorWithCommentsComments = comments})))))
-      in (Eithers.bind (Predicates.isSerializableByName cx g elementName) (\isSer ->
-        let deriv =
-                Syntax.Deriving (Logic.ifElse isSer (Lists.map Utils.rawName [
-                  "Eq",
-                  "Ord",
-                  "Read",
-                  "Show"]) [])
-            unpackResult = Utils.unpackForallType typ
-            vars = Pairs.first unpackResult
-            t_ = Pairs.second unpackResult
-            hd = declHead hname (Lists.reverse vars)
-        in (Eithers.bind (case (Strip.deannotateType t_) of
-          Core.TypeRecord v0 -> Eithers.bind (recordCons lname v0) (\cons -> Right (Syntax.DeclarationData (Syntax.DataDeclaration {
-            Syntax.dataDeclarationKeyword = Syntax.DataOrNewtypeData,
-            Syntax.dataDeclarationContext = [],
-            Syntax.dataDeclarationHead = hd,
-            Syntax.dataDeclarationConstructors = [
-              cons],
-            Syntax.dataDeclarationDeriving = [
-              deriv]})))
-          Core.TypeUnion v0 -> Eithers.bind (Eithers.mapList (unionCons (Sets.fromList (Maps.keys (Graph.graphBoundTerms g))) lname) v0) (\cons -> Right (Syntax.DeclarationData (Syntax.DataDeclaration {
-            Syntax.dataDeclarationKeyword = Syntax.DataOrNewtypeData,
-            Syntax.dataDeclarationContext = [],
-            Syntax.dataDeclarationHead = hd,
-            Syntax.dataDeclarationConstructors = cons,
-            Syntax.dataDeclarationDeriving = [
-              deriv]})))
-          Core.TypeWrap v0 -> Eithers.bind (newtypeCons elementName v0) (\cons -> Right (Syntax.DeclarationData (Syntax.DataDeclaration {
-            Syntax.dataDeclarationKeyword = Syntax.DataOrNewtypeNewtype,
-            Syntax.dataDeclarationContext = [],
-            Syntax.dataDeclarationHead = hd,
-            Syntax.dataDeclarationConstructors = [
-              cons],
-            Syntax.dataDeclarationDeriving = [
-              deriv]})))
-          _ -> Eithers.bind (adaptTypeToHaskellAndEncode namespaces typ cx g) (\htype -> Right (Syntax.DeclarationType (Syntax.TypeDeclaration {
-            Syntax.typeDeclarationName = hd,
-            Syntax.typeDeclarationType = htype})))) (\decl -> Eithers.bind (Annotations.getTypeDescription cx g typ) (\comments -> Eithers.bind (Logic.ifElse includeTypeDefinitions (Eithers.bind (typeDecl namespaces elementName typ cx g) (\decl_ -> Right [
-          decl_])) (Right [])) (\tdecls ->
-          let mainDecl =
-                  Syntax.DeclarationWithComments {
-                    Syntax.declarationWithCommentsBody = decl,
-                    Syntax.declarationWithCommentsComments = comments}
-              nameDecls_ = nameDecls namespaces elementName typ
-          in (Right (Lists.concat [
-            [
-              mainDecl],
-            nameDecls_,
-            tdecls]))))))))
--- | Generate a Haskell declaration for a type definition constant
-typeDecl :: Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Core.Type -> t0 -> Graph.Graph -> Either Errors.Error Syntax.DeclarationWithComments
-typeDecl namespaces name typ cx g =
-
-      let typeName = \ns -> \name_ -> Names.qname ns (typeNameLocal name_)
-          typeNameLocal =
-                  \name_ -> Strings.cat [
-                    "_",
-                    (Names.localNameOf name_),
-                    "_type_"]
-          rawTerm = EncodeCore.type_ typ
-          rewrite =
-                  \recurse -> \term ->
-                    let variantResult =
-                            case (Strip.deannotateTerm term) of
-                              Core.TermInject v0 -> Logic.ifElse (Equality.equal (Core.injectionTypeName v0) (Core.Name "hydra.core.Type")) (Just (Core.injectionField v0)) Nothing
-                              _ -> Nothing
-                        decodeString =
-                                \term2 -> case (Strip.deannotateTerm term2) of
-                                  Core.TermLiteral v0 -> case v0 of
-                                    Core.LiteralString v1 -> Just v1
-                                    _ -> Nothing
-                                  _ -> Nothing
-                        decodeName =
-                                \term2 -> case (Strip.deannotateTerm term2) of
-                                  Core.TermWrap v0 -> Logic.ifElse (Equality.equal (Core.wrappedTermTypeName v0) (Core.Name "hydra.core.Name")) (Maybes.map (\x -> Core.Name x) (decodeString (Core.wrappedTermBody v0))) Nothing
-                                  _ -> Nothing
-                        forType =
-                                \field ->
-                                  let fname = Core.fieldName field
-                                      fterm = Core.fieldTerm field
-                                  in (Logic.ifElse (Equality.equal fname (Core.Name "record")) Nothing (Logic.ifElse (Equality.equal fname (Core.Name "variable")) (Maybes.bind (decodeName fterm) forVariableType) Nothing))
-                        forVariableType =
-                                \vname ->
-                                  let qname = Names.qualifyName vname
-                                      mns = Packaging.qualifiedNameNamespace qname
-                                      local = Packaging.qualifiedNameLocal qname
-                                  in (Maybes.map (\ns -> Core.TermVariable (Names.qname ns (Strings.cat [
-                                    "_",
-                                    local,
-                                    "_type_"]))) mns)
-                    in (Maybes.fromMaybe (recurse term) (Maybes.bind variantResult forType))
-          finalTerm = Rewriting.rewriteTerm rewrite rawTerm
-      in (Eithers.bind (encodeTerm 0 namespaces finalTerm cx g) (\expr ->
-        let rhs = Syntax.RightHandSide expr
-            hname = Utils.simpleName (typeNameLocal name)
-            pat = Utils.applicationPattern hname []
-            decl =
-                    Syntax.DeclarationValueBinding (Syntax.ValueBindingSimple (Syntax.SimpleValueBinding {
-                      Syntax.simpleValueBindingPattern = pat,
-                      Syntax.simpleValueBindingRhs = rhs,
-                      Syntax.simpleValueBindingLocalBindings = Nothing}))
-        in (Right (Syntax.DeclarationWithComments {
-          Syntax.declarationWithCommentsBody = decl,
-          Syntax.declarationWithCommentsComments = Nothing}))))
--- | Convert type scheme constraints to a map of type variables to typeclasses
-typeSchemeConstraintsToClassMap :: Ord t0 => (Maybe (M.Map t0 Core.TypeVariableMetadata) -> M.Map t0 (S.Set Classes.TypeClass))
-typeSchemeConstraintsToClassMap maybeConstraints =
-
-      let nameToTypeClass =
-              \className ->
-                let classNameStr = Core.unName className
-                    isEq = Equality.equal classNameStr (Core.unName (Core.Name "equality"))
-                    isOrd = Equality.equal classNameStr (Core.unName (Core.Name "ordering"))
-                in (Logic.ifElse isEq (Just Classes.TypeClassEquality) (Logic.ifElse isOrd (Just Classes.TypeClassOrdering) Nothing))
-      in (Maybes.maybe Maps.empty (\constraints -> Maps.map (\meta -> Sets.fromList (Maybes.cat (Lists.map nameToTypeClass (Sets.toList (Core.typeVariableMetadataClasses meta))))) constraints) maybeConstraints)
--- | Whether to use the Hydra core import in generated modules
-useCoreImport :: Bool
-useCoreImport = True
diff --git a/src/main/haskell/Hydra/Haskell/Environment.hs b/src/main/haskell/Hydra/Haskell/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Environment.hs
+++ /dev/null
@@ -1,24 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Environment types for Haskell code generation
-
-module Hydra.Haskell.Environment where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Metadata used to determine which standard imports are needed in a generated Haskell module
-data HaskellModuleMetadata =
-  HaskellModuleMetadata {
-    -- | Whether the module uses Data.ByteString (B.ByteString)
-    haskellModuleMetadataUsesByteString :: Bool,
-    -- | Whether the module uses Data.Int (I.Int8, I.Int16, I.Int64)
-    haskellModuleMetadataUsesInt :: Bool,
-    -- | Whether the module uses Data.Map (M.Map, M.fromList, M.empty)
-    haskellModuleMetadataUsesMap :: Bool,
-    -- | Whether the module uses Data.Set (S.Set, S.fromList, S.empty)
-    haskellModuleMetadataUsesSet :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_HaskellModuleMetadata = Core.Name "hydra.haskell.environment.HaskellModuleMetadata"
-_HaskellModuleMetadata_usesByteString = Core.Name "usesByteString"
-_HaskellModuleMetadata_usesInt = Core.Name "usesInt"
-_HaskellModuleMetadata_usesMap = Core.Name "usesMap"
-_HaskellModuleMetadata_usesSet = Core.Name "usesSet"
diff --git a/src/main/haskell/Hydra/Haskell/Generation.hs b/src/main/haskell/Hydra/Haskell/Generation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Generation.hs
+++ /dev/null
@@ -1,100 +0,0 @@
--- | Haskell-specific code generation helpers.
---
--- Depends on the kernel-agnostic 'Hydra.Generation' module plus the Haskell coder
--- and language binding. These are the functions that drive code generation into
--- Haskell source trees.
-
-module Hydra.Haskell.Generation (
-  module Hydra.Haskell.Generation,
-) where
-
-import Hydra.Kernel
-import Hydra.Haskell.Coder
-import Hydra.Haskell.Language
-import Hydra.Generation
-import qualified Hydra.Sources.All as Sources
-import qualified Hydra.Sources.Kernel.Types.Core as CoreTypes
-
-
--- | Generate Haskell source files from modules.
--- First argument: output directory
--- Second argument: universe modules (all modules for type/term resolution)
--- Third argument: modules to transform and generate
-writeHaskell :: FilePath -> [Module] -> [Module] -> IO Int
-writeHaskell = generateSources moduleToHaskell haskellLanguage True False False False
-
-----------------------------------------
-
-writeCoderSourceHaskell :: ([Module] -> [Module] -> IO [Module]) -> FilePath -> [Module] -> [Module] -> IO ()
-writeCoderSourceHaskell generate basePath universeModules typeModules = do
-  sourceMods <- generateCoderSourceModules generate universeModules typeModules
-  -- The source modules need the Module encoder/decoder and Core types
-  _ <- writeHaskell basePath (universeModules ++ sourceMods) sourceMods
-  return ()
-
--- | Write decoder Source modules as Haskell to the given path.
--- These typically go to src/gen-main/haskell/Hydra/Sources/Decode/
-writeDecoderSourceHaskell :: FilePath -> [Module] -> [Module] -> IO ()
-writeDecoderSourceHaskell = writeCoderSourceHaskell generateDecoderModules
-
--- | Write encoder Source modules as Haskell to the given path.
--- These typically go to src/gen-main/haskell/Hydra/Sources/Encode/
-writeEncoderSourceHaskell :: FilePath -> [Module] -> [Module] -> IO ()
-writeEncoderSourceHaskell = writeCoderSourceHaskell generateEncoderModules
-
-----------------------------------------
-
--- | Write encoder/decoder modules as Haskell to the given path.
--- First argument: generator function for encoder or decoder modules
--- Second argument: output directory
--- Third argument: universe modules (all modules for type/term resolution)
--- Fourth argument: type modules to generate encoders/decoders for
--- Note: This function bypasses type inference; for efficiency, we generate type signatures directly.
-writeCoderHaskell :: ([Module] -> [Module] -> IO [Module]) -> FilePath -> [Module] -> [Module] -> IO ()
-writeCoderHaskell generate basePath universeModules typeModules = do
-    coderMods <- generate universeModules typeModules
-    -- Add core types namespace to each encoder/decoder module's type dependencies
-    -- since the encoders/decoders reference hydra.core.Term, hydra.core.Injection, etc.
-    let withCoreDeps = fmap addCoreDep coderMods
-    _ <- writeHaskell basePath universeModules withCoreDeps
-    return ()
-  where
-    addCoreDep m = m { moduleTypeDependencies = CoreTypes.ns : moduleTypeDependencies m }
-
-writeDecoderHaskell :: FilePath -> [Module] -> [Module] -> IO ()
-writeDecoderHaskell = writeCoderHaskell generateDecoderModules
-
-writeEncoderHaskell :: FilePath -> [Module] -> [Module] -> IO ()
-writeEncoderHaskell = writeCoderHaskell generateEncoderModules
-
-----------------------------------------
--- DSL Module Generation
-----------------------------------------
-
--- | Write the hydra.dsls source module (the DSL generator itself) to Haskell.
--- The Dsls module is NOT included in the universe to avoid infinite recursion
--- during graph construction (its terms reference decoders that reference types).
-writeDslSourceHaskell :: FilePath -> IO ()
-writeDslSourceHaskell basePath = do
-    _ <- writeHaskell basePath Sources.mainModules Sources.dslSourceModules
-    return ()
-
--- | Write DSL modules with doInfer=False. All bindings are fully typed.
-writeDslHaskell :: FilePath -> [Module] -> [Module] -> IO ()
-writeDslHaskell basePath universeModules typeModules = do
-    dslMods <- generateDslModules universeModules typeModules
-    let nonEmpty = filter (not . null . moduleDefinitions) dslMods
-    let withCoreDeps = fmap addCoreDep nonEmpty
-    _ <- generateSources moduleToHaskell haskellLanguage False False False False basePath universeModules withCoreDeps
-    return ()
-  where
-    addCoreDep m = m { moduleTypeDependencies = CoreTypes.ns : moduleTypeDependencies m }
-
-----------------------------------------
--- Lexicon
-----------------------------------------
-
--- | Generate the lexicon to the standard location, using the Haskell-host kernel modules.
--- Path is relative to heads/haskell/ (where the sync script runs stack ghci).
-writeLexiconToStandardPath :: IO ()
-writeLexiconToStandardPath = writeLexicon "../../docs/hydra-lexicon.txt" Sources.kernelModules
diff --git a/src/main/haskell/Hydra/Haskell/Language.hs b/src/main/haskell/Hydra/Haskell/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Language.hs
+++ /dev/null
@@ -1,147 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Language constraints and reserved words for Haskell
-
-module Hydra.Haskell.Language where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
--- | Language constraints for Haskell
-haskellLanguage :: Coders.Language
-haskellLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.haskell"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantDecimal,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeBigint,
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantCases,
-          Variants.TermVariantEither,
-          Variants.TermVariantLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantProject,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
--- | Created on 2025-02-28 using GHCi 9.6.6
--- |
--- | You can reproduce these lists of symbols by issuing the command `:browse Prelude` in GHCi, pasting the results into
--- | /tmp/browse_Prelude.txt, and then running the Bash command provided with each list.
--- |
--- | See also https://www.haskell.org/onlinereport/standard-prelude.html
-reservedWords :: S.Set String
-reservedWords = Sets.fromList (Lists.concat2 keywordSymbols reservedSymbols)
-  where
-    keywordSymbols =
-        [
-          "case",
-          "class",
-          "data",
-          "default",
-          "deriving",
-          "do",
-          "else",
-          "forall",
-          "foreign",
-          "if",
-          "import",
-          "in",
-          "infix",
-          "infixl",
-          "infixr",
-          "instance",
-          "let",
-          "module",
-          "newtype",
-          "of",
-          "then",
-          "type",
-          "where"]
-    reservedSymbols =
-        [
-          "Bool",
-          "Double",
-          "False",
-          "Float",
-          "Int",
-          "Integer",
-          "Just",
-          "Maybe",
-          "Nothing",
-          "Ord",
-          "Show",
-          "String",
-          "True"]
diff --git a/src/main/haskell/Hydra/Haskell/Operators.hs b/src/main/haskell/Hydra/Haskell/Operators.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Operators.hs
+++ /dev/null
@@ -1,118 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | AST operators for Haskell
-
-module Hydra.Haskell.Operators where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Logical AND operator (&&)
-andOp :: Ast.Op
-andOp = Serialization.op "&&" 3 Ast.AssociativityRight
--- | Applicative apply operator (<*>)
-apOp :: Ast.Op
-apOp = Serialization.op "<*>" 4 Ast.AssociativityLeft
--- | Function application operator (whitespace)
-appOp :: Ast.Op
-appOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsSpace},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityLeft}
--- | Low-precedence function application ($)
-applyOp :: Ast.Op
-applyOp = Serialization.op "$" 0 Ast.AssociativityRight
--- | Function type arrow (->)
-arrowOp :: Ast.Op
-arrowOp = Serialization.op "->" (Math.negate 1) Ast.AssociativityRight
--- | Type class constraint arrow (=>)
-assertOp :: Ast.Op
-assertOp = Serialization.op "=>" 0 Ast.AssociativityNone
--- | Monadic bind operator (>>=)
-bindOp :: Ast.Op
-bindOp = Serialization.op ">>=" 1 Ast.AssociativityLeft
--- | Case alternative arrow (->)
-caseOp :: Ast.Op
-caseOp = Serialization.op "->" 0 Ast.AssociativityNone
--- | Function composition (.)
-composeOp :: Ast.Op
-composeOp = Serialization.op "." 9 Ast.AssociativityLeft
--- | List concatenation (++)
-concatOp :: Ast.Op
-concatOp = Serialization.op "++" 5 Ast.AssociativityRight
--- | List cons (:)
-consOp :: Ast.Op
-consOp = Serialization.op ":" 5 Ast.AssociativityRight
--- | Definition operator (=)
-defineOp :: Ast.Op
-defineOp = Serialization.op "=" 0 Ast.AssociativityNone
--- | Semigroup append (<>)
-diamondOp :: Ast.Op
-diamondOp = Serialization.op "<>" 6 Ast.AssociativityRight
--- | Integer division (`div`)
-divOp :: Ast.Op
-divOp = Serialization.op "`div`" 7 Ast.AssociativityLeft
--- | Fractional division (/)
-divideOp :: Ast.Op
-divideOp = Serialization.op "/" 7 Ast.AssociativityLeft
--- | List membership (`elem`)
-elemOp :: Ast.Op
-elemOp = Serialization.op "`elem`" 4 Ast.AssociativityNone
--- | Equality comparison (==)
-equalOp :: Ast.Op
-equalOp = Serialization.op "==" 4 Ast.AssociativityNone
--- | Functor map (<$>)
-fmapOp :: Ast.Op
-fmapOp = Serialization.op "<$>" 4 Ast.AssociativityLeft
--- | Greater than (>)
-gtOp :: Ast.Op
-gtOp = Serialization.op ">" 4 Ast.AssociativityNone
--- | Greater than or equal (>=)
-gteOp :: Ast.Op
-gteOp = Serialization.op ">=" 4 Ast.AssociativityNone
--- | List indexing (!!)
-indexOp :: Ast.Op
-indexOp = Serialization.op "!!" 9 Ast.AssociativityLeft
--- | Lambda body arrow (->)
-lambdaOp :: Ast.Op
-lambdaOp = Serialization.op "->" (Math.negate 1) Ast.AssociativityRight
--- | Less than (<)
-ltOp :: Ast.Op
-ltOp = Serialization.op "<" 4 Ast.AssociativityNone
--- | Less than or equal (<=)
-lteOp :: Ast.Op
-lteOp = Serialization.op ">=" 4 Ast.AssociativityNone
--- | Subtraction (-). Originally: associativityLeft
-minusOp :: Ast.Op
-minusOp = Serialization.op "-" 6 Ast.AssociativityBoth
--- | Modulo (`mod`)
-modOp :: Ast.Op
-modOp = Serialization.op "`mod`" 7 Ast.AssociativityLeft
--- | Multiplication (*). Originally: associativityLeft
-multOp :: Ast.Op
-multOp = Serialization.op "*" 7 Ast.AssociativityBoth
--- | Not equal (/=)
-neqOp :: Ast.Op
-neqOp = Serialization.op "/=" 4 Ast.AssociativityNone
--- | List non-membership (`notElem`)
-notElemOp :: Ast.Op
-notElemOp = Serialization.op "`notElem`" 4 Ast.AssociativityNone
--- | Logical OR (||)
-orOp :: Ast.Op
-orOp = Serialization.op "||" 2 Ast.AssociativityRight
--- | Addition (+). Originally: associativityLeft
-plusOp :: Ast.Op
-plusOp = Serialization.op "+" 6 Ast.AssociativityBoth
--- | Integer quotient (`quot`)
-quotOp :: Ast.Op
-quotOp = Serialization.op "`quot`" 7 Ast.AssociativityLeft
--- | Integer remainder (`rem`)
-remOp :: Ast.Op
-remOp = Serialization.op "`rem`" 7 Ast.AssociativityLeft
--- | Type annotation (::)
-typeOp :: Ast.Op
-typeOp = Serialization.op "::" 0 Ast.AssociativityNone
diff --git a/src/main/haskell/Hydra/Haskell/Serde.hs b/src/main/haskell/Hydra/Haskell/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Serde.hs
+++ /dev/null
@@ -1,435 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Haskell operator precendence and associativity are drawn from:
--- | https://self-learning-java-tutorial.blogspot.com/2016/04/haskell-operator-precedence.html
--- | Other operators were investigated using GHCi, e.g. ":info (->)"
--- | Operator names are drawn (loosely) from:
--- | https://stackoverflow.com/questions/7746894/are-there-pronounceable-names-for-common-haskell-operators
-
-module Hydra.Haskell.Serde where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Haskell.Operators as Operators
-import qualified Hydra.Haskell.Syntax as Syntax
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Convert a pattern-matching alternative to an AST expression
-alternativeToExpr :: Syntax.Alternative -> Ast.Expr
-alternativeToExpr alt =
-    Serialization.structuralSpaceSep [
-      patternToExpr (Syntax.alternativePattern alt),
-      (Serialization.cst "->"),
-      (caseRhsToExpr (Syntax.alternativeRhs alt))]
--- | Convert a function application expression to an AST expression
-applicationExpressionToExpr :: Syntax.ApplicationExpression -> Ast.Expr
-applicationExpressionToExpr app =
-    Serialization.ifx Operators.appOp (expressionToExpr (Syntax.applicationExpressionFunction app)) (expressionToExpr (Syntax.applicationExpressionArgument app))
--- | Convert an application pattern to an AST expression
-applicationPatternToExpr :: Syntax.ApplicationPattern -> Ast.Expr
-applicationPatternToExpr appPat =
-
-      let name = Syntax.applicationPatternName appPat
-          pats = Syntax.applicationPatternArgs appPat
-      in (Serialization.spaceSep (Lists.cons (nameToExpr name) (Lists.map patternToExpr pats)))
--- | Convert a type class assertion to an AST expression
-assertionToExpr :: Syntax.Assertion -> Ast.Expr
-assertionToExpr sert =
-    case sert of
-      Syntax.AssertionClass v0 -> classAssertionToExpr v0
-      Syntax.AssertionTuple v0 -> Serialization.parenList False (Lists.map assertionToExpr v0)
--- | Convert a case expression to an AST expression
-caseExpressionToExpr :: Syntax.CaseExpression -> Ast.Expr
-caseExpressionToExpr caseExpr =
-
-      let cs = Syntax.caseExpressionCase caseExpr
-          alts = Syntax.caseExpressionAlternatives caseExpr
-          ofOp =
-                  Ast.Op {
-                    Ast.opSymbol = (Ast.Symbol "of"),
-                    Ast.opPadding = Ast.Padding {
-                      Ast.paddingLeft = Ast.WsSpace,
-                      Ast.paddingRight = (Ast.WsBreakAndIndent "  ")},
-                    Ast.opPrecedence = (Ast.Precedence 0),
-                    Ast.opAssociativity = Ast.AssociativityNone}
-          lhs =
-                  Serialization.spaceSep [
-                    Serialization.cst "case",
-                    (expressionToExpr cs)]
-          rhs = Serialization.newlineSep (Lists.map alternativeToExpr alts)
-      in (Serialization.ifx ofOp lhs rhs)
--- | Convert a case right-hand side to an AST expression
-caseRhsToExpr :: Syntax.CaseRhs -> Ast.Expr
-caseRhsToExpr rhs = expressionToExpr (Syntax.unCaseRhs rhs)
--- | Convert a class assertion to an AST expression
-classAssertionToExpr :: Syntax.ClassAssertion -> Ast.Expr
-classAssertionToExpr clsAsrt =
-
-      let name = Syntax.classAssertionName clsAsrt
-          types = Syntax.classAssertionTypes clsAsrt
-      in (Serialization.spaceSep (Lists.cons (nameToExpr name) [
-        Serialization.commaSep Serialization.halfBlockStyle (Lists.map typeToExpr types)]))
--- | Convert a record construction expression to an AST expression
-constructRecordExpressionToExpr :: Syntax.ConstructRecordExpression -> Ast.Expr
-constructRecordExpressionToExpr constructRecord =
-
-      let name = Syntax.constructRecordExpressionName constructRecord
-          updates = Syntax.constructRecordExpressionFields constructRecord
-          fromUpdate =
-                  \update ->
-                    let fn = Syntax.fieldUpdateName update
-                        val = Syntax.fieldUpdateValue update
-                    in (Serialization.ifx Operators.defineOp (nameToExpr fn) (expressionToExpr val))
-          body = Serialization.commaSep Serialization.halfBlockStyle (Lists.map fromUpdate updates)
-      in (Serialization.spaceSep (Lists.cons (nameToExpr name) [
-        Serialization.brackets Serialization.curlyBraces Serialization.halfBlockStyle body]))
--- | Convert a data constructor to an AST expression
-constructorToExpr :: Syntax.Constructor -> Ast.Expr
-constructorToExpr cons =
-    case cons of
-      Syntax.ConstructorOrdinary v0 ->
-        let name = Syntax.ordinaryConstructorName v0
-            types = Syntax.ordinaryConstructorFields v0
-        in (Serialization.spaceSep (Lists.cons (nameToExpr name) [
-          Serialization.spaceSep (Lists.map typeToExpr types)]))
-      Syntax.ConstructorRecord v0 ->
-        let name = Syntax.recordConstructorName v0
-            fields = Syntax.recordConstructorFields v0
-        in (Serialization.spaceSep (Lists.cons (nameToExpr name) [
-          Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map fieldWithCommentsToExpr fields)]))
--- | Convert a data constructor with comments to an AST expression
-constructorWithCommentsToExpr :: Syntax.ConstructorWithComments -> Ast.Expr
-constructorWithCommentsToExpr consWithComments =
-
-      let body = Syntax.constructorWithCommentsBody consWithComments
-          mc = Syntax.constructorWithCommentsComments consWithComments
-      in (Maybes.maybe (constructorToExpr body) (\c -> Serialization.newlineSep (Lists.cons (Serialization.cst (toHaskellComments c)) [
-        constructorToExpr body])) mc)
--- | Convert a data/newtype keyword to an AST expression
-dataOrNewtypeToExpr :: Syntax.DataOrNewtype -> Ast.Expr
-dataOrNewtypeToExpr kw =
-    case kw of
-      Syntax.DataOrNewtypeData -> Serialization.cst "data"
-      Syntax.DataOrNewtypeNewtype -> Serialization.cst "newtype"
--- | Convert a declaration head to an AST expression
-declarationHeadToExpr :: Syntax.DeclarationHead -> Ast.Expr
-declarationHeadToExpr hd =
-    case hd of
-      Syntax.DeclarationHeadApplication v0 ->
-        let fun = Syntax.applicationDeclarationHeadFunction v0
-            op = Syntax.applicationDeclarationHeadOperand v0
-        in (Serialization.spaceSep (Lists.cons (declarationHeadToExpr fun) [
-          variableToExpr op]))
-      Syntax.DeclarationHeadSimple v0 -> nameToExpr v0
--- | Convert a declaration to an AST expression
-declarationToExpr :: Syntax.Declaration -> Ast.Expr
-declarationToExpr decl =
-    case decl of
-      Syntax.DeclarationData v0 ->
-        let kw = Syntax.dataDeclarationKeyword v0
-            hd = Syntax.dataDeclarationHead v0
-            cons = Syntax.dataDeclarationConstructors v0
-            deriv = Syntax.dataDeclarationDeriving v0
-            derivCat = Lists.concat (Lists.map Syntax.unDeriving deriv)
-            constructors = Serialization.orSep Serialization.halfBlockStyle (Lists.map constructorWithCommentsToExpr cons)
-            derivingClause =
-                    Logic.ifElse (Lists.null derivCat) [] [
-                      Serialization.spaceSep (Lists.cons (Serialization.cst "deriving") [
-                        Serialization.parenList False (Lists.map nameToExpr derivCat)])]
-            mainParts =
-                    [
-                      Serialization.spaceSep (Lists.cons (dataOrNewtypeToExpr kw) (Lists.cons (declarationHeadToExpr hd) [
-                        Serialization.cst "="])),
-                      constructors]
-        in (Serialization.indentBlock (Lists.concat2 mainParts derivingClause))
-      Syntax.DeclarationType v0 ->
-        let hd = Syntax.typeDeclarationName v0
-            typ = Syntax.typeDeclarationType v0
-        in (Serialization.spaceSep (Lists.cons (Serialization.cst "type") (Lists.cons (declarationHeadToExpr hd) (Lists.cons (Serialization.cst "=") [
-          typeToExpr typ]))))
-      Syntax.DeclarationValueBinding v0 -> valueBindingToExpr v0
-      Syntax.DeclarationTypedBinding v0 ->
-        let typeSig = Syntax.typedBindingTypeSignature v0
-            vb = Syntax.typedBindingValueBinding v0
-            name = Syntax.typeSignatureName typeSig
-            htype = Syntax.typeSignatureType typeSig
-        in (Serialization.newlineSep (Lists.cons (Serialization.structuralSpaceSep [
-          nameToExpr name,
-          (Serialization.cst "::"),
-          (typeToExpr htype)]) [
-          valueBindingToExpr vb]))
--- | Convert a declaration with comments to an AST expression
-declarationWithCommentsToExpr :: Syntax.DeclarationWithComments -> Ast.Expr
-declarationWithCommentsToExpr declWithComments =
-
-      let body = Syntax.declarationWithCommentsBody declWithComments
-          mc = Syntax.declarationWithCommentsComments declWithComments
-      in (Maybes.maybe (declarationToExpr body) (\c -> Serialization.newlineSep (Lists.cons (Serialization.cst (toHaskellComments c)) [
-        declarationToExpr body])) mc)
--- | Convert a Haskell expression to an AST expression
-expressionToExpr :: Syntax.Expression -> Ast.Expr
-expressionToExpr expr =
-    case expr of
-      Syntax.ExpressionApplication v0 -> applicationExpressionToExpr v0
-      Syntax.ExpressionCase v0 -> caseExpressionToExpr v0
-      Syntax.ExpressionConstructRecord v0 -> constructRecordExpressionToExpr v0
-      Syntax.ExpressionDo v0 -> Serialization.indentBlock (Lists.cons (Serialization.cst "do") (Lists.map statementToExpr v0))
-      Syntax.ExpressionIf v0 -> ifExpressionToExpr v0
-      Syntax.ExpressionLiteral v0 -> literalToExpr v0
-      Syntax.ExpressionLambda v0 -> Serialization.parenthesize (lambdaExpressionToExpr v0)
-      Syntax.ExpressionLet v0 ->
-        let bindings = Syntax.letExpressionBindings v0
-            inner = Syntax.letExpressionInner v0
-            encodeBinding = \binding -> Serialization.indentSubsequentLines "    " (localBindingToExpr binding)
-        in (Serialization.indentBlock (Lists.cons (Serialization.cst "") (Lists.cons (Serialization.spaceSep (Lists.cons (Serialization.cst "let") [
-          Serialization.customIndentBlock "    " (Lists.map encodeBinding bindings)])) [
-          Serialization.spaceSep (Lists.cons (Serialization.cst "in") [
-            expressionToExpr inner])])))
-      Syntax.ExpressionList v0 -> Serialization.bracketList Serialization.halfBlockStyle (Lists.map expressionToExpr v0)
-      Syntax.ExpressionParens v0 -> Serialization.parenthesize (expressionToExpr v0)
-      Syntax.ExpressionTuple v0 -> Serialization.parenList False (Lists.map expressionToExpr v0)
-      Syntax.ExpressionVariable v0 -> nameToExpr v0
--- | Convert a field declaration to an AST expression
-fieldToExpr :: Syntax.Field -> Ast.Expr
-fieldToExpr field =
-
-      let name = Syntax.fieldName field
-          typ = Syntax.fieldType field
-      in (Serialization.spaceSep (Lists.cons (nameToExpr name) (Lists.cons (Serialization.cst "::") [
-        typeToExpr typ])))
--- | Convert a field with comments to an AST expression
-fieldWithCommentsToExpr :: Syntax.FieldWithComments -> Ast.Expr
-fieldWithCommentsToExpr fieldWithComments =
-
-      let field = Syntax.fieldWithCommentsField fieldWithComments
-          mc = Syntax.fieldWithCommentsComments fieldWithComments
-      in (Maybes.maybe (fieldToExpr field) (\c -> Serialization.newlineSep (Lists.cons (Serialization.cst (toHaskellComments c)) [
-        fieldToExpr field])) mc)
--- | Convert an if-then-else expression to an AST expression
-ifExpressionToExpr :: Syntax.IfExpression -> Ast.Expr
-ifExpressionToExpr ifExpr =
-
-      let eif = Syntax.ifExpressionCondition ifExpr
-          ethen = Syntax.ifExpressionThen ifExpr
-          eelse = Syntax.ifExpressionElse ifExpr
-          ifOp =
-                  Ast.Op {
-                    Ast.opSymbol = (Ast.Symbol ""),
-                    Ast.opPadding = Ast.Padding {
-                      Ast.paddingLeft = Ast.WsNone,
-                      Ast.paddingRight = (Ast.WsBreakAndIndent "  ")},
-                    Ast.opPrecedence = (Ast.Precedence 0),
-                    Ast.opAssociativity = Ast.AssociativityNone}
-          body =
-                  Serialization.newlineSep (Lists.cons (Serialization.spaceSep (Lists.cons (Serialization.cst "then") [
-                    expressionToExpr ethen])) [
-                    Serialization.spaceSep (Lists.cons (Serialization.cst "else") [
-                      expressionToExpr eelse])])
-      in (Serialization.ifx ifOp (Serialization.spaceSep (Lists.cons (Serialization.cst "if") [
-        expressionToExpr eif])) body)
--- | Convert an import/export specification to an AST expression
-importExportSpecToExpr :: Syntax.ImportExportSpec -> Ast.Expr
-importExportSpecToExpr spec = nameToExpr (Syntax.importExportSpecName spec)
--- | Convert an import statement to an AST expression
-importToExpr :: Syntax.Import -> Ast.Expr
-importToExpr import_ =
-
-      let qual = Syntax.importQualified import_
-          modName = Syntax.importModule import_
-          mod = Syntax.importAs import_
-          mspec = Syntax.importSpec import_
-          name = Syntax.unModuleName modName
-          hidingSec =
-                  \spec -> case spec of
-                    Syntax.SpecImportHiding v0 -> Serialization.spaceSep (Lists.cons (Serialization.cst "hiding ") [
-                      Serialization.parens (Serialization.commaSep Serialization.inlineStyle (Lists.map importExportSpecToExpr v0))])
-          parts =
-                  Maybes.cat [
-                    Just (Serialization.cst "import"),
-                    (Logic.ifElse qual (Just (Serialization.cst "qualified")) Nothing),
-                    (Just (Serialization.cst name)),
-                    (Maybes.map (\m -> Serialization.cst (Strings.cat2 "as " (Syntax.unModuleName m))) mod),
-                    (Maybes.map hidingSec mspec)]
-      in (Serialization.spaceSep parts)
--- | Convert a lambda expression to an AST expression
-lambdaExpressionToExpr :: Syntax.LambdaExpression -> Ast.Expr
-lambdaExpressionToExpr lambdaExpr =
-
-      let bindings = Syntax.lambdaExpressionBindings lambdaExpr
-          inner = Syntax.lambdaExpressionInner lambdaExpr
-          head = Serialization.spaceSep (Lists.map patternToExpr bindings)
-          body = expressionToExpr inner
-      in (Serialization.ifx Operators.lambdaOp (Serialization.prefix "\\" head) body)
--- | Convert a literal value to an AST expression
-literalToExpr :: Syntax.Literal -> Ast.Expr
-literalToExpr lit =
-
-      let parensIfNeg =
-              \b -> \e -> Logic.ifElse b (Strings.cat [
-                "(",
-                e,
-                ")"]) e
-          showFloat =
-                  \showFn -> \v ->
-                    let raw = showFn v
-                    in (Logic.ifElse (Equality.equal raw "NaN") "(0/0)" (Logic.ifElse (Equality.equal raw "Infinity") "(1/0)" (Logic.ifElse (Equality.equal raw "-Infinity") "(-(1/0))" (parensIfNeg (Equality.equal (Maybes.fromMaybe 0 (Strings.maybeCharAt 0 raw)) 45) raw))))
-      in (Serialization.cst (case lit of
-        Syntax.LiteralChar v0 -> Literals.showString (Literals.showUint16 v0)
-        Syntax.LiteralDouble v0 -> showFloat (\v -> Literals.showFloat64 v) v0
-        Syntax.LiteralFloat v0 -> showFloat (\v -> Literals.showFloat32 v) v0
-        Syntax.LiteralInt v0 -> parensIfNeg (Equality.lt v0 0) (Literals.showInt32 v0)
-        Syntax.LiteralInteger v0 -> parensIfNeg (Equality.lt v0 0) (Literals.showBigint v0)
-        Syntax.LiteralString v0 -> Literals.showString v0))
--- | Convert a local binding to an AST expression
-localBindingToExpr :: Syntax.LocalBinding -> Ast.Expr
-localBindingToExpr binding =
-    case binding of
-      Syntax.LocalBindingSignature v0 -> typeSignatureToExpr v0
-      Syntax.LocalBindingValue v0 -> valueBindingToExpr v0
--- | Convert a module head to an AST expression
-moduleHeadToExpr :: Syntax.ModuleHead -> Ast.Expr
-moduleHeadToExpr moduleHead =
-
-      let mc = Syntax.moduleHeadComments moduleHead
-          modName = Syntax.moduleHeadName moduleHead
-          mname = Syntax.unModuleName modName
-          head =
-                  Serialization.spaceSep (Lists.cons (Serialization.cst "module") (Lists.cons (Serialization.cst mname) [
-                    Serialization.cst "where"]))
-      in (Maybes.maybe head (\c -> Serialization.newlineSep (Lists.cons (Serialization.cst (toHaskellComments c)) (Lists.cons (Serialization.cst "") [
-        head]))) mc)
--- | Convert a Haskell module to an AST expression
-moduleToExpr :: Syntax.Module -> Ast.Expr
-moduleToExpr module_ =
-
-      let mh = Syntax.moduleHead module_
-          imports = Syntax.moduleImports module_
-          decls = Syntax.moduleDeclarations module_
-          warning = [
-                Serialization.cst (toSimpleComments Constants.warningAutoGeneratedFile)]
-          headerLine = Maybes.maybe [] (\h -> [
-                moduleHeadToExpr h]) mh
-          declLines = Lists.map declarationWithCommentsToExpr decls
-          importLines = Logic.ifElse (Lists.null imports) [] [
-                Serialization.newlineSep (Lists.map importToExpr imports)]
-      in (Serialization.doubleNewlineSep (Lists.concat [
-        warning,
-        headerLine,
-        importLines,
-        declLines]))
--- | Convert a Haskell name to an AST expression
-nameToExpr :: Syntax.Name -> Ast.Expr
-nameToExpr name =
-    Serialization.cst (case name of
-      Syntax.NameImplicit v0 -> Strings.cat2 "?" (writeQualifiedName v0)
-      Syntax.NameNormal v0 -> writeQualifiedName v0
-      Syntax.NameParens v0 -> Strings.cat [
-        "(",
-        (writeQualifiedName v0),
-        ")"])
--- | Convert a pattern to an AST expression
-patternToExpr :: Syntax.Pattern -> Ast.Expr
-patternToExpr pat =
-    case pat of
-      Syntax.PatternApplication v0 -> applicationPatternToExpr v0
-      Syntax.PatternList v0 -> Serialization.bracketList Serialization.halfBlockStyle (Lists.map patternToExpr v0)
-      Syntax.PatternLiteral v0 -> literalToExpr v0
-      Syntax.PatternName v0 -> nameToExpr v0
-      Syntax.PatternParens v0 -> Serialization.parenthesize (patternToExpr v0)
-      Syntax.PatternTuple v0 -> Serialization.parenList False (Lists.map patternToExpr v0)
-      Syntax.PatternWildcard -> Serialization.cst "_"
--- | Convert a right-hand side to an AST expression
-rightHandSideToExpr :: Syntax.RightHandSide -> Ast.Expr
-rightHandSideToExpr rhs = expressionToExpr (Syntax.unRightHandSide rhs)
--- | Convert a statement to an AST expression
-statementToExpr :: Syntax.Statement -> Ast.Expr
-statementToExpr stmt = expressionToExpr (Syntax.unStatement stmt)
--- | Convert a string to Haddock documentation comments. Empty source lines emit `-- |` (no trailing space) so blank doc lines don't carry trailing whitespace into the generated file.
-toHaskellComments :: String -> String
-toHaskellComments c =
-    Strings.intercalate "\n" (Lists.map (\s -> Logic.ifElse (Equality.equal s "") "-- |" (Strings.cat2 "-- | " s)) (Strings.lines c))
--- | Convert a string to simple line comments. Empty source lines emit `--` (no trailing space) for the same reason as toHaskellComments.
-toSimpleComments :: String -> String
-toSimpleComments c =
-    Strings.intercalate "\n" (Lists.map (\s -> Logic.ifElse (Equality.equal s "") "--" (Strings.cat2 "-- " s)) (Strings.lines c))
--- | Convert a type signature to an AST expression
-typeSignatureToExpr :: Syntax.TypeSignature -> Ast.Expr
-typeSignatureToExpr typeSig =
-
-      let name = Syntax.typeSignatureName typeSig
-          typ = Syntax.typeSignatureType typeSig
-          nameExpr = nameToExpr name
-          typeExpr = typeToExpr typ
-          inlineSig =
-                  Serialization.structuralSpaceSep [
-                    nameExpr,
-                    (Serialization.cst "::"),
-                    typeExpr]
-      in (Logic.ifElse (Equality.gt (Serialization.expressionLength inlineSig) 120) (Serialization.newlineSep [
-        Serialization.spaceSep [
-          nameExpr,
-          (Serialization.cst "::")],
-        (Serialization.tabIndent typeExpr)]) inlineSig)
--- | Convert a Haskell type to an AST expression
-typeToExpr :: Syntax.Type -> Ast.Expr
-typeToExpr htype =
-    case htype of
-      Syntax.TypeApplication v0 ->
-        let lhs = Syntax.applicationTypeContext v0
-            rhs = Syntax.applicationTypeArgument v0
-        in (Serialization.ifx Operators.appOp (typeToExpr lhs) (typeToExpr rhs))
-      Syntax.TypeCtx v0 ->
-        let ctx = Syntax.contextTypeCtx v0
-            typ = Syntax.contextTypeType v0
-        in (Serialization.ifx Operators.assertOp (assertionToExpr ctx) (typeToExpr typ))
-      Syntax.TypeFunction v0 ->
-        let dom = Syntax.functionTypeDomain v0
-            cod = Syntax.functionTypeCodomain v0
-        in (Serialization.ifx Operators.arrowOp (typeToExpr dom) (typeToExpr cod))
-      Syntax.TypeList v0 -> Serialization.bracketList Serialization.inlineStyle [
-        typeToExpr v0]
-      Syntax.TypeTuple v0 -> Serialization.parenList False (Lists.map typeToExpr v0)
-      Syntax.TypeVariable v0 -> nameToExpr v0
--- | Convert a value binding to an AST expression
-valueBindingToExpr :: Syntax.ValueBinding -> Ast.Expr
-valueBindingToExpr vb =
-    case vb of
-      Syntax.ValueBindingSimple v0 ->
-        let pat = Syntax.simpleValueBindingPattern v0
-            rhs = Syntax.simpleValueBindingRhs v0
-            local = Syntax.simpleValueBindingLocalBindings v0
-            lhsExpr = patternToExpr pat
-            rhsExpr = rightHandSideToExpr rhs
-            inlineBody =
-                    Serialization.structuralSpaceSep [
-                      lhsExpr,
-                      (Serialization.cst "="),
-                      rhsExpr]
-            body =
-                    Logic.ifElse (Equality.gt (Serialization.expressionLength inlineBody) 120) (Serialization.newlineSep [
-                      Serialization.spaceSep [
-                        lhsExpr,
-                        (Serialization.cst "=")],
-                      (Serialization.tabIndent rhsExpr)]) inlineBody
-        in (Maybes.maybe body (\localBindings ->
-          let bindings = Syntax.unLocalBindings localBindings
-          in (Serialization.indentBlock (Lists.cons body [
-            Serialization.indentBlock (Lists.cons (Serialization.cst "where") (Lists.map localBindingToExpr bindings))]))) local)
--- | Convert a type variable to an AST expression
-variableToExpr :: Syntax.Variable -> Ast.Expr
-variableToExpr variable = nameToExpr (Syntax.unVariable variable)
--- | Write a qualified name as a string
-writeQualifiedName :: Syntax.QualifiedName -> String
-writeQualifiedName qname =
-
-      let qualifiers = Syntax.qualifiedNameQualifiers qname
-          unqual = Syntax.qualifiedNameUnqualified qname
-          h = \namePart -> Syntax.unNamePart namePart
-          allParts = Lists.concat2 (Lists.map h qualifiers) [
-                h unqual]
-      in (Strings.intercalate "." allParts)
diff --git a/src/main/haskell/Hydra/Haskell/Syntax.hs b/src/main/haskell/Hydra/Haskell/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Syntax.hs
+++ /dev/null
@@ -1,811 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A Haskell syntax model, loosely based on Language.Haskell.Tools.AST
-
-module Hydra.Haskell.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
--- | A pattern-matching alternative
-data Alternative =
-  Alternative {
-    -- | The pattern to match
-    alternativePattern :: Pattern,
-    -- | The right-hand side of the alternative
-    alternativeRhs :: CaseRhs,
-    -- | Optional local bindings
-    alternativeBinds :: (Maybe LocalBindings)}
-  deriving (Eq, Ord, Read, Show)
-_Alternative = Core.Name "hydra.haskell.syntax.Alternative"
-_Alternative_pattern = Core.Name "pattern"
-_Alternative_rhs = Core.Name "rhs"
-_Alternative_binds = Core.Name "binds"
--- | A type assertion
-data Assertion =
-  -- | A class assertion
-  AssertionClass ClassAssertion |
-  -- | A tuple of assertions
-  AssertionTuple [Assertion]
-  deriving (Eq, Ord, Read, Show)
-_Assertion = Core.Name "hydra.haskell.syntax.Assertion"
-_Assertion_class = Core.Name "class"
-_Assertion_tuple = Core.Name "tuple"
--- | A class assertion
-data ClassAssertion =
-  ClassAssertion {
-    -- | The name of the class
-    classAssertionName :: Name,
-    -- | The types to which the class is applied
-    classAssertionTypes :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-_ClassAssertion = Core.Name "hydra.haskell.syntax.ClassAssertion"
-_ClassAssertion_name = Core.Name "name"
-_ClassAssertion_types = Core.Name "types"
--- | The right-hand side of a pattern-matching alternative
-newtype CaseRhs =
-  CaseRhs {
-    unCaseRhs :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_CaseRhs = Core.Name "hydra.haskell.syntax.CaseRhs"
--- | A data constructor
-data Constructor =
-  -- | An ordinary (positional) constructor
-  ConstructorOrdinary OrdinaryConstructor |
-  -- | A record constructor
-  ConstructorRecord RecordConstructor
-  deriving (Eq, Ord, Read, Show)
-_Constructor = Core.Name "hydra.haskell.syntax.Constructor"
-_Constructor_ordinary = Core.Name "ordinary"
-_Constructor_record = Core.Name "record"
--- | An ordinary (positional) data constructor
-data OrdinaryConstructor =
-  OrdinaryConstructor {
-    -- | The name of the constructor
-    ordinaryConstructorName :: Name,
-    -- | The types of the positional fields
-    ordinaryConstructorFields :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-_OrdinaryConstructor = Core.Name "hydra.haskell.syntax.OrdinaryConstructor"
-_OrdinaryConstructor_name = Core.Name "name"
-_OrdinaryConstructor_fields = Core.Name "fields"
--- | A record-style data constructor
-data RecordConstructor =
-  RecordConstructor {
-    -- | The name of the constructor
-    recordConstructorName :: Name,
-    -- | The named fields of the record
-    recordConstructorFields :: [FieldWithComments]}
-  deriving (Eq, Ord, Read, Show)
-_RecordConstructor = Core.Name "hydra.haskell.syntax.RecordConstructor"
-_RecordConstructor_name = Core.Name "name"
-_RecordConstructor_fields = Core.Name "fields"
--- | A data constructor together with any comments
-data ConstructorWithComments =
-  ConstructorWithComments {
-    -- | The constructor
-    constructorWithCommentsBody :: Constructor,
-    -- | Optional comments
-    constructorWithCommentsComments :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_ConstructorWithComments = Core.Name "hydra.haskell.syntax.ConstructorWithComments"
-_ConstructorWithComments_body = Core.Name "body"
-_ConstructorWithComments_comments = Core.Name "comments"
--- | A data type declaration
-data DataDeclaration =
-  DataDeclaration {
-    -- | The 'data' or 'newtype' keyword
-    dataDeclarationKeyword :: DataOrNewtype,
-    -- | Type class constraints
-    dataDeclarationContext :: [Assertion],
-    -- | The declaration head
-    dataDeclarationHead :: DeclarationHead,
-    -- | The data constructors
-    dataDeclarationConstructors :: [ConstructorWithComments],
-    -- | Derived type class instances
-    dataDeclarationDeriving :: [Deriving]}
-  deriving (Eq, Ord, Read, Show)
-_DataDeclaration = Core.Name "hydra.haskell.syntax.DataDeclaration"
-_DataDeclaration_keyword = Core.Name "keyword"
-_DataDeclaration_context = Core.Name "context"
-_DataDeclaration_head = Core.Name "head"
-_DataDeclaration_constructors = Core.Name "constructors"
-_DataDeclaration_deriving = Core.Name "deriving"
--- | The 'data' versus 'newtype keyword
-data DataOrNewtype =
-  DataOrNewtypeData |
-  DataOrNewtypeNewtype
-  deriving (Eq, Ord, Read, Show)
-_DataOrNewtype = Core.Name "hydra.haskell.syntax.DataOrNewtype"
-_DataOrNewtype_data = Core.Name "data"
-_DataOrNewtype_newtype = Core.Name "newtype"
--- | A data declaration together with any comments
-data DeclarationWithComments =
-  DeclarationWithComments {
-    -- | The declaration
-    declarationWithCommentsBody :: Declaration,
-    -- | Optional comments
-    declarationWithCommentsComments :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_DeclarationWithComments = Core.Name "hydra.haskell.syntax.DeclarationWithComments"
-_DeclarationWithComments_body = Core.Name "body"
-_DeclarationWithComments_comments = Core.Name "comments"
--- | A data or value declaration
-data Declaration =
-  -- | A data type declaration
-  DeclarationData DataDeclaration |
-  -- | A type synonym declaration
-  DeclarationType TypeDeclaration |
-  -- | A value binding
-  DeclarationValueBinding ValueBinding |
-  -- | A typed binding
-  DeclarationTypedBinding TypedBinding
-  deriving (Eq, Ord, Read, Show)
-_Declaration = Core.Name "hydra.haskell.syntax.Declaration"
-_Declaration_data = Core.Name "data"
-_Declaration_type = Core.Name "type"
-_Declaration_valueBinding = Core.Name "valueBinding"
-_Declaration_typedBinding = Core.Name "typedBinding"
--- | The left-hand side of a declaration
-data DeclarationHead =
-  -- | An application-style declaration head
-  DeclarationHeadApplication ApplicationDeclarationHead |
-  -- | A parenthesized declaration head
-  DeclarationHeadParens DeclarationHead |
-  -- | A simple name
-  DeclarationHeadSimple Name
-  deriving (Eq, Ord, Read, Show)
-_DeclarationHead = Core.Name "hydra.haskell.syntax.DeclarationHead"
-_DeclarationHead_application = Core.Name "application"
-_DeclarationHead_parens = Core.Name "parens"
-_DeclarationHead_simple = Core.Name "simple"
--- | An application-style declaration head
-data ApplicationDeclarationHead =
-  ApplicationDeclarationHead {
-    -- | The function being applied
-    applicationDeclarationHeadFunction :: DeclarationHead,
-    -- | The type variable operand
-    applicationDeclarationHeadOperand :: Variable}
-  deriving (Eq, Ord, Read, Show)
-_ApplicationDeclarationHead = Core.Name "hydra.haskell.syntax.ApplicationDeclarationHead"
-_ApplicationDeclarationHead_function = Core.Name "function"
-_ApplicationDeclarationHead_operand = Core.Name "operand"
--- | A 'deriving' statement
-newtype Deriving =
-  Deriving {
-    unDeriving :: [Name]}
-  deriving (Eq, Ord, Read, Show)
-_Deriving = Core.Name "hydra.haskell.syntax.Deriving"
--- | An export statement
-data Export =
-  -- | An exported declaration
-  ExportDeclaration ImportExportSpec |
-  -- | An exported module
-  ExportModule ModuleName
-  deriving (Eq, Ord, Read, Show)
-_Export = Core.Name "hydra.haskell.syntax.Export"
-_Export_declaration = Core.Name "declaration"
-_Export_module = Core.Name "module"
--- | A data expression
-data Expression =
-  -- | A function application
-  ExpressionApplication ApplicationExpression |
-  -- | A case expression
-  ExpressionCase CaseExpression |
-  -- | A record constructor expression
-  ExpressionConstructRecord ConstructRecordExpression |
-  -- | A 'do' expression
-  ExpressionDo [Statement] |
-  -- | An 'if' expression
-  ExpressionIf IfExpression |
-  -- | An infix application
-  ExpressionInfixApplication InfixApplicationExpression |
-  -- | A literal value
-  ExpressionLiteral Literal |
-  -- | A lambda expression
-  ExpressionLambda LambdaExpression |
-  -- | A left section expression
-  ExpressionLeftSection SectionExpression |
-  -- | A 'let' expression
-  ExpressionLet LetExpression |
-  -- | A list expression
-  ExpressionList [Expression] |
-  -- | A parenthesized expression
-  ExpressionParens Expression |
-  -- | A prefix application
-  ExpressionPrefixApplication PrefixApplicationExpression |
-  -- | A right section expression
-  ExpressionRightSection SectionExpression |
-  -- | A tuple expression
-  ExpressionTuple [Expression] |
-  -- | A type signature expression
-  ExpressionTypeSignature TypeSignatureExpression |
-  -- | A record update expression
-  ExpressionUpdateRecord UpdateRecordExpression |
-  -- | A variable reference
-  ExpressionVariable Name
-  deriving (Eq, Ord, Read, Show)
-_Expression = Core.Name "hydra.haskell.syntax.Expression"
-_Expression_application = Core.Name "application"
-_Expression_case = Core.Name "case"
-_Expression_constructRecord = Core.Name "constructRecord"
-_Expression_do = Core.Name "do"
-_Expression_if = Core.Name "if"
-_Expression_infixApplication = Core.Name "infixApplication"
-_Expression_literal = Core.Name "literal"
-_Expression_lambda = Core.Name "lambda"
-_Expression_leftSection = Core.Name "leftSection"
-_Expression_let = Core.Name "let"
-_Expression_list = Core.Name "list"
-_Expression_parens = Core.Name "parens"
-_Expression_prefixApplication = Core.Name "prefixApplication"
-_Expression_rightSection = Core.Name "rightSection"
-_Expression_tuple = Core.Name "tuple"
-_Expression_typeSignature = Core.Name "typeSignature"
-_Expression_updateRecord = Core.Name "updateRecord"
-_Expression_variable = Core.Name "variable"
--- | An application expression
-data ApplicationExpression =
-  ApplicationExpression {
-    -- | The function being applied
-    applicationExpressionFunction :: Expression,
-    -- | The argument
-    applicationExpressionArgument :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_ApplicationExpression = Core.Name "hydra.haskell.syntax.ApplicationExpression"
-_ApplicationExpression_function = Core.Name "function"
-_ApplicationExpression_argument = Core.Name "argument"
--- | A case expression
-data CaseExpression =
-  CaseExpression {
-    -- | The expression being matched
-    caseExpressionCase :: Expression,
-    -- | The pattern-matching alternatives
-    caseExpressionAlternatives :: [Alternative]}
-  deriving (Eq, Ord, Read, Show)
-_CaseExpression = Core.Name "hydra.haskell.syntax.CaseExpression"
-_CaseExpression_case = Core.Name "case"
-_CaseExpression_alternatives = Core.Name "alternatives"
--- | A record constructor expression
-data ConstructRecordExpression =
-  ConstructRecordExpression {
-    -- | The constructor name
-    constructRecordExpressionName :: Name,
-    -- | The field assignments
-    constructRecordExpressionFields :: [FieldUpdate]}
-  deriving (Eq, Ord, Read, Show)
-_ConstructRecordExpression = Core.Name "hydra.haskell.syntax.ConstructRecordExpression"
-_ConstructRecordExpression_name = Core.Name "name"
-_ConstructRecordExpression_fields = Core.Name "fields"
--- | An 'if' expression
-data IfExpression =
-  IfExpression {
-    -- | The condition expression
-    ifExpressionCondition :: Expression,
-    -- | The 'then' branch
-    ifExpressionThen :: Expression,
-    -- | The 'else' branch
-    ifExpressionElse :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_IfExpression = Core.Name "hydra.haskell.syntax.IfExpression"
-_IfExpression_condition = Core.Name "condition"
-_IfExpression_then = Core.Name "then"
-_IfExpression_else = Core.Name "else"
--- | An infix application expression
-data InfixApplicationExpression =
-  InfixApplicationExpression {
-    -- | The left-hand operand
-    infixApplicationExpressionLhs :: Expression,
-    -- | The infix operator
-    infixApplicationExpressionOperator :: Operator,
-    -- | The right-hand operand
-    infixApplicationExpressionRhs :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_InfixApplicationExpression = Core.Name "hydra.haskell.syntax.InfixApplicationExpression"
-_InfixApplicationExpression_lhs = Core.Name "lhs"
-_InfixApplicationExpression_operator = Core.Name "operator"
-_InfixApplicationExpression_rhs = Core.Name "rhs"
--- | A lambda expression
-data LambdaExpression =
-  LambdaExpression {
-    -- | The patterns binding parameters
-    lambdaExpressionBindings :: [Pattern],
-    -- | The body of the lambda
-    lambdaExpressionInner :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_LambdaExpression = Core.Name "hydra.haskell.syntax.LambdaExpression"
-_LambdaExpression_bindings = Core.Name "bindings"
-_LambdaExpression_inner = Core.Name "inner"
--- | A 'let' expression
-data LetExpression =
-  LetExpression {
-    -- | The local bindings
-    letExpressionBindings :: [LocalBinding],
-    -- | The body of the let expression
-    letExpressionInner :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_LetExpression = Core.Name "hydra.haskell.syntax.LetExpression"
-_LetExpression_bindings = Core.Name "bindings"
-_LetExpression_inner = Core.Name "inner"
--- | A prefix expression
-data PrefixApplicationExpression =
-  PrefixApplicationExpression {
-    -- | The prefix operator
-    prefixApplicationExpressionOperator :: Operator,
-    -- | The operand
-    prefixApplicationExpressionRhs :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_PrefixApplicationExpression = Core.Name "hydra.haskell.syntax.PrefixApplicationExpression"
-_PrefixApplicationExpression_operator = Core.Name "operator"
-_PrefixApplicationExpression_rhs = Core.Name "rhs"
--- | A section expression
-data SectionExpression =
-  SectionExpression {
-    -- | The operator
-    sectionExpressionOperator :: Operator,
-    -- | The operand
-    sectionExpressionExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_SectionExpression = Core.Name "hydra.haskell.syntax.SectionExpression"
-_SectionExpression_operator = Core.Name "operator"
-_SectionExpression_expression = Core.Name "expression"
--- | A type signature expression
-data TypeSignatureExpression =
-  TypeSignatureExpression {
-    -- | The expression being typed
-    typeSignatureExpressionInner :: Expression,
-    -- | The type signature
-    typeSignatureExpressionType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_TypeSignatureExpression = Core.Name "hydra.haskell.syntax.TypeSignatureExpression"
-_TypeSignatureExpression_inner = Core.Name "inner"
-_TypeSignatureExpression_type = Core.Name "type"
--- | An update record expression
-data UpdateRecordExpression =
-  UpdateRecordExpression {
-    -- | The record being updated
-    updateRecordExpressionInner :: Expression,
-    -- | The field updates
-    updateRecordExpressionFields :: [FieldUpdate]}
-  deriving (Eq, Ord, Read, Show)
-_UpdateRecordExpression = Core.Name "hydra.haskell.syntax.UpdateRecordExpression"
-_UpdateRecordExpression_inner = Core.Name "inner"
-_UpdateRecordExpression_fields = Core.Name "fields"
--- | A field (name/type pair)
-data Field =
-  Field {
-    -- | The field name
-    fieldName :: Name,
-    -- | The field type
-    fieldType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Field = Core.Name "hydra.haskell.syntax.Field"
-_Field_name = Core.Name "name"
-_Field_type = Core.Name "type"
--- | A field together with any comments
-data FieldWithComments =
-  FieldWithComments {
-    -- | The field
-    fieldWithCommentsField :: Field,
-    -- | Optional comments
-    fieldWithCommentsComments :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_FieldWithComments = Core.Name "hydra.haskell.syntax.FieldWithComments"
-_FieldWithComments_field = Core.Name "field"
-_FieldWithComments_comments = Core.Name "comments"
--- | A field name and value
-data FieldUpdate =
-  FieldUpdate {
-    -- | The field name
-    fieldUpdateName :: Name,
-    -- | The field value
-    fieldUpdateValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_FieldUpdate = Core.Name "hydra.haskell.syntax.FieldUpdate"
-_FieldUpdate_name = Core.Name "name"
-_FieldUpdate_value = Core.Name "value"
--- | An import statement
-data Import =
-  Import {
-    -- | Whether the import is qualified
-    importQualified :: Bool,
-    -- | The module being imported
-    importModule :: ModuleName,
-    -- | Optional alias for the module
-    importAs :: (Maybe ModuleName),
-    -- | Optional import specification
-    importSpec :: (Maybe SpecImport)}
-  deriving (Eq, Ord, Read, Show)
-_Import = Core.Name "hydra.haskell.syntax.Import"
-_Import_qualified = Core.Name "qualified"
-_Import_module = Core.Name "module"
-_Import_as = Core.Name "as"
-_Import_spec = Core.Name "spec"
--- | An import specification
-data SpecImport =
-  -- | A list of imports to include
-  SpecImportList [ImportExportSpec] |
-  -- | A list of imports to exclude
-  SpecImportHiding [ImportExportSpec]
-  deriving (Eq, Ord, Read, Show)
-_SpecImport = Core.Name "hydra.haskell.syntax.SpecImport"
-_SpecImport_list = Core.Name "list"
-_SpecImport_hiding = Core.Name "hiding"
--- | An import modifier ('pattern' or 'type')
-data ImportModifier =
-  ImportModifierPattern |
-  ImportModifierType
-  deriving (Eq, Ord, Read, Show)
-_ImportModifier = Core.Name "hydra.haskell.syntax.ImportModifier"
-_ImportModifier_pattern = Core.Name "pattern"
-_ImportModifier_type = Core.Name "type"
--- | An import or export specification
-data ImportExportSpec =
-  ImportExportSpec {
-    -- | Optional import modifier
-    importExportSpecModifier :: (Maybe ImportModifier),
-    -- | The name being imported or exported
-    importExportSpecName :: Name,
-    -- | Optional subspecification
-    importExportSpecSubspec :: (Maybe SubspecImportExportSpec)}
-  deriving (Eq, Ord, Read, Show)
-_ImportExportSpec = Core.Name "hydra.haskell.syntax.ImportExportSpec"
-_ImportExportSpec_modifier = Core.Name "modifier"
-_ImportExportSpec_name = Core.Name "name"
-_ImportExportSpec_subspec = Core.Name "subspec"
--- | A subspecification within an import/export
-data SubspecImportExportSpec =
-  -- | Import/export all
-  SubspecImportExportSpecAll |
-  -- | Import/export specific names
-  SubspecImportExportSpecList [Name]
-  deriving (Eq, Ord, Read, Show)
-_SubspecImportExportSpec = Core.Name "hydra.haskell.syntax.SubspecImportExportSpec"
-_SubspecImportExportSpec_all = Core.Name "all"
-_SubspecImportExportSpec_list = Core.Name "list"
--- | A literal value
-data Literal =
-  -- | A character literal
-  LiteralChar Int |
-  -- | A double-precision floating point literal
-  LiteralDouble Double |
-  -- | A single-precision floating point literal
-  LiteralFloat Float |
-  -- | A 32-bit integer literal
-  LiteralInt Int |
-  -- | An arbitrary-precision integer literal
-  LiteralInteger Integer |
-  -- | A string literal
-  LiteralString String
-  deriving (Eq, Ord, Read, Show)
-_Literal = Core.Name "hydra.haskell.syntax.Literal"
-_Literal_char = Core.Name "char"
-_Literal_double = Core.Name "double"
-_Literal_float = Core.Name "float"
-_Literal_int = Core.Name "int"
-_Literal_integer = Core.Name "integer"
-_Literal_string = Core.Name "string"
--- | A local binding
-data LocalBinding =
-  -- | A type signature
-  LocalBindingSignature TypeSignature |
-  -- | A value binding
-  LocalBindingValue ValueBinding
-  deriving (Eq, Ord, Read, Show)
-_LocalBinding = Core.Name "hydra.haskell.syntax.LocalBinding"
-_LocalBinding_signature = Core.Name "signature"
-_LocalBinding_value = Core.Name "value"
--- | A collection of local bindings
-newtype LocalBindings =
-  LocalBindings {
-    unLocalBindings :: [LocalBinding]}
-  deriving (Eq, Ord, Read, Show)
-_LocalBindings = Core.Name "hydra.haskell.syntax.LocalBindings"
--- | A Haskell module
-data Module =
-  Module {
-    -- | Optional module head
-    moduleHead :: (Maybe ModuleHead),
-    -- | Import statements
-    moduleImports :: [Import],
-    -- | Module declarations
-    moduleDeclarations :: [DeclarationWithComments]}
-  deriving (Eq, Ord, Read, Show)
-_Module = Core.Name "hydra.haskell.syntax.Module"
-_Module_head = Core.Name "head"
-_Module_imports = Core.Name "imports"
-_Module_declarations = Core.Name "declarations"
--- | A module head
-data ModuleHead =
-  ModuleHead {
-    -- | Optional module-level comments
-    moduleHeadComments :: (Maybe String),
-    -- | The module name
-    moduleHeadName :: ModuleName,
-    -- | Export list
-    moduleHeadExports :: [Export]}
-  deriving (Eq, Ord, Read, Show)
-_ModuleHead = Core.Name "hydra.haskell.syntax.ModuleHead"
-_ModuleHead_comments = Core.Name "comments"
-_ModuleHead_name = Core.Name "name"
-_ModuleHead_exports = Core.Name "exports"
--- | A module name
-newtype ModuleName =
-  ModuleName {
-    unModuleName :: String}
-  deriving (Eq, Ord, Read, Show)
-_ModuleName = Core.Name "hydra.haskell.syntax.ModuleName"
--- | A name
-data Name =
-  -- | An implicit name
-  NameImplicit QualifiedName |
-  -- | A normal name
-  NameNormal QualifiedName |
-  -- | A parenthesized name
-  NameParens QualifiedName
-  deriving (Eq, Ord, Read, Show)
-_Name = Core.Name "hydra.haskell.syntax.Name"
-_Name_implicit = Core.Name "implicit"
-_Name_normal = Core.Name "normal"
-_Name_parens = Core.Name "parens"
--- | A component of a qualified name
-newtype NamePart =
-  NamePart {
-    unNamePart :: String}
-  deriving (Eq, Ord, Read, Show)
-_NamePart = Core.Name "hydra.haskell.syntax.NamePart"
--- | An operator
-data Operator =
-  -- | A function used as an infix operator
-  OperatorBacktick QualifiedName |
-  -- | A normal infix operator
-  OperatorNormal QualifiedName
-  deriving (Eq, Ord, Read, Show)
-_Operator = Core.Name "hydra.haskell.syntax.Operator"
-_Operator_backtick = Core.Name "backtick"
-_Operator_normal = Core.Name "normal"
--- | A pattern
-data Pattern =
-  -- | An application pattern
-  PatternApplication ApplicationPattern |
-  -- | An 'as' pattern
-  PatternAs AsPattern |
-  -- | A list pattern
-  PatternList [Pattern] |
-  -- | A literal pattern
-  PatternLiteral Literal |
-  -- | A name pattern
-  PatternName Name |
-  -- | A parenthesized pattern
-  PatternParens Pattern |
-  -- | A record pattern
-  PatternRecord RecordPattern |
-  -- | A tuple pattern
-  PatternTuple [Pattern] |
-  -- | A typed pattern
-  PatternTyped TypedPattern |
-  -- | A wildcard pattern
-  PatternWildcard
-  deriving (Eq, Ord, Read, Show)
-_Pattern = Core.Name "hydra.haskell.syntax.Pattern"
-_Pattern_application = Core.Name "application"
-_Pattern_as = Core.Name "as"
-_Pattern_list = Core.Name "list"
-_Pattern_literal = Core.Name "literal"
-_Pattern_name = Core.Name "name"
-_Pattern_parens = Core.Name "parens"
-_Pattern_record = Core.Name "record"
-_Pattern_tuple = Core.Name "tuple"
-_Pattern_typed = Core.Name "typed"
-_Pattern_wildcard = Core.Name "wildcard"
--- | An application pattern
-data ApplicationPattern =
-  ApplicationPattern {
-    -- | The constructor name
-    applicationPatternName :: Name,
-    -- | The pattern arguments
-    applicationPatternArgs :: [Pattern]}
-  deriving (Eq, Ord, Read, Show)
-_ApplicationPattern = Core.Name "hydra.haskell.syntax.ApplicationPattern"
-_ApplicationPattern_name = Core.Name "name"
-_ApplicationPattern_args = Core.Name "args"
--- | An 'as' pattern
-data AsPattern =
-  AsPattern {
-    -- | The bound name
-    asPatternName :: Name,
-    -- | The inner pattern
-    asPatternInner :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-_AsPattern = Core.Name "hydra.haskell.syntax.AsPattern"
-_AsPattern_name = Core.Name "name"
-_AsPattern_inner = Core.Name "inner"
--- | A record pattern
-data RecordPattern =
-  RecordPattern {
-    -- | The constructor name
-    recordPatternName :: Name,
-    -- | The field patterns
-    recordPatternFields :: [PatternField]}
-  deriving (Eq, Ord, Read, Show)
-_RecordPattern = Core.Name "hydra.haskell.syntax.RecordPattern"
-_RecordPattern_name = Core.Name "name"
-_RecordPattern_fields = Core.Name "fields"
--- | A typed pattern
-data TypedPattern =
-  TypedPattern {
-    -- | The inner pattern
-    typedPatternInner :: Pattern,
-    -- | The type annotation
-    typedPatternType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_TypedPattern = Core.Name "hydra.haskell.syntax.TypedPattern"
-_TypedPattern_inner = Core.Name "inner"
-_TypedPattern_type = Core.Name "type"
--- | A pattern field
-data PatternField =
-  PatternField {
-    -- | The field name
-    patternFieldName :: Name,
-    -- | The field pattern
-    patternFieldPattern :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-_PatternField = Core.Name "hydra.haskell.syntax.PatternField"
-_PatternField_name = Core.Name "name"
-_PatternField_pattern = Core.Name "pattern"
--- | A qualified name
-data QualifiedName =
-  QualifiedName {
-    -- | The qualifier parts
-    qualifiedNameQualifiers :: [NamePart],
-    -- | The unqualified name part
-    qualifiedNameUnqualified :: NamePart}
-  deriving (Eq, Ord, Read, Show)
-_QualifiedName = Core.Name "hydra.haskell.syntax.QualifiedName"
-_QualifiedName_qualifiers = Core.Name "qualifiers"
-_QualifiedName_unqualified = Core.Name "unqualified"
--- | A right-hand side of a binding
-newtype RightHandSide =
-  RightHandSide {
-    unRightHandSide :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_RightHandSide = Core.Name "hydra.haskell.syntax.RightHandSide"
--- | A do-notation statement
-newtype Statement =
-  Statement {
-    unStatement :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Statement = Core.Name "hydra.haskell.syntax.Statement"
--- | A type expression
-data Type =
-  -- | An application type
-  TypeApplication ApplicationType |
-  -- | A context type
-  TypeCtx ContextType |
-  -- | A function type
-  TypeFunction FunctionType |
-  -- | An infix type
-  TypeInfix InfixType |
-  -- | A list type
-  TypeList Type |
-  -- | A parenthesized type
-  TypeParens Type |
-  -- | A tuple type
-  TypeTuple [Type] |
-  -- | A type variable or type name
-  TypeVariable Name
-  deriving (Eq, Ord, Read, Show)
-_Type = Core.Name "hydra.haskell.syntax.Type"
-_Type_application = Core.Name "application"
-_Type_ctx = Core.Name "ctx"
-_Type_function = Core.Name "function"
-_Type_infix = Core.Name "infix"
-_Type_list = Core.Name "list"
-_Type_parens = Core.Name "parens"
-_Type_tuple = Core.Name "tuple"
-_Type_variable = Core.Name "variable"
--- | An application type
-data ApplicationType =
-  ApplicationType {
-    -- | The type being applied
-    applicationTypeContext :: Type,
-    -- | The type argument
-    applicationTypeArgument :: Type}
-  deriving (Eq, Ord, Read, Show)
-_ApplicationType = Core.Name "hydra.haskell.syntax.ApplicationType"
-_ApplicationType_context = Core.Name "context"
-_ApplicationType_argument = Core.Name "argument"
--- | A type with a context (type class constraints)
-data ContextType =
-  ContextType {
-    -- | The type class context
-    contextTypeCtx :: Assertion,
-    -- | The constrained type
-    contextTypeType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_ContextType = Core.Name "hydra.haskell.syntax.ContextType"
-_ContextType_ctx = Core.Name "ctx"
-_ContextType_type = Core.Name "type"
--- | A function type
-data FunctionType =
-  FunctionType {
-    -- | The domain type
-    functionTypeDomain :: Type,
-    -- | The codomain type
-    functionTypeCodomain :: Type}
-  deriving (Eq, Ord, Read, Show)
-_FunctionType = Core.Name "hydra.haskell.syntax.FunctionType"
-_FunctionType_domain = Core.Name "domain"
-_FunctionType_codomain = Core.Name "codomain"
--- | An infix type application
-data InfixType =
-  InfixType {
-    -- | The left-hand type
-    infixTypeLhs :: Type,
-    -- | The type operator
-    infixTypeOperator :: Operator,
-    -- | The right-hand operator
-    infixTypeRhs :: Operator}
-  deriving (Eq, Ord, Read, Show)
-_InfixType = Core.Name "hydra.haskell.syntax.InfixType"
-_InfixType_lhs = Core.Name "lhs"
-_InfixType_operator = Core.Name "operator"
-_InfixType_rhs = Core.Name "rhs"
--- | A type synonym declaration
-data TypeDeclaration =
-  TypeDeclaration {
-    -- | The declaration head
-    typeDeclarationName :: DeclarationHead,
-    -- | The type being defined
-    typeDeclarationType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_TypeDeclaration = Core.Name "hydra.haskell.syntax.TypeDeclaration"
-_TypeDeclaration_name = Core.Name "name"
-_TypeDeclaration_type = Core.Name "type"
--- | A type signature
-data TypeSignature =
-  TypeSignature {
-    -- | The name being typed
-    typeSignatureName :: Name,
-    -- | The type
-    typeSignatureType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_TypeSignature = Core.Name "hydra.haskell.syntax.TypeSignature"
-_TypeSignature_name = Core.Name "name"
-_TypeSignature_type = Core.Name "type"
--- | A binding with its type signature
-data TypedBinding =
-  TypedBinding {
-    -- | The type signature
-    typedBindingTypeSignature :: TypeSignature,
-    -- | The value binding
-    typedBindingValueBinding :: ValueBinding}
-  deriving (Eq, Ord, Read, Show)
-_TypedBinding = Core.Name "hydra.haskell.syntax.TypedBinding"
-_TypedBinding_typeSignature = Core.Name "typeSignature"
-_TypedBinding_valueBinding = Core.Name "valueBinding"
--- | A value binding
-data ValueBinding =
-  -- | A simple value binding
-  ValueBindingSimple SimpleValueBinding
-  deriving (Eq, Ord, Read, Show)
-_ValueBinding = Core.Name "hydra.haskell.syntax.ValueBinding"
-_ValueBinding_simple = Core.Name "simple"
--- | A simple value binding
-data SimpleValueBinding =
-  SimpleValueBinding {
-    -- | The pattern being bound
-    simpleValueBindingPattern :: Pattern,
-    -- | The right-hand side
-    simpleValueBindingRhs :: RightHandSide,
-    -- | Optional local bindings (where clause)
-    simpleValueBindingLocalBindings :: (Maybe LocalBindings)}
-  deriving (Eq, Ord, Read, Show)
-_SimpleValueBinding = Core.Name "hydra.haskell.syntax.SimpleValueBinding"
-_SimpleValueBinding_pattern = Core.Name "pattern"
-_SimpleValueBinding_rhs = Core.Name "rhs"
-_SimpleValueBinding_localBindings = Core.Name "localBindings"
--- | A type variable
-newtype Variable =
-  Variable {
-    unVariable :: Name}
-  deriving (Eq, Ord, Read, Show)
-_Variable = Core.Name "hydra.haskell.syntax.Variable"
diff --git a/src/main/haskell/Hydra/Haskell/Testing.hs b/src/main/haskell/Hydra/Haskell/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Testing.hs
+++ /dev/null
@@ -1,203 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Haskell test code generation for HSpec-based generation tests
-
-module Hydra.Haskell.Testing where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Haskell.Syntax as Syntax
-import qualified Hydra.Haskell.Utils as Utils
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Show.Errors as Errors
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Add namespaces from a set of names to existing namespaces
-addNamespacesToNamespaces :: Packaging.Namespaces Syntax.ModuleName -> S.Set Core.Name -> Packaging.Namespaces Syntax.ModuleName
-addNamespacesToNamespaces ns0 names =
-
-      let newNamespaces = Sets.fromList (Maybes.cat (Lists.map Names.namespaceOf (Sets.toList names)))
-          toModuleName =
-                  \namespace -> Syntax.ModuleName (Formatting.capitalize (Maybes.fromMaybe (Packaging.unNamespace namespace) (Lists.maybeLast (Strings.splitOn "." (Packaging.unNamespace namespace)))))
-          newMappings = Maps.fromList (Lists.map (\ns_ -> (ns_, (toModuleName ns_))) (Sets.toList newNamespaces))
-      in Packaging.Namespaces {
-        Packaging.namespacesFocus = (Packaging.namespacesFocus ns0),
-        Packaging.namespacesMapping = (Maps.union (Packaging.namespacesMapping ns0) newMappings)}
--- | Build namespaces for a test group including encoded term references
-buildNamespacesForTestGroup :: Packaging.Module -> Testing.TestGroup -> Graph.Graph -> Either String (Packaging.Namespaces Syntax.ModuleName)
-buildNamespacesForTestGroup mod tgroup graph_ =
-
-      let testCases_ = collectTestCases tgroup
-          testTerms = Lists.concat (Lists.map extractTestTerms testCases_)
-          testBindings =
-                  Lists.map (\term -> Core.Binding {
-                    Core.bindingName = (Core.Name "_test_"),
-                    Core.bindingTerm = term,
-                    Core.bindingTypeScheme = Nothing}) testTerms
-          tempModule =
-                  Packaging.Module {
-                    Packaging.moduleDescription = (Packaging.moduleDescription mod),
-                    Packaging.moduleNamespace = (Packaging.moduleNamespace mod),
-                    Packaging.moduleTermDependencies = (Packaging.moduleTermDependencies mod),
-                    Packaging.moduleTypeDependencies = (Packaging.moduleTypeDependencies mod),
-                    Packaging.moduleDefinitions = (Lists.map (\b -> Packaging.DefinitionTerm (Packaging.TermDefinition {
-                      Packaging.termDefinitionName = (Core.bindingName b),
-                      Packaging.termDefinitionTerm = (Core.bindingTerm b),
-                      Packaging.termDefinitionTypeScheme = (Core.bindingTypeScheme b)})) testBindings)}
-      in (Eithers.bind (Eithers.bimap (\e -> Errors.error e) (\a -> a) (Utils.namespacesForModule tempModule Lexical.emptyContext graph_)) (\baseNamespaces ->
-        let encodedNames = Sets.unions (Lists.map (\t -> extractEncodedTermVariableNames graph_ t) testTerms)
-        in (Right (addNamespacesToNamespaces baseNamespaces encodedNames))))
--- | Build the complete test module for Haskell HSpec
-buildTestModule :: Packaging.Module -> Testing.TestGroup -> String -> Packaging.Namespaces Syntax.ModuleName -> String
-buildTestModule testModule testGroup testBody namespaces =
-
-      let ns_ = Packaging.moduleNamespace testModule
-          specNs = Packaging.Namespace (Strings.cat2 (Packaging.unNamespace ns_) "Spec")
-          moduleNameString = namespaceToModuleName specNs
-          groupName_ = Testing.testGroupName testGroup
-          domainImports = findHaskellImports namespaces Sets.empty
-          standardImports =
-                  [
-                    "import Hydra.Kernel",
-                    "import qualified Test.Hspec as H",
-                    "import qualified Data.List as L",
-                    "import qualified Data.Map as M",
-                    "import qualified Data.Set as S",
-                    "import qualified Data.Maybe as Y"]
-          allImports = Lists.concat2 standardImports domainImports
-          header =
-                  Strings.intercalate "\n" (Lists.concat [
-                    [
-                      Strings.cat2 "-- " Constants.warningAutoGeneratedFile,
-                      ""],
-                    [
-                      "",
-                      (Strings.cat [
-                        "module ",
-                        moduleNameString,
-                        " where"]),
-                      ""],
-                    allImports,
-                    [
-                      "",
-                      "spec :: H.Spec",
-                      (Strings.cat [
-                        "spec = H.describe ",
-                        (Literals.showString groupName_),
-                        " $ do"])]])
-      in (Strings.cat [
-        header,
-        "\n",
-        testBody,
-        "\n"])
--- | Collect variable names from encoded terms within a single term node
-collectNames :: Graph.Graph -> S.Set Core.Name -> Core.Term -> S.Set Core.Name
-collectNames graf names t =
-    Logic.ifElse (Predicates.isEncodedTerm (Strip.deannotateTerm t)) (Eithers.either (\_ -> names) (\decodedTerm -> Sets.union names (Dependencies.termDependencyNames True True True decodedTerm)) (Eithers.bimap (\_e -> _e) (\_a -> _a) (DecodeCore.term graf t))) names
--- | Collect all test cases from a test group recursively
-collectTestCases :: Testing.TestGroup -> [Testing.TestCaseWithMetadata]
-collectTestCases tg =
-    Lists.concat2 (Testing.testGroupCases tg) (Lists.concat (Lists.map collectTestCases (Testing.testGroupSubgroups tg)))
--- | Extract all variable names from term-encoded terms in a given term
-extractEncodedTermVariableNames :: Graph.Graph -> Core.Term -> S.Set Core.Name
-extractEncodedTermVariableNames graf term =
-    Rewriting.foldOverTerm Coders.TraversalOrderPre (collectNames graf) Sets.empty term
--- | Extract input and output terms from a test case
-extractTestTerms :: t0 -> [t1]
-extractTestTerms tcm = []
--- | Find necessary imports for Haskell based on referenced names
-findHaskellImports :: Packaging.Namespaces Syntax.ModuleName -> t0 -> [String]
-findHaskellImports namespaces names_ =
-
-      let mapping_ = Packaging.namespacesMapping namespaces
-          filtered =
-                  Maps.filterWithKey (\ns_ -> \_v -> Logic.not (Equality.equal (Maybes.fromMaybe "" (Lists.maybeHead (Strings.splitOn "hydra.test." (Packaging.unNamespace ns_)))) "")) mapping_
-      in (Lists.map (\entry -> Strings.cat [
-        "import qualified ",
-        (Strings.intercalate "." (Lists.map Formatting.capitalize (Strings.splitOn "." (Packaging.unNamespace (Pairs.first entry))))),
-        " as ",
-        (Syntax.unModuleName (Pairs.second entry))]) (Maps.toList filtered))
--- | Generate a Haskell test file for a test group, with type inference and namespace building
-generateHaskellTestFile :: Packaging.Module -> Testing.TestGroup -> Graph.Graph -> Either String (String, String)
-generateHaskellTestFile testModule testGroup g =
-    Eithers.bind (buildNamespacesForTestGroup testModule testGroup g) (\namespaces -> generateTestFile testModule testGroup namespaces)
--- | Generate a single HSpec test case from a universal test case
-generateTestCase :: t0 -> Testing.TestCaseWithMetadata -> Either t1 [String]
-generateTestCase depth tcm =
-
-      let name_ = Testing.testCaseWithMetadataName tcm
-          tcase = Testing.testCaseWithMetadataCase tcm
-          universal =
-                  case tcase of
-                    Testing.TestCaseUniversal v0 -> v0
-          actual_ = Testing.universalTestCaseActual universal
-          expected_ = Testing.universalTestCaseExpected universal
-      in (Right [
-        Strings.cat [
-          "H.it ",
-          (Literals.showString name_),
-          " $ H.shouldBe"],
-        (Strings.cat [
-          "  (",
-          actual_,
-          ")"]),
-        (Strings.cat [
-          "  (",
-          expected_,
-          ")"])])
--- | Generate a complete Haskell test file
-generateTestFile :: Packaging.Module -> Testing.TestGroup -> Packaging.Namespaces Syntax.ModuleName -> Either t0 (String, String)
-generateTestFile testModule testGroup namespaces =
-    Eithers.map (\testBody ->
-      let testModuleContent = buildTestModule testModule testGroup testBody namespaces
-          ns_ = Packaging.moduleNamespace testModule
-          specNs = Packaging.Namespace (Strings.cat2 (Packaging.unNamespace ns_) "Spec")
-          filePath = Names.namespaceToFilePath Util.CaseConventionPascal (Packaging.FileExtension "hs") specNs
-      in (filePath, testModuleContent)) (generateTestGroupHierarchy 1 testGroup)
--- | Generate test hierarchy preserving the structure with H.describe blocks for subgroups
-generateTestGroupHierarchy :: Int -> Testing.TestGroup -> Either t0 String
-generateTestGroupHierarchy depth testGroup =
-
-      let cases_ = Testing.testGroupCases testGroup
-          subgroups = Testing.testGroupSubgroups testGroup
-          indent = Strings.fromList (Lists.replicate (Math.mul depth 2) 32)
-      in (Eithers.bind (Eithers.mapList (\tc -> generateTestCase depth tc) cases_) (\testCaseLinesRaw ->
-        let testCaseLines = Lists.map (\lines_ -> Lists.map (\line -> Strings.cat2 indent line) lines_) testCaseLinesRaw
-            testCasesStr = Strings.intercalate "\n" (Lists.concat testCaseLines)
-        in (Eithers.map (\subgroupsStr -> Strings.cat [
-          testCasesStr,
-          (Logic.ifElse (Logic.or (Equality.equal testCasesStr "") (Equality.equal subgroupsStr "")) "" "\n"),
-          subgroupsStr]) (Eithers.map (\blocks -> Strings.intercalate "\n" blocks) (Eithers.mapList (\subgroup ->
-          let groupName_ = Testing.testGroupName subgroup
-          in (Eithers.map (\content -> Strings.cat [
-            indent,
-            "H.describe ",
-            (Literals.showString groupName_),
-            " $ do\n",
-            content]) (generateTestGroupHierarchy (Math.add depth 1) subgroup))) subgroups)))))
--- | Convert namespace to Haskell module name
-namespaceToModuleName :: Packaging.Namespace -> String
-namespaceToModuleName ns_ =
-    Strings.intercalate "." (Lists.map Formatting.capitalize (Strings.splitOn "." (Packaging.unNamespace ns_)))
diff --git a/src/main/haskell/Hydra/Haskell/Utils.hs b/src/main/haskell/Hydra/Haskell/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Haskell/Utils.hs
+++ /dev/null
@@ -1,234 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for working with Haskell syntax trees
-
-module Hydra.Haskell.Utils where
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Haskell.Language as Language
-import qualified Hydra.Haskell.Syntax as Syntax
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Create an application pattern from a name and argument patterns
-applicationPattern :: Syntax.Name -> [Syntax.Pattern] -> Syntax.Pattern
-applicationPattern name args =
-    Syntax.PatternApplication (Syntax.ApplicationPattern {
-      Syntax.applicationPatternName = name,
-      Syntax.applicationPatternArgs = args})
--- | Generate a Haskell name reference for a Hydra element
-elementReference :: Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Syntax.Name
-elementReference namespaces name =
-
-      let namespacePair = Packaging.namespacesFocus namespaces
-          gname = Pairs.first namespacePair
-          gmod = Syntax.unModuleName (Pairs.second namespacePair)
-          namespacesMap = Packaging.namespacesMapping namespaces
-          qname = Names.qualifyName name
-          local = Packaging.qualifiedNameLocal qname
-          escLocal = sanitizeHaskellName local
-          mns = Packaging.qualifiedNameNamespace qname
-      in (Maybes.cases (Packaging.qualifiedNameNamespace qname) (simpleName local) (\ns -> Maybes.cases (Maps.lookup ns namespacesMap) (simpleName local) (\mn ->
-        let aliasStr = Syntax.unModuleName mn
-        in (Logic.ifElse (Equality.equal ns gname) (simpleName escLocal) (rawName (Strings.cat [
-          aliasStr,
-          ".",
-          (sanitizeHaskellName local)]))))))
--- | Create a Haskell function application expression
-hsapp :: Syntax.Expression -> Syntax.Expression -> Syntax.Expression
-hsapp l r =
-    Syntax.ExpressionApplication (Syntax.ApplicationExpression {
-      Syntax.applicationExpressionFunction = l,
-      Syntax.applicationExpressionArgument = r})
--- | Create a Haskell lambda expression
-hslambda :: Syntax.Name -> Syntax.Expression -> Syntax.Expression
-hslambda name rhs =
-    Syntax.ExpressionLambda (Syntax.LambdaExpression {
-      Syntax.lambdaExpressionBindings = [
-        Syntax.PatternName name],
-      Syntax.lambdaExpressionInner = rhs})
--- | Create a Haskell literal expression
-hslit :: Syntax.Literal -> Syntax.Expression
-hslit lit = Syntax.ExpressionLiteral lit
--- | Create a Haskell variable expression from a string
-hsvar :: String -> Syntax.Expression
-hsvar s = Syntax.ExpressionVariable (rawName s)
--- | Compute the Haskell module namespaces for a Hydra module
-namespacesForModule :: Packaging.Module -> t0 -> Graph.Graph -> Either Errors.Error (Packaging.Namespaces Syntax.ModuleName)
-namespacesForModule mod cx g =
-    Eithers.bind (Analysis.moduleDependencyNamespaces cx g True True True True mod) (\nss ->
-      let ns = Packaging.moduleNamespace mod
-          segmentsOf = \namespace -> Strings.splitOn "." (Packaging.unNamespace namespace)
-          aliasFromSuffix =
-                  \segs -> \n ->
-                    let dropCount = Math.sub (Lists.length segs) n
-                        suffix = Lists.drop dropCount segs
-                        capitalizedSuffix = Lists.map Formatting.capitalize suffix
-                    in (Syntax.ModuleName (Strings.cat capitalizedSuffix))
-          toModuleName = \namespace -> aliasFromSuffix (segmentsOf namespace) 1
-          focusPair = (ns, (toModuleName ns))
-          nssAsList = Sets.toList nss
-          segsMap = Maps.fromList (Lists.map (\nm -> (nm, (segmentsOf nm))) nssAsList)
-          maxSegs =
-                  Lists.foldl (\a -> \b -> Logic.ifElse (Equality.gt a b) a b) 1 (Lists.map (\nm -> Lists.length (segmentsOf nm)) nssAsList)
-          initialState = Maps.fromList (Lists.map (\nm -> (nm, 1)) nssAsList)
-          segsFor = \nm -> Maybes.fromMaybe [] (Maps.lookup nm segsMap)
-          takenFor = \state -> \nm -> Maybes.fromMaybe 1 (Maps.lookup nm state)
-          growStep =
-                  \state -> \_ign ->
-                    let aliasEntries =
-                            Lists.map (\nm ->
-                              let segs = segsFor nm
-                                  n = takenFor state nm
-                                  segCount = Lists.length segs
-                                  aliasStr = Syntax.unModuleName (aliasFromSuffix segs n)
-                              in (nm, (n, (segCount, aliasStr)))) nssAsList
-                        aliasCounts =
-                                Lists.foldl (\m -> \e ->
-                                  let k = Pairs.second (Pairs.second (Pairs.second e))
-                                  in (Maps.insert k (Math.add 1 (Maybes.fromMaybe 0 (Maps.lookup k m))) m)) Maps.empty aliasEntries
-                        aliasMinSegs =
-                                Lists.foldl (\m -> \e ->
-                                  let segCount = Pairs.first (Pairs.second (Pairs.second e))
-                                      k = Pairs.second (Pairs.second (Pairs.second e))
-                                      existing = Maps.lookup k m
-                                  in (Maps.insert k (Maybes.cases existing segCount (\prev -> Logic.ifElse (Equality.lt segCount prev) segCount prev)) m)) Maps.empty aliasEntries
-                        aliasMinSegsCount =
-                                Lists.foldl (\m -> \e ->
-                                  let segCount = Pairs.first (Pairs.second (Pairs.second e))
-                                      k = Pairs.second (Pairs.second (Pairs.second e))
-                                      minSegs = Maybes.fromMaybe segCount (Maps.lookup k aliasMinSegs)
-                                  in (Logic.ifElse (Equality.equal segCount minSegs) (Maps.insert k (Math.add 1 (Maybes.fromMaybe 0 (Maps.lookup k m))) m) m)) Maps.empty aliasEntries
-                    in (Maps.fromList (Lists.map (\e ->
-                      let nm = Pairs.first e
-                          n = Pairs.first (Pairs.second e)
-                          segCount = Pairs.first (Pairs.second (Pairs.second e))
-                          aliasStr = Pairs.second (Pairs.second (Pairs.second e))
-                          count = Maybes.fromMaybe 0 (Maps.lookup aliasStr aliasCounts)
-                          minSegs = Maybes.fromMaybe segCount (Maps.lookup aliasStr aliasMinSegs)
-                          minSegsCount = Maybes.fromMaybe 0 (Maps.lookup aliasStr aliasMinSegsCount)
-                          canGrow =
-                                  Logic.and (Equality.gt count 1) (Logic.and (Equality.gt segCount n) (Logic.or (Equality.gt segCount minSegs) (Equality.gt minSegsCount 1)))
-                          newN = Logic.ifElse canGrow (Math.add n 1) n
-                      in (nm, newN)) aliasEntries))
-          finalState = Lists.foldl growStep initialState (Lists.replicate maxSegs ())
-          resultMap = Maps.fromList (Lists.map (\nm -> (nm, (aliasFromSuffix (segsFor nm) (takenFor finalState nm)))) nssAsList)
-      in (Right (Packaging.Namespaces {
-        Packaging.namespacesFocus = focusPair,
-        Packaging.namespacesMapping = resultMap})))
--- | Generate an accessor name for a newtype wrapper (e.g., 'unFoo' for Foo)
-newtypeAccessorName :: Core.Name -> String
-newtypeAccessorName name = Strings.cat2 "un" (Names.localNameOf name)
--- | Create a raw Haskell name from a string without sanitization
-rawName :: String -> Syntax.Name
-rawName n =
-    Syntax.NameNormal (Syntax.QualifiedName {
-      Syntax.qualifiedNameQualifiers = [],
-      Syntax.qualifiedNameUnqualified = (Syntax.NamePart n)})
--- | Generate a Haskell name for a record field accessor
-recordFieldReference :: Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Core.Name -> Syntax.Name
-recordFieldReference namespaces sname fname =
-
-      let fnameStr = Core.unName fname
-          qname = Names.qualifyName sname
-          ns = Packaging.qualifiedNameNamespace qname
-          typeNameStr = typeNameForRecord sname
-          decapitalized = Formatting.decapitalize typeNameStr
-          capitalized = Formatting.capitalize fnameStr
-          nm = Strings.cat2 decapitalized capitalized
-          qualName =
-                  Packaging.QualifiedName {
-                    Packaging.qualifiedNameNamespace = ns,
-                    Packaging.qualifiedNameLocal = nm}
-          unqualName = Names.unqualifyName qualName
-      in (elementReference namespaces unqualName)
--- | Sanitize a string to be a valid Haskell identifier, escaping reserved words
-sanitizeHaskellName :: String -> String
-sanitizeHaskellName = Formatting.sanitizeWithUnderscores Language.reservedWords
--- | Create a sanitized Haskell name from a string
-simpleName :: String -> Syntax.Name
-simpleName arg_ = rawName (sanitizeHaskellName arg_)
--- | Create a simple value binding (e.g., 'foo = expr' or 'foo = expr where ...')
-simpleValueBinding :: Syntax.Name -> Syntax.Expression -> Maybe Syntax.LocalBindings -> Syntax.ValueBinding
-simpleValueBinding hname rhs bindings =
-
-      let pat =
-              Syntax.PatternApplication (Syntax.ApplicationPattern {
-                Syntax.applicationPatternName = hname,
-                Syntax.applicationPatternArgs = []})
-          rightHandSide = Syntax.RightHandSide rhs
-      in (Syntax.ValueBindingSimple (Syntax.SimpleValueBinding {
-        Syntax.simpleValueBindingPattern = pat,
-        Syntax.simpleValueBindingRhs = rightHandSide,
-        Syntax.simpleValueBindingLocalBindings = bindings}))
--- | Convert a list of types into a nested type application
-toTypeApplication :: [Syntax.Type] -> Syntax.Type
-toTypeApplication types =
-
-      let dummyType =
-              Syntax.TypeVariable (Syntax.NameNormal (Syntax.QualifiedName {
-                Syntax.qualifiedNameQualifiers = [],
-                Syntax.qualifiedNameUnqualified = (Syntax.NamePart "")}))
-          app =
-                  \l -> Maybes.fromMaybe dummyType (Maybes.map (\p -> Logic.ifElse (Lists.null (Pairs.second p)) (Pairs.first p) (Syntax.TypeApplication (Syntax.ApplicationType {
-                    Syntax.applicationTypeContext = (app (Pairs.second p)),
-                    Syntax.applicationTypeArgument = (Pairs.first p)}))) (Lists.uncons l))
-      in (app (Lists.reverse types))
--- | Extract the local type name from a fully qualified record type name
-typeNameForRecord :: Core.Name -> String
-typeNameForRecord sname =
-
-      let snameStr = Core.unName sname
-          parts = Strings.splitOn "." snameStr
-      in (Maybes.fromMaybe snameStr (Lists.maybeLast parts))
--- | Generate a Haskell name for a union variant constructor, with disambiguation
-unionFieldReference :: S.Set Core.Name -> Packaging.Namespaces Syntax.ModuleName -> Core.Name -> Core.Name -> Syntax.Name
-unionFieldReference boundNames namespaces sname fname =
-
-      let fnameStr = Core.unName fname
-          qname = Names.qualifyName sname
-          ns = Packaging.qualifiedNameNamespace qname
-          typeNameStr = typeNameForRecord sname
-          capitalizedTypeName = Formatting.capitalize typeNameStr
-          capitalizedFieldName = Formatting.capitalize fnameStr
-          deconflict =
-                  \name ->
-                    let tname =
-                            Names.unqualifyName (Packaging.QualifiedName {
-                              Packaging.qualifiedNameNamespace = ns,
-                              Packaging.qualifiedNameLocal = name})
-                    in (Logic.ifElse (Sets.member tname boundNames) (deconflict (Strings.cat2 name "_")) name)
-          nm = deconflict (Strings.cat2 capitalizedTypeName capitalizedFieldName)
-          qualName =
-                  Packaging.QualifiedName {
-                    Packaging.qualifiedNameNamespace = ns,
-                    Packaging.qualifiedNameLocal = nm}
-          unqualName = Names.unqualifyName qualName
-      in (elementReference namespaces unqualName)
--- | Unpack nested forall types into a list of type variables and the inner type
-unpackForallType :: Core.Type -> ([Core.Name], Core.Type)
-unpackForallType t =
-    case (Strip.deannotateType t) of
-      Core.TypeForall v0 ->
-        let v = Core.forallTypeParameter v0
-            tbody = Core.forallTypeBody v0
-            recursiveResult = unpackForallType tbody
-            vars = Pairs.first recursiveResult
-            finalType = Pairs.second recursiveResult
-        in (Lists.cons v vars, finalType)
-      _ -> ([], t)
diff --git a/src/main/haskell/Hydra/Hoisting.hs b/src/main/haskell/Hydra/Hoisting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Hoisting.hs
+++ /dev/null
@@ -1,454 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for deep term rewriting operations involving hoisting subterms or bindings into enclosing let terms.
-
-module Hydra.Hoisting where
-import qualified Hydra.Core as Core
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Substitution as Substitution
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Augment bindings with new free variables introduced by substitution, wrapping with lambdas after any type lambdas.
-augmentBindingsWithNewFreeVars :: Graph.Graph -> S.Set Core.Name -> [Core.Binding] -> ([Core.Binding], Typing.TermSubst)
-augmentBindingsWithNewFreeVars cx boundVars bindings =
-
-      let types = Maps.map Scoping.typeSchemeToFType (Graph.graphBoundTypes cx)
-          wrapAfterTypeLambdas =
-                  \vars -> \term -> case term of
-                    Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-                      Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                      Core.typeLambdaBody = (wrapAfterTypeLambdas vars (Core.typeLambdaBody v0))})
-                    _ -> Lists.foldl (\t -> \p -> Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Pairs.first p),
-                      Core.lambdaDomain = (Pairs.second p),
-                      Core.lambdaBody = t})) term (Lists.reverse vars)
-          augment =
-                  \b ->
-                    let freeVars = Sets.toList (Sets.intersection boundVars (Variables.freeVariablesInTerm (Core.bindingTerm b)))
-                        varTypePairs = Lists.map (\v -> (v, (Maps.lookup v types))) freeVars
-                        varTypes = Maybes.cat (Lists.map Pairs.second varTypePairs)
-                    in (Logic.ifElse (Logic.or (Lists.null freeVars) (Logic.not (Equality.equal (Lists.length varTypes) (Lists.length varTypePairs)))) (b, Nothing) (Core.Binding {
-                      Core.bindingName = (Core.bindingName b),
-                      Core.bindingTerm = (wrapAfterTypeLambdas varTypePairs (Core.bindingTerm b)),
-                      Core.bindingTypeScheme = (Maybes.map (\ts -> Core.TypeScheme {
-                        Core.typeSchemeVariables = (Core.typeSchemeVariables ts),
-                        Core.typeSchemeBody = (Lists.foldl (\acc -> \t -> Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = t,
-                          Core.functionTypeCodomain = acc})) (Core.typeSchemeBody ts) (Lists.reverse varTypes)),
-                        Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts)}) (Core.bindingTypeScheme b))}, (Just (Core.bindingName b, (Lists.foldl (\t -> \v -> Core.TermApplication (Core.Application {
-                      Core.applicationFunction = t,
-                      Core.applicationArgument = (Core.TermVariable v)})) (Core.TermVariable (Core.bindingName b)) freeVars)))))
-          results = Lists.map augment bindings
-      in (Lists.map Pairs.first results, (Typing.TermSubst (Maps.fromList (Maybes.cat (Lists.map Pairs.second results)))))
--- | Check if a binding has a polymorphic type (non-empty list of type scheme variables)
-bindingIsPolymorphic :: Core.Binding -> Bool
-bindingIsPolymorphic binding =
-    Maybes.maybe False (\ts -> Logic.not (Lists.null (Core.typeSchemeVariables ts))) (Core.bindingTypeScheme binding)
--- | Check if a binding's type uses any type variables from the given Graph. Returns True if the free type variables in the binding's type intersect with the type variables in scope (graphTypeVariables).
-bindingUsesContextTypeVars :: Graph.Graph -> Core.Binding -> Bool
-bindingUsesContextTypeVars cx binding =
-    Maybes.maybe False (\ts ->
-      let freeInType = Variables.freeVariablesInType (Core.typeSchemeBody ts)
-          contextTypeVars = Graph.graphTypeVariables cx
-      in (Logic.not (Sets.null (Sets.intersection freeInType contextTypeVars)))) (Core.bindingTypeScheme binding)
--- | Count the number of occurrences of a variable name in a term. Assumes no variable shadowing.
-countVarOccurrences :: Core.Name -> Core.Term -> Int
-countVarOccurrences name term =
-
-      let childCount = Lists.foldl (\acc -> \t -> Math.add acc (countVarOccurrences name t)) 0 (Rewriting.subterms term)
-      in case term of
-        Core.TermVariable v0 -> Logic.ifElse (Equality.equal v0 name) (Math.add 1 childCount) childCount
-        _ -> childCount
--- | Transform a let-term by pulling ALL let bindings to the top level. This is useful for targets like Java that don't support nested let expressions at all. If a hoisted binding captures lambda-bound variables from an enclosing scope, the binding is wrapped in lambdas for those variables, and references are replaced with applications. Note: Assumes no variable shadowing; use hydra.rewriting.unshadowVariables first.
-hoistAllLetBindings :: Core.Let -> Core.Let
-hoistAllLetBindings let0 =
-
-      let emptyCx =
-              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}
-      in (hoistLetBindingsWithPredicate (\_ -> True) shouldHoistAll emptyCx let0)
--- | Hoist case statements into local let bindings. This is useful for targets such as Python which only support case statements (match) at the top level. Case statements are hoisted only when they appear at non-top-level positions. Top level = root, or reachable through annotations, let body/binding, lambda bodies, or ONE application LHS. Once through an application LHS, lambda bodies no longer count as pass-through.
-hoistCaseStatements :: Graph.Graph -> Core.Term -> Core.Term
-hoistCaseStatements = hoistSubterms shouldHoistCaseStatement
--- | Hoist case statements into local let bindings for a list of bindings. This version operates prior to inference and uses an empty type context. It hoists case statements and their applied arguments into let bindings.
-hoistCaseStatementsInGraph :: [Core.Binding] -> [Core.Binding]
-hoistCaseStatementsInGraph bindings =
-
-      let emptyTx =
-              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}
-          term0 =
-                  Core.TermLet (Core.Let {
-                    Core.letBindings = bindings,
-                    Core.letBody = Core.TermUnit})
-          term1 = hoistCaseStatements emptyTx term0
-      in (Environment.termAsBindings term1)
--- | Transform a let-term by pulling polymorphic let bindings to the top level, using Graph. A binding is hoisted if: (1) It is polymorphic (has non-empty typeSchemeVariables), OR (2) Its type uses type variables from the Graph (i.e., from enclosing type lambdas). Bindings which are already at the top level are not hoisted. If a hoisted binding captures lambda-bound or let-bound variables from an enclosing scope, the binding is wrapped in lambdas for those variables, and references are replaced with applications. If a hoisted binding uses type variables from the context, those type variables are added to the binding's type scheme. Note: we assume that there is no variable shadowing; use hydra.rewriting.unshadowVariables first.
-hoistLetBindingsWithContext :: (Core.Binding -> Bool) -> Graph.Graph -> Core.Let -> Core.Let
-hoistLetBindingsWithContext isParentBinding cx let0 =
-    hoistLetBindingsWithPredicate isParentBinding shouldHoistPolymorphic cx let0
--- | Transform a let-term by pulling let bindings to the top level. The isParentBinding predicate applies to top-level bindings and determines whether their subterm bindings are eligible for hoisting. The shouldHoistBinding predicate takes the Graph and a subterm binding, and returns True if the binding should be hoisted. This is useful for targets like Java that cannot have polymorphic definitions in arbitrary positions. The Graph provides information about type variables and lambda variables in scope. If a hoisted binding captures let-bound or lambda-bound variables from an enclosing scope, the binding is wrapped in lambdas for those variables, and references are replaced with applications. If a hoisted binding captures type variables from an enclosing type lambda scope, those type variables are added to the binding's type scheme, and references are replaced with type applications. Note: we assume that there is no variable shadowing; use hydra.rewriting.unshadowVariables first.
-hoistLetBindingsWithPredicate :: (Core.Binding -> Bool) -> (Graph.Graph -> Core.Binding -> Bool) -> Graph.Graph -> Core.Let -> Core.Let
-hoistLetBindingsWithPredicate isParentBinding shouldHoistBinding cx0 let0 =
-
-      let hoistOne =
-              \prefix -> \cx -> \pair -> \bindingWithCapturedVars ->
-                let bindingAndReplacementPairs = Pairs.first pair
-                    alreadyUsedNames = Pairs.second pair
-                    b = Pairs.first bindingWithCapturedVars
-                    capturedTermVars = Pairs.second bindingWithCapturedVars
-                    types = Maps.map Scoping.typeSchemeToFType (Graph.graphBoundTypes cx)
-                    capturedTermVarTypePairs = Lists.map (\v -> (v, (Maps.lookup v types))) capturedTermVars
-                    capturedTermVarTypes =
-                            Lists.map (\typ -> Strip.deannotateTypeParameters typ) (Maybes.cat (Lists.map Pairs.second capturedTermVarTypePairs))
-                    freeInBindingType =
-                            Maybes.maybe Sets.empty (\ts -> Variables.freeVariablesInType (Core.typeSchemeBody ts)) (Core.bindingTypeScheme b)
-                    freeInCapturedVarTypes = Sets.unions (Lists.map (\t -> Variables.freeVariablesInType t) capturedTermVarTypes)
-                    capturedTypeVars =
-                            Sets.toList (Sets.intersection (Graph.graphTypeVariables cx) (Sets.union freeInBindingType freeInCapturedVarTypes))
-                    globalBindingName =
-                            Lexical.chooseUniqueName alreadyUsedNames (Core.Name (Strings.cat2 prefix (Core.unName (Core.bindingName b))))
-                    newUsedNames = Sets.insert globalBindingName alreadyUsedNames
-                    newTypeScheme =
-                            Logic.ifElse (Equality.equal (Lists.length capturedTermVarTypes) (Lists.length capturedTermVarTypePairs)) (Maybes.map (\ts -> Core.TypeScheme {
-                              Core.typeSchemeVariables = (Lists.nub (Lists.concat2 capturedTypeVars (Core.typeSchemeVariables ts))),
-                              Core.typeSchemeBody = (Lists.foldl (\t -> \a -> Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = a,
-                                Core.functionTypeCodomain = t})) (Core.typeSchemeBody ts) (Lists.reverse capturedTermVarTypes)),
-                              Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts)}) (Core.bindingTypeScheme b)) Nothing
-                    strippedTerm = Strip.stripTypeLambdas (Core.bindingTerm b)
-                    termWithLambdas =
-                            Lists.foldl (\t -> \p -> Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Pairs.first p),
-                              Core.lambdaDomain = (Maybes.map (\dom -> Strip.deannotateTypeParameters dom) (Pairs.second p)),
-                              Core.lambdaBody = t})) strippedTerm (Lists.reverse capturedTermVarTypePairs)
-                    termWithTypeLambdas =
-                            Lists.foldl (\t -> \v -> Core.TermTypeLambda (Core.TypeLambda {
-                              Core.typeLambdaParameter = v,
-                              Core.typeLambdaBody = t})) termWithLambdas (Lists.reverse (Maybes.maybe [] Core.typeSchemeVariables newTypeScheme))
-                    withTypeApps =
-                            Lists.foldl (\t -> \v -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = t,
-                              Core.typeApplicationTermType = (Core.TypeVariable v)})) (Core.TermVariable globalBindingName) capturedTypeVars
-                    replacement =
-                            Lists.foldl (\t -> \v -> Core.TermApplication (Core.Application {
-                              Core.applicationFunction = t,
-                              Core.applicationArgument = (Core.TermVariable v)})) withTypeApps capturedTermVars
-                    newBindingAndReplacement =
-                            (Core.Binding {
-                              Core.bindingName = globalBindingName,
-                              Core.bindingTerm = termWithTypeLambdas,
-                              Core.bindingTypeScheme = newTypeScheme}, replacement)
-                    newPairs = Lists.cons newBindingAndReplacement bindingAndReplacementPairs
-                in (newPairs, newUsedNames)
-          rewrite =
-                  \prefix -> \recurse -> \cx -> \bindingsAndNames -> \term ->
-                    let previouslyFinishedBindings = Pairs.first bindingsAndNames
-                        emptyBindingsAndNames = ([], (Pairs.second bindingsAndNames))
-                        result = recurse emptyBindingsAndNames term
-                        newBindingsAndNames = Pairs.first result
-                        bindingsSoFar = Pairs.first newBindingsAndNames
-                        alreadyUsedNames = Pairs.second newBindingsAndNames
-                        newTerm = Pairs.second result
-                    in case newTerm of
-                      Core.TermLet v0 ->
-                        let body = Core.letBody v0
-                            partitionPair = Lists.partition (shouldHoistBinding cx) (Core.letBindings v0)
-                            hoistUs = Pairs.first partitionPair
-                            keepUs = Pairs.second partitionPair
-                            hoistedBindingNames = Lists.map Core.bindingName hoistUs
-                            polyLetVariables =
-                                    Sets.fromList (Lists.filter (\v -> Maybes.maybe False Resolution.fTypeIsPolymorphic (Maybes.map Scoping.typeSchemeToFType (Maps.lookup v (Graph.graphBoundTypes cx)))) (Sets.toList (Sets.difference (Sets.fromList (Maps.keys (Graph.graphBoundTerms cx))) (Graph.graphLambdaVariables cx))))
-                            boundTermVariables =
-                                    Sets.union (Graph.graphLambdaVariables cx) (Sets.difference (Sets.fromList (Maps.keys (Graph.graphBoundTerms cx))) (Graph.graphLambdaVariables cx))
-                            freeVariablesInEachBinding =
-                                    Lists.map (\b -> Sets.toList (Sets.intersection boundTermVariables (Variables.freeVariablesInTerm (Core.bindingTerm b)))) hoistUs
-                            bindingDependencies =
-                                    Lists.map (\vars -> Lists.partition (\v -> Sets.member v (Sets.fromList hoistedBindingNames)) vars) freeVariablesInEachBinding
-                            bindingEdges = Lists.zip hoistedBindingNames (Lists.map Pairs.first bindingDependencies)
-                            bindingImmediateCapturedVars = Lists.zip hoistedBindingNames (Lists.map Pairs.second bindingDependencies)
-                            capturedVarsMap = Maps.fromList (Sorting.propagateTags bindingEdges bindingImmediateCapturedVars)
-                            bindingsWithCapturedVars =
-                                    Lists.map (\b -> (b, (Maybes.maybe [] (\vars -> Sets.toList (Sets.difference vars polyLetVariables)) (Maps.lookup (Core.bindingName b) capturedVarsMap)))) hoistUs
-                            hoistPairsAndNames = Lists.foldl (hoistOne prefix cx) ([], alreadyUsedNames) bindingsWithCapturedVars
-                            hoistPairs = Lists.reverse (Pairs.first hoistPairsAndNames)
-                            hoistedBindings = Lists.map Pairs.first hoistPairs
-                            replacements = Lists.map Pairs.second hoistPairs
-                            finalUsedNames = Pairs.second hoistPairsAndNames
-                            hoistNameReplacementPairs = Lists.zip (Lists.map Core.bindingName hoistUs) replacements
-                            hoistBindingMap = Maps.fromList (Lists.map (\b -> (Core.bindingName b, b)) hoistUs)
-                            isCacheable =
-                                    \name ->
-                                      let multiRef = Equality.gte (countVarOccurrences name body) 2
-                                          isPoly = Maybes.maybe False (\b -> bindingIsPolymorphic b) (Maps.lookup name hoistBindingMap)
-                                      in (Logic.and multiRef (Logic.not isPoly))
-                            singleRefPairs = Lists.filter (\p -> Logic.not (isCacheable (Pairs.first p))) hoistNameReplacementPairs
-                            multiRefPairs = Lists.filter (\p -> isCacheable (Pairs.first p)) hoistNameReplacementPairs
-                            fullSubst = Typing.TermSubst (Maps.fromList hoistNameReplacementPairs)
-                            bodyOnlySubst = Typing.TermSubst (Maps.fromList singleRefPairs)
-                            bodySubst = Substitution.substituteInTerm bodyOnlySubst body
-                            cacheBindings =
-                                    Lists.map (\p ->
-                                      let origType = Maybes.maybe Nothing (\b -> Core.bindingTypeScheme b) (Maps.lookup (Pairs.first p) hoistBindingMap)
-                                      in Core.Binding {
-                                        Core.bindingName = (Pairs.first p),
-                                        Core.bindingTerm = (Pairs.second p),
-                                        Core.bindingTypeScheme = origType}) multiRefPairs
-                            bodyWithCache =
-                                    Logic.ifElse (Lists.null cacheBindings) bodySubst (Core.TermLet (Core.Let {
-                                      Core.letBindings = cacheBindings,
-                                      Core.letBody = bodySubst}))
-                            keepUsSubst = Lists.map (Substitution.substituteInBinding fullSubst) keepUs
-                            hoistedBindingsSubst = Lists.map (Substitution.substituteInBinding fullSubst) hoistedBindings
-                            bindingsSoFarSubst = Lists.map (Substitution.substituteInBinding fullSubst) bindingsSoFar
-                            augmentResult = augmentBindingsWithNewFreeVars cx (Sets.difference boundTermVariables polyLetVariables) bindingsSoFarSubst
-                            bindingsSoFarAugmented = Pairs.first augmentResult
-                            augmentSubst = Pairs.second augmentResult
-                            hoistedBindingsFinal = Lists.map (Substitution.substituteInBinding augmentSubst) hoistedBindingsSubst
-                            bindingsSoFarFinal = Lists.map (Substitution.substituteInBinding augmentSubst) bindingsSoFarAugmented
-                            bodyFinal = Substitution.substituteInTerm augmentSubst bodyWithCache
-                            keepUsFinal = Lists.map (Substitution.substituteInBinding augmentSubst) keepUsSubst
-                            finalTerm =
-                                    Logic.ifElse (Lists.null keepUsFinal) bodyFinal (Core.TermLet (Core.Let {
-                                      Core.letBindings = keepUsFinal,
-                                      Core.letBody = bodyFinal}))
-                        in ((Lists.concat [
-                          previouslyFinishedBindings,
-                          hoistedBindingsFinal,
-                          bindingsSoFarFinal], finalUsedNames), finalTerm)
-                      _ -> ((Lists.concat2 previouslyFinishedBindings bindingsSoFar, alreadyUsedNames), newTerm)
-          cx1 = Scoping.extendGraphForLet (\c -> \b -> Nothing) cx0 let0
-          forActiveBinding =
-                  \b ->
-                    let prefix = Strings.cat2 (Core.unName (Core.bindingName b)) "_"
-                        init = ([], (Sets.singleton (Core.bindingName b)))
-                        resultPair = Rewriting.rewriteAndFoldTermWithGraph (rewrite prefix) cx1 init (Core.bindingTerm b)
-                        resultBindings = Pairs.first (Pairs.first resultPair)
-                        resultTerm = Pairs.second resultPair
-                    in (Lists.cons (Core.Binding {
-                      Core.bindingName = (Core.bindingName b),
-                      Core.bindingTerm = resultTerm,
-                      Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) resultBindings)
-          forBinding = \b -> Logic.ifElse (isParentBinding b) (forActiveBinding b) [
-                b]
-      in Core.Let {
-        Core.letBindings = (Lists.concat (Lists.map forBinding (Core.letBindings let0))),
-        Core.letBody = (Core.letBody let0)}
--- | Transform a let-term by pulling all polymorphic let bindings to the top level. This is useful to ensure that polymorphic bindings are not nested within other terms, which is unsupported by certain targets such as Java. Polymorphic bindings are those with a non-empty list of type scheme variables. If a hoisted binding captures lambda-bound variables from an enclosing scope, the binding is wrapped in lambdas for those variables, and references are replaced with applications. Note: Assumes no variable shadowing; use hydra.rewriting.unshadowVariables first.
-hoistPolymorphicLetBindings :: (Core.Binding -> Bool) -> Core.Let -> Core.Let
-hoistPolymorphicLetBindings isParentBinding let0 =
-
-      let emptyCx =
-              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}
-      in (hoistLetBindingsWithPredicate isParentBinding shouldHoistPolymorphic emptyCx let0)
--- | Hoist subterms into local let bindings based on a path-aware predicate. The predicate receives a pair of (path, term) where path is the list of SubtermSteps from the root to the current term, and returns True if the term should be hoisted. For each let term found, the immediate subterms (binding values and body) are processed: matching subterms within each immediate subterm are collected and hoisted into a local let that wraps that immediate subterm. If a hoisted term contains free variables that are lambda-bound at an enclosing scope, the hoisted binding is wrapped in lambdas for those variables, and the reference is replaced with an application of those variables.
-hoistSubterms :: (([Paths.SubtermStep], Core.Term) -> Bool) -> Graph.Graph -> Core.Term -> Core.Term
-hoistSubterms shouldHoist cx0 term0 =
-
-      let processImmediateSubterm =
-              \cx -> \counter -> \namePrefix -> \pathPrefix -> \subterm ->
-                let baselineLambdaVars = Graph.graphLambdaVariables cx
-                    collectAndReplace =
-                            \recurse -> \path -> \cxInner -> \acc -> \term ->
-                              let currentCounter = Pairs.first acc
-                                  collectedBindings = Pairs.second acc
-                              in case term of
-                                Core.TermLet _ -> (acc, term)
-                                Core.TermTypeLambda _ -> (acc, term)
-                                _ ->
-                                  let result = recurse acc term
-                                      newAcc = Pairs.first result
-                                      processedTerm = Pairs.second result
-                                      newCounter = Pairs.first newAcc
-                                      newBindings = Pairs.second newAcc
-                                      fullPath = Lists.concat2 pathPrefix path
-                                  in (Logic.ifElse (shouldHoist (fullPath, processedTerm)) (
-                                    let proposedName =
-                                            Core.Name (Strings.cat [
-                                              "_hoist_",
-                                              namePrefix,
-                                              "_",
-                                              (Literals.showInt32 newCounter)])
-                                        existingNames = Sets.fromList (Lists.map (\b -> Core.bindingName b) newBindings)
-                                        freeVarsInSubterm = Variables.freeVariablesInTerm subterm
-                                        allReserved = Sets.union existingNames freeVarsInSubterm
-                                        bindingName = Lexical.chooseUniqueName allReserved proposedName
-                                        allLambdaVars = Graph.graphLambdaVariables cxInner
-                                        newLambdaVars = Sets.difference allLambdaVars baselineLambdaVars
-                                        freeVars = Variables.freeVariablesInTerm processedTerm
-                                        capturedVars = Sets.toList (Sets.intersection newLambdaVars freeVars)
-                                        typeMap = Maps.map Scoping.typeSchemeToFType (Graph.graphBoundTypes cxInner)
-                                        wrappedTerm =
-                                                Lists.foldl (\body -> \varName -> Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = varName,
-                                                  Core.lambdaDomain = (Maps.lookup varName typeMap),
-                                                  Core.lambdaBody = body})) processedTerm (Lists.reverse capturedVars)
-                                        reference =
-                                                Lists.foldl (\fn -> \varName -> Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = fn,
-                                                  Core.applicationArgument = (Core.TermVariable varName)})) (Core.TermVariable bindingName) capturedVars
-                                        newBinding =
-                                                Core.Binding {
-                                                  Core.bindingName = bindingName,
-                                                  Core.bindingTerm = wrappedTerm,
-                                                  Core.bindingTypeScheme = Nothing}
-                                    in ((Math.add newCounter 1, (Lists.cons newBinding newBindings)), reference)) (newAcc, processedTerm))
-                    result = Rewriting.rewriteAndFoldTermWithGraphAndPath collectAndReplace cx (counter, []) subterm
-                    finalAcc = Pairs.first result
-                    transformedSubterm = Pairs.second result
-                    finalCounter = Pairs.first finalAcc
-                    bindings = Pairs.second finalAcc
-                in (Logic.ifElse (Lists.null bindings) (finalCounter, transformedSubterm) (
-                  let localLet =
-                          Core.TermLet (Core.Let {
-                            Core.letBindings = (Lists.reverse bindings),
-                            Core.letBody = transformedSubterm})
-                  in (finalCounter, localLet)))
-          processLetTerm =
-                  \cx -> \counter -> \path -> \lt ->
-                    let bindings = Core.letBindings lt
-                        body = Core.letBody lt
-                        processBinding =
-                                \acc -> \binding ->
-                                  let namePrefix = Strings.intercalate "_" (Strings.splitOn "." (Core.unName (Core.bindingName binding)))
-                                      bindingPathPrefix = Lists.concat2 path [
-                                            Paths.SubtermStepLetBinding (Core.bindingName binding)]
-                                      result = processImmediateSubterm cx 1 namePrefix bindingPathPrefix (Core.bindingTerm binding)
-                                      newValue = Pairs.second result
-                                      newBinding =
-                                              Core.Binding {
-                                                Core.bindingName = (Core.bindingName binding),
-                                                Core.bindingTerm = newValue,
-                                                Core.bindingTypeScheme = (Core.bindingTypeScheme binding)}
-                                  in (Lists.cons newBinding acc)
-                        newBindingsReversed = Lists.foldl processBinding [] bindings
-                        newBindings = Lists.reverse newBindingsReversed
-                        bodyPathPrefix = Lists.concat2 path [
-                              Paths.SubtermStepLetBody]
-                        firstBindingName =
-                                Maybes.maybe "body" (\b -> Strings.intercalate "_" (Strings.splitOn "." (Core.unName (Core.bindingName b)))) (Lists.maybeHead bindings)
-                        bodyPrefix = Strings.cat2 firstBindingName "_body"
-                        bodyResult = processImmediateSubterm cx 1 bodyPrefix bodyPathPrefix body
-                        newBody = Pairs.second bodyResult
-                    in (counter, (Core.TermLet (Core.Let {
-                      Core.letBindings = newBindings,
-                      Core.letBody = newBody})))
-          rewrite =
-                  \recurse -> \path -> \cx -> \counter -> \term -> case term of
-                    Core.TermLet _ ->
-                      let recursed = recurse counter term
-                          newCounter = Pairs.first recursed
-                          recursedTerm = Pairs.second recursed
-                      in case recursedTerm of
-                        Core.TermLet v1 -> processLetTerm cx newCounter path v1
-                        _ -> (newCounter, recursedTerm)
-                    _ -> recurse counter term
-      in (Pairs.second (Rewriting.rewriteAndFoldTermWithGraphAndPath rewrite cx0 1 term0))
-isApplicationFunction :: Paths.SubtermStep -> Bool
-isApplicationFunction acc =
-    case acc of
-      Paths.SubtermStepApplicationFunction -> True
-      _ -> False
-isLambdaBody :: Paths.SubtermStep -> Bool
-isLambdaBody acc =
-    case acc of
-      Paths.SubtermStepLambdaBody -> True
-      _ -> False
--- | Check if a term is a union elimination (case statement)
-isUnionElimination :: Core.Term -> Bool
-isUnionElimination term =
-    case term of
-      Core.TermCases _ -> True
-      _ -> False
--- | Check if a term is an application of a union elimination (case statement applied to an argument)
-isUnionEliminationApplication :: Core.Term -> Bool
-isUnionEliminationApplication term =
-    case term of
-      Core.TermApplication v0 -> isUnionElimination (Strip.deannotateAndDetypeTerm (Core.applicationFunction v0))
-      _ -> False
--- | Normalize a path for hoisting by treating immediately-applied lambdas as let bindings. Replaces [applicationFunction, lambdaBody, ...] with [letBody, ...].
-normalizePathForHoisting :: [Paths.SubtermStep] -> [Paths.SubtermStep]
-normalizePathForHoisting path =
-
-      let go =
-              \remaining -> Maybes.maybe remaining (\uc1 ->
-                let first = Pairs.first uc1
-                    afterFirst = Pairs.second uc1
-                in (Maybes.maybe remaining (\uc2 ->
-                  let second = Pairs.first uc2
-                      rest = Pairs.second uc2
-                  in (Logic.ifElse (Logic.and (isApplicationFunction first) (isLambdaBody second)) (Lists.cons Paths.SubtermStepLetBody (go rest)) (Lists.cons first (go afterFirst)))) (Lists.uncons afterFirst))) (Lists.uncons remaining)
-      in (go path)
--- | Predicate that always returns True, for hoisting all bindings unconditionally.
-shouldHoistAll :: t0 -> t1 -> Bool
-shouldHoistAll _ _2 = True
--- | Predicate for case statement hoisting. Returns True if term is a union elimination (bare case function) or a case statement application (union elimination applied to an argument) AND not at top level. Top level = reachable through annotations, let body/binding, lambda bodies, or ONE app LHS. Once through an app LHS, lambda bodies no longer pass through.
-shouldHoistCaseStatement :: ([Paths.SubtermStep], Core.Term) -> Bool
-shouldHoistCaseStatement pathAndTerm =
-
-      let path = Pairs.first pathAndTerm
-          term = Pairs.second pathAndTerm
-      in (Logic.ifElse (Logic.not (Logic.or (isUnionElimination term) (isUnionEliminationApplication term))) False (
-        let finalState = Lists.foldl (\st -> \acc -> updateHoistState acc st) (True, False) path
-        in (Logic.not (Pairs.first finalState))))
--- | Predicate for hoisting polymorphic bindings. Returns True if the binding is polymorphic (has type scheme variables) or if its type uses any type variables from the Graph.
-shouldHoistPolymorphic :: Graph.Graph -> Core.Binding -> Bool
-shouldHoistPolymorphic cx binding = Logic.or (bindingIsPolymorphic binding) (bindingUsesContextTypeVars cx binding)
--- | Update hoisting state when traversing an accessor. State is (atTopLevel, usedAppLHS). Returns updated state.
-updateHoistState :: Paths.SubtermStep -> (Bool, Bool) -> (Bool, Bool)
-updateHoistState accessor state =
-
-      let atTop = Pairs.first state
-          usedApp = Pairs.second state
-      in (Logic.ifElse (Logic.not atTop) (False, usedApp) (case accessor of
-        Paths.SubtermStepAnnotatedBody -> (True, usedApp)
-        Paths.SubtermStepLetBody -> (True, usedApp)
-        Paths.SubtermStepLetBinding _ -> (True, usedApp)
-        Paths.SubtermStepLambdaBody -> Logic.ifElse usedApp (False, True) (True, False)
-        Paths.SubtermStepUnionCasesBranch _ -> Logic.ifElse usedApp (False, True) (True, False)
-        Paths.SubtermStepUnionCasesDefault -> Logic.ifElse usedApp (False, True) (True, False)
-        Paths.SubtermStepApplicationFunction -> Logic.ifElse usedApp (False, True) (True, True)
-        Paths.SubtermStepApplicationArgument -> (False, usedApp)
-        _ -> (False, usedApp)))
diff --git a/src/main/haskell/Hydra/Iana/Linkrelations.hs b/src/main/haskell/Hydra/Iana/Linkrelations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Iana/Linkrelations.hs
+++ /dev/null
@@ -1,499 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | All IANA Link Relation Types, as of 2022-10-11. See https://www.iana.org/assignments/link-relations/link-relations.xhtml
-
-module Hydra.Iana.Linkrelations where
-
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | An IANA link relation type
-data LinkRelationType =
-  -- | Refers to a resource that is the subject of the link's context. [RFC6903], section 2
-  LinkRelationTypeAbout  |
-  -- | Asserts that the link target provides an access control resource for the link context. [https://solidproject.org/TR/wac#acl-link-relation]
-  LinkRelationTypeAcl  |
-  -- | Refers to a substitute for this context [HTML]
-  LinkRelationTypeAlternate  |
-  -- | Used to reference alternative content that uses the AMP profile of the HTML format. [AMP HTML]
-  LinkRelationTypeAmphtml  |
-  -- | Refers to an appendix. [HTML 4.01 Specification]
-  LinkRelationTypeAppendix  |
-  -- | Refers to an icon for the context. Synonym for icon. [Configuring Web Applications]
-  LinkRelationTypeApple_touch_icon  |
-  -- | Refers to a launch screen for the context. [Configuring Web Applications]
-  LinkRelationTypeApple_touch_startup_image  |
-  -- | Refers to a collection of records, documents, or other materials of historical interest. [HTML5]
-  LinkRelationTypeArchives  |
-  -- | Refers to the context's author. [HTML]
-  LinkRelationTypeAuthor  |
-  -- | Identifies the entity that blocks access to a resource following receipt of a legal demand. [RFC7725]
-  LinkRelationTypeBlocked_by  |
-  -- | Gives a permanent link to use for bookmarking purposes. [HTML]
-  LinkRelationTypeBookmark  |
-  -- | Designates the preferred version of a resource (the IRI and its contents). [RFC6596]
-  LinkRelationTypeCanonical  |
-  -- | Refers to a chapter in a collection of resources. [HTML 4.01 Specification]
-  LinkRelationTypeChapter  |
-  -- | Indicates that the link target is preferred over the link context for the purpose of permanent citation. [RFC8574]
-  LinkRelationTypeCite_as  |
-  -- | The target IRI points to a resource which represents the collection resource for the context IRI. [RFC6573]
-  LinkRelationTypeCollection  |
-  -- | Refers to a table of contents. [HTML 4.01 Specification]
-  LinkRelationTypeContents  |
-  -- | The document linked to was later converted to the document that contains this link relation. For example, an RFC can have a link to the Internet-Draft that became the RFC; in that case, the link relation would be "convertedFrom". [RFC7991] This relation is different than "predecessor-version" in that "predecessor-version" is for items in a version control system. It is also different than "previous" in that this relation is used for converted resources, not those that are part of a sequence of resources.
-  LinkRelationTypeConvertedfrom  |
-  -- | Refers to a copyright statement that applies to the link's context. [HTML 4.01 Specification]
-  LinkRelationTypeCopyright  |
-  -- | The target IRI points to a resource where a submission form can be obtained. [RFC6861]
-  LinkRelationTypeCreate_form  |
-  -- | Refers to a resource containing the most recent item(s) in a collection of resources. [RFC5005]
-  LinkRelationTypeCurrent  |
-  -- | Refers to a resource providing information about the link's context. [Protocol for Web Description Resources (POWDER)]
-  LinkRelationTypeDescribedby  |
-  -- | The relationship A 'describes' B asserts that resource A provides a description of resource B. There are no constraints on the format or representation of either A or B, neither are there any further constraints on either resource. [RFC6892] This link relation type is the inverse of the 'describedby' relation type. While 'describedby' establishes a relation from the described resource back to the resource that describes it, 'describes' established a relation from the describing resource to the resource it describes. If B is 'describedby' A, then A 'describes' B.
-  LinkRelationTypeDescribes  |
-  -- | Refers to a list of patent disclosures made with respect to material for which 'disclosure' relation is specified. [RFC6579]
-  LinkRelationTypeDisclosure  |
-  -- | Used to indicate an origin that will be used to fetch required resources for the link context, and that the user agent ought to resolve as early as possible. [Resource Hints]
-  LinkRelationTypeDns_prefetch  |
-  -- | Refers to a resource whose available representations are byte-for-byte identical with the corresponding representations of the context IRI. [RFC6249] This relation is for static resources. That is, an HTTP GET request on any duplicate will return the same representation. It does not make sense for dynamic or POSTable resources and should not be used for them.
-  LinkRelationTypeDuplicate  |
-  -- | Refers to a resource that can be used to edit the link's context. [RFC5023]
-  LinkRelationTypeEdit  |
-  -- | The target IRI points to a resource where a submission form for editing associated resource can be obtained. [RFC6861]
-  LinkRelationTypeEdit_form  |
-  -- | Refers to a resource that can be used to edit media associated with the link's context. [RFC5023]
-  LinkRelationTypeEdit_media  |
-  -- | Identifies a related resource that is potentially large and might require special handling. [RFC4287]
-  LinkRelationTypeEnclosure  |
-  -- | Refers to a resource that is not part of the same site as the current context. [HTML]
-  LinkRelationTypeExternal  |
-  -- | An IRI that refers to the furthest preceding resource in a series of resources. [RFC8288] This relation type registration did not indicate a reference. Originally requested by Mark Nottingham in December 2004.
-  LinkRelationTypeFirst  |
-  -- | Refers to a glossary of terms. [HTML 4.01 Specification]
-  LinkRelationTypeGlossary  |
-  -- | Refers to context-sensitive help. [HTML]
-  LinkRelationTypeHelp  |
-  -- | Refers to a resource hosted by the server indicated by the link context. [RFC6690] This relation is used in CoRE where links are retrieved as a "/.well-known/core" resource representation, and is the default relation type in the CoRE Link Format.
-  LinkRelationTypeHosts  |
-  -- | Refers to a hub that enables registration for notification of updates to the context. [WebSub] This relation type was requested by Brett Slatkin.
-  LinkRelationTypeHub  |
-  -- | Refers to an icon representing the link's context. [HTML]
-  LinkRelationTypeIcon  |
-  -- | Refers to an index. [HTML 4.01 Specification]
-  LinkRelationTypeIndex  |
-  -- | refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.21
-  LinkRelationTypeIntervalafter  |
-  -- | refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.22
-  LinkRelationTypeIntervalbefore  |
-  -- | refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.23
-  LinkRelationTypeIntervalcontains  |
-  -- | refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.24
-  LinkRelationTypeIntervaldisjoint  |
-  -- | refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.25
-  LinkRelationTypeIntervalduring  |
-  -- | refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.26
-  LinkRelationTypeIntervalequals  |
-  -- | refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.27
-  LinkRelationTypeIntervalfinishedby  |
-  -- | refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.28
-  LinkRelationTypeIntervalfinishes  |
-  -- | refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.29
-  LinkRelationTypeIntervalin  |
-  -- | refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.30
-  LinkRelationTypeIntervalmeets  |
-  -- | refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.31
-  LinkRelationTypeIntervalmetby  |
-  -- | refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.32
-  LinkRelationTypeIntervaloverlappedby  |
-  -- | refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.33
-  LinkRelationTypeIntervaloverlaps  |
-  -- | refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.34
-  LinkRelationTypeIntervalstartedby  |
-  -- | refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.35
-  LinkRelationTypeIntervalstarts  |
-  -- | The target IRI points to a resource that is a member of the collection represented by the context IRI. [RFC6573]
-  LinkRelationTypeItem  |
-  -- | An IRI that refers to the furthest following resource in a series of resources. [RFC8288] This relation type registration did not indicate a reference. Originally requested by Mark Nottingham in December 2004.
-  LinkRelationTypeLast  |
-  -- | Points to a resource containing the latest (e.g., current) version of the context. [RFC5829]
-  LinkRelationTypeLatest_version  |
-  -- | Refers to a license associated with this context. [RFC4946] For implications of use in HTML, see: http://www.w3.org/TR/html5/links.html#link-type-license
-  LinkRelationTypeLicense  |
-  -- | The link target of a link with the "linkset" relation type provides a set of links, including links in which the link context of the link participates. [RFC9264]
-  LinkRelationTypeLinkset  |
-  -- | Refers to further information about the link's context, expressed as a LRDD ("Link-based Resource Descriptor Document") resource. See [RFC6415] for information about processing this relation type in host-meta documents. When used elsewhere, it refers to additional links and other metadata. Multiple instances indicate additional LRDD resources. LRDD resources MUST have an "application/xrd+xml" representation, and MAY have others. [RFC6415]
-  LinkRelationTypeLrdd  |
-  -- | Links to a manifest file for the context. [Web App Manifest]
-  LinkRelationTypeManifest  |
-  -- | Refers to a mask that can be applied to the icon for the context. [Creating Pinned Tab Icons]
-  LinkRelationTypeMask_icon  |
-  -- | Refers to a feed of personalised media recommendations relevant to the link context. [https://wicg.github.io/media-feeds/#discovery-of-media-feeds]
-  LinkRelationTypeMedia_feed  |
-  -- | The Target IRI points to a Memento, a fixed resource that will not change state anymore. [RFC7089] A Memento for an Original Resource is a resource that encapsulates a prior state of the Original Resource.
-  LinkRelationTypeMemento  |
-  -- | Links to the context's Micropub endpoint. [Micropub]
-  LinkRelationTypeMicropub  |
-  -- | Refers to a module that the user agent is to preemptively fetch and store for use in the current context. [HTML]
-  LinkRelationTypeModulepreload  |
-  -- | Refers to a resource that can be used to monitor changes in an HTTP resource. [RFC5989]
-  LinkRelationTypeMonitor  |
-  -- | Refers to a resource that can be used to monitor changes in a specified group of HTTP resources. [RFC5989]
-  LinkRelationTypeMonitor_group  |
-  -- | Indicates that the link's context is a part of a series, and that the next in the series is the link target. [HTML]
-  LinkRelationTypeNext  |
-  -- | Refers to the immediately following archive resource. [RFC5005]
-  LinkRelationTypeNext_archive  |
-  -- | Indicates that the context's original author or publisher does not endorse the link target. [HTML]
-  LinkRelationTypeNofollow  |
-  -- | Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context. [HTML]
-  LinkRelationTypeNoopener  |
-  -- | Indicates that no referrer information is to be leaked when following the link. [HTML]
-  LinkRelationTypeNoreferrer  |
-  -- | Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context. [HTML]
-  LinkRelationTypeOpener  |
-  -- | Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier. [OpenID Authentication 2.0 - Final]
-  LinkRelationTypeOpenid2_local_id  |
-  -- | Refers to a resource which accepts OpenID Authentication protocol messages for the context. [OpenID Authentication 2.0 - Final]
-  LinkRelationTypeOpenid2_provider  |
-  -- | The Target IRI points to an Original Resource. [RFC7089] An Original Resource is a resource that exists or used to exist, and for which access to one of its prior states may be required.
-  LinkRelationTypeOriginal  |
-  -- | Refers to a P3P privacy policy for the context. [The Platform for Privacy Preferences 1.0 (P3P1.0) Specification]
-  LinkRelationTypeP3pv1  |
-  -- | Indicates a resource where payment is accepted. [RFC8288] This relation type registration did not indicate a reference. Requested by Joshua Kinberg and Robert Sayre. It is meant as a general way to facilitate acts of payment, and thus this specification makes no assumptions on the type of payment or transaction protocol. Examples may include a web page where donations are accepted or where goods and services are available for purchase. rel="payment" is not intended to initiate an automated transaction. In Atom documents, a link element with a rel="payment" attribute may exist at the feed/channel level and/or the entry/item level. For example, a rel="payment" link at the feed/channel level may point to a "tip jar" URI, whereas an entry/ item containing a book review may include a rel="payment" link that points to the location where the book may be purchased through an online retailer.
-  LinkRelationTypePayment  |
-  -- | Gives the address of the pingback resource for the link context. [Pingback 1.0]
-  LinkRelationTypePingback  |
-  -- | Used to indicate an origin that will be used to fetch required resources for the link context. Initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, allows the user agent to mask the high latency costs of establishing a connection. [Resource Hints]
-  LinkRelationTypePreconnect  |
-  -- | Points to a resource containing the predecessor version in the version history. [RFC5829]
-  LinkRelationTypePredecessor_version  |
-  -- | The prefetch link relation type is used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch, such that the user agent can deliver a faster response once the resource is requested in the future. [Resource Hints]
-  LinkRelationTypePrefetch  |
-  -- | Refers to a resource that should be loaded early in the processing of the link's context, without blocking rendering. [Preload] Additional target attributes establish the detailed fetch properties of the link.
-  LinkRelationTypePreload  |
-  -- | Used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch and execute, such that the user agent can deliver a faster response once the resource is requested in the future. [Resource Hints]
-  LinkRelationTypePrerender  |
-  -- | Indicates that the link's context is a part of a series, and that the previous in the series is the link target. [HTML]
-  LinkRelationTypePrev  |
-  -- | Refers to a resource that provides a preview of the link's context. [RFC6903], section 3
-  LinkRelationTypePreview  |
-  -- | Refers to the previous resource in an ordered series of resources. Synonym for "prev". [HTML 4.01 Specification]
-  LinkRelationTypePrevious  |
-  -- | Refers to the immediately preceding archive resource. [RFC5005]
-  LinkRelationTypePrev_archive  |
-  -- | Refers to a privacy policy associated with the link's context. [RFC6903], section 4
-  LinkRelationTypePrivacy_policy  |
-  -- | Identifying that a resource representation conforms to a certain profile, without affecting the non-profile semantics of the resource representation. [RFC6906] Profile URIs are primarily intended to be used as identifiers, and thus clients SHOULD NOT indiscriminately access profile URIs.
-  LinkRelationTypeProfile  |
-  -- | Links to a publication manifest. A manifest represents structured information about a publication, such as informative metadata, a list of resources, and a default reading order. [Publication Manifest]
-  LinkRelationTypePublication  |
-  -- | Identifies a related resource. [RFC4287]
-  LinkRelationTypeRelated  |
-  -- | Identifies the root of RESTCONF API as configured on this HTTP server. The "restconf" relation defines the root of the API defined in RFC8040. Subsequent revisions of RESTCONF will use alternate relation values to support protocol versioning. [RFC8040]
-  LinkRelationTypeRestconf  |
-  -- | Identifies a resource that is a reply to the context of the link. [RFC4685]
-  LinkRelationTypeReplies  |
-  -- | The resource identified by the link target provides an input value to an instance of a rule, where the resource which represents the rule instance is identified by the link context. [OCF Core Optional 2.2.0]
-  LinkRelationTypeRuleinput  |
-  -- | Refers to a resource that can be used to search through the link's context and related resources. [OpenSearch]
-  LinkRelationTypeSearch  |
-  -- | Refers to a section in a collection of resources. [HTML 4.01 Specification]
-  LinkRelationTypeSection  |
-  -- | Conveys an identifier for the link's context. [RFC4287]
-  LinkRelationTypeSelf  |
-  -- | Indicates a URI that can be used to retrieve a service document. [RFC5023] When used in an Atom document, this relation type specifies Atom Publishing Protocol service documents by default. Requested by James Snell.
-  LinkRelationTypeService  |
-  -- | Identifies service description for the context that is primarily intended for consumption by machines. [RFC8631]
-  LinkRelationTypeService_desc  |
-  -- | Identifies service documentation for the context that is primarily intended for human consumption. [RFC8631]
-  LinkRelationTypeService_doc  |
-  -- | Identifies general metadata for the context that is primarily intended for consumption by machines. [RFC8631]
-  LinkRelationTypeService_meta  |
-  -- | refers to a capability document that defines parameters or configuration requirements for automated peering and communication channel negotiation of the Session Initiation Protocol (SIP). [draft-engi-siptrunkingcapability-link]
-  LinkRelationTypeSiptrunkingcapability  |
-  -- | Refers to a resource that is within a context that is sponsored (such as advertising or another compensation agreement). [Google Blog post 09-2019]
-  LinkRelationTypeSponsored  |
-  -- | Refers to the first resource in a collection of resources. [HTML 4.01 Specification]
-  LinkRelationTypeStart  |
-  -- | Identifies a resource that represents the context's status. [RFC8631]
-  LinkRelationTypeStatus  |
-  -- | Refers to a stylesheet. [HTML]
-  LinkRelationTypeStylesheet  |
-  -- | Refers to a resource serving as a subsection in a collection of resources. [HTML 4.01 Specification]
-  LinkRelationTypeSubsection  |
-  -- | Points to a resource containing the successor version in the version history. [RFC5829]
-  LinkRelationTypeSuccessor_version  |
-  -- | Identifies a resource that provides information about the context's retirement policy. [RFC8594]
-  LinkRelationTypeSunset  |
-  -- | Gives a tag (identified by the given address) that applies to the current document. [HTML]
-  LinkRelationTypeTag  |
-  -- | Refers to the terms of service associated with the link's context. [RFC6903], section 5
-  LinkRelationTypeTerms_of_service  |
-  -- | The Target IRI points to a TimeGate for an Original Resource. [RFC7089] A TimeGate for an Original Resource is a resource that is capable of datetime negotiation to support access to prior states of the Original Resource.
-  LinkRelationTypeTimegate  |
-  -- | The Target IRI points to a TimeMap for an Original Resource. [RFC7089] A TimeMap for an Original Resource is a resource from which a list of URIs of Mementos of the Original Resource is available.
-  LinkRelationTypeTimemap  |
-  -- | Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance. [RFC6903], section 6
-  LinkRelationTypeType  |
-  -- | Refers to a resource that is within a context that is User Generated Content. [Google Blog post 09-2019]
-  LinkRelationTypeUgc  |
-  -- | Refers to a parent document in a hierarchy of documents. [RFC8288] This relation type registration did not indicate a reference. Requested by Noah Slater.
-  LinkRelationTypeUp  |
-  -- | Points to a resource containing the version history for the context. [RFC5829]
-  LinkRelationTypeVersion_history  |
-  -- | Identifies a resource that is the source of the information in the link's context. [RFC4287]
-  LinkRelationTypeVia  |
-  -- | Identifies a target URI that supports the Webmention protocol. This allows clients that mention a resource in some form of publishing process to contact that endpoint and inform it that this resource has been mentioned. [Webmention] This is a similar "Linkback" mechanism to the ones of Refback, Trackback, and Pingback. It uses a different protocol, though, and thus should be discoverable through its own link relation type.
-  LinkRelationTypeWebmention  |
-  -- | Points to a working copy for this resource. [RFC5829]
-  LinkRelationTypeWorking_copy  |
-  -- | Points to the versioned resource from which this working copy was obtained. [RFC5829]
-  LinkRelationTypeWorking_copy_of
-  deriving (Eq, Ord, Read, Show)
-
-_LinkRelationType = Core.Name "hydra.iana.linkrelations.LinkRelationType"
-
-_LinkRelationType_about = Core.Name "about"
-
-_LinkRelationType_acl = Core.Name "acl"
-
-_LinkRelationType_alternate = Core.Name "alternate"
-
-_LinkRelationType_amphtml = Core.Name "amphtml"
-
-_LinkRelationType_appendix = Core.Name "appendix"
-
-_LinkRelationType_apple_touch_icon = Core.Name "apple-touch-icon"
-
-_LinkRelationType_apple_touch_startup_image = Core.Name "apple-touch-startup-image"
-
-_LinkRelationType_archives = Core.Name "archives"
-
-_LinkRelationType_author = Core.Name "author"
-
-_LinkRelationType_blocked_by = Core.Name "blocked-by"
-
-_LinkRelationType_bookmark = Core.Name "bookmark"
-
-_LinkRelationType_canonical = Core.Name "canonical"
-
-_LinkRelationType_chapter = Core.Name "chapter"
-
-_LinkRelationType_cite_as = Core.Name "cite-as"
-
-_LinkRelationType_collection = Core.Name "collection"
-
-_LinkRelationType_contents = Core.Name "contents"
-
-_LinkRelationType_convertedfrom = Core.Name "convertedfrom"
-
-_LinkRelationType_copyright = Core.Name "copyright"
-
-_LinkRelationType_create_form = Core.Name "create-form"
-
-_LinkRelationType_current = Core.Name "current"
-
-_LinkRelationType_describedby = Core.Name "describedby"
-
-_LinkRelationType_describes = Core.Name "describes"
-
-_LinkRelationType_disclosure = Core.Name "disclosure"
-
-_LinkRelationType_dns_prefetch = Core.Name "dns-prefetch"
-
-_LinkRelationType_duplicate = Core.Name "duplicate"
-
-_LinkRelationType_edit = Core.Name "edit"
-
-_LinkRelationType_edit_form = Core.Name "edit-form"
-
-_LinkRelationType_edit_media = Core.Name "edit-media"
-
-_LinkRelationType_enclosure = Core.Name "enclosure"
-
-_LinkRelationType_external = Core.Name "external"
-
-_LinkRelationType_first = Core.Name "first"
-
-_LinkRelationType_glossary = Core.Name "glossary"
-
-_LinkRelationType_help = Core.Name "help"
-
-_LinkRelationType_hosts = Core.Name "hosts"
-
-_LinkRelationType_hub = Core.Name "hub"
-
-_LinkRelationType_icon = Core.Name "icon"
-
-_LinkRelationType_index = Core.Name "index"
-
-_LinkRelationType_intervalafter = Core.Name "intervalafter"
-
-_LinkRelationType_intervalbefore = Core.Name "intervalbefore"
-
-_LinkRelationType_intervalcontains = Core.Name "intervalcontains"
-
-_LinkRelationType_intervaldisjoint = Core.Name "intervaldisjoint"
-
-_LinkRelationType_intervalduring = Core.Name "intervalduring"
-
-_LinkRelationType_intervalequals = Core.Name "intervalequals"
-
-_LinkRelationType_intervalfinishedby = Core.Name "intervalfinishedby"
-
-_LinkRelationType_intervalfinishes = Core.Name "intervalfinishes"
-
-_LinkRelationType_intervalin = Core.Name "intervalin"
-
-_LinkRelationType_intervalmeets = Core.Name "intervalmeets"
-
-_LinkRelationType_intervalmetby = Core.Name "intervalmetby"
-
-_LinkRelationType_intervaloverlappedby = Core.Name "intervaloverlappedby"
-
-_LinkRelationType_intervaloverlaps = Core.Name "intervaloverlaps"
-
-_LinkRelationType_intervalstartedby = Core.Name "intervalstartedby"
-
-_LinkRelationType_intervalstarts = Core.Name "intervalstarts"
-
-_LinkRelationType_item = Core.Name "item"
-
-_LinkRelationType_last = Core.Name "last"
-
-_LinkRelationType_latest_version = Core.Name "latest-version"
-
-_LinkRelationType_license = Core.Name "license"
-
-_LinkRelationType_linkset = Core.Name "linkset"
-
-_LinkRelationType_lrdd = Core.Name "lrdd"
-
-_LinkRelationType_manifest = Core.Name "manifest"
-
-_LinkRelationType_mask_icon = Core.Name "mask-icon"
-
-_LinkRelationType_media_feed = Core.Name "media-feed"
-
-_LinkRelationType_memento = Core.Name "memento"
-
-_LinkRelationType_micropub = Core.Name "micropub"
-
-_LinkRelationType_modulepreload = Core.Name "modulepreload"
-
-_LinkRelationType_monitor = Core.Name "monitor"
-
-_LinkRelationType_monitor_group = Core.Name "monitor-group"
-
-_LinkRelationType_next = Core.Name "next"
-
-_LinkRelationType_next_archive = Core.Name "next-archive"
-
-_LinkRelationType_nofollow = Core.Name "nofollow"
-
-_LinkRelationType_noopener = Core.Name "noopener"
-
-_LinkRelationType_noreferrer = Core.Name "noreferrer"
-
-_LinkRelationType_opener = Core.Name "opener"
-
-_LinkRelationType_openid2_local_id = Core.Name "openid2.local_id"
-
-_LinkRelationType_openid2_provider = Core.Name "openid2.provider"
-
-_LinkRelationType_original = Core.Name "original"
-
-_LinkRelationType_p3pv1 = Core.Name "p3pv1"
-
-_LinkRelationType_payment = Core.Name "payment"
-
-_LinkRelationType_pingback = Core.Name "pingback"
-
-_LinkRelationType_preconnect = Core.Name "preconnect"
-
-_LinkRelationType_predecessor_version = Core.Name "predecessor-version"
-
-_LinkRelationType_prefetch = Core.Name "prefetch"
-
-_LinkRelationType_preload = Core.Name "preload"
-
-_LinkRelationType_prerender = Core.Name "prerender"
-
-_LinkRelationType_prev = Core.Name "prev"
-
-_LinkRelationType_preview = Core.Name "preview"
-
-_LinkRelationType_previous = Core.Name "previous"
-
-_LinkRelationType_prev_archive = Core.Name "prev-archive"
-
-_LinkRelationType_privacy_policy = Core.Name "privacy-policy"
-
-_LinkRelationType_profile = Core.Name "profile"
-
-_LinkRelationType_publication = Core.Name "publication"
-
-_LinkRelationType_related = Core.Name "related"
-
-_LinkRelationType_restconf = Core.Name "restconf"
-
-_LinkRelationType_replies = Core.Name "replies"
-
-_LinkRelationType_ruleinput = Core.Name "ruleinput"
-
-_LinkRelationType_search = Core.Name "search"
-
-_LinkRelationType_section = Core.Name "section"
-
-_LinkRelationType_self = Core.Name "self"
-
-_LinkRelationType_service = Core.Name "service"
-
-_LinkRelationType_service_desc = Core.Name "service-desc"
-
-_LinkRelationType_service_doc = Core.Name "service-doc"
-
-_LinkRelationType_service_meta = Core.Name "service-meta"
-
-_LinkRelationType_siptrunkingcapability = Core.Name "siptrunkingcapability"
-
-_LinkRelationType_sponsored = Core.Name "sponsored"
-
-_LinkRelationType_start = Core.Name "start"
-
-_LinkRelationType_status = Core.Name "status"
-
-_LinkRelationType_stylesheet = Core.Name "stylesheet"
-
-_LinkRelationType_subsection = Core.Name "subsection"
-
-_LinkRelationType_successor_version = Core.Name "successor-version"
-
-_LinkRelationType_sunset = Core.Name "sunset"
-
-_LinkRelationType_tag = Core.Name "tag"
-
-_LinkRelationType_terms_of_service = Core.Name "terms-of-service"
-
-_LinkRelationType_timegate = Core.Name "timegate"
-
-_LinkRelationType_timemap = Core.Name "timemap"
-
-_LinkRelationType_type = Core.Name "type"
-
-_LinkRelationType_ugc = Core.Name "ugc"
-
-_LinkRelationType_up = Core.Name "up"
-
-_LinkRelationType_version_history = Core.Name "version-history"
-
-_LinkRelationType_via = Core.Name "via"
-
-_LinkRelationType_webmention = Core.Name "webmention"
-
-_LinkRelationType_working_copy = Core.Name "working-copy"
-
-_LinkRelationType_working_copy_of = Core.Name "working-copy-of"
diff --git a/src/main/haskell/Hydra/Inference.hs b/src/main/haskell/Hydra/Inference.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Inference.hs
+++ /dev/null
@@ -1,1060 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type inference following Algorithm W, extended for nominal terms and types
-
-module Hydra.Inference where
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Checking as Checking
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-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.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Reflect as Reflect
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Show.Typing as ShowTyping
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Substitution as Substitution
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Unification as Unification
-import qualified Hydra.Variables as Variables
-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
--- | Return the element at the given index, or Left(Other) with the given description if out of range
-atOrFail :: Int -> String -> [t0] -> Either Errors.Error t0
-atOrFail i desc xs =
-    Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "atOrFail: " desc)))) (\x -> Right x) (Lists.maybeAt i xs)
--- | Unify type constraints and check the substitution
-bindConstraints :: t0 -> Graph.Graph -> [Typing.TypeConstraint] -> Either Errors.Error Typing.TypeSubst
-bindConstraints flowCx cx constraints =
-    Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorUnification _e) (\_a -> _a) (Unification.unifyTypeConstraints flowCx (Graph.graphSchemaTypes cx) constraints)) (\s -> Eithers.bind (Checking.checkTypeSubst flowCx cx s) (\_ -> Right s))
--- | Handle unbound type variables under a typed let binding. Variables appearing free in the binding's declared type (but not in schema types or the scheme's own quantified variables) are added to the scheme and the term is wrapped in matching TypeLambdas. Variables appearing only in the term body (at type-application or lambda-domain positions) are phantom — they have no external effect on the binding's type — and are substituted with hydra.core.Unit in the body rather than generalized. This keeps downstream stages from seeing vacuous foralls that target languages with non-polymorphic value bindings (e.g. Scala val) cannot express.
-bindUnboundTypeVariables :: Graph.Graph -> Core.Term -> Core.Term
-bindUnboundTypeVariables cx term0 =
-
-      let svars = Sets.fromList (Maps.keys (Graph.graphSchemaTypes cx))
-          rewrite =
-                  \recurse -> \term -> case term of
-                    Core.TermLet v0 ->
-                      let forBinding =
-                              \b ->
-                                let bname = Core.bindingName b
-                                    bterm = Core.bindingTerm b
-                                in (Maybes.maybe (Core.Binding {
-                                  Core.bindingName = bname,
-                                  Core.bindingTerm = (bindUnboundTypeVariables cx bterm),
-                                  Core.bindingTypeScheme = Nothing}) (\ts ->
-                                  let bvars = Sets.fromList (Core.typeSchemeVariables ts)
-                                      excluded = Sets.union svars bvars
-                                      inType = Sets.difference (Variables.freeVariablesInType (Core.typeSchemeBody ts)) excluded
-                                      phantoms = Sets.difference (Variables.freeTypeVariablesInTerm bterm) (Sets.union excluded inType)
-                                      phantomSubst = Typing.TypeSubst (Maps.fromList (Lists.map (\v -> (v, Core.TypeUnit)) (Sets.toList phantoms)))
-                                      bterm1 = Substitution.substTypesInTerm phantomSubst bterm
-                                      unbound = Sets.toList inType
-                                      ts2 =
-                                              Core.TypeScheme {
-                                                Core.typeSchemeVariables = (Lists.concat2 (Core.typeSchemeVariables ts) unbound),
-                                                Core.typeSchemeBody = (Core.typeSchemeBody ts),
-                                                Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts)}
-                                      bterm2 =
-                                              Lists.foldl (\t -> \v -> Core.TermTypeLambda (Core.TypeLambda {
-                                                Core.typeLambdaParameter = v,
-                                                Core.typeLambdaBody = t})) bterm1 unbound
-                                  in Core.Binding {
-                                    Core.bindingName = bname,
-                                    Core.bindingTerm = bterm2,
-                                    Core.bindingTypeScheme = (Just ts2)}) (Core.bindingTypeScheme b))
-                      in (Core.TermLet (Core.Let {
-                        Core.letBindings = (Lists.map forBinding (Core.letBindings v0)),
-                        Core.letBody = (bindUnboundTypeVariables cx (Core.letBody v0))}))
-                    _ -> recurse term
-      in (Rewriting.rewriteTerm rewrite term0)
--- | Fold a list of type variables over a term to build a type application term
-buildTypeApplicationTerm :: [Core.Name] -> Core.Term -> Core.Term
-buildTypeApplicationTerm tvars body =
-    Lists.foldl (\t -> \v -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-      Core.typeApplicationTermBody = t,
-      Core.typeApplicationTermType = (Core.TypeVariable v)})) body tvars
--- | Add (term variable, type scheme) pairs to the graph's bound types
-extendContext :: [(Core.Name, Core.TypeScheme)] -> Graph.Graph -> Graph.Graph
-extendContext pairs cx =
-    Graph.Graph {
-      Graph.graphBoundTerms = (Graph.graphBoundTerms cx),
-      Graph.graphBoundTypes = (Maps.union (Maps.fromList pairs) (Graph.graphBoundTypes cx)),
-      Graph.graphClassConstraints = (Graph.graphClassConstraints cx),
-      Graph.graphLambdaVariables = (Graph.graphLambdaVariables cx),
-      Graph.graphMetadata = (Graph.graphMetadata cx),
-      Graph.graphPrimitives = (Graph.graphPrimitives cx),
-      Graph.graphSchemaTypes = (Graph.graphSchemaTypes cx),
-      Graph.graphTypeVariables = (Graph.graphTypeVariables cx)}
--- | Finalize an inferred term by checking for unbound type variables, then normalizing type variables
-finalizeInferredTerm :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-finalizeInferredTerm flowCx cx term =
-
-      let term2 = bindUnboundTypeVariables cx term
-      in (Eithers.bind (Checking.checkForUnboundTypeVariables flowCx cx term2) (\_ -> Right (Variables.normalizeTypeVariablesInTerm term2)))
--- | Infer a term's type and map over the result
-forInferredTerm :: Context.Context -> Graph.Graph -> Core.Term -> String -> (Typing.InferenceResult -> t0) -> Either Errors.Error (t0, Context.Context)
-forInferredTerm fcx cx term desc f =
-    Eithers.bind (inferTypeOfTerm fcx cx term desc) (\rp -> Right (f rp, (Typing.inferenceResultContext rp)))
--- | Get all free variables in a graph's bound types
-freeVariablesInContext :: Graph.Graph -> S.Set Core.Name
-freeVariablesInContext cx =
-    Lists.foldl Sets.union Sets.empty (Lists.map Variables.freeVariablesInTypeSchemeSimple (Maps.elems (Graph.graphBoundTypes cx)))
--- | Generate a fresh type variable
-freshVariableType :: Context.Context -> (Core.Type, Context.Context)
-freshVariableType cx =
-
-      let result = Names.freshName cx
-          name = Pairs.first result
-          cx2 = Pairs.second result
-      in (Core.TypeVariable name, cx2)
--- | Generalize a type to a type scheme
-generalize :: Graph.Graph -> Core.Type -> Core.TypeScheme
-generalize cx typ =
-
-      let isTypeVarName =
-              \name ->
-                let parts = Strings.splitOn "." (Core.unName name)
-                in (Equality.lte (Lists.length parts) 1)
-          vars =
-                  Lists.nub (Lists.filter (\v -> Logic.and (isUnbound cx v) (isTypeVarName v)) (Variables.freeVariablesInTypeOrdered typ))
-          allConstraints = Graph.graphClassConstraints cx
-          relevantConstraints =
-                  Maps.fromList (Maybes.cat (Lists.map (\v -> Maybes.map (\meta -> (v, meta)) (Maps.lookup v allConstraints)) vars))
-          constraintsMaybe = Logic.ifElse (Maps.null relevantConstraints) Nothing (Just relevantConstraints)
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = vars,
-        Core.typeSchemeBody = typ,
-        Core.typeSchemeConstraints = constraintsMaybe}
--- | Return the first element of a list, or Left(Other) with the given description if the list is empty
-headOrFail :: String -> [t0] -> Either Errors.Error t0
-headOrFail desc xs =
-    Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "headOrFail: " desc)))) (\x -> Right x) (Lists.maybeHead xs)
--- | Infer types for all elements in a graph, using the provided ordered bindings. Returns both the inferred graph and the ordered inferred bindings.
-inferGraphTypes :: Context.Context -> [Core.Binding] -> Graph.Graph -> Either Errors.Error ((Graph.Graph, [Core.Binding]), Context.Context)
-inferGraphTypes fcx0 bindings0 g0 =
-
-      let fcx =
-              Context.Context {
-                Context.contextTrace = (Lists.cons "graph inference" (Context.contextTrace fcx0)),
-                Context.contextMessages = (Context.contextMessages fcx0),
-                Context.contextOther = (Context.contextOther fcx0)}
-          let0 =
-                  Core.Let {
-                    Core.letBindings = bindings0,
-                    Core.letBody = Core.TermUnit}
-          fromLetTerm =
-                  \l ->
-                    let bindings = Core.letBindings l
-                        prims = Graph.graphPrimitives g0
-                        schemaTypes = Graph.graphSchemaTypes g0
-                        rawG = Lexical.buildGraph bindings Maps.empty prims
-                        g =
-                                Graph.Graph {
-                                  Graph.graphBoundTerms = (Graph.graphBoundTerms rawG),
-                                  Graph.graphBoundTypes = (Graph.graphBoundTypes rawG),
-                                  Graph.graphClassConstraints = (Graph.graphClassConstraints rawG),
-                                  Graph.graphLambdaVariables = (Graph.graphLambdaVariables rawG),
-                                  Graph.graphMetadata = (Graph.graphMetadata rawG),
-                                  Graph.graphPrimitives = (Graph.graphPrimitives rawG),
-                                  Graph.graphSchemaTypes = schemaTypes,
-                                  Graph.graphTypeVariables = (Graph.graphTypeVariables rawG)}
-                    in (g, bindings)
-      in (Eithers.bind (inferTypeOfTerm fcx g0 (Core.TermLet let0) "graph term") (\result ->
-        let fcx2 = Typing.inferenceResultContext result
-            term = Typing.inferenceResultTerm result
-        in (Eithers.bind (finalizeInferredTerm fcx2 g0 term) (\finalized -> case finalized of
-          Core.TermLet v0 -> Right (fromLetTerm v0, fcx2)
-          Core.TermVariable _ -> Left (Errors.ErrorOther (Errors.OtherError "Expected inferred graph as let term"))))))
--- | Infer the type of a term in a given inference context
-inferInGraphContext :: Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error Typing.InferenceResult
-inferInGraphContext fcx cx term = inferTypeOfTerm fcx cx term "single term"
--- | Infer types for multiple terms, propagating class constraints from sub-expressions
-inferMany :: Context.Context -> Graph.Graph -> [(Core.Term, String)] -> Either Errors.Error (([Core.Term], ([Core.Type], (Typing.TypeSubst, (M.Map Core.Name Core.TypeVariableMetadata)))), Context.Context)
-inferMany fcx cx pairs =
-
-      let emptyResult = Right (([], ([], (Substitution.idTypeSubst, Maps.empty))), fcx)
-      in (Maybes.maybe emptyResult (\pairsUc ->
-        let headPair = Pairs.first pairsUc
-            tl = Pairs.second pairsUc
-            e = Pairs.first headPair
-            desc = Pairs.second headPair
-        in (Eithers.bind (inferTypeOfTerm fcx cx e desc) (\result1 ->
-          let fcx2 = Typing.inferenceResultContext result1
-              e1 = Typing.inferenceResultTerm result1
-              t1 = Typing.inferenceResultType result1
-              s1 = Typing.inferenceResultSubst result1
-              c1 = Typing.inferenceResultClassConstraints result1
-          in (Eithers.bind (inferMany fcx2 (Substitution.substInContext s1 cx) tl) (\rp2 ->
-            let result2 = Pairs.first rp2
-                fcx3 = Pairs.second rp2
-                e2 = Pairs.first result2
-                t2 = Pairs.first (Pairs.second result2)
-                s2 = Pairs.first (Pairs.second (Pairs.second result2))
-                c2 = Pairs.second (Pairs.second (Pairs.second result2))
-                c1Subst = Substitution.substInClassConstraints s2 c1
-                mergedConstraints = mergeClassConstraints c1Subst c2
-            in (Right ((Lists.cons (Substitution.substTypesInTerm s2 e1) e2, (Lists.cons (Substitution.substInType s2 t1) t2, (Substitution.composeTypeSubst s1 s2, mergedConstraints))), fcx3))))))) (Lists.uncons pairs))
--- | Map a possibly untyped term to a fully typed term and its type
-inferTypeOf :: Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error ((Core.Term, Core.TypeScheme), Context.Context)
-inferTypeOf fcx cx term =
-
-      let letTerm =
-              Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "ignoredVariableName"),
-                    Core.bindingTerm = term,
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermLiteral (Core.LiteralString "ignoredBody"))})
-      in (Eithers.bind (inferTypeOfTerm fcx cx letTerm "infer type of term") (\result ->
-        let fcx2 = Typing.inferenceResultContext result
-        in (Eithers.bind (finalizeInferredTerm fcx2 cx (Typing.inferenceResultTerm result)) (\finalized -> Eithers.bind (ExtractCore.let_ cx finalized) (\letResult ->
-          let bindings = Core.letBindings letResult
-          in (Logic.ifElse (Equality.equal 1 (Lists.length bindings)) (Eithers.bind (headOrFail "inferTypeOf: single binding expected" bindings) (\binding ->
-            let term1 = Core.bindingTerm binding
-                mts = Core.bindingTypeScheme binding
-            in (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "Expected a type scheme"))) (\ts -> Right ((term1, ts), fcx2)) mts))) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-            "Expected a single binding with a type scheme, but got: ",
-            (Literals.showInt32 (Lists.length bindings)),
-            " bindings"]))))))))))
--- | Infer the type of an annotated term (Either version)
-inferTypeOfAnnotatedTerm :: Context.Context -> Graph.Graph -> Core.AnnotatedTerm -> Either Errors.Error Typing.InferenceResult
-inferTypeOfAnnotatedTerm fcx cx at =
-
-      let term = Core.annotatedTermBody at
-          ann = Core.annotatedTermAnnotation at
-      in (Eithers.bind (inferTypeOfTerm fcx cx term "annotated term") (\result ->
-        let fcx2 = Typing.inferenceResultContext result
-            iterm = Typing.inferenceResultTerm result
-            itype = Typing.inferenceResultType result
-            isubst = Typing.inferenceResultSubst result
-            iconstraints = Typing.inferenceResultClassConstraints result
-        in (Right (Typing.InferenceResult {
-          Typing.inferenceResultTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-            Core.annotatedTermBody = iterm,
-            Core.annotatedTermAnnotation = ann})),
-          Typing.inferenceResultType = itype,
-          Typing.inferenceResultSubst = isubst,
-          Typing.inferenceResultClassConstraints = iconstraints,
-          Typing.inferenceResultContext = fcx2}))))
--- | Infer the type of a function application (Either version)
-inferTypeOfApplication :: Context.Context -> Graph.Graph -> Core.Application -> Either Errors.Error Typing.InferenceResult
-inferTypeOfApplication fcx0 cx app =
-
-      let fcx =
-              Context.Context {
-                Context.contextTrace = (Lists.cons "application" (Context.contextTrace fcx0)),
-                Context.contextMessages = (Context.contextMessages fcx0),
-                Context.contextOther = (Context.contextOther fcx0)}
-          e0 = Core.applicationFunction app
-          e1 = Core.applicationArgument app
-      in (Eithers.bind (inferTypeOfTerm fcx cx e0 "lhs") (\lhsResult ->
-        let fcx2 = Typing.inferenceResultContext lhsResult
-            a = Typing.inferenceResultTerm lhsResult
-            t0 = Typing.inferenceResultType lhsResult
-            s0 = Typing.inferenceResultSubst lhsResult
-            c0 = Typing.inferenceResultClassConstraints lhsResult
-        in (Eithers.bind (inferTypeOfTerm fcx2 (Substitution.substInContext s0 cx) e1 "rhs") (\rhsResult ->
-          let fcx3 = Typing.inferenceResultContext rhsResult
-              b = Typing.inferenceResultTerm rhsResult
-              t1 = Typing.inferenceResultType rhsResult
-              s1 = Typing.inferenceResultSubst rhsResult
-              c1 = Typing.inferenceResultClassConstraints rhsResult
-              vResult = Names.freshName fcx3
-              v = Pairs.first vResult
-              fcx4 = Pairs.second vResult
-          in (Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorUnification _e) (\_a -> _a) (Unification.unifyTypes fcx4 (Graph.graphSchemaTypes cx) (Substitution.substInType s1 t0) (Core.TypeFunction (Core.FunctionType {
-            Core.functionTypeDomain = t1,
-            Core.functionTypeCodomain = (Core.TypeVariable v)})) "application lhs")) (\s2 -> Eithers.bind (Checking.checkTypeSubst fcx4 cx s2) (\_ ->
-            let rExpr =
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Substitution.substTypesInTerm (Substitution.composeTypeSubst s1 s2) a),
-                      Core.applicationArgument = (Substitution.substTypesInTerm s2 b)})
-                rType = Substitution.substInType s2 (Core.TypeVariable v)
-                rSubst =
-                        Substitution.composeTypeSubstList [
-                          s0,
-                          s1,
-                          s2]
-                c0Subst = Substitution.substInClassConstraints s2 (Substitution.substInClassConstraints s1 c0)
-                c1Subst = Substitution.substInClassConstraints s2 c1
-                rConstraints = mergeClassConstraints c0Subst c1Subst
-            in (Right (Typing.InferenceResult {
-              Typing.inferenceResultTerm = rExpr,
-              Typing.inferenceResultType = rType,
-              Typing.inferenceResultSubst = rSubst,
-              Typing.inferenceResultClassConstraints = rConstraints,
-              Typing.inferenceResultContext = fcx4})))))))))
--- | Infer the type of a case statement (Either version)
-inferTypeOfCaseStatement :: Context.Context -> Graph.Graph -> Core.CaseStatement -> Either Errors.Error Typing.InferenceResult
-inferTypeOfCaseStatement fcx cx caseStmt =
-
-      let tname = Core.caseStatementTypeName caseStmt
-          dflt = Core.caseStatementDefault caseStmt
-          cases = Core.caseStatementCases caseStmt
-          fnames = Lists.map Core.fieldName cases
-      in (Eithers.bind (Resolution.requireSchemaType fcx (Graph.graphSchemaTypes cx) tname) (\stRp ->
-        let schemaType = Pairs.first stRp
-            fcx2 = Pairs.second stRp
-            svars = Core.typeSchemeVariables schemaType
-            stype = Core.typeSchemeBody schemaType
-        in (Eithers.bind (ExtractCore.unionType tname stype) (\sfields -> Eithers.bind (Eithers.mapMaybe (\t -> inferTypeOfTerm fcx2 cx t (Strings.cat [
-          "case ",
-          (Core.unName tname),
-          ".<default>"])) dflt) (\dfltRp ->
-          let dfltResult = dfltRp
-              fcx3 = Maybes.fromMaybe fcx2 (Maybes.map Typing.inferenceResultContext dfltRp)
-          in (Eithers.bind (inferMany fcx3 cx (Lists.map (\f -> (Core.fieldTerm f, (Strings.cat [
-            "case ",
-            (Core.unName tname),
-            ".",
-            (Core.unName (Core.fieldName f))]))) cases)) (\caseRp ->
-            let caseResults = Pairs.first caseRp
-                fcx4 = Pairs.second caseRp
-                iterms = Pairs.first caseResults
-                itypes = Pairs.first (Pairs.second caseResults)
-                isubst = Pairs.first (Pairs.second (Pairs.second caseResults))
-                caseElemConstraints = Pairs.second (Pairs.second (Pairs.second caseResults))
-                codvResult = Names.freshName fcx4
-                codv = Pairs.first codvResult
-                fcx5 = Pairs.second codvResult
-                cod = Core.TypeVariable codv
-                caseMap = Maps.fromList (Lists.map (\ft -> (Core.fieldTypeName ft, (Core.fieldTypeType ft))) sfields)
-                dfltConstraints =
-                        Maybes.toList (Maybes.map (\r -> Typing.TypeConstraint {
-                          Typing.typeConstraintLeft = cod,
-                          Typing.typeConstraintRight = (Substitution.substInType isubst (Typing.inferenceResultType r)),
-                          Typing.typeConstraintComment = "match default"}) dfltResult)
-                caseConstraints =
-                        Maybes.cat (Lists.zipWith (\fname -> \itype -> Maybes.map (\ftype -> Typing.TypeConstraint {
-                          Typing.typeConstraintLeft = itype,
-                          Typing.typeConstraintRight = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = ftype,
-                            Core.functionTypeCodomain = cod})),
-                          Typing.typeConstraintComment = "case type"}) (Maps.lookup fname caseMap)) fnames itypes)
-                dfltClassConstraints = Maybes.fromMaybe Maps.empty (Maybes.map Typing.inferenceResultClassConstraints dfltResult)
-                allElemConstraints = mergeClassConstraints caseElemConstraints dfltClassConstraints
-            in (Eithers.bind (mapConstraints fcx5 cx (\subst -> yieldWithConstraints fcx5 (buildTypeApplicationTerm svars (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = tname,
-              Core.caseStatementDefault = (Maybes.map Typing.inferenceResultTerm dfltResult),
-              Core.caseStatementCases = (Lists.zipWith (\n -> \t -> Core.Field {
-                Core.fieldName = n,
-                Core.fieldTerm = t}) fnames iterms)}))) (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Resolution.nominalApplication tname (Lists.map (\x -> Core.TypeVariable x) svars)),
-              Core.functionTypeCodomain = cod})) (Substitution.composeTypeSubstList (Lists.concat [
-              Maybes.toList (Maybes.map Typing.inferenceResultSubst dfltResult),
-              [
-                isubst,
-                subst]])) (Substitution.substInClassConstraints subst allElemConstraints)) (Lists.concat [
-              dfltConstraints,
-              caseConstraints])) (\mcResult -> Right mcResult)))))))))
--- | Infer the type of a collection. The classNames parameter specifies type classes (e.g. ordering) that the element type variable must satisfy.
-inferTypeOfCollection :: Context.Context -> Graph.Graph -> (Core.Type -> Core.Type) -> ([Core.Term] -> Core.Term) -> String -> S.Set Core.Name -> [Core.Term] -> Either Errors.Error Typing.InferenceResult
-inferTypeOfCollection fcx cx typCons trmCons desc classNames els =
-
-      let varResult = Names.freshName fcx
-          var = Pairs.first varResult
-          fcx2 = Pairs.second varResult
-          classConstraints =
-                  Logic.ifElse (Sets.null classNames) Maps.empty (Maps.singleton var (Core.TypeVariableMetadata {
-                    Core.typeVariableMetadataClasses = classNames}))
-      in (Logic.ifElse (Lists.null els) (Right (yieldWithConstraints fcx2 (buildTypeApplicationTerm [
-        var] (trmCons [])) (typCons (Core.TypeVariable var)) Substitution.idTypeSubst classConstraints)) (Eithers.bind (inferMany fcx2 cx (Lists.zip els (Lists.map (\i -> Strings.cat [
-        "#",
-        (Literals.showInt32 i)]) (Math.range 1 (Math.add (Lists.length els) 1))))) (\resultsRp ->
-        let results = Pairs.first resultsRp
-            fcx3 = Pairs.second resultsRp
-            terms = Pairs.first results
-            types = Pairs.first (Pairs.second results)
-            subst1 = Pairs.first (Pairs.second (Pairs.second results))
-            elemConstraints = Pairs.second (Pairs.second (Pairs.second results))
-            constraints =
-                    Lists.map (\t -> Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable var),
-                      Typing.typeConstraintRight = t,
-                      Typing.typeConstraintComment = desc}) types
-            allConstraints = mergeClassConstraints classConstraints elemConstraints
-        in (Eithers.bind (mapConstraints fcx3 cx (\subst2 ->
-          let iterm = trmCons terms
-              itype = typCons (Core.TypeVariable var)
-              isubst = Substitution.composeTypeSubst subst1 subst2
-          in (yieldWithConstraints fcx3 iterm itype isubst (Substitution.substInClassConstraints subst2 allConstraints))) constraints) (\mcResult -> Right mcResult)))))
--- | Infer the type of an either value (Either version)
-inferTypeOfEither :: Context.Context -> Graph.Graph -> Either Core.Term Core.Term -> Either Errors.Error Typing.InferenceResult
-inferTypeOfEither fcx cx e =
-    Eithers.either (\l -> Eithers.bind (inferTypeOfTerm fcx cx l "either left value") (\r1 ->
-      let fcx2 = Typing.inferenceResultContext r1
-          iterm = Typing.inferenceResultTerm r1
-          leftType = Typing.inferenceResultType r1
-          subst = Typing.inferenceResultSubst r1
-          fvResult = freshVariableType fcx2
-          rightType = Pairs.first fvResult
-          fcx3 = Pairs.second fvResult
-          eitherTerm = Core.TermEither (Left iterm)
-          termWithLeftType =
-                  Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = eitherTerm,
-                    Core.typeApplicationTermType = leftType})
-          termWithBothTypes =
-                  Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = termWithLeftType,
-                    Core.typeApplicationTermType = rightType})
-          eitherType =
-                  Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = leftType,
-                    Core.eitherTypeRight = rightType})
-      in (Right (yieldChecked fcx3 termWithBothTypes eitherType subst)))) (\r -> Eithers.bind (inferTypeOfTerm fcx cx r "either right value") (\r1 ->
-      let fcx2 = Typing.inferenceResultContext r1
-          iterm = Typing.inferenceResultTerm r1
-          rightType = Typing.inferenceResultType r1
-          subst = Typing.inferenceResultSubst r1
-          fvResult = freshVariableType fcx2
-          leftType = Pairs.first fvResult
-          fcx3 = Pairs.second fvResult
-          eitherTerm = Core.TermEither (Right iterm)
-          termWithLeftType =
-                  Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = eitherTerm,
-                    Core.typeApplicationTermType = leftType})
-          termWithBothTypes =
-                  Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = termWithLeftType,
-                    Core.typeApplicationTermType = rightType})
-          eitherType =
-                  Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = leftType,
-                    Core.eitherTypeRight = rightType})
-      in (Right (yieldChecked fcx3 termWithBothTypes eitherType subst)))) e
--- | Infer the type of a union injection (Either version)
-inferTypeOfInjection :: Context.Context -> Graph.Graph -> Core.Injection -> Either Errors.Error Typing.InferenceResult
-inferTypeOfInjection fcx cx injection =
-
-      let tname = Core.injectionTypeName injection
-          field = Core.injectionField injection
-          fname = Core.fieldName field
-          term = Core.fieldTerm field
-      in (Eithers.bind (inferTypeOfTerm fcx cx term "injected term") (\result ->
-        let fcx2 = Typing.inferenceResultContext result
-        in (Eithers.bind (Resolution.requireSchemaType fcx2 (Graph.graphSchemaTypes cx) tname) (\stRp ->
-          let schemaType = Pairs.first stRp
-              fcx3 = Pairs.second stRp
-              svars = Core.typeSchemeVariables schemaType
-              stype = Core.typeSchemeBody schemaType
-              iterm = Typing.inferenceResultTerm result
-              ityp = Typing.inferenceResultType result
-              isubst = Typing.inferenceResultSubst result
-          in (Eithers.bind (ExtractCore.unionType tname stype) (\sfields -> Eithers.bind (Resolution.findFieldType fcx3 fname sfields) (\ftyp -> Eithers.bind (mapConstraints fcx3 cx (\subst -> yield fcx3 (buildTypeApplicationTerm svars (Core.TermInject (Core.Injection {
-            Core.injectionTypeName = tname,
-            Core.injectionField = Core.Field {
-              Core.fieldName = fname,
-              Core.fieldTerm = iterm}}))) (Resolution.nominalApplication tname (Lists.map (\x -> Core.TypeVariable x) svars)) (Substitution.composeTypeSubst isubst subst)) [
-            Typing.TypeConstraint {
-              Typing.typeConstraintLeft = ftyp,
-              Typing.typeConstraintRight = ityp,
-              Typing.typeConstraintComment = "schema type of injected field"}]) (\mcResult -> Right mcResult))))))))
--- | Infer the type of a lambda function (Either version)
-inferTypeOfLambda :: Context.Context -> Graph.Graph -> Core.Lambda -> Either Errors.Error Typing.InferenceResult
-inferTypeOfLambda fcx cx lambda =
-
-      let var = Core.lambdaParameter lambda
-          body = Core.lambdaBody lambda
-          vdomResult = Names.freshName fcx
-          vdom = Pairs.first vdomResult
-          fcx2 = Pairs.second vdomResult
-          dom = Core.TypeVariable vdom
-          cx2 =
-                  extendContext [
-                    (var, Core.TypeScheme {
-                      Core.typeSchemeVariables = [],
-                      Core.typeSchemeBody = dom,
-                      Core.typeSchemeConstraints = Nothing})] cx
-      in (Eithers.bind (inferTypeOfTerm fcx2 cx2 body "lambda body") (\result ->
-        let fcx3 = Typing.inferenceResultContext result
-            iterm = Typing.inferenceResultTerm result
-            icod = Typing.inferenceResultType result
-            isubst = Typing.inferenceResultSubst result
-            rdom = Substitution.substInType isubst dom
-            rterm =
-                    Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = var,
-                      Core.lambdaDomain = (Just rdom),
-                      Core.lambdaBody = iterm})
-            rtype =
-                    Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = rdom,
-                      Core.functionTypeCodomain = icod})
-            vars =
-                    Sets.unions [
-                      Variables.freeVariablesInType rdom,
-                      (Variables.freeVariablesInType icod),
-                      (freeVariablesInContext (Substitution.substInContext isubst cx2))]
-            cx3 = Substitution.substInContext isubst cx
-            iconstraints = Substitution.substInClassConstraints isubst (Typing.inferenceResultClassConstraints result)
-        in (Right (Typing.InferenceResult {
-          Typing.inferenceResultTerm = rterm,
-          Typing.inferenceResultType = rtype,
-          Typing.inferenceResultSubst = isubst,
-          Typing.inferenceResultClassConstraints = iconstraints,
-          Typing.inferenceResultContext = fcx3}))))
--- | Normalize a let term before inferring its type (Either version)
-inferTypeOfLet :: Context.Context -> Graph.Graph -> Core.Let -> Either Errors.Error Typing.InferenceResult
-inferTypeOfLet fcx0 cx let0 =
-
-      let fcx =
-              Context.Context {
-                Context.contextTrace = (Lists.cons "let" (Context.contextTrace fcx0)),
-                Context.contextMessages = (Context.contextMessages fcx0),
-                Context.contextOther = (Context.contextOther fcx0)}
-          bindings0 = Core.letBindings let0
-          body0 = Core.letBody let0
-          names = Lists.map Core.bindingName bindings0
-          nameSet = Sets.fromList names
-          toPair =
-                  \binding ->
-                    let name = Core.bindingName binding
-                        term = Core.bindingTerm binding
-                    in (name, (Lists.filter (\n -> Sets.member n nameSet) (Sets.toList (Variables.freeVariablesInTerm term))))
-          adjList = Lists.map toPair bindings0
-          groups = Sorting.topologicalSortComponents adjList
-          bindingMap = Maps.fromList (Lists.zip names bindings0)
-          createLet =
-                  \e -> \group -> Core.TermLet (Core.Let {
-                    Core.letBindings = (Maybes.cat (Lists.map (\n -> Maps.lookup n bindingMap) group)),
-                    Core.letBody = e})
-          rewrittenLet = Lists.foldl createLet body0 (Lists.reverse groups)
-          restoreLet =
-                  \iterm ->
-                    let helper =
-                            \level -> \bins -> \term ->
-                              let nonzero =
-                                      \term2 -> case term2 of
-                                        Core.TermLet v0 ->
-                                          let bs = Core.letBindings v0
-                                              letBody = Core.letBody v0
-                                          in (helper (Math.sub level 1) (Lists.concat [
-                                            bs,
-                                            bins]) letBody)
-                              in (Logic.ifElse (Equality.equal level 0) (bins, term) (nonzero term))
-                        result = helper (Lists.length groups) [] iterm
-                        bindingList = Pairs.first result
-                        e = Pairs.second result
-                        bindingMap2 = Maps.fromList (Lists.map (\b -> (Core.bindingName b, b)) bindingList)
-                    in (Core.TermLet (Core.Let {
-                      Core.letBindings = (Maybes.cat (Lists.map (\n -> Maps.lookup n bindingMap2) names)),
-                      Core.letBody = e}))
-          rewriteResult =
-                  \iresult ->
-                    let fcxR = Typing.inferenceResultContext iresult
-                        iterm = Typing.inferenceResultTerm iresult
-                        itype = Typing.inferenceResultType iresult
-                        isubst = Typing.inferenceResultSubst iresult
-                        iconstraints = Typing.inferenceResultClassConstraints iresult
-                    in Typing.InferenceResult {
-                      Typing.inferenceResultTerm = (restoreLet iterm),
-                      Typing.inferenceResultType = itype,
-                      Typing.inferenceResultSubst = isubst,
-                      Typing.inferenceResultClassConstraints = iconstraints,
-                      Typing.inferenceResultContext = fcxR}
-          res =
-                  case rewrittenLet of
-                    Core.TermLet v0 -> inferTypeOfLetNormalized fcx cx v0
-                    _ -> inferTypeOfTerm fcx cx rewrittenLet "empty let term"
-      in (Eithers.map rewriteResult res)
--- | Infer the type of a let (letrec) term which is already in a normal form (Either version)
-inferTypeOfLetNormalized :: Context.Context -> Graph.Graph -> Core.Let -> Either Errors.Error Typing.InferenceResult
-inferTypeOfLetNormalized fcx0 cx0 letTerm =
-
-      let fcx =
-              Context.Context {
-                Context.contextTrace = (Lists.cons "let-normalized" (Context.contextTrace fcx0)),
-                Context.contextMessages = (Context.contextMessages fcx0),
-                Context.contextOther = (Context.contextOther fcx0)}
-          bins0 = Core.letBindings letTerm
-          body0 = Core.letBody letTerm
-          bnames = Lists.map Core.bindingName bins0
-          bvarsResult = Names.freshNames (Lists.length bins0) fcx
-          bvars = Pairs.first bvarsResult
-          fcx2 = Pairs.second bvarsResult
-          tbins0 = Lists.map (\x -> Core.TypeVariable x) bvars
-          cx1 =
-                  extendContext (Lists.zip bnames (Lists.map (\t -> Core.TypeScheme {
-                    Core.typeSchemeVariables = [],
-                    Core.typeSchemeBody = t,
-                    Core.typeSchemeConstraints = Nothing}) tbins0)) cx0
-      in (Eithers.bind (inferTypesOfTemporaryBindings fcx2 cx1 bins0) (\irRp ->
-        let inferredResult = Pairs.first irRp
-            fcx3 = Pairs.second irRp
-            bterms1 = Pairs.first inferredResult
-            tbins1 = Pairs.first (Pairs.second inferredResult)
-            substAndConstraints = Pairs.second (Pairs.second inferredResult)
-            s1 = Pairs.first substAndConstraints
-            inferredConstraints = Pairs.second substAndConstraints
-        in (Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorUnification _e) (\_a -> _a) (Unification.unifyTypeLists fcx3 (Graph.graphSchemaTypes cx0) (Lists.map (Substitution.substInType s1) tbins0) tbins1 "temporary type bindings")) (\s2 -> Eithers.bind (Checking.checkTypeSubst fcx3 cx0 s2) (\_ ->
-          let g2base = Substitution.substInContext (Substitution.composeTypeSubst s1 s2) cx0
-              constraintsWithS2 = Substitution.substInClassConstraints s2 inferredConstraints
-              composedSubst = Substitution.composeTypeSubst s1 s2
-              originalBindingConstraints =
-                      Lists.foldl (\acc -> \b -> Maybes.maybe acc (\ts -> Maybes.maybe acc (\c -> mergeClassConstraints acc c) (Core.typeSchemeConstraints ts)) (Core.bindingTypeScheme b)) Maps.empty bins0
-              originalConstraintsSubst = Substitution.substInClassConstraints composedSubst originalBindingConstraints
-              allInferredConstraints = mergeClassConstraints constraintsWithS2 originalConstraintsSubst
-              mergedConstraints = mergeClassConstraints (Graph.graphClassConstraints g2base) allInferredConstraints
-              g2 =
-                      Graph.Graph {
-                        Graph.graphBoundTerms = (Graph.graphBoundTerms g2base),
-                        Graph.graphBoundTypes = (Graph.graphBoundTypes g2base),
-                        Graph.graphClassConstraints = mergedConstraints,
-                        Graph.graphLambdaVariables = (Graph.graphLambdaVariables g2base),
-                        Graph.graphMetadata = (Graph.graphMetadata g2base),
-                        Graph.graphPrimitives = (Graph.graphPrimitives g2base),
-                        Graph.graphSchemaTypes = (Graph.graphSchemaTypes g2base),
-                        Graph.graphTypeVariables = (Graph.graphTypeVariables g2base)}
-              bterms1Subst = Lists.map (Substitution.substTypesInTerm s2) bterms1
-              tsbins1 = Lists.zip bnames (Lists.map (\t -> generalize g2 (Substitution.substInType s2 t)) tbins1)
-          in (Eithers.bind (inferTypeOfTerm fcx3 (extendContext tsbins1 g2) body0 "let body") (\bodyResult ->
-            let fcx4 = Typing.inferenceResultContext bodyResult
-                body1 = Typing.inferenceResultTerm bodyResult
-                tbody = Typing.inferenceResultType bodyResult
-                sbody = Typing.inferenceResultSubst bodyResult
-                st1 =
-                        Typing.TermSubst (Maps.fromList (Lists.map (\pair ->
-                          let name = Pairs.first pair
-                              ts = Pairs.second pair
-                          in (name, (buildTypeApplicationTerm (Core.typeSchemeVariables ts) (Core.TermVariable name)))) tsbins1))
-                createBinding =
-                        \bindingPair ->
-                          let nameTsPair = Pairs.first bindingPair
-                              term = Pairs.second bindingPair
-                              name = Pairs.first nameTsPair
-                              ts = Pairs.second nameTsPair
-                              finalTs = Substitution.substInTypeScheme sbody ts
-                              typeLambdaTerm =
-                                      Lists.foldl (\b -> \v -> Core.TermTypeLambda (Core.TypeLambda {
-                                        Core.typeLambdaParameter = v,
-                                        Core.typeLambdaBody = b})) (Substitution.substituteInTerm st1 term) (Lists.reverse (Core.typeSchemeVariables finalTs))
-                          in Core.Binding {
-                            Core.bindingName = name,
-                            Core.bindingTerm = (Substitution.substTypesInTerm (Substitution.composeTypeSubst sbody s2) typeLambdaTerm),
-                            Core.bindingTypeScheme = (Just finalTs)}
-                bins1 = Lists.map createBinding (Lists.zip tsbins1 bterms1Subst)
-                bodyConstraints = Substitution.substInClassConstraints sbody (Typing.inferenceResultClassConstraints bodyResult)
-                bindingConstraintsSubst = Substitution.substInClassConstraints sbody constraintsWithS2
-                allConstraints = mergeClassConstraints bindingConstraintsSubst bodyConstraints
-            in (Right (Typing.InferenceResult {
-              Typing.inferenceResultTerm = (Core.TermLet (Core.Let {
-                Core.letBindings = bins1,
-                Core.letBody = body1})),
-              Typing.inferenceResultType = tbody,
-              Typing.inferenceResultSubst = (Substitution.composeTypeSubstList [
-                s1,
-                s2,
-                sbody]),
-              Typing.inferenceResultClassConstraints = allConstraints,
-              Typing.inferenceResultContext = fcx4})))))))))
--- | Infer the type of a list (Either version)
-inferTypeOfList :: Context.Context -> Graph.Graph -> [Core.Term] -> Either Errors.Error Typing.InferenceResult
-inferTypeOfList fcx cx =
-    inferTypeOfCollection fcx cx (\x -> Core.TypeList x) (\x -> Core.TermList x) "list element" Sets.empty
--- | Infer the type of a literal
-inferTypeOfLiteral :: Context.Context -> Core.Literal -> Typing.InferenceResult
-inferTypeOfLiteral fcx lit =
-    Typing.InferenceResult {
-      Typing.inferenceResultTerm = (Core.TermLiteral lit),
-      Typing.inferenceResultType = (Core.TypeLiteral (Reflect.literalType lit)),
-      Typing.inferenceResultSubst = Substitution.idTypeSubst,
-      Typing.inferenceResultClassConstraints = Maps.empty,
-      Typing.inferenceResultContext = fcx}
--- | Infer the type of a map (Either version)
-inferTypeOfMap :: Context.Context -> Graph.Graph -> M.Map Core.Term Core.Term -> Either Errors.Error Typing.InferenceResult
-inferTypeOfMap fcx cx m =
-
-      let kvarResult = Names.freshName fcx
-          kvar = Pairs.first kvarResult
-          fcx2 = Pairs.second kvarResult
-          vvarResult = Names.freshName fcx2
-          vvar = Pairs.first vvarResult
-          fcx3 = Pairs.second vvarResult
-          keyConstraints =
-                  Maps.singleton kvar (Core.TypeVariableMetadata {
-                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})
-      in (Logic.ifElse (Maps.null m) (Right (yieldWithConstraints fcx3 (buildTypeApplicationTerm [
-        kvar,
-        vvar] (Core.TermMap Maps.empty)) (Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (Core.TypeVariable kvar),
-        Core.mapTypeValues = (Core.TypeVariable vvar)})) Substitution.idTypeSubst keyConstraints)) (Eithers.bind (inferMany fcx3 cx (Lists.map (\k -> (k, "map key")) (Maps.keys m))) (\kRp ->
-        let kResults = Pairs.first kRp
-            fcx4 = Pairs.second kRp
-            kterms = Pairs.first kResults
-            ktypes = Pairs.first (Pairs.second kResults)
-            ksubst = Pairs.first (Pairs.second (Pairs.second kResults))
-            kElemConstraints = Pairs.second (Pairs.second (Pairs.second kResults))
-        in (Eithers.bind (inferMany fcx4 (Substitution.substInContext ksubst cx) (Lists.map (\v -> (v, "map value")) (Maps.elems m))) (\vRp ->
-          let vResults = Pairs.first vRp
-              fcx5 = Pairs.second vRp
-              vterms = Pairs.first vResults
-              vtypes = Pairs.first (Pairs.second vResults)
-              vsubst = Pairs.first (Pairs.second (Pairs.second vResults))
-              vElemConstraints = Pairs.second (Pairs.second (Pairs.second vResults))
-              kcons =
-                      Lists.map (\t -> Typing.TypeConstraint {
-                        Typing.typeConstraintLeft = (Core.TypeVariable kvar),
-                        Typing.typeConstraintRight = t,
-                        Typing.typeConstraintComment = "map key"}) ktypes
-              vcons =
-                      Lists.map (\t -> Typing.TypeConstraint {
-                        Typing.typeConstraintLeft = (Core.TypeVariable vvar),
-                        Typing.typeConstraintRight = t,
-                        Typing.typeConstraintComment = "map value"}) vtypes
-              allMapConstraints = mergeClassConstraints keyConstraints (mergeClassConstraints kElemConstraints vElemConstraints)
-          in (Eithers.bind (mapConstraints fcx5 cx (\subst -> yieldWithConstraints fcx5 (Core.TermMap (Maps.fromList (Lists.zip kterms vterms))) (Core.TypeMap (Core.MapType {
-            Core.mapTypeKeys = (Core.TypeVariable kvar),
-            Core.mapTypeValues = (Core.TypeVariable vvar)})) (Substitution.composeTypeSubstList [
-            ksubst,
-            vsubst,
-            subst]) (Substitution.substInClassConstraints subst allMapConstraints)) (Lists.concat [
-            kcons,
-            vcons])) (\mcResult -> Right mcResult)))))))
--- | Infer the type of a Maybe value
-inferTypeOfOptional :: Context.Context -> Graph.Graph -> Maybe Core.Term -> Either Errors.Error Typing.InferenceResult
-inferTypeOfOptional fcx cx m =
-
-      let trmCons = \terms -> Core.TermMaybe (Lists.maybeHead terms)
-      in (inferTypeOfCollection fcx cx (\x -> Core.TypeMaybe x) trmCons "optional element" Sets.empty (Maybes.maybe [] Lists.singleton m))
--- | Infer the type of a pair (Either version)
-inferTypeOfPair :: Context.Context -> Graph.Graph -> (Core.Term, Core.Term) -> Either Errors.Error Typing.InferenceResult
-inferTypeOfPair fcx cx p =
-    Eithers.bind (inferMany fcx cx [
-      (Pairs.first p, "pair first element"),
-      (Pairs.second p, "pair second element")]) (\rp ->
-      let results = Pairs.first rp
-          fcx2 = Pairs.second rp
-          iterms = Pairs.first results
-          itypes = Pairs.first (Pairs.second results)
-          isubst = Pairs.first (Pairs.second (Pairs.second results))
-          pairElemConstraints = Pairs.second (Pairs.second (Pairs.second results))
-      in (Eithers.bind (atOrFail 0 "inferTypeOfPair ifst" iterms) (\ifst -> Eithers.bind (atOrFail 1 "inferTypeOfPair isnd" iterms) (\isnd -> Eithers.bind (atOrFail 0 "inferTypeOfPair tyFst" itypes) (\tyFst -> Eithers.bind (atOrFail 1 "inferTypeOfPair tySnd" itypes) (\tySnd ->
-        let pairTerm = Core.TermPair (ifst, isnd)
-            termWithTypes =
-                    Core.TermTypeApplication (Core.TypeApplicationTerm {
-                      Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = pairTerm,
-                        Core.typeApplicationTermType = tyFst})),
-                      Core.typeApplicationTermType = tySnd})
-        in (Right (yieldWithConstraints fcx2 termWithTypes (Core.TypePair (Core.PairType {
-          Core.pairTypeFirst = tyFst,
-          Core.pairTypeSecond = tySnd})) isubst pairElemConstraints))))))))
--- | Infer the type of a primitive function (Either version)
-inferTypeOfPrimitive :: Context.Context -> Graph.Graph -> Core.Name -> Either Errors.Error Typing.InferenceResult
-inferTypeOfPrimitive fcx cx name =
-    Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchPrimitive (Errors.NoSuchPrimitiveError {
-      Errors.noSuchPrimitiveErrorName = name})))) (\scheme ->
-      let tsResult = Resolution.instantiateTypeScheme fcx scheme
-          ts = Pairs.first tsResult
-          fcx2 = Pairs.second tsResult
-          constraints = Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints ts)
-      in (Right (yieldCheckedWithConstraints fcx2 (buildTypeApplicationTerm (Core.typeSchemeVariables ts) (Core.TermVariable name)) (Core.typeSchemeBody ts) Substitution.idTypeSubst constraints))) (Maybes.map Graph.primitiveTypeScheme (Maps.lookup name (Graph.graphPrimitives cx)))
--- | Infer the type of a record projection (Either version)
-inferTypeOfProjection :: Context.Context -> Graph.Graph -> Core.Projection -> Either Errors.Error Typing.InferenceResult
-inferTypeOfProjection fcx cx proj =
-
-      let tname = Core.projectionTypeName proj
-          fname = Core.projectionField proj
-      in (Eithers.bind (Resolution.requireSchemaType fcx (Graph.graphSchemaTypes cx) tname) (\stRp ->
-        let schemaType = Pairs.first stRp
-            fcx2 = Pairs.second stRp
-            svars = Core.typeSchemeVariables schemaType
-            stype = Core.typeSchemeBody schemaType
-        in (Eithers.bind (ExtractCore.recordType tname stype) (\sfields -> Eithers.bind (Resolution.findFieldType fcx2 fname sfields) (\ftyp -> Right (yield fcx2 (buildTypeApplicationTerm svars (Core.TermProject (Core.Projection {
-          Core.projectionTypeName = tname,
-          Core.projectionField = fname}))) (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = (Resolution.nominalApplication tname (Lists.map (\x -> Core.TypeVariable x) svars)),
-          Core.functionTypeCodomain = ftyp})) Substitution.idTypeSubst))))))
--- | Infer the type of a record (Either version)
-inferTypeOfRecord :: Context.Context -> Graph.Graph -> Core.Record -> Either Errors.Error Typing.InferenceResult
-inferTypeOfRecord fcx cx record =
-
-      let tname = Core.recordTypeName record
-          fields = Core.recordFields record
-          fnames = Lists.map Core.fieldName fields
-      in (Eithers.bind (Resolution.requireSchemaType fcx (Graph.graphSchemaTypes cx) tname) (\stRp ->
-        let schemaType = Pairs.first stRp
-            fcx2 = Pairs.second stRp
-        in (Eithers.bind (inferMany fcx2 cx (Lists.map (\f -> (Core.fieldTerm f, (Strings.cat2 "field " (Core.unName (Core.fieldName f))))) fields)) (\rp ->
-          let results = Pairs.first rp
-              fcx3 = Pairs.second rp
-              svars = Core.typeSchemeVariables schemaType
-              stype = Core.typeSchemeBody schemaType
-              iterms = Pairs.first results
-              itypes = Pairs.first (Pairs.second results)
-              isubst = Pairs.first (Pairs.second (Pairs.second results))
-              recElemConstraints = Pairs.second (Pairs.second (Pairs.second results))
-              ityp =
-                      Core.TypeRecord (Lists.zipWith (\n -> \t -> Core.FieldType {
-                        Core.fieldTypeName = n,
-                        Core.fieldTypeType = t}) fnames itypes)
-          in (Eithers.bind (mapConstraints fcx3 cx (\subst -> yieldWithConstraints fcx3 (buildTypeApplicationTerm svars (Core.TermRecord (Core.Record {
-            Core.recordTypeName = tname,
-            Core.recordFields = (Lists.zipWith (\n -> \t -> Core.Field {
-              Core.fieldName = n,
-              Core.fieldTerm = t}) fnames iterms)}))) (Resolution.nominalApplication tname (Lists.map (\x -> Core.TypeVariable x) svars)) (Substitution.composeTypeSubst isubst subst) (Substitution.substInClassConstraints subst recElemConstraints)) [
-            Typing.TypeConstraint {
-              Typing.typeConstraintLeft = stype,
-              Typing.typeConstraintRight = ityp,
-              Typing.typeConstraintComment = "schema type of record"}]) (\mcResult -> Right mcResult))))))
--- | Infer the type of a set (Either version)
-inferTypeOfSet :: Context.Context -> Graph.Graph -> S.Set Core.Term -> Either Errors.Error Typing.InferenceResult
-inferTypeOfSet fcx cx s =
-    inferTypeOfCollection fcx cx (\x -> Core.TypeSet x) (\terms -> Core.TermSet (Sets.fromList terms)) "set element" (Sets.singleton (Core.Name "ordering")) (Sets.toList s)
--- | Infer the type of a given term (Either version)
-inferTypeOfTerm :: Context.Context -> Graph.Graph -> Core.Term -> String -> Either Errors.Error Typing.InferenceResult
-inferTypeOfTerm fcx cx term desc =
-
-      let fcx2 =
-              Context.Context {
-                Context.contextTrace = (Lists.cons desc (Context.contextTrace fcx)),
-                Context.contextMessages = (Context.contextMessages fcx),
-                Context.contextOther = (Context.contextOther fcx)}
-      in case term of
-        Core.TermAnnotated v0 -> inferTypeOfAnnotatedTerm fcx2 cx v0
-        Core.TermApplication v0 -> inferTypeOfApplication fcx2 cx v0
-        Core.TermCases v0 -> inferTypeOfCaseStatement fcx2 cx v0
-        Core.TermEither v0 -> inferTypeOfEither fcx2 cx v0
-        Core.TermLambda v0 -> inferTypeOfLambda fcx2 cx v0
-        Core.TermLet v0 -> inferTypeOfLet fcx2 cx v0
-        Core.TermList v0 -> inferTypeOfList fcx2 cx v0
-        Core.TermLiteral v0 -> Right (inferTypeOfLiteral fcx2 v0)
-        Core.TermMap v0 -> inferTypeOfMap fcx2 cx v0
-        Core.TermMaybe v0 -> inferTypeOfOptional fcx2 cx v0
-        Core.TermPair v0 -> inferTypeOfPair fcx2 cx v0
-        Core.TermProject v0 -> inferTypeOfProjection fcx2 cx v0
-        Core.TermRecord v0 -> inferTypeOfRecord fcx2 cx v0
-        Core.TermSet v0 -> inferTypeOfSet fcx2 cx v0
-        Core.TermTypeApplication v0 -> inferTypeOfTypeApplication fcx2 cx v0
-        Core.TermTypeLambda v0 -> inferTypeOfTypeLambda fcx2 cx v0
-        Core.TermInject v0 -> inferTypeOfInjection fcx2 cx v0
-        Core.TermUnit -> Right (inferTypeOfUnit fcx2)
-        Core.TermUnwrap v0 -> inferTypeOfUnwrap fcx2 cx v0
-        Core.TermVariable v0 -> inferTypeOfVariable fcx2 cx v0
-        Core.TermWrap v0 -> inferTypeOfWrappedTerm fcx2 cx v0
--- | Infer the type of a type application (Either version)
-inferTypeOfTypeApplication :: Context.Context -> Graph.Graph -> Core.TypeApplicationTerm -> Either Errors.Error Typing.InferenceResult
-inferTypeOfTypeApplication fcx cx tt = inferTypeOfTerm fcx cx (Core.typeApplicationTermBody tt) "type application term"
--- | Infer the type of a type abstraction (Either version)
-inferTypeOfTypeLambda :: Context.Context -> Graph.Graph -> Core.TypeLambda -> Either Errors.Error Typing.InferenceResult
-inferTypeOfTypeLambda fcx cx ta = inferTypeOfTerm fcx cx (Core.typeLambdaBody ta) "type abstraction"
--- | The trivial inference rule for the unit term
-inferTypeOfUnit :: Context.Context -> Typing.InferenceResult
-inferTypeOfUnit fcx =
-    Typing.InferenceResult {
-      Typing.inferenceResultTerm = Core.TermUnit,
-      Typing.inferenceResultType = Core.TypeUnit,
-      Typing.inferenceResultSubst = Substitution.idTypeSubst,
-      Typing.inferenceResultClassConstraints = Maps.empty,
-      Typing.inferenceResultContext = fcx}
--- | Infer the type of an unwrap operation (Either version)
-inferTypeOfUnwrap :: Context.Context -> Graph.Graph -> Core.Name -> Either Errors.Error Typing.InferenceResult
-inferTypeOfUnwrap fcx cx tname =
-    Eithers.bind (Resolution.requireSchemaType fcx (Graph.graphSchemaTypes cx) tname) (\stRp ->
-      let schemaType = Pairs.first stRp
-          fcx2 = Pairs.second stRp
-          svars = Core.typeSchemeVariables schemaType
-          stype = Core.typeSchemeBody schemaType
-      in (Eithers.bind (ExtractCore.wrappedType tname stype) (\wtyp -> Right (yield fcx2 (buildTypeApplicationTerm svars (Core.TermUnwrap tname)) (Core.TypeFunction (Core.FunctionType {
-        Core.functionTypeDomain = (Resolution.nominalApplication tname (Lists.map (\x -> Core.TypeVariable x) svars)),
-        Core.functionTypeCodomain = wtyp})) Substitution.idTypeSubst))))
--- | Infer the type of a variable (Either version)
-inferTypeOfVariable :: Context.Context -> Graph.Graph -> Core.Name -> Either Errors.Error Typing.InferenceResult
-inferTypeOfVariable fcx cx name =
-    Maybes.maybe (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchBinding (Errors.NoSuchBindingError {
-      Errors.noSuchBindingErrorName = name})))) (\scheme ->
-      let tsResult = Resolution.instantiateTypeScheme fcx scheme
-          ts = Pairs.first tsResult
-          fcx2 = Pairs.second tsResult
-          constraints = Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints ts)
-      in (Right (yieldCheckedWithConstraints fcx2 (buildTypeApplicationTerm (Core.typeSchemeVariables ts) (Core.TermVariable name)) (Core.typeSchemeBody ts) Substitution.idTypeSubst constraints))) (Maybes.map Graph.primitiveTypeScheme (Maps.lookup name (Graph.graphPrimitives cx)))) (\scheme ->
-      let tsResult = Resolution.instantiateTypeScheme fcx scheme
-          ts = Pairs.first tsResult
-          fcx2 = Pairs.second tsResult
-          constraints = Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints ts)
-      in (Right (Typing.InferenceResult {
-        Typing.inferenceResultTerm = (buildTypeApplicationTerm (Core.typeSchemeVariables ts) (Core.TermVariable name)),
-        Typing.inferenceResultType = (Core.typeSchemeBody ts),
-        Typing.inferenceResultSubst = Substitution.idTypeSubst,
-        Typing.inferenceResultClassConstraints = constraints,
-        Typing.inferenceResultContext = fcx2}))) (Maps.lookup name (Graph.graphBoundTypes cx))
--- | Infer the type of a wrapped term (Either version)
-inferTypeOfWrappedTerm :: Context.Context -> Graph.Graph -> Core.WrappedTerm -> Either Errors.Error Typing.InferenceResult
-inferTypeOfWrappedTerm fcx cx wt =
-
-      let tname = Core.wrappedTermTypeName wt
-          term = Core.wrappedTermBody wt
-      in (Eithers.bind (Resolution.requireSchemaType fcx (Graph.graphSchemaTypes cx) tname) (\stRp ->
-        let schemaType = Pairs.first stRp
-            fcx2 = Pairs.second stRp
-        in (Eithers.bind (inferTypeOfTerm fcx2 cx term "wrapped term") (\result ->
-          let fcx3 = Typing.inferenceResultContext result
-              svars = Core.typeSchemeVariables schemaType
-              stype = Core.typeSchemeBody schemaType
-              iterm = Typing.inferenceResultTerm result
-              itype = Typing.inferenceResultType result
-              isubst = Typing.inferenceResultSubst result
-              ityp = Core.TypeWrap itype
-          in (Eithers.bind (mapConstraints fcx3 cx (\subst -> yield fcx3 (buildTypeApplicationTerm svars (Core.TermWrap (Core.WrappedTerm {
-            Core.wrappedTermTypeName = tname,
-            Core.wrappedTermBody = iterm}))) (Resolution.nominalApplication tname (Lists.map (\x -> Core.TypeVariable x) svars)) (Substitution.composeTypeSubst isubst subst)) [
-            Typing.TypeConstraint {
-              Typing.typeConstraintLeft = stype,
-              Typing.typeConstraintRight = ityp,
-              Typing.typeConstraintComment = "schema type of wrapper"}]) (\mcResult -> Right mcResult))))))
--- | Infer types for temporary let bindings (Either version)
-inferTypesOfTemporaryBindings :: Context.Context -> Graph.Graph -> [Core.Binding] -> Either Errors.Error (([Core.Term], ([Core.Type], (Typing.TypeSubst, (M.Map Core.Name Core.TypeVariableMetadata)))), Context.Context)
-inferTypesOfTemporaryBindings fcx cx bins =
-
-      let emptyResult = Right (([], ([], (Substitution.idTypeSubst, Maps.empty))), fcx)
-      in (Maybes.maybe emptyResult (\binsUc ->
-        let binding = Pairs.first binsUc
-            tl = Pairs.second binsUc
-            k = Core.bindingName binding
-            v = Core.bindingTerm binding
-        in (Eithers.bind (inferTypeOfTerm fcx cx v (Strings.cat [
-          "temporary let binding '",
-          (Core.unName k),
-          "'"])) (\result1 ->
-          let fcx2 = Typing.inferenceResultContext result1
-              j = Typing.inferenceResultTerm result1
-              u_prime = Typing.inferenceResultType result1
-              u = Typing.inferenceResultSubst result1
-              c1Inferred = Typing.inferenceResultClassConstraints result1
-          in (Eithers.bind (Maybes.maybe (Right Maps.empty) (\ts ->
-            let tsResult = Resolution.instantiateTypeScheme fcx2 ts
-                instantiatedTs = Pairs.first tsResult
-                freshConstraints = Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints instantiatedTs)
-            in (Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorUnification _e) (\_a -> _a) (Unification.unifyTypes fcx2 (Graph.graphSchemaTypes cx) (Core.typeSchemeBody instantiatedTs) u_prime "original binding type")) (\unifySubst -> Right (Substitution.substInClassConstraints unifySubst freshConstraints)))) (Core.bindingTypeScheme binding)) (\originalBindingConstraints ->
-            let c1 = mergeClassConstraints c1Inferred originalBindingConstraints
-            in (Eithers.bind (inferTypesOfTemporaryBindings fcx2 (Substitution.substInContext u cx) tl) (\rp2 ->
-              let result2 = Pairs.first rp2
-                  fcx3 = Pairs.second rp2
-                  h = Pairs.first result2
-                  r_prime = Pairs.first (Pairs.second result2)
-                  restPair = Pairs.second (Pairs.second result2)
-                  r = Pairs.first restPair
-                  c2 = Pairs.second restPair
-                  c1Subst = Substitution.substInClassConstraints r c1
-                  mergedConstraints = mergeClassConstraints c1Subst c2
-              in (Right ((Lists.cons (Substitution.substTypesInTerm r j) h, (Lists.cons (Substitution.substInType r u_prime) r_prime, (Substitution.composeTypeSubst u r, mergedConstraints))), fcx3))))))))) (Lists.uncons bins))
--- | Check if a variable is unbound in context
-isUnbound :: Graph.Graph -> Core.Name -> Bool
-isUnbound cx v =
-    Logic.and (Logic.not (Sets.member v (freeVariablesInContext cx))) (Logic.not (Maps.member v (Graph.graphSchemaTypes cx)))
--- | Map over type constraints after unification
-mapConstraints :: t0 -> Graph.Graph -> (Typing.TypeSubst -> t1) -> [Typing.TypeConstraint] -> Either Errors.Error t1
-mapConstraints flowCx cx f constraints =
-    Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorUnification _e) (\_a -> _a) (Unification.unifyTypeConstraints flowCx (Graph.graphSchemaTypes cx) constraints)) (\s -> Eithers.bind (Checking.checkTypeSubst flowCx cx s) (\_ -> Right (f s)))
--- | Merge two maps of class constraints. When both maps have constraints for the same variable, union the class sets.
-mergeClassConstraints :: Ord t0 => (M.Map t0 Core.TypeVariableMetadata -> M.Map t0 Core.TypeVariableMetadata -> M.Map t0 Core.TypeVariableMetadata)
-mergeClassConstraints m1 m2 =
-    Lists.foldl (\acc -> \pair ->
-      let k = Pairs.first pair
-          v = Pairs.second pair
-      in (Maybes.maybe (Maps.insert k v acc) (\existing ->
-        let merged =
-                Core.TypeVariableMetadata {
-                  Core.typeVariableMetadataClasses = (Sets.union (Core.typeVariableMetadataClasses existing) (Core.typeVariableMetadataClasses v))}
-        in (Maps.insert k merged acc)) (Maps.lookup k acc))) m1 (Maps.toList m2)
--- | Show an inference result for debugging
-showInferenceResult :: Typing.InferenceResult -> String
-showInferenceResult result =
-
-      let term = Typing.inferenceResultTerm result
-          typ = Typing.inferenceResultType result
-          subst = Typing.inferenceResultSubst result
-      in (Strings.cat [
-        "{term=",
-        (ShowCore.term term),
-        ", type=",
-        (ShowCore.type_ typ),
-        ", subst=",
-        (ShowTyping.typeSubst subst),
-        "}"])
--- | Create an inference result with no class constraints
-yield :: Context.Context -> Core.Term -> Core.Type -> Typing.TypeSubst -> Typing.InferenceResult
-yield fcx term typ subst =
-    Typing.InferenceResult {
-      Typing.inferenceResultTerm = (Substitution.substTypesInTerm subst term),
-      Typing.inferenceResultType = (Substitution.substInType subst typ),
-      Typing.inferenceResultSubst = subst,
-      Typing.inferenceResultClassConstraints = Maps.empty,
-      Typing.inferenceResultContext = fcx}
--- | Create a checked inference result
-yieldChecked :: Context.Context -> Core.Term -> Core.Type -> Typing.TypeSubst -> Typing.InferenceResult
-yieldChecked fcx term typ subst =
-
-      let iterm = Substitution.substTypesInTerm subst term
-          itype = Substitution.substInType subst typ
-      in Typing.InferenceResult {
-        Typing.inferenceResultTerm = iterm,
-        Typing.inferenceResultType = itype,
-        Typing.inferenceResultSubst = subst,
-        Typing.inferenceResultClassConstraints = Maps.empty,
-        Typing.inferenceResultContext = fcx}
--- | Create a checked inference result with class constraints
-yieldCheckedWithConstraints :: Context.Context -> Core.Term -> Core.Type -> Typing.TypeSubst -> M.Map Core.Name Core.TypeVariableMetadata -> Typing.InferenceResult
-yieldCheckedWithConstraints fcx term typ subst constraints =
-
-      let iterm = Substitution.substTypesInTerm subst term
-          itype = Substitution.substInType subst typ
-          iconstraints = Substitution.substInClassConstraints subst constraints
-      in Typing.InferenceResult {
-        Typing.inferenceResultTerm = iterm,
-        Typing.inferenceResultType = itype,
-        Typing.inferenceResultSubst = subst,
-        Typing.inferenceResultClassConstraints = iconstraints,
-        Typing.inferenceResultContext = fcx}
--- | Create an inference result with debug output
-yieldDebug :: Context.Context -> t0 -> String -> Core.Term -> Core.Type -> Typing.TypeSubst -> Either Errors.Error Typing.InferenceResult
-yieldDebug fcx cx debugId term typ subst =
-
-      let rterm = Substitution.substTypesInTerm subst term
-          rtyp = Substitution.substInType subst typ
-      in (Eithers.bind (Annotations.debugIf fcx debugId (Strings.cat [
-        "\n\tterm: ",
-        (ShowCore.term term),
-        "\n\ttyp: ",
-        (ShowCore.type_ typ),
-        "\n\tsubst: ",
-        (ShowTyping.typeSubst subst),
-        "\n\trterm: ",
-        (ShowCore.term rterm),
-        "\n\trtyp: ",
-        (ShowCore.type_ rtyp)])) (\result -> Right (Typing.InferenceResult {
-        Typing.inferenceResultTerm = rterm,
-        Typing.inferenceResultType = rtyp,
-        Typing.inferenceResultSubst = subst,
-        Typing.inferenceResultClassConstraints = Maps.empty,
-        Typing.inferenceResultContext = fcx})))
--- | Create an inference result with class constraints
-yieldWithConstraints :: Context.Context -> Core.Term -> Core.Type -> Typing.TypeSubst -> M.Map Core.Name Core.TypeVariableMetadata -> Typing.InferenceResult
-yieldWithConstraints fcx term typ subst constraints =
-    Typing.InferenceResult {
-      Typing.inferenceResultTerm = (Substitution.substTypesInTerm subst term),
-      Typing.inferenceResultType = (Substitution.substInType subst typ),
-      Typing.inferenceResultSubst = subst,
-      Typing.inferenceResultClassConstraints = constraints,
-      Typing.inferenceResultContext = fcx}
diff --git a/src/main/haskell/Hydra/Java/Coder.hs b/src/main/haskell/Hydra/Java/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Coder.hs
+++ /dev/null
@@ -1,2799 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Java code generator: converts Hydra modules to Java source code
-
-module Hydra.Java.Coder where
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Arity as Arity
-import qualified Hydra.Checking as Checking
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Java.Environment as JavaEnvironment
-import qualified Hydra.Java.Language as Language
-import qualified Hydra.Java.Names as JavaNames
-import qualified Hydra.Java.Serde as Serde
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Java.Utils as Utils
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Util as Util
-import qualified Hydra.Variables as Variables
-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
-addComment :: Syntax.ClassBodyDeclaration -> Core.FieldType -> t0 -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclarationWithComments
-addComment decl field cx g =
-    Eithers.map (\c -> Syntax.ClassBodyDeclarationWithComments {
-      Syntax.classBodyDeclarationWithCommentsValue = decl,
-      Syntax.classBodyDeclarationWithCommentsComments = c}) (Annotations.commentsFromFieldType cx g field)
-analyzeJavaFunction :: JavaEnvironment.JavaEnvironment -> Core.Term -> Context.Context -> t0 -> Either t1 (Typing.FunctionStructure JavaEnvironment.JavaEnvironment)
-analyzeJavaFunction env term cx g = Analysis.analyzeFunctionTerm cx javaEnvGetGraph javaEnvSetGraph env term
-annotateBodyWithCod :: Core.Type -> Core.Term -> Core.Term
-annotateBodyWithCod typ term =
-
-      let setAnn = \t -> Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ typ)) t
-      in case (Strip.deannotateTerm term) of
-        Core.TermTypeApplication _ -> setAnn term
-        Core.TermApplication v0 ->
-          let lhs = Core.applicationFunction v0
-              rhs = Core.applicationArgument v0
-              annotatedRhs =
-                      case (Strip.deannotateTerm rhs) of
-                        Core.TermTypeApplication _ -> annotateBodyWithCod (extractArgType lhs typ) rhs
-                        _ -> rhs
-          in (setAnn (Core.TermApplication (Core.Application {
-            Core.applicationFunction = lhs,
-            Core.applicationArgument = annotatedRhs})))
-        _ -> setAnn term
-annotateLambdaArgs :: Core.Name -> [Core.Type] -> [Core.Term] -> t0 -> Graph.Graph -> Either t1 [Core.Term]
-annotateLambdaArgs cname tApps argTerms cx g =
-    Logic.ifElse (Lists.null tApps) (Right argTerms) (Eithers.bind (Eithers.bind (Right (Lexical.lookupBinding g cname)) (\mel -> Maybes.cases mel (Right (Maybes.map (\prim -> Graph.primitiveTypeScheme prim) (Maps.lookup cname (Graph.graphPrimitives g)))) (\el -> Right (Core.bindingTypeScheme el)))) (\mts -> Maybes.cases mts (Right argTerms) (\ts ->
-      let schemeType = Core.typeSchemeBody ts
-          schemeTypeVars = collectTypeVars schemeType
-          schemeVars = Lists.filter (\v -> Sets.member v schemeTypeVars) (Core.typeSchemeVariables ts)
-      in (Logic.ifElse (Logic.or (Lists.null schemeVars) (Logic.not (Equality.equal (Lists.length schemeVars) (Lists.length tApps)))) (Right argTerms) (
-        let subst = Maps.fromList (Lists.zip schemeVars tApps)
-            expectedTypes = peelExpectedTypes subst (Lists.length argTerms) schemeType
-        in (Right (Lists.zipWith (\arg -> \mExpected -> propagateType mExpected arg) argTerms (Lists.concat2 expectedTypes (Lists.replicate (Lists.length argTerms) (Core.TypeVariable (Core.Name "unused")))))))))))
-applyCastIfSafe :: JavaEnvironment.Aliases -> Core.Type -> Syntax.Expression -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-applyCastIfSafe aliases castType expr cx g =
-
-      let trusted = JavaEnvironment.aliasesTrustedTypeVars aliases
-          inScope = JavaEnvironment.aliasesInScopeTypeParams aliases
-          castVars = collectTypeVars castType
-          javaTypeVars =
-                  Sets.fromList (Lists.filter (\v -> Logic.or (Sets.member v inScope) (isLambdaBoundVariable v)) (Sets.toList castVars))
-          isSafe = Logic.or (Sets.null trusted) (Logic.or (Sets.null javaTypeVars) (Sets.null (Sets.difference javaTypeVars trusted)))
-      in (Logic.ifElse isSafe (Eithers.bind (encodeType aliases Sets.empty castType cx g) (\jtype -> Eithers.bind (Utils.javaTypeToJavaReferenceType jtype cx) (\rt -> Right (Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression rt (Utils.javaExpressionToJavaUnaryExpression expr)))))) (Right expr))
-applyJavaArg :: Syntax.Expression -> Syntax.Expression -> Syntax.Expression
-applyJavaArg expr jarg =
-    Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation (Just (Right (Utils.javaExpressionToJavaPrimary expr))) (Syntax.Identifier JavaNames.applyMethodName) [
-      jarg])
-applyOvergenSubstToTermAnnotations :: M.Map Core.Name Core.Type -> Core.Term -> t0 -> Graph.Graph -> Either t1 Core.Term
-applyOvergenSubstToTermAnnotations subst term0 cx g = Right (applyOvergenSubstToTermAnnotations_go subst g term0)
-applyOvergenSubstToTermAnnotations_go :: M.Map Core.Name Core.Type -> Graph.Graph -> Core.Term -> Core.Term
-applyOvergenSubstToTermAnnotations_go subst cx term =
-    case term of
-      Core.TermAnnotated v0 ->
-        let inner = Core.annotatedTermBody v0
-            ann = Core.annotatedTermAnnotation v0
-            ann_ =
-                    Maybes.cases (Maps.lookup Constants.key_type ann) ann (\typeTerm -> Eithers.either (\_ -> ann) (\t ->
-                      let t_ = substituteTypeVarsWithTypes subst t
-                      in (Maps.insert Constants.key_type (EncodeCore.type_ t_) ann)) (DecodeCore.type_ cx typeTerm))
-        in (Core.TermAnnotated (Core.AnnotatedTerm {
-          Core.annotatedTermBody = (applyOvergenSubstToTermAnnotations_go subst cx inner),
-          Core.annotatedTermAnnotation = ann_}))
-      Core.TermApplication v0 -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = (applyOvergenSubstToTermAnnotations_go subst cx (Core.applicationFunction v0)),
-        Core.applicationArgument = (applyOvergenSubstToTermAnnotations_go subst cx (Core.applicationArgument v0))})
-      Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.lambdaParameter v0),
-        Core.lambdaDomain = (Maybes.map (\d -> substituteTypeVarsWithTypes subst d) (Core.lambdaDomain v0)),
-        Core.lambdaBody = (applyOvergenSubstToTermAnnotations_go subst cx (Core.lambdaBody v0))})
-      Core.TermCases v0 -> Core.TermCases (Core.CaseStatement {
-        Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-        Core.caseStatementDefault = (Maybes.map (\d -> applyOvergenSubstToTermAnnotations_go subst cx d) (Core.caseStatementDefault v0)),
-        Core.caseStatementCases = (Lists.map (\fld -> Core.Field {
-          Core.fieldName = (Core.fieldName fld),
-          Core.fieldTerm = (applyOvergenSubstToTermAnnotations_go subst cx (Core.fieldTerm fld))}) (Core.caseStatementCases v0))})
-      Core.TermLet v0 -> Core.TermLet (Core.Let {
-        Core.letBindings = (Lists.map (\b -> Core.Binding {
-          Core.bindingName = (Core.bindingName b),
-          Core.bindingTerm = (applyOvergenSubstToTermAnnotations_go subst cx (Core.bindingTerm b)),
-          Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) (Core.letBindings v0)),
-        Core.letBody = (applyOvergenSubstToTermAnnotations_go subst cx (Core.letBody v0))})
-      Core.TermTypeApplication v0 -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-        Core.typeApplicationTermBody = (applyOvergenSubstToTermAnnotations_go subst cx (Core.typeApplicationTermBody v0)),
-        Core.typeApplicationTermType = (substituteTypeVarsWithTypes subst (Core.typeApplicationTermType v0))})
-      Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-        Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-        Core.typeLambdaBody = (applyOvergenSubstToTermAnnotations_go subst cx (Core.typeLambdaBody v0))})
-      _ -> term
-applySubstFull :: M.Map Core.Name Core.Type -> Core.Type -> Core.Type
-applySubstFull s t =
-    case (Strip.deannotateType t) of
-      Core.TypeVariable v0 -> Maps.findWithDefault t v0 s
-      Core.TypeFunction v0 -> Core.TypeFunction (Core.FunctionType {
-        Core.functionTypeDomain = (applySubstFull s (Core.functionTypeDomain v0)),
-        Core.functionTypeCodomain = (applySubstFull s (Core.functionTypeCodomain v0))})
-      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (applySubstFull s (Core.applicationTypeFunction v0)),
-        Core.applicationTypeArgument = (applySubstFull s (Core.applicationTypeArgument v0))})
-      Core.TypeList v0 -> Core.TypeList (applySubstFull s v0)
-      Core.TypeSet v0 -> Core.TypeSet (applySubstFull s v0)
-      Core.TypeMaybe v0 -> Core.TypeMaybe (applySubstFull s v0)
-      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (applySubstFull s (Core.mapTypeKeys v0)),
-        Core.mapTypeValues = (applySubstFull s (Core.mapTypeValues v0))})
-      Core.TypePair v0 -> Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (applySubstFull s (Core.pairTypeFirst v0)),
-        Core.pairTypeSecond = (applySubstFull s (Core.pairTypeSecond v0))})
-      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-        Core.eitherTypeLeft = (applySubstFull s (Core.eitherTypeLeft v0)),
-        Core.eitherTypeRight = (applySubstFull s (Core.eitherTypeRight v0))})
-      Core.TypeForall v0 -> Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = (Core.forallTypeParameter v0),
-        Core.forallTypeBody = (applySubstFull (Maps.delete (Core.forallTypeParameter v0) s) (Core.forallTypeBody v0))})
-      _ -> t
-applySubstSimple :: M.Map Core.Name Core.Type -> Core.Type -> Core.Type
-applySubstSimple subst t =
-    case (Strip.deannotateType t) of
-      Core.TypeVariable v0 -> Maps.findWithDefault t v0 subst
-      _ -> t
-arraysCompareExpr :: String -> String -> Syntax.Expression
-arraysCompareExpr otherVar fname =
-
-      let header =
-              Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantType (Utils.javaTypeName (Syntax.Identifier "java.util.Arrays"))),
-                Syntax.methodInvocation_ComplexTypeArguments = [],
-                Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier "compare")})
-          arg1 =
-                  Utils.javaExpressionNameToJavaExpression (Syntax.ExpressionName {
-                    Syntax.expressionNameQualifier = Nothing,
-                    Syntax.expressionNameIdentifier = (Syntax.Identifier (Utils.sanitizeJavaName fname))})
-          arg2 =
-                  Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Utils.javaIdentifier otherVar) (Utils.javaIdentifier fname))
-      in (Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-        Syntax.methodInvocationHeader = header,
-        Syntax.methodInvocationArguments = [
-          arg1,
-          arg2]}))
-arraysEqualsClause :: String -> String -> Syntax.InclusiveOrExpression
-arraysEqualsClause tmpName fname =
-
-      let thisArg =
-              Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Syntax.Identifier "this") (Utils.javaIdentifier fname))
-          otherArg =
-                  Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Utils.javaIdentifier tmpName) (Utils.javaIdentifier fname))
-          header =
-                  Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                    Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantType (Utils.javaTypeName (Syntax.Identifier "java.util.Arrays"))),
-                    Syntax.methodInvocation_ComplexTypeArguments = [],
-                    Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.equalsMethodName)})
-      in (Utils.javaPostfixExpressionToJavaInclusiveOrExpression (Utils.javaMethodInvocationToJavaPostfixExpression (Syntax.MethodInvocation {
-        Syntax.methodInvocationHeader = header,
-        Syntax.methodInvocationArguments = [
-          thisArg,
-          otherArg]})))
-augmentVariantClass :: JavaEnvironment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> Syntax.ClassDeclaration -> Syntax.ClassDeclaration
-augmentVariantClass aliases tparams elName cd =
-    case cd of
-      Syntax.ClassDeclarationNormal v0 ->
-        let args = Lists.map (\tp -> Utils.typeParameterToTypeArgument tp) tparams
-            extendsPart = Utils.nameToJavaClassType aliases True args elName Nothing
-            newMods =
-                    [
-                      Syntax.ClassModifierPublic,
-                      Syntax.ClassModifierStatic,
-                      Syntax.ClassModifierFinal]
-            oldBody = Syntax.normalClassDeclarationBody v0
-            oldDecls = Syntax.unClassBody oldBody
-            acceptDecl = noComment (Utils.toAcceptMethod False tparams)
-            newBody = Syntax.ClassBody (Lists.concat2 oldDecls [
-                  acceptDecl])
-        in (Syntax.ClassDeclarationNormal (Syntax.NormalClassDeclaration {
-          Syntax.normalClassDeclarationModifiers = newMods,
-          Syntax.normalClassDeclarationIdentifier = (Syntax.normalClassDeclarationIdentifier v0),
-          Syntax.normalClassDeclarationParameters = tparams,
-          Syntax.normalClassDeclarationExtends = (Just extendsPart),
-          Syntax.normalClassDeclarationImplements = (Syntax.normalClassDeclarationImplements v0),
-          Syntax.normalClassDeclarationBody = newBody}))
-      _ -> cd
-bindingIsFunctionType :: Core.Binding -> Bool
-bindingIsFunctionType b =
-    Maybes.maybe (case (Strip.deannotateTerm (Core.bindingTerm b)) of
-      Core.TermLambda _ -> True
-      Core.TermProject _ -> True
-      Core.TermCases _ -> True
-      Core.TermUnwrap _ -> True
-      _ -> False) (\ts -> case (Strip.deannotateType (Core.typeSchemeBody ts)) of
-      Core.TypeFunction _ -> True
-      Core.TypeForall v0 -> case (Strip.deannotateType (Core.forallTypeBody v0)) of
-        Core.TypeFunction _ -> True
-        _ -> False
-      _ -> False) (Core.bindingTypeScheme b)
-bindingNameToFilePath :: Core.Name -> String
-bindingNameToFilePath name =
-
-      let qn = Names.qualifyName name
-          ns_ = Packaging.qualifiedNameNamespace qn
-          local = Packaging.qualifiedNameLocal qn
-          sanitized = Formatting.sanitizeWithUnderscores Language.reservedWords local
-          unq =
-                  Names.unqualifyName (Packaging.QualifiedName {
-                    Packaging.qualifiedNameNamespace = ns_,
-                    Packaging.qualifiedNameLocal = sanitized})
-      in (Names.nameToFilePath Util.CaseConventionCamel Util.CaseConventionPascal (Packaging.FileExtension "java") unq)
-bindingsToStatements :: JavaEnvironment.JavaEnvironment -> [Core.Binding] -> Context.Context -> Graph.Graph -> Either Errors.Error ([Syntax.BlockStatement], JavaEnvironment.JavaEnvironment)
-bindingsToStatements env bindings cx g0 =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          g = JavaEnvironment.javaEnvironmentGraph env
-          flatBindings = dedupBindings (JavaEnvironment.aliasesInScopeJavaVars aliases) (flattenBindings bindings)
-          gExtended =
-                  Scoping.extendGraphForLet (\g2 -> \b -> Logic.ifElse (Predicates.isComplexBinding g2 b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing) g (Core.Let {
-                    Core.letBindings = flatBindings,
-                    Core.letBody = (Core.TermVariable (Core.Name "dummy"))})
-          bindingVars = Sets.fromList (Lists.map (\b -> Core.bindingName b) flatBindings)
-          allDeps =
-                  Maps.fromList (Lists.map (\b ->
-                    let key = Core.bindingName b
-                        deps = Sets.intersection bindingVars (Variables.freeVariablesInTerm (Core.bindingTerm b))
-                    in (key, deps)) flatBindings)
-          sorted =
-                  Sorting.topologicalSortComponents (Lists.map (\entry ->
-                    let key = Pairs.first entry
-                        deps = Pairs.second entry
-                    in (key, (Sets.toList deps))) (Maps.toList allDeps))
-          recursiveVars =
-                  Sets.fromList (Lists.concat (Lists.map (\names -> Logic.ifElse (Equality.equal (Lists.length names) 1) (Maybes.maybe [] (\singleName -> Maybes.cases (Maps.lookup singleName allDeps) [] (\deps -> Logic.ifElse (Sets.member singleName deps) [
-                    singleName] [])) (Lists.maybeHead names)) names) sorted))
-          thunkedVars =
-                  Sets.fromList (Lists.concat (Lists.map (\b ->
-                    let bname = Core.bindingName b
-                    in (Logic.ifElse (Logic.and (Logic.not (Sets.member bname recursiveVars)) (Logic.and (needsThunking (Core.bindingTerm b)) (Logic.not (bindingIsFunctionType b)))) [
-                      bname] [])) flatBindings))
-          aliasesExtended =
-                  JavaEnvironment.Aliases {
-                    JavaEnvironment.aliasesCurrentNamespace = (JavaEnvironment.aliasesCurrentNamespace aliases),
-                    JavaEnvironment.aliasesPackages = (JavaEnvironment.aliasesPackages aliases),
-                    JavaEnvironment.aliasesBranchVars = (JavaEnvironment.aliasesBranchVars aliases),
-                    JavaEnvironment.aliasesRecursiveVars = (Sets.union (JavaEnvironment.aliasesRecursiveVars aliases) recursiveVars),
-                    JavaEnvironment.aliasesInScopeTypeParams = (JavaEnvironment.aliasesInScopeTypeParams aliases),
-                    JavaEnvironment.aliasesPolymorphicLocals = (JavaEnvironment.aliasesPolymorphicLocals aliases),
-                    JavaEnvironment.aliasesInScopeJavaVars = (Sets.union (JavaEnvironment.aliasesInScopeJavaVars aliases) bindingVars),
-                    JavaEnvironment.aliasesVarRenames = (JavaEnvironment.aliasesVarRenames aliases),
-                    JavaEnvironment.aliasesLambdaVars = (JavaEnvironment.aliasesLambdaVars aliases),
-                    JavaEnvironment.aliasesTypeVarSubst = (JavaEnvironment.aliasesTypeVarSubst aliases),
-                    JavaEnvironment.aliasesTrustedTypeVars = (JavaEnvironment.aliasesTrustedTypeVars aliases),
-                    JavaEnvironment.aliasesMethodCodomain = (JavaEnvironment.aliasesMethodCodomain aliases),
-                    JavaEnvironment.aliasesThunkedVars = (Sets.union (JavaEnvironment.aliasesThunkedVars aliases) thunkedVars)}
-          envExtended =
-                  JavaEnvironment.JavaEnvironment {
-                    JavaEnvironment.javaEnvironmentAliases = aliasesExtended,
-                    JavaEnvironment.javaEnvironmentGraph = gExtended}
-      in (Logic.ifElse (Lists.null bindings) (Right ([], envExtended)) (Eithers.bind (Eithers.mapList (\names -> Eithers.bind (Eithers.mapList (\n -> toDeclInit aliasesExtended gExtended recursiveVars flatBindings n cx g) names) (\inits -> Eithers.bind (Eithers.mapList (\n -> toDeclStatement envExtended aliasesExtended gExtended recursiveVars thunkedVars flatBindings n cx g) names) (\decls -> Right (Lists.concat2 (Maybes.cat inits) decls)))) sorted) (\groups -> Right (Lists.concat groups, envExtended))))
-boundTypeVariables :: Core.Type -> [Core.Name]
-boundTypeVariables typ =
-    case typ of
-      Core.TypeAnnotated v0 -> boundTypeVariables (Core.annotatedTypeBody v0)
-      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (boundTypeVariables (Core.forallTypeBody v0))
-      _ -> []
-buildArgSubst :: S.Set Core.Name -> [Core.Type] -> [t0] -> M.Map Core.Name t0
-buildArgSubst schemeVarSet schemeDoms argTypes =
-    Maps.fromList (Lists.bind (Lists.zip schemeDoms argTypes) (\p ->
-      let sdom = Pairs.first p
-          argType = Pairs.second p
-      in case (Strip.deannotateType sdom) of
-        Core.TypeVariable v0 -> Logic.ifElse (Sets.member v0 schemeVarSet) [
-          (v0, argType)] []
-        _ -> []))
-buildCurriedLambda :: [Core.Name] -> Syntax.Expression -> Syntax.Expression
-buildCurriedLambda params inner = Lists.foldl (\acc -> \p -> Utils.javaLambda p acc) inner (Lists.reverse params)
-buildSubstFromAnnotations :: S.Set Core.Name -> Core.Term -> t0 -> Graph.Graph -> Either t1 (M.Map Core.Name Core.Name)
-buildSubstFromAnnotations schemeVarSet term cx g = Right (buildSubstFromAnnotations_go schemeVarSet g term)
-buildSubstFromAnnotations_go :: S.Set Core.Name -> Graph.Graph -> Core.Term -> M.Map Core.Name Core.Name
-buildSubstFromAnnotations_go schemeVarSet g term =
-    case term of
-      Core.TermAnnotated v0 ->
-        let body = Core.annotatedTermBody v0
-            anns = Core.annotatedTermAnnotation v0
-            bodySubst = buildSubstFromAnnotations_go schemeVarSet g body
-            annSubst =
-                    Maybes.cases (Maps.lookup Constants.key_type anns) Maps.empty (\typeTerm -> Eithers.either (\_ -> Maps.empty) (\annType -> case (Strip.deannotateTerm body) of
-                      Core.TermLambda v1 -> Maybes.cases (Core.lambdaDomain v1) Maps.empty (\dom -> case (Strip.deannotateType annType) of
-                        Core.TypeFunction v2 -> buildTypeVarSubst schemeVarSet (Core.functionTypeDomain v2) dom
-                        _ -> Maps.empty)
-                      _ -> Maps.empty) (DecodeCore.type_ g typeTerm))
-        in (Maps.union annSubst bodySubst)
-      Core.TermApplication v0 -> Maps.union (buildSubstFromAnnotations_go schemeVarSet g (Core.applicationFunction v0)) (buildSubstFromAnnotations_go schemeVarSet g (Core.applicationArgument v0))
-      Core.TermLambda v0 -> buildSubstFromAnnotations_go schemeVarSet g (Core.lambdaBody v0)
-      Core.TermCases v0 ->
-        let defSubst = Maybes.cases (Core.caseStatementDefault v0) Maps.empty (\d -> buildSubstFromAnnotations_go schemeVarSet g d)
-            caseSubsts =
-                    Lists.foldl (\acc -> \fld -> Maps.union acc (buildSubstFromAnnotations_go schemeVarSet g (Core.fieldTerm fld))) Maps.empty (Core.caseStatementCases v0)
-        in (Maps.union defSubst caseSubsts)
-      Core.TermLet v0 ->
-        let bindingSubst =
-                Lists.foldl (\acc -> \b -> Maps.union acc (buildSubstFromAnnotations_go schemeVarSet g (Core.bindingTerm b))) Maps.empty (Core.letBindings v0)
-        in (Maps.union bindingSubst (buildSubstFromAnnotations_go schemeVarSet g (Core.letBody v0)))
-      Core.TermList v0 -> Lists.foldl (\acc -> \t -> Maps.union acc (buildSubstFromAnnotations_go schemeVarSet g t)) Maps.empty v0
-      Core.TermMaybe v0 -> Maybes.cases v0 Maps.empty (\t -> buildSubstFromAnnotations_go schemeVarSet g t)
-      Core.TermPair v0 -> Maps.union (buildSubstFromAnnotations_go schemeVarSet g (Pairs.first v0)) (buildSubstFromAnnotations_go schemeVarSet g (Pairs.second v0))
-      Core.TermRecord v0 -> Lists.foldl (\acc -> \fld -> Maps.union acc (buildSubstFromAnnotations_go schemeVarSet g (Core.fieldTerm fld))) Maps.empty (Core.recordFields v0)
-      Core.TermSet v0 -> Lists.foldl (\acc -> \t -> Maps.union acc (buildSubstFromAnnotations_go schemeVarSet g t)) Maps.empty (Sets.toList v0)
-      Core.TermTypeApplication v0 -> buildSubstFromAnnotations_go schemeVarSet g (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> buildSubstFromAnnotations_go schemeVarSet g (Core.typeLambdaBody v0)
-      Core.TermEither v0 -> Eithers.either (\t -> buildSubstFromAnnotations_go schemeVarSet g t) (\t -> buildSubstFromAnnotations_go schemeVarSet g t) v0
-      _ -> Maps.empty
-buildTypeSubst :: S.Set Core.Name -> Core.Type -> Core.Type -> M.Map Core.Name Core.Type
-buildTypeSubst schemeVarSet schemeType actualType =
-    buildTypeSubst_go schemeVarSet (Strip.deannotateType schemeType) (Strip.deannotateType actualType)
-buildTypeSubst_go :: S.Set Core.Name -> Core.Type -> Core.Type -> M.Map Core.Name Core.Type
-buildTypeSubst_go svs st at =
-
-      let goSub = \a -> \b -> buildTypeSubst_go svs (Strip.deannotateType a) (Strip.deannotateType b)
-      in case st of
-        Core.TypeVariable v0 -> Logic.ifElse (Sets.member v0 svs) (Maps.singleton v0 at) Maps.empty
-        Core.TypeFunction v0 -> case at of
-          Core.TypeFunction v1 -> Maps.union (goSub (Core.functionTypeDomain v0) (Core.functionTypeDomain v1)) (goSub (Core.functionTypeCodomain v0) (Core.functionTypeCodomain v1))
-          _ -> Maps.empty
-        Core.TypeApplication v0 -> case at of
-          Core.TypeApplication v1 -> Maps.union (goSub (Core.applicationTypeFunction v0) (Core.applicationTypeFunction v1)) (goSub (Core.applicationTypeArgument v0) (Core.applicationTypeArgument v1))
-          _ -> Maps.empty
-        Core.TypeList v0 -> case at of
-          Core.TypeList v1 -> goSub v0 v1
-          _ -> Maps.empty
-        Core.TypeSet v0 -> case at of
-          Core.TypeSet v1 -> goSub v0 v1
-          _ -> Maps.empty
-        Core.TypeMaybe v0 -> case at of
-          Core.TypeMaybe v1 -> goSub v0 v1
-          _ -> Maps.empty
-        Core.TypeMap v0 -> case at of
-          Core.TypeMap v1 -> Maps.union (goSub (Core.mapTypeKeys v0) (Core.mapTypeKeys v1)) (goSub (Core.mapTypeValues v0) (Core.mapTypeValues v1))
-          _ -> Maps.empty
-        Core.TypePair v0 -> case at of
-          Core.TypePair v1 -> Maps.union (goSub (Core.pairTypeFirst v0) (Core.pairTypeFirst v1)) (goSub (Core.pairTypeSecond v0) (Core.pairTypeSecond v1))
-          _ -> Maps.empty
-        Core.TypeEither v0 -> case at of
-          Core.TypeEither v1 -> Maps.union (goSub (Core.eitherTypeLeft v0) (Core.eitherTypeLeft v1)) (goSub (Core.eitherTypeRight v0) (Core.eitherTypeRight v1))
-          _ -> Maps.empty
-        Core.TypeForall v0 -> case at of
-          Core.TypeForall v1 -> goSub (Core.forallTypeBody v0) (Core.forallTypeBody v1)
-          _ -> goSub (Core.forallTypeBody v0) at
-        _ -> Maps.empty
-buildTypeVarSubst :: S.Set Core.Name -> Core.Type -> Core.Type -> M.Map Core.Name Core.Name
-buildTypeVarSubst schemeVarSet freshTyp canonTyp =
-    buildTypeVarSubst_go schemeVarSet (Strip.deannotateType freshTyp) (Strip.deannotateType canonTyp)
-buildTypeVarSubst_go :: S.Set Core.Name -> Core.Type -> Core.Type -> M.Map Core.Name Core.Name
-buildTypeVarSubst_go svs ft ct =
-
-      let goSub = \a -> \b -> buildTypeVarSubst_go svs (Strip.deannotateType a) (Strip.deannotateType b)
-      in case ft of
-        Core.TypeVariable v0 -> case ct of
-          Core.TypeVariable v1 -> Logic.ifElse (Logic.and (Logic.not (Equality.equal v0 v1)) (Sets.member v1 svs)) (Maps.singleton v0 v1) Maps.empty
-          _ -> Maps.empty
-        Core.TypeFunction v0 -> case ct of
-          Core.TypeFunction v1 -> Maps.union (goSub (Core.functionTypeDomain v0) (Core.functionTypeDomain v1)) (goSub (Core.functionTypeCodomain v0) (Core.functionTypeCodomain v1))
-          _ -> Maps.empty
-        Core.TypeApplication v0 -> case ct of
-          Core.TypeApplication v1 -> Maps.union (goSub (Core.applicationTypeFunction v0) (Core.applicationTypeFunction v1)) (goSub (Core.applicationTypeArgument v0) (Core.applicationTypeArgument v1))
-          _ -> Maps.empty
-        Core.TypeList v0 -> case ct of
-          Core.TypeList v1 -> goSub v0 v1
-          _ -> Maps.empty
-        Core.TypeSet v0 -> case ct of
-          Core.TypeSet v1 -> goSub v0 v1
-          _ -> Maps.empty
-        Core.TypeMaybe v0 -> case ct of
-          Core.TypeMaybe v1 -> goSub v0 v1
-          _ -> Maps.empty
-        Core.TypeMap v0 -> case ct of
-          Core.TypeMap v1 -> Maps.union (goSub (Core.mapTypeKeys v0) (Core.mapTypeKeys v1)) (goSub (Core.mapTypeValues v0) (Core.mapTypeValues v1))
-          _ -> Maps.empty
-        Core.TypePair v0 -> case ct of
-          Core.TypePair v1 -> Maps.union (goSub (Core.pairTypeFirst v0) (Core.pairTypeFirst v1)) (goSub (Core.pairTypeSecond v0) (Core.pairTypeSecond v1))
-          _ -> Maps.empty
-        Core.TypeEither v0 -> case ct of
-          Core.TypeEither v1 -> Maps.union (goSub (Core.eitherTypeLeft v0) (Core.eitherTypeLeft v1)) (goSub (Core.eitherTypeRight v0) (Core.eitherTypeRight v1))
-          _ -> Maps.empty
-        Core.TypeForall v0 -> case ct of
-          Core.TypeForall v1 -> goSub (Core.forallTypeBody v0) (Core.forallTypeBody v1)
-          _ -> buildTypeVarSubst_go svs (Strip.deannotateType (Core.forallTypeBody v0)) ct
-        _ -> case ct of
-          Core.TypeForall v0 -> buildTypeVarSubst_go svs ft (Strip.deannotateType (Core.forallTypeBody v0))
-          _ -> Maps.empty
-classModsPublic :: [Syntax.ClassModifier]
-classModsPublic = [
-  Syntax.ClassModifierPublic]
-classifyDataReference :: Core.Name -> t0 -> Graph.Graph -> Either Errors.Error JavaEnvironment.JavaSymbolClass
-classifyDataReference name cx g =
-    Eithers.bind (Right (Lexical.lookupBinding g name)) (\mel -> Maybes.cases mel (Right JavaEnvironment.JavaSymbolClassLocalVariable) (\el -> Maybes.cases (Core.bindingTypeScheme el) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "no type scheme for element " (Core.unName (Core.bindingName el)))))) (\ts -> Right (classifyDataTerm ts (Core.bindingTerm el)))))
-classifyDataTerm :: Core.TypeScheme -> Core.Term -> JavaEnvironment.JavaSymbolClass
-classifyDataTerm ts term =
-    Logic.ifElse (Dependencies.isLambda term) (
-      let n = classifyDataTerm_countLambdaParams term
-      in (Logic.ifElse (Equality.gt n 1) (JavaEnvironment.JavaSymbolClassHoistedLambda n) JavaEnvironment.JavaSymbolClassUnaryFunction)) (
-      let hasTypeParams = Logic.not (Lists.null (Core.typeSchemeVariables ts))
-      in (Logic.ifElse hasTypeParams (
-        let n2 = classifyDataTerm_countLambdaParams (classifyDataTerm_stripTypeLambdas term)
-        in (Logic.ifElse (Equality.gt n2 0) (JavaEnvironment.JavaSymbolClassHoistedLambda n2) JavaEnvironment.JavaSymbolClassNullaryFunction)) JavaEnvironment.JavaSymbolClassNullaryFunction))
-classifyDataTerm_countLambdaParams :: Core.Term -> Int
-classifyDataTerm_countLambdaParams t =
-    case (Strip.deannotateTerm t) of
-      Core.TermLambda v0 -> Math.add 1 (classifyDataTerm_countLambdaParams (Core.lambdaBody v0))
-      Core.TermLet v0 -> classifyDataTerm_countLambdaParams (Core.letBody v0)
-      _ -> 0
-classifyDataTerm_stripTypeLambdas :: Core.Term -> Core.Term
-classifyDataTerm_stripTypeLambdas t =
-    case (Strip.deannotateTerm t) of
-      Core.TermTypeLambda v0 -> classifyDataTerm_stripTypeLambdas (Core.typeLambdaBody v0)
-      _ -> t
-cmpDeclStatement :: t0 -> Syntax.BlockStatement
-cmpDeclStatement aliases =
-    Utils.variableDeclarationStatement aliases Utils.javaIntType (Utils.javaIdentifier "cmp") (Utils.javaIntExpression 0)
-cmpNotZeroExpr :: Syntax.Expression
-cmpNotZeroExpr =
-    Utils.javaEqualityExpressionToJavaExpression (Syntax.EqualityExpressionNotEqual (Syntax.EqualityExpression_Binary {
-      Syntax.equalityExpression_BinaryLhs = lhs,
-      Syntax.equalityExpression_BinaryRhs = rhs}))
-  where
-    lhs =
-        Utils.javaRelationalExpressionToJavaEqualityExpression (Utils.javaPostfixExpressionToJavaRelationalExpression (Syntax.PostfixExpressionName (Syntax.ExpressionName {
-          Syntax.expressionNameQualifier = Nothing,
-          Syntax.expressionNameIdentifier = (Utils.javaIdentifier "cmp")})))
-    rhs =
-        Utils.javaPostfixExpressionToJavaRelationalExpression (Syntax.PostfixExpressionPrimary (Utils.javaLiteralToJavaPrimary (Utils.javaInt 0)))
-collectForallParams :: Core.Type -> [Core.Name]
-collectForallParams t =
-    case (Strip.deannotateType t) of
-      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (collectForallParams (Core.forallTypeBody v0))
-      _ -> []
-collectLambdaDomains :: Core.Term -> ([Core.Type], Core.Term)
-collectLambdaDomains t =
-    case (Strip.deannotateTerm t) of
-      Core.TermLambda v0 -> Maybes.cases (Core.lambdaDomain v0) ([], t) (\dom ->
-        let rest = collectLambdaDomains (Core.lambdaBody v0)
-        in (Lists.cons dom (Pairs.first rest), (Pairs.second rest)))
-      _ -> ([], t)
-collectTypeApps :: Core.Term -> [Core.Type] -> (Core.Term, [Core.Type])
-collectTypeApps t acc =
-    case (Strip.deannotateTerm t) of
-      Core.TermTypeApplication v0 -> collectTypeApps (Core.typeApplicationTermBody v0) (Lists.cons (Core.typeApplicationTermType v0) acc)
-      _ -> (Strip.deannotateTerm t, acc)
-collectTypeApps0 :: Core.Term -> [Core.Type] -> (Core.Term, [Core.Type])
-collectTypeApps0 t acc =
-    case (Strip.deannotateTerm t) of
-      Core.TermTypeApplication v0 -> collectTypeApps0 (Core.typeApplicationTermBody v0) (Lists.cons (Core.typeApplicationTermType v0) acc)
-      _ -> (t, acc)
-collectTypeVars :: Core.Type -> S.Set Core.Name
-collectTypeVars typ = collectTypeVars_go (Strip.deannotateType typ)
-collectTypeVars_go :: Core.Type -> S.Set Core.Name
-collectTypeVars_go t =
-    case t of
-      Core.TypeVariable v0 -> Sets.singleton v0
-      Core.TypeFunction v0 -> Sets.union (collectTypeVars_go (Strip.deannotateType (Core.functionTypeDomain v0))) (collectTypeVars_go (Strip.deannotateType (Core.functionTypeCodomain v0)))
-      Core.TypeApplication v0 -> Sets.union (collectTypeVars_go (Strip.deannotateType (Core.applicationTypeFunction v0))) (collectTypeVars_go (Strip.deannotateType (Core.applicationTypeArgument v0)))
-      Core.TypeList v0 -> collectTypeVars_go (Strip.deannotateType v0)
-      Core.TypeSet v0 -> collectTypeVars_go (Strip.deannotateType v0)
-      Core.TypeMaybe v0 -> collectTypeVars_go (Strip.deannotateType v0)
-      Core.TypeMap v0 -> Sets.union (collectTypeVars_go (Strip.deannotateType (Core.mapTypeKeys v0))) (collectTypeVars_go (Strip.deannotateType (Core.mapTypeValues v0)))
-      Core.TypePair v0 -> Sets.union (collectTypeVars_go (Strip.deannotateType (Core.pairTypeFirst v0))) (collectTypeVars_go (Strip.deannotateType (Core.pairTypeSecond v0)))
-      Core.TypeEither v0 -> Sets.union (collectTypeVars_go (Strip.deannotateType (Core.eitherTypeLeft v0))) (collectTypeVars_go (Strip.deannotateType (Core.eitherTypeRight v0)))
-      Core.TypeForall v0 -> collectTypeVars_go (Strip.deannotateType (Core.forallTypeBody v0))
-      _ -> Sets.empty
-comparableCompareExpr :: String -> String -> Syntax.Expression
-comparableCompareExpr otherVar fname =
-
-      let thisField = Utils.javaIdentifierToJavaExpression (Syntax.Identifier (Utils.sanitizeJavaName fname))
-          otherField =
-                  Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Utils.javaIdentifier otherVar) (Utils.javaIdentifier fname))
-      in (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "hydra.util.Comparing") (Syntax.Identifier "compare") [
-        thisField,
-        otherField]))
-compareAndReturnStmts :: String -> Core.FieldType -> [Syntax.BlockStatement]
-compareAndReturnStmts otherVar f =
-    [
-      Syntax.BlockStatementStatement (Utils.javaAssignmentStatement (Syntax.LeftHandSideExpressionName (Syntax.ExpressionName {
-        Syntax.expressionNameQualifier = Nothing,
-        Syntax.expressionNameIdentifier = (Utils.javaIdentifier "cmp")})) (compareFieldExpr otherVar f)),
-      (Syntax.BlockStatementStatement (Syntax.StatementIfThen (Syntax.IfThenStatement {
-        Syntax.ifThenStatementExpression = cmpNotZeroExpr,
-        Syntax.ifThenStatementStatement = (Utils.javaReturnStatement (Just (Utils.javaExpressionNameToJavaExpression (Syntax.ExpressionName {
-          Syntax.expressionNameQualifier = Nothing,
-          Syntax.expressionNameIdentifier = (Utils.javaIdentifier "cmp")}))))})))]
-compareFieldExpr :: String -> Core.FieldType -> Syntax.Expression
-compareFieldExpr otherVar ft =
-
-      let fname = Core.unName (Core.fieldTypeName ft)
-          ftype = Core.fieldTypeType ft
-      in (Logic.ifElse (isBinaryType ftype) (arraysCompareExpr otherVar fname) (Logic.ifElse (isNonComparableType ftype) (hashCodeCompareExpr otherVar fname) (comparableCompareExpr otherVar fname)))
-compareToBody :: t0 -> String -> [Core.FieldType] -> [Syntax.BlockStatement]
-compareToBody aliases otherVar fields =
-
-      let zeroStmts = [
-            Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (Utils.javaIntExpression 0)))]
-      in (Maybes.fromMaybe zeroStmts (Maybes.map (\p ->
-        let firstField = Pairs.first p
-            restFields = Pairs.second p
-        in (Logic.ifElse (Lists.null restFields) [
-          Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (compareFieldExpr otherVar firstField)))] (Lists.concat2 [
-          cmpDeclStatement aliases] (Lists.concat2 (Lists.concat (Lists.map (\f -> compareAndReturnStmts otherVar f) (Lists.cons firstField (Maybes.fromMaybe [] (Lists.maybeInit restFields))))) [
-          Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (compareFieldExpr otherVar (Maybes.fromMaybe firstField (Lists.maybeLast restFields)))))])))) (Lists.uncons fields)))
-compareToZeroClause :: String -> String -> Syntax.InclusiveOrExpression
-compareToZeroClause tmpName fname =
-
-      let compareToArg =
-              Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Utils.javaIdentifier tmpName) (Utils.javaIdentifier fname))
-          compareToVar =
-                  Syntax.MethodInvocation_VariantExpression (Utils.fieldExpression (Syntax.Identifier "this") (Utils.javaIdentifier fname))
-          compareToHeader =
-                  Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                    Syntax.methodInvocation_ComplexVariant = compareToVar,
-                    Syntax.methodInvocation_ComplexTypeArguments = [],
-                    Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.compareToMethodName)})
-          lhs =
-                  Utils.javaRelationalExpressionToJavaEqualityExpression (Utils.javaPostfixExpressionToJavaRelationalExpression (Utils.javaMethodInvocationToJavaPostfixExpression (Syntax.MethodInvocation {
-                    Syntax.methodInvocationHeader = compareToHeader,
-                    Syntax.methodInvocationArguments = [
-                      compareToArg]})))
-          rhs =
-                  Utils.javaPostfixExpressionToJavaRelationalExpression (Syntax.PostfixExpressionPrimary (Utils.javaLiteralToJavaPrimary (Utils.javaInt 0)))
-      in (Utils.javaEqualityExpressionToJavaInclusiveOrExpression (Syntax.EqualityExpressionEqual (Syntax.EqualityExpression_Binary {
-        Syntax.equalityExpression_BinaryLhs = lhs,
-        Syntax.equalityExpression_BinaryRhs = rhs})))
-constantDecl :: String -> JavaEnvironment.Aliases -> Core.Name -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclarationWithComments
-constantDecl javaName aliases name cx g =
-
-      let mods =
-              [
-                Syntax.FieldModifierPublic,
-                Syntax.FieldModifierStatic,
-                Syntax.FieldModifierFinal]
-          nameName = Utils.nameToJavaName aliases (Core.Name "hydra.core.Name")
-          env =
-                  JavaEnvironment.JavaEnvironment {
-                    JavaEnvironment.javaEnvironmentAliases = aliases,
-                    JavaEnvironment.javaEnvironmentGraph = g}
-      in (Eithers.bind (encodeType aliases Sets.empty (Core.TypeVariable (Core.Name "hydra.core.Name")) cx g) (\jt -> Eithers.bind (encodeTerm env (Core.TermLiteral (Core.LiteralString (Core.unName name))) cx g) (\arg ->
-        let init =
-                Syntax.VariableInitializerExpression (Utils.javaConstructorCall (Utils.javaConstructorName nameName Nothing) [
-                  arg] Nothing)
-            var = Utils.javaVariableDeclarator (Syntax.Identifier javaName) (Just init)
-        in (Right (noComment (Utils.javaMemberField mods jt var))))))
-constantDeclForFieldType :: JavaEnvironment.Aliases -> Core.FieldType -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclarationWithComments
-constantDeclForFieldType aliases ftyp cx g =
-
-      let name = Core.fieldTypeName ftyp
-          javaName =
-                  Formatting.nonAlnumToUnderscores (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake (Core.unName name))
-      in (constantDecl javaName aliases name cx g)
-constantDeclForTypeName :: JavaEnvironment.Aliases -> Core.Name -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclarationWithComments
-constantDeclForTypeName aliases name cx g = constantDecl "TYPE_" aliases name cx g
-constructElementsInterface :: Packaging.Module -> [Syntax.InterfaceMemberDeclaration] -> (Core.Name, Syntax.CompilationUnit)
-constructElementsInterface mod members =
-
-      let ns = Packaging.moduleNamespace mod
-          parentNs = namespaceParent ns
-          pkg = Maybes.cases parentNs (Utils.javaPackageDeclaration ns) (\pns -> Utils.javaPackageDeclaration pns)
-          mods = [
-                Syntax.InterfaceModifierPublic]
-          className = elementsClassName ns
-          elName = elementsQualifiedName ns
-          body = Syntax.InterfaceBody members
-          itf =
-                  Syntax.TypeDeclarationInterface (Syntax.InterfaceDeclarationNormalInterface (Syntax.NormalInterfaceDeclaration {
-                    Syntax.normalInterfaceDeclarationModifiers = mods,
-                    Syntax.normalInterfaceDeclarationIdentifier = (Utils.javaTypeIdentifier className),
-                    Syntax.normalInterfaceDeclarationParameters = [],
-                    Syntax.normalInterfaceDeclarationExtends = [],
-                    Syntax.normalInterfaceDeclarationBody = body}))
-          decl =
-                  Syntax.TypeDeclarationWithComments {
-                    Syntax.typeDeclarationWithCommentsValue = itf,
-                    Syntax.typeDeclarationWithCommentsComments = (Packaging.moduleDescription mod)}
-      in (elName, (Syntax.CompilationUnitOrdinary (Syntax.OrdinaryCompilationUnit {
-        Syntax.ordinaryCompilationUnitPackage = (Just pkg),
-        Syntax.ordinaryCompilationUnitImports = [],
-        Syntax.ordinaryCompilationUnitTypes = [
-          decl]})))
-correctCastType :: Core.Term -> [Core.Type] -> Core.Type -> t0 -> t1 -> Either t2 Core.Type
-correctCastType innerBody typeArgs fallback cx g =
-    case (Strip.deannotateTerm innerBody) of
-      Core.TermPair _ -> Logic.ifElse (Equality.equal (Lists.length typeArgs) 2) (Right (Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (Maybes.fromMaybe fallback (Lists.maybeAt 0 typeArgs)),
-        Core.pairTypeSecond = (Maybes.fromMaybe fallback (Lists.maybeAt 1 typeArgs))}))) (Right fallback)
-      _ -> Right fallback
-correctTypeApps :: t0 -> Core.Name -> [Core.Term] -> [Core.Type] -> t1 -> Graph.Graph -> Either Errors.Error [Core.Type]
-correctTypeApps gr name args fallbackTypeApps cx g =
-    Eithers.bind (Right (Lexical.lookupBinding g name)) (\mel -> Maybes.cases mel (Right fallbackTypeApps) (\el -> Maybes.cases (Core.bindingTypeScheme el) (Right fallbackTypeApps) (\ts ->
-      let schemeType = Core.typeSchemeBody ts
-          allSchemeVars = Lists.filter (\v -> isSimpleName v) (Core.typeSchemeVariables ts)
-          schemeTypeVars = collectTypeVars schemeType
-          usedFlags = Lists.map (\v -> Sets.member v schemeTypeVars) allSchemeVars
-          usedSchemeVars = filterByFlags allSchemeVars usedFlags
-          nParams = countFunctionParams schemeType
-          peeled = peelDomainTypes nParams schemeType
-          calleeDoms = Pairs.first peeled
-          calleeCod = Pairs.second peeled
-          overgenSubst = detectAccumulatorUnification calleeDoms calleeCod usedSchemeVars
-          keepFlags =
-                  Lists.map (\v -> Logic.and (Sets.member v schemeTypeVars) (Logic.not (Maps.member v overgenSubst))) allSchemeVars
-          schemeVars = filterByFlags allSchemeVars keepFlags
-          filteredFallback0 =
-                  Logic.ifElse (Equality.equal (Lists.length allSchemeVars) (Lists.length fallbackTypeApps)) (filterByFlags fallbackTypeApps keepFlags) fallbackTypeApps
-          filteredFallback =
-                  Logic.ifElse (Maps.null overgenSubst) filteredFallback0 (Lists.map (\t -> substituteTypeVarsWithTypes overgenSubst t) filteredFallback0)
-      in (Logic.ifElse (Logic.or (Lists.null schemeVars) (Logic.not (Equality.equal (Lists.length schemeVars) (Lists.length filteredFallback)))) (Right filteredFallback) (correctTypeAppsWithArgs schemeVars filteredFallback schemeType args cx g)))))
-correctTypeAppsWithArgs :: [Core.Name] -> [Core.Type] -> Core.Type -> [Core.Term] -> t0 -> Graph.Graph -> Either Errors.Error [Core.Type]
-correctTypeAppsWithArgs schemeVars fallbackTypeApps schemeType args cx g =
-
-      let schemeVarSet = Sets.fromList schemeVars
-          irSubst = Maps.fromList (Lists.zip schemeVars fallbackTypeApps)
-          peeled = peelDomainTypes (Lists.length args) schemeType
-          schemeDoms = Pairs.first peeled
-      in (Eithers.bind (Eithers.mapList (\arg -> Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g (Annotations.termAnnotationInternal arg))) args) (\mArgTypes -> Logic.ifElse (Logic.not (Lists.null (Lists.filter (\m -> Maybes.isNothing m) mArgTypes))) (Right fallbackTypeApps) (
-        let argTypes = Lists.bind mArgTypes (\m -> Maybes.cases m [] (\x -> Lists.pure x))
-            irDoms = Lists.map (\d -> applySubstSimple irSubst d) schemeDoms
-            domsMatch =
-                    Lists.null (Lists.filter (\p -> Logic.not (typesMatch (Strip.deannotateType (Pairs.first p)) (Strip.deannotateType (Pairs.second p)))) (Lists.zip irDoms argTypes))
-        in (Logic.ifElse domsMatch (Right fallbackTypeApps) (Right (resolveTypeApps schemeVars fallbackTypeApps (buildArgSubst schemeVarSet schemeDoms argTypes)))))))
-countFunctionParams :: Core.Type -> Int
-countFunctionParams t =
-    case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> Math.add 1 (countFunctionParams (Core.functionTypeCodomain v0))
-      _ -> 0
-declarationForRecordType :: Bool -> Bool -> JavaEnvironment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> [Core.FieldType] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassDeclaration
-declarationForRecordType isInner isSer aliases tparams elName fields cx g =
-    declarationForRecordType_ isInner isSer aliases tparams elName Nothing fields cx g
-declarationForRecordType_ :: Bool -> Bool -> JavaEnvironment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> Maybe Core.Name -> [Core.FieldType] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassDeclaration
-declarationForRecordType_ isInner isSer aliases tparams elName parentName fields cx g =
-    Eithers.bind (Eithers.mapList (\f -> recordMemberVar aliases f cx g) fields) (\memberVars -> Eithers.bind (Eithers.mapList (\p -> addComment (Pairs.first p) (Pairs.second p) cx g) (Lists.zip memberVars fields)) (\memberVars_ -> Eithers.bind (Logic.ifElse (Equality.gt (Lists.length fields) 1) (Eithers.mapList (\f -> recordWithMethod aliases elName fields f cx g) fields) (Right [])) (\withMethods -> Eithers.bind (recordConstructor aliases elName fields cx g) (\cons -> Eithers.bind (Logic.ifElse isInner (Right []) (Eithers.bind (constantDeclForTypeName aliases elName cx g) (\d -> Eithers.bind (Eithers.mapList (\f -> constantDeclForFieldType aliases f cx g) fields) (\dfields -> Right (Lists.cons d dfields))))) (\tn ->
-      let comparableMethods =
-              Maybes.cases parentName (Logic.ifElse (Logic.and (Logic.not isInner) isSer) [
-                recordCompareToMethod aliases tparams elName fields] []) (\pn -> Logic.ifElse isSer [
-                variantCompareToMethod aliases tparams pn elName fields] [])
-          bodyDecls =
-                  Lists.concat2 tn (Lists.concat2 memberVars_ (Lists.map (\x -> noComment x) (Lists.concat2 [
-                    cons,
-                    (recordEqualsMethod aliases elName fields),
-                    (recordHashCodeMethod fields)] (Lists.concat2 comparableMethods withMethods))))
-          ifaces = Logic.ifElse isInner (serializableTypes isSer) (interfaceTypes isSer aliases tparams elName)
-      in (Right (Utils.javaClassDeclaration aliases tparams elName classModsPublic Nothing ifaces bodyDecls)))))))
-declarationForUnionType :: Bool -> JavaEnvironment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> [Core.FieldType] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassDeclaration
-declarationForUnionType isSer aliases tparams elName fields cx g =
-    Eithers.bind (Eithers.mapList (\ft ->
-      let fname = Core.fieldTypeName ft
-          ftype = Core.fieldTypeType ft
-          rfields =
-                  Logic.ifElse (Predicates.isUnitType (Strip.deannotateType ftype)) [] [
-                    Core.FieldType {
-                      Core.fieldTypeName = (Core.Name "value"),
-                      Core.fieldTypeType = (Strip.deannotateType ftype)}]
-          varName = Utils.variantClassName False elName fname
-      in (Eithers.bind (declarationForRecordType_ True isSer aliases [] varName (Logic.ifElse isSer (Just elName) Nothing) rfields cx g) (\innerDecl -> Right (augmentVariantClass aliases tparams elName innerDecl)))) fields) (\variantClasses ->
-      let variantDecls =
-              Lists.map (\vc -> Syntax.ClassBodyDeclarationClassMember (Syntax.ClassMemberDeclarationClass vc)) variantClasses
-      in (Eithers.bind (Eithers.mapList (\pair -> addComment (Pairs.first pair) (Pairs.second pair) cx g) (Lists.zip variantDecls fields)) (\variantDecls_ ->
-        let privateConst = Utils.makeConstructor aliases elName True [] []
-            acceptDecl = Utils.toAcceptMethod True tparams
-            vtparams = Lists.concat2 tparams [
-                  Utils.javaTypeParameter JavaNames.visitorReturnParameter]
-            visitorMethods =
-                    Lists.map (\ft ->
-                      let fname = Core.fieldTypeName ft
-                          typeArgs = Lists.map (\tp -> Utils.typeParameterToTypeArgument tp) tparams
-                          varRef =
-                                  Utils.javaClassTypeToJavaType (Utils.nameToJavaClassType aliases False typeArgs (Utils.variantClassName False elName fname) Nothing)
-                          param = Utils.javaTypeToJavaFormalParameter varRef (Core.Name "instance")
-                          resultR = Utils.javaTypeToJavaResult (Syntax.TypeReference Utils.visitorTypeVariable)
-                      in (Utils.interfaceMethodDeclaration [] [] JavaNames.visitMethodName [
-                        param] resultR Nothing)) fields
-            visitorBody = Syntax.InterfaceBody visitorMethods
-            visitor =
-                    Utils.javaInterfaceDeclarationToJavaClassBodyDeclaration (Syntax.NormalInterfaceDeclaration {
-                      Syntax.normalInterfaceDeclarationModifiers = [
-                        Syntax.InterfaceModifierPublic],
-                      Syntax.normalInterfaceDeclarationIdentifier = (Syntax.TypeIdentifier (Syntax.Identifier JavaNames.visitorName)),
-                      Syntax.normalInterfaceDeclarationParameters = vtparams,
-                      Syntax.normalInterfaceDeclarationExtends = [],
-                      Syntax.normalInterfaceDeclarationBody = visitorBody})
-            typeArgs = Lists.map (\tp -> Utils.typeParameterToTypeArgument tp) tparams
-            visitorClassType =
-                    Utils.javaClassType (Lists.concat2 (Lists.map (\tp -> Utils.typeParameterToReferenceType tp) tparams) [
-                      Utils.visitorTypeVariable]) Nothing JavaNames.visitorName
-            mainInstanceParam =
-                    Utils.javaTypeToJavaFormalParameter (Utils.javaClassTypeToJavaType (Utils.nameToJavaClassType aliases False typeArgs elName Nothing)) (Core.Name "instance")
-            resultR = Utils.javaTypeToJavaResult (Syntax.TypeReference Utils.visitorTypeVariable)
-            throwStmt =
-                    Syntax.BlockStatementStatement (Utils.javaThrowIllegalStateException [
-                      Utils.javaAdditiveExpressionToJavaExpression (Utils.addExpressions [
-                        Utils.javaStringMultiplicativeExpression "Non-exhaustive patterns when matching: ",
-                        (Syntax.MultiplicativeExpressionUnary (Utils.javaIdentifierToJavaUnaryExpression (Syntax.Identifier "instance")))])])
-            defaultMod = [
-                  Syntax.InterfaceMethodModifierDefault]
-            otherwiseDecl =
-                    Utils.interfaceMethodDeclaration defaultMod [] JavaNames.otherwiseMethodName [
-                      mainInstanceParam] resultR (Just [
-                      throwStmt])
-            pvVisitMethods =
-                    Lists.map (\ft ->
-                      let fname = Core.fieldTypeName ft
-                          varRef =
-                                  Utils.javaClassTypeToJavaType (Utils.nameToJavaClassType aliases False typeArgs (Utils.variantClassName False elName fname) Nothing)
-                          param = Utils.javaTypeToJavaFormalParameter varRef (Core.Name "instance")
-                          mi =
-                                  Utils.methodInvocation Nothing (Syntax.Identifier JavaNames.otherwiseMethodName) [
-                                    Utils.javaIdentifierToJavaExpression (Syntax.Identifier "instance")]
-                          returnOtherwise =
-                                  Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (Utils.javaPrimaryToJavaExpression (Utils.javaMethodInvocationToJavaPrimary mi))))
-                      in (Utils.interfaceMethodDeclaration defaultMod [] JavaNames.visitMethodName [
-                        param] resultR (Just [
-                        returnOtherwise]))) fields
-            pvBody = Syntax.InterfaceBody (Lists.concat2 [
-                  otherwiseDecl] pvVisitMethods)
-            partialVisitor =
-                    Utils.javaInterfaceDeclarationToJavaClassBodyDeclaration (Syntax.NormalInterfaceDeclaration {
-                      Syntax.normalInterfaceDeclarationModifiers = [
-                        Syntax.InterfaceModifierPublic],
-                      Syntax.normalInterfaceDeclarationIdentifier = (Syntax.TypeIdentifier (Syntax.Identifier JavaNames.partialVisitorName)),
-                      Syntax.normalInterfaceDeclarationParameters = vtparams,
-                      Syntax.normalInterfaceDeclarationExtends = [
-                        Syntax.InterfaceType visitorClassType],
-                      Syntax.normalInterfaceDeclarationBody = pvBody})
-        in (Eithers.bind (constantDeclForTypeName aliases elName cx g) (\tn0 -> Eithers.bind (Eithers.mapList (\ft -> constantDeclForFieldType aliases ft cx g) fields) (\tn1 ->
-          let tn = Lists.concat2 [
-                tn0] tn1
-              otherDecls =
-                      Lists.map (\d -> noComment d) [
-                        privateConst,
-                        acceptDecl,
-                        visitor,
-                        partialVisitor]
-              bodyDecls =
-                      Lists.concat [
-                        tn,
-                        otherDecls,
-                        variantDecls_]
-              mods = Lists.concat2 classModsPublic [
-                    Syntax.ClassModifierAbstract]
-          in (Right (Utils.javaClassDeclaration aliases tparams elName mods Nothing (interfaceTypes isSer aliases tparams elName) bodyDecls))))))))
-decodeTypeFromTerm :: Core.Term -> Maybe Core.Type
-decodeTypeFromTerm term =
-    case (Strip.deannotateTerm term) of
-      Core.TermInject v0 -> Logic.ifElse (Equality.equal (Core.injectionTypeName v0) (Core.Name "hydra.core.Type")) (
-        let fname = Core.unName (Core.fieldName (Core.injectionField v0))
-            fterm = Core.fieldTerm (Core.injectionField v0)
-        in (Logic.ifElse (Equality.equal fname "variable") (case fterm of
-          Core.TermWrap v1 -> case (Core.wrappedTermBody v1) of
-            Core.TermLiteral v2 -> case v2 of
-              Core.LiteralString v3 -> Just (Core.TypeVariable (Core.Name v3))
-              _ -> Nothing
-            _ -> Nothing
-          _ -> Nothing) (Logic.ifElse (Equality.equal fname "annotated") (case fterm of
-          Core.TermRecord v1 -> Maybes.bind (Lists.maybeHead (Lists.filter (\f -> Equality.equal (Core.fieldName f) (Core.Name "body")) (Core.recordFields v1))) (\bodyField -> decodeTypeFromTerm (Core.fieldTerm bodyField))
-          _ -> Nothing) (Logic.ifElse (Equality.equal fname "application") (case fterm of
-          Core.TermRecord v1 -> Maybes.bind (Lists.maybeHead (Lists.filter (\f -> Equality.equal (Core.fieldName f) (Core.Name "function")) (Core.recordFields v1))) (\funcField -> Maybes.bind (decodeTypeFromTerm (Core.fieldTerm funcField)) (\func -> Maybes.bind (Lists.maybeHead (Lists.filter (\f -> Equality.equal (Core.fieldName f) (Core.Name "argument")) (Core.recordFields v1))) (\argField -> Maybes.map (\arg -> Core.TypeApplication (Core.ApplicationType {
-            Core.applicationTypeFunction = func,
-            Core.applicationTypeArgument = arg})) (decodeTypeFromTerm (Core.fieldTerm argField)))))
-          _ -> Nothing) (Logic.ifElse (Equality.equal fname "function") (case fterm of
-          Core.TermRecord v1 -> Maybes.bind (Lists.maybeHead (Lists.filter (\f -> Equality.equal (Core.fieldName f) (Core.Name "domain")) (Core.recordFields v1))) (\domField -> Maybes.bind (decodeTypeFromTerm (Core.fieldTerm domField)) (\dom -> Maybes.bind (Lists.maybeHead (Lists.filter (\f -> Equality.equal (Core.fieldName f) (Core.Name "codomain")) (Core.recordFields v1))) (\codField -> Maybes.map (\cod -> Core.TypeFunction (Core.FunctionType {
-            Core.functionTypeDomain = dom,
-            Core.functionTypeCodomain = cod})) (decodeTypeFromTerm (Core.fieldTerm codField)))))
-          _ -> Nothing) (Logic.ifElse (Equality.equal fname "literal") (case fterm of
-          Core.TermInject v1 -> Logic.ifElse (Equality.equal (Core.unName (Core.fieldName (Core.injectionField v1))) "string") (Just (Core.TypeLiteral Core.LiteralTypeString)) Nothing
-          _ -> Nothing) Nothing)))))) Nothing
-      _ -> Nothing
-dedupBindings :: S.Set Core.Name -> [Core.Binding] -> [Core.Binding]
-dedupBindings inScope bs =
-    Maybes.fromMaybe [] (Maybes.map (\p ->
-      let b = Pairs.first p
-          rest = Pairs.second p
-          name = Core.bindingName b
-      in (Logic.ifElse (Sets.member name inScope) (
-        let newName = freshJavaName name inScope
-            subst = Maps.singleton name newName
-            rest2 =
-                    Lists.map (\b2 -> Core.Binding {
-                      Core.bindingName = (Core.bindingName b2),
-                      Core.bindingTerm = (Variables.substituteVariables subst (Core.bindingTerm b2)),
-                      Core.bindingTypeScheme = (Core.bindingTypeScheme b2)}) rest
-        in (Lists.cons (Core.Binding {
-          Core.bindingName = newName,
-          Core.bindingTerm = (Core.bindingTerm b),
-          Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) (dedupBindings (Sets.insert newName inScope) rest2))) (Lists.cons b (dedupBindings (Sets.insert name inScope) rest)))) (Lists.uncons bs))
-detectAccumulatorUnification :: [Core.Type] -> Core.Type -> [Core.Name] -> M.Map Core.Name Core.Type
-detectAccumulatorUnification doms cod tparams =
-
-      let tparamSet = Sets.fromList tparams
-          allPairs = Lists.bind doms (\d -> extractInOutPair d)
-          groupedByInput = groupPairsByFirst allPairs
-          selfRefSubst = selfRefSubstitution groupedByInput
-          directPairs = Lists.bind doms (\d -> extractDirectReturn tparamSet d)
-          groupedDirect = groupPairsByFirst directPairs
-          directInputVars = Sets.fromList (Lists.map (\p -> Pairs.first p) directPairs)
-          codVar =
-                  case (Strip.deannotateType cod) of
-                    Core.TypeVariable v0 -> Just v0
-                    _ -> Nothing
-          directRefSubst = directRefSubstitution directInputVars codVar groupedDirect
-          codSubst =
-                  Maybes.maybe Maps.empty (\cv -> Logic.ifElse (Maps.member cv selfRefSubst) Maps.empty (Maybes.maybe Maps.empty (\refVar -> Logic.ifElse (Equality.equal cv refVar) Maps.empty (Maps.singleton cv refVar)) (findSelfRefVar groupedByInput))) (findPairFirst cod)
-          domVars = Sets.fromList (Lists.bind doms (\d -> Sets.toList (collectTypeVars d)))
-          danglingSubst =
-                  Maybes.maybe Maps.empty (\cv -> Logic.ifElse (Sets.member cv domVars) Maps.empty (Maybes.maybe Maps.empty (\refVar -> Maps.singleton cv (Core.TypeVariable refVar)) (findSelfRefVar groupedByInput))) (findPairFirst cod)
-      in (Maps.union (Maps.union (Maps.union (nameMapToTypeMap selfRefSubst) (nameMapToTypeMap codSubst)) danglingSubst) (nameMapToTypeMap directRefSubst))
-directRefSubstitution :: (Eq t0, Ord t0) => (S.Set t0 -> Maybe t0 -> M.Map t0 [t0] -> M.Map t0 t0)
-directRefSubstitution directInputVars codVar grouped =
-    Lists.foldl (\subst -> \entry -> directRefSubstitution_processGroup directInputVars codVar subst (Pairs.first entry) (Pairs.second entry)) Maps.empty (Maps.toList grouped)
-directRefSubstitution_processGroup :: (Eq t0, Ord t0) => (S.Set t0 -> Maybe t0 -> M.Map t0 t0 -> t0 -> [t0] -> M.Map t0 t0)
-directRefSubstitution_processGroup directInputVars codVar subst inVar outVars =
-
-      let selfRefCount = Lists.length (Lists.filter (\v -> Equality.equal v inVar) outVars)
-          nonSelfVars = Lists.filter (\v -> Logic.not (Equality.equal v inVar)) outVars
-          safeNonSelfVars =
-                  Lists.filter (\v -> Logic.and (Logic.not (Sets.member v directInputVars)) (Logic.not (Equality.equal (Just v) codVar))) nonSelfVars
-      in (Logic.ifElse (Logic.and (Equality.gte selfRefCount 2) (Logic.not (Lists.null safeNonSelfVars))) (Lists.foldl (\s -> \v -> Maps.insert v inVar s) subst safeNonSelfVars) subst)
-domTypeArgs :: JavaEnvironment.Aliases -> Core.Type -> t0 -> Graph.Graph -> Either Errors.Error [Syntax.TypeArgument]
-domTypeArgs aliases d cx g =
-
-      let args = extractTypeApplicationArgs (Strip.deannotateType d)
-      in (Logic.ifElse (Logic.not (Lists.null args)) (Eithers.mapList (\t -> Eithers.bind (encodeType aliases Sets.empty t cx g) (\jt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jt cx) (\rt -> Right (Syntax.TypeArgumentReference rt)))) args) (Right (javaTypeArgumentsForType d)))
-elementJavaIdentifier :: Bool -> Bool -> JavaEnvironment.Aliases -> Core.Name -> Syntax.Identifier
-elementJavaIdentifier isPrim isMethod aliases name =
-
-      let qn = Names.qualifyName name
-          ns_ = Packaging.qualifiedNameNamespace qn
-          local = Packaging.qualifiedNameLocal qn
-          sep = Logic.ifElse isMethod "::" "."
-      in (Logic.ifElse isPrim (Syntax.Identifier (Strings.cat2 (Strings.cat2 (elementJavaIdentifier_qualify aliases ns_ (Formatting.capitalize local)) ".") JavaNames.applyMethodName)) (Maybes.cases ns_ (Syntax.Identifier (Utils.sanitizeJavaName local)) (\n -> Syntax.Identifier (Strings.cat2 (Strings.cat2 (elementJavaIdentifier_qualify aliases (namespaceParent n) (elementsClassName n)) sep) (Utils.sanitizeJavaName local)))))
-elementJavaIdentifier_qualify :: JavaEnvironment.Aliases -> Maybe Packaging.Namespace -> String -> String
-elementJavaIdentifier_qualify aliases mns s =
-    Syntax.unIdentifier (Utils.nameToJavaName aliases (Names.unqualifyName (Packaging.QualifiedName {
-      Packaging.qualifiedNameNamespace = mns,
-      Packaging.qualifiedNameLocal = s})))
-elementsClassName :: Packaging.Namespace -> String
-elementsClassName ns =
-
-      let nsStr = Packaging.unNamespace ns
-          parts = Strings.splitOn "." nsStr
-      in (Formatting.sanitizeWithUnderscores Language.reservedWords (Formatting.capitalize (Maybes.fromMaybe nsStr (Lists.maybeLast parts))))
-elementsQualifiedName :: Packaging.Namespace -> Core.Name
-elementsQualifiedName ns =
-    Names.unqualifyName (Packaging.QualifiedName {
-      Packaging.qualifiedNameNamespace = (namespaceParent ns),
-      Packaging.qualifiedNameLocal = (elementsClassName ns)})
-encodeApplication :: JavaEnvironment.JavaEnvironment -> Core.Application -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeApplication env app cx g0 =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          g = JavaEnvironment.javaEnvironmentGraph env
-          gathered = Analysis.gatherArgsWithTypeApps (Core.TermApplication app) [] []
-          fun = Pairs.first gathered
-          args = Pairs.first (Pairs.second gathered)
-          typeApps = Pairs.second (Pairs.second gathered)
-      in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g (Annotations.termAnnotationInternal fun))) (\mfunTyp -> Eithers.bind (Maybes.cases mfunTyp (Checking.typeOfTerm cx g fun) (\t -> Right t)) (\funTyp ->
-        let arity = Arity.typeArity funTyp
-            deannotatedFun = Strip.deannotateTerm fun
-            calleeName =
-                    case deannotatedFun of
-                      Core.TermVariable v0 -> Just v0
-                      _ -> Nothing
-        in (Eithers.bind (Maybes.cases calleeName (Right args) (\cname -> annotateLambdaArgs cname typeApps args cx g)) (\annotatedArgs -> case deannotatedFun of
-          Core.TermVariable v0 -> Logic.ifElse (Maybes.isJust (Maps.lookup v0 (Graph.graphPrimitives g))) (
-            let hargs = Lists.take arity annotatedArgs
-                rargs = Lists.drop arity annotatedArgs
-            in (Eithers.bind (functionCall env True v0 hargs [] cx g) (\initialCall -> Eithers.foldl (\acc -> \h -> Eithers.bind (encodeTerm env h cx g) (\jarg -> Right (applyJavaArg acc jarg))) initialCall rargs))) (Logic.ifElse (Logic.and (isRecursiveVariable aliases v0) (Logic.not (isLambdaBoundIn v0 (JavaEnvironment.aliasesLambdaVars aliases)))) (encodeApplication_fallback env aliases g typeApps (Core.applicationFunction app) (Core.applicationArgument app) cx g) (Eithers.bind (classifyDataReference v0 cx g) (\symClass ->
-            let methodArity =
-                    case symClass of
-                      JavaEnvironment.JavaSymbolClassHoistedLambda v1 -> v1
-                      _ -> arity
-                hargs = Lists.take methodArity annotatedArgs
-                rargs = Lists.drop methodArity annotatedArgs
-                trusted = JavaEnvironment.aliasesTrustedTypeVars aliases
-                inScope = JavaEnvironment.aliasesInScopeTypeParams aliases
-                filteredTypeApps =
-                        Logic.ifElse (Logic.or (Sets.null trusted) (Sets.null inScope)) [] (
-                          let allVars = Sets.unions (Lists.map (\t -> collectTypeVars t) typeApps)
-                          in (Logic.ifElse (Logic.not (Sets.null (Sets.difference allVars inScope))) [] (Logic.ifElse (Sets.null (Sets.difference allVars trusted)) typeApps [])))
-            in (Eithers.bind (Logic.ifElse (Lists.null filteredTypeApps) (Right []) (correctTypeApps g v0 hargs filteredTypeApps cx g)) (\safeTypeApps -> Eithers.bind (filterPhantomTypeArgs v0 safeTypeApps cx g) (\finalTypeApps -> Eithers.bind (functionCall env False v0 hargs finalTypeApps cx g) (\initialCall -> Eithers.foldl (\acc -> \h -> Eithers.bind (encodeTerm env h cx g) (\jarg -> Right (applyJavaArg acc jarg))) initialCall rargs)))))))
-          _ -> encodeApplication_fallback env aliases g typeApps (Core.applicationFunction app) (Core.applicationArgument app) cx g)))))
-encodeApplication_fallback :: JavaEnvironment.JavaEnvironment -> JavaEnvironment.Aliases -> Graph.Graph -> [Core.Type] -> Core.Term -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeApplication_fallback env aliases gr typeApps lhs rhs cx g =
-    Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g (Annotations.termAnnotationInternal lhs))) (\mt -> Eithers.bind (Maybes.cases mt (Checking.typeOfTerm cx g lhs) (\typ -> Right typ)) (\t -> case (Strip.deannotateTypeParameters (Strip.deannotateType t)) of
-      Core.TypeFunction v0 ->
-        let dom = Core.functionTypeDomain v0
-            cod = Core.functionTypeCodomain v0
-            defaultExpr =
-                    Eithers.bind (encodeTerm env lhs cx g) (\jfun -> Eithers.bind (encodeTerm env rhs cx g) (\jarg -> Right (applyJavaArg jfun jarg)))
-            elimBranch =
-                    Eithers.bind (encodeTerm env rhs cx g) (\jarg -> Eithers.bind (Logic.ifElse (Logic.not (Lists.null (javaTypeArgumentsForType dom))) (Right dom) (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g (Annotations.termAnnotationInternal rhs))) (\mrt -> Maybes.cases mrt (Eithers.bind (Checking.typeOfTerm cx g rhs) (\rt -> Right (Logic.ifElse (Logic.not (Lists.null (javaTypeArgumentsForType rt))) rt dom))) (\rt -> Right (Logic.ifElse (Logic.not (Lists.null (javaTypeArgumentsForType rt))) rt dom))))) (\enrichedDom -> encodeElimination env (Just jarg) enrichedDom cod (Strip.deannotateTerm lhs) cx g))
-        in case (Strip.deannotateTerm lhs) of
-          Core.TermProject _ -> elimBranch
-          Core.TermCases _ -> elimBranch
-          Core.TermUnwrap _ -> elimBranch
-          _ -> defaultExpr
-      _ -> Eithers.bind (encodeTerm env lhs cx g) (\jfun -> Eithers.bind (encodeTerm env rhs cx g) (\jarg -> Right (applyJavaArg jfun jarg)))))
-encodeDefinitions :: Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error (M.Map Core.Name Syntax.CompilationUnit)
-encodeDefinitions mod defs cx g =
-
-      let aliases = Utils.importAliasesForModule mod
-          env =
-                  JavaEnvironment.JavaEnvironment {
-                    JavaEnvironment.javaEnvironmentAliases = aliases,
-                    JavaEnvironment.javaEnvironmentGraph = g}
-          pkg = Utils.javaPackageDeclaration (Packaging.moduleNamespace mod)
-          partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-          termDefs = Pairs.second partitioned
-          nonTypedefDefs =
-                  Lists.filter (\td ->
-                    let typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme td)
-                    in (isSerializableJavaType typ)) typeDefs
-      in (Eithers.bind (Eithers.mapList (\td -> encodeTypeDefinition pkg aliases td cx g) nonTypedefDefs) (\typeUnits -> Eithers.bind (Logic.ifElse (Lists.null termDefs) (Right []) (Eithers.bind (Eithers.mapList (\td -> encodeTermDefinition env td cx g) termDefs) (\dataMembers -> Right [
-        constructElementsInterface mod dataMembers]))) (\termUnits -> Right (Maps.fromList (Lists.concat2 typeUnits termUnits)))))
-encodeElimination :: JavaEnvironment.JavaEnvironment -> Maybe Syntax.Expression -> Core.Type -> Core.Type -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeElimination env marg dom cod elimTerm cx g =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-      in case (Strip.deannotateTerm elimTerm) of
-        Core.TermProject v0 ->
-          let fname = Core.projectionField v0
-          in (Eithers.bind (encodeType aliases Sets.empty dom cx g) (\jdom0 -> Eithers.bind (Utils.javaTypeToJavaReferenceType jdom0 cx) (\jdomr -> Maybes.cases marg (
-            let projVar = Core.Name "projected"
-                jbody =
-                        Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Utils.variableToJavaIdentifier projVar) (Utils.javaIdentifier (Core.unName fname)))
-            in (Right (Utils.javaLambda projVar jbody))) (\jarg ->
-            let qual = Syntax.FieldAccess_QualifierPrimary (Utils.javaExpressionToJavaPrimary jarg)
-            in (Right (Utils.javaFieldAccessToJavaExpression (Syntax.FieldAccess {
-              Syntax.fieldAccessQualifier = qual,
-              Syntax.fieldAccessIdentifier = (Utils.javaIdentifier (Core.unName fname))})))))))
-        Core.TermCases v0 ->
-          let tname = Core.caseStatementTypeName v0
-              def_ = Core.caseStatementDefault v0
-              fields = Core.caseStatementCases v0
-          in (Maybes.cases marg (
-            let uVar = Core.Name "u"
-                typedLambda =
-                        Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = uVar,
-                          Core.lambdaDomain = (Just dom),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = elimTerm,
-                            Core.applicationArgument = (Core.TermVariable uVar)}))})
-            in (encodeTerm env typedLambda cx g)) (\jarg ->
-            let prim = Utils.javaExpressionToJavaPrimary jarg
-                consId = innerClassRef aliases tname JavaNames.partialVisitorName
-                effectiveCod = cod
-            in (Eithers.bind (encodeType aliases Sets.empty effectiveCod cx g) (\jcod -> Eithers.bind (Utils.javaTypeToJavaReferenceType jcod cx) (\rt -> Eithers.bind (domTypeArgs aliases dom cx g) (\domArgs ->
-              let targs = typeArgsOrDiamond (Lists.concat2 domArgs [
-                    Syntax.TypeArgumentReference rt])
-              in (Eithers.bind (Maybes.cases def_ (Right []) (\d -> Eithers.bind (otherwiseBranch env aliases dom cod tname jcod domArgs d cx g) (\b -> Right [
-                b]))) (\otherwiseBranches -> Eithers.bind (Eithers.mapList (\f -> visitBranch env aliases dom tname jcod domArgs f cx g) fields) (\visitBranches ->
-                let body = Syntax.ClassBody (Lists.concat2 otherwiseBranches visitBranches)
-                    visitor = Utils.javaConstructorCall (Utils.javaConstructorName consId (Just targs)) [] (Just body)
-                in (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation (Just (Right prim)) (Syntax.Identifier JavaNames.acceptMethodName) [
-                  visitor]))))))))))))
-        Core.TermUnwrap _ ->
-          let withArg =
-                  \ja -> Utils.javaFieldAccessToJavaExpression (Syntax.FieldAccess {
-                    Syntax.fieldAccessQualifier = (Syntax.FieldAccess_QualifierPrimary (Utils.javaExpressionToJavaPrimary ja)),
-                    Syntax.fieldAccessIdentifier = (Utils.javaIdentifier JavaNames.valueFieldName)})
-          in (Right (Maybes.cases marg (
-            let wVar = Core.Name "wrapped"
-                wArg = Utils.javaIdentifierToJavaExpression (Utils.variableToJavaIdentifier wVar)
-            in (Utils.javaLambda wVar (withArg wArg))) (\jarg -> withArg jarg)))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected " (Strings.cat2 "elimination case" (Strings.cat2 " in " "encodeElimination")))))
-encodeFunction :: JavaEnvironment.JavaEnvironment -> Core.Type -> Core.Type -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeFunction env dom cod funTerm cx g =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          encodeLambdaFallback =
-                  \env2 -> \lam ->
-                    let lambdaVar = Core.lambdaParameter lam
-                        body = Core.lambdaBody lam
-                    in (Eithers.bind (analyzeJavaFunction env2 body cx g) (\fs ->
-                      let bindings = Typing.functionStructureBindings fs
-                          innerBody = Typing.functionStructureBody fs
-                          env3 = Typing.functionStructureEnvironment fs
-                      in (Eithers.bind (bindingsToStatements env3 bindings cx g) (\bindResult ->
-                        let bindingStmts = Pairs.first bindResult
-                            env4 = Pairs.second bindResult
-                        in (Eithers.bind (encodeTerm env4 innerBody cx g) (\jbody ->
-                          let lam1 =
-                                  Logic.ifElse (Lists.null bindings) (Utils.javaLambda lambdaVar jbody) (
-                                    let returnSt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jbody))
-                                    in (Utils.javaLambdaFromBlock lambdaVar (Syntax.Block (Lists.concat2 bindingStmts [
-                                      returnSt]))))
-                          in (applyCastIfSafe aliases (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = dom,
-                            Core.functionTypeCodomain = cod})) lam1 cx g)))))))
-      in case (Strip.deannotateTerm funTerm) of
-        Core.TermProject _ -> encodeElimination env Nothing dom cod (Strip.deannotateTerm funTerm) cx g
-        Core.TermCases _ -> encodeElimination env Nothing dom cod (Strip.deannotateTerm funTerm) cx g
-        Core.TermUnwrap _ -> encodeElimination env Nothing dom cod (Strip.deannotateTerm funTerm) cx g
-        Core.TermLambda v0 -> withLambda env v0 (\env2 ->
-          let lambdaVar = Core.lambdaParameter v0
-              body = Core.lambdaBody v0
-          in case (Strip.deannotateTerm body) of
-            Core.TermLambda v1 -> case (Strip.deannotateType cod) of
-              Core.TypeFunction v2 ->
-                let dom2 = Core.functionTypeDomain v2
-                    cod2 = Core.functionTypeCodomain v2
-                in (Eithers.bind (encodeFunction env2 dom2 cod2 (Core.TermLambda v1) cx g) (\innerJavaLambda ->
-                  let lam1 = Utils.javaLambda lambdaVar innerJavaLambda
-                  in (applyCastIfSafe aliases (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = dom,
-                    Core.functionTypeCodomain = cod})) lam1 cx g)))
-              _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "expected function type for lambda body, but got: " (ShowCore.type_ cod))))
-            _ -> encodeLambdaFallback env2 v0)
-        _ -> Right (encodeLiteral (Core.LiteralString (Strings.cat2 "Unimplemented function variant: " (ShowCore.term funTerm))))
-encodeFunctionFormTerm :: JavaEnvironment.JavaEnvironment -> [M.Map Core.Name Core.Term] -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeFunctionFormTerm env anns term cx g =
-
-      let combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-      in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mt -> Eithers.bind (Maybes.cases mt (Maybes.cases (tryInferFunctionType term) (Checking.typeOfTerm cx g term) (\inferredType -> Right inferredType)) (\t -> Right t)) (\typ -> case (Strip.deannotateType typ) of
-        Core.TypeFunction v0 -> encodeFunction env (Core.functionTypeDomain v0) (Core.functionTypeCodomain v0) term cx g
-        _ -> encodeNullaryConstant env typ term cx g)))
-encodeFunctionPrimitiveByName :: JavaEnvironment.JavaEnvironment -> Core.Type -> Core.Type -> Core.Name -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeFunctionPrimitiveByName env dom cod name cx g =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          classWithApply = Syntax.unIdentifier (elementJavaIdentifier True False aliases name)
-          suffix = Strings.cat2 "." JavaNames.applyMethodName
-          className =
-                  Strings.fromList (Lists.take (Math.sub (Strings.length classWithApply) (Strings.length suffix)) (Strings.toList classWithApply))
-          arity =
-                  Arity.typeArity (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = dom,
-                    Core.functionTypeCodomain = cod}))
-      in (Logic.ifElse (Equality.lte arity 1) (Right (Utils.javaIdentifierToJavaExpression (Syntax.Identifier (Strings.cat [
-        className,
-        "::",
-        JavaNames.applyMethodName])))) (
-        let paramNames = Lists.map (\i -> Core.Name (Strings.cat2 "p" (Literals.showInt32 i))) (Math.range 0 (Math.sub arity 1))
-            paramExprs = Lists.map (\p -> Utils.javaIdentifierToJavaExpression (Utils.variableToJavaIdentifier p)) paramNames
-            classId = Syntax.Identifier className
-            call =
-                    Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic classId (Syntax.Identifier JavaNames.applyMethodName) paramExprs)
-            curried = buildCurriedLambda paramNames call
-        in (Eithers.bind (encodeType aliases Sets.empty (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = dom,
-          Core.functionTypeCodomain = cod})) cx g) (\jtype -> Eithers.bind (Utils.javaTypeToJavaReferenceType jtype cx) (\rt -> Right (Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression rt (Utils.javaExpressionToJavaUnaryExpression curried))))))))
-encodeLiteral :: Core.Literal -> Syntax.Expression
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBinary v0 ->
-        let byteValues = Literals.binaryToBytes v0
-        in (Utils.javaArrayCreation Utils.javaBytePrimitiveType (Just (Utils.javaArrayInitializer (Lists.map (\w -> Utils.javaLiteralToJavaExpression (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.int32ToBigint w)))) byteValues))))
-      Core.LiteralBoolean v0 -> encodeLiteral_litExp (Utils.javaBoolean v0)
-      Core.LiteralDecimal v0 -> Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "java.math.BigDecimal") Nothing) [
-        encodeLiteral (Core.LiteralString (Literals.showDecimal v0))] Nothing
-      Core.LiteralFloat v0 -> encodeLiteral_encodeFloat v0
-      Core.LiteralInteger v0 -> encodeLiteral_encodeInteger v0
-      Core.LiteralString v0 -> encodeLiteral_litExp (Utils.javaString v0)
-encodeLiteralType :: Core.LiteralType -> t0 -> t1 -> Either t2 Syntax.Type
-encodeLiteralType lt cx g =
-    case lt of
-      Core.LiteralTypeBinary -> Right (Syntax.TypeReference (Syntax.ReferenceTypeArray (Syntax.ArrayType {
-        Syntax.arrayTypeDims = (Syntax.Dims [
-          []]),
-        Syntax.arrayTypeVariant = (Syntax.ArrayType_VariantPrimitive (Syntax.PrimitiveTypeWithAnnotations {
-          Syntax.primitiveTypeWithAnnotationsType = (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeByte)),
-          Syntax.primitiveTypeWithAnnotationsAnnotations = []}))})))
-      Core.LiteralTypeBoolean -> encodeLiteralType_simple "Boolean" cx g
-      Core.LiteralTypeDecimal -> Right (Utils.javaRefType [] (Just (JavaNames.javaPackageName [
-        "java",
-        "math"])) "BigDecimal")
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeBigfloat -> Right (Utils.javaRefType [] (Just (JavaNames.javaPackageName [
-          "java",
-          "math"])) "BigDecimal")
-        Core.FloatTypeFloat32 -> encodeLiteralType_simple "Float" cx g
-        Core.FloatTypeFloat64 -> encodeLiteralType_simple "Double" cx g
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeBigint -> Right (Utils.javaRefType [] (Just (JavaNames.javaPackageName [
-          "java",
-          "math"])) "BigInteger")
-        Core.IntegerTypeInt8 -> encodeLiteralType_simple "Byte" cx g
-        Core.IntegerTypeInt16 -> encodeLiteralType_simple "Short" cx g
-        Core.IntegerTypeInt32 -> encodeLiteralType_simple "Integer" cx g
-        Core.IntegerTypeInt64 -> encodeLiteralType_simple "Long" cx g
-        Core.IntegerTypeUint8 -> encodeLiteralType_simple "Short" cx g
-        Core.IntegerTypeUint16 -> encodeLiteralType_simple "Character" cx g
-        Core.IntegerTypeUint32 -> encodeLiteralType_simple "Long" cx g
-        Core.IntegerTypeUint64 -> Right (Utils.javaRefType [] (Just (JavaNames.javaPackageName [
-          "java",
-          "math"])) "BigInteger")
-      Core.LiteralTypeString -> encodeLiteralType_simple "String" cx g
-encodeLiteralType_simple :: String -> t0 -> t1 -> Either t2 Syntax.Type
-encodeLiteralType_simple n cx g = Right (Utils.javaRefType [] Nothing n)
-encodeLiteral_encodeFloat :: Core.FloatValue -> Syntax.Expression
-encodeLiteral_encodeFloat f =
-    case f of
-      Core.FloatValueBigfloat v0 -> Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "java.math.BigDecimal") Nothing) [
-        encodeLiteral (Core.LiteralString (Literals.showBigfloat v0))] Nothing
-      Core.FloatValueFloat32 v0 -> encodeLiteral_encodeFloat32 v0
-      Core.FloatValueFloat64 v0 -> encodeLiteral_encodeFloat64 v0
-encodeLiteral_encodeFloat32 :: Float -> Syntax.Expression
-encodeLiteral_encodeFloat32 v =
-
-      let s = Literals.showFloat32 v
-      in (Logic.ifElse (Equality.equal s "NaN") (encodeLiteral_javaSpecialFloatExpr "Float" "NaN") (Logic.ifElse (Equality.equal s "Infinity") (encodeLiteral_javaSpecialFloatExpr "Float" "POSITIVE_INFINITY") (Logic.ifElse (Equality.equal s "-Infinity") (encodeLiteral_javaSpecialFloatExpr "Float" "NEGATIVE_INFINITY") (encodeLiteral_primCast (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeFloatingPoint Syntax.FloatingPointTypeFloat)) (encodeLiteral_litExp (Syntax.LiteralFloatingPoint (Syntax.FloatingPointLiteral (Literals.float32ToBigfloat v))))))))
-encodeLiteral_encodeFloat64 :: Double -> Syntax.Expression
-encodeLiteral_encodeFloat64 v =
-
-      let s = Literals.showFloat64 v
-      in (Logic.ifElse (Equality.equal s "NaN") (encodeLiteral_javaSpecialFloatExpr "Double" "NaN") (Logic.ifElse (Equality.equal s "Infinity") (encodeLiteral_javaSpecialFloatExpr "Double" "POSITIVE_INFINITY") (Logic.ifElse (Equality.equal s "-Infinity") (encodeLiteral_javaSpecialFloatExpr "Double" "NEGATIVE_INFINITY") (Logic.ifElse (Equality.equal s "-0.0") (encodeLiteral_javaParseDouble "-0.0") (encodeLiteral_litExp (Syntax.LiteralFloatingPoint (Syntax.FloatingPointLiteral (Literals.float64ToBigfloat v))))))))
-encodeLiteral_encodeInteger :: Core.IntegerValue -> Syntax.Expression
-encodeLiteral_encodeInteger i =
-    case i of
-      Core.IntegerValueBigint v0 -> Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "java.math.BigInteger") Nothing) [
-        encodeLiteral (Core.LiteralString (Literals.showBigint v0))] Nothing
-      Core.IntegerValueInt8 v0 -> encodeLiteral_primCast (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeByte)) (encodeLiteral_litExp (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.int8ToBigint v0))))
-      Core.IntegerValueInt16 v0 -> encodeLiteral_primCast (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeShort)) (encodeLiteral_litExp (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.int16ToBigint v0))))
-      Core.IntegerValueInt32 v0 -> encodeLiteral_litExp (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.int32ToBigint v0)))
-      Core.IntegerValueInt64 v0 -> encodeLiteral_primCast (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeLong)) (encodeLiteral_litExp (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.int64ToBigint v0))))
-      Core.IntegerValueUint8 v0 -> encodeLiteral_primCast (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeShort)) (encodeLiteral_litExp (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.uint8ToBigint v0))))
-      Core.IntegerValueUint16 v0 -> encodeLiteral_litExp (Syntax.LiteralCharacter v0)
-      Core.IntegerValueUint32 v0 -> encodeLiteral_primCast (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeLong)) (encodeLiteral_litExp (Syntax.LiteralInteger (Syntax.IntegerLiteral (Literals.uint32ToBigint v0))))
-      Core.IntegerValueUint64 v0 -> Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "java.math.BigInteger") Nothing) [
-        encodeLiteral (Core.LiteralString (Literals.showBigint (Literals.uint64ToBigint v0)))] Nothing
-encodeLiteral_javaParseDouble :: String -> Syntax.Expression
-encodeLiteral_javaParseDouble value =
-    Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "Double") (Syntax.Identifier "parseDouble") [
-      encodeLiteral (Core.LiteralString value)])
-encodeLiteral_javaSpecialFloatExpr :: String -> String -> Syntax.Expression
-encodeLiteral_javaSpecialFloatExpr className fieldName =
-    Utils.javaExpressionNameToJavaExpression (Syntax.ExpressionName {
-      Syntax.expressionNameQualifier = (Just (Syntax.AmbiguousName [
-        Syntax.Identifier className])),
-      Syntax.expressionNameIdentifier = (Syntax.Identifier fieldName)})
-encodeLiteral_litExp :: Syntax.Literal -> Syntax.Expression
-encodeLiteral_litExp l = Utils.javaLiteralToJavaExpression l
-encodeLiteral_primCast :: Syntax.PrimitiveType -> Syntax.Expression -> Syntax.Expression
-encodeLiteral_primCast pt expr =
-    Utils.javaCastExpressionToJavaExpression (Utils.javaCastPrimitive pt (Utils.javaExpressionToJavaUnaryExpression expr))
-encodeNullaryConstant :: t0 -> t1 -> Core.Term -> t2 -> t3 -> Either Errors.Error t4
-encodeNullaryConstant env typ funTerm cx g =
-    Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected " (Strings.cat2 "nullary function" (Strings.cat2 " in " (ShowCore.term funTerm))))))
-encodeNullaryConstant_typeArgsFromReturnType :: JavaEnvironment.Aliases -> Core.Type -> t0 -> Graph.Graph -> Either Errors.Error [Syntax.TypeArgument]
-encodeNullaryConstant_typeArgsFromReturnType aliases t cx g =
-    case (Strip.deannotateType t) of
-      Core.TypeSet v0 -> Eithers.bind (encodeType aliases Sets.empty v0 cx g) (\jst -> Eithers.bind (Utils.javaTypeToJavaReferenceType jst cx) (\rt -> Right [
-        Syntax.TypeArgumentReference rt]))
-      Core.TypeList v0 -> Eithers.bind (encodeType aliases Sets.empty v0 cx g) (\jlt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jlt cx) (\rt -> Right [
-        Syntax.TypeArgumentReference rt]))
-      Core.TypeMaybe v0 -> Eithers.bind (encodeType aliases Sets.empty v0 cx g) (\jmt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jmt cx) (\rt -> Right [
-        Syntax.TypeArgumentReference rt]))
-      Core.TypeMap v0 -> Eithers.bind (encodeType aliases Sets.empty (Core.mapTypeKeys v0) cx g) (\jkt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jkt cx) (\rk -> Eithers.bind (encodeType aliases Sets.empty (Core.mapTypeValues v0) cx g) (\jvt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jvt cx) (\rv -> Right [
-        Syntax.TypeArgumentReference rk,
-        (Syntax.TypeArgumentReference rv)]))))
-      _ -> Right []
-encodeNullaryPrimitiveByName :: JavaEnvironment.JavaEnvironment -> Core.Type -> Core.Name -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeNullaryPrimitiveByName env typ name cx g =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-      in (Eithers.bind (encodeNullaryConstant_typeArgsFromReturnType aliases typ cx g) (\targs -> Logic.ifElse (Lists.null targs) (
-        let header = Syntax.MethodInvocation_HeaderSimple (Syntax.MethodName (elementJavaIdentifier True False aliases name))
-        in (Right (Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-          Syntax.methodInvocationHeader = header,
-          Syntax.methodInvocationArguments = []})))) (
-        let fullName = Syntax.unIdentifier (elementJavaIdentifier True False aliases name)
-            parts = Strings.splitOn "." fullName
-            className = Syntax.Identifier (Strings.intercalate "." (Maybes.fromMaybe [] (Lists.maybeInit parts)))
-            methodName = Syntax.Identifier (Maybes.fromMaybe fullName (Lists.maybeLast parts))
-        in (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs className methodName targs []))))))
-encodeTerm :: JavaEnvironment.JavaEnvironment -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeTerm env term cx g = encodeTermInternal env [] [] term cx g
-encodeTermDefinition :: JavaEnvironment.JavaEnvironment -> Packaging.TermDefinition -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.InterfaceMemberDeclaration
-encodeTermDefinition env tdef cx g =
-
-      let name = Packaging.termDefinitionName tdef
-          term0 = Packaging.termDefinitionTerm tdef
-          ts =
-                  Maybes.maybe (Core.TypeScheme {
-                    Core.typeSchemeVariables = [],
-                    Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Unit")),
-                    Core.typeSchemeConstraints = Nothing}) (\x -> x) (Packaging.termDefinitionTypeScheme tdef)
-          term = Variables.unshadowVariables term0
-      in (Eithers.bind (analyzeJavaFunction env term cx g) (\fs ->
-        let schemeVars = Lists.filter (\v -> isSimpleName v) (Core.typeSchemeVariables ts)
-            termVars = Typing.functionStructureTypeParams fs
-            schemeTypeVars = collectTypeVars (Core.typeSchemeBody ts)
-            usedSchemeVars = Lists.filter (\v -> Sets.member v schemeTypeVars) schemeVars
-            tparams = Logic.ifElse (Lists.null usedSchemeVars) termVars usedSchemeVars
-            params = Typing.functionStructureParams fs
-            bindings = Typing.functionStructureBindings fs
-            body = Typing.functionStructureBody fs
-            doms = Typing.functionStructureDomains fs
-            env2 = Typing.functionStructureEnvironment fs
-            schemeType = Core.typeSchemeBody ts
-            numParams = Lists.length params
-            peelResult = peelDomainsAndCod numParams schemeType
-            schemeDoms = Pairs.first peelResult
-            cod = Pairs.second peelResult
-            schemeVarSet = Sets.fromList tparams
-        in (Eithers.bind (Logic.ifElse (Lists.null tparams) (Right Maps.empty) (buildSubstFromAnnotations schemeVarSet term cx g)) (\typeVarSubst ->
-          let overgenSubst = detectAccumulatorUnification schemeDoms cod tparams
-              overgenVarSubst =
-                      Maps.fromList (Maybes.cat (Lists.map (\entry ->
-                        let k = Pairs.first entry
-                            v = Pairs.second entry
-                        in case v of
-                          Core.TypeVariable v0 -> Just (k, v0)
-                          _ -> Nothing) (Maps.toList overgenSubst)))
-              fixedCod = Logic.ifElse (Maps.null overgenSubst) cod (substituteTypeVarsWithTypes overgenSubst cod)
-              fixedDoms =
-                      Logic.ifElse (Maps.null overgenSubst) schemeDoms (Lists.map (\d -> substituteTypeVarsWithTypes overgenSubst d) schemeDoms)
-              fixedTparams =
-                      Logic.ifElse (Maps.null overgenSubst) tparams (Lists.filter (\v -> Logic.not (Maps.member v overgenSubst)) tparams)
-              constraints = Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints ts)
-              jparams = Lists.map (\v -> Utils.javaTypeParameter (Formatting.capitalize (Core.unName v))) fixedTparams
-              aliases2base = JavaEnvironment.javaEnvironmentAliases env2
-              trustedVars = Sets.unions (Lists.map (\d -> collectTypeVars d) (Lists.concat2 fixedDoms [
-                    fixedCod]))
-              fixedSchemeVarSet = Sets.fromList fixedTparams
-              aliases2 =
-                      JavaEnvironment.Aliases {
-                        JavaEnvironment.aliasesCurrentNamespace = (JavaEnvironment.aliasesCurrentNamespace aliases2base),
-                        JavaEnvironment.aliasesPackages = (JavaEnvironment.aliasesPackages aliases2base),
-                        JavaEnvironment.aliasesBranchVars = (JavaEnvironment.aliasesBranchVars aliases2base),
-                        JavaEnvironment.aliasesRecursiveVars = (JavaEnvironment.aliasesRecursiveVars aliases2base),
-                        JavaEnvironment.aliasesInScopeTypeParams = fixedSchemeVarSet,
-                        JavaEnvironment.aliasesPolymorphicLocals = (JavaEnvironment.aliasesPolymorphicLocals aliases2base),
-                        JavaEnvironment.aliasesInScopeJavaVars = (JavaEnvironment.aliasesInScopeJavaVars aliases2base),
-                        JavaEnvironment.aliasesVarRenames = (JavaEnvironment.aliasesVarRenames aliases2base),
-                        JavaEnvironment.aliasesLambdaVars = (Sets.union (JavaEnvironment.aliasesLambdaVars aliases2base) (Sets.fromList params)),
-                        JavaEnvironment.aliasesTypeVarSubst = (Maps.union overgenVarSubst typeVarSubst),
-                        JavaEnvironment.aliasesTrustedTypeVars = (Sets.intersection trustedVars fixedSchemeVarSet),
-                        JavaEnvironment.aliasesMethodCodomain = (Just fixedCod),
-                        JavaEnvironment.aliasesThunkedVars = (JavaEnvironment.aliasesThunkedVars aliases2base)}
-              env2WithTypeParams =
-                      JavaEnvironment.JavaEnvironment {
-                        JavaEnvironment.javaEnvironmentAliases = aliases2,
-                        JavaEnvironment.javaEnvironmentGraph = (JavaEnvironment.javaEnvironmentGraph env2)}
-          in (Eithers.bind (bindingsToStatements env2WithTypeParams bindings cx g) (\bindResult ->
-            let bindingStmts = Pairs.first bindResult
-                env3 = Pairs.second bindResult
-            in (Eithers.bind (Logic.ifElse (Maps.null overgenSubst) (Right body) (applyOvergenSubstToTermAnnotations overgenSubst body cx g)) (\body_ ->
-              let annotatedBody = propagateTypesInAppChain fixedCod fixedCod body_
-              in (Eithers.bind (Eithers.mapList (\pair -> Eithers.bind (encodeType aliases2 Sets.empty (Pairs.first pair) cx g) (\jdom -> Right (Utils.javaTypeToJavaFormalParameter jdom (Pairs.second pair)))) (Lists.zip fixedDoms params)) (\jformalParams -> Eithers.bind (encodeType aliases2 Sets.empty fixedCod cx g) (\jcod ->
-                let result = Utils.javaTypeToJavaResult jcod
-                    mods = [
-                          Syntax.InterfaceMethodModifierStatic]
-                    jname = Utils.sanitizeJavaName (Formatting.decapitalize (Names.localNameOf name))
-                    isTCO = False
-                in (Eithers.bind (Logic.ifElse isTCO (
-                  let tcoSuffix = "_tco"
-                      snapshotNames = Lists.map (\p -> Core.Name (Strings.cat2 (Core.unName p) tcoSuffix)) params
-                      tcoVarRenames = Maps.fromList (Lists.zip params snapshotNames)
-                      snapshotDecls =
-                              Lists.map (\pair -> Utils.finalVarDeclarationStatement (Utils.variableToJavaIdentifier (Pairs.second pair)) (Utils.javaIdentifierToJavaExpression (Utils.variableToJavaIdentifier (Pairs.first pair)))) (Lists.zip params snapshotNames)
-                      tcoBody =
-                              Logic.ifElse (Lists.null bindings) annotatedBody (Core.TermLet (Core.Let {
-                                Core.letBindings = bindings,
-                                Core.letBody = annotatedBody}))
-                  in (Eithers.bind (encodeTermTCO env2WithTypeParams name params tcoVarRenames 0 tcoBody cx g) (\tcoStmts ->
-                    let whileBodyStmts = Lists.concat2 snapshotDecls tcoStmts
-                        whileBodyBlock =
-                                Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementBlock (Syntax.Block whileBodyStmts))
-                        noCond = Nothing
-                        whileStmt =
-                                Syntax.BlockStatementStatement (Syntax.StatementWhile (Syntax.WhileStatement {
-                                  Syntax.whileStatementCond = noCond,
-                                  Syntax.whileStatementBody = whileBodyBlock}))
-                    in (Right [
-                      whileStmt])))) (Eithers.bind (encodeTerm env3 annotatedBody cx g) (\jbody ->
-                  let returnSt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jbody))
-                  in (Right (Lists.concat2 bindingStmts [
-                    returnSt]))))) (\methodBody -> Right (Utils.interfaceMethodDeclaration mods jparams jname jformalParams result (Just methodBody)))))))))))))))
-encodeTermInternal :: JavaEnvironment.JavaEnvironment -> [M.Map Core.Name Core.Term] -> [Syntax.Type] -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeTermInternal env anns tyapps term cx g0 =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          g = JavaEnvironment.javaEnvironmentGraph env
-          encode = \t -> encodeTerm env t cx g
-      in case term of
-        Core.TermAnnotated v0 -> encodeTermInternal env (Lists.cons (Core.annotatedTermAnnotation v0) anns) tyapps (Core.annotatedTermBody v0) cx g
-        Core.TermApplication v0 -> encodeApplication env v0 cx g
-        Core.TermEither v0 -> Eithers.bind (Logic.ifElse (Lists.null tyapps) (Right Nothing) (Eithers.bind (takeTypeArgs "either" 2 tyapps cx g) (\ta -> Right (Just ta)))) (\mtargs ->
-          let combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-          in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mEitherType ->
-            let branchTypes =
-                    Maybes.bind mEitherType (\etyp -> case (Strip.deannotateType etyp) of
-                      Core.TypeEither v1 -> Just (Core.eitherTypeLeft v1, (Core.eitherTypeRight v1))
-                      _ -> Nothing)
-                encodeWithType =
-                        \branchType -> \t1 ->
-                          let annotated = Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ branchType)) t1
-                          in (encodeTermInternal env anns [] annotated cx g)
-                eitherCall =
-                        \methodName -> \expr -> Maybes.cases mtargs (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "hydra.util.Either") (Syntax.Identifier methodName) [
-                          expr])) (\targs -> Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "hydra.util.Either") (Syntax.Identifier methodName) targs [
-                          expr]))
-            in (Eithers.either (\term1 -> Eithers.bind (Maybes.cases branchTypes (encode term1) (\bt -> encodeWithType (Pairs.first bt) term1)) (\expr -> Right (eitherCall "left" expr))) (\term1 -> Eithers.bind (Maybes.cases branchTypes (encode term1) (\bt -> encodeWithType (Pairs.second bt) term1)) (\expr -> Right (eitherCall "right" expr))) v0))))
-        Core.TermLambda _ -> encodeFunctionFormTerm env anns term cx g
-        Core.TermProject _ -> encodeFunctionFormTerm env anns term cx g
-        Core.TermCases _ -> encodeFunctionFormTerm env anns term cx g
-        Core.TermUnwrap _ -> encodeFunctionFormTerm env anns term cx g
-        Core.TermLet v0 ->
-          let bindings = Core.letBindings v0
-              body = Core.letBody v0
-          in (Logic.ifElse (Lists.null bindings) (encodeTermInternal env anns [] body cx g) (Eithers.bind (bindingsToStatements env bindings cx g) (\bindResult ->
-            let bindingStmts = Pairs.first bindResult
-                env2 = Pairs.second bindResult
-            in (Eithers.bind (encodeTermInternal env2 anns [] body cx g) (\jbody ->
-              let returnSt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jbody))
-                  block = Syntax.Block (Lists.concat2 bindingStmts [
-                        returnSt])
-                  nullaryLambda =
-                          Syntax.ExpressionLambda (Syntax.LambdaExpression {
-                            Syntax.lambdaExpressionParameters = (Syntax.LambdaParametersTuple []),
-                            Syntax.lambdaExpressionBody = (Syntax.LambdaBodyBlock block)})
-                  combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-                  g2 = JavaEnvironment.javaEnvironmentGraph env2
-                  aliases2 = JavaEnvironment.javaEnvironmentAliases env2
-              in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mt -> Eithers.bind (Maybes.cases mt (Checking.typeOfTerm cx g2 body) (\t -> Right t)) (\letType -> Eithers.bind (encodeType aliases2 Sets.empty letType cx g) (\jLetType -> Eithers.bind (Utils.javaTypeToJavaReferenceType jLetType cx) (\rt ->
-                let supplierRt =
-                        Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (Utils.javaClassType [
-                          rt] JavaNames.javaUtilFunctionPackageName "Supplier"))
-                    castExpr =
-                            Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression supplierRt (Utils.javaExpressionToJavaUnaryExpression nullaryLambda))
-                in (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation (Just (Right (Utils.javaExpressionToJavaPrimary castExpr))) (Syntax.Identifier "get") [])))))))))))))
-        Core.TermList v0 -> Logic.ifElse (Lists.null v0) (Logic.ifElse (Lists.null tyapps) (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Collections") (Syntax.Identifier "emptyList") []))) (Eithers.bind (takeTypeArgs "list" 1 tyapps cx g) (\targs -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "java.util.Collections") (Syntax.Identifier "emptyList") targs []))))) (Eithers.bind (Eithers.mapList encode v0) (\jels -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Arrays") (Syntax.Identifier "asList") jels))))
-        Core.TermLiteral v0 -> Right (encodeLiteral v0)
-        Core.TermMap v0 -> Logic.ifElse (Maps.null v0) (Logic.ifElse (Lists.null tyapps) (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Collections") (Syntax.Identifier "emptyMap") []))) (Eithers.bind (takeTypeArgs "map" 2 tyapps cx g) (\targs -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "java.util.Collections") (Syntax.Identifier "emptyMap") targs []))))) (Eithers.bind (Eithers.mapList encode (Maps.keys v0)) (\jkeys -> Eithers.bind (Eithers.mapList encode (Maps.elems v0)) (\jvals ->
-          let pairExprs =
-                  Lists.map (\kv -> Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Map") (Syntax.Identifier "entry") [
-                    Pairs.first kv,
-                    (Pairs.second kv)])) (Lists.zip jkeys jvals)
-              innerMap =
-                      Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Map") (Syntax.Identifier "ofEntries") pairExprs)
-          in (Right (Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "java.util.TreeMap") Nothing) [
-            innerMap] Nothing)))))
-        Core.TermMaybe v0 -> Maybes.cases v0 (Logic.ifElse (Lists.null tyapps) (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "hydra.util.Maybe") (Syntax.Identifier "nothing") []))) (Eithers.bind (takeTypeArgs "maybe" 1 tyapps cx g) (\targs -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "hydra.util.Maybe") (Syntax.Identifier "nothing") targs []))))) (\term1 -> Eithers.bind (encode term1) (\expr -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "hydra.util.Maybe") (Syntax.Identifier "just") [
-          expr]))))
-        Core.TermPair v0 -> Eithers.bind (encode (Pairs.first v0)) (\jterm1 -> Eithers.bind (encode (Pairs.second v0)) (\jterm2 -> Eithers.bind (Logic.ifElse (Lists.null tyapps) (Right Nothing) (Eithers.bind (Eithers.mapList (\jt -> Utils.javaTypeToJavaReferenceType jt cx) tyapps) (\rts -> Right (Just (Syntax.TypeArgumentsOrDiamondArguments (Lists.map (\rt -> Syntax.TypeArgumentReference rt) rts)))))) (\mtargs -> Right (Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "hydra.util.Pair") mtargs) [
-          jterm1,
-          jterm2] Nothing))))
-        Core.TermRecord v0 ->
-          let recName = Core.recordTypeName v0
-              mRecordType = Eithers.either (\_ -> Nothing) (\t -> Just t) (Resolution.requireType cx g recName)
-              strippedRecTyp = Maybes.map (\recTyp -> stripForalls (Strip.deannotateType recTyp)) mRecordType
-              mFieldTypeMap =
-                      Maybes.bind strippedRecTyp (\bodyTyp -> case bodyTyp of
-                        Core.TypeRecord v1 -> Just (Maps.fromList (Lists.map (\ft -> (Core.fieldTypeName ft, (Core.fieldTypeType ft))) v1))
-                        _ -> Nothing)
-              combinedAnnsRec = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-          in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnnsRec)) (\mAnnotType ->
-            let mTypeSubst =
-                    Maybes.bind mAnnotType (\annTyp -> Maybes.bind mRecordType (\recTyp ->
-                      let args = extractTypeApplicationArgs (Strip.deannotateType annTyp)
-                          params = collectForallParams (Strip.deannotateType recTyp)
-                      in (Logic.ifElse (Logic.or (Lists.null args) (Logic.not (Equality.equal (Lists.length args) (Lists.length params)))) Nothing (Just (Maps.fromList (Lists.zip params args))))))
-                encodeField =
-                        \fld -> Maybes.cases mFieldTypeMap (encode (Core.fieldTerm fld)) (\ftmap ->
-                          let mftyp = Maps.lookup (Core.fieldName fld) ftmap
-                          in (Maybes.cases mftyp (encode (Core.fieldTerm fld)) (\ftyp ->
-                            let resolvedType = Maybes.cases mTypeSubst ftyp (\subst -> applySubstFull subst ftyp)
-                                annotatedFieldTerm =
-                                        Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ resolvedType)) (Core.fieldTerm fld)
-                            in (encodeTermInternal env anns [] annotatedFieldTerm cx g))))
-            in (Eithers.bind (Eithers.mapList encodeField (Core.recordFields v0)) (\fieldExprs ->
-              let consId = Utils.nameToJavaName aliases recName
-              in (Eithers.bind (Logic.ifElse (Logic.not (Lists.null tyapps)) (Eithers.bind (Eithers.mapList (\jt -> Utils.javaTypeToJavaReferenceType jt cx) tyapps) (\rts -> Right (Just (Syntax.TypeArgumentsOrDiamondArguments (Lists.map (\rt -> Syntax.TypeArgumentReference rt) rts))))) (
-                let combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-                in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mtyp -> Maybes.cases mtyp (Right Nothing) (\annTyp ->
-                  let typeArgs = extractTypeApplicationArgs (Strip.deannotateType annTyp)
-                  in (Logic.ifElse (Lists.null typeArgs) (Right Nothing) (Eithers.bind (Eithers.mapList (\t -> Eithers.bind (encodeType aliases Sets.empty t cx g) (\jt -> Utils.javaTypeToJavaReferenceType jt cx)) typeArgs) (\jTypeArgs -> Right (Just (Syntax.TypeArgumentsOrDiamondArguments (Lists.map (\rt -> Syntax.TypeArgumentReference rt) jTypeArgs))))))))))) (\mtargs -> Right (Utils.javaConstructorCall (Utils.javaConstructorName consId mtargs) fieldExprs Nothing)))))))
-        Core.TermSet v0 -> Logic.ifElse (Sets.null v0) (Logic.ifElse (Lists.null tyapps) (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Collections") (Syntax.Identifier "emptySet") []))) (Eithers.bind (takeTypeArgs "set" 1 tyapps cx g) (\targs -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "java.util.Collections") (Syntax.Identifier "emptySet") targs []))))) (
-          let slist = Sets.toList v0
-          in (Eithers.bind (Eithers.mapList encode slist) (\jels ->
-            let innerSet =
-                    Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStatic (Syntax.Identifier "java.util.Set") (Syntax.Identifier "of") jels)
-            in (Right (Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "java.util.TreeSet") Nothing) [
-              innerSet] Nothing)))))
-        Core.TermTypeLambda v0 -> withTypeLambda env v0 (\env2 ->
-          let combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-          in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mtyp ->
-            let annotatedBody =
-                    Maybes.cases mtyp (Core.typeLambdaBody v0) (\t -> case t of
-                      Core.TypeForall v1 -> Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ (Core.forallTypeBody v1))) (Core.typeLambdaBody v0)
-                      _ -> Core.typeLambdaBody v0)
-            in (encodeTerm env2 annotatedBody cx g))))
-        Core.TermInject v0 ->
-          let injTypeName = Core.injectionTypeName v0
-              injField = Core.injectionField v0
-              injFieldName = Core.fieldName injField
-              injFieldTerm = Core.fieldTerm injField
-              typeId = Syntax.unIdentifier (Utils.nameToJavaName aliases injTypeName)
-              consId =
-                      Syntax.Identifier (Strings.cat [
-                        typeId,
-                        ".",
-                        (Utils.sanitizeJavaName (Formatting.capitalize (Core.unName injFieldName)))])
-          in (Eithers.bind (isFieldUnitType injTypeName injFieldName cx g) (\fieldIsUnit -> Eithers.bind (Logic.ifElse (Logic.or (Predicates.isUnitTerm (Strip.deannotateTerm injFieldTerm)) fieldIsUnit) (Right []) (Eithers.bind (encode injFieldTerm) (\ex -> Right [
-            ex]))) (\args -> Right (Utils.javaConstructorCall (Utils.javaConstructorName consId Nothing) args Nothing))))
-        Core.TermVariable v0 -> Maybes.cases (Maps.lookup v0 (Graph.graphPrimitives g)) (encodeVariable env v0 cx g) (\_prim ->
-          let combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-          in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mt -> Eithers.bind (Maybes.cases mt (Checking.typeOfTerm cx g term) (\t -> Right t)) (\typ -> case (Strip.deannotateType typ) of
-            Core.TypeFunction v1 -> encodeFunctionPrimitiveByName env (Core.functionTypeDomain v1) (Core.functionTypeCodomain v1) v0 cx g
-            _ -> encodeNullaryPrimitiveByName env typ v0 cx g))))
-        Core.TermUnit -> Right (Utils.javaLiteralToJavaExpression Syntax.LiteralNull)
-        Core.TermWrap v0 -> Eithers.bind (encode (Core.wrappedTermBody v0)) (\jarg -> Right (Utils.javaConstructorCall (Utils.javaConstructorName (Utils.nameToJavaName aliases (Core.wrappedTermTypeName v0)) Nothing) [
-          jarg] Nothing))
-        Core.TermTypeApplication v0 ->
-          let atyp = Core.typeApplicationTermType v0
-              body = Core.typeApplicationTermBody v0
-          in (Eithers.bind (encodeType aliases Sets.empty atyp cx g) (\jatyp ->
-            let combinedAnns = Lists.foldl (\acc -> \m -> Maps.union acc m) Maps.empty anns
-            in (Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g combinedAnns)) (\mtyp -> Eithers.bind (Maybes.cases mtyp (Checking.typeOfTerm cx g term) (\t -> Right t)) (\typ ->
-              let collected0 = collectTypeApps0 body [
-                    atyp]
-                  innermostBody0 = Pairs.first collected0
-                  allTypeArgs0 = Pairs.second collected0
-              in (Eithers.bind (correctCastType innermostBody0 allTypeArgs0 typ cx g) (\correctedTyp ->
-                let collected = collectTypeApps body [
-                      atyp]
-                    innermostBody = Pairs.first collected
-                    allTypeArgs = Pairs.second collected
-                in case innermostBody of
-                  Core.TermVariable v1 -> Eithers.bind (classifyDataReference v1 cx g) (\cls -> typeAppNullaryOrHoisted env aliases anns tyapps jatyp body correctedTyp v1 cls allTypeArgs cx g)
-                  Core.TermEither v1 -> Logic.ifElse (Equality.equal (Lists.length allTypeArgs) 2) (
-                    let eitherBranchTypes =
-                            (Maybes.fromMaybe correctedTyp (Lists.maybeAt 0 allTypeArgs), (Maybes.fromMaybe correctedTyp (Lists.maybeAt 1 allTypeArgs)))
-                    in (Eithers.bind (Eithers.mapList (\t -> Eithers.bind (encodeType aliases Sets.empty t cx g) (\jt -> Utils.javaTypeToJavaReferenceType jt cx)) allTypeArgs) (\jTypeArgs ->
-                      let eitherTargs = Lists.map (\rt -> Syntax.TypeArgumentReference rt) jTypeArgs
-                          encodeEitherBranch =
-                                  \branchType -> \t1 ->
-                                    let annotated = Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ branchType)) t1
-                                    in (encodeTermInternal env anns [] annotated cx g)
-                      in (Eithers.either (\term1 -> Eithers.bind (encodeEitherBranch (Pairs.first eitherBranchTypes) term1) (\expr -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "hydra.util.Either") (Syntax.Identifier "left") eitherTargs [
-                        expr])))) (\term1 -> Eithers.bind (encodeEitherBranch (Pairs.second eitherBranchTypes) term1) (\expr -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs (Syntax.Identifier "hydra.util.Either") (Syntax.Identifier "right") eitherTargs [
-                        expr])))) v1)))) (typeAppFallbackCast env aliases anns tyapps jatyp body correctedTyp cx g)
-                  _ -> typeAppFallbackCast env aliases anns tyapps jatyp body correctedTyp cx g)))))))
-        _ -> Right (encodeLiteral (Core.LiteralString "Unimplemented term variant"))
-encodeTermTCO :: JavaEnvironment.JavaEnvironment -> Core.Name -> [Core.Name] -> M.Map Core.Name Core.Name -> Int -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error [Syntax.BlockStatement]
-encodeTermTCO env0 funcName paramNames tcoVarRenames tcoDepth term cx g =
-
-      let aliases0 = JavaEnvironment.javaEnvironmentAliases env0
-          env =
-                  JavaEnvironment.JavaEnvironment {
-                    JavaEnvironment.javaEnvironmentAliases = JavaEnvironment.Aliases {
-                      JavaEnvironment.aliasesCurrentNamespace = (JavaEnvironment.aliasesCurrentNamespace aliases0),
-                      JavaEnvironment.aliasesPackages = (JavaEnvironment.aliasesPackages aliases0),
-                      JavaEnvironment.aliasesBranchVars = (JavaEnvironment.aliasesBranchVars aliases0),
-                      JavaEnvironment.aliasesRecursiveVars = (JavaEnvironment.aliasesRecursiveVars aliases0),
-                      JavaEnvironment.aliasesInScopeTypeParams = (JavaEnvironment.aliasesInScopeTypeParams aliases0),
-                      JavaEnvironment.aliasesPolymorphicLocals = (JavaEnvironment.aliasesPolymorphicLocals aliases0),
-                      JavaEnvironment.aliasesInScopeJavaVars = (JavaEnvironment.aliasesInScopeJavaVars aliases0),
-                      JavaEnvironment.aliasesVarRenames = (Maps.union tcoVarRenames (JavaEnvironment.aliasesVarRenames aliases0)),
-                      JavaEnvironment.aliasesLambdaVars = (JavaEnvironment.aliasesLambdaVars aliases0),
-                      JavaEnvironment.aliasesTypeVarSubst = (JavaEnvironment.aliasesTypeVarSubst aliases0),
-                      JavaEnvironment.aliasesTrustedTypeVars = (JavaEnvironment.aliasesTrustedTypeVars aliases0),
-                      JavaEnvironment.aliasesMethodCodomain = (JavaEnvironment.aliasesMethodCodomain aliases0),
-                      JavaEnvironment.aliasesThunkedVars = (JavaEnvironment.aliasesThunkedVars aliases0)},
-                    JavaEnvironment.javaEnvironmentGraph = (JavaEnvironment.javaEnvironmentGraph env0)}
-          stripped = Strip.deannotateAndDetypeTerm term
-          gathered = Analysis.gatherApplications stripped
-          gatherArgs = Pairs.first gathered
-          gatherFun = Pairs.second gathered
-          strippedFun = Strip.deannotateAndDetypeTerm gatherFun
-          isSelfCall =
-                  case strippedFun of
-                    Core.TermVariable v0 -> Equality.equal v0 funcName
-                    _ -> False
-      in (Logic.ifElse (Logic.and isSelfCall (Equality.equal (Lists.length gatherArgs) (Lists.length paramNames))) (
-        let changePairs =
-                Lists.filter (\pair -> Logic.not (case (Strip.deannotateAndDetypeTerm (Pairs.second pair)) of
-                  Core.TermVariable v0 -> Equality.equal v0 (Pairs.first pair)
-                  _ -> False)) (Lists.zip paramNames gatherArgs)
-            changedParams = Lists.map Pairs.first changePairs
-        in (Eithers.bind (Eithers.mapList (\pair -> encodeTerm env (Pairs.second pair) cx g) changePairs) (\jChangedArgs ->
-          let assignments =
-                  Lists.map (\pair ->
-                    let paramName = Pairs.first pair
-                        jArg = Pairs.second pair
-                    in (Syntax.BlockStatementStatement (Utils.javaAssignmentStatement (Syntax.LeftHandSideExpressionName (Utils.javaIdentifierToJavaExpressionName (Utils.variableToJavaIdentifier paramName))) jArg))) (Lists.zip changedParams jChangedArgs)
-              continueStmt =
-                      Syntax.BlockStatementStatement (Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementContinue (Syntax.ContinueStatement Nothing)))
-          in (Right (Lists.concat2 assignments [
-            continueStmt]))))) (case stripped of
-        Core.TermLet v0 ->
-          let letBindings = Core.letBindings v0
-              letBody = Core.letBody v0
-          in (Eithers.bind (bindingsToStatements env letBindings cx g) (\bindResult ->
-            let letStmts = Pairs.first bindResult
-                envAfterLet = Pairs.second bindResult
-            in (Eithers.bind (encodeTermTCO envAfterLet funcName paramNames tcoVarRenames tcoDepth letBody cx g) (\tcoBodyStmts -> Right (Lists.concat2 letStmts tcoBodyStmts)))))
-        _ ->
-          let gathered2 = Analysis.gatherApplications term
-              args2 = Pairs.first gathered2
-              body2 = Pairs.second gathered2
-          in (Logic.ifElse (Equality.equal (Lists.length args2) 1) (
-            let arg = Maybes.fromMaybe Core.TermUnit (Lists.maybeHead args2)
-            in case (Strip.deannotateAndDetypeTerm body2) of
-              Core.TermCases v0 ->
-                let aliases = JavaEnvironment.javaEnvironmentAliases env
-                    tname = Core.caseStatementTypeName v0
-                    dflt = Core.caseStatementDefault v0
-                    cases_ = Core.caseStatementCases v0
-                in (Eithers.bind (domTypeArgs aliases (Resolution.nominalApplication tname []) cx g) (\domArgs -> Eithers.bind (encodeTerm env arg cx g) (\jArgRaw ->
-                  let depthSuffix = Logic.ifElse (Equality.equal tcoDepth 0) "" (Literals.showInt32 tcoDepth)
-                      matchVarId =
-                              Utils.javaIdentifier (Strings.cat [
-                                "_tco_match_",
-                                (Formatting.decapitalize (Names.localNameOf tname)),
-                                depthSuffix])
-                      matchDecl = Utils.varDeclarationStatement matchVarId jArgRaw
-                      jArg = Utils.javaIdentifierToJavaExpression matchVarId
-                  in (Eithers.bind (Eithers.mapList (\field ->
-                    let fieldName = Core.fieldName field
-                        variantRefType =
-                                Utils.nameToJavaReferenceType aliases True domArgs tname (Just (Formatting.capitalize (Core.unName fieldName)))
-                    in case (Strip.deannotateTerm (Core.fieldTerm field)) of
-                      Core.TermLambda v1 -> withLambda env v1 (\env2 ->
-                        let lambdaParam = Core.lambdaParameter v1
-                            branchBody = Core.lambdaBody v1
-                            env3 = insertBranchVar lambdaParam env2
-                            varId = Utils.variableToJavaIdentifier lambdaParam
-                            castExpr =
-                                    Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression variantRefType (Utils.javaExpressionToJavaUnaryExpression jArg))
-                            localDecl = Utils.varDeclarationStatement varId castExpr
-                            isBranchTailCall = Analysis.isTailRecursiveInTailPosition funcName branchBody
-                        in (Eithers.bind (Logic.ifElse isBranchTailCall (encodeTermTCO env3 funcName paramNames tcoVarRenames (Math.add tcoDepth 1) branchBody cx g) (Eithers.bind (analyzeJavaFunction env3 branchBody cx g) (\fs ->
-                          let bindings = Typing.functionStructureBindings fs
-                              innerBody = Typing.functionStructureBody fs
-                              env4 = Typing.functionStructureEnvironment fs
-                          in (Eithers.bind (bindingsToStatements env4 bindings cx g) (\bindResult ->
-                            let bindingStmts = Pairs.first bindResult
-                                env5 = Pairs.second bindResult
-                            in (Eithers.bind (encodeTerm env5 innerBody cx g) (\jret ->
-                              let returnStmt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jret))
-                              in (Right (Lists.concat2 bindingStmts [
-                                returnStmt]))))))))) (\bodyStmts ->
-                          let relExpr =
-                                  Utils.javaInstanceOf (Utils.javaUnaryExpressionToJavaRelationalExpression (Utils.javaExpressionToJavaUnaryExpression jArg)) variantRefType
-                              condExpr = Utils.javaRelationalExpressionToJavaExpression relExpr
-                              blockStmts = Lists.cons localDecl bodyStmts
-                              ifBody = Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementBlock (Syntax.Block blockStmts))
-                          in (Right (Syntax.BlockStatementStatement (Syntax.StatementIfThen (Syntax.IfThenStatement {
-                            Syntax.ifThenStatementExpression = condExpr,
-                            Syntax.ifThenStatementStatement = ifBody})))))))
-                      _ -> Left (Errors.ErrorOther (Errors.OtherError "TCO: case branch is not a lambda"))) cases_) (\ifBlocks -> Eithers.bind (Maybes.cases dflt (Right [
-                    Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jArg))]) (\d -> Eithers.bind (encodeTerm env d cx g) (\dExpr -> Right [
-                    Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just dExpr))]))) (\defaultStmt -> Right (Lists.concat [
-                    [
-                      matchDecl],
-                    ifBlocks,
-                    defaultStmt])))))))
-              _ -> Eithers.bind (encodeTerm env term cx g) (\expr -> Right [
-                Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just expr))])) (Eithers.bind (encodeTerm env term cx g) (\expr -> Right [
-            Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just expr))])))))
-encodeType :: JavaEnvironment.Aliases -> S.Set Core.Name -> Core.Type -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Type
-encodeType aliases boundVars t cx g =
-
-      let inScopeTypeParams = JavaEnvironment.aliasesInScopeTypeParams aliases
-          typeVarSubst = JavaEnvironment.aliasesTypeVarSubst aliases
-      in case (Strip.deannotateType t) of
-        Core.TypeApplication v0 -> Eithers.bind (encodeType aliases boundVars (Core.applicationTypeFunction v0) cx g) (\jlhs -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.applicationTypeArgument v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jrhs -> Utils.addJavaTypeParameter jrhs jlhs cx))
-        Core.TypeFunction v0 -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.functionTypeDomain v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jdom -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.functionTypeCodomain v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jcod -> Right (Utils.javaRefType [
-          jdom,
-          jcod] JavaNames.javaUtilFunctionPackageName "Function")))
-        Core.TypeForall v0 -> Eithers.bind (encodeType aliases (Sets.insert (Core.forallTypeParameter v0) boundVars) (Core.forallTypeBody v0) cx g) (\jbody -> Utils.addJavaTypeParameter (Utils.javaTypeVariable (Core.unName (Core.forallTypeParameter v0))) jbody cx)
-        Core.TypeList v0 -> Eithers.bind (encodeType aliases boundVars v0 cx g) (\jet -> Eithers.bind (Eithers.bind (Right jet) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\rt -> Right (Utils.javaRefType [
-          rt] JavaNames.javaUtilPackageName "List")))
-        Core.TypeLiteral v0 -> encodeLiteralType v0 cx g
-        Core.TypeEither v0 -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.eitherTypeLeft v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jlt -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.eitherTypeRight v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jrt -> Right (Utils.javaRefType [
-          jlt,
-          jrt] JavaNames.hydraUtilPackageName "Either")))
-        Core.TypeMap v0 -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.mapTypeKeys v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jkt -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.mapTypeValues v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jvt -> Right (Utils.javaRefType [
-          jkt,
-          jvt] JavaNames.javaUtilPackageName "Map")))
-        Core.TypePair v0 -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.pairTypeFirst v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jfirst -> Eithers.bind (Eithers.bind (encodeType aliases boundVars (Core.pairTypeSecond v0) cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jsecond -> Right (Utils.javaRefType [
-          jfirst,
-          jsecond] JavaNames.hydraUtilPackageName "Pair")))
-        Core.TypeUnit -> Right (Utils.javaRefType [] JavaNames.javaLangPackageName "Void")
-        Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) (Right (Utils.javaRefType [] JavaNames.javaLangPackageName "Void")) (Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous record type")))
-        Core.TypeMaybe v0 -> Eithers.bind (Eithers.bind (encodeType aliases boundVars v0 cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jot -> Right (Utils.javaRefType [
-          jot] JavaNames.hydraUtilPackageName "Maybe"))
-        Core.TypeSet v0 -> Eithers.bind (Eithers.bind (encodeType aliases boundVars v0 cx g) (\jt_ -> Utils.javaTypeToJavaReferenceType jt_ cx)) (\jst -> Right (Utils.javaRefType [
-          jst] JavaNames.javaUtilPackageName "Set"))
-        Core.TypeUnion _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous union type"))
-        Core.TypeVariable v0 ->
-          let name = Maybes.fromMaybe v0 (Maps.lookup v0 typeVarSubst)
-          in (Eithers.bind (encodeType_resolveIfTypedef aliases boundVars inScopeTypeParams name cx g) (\resolved -> Maybes.cases resolved (Right (Logic.ifElse (Logic.or (Sets.member name boundVars) (Sets.member name inScopeTypeParams)) (Syntax.TypeReference (Utils.javaTypeVariable (Core.unName name))) (Logic.ifElse (isLambdaBoundVariable name) (Syntax.TypeReference (Utils.javaTypeVariable (Core.unName name))) (Logic.ifElse (isUnresolvedInferenceVar name) (Syntax.TypeReference (Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (Utils.javaClassType [] JavaNames.javaLangPackageName "Object")))) (Syntax.TypeReference (Utils.nameToJavaReferenceType aliases True [] name Nothing)))))) (\resolvedType -> encodeType aliases boundVars resolvedType cx g)))
-        Core.TypeWrap _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous wrap type"))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "can't encode unsupported type in Java: " (ShowCore.type_ t))))
-encodeTypeDefinition :: Syntax.PackageDeclaration -> JavaEnvironment.Aliases -> Packaging.TypeDefinition -> Context.Context -> Graph.Graph -> Either Errors.Error (Core.Name, Syntax.CompilationUnit)
-encodeTypeDefinition pkg aliases tdef cx g =
-
-      let name = Packaging.typeDefinitionName tdef
-          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme tdef)
-          serializable = isSerializableJavaType typ
-          imports =
-                  Logic.ifElse serializable [
-                    Syntax.ImportDeclarationSingleType (Syntax.SingleTypeImportDeclaration (Utils.javaTypeName (Syntax.Identifier "java.io.Serializable")))] []
-      in (Eithers.bind (toClassDecl False serializable aliases [] name typ cx g) (\decl -> Eithers.bind (Annotations.getTypeDescription cx g typ) (\comment ->
-        let tdecl =
-                Syntax.TypeDeclarationWithComments {
-                  Syntax.typeDeclarationWithCommentsValue = (Syntax.TypeDeclarationClass decl),
-                  Syntax.typeDeclarationWithCommentsComments = comment}
-        in (Right (name, (Syntax.CompilationUnitOrdinary (Syntax.OrdinaryCompilationUnit {
-          Syntax.ordinaryCompilationUnitPackage = (Just pkg),
-          Syntax.ordinaryCompilationUnitImports = imports,
-          Syntax.ordinaryCompilationUnitTypes = [
-            tdecl]})))))))
-encodeType_resolveIfTypedef :: t0 -> S.Set Core.Name -> S.Set Core.Name -> Core.Name -> t1 -> Graph.Graph -> Either t2 (Maybe Core.Type)
-encodeType_resolveIfTypedef aliases boundVars inScopeTypeParams name cx g =
-    Logic.ifElse (Logic.or (Sets.member name boundVars) (Sets.member name inScopeTypeParams)) (Right Nothing) (Logic.ifElse (isLambdaBoundVariable name) (Right Nothing) (
-      let schemaTypes = Graph.graphSchemaTypes g
-      in (Maybes.cases (Maps.lookup name schemaTypes) (Right Nothing) (\ts -> Logic.ifElse (Logic.not (Lists.null (Core.typeSchemeVariables ts))) (Right Nothing) (case (Strip.deannotateType (Core.typeSchemeBody ts)) of
-        Core.TypeRecord _ -> Right Nothing
-        Core.TypeUnion _ -> Right Nothing
-        Core.TypeWrap _ -> Right Nothing
-        _ -> Right (Just (Core.typeSchemeBody ts)))))))
-encodeVariable :: JavaEnvironment.JavaEnvironment -> Core.Name -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeVariable env name cx g =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          resolvedName = Utils.lookupJavaVarName aliases name
-          jid = Utils.javaIdentifier (Core.unName resolvedName)
-      in (Logic.ifElse (Sets.member name (JavaEnvironment.aliasesBranchVars aliases)) (Right (Utils.javaFieldAccessToJavaExpression (Syntax.FieldAccess {
-        Syntax.fieldAccessQualifier = (Syntax.FieldAccess_QualifierPrimary (Utils.javaExpressionToJavaPrimary (Utils.javaIdentifierToJavaExpression jid))),
-        Syntax.fieldAccessIdentifier = (Utils.javaIdentifier JavaNames.valueFieldName)}))) (Logic.ifElse (Logic.and (Equality.equal name (Core.Name (Strings.cat [
-        JavaNames.instanceName,
-        "_",
-        JavaNames.valueFieldName]))) (isRecursiveVariable aliases name)) (
-        let instanceExpr = Utils.javaIdentifierToJavaExpression (Utils.javaIdentifier JavaNames.instanceName)
-        in (Right (Utils.javaFieldAccessToJavaExpression (Syntax.FieldAccess {
-          Syntax.fieldAccessQualifier = (Syntax.FieldAccess_QualifierPrimary (Utils.javaExpressionToJavaPrimary instanceExpr)),
-          Syntax.fieldAccessIdentifier = (Utils.javaIdentifier JavaNames.valueFieldName)})))) (Logic.ifElse (Logic.and (isRecursiveVariable aliases name) (Logic.not (isLambdaBoundIn name (JavaEnvironment.aliasesLambdaVars aliases)))) (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation (Just (Left (Syntax.ExpressionName {
-        Syntax.expressionNameQualifier = Nothing,
-        Syntax.expressionNameIdentifier = jid}))) (Syntax.Identifier JavaNames.getMethodName) []))) (Logic.ifElse (Logic.and (Sets.member name (JavaEnvironment.aliasesThunkedVars aliases)) (Logic.not (isLambdaBoundIn name (JavaEnvironment.aliasesLambdaVars aliases)))) (Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation (Just (Left (Syntax.ExpressionName {
-        Syntax.expressionNameQualifier = Nothing,
-        Syntax.expressionNameIdentifier = jid}))) (Syntax.Identifier JavaNames.getMethodName) []))) (Logic.ifElse (isLambdaBoundIn name (JavaEnvironment.aliasesLambdaVars aliases)) (
-        let actualName = findMatchingLambdaVar name (JavaEnvironment.aliasesLambdaVars aliases)
-            resolvedActual = Utils.lookupJavaVarName aliases actualName
-        in (Right (Utils.javaIdentifierToJavaExpression (Utils.variableToJavaIdentifier resolvedActual)))) (Logic.ifElse (Sets.member name (JavaEnvironment.aliasesInScopeJavaVars aliases)) (Right (Utils.javaIdentifierToJavaExpression (elementJavaIdentifier False False aliases resolvedName))) (Eithers.bind (classifyDataReference name cx g) (\cls -> case cls of
-        JavaEnvironment.JavaSymbolClassHoistedLambda v0 -> encodeVariable_hoistedLambdaCase aliases name v0 cx g
-        JavaEnvironment.JavaSymbolClassLocalVariable -> Right (Utils.javaIdentifierToJavaExpression (elementJavaIdentifier False False aliases resolvedName))
-        JavaEnvironment.JavaSymbolClassConstant -> Right (Utils.javaIdentifierToJavaExpression (elementJavaIdentifier False False aliases name))
-        JavaEnvironment.JavaSymbolClassNullaryFunction -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation Nothing (elementJavaIdentifier False False aliases name) []))
-        JavaEnvironment.JavaSymbolClassUnaryFunction -> Right (Utils.javaIdentifierToJavaExpression (elementJavaIdentifier False True aliases name))))))))))
-encodeVariable_buildCurried :: [Core.Name] -> Syntax.Expression -> Syntax.Expression
-encodeVariable_buildCurried params inner =
-    Maybes.fromMaybe inner (Maybes.map (\p -> Utils.javaLambda (Pairs.first p) (encodeVariable_buildCurried (Pairs.second p) inner)) (Lists.uncons params))
-encodeVariable_hoistedLambdaCase :: JavaEnvironment.Aliases -> Core.Name -> Int -> t0 -> Graph.Graph -> Either Errors.Error Syntax.Expression
-encodeVariable_hoistedLambdaCase aliases name arity cx g =
-
-      let paramNames = Lists.map (\i -> Core.Name (Strings.cat2 "p" (Literals.showInt32 i))) (Math.range 0 (Math.sub arity 1))
-          paramExprs = Lists.map (\pn -> Utils.javaIdentifierToJavaExpression (Utils.variableToJavaIdentifier pn)) paramNames
-          call =
-                  Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation Nothing (elementJavaIdentifier False False aliases name) paramExprs)
-          lam = encodeVariable_buildCurried paramNames call
-      in (Eithers.bind (Right (Lexical.lookupBinding g name)) (\mel -> Maybes.cases mel (Right lam) (\el -> Maybes.cases (Core.bindingTypeScheme el) (Right lam) (\ts ->
-        let typ = Core.typeSchemeBody ts
-        in (Eithers.bind (encodeType aliases Sets.empty typ cx g) (\jtype -> Eithers.bind (Utils.javaTypeToJavaReferenceType jtype cx) (\rt -> Right (Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression rt (Utils.javaExpressionToJavaUnaryExpression lam))))))))))
-eqClause :: String -> Core.FieldType -> Syntax.InclusiveOrExpression
-eqClause tmpName ft =
-
-      let fname = Core.unName (Core.fieldTypeName ft)
-          ftype = Core.fieldTypeType ft
-      in (Logic.ifElse (isBinaryType ftype) (arraysEqualsClause tmpName fname) (Logic.ifElse (isBigNumericType ftype) (compareToZeroClause tmpName fname) (equalsClause tmpName fname)))
-equalsClause :: String -> String -> Syntax.InclusiveOrExpression
-equalsClause tmpName fname =
-
-      let thisArg =
-              Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Syntax.Identifier "this") (Utils.javaIdentifier fname))
-          otherArg =
-                  Utils.javaExpressionNameToJavaExpression (Utils.fieldExpression (Utils.javaIdentifier tmpName) (Utils.javaIdentifier fname))
-          header =
-                  Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                    Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantType (Utils.javaTypeName (Syntax.Identifier "java.util.Objects"))),
-                    Syntax.methodInvocation_ComplexTypeArguments = [],
-                    Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.equalsMethodName)})
-      in (Utils.javaPostfixExpressionToJavaInclusiveOrExpression (Utils.javaMethodInvocationToJavaPostfixExpression (Syntax.MethodInvocation {
-        Syntax.methodInvocationHeader = header,
-        Syntax.methodInvocationArguments = [
-          thisArg,
-          otherArg]})))
-extractArgType :: t0 -> Core.Type -> Core.Type
-extractArgType _lhs typ =
-    case typ of
-      Core.TypeApplication v0 -> case (Core.applicationTypeFunction v0) of
-        Core.TypeApplication _ -> Core.applicationTypeArgument v0
-        _ -> typ
-      _ -> typ
-extractDirectReturn :: S.Set Core.Name -> Core.Type -> [(Core.Name, Core.Name)]
-extractDirectReturn tparamSet t = extractDirectReturn_go tparamSet t
-extractDirectReturn_go :: S.Set Core.Name -> Core.Type -> [(Core.Name, Core.Name)]
-extractDirectReturn_go tparamSet t =
-    case (Strip.deannotateType t) of
-      Core.TypeFunction v0 ->
-        let dom = Strip.deannotateType (Core.functionTypeDomain v0)
-            cod = Core.functionTypeCodomain v0
-        in case dom of
-          Core.TypeVariable v1 -> Logic.ifElse (Sets.member v1 tparamSet) (case (Strip.deannotateType cod) of
-            Core.TypeFunction v2 ->
-              let midArg = Strip.deannotateType (Core.functionTypeDomain v2)
-                  retPart = Strip.deannotateType (Core.functionTypeCodomain v2)
-              in case midArg of
-                Core.TypeVariable v3 -> Logic.ifElse (Sets.member v3 tparamSet) [] (case retPart of
-                  Core.TypeVariable v4 -> Logic.ifElse (Sets.member v4 tparamSet) [
-                    (v1, v4)] []
-                  _ -> [])
-                _ -> case retPart of
-                  Core.TypeVariable v3 -> Logic.ifElse (Sets.member v3 tparamSet) [
-                    (v1, v3)] []
-                  _ -> []
-            _ -> []) (extractDirectReturn_go tparamSet cod)
-          _ -> extractDirectReturn_go tparamSet cod
-      _ -> []
-extractInOutPair :: Core.Type -> [(Core.Name, Core.Name)]
-extractInOutPair t =
-    case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> case (Strip.deannotateType (Core.functionTypeDomain v0)) of
-        Core.TypeVariable v1 ->
-          let retType = unwrapReturnType (Core.functionTypeCodomain v0)
-          in case (Strip.deannotateType retType) of
-            Core.TypePair v2 -> case (Strip.deannotateType (Core.pairTypeFirst v2)) of
-              Core.TypeVariable v3 -> [
-                (v1, v3)]
-              _ -> []
-            _ -> []
-        _ -> []
-      _ -> []
-extractTypeApplicationArgs :: Core.Type -> [Core.Type]
-extractTypeApplicationArgs typ = Lists.reverse (extractTypeApplicationArgs_go typ)
-extractTypeApplicationArgs_go :: Core.Type -> [Core.Type]
-extractTypeApplicationArgs_go t =
-    case t of
-      Core.TypeApplication v0 -> Lists.cons (Core.applicationTypeArgument v0) (extractTypeApplicationArgs_go (Core.applicationTypeFunction v0))
-      _ -> []
-fieldTypeToFormalParam :: JavaEnvironment.Aliases -> Core.FieldType -> t0 -> Graph.Graph -> Either Errors.Error Syntax.FormalParameter
-fieldTypeToFormalParam aliases ft cx g =
-    Eithers.bind (encodeType aliases Sets.empty (Core.fieldTypeType ft) cx g) (\jt -> Right (Utils.javaTypeToJavaFormalParameter jt (Core.fieldTypeName ft)))
-filterByFlags :: [t0] -> [Bool] -> [t0]
-filterByFlags xs flags = Lists.map (\p -> Pairs.first p) (Lists.filter (\p -> Pairs.second p) (Lists.zip xs flags))
-filterPhantomTypeArgs :: Core.Name -> [Core.Type] -> t0 -> Graph.Graph -> Either t1 [Core.Type]
-filterPhantomTypeArgs calleeName allTypeArgs cx g =
-    Eithers.bind (Right (Lexical.lookupBinding g calleeName)) (\mel -> Maybes.cases mel (Right allTypeArgs) (\el -> Maybes.cases (Core.bindingTypeScheme el) (Right allTypeArgs) (\ts ->
-      let schemeVars = Lists.filter (\v -> isSimpleName v) (Core.typeSchemeVariables ts)
-          schemeTypeVars = collectTypeVars (Core.typeSchemeBody ts)
-          schemeType = Core.typeSchemeBody ts
-          nParams = countFunctionParams schemeType
-          peeled = peelDomainTypes nParams schemeType
-          calleeDoms = Pairs.first peeled
-          calleeCod = Pairs.second peeled
-          overgenSubst = detectAccumulatorUnification calleeDoms calleeCod schemeVars
-          keepFlags = Lists.map (\v -> Logic.and (Sets.member v schemeTypeVars) (Logic.not (Maps.member v overgenSubst))) schemeVars
-      in (Logic.ifElse (Logic.not (Equality.equal (Lists.length schemeVars) (Lists.length allTypeArgs))) (Right allTypeArgs) (Right (filterPhantomTypeArgs_filterAndApply allTypeArgs keepFlags overgenSubst))))))
-filterPhantomTypeArgs_filterAndApply :: [Core.Type] -> [Bool] -> M.Map Core.Name Core.Type -> [Core.Type]
-filterPhantomTypeArgs_filterAndApply allTypeArgs keepFlags overgenSubst =
-
-      let filtered = Lists.map (\p -> Pairs.first p) (Lists.filter (\p -> Pairs.second p) (Lists.zip allTypeArgs keepFlags))
-      in (Logic.ifElse (Logic.not (Maps.null overgenSubst)) (Lists.map (\t -> substituteTypeVarsWithTypes overgenSubst t) filtered) filtered)
-findMatchingLambdaVar :: Core.Name -> S.Set Core.Name -> Core.Name
-findMatchingLambdaVar name lambdaVars =
-    Logic.ifElse (Sets.member name lambdaVars) name (Logic.ifElse (isLambdaBoundIn_isQualified name) (Maybes.fromMaybe name (Lists.find (\lv -> Logic.and (isLambdaBoundIn_isQualified lv) (Equality.equal (Names.localNameOf lv) (Names.localNameOf name))) (Sets.toList lambdaVars))) (Logic.ifElse (Sets.member (Core.Name (Names.localNameOf name)) lambdaVars) (Core.Name (Names.localNameOf name)) name))
-findPairFirst :: Core.Type -> Maybe Core.Name
-findPairFirst t =
-    case (Strip.deannotateType t) of
-      Core.TypePair v0 -> case (Strip.deannotateType (Core.pairTypeFirst v0)) of
-        Core.TypeVariable v1 -> Just v1
-        _ -> Nothing
-      _ -> Nothing
-findSelfRefVar :: (Eq t0, Ord t0) => (M.Map t0 [t0] -> Maybe t0)
-findSelfRefVar grouped =
-
-      let selfRefs = Lists.filter (\entry -> Lists.elem (Pairs.first entry) (Pairs.second entry)) (Maps.toList grouped)
-      in (Maybes.map (\entry -> Pairs.first entry) (Lists.maybeHead selfRefs))
-first20Primes :: [Integer]
-first20Primes =
-    [
-      2,
-      3,
-      5,
-      7,
-      11,
-      13,
-      17,
-      19,
-      23,
-      29,
-      31,
-      37,
-      41,
-      43,
-      47,
-      53,
-      59,
-      61,
-      67,
-      71]
-flattenApps :: Core.Term -> [Core.Term] -> ([Core.Term], Core.Term)
-flattenApps t acc =
-    case (Strip.deannotateTerm t) of
-      Core.TermApplication v0 -> flattenApps (Core.applicationFunction v0) (Lists.cons (Core.applicationArgument v0) acc)
-      _ -> (acc, t)
-flattenBindings :: [Core.Binding] -> [Core.Binding]
-flattenBindings bindings =
-    Lists.bind bindings (\b -> case (Strip.deannotateTerm (Core.bindingTerm b)) of
-      Core.TermLet v0 -> Lists.concat2 (flattenBindings (Core.letBindings v0)) [
-        Core.Binding {
-          Core.bindingName = (Core.bindingName b),
-          Core.bindingTerm = (Core.letBody v0),
-          Core.bindingTypeScheme = (Core.bindingTypeScheme b)}]
-      _ -> [
-        b])
-freshJavaName :: Core.Name -> S.Set Core.Name -> Core.Name
-freshJavaName base avoid = freshJavaName_go base avoid 2
-freshJavaName_go :: Core.Name -> S.Set Core.Name -> Int -> Core.Name
-freshJavaName_go base avoid i =
-
-      let candidate = Core.Name (Strings.cat2 (Core.unName base) (Literals.showInt32 i))
-      in (Logic.ifElse (Sets.member candidate avoid) (freshJavaName_go base avoid (Math.add i 1)) candidate)
-functionCall :: JavaEnvironment.JavaEnvironment -> Bool -> Core.Name -> [Core.Term] -> [Core.Type] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-functionCall env isPrim name args typeApps cx g =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-          isLambdaBound = isLambdaBoundIn name (JavaEnvironment.aliasesLambdaVars aliases)
-      in (Eithers.bind (Eithers.mapList (\arg -> encodeTerm env arg cx g) args) (\jargs0 ->
-        let wrapResult = wrapLazyArguments name jargs0
-            jargs = Pairs.first wrapResult
-            mMethodOverride = Pairs.second wrapResult
-        in (Logic.ifElse (Logic.or (isLocalVariable name) isLambdaBound) (Eithers.bind (encodeVariable env name cx g) (\baseExpr -> Right (Lists.foldl (\acc -> \jarg -> applyJavaArg acc jarg) baseExpr jargs))) (
-          let overrideMethodName =
-                  \jid -> Maybes.cases mMethodOverride jid (\m ->
-                    let s = Syntax.unIdentifier jid
-                    in (Syntax.Identifier (Strings.cat2 (Strings.fromList (Lists.take (Math.sub (Strings.length s) (Strings.length JavaNames.applyMethodName)) (Strings.toList s))) m)))
-          in (Logic.ifElse (Lists.null typeApps) (
-            let header =
-                    Syntax.MethodInvocation_HeaderSimple (Syntax.MethodName (overrideMethodName (elementJavaIdentifier isPrim False aliases name)))
-            in (Right (Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-              Syntax.methodInvocationHeader = header,
-              Syntax.methodInvocationArguments = jargs})))) (
-            let qn = Names.qualifyName name
-                mns = Packaging.qualifiedNameNamespace qn
-                localName = Packaging.qualifiedNameLocal qn
-            in (Maybes.cases mns (
-              let header =
-                      Syntax.MethodInvocation_HeaderSimple (Syntax.MethodName (overrideMethodName (elementJavaIdentifier isPrim False aliases name)))
-              in (Right (Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-                Syntax.methodInvocationHeader = header,
-                Syntax.methodInvocationArguments = jargs})))) (\ns_ ->
-              let classId = Utils.nameToJavaName aliases (elementsQualifiedName ns_)
-                  methodId =
-                          Logic.ifElse isPrim (overrideMethodName (Syntax.Identifier (Strings.cat2 (Syntax.unIdentifier (Utils.nameToJavaName aliases (Names.unqualifyName (Packaging.QualifiedName {
-                            Packaging.qualifiedNameNamespace = (Just ns_),
-                            Packaging.qualifiedNameLocal = (Formatting.capitalize localName)})))) (Strings.cat2 "." JavaNames.applyMethodName)))) (Syntax.Identifier (Utils.sanitizeJavaName localName))
-              in (Eithers.bind (Eithers.mapList (\t -> Eithers.bind (encodeType aliases Sets.empty t cx g) (\jt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jt cx) (\rt -> Right (Syntax.TypeArgumentReference rt)))) typeApps) (\jTypeArgs -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs classId methodId jTypeArgs jargs))))))))))))
-getCodomain :: M.Map Core.Name Core.Term -> t0 -> Graph.Graph -> Either Errors.Error Core.Type
-getCodomain ann cx g = Eithers.map (\ft -> Core.functionTypeCodomain ft) (getFunctionType ann cx g)
-getFunctionType :: M.Map Core.Name Core.Term -> t0 -> Graph.Graph -> Either Errors.Error Core.FunctionType
-getFunctionType ann cx g =
-    Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g ann)) (\mt -> Maybes.cases mt (Left (Errors.ErrorOther (Errors.OtherError "type annotation is required for function and elimination terms in Java"))) (\t -> case t of
-      Core.TypeFunction v0 -> Right v0
-      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "expected function type, got: " (ShowCore.type_ t))))))
-groupPairsByFirst :: Ord t0 => ([(t0, t1)] -> M.Map t0 [t1])
-groupPairsByFirst pairs =
-    Lists.foldl (\m -> \p ->
-      let k = Pairs.first p
-          v = Pairs.second p
-      in (Maps.alter (\mv -> Maybes.maybe (Just [
-        v]) (\vs -> Just (Lists.concat2 vs [
-        v])) mv) k m)) Maps.empty pairs
-hashCodeCompareExpr :: String -> String -> Syntax.Expression
-hashCodeCompareExpr otherVar fname =
-
-      let header =
-              Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantType (Utils.javaTypeName (Syntax.Identifier "Integer"))),
-                Syntax.methodInvocation_ComplexTypeArguments = [],
-                Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier "compare")})
-          thisHashCode =
-                  Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-                    Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                      Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantExpression (Syntax.ExpressionName {
-                        Syntax.expressionNameQualifier = Nothing,
-                        Syntax.expressionNameIdentifier = (Syntax.Identifier (Utils.sanitizeJavaName fname))})),
-                      Syntax.methodInvocation_ComplexTypeArguments = [],
-                      Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.hashCodeMethodName)})),
-                    Syntax.methodInvocationArguments = []})
-          otherHashCode =
-                  Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-                    Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                      Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantExpression (Utils.fieldExpression (Utils.javaIdentifier otherVar) (Utils.javaIdentifier fname))),
-                      Syntax.methodInvocation_ComplexTypeArguments = [],
-                      Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.hashCodeMethodName)})),
-                    Syntax.methodInvocationArguments = []})
-      in (Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-        Syntax.methodInvocationHeader = header,
-        Syntax.methodInvocationArguments = [
-          thisHashCode,
-          otherHashCode]}))
-hashCodeMultPair :: Integer -> Core.Name -> Syntax.MultiplicativeExpression
-hashCodeMultPair i fname =
-
-      let fnameStr = Core.unName fname
-          lhs =
-                  Syntax.MultiplicativeExpressionUnary (Utils.javaPrimaryToJavaUnaryExpression (Utils.javaLiteralToJavaPrimary (Utils.javaInt i)))
-          rhs =
-                  Utils.javaPostfixExpressionToJavaUnaryExpression (Utils.javaMethodInvocationToJavaPostfixExpression (Syntax.MethodInvocation {
-                    Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                      Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantType (Utils.javaTypeName (Syntax.Identifier "java.util.Objects"))),
-                      Syntax.methodInvocation_ComplexTypeArguments = [],
-                      Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.hashCodeMethodName)})),
-                    Syntax.methodInvocationArguments = [
-                      Utils.javaExpressionNameToJavaExpression (Syntax.ExpressionName {
-                        Syntax.expressionNameQualifier = Nothing,
-                        Syntax.expressionNameIdentifier = (Syntax.Identifier (Utils.sanitizeJavaName fnameStr))})]}))
-      in (Syntax.MultiplicativeExpressionTimes (Syntax.MultiplicativeExpression_Binary {
-        Syntax.multiplicativeExpression_BinaryLhs = lhs,
-        Syntax.multiplicativeExpression_BinaryRhs = rhs}))
-innerClassRef :: JavaEnvironment.Aliases -> Core.Name -> String -> Syntax.Identifier
-innerClassRef aliases name local =
-
-      let id = Syntax.unIdentifier (Utils.nameToJavaName aliases name)
-      in (Syntax.Identifier (Strings.cat2 (Strings.cat2 id ".") local))
-insertBranchVar :: Core.Name -> JavaEnvironment.JavaEnvironment -> JavaEnvironment.JavaEnvironment
-insertBranchVar name env =
-
-      let aliases = JavaEnvironment.javaEnvironmentAliases env
-      in JavaEnvironment.JavaEnvironment {
-        JavaEnvironment.javaEnvironmentAliases = JavaEnvironment.Aliases {
-          JavaEnvironment.aliasesCurrentNamespace = (JavaEnvironment.aliasesCurrentNamespace aliases),
-          JavaEnvironment.aliasesPackages = (JavaEnvironment.aliasesPackages aliases),
-          JavaEnvironment.aliasesBranchVars = (Sets.insert name (JavaEnvironment.aliasesBranchVars aliases)),
-          JavaEnvironment.aliasesRecursiveVars = (JavaEnvironment.aliasesRecursiveVars aliases),
-          JavaEnvironment.aliasesInScopeTypeParams = (JavaEnvironment.aliasesInScopeTypeParams aliases),
-          JavaEnvironment.aliasesPolymorphicLocals = (JavaEnvironment.aliasesPolymorphicLocals aliases),
-          JavaEnvironment.aliasesInScopeJavaVars = (JavaEnvironment.aliasesInScopeJavaVars aliases),
-          JavaEnvironment.aliasesVarRenames = (JavaEnvironment.aliasesVarRenames aliases),
-          JavaEnvironment.aliasesLambdaVars = (JavaEnvironment.aliasesLambdaVars aliases),
-          JavaEnvironment.aliasesTypeVarSubst = (JavaEnvironment.aliasesTypeVarSubst aliases),
-          JavaEnvironment.aliasesTrustedTypeVars = (JavaEnvironment.aliasesTrustedTypeVars aliases),
-          JavaEnvironment.aliasesMethodCodomain = Nothing,
-          JavaEnvironment.aliasesThunkedVars = (JavaEnvironment.aliasesThunkedVars aliases)},
-        JavaEnvironment.javaEnvironmentGraph = (JavaEnvironment.javaEnvironmentGraph env)}
-interfaceTypes :: Bool -> JavaEnvironment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> [Syntax.InterfaceType]
-interfaceTypes isSer aliases tparams elName =
-
-      let javaSerializableType =
-              Syntax.InterfaceType (Syntax.ClassType {
-                Syntax.classTypeAnnotations = [],
-                Syntax.classTypeQualifier = Syntax.ClassTypeQualifierNone,
-                Syntax.classTypeIdentifier = (Utils.javaTypeIdentifier "Serializable"),
-                Syntax.classTypeArguments = []})
-          selfTypeArg =
-                  Syntax.TypeArgumentReference (Utils.nameToJavaReferenceType aliases False (Lists.map (\tp_ -> Utils.typeParameterToTypeArgument tp_) tparams) elName Nothing)
-          javaComparableType =
-                  Syntax.InterfaceType (Syntax.ClassType {
-                    Syntax.classTypeAnnotations = [],
-                    Syntax.classTypeQualifier = Syntax.ClassTypeQualifierNone,
-                    Syntax.classTypeIdentifier = (Utils.javaTypeIdentifier "Comparable"),
-                    Syntax.classTypeArguments = [
-                      selfTypeArg]})
-      in (Logic.ifElse isSer [
-        javaSerializableType,
-        javaComparableType] [])
-isBigNumericType :: Core.Type -> Bool
-isBigNumericType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeLiteral v0 -> case v0 of
-        Core.LiteralTypeDecimal -> True
-        Core.LiteralTypeFloat v1 -> case v1 of
-          Core.FloatTypeBigfloat -> True
-          _ -> False
-        Core.LiteralTypeInteger v1 -> case v1 of
-          Core.IntegerTypeBigint -> True
-          _ -> False
-        _ -> False
-      _ -> False
-isBinaryType :: Core.Type -> Bool
-isBinaryType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeLiteral v0 -> case v0 of
-        Core.LiteralTypeBinary -> True
-        _ -> False
-      _ -> False
-isFieldUnitType :: Core.Name -> Core.Name -> t0 -> Graph.Graph -> Either t1 Bool
-isFieldUnitType typeName fieldName cx g =
-
-      let schemaTypes = Graph.graphSchemaTypes g
-      in (Maybes.cases (Maps.lookup typeName schemaTypes) (Right False) (\ts -> case (Strip.deannotateType (Core.typeSchemeBody ts)) of
-        Core.TypeUnion v0 -> Right (Maybes.cases (Lists.find (\ft -> Equality.equal (Core.fieldTypeName ft) fieldName) v0) False (\ft -> Predicates.isUnitType (Strip.deannotateType (Core.fieldTypeType ft))))
-        _ -> Right False))
-isLambdaBoundIn :: Core.Name -> S.Set Core.Name -> Bool
-isLambdaBoundIn name lambdaVars =
-    Logic.or (Sets.member name lambdaVars) (Logic.or (Logic.and (isLambdaBoundIn_isQualified name) (Maybes.isJust (Lists.find (\lv -> Logic.and (isLambdaBoundIn_isQualified lv) (Equality.equal (Names.localNameOf lv) (Names.localNameOf name))) (Sets.toList lambdaVars)))) (Logic.and (Logic.not (isLambdaBoundIn_isQualified name)) (Sets.member (Core.Name (Names.localNameOf name)) lambdaVars)))
-isLambdaBoundIn_isQualified :: Core.Name -> Bool
-isLambdaBoundIn_isQualified n = Maybes.isJust (Packaging.qualifiedNameNamespace (Names.qualifyName n))
-isLambdaBoundVariable :: Core.Name -> Bool
-isLambdaBoundVariable name =
-
-      let v = Core.unName name
-      in (Equality.lte (Strings.length v) 4)
-isLocalVariable :: Core.Name -> Bool
-isLocalVariable name = Maybes.isNothing (Packaging.qualifiedNameNamespace (Names.qualifyName name))
-isNonComparableType :: Core.Type -> Bool
-isNonComparableType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeEither _ -> True
-      Core.TypeFunction _ -> True
-      Core.TypeUnit -> True
-      Core.TypeLiteral v0 -> case v0 of
-        Core.LiteralTypeBinary -> True
-        _ -> False
-      Core.TypeForall v0 -> isNonComparableType (Core.forallTypeBody v0)
-      _ -> False
-isRecursiveVariable :: JavaEnvironment.Aliases -> Core.Name -> Bool
-isRecursiveVariable aliases name = Sets.member name (JavaEnvironment.aliasesRecursiveVars aliases)
-isSerializableJavaType :: Core.Type -> Bool
-isSerializableJavaType typ = Predicates.isNominalType typ
-isSimpleName :: Core.Name -> Bool
-isSimpleName name = Equality.equal (Lists.length (Strings.splitOn "." (Core.unName name))) 1
-isUnresolvedInferenceVar :: Core.Name -> Bool
-isUnresolvedInferenceVar name =
-
-      let chars = Strings.toList (Core.unName name)
-      in (Maybes.fromMaybe False (Maybes.map (\p ->
-        let firstCh = Pairs.first p
-            rest = Pairs.second p
-        in (Logic.ifElse (Logic.not (Equality.equal firstCh 116)) False (Logic.and (Logic.not (Lists.null rest)) (Lists.null (Lists.filter (\c -> Logic.not (isUnresolvedInferenceVar_isDigit c)) rest))))) (Lists.uncons chars)))
-isUnresolvedInferenceVar_isDigit :: Int -> Bool
-isUnresolvedInferenceVar_isDigit c = Logic.and (Equality.gte c 48) (Equality.lte c 57)
-java11Features :: JavaEnvironment.JavaFeatures
-java11Features = JavaEnvironment.JavaFeatures {
-  JavaEnvironment.javaFeaturesSupportsDiamondOperator = True}
-java8Features :: JavaEnvironment.JavaFeatures
-java8Features = JavaEnvironment.JavaFeatures {
-  JavaEnvironment.javaFeaturesSupportsDiamondOperator = False}
-javaComparableRefType :: Syntax.ReferenceType
-javaComparableRefType =
-    Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (Syntax.ClassType {
-      Syntax.classTypeAnnotations = [],
-      Syntax.classTypeQualifier = Syntax.ClassTypeQualifierNone,
-      Syntax.classTypeIdentifier = (Utils.javaTypeIdentifier "Comparable"),
-      Syntax.classTypeArguments = []}))
-javaEnvGetGraph :: JavaEnvironment.JavaEnvironment -> Graph.Graph
-javaEnvGetGraph env = JavaEnvironment.javaEnvironmentGraph env
-javaEnvSetGraph :: Graph.Graph -> JavaEnvironment.JavaEnvironment -> JavaEnvironment.JavaEnvironment
-javaEnvSetGraph g env =
-    JavaEnvironment.JavaEnvironment {
-      JavaEnvironment.javaEnvironmentAliases = (JavaEnvironment.javaEnvironmentAliases env),
-      JavaEnvironment.javaEnvironmentGraph = g}
-javaFeatures :: JavaEnvironment.JavaFeatures
-javaFeatures = java11Features
-javaIdentifierToString :: Syntax.Identifier -> String
-javaIdentifierToString id = Syntax.unIdentifier id
-javaTypeArgumentsForNamedType :: Core.Name -> t0 -> Graph.Graph -> Either Errors.Error [Syntax.TypeArgument]
-javaTypeArgumentsForNamedType tname cx g =
-    Eithers.bind (Resolution.requireType cx g tname) (\typ -> Right (Lists.map (\tp_ -> Utils.typeParameterToTypeArgument tp_) (javaTypeParametersForType typ)))
-javaTypeArgumentsForType :: Core.Type -> [Syntax.TypeArgument]
-javaTypeArgumentsForType typ = Lists.reverse (Lists.map Utils.typeParameterToTypeArgument (javaTypeParametersForType typ))
-javaTypeParametersForType :: Core.Type -> [Syntax.TypeParameter]
-javaTypeParametersForType typ =
-
-      let toParam = \name -> Utils.javaTypeParameter (Formatting.capitalize (Core.unName name))
-          boundVars = javaTypeParametersForType_bvars typ
-          freeVars = Lists.filter (\v -> isLambdaBoundVariable v) (Sets.toList (Variables.freeVariablesInType typ))
-          vars = Lists.nub (Lists.concat2 boundVars freeVars)
-      in (Lists.map toParam vars)
-javaTypeParametersForType_bvars :: Core.Type -> [Core.Name]
-javaTypeParametersForType_bvars t =
-    case t of
-      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (javaTypeParametersForType_bvars (Core.forallTypeBody v0))
-      _ -> []
-moduleToJava :: Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToJava mod defs cx g =
-    Eithers.bind (encodeDefinitions mod defs cx g) (\units -> Right (Maps.fromList (Lists.map (\entry ->
-      let name = Pairs.first entry
-          unit = Pairs.second entry
-      in (bindingNameToFilePath name, (Serialization.printExpr (Serialization.parenthesize (Serde.writeCompilationUnit unit))))) (Maps.toList units))))
-nameMapToTypeMap :: Ord t0 => (M.Map t0 Core.Name -> M.Map t0 Core.Type)
-nameMapToTypeMap m = Maps.map (\v -> Core.TypeVariable v) m
-namespaceParent :: Packaging.Namespace -> Maybe Packaging.Namespace
-namespaceParent ns =
-
-      let parts = Strings.splitOn "." (Packaging.unNamespace ns)
-          initParts = Maybes.fromMaybe [] (Lists.maybeInit parts)
-      in (Logic.ifElse (Lists.null initParts) Nothing (Just (Packaging.Namespace (Strings.intercalate "." initParts))))
-needsThunking :: Core.Term -> Bool
-needsThunking t =
-    case (Strip.deannotateTerm t) of
-      Core.TermLet _ -> True
-      Core.TermTypeApplication _ -> True
-      Core.TermTypeLambda _ -> True
-      _ -> Lists.foldl (\b -> \st -> Logic.or b (needsThunking st)) False (Rewriting.subterms t)
-noComment :: Syntax.ClassBodyDeclaration -> Syntax.ClassBodyDeclarationWithComments
-noComment decl =
-    Syntax.ClassBodyDeclarationWithComments {
-      Syntax.classBodyDeclarationWithCommentsValue = decl,
-      Syntax.classBodyDeclarationWithCommentsComments = Nothing}
-otherwiseBranch :: JavaEnvironment.JavaEnvironment -> JavaEnvironment.Aliases -> Core.Type -> Core.Type -> Core.Name -> Syntax.Type -> [Syntax.TypeArgument] -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclarationWithComments
-otherwiseBranch env aliases dom cod tname jcod targs d cx g =
-
-      let jdom = Syntax.TypeReference (Utils.nameToJavaReferenceType aliases True targs tname Nothing)
-          mods = [
-                Syntax.MethodModifierPublic]
-          anns = [
-                Utils.overrideAnnotation]
-          param = Utils.javaTypeToJavaFormalParameter jdom (Core.Name "instance")
-          result = Syntax.ResultType (Syntax.UnannType jcod)
-      in (Eithers.bind (analyzeJavaFunction env d cx g) (\fs ->
-        let bindings = Typing.functionStructureBindings fs
-            rawBody = Typing.functionStructureBody fs
-            innerBody = annotateBodyWithCod cod rawBody
-            env2 = Typing.functionStructureEnvironment fs
-        in (Eithers.bind (bindingsToStatements env2 bindings cx g) (\bindResult ->
-          let bindingStmts = Pairs.first bindResult
-              env3 = Pairs.second bindResult
-          in (Eithers.bind (encodeTerm env3 innerBody cx g) (\jret ->
-            let returnStmt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jret))
-                allStmts = Lists.concat2 bindingStmts [
-                      returnStmt]
-            in (Right (noComment (Utils.methodDeclaration mods [] anns JavaNames.otherwiseMethodName [
-              param] result (Just allStmts))))))))))
-peelDomainTypes :: Int -> Core.Type -> ([Core.Type], Core.Type)
-peelDomainTypes n t =
-    Logic.ifElse (Equality.lte n 0) ([], t) (case (Strip.deannotateType t) of
-      Core.TypeFunction v0 ->
-        let rest = peelDomainTypes (Math.sub n 1) (Core.functionTypeCodomain v0)
-        in (Lists.cons (Core.functionTypeDomain v0) (Pairs.first rest), (Pairs.second rest))
-      _ -> ([], t))
-peelDomainsAndCod :: Int -> Core.Type -> ([Core.Type], Core.Type)
-peelDomainsAndCod n t =
-    Logic.ifElse (Equality.lte n 0) ([], t) (case (Strip.deannotateType t) of
-      Core.TypeFunction v0 ->
-        let rest = peelDomainsAndCod (Math.sub n 1) (Core.functionTypeCodomain v0)
-        in (Lists.cons (Core.functionTypeDomain v0) (Pairs.first rest), (Pairs.second rest))
-      _ -> ([], t))
-peelExpectedTypes :: M.Map Core.Name Core.Type -> Int -> Core.Type -> [Core.Type]
-peelExpectedTypes subst n t =
-    Logic.ifElse (Equality.equal n 0) [] (case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> Lists.cons (applySubstFull subst (Core.functionTypeDomain v0)) (peelExpectedTypes subst (Math.sub n 1) (Core.functionTypeCodomain v0))
-      _ -> [])
-propagateType :: Core.Type -> Core.Term -> Core.Term
-propagateType typ term =
-
-      let setTypeAnn = \t -> Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ typ)) t
-      in case (Strip.deannotateTerm term) of
-        Core.TermLambda _ ->
-          let annotated = setTypeAnn term
-          in case (Strip.deannotateType typ) of
-            Core.TypeFunction v1 -> propagateType_propagateIntoLambda (Core.functionTypeCodomain v1) annotated
-            _ -> annotated
-        Core.TermLet v0 ->
-          let propagatedBindings =
-                  Lists.map (\b -> Maybes.maybe b (\ts -> Core.Binding {
-                    Core.bindingName = (Core.bindingName b),
-                    Core.bindingTerm = (propagateType (Core.typeSchemeBody ts) (Core.bindingTerm b)),
-                    Core.bindingTypeScheme = (Core.bindingTypeScheme b)}) (Core.bindingTypeScheme b)) (Core.letBindings v0)
-          in (setTypeAnn (propagateType_rebuildLet term propagatedBindings (propagateType typ (Core.letBody v0))))
-        Core.TermApplication v0 ->
-          let fun = Core.applicationFunction v0
-              arg = Core.applicationArgument v0
-              annotatedFun =
-                      case (Strip.deannotateTerm fun) of
-                        Core.TermCases v1 ->
-                          let dom = Resolution.nominalApplication (Core.caseStatementTypeName v1) []
-                              ft =
-                                      Core.TypeFunction (Core.FunctionType {
-                                        Core.functionTypeDomain = dom,
-                                        Core.functionTypeCodomain = typ})
-                          in (Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ ft)) fun)
-                        _ -> fun
-          in (setTypeAnn (Core.TermApplication (Core.Application {
-            Core.applicationFunction = annotatedFun,
-            Core.applicationArgument = arg})))
-        _ -> setTypeAnn term
-propagateType_propagateIntoLambda :: Core.Type -> Core.Term -> Core.Term
-propagateType_propagateIntoLambda cod t =
-    case t of
-      Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-        Core.annotatedTermBody = (propagateType_propagateIntoLambda cod (Core.annotatedTermBody v0)),
-        Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-      Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-        Core.lambdaParameter = (Core.lambdaParameter v0),
-        Core.lambdaDomain = (Core.lambdaDomain v0),
-        Core.lambdaBody = (propagateType cod (Core.lambdaBody v0))})
-      _ -> t
-propagateType_rebuildLet :: Core.Term -> [Core.Binding] -> Core.Term -> Core.Term
-propagateType_rebuildLet t bindings newBody =
-    case t of
-      Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-        Core.annotatedTermBody = (propagateType_rebuildLet (Core.annotatedTermBody v0) bindings newBody),
-        Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-      Core.TermLet _ -> Core.TermLet (Core.Let {
-        Core.letBindings = bindings,
-        Core.letBody = newBody})
-      _ -> t
-propagateTypesInAppChain :: Core.Type -> Core.Type -> Core.Term -> Core.Term
-propagateTypesInAppChain fixedCod resultType t =
-
-      let flattened = flattenApps t []
-          args = Pairs.first flattened
-          fun = Pairs.second flattened
-          lambdaDomsResult = collectLambdaDomains fun
-          lambdaDoms = Pairs.first lambdaDomsResult
-          nArgs = Lists.length args
-          nLambdaDoms = Lists.length lambdaDoms
-      in (Logic.ifElse (Logic.and (Equality.gt nLambdaDoms 0) (Equality.gt nArgs 0)) (
-        let bodyRetType = Pairs.second (peelDomainsAndCod (Math.sub nLambdaDoms nArgs) resultType)
-            funType =
-                    Lists.foldl (\c -> \d -> Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = d,
-                      Core.functionTypeCodomain = c})) bodyRetType (Lists.reverse lambdaDoms)
-            annotatedFun = Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ funType)) fun
-        in (rebuildApps annotatedFun args funType)) (case (Strip.deannotateTerm t) of
-        Core.TermApplication v0 ->
-          let lhs = Core.applicationFunction v0
-              rhs = Core.applicationArgument v0
-              annotatedLhs =
-                      case (Strip.deannotateTerm lhs) of
-                        Core.TermCases v1 ->
-                          let dom = Resolution.nominalApplication (Core.caseStatementTypeName v1) []
-                              ft =
-                                      Core.TypeFunction (Core.FunctionType {
-                                        Core.functionTypeDomain = dom,
-                                        Core.functionTypeCodomain = fixedCod})
-                          in (Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ ft)) lhs)
-                        _ -> lhs
-          in (Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ resultType)) (Core.TermApplication (Core.Application {
-            Core.applicationFunction = annotatedLhs,
-            Core.applicationArgument = rhs})))
-        _ -> Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ resultType)) t))
-rebuildApps :: Core.Term -> [Core.Term] -> Core.Type -> Core.Term
-rebuildApps f args fType =
-    Logic.ifElse (Lists.null args) f (case (Strip.deannotateType fType) of
-      Core.TypeFunction v0 -> Maybes.fromMaybe f (Maybes.map (\p ->
-        let arg = Pairs.first p
-            rest = Pairs.second p
-            remainingType = Core.functionTypeCodomain v0
-            app =
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = f,
-                      Core.applicationArgument = arg})
-            annotatedApp = Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ remainingType)) app
-        in (rebuildApps annotatedApp rest remainingType)) (Lists.uncons args))
-      _ -> Lists.foldl (\acc -> \a -> Core.TermApplication (Core.Application {
-        Core.applicationFunction = acc,
-        Core.applicationArgument = a})) f args)
-recordCompareToMethod :: JavaEnvironment.Aliases -> t0 -> Core.Name -> [Core.FieldType] -> Syntax.ClassBodyDeclaration
-recordCompareToMethod aliases tparams elName fields =
-
-      let anns =
-              [
-                Utils.overrideAnnotation,
-                Utils.suppressWarningsUncheckedAnnotation]
-          mods = [
-                Syntax.MethodModifierPublic]
-          param =
-                  Utils.javaTypeToJavaFormalParameter (Utils.javaTypeFromTypeName aliases elName) (Core.Name JavaNames.otherInstanceName)
-          result = Utils.javaTypeToJavaResult Utils.javaIntType
-      in (Utils.methodDeclaration mods [] anns JavaNames.compareToMethodName [
-        param] result (Just (compareToBody aliases JavaNames.otherInstanceName fields)))
-recordConstructor :: JavaEnvironment.Aliases -> Core.Name -> [Core.FieldType] -> t0 -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclaration
-recordConstructor aliases elName fields cx g =
-
-      let assignStmts = Lists.map (\f -> Syntax.BlockStatementStatement (Utils.toAssignStmt (Core.fieldTypeName f))) fields
-      in (Eithers.bind (Eithers.mapList (\f -> fieldTypeToFormalParam aliases f cx g) fields) (\params -> Right (Utils.makeConstructor aliases elName False params assignStmts)))
-recordEqualsMethod :: JavaEnvironment.Aliases -> Core.Name -> [Core.FieldType] -> Syntax.ClassBodyDeclaration
-recordEqualsMethod aliases elName fields =
-
-      let anns = [
-            Utils.overrideAnnotation]
-          mods = [
-                Syntax.MethodModifierPublic]
-          param = Utils.javaTypeToJavaFormalParameter (Utils.javaRefType [] Nothing "Object") (Core.Name JavaNames.otherInstanceName)
-          result = Utils.javaTypeToJavaResult Utils.javaBooleanType
-          tmpName = "o"
-          instanceOfStmt =
-                  Syntax.BlockStatementStatement (Syntax.StatementIfThen (Syntax.IfThenStatement {
-                    Syntax.ifThenStatementExpression = (Utils.javaUnaryExpressionToJavaExpression (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusNot (Utils.javaRelationalExpressionToJavaUnaryExpression (Utils.javaInstanceOf (Utils.javaIdentifierToJavaRelationalExpression (Utils.javaIdentifier JavaNames.otherInstanceName)) (Utils.nameToJavaReferenceType aliases False [] elName Nothing)))))),
-                    Syntax.ifThenStatementStatement = (Utils.javaReturnStatement (Just (Utils.javaBooleanExpression False)))}))
-          castStmt =
-                  Utils.variableDeclarationStatement aliases (Utils.javaTypeFromTypeName aliases elName) (Utils.javaIdentifier tmpName) (Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression (Utils.nameToJavaReferenceType aliases False [] elName Nothing) (Utils.javaIdentifierToJavaUnaryExpression (Syntax.Identifier (Utils.sanitizeJavaName JavaNames.otherInstanceName)))))
-          returnAllFieldsEqual =
-                  Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (Logic.ifElse (Lists.null fields) (Utils.javaBooleanExpression True) (Utils.javaConditionalAndExpressionToJavaExpression (Syntax.ConditionalAndExpression (Lists.map (\f -> eqClause tmpName f) fields))))))
-      in (Utils.methodDeclaration mods [] anns JavaNames.equalsMethodName [
-        param] result (Just [
-        instanceOfStmt,
-        castStmt,
-        returnAllFieldsEqual]))
-recordHashCodeMethod :: [Core.FieldType] -> Syntax.ClassBodyDeclaration
-recordHashCodeMethod fields =
-
-      let anns = [
-            Utils.overrideAnnotation]
-          mods = [
-                Syntax.MethodModifierPublic]
-          result = Utils.javaTypeToJavaResult Utils.javaIntType
-          returnSum =
-                  Syntax.BlockStatementStatement (Logic.ifElse (Lists.null fields) (Utils.javaReturnStatement (Just (Utils.javaIntExpression 0))) (Utils.javaReturnStatement (Just (Utils.javaAdditiveExpressionToJavaExpression (Utils.addExpressions (Lists.zipWith hashCodeMultPair first20Primes (Lists.map (\f -> Core.fieldTypeName f) fields)))))))
-      in (Utils.methodDeclaration mods [] anns JavaNames.hashCodeMethodName [] result (Just [
-        returnSum]))
-recordMemberVar :: JavaEnvironment.Aliases -> Core.FieldType -> t0 -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclaration
-recordMemberVar aliases ft cx g =
-
-      let mods =
-              [
-                Syntax.FieldModifierPublic,
-                Syntax.FieldModifierFinal]
-          fname = Core.fieldTypeName ft
-          ftype = Core.fieldTypeType ft
-      in (Eithers.bind (encodeType aliases Sets.empty ftype cx g) (\jt -> Right (Utils.javaMemberField mods jt (Utils.fieldNameToJavaVariableDeclarator fname))))
-recordWithMethod :: JavaEnvironment.Aliases -> Core.Name -> [Core.FieldType] -> Core.FieldType -> t0 -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclaration
-recordWithMethod aliases elName fields field cx g =
-
-      let mods = [
-            Syntax.MethodModifierPublic]
-          anns = []
-          methodName =
-                  Strings.cat2 "with" (Formatting.nonAlnumToUnderscores (Formatting.capitalize (Core.unName (Core.fieldTypeName field))))
-          result = Utils.referenceTypeToResult (Utils.nameToJavaReferenceType aliases False [] elName Nothing)
-          consId = Syntax.Identifier (Utils.sanitizeJavaName (Names.localNameOf elName))
-          fieldArgs = Lists.map (\f -> Utils.fieldNameToJavaExpression (Core.fieldTypeName f)) fields
-          returnStmt =
-                  Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (Utils.javaConstructorCall (Utils.javaConstructorName consId Nothing) fieldArgs Nothing)))
-      in (Eithers.bind (fieldTypeToFormalParam aliases field cx g) (\param -> Right (Utils.methodDeclaration mods [] anns methodName [
-        param] result (Just [
-        returnStmt]))))
-resolveTypeApps :: [Core.Name] -> [Core.Type] -> M.Map Core.Name Core.Type -> [Core.Type]
-resolveTypeApps schemeVars fallbackTypeApps argSubst =
-
-      let resolvedVars = Sets.fromList (Maps.keys argSubst)
-          unresolvedVars = Lists.filter (\v -> Logic.not (Sets.member v resolvedVars)) schemeVars
-          usedTypes = Sets.fromList (Maps.elems argSubst)
-          unusedIrTypes = Lists.filter (\t -> Logic.not (Sets.member t usedTypes)) fallbackTypeApps
-          remainingSubst = Maps.fromList (Lists.zip unresolvedVars unusedIrTypes)
-          fullSubst = Maps.union argSubst remainingSubst
-      in (Lists.map (\v -> Maps.findWithDefault (Core.TypeVariable v) v fullSubst) schemeVars)
-selfRefSubstitution :: (Eq t0, Ord t0) => (M.Map t0 [t0] -> M.Map t0 t0)
-selfRefSubstitution grouped =
-    Lists.foldl (\subst -> \entry -> selfRefSubstitution_processGroup subst (Pairs.first entry) (Pairs.second entry)) Maps.empty (Maps.toList grouped)
-selfRefSubstitution_processGroup :: (Eq t0, Ord t0) => (M.Map t0 t0 -> t0 -> [t0] -> M.Map t0 t0)
-selfRefSubstitution_processGroup subst inVar outVars =
-    Logic.ifElse (Lists.elem inVar outVars) (Lists.foldl (\s -> \v -> Logic.ifElse (Equality.equal v inVar) s (Maps.insert v inVar s)) subst outVars) subst
-serializableTypes :: Bool -> [Syntax.InterfaceType]
-serializableTypes isSer =
-
-      let javaSerializableType =
-              Syntax.InterfaceType (Syntax.ClassType {
-                Syntax.classTypeAnnotations = [],
-                Syntax.classTypeQualifier = Syntax.ClassTypeQualifierNone,
-                Syntax.classTypeIdentifier = (Utils.javaTypeIdentifier "Serializable"),
-                Syntax.classTypeArguments = []})
-      in (Logic.ifElse isSer [
-        javaSerializableType] [])
-splitConstantInitializer :: Syntax.InterfaceMemberDeclaration -> [Syntax.InterfaceMemberDeclaration]
-splitConstantInitializer member =
-    case member of
-      Syntax.InterfaceMemberDeclarationConstant v0 -> Lists.bind (Syntax.constantDeclarationVariables v0) (splitConstantInitializer_splitVar (Syntax.constantDeclarationModifiers v0) (Syntax.constantDeclarationType v0))
-      _ -> [
-        member]
-splitConstantInitializer_splitVar :: [Syntax.ConstantModifier] -> Syntax.UnannType -> Syntax.VariableDeclarator -> [Syntax.InterfaceMemberDeclaration]
-splitConstantInitializer_splitVar mods utype vd =
-
-      let vid = Syntax.variableDeclaratorId vd
-          mInit = Syntax.variableDeclaratorInitializer vd
-      in (Maybes.cases mInit [
-        Syntax.InterfaceMemberDeclarationConstant (Syntax.ConstantDeclaration {
-          Syntax.constantDeclarationModifiers = mods,
-          Syntax.constantDeclarationType = utype,
-          Syntax.constantDeclarationVariables = [
-            vd]})] (\init_ -> case init_ of
-        Syntax.VariableInitializerExpression v0 ->
-          let varName = javaIdentifierToString (Syntax.variableDeclaratorIdIdentifier vid)
-              helperName = Strings.cat2 "_init_" varName
-              callExpr = Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocation Nothing (Syntax.Identifier helperName) [])
-              field =
-                      Syntax.InterfaceMemberDeclarationConstant (Syntax.ConstantDeclaration {
-                        Syntax.constantDeclarationModifiers = mods,
-                        Syntax.constantDeclarationType = utype,
-                        Syntax.constantDeclarationVariables = [
-                          Syntax.VariableDeclarator {
-                            Syntax.variableDeclaratorId = vid,
-                            Syntax.variableDeclaratorInitializer = (Just (Syntax.VariableInitializerExpression callExpr))}]})
-              returnSt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just v0))
-              resultType = Syntax.ResultType utype
-              helper =
-                      Utils.interfaceMethodDeclaration [
-                        Syntax.InterfaceMethodModifierStatic,
-                        Syntax.InterfaceMethodModifierPrivate] [] helperName [] resultType (Just [
-                        returnSt])
-          in [
-            field,
-            helper]
-        _ -> [
-          Syntax.InterfaceMemberDeclarationConstant (Syntax.ConstantDeclaration {
-            Syntax.constantDeclarationModifiers = mods,
-            Syntax.constantDeclarationType = utype,
-            Syntax.constantDeclarationVariables = [
-              vd]})]))
-stripForalls :: Core.Type -> Core.Type
-stripForalls t =
-    case (Strip.deannotateType t) of
-      Core.TypeForall v0 -> stripForalls (Core.forallTypeBody v0)
-      _ -> t
-substituteTypeVarsWithTypes :: M.Map Core.Name Core.Type -> Core.Type -> Core.Type
-substituteTypeVarsWithTypes subst t = substituteTypeVarsWithTypes_go subst (Strip.deannotateType t)
-substituteTypeVarsWithTypes_go :: M.Map Core.Name Core.Type -> Core.Type -> Core.Type
-substituteTypeVarsWithTypes_go subst t =
-    case (Strip.deannotateType t) of
-      Core.TypeVariable v0 -> Maybes.cases (Maps.lookup v0 subst) t (\rep -> rep)
-      Core.TypeFunction v0 -> Core.TypeFunction (Core.FunctionType {
-        Core.functionTypeDomain = (substituteTypeVarsWithTypes_go subst (Core.functionTypeDomain v0)),
-        Core.functionTypeCodomain = (substituteTypeVarsWithTypes_go subst (Core.functionTypeCodomain v0))})
-      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-        Core.applicationTypeFunction = (substituteTypeVarsWithTypes_go subst (Core.applicationTypeFunction v0)),
-        Core.applicationTypeArgument = (substituteTypeVarsWithTypes_go subst (Core.applicationTypeArgument v0))})
-      Core.TypeList v0 -> Core.TypeList (substituteTypeVarsWithTypes_go subst v0)
-      Core.TypeSet v0 -> Core.TypeSet (substituteTypeVarsWithTypes_go subst v0)
-      Core.TypeMaybe v0 -> Core.TypeMaybe (substituteTypeVarsWithTypes_go subst v0)
-      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-        Core.mapTypeKeys = (substituteTypeVarsWithTypes_go subst (Core.mapTypeKeys v0)),
-        Core.mapTypeValues = (substituteTypeVarsWithTypes_go subst (Core.mapTypeValues v0))})
-      Core.TypePair v0 -> Core.TypePair (Core.PairType {
-        Core.pairTypeFirst = (substituteTypeVarsWithTypes_go subst (Core.pairTypeFirst v0)),
-        Core.pairTypeSecond = (substituteTypeVarsWithTypes_go subst (Core.pairTypeSecond v0))})
-      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-        Core.eitherTypeLeft = (substituteTypeVarsWithTypes_go subst (Core.eitherTypeLeft v0)),
-        Core.eitherTypeRight = (substituteTypeVarsWithTypes_go subst (Core.eitherTypeRight v0))})
-      Core.TypeForall v0 -> Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = (Core.forallTypeParameter v0),
-        Core.forallTypeBody = (substituteTypeVarsWithTypes_go subst (Core.forallTypeBody v0))})
-      _ -> t
-tagCmpNotZeroExpr :: Syntax.Expression
-tagCmpNotZeroExpr =
-    Utils.javaEqualityExpressionToJavaExpression (Syntax.EqualityExpressionNotEqual (Syntax.EqualityExpression_Binary {
-      Syntax.equalityExpression_BinaryLhs = lhs,
-      Syntax.equalityExpression_BinaryRhs = rhs}))
-  where
-    lhs =
-        Utils.javaRelationalExpressionToJavaEqualityExpression (Utils.javaPostfixExpressionToJavaRelationalExpression (Syntax.PostfixExpressionName (Syntax.ExpressionName {
-          Syntax.expressionNameQualifier = Nothing,
-          Syntax.expressionNameIdentifier = (Utils.javaIdentifier "tagCmp")})))
-    rhs =
-        Utils.javaPostfixExpressionToJavaRelationalExpression (Syntax.PostfixExpressionPrimary (Utils.javaLiteralToJavaPrimary (Utils.javaInt 0)))
-tagCompareExpr :: Syntax.Expression
-tagCompareExpr =
-    Utils.javaMethodInvocationToJavaExpression (Syntax.MethodInvocation {
-      Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-        Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantPrimary (Utils.javaMethodInvocationToJavaPrimary thisGetName)),
-        Syntax.methodInvocation_ComplexTypeArguments = [],
-        Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier JavaNames.compareToMethodName)})),
-      Syntax.methodInvocationArguments = [
-        Utils.javaMethodInvocationToJavaExpression otherGetName]})
-  where
-    thisGetClass =
-        Syntax.MethodInvocation {
-          Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-            Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantPrimary (Utils.javaExpressionToJavaPrimary Utils.javaThis)),
-            Syntax.methodInvocation_ComplexTypeArguments = [],
-            Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier "getClass")})),
-          Syntax.methodInvocationArguments = []}
-    thisGetName =
-        Syntax.MethodInvocation {
-          Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-            Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantPrimary (Utils.javaMethodInvocationToJavaPrimary thisGetClass)),
-            Syntax.methodInvocation_ComplexTypeArguments = [],
-            Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier "getName")})),
-          Syntax.methodInvocationArguments = []}
-    otherGetClass =
-        Syntax.MethodInvocation {
-          Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-            Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantExpression (Syntax.ExpressionName {
-              Syntax.expressionNameQualifier = Nothing,
-              Syntax.expressionNameIdentifier = (Syntax.Identifier JavaNames.otherInstanceName)})),
-            Syntax.methodInvocation_ComplexTypeArguments = [],
-            Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier "getClass")})),
-          Syntax.methodInvocationArguments = []}
-    otherGetName =
-        Syntax.MethodInvocation {
-          Syntax.methodInvocationHeader = (Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-            Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantPrimary (Utils.javaMethodInvocationToJavaPrimary otherGetClass)),
-            Syntax.methodInvocation_ComplexTypeArguments = [],
-            Syntax.methodInvocation_ComplexIdentifier = (Syntax.Identifier "getName")})),
-          Syntax.methodInvocationArguments = []}
-takeTypeArgs :: String -> Int -> [Syntax.Type] -> t0 -> t1 -> Either Errors.Error [Syntax.TypeArgument]
-takeTypeArgs label n tyapps cx g =
-    Logic.ifElse (Equality.lt (Lists.length tyapps) n) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-      "needed type arguments for ",
-      label,
-      ", found too few"])))) (Eithers.mapList (\jt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jt cx) (\rt -> Right (Syntax.TypeArgumentReference rt))) (Lists.take n tyapps))
-toClassDecl :: Bool -> Bool -> JavaEnvironment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> Core.Type -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassDeclaration
-toClassDecl isInner isSer aliases tparams elName t cx g =
-
-      let wrap =
-              \t_ -> declarationForRecordType isInner isSer aliases tparams elName [
-                Core.FieldType {
-                  Core.fieldTypeName = (Core.Name "value"),
-                  Core.fieldTypeType = (Strip.deannotateType t_)}] cx g
-      in case (Strip.deannotateType t) of
-        Core.TypeRecord v0 -> declarationForRecordType isInner isSer aliases tparams elName v0 cx g
-        Core.TypeUnion v0 -> declarationForUnionType isSer aliases tparams elName v0 cx g
-        Core.TypeForall v0 ->
-          let v = Core.forallTypeParameter v0
-              body = Core.forallTypeBody v0
-              param = Utils.javaTypeParameter (Formatting.capitalize (Core.unName v))
-          in (toClassDecl False isSer aliases (Lists.concat2 tparams [
-            param]) elName body cx g)
-        Core.TypeWrap v0 -> declarationForRecordType isInner isSer aliases tparams elName [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "value"),
-            Core.fieldTypeType = v0}] cx g
-        _ -> wrap t
-toDeclInit :: JavaEnvironment.Aliases -> Graph.Graph -> S.Set Core.Name -> [Core.Binding] -> Core.Name -> Context.Context -> Graph.Graph -> Either Errors.Error (Maybe Syntax.BlockStatement)
-toDeclInit aliasesExt gExt recursiveVars flatBindings name cx g =
-    Logic.ifElse (Sets.member name recursiveVars) (
-      let binding =
-              Maybes.fromMaybe (Core.Binding {
-                Core.bindingName = name,
-                Core.bindingTerm = Core.TermUnit,
-                Core.bindingTypeScheme = Nothing}) (Lists.maybeHead (Lists.filter (\b -> Equality.equal (Core.bindingName b) name) flatBindings))
-          value = Core.bindingTerm binding
-      in (Eithers.bind (Maybes.cases (Core.bindingTypeScheme binding) (Checking.typeOfTerm cx gExt value) (\ts -> Right (Core.typeSchemeBody ts))) (\typ -> Eithers.bind (encodeType aliasesExt Sets.empty typ cx g) (\jtype ->
-        let id = Utils.variableToJavaIdentifier name
-            arid = Syntax.Identifier "java.util.concurrent.atomic.AtomicReference"
-            aid =
-                    Syntax.AnnotatedIdentifier {
-                      Syntax.annotatedIdentifierAnnotations = [],
-                      Syntax.annotatedIdentifierIdentifier = arid}
-        in (Eithers.bind (Utils.javaTypeToJavaReferenceType jtype cx) (\rt ->
-          let targs = typeArgsOrDiamond [
-                Syntax.TypeArgumentReference rt]
-              ci =
-                      Syntax.ClassOrInterfaceTypeToInstantiate {
-                        Syntax.classOrInterfaceTypeToInstantiateIdentifiers = [
-                          aid],
-                        Syntax.classOrInterfaceTypeToInstantiateTypeArguments = (Just targs)}
-              body = Utils.javaConstructorCall ci [] Nothing
-              pkg =
-                      JavaNames.javaPackageName [
-                        "java",
-                        "util",
-                        "concurrent",
-                        "atomic"]
-              artype = Utils.javaRefType [
-                    rt] (Just pkg) "AtomicReference"
-          in (Right (Just (Utils.variableDeclarationStatement aliasesExt artype id body))))))))) (Right Nothing)
-toDeclStatement :: JavaEnvironment.JavaEnvironment -> JavaEnvironment.Aliases -> Graph.Graph -> S.Set Core.Name -> S.Set Core.Name -> [Core.Binding] -> Core.Name -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.BlockStatement
-toDeclStatement envExt aliasesExt gExt recursiveVars thunkedVars flatBindings name cx g =
-
-      let binding =
-              Maybes.fromMaybe (Core.Binding {
-                Core.bindingName = name,
-                Core.bindingTerm = Core.TermUnit,
-                Core.bindingTypeScheme = Nothing}) (Lists.maybeHead (Lists.filter (\b -> Equality.equal (Core.bindingName b) name) flatBindings))
-          value = Core.bindingTerm binding
-      in (Eithers.bind (Maybes.cases (Core.bindingTypeScheme binding) (Checking.typeOfTerm cx gExt value) (\ts -> Right (Core.typeSchemeBody ts))) (\typ -> Eithers.bind (encodeType aliasesExt Sets.empty typ cx g) (\jtype ->
-        let id = Utils.variableToJavaIdentifier name
-            annotatedValue = Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ typ)) value
-        in (Eithers.bind (encodeTerm envExt annotatedValue cx g) (\rhs -> Logic.ifElse (Sets.member name recursiveVars) (Right (Syntax.BlockStatementStatement (Utils.javaMethodInvocationToJavaStatement (Utils.methodInvocation (Just (Left (Syntax.ExpressionName {
-          Syntax.expressionNameQualifier = Nothing,
-          Syntax.expressionNameIdentifier = id}))) (Syntax.Identifier JavaNames.setMethodName) [
-          rhs])))) (Logic.ifElse (Sets.member name thunkedVars) (Eithers.bind (Utils.javaTypeToJavaReferenceType jtype cx) (\rt ->
-          let lazyType = Utils.javaRefType [
-                rt] JavaNames.hydraUtilPackageName "Lazy"
-              lambdaBody = Syntax.LambdaBodyExpression rhs
-              supplierLambda =
-                      Syntax.ExpressionLambda (Syntax.LambdaExpression {
-                        Syntax.lambdaExpressionParameters = (Syntax.LambdaParametersTuple []),
-                        Syntax.lambdaExpressionBody = lambdaBody})
-              targs = typeArgsOrDiamond [
-                    Syntax.TypeArgumentReference rt]
-              lazyExpr =
-                      Utils.javaConstructorCall (Utils.javaConstructorName (Syntax.Identifier "hydra.util.Lazy") (Just targs)) [
-                        supplierLambda] Nothing
-          in (Right (Utils.variableDeclarationStatement aliasesExt lazyType id lazyExpr)))) (Right (Utils.variableDeclarationStatement aliasesExt jtype id rhs))))))))
-tryInferFunctionType :: Core.Term -> Maybe Core.Type
-tryInferFunctionType funTerm =
-    case (Strip.deannotateTerm funTerm) of
-      Core.TermLambda v0 -> Maybes.bind (Core.lambdaDomain v0) (\dom ->
-        let mCod =
-                case (Core.lambdaBody v0) of
-                  Core.TermAnnotated v1 -> Maybes.bind (Maps.lookup Constants.key_type (Core.annotatedTermAnnotation v1)) (\typeTerm -> decodeTypeFromTerm typeTerm)
-                  Core.TermLambda _ -> tryInferFunctionType (Core.lambdaBody v0)
-                  _ -> Nothing
-        in (Maybes.map (\cod -> Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = dom,
-          Core.functionTypeCodomain = cod})) mCod))
-      _ -> Nothing
-typeAppFallbackCast :: JavaEnvironment.JavaEnvironment -> JavaEnvironment.Aliases -> [M.Map Core.Name Core.Term] -> [Syntax.Type] -> Syntax.Type -> Core.Term -> Core.Type -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-typeAppFallbackCast env aliases anns tyapps jatyp body typ cx g =
-
-      let annotatedBody = Annotations.setTermAnnotation Constants.key_type (Just (EncodeCore.type_ typ)) body
-      in (Eithers.bind (encodeTermInternal env anns (Lists.cons jatyp tyapps) annotatedBody cx g) (\jbody -> Eithers.bind (encodeType aliases Sets.empty typ cx g) (\jtype -> Eithers.bind (Utils.javaTypeToJavaReferenceType jtype cx) (\rt -> Right (Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression rt (Utils.javaExpressionToJavaUnaryExpression jbody)))))))
-typeAppNullaryOrHoisted :: JavaEnvironment.JavaEnvironment -> JavaEnvironment.Aliases -> [M.Map Core.Name Core.Term] -> [Syntax.Type] -> Syntax.Type -> Core.Term -> Core.Type -> Core.Name -> JavaEnvironment.JavaSymbolClass -> [Core.Type] -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.Expression
-typeAppNullaryOrHoisted env aliases anns tyapps jatyp body correctedTyp varName cls allTypeArgs cx g =
-
-      let qn = Names.qualifyName varName
-          mns = Packaging.qualifiedNameNamespace qn
-          localName = Packaging.qualifiedNameLocal qn
-      in case cls of
-        JavaEnvironment.JavaSymbolClassNullaryFunction -> Maybes.cases mns (typeAppFallbackCast env aliases anns tyapps jatyp body correctedTyp cx g) (\ns_ ->
-          let classId = Utils.nameToJavaName aliases (elementsQualifiedName ns_)
-              methodId = Syntax.Identifier (Utils.sanitizeJavaName localName)
-          in (Eithers.bind (filterPhantomTypeArgs varName allTypeArgs cx g) (\filteredTypeArgs -> Eithers.bind (Eithers.mapList (\t -> Eithers.bind (encodeType aliases Sets.empty t cx g) (\jt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jt cx) (\rt -> Right (Syntax.TypeArgumentReference rt)))) filteredTypeArgs) (\jTypeArgs -> Right (Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs classId methodId jTypeArgs []))))))
-        JavaEnvironment.JavaSymbolClassHoistedLambda v0 -> Maybes.cases mns (typeAppFallbackCast env aliases anns tyapps jatyp body correctedTyp cx g) (\ns_ ->
-          let classId = Utils.nameToJavaName aliases (elementsQualifiedName ns_)
-              methodId = Syntax.Identifier (Utils.sanitizeJavaName localName)
-          in (Eithers.bind (filterPhantomTypeArgs varName allTypeArgs cx g) (\filteredTypeArgs -> Eithers.bind (Eithers.mapList (\t -> Eithers.bind (encodeType aliases Sets.empty t cx g) (\jt -> Eithers.bind (Utils.javaTypeToJavaReferenceType jt cx) (\rt -> Right (Syntax.TypeArgumentReference rt)))) filteredTypeArgs) (\jTypeArgs ->
-            let paramNames = Lists.map (\i -> Core.Name (Strings.cat2 "p" (Literals.showInt32 i))) (Math.range 0 (Math.sub v0 1))
-                paramExprs = Lists.map (\p -> Utils.javaIdentifierToJavaExpression (Utils.variableToJavaIdentifier p)) paramNames
-                call =
-                        Utils.javaMethodInvocationToJavaExpression (Utils.methodInvocationStaticWithTypeArgs classId methodId jTypeArgs paramExprs)
-            in (Right (buildCurriedLambda paramNames call))))))
-        _ -> typeAppFallbackCast env aliases anns tyapps jatyp body correctedTyp cx g
-typeArgsOrDiamond :: [Syntax.TypeArgument] -> Syntax.TypeArgumentsOrDiamond
-typeArgsOrDiamond args =
-    Logic.ifElse (JavaEnvironment.javaFeaturesSupportsDiamondOperator javaFeatures) Syntax.TypeArgumentsOrDiamondDiamond (Syntax.TypeArgumentsOrDiamondArguments args)
-typesMatch :: Core.Type -> Core.Type -> Bool
-typesMatch a b =
-    case a of
-      Core.TypeVariable v0 -> case b of
-        Core.TypeVariable v1 -> Equality.equal v0 v1
-        _ -> True
-      Core.TypeWrap v0 -> case b of
-        Core.TypeWrap v1 -> Equality.equal v0 v1
-        _ -> True
-      _ -> True
-unwrapReturnType :: Core.Type -> Core.Type
-unwrapReturnType t =
-    case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> unwrapReturnType (Core.functionTypeCodomain v0)
-      Core.TypeApplication v0 -> unwrapReturnType (Core.applicationTypeArgument v0)
-      _ -> t
-variantCompareToMethod :: JavaEnvironment.Aliases -> t0 -> Core.Name -> Core.Name -> [Core.FieldType] -> Syntax.ClassBodyDeclaration
-variantCompareToMethod aliases tparams parentName variantName fields =
-
-      let anns =
-              [
-                Utils.overrideAnnotation,
-                Utils.suppressWarningsUncheckedAnnotation]
-          mods = [
-                Syntax.MethodModifierPublic]
-          param =
-                  Utils.javaTypeToJavaFormalParameter (Utils.javaTypeFromTypeName aliases parentName) (Core.Name JavaNames.otherInstanceName)
-          result = Utils.javaTypeToJavaResult Utils.javaIntType
-          varTmpName = "o"
-          tagDeclStmt = Utils.variableDeclarationStatement aliases Utils.javaIntType (Utils.javaIdentifier "tagCmp") tagCompareExpr
-          tagReturnStmt =
-                  Syntax.BlockStatementStatement (Syntax.StatementIfThen (Syntax.IfThenStatement {
-                    Syntax.ifThenStatementExpression = tagCmpNotZeroExpr,
-                    Syntax.ifThenStatementStatement = (Utils.javaReturnStatement (Just (Utils.javaExpressionNameToJavaExpression (Syntax.ExpressionName {
-                      Syntax.expressionNameQualifier = Nothing,
-                      Syntax.expressionNameIdentifier = (Utils.javaIdentifier "tagCmp")}))))}))
-          variantJavaType = Utils.javaTypeFromTypeName aliases variantName
-          castOtherExpr =
-                  Utils.javaCastExpressionToJavaExpression (Utils.javaCastExpression (Utils.nameToJavaReferenceType aliases False [] variantName Nothing) (Utils.javaIdentifierToJavaUnaryExpression (Syntax.Identifier JavaNames.otherInstanceName)))
-          castDeclStmt = Utils.variableDeclarationStatement aliases variantJavaType (Utils.javaIdentifier varTmpName) castOtherExpr
-          emptyReturn = [
-                Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just (Utils.javaIntExpression 0)))]
-          valueCompareStmt =
-                  Logic.ifElse (Lists.null fields) emptyReturn (Lists.concat2 [
-                    castDeclStmt] (compareToBody aliases varTmpName fields))
-          body =
-                  Lists.concat2 [
-                    tagDeclStmt,
-                    tagReturnStmt] valueCompareStmt
-      in (Utils.methodDeclaration mods [] anns JavaNames.compareToMethodName [
-        param] result (Just body))
-visitBranch :: JavaEnvironment.JavaEnvironment -> JavaEnvironment.Aliases -> Core.Type -> Core.Name -> Syntax.Type -> [Syntax.TypeArgument] -> Core.Field -> Context.Context -> Graph.Graph -> Either Errors.Error Syntax.ClassBodyDeclarationWithComments
-visitBranch env aliases dom tname jcod targs field cx g =
-
-      let jdom =
-              Syntax.TypeReference (Utils.nameToJavaReferenceType aliases True targs tname (Just (Formatting.capitalize (Core.unName (Core.fieldName field)))))
-          mods = [
-                Syntax.MethodModifierPublic]
-          anns = [
-                Utils.overrideAnnotation]
-          result = Syntax.ResultType (Syntax.UnannType jcod)
-      in case (Strip.deannotateTerm (Core.fieldTerm field)) of
-        Core.TermLambda v0 -> withLambda env v0 (\env2 ->
-          let lambdaParam = Core.lambdaParameter v0
-              body = Core.lambdaBody v0
-              env3 = insertBranchVar lambdaParam env2
-          in (Eithers.bind (analyzeJavaFunction env3 body cx g) (\fs ->
-            let bindings = Typing.functionStructureBindings fs
-                innerBody = Typing.functionStructureBody fs
-                env4 = Typing.functionStructureEnvironment fs
-            in (Eithers.bind (bindingsToStatements env4 bindings cx g) (\bindResult ->
-              let bindingStmts = Pairs.first bindResult
-                  env5 = Pairs.second bindResult
-              in (Eithers.bind (encodeTerm env5 innerBody cx g) (\jret ->
-                let param = Utils.javaTypeToJavaFormalParameter jdom lambdaParam
-                    returnStmt = Syntax.BlockStatementStatement (Utils.javaReturnStatement (Just jret))
-                    allStmts = Lists.concat2 bindingStmts [
-                          returnStmt]
-                in (Right (noComment (Utils.methodDeclaration mods [] anns JavaNames.visitMethodName [
-                  param] result (Just allStmts)))))))))))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "visitBranch: field term is not a lambda: " (ShowCore.term (Core.fieldTerm field)))))
-withLambda :: JavaEnvironment.JavaEnvironment -> Core.Lambda -> (JavaEnvironment.JavaEnvironment -> t0) -> t0
-withLambda env lam k =
-    Environment.withLambdaContext javaEnvGetGraph javaEnvSetGraph env lam (\env1 ->
-      let aliases = JavaEnvironment.javaEnvironmentAliases env1
-          aliases2 =
-                  JavaEnvironment.Aliases {
-                    JavaEnvironment.aliasesCurrentNamespace = (JavaEnvironment.aliasesCurrentNamespace aliases),
-                    JavaEnvironment.aliasesPackages = (JavaEnvironment.aliasesPackages aliases),
-                    JavaEnvironment.aliasesBranchVars = (JavaEnvironment.aliasesBranchVars aliases),
-                    JavaEnvironment.aliasesRecursiveVars = (JavaEnvironment.aliasesRecursiveVars aliases),
-                    JavaEnvironment.aliasesInScopeTypeParams = (JavaEnvironment.aliasesInScopeTypeParams aliases),
-                    JavaEnvironment.aliasesPolymorphicLocals = (JavaEnvironment.aliasesPolymorphicLocals aliases),
-                    JavaEnvironment.aliasesInScopeJavaVars = (JavaEnvironment.aliasesInScopeJavaVars aliases),
-                    JavaEnvironment.aliasesVarRenames = (JavaEnvironment.aliasesVarRenames aliases),
-                    JavaEnvironment.aliasesLambdaVars = (Sets.insert (Core.lambdaParameter lam) (JavaEnvironment.aliasesLambdaVars aliases)),
-                    JavaEnvironment.aliasesTypeVarSubst = (JavaEnvironment.aliasesTypeVarSubst aliases),
-                    JavaEnvironment.aliasesTrustedTypeVars = (JavaEnvironment.aliasesTrustedTypeVars aliases),
-                    JavaEnvironment.aliasesMethodCodomain = (JavaEnvironment.aliasesMethodCodomain aliases),
-                    JavaEnvironment.aliasesThunkedVars = (JavaEnvironment.aliasesThunkedVars aliases)}
-          env2 =
-                  JavaEnvironment.JavaEnvironment {
-                    JavaEnvironment.javaEnvironmentAliases = aliases2,
-                    JavaEnvironment.javaEnvironmentGraph = (JavaEnvironment.javaEnvironmentGraph env1)}
-      in (k env2))
-withTypeLambda :: JavaEnvironment.JavaEnvironment -> Core.TypeLambda -> (JavaEnvironment.JavaEnvironment -> t0) -> t0
-withTypeLambda = Environment.withTypeLambdaContext javaEnvGetGraph javaEnvSetGraph
-wrapInSupplierLambda :: Syntax.Expression -> Syntax.Expression
-wrapInSupplierLambda expr =
-    Syntax.ExpressionLambda (Syntax.LambdaExpression {
-      Syntax.lambdaExpressionParameters = (Syntax.LambdaParametersTuple []),
-      Syntax.lambdaExpressionBody = (Syntax.LambdaBodyExpression expr)})
-wrapLazyArguments :: Core.Name -> [Syntax.Expression] -> ([Syntax.Expression], (Maybe String))
-wrapLazyArguments name args =
-
-      let dummyExpr = Utils.javaIntExpression 0
-          argAt = \i -> Maybes.fromMaybe dummyExpr (Lists.maybeAt i args)
-      in (Logic.ifElse (Logic.and (Equality.equal name (Core.Name "hydra.lib.logic.ifElse")) (Equality.equal (Lists.length args) 3)) ([
-        argAt 0,
-        (wrapInSupplierLambda (argAt 1)),
-        (wrapInSupplierLambda (argAt 2))], (Just "lazy")) (Logic.ifElse (Logic.and (Equality.equal name (Core.Name "hydra.lib.maybes.maybe")) (Equality.equal (Lists.length args) 3)) ([
-        wrapInSupplierLambda (argAt 0),
-        (argAt 1),
-        (argAt 2)], (Just "applyLazy")) (Logic.ifElse (Logic.and (Equality.equal name (Core.Name "hydra.lib.maybes.cases")) (Equality.equal (Lists.length args) 3)) ([
-        argAt 0,
-        (wrapInSupplierLambda (argAt 1)),
-        (argAt 2)], (Just "applyLazy")) (Logic.ifElse (Logic.and (Equality.equal name (Core.Name "hydra.lib.maps.findWithDefault")) (Equality.equal (Lists.length args) 3)) ([
-        wrapInSupplierLambda (argAt 0),
-        (argAt 1),
-        (argAt 2)], (Just "applyLazy")) (Logic.ifElse (Logic.and (Logic.or (Equality.equal name (Core.Name "hydra.lib.maybes.fromMaybe")) (Logic.or (Equality.equal name (Core.Name "hydra.lib.eithers.fromLeft")) (Equality.equal name (Core.Name "hydra.lib.eithers.fromRight")))) (Equality.equal (Lists.length args) 2)) ([
-        wrapInSupplierLambda (argAt 0),
-        (argAt 1)], (Just "applyLazy")) (args, Nothing))))))
diff --git a/src/main/haskell/Hydra/Java/Environment.hs b/src/main/haskell/Hydra/Java/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Environment.hs
+++ /dev/null
@@ -1,93 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Environment types for Java code generation
-
-module Hydra.Java.Environment where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Packaging as Packaging
-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
--- | Classification of a Java symbol for code generation
-data JavaSymbolClass =
-  -- | A constant value
-  JavaSymbolClassConstant |
-  -- | A nullary function (no arguments)
-  JavaSymbolClassNullaryFunction |
-  -- | A hoisted lambda wrapped in type lambdas. The Int is the number of curried lambda parameters.
-  JavaSymbolClassHoistedLambda Int |
-  -- | A unary function (single argument)
-  JavaSymbolClassUnaryFunction |
-  -- | A local variable
-  JavaSymbolClassLocalVariable
-  deriving (Eq, Ord, Read, Show)
-_JavaSymbolClass = Core.Name "hydra.java.environment.JavaSymbolClass"
-_JavaSymbolClass_constant = Core.Name "constant"
-_JavaSymbolClass_nullaryFunction = Core.Name "nullaryFunction"
-_JavaSymbolClass_hoistedLambda = Core.Name "hoistedLambda"
-_JavaSymbolClass_unaryFunction = Core.Name "unaryFunction"
-_JavaSymbolClass_localVariable = Core.Name "localVariable"
--- | Feature flags for the target Java version
-data JavaFeatures =
-  JavaFeatures {
-    -- | Whether the diamond operator (<>) is supported (Java 7+)
-    javaFeaturesSupportsDiamondOperator :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_JavaFeatures = Core.Name "hydra.java.environment.JavaFeatures"
-_JavaFeatures_supportsDiamondOperator = Core.Name "supportsDiamondOperator"
--- | Aliases and context for Java code generation
-data Aliases =
-  Aliases {
-    -- | Current module namespace context
-    aliasesCurrentNamespace :: Packaging.Namespace,
-    -- | Maps namespaces to Java package names
-    aliasesPackages :: (M.Map Packaging.Namespace Syntax.PackageName),
-    -- | Variables bound in pattern matching branches
-    aliasesBranchVars :: (S.Set Core.Name),
-    -- | Variables that are self-recursive
-    aliasesRecursiveVars :: (S.Set Core.Name),
-    -- | Type parameters that are in scope (from method-level type parameters)
-    aliasesInScopeTypeParams :: (S.Set Core.Name),
-    -- | Local variables that have polymorphic types (declared with raw types)
-    aliasesPolymorphicLocals :: (S.Set Core.Name),
-    -- | All in-scope Java variable names (for avoiding lambda parameter shadowing)
-    aliasesInScopeJavaVars :: (S.Set Core.Name),
-    -- | Variable renames for avoiding shadowing (maps Hydra name to Java name)
-    aliasesVarRenames :: (M.Map Core.Name Core.Name),
-    -- | Lambda-bound variables (including hoisted captures with qualified names)
-    aliasesLambdaVars :: (S.Set Core.Name),
-    -- | Type variable substitution: maps fresh inference variable names to canonical scheme variable names
-    aliasesTypeVarSubst :: (M.Map Core.Name Core.Name),
-    -- | Type variables that actually appear in the method's formal parameter types
-    aliasesTrustedTypeVars :: (S.Set Core.Name),
-    -- | The enclosing method's codomain (return type), used for casting pair expressions
-    aliasesMethodCodomain :: (Maybe Core.Type),
-    -- | Variables that have been thunked (wrapped in Supplier) for lazy evaluation
-    aliasesThunkedVars :: (S.Set Core.Name)}
-  deriving (Eq, Ord, Read, Show)
-_Aliases = Core.Name "hydra.java.environment.Aliases"
-_Aliases_currentNamespace = Core.Name "currentNamespace"
-_Aliases_packages = Core.Name "packages"
-_Aliases_branchVars = Core.Name "branchVars"
-_Aliases_recursiveVars = Core.Name "recursiveVars"
-_Aliases_inScopeTypeParams = Core.Name "inScopeTypeParams"
-_Aliases_polymorphicLocals = Core.Name "polymorphicLocals"
-_Aliases_inScopeJavaVars = Core.Name "inScopeJavaVars"
-_Aliases_varRenames = Core.Name "varRenames"
-_Aliases_lambdaVars = Core.Name "lambdaVars"
-_Aliases_typeVarSubst = Core.Name "typeVarSubst"
-_Aliases_trustedTypeVars = Core.Name "trustedTypeVars"
-_Aliases_methodCodomain = Core.Name "methodCodomain"
-_Aliases_thunkedVars = Core.Name "thunkedVars"
--- | Environment for Java code generation
-data JavaEnvironment =
-  JavaEnvironment {
-    -- | Aliases and context state
-    javaEnvironmentAliases :: Aliases,
-    -- | Graph context for type inference
-    javaEnvironmentGraph :: Graph.Graph}
-_JavaEnvironment = Core.Name "hydra.java.environment.JavaEnvironment"
-_JavaEnvironment_aliases = Core.Name "aliases"
-_JavaEnvironment_graph = Core.Name "graph"
diff --git a/src/main/haskell/Hydra/Java/Language.hs b/src/main/haskell/Hydra/Java/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Language.hs
+++ /dev/null
@@ -1,268 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Language constraints and reserved words for Java
-
-module Hydra.Java.Language where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
--- | Language constraints for Java
-javaLanguage :: Coders.Language
-javaLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.java"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantDecimal,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeBigfloat,
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeBigint,
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint16]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
--- | The maximum supported length of a tuple in Hydra-Java. Note: if this constant is changed, also change Tuples.java correspondingly
-javaMaxTupleLength :: Int
-javaMaxTupleLength = 9
--- | A set of reserved words in Java
-reservedWords :: S.Set String
-reservedWords =
-    Sets.fromList (Lists.concat [
-      specialNames,
-      classNames,
-      keywords,
-      literals])
-  where
-    specialNames = [
-      "Elements"]
-    classNames =
-        [
-          "AbstractMethodError",
-          "Appendable",
-          "ArithmeticException",
-          "ArrayIndexOutOfBoundsException",
-          "ArrayStoreException",
-          "AssertionError",
-          "AutoCloseable",
-          "Boolean",
-          "BootstrapMethodError",
-          "Byte",
-          "CharSequence",
-          "Character",
-          "Class",
-          "ClassCastException",
-          "ClassCircularityError",
-          "ClassFormatError",
-          "ClassLoader",
-          "ClassNotFoundException",
-          "ClassValue",
-          "CloneNotSupportedException",
-          "Cloneable",
-          "Comparable",
-          "Compiler",
-          "Deprecated",
-          "Double",
-          "Enum",
-          "EnumConstantNotPresentException",
-          "Error",
-          "Exception",
-          "ExceptionInInitializerError",
-          "Float",
-          "IllegalAccessError",
-          "IllegalAccessException",
-          "IllegalArgumentException",
-          "IllegalMonitorStateException",
-          "IllegalStateException",
-          "IllegalThreadStateException",
-          "IncompatibleClassChangeError",
-          "IndexOutOfBoundsException",
-          "InheritableThreadLocal",
-          "InstantiationError",
-          "InstantiationException",
-          "Integer",
-          "InternalError",
-          "InterruptedException",
-          "Iterable",
-          "LinkageError",
-          "Long",
-          "Math",
-          "NegativeArraySizeException",
-          "NoClassDefFoundError",
-          "NoSuchFieldError",
-          "NoSuchFieldException",
-          "NoSuchMethodError",
-          "NoSuchMethodException",
-          "NullPointerException",
-          "Number",
-          "NumberFormatException",
-          "Object",
-          "OutOfMemoryError",
-          "Override",
-          "Package",
-          "Process",
-          "ProcessBuilder",
-          "Readable",
-          "ReflectiveOperationException",
-          "Runnable",
-          "Runtime",
-          "RuntimeException",
-          "RuntimePermission",
-          "SafeVarargs",
-          "SecurityException",
-          "SecurityManager",
-          "Short",
-          "StackOverflowError",
-          "StackTraceElement",
-          "StrictMath",
-          "String",
-          "StringBuffer",
-          "StringBuilder",
-          "StringIndexOutOfBoundsException",
-          "SuppressWarnings",
-          "System",
-          "Thread",
-          "ThreadDeath",
-          "ThreadGroup",
-          "ThreadLocal",
-          "Throwable",
-          "TypeNotPresentException",
-          "UnknownError",
-          "UnsatisfiedLinkError",
-          "UnsupportedClassVersionError",
-          "UnsupportedOperationException",
-          "VerifyError",
-          "VirtualMachineError",
-          "Void"]
-    keywords =
-        [
-          "abstract",
-          "assert",
-          "boolean",
-          "break",
-          "byte",
-          "case",
-          "catch",
-          "char",
-          "class",
-          "const",
-          "continue",
-          "default",
-          "do",
-          "double",
-          "else",
-          "enum",
-          "extends",
-          "final",
-          "finally",
-          "float",
-          "for",
-          "goto",
-          "if",
-          "implements",
-          "import",
-          "instanceof",
-          "int",
-          "interface",
-          "long",
-          "native",
-          "new",
-          "package",
-          "private",
-          "protected",
-          "public",
-          "return",
-          "short",
-          "static",
-          "strictfp",
-          "super",
-          "switch",
-          "synchronized",
-          "this",
-          "throw",
-          "throws",
-          "transient",
-          "try",
-          "void",
-          "volatile",
-          "while"]
-    literals =
-        [
-          "false",
-          "null",
-          "true"]
diff --git a/src/main/haskell/Hydra/Java/Names.hs b/src/main/haskell/Hydra/Java/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Names.hs
+++ /dev/null
@@ -1,72 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Java naming constants and package name utilities
-
-module Hydra.Java.Names where
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Lib.Lists as Lists
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-acceptMethodName :: String
-acceptMethodName = "accept"
-applyMethodName :: String
-applyMethodName = "apply"
-compareToMethodName :: String
-compareToMethodName = "compareTo"
-equalsMethodName :: String
-equalsMethodName = "equals"
-getMethodName :: String
-getMethodName = "get"
-hashCodeMethodName :: String
-hashCodeMethodName = "hashCode"
--- | The hydra.core package name
-hydraCorePackageName :: Maybe Syntax.PackageName
-hydraCorePackageName =
-    Just (javaPackageName [
-      "hydra",
-      "core"])
--- | The hydra.util package name
-hydraUtilPackageName :: Maybe Syntax.PackageName
-hydraUtilPackageName =
-    Just (javaPackageName [
-      "hydra",
-      "util"])
-instanceName :: String
-instanceName = "instance"
--- | The java.lang package name
-javaLangPackageName :: Maybe Syntax.PackageName
-javaLangPackageName =
-    Just (javaPackageName [
-      "java",
-      "lang"])
--- | Construct a Java package name from a list of string parts
-javaPackageName :: [String] -> Syntax.PackageName
-javaPackageName parts = Syntax.PackageName (Lists.map (\p -> Syntax.Identifier p) parts)
--- | The java.util.function package name
-javaUtilFunctionPackageName :: Maybe Syntax.PackageName
-javaUtilFunctionPackageName =
-    Just (javaPackageName [
-      "java",
-      "util",
-      "function"])
--- | The java.util package name
-javaUtilPackageName :: Maybe Syntax.PackageName
-javaUtilPackageName =
-    Just (javaPackageName [
-      "java",
-      "util"])
-otherInstanceName :: String
-otherInstanceName = "other"
-otherwiseMethodName :: String
-otherwiseMethodName = "otherwise"
-partialVisitorName :: String
-partialVisitorName = "PartialVisitor"
-setMethodName :: String
-setMethodName = "set"
-valueFieldName :: String
-valueFieldName = "value"
-visitMethodName :: String
-visitMethodName = "visit"
-visitorName :: String
-visitorName = "Visitor"
-visitorReturnParameter :: String
-visitorReturnParameter = "R"
diff --git a/src/main/haskell/Hydra/Java/Serde.hs b/src/main/haskell/Hydra/Java/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Serde.hs
+++ /dev/null
@@ -1,1132 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Java serializer: converts Java AST to concrete syntax
-
-module Hydra.Java.Serde where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-escapeJavaChar :: Int -> String
-escapeJavaChar c =
-    Logic.ifElse (Equality.equal c 34) "\\\"" (Logic.ifElse (Equality.equal c 92) "\\\\" (Logic.ifElse (Equality.equal c 10) "\\n" (Logic.ifElse (Equality.equal c 13) "\\r" (Logic.ifElse (Equality.equal c 9) "\\t" (Logic.ifElse (Equality.equal c 8) "\\b" (Logic.ifElse (Equality.equal c 12) "\\f" (Logic.ifElse (Logic.and (Equality.gte c 32) (Equality.lt c 127)) (Strings.fromList [
-      c]) (javaUnicodeEscape c))))))))
-escapeJavaString :: String -> String
-escapeJavaString s = Strings.cat (Lists.map (\c -> escapeJavaChar c) (Strings.toList s))
-hexDigit :: Int -> Int
-hexDigit n = Logic.ifElse (Equality.lt n 10) (Math.add n 48) (Math.add (Math.sub n 10) 65)
-javaFloatLiteralText :: String -> String
-javaFloatLiteralText s =
-    Logic.ifElse (Equality.equal s "NaN") "Double.NaN" (Logic.ifElse (Equality.equal s "Infinity") "Double.POSITIVE_INFINITY" (Logic.ifElse (Equality.equal s "-Infinity") "Double.NEGATIVE_INFINITY" s))
-javaUnicodeEscape :: Int -> String
-javaUnicodeEscape n =
-    Logic.ifElse (Equality.gt n 65535) (
-      let n_ = Math.sub n 65536
-          hi = Math.add 55296 (Maybes.fromMaybe 0 (Math.maybeDiv n_ 1024))
-          lo = Math.add 56320 (Maybes.fromMaybe 0 (Math.maybeMod n_ 1024))
-      in (Strings.cat2 (Strings.cat2 "\\u" (padHex4 hi)) (Strings.cat2 "\\u" (padHex4 lo)))) (Strings.cat2 "\\u" (padHex4 n))
-padHex4 :: Int -> String
-padHex4 n =
-
-      let d3 = Maybes.fromMaybe 0 (Math.maybeDiv n 4096)
-          r3 = Maybes.fromMaybe 0 (Math.maybeMod n 4096)
-          d2 = Maybes.fromMaybe 0 (Math.maybeDiv r3 256)
-          r2 = Maybes.fromMaybe 0 (Math.maybeMod r3 256)
-          d1 = Maybes.fromMaybe 0 (Math.maybeDiv r2 16)
-          d0 = Maybes.fromMaybe 0 (Math.maybeMod r2 16)
-      in (Strings.fromList [
-        hexDigit d3,
-        (hexDigit d2),
-        (hexDigit d1),
-        (hexDigit d0)])
--- | Sanitize a string for use in a Java comment
-sanitizeJavaComment :: String -> String
-sanitizeJavaComment s = Strings.intercalate "&gt;" (Strings.splitOn ">" (Strings.intercalate "&lt;" (Strings.splitOn "<" s)))
--- | Create a single-line Java comment. Empty text emits `//` (no trailing space) so blank line comments don't carry trailing whitespace.
-singleLineComment :: String -> Ast.Expr
-singleLineComment c =
-
-      let sanitized = sanitizeJavaComment c
-      in (Serialization.cst (Logic.ifElse (Equality.equal sanitized "") "//" (Strings.cat2 "// " sanitized)))
--- | Wrap an expression with optional Javadoc comments. Blank lines inside the doc body emit ` *` (no trailing space) instead of ` * `.
-withComments :: Maybe String -> Ast.Expr -> Ast.Expr
-withComments mc expr =
-    Maybes.maybe expr (\c -> Serialization.newlineSep [
-      Serialization.cst (Strings.cat2 "/**\n" (Strings.cat2 (Strings.intercalate "\n" (Lists.map (\l -> Logic.ifElse (Equality.equal l "") " *" (Strings.cat2 " * " l)) (Strings.lines (sanitizeJavaComment c)))) "\n */")),
-      expr]) mc
-writeAdditionalBound :: Syntax.AdditionalBound -> Ast.Expr
-writeAdditionalBound ab =
-    Serialization.spaceSep [
-      Serialization.cst "&",
-      (writeInterfaceType (Syntax.unAdditionalBound ab))]
-writeAdditiveExpression :: Syntax.AdditiveExpression -> Ast.Expr
-writeAdditiveExpression e =
-    case e of
-      Syntax.AdditiveExpressionUnary v0 -> writeMultiplicativeExpression v0
-      Syntax.AdditiveExpressionPlus v0 -> Serialization.infixWs "+" (writeAdditiveExpression (Syntax.additiveExpression_BinaryLhs v0)) (writeMultiplicativeExpression (Syntax.additiveExpression_BinaryRhs v0))
-      Syntax.AdditiveExpressionMinus v0 -> Serialization.infixWs "-" (writeAdditiveExpression (Syntax.additiveExpression_BinaryLhs v0)) (writeMultiplicativeExpression (Syntax.additiveExpression_BinaryRhs v0))
-writeAmbiguousName :: Syntax.AmbiguousName -> Ast.Expr
-writeAmbiguousName an = Serialization.dotSep (Lists.map writeIdentifier (Syntax.unAmbiguousName an))
-writeAndExpression :: Syntax.AndExpression -> Ast.Expr
-writeAndExpression ae = Serialization.infixWsList "&" (Lists.map writeEqualityExpression (Syntax.unAndExpression ae))
-writeAnnotatedIdentifier :: Syntax.AnnotatedIdentifier -> Ast.Expr
-writeAnnotatedIdentifier ai = writeIdentifier (Syntax.annotatedIdentifierIdentifier ai)
-writeAnnotation :: Syntax.Annotation -> Ast.Expr
-writeAnnotation ann =
-    case ann of
-      Syntax.AnnotationNormal v0 -> writeNormalAnnotation v0
-      Syntax.AnnotationMarker v0 -> writeMarkerAnnotation v0
-      Syntax.AnnotationSingleElement v0 -> writeSingleElementAnnotation v0
-writeAnnotationTypeDeclaration :: t0 -> Ast.Expr
-writeAnnotationTypeDeclaration _ = Serialization.cst "STUB:AnnotationTypeDeclaration"
-writeArrayAccess :: t0 -> Ast.Expr
-writeArrayAccess _ = Serialization.cst "STUB:ArrayAccess"
-writeArrayCreationExpression :: Syntax.ArrayCreationExpression -> Ast.Expr
-writeArrayCreationExpression ace =
-    case ace of
-      Syntax.ArrayCreationExpressionPrimitiveArray v0 ->
-        let pt = Syntax.arrayCreationExpression_PrimitiveArrayType v0
-            ai = Syntax.arrayCreationExpression_PrimitiveArrayArray v0
-        in (Serialization.spaceSep [
-          Serialization.cst "new",
-          (Serialization.noSep [
-            writePrimitiveTypeWithAnnotations pt,
-            (Serialization.cst "[]")]),
-          (writeArrayInitializer ai)])
-      Syntax.ArrayCreationExpressionClassOrInterfaceArray _ -> Serialization.cst "STUB:ArrayCreationExpression"
-      Syntax.ArrayCreationExpressionPrimitive _ -> Serialization.cst "STUB:ArrayCreationExpression"
-      Syntax.ArrayCreationExpressionClassOrInterface _ -> Serialization.cst "STUB:ArrayCreationExpression"
-writeArrayInitializer :: Syntax.ArrayInitializer -> Ast.Expr
-writeArrayInitializer ai =
-
-      let groups = Syntax.unArrayInitializer ai
-      in (Maybes.fromMaybe (Serialization.cst "{}") (Maybes.map (\firstGroup -> Logic.ifElse (Equality.equal (Lists.length groups) 1) (Serialization.noSep [
-        Serialization.cst "{",
-        (Serialization.commaSep Serialization.inlineStyle (Lists.map writeVariableInitializer firstGroup)),
-        (Serialization.cst "}")]) (Serialization.cst "{}")) (Lists.maybeHead groups)))
-writeArrayType :: Syntax.ArrayType -> Ast.Expr
-writeArrayType at =
-
-      let dims = Syntax.arrayTypeDims at
-          variant = Syntax.arrayTypeVariant at
-          varExpr =
-                  case variant of
-                    Syntax.ArrayType_VariantPrimitive v0 -> writePrimitiveTypeWithAnnotations v0
-                    Syntax.ArrayType_VariantClassOrInterface v0 -> writeClassOrInterfaceType v0
-                    Syntax.ArrayType_VariantVariable v0 -> writeTypeVariable v0
-      in (Serialization.noSep [
-        varExpr,
-        (writeDims dims)])
-writeAssertStatement :: t0 -> Ast.Expr
-writeAssertStatement _ = Serialization.cst "STUB:AssertStatement"
-writeAssignment :: Syntax.Assignment -> Ast.Expr
-writeAssignment a =
-
-      let lhs = Syntax.assignmentLhs a
-          op = Syntax.assignmentOp a
-          rhs = Syntax.assignmentExpression a
-          ctop =
-                  case op of
-                    Syntax.AssignmentOperatorSimple -> "="
-                    Syntax.AssignmentOperatorTimes -> "*="
-                    Syntax.AssignmentOperatorDiv -> "/="
-                    Syntax.AssignmentOperatorMod -> "%="
-                    Syntax.AssignmentOperatorPlus -> "+="
-                    Syntax.AssignmentOperatorMinus -> "-="
-                    Syntax.AssignmentOperatorShiftLeft -> "<<="
-                    Syntax.AssignmentOperatorShiftRight -> ">>="
-                    Syntax.AssignmentOperatorShiftRightZeroFill -> ">>>="
-                    Syntax.AssignmentOperatorAnd -> "&="
-                    Syntax.AssignmentOperatorXor -> "^="
-                    Syntax.AssignmentOperatorOr -> "|="
-      in (Serialization.infixWs ctop (writeLeftHandSide lhs) (writeExpression rhs))
-writeAssignmentExpression :: Syntax.AssignmentExpression -> Ast.Expr
-writeAssignmentExpression e =
-    case e of
-      Syntax.AssignmentExpressionConditional v0 -> writeConditionalExpression v0
-      Syntax.AssignmentExpressionAssignment v0 -> writeAssignment v0
-writeBlock :: Syntax.Block -> Ast.Expr
-writeBlock b =
-    Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map writeBlockStatement (Syntax.unBlock b)))
-writeBlockStatement :: Syntax.BlockStatement -> Ast.Expr
-writeBlockStatement s =
-    case s of
-      Syntax.BlockStatementLocalVariableDeclaration v0 -> writeLocalVariableDeclarationStatement v0
-      Syntax.BlockStatementClass v0 -> writeClassDeclaration v0
-      Syntax.BlockStatementStatement v0 -> writeStatement v0
-writeBreakStatement :: Syntax.BreakStatement -> Ast.Expr
-writeBreakStatement bs =
-
-      let mlabel = Syntax.unBreakStatement bs
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "break"),
-        (Maybes.map writeIdentifier mlabel)])))
-writeCastExpression :: Syntax.CastExpression -> Ast.Expr
-writeCastExpression e =
-    case e of
-      Syntax.CastExpressionPrimitive v0 -> writeCastExpression_Primitive v0
-      Syntax.CastExpressionNotPlusMinus v0 -> writeCastExpression_NotPlusMinus v0
-      Syntax.CastExpressionLambda v0 -> writeCastExpression_Lambda v0
-writeCastExpression_Lambda :: t0 -> Ast.Expr
-writeCastExpression_Lambda _ = Serialization.cst "STUB:CastExpression_Lambda"
-writeCastExpression_NotPlusMinus :: Syntax.CastExpression_NotPlusMinus -> Ast.Expr
-writeCastExpression_NotPlusMinus npm =
-
-      let rb = Syntax.castExpression_NotPlusMinusRefAndBounds npm
-          ex = Syntax.castExpression_NotPlusMinusExpression npm
-      in (Serialization.spaceSep [
-        writeCastExpression_RefAndBounds rb,
-        (writeUnaryExpression ex)])
-writeCastExpression_Primitive :: Syntax.CastExpression_Primitive -> Ast.Expr
-writeCastExpression_Primitive cp =
-
-      let pt = Syntax.castExpression_PrimitiveType cp
-          ex = Syntax.castExpression_PrimitiveExpression cp
-      in (Serialization.spaceSep [
-        Serialization.parenList False [
-          writePrimitiveTypeWithAnnotations pt],
-        (writeUnaryExpression ex)])
-writeCastExpression_RefAndBounds :: Syntax.CastExpression_RefAndBounds -> Ast.Expr
-writeCastExpression_RefAndBounds rab =
-
-      let rt = Syntax.castExpression_RefAndBoundsType rab
-          adds = Syntax.castExpression_RefAndBoundsBounds rab
-      in (Serialization.parenList False [
-        Serialization.spaceSep (Maybes.cat [
-          Just (writeReferenceType rt),
-          (Logic.ifElse (Lists.null adds) Nothing (Just (Serialization.spaceSep (Lists.map writeAdditionalBound adds))))])])
-writeClassBody :: Syntax.ClassBody -> Ast.Expr
-writeClassBody cb =
-    Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Lists.map writeClassBodyDeclarationWithComments (Syntax.unClassBody cb)))
-writeClassBodyDeclaration :: Syntax.ClassBodyDeclaration -> Ast.Expr
-writeClassBodyDeclaration d =
-    case d of
-      Syntax.ClassBodyDeclarationClassMember v0 -> writeClassMemberDeclaration v0
-      Syntax.ClassBodyDeclarationInstanceInitializer v0 -> writeInstanceInitializer v0
-      Syntax.ClassBodyDeclarationStaticInitializer v0 -> writeStaticInitializer v0
-      Syntax.ClassBodyDeclarationConstructorDeclaration v0 -> writeConstructorDeclaration v0
-writeClassBodyDeclarationWithComments :: Syntax.ClassBodyDeclarationWithComments -> Ast.Expr
-writeClassBodyDeclarationWithComments cbdwc =
-
-      let d = Syntax.classBodyDeclarationWithCommentsValue cbdwc
-          mc = Syntax.classBodyDeclarationWithCommentsComments cbdwc
-      in (withComments mc (writeClassBodyDeclaration d))
-writeClassDeclaration :: Syntax.ClassDeclaration -> Ast.Expr
-writeClassDeclaration d =
-    case d of
-      Syntax.ClassDeclarationNormal v0 -> writeNormalClassDeclaration v0
-      Syntax.ClassDeclarationEnum v0 -> writeEnumDeclaration v0
-writeClassInstanceCreationExpression :: Syntax.ClassInstanceCreationExpression -> Ast.Expr
-writeClassInstanceCreationExpression cice =
-
-      let mqual = Syntax.classInstanceCreationExpressionQualifier cice
-          e = Syntax.classInstanceCreationExpressionExpression cice
-      in (Maybes.maybe (writeUnqualifiedClassInstanceCreationExpression e) (\q -> Serialization.dotSep [
-        writeClassInstanceCreationExpression_Qualifier q,
-        (writeUnqualifiedClassInstanceCreationExpression e)]) mqual)
-writeClassInstanceCreationExpression_Qualifier :: Syntax.ClassInstanceCreationExpression_Qualifier -> Ast.Expr
-writeClassInstanceCreationExpression_Qualifier q =
-    case q of
-      Syntax.ClassInstanceCreationExpression_QualifierExpression v0 -> writeExpressionName v0
-      Syntax.ClassInstanceCreationExpression_QualifierPrimary v0 -> writePrimary v0
-writeClassLiteral :: t0 -> Ast.Expr
-writeClassLiteral _ = Serialization.cst "STUB:ClassLiteral"
-writeClassMemberDeclaration :: Syntax.ClassMemberDeclaration -> Ast.Expr
-writeClassMemberDeclaration d =
-    case d of
-      Syntax.ClassMemberDeclarationField v0 -> writeFieldDeclaration v0
-      Syntax.ClassMemberDeclarationMethod v0 -> writeMethodDeclaration v0
-      Syntax.ClassMemberDeclarationClass v0 -> writeClassDeclaration v0
-      Syntax.ClassMemberDeclarationInterface v0 -> writeInterfaceDeclaration v0
-      Syntax.ClassMemberDeclarationNone -> Serialization.cst ";"
-writeClassModifier :: Syntax.ClassModifier -> Ast.Expr
-writeClassModifier m =
-    case m of
-      Syntax.ClassModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.ClassModifierPublic -> Serialization.cst "public"
-      Syntax.ClassModifierProtected -> Serialization.cst "protected"
-      Syntax.ClassModifierPrivate -> Serialization.cst "private"
-      Syntax.ClassModifierAbstract -> Serialization.cst "abstract"
-      Syntax.ClassModifierStatic -> Serialization.cst "static"
-      Syntax.ClassModifierFinal -> Serialization.cst "final"
-      Syntax.ClassModifierStrictfp -> Serialization.cst "strictfp"
-writeClassOrInterfaceType :: Syntax.ClassOrInterfaceType -> Ast.Expr
-writeClassOrInterfaceType cit =
-    case cit of
-      Syntax.ClassOrInterfaceTypeClass v0 -> writeClassType v0
-      Syntax.ClassOrInterfaceTypeInterface v0 -> writeInterfaceType v0
-writeClassOrInterfaceTypeToInstantiate :: Syntax.ClassOrInterfaceTypeToInstantiate -> Ast.Expr
-writeClassOrInterfaceTypeToInstantiate coitti =
-
-      let ids = Syntax.classOrInterfaceTypeToInstantiateIdentifiers coitti
-          margs = Syntax.classOrInterfaceTypeToInstantiateTypeArguments coitti
-      in (Serialization.noSep (Maybes.cat [
-        Just (Serialization.dotSep (Lists.map writeAnnotatedIdentifier ids)),
-        (Maybes.map writeTypeArgumentsOrDiamond margs)]))
-writeClassType :: Syntax.ClassType -> Ast.Expr
-writeClassType ct =
-
-      let anns = Syntax.classTypeAnnotations ct
-          qual = Syntax.classTypeQualifier ct
-          id = Syntax.classTypeIdentifier ct
-          args = Syntax.classTypeArguments ct
-          qualifiedId =
-                  case qual of
-                    Syntax.ClassTypeQualifierNone -> writeTypeIdentifier id
-                    Syntax.ClassTypeQualifierPackage v0 -> Serialization.dotSep [
-                      writePackageName v0,
-                      (writeTypeIdentifier id)]
-                    Syntax.ClassTypeQualifierParent v0 -> Serialization.dotSep [
-                      writeClassOrInterfaceType v0,
-                      (writeTypeIdentifier id)]
-      in (Serialization.noSep (Maybes.cat [
-        Just (Serialization.spaceSep (Maybes.cat [
-          Logic.ifElse (Lists.null anns) Nothing (Just (Serialization.commaSep Serialization.inlineStyle (Lists.map writeAnnotation anns))),
-          (Just qualifiedId)])),
-        (Logic.ifElse (Lists.null args) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeArgument args))))]))
-writeCompilationUnit :: Syntax.CompilationUnit -> Ast.Expr
-writeCompilationUnit u =
-    case u of
-      Syntax.CompilationUnitOrdinary v0 ->
-        let mpkg = Syntax.ordinaryCompilationUnitPackage v0
-            imports = Syntax.ordinaryCompilationUnitImports v0
-            types = Syntax.ordinaryCompilationUnitTypes v0
-            warning = Just (singleLineComment Constants.warningAutoGeneratedFile)
-            pkgSec = Maybes.map writePackageDeclaration mpkg
-            importsSec =
-                    Logic.ifElse (Lists.null imports) Nothing (Just (Serialization.newlineSep (Lists.map writeImportDeclaration imports)))
-            typesSec =
-                    Logic.ifElse (Lists.null types) Nothing (Just (Serialization.doubleNewlineSep (Lists.map writeTypeDeclarationWithComments types)))
-        in (Serialization.doubleNewlineSep (Maybes.cat [
-          warning,
-          pkgSec,
-          importsSec,
-          typesSec]))
-writeConditionalAndExpression :: Syntax.ConditionalAndExpression -> Ast.Expr
-writeConditionalAndExpression cae =
-    Serialization.infixWsList "&&" (Lists.map writeInclusiveOrExpression (Syntax.unConditionalAndExpression cae))
-writeConditionalExpression :: Syntax.ConditionalExpression -> Ast.Expr
-writeConditionalExpression c =
-    case c of
-      Syntax.ConditionalExpressionSimple v0 -> writeConditionalOrExpression v0
-      Syntax.ConditionalExpressionTernaryCond v0 -> writeConditionalExpression_TernaryCond v0
-      Syntax.ConditionalExpressionTernaryLambda v0 -> writeConditionalExpression_TernaryLambda v0
-writeConditionalExpression_TernaryCond :: t0 -> Ast.Expr
-writeConditionalExpression_TernaryCond _ = Serialization.cst "STUB:ConditionalExpression_TernaryCond"
-writeConditionalExpression_TernaryLambda :: t0 -> Ast.Expr
-writeConditionalExpression_TernaryLambda _ = Serialization.cst "STUB:ConditionalExpression_TernaryLambda"
-writeConditionalOrExpression :: Syntax.ConditionalOrExpression -> Ast.Expr
-writeConditionalOrExpression coe =
-    Serialization.infixWsList "||" (Lists.map writeConditionalAndExpression (Syntax.unConditionalOrExpression coe))
-writeConstantDeclaration :: Syntax.ConstantDeclaration -> Ast.Expr
-writeConstantDeclaration cd =
-
-      let mods = Syntax.constantDeclarationModifiers cd
-          typ = Syntax.constantDeclarationType cd
-          vars = Syntax.constantDeclarationVariables cd
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeConstantModifier mods))),
-        (Just (writeUnannType typ)),
-        (Just (Serialization.commaSep Serialization.inlineStyle (Lists.map writeVariableDeclarator vars)))])))
-writeConstantModifier :: t0 -> Ast.Expr
-writeConstantModifier _ = Serialization.cst "STUB:ConstantModifier"
-writeConstructorBody :: Syntax.ConstructorBody -> Ast.Expr
-writeConstructorBody cb =
-
-      let minvoc = Syntax.constructorBodyInvocation cb
-          stmts = Syntax.constructorBodyStatements cb
-      in (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Maybes.cat [
-        Maybes.map writeExplicitConstructorInvocation minvoc,
-        (Just (Serialization.newlineSep (Lists.map writeBlockStatement stmts)))])))
-writeConstructorDeclaration :: Syntax.ConstructorDeclaration -> Ast.Expr
-writeConstructorDeclaration cd =
-
-      let mods = Syntax.constructorDeclarationModifiers cd
-          cons = Syntax.constructorDeclarationConstructor cd
-          mthrows = Syntax.constructorDeclarationThrows cd
-          body = Syntax.constructorDeclarationBody cd
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeConstructorModifier mods))),
-        (Just (writeConstructorDeclarator cons)),
-        (Maybes.map writeThrows mthrows),
-        (Just (writeConstructorBody body))]))
-writeConstructorDeclarator :: Syntax.ConstructorDeclarator -> Ast.Expr
-writeConstructorDeclarator cd =
-
-      let tparams = Syntax.constructorDeclaratorParameters cd
-          name = Syntax.constructorDeclaratorName cd
-          fparams = Syntax.constructorDeclaratorFormalParameters cd
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null tparams) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeParameter tparams))),
-        (Just (writeSimpleTypeName name)),
-        (Just (Serialization.parenList False (Lists.map writeFormalParameter fparams)))]))
-writeConstructorModifier :: Syntax.ConstructorModifier -> Ast.Expr
-writeConstructorModifier m =
-    case m of
-      Syntax.ConstructorModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.ConstructorModifierPublic -> Serialization.cst "public"
-      Syntax.ConstructorModifierProtected -> Serialization.cst "protected"
-      Syntax.ConstructorModifierPrivate -> Serialization.cst "private"
-writeContinueStatement :: Syntax.ContinueStatement -> Ast.Expr
-writeContinueStatement cs =
-
-      let mlabel = Syntax.unContinueStatement cs
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "continue"),
-        (Maybes.map writeIdentifier mlabel)])))
-writeDims :: Syntax.Dims -> Ast.Expr
-writeDims d = Serialization.noSep (Lists.map (\_ -> Serialization.cst "[]") (Syntax.unDims d))
-writeDoStatement :: t0 -> Ast.Expr
-writeDoStatement _ = Serialization.cst "STUB:DoStatement"
-writeElementValue :: Syntax.ElementValue -> Ast.Expr
-writeElementValue ev =
-    case ev of
-      Syntax.ElementValueConditionalExpression v0 -> writeConditionalExpression v0
-      Syntax.ElementValueElementValueArrayInitializer v0 -> Serialization.commaSep Serialization.inlineStyle (Lists.map writeElementValue (Syntax.unElementValueArrayInitializer v0))
-      Syntax.ElementValueAnnotation v0 -> writeAnnotation v0
-writeElementValuePair :: Syntax.ElementValuePair -> Ast.Expr
-writeElementValuePair evp =
-
-      let k = Syntax.elementValuePairKey evp
-          v = Syntax.elementValuePairValue evp
-      in (Serialization.infixWs "=" (writeIdentifier k) (writeElementValue v))
-writeEnumDeclaration :: t0 -> Ast.Expr
-writeEnumDeclaration _ = Serialization.cst "STUB:EnumDeclaration"
-writeEqualityExpression :: Syntax.EqualityExpression -> Ast.Expr
-writeEqualityExpression e =
-    case e of
-      Syntax.EqualityExpressionUnary v0 -> writeRelationalExpression v0
-      Syntax.EqualityExpressionEqual v0 -> Serialization.infixWs "==" (writeEqualityExpression (Syntax.equalityExpression_BinaryLhs v0)) (writeRelationalExpression (Syntax.equalityExpression_BinaryRhs v0))
-      Syntax.EqualityExpressionNotEqual v0 -> Serialization.infixWs "!=" (writeEqualityExpression (Syntax.equalityExpression_BinaryLhs v0)) (writeRelationalExpression (Syntax.equalityExpression_BinaryRhs v0))
-writeExclusiveOrExpression :: Syntax.ExclusiveOrExpression -> Ast.Expr
-writeExclusiveOrExpression eoe =
-    Serialization.infixWsList "^" (Lists.map writeAndExpression (Syntax.unExclusiveOrExpression eoe))
-writeExplicitConstructorInvocation :: t0 -> Ast.Expr
-writeExplicitConstructorInvocation _ = Serialization.cst "STUB:ExplicitConstructorInvocation"
-writeExpression :: Syntax.Expression -> Ast.Expr
-writeExpression e =
-    case e of
-      Syntax.ExpressionLambda v0 -> writeLambdaExpression v0
-      Syntax.ExpressionAssignment v0 -> writeAssignmentExpression v0
-writeExpressionName :: Syntax.ExpressionName -> Ast.Expr
-writeExpressionName en =
-
-      let mqual = Syntax.expressionNameQualifier en
-          id = Syntax.expressionNameIdentifier en
-      in (Serialization.dotSep (Maybes.cat [
-        Maybes.map writeAmbiguousName mqual,
-        (Just (writeIdentifier id))]))
-writeExpressionStatement :: Syntax.ExpressionStatement -> Ast.Expr
-writeExpressionStatement es = Serialization.withSemi (writeStatementExpression (Syntax.unExpressionStatement es))
-writeFieldAccess :: Syntax.FieldAccess -> Ast.Expr
-writeFieldAccess fa =
-
-      let qual = Syntax.fieldAccessQualifier fa
-          id = Syntax.fieldAccessIdentifier fa
-      in case qual of
-        Syntax.FieldAccess_QualifierPrimary v0 -> Serialization.dotSep [
-          writePrimary v0,
-          (writeIdentifier id)]
-        Syntax.FieldAccess_QualifierSuper -> Serialization.dotSep [
-          Serialization.cst "super",
-          (writeIdentifier id)]
-        Syntax.FieldAccess_QualifierTyped v0 -> Serialization.dotSep [
-          writeTypeName v0,
-          (Serialization.cst "super"),
-          (writeIdentifier id)]
-writeFieldDeclaration :: Syntax.FieldDeclaration -> Ast.Expr
-writeFieldDeclaration fd =
-
-      let mods = Syntax.fieldDeclarationModifiers fd
-          typ = Syntax.fieldDeclarationUnannType fd
-          vars = Syntax.fieldDeclarationVariableDeclarators fd
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeFieldModifier mods))),
-        (Just (writeUnannType typ)),
-        (Just (Serialization.commaSep Serialization.inlineStyle (Lists.map writeVariableDeclarator vars)))])))
-writeFieldModifier :: Syntax.FieldModifier -> Ast.Expr
-writeFieldModifier m =
-    case m of
-      Syntax.FieldModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.FieldModifierPublic -> Serialization.cst "public"
-      Syntax.FieldModifierProtected -> Serialization.cst "protected"
-      Syntax.FieldModifierPrivate -> Serialization.cst "private"
-      Syntax.FieldModifierStatic -> Serialization.cst "static"
-      Syntax.FieldModifierFinal -> Serialization.cst "final"
-      Syntax.FieldModifierTransient -> Serialization.cst "transient"
-      Syntax.FieldModifierVolatile -> Serialization.cst "volatile"
-writeFloatingPointLiteral :: Syntax.FloatingPointLiteral -> Ast.Expr
-writeFloatingPointLiteral fl =
-    Serialization.cst (javaFloatLiteralText (Literals.showBigfloat (Syntax.unFloatingPointLiteral fl)))
-writeFloatingPointType :: Syntax.FloatingPointType -> Ast.Expr
-writeFloatingPointType ft =
-    case ft of
-      Syntax.FloatingPointTypeFloat -> Serialization.cst "float"
-      Syntax.FloatingPointTypeDouble -> Serialization.cst "double"
-writeForStatement :: t0 -> Ast.Expr
-writeForStatement _ = Serialization.cst "STUB:ForStatement"
-writeFormalParameter :: Syntax.FormalParameter -> Ast.Expr
-writeFormalParameter p =
-    case p of
-      Syntax.FormalParameterSimple v0 -> writeFormalParameter_Simple v0
-      Syntax.FormalParameterVariableArity v0 -> writeVariableArityParameter v0
-writeFormalParameter_Simple :: Syntax.FormalParameter_Simple -> Ast.Expr
-writeFormalParameter_Simple fps =
-
-      let mods = Syntax.formalParameter_SimpleModifiers fps
-          typ = Syntax.formalParameter_SimpleType fps
-          id = Syntax.formalParameter_SimpleId fps
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeVariableModifier mods))),
-        (Just (writeUnannType typ)),
-        (Just (writeVariableDeclaratorId id))]))
-writeIdentifier :: Syntax.Identifier -> Ast.Expr
-writeIdentifier id = Serialization.cst (Syntax.unIdentifier id)
-writeIfThenElseStatement :: t0 -> Ast.Expr
-writeIfThenElseStatement _ = Serialization.cst "STUB:IfThenElseStatement"
-writeIfThenStatement :: Syntax.IfThenStatement -> Ast.Expr
-writeIfThenStatement its =
-
-      let cond = Syntax.ifThenStatementExpression its
-          thn = Syntax.ifThenStatementStatement its
-      in (Serialization.spaceSep [
-        Serialization.cst "if",
-        (Serialization.parenList False [
-          writeExpression cond]),
-        (Serialization.curlyBlock Serialization.fullBlockStyle (writeStatement thn))])
-writeImportDeclaration :: Syntax.ImportDeclaration -> Ast.Expr
-writeImportDeclaration imp =
-    case imp of
-      Syntax.ImportDeclarationSingleType v0 -> Serialization.withSemi (Serialization.spaceSep [
-        Serialization.cst "import",
-        (writeTypeName (Syntax.unSingleTypeImportDeclaration v0))])
-      Syntax.ImportDeclarationTypeImportOnDemand _ -> Serialization.cst "STUB:ImportDeclarationTypeImportOnDemand"
-      Syntax.ImportDeclarationSingleStaticImport _ -> Serialization.cst "STUB:ImportDeclarationSingleStaticImport"
-      Syntax.ImportDeclarationStaticImportOnDemand _ -> Serialization.cst "STUB:ImportDeclarationStaticImportOnDemand"
-writeInclusiveOrExpression :: Syntax.InclusiveOrExpression -> Ast.Expr
-writeInclusiveOrExpression ioe =
-    Serialization.infixWsList "|" (Lists.map writeExclusiveOrExpression (Syntax.unInclusiveOrExpression ioe))
-writeInstanceInitializer :: t0 -> Ast.Expr
-writeInstanceInitializer _ = Serialization.cst "STUB:InstanceInitializer"
-writeIntegerLiteral :: Syntax.IntegerLiteral -> Ast.Expr
-writeIntegerLiteral il =
-
-      let i = Syntax.unIntegerLiteral il
-          suffix = Logic.ifElse (Logic.or (Equality.gt i 2147483647) (Equality.lt i (-2147483648))) "L" ""
-      in (Serialization.cst (Strings.cat2 (Literals.showBigint i) suffix))
-writeIntegralType :: Syntax.IntegralType -> Ast.Expr
-writeIntegralType t =
-    case t of
-      Syntax.IntegralTypeByte -> Serialization.cst "byte"
-      Syntax.IntegralTypeShort -> Serialization.cst "short"
-      Syntax.IntegralTypeInt -> Serialization.cst "int"
-      Syntax.IntegralTypeLong -> Serialization.cst "long"
-      Syntax.IntegralTypeChar -> Serialization.cst "char"
-writeInterfaceBody :: Syntax.InterfaceBody -> Ast.Expr
-writeInterfaceBody ib =
-    Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.doubleNewlineSep (Lists.map writeInterfaceMemberDeclaration (Syntax.unInterfaceBody ib)))
-writeInterfaceDeclaration :: Syntax.InterfaceDeclaration -> Ast.Expr
-writeInterfaceDeclaration d =
-    case d of
-      Syntax.InterfaceDeclarationNormalInterface v0 -> writeNormalInterfaceDeclaration v0
-      Syntax.InterfaceDeclarationAnnotationType v0 -> writeAnnotationTypeDeclaration v0
-writeInterfaceMemberDeclaration :: Syntax.InterfaceMemberDeclaration -> Ast.Expr
-writeInterfaceMemberDeclaration d =
-    case d of
-      Syntax.InterfaceMemberDeclarationConstant v0 -> writeConstantDeclaration v0
-      Syntax.InterfaceMemberDeclarationInterfaceMethod v0 -> writeInterfaceMethodDeclaration v0
-      Syntax.InterfaceMemberDeclarationClass v0 -> writeClassDeclaration v0
-      Syntax.InterfaceMemberDeclarationInterface v0 -> writeInterfaceDeclaration v0
-writeInterfaceMethodDeclaration :: Syntax.InterfaceMethodDeclaration -> Ast.Expr
-writeInterfaceMethodDeclaration imd =
-
-      let mods = Syntax.interfaceMethodDeclarationModifiers imd
-          header = Syntax.interfaceMethodDeclarationHeader imd
-          body = Syntax.interfaceMethodDeclarationBody imd
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeInterfaceMethodModifier mods))),
-        (Just (writeMethodHeader header)),
-        (Just (writeMethodBody body))]))
-writeInterfaceMethodModifier :: Syntax.InterfaceMethodModifier -> Ast.Expr
-writeInterfaceMethodModifier m =
-    case m of
-      Syntax.InterfaceMethodModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.InterfaceMethodModifierPublic -> Serialization.cst "public"
-      Syntax.InterfaceMethodModifierPrivate -> Serialization.cst "private"
-      Syntax.InterfaceMethodModifierAbstract -> Serialization.cst "abstract"
-      Syntax.InterfaceMethodModifierDefault -> Serialization.cst "default"
-      Syntax.InterfaceMethodModifierStatic -> Serialization.cst "static"
-      Syntax.InterfaceMethodModifierStrictfp -> Serialization.cst "strictfp"
-writeInterfaceModifier :: Syntax.InterfaceModifier -> Ast.Expr
-writeInterfaceModifier m =
-    case m of
-      Syntax.InterfaceModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.InterfaceModifierPublic -> Serialization.cst "public"
-      Syntax.InterfaceModifierProtected -> Serialization.cst "protected"
-      Syntax.InterfaceModifierPrivate -> Serialization.cst "private"
-      Syntax.InterfaceModifierAbstract -> Serialization.cst "abstract"
-      Syntax.InterfaceModifierStatic -> Serialization.cst "static"
-      Syntax.InterfaceModifierStrictfb -> Serialization.cst "strictfb"
-writeInterfaceType :: Syntax.InterfaceType -> Ast.Expr
-writeInterfaceType it = writeClassType (Syntax.unInterfaceType it)
-writeLabeledStatement :: t0 -> Ast.Expr
-writeLabeledStatement _ = Serialization.cst "STUB:LabeledStatement"
-writeLambdaBody :: Syntax.LambdaBody -> Ast.Expr
-writeLambdaBody b =
-    case b of
-      Syntax.LambdaBodyExpression v0 -> writeExpression v0
-      Syntax.LambdaBodyBlock v0 -> writeBlock v0
-writeLambdaExpression :: Syntax.LambdaExpression -> Ast.Expr
-writeLambdaExpression le =
-
-      let params = Syntax.lambdaExpressionParameters le
-          body = Syntax.lambdaExpressionBody le
-      in (Serialization.infixWs "->" (writeLambdaParameters params) (writeLambdaBody body))
-writeLambdaParameters :: Syntax.LambdaParameters -> Ast.Expr
-writeLambdaParameters p =
-    case p of
-      Syntax.LambdaParametersTuple v0 -> Serialization.parenList False (Lists.map writeLambdaParameters v0)
-      Syntax.LambdaParametersSingle v0 -> writeIdentifier v0
-writeLeftHandSide :: Syntax.LeftHandSide -> Ast.Expr
-writeLeftHandSide lhs =
-    case lhs of
-      Syntax.LeftHandSideExpressionName v0 -> writeExpressionName v0
-      Syntax.LeftHandSideFieldAccess v0 -> writeFieldAccess v0
-      Syntax.LeftHandSideArrayAccess v0 -> writeArrayAccess v0
-writeLiteral :: Syntax.Literal -> Ast.Expr
-writeLiteral l =
-    case l of
-      Syntax.LiteralNull -> Serialization.cst "null"
-      Syntax.LiteralInteger v0 -> writeIntegerLiteral v0
-      Syntax.LiteralFloatingPoint v0 -> writeFloatingPointLiteral v0
-      Syntax.LiteralBoolean v0 -> Serialization.cst (Logic.ifElse v0 "true" "false")
-      Syntax.LiteralCharacter v0 ->
-        let ci = Literals.bigintToInt32 (Literals.uint16ToBigint v0)
-        in (Serialization.cst (Strings.cat2 "'" (Strings.cat2 (Logic.ifElse (Equality.equal ci 39) "\\'" (Logic.ifElse (Equality.equal ci 92) "\\\\" (Logic.ifElse (Equality.equal ci 10) "\\n" (Logic.ifElse (Equality.equal ci 13) "\\r" (Logic.ifElse (Equality.equal ci 9) "\\t" (Logic.ifElse (Logic.and (Equality.gte ci 32) (Equality.lt ci 127)) (Strings.fromList [
-          ci]) (javaUnicodeEscape ci))))))) "'")))
-      Syntax.LiteralString v0 -> writeStringLiteral v0
-writeLocalName :: Syntax.LocalVariableType -> Ast.Expr
-writeLocalName t =
-    case t of
-      Syntax.LocalVariableTypeType v0 -> writeUnannType v0
-      Syntax.LocalVariableTypeVar -> Serialization.cst "var"
-writeLocalVariableDeclaration :: Syntax.LocalVariableDeclaration -> Ast.Expr
-writeLocalVariableDeclaration lvd =
-
-      let mods = Syntax.localVariableDeclarationModifiers lvd
-          t = Syntax.localVariableDeclarationType lvd
-          decls = Syntax.localVariableDeclarationDeclarators lvd
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeVariableModifier mods))),
-        (Just (writeLocalName t)),
-        (Just (Serialization.commaSep Serialization.inlineStyle (Lists.map writeVariableDeclarator decls)))]))
-writeLocalVariableDeclarationStatement :: Syntax.LocalVariableDeclarationStatement -> Ast.Expr
-writeLocalVariableDeclarationStatement lvds =
-    Serialization.withSemi (writeLocalVariableDeclaration (Syntax.unLocalVariableDeclarationStatement lvds))
-writeMarkerAnnotation :: Syntax.MarkerAnnotation -> Ast.Expr
-writeMarkerAnnotation ma = Serialization.prefix "@" (writeTypeName (Syntax.unMarkerAnnotation ma))
-writeMethodBody :: Syntax.MethodBody -> Ast.Expr
-writeMethodBody b =
-    case b of
-      Syntax.MethodBodyBlock v0 -> writeBlock v0
-      Syntax.MethodBodyNone -> Serialization.cst ";"
-writeMethodDeclaration :: Syntax.MethodDeclaration -> Ast.Expr
-writeMethodDeclaration md =
-
-      let anns = Syntax.methodDeclarationAnnotations md
-          mods = Syntax.methodDeclarationModifiers md
-          header = Syntax.methodDeclarationHeader md
-          body = Syntax.methodDeclarationBody md
-          headerAndBody =
-                  Serialization.spaceSep (Maybes.cat [
-                    Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeMethodModifier mods))),
-                    (Just (writeMethodHeader header)),
-                    (Just (writeMethodBody body))])
-      in (Serialization.newlineSep (Maybes.cat [
-        Logic.ifElse (Lists.null anns) Nothing (Just (Serialization.newlineSep (Lists.map writeAnnotation anns))),
-        (Just headerAndBody)]))
-writeMethodDeclarator :: Syntax.MethodDeclarator -> Ast.Expr
-writeMethodDeclarator md =
-
-      let id = Syntax.methodDeclaratorIdentifier md
-          params = Syntax.methodDeclaratorFormalParameters md
-      in (Serialization.noSep [
-        writeIdentifier id,
-        (Serialization.parenList False (Lists.map writeFormalParameter params))])
-writeMethodHeader :: Syntax.MethodHeader -> Ast.Expr
-writeMethodHeader mh =
-
-      let params = Syntax.methodHeaderParameters mh
-          result = Syntax.methodHeaderResult mh
-          decl = Syntax.methodHeaderDeclarator mh
-          mthrows = Syntax.methodHeaderThrows mh
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null params) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeParameter params))),
-        (Just (writeResult result)),
-        (Just (writeMethodDeclarator decl)),
-        (Maybes.map writeThrows mthrows)]))
-writeMethodInvocation :: Syntax.MethodInvocation -> Ast.Expr
-writeMethodInvocation mi =
-
-      let header = Syntax.methodInvocationHeader mi
-          args = Syntax.methodInvocationArguments mi
-          argSec = Serialization.parenList True (Lists.map writeExpression args)
-          headerSec =
-                  case header of
-                    Syntax.MethodInvocation_HeaderSimple v0 -> writeMethodName v0
-                    Syntax.MethodInvocation_HeaderComplex v0 ->
-                      let cvar = Syntax.methodInvocation_ComplexVariant v0
-                          targs = Syntax.methodInvocation_ComplexTypeArguments v0
-                          cid = Syntax.methodInvocation_ComplexIdentifier v0
-                          idSec =
-                                  Serialization.noSep (Maybes.cat [
-                                    Logic.ifElse (Lists.null targs) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeArgument targs))),
-                                    (Just (writeIdentifier cid))])
-                      in case cvar of
-                        Syntax.MethodInvocation_VariantType v1 -> Serialization.dotSep [
-                          writeTypeName v1,
-                          idSec]
-                        Syntax.MethodInvocation_VariantExpression v1 -> Serialization.dotSep [
-                          writeExpressionName v1,
-                          idSec]
-                        Syntax.MethodInvocation_VariantPrimary v1 -> Serialization.dotSep [
-                          writePrimary v1,
-                          idSec]
-                        Syntax.MethodInvocation_VariantSuper -> Serialization.dotSep [
-                          Serialization.cst "super",
-                          idSec]
-                        Syntax.MethodInvocation_VariantTypeSuper v1 -> Serialization.dotSep [
-                          writeTypeName v1,
-                          (Serialization.cst "super"),
-                          idSec]
-      in (Serialization.noSep [
-        headerSec,
-        argSec])
-writeMethodModifier :: Syntax.MethodModifier -> Ast.Expr
-writeMethodModifier m =
-    case m of
-      Syntax.MethodModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.MethodModifierPublic -> Serialization.cst "public"
-      Syntax.MethodModifierProtected -> Serialization.cst "protected"
-      Syntax.MethodModifierPrivate -> Serialization.cst "private"
-      Syntax.MethodModifierAbstract -> Serialization.cst "abstract"
-      Syntax.MethodModifierFinal -> Serialization.cst "final"
-      Syntax.MethodModifierSynchronized -> Serialization.cst "synchronized"
-      Syntax.MethodModifierNative -> Serialization.cst "native"
-      Syntax.MethodModifierStrictfb -> Serialization.cst "strictfb"
-writeMethodName :: Syntax.MethodName -> Ast.Expr
-writeMethodName mn = writeIdentifier (Syntax.unMethodName mn)
-writeMethodReference :: t0 -> Ast.Expr
-writeMethodReference _ = Serialization.cst "STUB:MethodReference"
-writeMultiplicativeExpression :: Syntax.MultiplicativeExpression -> Ast.Expr
-writeMultiplicativeExpression e =
-    case e of
-      Syntax.MultiplicativeExpressionUnary v0 -> writeUnaryExpression v0
-      Syntax.MultiplicativeExpressionTimes v0 -> Serialization.infixWs "*" (writeMultiplicativeExpression (Syntax.multiplicativeExpression_BinaryLhs v0)) (writeUnaryExpression (Syntax.multiplicativeExpression_BinaryRhs v0))
-      Syntax.MultiplicativeExpressionDivide v0 -> Serialization.infixWs "/" (writeMultiplicativeExpression (Syntax.multiplicativeExpression_BinaryLhs v0)) (writeUnaryExpression (Syntax.multiplicativeExpression_BinaryRhs v0))
-      Syntax.MultiplicativeExpressionMod v0 -> Serialization.infixWs "%" (writeMultiplicativeExpression (Syntax.multiplicativeExpression_BinaryLhs v0)) (writeUnaryExpression (Syntax.multiplicativeExpression_BinaryRhs v0))
-writeNormalAnnotation :: Syntax.NormalAnnotation -> Ast.Expr
-writeNormalAnnotation na =
-
-      let tname = Syntax.normalAnnotationTypeName na
-          pairs = Syntax.normalAnnotationPairs na
-      in (Serialization.prefix "@" (Serialization.noSep [
-        writeTypeName tname,
-        (Serialization.commaSep Serialization.inlineStyle (Lists.map writeElementValuePair pairs))]))
-writeNormalClassDeclaration :: Syntax.NormalClassDeclaration -> Ast.Expr
-writeNormalClassDeclaration ncd =
-
-      let mods = Syntax.normalClassDeclarationModifiers ncd
-          id = Syntax.normalClassDeclarationIdentifier ncd
-          tparams = Syntax.normalClassDeclarationParameters ncd
-          msuperc = Syntax.normalClassDeclarationExtends ncd
-          superi = Syntax.normalClassDeclarationImplements ncd
-          body = Syntax.normalClassDeclarationBody ncd
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeClassModifier mods))),
-        (Just (Serialization.cst "class")),
-        (Just (Serialization.noSep (Maybes.cat [
-          Just (writeTypeIdentifier id),
-          (Logic.ifElse (Lists.null tparams) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeParameter tparams))))]))),
-        (Maybes.map (\c -> Serialization.spaceSep [
-          Serialization.cst "extends",
-          (writeClassType c)]) msuperc),
-        (Logic.ifElse (Lists.null superi) Nothing (Just (Serialization.spaceSep [
-          Serialization.cst "implements",
-          (Serialization.commaSep Serialization.inlineStyle (Lists.map writeInterfaceType superi))]))),
-        (Just (writeClassBody body))]))
-writeNormalInterfaceDeclaration :: Syntax.NormalInterfaceDeclaration -> Ast.Expr
-writeNormalInterfaceDeclaration nid =
-
-      let mods = Syntax.normalInterfaceDeclarationModifiers nid
-          id = Syntax.normalInterfaceDeclarationIdentifier nid
-          tparams = Syntax.normalInterfaceDeclarationParameters nid
-          extends = Syntax.normalInterfaceDeclarationExtends nid
-          body = Syntax.normalInterfaceDeclarationBody nid
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeInterfaceModifier mods))),
-        (Just (Serialization.cst "interface")),
-        (Just (Serialization.noSep (Maybes.cat [
-          Just (writeTypeIdentifier id),
-          (Logic.ifElse (Lists.null tparams) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeParameter tparams))))]))),
-        (Logic.ifElse (Lists.null extends) Nothing (Just (Serialization.spaceSep [
-          Serialization.cst "extends",
-          (Serialization.commaSep Serialization.inlineStyle (Lists.map writeInterfaceType extends))]))),
-        (Just (writeInterfaceBody body))]))
-writeNumericType :: Syntax.NumericType -> Ast.Expr
-writeNumericType nt =
-    case nt of
-      Syntax.NumericTypeIntegral v0 -> writeIntegralType v0
-      Syntax.NumericTypeFloatingPoint v0 -> writeFloatingPointType v0
-writePackageDeclaration :: Syntax.PackageDeclaration -> Ast.Expr
-writePackageDeclaration pd =
-
-      let mods = Syntax.packageDeclarationModifiers pd
-          ids = Syntax.packageDeclarationIdentifiers pd
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writePackageModifier mods))),
-        (Just (Serialization.spaceSep [
-          Serialization.cst "package",
-          (Serialization.cst (Strings.intercalate "." (Lists.map (\id -> Syntax.unIdentifier id) ids)))]))])))
-writePackageModifier :: Syntax.PackageModifier -> Ast.Expr
-writePackageModifier pm = writeAnnotation (Syntax.unPackageModifier pm)
-writePackageName :: Syntax.PackageName -> Ast.Expr
-writePackageName pn = Serialization.dotSep (Lists.map writeIdentifier (Syntax.unPackageName pn))
-writePackageOrTypeName :: Syntax.PackageOrTypeName -> Ast.Expr
-writePackageOrTypeName potn = Serialization.dotSep (Lists.map writeIdentifier (Syntax.unPackageOrTypeName potn))
-writePostDecrementExpression :: t0 -> Ast.Expr
-writePostDecrementExpression _ = Serialization.cst "STUB:PostDecrementExpression"
-writePostIncrementExpression :: t0 -> Ast.Expr
-writePostIncrementExpression _ = Serialization.cst "STUB:PostIncrementExpression"
-writePostfixExpression :: Syntax.PostfixExpression -> Ast.Expr
-writePostfixExpression e =
-    case e of
-      Syntax.PostfixExpressionPrimary v0 -> writePrimary v0
-      Syntax.PostfixExpressionName v0 -> writeExpressionName v0
-      Syntax.PostfixExpressionPostIncrement v0 -> writePostIncrementExpression v0
-      Syntax.PostfixExpressionPostDecrement v0 -> writePostDecrementExpression v0
-writePreDecrementExpression :: t0 -> Ast.Expr
-writePreDecrementExpression _ = Serialization.cst "STUB:PreDecrementExpression"
-writePreIncrementExpression :: t0 -> Ast.Expr
-writePreIncrementExpression _ = Serialization.cst "STUB:PreIncrementExpression"
-writePrimary :: Syntax.Primary -> Ast.Expr
-writePrimary p =
-    case p of
-      Syntax.PrimaryNoNewArray v0 -> writePrimaryNoNewArrayExpressionExpression v0
-      Syntax.PrimaryArrayCreation v0 -> writeArrayCreationExpression v0
-writePrimaryNoNewArrayExpressionExpression :: Syntax.PrimaryNoNewArrayExpression -> Ast.Expr
-writePrimaryNoNewArrayExpressionExpression p =
-    case p of
-      Syntax.PrimaryNoNewArrayExpressionLiteral v0 -> writeLiteral v0
-      Syntax.PrimaryNoNewArrayExpressionClassLiteral v0 -> writeClassLiteral v0
-      Syntax.PrimaryNoNewArrayExpressionThis -> Serialization.cst "this"
-      Syntax.PrimaryNoNewArrayExpressionDotThis v0 -> Serialization.dotSep [
-        writeTypeName v0,
-        (Serialization.cst "this")]
-      Syntax.PrimaryNoNewArrayExpressionParens v0 -> Serialization.parenList False [
-        writeExpression v0]
-      Syntax.PrimaryNoNewArrayExpressionClassInstance v0 -> writeClassInstanceCreationExpression v0
-      Syntax.PrimaryNoNewArrayExpressionFieldAccess v0 -> writeFieldAccess v0
-      Syntax.PrimaryNoNewArrayExpressionArrayAccess v0 -> writeArrayAccess v0
-      Syntax.PrimaryNoNewArrayExpressionMethodInvocation v0 -> writeMethodInvocation v0
-      Syntax.PrimaryNoNewArrayExpressionMethodReference v0 -> writeMethodReference v0
-writePrimitiveType :: Syntax.PrimitiveType -> Ast.Expr
-writePrimitiveType pt =
-    case pt of
-      Syntax.PrimitiveTypeNumeric v0 -> writeNumericType v0
-      Syntax.PrimitiveTypeBoolean -> Serialization.cst "boolean"
-writePrimitiveTypeWithAnnotations :: Syntax.PrimitiveTypeWithAnnotations -> Ast.Expr
-writePrimitiveTypeWithAnnotations ptwa =
-
-      let pt = Syntax.primitiveTypeWithAnnotationsType ptwa
-          anns = Syntax.primitiveTypeWithAnnotationsAnnotations ptwa
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null anns) Nothing (Just (Serialization.spaceSep (Lists.map writeAnnotation anns))),
-        (Just (writePrimitiveType pt))]))
-writeReceiverParameter :: t0 -> Ast.Expr
-writeReceiverParameter _ = Serialization.cst "STUB:ReceiverParameter"
-writeReferenceType :: Syntax.ReferenceType -> Ast.Expr
-writeReferenceType rt =
-    case rt of
-      Syntax.ReferenceTypeClassOrInterface v0 -> writeClassOrInterfaceType v0
-      Syntax.ReferenceTypeVariable v0 -> writeTypeVariable v0
-      Syntax.ReferenceTypeArray v0 -> writeArrayType v0
-writeRelationalExpression :: Syntax.RelationalExpression -> Ast.Expr
-writeRelationalExpression e =
-    case e of
-      Syntax.RelationalExpressionSimple v0 -> writeShiftExpression v0
-      Syntax.RelationalExpressionLessThan v0 -> writeRelationalExpression_LessThan v0
-      Syntax.RelationalExpressionGreaterThan v0 -> writeRelationalExpression_GreaterThan v0
-      Syntax.RelationalExpressionLessThanEqual v0 -> writeRelationalExpression_LessThanEqual v0
-      Syntax.RelationalExpressionGreaterThanEqual v0 -> writeRelationalExpression_GreaterThanEqual v0
-      Syntax.RelationalExpressionInstanceof v0 -> writeRelationalExpression_InstanceOf v0
-writeRelationalExpression_GreaterThan :: Syntax.RelationalExpression_GreaterThan -> Ast.Expr
-writeRelationalExpression_GreaterThan gt =
-    Serialization.infixWs ">" (writeRelationalExpression (Syntax.relationalExpression_GreaterThanLhs gt)) (writeShiftExpression (Syntax.relationalExpression_GreaterThanRhs gt))
-writeRelationalExpression_GreaterThanEqual :: Syntax.RelationalExpression_GreaterThanEqual -> Ast.Expr
-writeRelationalExpression_GreaterThanEqual gte =
-    Serialization.infixWs ">=" (writeRelationalExpression (Syntax.relationalExpression_GreaterThanEqualLhs gte)) (writeShiftExpression (Syntax.relationalExpression_GreaterThanEqualRhs gte))
-writeRelationalExpression_InstanceOf :: Syntax.RelationalExpression_InstanceOf -> Ast.Expr
-writeRelationalExpression_InstanceOf io =
-    Serialization.infixWs "instanceof" (writeRelationalExpression (Syntax.relationalExpression_InstanceOfLhs io)) (writeReferenceType (Syntax.relationalExpression_InstanceOfRhs io))
-writeRelationalExpression_LessThan :: Syntax.RelationalExpression_LessThan -> Ast.Expr
-writeRelationalExpression_LessThan lt =
-    Serialization.infixWs "<" (writeRelationalExpression (Syntax.relationalExpression_LessThanLhs lt)) (writeShiftExpression (Syntax.relationalExpression_LessThanRhs lt))
-writeRelationalExpression_LessThanEqual :: Syntax.RelationalExpression_LessThanEqual -> Ast.Expr
-writeRelationalExpression_LessThanEqual lte =
-    Serialization.infixWs "<=" (writeRelationalExpression (Syntax.relationalExpression_LessThanEqualLhs lte)) (writeShiftExpression (Syntax.relationalExpression_LessThanEqualRhs lte))
-writeResult :: Syntax.Result -> Ast.Expr
-writeResult r =
-    case r of
-      Syntax.ResultType v0 -> writeUnannType v0
-      Syntax.ResultVoid -> Serialization.cst "void"
-writeReturnStatement :: Syntax.ReturnStatement -> Ast.Expr
-writeReturnStatement rs =
-
-      let mex = Syntax.unReturnStatement rs
-      in (Serialization.withSemi (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "return"),
-        (Maybes.map writeExpression mex)])))
-writeShiftExpression :: Syntax.ShiftExpression -> Ast.Expr
-writeShiftExpression e =
-    case e of
-      Syntax.ShiftExpressionUnary v0 -> writeAdditiveExpression v0
-      Syntax.ShiftExpressionShiftLeft v0 -> Serialization.infixWs "<<" (writeShiftExpression (Syntax.shiftExpression_BinaryLhs v0)) (writeAdditiveExpression (Syntax.shiftExpression_BinaryRhs v0))
-      Syntax.ShiftExpressionShiftRight v0 -> Serialization.infixWs ">>" (writeShiftExpression (Syntax.shiftExpression_BinaryLhs v0)) (writeAdditiveExpression (Syntax.shiftExpression_BinaryRhs v0))
-      Syntax.ShiftExpressionShiftRightZeroFill v0 -> Serialization.infixWs ">>>" (writeShiftExpression (Syntax.shiftExpression_BinaryLhs v0)) (writeAdditiveExpression (Syntax.shiftExpression_BinaryRhs v0))
-writeSimpleTypeName :: Syntax.SimpleTypeName -> Ast.Expr
-writeSimpleTypeName stn = writeTypeIdentifier (Syntax.unSimpleTypeName stn)
-writeSingleElementAnnotation :: Syntax.SingleElementAnnotation -> Ast.Expr
-writeSingleElementAnnotation sea =
-
-      let tname = Syntax.singleElementAnnotationName sea
-          mv = Syntax.singleElementAnnotationValue sea
-      in (Maybes.maybe (writeMarkerAnnotation (Syntax.MarkerAnnotation tname)) (\v -> Serialization.prefix "@" (Serialization.noSep [
-        writeTypeName tname,
-        (Serialization.parenList False [
-          writeElementValue v])])) mv)
-writeStatement :: Syntax.Statement -> Ast.Expr
-writeStatement s =
-    case s of
-      Syntax.StatementWithoutTrailing v0 -> writeStatementWithoutTrailingSubstatement v0
-      Syntax.StatementLabeled v0 -> writeLabeledStatement v0
-      Syntax.StatementIfThen v0 -> writeIfThenStatement v0
-      Syntax.StatementIfThenElse v0 -> writeIfThenElseStatement v0
-      Syntax.StatementWhile v0 -> writeWhileStatement v0
-      Syntax.StatementFor v0 -> writeForStatement v0
-writeStatementExpression :: Syntax.StatementExpression -> Ast.Expr
-writeStatementExpression e =
-    case e of
-      Syntax.StatementExpressionAssignment v0 -> writeAssignment v0
-      Syntax.StatementExpressionPreIncrement v0 -> writePreIncrementExpression v0
-      Syntax.StatementExpressionPreDecrement v0 -> writePreDecrementExpression v0
-      Syntax.StatementExpressionPostIncrement v0 -> writePostIncrementExpression v0
-      Syntax.StatementExpressionPostDecrement v0 -> writePostDecrementExpression v0
-      Syntax.StatementExpressionMethodInvocation v0 -> writeMethodInvocation v0
-      Syntax.StatementExpressionClassInstanceCreation v0 -> writeClassInstanceCreationExpression v0
-writeStatementWithoutTrailingSubstatement :: Syntax.StatementWithoutTrailingSubstatement -> Ast.Expr
-writeStatementWithoutTrailingSubstatement s =
-    case s of
-      Syntax.StatementWithoutTrailingSubstatementBlock v0 -> writeBlock v0
-      Syntax.StatementWithoutTrailingSubstatementEmpty -> Serialization.cst ";"
-      Syntax.StatementWithoutTrailingSubstatementExpression v0 -> writeExpressionStatement v0
-      Syntax.StatementWithoutTrailingSubstatementAssert v0 -> writeAssertStatement v0
-      Syntax.StatementWithoutTrailingSubstatementSwitch v0 -> writeSwitchStatement v0
-      Syntax.StatementWithoutTrailingSubstatementDo v0 -> writeDoStatement v0
-      Syntax.StatementWithoutTrailingSubstatementBreak v0 -> writeBreakStatement v0
-      Syntax.StatementWithoutTrailingSubstatementContinue v0 -> writeContinueStatement v0
-      Syntax.StatementWithoutTrailingSubstatementReturn v0 -> writeReturnStatement v0
-      Syntax.StatementWithoutTrailingSubstatementSynchronized v0 -> writeSynchronizedStatement v0
-      Syntax.StatementWithoutTrailingSubstatementThrow v0 -> writeThrowStatement v0
-      Syntax.StatementWithoutTrailingSubstatementTry v0 -> writeTryStatement v0
-writeStaticInitializer :: t0 -> Ast.Expr
-writeStaticInitializer _ = Serialization.cst "STUB:StaticInitializer"
--- | Serialize a Java string literal with proper Unicode escaping.
-writeStringLiteral :: Syntax.StringLiteral -> Ast.Expr
-writeStringLiteral sl =
-
-      let s = Syntax.unStringLiteral sl
-      in (Serialization.cst (Strings.cat2 "\"" (Strings.cat2 (escapeJavaString s) "\"")))
-writeSwitchStatement :: t0 -> Ast.Expr
-writeSwitchStatement _ = Serialization.cst "STUB:SwitchStatement"
-writeSynchronizedStatement :: t0 -> Ast.Expr
-writeSynchronizedStatement _ = Serialization.cst "STUB:SynchronizedStatement"
-writeThrowStatement :: Syntax.ThrowStatement -> Ast.Expr
-writeThrowStatement ts =
-    Serialization.withSemi (Serialization.spaceSep [
-      Serialization.cst "throw",
-      (writeExpression (Syntax.unThrowStatement ts))])
-writeThrows :: t0 -> Ast.Expr
-writeThrows _ = Serialization.cst "STUB:Throws"
-writeTryStatement :: t0 -> Ast.Expr
-writeTryStatement _ = Serialization.cst "STUB:TryStatement"
-writeType :: Syntax.Type -> Ast.Expr
-writeType t =
-    case t of
-      Syntax.TypePrimitive v0 -> writePrimitiveTypeWithAnnotations v0
-      Syntax.TypeReference v0 -> writeReferenceType v0
-writeTypeArgument :: Syntax.TypeArgument -> Ast.Expr
-writeTypeArgument a =
-    case a of
-      Syntax.TypeArgumentReference v0 -> writeReferenceType v0
-      Syntax.TypeArgumentWildcard v0 -> writeWildcard v0
-writeTypeArgumentsOrDiamond :: Syntax.TypeArgumentsOrDiamond -> Ast.Expr
-writeTypeArgumentsOrDiamond targs =
-    case targs of
-      Syntax.TypeArgumentsOrDiamondArguments v0 -> Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeArgument v0)
-      Syntax.TypeArgumentsOrDiamondDiamond -> Serialization.cst "<>"
-writeTypeBound :: Syntax.TypeBound -> Ast.Expr
-writeTypeBound b =
-    case b of
-      Syntax.TypeBoundVariable v0 -> writeTypeVariable v0
-      Syntax.TypeBoundClassOrInterface v0 ->
-        let cit = Syntax.typeBound_ClassOrInterfaceType v0
-            additional = Syntax.typeBound_ClassOrInterfaceAdditional v0
-        in (Logic.ifElse (Lists.null additional) (writeClassOrInterfaceType cit) (Serialization.spaceSep (Lists.cons (writeClassOrInterfaceType cit) (Lists.map writeAdditionalBound additional))))
-writeTypeDeclaration :: Syntax.TypeDeclaration -> Ast.Expr
-writeTypeDeclaration d =
-    case d of
-      Syntax.TypeDeclarationClass v0 -> writeClassDeclaration v0
-      Syntax.TypeDeclarationInterface v0 -> writeInterfaceDeclaration v0
-      Syntax.TypeDeclarationNone -> Serialization.cst ";"
-writeTypeDeclarationWithComments :: Syntax.TypeDeclarationWithComments -> Ast.Expr
-writeTypeDeclarationWithComments tdwc =
-
-      let d = Syntax.typeDeclarationWithCommentsValue tdwc
-          mc = Syntax.typeDeclarationWithCommentsComments tdwc
-      in (withComments mc (writeTypeDeclaration d))
-writeTypeIdentifier :: Syntax.TypeIdentifier -> Ast.Expr
-writeTypeIdentifier tid = writeIdentifier (Syntax.unTypeIdentifier tid)
-writeTypeName :: Syntax.TypeName -> Ast.Expr
-writeTypeName tn =
-
-      let id = Syntax.typeNameIdentifier tn
-          mqual = Syntax.typeNameQualifier tn
-      in (Serialization.dotSep (Maybes.cat [
-        Maybes.map writePackageOrTypeName mqual,
-        (Just (writeTypeIdentifier id))]))
-writeTypeParameter :: Syntax.TypeParameter -> Ast.Expr
-writeTypeParameter tp =
-
-      let mods = Syntax.typeParameterModifiers tp
-          id = Syntax.typeParameterIdentifier tp
-          bound = Syntax.typeParameterBound tp
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null mods) Nothing (Just (Serialization.spaceSep (Lists.map writeTypeParameterModifier mods))),
-        (Just (writeTypeIdentifier id)),
-        (Maybes.map (\b -> Serialization.spaceSep [
-          Serialization.cst "extends",
-          (writeTypeBound b)]) bound)]))
-writeTypeParameterModifier :: Syntax.TypeParameterModifier -> Ast.Expr
-writeTypeParameterModifier tpm = writeAnnotation (Syntax.unTypeParameterModifier tpm)
-writeTypeVariable :: Syntax.TypeVariable -> Ast.Expr
-writeTypeVariable tv =
-
-      let anns = Syntax.typeVariableAnnotations tv
-          id = Syntax.typeVariableIdentifier tv
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null anns) Nothing (Just (Serialization.spaceSep (Lists.map writeAnnotation anns))),
-        (Just (writeTypeIdentifier id))]))
-writeUnannType :: Syntax.UnannType -> Ast.Expr
-writeUnannType ut = writeType (Syntax.unUnannType ut)
-writeUnaryExpression :: Syntax.UnaryExpression -> Ast.Expr
-writeUnaryExpression e =
-    case e of
-      Syntax.UnaryExpressionPreIncrement v0 -> writePreIncrementExpression v0
-      Syntax.UnaryExpressionPreDecrement v0 -> writePreDecrementExpression v0
-      Syntax.UnaryExpressionPlus v0 -> Serialization.spaceSep [
-        Serialization.cst "+",
-        (writeUnaryExpression v0)]
-      Syntax.UnaryExpressionMinus v0 -> Serialization.spaceSep [
-        Serialization.cst "-",
-        (writeUnaryExpression v0)]
-      Syntax.UnaryExpressionOther v0 -> writeUnaryExpressionNotPlusMinus v0
-writeUnaryExpressionNotPlusMinus :: Syntax.UnaryExpressionNotPlusMinus -> Ast.Expr
-writeUnaryExpressionNotPlusMinus e =
-    case e of
-      Syntax.UnaryExpressionNotPlusMinusPostfix v0 -> writePostfixExpression v0
-      Syntax.UnaryExpressionNotPlusMinusTilde v0 -> Serialization.spaceSep [
-        Serialization.cst "~",
-        (writeUnaryExpression v0)]
-      Syntax.UnaryExpressionNotPlusMinusNot v0 -> Serialization.noSep [
-        Serialization.cst "!",
-        (writeUnaryExpression v0)]
-      Syntax.UnaryExpressionNotPlusMinusCast v0 -> writeCastExpression v0
-writeUnqualifiedClassInstanceCreationExpression :: Syntax.UnqualifiedClassInstanceCreationExpression -> Ast.Expr
-writeUnqualifiedClassInstanceCreationExpression ucice =
-
-      let targs = Syntax.unqualifiedClassInstanceCreationExpressionTypeArguments ucice
-          cit = Syntax.unqualifiedClassInstanceCreationExpressionClassOrInterface ucice
-          args = Syntax.unqualifiedClassInstanceCreationExpressionArguments ucice
-          mbody = Syntax.unqualifiedClassInstanceCreationExpressionBody ucice
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "new"),
-        (Logic.ifElse (Lists.null targs) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map writeTypeArgument targs)))),
-        (Just (Serialization.noSep [
-          writeClassOrInterfaceTypeToInstantiate cit,
-          (Serialization.parenList False (Lists.map writeExpression args))])),
-        (Maybes.map writeClassBody mbody)]))
-writeVariableArityParameter :: t0 -> Ast.Expr
-writeVariableArityParameter _ = Serialization.cst "STUB:VariableArityParameter"
-writeVariableDeclarator :: Syntax.VariableDeclarator -> Ast.Expr
-writeVariableDeclarator vd =
-
-      let id = Syntax.variableDeclaratorId vd
-          minit = Syntax.variableDeclaratorInitializer vd
-          idSec = writeVariableDeclaratorId id
-      in (Maybes.maybe idSec (\init -> Serialization.infixWs "=" idSec (writeVariableInitializer init)) minit)
-writeVariableDeclaratorId :: Syntax.VariableDeclaratorId -> Ast.Expr
-writeVariableDeclaratorId vdi =
-
-      let id = Syntax.variableDeclaratorIdIdentifier vdi
-          mdims = Syntax.variableDeclaratorIdDims vdi
-      in (Serialization.noSep (Maybes.cat [
-        Just (writeIdentifier id),
-        (Maybes.map writeDims mdims)]))
-writeVariableInitializer :: Syntax.VariableInitializer -> Ast.Expr
-writeVariableInitializer i =
-    case i of
-      Syntax.VariableInitializerExpression v0 -> writeExpression v0
-      Syntax.VariableInitializerArrayInitializer v0 -> writeArrayInitializer v0
-writeVariableModifier :: Syntax.VariableModifier -> Ast.Expr
-writeVariableModifier m =
-    case m of
-      Syntax.VariableModifierAnnotation v0 -> writeAnnotation v0
-      Syntax.VariableModifierFinal -> Serialization.cst "final"
-writeWhileStatement :: Syntax.WhileStatement -> Ast.Expr
-writeWhileStatement ws =
-
-      let mcond = Syntax.whileStatementCond ws
-          body = Syntax.whileStatementBody ws
-          condSer = Maybes.maybe (Serialization.cst "true") (\c -> writeExpression c) mcond
-      in (Serialization.spaceSep [
-        Serialization.cst "while",
-        (Serialization.parenList False [
-          condSer]),
-        (Serialization.curlyBlock Serialization.fullBlockStyle (writeStatement body))])
-writeWildcard :: Syntax.Wildcard -> Ast.Expr
-writeWildcard w =
-
-      let anns = Syntax.wildcardAnnotations w
-          mbounds = Syntax.wildcardWildcard w
-      in (Serialization.spaceSep (Maybes.cat [
-        Logic.ifElse (Lists.null anns) Nothing (Just (Serialization.commaSep Serialization.inlineStyle (Lists.map writeAnnotation anns))),
-        (Just (Serialization.cst "*")),
-        (Maybes.map writeWildcardBounds mbounds)]))
-writeWildcardBounds :: Syntax.WildcardBounds -> Ast.Expr
-writeWildcardBounds b =
-    case b of
-      Syntax.WildcardBoundsExtends v0 -> Serialization.spaceSep [
-        Serialization.cst "extends",
-        (writeReferenceType v0)]
-      Syntax.WildcardBoundsSuper v0 -> Serialization.spaceSep [
-        Serialization.cst "super",
-        (writeReferenceType v0)]
diff --git a/src/main/haskell/Hydra/Java/Syntax.hs b/src/main/haskell/Hydra/Java/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Syntax.hs
+++ /dev/null
@@ -1,2175 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A Java syntax module. Based on the Oracle Java SE 12 BNF:
--- |   https://docs.oracle.com/javase/specs/jls/se12/html/jls-19.html
--- | Note: all *WithComments types were added manually, rather than derived from the BNF, which does not allow for comments.
-
-module Hydra.Java.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
-newtype Identifier =
-  Identifier {
-    unIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-_Identifier = Core.Name "hydra.java.syntax.Identifier"
-newtype TypeIdentifier =
-  TypeIdentifier {
-    unTypeIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_TypeIdentifier = Core.Name "hydra.java.syntax.TypeIdentifier"
-data Literal =
-  LiteralNull |
-  LiteralInteger IntegerLiteral |
-  LiteralFloatingPoint FloatingPointLiteral |
-  LiteralBoolean Bool |
-  LiteralCharacter Int |
-  LiteralString StringLiteral
-  deriving (Eq, Ord, Read, Show)
-_Literal = Core.Name "hydra.java.syntax.Literal"
-_Literal_null = Core.Name "null"
-_Literal_integer = Core.Name "integer"
-_Literal_floatingPoint = Core.Name "floatingPoint"
-_Literal_boolean = Core.Name "boolean"
-_Literal_character = Core.Name "character"
-_Literal_string = Core.Name "string"
--- | Note: this is an approximation which ignores encoding
-newtype IntegerLiteral =
-  IntegerLiteral {
-    unIntegerLiteral :: Integer}
-  deriving (Eq, Ord, Read, Show)
-_IntegerLiteral = Core.Name "hydra.java.syntax.IntegerLiteral"
--- | Note: this is an approximation which ignores encoding
-newtype FloatingPointLiteral =
-  FloatingPointLiteral {
-    unFloatingPointLiteral :: Double}
-  deriving (Eq, Ord, Read, Show)
-_FloatingPointLiteral = Core.Name "hydra.java.syntax.FloatingPointLiteral"
--- | Note: this is an approximation which ignores encoding
-newtype StringLiteral =
-  StringLiteral {
-    unStringLiteral :: String}
-  deriving (Eq, Ord, Read, Show)
-_StringLiteral = Core.Name "hydra.java.syntax.StringLiteral"
-data Type =
-  TypePrimitive PrimitiveTypeWithAnnotations |
-  TypeReference ReferenceType
-  deriving (Eq, Ord, Read, Show)
-_Type = Core.Name "hydra.java.syntax.Type"
-_Type_primitive = Core.Name "primitive"
-_Type_reference = Core.Name "reference"
-data PrimitiveTypeWithAnnotations =
-  PrimitiveTypeWithAnnotations {
-    primitiveTypeWithAnnotationsType :: PrimitiveType,
-    primitiveTypeWithAnnotationsAnnotations :: [Annotation]}
-  deriving (Eq, Ord, Read, Show)
-_PrimitiveTypeWithAnnotations = Core.Name "hydra.java.syntax.PrimitiveTypeWithAnnotations"
-_PrimitiveTypeWithAnnotations_type = Core.Name "type"
-_PrimitiveTypeWithAnnotations_annotations = Core.Name "annotations"
-data PrimitiveType =
-  PrimitiveTypeNumeric NumericType |
-  PrimitiveTypeBoolean
-  deriving (Eq, Ord, Read, Show)
-_PrimitiveType = Core.Name "hydra.java.syntax.PrimitiveType"
-_PrimitiveType_numeric = Core.Name "numeric"
-_PrimitiveType_boolean = Core.Name "boolean"
-data NumericType =
-  NumericTypeIntegral IntegralType |
-  NumericTypeFloatingPoint FloatingPointType
-  deriving (Eq, Ord, Read, Show)
-_NumericType = Core.Name "hydra.java.syntax.NumericType"
-_NumericType_integral = Core.Name "integral"
-_NumericType_floatingPoint = Core.Name "floatingPoint"
-data IntegralType =
-  IntegralTypeByte |
-  IntegralTypeShort |
-  IntegralTypeInt |
-  IntegralTypeLong |
-  IntegralTypeChar
-  deriving (Eq, Ord, Read, Show)
-_IntegralType = Core.Name "hydra.java.syntax.IntegralType"
-_IntegralType_byte = Core.Name "byte"
-_IntegralType_short = Core.Name "short"
-_IntegralType_int = Core.Name "int"
-_IntegralType_long = Core.Name "long"
-_IntegralType_char = Core.Name "char"
-data FloatingPointType =
-  FloatingPointTypeFloat |
-  FloatingPointTypeDouble
-  deriving (Eq, Ord, Read, Show)
-_FloatingPointType = Core.Name "hydra.java.syntax.FloatingPointType"
-_FloatingPointType_float = Core.Name "float"
-_FloatingPointType_double = Core.Name "double"
-data ReferenceType =
-  ReferenceTypeClassOrInterface ClassOrInterfaceType |
-  ReferenceTypeVariable TypeVariable |
-  ReferenceTypeArray ArrayType
-  deriving (Eq, Ord, Read, Show)
-_ReferenceType = Core.Name "hydra.java.syntax.ReferenceType"
-_ReferenceType_classOrInterface = Core.Name "classOrInterface"
-_ReferenceType_variable = Core.Name "variable"
-_ReferenceType_array = Core.Name "array"
-data ClassOrInterfaceType =
-  ClassOrInterfaceTypeClass ClassType |
-  ClassOrInterfaceTypeInterface InterfaceType
-  deriving (Eq, Ord, Read, Show)
-_ClassOrInterfaceType = Core.Name "hydra.java.syntax.ClassOrInterfaceType"
-_ClassOrInterfaceType_class = Core.Name "class"
-_ClassOrInterfaceType_interface = Core.Name "interface"
-data ClassType =
-  ClassType {
-    classTypeAnnotations :: [Annotation],
-    classTypeQualifier :: ClassTypeQualifier,
-    classTypeIdentifier :: TypeIdentifier,
-    classTypeArguments :: [TypeArgument]}
-  deriving (Eq, Ord, Read, Show)
-_ClassType = Core.Name "hydra.java.syntax.ClassType"
-_ClassType_annotations = Core.Name "annotations"
-_ClassType_qualifier = Core.Name "qualifier"
-_ClassType_identifier = Core.Name "identifier"
-_ClassType_arguments = Core.Name "arguments"
-data ClassTypeQualifier =
-  ClassTypeQualifierNone |
-  ClassTypeQualifierPackage PackageName |
-  ClassTypeQualifierParent ClassOrInterfaceType
-  deriving (Eq, Ord, Read, Show)
-_ClassTypeQualifier = Core.Name "hydra.java.syntax.ClassTypeQualifier"
-_ClassTypeQualifier_none = Core.Name "none"
-_ClassTypeQualifier_package = Core.Name "package"
-_ClassTypeQualifier_parent = Core.Name "parent"
-newtype InterfaceType =
-  InterfaceType {
-    unInterfaceType :: ClassType}
-  deriving (Eq, Ord, Read, Show)
-_InterfaceType = Core.Name "hydra.java.syntax.InterfaceType"
-data TypeVariable =
-  TypeVariable {
-    typeVariableAnnotations :: [Annotation],
-    typeVariableIdentifier :: TypeIdentifier}
-  deriving (Eq, Ord, Read, Show)
-_TypeVariable = Core.Name "hydra.java.syntax.TypeVariable"
-_TypeVariable_annotations = Core.Name "annotations"
-_TypeVariable_identifier = Core.Name "identifier"
-data ArrayType =
-  ArrayType {
-    arrayTypeDims :: Dims,
-    arrayTypeVariant :: ArrayType_Variant}
-  deriving (Eq, Ord, Read, Show)
-_ArrayType = Core.Name "hydra.java.syntax.ArrayType"
-_ArrayType_dims = Core.Name "dims"
-_ArrayType_variant = Core.Name "variant"
-data ArrayType_Variant =
-  ArrayType_VariantPrimitive PrimitiveTypeWithAnnotations |
-  ArrayType_VariantClassOrInterface ClassOrInterfaceType |
-  ArrayType_VariantVariable TypeVariable
-  deriving (Eq, Ord, Read, Show)
-_ArrayType_Variant = Core.Name "hydra.java.syntax.ArrayType_Variant"
-_ArrayType_Variant_primitive = Core.Name "primitive"
-_ArrayType_Variant_classOrInterface = Core.Name "classOrInterface"
-_ArrayType_Variant_variable = Core.Name "variable"
-newtype Dims =
-  Dims {
-    unDims :: [[Annotation]]}
-  deriving (Eq, Ord, Read, Show)
-_Dims = Core.Name "hydra.java.syntax.Dims"
-data TypeParameter =
-  TypeParameter {
-    typeParameterModifiers :: [TypeParameterModifier],
-    typeParameterIdentifier :: TypeIdentifier,
-    typeParameterBound :: (Maybe TypeBound)}
-  deriving (Eq, Ord, Read, Show)
-_TypeParameter = Core.Name "hydra.java.syntax.TypeParameter"
-_TypeParameter_modifiers = Core.Name "modifiers"
-_TypeParameter_identifier = Core.Name "identifier"
-_TypeParameter_bound = Core.Name "bound"
-newtype TypeParameterModifier =
-  TypeParameterModifier {
-    unTypeParameterModifier :: Annotation}
-  deriving (Eq, Ord, Read, Show)
-_TypeParameterModifier = Core.Name "hydra.java.syntax.TypeParameterModifier"
-data TypeBound =
-  TypeBoundVariable TypeVariable |
-  TypeBoundClassOrInterface TypeBound_ClassOrInterface
-  deriving (Eq, Ord, Read, Show)
-_TypeBound = Core.Name "hydra.java.syntax.TypeBound"
-_TypeBound_variable = Core.Name "variable"
-_TypeBound_classOrInterface = Core.Name "classOrInterface"
-data TypeBound_ClassOrInterface =
-  TypeBound_ClassOrInterface {
-    typeBound_ClassOrInterfaceType :: ClassOrInterfaceType,
-    typeBound_ClassOrInterfaceAdditional :: [AdditionalBound]}
-  deriving (Eq, Ord, Read, Show)
-_TypeBound_ClassOrInterface = Core.Name "hydra.java.syntax.TypeBound_ClassOrInterface"
-_TypeBound_ClassOrInterface_type = Core.Name "type"
-_TypeBound_ClassOrInterface_additional = Core.Name "additional"
-newtype AdditionalBound =
-  AdditionalBound {
-    unAdditionalBound :: InterfaceType}
-  deriving (Eq, Ord, Read, Show)
-_AdditionalBound = Core.Name "hydra.java.syntax.AdditionalBound"
-data TypeArgument =
-  TypeArgumentReference ReferenceType |
-  TypeArgumentWildcard Wildcard
-  deriving (Eq, Ord, Read, Show)
-_TypeArgument = Core.Name "hydra.java.syntax.TypeArgument"
-_TypeArgument_reference = Core.Name "reference"
-_TypeArgument_wildcard = Core.Name "wildcard"
-data Wildcard =
-  Wildcard {
-    wildcardAnnotations :: [Annotation],
-    wildcardWildcard :: (Maybe WildcardBounds)}
-  deriving (Eq, Ord, Read, Show)
-_Wildcard = Core.Name "hydra.java.syntax.Wildcard"
-_Wildcard_annotations = Core.Name "annotations"
-_Wildcard_wildcard = Core.Name "wildcard"
-data WildcardBounds =
-  WildcardBoundsExtends ReferenceType |
-  WildcardBoundsSuper ReferenceType
-  deriving (Eq, Ord, Read, Show)
-_WildcardBounds = Core.Name "hydra.java.syntax.WildcardBounds"
-_WildcardBounds_extends = Core.Name "extends"
-_WildcardBounds_super = Core.Name "super"
-data ModuleName =
-  ModuleName {
-    moduleNameIdentifier :: Identifier,
-    moduleNameName :: (Maybe ModuleName)}
-  deriving (Eq, Ord, Read, Show)
-_ModuleName = Core.Name "hydra.java.syntax.ModuleName"
-_ModuleName_identifier = Core.Name "identifier"
-_ModuleName_name = Core.Name "name"
-newtype PackageName =
-  PackageName {
-    unPackageName :: [Identifier]}
-  deriving (Eq, Ord, Read, Show)
-_PackageName = Core.Name "hydra.java.syntax.PackageName"
-data TypeName =
-  TypeName {
-    typeNameIdentifier :: TypeIdentifier,
-    typeNameQualifier :: (Maybe PackageOrTypeName)}
-  deriving (Eq, Ord, Read, Show)
-_TypeName = Core.Name "hydra.java.syntax.TypeName"
-_TypeName_identifier = Core.Name "identifier"
-_TypeName_qualifier = Core.Name "qualifier"
-data ExpressionName =
-  ExpressionName {
-    expressionNameQualifier :: (Maybe AmbiguousName),
-    expressionNameIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_ExpressionName = Core.Name "hydra.java.syntax.ExpressionName"
-_ExpressionName_qualifier = Core.Name "qualifier"
-_ExpressionName_identifier = Core.Name "identifier"
-newtype MethodName =
-  MethodName {
-    unMethodName :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_MethodName = Core.Name "hydra.java.syntax.MethodName"
-newtype PackageOrTypeName =
-  PackageOrTypeName {
-    unPackageOrTypeName :: [Identifier]}
-  deriving (Eq, Ord, Read, Show)
-_PackageOrTypeName = Core.Name "hydra.java.syntax.PackageOrTypeName"
-newtype AmbiguousName =
-  AmbiguousName {
-    unAmbiguousName :: [Identifier]}
-  deriving (Eq, Ord, Read, Show)
-_AmbiguousName = Core.Name "hydra.java.syntax.AmbiguousName"
-data CompilationUnit =
-  CompilationUnitOrdinary OrdinaryCompilationUnit |
-  CompilationUnitModular ModularCompilationUnit
-  deriving (Eq, Ord, Read, Show)
-_CompilationUnit = Core.Name "hydra.java.syntax.CompilationUnit"
-_CompilationUnit_ordinary = Core.Name "ordinary"
-_CompilationUnit_modular = Core.Name "modular"
-data OrdinaryCompilationUnit =
-  OrdinaryCompilationUnit {
-    ordinaryCompilationUnitPackage :: (Maybe PackageDeclaration),
-    ordinaryCompilationUnitImports :: [ImportDeclaration],
-    ordinaryCompilationUnitTypes :: [TypeDeclarationWithComments]}
-  deriving (Eq, Ord, Read, Show)
-_OrdinaryCompilationUnit = Core.Name "hydra.java.syntax.OrdinaryCompilationUnit"
-_OrdinaryCompilationUnit_package = Core.Name "package"
-_OrdinaryCompilationUnit_imports = Core.Name "imports"
-_OrdinaryCompilationUnit_types = Core.Name "types"
-data ModularCompilationUnit =
-  ModularCompilationUnit {
-    modularCompilationUnitImports :: [ImportDeclaration],
-    modularCompilationUnitModule :: ModuleDeclaration}
-  deriving (Eq, Ord, Read, Show)
-_ModularCompilationUnit = Core.Name "hydra.java.syntax.ModularCompilationUnit"
-_ModularCompilationUnit_imports = Core.Name "imports"
-_ModularCompilationUnit_module = Core.Name "module"
-data PackageDeclaration =
-  PackageDeclaration {
-    packageDeclarationModifiers :: [PackageModifier],
-    packageDeclarationIdentifiers :: [Identifier]}
-  deriving (Eq, Ord, Read, Show)
-_PackageDeclaration = Core.Name "hydra.java.syntax.PackageDeclaration"
-_PackageDeclaration_modifiers = Core.Name "modifiers"
-_PackageDeclaration_identifiers = Core.Name "identifiers"
-newtype PackageModifier =
-  PackageModifier {
-    unPackageModifier :: Annotation}
-  deriving (Eq, Ord, Read, Show)
-_PackageModifier = Core.Name "hydra.java.syntax.PackageModifier"
-data ImportDeclaration =
-  ImportDeclarationSingleType SingleTypeImportDeclaration |
-  ImportDeclarationTypeImportOnDemand TypeImportOnDemandDeclaration |
-  ImportDeclarationSingleStaticImport SingleStaticImportDeclaration |
-  ImportDeclarationStaticImportOnDemand StaticImportOnDemandDeclaration
-  deriving (Eq, Ord, Read, Show)
-_ImportDeclaration = Core.Name "hydra.java.syntax.ImportDeclaration"
-_ImportDeclaration_singleType = Core.Name "singleType"
-_ImportDeclaration_typeImportOnDemand = Core.Name "typeImportOnDemand"
-_ImportDeclaration_singleStaticImport = Core.Name "singleStaticImport"
-_ImportDeclaration_staticImportOnDemand = Core.Name "staticImportOnDemand"
-newtype SingleTypeImportDeclaration =
-  SingleTypeImportDeclaration {
-    unSingleTypeImportDeclaration :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-_SingleTypeImportDeclaration = Core.Name "hydra.java.syntax.SingleTypeImportDeclaration"
-newtype TypeImportOnDemandDeclaration =
-  TypeImportOnDemandDeclaration {
-    unTypeImportOnDemandDeclaration :: PackageOrTypeName}
-  deriving (Eq, Ord, Read, Show)
-_TypeImportOnDemandDeclaration = Core.Name "hydra.java.syntax.TypeImportOnDemandDeclaration"
-data SingleStaticImportDeclaration =
-  SingleStaticImportDeclaration {
-    singleStaticImportDeclarationTypeName :: TypeName,
-    singleStaticImportDeclarationIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_SingleStaticImportDeclaration = Core.Name "hydra.java.syntax.SingleStaticImportDeclaration"
-_SingleStaticImportDeclaration_typeName = Core.Name "typeName"
-_SingleStaticImportDeclaration_identifier = Core.Name "identifier"
-newtype StaticImportOnDemandDeclaration =
-  StaticImportOnDemandDeclaration {
-    unStaticImportOnDemandDeclaration :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-_StaticImportOnDemandDeclaration = Core.Name "hydra.java.syntax.StaticImportOnDemandDeclaration"
-data TypeDeclaration =
-  TypeDeclarationClass ClassDeclaration |
-  TypeDeclarationInterface InterfaceDeclaration |
-  TypeDeclarationNone
-  deriving (Eq, Ord, Read, Show)
-_TypeDeclaration = Core.Name "hydra.java.syntax.TypeDeclaration"
-_TypeDeclaration_class = Core.Name "class"
-_TypeDeclaration_interface = Core.Name "interface"
-_TypeDeclaration_none = Core.Name "none"
-data TypeDeclarationWithComments =
-  TypeDeclarationWithComments {
-    typeDeclarationWithCommentsValue :: TypeDeclaration,
-    typeDeclarationWithCommentsComments :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_TypeDeclarationWithComments = Core.Name "hydra.java.syntax.TypeDeclarationWithComments"
-_TypeDeclarationWithComments_value = Core.Name "value"
-_TypeDeclarationWithComments_comments = Core.Name "comments"
-data ModuleDeclaration =
-  ModuleDeclaration {
-    moduleDeclarationAnnotations :: [Annotation],
-    moduleDeclarationOpen :: Bool,
-    moduleDeclarationIdentifiers :: [Identifier],
-    moduleDeclarationDirectives :: [[ModuleDirective]]}
-  deriving (Eq, Ord, Read, Show)
-_ModuleDeclaration = Core.Name "hydra.java.syntax.ModuleDeclaration"
-_ModuleDeclaration_annotations = Core.Name "annotations"
-_ModuleDeclaration_open = Core.Name "open"
-_ModuleDeclaration_identifiers = Core.Name "identifiers"
-_ModuleDeclaration_directives = Core.Name "directives"
-data ModuleDirective =
-  ModuleDirectiveRequires ModuleDirective_Requires |
-  ModuleDirectiveExports ModuleDirective_ExportsOrOpens |
-  ModuleDirectiveOpens ModuleDirective_ExportsOrOpens |
-  ModuleDirectiveUses TypeName |
-  ModuleDirectiveProvides ModuleDirective_Provides
-  deriving (Eq, Ord, Read, Show)
-_ModuleDirective = Core.Name "hydra.java.syntax.ModuleDirective"
-_ModuleDirective_requires = Core.Name "requires"
-_ModuleDirective_exports = Core.Name "exports"
-_ModuleDirective_opens = Core.Name "opens"
-_ModuleDirective_uses = Core.Name "uses"
-_ModuleDirective_provides = Core.Name "provides"
-data ModuleDirective_Requires =
-  ModuleDirective_Requires {
-    moduleDirective_RequiresModifiers :: [RequiresModifier],
-    moduleDirective_RequiresModule :: ModuleName}
-  deriving (Eq, Ord, Read, Show)
-_ModuleDirective_Requires = Core.Name "hydra.java.syntax.ModuleDirective_Requires"
-_ModuleDirective_Requires_modifiers = Core.Name "modifiers"
-_ModuleDirective_Requires_module = Core.Name "module"
-data ModuleDirective_ExportsOrOpens =
-  ModuleDirective_ExportsOrOpens {
-    moduleDirective_ExportsOrOpensPackage :: PackageName,
-    -- | At least one module
-    moduleDirective_ExportsOrOpensModules :: [ModuleName]}
-  deriving (Eq, Ord, Read, Show)
-_ModuleDirective_ExportsOrOpens = Core.Name "hydra.java.syntax.ModuleDirective_ExportsOrOpens"
-_ModuleDirective_ExportsOrOpens_package = Core.Name "package"
-_ModuleDirective_ExportsOrOpens_modules = Core.Name "modules"
-data ModuleDirective_Provides =
-  ModuleDirective_Provides {
-    moduleDirective_ProvidesTo :: TypeName,
-    -- | At least one type
-    moduleDirective_ProvidesWith :: [TypeName]}
-  deriving (Eq, Ord, Read, Show)
-_ModuleDirective_Provides = Core.Name "hydra.java.syntax.ModuleDirective_Provides"
-_ModuleDirective_Provides_to = Core.Name "to"
-_ModuleDirective_Provides_with = Core.Name "with"
-data RequiresModifier =
-  RequiresModifierTransitive |
-  RequiresModifierStatic
-  deriving (Eq, Ord, Read, Show)
-_RequiresModifier = Core.Name "hydra.java.syntax.RequiresModifier"
-_RequiresModifier_transitive = Core.Name "transitive"
-_RequiresModifier_static = Core.Name "static"
-data ClassDeclaration =
-  ClassDeclarationNormal NormalClassDeclaration |
-  ClassDeclarationEnum EnumDeclaration
-  deriving (Eq, Ord, Read, Show)
-_ClassDeclaration = Core.Name "hydra.java.syntax.ClassDeclaration"
-_ClassDeclaration_normal = Core.Name "normal"
-_ClassDeclaration_enum = Core.Name "enum"
-data NormalClassDeclaration =
-  NormalClassDeclaration {
-    normalClassDeclarationModifiers :: [ClassModifier],
-    normalClassDeclarationIdentifier :: TypeIdentifier,
-    normalClassDeclarationParameters :: [TypeParameter],
-    normalClassDeclarationExtends :: (Maybe ClassType),
-    normalClassDeclarationImplements :: [InterfaceType],
-    normalClassDeclarationBody :: ClassBody}
-  deriving (Eq, Ord, Read, Show)
-_NormalClassDeclaration = Core.Name "hydra.java.syntax.NormalClassDeclaration"
-_NormalClassDeclaration_modifiers = Core.Name "modifiers"
-_NormalClassDeclaration_identifier = Core.Name "identifier"
-_NormalClassDeclaration_parameters = Core.Name "parameters"
-_NormalClassDeclaration_extends = Core.Name "extends"
-_NormalClassDeclaration_implements = Core.Name "implements"
-_NormalClassDeclaration_body = Core.Name "body"
-data ClassModifier =
-  ClassModifierAnnotation Annotation |
-  ClassModifierPublic |
-  ClassModifierProtected |
-  ClassModifierPrivate |
-  ClassModifierAbstract |
-  ClassModifierStatic |
-  ClassModifierFinal |
-  ClassModifierStrictfp
-  deriving (Eq, Ord, Read, Show)
-_ClassModifier = Core.Name "hydra.java.syntax.ClassModifier"
-_ClassModifier_annotation = Core.Name "annotation"
-_ClassModifier_public = Core.Name "public"
-_ClassModifier_protected = Core.Name "protected"
-_ClassModifier_private = Core.Name "private"
-_ClassModifier_abstract = Core.Name "abstract"
-_ClassModifier_static = Core.Name "static"
-_ClassModifier_final = Core.Name "final"
-_ClassModifier_strictfp = Core.Name "strictfp"
-newtype ClassBody =
-  ClassBody {
-    unClassBody :: [ClassBodyDeclarationWithComments]}
-  deriving (Eq, Ord, Read, Show)
-_ClassBody = Core.Name "hydra.java.syntax.ClassBody"
-data ClassBodyDeclaration =
-  ClassBodyDeclarationClassMember ClassMemberDeclaration |
-  ClassBodyDeclarationInstanceInitializer InstanceInitializer |
-  ClassBodyDeclarationStaticInitializer StaticInitializer |
-  ClassBodyDeclarationConstructorDeclaration ConstructorDeclaration
-  deriving (Eq, Ord, Read, Show)
-_ClassBodyDeclaration = Core.Name "hydra.java.syntax.ClassBodyDeclaration"
-_ClassBodyDeclaration_classMember = Core.Name "classMember"
-_ClassBodyDeclaration_instanceInitializer = Core.Name "instanceInitializer"
-_ClassBodyDeclaration_staticInitializer = Core.Name "staticInitializer"
-_ClassBodyDeclaration_constructorDeclaration = Core.Name "constructorDeclaration"
-data ClassBodyDeclarationWithComments =
-  ClassBodyDeclarationWithComments {
-    classBodyDeclarationWithCommentsValue :: ClassBodyDeclaration,
-    classBodyDeclarationWithCommentsComments :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_ClassBodyDeclarationWithComments = Core.Name "hydra.java.syntax.ClassBodyDeclarationWithComments"
-_ClassBodyDeclarationWithComments_value = Core.Name "value"
-_ClassBodyDeclarationWithComments_comments = Core.Name "comments"
-data ClassMemberDeclaration =
-  ClassMemberDeclarationField FieldDeclaration |
-  ClassMemberDeclarationMethod MethodDeclaration |
-  ClassMemberDeclarationClass ClassDeclaration |
-  ClassMemberDeclarationInterface InterfaceDeclaration |
-  ClassMemberDeclarationNone
-  deriving (Eq, Ord, Read, Show)
-_ClassMemberDeclaration = Core.Name "hydra.java.syntax.ClassMemberDeclaration"
-_ClassMemberDeclaration_field = Core.Name "field"
-_ClassMemberDeclaration_method = Core.Name "method"
-_ClassMemberDeclaration_class = Core.Name "class"
-_ClassMemberDeclaration_interface = Core.Name "interface"
-_ClassMemberDeclaration_none = Core.Name "none"
-data FieldDeclaration =
-  FieldDeclaration {
-    fieldDeclarationModifiers :: [FieldModifier],
-    fieldDeclarationUnannType :: UnannType,
-    fieldDeclarationVariableDeclarators :: [VariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-_FieldDeclaration = Core.Name "hydra.java.syntax.FieldDeclaration"
-_FieldDeclaration_modifiers = Core.Name "modifiers"
-_FieldDeclaration_unannType = Core.Name "unannType"
-_FieldDeclaration_variableDeclarators = Core.Name "variableDeclarators"
-data FieldModifier =
-  FieldModifierAnnotation Annotation |
-  FieldModifierPublic |
-  FieldModifierProtected |
-  FieldModifierPrivate |
-  FieldModifierStatic |
-  FieldModifierFinal |
-  FieldModifierTransient |
-  FieldModifierVolatile
-  deriving (Eq, Ord, Read, Show)
-_FieldModifier = Core.Name "hydra.java.syntax.FieldModifier"
-_FieldModifier_annotation = Core.Name "annotation"
-_FieldModifier_public = Core.Name "public"
-_FieldModifier_protected = Core.Name "protected"
-_FieldModifier_private = Core.Name "private"
-_FieldModifier_static = Core.Name "static"
-_FieldModifier_final = Core.Name "final"
-_FieldModifier_transient = Core.Name "transient"
-_FieldModifier_volatile = Core.Name "volatile"
-data VariableDeclarator =
-  VariableDeclarator {
-    variableDeclaratorId :: VariableDeclaratorId,
-    variableDeclaratorInitializer :: (Maybe VariableInitializer)}
-  deriving (Eq, Ord, Read, Show)
-_VariableDeclarator = Core.Name "hydra.java.syntax.VariableDeclarator"
-_VariableDeclarator_id = Core.Name "id"
-_VariableDeclarator_initializer = Core.Name "initializer"
-data VariableDeclaratorId =
-  VariableDeclaratorId {
-    variableDeclaratorIdIdentifier :: Identifier,
-    variableDeclaratorIdDims :: (Maybe Dims)}
-  deriving (Eq, Ord, Read, Show)
-_VariableDeclaratorId = Core.Name "hydra.java.syntax.VariableDeclaratorId"
-_VariableDeclaratorId_identifier = Core.Name "identifier"
-_VariableDeclaratorId_dims = Core.Name "dims"
-data VariableInitializer =
-  VariableInitializerExpression Expression |
-  VariableInitializerArrayInitializer ArrayInitializer
-  deriving (Eq, Ord, Read, Show)
-_VariableInitializer = Core.Name "hydra.java.syntax.VariableInitializer"
-_VariableInitializer_expression = Core.Name "expression"
-_VariableInitializer_arrayInitializer = Core.Name "arrayInitializer"
--- | A Type which does not allow annotations
-newtype UnannType =
-  UnannType {
-    unUnannType :: Type}
-  deriving (Eq, Ord, Read, Show)
-_UnannType = Core.Name "hydra.java.syntax.UnannType"
--- | A ClassType which does not allow annotations
-newtype UnannClassType =
-  UnannClassType {
-    unUnannClassType :: ClassType}
-  deriving (Eq, Ord, Read, Show)
-_UnannClassType = Core.Name "hydra.java.syntax.UnannClassType"
-data MethodDeclaration =
-  MethodDeclaration {
-    -- | Note: simple methods cannot have annotations
-    methodDeclarationAnnotations :: [Annotation],
-    methodDeclarationModifiers :: [MethodModifier],
-    methodDeclarationHeader :: MethodHeader,
-    methodDeclarationBody :: MethodBody}
-  deriving (Eq, Ord, Read, Show)
-_MethodDeclaration = Core.Name "hydra.java.syntax.MethodDeclaration"
-_MethodDeclaration_annotations = Core.Name "annotations"
-_MethodDeclaration_modifiers = Core.Name "modifiers"
-_MethodDeclaration_header = Core.Name "header"
-_MethodDeclaration_body = Core.Name "body"
-data MethodModifier =
-  MethodModifierAnnotation Annotation |
-  MethodModifierPublic |
-  MethodModifierProtected |
-  MethodModifierPrivate |
-  MethodModifierAbstract |
-  MethodModifierStatic |
-  MethodModifierFinal |
-  MethodModifierSynchronized |
-  MethodModifierNative |
-  MethodModifierStrictfb
-  deriving (Eq, Ord, Read, Show)
-_MethodModifier = Core.Name "hydra.java.syntax.MethodModifier"
-_MethodModifier_annotation = Core.Name "annotation"
-_MethodModifier_public = Core.Name "public"
-_MethodModifier_protected = Core.Name "protected"
-_MethodModifier_private = Core.Name "private"
-_MethodModifier_abstract = Core.Name "abstract"
-_MethodModifier_static = Core.Name "static"
-_MethodModifier_final = Core.Name "final"
-_MethodModifier_synchronized = Core.Name "synchronized"
-_MethodModifier_native = Core.Name "native"
-_MethodModifier_strictfb = Core.Name "strictfb"
-data MethodHeader =
-  MethodHeader {
-    methodHeaderParameters :: [TypeParameter],
-    methodHeaderResult :: Result,
-    methodHeaderDeclarator :: MethodDeclarator,
-    methodHeaderThrows :: (Maybe Throws)}
-  deriving (Eq, Ord, Read, Show)
-_MethodHeader = Core.Name "hydra.java.syntax.MethodHeader"
-_MethodHeader_parameters = Core.Name "parameters"
-_MethodHeader_result = Core.Name "result"
-_MethodHeader_declarator = Core.Name "declarator"
-_MethodHeader_throws = Core.Name "throws"
-data Result =
-  ResultType UnannType |
-  ResultVoid
-  deriving (Eq, Ord, Read, Show)
-_Result = Core.Name "hydra.java.syntax.Result"
-_Result_type = Core.Name "type"
-_Result_void = Core.Name "void"
-data MethodDeclarator =
-  MethodDeclarator {
-    methodDeclaratorIdentifier :: Identifier,
-    methodDeclaratorReceiverParameter :: (Maybe ReceiverParameter),
-    methodDeclaratorFormalParameters :: [FormalParameter]}
-  deriving (Eq, Ord, Read, Show)
-_MethodDeclarator = Core.Name "hydra.java.syntax.MethodDeclarator"
-_MethodDeclarator_identifier = Core.Name "identifier"
-_MethodDeclarator_receiverParameter = Core.Name "receiverParameter"
-_MethodDeclarator_formalParameters = Core.Name "formalParameters"
-data ReceiverParameter =
-  ReceiverParameter {
-    receiverParameterAnnotations :: [Annotation],
-    receiverParameterUnannType :: UnannType,
-    receiverParameterIdentifier :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-_ReceiverParameter = Core.Name "hydra.java.syntax.ReceiverParameter"
-_ReceiverParameter_annotations = Core.Name "annotations"
-_ReceiverParameter_unannType = Core.Name "unannType"
-_ReceiverParameter_identifier = Core.Name "identifier"
-data FormalParameter =
-  FormalParameterSimple FormalParameter_Simple |
-  FormalParameterVariableArity VariableArityParameter
-  deriving (Eq, Ord, Read, Show)
-_FormalParameter = Core.Name "hydra.java.syntax.FormalParameter"
-_FormalParameter_simple = Core.Name "simple"
-_FormalParameter_variableArity = Core.Name "variableArity"
-data FormalParameter_Simple =
-  FormalParameter_Simple {
-    formalParameter_SimpleModifiers :: [VariableModifier],
-    formalParameter_SimpleType :: UnannType,
-    formalParameter_SimpleId :: VariableDeclaratorId}
-  deriving (Eq, Ord, Read, Show)
-_FormalParameter_Simple = Core.Name "hydra.java.syntax.FormalParameter_Simple"
-_FormalParameter_Simple_modifiers = Core.Name "modifiers"
-_FormalParameter_Simple_type = Core.Name "type"
-_FormalParameter_Simple_id = Core.Name "id"
-data VariableArityParameter =
-  VariableArityParameter {
-    variableArityParameterModifiers :: VariableModifier,
-    variableArityParameterType :: UnannType,
-    variableArityParameterAnnotations :: [Annotation],
-    variableArityParameterIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_VariableArityParameter = Core.Name "hydra.java.syntax.VariableArityParameter"
-_VariableArityParameter_modifiers = Core.Name "modifiers"
-_VariableArityParameter_type = Core.Name "type"
-_VariableArityParameter_annotations = Core.Name "annotations"
-_VariableArityParameter_identifier = Core.Name "identifier"
-data VariableModifier =
-  VariableModifierAnnotation Annotation |
-  VariableModifierFinal
-  deriving (Eq, Ord, Read, Show)
-_VariableModifier = Core.Name "hydra.java.syntax.VariableModifier"
-_VariableModifier_annotation = Core.Name "annotation"
-_VariableModifier_final = Core.Name "final"
-newtype Throws =
-  Throws {
-    unThrows :: [ExceptionType]}
-  deriving (Eq, Ord, Read, Show)
-_Throws = Core.Name "hydra.java.syntax.Throws"
-data ExceptionType =
-  ExceptionTypeClass ClassType |
-  ExceptionTypeVariable TypeVariable
-  deriving (Eq, Ord, Read, Show)
-_ExceptionType = Core.Name "hydra.java.syntax.ExceptionType"
-_ExceptionType_class = Core.Name "class"
-_ExceptionType_variable = Core.Name "variable"
-data MethodBody =
-  MethodBodyBlock Block |
-  MethodBodyNone
-  deriving (Eq, Ord, Read, Show)
-_MethodBody = Core.Name "hydra.java.syntax.MethodBody"
-_MethodBody_block = Core.Name "block"
-_MethodBody_none = Core.Name "none"
-newtype InstanceInitializer =
-  InstanceInitializer {
-    unInstanceInitializer :: Block}
-  deriving (Eq, Ord, Read, Show)
-_InstanceInitializer = Core.Name "hydra.java.syntax.InstanceInitializer"
-newtype StaticInitializer =
-  StaticInitializer {
-    unStaticInitializer :: Block}
-  deriving (Eq, Ord, Read, Show)
-_StaticInitializer = Core.Name "hydra.java.syntax.StaticInitializer"
-data ConstructorDeclaration =
-  ConstructorDeclaration {
-    constructorDeclarationModifiers :: [ConstructorModifier],
-    constructorDeclarationConstructor :: ConstructorDeclarator,
-    constructorDeclarationThrows :: (Maybe Throws),
-    constructorDeclarationBody :: ConstructorBody}
-  deriving (Eq, Ord, Read, Show)
-_ConstructorDeclaration = Core.Name "hydra.java.syntax.ConstructorDeclaration"
-_ConstructorDeclaration_modifiers = Core.Name "modifiers"
-_ConstructorDeclaration_constructor = Core.Name "constructor"
-_ConstructorDeclaration_throws = Core.Name "throws"
-_ConstructorDeclaration_body = Core.Name "body"
-data ConstructorModifier =
-  ConstructorModifierAnnotation Annotation |
-  ConstructorModifierPublic |
-  ConstructorModifierProtected |
-  ConstructorModifierPrivate
-  deriving (Eq, Ord, Read, Show)
-_ConstructorModifier = Core.Name "hydra.java.syntax.ConstructorModifier"
-_ConstructorModifier_annotation = Core.Name "annotation"
-_ConstructorModifier_public = Core.Name "public"
-_ConstructorModifier_protected = Core.Name "protected"
-_ConstructorModifier_private = Core.Name "private"
-data ConstructorDeclarator =
-  ConstructorDeclarator {
-    constructorDeclaratorParameters :: [TypeParameter],
-    constructorDeclaratorName :: SimpleTypeName,
-    constructorDeclaratorReceiverParameter :: (Maybe ReceiverParameter),
-    constructorDeclaratorFormalParameters :: [FormalParameter]}
-  deriving (Eq, Ord, Read, Show)
-_ConstructorDeclarator = Core.Name "hydra.java.syntax.ConstructorDeclarator"
-_ConstructorDeclarator_parameters = Core.Name "parameters"
-_ConstructorDeclarator_name = Core.Name "name"
-_ConstructorDeclarator_receiverParameter = Core.Name "receiverParameter"
-_ConstructorDeclarator_formalParameters = Core.Name "formalParameters"
-newtype SimpleTypeName =
-  SimpleTypeName {
-    unSimpleTypeName :: TypeIdentifier}
-  deriving (Eq, Ord, Read, Show)
-_SimpleTypeName = Core.Name "hydra.java.syntax.SimpleTypeName"
-data ConstructorBody =
-  ConstructorBody {
-    constructorBodyInvocation :: (Maybe ExplicitConstructorInvocation),
-    constructorBodyStatements :: [BlockStatement]}
-  deriving (Eq, Ord, Read, Show)
-_ConstructorBody = Core.Name "hydra.java.syntax.ConstructorBody"
-_ConstructorBody_invocation = Core.Name "invocation"
-_ConstructorBody_statements = Core.Name "statements"
-data ExplicitConstructorInvocation =
-  ExplicitConstructorInvocation {
-    explicitConstructorInvocationTypeArguments :: [TypeArgument],
-    explicitConstructorInvocationArguments :: [Expression],
-    explicitConstructorInvocationVariant :: ExplicitConstructorInvocation_Variant}
-  deriving (Eq, Ord, Read, Show)
-_ExplicitConstructorInvocation = Core.Name "hydra.java.syntax.ExplicitConstructorInvocation"
-_ExplicitConstructorInvocation_typeArguments = Core.Name "typeArguments"
-_ExplicitConstructorInvocation_arguments = Core.Name "arguments"
-_ExplicitConstructorInvocation_variant = Core.Name "variant"
-data ExplicitConstructorInvocation_Variant =
-  ExplicitConstructorInvocation_VariantThis |
-  ExplicitConstructorInvocation_VariantSuper (Maybe ExpressionName) |
-  ExplicitConstructorInvocation_VariantPrimary Primary
-  deriving (Eq, Ord, Read, Show)
-_ExplicitConstructorInvocation_Variant = Core.Name "hydra.java.syntax.ExplicitConstructorInvocation_Variant"
-_ExplicitConstructorInvocation_Variant_this = Core.Name "this"
-_ExplicitConstructorInvocation_Variant_super = Core.Name "super"
-_ExplicitConstructorInvocation_Variant_primary = Core.Name "primary"
-data EnumDeclaration =
-  EnumDeclaration {
-    enumDeclarationModifiers :: [ClassModifier],
-    enumDeclarationIdentifier :: TypeIdentifier,
-    enumDeclarationImplements :: [InterfaceType],
-    enumDeclarationBody :: EnumBody}
-  deriving (Eq, Ord, Read, Show)
-_EnumDeclaration = Core.Name "hydra.java.syntax.EnumDeclaration"
-_EnumDeclaration_modifiers = Core.Name "modifiers"
-_EnumDeclaration_identifier = Core.Name "identifier"
-_EnumDeclaration_implements = Core.Name "implements"
-_EnumDeclaration_body = Core.Name "body"
-newtype EnumBody =
-  EnumBody {
-    unEnumBody :: [EnumBody_Element]}
-  deriving (Eq, Ord, Read, Show)
-_EnumBody = Core.Name "hydra.java.syntax.EnumBody"
-data EnumBody_Element =
-  EnumBody_Element {
-    enumBody_ElementConstants :: [EnumConstant],
-    enumBody_ElementBodyDeclarations :: [ClassBodyDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-_EnumBody_Element = Core.Name "hydra.java.syntax.EnumBody_Element"
-_EnumBody_Element_constants = Core.Name "constants"
-_EnumBody_Element_bodyDeclarations = Core.Name "bodyDeclarations"
-data EnumConstant =
-  EnumConstant {
-    enumConstantModifiers :: [EnumConstantModifier],
-    enumConstantIdentifier :: Identifier,
-    enumConstantArguments :: [[Expression]],
-    enumConstantBody :: (Maybe ClassBody)}
-  deriving (Eq, Ord, Read, Show)
-_EnumConstant = Core.Name "hydra.java.syntax.EnumConstant"
-_EnumConstant_modifiers = Core.Name "modifiers"
-_EnumConstant_identifier = Core.Name "identifier"
-_EnumConstant_arguments = Core.Name "arguments"
-_EnumConstant_body = Core.Name "body"
-newtype EnumConstantModifier =
-  EnumConstantModifier {
-    unEnumConstantModifier :: Annotation}
-  deriving (Eq, Ord, Read, Show)
-_EnumConstantModifier = Core.Name "hydra.java.syntax.EnumConstantModifier"
-data InterfaceDeclaration =
-  InterfaceDeclarationNormalInterface NormalInterfaceDeclaration |
-  InterfaceDeclarationAnnotationType AnnotationTypeDeclaration
-  deriving (Eq, Ord, Read, Show)
-_InterfaceDeclaration = Core.Name "hydra.java.syntax.InterfaceDeclaration"
-_InterfaceDeclaration_normalInterface = Core.Name "normalInterface"
-_InterfaceDeclaration_annotationType = Core.Name "annotationType"
-data NormalInterfaceDeclaration =
-  NormalInterfaceDeclaration {
-    normalInterfaceDeclarationModifiers :: [InterfaceModifier],
-    normalInterfaceDeclarationIdentifier :: TypeIdentifier,
-    normalInterfaceDeclarationParameters :: [TypeParameter],
-    normalInterfaceDeclarationExtends :: [InterfaceType],
-    normalInterfaceDeclarationBody :: InterfaceBody}
-  deriving (Eq, Ord, Read, Show)
-_NormalInterfaceDeclaration = Core.Name "hydra.java.syntax.NormalInterfaceDeclaration"
-_NormalInterfaceDeclaration_modifiers = Core.Name "modifiers"
-_NormalInterfaceDeclaration_identifier = Core.Name "identifier"
-_NormalInterfaceDeclaration_parameters = Core.Name "parameters"
-_NormalInterfaceDeclaration_extends = Core.Name "extends"
-_NormalInterfaceDeclaration_body = Core.Name "body"
-data InterfaceModifier =
-  InterfaceModifierAnnotation Annotation |
-  InterfaceModifierPublic |
-  InterfaceModifierProtected |
-  InterfaceModifierPrivate |
-  InterfaceModifierAbstract |
-  InterfaceModifierStatic |
-  InterfaceModifierStrictfb
-  deriving (Eq, Ord, Read, Show)
-_InterfaceModifier = Core.Name "hydra.java.syntax.InterfaceModifier"
-_InterfaceModifier_annotation = Core.Name "annotation"
-_InterfaceModifier_public = Core.Name "public"
-_InterfaceModifier_protected = Core.Name "protected"
-_InterfaceModifier_private = Core.Name "private"
-_InterfaceModifier_abstract = Core.Name "abstract"
-_InterfaceModifier_static = Core.Name "static"
-_InterfaceModifier_strictfb = Core.Name "strictfb"
-newtype InterfaceBody =
-  InterfaceBody {
-    unInterfaceBody :: [InterfaceMemberDeclaration]}
-  deriving (Eq, Ord, Read, Show)
-_InterfaceBody = Core.Name "hydra.java.syntax.InterfaceBody"
-data InterfaceMemberDeclaration =
-  InterfaceMemberDeclarationConstant ConstantDeclaration |
-  InterfaceMemberDeclarationInterfaceMethod InterfaceMethodDeclaration |
-  InterfaceMemberDeclarationClass ClassDeclaration |
-  InterfaceMemberDeclarationInterface InterfaceDeclaration
-  deriving (Eq, Ord, Read, Show)
-_InterfaceMemberDeclaration = Core.Name "hydra.java.syntax.InterfaceMemberDeclaration"
-_InterfaceMemberDeclaration_constant = Core.Name "constant"
-_InterfaceMemberDeclaration_interfaceMethod = Core.Name "interfaceMethod"
-_InterfaceMemberDeclaration_class = Core.Name "class"
-_InterfaceMemberDeclaration_interface = Core.Name "interface"
-data ConstantDeclaration =
-  ConstantDeclaration {
-    constantDeclarationModifiers :: [ConstantModifier],
-    constantDeclarationType :: UnannType,
-    constantDeclarationVariables :: [VariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-_ConstantDeclaration = Core.Name "hydra.java.syntax.ConstantDeclaration"
-_ConstantDeclaration_modifiers = Core.Name "modifiers"
-_ConstantDeclaration_type = Core.Name "type"
-_ConstantDeclaration_variables = Core.Name "variables"
-data ConstantModifier =
-  ConstantModifierAnnotation Annotation |
-  ConstantModifierPublic |
-  ConstantModifierStatic |
-  ConstantModifierFinal
-  deriving (Eq, Ord, Read, Show)
-_ConstantModifier = Core.Name "hydra.java.syntax.ConstantModifier"
-_ConstantModifier_annotation = Core.Name "annotation"
-_ConstantModifier_public = Core.Name "public"
-_ConstantModifier_static = Core.Name "static"
-_ConstantModifier_final = Core.Name "final"
-data InterfaceMethodDeclaration =
-  InterfaceMethodDeclaration {
-    interfaceMethodDeclarationModifiers :: [InterfaceMethodModifier],
-    interfaceMethodDeclarationHeader :: MethodHeader,
-    interfaceMethodDeclarationBody :: MethodBody}
-  deriving (Eq, Ord, Read, Show)
-_InterfaceMethodDeclaration = Core.Name "hydra.java.syntax.InterfaceMethodDeclaration"
-_InterfaceMethodDeclaration_modifiers = Core.Name "modifiers"
-_InterfaceMethodDeclaration_header = Core.Name "header"
-_InterfaceMethodDeclaration_body = Core.Name "body"
-data InterfaceMethodModifier =
-  InterfaceMethodModifierAnnotation Annotation |
-  InterfaceMethodModifierPublic |
-  InterfaceMethodModifierPrivate |
-  InterfaceMethodModifierAbstract |
-  InterfaceMethodModifierDefault |
-  InterfaceMethodModifierStatic |
-  InterfaceMethodModifierStrictfp
-  deriving (Eq, Ord, Read, Show)
-_InterfaceMethodModifier = Core.Name "hydra.java.syntax.InterfaceMethodModifier"
-_InterfaceMethodModifier_annotation = Core.Name "annotation"
-_InterfaceMethodModifier_public = Core.Name "public"
-_InterfaceMethodModifier_private = Core.Name "private"
-_InterfaceMethodModifier_abstract = Core.Name "abstract"
-_InterfaceMethodModifier_default = Core.Name "default"
-_InterfaceMethodModifier_static = Core.Name "static"
-_InterfaceMethodModifier_strictfp = Core.Name "strictfp"
-data AnnotationTypeDeclaration =
-  AnnotationTypeDeclaration {
-    annotationTypeDeclarationModifiers :: [InterfaceModifier],
-    annotationTypeDeclarationIdentifier :: TypeIdentifier,
-    annotationTypeDeclarationBody :: AnnotationTypeBody}
-  deriving (Eq, Ord, Read, Show)
-_AnnotationTypeDeclaration = Core.Name "hydra.java.syntax.AnnotationTypeDeclaration"
-_AnnotationTypeDeclaration_modifiers = Core.Name "modifiers"
-_AnnotationTypeDeclaration_identifier = Core.Name "identifier"
-_AnnotationTypeDeclaration_body = Core.Name "body"
-newtype AnnotationTypeBody =
-  AnnotationTypeBody {
-    unAnnotationTypeBody :: [[AnnotationTypeMemberDeclaration]]}
-  deriving (Eq, Ord, Read, Show)
-_AnnotationTypeBody = Core.Name "hydra.java.syntax.AnnotationTypeBody"
-data AnnotationTypeMemberDeclaration =
-  AnnotationTypeMemberDeclarationAnnotationType AnnotationTypeElementDeclaration |
-  AnnotationTypeMemberDeclarationConstant ConstantDeclaration |
-  AnnotationTypeMemberDeclarationClass ClassDeclaration |
-  AnnotationTypeMemberDeclarationInterface InterfaceDeclaration
-  deriving (Eq, Ord, Read, Show)
-_AnnotationTypeMemberDeclaration = Core.Name "hydra.java.syntax.AnnotationTypeMemberDeclaration"
-_AnnotationTypeMemberDeclaration_annotationType = Core.Name "annotationType"
-_AnnotationTypeMemberDeclaration_constant = Core.Name "constant"
-_AnnotationTypeMemberDeclaration_class = Core.Name "class"
-_AnnotationTypeMemberDeclaration_interface = Core.Name "interface"
-data AnnotationTypeElementDeclaration =
-  AnnotationTypeElementDeclaration {
-    annotationTypeElementDeclarationModifiers :: [AnnotationTypeElementModifier],
-    annotationTypeElementDeclarationType :: UnannType,
-    annotationTypeElementDeclarationIdentifier :: Identifier,
-    annotationTypeElementDeclarationDims :: (Maybe Dims),
-    annotationTypeElementDeclarationDefault :: (Maybe DefaultValue)}
-  deriving (Eq, Ord, Read, Show)
-_AnnotationTypeElementDeclaration = Core.Name "hydra.java.syntax.AnnotationTypeElementDeclaration"
-_AnnotationTypeElementDeclaration_modifiers = Core.Name "modifiers"
-_AnnotationTypeElementDeclaration_type = Core.Name "type"
-_AnnotationTypeElementDeclaration_identifier = Core.Name "identifier"
-_AnnotationTypeElementDeclaration_dims = Core.Name "dims"
-_AnnotationTypeElementDeclaration_default = Core.Name "default"
-data AnnotationTypeElementModifier =
-  AnnotationTypeElementModifierPublic Annotation |
-  AnnotationTypeElementModifierAbstract
-  deriving (Eq, Ord, Read, Show)
-_AnnotationTypeElementModifier = Core.Name "hydra.java.syntax.AnnotationTypeElementModifier"
-_AnnotationTypeElementModifier_public = Core.Name "public"
-_AnnotationTypeElementModifier_abstract = Core.Name "abstract"
-newtype DefaultValue =
-  DefaultValue {
-    unDefaultValue :: ElementValue}
-  deriving (Eq, Ord, Read, Show)
-_DefaultValue = Core.Name "hydra.java.syntax.DefaultValue"
-data Annotation =
-  AnnotationNormal NormalAnnotation |
-  AnnotationMarker MarkerAnnotation |
-  AnnotationSingleElement SingleElementAnnotation
-  deriving (Eq, Ord, Read, Show)
-_Annotation = Core.Name "hydra.java.syntax.Annotation"
-_Annotation_normal = Core.Name "normal"
-_Annotation_marker = Core.Name "marker"
-_Annotation_singleElement = Core.Name "singleElement"
-data NormalAnnotation =
-  NormalAnnotation {
-    normalAnnotationTypeName :: TypeName,
-    normalAnnotationPairs :: [ElementValuePair]}
-  deriving (Eq, Ord, Read, Show)
-_NormalAnnotation = Core.Name "hydra.java.syntax.NormalAnnotation"
-_NormalAnnotation_typeName = Core.Name "typeName"
-_NormalAnnotation_pairs = Core.Name "pairs"
-data ElementValuePair =
-  ElementValuePair {
-    elementValuePairKey :: Identifier,
-    elementValuePairValue :: ElementValue}
-  deriving (Eq, Ord, Read, Show)
-_ElementValuePair = Core.Name "hydra.java.syntax.ElementValuePair"
-_ElementValuePair_key = Core.Name "key"
-_ElementValuePair_value = Core.Name "value"
-data ElementValue =
-  ElementValueConditionalExpression ConditionalExpression |
-  ElementValueElementValueArrayInitializer ElementValueArrayInitializer |
-  ElementValueAnnotation Annotation
-  deriving (Eq, Ord, Read, Show)
-_ElementValue = Core.Name "hydra.java.syntax.ElementValue"
-_ElementValue_conditionalExpression = Core.Name "conditionalExpression"
-_ElementValue_elementValueArrayInitializer = Core.Name "elementValueArrayInitializer"
-_ElementValue_annotation = Core.Name "annotation"
-newtype ElementValueArrayInitializer =
-  ElementValueArrayInitializer {
-    unElementValueArrayInitializer :: [ElementValue]}
-  deriving (Eq, Ord, Read, Show)
-_ElementValueArrayInitializer = Core.Name "hydra.java.syntax.ElementValueArrayInitializer"
-newtype MarkerAnnotation =
-  MarkerAnnotation {
-    unMarkerAnnotation :: TypeName}
-  deriving (Eq, Ord, Read, Show)
-_MarkerAnnotation = Core.Name "hydra.java.syntax.MarkerAnnotation"
-data SingleElementAnnotation =
-  SingleElementAnnotation {
-    singleElementAnnotationName :: TypeName,
-    singleElementAnnotationValue :: (Maybe ElementValue)}
-  deriving (Eq, Ord, Read, Show)
-_SingleElementAnnotation = Core.Name "hydra.java.syntax.SingleElementAnnotation"
-_SingleElementAnnotation_name = Core.Name "name"
-_SingleElementAnnotation_value = Core.Name "value"
-newtype ArrayInitializer =
-  ArrayInitializer {
-    unArrayInitializer :: [[VariableInitializer]]}
-  deriving (Eq, Ord, Read, Show)
-_ArrayInitializer = Core.Name "hydra.java.syntax.ArrayInitializer"
-newtype Block =
-  Block {
-    unBlock :: [BlockStatement]}
-  deriving (Eq, Ord, Read, Show)
-_Block = Core.Name "hydra.java.syntax.Block"
-data BlockStatement =
-  BlockStatementLocalVariableDeclaration LocalVariableDeclarationStatement |
-  BlockStatementClass ClassDeclaration |
-  BlockStatementStatement Statement
-  deriving (Eq, Ord, Read, Show)
-_BlockStatement = Core.Name "hydra.java.syntax.BlockStatement"
-_BlockStatement_localVariableDeclaration = Core.Name "localVariableDeclaration"
-_BlockStatement_class = Core.Name "class"
-_BlockStatement_statement = Core.Name "statement"
-newtype LocalVariableDeclarationStatement =
-  LocalVariableDeclarationStatement {
-    unLocalVariableDeclarationStatement :: LocalVariableDeclaration}
-  deriving (Eq, Ord, Read, Show)
-_LocalVariableDeclarationStatement = Core.Name "hydra.java.syntax.LocalVariableDeclarationStatement"
-data LocalVariableDeclaration =
-  LocalVariableDeclaration {
-    localVariableDeclarationModifiers :: [VariableModifier],
-    localVariableDeclarationType :: LocalVariableType,
-    localVariableDeclarationDeclarators :: [VariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-_LocalVariableDeclaration = Core.Name "hydra.java.syntax.LocalVariableDeclaration"
-_LocalVariableDeclaration_modifiers = Core.Name "modifiers"
-_LocalVariableDeclaration_type = Core.Name "type"
-_LocalVariableDeclaration_declarators = Core.Name "declarators"
-data LocalVariableType =
-  LocalVariableTypeType UnannType |
-  LocalVariableTypeVar
-  deriving (Eq, Ord, Read, Show)
-_LocalVariableType = Core.Name "hydra.java.syntax.LocalVariableType"
-_LocalVariableType_type = Core.Name "type"
-_LocalVariableType_var = Core.Name "var"
-data Statement =
-  StatementWithoutTrailing StatementWithoutTrailingSubstatement |
-  StatementLabeled LabeledStatement |
-  StatementIfThen IfThenStatement |
-  StatementIfThenElse IfThenElseStatement |
-  StatementWhile WhileStatement |
-  StatementFor ForStatement
-  deriving (Eq, Ord, Read, Show)
-_Statement = Core.Name "hydra.java.syntax.Statement"
-_Statement_withoutTrailing = Core.Name "withoutTrailing"
-_Statement_labeled = Core.Name "labeled"
-_Statement_ifThen = Core.Name "ifThen"
-_Statement_ifThenElse = Core.Name "ifThenElse"
-_Statement_while = Core.Name "while"
-_Statement_for = Core.Name "for"
-data StatementNoShortIf =
-  StatementNoShortIfWithoutTrailing StatementWithoutTrailingSubstatement |
-  StatementNoShortIfLabeled LabeledStatementNoShortIf |
-  StatementNoShortIfIfThenElse IfThenElseStatementNoShortIf |
-  StatementNoShortIfWhile WhileStatementNoShortIf |
-  StatementNoShortIfFor ForStatementNoShortIf
-  deriving (Eq, Ord, Read, Show)
-_StatementNoShortIf = Core.Name "hydra.java.syntax.StatementNoShortIf"
-_StatementNoShortIf_withoutTrailing = Core.Name "withoutTrailing"
-_StatementNoShortIf_labeled = Core.Name "labeled"
-_StatementNoShortIf_ifThenElse = Core.Name "ifThenElse"
-_StatementNoShortIf_while = Core.Name "while"
-_StatementNoShortIf_for = Core.Name "for"
-data StatementWithoutTrailingSubstatement =
-  StatementWithoutTrailingSubstatementBlock Block |
-  StatementWithoutTrailingSubstatementEmpty |
-  StatementWithoutTrailingSubstatementExpression ExpressionStatement |
-  StatementWithoutTrailingSubstatementAssert AssertStatement |
-  StatementWithoutTrailingSubstatementSwitch SwitchStatement |
-  StatementWithoutTrailingSubstatementDo DoStatement |
-  StatementWithoutTrailingSubstatementBreak BreakStatement |
-  StatementWithoutTrailingSubstatementContinue ContinueStatement |
-  StatementWithoutTrailingSubstatementReturn ReturnStatement |
-  StatementWithoutTrailingSubstatementSynchronized SynchronizedStatement |
-  StatementWithoutTrailingSubstatementThrow ThrowStatement |
-  StatementWithoutTrailingSubstatementTry TryStatement
-  deriving (Eq, Ord, Read, Show)
-_StatementWithoutTrailingSubstatement = Core.Name "hydra.java.syntax.StatementWithoutTrailingSubstatement"
-_StatementWithoutTrailingSubstatement_block = Core.Name "block"
-_StatementWithoutTrailingSubstatement_empty = Core.Name "empty"
-_StatementWithoutTrailingSubstatement_expression = Core.Name "expression"
-_StatementWithoutTrailingSubstatement_assert = Core.Name "assert"
-_StatementWithoutTrailingSubstatement_switch = Core.Name "switch"
-_StatementWithoutTrailingSubstatement_do = Core.Name "do"
-_StatementWithoutTrailingSubstatement_break = Core.Name "break"
-_StatementWithoutTrailingSubstatement_continue = Core.Name "continue"
-_StatementWithoutTrailingSubstatement_return = Core.Name "return"
-_StatementWithoutTrailingSubstatement_synchronized = Core.Name "synchronized"
-_StatementWithoutTrailingSubstatement_throw = Core.Name "throw"
-_StatementWithoutTrailingSubstatement_try = Core.Name "try"
-data LabeledStatement =
-  LabeledStatement {
-    labeledStatementIdentifier :: Identifier,
-    labeledStatementStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_LabeledStatement = Core.Name "hydra.java.syntax.LabeledStatement"
-_LabeledStatement_identifier = Core.Name "identifier"
-_LabeledStatement_statement = Core.Name "statement"
-data LabeledStatementNoShortIf =
-  LabeledStatementNoShortIf {
-    labeledStatementNoShortIfIdentifier :: Identifier,
-    labeledStatementNoShortIfStatement :: StatementNoShortIf}
-  deriving (Eq, Ord, Read, Show)
-_LabeledStatementNoShortIf = Core.Name "hydra.java.syntax.LabeledStatementNoShortIf"
-_LabeledStatementNoShortIf_identifier = Core.Name "identifier"
-_LabeledStatementNoShortIf_statement = Core.Name "statement"
-newtype ExpressionStatement =
-  ExpressionStatement {
-    unExpressionStatement :: StatementExpression}
-  deriving (Eq, Ord, Read, Show)
-_ExpressionStatement = Core.Name "hydra.java.syntax.ExpressionStatement"
-data StatementExpression =
-  StatementExpressionAssignment Assignment |
-  StatementExpressionPreIncrement PreIncrementExpression |
-  StatementExpressionPreDecrement PreDecrementExpression |
-  StatementExpressionPostIncrement PostIncrementExpression |
-  StatementExpressionPostDecrement PostDecrementExpression |
-  StatementExpressionMethodInvocation MethodInvocation |
-  StatementExpressionClassInstanceCreation ClassInstanceCreationExpression
-  deriving (Eq, Ord, Read, Show)
-_StatementExpression = Core.Name "hydra.java.syntax.StatementExpression"
-_StatementExpression_assignment = Core.Name "assignment"
-_StatementExpression_preIncrement = Core.Name "preIncrement"
-_StatementExpression_preDecrement = Core.Name "preDecrement"
-_StatementExpression_postIncrement = Core.Name "postIncrement"
-_StatementExpression_postDecrement = Core.Name "postDecrement"
-_StatementExpression_methodInvocation = Core.Name "methodInvocation"
-_StatementExpression_classInstanceCreation = Core.Name "classInstanceCreation"
-data IfThenStatement =
-  IfThenStatement {
-    ifThenStatementExpression :: Expression,
-    ifThenStatementStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_IfThenStatement = Core.Name "hydra.java.syntax.IfThenStatement"
-_IfThenStatement_expression = Core.Name "expression"
-_IfThenStatement_statement = Core.Name "statement"
-data IfThenElseStatement =
-  IfThenElseStatement {
-    ifThenElseStatementCond :: (Maybe Expression),
-    ifThenElseStatementThen :: StatementNoShortIf,
-    ifThenElseStatementElse :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_IfThenElseStatement = Core.Name "hydra.java.syntax.IfThenElseStatement"
-_IfThenElseStatement_cond = Core.Name "cond"
-_IfThenElseStatement_then = Core.Name "then"
-_IfThenElseStatement_else = Core.Name "else"
-data IfThenElseStatementNoShortIf =
-  IfThenElseStatementNoShortIf {
-    ifThenElseStatementNoShortIfCond :: (Maybe Expression),
-    ifThenElseStatementNoShortIfThen :: StatementNoShortIf,
-    ifThenElseStatementNoShortIfElse :: StatementNoShortIf}
-  deriving (Eq, Ord, Read, Show)
-_IfThenElseStatementNoShortIf = Core.Name "hydra.java.syntax.IfThenElseStatementNoShortIf"
-_IfThenElseStatementNoShortIf_cond = Core.Name "cond"
-_IfThenElseStatementNoShortIf_then = Core.Name "then"
-_IfThenElseStatementNoShortIf_else = Core.Name "else"
-data AssertStatement =
-  AssertStatementSingle Expression |
-  AssertStatementPair AssertStatement_Pair
-  deriving (Eq, Ord, Read, Show)
-_AssertStatement = Core.Name "hydra.java.syntax.AssertStatement"
-_AssertStatement_single = Core.Name "single"
-_AssertStatement_pair = Core.Name "pair"
-data AssertStatement_Pair =
-  AssertStatement_Pair {
-    assertStatement_PairFirst :: Expression,
-    assertStatement_PairSecond :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_AssertStatement_Pair = Core.Name "hydra.java.syntax.AssertStatement_Pair"
-_AssertStatement_Pair_first = Core.Name "first"
-_AssertStatement_Pair_second = Core.Name "second"
-data SwitchStatement =
-  SwitchStatement {
-    switchStatementCond :: Expression,
-    switchStatementBlock :: SwitchBlock}
-  deriving (Eq, Ord, Read, Show)
-_SwitchStatement = Core.Name "hydra.java.syntax.SwitchStatement"
-_SwitchStatement_cond = Core.Name "cond"
-_SwitchStatement_block = Core.Name "block"
-newtype SwitchBlock =
-  SwitchBlock {
-    unSwitchBlock :: [SwitchBlock_Pair]}
-  deriving (Eq, Ord, Read, Show)
-_SwitchBlock = Core.Name "hydra.java.syntax.SwitchBlock"
-data SwitchBlock_Pair =
-  SwitchBlock_Pair {
-    switchBlock_PairStatements :: [SwitchBlockStatementGroup],
-    switchBlock_PairLabels :: [SwitchLabel]}
-  deriving (Eq, Ord, Read, Show)
-_SwitchBlock_Pair = Core.Name "hydra.java.syntax.SwitchBlock_Pair"
-_SwitchBlock_Pair_statements = Core.Name "statements"
-_SwitchBlock_Pair_labels = Core.Name "labels"
-data SwitchBlockStatementGroup =
-  SwitchBlockStatementGroup {
-    switchBlockStatementGroupLabels :: [SwitchLabel],
-    switchBlockStatementGroupStatements :: [BlockStatement]}
-  deriving (Eq, Ord, Read, Show)
-_SwitchBlockStatementGroup = Core.Name "hydra.java.syntax.SwitchBlockStatementGroup"
-_SwitchBlockStatementGroup_labels = Core.Name "labels"
-_SwitchBlockStatementGroup_statements = Core.Name "statements"
-data SwitchLabel =
-  SwitchLabelConstant ConstantExpression |
-  SwitchLabelEnumConstant EnumConstantName |
-  SwitchLabelDefault
-  deriving (Eq, Ord, Read, Show)
-_SwitchLabel = Core.Name "hydra.java.syntax.SwitchLabel"
-_SwitchLabel_constant = Core.Name "constant"
-_SwitchLabel_enumConstant = Core.Name "enumConstant"
-_SwitchLabel_default = Core.Name "default"
-newtype EnumConstantName =
-  EnumConstantName {
-    unEnumConstantName :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_EnumConstantName = Core.Name "hydra.java.syntax.EnumConstantName"
-data WhileStatement =
-  WhileStatement {
-    whileStatementCond :: (Maybe Expression),
-    whileStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_WhileStatement = Core.Name "hydra.java.syntax.WhileStatement"
-_WhileStatement_cond = Core.Name "cond"
-_WhileStatement_body = Core.Name "body"
-data WhileStatementNoShortIf =
-  WhileStatementNoShortIf {
-    whileStatementNoShortIfCond :: (Maybe Expression),
-    whileStatementNoShortIfBody :: StatementNoShortIf}
-  deriving (Eq, Ord, Read, Show)
-_WhileStatementNoShortIf = Core.Name "hydra.java.syntax.WhileStatementNoShortIf"
-_WhileStatementNoShortIf_cond = Core.Name "cond"
-_WhileStatementNoShortIf_body = Core.Name "body"
-data DoStatement =
-  DoStatement {
-    doStatementBody :: Statement,
-    doStatementConde :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_DoStatement = Core.Name "hydra.java.syntax.DoStatement"
-_DoStatement_body = Core.Name "body"
-_DoStatement_conde = Core.Name "conde"
-data ForStatement =
-  ForStatementBasic BasicForStatement |
-  ForStatementEnhanced EnhancedForStatement
-  deriving (Eq, Ord, Read, Show)
-_ForStatement = Core.Name "hydra.java.syntax.ForStatement"
-_ForStatement_basic = Core.Name "basic"
-_ForStatement_enhanced = Core.Name "enhanced"
-data ForStatementNoShortIf =
-  ForStatementNoShortIfBasic BasicForStatementNoShortIf |
-  ForStatementNoShortIfEnhanced EnhancedForStatementNoShortIf
-  deriving (Eq, Ord, Read, Show)
-_ForStatementNoShortIf = Core.Name "hydra.java.syntax.ForStatementNoShortIf"
-_ForStatementNoShortIf_basic = Core.Name "basic"
-_ForStatementNoShortIf_enhanced = Core.Name "enhanced"
-data BasicForStatement =
-  BasicForStatement {
-    basicForStatementCond :: ForCond,
-    basicForStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_BasicForStatement = Core.Name "hydra.java.syntax.BasicForStatement"
-_BasicForStatement_cond = Core.Name "cond"
-_BasicForStatement_body = Core.Name "body"
-data ForCond =
-  ForCond {
-    forCondInit :: (Maybe ForInit),
-    forCondCond :: (Maybe Expression),
-    forCondUpdate :: (Maybe ForUpdate)}
-  deriving (Eq, Ord, Read, Show)
-_ForCond = Core.Name "hydra.java.syntax.ForCond"
-_ForCond_init = Core.Name "init"
-_ForCond_cond = Core.Name "cond"
-_ForCond_update = Core.Name "update"
-data BasicForStatementNoShortIf =
-  BasicForStatementNoShortIf {
-    basicForStatementNoShortIfCond :: ForCond,
-    basicForStatementNoShortIfBody :: StatementNoShortIf}
-  deriving (Eq, Ord, Read, Show)
-_BasicForStatementNoShortIf = Core.Name "hydra.java.syntax.BasicForStatementNoShortIf"
-_BasicForStatementNoShortIf_cond = Core.Name "cond"
-_BasicForStatementNoShortIf_body = Core.Name "body"
-data ForInit =
-  ForInitStatements [StatementExpression] |
-  ForInitLocalVariable LocalVariableDeclaration
-  deriving (Eq, Ord, Read, Show)
-_ForInit = Core.Name "hydra.java.syntax.ForInit"
-_ForInit_statements = Core.Name "statements"
-_ForInit_localVariable = Core.Name "localVariable"
-newtype ForUpdate =
-  ForUpdate {
-    unForUpdate :: [StatementExpression]}
-  deriving (Eq, Ord, Read, Show)
-_ForUpdate = Core.Name "hydra.java.syntax.ForUpdate"
-data EnhancedForStatement =
-  EnhancedForStatement {
-    enhancedForStatementCond :: EnhancedForCond,
-    enhancedForStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_EnhancedForStatement = Core.Name "hydra.java.syntax.EnhancedForStatement"
-_EnhancedForStatement_cond = Core.Name "cond"
-_EnhancedForStatement_body = Core.Name "body"
-data EnhancedForCond =
-  EnhancedForCond {
-    enhancedForCondModifiers :: [VariableModifier],
-    enhancedForCondType :: LocalVariableType,
-    enhancedForCondId :: VariableDeclaratorId,
-    enhancedForCondExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_EnhancedForCond = Core.Name "hydra.java.syntax.EnhancedForCond"
-_EnhancedForCond_modifiers = Core.Name "modifiers"
-_EnhancedForCond_type = Core.Name "type"
-_EnhancedForCond_id = Core.Name "id"
-_EnhancedForCond_expression = Core.Name "expression"
-data EnhancedForStatementNoShortIf =
-  EnhancedForStatementNoShortIf {
-    enhancedForStatementNoShortIfCond :: EnhancedForCond,
-    enhancedForStatementNoShortIfBody :: StatementNoShortIf}
-  deriving (Eq, Ord, Read, Show)
-_EnhancedForStatementNoShortIf = Core.Name "hydra.java.syntax.EnhancedForStatementNoShortIf"
-_EnhancedForStatementNoShortIf_cond = Core.Name "cond"
-_EnhancedForStatementNoShortIf_body = Core.Name "body"
-newtype BreakStatement =
-  BreakStatement {
-    unBreakStatement :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-_BreakStatement = Core.Name "hydra.java.syntax.BreakStatement"
-newtype ContinueStatement =
-  ContinueStatement {
-    unContinueStatement :: (Maybe Identifier)}
-  deriving (Eq, Ord, Read, Show)
-_ContinueStatement = Core.Name "hydra.java.syntax.ContinueStatement"
-newtype ReturnStatement =
-  ReturnStatement {
-    unReturnStatement :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_ReturnStatement = Core.Name "hydra.java.syntax.ReturnStatement"
-newtype ThrowStatement =
-  ThrowStatement {
-    unThrowStatement :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_ThrowStatement = Core.Name "hydra.java.syntax.ThrowStatement"
-data SynchronizedStatement =
-  SynchronizedStatement {
-    synchronizedStatementExpression :: Expression,
-    synchronizedStatementBlock :: Block}
-  deriving (Eq, Ord, Read, Show)
-_SynchronizedStatement = Core.Name "hydra.java.syntax.SynchronizedStatement"
-_SynchronizedStatement_expression = Core.Name "expression"
-_SynchronizedStatement_block = Core.Name "block"
-data TryStatement =
-  TryStatementSimple TryStatement_Simple |
-  TryStatementWithFinally TryStatement_WithFinally |
-  TryStatementWithResources TryWithResourcesStatement
-  deriving (Eq, Ord, Read, Show)
-_TryStatement = Core.Name "hydra.java.syntax.TryStatement"
-_TryStatement_simple = Core.Name "simple"
-_TryStatement_withFinally = Core.Name "withFinally"
-_TryStatement_withResources = Core.Name "withResources"
-data TryStatement_Simple =
-  TryStatement_Simple {
-    tryStatement_SimpleBlock :: Block,
-    tryStatement_SimpleCatches :: Catches}
-  deriving (Eq, Ord, Read, Show)
-_TryStatement_Simple = Core.Name "hydra.java.syntax.TryStatement_Simple"
-_TryStatement_Simple_block = Core.Name "block"
-_TryStatement_Simple_catches = Core.Name "catches"
-data TryStatement_WithFinally =
-  TryStatement_WithFinally {
-    tryStatement_WithFinallyBlock :: Block,
-    tryStatement_WithFinallyCatches :: (Maybe Catches),
-    tryStatement_WithFinallyFinally :: Finally}
-  deriving (Eq, Ord, Read, Show)
-_TryStatement_WithFinally = Core.Name "hydra.java.syntax.TryStatement_WithFinally"
-_TryStatement_WithFinally_block = Core.Name "block"
-_TryStatement_WithFinally_catches = Core.Name "catches"
-_TryStatement_WithFinally_finally = Core.Name "finally"
-newtype Catches =
-  Catches {
-    unCatches :: [CatchClause]}
-  deriving (Eq, Ord, Read, Show)
-_Catches = Core.Name "hydra.java.syntax.Catches"
-data CatchClause =
-  CatchClause {
-    catchClauseParameter :: (Maybe CatchFormalParameter),
-    catchClauseBlock :: Block}
-  deriving (Eq, Ord, Read, Show)
-_CatchClause = Core.Name "hydra.java.syntax.CatchClause"
-_CatchClause_parameter = Core.Name "parameter"
-_CatchClause_block = Core.Name "block"
-data CatchFormalParameter =
-  CatchFormalParameter {
-    catchFormalParameterModifiers :: [VariableModifier],
-    catchFormalParameterType :: CatchType,
-    catchFormalParameterId :: VariableDeclaratorId}
-  deriving (Eq, Ord, Read, Show)
-_CatchFormalParameter = Core.Name "hydra.java.syntax.CatchFormalParameter"
-_CatchFormalParameter_modifiers = Core.Name "modifiers"
-_CatchFormalParameter_type = Core.Name "type"
-_CatchFormalParameter_id = Core.Name "id"
-data CatchType =
-  CatchType {
-    catchTypeType :: UnannClassType,
-    catchTypeTypes :: [ClassType]}
-  deriving (Eq, Ord, Read, Show)
-_CatchType = Core.Name "hydra.java.syntax.CatchType"
-_CatchType_type = Core.Name "type"
-_CatchType_types = Core.Name "types"
-newtype Finally =
-  Finally {
-    unFinally :: Block}
-  deriving (Eq, Ord, Read, Show)
-_Finally = Core.Name "hydra.java.syntax.Finally"
-data TryWithResourcesStatement =
-  TryWithResourcesStatement {
-    tryWithResourcesStatementResourceSpecification :: ResourceSpecification,
-    tryWithResourcesStatementBlock :: Block,
-    tryWithResourcesStatementCatches :: (Maybe Catches),
-    tryWithResourcesStatementFinally :: (Maybe Finally)}
-  deriving (Eq, Ord, Read, Show)
-_TryWithResourcesStatement = Core.Name "hydra.java.syntax.TryWithResourcesStatement"
-_TryWithResourcesStatement_resourceSpecification = Core.Name "resourceSpecification"
-_TryWithResourcesStatement_block = Core.Name "block"
-_TryWithResourcesStatement_catches = Core.Name "catches"
-_TryWithResourcesStatement_finally = Core.Name "finally"
-newtype ResourceSpecification =
-  ResourceSpecification {
-    unResourceSpecification :: [Resource]}
-  deriving (Eq, Ord, Read, Show)
-_ResourceSpecification = Core.Name "hydra.java.syntax.ResourceSpecification"
-data Resource =
-  ResourceLocal Resource_Local |
-  ResourceVariable VariableAccess
-  deriving (Eq, Ord, Read, Show)
-_Resource = Core.Name "hydra.java.syntax.Resource"
-_Resource_local = Core.Name "local"
-_Resource_variable = Core.Name "variable"
-data Resource_Local =
-  Resource_Local {
-    resource_LocalModifiers :: [VariableModifier],
-    resource_LocalType :: LocalVariableType,
-    resource_LocalIdentifier :: Identifier,
-    resource_LocalExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Resource_Local = Core.Name "hydra.java.syntax.Resource_Local"
-_Resource_Local_modifiers = Core.Name "modifiers"
-_Resource_Local_type = Core.Name "type"
-_Resource_Local_identifier = Core.Name "identifier"
-_Resource_Local_expression = Core.Name "expression"
-data VariableAccess =
-  VariableAccessExpressionName ExpressionName |
-  VariableAccessFieldAccess FieldAccess
-  deriving (Eq, Ord, Read, Show)
-_VariableAccess = Core.Name "hydra.java.syntax.VariableAccess"
-_VariableAccess_expressionName = Core.Name "expressionName"
-_VariableAccess_fieldAccess = Core.Name "fieldAccess"
-data Primary =
-  PrimaryNoNewArray PrimaryNoNewArrayExpression |
-  PrimaryArrayCreation ArrayCreationExpression
-  deriving (Eq, Ord, Read, Show)
-_Primary = Core.Name "hydra.java.syntax.Primary"
-_Primary_noNewArray = Core.Name "noNewArray"
-_Primary_arrayCreation = Core.Name "arrayCreation"
-data PrimaryNoNewArrayExpression =
-  PrimaryNoNewArrayExpressionLiteral Literal |
-  PrimaryNoNewArrayExpressionClassLiteral ClassLiteral |
-  PrimaryNoNewArrayExpressionThis |
-  PrimaryNoNewArrayExpressionDotThis TypeName |
-  PrimaryNoNewArrayExpressionParens Expression |
-  PrimaryNoNewArrayExpressionClassInstance ClassInstanceCreationExpression |
-  PrimaryNoNewArrayExpressionFieldAccess FieldAccess |
-  PrimaryNoNewArrayExpressionArrayAccess ArrayAccess |
-  PrimaryNoNewArrayExpressionMethodInvocation MethodInvocation |
-  PrimaryNoNewArrayExpressionMethodReference MethodReference
-  deriving (Eq, Ord, Read, Show)
-_PrimaryNoNewArrayExpression = Core.Name "hydra.java.syntax.PrimaryNoNewArrayExpression"
-_PrimaryNoNewArrayExpression_literal = Core.Name "literal"
-_PrimaryNoNewArrayExpression_classLiteral = Core.Name "classLiteral"
-_PrimaryNoNewArrayExpression_this = Core.Name "this"
-_PrimaryNoNewArrayExpression_dotThis = Core.Name "dotThis"
-_PrimaryNoNewArrayExpression_parens = Core.Name "parens"
-_PrimaryNoNewArrayExpression_classInstance = Core.Name "classInstance"
-_PrimaryNoNewArrayExpression_fieldAccess = Core.Name "fieldAccess"
-_PrimaryNoNewArrayExpression_arrayAccess = Core.Name "arrayAccess"
-_PrimaryNoNewArrayExpression_methodInvocation = Core.Name "methodInvocation"
-_PrimaryNoNewArrayExpression_methodReference = Core.Name "methodReference"
-data ClassLiteral =
-  ClassLiteralType TypeNameArray |
-  ClassLiteralNumericType NumericTypeArray |
-  ClassLiteralBoolean BooleanArray |
-  ClassLiteralVoid
-  deriving (Eq, Ord, Read, Show)
-_ClassLiteral = Core.Name "hydra.java.syntax.ClassLiteral"
-_ClassLiteral_type = Core.Name "type"
-_ClassLiteral_numericType = Core.Name "numericType"
-_ClassLiteral_boolean = Core.Name "boolean"
-_ClassLiteral_void = Core.Name "void"
-data TypeNameArray =
-  TypeNameArraySimple TypeName |
-  TypeNameArrayArray TypeNameArray
-  deriving (Eq, Ord, Read, Show)
-_TypeNameArray = Core.Name "hydra.java.syntax.TypeNameArray"
-_TypeNameArray_simple = Core.Name "simple"
-_TypeNameArray_array = Core.Name "array"
-data NumericTypeArray =
-  NumericTypeArraySimple NumericType |
-  NumericTypeArrayArray NumericTypeArray
-  deriving (Eq, Ord, Read, Show)
-_NumericTypeArray = Core.Name "hydra.java.syntax.NumericTypeArray"
-_NumericTypeArray_simple = Core.Name "simple"
-_NumericTypeArray_array = Core.Name "array"
-data BooleanArray =
-  BooleanArraySimple |
-  BooleanArrayArray BooleanArray
-  deriving (Eq, Ord, Read, Show)
-_BooleanArray = Core.Name "hydra.java.syntax.BooleanArray"
-_BooleanArray_simple = Core.Name "simple"
-_BooleanArray_array = Core.Name "array"
-data ClassInstanceCreationExpression =
-  ClassInstanceCreationExpression {
-    classInstanceCreationExpressionQualifier :: (Maybe ClassInstanceCreationExpression_Qualifier),
-    classInstanceCreationExpressionExpression :: UnqualifiedClassInstanceCreationExpression}
-  deriving (Eq, Ord, Read, Show)
-_ClassInstanceCreationExpression = Core.Name "hydra.java.syntax.ClassInstanceCreationExpression"
-_ClassInstanceCreationExpression_qualifier = Core.Name "qualifier"
-_ClassInstanceCreationExpression_expression = Core.Name "expression"
-data ClassInstanceCreationExpression_Qualifier =
-  ClassInstanceCreationExpression_QualifierExpression ExpressionName |
-  ClassInstanceCreationExpression_QualifierPrimary Primary
-  deriving (Eq, Ord, Read, Show)
-_ClassInstanceCreationExpression_Qualifier = Core.Name "hydra.java.syntax.ClassInstanceCreationExpression_Qualifier"
-_ClassInstanceCreationExpression_Qualifier_expression = Core.Name "expression"
-_ClassInstanceCreationExpression_Qualifier_primary = Core.Name "primary"
-data UnqualifiedClassInstanceCreationExpression =
-  UnqualifiedClassInstanceCreationExpression {
-    unqualifiedClassInstanceCreationExpressionTypeArguments :: [TypeArgument],
-    unqualifiedClassInstanceCreationExpressionClassOrInterface :: ClassOrInterfaceTypeToInstantiate,
-    unqualifiedClassInstanceCreationExpressionArguments :: [Expression],
-    unqualifiedClassInstanceCreationExpressionBody :: (Maybe ClassBody)}
-  deriving (Eq, Ord, Read, Show)
-_UnqualifiedClassInstanceCreationExpression = Core.Name "hydra.java.syntax.UnqualifiedClassInstanceCreationExpression"
-_UnqualifiedClassInstanceCreationExpression_typeArguments = Core.Name "typeArguments"
-_UnqualifiedClassInstanceCreationExpression_classOrInterface = Core.Name "classOrInterface"
-_UnqualifiedClassInstanceCreationExpression_arguments = Core.Name "arguments"
-_UnqualifiedClassInstanceCreationExpression_body = Core.Name "body"
-data ClassOrInterfaceTypeToInstantiate =
-  ClassOrInterfaceTypeToInstantiate {
-    classOrInterfaceTypeToInstantiateIdentifiers :: [AnnotatedIdentifier],
-    classOrInterfaceTypeToInstantiateTypeArguments :: (Maybe TypeArgumentsOrDiamond)}
-  deriving (Eq, Ord, Read, Show)
-_ClassOrInterfaceTypeToInstantiate = Core.Name "hydra.java.syntax.ClassOrInterfaceTypeToInstantiate"
-_ClassOrInterfaceTypeToInstantiate_identifiers = Core.Name "identifiers"
-_ClassOrInterfaceTypeToInstantiate_typeArguments = Core.Name "typeArguments"
-data AnnotatedIdentifier =
-  AnnotatedIdentifier {
-    annotatedIdentifierAnnotations :: [Annotation],
-    annotatedIdentifierIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_AnnotatedIdentifier = Core.Name "hydra.java.syntax.AnnotatedIdentifier"
-_AnnotatedIdentifier_annotations = Core.Name "annotations"
-_AnnotatedIdentifier_identifier = Core.Name "identifier"
-data TypeArgumentsOrDiamond =
-  TypeArgumentsOrDiamondArguments [TypeArgument] |
-  TypeArgumentsOrDiamondDiamond
-  deriving (Eq, Ord, Read, Show)
-_TypeArgumentsOrDiamond = Core.Name "hydra.java.syntax.TypeArgumentsOrDiamond"
-_TypeArgumentsOrDiamond_arguments = Core.Name "arguments"
-_TypeArgumentsOrDiamond_diamond = Core.Name "diamond"
-data FieldAccess =
-  FieldAccess {
-    fieldAccessQualifier :: FieldAccess_Qualifier,
-    fieldAccessIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_FieldAccess = Core.Name "hydra.java.syntax.FieldAccess"
-_FieldAccess_qualifier = Core.Name "qualifier"
-_FieldAccess_identifier = Core.Name "identifier"
-data FieldAccess_Qualifier =
-  FieldAccess_QualifierPrimary Primary |
-  FieldAccess_QualifierSuper |
-  FieldAccess_QualifierTyped TypeName
-  deriving (Eq, Ord, Read, Show)
-_FieldAccess_Qualifier = Core.Name "hydra.java.syntax.FieldAccess_Qualifier"
-_FieldAccess_Qualifier_primary = Core.Name "primary"
-_FieldAccess_Qualifier_super = Core.Name "super"
-_FieldAccess_Qualifier_typed = Core.Name "typed"
-data ArrayAccess =
-  ArrayAccess {
-    arrayAccessExpression :: (Maybe Expression),
-    arrayAccessVariant :: ArrayAccess_Variant}
-  deriving (Eq, Ord, Read, Show)
-_ArrayAccess = Core.Name "hydra.java.syntax.ArrayAccess"
-_ArrayAccess_expression = Core.Name "expression"
-_ArrayAccess_variant = Core.Name "variant"
-data ArrayAccess_Variant =
-  ArrayAccess_VariantName ExpressionName |
-  ArrayAccess_VariantPrimary PrimaryNoNewArrayExpression
-  deriving (Eq, Ord, Read, Show)
-_ArrayAccess_Variant = Core.Name "hydra.java.syntax.ArrayAccess_Variant"
-_ArrayAccess_Variant_name = Core.Name "name"
-_ArrayAccess_Variant_primary = Core.Name "primary"
-data MethodInvocation =
-  MethodInvocation {
-    methodInvocationHeader :: MethodInvocation_Header,
-    methodInvocationArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_MethodInvocation = Core.Name "hydra.java.syntax.MethodInvocation"
-_MethodInvocation_header = Core.Name "header"
-_MethodInvocation_arguments = Core.Name "arguments"
-data MethodInvocation_Header =
-  MethodInvocation_HeaderSimple MethodName |
-  MethodInvocation_HeaderComplex MethodInvocation_Complex
-  deriving (Eq, Ord, Read, Show)
-_MethodInvocation_Header = Core.Name "hydra.java.syntax.MethodInvocation_Header"
-_MethodInvocation_Header_simple = Core.Name "simple"
-_MethodInvocation_Header_complex = Core.Name "complex"
-data MethodInvocation_Complex =
-  MethodInvocation_Complex {
-    methodInvocation_ComplexVariant :: MethodInvocation_Variant,
-    methodInvocation_ComplexTypeArguments :: [TypeArgument],
-    methodInvocation_ComplexIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_MethodInvocation_Complex = Core.Name "hydra.java.syntax.MethodInvocation_Complex"
-_MethodInvocation_Complex_variant = Core.Name "variant"
-_MethodInvocation_Complex_typeArguments = Core.Name "typeArguments"
-_MethodInvocation_Complex_identifier = Core.Name "identifier"
-data MethodInvocation_Variant =
-  MethodInvocation_VariantType TypeName |
-  MethodInvocation_VariantExpression ExpressionName |
-  MethodInvocation_VariantPrimary Primary |
-  MethodInvocation_VariantSuper |
-  MethodInvocation_VariantTypeSuper TypeName
-  deriving (Eq, Ord, Read, Show)
-_MethodInvocation_Variant = Core.Name "hydra.java.syntax.MethodInvocation_Variant"
-_MethodInvocation_Variant_type = Core.Name "type"
-_MethodInvocation_Variant_expression = Core.Name "expression"
-_MethodInvocation_Variant_primary = Core.Name "primary"
-_MethodInvocation_Variant_super = Core.Name "super"
-_MethodInvocation_Variant_typeSuper = Core.Name "typeSuper"
-data MethodReference =
-  MethodReferenceExpression MethodReference_Expression |
-  MethodReferencePrimary MethodReference_Primary |
-  MethodReferenceReferenceType MethodReference_ReferenceType |
-  MethodReferenceSuper MethodReference_Super |
-  MethodReferenceNew MethodReference_New |
-  MethodReferenceArray MethodReference_Array
-  deriving (Eq, Ord, Read, Show)
-_MethodReference = Core.Name "hydra.java.syntax.MethodReference"
-_MethodReference_expression = Core.Name "expression"
-_MethodReference_primary = Core.Name "primary"
-_MethodReference_referenceType = Core.Name "referenceType"
-_MethodReference_super = Core.Name "super"
-_MethodReference_new = Core.Name "new"
-_MethodReference_array = Core.Name "array"
-data MethodReference_Expression =
-  MethodReference_Expression {
-    methodReference_ExpressionName :: ExpressionName,
-    methodReference_ExpressionTypeArguments :: [TypeArgument],
-    methodReference_ExpressionIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_MethodReference_Expression = Core.Name "hydra.java.syntax.MethodReference_Expression"
-_MethodReference_Expression_name = Core.Name "name"
-_MethodReference_Expression_typeArguments = Core.Name "typeArguments"
-_MethodReference_Expression_identifier = Core.Name "identifier"
-data MethodReference_Primary =
-  MethodReference_Primary {
-    methodReference_PrimaryPrimary :: Primary,
-    methodReference_PrimaryTypeArguments :: [TypeArgument],
-    methodReference_PrimaryIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_MethodReference_Primary = Core.Name "hydra.java.syntax.MethodReference_Primary"
-_MethodReference_Primary_primary = Core.Name "primary"
-_MethodReference_Primary_typeArguments = Core.Name "typeArguments"
-_MethodReference_Primary_identifier = Core.Name "identifier"
-data MethodReference_ReferenceType =
-  MethodReference_ReferenceType {
-    methodReference_ReferenceTypeReferenceType :: ReferenceType,
-    methodReference_ReferenceTypeTypeArguments :: [TypeArgument],
-    methodReference_ReferenceTypeIdentifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-_MethodReference_ReferenceType = Core.Name "hydra.java.syntax.MethodReference_ReferenceType"
-_MethodReference_ReferenceType_referenceType = Core.Name "referenceType"
-_MethodReference_ReferenceType_typeArguments = Core.Name "typeArguments"
-_MethodReference_ReferenceType_identifier = Core.Name "identifier"
-data MethodReference_Super =
-  MethodReference_Super {
-    methodReference_SuperTypeArguments :: [TypeArgument],
-    methodReference_SuperIdentifier :: Identifier,
-    methodReference_SuperSuper :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_MethodReference_Super = Core.Name "hydra.java.syntax.MethodReference_Super"
-_MethodReference_Super_typeArguments = Core.Name "typeArguments"
-_MethodReference_Super_identifier = Core.Name "identifier"
-_MethodReference_Super_super = Core.Name "super"
-data MethodReference_New =
-  MethodReference_New {
-    methodReference_NewClassType :: ClassType,
-    methodReference_NewTypeArguments :: [TypeArgument]}
-  deriving (Eq, Ord, Read, Show)
-_MethodReference_New = Core.Name "hydra.java.syntax.MethodReference_New"
-_MethodReference_New_classType = Core.Name "classType"
-_MethodReference_New_typeArguments = Core.Name "typeArguments"
-newtype MethodReference_Array =
-  MethodReference_Array {
-    unMethodReference_Array :: ArrayType}
-  deriving (Eq, Ord, Read, Show)
-_MethodReference_Array = Core.Name "hydra.java.syntax.MethodReference_Array"
-data ArrayCreationExpression =
-  ArrayCreationExpressionPrimitive ArrayCreationExpression_Primitive |
-  ArrayCreationExpressionClassOrInterface ArrayCreationExpression_ClassOrInterface |
-  ArrayCreationExpressionPrimitiveArray ArrayCreationExpression_PrimitiveArray |
-  ArrayCreationExpressionClassOrInterfaceArray ArrayCreationExpression_ClassOrInterfaceArray
-  deriving (Eq, Ord, Read, Show)
-_ArrayCreationExpression = Core.Name "hydra.java.syntax.ArrayCreationExpression"
-_ArrayCreationExpression_primitive = Core.Name "primitive"
-_ArrayCreationExpression_classOrInterface = Core.Name "classOrInterface"
-_ArrayCreationExpression_primitiveArray = Core.Name "primitiveArray"
-_ArrayCreationExpression_classOrInterfaceArray = Core.Name "classOrInterfaceArray"
-data ArrayCreationExpression_Primitive =
-  ArrayCreationExpression_Primitive {
-    arrayCreationExpression_PrimitiveType :: PrimitiveTypeWithAnnotations,
-    arrayCreationExpression_PrimitiveDimExprs :: [DimExpr],
-    arrayCreationExpression_PrimitiveDims :: (Maybe Dims)}
-  deriving (Eq, Ord, Read, Show)
-_ArrayCreationExpression_Primitive = Core.Name "hydra.java.syntax.ArrayCreationExpression_Primitive"
-_ArrayCreationExpression_Primitive_type = Core.Name "type"
-_ArrayCreationExpression_Primitive_dimExprs = Core.Name "dimExprs"
-_ArrayCreationExpression_Primitive_dims = Core.Name "dims"
-data ArrayCreationExpression_ClassOrInterface =
-  ArrayCreationExpression_ClassOrInterface {
-    arrayCreationExpression_ClassOrInterfaceType :: ClassOrInterfaceType,
-    arrayCreationExpression_ClassOrInterfaceDimExprs :: [DimExpr],
-    arrayCreationExpression_ClassOrInterfaceDims :: (Maybe Dims)}
-  deriving (Eq, Ord, Read, Show)
-_ArrayCreationExpression_ClassOrInterface = Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterface"
-_ArrayCreationExpression_ClassOrInterface_type = Core.Name "type"
-_ArrayCreationExpression_ClassOrInterface_dimExprs = Core.Name "dimExprs"
-_ArrayCreationExpression_ClassOrInterface_dims = Core.Name "dims"
-data ArrayCreationExpression_PrimitiveArray =
-  ArrayCreationExpression_PrimitiveArray {
-    arrayCreationExpression_PrimitiveArrayType :: PrimitiveTypeWithAnnotations,
-    arrayCreationExpression_PrimitiveArrayDims :: [Dims],
-    arrayCreationExpression_PrimitiveArrayArray :: ArrayInitializer}
-  deriving (Eq, Ord, Read, Show)
-_ArrayCreationExpression_PrimitiveArray = Core.Name "hydra.java.syntax.ArrayCreationExpression_PrimitiveArray"
-_ArrayCreationExpression_PrimitiveArray_type = Core.Name "type"
-_ArrayCreationExpression_PrimitiveArray_dims = Core.Name "dims"
-_ArrayCreationExpression_PrimitiveArray_array = Core.Name "array"
-data ArrayCreationExpression_ClassOrInterfaceArray =
-  ArrayCreationExpression_ClassOrInterfaceArray {
-    arrayCreationExpression_ClassOrInterfaceArrayType :: ClassOrInterfaceType,
-    arrayCreationExpression_ClassOrInterfaceArrayDims :: [Dims],
-    arrayCreationExpression_ClassOrInterfaceArrayArray :: ArrayInitializer}
-  deriving (Eq, Ord, Read, Show)
-_ArrayCreationExpression_ClassOrInterfaceArray =
-    Core.Name "hydra.java.syntax.ArrayCreationExpression_ClassOrInterfaceArray"
-_ArrayCreationExpression_ClassOrInterfaceArray_type = Core.Name "type"
-_ArrayCreationExpression_ClassOrInterfaceArray_dims = Core.Name "dims"
-_ArrayCreationExpression_ClassOrInterfaceArray_array = Core.Name "array"
-data DimExpr =
-  DimExpr {
-    dimExprAnnotations :: [Annotation],
-    dimExprExpression :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_DimExpr = Core.Name "hydra.java.syntax.DimExpr"
-_DimExpr_annotations = Core.Name "annotations"
-_DimExpr_expression = Core.Name "expression"
-data Expression =
-  ExpressionLambda LambdaExpression |
-  ExpressionAssignment AssignmentExpression
-  deriving (Eq, Ord, Read, Show)
-_Expression = Core.Name "hydra.java.syntax.Expression"
-_Expression_lambda = Core.Name "lambda"
-_Expression_assignment = Core.Name "assignment"
-data LambdaExpression =
-  LambdaExpression {
-    lambdaExpressionParameters :: LambdaParameters,
-    lambdaExpressionBody :: LambdaBody}
-  deriving (Eq, Ord, Read, Show)
-_LambdaExpression = Core.Name "hydra.java.syntax.LambdaExpression"
-_LambdaExpression_parameters = Core.Name "parameters"
-_LambdaExpression_body = Core.Name "body"
-data LambdaParameters =
-  LambdaParametersTuple [LambdaParameters] |
-  LambdaParametersSingle Identifier
-  deriving (Eq, Ord, Read, Show)
-_LambdaParameters = Core.Name "hydra.java.syntax.LambdaParameters"
-_LambdaParameters_tuple = Core.Name "tuple"
-_LambdaParameters_single = Core.Name "single"
-data LambdaParameter =
-  LambdaParameterNormal LambdaParameter_Normal |
-  LambdaParameterVariableArity VariableArityParameter
-  deriving (Eq, Ord, Read, Show)
-_LambdaParameter = Core.Name "hydra.java.syntax.LambdaParameter"
-_LambdaParameter_normal = Core.Name "normal"
-_LambdaParameter_variableArity = Core.Name "variableArity"
-data LambdaParameter_Normal =
-  LambdaParameter_Normal {
-    lambdaParameter_NormalModifiers :: [VariableModifier],
-    lambdaParameter_NormalType :: LambdaParameterType,
-    lambdaParameter_NormalId :: VariableDeclaratorId}
-  deriving (Eq, Ord, Read, Show)
-_LambdaParameter_Normal = Core.Name "hydra.java.syntax.LambdaParameter_Normal"
-_LambdaParameter_Normal_modifiers = Core.Name "modifiers"
-_LambdaParameter_Normal_type = Core.Name "type"
-_LambdaParameter_Normal_id = Core.Name "id"
-data LambdaParameterType =
-  LambdaParameterTypeType UnannType |
-  LambdaParameterTypeVar
-  deriving (Eq, Ord, Read, Show)
-_LambdaParameterType = Core.Name "hydra.java.syntax.LambdaParameterType"
-_LambdaParameterType_type = Core.Name "type"
-_LambdaParameterType_var = Core.Name "var"
-data LambdaBody =
-  LambdaBodyExpression Expression |
-  LambdaBodyBlock Block
-  deriving (Eq, Ord, Read, Show)
-_LambdaBody = Core.Name "hydra.java.syntax.LambdaBody"
-_LambdaBody_expression = Core.Name "expression"
-_LambdaBody_block = Core.Name "block"
-data AssignmentExpression =
-  AssignmentExpressionConditional ConditionalExpression |
-  AssignmentExpressionAssignment Assignment
-  deriving (Eq, Ord, Read, Show)
-_AssignmentExpression = Core.Name "hydra.java.syntax.AssignmentExpression"
-_AssignmentExpression_conditional = Core.Name "conditional"
-_AssignmentExpression_assignment = Core.Name "assignment"
-data Assignment =
-  Assignment {
-    assignmentLhs :: LeftHandSide,
-    assignmentOp :: AssignmentOperator,
-    assignmentExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Assignment = Core.Name "hydra.java.syntax.Assignment"
-_Assignment_lhs = Core.Name "lhs"
-_Assignment_op = Core.Name "op"
-_Assignment_expression = Core.Name "expression"
-data LeftHandSide =
-  LeftHandSideExpressionName ExpressionName |
-  LeftHandSideFieldAccess FieldAccess |
-  LeftHandSideArrayAccess ArrayAccess
-  deriving (Eq, Ord, Read, Show)
-_LeftHandSide = Core.Name "hydra.java.syntax.LeftHandSide"
-_LeftHandSide_expressionName = Core.Name "expressionName"
-_LeftHandSide_fieldAccess = Core.Name "fieldAccess"
-_LeftHandSide_arrayAccess = Core.Name "arrayAccess"
-data AssignmentOperator =
-  AssignmentOperatorSimple |
-  AssignmentOperatorTimes |
-  AssignmentOperatorDiv |
-  AssignmentOperatorMod |
-  AssignmentOperatorPlus |
-  AssignmentOperatorMinus |
-  AssignmentOperatorShiftLeft |
-  AssignmentOperatorShiftRight |
-  AssignmentOperatorShiftRightZeroFill |
-  AssignmentOperatorAnd |
-  AssignmentOperatorXor |
-  AssignmentOperatorOr
-  deriving (Eq, Ord, Read, Show)
-_AssignmentOperator = Core.Name "hydra.java.syntax.AssignmentOperator"
-_AssignmentOperator_simple = Core.Name "simple"
-_AssignmentOperator_times = Core.Name "times"
-_AssignmentOperator_div = Core.Name "div"
-_AssignmentOperator_mod = Core.Name "mod"
-_AssignmentOperator_plus = Core.Name "plus"
-_AssignmentOperator_minus = Core.Name "minus"
-_AssignmentOperator_shiftLeft = Core.Name "shiftLeft"
-_AssignmentOperator_shiftRight = Core.Name "shiftRight"
-_AssignmentOperator_shiftRightZeroFill = Core.Name "shiftRightZeroFill"
-_AssignmentOperator_and = Core.Name "and"
-_AssignmentOperator_xor = Core.Name "xor"
-_AssignmentOperator_or = Core.Name "or"
-data ConditionalExpression =
-  ConditionalExpressionSimple ConditionalOrExpression |
-  ConditionalExpressionTernaryCond ConditionalExpression_TernaryCond |
-  ConditionalExpressionTernaryLambda ConditionalExpression_TernaryLambda
-  deriving (Eq, Ord, Read, Show)
-_ConditionalExpression = Core.Name "hydra.java.syntax.ConditionalExpression"
-_ConditionalExpression_simple = Core.Name "simple"
-_ConditionalExpression_ternaryCond = Core.Name "ternaryCond"
-_ConditionalExpression_ternaryLambda = Core.Name "ternaryLambda"
-data ConditionalExpression_TernaryCond =
-  ConditionalExpression_TernaryCond {
-    conditionalExpression_TernaryCondCond :: ConditionalOrExpression,
-    conditionalExpression_TernaryCondIfTrue :: Expression,
-    conditionalExpression_TernaryCondIfFalse :: ConditionalExpression}
-  deriving (Eq, Ord, Read, Show)
-_ConditionalExpression_TernaryCond = Core.Name "hydra.java.syntax.ConditionalExpression_TernaryCond"
-_ConditionalExpression_TernaryCond_cond = Core.Name "cond"
-_ConditionalExpression_TernaryCond_ifTrue = Core.Name "ifTrue"
-_ConditionalExpression_TernaryCond_ifFalse = Core.Name "ifFalse"
-data ConditionalExpression_TernaryLambda =
-  ConditionalExpression_TernaryLambda {
-    conditionalExpression_TernaryLambdaCond :: ConditionalOrExpression,
-    conditionalExpression_TernaryLambdaIfTrue :: Expression,
-    conditionalExpression_TernaryLambdaIfFalse :: LambdaExpression}
-  deriving (Eq, Ord, Read, Show)
-_ConditionalExpression_TernaryLambda = Core.Name "hydra.java.syntax.ConditionalExpression_TernaryLambda"
-_ConditionalExpression_TernaryLambda_cond = Core.Name "cond"
-_ConditionalExpression_TernaryLambda_ifTrue = Core.Name "ifTrue"
-_ConditionalExpression_TernaryLambda_ifFalse = Core.Name "ifFalse"
-newtype ConditionalOrExpression =
-  ConditionalOrExpression {
-    unConditionalOrExpression :: [ConditionalAndExpression]}
-  deriving (Eq, Ord, Read, Show)
-_ConditionalOrExpression = Core.Name "hydra.java.syntax.ConditionalOrExpression"
-newtype ConditionalAndExpression =
-  ConditionalAndExpression {
-    unConditionalAndExpression :: [InclusiveOrExpression]}
-  deriving (Eq, Ord, Read, Show)
-_ConditionalAndExpression = Core.Name "hydra.java.syntax.ConditionalAndExpression"
-newtype InclusiveOrExpression =
-  InclusiveOrExpression {
-    unInclusiveOrExpression :: [ExclusiveOrExpression]}
-  deriving (Eq, Ord, Read, Show)
-_InclusiveOrExpression = Core.Name "hydra.java.syntax.InclusiveOrExpression"
-newtype ExclusiveOrExpression =
-  ExclusiveOrExpression {
-    unExclusiveOrExpression :: [AndExpression]}
-  deriving (Eq, Ord, Read, Show)
-_ExclusiveOrExpression = Core.Name "hydra.java.syntax.ExclusiveOrExpression"
-newtype AndExpression =
-  AndExpression {
-    unAndExpression :: [EqualityExpression]}
-  deriving (Eq, Ord, Read, Show)
-_AndExpression = Core.Name "hydra.java.syntax.AndExpression"
-data EqualityExpression =
-  EqualityExpressionUnary RelationalExpression |
-  EqualityExpressionEqual EqualityExpression_Binary |
-  EqualityExpressionNotEqual EqualityExpression_Binary
-  deriving (Eq, Ord, Read, Show)
-_EqualityExpression = Core.Name "hydra.java.syntax.EqualityExpression"
-_EqualityExpression_unary = Core.Name "unary"
-_EqualityExpression_equal = Core.Name "equal"
-_EqualityExpression_notEqual = Core.Name "notEqual"
-data EqualityExpression_Binary =
-  EqualityExpression_Binary {
-    equalityExpression_BinaryLhs :: EqualityExpression,
-    equalityExpression_BinaryRhs :: RelationalExpression}
-  deriving (Eq, Ord, Read, Show)
-_EqualityExpression_Binary = Core.Name "hydra.java.syntax.EqualityExpression_Binary"
-_EqualityExpression_Binary_lhs = Core.Name "lhs"
-_EqualityExpression_Binary_rhs = Core.Name "rhs"
-data RelationalExpression =
-  RelationalExpressionSimple ShiftExpression |
-  RelationalExpressionLessThan RelationalExpression_LessThan |
-  RelationalExpressionGreaterThan RelationalExpression_GreaterThan |
-  RelationalExpressionLessThanEqual RelationalExpression_LessThanEqual |
-  RelationalExpressionGreaterThanEqual RelationalExpression_GreaterThanEqual |
-  RelationalExpressionInstanceof RelationalExpression_InstanceOf
-  deriving (Eq, Ord, Read, Show)
-_RelationalExpression = Core.Name "hydra.java.syntax.RelationalExpression"
-_RelationalExpression_simple = Core.Name "simple"
-_RelationalExpression_lessThan = Core.Name "lessThan"
-_RelationalExpression_greaterThan = Core.Name "greaterThan"
-_RelationalExpression_lessThanEqual = Core.Name "lessThanEqual"
-_RelationalExpression_greaterThanEqual = Core.Name "greaterThanEqual"
-_RelationalExpression_instanceof = Core.Name "instanceof"
-data RelationalExpression_LessThan =
-  RelationalExpression_LessThan {
-    relationalExpression_LessThanLhs :: RelationalExpression,
-    relationalExpression_LessThanRhs :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-_RelationalExpression_LessThan = Core.Name "hydra.java.syntax.RelationalExpression_LessThan"
-_RelationalExpression_LessThan_lhs = Core.Name "lhs"
-_RelationalExpression_LessThan_rhs = Core.Name "rhs"
-data RelationalExpression_GreaterThan =
-  RelationalExpression_GreaterThan {
-    relationalExpression_GreaterThanLhs :: RelationalExpression,
-    relationalExpression_GreaterThanRhs :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-_RelationalExpression_GreaterThan = Core.Name "hydra.java.syntax.RelationalExpression_GreaterThan"
-_RelationalExpression_GreaterThan_lhs = Core.Name "lhs"
-_RelationalExpression_GreaterThan_rhs = Core.Name "rhs"
-data RelationalExpression_LessThanEqual =
-  RelationalExpression_LessThanEqual {
-    relationalExpression_LessThanEqualLhs :: RelationalExpression,
-    relationalExpression_LessThanEqualRhs :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-_RelationalExpression_LessThanEqual = Core.Name "hydra.java.syntax.RelationalExpression_LessThanEqual"
-_RelationalExpression_LessThanEqual_lhs = Core.Name "lhs"
-_RelationalExpression_LessThanEqual_rhs = Core.Name "rhs"
-data RelationalExpression_GreaterThanEqual =
-  RelationalExpression_GreaterThanEqual {
-    relationalExpression_GreaterThanEqualLhs :: RelationalExpression,
-    relationalExpression_GreaterThanEqualRhs :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-_RelationalExpression_GreaterThanEqual = Core.Name "hydra.java.syntax.RelationalExpression_GreaterThanEqual"
-_RelationalExpression_GreaterThanEqual_lhs = Core.Name "lhs"
-_RelationalExpression_GreaterThanEqual_rhs = Core.Name "rhs"
-data RelationalExpression_InstanceOf =
-  RelationalExpression_InstanceOf {
-    relationalExpression_InstanceOfLhs :: RelationalExpression,
-    relationalExpression_InstanceOfRhs :: ReferenceType}
-  deriving (Eq, Ord, Read, Show)
-_RelationalExpression_InstanceOf = Core.Name "hydra.java.syntax.RelationalExpression_InstanceOf"
-_RelationalExpression_InstanceOf_lhs = Core.Name "lhs"
-_RelationalExpression_InstanceOf_rhs = Core.Name "rhs"
-data ShiftExpression =
-  ShiftExpressionUnary AdditiveExpression |
-  ShiftExpressionShiftLeft ShiftExpression_Binary |
-  ShiftExpressionShiftRight ShiftExpression_Binary |
-  ShiftExpressionShiftRightZeroFill ShiftExpression_Binary
-  deriving (Eq, Ord, Read, Show)
-_ShiftExpression = Core.Name "hydra.java.syntax.ShiftExpression"
-_ShiftExpression_unary = Core.Name "unary"
-_ShiftExpression_shiftLeft = Core.Name "shiftLeft"
-_ShiftExpression_shiftRight = Core.Name "shiftRight"
-_ShiftExpression_shiftRightZeroFill = Core.Name "shiftRightZeroFill"
-data ShiftExpression_Binary =
-  ShiftExpression_Binary {
-    shiftExpression_BinaryLhs :: ShiftExpression,
-    shiftExpression_BinaryRhs :: AdditiveExpression}
-  deriving (Eq, Ord, Read, Show)
-_ShiftExpression_Binary = Core.Name "hydra.java.syntax.ShiftExpression_Binary"
-_ShiftExpression_Binary_lhs = Core.Name "lhs"
-_ShiftExpression_Binary_rhs = Core.Name "rhs"
-data AdditiveExpression =
-  AdditiveExpressionUnary MultiplicativeExpression |
-  AdditiveExpressionPlus AdditiveExpression_Binary |
-  AdditiveExpressionMinus AdditiveExpression_Binary
-  deriving (Eq, Ord, Read, Show)
-_AdditiveExpression = Core.Name "hydra.java.syntax.AdditiveExpression"
-_AdditiveExpression_unary = Core.Name "unary"
-_AdditiveExpression_plus = Core.Name "plus"
-_AdditiveExpression_minus = Core.Name "minus"
-data AdditiveExpression_Binary =
-  AdditiveExpression_Binary {
-    additiveExpression_BinaryLhs :: AdditiveExpression,
-    additiveExpression_BinaryRhs :: MultiplicativeExpression}
-  deriving (Eq, Ord, Read, Show)
-_AdditiveExpression_Binary = Core.Name "hydra.java.syntax.AdditiveExpression_Binary"
-_AdditiveExpression_Binary_lhs = Core.Name "lhs"
-_AdditiveExpression_Binary_rhs = Core.Name "rhs"
-data MultiplicativeExpression =
-  MultiplicativeExpressionUnary UnaryExpression |
-  MultiplicativeExpressionTimes MultiplicativeExpression_Binary |
-  MultiplicativeExpressionDivide MultiplicativeExpression_Binary |
-  MultiplicativeExpressionMod MultiplicativeExpression_Binary
-  deriving (Eq, Ord, Read, Show)
-_MultiplicativeExpression = Core.Name "hydra.java.syntax.MultiplicativeExpression"
-_MultiplicativeExpression_unary = Core.Name "unary"
-_MultiplicativeExpression_times = Core.Name "times"
-_MultiplicativeExpression_divide = Core.Name "divide"
-_MultiplicativeExpression_mod = Core.Name "mod"
-data MultiplicativeExpression_Binary =
-  MultiplicativeExpression_Binary {
-    multiplicativeExpression_BinaryLhs :: MultiplicativeExpression,
-    multiplicativeExpression_BinaryRhs :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-_MultiplicativeExpression_Binary = Core.Name "hydra.java.syntax.MultiplicativeExpression_Binary"
-_MultiplicativeExpression_Binary_lhs = Core.Name "lhs"
-_MultiplicativeExpression_Binary_rhs = Core.Name "rhs"
-data UnaryExpression =
-  UnaryExpressionPreIncrement PreIncrementExpression |
-  UnaryExpressionPreDecrement PreDecrementExpression |
-  UnaryExpressionPlus UnaryExpression |
-  UnaryExpressionMinus UnaryExpression |
-  UnaryExpressionOther UnaryExpressionNotPlusMinus
-  deriving (Eq, Ord, Read, Show)
-_UnaryExpression = Core.Name "hydra.java.syntax.UnaryExpression"
-_UnaryExpression_preIncrement = Core.Name "preIncrement"
-_UnaryExpression_preDecrement = Core.Name "preDecrement"
-_UnaryExpression_plus = Core.Name "plus"
-_UnaryExpression_minus = Core.Name "minus"
-_UnaryExpression_other = Core.Name "other"
-newtype PreIncrementExpression =
-  PreIncrementExpression {
-    unPreIncrementExpression :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-_PreIncrementExpression = Core.Name "hydra.java.syntax.PreIncrementExpression"
-newtype PreDecrementExpression =
-  PreDecrementExpression {
-    unPreDecrementExpression :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-_PreDecrementExpression = Core.Name "hydra.java.syntax.PreDecrementExpression"
-data UnaryExpressionNotPlusMinus =
-  UnaryExpressionNotPlusMinusPostfix PostfixExpression |
-  UnaryExpressionNotPlusMinusTilde UnaryExpression |
-  UnaryExpressionNotPlusMinusNot UnaryExpression |
-  UnaryExpressionNotPlusMinusCast CastExpression
-  deriving (Eq, Ord, Read, Show)
-_UnaryExpressionNotPlusMinus = Core.Name "hydra.java.syntax.UnaryExpressionNotPlusMinus"
-_UnaryExpressionNotPlusMinus_postfix = Core.Name "postfix"
-_UnaryExpressionNotPlusMinus_tilde = Core.Name "tilde"
-_UnaryExpressionNotPlusMinus_not = Core.Name "not"
-_UnaryExpressionNotPlusMinus_cast = Core.Name "cast"
-data PostfixExpression =
-  PostfixExpressionPrimary Primary |
-  PostfixExpressionName ExpressionName |
-  PostfixExpressionPostIncrement PostIncrementExpression |
-  PostfixExpressionPostDecrement PostDecrementExpression
-  deriving (Eq, Ord, Read, Show)
-_PostfixExpression = Core.Name "hydra.java.syntax.PostfixExpression"
-_PostfixExpression_primary = Core.Name "primary"
-_PostfixExpression_name = Core.Name "name"
-_PostfixExpression_postIncrement = Core.Name "postIncrement"
-_PostfixExpression_postDecrement = Core.Name "postDecrement"
-newtype PostIncrementExpression =
-  PostIncrementExpression {
-    unPostIncrementExpression :: PostfixExpression}
-  deriving (Eq, Ord, Read, Show)
-_PostIncrementExpression = Core.Name "hydra.java.syntax.PostIncrementExpression"
-newtype PostDecrementExpression =
-  PostDecrementExpression {
-    unPostDecrementExpression :: PostfixExpression}
-  deriving (Eq, Ord, Read, Show)
-_PostDecrementExpression = Core.Name "hydra.java.syntax.PostDecrementExpression"
-data CastExpression =
-  CastExpressionPrimitive CastExpression_Primitive |
-  CastExpressionNotPlusMinus CastExpression_NotPlusMinus |
-  CastExpressionLambda CastExpression_Lambda
-  deriving (Eq, Ord, Read, Show)
-_CastExpression = Core.Name "hydra.java.syntax.CastExpression"
-_CastExpression_primitive = Core.Name "primitive"
-_CastExpression_notPlusMinus = Core.Name "notPlusMinus"
-_CastExpression_lambda = Core.Name "lambda"
-data CastExpression_Primitive =
-  CastExpression_Primitive {
-    castExpression_PrimitiveType :: PrimitiveTypeWithAnnotations,
-    castExpression_PrimitiveExpression :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-_CastExpression_Primitive = Core.Name "hydra.java.syntax.CastExpression_Primitive"
-_CastExpression_Primitive_type = Core.Name "type"
-_CastExpression_Primitive_expression = Core.Name "expression"
-data CastExpression_NotPlusMinus =
-  CastExpression_NotPlusMinus {
-    castExpression_NotPlusMinusRefAndBounds :: CastExpression_RefAndBounds,
-    castExpression_NotPlusMinusExpression :: UnaryExpression}
-  deriving (Eq, Ord, Read, Show)
-_CastExpression_NotPlusMinus = Core.Name "hydra.java.syntax.CastExpression_NotPlusMinus"
-_CastExpression_NotPlusMinus_refAndBounds = Core.Name "refAndBounds"
-_CastExpression_NotPlusMinus_expression = Core.Name "expression"
-data CastExpression_Lambda =
-  CastExpression_Lambda {
-    castExpression_LambdaRefAndBounds :: CastExpression_RefAndBounds,
-    castExpression_LambdaExpression :: LambdaExpression}
-  deriving (Eq, Ord, Read, Show)
-_CastExpression_Lambda = Core.Name "hydra.java.syntax.CastExpression_Lambda"
-_CastExpression_Lambda_refAndBounds = Core.Name "refAndBounds"
-_CastExpression_Lambda_expression = Core.Name "expression"
-data CastExpression_RefAndBounds =
-  CastExpression_RefAndBounds {
-    castExpression_RefAndBoundsType :: ReferenceType,
-    castExpression_RefAndBoundsBounds :: [AdditionalBound]}
-  deriving (Eq, Ord, Read, Show)
-_CastExpression_RefAndBounds = Core.Name "hydra.java.syntax.CastExpression_RefAndBounds"
-_CastExpression_RefAndBounds_type = Core.Name "type"
-_CastExpression_RefAndBounds_bounds = Core.Name "bounds"
-newtype ConstantExpression =
-  ConstantExpression {
-    unConstantExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_ConstantExpression = Core.Name "hydra.java.syntax.ConstantExpression"
diff --git a/src/main/haskell/Hydra/Java/Testing.hs b/src/main/haskell/Hydra/Java/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Testing.hs
+++ /dev/null
@@ -1,137 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Java test code generation codec for JUnit-based generation tests
-
-module Hydra.Java.Testing where
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Build the complete Java test module content
-buildJavaTestModule :: Packaging.Module -> Testing.TestGroup -> String -> String
-buildJavaTestModule testModule testGroup testBody =
-
-      let ns_ = Packaging.moduleNamespace testModule
-          parts = Strings.splitOn "." (Packaging.unNamespace ns_)
-          packageName = Strings.intercalate "." (Maybes.fromMaybe [] (Lists.maybeInit parts))
-          className_ = Strings.cat2 (Formatting.capitalize (Maybes.fromMaybe "" (Lists.maybeLast parts))) "Test"
-          groupName_ = Testing.testGroupName testGroup
-          standardImports =
-                  [
-                    "import org.junit.jupiter.api.Test;",
-                    "import static org.junit.jupiter.api.Assertions.*;",
-                    "import java.util.*;",
-                    "import hydra.util.*;"]
-          header =
-                  Strings.cat [
-                    Strings.cat2 "// " Constants.warningAutoGeneratedFile,
-                    "\n",
-                    (Strings.cat2 "// " groupName_),
-                    "\n\n",
-                    (Strings.cat [
-                      "package ",
-                      packageName,
-                      ";\n\n"]),
-                    (Strings.intercalate "\n" standardImports),
-                    "\n\n",
-                    (Strings.cat [
-                      "public class ",
-                      className_,
-                      " {\n\n"])]
-      in (Strings.cat [
-        header,
-        testBody,
-        "\n}\n"])
--- | Standard imports for Java JUnit test files
-findJavaImports :: [String]
-findJavaImports =
-    [
-      "import org.junit.jupiter.api.Test;",
-      "import static org.junit.jupiter.api.Assertions.*;",
-      "import java.util.*;"]
--- | Format a test name for Java (PascalCase method name with 'test' prefix)
-formatJavaTestName :: String -> String
-formatJavaTestName name =
-
-      let replaced =
-              Strings.intercalate " Neg" (Strings.splitOn "-" (Strings.intercalate "Dot" (Strings.splitOn "." (Strings.intercalate " Plus" (Strings.splitOn "+" (Strings.intercalate " Div" (Strings.splitOn "/" (Strings.intercalate " Mul" (Strings.splitOn "*" (Strings.intercalate " Num" (Strings.splitOn "#" name)))))))))))
-          sanitized = Formatting.nonAlnumToUnderscores replaced
-          pascal_ = Formatting.convertCase Util.CaseConventionLowerSnake Util.CaseConventionPascal sanitized
-      in (Strings.cat2 "test" pascal_)
--- | Generate a single JUnit test case from a test case with metadata
-generateJavaTestCase :: [String] -> Testing.TestCaseWithMetadata -> Either t0 [String]
-generateJavaTestCase groupPath tcm =
-
-      let name_ = Testing.testCaseWithMetadataName tcm
-          tcase = Testing.testCaseWithMetadataCase tcm
-      in case tcase of
-        Testing.TestCaseUniversal v0 ->
-          let actual_ = Testing.universalTestCaseActual v0
-              expected_ = Testing.universalTestCaseExpected v0
-              fullName = Logic.ifElse (Lists.null groupPath) name_ (Strings.intercalate "_" (Lists.concat2 groupPath [
-                    name_]))
-              formattedName = formatJavaTestName fullName
-          in (Right [
-            "    @Test",
-            (Strings.cat [
-              "    public void ",
-              formattedName,
-              "() {"]),
-            "        assertEquals(",
-            (Strings.cat [
-              "            ",
-              expected_,
-              ","]),
-            (Strings.cat [
-              "            ",
-              actual_,
-              ");"]),
-            "    }"])
--- | Generate a Java test file for a test group
-generateJavaTestFile :: Packaging.Module -> Testing.TestGroup -> t0 -> Either t1 (String, String)
-generateJavaTestFile testModule testGroup _g = generateTestFileWithJavaCodec testModule testGroup
--- | Generate test hierarchy for Java with nested subgroups
-generateJavaTestGroupHierarchy :: [String] -> Testing.TestGroup -> Either t0 String
-generateJavaTestGroupHierarchy groupPath testGroup =
-
-      let cases_ = Testing.testGroupCases testGroup
-          subgroups = Testing.testGroupSubgroups testGroup
-      in (Eithers.bind (Eithers.map (\lines_ -> Strings.intercalate "\n\n" (Lists.concat lines_)) (Eithers.mapList (\tc -> generateJavaTestCase groupPath tc) cases_)) (\testCasesStr -> Eithers.map (\subgroupsStr -> Strings.cat [
-        testCasesStr,
-        (Logic.ifElse (Logic.or (Equality.equal testCasesStr "") (Equality.equal subgroupsStr "")) "" "\n\n"),
-        subgroupsStr]) (Eithers.map (\blocks -> Strings.intercalate "\n\n" blocks) (Eithers.mapList (\subgroup ->
-        let groupName = Testing.testGroupName subgroup
-            header = Strings.cat2 "    // " groupName
-        in (Eithers.map (\content -> Strings.cat [
-          header,
-          "\n\n",
-          content]) (generateJavaTestGroupHierarchy (Lists.concat2 groupPath [
-          groupName]) subgroup))) subgroups))))
--- | Generate a complete test file for Java
-generateTestFileWithJavaCodec :: Packaging.Module -> Testing.TestGroup -> Either t0 (String, String)
-generateTestFileWithJavaCodec testModule testGroup =
-    Eithers.map (\testBody ->
-      let testModuleContent = buildJavaTestModule testModule testGroup testBody
-          ns_ = Packaging.moduleNamespace testModule
-          parts = Strings.splitOn "." (Packaging.unNamespace ns_)
-          dirParts = Lists.drop 1 (Maybes.fromMaybe [] (Lists.maybeInit parts))
-          className_ = Strings.cat2 (Formatting.capitalize (Maybes.fromMaybe "" (Lists.maybeLast parts))) "Test"
-          fileName = Strings.cat2 className_ ".java"
-          filePath =
-                  Strings.cat [
-                    Strings.intercalate "/" dirParts,
-                    "/",
-                    fileName]
-      in (filePath, testModuleContent)) (generateJavaTestGroupHierarchy [] testGroup)
--- | Convert namespace to Java class name
-namespaceToJavaClassName :: Packaging.Namespace -> String
-namespaceToJavaClassName ns_ =
-    Strings.intercalate "." (Lists.map Formatting.capitalize (Strings.splitOn "." (Packaging.unNamespace ns_)))
diff --git a/src/main/haskell/Hydra/Java/Utils.hs b/src/main/haskell/Hydra/Java/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Java/Utils.hs
+++ /dev/null
@@ -1,848 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Java utilities for constructing Java syntax trees
-
-module Hydra.Java.Utils where
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Java.Environment as Environment
-import qualified Hydra.Java.Language as Language
-import qualified Hydra.Java.Names as JavaNames
-import qualified Hydra.Java.Syntax as Syntax
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-addExpressions :: [Syntax.MultiplicativeExpression] -> Syntax.AdditiveExpression
-addExpressions exprs =
-
-      let dummyMult =
-              Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral 0)))))))
-      in (Lists.foldl (\ae -> \me -> Syntax.AdditiveExpressionPlus (Syntax.AdditiveExpression_Binary {
-        Syntax.additiveExpression_BinaryLhs = ae,
-        Syntax.additiveExpression_BinaryRhs = me})) (Syntax.AdditiveExpressionUnary (Maybes.fromMaybe dummyMult (Lists.maybeHead exprs))) (Lists.drop 1 exprs))
-addInScopeVar :: Core.Name -> Environment.Aliases -> Environment.Aliases
-addInScopeVar name aliases =
-    Environment.Aliases {
-      Environment.aliasesCurrentNamespace = (Environment.aliasesCurrentNamespace aliases),
-      Environment.aliasesPackages = (Environment.aliasesPackages aliases),
-      Environment.aliasesBranchVars = (Environment.aliasesBranchVars aliases),
-      Environment.aliasesRecursiveVars = (Environment.aliasesRecursiveVars aliases),
-      Environment.aliasesInScopeTypeParams = (Environment.aliasesInScopeTypeParams aliases),
-      Environment.aliasesPolymorphicLocals = (Environment.aliasesPolymorphicLocals aliases),
-      Environment.aliasesInScopeJavaVars = (Sets.insert name (Environment.aliasesInScopeJavaVars aliases)),
-      Environment.aliasesVarRenames = (Environment.aliasesVarRenames aliases),
-      Environment.aliasesLambdaVars = (Environment.aliasesLambdaVars aliases),
-      Environment.aliasesTypeVarSubst = (Environment.aliasesTypeVarSubst aliases),
-      Environment.aliasesTrustedTypeVars = (Environment.aliasesTrustedTypeVars aliases),
-      Environment.aliasesMethodCodomain = (Environment.aliasesMethodCodomain aliases),
-      Environment.aliasesThunkedVars = (Environment.aliasesThunkedVars aliases)}
-addInScopeVars :: [Core.Name] -> Environment.Aliases -> Environment.Aliases
-addInScopeVars names aliases = Lists.foldl (\a -> \n -> addInScopeVar n a) aliases names
-addJavaTypeParameter :: Syntax.ReferenceType -> Syntax.Type -> t0 -> Either Errors.Error Syntax.Type
-addJavaTypeParameter rt t cx =
-    case t of
-      Syntax.TypeReference v0 -> case v0 of
-        Syntax.ReferenceTypeClassOrInterface v1 -> case v1 of
-          Syntax.ClassOrInterfaceTypeClass v2 ->
-            let anns = Syntax.classTypeAnnotations v2
-                qual = Syntax.classTypeQualifier v2
-                id = Syntax.classTypeIdentifier v2
-                args = Syntax.classTypeArguments v2
-            in (Right (Syntax.TypeReference (Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (Syntax.ClassType {
-              Syntax.classTypeAnnotations = anns,
-              Syntax.classTypeQualifier = qual,
-              Syntax.classTypeIdentifier = id,
-              Syntax.classTypeArguments = (Lists.concat2 args [
-                Syntax.TypeArgumentReference rt])})))))
-          Syntax.ClassOrInterfaceTypeInterface _ -> Left (Errors.ErrorOther (Errors.OtherError "expected a Java class type"))
-        Syntax.ReferenceTypeVariable v1 -> Right (javaTypeVariableToType v1)
-        Syntax.ReferenceTypeArray _ -> Left (Errors.ErrorOther (Errors.OtherError "expected a Java class or interface type, or a variable"))
-      Syntax.TypePrimitive _ -> Left (Errors.ErrorOther (Errors.OtherError "expected a reference type"))
-addVarRename :: Core.Name -> Core.Name -> Environment.Aliases -> Environment.Aliases
-addVarRename original renamed aliases =
-    Environment.Aliases {
-      Environment.aliasesCurrentNamespace = (Environment.aliasesCurrentNamespace aliases),
-      Environment.aliasesPackages = (Environment.aliasesPackages aliases),
-      Environment.aliasesBranchVars = (Environment.aliasesBranchVars aliases),
-      Environment.aliasesRecursiveVars = (Environment.aliasesRecursiveVars aliases),
-      Environment.aliasesInScopeTypeParams = (Environment.aliasesInScopeTypeParams aliases),
-      Environment.aliasesPolymorphicLocals = (Environment.aliasesPolymorphicLocals aliases),
-      Environment.aliasesInScopeJavaVars = (Environment.aliasesInScopeJavaVars aliases),
-      Environment.aliasesVarRenames = (Maps.insert original renamed (Environment.aliasesVarRenames aliases)),
-      Environment.aliasesLambdaVars = (Environment.aliasesLambdaVars aliases),
-      Environment.aliasesTypeVarSubst = (Environment.aliasesTypeVarSubst aliases),
-      Environment.aliasesTrustedTypeVars = (Environment.aliasesTrustedTypeVars aliases),
-      Environment.aliasesMethodCodomain = (Environment.aliasesMethodCodomain aliases),
-      Environment.aliasesThunkedVars = (Environment.aliasesThunkedVars aliases)}
-fieldExpression :: Syntax.Identifier -> Syntax.Identifier -> Syntax.ExpressionName
-fieldExpression varId fieldId =
-    Syntax.ExpressionName {
-      Syntax.expressionNameQualifier = (Just (Syntax.AmbiguousName [
-        varId])),
-      Syntax.expressionNameIdentifier = fieldId}
-fieldNameToJavaExpression :: Core.Name -> Syntax.Expression
-fieldNameToJavaExpression fname =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionName (javaIdentifierToJavaExpressionName (fieldNameToJavaIdentifier fname)))))))))]]]]])))
-fieldNameToJavaIdentifier :: Core.Name -> Syntax.Identifier
-fieldNameToJavaIdentifier fname = javaIdentifier (Core.unName fname)
-fieldNameToJavaVariableDeclarator :: Core.Name -> Syntax.VariableDeclarator
-fieldNameToJavaVariableDeclarator fname = javaVariableDeclarator (javaIdentifier (Core.unName fname)) Nothing
-fieldNameToJavaVariableDeclaratorId :: Core.Name -> Syntax.VariableDeclaratorId
-fieldNameToJavaVariableDeclaratorId fname = javaVariableDeclaratorId (javaIdentifier (Core.unName fname))
-finalVarDeclarationStatement :: Syntax.Identifier -> Syntax.Expression -> Syntax.BlockStatement
-finalVarDeclarationStatement id rhs =
-    Syntax.BlockStatementLocalVariableDeclaration (Syntax.LocalVariableDeclarationStatement (Syntax.LocalVariableDeclaration {
-      Syntax.localVariableDeclarationModifiers = [
-        Syntax.VariableModifierFinal],
-      Syntax.localVariableDeclarationType = Syntax.LocalVariableTypeVar,
-      Syntax.localVariableDeclarationDeclarators = [
-        javaVariableDeclarator id (Just (Syntax.VariableInitializerExpression rhs))]}))
-importAliasesForModule :: Packaging.Module -> Environment.Aliases
-importAliasesForModule mod =
-    Environment.Aliases {
-      Environment.aliasesCurrentNamespace = (Packaging.moduleNamespace mod),
-      Environment.aliasesPackages = Maps.empty,
-      Environment.aliasesBranchVars = Sets.empty,
-      Environment.aliasesRecursiveVars = Sets.empty,
-      Environment.aliasesInScopeTypeParams = Sets.empty,
-      Environment.aliasesPolymorphicLocals = Sets.empty,
-      Environment.aliasesInScopeJavaVars = Sets.empty,
-      Environment.aliasesVarRenames = Maps.empty,
-      Environment.aliasesLambdaVars = Sets.empty,
-      Environment.aliasesTypeVarSubst = Maps.empty,
-      Environment.aliasesTrustedTypeVars = Sets.empty,
-      Environment.aliasesMethodCodomain = Nothing,
-      Environment.aliasesThunkedVars = Sets.empty}
-interfaceMethodDeclaration :: [Syntax.InterfaceMethodModifier] -> [Syntax.TypeParameter] -> String -> [Syntax.FormalParameter] -> Syntax.Result -> Maybe [Syntax.BlockStatement] -> Syntax.InterfaceMemberDeclaration
-interfaceMethodDeclaration mods tparams methodName params result stmts =
-    Syntax.InterfaceMemberDeclarationInterfaceMethod (Syntax.InterfaceMethodDeclaration {
-      Syntax.interfaceMethodDeclarationModifiers = mods,
-      Syntax.interfaceMethodDeclarationHeader = (javaMethodHeader tparams methodName params result),
-      Syntax.interfaceMethodDeclarationBody = (javaMethodBody stmts)})
-isEscaped :: String -> Bool
-isEscaped s = Equality.equal (Maybes.fromMaybe 0 (Strings.maybeCharAt 0 s)) 36
-javaAdditiveExpressionToJavaExpression :: Syntax.AdditiveExpression -> Syntax.Expression
-javaAdditiveExpressionToJavaExpression ae =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary ae))]]]]])))
-javaArrayCreation :: Syntax.PrimitiveTypeWithAnnotations -> Maybe Syntax.ArrayInitializer -> Syntax.Expression
-javaArrayCreation primType minit =
-
-      let init_ = Maybes.cases minit (Syntax.ArrayInitializer []) (\i -> i)
-      in (javaPrimaryToJavaExpression (Syntax.PrimaryArrayCreation (Syntax.ArrayCreationExpressionPrimitiveArray (Syntax.ArrayCreationExpression_PrimitiveArray {
-        Syntax.arrayCreationExpression_PrimitiveArrayType = primType,
-        Syntax.arrayCreationExpression_PrimitiveArrayDims = [],
-        Syntax.arrayCreationExpression_PrimitiveArrayArray = init_}))))
-javaArrayInitializer :: [Syntax.Expression] -> Syntax.ArrayInitializer
-javaArrayInitializer exprs = Syntax.ArrayInitializer [
-  Lists.map (\e -> Syntax.VariableInitializerExpression e) exprs]
-javaAssignmentStatement :: Syntax.LeftHandSide -> Syntax.Expression -> Syntax.Statement
-javaAssignmentStatement lhs rhs =
-    Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementExpression (Syntax.ExpressionStatement (Syntax.StatementExpressionAssignment (Syntax.Assignment {
-      Syntax.assignmentLhs = lhs,
-      Syntax.assignmentOp = Syntax.AssignmentOperatorSimple,
-      Syntax.assignmentExpression = rhs}))))
-javaBoolean :: Bool -> Syntax.Literal
-javaBoolean b = Syntax.LiteralBoolean b
-javaBooleanExpression :: Bool -> Syntax.Expression
-javaBooleanExpression b = javaPrimaryToJavaExpression (javaLiteralToJavaPrimary (javaBoolean b))
-javaBooleanType :: Syntax.Type
-javaBooleanType = javaPrimitiveTypeToJavaType Syntax.PrimitiveTypeBoolean
-javaBytePrimitiveType :: Syntax.PrimitiveTypeWithAnnotations
-javaBytePrimitiveType =
-    Syntax.PrimitiveTypeWithAnnotations {
-      Syntax.primitiveTypeWithAnnotationsType = (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeByte)),
-      Syntax.primitiveTypeWithAnnotationsAnnotations = []}
-javaCastExpression :: Syntax.ReferenceType -> Syntax.UnaryExpression -> Syntax.CastExpression
-javaCastExpression rt expr =
-    Syntax.CastExpressionNotPlusMinus (Syntax.CastExpression_NotPlusMinus {
-      Syntax.castExpression_NotPlusMinusRefAndBounds = Syntax.CastExpression_RefAndBounds {
-        Syntax.castExpression_RefAndBoundsType = rt,
-        Syntax.castExpression_RefAndBoundsBounds = []},
-      Syntax.castExpression_NotPlusMinusExpression = expr})
-javaCastExpressionToJavaExpression :: Syntax.CastExpression -> Syntax.Expression
-javaCastExpressionToJavaExpression ce =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusCast ce))))))]]]]])))
-javaCastPrimitive :: Syntax.PrimitiveType -> Syntax.UnaryExpression -> Syntax.CastExpression
-javaCastPrimitive pt expr =
-    Syntax.CastExpressionPrimitive (Syntax.CastExpression_Primitive {
-      Syntax.castExpression_PrimitiveType = Syntax.PrimitiveTypeWithAnnotations {
-        Syntax.primitiveTypeWithAnnotationsType = pt,
-        Syntax.primitiveTypeWithAnnotationsAnnotations = []},
-      Syntax.castExpression_PrimitiveExpression = expr})
-javaClassDeclaration :: Environment.Aliases -> [Syntax.TypeParameter] -> Core.Name -> [Syntax.ClassModifier] -> Maybe Core.Name -> [Syntax.InterfaceType] -> [Syntax.ClassBodyDeclarationWithComments] -> Syntax.ClassDeclaration
-javaClassDeclaration aliases tparams elName mods supname impls bodyDecls =
-
-      let extends_ = Maybes.map (\n -> nameToJavaClassType aliases True [] n Nothing) supname
-      in (Syntax.ClassDeclarationNormal (Syntax.NormalClassDeclaration {
-        Syntax.normalClassDeclarationModifiers = mods,
-        Syntax.normalClassDeclarationIdentifier = (javaDeclName elName),
-        Syntax.normalClassDeclarationParameters = tparams,
-        Syntax.normalClassDeclarationExtends = extends_,
-        Syntax.normalClassDeclarationImplements = impls,
-        Syntax.normalClassDeclarationBody = (Syntax.ClassBody bodyDecls)}))
-javaClassType :: [Syntax.ReferenceType] -> Maybe Syntax.PackageName -> String -> Syntax.ClassType
-javaClassType args pkg id =
-
-      let qual = Maybes.cases pkg Syntax.ClassTypeQualifierNone (\p -> Syntax.ClassTypeQualifierPackage p)
-          targs = Lists.map (\rt -> Syntax.TypeArgumentReference rt) args
-      in Syntax.ClassType {
-        Syntax.classTypeAnnotations = [],
-        Syntax.classTypeQualifier = qual,
-        Syntax.classTypeIdentifier = (javaTypeIdentifier id),
-        Syntax.classTypeArguments = targs}
-javaClassTypeToJavaType :: Syntax.ClassType -> Syntax.Type
-javaClassTypeToJavaType ct =
-    Syntax.TypeReference (Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass ct))
-javaConditionalAndExpressionToJavaExpression :: Syntax.ConditionalAndExpression -> Syntax.Expression
-javaConditionalAndExpressionToJavaExpression cae =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      cae])))
-javaConstructorCall :: Syntax.ClassOrInterfaceTypeToInstantiate -> [Syntax.Expression] -> Maybe Syntax.ClassBody -> Syntax.Expression
-javaConstructorCall ci args mbody =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionClassInstance (Syntax.ClassInstanceCreationExpression {
-                Syntax.classInstanceCreationExpressionQualifier = Nothing,
-                Syntax.classInstanceCreationExpressionExpression = Syntax.UnqualifiedClassInstanceCreationExpression {
-                  Syntax.unqualifiedClassInstanceCreationExpressionTypeArguments = [],
-                  Syntax.unqualifiedClassInstanceCreationExpressionClassOrInterface = ci,
-                  Syntax.unqualifiedClassInstanceCreationExpressionArguments = args,
-                  Syntax.unqualifiedClassInstanceCreationExpressionBody = mbody}}))))))))))]]]]])))
-javaConstructorName :: Syntax.Identifier -> Maybe Syntax.TypeArgumentsOrDiamond -> Syntax.ClassOrInterfaceTypeToInstantiate
-javaConstructorName id targs =
-    Syntax.ClassOrInterfaceTypeToInstantiate {
-      Syntax.classOrInterfaceTypeToInstantiateIdentifiers = [
-        Syntax.AnnotatedIdentifier {
-          Syntax.annotatedIdentifierAnnotations = [],
-          Syntax.annotatedIdentifierIdentifier = id}],
-      Syntax.classOrInterfaceTypeToInstantiateTypeArguments = targs}
-javaDeclName :: Core.Name -> Syntax.TypeIdentifier
-javaDeclName name = Syntax.TypeIdentifier (javaVariableName name)
-javaDoubleCastExpression :: Syntax.ReferenceType -> Syntax.ReferenceType -> Syntax.UnaryExpression -> Syntax.CastExpression
-javaDoubleCastExpression rawRt targetRt expr =
-
-      let firstCast = javaCastExpressionToJavaExpression (javaCastExpression rawRt expr)
-      in (javaCastExpression targetRt (javaExpressionToJavaUnaryExpression firstCast))
-javaDoubleCastExpressionToJavaExpression :: Syntax.ReferenceType -> Syntax.ReferenceType -> Syntax.UnaryExpression -> Syntax.Expression
-javaDoubleCastExpressionToJavaExpression rawRt targetRt expr =
-    javaCastExpressionToJavaExpression (javaDoubleCastExpression rawRt targetRt expr)
-javaEmptyStatement :: Syntax.Statement
-javaEmptyStatement = Syntax.StatementWithoutTrailing Syntax.StatementWithoutTrailingSubstatementEmpty
-javaEqualityExpressionToJavaExpression :: Syntax.EqualityExpression -> Syntax.Expression
-javaEqualityExpressionToJavaExpression ee =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              ee]]]]])))
-javaEqualityExpressionToJavaInclusiveOrExpression :: Syntax.EqualityExpression -> Syntax.InclusiveOrExpression
-javaEqualityExpressionToJavaInclusiveOrExpression ee =
-    Syntax.InclusiveOrExpression [
-      Syntax.ExclusiveOrExpression [
-        Syntax.AndExpression [
-          ee]]]
-javaEquals :: Syntax.EqualityExpression -> Syntax.RelationalExpression -> Syntax.EqualityExpression
-javaEquals lhs rhs =
-    Syntax.EqualityExpressionEqual (Syntax.EqualityExpression_Binary {
-      Syntax.equalityExpression_BinaryLhs = lhs,
-      Syntax.equalityExpression_BinaryRhs = rhs})
-javaEqualsNull :: Syntax.EqualityExpression -> Syntax.EqualityExpression
-javaEqualsNull lhs = javaEquals lhs (javaLiteralToJavaRelationalExpression Syntax.LiteralNull)
-javaExpressionNameToJavaExpression :: Syntax.ExpressionName -> Syntax.Expression
-javaExpressionNameToJavaExpression en =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionName en)))))))]]]]])))
--- | Convert an Expression to a Primary, avoiding unnecessary parentheses when the expression is already a simple primary chain
-javaExpressionToJavaPrimary :: Syntax.Expression -> Syntax.Primary
-javaExpressionToJavaPrimary e =
-
-      let fallback = Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionParens e)
-      in case e of
-        Syntax.ExpressionAssignment v0 -> case v0 of
-          Syntax.AssignmentExpressionConditional v1 -> case v1 of
-            Syntax.ConditionalExpressionSimple v2 ->
-              let cands = Syntax.unConditionalOrExpression v2
-              in (Maybes.fromMaybe fallback (Maybes.bind (Lists.maybeHead cands) (\candHead ->
-                let iors = Syntax.unConditionalAndExpression candHead
-                in (Maybes.bind (Lists.maybeHead iors) (\iorHead ->
-                  let xors = Syntax.unInclusiveOrExpression iorHead
-                  in (Maybes.bind (Lists.maybeHead xors) (\xorHead ->
-                    let ands = Syntax.unExclusiveOrExpression xorHead
-                    in (Maybes.bind (Lists.maybeHead ands) (\andHead ->
-                      let eqs = Syntax.unAndExpression andHead
-                      in (Maybes.bind (Lists.maybeHead eqs) (\eqHead -> Just (case eqHead of
-                        Syntax.EqualityExpressionUnary v3 -> case v3 of
-                          Syntax.RelationalExpressionSimple v4 -> case v4 of
-                            Syntax.ShiftExpressionUnary v5 -> case v5 of
-                              Syntax.AdditiveExpressionUnary v6 -> case v6 of
-                                Syntax.MultiplicativeExpressionUnary v7 -> case v7 of
-                                  Syntax.UnaryExpressionOther v8 -> case v8 of
-                                    Syntax.UnaryExpressionNotPlusMinusPostfix v9 -> case v9 of
-                                      Syntax.PostfixExpressionPrimary v10 -> v10
-                                      _ -> fallback
-                                    _ -> fallback
-                                  _ -> fallback
-                                _ -> fallback
-                              _ -> fallback
-                            _ -> fallback
-                          _ -> fallback
-                        _ -> fallback))))))))))))
-            _ -> fallback
-          _ -> fallback
-        _ -> fallback
-javaExpressionToJavaUnaryExpression :: Syntax.Expression -> Syntax.UnaryExpression
-javaExpressionToJavaUnaryExpression e =
-    Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionParens e))))
-javaFieldAccessToJavaExpression :: Syntax.FieldAccess -> Syntax.Expression
-javaFieldAccessToJavaExpression fa =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionFieldAccess fa)))))))))]]]]])))
-javaIdentifier :: String -> Syntax.Identifier
-javaIdentifier s = Syntax.Identifier (sanitizeJavaName s)
-javaIdentifierToJavaExpression :: Syntax.Identifier -> Syntax.Expression
-javaIdentifierToJavaExpression id =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionName (Syntax.ExpressionName {
-                Syntax.expressionNameQualifier = Nothing,
-                Syntax.expressionNameIdentifier = id}))))))))]]]]])))
-javaIdentifierToJavaExpressionName :: Syntax.Identifier -> Syntax.ExpressionName
-javaIdentifierToJavaExpressionName id =
-    Syntax.ExpressionName {
-      Syntax.expressionNameQualifier = Nothing,
-      Syntax.expressionNameIdentifier = id}
-javaIdentifierToJavaRelationalExpression :: Syntax.Identifier -> Syntax.RelationalExpression
-javaIdentifierToJavaRelationalExpression id =
-    Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionName (Syntax.ExpressionName {
-      Syntax.expressionNameQualifier = Nothing,
-      Syntax.expressionNameIdentifier = id})))))))
-javaIdentifierToJavaUnaryExpression :: Syntax.Identifier -> Syntax.UnaryExpression
-javaIdentifierToJavaUnaryExpression id =
-    Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionName (Syntax.ExpressionName {
-      Syntax.expressionNameQualifier = Nothing,
-      Syntax.expressionNameIdentifier = id})))
-javaInstanceOf :: Syntax.RelationalExpression -> Syntax.ReferenceType -> Syntax.RelationalExpression
-javaInstanceOf lhs rhs =
-    Syntax.RelationalExpressionInstanceof (Syntax.RelationalExpression_InstanceOf {
-      Syntax.relationalExpression_InstanceOfLhs = lhs,
-      Syntax.relationalExpression_InstanceOfRhs = rhs})
-javaInt :: Integer -> Syntax.Literal
-javaInt i = Syntax.LiteralInteger (Syntax.IntegerLiteral i)
-javaIntExpression :: Integer -> Syntax.Expression
-javaIntExpression i = javaPrimaryToJavaExpression (javaLiteralToJavaPrimary (javaInt i))
-javaIntType :: Syntax.Type
-javaIntType = javaPrimitiveTypeToJavaType (Syntax.PrimitiveTypeNumeric (Syntax.NumericTypeIntegral Syntax.IntegralTypeInt))
-javaInterfaceDeclarationToJavaClassBodyDeclaration :: Syntax.NormalInterfaceDeclaration -> Syntax.ClassBodyDeclaration
-javaInterfaceDeclarationToJavaClassBodyDeclaration nid =
-    Syntax.ClassBodyDeclarationClassMember (Syntax.ClassMemberDeclarationInterface (Syntax.InterfaceDeclarationNormalInterface nid))
-javaLambda :: Core.Name -> Syntax.Expression -> Syntax.Expression
-javaLambda v body =
-    Syntax.ExpressionLambda (Syntax.LambdaExpression {
-      Syntax.lambdaExpressionParameters = (Syntax.LambdaParametersSingle (variableToJavaIdentifier v)),
-      Syntax.lambdaExpressionBody = (Syntax.LambdaBodyExpression body)})
-javaLambdaFromBlock :: Core.Name -> Syntax.Block -> Syntax.Expression
-javaLambdaFromBlock v block =
-    Syntax.ExpressionLambda (Syntax.LambdaExpression {
-      Syntax.lambdaExpressionParameters = (Syntax.LambdaParametersSingle (variableToJavaIdentifier v)),
-      Syntax.lambdaExpressionBody = (Syntax.LambdaBodyBlock block)})
-javaLiteralToJavaExpression :: Syntax.Literal -> Syntax.Expression
-javaLiteralToJavaExpression lit =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionLiteral lit)))))))))]]]]])))
-javaLiteralToJavaMultiplicativeExpression :: Syntax.Literal -> Syntax.MultiplicativeExpression
-javaLiteralToJavaMultiplicativeExpression lit =
-    Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionLiteral lit)))))
-javaLiteralToJavaPrimary :: Syntax.Literal -> Syntax.Primary
-javaLiteralToJavaPrimary lit = Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionLiteral lit)
-javaLiteralToJavaRelationalExpression :: Syntax.Literal -> Syntax.RelationalExpression
-javaLiteralToJavaRelationalExpression lit =
-    Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionLiteral lit))))))))
-javaMemberField :: [Syntax.FieldModifier] -> Syntax.Type -> Syntax.VariableDeclarator -> Syntax.ClassBodyDeclaration
-javaMemberField mods jt v =
-    Syntax.ClassBodyDeclarationClassMember (Syntax.ClassMemberDeclarationField (Syntax.FieldDeclaration {
-      Syntax.fieldDeclarationModifiers = mods,
-      Syntax.fieldDeclarationUnannType = (Syntax.UnannType jt),
-      Syntax.fieldDeclarationVariableDeclarators = [
-        v]}))
-javaMethodBody :: Maybe [Syntax.BlockStatement] -> Syntax.MethodBody
-javaMethodBody mstmts = Maybes.cases mstmts Syntax.MethodBodyNone (\stmts -> Syntax.MethodBodyBlock (Syntax.Block stmts))
-javaMethodDeclarationToJavaClassBodyDeclaration :: Syntax.MethodDeclaration -> Syntax.ClassBodyDeclaration
-javaMethodDeclarationToJavaClassBodyDeclaration md =
-    Syntax.ClassBodyDeclarationClassMember (Syntax.ClassMemberDeclarationMethod md)
-javaMethodHeader :: [Syntax.TypeParameter] -> String -> [Syntax.FormalParameter] -> Syntax.Result -> Syntax.MethodHeader
-javaMethodHeader tparams methodName params result =
-    Syntax.MethodHeader {
-      Syntax.methodHeaderParameters = tparams,
-      Syntax.methodHeaderResult = result,
-      Syntax.methodHeaderDeclarator = Syntax.MethodDeclarator {
-        Syntax.methodDeclaratorIdentifier = (Syntax.Identifier methodName),
-        Syntax.methodDeclaratorReceiverParameter = Nothing,
-        Syntax.methodDeclaratorFormalParameters = params},
-      Syntax.methodHeaderThrows = Nothing}
-javaMethodInvocationToJavaExpression :: Syntax.MethodInvocation -> Syntax.Expression
-javaMethodInvocationToJavaExpression mi =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionMethodInvocation mi)))))))))]]]]])))
-javaMethodInvocationToJavaPostfixExpression :: Syntax.MethodInvocation -> Syntax.PostfixExpression
-javaMethodInvocationToJavaPostfixExpression mi =
-    Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionMethodInvocation mi))
-javaMethodInvocationToJavaPrimary :: Syntax.MethodInvocation -> Syntax.Primary
-javaMethodInvocationToJavaPrimary mi = Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionMethodInvocation mi)
-javaMethodInvocationToJavaStatement :: Syntax.MethodInvocation -> Syntax.Statement
-javaMethodInvocationToJavaStatement mi =
-    Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementExpression (Syntax.ExpressionStatement (Syntax.StatementExpressionMethodInvocation mi)))
-javaMultiplicativeExpressionToJavaRelationalExpression :: Syntax.MultiplicativeExpression -> Syntax.RelationalExpression
-javaMultiplicativeExpressionToJavaRelationalExpression me =
-    Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary me))
-javaPackageDeclaration :: Packaging.Namespace -> Syntax.PackageDeclaration
-javaPackageDeclaration ns =
-    Syntax.PackageDeclaration {
-      Syntax.packageDeclarationModifiers = [],
-      Syntax.packageDeclarationIdentifiers = (Lists.map (\s -> Syntax.Identifier s) (Strings.splitOn "." (Packaging.unNamespace ns)))}
-javaPostfixExpressionToJavaEqualityExpression :: Syntax.PostfixExpression -> Syntax.EqualityExpression
-javaPostfixExpressionToJavaEqualityExpression pe =
-    Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix pe))))))
-javaPostfixExpressionToJavaExpression :: Syntax.PostfixExpression -> Syntax.Expression
-javaPostfixExpressionToJavaExpression pe =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix pe))))))]]]]])))
-javaPostfixExpressionToJavaInclusiveOrExpression :: Syntax.PostfixExpression -> Syntax.InclusiveOrExpression
-javaPostfixExpressionToJavaInclusiveOrExpression pe =
-    Syntax.InclusiveOrExpression [
-      Syntax.ExclusiveOrExpression [
-        Syntax.AndExpression [
-          Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix pe))))))]]]
-javaPostfixExpressionToJavaRelationalExpression :: Syntax.PostfixExpression -> Syntax.RelationalExpression
-javaPostfixExpressionToJavaRelationalExpression pe =
-    Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix pe)))))
-javaPostfixExpressionToJavaUnaryExpression :: Syntax.PostfixExpression -> Syntax.UnaryExpression
-javaPostfixExpressionToJavaUnaryExpression pe = Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix pe)
-javaPrimaryToJavaExpression :: Syntax.Primary -> Syntax.Expression
-javaPrimaryToJavaExpression p =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary p)))))))]]]]])))
-javaPrimaryToJavaUnaryExpression :: Syntax.Primary -> Syntax.UnaryExpression
-javaPrimaryToJavaUnaryExpression p =
-    Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary p))
-javaPrimitiveTypeToJavaType :: Syntax.PrimitiveType -> Syntax.Type
-javaPrimitiveTypeToJavaType pt =
-    Syntax.TypePrimitive (Syntax.PrimitiveTypeWithAnnotations {
-      Syntax.primitiveTypeWithAnnotationsType = pt,
-      Syntax.primitiveTypeWithAnnotationsAnnotations = []})
-javaRefType :: [Syntax.ReferenceType] -> Maybe Syntax.PackageName -> String -> Syntax.Type
-javaRefType args pkg id =
-    Syntax.TypeReference (Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (javaClassType args pkg id)))
-javaReferenceTypeToRawType :: Syntax.ReferenceType -> Syntax.ReferenceType
-javaReferenceTypeToRawType rt =
-    case rt of
-      Syntax.ReferenceTypeClassOrInterface v0 -> case v0 of
-        Syntax.ClassOrInterfaceTypeClass v1 ->
-          let anns = Syntax.classTypeAnnotations v1
-              qual = Syntax.classTypeQualifier v1
-              id = Syntax.classTypeIdentifier v1
-          in (Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (Syntax.ClassType {
-            Syntax.classTypeAnnotations = anns,
-            Syntax.classTypeQualifier = qual,
-            Syntax.classTypeIdentifier = id,
-            Syntax.classTypeArguments = []})))
-        Syntax.ClassOrInterfaceTypeInterface v1 ->
-          let ct = Syntax.unInterfaceType v1
-              anns = Syntax.classTypeAnnotations ct
-              qual = Syntax.classTypeQualifier ct
-              id = Syntax.classTypeIdentifier ct
-          in (Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeInterface (Syntax.InterfaceType (Syntax.ClassType {
-            Syntax.classTypeAnnotations = anns,
-            Syntax.classTypeQualifier = qual,
-            Syntax.classTypeIdentifier = id,
-            Syntax.classTypeArguments = []}))))
-      _ -> rt
-javaRelationalExpressionToJavaEqualityExpression :: Syntax.RelationalExpression -> Syntax.EqualityExpression
-javaRelationalExpressionToJavaEqualityExpression re = Syntax.EqualityExpressionUnary re
-javaRelationalExpressionToJavaExpression :: Syntax.RelationalExpression -> Syntax.Expression
-javaRelationalExpressionToJavaExpression re = javaEqualityExpressionToJavaExpression (Syntax.EqualityExpressionUnary re)
-javaRelationalExpressionToJavaUnaryExpression :: Syntax.RelationalExpression -> Syntax.UnaryExpression
-javaRelationalExpressionToJavaUnaryExpression re =
-    Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray (Syntax.PrimaryNoNewArrayExpressionParens (Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary re]]]]]))))))))
-javaReturnStatement :: Maybe Syntax.Expression -> Syntax.Statement
-javaReturnStatement mex =
-    Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementReturn (Syntax.ReturnStatement mex))
-javaStatementsToBlock :: [Syntax.Statement] -> Syntax.Block
-javaStatementsToBlock stmts = Syntax.Block (Lists.map (\s -> Syntax.BlockStatementStatement s) stmts)
-javaString :: String -> Syntax.Literal
-javaString s = Syntax.LiteralString (Syntax.StringLiteral s)
-javaStringMultiplicativeExpression :: String -> Syntax.MultiplicativeExpression
-javaStringMultiplicativeExpression s = javaLiteralToJavaMultiplicativeExpression (javaString s)
-javaThis :: Syntax.Expression
-javaThis =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary (Syntax.UnaryExpressionOther (Syntax.UnaryExpressionNotPlusMinusPostfix (Syntax.PostfixExpressionPrimary (Syntax.PrimaryNoNewArray Syntax.PrimaryNoNewArrayExpressionThis))))))))]]]]])))
-javaThrowIllegalArgumentException :: [Syntax.Expression] -> Syntax.Statement
-javaThrowIllegalArgumentException args =
-    javaThrowStatement (javaConstructorCall (javaConstructorName (Syntax.Identifier "IllegalArgumentException") Nothing) args Nothing)
-javaThrowIllegalStateException :: [Syntax.Expression] -> Syntax.Statement
-javaThrowIllegalStateException args =
-    javaThrowStatement (javaConstructorCall (javaConstructorName (Syntax.Identifier "IllegalStateException") Nothing) args Nothing)
-javaThrowStatement :: Syntax.Expression -> Syntax.Statement
-javaThrowStatement e =
-    Syntax.StatementWithoutTrailing (Syntax.StatementWithoutTrailingSubstatementThrow (Syntax.ThrowStatement e))
-javaTypeFromTypeName :: Environment.Aliases -> Core.Name -> Syntax.Type
-javaTypeFromTypeName aliases elName =
-    javaTypeVariableToType (Syntax.TypeVariable {
-      Syntax.typeVariableAnnotations = [],
-      Syntax.typeVariableIdentifier = (nameToJavaTypeIdentifier aliases False elName)})
-javaTypeIdentifier :: String -> Syntax.TypeIdentifier
-javaTypeIdentifier s = Syntax.TypeIdentifier (Syntax.Identifier s)
-javaTypeIdentifierToJavaTypeArgument :: Syntax.TypeIdentifier -> Syntax.TypeArgument
-javaTypeIdentifierToJavaTypeArgument id =
-    Syntax.TypeArgumentReference (Syntax.ReferenceTypeVariable (Syntax.TypeVariable {
-      Syntax.typeVariableAnnotations = [],
-      Syntax.typeVariableIdentifier = id}))
-javaTypeName :: Syntax.Identifier -> Syntax.TypeName
-javaTypeName id =
-    Syntax.TypeName {
-      Syntax.typeNameIdentifier = (Syntax.TypeIdentifier id),
-      Syntax.typeNameQualifier = Nothing}
-javaTypeParameter :: String -> Syntax.TypeParameter
-javaTypeParameter v =
-    Syntax.TypeParameter {
-      Syntax.typeParameterModifiers = [],
-      Syntax.typeParameterIdentifier = (javaTypeIdentifier v),
-      Syntax.typeParameterBound = Nothing}
-javaTypeToJavaFormalParameter :: Syntax.Type -> Core.Name -> Syntax.FormalParameter
-javaTypeToJavaFormalParameter jt fname =
-    Syntax.FormalParameterSimple (Syntax.FormalParameter_Simple {
-      Syntax.formalParameter_SimpleModifiers = [],
-      Syntax.formalParameter_SimpleType = (Syntax.UnannType jt),
-      Syntax.formalParameter_SimpleId = (fieldNameToJavaVariableDeclaratorId fname)})
-javaTypeToJavaReferenceType :: Syntax.Type -> t0 -> Either Errors.Error Syntax.ReferenceType
-javaTypeToJavaReferenceType t cx =
-    case t of
-      Syntax.TypeReference v0 -> Right v0
-      Syntax.TypePrimitive _ -> Left (Errors.ErrorOther (Errors.OtherError "expected a Java reference type"))
-javaTypeToJavaResult :: Syntax.Type -> Syntax.Result
-javaTypeToJavaResult jt = Syntax.ResultType (Syntax.UnannType jt)
-javaTypeToJavaTypeArgument :: Syntax.Type -> Syntax.TypeArgument
-javaTypeToJavaTypeArgument t =
-    case t of
-      Syntax.TypeReference v0 -> Syntax.TypeArgumentReference v0
-      Syntax.TypePrimitive _ -> Syntax.TypeArgumentWildcard (Syntax.Wildcard {
-        Syntax.wildcardAnnotations = [],
-        Syntax.wildcardWildcard = Nothing})
-javaTypeVariable :: String -> Syntax.ReferenceType
-javaTypeVariable v =
-    Syntax.ReferenceTypeVariable (Syntax.TypeVariable {
-      Syntax.typeVariableAnnotations = [],
-      Syntax.typeVariableIdentifier = (javaTypeIdentifier (Formatting.capitalize v))})
-javaTypeVariableToType :: Syntax.TypeVariable -> Syntax.Type
-javaTypeVariableToType tv = Syntax.TypeReference (Syntax.ReferenceTypeVariable tv)
-javaUnaryExpressionToJavaExpression :: Syntax.UnaryExpression -> Syntax.Expression
-javaUnaryExpressionToJavaExpression ue =
-    Syntax.ExpressionAssignment (Syntax.AssignmentExpressionConditional (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-      Syntax.ConditionalAndExpression [
-        Syntax.InclusiveOrExpression [
-          Syntax.ExclusiveOrExpression [
-            Syntax.AndExpression [
-              Syntax.EqualityExpressionUnary (Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary ue))))]]]]])))
-javaUnaryExpressionToJavaRelationalExpression :: Syntax.UnaryExpression -> Syntax.RelationalExpression
-javaUnaryExpressionToJavaRelationalExpression ue =
-    Syntax.RelationalExpressionSimple (Syntax.ShiftExpressionUnary (Syntax.AdditiveExpressionUnary (Syntax.MultiplicativeExpressionUnary ue)))
-javaVariableDeclarator :: Syntax.Identifier -> Maybe Syntax.VariableInitializer -> Syntax.VariableDeclarator
-javaVariableDeclarator id minit =
-    Syntax.VariableDeclarator {
-      Syntax.variableDeclaratorId = (javaVariableDeclaratorId id),
-      Syntax.variableDeclaratorInitializer = minit}
-javaVariableDeclaratorId :: Syntax.Identifier -> Syntax.VariableDeclaratorId
-javaVariableDeclaratorId id =
-    Syntax.VariableDeclaratorId {
-      Syntax.variableDeclaratorIdIdentifier = id,
-      Syntax.variableDeclaratorIdDims = Nothing}
-javaVariableName :: Core.Name -> Syntax.Identifier
-javaVariableName name = javaIdentifier (Names.localNameOf name)
-lookupJavaVarName :: Environment.Aliases -> Core.Name -> Core.Name
-lookupJavaVarName aliases name =
-    Maybes.cases (Maps.lookup name (Environment.aliasesVarRenames aliases)) name (\renamed -> renamed)
-makeConstructor :: Environment.Aliases -> Core.Name -> Bool -> [Syntax.FormalParameter] -> [Syntax.BlockStatement] -> Syntax.ClassBodyDeclaration
-makeConstructor aliases elName private params stmts =
-
-      let nm = Syntax.SimpleTypeName (nameToJavaTypeIdentifier aliases False elName)
-          cons =
-                  Syntax.ConstructorDeclarator {
-                    Syntax.constructorDeclaratorParameters = [],
-                    Syntax.constructorDeclaratorName = nm,
-                    Syntax.constructorDeclaratorReceiverParameter = Nothing,
-                    Syntax.constructorDeclaratorFormalParameters = params}
-          mods = [
-                Logic.ifElse private Syntax.ConstructorModifierPrivate Syntax.ConstructorModifierPublic]
-          body =
-                  Syntax.ConstructorBody {
-                    Syntax.constructorBodyInvocation = Nothing,
-                    Syntax.constructorBodyStatements = stmts}
-      in (Syntax.ClassBodyDeclarationConstructorDeclaration (Syntax.ConstructorDeclaration {
-        Syntax.constructorDeclarationModifiers = mods,
-        Syntax.constructorDeclarationConstructor = cons,
-        Syntax.constructorDeclarationThrows = Nothing,
-        Syntax.constructorDeclarationBody = body}))
-methodDeclaration :: [Syntax.MethodModifier] -> [Syntax.TypeParameter] -> [Syntax.Annotation] -> String -> [Syntax.FormalParameter] -> Syntax.Result -> Maybe [Syntax.BlockStatement] -> Syntax.ClassBodyDeclaration
-methodDeclaration mods tparams anns methodName params result stmts =
-    javaMethodDeclarationToJavaClassBodyDeclaration (Syntax.MethodDeclaration {
-      Syntax.methodDeclarationAnnotations = anns,
-      Syntax.methodDeclarationModifiers = mods,
-      Syntax.methodDeclarationHeader = (javaMethodHeader tparams methodName params result),
-      Syntax.methodDeclarationBody = (javaMethodBody stmts)})
-methodInvocation :: Maybe (Either Syntax.ExpressionName Syntax.Primary) -> Syntax.Identifier -> [Syntax.Expression] -> Syntax.MethodInvocation
-methodInvocation lhs methodName args =
-
-      let header =
-              Maybes.cases lhs (Syntax.MethodInvocation_HeaderSimple (Syntax.MethodName methodName)) (\either -> Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                Syntax.methodInvocation_ComplexVariant = (Eithers.either (\en -> Syntax.MethodInvocation_VariantExpression en) (\p -> Syntax.MethodInvocation_VariantPrimary p) either),
-                Syntax.methodInvocation_ComplexTypeArguments = [],
-                Syntax.methodInvocation_ComplexIdentifier = methodName}))
-      in Syntax.MethodInvocation {
-        Syntax.methodInvocationHeader = header,
-        Syntax.methodInvocationArguments = args}
-methodInvocationStatic :: Syntax.Identifier -> Syntax.Identifier -> [Syntax.Expression] -> Syntax.MethodInvocation
-methodInvocationStatic self methodName args =
-    methodInvocation (Just (Left (javaIdentifierToJavaExpressionName self))) methodName args
-methodInvocationStaticWithTypeArgs :: Syntax.Identifier -> Syntax.Identifier -> [Syntax.TypeArgument] -> [Syntax.Expression] -> Syntax.MethodInvocation
-methodInvocationStaticWithTypeArgs self methodName targs args =
-
-      let header =
-              Syntax.MethodInvocation_HeaderComplex (Syntax.MethodInvocation_Complex {
-                Syntax.methodInvocation_ComplexVariant = (Syntax.MethodInvocation_VariantExpression (javaIdentifierToJavaExpressionName self)),
-                Syntax.methodInvocation_ComplexTypeArguments = targs,
-                Syntax.methodInvocation_ComplexIdentifier = methodName})
-      in Syntax.MethodInvocation {
-        Syntax.methodInvocationHeader = header,
-        Syntax.methodInvocationArguments = args}
-nameToJavaClassType :: Environment.Aliases -> Bool -> [Syntax.TypeArgument] -> Core.Name -> Maybe String -> Syntax.ClassType
-nameToJavaClassType aliases qualify args name mlocal =
-
-      let result = nameToQualifiedJavaName aliases qualify name mlocal
-          id = Pairs.first result
-          pkg = Pairs.second result
-      in Syntax.ClassType {
-        Syntax.classTypeAnnotations = [],
-        Syntax.classTypeQualifier = pkg,
-        Syntax.classTypeIdentifier = id,
-        Syntax.classTypeArguments = args}
-nameToJavaName :: Environment.Aliases -> Core.Name -> Syntax.Identifier
-nameToJavaName aliases name =
-
-      let qn = Names.qualifyName name
-          ns_ = Packaging.qualifiedNameNamespace qn
-          local = Packaging.qualifiedNameLocal qn
-      in (Logic.ifElse (isEscaped (Core.unName name)) (Syntax.Identifier (sanitizeJavaName local)) (Maybes.cases ns_ (Syntax.Identifier local) (\gname ->
-        let parts =
-                Maybes.cases (Maps.lookup gname (Environment.aliasesPackages aliases)) (Strings.splitOn "." (Packaging.unNamespace gname)) (\pkgName -> Lists.map (\i -> Syntax.unIdentifier i) (Syntax.unPackageName pkgName))
-            allParts = Lists.concat2 parts [
-                  sanitizeJavaName local]
-        in (Syntax.Identifier (Strings.intercalate "." allParts)))))
-nameToJavaReferenceType :: Environment.Aliases -> Bool -> [Syntax.TypeArgument] -> Core.Name -> Maybe String -> Syntax.ReferenceType
-nameToJavaReferenceType aliases qualify args name mlocal =
-    Syntax.ReferenceTypeClassOrInterface (Syntax.ClassOrInterfaceTypeClass (nameToJavaClassType aliases qualify args name mlocal))
-nameToJavaTypeIdentifier :: Environment.Aliases -> Bool -> Core.Name -> Syntax.TypeIdentifier
-nameToJavaTypeIdentifier aliases qualify name = Pairs.first (nameToQualifiedJavaName aliases qualify name Nothing)
-nameToQualifiedJavaName :: Environment.Aliases -> Bool -> Core.Name -> Maybe String -> (Syntax.TypeIdentifier, Syntax.ClassTypeQualifier)
-nameToQualifiedJavaName aliases qualify name mlocal =
-
-      let qn = Names.qualifyName name
-          ns_ = Packaging.qualifiedNameNamespace qn
-          local = Packaging.qualifiedNameLocal qn
-          alias =
-                  Maybes.cases ns_ Nothing (\n -> Just (Maybes.cases (Maps.lookup n (Environment.aliasesPackages aliases)) (JavaNames.javaPackageName (Strings.splitOn "." (Packaging.unNamespace n))) (\id -> id)))
-          pkg =
-                  Logic.ifElse qualify (Maybes.cases alias Syntax.ClassTypeQualifierNone (\p -> Syntax.ClassTypeQualifierPackage p)) Syntax.ClassTypeQualifierNone
-          jid =
-                  javaTypeIdentifier (Maybes.cases mlocal (sanitizeJavaName local) (\l -> Strings.cat2 (Strings.cat2 (sanitizeJavaName local) ".") (sanitizeJavaName l)))
-      in (jid, pkg)
-overrideAnnotation :: Syntax.Annotation
-overrideAnnotation = Syntax.AnnotationMarker (Syntax.MarkerAnnotation (javaTypeName (Syntax.Identifier "Override")))
-referenceTypeToResult :: Syntax.ReferenceType -> Syntax.Result
-referenceTypeToResult rt = javaTypeToJavaResult (Syntax.TypeReference rt)
-sanitizeJavaName :: String -> String
-sanitizeJavaName name =
-    Logic.ifElse (isEscaped name) (unescape name) (Logic.ifElse (Equality.equal name "_") "ignored" (Formatting.sanitizeWithUnderscores Language.reservedWords name))
-suppressWarningsUncheckedAnnotation :: Syntax.Annotation
-suppressWarningsUncheckedAnnotation =
-    Syntax.AnnotationSingleElement (Syntax.SingleElementAnnotation {
-      Syntax.singleElementAnnotationName = (javaTypeName (Syntax.Identifier "SuppressWarnings")),
-      Syntax.singleElementAnnotationValue = (Just (Syntax.ElementValueConditionalExpression (Syntax.ConditionalExpressionSimple (Syntax.ConditionalOrExpression [
-        Syntax.ConditionalAndExpression [
-          javaPostfixExpressionToJavaInclusiveOrExpression (Syntax.PostfixExpressionPrimary (javaLiteralToJavaPrimary (javaString "unchecked")))]]))))})
-toAcceptMethod :: Bool -> [Syntax.TypeParameter] -> Syntax.ClassBodyDeclaration
-toAcceptMethod abstract vtparams =
-
-      let mods =
-              Logic.ifElse abstract [
-                Syntax.MethodModifierPublic,
-                Syntax.MethodModifierAbstract] [
-                Syntax.MethodModifierPublic]
-          tparams = [
-                javaTypeParameter JavaNames.visitorReturnParameter]
-          anns = Logic.ifElse abstract [] [
-                overrideAnnotation]
-          typeArgs = Lists.map (\tp -> Syntax.TypeArgumentReference (typeParameterToReferenceType tp)) vtparams
-          ref =
-                  javaClassTypeToJavaType (Syntax.ClassType {
-                    Syntax.classTypeAnnotations = [],
-                    Syntax.classTypeQualifier = Syntax.ClassTypeQualifierNone,
-                    Syntax.classTypeIdentifier = (javaTypeIdentifier JavaNames.visitorName),
-                    Syntax.classTypeArguments = (Lists.concat2 typeArgs [
-                      Syntax.TypeArgumentReference visitorTypeVariable])})
-          param = javaTypeToJavaFormalParameter ref (Core.Name "visitor")
-          result = javaTypeToJavaResult (Syntax.TypeReference visitorTypeVariable)
-          returnExpr =
-                  javaMethodInvocationToJavaExpression (methodInvocationStatic (Syntax.Identifier "visitor") (Syntax.Identifier JavaNames.visitMethodName) [
-                    javaThis])
-          body = Logic.ifElse abstract Nothing (Just [
-                Syntax.BlockStatementStatement (javaReturnStatement (Just returnExpr))])
-      in (methodDeclaration mods tparams anns JavaNames.acceptMethodName [
-        param] result body)
-toAssignStmt :: Core.Name -> Syntax.Statement
-toAssignStmt fname =
-
-      let id = fieldNameToJavaIdentifier fname
-          lhs =
-                  Syntax.LeftHandSideFieldAccess (Syntax.FieldAccess {
-                    Syntax.fieldAccessQualifier = (Syntax.FieldAccess_QualifierPrimary (Syntax.PrimaryNoNewArray Syntax.PrimaryNoNewArrayExpressionThis)),
-                    Syntax.fieldAccessIdentifier = id})
-          rhs = fieldNameToJavaExpression fname
-      in (javaAssignmentStatement lhs rhs)
-toJavaArrayType :: Syntax.Type -> t0 -> Either Errors.Error Syntax.Type
-toJavaArrayType t cx =
-    case t of
-      Syntax.TypeReference v0 -> case v0 of
-        Syntax.ReferenceTypeClassOrInterface v1 -> Right (Syntax.TypeReference (Syntax.ReferenceTypeArray (Syntax.ArrayType {
-          Syntax.arrayTypeDims = (Syntax.Dims [
-            []]),
-          Syntax.arrayTypeVariant = (Syntax.ArrayType_VariantClassOrInterface v1)})))
-        Syntax.ReferenceTypeArray v1 ->
-          let oldDims = Syntax.unDims (Syntax.arrayTypeDims v1)
-              newDims = Syntax.Dims (Lists.concat2 oldDims [
-                    []])
-              variant = Syntax.arrayTypeVariant v1
-          in (Right (Syntax.TypeReference (Syntax.ReferenceTypeArray (Syntax.ArrayType {
-            Syntax.arrayTypeDims = newDims,
-            Syntax.arrayTypeVariant = variant}))))
-        Syntax.ReferenceTypeVariable _ -> Left (Errors.ErrorOther (Errors.OtherError "don't know how to make Java reference type into array type"))
-      Syntax.TypePrimitive _ -> Left (Errors.ErrorOther (Errors.OtherError "don't know how to make Java type into array type"))
-typeParameterToReferenceType :: Syntax.TypeParameter -> Syntax.ReferenceType
-typeParameterToReferenceType tp =
-    javaTypeVariable (Syntax.unIdentifier (Syntax.unTypeIdentifier (Syntax.typeParameterIdentifier tp)))
-typeParameterToTypeArgument :: Syntax.TypeParameter -> Syntax.TypeArgument
-typeParameterToTypeArgument tp = javaTypeIdentifierToJavaTypeArgument (Syntax.typeParameterIdentifier tp)
-unTypeParameter :: Syntax.TypeParameter -> String
-unTypeParameter tp = Syntax.unIdentifier (Syntax.unTypeIdentifier (Syntax.typeParameterIdentifier tp))
-unescape :: String -> String
-unescape s = Strings.fromList (Lists.drop 1 (Strings.toList s))
-uniqueVarName :: Environment.Aliases -> Core.Name -> Core.Name
-uniqueVarName aliases name =
-    Logic.ifElse (Sets.member name (Environment.aliasesInScopeJavaVars aliases)) (uniqueVarName_go aliases (Core.unName name) 2) name
-uniqueVarName_go :: Environment.Aliases -> String -> Int -> Core.Name
-uniqueVarName_go aliases base n =
-
-      let candidate = Core.Name (Strings.cat2 base (Literals.showInt32 n))
-      in (Logic.ifElse (Sets.member candidate (Environment.aliasesInScopeJavaVars aliases)) (uniqueVarName_go aliases base (Math.add n 1)) candidate)
-varDeclarationStatement :: Syntax.Identifier -> Syntax.Expression -> Syntax.BlockStatement
-varDeclarationStatement id rhs =
-    Syntax.BlockStatementLocalVariableDeclaration (Syntax.LocalVariableDeclarationStatement (Syntax.LocalVariableDeclaration {
-      Syntax.localVariableDeclarationModifiers = [],
-      Syntax.localVariableDeclarationType = Syntax.LocalVariableTypeVar,
-      Syntax.localVariableDeclarationDeclarators = [
-        javaVariableDeclarator id (Just (Syntax.VariableInitializerExpression rhs))]}))
-variableDeclarationStatement :: t0 -> Syntax.Type -> Syntax.Identifier -> Syntax.Expression -> Syntax.BlockStatement
-variableDeclarationStatement aliases jtype id rhs =
-
-      let init_ = Syntax.VariableInitializerExpression rhs
-          vdec = javaVariableDeclarator id (Just init_)
-      in (Syntax.BlockStatementLocalVariableDeclaration (Syntax.LocalVariableDeclarationStatement (Syntax.LocalVariableDeclaration {
-        Syntax.localVariableDeclarationModifiers = [],
-        Syntax.localVariableDeclarationType = (Syntax.LocalVariableTypeType (Syntax.UnannType jtype)),
-        Syntax.localVariableDeclarationDeclarators = [
-          vdec]})))
-variableToJavaIdentifier :: Core.Name -> Syntax.Identifier
-variableToJavaIdentifier name =
-
-      let v = Core.unName name
-      in (Logic.ifElse (Equality.equal v "_") (Syntax.Identifier "ignored") (Syntax.Identifier (sanitizeJavaName v)))
-variantClassName :: Bool -> Core.Name -> Core.Name -> Core.Name
-variantClassName qualify elName fname =
-
-      let qn = Names.qualifyName elName
-          ns_ = Packaging.qualifiedNameNamespace qn
-          local = Packaging.qualifiedNameLocal qn
-          flocal = Formatting.capitalize (Core.unName fname)
-          local1 =
-                  Logic.ifElse qualify (Strings.cat2 (Strings.cat2 local ".") flocal) (Logic.ifElse (Equality.equal flocal local) (Strings.cat2 flocal "_") flocal)
-      in (Names.unqualifyName (Packaging.QualifiedName {
-        Packaging.qualifiedNameNamespace = ns_,
-        Packaging.qualifiedNameLocal = local1}))
-visitorTypeVariable :: Syntax.ReferenceType
-visitorTypeVariable = javaTypeVariable "r"
diff --git a/src/main/haskell/Hydra/JavaScript/Language.hs b/src/main/haskell/Hydra/JavaScript/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/JavaScript/Language.hs
+++ /dev/null
@@ -1,232 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for JavaScript (ECMAScript 2024)
-
-module Hydra.JavaScript.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
--- | Language constraints for JavaScript (ECMAScript 2024)
-javaScriptLanguage :: Coders.Language
-javaScriptLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.javaScript"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes = Sets.fromList [
-      Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
--- | A set of reserved words in JavaScript
-javaScriptReservedWords :: S.Set String
-javaScriptReservedWords =
-    Sets.fromList (Lists.concat [
-      keywords,
-      futureReserved,
-      strictModeReserved,
-      builtIns,
-      hydraJavaScriptKeywords])
-  where
-    keywords =
-        [
-          "await",
-          "break",
-          "case",
-          "catch",
-          "class",
-          "const",
-          "continue",
-          "debugger",
-          "default",
-          "delete",
-          "do",
-          "else",
-          "enum",
-          "export",
-          "extends",
-          "false",
-          "finally",
-          "for",
-          "function",
-          "if",
-          "import",
-          "in",
-          "instanceof",
-          "let",
-          "new",
-          "null",
-          "return",
-          "super",
-          "switch",
-          "this",
-          "throw",
-          "true",
-          "try",
-          "typeof",
-          "undefined",
-          "var",
-          "void",
-          "while",
-          "with",
-          "yield"]
-    futureReserved =
-        [
-          "implements",
-          "interface",
-          "package",
-          "private",
-          "protected",
-          "public"]
-    strictModeReserved =
-        [
-          "arguments",
-          "eval"]
-    builtIns =
-        [
-          "Array",
-          "ArrayBuffer",
-          "BigInt",
-          "Boolean",
-          "DataView",
-          "Date",
-          "Error",
-          "Float32Array",
-          "Float64Array",
-          "Function",
-          "Int8Array",
-          "Int16Array",
-          "Int32Array",
-          "JSON",
-          "Map",
-          "Math",
-          "Number",
-          "Object",
-          "Promise",
-          "Proxy",
-          "Reflect",
-          "RegExp",
-          "Set",
-          "String",
-          "Symbol",
-          "Uint8Array",
-          "Uint8ClampedArray",
-          "Uint16Array",
-          "Uint32Array",
-          "WeakMap",
-          "WeakSet",
-          "decodeURI",
-          "decodeURIComponent",
-          "encodeURI",
-          "encodeURIComponent",
-          "eval",
-          "isFinite",
-          "isNaN",
-          "parseFloat",
-          "parseInt",
-          "console",
-          "document",
-          "global",
-          "globalThis",
-          "module",
-          "process",
-          "require",
-          "window"]
-    hydraJavaScriptKeywords =
-        [
-          "Name",
-          "FrozenMap",
-          "TERM_ANNOTATED",
-          "TERM_APPLICATION",
-          "TERM_EITHER",
-          "TERM_FUNCTION",
-          "TERM_LET",
-          "TERM_LIST",
-          "TERM_LITERAL",
-          "TERM_MAP",
-          "TERM_MAYBE",
-          "TERM_PAIR",
-          "TERM_RECORD",
-          "TERM_SET",
-          "TERM_TYPE_APPLICATION",
-          "TERM_TYPE_LAMBDA",
-          "TERM_UNION",
-          "TERM_UNIT",
-          "TERM_VARIABLE",
-          "TERM_WRAP"]
diff --git a/src/main/haskell/Hydra/JavaScript/Operators.hs b/src/main/haskell/Hydra/JavaScript/Operators.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/JavaScript/Operators.hs
+++ /dev/null
@@ -1,167 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | AST operators for JavaScript with precedence and associativity
-
-module Hydra.JavaScript.Operators where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Addition operator (+)
-addOp :: Ast.Op
-addOp = Serialization.op "+" 14 Ast.AssociativityLeft
-
--- | Function application (whitespace)
-appOp :: Ast.Op
-appOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 20),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Arrow function operator (=>)
-arrowOp :: Ast.Op
-arrowOp = Serialization.op "=>" 2 Ast.AssociativityRight
-
--- | Assignment operator (=)
-assignOp :: Ast.Op
-assignOp = Serialization.op "=" 2 Ast.AssociativityRight
-
--- | Bitwise AND operator (&)
-bitwiseAndOp :: Ast.Op
-bitwiseAndOp = Serialization.op "&" 10 Ast.AssociativityLeft
-
--- | Bitwise OR operator (|)
-bitwiseOrOp :: Ast.Op
-bitwiseOrOp = Serialization.op "|" 8 Ast.AssociativityLeft
-
--- | Bitwise XOR operator (^)
-bitwiseXorOp :: Ast.Op
-bitwiseXorOp = Serialization.op "^" 9 Ast.AssociativityLeft
-
--- | Type annotation colon (:)
-colonOp :: Ast.Op
-colonOp = Serialization.op ":" 0 Ast.AssociativityNone
-
--- | Comma operator (,)
-commaOp :: Ast.Op
-commaOp = Serialization.op "," 1 Ast.AssociativityLeft
-
--- | Definition operator (= in const x = ...)
-defineOp :: Ast.Op
-defineOp = Serialization.op "=" 0 Ast.AssociativityNone
-
--- | Division operator (/)
-divideOp :: Ast.Op
-divideOp = Serialization.op "/" 15 Ast.AssociativityLeft
-
--- | Equality operator (==)
-equalOp :: Ast.Op
-equalOp = Serialization.op "==" 11 Ast.AssociativityLeft
-
--- | Exponentiation operator (**)
-exponentiateOp :: Ast.Op
-exponentiateOp = Serialization.op "**" 16 Ast.AssociativityRight
-
--- | Greater than operator (>)
-greaterThanOp :: Ast.Op
-greaterThanOp = Serialization.op ">" 12 Ast.AssociativityLeft
-
--- | Greater than or equal operator (>=)
-greaterThanOrEqualOp :: Ast.Op
-greaterThanOrEqualOp = Serialization.op ">=" 12 Ast.AssociativityLeft
-
--- | In operator (in)
-inOp :: Ast.Op
-inOp = Serialization.op "in" 12 Ast.AssociativityLeft
-
--- | Instance of operator (instanceof)
-instanceOfOp :: Ast.Op
-instanceOfOp = Serialization.op "instanceof" 12 Ast.AssociativityLeft
-
--- | Left shift operator (<<)
-leftShiftOp :: Ast.Op
-leftShiftOp = Serialization.op "<<" 13 Ast.AssociativityLeft
-
--- | Less than operator (<)
-lessThanOp :: Ast.Op
-lessThanOp = Serialization.op "<" 12 Ast.AssociativityLeft
-
--- | Less than or equal operator (<=)
-lessThanOrEqualOp :: Ast.Op
-lessThanOrEqualOp = Serialization.op "<=" 12 Ast.AssociativityLeft
-
--- | Logical AND operator (&&)
-logicalAndOp :: Ast.Op
-logicalAndOp = Serialization.op "&&" 6 Ast.AssociativityLeft
-
--- | Logical OR operator (||)
-logicalOrOp :: Ast.Op
-logicalOrOp = Serialization.op "||" 5 Ast.AssociativityLeft
-
--- | Member access operator (.)
-memberOp :: Ast.Op
-memberOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "."),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 20),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Modulo operator (%)
-moduloOp :: Ast.Op
-moduloOp = Serialization.op "%" 15 Ast.AssociativityLeft
-
--- | Multiplication operator (*)
-multiplyOp :: Ast.Op
-multiplyOp = Serialization.op "*" 15 Ast.AssociativityLeft
-
--- | Inequality operator (!=)
-notEqualOp :: Ast.Op
-notEqualOp = Serialization.op "!=" 11 Ast.AssociativityLeft
-
--- | Nullish coalescing operator (??)
-nullishCoalescingOp :: Ast.Op
-nullishCoalescingOp = Serialization.op "??" 4 Ast.AssociativityLeft
-
--- | Optional chaining operator (?.)
-optionalChainOp :: Ast.Op
-optionalChainOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "?."),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 20),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Right shift operator (>>)
-rightShiftOp :: Ast.Op
-rightShiftOp = Serialization.op ">>" 13 Ast.AssociativityLeft
-
--- | Strict equality operator (===)
-strictEqualOp :: Ast.Op
-strictEqualOp = Serialization.op "===" 11 Ast.AssociativityLeft
-
--- | Strict inequality operator (!==)
-strictNotEqualOp :: Ast.Op
-strictNotEqualOp = Serialization.op "!==" 11 Ast.AssociativityLeft
-
--- | Subtraction operator (-)
-subtractOp :: Ast.Op
-subtractOp = Serialization.op "-" 14 Ast.AssociativityLeft
-
--- | Ternary operator (?:) - represents the ? part
-ternaryOp :: Ast.Op
-ternaryOp = Serialization.op "?" 3 Ast.AssociativityRight
-
--- | Unsigned right shift operator (>>>)
-unsignedRightShiftOp :: Ast.Op
-unsignedRightShiftOp = Serialization.op ">>>" 13 Ast.AssociativityLeft
diff --git a/src/main/haskell/Hydra/JavaScript/Serde.hs b/src/main/haskell/Hydra/JavaScript/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/JavaScript/Serde.hs
+++ /dev/null
@@ -1,904 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting JavaScript AST to abstract expressions
-
-module Hydra.JavaScript.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Constants as Constants
-import qualified Hydra.JavaScript.Operators as Operators
-import qualified Hydra.JavaScript.Syntax as Syntax
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Convert an array element to an AST expression
-arrayElementToExpr :: Syntax.ArrayElement -> Ast.Expr
-arrayElementToExpr elem =
-    case elem of
-      Syntax.ArrayElementExpression v0 -> expressionToExpr v0
-      Syntax.ArrayElementSpread v0 -> Serialization.prefix "..." (expressionToExpr (Syntax.unSpreadElement v0))
-      Syntax.ArrayElementHole -> Serialization.cst ""
-
--- | Convert an array expression to an AST expression
-arrayExpressionToExpr :: [Syntax.ArrayElement] -> Ast.Expr
-arrayExpressionToExpr arr = Serialization.bracketList Serialization.inlineStyle (Lists.map arrayElementToExpr arr)
-
--- | Convert an array pattern to an AST expression
-arrayPatternToExpr :: [Maybe Syntax.Pattern] -> Ast.Expr
-arrayPatternToExpr arr =
-    Serialization.bracketList Serialization.inlineStyle (Lists.map (\maybeP -> Maybes.maybe (Serialization.cst "") patternToExpr maybeP) arr)
-
--- | Convert an arrow function expression to an AST expression
-arrowFunctionExpressionToExpr :: Syntax.ArrowFunctionExpression -> Ast.Expr
-arrowFunctionExpressionToExpr arrow =
-
-      let params = Syntax.arrowFunctionExpressionParams arrow
-          body = Syntax.arrowFunctionExpressionBody arrow
-          async = Syntax.arrowFunctionExpressionAsync arrow
-          asyncKw = Logic.ifElse async [
-                Serialization.cst "async"] []
-          paramsExpr =
-                  Logic.ifElse (Equality.equal (Lists.length params) 1) (Maybes.fromMaybe (Serialization.cst "") (Maybes.map patternToExpr (Lists.maybeHead params))) (Serialization.parenList False (Lists.map patternToExpr params))
-          bodyExpr =
-                  case body of
-                    Syntax.ArrowFunctionBodyExpression v0 -> expressionToExpr v0
-                    Syntax.ArrowFunctionBodyBlock v0 -> blockStatementToExpr v0
-      in (Serialization.spaceSep (Lists.concat [
-        asyncKw,
-        [
-          Serialization.ifx Operators.arrowOp paramsExpr bodyExpr]]))
-
--- | Convert an assignment expression to an AST expression
-assignmentExpressionToExpr :: Syntax.AssignmentExpression -> Ast.Expr
-assignmentExpressionToExpr assign =
-
-      let op = Syntax.assignmentExpressionOperator assign
-          left = Syntax.assignmentExpressionLeft assign
-          right = Syntax.assignmentExpressionRight assign
-          opStr = assignmentOperatorToString op
-      in (Serialization.spaceSep [
-        patternToExpr left,
-        (Serialization.cst opStr),
-        (expressionToExpr right)])
-
--- | Convert an assignment operator to a string
-assignmentOperatorToString :: Syntax.AssignmentOperator -> String
-assignmentOperatorToString op =
-    case op of
-      Syntax.AssignmentOperatorAssign -> "="
-      Syntax.AssignmentOperatorAddAssign -> "+="
-      Syntax.AssignmentOperatorSubtractAssign -> "-="
-      Syntax.AssignmentOperatorMultiplyAssign -> "*="
-      Syntax.AssignmentOperatorDivideAssign -> "/="
-      Syntax.AssignmentOperatorModuloAssign -> "%="
-      Syntax.AssignmentOperatorExponentiateAssign -> "**="
-      Syntax.AssignmentOperatorLeftShiftAssign -> "<<="
-      Syntax.AssignmentOperatorRightShiftAssign -> ">>="
-      Syntax.AssignmentOperatorUnsignedRightShiftAssign -> ">>>="
-      Syntax.AssignmentOperatorBitwiseAndAssign -> "&="
-      Syntax.AssignmentOperatorBitwiseOrAssign -> "|="
-      Syntax.AssignmentOperatorBitwiseXorAssign -> "^="
-      Syntax.AssignmentOperatorAndAssign -> "&&="
-      Syntax.AssignmentOperatorOrAssign -> "||="
-      Syntax.AssignmentOperatorNullishAssign -> "??="
-
--- | Convert an assignment pattern to an AST expression
-assignmentPatternToExpr :: Syntax.AssignmentPattern -> Ast.Expr
-assignmentPatternToExpr assign =
-
-      let left = Syntax.assignmentPatternLeft assign
-          right = Syntax.assignmentPatternRight assign
-      in (Serialization.ifx Operators.defineOp (patternToExpr left) (expressionToExpr right))
-
--- | Convert a binary expression to an AST expression
-binaryExpressionToExpr :: Syntax.BinaryExpression -> Ast.Expr
-binaryExpressionToExpr bin =
-
-      let op = Syntax.binaryExpressionOperator bin
-          left = Syntax.binaryExpressionLeft bin
-          right = Syntax.binaryExpressionRight bin
-      in (Serialization.ifx (binaryOperatorToExpr op) (expressionToExpr left) (expressionToExpr right))
-
--- | Convert a binary operator to an Op
-binaryOperatorToExpr :: Syntax.BinaryOperator -> Ast.Op
-binaryOperatorToExpr op =
-    case op of
-      Syntax.BinaryOperatorAdd -> Operators.addOp
-      Syntax.BinaryOperatorSubtract -> Operators.subtractOp
-      Syntax.BinaryOperatorMultiply -> Operators.multiplyOp
-      Syntax.BinaryOperatorDivide -> Operators.divideOp
-      Syntax.BinaryOperatorModulo -> Operators.moduloOp
-      Syntax.BinaryOperatorExponentiate -> Operators.exponentiateOp
-      Syntax.BinaryOperatorEqual -> Operators.equalOp
-      Syntax.BinaryOperatorNotEqual -> Operators.notEqualOp
-      Syntax.BinaryOperatorStrictEqual -> Operators.strictEqualOp
-      Syntax.BinaryOperatorStrictNotEqual -> Operators.strictNotEqualOp
-      Syntax.BinaryOperatorLessThan -> Operators.lessThanOp
-      Syntax.BinaryOperatorLessThanOrEqual -> Operators.lessThanOrEqualOp
-      Syntax.BinaryOperatorGreaterThan -> Operators.greaterThanOp
-      Syntax.BinaryOperatorGreaterThanOrEqual -> Operators.greaterThanOrEqualOp
-      Syntax.BinaryOperatorAnd -> Operators.logicalAndOp
-      Syntax.BinaryOperatorOr -> Operators.logicalOrOp
-      Syntax.BinaryOperatorNullishCoalescing -> Operators.nullishCoalescingOp
-      Syntax.BinaryOperatorBitwiseAnd -> Operators.bitwiseAndOp
-      Syntax.BinaryOperatorBitwiseOr -> Operators.bitwiseOrOp
-      Syntax.BinaryOperatorBitwiseXor -> Operators.bitwiseXorOp
-      Syntax.BinaryOperatorLeftShift -> Operators.leftShiftOp
-      Syntax.BinaryOperatorRightShift -> Operators.rightShiftOp
-      Syntax.BinaryOperatorUnsignedRightShift -> Operators.unsignedRightShiftOp
-      Syntax.BinaryOperatorIn -> Operators.inOp
-      Syntax.BinaryOperatorInstanceof -> Operators.instanceOfOp
-
--- | Convert a block statement to an AST expression
-blockStatementToExpr :: [Syntax.Statement] -> Ast.Expr
-blockStatementToExpr block =
-    Serialization.curlyBracesList Nothing Serialization.fullBlockStyle (Lists.map statementToExpr block)
-
--- | Convert a break statement to an AST expression
-breakStatementToExpr :: Maybe Syntax.Identifier -> Ast.Expr
-breakStatementToExpr b =
-    Maybes.maybe (Serialization.cst "break;") (\label -> Serialization.suffix ";" (Serialization.spaceSep [
-      Serialization.cst "break",
-      (identifierToExpr label)])) b
-
--- | Convert a call expression to an AST expression
-callExpressionToExpr :: Syntax.CallExpression -> Ast.Expr
-callExpressionToExpr call =
-
-      let callee = Syntax.callExpressionCallee call
-          args = Syntax.callExpressionArguments call
-          optional = Syntax.callExpressionOptional call
-          calleeExpr = expressionToExpr callee
-          argsExpr = Serialization.parenList False (Lists.map expressionToExpr args)
-          optionalDot = Logic.ifElse optional "?." ""
-      in (Serialization.spaceSep [
-        calleeExpr,
-        (Serialization.cst optionalDot),
-        argsExpr])
-
--- | Convert a catch clause to an AST expression
-catchClauseToExpr :: Syntax.CatchClause -> Ast.Expr
-catchClauseToExpr c =
-
-      let param = Syntax.catchClauseParam c
-          body = Syntax.catchClauseBody c
-          catchKw =
-                  Maybes.maybe (Serialization.cst "catch") (\p -> Serialization.spaceSep [
-                    Serialization.cst "catch",
-                    (Serialization.parenthesize (patternToExpr p))]) param
-      in (Serialization.spaceSep [
-        catchKw,
-        (blockStatementToExpr body)])
-
--- | Convert a class declaration to an AST expression
-classDeclarationToExpr :: Syntax.ClassDeclaration -> Ast.Expr
-classDeclarationToExpr cls =
-
-      let id = Syntax.classDeclarationId cls
-          superClass = Syntax.classDeclarationSuperClass cls
-          body = Syntax.classDeclarationBody cls
-          extendsClause =
-                  Maybes.maybe [] (\s -> [
-                    Serialization.cst "extends",
-                    (expressionToExpr s)]) superClass
-          bodyExpr = Serialization.curlyBracesList Nothing Serialization.fullBlockStyle (Lists.map methodDefinitionToExpr body)
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "class",
-          (identifierToExpr id)],
-        extendsClause,
-        [
-          bodyExpr]]))
-
--- | Convert a class declaration with comments to an AST expression
-classDeclarationWithCommentsToExpr :: Syntax.ClassDeclarationWithComments -> Ast.Expr
-classDeclarationWithCommentsToExpr cdwc =
-
-      let body = Syntax.classDeclarationWithCommentsBody cdwc
-          mc = Syntax.classDeclarationWithCommentsComments cdwc
-      in (Maybes.maybe (classDeclarationToExpr body) (\c -> Serialization.newlineSep [
-        documentationCommentToExpr c,
-        (classDeclarationToExpr body)]) mc)
-
--- | Convert a conditional expression to an AST expression
-conditionalExpressionToExpr :: Syntax.ConditionalExpression -> Ast.Expr
-conditionalExpressionToExpr cond =
-
-      let test = Syntax.conditionalExpressionTest cond
-          consequent = Syntax.conditionalExpressionConsequent cond
-          alternate = Syntax.conditionalExpressionAlternate cond
-      in (Serialization.spaceSep [
-        expressionToExpr test,
-        (Serialization.cst "?"),
-        (expressionToExpr consequent),
-        (Serialization.cst ":"),
-        (expressionToExpr alternate)])
-
--- | Convert a continue statement to an AST expression
-continueStatementToExpr :: Maybe Syntax.Identifier -> Ast.Expr
-continueStatementToExpr c =
-    Maybes.maybe (Serialization.cst "continue;") (\label -> Serialization.suffix ";" (Serialization.spaceSep [
-      Serialization.cst "continue",
-      (identifierToExpr label)])) c
-
--- | Convert a do-while statement to an AST expression
-doWhileStatementToExpr :: Syntax.DoWhileStatement -> Ast.Expr
-doWhileStatementToExpr d =
-
-      let body = Syntax.doWhileStatementBody d
-          test = Syntax.doWhileStatementTest d
-      in (Serialization.suffix ";" (Serialization.spaceSep [
-        Serialization.cst "do",
-        (statementToExpr body),
-        (Serialization.cst "while"),
-        (Serialization.parenthesize (expressionToExpr test))]))
-
--- | Convert a documentation comment to an AST expression
-documentationCommentToExpr :: Syntax.DocumentationComment -> Ast.Expr
-documentationCommentToExpr doc =
-
-      let description = Syntax.documentationCommentDescription doc
-          tags = Syntax.documentationCommentTags doc
-      in (Serialization.cst (toJavaScriptComments description tags))
-
--- | Convert a documentation tag to a JSDoc line
-documentationTagToLine :: Syntax.DocumentationTag -> String
-documentationTagToLine tag =
-
-      let name = Syntax.documentationTagName tag
-          mtype = Syntax.documentationTagType tag
-          mparamName = Syntax.documentationTagParamName tag
-          description = Syntax.documentationTagDescription tag
-          typePart =
-                  Maybes.maybe "" (\t -> Strings.cat [
-                    "{",
-                    (typeExpressionToString t),
-                    "} "]) mtype
-          paramPart = Maybes.maybe "" (\p -> Strings.cat2 (Syntax.unIdentifier p) " ") mparamName
-      in (Strings.cat [
-        " * @",
-        name,
-        " ",
-        typePart,
-        paramPart,
-        description])
-
--- | Escape special characters in a string for JavaScript
-escapeString :: t0 -> t1 -> t0
-escapeString s singleQuote = s
-
--- | Convert an export all declaration to an AST expression
-exportAllToExpr :: Syntax.ExportAllDeclaration -> Ast.Expr
-exportAllToExpr a =
-
-      let exported = Syntax.exportAllDeclarationExported a
-          source = Syntax.exportAllDeclarationSource a
-          exportedClause =
-                  Maybes.maybe (Serialization.cst "*") (\e -> Serialization.spaceSep [
-                    Serialization.cst "*",
-                    (Serialization.cst "as"),
-                    (identifierToExpr e)]) exported
-      in (Serialization.suffix ";" (Serialization.spaceSep [
-        Serialization.cst "export",
-        exportedClause,
-        (Serialization.cst "from"),
-        (stringLiteralToExpr source)]))
-
--- | Convert an export declaration to an AST expression
-exportDeclarationToExpr :: Syntax.ExportDeclaration -> Ast.Expr
-exportDeclarationToExpr exp =
-    case exp of
-      Syntax.ExportDeclarationNamed v0 -> namedExportToExpr v0
-      Syntax.ExportDeclarationDefault v0 -> Serialization.suffix ";" (Serialization.spaceSep [
-        Serialization.cst "export",
-        (Serialization.cst "default"),
-        (expressionToExpr v0)])
-      Syntax.ExportDeclarationDeclaration v0 -> Serialization.spaceSep [
-        Serialization.cst "export",
-        (statementToExpr v0)]
-      Syntax.ExportDeclarationAll v0 -> exportAllToExpr v0
-
--- | Convert an export specifier to an AST expression
-exportSpecifierToExpr :: Syntax.ExportSpecifier -> Ast.Expr
-exportSpecifierToExpr spec =
-
-      let local = Syntax.exportSpecifierLocal spec
-          exported = Syntax.exportSpecifierExported spec
-      in (Logic.ifElse (Equality.equal (Syntax.unIdentifier local) (Syntax.unIdentifier exported)) (identifierToExpr local) (Serialization.spaceSep [
-        identifierToExpr local,
-        (Serialization.cst "as"),
-        (identifierToExpr exported)]))
-
--- | Convert a JavaScript expression to an AST expression
-expressionToExpr :: Syntax.Expression -> Ast.Expr
-expressionToExpr expr =
-    case expr of
-      Syntax.ExpressionIdentifier v0 -> identifierToExpr v0
-      Syntax.ExpressionLiteral v0 -> literalToExpr v0
-      Syntax.ExpressionArray v0 -> arrayExpressionToExpr v0
-      Syntax.ExpressionObject v0 -> objectExpressionToExpr v0
-      Syntax.ExpressionFunction v0 -> functionExpressionToExpr v0
-      Syntax.ExpressionArrow v0 -> arrowFunctionExpressionToExpr v0
-      Syntax.ExpressionCall v0 -> callExpressionToExpr v0
-      Syntax.ExpressionMember v0 -> memberExpressionToExpr v0
-      Syntax.ExpressionConditional v0 -> conditionalExpressionToExpr v0
-      Syntax.ExpressionBinary v0 -> binaryExpressionToExpr v0
-      Syntax.ExpressionUnary v0 -> unaryExpressionToExpr v0
-      Syntax.ExpressionAssignment v0 -> assignmentExpressionToExpr v0
-      Syntax.ExpressionSequence v0 -> Serialization.parenList False (Lists.map expressionToExpr v0)
-      Syntax.ExpressionThis -> Serialization.cst "this"
-      Syntax.ExpressionNew v0 -> Serialization.spaceSep [
-        Serialization.cst "new",
-        (callExpressionToExpr v0)]
-      Syntax.ExpressionYield v0 -> Maybes.maybe (Serialization.cst "yield") (\e -> Serialization.spaceSep [
-        Serialization.cst "yield",
-        (expressionToExpr e)]) v0
-      Syntax.ExpressionAwait v0 -> Serialization.spaceSep [
-        Serialization.cst "await",
-        (expressionToExpr v0)]
-      Syntax.ExpressionSpread v0 -> Serialization.prefix "..." (expressionToExpr (Syntax.unSpreadElement v0))
-      Syntax.ExpressionParenthesized v0 -> Serialization.parenthesize (expressionToExpr v0)
-
--- | Convert a for-in statement to an AST expression
-forInStatementToExpr :: Syntax.ForInStatement -> Ast.Expr
-forInStatementToExpr f =
-
-      let left = Syntax.forInStatementLeft f
-          right = Syntax.forInStatementRight f
-          body = Syntax.forInStatementBody f
-          leftExpr =
-                  case left of
-                    Syntax.ForInLeftVariable v0 -> variableDeclarationToExpr v0
-                    Syntax.ForInLeftPattern v0 -> patternToExpr v0
-      in (Serialization.spaceSep [
-        Serialization.cst "for",
-        (Serialization.parenthesize (Serialization.spaceSep [
-          leftExpr,
-          (Serialization.cst "in"),
-          (expressionToExpr right)])),
-        (statementToExpr body)])
-
--- | Convert a for-of statement to an AST expression
-forOfStatementToExpr :: Syntax.ForOfStatement -> Ast.Expr
-forOfStatementToExpr f =
-
-      let await = Syntax.forOfStatementAwait f
-          left = Syntax.forOfStatementLeft f
-          right = Syntax.forOfStatementRight f
-          body = Syntax.forOfStatementBody f
-          forKw = Logic.ifElse await (Serialization.cst "for await") (Serialization.cst "for")
-          leftExpr =
-                  case left of
-                    Syntax.ForInLeftVariable v0 -> variableDeclarationToExpr v0
-                    Syntax.ForInLeftPattern v0 -> patternToExpr v0
-      in (Serialization.spaceSep [
-        forKw,
-        (Serialization.parenthesize (Serialization.spaceSep [
-          leftExpr,
-          (Serialization.cst "of"),
-          (expressionToExpr right)])),
-        (statementToExpr body)])
-
--- | Convert a for statement to an AST expression
-forStatementToExpr :: Syntax.ForStatement -> Ast.Expr
-forStatementToExpr f =
-
-      let init = Syntax.forStatementInit f
-          test = Syntax.forStatementTest f
-          update = Syntax.forStatementUpdate f
-          body = Syntax.forStatementBody f
-          initExpr =
-                  Maybes.maybe (Serialization.cst "") (\i -> case i of
-                    Syntax.ForInitVariable v0 -> variableDeclarationToExpr v0
-                    Syntax.ForInitExpression v0 -> expressionToExpr v0) init
-          testExpr = Maybes.maybe (Serialization.cst "") expressionToExpr test
-          updateExpr = Maybes.maybe (Serialization.cst "") expressionToExpr update
-      in (Serialization.spaceSep [
-        Serialization.cst "for",
-        (Serialization.parenList False [
-          initExpr,
-          testExpr,
-          updateExpr]),
-        (statementToExpr body)])
-
--- | Format import specifiers, handling default vs named imports
-formatImportSpecifiers :: [Ast.Expr] -> Ast.Expr
-formatImportSpecifiers specs = Serialization.curlyBracesList Nothing Serialization.inlineStyle specs
-
--- | Convert a function declaration to an AST expression
-functionDeclarationToExpr :: Syntax.FunctionDeclaration -> Ast.Expr
-functionDeclarationToExpr fn =
-
-      let id = Syntax.functionDeclarationId fn
-          params = Syntax.functionDeclarationParams fn
-          body = Syntax.functionDeclarationBody fn
-          async = Syntax.functionDeclarationAsync fn
-          generator = Syntax.functionDeclarationGenerator fn
-          asyncKw = Logic.ifElse async [
-                Serialization.cst "async"] []
-          funcKw = Logic.ifElse generator (Serialization.cst "function*") (Serialization.cst "function")
-          paramsExpr = Serialization.parenList False (Lists.map patternToExpr params)
-      in (Serialization.spaceSep (Lists.concat [
-        asyncKw,
-        [
-          funcKw,
-          (identifierToExpr id),
-          paramsExpr,
-          (blockStatementToExpr body)]]))
-
--- | Convert a function declaration with comments to an AST expression
-functionDeclarationWithCommentsToExpr :: Syntax.FunctionDeclarationWithComments -> Ast.Expr
-functionDeclarationWithCommentsToExpr fdwc =
-
-      let body = Syntax.functionDeclarationWithCommentsBody fdwc
-          mc = Syntax.functionDeclarationWithCommentsComments fdwc
-      in (Maybes.maybe (functionDeclarationToExpr body) (\c -> Serialization.newlineSep [
-        documentationCommentToExpr c,
-        (functionDeclarationToExpr body)]) mc)
-
--- | Convert a function expression to an AST expression
-functionExpressionToExpr :: Syntax.FunctionExpression -> Ast.Expr
-functionExpressionToExpr fn =
-
-      let mid = Syntax.functionExpressionId fn
-          params = Syntax.functionExpressionParams fn
-          body = Syntax.functionExpressionBody fn
-          async = Syntax.functionExpressionAsync fn
-          generator = Syntax.functionExpressionGenerator fn
-          asyncKw = Logic.ifElse async [
-                Serialization.cst "async"] []
-          funcKw = Logic.ifElse generator (Serialization.cst "function*") (Serialization.cst "function")
-          nameExpr = Maybes.maybe [] (\id -> [
-                identifierToExpr id]) mid
-          paramsExpr = Serialization.parenList False (Lists.map patternToExpr params)
-      in (Serialization.spaceSep (Lists.concat [
-        asyncKw,
-        [
-          funcKw],
-        nameExpr,
-        [
-          paramsExpr,
-          (blockStatementToExpr body)]]))
-
--- | Convert an identifier to an AST expression
-identifierToExpr :: Syntax.Identifier -> Ast.Expr
-identifierToExpr id = Serialization.cst (Syntax.unIdentifier id)
-
--- | Convert an if statement to an AST expression
-ifStatementToExpr :: Syntax.IfStatement -> Ast.Expr
-ifStatementToExpr ifStmt =
-
-      let test = Syntax.ifStatementTest ifStmt
-          consequent = Syntax.ifStatementConsequent ifStmt
-          alternate = Syntax.ifStatementAlternate ifStmt
-          ifPart =
-                  Serialization.spaceSep [
-                    Serialization.cst "if",
-                    (Serialization.parenthesize (expressionToExpr test)),
-                    (statementToExpr consequent)]
-      in (Maybes.maybe ifPart (\alt -> Serialization.spaceSep [
-        ifPart,
-        (Serialization.cst "else"),
-        (statementToExpr alt)]) alternate)
-
--- | Convert an import declaration to an AST expression
-importDeclarationToExpr :: Syntax.ImportDeclaration -> Ast.Expr
-importDeclarationToExpr imp =
-
-      let specifiers = Syntax.importDeclarationSpecifiers imp
-          source = Syntax.importDeclarationSource imp
-          sourceExpr = stringLiteralToExpr source
-          specExprs = Lists.map importSpecifierToExpr specifiers
-      in (Logic.ifElse (Lists.null specifiers) (Serialization.suffix ";" (Serialization.spaceSep [
-        Serialization.cst "import",
-        sourceExpr])) (Serialization.suffix ";" (Serialization.spaceSep [
-        Serialization.cst "import",
-        (formatImportSpecifiers specExprs),
-        (Serialization.cst "from"),
-        sourceExpr])))
-
--- | Convert an import specifier to an AST expression
-importSpecifierToExpr :: Syntax.ImportClause -> Ast.Expr
-importSpecifierToExpr spec =
-    case spec of
-      Syntax.ImportClauseNamed v0 ->
-        let imported = Syntax.importSpecifierImported v0
-            local = Syntax.importSpecifierLocal v0
-        in (Logic.ifElse (Equality.equal (Syntax.unIdentifier imported) (Syntax.unIdentifier local)) (identifierToExpr local) (Serialization.spaceSep [
-          identifierToExpr imported,
-          (Serialization.cst "as"),
-          (identifierToExpr local)]))
-      Syntax.ImportClauseDefault v0 -> identifierToExpr (Syntax.unImportDefaultSpecifier v0)
-      Syntax.ImportClauseNamespace v0 -> Serialization.spaceSep [
-        Serialization.cst "*",
-        (Serialization.cst "as"),
-        (identifierToExpr (Syntax.unImportNamespaceSpecifier v0))]
-
--- | Convert a labeled statement to an AST expression
-labeledStatementToExpr :: Syntax.LabeledStatement -> Ast.Expr
-labeledStatementToExpr l =
-
-      let label = Syntax.labeledStatementLabel l
-          body = Syntax.labeledStatementBody l
-      in (Serialization.spaceSep [
-        Serialization.suffix ":" (identifierToExpr label),
-        (statementToExpr body)])
-
--- | Convert a literal to an AST expression
-literalToExpr :: Syntax.Literal -> Ast.Expr
-literalToExpr lit =
-    case lit of
-      Syntax.LiteralString v0 -> stringLiteralToExpr v0
-      Syntax.LiteralNumber v0 -> numericLiteralToExpr v0
-      Syntax.LiteralBoolean v0 -> Serialization.cst (Logic.ifElse v0 "true" "false")
-      Syntax.LiteralNull -> Serialization.cst "null"
-      Syntax.LiteralUndefined -> Serialization.cst "undefined"
-      Syntax.LiteralBigInt v0 -> Serialization.cst (Strings.cat2 (Literals.showBigint v0) "n")
-      Syntax.LiteralTemplate v0 -> templateLiteralToExpr v0
-
--- | Convert a member expression to an AST expression
-memberExpressionToExpr :: Syntax.MemberExpression -> Ast.Expr
-memberExpressionToExpr mem =
-
-      let obj = Syntax.memberExpressionObject mem
-          prop = Syntax.memberExpressionProperty mem
-          computed = Syntax.memberExpressionComputed mem
-          optional = Syntax.memberExpressionOptional mem
-          objExpr = expressionToExpr obj
-          propExpr = expressionToExpr prop
-      in (Logic.ifElse computed (Serialization.spaceSep [
-        objExpr,
-        (Logic.ifElse optional (Serialization.cst "?.") (Serialization.cst "")),
-        (Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle propExpr)]) (Serialization.ifx (Logic.ifElse optional Operators.optionalChainOp Operators.memberOp) objExpr propExpr))
-
--- | Convert a method definition to an AST expression
-methodDefinitionToExpr :: Syntax.MethodDefinition -> Ast.Expr
-methodDefinitionToExpr method =
-
-      let key = Syntax.methodDefinitionKey method
-          value = Syntax.methodDefinitionValue method
-          kind = Syntax.methodDefinitionKind method
-          computed = Syntax.methodDefinitionComputed method
-          static = Syntax.methodDefinitionStatic method
-          staticKw = Logic.ifElse static [
-                Serialization.cst "static"] []
-          kindKw =
-                  case kind of
-                    Syntax.MethodKindConstructor -> []
-                    Syntax.MethodKindMethod -> []
-                    Syntax.MethodKindGet -> [
-                      Serialization.cst "get"]
-                    Syntax.MethodKindSet -> [
-                      Serialization.cst "set"]
-          keyExpr =
-                  Logic.ifElse computed (Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (expressionToExpr key)) (expressionToExpr key)
-          params = Syntax.functionExpressionParams value
-          body = Syntax.functionExpressionBody value
-          paramsExpr = Serialization.parenList False (Lists.map patternToExpr params)
-      in (Serialization.spaceSep (Lists.concat [
-        staticKw,
-        kindKw,
-        [
-          keyExpr,
-          paramsExpr,
-          (blockStatementToExpr body)]]))
-
--- | Convert a module item to an AST expression
-moduleItemToExpr :: Syntax.ModuleItem -> Ast.Expr
-moduleItemToExpr item =
-    case item of
-      Syntax.ModuleItemStatement v0 -> statementToExpr v0
-      Syntax.ModuleItemImport v0 -> importDeclarationToExpr v0
-      Syntax.ModuleItemExport v0 -> exportDeclarationToExpr v0
-
--- | Convert a module item with comments to an AST expression
-moduleItemWithCommentsToExpr :: Syntax.ModuleItemWithComments -> Ast.Expr
-moduleItemWithCommentsToExpr miwc =
-
-      let body = Syntax.moduleItemWithCommentsBody miwc
-          mc = Syntax.moduleItemWithCommentsComments miwc
-      in (Maybes.maybe (moduleItemToExpr body) (\c -> Serialization.newlineSep [
-        documentationCommentToExpr c,
-        (moduleItemToExpr body)]) mc)
-
--- | Convert a named export to an AST expression
-namedExportToExpr :: Syntax.NamedExport -> Ast.Expr
-namedExportToExpr n =
-
-      let specifiers = Syntax.namedExportSpecifiers n
-          source = Syntax.namedExportSource n
-          specExprs = Lists.map exportSpecifierToExpr specifiers
-          fromClause =
-                  Maybes.maybe [] (\s -> [
-                    Serialization.cst "from",
-                    (stringLiteralToExpr s)]) source
-      in (Serialization.suffix ";" (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "export"],
-        [
-          Serialization.curlyBracesList Nothing Serialization.inlineStyle specExprs],
-        fromClause])))
-
--- | Convert a numeric literal to an AST expression
-numericLiteralToExpr :: Syntax.NumericLiteral -> Ast.Expr
-numericLiteralToExpr n =
-    case n of
-      Syntax.NumericLiteralInteger v0 -> Serialization.cst (Literals.showInt64 v0)
-      Syntax.NumericLiteralFloat v0 -> Serialization.cst (Literals.showFloat64 v0)
-
--- | Convert an object expression to an AST expression
-objectExpressionToExpr :: [Syntax.Property] -> Ast.Expr
-objectExpressionToExpr obj =
-    Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map propertyToExpr obj)
-
--- | Convert an object pattern property to an AST expression
-objectPatternPropertyToExpr :: Syntax.ObjectPatternProperty -> Ast.Expr
-objectPatternPropertyToExpr prop =
-    case prop of
-      Syntax.ObjectPatternPropertyProperty v0 -> propertyToExpr v0
-      Syntax.ObjectPatternPropertyRest v0 -> Serialization.prefix "..." (patternToExpr (Syntax.unRestElement v0))
-
--- | Convert an object pattern to an AST expression
-objectPatternToExpr :: Syntax.ObjectPattern -> Ast.Expr
-objectPatternToExpr obj =
-
-      let props = Syntax.objectPatternProperties obj
-      in (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map objectPatternPropertyToExpr props))
-
--- | Convert a pattern to an AST expression
-patternToExpr :: Syntax.Pattern -> Ast.Expr
-patternToExpr pat =
-    case pat of
-      Syntax.PatternIdentifier v0 -> identifierToExpr v0
-      Syntax.PatternObject v0 -> objectPatternToExpr v0
-      Syntax.PatternArray v0 -> arrayPatternToExpr v0
-      Syntax.PatternAssignment v0 -> assignmentPatternToExpr v0
-      Syntax.PatternRest v0 -> Serialization.prefix "..." (patternToExpr (Syntax.unRestElement v0))
-
--- | Convert a JavaScript program to an AST expression
-programToExpr :: Syntax.Program -> Ast.Expr
-programToExpr prog =
-
-      let body = Syntax.programBody prog
-          warning = [
-                Serialization.cst (toLineComment Constants.warningAutoGeneratedFile)]
-          items = Lists.map moduleItemToExpr body
-      in (Serialization.doubleNewlineSep (Lists.concat [
-        warning,
-        items]))
-
--- | Convert an object property to an AST expression
-propertyToExpr :: Syntax.Property -> Ast.Expr
-propertyToExpr prop =
-
-      let key = Syntax.propertyKey prop
-          value = Syntax.propertyValue prop
-          shorthand = Syntax.propertyShorthand prop
-          computed = Syntax.propertyComputed prop
-          keyExpr =
-                  Logic.ifElse computed (Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (expressionToExpr key)) (expressionToExpr key)
-      in (Logic.ifElse shorthand keyExpr (Serialization.ifx Operators.colonOp keyExpr (expressionToExpr value)))
-
--- | Convert a return statement to an AST expression
-returnStatementToExpr :: Maybe Syntax.Expression -> Ast.Expr
-returnStatementToExpr r =
-    Maybes.maybe (Serialization.cst "return;") (\e -> Serialization.suffix ";" (Serialization.spaceSep [
-      Serialization.cst "return",
-      (expressionToExpr e)])) r
-
--- | Convert a statement to an AST expression
-statementToExpr :: Syntax.Statement -> Ast.Expr
-statementToExpr stmt =
-    case stmt of
-      Syntax.StatementExpression v0 -> Serialization.suffix ";" (expressionToExpr v0)
-      Syntax.StatementBlock v0 -> blockStatementToExpr v0
-      Syntax.StatementEmpty -> Serialization.cst ";"
-      Syntax.StatementDebugger -> Serialization.cst "debugger;"
-      Syntax.StatementReturn v0 -> returnStatementToExpr v0
-      Syntax.StatementBreak v0 -> breakStatementToExpr v0
-      Syntax.StatementContinue v0 -> continueStatementToExpr v0
-      Syntax.StatementIf v0 -> ifStatementToExpr v0
-      Syntax.StatementSwitch v0 -> switchStatementToExpr v0
-      Syntax.StatementThrow v0 -> throwStatementToExpr v0
-      Syntax.StatementTry v0 -> tryStatementToExpr v0
-      Syntax.StatementWhile v0 -> whileStatementToExpr v0
-      Syntax.StatementDoWhile v0 -> doWhileStatementToExpr v0
-      Syntax.StatementFor v0 -> forStatementToExpr v0
-      Syntax.StatementForIn v0 -> forInStatementToExpr v0
-      Syntax.StatementForOf v0 -> forOfStatementToExpr v0
-      Syntax.StatementVariableDeclaration v0 -> variableDeclarationToExpr v0
-      Syntax.StatementFunctionDeclaration v0 -> functionDeclarationToExpr v0
-      Syntax.StatementClassDeclaration v0 -> classDeclarationToExpr v0
-      Syntax.StatementLabeled v0 -> labeledStatementToExpr v0
-
--- | Convert a string literal to an AST expression
-stringLiteralToExpr :: Syntax.StringLiteral -> Ast.Expr
-stringLiteralToExpr s =
-
-      let value = Syntax.stringLiteralValue s
-          singleQuote = Syntax.stringLiteralSingleQuote s
-          quote = Logic.ifElse singleQuote "'" "\""
-          escaped = escapeString value singleQuote
-      in (Serialization.cst (Strings.cat [
-        quote,
-        escaped,
-        quote]))
-
--- | Convert a switch case to an AST expression
-switchCaseToExpr :: Syntax.SwitchCase -> Ast.Expr
-switchCaseToExpr c =
-
-      let test = Syntax.switchCaseTest c
-          consequent = Syntax.switchCaseConsequent c
-          caseLabel =
-                  Maybes.maybe (Serialization.cst "default:") (\t -> Serialization.spaceSep [
-                    Serialization.cst "case",
-                    (expressionToExpr t),
-                    (Serialization.cst ":")]) test
-      in (Serialization.newlineSep (Lists.cons caseLabel (Lists.map statementToExpr consequent)))
-
--- | Convert a switch statement to an AST expression
-switchStatementToExpr :: Syntax.SwitchStatement -> Ast.Expr
-switchStatementToExpr switchStmt =
-
-      let discriminant = Syntax.switchStatementDiscriminant switchStmt
-          cases = Syntax.switchStatementCases switchStmt
-      in (Serialization.spaceSep [
-        Serialization.cst "switch",
-        (Serialization.parenthesize (expressionToExpr discriminant)),
-        (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle (Lists.map switchCaseToExpr cases))])
-
--- | Convert a template literal to an AST expression
-templateLiteralToExpr :: Syntax.TemplateLiteral -> Ast.Expr
-templateLiteralToExpr t =
-
-      let quasis = Syntax.templateLiteralQuasis t
-          exprs = Syntax.templateLiteralExpressions t
-      in (Serialization.cst (Strings.cat [
-        "`",
-        (Strings.intercalate "" (Lists.map (\q -> Syntax.templateElementValue q) quasis)),
-        "`"]))
-
--- | Convert a throw statement to an AST expression
-throwStatementToExpr :: Syntax.ThrowStatement -> Ast.Expr
-throwStatementToExpr t =
-    Serialization.suffix ";" (Serialization.spaceSep [
-      Serialization.cst "throw",
-      (expressionToExpr (Syntax.unThrowStatement t))])
-
--- | Format a description and tags as a JSDoc comment
-toJavaScriptComments :: String -> [Syntax.DocumentationTag] -> String
-toJavaScriptComments desc tags =
-
-      let descLines = Logic.ifElse (Equality.equal desc "") [] (Lists.map (\line -> Strings.cat2 " * " line) (Strings.lines desc))
-          tagLines = Lists.map documentationTagToLine tags
-          allLines =
-                  Lists.concat [
-                    descLines,
-                    tagLines]
-      in (Logic.ifElse (Lists.null allLines) "" (Strings.intercalate "\n" (Lists.concat [
-        [
-          "/**"],
-        allLines,
-        [
-          " */"]])))
-
--- | Convert a string to a JavaScript line comment
-toLineComment :: String -> String
-toLineComment s = Strings.intercalate "\n" (Lists.map (\line -> Strings.cat2 "// " line) (Strings.lines s))
-
--- | Convert a try statement to an AST expression
-tryStatementToExpr :: Syntax.TryStatement -> Ast.Expr
-tryStatementToExpr t =
-
-      let block = Syntax.tryStatementBlock t
-          handler = Syntax.tryStatementHandler t
-          finalizer = Syntax.tryStatementFinalizer t
-          tryPart =
-                  Serialization.spaceSep [
-                    Serialization.cst "try",
-                    (blockStatementToExpr block)]
-          catchPart = Maybes.maybe [] (\c -> [
-                catchClauseToExpr c]) handler
-          finallyPart =
-                  Maybes.maybe [] (\f -> [
-                    Serialization.spaceSep [
-                      Serialization.cst "finally",
-                      (blockStatementToExpr f)]]) finalizer
-      in (Serialization.spaceSep (Lists.concat [
-        [
-          tryPart],
-        catchPart,
-        finallyPart]))
-
--- | Convert a type expression to a string for JSDoc
-typeExpressionToString :: Syntax.TypeExpression -> String
-typeExpressionToString typ =
-    case typ of
-      Syntax.TypeExpressionIdentifier v0 -> Syntax.unIdentifier v0
-      Syntax.TypeExpressionAny -> "*"
-      Syntax.TypeExpressionVoid -> "void"
-      Syntax.TypeExpressionNever -> "never"
-      Syntax.TypeExpressionLiteral _ -> "literal"
-      Syntax.TypeExpressionArray v0 -> Strings.cat2 (typeExpressionToString (Syntax.unArrayTypeExpression v0)) "[]"
-      Syntax.TypeExpressionFunction _ -> "Function"
-      Syntax.TypeExpressionObject _ -> "Object"
-      Syntax.TypeExpressionUnion v0 -> Strings.intercalate "|" (Lists.map typeExpressionToString v0)
-      Syntax.TypeExpressionParameterized v0 ->
-        let base = Syntax.parameterizedTypeExpressionBase v0
-            args = Syntax.parameterizedTypeExpressionArguments v0
-        in (Strings.cat [
-          typeExpressionToString base,
-          "<",
-          (Strings.intercalate ", " (Lists.map typeExpressionToString args)),
-          ">"])
-      Syntax.TypeExpressionOptional v0 -> Strings.cat2 "?" (typeExpressionToString v0)
-
--- | Convert a unary expression to an AST expression
-unaryExpressionToExpr :: Syntax.UnaryExpression -> Ast.Expr
-unaryExpressionToExpr un =
-
-      let op = Syntax.unaryExpressionOperator un
-          arg = Syntax.unaryExpressionArgument un
-          prefix = Syntax.unaryExpressionPrefix un
-          opStr = unaryOperatorToString op
-          argExpr = expressionToExpr arg
-      in (Logic.ifElse prefix (Serialization.prefix opStr argExpr) (Serialization.suffix opStr argExpr))
-
--- | Convert a unary operator to a string
-unaryOperatorToString :: Syntax.UnaryOperator -> String
-unaryOperatorToString op =
-    case op of
-      Syntax.UnaryOperatorNegate -> "-"
-      Syntax.UnaryOperatorPlus -> "+"
-      Syntax.UnaryOperatorNot -> "!"
-      Syntax.UnaryOperatorBitwiseNot -> "~"
-      Syntax.UnaryOperatorTypeof -> "typeof "
-      Syntax.UnaryOperatorVoid -> "void "
-      Syntax.UnaryOperatorDelete -> "delete "
-      Syntax.UnaryOperatorIncrement -> "++"
-      Syntax.UnaryOperatorDecrement -> "--"
-
--- | Convert a variable declaration to an AST expression
-variableDeclarationToExpr :: Syntax.VariableDeclaration -> Ast.Expr
-variableDeclarationToExpr decl =
-
-      let kind = Syntax.variableDeclarationKind decl
-          declarations = Syntax.variableDeclarationDeclarations decl
-      in (Serialization.suffix ";" (Serialization.spaceSep [
-        variableKindToExpr kind,
-        (Serialization.commaSep Serialization.inlineStyle (Lists.map variableDeclaratorToExpr declarations))]))
-
--- | Convert a variable declarator to an AST expression
-variableDeclaratorToExpr :: Syntax.VariableDeclarator -> Ast.Expr
-variableDeclaratorToExpr decl =
-
-      let id = Syntax.variableDeclaratorId decl
-          init = Syntax.variableDeclaratorInit decl
-      in (Maybes.maybe (patternToExpr id) (\e -> Serialization.ifx Operators.defineOp (patternToExpr id) (expressionToExpr e)) init)
-
--- | Convert a variable kind to an AST expression
-variableKindToExpr :: Syntax.VariableKind -> Ast.Expr
-variableKindToExpr kind =
-    case kind of
-      Syntax.VariableKindVar -> Serialization.cst "var"
-      Syntax.VariableKindLet -> Serialization.cst "let"
-      Syntax.VariableKindConst -> Serialization.cst "const"
-
--- | Convert a while statement to an AST expression
-whileStatementToExpr :: Syntax.WhileStatement -> Ast.Expr
-whileStatementToExpr w =
-
-      let test = Syntax.whileStatementTest w
-          body = Syntax.whileStatementBody w
-      in (Serialization.spaceSep [
-        Serialization.cst "while",
-        (Serialization.parenthesize (expressionToExpr test)),
-        (statementToExpr body)])
diff --git a/src/main/haskell/Hydra/JavaScript/Syntax.hs b/src/main/haskell/Hydra/JavaScript/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/JavaScript/Syntax.hs
+++ /dev/null
@@ -1,1611 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A JavaScript/ECMAScript syntax model for code generation
-
-module Hydra.JavaScript.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
-
--- | A JavaScript identifier (variable, function, class name, etc.)
-newtype Identifier =
-  Identifier {
-    unIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Identifier = Core.Name "hydra.javaScript.syntax.Identifier"
-
--- | A qualified name like 'module.submodule.name'
-type QualifiedName = [Identifier]
-
-_QualifiedName = Core.Name "hydra.javaScript.syntax.QualifiedName"
-
--- | A literal value
-data Literal =
-  -- | A string literal
-  LiteralString StringLiteral |
-  -- | A numeric literal
-  LiteralNumber NumericLiteral |
-  -- | A boolean literal (true or false)
-  LiteralBoolean Bool |
-  -- | The null literal
-  LiteralNull  |
-  -- | The undefined literal
-  LiteralUndefined  |
-  -- | A BigInt literal (e.g., 123n)
-  LiteralBigInt Integer |
-  -- | A template literal
-  LiteralTemplate TemplateLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.javaScript.syntax.Literal"
-
-_Literal_string = Core.Name "string"
-
-_Literal_number = Core.Name "number"
-
-_Literal_boolean = Core.Name "boolean"
-
-_Literal_null = Core.Name "null"
-
-_Literal_undefined = Core.Name "undefined"
-
-_Literal_bigInt = Core.Name "bigInt"
-
-_Literal_template = Core.Name "template"
-
--- | A string literal with quote style
-data StringLiteral =
-  StringLiteral {
-    -- | The string value
-    stringLiteralValue :: String,
-    -- | Whether to use single quotes (true) or double quotes (false)
-    stringLiteralSingleQuote :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteral = Core.Name "hydra.javaScript.syntax.StringLiteral"
-
-_StringLiteral_value = Core.Name "value"
-
-_StringLiteral_singleQuote = Core.Name "singleQuote"
-
--- | A template literal (backtick string with interpolations)
-data TemplateLiteral =
-  TemplateLiteral {
-    -- | The static string parts
-    templateLiteralQuasis :: [TemplateElement],
-    -- | The interpolated expressions
-    templateLiteralExpressions :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_TemplateLiteral = Core.Name "hydra.javaScript.syntax.TemplateLiteral"
-
-_TemplateLiteral_quasis = Core.Name "quasis"
-
-_TemplateLiteral_expressions = Core.Name "expressions"
-
--- | A static part of a template literal
-data TemplateElement =
-  TemplateElement {
-    -- | The raw string value
-    templateElementValue :: String,
-    -- | Whether this is the last element
-    templateElementTail :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_TemplateElement = Core.Name "hydra.javaScript.syntax.TemplateElement"
-
-_TemplateElement_value = Core.Name "value"
-
-_TemplateElement_tail = Core.Name "tail"
-
--- | A numeric literal (integer or floating-point)
-data NumericLiteral =
-  -- | An integer literal
-  NumericLiteralInteger I.Int64 |
-  -- | A floating-point literal
-  NumericLiteralFloat Double
-  deriving (Eq, Ord, Read, Show)
-
-_NumericLiteral = Core.Name "hydra.javaScript.syntax.NumericLiteral"
-
-_NumericLiteral_integer = Core.Name "integer"
-
-_NumericLiteral_float = Core.Name "float"
-
--- | A type annotation (for JSDoc comments or TypeScript)
-newtype TypeAnnotation =
-  TypeAnnotation {
-    unTypeAnnotation :: TypeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeAnnotation = Core.Name "hydra.javaScript.syntax.TypeAnnotation"
-
--- | A type expression
-data TypeExpression =
-  -- | A named type (e.g., 'string', 'number', 'MyClass')
-  TypeExpressionIdentifier Identifier |
-  -- | A literal type (e.g., 'hello', 42)
-  TypeExpressionLiteral Literal |
-  -- | An array type
-  TypeExpressionArray ArrayTypeExpression |
-  -- | A function type
-  TypeExpressionFunction FunctionTypeExpression |
-  -- | An object type
-  TypeExpressionObject ObjectTypeExpression |
-  -- | A union type (A | B)
-  TypeExpressionUnion UnionTypeExpression |
-  -- | A parameterized type (e.g., Array<T>, Map<K, V>)
-  TypeExpressionParameterized ParameterizedTypeExpression |
-  -- | An optional type (?T)
-  TypeExpressionOptional TypeExpression |
-  -- | The 'any' type
-  TypeExpressionAny  |
-  -- | The 'void' type
-  TypeExpressionVoid  |
-  -- | The 'never' type
-  TypeExpressionNever
-  deriving (Eq, Ord, Read, Show)
-
-_TypeExpression = Core.Name "hydra.javaScript.syntax.TypeExpression"
-
-_TypeExpression_identifier = Core.Name "identifier"
-
-_TypeExpression_literal = Core.Name "literal"
-
-_TypeExpression_array = Core.Name "array"
-
-_TypeExpression_function = Core.Name "function"
-
-_TypeExpression_object = Core.Name "object"
-
-_TypeExpression_union = Core.Name "union"
-
-_TypeExpression_parameterized = Core.Name "parameterized"
-
-_TypeExpression_optional = Core.Name "optional"
-
-_TypeExpression_any = Core.Name "any"
-
-_TypeExpression_void = Core.Name "void"
-
-_TypeExpression_never = Core.Name "never"
-
--- | A function type expression
-data FunctionTypeExpression =
-  FunctionTypeExpression {
-    -- | Type parameters (generics)
-    functionTypeExpressionTypeParameters :: [TypeParameter],
-    -- | Parameter types
-    functionTypeExpressionParameters :: [TypeExpression],
-    -- | Return type
-    functionTypeExpressionReturnType :: TypeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionTypeExpression = Core.Name "hydra.javaScript.syntax.FunctionTypeExpression"
-
-_FunctionTypeExpression_typeParameters = Core.Name "typeParameters"
-
-_FunctionTypeExpression_parameters = Core.Name "parameters"
-
-_FunctionTypeExpression_returnType = Core.Name "returnType"
-
--- | An array type (T[])
-newtype ArrayTypeExpression =
-  ArrayTypeExpression {
-    unArrayTypeExpression :: TypeExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayTypeExpression = Core.Name "hydra.javaScript.syntax.ArrayTypeExpression"
-
--- | A union type (A | B | C)
-type UnionTypeExpression = [TypeExpression]
-
-_UnionTypeExpression = Core.Name "hydra.javaScript.syntax.UnionTypeExpression"
-
--- | A parameterized type (e.g., Array<T>, Map<K, V>)
-data ParameterizedTypeExpression =
-  ParameterizedTypeExpression {
-    parameterizedTypeExpressionBase :: TypeExpression,
-    parameterizedTypeExpressionArguments :: [TypeExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ParameterizedTypeExpression = Core.Name "hydra.javaScript.syntax.ParameterizedTypeExpression"
-
-_ParameterizedTypeExpression_base = Core.Name "base"
-
-_ParameterizedTypeExpression_arguments = Core.Name "arguments"
-
--- | An object type with property signatures
-type ObjectTypeExpression = [PropertySignature]
-
-_ObjectTypeExpression = Core.Name "hydra.javaScript.syntax.ObjectTypeExpression"
-
--- | A property signature in an object type
-data PropertySignature =
-  PropertySignature {
-    -- | Property name
-    propertySignatureName :: Identifier,
-    -- | Property type
-    propertySignatureType :: TypeExpression,
-    -- | Whether the property is optional
-    propertySignatureOptional :: Bool,
-    -- | Whether the property is readonly
-    propertySignatureReadonly :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_PropertySignature = Core.Name "hydra.javaScript.syntax.PropertySignature"
-
-_PropertySignature_name = Core.Name "name"
-
-_PropertySignature_type = Core.Name "type"
-
-_PropertySignature_optional = Core.Name "optional"
-
-_PropertySignature_readonly = Core.Name "readonly"
-
--- | A type parameter (generic)
-data TypeParameter =
-  TypeParameter {
-    -- | Parameter name
-    typeParameterName :: Identifier,
-    -- | Optional constraint (extends clause)
-    typeParameterConstraint :: (Maybe TypeExpression),
-    -- | Optional default type
-    typeParameterDefault :: (Maybe TypeExpression)}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParameter = Core.Name "hydra.javaScript.syntax.TypeParameter"
-
-_TypeParameter_name = Core.Name "name"
-
-_TypeParameter_constraint = Core.Name "constraint"
-
-_TypeParameter_default = Core.Name "default"
-
--- | A JavaScript expression
-data Expression =
-  -- | A simple identifier
-  ExpressionIdentifier Identifier |
-  -- | A literal value
-  ExpressionLiteral Literal |
-  -- | An array expression [a, b, c]
-  ExpressionArray ArrayExpression |
-  -- | An object expression {a: 1, b: 2}
-  ExpressionObject ObjectExpression |
-  -- | A function expression
-  ExpressionFunction FunctionExpression |
-  -- | An arrow function expression
-  ExpressionArrow ArrowFunctionExpression |
-  -- | A function call expression
-  ExpressionCall CallExpression |
-  -- | A member access expression (obj.prop or obj[prop])
-  ExpressionMember MemberExpression |
-  -- | A conditional (ternary) expression
-  ExpressionConditional ConditionalExpression |
-  -- | A binary operation expression
-  ExpressionBinary BinaryExpression |
-  -- | A unary operation expression
-  ExpressionUnary UnaryExpression |
-  -- | An assignment expression
-  ExpressionAssignment AssignmentExpression |
-  -- | A sequence expression (a, b, c)
-  ExpressionSequence [Expression] |
-  -- | The 'this' keyword
-  ExpressionThis  |
-  -- | A 'new' expression
-  ExpressionNew CallExpression |
-  -- | A yield expression
-  ExpressionYield (Maybe Expression) |
-  -- | An await expression
-  ExpressionAwait Expression |
-  -- | A spread expression (...x)
-  ExpressionSpread SpreadElement |
-  -- | A parenthesized expression
-  ExpressionParenthesized Expression
-  deriving (Eq, Ord, Read, Show)
-
-_Expression = Core.Name "hydra.javaScript.syntax.Expression"
-
-_Expression_identifier = Core.Name "identifier"
-
-_Expression_literal = Core.Name "literal"
-
-_Expression_array = Core.Name "array"
-
-_Expression_object = Core.Name "object"
-
-_Expression_function = Core.Name "function"
-
-_Expression_arrow = Core.Name "arrow"
-
-_Expression_call = Core.Name "call"
-
-_Expression_member = Core.Name "member"
-
-_Expression_conditional = Core.Name "conditional"
-
-_Expression_binary = Core.Name "binary"
-
-_Expression_unary = Core.Name "unary"
-
-_Expression_assignment = Core.Name "assignment"
-
-_Expression_sequence = Core.Name "sequence"
-
-_Expression_this = Core.Name "this"
-
-_Expression_new = Core.Name "new"
-
-_Expression_yield = Core.Name "yield"
-
-_Expression_await = Core.Name "await"
-
-_Expression_spread = Core.Name "spread"
-
-_Expression_parenthesized = Core.Name "parenthesized"
-
--- | An array expression [a, b, c]
-type ArrayExpression = [ArrayElement]
-
-_ArrayExpression = Core.Name "hydra.javaScript.syntax.ArrayExpression"
-
--- | An object expression {a: 1, b: 2}
-type ObjectExpression = [Property]
-
-_ObjectExpression = Core.Name "hydra.javaScript.syntax.ObjectExpression"
-
--- | A function expression
-data FunctionExpression =
-  FunctionExpression {
-    -- | Optional function name
-    functionExpressionId :: (Maybe Identifier),
-    -- | Function parameters
-    functionExpressionParams :: [Pattern],
-    -- | Function body
-    functionExpressionBody :: BlockStatement,
-    -- | Whether the function is async
-    functionExpressionAsync :: Bool,
-    -- | Whether the function is a generator
-    functionExpressionGenerator :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionExpression = Core.Name "hydra.javaScript.syntax.FunctionExpression"
-
-_FunctionExpression_id = Core.Name "id"
-
-_FunctionExpression_params = Core.Name "params"
-
-_FunctionExpression_body = Core.Name "body"
-
-_FunctionExpression_async = Core.Name "async"
-
-_FunctionExpression_generator = Core.Name "generator"
-
--- | An arrow function expression
-data ArrowFunctionExpression =
-  ArrowFunctionExpression {
-    -- | Function parameters
-    arrowFunctionExpressionParams :: [Pattern],
-    -- | Function body (expression or block)
-    arrowFunctionExpressionBody :: ArrowFunctionBody,
-    -- | Whether the function is async
-    arrowFunctionExpressionAsync :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrowFunctionExpression = Core.Name "hydra.javaScript.syntax.ArrowFunctionExpression"
-
-_ArrowFunctionExpression_params = Core.Name "params"
-
-_ArrowFunctionExpression_body = Core.Name "body"
-
-_ArrowFunctionExpression_async = Core.Name "async"
-
--- | The body of an arrow function (expression or block)
-data ArrowFunctionBody =
-  ArrowFunctionBodyExpression Expression |
-  ArrowFunctionBodyBlock BlockStatement
-  deriving (Eq, Ord, Read, Show)
-
-_ArrowFunctionBody = Core.Name "hydra.javaScript.syntax.ArrowFunctionBody"
-
-_ArrowFunctionBody_expression = Core.Name "expression"
-
-_ArrowFunctionBody_block = Core.Name "block"
-
--- | A function call expression
-data CallExpression =
-  CallExpression {
-    -- | The function being called
-    callExpressionCallee :: Expression,
-    -- | The arguments
-    callExpressionArguments :: [Expression],
-    -- | Whether using optional chaining (?.)
-    callExpressionOptional :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_CallExpression = Core.Name "hydra.javaScript.syntax.CallExpression"
-
-_CallExpression_callee = Core.Name "callee"
-
-_CallExpression_arguments = Core.Name "arguments"
-
-_CallExpression_optional = Core.Name "optional"
-
--- | A member access expression
-data MemberExpression =
-  MemberExpression {
-    -- | The object
-    memberExpressionObject :: Expression,
-    -- | The property
-    memberExpressionProperty :: Expression,
-    -- | Whether using bracket notation (obj[prop])
-    memberExpressionComputed :: Bool,
-    -- | Whether using optional chaining (?.)
-    memberExpressionOptional :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_MemberExpression = Core.Name "hydra.javaScript.syntax.MemberExpression"
-
-_MemberExpression_object = Core.Name "object"
-
-_MemberExpression_property = Core.Name "property"
-
-_MemberExpression_computed = Core.Name "computed"
-
-_MemberExpression_optional = Core.Name "optional"
-
--- | A conditional (ternary) expression: test ? consequent : alternate
-data ConditionalExpression =
-  ConditionalExpression {
-    conditionalExpressionTest :: Expression,
-    conditionalExpressionConsequent :: Expression,
-    conditionalExpressionAlternate :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ConditionalExpression = Core.Name "hydra.javaScript.syntax.ConditionalExpression"
-
-_ConditionalExpression_test = Core.Name "test"
-
-_ConditionalExpression_consequent = Core.Name "consequent"
-
-_ConditionalExpression_alternate = Core.Name "alternate"
-
--- | A binary operation expression
-data BinaryExpression =
-  BinaryExpression {
-    binaryExpressionOperator :: BinaryOperator,
-    binaryExpressionLeft :: Expression,
-    binaryExpressionRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryExpression = Core.Name "hydra.javaScript.syntax.BinaryExpression"
-
-_BinaryExpression_operator = Core.Name "operator"
-
-_BinaryExpression_left = Core.Name "left"
-
-_BinaryExpression_right = Core.Name "right"
-
--- | A unary operation expression
-data UnaryExpression =
-  UnaryExpression {
-    unaryExpressionOperator :: UnaryOperator,
-    unaryExpressionArgument :: Expression,
-    -- | Whether the operator is prefix (true) or postfix (false)
-    unaryExpressionPrefix :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryExpression = Core.Name "hydra.javaScript.syntax.UnaryExpression"
-
-_UnaryExpression_operator = Core.Name "operator"
-
-_UnaryExpression_argument = Core.Name "argument"
-
-_UnaryExpression_prefix = Core.Name "prefix"
-
--- | An assignment expression
-data AssignmentExpression =
-  AssignmentExpression {
-    assignmentExpressionOperator :: AssignmentOperator,
-    assignmentExpressionLeft :: Pattern,
-    assignmentExpressionRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentExpression = Core.Name "hydra.javaScript.syntax.AssignmentExpression"
-
-_AssignmentExpression_operator = Core.Name "operator"
-
-_AssignmentExpression_left = Core.Name "left"
-
-_AssignmentExpression_right = Core.Name "right"
-
--- | A spread element (...x)
-newtype SpreadElement =
-  SpreadElement {
-    unSpreadElement :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_SpreadElement = Core.Name "hydra.javaScript.syntax.SpreadElement"
-
--- | A property in an object expression
-data Property =
-  Property {
-    -- | Property key (identifier, literal, or computed)
-    propertyKey :: Expression,
-    -- | Property value
-    propertyValue :: Expression,
-    -- | Property kind (init, get, set)
-    propertyKind :: PropertyKind,
-    -- | Whether the key is computed [expr]
-    propertyComputed :: Bool,
-    -- | Whether using shorthand syntax {x} for {x: x}
-    propertyShorthand :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Property = Core.Name "hydra.javaScript.syntax.Property"
-
-_Property_key = Core.Name "key"
-
-_Property_value = Core.Name "value"
-
-_Property_kind = Core.Name "kind"
-
-_Property_computed = Core.Name "computed"
-
-_Property_shorthand = Core.Name "shorthand"
-
--- | The kind of an object property
-data PropertyKind =
-  -- | A normal property initialization
-  PropertyKindInit  |
-  -- | A getter
-  PropertyKindGet  |
-  -- | A setter
-  PropertyKindSet
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyKind = Core.Name "hydra.javaScript.syntax.PropertyKind"
-
-_PropertyKind_init = Core.Name "init"
-
-_PropertyKind_get = Core.Name "get"
-
-_PropertyKind_set = Core.Name "set"
-
--- | An element in an array expression
-data ArrayElement =
-  -- | A regular expression element
-  ArrayElementExpression Expression |
-  -- | A spread element ...x
-  ArrayElementSpread SpreadElement |
-  -- | An empty slot (elision)
-  ArrayElementHole
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayElement = Core.Name "hydra.javaScript.syntax.ArrayElement"
-
-_ArrayElement_expression = Core.Name "expression"
-
-_ArrayElement_spread = Core.Name "spread"
-
-_ArrayElement_hole = Core.Name "hole"
-
--- | A binding pattern (for destructuring)
-data Pattern =
-  -- | A simple identifier binding
-  PatternIdentifier Identifier |
-  -- | An object destructuring pattern
-  PatternObject ObjectPattern |
-  -- | An array destructuring pattern
-  PatternArray ArrayPattern |
-  -- | A pattern with default value
-  PatternAssignment AssignmentPattern |
-  -- | A rest element (...x)
-  PatternRest RestElement
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern = Core.Name "hydra.javaScript.syntax.Pattern"
-
-_Pattern_identifier = Core.Name "identifier"
-
-_Pattern_object = Core.Name "object"
-
-_Pattern_array = Core.Name "array"
-
-_Pattern_assignment = Core.Name "assignment"
-
-_Pattern_rest = Core.Name "rest"
-
--- | An object destructuring pattern {a, b: c}
-data ObjectPattern =
-  ObjectPattern {
-    -- | The property patterns
-    objectPatternProperties :: [ObjectPatternProperty]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPattern = Core.Name "hydra.javaScript.syntax.ObjectPattern"
-
-_ObjectPattern_properties = Core.Name "properties"
-
--- | A property in an object pattern
-data ObjectPatternProperty =
-  ObjectPatternPropertyProperty Property |
-  ObjectPatternPropertyRest RestElement
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPatternProperty = Core.Name "hydra.javaScript.syntax.ObjectPatternProperty"
-
-_ObjectPatternProperty_property = Core.Name "property"
-
-_ObjectPatternProperty_rest = Core.Name "rest"
-
--- | An array destructuring pattern [a, b, c]
-type ArrayPattern = [Maybe Pattern]
-
-_ArrayPattern = Core.Name "hydra.javaScript.syntax.ArrayPattern"
-
--- | A pattern with default value (param = default)
-data AssignmentPattern =
-  AssignmentPattern {
-    assignmentPatternLeft :: Pattern,
-    assignmentPatternRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentPattern = Core.Name "hydra.javaScript.syntax.AssignmentPattern"
-
-_AssignmentPattern_left = Core.Name "left"
-
-_AssignmentPattern_right = Core.Name "right"
-
--- | A rest element pattern (...x)
-newtype RestElement =
-  RestElement {
-    unRestElement :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-
-_RestElement = Core.Name "hydra.javaScript.syntax.RestElement"
-
--- | A JavaScript statement
-data Statement =
-  -- | An expression statement
-  StatementExpression Expression |
-  -- | A block statement
-  StatementBlock BlockStatement |
-  -- | An empty statement (;)
-  StatementEmpty  |
-  -- | A debugger statement
-  StatementDebugger  |
-  -- | A return statement
-  StatementReturn ReturnStatement |
-  -- | A break statement
-  StatementBreak BreakStatement |
-  -- | A continue statement
-  StatementContinue ContinueStatement |
-  -- | An if statement
-  StatementIf IfStatement |
-  -- | A switch statement
-  StatementSwitch SwitchStatement |
-  -- | A throw statement
-  StatementThrow ThrowStatement |
-  -- | A try statement
-  StatementTry TryStatement |
-  -- | A while statement
-  StatementWhile WhileStatement |
-  -- | A do-while statement
-  StatementDoWhile DoWhileStatement |
-  -- | A for statement
-  StatementFor ForStatement |
-  -- | A for-in statement
-  StatementForIn ForInStatement |
-  -- | A for-of statement
-  StatementForOf ForOfStatement |
-  -- | A variable declaration
-  StatementVariableDeclaration VariableDeclaration |
-  -- | A function declaration
-  StatementFunctionDeclaration FunctionDeclaration |
-  -- | A class declaration
-  StatementClassDeclaration ClassDeclaration |
-  -- | A labeled statement
-  StatementLabeled LabeledStatement
-  deriving (Eq, Ord, Read, Show)
-
-_Statement = Core.Name "hydra.javaScript.syntax.Statement"
-
-_Statement_expression = Core.Name "expression"
-
-_Statement_block = Core.Name "block"
-
-_Statement_empty = Core.Name "empty"
-
-_Statement_debugger = Core.Name "debugger"
-
-_Statement_return = Core.Name "return"
-
-_Statement_break = Core.Name "break"
-
-_Statement_continue = Core.Name "continue"
-
-_Statement_if = Core.Name "if"
-
-_Statement_switch = Core.Name "switch"
-
-_Statement_throw = Core.Name "throw"
-
-_Statement_try = Core.Name "try"
-
-_Statement_while = Core.Name "while"
-
-_Statement_doWhile = Core.Name "doWhile"
-
-_Statement_for = Core.Name "for"
-
-_Statement_forIn = Core.Name "forIn"
-
-_Statement_forOf = Core.Name "forOf"
-
-_Statement_variableDeclaration = Core.Name "variableDeclaration"
-
-_Statement_functionDeclaration = Core.Name "functionDeclaration"
-
-_Statement_classDeclaration = Core.Name "classDeclaration"
-
-_Statement_labeled = Core.Name "labeled"
-
--- | A labeled statement
-data LabeledStatement =
-  LabeledStatement {
-    labeledStatementLabel :: Identifier,
-    labeledStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_LabeledStatement = Core.Name "hydra.javaScript.syntax.LabeledStatement"
-
-_LabeledStatement_label = Core.Name "label"
-
-_LabeledStatement_body = Core.Name "body"
-
--- | A block statement { ... }
-type BlockStatement = [Statement]
-
-_BlockStatement = Core.Name "hydra.javaScript.syntax.BlockStatement"
-
--- | A variable declaration (var, let, const)
-data VariableDeclaration =
-  VariableDeclaration {
-    variableDeclarationKind :: VariableKind,
-    variableDeclarationDeclarations :: [VariableDeclarator]}
-  deriving (Eq, Ord, Read, Show)
-
-_VariableDeclaration = Core.Name "hydra.javaScript.syntax.VariableDeclaration"
-
-_VariableDeclaration_kind = Core.Name "kind"
-
-_VariableDeclaration_declarations = Core.Name "declarations"
-
--- | A variable declarator (id = init)
-data VariableDeclarator =
-  VariableDeclarator {
-    variableDeclaratorId :: Pattern,
-    variableDeclaratorInit :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_VariableDeclarator = Core.Name "hydra.javaScript.syntax.VariableDeclarator"
-
-_VariableDeclarator_id = Core.Name "id"
-
-_VariableDeclarator_init = Core.Name "init"
-
--- | The kind of variable declaration
-data VariableKind =
-  VariableKindVar  |
-  VariableKindLet  |
-  VariableKindConst
-  deriving (Eq, Ord, Read, Show)
-
-_VariableKind = Core.Name "hydra.javaScript.syntax.VariableKind"
-
-_VariableKind_var = Core.Name "var"
-
-_VariableKind_let = Core.Name "let"
-
-_VariableKind_const = Core.Name "const"
-
--- | An if statement
-data IfStatement =
-  IfStatement {
-    ifStatementTest :: Expression,
-    ifStatementConsequent :: Statement,
-    ifStatementAlternate :: (Maybe Statement)}
-  deriving (Eq, Ord, Read, Show)
-
-_IfStatement = Core.Name "hydra.javaScript.syntax.IfStatement"
-
-_IfStatement_test = Core.Name "test"
-
-_IfStatement_consequent = Core.Name "consequent"
-
-_IfStatement_alternate = Core.Name "alternate"
-
--- | A switch statement
-data SwitchStatement =
-  SwitchStatement {
-    switchStatementDiscriminant :: Expression,
-    switchStatementCases :: [SwitchCase]}
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchStatement = Core.Name "hydra.javaScript.syntax.SwitchStatement"
-
-_SwitchStatement_discriminant = Core.Name "discriminant"
-
-_SwitchStatement_cases = Core.Name "cases"
-
--- | A case clause in a switch statement
-data SwitchCase =
-  SwitchCase {
-    -- | The test expression (Nothing for default)
-    switchCaseTest :: (Maybe Expression),
-    -- | The statements to execute
-    switchCaseConsequent :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_SwitchCase = Core.Name "hydra.javaScript.syntax.SwitchCase"
-
-_SwitchCase_test = Core.Name "test"
-
-_SwitchCase_consequent = Core.Name "consequent"
-
--- | A for statement
-data ForStatement =
-  ForStatement {
-    -- | Initialization
-    forStatementInit :: (Maybe ForInit),
-    -- | Test condition
-    forStatementTest :: (Maybe Expression),
-    -- | Update expression
-    forStatementUpdate :: (Maybe Expression),
-    forStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_ForStatement = Core.Name "hydra.javaScript.syntax.ForStatement"
-
-_ForStatement_init = Core.Name "init"
-
-_ForStatement_test = Core.Name "test"
-
-_ForStatement_update = Core.Name "update"
-
-_ForStatement_body = Core.Name "body"
-
--- | Initialization clause of a for statement
-data ForInit =
-  ForInitVariable VariableDeclaration |
-  ForInitExpression Expression
-  deriving (Eq, Ord, Read, Show)
-
-_ForInit = Core.Name "hydra.javaScript.syntax.ForInit"
-
-_ForInit_variable = Core.Name "variable"
-
-_ForInit_expression = Core.Name "expression"
-
--- | A for-in statement
-data ForInStatement =
-  ForInStatement {
-    forInStatementLeft :: ForInLeft,
-    forInStatementRight :: Expression,
-    forInStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_ForInStatement = Core.Name "hydra.javaScript.syntax.ForInStatement"
-
-_ForInStatement_left = Core.Name "left"
-
-_ForInStatement_right = Core.Name "right"
-
-_ForInStatement_body = Core.Name "body"
-
--- | Left-hand side of a for-in or for-of statement
-data ForInLeft =
-  ForInLeftVariable VariableDeclaration |
-  ForInLeftPattern Pattern
-  deriving (Eq, Ord, Read, Show)
-
-_ForInLeft = Core.Name "hydra.javaScript.syntax.ForInLeft"
-
-_ForInLeft_variable = Core.Name "variable"
-
-_ForInLeft_pattern = Core.Name "pattern"
-
--- | A for-of statement
-data ForOfStatement =
-  ForOfStatement {
-    -- | Whether this is a for-await-of
-    forOfStatementAwait :: Bool,
-    forOfStatementLeft :: ForInLeft,
-    forOfStatementRight :: Expression,
-    forOfStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_ForOfStatement = Core.Name "hydra.javaScript.syntax.ForOfStatement"
-
-_ForOfStatement_await = Core.Name "await"
-
-_ForOfStatement_left = Core.Name "left"
-
-_ForOfStatement_right = Core.Name "right"
-
-_ForOfStatement_body = Core.Name "body"
-
--- | A while statement
-data WhileStatement =
-  WhileStatement {
-    whileStatementTest :: Expression,
-    whileStatementBody :: Statement}
-  deriving (Eq, Ord, Read, Show)
-
-_WhileStatement = Core.Name "hydra.javaScript.syntax.WhileStatement"
-
-_WhileStatement_test = Core.Name "test"
-
-_WhileStatement_body = Core.Name "body"
-
--- | A do-while statement
-data DoWhileStatement =
-  DoWhileStatement {
-    doWhileStatementBody :: Statement,
-    doWhileStatementTest :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_DoWhileStatement = Core.Name "hydra.javaScript.syntax.DoWhileStatement"
-
-_DoWhileStatement_body = Core.Name "body"
-
-_DoWhileStatement_test = Core.Name "test"
-
--- | A try statement
-data TryStatement =
-  TryStatement {
-    tryStatementBlock :: BlockStatement,
-    tryStatementHandler :: (Maybe CatchClause),
-    tryStatementFinalizer :: (Maybe BlockStatement)}
-  deriving (Eq, Ord, Read, Show)
-
-_TryStatement = Core.Name "hydra.javaScript.syntax.TryStatement"
-
-_TryStatement_block = Core.Name "block"
-
-_TryStatement_handler = Core.Name "handler"
-
-_TryStatement_finalizer = Core.Name "finalizer"
-
--- | A catch clause
-data CatchClause =
-  CatchClause {
-    -- | The catch parameter (can be omitted in ES2019+)
-    catchClauseParam :: (Maybe Pattern),
-    catchClauseBody :: BlockStatement}
-  deriving (Eq, Ord, Read, Show)
-
-_CatchClause = Core.Name "hydra.javaScript.syntax.CatchClause"
-
-_CatchClause_param = Core.Name "param"
-
-_CatchClause_body = Core.Name "body"
-
--- | A throw statement
-newtype ThrowStatement =
-  ThrowStatement {
-    unThrowStatement :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ThrowStatement = Core.Name "hydra.javaScript.syntax.ThrowStatement"
-
--- | A return statement
-type ReturnStatement = (Maybe Expression)
-
-_ReturnStatement = Core.Name "hydra.javaScript.syntax.ReturnStatement"
-
--- | A break statement
-type BreakStatement = (Maybe Identifier)
-
-_BreakStatement = Core.Name "hydra.javaScript.syntax.BreakStatement"
-
--- | A continue statement
-type ContinueStatement = (Maybe Identifier)
-
-_ContinueStatement = Core.Name "hydra.javaScript.syntax.ContinueStatement"
-
--- | A function declaration
-data FunctionDeclaration =
-  FunctionDeclaration {
-    -- | Function name
-    functionDeclarationId :: Identifier,
-    -- | Function parameters
-    functionDeclarationParams :: [Pattern],
-    -- | Function body
-    functionDeclarationBody :: BlockStatement,
-    -- | Whether the function is async
-    functionDeclarationAsync :: Bool,
-    -- | Whether the function is a generator
-    functionDeclarationGenerator :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionDeclaration = Core.Name "hydra.javaScript.syntax.FunctionDeclaration"
-
-_FunctionDeclaration_id = Core.Name "id"
-
-_FunctionDeclaration_params = Core.Name "params"
-
-_FunctionDeclaration_body = Core.Name "body"
-
-_FunctionDeclaration_async = Core.Name "async"
-
-_FunctionDeclaration_generator = Core.Name "generator"
-
--- | A class declaration
-data ClassDeclaration =
-  ClassDeclaration {
-    -- | Class name
-    classDeclarationId :: Identifier,
-    -- | Optional superclass
-    classDeclarationSuperClass :: (Maybe Expression),
-    -- | Class body
-    classDeclarationBody :: ClassBody}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassDeclaration = Core.Name "hydra.javaScript.syntax.ClassDeclaration"
-
-_ClassDeclaration_id = Core.Name "id"
-
-_ClassDeclaration_superClass = Core.Name "superClass"
-
-_ClassDeclaration_body = Core.Name "body"
-
--- | A class body
-type ClassBody = [MethodDefinition]
-
-_ClassBody = Core.Name "hydra.javaScript.syntax.ClassBody"
-
--- | A method definition in a class
-data MethodDefinition =
-  MethodDefinition {
-    -- | Method name
-    methodDefinitionKey :: Expression,
-    -- | Method function
-    methodDefinitionValue :: FunctionExpression,
-    -- | Method kind
-    methodDefinitionKind :: MethodKind,
-    -- | Whether the key is computed
-    methodDefinitionComputed :: Bool,
-    -- | Whether the method is static
-    methodDefinitionStatic :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodDefinition = Core.Name "hydra.javaScript.syntax.MethodDefinition"
-
-_MethodDefinition_key = Core.Name "key"
-
-_MethodDefinition_value = Core.Name "value"
-
-_MethodDefinition_kind = Core.Name "kind"
-
-_MethodDefinition_computed = Core.Name "computed"
-
-_MethodDefinition_static = Core.Name "static"
-
--- | The kind of a class method
-data MethodKind =
-  MethodKindConstructor  |
-  MethodKindMethod  |
-  MethodKindGet  |
-  MethodKindSet
-  deriving (Eq, Ord, Read, Show)
-
-_MethodKind = Core.Name "hydra.javaScript.syntax.MethodKind"
-
-_MethodKind_constructor = Core.Name "constructor"
-
-_MethodKind_method = Core.Name "method"
-
-_MethodKind_get = Core.Name "get"
-
-_MethodKind_set = Core.Name "set"
-
--- | A JavaScript program (module)
-data Program =
-  Program {
-    -- | The module items
-    programBody :: [ModuleItem],
-    -- | Whether this is a module or script
-    programSourceType :: SourceType}
-  deriving (Eq, Ord, Read, Show)
-
-_Program = Core.Name "hydra.javaScript.syntax.Program"
-
-_Program_body = Core.Name "body"
-
-_Program_sourceType = Core.Name "sourceType"
-
--- | Whether the program is a module or script
-data SourceType =
-  SourceTypeModule  |
-  SourceTypeScript
-  deriving (Eq, Ord, Read, Show)
-
-_SourceType = Core.Name "hydra.javaScript.syntax.SourceType"
-
-_SourceType_module = Core.Name "module"
-
-_SourceType_script = Core.Name "script"
-
--- | A top-level item in a module
-data ModuleItem =
-  ModuleItemStatement Statement |
-  ModuleItemImport ImportDeclaration |
-  ModuleItemExport ExportDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_ModuleItem = Core.Name "hydra.javaScript.syntax.ModuleItem"
-
-_ModuleItem_statement = Core.Name "statement"
-
-_ModuleItem_import = Core.Name "import"
-
-_ModuleItem_export = Core.Name "export"
-
--- | An import declaration
-data ImportDeclaration =
-  ImportDeclaration {
-    -- | What to import
-    importDeclarationSpecifiers :: [ImportClause],
-    -- | The module to import from
-    importDeclarationSource :: StringLiteral}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportDeclaration = Core.Name "hydra.javaScript.syntax.ImportDeclaration"
-
-_ImportDeclaration_specifiers = Core.Name "specifiers"
-
-_ImportDeclaration_source = Core.Name "source"
-
--- | An import clause (named, default, or namespace import)
-data ImportClause =
-  ImportClauseNamed ImportSpecifier |
-  ImportClauseDefault ImportDefaultSpecifier |
-  ImportClauseNamespace ImportNamespaceSpecifier
-  deriving (Eq, Ord, Read, Show)
-
-_ImportClause = Core.Name "hydra.javaScript.syntax.ImportClause"
-
-_ImportClause_named = Core.Name "named"
-
-_ImportClause_default = Core.Name "default"
-
-_ImportClause_namespace = Core.Name "namespace"
-
--- | A named import specifier (import {x as y} from ...)
-data ImportSpecifier =
-  ImportSpecifier {
-    importSpecifierImported :: Identifier,
-    importSpecifierLocal :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportSpecifier = Core.Name "hydra.javaScript.syntax.ImportSpecifier"
-
-_ImportSpecifier_imported = Core.Name "imported"
-
-_ImportSpecifier_local = Core.Name "local"
-
--- | A default import specifier (import x from ...)
-newtype ImportDefaultSpecifier =
-  ImportDefaultSpecifier {
-    unImportDefaultSpecifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportDefaultSpecifier = Core.Name "hydra.javaScript.syntax.ImportDefaultSpecifier"
-
--- | A namespace import specifier (import * as x from ...)
-newtype ImportNamespaceSpecifier =
-  ImportNamespaceSpecifier {
-    unImportNamespaceSpecifier :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportNamespaceSpecifier = Core.Name "hydra.javaScript.syntax.ImportNamespaceSpecifier"
-
--- | An export declaration
-data ExportDeclaration =
-  -- | Named exports (export {x, y as z})
-  ExportDeclarationNamed NamedExport |
-  -- | Default export (export default ...)
-  ExportDeclarationDefault Expression |
-  -- | Export a declaration (export const x = ...)
-  ExportDeclarationDeclaration Statement |
-  -- | Export all (export * from ...)
-  ExportDeclarationAll ExportAllDeclaration
-  deriving (Eq, Ord, Read, Show)
-
-_ExportDeclaration = Core.Name "hydra.javaScript.syntax.ExportDeclaration"
-
-_ExportDeclaration_named = Core.Name "named"
-
-_ExportDeclaration_default = Core.Name "default"
-
-_ExportDeclaration_declaration = Core.Name "declaration"
-
-_ExportDeclaration_all = Core.Name "all"
-
--- | Named exports (export {x, y as z})
-data NamedExport =
-  NamedExport {
-    namedExportSpecifiers :: [ExportSpecifier],
-    namedExportSource :: (Maybe StringLiteral)}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedExport = Core.Name "hydra.javaScript.syntax.NamedExport"
-
-_NamedExport_specifiers = Core.Name "specifiers"
-
-_NamedExport_source = Core.Name "source"
-
--- | Export all declaration (export * from ...)
-data ExportAllDeclaration =
-  ExportAllDeclaration {
-    exportAllDeclarationExported :: (Maybe Identifier),
-    exportAllDeclarationSource :: StringLiteral}
-  deriving (Eq, Ord, Read, Show)
-
-_ExportAllDeclaration = Core.Name "hydra.javaScript.syntax.ExportAllDeclaration"
-
-_ExportAllDeclaration_exported = Core.Name "exported"
-
-_ExportAllDeclaration_source = Core.Name "source"
-
--- | An export specifier (x as y)
-data ExportSpecifier =
-  ExportSpecifier {
-    exportSpecifierLocal :: Identifier,
-    exportSpecifierExported :: Identifier}
-  deriving (Eq, Ord, Read, Show)
-
-_ExportSpecifier = Core.Name "hydra.javaScript.syntax.ExportSpecifier"
-
-_ExportSpecifier_local = Core.Name "local"
-
-_ExportSpecifier_exported = Core.Name "exported"
-
--- | A binary operator
-data BinaryOperator =
-  -- | +
-  BinaryOperatorAdd  |
-  -- | -
-  BinaryOperatorSubtract  |
-  -- | *
-  BinaryOperatorMultiply  |
-  -- | /
-  BinaryOperatorDivide  |
-  -- | %
-  BinaryOperatorModulo  |
-  -- | **
-  BinaryOperatorExponentiate  |
-  -- | ==
-  BinaryOperatorEqual  |
-  -- | !=
-  BinaryOperatorNotEqual  |
-  -- | ===
-  BinaryOperatorStrictEqual  |
-  -- | !==
-  BinaryOperatorStrictNotEqual  |
-  -- | <
-  BinaryOperatorLessThan  |
-  -- | <=
-  BinaryOperatorLessThanOrEqual  |
-  -- | >
-  BinaryOperatorGreaterThan  |
-  -- | >=
-  BinaryOperatorGreaterThanOrEqual  |
-  -- | &&
-  BinaryOperatorAnd  |
-  -- | ||
-  BinaryOperatorOr  |
-  -- | ??
-  BinaryOperatorNullishCoalescing  |
-  -- | &
-  BinaryOperatorBitwiseAnd  |
-  -- | |
-  BinaryOperatorBitwiseOr  |
-  -- | ^
-  BinaryOperatorBitwiseXor  |
-  -- | <<
-  BinaryOperatorLeftShift  |
-  -- | >>
-  BinaryOperatorRightShift  |
-  -- | >>>
-  BinaryOperatorUnsignedRightShift  |
-  -- | in
-  BinaryOperatorIn  |
-  -- | instanceof
-  BinaryOperatorInstanceof
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryOperator = Core.Name "hydra.javaScript.syntax.BinaryOperator"
-
-_BinaryOperator_add = Core.Name "add"
-
-_BinaryOperator_subtract = Core.Name "subtract"
-
-_BinaryOperator_multiply = Core.Name "multiply"
-
-_BinaryOperator_divide = Core.Name "divide"
-
-_BinaryOperator_modulo = Core.Name "modulo"
-
-_BinaryOperator_exponentiate = Core.Name "exponentiate"
-
-_BinaryOperator_equal = Core.Name "equal"
-
-_BinaryOperator_notEqual = Core.Name "notEqual"
-
-_BinaryOperator_strictEqual = Core.Name "strictEqual"
-
-_BinaryOperator_strictNotEqual = Core.Name "strictNotEqual"
-
-_BinaryOperator_lessThan = Core.Name "lessThan"
-
-_BinaryOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"
-
-_BinaryOperator_greaterThan = Core.Name "greaterThan"
-
-_BinaryOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
-
-_BinaryOperator_and = Core.Name "and"
-
-_BinaryOperator_or = Core.Name "or"
-
-_BinaryOperator_nullishCoalescing = Core.Name "nullishCoalescing"
-
-_BinaryOperator_bitwiseAnd = Core.Name "bitwiseAnd"
-
-_BinaryOperator_bitwiseOr = Core.Name "bitwiseOr"
-
-_BinaryOperator_bitwiseXor = Core.Name "bitwiseXor"
-
-_BinaryOperator_leftShift = Core.Name "leftShift"
-
-_BinaryOperator_rightShift = Core.Name "rightShift"
-
-_BinaryOperator_unsignedRightShift = Core.Name "unsignedRightShift"
-
-_BinaryOperator_in = Core.Name "in"
-
-_BinaryOperator_instanceof = Core.Name "instanceof"
-
--- | A unary operator
-data UnaryOperator =
-  -- | -
-  UnaryOperatorNegate  |
-  -- | +
-  UnaryOperatorPlus  |
-  -- | !
-  UnaryOperatorNot  |
-  -- | ~
-  UnaryOperatorBitwiseNot  |
-  -- | typeof
-  UnaryOperatorTypeof  |
-  -- | void
-  UnaryOperatorVoid  |
-  -- | delete
-  UnaryOperatorDelete  |
-  -- | ++
-  UnaryOperatorIncrement  |
-  -- | --
-  UnaryOperatorDecrement
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOperator = Core.Name "hydra.javaScript.syntax.UnaryOperator"
-
-_UnaryOperator_negate = Core.Name "negate"
-
-_UnaryOperator_plus = Core.Name "plus"
-
-_UnaryOperator_not = Core.Name "not"
-
-_UnaryOperator_bitwiseNot = Core.Name "bitwiseNot"
-
-_UnaryOperator_typeof = Core.Name "typeof"
-
-_UnaryOperator_void = Core.Name "void"
-
-_UnaryOperator_delete = Core.Name "delete"
-
-_UnaryOperator_increment = Core.Name "increment"
-
-_UnaryOperator_decrement = Core.Name "decrement"
-
--- | An assignment operator
-data AssignmentOperator =
-  -- | =
-  AssignmentOperatorAssign  |
-  -- | +=
-  AssignmentOperatorAddAssign  |
-  -- | -=
-  AssignmentOperatorSubtractAssign  |
-  -- | *=
-  AssignmentOperatorMultiplyAssign  |
-  -- | /=
-  AssignmentOperatorDivideAssign  |
-  -- | %=
-  AssignmentOperatorModuloAssign  |
-  -- | **=
-  AssignmentOperatorExponentiateAssign  |
-  -- | <<=
-  AssignmentOperatorLeftShiftAssign  |
-  -- | >>=
-  AssignmentOperatorRightShiftAssign  |
-  -- | >>>=
-  AssignmentOperatorUnsignedRightShiftAssign  |
-  -- | &=
-  AssignmentOperatorBitwiseAndAssign  |
-  -- | |=
-  AssignmentOperatorBitwiseOrAssign  |
-  -- | ^=
-  AssignmentOperatorBitwiseXorAssign  |
-  -- | &&=
-  AssignmentOperatorAndAssign  |
-  -- | ||=
-  AssignmentOperatorOrAssign  |
-  -- | ??=
-  AssignmentOperatorNullishAssign
-  deriving (Eq, Ord, Read, Show)
-
-_AssignmentOperator = Core.Name "hydra.javaScript.syntax.AssignmentOperator"
-
-_AssignmentOperator_assign = Core.Name "assign"
-
-_AssignmentOperator_addAssign = Core.Name "addAssign"
-
-_AssignmentOperator_subtractAssign = Core.Name "subtractAssign"
-
-_AssignmentOperator_multiplyAssign = Core.Name "multiplyAssign"
-
-_AssignmentOperator_divideAssign = Core.Name "divideAssign"
-
-_AssignmentOperator_moduloAssign = Core.Name "moduloAssign"
-
-_AssignmentOperator_exponentiateAssign = Core.Name "exponentiateAssign"
-
-_AssignmentOperator_leftShiftAssign = Core.Name "leftShiftAssign"
-
-_AssignmentOperator_rightShiftAssign = Core.Name "rightShiftAssign"
-
-_AssignmentOperator_unsignedRightShiftAssign = Core.Name "unsignedRightShiftAssign"
-
-_AssignmentOperator_bitwiseAndAssign = Core.Name "bitwiseAndAssign"
-
-_AssignmentOperator_bitwiseOrAssign = Core.Name "bitwiseOrAssign"
-
-_AssignmentOperator_bitwiseXorAssign = Core.Name "bitwiseXorAssign"
-
-_AssignmentOperator_andAssign = Core.Name "andAssign"
-
-_AssignmentOperator_orAssign = Core.Name "orAssign"
-
-_AssignmentOperator_nullishAssign = Core.Name "nullishAssign"
-
--- | A JavaScript comment
-data Comment =
-  -- | A single-line comment (// ...)
-  CommentLine String |
-  -- | A block comment (/* ... */)
-  CommentBlock String |
-  -- | A documentation comment (/** ... */, i.e. JSDoc)
-  CommentDocumentation DocumentationComment
-  deriving (Eq, Ord, Read, Show)
-
-_Comment = Core.Name "hydra.javaScript.syntax.Comment"
-
-_Comment_line = Core.Name "line"
-
-_Comment_block = Core.Name "block"
-
-_Comment_documentation = Core.Name "documentation"
-
--- | A documentation comment (JSDoc) with structured tags
-data DocumentationComment =
-  DocumentationComment {
-    -- | The main description
-    documentationCommentDescription :: String,
-    -- | Documentation tags (@param, @returns, etc.)
-    documentationCommentTags :: [DocumentationTag]}
-  deriving (Eq, Ord, Read, Show)
-
-_DocumentationComment = Core.Name "hydra.javaScript.syntax.DocumentationComment"
-
-_DocumentationComment_description = Core.Name "description"
-
-_DocumentationComment_tags = Core.Name "tags"
-
--- | A documentation tag (@param, @returns, @type, etc.)
-data DocumentationTag =
-  DocumentationTag {
-    -- | Tag name (param, returns, type, etc.)
-    documentationTagName :: String,
-    -- | Optional type expression
-    documentationTagType :: (Maybe TypeExpression),
-    -- | Optional parameter name (for @param)
-    documentationTagParamName :: (Maybe Identifier),
-    -- | Tag description
-    documentationTagDescription :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_DocumentationTag = Core.Name "hydra.javaScript.syntax.DocumentationTag"
-
-_DocumentationTag_name = Core.Name "name"
-
-_DocumentationTag_type = Core.Name "type"
-
-_DocumentationTag_paramName = Core.Name "paramName"
-
-_DocumentationTag_description = Core.Name "description"
-
--- | A module item with optional documentation
-data ModuleItemWithComments =
-  ModuleItemWithComments {
-    -- | The module item
-    moduleItemWithCommentsBody :: ModuleItem,
-    -- | Optional documentation comment
-    moduleItemWithCommentsComments :: (Maybe DocumentationComment)}
-  deriving (Eq, Ord, Read, Show)
-
-_ModuleItemWithComments = Core.Name "hydra.javaScript.syntax.ModuleItemWithComments"
-
-_ModuleItemWithComments_body = Core.Name "body"
-
-_ModuleItemWithComments_comments = Core.Name "comments"
-
--- | A statement with optional documentation
-data StatementWithComments =
-  StatementWithComments {
-    -- | The statement
-    statementWithCommentsBody :: Statement,
-    -- | Optional documentation comment
-    statementWithCommentsComments :: (Maybe DocumentationComment)}
-  deriving (Eq, Ord, Read, Show)
-
-_StatementWithComments = Core.Name "hydra.javaScript.syntax.StatementWithComments"
-
-_StatementWithComments_body = Core.Name "body"
-
-_StatementWithComments_comments = Core.Name "comments"
-
--- | A function declaration with optional JSDoc
-data FunctionDeclarationWithComments =
-  FunctionDeclarationWithComments {
-    -- | The function declaration
-    functionDeclarationWithCommentsBody :: FunctionDeclaration,
-    -- | Optional JSDoc comment
-    functionDeclarationWithCommentsComments :: (Maybe DocumentationComment)}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionDeclarationWithComments = Core.Name "hydra.javaScript.syntax.FunctionDeclarationWithComments"
-
-_FunctionDeclarationWithComments_body = Core.Name "body"
-
-_FunctionDeclarationWithComments_comments = Core.Name "comments"
-
--- | A class declaration with optional JSDoc
-data ClassDeclarationWithComments =
-  ClassDeclarationWithComments {
-    -- | The class declaration
-    classDeclarationWithCommentsBody :: ClassDeclaration,
-    -- | Optional JSDoc comment
-    classDeclarationWithCommentsComments :: (Maybe DocumentationComment)}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassDeclarationWithComments = Core.Name "hydra.javaScript.syntax.ClassDeclarationWithComments"
-
-_ClassDeclarationWithComments_body = Core.Name "body"
-
-_ClassDeclarationWithComments_comments = Core.Name "comments"
diff --git a/src/main/haskell/Hydra/Json/Bootstrap.hs b/src/main/haskell/Hydra/Json/Bootstrap.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Bootstrap.hs
+++ /dev/null
@@ -1,1904 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A module which provides a minimal typing environment for decoding other modules from JSON. This avoids certain problems with generating entire source modules into target languages like Java, which is subject to method size limits for large modules like hydra.core.
-
-module Hydra.Json.Bootstrap 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
-typesByName :: M.Map Core.Name Core.Type
-typesByName =
-    M.fromList [
-      (Core.Name "hydra.coders.Adapter", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "t1"),
-          Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-            Core.forallTypeParameter = (Core.Name "t2"),
-            Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "v1"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "v2"),
-                Core.forallTypeBody = (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "isLossy"),
-                    Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                      Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                      Core.annotatedTypeAnnotation = (M.fromList [
-                        (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Whether information may be lost in the course of this adaptation")))])}))},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "source"),
-                    Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                      Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "t1")),
-                      Core.annotatedTypeAnnotation = (M.fromList [
-                        (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The source type")))])}))},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "target"),
-                    Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                      Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "t2")),
-                      Core.annotatedTypeAnnotation = (M.fromList [
-                        (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The target type")))])}))},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "coder"),
-                    Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                      Core.annotatedTypeBody = (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Coder")),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v1"))})),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v2"))})),
-                      Core.annotatedTypeAnnotation = (M.fromList [
-                        (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The coder for transforming instances of the source type to instances of the target type")))])}))}])}))}))}))})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A two-level bidirectional encoder which adapts types to types and terms to terms")))])}))),
-      (Core.Name "hydra.coders.AdapterContext", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "graph"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The underlying graph of elements and primitives")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "language"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.coders.Language")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The language being encoded or decoded")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "adapters"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Adapter")),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.core.Type"))})),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.core.Type"))})),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A map of type names to adapters for those types")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An evaluation context together with a source language and a target language")))])}))),
-      (Core.Name "hydra.coders.Bicoder", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "t1"),
-          Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-            Core.forallTypeParameter = (Core.Name "t2"),
-            Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "v1"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "v2"),
-                Core.forallTypeBody = (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "encode"),
-                    Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                      Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                        Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                            Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                              Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Adapter")),
-                                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                              Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t2"))})),
-                            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v1"))})),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v2"))}))})),
-                      Core.annotatedTypeAnnotation = (M.fromList [
-                        (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function from source types to adapters")))])}))},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "decode"),
-                    Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                      Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                        Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                            Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                              Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Adapter")),
-                                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t2"))})),
-                              Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v2"))})),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v1"))}))})),
-                      Core.annotatedTypeAnnotation = (M.fromList [
-                        (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function from target types to adapters")))])}))}])}))}))}))})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A two-level encoder and decoder, operating both at a type level and an instance (data) level")))])}))),
-      (Core.Name "hydra.coders.Coder", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "v1"),
-          Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-            Core.forallTypeParameter = (Core.Name "v2"),
-            Core.forallTypeBody = (Core.TypeRecord [
-              Core.FieldType {
-                Core.fieldTypeName = (Core.Name "encode"),
-                Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v1")),
-                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.Error")),
-                        Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v2"))}))}))})),
-                  Core.annotatedTypeAnnotation = (M.fromList [
-                    (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function which encodes source values as target values in a given context")))])}))},
-              Core.FieldType {
-                Core.fieldTypeName = (Core.Name "decode"),
-                Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v2")),
-                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.Error")),
-                        Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v1"))}))}))})),
-                  Core.annotatedTypeAnnotation = (M.fromList [
-                    (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function which decodes target values as source values in a given context")))])}))}])}))})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An encoder and decoder; a bidirectional transformation between two types")))])}))),
-      (Core.Name "hydra.coders.CoderDirection", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "encode"),
-            Core.fieldTypeType = Core.TypeUnit},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "decode"),
-            Core.fieldTypeType = Core.TypeUnit}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Indicates either the 'out' or the 'in' direction of a coder")))])}))),
-      (Core.Name "hydra.coders.Language", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.coders.LanguageName")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The unique name of the language")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "constraints"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.coders.LanguageConstraints")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The constraints which characterize the language")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A named language together with language-specific constraints")))])}))),
-      (Core.Name "hydra.coders.LanguageConstraints", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "eliminationVariants"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.variants.EliminationVariant"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported elimination variants")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "literalVariants"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.variants.LiteralVariant"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported literal variants")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "floatTypes"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.core.FloatType"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported float types")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "functionVariants"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.variants.FunctionVariant"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported function variants")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "integerTypes"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.core.IntegerType"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported integer types")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "termVariants"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.variants.TermVariant"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported term variants")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeVariants"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.variants.TypeVariant"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All supported type variants")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "types"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A logical set of types, as a predicate which tests a type for inclusion")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A set of constraints on valid type and term expressions, characterizing a language")))])}))),
-      (Core.Name "hydra.coders.LanguageName", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The unique name of a language")))])}))),
-      (Core.Name "hydra.coders.SymmetricAdapter", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "t"),
-          Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-            Core.forallTypeParameter = (Core.Name "v"),
-            Core.forallTypeBody = (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Adapter")),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-              Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A bidirectional encoder which maps between the same type and term languages on either side")))])}))),
-      (Core.Name "hydra.coders.TraversalOrder", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "pre"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Pre-order traversal")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "post"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Post-order traversal")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Specifies either a pre-order or post-order traversal")))])}))),
-      (Core.Name "hydra.coders.TypeAdapter", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.coders.AdapterContext")),
-          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-            Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-              Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.SymmetricAdapter")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.core.Type"))})),
-                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))}))}))})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function which maps a Hydra type to a symmetric adapter between types and terms")))])}))),
-      (Core.Name "hydra.context.Context", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "trace"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A stack of context labels describing the current execution path")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "messages"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A log of warnings and/or info messages")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "other"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A map of string keys to arbitrary terms as values, for application-specific use")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An execution context for tracing and diagnostics, threaded through function calls")))])}))),
-      (Core.Name "hydra.context.InContext", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "e"),
-          Core.forallTypeBody = (Core.TypeRecord [
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "object"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "e")),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A domain object; typically an error")))])}))},
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "context"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The execution context at the point of capture")))])}))}])})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A particular domain object (such as an error) together with an execution context")))])}))),
-      (Core.Name "hydra.core.AnnotatedTerm", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The term being annotated")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "annotation"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The annotation as a map from keys to values")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term together with an annotation")))])}))),
-      (Core.Name "hydra.core.AnnotatedType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type being annotated")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "annotation"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The annotation as a map from keys to values")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type together with an annotation")))])}))),
-      (Core.Name "hydra.core.Application", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "function"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The left-hand side of the application")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "argument"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The right-hand side of the application")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term which applies a function to an argument")))])}))),
-      (Core.Name "hydra.core.ApplicationType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "function"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The left-hand side of the application")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "argument"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The right-hand side of the application")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type-level analog of an application term")))])}))),
-      (Core.Name "hydra.core.Binding", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the bound variable")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "term"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The term to which the variable is bound")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeScheme"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "hydra.core.TypeScheme"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The optional type scheme of the bound term")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A field with an optional type scheme, used to bind variables to terms in a 'let' expression")))])}))),
-      (Core.Name "hydra.core.CaseStatement", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the union type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "default"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "hydra.core.Term"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An optional default case, used if none of the explicit cases match")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "cases"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.Field"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A list of case alternatives, one per union field")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A union elimination; a case statement")))])}))),
-      (Core.Name "hydra.core.EitherType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "left"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The 'left' alternative")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "right"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The 'right' alternative")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type which provides a choice between a 'left' type and a 'right' type")))])}))),
-      (Core.Name "hydra.core.Field", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the field")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "term"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The term value of the field")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A name/term pair")))])}))),
-      (Core.Name "hydra.core.FieldType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the field")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "type"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of the field")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A name/type pair")))])}))),
-      (Core.Name "hydra.core.FloatType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "bigfloat"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An arbitrary-precision floating-point type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "float32"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 32-bit floating-point type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "float64"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 64-bit floating-point type")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A floating-point type")))])}))),
-      (Core.Name "hydra.core.FloatValue", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "bigfloat"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeBigfloat)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An arbitrary-precision floating-point value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "float32"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 32-bit floating-point value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "float64"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 64-bit floating-point value")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A floating-point literal value")))])}))),
-      (Core.Name "hydra.core.ForallType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "parameter"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The variable which is bound by the lambda")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The body of the lambda")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A universally quantified type; the System F equivalent of a type scheme, and the type-level equivalent of a lambda term.")))])}))),
-      (Core.Name "hydra.core.FunctionType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "domain"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The domain (input) type of the function")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "codomain"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The codomain (output) type of the function")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function type, also known as an arrow type")))])}))),
-      (Core.Name "hydra.core.Injection", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the union type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "field"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Field")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The field being injected, including its name and value")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An instance of a union type; i.e. a string-indexed generalization of inl() or inr()")))])}))),
-      (Core.Name "hydra.core.IntegerType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "bigint"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An arbitrary-precision integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int8"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An 8-bit signed integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int16"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 16-bit signed integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int32"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 32-bit signed integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int64"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 64-bit signed integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint8"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An 8-bit unsigned integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint16"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 16-bit unsigned integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint32"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 32-bit unsigned integer type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint64"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 64-bit unsigned integer type")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An integer type")))])}))),
-      (Core.Name "hydra.core.IntegerValue", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "bigint"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeBigint)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An arbitrary-precision integer value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int8"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An 8-bit signed integer value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int16"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 16-bit signed integer value (short value)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int32"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 32-bit signed integer value (int value)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "int64"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 64-bit signed integer value (long value)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint8"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint8)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An 8-bit unsigned integer value (byte)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint16"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint16)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 16-bit unsigned integer value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint32"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint32)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 32-bit unsigned integer value (unsigned int)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "uint64"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint64)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 64-bit unsigned integer value (unsigned long)")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An integer literal value")))])}))),
-      (Core.Name "hydra.core.Lambda", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "parameter"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The parameter of the lambda")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "domain"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "hydra.core.Type"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An optional domain type for the lambda")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The body of the lambda")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function abstraction (lambda)")))])}))),
-      (Core.Name "hydra.core.Let", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "bindings"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.Binding"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The list of variable bindings")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The body term in which the variables are bound")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A set of (possibly recursive) 'let' bindings together with a body in which they are bound")))])}))),
-      (Core.Name "hydra.core.Literal", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "binary"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeBinary),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A binary literal")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "boolean"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A boolean literal")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "decimal"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeDecimal),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An arbitrary-precision decimal literal")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "float"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.FloatValue")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A floating-point literal")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "integer"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.IntegerValue")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An integer literal")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "string"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A string literal")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term constant; an instance of a literal type")))])}))),
-      (Core.Name "hydra.core.LiteralType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "binary"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of a binary (byte string) value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "boolean"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of a boolean (true/false) value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "decimal"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of an arbitrary-precision decimal value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "float"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.FloatType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of a floating-point value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "integer"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.IntegerType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of an integer value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "string"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of a string value")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Any of a fixed set of literal types, also called atomic types, base types, primitive types, or type constants")))])}))),
-      (Core.Name "hydra.core.MapType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "keys"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of keys in the map")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "values"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type of values in the map")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A map type")))])}))),
-      (Core.Name "hydra.core.Name", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A unique identifier in some context; a string-valued key")))])}))),
-      (Core.Name "hydra.core.PairType", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "first"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The first component of the pair")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "second"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The second component of the pair")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type which pairs a 'first' type and a 'second' type")))])}))),
-      (Core.Name "hydra.core.Projection", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the record type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "field"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the projected field")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A record elimination; a projection")))])}))),
-      (Core.Name "hydra.core.Record", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the record type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "fields"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.Field"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The fields of the record, as a list of name/term pairs")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A record, or labeled tuple; a map of field names to terms")))])}))),
-      (Core.Name "hydra.core.Term", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "annotated"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.AnnotatedTerm")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term annotated with metadata")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "application"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Application")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function application")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "cases"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.CaseStatement")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A union elimination; a case statement")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "either"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An either value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "inject"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Injection")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An injection; an instance of a union type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "lambda"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Lambda")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function abstraction (lambda)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "let"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Let")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A 'let' term, which binds variables to terms")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "list"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.Term"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A list")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "literal"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Literal")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A literal value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "map"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A map of keys to values")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "maybe"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "hydra.core.Term"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An optional value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "pair"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.pairTypeSecond = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A pair (2-tuple)")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "project"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Projection")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A record elimination; a projection")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "record"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Record")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A record term")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "set"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.core.Term"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A set of values")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeApplication"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.TypeApplicationTerm")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A System F type application term")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeLambda"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.TypeLambda")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A System F type abstraction term")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unit"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A unit value; a term with no value")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unwrap"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An unwrap elimination; the inverse of a wrap")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "variable"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A variable reference")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "wrap"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.WrappedTerm")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A wrapped term; an instance of a wrapper type (newtype)")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A data term")))])}))),
-      (Core.Name "hydra.core.Type", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "annotated"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.AnnotatedType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An annotated type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "application"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.ApplicationType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type application")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "either"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.EitherType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An either (sum) type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "forall"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.ForallType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A universally quantified (polymorphic) type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "function"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.FunctionType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A function type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "list"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A list type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "literal"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.LiteralType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A literal type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "map"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.MapType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A map type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "maybe"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An optional type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "pair"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.PairType")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A pair (2-tuple) type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "record"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.FieldType"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A record type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "set"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A set type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "union"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.FieldType"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A union type with field names")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unit"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The unit type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "variable"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type variable")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "void"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The void (uninhabited, or bottom) type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "wrap"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A wrapped type (newtype)")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A data type")))])}))),
-      (Core.Name "hydra.core.TypeApplicationTerm", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The term being applied to a type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "type"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type argument")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term applied to a type; a type application")))])}))),
-      (Core.Name "hydra.core.TypeLambda", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "parameter"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type variable introduced by the abstraction")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The body of the abstraction")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A System F type abstraction term")))])}))),
-      (Core.Name "hydra.core.TypeScheme", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "variables"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.Name"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The free type variables")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type expression")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "constraints"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.TypeVariableMetadata"))}))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Optional metadata for type variables, including typeclass constraints. The map keys are type variable names.")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type expression together with free type variables occurring in the expression")))])}))),
-      (Core.Name "hydra.core.TypeVariableMetadata", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "classes"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.core.Name"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The set of typeclass constraints on this type variable")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Metadata associated with a type variable, including typeclass constraints")))])}))),
-      (Core.Name "hydra.core.WrappedTerm", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the wrapper type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "body"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The wrapped term")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term wrapped in a type name")))])}))),
-      (Core.Name "hydra.errors.DecodingError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred during decoding of a term")))])}))),
-      (Core.Name "hydra.errors.EmptyListError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = Core.TypeUnit,
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An empty list was encountered where a non-empty list was required")))])}))),
-      (Core.Name "hydra.errors.Error", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "checking"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.checking.CheckingError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type checking error")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "decoding"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred during decoding of a term")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "duplicateBinding"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateBindingError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A duplicate binding name error")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "duplicateField"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateFieldError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A duplicate field name error")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "extraction"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.ExtractionError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred while extracting a value from a term")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "inference"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.InferenceError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type inference error")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "other"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.OtherError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Any other error")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "resolution"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.ResolutionError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A name-resolution error")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "undefinedField"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedFieldError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A reference to an undefined field")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "undefinedTermVariable"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTermVariableError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A reference to an undefined term variable")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "untypedTermVariable"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.UntypedTermVariableError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term variable whose type is not known")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unexpectedTermVariant"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.UnexpectedTermVariantError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An unexpected term variant")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unexpectedTypeVariant"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.core.UnexpectedTypeVariantError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An unexpected type variant")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unification"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.UnificationError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type unification error")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error of any kind, with kernel errors particularly differentiated")))])}))),
-      (Core.Name "hydra.errors.ExtractionError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "emptyList"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.EmptyListError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An empty list was encountered where a non-empty list was required")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "multipleBindings"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.MultipleBindingsError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Multiple let bindings were found with the same name")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "multipleFields"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.MultipleFieldsError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Multiple record fields were found with the same field name")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "noMatchingField"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.NoMatchingFieldError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No field with the expected name was found in a record")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "noSuchBinding"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchBindingError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No let binding with the expected name was found")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "notEnoughCases"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.NotEnoughCasesError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A case statement did not contain enough cases to match the target")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unexpectedShape"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.UnexpectedShapeError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term, type, literal, or other value had an unexpected shape")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred while extracting a typed value from a term")))])}))),
-      (Core.Name "hydra.errors.InferenceError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "checking"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.error.checking.CheckingError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type checking error encountered during inference")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "other"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.OtherInferenceError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A generic inference error carrying a message and a subterm path. Placeholder arm; sites should migrate to typed variants.")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unification"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.UnificationInferenceError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A unification failure encountered while inferring types")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred during type inference")))])}))),
-      (Core.Name "hydra.errors.MultipleBindingsError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The binding name which was duplicated")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Multiple let bindings with the same name were found")))])}))),
-      (Core.Name "hydra.errors.MultipleFieldsError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "fieldName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The field name which appeared more than once")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Multiple fields with the same name were found in a record")))])}))),
-      (Core.Name "hydra.errors.NoMatchingFieldError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "fieldName"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The field name which was not found")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No field with the expected name was present")))])}))),
-      (Core.Name "hydra.errors.NoSuchBindingError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The binding name which was not found")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No let binding with the expected name was present")))])}))),
-      (Core.Name "hydra.errors.NoSuchPrimitiveError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The primitive name which was not found")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No primitive function with the expected name was registered in the graph")))])}))),
-      (Core.Name "hydra.errors.NotEnoughCasesError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = Core.TypeUnit,
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A case statement was missing a case for the requested variant")))])}))),
-      (Core.Name "hydra.errors.OtherError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Any other error")))])}))),
-      (Core.Name "hydra.errors.OtherInferenceError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "path"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.paths.SubtermPath")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The subterm path at which the error was observed")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "message"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A human-readable error message")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A generic inference error: message + subterm path")))])}))),
-      (Core.Name "hydra.errors.OtherResolutionError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A generic resolution error: message")))])}))),
-      (Core.Name "hydra.errors.ResolutionError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "noSuchBinding"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchBindingError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No binding with the expected name was found in the graph")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "noSuchPrimitive"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchPrimitiveError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No primitive function with the expected name was found in the graph")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "noMatchingField"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.NoMatchingFieldError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "No field with the expected name was present in a record or case statement")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "other"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.OtherResolutionError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A generic resolution error carrying a message")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "unexpectedShape"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.UnexpectedShapeError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term had a shape other than the one expected (e.g. a record, an injection)")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred while resolving a name, primitive, or record/union shape in a graph")))])}))),
-      (Core.Name "hydra.errors.UnexpectedShapeError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "expected"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A description of the expected shape")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "actual"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A description of the shape actually encountered")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term, type, literal, or related value had a shape other than the one expected")))])}))),
-      (Core.Name "hydra.errors.UnificationError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "leftType"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The left-hand type in the unification")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "rightType"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The right-hand type in the unification")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "message"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A human-readable error message")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An error that occurred during type unification")))])}))),
-      (Core.Name "hydra.errors.UnificationInferenceError", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "path"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.paths.SubtermPath")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The subterm path at which the unification failure was observed")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "cause"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.errors.UnificationError")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The underlying unification error")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A unification failure at a specific subterm locus during inference")))])}))),
-      (Core.Name "hydra.graph.Graph", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "boundTerms"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The terms bound by all term variables in scope")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "boundTypes"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type schemes of all term variables in scope")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "classConstraints"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.TypeVariableMetadata"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A mutable map from type variable names to their accumulated class constraints. This is populated during type inference when operations requiring Eq or Ord are encountered.")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "lambdaVariables"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.core.Name"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The set of term variables introduced by specifically by lambdas")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "metadata"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Any additional metadata bound to term variables in scope")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "primitives"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.graph.Primitive"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All primitive functions and constants by name")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "schemaTypes"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme"))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "All schema types (type schemes) in scope")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeVariables"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "hydra.core.Name"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The set of type variables introduced specifically by type lambdas")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A graph, or lexical environment which binds names to terms, types, primitives, and metadata")))])}))),
-      (Core.Name "hydra.graph.Primitive", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The unique name of the primitive function")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeScheme"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type scheme of the primitive function")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "implementation"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.core.Term"))),
-                    Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.Error")),
-                      Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))}))}))})),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A concrete implementation of the primitive function. The Context and Graph parameters are needed by higher-order primitives (e.g. lists.map, lists.foldl, eithers.bind) which must evaluate function arguments via term reduction; the Graph provides variable and primitive bindings, while the Context supports tracing and error reporting.")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A built-in function or constant")))])}))),
-      (Core.Name "hydra.graph.TermCoder", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "a"),
-          Core.forallTypeBody = (Core.TypeRecord [
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "type"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The Hydra type of encoded terms")))])}))},
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "encode"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.Error")),
-                        Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))}))}))}))})),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An encode function from terms to native values")))])}))},
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "decode"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.Error")),
-                      Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))}))})),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A decode function from native values to terms")))])}))}])})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type together with a coder for mapping terms into arguments for primitive functions, and mapping computed results into terms.")))])}))),
-      (Core.Name "hydra.packaging.Definition", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "term"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.packaging.TermDefinition")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term definition")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "type"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.packaging.TypeDefinition")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type definition")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A definition, which may be either a term or type definition")))])}))),
-      (Core.Name "hydra.packaging.FileExtension", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A file extension (without the dot), e.g. \"json\" or \"py\"")))])}))),
-      (Core.Name "hydra.packaging.Library", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "namespace"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.packaging.Namespace")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A common prefix for all primitive function names in the library")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "prefix"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A preferred namespace prefix for function names in the library")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "primitives"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.graph.Primitive"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The primitives defined in this library")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A library of primitive functions")))])}))),
-      (Core.Name "hydra.packaging.Module", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "description"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An optional human-readable description of the module")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "namespace"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.packaging.Namespace")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A common prefix for all element names in the module")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "termDependencies"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.packaging.Namespace"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Any modules which the term expressions of this module directly depend upon")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeDependencies"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.packaging.Namespace"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Any modules which the type expressions of this module directly depend upon")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "definitions"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.packaging.Definition"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The definitions in this module")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A logical collection of elements in the same namespace, having dependencies on zero or more other modules")))])}))),
-      (Core.Name "hydra.packaging.Namespace", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A prefix for element names")))])}))),
-      (Core.Name "hydra.packaging.Namespaces", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "n"),
-          Core.forallTypeBody = (Core.TypeRecord [
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "focus"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "hydra.packaging.Namespace")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "n"))})),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The namespace in focus, together with its associated value")))])}))},
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "mapping"),
-              Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-                Core.annotatedTypeBody = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.packaging.Namespace")),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "n"))})),
-                Core.annotatedTypeAnnotation = (M.fromList [
-                  (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A mapping of namespaces to values")))])}))}])})),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A mapping from namespaces to values of type n, with a focus on one namespace")))])}))),
-      (Core.Name "hydra.packaging.Package", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.packaging.PackageName")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the package")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "modules"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.packaging.Module"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The modules in this package")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "dependencies"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.packaging.PackageName"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The packages which this package depends on")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "description"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An optional human-readable description of the package")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A package, which is a named collection of modules with metadata and dependencies")))])}))),
-      (Core.Name "hydra.packaging.PackageName", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The unique name of a package, e.g. \"hydra-kernel\" or \"hydra-python\"")))])}))),
-      (Core.Name "hydra.packaging.QualifiedName", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "namespace"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "hydra.packaging.Namespace"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The optional namespace")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "local"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The local name")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A qualified name consisting of an optional namespace together with a mandatory local name")))])}))),
-      (Core.Name "hydra.packaging.TermDefinition", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the term")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "term"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The term being defined")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeScheme"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "hydra.core.TypeScheme"))),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type scheme of the term, including any class constraints")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A term-level definition, including a name, a term, and the type scheme of the term")))])}))),
-      (Core.Name "hydra.packaging.TypeDefinition", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeRecord [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "name"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The name of the type")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "typeScheme"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme")),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "The type scheme being defined")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A type-level definition, including a name and the type scheme")))])}))),
-      (Core.Name "hydra.util.CaseConvention", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "camel"),
-            Core.fieldTypeType = Core.TypeUnit},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "pascal"),
-            Core.fieldTypeType = Core.TypeUnit},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "lowerSnake"),
-            Core.fieldTypeType = Core.TypeUnit},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "upperSnake"),
-            Core.fieldTypeType = Core.TypeUnit}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "A naming convention for symbols, such as camelCase or snake_case")))])}))),
-      (Core.Name "hydra.util.Comparison", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "lessThan"),
-            Core.fieldTypeType = Core.TypeUnit},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "equalTo"),
-            Core.fieldTypeType = Core.TypeUnit},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "greaterThan"),
-            Core.fieldTypeType = Core.TypeUnit}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "An equality judgement: less than, equal to, or greater than")))])}))),
-      (Core.Name "hydra.util.Precision", (Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "arbitrary"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = Core.TypeUnit,
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Arbitrary precision")))])}))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "bits"),
-            Core.fieldTypeType = (Core.TypeAnnotated (Core.AnnotatedType {
-              Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.annotatedTypeAnnotation = (M.fromList [
-                (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Precision to a specified number of bits")))])}))}]),
-        Core.annotatedTypeAnnotation = (M.fromList [
-          (Core.Name "description", (Core.TermLiteral (Core.LiteralString "Numeric precision: arbitrary precision, or precision to a specified number of bits")))])})))]
diff --git a/src/main/haskell/Hydra/Json/Decode.hs b/src/main/haskell/Hydra/Json/Decode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Decode.hs
+++ /dev/null
@@ -1,271 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | JSON decoding for Hydra terms. Converts JSON Values to Terms using Either for error handling.
-
-module Hydra.Json.Decode where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Decode a JSON value to a float term. Finite values arrive as JSON numbers; NaN/Inf/-0.0 arrive as JSON string sentinels. Float32 and Float64 are symmetric.
-decodeFloat :: Core.FloatType -> Model.Value -> Either String Core.Term
-decodeFloat ft value =
-    case ft of
-      Core.FloatTypeBigfloat -> case value of
-        Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (Literals.float64ToBigfloat (Literals.decimalToFloat64 v1)))))
-        Model.ValueString v1 -> Maybes.maybe (Left (Strings.cat [
-          "invalid bigfloat sentinel: ",
-          v1])) (\v -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (Literals.float64ToBigfloat v))))) (parseSpecialFloat v1)
-        _ -> Left "expected number or special float string for bigfloat"
-      Core.FloatTypeFloat32 -> case value of
-        Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (Literals.decimalToFloat32 v1))))
-        Model.ValueString v1 -> Maybes.maybe (Left (Strings.cat [
-          "invalid float32 sentinel: ",
-          v1])) (\v -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 v)))) (parseSpecialFloat32 v1)
-        _ -> Left "expected number or special float string for float32"
-      Core.FloatTypeFloat64 -> case value of
-        Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (Literals.decimalToFloat64 v1))))
-        Model.ValueString v1 -> Maybes.maybe (Left (Strings.cat [
-          "invalid float64 sentinel: ",
-          v1])) (\v -> Right (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 v)))) (parseSpecialFloat v1)
-        _ -> Left "expected number or special float string for float64"
--- | Decode a JSON value to an integer term. Small ints from numbers; large ints from strings.
-decodeInteger :: Core.IntegerType -> Model.Value -> Either String Core.Term
-decodeInteger it value =
-    case it of
-      Core.IntegerTypeBigint ->
-        let strResult = expectString value
-        in (Eithers.either (\err -> Left err) (\s ->
-          let parsed = Literals.readBigint s
-          in (Maybes.maybe (Left (Strings.cat [
-            "invalid bigint: ",
-            s])) (\v -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint v)))) parsed)) strResult)
-      Core.IntegerTypeInt64 ->
-        let strResult = expectString value
-        in (Eithers.either (\err -> Left err) (\s ->
-          let parsed = Literals.readInt64 s
-          in (Maybes.maybe (Left (Strings.cat [
-            "invalid int64: ",
-            s])) (\v -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 v)))) parsed)) strResult)
-      Core.IntegerTypeUint32 ->
-        let strResult = expectString value
-        in (Eithers.either (\err -> Left err) (\s ->
-          let parsed = Literals.readUint32 s
-          in (Maybes.maybe (Left (Strings.cat [
-            "invalid uint32: ",
-            s])) (\v -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 v)))) parsed)) strResult)
-      Core.IntegerTypeUint64 ->
-        let strResult = expectString value
-        in (Eithers.either (\err -> Left err) (\s ->
-          let parsed = Literals.readUint64 s
-          in (Maybes.maybe (Left (Strings.cat [
-            "invalid uint64: ",
-            s])) (\v -> Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 v)))) parsed)) strResult)
-      Core.IntegerTypeInt8 ->
-        let numResult = expectNumber value
-        in (Eithers.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (Literals.bigintToInt8 (Literals.decimalToBigint n))))) numResult)
-      Core.IntegerTypeInt16 ->
-        let numResult = expectNumber value
-        in (Eithers.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 (Literals.bigintToInt16 (Literals.decimalToBigint n))))) numResult)
-      Core.IntegerTypeInt32 ->
-        let numResult = expectNumber value
-        in (Eithers.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Literals.bigintToInt32 (Literals.decimalToBigint n))))) numResult)
-      Core.IntegerTypeUint8 ->
-        let numResult = expectNumber value
-        in (Eithers.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 (Literals.bigintToUint8 (Literals.decimalToBigint n))))) numResult)
-      Core.IntegerTypeUint16 ->
-        let numResult = expectNumber value
-        in (Eithers.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 (Literals.bigintToUint16 (Literals.decimalToBigint n))))) numResult)
--- | Decode a JSON value to a literal term
-decodeLiteral :: Core.LiteralType -> Model.Value -> Either String Core.Term
-decodeLiteral lt value =
-    case lt of
-      Core.LiteralTypeBinary ->
-        let strResult = expectString value
-        in (Eithers.map (\s -> Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary s))) strResult)
-      Core.LiteralTypeBoolean -> case value of
-        Model.ValueBoolean v1 -> Right (Core.TermLiteral (Core.LiteralBoolean v1))
-        _ -> Left "expected boolean"
-      Core.LiteralTypeDecimal -> case value of
-        Model.ValueNumber v1 -> Right (Core.TermLiteral (Core.LiteralDecimal v1))
-        _ -> Left "expected number for decimal"
-      Core.LiteralTypeFloat v0 -> decodeFloat v0 value
-      Core.LiteralTypeInteger v0 -> decodeInteger v0 value
-      Core.LiteralTypeString ->
-        let strResult = expectString value
-        in (Eithers.map (\s -> Core.TermLiteral (Core.LiteralString s)) strResult)
--- | Extract an array from a JSON value
-expectArray :: Model.Value -> Either String [Model.Value]
-expectArray value =
-    case value of
-      Model.ValueArray v0 -> Right v0
-      _ -> Left "expected array"
--- | Extract a number from a JSON value
-expectNumber :: Model.Value -> Either String Sci.Scientific
-expectNumber value =
-    case value of
-      Model.ValueNumber v0 -> Right v0
-      _ -> Left "expected number"
--- | Extract an object from a JSON value
-expectObject :: Model.Value -> Either String (M.Map String Model.Value)
-expectObject value =
-    case value of
-      Model.ValueObject v0 -> Right v0
-      _ -> Left "expected object"
--- | Extract a string from a JSON value
-expectString :: Model.Value -> Either String String
-expectString value =
-    case value of
-      Model.ValueString v0 -> Right v0
-      _ -> Left "expected string"
--- | Decode a JSON value to a Hydra term given a type and type name. Returns Left for type mismatches.
-fromJson :: M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> Model.Value -> Either String Core.Term
-fromJson types tname typ value =
-
-      let stripped = Strip.deannotateType typ
-      in case stripped of
-        Core.TypeLiteral v0 -> decodeLiteral v0 value
-        Core.TypeList v0 ->
-          let decodeElem = \v -> fromJson types tname v0 v
-              arrResult = expectArray value
-          in (Eithers.either (\err -> Left err) (\arr ->
-            let decoded = Eithers.mapList decodeElem arr
-            in (Eithers.map (\ts -> Core.TermList ts) decoded)) arrResult)
-        Core.TypeSet v0 ->
-          let decodeElem = \v -> fromJson types tname v0 v
-              arrResult = expectArray value
-          in (Eithers.either (\err -> Left err) (\arr ->
-            let decoded = Eithers.mapList decodeElem arr
-            in (Eithers.map (\elems -> Core.TermSet (Sets.fromList elems)) decoded)) arrResult)
-        Core.TypeMaybe v0 ->
-          let innerStripped = Strip.deannotateType v0
-              isNestedMaybe =
-                      case innerStripped of
-                        Core.TypeMaybe _ -> True
-                        _ -> False
-          in (Logic.ifElse isNestedMaybe (
-            let decodeJust =
-                    \arr -> Maybes.maybe (Left "expected single-element array for Just") (\firstVal -> Eithers.map (\v -> Core.TermMaybe (Just v)) (fromJson types tname v0 firstVal)) (Lists.maybeHead arr)
-                decodeMaybeArray =
-                        \arr ->
-                          let len = Lists.length arr
-                          in (Logic.ifElse (Equality.equal len 0) (Right (Core.TermMaybe Nothing)) (Logic.ifElse (Equality.equal len 1) (decodeJust arr) (Left "expected single-element array for Just")))
-            in case value of
-              Model.ValueNull -> Right (Core.TermMaybe Nothing)
-              Model.ValueArray v1 -> decodeMaybeArray v1
-              _ -> Left "expected null or single-element array for nested Maybe") (case value of
-            Model.ValueNull -> Right (Core.TermMaybe Nothing)
-            _ -> Eithers.map (\v -> Core.TermMaybe (Just v)) (fromJson types tname v0 value)))
-        Core.TypeRecord v0 ->
-          let objResult = expectObject value
-          in (Eithers.either (\err -> Left err) (\obj ->
-            let decodeField =
-                    \ft ->
-                      let fname = Core.fieldTypeName ft
-                          ftype = Core.fieldTypeType ft
-                          mval = Maps.lookup (Core.unName fname) obj
-                          defaultVal = Model.ValueNull
-                          jsonVal = Maybes.fromMaybe defaultVal mval
-                          decoded = fromJson types tname ftype jsonVal
-                      in (Eithers.map (\v -> Core.Field {
-                        Core.fieldName = fname,
-                        Core.fieldTerm = v}) decoded)
-                decodedFields = Eithers.mapList decodeField v0
-            in (Eithers.map (\fs -> Core.TermRecord (Core.Record {
-              Core.recordTypeName = tname,
-              Core.recordFields = fs})) decodedFields)) objResult)
-        Core.TypeUnion v0 ->
-          let decodeVariant =
-                  \key -> \val -> \ftype ->
-                    let jsonVal = Maybes.fromMaybe Model.ValueNull val
-                        decoded = fromJson types tname ftype jsonVal
-                    in (Eithers.map (\v -> Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = tname,
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name key),
-                        Core.fieldTerm = v}})) decoded)
-              findAndDecode =
-                      \key -> \val -> \fts -> Maybes.maybe (Left (Strings.cat [
-                        "unknown variant: ",
-                        key])) (\ft -> decodeVariant key val (Core.fieldTypeType ft)) (Lists.find (\ft -> Equality.equal (Core.unName (Core.fieldTypeName ft)) key) fts)
-              decodeSingleKey =
-                      \obj -> Maybes.maybe (Left "expected single-key object for union") (\k -> findAndDecode k (Maps.lookup k obj) v0) (Lists.maybeHead (Maps.keys obj))
-              processUnion =
-                      \obj -> Logic.ifElse (Equality.equal (Lists.length (Maps.keys obj)) 1) (decodeSingleKey obj) (Left "expected single-key object for union")
-              objResult = expectObject value
-          in (Eithers.either (\err -> Left err) (\obj -> processUnion obj) objResult)
-        Core.TypeUnit ->
-          let objResult = expectObject value
-          in (Eithers.map (\_2 -> Core.TermUnit) objResult)
-        Core.TypeWrap v0 ->
-          let decoded = fromJson types tname v0 value
-          in (Eithers.map (\v -> Core.TermWrap (Core.WrappedTerm {
-            Core.wrappedTermTypeName = tname,
-            Core.wrappedTermBody = v})) decoded)
-        Core.TypeMap v0 ->
-          let keyType = Core.mapTypeKeys v0
-              valType = Core.mapTypeValues v0
-              arrResult = expectArray value
-          in (Eithers.either (\err -> Left err) (\arr ->
-            let decodeEntry =
-                    \entryJson ->
-                      let objResult = expectObject entryJson
-                      in (Eithers.either (\err -> Left err) (\entryObj ->
-                        let keyJson = Maps.lookup "key" entryObj
-                            valJson = Maps.lookup "value" entryObj
-                        in (Maybes.maybe (Left "missing key in map entry") (\kj -> Maybes.maybe (Left "missing value in map entry") (\vj ->
-                          let decodedKey = fromJson types tname keyType kj
-                              decodedVal = fromJson types tname valType vj
-                          in (Eithers.either (\err -> Left err) (\k -> Eithers.map (\v -> (k, v)) decodedVal) decodedKey)) valJson) keyJson)) objResult)
-                entries = Eithers.mapList decodeEntry arr
-            in (Eithers.map (\es -> Core.TermMap (Maps.fromList es)) entries)) arrResult)
-        Core.TypePair v0 ->
-          let firstType = Core.pairTypeFirst v0
-              secondType = Core.pairTypeSecond v0
-              objResult = expectObject value
-          in (Eithers.either (\err -> Left err) (\obj ->
-            let firstJson = Maps.lookup "first" obj
-                secondJson = Maps.lookup "second" obj
-            in (Maybes.maybe (Left "missing first in pair") (\fj -> Maybes.maybe (Left "missing second in pair") (\sj ->
-              let decodedFirst = fromJson types tname firstType fj
-                  decodedSecond = fromJson types tname secondType sj
-              in (Eithers.either (\err -> Left err) (\f -> Eithers.map (\s -> Core.TermPair (f, s)) decodedSecond) decodedFirst)) secondJson) firstJson)) objResult)
-        Core.TypeEither v0 ->
-          let leftType = Core.eitherTypeLeft v0
-              rightType = Core.eitherTypeRight v0
-              objResult = expectObject value
-          in (Eithers.either (\err -> Left err) (\obj ->
-            let leftJson = Maps.lookup "left" obj
-                rightJson = Maps.lookup "right" obj
-            in (Maybes.maybe (Maybes.maybe (Left "expected left or right in Either") (\rj ->
-              let decoded = fromJson types tname rightType rj
-              in (Eithers.map (\v -> Core.TermEither (Right v)) decoded)) rightJson) (\lj ->
-              let decoded = fromJson types tname leftType lj
-              in (Eithers.map (\v -> Core.TermEither (Left v)) decoded)) leftJson)) objResult)
-        Core.TypeVariable v0 ->
-          let lookedUp = Maps.lookup v0 types
-          in (Maybes.maybe (Left (Strings.cat [
-            "unknown type variable: ",
-            (Core.unName v0)])) (\resolvedType -> fromJson types v0 resolvedType value) lookedUp)
-        _ -> Left (Strings.cat [
-          "unsupported type for JSON decoding: ",
-          (ShowCore.type_ typ)])
--- | Parse an IEEE sentinel string (NaN, Infinity, -Infinity, -0.0) to a float64. Returns Nothing for unrecognized strings.
-parseSpecialFloat :: String -> Maybe Double
-parseSpecialFloat s =
-    Logic.ifElse (Logic.or (Equality.equal s "NaN") (Logic.or (Equality.equal s "Infinity") (Logic.or (Equality.equal s "-Infinity") (Equality.equal s "-0.0")))) (Literals.readFloat64 s) Nothing
--- | Parse an IEEE sentinel string (NaN, Infinity, -Infinity, -0.0) to a float32. Returns Nothing for unrecognized strings.
-parseSpecialFloat32 :: String -> Maybe Float
-parseSpecialFloat32 s =
-    Logic.ifElse (Logic.or (Equality.equal s "NaN") (Logic.or (Equality.equal s "Infinity") (Logic.or (Equality.equal s "-Infinity") (Equality.equal s "-0.0")))) (Literals.readFloat32 s) Nothing
diff --git a/src/main/haskell/Hydra/Json/Decoding.hs b/src/main/haskell/Hydra/Json/Decoding.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Decoding.hs
+++ /dev/null
@@ -1,44 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Decoding functions for JSON data
-
-module Hydra.Json.Decoding where
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Decode a JSON array using a decoder for elements
-decodeArray :: (Model.Value -> Either String t0) -> Model.Value -> Either String [t0]
-decodeArray decodeElem x =
-    case x of
-      Model.ValueArray v0 -> Eithers.mapList decodeElem v0
-      _ -> Left "expected an array"
--- | Decode a JSON boolean value
-decodeBoolean :: Model.Value -> Either String Bool
-decodeBoolean x =
-    case x of
-      Model.ValueBoolean v0 -> Right v0
-      _ -> Left "expected a boolean"
--- | Decode a required field from a JSON object
-decodeField :: (t0 -> Either String t1) -> String -> M.Map String t0 -> Either String t1
-decodeField decodeValue name m =
-    Eithers.bind (decodeOptionalField decodeValue name m) (Maybes.maybe (Left (Strings.cat2 "missing field: " name)) (\f -> Right f))
--- | Decode a JSON object value
-decodeObject :: Model.Value -> Either String (M.Map String Model.Value)
-decodeObject x =
-    case x of
-      Model.ValueObject v0 -> Right v0
-      _ -> Left "expected an object"
--- | Decode an optional field from a JSON object
-decodeOptionalField :: Ord t3 => ((t0 -> Either t1 t2) -> t3 -> M.Map t3 t0 -> Either t1 (Maybe t2))
-decodeOptionalField decodeValue name m =
-    Maybes.maybe (Right Nothing) (\v -> Eithers.map (\x -> Just x) (decodeValue v)) (Maps.lookup name m)
--- | Decode a JSON string value
-decodeString :: Model.Value -> Either String String
-decodeString x =
-    case x of
-      Model.ValueString v0 -> Right v0
-      _ -> Left "expected a string"
diff --git a/src/main/haskell/Hydra/Json/Encode.hs b/src/main/haskell/Hydra/Json/Encode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Encode.hs
+++ /dev/null
@@ -1,259 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | JSON encoding for Hydra terms. Converts Terms to JSON Values using Either for error handling.
-
-module Hydra.Json.Encode where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Encode a float value to JSON. Finite values become JSON numbers (shortest round-trip); IEEE specials (NaN/Inf/-0.0) become JSON strings. Float32 and Float64 are symmetric; the schema disambiguates precision on decode. Bigfloat rejects anything the decimal space can't hold.
-encodeFloat :: Core.FloatValue -> Either String Model.Value
-encodeFloat fv =
-    case fv of
-      Core.FloatValueBigfloat v0 ->
-        let s = Literals.showBigfloat v0
-        in (Logic.ifElse (requiresJsonStringSentinel s) (Left (Strings.cat [
-          "JSON cannot represent bigfloat value: ",
-          s])) (Right (Model.ValueNumber (Literals.float64ToDecimal (Literals.bigfloatToFloat64 v0)))))
-      Core.FloatValueFloat32 v0 ->
-        let s = Literals.showFloat32 v0
-        in (Logic.ifElse (requiresJsonStringSentinel s) (Right (Model.ValueString s)) (Right (Model.ValueNumber (Literals.float32ToDecimal v0))))
-      Core.FloatValueFloat64 v0 ->
-        let s = Literals.showFloat64 v0
-        in (Logic.ifElse (requiresJsonStringSentinel s) (Right (Model.ValueString s)) (Right (Model.ValueNumber (Literals.float64ToDecimal v0))))
--- | Encode an integer value to JSON. Small ints use native numbers; large ints use strings.
-encodeInteger :: Core.IntegerValue -> Either t0 Model.Value
-encodeInteger iv =
-    case iv of
-      Core.IntegerValueBigint v0 -> Right (Model.ValueString (Literals.showBigint v0))
-      Core.IntegerValueInt64 v0 -> Right (Model.ValueString (Literals.showInt64 v0))
-      Core.IntegerValueUint32 v0 -> Right (Model.ValueString (Literals.showUint32 v0))
-      Core.IntegerValueUint64 v0 -> Right (Model.ValueString (Literals.showUint64 v0))
-      Core.IntegerValueInt8 v0 -> Right (Model.ValueNumber (Literals.bigintToDecimal (Literals.int8ToBigint v0)))
-      Core.IntegerValueInt16 v0 -> Right (Model.ValueNumber (Literals.bigintToDecimal (Literals.int16ToBigint v0)))
-      Core.IntegerValueInt32 v0 -> Right (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0)))
-      Core.IntegerValueUint8 v0 -> Right (Model.ValueNumber (Literals.bigintToDecimal (Literals.uint8ToBigint v0)))
-      Core.IntegerValueUint16 v0 -> Right (Model.ValueNumber (Literals.bigintToDecimal (Literals.uint16ToBigint v0)))
--- | Encode a Hydra literal to a JSON value
-encodeLiteral :: Core.Literal -> Either String Model.Value
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBinary v0 -> Right (Model.ValueString (Literals.binaryToString v0))
-      Core.LiteralBoolean v0 -> Right (Model.ValueBoolean v0)
-      Core.LiteralDecimal v0 -> Right (Model.ValueNumber v0)
-      Core.LiteralFloat v0 -> encodeFloat v0
-      Core.LiteralInteger v0 -> encodeInteger v0
-      Core.LiteralString v0 -> Right (Model.ValueString v0)
--- | True for IEEE sentinel strings that JSON must escape as a string to preserve.
-requiresJsonStringSentinel :: String -> Bool
-requiresJsonStringSentinel s =
-    Logic.or (Equality.equal s "NaN") (Logic.or (Equality.equal s "Infinity") (Logic.or (Equality.equal s "-Infinity") (Equality.equal s "-0.0")))
--- | Encode a Hydra term to a JSON value given a type and type name. Returns Left for unsupported constructs.
-toJson :: M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> Core.Term -> Either String Model.Value
-toJson types tname typ term =
-
-      let stripped = Strip.deannotateType typ
-          strippedTerm = Strip.deannotateTerm term
-      in case stripped of
-        Core.TypeLiteral _ -> case strippedTerm of
-          Core.TermLiteral v1 -> encodeLiteral v1
-          _ -> Left "expected literal term"
-        Core.TypeList v0 -> case strippedTerm of
-          Core.TermList v1 ->
-            let results = Eithers.mapList (\t -> toJson types tname v0 t) v1
-            in (Eithers.map (\vs -> Model.ValueArray vs) results)
-          _ -> Left "expected list term"
-        Core.TypeSet v0 -> case strippedTerm of
-          Core.TermSet v1 ->
-            let terms = Sets.toList v1
-                results = Eithers.mapList (\t -> toJson types tname v0 t) terms
-            in (Eithers.map (\vs -> Model.ValueArray vs) results)
-          _ -> Left "expected set term"
-        Core.TypeMaybe v0 ->
-          let innerStripped = Strip.deannotateType v0
-              isNestedMaybe =
-                      case innerStripped of
-                        Core.TypeMaybe _ -> True
-                        _ -> False
-          in case strippedTerm of
-            Core.TermMaybe v1 -> Maybes.maybe (Right Model.ValueNull) (\v ->
-              let encoded = toJson types tname v0 v
-              in (Logic.ifElse isNestedMaybe (Eithers.map (\ev -> Model.ValueArray [
-                ev]) encoded) encoded)) v1
-            _ -> Left "expected maybe term"
-        Core.TypeRecord v0 -> case strippedTerm of
-          Core.TermRecord v1 ->
-            let isSimpleMaybe =
-                    \ftype -> case (Strip.deannotateType ftype) of
-                      Core.TypeMaybe v2 -> case (Strip.deannotateType v2) of
-                        Core.TypeMaybe _ -> False
-                        _ -> True
-                      _ -> False
-                encodeFieldWithType =
-                        \ft -> \f ->
-                          let fname = Core.unName (Core.fieldName f)
-                              fterm = Core.fieldTerm f
-                              ftype = Core.fieldTypeType ft
-                          in (Logic.ifElse (isSimpleMaybe ftype) (case (Strip.deannotateTerm fterm) of
-                            Core.TermMaybe v2 -> Maybes.maybe (Right Nothing) (\v ->
-                              let innerType =
-                                      case (Strip.deannotateType ftype) of
-                                        Core.TypeMaybe v3 -> v3
-                                        _ -> ftype
-                                  encoded = toJson types tname innerType v
-                              in (Eithers.map (\ev -> Just (fname, ev)) encoded)) v2
-                            _ -> Left "expected maybe term for optional field") (
-                            let encoded = toJson types tname ftype fterm
-                            in (Eithers.map (\ev -> Just (fname, ev)) encoded)))
-                fieldTypes = v0
-                fields = Core.recordFields v1
-                encodedPairs =
-                        Eithers.mapList (\ftf -> encodeFieldWithType (Pairs.first ftf) (Pairs.second ftf)) (Lists.zip fieldTypes fields)
-            in (Eithers.map (\pairs -> Model.ValueObject (Maps.fromList (Maybes.cat pairs))) encodedPairs)
-          _ -> Left "expected record term"
-        Core.TypeUnion v0 -> case strippedTerm of
-          Core.TermInject v1 ->
-            let field = Core.injectionField v1
-                fname = Core.unName (Core.fieldName field)
-                fterm = Core.fieldTerm field
-                ftypeResult =
-                        Maybes.maybe (Left (Strings.cat [
-                          "unknown variant: ",
-                          fname])) (\ft -> Right (Core.fieldTypeType ft)) (Lists.find (\ft -> Equality.equal (Core.unName (Core.fieldTypeName ft)) fname) v0)
-            in (Eithers.either (\err -> Left err) (\ftype ->
-              let encodedUnion = toJson types tname ftype fterm
-              in (Eithers.map (\v -> Model.ValueObject (Maps.fromList [
-                (fname, v)])) encodedUnion)) ftypeResult)
-          _ -> Left "expected union term"
-        Core.TypeUnit -> Right (Model.ValueObject Maps.empty)
-        Core.TypeWrap v0 -> case strippedTerm of
-          Core.TermWrap v1 -> toJson types tname v0 (Core.wrappedTermBody v1)
-          _ -> Left "expected wrapped term"
-        Core.TypeMap v0 ->
-          let keyType = Core.mapTypeKeys v0
-              valType = Core.mapTypeValues v0
-          in case strippedTerm of
-            Core.TermMap v1 ->
-              let encodeEntry =
-                      \kv ->
-                        let k = Pairs.first kv
-                            v = Pairs.second kv
-                            encodedK = toJson types tname keyType k
-                            encodedV = toJson types tname valType v
-                        in (Eithers.either (\err -> Left err) (\ek -> Eithers.map (\ev -> Model.ValueObject (Maps.fromList [
-                          ("key", ek),
-                          ("value", ev)])) encodedV) encodedK)
-                  entries = Eithers.mapList encodeEntry (Maps.toList v1)
-              in (Eithers.map (\es -> Model.ValueArray es) entries)
-            _ -> Left "expected map term"
-        Core.TypePair v0 ->
-          let firstType = Core.pairTypeFirst v0
-              secondType = Core.pairTypeSecond v0
-          in case strippedTerm of
-            Core.TermPair v1 ->
-              let first = Pairs.first v1
-                  second = Pairs.second v1
-                  encodedFirst = toJson types tname firstType first
-                  encodedSecond = toJson types tname secondType second
-              in (Eithers.either (\err -> Left err) (\ef -> Eithers.map (\es -> Model.ValueObject (Maps.fromList [
-                ("first", ef),
-                ("second", es)])) encodedSecond) encodedFirst)
-            _ -> Left "expected pair term"
-        Core.TypeEither v0 ->
-          let leftType = Core.eitherTypeLeft v0
-              rightType = Core.eitherTypeRight v0
-          in case strippedTerm of
-            Core.TermEither v1 -> Eithers.either (\l ->
-              let encodedL = toJson types tname leftType l
-              in (Eithers.map (\v -> Model.ValueObject (Maps.fromList [
-                ("left", v)])) encodedL)) (\r ->
-              let encodedR = toJson types tname rightType r
-              in (Eithers.map (\v -> Model.ValueObject (Maps.fromList [
-                ("right", v)])) encodedR)) v1
-            _ -> Left "expected either term"
-        Core.TypeVariable v0 ->
-          let lookedUp = Maps.lookup v0 types
-          in (Maybes.maybe (toJsonUntyped term) (\resolvedType -> toJson types v0 resolvedType term) lookedUp)
-        _ -> Left (Strings.cat [
-          "unsupported type for JSON encoding: ",
-          (ShowCore.type_ typ)])
--- | Encode a Hydra term to a JSON value without type information. Falls back to array-wrapped Maybe encoding.
-toJsonUntyped :: Core.Term -> Either String Model.Value
-toJsonUntyped term =
-
-      let stripped = Strip.deannotateTerm term
-      in case stripped of
-        Core.TermLiteral v0 -> encodeLiteral v0
-        Core.TermList v0 ->
-          let results = Eithers.mapList (\t -> toJsonUntyped t) v0
-          in (Eithers.map (\vs -> Model.ValueArray vs) results)
-        Core.TermSet v0 ->
-          let terms = Sets.toList v0
-              results = Eithers.mapList (\t -> toJsonUntyped t) terms
-          in (Eithers.map (\vs -> Model.ValueArray vs) results)
-        Core.TermMaybe v0 -> Maybes.maybe (Right Model.ValueNull) (\v ->
-          let encodedMaybe = toJsonUntyped v
-          in (Eithers.map (\encoded -> Model.ValueArray [
-            encoded]) encodedMaybe)) v0
-        Core.TermRecord v0 ->
-          let encodeField =
-                  \f ->
-                    let fname = Core.unName (Core.fieldName f)
-                        fterm = Core.fieldTerm f
-                        encodedField = toJsonUntyped fterm
-                    in (Eithers.map (\v -> (fname, v)) encodedField)
-              fields = Core.recordFields v0
-              encodedFields = Eithers.mapList encodeField fields
-          in (Eithers.map (\fs -> Model.ValueObject (Maps.fromList fs)) encodedFields)
-        Core.TermInject v0 ->
-          let field = Core.injectionField v0
-              fname = Core.unName (Core.fieldName field)
-              fterm = Core.fieldTerm field
-              encodedUnion = toJsonUntyped fterm
-          in (Eithers.map (\v -> Model.ValueObject (Maps.fromList [
-            (fname, v)])) encodedUnion)
-        Core.TermUnit -> Right (Model.ValueObject Maps.empty)
-        Core.TermWrap v0 -> toJsonUntyped (Core.wrappedTermBody v0)
-        Core.TermMap v0 ->
-          let encodeEntry =
-                  \kv ->
-                    let k = Pairs.first kv
-                        v = Pairs.second kv
-                        encodedK = toJsonUntyped k
-                        encodedV = toJsonUntyped v
-                    in (Eithers.either (\err -> Left err) (\ek -> Eithers.map (\ev -> Model.ValueObject (Maps.fromList [
-                      ("key", ek),
-                      ("value", ev)])) encodedV) encodedK)
-              entries = Eithers.mapList encodeEntry (Maps.toList v0)
-          in (Eithers.map (\es -> Model.ValueArray es) entries)
-        Core.TermPair v0 ->
-          let first = Pairs.first v0
-              second = Pairs.second v0
-              encodedFirst = toJsonUntyped first
-              encodedSecond = toJsonUntyped second
-          in (Eithers.either (\err -> Left err) (\ef -> Eithers.map (\es -> Model.ValueObject (Maps.fromList [
-            ("first", ef),
-            ("second", es)])) encodedSecond) encodedFirst)
-        Core.TermEither v0 -> Eithers.either (\l ->
-          let encodedL = toJsonUntyped l
-          in (Eithers.map (\v -> Model.ValueObject (Maps.fromList [
-            ("left", v)])) encodedL)) (\r ->
-          let encodedR = toJsonUntyped r
-          in (Eithers.map (\v -> Model.ValueObject (Maps.fromList [
-            ("right", v)])) encodedR)) v0
-        _ -> Left (Strings.cat [
-          "unsupported term variant for JSON encoding: ",
-          (ShowCore.term term)])
diff --git a/src/main/haskell/Hydra/Json/Model.hs b/src/main/haskell/Hydra/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Model.hs
+++ /dev/null
@@ -1,30 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A JSON syntax model. See the BNF at https://www.json.org
-
-module Hydra.Json.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
--- | A JSON value
-data Value =
-  -- | A JSON array
-  ValueArray [Value] |
-  -- | A boolean value
-  ValueBoolean Bool |
-  -- | JSON's null value
-  ValueNull |
-  -- | A numeric value
-  ValueNumber Sci.Scientific |
-  -- | A JSON object as a set of key/value pairs
-  ValueObject (M.Map String Value) |
-  -- | A string value
-  ValueString String
-  deriving (Eq, Ord, Read, Show)
-_Value = Core.Name "hydra.json.model.Value"
-_Value_array = Core.Name "array"
-_Value_boolean = Core.Name "boolean"
-_Value_null = Core.Name "null"
-_Value_number = Core.Name "number"
-_Value_object = Core.Name "object"
-_Value_string = Core.Name "string"
diff --git a/src/main/haskell/Hydra/Json/Parser.hs b/src/main/haskell/Hydra/Json/Parser.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Parser.hs
+++ /dev/null
@@ -1,105 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | JSON parser using Hydra parser combinators
-
-module Hydra.Json.Parser where
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Parsers as Parsers
-import qualified Hydra.Parsing as Parsing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Hydra.Lib.Literals as Literals
--- | Parse a single digit (0-9)
-digit :: Parsing.Parser Int
-digit = Parsers.satisfy (\c -> Logic.and (Equality.gte c 48) (Equality.lte c 57))
--- | Parse one or more digits as a string
-digits :: Parsing.Parser String
-digits = Parsers.map Strings.fromList (Parsers.some digit)
--- | Parse a JSON array
-jsonArray :: Parsing.Parser Model.Value
-jsonArray =
-    Parsers.map (\x -> Model.ValueArray x) (Parsers.between (token (Parsers.char 91)) (token (Parsers.char 93)) (Parsers.sepBy (Parsers.lazy (\_ -> jsonValue)) (token (Parsers.char 44))))
--- | Parse JSON boolean (true or false)
-jsonBool :: Parsing.Parser Model.Value
-jsonBool =
-    Parsers.alt (Parsers.map (\_ -> Model.ValueBoolean True) (token (Parsers.string "true"))) (Parsers.map (\_ -> Model.ValueBoolean False) (token (Parsers.string "false")))
--- | Parse a JSON escape sequence after the backslash
-jsonEscapeChar :: Parsing.Parser Int
-jsonEscapeChar =
-    Parsers.choice [
-      Parsers.map (\_ -> 34) (Parsers.char 34),
-      (Parsers.map (\_ -> 92) (Parsers.char 92)),
-      (Parsers.map (\_ -> 47) (Parsers.char 47)),
-      (Parsers.map (\_ -> 8) (Parsers.char 98)),
-      (Parsers.map (\_ -> 12) (Parsers.char 102)),
-      (Parsers.map (\_ -> 10) (Parsers.char 110)),
-      (Parsers.map (\_ -> 13) (Parsers.char 114)),
-      (Parsers.map (\_ -> 9) (Parsers.char 116))]
--- | Parse the optional exponent part of a JSON number
-jsonExponentPart :: Parsing.Parser (Maybe String)
-jsonExponentPart =
-    Parsers.optional (Parsers.bind (Parsers.satisfy (\c -> Logic.or (Equality.equal c 101) (Equality.equal c 69))) (\_ -> Parsers.bind (Parsers.optional (Parsers.satisfy (\c -> Logic.or (Equality.equal c 43) (Equality.equal c 45)))) (\sign -> Parsers.map (\digits -> Strings.cat2 (Strings.cat2 "e" (Maybes.maybe "" (\arg_ -> Strings.fromList (Lists.pure arg_)) sign)) digits) digits)))
--- | Parse the optional fractional part of a JSON number
-jsonFractionPart :: Parsing.Parser (Maybe String)
-jsonFractionPart = Parsers.optional (Parsers.bind (Parsers.char 46) (\_ -> Parsers.map (\d -> Strings.cat2 "." d) digits))
--- | Parse the integer part of a JSON number (optional minus, then digits)
-jsonIntegerPart :: Parsing.Parser String
-jsonIntegerPart =
-    Parsers.bind (Parsers.optional (Parsers.char 45)) (\sign -> Parsers.bind digits (\digits -> Parsers.pure (Maybes.maybe digits (\_ -> Strings.cat2 "-" digits) sign)))
--- | Parse a JSON object key-value pair
-jsonKeyValue :: Parsing.Parser (String, Model.Value)
-jsonKeyValue =
-    Parsers.bind (token (Parsers.bind (Parsers.char 34) (\_ -> Parsers.bind (Parsers.many jsonStringChar) (\chars -> Parsers.bind (Parsers.char 34) (\_2 -> Parsers.pure (Strings.fromList chars)))))) (\key -> Parsers.bind (token (Parsers.char 58)) (\_ -> Parsers.map (\v -> (key, v)) (Parsers.lazy (\_2 -> jsonValue))))
--- | Parse JSON null value
-jsonNull :: Parsing.Parser Model.Value
-jsonNull = Parsers.map (\_ -> Model.ValueNull) (token (Parsers.string "null"))
--- | Parse a JSON number (integer, decimal, or scientific notation)
-jsonNumber :: Parsing.Parser Model.Value
-jsonNumber =
-    token (Parsers.bind jsonIntegerPart (\intPart -> Parsers.bind jsonFractionPart (\fracPart -> Parsers.bind jsonExponentPart (\expPart ->
-      let numStr =
-              Strings.cat2 (Strings.cat2 intPart (Maybes.maybe "" Equality.identity fracPart)) (Maybes.maybe "" Equality.identity expPart)
-      in (Parsers.pure (Model.ValueNumber (Maybes.maybe (Literals.stringToDecimal "0.0") Equality.identity (Literals.readDecimal numStr))))))))
--- | Parse a JSON object
-jsonObject :: Parsing.Parser Model.Value
-jsonObject =
-    Parsers.map (\arg_ -> (\x -> Model.ValueObject x) (Maps.fromList arg_)) (Parsers.between (token (Parsers.char 123)) (token (Parsers.char 125)) (Parsers.sepBy jsonKeyValue (token (Parsers.char 44))))
--- | Parse a JSON string value
-jsonString :: Parsing.Parser Model.Value
-jsonString =
-    token (Parsers.bind (Parsers.char 34) (\_ -> Parsers.bind (Parsers.many jsonStringChar) (\chars -> Parsers.bind (Parsers.char 34) (\_2 -> Parsers.pure (Model.ValueString (Strings.fromList chars))))))
--- | Parse a single character in a JSON string (handling escapes)
-jsonStringChar :: Parsing.Parser Int
-jsonStringChar =
-    Parsers.alt (Parsers.bind (Parsers.char 92) (\_ -> jsonEscapeChar)) (Parsers.satisfy (\c -> Logic.and (Logic.not (Equality.equal c 34)) (Logic.not (Equality.equal c 92))))
--- | Parse any JSON value
-jsonValue :: Parsing.Parser Model.Value
-jsonValue =
-    Parsers.choice [
-      jsonNull,
-      jsonBool,
-      jsonNumber,
-      jsonString,
-      jsonArray,
-      jsonObject]
--- | Parse a JSON document from a string
-parseJson :: String -> Parsing.ParseResult Model.Value
-parseJson input =
-    Parsing.unParser (Parsers.bind whitespace (\_ -> Parsers.bind jsonValue (\v -> Parsers.bind whitespace (\_2 -> Parsers.bind Parsers.eof (\_3 -> Parsers.pure v))))) input
--- | Parse a token followed by optional whitespace
-token :: Parsing.Parser t0 -> Parsing.Parser t0
-token p = Parsers.bind p (\x -> Parsers.bind whitespace (\_ -> Parsers.pure x))
--- | Parse zero or more JSON whitespace characters (space, tab, newline, carriage return)
-whitespace :: Parsing.Parser ()
-whitespace =
-    Parsers.map (\_ -> ()) (Parsers.many (Parsers.satisfy (\c -> Lists.foldl Logic.or False [
-      Equality.equal c 32,
-      (Equality.equal c 9),
-      (Equality.equal c 10),
-      (Equality.equal c 13)])))
diff --git a/src/main/haskell/Hydra/Json/Schema.hs b/src/main/haskell/Hydra/Json/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Schema.hs
+++ /dev/null
@@ -1,262 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for JSON Schema. Based on https://cswr.github.io/JsonSchema/spec/grammar
-
-module Hydra.Json.Schema where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.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
-
-data Document =
-  Document {
-    documentId :: (Maybe String),
-    documentDefinitions :: (Maybe (M.Map Keyword Schema)),
-    documentRoot :: Schema}
-  deriving (Eq, Ord, Read, Show)
-
-_Document = Core.Name "hydra.json.schema.Document"
-
-_Document_id = Core.Name "id"
-
-_Document_definitions = Core.Name "definitions"
-
-_Document_root = Core.Name "root"
-
-newtype Keyword =
-  Keyword {
-    unKeyword :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Keyword = Core.Name "hydra.json.schema.Keyword"
-
-newtype Schema =
-  Schema {
-    unSchema :: [Restriction]}
-  deriving (Eq, Ord, Read, Show)
-
-_Schema = Core.Name "hydra.json.schema.Schema"
-
-data Restriction =
-  RestrictionType Type |
-  RestrictionString StringRestriction |
-  RestrictionNumber NumericRestriction |
-  RestrictionArray ArrayRestriction |
-  RestrictionObject ObjectRestriction |
-  RestrictionMultiple MultipleRestriction |
-  RestrictionReference SchemaReference |
-  RestrictionTitle String |
-  RestrictionDescription String
-  deriving (Eq, Ord, Read, Show)
-
-_Restriction = Core.Name "hydra.json.schema.Restriction"
-
-_Restriction_type = Core.Name "type"
-
-_Restriction_string = Core.Name "string"
-
-_Restriction_number = Core.Name "number"
-
-_Restriction_array = Core.Name "array"
-
-_Restriction_object = Core.Name "object"
-
-_Restriction_multiple = Core.Name "multiple"
-
-_Restriction_reference = Core.Name "reference"
-
-_Restriction_title = Core.Name "title"
-
-_Restriction_description = Core.Name "description"
-
-data Type =
-  TypeSingle TypeName |
-  TypeMultiple [TypeName]
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.json.schema.Type"
-
-_Type_single = Core.Name "single"
-
-_Type_multiple = Core.Name "multiple"
-
-data TypeName =
-  TypeNameString  |
-  TypeNameInteger  |
-  TypeNameNumber  |
-  TypeNameBoolean  |
-  TypeNameNull  |
-  TypeNameArray  |
-  TypeNameObject
-  deriving (Eq, Ord, Read, Show)
-
-_TypeName = Core.Name "hydra.json.schema.TypeName"
-
-_TypeName_string = Core.Name "string"
-
-_TypeName_integer = Core.Name "integer"
-
-_TypeName_number = Core.Name "number"
-
-_TypeName_boolean = Core.Name "boolean"
-
-_TypeName_null = Core.Name "null"
-
-_TypeName_array = Core.Name "array"
-
-_TypeName_object = Core.Name "object"
-
-data StringRestriction =
-  StringRestrictionMinLength Int |
-  StringRestrictionMaxLength Int |
-  StringRestrictionPattern RegularExpression
-  deriving (Eq, Ord, Read, Show)
-
-_StringRestriction = Core.Name "hydra.json.schema.StringRestriction"
-
-_StringRestriction_minLength = Core.Name "minLength"
-
-_StringRestriction_maxLength = Core.Name "maxLength"
-
-_StringRestriction_pattern = Core.Name "pattern"
-
-newtype RegularExpression =
-  RegularExpression {
-    unRegularExpression :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_RegularExpression = Core.Name "hydra.json.schema.RegularExpression"
-
-data NumericRestriction =
-  NumericRestrictionMinimum Limit |
-  NumericRestrictionMaximum Limit |
-  NumericRestrictionMultipleOf Int
-  deriving (Eq, Ord, Read, Show)
-
-_NumericRestriction = Core.Name "hydra.json.schema.NumericRestriction"
-
-_NumericRestriction_minimum = Core.Name "minimum"
-
-_NumericRestriction_maximum = Core.Name "maximum"
-
-_NumericRestriction_multipleOf = Core.Name "multipleOf"
-
-data Limit =
-  Limit {
-    limitValue :: Int,
-    limitExclusive :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Limit = Core.Name "hydra.json.schema.Limit"
-
-_Limit_value = Core.Name "value"
-
-_Limit_exclusive = Core.Name "exclusive"
-
-data ArrayRestriction =
-  ArrayRestrictionItems Items |
-  ArrayRestrictionAdditionalItems AdditionalItems |
-  ArrayRestrictionMinItems Int |
-  ArrayRestrictionMaxItems Int |
-  ArrayRestrictionUniqueItems Bool
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayRestriction = Core.Name "hydra.json.schema.ArrayRestriction"
-
-_ArrayRestriction_items = Core.Name "items"
-
-_ArrayRestriction_additionalItems = Core.Name "additionalItems"
-
-_ArrayRestriction_minItems = Core.Name "minItems"
-
-_ArrayRestriction_maxItems = Core.Name "maxItems"
-
-_ArrayRestriction_uniqueItems = Core.Name "uniqueItems"
-
-data Items =
-  ItemsSameItems Schema |
-  ItemsVarItems [Schema]
-  deriving (Eq, Ord, Read, Show)
-
-_Items = Core.Name "hydra.json.schema.Items"
-
-_Items_sameItems = Core.Name "sameItems"
-
-_Items_varItems = Core.Name "varItems"
-
-data AdditionalItems =
-  AdditionalItemsAny Bool |
-  AdditionalItemsSchema Schema
-  deriving (Eq, Ord, Read, Show)
-
-_AdditionalItems = Core.Name "hydra.json.schema.AdditionalItems"
-
-_AdditionalItems_any = Core.Name "any"
-
-_AdditionalItems_schema = Core.Name "schema"
-
-data ObjectRestriction =
-  ObjectRestrictionProperties (M.Map Keyword Schema) |
-  ObjectRestrictionAdditionalProperties AdditionalItems |
-  ObjectRestrictionRequired [Keyword] |
-  ObjectRestrictionMinProperties Int |
-  ObjectRestrictionMaxProperties Int |
-  ObjectRestrictionDependencies (M.Map Keyword SchemaOrArray) |
-  ObjectRestrictionPatternProperties (M.Map RegularExpression Schema)
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectRestriction = Core.Name "hydra.json.schema.ObjectRestriction"
-
-_ObjectRestriction_properties = Core.Name "properties"
-
-_ObjectRestriction_additionalProperties = Core.Name "additionalProperties"
-
-_ObjectRestriction_required = Core.Name "required"
-
-_ObjectRestriction_minProperties = Core.Name "minProperties"
-
-_ObjectRestriction_maxProperties = Core.Name "maxProperties"
-
-_ObjectRestriction_dependencies = Core.Name "dependencies"
-
-_ObjectRestriction_patternProperties = Core.Name "patternProperties"
-
-data SchemaOrArray =
-  SchemaOrArraySchema Schema |
-  SchemaOrArrayArray [Keyword]
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaOrArray = Core.Name "hydra.json.schema.SchemaOrArray"
-
-_SchemaOrArray_schema = Core.Name "schema"
-
-_SchemaOrArray_array = Core.Name "array"
-
-data MultipleRestriction =
-  MultipleRestrictionAllOf [Schema] |
-  MultipleRestrictionAnyOf [Schema] |
-  MultipleRestrictionOneOf [Schema] |
-  MultipleRestrictionNot Schema |
-  MultipleRestrictionEnum [Model.Value]
-  deriving (Eq, Ord, Read, Show)
-
-_MultipleRestriction = Core.Name "hydra.json.schema.MultipleRestriction"
-
-_MultipleRestriction_allOf = Core.Name "allOf"
-
-_MultipleRestriction_anyOf = Core.Name "anyOf"
-
-_MultipleRestriction_oneOf = Core.Name "oneOf"
-
-_MultipleRestriction_not = Core.Name "not"
-
-_MultipleRestriction_enum = Core.Name "enum"
-
-newtype SchemaReference =
-  SchemaReference {
-    unSchemaReference :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaReference = Core.Name "hydra.json.schema.SchemaReference"
diff --git a/src/main/haskell/Hydra/Json/Schema/Coder.hs b/src/main/haskell/Hydra/Json/Schema/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Schema/Coder.hs
+++ /dev/null
@@ -1,63 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | JSON Schema code generator: converts Hydra modules to JSON Schema documents
-
-module Hydra.Json.Schema.Coder where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Json.Schema as Schema
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Construct JSON Schema documents from type definitions
-constructModule :: t0 -> t1 -> t2 -> t3 -> t4 -> t5
-constructModule cx g opts mod typeDefs = constructModule cx g opts mod typeDefs
-
--- | Encode a field type as a JSON Schema keyword-schema pair
-encodeField :: t0 -> t1 -> Core.FieldType -> Either t2 (Schema.Keyword, Schema.Schema)
-encodeField cx g ft =
-
-      let name = Core.fieldTypeName ft
-          typ = Core.fieldTypeType ft
-      in (Eithers.map (\res -> (Schema.Keyword (Core.unName name), (Schema.Schema res))) (encodeType cx g False typ))
-
--- | Encode a Hydra name as a safe identifier string, replacing non-alphanumeric characters with underscores
-encodeName :: Core.Name -> String
-encodeName name = Formatting.nonAlnumToUnderscores (Core.unName name)
-
--- | Encode a named type as a list of JSON Schema restrictions with a title
-encodeNamedType :: t0 -> t1 -> Core.Name -> Core.Type -> Either t2 [Schema.Restriction]
-encodeNamedType cx g name typ =
-    Eithers.map (\res -> Lists.concat [
-      [
-        Schema.RestrictionTitle (Core.unName name)],
-      res]) (encodeType cx g False (Strip.deannotateType typ))
-
--- | Encode a Hydra type as a list of JSON Schema restrictions
-encodeType :: t0 -> t1 -> t2 -> t3 -> t4
-encodeType cx g optional typ = encodeType cx g optional typ
-
--- | Determine whether a field is required (i.e., not optional/Maybe)
-isRequiredField :: Core.FieldType -> Bool
-isRequiredField ft =
-
-      let typ = Core.fieldTypeType ft
-      in case (Strip.deannotateType typ) of
-        Core.TypeMaybe _ -> False
-        _ -> True
-
--- | Convert a Hydra module to a map of JSON Schema documents
-moduleToJsonSchema :: t0 -> t1 -> t2 -> t3 -> t4 -> t5
-moduleToJsonSchema opts mod defs cx g = moduleToJsonSchema opts mod defs cx g
-
--- | Create a JSON Schema reference restriction for a named type
-referenceRestriction :: Core.Name -> Schema.Restriction
-referenceRestriction name =
-    Schema.RestrictionReference (Schema.SchemaReference (Strings.cat [
-      "#/$defs/",
-      (encodeName name)]))
diff --git a/src/main/haskell/Hydra/Json/Schema/Language.hs b/src/main/haskell/Hydra/Json/Schema/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Schema/Language.hs
+++ /dev/null
@@ -1,57 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for JSON Schema
-
-module Hydra.Json.Schema.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Reflect as Reflect
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Language constraints for JSON Schema
-jsonSchemaLanguage :: Coders.Language
-jsonSchemaLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.json.schema"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes = Sets.fromList [
-      Core.FloatTypeBigfloat]
-    functionVariants = Sets.empty
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeBigint]
-    termVariants = Sets.fromList Reflect.termVariants
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
diff --git a/src/main/haskell/Hydra/Json/Schema/Serde.hs b/src/main/haskell/Hydra/Json/Schema/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Schema/Serde.hs
+++ /dev/null
@@ -1,318 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting JSON Schema documents to JSON values
-
-module Hydra.Json.Schema.Serde where
-
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Json.Schema as Schema
-import qualified Hydra.Json.Writer as Writer
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
--- | Encode additional items as a JSON value
-encodeAdditionalItems :: Schema.AdditionalItems -> Model.Value
-encodeAdditionalItems ai =
-    case ai of
-      Schema.AdditionalItemsAny v0 -> Model.ValueBoolean v0
-      Schema.AdditionalItemsSchema v0 -> encodeSchema v0
-
--- | Encode an array restriction as a key-value pair
-encodeArrayRestriction :: Schema.ArrayRestriction -> (String, Model.Value)
-encodeArrayRestriction r =
-    case r of
-      Schema.ArrayRestrictionItems v0 -> encodeItems v0
-      Schema.ArrayRestrictionAdditionalItems v0 -> (key_additionalItems, (encodeAdditionalItems v0))
-      Schema.ArrayRestrictionMinItems v0 -> (key_minItems, (encodeInteger v0))
-      Schema.ArrayRestrictionMaxItems v0 -> (key_maxItems, (encodeInteger v0))
-      Schema.ArrayRestrictionUniqueItems v0 -> (key_uniqueItems, (Model.ValueBoolean v0))
-
--- | Encode an integer as a JSON number value
-encodeInteger :: Int -> Model.Value
-encodeInteger n = Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint n))
-
--- | Encode items as a key-value pair
-encodeItems :: Schema.Items -> (String, Model.Value)
-encodeItems items =
-    (key_items, case items of
-      Schema.ItemsSameItems v0 -> encodeSchema v0
-      Schema.ItemsVarItems v0 -> Model.ValueArray (Lists.map encodeSchema v0))
-
--- | Encode a keyword as a JSON string value
-encodeKeyword :: Schema.Keyword -> Model.Value
-encodeKeyword k = Model.ValueString (Schema.unKeyword k)
-
--- | Encode a keyword-schema-or-array pair as a key-value pair
-encodeKeywordSchemaOrArray :: (Schema.Keyword, Schema.SchemaOrArray) -> (String, Model.Value)
-encodeKeywordSchemaOrArray p =
-
-      let k = Pairs.first p
-          s = Pairs.second p
-      in (Schema.unKeyword k, (encodeSchemaOrArray s))
-
--- | Encode a multiple restriction as a key-value pair
-encodeMultipleRestriction :: Schema.MultipleRestriction -> (String, Model.Value)
-encodeMultipleRestriction r =
-    case r of
-      Schema.MultipleRestrictionAllOf v0 -> (key_allOf, (Model.ValueArray (Lists.map encodeSchema v0)))
-      Schema.MultipleRestrictionAnyOf v0 -> (key_anyOf, (Model.ValueArray (Lists.map encodeSchema v0)))
-      Schema.MultipleRestrictionOneOf v0 -> (key_oneOf, (Model.ValueArray (Lists.map encodeSchema v0)))
-      Schema.MultipleRestrictionNot v0 -> (key_not, (encodeSchema v0))
-      Schema.MultipleRestrictionEnum v0 -> (key_enum, (Model.ValueArray v0))
-
--- | Encode a numeric restriction as a list of key-value pairs
-encodeNumericRestriction :: Schema.NumericRestriction -> [(String, Model.Value)]
-encodeNumericRestriction r =
-    case r of
-      Schema.NumericRestrictionMinimum v0 ->
-        let value = Schema.limitValue v0
-            excl = Schema.limitExclusive v0
-        in (Lists.concat [
-          [
-            (key_minimum, (encodeInteger value))],
-          (Logic.ifElse excl [
-            (key_exclusiveMinimum, (Model.ValueBoolean True))] [])])
-      Schema.NumericRestrictionMaximum v0 ->
-        let value = Schema.limitValue v0
-            excl = Schema.limitExclusive v0
-        in (Lists.concat [
-          [
-            (key_maximum, (encodeInteger value))],
-          (Logic.ifElse excl [
-            (key_exclusiveMaximum, (Model.ValueBoolean True))] [])])
-      Schema.NumericRestrictionMultipleOf v0 -> [
-        (key_multipleOf, (encodeInteger v0))]
-
--- | Encode an object restriction as a key-value pair
-encodeObjectRestriction :: Schema.ObjectRestriction -> (String, Model.Value)
-encodeObjectRestriction r =
-    case r of
-      Schema.ObjectRestrictionProperties v0 -> (key_properties, (Model.ValueObject (Maps.fromList (Lists.map encodeProperty (Maps.toList v0)))))
-      Schema.ObjectRestrictionAdditionalProperties v0 -> (key_additionalProperties, (encodeAdditionalItems v0))
-      Schema.ObjectRestrictionRequired v0 -> (key_required, (Model.ValueArray (Lists.map encodeKeyword v0)))
-      Schema.ObjectRestrictionMinProperties v0 -> (key_minProperties, (encodeInteger v0))
-      Schema.ObjectRestrictionMaxProperties v0 -> (key_maxProperties, (encodeInteger v0))
-      Schema.ObjectRestrictionDependencies v0 -> (key_dependencies, (Model.ValueObject (Maps.fromList (Lists.map encodeKeywordSchemaOrArray (Maps.toList v0)))))
-      Schema.ObjectRestrictionPatternProperties v0 -> (key_patternProperties, (Model.ValueObject (Maps.fromList (Lists.map encodePatternProperty (Maps.toList v0)))))
-
--- | Encode a pattern property pair as a key-value pair
-encodePatternProperty :: (Schema.RegularExpression, Schema.Schema) -> (String, Model.Value)
-encodePatternProperty p =
-
-      let pat = Pairs.first p
-          s = Pairs.second p
-      in (Schema.unRegularExpression pat, (encodeSchema s))
-
--- | Encode a property pair as a key-value pair
-encodeProperty :: (Schema.Keyword, Schema.Schema) -> (String, Model.Value)
-encodeProperty p =
-
-      let k = Pairs.first p
-          s = Pairs.second p
-      in (Schema.unKeyword k, (encodeSchema s))
-
--- | Encode a restriction as a list of key-value pairs
-encodeRestriction :: Schema.Restriction -> [(String, Model.Value)]
-encodeRestriction r =
-    case r of
-      Schema.RestrictionType v0 -> [
-        (key_type, (encodeType v0))]
-      Schema.RestrictionString v0 -> [
-        encodeStringRestriction v0]
-      Schema.RestrictionNumber v0 -> encodeNumericRestriction v0
-      Schema.RestrictionArray v0 -> [
-        encodeArrayRestriction v0]
-      Schema.RestrictionObject v0 -> [
-        encodeObjectRestriction v0]
-      Schema.RestrictionMultiple v0 -> [
-        encodeMultipleRestriction v0]
-      Schema.RestrictionReference v0 -> [
-        (key_ref, (encodeSchemaReference v0))]
-      Schema.RestrictionTitle v0 -> [
-        (key_title, (Model.ValueString v0))]
-      Schema.RestrictionDescription v0 -> [
-        (key_description, (Model.ValueString v0))]
-
--- | Encode a schema as a JSON object value
-encodeSchema :: Schema.Schema -> Model.Value
-encodeSchema s = Model.ValueObject (Maps.fromList (Lists.concat (Lists.map encodeRestriction (Schema.unSchema s))))
-
--- | Encode a schema or array as a JSON value
-encodeSchemaOrArray :: Schema.SchemaOrArray -> Model.Value
-encodeSchemaOrArray soa =
-    case soa of
-      Schema.SchemaOrArraySchema v0 -> encodeSchema v0
-      Schema.SchemaOrArrayArray v0 -> Model.ValueArray (Lists.map encodeKeyword v0)
-
--- | Encode a schema reference as a JSON string value
-encodeSchemaReference :: Schema.SchemaReference -> Model.Value
-encodeSchemaReference sr = Model.ValueString (Schema.unSchemaReference sr)
-
--- | Encode a string restriction as a key-value pair
-encodeStringRestriction :: Schema.StringRestriction -> (String, Model.Value)
-encodeStringRestriction r =
-    case r of
-      Schema.StringRestrictionMaxLength v0 -> (key_maxLength, (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0))))
-      Schema.StringRestrictionMinLength v0 -> (key_minLength, (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0))))
-      Schema.StringRestrictionPattern v0 -> (key_pattern, (Model.ValueString (Schema.unRegularExpression v0)))
-
--- | Encode a type as a JSON value
-encodeType :: Schema.Type -> Model.Value
-encodeType t =
-    case t of
-      Schema.TypeSingle v0 -> encodeTypeName v0
-      Schema.TypeMultiple v0 -> Model.ValueArray (Lists.map encodeTypeName v0)
-
--- | Encode a type name as a JSON string value
-encodeTypeName :: Schema.TypeName -> Model.Value
-encodeTypeName t =
-    case t of
-      Schema.TypeNameString -> Model.ValueString "string"
-      Schema.TypeNameInteger -> Model.ValueString "integer"
-      Schema.TypeNameNumber -> Model.ValueString "number"
-      Schema.TypeNameBoolean -> Model.ValueString "boolean"
-      Schema.TypeNameNull -> Model.ValueString "null"
-      Schema.TypeNameArray -> Model.ValueString "array"
-      Schema.TypeNameObject -> Model.ValueString "object"
-
--- | Extract the map from a JSON object value
-fromObject :: Model.Value -> M.Map String Model.Value
-fromObject v =
-    case v of
-      Model.ValueObject v0 -> v0
-
--- | Convert a JSON Schema document to a JSON value
-jsonSchemaDocumentToJsonValue :: Schema.Document -> Model.Value
-jsonSchemaDocumentToJsonValue doc =
-
-      let mid = Schema.documentId doc
-          mdefs = Schema.documentDefinitions doc
-          root = Schema.documentRoot doc
-          schemaMap = fromObject (encodeSchema root)
-          restMap =
-                  fromObject (toObject [
-                    (key_id, (Maybes.map (\i -> Model.ValueString i) mid)),
-                    (key_schema, (Maybes.pure (Model.ValueString "http://json-schema.org/2020-12/schema"))),
-                    (key_definitions, (Maybes.map (\mp -> Model.ValueObject (Maps.fromList (Lists.map (\p ->
-                      let k = Pairs.first p
-                          schema = Pairs.second p
-                      in (Schema.unKeyword k, (encodeSchema schema))) (Maps.toList mp)))) mdefs))])
-      in (Model.ValueObject (Maps.union schemaMap restMap))
-
--- | Convert a JSON Schema document to a JSON string
-jsonSchemaDocumentToString :: Schema.Document -> String
-jsonSchemaDocumentToString doc = Writer.printJson (jsonSchemaDocumentToJsonValue doc)
-
-key_additionalItems :: String
-key_additionalItems = "additionalItems"
-
-key_additionalProperties :: String
-key_additionalProperties = "additionalProperties"
-
-key_allOf :: String
-key_allOf = "allOf"
-
-key_anyOf :: String
-key_anyOf = "anyOf"
-
-key_definitions :: String
-key_definitions = "$defs"
-
-key_dependencies :: String
-key_dependencies = "dependencies"
-
-key_description :: String
-key_description = "description"
-
-key_enum :: String
-key_enum = "enum"
-
-key_exclusiveMaximum :: String
-key_exclusiveMaximum = "exclusiveMaximum"
-
-key_exclusiveMinimum :: String
-key_exclusiveMinimum = "exclusiveMinimum"
-
-key_id :: String
-key_id = "$id"
-
-key_items :: String
-key_items = "items"
-
-key_label :: String
-key_label = "label"
-
-key_maxItems :: String
-key_maxItems = "maxItems"
-
-key_maxLength :: String
-key_maxLength = "maxLength"
-
-key_maxProperties :: String
-key_maxProperties = "maxProperties"
-
-key_maximum :: String
-key_maximum = "maximum"
-
-key_minItems :: String
-key_minItems = "minItems"
-
-key_minLength :: String
-key_minLength = "minLength"
-
-key_minProperties :: String
-key_minProperties = "minProperties"
-
-key_minimum :: String
-key_minimum = "minimum"
-
-key_multipleOf :: String
-key_multipleOf = "multipleOf"
-
-key_not :: String
-key_not = "not"
-
-key_oneOf :: String
-key_oneOf = "oneOf"
-
-key_pattern :: String
-key_pattern = "pattern"
-
-key_patternProperties :: String
-key_patternProperties = "patternProperties"
-
-key_properties :: String
-key_properties = "properties"
-
-key_ref :: String
-key_ref = "$ref"
-
-key_required :: String
-key_required = "required"
-
-key_schema :: String
-key_schema = "$schema"
-
-key_title :: String
-key_title = "title"
-
-key_type :: String
-key_type = "type"
-
-key_uniqueItems :: String
-key_uniqueItems = "uniqueItems"
-
--- | Construct a JSON object from a list of optional key-value pairs, filtering out Nothing values
-toObject :: [(String, (Maybe Model.Value))] -> Model.Value
-toObject pairs =
-    Model.ValueObject (Maps.fromList (Maybes.cat (Lists.map (\p ->
-      let k = Pairs.first p
-          mv = Pairs.second p
-      in (Maybes.map (\v -> (k, v)) mv)) pairs)))
diff --git a/src/main/haskell/Hydra/Json/Writer.hs b/src/main/haskell/Hydra/Json/Writer.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Writer.hs
+++ /dev/null
@@ -1,71 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | JSON serialization functions using the Hydra AST
-
-module Hydra.Json.Writer where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The colon operator used to separate keys and values in JSON objects
-colonOp :: Ast.Op
-colonOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol ":"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsSpace},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone}
--- | Encode a byte (0..255) as a two-character lowercase hex string. Non-byte inputs yield placeholder '?' characters.
-hexByte :: Int -> String
-hexByte c =
-
-      let nibble =
-              \i -> Maybes.fromMaybe "?" (Maybes.map (\ch -> Strings.fromList (Lists.pure ch)) (Strings.maybeCharAt i "0123456789abcdef"))
-          hi = nibble (Maybes.fromMaybe 0 (Math.maybeDiv c 16))
-          lo = nibble (Maybes.fromMaybe 0 (Math.maybeMod c 16))
-      in (Strings.cat2 hi lo)
--- | Escape and quote a string for JSON output
-jsonString :: String -> String
-jsonString s =
-
-      let hexEscape = \c -> Strings.cat2 "\\u00" (hexByte c)
-          escape =
-                  \c -> Logic.ifElse (Equality.equal c 34) "\\\"" (Logic.ifElse (Equality.equal c 92) "\\\\" (Logic.ifElse (Equality.equal c 8) "\\b" (Logic.ifElse (Equality.equal c 12) "\\f" (Logic.ifElse (Equality.equal c 10) "\\n" (Logic.ifElse (Equality.equal c 13) "\\r" (Logic.ifElse (Equality.equal c 9) "\\t" (Logic.ifElse (Equality.lt c 32) (hexEscape c) (Strings.fromList (Lists.pure c)))))))))
-          escaped = Strings.cat (Lists.map escape (Strings.toList s))
-      in (Strings.cat2 (Strings.cat2 "\"" escaped) "\"")
--- | Convert a key-value pair to an AST expression
-keyValueToExpr :: (String, Model.Value) -> Ast.Expr
-keyValueToExpr pair =
-
-      let key = Pairs.first pair
-          value = Pairs.second pair
-      in (Serialization.ifx colonOp (Serialization.cst (jsonString key)) (valueToExpr value))
--- | Serialize a JSON value to a string
-printJson :: Model.Value -> String
-printJson value = Serialization.printExpr (valueToExpr value)
--- | Convert a JSON value to an AST expression for serialization
-valueToExpr :: Model.Value -> Ast.Expr
-valueToExpr value =
-    case value of
-      Model.ValueArray v0 -> Serialization.bracketListAdaptive (Lists.map valueToExpr v0)
-      Model.ValueBoolean v0 -> Serialization.cst (Logic.ifElse v0 "true" "false")
-      Model.ValueNull -> Serialization.cst "null"
-      Model.ValueNumber v0 ->
-        let rounded = Literals.decimalToBigint v0
-            shown = Literals.showDecimal v0
-            isWhole = Equality.equal v0 (Literals.bigintToDecimal rounded)
-            plain = Literals.showBigint rounded
-        in (Serialization.cst (Logic.ifElse (Logic.and isWhole (Equality.lte (Strings.length plain) (Strings.length shown))) plain shown))
-      Model.ValueObject v0 -> Serialization.bracesListAdaptive (Lists.map keyValueToExpr (Maps.toList v0))
-      Model.ValueString v0 -> Serialization.cst (jsonString v0)
diff --git a/src/main/haskell/Hydra/Json/Yaml/Decode.hs b/src/main/haskell/Hydra/Json/Yaml/Decode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Yaml/Decode.hs
+++ /dev/null
@@ -1,51 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | YAML-to-JSON decoding. Converts YAML Nodes to JSON Values (may fail for non-JSON YAML), and YAML Nodes to Hydra Terms via JSON.
-
-module Hydra.Json.Yaml.Decode where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Decode as Decode
-import qualified Hydra.Json.Model as JsonModel
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Yaml.Model as YamlModel
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Decode a YAML node to a Hydra term via JSON decoding.
-fromYaml :: M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> YamlModel.Node -> Either String Core.Term
-fromYaml types tname typ node =
-
-      let jsonResult = yamlToJson node
-      in (Eithers.either (\err -> Left err) (\json -> Decode.fromJson types tname typ json) jsonResult)
--- | Convert a YAML node to a JSON value. Fails for non-JSON YAML features (e.g. non-string mapping keys).
-yamlToJson :: YamlModel.Node -> Either String JsonModel.Value
-yamlToJson node =
-    case node of
-      YamlModel.NodeMapping v0 ->
-        let convertEntry =
-                \kv ->
-                  let keyNode = Pairs.first kv
-                      valNode = Pairs.second kv
-                      keyResult =
-                              case keyNode of
-                                YamlModel.NodeScalar v1 -> case v1 of
-                                  YamlModel.ScalarStr v2 -> Right v2
-                                  _ -> Left "non-string YAML mapping key"
-                                _ -> Left "non-scalar YAML mapping key"
-                  in (Eithers.either (\err -> Left err) (\key ->
-                    let valResult = yamlToJson valNode
-                    in (Eithers.map (\v -> (key, v)) valResult)) keyResult)
-            entries = Eithers.mapList convertEntry (Maps.toList v0)
-        in (Eithers.map (\es -> JsonModel.ValueObject (Maps.fromList es)) entries)
-      YamlModel.NodeScalar v0 -> case v0 of
-        YamlModel.ScalarBool v1 -> Right (JsonModel.ValueBoolean v1)
-        YamlModel.ScalarDecimal v1 -> Right (JsonModel.ValueNumber v1)
-        YamlModel.ScalarFloat v1 -> Right (JsonModel.ValueNumber (Literals.float64ToDecimal (Literals.bigfloatToFloat64 v1)))
-        YamlModel.ScalarInt v1 -> Right (JsonModel.ValueNumber (Literals.bigintToDecimal v1))
-        YamlModel.ScalarNull -> Right JsonModel.ValueNull
-        YamlModel.ScalarStr v1 -> Right (JsonModel.ValueString v1)
-      YamlModel.NodeSequence v0 ->
-        let results = Eithers.mapList (\n -> yamlToJson n) v0
-        in (Eithers.map (\vs -> JsonModel.ValueArray vs) results)
diff --git a/src/main/haskell/Hydra/Json/Yaml/Encode.hs b/src/main/haskell/Hydra/Json/Yaml/Encode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Json/Yaml/Encode.hs
+++ /dev/null
@@ -1,28 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | JSON-to-YAML encoding. Converts JSON Values to YAML Nodes (always succeeds), and Hydra Terms to YAML Nodes via JSON.
-
-module Hydra.Json.Yaml.Encode where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Encode as Encode
-import qualified Hydra.Json.Model as JsonModel
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Yaml.Model as YamlModel
-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 JSON value to a YAML node. Always succeeds since YAML is a superset of JSON.
-jsonToYaml :: JsonModel.Value -> YamlModel.Node
-jsonToYaml value =
-    case value of
-      JsonModel.ValueArray v0 -> YamlModel.NodeSequence (Lists.map (\v -> jsonToYaml v) v0)
-      JsonModel.ValueBoolean v0 -> YamlModel.NodeScalar (YamlModel.ScalarBool v0)
-      JsonModel.ValueNull -> YamlModel.NodeScalar YamlModel.ScalarNull
-      JsonModel.ValueNumber v0 -> YamlModel.NodeScalar (YamlModel.ScalarDecimal v0)
-      JsonModel.ValueObject v0 -> YamlModel.NodeMapping (Maps.fromList (Lists.map (\kv -> (YamlModel.NodeScalar (YamlModel.ScalarStr (Pairs.first kv)), (jsonToYaml (Pairs.second kv)))) (Maps.toList v0)))
-      JsonModel.ValueString v0 -> YamlModel.NodeScalar (YamlModel.ScalarStr v0)
--- | Encode a Hydra term to a YAML node via JSON encoding.
-toYaml :: M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> Core.Term -> Either String YamlModel.Node
-toYaml types tname typ term = Eithers.map (\v -> jsonToYaml v) (Encode.toJson types tname typ term)
diff --git a/src/main/haskell/Hydra/Kernel.hs b/src/main/haskell/Hydra/Kernel.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Kernel.hs
+++ /dev/null
@@ -1,116 +0,0 @@
--- | A proxy for the Hydra kernel, i.e. the code which must be present in every Hydra implementation.
-{-
-Note: the following modules are part of the kernel, but they are not default imports because of name collisions:
-- Hydra.Ast
-- Hydra.Decode.Core
-- Hydra.Encode.Core
-- Hydra.Extract.Core
-- Hydra.Extract.Util
-- Hydra.Show.Variants
-- Hydra.Codegen
-- Hydra.Json.Parser
-- Hydra.Json.Writer
-- Hydra.Parsers
-- Hydra.Show.Core
-- Hydra.Topology
--}
-
-module Hydra.Kernel (
-  module Hydra.Paths,
-  module Hydra.Adapt,
-  module Hydra.Analysis,
-  module Hydra.Annotations,
-  module Hydra.Arity,
-  module Hydra.Checking,
-  module Hydra.Classes,
-  module Hydra.Coders,
-  module Hydra.Constants,
-  module Hydra.Context,
-  module Hydra.Core,
-  module Hydra.Dependencies,
-  module Hydra.Environment,
-  module Hydra.Error.Checking,
-  module Hydra.Error.Core,
-  module Hydra.Errors,
-  module Hydra.Languages,
-  module Hydra.Formatting,
-  module Hydra.Graph,
-  module Hydra.Inference,
-  module Hydra.Lexical,
-  module Hydra.Literals,
-  module Hydra.Packaging,
-  module Hydra.Module.Compat,
-  module Hydra.Parsing,
-  module Hydra.Phantoms,
-  module Hydra.Names,
-  module Hydra.Predicates,
-  module Hydra.Query,
-  module Hydra.Reduction,
-  module Hydra.Reflect,
-  module Hydra.Relational,
-  module Hydra.Resolution,
-  module Hydra.Rewriting,
-  module Hydra.Scoping,
-  module Hydra.Serialization,
-  module Hydra.Strip,
-  module Hydra.Settings,
-  module Hydra.Sorting,
-  module Hydra.Substitution,
-  module Hydra.Tabular,
-  module Hydra.Templates,
-  module Hydra.Testing,
-  module Hydra.Typing,
-  module Hydra.Unification,
-  module Hydra.Util,
-  module Hydra.Variables,
-  module Hydra.Variants,
-) where
-
-import Hydra.Paths
-import Hydra.Adapt
-import Hydra.Analysis
-import Hydra.Annotations
-import Hydra.Arity
-import Hydra.Checking
-import Hydra.Classes
-import Hydra.Coders
-import Hydra.Constants
-import Hydra.Context
-import Hydra.Core
-import Hydra.Dependencies
-import Hydra.Environment
-import Hydra.Error.Checking
-import Hydra.Error.Core
-import Hydra.Errors
-import Hydra.Languages
-import Hydra.Formatting
-import Hydra.Graph
-import Hydra.Inference
-import Hydra.Lexical
-import Hydra.Literals
-import Hydra.Packaging
-import Hydra.Module.Compat
-import Hydra.Parsing
-import Hydra.Phantoms
-import Hydra.Names
-import Hydra.Predicates
-import Hydra.Query
-import Hydra.Reduction
-import Hydra.Reflect
-import Hydra.Relational
-import Hydra.Resolution
-import Hydra.Rewriting
-import Hydra.Scoping
-import Hydra.Serialization
-import Hydra.Settings
-import Hydra.Strip
-import Hydra.Sorting
-import Hydra.Substitution
-import Hydra.Tabular
-import Hydra.Templates
-import Hydra.Testing
-import Hydra.Typing
-import Hydra.Unification
-import Hydra.Util
-import Hydra.Variables
-import Hydra.Variants
diff --git a/src/main/haskell/Hydra/Kusto/Kql.hs b/src/main/haskell/Hydra/Kusto/Kql.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Kusto/Kql.hs
+++ /dev/null
@@ -1,696 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A partial KQL (Kusto Query Language) model, based on examples from the documentation. Not normative.
-
-module Hydra.Kusto.Kql 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 BetweenExpression =
-  BetweenExpression {
-    betweenExpressionNot :: Bool,
-    betweenExpressionExpression :: Expression,
-    betweenExpressionLowerBound :: Expression,
-    betweenExpressionUpperBound :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_BetweenExpression = Core.Name "hydra.kusto.kql.BetweenExpression"
-
-_BetweenExpression_not = Core.Name "not"
-
-_BetweenExpression_expression = Core.Name "expression"
-
-_BetweenExpression_lowerBound = Core.Name "lowerBound"
-
-_BetweenExpression_upperBound = Core.Name "upperBound"
-
-data BinaryExpression =
-  BinaryExpression {
-    binaryExpressionLeft :: Expression,
-    binaryExpressionOperator :: BinaryOperator,
-    binaryExpressionRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryExpression = Core.Name "hydra.kusto.kql.BinaryExpression"
-
-_BinaryExpression_left = Core.Name "left"
-
-_BinaryExpression_operator = Core.Name "operator"
-
-_BinaryExpression_right = Core.Name "right"
-
-data BinaryOperator =
-  BinaryOperatorCaseInsensitiveEqual  |
-  BinaryOperatorContains  |
-  BinaryOperatorDivide  |
-  BinaryOperatorEndsWith  |
-  BinaryOperatorEqual  |
-  BinaryOperatorGreater  |
-  BinaryOperatorGreaterOrEqual  |
-  BinaryOperatorHas  |
-  BinaryOperatorHasPrefix  |
-  BinaryOperatorHasSuffix  |
-  BinaryOperatorLess  |
-  BinaryOperatorLessOrEqual  |
-  BinaryOperatorMatchesRegex  |
-  BinaryOperatorMinus  |
-  BinaryOperatorNotEqual  |
-  BinaryOperatorPlus  |
-  BinaryOperatorStartsWith  |
-  BinaryOperatorTimes
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryOperator = Core.Name "hydra.kusto.kql.BinaryOperator"
-
-_BinaryOperator_caseInsensitiveEqual = Core.Name "caseInsensitiveEqual"
-
-_BinaryOperator_contains = Core.Name "contains"
-
-_BinaryOperator_divide = Core.Name "divide"
-
-_BinaryOperator_endsWith = Core.Name "endsWith"
-
-_BinaryOperator_equal = Core.Name "equal"
-
-_BinaryOperator_greater = Core.Name "greater"
-
-_BinaryOperator_greaterOrEqual = Core.Name "greaterOrEqual"
-
-_BinaryOperator_has = Core.Name "has"
-
-_BinaryOperator_hasPrefix = Core.Name "hasPrefix"
-
-_BinaryOperator_hasSuffix = Core.Name "hasSuffix"
-
-_BinaryOperator_less = Core.Name "less"
-
-_BinaryOperator_lessOrEqual = Core.Name "lessOrEqual"
-
-_BinaryOperator_matchesRegex = Core.Name "matchesRegex"
-
-_BinaryOperator_minus = Core.Name "minus"
-
-_BinaryOperator_notEqual = Core.Name "notEqual"
-
-_BinaryOperator_plus = Core.Name "plus"
-
-_BinaryOperator_startsWith = Core.Name "startsWith"
-
-_BinaryOperator_times = Core.Name "times"
-
-data BuiltInFunction =
-  BuiltInFunctionAgo  |
-  BuiltInFunctionBin  |
-  BuiltInFunctionCount  |
-  BuiltInFunctionDcount  |
-  BuiltInFunctionEndofday  |
-  BuiltInFunctionExtract  |
-  BuiltInFunctionFormat_datetime  |
-  BuiltInFunctionMaterialize  |
-  BuiltInFunctionNow  |
-  BuiltInFunctionRange  |
-  BuiltInFunctionStartofday  |
-  BuiltInFunctionStrcat  |
-  BuiltInFunctionTodynamic
-  deriving (Eq, Ord, Read, Show)
-
-_BuiltInFunction = Core.Name "hydra.kusto.kql.BuiltInFunction"
-
-_BuiltInFunction_ago = Core.Name "ago"
-
-_BuiltInFunction_bin = Core.Name "bin"
-
-_BuiltInFunction_count = Core.Name "count"
-
-_BuiltInFunction_dcount = Core.Name "dcount"
-
-_BuiltInFunction_endofday = Core.Name "endofday"
-
-_BuiltInFunction_extract = Core.Name "extract"
-
-_BuiltInFunction_format_datetime = Core.Name "format_datetime"
-
-_BuiltInFunction_materialize = Core.Name "materialize"
-
-_BuiltInFunction_now = Core.Name "now"
-
-_BuiltInFunction_range = Core.Name "range"
-
-_BuiltInFunction_startofday = Core.Name "startofday"
-
-_BuiltInFunction_strcat = Core.Name "strcat"
-
-_BuiltInFunction_todynamic = Core.Name "todynamic"
-
-data ColumnAlias =
-  ColumnAlias {
-    columnAliasColumn :: ColumnName,
-    columnAliasAlias :: ColumnName}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnAlias = Core.Name "hydra.kusto.kql.ColumnAlias"
-
-_ColumnAlias_column = Core.Name "column"
-
-_ColumnAlias_alias = Core.Name "alias"
-
-data ColumnAssignment =
-  ColumnAssignment {
-    columnAssignmentColumn :: ColumnName,
-    columnAssignmentExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnAssignment = Core.Name "hydra.kusto.kql.ColumnAssignment"
-
-_ColumnAssignment_column = Core.Name "column"
-
-_ColumnAssignment_expression = Core.Name "expression"
-
-newtype ColumnName =
-  ColumnName {
-    unColumnName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnName = Core.Name "hydra.kusto.kql.ColumnName"
-
-data Columns =
-  ColumnsAll  |
-  ColumnsSingle ColumnName
-  deriving (Eq, Ord, Read, Show)
-
-_Columns = Core.Name "hydra.kusto.kql.Columns"
-
-_Columns_all = Core.Name "all"
-
-_Columns_single = Core.Name "single"
-
-data Command =
-  CommandCount  |
-  -- | See https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/distinct-operator
-  CommandDistinct [ColumnName] |
-  CommandExtend [ColumnAssignment] |
-  CommandJoin JoinCommand |
-  CommandLimit Int |
-  CommandMvexpand ColumnName |
-  CommandOrderBy [SortBy] |
-  CommandParse ParseCommand |
-  CommandPrint PrintCommand |
-  CommandProject [Projection] |
-  CommandProjectAway [ColumnName] |
-  CommandProjectRename [ColumnAlias] |
-  CommandRender String |
-  CommandSearch SearchCommand |
-  CommandSortBy [SortBy] |
-  CommandSummarize SummarizeCommand |
-  -- | Limit a search to a specified number of results
-  CommandTake Int |
-  CommandTop TopCommand |
-  CommandUnion UnionCommand |
-  CommandWhere Expression
-  deriving (Eq, Ord, Read, Show)
-
-_Command = Core.Name "hydra.kusto.kql.Command"
-
-_Command_count = Core.Name "count"
-
-_Command_distinct = Core.Name "distinct"
-
-_Command_extend = Core.Name "extend"
-
-_Command_join = Core.Name "join"
-
-_Command_limit = Core.Name "limit"
-
-_Command_mvexpand = Core.Name "mvexpand"
-
-_Command_orderBy = Core.Name "orderBy"
-
-_Command_parse = Core.Name "parse"
-
-_Command_print = Core.Name "print"
-
-_Command_project = Core.Name "project"
-
-_Command_projectAway = Core.Name "projectAway"
-
-_Command_projectRename = Core.Name "projectRename"
-
-_Command_render = Core.Name "render"
-
-_Command_search = Core.Name "search"
-
-_Command_sortBy = Core.Name "sortBy"
-
-_Command_summarize = Core.Name "summarize"
-
-_Command_take = Core.Name "take"
-
-_Command_top = Core.Name "top"
-
-_Command_union = Core.Name "union"
-
-_Command_where = Core.Name "where"
-
-newtype Datetime =
-  Datetime {
-    unDatetime :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Datetime = Core.Name "hydra.kusto.kql.Datetime"
-
-data Duration =
-  Duration {
-    durationValue :: Int,
-    durationUnit :: DurationUnit}
-  deriving (Eq, Ord, Read, Show)
-
-_Duration = Core.Name "hydra.kusto.kql.Duration"
-
-_Duration_value = Core.Name "value"
-
-_Duration_unit = Core.Name "unit"
-
-data DurationUnit =
-  DurationUnitSecond  |
-  DurationUnitMinute  |
-  DurationUnitHour
-  deriving (Eq, Ord, Read, Show)
-
-_DurationUnit = Core.Name "hydra.kusto.kql.DurationUnit"
-
-_DurationUnit_second = Core.Name "second"
-
-_DurationUnit_minute = Core.Name "minute"
-
-_DurationUnit_hour = Core.Name "hour"
-
-data Expression =
-  ExpressionAnd [Expression] |
-  ExpressionAny  |
-  ExpressionBetween BetweenExpression |
-  ExpressionBinary BinaryExpression |
-  ExpressionBraces Expression |
-  ExpressionColumn ColumnName |
-  ExpressionDataset TableName |
-  ExpressionIndex IndexExpression |
-  ExpressionList [Expression] |
-  ExpressionLiteral Literal |
-  ExpressionOr [Expression] |
-  ExpressionParentheses Expression |
-  ExpressionProperty PropertyExpression |
-  ExpressionUnary UnaryExpression
-  deriving (Eq, Ord, Read, Show)
-
-_Expression = Core.Name "hydra.kusto.kql.Expression"
-
-_Expression_and = Core.Name "and"
-
-_Expression_any = Core.Name "any"
-
-_Expression_between = Core.Name "between"
-
-_Expression_binary = Core.Name "binary"
-
-_Expression_braces = Core.Name "braces"
-
-_Expression_column = Core.Name "column"
-
-_Expression_dataset = Core.Name "dataset"
-
-_Expression_index = Core.Name "index"
-
-_Expression_list = Core.Name "list"
-
-_Expression_literal = Core.Name "literal"
-
-_Expression_or = Core.Name "or"
-
-_Expression_parentheses = Core.Name "parentheses"
-
-_Expression_property = Core.Name "property"
-
-_Expression_unary = Core.Name "unary"
-
-data Function =
-  FunctionBuiltIn BuiltInFunction |
-  FunctionCustom FunctionName
-  deriving (Eq, Ord, Read, Show)
-
-_Function = Core.Name "hydra.kusto.kql.Function"
-
-_Function_builtIn = Core.Name "builtIn"
-
-_Function_custom = Core.Name "custom"
-
-data FunctionExpression =
-  FunctionExpression {
-    functionExpressionFunction :: Function,
-    functionExpressionArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionExpression = Core.Name "hydra.kusto.kql.FunctionExpression"
-
-_FunctionExpression_function = Core.Name "function"
-
-_FunctionExpression_arguments = Core.Name "arguments"
-
-newtype FunctionName =
-  FunctionName {
-    unFunctionName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionName = Core.Name "hydra.kusto.kql.FunctionName"
-
-data IndexExpression =
-  IndexExpression {
-    indexExpressionExpression :: Expression,
-    indexExpressionIndex :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IndexExpression = Core.Name "hydra.kusto.kql.IndexExpression"
-
-_IndexExpression_expression = Core.Name "expression"
-
-_IndexExpression_index = Core.Name "index"
-
-data JoinCommand =
-  JoinCommand {
-    joinCommandKind :: JoinKind,
-    joinCommandExpression :: TableName,
-    joinCommandOn :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_JoinCommand = Core.Name "hydra.kusto.kql.JoinCommand"
-
-_JoinCommand_kind = Core.Name "kind"
-
-_JoinCommand_expression = Core.Name "expression"
-
-_JoinCommand_on = Core.Name "on"
-
-data JoinKind =
-  JoinKindLeftouter  |
-  JoinKindLeftsemi  |
-  JoinKindLeftanti  |
-  JoinKindFullouter  |
-  JoinKindInner  |
-  JoinKindInnerunique  |
-  JoinKindRightouter  |
-  JoinKindRightsemi  |
-  JoinKindRightanti
-  deriving (Eq, Ord, Read, Show)
-
-_JoinKind = Core.Name "hydra.kusto.kql.JoinKind"
-
-_JoinKind_leftouter = Core.Name "leftouter"
-
-_JoinKind_leftsemi = Core.Name "leftsemi"
-
-_JoinKind_leftanti = Core.Name "leftanti"
-
-_JoinKind_fullouter = Core.Name "fullouter"
-
-_JoinKind_inner = Core.Name "inner"
-
-_JoinKind_innerunique = Core.Name "innerunique"
-
-_JoinKind_rightouter = Core.Name "rightouter"
-
-_JoinKind_rightsemi = Core.Name "rightsemi"
-
-_JoinKind_rightanti = Core.Name "rightanti"
-
-data KeyValuePair =
-  KeyValuePair {
-    keyValuePairKey :: String,
-    keyValuePairValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_KeyValuePair = Core.Name "hydra.kusto.kql.KeyValuePair"
-
-_KeyValuePair_key = Core.Name "key"
-
-_KeyValuePair_value = Core.Name "value"
-
-data LetBinding =
-  LetBinding {
-    letBindingName :: ColumnName,
-    letBindingExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_LetBinding = Core.Name "hydra.kusto.kql.LetBinding"
-
-_LetBinding_name = Core.Name "name"
-
-_LetBinding_expression = Core.Name "expression"
-
-data LetExpression =
-  LetExpression {
-    letExpressionBindings :: [LetBinding],
-    letExpressionExpression :: TabularExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_LetExpression = Core.Name "hydra.kusto.kql.LetExpression"
-
-_LetExpression_bindings = Core.Name "bindings"
-
-_LetExpression_expression = Core.Name "expression"
-
-data Literal =
-  LiteralDuration Duration |
-  LiteralDatetime Datetime |
-  LiteralString String |
-  LiteralInt Int |
-  LiteralLong I.Int64 |
-  LiteralDouble Double |
-  LiteralBoolean Bool
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.kusto.kql.Literal"
-
-_Literal_duration = Core.Name "duration"
-
-_Literal_datetime = Core.Name "datetime"
-
-_Literal_string = Core.Name "string"
-
-_Literal_int = Core.Name "int"
-
-_Literal_long = Core.Name "long"
-
-_Literal_double = Core.Name "double"
-
-_Literal_boolean = Core.Name "boolean"
-
-data Order =
-  OrderAscending  |
-  OrderDescending
-  deriving (Eq, Ord, Read, Show)
-
-_Order = Core.Name "hydra.kusto.kql.Order"
-
-_Order_ascending = Core.Name "ascending"
-
-_Order_descending = Core.Name "descending"
-
-data Parameter =
-  Parameter {
-    parameterKey :: String,
-    parameterValue :: Literal}
-  deriving (Eq, Ord, Read, Show)
-
-_Parameter = Core.Name "hydra.kusto.kql.Parameter"
-
-_Parameter_key = Core.Name "key"
-
-_Parameter_value = Core.Name "value"
-
-data ParseCommand =
-  ParseCommand {
-    parseCommandColumn :: ColumnName,
-    parseCommandPairs :: [KeyValuePair]}
-  deriving (Eq, Ord, Read, Show)
-
-_ParseCommand = Core.Name "hydra.kusto.kql.ParseCommand"
-
-_ParseCommand_column = Core.Name "column"
-
-_ParseCommand_pairs = Core.Name "pairs"
-
-newtype PipelineExpression =
-  PipelineExpression {
-    unPipelineExpression :: [TabularExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_PipelineExpression = Core.Name "hydra.kusto.kql.PipelineExpression"
-
-data PrintCommand =
-  PrintCommand {
-    printCommandColumn :: (Maybe ColumnName),
-    printCommandExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_PrintCommand = Core.Name "hydra.kusto.kql.PrintCommand"
-
-_PrintCommand_column = Core.Name "column"
-
-_PrintCommand_expression = Core.Name "expression"
-
-data Projection =
-  Projection {
-    projectionExpression :: Expression,
-    projectionAlias :: (Maybe ColumnName)}
-  deriving (Eq, Ord, Read, Show)
-
-_Projection = Core.Name "hydra.kusto.kql.Projection"
-
-_Projection_expression = Core.Name "expression"
-
-_Projection_alias = Core.Name "alias"
-
-data PropertyExpression =
-  PropertyExpression {
-    propertyExpressionExpression :: Expression,
-    propertyExpressionProperty :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyExpression = Core.Name "hydra.kusto.kql.PropertyExpression"
-
-_PropertyExpression_expression = Core.Name "expression"
-
-_PropertyExpression_property = Core.Name "property"
-
-newtype Query =
-  Query {
-    unQuery :: TabularExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_Query = Core.Name "hydra.kusto.kql.Query"
-
--- | Search across all datasets and columns or, if provided, specific datasets and/or columns
-data SearchCommand =
-  SearchCommand {
-    searchCommandDatasets :: [TableName],
-    searchCommandPattern :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_SearchCommand = Core.Name "hydra.kusto.kql.SearchCommand"
-
-_SearchCommand_datasets = Core.Name "datasets"
-
-_SearchCommand_pattern = Core.Name "pattern"
-
-data SummarizeCommand =
-  SummarizeCommand {
-    summarizeCommandColumns :: [ColumnAssignment],
-    summarizeCommandBy :: [ColumnName]}
-  deriving (Eq, Ord, Read, Show)
-
-_SummarizeCommand = Core.Name "hydra.kusto.kql.SummarizeCommand"
-
-_SummarizeCommand_columns = Core.Name "columns"
-
-_SummarizeCommand_by = Core.Name "by"
-
-newtype TableName =
-  TableName {
-    unTableName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_TableName = Core.Name "hydra.kusto.kql.TableName"
-
-data TopCommand =
-  TopCommand {
-    topCommandCount :: Int,
-    topCommandSort :: [SortBy]}
-  deriving (Eq, Ord, Read, Show)
-
-_TopCommand = Core.Name "hydra.kusto.kql.TopCommand"
-
-_TopCommand_count = Core.Name "count"
-
-_TopCommand_sort = Core.Name "sort"
-
-data SortBy =
-  SortBy {
-    sortByColumn :: ColumnName,
-    sortByOrder :: (Maybe Order)}
-  deriving (Eq, Ord, Read, Show)
-
-_SortBy = Core.Name "hydra.kusto.kql.SortBy"
-
-_SortBy_column = Core.Name "column"
-
-_SortBy_order = Core.Name "order"
-
-data TabularExpression =
-  TabularExpressionCommand Command |
-  TabularExpressionPipeline PipelineExpression |
-  TabularExpressionLet LetExpression |
-  TabularExpressionTable TableName
-  deriving (Eq, Ord, Read, Show)
-
-_TabularExpression = Core.Name "hydra.kusto.kql.TabularExpression"
-
-_TabularExpression_command = Core.Name "command"
-
-_TabularExpression_pipeline = Core.Name "pipeline"
-
-_TabularExpression_let = Core.Name "let"
-
-_TabularExpression_table = Core.Name "table"
-
-data UnaryExpression =
-  UnaryExpression {
-    unaryExpressionOperator :: UnaryOperator,
-    unaryExpressionExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryExpression = Core.Name "hydra.kusto.kql.UnaryExpression"
-
-_UnaryExpression_operator = Core.Name "operator"
-
-_UnaryExpression_expression = Core.Name "expression"
-
-data UnaryOperator =
-  UnaryOperatorNot
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOperator = Core.Name "hydra.kusto.kql.UnaryOperator"
-
-_UnaryOperator_not = Core.Name "not"
-
-data UnionCommand =
-  UnionCommand {
-    unionCommandParameters :: [Parameter],
-    unionCommandKind :: (Maybe UnionKind),
-    unionCommandWithSource :: (Maybe ColumnName),
-    unionCommandIsFuzzy :: (Maybe Bool),
-    unionCommandTables :: [TableName]}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionCommand = Core.Name "hydra.kusto.kql.UnionCommand"
-
-_UnionCommand_parameters = Core.Name "parameters"
-
-_UnionCommand_kind = Core.Name "kind"
-
-_UnionCommand_withSource = Core.Name "withSource"
-
-_UnionCommand_isFuzzy = Core.Name "isFuzzy"
-
-_UnionCommand_tables = Core.Name "tables"
-
-data UnionKind =
-  UnionKindInner  |
-  UnionKindOuter
-  deriving (Eq, Ord, Read, Show)
-
-_UnionKind = Core.Name "hydra.kusto.kql.UnionKind"
-
-_UnionKind_inner = Core.Name "inner"
-
-_UnionKind_outer = Core.Name "outer"
diff --git a/src/main/haskell/Hydra/Languages.hs b/src/main/haskell/Hydra/Languages.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Languages.hs
+++ /dev/null
@@ -1,35 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Language constraints for Hydra Core
-
-module Hydra.Languages where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Reflect as Reflect
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Language constraints for Hydra Core, i.e. no constraints.
-hydraLanguage :: Coders.Language
-hydraLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.core"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = types}}
-  where
-    eliminationVariants = Sets.fromList Reflect.eliminationVariants
-    literalVariants = Sets.fromList Reflect.literalVariants
-    floatTypes = Sets.fromList Reflect.floatTypes
-    functionVariants = Sets.fromList Reflect.functionVariants
-    integerTypes = Sets.fromList Reflect.integerTypes
-    termVariants = Sets.fromList Reflect.termVariants
-    typeVariants = Sets.fromList Reflect.typeVariants
-    types =
-        \t -> case t of
-          _ -> True
diff --git a/src/main/haskell/Hydra/Lexical.hs b/src/main/haskell/Hydra/Lexical.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lexical.hs
+++ /dev/null
@@ -1,241 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A module for lexical operations over graphs.
-
-module Hydra.Lexical where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-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
--- | Build a Graph from element bindings, environment, and primitives
-buildGraph :: [Core.Binding] -> M.Map Core.Name (Maybe Core.Term) -> M.Map Core.Name Graph.Primitive -> Graph.Graph
-buildGraph elements environment primitives =
-
-      let elementTerms = Maps.fromList (Lists.map (\b -> (Core.bindingName b, (Core.bindingTerm b))) elements)
-          letTerms =
-                  Maps.fromList (Maybes.mapMaybe (\kv -> Maybes.map (\t -> (Pairs.first kv, t)) (Pairs.second kv)) (Maps.toList environment))
-          mergedTerms = Maps.union elementTerms letTerms
-          filteredTerms = Maps.filterWithKey (\k -> \_v -> Logic.not (Maps.member k primitives)) mergedTerms
-          elementTypes =
-                  Maps.fromList (Maybes.cat (Lists.map (\b -> Maybes.map (\ts -> (Core.bindingName b, ts)) (Core.bindingTypeScheme b)) elements))
-          filteredTypes = Maps.filterWithKey (\k -> \_v -> Logic.not (Maps.member k primitives)) elementTypes
-      in Graph.Graph {
-        Graph.graphBoundTerms = filteredTerms,
-        Graph.graphBoundTypes = filteredTypes,
-        Graph.graphClassConstraints = Maps.empty,
-        Graph.graphLambdaVariables = (Sets.fromList (Maps.keys (Maps.filter (\mt -> Maybes.isNothing mt) environment))),
-        Graph.graphMetadata = Maps.empty,
-        Graph.graphPrimitives = primitives,
-        Graph.graphSchemaTypes = Maps.empty,
-        Graph.graphTypeVariables = Sets.empty}
-chooseUniqueName :: S.Set Core.Name -> Core.Name -> Core.Name
-chooseUniqueName reserved name =
-
-      let tryName =
-              \index ->
-                let candidate = Logic.ifElse (Equality.equal index 1) name (Core.Name (Strings.cat2 (Core.unName name) (Literals.showInt32 index)))
-                in (Logic.ifElse (Sets.member candidate reserved) (tryName (Math.add index 1)) candidate)
-      in (tryName 1)
--- | Resolve a schema type through a chain of zero or more typedefs
-dereferenceSchemaType :: Core.Name -> M.Map Core.Name Core.TypeScheme -> Maybe Core.TypeScheme
-dereferenceSchemaType name types =
-
-      let forType =
-              \t -> case t of
-                Core.TypeAnnotated v0 -> forType (Core.annotatedTypeBody v0)
-                Core.TypeForall v0 -> Maybes.map (\ts -> Core.TypeScheme {
-                  Core.typeSchemeVariables = (Lists.cons (Core.forallTypeParameter v0) (Core.typeSchemeVariables ts)),
-                  Core.typeSchemeBody = (Core.typeSchemeBody ts),
-                  Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts)}) (forType (Core.forallTypeBody v0))
-                Core.TypeVariable v0 -> dereferenceSchemaType v0 types
-                _ -> Just (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = t,
-                  Core.typeSchemeConstraints = Nothing})
-      in (Maybes.bind (Maps.lookup name types) (\ts -> Maybes.map (\ts2 -> Core.TypeScheme {
-        Core.typeSchemeVariables = (Lists.concat2 (Core.typeSchemeVariables ts) (Core.typeSchemeVariables ts2)),
-        Core.typeSchemeBody = (Core.typeSchemeBody ts2),
-        Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts2)}) (forType (Core.typeSchemeBody ts))))
--- | Look up a binding by name in a graph, returning Either an error or the binding
-dereferenceVariable :: Graph.Graph -> Core.Name -> Either Errors.Error Core.Binding
-dereferenceVariable graph name =
-    Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchBinding (Errors.NoSuchBindingError {
-      Errors.noSuchBindingErrorName = name})))) (\right_ -> Right right_) (lookupBinding graph name)
--- | Create a graph from a parent graph, schema types, and list of element bindings
-elementsToGraph :: Graph.Graph -> M.Map Core.Name Core.TypeScheme -> [Core.Binding] -> Graph.Graph
-elementsToGraph parent schemaTypes elements =
-
-      let prims = Graph.graphPrimitives parent
-          g = buildGraph elements Maps.empty prims
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-        Graph.graphBoundTypes = (Graph.graphBoundTypes g),
-        Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-        Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-        Graph.graphMetadata = (Graph.graphMetadata g),
-        Graph.graphPrimitives = (Graph.graphPrimitives g),
-        Graph.graphSchemaTypes = schemaTypes,
-        Graph.graphTypeVariables = (Graph.graphTypeVariables g)}
--- | An empty context; no trace, no messages, no other data.
-emptyContext :: Context.Context
-emptyContext =
-    Context.Context {
-      Context.contextTrace = [],
-      Context.contextMessages = [],
-      Context.contextOther = Maps.empty}
--- | An empty graph; no elements, no primitives, no schema.
-emptyGraph :: Graph.Graph
-emptyGraph =
-    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}
--- | Extract the fields of a record or union type
-fieldsOf :: Core.Type -> [Core.FieldType]
-fieldsOf t =
-
-      let stripped = Strip.deannotateType t
-      in case stripped of
-        Core.TypeForall v0 -> fieldsOf (Core.forallTypeBody v0)
-        Core.TypeRecord v0 -> v0
-        Core.TypeUnion v0 -> v0
-        _ -> []
-getField :: M.Map Core.Name t0 -> Core.Name -> (t0 -> Either Errors.Error t1) -> Either Errors.Error t1
-getField m fname decode =
-    Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-      Errors.noMatchingFieldErrorFieldName = fname})))) decode (Maps.lookup fname m)
--- | Reconstruct a list of Bindings from a Graph's boundTerms and boundTypes
-graphToBindings :: Graph.Graph -> [Core.Binding]
-graphToBindings g =
-    Lists.map (\p ->
-      let name = Pairs.first p
-          term = Pairs.second p
-      in Core.Binding {
-        Core.bindingName = name,
-        Core.bindingTerm = term,
-        Core.bindingTypeScheme = (Maps.lookup name (Graph.graphBoundTypes g))}) (Maps.toList (Graph.graphBoundTerms g))
--- | Build a graph with primitives assembled from built-in and user-provided lists. User-provided primitives shadow built-in ones.
-graphWithPrimitives :: [Graph.Primitive] -> [Graph.Primitive] -> Graph.Graph
-graphWithPrimitives builtIn userProvided =
-
-      let toMap = \ps -> Maps.fromList (Lists.map (\p -> (Graph.primitiveName p, p)) ps)
-          prims = Maps.union (toMap userProvided) (toMap builtIn)
-      in (buildGraph [] Maps.empty prims)
--- | Look up a binding in a graph by name
-lookupBinding :: Graph.Graph -> Core.Name -> Maybe Core.Binding
-lookupBinding graph name =
-    Maybes.map (\term -> Core.Binding {
-      Core.bindingName = name,
-      Core.bindingTerm = term,
-      Core.bindingTypeScheme = (Maps.lookup name (Graph.graphBoundTypes graph))}) (Maps.lookup name (Graph.graphBoundTerms graph))
--- | Look up a primitive function in a graph by name
-lookupPrimitive :: Graph.Graph -> Core.Name -> Maybe Graph.Primitive
-lookupPrimitive graph name = Maps.lookup name (Graph.graphPrimitives graph)
--- | Look up a term by name in a graph
-lookupTerm :: Graph.Graph -> Core.Name -> Maybe Core.Term
-lookupTerm graph name = Maps.lookup name (Graph.graphBoundTerms graph)
-matchEnum :: Graph.Graph -> Core.Name -> [(Core.Name, t0)] -> Core.Term -> Either Errors.Error t0
-matchEnum graph tname pairs =
-    matchUnion graph tname (Lists.map (\pair -> matchUnitField (Pairs.first pair) (Pairs.second pair)) pairs)
-matchRecord :: t0 -> (M.Map Core.Name Core.Term -> Either Errors.Error t1) -> Core.Term -> Either Errors.Error t1
-matchRecord graph decode term =
-
-      let stripped = Strip.deannotateAndDetypeTerm term
-      in case stripped of
-        Core.TermRecord v0 -> decode (Maps.fromList (Lists.map (\field -> (Core.fieldName field, (Core.fieldTerm field))) (Core.recordFields v0)))
-        _ -> Left (Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "record",
-          Errors.unexpectedShapeErrorActual = (ShowCore.term term)})))
-matchUnion :: Graph.Graph -> Core.Name -> [(Core.Name, (Core.Term -> Either Errors.Error t0))] -> Core.Term -> Either Errors.Error t0
-matchUnion graph tname pairs term =
-
-      let stripped = Strip.deannotateAndDetypeTerm term
-          mapping = Maps.fromList pairs
-      in case stripped of
-        Core.TermVariable v0 -> Eithers.bind (requireBinding graph v0) (\el -> matchUnion graph tname pairs (Core.bindingTerm el))
-        Core.TermInject v0 ->
-          let exp =
-
-                    let fname = Core.fieldName (Core.injectionField v0)
-                        val = Core.fieldTerm (Core.injectionField v0)
-                    in (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-                      Errors.noMatchingFieldErrorFieldName = fname})))) (\f -> f val) (Maps.lookup fname mapping))
-          in (Logic.ifElse (Equality.equal (Core.unName (Core.injectionTypeName v0)) (Core.unName tname)) exp (Left (Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-            Errors.unexpectedShapeErrorExpected = (Strings.cat2 "injection for type " (Core.unName tname)),
-            Errors.unexpectedShapeErrorActual = (ShowCore.term term)})))))
-        _ -> Left (Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = (Strings.cat2 "injection for type " (Core.unName tname)),
-          Errors.unexpectedShapeErrorActual = (ShowCore.term stripped)})))
-matchUnitField :: t0 -> t1 -> (t0, (t2 -> Either t3 t1))
-matchUnitField fname x = (fname, (\ignored -> Right x))
-requireBinding :: Graph.Graph -> Core.Name -> Either Errors.Error Core.Binding
-requireBinding graph name =
-
-      let showAll = False
-          ellipsis =
-                  \strings -> Logic.ifElse (Logic.and (Equality.gt (Lists.length strings) 3) (Logic.not showAll)) (Lists.concat2 (Lists.take 3 strings) [
-                    "..."]) strings
-          errMsg =
-                  Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "no such element: " (Core.unName name)) ". Available elements: {") (Strings.intercalate ", " (ellipsis (Lists.map Core.unName (Maps.keys (Graph.graphBoundTerms graph)))))) "}"
-      in (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorOther (Errors.OtherResolutionError errMsg)))) (\x -> Right x) (lookupBinding graph name))
-requirePrimitive :: Graph.Graph -> Core.Name -> Either Errors.Error Graph.Primitive
-requirePrimitive graph name =
-    Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchPrimitive (Errors.NoSuchPrimitiveError {
-      Errors.noSuchPrimitiveErrorName = name})))) (\x -> Right x) (lookupPrimitive graph name)
-requirePrimitiveType :: Graph.Graph -> Core.Name -> Either Errors.Error Core.TypeScheme
-requirePrimitiveType tx name =
-
-      let mts = Maybes.map (\_p -> Graph.primitiveTypeScheme _p) (Maps.lookup name (Graph.graphPrimitives tx))
-      in (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchPrimitive (Errors.NoSuchPrimitiveError {
-        Errors.noSuchPrimitiveErrorName = name})))) (\ts -> Right ts) mts)
-requireTerm :: Graph.Graph -> Core.Name -> Either Errors.Error Core.Term
-requireTerm graph name =
-    Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchBinding (Errors.NoSuchBindingError {
-      Errors.noSuchBindingErrorName = name})))) (\x -> Right x) (resolveTerm graph name)
--- | TODO: distinguish between lambda-bound and let-bound variables
-resolveTerm :: Graph.Graph -> Core.Name -> Maybe Core.Term
-resolveTerm graph name =
-
-      let recurse =
-              \term ->
-                let stripped = Strip.deannotateTerm term
-                in case stripped of
-                  Core.TermVariable v0 -> resolveTerm graph v0
-                  _ -> Just term
-      in (Maybes.maybe Nothing recurse (lookupTerm graph name))
-stripAndDereferenceTerm :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-stripAndDereferenceTerm graph term =
-
-      let stripped = Strip.deannotateAndDetypeTerm term
-      in case stripped of
-        Core.TermVariable v0 -> Eithers.bind (requireTerm graph v0) (\t -> stripAndDereferenceTerm graph t)
-        _ -> Right stripped
--- | Strip annotations and dereference variables, returning Either an error or the resolved term
-stripAndDereferenceTermEither :: Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-stripAndDereferenceTermEither graph term =
-
-      let stripped = Strip.deannotateAndDetypeTerm term
-      in case stripped of
-        Core.TermVariable v0 -> Eithers.either (\left_ -> Left left_) (\binding -> stripAndDereferenceTermEither graph (Core.bindingTerm binding)) (dereferenceVariable graph v0)
-        _ -> Right stripped
diff --git a/src/main/haskell/Hydra/Lib/Chars.hs b/src/main/haskell/Hydra/Lib/Chars.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Chars.hs
+++ /dev/null
@@ -1,31 +0,0 @@
--- | Haskell implementations of hydra.lib.chars primitives.
--- All functions operate on Unicode code points (Int) rather than Char.
-
-module Hydra.Lib.Chars where
-
-import qualified Data.Char as C
-
-
--- | Check whether a character is alphanumeric.
-isAlphaNum :: Int -> Bool
-isAlphaNum = C.isAlphaNum . C.chr
-
--- | Check whether a character is lowercase.
-isLower :: Int -> Bool
-isLower = C.isLower . C.chr
-
--- | Check whether a character is a whitespace character.
-isSpace :: Int -> Bool
-isSpace = C.isSpace . C.chr
-
--- | Check whether a character is uppercase.
-isUpper :: Int -> Bool
-isUpper = C.isUpper . C.chr
-
--- | Convert a character to lowercase.
-toLower :: Int -> Int
-toLower = C.ord . C.toLower . C.chr
-
--- | Convert a character to uppercase.
-toUpper :: Int -> Int
-toUpper = C.ord . C.toUpper . C.chr
diff --git a/src/main/haskell/Hydra/Lib/Eithers.hs b/src/main/haskell/Hydra/Lib/Eithers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Eithers.hs
+++ /dev/null
@@ -1,69 +0,0 @@
--- | Haskell implementations of hydra.lib.eithers primitives
-
-module Hydra.Lib.Eithers where
-
-import qualified Control.Monad as CM
-import qualified Data.Bifunctor as BF
-import qualified Data.Either as E
-import qualified Data.Set as S
-
-
--- | Map over both sides of an Either value.
-bimap :: (a -> c) -> (b -> d) -> Either a b -> Either c d
-bimap = BF.bimap
-
--- | Bind (flatMap) for Either: if Right, apply the function; if Left, return unchanged.
-bind :: Either a b -> (b -> Either a c) -> Either a c
-bind = (>>=)
-
--- | Eliminate an Either value by applying one of two functions.
-either :: (a -> c) -> (b -> c) -> Either a b -> c
-either = E.either
-
--- | Left-fold over a list with an Either-returning function, short-circuiting on Left.
-foldl :: (a -> b -> Either c a) -> a -> [b] -> Either c a
-foldl = CM.foldM
-
--- | Extract the Left value, or return a default.
-fromLeft :: a -> Either a b -> a
-fromLeft = E.fromLeft
-
--- | Extract the Right value, or return a default.
-fromRight :: b -> Either a b -> b
-fromRight = E.fromRight
-
--- | Check if an Either is a Left value.
-isLeft :: Either a b -> Bool
-isLeft = E.isLeft
-
--- | Check if an Either is a Right value.
-isRight :: Either a b -> Bool
-isRight = E.isRight
-
--- | Extract all Left values from a list of Eithers.
-lefts :: [Either a b] -> [a]
-lefts = E.lefts
-
--- | Map a function over the Right side of an Either (standard functor map).
-map :: (a -> b) -> Either c a -> Either c b
-map = fmap
-
--- | Map a function returning Either over a list, collecting results or short-circuiting on Left.
-mapList :: (a -> Either c b) -> [a] -> Either c [b]
-mapList = CM.mapM
-
--- | Map a function returning Either over a Maybe, or return Right Nothing if Nothing.
-mapMaybe :: (a -> Either c b) -> Maybe a -> Either c (Maybe b)
-mapMaybe = CM.mapM
-
--- | Map a function returning Either over a Set, collecting results or short-circuiting on Left.
-mapSet :: Ord b => (a -> Either c b) -> S.Set a -> Either c (S.Set b)
-mapSet f s = fmap S.fromList (CM.mapM f (S.toList s))
-
--- | Partition a list of Eithers into lefts and rights.
-partitionEithers :: [Either a b] -> ([a], [b])
-partitionEithers = E.partitionEithers
-
--- | Extract all Right values from a list of Eithers.
-rights :: [Either a b] -> [b]
-rights = E.rights
diff --git a/src/main/haskell/Hydra/Lib/Equality.hs b/src/main/haskell/Hydra/Lib/Equality.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Equality.hs
+++ /dev/null
@@ -1,47 +0,0 @@
--- | Haskell implementations of hydra.lib.equality primitives.
-
-module Hydra.Lib.Equality where
-
-import Hydra.Util
-
-import Data.Int
-
-
--- | Compare two values and return a Comparison.
-compare :: Ord a => a -> a -> Comparison
-compare x y
-  | x < y     = ComparisonLessThan
-  | x > y     = ComparisonGreaterThan
-  | otherwise = ComparisonEqualTo
-
--- | Check if two values are equal.
-equal :: Eq a => a -> a -> Bool
-equal = (==)
-
--- | Check if first value is greater than second.
-gt :: Ord a => a -> a -> Bool
-gt = (>)
-
--- | Check if first value is greater than or equal to second.
-gte :: Ord a => a -> a -> Bool
-gte = (>=)
-
--- | Return a value unchanged.
-identity :: a -> a
-identity = id
-
--- | Check if first value is less than second.
-lt :: Ord a => a -> a -> Bool
-lt = (<)
-
--- | Check if first value is less than or equal to second.
-lte :: Ord a => a -> a -> Bool
-lte = (<=)
-
--- | Return the maximum of two values.
-max :: Ord a => a -> a -> a
-max = Prelude.max
-
--- | Return the minimum of two values.
-min :: Ord a => a -> a -> a
-min = Prelude.min
diff --git a/src/main/haskell/Hydra/Lib/Lists.hs b/src/main/haskell/Hydra/Lib/Lists.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Lists.hs
+++ /dev/null
@@ -1,166 +0,0 @@
--- | Haskell implementations of hydra.lib.lists primitives
-
-module Hydra.Lib.Lists where
-
-import Hydra.Util
-import Hydra.Core
-import Hydra.Graph
-import qualified Hydra.Dsl.Terms as Terms
-
-import qualified Data.List as L
-
-
--- | Apply a list of functions to a list of values (applicative style).
-apply :: [a -> b] -> [a] -> [b]
-apply = (<*>)
-
--- | Apply a function that returns lists to each element and flatten results.
-bind :: [a] -> (a -> [b]) -> [b]
-bind = (>>=)
-
--- | Concatenate a list of lists.
-concat :: [[a]] -> [a]
-concat = L.concat
-
--- | Concatenate two lists.
-concat2 :: [a] -> [a] -> [a]
-concat2 l1 l2 = l1 ++ l2
-
--- | Prepend a value to a list.
-cons :: a -> [a] -> [a]
-cons = (:)
-
--- | Drop the first n elements from a list.
-drop :: Int -> [a] -> [a]
-drop = L.drop
-
--- | Drop elements from the beginning of a list while predicate is true.
-dropWhile :: (a -> Bool) -> [a] -> [a]
-dropWhile = L.dropWhile
-
--- | Check if an element is in a list.
-elem :: Eq a => a -> [a] -> Bool
-elem = L.elem
-
--- | Filter a list based on a predicate.
-filter :: (a -> Bool) -> [a] -> [a]
-filter = L.filter
-
--- | Find the first element matching a predicate.
-find :: (a -> Bool) -> [a] -> Maybe a
-find = L.find
-
--- | Fold a list from the left.
-foldl :: (b -> a -> b) -> b -> [a] -> b
-foldl = L.foldl
-
--- | Fold a list from the right.
-foldr :: (a -> b -> b) -> b -> [a] -> b
-foldr = L.foldr
-
--- | Group consecutive equal elements.
-group :: Eq a => [a] -> [[a]]
-group = L.group
-
--- | Intercalate a list of lists with a separator list between each.
-intercalate :: [a] -> [[a]] -> [a]
-intercalate = L.intercalate
-
--- | Intersperse a value between elements of a list.
-intersperse :: a -> [a] -> [a]
-intersperse = L.intersperse
-
--- | Get the length of a list.
-length :: [a] -> Int
-length = L.length
-
--- | Map a function over a list.
-map :: (a -> b) -> [a] -> [b]
-map = fmap
-
--- | Get the element at a specified index in a list, returning Nothing if out of bounds.
-maybeAt :: Int -> [a] -> Maybe a
-maybeAt i l
-  | i < 0 || i >= L.length l = Nothing
-  | otherwise = Just (l !! i)
-
--- | Get the first element of a list, returning Nothing if the list is empty.
-maybeHead :: [a] -> Maybe a
-maybeHead [] = Nothing
-maybeHead (x:_) = Just x
-
--- | Return all elements except the last one, returning Nothing if the list is empty.
-maybeInit :: [a] -> Maybe [a]
-maybeInit [] = Nothing
-maybeInit xs = Just (L.init xs)
-
--- | Get the last element of a list, returning Nothing if the list is empty.
-maybeLast :: [a] -> Maybe a
-maybeLast [] = Nothing
-maybeLast xs = Just (L.last xs)
-
--- | Get all elements of a list except the first, returning Nothing if the list is empty.
-maybeTail :: [a] -> Maybe [a]
-maybeTail [] = Nothing
-maybeTail (_:xs) = Just xs
-
--- | Remove duplicate elements from a list.
-nub :: Eq a => [a] -> [a]
-nub = L.nub
-
--- | Check if a list is empty.
-null :: [a] -> Bool
-null = L.null
-
--- | Partition a list into elements that satisfy a predicate and elements that do not.
-partition :: (a -> Bool) -> [a] -> ([a], [a])
-partition = L.partition
-
--- | Create a list with a single element.
-pure :: a -> [a]
-pure e = [e]
-
--- | Create a list with n copies of a value.
-replicate :: Int -> a -> [a]
-replicate = L.replicate
-
--- | Reverse a list.
-reverse :: [a] -> [a]
-reverse = L.reverse
-
--- | Create a single-element list.
-singleton :: a -> [a]
-singleton e = [e]
-
--- | Sort a list.
-sort :: Ord a => [a] -> [a]
-sort = L.sort
-
--- | Sort a list based on a key function.
-sortOn :: Ord b => (a -> b) -> [a] -> [a]
-sortOn = L.sortOn
-
--- | Split a list at the first element where predicate fails.
-span :: (a -> Bool) -> [a] -> ([a], [a])
-span = L.span
-
--- | Take the first n elements from a list.
-take :: Int -> [a] -> [a]
-take = L.take
-
--- | Transpose a list of lists.
-transpose :: [[a]] -> [[a]]
-transpose = L.transpose
-
--- | Decompose a list into its head and tail, returning Nothing if the list is empty.
-uncons :: [a] -> Maybe (a, [a])
-uncons [] = Nothing
-uncons (x:xs) = Just (x, xs)
-
--- | Zip two lists into pairs.
-zip :: [a] -> [b] -> [(a, b)]
-zip = L.zip
-
--- | Zip two lists with a combining function.
-zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
-zipWith = L.zipWith
diff --git a/src/main/haskell/Hydra/Lib/Literals.hs b/src/main/haskell/Hydra/Lib/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Literals.hs
+++ /dev/null
@@ -1,309 +0,0 @@
--- | Haskell implementations of hydra.lib.literals primitives
-
-module Hydra.Lib.Literals where
-
-import Data.Int
-import Data.Scientific (Scientific, toRealFloat, fromFloatDigits)
-import Text.Read (readMaybe)
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Base64 as B64
-import qualified Data.Scientific as Sci
-import qualified Data.Text as T
-import qualified Data.Text.Encoding as TE
-
--- Note: These binary conversion functions have two versions:
--- 1. String -> String versions for backward compatibility with current generated code
--- 2. ByteString versions will be used after regenerating Core.hs
-
-
--- | Convert a bigfloat (Double) to a bigint (Integer).
-bigfloatToBigint :: Double -> Integer
-bigfloatToBigint = round
-
--- | Convert a bigfloat (Double) to a float32 (Float).
--- IEEE special values are preserved; for finite values, realToFrac
--- (which converts via Rational) is used. Note: realToFrac on Double
--- Inf does work in this direction (Float has same special-value
--- representation), but we mirror float32ToBigfloat's pattern for
--- symmetry and to be defensive against future Rational changes.
-bigfloatToFloat32 :: Double -> Float
-bigfloatToFloat32 x
-  | isNaN x      = 0/0
-  | isInfinite x = if x < 0 then -1/0 else 1/0
-  | otherwise    = realToFrac x
-
--- | Convert a bigfloat (Double) to a float64 (Double).
-bigfloatToFloat64 :: Double -> Double
-bigfloatToFloat64 = id
-
--- | Convert a bigint (Integer) to a bigfloat (Double).
-bigintToBigfloat :: Integer -> Double
-bigintToBigfloat = fromIntegral
-
--- | Convert a bigint (Integer) to a decimal (Scientific).
-bigintToDecimal :: Integer -> Scientific
-bigintToDecimal n = Sci.scientific n 0
-
--- | Convert a bigint (Integer) to an int8.
-bigintToInt8 :: Integer -> Int8
-bigintToInt8 = fromIntegral
-
--- | Convert a bigint (Integer) to an int16.
-bigintToInt16 :: Integer -> Int16
-bigintToInt16 = fromIntegral
-
--- | Convert a bigint (Integer) to an int32.
-bigintToInt32 :: Integer -> Int
-bigintToInt32 = fromIntegral
-
--- | Convert a bigint (Integer) to an int64.
-bigintToInt64 :: Integer -> Int64
-bigintToInt64 = fromIntegral
-
--- | Convert a bigint (Integer) to a uint8.
-bigintToUint8 :: Integer -> Int16
-bigintToUint8 = fromIntegral
-
--- | Convert a bigint (Integer) to a uint16.
-bigintToUint16 :: Integer -> Int
-bigintToUint16 = fromIntegral
-
--- | Convert a bigint (Integer) to a uint32.
-bigintToUint32 :: Integer -> Int64
-bigintToUint32 = fromIntegral
-
--- | Convert a bigint (Integer) to a uint64.
-bigintToUint64 :: Integer -> Integer
-bigintToUint64 = id
-
--- | Convert binary to a list of byte values (0-255).
-binaryToBytes :: B.ByteString -> [Int]
-binaryToBytes = fmap fromIntegral . B.unpack
-
--- | Convert a decimal (Scientific) to a bigint (Integer) using banker's rounding
--- (round half to even), matching Haskell's 'round' and the BigDecimal/BigInt behavior
--- in the other Hydra hosts.
-decimalToBigint :: Scientific -> Integer
-decimalToBigint = round
-
--- | Convert a decimal (Scientific) to a float32 (Float). May lose precision.
-decimalToFloat32 :: Scientific -> Float
-decimalToFloat32 = toRealFloat
-
--- | Convert a decimal (Scientific) to a float64 (Double). May lose precision.
-decimalToFloat64 :: Scientific -> Double
-decimalToFloat64 = toRealFloat
-
--- | Convert binary to string by base64 encoding.
-binaryToString :: B.ByteString -> String
-binaryToString = T.unpack . TE.decodeUtf8 . B64.encode
-
--- | Alias for binaryToString (for compatibility during transition).
-binaryToStringBS :: B.ByteString -> String
-binaryToStringBS = binaryToString
-
--- | Convert a float32 (Float) to a bigfloat (Double).
--- Preserves IEEE special values (NaN, +/-Infinity); plain realToFrac
--- routes through Rational and collapses Inf to maxFinite (~3.4028e38).
-float32ToBigfloat :: Float -> Double
-float32ToBigfloat x
-  | isNaN x      = 0/0
-  | isInfinite x = if x < 0 then -1/0 else 1/0
-  | otherwise    = realToFrac x
-
--- | Convert a float32 (Float) to a decimal (Scientific).
-float32ToDecimal :: Float -> Scientific
-float32ToDecimal = fromFloatDigits
-
--- | Convert a float64 (Double) to a bigfloat (Double).
-float64ToBigfloat :: Double -> Double
-float64ToBigfloat = id
-
--- | Convert a float64 (Double) to a decimal (Scientific).
-float64ToDecimal :: Double -> Scientific
-float64ToDecimal = fromFloatDigits
-
--- | Convert an int8 to a bigint (Integer).
-int8ToBigint :: Int8 -> Integer
-int8ToBigint = fromIntegral
-
--- | Convert an int16 to a bigint (Integer).
-int16ToBigint :: Int16 -> Integer
-int16ToBigint = fromIntegral
-
--- | Convert an int32 to a bigint (Integer).
-int32ToBigint :: Int -> Integer
-int32ToBigint = fromIntegral
-
--- | Convert an int64 to a bigint (Integer).
-int64ToBigint :: Int64 -> Integer
-int64ToBigint = fromIntegral
-
--- | Parse a string to a bigfloat (Double).
-readBigfloat :: String -> Maybe Double
-readBigfloat s = readMaybe s :: Maybe Double
-
--- | Parse a string to a bigint (Integer).
-readBigint :: String -> Maybe Integer
-readBigint s = readMaybe s :: Maybe Integer
-
--- | Parse a string to a boolean.
-readBoolean :: String -> Maybe Bool
-readBoolean s = if s == "true" then Just True
-  else if s == "false" then Just False
-  else Nothing
-
--- | Parse a string to a decimal (Scientific).
-readDecimal :: String -> Maybe Scientific
-readDecimal s = readMaybe s :: Maybe Scientific
-
--- | Parse a string to a float32 (Float).
-readFloat32 :: String -> Maybe Float
-readFloat32 s = readMaybe s :: Maybe Float
-
--- | Parse a string to a float64 (Double).
-readFloat64 :: String -> Maybe Double
-readFloat64 s = readMaybe s :: Maybe Double
-
--- | Parse a string to an int8 (-128 to 127).
-readInt8 :: String -> Maybe Int8
-readInt8 s = do
-  n <- readMaybe s :: Maybe Integer
-  if n >= -128 && n <= 127 then Just (fromIntegral n) else Nothing
-
--- | Parse a string to an int16 (-32768 to 32767).
-readInt16 :: String -> Maybe Int16
-readInt16 s = do
-  n <- readMaybe s :: Maybe Integer
-  if n >= -32768 && n <= 32767 then Just (fromIntegral n) else Nothing
-
--- | Parse a string to an int32.
-readInt32 :: String -> Maybe Int
-readInt32 s = readMaybe s :: Maybe Int
-
--- | Parse a string to an int64.
-readInt64 :: String -> Maybe Int64
-readInt64 s = readMaybe s :: Maybe Int64
-
--- | Parse a string literal.
-readString :: String -> Maybe String
-readString s = readMaybe s :: Maybe String
-
--- Note: Hydra uses wider signed types to represent unsigned values without overflow
--- Uint8 -> Int16, Uint16 -> Int, Uint32 -> Int64, Uint64 -> Integer
--- The read functions parse as unsigned and validate the range
-
--- | Parse a string to a uint8 (0 to 255).
-readUint8 :: String -> Maybe Int16
-readUint8 s = do
-  n <- readMaybe s :: Maybe Integer
-  if n >= 0 && n <= 255 then Just (fromIntegral n) else Nothing
-
--- | Parse a string to a uint16 (0 to 65535).
-readUint16 :: String -> Maybe Int
-readUint16 s = do
-  n <- readMaybe s :: Maybe Integer
-  if n >= 0 && n <= 65535 then Just (fromIntegral n) else Nothing
-
--- | Parse a string to a uint32 (0 to 4294967295).
-readUint32 :: String -> Maybe Int64
-readUint32 s = do
-  n <- readMaybe s :: Maybe Integer
-  if n >= 0 && n <= 4294967295 then Just (fromIntegral n) else Nothing
-
--- | Parse a string to a uint64 (0 to 18446744073709551615).
-readUint64 :: String -> Maybe Integer
-readUint64 s = do
-  n <- readMaybe s :: Maybe Integer
-  if n >= 0 && n <= 18446744073709551615 then Just n else Nothing
-
--- | Convert a bigfloat (Double) to string.
-showBigfloat :: Double -> String
-showBigfloat = show
-
--- | Convert a bigint (Integer) to string.
-showBigint :: Integer -> String
-showBigint = show
-
--- | Convert a boolean to string.
-showBoolean :: Bool -> String
-showBoolean b = case b of
-  True -> "true"
-  False -> "false"
-
--- | Convert a decimal (Scientific) to string. Uses Scientific's default format
---   (regular notation for small-magnitude values; scientific notation for very
---   large or very small).
-showDecimal :: Scientific -> String
-showDecimal = show
-
--- | Convert a float32 (Float) to string.
-showFloat32 :: Float -> String
-showFloat32 = show
-
--- | Convert a float64 (Double) to string.
-showFloat64 :: Double -> String
-showFloat64 = show
-
--- | Convert an int8 to string.
-showInt8 :: Int8 -> String
-showInt8 = show
-
--- | Convert an int16 to string.
-showInt16 :: Int16 -> String
-showInt16 = show
-
--- | Convert an int32 to string.
-showInt32 :: Int -> String
-showInt32 = show
-
--- | Convert an int64 to string.
-showInt64 :: Int64 -> String
-showInt64 = show
-
--- | Convert a string to a quoted string representation.
-showString :: String -> String
-showString = show
-
--- | Convert a uint8 to string.
-showUint8 :: Int16 -> String
-showUint8 = show
-
--- | Convert a uint16 to string.
-showUint16 :: Int -> String
-showUint16 = show
-
--- | Convert a uint32 to string.
-showUint32 :: Int64 -> String
-showUint32 = show
-
--- | Convert a uint64 to string.
-showUint64 :: Integer -> String
-showUint64 = show
-
--- | Convert string to binary by base64 decoding.
--- Returns an empty ByteString if decoding fails.
-stringToBinary :: String -> B.ByteString
-stringToBinary s = case B64.decode (TE.encodeUtf8 $ T.pack s) of
-  Left _ -> B.empty
-  Right bs -> bs
-
--- | Parse a string as a Scientific decimal. Errors on malformed input.
-stringToDecimal :: String -> Scientific
-stringToDecimal = read
-
--- | Convert a uint8 to a bigint (Integer).
-uint8ToBigint :: Int16 -> Integer
-uint8ToBigint = fromIntegral
-
--- | Convert a uint16 to a bigint (Integer).
-uint16ToBigint :: Int -> Integer
-uint16ToBigint = fromIntegral
-
--- | Convert a uint32 to a bigint (Integer).
-uint32ToBigint :: Int64 -> Integer
-uint32ToBigint = fromIntegral
-
--- | Convert a uint64 to a bigint (Integer).
-uint64ToBigint :: Integer -> Integer
-uint64ToBigint = id
diff --git a/src/main/haskell/Hydra/Lib/Logic.hs b/src/main/haskell/Hydra/Lib/Logic.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Logic.hs
+++ /dev/null
@@ -1,24 +0,0 @@
--- | Haskell implementations of hydra.lib.logic (logic and control flow) primitives
-
-module Hydra.Lib.Logic where
-
-import Hydra.Core
-
-import Data.Int
-
-
--- | Compute the logical AND of two boolean values.
-and :: Bool -> Bool -> Bool
-and x y = x && y
-
--- | Compute a conditional expression.
-ifElse :: Bool -> a -> a -> a
-ifElse b x y = if b then x else y
-
--- | Compute the logical NOT of a boolean value.
-not :: Bool -> Bool
-not = Prelude.not
-
--- | Compute the logical OR of two boolean values.
-or :: Bool -> Bool -> Bool
-or x y = x || y
diff --git a/src/main/haskell/Hydra/Lib/Maps.hs b/src/main/haskell/Hydra/Lib/Maps.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Maps.hs
+++ /dev/null
@@ -1,86 +0,0 @@
--- | Haskell implementations of hydra.lib.maps primitives
-
-module Hydra.Lib.Maps where
-
-import qualified Data.Map as M
-
-
--- | Alter a value at a key using a function.
-alter :: Ord k => (Maybe v -> Maybe v) -> k -> M.Map k v -> M.Map k v
-alter = M.alter
-
--- | Map a function over the keys and values of a map.
-bimap :: (Ord k1, Ord k2) => (k1 -> k2) -> (v1 -> v2) -> M.Map k1 v1 -> M.Map k2 v2
-bimap f g = M.fromList . fmap (\(k, v) -> (f k, g v)) . M.toList
-
--- | Remove a key from a map.
-delete :: Ord k => k -> M.Map k v -> M.Map k v
-delete = M.delete
-
--- | Get the values of a map.
-elems :: M.Map k v -> [v]
-elems = M.elems
-
--- | Create an empty map.
-empty :: M.Map k v
-empty = M.empty
-
--- | Filter a map based on values.
-filter :: Ord k => (v -> Bool) -> M.Map k v -> M.Map k v
-filter = M.filter
-
--- | Filter a map based on key-value pairs.
-filterWithKey :: Ord k => (k -> v -> Bool) -> M.Map k v -> M.Map k v
-filterWithKey = M.filterWithKey
-
--- | Lookup a value with a default.
-findWithDefault :: Ord k => v -> k -> M.Map k v -> v
-findWithDefault = M.findWithDefault
-
--- | Create a map from a list of key-value pairs.
-fromList :: Ord k => [(k, v)] -> M.Map k v
-fromList = M.fromList
-
--- | Insert a key-value pair into a map.
-insert :: Ord k => k -> v -> M.Map k v -> M.Map k v
-insert = M.insert
-
--- | Get the keys of a map.
-keys :: M.Map k v -> [k]
-keys = M.keys
-
--- | Lookup a value in a map.
-lookup :: Ord k => k -> M.Map k v -> Maybe v
-lookup = M.lookup
-
--- | Map a function over a map.
-map :: (v1 -> v2) -> M.Map k v1 -> M.Map k v2
-map = fmap
-
--- | Map a function over the keys of a map.
-mapKeys :: (Ord k1, Ord k2) => (k1 -> k2) -> M.Map k1 v -> M.Map k2 v
-mapKeys = M.mapKeys
-
--- | Check if a key is present in a map.
-member :: Ord k => k -> M.Map k v -> Bool
-member = M.member
-
--- | Check if a map is empty.
-null :: M.Map k v -> Bool
-null = M.null
-
--- | Create a map with a single key-value pair.
-singleton :: k -> v -> M.Map k v
-singleton = M.singleton
-
--- | Get the size of a map.
-size :: M.Map k v -> Int
-size = M.size
-
--- | Convert a map to a list of key-value pairs.
-toList :: M.Map k v -> [(k, v)]
-toList = M.toList
-
--- | Union two maps, with the first taking precedence.
-union :: Ord k => M.Map k v -> M.Map k v -> M.Map k v
-union = M.union
diff --git a/src/main/haskell/Hydra/Lib/Math.hs b/src/main/haskell/Hydra/Lib/Math.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Math.hs
+++ /dev/null
@@ -1,238 +0,0 @@
--- | Haskell implementations of hydra.lib.math primitives
-
-module Hydra.Lib.Math where
-
-import Prelude (Num, Ord, Integral, Enum, Bool, Double, Int, Integer, Float, Maybe(..), (.), ($), (+), (-), (*), (==), (||))
-import qualified Prelude
-
-
--- | Return the absolute value.
-abs :: Num a => a -> a
-abs = Prelude.abs
-
--- | Return the arc cosine of x in radians.
-acos :: Double -> Double
-acos = Prelude.acos
-
--- | Return the inverse hyperbolic cosine of x.
-acosh :: Double -> Double
-acosh = Prelude.acosh
-
--- | Add two numbers.
-add :: Num a => a -> a -> a
-add x y = x + y
-
--- | Add two Float64 numbers.
-addFloat64 :: Double -> Double -> Double
-addFloat64 = add
-
--- | Return the arc sine of x in radians.
-asin :: Double -> Double
-asin = Prelude.asin
-
--- | Return the inverse hyperbolic sine of x.
-asinh :: Double -> Double
-asinh = Prelude.asinh
-
--- | Return the arc tangent of x in radians.
-atan :: Double -> Double
-atan = Prelude.atan
-
--- | Return the arc tangent of y/x in radians, using signs to determine quadrant.
-atan2 :: Double -> Double -> Double
-atan2 = Prelude.atan2
-
--- | Return the inverse hyperbolic tangent of x.
-atanh :: Double -> Double
-atanh = Prelude.atanh
-
--- | Return the ceiling of x as a float.
---
--- DIVERGENCE FROM HASKELL: Haskell's Prelude.ceiling returns an Integer, which
--- cannot represent NaN or Inf; GHC's behavior on those inputs is undefined and
--- produces nonsensical gigantic integers. Hydra returns a Float64 instead so
--- that NaN and ±Inf propagate naturally per IEEE 754, matching the conventions
--- of C (ceil), Java (Math.ceil), Go (math.Ceil), Rust (f64::ceil), and JavaScript
--- (Math.ceil). Users who need an Integer value must convert explicitly.
-ceiling :: Double -> Double
-ceiling x
-  | Prelude.isNaN x Prelude.|| Prelude.isInfinite x = x
-  | Prelude.otherwise = Prelude.fromIntegral (Prelude.ceiling x :: Integer)
-
--- | Return the cosine of x radians.
-cos :: Double -> Double
-cos = Prelude.cos
-
--- | Return the hyperbolic cosine of x.
-cosh :: Double -> Double
-cosh = Prelude.cosh
-
--- | Euler's number (e ≈ 2.71828).
-e :: Double
-e = Prelude.exp 1.0
-
--- | Check if an integer is even.
-even :: Integral a => a -> Bool
-even = Prelude.even
-
--- | Return e raised to the power x.
-exp :: Double -> Double
-exp = Prelude.exp
-
--- | Return the floor of x as a float.
---
--- DIVERGENCE FROM HASKELL: see the note on ceiling. Returns Float64 rather than
--- Integer so that NaN and ±Inf propagate naturally per IEEE 754.
-floor :: Double -> Double
-floor x
-  | Prelude.isNaN x Prelude.|| Prelude.isInfinite x = x
-  | Prelude.otherwise = Prelude.fromIntegral (Prelude.floor x :: Integer)
-
--- | Return the natural logarithm of x.
-log :: Double -> Double
-log = Prelude.log
-
--- | Return the logarithm of x to the given base.
-logBase :: Double -> Double -> Double
-logBase = Prelude.logBase
-
--- | Return the maximum of two values.
-max :: Ord a => a -> a -> a
-max = Prelude.max
-
--- | Divide two integers using integer division, returning Nothing on division by zero.
-maybeDiv :: Int -> Int -> Maybe Int
-maybeDiv _ 0 = Nothing
-maybeDiv x y = Just (Prelude.div x y)
-
--- | Return the minimum of two values.
-min :: Ord a => a -> a -> a
-min = Prelude.min
-
--- | Mathematical modulo, returning Nothing on division by zero.
-maybeMod :: Int -> Int -> Maybe Int
-maybeMod _ 0 = Nothing
-maybeMod x y = Just (Prelude.mod x y)
-
--- | Multiply two numbers.
-mul :: Num a => a -> a -> a
-mul x y = x * y
-
--- | Multiply two Float64 numbers.
-mulFloat64 :: Double -> Double -> Double
-mulFloat64 = mul
-
--- | Negate a number.
-negate :: Num a => a -> a
-negate = Prelude.negate
-
--- | Negate a Float64 number.
-negateFloat64 :: Double -> Double
-negateFloat64 = Prelude.negate
-
--- | Check if an integer is odd.
-odd :: Integral a => a -> Bool
-odd = Prelude.odd
-
--- | Pi (π ≈ 3.14159).
-pi :: Double
-pi = Prelude.pi
-
--- | Return x raised to the power y.
-pow :: Double -> Double -> Double
-pow = (Prelude.**)
-
--- | Return the predecessor (x - 1), returning Nothing on int32 minBound.
-maybePred :: Int -> Maybe Int
-maybePred x
-  | x == (-2147483648) = Nothing
-  | Prelude.otherwise = Just (x - 1)
-
--- | Generate a range of values from start to end (inclusive).
-range :: Enum a => a -> a -> [a]
-range start end = [start .. end]
-
--- | Integer remainder, returning Nothing on division by zero.
-maybeRem :: Int -> Int -> Maybe Int
-maybeRem _ 0 = Nothing
-maybeRem x y = Just (Prelude.rem x y)
-
--- | Return x rounded to the nearest integer, as a float.
---
--- DIVERGENCE FROM HASKELL: see the note on ceiling. Returns Float64 rather than
--- Integer so that NaN and ±Inf propagate naturally per IEEE 754.
-round :: Double -> Double
-round x
-  | Prelude.isNaN x Prelude.|| Prelude.isInfinite x = x
-  | Prelude.otherwise = Prelude.fromIntegral (Prelude.round x :: Integer)
-
--- | Round a bigfloat to n significant digits.
-roundBigfloat :: Int -> Double -> Double
-roundBigfloat = roundFloat64
-
--- | Round a float32 to n significant digits.
--- Returns NaN/Inf inputs unchanged (no rounding is possible).
-roundFloat32 :: Int -> Float -> Float
-roundFloat32 n x
-  | Prelude.isNaN x Prelude.|| Prelude.isInfinite x = x
-  | x Prelude.== 0 = 0
-  | Prelude.otherwise =
-      let factor = 10 Prelude.^^ (n - 1 - Prelude.floor (Prelude.logBase 10 (Prelude.abs x)))
-      in Prelude.fromIntegral (Prelude.round (x * factor) :: Integer) Prelude./ factor
-
--- | Round a float64 to n significant digits.
--- Returns NaN/Inf inputs unchanged (no rounding is possible).
-roundFloat64 :: Int -> Double -> Double
-roundFloat64 n x
-  | Prelude.isNaN x Prelude.|| Prelude.isInfinite x = x
-  | x Prelude.== 0 = 0
-  | Prelude.otherwise =
-      let factor = 10 Prelude.^^ (n - 1 - Prelude.floor (Prelude.logBase 10 (Prelude.abs x)))
-      in Prelude.fromIntegral (Prelude.round (x * factor) :: Integer) Prelude./ factor
-
--- | Return the sign of a number (-1, 0, or 1).
-signum :: Num a => a -> a
-signum = Prelude.signum
-
--- | Return the sine of x radians.
-sin :: Double -> Double
-sin = Prelude.sin
-
--- | Return the hyperbolic sine of x.
-sinh :: Double -> Double
-sinh = Prelude.sinh
-
--- | Return the square root of x.
-sqrt :: Double -> Double
-sqrt = Prelude.sqrt
-
--- | Subtract two numbers.
-sub :: Num a => a -> a -> a
-sub x y = x - y
-
--- | Subtract two Float64 numbers.
-subFloat64 :: Double -> Double -> Double
-subFloat64 = sub
-
--- | Return the successor (x + 1), returning Nothing on int32 maxBound.
-maybeSucc :: Int -> Maybe Int
-maybeSucc x
-  | x == 2147483647 = Nothing
-  | Prelude.otherwise = Just (x + 1)
-
--- | Return the tangent of x radians.
-tan :: Double -> Double
-tan = Prelude.tan
-
--- | Return the hyperbolic tangent of x.
-tanh :: Double -> Double
-tanh = Prelude.tanh
-
--- | Return x truncated (towards zero), as a float.
---
--- DIVERGENCE FROM HASKELL: see the note on ceiling. Returns Float64 rather than
--- Integer so that NaN and ±Inf propagate naturally per IEEE 754.
-truncate :: Double -> Double
-truncate x
-  | Prelude.isNaN x Prelude.|| Prelude.isInfinite x = x
-  | Prelude.otherwise = Prelude.fromIntegral (Prelude.truncate x :: Integer)
diff --git a/src/main/haskell/Hydra/Lib/Maybes.hs b/src/main/haskell/Hydra/Lib/Maybes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Maybes.hs
+++ /dev/null
@@ -1,58 +0,0 @@
--- | Haskell implementations of hydra.lib.maybes primitives
-
-module Hydra.Lib.Maybes where
-
-import qualified Data.Maybe as Y
-
-
--- | Apply a function to an argument (applicative).
-apply :: Y.Maybe (a -> b) -> Y.Maybe a -> Y.Maybe b
-apply = (<*>)
-
--- | Chain operations on optional values, handling Nothing cases automatically.
-bind :: Y.Maybe a -> (a -> Y.Maybe b) -> Y.Maybe b
-bind = (>>=)
-
--- | Handle an optional value with the maybe value as the first argument.
-cases :: Y.Maybe a -> b -> (a -> b) -> b
-cases m n j = Y.maybe n j m
-
--- | Filter out Nothing values from a list.
-cat :: [Y.Maybe a] -> [a]
-cat = Y.catMaybes
-
--- | Compose two Maybe-returning functions (Kleisli composition).
-compose :: (a -> Y.Maybe b) -> (b -> Y.Maybe c) -> (a -> Y.Maybe c)
-compose f g = \x -> f x >>= g
-
--- | Get a value from an optional value, or return a default value.
-fromMaybe :: a -> Y.Maybe a -> a
-fromMaybe = Y.fromMaybe
-
--- | Check if a value is Just.
-isJust :: Y.Maybe a -> Bool
-isJust = Y.isJust
-
--- | Check if a value is Nothing.
-isNothing :: Y.Maybe a -> Bool
-isNothing = Y.isNothing
-
--- | Map a function over an optional value.
-map :: (a -> b) -> Y.Maybe a -> Y.Maybe b
-map = fmap
-
--- | Map a function over a list and collect Just results.
-mapMaybe :: (a -> Y.Maybe b) -> [a] -> [b]
-mapMaybe = Y.mapMaybe
-
--- | Eliminate an optional value with a default and a function.
-maybe :: b -> (a -> b) -> Y.Maybe a -> b
-maybe = Y.maybe
-
--- | Lift a value into the Maybe type.
-pure :: a -> Y.Maybe a
-pure = Just
-
--- | Convert a Maybe to a list: Just x becomes [x], Nothing becomes [].
-toList :: Y.Maybe a -> [a]
-toList = Y.maybeToList
diff --git a/src/main/haskell/Hydra/Lib/Names.hs b/src/main/haskell/Hydra/Lib/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Names.hs
+++ /dev/null
@@ -1,536 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Namespaces and primitive names for the Hydra standard library
-
-module Hydra.Lib.Names where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-chars :: Packaging.Namespace
-chars = Packaging.Namespace "hydra.lib.chars"
-charsIsAlphaNum :: Core.Name
-charsIsAlphaNum = Core.Name "hydra.lib.chars.isAlphaNum"
-charsIsLower :: Core.Name
-charsIsLower = Core.Name "hydra.lib.chars.isLower"
-charsIsSpace :: Core.Name
-charsIsSpace = Core.Name "hydra.lib.chars.isSpace"
-charsIsUpper :: Core.Name
-charsIsUpper = Core.Name "hydra.lib.chars.isUpper"
-charsToLower :: Core.Name
-charsToLower = Core.Name "hydra.lib.chars.toLower"
-charsToUpper :: Core.Name
-charsToUpper = Core.Name "hydra.lib.chars.toUpper"
-eithers :: Packaging.Namespace
-eithers = Packaging.Namespace "hydra.lib.eithers"
-eithersBimap :: Core.Name
-eithersBimap = Core.Name "hydra.lib.eithers.bimap"
-eithersBind :: Core.Name
-eithersBind = Core.Name "hydra.lib.eithers.bind"
-eithersEither :: Core.Name
-eithersEither = Core.Name "hydra.lib.eithers.either"
-eithersFoldl :: Core.Name
-eithersFoldl = Core.Name "hydra.lib.eithers.foldl"
-eithersFromLeft :: Core.Name
-eithersFromLeft = Core.Name "hydra.lib.eithers.fromLeft"
-eithersFromRight :: Core.Name
-eithersFromRight = Core.Name "hydra.lib.eithers.fromRight"
-eithersIsLeft :: Core.Name
-eithersIsLeft = Core.Name "hydra.lib.eithers.isLeft"
-eithersIsRight :: Core.Name
-eithersIsRight = Core.Name "hydra.lib.eithers.isRight"
-eithersLefts :: Core.Name
-eithersLefts = Core.Name "hydra.lib.eithers.lefts"
-eithersMap :: Core.Name
-eithersMap = Core.Name "hydra.lib.eithers.map"
-eithersMapList :: Core.Name
-eithersMapList = Core.Name "hydra.lib.eithers.mapList"
-eithersMapMaybe :: Core.Name
-eithersMapMaybe = Core.Name "hydra.lib.eithers.mapMaybe"
-eithersMapSet :: Core.Name
-eithersMapSet = Core.Name "hydra.lib.eithers.mapSet"
-eithersPartitionEithers :: Core.Name
-eithersPartitionEithers = Core.Name "hydra.lib.eithers.partitionEithers"
-eithersRights :: Core.Name
-eithersRights = Core.Name "hydra.lib.eithers.rights"
-equality :: Packaging.Namespace
-equality = Packaging.Namespace "hydra.lib.equality"
-equalityCompare :: Core.Name
-equalityCompare = Core.Name "hydra.lib.equality.compare"
-equalityEqual :: Core.Name
-equalityEqual = Core.Name "hydra.lib.equality.equal"
-equalityGt :: Core.Name
-equalityGt = Core.Name "hydra.lib.equality.gt"
-equalityGte :: Core.Name
-equalityGte = Core.Name "hydra.lib.equality.gte"
-equalityIdentity :: Core.Name
-equalityIdentity = Core.Name "hydra.lib.equality.identity"
-equalityLt :: Core.Name
-equalityLt = Core.Name "hydra.lib.equality.lt"
-equalityLte :: Core.Name
-equalityLte = Core.Name "hydra.lib.equality.lte"
-equalityMax :: Core.Name
-equalityMax = Core.Name "hydra.lib.equality.max"
-equalityMin :: Core.Name
-equalityMin = Core.Name "hydra.lib.equality.min"
-lists :: Packaging.Namespace
-lists = Packaging.Namespace "hydra.lib.lists"
-listsApply :: Core.Name
-listsApply = Core.Name "hydra.lib.lists.apply"
-listsBind :: Core.Name
-listsBind = Core.Name "hydra.lib.lists.bind"
-listsConcat :: Core.Name
-listsConcat = Core.Name "hydra.lib.lists.concat"
-listsConcat2 :: Core.Name
-listsConcat2 = Core.Name "hydra.lib.lists.concat2"
-listsCons :: Core.Name
-listsCons = Core.Name "hydra.lib.lists.cons"
-listsDrop :: Core.Name
-listsDrop = Core.Name "hydra.lib.lists.drop"
-listsDropWhile :: Core.Name
-listsDropWhile = Core.Name "hydra.lib.lists.dropWhile"
-listsElem :: Core.Name
-listsElem = Core.Name "hydra.lib.lists.elem"
-listsFilter :: Core.Name
-listsFilter = Core.Name "hydra.lib.lists.filter"
-listsFind :: Core.Name
-listsFind = Core.Name "hydra.lib.lists.find"
-listsFoldl :: Core.Name
-listsFoldl = Core.Name "hydra.lib.lists.foldl"
-listsFoldr :: Core.Name
-listsFoldr = Core.Name "hydra.lib.lists.foldr"
-listsGroup :: Core.Name
-listsGroup = Core.Name "hydra.lib.lists.group"
-listsIntercalate :: Core.Name
-listsIntercalate = Core.Name "hydra.lib.lists.intercalate"
-listsIntersperse :: Core.Name
-listsIntersperse = Core.Name "hydra.lib.lists.intersperse"
-listsLength :: Core.Name
-listsLength = Core.Name "hydra.lib.lists.length"
-listsMap :: Core.Name
-listsMap = Core.Name "hydra.lib.lists.map"
-listsMaybeAt :: Core.Name
-listsMaybeAt = Core.Name "hydra.lib.lists.maybeAt"
-listsMaybeHead :: Core.Name
-listsMaybeHead = Core.Name "hydra.lib.lists.maybeHead"
-listsMaybeInit :: Core.Name
-listsMaybeInit = Core.Name "hydra.lib.lists.maybeInit"
-listsMaybeLast :: Core.Name
-listsMaybeLast = Core.Name "hydra.lib.lists.maybeLast"
-listsMaybeTail :: Core.Name
-listsMaybeTail = Core.Name "hydra.lib.lists.maybeTail"
-listsNub :: Core.Name
-listsNub = Core.Name "hydra.lib.lists.nub"
-listsNull :: Core.Name
-listsNull = Core.Name "hydra.lib.lists.null"
-listsPartition :: Core.Name
-listsPartition = Core.Name "hydra.lib.lists.partition"
-listsPure :: Core.Name
-listsPure = Core.Name "hydra.lib.lists.pure"
-listsReplicate :: Core.Name
-listsReplicate = Core.Name "hydra.lib.lists.replicate"
-listsReverse :: Core.Name
-listsReverse = Core.Name "hydra.lib.lists.reverse"
-listsSingleton :: Core.Name
-listsSingleton = Core.Name "hydra.lib.lists.singleton"
-listsSort :: Core.Name
-listsSort = Core.Name "hydra.lib.lists.sort"
-listsSortOn :: Core.Name
-listsSortOn = Core.Name "hydra.lib.lists.sortOn"
-listsSpan :: Core.Name
-listsSpan = Core.Name "hydra.lib.lists.span"
-listsTake :: Core.Name
-listsTake = Core.Name "hydra.lib.lists.take"
-listsTranspose :: Core.Name
-listsTranspose = Core.Name "hydra.lib.lists.transpose"
-listsUncons :: Core.Name
-listsUncons = Core.Name "hydra.lib.lists.uncons"
-listsZip :: Core.Name
-listsZip = Core.Name "hydra.lib.lists.zip"
-listsZipWith :: Core.Name
-listsZipWith = Core.Name "hydra.lib.lists.zipWith"
-literals :: Packaging.Namespace
-literals = Packaging.Namespace "hydra.lib.literals"
-literalsBigfloatToBigint :: Core.Name
-literalsBigfloatToBigint = Core.Name "hydra.lib.literals.bigfloatToBigint"
-literalsBigfloatToFloat32 :: Core.Name
-literalsBigfloatToFloat32 = Core.Name "hydra.lib.literals.bigfloatToFloat32"
-literalsBigfloatToFloat64 :: Core.Name
-literalsBigfloatToFloat64 = Core.Name "hydra.lib.literals.bigfloatToFloat64"
-literalsBigintToBigfloat :: Core.Name
-literalsBigintToBigfloat = Core.Name "hydra.lib.literals.bigintToBigfloat"
-literalsBigintToDecimal :: Core.Name
-literalsBigintToDecimal = Core.Name "hydra.lib.literals.bigintToDecimal"
-literalsBigintToInt16 :: Core.Name
-literalsBigintToInt16 = Core.Name "hydra.lib.literals.bigintToInt16"
-literalsBigintToInt32 :: Core.Name
-literalsBigintToInt32 = Core.Name "hydra.lib.literals.bigintToInt32"
-literalsBigintToInt64 :: Core.Name
-literalsBigintToInt64 = Core.Name "hydra.lib.literals.bigintToInt64"
-literalsBigintToInt8 :: Core.Name
-literalsBigintToInt8 = Core.Name "hydra.lib.literals.bigintToInt8"
-literalsBigintToUint16 :: Core.Name
-literalsBigintToUint16 = Core.Name "hydra.lib.literals.bigintToUint16"
-literalsBigintToUint32 :: Core.Name
-literalsBigintToUint32 = Core.Name "hydra.lib.literals.bigintToUint32"
-literalsBigintToUint64 :: Core.Name
-literalsBigintToUint64 = Core.Name "hydra.lib.literals.bigintToUint64"
-literalsBigintToUint8 :: Core.Name
-literalsBigintToUint8 = Core.Name "hydra.lib.literals.bigintToUint8"
-literalsBinaryToBytes :: Core.Name
-literalsBinaryToBytes = Core.Name "hydra.lib.literals.binaryToBytes"
-literalsBinaryToString :: Core.Name
-literalsBinaryToString = Core.Name "hydra.lib.literals.binaryToString"
-literalsDecimalToBigint :: Core.Name
-literalsDecimalToBigint = Core.Name "hydra.lib.literals.decimalToBigint"
-literalsDecimalToFloat32 :: Core.Name
-literalsDecimalToFloat32 = Core.Name "hydra.lib.literals.decimalToFloat32"
-literalsDecimalToFloat64 :: Core.Name
-literalsDecimalToFloat64 = Core.Name "hydra.lib.literals.decimalToFloat64"
-literalsFloat32ToBigfloat :: Core.Name
-literalsFloat32ToBigfloat = Core.Name "hydra.lib.literals.float32ToBigfloat"
-literalsFloat32ToDecimal :: Core.Name
-literalsFloat32ToDecimal = Core.Name "hydra.lib.literals.float32ToDecimal"
-literalsFloat64ToBigfloat :: Core.Name
-literalsFloat64ToBigfloat = Core.Name "hydra.lib.literals.float64ToBigfloat"
-literalsFloat64ToDecimal :: Core.Name
-literalsFloat64ToDecimal = Core.Name "hydra.lib.literals.float64ToDecimal"
-literalsInt16ToBigint :: Core.Name
-literalsInt16ToBigint = Core.Name "hydra.lib.literals.int16ToBigint"
-literalsInt32ToBigint :: Core.Name
-literalsInt32ToBigint = Core.Name "hydra.lib.literals.int32ToBigint"
-literalsInt64ToBigint :: Core.Name
-literalsInt64ToBigint = Core.Name "hydra.lib.literals.int64ToBigint"
-literalsInt8ToBigint :: Core.Name
-literalsInt8ToBigint = Core.Name "hydra.lib.literals.int8ToBigint"
-literalsReadBigfloat :: Core.Name
-literalsReadBigfloat = Core.Name "hydra.lib.literals.readBigfloat"
-literalsReadBigint :: Core.Name
-literalsReadBigint = Core.Name "hydra.lib.literals.readBigint"
-literalsReadBoolean :: Core.Name
-literalsReadBoolean = Core.Name "hydra.lib.literals.readBoolean"
-literalsReadDecimal :: Core.Name
-literalsReadDecimal = Core.Name "hydra.lib.literals.readDecimal"
-literalsReadFloat32 :: Core.Name
-literalsReadFloat32 = Core.Name "hydra.lib.literals.readFloat32"
-literalsReadFloat64 :: Core.Name
-literalsReadFloat64 = Core.Name "hydra.lib.literals.readFloat64"
-literalsReadInt16 :: Core.Name
-literalsReadInt16 = Core.Name "hydra.lib.literals.readInt16"
-literalsReadInt32 :: Core.Name
-literalsReadInt32 = Core.Name "hydra.lib.literals.readInt32"
-literalsReadInt64 :: Core.Name
-literalsReadInt64 = Core.Name "hydra.lib.literals.readInt64"
-literalsReadInt8 :: Core.Name
-literalsReadInt8 = Core.Name "hydra.lib.literals.readInt8"
-literalsReadString :: Core.Name
-literalsReadString = Core.Name "hydra.lib.literals.readString"
-literalsReadUint16 :: Core.Name
-literalsReadUint16 = Core.Name "hydra.lib.literals.readUint16"
-literalsReadUint32 :: Core.Name
-literalsReadUint32 = Core.Name "hydra.lib.literals.readUint32"
-literalsReadUint64 :: Core.Name
-literalsReadUint64 = Core.Name "hydra.lib.literals.readUint64"
-literalsReadUint8 :: Core.Name
-literalsReadUint8 = Core.Name "hydra.lib.literals.readUint8"
-literalsShowBigfloat :: Core.Name
-literalsShowBigfloat = Core.Name "hydra.lib.literals.showBigfloat"
-literalsShowBigint :: Core.Name
-literalsShowBigint = Core.Name "hydra.lib.literals.showBigint"
-literalsShowBoolean :: Core.Name
-literalsShowBoolean = Core.Name "hydra.lib.literals.showBoolean"
-literalsShowDecimal :: Core.Name
-literalsShowDecimal = Core.Name "hydra.lib.literals.showDecimal"
-literalsShowFloat32 :: Core.Name
-literalsShowFloat32 = Core.Name "hydra.lib.literals.showFloat32"
-literalsShowFloat64 :: Core.Name
-literalsShowFloat64 = Core.Name "hydra.lib.literals.showFloat64"
-literalsShowInt16 :: Core.Name
-literalsShowInt16 = Core.Name "hydra.lib.literals.showInt16"
-literalsShowInt32 :: Core.Name
-literalsShowInt32 = Core.Name "hydra.lib.literals.showInt32"
-literalsShowInt64 :: Core.Name
-literalsShowInt64 = Core.Name "hydra.lib.literals.showInt64"
-literalsShowInt8 :: Core.Name
-literalsShowInt8 = Core.Name "hydra.lib.literals.showInt8"
-literalsShowString :: Core.Name
-literalsShowString = Core.Name "hydra.lib.literals.showString"
-literalsShowUint16 :: Core.Name
-literalsShowUint16 = Core.Name "hydra.lib.literals.showUint16"
-literalsShowUint32 :: Core.Name
-literalsShowUint32 = Core.Name "hydra.lib.literals.showUint32"
-literalsShowUint64 :: Core.Name
-literalsShowUint64 = Core.Name "hydra.lib.literals.showUint64"
-literalsShowUint8 :: Core.Name
-literalsShowUint8 = Core.Name "hydra.lib.literals.showUint8"
-literalsStringToBinary :: Core.Name
-literalsStringToBinary = Core.Name "hydra.lib.literals.stringToBinary"
-literalsUint16ToBigint :: Core.Name
-literalsUint16ToBigint = Core.Name "hydra.lib.literals.uint16ToBigint"
-literalsUint32ToBigint :: Core.Name
-literalsUint32ToBigint = Core.Name "hydra.lib.literals.uint32ToBigint"
-literalsUint64ToBigint :: Core.Name
-literalsUint64ToBigint = Core.Name "hydra.lib.literals.uint64ToBigint"
-literalsUint8ToBigint :: Core.Name
-literalsUint8ToBigint = Core.Name "hydra.lib.literals.uint8ToBigint"
-logic :: Packaging.Namespace
-logic = Packaging.Namespace "hydra.lib.logic"
-logicAnd :: Core.Name
-logicAnd = Core.Name "hydra.lib.logic.and"
-logicIfElse :: Core.Name
-logicIfElse = Core.Name "hydra.lib.logic.ifElse"
-logicNot :: Core.Name
-logicNot = Core.Name "hydra.lib.logic.not"
-logicOr :: Core.Name
-logicOr = Core.Name "hydra.lib.logic.or"
-maps :: Packaging.Namespace
-maps = Packaging.Namespace "hydra.lib.maps"
-mapsAlter :: Core.Name
-mapsAlter = Core.Name "hydra.lib.maps.alter"
-mapsBimap :: Core.Name
-mapsBimap = Core.Name "hydra.lib.maps.bimap"
-mapsDelete :: Core.Name
-mapsDelete = Core.Name "hydra.lib.maps.delete"
-mapsElems :: Core.Name
-mapsElems = Core.Name "hydra.lib.maps.elems"
-mapsEmpty :: Core.Name
-mapsEmpty = Core.Name "hydra.lib.maps.empty"
-mapsFilter :: Core.Name
-mapsFilter = Core.Name "hydra.lib.maps.filter"
-mapsFilterWithKey :: Core.Name
-mapsFilterWithKey = Core.Name "hydra.lib.maps.filterWithKey"
-mapsFindWithDefault :: Core.Name
-mapsFindWithDefault = Core.Name "hydra.lib.maps.findWithDefault"
-mapsFromList :: Core.Name
-mapsFromList = Core.Name "hydra.lib.maps.fromList"
-mapsInsert :: Core.Name
-mapsInsert = Core.Name "hydra.lib.maps.insert"
-mapsKeys :: Core.Name
-mapsKeys = Core.Name "hydra.lib.maps.keys"
-mapsLookup :: Core.Name
-mapsLookup = Core.Name "hydra.lib.maps.lookup"
-mapsMap :: Core.Name
-mapsMap = Core.Name "hydra.lib.maps.map"
-mapsMapKeys :: Core.Name
-mapsMapKeys = Core.Name "hydra.lib.maps.mapKeys"
-mapsMember :: Core.Name
-mapsMember = Core.Name "hydra.lib.maps.member"
-mapsNull :: Core.Name
-mapsNull = Core.Name "hydra.lib.maps.null"
-mapsSingleton :: Core.Name
-mapsSingleton = Core.Name "hydra.lib.maps.singleton"
-mapsSize :: Core.Name
-mapsSize = Core.Name "hydra.lib.maps.size"
-mapsToList :: Core.Name
-mapsToList = Core.Name "hydra.lib.maps.toList"
-mapsUnion :: Core.Name
-mapsUnion = Core.Name "hydra.lib.maps.union"
-math :: Packaging.Namespace
-math = Packaging.Namespace "hydra.lib.math"
-mathAbs :: Core.Name
-mathAbs = Core.Name "hydra.lib.math.abs"
-mathAcos :: Core.Name
-mathAcos = Core.Name "hydra.lib.math.acos"
-mathAcosh :: Core.Name
-mathAcosh = Core.Name "hydra.lib.math.acosh"
-mathAdd :: Core.Name
-mathAdd = Core.Name "hydra.lib.math.add"
-mathAddFloat64 :: Core.Name
-mathAddFloat64 = Core.Name "hydra.lib.math.addFloat64"
-mathAsin :: Core.Name
-mathAsin = Core.Name "hydra.lib.math.asin"
-mathAsinh :: Core.Name
-mathAsinh = Core.Name "hydra.lib.math.asinh"
-mathAtan :: Core.Name
-mathAtan = Core.Name "hydra.lib.math.atan"
-mathAtan2 :: Core.Name
-mathAtan2 = Core.Name "hydra.lib.math.atan2"
-mathAtanh :: Core.Name
-mathAtanh = Core.Name "hydra.lib.math.atanh"
-mathCeiling :: Core.Name
-mathCeiling = Core.Name "hydra.lib.math.ceiling"
-mathCos :: Core.Name
-mathCos = Core.Name "hydra.lib.math.cos"
-mathCosh :: Core.Name
-mathCosh = Core.Name "hydra.lib.math.cosh"
-mathE :: Core.Name
-mathE = Core.Name "hydra.lib.math.e"
-mathEven :: Core.Name
-mathEven = Core.Name "hydra.lib.math.even"
-mathExp :: Core.Name
-mathExp = Core.Name "hydra.lib.math.exp"
-mathFloor :: Core.Name
-mathFloor = Core.Name "hydra.lib.math.floor"
-mathLog :: Core.Name
-mathLog = Core.Name "hydra.lib.math.log"
-mathLogBase :: Core.Name
-mathLogBase = Core.Name "hydra.lib.math.logBase"
-mathMax :: Core.Name
-mathMax = Core.Name "hydra.lib.math.max"
-mathMaybeDiv :: Core.Name
-mathMaybeDiv = Core.Name "hydra.lib.math.maybeDiv"
-mathMaybeMod :: Core.Name
-mathMaybeMod = Core.Name "hydra.lib.math.maybeMod"
-mathMaybePred :: Core.Name
-mathMaybePred = Core.Name "hydra.lib.math.maybePred"
-mathMaybeRem :: Core.Name
-mathMaybeRem = Core.Name "hydra.lib.math.maybeRem"
-mathMaybeSucc :: Core.Name
-mathMaybeSucc = Core.Name "hydra.lib.math.maybeSucc"
-mathMin :: Core.Name
-mathMin = Core.Name "hydra.lib.math.min"
-mathMul :: Core.Name
-mathMul = Core.Name "hydra.lib.math.mul"
-mathMulFloat64 :: Core.Name
-mathMulFloat64 = Core.Name "hydra.lib.math.mulFloat64"
-mathNegate :: Core.Name
-mathNegate = Core.Name "hydra.lib.math.negate"
-mathNegateFloat64 :: Core.Name
-mathNegateFloat64 = Core.Name "hydra.lib.math.negateFloat64"
-mathOdd :: Core.Name
-mathOdd = Core.Name "hydra.lib.math.odd"
-mathPi :: Core.Name
-mathPi = Core.Name "hydra.lib.math.pi"
-mathPow :: Core.Name
-mathPow = Core.Name "hydra.lib.math.pow"
-mathRange :: Core.Name
-mathRange = Core.Name "hydra.lib.math.range"
-mathRound :: Core.Name
-mathRound = Core.Name "hydra.lib.math.round"
-mathRoundBigfloat :: Core.Name
-mathRoundBigfloat = Core.Name "hydra.lib.math.roundBigfloat"
-mathRoundFloat32 :: Core.Name
-mathRoundFloat32 = Core.Name "hydra.lib.math.roundFloat32"
-mathRoundFloat64 :: Core.Name
-mathRoundFloat64 = Core.Name "hydra.lib.math.roundFloat64"
-mathSignum :: Core.Name
-mathSignum = Core.Name "hydra.lib.math.signum"
-mathSin :: Core.Name
-mathSin = Core.Name "hydra.lib.math.sin"
-mathSinh :: Core.Name
-mathSinh = Core.Name "hydra.lib.math.sinh"
-mathSqrt :: Core.Name
-mathSqrt = Core.Name "hydra.lib.math.sqrt"
-mathSub :: Core.Name
-mathSub = Core.Name "hydra.lib.math.sub"
-mathSubFloat64 :: Core.Name
-mathSubFloat64 = Core.Name "hydra.lib.math.subFloat64"
-mathTan :: Core.Name
-mathTan = Core.Name "hydra.lib.math.tan"
-mathTanh :: Core.Name
-mathTanh = Core.Name "hydra.lib.math.tanh"
-mathTruncate :: Core.Name
-mathTruncate = Core.Name "hydra.lib.math.truncate"
-maybes :: Packaging.Namespace
-maybes = Packaging.Namespace "hydra.lib.maybes"
-maybesApply :: Core.Name
-maybesApply = Core.Name "hydra.lib.maybes.apply"
-maybesBind :: Core.Name
-maybesBind = Core.Name "hydra.lib.maybes.bind"
-maybesCases :: Core.Name
-maybesCases = Core.Name "hydra.lib.maybes.cases"
-maybesCat :: Core.Name
-maybesCat = Core.Name "hydra.lib.maybes.cat"
-maybesCompose :: Core.Name
-maybesCompose = Core.Name "hydra.lib.maybes.compose"
-maybesFromMaybe :: Core.Name
-maybesFromMaybe = Core.Name "hydra.lib.maybes.fromMaybe"
-maybesIsJust :: Core.Name
-maybesIsJust = Core.Name "hydra.lib.maybes.isJust"
-maybesIsNothing :: Core.Name
-maybesIsNothing = Core.Name "hydra.lib.maybes.isNothing"
-maybesMap :: Core.Name
-maybesMap = Core.Name "hydra.lib.maybes.map"
-maybesMapMaybe :: Core.Name
-maybesMapMaybe = Core.Name "hydra.lib.maybes.mapMaybe"
-maybesMaybe :: Core.Name
-maybesMaybe = Core.Name "hydra.lib.maybes.maybe"
-maybesPure :: Core.Name
-maybesPure = Core.Name "hydra.lib.maybes.pure"
-maybesToList :: Core.Name
-maybesToList = Core.Name "hydra.lib.maybes.toList"
-pairs :: Packaging.Namespace
-pairs = Packaging.Namespace "hydra.lib.pairs"
-pairsBimap :: Core.Name
-pairsBimap = Core.Name "hydra.lib.pairs.bimap"
-pairsFirst :: Core.Name
-pairsFirst = Core.Name "hydra.lib.pairs.first"
-pairsSecond :: Core.Name
-pairsSecond = Core.Name "hydra.lib.pairs.second"
-regex :: Packaging.Namespace
-regex = Packaging.Namespace "hydra.lib.regex"
-regexFind :: Core.Name
-regexFind = Core.Name "hydra.lib.regex.find"
-regexFindAll :: Core.Name
-regexFindAll = Core.Name "hydra.lib.regex.findAll"
-regexMatches :: Core.Name
-regexMatches = Core.Name "hydra.lib.regex.matches"
-regexReplace :: Core.Name
-regexReplace = Core.Name "hydra.lib.regex.replace"
-regexReplaceAll :: Core.Name
-regexReplaceAll = Core.Name "hydra.lib.regex.replaceAll"
-regexSplit :: Core.Name
-regexSplit = Core.Name "hydra.lib.regex.split"
-sets :: Packaging.Namespace
-sets = Packaging.Namespace "hydra.lib.sets"
-setsDelete :: Core.Name
-setsDelete = Core.Name "hydra.lib.sets.delete"
-setsDifference :: Core.Name
-setsDifference = Core.Name "hydra.lib.sets.difference"
-setsEmpty :: Core.Name
-setsEmpty = Core.Name "hydra.lib.sets.empty"
-setsFromList :: Core.Name
-setsFromList = Core.Name "hydra.lib.sets.fromList"
-setsInsert :: Core.Name
-setsInsert = Core.Name "hydra.lib.sets.insert"
-setsIntersection :: Core.Name
-setsIntersection = Core.Name "hydra.lib.sets.intersection"
-setsMap :: Core.Name
-setsMap = Core.Name "hydra.lib.sets.map"
-setsMember :: Core.Name
-setsMember = Core.Name "hydra.lib.sets.member"
-setsNull :: Core.Name
-setsNull = Core.Name "hydra.lib.sets.null"
-setsSingleton :: Core.Name
-setsSingleton = Core.Name "hydra.lib.sets.singleton"
-setsSize :: Core.Name
-setsSize = Core.Name "hydra.lib.sets.size"
-setsToList :: Core.Name
-setsToList = Core.Name "hydra.lib.sets.toList"
-setsUnion :: Core.Name
-setsUnion = Core.Name "hydra.lib.sets.union"
-setsUnions :: Core.Name
-setsUnions = Core.Name "hydra.lib.sets.unions"
-strings :: Packaging.Namespace
-strings = Packaging.Namespace "hydra.lib.strings"
-stringsCat :: Core.Name
-stringsCat = Core.Name "hydra.lib.strings.cat"
-stringsCat2 :: Core.Name
-stringsCat2 = Core.Name "hydra.lib.strings.cat2"
-stringsFromList :: Core.Name
-stringsFromList = Core.Name "hydra.lib.strings.fromList"
-stringsIntercalate :: Core.Name
-stringsIntercalate = Core.Name "hydra.lib.strings.intercalate"
-stringsLength :: Core.Name
-stringsLength = Core.Name "hydra.lib.strings.length"
-stringsLines :: Core.Name
-stringsLines = Core.Name "hydra.lib.strings.lines"
-stringsMaybeCharAt :: Core.Name
-stringsMaybeCharAt = Core.Name "hydra.lib.strings.maybeCharAt"
-stringsNull :: Core.Name
-stringsNull = Core.Name "hydra.lib.strings.null"
-stringsSplitOn :: Core.Name
-stringsSplitOn = Core.Name "hydra.lib.strings.splitOn"
-stringsToList :: Core.Name
-stringsToList = Core.Name "hydra.lib.strings.toList"
-stringsToLower :: Core.Name
-stringsToLower = Core.Name "hydra.lib.strings.toLower"
-stringsToUpper :: Core.Name
-stringsToUpper = Core.Name "hydra.lib.strings.toUpper"
-stringsUnlines :: Core.Name
-stringsUnlines = Core.Name "hydra.lib.strings.unlines"
-typeclass :: Packaging.Namespace
-typeclass = Packaging.Namespace "hydra.typeclass"
-typeclassEq :: Core.Name
-typeclassEq = Core.Name "hydra.typeclass.Eq"
-typeclassOrd :: Core.Name
-typeclassOrd = Core.Name "hydra.typeclass.Ord"
diff --git a/src/main/haskell/Hydra/Lib/Pairs.hs b/src/main/haskell/Hydra/Lib/Pairs.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Pairs.hs
+++ /dev/null
@@ -1,18 +0,0 @@
--- | Haskell implementations of hydra.lib.pairs primitives
-
-module Hydra.Lib.Pairs where
-
-import qualified Data.Bifunctor as BF
-
-
--- | Map over both elements of a pair.
-bimap :: (a -> c) -> (b -> d) -> (a, b) -> (c, d)
-bimap = BF.bimap
-
--- | Get the first element of a pair.
-first :: (a, b) -> a
-first (x, _) = x
-
--- | Get the second element of a pair.
-second :: (a, b) -> b
-second (_, y) = y
diff --git a/src/main/haskell/Hydra/Lib/Regex.hs b/src/main/haskell/Hydra/Lib/Regex.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Regex.hs
+++ /dev/null
@@ -1,48 +0,0 @@
--- | Haskell implementations of hydra.lib.regex primitives
-
-module Hydra.Lib.Regex where
-
-import qualified Text.Regex.TDFA as R
-
-
--- | Find the first substring matching a regex pattern.
-find :: String -> String -> Maybe String
-find pattern input = case (input R.=~ pattern :: (String, String, String)) of
-  (_, match, _)
-    | null match -> Nothing
-    | otherwise  -> Just match
-
--- | Find all non-overlapping substrings matching a regex pattern.
-findAll :: String -> String -> [String]
-findAll pattern input = R.getAllTextMatches (input R.=~ pattern :: R.AllTextMatches [] String)
-
--- | Check whether an entire string matches a regex pattern.
-matches :: String -> String -> Bool
-matches pattern input = input R.=~ ("^(" ++ pattern ++ ")$" :: String) :: Bool
-
--- | Replace the first occurrence of a regex pattern with a replacement string.
-replace :: String -> String -> String -> String
-replace pattern replacement input = case (input R.=~ pattern :: (String, String, String)) of
-  (before, match, after)
-    | null match -> input
-    | otherwise  -> before ++ replacement ++ after
-
--- | Replace all non-overlapping occurrences of a regex pattern with a replacement string.
-replaceAll :: String -> String -> String -> String
-replaceAll pattern replacement input = go input
-  where
-    go "" = ""
-    go s = case (s R.=~ pattern :: (String, String, String)) of
-      (before, match, after)
-        | null match -> s
-        | otherwise  -> before ++ replacement ++ go after
-
--- | Split a string by a regex pattern.
-split :: String -> String -> [String]
-split pattern input = go input
-  where
-    go "" = [""]
-    go s = case (s R.=~ pattern :: (String, String, String)) of
-      (before, match, after)
-        | null match -> [s]
-        | otherwise  -> before : go after
diff --git a/src/main/haskell/Hydra/Lib/Sets.hs b/src/main/haskell/Hydra/Lib/Sets.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Sets.hs
+++ /dev/null
@@ -1,64 +0,0 @@
--- | Haskell implementations of hydra.lib.sets primitives
-
-module Hydra.Lib.Sets where
-
-import qualified Data.Set as S
-
-
--- | Delete an element from a set.
-delete :: Ord x => x -> S.Set x -> S.Set x
-delete = S.delete
-
--- | Compute the difference of two sets.
-difference :: Ord x => S.Set x -> S.Set x -> S.Set x
-difference = S.difference
-
--- | Create an empty set.
-empty :: S.Set x
-empty = S.empty
-
--- | Create a set from a list.
-fromList :: Ord x => [x] -> S.Set x
-fromList = S.fromList
-
--- | Insert an element into a set.
-insert :: Ord x => x -> S.Set x -> S.Set x
-insert = S.insert
-
--- | Compute the intersection of two sets.
-intersection :: Ord x => S.Set x -> S.Set x -> S.Set x
-intersection = S.intersection
-
--- | Map a function over a set.
--- Note: the presence of a 'map' function does not imply that sets are a functor in Hydra
-map :: Ord y => (x -> y) -> S.Set x -> S.Set y
-map f = S.fromList . fmap f . S.toList
-
--- | Check if an element is in a set.
-member :: Ord x => x -> S.Set x -> Bool
-member = S.member
-
--- | Check if a set is empty.
-null :: S.Set x -> Bool
-null = S.null
-
--- | Create a singleton set.
--- Consider renaming this to Sets.pure, or creating an alias
-singleton :: x -> S.Set x
-singleton = S.singleton
-
--- | Get the size of a set.
-size :: S.Set x -> Int
-size = S.size
-
--- | Convert a set to a list.
-toList :: Ord x => S.Set x -> [x]
-toList = S.toList
-
--- | Compute the union of two sets.
-union :: Ord x => S.Set x -> S.Set x -> S.Set x
-union = S.union
-
--- | Compute the union of multiple sets.
-unions :: Ord x => [S.Set x] -> S.Set x
-unions = S.unions
diff --git a/src/main/haskell/Hydra/Lib/Strings.hs b/src/main/haskell/Hydra/Lib/Strings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lib/Strings.hs
+++ /dev/null
@@ -1,62 +0,0 @@
--- | Haskell implementations of hydra.lib.strings primitives
-
-module Hydra.Lib.Strings where
-
-import qualified Data.Char as C
-import qualified Data.List as L
-import qualified Data.List.Split as LS
-
-
--- | Concatenate a list of strings into a single string.
-cat :: [String] -> String
-cat = L.concat
-
--- | Concatenate two strings.
-cat2 :: String -> String -> String
-cat2 s1 s2 = s1 ++ s2
-
--- | Convert a list of Unicode code points to a string.
-fromList :: [Int] -> String
-fromList = fmap C.chr
-
--- | Join a list of strings with a separator between each element.
-intercalate :: String -> [String] -> String
-intercalate = L.intercalate
-
--- | Return the length of a string.
-length :: String -> Int
-length = L.length
-
--- | Get the Unicode code point of the character at a specific index, returning Nothing if out of bounds.
-maybeCharAt :: Int -> String -> Maybe Int
-maybeCharAt i s
-  | i < 0 || i >= L.length s = Nothing
-  | otherwise = Just (C.ord (s !! i))
-
--- | Split a string into lines.
-lines :: String -> [String]
-lines = L.lines
-
--- | Check whether a string is empty.
-null :: String -> Bool
-null = L.null
-
--- | Split a string on a delimiter string.
-splitOn :: String -> String -> [String]
-splitOn = LS.splitOn
-
--- | Convert a string to a list of Unicode code points.
-toList :: String -> [Int]
-toList = fmap C.ord
-
--- | Convert a string to lowercase.
-toLower :: String -> String
-toLower = fmap C.toLower
-
--- | Convert a string to uppercase.
-toUpper :: String -> String
-toUpper = fmap C.toUpper
-
--- | Join a list of strings with newlines, appending a trailing newline.
-unlines :: [String] -> String
-unlines = L.unlines
diff --git a/src/main/haskell/Hydra/Lisp/Coder.hs b/src/main/haskell/Hydra/Lisp/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lisp/Coder.hs
+++ /dev/null
@@ -1,553 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Lisp code generator: converts Hydra type and term modules to Lisp AST
-
-module Hydra.Lisp.Coder where
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Core as Core
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Lisp.Language as Language
-import qualified Hydra.Lisp.Syntax as Syntax
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-dialectCadr :: Syntax.Dialect -> String
-dialectCadr d =
-    case d of
-      Syntax.DialectClojure -> "second"
-      _ -> "cadr"
-dialectCar :: Syntax.Dialect -> String
-dialectCar d =
-    case d of
-      Syntax.DialectClojure -> "first"
-      _ -> "car"
-dialectConstructorPrefix :: Syntax.Dialect -> String
-dialectConstructorPrefix d =
-    case d of
-      Syntax.DialectClojure -> "->"
-      _ -> "make-"
-dialectEqual :: Syntax.Dialect -> String
-dialectEqual d =
-    case d of
-      Syntax.DialectClojure -> "="
-      Syntax.DialectCommonLisp -> "equal"
-      Syntax.DialectEmacsLisp -> "equal"
-      _ -> "equal?"
-dialectSupportsLetrec :: Syntax.Dialect -> Bool
-dialectSupportsLetrec d =
-    case d of
-      Syntax.DialectClojure -> False
-      _ -> True
-encodeApplication :: Syntax.Dialect -> t0 -> t1 -> Core.Term -> Core.Term -> Either t2 Syntax.Expression
-encodeApplication dialect cx g rawFun rawArg =
-
-      let dFun = Strip.deannotateTerm rawFun
-          normal =
-                  Eithers.bind (encodeTerm dialect cx g rawFun) (\fun -> Eithers.bind (encodeTerm dialect cx g rawArg) (\arg -> Right (lispApp fun [
-                    arg])))
-          enc = \t -> encodeTerm dialect cx g t
-      in case dFun of
-        Core.TermApplication v0 ->
-          let midFun = Core.applicationFunction v0
-              midArg = Core.applicationArgument v0
-              dMidFun = Strip.deannotateTerm midFun
-              isLazy2 =
-                      Logic.or (isPrimitiveRef "hydra.lib.eithers.fromLeft" dMidFun) (Logic.or (isPrimitiveRef "hydra.lib.eithers.fromRight" dMidFun) (isPrimitiveRef "hydra.lib.maybes.fromMaybe" dMidFun))
-          in (Logic.ifElse isLazy2 (Eithers.bind (enc midFun) (\ePrim -> Eithers.bind (enc midArg) (\eDef -> Eithers.bind (enc rawArg) (\eArg -> Right (lispApp (lispApp ePrim [
-            wrapInThunk eDef]) [
-            eArg]))))) (case dMidFun of
-            Core.TermApplication v1 ->
-              let innerFun = Core.applicationFunction v1
-                  innerArg = Core.applicationArgument v1
-                  dInnerFun = Strip.deannotateTerm innerFun
-              in (Logic.ifElse (isPrimitiveRef "hydra.lib.logic.ifElse" dInnerFun) (Eithers.bind (enc innerArg) (\eC -> Eithers.bind (enc midArg) (\eT -> Eithers.bind (enc rawArg) (\eE -> Right (Syntax.ExpressionIf (Syntax.IfExpression {
-                Syntax.ifExpressionCondition = eC,
-                Syntax.ifExpressionThen = eT,
-                Syntax.ifExpressionElse = (Just eE)})))))) (Logic.ifElse (isPrimitiveRef "hydra.lib.maybes.maybe" dInnerFun) (Eithers.bind (enc innerFun) (\eP -> Eithers.bind (enc innerArg) (\eDef -> Eithers.bind (enc midArg) (\eF -> Eithers.bind (enc rawArg) (\eM -> Right (lispApp (lispApp (lispApp eP [
-                wrapInThunk eDef]) [
-                eF]) [
-                eM])))))) (Logic.ifElse (isPrimitiveRef "hydra.lib.maybes.cases" dInnerFun) (Eithers.bind (enc innerFun) (\eP -> Eithers.bind (enc innerArg) (\eM -> Eithers.bind (enc midArg) (\eN -> Eithers.bind (enc rawArg) (\eJ -> Right (lispApp (lispApp (lispApp eP [
-                eM]) [
-                wrapInThunk eN]) [
-                eJ])))))) normal)))
-            _ -> normal))
-        _ -> normal
-encodeFieldDef :: Core.FieldType -> Syntax.FieldDefinition
-encodeFieldDef ft =
-
-      let fname = Core.unName (Core.fieldTypeName ft)
-      in Syntax.FieldDefinition {
-        Syntax.fieldDefinitionName = (Syntax.Symbol (Formatting.convertCaseCamelToLowerSnake fname)),
-        Syntax.fieldDefinitionDefaultValue = Nothing}
-encodeLambdaTerm :: Syntax.Dialect -> t0 -> t1 -> Core.Lambda -> Either t2 Syntax.Expression
-encodeLambdaTerm dialect cx g lam =
-
-      let param =
-              Formatting.convertCaseCamelOrUnderscoreToLowerSnake (Formatting.sanitizeWithUnderscores Language.lispReservedWords (Core.unName (Core.lambdaParameter lam)))
-      in (Eithers.bind (encodeTerm dialect cx g (Core.lambdaBody lam)) (\body -> Right (lispLambdaExpr [
-        param] body)))
-encodeLetAsLambdaApp :: Syntax.Dialect -> t0 -> t1 -> [Core.Binding] -> Core.Term -> Either t2 Syntax.Expression
-encodeLetAsLambdaApp dialect cx g bindings body =
-    Eithers.bind (encodeTerm dialect cx g body) (\bodyExpr -> Eithers.foldl (\acc -> \b ->
-      let bname =
-              Formatting.convertCaseCamelOrUnderscoreToLowerSnake (Formatting.sanitizeWithUnderscores Language.lispReservedWords (Core.unName (Core.bindingName b)))
-      in (Eithers.bind (encodeTerm dialect cx g (Core.bindingTerm b)) (\bval -> Right (lispApp (lispLambdaExpr [
-        bname] acc) [
-        bval])))) bodyExpr (Lists.reverse bindings))
-encodeLetAsNative :: Syntax.Dialect -> t0 -> t1 -> [Core.Binding] -> Core.Term -> Either t2 Syntax.Expression
-encodeLetAsNative dialect cx g bindings body =
-    Eithers.bind (encodeTerm dialect cx g body) (\bodyExpr ->
-      let supportsLetrec = dialectSupportsLetrec dialect
-          allNames = Sets.fromList (Lists.map (\b -> Core.bindingName b) bindings)
-          adjList =
-                  Lists.map (\b -> (Core.bindingName b, (Sets.toList (Sets.intersection allNames (Variables.freeVariablesInTerm (Core.bindingTerm b)))))) bindings
-          sccs = Sorting.topologicalSortComponents adjList
-          nameToBinding = Maps.fromList (Lists.map (\b -> (Core.bindingName b, b)) bindings)
-          sortedBindings = Maybes.cat (Lists.map (\name -> Maps.lookup name nameToBinding) (Lists.concat sccs))
-          hasCycle = Lists.foldl (\acc -> \scc -> Logic.or acc (Equality.gt (Lists.length scc) 1)) False sccs
-      in (Eithers.bind (Eithers.mapList (\b ->
-        let bname =
-                Formatting.convertCaseCamelOrUnderscoreToLowerSnake (Formatting.sanitizeWithUnderscores Language.lispReservedWords (Core.unName (Core.bindingName b)))
-            isSelfRef = Sets.member (Core.bindingName b) (Variables.freeVariablesInTerm (Core.bindingTerm b))
-            isLambda =
-                    case (Strip.deannotateTerm (Core.bindingTerm b)) of
-                      Core.TermLambda _ -> True
-                      _ -> False
-        in (Eithers.bind (encodeTerm dialect cx g (Core.bindingTerm b)) (\bval ->
-          let isClojure = Logic.not supportsLetrec
-              wrappedVal =
-                      Logic.ifElse isClojure (Logic.ifElse isSelfRef (Logic.ifElse isLambda (case bval of
-                        Syntax.ExpressionLambda v0 -> Syntax.ExpressionLambda (Syntax.Lambda {
-                          Syntax.lambdaName = (Just (Syntax.Symbol bname)),
-                          Syntax.lambdaParams = (Syntax.lambdaParams v0),
-                          Syntax.lambdaRestParam = (Syntax.lambdaRestParam v0),
-                          Syntax.lambdaBody = (Syntax.lambdaBody v0)})
-                        _ -> bval) (lispNamedLambdaExpr bname [
-                        "_arg"] (lispApp bval [
-                        lispVar "_arg"]))) bval) (Logic.ifElse (Logic.and isSelfRef (Logic.not isLambda)) (lispLambdaExpr [
-                        "_arg"] (lispApp bval [
-                        lispVar "_arg"])) bval)
-          in (Right (bname, wrappedVal))))) sortedBindings) (\encodedBindings ->
-        let hasSelfRef =
-                Lists.foldl (\acc -> \b -> Logic.or acc (Sets.member (Core.bindingName b) (Variables.freeVariablesInTerm (Core.bindingTerm b)))) False bindings
-            isRecursive = Logic.or hasSelfRef hasCycle
-            letKind =
-                    Logic.ifElse isRecursive Syntax.LetKindRecursive (Logic.ifElse (Equality.lte (Lists.length bindings) 1) Syntax.LetKindParallel Syntax.LetKindSequential)
-            lispBindings =
-                    Lists.map (\eb -> Syntax.LetBindingSimple (Syntax.SimpleBinding {
-                      Syntax.simpleBindingName = (Syntax.Symbol (Pairs.first eb)),
-                      Syntax.simpleBindingValue = (Pairs.second eb)})) encodedBindings
-        in (Right (Syntax.ExpressionLet (Syntax.LetExpression {
-          Syntax.letExpressionKind = letKind,
-          Syntax.letExpressionBindings = lispBindings,
-          Syntax.letExpressionBody = [
-            bodyExpr]}))))))
-encodeLiteral :: Core.Literal -> Syntax.Expression
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBoolean v0 -> Syntax.ExpressionLiteral (Syntax.LiteralBoolean v0)
-      Core.LiteralDecimal v0 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-        Syntax.floatLiteralValue = (Literals.float64ToBigfloat (Literals.decimalToFloat64 v0)),
-        Syntax.floatLiteralPrecision = Nothing}))
-      Core.LiteralString v0 -> Syntax.ExpressionLiteral (Syntax.LiteralString v0)
-      Core.LiteralFloat v0 -> case v0 of
-        Core.FloatValueFloat32 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-          Syntax.floatLiteralValue = (Literals.float32ToBigfloat v1),
-          Syntax.floatLiteralPrecision = Nothing}))
-        Core.FloatValueFloat64 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-          Syntax.floatLiteralValue = (Literals.float64ToBigfloat v1),
-          Syntax.floatLiteralPrecision = Nothing}))
-        Core.FloatValueBigfloat v1 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-          Syntax.floatLiteralValue = v1,
-          Syntax.floatLiteralPrecision = Nothing}))
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueInt8 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int8ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueInt16 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int16ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueInt32 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int32ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueInt64 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int64ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueUint8 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint8ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueUint16 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint16ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueUint32 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint32ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueUint64 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint64ToBigint v1),
-          Syntax.integerLiteralBigint = False}))
-        Core.IntegerValueBigint v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = v1,
-          Syntax.integerLiteralBigint = True}))
-      Core.LiteralBinary v0 ->
-        let byteValues = Literals.binaryToBytes v0
-        in (Syntax.ExpressionVector (Syntax.VectorLiteral {
-          Syntax.vectorLiteralElements = (Lists.map (\bv -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-            Syntax.integerLiteralValue = (Literals.int32ToBigint bv),
-            Syntax.integerLiteralBigint = False}))) byteValues)}))
-encodeProjectionElim :: Syntax.Dialect -> t0 -> t1 -> Core.Projection -> Maybe Core.Term -> Either t2 Syntax.Expression
-encodeProjectionElim dialect cx g proj marg =
-
-      let fname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.projectionField proj))
-          tname = qualifiedSnakeName (Core.projectionTypeName proj)
-      in (Maybes.cases marg (Right (lispLambdaExpr [
-        "v"] (Syntax.ExpressionFieldAccess (Syntax.FieldAccess {
-        Syntax.fieldAccessRecordType = (Syntax.Symbol tname),
-        Syntax.fieldAccessField = (Syntax.Symbol fname),
-        Syntax.fieldAccessTarget = (lispVar "v")})))) (\arg -> Eithers.bind (encodeTerm dialect cx g arg) (\sarg -> Right (Syntax.ExpressionFieldAccess (Syntax.FieldAccess {
-        Syntax.fieldAccessRecordType = (Syntax.Symbol tname),
-        Syntax.fieldAccessField = (Syntax.Symbol fname),
-        Syntax.fieldAccessTarget = sarg})))))
-encodeTerm :: Syntax.Dialect -> t0 -> t1 -> Core.Term -> Either t2 Syntax.Expression
-encodeTerm dialect cx g term =
-    case term of
-      Core.TermAnnotated v0 -> encodeTerm dialect cx g (Core.annotatedTermBody v0)
-      Core.TermApplication v0 ->
-        let rawFun = Core.applicationFunction v0
-            rawArg = Core.applicationArgument v0
-        in (encodeApplication dialect cx g rawFun rawArg)
-      Core.TermEither v0 -> Eithers.either (\l -> Eithers.bind (encodeTerm dialect cx g l) (\sl -> Right (lispApp (lispVar "list") [
-        lispKeyword "left",
-        sl]))) (\r -> Eithers.bind (encodeTerm dialect cx g r) (\sr -> Right (lispApp (lispVar "list") [
-        lispKeyword "right",
-        sr]))) v0
-      Core.TermLambda v0 -> encodeLambdaTerm dialect cx g v0
-      Core.TermProject v0 -> encodeProjectionElim dialect cx g v0 Nothing
-      Core.TermCases v0 -> encodeUnionElim dialect cx g v0 Nothing
-      Core.TermUnwrap v0 -> encodeUnwrapElim dialect cx g v0 Nothing
-      Core.TermLet v0 ->
-        let bindings = Core.letBindings v0
-            body = Core.letBody v0
-        in (encodeLetAsNative dialect cx g bindings body)
-      Core.TermList v0 -> Eithers.bind (Eithers.mapList (encodeTerm dialect cx g) v0) (\sels -> Right (lispListExpr sels))
-      Core.TermLiteral v0 -> Right (encodeLiteral v0)
-      Core.TermMap v0 -> Eithers.bind (Eithers.mapList (\entry -> Eithers.bind (encodeTerm dialect cx g (Pairs.first entry)) (\k -> Eithers.bind (encodeTerm dialect cx g (Pairs.second entry)) (\v -> Right (Syntax.MapEntry {
-        Syntax.mapEntryKey = k,
-        Syntax.mapEntryValue = v})))) (Maps.toList v0)) (\pairs -> Right (Syntax.ExpressionMap (Syntax.MapLiteral {
-        Syntax.mapLiteralEntries = pairs})))
-      Core.TermMaybe v0 -> Maybes.cases v0 (Right (lispApp (lispVar "list") [
-        lispKeyword "nothing"])) (\val -> Eithers.bind (encodeTerm dialect cx g val) (\sval -> Right (lispApp (lispVar "list") [
-        lispKeyword "just",
-        sval])))
-      Core.TermPair v0 -> Eithers.bind (encodeTerm dialect cx g (Pairs.first v0)) (\f -> Eithers.bind (encodeTerm dialect cx g (Pairs.second v0)) (\s -> Right (lispListExpr [
-        f,
-        s])))
-      Core.TermRecord v0 ->
-        let rname = Core.recordTypeName v0
-            fields = Core.recordFields v0
-        in (Eithers.bind (Eithers.mapList (\f -> encodeTerm dialect cx g (Core.fieldTerm f)) fields) (\sfields ->
-          let constructorName = Strings.cat2 (dialectConstructorPrefix dialect) (qualifiedSnakeName rname)
-          in (Right (lispApp (lispVar constructorName) sfields))))
-      Core.TermSet v0 -> Eithers.bind (Eithers.mapList (encodeTerm dialect cx g) (Sets.toList v0)) (\sels -> Right (Syntax.ExpressionSet (Syntax.SetLiteral {
-        Syntax.setLiteralElements = sels})))
-      Core.TermInject v0 ->
-        let tname = Names.localNameOf (Core.injectionTypeName v0)
-            field = Core.injectionField v0
-            fname = Core.unName (Core.fieldName field)
-            fterm = Core.fieldTerm field
-            dterm = Strip.deannotateTerm fterm
-            isUnit =
-                    case dterm of
-                      Core.TermUnit -> True
-                      Core.TermRecord v1 -> Lists.null (Core.recordFields v1)
-                      _ -> False
-        in (Logic.ifElse isUnit (Right (lispApp (lispVar "list") [
-          lispKeyword (Formatting.convertCaseCamelToLowerSnake fname),
-          lispNilExpr])) (Eithers.bind (encodeTerm dialect cx g fterm) (\sval -> Right (lispApp (lispVar "list") [
-          lispKeyword (Formatting.convertCaseCamelToLowerSnake fname),
-          sval]))))
-      Core.TermUnit -> Right lispNilExpr
-      Core.TermVariable v0 -> Right (lispVar (Formatting.convertCaseCamelOrUnderscoreToLowerSnake (Formatting.sanitizeWithUnderscores Language.lispReservedWords (Core.unName v0))))
-      Core.TermTypeApplication v0 -> encodeTerm dialect cx g (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> encodeTerm dialect cx g (Core.typeLambdaBody v0)
-      Core.TermWrap v0 -> encodeTerm dialect cx g (Core.wrappedTermBody v0)
-encodeTermDefinition :: Syntax.Dialect -> t0 -> t1 -> Packaging.TermDefinition -> Either t2 Syntax.TopLevelFormWithComments
-encodeTermDefinition dialect cx g tdef =
-
-      let name = Packaging.termDefinitionName tdef
-          term = Packaging.termDefinitionTerm tdef
-          lname = qualifiedSnakeName name
-          dterm = Strip.deannotateTerm term
-      in case dterm of
-        Core.TermLambda _ -> Eithers.bind (encodeTerm dialect cx g term) (\sterm -> Right (lispTopForm (Syntax.TopLevelFormVariable (Syntax.VariableDefinition {
-          Syntax.variableDefinitionName = (Syntax.Symbol lname),
-          Syntax.variableDefinitionValue = sterm,
-          Syntax.variableDefinitionDoc = Nothing}))))
-        _ -> Eithers.bind (encodeTerm dialect cx g term) (\sterm -> Right (lispTopForm (Syntax.TopLevelFormVariable (Syntax.VariableDefinition {
-          Syntax.variableDefinitionName = (Syntax.Symbol lname),
-          Syntax.variableDefinitionValue = sterm,
-          Syntax.variableDefinitionDoc = Nothing}))))
-encodeType :: t0 -> t1 -> Core.Type -> Either t2 Syntax.TypeSpecifier
-encodeType cx g t =
-
-      let typ = Strip.deannotateType t
-      in case typ of
-        Core.TypeAnnotated v0 -> encodeType cx g (Core.annotatedTypeBody v0)
-        Core.TypeApplication v0 -> encodeType cx g (Core.applicationTypeFunction v0)
-        Core.TypeUnit -> Right Syntax.TypeSpecifierUnit
-        Core.TypeLiteral v0 -> Right (case v0 of
-          Core.LiteralTypeBinary -> Syntax.TypeSpecifierNamed (Syntax.Symbol "ByteArray")
-          Core.LiteralTypeBoolean -> Syntax.TypeSpecifierNamed (Syntax.Symbol "Boolean")
-          Core.LiteralTypeDecimal -> Syntax.TypeSpecifierNamed (Syntax.Symbol "Decimal")
-          Core.LiteralTypeFloat _ -> Syntax.TypeSpecifierNamed (Syntax.Symbol "Float")
-          Core.LiteralTypeInteger _ -> Syntax.TypeSpecifierNamed (Syntax.Symbol "Integer")
-          Core.LiteralTypeString -> Syntax.TypeSpecifierNamed (Syntax.Symbol "String"))
-        Core.TypeList v0 -> Eithers.map (\enc -> Syntax.TypeSpecifierList enc) (encodeType cx g v0)
-        Core.TypeSet v0 -> Eithers.map (\enc -> Syntax.TypeSpecifierSet enc) (encodeType cx g v0)
-        Core.TypeMap _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Map"))
-        Core.TypeMaybe v0 -> Eithers.map (\enc -> Syntax.TypeSpecifierMaybe enc) (encodeType cx g v0)
-        Core.TypeEither _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Either"))
-        Core.TypePair _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Pair"))
-        Core.TypeFunction _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Function"))
-        Core.TypeRecord _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Record"))
-        Core.TypeUnion _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Union"))
-        Core.TypeWrap _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Wrapper"))
-        Core.TypeVariable v0 -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol (Core.unName v0)))
-        Core.TypeForall v0 -> encodeType cx g (Core.forallTypeBody v0)
-        _ -> Right (Syntax.TypeSpecifierNamed (Syntax.Symbol "Any"))
-encodeTypeBody :: String -> Core.Type -> Core.Type -> Either t0 Syntax.TopLevelFormWithComments
-encodeTypeBody lname origTyp typ =
-    case typ of
-      Core.TypeForall v0 -> encodeTypeBody lname origTyp (Core.forallTypeBody v0)
-      Core.TypeRecord v0 ->
-        let fields = Lists.map encodeFieldDef v0
-        in (Right (lispTopForm (Syntax.TopLevelFormRecordType (Syntax.RecordTypeDefinition {
-          Syntax.recordTypeDefinitionName = (Syntax.Symbol lname),
-          Syntax.recordTypeDefinitionFields = fields,
-          Syntax.recordTypeDefinitionDoc = Nothing}))))
-      Core.TypeUnion v0 ->
-        let variantNames =
-                Lists.map (\f -> Syntax.ExpressionLiteral (Syntax.LiteralKeyword (Syntax.Keyword {
-                  Syntax.keywordName = (Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.fieldTypeName f))),
-                  Syntax.keywordNamespace = Nothing}))) v0
-        in (Right (lispTopForm (Syntax.TopLevelFormVariable (Syntax.VariableDefinition {
-          Syntax.variableDefinitionName = (Syntax.Symbol (Strings.cat2 lname "-variants")),
-          Syntax.variableDefinitionValue = (lispListExpr variantNames),
-          Syntax.variableDefinitionDoc = (Just (Syntax.Docstring (Strings.cat2 "Variants of the " lname)))}))))
-      Core.TypeWrap _ -> Right (lispTopForm (Syntax.TopLevelFormRecordType (Syntax.RecordTypeDefinition {
-        Syntax.recordTypeDefinitionName = (Syntax.Symbol lname),
-        Syntax.recordTypeDefinitionFields = [
-          Syntax.FieldDefinition {
-            Syntax.fieldDefinitionName = (Syntax.Symbol "value"),
-            Syntax.fieldDefinitionDefaultValue = Nothing}],
-        Syntax.recordTypeDefinitionDoc = Nothing})))
-      _ -> Right (Syntax.TopLevelFormWithComments {
-        Syntax.topLevelFormWithCommentsDoc = Nothing,
-        Syntax.topLevelFormWithCommentsComment = (Just (Syntax.Comment {
-          Syntax.commentStyle = Syntax.CommentStyleLine,
-          Syntax.commentText = (Strings.cat2 (Strings.cat2 lname " = ") (ShowCore.type_ origTyp))})),
-        Syntax.topLevelFormWithCommentsForm = (Syntax.TopLevelFormExpression (Syntax.ExpressionLiteral Syntax.LiteralNil))})
-encodeTypeDefinition :: t0 -> t1 -> Packaging.TypeDefinition -> Either t2 Syntax.TopLevelFormWithComments
-encodeTypeDefinition cx g tdef =
-
-      let name = Packaging.typeDefinitionName tdef
-          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme tdef)
-          lname = qualifiedSnakeName name
-          dtyp = Strip.deannotateType typ
-      in (encodeTypeBody lname typ dtyp)
-encodeUnionElim :: Syntax.Dialect -> t0 -> t1 -> Core.CaseStatement -> Maybe Core.Term -> Either t2 Syntax.Expression
-encodeUnionElim dialect cx g cs marg =
-
-      let tname = Names.localNameOf (Core.caseStatementTypeName cs)
-          caseFields = Core.caseStatementCases cs
-          defCase = Core.caseStatementDefault cs
-      in (Eithers.bind (Eithers.mapList (\cf ->
-        let cfname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.fieldName cf))
-            cfterm = Core.fieldTerm cf
-            condExpr =
-                    lispApp (lispVar (dialectEqual dialect)) [
-                      lispApp (lispVar (dialectCar dialect)) [
-                        lispVar "match_target"],
-                      (lispKeyword cfname)]
-        in (Eithers.bind (encodeTerm dialect cx g (Core.TermApplication (Core.Application {
-          Core.applicationFunction = cfterm,
-          Core.applicationArgument = (Core.TermVariable (Core.Name "match_value"))}))) (\bodyExpr -> Right (Syntax.CondClause {
-          Syntax.condClauseCondition = condExpr,
-          Syntax.condClauseBody = bodyExpr})))) caseFields) (\clauses -> Eithers.bind (Maybes.cases defCase (Right Nothing) (\dt -> Eithers.bind (encodeTerm dialect cx g dt) (\defBody -> Right (Just defBody)))) (\defExpr ->
-        let condExpr =
-                Syntax.ExpressionCond (Syntax.CondExpression {
-                  Syntax.condExpressionClauses = clauses,
-                  Syntax.condExpressionDefault = defExpr})
-            innerExpr =
-                    lispApp (lispLambdaExpr [
-                      "match_value"] condExpr) [
-                      lispApp (lispVar (dialectCadr dialect)) [
-                        lispVar "match_target"]]
-        in (Maybes.cases marg (Right (lispLambdaExpr [
-          "match_target"] innerExpr)) (\arg -> Eithers.bind (encodeTerm dialect cx g arg) (\sarg -> Right (lispApp (lispLambdaExpr [
-          "match_target"] innerExpr) [
-          sarg])))))))
-encodeUnwrapElim :: Syntax.Dialect -> t0 -> t1 -> Core.Name -> Maybe Core.Term -> Either t2 Syntax.Expression
-encodeUnwrapElim dialect cx g name marg =
-    Maybes.cases marg (Right (lispLambdaExpr [
-      "v"] (lispVar "v"))) (\arg -> encodeTerm dialect cx g arg)
-isCasesPrimitive :: Core.Name -> Bool
-isCasesPrimitive name = Equality.equal name (Core.Name "hydra.lib.maybes.cases")
-isLazy2ArgPrimitive :: Core.Name -> Bool
-isLazy2ArgPrimitive name =
-    Logic.or (Equality.equal name (Core.Name "hydra.lib.eithers.fromLeft")) (Logic.or (Equality.equal name (Core.Name "hydra.lib.eithers.fromRight")) (Equality.equal name (Core.Name "hydra.lib.maybes.fromMaybe")))
-isLazy3ArgPrimitive :: Core.Name -> Bool
-isLazy3ArgPrimitive name = Equality.equal name (Core.Name "hydra.lib.maybes.maybe")
-isPrimitiveRef :: String -> Core.Term -> Bool
-isPrimitiveRef primName term =
-    case term of
-      Core.TermVariable v0 -> Equality.equal (Core.unName v0) primName
-      Core.TermAnnotated v0 -> isPrimitiveRef primName (Core.annotatedTermBody v0)
-      Core.TermTypeApplication v0 -> isPrimitiveRef primName (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> isPrimitiveRef primName (Core.typeLambdaBody v0)
-      _ -> False
-lispApp :: Syntax.Expression -> [Syntax.Expression] -> Syntax.Expression
-lispApp fun args =
-    Syntax.ExpressionApplication (Syntax.Application {
-      Syntax.applicationFunction = fun,
-      Syntax.applicationArguments = args})
-lispKeyword :: String -> Syntax.Expression
-lispKeyword name =
-    Syntax.ExpressionLiteral (Syntax.LiteralKeyword (Syntax.Keyword {
-      Syntax.keywordName = name,
-      Syntax.keywordNamespace = Nothing}))
-lispLambdaExpr :: [String] -> Syntax.Expression -> Syntax.Expression
-lispLambdaExpr params body =
-    Syntax.ExpressionLambda (Syntax.Lambda {
-      Syntax.lambdaName = Nothing,
-      Syntax.lambdaParams = (Lists.map (\p -> Syntax.Symbol p) params),
-      Syntax.lambdaRestParam = Nothing,
-      Syntax.lambdaBody = [
-        body]})
-lispListExpr :: [Syntax.Expression] -> Syntax.Expression
-lispListExpr elements =
-    Syntax.ExpressionList (Syntax.ListLiteral {
-      Syntax.listLiteralElements = elements,
-      Syntax.listLiteralQuoted = False})
-lispLitExpr :: Syntax.Literal -> Syntax.Expression
-lispLitExpr lit = Syntax.ExpressionLiteral lit
-lispNamedLambdaExpr :: String -> [String] -> Syntax.Expression -> Syntax.Expression
-lispNamedLambdaExpr name params body =
-    Syntax.ExpressionLambda (Syntax.Lambda {
-      Syntax.lambdaName = (Just (Syntax.Symbol name)),
-      Syntax.lambdaParams = (Lists.map (\p -> Syntax.Symbol p) params),
-      Syntax.lambdaRestParam = Nothing,
-      Syntax.lambdaBody = [
-        body]})
-lispNilExpr :: Syntax.Expression
-lispNilExpr = Syntax.ExpressionLiteral Syntax.LiteralNil
-lispSymbol :: String -> Syntax.Symbol
-lispSymbol name = Syntax.Symbol name
-lispTopForm :: Syntax.TopLevelForm -> Syntax.TopLevelFormWithComments
-lispTopForm form =
-    Syntax.TopLevelFormWithComments {
-      Syntax.topLevelFormWithCommentsDoc = Nothing,
-      Syntax.topLevelFormWithCommentsComment = Nothing,
-      Syntax.topLevelFormWithCommentsForm = form}
-lispTopFormWithComments :: Maybe String -> Syntax.TopLevelForm -> Syntax.TopLevelFormWithComments
-lispTopFormWithComments mdoc form =
-    Syntax.TopLevelFormWithComments {
-      Syntax.topLevelFormWithCommentsDoc = (Maybes.map (\d -> Syntax.Docstring d) mdoc),
-      Syntax.topLevelFormWithCommentsComment = Nothing,
-      Syntax.topLevelFormWithCommentsForm = form}
-lispVar :: String -> Syntax.Expression
-lispVar name =
-    Syntax.ExpressionVariable (Syntax.VariableReference {
-      Syntax.variableReferenceName = (Syntax.Symbol name),
-      Syntax.variableReferenceFunctionNamespace = False})
-moduleExports :: [Syntax.TopLevelFormWithComments] -> [Syntax.ExportDeclaration]
-moduleExports forms =
-
-      let symbols =
-              Lists.concat (Lists.map (\fwc ->
-                let form = Syntax.topLevelFormWithCommentsForm fwc
-                in case form of
-                  Syntax.TopLevelFormVariable v0 -> [
-                    Syntax.variableDefinitionName v0]
-                  Syntax.TopLevelFormRecordType v0 ->
-                    let rname = Syntax.unSymbol (Syntax.recordTypeDefinitionName v0)
-                        fields = Syntax.recordTypeDefinitionFields v0
-                        fieldSyms =
-                                Lists.map (\f ->
-                                  let fn = Syntax.unSymbol (Syntax.fieldDefinitionName f)
-                                  in (Syntax.Symbol (Strings.cat [
-                                    rname,
-                                    "-",
-                                    fn]))) fields
-                    in (Lists.concat [
-                      [
-                        Syntax.Symbol (Strings.cat2 "make-" rname),
-                        (Syntax.Symbol (Strings.cat2 rname "?"))],
-                      fieldSyms])
-                  _ -> []) forms)
-      in (Logic.ifElse (Lists.null symbols) [] [
-        Syntax.ExportDeclaration {
-          Syntax.exportDeclarationSymbols = symbols}])
-moduleImports :: Packaging.Namespace -> [Packaging.Definition] -> [Syntax.ImportDeclaration]
-moduleImports focusNs defs =
-
-      let depNss = Sets.toList (Sets.delete focusNs (Analysis.definitionDependencyNamespaces defs))
-      in (Lists.map (\ns -> Syntax.ImportDeclaration {
-        Syntax.importDeclarationModule = (Syntax.NamespaceName (Packaging.unNamespace ns)),
-        Syntax.importDeclarationSpec = Syntax.ImportSpecAll}) depNss)
-moduleToLisp :: Syntax.Dialect -> Packaging.Module -> [Packaging.Definition] -> t0 -> t1 -> Either t2 Syntax.Program
-moduleToLisp dialect mod defs0 cx g =
-
-      let defs = Environment.reorderDefs defs0
-          partitioned = Environment.partitionDefinitions defs
-          allTypeDefs = Pairs.first partitioned
-          termDefs = Pairs.second partitioned
-          typeDefs =
-                  Lists.filter (\td -> Predicates.isNominalType (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme td))) allTypeDefs
-      in (Eithers.bind (Eithers.mapList (encodeTypeDefinition cx g) typeDefs) (\typeItems -> Eithers.bind (Eithers.mapList (encodeTermDefinition dialect cx g) termDefs) (\termItems ->
-        let allItems = Lists.concat2 typeItems termItems
-            nsName = Packaging.unNamespace (Packaging.moduleNamespace mod)
-            focusNs = Packaging.moduleNamespace mod
-            imports = moduleImports focusNs defs
-            exports = moduleExports allItems
-        in (Right (Syntax.Program {
-          Syntax.programDialect = dialect,
-          Syntax.programModule = (Just (Syntax.ModuleDeclaration {
-            Syntax.moduleDeclarationName = (Syntax.NamespaceName nsName),
-            Syntax.moduleDeclarationDoc = Nothing})),
-          Syntax.programImports = imports,
-          Syntax.programExports = exports,
-          Syntax.programForms = allItems})))))
-qualifiedSnakeName :: Core.Name -> String
-qualifiedSnakeName name =
-
-      let raw = Core.unName name
-          parts = Strings.splitOn "." raw
-          snakeParts = Lists.map (\p -> Formatting.convertCaseCamelOrUnderscoreToLowerSnake p) parts
-          joined = Strings.intercalate "_" snakeParts
-      in (Formatting.sanitizeWithUnderscores Language.lispReservedWords joined)
-qualifiedTypeName :: Core.Name -> String
-qualifiedTypeName name = Formatting.capitalize (Names.localNameOf name)
-wrapInThunk :: Syntax.Expression -> Syntax.Expression
-wrapInThunk expr =
-    Syntax.ExpressionLambda (Syntax.Lambda {
-      Syntax.lambdaName = Nothing,
-      Syntax.lambdaParams = [],
-      Syntax.lambdaRestParam = Nothing,
-      Syntax.lambdaBody = [
-        expr]})
diff --git a/src/main/haskell/Hydra/Lisp/Language.hs b/src/main/haskell/Hydra/Lisp/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lisp/Language.hs
+++ /dev/null
@@ -1,312 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Language constraints and reserved words for Lisp (covering Clojure, Emacs Lisp, Common Lisp, and Scheme)
-
-module Hydra.Lisp.Language where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
--- | Language constraints for Lisp
-lispLanguage :: Coders.Language
-lispLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.lisp"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeBigfloat,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
--- | A set of reserved words across all four Lisp dialects
-lispReservedWords :: S.Set String
-lispReservedWords =
-    Sets.fromList (Lists.concat [
-      clojureKeywords,
-      emacsLispKeywords,
-      commonLispKeywords,
-      schemeKeywords,
-      hydraLispKeywords])
-  where
-    clojureKeywords =
-        [
-          "def",
-          "defn",
-          "defn-",
-          "defmacro",
-          "defrecord",
-          "deftype",
-          "defprotocol",
-          "defmulti",
-          "defmethod",
-          "fn",
-          "let",
-          "loop",
-          "recur",
-          "if",
-          "do",
-          "cond",
-          "case",
-          "when",
-          "when-not",
-          "when-let",
-          "if-let",
-          "and",
-          "or",
-          "not",
-          "nil",
-          "true",
-          "false",
-          "throw",
-          "try",
-          "catch",
-          "finally",
-          "quote",
-          "var",
-          "ns",
-          "require",
-          "import",
-          "use",
-          "in-ns",
-          "refer",
-          "new",
-          "set!",
-          "monitor-enter",
-          "monitor-exit"]
-    emacsLispKeywords =
-        [
-          "defun",
-          "defvar",
-          "defconst",
-          "defmacro",
-          "defsubst",
-          "defadvice",
-          "defcustom",
-          "defgroup",
-          "lambda",
-          "let",
-          "let*",
-          "if",
-          "cond",
-          "progn",
-          "prog1",
-          "prog2",
-          "while",
-          "dolist",
-          "dotimes",
-          "and",
-          "or",
-          "not",
-          "nil",
-          "t",
-          "quote",
-          "function",
-          "setq",
-          "setq-default",
-          "require",
-          "provide",
-          "condition-case",
-          "unwind-protect",
-          "save-excursion",
-          "save-restriction",
-          "catch",
-          "throw",
-          "interactive",
-          "cl-defstruct",
-          "cl-case",
-          "cl-loop",
-          "cl-labels",
-          "cl-flet",
-          "pcase",
-          "pcase-let",
-          "seq-let"]
-    commonLispKeywords =
-        [
-          "defun",
-          "defvar",
-          "defparameter",
-          "defconstant",
-          "defmacro",
-          "defgeneric",
-          "defmethod",
-          "defclass",
-          "defstruct",
-          "deftype",
-          "defpackage",
-          "defsetf",
-          "lambda",
-          "let",
-          "let*",
-          "flet",
-          "labels",
-          "macrolet",
-          "symbol-macrolet",
-          "if",
-          "cond",
-          "case",
-          "typecase",
-          "etypecase",
-          "ecase",
-          "progn",
-          "prog1",
-          "prog2",
-          "block",
-          "return-from",
-          "tagbody",
-          "go",
-          "and",
-          "or",
-          "not",
-          "nil",
-          "t",
-          "quote",
-          "function",
-          "setq",
-          "setf",
-          "do",
-          "do*",
-          "dolist",
-          "dotimes",
-          "loop",
-          "values",
-          "multiple-value-bind",
-          "multiple-value-list",
-          "the",
-          "declare",
-          "declaim",
-          "proclaim",
-          "in-package",
-          "use-package",
-          "export",
-          "import",
-          "intern",
-          "handler-case",
-          "handler-bind",
-          "restart-case",
-          "condition",
-          "unwind-protect",
-          "catch",
-          "throw",
-          "eval-when",
-          "load-time-value",
-          "locally",
-          "the",
-          "pi"]
-    schemeKeywords =
-        [
-          "define",
-          "define-syntax",
-          "define-record-type",
-          "define-library",
-          "define-values",
-          "lambda",
-          "let",
-          "let*",
-          "letrec",
-          "letrec*",
-          "let-values",
-          "let*-values",
-          "if",
-          "cond",
-          "case",
-          "when",
-          "unless",
-          "and",
-          "or",
-          "not",
-          "begin",
-          "do",
-          "quote",
-          "quasiquote",
-          "unquote",
-          "unquote-splicing",
-          "set!",
-          "import",
-          "export",
-          "include",
-          "include-ci",
-          "syntax-rules",
-          "syntax-case",
-          "with-syntax",
-          "call-with-current-continuation",
-          "call/cc",
-          "call-with-values",
-          "values",
-          "dynamic-wind",
-          "guard",
-          "parameterize",
-          "else"]
-    hydraLispKeywords = [
-      "Node"]
diff --git a/src/main/haskell/Hydra/Lisp/Serde.hs b/src/main/haskell/Hydra/Lisp/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lisp/Serde.hs
+++ /dev/null
@@ -1,1011 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Lisp serializer: converts Lisp AST to concrete syntax for Clojure, Emacs Lisp, Common Lisp, or Scheme
-
-module Hydra.Lisp.Serde where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Lisp.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-andExpressionToExpr :: Syntax.Dialect -> Syntax.AndExpression -> Ast.Expr
-andExpressionToExpr d andExpr =
-    Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-      Serialization.cst "and"] (Lists.map (expressionToExpr d) (Syntax.andExpressionExpressions andExpr))))
-applicationToExpr :: Syntax.Dialect -> Syntax.Application -> Ast.Expr
-applicationToExpr d app =
-
-      let funExpr = Syntax.applicationFunction app
-          fun = expressionToExpr d funExpr
-          args = Lists.map (expressionToExpr d) (Syntax.applicationArguments app)
-          needsFuncall =
-                  case d of
-                    Syntax.DialectEmacsLisp -> case funExpr of
-                      Syntax.ExpressionVariable _ -> False
-                      _ -> True
-                    _ -> False
-          allParts =
-                  Logic.ifElse needsFuncall (Lists.concat2 [
-                    Serialization.cst "funcall",
-                    fun] args) (Lists.concat2 [
-                    fun] args)
-      in (Serialization.parens (Serialization.spaceSep allParts))
-caseExpressionToExpr :: Syntax.Dialect -> Syntax.CaseExpression -> Ast.Expr
-caseExpressionToExpr d caseExpr =
-
-      let scrutinee = expressionToExpr d (Syntax.caseExpressionScrutinee caseExpr)
-          clauses = Syntax.caseExpressionClauses caseExpr
-          dflt = Syntax.caseExpressionDefault caseExpr
-          clauseExprs =
-                  Lists.map (\c -> Serialization.parens (Serialization.spaceSep [
-                    Serialization.parens (Serialization.spaceSep (Lists.map (expressionToExpr d) (Syntax.caseClauseKeys c))),
-                    (expressionToExpr d (Syntax.caseClauseBody c))])) clauses
-          defaultPart =
-                  Maybes.maybe [] (\e -> [
-                    Serialization.parens (Serialization.spaceSep [
-                      Serialization.cst "else",
-                      (expressionToExpr d e)])]) dflt
-      in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "case",
-          scrutinee],
-        clauseExprs,
-        defaultPart])))
-commentToExpr :: Syntax.Comment -> Ast.Expr
-commentToExpr c =
-
-      let text = Syntax.commentText c
-      in (Serialization.cst (Logic.ifElse (Equality.equal text "") ";" (Strings.cat2 "; " text)))
-condExpressionToExpr :: Syntax.Dialect -> Syntax.CondExpression -> Ast.Expr
-condExpressionToExpr d condExpr =
-
-      let clauses = Syntax.condExpressionClauses condExpr
-          dflt = Syntax.condExpressionDefault condExpr
-      in case d of
-        Syntax.DialectClojure ->
-          let clauseExprs =
-                  Lists.concat (Lists.map (\c -> [
-                    expressionToExpr d (Syntax.condClauseCondition c),
-                    (expressionToExpr d (Syntax.condClauseBody c))]) clauses)
-              defaultPart =
-                      Maybes.maybe [] (\e -> [
-                        Serialization.cst ":else",
-                        (expressionToExpr d e)]) dflt
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "cond"],
-            clauseExprs,
-            defaultPart])))
-        Syntax.DialectEmacsLisp ->
-          let clauseExprs =
-                  Lists.map (\c -> Serialization.parens (Serialization.spaceSep [
-                    expressionToExpr d (Syntax.condClauseCondition c),
-                    (expressionToExpr d (Syntax.condClauseBody c))])) clauses
-              defaultPart =
-                      Maybes.maybe [] (\e -> [
-                        Serialization.parens (Serialization.spaceSep [
-                          Serialization.cst "t",
-                          (expressionToExpr d e)])]) dflt
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "cond"],
-            clauseExprs,
-            defaultPart])))
-        Syntax.DialectCommonLisp ->
-          let clauseExprs =
-                  Lists.map (\c -> Serialization.parens (Serialization.spaceSep [
-                    expressionToExpr d (Syntax.condClauseCondition c),
-                    (expressionToExpr d (Syntax.condClauseBody c))])) clauses
-              defaultPart =
-                      Maybes.maybe [] (\e -> [
-                        Serialization.parens (Serialization.spaceSep [
-                          Serialization.cst "t",
-                          (expressionToExpr d e)])]) dflt
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "cond"],
-            clauseExprs,
-            defaultPart])))
-        Syntax.DialectScheme ->
-          let clauseExprs =
-                  Lists.map (\c -> Serialization.parens (Serialization.spaceSep [
-                    expressionToExpr d (Syntax.condClauseCondition c),
-                    (expressionToExpr d (Syntax.condClauseBody c))])) clauses
-              defaultPart =
-                      Maybes.maybe [] (\e -> [
-                        Serialization.parens (Serialization.spaceSep [
-                          Serialization.cst "else",
-                          (expressionToExpr d e)])]) dflt
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "cond"],
-            clauseExprs,
-            defaultPart])))
-constantDefinitionToExpr :: Syntax.Dialect -> Syntax.ConstantDefinition -> Ast.Expr
-constantDefinitionToExpr d cdef =
-
-      let name = symbolToExpr (Syntax.constantDefinitionName cdef)
-          value = expressionToExpr d (Syntax.constantDefinitionValue cdef)
-      in (Serialization.parens (Serialization.spaceSep [
-        Serialization.cst (defconstKeyword d),
-        name,
-        value]))
-defKeyword :: Syntax.Dialect -> String
-defKeyword d =
-    case d of
-      Syntax.DialectClojure -> "def"
-      Syntax.DialectEmacsLisp -> "defvar"
-      Syntax.DialectCommonLisp -> "cl:defvar"
-      Syntax.DialectScheme -> "define"
-defconstKeyword :: Syntax.Dialect -> String
-defconstKeyword d =
-    case d of
-      Syntax.DialectClojure -> "def"
-      Syntax.DialectEmacsLisp -> "defconst"
-      Syntax.DialectCommonLisp -> "cl:defconstant"
-      Syntax.DialectScheme -> "define"
-defnKeyword :: Syntax.Dialect -> String
-defnKeyword d =
-    case d of
-      Syntax.DialectClojure -> "defn"
-      Syntax.DialectEmacsLisp -> "defun"
-      Syntax.DialectCommonLisp -> "cl:defun"
-      Syntax.DialectScheme -> "define"
-defrecordKeyword :: Syntax.Dialect -> String
-defrecordKeyword d =
-    case d of
-      Syntax.DialectClojure -> "defrecord"
-      Syntax.DialectEmacsLisp -> "cl-defstruct"
-      Syntax.DialectCommonLisp -> "cl:defstruct"
-      Syntax.DialectScheme -> "define-record-type"
-doExpressionToExpr :: Syntax.Dialect -> Syntax.DoExpression -> Ast.Expr
-doExpressionToExpr d doExpr =
-
-      let kw =
-              case d of
-                Syntax.DialectClojure -> "do"
-                Syntax.DialectEmacsLisp -> "progn"
-                Syntax.DialectCommonLisp -> "progn"
-                Syntax.DialectScheme -> "begin"
-      in (Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-        Serialization.cst kw] (Lists.map (expressionToExpr d) (Syntax.doExpressionExpressions doExpr)))))
-docstringToExpr :: Syntax.Docstring -> Ast.Expr
-docstringToExpr ds =
-
-      let text = Syntax.unDocstring ds
-      in (Serialization.cst (Logic.ifElse (Equality.equal text "") ";;" (Strings.cat [
-        ";; ",
-        text])))
-exportDeclarationToExpr :: Syntax.Dialect -> Syntax.ExportDeclaration -> Ast.Expr
-exportDeclarationToExpr d edecl =
-
-      let syms = Lists.map symbolToExpr (Syntax.exportDeclarationSymbols edecl)
-      in case d of
-        Syntax.DialectClojure -> Serialization.cst ""
-        Syntax.DialectEmacsLisp -> Serialization.newlineSep (Lists.map (\s -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst "provide",
-          (Serialization.noSep [
-            Serialization.cst "'",
-            s])])) syms)
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-          Serialization.cst ":export"] (Lists.map (\s -> Serialization.noSep [
-          Serialization.cst ":",
-          s]) syms)))
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-          Serialization.cst "export"] syms))
-expressionToExpr :: Syntax.Dialect -> Syntax.Expression -> Ast.Expr
-expressionToExpr d expr =
-    case expr of
-      Syntax.ExpressionApplication v0 -> applicationToExpr d v0
-      Syntax.ExpressionLambda v0 -> lambdaToExpr d v0
-      Syntax.ExpressionLet v0 -> letExpressionToExpr d v0
-      Syntax.ExpressionIf v0 -> ifExpressionToExpr d v0
-      Syntax.ExpressionCond v0 -> condExpressionToExpr d v0
-      Syntax.ExpressionCase v0 -> caseExpressionToExpr d v0
-      Syntax.ExpressionAnd v0 -> andExpressionToExpr d v0
-      Syntax.ExpressionOr v0 -> orExpressionToExpr d v0
-      Syntax.ExpressionNot v0 -> notExpressionToExpr d v0
-      Syntax.ExpressionDo v0 -> doExpressionToExpr d v0
-      Syntax.ExpressionBegin v0 -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-        Serialization.cst "begin"] (Lists.map (expressionToExpr d) (Syntax.beginExpressionExpressions v0))))
-      Syntax.ExpressionVariable v0 -> variableReferenceToExpr d v0
-      Syntax.ExpressionLiteral v0 -> literalToExpr d v0
-      Syntax.ExpressionList v0 -> listLiteralToExpr d v0
-      Syntax.ExpressionVector v0 -> vectorLiteralToExpr d v0
-      Syntax.ExpressionMap v0 -> mapLiteralToExpr d v0
-      Syntax.ExpressionSet v0 -> setLiteralToExpr d v0
-      Syntax.ExpressionCons v0 -> Serialization.parens (Serialization.spaceSep [
-        Serialization.cst "cons",
-        (expressionToExpr d (Syntax.consExpressionHead v0)),
-        (expressionToExpr d (Syntax.consExpressionTail v0))])
-      Syntax.ExpressionDottedPair v0 -> Serialization.parens (Serialization.spaceSep [
-        expressionToExpr d (Syntax.dottedPairCar v0),
-        (Serialization.cst "."),
-        (expressionToExpr d (Syntax.dottedPairCdr v0))])
-      Syntax.ExpressionFieldAccess v0 -> fieldAccessToExpr d v0
-      Syntax.ExpressionTypeAnnotation v0 -> expressionToExpr d (Syntax.typeAnnotationExpression v0)
-      Syntax.ExpressionQuote v0 -> Serialization.noSep [
-        Serialization.cst "'",
-        (expressionToExpr d (Syntax.quoteExpressionBody v0))]
-      Syntax.ExpressionQuasiquote v0 -> Serialization.noSep [
-        Serialization.cst "`",
-        (expressionToExpr d (Syntax.quasiquoteExpressionBody v0))]
-      Syntax.ExpressionUnquote v0 -> case d of
-        Syntax.DialectClojure -> Serialization.noSep [
-          Serialization.cst "~",
-          (expressionToExpr d (Syntax.unquoteExpressionBody v0))]
-        Syntax.DialectEmacsLisp -> Serialization.noSep [
-          Serialization.cst ",",
-          (expressionToExpr d (Syntax.unquoteExpressionBody v0))]
-        Syntax.DialectCommonLisp -> Serialization.noSep [
-          Serialization.cst ",",
-          (expressionToExpr d (Syntax.unquoteExpressionBody v0))]
-        Syntax.DialectScheme -> Serialization.noSep [
-          Serialization.cst ",",
-          (expressionToExpr d (Syntax.unquoteExpressionBody v0))]
-      Syntax.ExpressionSplicingUnquote v0 -> case d of
-        Syntax.DialectClojure -> Serialization.noSep [
-          Serialization.cst "~@",
-          (expressionToExpr d (Syntax.splicingUnquoteExpressionBody v0))]
-        Syntax.DialectEmacsLisp -> Serialization.noSep [
-          Serialization.cst ",@",
-          (expressionToExpr d (Syntax.splicingUnquoteExpressionBody v0))]
-        Syntax.DialectCommonLisp -> Serialization.noSep [
-          Serialization.cst ",@",
-          (expressionToExpr d (Syntax.splicingUnquoteExpressionBody v0))]
-        Syntax.DialectScheme -> Serialization.noSep [
-          Serialization.cst ",@",
-          (expressionToExpr d (Syntax.splicingUnquoteExpressionBody v0))]
-      Syntax.ExpressionSExpression v0 -> sExpressionToExpr v0
-falseExpr :: Syntax.Dialect -> Ast.Expr
-falseExpr d =
-    case d of
-      Syntax.DialectClojure -> Serialization.cst "false"
-      Syntax.DialectEmacsLisp -> Serialization.cst "nil"
-      Syntax.DialectCommonLisp -> Serialization.cst "cl:nil"
-      Syntax.DialectScheme -> Serialization.cst "#f"
-fieldAccessToExpr :: Syntax.Dialect -> Syntax.FieldAccess -> Ast.Expr
-fieldAccessToExpr d fa =
-
-      let rtype = symbolToExpr (Syntax.fieldAccessRecordType fa)
-          field = symbolToExpr (Syntax.fieldAccessField fa)
-          target = expressionToExpr d (Syntax.fieldAccessTarget fa)
-      in case d of
-        Syntax.DialectClojure -> Serialization.parens (Serialization.spaceSep [
-          Serialization.noSep [
-            Serialization.cst ":",
-            field],
-          target])
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep [
-          Serialization.noSep [
-            rtype,
-            (Serialization.cst "-"),
-            field],
-          target])
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep [
-          Serialization.noSep [
-            rtype,
-            (Serialization.cst "-"),
-            field],
-          target])
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep [
-          Serialization.noSep [
-            rtype,
-            (Serialization.cst "-"),
-            field],
-          target])
-formatLispFloat :: Syntax.Dialect -> Double -> String
-formatLispFloat d v =
-
-      let s = Literals.showBigfloat v
-      in (Logic.ifElse (Equality.equal s "NaN") (case d of
-        Syntax.DialectClojure -> "Double/NaN"
-        Syntax.DialectScheme -> "+nan.0"
-        Syntax.DialectCommonLisp -> "+hydra-nan+"
-        Syntax.DialectEmacsLisp -> "0.0e+NaN") (Logic.ifElse (Equality.equal s "Infinity") (case d of
-        Syntax.DialectClojure -> "Double/POSITIVE_INFINITY"
-        Syntax.DialectScheme -> "+inf.0"
-        Syntax.DialectCommonLisp -> "+hydra-pos-inf+"
-        Syntax.DialectEmacsLisp -> "1.0e+INF") (Logic.ifElse (Equality.equal s "-Infinity") (case d of
-        Syntax.DialectClojure -> "Double/NEGATIVE_INFINITY"
-        Syntax.DialectScheme -> "-inf.0"
-        Syntax.DialectCommonLisp -> "+hydra-neg-inf+"
-        Syntax.DialectEmacsLisp -> "-1.0e+INF") s)))
-functionDefinitionToExpr :: Syntax.Dialect -> Syntax.FunctionDefinition -> Ast.Expr
-functionDefinitionToExpr d fdef =
-
-      let name = symbolToExpr (Syntax.functionDefinitionName fdef)
-          params = Lists.map symbolToExpr (Syntax.functionDefinitionParams fdef)
-          body = Lists.map (expressionToExpr d) (Syntax.functionDefinitionBody fdef)
-      in case d of
-        Syntax.DialectClojure -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "defn",
-            name],
-          [
-            Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "defun",
-            name],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "defun",
-            name],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "define"],
-          [
-            Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-              name] params))],
-          body]))
-ifExpressionToExpr :: Syntax.Dialect -> Syntax.IfExpression -> Ast.Expr
-ifExpressionToExpr d ifExpr =
-
-      let cond = expressionToExpr d (Syntax.ifExpressionCondition ifExpr)
-          then_ = expressionToExpr d (Syntax.ifExpressionThen ifExpr)
-          else_ = Syntax.ifExpressionElse ifExpr
-          elsePart = Maybes.maybe [] (\e -> [
-                expressionToExpr d e]) else_
-      in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-        [
-          Serialization.cst "if",
-          cond,
-          then_],
-        elsePart])))
-importDeclarationToExpr :: Syntax.Dialect -> Syntax.ImportDeclaration -> Ast.Expr
-importDeclarationToExpr d idecl =
-
-      let modName = Syntax.unNamespaceName (Syntax.importDeclarationModule idecl)
-      in case d of
-        Syntax.DialectClojure -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst ":require",
-          (Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep [
-            Serialization.cst modName]))])
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst "require",
-          (Serialization.noSep [
-            Serialization.cst "'",
-            (Serialization.cst modName)])])
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst ":use",
-          (Serialization.cst (Strings.cat2 ":" modName))])
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst "import",
-          (Serialization.parens (Serialization.cst modName))])
-keywordToExpr :: Syntax.Dialect -> Syntax.Keyword -> Ast.Expr
-keywordToExpr d k =
-
-      let name = Syntax.keywordName k
-          ns = Syntax.keywordNamespace k
-      in case d of
-        Syntax.DialectScheme -> Serialization.noSep [
-          Serialization.cst "'",
-          (Serialization.cst name)]
-        _ -> Serialization.cst (Maybes.maybe (Strings.cat2 ":" name) (\n -> Strings.cat [
-          n,
-          "/:",
-          name]) ns)
-lambdaKeyword :: Syntax.Dialect -> String
-lambdaKeyword d =
-    case d of
-      Syntax.DialectClojure -> "fn"
-      Syntax.DialectEmacsLisp -> "lambda"
-      Syntax.DialectCommonLisp -> "cl:lambda"
-      Syntax.DialectScheme -> "lambda"
-lambdaToExpr :: Syntax.Dialect -> Syntax.Lambda -> Ast.Expr
-lambdaToExpr d lam =
-
-      let params = Lists.map symbolToExpr (Syntax.lambdaParams lam)
-          body = Lists.map (expressionToExpr d) (Syntax.lambdaBody lam)
-          mname = Syntax.lambdaName lam
-          kw = lambdaKeyword d
-      in case d of
-        Syntax.DialectClojure -> Maybes.maybe (Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst kw],
-          [
-            Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep params)],
-          body]))) (\sym -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst kw,
-            (symbolToExpr sym)],
-          [
-            Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep params)],
-          body]))) mname
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst kw],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst kw],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst kw],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-letExpressionToExpr :: Syntax.Dialect -> Syntax.LetExpression -> Ast.Expr
-letExpressionToExpr d letExpr =
-
-      let kind = Syntax.letExpressionKind letExpr
-          bindings = Syntax.letExpressionBindings letExpr
-          body = Lists.map (expressionToExpr d) (Syntax.letExpressionBody letExpr)
-          bindingPairs =
-                  Lists.map (\b -> case b of
-                    Syntax.LetBindingSimple v0 -> (symbolToExpr (Syntax.simpleBindingName v0), (expressionToExpr d (Syntax.simpleBindingValue v0)))
-                    Syntax.LetBindingDestructuring _ -> (Serialization.cst "<destructuring>", (Serialization.cst "<destructuring>"))) bindings
-      in case d of
-        Syntax.DialectClojure -> case kind of
-          Syntax.LetKindRecursive ->
-            let fnSpecs =
-                    Lists.map (\b -> case b of
-                      Syntax.LetBindingSimple v2 ->
-                        let name = symbolToExpr (Syntax.simpleBindingName v2)
-                            val = Syntax.simpleBindingValue v2
-                        in case val of
-                          Syntax.ExpressionLambda v3 ->
-                            let params = Lists.map symbolToExpr (Syntax.lambdaParams v3)
-                                lbody = Lists.map (expressionToExpr d) (Syntax.lambdaBody v3)
-                            in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-                              [
-                                name],
-                              [
-                                Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep params)],
-                              lbody])))
-                          _ -> Serialization.parens (Serialization.spaceSep [
-                            name,
-                            (expressionToExpr d val)])
-                      Syntax.LetBindingDestructuring _ -> Serialization.cst "<destructuring>") bindings
-            in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-              [
-                Serialization.cst "letfn"],
-              [
-                Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep fnSpecs)],
-              body])))
-          Syntax.LetKindParallel -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "let"],
-            [
-              Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep (Lists.concat (Lists.map (\p -> [
-                Pairs.first p,
-                (Pairs.second p)]) bindingPairs)))],
-            body]))
-          Syntax.LetKindSequential -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "let"],
-            [
-              Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep (Lists.concat (Lists.map (\p -> [
-                Pairs.first p,
-                (Pairs.second p)]) bindingPairs)))],
-            body]))
-        Syntax.DialectEmacsLisp ->
-          let kw =
-                  case kind of
-                    Syntax.LetKindParallel -> "let"
-                    Syntax.LetKindSequential -> "let*"
-                    Syntax.LetKindRecursive -> "letrec"
-              bindingExprs =
-                      Lists.map (\p -> Serialization.parens (Serialization.spaceSep [
-                        Pairs.first p,
-                        (Pairs.second p)])) bindingPairs
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst kw],
-            [
-              Serialization.parens (Serialization.spaceSep bindingExprs)],
-            body])))
-        Syntax.DialectCommonLisp ->
-          let kw =
-                  case kind of
-                    Syntax.LetKindParallel -> "let"
-                    Syntax.LetKindSequential -> "let*"
-                    Syntax.LetKindRecursive -> "letrec"
-              bindingExprs =
-                      Lists.map (\p -> Serialization.parens (Serialization.spaceSep [
-                        Pairs.first p,
-                        (Pairs.second p)])) bindingPairs
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst kw],
-            [
-              Serialization.parens (Serialization.spaceSep bindingExprs)],
-            body])))
-        Syntax.DialectScheme ->
-          let kw =
-                  case kind of
-                    Syntax.LetKindParallel -> "let"
-                    Syntax.LetKindSequential -> "let*"
-                    Syntax.LetKindRecursive -> "letrec"
-              bindingExprs =
-                      Lists.map (\p -> Serialization.parens (Serialization.spaceSep [
-                        Pairs.first p,
-                        (Pairs.second p)])) bindingPairs
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst kw],
-            [
-              Serialization.parens (Serialization.spaceSep bindingExprs)],
-            body])))
-listKeyword :: Syntax.Dialect -> String
-listKeyword d =
-    case d of
-      Syntax.DialectClojure -> "list"
-      Syntax.DialectEmacsLisp -> "list"
-      Syntax.DialectCommonLisp -> "cl:list"
-      Syntax.DialectScheme -> "list"
-listLiteralToExpr :: Syntax.Dialect -> Syntax.ListLiteral -> Ast.Expr
-listLiteralToExpr d ll =
-
-      let elems = Lists.map (expressionToExpr d) (Syntax.listLiteralElements ll)
-          quoted = Syntax.listLiteralQuoted ll
-      in (Logic.ifElse quoted (Serialization.noSep [
-        Serialization.cst "'",
-        (Serialization.parens (Serialization.spaceSep elems))]) (Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-        Serialization.cst (listKeyword d)] elems))))
-literalToExpr :: Syntax.Dialect -> Syntax.Literal -> Ast.Expr
-literalToExpr d lit =
-    case lit of
-      Syntax.LiteralInteger v0 -> Serialization.cst (Literals.showBigint (Syntax.integerLiteralValue v0))
-      Syntax.LiteralFloat v0 -> Serialization.cst (formatLispFloat d (Syntax.floatLiteralValue v0))
-      Syntax.LiteralString v0 ->
-        let e1 = Strings.intercalate "\\\\" (Strings.splitOn "\\" v0)
-        in case d of
-          Syntax.DialectCommonLisp ->
-            let escaped = Strings.intercalate "\\\"" (Strings.splitOn "\"" e1)
-            in (Serialization.cst (Strings.cat [
-              "\"",
-              escaped,
-              "\""]))
-          Syntax.DialectClojure ->
-            let e2 = Strings.intercalate "\\n" (Strings.splitOn (Strings.fromList [
-                  10]) e1)
-                e3 = Strings.intercalate "\\r" (Strings.splitOn (Strings.fromList [
-                      13]) e2)
-                e4 = Strings.intercalate "\\t" (Strings.splitOn (Strings.fromList [
-                      9]) e3)
-                escaped = Strings.intercalate "\\\"" (Strings.splitOn "\"" e4)
-            in (Serialization.cst (Strings.cat [
-              "\"",
-              escaped,
-              "\""]))
-          Syntax.DialectEmacsLisp ->
-            let e2 = Strings.intercalate "\\n" (Strings.splitOn (Strings.fromList [
-                  10]) e1)
-                e3 = Strings.intercalate "\\r" (Strings.splitOn (Strings.fromList [
-                      13]) e2)
-                e4 = Strings.intercalate "\\t" (Strings.splitOn (Strings.fromList [
-                      9]) e3)
-                escaped = Strings.intercalate "\\\"" (Strings.splitOn "\"" e4)
-            in (Serialization.cst (Strings.cat [
-              "\"",
-              escaped,
-              "\""]))
-          Syntax.DialectScheme ->
-            let e2 = Strings.intercalate "\\n" (Strings.splitOn (Strings.fromList [
-                  10]) e1)
-                e3 = Strings.intercalate "\\r" (Strings.splitOn (Strings.fromList [
-                      13]) e2)
-                e4 = Strings.intercalate "\\t" (Strings.splitOn (Strings.fromList [
-                      9]) e3)
-                escaped = Strings.intercalate "\\\"" (Strings.splitOn "\"" e4)
-            in (Serialization.cst (Strings.cat [
-              "\"",
-              escaped,
-              "\""]))
-      Syntax.LiteralCharacter v0 ->
-        let ch = Syntax.characterLiteralValue v0
-        in case d of
-          Syntax.DialectClojure -> Serialization.cst (Strings.cat2 "\\" ch)
-          Syntax.DialectEmacsLisp -> Serialization.cst (Strings.cat2 "?" ch)
-          Syntax.DialectCommonLisp -> Serialization.cst (Strings.cat2 "#\\" ch)
-          Syntax.DialectScheme -> Serialization.cst (Strings.cat2 "#\\" ch)
-      Syntax.LiteralBoolean v0 -> Logic.ifElse v0 (trueExpr d) (falseExpr d)
-      Syntax.LiteralNil -> nilExpr d
-      Syntax.LiteralKeyword v0 -> keywordToExpr d v0
-      Syntax.LiteralSymbol v0 -> Serialization.noSep [
-        Serialization.cst "'",
-        (symbolToExpr v0)]
-macroDefinitionToExpr :: Syntax.Dialect -> Syntax.MacroDefinition -> Ast.Expr
-macroDefinitionToExpr d mdef =
-
-      let name = symbolToExpr (Syntax.macroDefinitionName mdef)
-          params = Lists.map symbolToExpr (Syntax.macroDefinitionParams mdef)
-          body = Lists.map (expressionToExpr d) (Syntax.macroDefinitionBody mdef)
-      in case d of
-        Syntax.DialectClojure -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "defmacro",
-            name],
-          [
-            Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "defmacro",
-            name],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "defmacro",
-            name],
-          [
-            Serialization.parens (Serialization.spaceSep params)],
-          body]))
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "define-syntax",
-            name],
-          body]))
-mapLiteralToExpr :: Syntax.Dialect -> Syntax.MapLiteral -> Ast.Expr
-mapLiteralToExpr d ml =
-
-      let entries = Syntax.mapLiteralEntries ml
-      in case d of
-        Syntax.DialectClojure -> Serialization.brackets Serialization.curlyBraces Serialization.inlineStyle (Serialization.spaceSep (Lists.concat (Lists.map (\e -> [
-          expressionToExpr d (Syntax.mapEntryKey e),
-          (expressionToExpr d (Syntax.mapEntryValue e))]) entries)))
-        Syntax.DialectEmacsLisp -> Serialization.noSep [
-          Serialization.cst "'",
-          (Serialization.parens (Serialization.spaceSep (Lists.map (\e -> Serialization.parens (Serialization.spaceSep [
-            expressionToExpr d (Syntax.mapEntryKey e),
-            (Serialization.cst "."),
-            (expressionToExpr d (Syntax.mapEntryValue e))])) entries)))]
-        Syntax.DialectCommonLisp -> Serialization.noSep [
-          Serialization.cst "'",
-          (Serialization.parens (Serialization.spaceSep (Lists.map (\e -> Serialization.parens (Serialization.spaceSep [
-            expressionToExpr d (Syntax.mapEntryKey e),
-            (Serialization.cst "."),
-            (expressionToExpr d (Syntax.mapEntryValue e))])) entries)))]
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-          Serialization.cst "list"] (Lists.map (\e -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst "cons",
-          (expressionToExpr d (Syntax.mapEntryKey e)),
-          (expressionToExpr d (Syntax.mapEntryValue e))])) entries)))
-moduleDeclarationToExpr :: Syntax.Dialect -> Syntax.ModuleDeclaration -> Ast.Expr
-moduleDeclarationToExpr d mdecl =
-
-      let name = Syntax.unNamespaceName (Syntax.moduleDeclarationName mdecl)
-      in case d of
-        Syntax.DialectClojure -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst "ns",
-          (Serialization.cst name)])
-        Syntax.DialectEmacsLisp -> Serialization.newlineSep [
-          Serialization.parens (Serialization.spaceSep [
-            Serialization.cst "require",
-            (Serialization.noSep [
-              Serialization.cst "'",
-              (Serialization.cst "cl-lib")])]),
-          (Serialization.parens (Serialization.spaceSep [
-            Serialization.cst "provide",
-            (Serialization.noSep [
-              Serialization.cst "'",
-              (Serialization.cst name)])]))]
-        Syntax.DialectCommonLisp -> Serialization.newlineSep [
-          Serialization.parens (Serialization.spaceSep [
-            Serialization.cst "defpackage",
-            (Serialization.cst (Strings.cat2 ":" name))]),
-          (Serialization.parens (Serialization.spaceSep [
-            Serialization.cst "in-package",
-            (Serialization.cst (Strings.cat2 ":" name))]))]
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep [
-          Serialization.cst "define-library",
-          (Serialization.parens (Serialization.cst name))])
-nilExpr :: Syntax.Dialect -> Ast.Expr
-nilExpr d =
-    case d of
-      Syntax.DialectClojure -> Serialization.cst "nil"
-      Syntax.DialectEmacsLisp -> Serialization.cst "nil"
-      Syntax.DialectCommonLisp -> Serialization.cst "cl:nil"
-      Syntax.DialectScheme -> Serialization.cst "'()"
-notExpressionToExpr :: Syntax.Dialect -> Syntax.NotExpression -> Ast.Expr
-notExpressionToExpr d notExpr =
-    Serialization.parens (Serialization.spaceSep [
-      Serialization.cst "not",
-      (expressionToExpr d (Syntax.notExpressionExpression notExpr))])
-orExpressionToExpr :: Syntax.Dialect -> Syntax.OrExpression -> Ast.Expr
-orExpressionToExpr d orExpr =
-    Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-      Serialization.cst "or"] (Lists.map (expressionToExpr d) (Syntax.orExpressionExpressions orExpr))))
-programToExpr :: Syntax.Program -> Ast.Expr
-programToExpr prog =
-
-      let d = Syntax.programDialect prog
-          modDecl = Syntax.programModule prog
-          imports = Syntax.programImports prog
-          exports = Syntax.programExports prog
-          forms = Syntax.programForms prog
-          formPart = Lists.map (topLevelFormWithCommentsToExpr d) forms
-          importNames = Lists.map (\idecl -> Syntax.unNamespaceName (Syntax.importDeclarationModule idecl)) imports
-          exportSyms = Lists.concat (Lists.map (\edecl -> Lists.map symbolToExpr (Syntax.exportDeclarationSymbols edecl)) exports)
-      in case d of
-        Syntax.DialectClojure -> Maybes.maybe (Serialization.doubleNewlineSep formPart) (\m ->
-          let nameStr = Syntax.unNamespaceName (Syntax.moduleDeclarationName m)
-              requireClauses =
-                      Lists.map (\imp -> Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep [
-                        Serialization.cst imp,
-                        (Serialization.cst ":refer"),
-                        (Serialization.cst ":all")])) importNames
-              nsForm =
-                      Logic.ifElse (Lists.null requireClauses) (Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "ns",
-                        (Serialization.cst nameStr)])) (Serialization.parens (Serialization.newlineSep [
-                        Serialization.spaceSep [
-                          Serialization.cst "ns",
-                          (Serialization.cst nameStr)],
-                        (Serialization.spaceSep (Lists.concat2 [
-                          Serialization.cst "  (:require"] requireClauses)),
-                        (Serialization.cst ")")]))
-              varNames =
-                      Lists.concat (Lists.map (\fwc ->
-                        let form = Syntax.topLevelFormWithCommentsForm fwc
-                        in case form of
-                          Syntax.TopLevelFormVariable v1 -> [
-                            symbolToExpr (Syntax.variableDefinitionName v1)]
-                          Syntax.TopLevelFormFunction v1 -> [
-                            symbolToExpr (Syntax.functionDefinitionName v1)]
-                          _ -> []) forms)
-              declareForm =
-                      Logic.ifElse (Lists.null varNames) [] [
-                        Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-                          Serialization.cst "declare"] varNames))]
-          in (Serialization.doubleNewlineSep (Lists.concat [
-            [
-              nsForm],
-            declareForm,
-            formPart]))) modDecl
-        Syntax.DialectEmacsLisp -> Maybes.maybe (Serialization.doubleNewlineSep formPart) (\m ->
-          let nameStr = Syntax.unNamespaceName (Syntax.moduleDeclarationName m)
-              requireClLib =
-                      Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "require",
-                        (Serialization.noSep [
-                          Serialization.cst "'",
-                          (Serialization.cst "cl-lib")])])
-              requireImports =
-                      Lists.map (\imp -> Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "require",
-                        (Serialization.noSep [
-                          Serialization.cst "'",
-                          (Serialization.cst imp)])])) importNames
-              provideForm =
-                      Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "provide",
-                        (Serialization.noSep [
-                          Serialization.cst "'",
-                          (Serialization.cst nameStr)])])
-          in (Serialization.doubleNewlineSep (Lists.concat [
-            [
-              requireClLib],
-            requireImports,
-            formPart,
-            [
-              provideForm]]))) modDecl
-        Syntax.DialectCommonLisp -> Maybes.maybe (Serialization.doubleNewlineSep formPart) (\m ->
-          let nameStr = Syntax.unNamespaceName (Syntax.moduleDeclarationName m)
-              colonName = Strings.cat2 ":" nameStr
-              useClause =
-                      Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-                        Serialization.cst ":use",
-                        (Serialization.cst ":cl")] (Lists.map (\imp -> Serialization.cst (Strings.cat2 ":" imp)) importNames)))
-              exportClause =
-                      Logic.ifElse (Lists.null exportSyms) [] [
-                        Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-                          Serialization.cst ":export"] (Lists.map (\s -> Serialization.noSep [
-                          Serialization.cst ":",
-                          s]) exportSyms)))]
-              defpkgForm =
-                      Serialization.parens (Serialization.newlineSep (Lists.concat [
-                        [
-                          Serialization.spaceSep [
-                            Serialization.cst "defpackage",
-                            (Serialization.cst colonName)]],
-                        [
-                          useClause],
-                        exportClause]))
-              inpkgForm =
-                      Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "in-package",
-                        (Serialization.cst colonName)])
-          in (Serialization.doubleNewlineSep (Lists.concat [
-            [
-              defpkgForm,
-              inpkgForm],
-            formPart]))) modDecl
-        Syntax.DialectScheme -> Maybes.maybe (Serialization.doubleNewlineSep formPart) (\m ->
-          let nameStr = Syntax.unNamespaceName (Syntax.moduleDeclarationName m)
-              nameParts = Lists.map (\p -> Formatting.convertCaseCamelToLowerSnake p) (Strings.splitOn "." nameStr)
-              nameExpr = Serialization.parens (Serialization.spaceSep (Lists.map (\p -> Serialization.cst p) nameParts))
-              domainImportExprs =
-                      Lists.map (\idecl ->
-                        let nsName = Syntax.unNamespaceName (Syntax.importDeclarationModule idecl)
-                            nsParts = Lists.map (\p -> Formatting.convertCaseCamelToLowerSnake p) (Strings.splitOn "." nsName)
-                        in (Serialization.parens (Serialization.spaceSep (Lists.map (\p -> Serialization.cst p) nsParts)))) imports
-              schemeBaseExpr =
-                      Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "scheme",
-                        (Serialization.cst "base")])
-              allImportExprs = Lists.concat2 [
-                    schemeBaseExpr] domainImportExprs
-              importClause = Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-                    Serialization.cst "import"] allImportExprs))
-              exportClauses = Lists.map (\edecl -> exportDeclarationToExpr d edecl) exports
-              beginClause = Serialization.parens (Serialization.newlineSep (Lists.concat2 [
-                    Serialization.cst "begin"] formPart))
-          in (Serialization.parens (Serialization.newlineSep (Lists.concat [
-            [
-              Serialization.spaceSep [
-                Serialization.cst "define-library",
-                nameExpr]],
-            exportClauses,
-            [
-              importClause],
-            [
-              beginClause]])))) modDecl
-recordTypeDefinitionToExpr :: Syntax.Dialect -> Syntax.RecordTypeDefinition -> Ast.Expr
-recordTypeDefinitionToExpr d rdef =
-
-      let name = symbolToExpr (Syntax.recordTypeDefinitionName rdef)
-          fields = Lists.map (\f -> symbolToExpr (Syntax.fieldDefinitionName f)) (Syntax.recordTypeDefinitionFields rdef)
-      in case d of
-        Syntax.DialectClojure ->
-          let nameStr = Syntax.unSymbol (Syntax.recordTypeDefinitionName rdef)
-              fieldNames = Lists.map (\f -> Syntax.unSymbol (Syntax.fieldDefinitionName f)) (Syntax.recordTypeDefinitionFields rdef)
-              defrecordForm =
-                      Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst "defrecord",
-                        name,
-                        (Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep fields))])
-              makeAlias =
-                      Serialization.parens (Serialization.spaceSep (Lists.concat [
-                        [
-                          Serialization.cst "defn",
-                          (Serialization.cst (Strings.cat2 "make-" nameStr))],
-                        [
-                          Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep fields)],
-                        [
-                          Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-                            Serialization.cst (Strings.cat2 "->" nameStr)] (Lists.map (\fn -> Serialization.cst fn) fieldNames)))]]))
-          in (Serialization.newlineSep [
-            defrecordForm,
-            makeAlias])
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "cl-defstruct",
-            name],
-          fields]))
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat [
-          [
-            Serialization.cst "cl:defstruct",
-            name],
-          fields]))
-        Syntax.DialectScheme ->
-          let nameStr = Syntax.unSymbol (Syntax.recordTypeDefinitionName rdef)
-              fieldNames = Lists.map (\f -> Syntax.unSymbol (Syntax.fieldDefinitionName f)) (Syntax.recordTypeDefinitionFields rdef)
-              constructor =
-                      Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-                        Serialization.cst (Strings.cat2 "make-" nameStr)] (Lists.map (\fn -> Serialization.cst fn) fieldNames)))
-              predicate = Serialization.cst (Strings.cat2 nameStr "?")
-              accessors =
-                      Lists.map (\fn -> Serialization.parens (Serialization.spaceSep [
-                        Serialization.cst fn,
-                        (Serialization.cst (Strings.cat [
-                          nameStr,
-                          "-",
-                          fn]))])) fieldNames
-          in (Serialization.parens (Serialization.spaceSep (Lists.concat [
-            [
-              Serialization.cst "define-record-type",
-              name,
-              constructor,
-              predicate],
-            accessors])))
-sExpressionToExpr :: Syntax.SExpression -> Ast.Expr
-sExpressionToExpr sexpr =
-    case sexpr of
-      Syntax.SExpressionAtom v0 -> Serialization.cst v0
-      Syntax.SExpressionList v0 -> Serialization.parens (Serialization.spaceSep (Lists.map sExpressionToExpr v0))
-setLiteralToExpr :: Syntax.Dialect -> Syntax.SetLiteral -> Ast.Expr
-setLiteralToExpr d sl =
-
-      let elems = Lists.map (expressionToExpr d) (Syntax.setLiteralElements sl)
-      in case d of
-        Syntax.DialectClojure -> Serialization.noSep [
-          Serialization.cst "#",
-          (Serialization.brackets Serialization.curlyBraces Serialization.inlineStyle (Serialization.spaceSep elems))]
-        Syntax.DialectEmacsLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-          Serialization.cst "list"] elems))
-        Syntax.DialectCommonLisp -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-          Serialization.cst "cl:list"] elems))
-        Syntax.DialectScheme -> Serialization.parens (Serialization.spaceSep (Lists.concat2 [
-          Serialization.cst "list"] elems))
-symbolToExpr :: Syntax.Symbol -> Ast.Expr
-symbolToExpr s = Serialization.cst (Syntax.unSymbol s)
-topLevelFormToExpr :: Syntax.Dialect -> Syntax.TopLevelForm -> Ast.Expr
-topLevelFormToExpr d form =
-    case form of
-      Syntax.TopLevelFormFunction v0 -> functionDefinitionToExpr d v0
-      Syntax.TopLevelFormVariable v0 -> variableDefinitionToExpr d v0
-      Syntax.TopLevelFormConstant v0 -> constantDefinitionToExpr d v0
-      Syntax.TopLevelFormRecordType v0 -> recordTypeDefinitionToExpr d v0
-      Syntax.TopLevelFormMacro v0 -> macroDefinitionToExpr d v0
-      Syntax.TopLevelFormExpression v0 -> expressionToExpr d v0
-topLevelFormWithCommentsToExpr :: Syntax.Dialect -> Syntax.TopLevelFormWithComments -> Ast.Expr
-topLevelFormWithCommentsToExpr d fwc =
-
-      let mdoc = Syntax.topLevelFormWithCommentsDoc fwc
-          mcomment = Syntax.topLevelFormWithCommentsComment fwc
-          form = Syntax.topLevelFormWithCommentsForm fwc
-          docPart = Maybes.maybe [] (\ds -> [
-                docstringToExpr ds]) mdoc
-          commentPart = Maybes.maybe [] (\c -> [
-                commentToExpr c]) mcomment
-          formExpr = topLevelFormToExpr d form
-      in (Serialization.newlineSep (Lists.concat [
-        commentPart,
-        docPart,
-        [
-          formExpr]]))
-trueExpr :: Syntax.Dialect -> Ast.Expr
-trueExpr d =
-    case d of
-      Syntax.DialectClojure -> Serialization.cst "true"
-      Syntax.DialectEmacsLisp -> Serialization.cst "t"
-      Syntax.DialectCommonLisp -> Serialization.cst "cl:t"
-      Syntax.DialectScheme -> Serialization.cst "#t"
-variableDefinitionToExpr :: Syntax.Dialect -> Syntax.VariableDefinition -> Ast.Expr
-variableDefinitionToExpr d vdef =
-
-      let name = symbolToExpr (Syntax.variableDefinitionName vdef)
-          value = expressionToExpr d (Syntax.variableDefinitionValue vdef)
-      in (Serialization.parens (Serialization.spaceSep [
-        Serialization.cst (defKeyword d),
-        name,
-        value]))
-variableReferenceToExpr :: Syntax.Dialect -> Syntax.VariableReference -> Ast.Expr
-variableReferenceToExpr d vref =
-
-      let name = symbolToExpr (Syntax.variableReferenceName vref)
-          isFnNs = Syntax.variableReferenceFunctionNamespace vref
-      in (Logic.ifElse isFnNs (case d of
-        Syntax.DialectCommonLisp -> Serialization.noSep [
-          Serialization.cst "#'",
-          name]
-        Syntax.DialectClojure -> name
-        Syntax.DialectEmacsLisp -> name
-        Syntax.DialectScheme -> name) name)
-vectorLiteralToExpr :: Syntax.Dialect -> Syntax.VectorLiteral -> Ast.Expr
-vectorLiteralToExpr d vl =
-
-      let elems = Lists.map (expressionToExpr d) (Syntax.vectorLiteralElements vl)
-      in case d of
-        Syntax.DialectClojure -> Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep elems)
-        Syntax.DialectEmacsLisp -> Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.spaceSep elems)
-        Syntax.DialectCommonLisp -> Serialization.noSep [
-          Serialization.cst "#",
-          (Serialization.parens (Serialization.spaceSep elems))]
-        Syntax.DialectScheme -> Serialization.noSep [
-          Serialization.cst "#",
-          (Serialization.parens (Serialization.spaceSep elems))]
diff --git a/src/main/haskell/Hydra/Lisp/Syntax.hs b/src/main/haskell/Hydra/Lisp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Lisp/Syntax.hs
+++ /dev/null
@@ -1,859 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A unified Lisp syntax model covering Clojure, Emacs Lisp, Common Lisp, and Scheme (R7RS). Designed for code generation from Hydra types and terms.
-
-module Hydra.Lisp.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
--- | A Lisp program, consisting of a sequence of top-level forms
-data Program =
-  Program {
-    -- | The target Lisp dialect
-    programDialect :: Dialect,
-    -- | Optional module/namespace declaration
-    programModule :: (Maybe ModuleDeclaration),
-    -- | Import/require declarations
-    programImports :: [ImportDeclaration],
-    -- | Export/provide declarations
-    programExports :: [ExportDeclaration],
-    -- | The top-level forms in the program
-    programForms :: [TopLevelFormWithComments]}
-  deriving (Eq, Ord, Read, Show)
-_Program = Core.Name "hydra.lisp.syntax.Program"
-_Program_dialect = Core.Name "dialect"
-_Program_module = Core.Name "module"
-_Program_imports = Core.Name "imports"
-_Program_exports = Core.Name "exports"
-_Program_forms = Core.Name "forms"
--- | A top-level form in a Lisp program
-data TopLevelForm =
-  -- | A named function definition
-  TopLevelFormFunction FunctionDefinition |
-  -- | A global variable definition
-  TopLevelFormVariable VariableDefinition |
-  -- | A constant definition
-  TopLevelFormConstant ConstantDefinition |
-  -- | A record/struct type definition
-  TopLevelFormRecordType RecordTypeDefinition |
-  -- | A macro definition
-  TopLevelFormMacro MacroDefinition |
-  -- | A bare expression at the top level
-  TopLevelFormExpression Expression
-  deriving (Eq, Ord, Read, Show)
-_TopLevelForm = Core.Name "hydra.lisp.syntax.TopLevelForm"
-_TopLevelForm_function = Core.Name "function"
-_TopLevelForm_variable = Core.Name "variable"
-_TopLevelForm_constant = Core.Name "constant"
-_TopLevelForm_recordType = Core.Name "recordType"
-_TopLevelForm_macro = Core.Name "macro"
-_TopLevelForm_expression = Core.Name "expression"
--- | A top-level form together with optional documentation
-data TopLevelFormWithComments =
-  TopLevelFormWithComments {
-    -- | Optional documentation string
-    topLevelFormWithCommentsDoc :: (Maybe Docstring),
-    -- | Optional comment
-    topLevelFormWithCommentsComment :: (Maybe Comment),
-    -- | The form itself
-    topLevelFormWithCommentsForm :: TopLevelForm}
-  deriving (Eq, Ord, Read, Show)
-_TopLevelFormWithComments = Core.Name "hydra.lisp.syntax.TopLevelFormWithComments"
-_TopLevelFormWithComments_doc = Core.Name "doc"
-_TopLevelFormWithComments_comment = Core.Name "comment"
-_TopLevelFormWithComments_form = Core.Name "form"
--- | A named function definition. Serializes as (defn name [params] body) in Clojure, (defun name (params) body) in Emacs Lisp and Common Lisp, (define (name params) body) in Scheme
-data FunctionDefinition =
-  FunctionDefinition {
-    -- | The function name
-    functionDefinitionName :: Symbol,
-    -- | The parameter list
-    functionDefinitionParams :: [Symbol],
-    -- | Optional rest/variadic parameter
-    functionDefinitionRestParam :: (Maybe Symbol),
-    -- | Optional docstring
-    functionDefinitionDoc :: (Maybe Docstring),
-    -- | Optional type hints for parameters and return type
-    functionDefinitionTypeHints :: [TypeHint],
-    -- | The function body (one or more expressions)
-    functionDefinitionBody :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_FunctionDefinition = Core.Name "hydra.lisp.syntax.FunctionDefinition"
-_FunctionDefinition_name = Core.Name "name"
-_FunctionDefinition_params = Core.Name "params"
-_FunctionDefinition_restParam = Core.Name "restParam"
-_FunctionDefinition_doc = Core.Name "doc"
-_FunctionDefinition_typeHints = Core.Name "typeHints"
-_FunctionDefinition_body = Core.Name "body"
--- | A global variable definition. Serializes as (def name value) in Clojure, (defvar name value) in Emacs Lisp and Common Lisp, (define name value) in Scheme
-data VariableDefinition =
-  VariableDefinition {
-    -- | The variable name
-    variableDefinitionName :: Symbol,
-    -- | The initial value
-    variableDefinitionValue :: Expression,
-    -- | Optional docstring
-    variableDefinitionDoc :: (Maybe Docstring)}
-  deriving (Eq, Ord, Read, Show)
-_VariableDefinition = Core.Name "hydra.lisp.syntax.VariableDefinition"
-_VariableDefinition_name = Core.Name "name"
-_VariableDefinition_value = Core.Name "value"
-_VariableDefinition_doc = Core.Name "doc"
--- | A constant definition. Serializes as (def ^:const name value) in Clojure, (defconst name value) in Emacs Lisp, (defconstant name value) in Common Lisp. Scheme has no dedicated constant form; uses define.
-data ConstantDefinition =
-  ConstantDefinition {
-    -- | The constant name
-    constantDefinitionName :: Symbol,
-    -- | The constant value
-    constantDefinitionValue :: Expression,
-    -- | Optional docstring
-    constantDefinitionDoc :: (Maybe Docstring)}
-  deriving (Eq, Ord, Read, Show)
-_ConstantDefinition = Core.Name "hydra.lisp.syntax.ConstantDefinition"
-_ConstantDefinition_name = Core.Name "name"
-_ConstantDefinition_value = Core.Name "value"
-_ConstantDefinition_doc = Core.Name "doc"
--- | A record/struct type definition. Serializes as (defrecord Name [fields]) in Clojure, (cl-defstruct name fields) in Emacs Lisp, (defstruct name fields) in Common Lisp, (define-record-type <Name> ...) in Scheme
-data RecordTypeDefinition =
-  RecordTypeDefinition {
-    -- | The record type name
-    recordTypeDefinitionName :: Symbol,
-    -- | The field definitions
-    recordTypeDefinitionFields :: [FieldDefinition],
-    -- | Optional docstring
-    recordTypeDefinitionDoc :: (Maybe Docstring)}
-  deriving (Eq, Ord, Read, Show)
-_RecordTypeDefinition = Core.Name "hydra.lisp.syntax.RecordTypeDefinition"
-_RecordTypeDefinition_name = Core.Name "name"
-_RecordTypeDefinition_fields = Core.Name "fields"
-_RecordTypeDefinition_doc = Core.Name "doc"
--- | A field in a record type definition
-data FieldDefinition =
-  FieldDefinition {
-    -- | The field name
-    fieldDefinitionName :: Symbol,
-    -- | Optional default value
-    fieldDefinitionDefaultValue :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_FieldDefinition = Core.Name "hydra.lisp.syntax.FieldDefinition"
-_FieldDefinition_name = Core.Name "name"
-_FieldDefinition_defaultValue = Core.Name "defaultValue"
--- | A macro definition. Serializes as (defmacro name [params] body) in Clojure, (defmacro name (params) body) in Emacs Lisp and Common Lisp, (define-syntax name ...) in Scheme
-data MacroDefinition =
-  MacroDefinition {
-    -- | The macro name
-    macroDefinitionName :: Symbol,
-    -- | The parameter list
-    macroDefinitionParams :: [Symbol],
-    -- | Optional rest parameter
-    macroDefinitionRestParam :: (Maybe Symbol),
-    -- | The macro body
-    macroDefinitionBody :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_MacroDefinition = Core.Name "hydra.lisp.syntax.MacroDefinition"
-_MacroDefinition_name = Core.Name "name"
-_MacroDefinition_params = Core.Name "params"
-_MacroDefinition_restParam = Core.Name "restParam"
-_MacroDefinition_body = Core.Name "body"
--- | A Lisp expression
-data Expression =
-  -- | Function application: (f arg1 arg2 ...)
-  ExpressionApplication Application |
-  -- | Anonymous function
-  ExpressionLambda Lambda |
-  -- | Local variable binding
-  ExpressionLet LetExpression |
-  -- | Conditional expression
-  ExpressionIf IfExpression |
-  -- | Multi-branch conditional
-  ExpressionCond CondExpression |
-  -- | Case/match dispatch
-  ExpressionCase CaseExpression |
-  -- | Logical and (short-circuiting)
-  ExpressionAnd AndExpression |
-  -- | Logical or (short-circuiting)
-  ExpressionOr OrExpression |
-  -- | Logical negation
-  ExpressionNot NotExpression |
-  -- | Sequential evaluation (progn/do/begin)
-  ExpressionDo DoExpression |
-  -- | Sequential evaluation (explicit begin block)
-  ExpressionBegin BeginExpression |
-  -- | Variable reference
-  ExpressionVariable VariableReference |
-  -- | A literal value
-  ExpressionLiteral Literal |
-  -- | A list literal
-  ExpressionList ListLiteral |
-  -- | A vector literal
-  ExpressionVector VectorLiteral |
-  -- | A map/association literal
-  ExpressionMap MapLiteral |
-  -- | A set literal
-  ExpressionSet SetLiteral |
-  -- | A cons expression
-  ExpressionCons ConsExpression |
-  -- | A dotted pair literal
-  ExpressionDottedPair DottedPair |
-  -- | Field access on a record/struct
-  ExpressionFieldAccess FieldAccess |
-  -- | A type-annotated expression
-  ExpressionTypeAnnotation TypeAnnotation |
-  -- | A quoted expression
-  ExpressionQuote QuoteExpression |
-  -- | A quasiquoted expression
-  ExpressionQuasiquote QuasiquoteExpression |
-  -- | An unquoted expression within a quasiquote
-  ExpressionUnquote UnquoteExpression |
-  -- | A splicing unquote within a quasiquote
-  ExpressionSplicingUnquote SplicingUnquoteExpression |
-  -- | An arbitrary S-expression (escape hatch for dialect-specific forms)
-  ExpressionSExpression SExpression
-  deriving (Eq, Ord, Read, Show)
-_Expression = Core.Name "hydra.lisp.syntax.Expression"
-_Expression_application = Core.Name "application"
-_Expression_lambda = Core.Name "lambda"
-_Expression_let = Core.Name "let"
-_Expression_if = Core.Name "if"
-_Expression_cond = Core.Name "cond"
-_Expression_case = Core.Name "case"
-_Expression_and = Core.Name "and"
-_Expression_or = Core.Name "or"
-_Expression_not = Core.Name "not"
-_Expression_do = Core.Name "do"
-_Expression_begin = Core.Name "begin"
-_Expression_variable = Core.Name "variable"
-_Expression_literal = Core.Name "literal"
-_Expression_list = Core.Name "list"
-_Expression_vector = Core.Name "vector"
-_Expression_map = Core.Name "map"
-_Expression_set = Core.Name "set"
-_Expression_cons = Core.Name "cons"
-_Expression_dottedPair = Core.Name "dottedPair"
-_Expression_fieldAccess = Core.Name "fieldAccess"
-_Expression_typeAnnotation = Core.Name "typeAnnotation"
-_Expression_quote = Core.Name "quote"
-_Expression_quasiquote = Core.Name "quasiquote"
-_Expression_unquote = Core.Name "unquote"
-_Expression_splicingUnquote = Core.Name "splicingUnquote"
-_Expression_sExpression = Core.Name "sExpression"
--- | Function application: (function arg1 arg2 ...)
-data Application =
-  Application {
-    -- | The function being applied
-    applicationFunction :: Expression,
-    -- | The arguments
-    applicationArguments :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_Application = Core.Name "hydra.lisp.syntax.Application"
-_Application_function = Core.Name "function"
-_Application_arguments = Core.Name "arguments"
--- | An anonymous function. Serializes as (fn [params] body) in Clojure, (lambda (params) body) in Emacs Lisp, Common Lisp, and Scheme. If name is provided, emits (fn name [params] body) in Clojure for self-reference.
-data Lambda =
-  Lambda {
-    -- | Optional name for self-referential lambdas (Clojure named fn)
-    lambdaName :: (Maybe Symbol),
-    -- | The parameter list
-    lambdaParams :: [Symbol],
-    -- | Optional rest parameter
-    lambdaRestParam :: (Maybe Symbol),
-    -- | The lambda body
-    lambdaBody :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_Lambda = Core.Name "hydra.lisp.syntax.Lambda"
-_Lambda_name = Core.Name "name"
-_Lambda_params = Core.Name "params"
-_Lambda_restParam = Core.Name "restParam"
-_Lambda_body = Core.Name "body"
--- | A reference to a variable by name
-data VariableReference =
-  VariableReference {
-    -- | The variable name
-    variableReferenceName :: Symbol,
-    -- | Whether to reference from the function namespace. In Lisp-2 dialects (Common Lisp), this emits #'name. In Lisp-1 dialects, this has no effect.
-    variableReferenceFunctionNamespace :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_VariableReference = Core.Name "hydra.lisp.syntax.VariableReference"
-_VariableReference_name = Core.Name "name"
-_VariableReference_functionNamespace = Core.Name "functionNamespace"
--- | Field access on a record/struct. Serializes as (:field record) in Clojure, (struct-field record) in Emacs Lisp and Common Lisp, (record-field record) in Scheme
-data FieldAccess =
-  FieldAccess {
-    -- | The record type name (used to form accessor name)
-    fieldAccessRecordType :: Symbol,
-    -- | The field name
-    fieldAccessField :: Symbol,
-    -- | The expression being accessed
-    fieldAccessTarget :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_FieldAccess = Core.Name "hydra.lisp.syntax.FieldAccess"
-_FieldAccess_recordType = Core.Name "recordType"
-_FieldAccess_field = Core.Name "field"
-_FieldAccess_target = Core.Name "target"
--- | An expression with a type annotation
-data TypeAnnotation =
-  TypeAnnotation {
-    -- | The annotated expression
-    typeAnnotationExpression :: Expression,
-    -- | The type specifier
-    typeAnnotationType :: TypeSpecifier}
-  deriving (Eq, Ord, Read, Show)
-_TypeAnnotation = Core.Name "hydra.lisp.syntax.TypeAnnotation"
-_TypeAnnotation_expression = Core.Name "expression"
-_TypeAnnotation_type = Core.Name "type"
--- | Conditional: (if test then else)
-data IfExpression =
-  IfExpression {
-    -- | The test expression
-    ifExpressionCondition :: Expression,
-    -- | The then branch
-    ifExpressionThen :: Expression,
-    -- | Optional else branch
-    ifExpressionElse :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_IfExpression = Core.Name "hydra.lisp.syntax.IfExpression"
-_IfExpression_condition = Core.Name "condition"
-_IfExpression_then = Core.Name "then"
-_IfExpression_else = Core.Name "else"
--- | Multi-branch conditional. Serializes as (cond test1 expr1 test2 expr2 :else default) in Clojure, (cond (test1 expr1) (test2 expr2) (t default)) in Emacs Lisp and Common Lisp, (cond (test1 expr1) (test2 expr2) (else default)) in Scheme
-data CondExpression =
-  CondExpression {
-    -- | The condition-expression pairs
-    condExpressionClauses :: [CondClause],
-    -- | Optional default expression
-    condExpressionDefault :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_CondExpression = Core.Name "hydra.lisp.syntax.CondExpression"
-_CondExpression_clauses = Core.Name "clauses"
-_CondExpression_default = Core.Name "default"
--- | A clause in a cond expression
-data CondClause =
-  CondClause {
-    -- | The test condition
-    condClauseCondition :: Expression,
-    -- | The result expression
-    condClauseBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_CondClause = Core.Name "hydra.lisp.syntax.CondClause"
-_CondClause_condition = Core.Name "condition"
-_CondClause_body = Core.Name "body"
--- | Case dispatch on a value. Serializes as (case x key1 expr1 key2 expr2 default) in Clojure, (case x (key1 expr1) (key2 expr2) (otherwise default)) in Common Lisp, (case x ((key1) expr1) ((key2) expr2) (else default)) in Scheme
-data CaseExpression =
-  CaseExpression {
-    -- | The expression being dispatched on
-    caseExpressionScrutinee :: Expression,
-    -- | The case clauses
-    caseExpressionClauses :: [CaseClause],
-    -- | Optional default clause
-    caseExpressionDefault :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_CaseExpression = Core.Name "hydra.lisp.syntax.CaseExpression"
-_CaseExpression_scrutinee = Core.Name "scrutinee"
-_CaseExpression_clauses = Core.Name "clauses"
-_CaseExpression_default = Core.Name "default"
--- | A clause in a case expression
-data CaseClause =
-  CaseClause {
-    -- | The matching keys (one or more datum values)
-    caseClauseKeys :: [Expression],
-    -- | The result expression
-    caseClauseBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_CaseClause = Core.Name "hydra.lisp.syntax.CaseClause"
-_CaseClause_keys = Core.Name "keys"
-_CaseClause_body = Core.Name "body"
--- | Logical and: (and expr1 expr2 ...)
-data AndExpression =
-  AndExpression {
-    -- | The operand expressions
-    andExpressionExpressions :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_AndExpression = Core.Name "hydra.lisp.syntax.AndExpression"
-_AndExpression_expressions = Core.Name "expressions"
--- | Logical or: (or expr1 expr2 ...)
-data OrExpression =
-  OrExpression {
-    -- | The operand expressions
-    orExpressionExpressions :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_OrExpression = Core.Name "hydra.lisp.syntax.OrExpression"
-_OrExpression_expressions = Core.Name "expressions"
--- | Logical negation: (not expr)
-data NotExpression =
-  NotExpression {
-    -- | The operand expression
-    notExpressionExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_NotExpression = Core.Name "hydra.lisp.syntax.NotExpression"
-_NotExpression_expression = Core.Name "expression"
--- | Sequential evaluation of expressions, returning the last. Serializes as (do expr1 expr2 ...) in Clojure, (progn expr1 expr2 ...) in Emacs Lisp and Common Lisp, (begin expr1 expr2 ...) in Scheme
-data DoExpression =
-  DoExpression {
-    -- | The expressions to evaluate in sequence
-    doExpressionExpressions :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_DoExpression = Core.Name "hydra.lisp.syntax.DoExpression"
-_DoExpression_expressions = Core.Name "expressions"
--- | An explicit begin block (distinct from do for Scheme compatibility)
-data BeginExpression =
-  BeginExpression {
-    -- | The expressions to evaluate in sequence
-    beginExpressionExpressions :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_BeginExpression = Core.Name "hydra.lisp.syntax.BeginExpression"
-_BeginExpression_expressions = Core.Name "expressions"
--- | A quoted form: 'expr or (quote expr)
-data QuoteExpression =
-  QuoteExpression {
-    -- | The quoted form
-    quoteExpressionBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_QuoteExpression = Core.Name "hydra.lisp.syntax.QuoteExpression"
-_QuoteExpression_body = Core.Name "body"
--- | A quasiquoted form: `expr
-data QuasiquoteExpression =
-  QuasiquoteExpression {
-    -- | The quasiquoted form
-    quasiquoteExpressionBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_QuasiquoteExpression = Core.Name "hydra.lisp.syntax.QuasiquoteExpression"
-_QuasiquoteExpression_body = Core.Name "body"
--- | An unquoted form within a quasiquote: ~expr or ,expr
-data UnquoteExpression =
-  UnquoteExpression {
-    -- | The unquoted form
-    unquoteExpressionBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_UnquoteExpression = Core.Name "hydra.lisp.syntax.UnquoteExpression"
-_UnquoteExpression_body = Core.Name "body"
--- | A splicing unquote within a quasiquote: ~@expr or ,@expr
-data SplicingUnquoteExpression =
-  SplicingUnquoteExpression {
-    -- | The spliced form
-    splicingUnquoteExpressionBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_SplicingUnquoteExpression = Core.Name "hydra.lisp.syntax.SplicingUnquoteExpression"
-_SplicingUnquoteExpression_body = Core.Name "body"
--- | Local variable bindings. Serializes as (let [x 1 y 2] body) in Clojure (always sequential), (let ((x 1) (y 2)) body) or (let* ...) in other dialects
-data LetExpression =
-  LetExpression {
-    -- | The kind of let (parallel or sequential)
-    letExpressionKind :: LetKind,
-    -- | The variable bindings
-    letExpressionBindings :: [LetBinding],
-    -- | The body expressions
-    letExpressionBody :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_LetExpression = Core.Name "hydra.lisp.syntax.LetExpression"
-_LetExpression_kind = Core.Name "kind"
-_LetExpression_bindings = Core.Name "bindings"
-_LetExpression_body = Core.Name "body"
--- | The kind of let binding
-data LetKind =
-  LetKindParallel |
-  LetKindSequential |
-  LetKindRecursive
-  deriving (Eq, Ord, Read, Show)
-_LetKind = Core.Name "hydra.lisp.syntax.LetKind"
-_LetKind_parallel = Core.Name "parallel"
-_LetKind_sequential = Core.Name "sequential"
-_LetKind_recursive = Core.Name "recursive"
--- | A single binding in a let expression
-data LetBinding =
-  -- | A simple name-value binding
-  LetBindingSimple SimpleBinding |
-  -- | A destructuring binding
-  LetBindingDestructuring DestructuringBinding
-  deriving (Eq, Ord, Read, Show)
-_LetBinding = Core.Name "hydra.lisp.syntax.LetBinding"
-_LetBinding_simple = Core.Name "simple"
-_LetBinding_destructuring = Core.Name "destructuring"
--- | A simple name-value binding in a let expression
-data SimpleBinding =
-  SimpleBinding {
-    -- | The bound variable
-    simpleBindingName :: Symbol,
-    -- | The value expression
-    simpleBindingValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_SimpleBinding = Core.Name "hydra.lisp.syntax.SimpleBinding"
-_SimpleBinding_name = Core.Name "name"
-_SimpleBinding_value = Core.Name "value"
--- | A destructuring binding in a let expression
-data DestructuringBinding =
-  DestructuringBinding {
-    -- | The destructuring pattern
-    destructuringBindingPattern :: DestructuringPattern,
-    -- | The value to destructure
-    destructuringBindingValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_DestructuringBinding = Core.Name "hydra.lisp.syntax.DestructuringBinding"
-_DestructuringBinding_pattern = Core.Name "pattern"
-_DestructuringBinding_value = Core.Name "value"
--- | A destructuring pattern
-data DestructuringPattern =
-  -- | Sequential destructuring: [a b c] in Clojure, (a b c) in others
-  DestructuringPatternSequential [Symbol] |
-  -- | Associative/map destructuring: {:keys [a b]} in Clojure
-  DestructuringPatternAssociative [Symbol] |
-  -- | Destructuring with a rest element: [a b & rest] (leading symbols + rest symbol)
-  DestructuringPatternRest [Symbol]
-  deriving (Eq, Ord, Read, Show)
-_DestructuringPattern = Core.Name "hydra.lisp.syntax.DestructuringPattern"
-_DestructuringPattern_sequential = Core.Name "sequential"
-_DestructuringPattern_associative = Core.Name "associative"
-_DestructuringPattern_rest = Core.Name "rest"
--- | A pattern for use in case expressions or match forms
-data Pattern =
-  -- | A constructor pattern (for union/sum type matching)
-  PatternConstructor ConstructorPattern |
-  -- | A literal pattern
-  PatternLiteral LiteralPattern |
-  -- | A wildcard pattern matching anything
-  PatternWildcard WildcardPattern |
-  -- | A variable pattern that binds the matched value
-  PatternVariable Symbol
-  deriving (Eq, Ord, Read, Show)
-_Pattern = Core.Name "hydra.lisp.syntax.Pattern"
-_Pattern_constructor = Core.Name "constructor"
-_Pattern_literal = Core.Name "literal"
-_Pattern_wildcard = Core.Name "wildcard"
-_Pattern_variable = Core.Name "variable"
--- | A constructor pattern matching a tagged value
-data ConstructorPattern =
-  ConstructorPattern {
-    -- | The constructor/tag name
-    constructorPatternConstructor :: Symbol,
-    -- | The sub-patterns for constructor arguments
-    constructorPatternArguments :: [Pattern]}
-  deriving (Eq, Ord, Read, Show)
-_ConstructorPattern = Core.Name "hydra.lisp.syntax.ConstructorPattern"
-_ConstructorPattern_constructor = Core.Name "constructor"
-_ConstructorPattern_arguments = Core.Name "arguments"
--- | A pattern matching a literal value
-data LiteralPattern =
-  LiteralPattern {
-    -- | The literal to match
-    literalPatternValue :: Literal}
-  deriving (Eq, Ord, Read, Show)
-_LiteralPattern = Core.Name "hydra.lisp.syntax.LiteralPattern"
-_LiteralPattern_value = Core.Name "value"
--- | A wildcard pattern that matches any value
-data WildcardPattern =
-  WildcardPattern {}
-  deriving (Eq, Ord, Read, Show)
-_WildcardPattern = Core.Name "hydra.lisp.syntax.WildcardPattern"
--- | A Lisp literal value
-data Literal =
-  -- | An integer literal
-  LiteralInteger IntegerLiteral |
-  -- | A floating-point literal
-  LiteralFloat FloatLiteral |
-  -- | A string literal
-  LiteralString String |
-  -- | A character literal
-  LiteralCharacter CharacterLiteral |
-  -- | A boolean literal (dialect-specific rendering)
-  LiteralBoolean Bool |
-  -- | Nil/null/empty list (dialect-specific rendering)
-  LiteralNil |
-  -- | A keyword literal
-  LiteralKeyword Keyword |
-  -- | A quoted symbol literal
-  LiteralSymbol Symbol
-  deriving (Eq, Ord, Read, Show)
-_Literal = Core.Name "hydra.lisp.syntax.Literal"
-_Literal_integer = Core.Name "integer"
-_Literal_float = Core.Name "float"
-_Literal_string = Core.Name "string"
-_Literal_character = Core.Name "character"
-_Literal_boolean = Core.Name "boolean"
-_Literal_nil = Core.Name "nil"
-_Literal_keyword = Core.Name "keyword"
-_Literal_symbol = Core.Name "symbol"
--- | An integer literal
-data IntegerLiteral =
-  IntegerLiteral {
-    -- | The integer value
-    integerLiteralValue :: Integer,
-    -- | Whether this is explicitly a big integer (e.g. 42N in Clojure)
-    integerLiteralBigint :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_IntegerLiteral = Core.Name "hydra.lisp.syntax.IntegerLiteral"
-_IntegerLiteral_value = Core.Name "value"
-_IntegerLiteral_bigint = Core.Name "bigint"
--- | A floating-point literal
-data FloatLiteral =
-  FloatLiteral {
-    -- | The float value
-    floatLiteralValue :: Double,
-    -- | Optional precision hint (e.g. 3.14d0 vs 3.14f0 in Common Lisp)
-    floatLiteralPrecision :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_FloatLiteral = Core.Name "hydra.lisp.syntax.FloatLiteral"
-_FloatLiteral_value = Core.Name "value"
-_FloatLiteral_precision = Core.Name "precision"
--- | A character literal. Concrete syntax varies: \a (Clojure), ?a (Emacs Lisp), #\a (Common Lisp, Scheme)
-data CharacterLiteral =
-  CharacterLiteral {
-    -- | The character value
-    characterLiteralValue :: String}
-  deriving (Eq, Ord, Read, Show)
-_CharacterLiteral = Core.Name "hydra.lisp.syntax.CharacterLiteral"
-_CharacterLiteral_value = Core.Name "value"
--- | The style of boolean literals in a dialect
-data BooleanStyle =
-  BooleanStyleTrueFalse |
-  BooleanStyleTNil |
-  BooleanStyleHashTF
-  deriving (Eq, Ord, Read, Show)
-_BooleanStyle = Core.Name "hydra.lisp.syntax.BooleanStyle"
-_BooleanStyle_trueFalse = Core.Name "trueFalse"
-_BooleanStyle_tNil = Core.Name "tNil"
-_BooleanStyle_hashTF = Core.Name "hashTF"
--- | The style of nil/null in a dialect
-data NilStyle =
-  NilStyleNil |
-  NilStyleEmptyList
-  deriving (Eq, Ord, Read, Show)
-_NilStyle = Core.Name "hydra.lisp.syntax.NilStyle"
-_NilStyle_nil = Core.Name "nil"
-_NilStyle_emptyList = Core.Name "emptyList"
--- | A Lisp symbol (identifier)
-newtype Symbol =
-  Symbol {
-    unSymbol :: String}
-  deriving (Eq, Ord, Read, Show)
-_Symbol = Core.Name "hydra.lisp.syntax.Symbol"
--- | A keyword (self-evaluating symbol). Serializes as :name in Clojure, Emacs Lisp, and Common Lisp
-data Keyword =
-  Keyword {
-    -- | The keyword name (without the leading colon)
-    keywordName :: String,
-    -- | Optional namespace (e.g. my.ns/foo in Clojure)
-    keywordNamespace :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_Keyword = Core.Name "hydra.lisp.syntax.Keyword"
-_Keyword_name = Core.Name "name"
-_Keyword_namespace = Core.Name "namespace"
--- | A namespace-qualified symbol. Serializes as ns/name in Clojure, pkg:name or pkg::name in Common Lisp
-data QualifiedSymbol =
-  QualifiedSymbol {
-    -- | The namespace or package
-    qualifiedSymbolNamespace :: String,
-    -- | The local name
-    qualifiedSymbolName :: String}
-  deriving (Eq, Ord, Read, Show)
-_QualifiedSymbol = Core.Name "hydra.lisp.syntax.QualifiedSymbol"
-_QualifiedSymbol_namespace = Core.Name "namespace"
-_QualifiedSymbol_name = Core.Name "name"
--- | A namespace or package name
-newtype NamespaceName =
-  NamespaceName {
-    unNamespaceName :: String}
-  deriving (Eq, Ord, Read, Show)
-_NamespaceName = Core.Name "hydra.lisp.syntax.NamespaceName"
--- | A list literal: '(1 2 3) or (list 1 2 3)
-data ListLiteral =
-  ListLiteral {
-    -- | The list elements
-    listLiteralElements :: [Expression],
-    -- | Whether to use quote syntax vs constructor syntax
-    listLiteralQuoted :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_ListLiteral = Core.Name "hydra.lisp.syntax.ListLiteral"
-_ListLiteral_elements = Core.Name "elements"
-_ListLiteral_quoted = Core.Name "quoted"
--- | A vector literal. Serializes as [1 2 3] in Clojure and Emacs Lisp, #(1 2 3) in Common Lisp and Scheme
-data VectorLiteral =
-  VectorLiteral {
-    -- | The vector elements
-    vectorLiteralElements :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_VectorLiteral = Core.Name "hydra.lisp.syntax.VectorLiteral"
-_VectorLiteral_elements = Core.Name "elements"
--- | A map/dictionary literal. Serializes as {:a 1 :b 2} in Clojure, as an alist '((a . 1) (b . 2)) in other dialects
-data MapLiteral =
-  MapLiteral {
-    -- | The key-value pairs
-    mapLiteralEntries :: [MapEntry]}
-  deriving (Eq, Ord, Read, Show)
-_MapLiteral = Core.Name "hydra.lisp.syntax.MapLiteral"
-_MapLiteral_entries = Core.Name "entries"
--- | A key-value pair in a map literal
-data MapEntry =
-  MapEntry {
-    -- | The key expression
-    mapEntryKey :: Expression,
-    -- | The value expression
-    mapEntryValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_MapEntry = Core.Name "hydra.lisp.syntax.MapEntry"
-_MapEntry_key = Core.Name "key"
-_MapEntry_value = Core.Name "value"
--- | A set literal. Serializes as #{1 2 3} in Clojure. Other dialects use a list-based construction.
-data SetLiteral =
-  SetLiteral {
-    -- | The set elements
-    setLiteralElements :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_SetLiteral = Core.Name "hydra.lisp.syntax.SetLiteral"
-_SetLiteral_elements = Core.Name "elements"
--- | A cons expression: (cons head tail)
-data ConsExpression =
-  ConsExpression {
-    -- | The head element
-    consExpressionHead :: Expression,
-    -- | The tail (typically a list or another cons)
-    consExpressionTail :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_ConsExpression = Core.Name "hydra.lisp.syntax.ConsExpression"
-_ConsExpression_head = Core.Name "head"
-_ConsExpression_tail = Core.Name "tail"
--- | A dotted pair literal: '(a . b). Not available in Clojure.
-data DottedPair =
-  DottedPair {
-    -- | The first element
-    dottedPairCar :: Expression,
-    -- | The second element
-    dottedPairCdr :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_DottedPair = Core.Name "hydra.lisp.syntax.DottedPair"
-_DottedPair_car = Core.Name "car"
-_DottedPair_cdr = Core.Name "cdr"
--- | A type hint or annotation. In Clojure: ^Type name. In Common Lisp: (declare (type Type name)). In Scheme and Emacs Lisp: typically unused.
-data TypeHint =
-  TypeHint {
-    -- | The annotated symbol
-    typeHintName :: Symbol,
-    -- | The type specifier
-    typeHintType :: TypeSpecifier}
-  deriving (Eq, Ord, Read, Show)
-_TypeHint = Core.Name "hydra.lisp.syntax.TypeHint"
-_TypeHint_name = Core.Name "name"
-_TypeHint_type = Core.Name "type"
--- | A type specifier
-data TypeSpecifier =
-  -- | A named type reference
-  TypeSpecifierNamed Symbol |
-  -- | A list type
-  TypeSpecifierList TypeSpecifier |
-  -- | A function type (params and return)
-  TypeSpecifierFunction [TypeSpecifier] |
-  -- | An optional type
-  TypeSpecifierMaybe TypeSpecifier |
-  -- | A map type (key and value type specifiers)
-  TypeSpecifierMap [TypeSpecifier] |
-  -- | A set type
-  TypeSpecifierSet TypeSpecifier |
-  -- | A pair/tuple type (two type specifiers)
-  TypeSpecifierPair [TypeSpecifier] |
-  -- | An either/union type (two type specifiers)
-  TypeSpecifierEither [TypeSpecifier] |
-  -- | The unit type
-  TypeSpecifierUnit
-  deriving (Eq, Ord, Read, Show)
-_TypeSpecifier = Core.Name "hydra.lisp.syntax.TypeSpecifier"
-_TypeSpecifier_named = Core.Name "named"
-_TypeSpecifier_list = Core.Name "list"
-_TypeSpecifier_function = Core.Name "function"
-_TypeSpecifier_maybe = Core.Name "maybe"
-_TypeSpecifier_map = Core.Name "map"
-_TypeSpecifier_set = Core.Name "set"
-_TypeSpecifier_pair = Core.Name "pair"
-_TypeSpecifier_either = Core.Name "either"
-_TypeSpecifier_unit = Core.Name "unit"
--- | A module/namespace declaration. Serializes as (ns name ...) in Clojure, (provide 'name) in Emacs Lisp, (defpackage :name ... ) (in-package :name) in Common Lisp, (define-library (name) ...) in Scheme
-data ModuleDeclaration =
-  ModuleDeclaration {
-    -- | The module/namespace name
-    moduleDeclarationName :: NamespaceName,
-    -- | Optional module documentation
-    moduleDeclarationDoc :: (Maybe Docstring)}
-  deriving (Eq, Ord, Read, Show)
-_ModuleDeclaration = Core.Name "hydra.lisp.syntax.ModuleDeclaration"
-_ModuleDeclaration_name = Core.Name "name"
-_ModuleDeclaration_doc = Core.Name "doc"
--- | An import/require declaration. Serializes as (:require [name ...]) in Clojure, (require 'name) in Emacs Lisp, (:use :name) or (:import-from :name ...) in Common Lisp, (import (name)) in Scheme
-data ImportDeclaration =
-  ImportDeclaration {
-    -- | The module being imported
-    importDeclarationModule :: NamespaceName,
-    -- | Import specification
-    importDeclarationSpec :: ImportSpec}
-  deriving (Eq, Ord, Read, Show)
-_ImportDeclaration = Core.Name "hydra.lisp.syntax.ImportDeclaration"
-_ImportDeclaration_module = Core.Name "module"
-_ImportDeclaration_spec = Core.Name "spec"
--- | An import specification describing how to import symbols
-data ImportSpec =
-  -- | Import everything
-  ImportSpecAll |
-  -- | Import with an alias: (:require [name :as alias]) in Clojure
-  ImportSpecAlias Symbol |
-  -- | Import specific symbols: (:require [name :refer [sym1 sym2]]) in Clojure
-  ImportSpecOnly [Symbol] |
-  -- | Import with renaming: list of (from, to) symbol pairs
-  ImportSpecRename [[Symbol]]
-  deriving (Eq, Ord, Read, Show)
-_ImportSpec = Core.Name "hydra.lisp.syntax.ImportSpec"
-_ImportSpec_all = Core.Name "all"
-_ImportSpec_alias = Core.Name "alias"
-_ImportSpec_only = Core.Name "only"
-_ImportSpec_rename = Core.Name "rename"
--- | An export/provide declaration. Serializes as (provide 'name) in Emacs Lisp, (:export :sym1 :sym2) in Common Lisp, (export sym1 sym2) in Scheme. In Clojure, symbols are public by default.
-data ExportDeclaration =
-  ExportDeclaration {
-    -- | The symbols to export
-    exportDeclarationSymbols :: [Symbol]}
-  deriving (Eq, Ord, Read, Show)
-_ExportDeclaration = Core.Name "hydra.lisp.syntax.ExportDeclaration"
-_ExportDeclaration_symbols = Core.Name "symbols"
--- | A comment
-data Comment =
-  Comment {
-    -- | The comment style
-    commentStyle :: CommentStyle,
-    -- | The comment text
-    commentText :: String}
-  deriving (Eq, Ord, Read, Show)
-_Comment = Core.Name "hydra.lisp.syntax.Comment"
-_Comment_style = Core.Name "style"
-_Comment_text = Core.Name "text"
--- | The style of a comment
-data CommentStyle =
-  CommentStyleLine |
-  CommentStyleBlock |
-  CommentStyleDatum
-  deriving (Eq, Ord, Read, Show)
-_CommentStyle = Core.Name "hydra.lisp.syntax.CommentStyle"
-_CommentStyle_line = Core.Name "line"
-_CommentStyle_block = Core.Name "block"
-_CommentStyle_datum = Core.Name "datum"
--- | A documentation string
-newtype Docstring =
-  Docstring {
-    unDocstring :: String}
-  deriving (Eq, Ord, Read, Show)
-_Docstring = Core.Name "hydra.lisp.syntax.Docstring"
--- | A Lisp dialect
-data Dialect =
-  DialectClojure |
-  DialectEmacsLisp |
-  DialectCommonLisp |
-  DialectScheme
-  deriving (Eq, Ord, Read, Show)
-_Dialect = Core.Name "hydra.lisp.syntax.Dialect"
-_Dialect_clojure = Core.Name "clojure"
-_Dialect_emacsLisp = Core.Name "emacsLisp"
-_Dialect_commonLisp = Core.Name "commonLisp"
-_Dialect_scheme = Core.Name "scheme"
--- | A raw S-expression. This is an escape hatch for expressing arbitrary Lisp forms that do not fit into the structured AST above.
-data SExpression =
-  -- | An atomic value
-  SExpressionAtom String |
-  -- | A list of S-expressions
-  SExpressionList [SExpression]
-  deriving (Eq, Ord, Read, Show)
-_SExpression = Core.Name "hydra.lisp.syntax.SExpression"
-_SExpression_atom = Core.Name "atom"
-_SExpression_list = Core.Name "list"
diff --git a/src/main/haskell/Hydra/Literals.hs b/src/main/haskell/Hydra/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Literals.hs
+++ /dev/null
@@ -1,48 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Conversion functions for literal values.
-
-module Hydra.Literals where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Literals as Literals
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Convert a bigfloat to a floating-point value of a given type (note: lossy)
-bigfloatToFloatValue :: Core.FloatType -> Double -> Core.FloatValue
-bigfloatToFloatValue ft bf =
-    case ft of
-      Core.FloatTypeBigfloat -> Core.FloatValueBigfloat bf
-      Core.FloatTypeFloat32 -> Core.FloatValueFloat32 (Literals.bigfloatToFloat32 bf)
-      Core.FloatTypeFloat64 -> Core.FloatValueFloat64 (Literals.bigfloatToFloat64 bf)
--- | Convert a bigint to an integer value of a given type (note: lossy)
-bigintToIntegerValue :: Core.IntegerType -> Integer -> Core.IntegerValue
-bigintToIntegerValue it bi =
-    case it of
-      Core.IntegerTypeBigint -> Core.IntegerValueBigint bi
-      Core.IntegerTypeInt8 -> Core.IntegerValueInt8 (Literals.bigintToInt8 bi)
-      Core.IntegerTypeInt16 -> Core.IntegerValueInt16 (Literals.bigintToInt16 bi)
-      Core.IntegerTypeInt32 -> Core.IntegerValueInt32 (Literals.bigintToInt32 bi)
-      Core.IntegerTypeInt64 -> Core.IntegerValueInt64 (Literals.bigintToInt64 bi)
-      Core.IntegerTypeUint8 -> Core.IntegerValueUint8 (Literals.bigintToUint8 bi)
-      Core.IntegerTypeUint16 -> Core.IntegerValueUint16 (Literals.bigintToUint16 bi)
-      Core.IntegerTypeUint32 -> Core.IntegerValueUint32 (Literals.bigintToUint32 bi)
-      Core.IntegerTypeUint64 -> Core.IntegerValueUint64 (Literals.bigintToUint64 bi)
--- | Convert a floating-point value of any precision to a bigfloat
-floatValueToBigfloat :: Core.FloatValue -> Double
-floatValueToBigfloat x =
-    case x of
-      Core.FloatValueBigfloat v0 -> v0
-      Core.FloatValueFloat32 v0 -> Literals.float32ToBigfloat v0
-      Core.FloatValueFloat64 v0 -> Literals.float64ToBigfloat v0
--- | Convert an integer value of any precision to a bigint
-integerValueToBigint :: Core.IntegerValue -> Integer
-integerValueToBigint x =
-    case x of
-      Core.IntegerValueBigint v0 -> v0
-      Core.IntegerValueInt8 v0 -> Literals.int8ToBigint v0
-      Core.IntegerValueInt16 v0 -> Literals.int16ToBigint v0
-      Core.IntegerValueInt32 v0 -> Literals.int32ToBigint v0
-      Core.IntegerValueInt64 v0 -> Literals.int64ToBigint v0
-      Core.IntegerValueUint8 v0 -> Literals.uint8ToBigint v0
-      Core.IntegerValueUint16 v0 -> Literals.uint16ToBigint v0
-      Core.IntegerValueUint32 v0 -> Literals.uint32ToBigint v0
-      Core.IntegerValueUint64 v0 -> Literals.uint64ToBigint v0
diff --git a/src/main/haskell/Hydra/Minimal.hs b/src/main/haskell/Hydra/Minimal.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Minimal.hs
+++ /dev/null
@@ -1,24 +0,0 @@
--- | A minimal, standalone Hydra kernel which allows external tools (like @wisnesky's Algorithm W implementation)
---   to take a lightweight dependency on Hydra types or functions, without requiring compilation of Hydra proper.
---   There are two versions of this module:
---   * External: has all of the necessary Hydra definitions in one file
---   * Internal: just exports the appropriate symbols from the actual Hydra modules
-
-module Hydra.Minimal (
-  FloatType(..),
-  FloatValue(..),
-  IntegerType(..),
-  IntegerValue(..),
-  Literal(..),
-  LiteralType(..),
-  Name(..),
-  floatValueType,
-  integerValueType,
-  int32,
-  literalType,
-  string,
-) where
-
-import Hydra.Core
-import Hydra.Reflect
-import Hydra.Dsl.Literals
diff --git a/src/main/haskell/Hydra/Module/Compat.hs b/src/main/haskell/Hydra/Module/Compat.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Module/Compat.hs
+++ /dev/null
@@ -1,46 +0,0 @@
--- | Compatibility functions for converting between Definition and Binding.
--- These bridge the gap during the transition from Module.elements :: [Binding]
--- to Module.definitions :: [Definition].
-
-module Hydra.Module.Compat (
-  bindingToDefinition,
-  definitionToBinding,
-  moduleBindings,
-) where
-
-import Hydra.Core
-import Hydra.Packaging
-import qualified Hydra.Encode.Core as EncodeCore
-
-import qualified Data.List as L
-import qualified Data.Map as M
-
-
--- | Convert a Binding to a Definition (always produces DefinitionTerm).
-bindingToDefinition :: Binding -> Definition
-bindingToDefinition b = DefinitionTerm $ TermDefinition {
-  termDefinitionName = bindingName b,
-  termDefinitionTerm = bindingTerm b,
-  termDefinitionTypeScheme = bindingTypeScheme b}
-
--- | Convert a Definition back to a Binding.
-definitionToBinding :: Definition -> Binding
-definitionToBinding d = case d of
-  DefinitionTerm td -> Binding {
-    bindingName = termDefinitionName td,
-    bindingTerm = termDefinitionTerm td,
-    bindingTypeScheme = termDefinitionTypeScheme td}
-  DefinitionType td ->
-    let encoded = EncodeCore.type_ (typeSchemeBody $ typeDefinitionTypeScheme td)
-        annotated = TermAnnotated (AnnotatedTerm {
-          annotatedTermBody = encoded,
-          annotatedTermAnnotation = M.fromList [
-            (Name "type", TermVariable (Name "hydra.core.Type"))]})
-    in Binding {
-      bindingName = typeDefinitionName td,
-      bindingTerm = annotated,
-      bindingTypeScheme = Just (TypeScheme [] (TypeVariable (Name "hydra.core.Type")) Nothing)}
-
--- | Extract all definitions from a module as Bindings.
-moduleBindings :: Module -> [Binding]
-moduleBindings m = L.map definitionToBinding (moduleDefinitions m)
diff --git a/src/main/haskell/Hydra/Names.hs b/src/main/haskell/Hydra/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Names.hs
+++ /dev/null
@@ -1,116 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for working with qualified names.
-
-module Hydra.Names where
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Util as Util
-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
--- | Given a mapping of namespaces to prefixes, convert a name to a compact string representation
-compactName :: M.Map Packaging.Namespace String -> Core.Name -> String
-compactName namespaces name =
-
-      let qualName = qualifyName name
-          mns = Packaging.qualifiedNameNamespace qualName
-          local = Packaging.qualifiedNameLocal qualName
-      in (Maybes.maybe (Core.unName name) (\ns -> Maybes.maybe local (\pre -> Strings.cat [
-        pre,
-        ":",
-        local]) (Maps.lookup ns namespaces)) mns)
--- | Generate a fresh type variable name, threading Context
-freshName :: Context.Context -> (Core.Name, Context.Context)
-freshName cx =
-
-      let count = Annotations.getCount Constants.key_freshTypeVariableCount cx
-      in (normalTypeVariable count, (Annotations.putCount Constants.key_freshTypeVariableCount (Math.add count 1) cx))
--- | Generate multiple fresh type variable names, threading Context
-freshNames :: Int -> Context.Context -> ([Core.Name], Context.Context)
-freshNames n cx =
-
-      let go =
-              \acc -> \_ ->
-                let names = Pairs.first acc
-                    cx0 = Pairs.second acc
-                    result = freshName cx0
-                    name = Pairs.first result
-                    cx1 = Pairs.second result
-                in (Lists.concat2 names (Lists.pure name), cx1)
-      in (Lists.foldl go ([], cx) (Lists.replicate n ()))
--- | Extract the local part of a name
-localNameOf :: Core.Name -> String
-localNameOf arg_ = Packaging.qualifiedNameLocal (qualifyName arg_)
--- | Convert a name to file path, given case conventions for namespaces and local names, and assuming '/' as the file path separator
-nameToFilePath :: Util.CaseConvention -> Util.CaseConvention -> Packaging.FileExtension -> Core.Name -> String
-nameToFilePath nsConv localConv ext name =
-
-      let qualName = qualifyName name
-          ns = Packaging.qualifiedNameNamespace qualName
-          local = Packaging.qualifiedNameLocal qualName
-          nsToFilePath =
-                  \ns2 -> Strings.intercalate "/" (Lists.map (\part -> Formatting.convertCase Util.CaseConventionCamel nsConv part) (Strings.splitOn "." (Packaging.unNamespace ns2)))
-          prefix = Maybes.maybe "" (\n -> Strings.cat2 (nsToFilePath n) "/") ns
-          suffix = Formatting.convertCase Util.CaseConventionPascal localConv local
-      in (Strings.cat [
-        prefix,
-        suffix,
-        ".",
-        (Packaging.unFileExtension ext)])
--- | Extract the namespace of a name, if any
-namespaceOf :: Core.Name -> Maybe Packaging.Namespace
-namespaceOf arg_ = Packaging.qualifiedNameNamespace (qualifyName arg_)
--- | Convert a namespace to a file path with the given case convention and file extension
-namespaceToFilePath :: Util.CaseConvention -> Packaging.FileExtension -> Packaging.Namespace -> String
-namespaceToFilePath caseConv ext ns =
-
-      let parts = Lists.map (Formatting.convertCase Util.CaseConventionCamel caseConv) (Strings.splitOn "." (Packaging.unNamespace ns))
-      in (Strings.cat2 (Strings.cat2 (Strings.intercalate "/" parts) ".") (Packaging.unFileExtension ext))
--- | Type variable naming convention follows Haskell: t0, t1, etc.
-normalTypeVariable :: Int -> Core.Name
-normalTypeVariable i = Core.Name (Strings.cat2 "t" (Literals.showInt32 i))
--- | Construct a qualified (dot-separated) name
-qname :: Packaging.Namespace -> String -> Core.Name
-qname ns name =
-    Core.Name (Strings.cat [
-      Packaging.unNamespace ns,
-      ".",
-      name])
--- | Split a dot-separated name into a namespace and local name
-qualifyName :: Core.Name -> Packaging.QualifiedName
-qualifyName name =
-
-      let parts = Lists.reverse (Strings.splitOn "." (Core.unName name))
-      in (Maybes.maybe (Packaging.QualifiedName {
-        Packaging.qualifiedNameNamespace = Nothing,
-        Packaging.qualifiedNameLocal = (Core.unName name)}) (\uc ->
-        let localName = Pairs.first uc
-            restReversed = Pairs.second uc
-        in (Logic.ifElse (Lists.null restReversed) (Packaging.QualifiedName {
-          Packaging.qualifiedNameNamespace = Nothing,
-          Packaging.qualifiedNameLocal = (Core.unName name)}) (Packaging.QualifiedName {
-          Packaging.qualifiedNameNamespace = (Just (Packaging.Namespace (Strings.intercalate "." (Lists.reverse restReversed)))),
-          Packaging.qualifiedNameLocal = localName}))) (Lists.uncons parts))
--- | Generate a unique label by appending a suffix if the label is already in use
-uniqueLabel :: S.Set String -> String -> String
-uniqueLabel visited l = Logic.ifElse (Sets.member l visited) (uniqueLabel visited (Strings.cat2 l "'")) l
--- | Convert a qualified name to a dot-separated name
-unqualifyName :: Packaging.QualifiedName -> Core.Name
-unqualifyName qname =
-
-      let prefix = Maybes.maybe "" (\n -> Strings.cat2 (Packaging.unNamespace n) ".") (Packaging.qualifiedNameNamespace qname)
-      in (Core.Name (Strings.cat2 prefix (Packaging.qualifiedNameLocal qname)))
diff --git a/src/main/haskell/Hydra/Osv/Schema.hs b/src/main/haskell/Hydra/Osv/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Osv/Schema.hs
+++ /dev/null
@@ -1,255 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | See https://ossf.github.io/osv-schema
-
-module Hydra.Osv.Schema 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 Credited =
-  Credited {
-    creditedName :: String,
-    creditedContact :: (Maybe [Url])}
-  deriving (Eq, Ord, Read, Show)
-
-_Credited = Core.Name "hydra.osv.schema.Credited"
-
-_Credited_name = Core.Name "name"
-
-_Credited_contact = Core.Name "contact"
-
--- | One of a limited set of defined ecosystems, currently Go, npm, OSS-Fuzz, PyPI, RubyGems, crates.io, Packagist, Maven, NuGet, Linux, Debian, Hex, Android, GitHub Actions, or Pub
-newtype Ecosystem =
-  Ecosystem {
-    unEcosystem :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Ecosystem = Core.Name "hydra.osv.schema.Ecosystem"
-
-data Entry =
-  Entry {
-    -- | The default value is '1.0.0', matching version 1.0 of the OSV Schema
-    entrySchemaVersion :: (Maybe OsvVersion),
-    entryId :: Id,
-    entryModified :: Timestamp,
-    entryPublished :: (Maybe Timestamp),
-    entryWithdrawn :: (Maybe Timestamp),
-    entryAliases :: (Maybe [Id]),
-    entryRelated :: (Maybe [Id]),
-    entrySummary :: (Maybe String),
-    entryDetails :: (Maybe Markdown),
-    entrySeverity :: (Maybe [Severity]),
-    entryAffected :: (Maybe [PackageVersions]),
-    entryReferences :: (Maybe [Reference]),
-    entryCredits :: (Maybe [Credited])}
-  deriving (Eq, Ord, Read, Show)
-
-_Entry = Core.Name "hydra.osv.schema.Entry"
-
-_Entry_schemaVersion = Core.Name "schemaVersion"
-
-_Entry_id = Core.Name "id"
-
-_Entry_modified = Core.Name "modified"
-
-_Entry_published = Core.Name "published"
-
-_Entry_withdrawn = Core.Name "withdrawn"
-
-_Entry_aliases = Core.Name "aliases"
-
-_Entry_related = Core.Name "related"
-
-_Entry_summary = Core.Name "summary"
-
-_Entry_details = Core.Name "details"
-
-_Entry_severity = Core.Name "severity"
-
-_Entry_affected = Core.Name "affected"
-
-_Entry_references = Core.Name "references"
-
-_Entry_credits = Core.Name "credits"
-
-data Event =
-  EventIntroduced VersionOrZero |
-  EventFixed Version |
-  EventLastAffected Version |
-  EventLimit VersionOrStar
-  deriving (Eq, Ord, Read, Show)
-
-_Event = Core.Name "hydra.osv.schema.Event"
-
-_Event_introduced = Core.Name "introduced"
-
-_Event_fixed = Core.Name "fixed"
-
-_Event_lastAffected = Core.Name "lastAffected"
-
-_Event_limit = Core.Name "limit"
-
--- | A string of the format <DB>-<ENTRYID>, where DB names the database and ENTRYID is in the format used by the database. For example: OSV-2020-111, CVE-2021-3114, or GHSA-vp9c-fpxx-744v
-newtype Id =
-  Id {
-    unId :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Id = Core.Name "hydra.osv.schema.Id"
-
--- | CommonMark markdown text
-newtype Markdown =
-  Markdown {
-    unMarkdown :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Markdown = Core.Name "hydra.osv.schema.Markdown"
-
--- | A string which follows the SemVer 2.0.0 format, with no leading 'v' prefix
-newtype OsvVersion =
-  OsvVersion {
-    unOsvVersion :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_OsvVersion = Core.Name "hydra.osv.schema.OsvVersion"
-
-data Package =
-  Package {
-    packageEcosystem :: Ecosystem,
-    packageName :: String,
-    packagePurl :: (Maybe Url)}
-  deriving (Eq, Ord, Read, Show)
-
-_Package = Core.Name "hydra.osv.schema.Package"
-
-_Package_ecosystem = Core.Name "ecosystem"
-
-_Package_name = Core.Name "name"
-
-_Package_purl = Core.Name "purl"
-
-data PackageVersions =
-  PackageVersions {
-    packageVersionsPackage :: Package,
-    packageVersionsRanges :: (Maybe [VersionRange]),
-    packageVersionsVersions :: (Maybe [Version])}
-  deriving (Eq, Ord, Read, Show)
-
-_PackageVersions = Core.Name "hydra.osv.schema.PackageVersions"
-
-_PackageVersions_package = Core.Name "package"
-
-_PackageVersions_ranges = Core.Name "ranges"
-
-_PackageVersions_versions = Core.Name "versions"
-
-data Reference =
-  Reference {
-    referenceType :: ReferenceType,
-    referenceUrl :: Url}
-  deriving (Eq, Ord, Read, Show)
-
-_Reference = Core.Name "hydra.osv.schema.Reference"
-
-_Reference_type = Core.Name "type"
-
-_Reference_url = Core.Name "url"
-
--- | One of ADVISORY, ARTICLE, REPORT, FIX, GIT, PACKAGE, EVIDENCE, or WEB
-newtype ReferenceType =
-  ReferenceType {
-    unReferenceType :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceType = Core.Name "hydra.osv.schema.ReferenceType"
-
-data Severity =
-  Severity {
-    severityType :: SeverityType,
-    severityScore :: SeverityScore}
-  deriving (Eq, Ord, Read, Show)
-
-_Severity = Core.Name "hydra.osv.schema.Severity"
-
-_Severity_type = Core.Name "type"
-
-_Severity_score = Core.Name "score"
-
-newtype SeverityScore =
-  SeverityScore {
-    unSeverityScore :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_SeverityScore = Core.Name "hydra.osv.schema.SeverityScore"
-
--- | The value CVSS_V3, or future supported types
-newtype SeverityType =
-  SeverityType {
-    unSeverityType :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_SeverityType = Core.Name "hydra.osv.schema.SeverityType"
-
--- | An RFC3339-formatted timestamp in UTC (ending in 'Z')
-newtype Timestamp =
-  Timestamp {
-    unTimestamp :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Timestamp = Core.Name "hydra.osv.schema.Timestamp"
-
-newtype Url =
-  Url {
-    unUrl :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Url = Core.Name "hydra.osv.schema.Url"
-
--- | A version number in an ecosystem-specific format
-newtype Version =
-  Version {
-    unVersion :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Version = Core.Name "hydra.osv.schema.Version"
-
--- | An ecosystem-specific version number, or the string '*' representing infinity
-newtype VersionOrStar =
-  VersionOrStar {
-    unVersionOrStar :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_VersionOrStar = Core.Name "hydra.osv.schema.VersionOrStar"
-
--- | An ecosystem-specific version number, or the string '0' representing a version that sorts before any other version
-newtype VersionOrZero =
-  VersionOrZero {
-    unVersionOrZero :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_VersionOrZero = Core.Name "hydra.osv.schema.VersionOrZero"
-
-data VersionRange =
-  VersionRange {
-    versionRangeType :: VersionType,
-    versionRangeRepo :: (Maybe Url),
-    versionRangeEvents :: [Event]}
-  deriving (Eq, Ord, Read, Show)
-
-_VersionRange = Core.Name "hydra.osv.schema.VersionRange"
-
-_VersionRange_type = Core.Name "type"
-
-_VersionRange_repo = Core.Name "repo"
-
-_VersionRange_events = Core.Name "events"
-
--- | One of the values 'SEMVER', 'ECOSYSTEM', or 'GIT
-newtype VersionType =
-  VersionType {
-    unVersionType :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_VersionType = Core.Name "hydra.osv.schema.VersionType"
diff --git a/src/main/haskell/Hydra/Owl/Syntax.hs b/src/main/haskell/Hydra/Owl/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Owl/Syntax.hs
+++ /dev/null
@@ -1,1214 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | An OWL 2 syntax model. See https://www.w3.org/TR/owl2-syntax
-
-module Hydra.Owl.Syntax where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Rdf.Syntax as Syntax
-import qualified Hydra.Xml.Schema as Schema
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-data Ontology =
-  Ontology {
-    ontologyDirectImports :: [Ontology],
-    ontologyAnnotations :: [Annotation],
-    ontologyAxioms :: [Axiom]}
-  deriving (Eq, Ord, Read, Show)
-
-_Ontology = Core.Name "hydra.owl.syntax.Ontology"
-
-_Ontology_directImports = Core.Name "directImports"
-
-_Ontology_annotations = Core.Name "annotations"
-
-_Ontology_axioms = Core.Name "axioms"
-
-data Declaration =
-  Declaration {
-    declarationAnnotations :: [Annotation],
-    declarationEntity :: Entity}
-  deriving (Eq, Ord, Read, Show)
-
-_Declaration = Core.Name "hydra.owl.syntax.Declaration"
-
-_Declaration_annotations = Core.Name "annotations"
-
-_Declaration_entity = Core.Name "entity"
-
-data Entity =
-  EntityAnnotationProperty AnnotationProperty |
-  EntityClass Class |
-  EntityDataProperty DataProperty |
-  EntityDatatype Datatype |
-  EntityNamedIndividual NamedIndividual |
-  EntityObjectProperty ObjectProperty
-  deriving (Eq, Ord, Read, Show)
-
-_Entity = Core.Name "hydra.owl.syntax.Entity"
-
-_Entity_annotationProperty = Core.Name "annotationProperty"
-
-_Entity_class = Core.Name "class"
-
-_Entity_dataProperty = Core.Name "dataProperty"
-
-_Entity_datatype = Core.Name "datatype"
-
-_Entity_namedIndividual = Core.Name "namedIndividual"
-
-_Entity_objectProperty = Core.Name "objectProperty"
-
-data AnnotationSubject =
-  AnnotationSubjectIri Syntax.Iri |
-  AnnotationSubjectAnonymousIndividual AnonymousIndividual
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationSubject = Core.Name "hydra.owl.syntax.AnnotationSubject"
-
-_AnnotationSubject_iri = Core.Name "iri"
-
-_AnnotationSubject_anonymousIndividual = Core.Name "anonymousIndividual"
-
-data AnnotationValue =
-  AnnotationValueAnonymousIndividual AnonymousIndividual |
-  AnnotationValueIri Syntax.Iri |
-  AnnotationValueLiteral Syntax.Literal
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationValue = Core.Name "hydra.owl.syntax.AnnotationValue"
-
-_AnnotationValue_anonymousIndividual = Core.Name "anonymousIndividual"
-
-_AnnotationValue_iri = Core.Name "iri"
-
-_AnnotationValue_literal = Core.Name "literal"
-
-data Annotation =
-  Annotation {
-    annotationAnnotations :: [Annotation],
-    annotationProperty :: AnnotationProperty,
-    annotationValue :: AnnotationValue}
-  deriving (Eq, Ord, Read, Show)
-
-_Annotation = Core.Name "hydra.owl.syntax.Annotation"
-
-_Annotation_annotations = Core.Name "annotations"
-
-_Annotation_property = Core.Name "property"
-
-_Annotation_value = Core.Name "value"
-
-data AnnotationAxiom =
-  AnnotationAxiomAnnotationAssertion AnnotationAssertion |
-  AnnotationAxiomAnnotationPropertyDomain AnnotationPropertyDomain |
-  AnnotationAxiomAnnotationPropertyRange AnnotationPropertyRange |
-  AnnotationAxiomSubAnnotationPropertyOf SubAnnotationPropertyOf
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationAxiom = Core.Name "hydra.owl.syntax.AnnotationAxiom"
-
-_AnnotationAxiom_annotationAssertion = Core.Name "annotationAssertion"
-
-_AnnotationAxiom_annotationPropertyDomain = Core.Name "annotationPropertyDomain"
-
-_AnnotationAxiom_annotationPropertyRange = Core.Name "annotationPropertyRange"
-
-_AnnotationAxiom_subAnnotationPropertyOf = Core.Name "subAnnotationPropertyOf"
-
-data AnnotationAssertion =
-  AnnotationAssertion {
-    annotationAssertionAnnotations :: [Annotation],
-    annotationAssertionProperty :: AnnotationProperty,
-    annotationAssertionSubject :: AnnotationSubject,
-    annotationAssertionValue :: AnnotationValue}
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationAssertion = Core.Name "hydra.owl.syntax.AnnotationAssertion"
-
-_AnnotationAssertion_annotations = Core.Name "annotations"
-
-_AnnotationAssertion_property = Core.Name "property"
-
-_AnnotationAssertion_subject = Core.Name "subject"
-
-_AnnotationAssertion_value = Core.Name "value"
-
-data SubAnnotationPropertyOf =
-  SubAnnotationPropertyOf {
-    subAnnotationPropertyOfAnnotations :: [Annotation],
-    subAnnotationPropertyOfSubProperty :: AnnotationProperty,
-    subAnnotationPropertyOfSuperProperty :: AnnotationProperty}
-  deriving (Eq, Ord, Read, Show)
-
-_SubAnnotationPropertyOf = Core.Name "hydra.owl.syntax.SubAnnotationPropertyOf"
-
-_SubAnnotationPropertyOf_annotations = Core.Name "annotations"
-
-_SubAnnotationPropertyOf_subProperty = Core.Name "subProperty"
-
-_SubAnnotationPropertyOf_superProperty = Core.Name "superProperty"
-
-data AnnotationPropertyDomain =
-  AnnotationPropertyDomain {
-    annotationPropertyDomainAnnotations :: [Annotation],
-    annotationPropertyDomainProperty :: AnnotationProperty,
-    annotationPropertyDomainIri :: Syntax.Iri}
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationPropertyDomain = Core.Name "hydra.owl.syntax.AnnotationPropertyDomain"
-
-_AnnotationPropertyDomain_annotations = Core.Name "annotations"
-
-_AnnotationPropertyDomain_property = Core.Name "property"
-
-_AnnotationPropertyDomain_iri = Core.Name "iri"
-
-data AnnotationPropertyRange =
-  AnnotationPropertyRange {
-    annotationPropertyRangeAnnotations :: [Annotation],
-    annotationPropertyRangeProperty :: AnnotationProperty,
-    annotationPropertyRangeIri :: Syntax.Iri}
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationPropertyRange = Core.Name "hydra.owl.syntax.AnnotationPropertyRange"
-
-_AnnotationPropertyRange_annotations = Core.Name "annotations"
-
-_AnnotationPropertyRange_property = Core.Name "property"
-
-_AnnotationPropertyRange_iri = Core.Name "iri"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Classes
-newtype Class =
-  Class {
-    unClass :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_Class = Core.Name "hydra.owl.syntax.Class"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Datatypes
-data Datatype =
-  -- | Note: XML Schema datatypes are treated as a special case in this model (not in the OWL 2 specification itself) because they are particularly common
-  DatatypeXmlSchema Schema.Datatype |
-  DatatypeOther Syntax.Iri
-  deriving (Eq, Ord, Read, Show)
-
-_Datatype = Core.Name "hydra.owl.syntax.Datatype"
-
-_Datatype_xmlSchema = Core.Name "xmlSchema"
-
-_Datatype_other = Core.Name "other"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Object_Properties
-newtype ObjectProperty =
-  ObjectProperty {
-    unObjectProperty :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectProperty = Core.Name "hydra.owl.syntax.ObjectProperty"
-
-newtype DataProperty =
-  DataProperty {
-    unDataProperty :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_DataProperty = Core.Name "hydra.owl.syntax.DataProperty"
-
-newtype AnnotationProperty =
-  AnnotationProperty {
-    unAnnotationProperty :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_AnnotationProperty = Core.Name "hydra.owl.syntax.AnnotationProperty"
-
-data Individual =
-  IndividualNamed NamedIndividual |
-  IndividualAnonymous AnonymousIndividual
-  deriving (Eq, Ord, Read, Show)
-
-_Individual = Core.Name "hydra.owl.syntax.Individual"
-
-_Individual_named = Core.Name "named"
-
-_Individual_anonymous = Core.Name "anonymous"
-
-newtype NamedIndividual =
-  NamedIndividual {
-    unNamedIndividual :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedIndividual = Core.Name "hydra.owl.syntax.NamedIndividual"
-
-newtype AnonymousIndividual =
-  AnonymousIndividual {
-    unAnonymousIndividual :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_AnonymousIndividual = Core.Name "hydra.owl.syntax.AnonymousIndividual"
-
-data ObjectPropertyExpression =
-  ObjectPropertyExpressionObject ObjectProperty |
-  ObjectPropertyExpressionInverseObject InverseObjectProperty
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPropertyExpression = Core.Name "hydra.owl.syntax.ObjectPropertyExpression"
-
-_ObjectPropertyExpression_object = Core.Name "object"
-
-_ObjectPropertyExpression_inverseObject = Core.Name "inverseObject"
-
-newtype InverseObjectProperty =
-  InverseObjectProperty {
-    unInverseObjectProperty :: ObjectProperty}
-  deriving (Eq, Ord, Read, Show)
-
-_InverseObjectProperty = Core.Name "hydra.owl.syntax.InverseObjectProperty"
-
-newtype DataPropertyExpression =
-  DataPropertyExpression {
-    unDataPropertyExpression :: DataProperty}
-  deriving (Eq, Ord, Read, Show)
-
-_DataPropertyExpression = Core.Name "hydra.owl.syntax.DataPropertyExpression"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Data_Ranges
-data DataRange =
-  DataRangeDataComplementOf DataComplementOf |
-  DataRangeDataIntersectionOf DataIntersectionOf |
-  DataRangeDataOneOf DataOneOf |
-  DataRangeDataUnionOf DataUnionOf |
-  DataRangeDatatype Datatype |
-  DataRangeDatatypeRestriction DatatypeRestriction
-  deriving (Eq, Ord, Read, Show)
-
-_DataRange = Core.Name "hydra.owl.syntax.DataRange"
-
-_DataRange_dataComplementOf = Core.Name "dataComplementOf"
-
-_DataRange_dataIntersectionOf = Core.Name "dataIntersectionOf"
-
-_DataRange_dataOneOf = Core.Name "dataOneOf"
-
-_DataRange_dataUnionOf = Core.Name "dataUnionOf"
-
-_DataRange_datatype = Core.Name "datatype"
-
-_DataRange_datatypeRestriction = Core.Name "datatypeRestriction"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Intersection_of_Data_Ranges
-newtype DataIntersectionOf =
-  DataIntersectionOf {
-    unDataIntersectionOf :: [DataRange]}
-  deriving (Eq, Ord, Read, Show)
-
-_DataIntersectionOf = Core.Name "hydra.owl.syntax.DataIntersectionOf"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Union_of_Data_Ranges
-newtype DataUnionOf =
-  DataUnionOf {
-    unDataUnionOf :: [DataRange]}
-  deriving (Eq, Ord, Read, Show)
-
-_DataUnionOf = Core.Name "hydra.owl.syntax.DataUnionOf"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Complement_of_Data_Ranges
-newtype DataComplementOf =
-  DataComplementOf {
-    unDataComplementOf :: DataRange}
-  deriving (Eq, Ord, Read, Show)
-
-_DataComplementOf = Core.Name "hydra.owl.syntax.DataComplementOf"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Enumeration_of_Literals
-newtype DataOneOf =
-  DataOneOf {
-    unDataOneOf :: [Syntax.Literal]}
-  deriving (Eq, Ord, Read, Show)
-
-_DataOneOf = Core.Name "hydra.owl.syntax.DataOneOf"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Datatype_Restrictions
-data DatatypeRestriction =
-  DatatypeRestriction {
-    datatypeRestrictionDatatype :: Datatype,
-    datatypeRestrictionConstraints :: [DatatypeRestriction_Constraint]}
-  deriving (Eq, Ord, Read, Show)
-
-_DatatypeRestriction = Core.Name "hydra.owl.syntax.DatatypeRestriction"
-
-_DatatypeRestriction_datatype = Core.Name "datatype"
-
-_DatatypeRestriction_constraints = Core.Name "constraints"
-
-data DatatypeRestriction_Constraint =
-  DatatypeRestriction_Constraint {
-    datatypeRestriction_ConstraintConstrainingFacet :: DatatypeRestriction_ConstrainingFacet,
-    datatypeRestriction_ConstraintRestrictionValue :: Syntax.Literal}
-  deriving (Eq, Ord, Read, Show)
-
-_DatatypeRestriction_Constraint = Core.Name "hydra.owl.syntax.DatatypeRestriction_Constraint"
-
-_DatatypeRestriction_Constraint_constrainingFacet = Core.Name "constrainingFacet"
-
-_DatatypeRestriction_Constraint_restrictionValue = Core.Name "restrictionValue"
-
-data DatatypeRestriction_ConstrainingFacet =
-  -- | Note: XML Schema constraining facets are treated as a special case in this model (not in the OWL 2 specification itself) because they are particularly common
-  DatatypeRestriction_ConstrainingFacetXmlSchema Schema.ConstrainingFacet |
-  DatatypeRestriction_ConstrainingFacetOther Syntax.Iri
-  deriving (Eq, Ord, Read, Show)
-
-_DatatypeRestriction_ConstrainingFacet = Core.Name "hydra.owl.syntax.DatatypeRestriction_ConstrainingFacet"
-
-_DatatypeRestriction_ConstrainingFacet_xmlSchema = Core.Name "xmlSchema"
-
-_DatatypeRestriction_ConstrainingFacet_other = Core.Name "other"
-
-data ClassExpression =
-  ClassExpressionClass Class |
-  ClassExpressionDataSomeValuesFrom DataSomeValuesFrom |
-  ClassExpressionDataAllValuesFrom DataAllValuesFrom |
-  ClassExpressionDataHasValue DataHasValue |
-  ClassExpressionDataMinCardinality DataMinCardinality |
-  ClassExpressionDataMaxCardinality DataMaxCardinality |
-  ClassExpressionDataExactCardinality DataExactCardinality |
-  ClassExpressionObjectAllValuesFrom ObjectAllValuesFrom |
-  ClassExpressionObjectExactCardinality ObjectExactCardinality |
-  ClassExpressionObjectHasSelf ObjectHasSelf |
-  ClassExpressionObjectHasValue ObjectHasValue |
-  ClassExpressionObjectIntersectionOf ObjectIntersectionOf |
-  ClassExpressionObjectMaxCardinality ObjectMaxCardinality |
-  ClassExpressionObjectMinCardinality ObjectMinCardinality |
-  ClassExpressionObjectOneOf ObjectOneOf |
-  ClassExpressionObjectSomeValuesFrom ObjectSomeValuesFrom |
-  ClassExpressionObjectUnionOf ObjectUnionOf
-  deriving (Eq, Ord, Read, Show)
-
-_ClassExpression = Core.Name "hydra.owl.syntax.ClassExpression"
-
-_ClassExpression_class = Core.Name "class"
-
-_ClassExpression_dataSomeValuesFrom = Core.Name "dataSomeValuesFrom"
-
-_ClassExpression_dataAllValuesFrom = Core.Name "dataAllValuesFrom"
-
-_ClassExpression_dataHasValue = Core.Name "dataHasValue"
-
-_ClassExpression_dataMinCardinality = Core.Name "dataMinCardinality"
-
-_ClassExpression_dataMaxCardinality = Core.Name "dataMaxCardinality"
-
-_ClassExpression_dataExactCardinality = Core.Name "dataExactCardinality"
-
-_ClassExpression_objectAllValuesFrom = Core.Name "objectAllValuesFrom"
-
-_ClassExpression_objectExactCardinality = Core.Name "objectExactCardinality"
-
-_ClassExpression_objectHasSelf = Core.Name "objectHasSelf"
-
-_ClassExpression_objectHasValue = Core.Name "objectHasValue"
-
-_ClassExpression_objectIntersectionOf = Core.Name "objectIntersectionOf"
-
-_ClassExpression_objectMaxCardinality = Core.Name "objectMaxCardinality"
-
-_ClassExpression_objectMinCardinality = Core.Name "objectMinCardinality"
-
-_ClassExpression_objectOneOf = Core.Name "objectOneOf"
-
-_ClassExpression_objectSomeValuesFrom = Core.Name "objectSomeValuesFrom"
-
-_ClassExpression_objectUnionOf = Core.Name "objectUnionOf"
-
-newtype ObjectIntersectionOf =
-  ObjectIntersectionOf {
-    unObjectIntersectionOf :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectIntersectionOf = Core.Name "hydra.owl.syntax.ObjectIntersectionOf"
-
-newtype ObjectUnionOf =
-  ObjectUnionOf {
-    unObjectUnionOf :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectUnionOf = Core.Name "hydra.owl.syntax.ObjectUnionOf"
-
-newtype ObjectComplementOf =
-  ObjectComplementOf {
-    unObjectComplementOf :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectComplementOf = Core.Name "hydra.owl.syntax.ObjectComplementOf"
-
-newtype ObjectOneOf =
-  ObjectOneOf {
-    unObjectOneOf :: [Individual]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectOneOf = Core.Name "hydra.owl.syntax.ObjectOneOf"
-
-data ObjectSomeValuesFrom =
-  ObjectSomeValuesFrom {
-    objectSomeValuesFromProperty :: ObjectPropertyExpression,
-    objectSomeValuesFromClass :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectSomeValuesFrom = Core.Name "hydra.owl.syntax.ObjectSomeValuesFrom"
-
-_ObjectSomeValuesFrom_property = Core.Name "property"
-
-_ObjectSomeValuesFrom_class = Core.Name "class"
-
-data ObjectAllValuesFrom =
-  ObjectAllValuesFrom {
-    objectAllValuesFromProperty :: ObjectPropertyExpression,
-    objectAllValuesFromClass :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectAllValuesFrom = Core.Name "hydra.owl.syntax.ObjectAllValuesFrom"
-
-_ObjectAllValuesFrom_property = Core.Name "property"
-
-_ObjectAllValuesFrom_class = Core.Name "class"
-
-data ObjectHasValue =
-  ObjectHasValue {
-    objectHasValueProperty :: ObjectPropertyExpression,
-    objectHasValueIndividual :: Individual}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectHasValue = Core.Name "hydra.owl.syntax.ObjectHasValue"
-
-_ObjectHasValue_property = Core.Name "property"
-
-_ObjectHasValue_individual = Core.Name "individual"
-
-newtype ObjectHasSelf =
-  ObjectHasSelf {
-    unObjectHasSelf :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectHasSelf = Core.Name "hydra.owl.syntax.ObjectHasSelf"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Minimum_Cardinality
-data ObjectMinCardinality =
-  ObjectMinCardinality {
-    objectMinCardinalityBound :: Integer,
-    objectMinCardinalityProperty :: ObjectPropertyExpression,
-    objectMinCardinalityClass :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectMinCardinality = Core.Name "hydra.owl.syntax.ObjectMinCardinality"
-
-_ObjectMinCardinality_bound = Core.Name "bound"
-
-_ObjectMinCardinality_property = Core.Name "property"
-
-_ObjectMinCardinality_class = Core.Name "class"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Maximum_Cardinality
-data ObjectMaxCardinality =
-  ObjectMaxCardinality {
-    objectMaxCardinalityBound :: Integer,
-    objectMaxCardinalityProperty :: ObjectPropertyExpression,
-    objectMaxCardinalityClass :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectMaxCardinality = Core.Name "hydra.owl.syntax.ObjectMaxCardinality"
-
-_ObjectMaxCardinality_bound = Core.Name "bound"
-
-_ObjectMaxCardinality_property = Core.Name "property"
-
-_ObjectMaxCardinality_class = Core.Name "class"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Exact_Cardinality
-data ObjectExactCardinality =
-  ObjectExactCardinality {
-    objectExactCardinalityBound :: Integer,
-    objectExactCardinalityProperty :: ObjectPropertyExpression,
-    objectExactCardinalityClass :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectExactCardinality = Core.Name "hydra.owl.syntax.ObjectExactCardinality"
-
-_ObjectExactCardinality_bound = Core.Name "bound"
-
-_ObjectExactCardinality_property = Core.Name "property"
-
-_ObjectExactCardinality_class = Core.Name "class"
-
-data DataSomeValuesFrom =
-  DataSomeValuesFrom {
-    dataSomeValuesFromProperty :: [DataPropertyExpression],
-    dataSomeValuesFromRange :: DataRange}
-  deriving (Eq, Ord, Read, Show)
-
-_DataSomeValuesFrom = Core.Name "hydra.owl.syntax.DataSomeValuesFrom"
-
-_DataSomeValuesFrom_property = Core.Name "property"
-
-_DataSomeValuesFrom_range = Core.Name "range"
-
-data DataAllValuesFrom =
-  DataAllValuesFrom {
-    dataAllValuesFromProperty :: [DataPropertyExpression],
-    dataAllValuesFromRange :: DataRange}
-  deriving (Eq, Ord, Read, Show)
-
-_DataAllValuesFrom = Core.Name "hydra.owl.syntax.DataAllValuesFrom"
-
-_DataAllValuesFrom_property = Core.Name "property"
-
-_DataAllValuesFrom_range = Core.Name "range"
-
-data DataHasValue =
-  DataHasValue {
-    dataHasValueProperty :: DataPropertyExpression,
-    dataHasValueValue :: Syntax.Literal}
-  deriving (Eq, Ord, Read, Show)
-
-_DataHasValue = Core.Name "hydra.owl.syntax.DataHasValue"
-
-_DataHasValue_property = Core.Name "property"
-
-_DataHasValue_value = Core.Name "value"
-
-data DataMinCardinality =
-  DataMinCardinality {
-    dataMinCardinalityBound :: Integer,
-    dataMinCardinalityProperty :: DataPropertyExpression,
-    dataMinCardinalityRange :: [DataRange]}
-  deriving (Eq, Ord, Read, Show)
-
-_DataMinCardinality = Core.Name "hydra.owl.syntax.DataMinCardinality"
-
-_DataMinCardinality_bound = Core.Name "bound"
-
-_DataMinCardinality_property = Core.Name "property"
-
-_DataMinCardinality_range = Core.Name "range"
-
-data DataMaxCardinality =
-  DataMaxCardinality {
-    dataMaxCardinalityBound :: Integer,
-    dataMaxCardinalityProperty :: DataPropertyExpression,
-    dataMaxCardinalityRange :: [DataRange]}
-  deriving (Eq, Ord, Read, Show)
-
-_DataMaxCardinality = Core.Name "hydra.owl.syntax.DataMaxCardinality"
-
-_DataMaxCardinality_bound = Core.Name "bound"
-
-_DataMaxCardinality_property = Core.Name "property"
-
-_DataMaxCardinality_range = Core.Name "range"
-
-data DataExactCardinality =
-  DataExactCardinality {
-    dataExactCardinalityBound :: Integer,
-    dataExactCardinalityProperty :: DataPropertyExpression,
-    dataExactCardinalityRange :: [DataRange]}
-  deriving (Eq, Ord, Read, Show)
-
-_DataExactCardinality = Core.Name "hydra.owl.syntax.DataExactCardinality"
-
-_DataExactCardinality_bound = Core.Name "bound"
-
-_DataExactCardinality_property = Core.Name "property"
-
-_DataExactCardinality_range = Core.Name "range"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Axioms
-data Axiom =
-  AxiomAnnotationAxiom AnnotationAxiom |
-  AxiomAssertion Assertion |
-  AxiomClassAxiom ClassAxiom |
-  AxiomDataPropertyAxiom DataPropertyAxiom |
-  AxiomDatatypeDefinition DatatypeDefinition |
-  AxiomDeclaration Declaration |
-  AxiomHasKey HasKey |
-  AxiomObjectPropertyAxiom ObjectPropertyAxiom
-  deriving (Eq, Ord, Read, Show)
-
-_Axiom = Core.Name "hydra.owl.syntax.Axiom"
-
-_Axiom_annotationAxiom = Core.Name "annotationAxiom"
-
-_Axiom_assertion = Core.Name "assertion"
-
-_Axiom_classAxiom = Core.Name "classAxiom"
-
-_Axiom_dataPropertyAxiom = Core.Name "dataPropertyAxiom"
-
-_Axiom_datatypeDefinition = Core.Name "datatypeDefinition"
-
-_Axiom_declaration = Core.Name "declaration"
-
-_Axiom_hasKey = Core.Name "hasKey"
-
-_Axiom_objectPropertyAxiom = Core.Name "objectPropertyAxiom"
-
-data ClassAxiom =
-  ClassAxiomDisjointClasses DisjointClasses |
-  ClassAxiomDisjointUnion DisjointUnion |
-  ClassAxiomEquivalentClasses EquivalentClasses |
-  ClassAxiomSubClassOf SubClassOf
-  deriving (Eq, Ord, Read, Show)
-
-_ClassAxiom = Core.Name "hydra.owl.syntax.ClassAxiom"
-
-_ClassAxiom_disjointClasses = Core.Name "disjointClasses"
-
-_ClassAxiom_disjointUnion = Core.Name "disjointUnion"
-
-_ClassAxiom_equivalentClasses = Core.Name "equivalentClasses"
-
-_ClassAxiom_subClassOf = Core.Name "subClassOf"
-
-data SubClassOf =
-  SubClassOf {
-    subClassOfAnnotations :: [Annotation],
-    subClassOfSubClass :: ClassExpression,
-    subClassOfSuperClass :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_SubClassOf = Core.Name "hydra.owl.syntax.SubClassOf"
-
-_SubClassOf_annotations = Core.Name "annotations"
-
-_SubClassOf_subClass = Core.Name "subClass"
-
-_SubClassOf_superClass = Core.Name "superClass"
-
-data EquivalentClasses =
-  EquivalentClasses {
-    equivalentClassesAnnotations :: [Annotation],
-    equivalentClassesClasses :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_EquivalentClasses = Core.Name "hydra.owl.syntax.EquivalentClasses"
-
-_EquivalentClasses_annotations = Core.Name "annotations"
-
-_EquivalentClasses_classes = Core.Name "classes"
-
-data DisjointClasses =
-  DisjointClasses {
-    disjointClassesAnnotations :: [Annotation],
-    disjointClassesClasses :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_DisjointClasses = Core.Name "hydra.owl.syntax.DisjointClasses"
-
-_DisjointClasses_annotations = Core.Name "annotations"
-
-_DisjointClasses_classes = Core.Name "classes"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Disjoint_Union_of_Class_Expressions
-data DisjointUnion =
-  DisjointUnion {
-    disjointUnionAnnotations :: [Annotation],
-    disjointUnionClass :: Class,
-    disjointUnionClasses :: [ClassExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_DisjointUnion = Core.Name "hydra.owl.syntax.DisjointUnion"
-
-_DisjointUnion_annotations = Core.Name "annotations"
-
-_DisjointUnion_class = Core.Name "class"
-
-_DisjointUnion_classes = Core.Name "classes"
-
-data ObjectPropertyAxiom =
-  ObjectPropertyAxiomAsymmetricObjectProperty AsymmetricObjectProperty |
-  ObjectPropertyAxiomDisjointObjectProperties DisjointObjectProperties |
-  ObjectPropertyAxiomEquivalentObjectProperties EquivalentObjectProperties |
-  ObjectPropertyAxiomFunctionalObjectProperty FunctionalObjectProperty |
-  ObjectPropertyAxiomInverseFunctionalObjectProperty InverseFunctionalObjectProperty |
-  ObjectPropertyAxiomInverseObjectProperties InverseObjectProperties |
-  ObjectPropertyAxiomIrreflexiveObjectProperty IrreflexiveObjectProperty |
-  ObjectPropertyAxiomObjectPropertyDomain ObjectPropertyDomain |
-  ObjectPropertyAxiomObjectPropertyRange ObjectPropertyRange |
-  ObjectPropertyAxiomReflexiveObjectProperty ReflexiveObjectProperty |
-  ObjectPropertyAxiomSubObjectPropertyOf SubObjectPropertyOf |
-  ObjectPropertyAxiomSymmetricObjectProperty SymmetricObjectProperty |
-  ObjectPropertyAxiomTransitiveObjectProperty TransitiveObjectProperty
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPropertyAxiom = Core.Name "hydra.owl.syntax.ObjectPropertyAxiom"
-
-_ObjectPropertyAxiom_asymmetricObjectProperty = Core.Name "asymmetricObjectProperty"
-
-_ObjectPropertyAxiom_disjointObjectProperties = Core.Name "disjointObjectProperties"
-
-_ObjectPropertyAxiom_equivalentObjectProperties = Core.Name "equivalentObjectProperties"
-
-_ObjectPropertyAxiom_functionalObjectProperty = Core.Name "functionalObjectProperty"
-
-_ObjectPropertyAxiom_inverseFunctionalObjectProperty = Core.Name "inverseFunctionalObjectProperty"
-
-_ObjectPropertyAxiom_inverseObjectProperties = Core.Name "inverseObjectProperties"
-
-_ObjectPropertyAxiom_irreflexiveObjectProperty = Core.Name "irreflexiveObjectProperty"
-
-_ObjectPropertyAxiom_objectPropertyDomain = Core.Name "objectPropertyDomain"
-
-_ObjectPropertyAxiom_objectPropertyRange = Core.Name "objectPropertyRange"
-
-_ObjectPropertyAxiom_reflexiveObjectProperty = Core.Name "reflexiveObjectProperty"
-
-_ObjectPropertyAxiom_subObjectPropertyOf = Core.Name "subObjectPropertyOf"
-
-_ObjectPropertyAxiom_symmetricObjectProperty = Core.Name "symmetricObjectProperty"
-
-_ObjectPropertyAxiom_transitiveObjectProperty = Core.Name "transitiveObjectProperty"
-
-data SubObjectPropertyOf =
-  SubObjectPropertyOf {
-    subObjectPropertyOfAnnotations :: [Annotation],
-    subObjectPropertyOfSubProperty :: [ObjectPropertyExpression],
-    subObjectPropertyOfSuperProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_SubObjectPropertyOf = Core.Name "hydra.owl.syntax.SubObjectPropertyOf"
-
-_SubObjectPropertyOf_annotations = Core.Name "annotations"
-
-_SubObjectPropertyOf_subProperty = Core.Name "subProperty"
-
-_SubObjectPropertyOf_superProperty = Core.Name "superProperty"
-
-data EquivalentObjectProperties =
-  EquivalentObjectProperties {
-    equivalentObjectPropertiesAnnotations :: [Annotation],
-    equivalentObjectPropertiesProperties :: [ObjectPropertyExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_EquivalentObjectProperties = Core.Name "hydra.owl.syntax.EquivalentObjectProperties"
-
-_EquivalentObjectProperties_annotations = Core.Name "annotations"
-
-_EquivalentObjectProperties_properties = Core.Name "properties"
-
-data DisjointObjectProperties =
-  DisjointObjectProperties {
-    disjointObjectPropertiesAnnotations :: [Annotation],
-    disjointObjectPropertiesProperties :: [ObjectPropertyExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_DisjointObjectProperties = Core.Name "hydra.owl.syntax.DisjointObjectProperties"
-
-_DisjointObjectProperties_annotations = Core.Name "annotations"
-
-_DisjointObjectProperties_properties = Core.Name "properties"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Object_Property_Domain
-data ObjectPropertyDomain =
-  ObjectPropertyDomain {
-    objectPropertyDomainAnnotations :: [Annotation],
-    objectPropertyDomainProperty :: ObjectPropertyExpression,
-    objectPropertyDomainDomain :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPropertyDomain = Core.Name "hydra.owl.syntax.ObjectPropertyDomain"
-
-_ObjectPropertyDomain_annotations = Core.Name "annotations"
-
-_ObjectPropertyDomain_property = Core.Name "property"
-
-_ObjectPropertyDomain_domain = Core.Name "domain"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Object_Property_Range
-data ObjectPropertyRange =
-  ObjectPropertyRange {
-    objectPropertyRangeAnnotations :: [Annotation],
-    objectPropertyRangeProperty :: ObjectPropertyExpression,
-    objectPropertyRangeRange :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPropertyRange = Core.Name "hydra.owl.syntax.ObjectPropertyRange"
-
-_ObjectPropertyRange_annotations = Core.Name "annotations"
-
-_ObjectPropertyRange_property = Core.Name "property"
-
-_ObjectPropertyRange_range = Core.Name "range"
-
-data InverseObjectProperties =
-  InverseObjectProperties {
-    inverseObjectPropertiesAnnotations :: [Annotation],
-    inverseObjectPropertiesProperty1 :: ObjectPropertyExpression,
-    inverseObjectPropertiesProperty2 :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_InverseObjectProperties = Core.Name "hydra.owl.syntax.InverseObjectProperties"
-
-_InverseObjectProperties_annotations = Core.Name "annotations"
-
-_InverseObjectProperties_property1 = Core.Name "property1"
-
-_InverseObjectProperties_property2 = Core.Name "property2"
-
-data FunctionalObjectProperty =
-  FunctionalObjectProperty {
-    functionalObjectPropertyAnnotations :: [Annotation],
-    functionalObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionalObjectProperty = Core.Name "hydra.owl.syntax.FunctionalObjectProperty"
-
-_FunctionalObjectProperty_annotations = Core.Name "annotations"
-
-_FunctionalObjectProperty_property = Core.Name "property"
-
-data InverseFunctionalObjectProperty =
-  InverseFunctionalObjectProperty {
-    inverseFunctionalObjectPropertyAnnotations :: [Annotation],
-    inverseFunctionalObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_InverseFunctionalObjectProperty = Core.Name "hydra.owl.syntax.InverseFunctionalObjectProperty"
-
-_InverseFunctionalObjectProperty_annotations = Core.Name "annotations"
-
-_InverseFunctionalObjectProperty_property = Core.Name "property"
-
-data ReflexiveObjectProperty =
-  ReflexiveObjectProperty {
-    reflexiveObjectPropertyAnnotations :: [Annotation],
-    reflexiveObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ReflexiveObjectProperty = Core.Name "hydra.owl.syntax.ReflexiveObjectProperty"
-
-_ReflexiveObjectProperty_annotations = Core.Name "annotations"
-
-_ReflexiveObjectProperty_property = Core.Name "property"
-
-data IrreflexiveObjectProperty =
-  IrreflexiveObjectProperty {
-    irreflexiveObjectPropertyAnnotations :: [Annotation],
-    irreflexiveObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_IrreflexiveObjectProperty = Core.Name "hydra.owl.syntax.IrreflexiveObjectProperty"
-
-_IrreflexiveObjectProperty_annotations = Core.Name "annotations"
-
-_IrreflexiveObjectProperty_property = Core.Name "property"
-
-data SymmetricObjectProperty =
-  SymmetricObjectProperty {
-    symmetricObjectPropertyAnnotations :: [Annotation],
-    symmetricObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_SymmetricObjectProperty = Core.Name "hydra.owl.syntax.SymmetricObjectProperty"
-
-_SymmetricObjectProperty_annotations = Core.Name "annotations"
-
-_SymmetricObjectProperty_property = Core.Name "property"
-
-data AsymmetricObjectProperty =
-  AsymmetricObjectProperty {
-    asymmetricObjectPropertyAnnotations :: [Annotation],
-    asymmetricObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_AsymmetricObjectProperty = Core.Name "hydra.owl.syntax.AsymmetricObjectProperty"
-
-_AsymmetricObjectProperty_annotations = Core.Name "annotations"
-
-_AsymmetricObjectProperty_property = Core.Name "property"
-
-data TransitiveObjectProperty =
-  TransitiveObjectProperty {
-    transitiveObjectPropertyAnnotations :: [Annotation],
-    transitiveObjectPropertyProperty :: ObjectPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_TransitiveObjectProperty = Core.Name "hydra.owl.syntax.TransitiveObjectProperty"
-
-_TransitiveObjectProperty_annotations = Core.Name "annotations"
-
-_TransitiveObjectProperty_property = Core.Name "property"
-
-data DataPropertyAxiom =
-  DataPropertyAxiomDataPropertyAxiom DataPropertyAxiom |
-  DataPropertyAxiomDataPropertyRange DataPropertyRange |
-  DataPropertyAxiomDisjointDataProperties DisjointDataProperties |
-  DataPropertyAxiomEquivalentDataProperties EquivalentDataProperties |
-  DataPropertyAxiomFunctionalDataProperty FunctionalDataProperty |
-  DataPropertyAxiomSubDataPropertyOf SubDataPropertyOf
-  deriving (Eq, Ord, Read, Show)
-
-_DataPropertyAxiom = Core.Name "hydra.owl.syntax.DataPropertyAxiom"
-
-_DataPropertyAxiom_dataPropertyAxiom = Core.Name "dataPropertyAxiom"
-
-_DataPropertyAxiom_dataPropertyRange = Core.Name "dataPropertyRange"
-
-_DataPropertyAxiom_disjointDataProperties = Core.Name "disjointDataProperties"
-
-_DataPropertyAxiom_equivalentDataProperties = Core.Name "equivalentDataProperties"
-
-_DataPropertyAxiom_functionalDataProperty = Core.Name "functionalDataProperty"
-
-_DataPropertyAxiom_subDataPropertyOf = Core.Name "subDataPropertyOf"
-
-data SubDataPropertyOf =
-  SubDataPropertyOf {
-    subDataPropertyOfAnnotations :: [Annotation],
-    subDataPropertyOfSubProperty :: DataPropertyExpression,
-    subDataPropertyOfSuperProperty :: DataPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_SubDataPropertyOf = Core.Name "hydra.owl.syntax.SubDataPropertyOf"
-
-_SubDataPropertyOf_annotations = Core.Name "annotations"
-
-_SubDataPropertyOf_subProperty = Core.Name "subProperty"
-
-_SubDataPropertyOf_superProperty = Core.Name "superProperty"
-
-data EquivalentDataProperties =
-  EquivalentDataProperties {
-    equivalentDataPropertiesAnnotations :: [Annotation],
-    equivalentDataPropertiesProperties :: [DataPropertyExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_EquivalentDataProperties = Core.Name "hydra.owl.syntax.EquivalentDataProperties"
-
-_EquivalentDataProperties_annotations = Core.Name "annotations"
-
-_EquivalentDataProperties_properties = Core.Name "properties"
-
-data DisjointDataProperties =
-  DisjointDataProperties {
-    disjointDataPropertiesAnnotations :: [Annotation],
-    disjointDataPropertiesProperties :: [DataPropertyExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_DisjointDataProperties = Core.Name "hydra.owl.syntax.DisjointDataProperties"
-
-_DisjointDataProperties_annotations = Core.Name "annotations"
-
-_DisjointDataProperties_properties = Core.Name "properties"
-
-data DataPropertyDomain =
-  DataPropertyDomain {
-    dataPropertyDomainAnnotations :: [Annotation],
-    dataPropertyDomainProperty :: DataPropertyExpression,
-    dataPropertyDomainDomain :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_DataPropertyDomain = Core.Name "hydra.owl.syntax.DataPropertyDomain"
-
-_DataPropertyDomain_annotations = Core.Name "annotations"
-
-_DataPropertyDomain_property = Core.Name "property"
-
-_DataPropertyDomain_domain = Core.Name "domain"
-
-data DataPropertyRange =
-  DataPropertyRange {
-    dataPropertyRangeAnnotations :: [Annotation],
-    dataPropertyRangeProperty :: DataPropertyExpression,
-    dataPropertyRangeRange :: ClassExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_DataPropertyRange = Core.Name "hydra.owl.syntax.DataPropertyRange"
-
-_DataPropertyRange_annotations = Core.Name "annotations"
-
-_DataPropertyRange_property = Core.Name "property"
-
-_DataPropertyRange_range = Core.Name "range"
-
-data FunctionalDataProperty =
-  FunctionalDataProperty {
-    functionalDataPropertyAnnotations :: [Annotation],
-    functionalDataPropertyProperty :: DataPropertyExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionalDataProperty = Core.Name "hydra.owl.syntax.FunctionalDataProperty"
-
-_FunctionalDataProperty_annotations = Core.Name "annotations"
-
-_FunctionalDataProperty_property = Core.Name "property"
-
-data DatatypeDefinition =
-  DatatypeDefinition {
-    datatypeDefinitionAnnotations :: [Annotation],
-    datatypeDefinitionDatatype :: Datatype,
-    datatypeDefinitionRange :: DataRange}
-  deriving (Eq, Ord, Read, Show)
-
-_DatatypeDefinition = Core.Name "hydra.owl.syntax.DatatypeDefinition"
-
-_DatatypeDefinition_annotations = Core.Name "annotations"
-
-_DatatypeDefinition_datatype = Core.Name "datatype"
-
-_DatatypeDefinition_range = Core.Name "range"
-
--- | See https://www.w3.org/TR/owl2-syntax/#Keys
-data HasKey =
-  HasKey {
-    hasKeyAnnotations :: [Annotation],
-    hasKeyClass :: ClassExpression,
-    hasKeyObjectProperties :: [ObjectPropertyExpression],
-    hasKeyDataProperties :: [DataPropertyExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_HasKey = Core.Name "hydra.owl.syntax.HasKey"
-
-_HasKey_annotations = Core.Name "annotations"
-
-_HasKey_class = Core.Name "class"
-
-_HasKey_objectProperties = Core.Name "objectProperties"
-
-_HasKey_dataProperties = Core.Name "dataProperties"
-
-data Assertion =
-  AssertionClassAssertion ClassAssertion |
-  AssertionDataPropertyAssertion DataPropertyAssertion |
-  AssertionDifferentIndividuals DifferentIndividuals |
-  AssertionObjectPropertyAssertion ObjectPropertyAssertion |
-  AssertionNegativeDataPropertyAssertion NegativeDataPropertyAssertion |
-  AssertionNegativeObjectPropertyAssertion NegativeObjectPropertyAssertion |
-  AssertionSameIndividual SameIndividual
-  deriving (Eq, Ord, Read, Show)
-
-_Assertion = Core.Name "hydra.owl.syntax.Assertion"
-
-_Assertion_classAssertion = Core.Name "classAssertion"
-
-_Assertion_dataPropertyAssertion = Core.Name "dataPropertyAssertion"
-
-_Assertion_differentIndividuals = Core.Name "differentIndividuals"
-
-_Assertion_objectPropertyAssertion = Core.Name "objectPropertyAssertion"
-
-_Assertion_negativeDataPropertyAssertion = Core.Name "negativeDataPropertyAssertion"
-
-_Assertion_negativeObjectPropertyAssertion = Core.Name "negativeObjectPropertyAssertion"
-
-_Assertion_sameIndividual = Core.Name "sameIndividual"
-
-data SameIndividual =
-  SameIndividual {
-    sameIndividualAnnotations :: [Annotation],
-    sameIndividualIndividuals :: [Individual]}
-  deriving (Eq, Ord, Read, Show)
-
-_SameIndividual = Core.Name "hydra.owl.syntax.SameIndividual"
-
-_SameIndividual_annotations = Core.Name "annotations"
-
-_SameIndividual_individuals = Core.Name "individuals"
-
-data DifferentIndividuals =
-  DifferentIndividuals {
-    differentIndividualsAnnotations :: [Annotation],
-    differentIndividualsIndividuals :: [Individual]}
-  deriving (Eq, Ord, Read, Show)
-
-_DifferentIndividuals = Core.Name "hydra.owl.syntax.DifferentIndividuals"
-
-_DifferentIndividuals_annotations = Core.Name "annotations"
-
-_DifferentIndividuals_individuals = Core.Name "individuals"
-
-data ClassAssertion =
-  ClassAssertion {
-    classAssertionAnnotations :: [Annotation],
-    classAssertionClass :: ClassExpression,
-    classAssertionIndividual :: Individual}
-  deriving (Eq, Ord, Read, Show)
-
-_ClassAssertion = Core.Name "hydra.owl.syntax.ClassAssertion"
-
-_ClassAssertion_annotations = Core.Name "annotations"
-
-_ClassAssertion_class = Core.Name "class"
-
-_ClassAssertion_individual = Core.Name "individual"
-
-data ObjectPropertyAssertion =
-  ObjectPropertyAssertion {
-    objectPropertyAssertionAnnotations :: [Annotation],
-    objectPropertyAssertionProperty :: ObjectPropertyExpression,
-    objectPropertyAssertionSource :: Individual,
-    objectPropertyAssertionTarget :: Individual}
-  deriving (Eq, Ord, Read, Show)
-
-_ObjectPropertyAssertion = Core.Name "hydra.owl.syntax.ObjectPropertyAssertion"
-
-_ObjectPropertyAssertion_annotations = Core.Name "annotations"
-
-_ObjectPropertyAssertion_property = Core.Name "property"
-
-_ObjectPropertyAssertion_source = Core.Name "source"
-
-_ObjectPropertyAssertion_target = Core.Name "target"
-
-data NegativeObjectPropertyAssertion =
-  NegativeObjectPropertyAssertion {
-    negativeObjectPropertyAssertionAnnotations :: [Annotation],
-    negativeObjectPropertyAssertionProperty :: ObjectPropertyExpression,
-    negativeObjectPropertyAssertionSource :: Individual,
-    negativeObjectPropertyAssertionTarget :: Individual}
-  deriving (Eq, Ord, Read, Show)
-
-_NegativeObjectPropertyAssertion = Core.Name "hydra.owl.syntax.NegativeObjectPropertyAssertion"
-
-_NegativeObjectPropertyAssertion_annotations = Core.Name "annotations"
-
-_NegativeObjectPropertyAssertion_property = Core.Name "property"
-
-_NegativeObjectPropertyAssertion_source = Core.Name "source"
-
-_NegativeObjectPropertyAssertion_target = Core.Name "target"
-
-data DataPropertyAssertion =
-  DataPropertyAssertion {
-    dataPropertyAssertionAnnotations :: [Annotation],
-    dataPropertyAssertionProperty :: DataPropertyExpression,
-    dataPropertyAssertionSource :: Individual,
-    dataPropertyAssertionTarget :: Individual}
-  deriving (Eq, Ord, Read, Show)
-
-_DataPropertyAssertion = Core.Name "hydra.owl.syntax.DataPropertyAssertion"
-
-_DataPropertyAssertion_annotations = Core.Name "annotations"
-
-_DataPropertyAssertion_property = Core.Name "property"
-
-_DataPropertyAssertion_source = Core.Name "source"
-
-_DataPropertyAssertion_target = Core.Name "target"
-
-data NegativeDataPropertyAssertion =
-  NegativeDataPropertyAssertion {
-    negativeDataPropertyAssertionAnnotations :: [Annotation],
-    negativeDataPropertyAssertionProperty :: DataPropertyExpression,
-    negativeDataPropertyAssertionSource :: Individual,
-    negativeDataPropertyAssertionTarget :: Individual}
-  deriving (Eq, Ord, Read, Show)
-
-_NegativeDataPropertyAssertion = Core.Name "hydra.owl.syntax.NegativeDataPropertyAssertion"
-
-_NegativeDataPropertyAssertion_annotations = Core.Name "annotations"
-
-_NegativeDataPropertyAssertion_property = Core.Name "property"
-
-_NegativeDataPropertyAssertion_source = Core.Name "source"
-
-_NegativeDataPropertyAssertion_target = Core.Name "target"
diff --git a/src/main/haskell/Hydra/PackageRouting.hs b/src/main/haskell/Hydra/PackageRouting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/PackageRouting.hs
+++ /dev/null
@@ -1,213 +0,0 @@
--- | Module-to-package routing for the Hydra packaging split.
---
--- A single source of truth for "which package owns which namespace" and
--- "which directory under dist/json/ does that package write to". Used by
--- both the JSON writers (update-json-*) and the JSON reader
--- (bootstrap-from-json), so the two sides can never disagree about where
--- a module's JSON file should live.
---
--- Today the mapping is a hardcoded prefix table. Eventually it should be
--- derived from each package's package.json (or Manifest.hs); see
--- feature_290_packaging-plan.md for the longer arc.
---
--- Routing contract:
---
---   namespaceToPackage :: Namespace -> String
---
---     Returns the package name (e.g. "hydra-kernel", "hydra-ext") that owns
---     a given Hydra namespace. Falls back to "hydra-kernel" for any
---     namespace that does not match an explicit prefix.
---
---   namespaceToPackageJsonDir :: FilePath -> Namespace -> FilePath
---
---     Given the dist-json root (e.g. "../../dist/json") and a namespace,
---     returns the absolute directory under which that module's JSON file
---     should be written: "<root>/<package>/src/main/json".
---
---   groupByPackage :: [Module] -> [(String, [Module])]
---
---     Partitions a list of modules by owning package, sorted by package
---     name for deterministic output ordering.
-
-module Hydra.PackageRouting (
-  namespaceToPackage,
-  namespaceToPackageJsonDir,
-  namespaceToPackageTestJsonDir,
-  groupByPackage,
-  packagePrefixes,
-  defaultDistJsonRoot,
-) where
-
-import Hydra.Kernel
-
-import Data.Function (on)
-import Data.List (groupBy, isPrefixOf, sortOn)
-import qualified System.FilePath as FP
-
-
--- | Default root under which per-package JSON trees live, relative to the
--- haskell head working directory (heads/haskell/). Callers can override
--- this when writing elsewhere (e.g. bootstrap-from-json's --ext-json-dir).
-defaultDistJsonRoot :: FilePath
-defaultDistJsonRoot = "../../dist/json"
-
--- | Map a module namespace to the package that owns it.
---
--- The ordering of 'packagePrefixes' matters: more specific prefixes must
--- come before less specific ones. The fallback "hydra-kernel" covers all
--- namespaces that don't match any explicit prefix.
-namespaceToPackage :: Namespace -> String
-namespaceToPackage (Namespace ns) = go packagePrefixes
-  where
-    go []                    = "hydra-kernel"
-    go ((prefix, pkg) : rest)
-      | prefix `isPrefixOf` ns = pkg
-      | otherwise              = go rest
-
--- | Given a dist-json root and a namespace, compute the directory under
--- which that module's JSON file should be written.
-namespaceToPackageJsonDir :: FilePath -> Namespace -> FilePath
-namespaceToPackageJsonDir root ns =
-  root FP.</> namespaceToPackage ns FP.</> "src" FP.</> "main" FP.</> "json"
-
--- | Like 'namespaceToPackageJsonDir' but for test JSON output.
-namespaceToPackageTestJsonDir :: FilePath -> Namespace -> FilePath
-namespaceToPackageTestJsonDir root ns =
-  root FP.</> namespaceToPackage ns FP.</> "src" FP.</> "test" FP.</> "json"
-
--- | Partition a list of modules by owning package, returning a list of
---   (packageName, modules) groups. The groups are sorted by package name
---   for deterministic output ordering.
-groupByPackage :: [Module] -> [(String, [Module])]
-groupByPackage mods =
-    fmap collapse
-      $ groupBy ((==) `on` fst)
-      $ sortOn fst
-      $ fmap (\m -> (namespaceToPackage (moduleNamespace m), m)) mods
-  where
-    collapse [] = ("", [])  -- unreachable; groupBy never returns empty inner lists
-    collapse grp@((pkg, _) : _) = (pkg, fmap snd grp)
-
--- | Prefix-to-package table. Order matters: more-specific prefixes first.
--- Any namespace not matching any prefix falls through to "hydra-kernel".
-packagePrefixes :: [(String, String)]
-packagePrefixes =
-  [ -- Coder packages (main runtime modules)
-    ("hydra.haskell.",              "hydra-haskell")
-  , ("hydra.java.",                 "hydra-java")
-  , ("hydra.python.",               "hydra-python")
-  , ("hydra.scala.",                "hydra-scala")
-  , ("hydra.lisp.",                 "hydra-lisp")
-  , ("hydra.coq.",                  "hydra-coq")
-  , ("hydra.javaScript.",           "hydra-javascript")
-    -- DSL wrapper modules for coder packages
-  , ("hydra.dsl.haskell.",          "hydra-haskell")
-  , ("hydra.dsl.java.",             "hydra-java")
-  , ("hydra.dsl.python.",           "hydra-python")
-  , ("hydra.dsl.scala.",            "hydra-scala")
-  , ("hydra.dsl.lisp.",             "hydra-lisp")
-  , ("hydra.dsl.coq.",              "hydra-coq")
-  , ("hydra.dsl.javaScript.",       "hydra-javascript")
-    -- Synthesized decoder source modules for coder packages
-  , ("hydra.sources.decode.haskell.",    "hydra-haskell")
-  , ("hydra.sources.decode.java.",       "hydra-java")
-  , ("hydra.sources.decode.python.",     "hydra-python")
-  , ("hydra.sources.decode.scala.",      "hydra-scala")
-  , ("hydra.sources.decode.lisp.",       "hydra-lisp")
-  , ("hydra.sources.decode.coq.",        "hydra-coq")
-  , ("hydra.sources.decode.javaScript.", "hydra-javascript")
-    -- Synthesized encoder source modules for coder packages
-  , ("hydra.sources.encode.haskell.",    "hydra-haskell")
-  , ("hydra.sources.encode.java.",       "hydra-java")
-  , ("hydra.sources.encode.python.",     "hydra-python")
-  , ("hydra.sources.encode.scala.",      "hydra-scala")
-  , ("hydra.sources.encode.lisp.",       "hydra-lisp")
-  , ("hydra.sources.encode.coq.",        "hydra-coq")
-  , ("hydra.sources.encode.javaScript.", "hydra-javascript")
-    -- Property graph package
-  , ("hydra.pg.",                   "hydra-pg")
-  , ("hydra.cypher.",               "hydra-pg")
-  , ("hydra.graphviz.",             "hydra-pg")
-  , ("hydra.tinkerpop.",            "hydra-pg")
-  , ("hydra.error.pg",              "hydra-pg")
-  , ("hydra.validate.pg",           "hydra-pg")
-  , ("hydra.decode.pg.",            "hydra-pg")
-  , ("hydra.encode.pg.",            "hydra-pg")
-  , ("hydra.sources.decode.pg.",    "hydra-pg")
-  , ("hydra.sources.encode.pg.",    "hydra-pg")
-  , ("hydra.demos.genpg.",          "hydra-pg")
-  , ("openGql.grammar",             "hydra-pg")
-  , ("com.gdblab.pathAlgebra.",     "hydra-pg")
-  , ("hydra.dsl.pg.",               "hydra-pg")
-  , ("hydra.dsl.cypher.",           "hydra-pg")
-  , ("hydra.dsl.graphviz.",         "hydra-pg")
-  , ("hydra.dsl.tinkerpop.",        "hydra-pg")
-  , ("hydra.dsl.error.pg",          "hydra-pg")
-  , ("hydra.dsl.openGql.",          "hydra-pg")
-  , ("hydra.dsl.com.gdblab.pathAlgebra.", "hydra-pg")
-    -- RDF / OWL / SHACL / ShEx / XML schema package
-  , ("hydra.rdf.",                  "hydra-rdf")
-  , ("hydra.owl.",                  "hydra-rdf")
-  , ("hydra.shacl.",                "hydra-rdf")
-  , ("hydra.shex.",                 "hydra-rdf")
-  , ("hydra.xml.schema",            "hydra-rdf")
-  , ("hydra.dsl.rdf.",              "hydra-rdf")
-  , ("hydra.dsl.owl.",              "hydra-rdf")
-  , ("hydra.dsl.shacl.",            "hydra-rdf")
-  , ("hydra.dsl.shex.",             "hydra-rdf")
-  , ("hydra.dsl.xml.schema",        "hydra-rdf")
-    -- WebAssembly package
-  , ("hydra.wasm.",                 "hydra-wasm")
-  , ("hydra.dsl.wasm.",             "hydra-wasm")
-    -- Extension package (truly-ext coders: Avro, Protobuf, GraphQL, etc.)
-  , ("hydra.atlas",                 "hydra-ext")
-  , ("hydra.avro.",                 "hydra-ext")
-  , ("hydra.azure.",                "hydra-ext")
-  , ("hydra.cpp.",                  "hydra-ext")
-  , ("hydra.csharp.",               "hydra-ext")
-  , ("hydra.datalog.",              "hydra-ext")
-  , ("hydra.delta.",                "hydra-ext")
-  , ("hydra.geojson.",              "hydra-ext")
-  , ("hydra.go.",                   "hydra-ext")
-  , ("hydra.graphql.",              "hydra-ext")
-  , ("hydra.iana.",                 "hydra-ext")
-  , ("hydra.json.schema",           "hydra-ext")
-  , ("hydra.kusto.",                "hydra-ext")
-  , ("hydra.osv.",                  "hydra-ext")
-  , ("hydra.parquet.",              "hydra-ext")
-  , ("hydra.pegasus.",              "hydra-ext")
-  , ("hydra.protobuf.",             "hydra-ext")
-  , ("hydra.rust.",                 "hydra-ext")
-  , ("hydra.sql.",                  "hydra-ext")
-  , ("hydra.stac.",                 "hydra-ext")
-  , ("hydra.typeScript.",           "hydra-ext")
-  , ("hydra.workflow",              "hydra-ext")
-  , ("hydra.dsl.atlas",             "hydra-ext")
-  , ("hydra.dsl.avro.",             "hydra-ext")
-  , ("hydra.dsl.azure.",            "hydra-ext")
-  , ("hydra.dsl.cpp.",              "hydra-ext")
-  , ("hydra.dsl.csharp.",           "hydra-ext")
-  , ("hydra.dsl.datalog.",          "hydra-ext")
-  , ("hydra.dsl.delta.",            "hydra-ext")
-  , ("hydra.dsl.geojson.",          "hydra-ext")
-  , ("hydra.dsl.go.",               "hydra-ext")
-  , ("hydra.dsl.graphql.",          "hydra-ext")
-  , ("hydra.dsl.iana.",             "hydra-ext")
-  , ("hydra.dsl.json.schema",       "hydra-ext")
-  , ("hydra.dsl.kusto.",            "hydra-ext")
-  , ("hydra.dsl.osv.",              "hydra-ext")
-  , ("hydra.dsl.parquet.",          "hydra-ext")
-  , ("hydra.dsl.pegasus.",          "hydra-ext")
-  , ("hydra.dsl.protobuf.",         "hydra-ext")
-  , ("hydra.dsl.rust.",             "hydra-ext")
-  , ("hydra.dsl.sql.",              "hydra-ext")
-  , ("hydra.dsl.stac.",             "hydra-ext")
-  , ("hydra.dsl.typeScript.",       "hydra-ext")
-  , ("hydra.dsl.workflow",          "hydra-ext")
-    -- hydra.yaml.model lives in hydra-kernel, so we route the hydra-ext yaml
-    -- modules (coder, language, serde) explicitly rather than with a blanket
-    -- hydra.yaml. prefix.
-  , ("hydra.yaml.coder",            "hydra-ext")
-  , ("hydra.yaml.language",         "hydra-ext")
-  , ("hydra.yaml.serde",            "hydra-ext")
-  ]
diff --git a/src/main/haskell/Hydra/Packaging.hs b/src/main/haskell/Hydra/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Packaging.hs
+++ /dev/null
@@ -1,134 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A model for Hydra namespaces, modules, and packages
-
-module Hydra.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | A definition, which may be either a term or type definition
-data Definition =
-  -- | A term definition
-  DefinitionTerm TermDefinition |
-  -- | A type definition
-  DefinitionType TypeDefinition
-  deriving (Eq, Ord, Read, Show)
-_Definition = Core.Name "hydra.packaging.Definition"
-_Definition_term = Core.Name "term"
-_Definition_type = Core.Name "type"
--- | A file extension (without the dot), e.g. "json" or "py"
-newtype FileExtension =
-  FileExtension {
-    unFileExtension :: String}
-  deriving (Eq, Ord, Read, Show)
-_FileExtension = Core.Name "hydra.packaging.FileExtension"
--- | A library of primitive functions
-data Library =
-  Library {
-    -- | A common prefix for all primitive function names in the library
-    libraryNamespace :: Namespace,
-    -- | A preferred namespace prefix for function names in the library
-    libraryPrefix :: String,
-    -- | The primitives defined in this library
-    libraryPrimitives :: [Graph.Primitive]}
-_Library = Core.Name "hydra.packaging.Library"
-_Library_namespace = Core.Name "namespace"
-_Library_prefix = Core.Name "prefix"
-_Library_primitives = Core.Name "primitives"
--- | A logical collection of elements in the same namespace, having dependencies on zero or more other modules
-data Module =
-  Module {
-    -- | An optional human-readable description of the module
-    moduleDescription :: (Maybe String),
-    -- | A common prefix for all element names in the module
-    moduleNamespace :: Namespace,
-    -- | Any modules which the term expressions of this module directly depend upon
-    moduleTermDependencies :: [Namespace],
-    -- | Any modules which the type expressions of this module directly depend upon
-    moduleTypeDependencies :: [Namespace],
-    -- | The definitions in this module
-    moduleDefinitions :: [Definition]}
-  deriving (Eq, Ord, Read, Show)
-_Module = Core.Name "hydra.packaging.Module"
-_Module_description = Core.Name "description"
-_Module_namespace = Core.Name "namespace"
-_Module_termDependencies = Core.Name "termDependencies"
-_Module_typeDependencies = Core.Name "typeDependencies"
-_Module_definitions = Core.Name "definitions"
--- | A prefix for element names
-newtype Namespace =
-  Namespace {
-    unNamespace :: String}
-  deriving (Eq, Ord, Read, Show)
-_Namespace = Core.Name "hydra.packaging.Namespace"
--- | A mapping from namespaces to values of type n, with a focus on one namespace
-data Namespaces n =
-  Namespaces {
-    -- | The namespace in focus, together with its associated value
-    namespacesFocus :: (Namespace, n),
-    -- | A mapping of namespaces to values
-    namespacesMapping :: (M.Map Namespace n)}
-  deriving (Eq, Ord, Read, Show)
-_Namespaces = Core.Name "hydra.packaging.Namespaces"
-_Namespaces_focus = Core.Name "focus"
-_Namespaces_mapping = Core.Name "mapping"
--- | A package, which is a named collection of modules with metadata and dependencies
-data Package =
-  Package {
-    -- | The name of the package
-    packageName :: PackageName,
-    -- | The modules in this package
-    packageModules :: [Module],
-    -- | The packages which this package depends on
-    packageDependencies :: [PackageName],
-    -- | An optional human-readable description of the package
-    packageDescription :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-_Package = Core.Name "hydra.packaging.Package"
-_Package_name = Core.Name "name"
-_Package_modules = Core.Name "modules"
-_Package_dependencies = Core.Name "dependencies"
-_Package_description = Core.Name "description"
--- | The unique name of a package, e.g. "hydra-kernel" or "hydra-python"
-newtype PackageName =
-  PackageName {
-    unPackageName :: String}
-  deriving (Eq, Ord, Read, Show)
-_PackageName = Core.Name "hydra.packaging.PackageName"
--- | A qualified name consisting of an optional namespace together with a mandatory local name
-data QualifiedName =
-  QualifiedName {
-    -- | The optional namespace
-    qualifiedNameNamespace :: (Maybe Namespace),
-    -- | The local name
-    qualifiedNameLocal :: String}
-  deriving (Eq, Ord, Read, Show)
-_QualifiedName = Core.Name "hydra.packaging.QualifiedName"
-_QualifiedName_namespace = Core.Name "namespace"
-_QualifiedName_local = Core.Name "local"
--- | A term-level definition, including a name, a term, and the type scheme of the term
-data TermDefinition =
-  TermDefinition {
-    -- | The name of the term
-    termDefinitionName :: Core.Name,
-    -- | The term being defined
-    termDefinitionTerm :: Core.Term,
-    -- | The type scheme of the term, including any class constraints
-    termDefinitionTypeScheme :: (Maybe Core.TypeScheme)}
-  deriving (Eq, Ord, Read, Show)
-_TermDefinition = Core.Name "hydra.packaging.TermDefinition"
-_TermDefinition_name = Core.Name "name"
-_TermDefinition_term = Core.Name "term"
-_TermDefinition_typeScheme = Core.Name "typeScheme"
--- | A type-level definition, including a name and the type scheme
-data TypeDefinition =
-  TypeDefinition {
-    -- | The name of the type
-    typeDefinitionName :: Core.Name,
-    -- | The type scheme being defined
-    typeDefinitionTypeScheme :: Core.TypeScheme}
-  deriving (Eq, Ord, Read, Show)
-_TypeDefinition = Core.Name "hydra.packaging.TypeDefinition"
-_TypeDefinition_name = Core.Name "name"
-_TypeDefinition_typeScheme = Core.Name "typeScheme"
diff --git a/src/main/haskell/Hydra/Parquet/Format.hs b/src/main/haskell/Hydra/Parquet/Format.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Parquet/Format.hs
+++ /dev/null
@@ -1,979 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for the Parquet format. Based on the Thrift-based specification at:
--- |   https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift
-
-module Hydra.Parquet.Format 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
-
--- | Types supported by Parquet.  These types are intended to be used in combination with the encodings to control the on disk storage format. For example INT16 is not included as a type since a good encoding of INT32 would handle this.
-data Type =
-  TypeBoolean  |
-  TypeInt32  |
-  TypeInt64  |
-  TypeFloat  |
-  TypeDouble  |
-  TypeByteArray  |
-  TypeFixedLenByteArray
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.parquet.format.Type"
-
-_Type_boolean = Core.Name "boolean"
-
-_Type_int32 = Core.Name "int32"
-
-_Type_int64 = Core.Name "int64"
-
-_Type_float = Core.Name "float"
-
-_Type_double = Core.Name "double"
-
-_Type_byteArray = Core.Name "byteArray"
-
-_Type_fixedLenByteArray = Core.Name "fixedLenByteArray"
-
--- | Representation of Schemas
-data FieldRepetitionType =
-  -- | This field is required (can not be null) and each record has exactly 1 value.
-  FieldRepetitionTypeRequired  |
-  -- | The field is optional (can be null) and each record has 0 or 1 values.
-  FieldRepetitionTypeOptional  |
-  -- | The field is repeated and can contain 0 or more values
-  FieldRepetitionTypeRepeated
-  deriving (Eq, Ord, Read, Show)
-
-_FieldRepetitionType = Core.Name "hydra.parquet.format.FieldRepetitionType"
-
-_FieldRepetitionType_required = Core.Name "required"
-
-_FieldRepetitionType_optional = Core.Name "optional"
-
-_FieldRepetitionType_repeated = Core.Name "repeated"
-
--- | Statistics per row group and per page. All fields are optional.
-data Statistics =
-  Statistics {
-    statisticsNullCount :: (Maybe Integer),
-    statisticsDistinctCount :: (Maybe Integer),
-    -- | Max value for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix.
-    statisticsMaxValue :: (Maybe B.ByteString),
-    -- | Max value for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix.
-    statisticsMinValue :: (Maybe B.ByteString)}
-  deriving (Eq, Ord, Read, Show)
-
-_Statistics = Core.Name "hydra.parquet.format.Statistics"
-
-_Statistics_nullCount = Core.Name "nullCount"
-
-_Statistics_distinctCount = Core.Name "distinctCount"
-
-_Statistics_maxValue = Core.Name "maxValue"
-
-_Statistics_minValue = Core.Name "minValue"
-
--- | Decimal logical type annotation. To maintain forward-compatibility in v1, implementations using this logical type must also set scale and precision on the annotated SchemaElement. Allowed for physical types: INT32, INT64, FIXED, and BINARY
-data DecimalType =
-  DecimalType {
-    decimalTypeScale :: Int,
-    decimalTypePrecision :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_DecimalType = Core.Name "hydra.parquet.format.DecimalType"
-
-_DecimalType_scale = Core.Name "scale"
-
-_DecimalType_precision = Core.Name "precision"
-
-data TimeUnit =
-  TimeUnitMillis  |
-  TimeUnitMicros  |
-  TimeUnitNanos
-  deriving (Eq, Ord, Read, Show)
-
-_TimeUnit = Core.Name "hydra.parquet.format.TimeUnit"
-
-_TimeUnit_millis = Core.Name "millis"
-
-_TimeUnit_micros = Core.Name "micros"
-
-_TimeUnit_nanos = Core.Name "nanos"
-
--- | Timestamp logical type annotation. Allowed for physical types: INT64
-data TimestampType =
-  TimestampType {
-    timestampTypeIsAdjustedToUtc :: Bool,
-    timestampTypeUnit :: TimeUnit}
-  deriving (Eq, Ord, Read, Show)
-
-_TimestampType = Core.Name "hydra.parquet.format.TimestampType"
-
-_TimestampType_isAdjustedToUtc = Core.Name "isAdjustedToUtc"
-
-_TimestampType_unit = Core.Name "unit"
-
--- | Time logical type annotation. Allowed for physical types: INT32 (millis), INT64 (micros, nanos)
-data TimeType =
-  TimeType {
-    timeTypeIsAdjustedToUtc :: Bool,
-    timeTypeUnit :: TimeUnit}
-  deriving (Eq, Ord, Read, Show)
-
-_TimeType = Core.Name "hydra.parquet.format.TimeType"
-
-_TimeType_isAdjustedToUtc = Core.Name "isAdjustedToUtc"
-
-_TimeType_unit = Core.Name "unit"
-
--- | Integer logical type annotation. bitWidth must be 8, 16, 32, or 64. Allowed for physical types: INT32, INT64
-data IntType =
-  IntType {
-    intTypeBitWidth :: I.Int16,
-    intTypeIsSigned :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_IntType = Core.Name "hydra.parquet.format.IntType"
-
-_IntType_bitWidth = Core.Name "bitWidth"
-
-_IntType_isSigned = Core.Name "isSigned"
-
--- | LogicalType annotations to replace ConvertedType. To maintain compatibility, implementations using LogicalType for a SchemaElement aust also set the corresponding ConvertedType (if any) from the following table.
-data LogicalType =
-  -- | use ConvertedType UTF8
-  LogicalTypeString  |
-  -- | use ConvertedType MAP
-  LogicalTypeMap  |
-  -- | use ConvertedType LIST
-  LogicalTypeList  |
-  -- | use ConvertedType ENUM
-  LogicalTypeEnum  |
-  -- | use ConvertedType DECIMAL + SchemaElement.{scale, precision}
-  LogicalTypeDecimal DecimalType |
-  -- | use ConvertedType DATE
-  LogicalTypeDate  |
-  -- | use ConvertedType TIME_MICROS for TIME(isAdjustedToUTC = *, unit = MICROS). use ConvertedType TIME_MILLIS for TIME(isAdjustedToUTC = *, unit = MILLIS)
-  LogicalTypeTime TimeType |
-  -- | use ConvertedType TIMESTAMP_MICROS for TIMESTAMP(isAdjustedToUTC = *, unit = MICROS). use ConvertedType TIMESTAMP_MILLIS for TIMESTAMP(isAdjustedToUTC = *, unit = MILLIS)
-  LogicalTypeTimestamp TimestampType |
-  -- | use ConvertedType INT_* or UINT_*
-  LogicalTypeInteger IntType |
-  -- | no compatible ConvertedType
-  LogicalTypeUnknown  |
-  -- | use ConvertedType JSON
-  LogicalTypeJson  |
-  -- | use ConvertedType BSON
-  LogicalTypeBson  |
-  -- | no compatible ConvertedType
-  LogicalTypeUuid
-  deriving (Eq, Ord, Read, Show)
-
-_LogicalType = Core.Name "hydra.parquet.format.LogicalType"
-
-_LogicalType_string = Core.Name "string"
-
-_LogicalType_map = Core.Name "map"
-
-_LogicalType_list = Core.Name "list"
-
-_LogicalType_enum = Core.Name "enum"
-
-_LogicalType_decimal = Core.Name "decimal"
-
-_LogicalType_date = Core.Name "date"
-
-_LogicalType_time = Core.Name "time"
-
-_LogicalType_timestamp = Core.Name "timestamp"
-
-_LogicalType_integer = Core.Name "integer"
-
-_LogicalType_unknown = Core.Name "unknown"
-
-_LogicalType_json = Core.Name "json"
-
-_LogicalType_bson = Core.Name "bson"
-
-_LogicalType_uuid = Core.Name "uuid"
-
--- | Represents a element inside a schema definition.
--- | - if it is a group (inner node) then type is undefined and num_children is defined
--- | - if it is a primitive type (leaf) then type is defined and num_children is undefined
--- | the nodes are listed in depth first traversal order.
-data SchemaElement =
-  SchemaElement {
-    -- | Data type for this field. Not set if the current element is a non-leaf node
-    schemaElementType :: (Maybe Type),
-    -- | If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3).  Note that this is in the schema, and therefore fixed for the entire file.
-    schemaElementTypeLength :: (Maybe Int),
-    -- | repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one
-    schemaElementRepetitionType :: (Maybe FieldRepetitionType),
-    -- | Name of the field in the schema
-    schemaElementName :: String,
-    -- | Nested fields.  Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type
-    schemaElementNumChildren :: (Maybe Int),
-    -- | When the original schema supports field ids, this will save the original field id in the parquet schema
-    schemaElementFieldId :: (Maybe Int),
-    -- | The logical type of this SchemaElement. LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.
-    schemaElementLogicalType :: (Maybe LogicalType)}
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaElement = Core.Name "hydra.parquet.format.SchemaElement"
-
-_SchemaElement_type = Core.Name "type"
-
-_SchemaElement_typeLength = Core.Name "typeLength"
-
-_SchemaElement_repetitionType = Core.Name "repetitionType"
-
-_SchemaElement_name = Core.Name "name"
-
-_SchemaElement_numChildren = Core.Name "numChildren"
-
-_SchemaElement_fieldId = Core.Name "fieldId"
-
-_SchemaElement_logicalType = Core.Name "logicalType"
-
--- | Encodings supported by Parquet.  Not all encodings are valid for all types.  These enums are also used to specify the encoding of definition and repetition levels. See the accompanying doc for the details of the more complicated encodings.
-data Encoding =
-  -- | Default encoding.
-  -- | BOOLEAN - 1 bit per value. 0 is false; 1 is true.
-  -- | INT32 - 4 bytes per value.  Stored as little-endian.
-  -- | INT64 - 8 bytes per value.  Stored as little-endian.
-  -- | FLOAT - 4 bytes per value.  IEEE. Stored as little-endian.
-  -- | DOUBLE - 8 bytes per value.  IEEE. Stored as little-endian.
-  -- | BYTE_ARRAY - 4 byte length stored as little endian, followed by bytes.
-  -- | FIXED_LEN_BYTE_ARRAY - Just the bytes.
-  EncodingPlain  |
-  -- | Group packed run length encoding. Usable for definition/repetition levels encoding and Booleans (on one bit: 0 is false; 1 is true.)
-  EncodingRle  |
-  -- | Bit packed encoding.  This can only be used if the data has a known max width.  Usable for definition/repetition levels encoding.
-  EncodingBitPacked  |
-  -- | Delta encoding for integers. This can be used for int columns and works best on sorted data
-  EncodingDeltaBinaryPacked  |
-  -- | Encoding for byte arrays to separate the length values and the data. The lengths are encoded using DELTA_BINARY_PACKED
-  EncodingDeltaLengthByteArray  |
-  -- | Incremental-encoded byte array. Prefix lengths are encoded using DELTA_BINARY_PACKED. Suffixes are stored as delta length byte arrays.
-  EncodingDeltaByteArray  |
-  -- | Dictionary encoding: the ids are encoded using the RLE encoding
-  EncodingRleDictionary  |
-  -- | Encoding for floating-point data. K byte-streams are created where K is the size in bytes of the data type. The individual bytes of an FP value are scattered to the corresponding stream and the streams are concatenated. This itself does not reduce the size of the data but can lead to better compression afterwards.
-  EncodingByteStreamSplit
-  deriving (Eq, Ord, Read, Show)
-
-_Encoding = Core.Name "hydra.parquet.format.Encoding"
-
-_Encoding_plain = Core.Name "plain"
-
-_Encoding_rle = Core.Name "rle"
-
-_Encoding_bitPacked = Core.Name "bitPacked"
-
-_Encoding_deltaBinaryPacked = Core.Name "deltaBinaryPacked"
-
-_Encoding_deltaLengthByteArray = Core.Name "deltaLengthByteArray"
-
-_Encoding_deltaByteArray = Core.Name "deltaByteArray"
-
-_Encoding_rleDictionary = Core.Name "rleDictionary"
-
-_Encoding_byteStreamSplit = Core.Name "byteStreamSplit"
-
--- | Supported compression algorithms. Codecs added in format version X.Y can be read by readers based on X.Y and later. Codec support may vary between readers based on the format version and libraries available at runtime. See Compression.md for a detailed specification of these algorithms.
-data CompressionCodec =
-  CompressionCodecUncompressed  |
-  CompressionCodecSnappy  |
-  CompressionCodecGzip  |
-  CompressionCodecLzo  |
-  -- | Added in 2.4
-  CompressionCodecBrotli  |
-  -- | Added in 2.4
-  CompressionCodecZstd  |
-  -- | Added in 2.9
-  CompressionCodecLz4Raw
-  deriving (Eq, Ord, Read, Show)
-
-_CompressionCodec = Core.Name "hydra.parquet.format.CompressionCodec"
-
-_CompressionCodec_uncompressed = Core.Name "uncompressed"
-
-_CompressionCodec_snappy = Core.Name "snappy"
-
-_CompressionCodec_gzip = Core.Name "gzip"
-
-_CompressionCodec_lzo = Core.Name "lzo"
-
-_CompressionCodec_brotli = Core.Name "brotli"
-
-_CompressionCodec_zstd = Core.Name "zstd"
-
-_CompressionCodec_lz4Raw = Core.Name "lz4Raw"
-
-data PageType =
-  PageTypeDataPage  |
-  PageTypeIndexPage  |
-  PageTypeDictionaryPage  |
-  PageTypeDataPageV2
-  deriving (Eq, Ord, Read, Show)
-
-_PageType = Core.Name "hydra.parquet.format.PageType"
-
-_PageType_dataPage = Core.Name "dataPage"
-
-_PageType_indexPage = Core.Name "indexPage"
-
-_PageType_dictionaryPage = Core.Name "dictionaryPage"
-
-_PageType_dataPageV2 = Core.Name "dataPageV2"
-
--- | Enum to annotate whether lists of min/max elements inside ColumnIndex are ordered and if so, in which direction.
-data BoundaryOrder =
-  BoundaryOrderUnordered  |
-  BoundaryOrderAscending  |
-  BoundaryOrderDescending
-  deriving (Eq, Ord, Read, Show)
-
-_BoundaryOrder = Core.Name "hydra.parquet.format.BoundaryOrder"
-
-_BoundaryOrder_unordered = Core.Name "unordered"
-
-_BoundaryOrder_ascending = Core.Name "ascending"
-
-_BoundaryOrder_descending = Core.Name "descending"
-
--- | Data page header
-data DataPageHeader =
-  DataPageHeader {
-    -- | Number of values, including NULLs, in this data page.
-    dataPageHeaderNumValues :: Int,
-    -- | Encoding used for this data page
-    dataPageHeaderEncoding :: Encoding,
-    -- | Encoding used for definition levels
-    dataPageHeaderDefinitionLevelEncoding :: Encoding,
-    -- | Encoding used for repetition levels
-    dataPageHeaderRepetitionLevelEncoding :: Encoding,
-    -- | Optional statistics for the data in this page
-    dataPageHeaderStatistics :: (Maybe Statistics)}
-  deriving (Eq, Ord, Read, Show)
-
-_DataPageHeader = Core.Name "hydra.parquet.format.DataPageHeader"
-
-_DataPageHeader_numValues = Core.Name "numValues"
-
-_DataPageHeader_encoding = Core.Name "encoding"
-
-_DataPageHeader_definitionLevelEncoding = Core.Name "definitionLevelEncoding"
-
-_DataPageHeader_repetitionLevelEncoding = Core.Name "repetitionLevelEncoding"
-
-_DataPageHeader_statistics = Core.Name "statistics"
-
-data IndexPageHeader =
-  IndexPageHeader {}
-  deriving (Eq, Ord, Read, Show)
-
-_IndexPageHeader = Core.Name "hydra.parquet.format.IndexPageHeader"
-
--- | The dictionary page must be placed at the first position of the column chunk if it is partly or completely dictionary encoded. At most one dictionary page can be placed in a column chunk.
-data DictionaryPageHeader =
-  DictionaryPageHeader {
-    -- | Number of values in the dictionary
-    dictionaryPageHeaderNumValues :: Int,
-    -- | Encoding using this dictionary page
-    dictionaryPageHeaderEncoding :: Encoding,
-    -- | If true, the entries in the dictionary are sorted in ascending order
-    dictionaryPageHeaderIsSorted :: (Maybe Bool)}
-  deriving (Eq, Ord, Read, Show)
-
-_DictionaryPageHeader = Core.Name "hydra.parquet.format.DictionaryPageHeader"
-
-_DictionaryPageHeader_numValues = Core.Name "numValues"
-
-_DictionaryPageHeader_encoding = Core.Name "encoding"
-
-_DictionaryPageHeader_isSorted = Core.Name "isSorted"
-
--- | New page format allowing reading levels without decompressing the data Repetition and definition levels are uncompressed The remaining section containing the data is compressed if is_compressed is true
-data DataPageHeaderV2 =
-  DataPageHeaderV2 {
-    -- | Number of values, including NULLs, in this data page.
-    dataPageHeaderV2NumValues :: Int,
-    -- | Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section
-    dataPageHeaderV2NumNulls :: Int,
-    -- | Number of rows in this data page. which means pages change on record boundaries (r = 0)
-    dataPageHeaderV2NumRows :: Int,
-    -- | Encoding used for data in this page
-    dataPageHeaderV2Encoding :: Encoding,
-    -- | length of the definition levels
-    dataPageHeaderV2DefinitionLevelsByteLength :: Int,
-    -- | length of the repetition levels
-    dataPageHeaderV2RepetitionLevelsByteLength :: Int,
-    -- | whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length + 1 and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed
-    dataPageHeaderV2IsCompressed :: (Maybe Bool),
-    -- | optional statistics for the data in this page
-    dataPageHeaderV2Statistics :: (Maybe Statistics)}
-  deriving (Eq, Ord, Read, Show)
-
-_DataPageHeaderV2 = Core.Name "hydra.parquet.format.DataPageHeaderV2"
-
-_DataPageHeaderV2_numValues = Core.Name "numValues"
-
-_DataPageHeaderV2_numNulls = Core.Name "numNulls"
-
-_DataPageHeaderV2_numRows = Core.Name "numRows"
-
-_DataPageHeaderV2_encoding = Core.Name "encoding"
-
-_DataPageHeaderV2_definitionLevelsByteLength = Core.Name "definitionLevelsByteLength"
-
-_DataPageHeaderV2_repetitionLevelsByteLength = Core.Name "repetitionLevelsByteLength"
-
-_DataPageHeaderV2_isCompressed = Core.Name "isCompressed"
-
-_DataPageHeaderV2_statistics = Core.Name "statistics"
-
--- | The algorithm used in Bloom filter.
-data BloomFilterAlgorithm =
-  -- | Block-based Bloom filter.
-  BloomFilterAlgorithmBlock
-  deriving (Eq, Ord, Read, Show)
-
-_BloomFilterAlgorithm = Core.Name "hydra.parquet.format.BloomFilterAlgorithm"
-
-_BloomFilterAlgorithm_block = Core.Name "block"
-
--- | The hash function used in Bloom filter. This function takes the hash of a column value using plain encoding.
-data BloomFilterHash =
-  -- | xxHash Strategy.
-  BloomFilterHashXxhash
-  deriving (Eq, Ord, Read, Show)
-
-_BloomFilterHash = Core.Name "hydra.parquet.format.BloomFilterHash"
-
-_BloomFilterHash_xxhash = Core.Name "xxhash"
-
--- | The compression used in the Bloom filter.
-data BloomFilterCompression =
-  BloomFilterCompressionUncompressed
-  deriving (Eq, Ord, Read, Show)
-
-_BloomFilterCompression = Core.Name "hydra.parquet.format.BloomFilterCompression"
-
-_BloomFilterCompression_uncompressed = Core.Name "uncompressed"
-
--- | Bloom filter header is stored at beginning of Bloom filter data of each column and followed by its bitset.
-data BloomFilterHeader =
-  BloomFilterHeader {
-    -- | The size of bitset in bytes
-    bloomFilterHeaderNumBytes :: Int,
-    -- | The algorithm for setting bits.
-    bloomFilterHeaderAlgorithm :: BloomFilterAlgorithm,
-    -- | The hash function used for Bloom filter.
-    bloomFilterHeaderHash :: BloomFilterHash,
-    -- | The compression used in the Bloom filter
-    bloomFilterHeaderCompression :: BloomFilterCompression}
-  deriving (Eq, Ord, Read, Show)
-
-_BloomFilterHeader = Core.Name "hydra.parquet.format.BloomFilterHeader"
-
-_BloomFilterHeader_numBytes = Core.Name "numBytes"
-
-_BloomFilterHeader_algorithm = Core.Name "algorithm"
-
-_BloomFilterHeader_hash = Core.Name "hash"
-
-_BloomFilterHeader_compression = Core.Name "compression"
-
-data PageHeader =
-  PageHeader {
-    -- | the type of the page: indicates which of the *_header fields is set
-    pageHeaderType :: PageType,
-    -- | Uncompressed page size in bytes (not including this header)
-    pageHeaderUncompressedPageSize :: Int,
-    -- | Compressed (and potentially encrypted) page size in bytes, not including this header
-    pageHeaderCompressedPageSize :: Int,
-    -- | The 32bit CRC for the page, to be be calculated as follows:
-    -- | - Using the standard CRC32 algorithm
-    -- | - On the data only, i.e. this header should not be included. 'Data'
-    -- |   hereby refers to the concatenation of the repetition levels, the
-    -- |   definition levels and the column value, in this exact order.
-    -- | - On the encoded versions of the repetition levels, definition levels and
-    -- |   column values
-    -- | - On the compressed versions of the repetition levels, definition levels
-    -- |   and column values where possible;
-    -- |   - For v1 data pages, the repetition levels, definition levels and column
-    -- |     values are always compressed together. If a compression scheme is
-    -- |     specified, the CRC shall be calculated on the compressed version of
-    -- |     this concatenation. If no compression scheme is specified, the CRC
-    -- |     shall be calculated on the uncompressed version of this concatenation.
-    -- |   - For v2 data pages, the repetition levels and definition levels are
-    -- |     handled separately from the data and are never compressed (only
-    -- |     encoded). If a compression scheme is specified, the CRC shall be
-    -- |     calculated on the concatenation of the uncompressed repetition levels,
-    -- |     uncompressed definition levels and the compressed column values.
-    -- |     If no compression scheme is specified, the CRC shall be calculated on
-    -- |     the uncompressed concatenation.
-    -- | - In encrypted columns, CRC is calculated after page encryption; the
-    -- |   encryption itself is performed after page compression (if compressed)
-    -- | If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read.
-    pageHeaderCrc :: (Maybe Int),
-    pageHeaderDataPageHeader :: (Maybe DataPageHeader),
-    pageHeaderIndexPageHeader :: (Maybe IndexPageHeader),
-    pageHeaderDictionaryPageHeader :: (Maybe DictionaryPageHeader),
-    pageHeaderDataPageHeaderV2 :: (Maybe DataPageHeaderV2)}
-  deriving (Eq, Ord, Read, Show)
-
-_PageHeader = Core.Name "hydra.parquet.format.PageHeader"
-
-_PageHeader_type = Core.Name "type"
-
-_PageHeader_uncompressedPageSize = Core.Name "uncompressedPageSize"
-
-_PageHeader_compressedPageSize = Core.Name "compressedPageSize"
-
-_PageHeader_crc = Core.Name "crc"
-
-_PageHeader_dataPageHeader = Core.Name "dataPageHeader"
-
-_PageHeader_indexPageHeader = Core.Name "indexPageHeader"
-
-_PageHeader_dictionaryPageHeader = Core.Name "dictionaryPageHeader"
-
-_PageHeader_dataPageHeaderV2 = Core.Name "dataPageHeaderV2"
-
--- | Wrapper struct to store key values
-data KeyValue =
-  KeyValue {
-    keyValueKey :: String,
-    keyValueValue :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_KeyValue = Core.Name "hydra.parquet.format.KeyValue"
-
-_KeyValue_key = Core.Name "key"
-
-_KeyValue_value = Core.Name "value"
-
--- | Wrapper struct to specify sort order
-data SortingColumn =
-  SortingColumn {
-    -- | The column index (in this row group)
-    sortingColumnColumnIdx :: Int,
-    -- | If true, indicates this column is sorted in descending order.
-    sortingColumnDescending :: Bool,
-    -- | If true, nulls will come before non-null values, otherwise, nulls go at the end.
-    sortingColumnNullsFirst :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_SortingColumn = Core.Name "hydra.parquet.format.SortingColumn"
-
-_SortingColumn_columnIdx = Core.Name "columnIdx"
-
-_SortingColumn_descending = Core.Name "descending"
-
-_SortingColumn_nullsFirst = Core.Name "nullsFirst"
-
--- | statistics of a given page type and encoding
-data PageEncodingStats =
-  PageEncodingStats {
-    -- | the page type (data/dic/...)
-    pageEncodingStatsPageType :: PageType,
-    -- | encoding of the page
-    pageEncodingStatsEncoding :: Encoding,
-    -- | number of pages of this type with this encoding
-    pageEncodingStatsCount :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_PageEncodingStats = Core.Name "hydra.parquet.format.PageEncodingStats"
-
-_PageEncodingStats_pageType = Core.Name "pageType"
-
-_PageEncodingStats_encoding = Core.Name "encoding"
-
-_PageEncodingStats_count = Core.Name "count"
-
--- | Description for column metadata
-data ColumnMetaData =
-  ColumnMetaData {
-    -- | Type of this column
-    columnMetaDataType :: Type,
-    -- | Set of all encodings used for this column. The purpose is to validate whether we can decode those pages.
-    columnMetaDataEncodings :: [Encoding],
-    -- | Path in schema
-    columnMetaDataPathInSchema :: [String],
-    -- | Compression codec
-    columnMetaDataCodec :: CompressionCodec,
-    -- | Number of values in this column
-    columnMetaDataNumValues :: I.Int64,
-    -- | total byte size of all uncompressed pages in this column chunk (including the headers)
-    columnMetaDataTotalUncompressedSize :: I.Int64,
-    -- | total byte size of all compressed, and potentially encrypted, pages in this column chunk (including the headers)
-    columnMetaDataTotalCompressedSize :: I.Int64,
-    -- | Optional key/value metadata
-    columnMetaDataKeyValueMetadata :: (Maybe [KeyValue]),
-    -- | Byte offset from beginning of file to first data page
-    columnMetaDataDataPageOffset :: I.Int64,
-    -- | Byte offset from beginning of file to root index page
-    columnMetaDataIndexPageOffset :: (Maybe I.Int64),
-    -- | Byte offset from the beginning of file to first (only) dictionary page
-    columnMetaDataDictionaryPageOffset :: (Maybe I.Int64),
-    -- | optional statistics for this column chunk
-    columnMetaDataStatistics :: (Maybe Statistics),
-    -- | Set of all encodings used for pages in this column chunk. This information can be used to determine if all data pages are dictionary encoded for example
-    columnMetaDataEncodingStats :: (Maybe [PageEncodingStats]),
-    -- | Byte offset from beginning of file to Bloom filter data.
-    columnMetaDataBloomFilterOffset :: (Maybe I.Int64)}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnMetaData = Core.Name "hydra.parquet.format.ColumnMetaData"
-
-_ColumnMetaData_type = Core.Name "type"
-
-_ColumnMetaData_encodings = Core.Name "encodings"
-
-_ColumnMetaData_pathInSchema = Core.Name "pathInSchema"
-
-_ColumnMetaData_codec = Core.Name "codec"
-
-_ColumnMetaData_numValues = Core.Name "numValues"
-
-_ColumnMetaData_totalUncompressedSize = Core.Name "totalUncompressedSize"
-
-_ColumnMetaData_totalCompressedSize = Core.Name "totalCompressedSize"
-
-_ColumnMetaData_keyValueMetadata = Core.Name "keyValueMetadata"
-
-_ColumnMetaData_dataPageOffset = Core.Name "dataPageOffset"
-
-_ColumnMetaData_indexPageOffset = Core.Name "indexPageOffset"
-
-_ColumnMetaData_dictionaryPageOffset = Core.Name "dictionaryPageOffset"
-
-_ColumnMetaData_statistics = Core.Name "statistics"
-
-_ColumnMetaData_encodingStats = Core.Name "encodingStats"
-
-_ColumnMetaData_bloomFilterOffset = Core.Name "bloomFilterOffset"
-
-data EncryptionWithFooterKey =
-  EncryptionWithFooterKey {}
-  deriving (Eq, Ord, Read, Show)
-
-_EncryptionWithFooterKey = Core.Name "hydra.parquet.format.EncryptionWithFooterKey"
-
-data EncryptionWithColumnKey =
-  EncryptionWithColumnKey {
-    -- | Column path in schema
-    encryptionWithColumnKeyPathInSchema :: [String],
-    -- | Retrieval metadata of column encryption key
-    encryptionWithColumnKeyKeyMetadata :: (Maybe B.ByteString)}
-  deriving (Eq, Ord, Read, Show)
-
-_EncryptionWithColumnKey = Core.Name "hydra.parquet.format.EncryptionWithColumnKey"
-
-_EncryptionWithColumnKey_pathInSchema = Core.Name "pathInSchema"
-
-_EncryptionWithColumnKey_keyMetadata = Core.Name "keyMetadata"
-
-data ColumnCryptoMetaData =
-  ColumnCryptoMetaDataEncryptionWithFooterKey EncryptionWithFooterKey |
-  ColumnCryptoMetaDataEncryptionWithColumnKey EncryptionWithColumnKey
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnCryptoMetaData = Core.Name "hydra.parquet.format.ColumnCryptoMetaData"
-
-_ColumnCryptoMetaData_encryptionWithFooterKey = Core.Name "encryptionWithFooterKey"
-
-_ColumnCryptoMetaData_encryptionWithColumnKey = Core.Name "encryptionWithColumnKey"
-
-data ColumnChunk =
-  ColumnChunk {
-    -- | File where column data is stored.  If not set, assumed to be same file as metadata.  This path is relative to the current file.
-    columnChunkFilePath :: (Maybe String),
-    -- | Byte offset in file_path to the ColumnMetaData
-    columnChunkFileOffset :: I.Int64,
-    -- | Column metadata for this chunk. This is the same content as what is at file_path/file_offset.  Having it here has it replicated in the file metadata.
-    columnChunkMetaData :: (Maybe ColumnMetaData),
-    -- | File offset of ColumnChunk's OffsetIndex
-    columnChunkOffsetIndexOffset :: (Maybe I.Int64),
-    -- | Size of ColumnChunk's OffsetIndex, in bytes
-    columnChunkOffsetIndexLength :: (Maybe Int),
-    -- | File offset of ColumnChunk's ColumnIndex
-    columnChunkColumnIndexOffset :: (Maybe I.Int64),
-    -- | Size of ColumnChunk's ColumnIndex, in bytes
-    columnChunkColumnIndexLength :: (Maybe Int),
-    -- | Crypto metadata of encrypted columns
-    columnChunkCryptoMetadata :: (Maybe ColumnCryptoMetaData),
-    -- | Encrypted column metadata for this chunk
-    columnChunkEncryptedColumnMetadata :: (Maybe B.ByteString)}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnChunk = Core.Name "hydra.parquet.format.ColumnChunk"
-
-_ColumnChunk_filePath = Core.Name "filePath"
-
-_ColumnChunk_fileOffset = Core.Name "fileOffset"
-
-_ColumnChunk_metaData = Core.Name "metaData"
-
-_ColumnChunk_offsetIndexOffset = Core.Name "offsetIndexOffset"
-
-_ColumnChunk_offsetIndexLength = Core.Name "offsetIndexLength"
-
-_ColumnChunk_columnIndexOffset = Core.Name "columnIndexOffset"
-
-_ColumnChunk_columnIndexLength = Core.Name "columnIndexLength"
-
-_ColumnChunk_cryptoMetadata = Core.Name "cryptoMetadata"
-
-_ColumnChunk_encryptedColumnMetadata = Core.Name "encryptedColumnMetadata"
-
-data RowGroup =
-  RowGroup {
-    -- | Metadata for each column chunk in this row group. This list must have the same order as the SchemaElement list in FileMetaData.
-    rowGroupColumns :: [ColumnChunk],
-    -- | Total byte size of all the uncompressed column data in this row group
-    rowGroupTotalByteSize :: I.Int64,
-    -- | Number of rows in this row group
-    rowGroupNumRows :: I.Int64,
-    -- | If set, specifies a sort ordering of the rows in this RowGroup. The sorting columns can be a subset of all the columns.
-    rowGroupSortingColumns :: (Maybe [SortingColumn]),
-    -- | Byte offset from beginning of file to first page (data or dictionary) in this row group
-    rowGroupFileOffset :: (Maybe I.Int64),
-    -- | Total byte size of all compressed (and potentially encrypted) column data in this row group
-    rowGroupTotalCompressedSize :: (Maybe I.Int64),
-    -- | Row group ordinal in the file
-    rowGroupOrdinal :: (Maybe I.Int16)}
-  deriving (Eq, Ord, Read, Show)
-
-_RowGroup = Core.Name "hydra.parquet.format.RowGroup"
-
-_RowGroup_columns = Core.Name "columns"
-
-_RowGroup_totalByteSize = Core.Name "totalByteSize"
-
-_RowGroup_numRows = Core.Name "numRows"
-
-_RowGroup_sortingColumns = Core.Name "sortingColumns"
-
-_RowGroup_fileOffset = Core.Name "fileOffset"
-
-_RowGroup_totalCompressedSize = Core.Name "totalCompressedSize"
-
-_RowGroup_ordinal = Core.Name "ordinal"
-
--- | Union to specify the order used for the min_value and max_value fields for a column. This union takes the role of an enhanced enum that allows rich elements (which will be needed for a collation-based ordering in the future). Possible values are:
--- | * TypeDefinedOrder - the column uses the order defined by its logical or physical type (if there is no logical type).
--- | If the reader does not support the value of this union, min and max stats for this column should be ignored.
-data ColumnOrder =
-  -- | The sort orders for logical types are:
-  -- |   UTF8 - unsigned byte-wise comparison
-  -- |   INT8 - signed comparison
-  -- |   INT16 - signed comparison
-  -- |   INT32 - signed comparison
-  -- |   INT64 - signed comparison
-  -- |   UINT8 - unsigned comparison
-  -- |   UINT16 - unsigned comparison
-  -- |   UINT32 - unsigned comparison
-  -- |   UINT64 - unsigned comparison
-  -- |   DECIMAL - signed comparison of the represented value
-  -- |   DATE - signed comparison
-  -- |   TIME_MILLIS - signed comparison
-  -- |   TIME_MICROS - signed comparison
-  -- |   TIMESTAMP_MILLIS - signed comparison
-  -- |   TIMESTAMP_MICROS - signed comparison
-  -- |   INTERVAL - unsigned comparison
-  -- |   JSON - unsigned byte-wise comparison
-  -- |   BSON - unsigned byte-wise comparison
-  -- |   ENUM - unsigned byte-wise comparison
-  -- |   LIST - undefined
-  -- |   MAP - undefined
-  -- | In the absence of logical types, the sort order is determined by the physical type:
-  -- |   BOOLEAN - false, true
-  -- |   INT32 - signed comparison
-  -- |   INT64 - signed comparison
-  -- |   INT96 (only used for legacy timestamps) - undefined
-  -- |   FLOAT - signed comparison of the represented value (*)
-  -- |   DOUBLE - signed comparison of the represented value (*)
-  -- |   BYTE_ARRAY - unsigned byte-wise comparison
-  -- |   FIXED_LEN_BYTE_ARRAY - unsigned byte-wise comparison
-  -- | (*) Because the sorting order is not specified properly for floating
-  -- |     point values (relations vs. total ordering) the following
-  -- |     compatibility rules should be applied when reading statistics:
-  -- |     - If the min is a NaN, it should be ignored.
-  -- |     - If the max is a NaN, it should be ignored.
-  -- |     - If the min is +0, the row group may contain -0 values as well.
-  -- |     - If the max is -0, the row group may contain +0 values as well.
-  -- |     - When looking for NaN values, min and max should be ignored.
-  ColumnOrderTypeOrder
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnOrder = Core.Name "hydra.parquet.format.ColumnOrder"
-
-_ColumnOrder_typeOrder = Core.Name "typeOrder"
-
-data PageLocation =
-  PageLocation {
-    -- | Offset of the page in the file
-    pageLocationOffset :: I.Int64,
-    -- | Size of the page, including header. Sum of compressed_page_size and header length
-    pageLocationCompressedPageSize :: Int,
-    -- | Index within the RowGroup of the first row of the page; this means pages change on record boundaries (r = 0).
-    pageLocationFirstRowIndex :: I.Int64}
-  deriving (Eq, Ord, Read, Show)
-
-_PageLocation = Core.Name "hydra.parquet.format.PageLocation"
-
-_PageLocation_offset = Core.Name "offset"
-
-_PageLocation_compressedPageSize = Core.Name "compressedPageSize"
-
-_PageLocation_firstRowIndex = Core.Name "firstRowIndex"
-
-data OffsetIndex =
-  OffsetIndex {
-    -- | PageLocations, ordered by increasing PageLocation.offset. It is required that page_locations[i].first_row_index < page_locations[i+1].first_row_index.
-    offsetIndexPageLocations :: [PageLocation]}
-  deriving (Eq, Ord, Read, Show)
-
-_OffsetIndex = Core.Name "hydra.parquet.format.OffsetIndex"
-
-_OffsetIndex_pageLocations = Core.Name "pageLocations"
-
--- | Description for ColumnIndex. Each <array-field>[i] refers to the page at OffsetIndex.page_locations[i]
-data ColumnIndex =
-  ColumnIndex {
-    -- | A list of Boolean values to determine the validity of the corresponding min and max values. If true, a page contains only null values, and writers have to set the corresponding entries in min_values and max_values to byte[0], so that all lists have the same length. If false, the corresponding entries in min_values and max_values must be valid.
-    columnIndexNullPages :: [Bool],
-    -- | minValues and maxValues are lists containing lower and upper bounds for the values of each page determined by the ColumnOrder of the column. These may be the actual minimum and maximum values found on a page, but can also be (more compact) values that do not exist on a page. For example, instead of storing "Blart Versenwald III", a writer may set min_values[i]="B", max_values[i]="C". Such more compact values must still be valid values within the column's logical type. Readers must make sure that list entries are populated before using them by inspecting null_pages.
-    columnIndexMinValues :: [B.ByteString],
-    columnIndexMaxValues :: [B.ByteString],
-    -- | Stores whether both min_values and max_values are orderd and if so, in which direction. This allows readers to perform binary searches in both lists. Readers cannot assume that max_values[i] <= min_values[i+1], even if the lists are ordered.
-    columnIndexBoundaryOrder :: BoundaryOrder,
-    -- | A list containing the number of null values for each page
-    columnIndexNullCounts :: (Maybe [I.Int64])}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnIndex = Core.Name "hydra.parquet.format.ColumnIndex"
-
-_ColumnIndex_nullPages = Core.Name "nullPages"
-
-_ColumnIndex_minValues = Core.Name "minValues"
-
-_ColumnIndex_maxValues = Core.Name "maxValues"
-
-_ColumnIndex_boundaryOrder = Core.Name "boundaryOrder"
-
-_ColumnIndex_nullCounts = Core.Name "nullCounts"
-
-data AesGcmV1 =
-  AesGcmV1 {
-    -- | AAD prefix
-    aesGcmV1AadPrefix :: (Maybe B.ByteString),
-    -- | Unique file identifier part of AAD suffix
-    aesGcmV1AadFileUnique :: (Maybe B.ByteString),
-    -- | In files encrypted with AAD prefix without storing it, readers must supply the prefix
-    aesGcmV1SupplyAadPrefix :: (Maybe Bool)}
-  deriving (Eq, Ord, Read, Show)
-
-_AesGcmV1 = Core.Name "hydra.parquet.format.AesGcmV1"
-
-_AesGcmV1_aadPrefix = Core.Name "aadPrefix"
-
-_AesGcmV1_aadFileUnique = Core.Name "aadFileUnique"
-
-_AesGcmV1_supplyAadPrefix = Core.Name "supplyAadPrefix"
-
-data AesGcmCtrV1 =
-  AesGcmCtrV1 {
-    -- | AAD prefix
-    aesGcmCtrV1AadPrefix :: (Maybe B.ByteString),
-    -- | Unique file identifier part of AAD suffix
-    aesGcmCtrV1AadFileUnique :: (Maybe B.ByteString),
-    -- | In files encrypted with AAD prefix without storing it, readers must supply the prefix
-    aesGcmCtrV1SupplyAadPrefix :: (Maybe Bool)}
-  deriving (Eq, Ord, Read, Show)
-
-_AesGcmCtrV1 = Core.Name "hydra.parquet.format.AesGcmCtrV1"
-
-_AesGcmCtrV1_aadPrefix = Core.Name "aadPrefix"
-
-_AesGcmCtrV1_aadFileUnique = Core.Name "aadFileUnique"
-
-_AesGcmCtrV1_supplyAadPrefix = Core.Name "supplyAadPrefix"
-
-data EncryptionAlgorithm =
-  EncryptionAlgorithmAesGcmV1 AesGcmV1 |
-  EncryptionAlgorithmAesGcmCtrV1 AesGcmCtrV1
-  deriving (Eq, Ord, Read, Show)
-
-_EncryptionAlgorithm = Core.Name "hydra.parquet.format.EncryptionAlgorithm"
-
-_EncryptionAlgorithm_aesGcmV1 = Core.Name "aesGcmV1"
-
-_EncryptionAlgorithm_aesGcmCtrV1 = Core.Name "aesGcmCtrV1"
-
--- | Description for file metadata
-data FileMetaData =
-  FileMetaData {
-    -- | Version of this file
-    fileMetaDataVersion :: Int,
-    -- | Parquet schema for this file.  This schema contains metadata for all the columns. The schema is represented as a tree with a single root.  The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root
-    fileMetaDataSchema :: [SchemaElement],
-    -- | Number of rows in this file
-    fileMetaDataNumRows :: I.Int64,
-    -- | Row groups in this file
-    fileMetaDataRowGroups :: [RowGroup],
-    -- | Optional key/value metadata
-    fileMetaDataKeyValueMetadata :: (Maybe [KeyValue]),
-    -- | String for application that wrote this file.  This should be in the format <Application> version <App Version> (build <App Build Hash>). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)
-    fileMetaDataCreatedBy :: (Maybe String),
-    -- | Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessary the same though, because only leaf nodes of the schema are represented in the list of sort orders.
-    -- | Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behaviour, if these fields are written to a Parquet file, column_orders must be written as well.
-    -- | The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders.
-    fileMetaDataColumnOrders :: (Maybe [ColumnOrder]),
-    -- | Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure.
-    fileMetaDataEncryptionAlgorithm :: (Maybe EncryptionAlgorithm),
-    -- | Retrieval metadata of key used for signing the footer. Used only in encrypted files with plaintext footer.
-    fileMetaDataFooterSigningKeyMetadata :: (Maybe B.ByteString)}
-  deriving (Eq, Ord, Read, Show)
-
-_FileMetaData = Core.Name "hydra.parquet.format.FileMetaData"
-
-_FileMetaData_version = Core.Name "version"
-
-_FileMetaData_schema = Core.Name "schema"
-
-_FileMetaData_numRows = Core.Name "numRows"
-
-_FileMetaData_rowGroups = Core.Name "rowGroups"
-
-_FileMetaData_keyValueMetadata = Core.Name "keyValueMetadata"
-
-_FileMetaData_createdBy = Core.Name "createdBy"
-
-_FileMetaData_columnOrders = Core.Name "columnOrders"
-
-_FileMetaData_encryptionAlgorithm = Core.Name "encryptionAlgorithm"
-
-_FileMetaData_footerSigningKeyMetadata = Core.Name "footerSigningKeyMetadata"
-
--- | Crypto metadata for files with encrypted footer
-data FileCryptoMetaData =
-  FileCryptoMetaData {
-    -- | Encryption algorithm. This field is only used for files with encrypted footer. Files with plaintext footer store algorithm id inside footer (FileMetaData structure).
-    fileCryptoMetaDataEncryptionAlgorithm :: EncryptionAlgorithm,
-    -- | Retrieval metadata of key used for encryption of footer, and (possibly) columns
-    fileCryptoMetaDataKeyMetadata :: (Maybe B.ByteString)}
-  deriving (Eq, Ord, Read, Show)
-
-_FileCryptoMetaData = Core.Name "hydra.parquet.format.FileCryptoMetaData"
-
-_FileCryptoMetaData_encryptionAlgorithm = Core.Name "encryptionAlgorithm"
-
-_FileCryptoMetaData_keyMetadata = Core.Name "keyMetadata"
diff --git a/src/main/haskell/Hydra/Parsers.hs b/src/main/haskell/Hydra/Parsers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Parsers.hs
+++ /dev/null
@@ -1,137 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | General-purpose parser combinators
-
-module Hydra.Parsers where
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Parsing as Parsing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Try the first parser; if it fails without consuming input, try the second
-alt :: Parsing.Parser t0 -> Parsing.Parser t0 -> Parsing.Parser t0
-alt p1 p2 =
-
-      let parse =
-              \input -> (\x -> case x of
-                Parsing.ParseResultSuccess v0 -> Parsing.ParseResultSuccess v0
-                Parsing.ParseResultFailure v0 -> Logic.ifElse (Equality.equal (Parsing.parseErrorRemainder v0) input) (Parsing.unParser p2 input) (Parsing.ParseResultFailure v0)) (Parsing.unParser p1 input)
-      in (Parsing.Parser parse)
--- | Parse any single character (codepoint)
-anyChar :: Parsing.Parser Int
-anyChar = satisfy (\_ -> True)
--- | Apply a parser containing a function to a parser containing a value
-apply :: Parsing.Parser (t0 -> t1) -> Parsing.Parser t0 -> Parsing.Parser t1
-apply pf pa =
-
-      let parse =
-              \input -> (\x -> case x of
-                Parsing.ParseResultSuccess v0 -> (\x -> case x of
-                  Parsing.ParseResultSuccess v1 -> Parsing.ParseResultSuccess (Parsing.ParseSuccess {
-                    Parsing.parseSuccessValue = (Parsing.parseSuccessValue v0 (Parsing.parseSuccessValue v1)),
-                    Parsing.parseSuccessRemainder = (Parsing.parseSuccessRemainder v1)})
-                  Parsing.ParseResultFailure v1 -> Parsing.ParseResultFailure v1) (Parsing.unParser pa (Parsing.parseSuccessRemainder v0))
-                Parsing.ParseResultFailure v0 -> Parsing.ParseResultFailure v0) (Parsing.unParser pf input)
-      in (Parsing.Parser parse)
--- | Parse something between an opening and closing parser
-between :: Parsing.Parser t0 -> Parsing.Parser t1 -> Parsing.Parser t2 -> Parsing.Parser t2
-between open close p = bind open (\_ -> bind p (\x -> bind close (\_2 -> pure x)))
--- | Sequence two parsers, passing the result of the first to a function that produces the second
-bind :: Parsing.Parser t0 -> (t0 -> Parsing.Parser t1) -> Parsing.Parser t1
-bind pa f =
-
-      let parse =
-              \input -> (\x -> case x of
-                Parsing.ParseResultSuccess v0 -> Parsing.unParser (f (Parsing.parseSuccessValue v0)) (Parsing.parseSuccessRemainder v0)
-                Parsing.ParseResultFailure v0 -> Parsing.ParseResultFailure v0) (Parsing.unParser pa input)
-      in (Parsing.Parser parse)
--- | Parse a specific character (codepoint)
-char :: Int -> Parsing.Parser Int
-char c = satisfy (\x -> Equality.equal x c)
--- | Try each parser in the list until one succeeds
-choice :: [Parsing.Parser t0] -> Parsing.Parser t0
-choice ps = Lists.foldl alt (fail "no choice matched") ps
--- | A parser that succeeds only at the end of input
-eof :: Parsing.Parser ()
-eof =
-    Parsing.Parser (\input -> Logic.ifElse (Equality.equal input "") (Parsing.ParseResultSuccess (Parsing.ParseSuccess {
-      Parsing.parseSuccessValue = (),
-      Parsing.parseSuccessRemainder = ""})) (Parsing.ParseResultFailure (Parsing.ParseError {
-      Parsing.parseErrorMessage = "expected end of input",
-      Parsing.parseErrorRemainder = input})))
--- | A parser that always fails with the given error message
-fail :: String -> Parsing.Parser t0
-fail msg =
-    Parsing.Parser (\input -> Parsing.ParseResultFailure (Parsing.ParseError {
-      Parsing.parseErrorMessage = msg,
-      Parsing.parseErrorRemainder = input}))
--- | Create a parser that defers construction of another parser until parsing time. This is essential for breaking recursive parser definitions.
-lazy :: (() -> Parsing.Parser t0) -> Parsing.Parser t0
-lazy f = Parsing.Parser (\input -> Parsing.unParser (f ()) input)
--- | Parse zero or more occurrences of the given parser
-many :: Parsing.Parser t0 -> Parsing.Parser [t0]
-many p = alt (some p) (pure [])
--- | Apply a function to the result of a parser
-map :: (t0 -> t1) -> Parsing.Parser t0 -> Parsing.Parser t1
-map f pa =
-
-      let parse =
-              \input -> (\x -> case x of
-                Parsing.ParseResultSuccess v0 -> Parsing.ParseResultSuccess (Parsing.ParseSuccess {
-                  Parsing.parseSuccessValue = (f (Parsing.parseSuccessValue v0)),
-                  Parsing.parseSuccessRemainder = (Parsing.parseSuccessRemainder v0)})
-                Parsing.ParseResultFailure v0 -> Parsing.ParseResultFailure v0) (Parsing.unParser pa input)
-      in (Parsing.Parser parse)
--- | Optionally parse something, returning Nothing if it fails
-optional :: Parsing.Parser t0 -> Parsing.Parser (Maybe t0)
-optional p = alt (map Maybes.pure p) (pure Nothing)
--- | A parser that always succeeds with the given value without consuming input
-pure :: t0 -> Parsing.Parser t0
-pure a =
-    Parsing.Parser (\input -> Parsing.ParseResultSuccess (Parsing.ParseSuccess {
-      Parsing.parseSuccessValue = a,
-      Parsing.parseSuccessRemainder = input}))
--- | Run a parser on the given input string
-runParser :: Parsing.Parser t0 -> String -> Parsing.ParseResult t0
-runParser p input = Parsing.unParser p input
--- | Parse a character (codepoint) that satisfies the given predicate
-satisfy :: (Int -> Bool) -> Parsing.Parser Int
-satisfy pred =
-
-      let parse =
-              \input ->
-                let codes = Strings.toList input
-                in (Maybes.maybe (Parsing.ParseResultFailure (Parsing.ParseError {
-                  Parsing.parseErrorMessage = "unexpected end of input",
-                  Parsing.parseErrorRemainder = input})) (\c ->
-                  let rest = Strings.fromList (Lists.drop 1 codes)
-                  in (Logic.ifElse (pred c) (Parsing.ParseResultSuccess (Parsing.ParseSuccess {
-                    Parsing.parseSuccessValue = c,
-                    Parsing.parseSuccessRemainder = rest})) (Parsing.ParseResultFailure (Parsing.ParseError {
-                    Parsing.parseErrorMessage = "character did not satisfy predicate",
-                    Parsing.parseErrorRemainder = input})))) (Lists.maybeHead codes))
-      in (Parsing.Parser parse)
--- | Parse zero or more occurrences separated by a separator
-sepBy :: Parsing.Parser t0 -> Parsing.Parser t1 -> Parsing.Parser [t0]
-sepBy p sep = alt (sepBy1 p sep) (pure [])
--- | Parse one or more occurrences separated by a separator
-sepBy1 :: Parsing.Parser t0 -> Parsing.Parser t1 -> Parsing.Parser [t0]
-sepBy1 p sep = bind p (\x -> bind (many (bind sep (\_ -> p))) (\xs -> pure (Lists.cons x xs)))
--- | Parse one or more occurrences of the given parser
-some :: Parsing.Parser t0 -> Parsing.Parser [t0]
-some p = bind p (\x -> bind (many p) (\xs -> pure (Lists.cons x xs)))
--- | Parse a specific string
-string :: String -> Parsing.Parser String
-string str =
-    Parsing.Parser (\input ->
-      let strCodes = Strings.toList str
-          inputCodes = Strings.toList input
-          strLen = Lists.length strCodes
-          inputPrefix = Lists.take strLen inputCodes
-      in (Logic.ifElse (Equality.equal strCodes inputPrefix) (Parsing.ParseResultSuccess (Parsing.ParseSuccess {
-        Parsing.parseSuccessValue = str,
-        Parsing.parseSuccessRemainder = (Strings.fromList (Lists.drop strLen inputCodes))})) (Parsing.ParseResultFailure (Parsing.ParseError {
-        Parsing.parseErrorMessage = (Strings.cat2 "expected: " str),
-        Parsing.parseErrorRemainder = input}))))
diff --git a/src/main/haskell/Hydra/Parsing.hs b/src/main/haskell/Hydra/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Parsing.hs
+++ /dev/null
@@ -1,44 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Parser combinator types for text parsing
-
-module Hydra.Parsing where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | An error which occurred while parsing
-data ParseError =
-  ParseError {
-    -- | An error message
-    parseErrorMessage :: String,
-    -- | The remaining input at the point of failure
-    parseErrorRemainder :: String}
-  deriving (Eq, Ord, Read, Show)
-_ParseError = Core.Name "hydra.parsing.ParseError"
-_ParseError_message = Core.Name "message"
-_ParseError_remainder = Core.Name "remainder"
--- | The result of a parse operation
-data ParseResult a =
-  -- | A successful parse, with a value and the remaining unparsed input
-  ParseResultSuccess (ParseSuccess a) |
-  -- | A failed parse, with an error message and the remaining input
-  ParseResultFailure ParseError
-  deriving (Eq, Ord, Read, Show)
-_ParseResult = Core.Name "hydra.parsing.ParseResult"
-_ParseResult_success = Core.Name "success"
-_ParseResult_failure = Core.Name "failure"
--- | A successful parse result
-data ParseSuccess a =
-  ParseSuccess {
-    -- | The parsed value
-    parseSuccessValue :: a,
-    -- | The remaining unparsed input
-    parseSuccessRemainder :: String}
-  deriving (Eq, Ord, Read, Show)
-_ParseSuccess = Core.Name "hydra.parsing.ParseSuccess"
-_ParseSuccess_value = Core.Name "value"
-_ParseSuccess_remainder = Core.Name "remainder"
--- | A parser which consumes characters from a string and produces a value
-newtype Parser a =
-  Parser {
-    unParser :: (String -> ParseResult a)}
-_Parser = Core.Name "hydra.parsing.Parser"
diff --git a/src/main/haskell/Hydra/Paths.hs b/src/main/haskell/Hydra/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Paths.hs
+++ /dev/null
@@ -1,219 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A model for subterm and subtype access patterns
-
-module Hydra.Paths where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | An edge in a subterm graph, connecting two nodes via a path
-data SubtermEdge =
-  SubtermEdge {
-    -- | The source node of the edge
-    subtermEdgeSource :: SubtermNode,
-    -- | The subterm path connecting source to target
-    subtermEdgePath :: SubtermPath,
-    -- | The target node of the edge
-    subtermEdgeTarget :: SubtermNode}
-  deriving (Eq, Ord, Read, Show)
-_SubtermEdge = Core.Name "hydra.paths.SubtermEdge"
-_SubtermEdge_source = Core.Name "source"
-_SubtermEdge_path = Core.Name "path"
-_SubtermEdge_target = Core.Name "target"
--- | A graph of subterm nodes and edges, representing term access patterns
-data SubtermGraph =
-  SubtermGraph {
-    -- | All nodes in the graph
-    subtermGraphNodes :: [SubtermNode],
-    -- | All edges in the graph
-    subtermGraphEdges :: [SubtermEdge]}
-  deriving (Eq, Ord, Read, Show)
-_SubtermGraph = Core.Name "hydra.paths.SubtermGraph"
-_SubtermGraph_nodes = Core.Name "nodes"
-_SubtermGraph_edges = Core.Name "edges"
--- | A node in a subterm graph, representing a term or subterm
-data SubtermNode =
-  SubtermNode {
-    -- | The qualified name of the term
-    subtermNodeName :: Core.Name,
-    -- | A human-readable label for the node
-    subtermNodeLabel :: String,
-    -- | A unique identifier for the node
-    subtermNodeId :: String}
-  deriving (Eq, Ord, Read, Show)
-_SubtermNode = Core.Name "hydra.paths.SubtermNode"
-_SubtermNode_name = Core.Name "name"
-_SubtermNode_label = Core.Name "label"
-_SubtermNode_id = Core.Name "id"
--- | A sequence of subterm steps forming a path through a term
-newtype SubtermPath =
-  SubtermPath {
-    unSubtermPath :: [SubtermStep]}
-  deriving (Eq, Ord, Read, Show)
-_SubtermPath = Core.Name "hydra.paths.SubtermPath"
--- | A function which maps from a term to a particular immediate subterm
-data SubtermStep =
-  -- | Access the body of an annotated term
-  SubtermStepAnnotatedBody |
-  -- | Access the function of an application term
-  SubtermStepApplicationFunction |
-  -- | Access the argument of an application term
-  SubtermStepApplicationArgument |
-  -- | Access the body of a lambda term
-  SubtermStepLambdaBody |
-  -- | Access the default case of a union elimination
-  SubtermStepUnionCasesDefault |
-  -- | Access a specific branch of a union elimination by field name
-  SubtermStepUnionCasesBranch Core.Name |
-  -- | Access the body of a let term
-  SubtermStepLetBody |
-  -- | Access a specific binding in a let term by variable name
-  SubtermStepLetBinding Core.Name |
-  -- | Access an element of a list by index
-  SubtermStepListElement Int |
-  -- | Access a key in a map by index
-  SubtermStepMapKey Int |
-  -- | Access a value in a map by index
-  SubtermStepMapValue Int |
-  -- | Access the term inside a Just value
-  SubtermStepMaybeTerm |
-  -- | Access an element of a product (tuple) by index
-  SubtermStepProductTerm Int |
-  -- | Access a field of a record by field name
-  SubtermStepRecordField Core.Name |
-  -- | Access an element of a set by index
-  SubtermStepSetElement Int |
-  -- | Access the term inside a sum variant
-  SubtermStepSumTerm |
-  -- | Access the body of a type lambda term
-  SubtermStepTypeLambdaBody |
-  -- | Access the term being applied to a type
-  SubtermStepTypeApplicationTerm |
-  -- | Access the term inside a union injection
-  SubtermStepInjectionTerm |
-  -- | Access the term inside a wrapped term
-  SubtermStepWrappedTerm
-  deriving (Eq, Ord, Read, Show)
-_SubtermStep = Core.Name "hydra.paths.SubtermStep"
-_SubtermStep_annotatedBody = Core.Name "annotatedBody"
-_SubtermStep_applicationFunction = Core.Name "applicationFunction"
-_SubtermStep_applicationArgument = Core.Name "applicationArgument"
-_SubtermStep_lambdaBody = Core.Name "lambdaBody"
-_SubtermStep_unionCasesDefault = Core.Name "unionCasesDefault"
-_SubtermStep_unionCasesBranch = Core.Name "unionCasesBranch"
-_SubtermStep_letBody = Core.Name "letBody"
-_SubtermStep_letBinding = Core.Name "letBinding"
-_SubtermStep_listElement = Core.Name "listElement"
-_SubtermStep_mapKey = Core.Name "mapKey"
-_SubtermStep_mapValue = Core.Name "mapValue"
-_SubtermStep_maybeTerm = Core.Name "maybeTerm"
-_SubtermStep_productTerm = Core.Name "productTerm"
-_SubtermStep_recordField = Core.Name "recordField"
-_SubtermStep_setElement = Core.Name "setElement"
-_SubtermStep_sumTerm = Core.Name "sumTerm"
-_SubtermStep_typeLambdaBody = Core.Name "typeLambdaBody"
-_SubtermStep_typeApplicationTerm = Core.Name "typeApplicationTerm"
-_SubtermStep_injectionTerm = Core.Name "injectionTerm"
-_SubtermStep_wrappedTerm = Core.Name "wrappedTerm"
--- | An edge in a subtype graph, connecting two nodes via a path
-data SubtypeEdge =
-  SubtypeEdge {
-    -- | The source node of the edge
-    subtypeEdgeSource :: SubtypeNode,
-    -- | The subtype path connecting source to target
-    subtypeEdgePath :: SubtypePath,
-    -- | The target node of the edge
-    subtypeEdgeTarget :: SubtypeNode}
-  deriving (Eq, Ord, Read, Show)
-_SubtypeEdge = Core.Name "hydra.paths.SubtypeEdge"
-_SubtypeEdge_source = Core.Name "source"
-_SubtypeEdge_path = Core.Name "path"
-_SubtypeEdge_target = Core.Name "target"
--- | A graph of subtype nodes and edges, representing type access patterns
-data SubtypeGraph =
-  SubtypeGraph {
-    -- | All nodes in the graph
-    subtypeGraphNodes :: [SubtypeNode],
-    -- | All edges in the graph
-    subtypeGraphEdges :: [SubtypeEdge]}
-  deriving (Eq, Ord, Read, Show)
-_SubtypeGraph = Core.Name "hydra.paths.SubtypeGraph"
-_SubtypeGraph_nodes = Core.Name "nodes"
-_SubtypeGraph_edges = Core.Name "edges"
--- | A node in a subtype graph, representing a type or subtype
-data SubtypeNode =
-  SubtypeNode {
-    -- | The qualified name of the type
-    subtypeNodeName :: Core.Name,
-    -- | A human-readable label for the node
-    subtypeNodeLabel :: String,
-    -- | A unique identifier for the node
-    subtypeNodeId :: String}
-  deriving (Eq, Ord, Read, Show)
-_SubtypeNode = Core.Name "hydra.paths.SubtypeNode"
-_SubtypeNode_name = Core.Name "name"
-_SubtypeNode_label = Core.Name "label"
-_SubtypeNode_id = Core.Name "id"
--- | A sequence of subtype steps forming a path through a type
-newtype SubtypePath =
-  SubtypePath {
-    unSubtypePath :: [SubtypeStep]}
-  deriving (Eq, Ord, Read, Show)
-_SubtypePath = Core.Name "hydra.paths.SubtypePath"
--- | A function which maps from a type to a particular immediate subtype
-data SubtypeStep =
-  -- | Access the body of an annotated type
-  SubtypeStepAnnotatedBody |
-  -- | Access the function of an application type
-  SubtypeStepApplicationFunction |
-  -- | Access the argument of an application type
-  SubtypeStepApplicationArgument |
-  -- | Access the left type of an either type
-  SubtypeStepEitherLeft |
-  -- | Access the right type of an either type
-  SubtypeStepEitherRight |
-  -- | Access the body of a universally quantified type
-  SubtypeStepForallBody |
-  -- | Access the domain type of a function type
-  SubtypeStepFunctionDomain |
-  -- | Access the codomain type of a function type
-  SubtypeStepFunctionCodomain |
-  -- | Access the element type of a list type
-  SubtypeStepListElement |
-  -- | Access the key type of a map type
-  SubtypeStepMapKeys |
-  -- | Access the value type of a map type
-  SubtypeStepMapValues |
-  -- | Access the element type of an optional type
-  SubtypeStepMaybeElement |
-  -- | Access the first type of a pair type
-  SubtypeStepPairFirst |
-  -- | Access the second type of a pair type
-  SubtypeStepPairSecond |
-  -- | Access a field type of a record type by field name
-  SubtypeStepRecordField Core.Name |
-  -- | Access the element type of a set type
-  SubtypeStepSetElement |
-  -- | Access a field type of a union type by field name
-  SubtypeStepUnionField Core.Name |
-  -- | Access the type inside a wrapped type
-  SubtypeStepWrappedType
-  deriving (Eq, Ord, Read, Show)
-_SubtypeStep = Core.Name "hydra.paths.SubtypeStep"
-_SubtypeStep_annotatedBody = Core.Name "annotatedBody"
-_SubtypeStep_applicationFunction = Core.Name "applicationFunction"
-_SubtypeStep_applicationArgument = Core.Name "applicationArgument"
-_SubtypeStep_eitherLeft = Core.Name "eitherLeft"
-_SubtypeStep_eitherRight = Core.Name "eitherRight"
-_SubtypeStep_forallBody = Core.Name "forallBody"
-_SubtypeStep_functionDomain = Core.Name "functionDomain"
-_SubtypeStep_functionCodomain = Core.Name "functionCodomain"
-_SubtypeStep_listElement = Core.Name "listElement"
-_SubtypeStep_mapKeys = Core.Name "mapKeys"
-_SubtypeStep_mapValues = Core.Name "mapValues"
-_SubtypeStep_maybeElement = Core.Name "maybeElement"
-_SubtypeStep_pairFirst = Core.Name "pairFirst"
-_SubtypeStep_pairSecond = Core.Name "pairSecond"
-_SubtypeStep_recordField = Core.Name "recordField"
-_SubtypeStep_setElement = Core.Name "setElement"
-_SubtypeStep_unionField = Core.Name "unionField"
-_SubtypeStep_wrappedType = Core.Name "wrappedType"
diff --git a/src/main/haskell/Hydra/Pegasus/Coder.hs b/src/main/haskell/Hydra/Pegasus/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pegasus/Coder.hs
+++ /dev/null
@@ -1,265 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Pegasus PDL code generator: converts Hydra modules to PDL schema files
-
-module Hydra.Pegasus.Coder where
-
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Core as Core
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Pegasus.Pdl as Pdl
-import qualified Hydra.Pegasus.Serde as Serde
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
--- | Construct PDL schema files from type definitions, with topological sorting and cycle detection
-constructModule :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Packaging.Module -> [Packaging.TypeDefinition] -> Either Errors.Error (M.Map String Pdl.SchemaFile)
-constructModule cx g aliases mod typeDefs =
-
-      let groups = Dependencies.topologicalSortTypeDefinitions typeDefs
-      in (Maybes.cases (Lists.find (\grp -> Equality.gt (Lists.length grp) 1) groups) (
-        let sortedDefs = Lists.concat groups
-        in (Eithers.bind (Eithers.mapList (\typeDef -> typeToSchema cx g aliases mod typeDef) sortedDefs) (\schemas -> Right (Maps.fromList (Lists.map (toPair mod aliases) schemas))))) (\cycle -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "types form a cycle (unsupported in PDL): [" (Strings.cat2 (Strings.intercalate ", " (Lists.map (\td -> Core.unName (Packaging.typeDefinitionName td)) cycle)) "]"))))))
-
--- | Create PDL annotations from an optional doc string
-doc :: Maybe String -> Pdl.Annotations
-doc s =
-    Pdl.Annotations {
-      Pdl.annotationsDoc = s,
-      Pdl.annotationsDeprecated = False}
-
-encode :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.Type -> Either Errors.Error Pdl.Schema
-encode cx g aliases t =
-    case (Strip.deannotateType t) of
-      Core.TypeRecord v0 -> Logic.ifElse (Lists.null v0) (encode cx g aliases (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Eithers.bind (encodeType cx g aliases t) (\res -> Eithers.either (\schema -> Right schema) (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "type resolved to an unsupported nested named schema: " (ShowCore.type_ t))))) res))
-      _ -> Eithers.bind (encodeType cx g aliases t) (\res -> Eithers.either (\schema -> Right schema) (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "type resolved to an unsupported nested named schema: " (ShowCore.type_ t))))) res)
-
-encodeEnumField :: t0 -> Graph.Graph -> Core.FieldType -> Either Errors.Error Pdl.EnumField
-encodeEnumField cx g ft =
-
-      let name = Core.fieldTypeName ft
-          typ = Core.fieldTypeType ft
-      in (Eithers.bind (getAnns cx g typ) (\anns -> Right (Pdl.EnumField {
-        Pdl.enumFieldName = (Pdl.EnumFieldName (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake (Core.unName name))),
-        Pdl.enumFieldAnnotations = anns})))
-
-encodePossiblyOptionalType :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.Type -> Either Errors.Error (Pdl.Schema, Bool)
-encodePossiblyOptionalType cx g aliases typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeMaybe v0 -> Eithers.bind (encode cx g aliases v0) (\t -> Right (t, True))
-      Core.TypeRecord _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeUnion _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeLiteral _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeList _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeMap _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeSet _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeVariable _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeWrap _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeEither _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypePair _ -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeVoid -> Eithers.bind (encode cx g aliases typ) (\t -> Right (t, False))
-      Core.TypeAnnotated v0 -> encodePossiblyOptionalType cx g aliases (Core.annotatedTypeBody v0)
-
-encodeRecordField :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.FieldType -> Either Errors.Error Pdl.RecordField
-encodeRecordField cx g aliases ft =
-
-      let name = Core.fieldTypeName ft
-          typ = Core.fieldTypeType ft
-      in (Eithers.bind (getAnns cx g typ) (\anns -> Eithers.bind (encodePossiblyOptionalType cx g aliases typ) (\optResult ->
-        let schema = Pairs.first optResult
-            optional = Pairs.second optResult
-        in (Right (Pdl.RecordField {
-          Pdl.recordFieldName = (Pdl.FieldName (Core.unName name)),
-          Pdl.recordFieldValue = schema,
-          Pdl.recordFieldOptional = optional,
-          Pdl.recordFieldDefault = Nothing,
-          Pdl.recordFieldAnnotations = anns})))))
-
--- | Encode a Hydra type as either a PDL Schema (Left) or a PDL NamedSchemaType (Right)
-encodeType :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.Type -> Either Errors.Error (Either Pdl.Schema Pdl.NamedSchemaType)
-encodeType cx g aliases typ =
-    case typ of
-      Core.TypeAnnotated v0 -> encodeType cx g aliases (Core.annotatedTypeBody v0)
-      Core.TypeEither v0 -> Eithers.bind (encode cx g aliases (Core.eitherTypeLeft v0)) (\leftSchema -> Eithers.bind (encode cx g aliases (Core.eitherTypeRight v0)) (\rightSchema ->
-        let leftMember =
-                Pdl.UnionMember {
-                  Pdl.unionMemberAlias = (Just (Pdl.FieldName "left")),
-                  Pdl.unionMemberValue = leftSchema,
-                  Pdl.unionMemberAnnotations = noAnnotations}
-            rightMember =
-                    Pdl.UnionMember {
-                      Pdl.unionMemberAlias = (Just (Pdl.FieldName "right")),
-                      Pdl.unionMemberValue = rightSchema,
-                      Pdl.unionMemberAnnotations = noAnnotations}
-        in (Right (Left (Pdl.SchemaUnion (Pdl.UnionSchema [
-          leftMember,
-          rightMember]))))))
-      Core.TypeList v0 -> Eithers.bind (encode cx g aliases v0) (\inner -> Right (Left (Pdl.SchemaArray inner)))
-      Core.TypeLiteral v0 -> case v0 of
-        Core.LiteralTypeBinary -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeBytes))
-        Core.LiteralTypeBoolean -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeBoolean))
-        Core.LiteralTypeFloat v1 -> case v1 of
-          Core.FloatTypeFloat32 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeFloat))
-          Core.FloatTypeFloat64 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeDouble))
-          _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "float32 or float64" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))
-        Core.LiteralTypeInteger v1 -> case v1 of
-          Core.IntegerTypeInt32 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeInt))
-          Core.IntegerTypeInt64 -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeLong))
-          _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "int32 or int64" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))
-        Core.LiteralTypeString -> Right (Left (Pdl.SchemaPrimitive Pdl.PrimitiveTypeString))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "PDL-supported literal type" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))
-      Core.TypeMap v0 -> Eithers.bind (encode cx g aliases (Core.mapTypeValues v0)) (\inner -> Right (Left (Pdl.SchemaMap inner)))
-      Core.TypePair v0 -> Eithers.bind (encode cx g aliases (Core.pairTypeFirst v0)) (\firstSchema -> Eithers.bind (encode cx g aliases (Core.pairTypeSecond v0)) (\secondSchema ->
-        let firstField =
-                Pdl.RecordField {
-                  Pdl.recordFieldName = (Pdl.FieldName "first"),
-                  Pdl.recordFieldValue = firstSchema,
-                  Pdl.recordFieldOptional = False,
-                  Pdl.recordFieldDefault = Nothing,
-                  Pdl.recordFieldAnnotations = noAnnotations}
-            secondField =
-                    Pdl.RecordField {
-                      Pdl.recordFieldName = (Pdl.FieldName "second"),
-                      Pdl.recordFieldValue = secondSchema,
-                      Pdl.recordFieldOptional = False,
-                      Pdl.recordFieldDefault = Nothing,
-                      Pdl.recordFieldAnnotations = noAnnotations}
-        in (Right (Right (Pdl.NamedSchemaTypeRecord (Pdl.RecordSchema {
-          Pdl.recordSchemaFields = [
-            firstField,
-            secondField],
-          Pdl.recordSchemaIncludes = []}))))))
-      Core.TypeSet v0 -> Eithers.bind (encode cx g aliases v0) (\inner -> Right (Left (Pdl.SchemaArray inner)))
-      Core.TypeVariable v0 -> Right (Left (Pdl.SchemaNamed (pdlNameForElement aliases True v0)))
-      Core.TypeWrap v0 -> encodeType cx g aliases v0
-      Core.TypeMaybe _ -> Left (Errors.ErrorOther (Errors.OtherError "optionals unexpected at top level"))
-      Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (encodeRecordField cx g aliases) v0) (\rfields -> Right (Right (Pdl.NamedSchemaTypeRecord (Pdl.RecordSchema {
-        Pdl.recordSchemaFields = rfields,
-        Pdl.recordSchemaIncludes = []}))))
-      Core.TypeUnion v0 -> Logic.ifElse (Lists.foldl (\b -> \t -> Logic.and b (Equality.equal (Strip.deannotateType t) Core.TypeUnit)) True (Lists.map (\f -> Core.fieldTypeType f) v0)) (Eithers.bind (Eithers.mapList (encodeEnumField cx g) v0) (\fs -> Right (Right (Pdl.NamedSchemaTypeEnum (Pdl.EnumSchema {
-        Pdl.enumSchemaFields = fs}))))) (Eithers.bind (Eithers.mapList (encodeUnionField cx g aliases) v0) (\members -> Right (Left (Pdl.SchemaUnion (Pdl.UnionSchema members)))))
-      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Expected " (Strings.cat2 "PDL-supported type" (Strings.cat2 ", found: " (ShowCore.type_ typ))))))
-
-encodeUnionField :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> Core.FieldType -> Either Errors.Error Pdl.UnionMember
-encodeUnionField cx g aliases ft =
-
-      let name = Core.fieldTypeName ft
-          typ = Core.fieldTypeType ft
-      in (Eithers.bind (getAnns cx g typ) (\anns -> Eithers.bind (encodePossiblyOptionalType cx g aliases typ) (\optResult ->
-        let s = Pairs.first optResult
-            optional = Pairs.second optResult
-            schema =
-                    Logic.ifElse optional (Pdl.SchemaUnion (Pdl.UnionSchema (Lists.map (\ms -> simpleUnionMember ms) [
-                      Pdl.SchemaNull,
-                      s]))) s
-        in (Right (Pdl.UnionMember {
-          Pdl.unionMemberAlias = (Just (Pdl.FieldName (Core.unName name))),
-          Pdl.unionMemberValue = schema,
-          Pdl.unionMemberAnnotations = anns})))))
-
-getAnns :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error Pdl.Annotations
-getAnns cx g typ = Eithers.bind (Annotations.getTypeDescription cx g typ) (\r -> Right (doc r))
-
--- | Compute import aliases for a module's dependencies
-importAliasesForModule :: t0 -> Graph.Graph -> Packaging.Module -> Either Errors.Error (M.Map Packaging.Namespace String)
-importAliasesForModule cx g mod =
-    Eithers.bind (Analysis.moduleDependencyNamespaces cx g False True True False mod) (\nss -> Right (Maps.fromList (Lists.map (\ns_ -> (ns_, (slashesToDots (Packaging.unNamespace ns_)))) (Sets.toList nss))))
-
--- | Convert a Hydra module to a map of file paths to PDL schema strings
-moduleToPdl :: Packaging.Module -> [Packaging.Definition] -> t0 -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToPdl mod defs cx g =
-    Eithers.bind (moduleToPegasusSchemas cx g mod defs) (\files -> Right (Maps.fromList (Lists.map (\pair -> (Pairs.first pair, (Serialization.printExpr (Serialization.parenthesize (Serde.exprSchemaFile (Pairs.second pair)))))) (Maps.toList files))))
-
--- | Convert a Hydra module and its definitions to PDL schema files
-moduleToPegasusSchemas :: t0 -> Graph.Graph -> Packaging.Module -> [Packaging.Definition] -> Either Errors.Error (M.Map String Pdl.SchemaFile)
-moduleToPegasusSchemas cx g mod defs =
-
-      let partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-      in (Eithers.bind (importAliasesForModule cx g mod) (\aliases -> constructModule cx g aliases mod typeDefs))
-
--- | Empty PDL annotations
-noAnnotations :: Pdl.Annotations
-noAnnotations =
-    Pdl.Annotations {
-      Pdl.annotationsDoc = Nothing,
-      Pdl.annotationsDeprecated = False}
-
--- | Convert a Hydra element name to a PDL qualified name
-pdlNameForElement :: M.Map Packaging.Namespace String -> Bool -> Core.Name -> Pdl.QualifiedName
-pdlNameForElement aliases withNs name =
-
-      let qn = Names.qualifyName name
-          ns_ = Packaging.qualifiedNameNamespace qn
-          local = Packaging.qualifiedNameLocal qn
-          alias = Maybes.bind ns_ (\n -> Maps.lookup n aliases)
-      in Pdl.QualifiedName {
-        Pdl.qualifiedNameName = (Pdl.Name local),
-        Pdl.qualifiedNameNamespace = (Logic.ifElse withNs (Maybes.map (\a -> Pdl.Namespace a) alias) Nothing)}
-
--- | Convert a module's namespace to a PDL namespace
-pdlNameForModule :: Packaging.Module -> Pdl.Namespace
-pdlNameForModule mod = Pdl.Namespace (slashesToDots (Packaging.unNamespace (Packaging.moduleNamespace mod)))
-
--- | Create a simple union member without an alias
-simpleUnionMember :: Pdl.Schema -> Pdl.UnionMember
-simpleUnionMember schema =
-    Pdl.UnionMember {
-      Pdl.unionMemberAlias = Nothing,
-      Pdl.unionMemberValue = schema,
-      Pdl.unionMemberAnnotations = noAnnotations}
-
--- | Replace all forward slashes with dots in a string
-slashesToDots :: String -> String
-slashesToDots s = Strings.intercalate "." (Strings.splitOn "/" s)
-
-toPair :: Packaging.Module -> t0 -> (Pdl.NamedSchema, [Pdl.QualifiedName]) -> (String, Pdl.SchemaFile)
-toPair mod aliases schemaPair =
-
-      let schema = Pairs.first schemaPair
-          imports = Pairs.second schemaPair
-          ns_ = pdlNameForModule mod
-          local = Pdl.unName (Pdl.qualifiedNameName (Pdl.namedSchemaQualifiedName schema))
-          path =
-                  Names.namespaceToFilePath Util.CaseConventionCamel (Packaging.FileExtension "pdl") (Packaging.Namespace (Strings.cat2 (Packaging.unNamespace (Packaging.moduleNamespace mod)) (Strings.cat2 "/" local)))
-      in (path, Pdl.SchemaFile {
-        Pdl.schemaFileNamespace = ns_,
-        Pdl.schemaFilePackage = Nothing,
-        Pdl.schemaFileImports = imports,
-        Pdl.schemaFileSchemas = [
-          schema]})
-
-typeToSchema :: t0 -> Graph.Graph -> M.Map Packaging.Namespace String -> t1 -> Packaging.TypeDefinition -> Either Errors.Error (Pdl.NamedSchema, [t2])
-typeToSchema cx g aliases mod typeDef =
-
-      let typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme typeDef)
-      in (Eithers.bind (encodeType cx g aliases typ) (\res ->
-        let ptype = Eithers.either (\schema -> Pdl.NamedSchemaTypeTyperef schema) (\t -> t) res
-        in (Eithers.bind (Annotations.getTypeDescription cx g typ) (\descr ->
-          let anns = doc descr
-              qname = pdlNameForElement aliases False (Packaging.typeDefinitionName typeDef)
-          in (Right (Pdl.NamedSchema {
-            Pdl.namedSchemaQualifiedName = qname,
-            Pdl.namedSchemaType = ptype,
-            Pdl.namedSchemaAnnotations = anns}, []))))))
diff --git a/src/main/haskell/Hydra/Pegasus/Language.hs b/src/main/haskell/Hydra/Pegasus/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pegasus/Language.hs
+++ /dev/null
@@ -1,72 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for LinkedIn Pegasus (PDL)
-
-module Hydra.Pegasus.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Language constraints for LinkedIn Pegasus (PDL)
-pdlLanguage :: Coders.Language
-pdlLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.pegasus.pdl"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants = Sets.empty
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantEither,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantPair,
-          Variants.TermVariantSet,
-          Variants.TermVariantWrap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord,
-          Variants.TermVariantInject]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantWrap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantVariable]
-    typePredicate = \_ -> True
diff --git a/src/main/haskell/Hydra/Pegasus/Pdl.hs b/src/main/haskell/Hydra/Pegasus/Pdl.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pegasus/Pdl.hs
+++ /dev/null
@@ -1,272 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for PDL (Pegasus Data Language) schemas. Based on the specification at:
--- |   https://linkedin.github.io/rest.li/pdl_schema
-
-module Hydra.Pegasus.Pdl where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Annotations which can be applied to record fields, aliased union members, enum symbols, or named schemas
-data Annotations =
-  Annotations {
-    annotationsDoc :: (Maybe String),
-    annotationsDeprecated :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Annotations = Core.Name "hydra.pegasus.pdl.Annotations"
-
-_Annotations_doc = Core.Name "doc"
-
-_Annotations_deprecated = Core.Name "deprecated"
-
-data EnumField =
-  EnumField {
-    enumFieldName :: EnumFieldName,
-    enumFieldAnnotations :: Annotations}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumField = Core.Name "hydra.pegasus.pdl.EnumField"
-
-_EnumField_name = Core.Name "name"
-
-_EnumField_annotations = Core.Name "annotations"
-
-newtype EnumFieldName =
-  EnumFieldName {
-    unEnumFieldName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumFieldName = Core.Name "hydra.pegasus.pdl.EnumFieldName"
-
-data EnumSchema =
-  EnumSchema {
-    enumSchemaFields :: [EnumField]}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumSchema = Core.Name "hydra.pegasus.pdl.EnumSchema"
-
-_EnumSchema_fields = Core.Name "fields"
-
-newtype FieldName =
-  FieldName {
-    unFieldName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldName = Core.Name "hydra.pegasus.pdl.FieldName"
-
-data NamedSchema =
-  NamedSchema {
-    namedSchemaQualifiedName :: QualifiedName,
-    namedSchemaType :: NamedSchemaType,
-    namedSchemaAnnotations :: Annotations}
-  deriving (Eq, Ord, Read, Show)
-
-_NamedSchema = Core.Name "hydra.pegasus.pdl.NamedSchema"
-
-_NamedSchema_qualifiedName = Core.Name "qualifiedName"
-
-_NamedSchema_type = Core.Name "type"
-
-_NamedSchema_annotations = Core.Name "annotations"
-
-data NamedSchemaType =
-  NamedSchemaTypeRecord RecordSchema |
-  NamedSchemaTypeEnum EnumSchema |
-  NamedSchemaTypeTyperef Schema
-  deriving (Eq, Ord, Read, Show)
-
-_NamedSchemaType = Core.Name "hydra.pegasus.pdl.NamedSchemaType"
-
-_NamedSchemaType_record = Core.Name "record"
-
-_NamedSchemaType_enum = Core.Name "enum"
-
-_NamedSchemaType_typeref = Core.Name "typeref"
-
-newtype Name =
-  Name {
-    unName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Name = Core.Name "hydra.pegasus.pdl.Name"
-
-newtype Namespace =
-  Namespace {
-    unNamespace :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Namespace = Core.Name "hydra.pegasus.pdl.Namespace"
-
-newtype Package =
-  Package {
-    unPackage :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Package = Core.Name "hydra.pegasus.pdl.Package"
-
-data PrimitiveType =
-  PrimitiveTypeBoolean  |
-  PrimitiveTypeBytes  |
-  PrimitiveTypeDouble  |
-  PrimitiveTypeFloat  |
-  PrimitiveTypeInt  |
-  PrimitiveTypeLong  |
-  PrimitiveTypeString
-  deriving (Eq, Ord, Read, Show)
-
-_PrimitiveType = Core.Name "hydra.pegasus.pdl.PrimitiveType"
-
-_PrimitiveType_boolean = Core.Name "boolean"
-
-_PrimitiveType_bytes = Core.Name "bytes"
-
-_PrimitiveType_double = Core.Name "double"
-
-_PrimitiveType_float = Core.Name "float"
-
-_PrimitiveType_int = Core.Name "int"
-
-_PrimitiveType_long = Core.Name "long"
-
-_PrimitiveType_string = Core.Name "string"
-
-newtype PropertyKey =
-  PropertyKey {
-    unPropertyKey :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyKey = Core.Name "hydra.pegasus.pdl.PropertyKey"
-
-data Property =
-  Property {
-    propertyKey :: PropertyKey,
-    propertyValue :: (Maybe Model.Value)}
-  deriving (Eq, Ord, Read, Show)
-
-_Property = Core.Name "hydra.pegasus.pdl.Property"
-
-_Property_key = Core.Name "key"
-
-_Property_value = Core.Name "value"
-
-data QualifiedName =
-  QualifiedName {
-    qualifiedNameName :: Name,
-    qualifiedNameNamespace :: (Maybe Namespace)}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedName = Core.Name "hydra.pegasus.pdl.QualifiedName"
-
-_QualifiedName_name = Core.Name "name"
-
-_QualifiedName_namespace = Core.Name "namespace"
-
--- | Note: the default value for an enum-valued must be one of the enumerated string symbols
-data RecordField =
-  RecordField {
-    recordFieldName :: FieldName,
-    recordFieldValue :: Schema,
-    recordFieldOptional :: Bool,
-    recordFieldDefault :: (Maybe Model.Value),
-    recordFieldAnnotations :: Annotations}
-  deriving (Eq, Ord, Read, Show)
-
-_RecordField = Core.Name "hydra.pegasus.pdl.RecordField"
-
-_RecordField_name = Core.Name "name"
-
-_RecordField_value = Core.Name "value"
-
-_RecordField_optional = Core.Name "optional"
-
-_RecordField_default = Core.Name "default"
-
-_RecordField_annotations = Core.Name "annotations"
-
--- | Note: all included schemas must be record schemas
-data RecordSchema =
-  RecordSchema {
-    recordSchemaFields :: [RecordField],
-    recordSchemaIncludes :: [NamedSchema]}
-  deriving (Eq, Ord, Read, Show)
-
-_RecordSchema = Core.Name "hydra.pegasus.pdl.RecordSchema"
-
-_RecordSchema_fields = Core.Name "fields"
-
-_RecordSchema_includes = Core.Name "includes"
-
-data Schema =
-  SchemaArray Schema |
-  SchemaFixed Int |
-  SchemaInline NamedSchema |
-  SchemaMap Schema |
-  SchemaNamed QualifiedName |
-  SchemaNull  |
-  SchemaPrimitive PrimitiveType |
-  SchemaUnion UnionSchema
-  deriving (Eq, Ord, Read, Show)
-
-_Schema = Core.Name "hydra.pegasus.pdl.Schema"
-
-_Schema_array = Core.Name "array"
-
-_Schema_fixed = Core.Name "fixed"
-
-_Schema_inline = Core.Name "inline"
-
-_Schema_map = Core.Name "map"
-
-_Schema_named = Core.Name "named"
-
-_Schema_null = Core.Name "null"
-
-_Schema_primitive = Core.Name "primitive"
-
-_Schema_union = Core.Name "union"
-
-data SchemaFile =
-  SchemaFile {
-    schemaFileNamespace :: Namespace,
-    schemaFilePackage :: (Maybe Package),
-    schemaFileImports :: [QualifiedName],
-    schemaFileSchemas :: [NamedSchema]}
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaFile = Core.Name "hydra.pegasus.pdl.SchemaFile"
-
-_SchemaFile_namespace = Core.Name "namespace"
-
-_SchemaFile_package = Core.Name "package"
-
-_SchemaFile_imports = Core.Name "imports"
-
-_SchemaFile_schemas = Core.Name "schemas"
-
--- | Note: annotations are only available for aliased members
-data UnionMember =
-  UnionMember {
-    unionMemberAlias :: (Maybe FieldName),
-    unionMemberValue :: Schema,
-    unionMemberAnnotations :: Annotations}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionMember = Core.Name "hydra.pegasus.pdl.UnionMember"
-
-_UnionMember_alias = Core.Name "alias"
-
-_UnionMember_value = Core.Name "value"
-
-_UnionMember_annotations = Core.Name "annotations"
-
--- | Note: unions are not allowed as member types of other unions
-newtype UnionSchema =
-  UnionSchema {
-    unUnionSchema :: [UnionMember]}
-  deriving (Eq, Ord, Read, Show)
-
-_UnionSchema = Core.Name "hydra.pegasus.pdl.UnionSchema"
diff --git a/src/main/haskell/Hydra/Pegasus/Serde.hs b/src/main/haskell/Hydra/Pegasus/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pegasus/Serde.hs
+++ /dev/null
@@ -1,164 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting Pegasus PDL AST to abstract expressions
-
-module Hydra.Pegasus.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pegasus.Pdl as Pdl
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Convert PDL annotations to an optional expression (doc comment)
-exprAnnotations :: Pdl.Annotations -> Maybe Ast.Expr
-exprAnnotations anns =
-
-      let d = Pdl.annotationsDoc anns
-      in (Maybes.map (\s -> Serialization.cst (Formatting.javaStyleComment s)) d)
-
--- | Convert a PDL enum field to an expression
-exprEnumField :: Pdl.EnumField -> Ast.Expr
-exprEnumField ef =
-
-      let name = Pdl.unEnumFieldName (Pdl.enumFieldName ef)
-          anns = Pdl.enumFieldAnnotations ef
-      in (withAnnotations anns (Serialization.cst name))
-
--- | Convert a qualified name to an import expression
-exprImport :: Pdl.QualifiedName -> Ast.Expr
-exprImport qn =
-    Serialization.spaceSep [
-      Serialization.cst "import",
-      (exprQualifiedName qn)]
-
--- | Convert a named schema to an expression
-exprNamedSchema :: Pdl.NamedSchema -> Ast.Expr
-exprNamedSchema ns =
-
-      let qn = Pdl.namedSchemaQualifiedName ns
-          t = Pdl.namedSchemaType ns
-          anns = Pdl.namedSchemaAnnotations ns
-      in (withAnnotations anns (case t of
-        Pdl.NamedSchemaTypeRecord v0 ->
-          let fields = Pdl.recordSchemaFields v0
-          in (Serialization.spaceSep [
-            Serialization.cst "record",
-            (exprQualifiedName qn),
-            (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle (Lists.map exprRecordField fields))])
-        Pdl.NamedSchemaTypeEnum v0 ->
-          let fields = Pdl.enumSchemaFields v0
-          in (Serialization.spaceSep [
-            Serialization.cst "enum",
-            (exprQualifiedName qn),
-            (Serialization.curlyBracesList Nothing Serialization.fullBlockStyle (Lists.map exprEnumField fields))])
-        Pdl.NamedSchemaTypeTyperef v0 -> Serialization.spaceSep [
-          Serialization.cst "typeref",
-          (exprQualifiedName qn),
-          (Serialization.cst "="),
-          (exprSchema v0)]))
-
--- | Convert a primitive type to an expression
-exprPrimitiveType :: Pdl.PrimitiveType -> Ast.Expr
-exprPrimitiveType pt =
-    Serialization.cst (case pt of
-      Pdl.PrimitiveTypeBoolean -> "boolean"
-      Pdl.PrimitiveTypeBytes -> "bytes"
-      Pdl.PrimitiveTypeDouble -> "double"
-      Pdl.PrimitiveTypeFloat -> "float"
-      Pdl.PrimitiveTypeInt -> "int"
-      Pdl.PrimitiveTypeLong -> "long"
-      Pdl.PrimitiveTypeString -> "string")
-
--- | Convert a qualified name to an expression
-exprQualifiedName :: Pdl.QualifiedName -> Ast.Expr
-exprQualifiedName qn =
-
-      let name = Pdl.unName (Pdl.qualifiedNameName qn)
-          ns = Pdl.qualifiedNameNamespace qn
-          parts =
-                  Maybes.cat [
-                    Maybes.map (\n -> Pdl.unNamespace n) ns,
-                    (Maybes.pure name)]
-      in (Serialization.cst (Strings.intercalate "." parts))
-
--- | Convert a record field to an expression
-exprRecordField :: Pdl.RecordField -> Ast.Expr
-exprRecordField rf =
-
-      let name = Pdl.unFieldName (Pdl.recordFieldName rf)
-          schema = Pdl.recordFieldValue rf
-          optional = Pdl.recordFieldOptional rf
-          anns = Pdl.recordFieldAnnotations rf
-      in (withAnnotations anns (Serialization.spaceSep (Maybes.cat [
-        Maybes.pure (Serialization.cst (Strings.cat2 name ":")),
-        (Logic.ifElse optional (Maybes.pure (Serialization.cst "optional")) Nothing),
-        (Maybes.pure (exprSchema schema))])))
-
--- | Convert a schema to an expression
-exprSchema :: Pdl.Schema -> Ast.Expr
-exprSchema schema =
-    case schema of
-      Pdl.SchemaArray v0 -> Serialization.noSep [
-        Serialization.cst "array",
-        (Serialization.bracketList Serialization.inlineStyle [
-          exprSchema v0])]
-      Pdl.SchemaMap v0 -> Serialization.noSep [
-        Serialization.cst "map",
-        (Serialization.bracketList Serialization.inlineStyle [
-          Serialization.cst "string",
-          (exprSchema v0)])]
-      Pdl.SchemaNamed v0 -> exprQualifiedName v0
-      Pdl.SchemaNull -> Serialization.cst "null"
-      Pdl.SchemaPrimitive v0 -> exprPrimitiveType v0
-      Pdl.SchemaUnion v0 -> Serialization.noSep [
-        Serialization.cst "union",
-        (Serialization.bracketList Serialization.fullBlockStyle (Lists.map exprUnionMember (Pdl.unUnionSchema v0)))]
-
--- | Convert a schema file to an expression
-exprSchemaFile :: Pdl.SchemaFile -> Ast.Expr
-exprSchemaFile sf =
-
-      let ns = Pdl.unNamespace (Pdl.schemaFileNamespace sf)
-          pkg = Pdl.schemaFilePackage sf
-          imports = Pdl.schemaFileImports sf
-          schemas = Pdl.schemaFileSchemas sf
-          namespaceSec =
-                  Maybes.pure (Serialization.spaceSep [
-                    Serialization.cst "namespace",
-                    (Serialization.cst ns)])
-          packageSec =
-                  Maybes.map (\p -> Serialization.spaceSep [
-                    Serialization.cst "package",
-                    (Serialization.cst (Pdl.unPackage p))]) pkg
-          importsSec = Logic.ifElse (Lists.null imports) Nothing (Maybes.pure (Serialization.newlineSep (Lists.map exprImport imports)))
-          schemaSecs = Lists.map (\s -> Maybes.pure (exprNamedSchema s)) schemas
-      in (Serialization.doubleNewlineSep (Maybes.cat (Lists.concat [
-        [
-          namespaceSec,
-          packageSec,
-          importsSec],
-        schemaSecs])))
-
--- | Convert a union member to an expression
-exprUnionMember :: Pdl.UnionMember -> Ast.Expr
-exprUnionMember um =
-
-      let alias = Pdl.unionMemberAlias um
-          schema = Pdl.unionMemberValue um
-          anns = Pdl.unionMemberAnnotations um
-      in (withAnnotations anns (Serialization.spaceSep (Maybes.cat [
-        Maybes.map (\fn -> Serialization.cst (Strings.cat2 (Pdl.unFieldName fn) ":")) alias,
-        (Maybes.pure (exprSchema schema))])))
-
--- | Prepend annotations (doc comment) to an expression
-withAnnotations :: Pdl.Annotations -> Ast.Expr -> Ast.Expr
-withAnnotations anns expr =
-    Serialization.newlineSep (Maybes.cat [
-      exprAnnotations anns,
-      (Maybes.pure expr)])
diff --git a/src/main/haskell/Hydra/Pg/Coder.hs b/src/main/haskell/Hydra/Pg/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Coder.hs
+++ /dev/null
@@ -1,413 +0,0 @@
--- 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.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Mapping as Mapping
-import qualified Hydra.Pg.Model as Model
-import qualified Hydra.Pg.TermsToElements as TermsToElements
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Strip as Strip
-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 :: t0 -> Bool -> Either t1 () -> Either t1 ()
-check _cx b e = Logic.ifElse b (Right ()) e
-
--- | Check that a record name matches the expected name
-checkRecordName :: t0 -> Core.Name -> Core.Name -> Either Errors.Error ()
-checkRecordName cx expected actual =
-    check cx (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 :: Context.Context -> Graph.Graph -> Model.VertexLabel -> Mapping.Schema t0 t1 t2 -> Core.Type -> t1 -> t1 -> Model.Direction -> Core.Name -> [Core.FieldType] -> [Coders.Adapter Core.FieldType (Model.PropertyType t1) Core.Field (Model.Property t2)] -> Maybe (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Maybe (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Either Errors.Error (Coders.Adapter Core.Type (Model.ElementTypeTree t1) Core.Term (Model.ElementTree t2))
-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 = Model.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 (Maybes.maybe (Right Nothing) (\s -> Eithers.map (\x -> Just x) (projectionAdapter cx g vidType vertexIdsSchema s "out")) mOutSpec) (\outIdAdapter -> Eithers.bind (Maybes.maybe (Right Nothing) (\s -> Eithers.map (\x -> Just x) (projectionAdapter cx g vidType vertexIdsSchema s "in")) mInSpec) (\inIdAdapter -> Eithers.bind (Maybes.maybe (Right Nothing) (\s -> Eithers.map (\x -> Just x) (findIncidentVertexAdapter cx g schema vidType eidType s)) mOutSpec) (\outVertexAdapter -> Eithers.bind (Maybes.maybe (Right Nothing) (\s -> Eithers.map (\x -> Just x) (findIncidentVertexAdapter cx g schema vidType eidType s)) mInSpec) (\inVertexAdapter ->
-        let vertexAdapters =
-                Maybes.cat [
-                  outVertexAdapter,
-                  inVertexAdapter]
-        in (Eithers.bind (Maybes.maybe (Right parentLabel) (\spec -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "no out-vertex label"))) (\a -> Right (Model.VertexLabel a)) (Pairs.second (Pairs.second spec))) mOutSpec) (\outLabel -> Eithers.bind (Maybes.maybe (Right parentLabel) (\spec -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "no in-vertex label"))) (\a -> Right (Model.VertexLabel a)) (Pairs.second (Pairs.second spec))) mInSpec) (\inLabel -> Right (edgeCoder g dir schema source eidType name label outLabel inLabel idAdapter outIdAdapter inIdAdapter propAdapters vertexAdapters)))))))))))
-
--- | Construct a vertex coder from components
-constructVertexCoder :: Context.Context -> Graph.Graph -> Mapping.Schema t0 t1 t2 -> Core.Type -> t1 -> t1 -> Core.Name -> [Core.FieldType] -> [Coders.Adapter Core.FieldType (Model.PropertyType t1) Core.Field (Model.Property t2)] -> Either Errors.Error (Coders.Adapter Core.Type (Model.ElementTypeTree t1) Core.Term (Model.ElementTree t2))
-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 = Model.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 Model.DirectionOut fields) (\outEdgeAdapters -> Eithers.bind (findAdjacenEdgeAdapters cx g schema vidType eidType label Model.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 -> Model.Direction -> Mapping.Schema t1 t2 t3 -> t4 -> t5 -> Core.Name -> Model.EdgeLabel -> Model.VertexLabel -> Model.VertexLabel -> Maybe (Core.Name, (Coders.Adapter t6 t7 Core.Term t3)) -> Maybe (Core.Name, (Coders.Adapter t8 t9 Core.Term t3)) -> Maybe (Core.Name, (Coders.Adapter t10 t11 Core.Term t3)) -> [Coders.Adapter Core.FieldType (Model.PropertyType t5) Core.Field (Model.Property t3)] -> [(Core.Name, (Coders.Adapter t12 t13 Core.Term (Model.ElementTree t3)))] -> Coders.Adapter t4 (Model.ElementTypeTree t5) Core.Term (Model.ElementTree t3)
-edgeCoder g dir schema source eidType tname label outLabel inLabel mIdAdapter outAdapter inAdapter propAdapters vertexAdapters =
-
-      let et =
-              Model.EdgeType {
-                Model.edgeTypeLabel = label,
-                Model.edgeTypeId = eidType,
-                Model.edgeTypeOut = outLabel,
-                Model.edgeTypeIn = inLabel,
-                Model.edgeTypeProperties = (propertyTypes propAdapters)}
-      in Coders.Adapter {
-        Coders.adapterIsLossy = True,
-        Coders.adapterSource = source,
-        Coders.adapterTarget = (elementTypeTreeEdge et []),
-        Coders.adapterCoder = Coders.Coder {
-          Coders.coderEncode = (\cx -> \term ->
-            let deannot = Strip.deannotateTerm term
-                unwrapped =
-                        case deannot of
-                          Core.TermMaybe v0 -> Maybes.fromMaybe deannot v0
-                          _ -> deannot
-                rec =
-                        case unwrapped of
-                          Core.TermRecord v0 -> v0
-            in (Eithers.bind (checkRecordName cx tname (Core.recordTypeName rec)) (\_chk ->
-              let fieldsm = Resolution.fieldMap (Core.recordFields rec)
-              in (Eithers.bind (Maybes.maybe (Right (Mapping.schemaDefaultEdgeId schema)) (selectEdgeId cx fieldsm) mIdAdapter) (\edgeId -> Eithers.bind (encodeProperties cx fieldsm propAdapters) (\props ->
-                let getVertexId =
-                        \dirCheck -> \adapter -> Maybes.maybe (Right (Mapping.schemaDefaultVertexId schema)) (selectVertexId cx fieldsm) (Logic.ifElse (Equality.equal dir dirCheck) Nothing adapter)
-                in (Eithers.bind (getVertexId Model.DirectionOut outAdapter) (\outId -> Eithers.bind (getVertexId Model.DirectionIn inAdapter) (\inId -> Eithers.bind (Eithers.map (\xs -> Maybes.cat xs) (Eithers.mapList (\va ->
-                  let fname = Pairs.first va
-                      ad = Pairs.second va
-                  in (Maybes.maybe (Right Nothing) (\fterm -> Eithers.map (\x -> Just x) (Coders.coderEncode (Coders.adapterCoder ad) cx fterm)) (Maps.lookup fname fieldsm))) vertexAdapters)) (\deps -> Right (elementTreeEdge (Model.Edge {
-                  Model.edgeLabel = label,
-                  Model.edgeId = edgeId,
-                  Model.edgeOut = outId,
-                  Model.edgeIn = inId,
-                  Model.edgeProperties = props}) deps))))))))))),
-          Coders.coderDecode = (\cx -> \_ -> Left (Errors.ErrorOther (Errors.OtherError "edge decoding is not yet supported")))}}
-
--- | Create an edge id adapter
-edgeIdAdapter :: t0 -> t1 -> Mapping.Schema t2 t3 t4 -> t5 -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Maybe (Core.Name, (Coders.Adapter Core.Type t5 Core.Term t4)))
-edgeIdAdapter cx g schema eidType name idKey fields =
-    Eithers.bind (findIdProjectionSpec cx False name idKey fields) (\mIdSpec -> Maybes.maybe (Right Nothing) (\idSpec -> Eithers.map (\x -> Just x) (projectionAdapter cx g eidType (Mapping.schemaEdgeIds schema) idSpec "id")) mIdSpec)
-
--- | Construct an element adapter for a given type, interpreting it either as a vertex specification or an edge specification
-elementCoder :: Maybe (Model.Direction, Model.VertexLabel) -> Mapping.Schema t0 t1 t2 -> Core.Type -> t1 -> t1 -> Context.Context -> Graph.Graph -> Either Errors.Error (Coders.Adapter Core.Type (Model.ElementTypeTree t1) Core.Term (Model.ElementTree t2))
-elementCoder mparent schema source vidType eidType cx g =
-
-      let dir = Maybes.maybe Model.DirectionBoth (\p -> Pairs.first p) mparent
-          parentLabel = Maybes.maybe (Model.VertexLabel "NOLABEL") (\p -> Pairs.second p) mparent
-      in case (Strip.deannotateType source) of
-        Core.TypeMaybe 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) Model.ElementKindEdge Model.ElementKindVertex
-            in (Eithers.bind (findPropertySpecs cx g schema kind v0) (\propSpecs -> Eithers.bind (Eithers.mapList (propertyAdapter cx g schema) propSpecs) (\propAdapters -> case kind of
-              Model.ElementKindVertex -> constructVertexCoder cx g schema source vidType eidType name v0 propAdapters
-              Model.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 :: Model.Edge t0 -> [Model.ElementTree t0] -> Model.ElementTree t0
-elementTreeEdge edge deps =
-    Model.ElementTree {
-      Model.elementTreeSelf = (Model.ElementEdge edge),
-      Model.elementTreeDependencies = deps}
-
--- | Create an element tree for a vertex
-elementTreeVertex :: Model.Vertex t0 -> [Model.ElementTree t0] -> Model.ElementTree t0
-elementTreeVertex vertex deps =
-    Model.ElementTree {
-      Model.elementTreeSelf = (Model.ElementVertex vertex),
-      Model.elementTreeDependencies = deps}
-
--- | Create an element type tree for an edge type
-elementTypeTreeEdge :: Model.EdgeType t0 -> [Model.ElementTypeTree t0] -> Model.ElementTypeTree t0
-elementTypeTreeEdge etype deps =
-    Model.ElementTypeTree {
-      Model.elementTypeTreeSelf = (Model.ElementTypeEdge etype),
-      Model.elementTypeTreeDependencies = deps}
-
--- | Create an element type tree for a vertex type
-elementTypeTreeVertex :: Model.VertexType t0 -> [Model.ElementTypeTree t0] -> Model.ElementTypeTree t0
-elementTypeTreeVertex vtype deps =
-    Model.ElementTypeTree {
-      Model.elementTypeTreeSelf = (Model.ElementTypeVertex vtype),
-      Model.elementTypeTreeDependencies = deps}
-
--- | Encode all properties from a field map using property adapters
-encodeProperties :: Context.Context -> M.Map Core.Name Core.Term -> [Coders.Adapter Core.FieldType t0 Core.Field (Model.Property t1)] -> Either Errors.Error (M.Map Model.PropertyKey t1)
-encodeProperties cx fields adapters =
-    Eithers.map (\props -> Maps.fromList (Lists.map (\prop -> (Model.propertyKey prop, (Model.propertyValue prop))) props)) (Eithers.map (\xs -> Maybes.cat xs) (Eithers.mapList (encodeProperty cx fields) adapters))
-
--- | Encode a single property from a field map using a property adapter
-encodeProperty :: Context.Context -> M.Map Core.Name Core.Term -> Coders.Adapter Core.FieldType t0 Core.Field t1 -> Either Errors.Error (Maybe t1)
-encodeProperty cx fields adapter =
-
-      let fname = Core.fieldTypeName (Coders.adapterSource adapter)
-          ftyp = Strip.deannotateType (Core.fieldTypeType (Coders.adapterSource adapter))
-          isMaybe =
-                  case ftyp of
-                    Core.TypeMaybe _ -> True
-                    _ -> False
-          encodeValue =
-                  \v -> Eithers.map (\x -> Just x) (Coders.coderEncode (Coders.adapterCoder adapter) cx (Core.Field {
-                    Core.fieldName = fname,
-                    Core.fieldTerm = v}))
-      in (Maybes.maybe (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.TermMaybe v0 -> Maybes.maybe (Right Nothing) encodeValue v0
-        _ -> encodeValue value) (encodeValue value)) (Maps.lookup fname fields))
-
--- | 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 :: Context.Context -> Graph.Graph -> Mapping.Schema t0 t1 t2 -> t1 -> t1 -> Model.VertexLabel -> Model.Direction -> [Core.FieldType] -> Either Errors.Error [(Model.Direction, (Core.FieldType, (Model.EdgeLabel, (Coders.Adapter Core.Type (Model.ElementTypeTree t1) Core.Term (Model.ElementTree t2)))))]
-findAdjacenEdgeAdapters cx g schema vidType eidType parentLabel dir fields =
-    Eithers.map (\xs -> Maybes.cat xs) (Eithers.mapList (\field ->
-      let key =
-              Core.Name (case dir of
-                Model.DirectionOut -> Mapping.annotationSchemaOutEdgeLabel (Mapping.schemaAnnotations schema)
-                Model.DirectionIn -> Mapping.annotationSchemaInEdgeLabel (Mapping.schemaAnnotations schema))
-      in (Maybes.maybe (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, (Model.EdgeLabel labelStr, elad))))))) (Annotations.getTypeAnnotation key (Core.fieldTypeType field)))) 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 -> Maybes.maybe (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, (Maybes.map (\s -> Strings.toUpper s) Nothing)))) (Maybes.maybe (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})) (Annotations.getTypeAnnotation idKey (Core.fieldTypeType mi)))) mid)
-
--- | Find an incident vertex adapter for a projection spec
-findIncidentVertexAdapter :: Context.Context -> Graph.Graph -> Mapping.Schema t0 t1 t2 -> t1 -> t1 -> (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Either Errors.Error (Core.Name, (Coders.Adapter Core.Type (Model.ElementTypeTree t1) Core.Term (Model.ElementTree t2)))
-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 =
-    Maybes.maybe (Right (Core.unName tname)) (extractString cx g) (Annotations.getTypeAnnotation labelKey source)
-
--- | 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 -> Maybes.maybe (Right Nothing) (\field -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "findProjectionSpec: missing type annotation for key"))) (\annot -> Eithers.bind (TermsToElements.decodeValueSpec cx g annot) (\spec -> Eithers.bind (Maybes.maybe (Right Nothing) (\t -> Eithers.map (\x -> Just x) (extractString cx g t)) (Annotations.getTypeAnnotation aliasKey (Core.fieldTypeType field))) (\alias -> Right (Just (field, (spec, alias)))))) (Annotations.getTypeAnnotation key (Core.fieldTypeType field))) mfield)
-
--- | Find property specs for element fields
-findPropertySpecs :: t0 -> Graph.Graph -> Mapping.Schema t1 t2 t3 -> Model.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 (Maybes.maybe (Right Nothing) (\a -> Eithers.map (\x -> Just x) (extractString cx g a)) (Annotations.getTypeAnnotation propKeyKey (Core.fieldTypeType field))) (\alias -> Eithers.bind (Maybes.maybe (Right Mapping.ValueSpecValue) (TermsToElements.decodeValueSpec cx g) (Annotations.getTypeAnnotation propValueKey (Core.fieldTypeType field))) (\values -> Right (field, (values, alias)))))) (Lists.filter (\field ->
-      let annots = Mapping.schemaAnnotations schema
-          ignoreKey = Core.Name (Mapping.annotationSchemaIgnore annots)
-          specialKeys =
-                  case kind of
-                    Model.ElementKindVertex -> [
-                      Core.Name (Mapping.annotationSchemaVertexId annots),
-                      (Core.Name (Mapping.annotationSchemaOutEdgeLabel annots)),
-                      (Core.Name (Mapping.annotationSchemaInEdgeLabel annots))]
-                    Model.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 (Maybes.isJust (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 -> Maybes.isJust (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 :: Model.Direction -> Maybe t0 -> Maybe t1 -> Bool
-hasVertexAdapters dir mOutSpec mInSpec =
-    case dir of
-      Model.DirectionOut -> Maybes.isJust mInSpec
-      Model.DirectionIn -> Maybes.isJust mOutSpec
-      Model.DirectionBoth -> Logic.and (Maybes.isJust mOutSpec) (Maybes.isJust mInSpec)
-
--- | Create a projection adapter from a projection spec
-projectionAdapter :: t0 -> t1 -> t2 -> Coders.Coder Core.Term t3 -> (Core.FieldType, (Mapping.ValueSpec, t4)) -> String -> Either t5 (Core.Name, (Coders.Adapter Core.Type t2 Core.Term t3))
-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 = (\cx_ -> \typ -> Eithers.bind (traverseToSingleTerm cx_ (Strings.cat2 key "-projection") (traversal cx_) typ) (\t -> Coders.coderEncode coder cx_ t)),
-          Coders.coderDecode = (\cx_ -> \_ -> 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 :: Context.Context -> t0 -> Mapping.Schema t1 t2 t3 -> (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Either Errors.Error (Coders.Adapter Core.FieldType (Model.PropertyType t2) Core.Field (Model.Property t3))
-propertyAdapter cx g schema spec =
-
-      let tfield = Pairs.first spec
-          values = Pairs.first (Pairs.second spec)
-          alias = Pairs.second (Pairs.second spec)
-          key = Model.PropertyKey (Maybes.fromMaybe (Core.unName (Core.fieldTypeName tfield)) alias)
-      in (Eithers.bind (Coders.coderEncode (Mapping.schemaPropertyTypes schema) cx (Core.fieldTypeType tfield)) (\pt -> Eithers.bind (TermsToElements.parseValueSpec cx g values) (\traversal -> Right (Coders.Adapter {
-        Coders.adapterIsLossy = True,
-        Coders.adapterSource = tfield,
-        Coders.adapterTarget = Model.PropertyType {
-          Model.propertyTypeKey = key,
-          Model.propertyTypeValue = pt,
-          Model.propertyTypeRequired = True},
-        Coders.adapterCoder = Coders.Coder {
-          Coders.coderEncode = (\cx_ -> \dfield -> Eithers.bind (traverseToSingleTerm cx_ "property traversal" (traversal cx_) (Core.fieldTerm dfield)) (\result -> Eithers.bind (Coders.coderEncode (Mapping.schemaPropertyValues schema) cx_ result) (\value -> Right (Model.Property {
-            Model.propertyKey = key,
-            Model.propertyValue = value})))),
-          Coders.coderDecode = (\cx_ -> \_ -> Left (Errors.ErrorOther (Errors.OtherError "property decoding is not yet supported")))}}))))
-
--- | Extract property types from property adapters
-propertyTypes :: [Coders.Adapter t0 (Model.PropertyType t1) t2 t3] -> [Model.PropertyType t1]
-propertyTypes propAdapters =
-    Lists.map (\a -> Model.PropertyType {
-      Model.propertyTypeKey = (Model.propertyTypeKey (Coders.adapterTarget a)),
-      Model.propertyTypeValue = (Model.propertyTypeValue (Coders.adapterTarget a)),
-      Model.propertyTypeRequired = True}) propAdapters
-
--- | Select an edge id from record fields using an id adapter
-selectEdgeId :: Context.Context -> M.Map Core.Name t0 -> (Core.Name, (Coders.Adapter t1 t2 t0 t3)) -> Either Errors.Error t3
-selectEdgeId cx fields ad =
-
-      let fname = Pairs.first ad
-          adapter = Pairs.second ad
-      in (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "no " (Core.unName fname)) " in record")))) (\t -> Coders.coderEncode (Coders.adapterCoder adapter) cx t) (Maps.lookup fname fields))
-
--- | Select a vertex id from record fields using an id adapter
-selectVertexId :: Context.Context -> M.Map Core.Name t0 -> (Core.Name, (Coders.Adapter t1 t2 t0 t3)) -> Either Errors.Error t3
-selectVertexId cx fields ad =
-
-      let fname = Pairs.first ad
-          adapter = Pairs.second ad
-      in (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "no " (Core.unName fname)) " in record")))) (\t -> Coders.coderEncode (Coders.adapterCoder adapter) cx t) (Maps.lookup fname fields))
-
--- | 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) (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 desc " resolved to multiple terms")))) (\x -> Right x) (Lists.maybeHead terms)) (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 -> t4 -> t5 -> t6 -> Model.VertexLabel -> (Core.Name, (Coders.Adapter t7 t8 Core.Term t3)) -> [Coders.Adapter Core.FieldType (Model.PropertyType t5) Core.Field (Model.Property t3)] -> [(Model.Direction, (Core.FieldType, (Model.EdgeLabel, (Coders.Adapter t9 (Model.ElementTypeTree t5) Core.Term (Model.ElementTree t3)))))] -> Coders.Adapter t4 (Model.ElementTypeTree t5) Core.Term (Model.ElementTree t3)
-vertexCoder g schema source vidType tname vlabel idAdapter propAdapters edgeAdapters =
-
-      let vtype =
-              Model.VertexType {
-                Model.vertexTypeLabel = vlabel,
-                Model.vertexTypeId = vidType,
-                Model.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 = (\cx -> \term ->
-            let deannot = Strip.deannotateTerm term
-                unwrapped =
-                        case deannot of
-                          Core.TermMaybe v0 -> Maybes.fromMaybe deannot v0
-                          _ -> deannot
-                rec =
-                        case unwrapped of
-                          Core.TermRecord v0 -> v0
-                fmap = Resolution.fieldMap (Core.recordFields rec)
-            in (Eithers.bind (selectVertexId cx fmap idAdapter) (\vid -> Eithers.bind (encodeProperties cx 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 (Maybes.maybe (Right []) (\fterm -> Eithers.map (\tree -> (\x -> case x of
-                Model.ElementVertex v0 ->
-                  let otherid = Model.vertexId v0
-                      edgeid = Mapping.schemaDefaultEdgeId schema
-                      outId =
-                              case eaDir of
-                                Model.DirectionOut -> vid
-                                Model.DirectionIn -> otherid
-                      inId =
-                              case eaDir of
-                                Model.DirectionOut -> otherid
-                                Model.DirectionIn -> vid
-                      edge =
-                              Model.ElementEdge (Model.Edge {
-                                Model.edgeLabel = eaLabel,
-                                Model.edgeId = edgeid,
-                                Model.edgeOut = outId,
-                                Model.edgeIn = inId,
-                                Model.edgeProperties = Maps.empty})
-                  in [
-                    Model.ElementTree {
-                      Model.elementTreeSelf = edge,
-                      Model.elementTreeDependencies = [
-                        tree]}]
-                Model.ElementEdge v0 ->
-                  let fixedEdge =
-                          case eaDir of
-                            Model.DirectionOut -> Model.Edge {
-                              Model.edgeLabel = (Model.edgeLabel v0),
-                              Model.edgeId = (Model.edgeId v0),
-                              Model.edgeOut = vid,
-                              Model.edgeIn = (Model.edgeIn v0),
-                              Model.edgeProperties = (Model.edgeProperties v0)}
-                            Model.DirectionIn -> Model.Edge {
-                              Model.edgeLabel = (Model.edgeLabel v0),
-                              Model.edgeId = (Model.edgeId v0),
-                              Model.edgeOut = (Model.edgeOut v0),
-                              Model.edgeIn = vid,
-                              Model.edgeProperties = (Model.edgeProperties v0)}
-                  in [
-                    Model.ElementTree {
-                      Model.elementTreeSelf = (Model.ElementEdge fixedEdge),
-                      Model.elementTreeDependencies = (Model.elementTreeDependencies tree)}]) (Model.elementTreeSelf tree)) (Coders.coderEncode (Coders.adapterCoder eaAdapter) cx fterm)) (Maps.lookup (Core.fieldTypeName eaField) fmap))) edgeAdapters)) (\deps -> Right (elementTreeVertex (Model.Vertex {
-              Model.vertexLabel = vlabel,
-              Model.vertexId = vid,
-              Model.vertexProperties = props}) deps)))))),
-          Coders.coderDecode = (\cx -> \_ -> Left (Errors.ErrorOther (Errors.OtherError "vertex decoding is not yet supported")))}}
-
--- | Create a vertex id adapter
-vertexIdAdapter :: t0 -> t1 -> Mapping.Schema t2 t3 t4 -> t5 -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Core.Name, (Coders.Adapter Core.Type t5 Core.Term t4))
-vertexIdAdapter cx g schema vidType name idKey fields =
-    Eithers.bind (findIdProjectionSpec cx True name idKey fields) (\mIdSpec -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "vertexIdAdapter: no id projection spec"))) (\idSpec -> projectionAdapter cx g vidType (Mapping.schemaVertexIds schema) idSpec "id") mIdSpec)
diff --git a/src/main/haskell/Hydra/Pg/Graphson/Coder.hs b/src/main/haskell/Hydra/Pg/Graphson/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Graphson/Coder.hs
+++ /dev/null
@@ -1,122 +0,0 @@
--- 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.Json.Model as Model
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Graphson.Syntax as Syntax
-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 (Maps.fromList (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 (Maps.fromList (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 (Maps.fromList (Maybes.cat (Lists.map (\p -> Maybes.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 (Maps.fromList (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", (Maybes.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", (Maybes.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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Graphson/Construct.hs
+++ /dev/null
@@ -1,83 +0,0 @@
--- 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.Coders as Coders
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Json.Model as JsonModel
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Pg.Graphson.Coder as Coder
-import qualified Hydra.Pg.Graphson.Syntax as Syntax
-import qualified Hydra.Pg.Model as PgModel
-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 (Maybes.maybe (Lists.pure v) (\vs -> Lists.cons v vs) existing) 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
-graphsonVertexToJsonCoder =
-    Coders.Coder {
-      Coders.coderEncode = (\_cx -> \v -> Right (Coder.vertexToJson v)),
-      Coders.coderDecode = (\_cx -> \_ -> 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Graphson/Syntax.hs
+++ /dev/null
@@ -1,260 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Graphson/Utils.hs
+++ /dev/null
@@ -1,97 +0,0 @@
--- 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.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Json.Model as JsonModel
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-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.Strip as Strip
-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 =
-                                Maybes.maybe 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) (Maps.lookup outV vmap)
-                    in (Maybes.maybe 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) (Maps.lookup inV 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.FloatValueBigfloat v2 -> Right (Syntax.ValueBigDecimal (Syntax.BigDecimalValue (Literals.showBigfloat v2)))
-          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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Mapping.hs
+++ /dev/null
@@ -1,183 +0,0 @@
--- 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 =
-  Schema {
-    schemaVertexIdTypes :: (Coders.Coder Core.Type t),
-    schemaVertexIds :: (Coders.Coder Core.Term v),
-    schemaEdgeIdTypes :: (Coders.Coder Core.Type t),
-    schemaEdgeIds :: (Coders.Coder Core.Term v),
-    schemaPropertyTypes :: (Coders.Coder Core.Type t),
-    schemaPropertyValues :: (Coders.Coder Core.Term v),
-    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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Model.hs
+++ /dev/null
@@ -1,335 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Printing.hs
+++ /dev/null
@@ -1,83 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Printing functions for property graph elements
-
-module Hydra.Pg.Printing where
-
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Model as Model
-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) -> Model.Edge t0 -> String
-printEdge printValue edge =
-
-      let label = Model.unEdgeLabel (Model.edgeLabel edge)
-          id = printValue (Model.edgeId edge)
-          outId = printValue (Model.edgeOut edge)
-          inId = printValue (Model.edgeIn edge)
-          props =
-                  Strings.intercalate ", " (Lists.map (\p -> printProperty printValue (Pairs.first p) (Pairs.second p)) (Maps.toList (Model.edgeProperties edge)))
-      in (Strings.cat [
-        id,
-        ": ",
-        "(",
-        outId,
-        ")-[:",
-        label,
-        " {",
-        props,
-        "}]->(",
-        inId,
-        ")"])
-
--- | Print a graph using the provided value printer
-printGraph :: Ord t0 => ((t0 -> String) -> Model.Graph t0 -> String)
-printGraph printValue graph =
-    printLazyGraph printValue (Model.LazyGraph {
-      Model.lazyGraphVertices = (Maps.elems (Model.graphVertices graph)),
-      Model.lazyGraphEdges = (Maps.elems (Model.graphEdges graph))})
-
--- | Print a lazy graph using the provided value printer
-printLazyGraph :: (t0 -> String) -> Model.LazyGraph t0 -> String
-printLazyGraph printValue lg =
-
-      let vertices = Model.lazyGraphVertices lg
-          edges = Model.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) -> Model.PropertyKey -> t0 -> String
-printProperty printValue key value =
-    Strings.cat [
-      Model.unPropertyKey key,
-      ": ",
-      (printValue value)]
-
--- | Print a vertex using the provided value printer
-printVertex :: (t0 -> String) -> Model.Vertex t0 -> String
-printVertex printValue vertex =
-
-      let label = Model.unVertexLabel (Model.vertexLabel vertex)
-          id = printValue (Model.vertexId vertex)
-          props =
-                  Strings.intercalate ", " (Lists.map (\p -> printProperty printValue (Pairs.first p) (Pairs.second p)) (Maps.toList (Model.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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Query.hs
+++ /dev/null
@@ -1,329 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Rdf/Environment.hs
+++ /dev/null
@@ -1,41 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Rdf/Mappings.hs
+++ /dev/null
@@ -1,197 +0,0 @@
--- 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.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Pg.Model as PgModel
-import qualified Hydra.Pg.Rdf.Environment as Environment
-import qualified Hydra.Rdf.Syntax as Syntax
-import qualified Hydra.Rdf.Utils as Utils
-import qualified Hydra.Shacl.Model as ShaclModel
-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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/TermsToElements.hs
+++ /dev/null
@@ -1,264 +0,0 @@
--- 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.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Pg.Mapping as Mapping
-import qualified Hydra.Pg.Model as Model
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-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 Model.EdgeLabel
-decodeEdgeLabel cx g t = Eithers.map (\_x -> Model.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 Model.PropertyKey
-decodePropertyKey cx g t = Eithers.map (\_x -> Model.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 Model.VertexLabel
-decodeVertexLabel cx g t = Eithers.map (\_x -> Model.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 =
-    Maybes.maybe (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))) (Lists.uncons path)
-
--- | 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.TermMaybe v0 -> Maybes.maybe (Right []) (\t -> evalStep cx step t) v0
-      Core.TermRecord v0 -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "No such field " step) " in record")))) (\t -> Right [
-        t]) (Maps.lookup (Core.Name step) (Resolution.fieldMap (Core.recordFields v0)))
-      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 -> Mapping.ValueSpec -> Either t5 (Context.Context -> Core.Term -> Either Errors.Error [t4])
-parseEdgeIdPattern cx g schema spec =
-    Eithers.bind (parseValueSpec cx g spec) (\fun -> Right (\cx_ -> \term -> Eithers.bind (fun cx_ term) (\terms -> Eithers.mapList (Coders.coderEncode (Mapping.schemaEdgeIds schema) cx_) terms)))
-
--- | Parse an edge specification into a label and encoder function
-parseEdgeSpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 -> Mapping.EdgeSpec -> Either t5 (Model.Label, (Context.Context -> Core.Term -> Either Errors.Error [Model.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 (Model.LabelEdge label, (\cx_ -> \term -> Eithers.bind (requireUnique cx_ "edge id" (getId cx_) term) (\tid -> Eithers.bind (requireUnique cx_ "vertex id" (getOut cx_) term) (\tout -> Eithers.bind (requireUnique cx_ "edge id" (getIn cx_) term) (\tin -> Eithers.bind (Eithers.map (\_xs -> Maps.fromList _xs) (Eithers.mapList (\gf -> requireUnique cx_ "property key" (gf cx_) term) getProps)) (\tprops -> Right [
-        Model.ElementEdge (Model.Edge {
-          Model.edgeLabel = label,
-          Model.edgeId = tid,
-          Model.edgeOut = tout,
-          Model.edgeIn = tin,
-          Model.edgeProperties = tprops})])))))))))))
-
--- | Parse an element specification into a label and encoder function
-parseElementSpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 -> Mapping.ElementSpec -> Either t5 (Model.Label, (Context.Context -> Core.Term -> Either Errors.Error [Model.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 (t3 -> Core.Term -> Either Errors.Error [Core.Term])
-parsePattern cx _g pat =
-
-      let segments = Strings.splitOn "${" pat
-          firstLit = Maybes.fromMaybe pat (Lists.maybeHead segments)
-          rest = Lists.drop 1 segments
-          parsed =
-                  Lists.map (\seg ->
-                    let parts = Strings.splitOn "}" seg
-                        pathStr = Maybes.fromMaybe "" (Lists.maybeHead parts)
-                        litPart = Strings.intercalate "}" (Lists.drop 1 parts)
-                        pathSteps = Strings.splitOn "/" pathStr
-                    in (pathSteps, litPart)) rest
-      in (Right (\cx_ -> \term -> applyPattern cx_ firstLit parsed term))
-
--- | Parse a property specification into an encoder function
-parsePropertySpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 -> Mapping.PropertySpec -> Either t5 (Context.Context -> Core.Term -> Either Errors.Error [(Model.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 (\cx_ -> \term -> Eithers.bind (fun cx_ term) (\results -> Eithers.bind (Eithers.mapList (Coders.coderEncode (Mapping.schemaPropertyValues schema) cx_) 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 (t3 -> Core.Term -> Either Errors.Error [Core.Term])
-parseValueSpec cx g spec =
-    case spec of
-      Mapping.ValueSpecValue -> Right (\_cx -> \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 -> Mapping.ValueSpec -> Either t5 (Context.Context -> Core.Term -> Either Errors.Error [t4])
-parseVertexIdPattern cx g schema spec =
-    Eithers.bind (parseValueSpec cx g spec) (\fun -> Right (\cx_ -> \term -> Eithers.bind (fun cx_ term) (\terms -> Eithers.mapList (Coders.coderEncode (Mapping.schemaVertexIds schema) cx_) terms)))
-
--- | Parse a vertex specification into a label and encoder function
-parseVertexSpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 -> Mapping.VertexSpec -> Either t5 (Model.Label, (Context.Context -> Core.Term -> Either Errors.Error [Model.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 (Model.LabelVertex label, (\cx_ -> \term -> Eithers.bind (requireUnique cx_ "vertex id" (getId cx_) term) (\tid -> Eithers.bind (Eithers.map (\_xs -> Maps.fromList _xs) (Eithers.mapList (\gf -> requireUnique cx_ "property key" (gf cx_) term) getProps)) (\tprops -> Right [
-        Model.ElementVertex (Model.Vertex {
-          Model.vertexLabel = label,
-          Model.vertexId = tid,
-          Model.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 =
-    Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "no such field: " (Core.unName fname))))) fun (Maps.lookup fname fields)
-
--- | 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 (Maybes.maybe (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 (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected field: " (Core.unName key))))) (\m -> Pairs.second m val) (Lists.maybeHead matching))) (Lists.maybeHead entries)))
-
--- | 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) (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Multiple values found: " context)))) (\x -> Right x) (Lists.maybeHead results)) (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 -> Core.Type -> Either Errors.Error (Coders.Adapter Core.Type [Model.Label] Core.Term [Model.Element t3])
-termToElementsAdapter cx g schema typ =
-
-      let key_elements = Core.Name "elements"
-      in (Maybes.maybe (Right (Coders.Adapter {
-        Coders.adapterIsLossy = False,
-        Coders.adapterSource = typ,
-        Coders.adapterTarget = [],
-        Coders.adapterCoder = Coders.Coder {
-          Coders.coderEncode = (\_cx -> \_t -> Right []),
-          Coders.coderDecode = (\cx_ -> \_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 = (\cx_ -> \t -> Eithers.map (\_xs -> Lists.concat _xs) (Eithers.mapList (\e -> e cx_ t) encoders)),
-            Coders.coderDecode = (\cx_ -> \_els -> Left (Errors.ErrorOther (Errors.OtherError "element decoding is not yet supported")))}}))))) (Annotations.getTypeAnnotation key_elements typ))
-
--- | 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.TermMaybe v0 -> Maybes.maybe "nothing" (\t -> termToString t) v0
-      _ -> ShowCore.term term
diff --git a/src/main/haskell/Hydra/Pg/Utils.hs b/src/main/haskell/Hydra/Pg/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Pg/Utils.hs
+++ /dev/null
@@ -1,133 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Utility functions for property graph operations
-
-module Hydra.Pg.Utils where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Json.Model as JsonModel
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Pg.Coder as Coder
-import qualified Hydra.Pg.Mapping as Mapping
-import qualified Hydra.Pg.Model as PgModel
-import qualified Hydra.Show.Core as ShowCore
-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
-examplePgSchema =
-    Mapping.Schema {
-      Mapping.schemaVertexIdTypes = Coders.Coder {
-        Coders.coderEncode = (\_ -> \_2 -> Right ()),
-        Coders.coderDecode = (\_ -> \_2 -> Right Core.TypeUnit)},
-      Mapping.schemaVertexIds = Coders.Coder {
-        Coders.coderEncode = (\cx -> \t -> expString cx t),
-        Coders.coderDecode = (\_cx -> \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 = (\cx -> \t -> expString cx t),
-        Coders.coderDecode = (\_cx -> \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 = (\cx -> \t -> expString cx t),
-        Coders.coderDecode = (\_cx -> \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 :: t0 -> Core.Term -> Either Errors.Error String
-expString cx 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 -> PgModel.Element t2 -> Context.Context -> Either Errors.Error JsonModel.Value
-pgElementToJson schema el cx =
-    (\x -> case x of
-      PgModel.ElementVertex v0 -> Eithers.bind (Coders.coderDecode (Mapping.schemaVertexIds schema) cx (PgModel.vertexId v0)) (\term ->
-        let labelJson = JsonModel.ValueString (PgModel.unVertexLabel (PgModel.vertexLabel v0))
-        in (Eithers.map (\propsJson -> JsonModel.ValueObject (Maps.fromList (Maybes.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 (Maps.fromList p)))) (Eithers.mapList (\pair ->
-          let key = Pairs.first pair
-              v = Pairs.second pair
-          in (Eithers.bind (Coders.coderDecode (Mapping.schemaPropertyValues schema) cx 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) cx (PgModel.edgeId v0)) (\term -> Eithers.bind (Coders.coderDecode (Mapping.schemaVertexIds schema) cx (PgModel.edgeOut v0)) (\termOut -> Eithers.bind (Coders.coderDecode (Mapping.schemaVertexIds schema) cx (PgModel.edgeIn v0)) (\termIn ->
-        let labelJson = JsonModel.ValueString (PgModel.unEdgeLabel (PgModel.edgeLabel v0))
-        in (Eithers.map (\propsJson -> JsonModel.ValueObject (Maps.fromList (Maybes.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 (Maps.fromList p)))) (Eithers.mapList (\pair ->
-          let key = Pairs.first pair
-              v = Pairs.second pair
-          in (Eithers.bind (Coders.coderDecode (Mapping.schemaPropertyValues schema) cx 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 -> [PgModel.Element t2] -> Context.Context -> Either Errors.Error JsonModel.Value
-pgElementsToJson schema els cx =
-    Eithers.map (\els_ -> JsonModel.ValueArray els_) (Eithers.mapList (\el -> pgElementToJson schema el cx) 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 -> Core.Type -> t1 -> t1 -> Context.Context -> Graph.Graph -> Either Errors.Error (Core.Term -> Context.Context -> 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 -> \cx_ -> 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) cx_ term)))
diff --git a/src/main/haskell/Hydra/Phantoms.hs b/src/main/haskell/Hydra/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Phantoms.hs
+++ /dev/null
@@ -1,35 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Phantom types for use with Hydra DSLs
-
-module Hydra.Phantoms where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | An association of a named term (element) with a phantom type
-data TBinding a =
-  TBinding {
-    -- | The name of the term
-    tBindingName :: Core.Name,
-    -- | The term with its phantom type
-    tBindingTerm :: (TTerm a)}
-  deriving (Eq, Ord, Read, Show)
-_TBinding = Core.Name "hydra.phantoms.TBinding"
-_TBinding_name = Core.Name "name"
-_TBinding_term = Core.Name "term"
--- | An association of a term with a phantom type
-newtype TTerm a =
-  TTerm {
-    unTTerm :: Core.Term}
-  deriving (Eq, Ord, Read, Show)
-_TTerm = Core.Name "hydra.phantoms.TTerm"
--- | An association of a term definition with a phantom type
-data TTermDefinition a =
-  TTermDefinition {
-    -- | The name of the term
-    tTermDefinitionName :: Core.Name,
-    -- | The term with its phantom type
-    tTermDefinitionTerm :: (TTerm a)}
-  deriving (Eq, Ord, Read, Show)
-_TTermDefinition = Core.Name "hydra.phantoms.TTermDefinition"
-_TTermDefinition_name = Core.Name "name"
-_TTermDefinition_term = Core.Name "term"
diff --git a/src/main/haskell/Hydra/Predicates.hs b/src/main/haskell/Hydra/Predicates.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Predicates.hs
+++ /dev/null
@@ -1,179 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type and term classification predicates
-
-module Hydra.Predicates where
-import qualified Hydra.Arity as Arity
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Reflect as Reflect
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Strip as Strip
-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 if a binding needs to be treated as a function
-isComplexBinding :: Graph.Graph -> Core.Binding -> Bool
-isComplexBinding tc b =
-
-      let term = Core.bindingTerm b
-          mts = Core.bindingTypeScheme b
-      in (Maybes.cases mts (isComplexTerm tc term) (\ts ->
-        let isPolymorphic = Logic.not (Lists.null (Core.typeSchemeVariables ts))
-            isNonNullary = Equality.gt (Arity.typeArity (Core.typeSchemeBody ts)) 0
-            isComplex = isComplexTerm tc term
-        in (Logic.or (Logic.or isPolymorphic isNonNullary) isComplex)))
--- | Check if a term needs to be treated as a function rather than a simple value
-isComplexTerm :: Graph.Graph -> Core.Term -> Bool
-isComplexTerm tc t =
-    case t of
-      Core.TermLet _ -> True
-      Core.TermTypeApplication _ -> True
-      Core.TermTypeLambda _ -> True
-      Core.TermVariable v0 -> isComplexVariable tc v0
-      _ -> Lists.foldl (\b -> \sub -> Logic.or b (isComplexTerm tc sub)) False (Rewriting.subterms t)
--- | Check if a variable is bound to a complex term
-isComplexVariable :: Graph.Graph -> Core.Name -> Bool
-isComplexVariable tc name =
-
-      let metaLookup = Maps.lookup name (Graph.graphMetadata tc)
-      in (Logic.ifElse (Maybes.isJust metaLookup) True (Logic.ifElse (Sets.member name (Graph.graphLambdaVariables tc)) True (
-        let typeLookup = Maps.lookup name (Graph.graphBoundTypes tc)
-        in (Maybes.maybe (
-          let primLookup = Maps.lookup name (Graph.graphPrimitives tc)
-          in (Maybes.maybe True (\prim -> Equality.gt (Arity.typeSchemeArity (Graph.primitiveTypeScheme prim)) 0) primLookup)) (\ts -> Equality.gt (Arity.typeSchemeArity ts) 0) typeLookup))))
--- | Determines whether a given term is an encoded term (meta-level term)
-isEncodedTerm :: Core.Term -> Bool
-isEncodedTerm t =
-    case (Strip.deannotateTerm t) of
-      Core.TermApplication v0 -> isEncodedTerm (Core.applicationFunction v0)
-      Core.TermInject v0 -> Equality.equal "hydra.core.Term" (Core.unName (Core.injectionTypeName v0))
-      _ -> False
--- | Determines whether a given term is an encoded type
-isEncodedType :: Core.Term -> Bool
-isEncodedType t =
-    case (Strip.deannotateTerm t) of
-      Core.TermApplication v0 -> isEncodedType (Core.applicationFunction v0)
-      Core.TermInject v0 -> Equality.equal "hydra.core.Type" (Core.unName (Core.injectionTypeName v0))
-      _ -> False
--- | Check if a row type represents an enum (all fields are unit-typed)
-isEnumRowType :: [Core.FieldType] -> Bool
-isEnumRowType rt =
-    Lists.foldl Logic.and True (Lists.map (\f -> isUnitType (Strip.deannotateType (Core.fieldTypeType f))) rt)
--- | Check if a type is an enum type
-isEnumType :: Core.Type -> Bool
-isEnumType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeUnion v0 -> isEnumRowType v0
-      _ -> False
-isNominalType :: Core.Type -> Bool
-isNominalType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeRecord _ -> True
-      Core.TypeUnion _ -> True
-      Core.TypeWrap _ -> True
-      Core.TypeForall v0 -> isNominalType (Core.forallTypeBody v0)
-      _ -> False
--- | Check if an element is serializable (no function types in dependencies) (Either version)
-isSerializable :: Context.Context -> Graph.Graph -> Core.Binding -> Either Errors.Error Bool
-isSerializable cx graph el =
-
-      let variants =
-              \typ -> Lists.map Reflect.typeVariant (Rewriting.foldOverType Coders.TraversalOrderPre (\m -> \t -> Lists.cons t m) [] typ)
-      in (Eithers.map (\deps ->
-        let allVariants = Sets.fromList (Lists.concat (Lists.map variants (Maps.elems deps)))
-        in (Logic.not (Sets.member Variants.TypeVariantFunction allVariants))) (typeDependencies cx graph False Equality.identity (Core.bindingName el)))
--- | Check if a type (by name) is serializable, resolving all type dependencies (Either version)
-isSerializableByName :: Context.Context -> Graph.Graph -> Core.Name -> Either Errors.Error Bool
-isSerializableByName cx graph name =
-
-      let variants =
-              \typ -> Lists.map Reflect.typeVariant (Rewriting.foldOverType Coders.TraversalOrderPre (\m -> \t -> Lists.cons t m) [] typ)
-      in (Eithers.map (\deps ->
-        let allVariants = Sets.fromList (Lists.concat (Lists.map variants (Maps.elems deps)))
-        in (Logic.not (Sets.member Variants.TypeVariantFunction allVariants))) (typeDependencies cx graph False Equality.identity name))
--- | Check if a type is serializable (no function types in the type itself)
-isSerializableType :: Core.Type -> Bool
-isSerializableType typ =
-
-      let allVariants =
-              Sets.fromList (Lists.map Reflect.typeVariant (Rewriting.foldOverType Coders.TraversalOrderPre (\m -> \t -> Lists.cons t m) [] typ))
-      in (Logic.not (Sets.member Variants.TypeVariantFunction allVariants))
--- | Check if a term is trivially cheap (no thunking needed)
-isTrivialTerm :: Core.Term -> Bool
-isTrivialTerm t =
-    case (Strip.deannotateTerm t) of
-      Core.TermLiteral _ -> True
-      Core.TermVariable v0 -> Equality.equal (Lists.length (Strings.splitOn "." (Core.unName v0))) 1
-      Core.TermUnit -> True
-      Core.TermApplication v0 ->
-        let fun = Core.applicationFunction v0
-            arg = Core.applicationArgument v0
-        in case fun of
-          Core.TermProject _ -> isTrivialTerm arg
-          Core.TermUnwrap _ -> isTrivialTerm arg
-          _ -> False
-      Core.TermMaybe v0 -> Maybes.maybe True (\inner -> isTrivialTerm inner) v0
-      Core.TermRecord v0 -> Lists.foldl (\acc -> \fld -> Logic.and acc (isTrivialTerm (Core.fieldTerm fld))) True (Core.recordFields v0)
-      Core.TermWrap v0 -> isTrivialTerm (Core.wrappedTermBody v0)
-      Core.TermTypeApplication v0 -> isTrivialTerm (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> isTrivialTerm (Core.typeLambdaBody v0)
-      _ -> False
--- | Check whether a type is a type (always true for non-encoded types)
-isType :: Core.Type -> Bool
-isType t =
-    case (Strip.deannotateType t) of
-      Core.TypeApplication v0 -> isType (Core.applicationTypeFunction v0)
-      Core.TypeForall v0 -> isType (Core.forallTypeBody v0)
-      Core.TypeUnion _ -> False
-      Core.TypeVariable v0 -> Equality.equal v0 (Core.Name "hydra.core.Type")
-      _ -> False
--- | Check whether a term is the unit term
-isUnitTerm :: Core.Term -> Bool
-isUnitTerm x =
-    case x of
-      Core.TermUnit -> True
-      _ -> False
--- | Check whether a type is the unit type
-isUnitType :: Core.Type -> Bool
-isUnitType x =
-    case x of
-      Core.TypeUnit -> True
-      _ -> False
--- | Get all type dependencies for a given type name (Either version)
-typeDependencies :: Context.Context -> Graph.Graph -> Bool -> (Core.Type -> Core.Type) -> Core.Name -> Either Errors.Error (M.Map Core.Name Core.Type)
-typeDependencies cx graph withSchema transform name =
-
-      let requireType =
-              \name2 ->
-                let cx1 =
-                        Context.Context {
-                          Context.contextTrace = (Lists.cons (Strings.cat2 "type dependencies of " (Core.unName name2)) (Context.contextTrace cx)),
-                          Context.contextMessages = (Context.contextMessages cx),
-                          Context.contextOther = (Context.contextOther cx)}
-                in (Eithers.bind (Lexical.requireBinding graph name2) (\el -> Eithers.bimap (\_e -> Errors.ErrorDecoding _e) (\_a -> _a) (DecodeCore.type_ graph (Core.bindingTerm el))))
-          toPair = \name2 -> Eithers.map (\typ -> (name2, (transform typ))) (requireType name2)
-          deps =
-                  \seeds -> \names -> Logic.ifElse (Sets.null seeds) (Right names) (Eithers.bind (Eithers.mapList toPair (Sets.toList seeds)) (\pairs ->
-                    let newNames = Maps.union names (Maps.fromList pairs)
-                        refs =
-                                Lists.foldl Sets.union Sets.empty (Lists.map (\pair -> Dependencies.typeDependencyNames withSchema (Pairs.second pair)) pairs)
-                        visited = Sets.fromList (Maps.keys names)
-                        newSeeds = Sets.difference refs visited
-                    in (deps newSeeds newNames)))
-      in (deps (Sets.singleton name) Maps.empty)
diff --git a/src/main/haskell/Hydra/Protobuf/Any.hs b/src/main/haskell/Hydra/Protobuf/Any.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/Any.hs
+++ /dev/null
@@ -1,25 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto
-
-module Hydra.Protobuf.Any 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
-
--- | `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.
-data Any =
-  Any {
-    -- | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message.
-    anyTypeUrl :: String,
-    -- | Must be a valid serialized protocol buffer of the above specified type.
-    anyValue :: B.ByteString}
-  deriving (Eq, Ord, Read, Show)
-
-_Any = Core.Name "hydra.protobuf.any.Any"
-
-_Any_typeUrl = Core.Name "typeUrl"
-
-_Any_value = Core.Name "value"
diff --git a/src/main/haskell/Hydra/Protobuf/Coder.hs b/src/main/haskell/Hydra/Protobuf/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/Coder.hs
+++ /dev/null
@@ -1,520 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Protobuf code generator: converts Hydra modules to Protocol Buffers v3 definitions
-
-module Hydra.Protobuf.Coder where
-
-import qualified Hydra.Adapt as Adapt
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Protobuf.Environment as ProtobufEnvironment
-import qualified Hydra.Protobuf.Language as Language
-import qualified Hydra.Protobuf.Proto3 as Proto3
-import qualified Hydra.Protobuf.Serde as Serde
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variables as Variables
-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
-
--- | Collect all structural type references (Either, Pair) from a list of types
-collectStructuralTypes :: [Core.Type] -> S.Set ProtobufEnvironment.StructuralTypeRef
-collectStructuralTypes types =
-    Lists.foldl (\acc -> \t -> Sets.union acc (collectStructuralTypes_collectFromType t)) Sets.empty types
-
--- | Collect structural type references from a single type
-collectStructuralTypes_collectFromType :: Core.Type -> S.Set ProtobufEnvironment.StructuralTypeRef
-collectStructuralTypes_collectFromType typ =
-    Rewriting.foldOverType Coders.TraversalOrderPre (\acc -> \t ->
-      let st = simplifyType t
-      in case st of
-        Core.TypeEither v0 -> Sets.insert (ProtobufEnvironment.StructuralTypeRefEither (Core.eitherTypeLeft v0, (Core.eitherTypeRight v0))) acc
-        Core.TypePair v0 -> Sets.insert (ProtobufEnvironment.StructuralTypeRefPair (Core.pairTypeFirst v0, (Core.pairTypeSecond v0))) acc
-        _ -> acc) Sets.empty typ
-
--- | Construct a Protobuf file from a Hydra module and its type definitions
-constructModule :: Context.Context -> Graph.Graph -> Packaging.Module -> [Packaging.TypeDefinition] -> Either Errors.Error Proto3.ProtoFile
-constructModule cx g mod typeDefs =
-
-      let ns_ = Packaging.moduleNamespace mod
-          desc = Packaging.moduleDescription mod
-          toDef =
-                  \td ->
-                    let name = Packaging.typeDefinitionName td
-                        typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme td)
-                        encodeDefEither = \n -> \t -> encodeDefinition cx g ns_ n t
-                        flatTyp = flattenType typ
-                        enc = encodeDefEither name
-                    in case (Strip.deannotateType flatTyp) of
-                      Core.TypeVariable _ -> enc flatTyp
-                      _ -> Eithers.bind (Adapt.adaptTypeForLanguage Language.protobufLanguage flatTyp) (\adaptedType -> enc adaptedType)
-          types = Lists.map (\td -> Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme td)) typeDefs
-          structRefs = collectStructuralTypes types
-          javaOptions =
-                  [
-                    Proto3.Option {
-                      Proto3.optionName = javaMultipleFilesOptionName,
-                      Proto3.optionValue = (Proto3.ValueBoolean True)},
-                    Proto3.Option {
-                      Proto3.optionName = javaPackageOptionName,
-                      Proto3.optionValue = (Proto3.ValueString (Proto3.unPackageName (namespaceToPackageName ns_)))}]
-          descOption =
-                  Proto3.Option {
-                    Proto3.optionName = Serde.descriptionOptionName,
-                    Proto3.optionValue = (Proto3.ValueString (Strings.cat2 (Maybes.maybe "" (\d -> Strings.cat2 d "\n\n") desc) Constants.warningAutoGeneratedFile))}
-          checkFieldType_wrapper =
-                  \typ -> case (Strip.deannotateType typ) of
-                    Core.TypeMaybe v0 -> case (Strip.deannotateType v0) of
-                      Core.TypeLiteral _ -> True
-                      _ -> False
-                    _ -> False
-          checkFieldType_empty = \typ -> Predicates.isUnitType typ
-          checkFields =
-                  \checkType -> \checkFieldType -> \ts -> Lists.foldl (\b -> \t -> Logic.or b (Rewriting.foldOverType Coders.TraversalOrderPre (\b2 -> \t2 -> Logic.or b2 (
-                    let checkResult = checkType t2
-                    in (Maybes.maybe (case t2 of
-                      Core.TypeRecord v0 -> Lists.foldl (\b3 -> \f -> Logic.or b3 (checkFieldType (Strip.deannotateType (Core.fieldTypeType f)))) False v0
-                      Core.TypeUnion v0 -> Lists.foldl (\b3 -> \f -> Logic.or b3 (checkFieldType (Strip.deannotateType (Core.fieldTypeType f)))) False v0
-                      _ -> False) (\b3 -> b3) checkResult))) False t)) False ts
-          wrapperImport =
-                  Logic.ifElse (checkFields (\_ -> Nothing) checkFieldType_wrapper types) [
-                    Proto3.FileReference "google/protobuf/wrappers.proto"] []
-          emptyCheckType = \typ -> Logic.ifElse (isEnumDefinition typ) (Just False) Nothing
-          emptyImport =
-                  Logic.ifElse (checkFields emptyCheckType checkFieldType_empty types) [
-                    Proto3.FileReference "google/protobuf/empty.proto"] []
-      in (Eithers.bind (Analysis.moduleDependencyNamespaces cx g True False False False mod) (\schemaImports -> Eithers.bind (Eithers.mapList toDef typeDefs) (\definitions ->
-        let schemaImportList = Lists.map (\n -> namespaceToFileReference n) (Sets.toList schemaImports)
-        in (Eithers.bind (mapAccumResult (\cx0 -> \ref -> generateStructuralTypeMessage cx0 g ns_ ref) cx (Sets.toList structRefs)) (\helperResult ->
-          let helperDefs = Pairs.first helperResult
-          in (Right (Proto3.ProtoFile {
-            Proto3.protoFilePackage = (namespaceToPackageName ns_),
-            Proto3.protoFileImports = (Lists.concat [
-              schemaImportList,
-              wrapperImport,
-              emptyImport]),
-            Proto3.protoFileTypes = (Lists.concat [
-              helperDefs,
-              definitions]),
-            Proto3.protoFileOptions = (Lists.cons descOption javaOptions)})))))))
-
--- | Encode a Hydra type as a Protobuf definition
-encodeDefinition :: Context.Context -> Graph.Graph -> Packaging.Namespace -> Core.Name -> Core.Type -> Either Errors.Error Proto3.Definition
-encodeDefinition cx g localNs name typ =
-
-      let cx1 = Annotations.resetCount key_proto_field_index cx
-          cx2 = Pairs.second (Annotations.nextCount key_proto_field_index cx1)
-          wrapAsRecordType =
-                  \t -> Core.TypeRecord [
-                    Core.FieldType {
-                      Core.fieldTypeName = (Core.Name "value"),
-                      Core.fieldTypeType = t}]
-          toEitherString = \result -> result
-          encode =
-                  \cx0 -> \options -> \t -> case (simplifyType t) of
-                    Core.TypeRecord v0 -> Eithers.map (\md -> Proto3.DefinitionMessage md) (toEitherString (encodeRecordType cx0 g localNs options name v0))
-                    Core.TypeUnion v0 -> Logic.ifElse (isEnumDefinition t) (Eithers.map (\ed -> Proto3.DefinitionEnum ed) (toEitherString (encodeEnumDefinition cx0 g options name v0))) (encode cx0 options (wrapAsRecordType (Core.TypeUnion v0)))
-                    _ -> encode cx0 options (wrapAsRecordType t)
-      in (Eithers.bind (toEitherString (findOptions cx g typ)) (\options -> encode cx2 options typ))
-
--- | Encode a Hydra union type as a Protobuf enum definition
-encodeEnumDefinition :: t0 -> Graph.Graph -> [Proto3.Option] -> Core.Name -> [Core.FieldType] -> Either Errors.Error Proto3.EnumDefinition
-encodeEnumDefinition cx g options tname fts =
-
-      let unspecifiedField =
-              Proto3.EnumValue {
-                Proto3.enumValueName = (encodeEnumValueName tname (Core.Name "unspecified")),
-                Proto3.enumValueNumber = 0,
-                Proto3.enumValueOptions = []}
-          encodeEnumField =
-                  \field -> \idx ->
-                    let fname = Core.fieldTypeName field
-                        ftype = Core.fieldTypeType field
-                    in (Eithers.bind (findOptions cx g ftype) (\opts -> Right (Proto3.EnumValue {
-                      Proto3.enumValueName = (encodeEnumValueName tname fname),
-                      Proto3.enumValueNumber = idx,
-                      Proto3.enumValueOptions = opts})))
-          indices = Math.range 1 (Lists.length fts)
-      in (Eithers.bind (Eithers.mapList (\p -> encodeEnumField (Pairs.first p) (Pairs.second p)) (Lists.zip fts indices)) (\values -> Right (Proto3.EnumDefinition {
-        Proto3.enumDefinitionName = (encodeTypeName tname),
-        Proto3.enumDefinitionValues = (Lists.cons unspecifiedField values),
-        Proto3.enumDefinitionOptions = options})))
-
--- | Encode an enum value name from type name and field name
-encodeEnumValueName :: Core.Name -> Core.Name -> Proto3.EnumValueName
-encodeEnumValueName tname fname =
-
-      let prefix = Formatting.nonAlnumToUnderscores (Formatting.convertCaseCamelToUpperSnake (Names.localNameOf tname))
-          suffix = Formatting.nonAlnumToUnderscores (Formatting.convertCaseCamelToUpperSnake (Core.unName fname))
-      in (Proto3.EnumValueName (Strings.cat [
-        prefix,
-        "_",
-        suffix]))
-
--- | Encode a field name, optionally preserving the original case
-encodeFieldName :: Bool -> Core.Name -> Proto3.FieldName
-encodeFieldName preserve name =
-    Proto3.FieldName (Logic.ifElse preserve (Core.unName name) (Formatting.convertCaseCamelToLowerSnake (Core.unName name)))
-
--- | Encode a Hydra field type as a Protobuf field
-encodeFieldType :: Context.Context -> Graph.Graph -> Packaging.Namespace -> Core.FieldType -> Either Errors.Error (Proto3.Field, Context.Context)
-encodeFieldType cx g localNs ft =
-
-      let fname = Core.fieldTypeName ft
-          ftype = Core.fieldTypeType ft
-          encodeType_ =
-                  \cx0 -> \g0 -> \ns0 -> \typ -> case (simplifyType typ) of
-                    Core.TypeEither v0 ->
-                      let ref = ProtobufEnvironment.StructuralTypeRefEither (Core.eitherTypeLeft v0, (Core.eitherTypeRight v0))
-                      in (Right (Proto3.FieldTypeSimple (Proto3.SimpleTypeReference (structuralTypeName ns0 ref))))
-                    Core.TypePair v0 ->
-                      let ref = ProtobufEnvironment.StructuralTypeRefPair (Core.pairTypeFirst v0, (Core.pairTypeSecond v0))
-                      in (Right (Proto3.FieldTypeSimple (Proto3.SimpleTypeReference (structuralTypeName ns0 ref))))
-                    Core.TypeList v0 -> Eithers.map (\st -> Proto3.FieldTypeRepeated st) (encodeSimpleType_ cx0 g0 ns0 True v0)
-                    Core.TypeSet v0 -> Eithers.map (\st -> Proto3.FieldTypeRepeated st) (encodeSimpleType_ cx0 g0 ns0 True v0)
-                    Core.TypeMap v0 -> Eithers.bind (encodeSimpleType_ cx0 g0 ns0 False (Core.mapTypeKeys v0)) (\kt -> Eithers.bind (encodeSimpleType_ cx0 g0 ns0 True (Core.mapTypeValues v0)) (\vt -> Right (Proto3.FieldTypeMap (Proto3.MapType {
-                      Proto3.mapTypeKeys = kt,
-                      Proto3.mapTypeValues = vt}))))
-                    Core.TypeMaybe v0 -> case (Strip.deannotateType v0) of
-                      Core.TypeLiteral v1 -> Eithers.map (\st -> Proto3.FieldTypeSimple st) (encodeScalarTypeWrapped cx0 v1)
-                      _ -> encodeType_ cx0 g0 ns0 v0
-                    Core.TypeUnion v0 -> Eithers.bind (mapAccumResult (\cx_ -> \f -> encodeFieldType cx_ g0 ns0 f) cx0 v0) (\pfields ->
-                      let fields_ = Pairs.first pfields
-                      in (Right (Proto3.FieldTypeOneof fields_)))
-                    _ -> Eithers.map (\st -> Proto3.FieldTypeSimple st) (encodeSimpleType_ cx0 g0 ns0 True typ)
-          encodeSimpleType_ =
-                  \cx0 -> \g0 -> \ns0 -> \noms -> \typ ->
-                    let forNominal = \name -> Right (Proto3.SimpleTypeReference (encodeTypeReference ns0 name))
-                    in case (simplifyType typ) of
-                      Core.TypeLiteral v0 -> Eithers.map (\st -> Proto3.SimpleTypeScalar st) (encodeScalarType cx0 v0)
-                      Core.TypeRecord _ -> unexpectedE cx0 "named type reference" "anonymous record type"
-                      Core.TypeUnion _ -> unexpectedE cx0 "named type reference" "anonymous union type"
-                      Core.TypeUnit -> Right (Proto3.SimpleTypeReference (Proto3.TypeName "google.protobuf.Empty"))
-                      Core.TypeVariable v0 -> Logic.ifElse noms (forNominal v0) (Eithers.bind (Lexical.requireBinding g0 v0) (\el ->
-                        let term = Core.bindingTerm el
-                        in (Eithers.bind (Eithers.bimap (\de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError de))) (\t -> t) (DecodeCore.type_ g0 term)) (\resolvedTyp -> encodeSimpleType_ cx0 g0 ns0 noms resolvedTyp))))
-                      _ -> unexpectedE cx0 "simple type" (ShowCore.type_ (Strip.removeTypeAnnotations typ))
-      in (Eithers.bind (findOptions cx g ftype) (\options -> Eithers.bind (encodeType_ cx g localNs ftype) (\ft_ ->
-        let idxPair = Annotations.nextCount key_proto_field_index cx
-            idx = Pairs.first idxPair
-            cx1 = Pairs.second idxPair
-        in (Eithers.bind (readBooleanAnnotation cx g Constants.key_preserveFieldName ftype) (\preserve -> Right (Proto3.Field {
-          Proto3.fieldName = (encodeFieldName preserve fname),
-          Proto3.fieldJsonName = Nothing,
-          Proto3.fieldType = ft_,
-          Proto3.fieldNumber = idx,
-          Proto3.fieldOptions = options}, cx1))))))
-
--- | Encode a Hydra record type as a Protobuf message definition
-encodeRecordType :: Context.Context -> Graph.Graph -> Packaging.Namespace -> [Proto3.Option] -> Core.Name -> [Core.FieldType] -> Either Errors.Error Proto3.MessageDefinition
-encodeRecordType cx g localNs options tname fts =
-    Eithers.bind (mapAccumResult (\cx_ -> \f -> encodeFieldType cx_ g localNs f) cx fts) (\result ->
-      let pfields = Pairs.first result
-      in (Right (Proto3.MessageDefinition {
-        Proto3.messageDefinitionName = (encodeTypeName tname),
-        Proto3.messageDefinitionFields = pfields,
-        Proto3.messageDefinitionOptions = options})))
-
--- | Encode a Hydra literal type as a Protobuf scalar type
-encodeScalarType :: t0 -> Core.LiteralType -> Either Errors.Error Proto3.ScalarType
-encodeScalarType cx lt =
-    case lt of
-      Core.LiteralTypeBinary -> Right Proto3.ScalarTypeBytes
-      Core.LiteralTypeBoolean -> Right Proto3.ScalarTypeBool
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeFloat32 -> Right Proto3.ScalarTypeFloat
-        Core.FloatTypeFloat64 -> Right Proto3.ScalarTypeDouble
-        _ -> unexpectedE cx "32-bit or 64-bit floating-point type" (ShowCore.floatType v0)
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeInt32 -> Right Proto3.ScalarTypeInt32
-        Core.IntegerTypeInt64 -> Right Proto3.ScalarTypeInt64
-        Core.IntegerTypeUint32 -> Right Proto3.ScalarTypeUint32
-        Core.IntegerTypeUint64 -> Right Proto3.ScalarTypeUint64
-        _ -> unexpectedE cx "32-bit or 64-bit integer type" (ShowCore.integerType v0)
-      Core.LiteralTypeString -> Right Proto3.ScalarTypeString
-      _ -> unexpectedE cx "supported literal type" (ShowCore.literalType lt)
-
--- | Encode a Hydra literal type as a wrapped Protobuf type (for optional scalars)
-encodeScalarTypeWrapped :: t0 -> Core.LiteralType -> Either Errors.Error Proto3.SimpleType
-encodeScalarTypeWrapped cx lt =
-
-      let toType =
-              \label -> Right (Proto3.SimpleTypeReference (Proto3.TypeName (Strings.cat [
-                "google.protobuf.",
-                label,
-                "Value"])))
-      in case lt of
-        Core.LiteralTypeBinary -> toType "Bytes"
-        Core.LiteralTypeBoolean -> toType "Bool"
-        Core.LiteralTypeFloat v0 -> case v0 of
-          Core.FloatTypeFloat32 -> toType "Float"
-          Core.FloatTypeFloat64 -> toType "Double"
-          _ -> unexpectedE cx "32-bit or 64-bit floating-point type" (ShowCore.floatType v0)
-        Core.LiteralTypeInteger v0 -> case v0 of
-          Core.IntegerTypeInt32 -> toType "Int32"
-          Core.IntegerTypeInt64 -> toType "Int64"
-          Core.IntegerTypeUint32 -> toType "UInt32"
-          Core.IntegerTypeUint64 -> toType "UInt64"
-          _ -> unexpectedE cx "32-bit or 64-bit integer type" (ShowCore.integerType v0)
-        Core.LiteralTypeString -> toType "String"
-        _ -> unexpectedE cx "supported literal type" (ShowCore.literalType lt)
-
--- | Encode a simple type for helper message fields
-encodeSimpleTypeForHelper :: t0 -> Packaging.Namespace -> Core.Type -> Either Errors.Error Proto3.SimpleType
-encodeSimpleTypeForHelper cx localNs typ =
-
-      let forNominal = \name -> Right (Proto3.SimpleTypeReference (encodeTypeReference localNs name))
-      in case (simplifyType typ) of
-        Core.TypeLiteral v0 -> Eithers.map (\st -> Proto3.SimpleTypeScalar st) (encodeScalarType cx v0)
-        Core.TypeRecord _ -> unexpectedE cx "named type reference" "anonymous record type"
-        Core.TypeUnion _ -> unexpectedE cx "named type reference" "anonymous union type"
-        Core.TypeUnit -> Right (Proto3.SimpleTypeReference (Proto3.TypeName "google.protobuf.Empty"))
-        Core.TypeVariable v0 -> forNominal v0
-        _ -> unexpectedE cx "simple type in structural type helper" (ShowCore.type_ (Strip.removeTypeAnnotations typ))
-
--- | Encode a Hydra type name as a Protobuf type name
-encodeTypeName :: Core.Name -> Proto3.TypeName
-encodeTypeName name = Proto3.TypeName (Names.localNameOf name)
-
--- | Encode a Hydra name as a Protobuf type reference
-encodeTypeReference :: Packaging.Namespace -> Core.Name -> Proto3.TypeName
-encodeTypeReference localNs name =
-
-      let qn = Names.qualifyName name
-          local = Packaging.qualifiedNameLocal qn
-          ns_ = Packaging.qualifiedNameNamespace qn
-          localNsParts = Maybes.fromMaybe [] (Lists.maybeInit (Strings.splitOn "." (Packaging.unNamespace localNs)))
-      in (Proto3.TypeName (Maybes.maybe local (\nsVal ->
-        let nsParts = Maybes.fromMaybe [] (Lists.maybeInit (Strings.splitOn "." (Packaging.unNamespace nsVal)))
-        in (Logic.ifElse (Equality.equal nsParts localNsParts) local (Strings.intercalate "." (Lists.concat [
-          nsParts,
-          [
-            local]])))) ns_))
-
-err :: t0 -> String -> Either Errors.Error t1
-err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))
-
--- | Find Protobuf options for a type (description and deprecated)
-findOptions :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error [Proto3.Option]
-findOptions cx g typ =
-    Eithers.bind (Annotations.getTypeDescription cx g typ) (\mdesc -> Eithers.bind (readBooleanAnnotation cx g Constants.key_deprecated typ) (\bdep ->
-      let mdescAnn =
-              Maybes.map (\desc_ -> Proto3.Option {
-                Proto3.optionName = Serde.descriptionOptionName,
-                Proto3.optionValue = (Proto3.ValueString desc_)}) mdesc
-          mdepAnn =
-                  Logic.ifElse bdep (Just (Proto3.Option {
-                    Proto3.optionName = "deprecated",
-                    Proto3.optionValue = (Proto3.ValueBoolean True)})) Nothing
-      in (Right (Maybes.cat [
-        mdescAnn,
-        mdepAnn]))))
-
--- | Eliminate type lambdas and type applications, replacing type variables with the string type
-flattenType :: Core.Type -> Core.Type
-flattenType typ =
-    Rewriting.rewriteType (\recurse -> \t -> case t of
-      Core.TypeForall v0 -> recurse (Variables.replaceFreeTypeVariable (Core.forallTypeParameter v0) (Core.TypeLiteral Core.LiteralTypeString) (Core.forallTypeBody v0))
-      Core.TypeApplication v0 -> recurse (Core.applicationTypeFunction v0)
-      _ -> recurse t) typ
-
-fromEitherString :: t0 -> Either String t1 -> Either Errors.Error t1
-fromEitherString cx e = Eithers.bimap (\msg -> Errors.ErrorOther (Errors.OtherError msg)) (\a -> a) e
-
--- | Generate a helper message definition for a structural type
-generateStructuralTypeMessage :: Context.Context -> t0 -> Packaging.Namespace -> ProtobufEnvironment.StructuralTypeRef -> Either Errors.Error (Proto3.Definition, Context.Context)
-generateStructuralTypeMessage cx g localNs ref =
-
-      let cx1 = Annotations.resetCount key_proto_field_index cx
-          cx2 = Pairs.second (Annotations.nextCount key_proto_field_index cx1)
-          makeField =
-                  \cx0 -> \fname -> \ftyp -> Eithers.bind (encodeSimpleTypeForHelper cx0 localNs ftyp) (\ft ->
-                    let idxPair = Annotations.nextCount key_proto_field_index cx0
-                        idx = Pairs.first idxPair
-                        cx1_ = Pairs.second idxPair
-                    in (Right (Proto3.Field {
-                      Proto3.fieldName = (Proto3.FieldName fname),
-                      Proto3.fieldJsonName = Nothing,
-                      Proto3.fieldType = (Proto3.FieldTypeSimple ft),
-                      Proto3.fieldNumber = idx,
-                      Proto3.fieldOptions = []}, cx1_)))
-      in case ref of
-        ProtobufEnvironment.StructuralTypeRefEither v0 ->
-          let lt = Pairs.first v0
-              rt = Pairs.second v0
-          in (Eithers.bind (makeField cx2 "left" lt) (\leftResult ->
-            let leftField = Pairs.first leftResult
-                cx3 = Pairs.second leftResult
-            in (Eithers.bind (makeField cx3 "right" rt) (\rightResult ->
-              let rightField = Pairs.first rightResult
-                  cx4 = Pairs.second rightResult
-              in (Right (Proto3.DefinitionMessage (Proto3.MessageDefinition {
-                Proto3.messageDefinitionName = (structuralTypeName localNs ref),
-                Proto3.messageDefinitionFields = [
-                  leftField,
-                  rightField],
-                Proto3.messageDefinitionOptions = []}), cx4))))))
-        ProtobufEnvironment.StructuralTypeRefPair v0 ->
-          let ft = Pairs.first v0
-              st = Pairs.second v0
-          in (Eithers.bind (makeField cx2 "first" ft) (\firstResult ->
-            let firstField = Pairs.first firstResult
-                cx3 = Pairs.second firstResult
-            in (Eithers.bind (makeField cx3 "second" st) (\secondResult ->
-              let secondField = Pairs.first secondResult
-                  cx4 = Pairs.second secondResult
-              in (Right (Proto3.DefinitionMessage (Proto3.MessageDefinition {
-                Proto3.messageDefinitionName = (structuralTypeName localNs ref),
-                Proto3.messageDefinitionFields = [
-                  firstField,
-                  secondField],
-                Proto3.messageDefinitionOptions = []}), cx4))))))
-
--- | Check if a type is an enum definition
-isEnumDefinition :: Core.Type -> Bool
-isEnumDefinition typ =
-    case (simplifyType typ) of
-      Core.TypeUnion v0 -> isEnumFields v0
-      _ -> False
-
--- | Check if all fields are unit types (i.e., this is an enum)
-isEnumFields :: [Core.FieldType] -> Bool
-isEnumFields fts =
-    Lists.foldl (\b -> \f -> Logic.and b (Predicates.isUnitType (simplifyType (Core.fieldTypeType f)))) True fts
-
-javaMultipleFilesOptionName :: String
-javaMultipleFilesOptionName = "java_multiple_files"
-
-javaPackageOptionName :: String
-javaPackageOptionName = "java_package"
-
-key_proto_field_index :: Core.Name
-key_proto_field_index = Core.Name "proto_field_index"
-
--- | Thread context through a list, accumulating results
-mapAccumResult :: (t0 -> t1 -> Either t2 (t3, t0)) -> t0 -> [t1] -> Either t2 ([t3], t0)
-mapAccumResult f cx0 xs =
-    Lists.foldl (\accE -> \x -> Eithers.bind accE (\accPair ->
-      let bs = Pairs.first accPair
-          cxN = Pairs.second accPair
-      in (Eithers.map (\resultPair -> (Lists.concat [
-        bs,
-        [
-          Pairs.first resultPair]], (Pairs.second resultPair))) (f cxN x)))) (Right ([], cx0)) xs
-
--- | Convert a Hydra module to Protocol Buffers v3 source files
-moduleToProtobuf :: Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToProtobuf mod defs cx g =
-
-      let ns_ = Packaging.moduleNamespace mod
-          partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-      in (Eithers.bind (constructModule cx g mod typeDefs) (\pfile ->
-        let content = Serialization.printExpr (Serialization.parenthesize (Serde.writeProtoFile pfile))
-            path = Proto3.unFileReference (namespaceToFileReference ns_)
-        in (Right (Maps.singleton path content))))
-
--- | Convert a Hydra namespace to a Protobuf file reference
-namespaceToFileReference :: Packaging.Namespace -> Proto3.FileReference
-namespaceToFileReference ns_ =
-
-      let pns =
-              Strings.intercalate "/" (Lists.map (\s -> Formatting.convertCaseCamelToLowerSnake s) (Strings.splitOn "." (Packaging.unNamespace ns_)))
-      in (Proto3.FileReference (Strings.cat2 pns ".proto"))
-
--- | Convert a Hydra namespace to a Protobuf package name
-namespaceToPackageName :: Packaging.Namespace -> Proto3.PackageName
-namespaceToPackageName ns_ =
-    Proto3.PackageName (Strings.intercalate "." (Lists.map (\s -> Formatting.convertCaseCamelToLowerSnake s) (Maybes.fromMaybe [] (Lists.maybeInit (Strings.splitOn "." (Packaging.unNamespace ns_))))))
-
--- | Read a boolean annotation from a type
-readBooleanAnnotation :: t0 -> Graph.Graph -> Core.Name -> Core.Type -> Either Errors.Error Bool
-readBooleanAnnotation cx g key typ =
-    Maybes.maybe (Right False) (\term -> ExtractCore.boolean g term) (Maps.lookup key (Annotations.typeAnnotationInternal typ))
-
--- | Simplify a type by removing annotations and unwrapping newtypes
-simplifyType :: Core.Type -> Core.Type
-simplifyType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeWrap v0 -> simplifyType v0
-      _ -> Strip.deannotateType typ
-
--- | Generate a message name for a structural type reference
-structuralTypeName :: t0 -> ProtobufEnvironment.StructuralTypeRef -> Proto3.TypeName
-structuralTypeName localNs ref =
-
-      let typeSuffix =
-              \typ ->
-                let st = simplifyType typ
-                in case st of
-                  Core.TypeLiteral v0 -> case v0 of
-                    Core.LiteralTypeBinary -> "bytes"
-                    Core.LiteralTypeBoolean -> "bool"
-                    Core.LiteralTypeFloat v1 -> case v1 of
-                      Core.FloatTypeFloat32 -> "float"
-                      Core.FloatTypeFloat64 -> "double"
-                      _ -> "float"
-                    Core.LiteralTypeInteger v1 -> case v1 of
-                      Core.IntegerTypeInt32 -> "int32"
-                      Core.IntegerTypeInt64 -> "int64"
-                      Core.IntegerTypeUint32 -> "uint32"
-                      Core.IntegerTypeUint64 -> "uint64"
-                      _ -> "int64"
-                    Core.LiteralTypeString -> "string"
-                    _ -> "value"
-                  Core.TypeRecord _ -> "record"
-                  Core.TypeUnion _ -> "union"
-                  Core.TypeVariable v0 -> Names.localNameOf v0
-                  Core.TypeUnit -> "unit"
-                  Core.TypeList _ -> "list"
-                  Core.TypeSet _ -> "set"
-                  Core.TypeMap _ -> "map"
-                  Core.TypeMaybe _ -> "maybe"
-                  _ -> "value"
-      in (Proto3.TypeName (case ref of
-        ProtobufEnvironment.StructuralTypeRefEither v0 -> Strings.cat [
-          "Either_",
-          (typeSuffix (Pairs.first v0)),
-          "_",
-          (typeSuffix (Pairs.second v0))]
-        ProtobufEnvironment.StructuralTypeRefPair v0 -> Strings.cat [
-          "Pair_",
-          (typeSuffix (Pairs.first v0)),
-          "_",
-          (typeSuffix (Pairs.second v0))]))
-
-unexpectedE :: t0 -> String -> String -> Either Errors.Error t1
-unexpectedE cx expected found =
-    err cx (Strings.cat [
-      "Expected ",
-      expected,
-      ", found: ",
-      found])
diff --git a/src/main/haskell/Hydra/Protobuf/Environment.hs b/src/main/haskell/Hydra/Protobuf/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/Environment.hs
+++ /dev/null
@@ -1,23 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Type definitions for the Protobuf code generation environment
-
-module Hydra.Protobuf.Environment 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 reference to a structural type (Either or Pair) with its component types
-data StructuralTypeRef =
-  -- | An Either type with left and right component types
-  StructuralTypeRefEither (Core.Type, Core.Type) |
-  -- | A Pair type with first and second component types
-  StructuralTypeRefPair (Core.Type, Core.Type)
-  deriving (Eq, Ord, Read, Show)
-
-_StructuralTypeRef = Core.Name "hydra.protobuf.environment.StructuralTypeRef"
-
-_StructuralTypeRef_either = Core.Name "either"
-
-_StructuralTypeRef_pair = Core.Name "pair"
diff --git a/src/main/haskell/Hydra/Protobuf/Language.hs b/src/main/haskell/Hydra/Protobuf/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/Language.hs
+++ /dev/null
@@ -1,122 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for Protobuf v3
-
-module Hydra.Protobuf.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-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.Set as S
-
--- | Language constraints for Protocol Buffers v3
-protobufLanguage :: Coders.Language
-protobufLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.protobuf"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants = Sets.empty
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint32,
-          Core.IntegerTypeUint64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantEither,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate =
-        \typ -> case typ of
-          Core.TypeMap v0 ->
-            let valuesType = Core.mapTypeValues v0
-                stripped = Strip.deannotateType valuesType
-            in case stripped of
-              Core.TypeMaybe _ -> False
-              _ -> True
-          _ -> True
-
--- | A set of reserved words in Protobuf
-protobufReservedWords :: S.Set String
-protobufReservedWords = Sets.fromList (Lists.concat [
-  fieldNames])
-  where
-    fieldNames =
-        [
-          "case",
-          "class",
-          "data",
-          "default",
-          "deriving",
-          "do",
-          "else",
-          "foreign",
-          "if",
-          "import",
-          "in",
-          "infix",
-          "infixl",
-          "infixr",
-          "instance",
-          "let",
-          "mdo",
-          "module",
-          "newtype",
-          "of",
-          "pattern",
-          "proc",
-          "rec",
-          "then",
-          "type",
-          "where"]
diff --git a/src/main/haskell/Hydra/Protobuf/Proto3.hs b/src/main/haskell/Hydra/Protobuf/Proto3.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/Proto3.hs
+++ /dev/null
@@ -1,287 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for Protocol Buffers v3 enum and message types, designed as a target for transformations.This model is loosely based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/type.proto, as well as the proto3 reference documentation
-
-module Hydra.Protobuf.Proto3 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 Definition =
-  DefinitionEnum EnumDefinition |
-  DefinitionMessage MessageDefinition
-  deriving (Eq, Ord, Read, Show)
-
-_Definition = Core.Name "hydra.protobuf.proto3.Definition"
-
-_Definition_enum = Core.Name "enum"
-
-_Definition_message = Core.Name "message"
-
--- | Enum type definition
-data EnumDefinition =
-  EnumDefinition {
-    -- | Enum type name
-    enumDefinitionName :: TypeName,
-    -- | Enum value definitions
-    enumDefinitionValues :: [EnumValue],
-    -- | Protocol buffer options
-    enumDefinitionOptions :: [Option]}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumDefinition = Core.Name "hydra.protobuf.proto3.EnumDefinition"
-
-_EnumDefinition_name = Core.Name "name"
-
-_EnumDefinition_values = Core.Name "values"
-
-_EnumDefinition_options = Core.Name "options"
-
--- | Enum value definition
-data EnumValue =
-  EnumValue {
-    -- | Enum value name
-    enumValueName :: EnumValueName,
-    -- | Enum value number
-    enumValueNumber :: Int,
-    -- | Protocol buffer options
-    enumValueOptions :: [Option]}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumValue = Core.Name "hydra.protobuf.proto3.EnumValue"
-
-_EnumValue_name = Core.Name "name"
-
-_EnumValue_number = Core.Name "number"
-
-_EnumValue_options = Core.Name "options"
-
-newtype EnumValueName =
-  EnumValueName {
-    unEnumValueName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumValueName = Core.Name "hydra.protobuf.proto3.EnumValueName"
-
--- | A single field of a message type
-data Field =
-  Field {
-    -- | The field name
-    fieldName :: FieldName,
-    -- | The field JSON name
-    fieldJsonName :: (Maybe String),
-    -- | The datatype of the field
-    fieldType :: FieldType,
-    -- | The field number
-    fieldNumber :: Int,
-    -- | The protocol buffer options
-    fieldOptions :: [Option]}
-  deriving (Eq, Ord, Read, Show)
-
-_Field = Core.Name "hydra.protobuf.proto3.Field"
-
-_Field_name = Core.Name "name"
-
-_Field_jsonName = Core.Name "jsonName"
-
-_Field_type = Core.Name "type"
-
-_Field_number = Core.Name "number"
-
-_Field_options = Core.Name "options"
-
--- | The name of a field
-newtype FieldName =
-  FieldName {
-    unFieldName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldName = Core.Name "hydra.protobuf.proto3.FieldName"
-
-data FieldType =
-  FieldTypeMap MapType |
-  FieldTypeOneof [Field] |
-  FieldTypeRepeated SimpleType |
-  FieldTypeSimple SimpleType
-  deriving (Eq, Ord, Read, Show)
-
-_FieldType = Core.Name "hydra.protobuf.proto3.FieldType"
-
-_FieldType_map = Core.Name "map"
-
-_FieldType_oneof = Core.Name "oneof"
-
-_FieldType_repeated = Core.Name "repeated"
-
-_FieldType_simple = Core.Name "simple"
-
-newtype FileReference =
-  FileReference {
-    unFileReference :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_FileReference = Core.Name "hydra.protobuf.proto3.FileReference"
-
-data MapType =
-  MapType {
-    mapTypeKeys :: SimpleType,
-    mapTypeValues :: SimpleType}
-  deriving (Eq, Ord, Read, Show)
-
-_MapType = Core.Name "hydra.protobuf.proto3.MapType"
-
-_MapType_keys = Core.Name "keys"
-
-_MapType_values = Core.Name "values"
-
--- | A protocol buffer message type
-data MessageDefinition =
-  MessageDefinition {
-    -- | The fully qualified message name
-    messageDefinitionName :: TypeName,
-    -- | The list of fields
-    messageDefinitionFields :: [Field],
-    -- | The protocol buffer options
-    messageDefinitionOptions :: [Option]}
-  deriving (Eq, Ord, Read, Show)
-
-_MessageDefinition = Core.Name "hydra.protobuf.proto3.MessageDefinition"
-
-_MessageDefinition_name = Core.Name "name"
-
-_MessageDefinition_fields = Core.Name "fields"
-
-_MessageDefinition_options = Core.Name "options"
-
--- | A protocol buffer option, which can be attached to a message, field, enumeration, etc
-data Option =
-  Option {
-    -- | The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `"map_entry"`. For custom options, it should be the fully-qualified name. For example, `"google.api.http"`.
-    optionName :: String,
-    -- | The option's value
-    optionValue :: Value}
-  deriving (Eq, Ord, Read, Show)
-
-_Option = Core.Name "hydra.protobuf.proto3.Option"
-
-_Option_name = Core.Name "name"
-
-_Option_value = Core.Name "value"
-
-newtype PackageName =
-  PackageName {
-    unPackageName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PackageName = Core.Name "hydra.protobuf.proto3.PackageName"
-
--- | A .proto file, usually containing one or more enum or message type definitions
-data ProtoFile =
-  ProtoFile {
-    protoFilePackage :: PackageName,
-    protoFileImports :: [FileReference],
-    protoFileTypes :: [Definition],
-    protoFileOptions :: [Option]}
-  deriving (Eq, Ord, Read, Show)
-
-_ProtoFile = Core.Name "hydra.protobuf.proto3.ProtoFile"
-
-_ProtoFile_package = Core.Name "package"
-
-_ProtoFile_imports = Core.Name "imports"
-
-_ProtoFile_types = Core.Name "types"
-
-_ProtoFile_options = Core.Name "options"
-
--- | One of several Proto3 scalar types
-data ScalarType =
-  ScalarTypeBool  |
-  ScalarTypeBytes  |
-  ScalarTypeDouble  |
-  ScalarTypeFixed32  |
-  ScalarTypeFixed64  |
-  ScalarTypeFloat  |
-  ScalarTypeInt32  |
-  ScalarTypeInt64  |
-  ScalarTypeSfixed32  |
-  ScalarTypeSfixed64  |
-  ScalarTypeSint32  |
-  ScalarTypeSint64  |
-  ScalarTypeString  |
-  ScalarTypeUint32  |
-  ScalarTypeUint64
-  deriving (Eq, Ord, Read, Show)
-
-_ScalarType = Core.Name "hydra.protobuf.proto3.ScalarType"
-
-_ScalarType_bool = Core.Name "bool"
-
-_ScalarType_bytes = Core.Name "bytes"
-
-_ScalarType_double = Core.Name "double"
-
-_ScalarType_fixed32 = Core.Name "fixed32"
-
-_ScalarType_fixed64 = Core.Name "fixed64"
-
-_ScalarType_float = Core.Name "float"
-
-_ScalarType_int32 = Core.Name "int32"
-
-_ScalarType_int64 = Core.Name "int64"
-
-_ScalarType_sfixed32 = Core.Name "sfixed32"
-
-_ScalarType_sfixed64 = Core.Name "sfixed64"
-
-_ScalarType_sint32 = Core.Name "sint32"
-
-_ScalarType_sint64 = Core.Name "sint64"
-
-_ScalarType_string = Core.Name "string"
-
-_ScalarType_uint32 = Core.Name "uint32"
-
-_ScalarType_uint64 = Core.Name "uint64"
-
--- | A scalar type or a reference to an enum type or message type
-data SimpleType =
-  SimpleTypeReference TypeName |
-  SimpleTypeScalar ScalarType
-  deriving (Eq, Ord, Read, Show)
-
-_SimpleType = Core.Name "hydra.protobuf.proto3.SimpleType"
-
-_SimpleType_reference = Core.Name "reference"
-
-_SimpleType_scalar = Core.Name "scalar"
-
--- | The local name of an enum type or message type
-newtype TypeName =
-  TypeName {
-    unTypeName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeName = Core.Name "hydra.protobuf.proto3.TypeName"
-
--- | A reference to an enum type or message type
-newtype TypeReference =
-  TypeReference {
-    unTypeReference :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeReference = Core.Name "hydra.protobuf.proto3.TypeReference"
-
--- | A scalar value
-data Value =
-  ValueBoolean Bool |
-  ValueString String
-  deriving (Eq, Ord, Read, Show)
-
-_Value = Core.Name "hydra.protobuf.proto3.Value"
-
-_Value_boolean = Core.Name "boolean"
-
-_Value_string = Core.Name "string"
diff --git a/src/main/haskell/Hydra/Protobuf/Serde.hs b/src/main/haskell/Hydra/Protobuf/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/Serde.hs
+++ /dev/null
@@ -1,261 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting Protocol Buffers v3 AST to abstract expressions
-
-module Hydra.Protobuf.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Protobuf.Proto3 as Proto3
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | The name of the deprecated option
-deprecatedOptionName :: String
-deprecatedOptionName = "deprecated"
-
--- | A special Protobuf option name for descriptions (documentation)
-descriptionOptionName :: String
-descriptionOptionName = "_description"
-
--- | Filter out internal options (those whose names start with underscore)
-excludeInternalOptions :: [Proto3.Option] -> [Proto3.Option]
-excludeInternalOptions opts =
-    Lists.filter (\opt -> Logic.not (Equality.equal (Maybes.fromMaybe 0 (Strings.maybeCharAt 0 (Proto3.optionName opt))) 95)) opts
-
--- | Prepend an optional description comment to an expression
-optDesc :: Bool -> [Proto3.Option] -> Ast.Expr -> Ast.Expr
-optDesc doubleNewline opts expr =
-
-      let descs = Lists.filter (\opt -> Equality.equal (Proto3.optionName opt) "_description") opts
-      in (Maybes.maybe expr (\firstDesc ->
-        let descValue = Proto3.optionValue firstDesc
-            descStr =
-                    case descValue of
-                      Proto3.ValueBoolean v0 -> Logic.ifElse v0 "true" "false"
-                      Proto3.ValueString v0 -> v0
-            commentLines = Lists.map (\line -> Strings.cat2 "// " line) (Strings.lines descStr)
-            comment = Serialization.cst (Strings.intercalate "\n" commentLines)
-            sep =
-                    Logic.ifElse doubleNewline (Serialization.doubleNewlineSep [
-                      comment,
-                      expr]) (Serialization.newlineSep [
-                      comment,
-                      expr])
-        in sep) (Lists.maybeHead descs))
-
--- | Wrap expressions in a curly-braced block with double-newline separation
-protoBlock :: [Ast.Expr] -> Ast.Expr
-protoBlock exprs =
-    Serialization.brackets Serialization.curlyBraces Serialization.fullBlockStyle (Serialization.doubleNewlineSep exprs)
-
--- | Append a semicolon to an expression
-semi :: Ast.Expr -> Ast.Expr
-semi e =
-    Serialization.noSep [
-      e,
-      (Serialization.cst ";")]
-
--- | Convert a definition to an expression
-writeDefinition :: Proto3.Definition -> Ast.Expr
-writeDefinition def =
-    case def of
-      Proto3.DefinitionEnum v0 -> writeEnumDefinition v0
-      Proto3.DefinitionMessage v0 -> writeMessageDefinition v0
-
--- | Convert an enum definition to an expression
-writeEnumDefinition :: Proto3.EnumDefinition -> Ast.Expr
-writeEnumDefinition ed =
-
-      let name = Proto3.enumDefinitionName ed
-          values = Proto3.enumDefinitionValues ed
-          options = Proto3.enumDefinitionOptions ed
-      in (optDesc False options (Serialization.spaceSep [
-        Serialization.cst "enum",
-        (Serialization.cst (Proto3.unTypeName name)),
-        (protoBlock (Lists.map writeEnumValue values))]))
-
--- | Convert an enum value to an expression
-writeEnumValue :: Proto3.EnumValue -> Ast.Expr
-writeEnumValue ev =
-
-      let name = Proto3.enumValueName ev
-          number = Proto3.enumValueNumber ev
-          options = Proto3.enumValueOptions ev
-      in (optDesc False options (semi (Serialization.spaceSep [
-        Serialization.cst (Proto3.unEnumValueName name),
-        (Serialization.cst "="),
-        (Serialization.cst (Literals.showInt32 number))])))
-
--- | Convert a field to an expression
-writeField :: Proto3.Field -> Ast.Expr
-writeField f =
-
-      let name = Proto3.fieldName f
-          typ = Proto3.fieldType f
-          num = Proto3.fieldNumber f
-          options = Proto3.fieldOptions f
-      in (optDesc False options (case typ of
-        Proto3.FieldTypeOneof v0 -> Serialization.spaceSep [
-          Serialization.cst "oneof",
-          (Serialization.cst (Proto3.unFieldName name)),
-          (protoBlock (Lists.map writeField v0))]
-        Proto3.FieldTypeMap v0 ->
-          let kt = Proto3.mapTypeKeys v0
-              vt = Proto3.mapTypeValues v0
-          in (semi (Serialization.spaceSep (Maybes.cat [
-            Maybes.pure (writeFieldType typ),
-            (Maybes.pure (Serialization.cst (Proto3.unFieldName name))),
-            (Maybes.pure (Serialization.cst "=")),
-            (Maybes.pure (Serialization.cst (Literals.showInt32 num))),
-            (writeFieldOptions options)])))
-        Proto3.FieldTypeRepeated _ -> semi (Serialization.spaceSep (Maybes.cat [
-          Maybes.pure (writeFieldType typ),
-          (Maybes.pure (Serialization.cst (Proto3.unFieldName name))),
-          (Maybes.pure (Serialization.cst "=")),
-          (Maybes.pure (Serialization.cst (Literals.showInt32 num))),
-          (writeFieldOptions options)]))
-        Proto3.FieldTypeSimple _ -> semi (Serialization.spaceSep (Maybes.cat [
-          Maybes.pure (writeFieldType typ),
-          (Maybes.pure (Serialization.cst (Proto3.unFieldName name))),
-          (Maybes.pure (Serialization.cst "=")),
-          (Maybes.pure (Serialization.cst (Literals.showInt32 num))),
-          (writeFieldOptions options)]))))
-
--- | Convert a field option to an expression
-writeFieldOption :: Proto3.Option -> Ast.Expr
-writeFieldOption opt =
-
-      let name = Proto3.optionName opt
-          value = Proto3.optionValue opt
-      in (Serialization.spaceSep [
-        Serialization.cst name,
-        (Serialization.cst "="),
-        (writeValue value)])
-
--- | Convert field options to an optional bracket-enclosed expression
-writeFieldOptions :: [Proto3.Option] -> Maybe Ast.Expr
-writeFieldOptions opts0 =
-
-      let opts = excludeInternalOptions opts0
-      in (Logic.ifElse (Lists.null opts) Nothing (Maybes.pure (Serialization.bracketList Serialization.inlineStyle (Lists.map writeFieldOption opts))))
-
--- | Convert a field type to an expression
-writeFieldType :: Proto3.FieldType -> Ast.Expr
-writeFieldType ftyp =
-    case ftyp of
-      Proto3.FieldTypeMap v0 ->
-        let kt = Proto3.mapTypeKeys v0
-            vt = Proto3.mapTypeValues v0
-        in (Serialization.noSep [
-          Serialization.cst "map",
-          (Serialization.angleBracesList Serialization.inlineStyle [
-            writeSimpleType kt,
-            (writeSimpleType vt)])])
-      Proto3.FieldTypeRepeated v0 -> Serialization.spaceSep [
-        Serialization.cst "repeated",
-        (writeSimpleType v0)]
-      Proto3.FieldTypeSimple v0 -> writeSimpleType v0
-      Proto3.FieldTypeOneof _ -> Serialization.cst "oneof"
-
--- | Convert a file-level option to an expression
-writeFileOption :: Proto3.Option -> Ast.Expr
-writeFileOption opt =
-
-      let name = Proto3.optionName opt
-          value = Proto3.optionValue opt
-      in (semi (Serialization.spaceSep [
-        Serialization.cst "option",
-        (Serialization.cst name),
-        (Serialization.cst "="),
-        (writeValue value)]))
-
--- | Convert file-level options to an optional newline-separated expression
-writeFileOptions :: [Proto3.Option] -> Maybe Ast.Expr
-writeFileOptions opts0 =
-
-      let opts = excludeInternalOptions opts0
-      in (Logic.ifElse (Lists.null opts) Nothing (Maybes.pure (Serialization.newlineSep (Lists.map writeFileOption opts))))
-
--- | Convert a file reference to an import expression
-writeImport :: Proto3.FileReference -> Ast.Expr
-writeImport ref =
-    semi (Serialization.spaceSep [
-      Serialization.cst "import",
-      (Serialization.cst (Literals.showString (Proto3.unFileReference ref)))])
-
--- | Convert a message definition to an expression
-writeMessageDefinition :: Proto3.MessageDefinition -> Ast.Expr
-writeMessageDefinition md =
-
-      let name = Proto3.messageDefinitionName md
-          fields = Proto3.messageDefinitionFields md
-          options = Proto3.messageDefinitionOptions md
-      in (optDesc False options (Serialization.spaceSep [
-        Serialization.cst "message",
-        (Serialization.cst (Proto3.unTypeName name)),
-        (protoBlock (Lists.map writeField fields))]))
-
--- | Convert a proto file to an expression
-writeProtoFile :: Proto3.ProtoFile -> Ast.Expr
-writeProtoFile pf =
-
-      let pkg = Proto3.protoFilePackage pf
-          imports = Proto3.protoFileImports pf
-          defs = Proto3.protoFileTypes pf
-          options = Proto3.protoFileOptions pf
-          headerSec =
-                  Maybes.pure (Serialization.newlineSep [
-                    semi (Serialization.cst "syntax = \"proto3\""),
-                    (semi (Serialization.spaceSep [
-                      Serialization.cst "package",
-                      (Serialization.cst (Proto3.unPackageName pkg))]))])
-          importsSec = Logic.ifElse (Lists.null imports) Nothing (Maybes.pure (Serialization.newlineSep (Lists.map writeImport imports)))
-          options1 = Lists.filter (\opt -> Logic.not (Equality.equal (Proto3.optionName opt) "_description")) options
-          optionsSec = writeFileOptions options1
-          defsSec = Logic.ifElse (Lists.null defs) Nothing (Maybes.pure (Serialization.doubleNewlineSep (Lists.map writeDefinition defs)))
-      in (optDesc True options (Serialization.doubleNewlineSep (Maybes.cat [
-        headerSec,
-        importsSec,
-        optionsSec,
-        defsSec])))
-
--- | Convert a scalar type to an expression
-writeScalarType :: Proto3.ScalarType -> Ast.Expr
-writeScalarType sct =
-    Serialization.cst (case sct of
-      Proto3.ScalarTypeBool -> "bool"
-      Proto3.ScalarTypeBytes -> "bytes"
-      Proto3.ScalarTypeDouble -> "double"
-      Proto3.ScalarTypeFixed32 -> "fixed32"
-      Proto3.ScalarTypeFixed64 -> "fixed64"
-      Proto3.ScalarTypeFloat -> "float"
-      Proto3.ScalarTypeInt32 -> "int32"
-      Proto3.ScalarTypeInt64 -> "int64"
-      Proto3.ScalarTypeSfixed32 -> "sfixed32"
-      Proto3.ScalarTypeSfixed64 -> "sfixed64"
-      Proto3.ScalarTypeSint32 -> "sint32"
-      Proto3.ScalarTypeSint64 -> "sint64"
-      Proto3.ScalarTypeString -> "string"
-      Proto3.ScalarTypeUint32 -> "uint32"
-      Proto3.ScalarTypeUint64 -> "uint64")
-
--- | Convert a simple type to an expression
-writeSimpleType :: Proto3.SimpleType -> Ast.Expr
-writeSimpleType st =
-    case st of
-      Proto3.SimpleTypeReference v0 -> Serialization.cst (Proto3.unTypeName v0)
-      Proto3.SimpleTypeScalar v0 -> writeScalarType v0
-
--- | Convert a value to an expression
-writeValue :: Proto3.Value -> Ast.Expr
-writeValue v =
-    Serialization.cst (case v of
-      Proto3.ValueBoolean v0 -> Logic.ifElse v0 "true" "false"
-      Proto3.ValueString v0 -> Literals.showString v0)
diff --git a/src/main/haskell/Hydra/Protobuf/SourceContext.hs b/src/main/haskell/Hydra/Protobuf/SourceContext.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Protobuf/SourceContext.hs
+++ /dev/null
@@ -1,20 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/source_context.proto
-
-module Hydra.Protobuf.SourceContext where
-
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | `SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.
-data SourceContext =
-  SourceContext {
-    -- | The path-qualified name of the .proto file that contained the associated protobuf element.  For example: `"google/protobuf/source_context.proto"`.
-    sourceContextFileName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_SourceContext = Core.Name "hydra.protobuf.sourceContext.SourceContext"
-
-_SourceContext_fileName = Core.Name "fileName"
diff --git a/src/main/haskell/Hydra/Python/Coder.hs b/src/main/haskell/Hydra/Python/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Coder.hs
+++ /dev/null
@@ -1,2534 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Python code generator: converts Hydra modules to Python source code
-
-module Hydra.Python.Coder where
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Arity as Arity
-import qualified Hydra.Checking as Checking
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Python.Environment as PythonEnvironment
-import qualified Hydra.Python.Names as PythonNames
-import qualified Hydra.Python.Serde as Serde
-import qualified Hydra.Python.Syntax as Syntax
-import qualified Hydra.Python.Utils as Utils
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Util as Util
-import qualified Hydra.Variables as Variables
-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
--- | Analyze a function term with Python-specific Graph management
-analyzePythonFunction :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Term -> Either t0 (Typing.FunctionStructure PythonEnvironment.PythonEnvironment)
-analyzePythonFunction cx env term =
-    Analysis.analyzeFunctionTermWith cx pythonBindingMetadata pythonEnvironmentGetGraph pythonEnvironmentSetGraph env term
--- | Create a class pattern for a unit variant (no value captured)
-classVariantPatternUnit :: Syntax.Name -> Syntax.ClosedPattern
-classVariantPatternUnit pyVariantName =
-    Syntax.ClosedPatternClass (Syntax.ClassPattern {
-      Syntax.classPatternNameOrAttribute = (Syntax.NameOrAttribute [
-        pyVariantName]),
-      Syntax.classPatternPositionalPatterns = Nothing,
-      Syntax.classPatternKeywordPatterns = Nothing})
--- | Create a class pattern for a variant with captured value
-classVariantPatternWithCapture :: PythonEnvironment.PythonEnvironment -> Syntax.Name -> Core.Name -> Syntax.ClosedPattern
-classVariantPatternWithCapture env pyVariantName varName =
-
-      let pyVarNameAttr = Syntax.NameOrAttribute [
-            pyVariantName]
-          capturePattern =
-                  Syntax.ClosedPatternCapture (Syntax.CapturePattern (Syntax.PatternCaptureTarget (PythonNames.encodeName False Util.CaseConventionLowerSnake env varName)))
-          keywordPattern =
-                  Syntax.KeywordPattern {
-                    Syntax.keywordPatternName = (Syntax.Name "value"),
-                    Syntax.keywordPatternPattern = (Syntax.PatternOr (Syntax.OrPattern [
-                      capturePattern]))}
-      in (Syntax.ClosedPatternClass (Syntax.ClassPattern {
-        Syntax.classPatternNameOrAttribute = pyVarNameAttr,
-        Syntax.classPatternPositionalPatterns = Nothing,
-        Syntax.classPatternKeywordPatterns = (Just (Syntax.KeywordPatterns [
-          keywordPattern]))}))
--- | Collect type variables from a type
-collectTypeVariables :: S.Set Core.Name -> Core.Type -> S.Set Core.Name
-collectTypeVariables initial typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeForall v0 ->
-        let v = Core.forallTypeParameter v0
-            body = Core.forallTypeBody v0
-        in (collectTypeVariables (Sets.insert v initial) body)
-      _ ->
-        let freeVars = Variables.freeVariablesInType typ
-            isTypeVar = \n -> isTypeVariableName n
-            filteredList = Lists.filter isTypeVar (Sets.toList freeVars)
-        in (Sets.union initial (Sets.fromList filteredList))
--- | Conditionally include a symbol name based on a boolean flag
-condImportSymbol :: t0 -> Bool -> Maybe t0
-condImportSymbol name flag = Logic.ifElse flag (Just name) Nothing
--- | Create a @dataclass(frozen=True) decorator
-dataclassDecorator :: Syntax.NamedExpression
-dataclassDecorator =
-    Syntax.NamedExpressionSimple (Utils.pyPrimaryToPyExpression (Utils.primaryWithRhs (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "dataclass"))) (Syntax.PrimaryRhsCall (Syntax.Args {
-      Syntax.argsPositional = [],
-      Syntax.argsKwargOrStarred = [
-        Syntax.KwargOrStarredKwarg (Syntax.Kwarg {
-          Syntax.kwargName = (Syntax.Name "frozen"),
-          Syntax.kwargValue = (Utils.pyAtomToPyExpression Syntax.AtomTrue)})],
-      Syntax.argsKwargOrDoubleStarred = []}))))
--- | Deconflict a variant name to avoid collisions with type names
-deconflictVariantName :: Bool -> PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Name -> Graph.Graph -> Syntax.Name
-deconflictVariantName isQualified env unionName fname g =
-
-      let candidateHydraName = Core.Name (Strings.cat2 (Core.unName unionName) (Formatting.capitalize (Core.unName fname)))
-          termCollision = Maps.member candidateHydraName (Graph.graphBoundTerms g)
-          typeCollision = Maps.member candidateHydraName (Graph.graphSchemaTypes g)
-          collision = Logic.or termCollision typeCollision
-      in (Logic.ifElse collision (Syntax.Name (Strings.cat2 (Syntax.unName (PythonNames.variantName isQualified env unionName fname)) "_")) (PythonNames.variantName isQualified env unionName fname))
--- | Rewrite case statements to avoid variable name collisions
-deduplicateCaseVariables :: [Core.Field] -> [Core.Field]
-deduplicateCaseVariables cases_ =
-
-      let rewriteCase =
-              \state -> \field ->
-                let countByName = Pairs.first state
-                    done = Pairs.second state
-                    fname = Core.fieldName field
-                    fterm = Core.fieldTerm field
-                in case (Strip.deannotateAndDetypeTerm fterm) of
-                  Core.TermLambda v0 ->
-                    let v = Core.lambdaParameter v0
-                        mdom = Core.lambdaDomain v0
-                        body = Core.lambdaBody v0
-                    in (Maybes.maybe (Maps.insert v 1 countByName, (Lists.cons field done)) (\count ->
-                      let count2 = Math.add count 1
-                          v2 = Core.Name (Strings.cat2 (Core.unName v) (Literals.showInt32 count2))
-                          newBody = Reduction.alphaConvert v v2 body
-                          newLam =
-                                  Core.Lambda {
-                                    Core.lambdaParameter = v2,
-                                    Core.lambdaDomain = mdom,
-                                    Core.lambdaBody = newBody}
-                          newTerm = Core.TermLambda newLam
-                          newField =
-                                  Core.Field {
-                                    Core.fieldName = fname,
-                                    Core.fieldTerm = newTerm}
-                      in (Maps.insert v count2 countByName, (Lists.cons newField done))) (Maps.lookup v countByName))
-                  _ -> (countByName, (Lists.cons field done))
-          result = Lists.foldl rewriteCase (Maps.empty, []) cases_
-      in (Lists.reverse (Pairs.second result))
--- | Recursively dig through forall types to find wrap types
-digForWrap :: Bool -> PythonEnvironment.PythonModuleMetadata -> Core.Type -> PythonEnvironment.PythonModuleMetadata
-digForWrap isTermAnnot meta typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeForall v0 -> digForWrap isTermAnnot meta (Core.forallTypeBody v0)
-      Core.TypeWrap _ -> Logic.ifElse isTermAnnot meta (setMetaUsesNode meta True)
-      _ -> meta
--- | Substitute unit for a variable in a term (for unit variant case handling)
-eliminateUnitVar :: Core.Name -> Core.Term -> Core.Term
-eliminateUnitVar v term0 =
-
-      let rewriteField =
-              \rewrite -> \fld -> Core.Field {
-                Core.fieldName = (Core.fieldName fld),
-                Core.fieldTerm = (rewrite (Core.fieldTerm fld))}
-          rewriteBinding =
-                  \rewrite -> \bnd -> Core.Binding {
-                    Core.bindingName = (Core.bindingName bnd),
-                    Core.bindingTerm = (rewrite (Core.bindingTerm bnd)),
-                    Core.bindingTypeScheme = (Core.bindingTypeScheme bnd)}
-          rewrite =
-                  \recurse -> \term -> case (Strip.deannotateAndDetypeTerm term) of
-                    Core.TermVariable v0 -> Logic.ifElse (Equality.equal v0 v) Core.TermUnit term
-                    Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (recurse (Core.annotatedTermBody v0)),
-                      Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-                    Core.TermApplication v0 -> Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (recurse (Core.applicationFunction v0)),
-                      Core.applicationArgument = (recurse (Core.applicationArgument v0))})
-                    Core.TermLambda v0 -> Logic.ifElse (Equality.equal (Core.lambdaParameter v0) v) term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.lambdaParameter v0),
-                      Core.lambdaDomain = (Core.lambdaDomain v0),
-                      Core.lambdaBody = (recurse (Core.lambdaBody v0))}))
-                    Core.TermCases v0 -> Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                      Core.caseStatementDefault = (Maybes.map recurse (Core.caseStatementDefault v0)),
-                      Core.caseStatementCases = (Lists.map (rewriteField recurse) (Core.caseStatementCases v0))})
-                    Core.TermLet v0 -> Core.TermLet (Core.Let {
-                      Core.letBindings = (Lists.map (rewriteBinding recurse) (Core.letBindings v0)),
-                      Core.letBody = (recurse (Core.letBody v0))})
-                    Core.TermList v0 -> Core.TermList (Lists.map recurse v0)
-                    Core.TermMap v0 -> Core.TermMap (Maps.fromList (Lists.map (\kv -> (recurse (Pairs.first kv), (recurse (Pairs.second kv)))) (Maps.toList v0)))
-                    Core.TermRecord v0 -> Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.recordTypeName v0),
-                      Core.recordFields = (Lists.map (rewriteField recurse) (Core.recordFields v0))})
-                    Core.TermSet v0 -> Core.TermSet (Sets.map recurse v0)
-                    Core.TermInject v0 -> Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.injectionTypeName v0),
-                      Core.injectionField = (rewriteField recurse (Core.injectionField v0))})
-                    Core.TermMaybe v0 -> Core.TermMaybe (Maybes.map recurse v0)
-                    Core.TermPair v0 -> Core.TermPair (recurse (Pairs.first v0), (recurse (Pairs.second v0)))
-                    Core.TermWrap v0 -> Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                      Core.wrappedTermBody = (recurse (Core.wrappedTermBody v0))})
-                    Core.TermEither v0 -> Core.TermEither (Eithers.bimap recurse recurse v0)
-                    Core.TermTypeApplication v0 -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                      Core.typeApplicationTermBody = (recurse (Core.typeApplicationTermBody v0)),
-                      Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})
-                    Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-                      Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                      Core.typeLambdaBody = (recurse (Core.typeLambdaBody v0))})
-                    _ -> term
-          go = \term -> rewrite go term
-      in (go term0)
--- | Create an initial empty metadata record with given namespaces
-emptyMetadata :: Packaging.Namespaces Syntax.DottedName -> PythonEnvironment.PythonModuleMetadata
-emptyMetadata ns =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = ns,
-      PythonEnvironment.pythonModuleMetadataTypeVariables = Sets.empty,
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = False,
-      PythonEnvironment.pythonModuleMetadataUsesCallable = False,
-      PythonEnvironment.pythonModuleMetadataUsesCast = False,
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = False,
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = False,
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = False,
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = False,
-      PythonEnvironment.pythonModuleMetadataUsesEither = False,
-      PythonEnvironment.pythonModuleMetadataUsesEnum = False,
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = False,
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = False,
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = False,
-      PythonEnvironment.pythonModuleMetadataUsesJust = False,
-      PythonEnvironment.pythonModuleMetadataUsesLeft = False,
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = False,
-      PythonEnvironment.pythonModuleMetadataUsesName = False,
-      PythonEnvironment.pythonModuleMetadataUsesNode = False,
-      PythonEnvironment.pythonModuleMetadataUsesNothing = False,
-      PythonEnvironment.pythonModuleMetadataUsesRight = False,
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = False}
--- | Encode a function application to a Python expression
-encodeApplication :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Application -> Either Errors.Error Syntax.Expression
-encodeApplication cx env app =
-
-      let g = pythonEnvironmentGetGraph env
-          term = Core.TermApplication app
-          gathered = Analysis.gatherArgs term []
-          fun = Pairs.first gathered
-          args = Pairs.second gathered
-          knownArity = termArityWithPrimitives g fun
-          arity = Math.max knownArity (Lists.length args)
-      in (Eithers.bind (Eithers.mapList (\t -> encodeTermInline cx env False t) args) (\pargs ->
-        let hargs = Lists.take arity pargs
-            rargs = Lists.drop arity pargs
-        in (Eithers.bind (encodeApplicationInner cx env fun hargs rargs) (\result ->
-          let lhs = Pairs.first result
-              remainingRargs = Pairs.second result
-              pyapp = Lists.foldl (\t -> \a -> Utils.functionCall (Utils.pyExpressionToPyPrimary t) [
-                    a]) lhs remainingRargs
-          in (Right pyapp)))))
--- | Inner helper for encodeApplication
-encodeApplicationInner :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Term -> [Syntax.Expression] -> [Syntax.Expression] -> Either Errors.Error (Syntax.Expression, [Syntax.Expression])
-encodeApplicationInner cx env fun hargs rargs =
-
-      let firstArg = Maybes.fromMaybe (Utils.pyNameToPyExpression (Syntax.Name "")) (Lists.maybeHead hargs)
-          restArgs = Lists.drop 1 hargs
-          withRest = \e -> Logic.ifElse (Lists.null restArgs) e (Utils.functionCall (Utils.pyExpressionToPyPrimary e) restArgs)
-          defaultCase =
-                  Eithers.bind (encodeTermInline cx env False fun) (\pfun -> Right (Utils.functionCall (Utils.pyExpressionToPyPrimary pfun) hargs, rargs))
-      in case (Strip.deannotateAndDetypeTerm fun) of
-        Core.TermProject v0 ->
-          let fname = Core.projectionField v0
-              fieldExpr = Utils.projectFromExpression firstArg (PythonNames.encodeFieldName env fname)
-          in (Right (withRest fieldExpr, rargs))
-        Core.TermCases v0 -> Eithers.bind (encodeUnionEliminationInline cx env v0 firstArg) (\inlineExpr -> Right (withRest inlineExpr, rargs))
-        Core.TermUnwrap _ ->
-          let valueExpr = Utils.projectFromExpression firstArg (Syntax.Name "value")
-              allArgs = Lists.concat2 restArgs rargs
-          in (Logic.ifElse (Lists.null allArgs) (Right (valueExpr, [])) (Right (Utils.functionCall (Utils.pyExpressionToPyPrimary valueExpr) allArgs, [])))
-        Core.TermLambda _ -> Eithers.bind (encodeTermInline cx env False fun) (\pfun -> Right (Utils.functionCall (Utils.pyExpressionToPyPrimary pfun) hargs, rargs))
-        Core.TermVariable v0 ->
-          let g = pythonEnvironmentGetGraph env
-              allArgs = Lists.concat2 hargs rargs
-          in (Maybes.cases (Maps.lookup v0 (Graph.graphPrimitives g)) (Maybes.maybe (Eithers.bind (encodeVariable cx env v0 hargs) (\expr -> Right (expr, rargs))) (\el -> Maybes.maybe (Eithers.bind (encodeVariable cx env v0 hargs) (\expr -> Right (expr, rargs))) (\ts ->
-            let elArity = Arity.typeSchemeArity ts
-                consumeCount = Math.min elArity (Lists.length allArgs)
-                consumedArgs = Lists.take consumeCount allArgs
-                remainingArgs = Lists.drop consumeCount allArgs
-            in (Logic.ifElse (Lists.null consumedArgs) (Eithers.bind (encodeVariable cx env v0 []) (\expr -> Right (expr, rargs))) (Right (Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionLowerSnake env v0)) consumedArgs, remainingArgs)))) (Core.bindingTypeScheme el)) (Lexical.lookupBinding g v0)) (\_prim ->
-            let wrappedArgs = wrapLazyArguments v0 hargs
-            in (Eithers.bind (encodeVariable cx env v0 wrappedArgs) (\expr -> Right (expr, rargs)))))
-        _ -> defaultCase
--- | Encode an application type to Python expression
-encodeApplicationType :: PythonEnvironment.PythonEnvironment -> Core.ApplicationType -> Either t0 Syntax.Expression
-encodeApplicationType env at =
-
-      let gatherParams =
-              \t -> \ps -> case (Strip.deannotateType t) of
-                Core.TypeApplication v0 -> gatherParams (Core.applicationTypeFunction v0) (Lists.cons (Core.applicationTypeArgument v0) ps)
-                Core.TypeAnnotated _ -> (t, ps)
-                Core.TypeFunction _ -> (t, ps)
-                Core.TypeForall _ -> (t, ps)
-                Core.TypeList _ -> (t, ps)
-                Core.TypeLiteral _ -> (t, ps)
-                Core.TypeMap _ -> (t, ps)
-                Core.TypeMaybe _ -> (t, ps)
-                Core.TypeEither _ -> (t, ps)
-                Core.TypePair _ -> (t, ps)
-                Core.TypeRecord _ -> (t, ps)
-                Core.TypeSet _ -> (t, ps)
-                Core.TypeUnion _ -> (t, ps)
-                Core.TypeUnit -> (t, ps)
-                Core.TypeVariable _ -> (t, ps)
-                Core.TypeVoid -> (t, ps)
-                Core.TypeWrap _ -> (t, ps)
-          bodyAndArgs = gatherParams (Core.TypeApplication at) []
-          body = Pairs.first bodyAndArgs
-          args = Pairs.second bodyAndArgs
-      in (Eithers.bind (encodeType env body) (\pyBody -> Eithers.bind (Eithers.mapList (encodeType env) args) (\pyArgs -> Right (Utils.primaryAndParams (Utils.pyExpressionToPyPrimary pyBody) pyArgs))))
--- | Encode a binding as a Python statement (function definition or assignment)
-encodeBindingAs :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Binding -> Either Errors.Error Syntax.Statement
-encodeBindingAs cx env binding =
-
-      let name1 = Core.bindingName binding
-          term1 = Core.bindingTerm binding
-          mts = Core.bindingTypeScheme binding
-          fname = PythonNames.encodeName True Util.CaseConventionLowerSnake env name1
-      in (Maybes.maybe (
-        let gathered = gatherLambdas term1
-            lambdaParams = Pairs.first gathered
-            innerBody = Pairs.second gathered
-            mcsa = isCaseStatementApplication innerBody
-        in (Maybes.maybe (
-          let mcs = extractCaseElimination term1
-          in (Maybes.maybe (Eithers.bind (encodeTermMultiline cx env term1) (\stmts -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "encodeTermMultiline returned no statements"))) (\x -> Right x) (Lists.maybeHead stmts))) (\cs ->
-            let tname = Core.caseStatementTypeName cs
-                dflt = Core.caseStatementDefault cs
-                cases_ = Core.caseStatementCases cs
-            in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt ->
-              let isEnum = Predicates.isEnumRowType rt
-                  isFull = isCasesFull rt cases_
-                  innerParam =
-                          Syntax.Param {
-                            Syntax.paramName = (Syntax.Name "x"),
-                            Syntax.paramAnnotation = Nothing}
-                  param =
-                          Syntax.ParamNoDefault {
-                            Syntax.paramNoDefaultParam = innerParam,
-                            Syntax.paramNoDefaultTypeComment = Nothing}
-                  params =
-                          Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-                            Syntax.paramNoDefaultParametersParamNoDefault = [
-                              param],
-                            Syntax.paramNoDefaultParametersParamWithDefault = [],
-                            Syntax.paramNoDefaultParametersStarEtc = Nothing})
-              in (Eithers.bind (Eithers.mapList (encodeCaseBlock cx env tname rt isEnum (\e -> \t -> encodeTermMultiline cx e t)) cases_) (\pyCases -> Eithers.bind (encodeDefaultCaseBlock (\t -> encodeTermInline cx env False t) isFull dflt tname) (\pyDflt ->
-                let subj = Syntax.SubjectExpressionSimple (Syntax.NamedExpressionSimple (Utils.pyNameToPyExpression (Syntax.Name "x")))
-                    allCases = Lists.concat2 pyCases pyDflt
-                    matchStmt =
-                            Syntax.StatementCompound (Syntax.CompoundStatementMatch (Syntax.MatchStatement {
-                              Syntax.matchStatementSubject = subj,
-                              Syntax.matchStatementCases = allCases}))
-                    body = Utils.indentedBlock Nothing [
-                          [
-                            matchStmt]]
-                    funcDefRaw =
-                            Syntax.FunctionDefRaw {
-                              Syntax.functionDefRawAsync = False,
-                              Syntax.functionDefRawName = fname,
-                              Syntax.functionDefRawTypeParams = [],
-                              Syntax.functionDefRawParams = (Just params),
-                              Syntax.functionDefRawReturnType = Nothing,
-                              Syntax.functionDefRawFuncTypeComment = Nothing,
-                              Syntax.functionDefRawBlock = body}
-                in (Right (Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-                  Syntax.functionDefinitionDecorators = Nothing,
-                  Syntax.functionDefinitionRaw = funcDefRaw})))))))))) mcs)) (\csa -> Logic.ifElse (Lists.null lambdaParams) (
-          let mcs = extractCaseElimination term1
-          in (Maybes.maybe (Eithers.bind (encodeTermMultiline cx env term1) (\stmts -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "encodeTermMultiline returned no statements"))) (\x -> Right x) (Lists.maybeHead stmts))) (\cs ->
-            let tname = Core.caseStatementTypeName cs
-                dflt = Core.caseStatementDefault cs
-                cases_ = Core.caseStatementCases cs
-            in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt ->
-              let isEnum = Predicates.isEnumRowType rt
-                  isFull = isCasesFull rt cases_
-                  innerParam =
-                          Syntax.Param {
-                            Syntax.paramName = (Syntax.Name "x"),
-                            Syntax.paramAnnotation = Nothing}
-                  param =
-                          Syntax.ParamNoDefault {
-                            Syntax.paramNoDefaultParam = innerParam,
-                            Syntax.paramNoDefaultTypeComment = Nothing}
-                  params =
-                          Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-                            Syntax.paramNoDefaultParametersParamNoDefault = [
-                              param],
-                            Syntax.paramNoDefaultParametersParamWithDefault = [],
-                            Syntax.paramNoDefaultParametersStarEtc = Nothing})
-              in (Eithers.bind (Eithers.mapList (encodeCaseBlock cx env tname rt isEnum (\e -> \t -> encodeTermMultiline cx e t)) cases_) (\pyCases -> Eithers.bind (encodeDefaultCaseBlock (\t -> encodeTermInline cx env False t) isFull dflt tname) (\pyDflt ->
-                let subj = Syntax.SubjectExpressionSimple (Syntax.NamedExpressionSimple (Utils.pyNameToPyExpression (Syntax.Name "x")))
-                    allCases = Lists.concat2 pyCases pyDflt
-                    matchStmt =
-                            Syntax.StatementCompound (Syntax.CompoundStatementMatch (Syntax.MatchStatement {
-                              Syntax.matchStatementSubject = subj,
-                              Syntax.matchStatementCases = allCases}))
-                    body = Utils.indentedBlock Nothing [
-                          [
-                            matchStmt]]
-                    funcDefRaw =
-                            Syntax.FunctionDefRaw {
-                              Syntax.functionDefRawAsync = False,
-                              Syntax.functionDefRawName = fname,
-                              Syntax.functionDefRawTypeParams = [],
-                              Syntax.functionDefRawParams = (Just params),
-                              Syntax.functionDefRawReturnType = Nothing,
-                              Syntax.functionDefRawFuncTypeComment = Nothing,
-                              Syntax.functionDefRawBlock = body}
-                in (Right (Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-                  Syntax.functionDefinitionDecorators = Nothing,
-                  Syntax.functionDefinitionRaw = funcDefRaw})))))))))) mcs)) (
-          let tname = Pairs.first csa
-              rest1 = Pairs.second csa
-              dflt = Pairs.first rest1
-              rest2 = Pairs.second rest1
-              cases_ = Pairs.first rest2
-          in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt ->
-            let isEnum = Predicates.isEnumRowType rt
-                isFull = isCasesFull rt cases_
-                capturedVarNames = Maybes.fromMaybe [] (Lists.maybeInit lambdaParams)
-                matchLambdaParam = Maybes.fromMaybe (Core.Name "") (Lists.maybeLast lambdaParams)
-                capturedParams =
-                        Lists.map (\n -> Syntax.ParamNoDefault {
-                          Syntax.paramNoDefaultParam = Syntax.Param {
-                            Syntax.paramName = (PythonNames.encodeName False Util.CaseConventionLowerSnake env n),
-                            Syntax.paramAnnotation = Nothing},
-                          Syntax.paramNoDefaultTypeComment = Nothing}) capturedVarNames
-                matchArgName = PythonNames.encodeName False Util.CaseConventionLowerSnake env matchLambdaParam
-                matchParam =
-                        Syntax.ParamNoDefault {
-                          Syntax.paramNoDefaultParam = Syntax.Param {
-                            Syntax.paramName = matchArgName,
-                            Syntax.paramAnnotation = Nothing},
-                          Syntax.paramNoDefaultTypeComment = Nothing}
-                allParams = Lists.concat2 capturedParams [
-                      matchParam]
-                params =
-                        Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-                          Syntax.paramNoDefaultParametersParamNoDefault = allParams,
-                          Syntax.paramNoDefaultParametersParamWithDefault = [],
-                          Syntax.paramNoDefaultParametersStarEtc = Nothing})
-                envWithParams = extendEnvWithLambdaParams env term1
-            in (Eithers.bind (Eithers.mapList (encodeCaseBlock cx envWithParams tname rt isEnum (\e -> \t -> encodeTermMultiline cx e t)) cases_) (\pyCases -> Eithers.bind (encodeDefaultCaseBlock (\t -> encodeTermInline cx envWithParams False t) isFull dflt tname) (\pyDflt ->
-              let subj = Syntax.SubjectExpressionSimple (Syntax.NamedExpressionSimple (Utils.pyNameToPyExpression matchArgName))
-                  allCases = Lists.concat2 pyCases pyDflt
-                  matchStmt =
-                          Syntax.StatementCompound (Syntax.CompoundStatementMatch (Syntax.MatchStatement {
-                            Syntax.matchStatementSubject = subj,
-                            Syntax.matchStatementCases = allCases}))
-                  body = Utils.indentedBlock Nothing [
-                        [
-                          matchStmt]]
-                  funcDefRaw =
-                          Syntax.FunctionDefRaw {
-                            Syntax.functionDefRawAsync = False,
-                            Syntax.functionDefRawName = fname,
-                            Syntax.functionDefRawTypeParams = [],
-                            Syntax.functionDefRawParams = (Just params),
-                            Syntax.functionDefRawReturnType = Nothing,
-                            Syntax.functionDefRawFuncTypeComment = Nothing,
-                            Syntax.functionDefRawBlock = body}
-              in (Right (Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-                Syntax.functionDefinitionDecorators = Nothing,
-                Syntax.functionDefinitionRaw = funcDefRaw}))))))))))) mcsa)) (\ts -> Eithers.bind (Annotations.getTermDescription cx (pythonEnvironmentGetGraph env) term1) (\comment ->
-        let normComment = Maybes.map Formatting.normalizeComment comment
-        in (encodeTermAssignment cx env name1 term1 ts normComment))) mts)
--- | Encode a binding as a walrus operator assignment
-encodeBindingAsAssignment :: Context.Context -> Bool -> PythonEnvironment.PythonEnvironment -> Core.Binding -> Either Errors.Error Syntax.NamedExpression
-encodeBindingAsAssignment cx allowThunking env binding =
-
-      let name = Core.bindingName binding
-          term = Core.bindingTerm binding
-          mts = Core.bindingTypeScheme binding
-          pyName = PythonNames.encodeName False Util.CaseConventionLowerSnake env name
-      in (Eithers.bind (encodeTermInline cx env False term) (\pbody ->
-        let tc = PythonEnvironment.pythonEnvironmentGraph env
-            isComplexVar = Predicates.isComplexVariable tc name
-            termIsComplex = Predicates.isComplexTerm tc term
-            isTrivial = Predicates.isTrivialTerm term
-            needsThunk =
-                    Logic.ifElse isTrivial False (Maybes.maybe (Logic.and allowThunking (Logic.or isComplexVar termIsComplex)) (\ts -> Logic.and allowThunking (Logic.and (Equality.equal (Arity.typeSchemeArity ts) 0) (Logic.or isComplexVar termIsComplex))) mts)
-            pterm = Logic.ifElse needsThunk (makeThunk pbody) pbody
-        in (Right (Syntax.NamedExpressionAssignment (Syntax.AssignmentExpression {
-          Syntax.assignmentExpressionName = pyName,
-          Syntax.assignmentExpressionExpression = pterm})))))
--- | Encode bindings as function definitions
-encodeBindingsAsDefs :: t0 -> (t0 -> t1 -> Either t2 t3) -> [t1] -> Either t2 [t3]
-encodeBindingsAsDefs env encodeBinding bindings = Eithers.mapList (encodeBinding env) bindings
--- | Encode a single case (Field) into a CaseBlock for a match statement
-encodeCaseBlock :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> [Core.FieldType] -> Bool -> (PythonEnvironment.PythonEnvironment -> Core.Term -> Either t1 [Syntax.Statement]) -> Core.Field -> Either t1 Syntax.CaseBlock
-encodeCaseBlock cx env tname rowType isEnum encodeBody field =
-
-      let fname = Core.fieldName field
-          fterm = Core.fieldTerm field
-          stripped = Strip.deannotateAndDetypeTerm fterm
-          effectiveLambda =
-                  case stripped of
-                    Core.TermLambda v0 -> v0
-                    _ ->
-                      let syntheticVar = Core.Name "_matchValue"
-                      in Core.Lambda {
-                        Core.lambdaParameter = syntheticVar,
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = stripped,
-                          Core.applicationArgument = (Core.TermVariable syntheticVar)}))}
-          v = Core.lambdaParameter effectiveLambda
-          rawBody = Core.lambdaBody effectiveLambda
-          isUnitVariant = isVariantUnitType rowType fname
-          effectiveBody = Logic.ifElse isUnitVariant (eliminateUnitVar v rawBody) rawBody
-          shouldCapture =
-                  Logic.not (Logic.or isUnitVariant (Logic.or (Variables.isFreeVariableInTerm v rawBody) (Predicates.isUnitTerm rawBody)))
-          env2 = pythonEnvironmentSetGraph (Scoping.extendGraphForLambda (pythonEnvironmentGetGraph env) effectiveLambda) env
-          pyVariantName = deconflictVariantName True env2 tname fname (PythonEnvironment.pythonEnvironmentGraph env2)
-          pattern = variantClosedPattern env2 tname fname pyVariantName rowType isEnum v shouldCapture
-      in (Eithers.bind (encodeBody env2 effectiveBody) (\stmts ->
-        let pyBody = Utils.indentedBlock Nothing [
-              stmts]
-        in (Right (Syntax.CaseBlock {
-          Syntax.caseBlockPatterns = (Utils.pyClosedPatternToPyPatterns pattern),
-          Syntax.caseBlockGuard = Nothing,
-          Syntax.caseBlockBody = pyBody}))))
--- | Encode the default (wildcard) case block for a match statement
-encodeDefaultCaseBlock :: (t0 -> Either t1 Syntax.Expression) -> Bool -> Maybe t0 -> Core.Name -> Either t1 [Syntax.CaseBlock]
-encodeDefaultCaseBlock encodeTerm isFull mdflt tname =
-    Eithers.bind (Maybes.maybe (Right (Logic.ifElse isFull (Utils.raiseAssertionError "Unreachable: all variants handled") (Utils.raiseTypeError (Strings.cat2 "Unsupported " (Names.localNameOf tname))))) (\d -> Eithers.bind (encodeTerm d) (\pyexpr -> Right (Utils.returnSingle pyexpr))) mdflt) (\stmt ->
-      let patterns = Utils.pyClosedPatternToPyPatterns Syntax.ClosedPatternWildcard
-          body = Utils.indentedBlock Nothing [
-                [
-                  stmt]]
-      in (Right [
-        Syntax.CaseBlock {
-          Syntax.caseBlockPatterns = patterns,
-          Syntax.caseBlockGuard = Nothing,
-          Syntax.caseBlockBody = body}]))
--- | Encode a definition (term or type) to Python statements
-encodeDefinition :: Context.Context -> PythonEnvironment.PythonEnvironment -> Packaging.Definition -> Either Errors.Error [[Syntax.Statement]]
-encodeDefinition cx env def_ =
-    case def_ of
-      Packaging.DefinitionTerm v0 ->
-        let name = Packaging.termDefinitionName v0
-            term = Packaging.termDefinitionTerm v0
-            typ =
-                    Maybes.maybe (Core.TypeScheme {
-                      Core.typeSchemeVariables = [],
-                      Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Unit")),
-                      Core.typeSchemeConstraints = Nothing}) (\x -> x) (Packaging.termDefinitionTypeScheme v0)
-        in (Eithers.bind (Annotations.getTermDescription cx (pythonEnvironmentGetGraph env) term) (\comment ->
-          let normComment = Maybes.map Formatting.normalizeComment comment
-          in (Eithers.bind (encodeTermAssignment cx env name term typ normComment) (\stmt -> Right [
-            [
-              stmt]]))))
-      Packaging.DefinitionType v0 ->
-        let name = Packaging.typeDefinitionName v0
-            typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)
-        in (Eithers.bind (Annotations.getTypeDescription cx (pythonEnvironmentGetGraph env) typ) (\comment ->
-          let normComment = Maybes.map Formatting.normalizeComment comment
-          in (encodeTypeAssignment cx env name typ normComment)))
--- | Encode an enum value assignment statement with optional comment
-encodeEnumValueAssignment :: t0 -> PythonEnvironment.PythonEnvironment -> Core.FieldType -> Either Errors.Error [Syntax.Statement]
-encodeEnumValueAssignment cx env fieldType =
-
-      let fname = Core.fieldTypeName fieldType
-          ftype = Core.fieldTypeType fieldType
-      in (Eithers.bind (Annotations.getTypeDescription cx (pythonEnvironmentGetGraph env) ftype) (\mcomment ->
-        let pyName = PythonNames.encodeEnumValue env fname
-            fnameStr = Core.unName fname
-            pyValue =
-                    Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionPascal env (Core.Name "hydra.core.Name"))) [
-                      Utils.doubleQuotedString fnameStr]
-            assignStmt = Utils.assignmentStatement pyName pyValue
-        in (Right (Maybes.maybe [
-          assignStmt] (\c -> [
-          assignStmt,
-          (Utils.pyExpressionToPyStatement (Utils.tripleQuotedString c))]) mcomment))))
--- | Encode a field (name-value pair) to a Python (Name, Expression) pair
-encodeField :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Field -> (Core.Term -> Either t1 t2) -> Either t1 (Syntax.Name, t2)
-encodeField cx env field encodeTerm =
-
-      let fname = Core.fieldName field
-          fterm = Core.fieldTerm field
-      in (Eithers.bind (encodeTerm fterm) (\pterm -> Right (PythonNames.encodeFieldName env fname, pterm)))
--- | Encode a field type for record definitions (field: type annotation)
-encodeFieldType :: t0 -> PythonEnvironment.PythonEnvironment -> Core.FieldType -> Either Errors.Error Syntax.Statement
-encodeFieldType cx env fieldType =
-
-      let fname = Core.fieldTypeName fieldType
-          ftype = Core.fieldTypeType fieldType
-      in (Eithers.bind (Annotations.getTypeDescription cx (pythonEnvironmentGetGraph env) ftype) (\comment ->
-        let pyName = Syntax.SingleTargetName (PythonNames.encodeFieldName env fname)
-        in (Eithers.bind (encodeType env ftype) (\pyType ->
-          let annotatedPyType = Utils.annotatedExpression comment pyType
-          in (Right (Utils.pyAssignmentToPyStatement (Syntax.AssignmentTyped (Syntax.TypedAssignment {
-            Syntax.typedAssignmentLhs = pyName,
-            Syntax.typedAssignmentType = annotatedPyType,
-            Syntax.typedAssignmentRhs = Nothing}))))))))
--- | Encode a float value to a Python expression
-encodeFloatValue :: Core.FloatValue -> Either t0 Syntax.Expression
-encodeFloatValue fv =
-    case fv of
-      Core.FloatValueBigfloat v0 -> Right (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "Decimal")) [
-        Utils.singleQuotedString (Literals.showBigfloat v0)])
-      Core.FloatValueFloat32 v0 -> encodeFloatValue_encodeFloat32 v0
-      Core.FloatValueFloat64 v0 -> encodeFloatValue_encodeFloat64 v0
-encodeFloatValue_encodeFloat32 :: Float -> Either t0 Syntax.Expression
-encodeFloatValue_encodeFloat32 v =
-
-      let s = Literals.showFloat32 v
-      in (Logic.ifElse (Equality.equal s "NaN") (Right (encodeFloatValue_pySpecialFloat "nan")) (Logic.ifElse (Equality.equal s "Infinity") (Right (encodeFloatValue_pySpecialFloat "inf")) (Logic.ifElse (Equality.equal s "-Infinity") (Right (encodeFloatValue_pySpecialFloat "-inf")) (Right (Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberFloat (Literals.float32ToBigfloat v))))))))
-encodeFloatValue_encodeFloat64 :: Double -> Either t0 Syntax.Expression
-encodeFloatValue_encodeFloat64 v =
-
-      let s = Literals.showFloat64 v
-      in (Logic.ifElse (Equality.equal s "NaN") (Right (encodeFloatValue_pySpecialFloat "nan")) (Logic.ifElse (Equality.equal s "Infinity") (Right (encodeFloatValue_pySpecialFloat "inf")) (Logic.ifElse (Equality.equal s "-Infinity") (Right (encodeFloatValue_pySpecialFloat "-inf")) (Logic.ifElse (Equality.equal s "-0.0") (Right (encodeFloatValue_pySpecialFloat "-0.0")) (Right (Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberFloat (Literals.float64ToBigfloat v)))))))))
-encodeFloatValue_pySpecialFloat :: String -> Syntax.Expression
-encodeFloatValue_pySpecialFloat value =
-    Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "float")) [
-      Utils.singleQuotedString value]
--- | Encode a forall type to Python expression
-encodeForallType :: PythonEnvironment.PythonEnvironment -> Core.ForallType -> Either t0 Syntax.Expression
-encodeForallType env lt =
-
-      let gatherParams =
-              \t -> \ps -> case (Strip.deannotateType t) of
-                Core.TypeForall v0 -> gatherParams (Core.forallTypeBody v0) (Lists.cons (Core.forallTypeParameter v0) ps)
-                Core.TypeAnnotated _ -> (t, (Lists.reverse ps))
-                Core.TypeApplication _ -> (t, (Lists.reverse ps))
-                Core.TypeFunction _ -> (t, (Lists.reverse ps))
-                Core.TypeList _ -> (t, (Lists.reverse ps))
-                Core.TypeLiteral _ -> (t, (Lists.reverse ps))
-                Core.TypeMap _ -> (t, (Lists.reverse ps))
-                Core.TypeMaybe _ -> (t, (Lists.reverse ps))
-                Core.TypeEither _ -> (t, (Lists.reverse ps))
-                Core.TypePair _ -> (t, (Lists.reverse ps))
-                Core.TypeRecord _ -> (t, (Lists.reverse ps))
-                Core.TypeSet _ -> (t, (Lists.reverse ps))
-                Core.TypeUnion _ -> (t, (Lists.reverse ps))
-                Core.TypeUnit -> (t, (Lists.reverse ps))
-                Core.TypeVariable _ -> (t, (Lists.reverse ps))
-                Core.TypeVoid -> (t, (Lists.reverse ps))
-                Core.TypeWrap _ -> (t, (Lists.reverse ps))
-          bodyAndParams = gatherParams (Core.TypeForall lt) []
-          body = Pairs.first bodyAndParams
-          params = Pairs.second bodyAndParams
-      in (Eithers.bind (encodeType env body) (\pyBody -> Right (Utils.primaryAndParams (Utils.pyExpressionToPyPrimary pyBody) (Lists.map (\n -> Syntax.ExpressionSimple (Syntax.Disjunction [
-        Syntax.Conjunction [
-          Syntax.InversionSimple (Syntax.Comparison {
-            Syntax.comparisonLhs = Syntax.BitwiseOr {
-              Syntax.bitwiseOrLhs = Nothing,
-              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                Syntax.bitwiseXorLhs = Nothing,
-                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                  Syntax.bitwiseAndLhs = Nothing,
-                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                    Syntax.shiftExpressionLhs = Nothing,
-                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                      Syntax.sumLhs = Nothing,
-                      Syntax.sumRhs = Syntax.Term {
-                        Syntax.termLhs = Nothing,
-                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                            Syntax.awaitPrimaryAwait = False,
-                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name (Core.unName n))))},
-                          Syntax.powerRhs = Nothing}))}}}}}},
-            Syntax.comparisonRhs = []})]])) params))))
--- | Encode a function definition with parameters and body
-encodeFunctionDefinition :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Name -> [Core.Name] -> [Core.Name] -> Core.Term -> [Core.Type] -> Maybe Core.Type -> Maybe String -> [Syntax.Statement] -> Either Errors.Error Syntax.Statement
-encodeFunctionDefinition cx env name tparams args body doms mcod comment prefixes =
-    Eithers.bind (Eithers.mapList (\pair ->
-      let argName = Pairs.first pair
-          typ = Pairs.second pair
-      in (Eithers.bind (encodeType env typ) (\pyTyp -> Right (Syntax.ParamNoDefault {
-        Syntax.paramNoDefaultParam = Syntax.Param {
-          Syntax.paramName = (PythonNames.encodeName False Util.CaseConventionLowerSnake env argName),
-          Syntax.paramAnnotation = (Just (Syntax.Annotation pyTyp))},
-        Syntax.paramNoDefaultTypeComment = Nothing})))) (Lists.zip args doms)) (\pyArgs ->
-      let pyParams =
-              Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-                Syntax.paramNoDefaultParametersParamNoDefault = pyArgs,
-                Syntax.paramNoDefaultParametersParamWithDefault = [],
-                Syntax.paramNoDefaultParametersStarEtc = Nothing})
-          isTCO = Logic.and (Logic.not (Lists.null args)) (Analysis.isSelfTailRecursive name body)
-      in (Eithers.bind (Logic.ifElse isTCO (Eithers.bind (encodeTermMultilineTCO cx env name args body) (\tcoStmts ->
-        let trueExpr = Syntax.NamedExpressionSimple (Utils.pyAtomToPyExpression Syntax.AtomTrue)
-            whileBody = Utils.indentedBlock Nothing [
-                  Lists.concat2 prefixes tcoStmts]
-            whileStmt =
-                    Syntax.StatementCompound (Syntax.CompoundStatementWhile (Syntax.WhileStatement {
-                      Syntax.whileStatementCondition = trueExpr,
-                      Syntax.whileStatementBody = whileBody,
-                      Syntax.whileStatementElse = Nothing}))
-        in (Right (Utils.indentedBlock comment [
-          [
-            whileStmt]])))) (Eithers.bind (encodeTermMultiline cx env body) (\stmts -> Right (Utils.indentedBlock comment [
-        Lists.concat2 prefixes stmts])))) (\block -> Eithers.bind (Maybes.maybe (Right Nothing) (\cod -> Eithers.bind (encodeType env cod) (\pytyp -> Right (Just pytyp))) mcod) (\mreturnType ->
-        let pyTparams =
-                Logic.ifElse useInlineTypeParams (Lists.map (\arg_ -> Utils.pyNameToPyTypeParameter (PythonNames.encodeTypeVariable arg_)) tparams) []
-            isThunk = Lists.null args
-            mDecorators = Logic.ifElse isThunk (Just (Syntax.Decorators [
-                  lruCacheDecorator])) Nothing
-            pyName = PythonNames.encodeName False Util.CaseConventionLowerSnake env name
-        in (Right (Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-          Syntax.functionDefinitionDecorators = mDecorators,
-          Syntax.functionDefinitionRaw = Syntax.FunctionDefRaw {
-            Syntax.functionDefRawAsync = False,
-            Syntax.functionDefRawName = pyName,
-            Syntax.functionDefRawTypeParams = pyTparams,
-            Syntax.functionDefRawParams = (Just pyParams),
-            Syntax.functionDefRawReturnType = mreturnType,
-            Syntax.functionDefRawFuncTypeComment = Nothing,
-            Syntax.functionDefRawBlock = block}}))))))))
--- | Encode a function type to Python Callable expression
-encodeFunctionType :: PythonEnvironment.PythonEnvironment -> Core.FunctionType -> Either t0 Syntax.Expression
-encodeFunctionType env ft =
-
-      let gatherParams =
-              \rdoms -> \ftype ->
-                let innerCod = Core.functionTypeCodomain ftype
-                    dom = Core.functionTypeDomain ftype
-                in case (Strip.deannotateType innerCod) of
-                  Core.TypeFunction v0 -> gatherParams (Lists.cons dom rdoms) v0
-                  Core.TypeAnnotated _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeApplication _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeForall _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeList _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeLiteral _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeMap _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeMaybe _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeEither _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypePair _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeRecord _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeSet _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeUnion _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeUnit -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeVariable _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeVoid -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-                  Core.TypeWrap _ -> (Lists.reverse (Lists.cons dom rdoms), innerCod)
-          domsAndCod = gatherParams [] ft
-          doms = Pairs.first domsAndCod
-          cod = Pairs.second domsAndCod
-      in (Eithers.bind (Eithers.mapList (encodeType env) doms) (\pydoms -> Eithers.bind (encodeType env cod) (\pycod -> Right (Utils.pyPrimaryToPyExpression (Utils.primaryWithSlices (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "Callable"))) (Utils.pyPrimaryToPySlice (Syntax.PrimarySimple (Syntax.AtomList (Utils.pyList pydoms)))) [
-        Syntax.SliceOrStarredExpressionSlice (Utils.pyExpressionToPySlice pycod)])))))
--- | Encode an integer value to a Python expression
-encodeIntegerValue :: Core.IntegerValue -> Either t0 Syntax.Expression
-encodeIntegerValue iv =
-
-      let toPyInt = \n -> Right (Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberInteger n)))
-      in case iv of
-        Core.IntegerValueBigint v0 -> toPyInt v0
-        Core.IntegerValueInt8 v0 -> toPyInt (Literals.int8ToBigint v0)
-        Core.IntegerValueInt16 v0 -> toPyInt (Literals.int16ToBigint v0)
-        Core.IntegerValueInt32 v0 -> toPyInt (Literals.int32ToBigint v0)
-        Core.IntegerValueInt64 v0 -> toPyInt (Literals.int64ToBigint v0)
-        Core.IntegerValueUint8 v0 -> toPyInt (Literals.uint8ToBigint v0)
-        Core.IntegerValueUint16 v0 -> toPyInt (Literals.uint16ToBigint v0)
-        Core.IntegerValueUint32 v0 -> toPyInt (Literals.uint32ToBigint v0)
-        Core.IntegerValueUint64 v0 -> toPyInt (Literals.uint64ToBigint v0)
--- | Encode a literal value to a Python expression
-encodeLiteral :: Core.Literal -> Either t0 Syntax.Expression
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBinary v0 ->
-        let byteValues = Literals.binaryToBytes v0
-        in (Right (Utils.functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "bytes"))) [
-          Utils.pyAtomToPyExpression (Syntax.AtomList (Utils.pyList (Lists.map (\byteVal -> Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberInteger (Literals.int32ToBigint byteVal)))) byteValues)))]))
-      Core.LiteralBoolean v0 -> Right (Utils.pyAtomToPyExpression (Logic.ifElse v0 Syntax.AtomTrue Syntax.AtomFalse))
-      Core.LiteralDecimal v0 -> Right (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "Decimal")) [
-        Utils.singleQuotedString (Literals.showDecimal v0)])
-      Core.LiteralFloat v0 -> encodeFloatValue v0
-      Core.LiteralInteger v0 -> encodeIntegerValue v0
-      Core.LiteralString v0 -> Right (Utils.stringToPyExpression Syntax.QuoteStyleDouble v0)
--- | Encode a literal type to a Python type expression
-encodeLiteralType :: Core.LiteralType -> Either t0 Syntax.Expression
-encodeLiteralType lt =
-
-      let findName =
-              case lt of
-                Core.LiteralTypeBinary -> "bytes"
-                Core.LiteralTypeBoolean -> "bool"
-                Core.LiteralTypeDecimal -> "Decimal"
-                Core.LiteralTypeFloat v0 -> case v0 of
-                  Core.FloatTypeBigfloat -> "Decimal"
-                  Core.FloatTypeFloat32 -> "float"
-                  Core.FloatTypeFloat64 -> "float"
-                Core.LiteralTypeInteger _ -> "int"
-                Core.LiteralTypeString -> "str"
-      in (Right (Syntax.ExpressionSimple (Syntax.Disjunction [
-        Syntax.Conjunction [
-          Syntax.InversionSimple (Syntax.Comparison {
-            Syntax.comparisonLhs = Syntax.BitwiseOr {
-              Syntax.bitwiseOrLhs = Nothing,
-              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                Syntax.bitwiseXorLhs = Nothing,
-                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                  Syntax.bitwiseAndLhs = Nothing,
-                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                    Syntax.shiftExpressionLhs = Nothing,
-                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                      Syntax.sumLhs = Nothing,
-                      Syntax.sumRhs = Syntax.Term {
-                        Syntax.termLhs = Nothing,
-                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                            Syntax.awaitPrimaryAwait = False,
-                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name findName)))},
-                          Syntax.powerRhs = Nothing}))}}}}}},
-            Syntax.comparisonRhs = []})]])))
--- | Generate name constants for a type as class-level attributes
-encodeNameConstants :: PythonEnvironment.PythonEnvironment -> Core.Name -> [Core.FieldType] -> [Syntax.Statement]
-encodeNameConstants env name fields =
-
-      let toStmt =
-              \pair -> Utils.assignmentStatement (Pairs.first pair) (Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionPascal env (Core.Name "hydra.core.Name"))) [
-                Utils.doubleQuotedString (Core.unName (Pairs.second pair))])
-          namePair = (PythonNames.encodeConstantForTypeName env name, name)
-          fieldPairs =
-                  Lists.map (\field -> (PythonNames.encodeConstantForFieldName env name (Core.fieldTypeName field), (Core.fieldTypeName field))) fields
-      in (Lists.map toStmt (Lists.cons namePair fieldPairs))
--- | Encode a Hydra module to a Python module AST
-encodePythonModule :: Context.Context -> Graph.Graph -> Packaging.Module -> [Packaging.Definition] -> Either Errors.Error Syntax.Module
-encodePythonModule cx g mod defs0 =
-
-      let defs = Environment.reorderDefs defs0
-          meta0 = gatherMetadata (Packaging.moduleNamespace mod) defs
-          namespaces0 = PythonEnvironment.pythonModuleMetadataNamespaces meta0
-          env0 = initialEnvironment namespaces0 g
-          isTypeMod = isTypeModuleCheck defs0
-      in (withDefinitions env0 defs (\env -> Eithers.bind (Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (\d -> encodeDefinition cx env d) defs)) (\defStmts ->
-        let meta2 = Logic.ifElse (Logic.and (Logic.not isTypeMod) useInlineTypeParams) (setMetaUsesTypeVar meta0 False) meta0
-            meta =
-                    Logic.ifElse (Logic.and isTypeMod (Equality.equal targetPythonVersion PythonEnvironment.PythonVersionPython310)) (setMetaUsesTypeAlias meta2 True) meta2
-            namespaces = PythonEnvironment.pythonModuleMetadataNamespaces meta0
-            commentStmts =
-                    Maybes.maybe [] (\c -> [
-                      Utils.commentStatement c]) (Maybes.map Formatting.normalizeComment (Packaging.moduleDescription mod))
-            importStmts = moduleImports namespaces meta
-            tvars =
-                    Logic.ifElse (Logic.or isTypeMod (Logic.not useInlineTypeParams)) (PythonEnvironment.pythonModuleMetadataTypeVariables meta) Sets.empty
-            tvarStmts = Lists.map (\tv -> tvarStatement (PythonNames.encodeTypeVariable tv)) (Sets.toList tvars)
-            body =
-                    Lists.filter (\group -> Logic.not (Lists.null group)) (Lists.concat [
-                      [
-                        commentStmts,
-                        importStmts,
-                        tvarStmts],
-                      defStmts])
-        in (Right (Syntax.Module body)))))
--- | Encode a record type as a Python dataclass
-encodeRecordType :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> [Core.FieldType] -> Maybe String -> Either Errors.Error Syntax.Statement
-encodeRecordType cx env name rowType comment =
-    Eithers.bind (Eithers.mapList (encodeFieldType cx env) rowType) (\pyFields ->
-      let constStmts = encodeNameConstants env name rowType
-          body =
-                  Utils.indentedBlock comment [
-                    pyFields,
-                    constStmts]
-          boundVars = PythonEnvironment.pythonEnvironmentBoundTypeVariables env
-          tparamList = Pairs.first boundVars
-          mGenericArg = genericArg tparamList
-          args = Maybes.maybe Nothing (\a -> Just (Utils.pyExpressionsToPyArgs [
-                a])) mGenericArg
-          decs = Just (Syntax.Decorators [
-                dataclassDecorator])
-          pyName = PythonNames.encodeName False Util.CaseConventionPascal env name
-          noTypeParams = []
-      in (Right (Utils.pyClassDefinitionToPyStatement (Syntax.ClassDefinition {
-        Syntax.classDefinitionDecorators = decs,
-        Syntax.classDefinitionName = pyName,
-        Syntax.classDefinitionTypeParams = noTypeParams,
-        Syntax.classDefinitionArguments = args,
-        Syntax.classDefinitionBody = body}))))
--- | Encode a term assignment to a Python statement
-encodeTermAssignment :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Term -> Core.TypeScheme -> Maybe String -> Either Errors.Error Syntax.Statement
-encodeTermAssignment cx env name term ts comment =
-    Eithers.bind (analyzePythonFunction cx env term) (\fs ->
-      let tparams = Typing.functionStructureTypeParams fs
-          params = Typing.functionStructureParams fs
-          bindings = Typing.functionStructureBindings fs
-          body = Typing.functionStructureBody fs
-          doms = Typing.functionStructureDomains fs
-          mcod = Typing.functionStructureCodomain fs
-          env2 = Typing.functionStructureEnvironment fs
-          tc = PythonEnvironment.pythonEnvironmentGraph env2
-          binding =
-                  Core.Binding {
-                    Core.bindingName = name,
-                    Core.bindingTerm = term,
-                    Core.bindingTypeScheme = (Just ts)}
-          isComplex = Predicates.isComplexBinding tc binding
-          isTrivial = Predicates.isTrivialTerm term
-      in (Logic.ifElse (Logic.and isComplex (Logic.not isTrivial)) (Eithers.bind (Eithers.mapList (encodeBindingAs cx env2) bindings) (\bindingStmts -> encodeFunctionDefinition cx env2 name tparams params body doms mcod comment bindingStmts)) (Eithers.bind (encodeTermInline cx env2 False body) (\bodyExpr ->
-        let pyName = PythonNames.encodeName False Util.CaseConventionLowerSnake env2 name
-        in (Right (Utils.annotatedStatement comment (Utils.assignmentStatement pyName bodyExpr)))))))
--- | Encode a term to a Python expression (inline form)
-encodeTermInline :: Context.Context -> PythonEnvironment.PythonEnvironment -> Bool -> Core.Term -> Either Errors.Error Syntax.Expression
-encodeTermInline cx env noCast term =
-
-      let encode = \t -> encodeTermInline cx env False t
-          stripTypeApps =
-                  \t -> case t of
-                    Core.TermAnnotated v0 -> stripTypeApps (Core.annotatedTermBody v0)
-                    Core.TermTypeApplication v0 -> stripTypeApps (Core.typeApplicationTermBody v0)
-                    _ -> t
-          withCast =
-                  \pyexp -> Logic.ifElse (Logic.or noCast (PythonEnvironment.pythonEnvironmentSkipCasts env)) (Right pyexp) (
-                    let tc = PythonEnvironment.pythonEnvironmentGraph env
-                        mtyp = Eithers.map (\_r -> Pairs.first _r) (Checking.typeOf cx tc [] term)
-                    in (Eithers.either (\_ -> Right pyexp) (\typ -> Eithers.either (\_ -> Right pyexp) (\pytyp -> Right (Utils.castTo pytyp pyexp)) (encodeType env typ)) mtyp))
-      in case (Strip.deannotateAndDetypeTerm term) of
-        Core.TermApplication v0 -> encodeApplication cx env v0
-        Core.TermEither v0 -> Eithers.either (\t1 -> Eithers.bind (encode t1) (\pyexp -> withCast (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "Left")) [
-          pyexp]))) (\t1 -> Eithers.bind (encode t1) (\pyexp -> withCast (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "Right")) [
-          pyexp]))) v0
-        Core.TermLambda v0 -> Eithers.bind (analyzePythonFunction cx env (Core.TermLambda v0)) (\fs ->
-          let params = Typing.functionStructureParams fs
-              bindings = Typing.functionStructureBindings fs
-              innerBody = Typing.functionStructureBody fs
-              innerEnv0 = Typing.functionStructureEnvironment fs
-              bindingNames = Lists.map (\b -> Core.bindingName b) bindings
-              innerEnv =
-                      PythonEnvironment.PythonEnvironment {
-                        PythonEnvironment.pythonEnvironmentNamespaces = (PythonEnvironment.pythonEnvironmentNamespaces innerEnv0),
-                        PythonEnvironment.pythonEnvironmentBoundTypeVariables = (PythonEnvironment.pythonEnvironmentBoundTypeVariables innerEnv0),
-                        PythonEnvironment.pythonEnvironmentGraph = (PythonEnvironment.pythonEnvironmentGraph innerEnv0),
-                        PythonEnvironment.pythonEnvironmentNullaryBindings = (PythonEnvironment.pythonEnvironmentNullaryBindings innerEnv0),
-                        PythonEnvironment.pythonEnvironmentVersion = (PythonEnvironment.pythonEnvironmentVersion innerEnv0),
-                        PythonEnvironment.pythonEnvironmentSkipCasts = (PythonEnvironment.pythonEnvironmentSkipCasts innerEnv0),
-                        PythonEnvironment.pythonEnvironmentInlineVariables = (Sets.union (Sets.fromList bindingNames) (PythonEnvironment.pythonEnvironmentInlineVariables innerEnv0))}
-          in (Eithers.bind (encodeTermInline cx innerEnv False innerBody) (\pbody ->
-            let pparams = Lists.map (PythonNames.encodeName False Util.CaseConventionLowerSnake innerEnv) params
-            in (Logic.ifElse (Lists.null bindings) (Right (makeUncurriedLambda pparams pbody)) (Eithers.bind (Eithers.mapList (encodeBindingAsAssignment cx False innerEnv) bindings) (\pbindingExprs ->
-              let pbindingStarExprs = Lists.map (\ne -> Syntax.StarNamedExpressionSimple ne) pbindingExprs
-                  pbodyStarExpr = Utils.pyExpressionToPyStarNamedExpression pbody
-                  tupleElements = Lists.concat2 pbindingStarExprs [
-                        pbodyStarExpr]
-                  tupleExpr = Utils.pyAtomToPyExpression (Syntax.AtomTuple (Syntax.Tuple tupleElements))
-                  indexValue =
-                          Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberInteger (Literals.int32ToBigint (Lists.length bindings))))
-                  indexedExpr = Utils.primaryWithExpressionSlices (Utils.pyExpressionToPyPrimary tupleExpr) [
-                        indexValue]
-              in (Right (makeUncurriedLambda pparams (Utils.pyPrimaryToPyExpression indexedExpr)))))))))
-        Core.TermProject v0 ->
-          let fname = Core.projectionField v0
-          in (Right (makeCurriedLambda [
-            Syntax.Name "v1"] (Utils.projectFromExpression (Syntax.ExpressionSimple (Syntax.Disjunction [
-            Syntax.Conjunction [
-              Syntax.InversionSimple (Syntax.Comparison {
-                Syntax.comparisonLhs = Syntax.BitwiseOr {
-                  Syntax.bitwiseOrLhs = Nothing,
-                  Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                    Syntax.bitwiseXorLhs = Nothing,
-                    Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                      Syntax.bitwiseAndLhs = Nothing,
-                      Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                        Syntax.shiftExpressionLhs = Nothing,
-                        Syntax.shiftExpressionRhs = Syntax.Sum {
-                          Syntax.sumLhs = Nothing,
-                          Syntax.sumRhs = Syntax.Term {
-                            Syntax.termLhs = Nothing,
-                            Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                              Syntax.powerLhs = Syntax.AwaitPrimary {
-                                Syntax.awaitPrimaryAwait = False,
-                                Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "v1")))},
-                              Syntax.powerRhs = Nothing}))}}}}}},
-                Syntax.comparisonRhs = []})]])) (PythonNames.encodeFieldName env fname))))
-        Core.TermUnwrap _ -> Right (makeCurriedLambda [
-          Syntax.Name "v1"] (Utils.projectFromExpression (Syntax.ExpressionSimple (Syntax.Disjunction [
-          Syntax.Conjunction [
-            Syntax.InversionSimple (Syntax.Comparison {
-              Syntax.comparisonLhs = Syntax.BitwiseOr {
-                Syntax.bitwiseOrLhs = Nothing,
-                Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                  Syntax.bitwiseXorLhs = Nothing,
-                  Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                    Syntax.bitwiseAndLhs = Nothing,
-                    Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                      Syntax.shiftExpressionLhs = Nothing,
-                      Syntax.shiftExpressionRhs = Syntax.Sum {
-                        Syntax.sumLhs = Nothing,
-                        Syntax.sumRhs = Syntax.Term {
-                          Syntax.termLhs = Nothing,
-                          Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                            Syntax.powerLhs = Syntax.AwaitPrimary {
-                              Syntax.awaitPrimaryAwait = False,
-                              Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "v1")))},
-                            Syntax.powerRhs = Nothing}))}}}}}},
-              Syntax.comparisonRhs = []})]])) (Syntax.Name "value")))
-        Core.TermCases _ -> Right (unsupportedExpression "case expressions as values are not yet supported")
-        Core.TermLet v0 ->
-          let bindings = Core.letBindings v0
-              body = Core.letBody v0
-          in (Logic.ifElse (Lists.null bindings) (encodeTermInline cx env False body) (withLetInline env v0 (\innerEnv -> Eithers.bind (Eithers.mapList (encodeBindingAsAssignment cx False innerEnv) bindings) (\pbindingExprs -> Eithers.bind (encodeTermInline cx innerEnv False body) (\pbody ->
-            let pbindingStarExprs = Lists.map (\ne -> Syntax.StarNamedExpressionSimple ne) pbindingExprs
-                pbodyStarExpr = Utils.pyExpressionToPyStarNamedExpression pbody
-                tupleElements = Lists.concat2 pbindingStarExprs [
-                      pbodyStarExpr]
-                tupleExpr = Utils.pyAtomToPyExpression (Syntax.AtomTuple (Syntax.Tuple tupleElements))
-                indexValue =
-                        Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberInteger (Literals.int32ToBigint (Lists.length bindings))))
-                indexedExpr = Utils.primaryWithExpressionSlices (Utils.pyExpressionToPyPrimary tupleExpr) [
-                      indexValue]
-            in (Right (Utils.pyPrimaryToPyExpression indexedExpr)))))))
-        Core.TermList v0 -> Eithers.bind (Eithers.mapList encode v0) (\pyExprs -> Right (Utils.pyAtomToPyExpression (Syntax.AtomTuple (Syntax.Tuple (Lists.map Utils.pyExpressionToPyStarNamedExpression pyExprs)))))
-        Core.TermLiteral v0 -> encodeLiteral v0
-        Core.TermMap v0 -> Eithers.bind (Eithers.mapList (\kv ->
-          let k = Pairs.first kv
-              v = Pairs.second kv
-          in (Eithers.bind (encode k) (\pyK -> Eithers.bind (encode v) (\pyV -> Right (Syntax.DoubleStarredKvpairPair (Syntax.Kvpair {
-            Syntax.kvpairKey = pyK,
-            Syntax.kvpairValue = pyV})))))) (Maps.toList v0)) (\pairs -> Right (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "FrozenDict")) [
-          Utils.pyAtomToPyExpression (Syntax.AtomDict (Syntax.Dict pairs))]))
-        Core.TermMaybe v0 -> Maybes.maybe (Right (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "Nothing")) [])) (\t1 -> Eithers.bind (encode t1) (\pyexp -> withCast (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "Just")) [
-          pyexp]))) v0
-        Core.TermPair v0 ->
-          let t1 = Pairs.first v0
-              t2 = Pairs.second v0
-          in (Eithers.bind (encode t1) (\pyExpr1 -> Eithers.bind (encode t2) (\pyExpr2 -> Right (Utils.pyAtomToPyExpression (Syntax.AtomTuple (Syntax.Tuple [
-            Utils.pyExpressionToPyStarNamedExpression pyExpr1,
-            (Utils.pyExpressionToPyStarNamedExpression pyExpr2)]))))))
-        Core.TermRecord v0 ->
-          let tname = Core.recordTypeName v0
-              fields = Core.recordFields v0
-          in (Eithers.bind (Eithers.mapList (\fld -> encode (Core.fieldTerm fld)) fields) (\pargs -> Right (Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeNameQualified env tname)) pargs)))
-        Core.TermSet v0 -> Eithers.bind (Eithers.mapList encode (Sets.toList v0)) (\pyEls -> Right (Utils.functionCall (Utils.pyNameToPyPrimary (Syntax.Name "frozenset")) [
-          Utils.pyAtomToPyExpression (Syntax.AtomSet (Syntax.Set (Lists.map Utils.pyExpressionToPyStarNamedExpression pyEls)))]))
-        Core.TermTypeApplication v0 ->
-          let body = Core.typeApplicationTermBody v0
-          in (Eithers.bind (encodeTermInline cx env True (stripTypeApps body)) (\pybase -> withCast pybase))
-        Core.TermTypeLambda v0 ->
-          let body = Core.typeLambdaBody v0
-          in (withTypeLambda env v0 (\env2 -> encodeTermInline cx env2 noCast body))
-        Core.TermInject v0 ->
-          let tname = Core.injectionTypeName v0
-              field = Core.injectionField v0
-          in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt -> Logic.ifElse (Predicates.isEnumRowType rt) (Right (Utils.projectFromExpression (Utils.pyNameToPyExpression (PythonNames.encodeNameQualified env tname)) (PythonNames.encodeEnumValue env (Core.fieldName field)))) (
-            let fname = Core.fieldName field
-                isUnitVariant =
-                        Maybes.maybe False (\ft -> Predicates.isUnitType (Strip.deannotateType (Core.fieldTypeType ft))) (Lists.find (\ft -> Equality.equal (Core.unName (Core.fieldTypeName ft)) (Core.unName fname)) rt)
-            in (Eithers.bind (Logic.ifElse (Logic.or (Predicates.isUnitTerm (Core.fieldTerm field)) isUnitVariant) (Right []) (Eithers.bind (encode (Core.fieldTerm field)) (\parg -> Right [
-              parg]))) (\args ->
-              let deconflictedName = deconflictVariantName True env tname fname (PythonEnvironment.pythonEnvironmentGraph env)
-              in (Right (Utils.castTo (PythonNames.typeVariableReference env tname) (Utils.functionCall (Utils.pyNameToPyPrimary deconflictedName) args))))))))
-        Core.TermUnit -> Right (Utils.pyNameToPyExpression Utils.pyNone)
-        Core.TermVariable v0 -> encodeVariable cx env v0 []
-        Core.TermWrap v0 ->
-          let tname = Core.wrappedTermTypeName v0
-              inner = Core.wrappedTermBody v0
-          in (Eithers.bind (encode inner) (\parg -> Right (Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeNameQualified env tname)) [
-            parg])))
--- | Encode a term to a list of statements with return as final statement
-encodeTermMultiline :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Term -> Either Errors.Error [Syntax.Statement]
-encodeTermMultiline cx env term =
-
-      let dfltLogic =
-              Eithers.bind (analyzePythonFunction cx env term) (\fs ->
-                let params = Typing.functionStructureParams fs
-                    bindings = Typing.functionStructureBindings fs
-                    innerBody = Typing.functionStructureBody fs
-                    env2 = Typing.functionStructureEnvironment fs
-                in (Logic.ifElse (Lists.null bindings) (Eithers.bind (encodeTermInline cx env False term) (\expr -> Right [
-                  Utils.returnSingle expr])) (Eithers.bind (Eithers.mapList (encodeBindingAs cx env2) bindings) (\bindingStmts -> Eithers.bind (encodeTermMultiline cx env2 innerBody) (\bodyStmts -> Right (Lists.concat2 bindingStmts bodyStmts))))))
-          gathered = Analysis.gatherApplications term
-          args = Pairs.first gathered
-          body = Pairs.second gathered
-      in (Logic.ifElse (Equality.equal (Lists.length args) 1) (
-        let arg = Maybes.fromMaybe Core.TermUnit (Lists.maybeHead args)
-        in case (Strip.deannotateAndDetypeTerm body) of
-          Core.TermCases v0 ->
-            let tname = Core.caseStatementTypeName v0
-                dflt = Core.caseStatementDefault v0
-                cases_ = Core.caseStatementCases v0
-            in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt ->
-              let isEnum = Predicates.isEnumRowType rt
-                  isFull = isCasesFull rt cases_
-              in (Eithers.bind (encodeTermInline cx env False arg) (\pyArg -> Eithers.bind (Eithers.mapList (encodeCaseBlock cx env tname rt isEnum (\e -> \t -> encodeTermMultiline cx e t)) (deduplicateCaseVariables cases_)) (\pyCases -> Eithers.bind (encodeDefaultCaseBlock (\t -> encodeTermInline cx env False t) isFull dflt tname) (\pyDflt ->
-                let subj = Syntax.SubjectExpressionSimple (Syntax.NamedExpressionSimple pyArg)
-                    matchStmt =
-                            Syntax.StatementCompound (Syntax.CompoundStatementMatch (Syntax.MatchStatement {
-                              Syntax.matchStatementSubject = subj,
-                              Syntax.matchStatementCases = (Lists.concat2 pyCases pyDflt)}))
-                in (Right [
-                  matchStmt])))))))
-          _ -> dfltLogic) dfltLogic)
--- | Encode a term body for TCO: tail self-calls become param reassignment + continue
-encodeTermMultilineTCO :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.Name -> [Core.Name] -> Core.Term -> Either Errors.Error [Syntax.Statement]
-encodeTermMultilineTCO cx env funcName paramNames term =
-
-      let stripped = Strip.deannotateAndDetypeTerm term
-          gathered = Analysis.gatherApplications stripped
-          gatherArgs = Pairs.first gathered
-          gatherFun = Pairs.second gathered
-          strippedFun = Strip.deannotateAndDetypeTerm gatherFun
-          isSelfCall =
-                  case strippedFun of
-                    Core.TermVariable v0 -> Equality.equal v0 funcName
-                    _ -> False
-      in (Logic.ifElse (Logic.and isSelfCall (Equality.equal (Lists.length gatherArgs) (Lists.length paramNames))) (Eithers.bind (Eithers.mapList (\a -> encodeTermInline cx env False a) gatherArgs) (\pyArgs ->
-        let assignments =
-                Lists.map (\pair ->
-                  let paramName = Pairs.first pair
-                      pyArg = Pairs.second pair
-                  in (Utils.assignmentStatement (PythonNames.encodeName False Util.CaseConventionLowerSnake env paramName) pyArg)) (Lists.zip paramNames pyArgs)
-            continueStmt = Syntax.StatementSimple [
-                  Syntax.SimpleStatementContinue]
-        in (Right (Lists.concat2 assignments [
-          continueStmt])))) (
-        let gathered2 = Analysis.gatherApplications term
-            args2 = Pairs.first gathered2
-            body2 = Pairs.second gathered2
-        in (Logic.ifElse (Equality.equal (Lists.length args2) 1) (
-          let arg = Maybes.fromMaybe Core.TermUnit (Lists.maybeHead args2)
-          in case (Strip.deannotateAndDetypeTerm body2) of
-            Core.TermCases v0 ->
-              let tname = Core.caseStatementTypeName v0
-                  dflt = Core.caseStatementDefault v0
-                  cases_ = Core.caseStatementCases v0
-              in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt ->
-                let isEnum = Predicates.isEnumRowType rt
-                    isFull = isCasesFull rt cases_
-                in (Eithers.bind (encodeTermInline cx env False arg) (\pyArg -> Eithers.bind (Eithers.mapList (encodeCaseBlock cx env tname rt isEnum (\e2 -> \t2 -> encodeTermMultilineTCO cx e2 funcName paramNames t2)) (deduplicateCaseVariables cases_)) (\pyCases -> Eithers.bind (encodeDefaultCaseBlock (\t2 -> encodeTermInline cx env False t2) isFull dflt tname) (\pyDflt ->
-                  let subj = Syntax.SubjectExpressionSimple (Syntax.NamedExpressionSimple pyArg)
-                      matchStmt =
-                              Syntax.StatementCompound (Syntax.CompoundStatementMatch (Syntax.MatchStatement {
-                                Syntax.matchStatementSubject = subj,
-                                Syntax.matchStatementCases = (Lists.concat2 pyCases pyDflt)}))
-                  in (Right [
-                    matchStmt])))))))
-            _ -> Eithers.bind (encodeTermInline cx env False term) (\expr -> Right [
-              Utils.returnSingle expr])) (Eithers.bind (encodeTermInline cx env False term) (\expr -> Right [
-          Utils.returnSingle expr])))))
--- | Encode a Hydra type to a Python type expression
-encodeType :: PythonEnvironment.PythonEnvironment -> Core.Type -> Either t0 Syntax.Expression
-encodeType env typ =
-
-      let dflt = Right (Utils.doubleQuotedString (Strings.cat2 "type = " (ShowCore.type_ (Strip.deannotateType typ))))
-      in case (Strip.deannotateType typ) of
-        Core.TypeApplication v0 -> encodeApplicationType env v0
-        Core.TypeFunction v0 -> encodeFunctionType env v0
-        Core.TypeForall v0 -> encodeForallType env v0
-        Core.TypeList v0 -> Eithers.bind (encodeType env v0) (\pyet -> Right (Utils.nameAndParams (Syntax.Name "frozenlist") [
-          pyet]))
-        Core.TypeMap v0 -> Eithers.bind (encodeType env (Core.mapTypeKeys v0)) (\pykt -> Eithers.bind (encodeType env (Core.mapTypeValues v0)) (\pyvt -> Right (Utils.nameAndParams (Syntax.Name "FrozenDict") [
-          pykt,
-          pyvt])))
-        Core.TypeLiteral v0 -> encodeLiteralType v0
-        Core.TypeMaybe v0 -> Eithers.bind (encodeType env v0) (\ptype -> Right (Utils.pyPrimaryToPyExpression (Utils.primaryWithExpressionSlices (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "Maybe"))) [
-          ptype])))
-        Core.TypeEither v0 -> Eithers.bind (encodeType env (Core.eitherTypeLeft v0)) (\pyleft -> Eithers.bind (encodeType env (Core.eitherTypeRight v0)) (\pyright -> Right (Utils.pyPrimaryToPyExpression (Utils.primaryWithExpressionSlices (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "Either"))) [
-          pyleft,
-          pyright]))))
-        Core.TypePair v0 -> Eithers.bind (encodeType env (Core.pairTypeFirst v0)) (\pyFirst -> Eithers.bind (encodeType env (Core.pairTypeSecond v0)) (\pySecond -> Right (Utils.nameAndParams (Syntax.Name "tuple") [
-          pyFirst,
-          pySecond])))
-        Core.TypeRecord _ -> dflt
-        Core.TypeSet v0 -> Eithers.bind (encodeType env v0) (\pyet -> Right (Utils.nameAndParams (Syntax.Name "frozenset") [
-          pyet]))
-        Core.TypeUnion _ -> dflt
-        Core.TypeUnit -> Right (Utils.pyNameToPyExpression Utils.pyNone)
-        Core.TypeVoid -> Right (Utils.pyNameToPyExpression Utils.pyNone)
-        Core.TypeVariable v0 -> Right (PythonNames.typeVariableReference env v0)
-        Core.TypeWrap _ -> dflt
-        Core.TypeAnnotated _ -> dflt
--- | Encode a type definition, dispatching based on type structure
-encodeTypeAssignment :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Type -> Maybe String -> Either Errors.Error [[Syntax.Statement]]
-encodeTypeAssignment cx env name typ comment =
-    Eithers.bind (encodeTypeAssignmentInner cx env name typ comment) (\defStmts -> Right (Lists.map (\s -> [
-      s]) defStmts))
--- | Encode the inner type definition, unwrapping forall types
-encodeTypeAssignmentInner :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Type -> Maybe String -> Either Errors.Error [Syntax.Statement]
-encodeTypeAssignmentInner cx env name typ comment =
-
-      let stripped = Strip.deannotateType typ
-          dflt = Eithers.bind (encodeType env typ) (\typeExpr -> Right (encodeTypeDefSingle env name comment typeExpr))
-      in case stripped of
-        Core.TypeForall v0 ->
-          let tvar = Core.forallTypeParameter v0
-              body = Core.forallTypeBody v0
-              newEnv = extendEnvWithTypeVar env tvar
-          in (encodeTypeAssignmentInner cx newEnv name body comment)
-        Core.TypeRecord v0 -> Eithers.map (\s -> [
-          s]) (encodeRecordType cx env name v0 comment)
-        Core.TypeUnion v0 -> encodeUnionType cx env name v0 comment
-        Core.TypeWrap v0 -> encodeWrappedType env name v0 comment
-        _ -> dflt
--- | Encode a simple type alias definition
-encodeTypeDefSingle :: PythonEnvironment.PythonEnvironment -> Core.Name -> Maybe String -> Syntax.Expression -> [Syntax.Statement]
-encodeTypeDefSingle env name comment typeExpr =
-
-      let pyName = PythonNames.encodeName False Util.CaseConventionPascal env name
-          tparams = environmentTypeParameters env
-      in [
-        typeAliasStatementFor env pyName tparams comment typeExpr]
--- | Encode a type to a Python expression, quoting if the type has free variables
-encodeTypeQuoted :: PythonEnvironment.PythonEnvironment -> Core.Type -> Either t0 Syntax.Expression
-encodeTypeQuoted env typ =
-    Eithers.bind (encodeType env typ) (\pytype -> Right (Logic.ifElse (Sets.null (Variables.freeVariablesInType typ)) pytype (Utils.doubleQuotedString (Serialization.printExpr (Serde.encodeExpression pytype)))))
--- | Encode a union elimination as an inline conditional chain (isinstance-based ternary)
-encodeUnionEliminationInline :: Context.Context -> PythonEnvironment.PythonEnvironment -> Core.CaseStatement -> Syntax.Expression -> Either Errors.Error Syntax.Expression
-encodeUnionEliminationInline cx env cs pyArg =
-
-      let tname = Core.caseStatementTypeName cs
-          mdefault = Core.caseStatementDefault cs
-          cases_ = Core.caseStatementCases cs
-      in (Eithers.bind (Resolution.requireUnionType cx (pythonEnvironmentGetGraph env) tname) (\rt ->
-        let isEnum = Predicates.isEnumRowType rt
-            valueExpr = Utils.projectFromExpression pyArg (Syntax.Name "value")
-            isinstancePrimary = Utils.pyNameToPyPrimary (Syntax.Name "isinstance")
-        in (Eithers.bind (Maybes.maybe (Right (unsupportedExpression "no matching case in inline union elimination")) (\dflt -> encodeTermInline cx env False dflt) mdefault) (\pyDefault ->
-          let encodeBranch =
-                  \field ->
-                    let fname = Core.fieldName field
-                        fterm = Core.fieldTerm field
-                        isUnitVariant = isVariantUnitType rt fname
-                        pyVariantName = deconflictVariantName True env tname fname (PythonEnvironment.pythonEnvironmentGraph env)
-                        isinstanceCheck =
-                                Logic.ifElse isEnum (Syntax.ExpressionSimple (Syntax.Disjunction [
-                                  Syntax.Conjunction [
-                                    Syntax.InversionSimple (Syntax.Comparison {
-                                      Syntax.comparisonLhs = (Utils.pyExpressionToBitwiseOr pyArg),
-                                      Syntax.comparisonRhs = [
-                                        Syntax.CompareOpBitwiseOrPair {
-                                          Syntax.compareOpBitwiseOrPairOperator = Syntax.CompareOpEq,
-                                          Syntax.compareOpBitwiseOrPairRhs = (Utils.pyExpressionToBitwiseOr (Utils.pyNameToPyExpression pyVariantName))}]})]])) (Utils.functionCall isinstancePrimary [
-                                  pyArg,
-                                  (Utils.pyNameToPyExpression pyVariantName)])
-                    in (Eithers.bind (encodeTermInline cx env False fterm) (\pyBranch ->
-                      let pyResult =
-                              Logic.ifElse isEnum (Utils.functionCall (Utils.pyExpressionToPyPrimary pyBranch) [
-                                pyArg]) (Logic.ifElse isUnitVariant (Utils.functionCall (Utils.pyExpressionToPyPrimary pyBranch) [
-                                pyArg]) (Utils.functionCall (Utils.pyExpressionToPyPrimary pyBranch) [
-                                valueExpr]))
-                      in (Right (isinstanceCheck, pyResult))))
-          in (Eithers.bind (Eithers.mapList encodeBranch cases_) (\encodedBranches ->
-            let buildChain =
-                    \elseExpr -> \branchPair ->
-                      let checkExpr = Pairs.first branchPair
-                          resultExpr = Pairs.second branchPair
-                      in (Syntax.ExpressionConditional (Syntax.Conditional {
-                        Syntax.conditionalBody = (Utils.pyExpressionToDisjunction resultExpr),
-                        Syntax.conditionalIf = (Utils.pyExpressionToDisjunction checkExpr),
-                        Syntax.conditionalElse = elseExpr}))
-            in (Right (Lists.foldl buildChain pyDefault (Lists.reverse encodedBranches)))))))))
--- | Encode a union field as a variant class
-encodeUnionField :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> Core.FieldType -> Either Errors.Error Syntax.Statement
-encodeUnionField cx env unionName fieldType =
-
-      let fname = Core.fieldTypeName fieldType
-          ftype = Core.fieldTypeType fieldType
-      in (Eithers.bind (Annotations.getTypeDescription cx (pythonEnvironmentGetGraph env) ftype) (\fcomment ->
-        let isUnit = Equality.equal (Strip.deannotateType ftype) Core.TypeUnit
-            varName = deconflictVariantName False env unionName fname (PythonEnvironment.pythonEnvironmentGraph env)
-            tparamNames = findTypeParams env ftype
-            tparamPyNames = Lists.map PythonNames.encodeTypeVariable tparamNames
-            fieldParams = Lists.map Utils.pyNameToPyTypeParameter tparamPyNames
-            body =
-                    Logic.ifElse isUnit (Utils.indentedBlock fcomment [
-                      Utils.unitVariantMethods varName]) (Utils.indentedBlock fcomment [])
-        in (Eithers.bind (Logic.ifElse isUnit (Right Nothing) (Eithers.bind (encodeTypeQuoted env ftype) (\quotedType -> Right (Just (variantArgs quotedType []))))) (\margs -> Right (Utils.pyClassDefinitionToPyStatement (Syntax.ClassDefinition {
-          Syntax.classDefinitionDecorators = Nothing,
-          Syntax.classDefinitionName = varName,
-          Syntax.classDefinitionTypeParams = fieldParams,
-          Syntax.classDefinitionArguments = margs,
-          Syntax.classDefinitionBody = body}))))))
--- | Encode a union field as a primary expression for | alternatives
-encodeUnionFieldAlt :: PythonEnvironment.PythonEnvironment -> Core.Name -> Core.FieldType -> Syntax.Primary
-encodeUnionFieldAlt env unionName fieldType =
-
-      let fname = Core.fieldTypeName fieldType
-          ftype = Core.fieldTypeType fieldType
-          tparamNames = findTypeParams env ftype
-          tparams = Lists.map PythonNames.encodeTypeVariable tparamNames
-          namePrim = Utils.pyNameToPyPrimary (PythonNames.variantName False env unionName fname)
-      in (Logic.ifElse (Lists.null tparams) namePrim (
-        let tparamExprs = Lists.map Utils.pyNameToPyExpression tparams
-        in (Utils.primaryWithExpressionSlices namePrim tparamExprs)))
--- | Encode a union type as an enum (for unit-only fields) or variant classes
-encodeUnionType :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> [Core.FieldType] -> Maybe String -> Either Errors.Error [Syntax.Statement]
-encodeUnionType cx env name rowType comment =
-    Logic.ifElse (Predicates.isEnumRowType rowType) (Eithers.bind (Eithers.mapList (encodeEnumValueAssignment cx env) rowType) (\vals ->
-      let body = Utils.indentedBlock comment vals
-          enumName = Syntax.Name "Enum"
-          args = Just (Utils.pyExpressionsToPyArgs [
-                Utils.pyNameToPyExpression enumName])
-          pyName = PythonNames.encodeName False Util.CaseConventionPascal env name
-          typeConstStmt =
-                  Utils.dottedAssignmentStatement pyName (PythonNames.encodeConstantForTypeName env name) (Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionPascal env (Core.Name "hydra.core.Name"))) [
-                    Utils.doubleQuotedString (Core.unName name)])
-      in (Right [
-        Utils.pyClassDefinitionToPyStatement (Syntax.ClassDefinition {
-          Syntax.classDefinitionDecorators = Nothing,
-          Syntax.classDefinitionName = pyName,
-          Syntax.classDefinitionTypeParams = [],
-          Syntax.classDefinitionArguments = args,
-          Syntax.classDefinitionBody = body}),
-        typeConstStmt]))) (
-      let constStmts = encodeNameConstants env name rowType
-      in (Eithers.bind (Eithers.mapList (encodeUnionField cx env name) rowType) (\fieldStmts ->
-        let tparams = environmentTypeParameters env
-            unionAlts = Lists.map (encodeUnionFieldAlt env name) rowType
-            unionStmts =
-                    unionTypeStatementsFor env (PythonNames.encodeName False Util.CaseConventionPascal env name) tparams comment (Utils.orExpression unionAlts) constStmts
-        in (Right (Lists.concat2 fieldStmts unionStmts)))))
--- | Encode a variable reference to a Python expression
-encodeVariable :: t0 -> PythonEnvironment.PythonEnvironment -> Core.Name -> [Syntax.Expression] -> Either Errors.Error Syntax.Expression
-encodeVariable cx env name args =
-
-      let g = pythonEnvironmentGetGraph env
-          tc = PythonEnvironment.pythonEnvironmentGraph env
-          tcTypes = Graph.graphBoundTypes tc
-          tcLambdaVars = Graph.graphLambdaVariables tc
-          tcMetadata = Graph.graphMetadata tc
-          inlineVars = PythonEnvironment.pythonEnvironmentInlineVariables env
-          mTypScheme = Maps.lookup name tcTypes
-          mTyp = Maybes.map (\ts_ -> Core.typeSchemeBody ts_) mTypScheme
-          asVariable = PythonNames.termVariableReference env name
-          asFunctionCall =
-                  Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionLowerSnake env name)) args
-      in (Logic.ifElse (Logic.not (Lists.null args)) (Maybes.maybe (Right asFunctionCall) (\prim ->
-        let primArity = Arity.primitiveArity prim
-        in (Logic.ifElse (Equality.equal primArity (Lists.length args)) (Right asFunctionCall) (
-          let numRemaining = Math.sub primArity (Lists.length args)
-              remainingParams = Lists.map (\i -> Syntax.Name (Strings.cat2 "x" (Literals.showInt32 i))) (Math.range 1 numRemaining)
-              remainingExprs =
-                      Lists.map (\n -> Syntax.ExpressionSimple (Syntax.Disjunction [
-                        Syntax.Conjunction [
-                          Syntax.InversionSimple (Syntax.Comparison {
-                            Syntax.comparisonLhs = Syntax.BitwiseOr {
-                              Syntax.bitwiseOrLhs = Nothing,
-                              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                                Syntax.bitwiseXorLhs = Nothing,
-                                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                                  Syntax.bitwiseAndLhs = Nothing,
-                                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                    Syntax.shiftExpressionLhs = Nothing,
-                                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                                      Syntax.sumLhs = Nothing,
-                                      Syntax.sumRhs = Syntax.Term {
-                                        Syntax.termLhs = Nothing,
-                                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                                            Syntax.awaitPrimaryAwait = False,
-                                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName n))},
-                                          Syntax.powerRhs = Nothing}))}}}}}},
-                            Syntax.comparisonRhs = []})]])) remainingParams
-              allArgs = Lists.concat2 args remainingExprs
-              fullCall =
-                      Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionLowerSnake env name)) allArgs
-          in (Right (makeUncurriedLambda remainingParams fullCall))))) (Lexical.lookupPrimitive g name)) (Maybes.maybe (Logic.ifElse (Sets.member name tcLambdaVars) (Right asVariable) (Logic.ifElse (Sets.member name inlineVars) (Right asVariable) (Maybes.maybe (Maybes.maybe (Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Unknown variable: " (Core.unName name))))) (\_ -> Right asFunctionCall) (Maps.lookup name tcMetadata)) (\el ->
-        let elTrivial1 = Predicates.isTrivialTerm (Core.bindingTerm el)
-        in (Maybes.maybe (Right asVariable) (\ts -> Logic.ifElse (Logic.and (Logic.and (Equality.equal (Arity.typeSchemeArity ts) 0) (Predicates.isComplexBinding tc el)) (Logic.not elTrivial1)) (Right asFunctionCall) (
-          let asFunctionRef =
-                  Logic.ifElse (Logic.not (Lists.null (Core.typeSchemeVariables ts))) (makeSimpleLambda (Arity.typeArity (Core.typeSchemeBody ts)) asVariable) asVariable
-          in (Right asFunctionRef))) (Core.bindingTypeScheme el))) (Lexical.lookupBinding g name)) (\prim ->
-        let primArity = Arity.primitiveArity prim
-        in (Logic.ifElse (Equality.equal primArity 0) (Right asFunctionCall) (
-          let ts = Graph.primitiveTypeScheme prim
-              asFunctionRef =
-                      Logic.ifElse (Logic.not (Lists.null (Core.typeSchemeVariables ts))) (makeSimpleLambda (Arity.typeArity (Core.typeSchemeBody ts)) asVariable) asVariable
-          in (Right asFunctionRef)))) (Lexical.lookupPrimitive g name)))) (\typ -> Logic.ifElse (Sets.member name tcLambdaVars) (Right asVariable) (Logic.ifElse (Sets.member name inlineVars) (
-        let asFunctionRef =
-                Logic.ifElse (Logic.not (Sets.null (Variables.freeVariablesInType typ))) (makeSimpleLambda (Arity.typeArity typ) asVariable) asVariable
-        in (Right asFunctionRef)) (Logic.ifElse (Logic.not (Maps.member name tcMetadata)) (Maybes.maybe (
-        let asFunctionRef =
-                Logic.ifElse (Logic.not (Sets.null (Variables.freeVariablesInType typ))) (makeSimpleLambda (Arity.typeArity typ) asVariable) asVariable
-        in (Right asFunctionRef)) (\el ->
-        let elTrivial = Predicates.isTrivialTerm (Core.bindingTerm el)
-        in (Maybes.maybe (Logic.ifElse (Logic.and (Equality.equal (Arity.typeArity typ) 0) (Logic.not elTrivial)) (Right asFunctionCall) (
-          let asFunctionRef =
-                  Logic.ifElse (Logic.not (Sets.null (Variables.freeVariablesInType typ))) (makeSimpleLambda (Arity.typeArity typ) asVariable) asVariable
-          in (Right asFunctionRef))) (\ts -> Logic.ifElse (Logic.and (Logic.and (Equality.equal (Arity.typeArity typ) 0) (Predicates.isComplexBinding tc el)) (Logic.not elTrivial)) (Right asFunctionCall) (
-          let asFunctionRef =
-                  Logic.ifElse (Logic.not (Sets.null (Variables.freeVariablesInType typ))) (makeSimpleLambda (Arity.typeArity typ) asVariable) asVariable
-          in (Right asFunctionRef))) (Core.bindingTypeScheme el))) (Lexical.lookupBinding g name)) (Logic.ifElse (Logic.and (Equality.equal (Arity.typeArity typ) 0) (Predicates.isComplexVariable tc name)) (Right asFunctionCall) (
-        let asFunctionRef =
-                Logic.ifElse (Logic.not (Sets.null (Variables.freeVariablesInType typ))) (makeSimpleLambda (Arity.typeArity typ) asVariable) asVariable
-        in (Right asFunctionRef)))))) mTyp))
--- | Encode a wrapped type (newtype) to a Python class definition
-encodeWrappedType :: PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Type -> Maybe String -> Either t0 [Syntax.Statement]
-encodeWrappedType env name typ comment =
-
-      let tparamList = Pairs.first (PythonEnvironment.pythonEnvironmentBoundTypeVariables env)
-      in (Eithers.bind (encodeTypeQuoted env typ) (\ptypeQuoted ->
-        let pyName = PythonNames.encodeName False Util.CaseConventionPascal env name
-            body = Utils.indentedBlock comment []
-            typeConstStmt =
-                    Utils.dottedAssignmentStatement pyName (PythonNames.encodeConstantForTypeName env name) (Utils.functionCall (Utils.pyNameToPyPrimary (PythonNames.encodeName True Util.CaseConventionPascal env (Core.Name "hydra.core.Name"))) [
-                      Utils.doubleQuotedString (Core.unName name)])
-        in (Right [
-          Utils.pyClassDefinitionToPyStatement (Syntax.ClassDefinition {
-            Syntax.classDefinitionDecorators = Nothing,
-            Syntax.classDefinitionName = pyName,
-            Syntax.classDefinitionTypeParams = (Lists.map (\arg_ -> Utils.pyNameToPyTypeParameter (PythonNames.encodeTypeVariable arg_)) (findTypeParams env typ)),
-            Syntax.classDefinitionArguments = (Just (variantArgs ptypeQuoted tparamList)),
-            Syntax.classDefinitionBody = body}),
-          typeConstStmt])))
--- | Create a value pattern for an enum variant
-enumVariantPattern :: PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Name -> Syntax.ClosedPattern
-enumVariantPattern env typeName fieldName =
-    Syntax.ClosedPatternValue (Syntax.ValuePattern (Syntax.Attribute [
-      PythonNames.encodeName True Util.CaseConventionPascal env typeName,
-      (PythonNames.encodeEnumValue env fieldName)]))
--- | Get type parameters from environment as Python TypeParameters
-environmentTypeParameters :: PythonEnvironment.PythonEnvironment -> [Syntax.TypeParameter]
-environmentTypeParameters env =
-    Lists.map (\arg_ -> Utils.pyNameToPyTypeParameter (PythonNames.encodeTypeVariable arg_)) (Pairs.first (PythonEnvironment.pythonEnvironmentBoundTypeVariables env))
--- | Extend environment with lambda parameters from a term
-extendEnvWithLambdaParams :: PythonEnvironment.PythonEnvironment -> Core.Term -> PythonEnvironment.PythonEnvironment
-extendEnvWithLambdaParams env term =
-
-      let go =
-              \e -> \t -> case (Strip.deannotateAndDetypeTerm t) of
-                Core.TermLambda v0 ->
-                  let newTc = Scoping.extendGraphForLambda (pythonEnvironmentGetGraph e) v0
-                      newEnv = pythonEnvironmentSetGraph newTc e
-                  in (go newEnv (Core.lambdaBody v0))
-                _ -> e
-      in (go env term)
--- | Extend a PythonEnvironment with a new bound type variable
-extendEnvWithTypeVar :: PythonEnvironment.PythonEnvironment -> Core.Name -> PythonEnvironment.PythonEnvironment
-extendEnvWithTypeVar env var_ =
-
-      let oldBound = PythonEnvironment.pythonEnvironmentBoundTypeVariables env
-          tparamList = Pairs.first oldBound
-          tparamMap = Pairs.second oldBound
-          newList = Lists.concat2 tparamList [
-                var_]
-          newMap = Maps.insert var_ (PythonNames.encodeTypeVariable var_) tparamMap
-      in PythonEnvironment.PythonEnvironment {
-        PythonEnvironment.pythonEnvironmentNamespaces = (PythonEnvironment.pythonEnvironmentNamespaces env),
-        PythonEnvironment.pythonEnvironmentBoundTypeVariables = (newList, newMap),
-        PythonEnvironment.pythonEnvironmentGraph = (PythonEnvironment.pythonEnvironmentGraph env),
-        PythonEnvironment.pythonEnvironmentNullaryBindings = (PythonEnvironment.pythonEnvironmentNullaryBindings env),
-        PythonEnvironment.pythonEnvironmentVersion = (PythonEnvironment.pythonEnvironmentVersion env),
-        PythonEnvironment.pythonEnvironmentSkipCasts = (PythonEnvironment.pythonEnvironmentSkipCasts env),
-        PythonEnvironment.pythonEnvironmentInlineVariables = (PythonEnvironment.pythonEnvironmentInlineVariables env)}
--- | Extend metadata based on a term (used during module encoding)
-extendMetaForTerm :: Bool -> PythonEnvironment.PythonModuleMetadata -> Core.Term -> PythonEnvironment.PythonModuleMetadata
-extendMetaForTerm topLevel meta0 term =
-
-      let step =
-              \meta -> \t -> case t of
-                Core.TermEither v0 ->
-                  let metaWithCast = setMetaUsesCast True meta
-                  in (Eithers.either (\_ -> setMetaUsesLeft metaWithCast True) (\_ -> setMetaUsesRight metaWithCast True) v0)
-                Core.TermLambda v0 -> Maybes.maybe meta (\dom -> Logic.ifElse topLevel (extendMetaForType True False dom meta) meta) (Core.lambdaDomain v0)
-                Core.TermLet v0 ->
-                  let bindings = Core.letBindings v0
-                  in (Lists.foldl (
-                    let forBinding =
-                            \m -> \b -> Maybes.maybe m (\ts ->
-                              let term1 = Core.bindingTerm b
-                              in (Logic.ifElse (Analysis.isSimpleAssignment term1) m (extendMetaForType True True (Core.typeSchemeBody ts) m))) (Core.bindingTypeScheme b)
-                    in forBinding) meta bindings)
-                Core.TermLiteral v0 -> case v0 of
-                  Core.LiteralDecimal _ -> setMetaUsesDecimal meta True
-                  Core.LiteralFloat v1 -> case v1 of
-                    Core.FloatValueBigfloat _ -> setMetaUsesDecimal meta True
-                    _ -> meta
-                  _ -> meta
-                Core.TermMap _ -> setMetaUsesFrozenDict meta True
-                Core.TermMaybe v0 -> Maybes.maybe (setMetaUsesNothing meta True) (\_ -> setMetaUsesJust meta True) v0
-                Core.TermInject _ -> setMetaUsesCast True meta
-                _ -> meta
-      in (Rewriting.foldOverTerm Coders.TraversalOrderPre step meta0 term)
--- | Extend metadata based on a type (used during module encoding)
-extendMetaForType :: Bool -> Bool -> Core.Type -> PythonEnvironment.PythonModuleMetadata -> PythonEnvironment.PythonModuleMetadata
-extendMetaForType topLevel isTermAnnot typ meta =
-
-      let currentTvars = PythonEnvironment.pythonModuleMetadataTypeVariables meta
-          newTvars = collectTypeVariables currentTvars typ
-          metaWithTvars = setMetaTypeVariables meta newTvars
-          metaWithSubtypes = Lists.foldl (\m -> \t -> extendMetaForType False isTermAnnot t m) metaWithTvars (Rewriting.subtypes typ)
-      in case (Strip.deannotateType typ) of
-        Core.TypeFunction v0 ->
-          let cod = Core.functionTypeCodomain v0
-              dom = Core.functionTypeDomain v0
-              meta2 = extendMetaForType topLevel isTermAnnot cod metaWithSubtypes
-              meta3 = extendMetaForType False isTermAnnot dom meta2
-          in (Logic.ifElse (Logic.and isTermAnnot topLevel) meta3 (setMetaUsesCallable meta3 True))
-        Core.TypeList _ -> setMetaUsesFrozenList metaWithSubtypes True
-        Core.TypeMap _ -> setMetaUsesFrozenDict metaWithSubtypes True
-        Core.TypeMaybe _ -> setMetaUsesMaybe metaWithSubtypes True
-        Core.TypeEither _ -> setMetaUsesEither metaWithSubtypes True
-        Core.TypeLiteral v0 -> case v0 of
-          Core.LiteralTypeDecimal -> setMetaUsesDecimal metaWithSubtypes True
-          Core.LiteralTypeFloat v1 -> case v1 of
-            Core.FloatTypeBigfloat -> setMetaUsesDecimal metaWithSubtypes True
-            _ -> metaWithSubtypes
-          _ -> metaWithSubtypes
-        Core.TypeUnion v0 -> Logic.ifElse (Predicates.isEnumRowType v0) (setMetaUsesEnum metaWithSubtypes True) (Logic.ifElse (Logic.not (Lists.null v0)) (setMetaUsesNode metaWithSubtypes True) metaWithSubtypes)
-        Core.TypeForall v0 ->
-          let body = Core.forallTypeBody v0
-              metaForWrap = digForWrap isTermAnnot metaWithSubtypes body
-          in case (Strip.deannotateType body) of
-            Core.TypeRecord _ -> setMetaUsesGeneric metaForWrap True
-            _ -> metaForWrap
-        Core.TypeRecord v0 ->
-          let hasAnnotated = Lists.foldl (\b -> \ft -> Logic.or b (Annotations.hasTypeDescription (Core.fieldTypeType ft))) False v0
-              meta1 = Logic.ifElse (Lists.null v0) metaWithSubtypes (setMetaUsesDataclass metaWithSubtypes True)
-          in (Logic.ifElse hasAnnotated (setMetaUsesAnnotated meta1 True) meta1)
-        Core.TypeWrap _ -> Logic.ifElse isTermAnnot metaWithSubtypes (setMetaUsesNode metaWithSubtypes True)
-        _ -> metaWithSubtypes
--- | Extend metadata for a list of types
-extendMetaForTypes :: [Core.Type] -> PythonEnvironment.PythonModuleMetadata -> PythonEnvironment.PythonModuleMetadata
-extendMetaForTypes types meta =
-
-      let names = Sets.unions (Lists.map (\t -> Dependencies.typeDependencyNames False t) types)
-          currentNs = PythonEnvironment.pythonModuleMetadataNamespaces meta
-          updatedNs = Analysis.addNamesToNamespaces PythonNames.encodeNamespace names currentNs
-          meta1 = setMetaNamespaces updatedNs meta
-      in (Lists.foldl (\m -> \t -> extendMetaForType True False t m) meta1 types)
--- | Extract CaseStatement from a case elimination term
-extractCaseElimination :: Core.Term -> Maybe Core.CaseStatement
-extractCaseElimination term =
-    case (Strip.deannotateAndDetypeTerm term) of
-      Core.TermCases v0 -> Just v0
-      _ -> Nothing
--- | Find type parameters in a type that are bound in the environment
-findTypeParams :: PythonEnvironment.PythonEnvironment -> Core.Type -> [Core.Name]
-findTypeParams env typ =
-
-      let boundVars = Pairs.second (PythonEnvironment.pythonEnvironmentBoundTypeVariables env)
-          isBound = \v -> Maybes.isJust (Maps.lookup v boundVars)
-      in (Lists.filter isBound (Sets.toList (Variables.freeVariablesInType typ)))
--- | Extract lambdas and their bodies from a term
-gatherLambdas :: Core.Term -> ([Core.Name], Core.Term)
-gatherLambdas term =
-
-      let go =
-              \params -> \t -> case (Strip.deannotateAndDetypeTerm t) of
-                Core.TermLambda v0 -> go (Lists.concat2 params [
-                  Core.lambdaParameter v0]) (Core.lambdaBody v0)
-                _ -> (params, t)
-      in (go [] term)
--- | Gather metadata from definitions
-gatherMetadata :: Packaging.Namespace -> [Packaging.Definition] -> PythonEnvironment.PythonModuleMetadata
-gatherMetadata focusNs defs =
-
-      let start = emptyMetadata (Utils.findNamespaces focusNs defs)
-          addDef =
-                  \meta -> \def -> case def of
-                    Packaging.DefinitionTerm v0 ->
-                      let term = Packaging.termDefinitionTerm v0
-                          typ =
-                                  Maybes.maybe (Core.TypeVariable (Core.Name "hydra.core.Unit")) Core.typeSchemeBody (Packaging.termDefinitionTypeScheme v0)
-                          meta2 = extendMetaForType True True typ meta
-                      in (extendMetaForTerm True meta2 term)
-                    Packaging.DefinitionType v0 ->
-                      let typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)
-                          meta2 = setMetaUsesName meta True
-                      in (Rewriting.foldOverType Coders.TraversalOrderPre (\m -> \t -> extendMetaForType True False t m) meta2 typ)
-          result = Lists.foldl addDef start defs
-          tvars = PythonEnvironment.pythonModuleMetadataTypeVariables result
-          result2 = setMetaUsesCast True (setMetaUsesLruCache True result)
-      in (setMetaUsesTypeVar result2 (Logic.not (Sets.null tvars)))
--- | Create Generic[...] argument expression for class definition
-genericArg :: [Core.Name] -> Maybe Syntax.Expression
-genericArg tparamList =
-    Logic.ifElse (Lists.null tparamList) Nothing (Just (Utils.pyPrimaryToPyExpression (Utils.primaryWithExpressionSlices (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "Generic"))) (Lists.map (\n -> Syntax.ExpressionSimple (Syntax.Disjunction [
-      Syntax.Conjunction [
-        Syntax.InversionSimple (Syntax.Comparison {
-          Syntax.comparisonLhs = Syntax.BitwiseOr {
-            Syntax.bitwiseOrLhs = Nothing,
-            Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-              Syntax.bitwiseXorLhs = Nothing,
-              Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                Syntax.bitwiseAndLhs = Nothing,
-                Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                  Syntax.shiftExpressionLhs = Nothing,
-                  Syntax.shiftExpressionRhs = Syntax.Sum {
-                    Syntax.sumLhs = Nothing,
-                    Syntax.sumRhs = Syntax.Term {
-                      Syntax.termLhs = Nothing,
-                      Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                        Syntax.powerLhs = Syntax.AwaitPrimary {
-                          Syntax.awaitPrimaryAwait = False,
-                          Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (PythonNames.encodeTypeVariable n)))},
-                        Syntax.powerRhs = Nothing}))}}}}}},
-          Syntax.comparisonRhs = []})]])) tparamList))))
--- | Create an initial Python environment for code generation
-initialEnvironment :: Packaging.Namespaces Syntax.DottedName -> Graph.Graph -> PythonEnvironment.PythonEnvironment
-initialEnvironment namespaces tcontext =
-    PythonEnvironment.PythonEnvironment {
-      PythonEnvironment.pythonEnvironmentNamespaces = namespaces,
-      PythonEnvironment.pythonEnvironmentBoundTypeVariables = ([], Maps.empty),
-      PythonEnvironment.pythonEnvironmentGraph = tcontext,
-      PythonEnvironment.pythonEnvironmentNullaryBindings = Sets.empty,
-      PythonEnvironment.pythonEnvironmentVersion = targetPythonVersion,
-      PythonEnvironment.pythonEnvironmentSkipCasts = True,
-      PythonEnvironment.pythonEnvironmentInlineVariables = Sets.empty}
--- | Create initial empty metadata for a Python module
-initialMetadata :: Packaging.Namespace -> PythonEnvironment.PythonModuleMetadata
-initialMetadata ns =
-
-      let dottedNs = PythonNames.encodeNamespace ns
-          emptyNs =
-                  Packaging.Namespaces {
-                    Packaging.namespacesFocus = (ns, dottedNs),
-                    Packaging.namespacesMapping = Maps.empty}
-      in PythonEnvironment.PythonModuleMetadata {
-        PythonEnvironment.pythonModuleMetadataNamespaces = emptyNs,
-        PythonEnvironment.pythonModuleMetadataTypeVariables = Sets.empty,
-        PythonEnvironment.pythonModuleMetadataUsesAnnotated = False,
-        PythonEnvironment.pythonModuleMetadataUsesCallable = False,
-        PythonEnvironment.pythonModuleMetadataUsesCast = False,
-        PythonEnvironment.pythonModuleMetadataUsesLruCache = False,
-        PythonEnvironment.pythonModuleMetadataUsesTypeAlias = False,
-        PythonEnvironment.pythonModuleMetadataUsesDataclass = False,
-        PythonEnvironment.pythonModuleMetadataUsesDecimal = False,
-        PythonEnvironment.pythonModuleMetadataUsesEither = False,
-        PythonEnvironment.pythonModuleMetadataUsesEnum = False,
-        PythonEnvironment.pythonModuleMetadataUsesFrozenDict = False,
-        PythonEnvironment.pythonModuleMetadataUsesFrozenList = False,
-        PythonEnvironment.pythonModuleMetadataUsesGeneric = False,
-        PythonEnvironment.pythonModuleMetadataUsesJust = False,
-        PythonEnvironment.pythonModuleMetadataUsesLeft = False,
-        PythonEnvironment.pythonModuleMetadataUsesMaybe = False,
-        PythonEnvironment.pythonModuleMetadataUsesName = False,
-        PythonEnvironment.pythonModuleMetadataUsesNode = False,
-        PythonEnvironment.pythonModuleMetadataUsesNothing = False,
-        PythonEnvironment.pythonModuleMetadataUsesRight = False,
-        PythonEnvironment.pythonModuleMetadataUsesTypeVar = False}
--- | Check if a term is a case statement applied to exactly one argument
-isCaseStatementApplication :: Core.Term -> Maybe (Core.Name, (Maybe Core.Term, ([Core.Field], Core.Term)))
-isCaseStatementApplication term =
-
-      let gathered = Analysis.gatherApplications term
-          args = Pairs.first gathered
-          body = Pairs.second gathered
-      in (Logic.ifElse (Logic.not (Equality.equal (Lists.length args) 1)) Nothing (
-        let arg = Maybes.fromMaybe Core.TermUnit (Lists.maybeHead args)
-        in case (Strip.deannotateAndDetypeTerm body) of
-          Core.TermCases v0 -> Just (Core.caseStatementTypeName v0, (Core.caseStatementDefault v0, (Core.caseStatementCases v0, arg)))
-          _ -> Nothing))
--- | Check if union cases are fully covered
-isCasesFull :: [t0] -> [t1] -> Bool
-isCasesFull rowType cases_ =
-
-      let numCases = Lists.length cases_
-          numFields = Lists.length rowType
-      in (Logic.not (Equality.lt numCases numFields))
--- | Check whether a list of definitions contains any type definitions
-isTypeModuleCheck :: [Packaging.Definition] -> Bool
-isTypeModuleCheck defs =
-    Logic.not (Lists.null (Lists.filter (\d -> case d of
-      Packaging.DefinitionType _ -> True
-      _ -> False) defs))
--- | Check if a name is a type variable (unqualified - no dots)
-isTypeVariableName :: Core.Name -> Bool
-isTypeVariableName name = Equality.equal 1 (Lists.length (Strings.splitOn "." (Core.unName name)))
--- | Check if a variant field has unit type
-isVariantUnitType :: [Core.FieldType] -> Core.Name -> Bool
-isVariantUnitType rowType fieldName =
-
-      let mfield = Lists.find (\ft -> Equality.equal (Core.fieldTypeName ft) fieldName) rowType
-      in (Maybes.fromMaybe False (Maybes.map (\ft -> Predicates.isUnitType (Strip.deannotateType (Core.fieldTypeType ft))) mfield))
--- | Decorator for @lru_cache(1) to memoize zero-argument function results
-lruCacheDecorator :: Syntax.NamedExpression
-lruCacheDecorator =
-    Syntax.NamedExpressionSimple (Utils.functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "lru_cache"))) [
-      pyInt 1])
--- | Create a curried lambda chain from a list of parameter names and a body
-makeCurriedLambda :: [Syntax.Name] -> Syntax.Expression -> Syntax.Expression
-makeCurriedLambda params body =
-    Lists.foldl (\acc -> \p -> Syntax.ExpressionLambda (Syntax.Lambda {
-      Syntax.lambdaParams = Syntax.LambdaParameters {
-        Syntax.lambdaParametersSlashNoDefault = Nothing,
-        Syntax.lambdaParametersParamNoDefault = [
-          Syntax.LambdaParamNoDefault p],
-        Syntax.lambdaParametersParamWithDefault = [],
-        Syntax.lambdaParametersStarEtc = Nothing},
-      Syntax.lambdaBody = acc})) body (Lists.reverse params)
--- | Constructor for PyGraph record
-makePyGraph :: Graph.Graph -> PythonEnvironment.PythonModuleMetadata -> PythonEnvironment.PyGraph
-makePyGraph g m =
-    PythonEnvironment.PyGraph {
-      PythonEnvironment.pyGraphGraph = g,
-      PythonEnvironment.pyGraphMetadata = m}
--- | Wrap a bare reference to a polymorphic function in an uncurried lambda
-makeSimpleLambda :: Int -> Syntax.Expression -> Syntax.Expression
-makeSimpleLambda arity lhs =
-
-      let args = Lists.map (\i -> Syntax.Name (Strings.cat2 "x" (Literals.showInt32 i))) (Math.range 1 arity)
-      in (Logic.ifElse (Equality.equal arity 0) lhs (Syntax.ExpressionLambda (Syntax.Lambda {
-        Syntax.lambdaParams = Syntax.LambdaParameters {
-          Syntax.lambdaParametersSlashNoDefault = Nothing,
-          Syntax.lambdaParametersParamNoDefault = (Lists.map (\a -> Syntax.LambdaParamNoDefault a) args),
-          Syntax.lambdaParametersParamWithDefault = [],
-          Syntax.lambdaParametersStarEtc = Nothing},
-        Syntax.lambdaBody = (Utils.functionCall (Utils.pyExpressionToPyPrimary lhs) (Lists.map (\a -> Syntax.ExpressionSimple (Syntax.Disjunction [
-          Syntax.Conjunction [
-            Syntax.InversionSimple (Syntax.Comparison {
-              Syntax.comparisonLhs = Syntax.BitwiseOr {
-                Syntax.bitwiseOrLhs = Nothing,
-                Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                  Syntax.bitwiseXorLhs = Nothing,
-                  Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                    Syntax.bitwiseAndLhs = Nothing,
-                    Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                      Syntax.shiftExpressionLhs = Nothing,
-                      Syntax.shiftExpressionRhs = Syntax.Sum {
-                        Syntax.sumLhs = Nothing,
-                        Syntax.sumRhs = Syntax.Term {
-                          Syntax.termLhs = Nothing,
-                          Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                            Syntax.powerLhs = Syntax.AwaitPrimary {
-                              Syntax.awaitPrimaryAwait = False,
-                              Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName a))},
-                            Syntax.powerRhs = Nothing}))}}}}}},
-              Syntax.comparisonRhs = []})]])) args))})))
--- | Create a thunk (zero-argument lambda) wrapped with lru_cache(1) for memoization
-makeThunk :: Syntax.Expression -> Syntax.Expression
-makeThunk pbody =
-    Utils.functionCall (Utils.pyExpressionToPyPrimary (Utils.functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "lru_cache"))) [
-      pyInt 1])) [
-      wrapInNullaryLambda pbody]
--- | Create an uncurried lambda with multiple parameters
-makeUncurriedLambda :: [Syntax.Name] -> Syntax.Expression -> Syntax.Expression
-makeUncurriedLambda params body =
-    Syntax.ExpressionLambda (Syntax.Lambda {
-      Syntax.lambdaParams = Syntax.LambdaParameters {
-        Syntax.lambdaParametersSlashNoDefault = Nothing,
-        Syntax.lambdaParametersParamNoDefault = (Lists.map (\p -> Syntax.LambdaParamNoDefault p) params),
-        Syntax.lambdaParametersParamWithDefault = [],
-        Syntax.lambdaParametersStarEtc = Nothing},
-      Syntax.lambdaBody = body})
--- | Generate domain import statements from namespace mappings
-moduleDomainImports :: Packaging.Namespaces Syntax.DottedName -> [Syntax.ImportStatement]
-moduleDomainImports namespaces =
-
-      let names = Lists.sort (Maps.elems (Packaging.namespacesMapping namespaces))
-      in (Lists.map (\ns -> Syntax.ImportStatementName (Syntax.ImportName [
-        Syntax.DottedAsName {
-          Syntax.dottedAsNameName = ns,
-          Syntax.dottedAsNameAs = Nothing}])) names)
--- | Generate all import statements for a Python module
-moduleImports :: Packaging.Namespaces Syntax.DottedName -> PythonEnvironment.PythonModuleMetadata -> [Syntax.Statement]
-moduleImports namespaces meta =
-    Lists.map (\imp -> Utils.pySimpleStatementToPyStatement (Syntax.SimpleStatementImport imp)) (Lists.concat [
-      moduleStandardImports meta,
-      (moduleDomainImports namespaces)])
--- | Generate standard import statements based on module metadata
-moduleStandardImports :: PythonEnvironment.PythonModuleMetadata -> [Syntax.ImportStatement]
-moduleStandardImports meta =
-
-      let pairs =
-              [
-                ("__future__", [
-                  condImportSymbol "annotations" PythonNames.useFutureAnnotations]),
-                ("collections.abc", [
-                  condImportSymbol "Callable" (PythonEnvironment.pythonModuleMetadataUsesCallable meta)]),
-                ("dataclasses", [
-                  condImportSymbol "dataclass" (PythonEnvironment.pythonModuleMetadataUsesDataclass meta)]),
-                ("decimal", [
-                  condImportSymbol "Decimal" (PythonEnvironment.pythonModuleMetadataUsesDecimal meta)]),
-                ("enum", [
-                  condImportSymbol "Enum" (PythonEnvironment.pythonModuleMetadataUsesEnum meta)]),
-                ("functools", [
-                  condImportSymbol "lru_cache" (PythonEnvironment.pythonModuleMetadataUsesLruCache meta)]),
-                ("hydra.dsl.python", [
-                  condImportSymbol "Either" (PythonEnvironment.pythonModuleMetadataUsesEither meta),
-                  (condImportSymbol "FrozenDict" (PythonEnvironment.pythonModuleMetadataUsesFrozenDict meta)),
-                  (condImportSymbol "Just" (PythonEnvironment.pythonModuleMetadataUsesJust meta)),
-                  (condImportSymbol "Left" (PythonEnvironment.pythonModuleMetadataUsesLeft meta)),
-                  (condImportSymbol "Maybe" (PythonEnvironment.pythonModuleMetadataUsesMaybe meta)),
-                  (condImportSymbol "Node" (PythonEnvironment.pythonModuleMetadataUsesNode meta)),
-                  (condImportSymbol "Nothing" (PythonEnvironment.pythonModuleMetadataUsesNothing meta)),
-                  (condImportSymbol "Right" (PythonEnvironment.pythonModuleMetadataUsesRight meta)),
-                  (condImportSymbol "frozenlist" (PythonEnvironment.pythonModuleMetadataUsesFrozenList meta))]),
-                ("typing", [
-                  condImportSymbol "Annotated" (PythonEnvironment.pythonModuleMetadataUsesAnnotated meta),
-                  (condImportSymbol "Generic" (PythonEnvironment.pythonModuleMetadataUsesGeneric meta)),
-                  (condImportSymbol "TypeAlias" (PythonEnvironment.pythonModuleMetadataUsesTypeAlias meta)),
-                  (condImportSymbol "TypeVar" (PythonEnvironment.pythonModuleMetadataUsesTypeVar meta)),
-                  (condImportSymbol "cast" (PythonEnvironment.pythonModuleMetadataUsesCast meta))])]
-          simplified =
-                  Maybes.cat (Lists.map (\p ->
-                    let modName = Pairs.first p
-                        symbols = Maybes.cat (Pairs.second p)
-                    in (Logic.ifElse (Lists.null symbols) Nothing (Just (modName, symbols)))) pairs)
-      in (Lists.map (\p -> standardImportStatement (Pairs.first p) (Pairs.second p)) simplified)
--- | Convert a Hydra module to Python source files
-moduleToPython :: Packaging.Module -> [Packaging.Definition] -> Context.Context -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToPython mod defs cx g =
-    Eithers.bind (encodePythonModule cx g mod defs) (\file ->
-      let s = Serialization.printExpr (Serialization.parenthesize (Serde.encodeModule file))
-          path =
-                  Names.namespaceToFilePath Util.CaseConventionLowerSnake (Packaging.FileExtension "py") (Packaging.moduleNamespace mod)
-      in (Right (Maps.singleton path s)))
--- | Accessor for the graph field of PyGraph
-pyGraphGraph :: PythonEnvironment.PyGraph -> Graph.Graph
-pyGraphGraph pyg = PythonEnvironment.pyGraphGraph pyg
--- | Accessor for the metadata field of PyGraph
-pyGraphMetadata :: PythonEnvironment.PyGraph -> PythonEnvironment.PythonModuleMetadata
-pyGraphMetadata pyg = PythonEnvironment.pyGraphMetadata pyg
--- | Create integer literal expression
-pyInt :: Integer -> Syntax.Expression
-pyInt n = Utils.pyAtomToPyExpression (Syntax.AtomNumber (Syntax.NumberInteger n))
--- | Like bindingMetadata, but only for bindings that will actually be thunked
-pythonBindingMetadata :: Graph.Graph -> Core.Binding -> Maybe Core.Term
-pythonBindingMetadata g b =
-    Logic.ifElse (shouldThunkBinding g b) (Logic.ifElse (Predicates.isComplexBinding g b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing) Nothing
--- | Get the Graph from a PythonEnvironment
-pythonEnvironmentGetGraph :: PythonEnvironment.PythonEnvironment -> Graph.Graph
-pythonEnvironmentGetGraph env = PythonEnvironment.pythonEnvironmentGraph env
--- | Set the Graph in a PythonEnvironment
-pythonEnvironmentSetGraph :: Graph.Graph -> PythonEnvironment.PythonEnvironment -> PythonEnvironment.PythonEnvironment
-pythonEnvironmentSetGraph tc env =
-    PythonEnvironment.PythonEnvironment {
-      PythonEnvironment.pythonEnvironmentNamespaces = (PythonEnvironment.pythonEnvironmentNamespaces env),
-      PythonEnvironment.pythonEnvironmentBoundTypeVariables = (PythonEnvironment.pythonEnvironmentBoundTypeVariables env),
-      PythonEnvironment.pythonEnvironmentGraph = tc,
-      PythonEnvironment.pythonEnvironmentNullaryBindings = (PythonEnvironment.pythonEnvironmentNullaryBindings env),
-      PythonEnvironment.pythonEnvironmentVersion = (PythonEnvironment.pythonEnvironmentVersion env),
-      PythonEnvironment.pythonEnvironmentSkipCasts = (PythonEnvironment.pythonEnvironmentSkipCasts env),
-      PythonEnvironment.pythonEnvironmentInlineVariables = (PythonEnvironment.pythonEnvironmentInlineVariables env)}
-setMetaNamespaces :: Packaging.Namespaces Syntax.DottedName -> PythonEnvironment.PythonModuleMetadata -> PythonEnvironment.PythonModuleMetadata
-setMetaNamespaces ns m =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = ns,
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaTypeVariables :: PythonEnvironment.PythonModuleMetadata -> S.Set Core.Name -> PythonEnvironment.PythonModuleMetadata
-setMetaTypeVariables m tvars =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = tvars,
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesAnnotated :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesAnnotated m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = b,
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesCallable :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesCallable m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = b,
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesCast :: Bool -> PythonEnvironment.PythonModuleMetadata -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesCast b m =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = b,
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesDataclass :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesDataclass m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = b,
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesDecimal :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesDecimal m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = b,
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesEither :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesEither m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = b,
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesEnum :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesEnum m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = b,
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesFrozenDict :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesFrozenDict m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = b,
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesFrozenList :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesFrozenList m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = b,
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesGeneric :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesGeneric m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = b,
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesJust :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesJust m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = b,
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesLeft :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesLeft m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = b,
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesLruCache :: Bool -> PythonEnvironment.PythonModuleMetadata -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesLruCache b m =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = b,
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesMaybe :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesMaybe m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = b,
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesName :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesName m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = b,
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesNode :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesNode m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = b,
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesNothing :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesNothing m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = b,
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesRight :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesRight m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = b,
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesTypeAlias :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesTypeAlias m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = b,
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = (PythonEnvironment.pythonModuleMetadataUsesTypeVar m)}
-setMetaUsesTypeVar :: PythonEnvironment.PythonModuleMetadata -> Bool -> PythonEnvironment.PythonModuleMetadata
-setMetaUsesTypeVar m b =
-    PythonEnvironment.PythonModuleMetadata {
-      PythonEnvironment.pythonModuleMetadataNamespaces = (PythonEnvironment.pythonModuleMetadataNamespaces m),
-      PythonEnvironment.pythonModuleMetadataTypeVariables = (PythonEnvironment.pythonModuleMetadataTypeVariables m),
-      PythonEnvironment.pythonModuleMetadataUsesAnnotated = (PythonEnvironment.pythonModuleMetadataUsesAnnotated m),
-      PythonEnvironment.pythonModuleMetadataUsesCallable = (PythonEnvironment.pythonModuleMetadataUsesCallable m),
-      PythonEnvironment.pythonModuleMetadataUsesCast = (PythonEnvironment.pythonModuleMetadataUsesCast m),
-      PythonEnvironment.pythonModuleMetadataUsesLruCache = (PythonEnvironment.pythonModuleMetadataUsesLruCache m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeAlias = (PythonEnvironment.pythonModuleMetadataUsesTypeAlias m),
-      PythonEnvironment.pythonModuleMetadataUsesDataclass = (PythonEnvironment.pythonModuleMetadataUsesDataclass m),
-      PythonEnvironment.pythonModuleMetadataUsesDecimal = (PythonEnvironment.pythonModuleMetadataUsesDecimal m),
-      PythonEnvironment.pythonModuleMetadataUsesEither = (PythonEnvironment.pythonModuleMetadataUsesEither m),
-      PythonEnvironment.pythonModuleMetadataUsesEnum = (PythonEnvironment.pythonModuleMetadataUsesEnum m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenDict = (PythonEnvironment.pythonModuleMetadataUsesFrozenDict m),
-      PythonEnvironment.pythonModuleMetadataUsesFrozenList = (PythonEnvironment.pythonModuleMetadataUsesFrozenList m),
-      PythonEnvironment.pythonModuleMetadataUsesGeneric = (PythonEnvironment.pythonModuleMetadataUsesGeneric m),
-      PythonEnvironment.pythonModuleMetadataUsesJust = (PythonEnvironment.pythonModuleMetadataUsesJust m),
-      PythonEnvironment.pythonModuleMetadataUsesLeft = (PythonEnvironment.pythonModuleMetadataUsesLeft m),
-      PythonEnvironment.pythonModuleMetadataUsesMaybe = (PythonEnvironment.pythonModuleMetadataUsesMaybe m),
-      PythonEnvironment.pythonModuleMetadataUsesName = (PythonEnvironment.pythonModuleMetadataUsesName m),
-      PythonEnvironment.pythonModuleMetadataUsesNode = (PythonEnvironment.pythonModuleMetadataUsesNode m),
-      PythonEnvironment.pythonModuleMetadataUsesNothing = (PythonEnvironment.pythonModuleMetadataUsesNothing m),
-      PythonEnvironment.pythonModuleMetadataUsesRight = (PythonEnvironment.pythonModuleMetadataUsesRight m),
-      PythonEnvironment.pythonModuleMetadataUsesTypeVar = b}
--- | Determine if a binding should be thunked based on its complexity and triviality
-shouldThunkBinding :: Graph.Graph -> Core.Binding -> Bool
-shouldThunkBinding g b = Logic.and (Predicates.isComplexBinding g b) (Logic.not (Predicates.isTrivialTerm (Core.bindingTerm b)))
--- | Generate a single from-import statement
-standardImportStatement :: String -> [String] -> Syntax.ImportStatement
-standardImportStatement modName symbols =
-    Syntax.ImportStatementFrom (Syntax.ImportFrom {
-      Syntax.importFromPrefixes = [],
-      Syntax.importFromDottedName = (Just (Syntax.DottedName [
-        Syntax.Name modName])),
-      Syntax.importFromTargets = (Syntax.ImportFromTargetsSimple (Lists.map (\s -> Syntax.ImportFromAsName {
-        Syntax.importFromAsNameName = (Syntax.Name s),
-        Syntax.importFromAsNameAs = Nothing}) symbols))})
--- | The target Python version for code generation
-targetPythonVersion :: PythonEnvironment.PythonVersion
-targetPythonVersion = Utils.targetPythonVersion
--- | Calculate term arity with proper primitive handling
-termArityWithPrimitives :: Graph.Graph -> Core.Term -> Int
-termArityWithPrimitives graph term =
-    case (Strip.deannotateAndDetypeTerm term) of
-      Core.TermApplication v0 -> Math.max 0 (Math.sub (termArityWithPrimitives graph (Core.applicationFunction v0)) 1)
-      Core.TermLambda v0 -> Math.add 1 (termArityWithPrimitives graph (Core.lambdaBody v0))
-      Core.TermProject _ -> 1
-      Core.TermUnwrap _ -> 1
-      Core.TermCases _ -> 1
-      Core.TermVariable v0 -> Maybes.maybe 0 (\el -> Maybes.maybe (Arity.termArity (Core.bindingTerm el)) (\ts -> Arity.typeSchemeArity ts) (Core.bindingTypeScheme el)) (Lexical.lookupBinding graph v0)
-      _ -> 0
--- | Create a TypeVar assignment statement for a type variable name
-tvarStatement :: Syntax.Name -> Syntax.Statement
-tvarStatement name =
-    Utils.assignmentStatement name (Utils.functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "TypeVar"))) [
-      Utils.doubleQuotedString (Syntax.unName name)])
--- | Version-aware type alias statement generation
-typeAliasStatementFor :: PythonEnvironment.PythonEnvironment -> Syntax.Name -> [Syntax.TypeParameter] -> Maybe String -> Syntax.Expression -> Syntax.Statement
-typeAliasStatementFor env name tparams mcomment tyexpr =
-    Logic.ifElse (useInlineTypeParamsFor (PythonEnvironment.pythonEnvironmentVersion env)) (Utils.typeAliasStatement name tparams mcomment tyexpr) (Utils.typeAliasStatement310 name tparams mcomment tyexpr)
--- | Version-aware union type statement generation
-unionTypeStatementsFor :: PythonEnvironment.PythonEnvironment -> Syntax.Name -> [Syntax.TypeParameter] -> Maybe String -> Syntax.Expression -> [Syntax.Statement] -> [Syntax.Statement]
-unionTypeStatementsFor env name tparams mcomment tyexpr extraStmts =
-    Logic.ifElse (useInlineTypeParamsFor (PythonEnvironment.pythonEnvironmentVersion env)) (Lists.concat2 [
-      Utils.typeAliasStatement name tparams mcomment tyexpr] extraStmts) (Utils.unionTypeClassStatements310 name mcomment tyexpr extraStmts)
--- | Create an expression that calls hydra.dsl.python.unsupported(message) at runtime
-unsupportedExpression :: String -> Syntax.Expression
-unsupportedExpression msg =
-    Utils.functionCall (Utils.pyExpressionToPyPrimary (Utils.projectFromExpression (Utils.projectFromExpression (Utils.projectFromExpression (Syntax.ExpressionSimple (Syntax.Disjunction [
-      Syntax.Conjunction [
-        Syntax.InversionSimple (Syntax.Comparison {
-          Syntax.comparisonLhs = Syntax.BitwiseOr {
-            Syntax.bitwiseOrLhs = Nothing,
-            Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-              Syntax.bitwiseXorLhs = Nothing,
-              Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                Syntax.bitwiseAndLhs = Nothing,
-                Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                  Syntax.shiftExpressionLhs = Nothing,
-                  Syntax.shiftExpressionRhs = Syntax.Sum {
-                    Syntax.sumLhs = Nothing,
-                    Syntax.sumRhs = Syntax.Term {
-                      Syntax.termLhs = Nothing,
-                      Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                        Syntax.powerLhs = Syntax.AwaitPrimary {
-                          Syntax.awaitPrimaryAwait = False,
-                          Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "hydra")))},
-                        Syntax.powerRhs = Nothing}))}}}}}},
-          Syntax.comparisonRhs = []})]])) (Syntax.Name "dsl")) (Syntax.Name "python")) (Syntax.Name "unsupported"))) [
-      Utils.stringToPyExpression Syntax.QuoteStyleDouble msg]
--- | Legacy constant for backward compatibility; use useInlineTypeParamsFor in new code
-useInlineTypeParams :: Bool
-useInlineTypeParams = useInlineTypeParamsFor Utils.targetPythonVersion
--- | Version-aware inline type parameters
-useInlineTypeParamsFor :: PythonEnvironment.PythonVersion -> Bool
-useInlineTypeParamsFor version = Equality.equal version PythonEnvironment.PythonVersionPython312
--- | Create args for variant (Node[type], Generic[tparams])
-variantArgs :: Syntax.Expression -> [Core.Name] -> Syntax.Args
-variantArgs ptype tparams =
-    Utils.pyExpressionsToPyArgs (Maybes.cat [
-      Just (Utils.pyPrimaryToPyExpression (Utils.primaryWithExpressionSlices (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "Node"))) [
-        ptype])),
-      (genericArg tparams)])
--- | Create a ClosedPattern for a variant based on its characteristics
-variantClosedPattern :: PythonEnvironment.PythonEnvironment -> Core.Name -> Core.Name -> Syntax.Name -> t0 -> Bool -> Core.Name -> Bool -> Syntax.ClosedPattern
-variantClosedPattern env typeName fieldName pyVariantName rowType isEnum varName shouldCapture =
-    Logic.ifElse isEnum (enumVariantPattern env typeName fieldName) (Logic.ifElse (Logic.not shouldCapture) (classVariantPatternUnit pyVariantName) (classVariantPatternWithCapture env pyVariantName varName))
--- | Create a wildcard case block with a given body statement
-wildcardCaseBlock :: Syntax.Statement -> Syntax.CaseBlock
-wildcardCaseBlock stmt =
-    Syntax.CaseBlock {
-      Syntax.caseBlockPatterns = (Utils.pyClosedPatternToPyPatterns Syntax.ClosedPatternWildcard),
-      Syntax.caseBlockGuard = Nothing,
-      Syntax.caseBlockBody = (Utils.indentedBlock Nothing [
-        [
-          stmt]])}
--- | Execute a computation with definitions in scope
-withDefinitions :: PythonEnvironment.PythonEnvironment -> [Packaging.Definition] -> (PythonEnvironment.PythonEnvironment -> t0) -> t0
-withDefinitions env defs body =
-
-      let bindings =
-              Maybes.cat (Lists.map (\def_ -> case def_ of
-                Packaging.DefinitionTerm v0 -> Just (Core.Binding {
-                  Core.bindingName = (Packaging.termDefinitionName v0),
-                  Core.bindingTerm = (Packaging.termDefinitionTerm v0),
-                  Core.bindingTypeScheme = (Packaging.termDefinitionTypeScheme v0)})
-                Packaging.DefinitionType _ -> Nothing
-                _ -> Nothing) defs)
-          dummyLet =
-                  Core.Let {
-                    Core.letBindings = bindings,
-                    Core.letBody = (Core.TermLiteral (Core.LiteralString "dummy"))}
-      in (withLet env dummyLet body)
--- | Execute a computation with lambda context (adds lambda parameter to Graph)
-withLambda :: PythonEnvironment.PythonEnvironment -> Core.Lambda -> (PythonEnvironment.PythonEnvironment -> t0) -> t0
-withLambda = Environment.withLambdaContext pythonEnvironmentGetGraph pythonEnvironmentSetGraph
--- | Execute a computation with let context (adds let bindings to Graph)
-withLet :: PythonEnvironment.PythonEnvironment -> Core.Let -> (PythonEnvironment.PythonEnvironment -> t0) -> t0
-withLet = Environment.withLetContext pythonEnvironmentGetGraph pythonEnvironmentSetGraph pythonBindingMetadata
--- | Execute a computation with inline let context (for walrus operators)
-withLetInline :: PythonEnvironment.PythonEnvironment -> Core.Let -> (PythonEnvironment.PythonEnvironment -> t0) -> t0
-withLetInline env lt body =
-
-      let bindingNames = Lists.map (\b -> Core.bindingName b) (Core.letBindings lt)
-          inlineVars = Sets.fromList bindingNames
-          noMetadata = \tc -> \b -> Nothing
-      in (Environment.withLetContext pythonEnvironmentGetGraph pythonEnvironmentSetGraph noMetadata env lt (\innerEnv ->
-        let updatedEnv =
-                PythonEnvironment.PythonEnvironment {
-                  PythonEnvironment.pythonEnvironmentNamespaces = (PythonEnvironment.pythonEnvironmentNamespaces innerEnv),
-                  PythonEnvironment.pythonEnvironmentBoundTypeVariables = (PythonEnvironment.pythonEnvironmentBoundTypeVariables innerEnv),
-                  PythonEnvironment.pythonEnvironmentGraph = (PythonEnvironment.pythonEnvironmentGraph innerEnv),
-                  PythonEnvironment.pythonEnvironmentNullaryBindings = (PythonEnvironment.pythonEnvironmentNullaryBindings innerEnv),
-                  PythonEnvironment.pythonEnvironmentVersion = (PythonEnvironment.pythonEnvironmentVersion innerEnv),
-                  PythonEnvironment.pythonEnvironmentSkipCasts = (PythonEnvironment.pythonEnvironmentSkipCasts innerEnv),
-                  PythonEnvironment.pythonEnvironmentInlineVariables = (Sets.union inlineVars (PythonEnvironment.pythonEnvironmentInlineVariables innerEnv))}
-        in (body updatedEnv)))
--- | Execute a computation with type lambda context
-withTypeLambda :: PythonEnvironment.PythonEnvironment -> Core.TypeLambda -> (PythonEnvironment.PythonEnvironment -> t0) -> t0
-withTypeLambda = Environment.withTypeLambdaContext pythonEnvironmentGetGraph pythonEnvironmentSetGraph
--- | Wrap a Python expression in a nullary lambda (thunk) for lazy evaluation
-wrapInNullaryLambda :: Syntax.Expression -> Syntax.Expression
-wrapInNullaryLambda expr =
-    Syntax.ExpressionLambda (Syntax.Lambda {
-      Syntax.lambdaParams = Syntax.LambdaParameters {
-        Syntax.lambdaParametersSlashNoDefault = Nothing,
-        Syntax.lambdaParametersParamNoDefault = [],
-        Syntax.lambdaParametersParamWithDefault = [],
-        Syntax.lambdaParametersStarEtc = Nothing},
-      Syntax.lambdaBody = expr})
--- | Wrap specific arguments in nullary lambdas for primitives that require lazy evaluation
-wrapLazyArguments :: Core.Name -> [Syntax.Expression] -> [Syntax.Expression]
-wrapLazyArguments name args =
-
-      let dummyExpr = Utils.pyNameToPyExpression (Syntax.Name "")
-          argAt = \i -> Maybes.fromMaybe dummyExpr (Lists.maybeAt i args)
-      in (Logic.ifElse (Logic.and (Equality.equal name (Core.Name "hydra.lib.logic.ifElse")) (Equality.equal (Lists.length args) 3)) [
-        argAt 0,
-        (wrapInNullaryLambda (argAt 1)),
-        (wrapInNullaryLambda (argAt 2))] (Logic.ifElse (Logic.and (Equality.equal name (Core.Name "hydra.lib.maybes.cases")) (Equality.equal (Lists.length args) 3)) [
-        argAt 0,
-        (wrapInNullaryLambda (argAt 1)),
-        (argAt 2)] (Logic.ifElse (Logic.and (Logic.or (Equality.equal name (Core.Name "hydra.lib.maybes.maybe")) (Equality.equal name (Core.Name "hydra.lib.maybes.fromMaybe"))) (Equality.gte (Lists.length args) 1)) (Lists.cons (wrapInNullaryLambda (argAt 0)) (Lists.drop 1 args)) args)))
diff --git a/src/main/haskell/Hydra/Python/Environment.hs b/src/main/haskell/Hydra/Python/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Environment.hs
+++ /dev/null
@@ -1,106 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Environment types for Python code generation
-
-module Hydra.Python.Environment where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Python.Syntax as Syntax
-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
--- | Target Python version for code generation
-data PythonVersion =
-  PythonVersionPython310 |
-  PythonVersionPython312
-  deriving (Eq, Ord, Read, Show)
-_PythonVersion = Core.Name "hydra.python.environment.PythonVersion"
-_PythonVersion_python310 = Core.Name "python310"
-_PythonVersion_python312 = Core.Name "python312"
--- | Environment for Python code generation
-data PythonEnvironment =
-  PythonEnvironment {
-    -- | Namespace mapping for imports
-    pythonEnvironmentNamespaces :: (Packaging.Namespaces Syntax.DottedName),
-    -- | Type variables in scope, with their Python names
-    pythonEnvironmentBoundTypeVariables :: ([Core.Name], (M.Map Core.Name Syntax.Name)),
-    -- | Graph context for type inference
-    pythonEnvironmentGraph :: Graph.Graph,
-    -- | Set of nullary bindings (need call syntax)
-    pythonEnvironmentNullaryBindings :: (S.Set Core.Name),
-    -- | Target Python version
-    pythonEnvironmentVersion :: PythonVersion,
-    -- | When True, skip generating cast() calls for reduced memory usage
-    pythonEnvironmentSkipCasts :: Bool,
-    -- | Variables that are inline let bindings (walrus operators)
-    pythonEnvironmentInlineVariables :: (S.Set Core.Name)}
-_PythonEnvironment = Core.Name "hydra.python.environment.PythonEnvironment"
-_PythonEnvironment_namespaces = Core.Name "namespaces"
-_PythonEnvironment_boundTypeVariables = Core.Name "boundTypeVariables"
-_PythonEnvironment_graph = Core.Name "graph"
-_PythonEnvironment_nullaryBindings = Core.Name "nullaryBindings"
-_PythonEnvironment_version = Core.Name "version"
-_PythonEnvironment_skipCasts = Core.Name "skipCasts"
-_PythonEnvironment_inlineVariables = Core.Name "inlineVariables"
--- | Temporary metadata used to create the header section of a Python file
-data PythonModuleMetadata =
-  PythonModuleMetadata {
-    -- | Namespace mapping for imports
-    pythonModuleMetadataNamespaces :: (Packaging.Namespaces Syntax.DottedName),
-    -- | Type variables used in the module
-    pythonModuleMetadataTypeVariables :: (S.Set Core.Name),
-    pythonModuleMetadataUsesAnnotated :: Bool,
-    pythonModuleMetadataUsesCallable :: Bool,
-    pythonModuleMetadataUsesCast :: Bool,
-    pythonModuleMetadataUsesLruCache :: Bool,
-    pythonModuleMetadataUsesTypeAlias :: Bool,
-    pythonModuleMetadataUsesDataclass :: Bool,
-    pythonModuleMetadataUsesDecimal :: Bool,
-    pythonModuleMetadataUsesEither :: Bool,
-    pythonModuleMetadataUsesEnum :: Bool,
-    pythonModuleMetadataUsesFrozenDict :: Bool,
-    pythonModuleMetadataUsesFrozenList :: Bool,
-    pythonModuleMetadataUsesGeneric :: Bool,
-    pythonModuleMetadataUsesJust :: Bool,
-    pythonModuleMetadataUsesLeft :: Bool,
-    pythonModuleMetadataUsesMaybe :: Bool,
-    pythonModuleMetadataUsesName :: Bool,
-    pythonModuleMetadataUsesNode :: Bool,
-    pythonModuleMetadataUsesNothing :: Bool,
-    pythonModuleMetadataUsesRight :: Bool,
-    pythonModuleMetadataUsesTypeVar :: Bool}
-  deriving (Eq, Ord, Read, Show)
-_PythonModuleMetadata = Core.Name "hydra.python.environment.PythonModuleMetadata"
-_PythonModuleMetadata_namespaces = Core.Name "namespaces"
-_PythonModuleMetadata_typeVariables = Core.Name "typeVariables"
-_PythonModuleMetadata_usesAnnotated = Core.Name "usesAnnotated"
-_PythonModuleMetadata_usesCallable = Core.Name "usesCallable"
-_PythonModuleMetadata_usesCast = Core.Name "usesCast"
-_PythonModuleMetadata_usesLruCache = Core.Name "usesLruCache"
-_PythonModuleMetadata_usesTypeAlias = Core.Name "usesTypeAlias"
-_PythonModuleMetadata_usesDataclass = Core.Name "usesDataclass"
-_PythonModuleMetadata_usesDecimal = Core.Name "usesDecimal"
-_PythonModuleMetadata_usesEither = Core.Name "usesEither"
-_PythonModuleMetadata_usesEnum = Core.Name "usesEnum"
-_PythonModuleMetadata_usesFrozenDict = Core.Name "usesFrozenDict"
-_PythonModuleMetadata_usesFrozenList = Core.Name "usesFrozenList"
-_PythonModuleMetadata_usesGeneric = Core.Name "usesGeneric"
-_PythonModuleMetadata_usesJust = Core.Name "usesJust"
-_PythonModuleMetadata_usesLeft = Core.Name "usesLeft"
-_PythonModuleMetadata_usesMaybe = Core.Name "usesMaybe"
-_PythonModuleMetadata_usesName = Core.Name "usesName"
-_PythonModuleMetadata_usesNode = Core.Name "usesNode"
-_PythonModuleMetadata_usesNothing = Core.Name "usesNothing"
-_PythonModuleMetadata_usesRight = Core.Name "usesRight"
-_PythonModuleMetadata_usesTypeVar = Core.Name "usesTypeVar"
--- | Combined graph and metadata state for Python code generation
-data PyGraph =
-  PyGraph {
-    -- | The Hydra graph being processed
-    pyGraphGraph :: Graph.Graph,
-    -- | Accumulated module metadata
-    pyGraphMetadata :: PythonModuleMetadata}
-_PyGraph = Core.Name "hydra.python.environment.PyGraph"
-_PyGraph_graph = Core.Name "graph"
-_PyGraph_metadata = Core.Name "metadata"
diff --git a/src/main/haskell/Hydra/Python/Language.hs b/src/main/haskell/Hydra/Python/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Language.hs
+++ /dev/null
@@ -1,144 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Language constraints and reserved words for Python 3
-
-module Hydra.Python.Language where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
--- | Language constraints for Python 3
-pythonLanguage :: Coders.Language
-pythonLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.python"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantDecimal,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeBigfloat,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
--- | A set of reserved words in Python
-pythonReservedWords :: S.Set String
-pythonReservedWords =
-    Sets.fromList (Lists.concat [
-      pythonKeywords,
-      pythonBuiltInFunctions,
-      hydraPythonKeywords])
-  where
-    pythonKeywords =
-        [
-          "False",
-          "None",
-          "True",
-          "and",
-          "as",
-          "assert",
-          "async",
-          "await",
-          "break",
-          "class",
-          "continue",
-          "def",
-          "del",
-          "elif",
-          "else",
-          "except",
-          "finally",
-          "for",
-          "from",
-          "global",
-          "if",
-          "import",
-          "in",
-          "is",
-          "lambda",
-          "nonlocal",
-          "not",
-          "or",
-          "pass",
-          "raise",
-          "return",
-          "try",
-          "while",
-          "with",
-          "yield"]
-    pythonBuiltInFunctions = [
-      "range"]
-    hydraPythonKeywords =
-        [
-          "Node",
-          "FrozenDict"]
diff --git a/src/main/haskell/Hydra/Python/Names.hs b/src/main/haskell/Hydra/Python/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Names.hs
+++ /dev/null
@@ -1,140 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Python naming utilities: encoding Hydra names as Python names
-
-module Hydra.Python.Names where
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Python.Environment as Environment
-import qualified Hydra.Python.Language as Language
-import qualified Hydra.Python.Serde as Serde
-import qualified Hydra.Python.Syntax as Syntax
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Generate a constant name for a field definition
-encodeConstantForFieldName :: t0 -> t1 -> Core.Name -> Syntax.Name
-encodeConstantForFieldName env tname fname =
-    Syntax.Name (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake (Core.unName fname))
--- | Generate a constant name for a type definition
-encodeConstantForTypeName :: t0 -> t1 -> Syntax.Name
-encodeConstantForTypeName env tname = Syntax.Name "TYPE_"
--- | Encode a name as a Python enum value (UPPER_SNAKE case)
-encodeEnumValue :: Environment.PythonEnvironment -> Core.Name -> Syntax.Name
-encodeEnumValue = encodeName False Util.CaseConventionUpperSnake
--- | Encode a name as a Python field name (lower_snake case)
-encodeFieldName :: Environment.PythonEnvironment -> Core.Name -> Syntax.Name
-encodeFieldName env fname = encodeName False Util.CaseConventionLowerSnake env fname
--- | Encode a Hydra name as a Python name
-encodeName :: Bool -> Util.CaseConvention -> Environment.PythonEnvironment -> Core.Name -> Syntax.Name
-encodeName isQualified conv env name =
-
-      let namespaces = Environment.pythonEnvironmentNamespaces env
-          focusPair = Packaging.namespacesFocus namespaces
-          focusNs = Pairs.first focusPair
-          boundVars = Pairs.second (Environment.pythonEnvironmentBoundTypeVariables env)
-          qualName = Names.qualifyName name
-          mns = Packaging.qualifiedNameNamespace qualName
-          local = Packaging.qualifiedNameLocal qualName
-          pyLocal = sanitizePythonName (Formatting.convertCase Util.CaseConventionCamel conv local)
-          pyNs =
-                  \nsVal -> Strings.intercalate "." (Lists.map (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake) (Strings.splitOn "." (Packaging.unNamespace nsVal)))
-      in (Logic.ifElse isQualified (Maybes.maybe (Logic.ifElse (Equality.equal mns (Just focusNs)) (Syntax.Name (Logic.ifElse useFutureAnnotations pyLocal (Serde.escapePythonString True pyLocal))) (Maybes.maybe (Syntax.Name pyLocal) (\nsVal -> Syntax.Name (Strings.cat2 (pyNs nsVal) (Strings.cat2 "." pyLocal))) mns)) (\n -> n) (Maps.lookup name boundVars)) (Syntax.Name pyLocal))
--- | Encode a name as a fully qualified Python name
-encodeNameQualified :: Environment.PythonEnvironment -> Core.Name -> Syntax.Name
-encodeNameQualified env name =
-
-      let namespaces = Environment.pythonEnvironmentNamespaces env
-          focusPair = Packaging.namespacesFocus namespaces
-          focusNs = Pairs.first focusPair
-          boundVars = Pairs.second (Environment.pythonEnvironmentBoundTypeVariables env)
-          qualName = Names.qualifyName name
-          mns = Packaging.qualifiedNameNamespace qualName
-          local = Packaging.qualifiedNameLocal qualName
-      in (Maybes.maybe (Logic.ifElse (Equality.equal mns (Just focusNs)) (Syntax.Name (Logic.ifElse useFutureAnnotations local (Serde.escapePythonString True local))) (Syntax.Name (Strings.intercalate "." (Lists.map sanitizePythonName (Strings.splitOn "." (Core.unName name)))))) (\n -> n) (Maps.lookup name boundVars))
--- | Encode a namespace as a Python dotted name
-encodeNamespace :: Packaging.Namespace -> Syntax.DottedName
-encodeNamespace nsVal =
-    Syntax.DottedName (Lists.map (\part -> Syntax.Name (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake part)) (Strings.splitOn "." (Packaging.unNamespace nsVal)))
--- | Encode a type variable name (capitalized)
-encodeTypeVariable :: Core.Name -> Syntax.Name
-encodeTypeVariable name = Syntax.Name (Formatting.capitalize (Core.unName name))
--- | Sanitize a string to be a valid Python name
-sanitizePythonName :: String -> String
-sanitizePythonName = Formatting.sanitizeWithUnderscores Language.pythonReservedWords
--- | Reference a term variable as a Python expression
-termVariableReference :: Environment.PythonEnvironment -> Core.Name -> Syntax.Expression
-termVariableReference = variableReference Util.CaseConventionLowerSnake False
--- | Reference a type variable as a Python expression
-typeVariableReference :: Environment.PythonEnvironment -> Core.Name -> Syntax.Expression
-typeVariableReference = variableReference Util.CaseConventionPascal False
--- | Whether to use __future__ annotations for forward references
-useFutureAnnotations :: Bool
-useFutureAnnotations = True
--- | Reference a variable as a Python expression
-variableReference :: Util.CaseConvention -> Bool -> Environment.PythonEnvironment -> Core.Name -> Syntax.Expression
-variableReference conv quoted env name =
-
-      let pyName = encodeName True conv env name
-          unquoted =
-                  Syntax.ExpressionSimple (Syntax.Disjunction [
-                    Syntax.Conjunction [
-                      Syntax.InversionSimple (Syntax.Comparison {
-                        Syntax.comparisonLhs = Syntax.BitwiseOr {
-                          Syntax.bitwiseOrLhs = Nothing,
-                          Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                            Syntax.bitwiseXorLhs = Nothing,
-                            Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                              Syntax.bitwiseAndLhs = Nothing,
-                              Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                Syntax.shiftExpressionLhs = Nothing,
-                                Syntax.shiftExpressionRhs = Syntax.Sum {
-                                  Syntax.sumLhs = Nothing,
-                                  Syntax.sumRhs = Syntax.Term {
-                                    Syntax.termLhs = Nothing,
-                                    Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                      Syntax.powerLhs = Syntax.AwaitPrimary {
-                                        Syntax.awaitPrimaryAwait = False,
-                                        Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName pyName))},
-                                      Syntax.powerRhs = Nothing}))}}}}}},
-                        Syntax.comparisonRhs = []})]])
-          namespaces = Environment.pythonEnvironmentNamespaces env
-          focusPair = Packaging.namespacesFocus namespaces
-          focusNs = Pairs.first focusPair
-          mns = Names.namespaceOf name
-          sameNamespace = Maybes.maybe False (\ns -> Equality.equal ns focusNs) mns
-      in (Logic.ifElse (Logic.and quoted sameNamespace) (Syntax.ExpressionSimple (Syntax.Disjunction [
-        Syntax.Conjunction [
-          Syntax.InversionSimple (Syntax.Comparison {
-            Syntax.comparisonLhs = Syntax.BitwiseOr {
-              Syntax.bitwiseOrLhs = Nothing,
-              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                Syntax.bitwiseXorLhs = Nothing,
-                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                  Syntax.bitwiseAndLhs = Nothing,
-                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                    Syntax.shiftExpressionLhs = Nothing,
-                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                      Syntax.sumLhs = Nothing,
-                      Syntax.sumRhs = Syntax.Term {
-                        Syntax.termLhs = Nothing,
-                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                            Syntax.awaitPrimaryAwait = False,
-                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomString (Syntax.String_ {
-                              Syntax.stringValue = (Syntax.unName pyName),
-                              Syntax.stringQuoteStyle = Syntax.QuoteStyleDouble})))},
-                          Syntax.powerRhs = Nothing}))}}}}}},
-            Syntax.comparisonRhs = []})]])) unquoted)
--- | Generate a variant name from type name and field name
-variantName :: Bool -> Environment.PythonEnvironment -> Core.Name -> Core.Name -> Syntax.Name
-variantName isQualified env tname fname =
-    encodeName isQualified Util.CaseConventionPascal env (Core.Name (Strings.cat2 (Core.unName tname) (Formatting.capitalize (Core.unName fname))))
diff --git a/src/main/haskell/Hydra/Python/Serde.hs b/src/main/haskell/Hydra/Python/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Serde.hs
+++ /dev/null
@@ -1,890 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Python serializer: converts Python AST to concrete syntax
-
-module Hydra.Python.Serde where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Python.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Serialize an annotated RHS
-encodeAnnotatedRhs :: Syntax.AnnotatedRhs -> Ast.Expr
-encodeAnnotatedRhs arhs =
-    Serialization.spaceSep [
-      Serialization.cst "=",
-      case arhs of
-        Syntax.AnnotatedRhsStar v0 -> Serialization.commaSep Serialization.inlineStyle (Lists.map encodeStarExpression v0)
-        Syntax.AnnotatedRhsYield _ -> Serialization.cst "yield ..."]
--- | Serialize an annotated statement (with optional doc comment)
-encodeAnnotatedStatement :: Syntax.AnnotatedStatement -> Ast.Expr
-encodeAnnotatedStatement as_ =
-
-      let doc_ = Syntax.annotatedStatementComment as_
-          stmt = Syntax.annotatedStatementStatement as_
-      in (Serialization.newlineSep [
-        Serialization.cst (toPythonComments doc_),
-        (encodeStatement stmt)])
--- | Serialize a type annotation
-encodeAnnotation :: Syntax.Annotation -> Ast.Expr
-encodeAnnotation ann =
-    Serialization.spaceSep [
-      Serialization.cst ":",
-      (encodeExpression (Syntax.unAnnotation ann))]
--- | Serialize function arguments
-encodeArgs :: Syntax.Args -> Ast.Expr
-encodeArgs args =
-
-      let pos = Syntax.argsPositional args
-          ks = Syntax.argsKwargOrStarred args
-          kss = Syntax.argsKwargOrDoubleStarred args
-      in (Serialization.commaSep Serialization.inlineStyle (Lists.concat [
-        Lists.map encodePosArg pos,
-        (Lists.map encodeKwargOrStarred ks),
-        (Lists.map encodeKwargOrDoubleStarred kss)]))
--- | Serialize an assignment
-encodeAssignment :: Syntax.Assignment -> Ast.Expr
-encodeAssignment a =
-    case a of
-      Syntax.AssignmentTyped v0 -> encodeTypedAssignment v0
-      Syntax.AssignmentUntyped v0 -> encodeUntypedAssignment v0
-      Syntax.AssignmentAug _ -> Serialization.cst "... += ..."
--- | Serialize an assignment expression (walrus operator)
-encodeAssignmentExpression :: Syntax.AssignmentExpression -> Ast.Expr
-encodeAssignmentExpression ae =
-
-      let name = Syntax.assignmentExpressionName ae
-          expr = Syntax.assignmentExpressionExpression ae
-      in (Serialization.spaceSep [
-        encodeName name,
-        (Serialization.cst ":="),
-        (encodeExpression expr)])
--- | Serialize a Python atom (literal or basic expression)
-encodeAtom :: Syntax.Atom -> Ast.Expr
-encodeAtom atom =
-    case atom of
-      Syntax.AtomDict v0 -> encodeDict v0
-      Syntax.AtomDictcomp _ -> Serialization.cst "{...}"
-      Syntax.AtomEllipsis -> Serialization.cst "..."
-      Syntax.AtomFalse -> Serialization.cst "False"
-      Syntax.AtomGenexp _ -> Serialization.cst "(...)"
-      Syntax.AtomGroup v0 -> encodeGroup v0
-      Syntax.AtomList v0 -> encodeList v0
-      Syntax.AtomListcomp _ -> Serialization.cst "[...]"
-      Syntax.AtomName v0 -> encodeName v0
-      Syntax.AtomNone -> Serialization.cst "None"
-      Syntax.AtomNumber v0 -> encodeNumber v0
-      Syntax.AtomSet v0 -> encodeSet v0
-      Syntax.AtomSetcomp _ -> Serialization.cst "{...}"
-      Syntax.AtomString v0 -> encodeString v0
-      Syntax.AtomTrue -> Serialization.cst "True"
-      Syntax.AtomTuple v0 -> encodeTuple v0
--- | Serialize an attribute access
-encodeAttribute :: Syntax.Attribute -> Ast.Expr
-encodeAttribute attr = Serialization.dotSep (Lists.map encodeName (Syntax.unAttribute attr))
--- | Serialize an await primary expression
-encodeAwaitPrimary :: Syntax.AwaitPrimary -> Ast.Expr
-encodeAwaitPrimary ap =
-
-      let await_ = Syntax.awaitPrimaryAwait ap
-          primary = Syntax.awaitPrimaryPrimary ap
-      in (Logic.ifElse await_ (Serialization.spaceSep [
-        Serialization.cst "await",
-        (encodePrimary primary)]) (encodePrimary primary))
--- | Serialize a bitwise AND expression
-encodeBitwiseAnd :: Syntax.BitwiseAnd -> Ast.Expr
-encodeBitwiseAnd band =
-
-      let lhs = Syntax.bitwiseAndLhs band
-          rhs = Syntax.bitwiseAndRhs band
-      in (Serialization.spaceSep (Maybes.cat [
-        Maybes.map (\l -> Serialization.spaceSep [
-          encodeBitwiseAnd l,
-          (Serialization.cst "&")]) lhs,
-        (Just (encodeShiftExpression rhs))]))
--- | Serialize a bitwise OR expression
-encodeBitwiseOr :: Syntax.BitwiseOr -> Ast.Expr
-encodeBitwiseOr bor =
-
-      let lhs = Syntax.bitwiseOrLhs bor
-          rhs = Syntax.bitwiseOrRhs bor
-      in (Serialization.spaceSep (Maybes.cat [
-        Maybes.map (\l -> Serialization.spaceSep [
-          encodeBitwiseOr l,
-          (Serialization.cst "|")]) lhs,
-        (Just (encodeBitwiseXor rhs))]))
--- | Serialize a bitwise XOR expression
-encodeBitwiseXor :: Syntax.BitwiseXor -> Ast.Expr
-encodeBitwiseXor bxor =
-
-      let lhs = Syntax.bitwiseXorLhs bxor
-          rhs = Syntax.bitwiseXorRhs bxor
-      in (Serialization.spaceSep (Maybes.cat [
-        Maybes.map (\l -> Serialization.spaceSep [
-          encodeBitwiseXor l,
-          (Serialization.cst "^")]) lhs,
-        (Just (encodeBitwiseAnd rhs))]))
--- | Serialize a block
-encodeBlock :: Syntax.Block -> Ast.Expr
-encodeBlock b =
-    case b of
-      Syntax.BlockIndented v0 -> Serialization.tabIndentDoubleSpace (Lists.map (\stmts -> Serialization.newlineSep (Lists.map encodeStatement stmts)) v0)
-      Syntax.BlockSimple v0 -> Serialization.semicolonSep (Lists.map encodeSimpleStatement v0)
--- | Serialize a capture pattern
-encodeCapturePattern :: Syntax.CapturePattern -> Ast.Expr
-encodeCapturePattern cp = encodePatternCaptureTarget (Syntax.unCapturePattern cp)
--- | Serialize a case block
-encodeCaseBlock :: Syntax.CaseBlock -> Ast.Expr
-encodeCaseBlock cb =
-
-      let patterns = Syntax.caseBlockPatterns cb
-          guard = Syntax.caseBlockGuard cb
-          body = Syntax.caseBlockBody cb
-      in (Serialization.newlineSep [
-        Serialization.noSep [
-          Serialization.spaceSep (Maybes.cat [
-            Just (Serialization.cst "case"),
-            (Just (encodePatterns patterns)),
-            (Maybes.map encodeGuard guard)]),
-          (Serialization.cst ":")],
-        (encodeBlock body)])
--- | Serialize a class definition
-encodeClassDefinition :: Syntax.ClassDefinition -> Ast.Expr
-encodeClassDefinition cd =
-
-      let decs = Syntax.classDefinitionDecorators cd
-          name = Syntax.classDefinitionName cd
-          args = Syntax.classDefinitionArguments cd
-          body = Syntax.classDefinitionBody cd
-          argPart =
-                  Maybes.map (\a -> Serialization.noSep [
-                    Serialization.cst "(",
-                    (encodeArgs a),
-                    (Serialization.cst ")")]) args
-      in (Serialization.newlineSep (Maybes.cat [
-        Maybes.map encodeDecorators decs,
-        (Just (Serialization.noSep (Maybes.cat [
-          Just (Serialization.spaceSep [
-            Serialization.cst "class",
-            (encodeName name)]),
-          argPart,
-          (Just (Serialization.cst ":"))]))),
-        (Just (encodeBlock body))]))
--- | Serialize a class pattern
-encodeClassPattern :: Syntax.ClassPattern -> Ast.Expr
-encodeClassPattern cp =
-
-      let noa = Syntax.classPatternNameOrAttribute cp
-          pos = Syntax.classPatternPositionalPatterns cp
-          kw = Syntax.classPatternKeywordPatterns cp
-      in (Serialization.noSep (Maybes.cat [
-        Just (encodeNameOrAttribute noa),
-        (Just (Serialization.cst "(")),
-        (Maybes.map encodePositionalPatterns pos),
-        (Maybes.map encodeKeywordPatterns kw),
-        (Just (Serialization.cst ")"))]))
--- | Serialize a closed pattern
-encodeClosedPattern :: Syntax.ClosedPattern -> Ast.Expr
-encodeClosedPattern cp =
-    case cp of
-      Syntax.ClosedPatternLiteral _ -> Serialization.cst "..."
-      Syntax.ClosedPatternCapture v0 -> encodeCapturePattern v0
-      Syntax.ClosedPatternWildcard -> Serialization.cst "_"
-      Syntax.ClosedPatternValue v0 -> encodeValuePattern v0
-      Syntax.ClosedPatternGroup _ -> Serialization.cst "(...)"
-      Syntax.ClosedPatternSequence _ -> Serialization.cst "[...]"
-      Syntax.ClosedPatternMapping _ -> Serialization.cst "{...}"
-      Syntax.ClosedPatternClass v0 -> encodeClassPattern v0
--- | Serialize a comparison expression
-encodeComparison :: Syntax.Comparison -> Ast.Expr
-encodeComparison cmp = encodeBitwiseOr (Syntax.comparisonLhs cmp)
--- | Serialize a compound (multi-line) Python statement
-encodeCompoundStatement :: Syntax.CompoundStatement -> Ast.Expr
-encodeCompoundStatement cs =
-    case cs of
-      Syntax.CompoundStatementFunction v0 -> encodeFunctionDefinition v0
-      Syntax.CompoundStatementIf _ -> Serialization.cst "if ..."
-      Syntax.CompoundStatementClassDef v0 -> encodeClassDefinition v0
-      Syntax.CompoundStatementWith _ -> Serialization.cst "with ..."
-      Syntax.CompoundStatementFor _ -> Serialization.cst "for ..."
-      Syntax.CompoundStatementTry _ -> Serialization.cst "try ..."
-      Syntax.CompoundStatementWhile v0 -> encodeWhileStatement v0
-      Syntax.CompoundStatementMatch v0 -> encodeMatchStatement v0
--- | Serialize a conditional expression (ternary)
-encodeConditional :: Syntax.Conditional -> Ast.Expr
-encodeConditional c =
-
-      let body = Syntax.conditionalBody c
-          cond = Syntax.conditionalIf c
-          elseExpr = Syntax.conditionalElse c
-      in (Serialization.spaceSep [
-        encodeDisjunction body,
-        (Serialization.cst "if"),
-        (encodeDisjunction cond),
-        (Serialization.cst "else"),
-        (encodeExpression elseExpr)])
--- | Serialize a conjunction (and expression)
-encodeConjunction :: Syntax.Conjunction -> Ast.Expr
-encodeConjunction c =
-    Serialization.symbolSep "and" Serialization.inlineStyle (Lists.map encodeInversion (Syntax.unConjunction c))
--- | Serialize decorators
-encodeDecorators :: Syntax.Decorators -> Ast.Expr
-encodeDecorators decs =
-    Serialization.newlineSep (Lists.map (\ne -> Serialization.noSep [
-      Serialization.cst "@",
-      (encodeNamedExpression ne)]) (Syntax.unDecorators decs))
--- | Serialize a Python dictionary
-encodeDict :: Syntax.Dict -> Ast.Expr
-encodeDict d =
-    Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map encodeDoubleStarredKvpair (Syntax.unDict d))
--- | Serialize a disjunction (or expression)
-encodeDisjunction :: Syntax.Disjunction -> Ast.Expr
-encodeDisjunction d =
-    Serialization.symbolSep "or" Serialization.inlineStyle (Lists.map encodeConjunction (Syntax.unDisjunction d))
--- | Serialize a dotted as name
-encodeDottedAsName :: Syntax.DottedAsName -> Ast.Expr
-encodeDottedAsName dan =
-
-      let name = Syntax.dottedAsNameName dan
-          alias = Syntax.dottedAsNameAs dan
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (encodeDottedName name),
-        (Maybes.map (\a -> Serialization.spaceSep [
-          Serialization.cst "as",
-          (encodeName a)]) alias)]))
--- | Serialize a dotted name (e.g., module.submodule)
-encodeDottedName :: Syntax.DottedName -> Ast.Expr
-encodeDottedName dn = Serialization.cst (Strings.intercalate "." (Lists.map (\n -> Syntax.unName n) (Syntax.unDottedName dn)))
--- | Serialize a double-starred key-value pair
-encodeDoubleStarredKvpair :: Syntax.DoubleStarredKvpair -> Ast.Expr
-encodeDoubleStarredKvpair dskv =
-    case dskv of
-      Syntax.DoubleStarredKvpairPair v0 -> encodeKvpair v0
-      Syntax.DoubleStarredKvpairStarred v0 -> Serialization.noSep [
-        Serialization.cst "**",
-        (encodeBitwiseOr v0)]
--- | Serialize a Python expression
-encodeExpression :: Syntax.Expression -> Ast.Expr
-encodeExpression expr =
-    case expr of
-      Syntax.ExpressionSimple v0 -> encodeDisjunction v0
-      Syntax.ExpressionConditional v0 -> encodeConditional v0
-      Syntax.ExpressionLambda v0 -> encodeLambda v0
--- | Serialize a factor expression
-encodeFactor :: Syntax.Factor -> Ast.Expr
-encodeFactor f =
-    case f of
-      Syntax.FactorPositive v0 -> Serialization.noSep [
-        Serialization.cst "+",
-        (encodeFactor v0)]
-      Syntax.FactorNegative v0 -> Serialization.noSep [
-        Serialization.cst "-",
-        (encodeFactor v0)]
-      Syntax.FactorComplement v0 -> Serialization.noSep [
-        Serialization.cst "~",
-        (encodeFactor v0)]
-      Syntax.FactorSimple v0 -> encodePower v0
--- | Serialize a raw function definition
-encodeFunctionDefRaw :: Syntax.FunctionDefRaw -> Ast.Expr
-encodeFunctionDefRaw fdr =
-
-      let async_ = Syntax.functionDefRawAsync fdr
-          name = Syntax.functionDefRawName fdr
-          tparams = Syntax.functionDefRawTypeParams fdr
-          params = Syntax.functionDefRawParams fdr
-          retType = Syntax.functionDefRawReturnType fdr
-          block = Syntax.functionDefRawBlock fdr
-          asyncKw = Logic.ifElse async_ (Just (Serialization.cst "async")) Nothing
-          tparamPart =
-                  Logic.ifElse (Lists.null tparams) Nothing (Just (Serialization.bracketList Serialization.inlineStyle (Lists.map encodeTypeParameter tparams)))
-          paramPart = Maybes.map encodeParameters params
-          retPart =
-                  Maybes.map (\t -> Serialization.spaceSep [
-                    Serialization.cst "->",
-                    (encodeExpression t)]) retType
-      in (Serialization.newlineSep [
-        Serialization.noSep [
-          Serialization.spaceSep (Maybes.cat [
-            asyncKw,
-            (Just (Serialization.cst "def")),
-            (Just (Serialization.noSep (Maybes.cat [
-              Just (encodeName name),
-              tparamPart,
-              (Just (Serialization.cst "(")),
-              paramPart,
-              (Just (Serialization.cst ")"))]))),
-            retPart]),
-          (Serialization.cst ":")],
-        (encodeBlock block)])
--- | Serialize a function definition
-encodeFunctionDefinition :: Syntax.FunctionDefinition -> Ast.Expr
-encodeFunctionDefinition fd =
-
-      let decs = Syntax.functionDefinitionDecorators fd
-          raw = Syntax.functionDefinitionRaw fd
-      in (Serialization.newlineSep (Maybes.cat [
-        Maybes.map encodeDecorators decs,
-        (Just (encodeFunctionDefRaw raw))]))
--- | Serialize a parenthesized group
-encodeGroup :: Syntax.Group -> Ast.Expr
-encodeGroup g =
-    case g of
-      Syntax.GroupExpression v0 -> encodeNamedExpression v0
-      Syntax.GroupYield _ -> Serialization.cst "(yield ...)"
--- | Serialize a guard clause
-encodeGuard :: Syntax.Guard -> Ast.Expr
-encodeGuard g =
-    Serialization.spaceSep [
-      Serialization.cst "if",
-      (encodeNamedExpression (Syntax.unGuard g))]
--- | Serialize an import from statement
-encodeImportFrom :: Syntax.ImportFrom -> Ast.Expr
-encodeImportFrom if_ =
-
-      let prefixes = Syntax.importFromPrefixes if_
-          name = Syntax.importFromDottedName if_
-          targets = Syntax.importFromTargets if_
-          lhs =
-                  Serialization.noSep (Maybes.cat (Lists.concat [
-                    Lists.map (\p -> Just (encodeRelativeImportPrefix p)) prefixes,
-                    [
-                      Maybes.map encodeDottedName name]]))
-      in (Serialization.spaceSep [
-        Serialization.cst "from",
-        lhs,
-        (Serialization.cst "import"),
-        (encodeImportFromTargets targets)])
--- | Serialize an import from as name
-encodeImportFromAsName :: Syntax.ImportFromAsName -> Ast.Expr
-encodeImportFromAsName ifan =
-
-      let name = Syntax.importFromAsNameName ifan
-          alias = Syntax.importFromAsNameAs ifan
-      in (Maybes.maybe (encodeName name) (\a -> Serialization.spaceSep [
-        encodeName name,
-        (Serialization.cst "as"),
-        (encodeName a)]) alias)
--- | Serialize import from targets
-encodeImportFromTargets :: Syntax.ImportFromTargets -> Ast.Expr
-encodeImportFromTargets t =
-    case t of
-      Syntax.ImportFromTargetsSimple v0 -> Serialization.commaSep Serialization.inlineStyle (Lists.map encodeImportFromAsName v0)
-      Syntax.ImportFromTargetsParens v0 -> Serialization.noSep [
-        Serialization.cst "(",
-        (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeImportFromAsName v0)),
-        (Serialization.cst ")")]
-      Syntax.ImportFromTargetsStar -> Serialization.cst "*"
--- | Serialize an import name
-encodeImportName :: Syntax.ImportName -> Ast.Expr
-encodeImportName in_ =
-    Serialization.spaceSep [
-      Serialization.cst "import",
-      (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeDottedAsName (Syntax.unImportName in_)))]
--- | Serialize an import statement
-encodeImportStatement :: Syntax.ImportStatement -> Ast.Expr
-encodeImportStatement is_ =
-    case is_ of
-      Syntax.ImportStatementName v0 -> encodeImportName v0
-      Syntax.ImportStatementFrom v0 -> encodeImportFrom v0
--- | Serialize an inversion (not expression)
-encodeInversion :: Syntax.Inversion -> Ast.Expr
-encodeInversion i =
-    case i of
-      Syntax.InversionNot v0 -> Serialization.spaceSep [
-        Serialization.cst "not",
-        (encodeInversion v0)]
-      Syntax.InversionSimple v0 -> encodeComparison v0
--- | Serialize a keyword pattern
-encodeKeywordPattern :: Syntax.KeywordPattern -> Ast.Expr
-encodeKeywordPattern kp =
-
-      let name = Syntax.keywordPatternName kp
-          pat = Syntax.keywordPatternPattern kp
-      in (Serialization.noSep [
-        encodeName name,
-        (Serialization.cst "="),
-        (encodePattern pat)])
--- | Serialize keyword patterns
-encodeKeywordPatterns :: Syntax.KeywordPatterns -> Ast.Expr
-encodeKeywordPatterns kp =
-    Serialization.commaSep Serialization.inlineStyle (Lists.map encodeKeywordPattern (Syntax.unKeywordPatterns kp))
--- | Serialize a key-value pair
-encodeKvpair :: Syntax.Kvpair -> Ast.Expr
-encodeKvpair kv =
-
-      let k = Syntax.kvpairKey kv
-          v = Syntax.kvpairValue kv
-      in (Serialization.spaceSep [
-        Serialization.noSep [
-          encodeExpression k,
-          (Serialization.cst ":")],
-        (encodeExpression v)])
--- | Serialize a keyword argument
-encodeKwarg :: Syntax.Kwarg -> Ast.Expr
-encodeKwarg k =
-
-      let name = Syntax.kwargName k
-          expr = Syntax.kwargValue k
-      in (Serialization.noSep [
-        encodeName name,
-        (Serialization.cst "="),
-        (encodeExpression expr)])
--- | Serialize a kwarg or double starred
-encodeKwargOrDoubleStarred :: Syntax.KwargOrDoubleStarred -> Ast.Expr
-encodeKwargOrDoubleStarred kds =
-    case kds of
-      Syntax.KwargOrDoubleStarredKwarg v0 -> encodeKwarg v0
-      Syntax.KwargOrDoubleStarredDoubleStarred v0 -> Serialization.noSep [
-        Serialization.cst "**",
-        (encodeExpression v0)]
--- | Serialize a kwarg or starred
-encodeKwargOrStarred :: Syntax.KwargOrStarred -> Ast.Expr
-encodeKwargOrStarred ks =
-    case ks of
-      Syntax.KwargOrStarredKwarg v0 -> encodeKwarg v0
-      Syntax.KwargOrStarredStarred v0 -> encodeStarredExpression v0
--- | Serialize a lambda expression
-encodeLambda :: Syntax.Lambda -> Ast.Expr
-encodeLambda l =
-
-      let params = Syntax.lambdaParams l
-          body = Syntax.lambdaBody l
-      in (Serialization.parens (Serialization.spaceSep [
-        Serialization.cst "lambda",
-        (Serialization.noSep [
-          encodeLambdaParameters params,
-          (Serialization.cst ":")]),
-        (encodeExpression body)]))
--- | Serialize a lambda parameter without default
-encodeLambdaParamNoDefault :: Syntax.LambdaParamNoDefault -> Ast.Expr
-encodeLambdaParamNoDefault p = encodeName (Syntax.unLambdaParamNoDefault p)
--- | Serialize lambda parameters
-encodeLambdaParameters :: Syntax.LambdaParameters -> Ast.Expr
-encodeLambdaParameters lp =
-
-      let nodef = Syntax.lambdaParametersParamNoDefault lp
-      in (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeLambdaParamNoDefault nodef))
--- | Serialize lambda star etc
-encodeLambdaStarEtc :: Syntax.LambdaStarEtc -> Ast.Expr
-encodeLambdaStarEtc lse =
-    case lse of
-      Syntax.LambdaStarEtcParamNoDefault v0 -> encodeLambdaParamNoDefault v0
-      Syntax.LambdaStarEtcStar _ -> Serialization.cst "*..."
-      Syntax.LambdaStarEtcParamMaybeDefault _ -> Serialization.cst "..."
-      Syntax.LambdaStarEtcKwds _ -> Serialization.cst "**..."
--- | Serialize a Python list
-encodeList :: Syntax.List -> Ast.Expr
-encodeList l = Serialization.bracketListAdaptive (Lists.map encodeStarNamedExpression (Syntax.unList l))
--- | Serialize a match statement
-encodeMatchStatement :: Syntax.MatchStatement -> Ast.Expr
-encodeMatchStatement ms =
-
-      let subj = Syntax.matchStatementSubject ms
-          cases = Syntax.matchStatementCases ms
-      in (Serialization.newlineSep [
-        Serialization.spaceSep [
-          Serialization.cst "match",
-          (Serialization.noSep [
-            encodeSubjectExpression subj,
-            (Serialization.cst ":")])],
-        (Serialization.tabIndentDoubleSpace (Lists.map encodeCaseBlock cases))])
--- | Serialize a Python module to an AST expression
-encodeModule :: Syntax.Module -> Ast.Expr
-encodeModule mod =
-
-      let warning = Serialization.cst (toPythonComments Constants.warningAutoGeneratedFile)
-          groups = Lists.map (\group -> Serialization.newlineSep (Lists.map encodeStatement group)) (Syntax.unModule mod)
-      in (Serialization.doubleNewlineSep (Lists.cons warning groups))
--- | Serialize a Python name/identifier
-encodeName :: Syntax.Name -> Ast.Expr
-encodeName n = Serialization.cst (Syntax.unName n)
--- | Serialize a name or attribute
-encodeNameOrAttribute :: Syntax.NameOrAttribute -> Ast.Expr
-encodeNameOrAttribute noa = Serialization.dotSep (Lists.map encodeName (Syntax.unNameOrAttribute noa))
--- | Serialize a named expression
-encodeNamedExpression :: Syntax.NamedExpression -> Ast.Expr
-encodeNamedExpression ne =
-    case ne of
-      Syntax.NamedExpressionSimple v0 -> encodeExpression v0
-      Syntax.NamedExpressionAssignment v0 -> encodeAssignmentExpression v0
--- | Serialize a Python number literal
-encodeNumber :: Syntax.Number -> Ast.Expr
-encodeNumber num =
-    case num of
-      Syntax.NumberFloat v0 -> Serialization.cst (pythonFloatLiteralText (Literals.showBigfloat v0))
-      Syntax.NumberInteger v0 -> Serialization.cst (Literals.showBigint v0)
--- | Serialize an or pattern
-encodeOrPattern :: Syntax.OrPattern -> Ast.Expr
-encodeOrPattern op =
-    Serialization.symbolSep "|" Serialization.inlineStyle (Lists.map encodeClosedPattern (Syntax.unOrPattern op))
--- | Serialize a parameter
-encodeParam :: Syntax.Param -> Ast.Expr
-encodeParam p =
-
-      let name = Syntax.paramName p
-          ann = Syntax.paramAnnotation p
-      in (Serialization.noSep (Maybes.cat [
-        Just (encodeName name),
-        (Maybes.map encodeAnnotation ann)]))
--- | Serialize a parameter without default
-encodeParamNoDefault :: Syntax.ParamNoDefault -> Ast.Expr
-encodeParamNoDefault pnd = encodeParam (Syntax.paramNoDefaultParam pnd)
--- | Serialize parameters without defaults
-encodeParamNoDefaultParameters :: Syntax.ParamNoDefaultParameters -> Ast.Expr
-encodeParamNoDefaultParameters pndp =
-
-      let nodef = Syntax.paramNoDefaultParametersParamNoDefault pndp
-      in (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeParamNoDefault nodef))
--- | Serialize function parameters
-encodeParameters :: Syntax.Parameters -> Ast.Expr
-encodeParameters p =
-    case p of
-      Syntax.ParametersParamNoDefault v0 -> encodeParamNoDefaultParameters v0
-      Syntax.ParametersSlashNoDefault _ -> Serialization.cst "..."
-      Syntax.ParametersSlashWithDefault _ -> Serialization.cst "..."
--- | Serialize a pattern
-encodePattern :: Syntax.Pattern -> Ast.Expr
-encodePattern p =
-    case p of
-      Syntax.PatternOr v0 -> encodeOrPattern v0
-      Syntax.PatternAs _ -> Serialization.cst "... as ..."
--- | Serialize a pattern capture target
-encodePatternCaptureTarget :: Syntax.PatternCaptureTarget -> Ast.Expr
-encodePatternCaptureTarget pct = encodeName (Syntax.unPatternCaptureTarget pct)
--- | Serialize patterns
-encodePatterns :: Syntax.Patterns -> Ast.Expr
-encodePatterns ps =
-    case ps of
-      Syntax.PatternsPattern v0 -> encodePattern v0
-      Syntax.PatternsSequence _ -> Serialization.cst "..."
--- | Serialize a positional argument
-encodePosArg :: Syntax.PosArg -> Ast.Expr
-encodePosArg pa =
-    case pa of
-      Syntax.PosArgStarred v0 -> encodeStarredExpression v0
-      Syntax.PosArgAssignment v0 -> encodeAssignmentExpression v0
-      Syntax.PosArgExpression v0 -> encodeExpression v0
--- | Serialize positional patterns
-encodePositionalPatterns :: Syntax.PositionalPatterns -> Ast.Expr
-encodePositionalPatterns pp =
-    Serialization.commaSep Serialization.inlineStyle (Lists.map encodePattern (Syntax.unPositionalPatterns pp))
--- | Serialize a power expression
-encodePower :: Syntax.Power -> Ast.Expr
-encodePower p =
-
-      let lhs = Syntax.powerLhs p
-          rhs = Syntax.powerRhs p
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (encodeAwaitPrimary lhs),
-        (Maybes.map (\r -> Serialization.spaceSep [
-          Serialization.cst "**",
-          (encodeFactor r)]) rhs)]))
--- | Serialize a primary expression
-encodePrimary :: Syntax.Primary -> Ast.Expr
-encodePrimary p =
-    case p of
-      Syntax.PrimarySimple v0 -> encodeAtom v0
-      Syntax.PrimaryCompound v0 -> encodePrimaryWithRhs v0
--- | Serialize a primary RHS
-encodePrimaryRhs :: Syntax.PrimaryRhs -> Ast.Expr
-encodePrimaryRhs rhs =
-    case rhs of
-      Syntax.PrimaryRhsCall v0 -> Serialization.noSep [
-        Serialization.cst "(",
-        (encodeArgs v0),
-        (Serialization.cst ")")]
-      Syntax.PrimaryRhsProject v0 -> Serialization.noSep [
-        Serialization.cst ".",
-        (encodeName v0)]
-      Syntax.PrimaryRhsSlices v0 -> Serialization.noSep [
-        Serialization.cst "[",
-        (encodeSlices v0),
-        (Serialization.cst "]")]
-      Syntax.PrimaryRhsGenexp _ -> Serialization.cst "[...]"
--- | Serialize a primary with RHS
-encodePrimaryWithRhs :: Syntax.PrimaryWithRhs -> Ast.Expr
-encodePrimaryWithRhs pwr =
-
-      let prim = Syntax.primaryWithRhsPrimary pwr
-          rhs = Syntax.primaryWithRhsRhs pwr
-      in (Serialization.noSep [
-        encodePrimary prim,
-        (encodePrimaryRhs rhs)])
--- | Serialize a raise expression
-encodeRaiseExpression :: Syntax.RaiseExpression -> Ast.Expr
-encodeRaiseExpression re =
-
-      let expr = Syntax.raiseExpressionExpression re
-          from_ = Syntax.raiseExpressionFrom re
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (encodeExpression expr),
-        (Maybes.map (\f -> Serialization.spaceSep [
-          Serialization.cst "from",
-          (encodeExpression f)]) from_)]))
--- | Serialize a raise statement
-encodeRaiseStatement :: Syntax.RaiseStatement -> Ast.Expr
-encodeRaiseStatement rs =
-    Serialization.spaceSep (Maybes.cat [
-      Just (Serialization.cst "raise"),
-      (Maybes.map encodeRaiseExpression (Syntax.unRaiseStatement rs))])
--- | Serialize a relative import prefix
-encodeRelativeImportPrefix :: Syntax.RelativeImportPrefix -> Ast.Expr
-encodeRelativeImportPrefix p =
-    case p of
-      Syntax.RelativeImportPrefixDot -> Serialization.cst "."
-      Syntax.RelativeImportPrefixEllipsis -> Serialization.cst "..."
--- | Serialize a return statement
-encodeReturnStatement :: Syntax.ReturnStatement -> Ast.Expr
-encodeReturnStatement rs =
-    Serialization.spaceSep [
-      Serialization.cst "return",
-      (Serialization.commaSep Serialization.inlineStyle (Lists.map encodeStarExpression (Syntax.unReturnStatement rs)))]
--- | Serialize a Python set
-encodeSet :: Syntax.Set -> Ast.Expr
-encodeSet s = Serialization.bracesListAdaptive (Lists.map encodeStarNamedExpression (Syntax.unSet s))
--- | Serialize a shift expression
-encodeShiftExpression :: Syntax.ShiftExpression -> Ast.Expr
-encodeShiftExpression se = encodeSum (Syntax.shiftExpressionRhs se)
--- | Serialize a simple (single-line) Python statement
-encodeSimpleStatement :: Syntax.SimpleStatement -> Ast.Expr
-encodeSimpleStatement ss =
-    case ss of
-      Syntax.SimpleStatementAssignment v0 -> encodeAssignment v0
-      Syntax.SimpleStatementStarExpressions v0 -> Serialization.newlineSep (Lists.map encodeStarExpression v0)
-      Syntax.SimpleStatementReturn v0 -> encodeReturnStatement v0
-      Syntax.SimpleStatementRaise v0 -> encodeRaiseStatement v0
-      Syntax.SimpleStatementPass -> Serialization.cst "pass"
-      Syntax.SimpleStatementBreak -> Serialization.cst "break"
-      Syntax.SimpleStatementContinue -> Serialization.cst "continue"
-      Syntax.SimpleStatementImport v0 -> encodeImportStatement v0
-      Syntax.SimpleStatementTypeAlias v0 -> encodeTypeAlias v0
-      Syntax.SimpleStatementAssert _ -> Serialization.cst "assert ..."
-      Syntax.SimpleStatementGlobal _ -> Serialization.cst "global ..."
-      Syntax.SimpleStatementNonlocal _ -> Serialization.cst "nonlocal ..."
-      Syntax.SimpleStatementDel _ -> Serialization.cst "del ..."
--- | Serialize a simple type parameter
-encodeSimpleTypeParameter :: Syntax.SimpleTypeParameter -> Ast.Expr
-encodeSimpleTypeParameter stp = encodeName (Syntax.simpleTypeParameterName stp)
--- | Serialize a single target
-encodeSingleTarget :: Syntax.SingleTarget -> Ast.Expr
-encodeSingleTarget st =
-    case st of
-      Syntax.SingleTargetName v0 -> encodeName v0
-      Syntax.SingleTargetParens _ -> Serialization.cst "(...)"
-      Syntax.SingleTargetSubscriptAttributeTarget _ -> Serialization.cst "..."
--- | Serialize a slice
-encodeSlice :: Syntax.Slice -> Ast.Expr
-encodeSlice s =
-    case s of
-      Syntax.SliceNamed v0 -> encodeNamedExpression v0
-      Syntax.SliceSlice_ _ -> Serialization.cst ":"
--- | Serialize a slice or starred expression
-encodeSliceOrStarredExpression :: Syntax.SliceOrStarredExpression -> Ast.Expr
-encodeSliceOrStarredExpression s =
-    case s of
-      Syntax.SliceOrStarredExpressionSlice v0 -> encodeSlice v0
-      Syntax.SliceOrStarredExpressionStarred v0 -> encodeStarredExpression v0
--- | Serialize slices
-encodeSlices :: Syntax.Slices -> Ast.Expr
-encodeSlices s =
-
-      let hd = Syntax.slicesHead s
-          tl = Syntax.slicesTail s
-      in (Serialization.commaSep Serialization.inlineStyle (Lists.cons (encodeSlice hd) (Lists.map encodeSliceOrStarredExpression tl)))
--- | Serialize a star atom
-encodeStarAtom :: Syntax.StarAtom -> Ast.Expr
-encodeStarAtom sa =
-    case sa of
-      Syntax.StarAtomName v0 -> encodeName v0
-      Syntax.StarAtomTargetWithStarAtom _ -> Serialization.cst "(...)"
-      Syntax.StarAtomStarTargetsTupleSeq _ -> Serialization.cst "(...)"
-      Syntax.StarAtomStarTargetsListSeq _ -> Serialization.cst "[...]"
--- | Serialize a star expression
-encodeStarExpression :: Syntax.StarExpression -> Ast.Expr
-encodeStarExpression se =
-    case se of
-      Syntax.StarExpressionStar v0 -> Serialization.noSep [
-        Serialization.cst "*",
-        (encodeBitwiseOr v0)]
-      Syntax.StarExpressionSimple v0 -> encodeExpression v0
--- | Serialize a star named expression
-encodeStarNamedExpression :: Syntax.StarNamedExpression -> Ast.Expr
-encodeStarNamedExpression sne =
-    case sne of
-      Syntax.StarNamedExpressionStar v0 -> Serialization.noSep [
-        Serialization.cst "*",
-        (encodeBitwiseOr v0)]
-      Syntax.StarNamedExpressionSimple v0 -> encodeNamedExpression v0
--- | Serialize a star target
-encodeStarTarget :: Syntax.StarTarget -> Ast.Expr
-encodeStarTarget st =
-    case st of
-      Syntax.StarTargetUnstarred v0 -> encodeTargetWithStarAtom v0
-      Syntax.StarTargetStarred v0 -> Serialization.noSep [
-        Serialization.cst "*",
-        (encodeStarTarget v0)]
--- | Serialize a starred expression
-encodeStarredExpression :: Syntax.StarredExpression -> Ast.Expr
-encodeStarredExpression se =
-    Serialization.noSep [
-      Serialization.cst "*",
-      (encodeExpression (Syntax.unStarredExpression se))]
--- | Serialize a Python statement
-encodeStatement :: Syntax.Statement -> Ast.Expr
-encodeStatement stmt =
-    case stmt of
-      Syntax.StatementAnnotated v0 -> encodeAnnotatedStatement v0
-      Syntax.StatementSimple v0 -> Serialization.newlineSep (Lists.map encodeSimpleStatement v0)
-      Syntax.StatementCompound v0 -> encodeCompoundStatement v0
--- | Serialize a Python string literal
-encodeString :: Syntax.String_ -> Ast.Expr
-encodeString s =
-
-      let content = Syntax.stringValue s
-          style = Syntax.stringQuoteStyle s
-      in case style of
-        Syntax.QuoteStyleSingle -> Serialization.cst (escapePythonString False content)
-        Syntax.QuoteStyleDouble -> Serialization.cst (escapePythonString True content)
-        Syntax.QuoteStyleTriple -> Serialization.noSep [
-          Serialization.cst "r\"\"\"",
-          (Serialization.cst content),
-          (Serialization.cst "\"\"\"")]
--- | Serialize a subject expression
-encodeSubjectExpression :: Syntax.SubjectExpression -> Ast.Expr
-encodeSubjectExpression se =
-    case se of
-      Syntax.SubjectExpressionSimple v0 -> encodeNamedExpression v0
-      Syntax.SubjectExpressionTuple _ -> Serialization.cst "*..."
--- | Serialize a sum expression
-encodeSum :: Syntax.Sum -> Ast.Expr
-encodeSum s = encodeTerm (Syntax.sumRhs s)
--- | Serialize a target-side primary expression
-encodeTPrimary :: Syntax.TPrimary -> Ast.Expr
-encodeTPrimary tp =
-    case tp of
-      Syntax.TPrimaryAtom v0 -> encodeAtom v0
-      Syntax.TPrimaryPrimaryAndName v0 -> encodeTPrimaryAndName v0
-      Syntax.TPrimaryPrimaryAndSlices _ -> Serialization.cst "..."
-      Syntax.TPrimaryPrimaryAndGenexp _ -> Serialization.cst "..."
-      Syntax.TPrimaryPrimaryAndArguments _ -> Serialization.cst "..."
--- | Serialize a TPrimaryAndName as primary.name
-encodeTPrimaryAndName :: Syntax.TPrimaryAndName -> Ast.Expr
-encodeTPrimaryAndName pn =
-
-      let prim = Syntax.tPrimaryAndNamePrimary pn
-          name_ = Syntax.tPrimaryAndNameName pn
-      in (Serialization.noSep [
-        encodeTPrimary prim,
-        (Serialization.cst "."),
-        (encodeName name_)])
--- | Serialize a target with star atom
-encodeTargetWithStarAtom :: Syntax.TargetWithStarAtom -> Ast.Expr
-encodeTargetWithStarAtom t =
-    case t of
-      Syntax.TargetWithStarAtomAtom v0 -> encodeStarAtom v0
-      Syntax.TargetWithStarAtomProject v0 -> encodeTPrimaryAndName v0
-      Syntax.TargetWithStarAtomSlices _ -> Serialization.cst "..."
--- | Serialize a term expression
-encodeTerm :: Syntax.Term -> Ast.Expr
-encodeTerm t = encodeFactor (Syntax.termRhs t)
--- | Serialize a Python tuple
-encodeTuple :: Syntax.Tuple -> Ast.Expr
-encodeTuple t =
-
-      let es = Syntax.unTuple t
-      in (Maybes.fromMaybe (Serialization.parenList False (Lists.map encodeStarNamedExpression es)) (Maybes.map (\firstEs -> Logic.ifElse (Equality.equal (Lists.length es) 1) (Serialization.parens (Serialization.noSep [
-        encodeStarNamedExpression firstEs,
-        (Serialization.cst ",")])) (Serialization.parenList False (Lists.map encodeStarNamedExpression es))) (Lists.maybeHead es)))
--- | Serialize a type alias
-encodeTypeAlias :: Syntax.TypeAlias -> Ast.Expr
-encodeTypeAlias ta =
-
-      let name = Syntax.typeAliasName ta
-          tparams = Syntax.typeAliasTypeParams ta
-          expr = Syntax.typeAliasExpression ta
-          alias =
-                  Serialization.noSep (Maybes.cat [
-                    Just (encodeName name),
-                    (Logic.ifElse (Lists.null tparams) Nothing (Just (Serialization.bracketList Serialization.inlineStyle (Lists.map encodeTypeParameter tparams))))])
-      in (Serialization.spaceSep [
-        Serialization.cst "type",
-        alias,
-        (Serialization.cst "="),
-        (encodeExpression expr)])
--- | Serialize a type parameter
-encodeTypeParameter :: Syntax.TypeParameter -> Ast.Expr
-encodeTypeParameter tp =
-    case tp of
-      Syntax.TypeParameterSimple v0 -> encodeSimpleTypeParameter v0
-      Syntax.TypeParameterStar _ -> Serialization.cst "*..."
-      Syntax.TypeParameterDoubleStar _ -> Serialization.cst "**..."
--- | Serialize a typed assignment
-encodeTypedAssignment :: Syntax.TypedAssignment -> Ast.Expr
-encodeTypedAssignment ta =
-
-      let lhs = Syntax.typedAssignmentLhs ta
-          typ = Syntax.typedAssignmentType ta
-          rhs = Syntax.typedAssignmentRhs ta
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.noSep [
-          encodeSingleTarget lhs,
-          (Serialization.cst ":")]),
-        (Just (encodeExpression typ)),
-        (Maybes.map encodeAnnotatedRhs rhs)]))
--- | Serialize an untyped assignment
-encodeUntypedAssignment :: Syntax.UntypedAssignment -> Ast.Expr
-encodeUntypedAssignment ua =
-
-      let targets = Syntax.untypedAssignmentTargets ua
-          rhs = Syntax.untypedAssignmentRhs ua
-      in (Serialization.spaceSep (Lists.concat [
-        Lists.map encodeStarTarget targets,
-        [
-          encodeAnnotatedRhs rhs]]))
--- | Serialize a value pattern
-encodeValuePattern :: Syntax.ValuePattern -> Ast.Expr
-encodeValuePattern vp = encodeAttribute (Syntax.unValuePattern vp)
--- | Serialize a while statement
-encodeWhileStatement :: Syntax.WhileStatement -> Ast.Expr
-encodeWhileStatement ws =
-
-      let cond = Syntax.whileStatementCondition ws
-          body = Syntax.whileStatementBody ws
-          else_ = Syntax.whileStatementElse ws
-      in (Serialization.newlineSep (Maybes.cat [
-        Just (Serialization.newlineSep [
-          Serialization.spaceSep [
-            Serialization.cst "while",
-            (Serialization.noSep [
-              encodeNamedExpression cond,
-              (Serialization.cst ":")])],
-          (encodeBlock body)]),
-        (Maybes.map (\eb -> Serialization.newlineSep [
-          Serialization.cst "else:",
-          (encodeBlock eb)]) else_)]))
--- | Escape special characters in a Python string and wrap in quotes
-escapePythonString :: Bool -> String -> String
-escapePythonString doubleQuoted s =
-
-      let replace = \old -> \new -> \str -> Strings.intercalate new (Strings.splitOn old str)
-          s1 = replace "\\" "\\\\" s
-          s2 = replace "\NUL" "\\x00" s1
-          s3 = replace "\n" "\\n" s2
-          s4 = replace "\t" "\\t" s3
-          s5 = replace "\r" "\\r" s4
-          escaped = Logic.ifElse doubleQuoted (replace "\"" "\\\"" s5) (replace "'" "\\'" s5)
-          quote = Logic.ifElse doubleQuoted "\"" "'"
-      in (Strings.cat2 quote (Strings.cat2 escaped quote))
-pythonFloatLiteralText :: String -> String
-pythonFloatLiteralText s =
-    Logic.ifElse (Equality.equal s "NaN") "float('nan')" (Logic.ifElse (Equality.equal s "Infinity") "float('inf')" (Logic.ifElse (Equality.equal s "-Infinity") "float('-inf')" s))
--- | Convert a doc string to Python comment format. Empty source lines emit `#` (no trailing space) so blank comment lines don't carry trailing whitespace into the generated file.
-toPythonComments :: String -> String
-toPythonComments doc_ =
-    Logic.ifElse (Equality.equal doc_ "") "" (Strings.intercalate "\n" (Lists.map (\line -> Logic.ifElse (Equality.equal line "") "#" (Strings.cat2 "# " line)) (Strings.lines doc_)))
diff --git a/src/main/haskell/Hydra/Python/Syntax.hs b/src/main/haskell/Hydra/Python/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Syntax.hs
+++ /dev/null
@@ -1,1652 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A Python syntax model, based on the Python v3 PEG grammar retrieved on 2024-12-22 from https://docs.python.org/3/reference/grammar.html
-
-module Hydra.Python.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
-data AnnotatedStatement =
-  AnnotatedStatement {
-    annotatedStatementComment :: String,
-    annotatedStatementStatement :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_AnnotatedStatement = Core.Name "hydra.python.syntax.AnnotatedStatement"
-_AnnotatedStatement_comment = Core.Name "comment"
-_AnnotatedStatement_statement = Core.Name "statement"
-newtype Module =
-  Module {
-    unModule :: [[Statement]]}
-  deriving (Eq, Ord, Read, Show)
-_Module = Core.Name "hydra.python.syntax.Module"
-data QuoteStyle =
-  QuoteStyleSingle |
-  QuoteStyleDouble |
-  QuoteStyleTriple
-  deriving (Eq, Ord, Read, Show)
-_QuoteStyle = Core.Name "hydra.python.syntax.QuoteStyle"
-_QuoteStyle_single = Core.Name "single"
-_QuoteStyle_double = Core.Name "double"
-_QuoteStyle_triple = Core.Name "triple"
-newtype Name =
-  Name {
-    unName :: String}
-  deriving (Eq, Ord, Read, Show)
-_Name = Core.Name "hydra.python.syntax.Name"
-data Number =
-  NumberInteger Integer |
-  NumberFloat Double
-  deriving (Eq, Ord, Read, Show)
-_Number = Core.Name "hydra.python.syntax.Number"
-_Number_integer = Core.Name "integer"
-_Number_float = Core.Name "float"
-data String_ =
-  String_ {
-    stringValue :: String,
-    stringQuoteStyle :: QuoteStyle}
-  deriving (Eq, Ord, Read, Show)
-_String = Core.Name "hydra.python.syntax.String"
-_String_value = Core.Name "value"
-_String_quoteStyle = Core.Name "quoteStyle"
-newtype TypeComment =
-  TypeComment {
-    unTypeComment :: String}
-  deriving (Eq, Ord, Read, Show)
-_TypeComment = Core.Name "hydra.python.syntax.TypeComment"
-newtype File =
-  File {
-    unFile :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-_File = Core.Name "hydra.python.syntax.File"
-newtype Interactive =
-  Interactive {
-    unInteractive :: Statement}
-  deriving (Eq, Ord, Read, Show)
-_Interactive = Core.Name "hydra.python.syntax.Interactive"
-newtype Eval =
-  Eval {
-    unEval :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-_Eval = Core.Name "hydra.python.syntax.Eval"
-data FuncType =
-  FuncType {
-    funcTypeType :: [TypeExpression],
-    funcTypeBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_FuncType = Core.Name "hydra.python.syntax.FuncType"
-_FuncType_type = Core.Name "type"
-_FuncType_body = Core.Name "body"
-data Statement =
-  StatementCompound CompoundStatement |
-  StatementSimple [SimpleStatement] |
-  StatementAnnotated AnnotatedStatement
-  deriving (Eq, Ord, Read, Show)
-_Statement = Core.Name "hydra.python.syntax.Statement"
-_Statement_compound = Core.Name "compound"
-_Statement_simple = Core.Name "simple"
-_Statement_annotated = Core.Name "annotated"
-data SimpleStatement =
-  SimpleStatementAssignment Assignment |
-  SimpleStatementTypeAlias TypeAlias |
-  SimpleStatementStarExpressions [StarExpression] |
-  SimpleStatementReturn ReturnStatement |
-  SimpleStatementImport ImportStatement |
-  SimpleStatementRaise RaiseStatement |
-  SimpleStatementPass |
-  SimpleStatementDel DelStatement |
-  SimpleStatementYield YieldStatement |
-  SimpleStatementAssert AssertStatement |
-  SimpleStatementBreak |
-  SimpleStatementContinue |
-  SimpleStatementGlobal [Name] |
-  SimpleStatementNonlocal [Name]
-  deriving (Eq, Ord, Read, Show)
-_SimpleStatement = Core.Name "hydra.python.syntax.SimpleStatement"
-_SimpleStatement_assignment = Core.Name "assignment"
-_SimpleStatement_typeAlias = Core.Name "typeAlias"
-_SimpleStatement_starExpressions = Core.Name "starExpressions"
-_SimpleStatement_return = Core.Name "return"
-_SimpleStatement_import = Core.Name "import"
-_SimpleStatement_raise = Core.Name "raise"
-_SimpleStatement_pass = Core.Name "pass"
-_SimpleStatement_del = Core.Name "del"
-_SimpleStatement_yield = Core.Name "yield"
-_SimpleStatement_assert = Core.Name "assert"
-_SimpleStatement_break = Core.Name "break"
-_SimpleStatement_continue = Core.Name "continue"
-_SimpleStatement_global = Core.Name "global"
-_SimpleStatement_nonlocal = Core.Name "nonlocal"
-data CompoundStatement =
-  CompoundStatementFunction FunctionDefinition |
-  CompoundStatementIf IfStatement |
-  CompoundStatementClassDef ClassDefinition |
-  CompoundStatementWith WithStatement |
-  CompoundStatementFor ForStatement |
-  CompoundStatementTry TryStatement |
-  CompoundStatementWhile WhileStatement |
-  CompoundStatementMatch MatchStatement
-  deriving (Eq, Ord, Read, Show)
-_CompoundStatement = Core.Name "hydra.python.syntax.CompoundStatement"
-_CompoundStatement_function = Core.Name "function"
-_CompoundStatement_if = Core.Name "if"
-_CompoundStatement_classDef = Core.Name "classDef"
-_CompoundStatement_with = Core.Name "with"
-_CompoundStatement_for = Core.Name "for"
-_CompoundStatement_try = Core.Name "try"
-_CompoundStatement_while = Core.Name "while"
-_CompoundStatement_match = Core.Name "match"
-data Assignment =
-  AssignmentTyped TypedAssignment |
-  AssignmentUntyped UntypedAssignment |
-  AssignmentAug AugAssignment
-  deriving (Eq, Ord, Read, Show)
-_Assignment = Core.Name "hydra.python.syntax.Assignment"
-_Assignment_typed = Core.Name "typed"
-_Assignment_untyped = Core.Name "untyped"
-_Assignment_aug = Core.Name "aug"
-data TypedAssignment =
-  TypedAssignment {
-    typedAssignmentLhs :: SingleTarget,
-    typedAssignmentType :: Expression,
-    typedAssignmentRhs :: (Maybe AnnotatedRhs)}
-  deriving (Eq, Ord, Read, Show)
-_TypedAssignment = Core.Name "hydra.python.syntax.TypedAssignment"
-_TypedAssignment_lhs = Core.Name "lhs"
-_TypedAssignment_type = Core.Name "type"
-_TypedAssignment_rhs = Core.Name "rhs"
-data UntypedAssignment =
-  UntypedAssignment {
-    untypedAssignmentTargets :: [StarTarget],
-    untypedAssignmentRhs :: AnnotatedRhs,
-    untypedAssignmentTypeComment :: (Maybe TypeComment)}
-  deriving (Eq, Ord, Read, Show)
-_UntypedAssignment = Core.Name "hydra.python.syntax.UntypedAssignment"
-_UntypedAssignment_targets = Core.Name "targets"
-_UntypedAssignment_rhs = Core.Name "rhs"
-_UntypedAssignment_typeComment = Core.Name "typeComment"
-data AugAssignment =
-  AugAssignment {
-    augAssignmentLhs :: SingleTarget,
-    augAssignmentAugassign :: AugAssign,
-    augAssignmentRhs :: AnnotatedRhs}
-  deriving (Eq, Ord, Read, Show)
-_AugAssignment = Core.Name "hydra.python.syntax.AugAssignment"
-_AugAssignment_lhs = Core.Name "lhs"
-_AugAssignment_augassign = Core.Name "augassign"
-_AugAssignment_rhs = Core.Name "rhs"
-data AnnotatedRhs =
-  AnnotatedRhsYield YieldExpression |
-  AnnotatedRhsStar [StarExpression]
-  deriving (Eq, Ord, Read, Show)
-_AnnotatedRhs = Core.Name "hydra.python.syntax.AnnotatedRhs"
-_AnnotatedRhs_yield = Core.Name "yield"
-_AnnotatedRhs_star = Core.Name "star"
-data AugAssign =
-  AugAssignPlusEqual |
-  AugAssignMinusEqual |
-  AugAssignTimesEqual |
-  AugAssignAtEqual |
-  AugAssignSlashEqual |
-  AugAssignPercentEqual |
-  AugAssignAmpersandEqual |
-  AugAssignBarEqual |
-  AugAssignCaretEqual |
-  AugAssignLeftShiftEqual |
-  AugAssignRightShiftEqual |
-  AugAssignStarStarEqual |
-  AugAssignDoubleSlashEqual
-  deriving (Eq, Ord, Read, Show)
-_AugAssign = Core.Name "hydra.python.syntax.AugAssign"
-_AugAssign_plusEqual = Core.Name "plusEqual"
-_AugAssign_minusEqual = Core.Name "minusEqual"
-_AugAssign_timesEqual = Core.Name "timesEqual"
-_AugAssign_atEqual = Core.Name "atEqual"
-_AugAssign_slashEqual = Core.Name "slashEqual"
-_AugAssign_percentEqual = Core.Name "percentEqual"
-_AugAssign_ampersandEqual = Core.Name "ampersandEqual"
-_AugAssign_barEqual = Core.Name "barEqual"
-_AugAssign_caretEqual = Core.Name "caretEqual"
-_AugAssign_leftShiftEqual = Core.Name "leftShiftEqual"
-_AugAssign_rightShiftEqual = Core.Name "rightShiftEqual"
-_AugAssign_starStarEqual = Core.Name "starStarEqual"
-_AugAssign_doubleSlashEqual = Core.Name "doubleSlashEqual"
-newtype ReturnStatement =
-  ReturnStatement {
-    unReturnStatement :: [StarExpression]}
-  deriving (Eq, Ord, Read, Show)
-_ReturnStatement = Core.Name "hydra.python.syntax.ReturnStatement"
-newtype RaiseStatement =
-  RaiseStatement {
-    unRaiseStatement :: (Maybe RaiseExpression)}
-  deriving (Eq, Ord, Read, Show)
-_RaiseStatement = Core.Name "hydra.python.syntax.RaiseStatement"
-data RaiseExpression =
-  RaiseExpression {
-    raiseExpressionExpression :: Expression,
-    raiseExpressionFrom :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_RaiseExpression = Core.Name "hydra.python.syntax.RaiseExpression"
-_RaiseExpression_expression = Core.Name "expression"
-_RaiseExpression_from = Core.Name "from"
-newtype DelStatement =
-  DelStatement {
-    unDelStatement :: DelTargets}
-  deriving (Eq, Ord, Read, Show)
-_DelStatement = Core.Name "hydra.python.syntax.DelStatement"
-newtype YieldStatement =
-  YieldStatement {
-    unYieldStatement :: YieldExpression}
-  deriving (Eq, Ord, Read, Show)
-_YieldStatement = Core.Name "hydra.python.syntax.YieldStatement"
-data AssertStatement =
-  AssertStatement {
-    assertStatementExpression1 :: Expression,
-    assertStatementExpression2 :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_AssertStatement = Core.Name "hydra.python.syntax.AssertStatement"
-_AssertStatement_expression1 = Core.Name "expression1"
-_AssertStatement_expression2 = Core.Name "expression2"
-data ImportStatement =
-  ImportStatementName ImportName |
-  ImportStatementFrom ImportFrom
-  deriving (Eq, Ord, Read, Show)
-_ImportStatement = Core.Name "hydra.python.syntax.ImportStatement"
-_ImportStatement_name = Core.Name "name"
-_ImportStatement_from = Core.Name "from"
-newtype ImportName =
-  ImportName {
-    unImportName :: [DottedAsName]}
-  deriving (Eq, Ord, Read, Show)
-_ImportName = Core.Name "hydra.python.syntax.ImportName"
-data ImportFrom =
-  ImportFrom {
-    importFromPrefixes :: [RelativeImportPrefix],
-    importFromDottedName :: (Maybe DottedName),
-    importFromTargets :: ImportFromTargets}
-  deriving (Eq, Ord, Read, Show)
-_ImportFrom = Core.Name "hydra.python.syntax.ImportFrom"
-_ImportFrom_prefixes = Core.Name "prefixes"
-_ImportFrom_dottedName = Core.Name "dottedName"
-_ImportFrom_targets = Core.Name "targets"
-data RelativeImportPrefix =
-  RelativeImportPrefixDot |
-  RelativeImportPrefixEllipsis
-  deriving (Eq, Ord, Read, Show)
-_RelativeImportPrefix = Core.Name "hydra.python.syntax.RelativeImportPrefix"
-_RelativeImportPrefix_dot = Core.Name "dot"
-_RelativeImportPrefix_ellipsis = Core.Name "ellipsis"
-data ImportFromTargets =
-  ImportFromTargetsSimple [ImportFromAsName] |
-  ImportFromTargetsParens [ImportFromAsName] |
-  ImportFromTargetsStar
-  deriving (Eq, Ord, Read, Show)
-_ImportFromTargets = Core.Name "hydra.python.syntax.ImportFromTargets"
-_ImportFromTargets_simple = Core.Name "simple"
-_ImportFromTargets_parens = Core.Name "parens"
-_ImportFromTargets_star = Core.Name "star"
-data ImportFromAsName =
-  ImportFromAsName {
-    importFromAsNameName :: Name,
-    importFromAsNameAs :: (Maybe Name)}
-  deriving (Eq, Ord, Read, Show)
-_ImportFromAsName = Core.Name "hydra.python.syntax.ImportFromAsName"
-_ImportFromAsName_name = Core.Name "name"
-_ImportFromAsName_as = Core.Name "as"
-data DottedAsName =
-  DottedAsName {
-    dottedAsNameName :: DottedName,
-    dottedAsNameAs :: (Maybe Name)}
-  deriving (Eq, Ord, Read, Show)
-_DottedAsName = Core.Name "hydra.python.syntax.DottedAsName"
-_DottedAsName_name = Core.Name "name"
-_DottedAsName_as = Core.Name "as"
-newtype DottedName =
-  DottedName {
-    unDottedName :: [Name]}
-  deriving (Eq, Ord, Read, Show)
-_DottedName = Core.Name "hydra.python.syntax.DottedName"
-data Block =
-  BlockIndented [[Statement]] |
-  BlockSimple [SimpleStatement]
-  deriving (Eq, Ord, Read, Show)
-_Block = Core.Name "hydra.python.syntax.Block"
-_Block_indented = Core.Name "indented"
-_Block_simple = Core.Name "simple"
-newtype Decorators =
-  Decorators {
-    unDecorators :: [NamedExpression]}
-  deriving (Eq, Ord, Read, Show)
-_Decorators = Core.Name "hydra.python.syntax.Decorators"
-data ClassDefinition =
-  ClassDefinition {
-    classDefinitionDecorators :: (Maybe Decorators),
-    classDefinitionName :: Name,
-    classDefinitionTypeParams :: [TypeParameter],
-    classDefinitionArguments :: (Maybe Args),
-    classDefinitionBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-_ClassDefinition = Core.Name "hydra.python.syntax.ClassDefinition"
-_ClassDefinition_decorators = Core.Name "decorators"
-_ClassDefinition_name = Core.Name "name"
-_ClassDefinition_typeParams = Core.Name "typeParams"
-_ClassDefinition_arguments = Core.Name "arguments"
-_ClassDefinition_body = Core.Name "body"
-data FunctionDefinition =
-  FunctionDefinition {
-    functionDefinitionDecorators :: (Maybe Decorators),
-    functionDefinitionRaw :: FunctionDefRaw}
-  deriving (Eq, Ord, Read, Show)
-_FunctionDefinition = Core.Name "hydra.python.syntax.FunctionDefinition"
-_FunctionDefinition_decorators = Core.Name "decorators"
-_FunctionDefinition_raw = Core.Name "raw"
-data FunctionDefRaw =
-  FunctionDefRaw {
-    functionDefRawAsync :: Bool,
-    functionDefRawName :: Name,
-    functionDefRawTypeParams :: [TypeParameter],
-    functionDefRawParams :: (Maybe Parameters),
-    functionDefRawReturnType :: (Maybe Expression),
-    functionDefRawFuncTypeComment :: (Maybe FuncTypeComment),
-    functionDefRawBlock :: Block}
-  deriving (Eq, Ord, Read, Show)
-_FunctionDefRaw = Core.Name "hydra.python.syntax.FunctionDefRaw"
-_FunctionDefRaw_async = Core.Name "async"
-_FunctionDefRaw_name = Core.Name "name"
-_FunctionDefRaw_typeParams = Core.Name "typeParams"
-_FunctionDefRaw_params = Core.Name "params"
-_FunctionDefRaw_returnType = Core.Name "returnType"
-_FunctionDefRaw_funcTypeComment = Core.Name "funcTypeComment"
-_FunctionDefRaw_block = Core.Name "block"
-data Parameters =
-  ParametersSlashNoDefault SlashNoDefaultParameters |
-  ParametersSlashWithDefault SlashWithDefaultParameters |
-  ParametersParamNoDefault ParamNoDefaultParameters |
-  ParametersParamWithDefault ParamWithDefaultParameters |
-  ParametersStarEtc StarEtc
-  deriving (Eq, Ord, Read, Show)
-_Parameters = Core.Name "hydra.python.syntax.Parameters"
-_Parameters_slashNoDefault = Core.Name "slashNoDefault"
-_Parameters_slashWithDefault = Core.Name "slashWithDefault"
-_Parameters_paramNoDefault = Core.Name "paramNoDefault"
-_Parameters_paramWithDefault = Core.Name "paramWithDefault"
-_Parameters_starEtc = Core.Name "starEtc"
-data SlashNoDefaultParameters =
-  SlashNoDefaultParameters {
-    slashNoDefaultParametersSlash :: SlashNoDefault,
-    slashNoDefaultParametersParamNoDefault :: [ParamNoDefault],
-    slashNoDefaultParametersParamWithDefault :: [ParamWithDefault],
-    slashNoDefaultParametersStarEtc :: (Maybe StarEtc)}
-  deriving (Eq, Ord, Read, Show)
-_SlashNoDefaultParameters = Core.Name "hydra.python.syntax.SlashNoDefaultParameters"
-_SlashNoDefaultParameters_slash = Core.Name "slash"
-_SlashNoDefaultParameters_paramNoDefault = Core.Name "paramNoDefault"
-_SlashNoDefaultParameters_paramWithDefault = Core.Name "paramWithDefault"
-_SlashNoDefaultParameters_starEtc = Core.Name "starEtc"
-data SlashWithDefaultParameters =
-  SlashWithDefaultParameters {
-    slashWithDefaultParametersParamNoDefault :: [ParamNoDefault],
-    slashWithDefaultParametersParamWithDefault :: [ParamWithDefault],
-    slashWithDefaultParametersStarEtc :: (Maybe StarEtc)}
-  deriving (Eq, Ord, Read, Show)
-_SlashWithDefaultParameters = Core.Name "hydra.python.syntax.SlashWithDefaultParameters"
-_SlashWithDefaultParameters_paramNoDefault = Core.Name "paramNoDefault"
-_SlashWithDefaultParameters_paramWithDefault = Core.Name "paramWithDefault"
-_SlashWithDefaultParameters_starEtc = Core.Name "starEtc"
-data ParamNoDefaultParameters =
-  ParamNoDefaultParameters {
-    paramNoDefaultParametersParamNoDefault :: [ParamNoDefault],
-    paramNoDefaultParametersParamWithDefault :: [ParamWithDefault],
-    paramNoDefaultParametersStarEtc :: (Maybe StarEtc)}
-  deriving (Eq, Ord, Read, Show)
-_ParamNoDefaultParameters = Core.Name "hydra.python.syntax.ParamNoDefaultParameters"
-_ParamNoDefaultParameters_paramNoDefault = Core.Name "paramNoDefault"
-_ParamNoDefaultParameters_paramWithDefault = Core.Name "paramWithDefault"
-_ParamNoDefaultParameters_starEtc = Core.Name "starEtc"
-data ParamWithDefaultParameters =
-  ParamWithDefaultParameters {
-    paramWithDefaultParametersParamWithDefault :: [ParamWithDefault],
-    paramWithDefaultParametersStarEtc :: (Maybe StarEtc)}
-  deriving (Eq, Ord, Read, Show)
-_ParamWithDefaultParameters = Core.Name "hydra.python.syntax.ParamWithDefaultParameters"
-_ParamWithDefaultParameters_paramWithDefault = Core.Name "paramWithDefault"
-_ParamWithDefaultParameters_starEtc = Core.Name "starEtc"
-newtype SlashNoDefault =
-  SlashNoDefault {
-    unSlashNoDefault :: [ParamNoDefault]}
-  deriving (Eq, Ord, Read, Show)
-_SlashNoDefault = Core.Name "hydra.python.syntax.SlashNoDefault"
-data SlashWithDefault =
-  SlashWithDefault {
-    slashWithDefaultParamNoDefault :: [ParamNoDefault],
-    slashWithDefaultParamWithDefault :: [ParamWithDefault]}
-  deriving (Eq, Ord, Read, Show)
-_SlashWithDefault = Core.Name "hydra.python.syntax.SlashWithDefault"
-_SlashWithDefault_paramNoDefault = Core.Name "paramNoDefault"
-_SlashWithDefault_paramWithDefault = Core.Name "paramWithDefault"
-data StarEtc =
-  StarEtcStarNoDefault NoDefaultStarEtc |
-  StarEtcStarNoDefaultStarAnnotation NoDefaultStarAnnotationStarEtc |
-  StarEtcStarComma CommaStarEtc |
-  StarEtcKeywords Keywords
-  deriving (Eq, Ord, Read, Show)
-_StarEtc = Core.Name "hydra.python.syntax.StarEtc"
-_StarEtc_starNoDefault = Core.Name "starNoDefault"
-_StarEtc_starNoDefaultStarAnnotation = Core.Name "starNoDefaultStarAnnotation"
-_StarEtc_starComma = Core.Name "starComma"
-_StarEtc_keywords = Core.Name "keywords"
-data NoDefaultStarEtc =
-  NoDefaultStarEtc {
-    noDefaultStarEtcParamNoDefault :: ParamNoDefault,
-    noDefaultStarEtcParamMaybeDefault :: [ParamMaybeDefault],
-    noDefaultStarEtcKeywords :: (Maybe Keywords)}
-  deriving (Eq, Ord, Read, Show)
-_NoDefaultStarEtc = Core.Name "hydra.python.syntax.NoDefaultStarEtc"
-_NoDefaultStarEtc_paramNoDefault = Core.Name "paramNoDefault"
-_NoDefaultStarEtc_paramMaybeDefault = Core.Name "paramMaybeDefault"
-_NoDefaultStarEtc_keywords = Core.Name "keywords"
-data NoDefaultStarAnnotationStarEtc =
-  NoDefaultStarAnnotationStarEtc {
-    noDefaultStarAnnotationStarEtcParamNoDefaultStarAnnotation :: ParamNoDefaultStarAnnotation,
-    noDefaultStarAnnotationStarEtcParamMaybeDefault :: [ParamMaybeDefault],
-    noDefaultStarAnnotationStarEtcKeywords :: (Maybe Keywords)}
-  deriving (Eq, Ord, Read, Show)
-_NoDefaultStarAnnotationStarEtc = Core.Name "hydra.python.syntax.NoDefaultStarAnnotationStarEtc"
-_NoDefaultStarAnnotationStarEtc_paramNoDefaultStarAnnotation = Core.Name "paramNoDefaultStarAnnotation"
-_NoDefaultStarAnnotationStarEtc_paramMaybeDefault = Core.Name "paramMaybeDefault"
-_NoDefaultStarAnnotationStarEtc_keywords = Core.Name "keywords"
-data CommaStarEtc =
-  CommaStarEtc {
-    commaStarEtcParamMaybeDefault :: [ParamMaybeDefault],
-    commaStarEtcKeywords :: (Maybe Keywords)}
-  deriving (Eq, Ord, Read, Show)
-_CommaStarEtc = Core.Name "hydra.python.syntax.CommaStarEtc"
-_CommaStarEtc_paramMaybeDefault = Core.Name "paramMaybeDefault"
-_CommaStarEtc_keywords = Core.Name "keywords"
-newtype Keywords =
-  Keywords {
-    unKeywords :: ParamNoDefault}
-  deriving (Eq, Ord, Read, Show)
-_Keywords = Core.Name "hydra.python.syntax.Keywords"
-data ParamNoDefault =
-  ParamNoDefault {
-    paramNoDefaultParam :: Param,
-    paramNoDefaultTypeComment :: (Maybe TypeComment)}
-  deriving (Eq, Ord, Read, Show)
-_ParamNoDefault = Core.Name "hydra.python.syntax.ParamNoDefault"
-_ParamNoDefault_param = Core.Name "param"
-_ParamNoDefault_typeComment = Core.Name "typeComment"
-data ParamNoDefaultStarAnnotation =
-  ParamNoDefaultStarAnnotation {
-    paramNoDefaultStarAnnotationParamStarAnnotation :: ParamStarAnnotation,
-    paramNoDefaultStarAnnotationTypeComment :: (Maybe TypeComment)}
-  deriving (Eq, Ord, Read, Show)
-_ParamNoDefaultStarAnnotation = Core.Name "hydra.python.syntax.ParamNoDefaultStarAnnotation"
-_ParamNoDefaultStarAnnotation_paramStarAnnotation = Core.Name "paramStarAnnotation"
-_ParamNoDefaultStarAnnotation_typeComment = Core.Name "typeComment"
-data ParamWithDefault =
-  ParamWithDefault {
-    paramWithDefaultParam :: Param,
-    paramWithDefaultDefault :: Default,
-    paramWithDefaultTypeComment :: (Maybe TypeComment)}
-  deriving (Eq, Ord, Read, Show)
-_ParamWithDefault = Core.Name "hydra.python.syntax.ParamWithDefault"
-_ParamWithDefault_param = Core.Name "param"
-_ParamWithDefault_default = Core.Name "default"
-_ParamWithDefault_typeComment = Core.Name "typeComment"
-data ParamMaybeDefault =
-  ParamMaybeDefault {
-    paramMaybeDefaultParam :: Param,
-    paramMaybeDefaultDefault :: (Maybe Default),
-    paramMaybeDefaultTypeComment :: (Maybe TypeComment)}
-  deriving (Eq, Ord, Read, Show)
-_ParamMaybeDefault = Core.Name "hydra.python.syntax.ParamMaybeDefault"
-_ParamMaybeDefault_param = Core.Name "param"
-_ParamMaybeDefault_default = Core.Name "default"
-_ParamMaybeDefault_typeComment = Core.Name "typeComment"
-data Param =
-  Param {
-    paramName :: Name,
-    paramAnnotation :: (Maybe Annotation)}
-  deriving (Eq, Ord, Read, Show)
-_Param = Core.Name "hydra.python.syntax.Param"
-_Param_name = Core.Name "name"
-_Param_annotation = Core.Name "annotation"
-data ParamStarAnnotation =
-  ParamStarAnnotation {
-    paramStarAnnotationName :: Name,
-    paramStarAnnotationAnnotation :: StarAnnotation}
-  deriving (Eq, Ord, Read, Show)
-_ParamStarAnnotation = Core.Name "hydra.python.syntax.ParamStarAnnotation"
-_ParamStarAnnotation_name = Core.Name "name"
-_ParamStarAnnotation_annotation = Core.Name "annotation"
-newtype Annotation =
-  Annotation {
-    unAnnotation :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Annotation = Core.Name "hydra.python.syntax.Annotation"
-newtype StarAnnotation =
-  StarAnnotation {
-    unStarAnnotation :: StarExpression}
-  deriving (Eq, Ord, Read, Show)
-_StarAnnotation = Core.Name "hydra.python.syntax.StarAnnotation"
-newtype Default =
-  Default {
-    unDefault :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Default = Core.Name "hydra.python.syntax.Default"
-data IfStatement =
-  IfStatement {
-    ifStatementCondition :: NamedExpression,
-    ifStatementBody :: Block,
-    ifStatementContinuation :: (Maybe IfTail)}
-  deriving (Eq, Ord, Read, Show)
-_IfStatement = Core.Name "hydra.python.syntax.IfStatement"
-_IfStatement_condition = Core.Name "condition"
-_IfStatement_body = Core.Name "body"
-_IfStatement_continuation = Core.Name "continuation"
-data IfTail =
-  IfTailElif IfStatement |
-  IfTailElse Block
-  deriving (Eq, Ord, Read, Show)
-_IfTail = Core.Name "hydra.python.syntax.IfTail"
-_IfTail_elif = Core.Name "elif"
-_IfTail_else = Core.Name "else"
-data WhileStatement =
-  WhileStatement {
-    whileStatementCondition :: NamedExpression,
-    whileStatementBody :: Block,
-    whileStatementElse :: (Maybe Block)}
-  deriving (Eq, Ord, Read, Show)
-_WhileStatement = Core.Name "hydra.python.syntax.WhileStatement"
-_WhileStatement_condition = Core.Name "condition"
-_WhileStatement_body = Core.Name "body"
-_WhileStatement_else = Core.Name "else"
-data ForStatement =
-  ForStatement {
-    forStatementAsync :: Bool,
-    forStatementTargets :: [StarTarget],
-    forStatementExpressions :: [StarExpression],
-    forStatementTypeComment :: (Maybe TypeComment),
-    forStatementBody :: Block,
-    forStatementElse :: (Maybe Block)}
-  deriving (Eq, Ord, Read, Show)
-_ForStatement = Core.Name "hydra.python.syntax.ForStatement"
-_ForStatement_async = Core.Name "async"
-_ForStatement_targets = Core.Name "targets"
-_ForStatement_expressions = Core.Name "expressions"
-_ForStatement_typeComment = Core.Name "typeComment"
-_ForStatement_body = Core.Name "body"
-_ForStatement_else = Core.Name "else"
-data WithStatement =
-  WithStatement {
-    withStatementAsync :: Bool,
-    withStatementItems :: [WithItem],
-    withStatementTypeComment :: (Maybe TypeComment),
-    withStatementBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-_WithStatement = Core.Name "hydra.python.syntax.WithStatement"
-_WithStatement_async = Core.Name "async"
-_WithStatement_items = Core.Name "items"
-_WithStatement_typeComment = Core.Name "typeComment"
-_WithStatement_body = Core.Name "body"
-data WithItem =
-  WithItem {
-    withItemExpression :: Expression,
-    withItemAs :: (Maybe StarTarget)}
-  deriving (Eq, Ord, Read, Show)
-_WithItem = Core.Name "hydra.python.syntax.WithItem"
-_WithItem_expression = Core.Name "expression"
-_WithItem_as = Core.Name "as"
-data TryStatement =
-  TryStatementFinally TryFinallyStatement |
-  TryStatementExcept TryExceptStatement |
-  TryStatementExceptStar TryExceptStarStatement
-  deriving (Eq, Ord, Read, Show)
-_TryStatement = Core.Name "hydra.python.syntax.TryStatement"
-_TryStatement_finally = Core.Name "finally"
-_TryStatement_except = Core.Name "except"
-_TryStatement_exceptStar = Core.Name "exceptStar"
-data TryFinallyStatement =
-  TryFinallyStatement {
-    tryFinallyStatementBody :: Block,
-    tryFinallyStatementFinally :: Block}
-  deriving (Eq, Ord, Read, Show)
-_TryFinallyStatement = Core.Name "hydra.python.syntax.TryFinallyStatement"
-_TryFinallyStatement_body = Core.Name "body"
-_TryFinallyStatement_finally = Core.Name "finally"
-data TryExceptStatement =
-  TryExceptStatement {
-    tryExceptStatementBody :: Block,
-    tryExceptStatementExcepts :: [ExceptBlock],
-    tryExceptStatementElse :: (Maybe Block),
-    tryExceptStatementFinally :: (Maybe Block)}
-  deriving (Eq, Ord, Read, Show)
-_TryExceptStatement = Core.Name "hydra.python.syntax.TryExceptStatement"
-_TryExceptStatement_body = Core.Name "body"
-_TryExceptStatement_excepts = Core.Name "excepts"
-_TryExceptStatement_else = Core.Name "else"
-_TryExceptStatement_finally = Core.Name "finally"
-data TryExceptStarStatement =
-  TryExceptStarStatement {
-    tryExceptStarStatementBody :: Block,
-    tryExceptStarStatementExcepts :: [ExceptStarBlock],
-    tryExceptStarStatementElse :: (Maybe Block),
-    tryExceptStarStatementFinally :: (Maybe Block)}
-  deriving (Eq, Ord, Read, Show)
-_TryExceptStarStatement = Core.Name "hydra.python.syntax.TryExceptStarStatement"
-_TryExceptStarStatement_body = Core.Name "body"
-_TryExceptStarStatement_excepts = Core.Name "excepts"
-_TryExceptStarStatement_else = Core.Name "else"
-_TryExceptStarStatement_finally = Core.Name "finally"
-data ExceptBlock =
-  ExceptBlock {
-    exceptBlockExpression :: (Maybe ExceptExpression),
-    exceptBlockBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-_ExceptBlock = Core.Name "hydra.python.syntax.ExceptBlock"
-_ExceptBlock_expression = Core.Name "expression"
-_ExceptBlock_body = Core.Name "body"
-data ExceptExpression =
-  ExceptExpression {
-    exceptExpressionExpression :: Expression,
-    exceptExpressionAs :: (Maybe Name)}
-  deriving (Eq, Ord, Read, Show)
-_ExceptExpression = Core.Name "hydra.python.syntax.ExceptExpression"
-_ExceptExpression_expression = Core.Name "expression"
-_ExceptExpression_as = Core.Name "as"
-data ExceptStarBlock =
-  ExceptStarBlock {
-    exceptStarBlockExpression :: Expression,
-    exceptStarBlockAs :: (Maybe Name),
-    exceptStarBlockBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-_ExceptStarBlock = Core.Name "hydra.python.syntax.ExceptStarBlock"
-_ExceptStarBlock_expression = Core.Name "expression"
-_ExceptStarBlock_as = Core.Name "as"
-_ExceptStarBlock_body = Core.Name "body"
-data MatchStatement =
-  MatchStatement {
-    matchStatementSubject :: SubjectExpression,
-    matchStatementCases :: [CaseBlock]}
-  deriving (Eq, Ord, Read, Show)
-_MatchStatement = Core.Name "hydra.python.syntax.MatchStatement"
-_MatchStatement_subject = Core.Name "subject"
-_MatchStatement_cases = Core.Name "cases"
-data SubjectExpression =
-  SubjectExpressionTuple [StarNamedExpression] |
-  SubjectExpressionSimple NamedExpression
-  deriving (Eq, Ord, Read, Show)
-_SubjectExpression = Core.Name "hydra.python.syntax.SubjectExpression"
-_SubjectExpression_tuple = Core.Name "tuple"
-_SubjectExpression_simple = Core.Name "simple"
-data CaseBlock =
-  CaseBlock {
-    caseBlockPatterns :: Patterns,
-    caseBlockGuard :: (Maybe Guard),
-    caseBlockBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-_CaseBlock = Core.Name "hydra.python.syntax.CaseBlock"
-_CaseBlock_patterns = Core.Name "patterns"
-_CaseBlock_guard = Core.Name "guard"
-_CaseBlock_body = Core.Name "body"
-newtype Guard =
-  Guard {
-    unGuard :: NamedExpression}
-  deriving (Eq, Ord, Read, Show)
-_Guard = Core.Name "hydra.python.syntax.Guard"
-data Patterns =
-  PatternsSequence OpenSequencePattern |
-  PatternsPattern Pattern
-  deriving (Eq, Ord, Read, Show)
-_Patterns = Core.Name "hydra.python.syntax.Patterns"
-_Patterns_sequence = Core.Name "sequence"
-_Patterns_pattern = Core.Name "pattern"
-data Pattern =
-  PatternAs AsPattern |
-  PatternOr OrPattern
-  deriving (Eq, Ord, Read, Show)
-_Pattern = Core.Name "hydra.python.syntax.Pattern"
-_Pattern_as = Core.Name "as"
-_Pattern_or = Core.Name "or"
-data AsPattern =
-  AsPattern {
-    asPatternPattern :: OrPattern,
-    asPatternAs :: PatternCaptureTarget}
-  deriving (Eq, Ord, Read, Show)
-_AsPattern = Core.Name "hydra.python.syntax.AsPattern"
-_AsPattern_pattern = Core.Name "pattern"
-_AsPattern_as = Core.Name "as"
-newtype OrPattern =
-  OrPattern {
-    unOrPattern :: [ClosedPattern]}
-  deriving (Eq, Ord, Read, Show)
-_OrPattern = Core.Name "hydra.python.syntax.OrPattern"
-data ClosedPattern =
-  ClosedPatternLiteral LiteralExpression |
-  ClosedPatternCapture CapturePattern |
-  ClosedPatternWildcard |
-  ClosedPatternValue ValuePattern |
-  ClosedPatternGroup GroupPattern |
-  ClosedPatternSequence SequencePattern |
-  ClosedPatternMapping MappingPattern |
-  ClosedPatternClass ClassPattern
-  deriving (Eq, Ord, Read, Show)
-_ClosedPattern = Core.Name "hydra.python.syntax.ClosedPattern"
-_ClosedPattern_literal = Core.Name "literal"
-_ClosedPattern_capture = Core.Name "capture"
-_ClosedPattern_wildcard = Core.Name "wildcard"
-_ClosedPattern_value = Core.Name "value"
-_ClosedPattern_group = Core.Name "group"
-_ClosedPattern_sequence = Core.Name "sequence"
-_ClosedPattern_mapping = Core.Name "mapping"
-_ClosedPattern_class = Core.Name "class"
-data LiteralExpression =
-  LiteralExpressionNumber SignedNumber |
-  LiteralExpressionComplex ComplexNumber |
-  LiteralExpressionString String |
-  LiteralExpressionNone |
-  LiteralExpressionTrue |
-  LiteralExpressionFalse
-  deriving (Eq, Ord, Read, Show)
-_LiteralExpression = Core.Name "hydra.python.syntax.LiteralExpression"
-_LiteralExpression_number = Core.Name "number"
-_LiteralExpression_complex = Core.Name "complex"
-_LiteralExpression_string = Core.Name "string"
-_LiteralExpression_none = Core.Name "none"
-_LiteralExpression_true = Core.Name "true"
-_LiteralExpression_false = Core.Name "false"
-data ComplexNumber =
-  ComplexNumber {
-    complexNumberReal :: SignedRealNumber,
-    complexNumberPlusOrMinus :: PlusOrMinus,
-    complexNumberImaginary :: ImaginaryNumber}
-  deriving (Eq, Ord, Read, Show)
-_ComplexNumber = Core.Name "hydra.python.syntax.ComplexNumber"
-_ComplexNumber_real = Core.Name "real"
-_ComplexNumber_plusOrMinus = Core.Name "plusOrMinus"
-_ComplexNumber_imaginary = Core.Name "imaginary"
-data PlusOrMinus =
-  PlusOrMinusPlus |
-  PlusOrMinusMinus
-  deriving (Eq, Ord, Read, Show)
-_PlusOrMinus = Core.Name "hydra.python.syntax.PlusOrMinus"
-_PlusOrMinus_plus = Core.Name "plus"
-_PlusOrMinus_minus = Core.Name "minus"
-data SignedNumber =
-  SignedNumberSign PlusOrMinus |
-  SignedNumberNumber Number
-  deriving (Eq, Ord, Read, Show)
-_SignedNumber = Core.Name "hydra.python.syntax.SignedNumber"
-_SignedNumber_sign = Core.Name "sign"
-_SignedNumber_number = Core.Name "number"
-data SignedRealNumber =
-  SignedRealNumberSign PlusOrMinus |
-  SignedRealNumberNumber RealNumber
-  deriving (Eq, Ord, Read, Show)
-_SignedRealNumber = Core.Name "hydra.python.syntax.SignedRealNumber"
-_SignedRealNumber_sign = Core.Name "sign"
-_SignedRealNumber_number = Core.Name "number"
-newtype RealNumber =
-  RealNumber {
-    unRealNumber :: Number}
-  deriving (Eq, Ord, Read, Show)
-_RealNumber = Core.Name "hydra.python.syntax.RealNumber"
-newtype ImaginaryNumber =
-  ImaginaryNumber {
-    unImaginaryNumber :: Number}
-  deriving (Eq, Ord, Read, Show)
-_ImaginaryNumber = Core.Name "hydra.python.syntax.ImaginaryNumber"
-newtype CapturePattern =
-  CapturePattern {
-    unCapturePattern :: PatternCaptureTarget}
-  deriving (Eq, Ord, Read, Show)
-_CapturePattern = Core.Name "hydra.python.syntax.CapturePattern"
-newtype PatternCaptureTarget =
-  PatternCaptureTarget {
-    unPatternCaptureTarget :: Name}
-  deriving (Eq, Ord, Read, Show)
-_PatternCaptureTarget = Core.Name "hydra.python.syntax.PatternCaptureTarget"
-newtype ValuePattern =
-  ValuePattern {
-    unValuePattern :: Attribute}
-  deriving (Eq, Ord, Read, Show)
-_ValuePattern = Core.Name "hydra.python.syntax.ValuePattern"
-newtype Attribute =
-  Attribute {
-    unAttribute :: [Name]}
-  deriving (Eq, Ord, Read, Show)
-_Attribute = Core.Name "hydra.python.syntax.Attribute"
-newtype NameOrAttribute =
-  NameOrAttribute {
-    unNameOrAttribute :: [Name]}
-  deriving (Eq, Ord, Read, Show)
-_NameOrAttribute = Core.Name "hydra.python.syntax.NameOrAttribute"
-newtype GroupPattern =
-  GroupPattern {
-    unGroupPattern :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-_GroupPattern = Core.Name "hydra.python.syntax.GroupPattern"
-data SequencePattern =
-  SequencePatternList (Maybe MaybeSequencePattern) |
-  SequencePatternTuple (Maybe OpenSequencePattern)
-  deriving (Eq, Ord, Read, Show)
-_SequencePattern = Core.Name "hydra.python.syntax.SequencePattern"
-_SequencePattern_list = Core.Name "list"
-_SequencePattern_tuple = Core.Name "tuple"
-data OpenSequencePattern =
-  OpenSequencePattern {
-    openSequencePatternHead :: MaybeStarPattern,
-    openSequencePatternTail :: (Maybe MaybeSequencePattern)}
-  deriving (Eq, Ord, Read, Show)
-_OpenSequencePattern = Core.Name "hydra.python.syntax.OpenSequencePattern"
-_OpenSequencePattern_head = Core.Name "head"
-_OpenSequencePattern_tail = Core.Name "tail"
-newtype MaybeSequencePattern =
-  MaybeSequencePattern {
-    unMaybeSequencePattern :: [MaybeStarPattern]}
-  deriving (Eq, Ord, Read, Show)
-_MaybeSequencePattern = Core.Name "hydra.python.syntax.MaybeSequencePattern"
-data MaybeStarPattern =
-  MaybeStarPatternStar StarPattern |
-  MaybeStarPatternPattern Pattern
-  deriving (Eq, Ord, Read, Show)
-_MaybeStarPattern = Core.Name "hydra.python.syntax.MaybeStarPattern"
-_MaybeStarPattern_star = Core.Name "star"
-_MaybeStarPattern_pattern = Core.Name "pattern"
-data StarPattern =
-  StarPatternCapture PatternCaptureTarget |
-  StarPatternWildcard
-  deriving (Eq, Ord, Read, Show)
-_StarPattern = Core.Name "hydra.python.syntax.StarPattern"
-_StarPattern_capture = Core.Name "capture"
-_StarPattern_wildcard = Core.Name "wildcard"
-data MappingPattern =
-  MappingPattern {
-    mappingPatternItems :: (Maybe ItemsPattern),
-    mappingPatternDoubleStar :: (Maybe DoubleStarPattern)}
-  deriving (Eq, Ord, Read, Show)
-_MappingPattern = Core.Name "hydra.python.syntax.MappingPattern"
-_MappingPattern_items = Core.Name "items"
-_MappingPattern_doubleStar = Core.Name "doubleStar"
-newtype ItemsPattern =
-  ItemsPattern {
-    unItemsPattern :: [KeyValuePattern]}
-  deriving (Eq, Ord, Read, Show)
-_ItemsPattern = Core.Name "hydra.python.syntax.ItemsPattern"
-data KeyValuePattern =
-  KeyValuePattern {
-    keyValuePatternKey :: LiteralExpressionOrAttribute,
-    keyValuePatternValue :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-_KeyValuePattern = Core.Name "hydra.python.syntax.KeyValuePattern"
-_KeyValuePattern_key = Core.Name "key"
-_KeyValuePattern_value = Core.Name "value"
-data LiteralExpressionOrAttribute =
-  LiteralExpressionOrAttributeLiteral LiteralExpression |
-  LiteralExpressionOrAttributeAttribute Attribute
-  deriving (Eq, Ord, Read, Show)
-_LiteralExpressionOrAttribute = Core.Name "hydra.python.syntax.LiteralExpressionOrAttribute"
-_LiteralExpressionOrAttribute_literal = Core.Name "literal"
-_LiteralExpressionOrAttribute_attribute = Core.Name "attribute"
-newtype DoubleStarPattern =
-  DoubleStarPattern {
-    unDoubleStarPattern :: PatternCaptureTarget}
-  deriving (Eq, Ord, Read, Show)
-_DoubleStarPattern = Core.Name "hydra.python.syntax.DoubleStarPattern"
-data ClassPattern =
-  ClassPattern {
-    classPatternNameOrAttribute :: NameOrAttribute,
-    classPatternPositionalPatterns :: (Maybe PositionalPatterns),
-    classPatternKeywordPatterns :: (Maybe KeywordPatterns)}
-  deriving (Eq, Ord, Read, Show)
-_ClassPattern = Core.Name "hydra.python.syntax.ClassPattern"
-_ClassPattern_nameOrAttribute = Core.Name "nameOrAttribute"
-_ClassPattern_positionalPatterns = Core.Name "positionalPatterns"
-_ClassPattern_keywordPatterns = Core.Name "keywordPatterns"
-newtype PositionalPatterns =
-  PositionalPatterns {
-    unPositionalPatterns :: [Pattern]}
-  deriving (Eq, Ord, Read, Show)
-_PositionalPatterns = Core.Name "hydra.python.syntax.PositionalPatterns"
-newtype KeywordPatterns =
-  KeywordPatterns {
-    unKeywordPatterns :: [KeywordPattern]}
-  deriving (Eq, Ord, Read, Show)
-_KeywordPatterns = Core.Name "hydra.python.syntax.KeywordPatterns"
-data KeywordPattern =
-  KeywordPattern {
-    keywordPatternName :: Name,
-    keywordPatternPattern :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-_KeywordPattern = Core.Name "hydra.python.syntax.KeywordPattern"
-_KeywordPattern_name = Core.Name "name"
-_KeywordPattern_pattern = Core.Name "pattern"
-data TypeAlias =
-  TypeAlias {
-    typeAliasName :: Name,
-    typeAliasTypeParams :: [TypeParameter],
-    typeAliasExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_TypeAlias = Core.Name "hydra.python.syntax.TypeAlias"
-_TypeAlias_name = Core.Name "name"
-_TypeAlias_typeParams = Core.Name "typeParams"
-_TypeAlias_expression = Core.Name "expression"
-data TypeParameter =
-  TypeParameterSimple SimpleTypeParameter |
-  TypeParameterStar StarTypeParameter |
-  TypeParameterDoubleStar DoubleStarTypeParameter
-  deriving (Eq, Ord, Read, Show)
-_TypeParameter = Core.Name "hydra.python.syntax.TypeParameter"
-_TypeParameter_simple = Core.Name "simple"
-_TypeParameter_star = Core.Name "star"
-_TypeParameter_doubleStar = Core.Name "doubleStar"
-data SimpleTypeParameter =
-  SimpleTypeParameter {
-    simpleTypeParameterName :: Name,
-    simpleTypeParameterBound :: (Maybe Expression),
-    simpleTypeParameterDefault :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_SimpleTypeParameter = Core.Name "hydra.python.syntax.SimpleTypeParameter"
-_SimpleTypeParameter_name = Core.Name "name"
-_SimpleTypeParameter_bound = Core.Name "bound"
-_SimpleTypeParameter_default = Core.Name "default"
-data StarTypeParameter =
-  StarTypeParameter {
-    starTypeParameterName :: Name,
-    starTypeParameterDefault :: (Maybe StarExpression)}
-  deriving (Eq, Ord, Read, Show)
-_StarTypeParameter = Core.Name "hydra.python.syntax.StarTypeParameter"
-_StarTypeParameter_name = Core.Name "name"
-_StarTypeParameter_default = Core.Name "default"
-data DoubleStarTypeParameter =
-  DoubleStarTypeParameter {
-    doubleStarTypeParameterName :: Name,
-    doubleStarTypeParameterDefault :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_DoubleStarTypeParameter = Core.Name "hydra.python.syntax.DoubleStarTypeParameter"
-_DoubleStarTypeParameter_name = Core.Name "name"
-_DoubleStarTypeParameter_default = Core.Name "default"
-data Expression =
-  ExpressionConditional Conditional |
-  ExpressionSimple Disjunction |
-  ExpressionLambda Lambda
-  deriving (Eq, Ord, Read, Show)
-_Expression = Core.Name "hydra.python.syntax.Expression"
-_Expression_conditional = Core.Name "conditional"
-_Expression_simple = Core.Name "simple"
-_Expression_lambda = Core.Name "lambda"
-data Conditional =
-  Conditional {
-    conditionalBody :: Disjunction,
-    conditionalIf :: Disjunction,
-    conditionalElse :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Conditional = Core.Name "hydra.python.syntax.Conditional"
-_Conditional_body = Core.Name "body"
-_Conditional_if = Core.Name "if"
-_Conditional_else = Core.Name "else"
-data YieldExpression =
-  YieldExpressionFrom Expression |
-  YieldExpressionSimple [StarExpression]
-  deriving (Eq, Ord, Read, Show)
-_YieldExpression = Core.Name "hydra.python.syntax.YieldExpression"
-_YieldExpression_from = Core.Name "from"
-_YieldExpression_simple = Core.Name "simple"
-data StarExpression =
-  StarExpressionStar BitwiseOr |
-  StarExpressionSimple Expression
-  deriving (Eq, Ord, Read, Show)
-_StarExpression = Core.Name "hydra.python.syntax.StarExpression"
-_StarExpression_star = Core.Name "star"
-_StarExpression_simple = Core.Name "simple"
-newtype StarNamedExpressions =
-  StarNamedExpressions {
-    unStarNamedExpressions :: [StarNamedExpression]}
-  deriving (Eq, Ord, Read, Show)
-_StarNamedExpressions = Core.Name "hydra.python.syntax.StarNamedExpressions"
-data StarNamedExpression =
-  StarNamedExpressionStar BitwiseOr |
-  StarNamedExpressionSimple NamedExpression
-  deriving (Eq, Ord, Read, Show)
-_StarNamedExpression = Core.Name "hydra.python.syntax.StarNamedExpression"
-_StarNamedExpression_star = Core.Name "star"
-_StarNamedExpression_simple = Core.Name "simple"
-data AssignmentExpression =
-  AssignmentExpression {
-    assignmentExpressionName :: Name,
-    assignmentExpressionExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_AssignmentExpression = Core.Name "hydra.python.syntax.AssignmentExpression"
-_AssignmentExpression_name = Core.Name "name"
-_AssignmentExpression_expression = Core.Name "expression"
-data NamedExpression =
-  NamedExpressionAssignment AssignmentExpression |
-  NamedExpressionSimple Expression
-  deriving (Eq, Ord, Read, Show)
-_NamedExpression = Core.Name "hydra.python.syntax.NamedExpression"
-_NamedExpression_assignment = Core.Name "assignment"
-_NamedExpression_simple = Core.Name "simple"
-newtype Disjunction =
-  Disjunction {
-    unDisjunction :: [Conjunction]}
-  deriving (Eq, Ord, Read, Show)
-_Disjunction = Core.Name "hydra.python.syntax.Disjunction"
-newtype Conjunction =
-  Conjunction {
-    unConjunction :: [Inversion]}
-  deriving (Eq, Ord, Read, Show)
-_Conjunction = Core.Name "hydra.python.syntax.Conjunction"
-data Inversion =
-  InversionNot Inversion |
-  InversionSimple Comparison
-  deriving (Eq, Ord, Read, Show)
-_Inversion = Core.Name "hydra.python.syntax.Inversion"
-_Inversion_not = Core.Name "not"
-_Inversion_simple = Core.Name "simple"
-data Comparison =
-  Comparison {
-    comparisonLhs :: BitwiseOr,
-    comparisonRhs :: [CompareOpBitwiseOrPair]}
-  deriving (Eq, Ord, Read, Show)
-_Comparison = Core.Name "hydra.python.syntax.Comparison"
-_Comparison_lhs = Core.Name "lhs"
-_Comparison_rhs = Core.Name "rhs"
-data CompareOpBitwiseOrPair =
-  CompareOpBitwiseOrPair {
-    compareOpBitwiseOrPairOperator :: CompareOp,
-    compareOpBitwiseOrPairRhs :: BitwiseOr}
-  deriving (Eq, Ord, Read, Show)
-_CompareOpBitwiseOrPair = Core.Name "hydra.python.syntax.CompareOpBitwiseOrPair"
-_CompareOpBitwiseOrPair_operator = Core.Name "operator"
-_CompareOpBitwiseOrPair_rhs = Core.Name "rhs"
-data CompareOp =
-  CompareOpEq |
-  CompareOpNoteq |
-  CompareOpLte |
-  CompareOpLt |
-  CompareOpGte |
-  CompareOpGt |
-  CompareOpNotin |
-  CompareOpIn |
-  CompareOpIsnot |
-  CompareOpIs
-  deriving (Eq, Ord, Read, Show)
-_CompareOp = Core.Name "hydra.python.syntax.CompareOp"
-_CompareOp_eq = Core.Name "eq"
-_CompareOp_noteq = Core.Name "noteq"
-_CompareOp_lte = Core.Name "lte"
-_CompareOp_lt = Core.Name "lt"
-_CompareOp_gte = Core.Name "gte"
-_CompareOp_gt = Core.Name "gt"
-_CompareOp_notin = Core.Name "notin"
-_CompareOp_in = Core.Name "in"
-_CompareOp_isnot = Core.Name "isnot"
-_CompareOp_is = Core.Name "is"
-data BitwiseOr =
-  BitwiseOr {
-    bitwiseOrLhs :: (Maybe BitwiseOr),
-    bitwiseOrRhs :: BitwiseXor}
-  deriving (Eq, Ord, Read, Show)
-_BitwiseOr = Core.Name "hydra.python.syntax.BitwiseOr"
-_BitwiseOr_lhs = Core.Name "lhs"
-_BitwiseOr_rhs = Core.Name "rhs"
-data BitwiseXor =
-  BitwiseXor {
-    bitwiseXorLhs :: (Maybe BitwiseXor),
-    bitwiseXorRhs :: BitwiseAnd}
-  deriving (Eq, Ord, Read, Show)
-_BitwiseXor = Core.Name "hydra.python.syntax.BitwiseXor"
-_BitwiseXor_lhs = Core.Name "lhs"
-_BitwiseXor_rhs = Core.Name "rhs"
-data BitwiseAnd =
-  BitwiseAnd {
-    bitwiseAndLhs :: (Maybe BitwiseAnd),
-    bitwiseAndRhs :: ShiftExpression}
-  deriving (Eq, Ord, Read, Show)
-_BitwiseAnd = Core.Name "hydra.python.syntax.BitwiseAnd"
-_BitwiseAnd_lhs = Core.Name "lhs"
-_BitwiseAnd_rhs = Core.Name "rhs"
-data ShiftExpression =
-  ShiftExpression {
-    shiftExpressionLhs :: (Maybe ShiftLhs),
-    shiftExpressionRhs :: Sum}
-  deriving (Eq, Ord, Read, Show)
-_ShiftExpression = Core.Name "hydra.python.syntax.ShiftExpression"
-_ShiftExpression_lhs = Core.Name "lhs"
-_ShiftExpression_rhs = Core.Name "rhs"
-data ShiftLhs =
-  ShiftLhs {
-    shiftLhsOperand :: ShiftExpression,
-    shiftLhsOperator :: ShiftOp}
-  deriving (Eq, Ord, Read, Show)
-_ShiftLhs = Core.Name "hydra.python.syntax.ShiftLhs"
-_ShiftLhs_operand = Core.Name "operand"
-_ShiftLhs_operator = Core.Name "operator"
-data ShiftOp =
-  ShiftOpLeft |
-  ShiftOpRight
-  deriving (Eq, Ord, Read, Show)
-_ShiftOp = Core.Name "hydra.python.syntax.ShiftOp"
-_ShiftOp_left = Core.Name "left"
-_ShiftOp_right = Core.Name "right"
-data Sum =
-  Sum {
-    sumLhs :: (Maybe SumLhs),
-    sumRhs :: Term}
-  deriving (Eq, Ord, Read, Show)
-_Sum = Core.Name "hydra.python.syntax.Sum"
-_Sum_lhs = Core.Name "lhs"
-_Sum_rhs = Core.Name "rhs"
-data SumLhs =
-  SumLhs {
-    sumLhsOperand :: Sum,
-    sumLhsOperator :: SumOp}
-  deriving (Eq, Ord, Read, Show)
-_SumLhs = Core.Name "hydra.python.syntax.SumLhs"
-_SumLhs_operand = Core.Name "operand"
-_SumLhs_operator = Core.Name "operator"
-data SumOp =
-  SumOpAdd |
-  SumOpSub
-  deriving (Eq, Ord, Read, Show)
-_SumOp = Core.Name "hydra.python.syntax.SumOp"
-_SumOp_add = Core.Name "add"
-_SumOp_sub = Core.Name "sub"
-data Term =
-  Term {
-    termLhs :: (Maybe TermLhs),
-    termRhs :: Factor}
-  deriving (Eq, Ord, Read, Show)
-_Term = Core.Name "hydra.python.syntax.Term"
-_Term_lhs = Core.Name "lhs"
-_Term_rhs = Core.Name "rhs"
-data TermLhs =
-  TermLhs {
-    termLhsOperand :: Term,
-    termLhsOperator :: TermOp}
-  deriving (Eq, Ord, Read, Show)
-_TermLhs = Core.Name "hydra.python.syntax.TermLhs"
-_TermLhs_operand = Core.Name "operand"
-_TermLhs_operator = Core.Name "operator"
-data TermOp =
-  TermOpMul |
-  TermOpDiv |
-  TermOpFloordiv |
-  TermOpMod |
-  TermOpMatmul
-  deriving (Eq, Ord, Read, Show)
-_TermOp = Core.Name "hydra.python.syntax.TermOp"
-_TermOp_mul = Core.Name "mul"
-_TermOp_div = Core.Name "div"
-_TermOp_floordiv = Core.Name "floordiv"
-_TermOp_mod = Core.Name "mod"
-_TermOp_matmul = Core.Name "matmul"
-data Factor =
-  FactorPositive Factor |
-  FactorNegative Factor |
-  FactorComplement Factor |
-  FactorSimple Power
-  deriving (Eq, Ord, Read, Show)
-_Factor = Core.Name "hydra.python.syntax.Factor"
-_Factor_positive = Core.Name "positive"
-_Factor_negative = Core.Name "negative"
-_Factor_complement = Core.Name "complement"
-_Factor_simple = Core.Name "simple"
-data Power =
-  Power {
-    powerLhs :: AwaitPrimary,
-    powerRhs :: (Maybe Factor)}
-  deriving (Eq, Ord, Read, Show)
-_Power = Core.Name "hydra.python.syntax.Power"
-_Power_lhs = Core.Name "lhs"
-_Power_rhs = Core.Name "rhs"
-data AwaitPrimary =
-  AwaitPrimary {
-    awaitPrimaryAwait :: Bool,
-    awaitPrimaryPrimary :: Primary}
-  deriving (Eq, Ord, Read, Show)
-_AwaitPrimary = Core.Name "hydra.python.syntax.AwaitPrimary"
-_AwaitPrimary_await = Core.Name "await"
-_AwaitPrimary_primary = Core.Name "primary"
-data Primary =
-  PrimarySimple Atom |
-  PrimaryCompound PrimaryWithRhs
-  deriving (Eq, Ord, Read, Show)
-_Primary = Core.Name "hydra.python.syntax.Primary"
-_Primary_simple = Core.Name "simple"
-_Primary_compound = Core.Name "compound"
-data PrimaryWithRhs =
-  PrimaryWithRhs {
-    primaryWithRhsPrimary :: Primary,
-    primaryWithRhsRhs :: PrimaryRhs}
-  deriving (Eq, Ord, Read, Show)
-_PrimaryWithRhs = Core.Name "hydra.python.syntax.PrimaryWithRhs"
-_PrimaryWithRhs_primary = Core.Name "primary"
-_PrimaryWithRhs_rhs = Core.Name "rhs"
-data PrimaryRhs =
-  PrimaryRhsProject Name |
-  PrimaryRhsGenexp Genexp |
-  PrimaryRhsCall Args |
-  PrimaryRhsSlices Slices
-  deriving (Eq, Ord, Read, Show)
-_PrimaryRhs = Core.Name "hydra.python.syntax.PrimaryRhs"
-_PrimaryRhs_project = Core.Name "project"
-_PrimaryRhs_genexp = Core.Name "genexp"
-_PrimaryRhs_call = Core.Name "call"
-_PrimaryRhs_slices = Core.Name "slices"
-data Slices =
-  Slices {
-    slicesHead :: Slice,
-    slicesTail :: [SliceOrStarredExpression]}
-  deriving (Eq, Ord, Read, Show)
-_Slices = Core.Name "hydra.python.syntax.Slices"
-_Slices_head = Core.Name "head"
-_Slices_tail = Core.Name "tail"
-data SliceOrStarredExpression =
-  SliceOrStarredExpressionSlice Slice |
-  SliceOrStarredExpressionStarred StarredExpression
-  deriving (Eq, Ord, Read, Show)
-_SliceOrStarredExpression = Core.Name "hydra.python.syntax.SliceOrStarredExpression"
-_SliceOrStarredExpression_slice = Core.Name "slice"
-_SliceOrStarredExpression_starred = Core.Name "starred"
-data Slice =
-  SliceNamed NamedExpression |
-  SliceSlice_ SliceExpression
-  deriving (Eq, Ord, Read, Show)
-_Slice = Core.Name "hydra.python.syntax.Slice"
-_Slice_named = Core.Name "named"
-_Slice_slice_ = Core.Name "slice_"
-data SliceExpression =
-  SliceExpression {
-    sliceExpressionStart :: (Maybe Expression),
-    sliceExpressionStop :: (Maybe Expression),
-    sliceExpressionStep :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-_SliceExpression = Core.Name "hydra.python.syntax.SliceExpression"
-_SliceExpression_start = Core.Name "start"
-_SliceExpression_stop = Core.Name "stop"
-_SliceExpression_step = Core.Name "step"
-data Atom =
-  AtomName Name |
-  AtomTrue |
-  AtomFalse |
-  AtomNone |
-  AtomString String_ |
-  AtomNumber Number |
-  AtomTuple Tuple |
-  AtomGroup Group |
-  AtomGenexp Genexp |
-  AtomList List |
-  AtomListcomp Listcomp |
-  AtomDict Dict |
-  AtomSet Set |
-  AtomDictcomp Dictcomp |
-  AtomSetcomp Setcomp |
-  AtomEllipsis
-  deriving (Eq, Ord, Read, Show)
-_Atom = Core.Name "hydra.python.syntax.Atom"
-_Atom_name = Core.Name "name"
-_Atom_true = Core.Name "true"
-_Atom_false = Core.Name "false"
-_Atom_none = Core.Name "none"
-_Atom_string = Core.Name "string"
-_Atom_number = Core.Name "number"
-_Atom_tuple = Core.Name "tuple"
-_Atom_group = Core.Name "group"
-_Atom_genexp = Core.Name "genexp"
-_Atom_list = Core.Name "list"
-_Atom_listcomp = Core.Name "listcomp"
-_Atom_dict = Core.Name "dict"
-_Atom_set = Core.Name "set"
-_Atom_dictcomp = Core.Name "dictcomp"
-_Atom_setcomp = Core.Name "setcomp"
-_Atom_ellipsis = Core.Name "ellipsis"
-data Group =
-  GroupYield YieldExpression |
-  GroupExpression NamedExpression
-  deriving (Eq, Ord, Read, Show)
-_Group = Core.Name "hydra.python.syntax.Group"
-_Group_yield = Core.Name "yield"
-_Group_expression = Core.Name "expression"
-data Lambda =
-  Lambda {
-    lambdaParams :: LambdaParameters,
-    lambdaBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Lambda = Core.Name "hydra.python.syntax.Lambda"
-_Lambda_params = Core.Name "params"
-_Lambda_body = Core.Name "body"
-data LambdaParameters =
-  LambdaParameters {
-    lambdaParametersSlashNoDefault :: (Maybe LambdaSlashNoDefault),
-    lambdaParametersParamNoDefault :: [LambdaParamNoDefault],
-    lambdaParametersParamWithDefault :: [LambdaParamWithDefault],
-    lambdaParametersStarEtc :: (Maybe LambdaStarEtc)}
-  deriving (Eq, Ord, Read, Show)
-_LambdaParameters = Core.Name "hydra.python.syntax.LambdaParameters"
-_LambdaParameters_slashNoDefault = Core.Name "slashNoDefault"
-_LambdaParameters_paramNoDefault = Core.Name "paramNoDefault"
-_LambdaParameters_paramWithDefault = Core.Name "paramWithDefault"
-_LambdaParameters_starEtc = Core.Name "starEtc"
-data LambdaSlashNoDefault =
-  LambdaSlashNoDefault {
-    lambdaSlashNoDefaultParameters :: [LambdaParamNoDefault]}
-  deriving (Eq, Ord, Read, Show)
-_LambdaSlashNoDefault = Core.Name "hydra.python.syntax.LambdaSlashNoDefault"
-_LambdaSlashNoDefault_parameters = Core.Name "parameters"
-data LambdaSlashWithDefault =
-  LambdaSlashWithDefault {
-    lambdaSlashWithDefaultParamNoDefault :: [LambdaParamNoDefault],
-    lambdaSlashWithDefaultParamWithDefault :: [LambdaParamWithDefault]}
-  deriving (Eq, Ord, Read, Show)
-_LambdaSlashWithDefault = Core.Name "hydra.python.syntax.LambdaSlashWithDefault"
-_LambdaSlashWithDefault_paramNoDefault = Core.Name "paramNoDefault"
-_LambdaSlashWithDefault_paramWithDefault = Core.Name "paramWithDefault"
-data LambdaStarEtc =
-  LambdaStarEtcStar Bool |
-  LambdaStarEtcParamNoDefault LambdaParamNoDefault |
-  LambdaStarEtcParamMaybeDefault [LambdaParamMaybeDefault] |
-  LambdaStarEtcKwds LambdaKwds
-  deriving (Eq, Ord, Read, Show)
-_LambdaStarEtc = Core.Name "hydra.python.syntax.LambdaStarEtc"
-_LambdaStarEtc_star = Core.Name "star"
-_LambdaStarEtc_paramNoDefault = Core.Name "paramNoDefault"
-_LambdaStarEtc_paramMaybeDefault = Core.Name "paramMaybeDefault"
-_LambdaStarEtc_kwds = Core.Name "kwds"
-newtype LambdaKwds =
-  LambdaKwds {
-    unLambdaKwds :: LambdaParamNoDefault}
-  deriving (Eq, Ord, Read, Show)
-_LambdaKwds = Core.Name "hydra.python.syntax.LambdaKwds"
-newtype LambdaParamNoDefault =
-  LambdaParamNoDefault {
-    unLambdaParamNoDefault :: Name}
-  deriving (Eq, Ord, Read, Show)
-_LambdaParamNoDefault = Core.Name "hydra.python.syntax.LambdaParamNoDefault"
-data LambdaParamWithDefault =
-  LambdaParamWithDefault {
-    lambdaParamWithDefaultParam :: Name,
-    lambdaParamWithDefaultDefault :: (Maybe Default)}
-  deriving (Eq, Ord, Read, Show)
-_LambdaParamWithDefault = Core.Name "hydra.python.syntax.LambdaParamWithDefault"
-_LambdaParamWithDefault_param = Core.Name "param"
-_LambdaParamWithDefault_default = Core.Name "default"
-data LambdaParamMaybeDefault =
-  LambdaParamMaybeDefault {
-    lambdaParamMaybeDefaultParam :: Name,
-    lambdaParamMaybeDefaultDefault :: (Maybe Default)}
-  deriving (Eq, Ord, Read, Show)
-_LambdaParamMaybeDefault = Core.Name "hydra.python.syntax.LambdaParamMaybeDefault"
-_LambdaParamMaybeDefault_param = Core.Name "param"
-_LambdaParamMaybeDefault_default = Core.Name "default"
-newtype List =
-  List {
-    unList :: [StarNamedExpression]}
-  deriving (Eq, Ord, Read, Show)
-_List = Core.Name "hydra.python.syntax.List"
-newtype Tuple =
-  Tuple {
-    unTuple :: [StarNamedExpression]}
-  deriving (Eq, Ord, Read, Show)
-_Tuple = Core.Name "hydra.python.syntax.Tuple"
-newtype Set =
-  Set {
-    unSet :: [StarNamedExpression]}
-  deriving (Eq, Ord, Read, Show)
-_Set = Core.Name "hydra.python.syntax.Set"
-newtype Dict =
-  Dict {
-    unDict :: [DoubleStarredKvpair]}
-  deriving (Eq, Ord, Read, Show)
-_Dict = Core.Name "hydra.python.syntax.Dict"
-data DoubleStarredKvpair =
-  DoubleStarredKvpairStarred BitwiseOr |
-  DoubleStarredKvpairPair Kvpair
-  deriving (Eq, Ord, Read, Show)
-_DoubleStarredKvpair = Core.Name "hydra.python.syntax.DoubleStarredKvpair"
-_DoubleStarredKvpair_starred = Core.Name "starred"
-_DoubleStarredKvpair_pair = Core.Name "pair"
-data Kvpair =
-  Kvpair {
-    kvpairKey :: Expression,
-    kvpairValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Kvpair = Core.Name "hydra.python.syntax.Kvpair"
-_Kvpair_key = Core.Name "key"
-_Kvpair_value = Core.Name "value"
-newtype ForIfClauses =
-  ForIfClauses {
-    unForIfClauses :: [ForIfClause]}
-  deriving (Eq, Ord, Read, Show)
-_ForIfClauses = Core.Name "hydra.python.syntax.ForIfClauses"
-data ForIfClause =
-  ForIfClause {
-    forIfClauseAsync :: Bool,
-    forIfClauseTargets :: [StarTarget],
-    forIfClauseIn :: Disjunction,
-    forIfClauseIfs :: [Disjunction]}
-  deriving (Eq, Ord, Read, Show)
-_ForIfClause = Core.Name "hydra.python.syntax.ForIfClause"
-_ForIfClause_async = Core.Name "async"
-_ForIfClause_targets = Core.Name "targets"
-_ForIfClause_in = Core.Name "in"
-_ForIfClause_ifs = Core.Name "ifs"
-data Listcomp =
-  Listcomp {
-    listcompExpression :: NamedExpression,
-    listcompForIfClauses :: ForIfClauses}
-  deriving (Eq, Ord, Read, Show)
-_Listcomp = Core.Name "hydra.python.syntax.Listcomp"
-_Listcomp_expression = Core.Name "expression"
-_Listcomp_forIfClauses = Core.Name "forIfClauses"
-data Setcomp =
-  Setcomp {
-    setcompExpression :: NamedExpression,
-    setcompForIfClauses :: ForIfClauses}
-  deriving (Eq, Ord, Read, Show)
-_Setcomp = Core.Name "hydra.python.syntax.Setcomp"
-_Setcomp_expression = Core.Name "expression"
-_Setcomp_forIfClauses = Core.Name "forIfClauses"
-data Genexp =
-  Genexp {
-    genexpHead :: GenexpHead,
-    genexpTail :: ForIfClauses}
-  deriving (Eq, Ord, Read, Show)
-_Genexp = Core.Name "hydra.python.syntax.Genexp"
-_Genexp_head = Core.Name "head"
-_Genexp_tail = Core.Name "tail"
-data GenexpHead =
-  GenexpHeadAssignment AssignmentExpression |
-  GenexpHeadExpression Expression
-  deriving (Eq, Ord, Read, Show)
-_GenexpHead = Core.Name "hydra.python.syntax.GenexpHead"
-_GenexpHead_assignment = Core.Name "assignment"
-_GenexpHead_expression = Core.Name "expression"
-data Dictcomp =
-  Dictcomp {
-    dictcompKvpair :: Kvpair,
-    dictcompForIfClauses :: ForIfClauses}
-  deriving (Eq, Ord, Read, Show)
-_Dictcomp = Core.Name "hydra.python.syntax.Dictcomp"
-_Dictcomp_kvpair = Core.Name "kvpair"
-_Dictcomp_forIfClauses = Core.Name "forIfClauses"
-data Args =
-  Args {
-    argsPositional :: [PosArg],
-    argsKwargOrStarred :: [KwargOrStarred],
-    argsKwargOrDoubleStarred :: [KwargOrDoubleStarred]}
-  deriving (Eq, Ord, Read, Show)
-_Args = Core.Name "hydra.python.syntax.Args"
-_Args_positional = Core.Name "positional"
-_Args_kwargOrStarred = Core.Name "kwargOrStarred"
-_Args_kwargOrDoubleStarred = Core.Name "kwargOrDoubleStarred"
-data PosArg =
-  PosArgStarred StarredExpression |
-  PosArgAssignment AssignmentExpression |
-  PosArgExpression Expression
-  deriving (Eq, Ord, Read, Show)
-_PosArg = Core.Name "hydra.python.syntax.PosArg"
-_PosArg_starred = Core.Name "starred"
-_PosArg_assignment = Core.Name "assignment"
-_PosArg_expression = Core.Name "expression"
-newtype StarredExpression =
-  StarredExpression {
-    unStarredExpression :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_StarredExpression = Core.Name "hydra.python.syntax.StarredExpression"
-data KwargOrStarred =
-  KwargOrStarredKwarg Kwarg |
-  KwargOrStarredStarred StarredExpression
-  deriving (Eq, Ord, Read, Show)
-_KwargOrStarred = Core.Name "hydra.python.syntax.KwargOrStarred"
-_KwargOrStarred_kwarg = Core.Name "kwarg"
-_KwargOrStarred_starred = Core.Name "starred"
-data Kwarg =
-  Kwarg {
-    kwargName :: Name,
-    kwargValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-_Kwarg = Core.Name "hydra.python.syntax.Kwarg"
-_Kwarg_name = Core.Name "name"
-_Kwarg_value = Core.Name "value"
-data KwargOrDoubleStarred =
-  KwargOrDoubleStarredKwarg Kwarg |
-  KwargOrDoubleStarredDoubleStarred Expression
-  deriving (Eq, Ord, Read, Show)
-_KwargOrDoubleStarred = Core.Name "hydra.python.syntax.KwargOrDoubleStarred"
-_KwargOrDoubleStarred_kwarg = Core.Name "kwarg"
-_KwargOrDoubleStarred_doubleStarred = Core.Name "doubleStarred"
-newtype StarTargetsListSeq =
-  StarTargetsListSeq {
-    unStarTargetsListSeq :: [StarTarget]}
-  deriving (Eq, Ord, Read, Show)
-_StarTargetsListSeq = Core.Name "hydra.python.syntax.StarTargetsListSeq"
-newtype StarTargetsTupleSeq =
-  StarTargetsTupleSeq {
-    unStarTargetsTupleSeq :: [StarTarget]}
-  deriving (Eq, Ord, Read, Show)
-_StarTargetsTupleSeq = Core.Name "hydra.python.syntax.StarTargetsTupleSeq"
-data StarTarget =
-  StarTargetStarred StarTarget |
-  StarTargetUnstarred TargetWithStarAtom
-  deriving (Eq, Ord, Read, Show)
-_StarTarget = Core.Name "hydra.python.syntax.StarTarget"
-_StarTarget_starred = Core.Name "starred"
-_StarTarget_unstarred = Core.Name "unstarred"
-data TargetWithStarAtom =
-  TargetWithStarAtomProject TPrimaryAndName |
-  TargetWithStarAtomSlices TPrimaryAndSlices |
-  TargetWithStarAtomAtom StarAtom
-  deriving (Eq, Ord, Read, Show)
-_TargetWithStarAtom = Core.Name "hydra.python.syntax.TargetWithStarAtom"
-_TargetWithStarAtom_project = Core.Name "project"
-_TargetWithStarAtom_slices = Core.Name "slices"
-_TargetWithStarAtom_atom = Core.Name "atom"
-data TPrimaryAndName =
-  TPrimaryAndName {
-    tPrimaryAndNamePrimary :: TPrimary,
-    tPrimaryAndNameName :: Name}
-  deriving (Eq, Ord, Read, Show)
-_TPrimaryAndName = Core.Name "hydra.python.syntax.TPrimaryAndName"
-_TPrimaryAndName_primary = Core.Name "primary"
-_TPrimaryAndName_name = Core.Name "name"
-data TPrimaryAndSlices =
-  TPrimaryAndSlices {
-    tPrimaryAndSlicesPrimary :: TPrimary,
-    tPrimaryAndSlicesSlices :: Slices}
-  deriving (Eq, Ord, Read, Show)
-_TPrimaryAndSlices = Core.Name "hydra.python.syntax.TPrimaryAndSlices"
-_TPrimaryAndSlices_primary = Core.Name "primary"
-_TPrimaryAndSlices_slices = Core.Name "slices"
-data StarAtom =
-  StarAtomName Name |
-  StarAtomTargetWithStarAtom TargetWithStarAtom |
-  StarAtomStarTargetsTupleSeq (Maybe StarTargetsTupleSeq) |
-  StarAtomStarTargetsListSeq (Maybe StarTargetsListSeq)
-  deriving (Eq, Ord, Read, Show)
-_StarAtom = Core.Name "hydra.python.syntax.StarAtom"
-_StarAtom_name = Core.Name "name"
-_StarAtom_targetWithStarAtom = Core.Name "targetWithStarAtom"
-_StarAtom_starTargetsTupleSeq = Core.Name "starTargetsTupleSeq"
-_StarAtom_starTargetsListSeq = Core.Name "starTargetsListSeq"
-data SingleTarget =
-  SingleTargetSubscriptAttributeTarget SingleSubscriptAttributeTarget |
-  SingleTargetName Name |
-  SingleTargetParens SingleTarget
-  deriving (Eq, Ord, Read, Show)
-_SingleTarget = Core.Name "hydra.python.syntax.SingleTarget"
-_SingleTarget_subscriptAttributeTarget = Core.Name "subscriptAttributeTarget"
-_SingleTarget_name = Core.Name "name"
-_SingleTarget_parens = Core.Name "parens"
-data SingleSubscriptAttributeTarget =
-  SingleSubscriptAttributeTargetPrimaryAndName TPrimaryAndName |
-  SingleSubscriptAttributeTargetPrimaryAndSlices TPrimaryAndSlices
-  deriving (Eq, Ord, Read, Show)
-_SingleSubscriptAttributeTarget = Core.Name "hydra.python.syntax.SingleSubscriptAttributeTarget"
-_SingleSubscriptAttributeTarget_primaryAndName = Core.Name "primaryAndName"
-_SingleSubscriptAttributeTarget_primaryAndSlices = Core.Name "primaryAndSlices"
-data TPrimary =
-  TPrimaryPrimaryAndName TPrimaryAndName |
-  TPrimaryPrimaryAndSlices TPrimaryAndSlices |
-  TPrimaryPrimaryAndGenexp TPrimaryAndGenexp |
-  TPrimaryPrimaryAndArguments TPrimaryAndArguments |
-  TPrimaryAtom Atom
-  deriving (Eq, Ord, Read, Show)
-_TPrimary = Core.Name "hydra.python.syntax.TPrimary"
-_TPrimary_primaryAndName = Core.Name "primaryAndName"
-_TPrimary_primaryAndSlices = Core.Name "primaryAndSlices"
-_TPrimary_primaryAndGenexp = Core.Name "primaryAndGenexp"
-_TPrimary_primaryAndArguments = Core.Name "primaryAndArguments"
-_TPrimary_atom = Core.Name "atom"
-data TPrimaryAndGenexp =
-  TPrimaryAndGenexp {
-    tPrimaryAndGenexpPrimary :: TPrimary,
-    tPrimaryAndGenexpGenexp :: Genexp}
-  deriving (Eq, Ord, Read, Show)
-_TPrimaryAndGenexp = Core.Name "hydra.python.syntax.TPrimaryAndGenexp"
-_TPrimaryAndGenexp_primary = Core.Name "primary"
-_TPrimaryAndGenexp_genexp = Core.Name "genexp"
-data TPrimaryAndArguments =
-  TPrimaryAndArguments {
-    tPrimaryAndArgumentsPrimary :: TPrimary,
-    tPrimaryAndArgumentsArguments :: (Maybe Args)}
-  deriving (Eq, Ord, Read, Show)
-_TPrimaryAndArguments = Core.Name "hydra.python.syntax.TPrimaryAndArguments"
-_TPrimaryAndArguments_primary = Core.Name "primary"
-_TPrimaryAndArguments_arguments = Core.Name "arguments"
-newtype DelTargets =
-  DelTargets {
-    unDelTargets :: [DelTarget]}
-  deriving (Eq, Ord, Read, Show)
-_DelTargets = Core.Name "hydra.python.syntax.DelTargets"
-data DelTarget =
-  DelTargetPrimaryAndName TPrimaryAndName |
-  DelTargetPrimaryAndSlices TPrimaryAndSlices |
-  DelTargetDelTAtom DelTAtom
-  deriving (Eq, Ord, Read, Show)
-_DelTarget = Core.Name "hydra.python.syntax.DelTarget"
-_DelTarget_primaryAndName = Core.Name "primaryAndName"
-_DelTarget_primaryAndSlices = Core.Name "primaryAndSlices"
-_DelTarget_delTAtom = Core.Name "delTAtom"
-data DelTAtom =
-  DelTAtomName Name |
-  DelTAtomTarget DelTarget |
-  DelTAtomTargets DelTargets
-  deriving (Eq, Ord, Read, Show)
-_DelTAtom = Core.Name "hydra.python.syntax.DelTAtom"
-_DelTAtom_name = Core.Name "name"
-_DelTAtom_target = Core.Name "target"
-_DelTAtom_targets = Core.Name "targets"
-data TypeExpression =
-  TypeExpressionExpression Expression |
-  TypeExpressionStarredExpression Expression |
-  TypeExpressionDoubleStarredExpression Expression
-  deriving (Eq, Ord, Read, Show)
-_TypeExpression = Core.Name "hydra.python.syntax.TypeExpression"
-_TypeExpression_expression = Core.Name "expression"
-_TypeExpression_starredExpression = Core.Name "starredExpression"
-_TypeExpression_doubleStarredExpression = Core.Name "doubleStarredExpression"
-newtype FuncTypeComment =
-  FuncTypeComment {
-    unFuncTypeComment :: TypeComment}
-  deriving (Eq, Ord, Read, Show)
-_FuncTypeComment = Core.Name "hydra.python.syntax.FuncTypeComment"
diff --git a/src/main/haskell/Hydra/Python/Testing.hs b/src/main/haskell/Hydra/Python/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Testing.hs
+++ /dev/null
@@ -1,101 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Python test code generation codec for pytest-based generation tests
-
-module Hydra.Python.Testing where
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Lib.Chars as Chars
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Build the complete Python test module content
-buildPythonTestModule :: t0 -> Testing.TestGroup -> String -> String
-buildPythonTestModule testModule testGroup testBody =
-
-      let groupName_ = Testing.testGroupName testGroup
-          header =
-                  Strings.cat [
-                    Strings.cat2 "# " Constants.warningAutoGeneratedFile,
-                    "\n",
-                    (Strings.cat2 "# " groupName_),
-                    "\n\n"]
-      in (Strings.cat [
-        header,
-        testBody,
-        "\n"])
--- | Format a test name for Python (snake_case with test_ prefix)
-formatPythonTestName :: String -> String
-formatPythonTestName name =
-    Strings.cat2 "test_" (Strings.fromList (Lists.map (\c -> Logic.ifElse (Chars.isAlphaNum c) (Chars.toLower c) 95) (Strings.toList name)))
--- | Generate a single pytest test case from a test case with metadata
-generatePythonTestCase :: [String] -> Testing.TestCaseWithMetadata -> Either t0 [String]
-generatePythonTestCase groupPath tcm =
-
-      let name_ = Testing.testCaseWithMetadataName tcm
-          tcase = Testing.testCaseWithMetadataCase tcm
-      in case tcase of
-        Testing.TestCaseUniversal v0 ->
-          let actual_ = Testing.universalTestCaseActual v0
-              expected_ = Testing.universalTestCaseExpected v0
-              fullName = Logic.ifElse (Lists.null groupPath) name_ (Strings.intercalate "__" (Lists.concat2 groupPath [
-                    name_]))
-              formattedName = formatPythonTestName fullName
-          in (Right [
-            Strings.cat [
-              "def ",
-              formattedName,
-              "():"],
-            (Strings.cat [
-              "    assert (",
-              actual_,
-              ") == (",
-              expected_,
-              ")"])])
--- | Generate a Python test file for a test group
-generatePythonTestFile :: Packaging.Module -> Testing.TestGroup -> t0 -> Either t1 (String, String)
-generatePythonTestFile testModule testGroup _g = generateTestFileWithPythonCodec testModule testGroup
--- | Generate test hierarchy for Python with nested subgroups
-generatePythonTestGroupHierarchy :: [String] -> Testing.TestGroup -> Either t0 String
-generatePythonTestGroupHierarchy groupPath testGroup =
-
-      let cases_ = Testing.testGroupCases testGroup
-          subgroups = Testing.testGroupSubgroups testGroup
-      in (Eithers.bind (Eithers.mapList (\tc -> generatePythonTestCase groupPath tc) cases_) (\testCaseLines -> Eithers.bind (Eithers.mapList (\subgroup ->
-        let groupName = Testing.testGroupName subgroup
-            header = Strings.cat2 "# " groupName
-        in (Eithers.map (\content -> Strings.cat [
-          header,
-          "\n\n",
-          content]) (generatePythonTestGroupHierarchy (Lists.concat2 groupPath [
-          groupName]) subgroup))) subgroups) (\subgroupBlocks ->
-        let testCasesStr = Strings.intercalate "\n\n" (Lists.concat testCaseLines)
-            subgroupsStr = Strings.intercalate "\n\n" subgroupBlocks
-        in (Right (Strings.cat [
-          testCasesStr,
-          (Logic.ifElse (Logic.or (Equality.equal testCasesStr "") (Equality.equal subgroupsStr "")) "" "\n\n"),
-          subgroupsStr])))))
--- | Generate a complete test file for Python
-generateTestFileWithPythonCodec :: Packaging.Module -> Testing.TestGroup -> Either t0 (String, String)
-generateTestFileWithPythonCodec testModule testGroup =
-    Eithers.map (\testBody ->
-      let testModuleContent = buildPythonTestModule testModule testGroup testBody
-          ns_ = Packaging.moduleNamespace testModule
-          parts = Strings.splitOn "." (Packaging.unNamespace ns_)
-          dirParts = Maybes.fromMaybe [] (Lists.maybeInit parts)
-          fileName =
-                  Strings.cat [
-                    "test_",
-                    (Maybes.fromMaybe "" (Lists.maybeLast parts)),
-                    ".py"]
-          filePath =
-                  Strings.cat [
-                    Strings.intercalate "/" dirParts,
-                    "/",
-                    fileName]
-      in (filePath, testModuleContent)) (generatePythonTestGroupHierarchy [] testGroup)
diff --git a/src/main/haskell/Hydra/Python/Utils.hs b/src/main/haskell/Hydra/Python/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Python/Utils.hs
+++ /dev/null
@@ -1,669 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Python utilities for constructing Python syntax trees
-
-module Hydra.Python.Utils where
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Python.Environment as Environment
-import qualified Hydra.Python.Names as Names
-import qualified Hydra.Python.Serde as Serde
-import qualified Hydra.Python.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Annotate an expression with an optional comment using Annotated[]
-annotatedExpression :: Maybe String -> Syntax.Expression -> Syntax.Expression
-annotatedExpression mcomment expr =
-    Maybes.maybe expr (\c -> pyPrimaryToPyExpression (primaryWithExpressionSlices (pyNameToPyPrimary (Syntax.Name "Annotated")) [
-      expr,
-      (doubleQuotedString c)])) mcomment
--- | Annotate a statement with an optional comment
-annotatedStatement :: Maybe String -> Syntax.Statement -> Syntax.Statement
-annotatedStatement mcomment stmt =
-    Maybes.maybe stmt (\c -> Syntax.StatementAnnotated (Syntax.AnnotatedStatement {
-      Syntax.annotatedStatementComment = c,
-      Syntax.annotatedStatementStatement = stmt})) mcomment
--- | Create an assignment statement from name and annotated rhs
-assignment :: Syntax.Name -> Syntax.AnnotatedRhs -> Syntax.Statement
-assignment name rhs =
-    pyAssignmentToPyStatement (Syntax.AssignmentUntyped (Syntax.UntypedAssignment {
-      Syntax.untypedAssignmentTargets = [
-        pyNameToPyStarTarget name],
-      Syntax.untypedAssignmentRhs = rhs,
-      Syntax.untypedAssignmentTypeComment = Nothing}))
--- | Create an assignment statement from name and expression
-assignmentStatement :: Syntax.Name -> Syntax.Expression -> Syntax.Statement
-assignmentStatement name expr = assignment name (pyExpressionToPyAnnotatedRhs expr)
--- | Create a cast expression: cast(type, expr)
-castTo :: Syntax.Expression -> Syntax.Expression -> Syntax.Expression
-castTo pytype pyexpr =
-    functionCall (pyNameToPyPrimary (Syntax.Name "cast")) [
-      pytype,
-      pyexpr]
--- | Create a comment statement (triple-quoted string)
-commentStatement :: String -> Syntax.Statement
-commentStatement s = pyExpressionToPyStatement (tripleQuotedString s)
--- | Decode a Comparison to a Primary if possible
-decodePyComparisonToPyAwaitPrimary :: Syntax.Comparison -> Maybe Syntax.Primary
-decodePyComparisonToPyAwaitPrimary c =
-
-      let rhs = Syntax.comparisonRhs c
-          lhs = Syntax.comparisonLhs c
-          orLhs = Syntax.bitwiseOrLhs lhs
-          orRhs = Syntax.bitwiseOrRhs lhs
-          xorLhs = Syntax.bitwiseXorLhs orRhs
-          xorRhs = Syntax.bitwiseXorRhs orRhs
-          andLhs = Syntax.bitwiseAndLhs xorRhs
-          andRhs = Syntax.bitwiseAndRhs xorRhs
-          shiftLhs = Syntax.shiftExpressionLhs andRhs
-          shiftRhs = Syntax.shiftExpressionRhs andRhs
-          sumLhs = Syntax.sumLhs shiftRhs
-          sumRhs = Syntax.sumRhs shiftRhs
-          termLhs = Syntax.termLhs sumRhs
-          termRhs = Syntax.termRhs sumRhs
-      in (Logic.ifElse (Logic.not (Lists.null rhs)) Nothing (Logic.ifElse (Maybes.isJust orLhs) Nothing (Logic.ifElse (Maybes.isJust xorLhs) Nothing (Logic.ifElse (Maybes.isJust andLhs) Nothing (Logic.ifElse (Maybes.isJust shiftLhs) Nothing (Logic.ifElse (Maybes.isJust sumLhs) Nothing (Logic.ifElse (Maybes.isJust termLhs) Nothing (case termRhs of
-        Syntax.FactorSimple v0 -> decodePyPowerToPyPrimary v0
-        _ -> Nothing))))))))
--- | Decode a Conjunction to a Primary if possible
-decodePyConjunctionToPyPrimary :: Syntax.Conjunction -> Maybe Syntax.Primary
-decodePyConjunctionToPyPrimary c =
-
-      let inversions = Syntax.unConjunction c
-      in (Logic.ifElse (Equality.equal (Lists.length inversions) 1) (Maybes.bind (Lists.maybeHead inversions) (\i -> decodePyInversionToPyPrimary i)) Nothing)
--- | Decode an Expression to a Primary if possible
-decodePyExpressionToPyPrimary :: Syntax.Expression -> Maybe Syntax.Primary
-decodePyExpressionToPyPrimary e =
-    case e of
-      Syntax.ExpressionSimple v0 ->
-        let conjunctions = Syntax.unDisjunction v0
-        in (Logic.ifElse (Equality.equal (Lists.length conjunctions) 1) (Maybes.bind (Lists.maybeHead conjunctions) (\c2 -> decodePyConjunctionToPyPrimary c2)) Nothing)
-      _ -> Nothing
--- | Decode an Inversion to a Primary if possible
-decodePyInversionToPyPrimary :: Syntax.Inversion -> Maybe Syntax.Primary
-decodePyInversionToPyPrimary i =
-    case i of
-      Syntax.InversionSimple v0 -> decodePyComparisonToPyAwaitPrimary v0
-      _ -> Nothing
--- | Decode a Power to a Primary if possible
-decodePyPowerToPyPrimary :: Syntax.Power -> Maybe Syntax.Primary
-decodePyPowerToPyPrimary p =
-
-      let lhs = Syntax.powerLhs p
-          await = Syntax.awaitPrimaryAwait lhs
-          prim = Syntax.awaitPrimaryPrimary lhs
-      in (Logic.ifElse await Nothing (Just prim))
--- | Create a dotted assignment statement: obj.attr = expr
-dottedAssignmentStatement :: Syntax.Name -> Syntax.Name -> Syntax.Expression -> Syntax.Statement
-dottedAssignmentStatement obj attr expr =
-
-      let target =
-              Syntax.StarTargetUnstarred (Syntax.TargetWithStarAtomProject (Syntax.TPrimaryAndName {
-                Syntax.tPrimaryAndNamePrimary = (Syntax.TPrimaryAtom (Syntax.AtomName obj)),
-                Syntax.tPrimaryAndNameName = attr}))
-      in (pyAssignmentToPyStatement (Syntax.AssignmentUntyped (Syntax.UntypedAssignment {
-        Syntax.untypedAssignmentTargets = [
-          target],
-        Syntax.untypedAssignmentRhs = (pyExpressionToPyAnnotatedRhs expr),
-        Syntax.untypedAssignmentTypeComment = Nothing})))
--- | Create a double-quoted string expression
-doubleQuotedString :: String -> Syntax.Expression
-doubleQuotedString s = stringToPyExpression Syntax.QuoteStyleDouble s
--- | Find all namespaces referenced by a list of definitions, plus the core namespace
-findNamespaces :: Packaging.Namespace -> [Packaging.Definition] -> Packaging.Namespaces Syntax.DottedName
-findNamespaces focusNs defs =
-
-      let coreNs = Packaging.Namespace "hydra.core"
-          namespaces = Analysis.namespacesForDefinitions Names.encodeNamespace focusNs defs
-      in (Logic.ifElse (Equality.equal (Packaging.unNamespace (Pairs.first (Packaging.namespacesFocus namespaces))) (Packaging.unNamespace coreNs)) namespaces (Packaging.Namespaces {
-        Packaging.namespacesFocus = (Packaging.namespacesFocus namespaces),
-        Packaging.namespacesMapping = (Maps.insert coreNs (Names.encodeNamespace coreNs) (Packaging.namespacesMapping namespaces))}))
--- | Create a function call expression
-functionCall :: Syntax.Primary -> [Syntax.Expression] -> Syntax.Expression
-functionCall func args = pyPrimaryToPyExpression (primaryWithRhs func (Syntax.PrimaryRhsCall (pyExpressionsToPyArgs args)))
-getItemParams :: Syntax.Parameters
-getItemParams =
-    Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-      Syntax.paramNoDefaultParametersParamNoDefault = [
-        Syntax.ParamNoDefault {
-          Syntax.paramNoDefaultParam = Syntax.Param {
-            Syntax.paramName = (Syntax.Name "cls"),
-            Syntax.paramAnnotation = Nothing},
-          Syntax.paramNoDefaultTypeComment = Nothing},
-        Syntax.ParamNoDefault {
-          Syntax.paramNoDefaultParam = Syntax.Param {
-            Syntax.paramName = (Syntax.Name "item"),
-            Syntax.paramAnnotation = Nothing},
-          Syntax.paramNoDefaultTypeComment = Nothing}],
-      Syntax.paramNoDefaultParametersParamWithDefault = [],
-      Syntax.paramNoDefaultParametersStarEtc = Nothing})
--- | Create an indented block with optional comment
-indentedBlock :: Maybe String -> [[Syntax.Statement]] -> Syntax.Block
-indentedBlock mcomment stmts =
-
-      let commentGroup = Maybes.maybe [] (\s -> [
-            commentStatement s]) mcomment
-          groups = Lists.filter (\g -> Logic.not (Lists.null g)) (Lists.cons commentGroup stmts)
-      in (Logic.ifElse (Lists.null groups) (Syntax.BlockIndented [
-        [
-          Syntax.StatementSimple [
-            pyExpressionToPySimpleStatement (pyAtomToPyExpression Syntax.AtomEllipsis)]]]) (Syntax.BlockIndented groups))
--- | Create a name with parameters
-nameAndParams :: Syntax.Name -> [Syntax.Expression] -> Syntax.Expression
-nameAndParams pyName params = primaryAndParams (pyNameToPyPrimary pyName) params
--- | Create a NewType statement
-newtypeStatement :: Syntax.Name -> Maybe String -> Syntax.Expression -> Syntax.Statement
-newtypeStatement name mcomment expr =
-    annotatedStatement mcomment (assignmentStatement name (functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "NewType"))) [
-      doubleQuotedString (Syntax.unName name),
-      expr]))
--- | Build an or-expression from multiple primaries
-orExpression :: [Syntax.Primary] -> Syntax.Expression
-orExpression prims =
-
-      let build =
-              \prev -> \ps -> Maybes.maybe (Syntax.BitwiseOr {
-                Syntax.bitwiseOrLhs = prev,
-                Syntax.bitwiseOrRhs = (pyPrimaryToPyBitwiseXor (Syntax.PrimarySimple Syntax.AtomEllipsis))}) (\p -> Logic.ifElse (Lists.null (Pairs.second p)) (Syntax.BitwiseOr {
-                Syntax.bitwiseOrLhs = prev,
-                Syntax.bitwiseOrRhs = (pyPrimaryToPyBitwiseXor (Pairs.first p))}) (build (Just (Syntax.BitwiseOr {
-                Syntax.bitwiseOrLhs = prev,
-                Syntax.bitwiseOrRhs = (pyPrimaryToPyBitwiseXor (Pairs.first p))})) (Pairs.second p))) (Lists.uncons ps)
-      in (pyBitwiseOrToPyExpression (build Nothing prims))
--- | Create a primary with parameters (subscript)
-primaryAndParams :: Syntax.Primary -> [Syntax.Expression] -> Syntax.Expression
-primaryAndParams prim params = pyPrimaryToPyExpression (primaryWithExpressionSlices prim params)
--- | Create a Primary with expression slices
-primaryWithExpressionSlices :: Syntax.Primary -> [Syntax.Expression] -> Syntax.Primary
-primaryWithExpressionSlices prim exprs =
-    Maybes.fromMaybe prim (Maybes.map (\p -> primaryWithSlices prim (pyExpressionToPySlice (Pairs.first p)) (Lists.map (\e -> Syntax.SliceOrStarredExpressionSlice (pyExpressionToPySlice e)) (Pairs.second p))) (Lists.uncons exprs))
--- | Combine a Primary with a PrimaryRhs
-primaryWithRhs :: Syntax.Primary -> Syntax.PrimaryRhs -> Syntax.Primary
-primaryWithRhs prim rhs =
-    Syntax.PrimaryCompound (Syntax.PrimaryWithRhs {
-      Syntax.primaryWithRhsPrimary = prim,
-      Syntax.primaryWithRhsRhs = rhs})
--- | Create a Primary with slices
-primaryWithSlices :: Syntax.Primary -> Syntax.Slice -> [Syntax.SliceOrStarredExpression] -> Syntax.Primary
-primaryWithSlices prim first rest =
-    primaryWithRhs prim (Syntax.PrimaryRhsSlices (Syntax.Slices {
-      Syntax.slicesHead = first,
-      Syntax.slicesTail = rest}))
--- | Project a field from an expression
-projectFromExpression :: Syntax.Expression -> Syntax.Name -> Syntax.Expression
-projectFromExpression exp name =
-
-      let prim = Syntax.PrimarySimple (Syntax.AtomGroup (Syntax.GroupExpression (Syntax.NamedExpressionSimple exp)))
-      in (pyPrimaryToPyExpression (Syntax.PrimaryCompound (Syntax.PrimaryWithRhs {
-        Syntax.primaryWithRhsPrimary = prim,
-        Syntax.primaryWithRhsRhs = (Syntax.PrimaryRhsProject name)})))
--- | Convert an Assignment to a Statement
-pyAssignmentToPyStatement :: Syntax.Assignment -> Syntax.Statement
-pyAssignmentToPyStatement a = pySimpleStatementToPyStatement (Syntax.SimpleStatementAssignment a)
--- | Convert an Atom to an Expression
-pyAtomToPyExpression :: Syntax.Atom -> Syntax.Expression
-pyAtomToPyExpression atom = pyPrimaryToPyExpression (Syntax.PrimarySimple atom)
--- | Convert a BitwiseOr to a Conjunction
-pyBitwiseOrToPyConjunction :: Syntax.BitwiseOr -> Syntax.Conjunction
-pyBitwiseOrToPyConjunction bor =
-    Syntax.Conjunction [
-      Syntax.InversionSimple (Syntax.Comparison {
-        Syntax.comparisonLhs = bor,
-        Syntax.comparisonRhs = []})]
--- | Convert a BitwiseOr to an Expression
-pyBitwiseOrToPyExpression :: Syntax.BitwiseOr -> Syntax.Expression
-pyBitwiseOrToPyExpression bor = pyConjunctionToPyExpression (pyBitwiseOrToPyConjunction bor)
--- | Convert a ClassDefinition to a Statement
-pyClassDefinitionToPyStatement :: Syntax.ClassDefinition -> Syntax.Statement
-pyClassDefinitionToPyStatement cd = Syntax.StatementCompound (Syntax.CompoundStatementClassDef cd)
--- | Convert a ClosedPattern to Patterns
-pyClosedPatternToPyPatterns :: Syntax.ClosedPattern -> Syntax.Patterns
-pyClosedPatternToPyPatterns p = Syntax.PatternsPattern (Syntax.PatternOr (Syntax.OrPattern [
-  p]))
--- | Convert a Conjunction to an Expression
-pyConjunctionToPyExpression :: Syntax.Conjunction -> Syntax.Expression
-pyConjunctionToPyExpression conj = Syntax.ExpressionSimple (Syntax.Disjunction [
-  conj])
--- | Convert an Expression to a BitwiseOr, wrapping in parens if needed
-pyExpressionToBitwiseOr :: Syntax.Expression -> Syntax.BitwiseOr
-pyExpressionToBitwiseOr e =
-    Syntax.BitwiseOr {
-      Syntax.bitwiseOrLhs = Nothing,
-      Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-        Syntax.bitwiseXorLhs = Nothing,
-        Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-          Syntax.bitwiseAndLhs = Nothing,
-          Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-            Syntax.shiftExpressionLhs = Nothing,
-            Syntax.shiftExpressionRhs = Syntax.Sum {
-              Syntax.sumLhs = Nothing,
-              Syntax.sumRhs = Syntax.Term {
-                Syntax.termLhs = Nothing,
-                Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                  Syntax.powerLhs = Syntax.AwaitPrimary {
-                    Syntax.awaitPrimaryAwait = False,
-                    Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomGroup (Syntax.GroupExpression (Syntax.NamedExpressionSimple e))))},
-                  Syntax.powerRhs = Nothing}))}}}}}}
--- | Convert an Expression to a Disjunction, wrapping in parens if needed
-pyExpressionToDisjunction :: Syntax.Expression -> Syntax.Disjunction
-pyExpressionToDisjunction e =
-    case e of
-      Syntax.ExpressionSimple v0 -> v0
-      _ -> Syntax.Disjunction [
-        pyPrimaryToPyConjunction (Syntax.PrimarySimple (Syntax.AtomGroup (Syntax.GroupExpression (Syntax.NamedExpressionSimple e))))]
--- | Convert an Expression to an AnnotatedRhs
-pyExpressionToPyAnnotatedRhs :: Syntax.Expression -> Syntax.AnnotatedRhs
-pyExpressionToPyAnnotatedRhs expr = Syntax.AnnotatedRhsStar [
-  Syntax.StarExpressionSimple expr]
--- | Extracts the primary from an expression, or wraps it in parentheses if the expression does not contain a primary
-pyExpressionToPyPrimary :: Syntax.Expression -> Syntax.Primary
-pyExpressionToPyPrimary e =
-    Maybes.maybe (Syntax.PrimarySimple (Syntax.AtomGroup (Syntax.GroupExpression (Syntax.NamedExpressionSimple e)))) (\prim -> prim) (decodePyExpressionToPyPrimary e)
--- | Convert an Expression to a SimpleStatement (as star expressions)
-pyExpressionToPySimpleStatement :: Syntax.Expression -> Syntax.SimpleStatement
-pyExpressionToPySimpleStatement expr = Syntax.SimpleStatementStarExpressions [
-  Syntax.StarExpressionSimple expr]
--- | Convert an Expression to a Slice
-pyExpressionToPySlice :: Syntax.Expression -> Syntax.Slice
-pyExpressionToPySlice expr = Syntax.SliceNamed (Syntax.NamedExpressionSimple expr)
--- | Convert an Expression to a StarNamedExpression
-pyExpressionToPyStarNamedExpression :: Syntax.Expression -> Syntax.StarNamedExpression
-pyExpressionToPyStarNamedExpression expr = Syntax.StarNamedExpressionSimple (Syntax.NamedExpressionSimple expr)
--- | Convert an Expression to a Statement
-pyExpressionToPyStatement :: Syntax.Expression -> Syntax.Statement
-pyExpressionToPyStatement expr = pySimpleStatementToPyStatement (pyExpressionToPySimpleStatement expr)
--- | Convert a list of Expressions to Args
-pyExpressionsToPyArgs :: [Syntax.Expression] -> Syntax.Args
-pyExpressionsToPyArgs exprs =
-    Syntax.Args {
-      Syntax.argsPositional = (Lists.map (\e -> Syntax.PosArgExpression e) exprs),
-      Syntax.argsKwargOrStarred = [],
-      Syntax.argsKwargOrDoubleStarred = []}
--- | Create a Python list from expressions
-pyList :: [Syntax.Expression] -> Syntax.List
-pyList exprs = Syntax.List (Lists.map pyExpressionToPyStarNamedExpression exprs)
--- | Convert a Name to an Expression
-pyNameToPyExpression :: Syntax.Name -> Syntax.Expression
-pyNameToPyExpression name = pyPrimaryToPyExpression (pyNameToPyPrimary name)
--- | Convert a Name to a NamedExpression
-pyNameToPyNamedExpression :: Syntax.Name -> Syntax.NamedExpression
-pyNameToPyNamedExpression name = Syntax.NamedExpressionSimple (pyNameToPyExpression name)
--- | Convert a Name to a Primary (simple atom)
-pyNameToPyPrimary :: Syntax.Name -> Syntax.Primary
-pyNameToPyPrimary name = Syntax.PrimarySimple (Syntax.AtomName name)
--- | Convert a Name to a StarTarget
-pyNameToPyStarTarget :: Syntax.Name -> Syntax.StarTarget
-pyNameToPyStarTarget name = Syntax.StarTargetUnstarred (Syntax.TargetWithStarAtomAtom (Syntax.StarAtomName name))
--- | Convert a Name to a TypeParameter
-pyNameToPyTypeParameter :: Syntax.Name -> Syntax.TypeParameter
-pyNameToPyTypeParameter name =
-    Syntax.TypeParameterSimple (Syntax.SimpleTypeParameter {
-      Syntax.simpleTypeParameterName = name,
-      Syntax.simpleTypeParameterBound = Nothing,
-      Syntax.simpleTypeParameterDefault = Nothing})
--- | The Python None value as a Name
-pyNone :: Syntax.Name
-pyNone = Syntax.Name "None"
--- | Convert a Primary to a BitwiseOr
-pyPrimaryToPyBitwiseOr :: Syntax.Primary -> Syntax.BitwiseOr
-pyPrimaryToPyBitwiseOr prim =
-    Syntax.BitwiseOr {
-      Syntax.bitwiseOrLhs = Nothing,
-      Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-        Syntax.bitwiseXorLhs = Nothing,
-        Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-          Syntax.bitwiseAndLhs = Nothing,
-          Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-            Syntax.shiftExpressionLhs = Nothing,
-            Syntax.shiftExpressionRhs = Syntax.Sum {
-              Syntax.sumLhs = Nothing,
-              Syntax.sumRhs = Syntax.Term {
-                Syntax.termLhs = Nothing,
-                Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                  Syntax.powerLhs = Syntax.AwaitPrimary {
-                    Syntax.awaitPrimaryAwait = False,
-                    Syntax.awaitPrimaryPrimary = prim},
-                  Syntax.powerRhs = Nothing}))}}}}}}
--- | Convert a Primary to a BitwiseXor
-pyPrimaryToPyBitwiseXor :: Syntax.Primary -> Syntax.BitwiseXor
-pyPrimaryToPyBitwiseXor prim =
-    Syntax.BitwiseXor {
-      Syntax.bitwiseXorLhs = Nothing,
-      Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-        Syntax.bitwiseAndLhs = Nothing,
-        Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-          Syntax.shiftExpressionLhs = Nothing,
-          Syntax.shiftExpressionRhs = Syntax.Sum {
-            Syntax.sumLhs = Nothing,
-            Syntax.sumRhs = Syntax.Term {
-              Syntax.termLhs = Nothing,
-              Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                Syntax.powerLhs = Syntax.AwaitPrimary {
-                  Syntax.awaitPrimaryAwait = False,
-                  Syntax.awaitPrimaryPrimary = prim},
-                Syntax.powerRhs = Nothing}))}}}}}
--- | Convert a Primary to a Conjunction
-pyPrimaryToPyConjunction :: Syntax.Primary -> Syntax.Conjunction
-pyPrimaryToPyConjunction prim = pyBitwiseOrToPyConjunction (pyPrimaryToPyBitwiseOr prim)
--- | Convert a Primary to an Expression
-pyPrimaryToPyExpression :: Syntax.Primary -> Syntax.Expression
-pyPrimaryToPyExpression prim = pyConjunctionToPyExpression (pyPrimaryToPyConjunction prim)
--- | Convert a Primary to a Slice
-pyPrimaryToPySlice :: Syntax.Primary -> Syntax.Slice
-pyPrimaryToPySlice prim = pyExpressionToPySlice (pyPrimaryToPyExpression prim)
--- | Convert a SimpleStatement to a Statement
-pySimpleStatementToPyStatement :: Syntax.SimpleStatement -> Syntax.Statement
-pySimpleStatementToPyStatement s = Syntax.StatementSimple [
-  s]
--- | Create a raise AssertionError statement
-raiseAssertionError :: String -> Syntax.Statement
-raiseAssertionError msg =
-    pySimpleStatementToPyStatement (Syntax.SimpleStatementRaise (Syntax.RaiseStatement (Just (Syntax.RaiseExpression {
-      Syntax.raiseExpressionExpression = (functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "AssertionError"))) [
-        doubleQuotedString msg]),
-      Syntax.raiseExpressionFrom = Nothing}))))
--- | Create a raise TypeError statement
-raiseTypeError :: String -> Syntax.Statement
-raiseTypeError msg =
-    pySimpleStatementToPyStatement (Syntax.SimpleStatementRaise (Syntax.RaiseStatement (Just (Syntax.RaiseExpression {
-      Syntax.raiseExpressionExpression = (functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "TypeError"))) [
-        doubleQuotedString msg]),
-      Syntax.raiseExpressionFrom = Nothing}))))
--- | Create a return statement with a single expression
-returnSingle :: Syntax.Expression -> Syntax.Statement
-returnSingle expr =
-    pySimpleStatementToPyStatement (Syntax.SimpleStatementReturn (Syntax.ReturnStatement [
-      Syntax.StarExpressionSimple expr]))
-selfOnlyParams :: Syntax.Parameters
-selfOnlyParams =
-    Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-      Syntax.paramNoDefaultParametersParamNoDefault = [
-        Syntax.ParamNoDefault {
-          Syntax.paramNoDefaultParam = Syntax.Param {
-            Syntax.paramName = (Syntax.Name "self"),
-            Syntax.paramAnnotation = Nothing},
-          Syntax.paramNoDefaultTypeComment = Nothing}],
-      Syntax.paramNoDefaultParametersParamWithDefault = [],
-      Syntax.paramNoDefaultParametersStarEtc = Nothing})
-selfOtherParams :: Syntax.Parameters
-selfOtherParams =
-    Syntax.ParametersParamNoDefault (Syntax.ParamNoDefaultParameters {
-      Syntax.paramNoDefaultParametersParamNoDefault = [
-        Syntax.ParamNoDefault {
-          Syntax.paramNoDefaultParam = Syntax.Param {
-            Syntax.paramName = (Syntax.Name "self"),
-            Syntax.paramAnnotation = Nothing},
-          Syntax.paramNoDefaultTypeComment = Nothing},
-        Syntax.ParamNoDefault {
-          Syntax.paramNoDefaultParam = Syntax.Param {
-            Syntax.paramName = (Syntax.Name "other"),
-            Syntax.paramAnnotation = Nothing},
-          Syntax.paramNoDefaultTypeComment = Nothing}],
-      Syntax.paramNoDefaultParametersParamWithDefault = [],
-      Syntax.paramNoDefaultParametersStarEtc = Nothing})
--- | Create a single-quoted string expression
-singleQuotedString :: String -> Syntax.Expression
-singleQuotedString s = stringToPyExpression Syntax.QuoteStyleSingle s
--- | Create a string expression with a given quote style
-stringToPyExpression :: Syntax.QuoteStyle -> String -> Syntax.Expression
-stringToPyExpression style s =
-    pyAtomToPyExpression (Syntax.AtomString (Syntax.String_ {
-      Syntax.stringValue = s,
-      Syntax.stringQuoteStyle = style}))
--- | Current target Python version for code generation
-targetPythonVersion :: Environment.PythonVersion
-targetPythonVersion = Environment.PythonVersionPython310
--- | Create a triple-quoted string expression
-tripleQuotedString :: String -> Syntax.Expression
-tripleQuotedString s = stringToPyExpression Syntax.QuoteStyleTriple s
--- | Generate a type alias statement using PEP 695 syntax (Python 3.12+)
-typeAliasStatement :: Syntax.Name -> [Syntax.TypeParameter] -> Maybe String -> Syntax.Expression -> Syntax.Statement
-typeAliasStatement name tparams mcomment tyexpr =
-    annotatedStatement mcomment (pySimpleStatementToPyStatement (Syntax.SimpleStatementTypeAlias (Syntax.TypeAlias {
-      Syntax.typeAliasName = name,
-      Syntax.typeAliasTypeParams = tparams,
-      Syntax.typeAliasExpression = tyexpr})))
--- | Generate a type alias statement using Python 3.10-compatible syntax: Name: TypeAlias = "TypeExpression"
-typeAliasStatement310 :: Syntax.Name -> t0 -> Maybe String -> Syntax.Expression -> Syntax.Statement
-typeAliasStatement310 name _tparams mcomment tyexpr =
-
-      let quotedExpr = doubleQuotedString (Serialization.printExpr (Serde.encodeExpression tyexpr))
-      in (annotatedStatement mcomment (pyAssignmentToPyStatement (Syntax.AssignmentTyped (Syntax.TypedAssignment {
-        Syntax.typedAssignmentLhs = (Syntax.SingleTargetName name),
-        Syntax.typedAssignmentType = (Syntax.ExpressionSimple (Syntax.Disjunction [
-          Syntax.Conjunction [
-            Syntax.InversionSimple (Syntax.Comparison {
-              Syntax.comparisonLhs = Syntax.BitwiseOr {
-                Syntax.bitwiseOrLhs = Nothing,
-                Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                  Syntax.bitwiseXorLhs = Nothing,
-                  Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                    Syntax.bitwiseAndLhs = Nothing,
-                    Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                      Syntax.shiftExpressionLhs = Nothing,
-                      Syntax.shiftExpressionRhs = Syntax.Sum {
-                        Syntax.sumLhs = Nothing,
-                        Syntax.sumRhs = Syntax.Term {
-                          Syntax.termLhs = Nothing,
-                          Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                            Syntax.powerLhs = Syntax.AwaitPrimary {
-                              Syntax.awaitPrimaryAwait = False,
-                              Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "TypeAlias")))},
-                            Syntax.powerRhs = Nothing}))}}}}}},
-              Syntax.comparisonRhs = []})]])),
-        Syntax.typedAssignmentRhs = (Just (pyExpressionToPyAnnotatedRhs quotedExpr))}))))
--- | Generate a subscriptable union class for Python 3.10
-unionTypeClassStatements310 :: Syntax.Name -> Maybe String -> Syntax.Expression -> [Syntax.Statement] -> [Syntax.Statement]
-unionTypeClassStatements310 name mcomment tyexpr extraStmts =
-
-      let nameStr = Syntax.unName name
-          metaName = Syntax.Name (Strings.cat2 (Strings.cat2 "_" nameStr) "Meta")
-          docString = Serialization.printExpr (Serde.encodeExpression tyexpr)
-          returnObject =
-                  pySimpleStatementToPyStatement (Syntax.SimpleStatementReturn (Syntax.ReturnStatement [
-                    Syntax.StarExpressionSimple (Syntax.ExpressionSimple (Syntax.Disjunction [
-                      Syntax.Conjunction [
-                        Syntax.InversionSimple (Syntax.Comparison {
-                          Syntax.comparisonLhs = Syntax.BitwiseOr {
-                            Syntax.bitwiseOrLhs = Nothing,
-                            Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                              Syntax.bitwiseXorLhs = Nothing,
-                              Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                                Syntax.bitwiseAndLhs = Nothing,
-                                Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                  Syntax.shiftExpressionLhs = Nothing,
-                                  Syntax.shiftExpressionRhs = Syntax.Sum {
-                                    Syntax.sumLhs = Nothing,
-                                    Syntax.sumRhs = Syntax.Term {
-                                      Syntax.termLhs = Nothing,
-                                      Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                        Syntax.powerLhs = Syntax.AwaitPrimary {
-                                          Syntax.awaitPrimaryAwait = False,
-                                          Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "object")))},
-                                        Syntax.powerRhs = Nothing}))}}}}}},
-                          Syntax.comparisonRhs = []})]]))]))
-          getItemMethod =
-                  Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-                    Syntax.functionDefinitionDecorators = Nothing,
-                    Syntax.functionDefinitionRaw = Syntax.FunctionDefRaw {
-                      Syntax.functionDefRawAsync = False,
-                      Syntax.functionDefRawName = (Syntax.Name "__getitem__"),
-                      Syntax.functionDefRawTypeParams = [],
-                      Syntax.functionDefRawParams = (Just getItemParams),
-                      Syntax.functionDefRawReturnType = Nothing,
-                      Syntax.functionDefRawFuncTypeComment = Nothing,
-                      Syntax.functionDefRawBlock = (indentedBlock Nothing [
-                        [
-                          returnObject]])}}))
-          metaClass =
-                  pyClassDefinitionToPyStatement (Syntax.ClassDefinition {
-                    Syntax.classDefinitionDecorators = Nothing,
-                    Syntax.classDefinitionName = metaName,
-                    Syntax.classDefinitionTypeParams = [],
-                    Syntax.classDefinitionArguments = (Just (pyExpressionsToPyArgs [
-                      Syntax.ExpressionSimple (Syntax.Disjunction [
-                        Syntax.Conjunction [
-                          Syntax.InversionSimple (Syntax.Comparison {
-                            Syntax.comparisonLhs = Syntax.BitwiseOr {
-                              Syntax.bitwiseOrLhs = Nothing,
-                              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                                Syntax.bitwiseXorLhs = Nothing,
-                                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                                  Syntax.bitwiseAndLhs = Nothing,
-                                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                    Syntax.shiftExpressionLhs = Nothing,
-                                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                                      Syntax.sumLhs = Nothing,
-                                      Syntax.sumRhs = Syntax.Term {
-                                        Syntax.termLhs = Nothing,
-                                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                                            Syntax.awaitPrimaryAwait = False,
-                                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "type")))},
-                                          Syntax.powerRhs = Nothing}))}}}}}},
-                            Syntax.comparisonRhs = []})]])])),
-                    Syntax.classDefinitionBody = (indentedBlock Nothing [
-                      [
-                        getItemMethod]])})
-          docStmt = pyExpressionToPyStatement (tripleQuotedString docString)
-          bodyGroups =
-                  Logic.ifElse (Lists.null extraStmts) (
-                    let passStmt = pySimpleStatementToPyStatement Syntax.SimpleStatementPass
-                    in [
-                      [
-                        docStmt],
-                      [
-                        passStmt]]) [
-                    [
-                      docStmt],
-                    extraStmts]
-          metaclassArg =
-                  Syntax.Kwarg {
-                    Syntax.kwargName = (Syntax.Name "metaclass"),
-                    Syntax.kwargValue = (Syntax.ExpressionSimple (Syntax.Disjunction [
-                      Syntax.Conjunction [
-                        Syntax.InversionSimple (Syntax.Comparison {
-                          Syntax.comparisonLhs = Syntax.BitwiseOr {
-                            Syntax.bitwiseOrLhs = Nothing,
-                            Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                              Syntax.bitwiseXorLhs = Nothing,
-                              Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                                Syntax.bitwiseAndLhs = Nothing,
-                                Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                  Syntax.shiftExpressionLhs = Nothing,
-                                  Syntax.shiftExpressionRhs = Syntax.Sum {
-                                    Syntax.sumLhs = Nothing,
-                                    Syntax.sumRhs = Syntax.Term {
-                                      Syntax.termLhs = Nothing,
-                                      Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                        Syntax.powerLhs = Syntax.AwaitPrimary {
-                                          Syntax.awaitPrimaryAwait = False,
-                                          Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName metaName))},
-                                        Syntax.powerRhs = Nothing}))}}}}}},
-                          Syntax.comparisonRhs = []})]]))}
-          unionClass =
-                  annotatedStatement mcomment (pyClassDefinitionToPyStatement (Syntax.ClassDefinition {
-                    Syntax.classDefinitionDecorators = Nothing,
-                    Syntax.classDefinitionName = name,
-                    Syntax.classDefinitionTypeParams = [],
-                    Syntax.classDefinitionArguments = (Just (Syntax.Args {
-                      Syntax.argsPositional = [],
-                      Syntax.argsKwargOrStarred = [
-                        Syntax.KwargOrStarredKwarg metaclassArg],
-                      Syntax.argsKwargOrDoubleStarred = []})),
-                    Syntax.classDefinitionBody = (indentedBlock Nothing bodyGroups)}))
-      in [
-        metaClass,
-        unionClass]
--- | Generate __slots__, __eq__, and __hash__ methods for unit-typed union variants
-unitVariantMethods :: Syntax.Name -> [Syntax.Statement]
-unitVariantMethods className =
-
-      let classNameStr = Syntax.unName className
-          slotsStmt =
-                  assignmentStatement (Syntax.Name "__slots__") (pyPrimaryToPyExpression (Syntax.PrimarySimple (Syntax.AtomTuple (Syntax.Tuple []))))
-          returnIsinstance =
-                  pySimpleStatementToPyStatement (Syntax.SimpleStatementReturn (Syntax.ReturnStatement [
-                    Syntax.StarExpressionSimple (functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "isinstance"))) [
-                      Syntax.ExpressionSimple (Syntax.Disjunction [
-                        Syntax.Conjunction [
-                          Syntax.InversionSimple (Syntax.Comparison {
-                            Syntax.comparisonLhs = Syntax.BitwiseOr {
-                              Syntax.bitwiseOrLhs = Nothing,
-                              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                                Syntax.bitwiseXorLhs = Nothing,
-                                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                                  Syntax.bitwiseAndLhs = Nothing,
-                                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                    Syntax.shiftExpressionLhs = Nothing,
-                                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                                      Syntax.sumLhs = Nothing,
-                                      Syntax.sumRhs = Syntax.Term {
-                                        Syntax.termLhs = Nothing,
-                                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                                            Syntax.awaitPrimaryAwait = False,
-                                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "other")))},
-                                          Syntax.powerRhs = Nothing}))}}}}}},
-                            Syntax.comparisonRhs = []})]]),
-                      (Syntax.ExpressionSimple (Syntax.Disjunction [
-                        Syntax.Conjunction [
-                          Syntax.InversionSimple (Syntax.Comparison {
-                            Syntax.comparisonLhs = Syntax.BitwiseOr {
-                              Syntax.bitwiseOrLhs = Nothing,
-                              Syntax.bitwiseOrRhs = Syntax.BitwiseXor {
-                                Syntax.bitwiseXorLhs = Nothing,
-                                Syntax.bitwiseXorRhs = Syntax.BitwiseAnd {
-                                  Syntax.bitwiseAndLhs = Nothing,
-                                  Syntax.bitwiseAndRhs = Syntax.ShiftExpression {
-                                    Syntax.shiftExpressionLhs = Nothing,
-                                    Syntax.shiftExpressionRhs = Syntax.Sum {
-                                      Syntax.sumLhs = Nothing,
-                                      Syntax.sumRhs = Syntax.Term {
-                                        Syntax.termLhs = Nothing,
-                                        Syntax.termRhs = (Syntax.FactorSimple (Syntax.Power {
-                                          Syntax.powerLhs = Syntax.AwaitPrimary {
-                                            Syntax.awaitPrimaryAwait = False,
-                                            Syntax.awaitPrimaryPrimary = (Syntax.PrimarySimple (Syntax.AtomName className))},
-                                          Syntax.powerRhs = Nothing}))}}}}}},
-                            Syntax.comparisonRhs = []})]]))])]))
-          eqMethod =
-                  Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-                    Syntax.functionDefinitionDecorators = Nothing,
-                    Syntax.functionDefinitionRaw = Syntax.FunctionDefRaw {
-                      Syntax.functionDefRawAsync = False,
-                      Syntax.functionDefRawName = (Syntax.Name "__eq__"),
-                      Syntax.functionDefRawTypeParams = [],
-                      Syntax.functionDefRawParams = (Just selfOtherParams),
-                      Syntax.functionDefRawReturnType = Nothing,
-                      Syntax.functionDefRawFuncTypeComment = Nothing,
-                      Syntax.functionDefRawBlock = (indentedBlock Nothing [
-                        [
-                          returnIsinstance]])}}))
-          returnHash =
-                  pySimpleStatementToPyStatement (Syntax.SimpleStatementReturn (Syntax.ReturnStatement [
-                    Syntax.StarExpressionSimple (functionCall (Syntax.PrimarySimple (Syntax.AtomName (Syntax.Name "hash"))) [
-                      doubleQuotedString classNameStr])]))
-          hashMethod =
-                  Syntax.StatementCompound (Syntax.CompoundStatementFunction (Syntax.FunctionDefinition {
-                    Syntax.functionDefinitionDecorators = Nothing,
-                    Syntax.functionDefinitionRaw = Syntax.FunctionDefRaw {
-                      Syntax.functionDefRawAsync = False,
-                      Syntax.functionDefRawName = (Syntax.Name "__hash__"),
-                      Syntax.functionDefRawTypeParams = [],
-                      Syntax.functionDefRawParams = (Just selfOnlyParams),
-                      Syntax.functionDefRawReturnType = Nothing,
-                      Syntax.functionDefRawFuncTypeComment = Nothing,
-                      Syntax.functionDefRawBlock = (indentedBlock Nothing [
-                        [
-                          returnHash]])}}))
-      in [
-        slotsStmt,
-        eqMethod,
-        hashMethod]
diff --git a/src/main/haskell/Hydra/Query.hs b/src/main/haskell/Hydra/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Query.hs
+++ /dev/null
@@ -1,206 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A model for language-agnostic graph pattern queries
-
-module Hydra.Query where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | One of several comparison operators
-data ComparisonConstraint =
-  ComparisonConstraintEqual |
-  ComparisonConstraintNotEqual |
-  ComparisonConstraintLessThan |
-  ComparisonConstraintGreaterThan |
-  ComparisonConstraintLessThanOrEqual |
-  ComparisonConstraintGreaterThanOrEqual
-  deriving (Eq, Ord, Read, Show)
-_ComparisonConstraint = Core.Name "hydra.query.ComparisonConstraint"
-_ComparisonConstraint_equal = Core.Name "equal"
-_ComparisonConstraint_notEqual = Core.Name "notEqual"
-_ComparisonConstraint_lessThan = Core.Name "lessThan"
-_ComparisonConstraint_greaterThan = Core.Name "greaterThan"
-_ComparisonConstraint_lessThanOrEqual = Core.Name "lessThanOrEqual"
-_ComparisonConstraint_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
--- | An abstract edge based on a record type
-data Edge =
-  Edge {
-    -- | The name of a record type, for which the edge also specifies an out- and an in- projection
-    edgeType :: Core.Name,
-    -- | The field representing the out-projection of the edge. Defaults to 'out'.
-    edgeOut :: (Maybe Core.Name),
-    -- | The field representing the in-projection of the edge. Defaults to 'in'.
-    edgeIn :: (Maybe Core.Name)}
-  deriving (Eq, Ord, Read, Show)
-_Edge = Core.Name "hydra.query.Edge"
-_Edge_type = Core.Name "type"
-_Edge_out = Core.Name "out"
-_Edge_in = Core.Name "in"
--- | A query pattern which matches within a designated component subgraph
-data GraphPattern =
-  GraphPattern {
-    -- | The name of the component graph
-    graphPatternGraph :: Core.Name,
-    -- | The patterns to match within the subgraph
-    graphPatternPatterns :: [Pattern]}
-  deriving (Eq, Ord, Read, Show)
-_GraphPattern = Core.Name "hydra.query.GraphPattern"
-_GraphPattern_graph = Core.Name "graph"
-_GraphPattern_patterns = Core.Name "patterns"
--- | A node in a query expression; it may be a term, a variable, or a wildcard
-data Node =
-  -- | A graph term; an expression which is valid in the graph being matched
-  NodeTerm Core.Term |
-  -- | A query variable, not to be confused with a variable term
-  NodeVariable Variable |
-  -- | An anonymous variable which we do not care to join across patterns
-  NodeWildcard
-  deriving (Eq, Ord, Read, Show)
-_Node = Core.Name "hydra.query.Node"
-_Node_term = Core.Name "term"
-_Node_variable = Core.Name "variable"
-_Node_wildcard = Core.Name "wildcard"
--- | A query path
-data Path =
-  -- | A path given by a single step
-  PathStep Step |
-  -- | A path given by a regular expression quantifier applied to another path
-  PathRegex RegexSequence |
-  -- | A path given by the inverse of another path
-  PathInverse Path
-  deriving (Eq, Ord, Read, Show)
-_Path = Core.Name "hydra.query.Path"
-_Path_step = Core.Name "step"
-_Path_regex = Core.Name "regex"
-_Path_inverse = Core.Name "inverse"
--- | A declared equivalence between two abstract paths in a graph
-data PathEquation =
-  PathEquation {
-    -- | The left-hand side of the equation
-    pathEquationLeft :: Path,
-    -- | The right-hand side of the equation
-    pathEquationRight :: Path}
-  deriving (Eq, Ord, Read, Show)
-_PathEquation = Core.Name "hydra.query.PathEquation"
-_PathEquation_left = Core.Name "left"
-_PathEquation_right = Core.Name "right"
--- | A query pattern
-data Pattern =
-  -- | A subject/predicate/object pattern
-  PatternTriple TriplePattern |
-  -- | The negation of another pattern
-  PatternNegation Pattern |
-  -- | The conjunction ('and') of several other patterns
-  PatternConjunction [Pattern] |
-  -- | The disjunction (inclusive 'or') of several other patterns
-  PatternDisjunction [Pattern] |
-  -- | A pattern which matches within a named subgraph
-  PatternGraph GraphPattern
-  deriving (Eq, Ord, Read, Show)
-_Pattern = Core.Name "hydra.query.Pattern"
-_Pattern_triple = Core.Name "triple"
-_Pattern_negation = Core.Name "negation"
-_Pattern_conjunction = Core.Name "conjunction"
-_Pattern_disjunction = Core.Name "disjunction"
-_Pattern_graph = Core.Name "graph"
--- | A pattern which, if it matches in a given graph, implies that another pattern must also match. Query variables are shared between the two patterns.
-data PatternImplication =
-  PatternImplication {
-    -- | The pattern which, if it matches, triggers the constraint
-    patternImplicationAntecedent :: Pattern,
-    -- | The pattern which must also match when the antecedent matches
-    patternImplicationConsequent :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-_PatternImplication = Core.Name "hydra.query.PatternImplication"
-_PatternImplication_antecedent = Core.Name "antecedent"
-_PatternImplication_consequent = Core.Name "consequent"
--- | A SELECT-style graph pattern matching query
-data Query =
-  Query {
-    -- | The variables selected by the query
-    queryVariables :: [Variable],
-    -- | The patterns to be matched
-    queryPatterns :: [Pattern]}
-  deriving (Eq, Ord, Read, Show)
-_Query = Core.Name "hydra.query.Query"
-_Query_variables = Core.Name "variables"
-_Query_patterns = Core.Name "patterns"
--- | A range from min to max, inclusive
-data Range =
-  Range {
-    -- | The minimum value (inclusive)
-    rangeMin :: Int,
-    -- | The maximum value (inclusive)
-    rangeMax :: Int}
-  deriving (Eq, Ord, Read, Show)
-_Range = Core.Name "hydra.query.Range"
-_Range_min = Core.Name "min"
-_Range_max = Core.Name "max"
--- | A regular expression quantifier
-data RegexQuantifier =
-  -- | No quantifier; matches a single occurrence
-  RegexQuantifierOne |
-  -- | The ? quanifier; matches zero or one occurrence
-  RegexQuantifierZeroOrOne |
-  -- | The * quantifier; matches any number of occurrences
-  RegexQuantifierZeroOrMore |
-  -- | The + quantifier; matches one or more occurrences
-  RegexQuantifierOneOrMore |
-  -- | The {n} quantifier; matches exactly n occurrences
-  RegexQuantifierExactly Int |
-  -- | The {n,} quantifier; matches at least n occurrences
-  RegexQuantifierAtLeast Int |
-  -- | The {n, m} quantifier; matches between n and m (inclusive) occurrences
-  RegexQuantifierRange Range
-  deriving (Eq, Ord, Read, Show)
-_RegexQuantifier = Core.Name "hydra.query.RegexQuantifier"
-_RegexQuantifier_one = Core.Name "one"
-_RegexQuantifier_zeroOrOne = Core.Name "zeroOrOne"
-_RegexQuantifier_zeroOrMore = Core.Name "zeroOrMore"
-_RegexQuantifier_oneOrMore = Core.Name "oneOrMore"
-_RegexQuantifier_exactly = Core.Name "exactly"
-_RegexQuantifier_atLeast = Core.Name "atLeast"
-_RegexQuantifier_range = Core.Name "range"
--- | A path with a regex quantifier
-data RegexSequence =
-  RegexSequence {
-    -- | The path to which the quantifier applies
-    regexSequencePath :: Path,
-    -- | The quantifier
-    regexSequenceQuantifier :: RegexQuantifier}
-  deriving (Eq, Ord, Read, Show)
-_RegexSequence = Core.Name "hydra.query.RegexSequence"
-_RegexSequence_path = Core.Name "path"
-_RegexSequence_quantifier = Core.Name "quantifier"
--- | An atomic function as part of a query. When applied to a graph, steps are typed by function types.
-data Step =
-  -- | An out-to-in traversal of an abstract edge
-  StepEdge Edge |
-  -- | A projection from a record through one of its fields
-  StepProject Core.Projection |
-  -- | A comparison of two terms
-  StepCompare ComparisonConstraint
-  deriving (Eq, Ord, Read, Show)
-_Step = Core.Name "hydra.query.Step"
-_Step_edge = Core.Name "edge"
-_Step_project = Core.Name "project"
-_Step_compare = Core.Name "compare"
--- | A subject/predicate/object pattern
-data TriplePattern =
-  TriplePattern {
-    -- | The subject of the pattern
-    triplePatternSubject :: Node,
-    -- | The predicate (property) of the pattern
-    triplePatternPredicate :: Path,
-    -- | The object of the pattern
-    triplePatternObject :: Node}
-  deriving (Eq, Ord, Read, Show)
-_TriplePattern = Core.Name "hydra.query.TriplePattern"
-_TriplePattern_subject = Core.Name "subject"
-_TriplePattern_predicate = Core.Name "predicate"
-_TriplePattern_object = Core.Name "object"
--- | A query variable
-newtype Variable =
-  Variable {
-    unVariable :: String}
-  deriving (Eq, Ord, Read, Show)
-_Variable = Core.Name "hydra.query.Variable"
diff --git a/src/main/haskell/Hydra/Rdf/Serde.hs b/src/main/haskell/Hydra/Rdf/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rdf/Serde.hs
+++ /dev/null
@@ -1,115 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Serialization functions for converting RDF graphs to N-Triples format expressions
-
-module Hydra.Rdf.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Rdf.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Escape a single IRI character code to a string
-escapeIriChar :: Int -> String
-escapeIriChar c =
-    Logic.ifElse (Logic.or (Equality.gte c 128) (Logic.or (Equality.lte c 32) (Logic.or (Equality.equal c 60) (Logic.or (Equality.equal c 62) (Logic.or (Equality.equal c 34) (Logic.or (Equality.equal c 123) (Logic.or (Equality.equal c 125) (Logic.or (Equality.equal c 124) (Logic.or (Equality.equal c 94) (Logic.or (Equality.equal c 96) (Equality.equal c 92))))))))))) "?" (Strings.fromList [
-      c])
-
--- | Escape a string for use in an IRI. Non-printable and special characters are replaced with ?
-escapeIriStr :: String -> String
-escapeIriStr s = Strings.cat (Lists.map escapeIriChar (Strings.toList s))
-
--- | Escape a single literal character code to a string
-escapeLiteralChar :: Int -> String
-escapeLiteralChar c =
-    Logic.ifElse (Equality.gte c 128) "?" (Logic.ifElse (Equality.equal c 34) "\\\"" (Logic.ifElse (Equality.equal c 92) "\\\\" (Logic.ifElse (Equality.equal c 10) "\\n" (Logic.ifElse (Equality.equal c 13) "\\r" (Strings.fromList [
-      c])))))
-
--- | Escape a string for use in an N-Triples literal
-escapeLiteralString :: String -> String
-escapeLiteralString s = Strings.cat (Lists.map escapeLiteralChar (Strings.toList s))
-
--- | Convert an RDF graph to an N-Triples string
-rdfGraphToNtriples :: Syntax.Graph -> String
-rdfGraphToNtriples g = Serialization.printExpr (writeGraph g)
-
--- | Convert a blank node to an expression
-writeBlankNode :: Syntax.BlankNode -> Ast.Expr
-writeBlankNode bnode =
-    Serialization.noSep [
-      Serialization.cst "_:",
-      (Serialization.cst (Syntax.unBlankNode bnode))]
-
--- | Convert an RDF graph to an expression
-writeGraph :: Syntax.Graph -> Ast.Expr
-writeGraph g = Serialization.newlineSep (Lists.map writeTriple (Sets.toList (Syntax.unGraph g)))
-
--- | Convert an IRI to an expression
-writeIri :: Syntax.Iri -> Ast.Expr
-writeIri iri =
-    Serialization.noSep [
-      Serialization.cst "<",
-      (Serialization.cst (escapeIriStr (Syntax.unIri iri))),
-      (Serialization.cst ">")]
-
--- | Convert a language tag to an expression
-writeLanguageTag :: Syntax.LanguageTag -> Ast.Expr
-writeLanguageTag lang =
-    Serialization.noSep [
-      Serialization.cst "@",
-      (Serialization.cst (Syntax.unLanguageTag lang))]
-
--- | Convert a literal to an expression
-writeLiteral :: Syntax.Literal -> Ast.Expr
-writeLiteral lit =
-
-      let lex = Syntax.literalLexicalForm lit
-          dt = Syntax.literalDatatypeIri lit
-          lang = Syntax.literalLanguageTag lit
-          lexExpr =
-                  Serialization.cst (Strings.cat [
-                    "\"",
-                    (escapeLiteralString lex),
-                    "\""])
-          suffix =
-                  Maybes.maybe (Serialization.noSep [
-                    Serialization.cst "^^",
-                    (writeIri dt)]) writeLanguageTag lang
-      in (Serialization.noSep [
-        lexExpr,
-        suffix])
-
--- | Convert a node to an expression
-writeNode :: Syntax.Node -> Ast.Expr
-writeNode n =
-    case n of
-      Syntax.NodeIri v0 -> writeIri v0
-      Syntax.NodeBnode v0 -> writeBlankNode v0
-      Syntax.NodeLiteral v0 -> writeLiteral v0
-
--- | Convert a resource to an expression
-writeResource :: Syntax.Resource -> Ast.Expr
-writeResource r =
-    case r of
-      Syntax.ResourceIri v0 -> writeIri v0
-      Syntax.ResourceBnode v0 -> writeBlankNode v0
-
--- | Convert a triple to an expression
-writeTriple :: Syntax.Triple -> Ast.Expr
-writeTriple t =
-
-      let subj = Syntax.tripleSubject t
-          pred = Syntax.triplePredicate t
-          obj = Syntax.tripleObject t
-      in (Serialization.spaceSep [
-        writeResource subj,
-        (writeIri pred),
-        (writeNode obj),
-        (Serialization.cst ".")])
diff --git a/src/main/haskell/Hydra/Rdf/Syntax.hs b/src/main/haskell/Hydra/Rdf/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rdf/Syntax.hs
+++ /dev/null
@@ -1,186 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | An RDF 1.1 syntax model
-
-module Hydra.Rdf.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.Map as M
-import qualified Data.Set as S
-
-newtype BlankNode =
-  BlankNode {
-    unBlankNode :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_BlankNode = Core.Name "hydra.rdf.syntax.BlankNode"
-
--- | Stand-in for rdfs:Class
-newtype RdfsClass =
-  RdfsClass {
-    unRdfsClass :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_RdfsClass = Core.Name "hydra.rdf.syntax.RdfsClass"
-
-newtype Dataset =
-  Dataset {
-    unDataset :: (S.Set Quad)}
-  deriving (Eq, Ord, Read, Show)
-
-_Dataset = Core.Name "hydra.rdf.syntax.Dataset"
-
--- | A graph of RDF statements together with a distinguished subject and/or object node
-data Description =
-  Description {
-    descriptionSubject :: Node,
-    descriptionGraph :: Graph}
-  deriving (Eq, Ord, Read, Show)
-
-_Description = Core.Name "hydra.rdf.syntax.Description"
-
-_Description_subject = Core.Name "subject"
-
-_Description_graph = Core.Name "graph"
-
-newtype Graph =
-  Graph {
-    unGraph :: (S.Set Triple)}
-  deriving (Eq, Ord, Read, Show)
-
-_Graph = Core.Name "hydra.rdf.syntax.Graph"
-
--- | An Internationalized Resource Identifier
-newtype Iri =
-  Iri {
-    unIri :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Iri = Core.Name "hydra.rdf.syntax.Iri"
-
--- | An IRI or a literal; this type is a convenience for downstream models like SHACL which may exclude blank nodes
-data IriOrLiteral =
-  IriOrLiteralIri Iri |
-  IriOrLiteralLiteral Literal
-  deriving (Eq, Ord, Read, Show)
-
-_IriOrLiteral = Core.Name "hydra.rdf.syntax.IriOrLiteral"
-
-_IriOrLiteral_iri = Core.Name "iri"
-
-_IriOrLiteral_literal = Core.Name "literal"
-
--- | A convenience type which provides at most one string value per language, and optionally a value without a language
-newtype LangStrings =
-  LangStrings {
-    unLangStrings :: (M.Map (Maybe LanguageTag) String)}
-  deriving (Eq, Ord, Read, Show)
-
-_LangStrings = Core.Name "hydra.rdf.syntax.LangStrings"
-
--- | A BCP47 language tag
-newtype LanguageTag =
-  LanguageTag {
-    unLanguageTag :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_LanguageTag = Core.Name "hydra.rdf.syntax.LanguageTag"
-
--- | A value such as a string, number, or date
-data Literal =
-  Literal {
-    -- | a Unicode string, which should be in Normal Form C
-    literalLexicalForm :: String,
-    -- | an IRI identifying a datatype that determines how the lexical form maps to a literal value
-    literalDatatypeIri :: Iri,
-    -- | An optional language tag, present if and only if the datatype IRI is http://www.w3.org/1999/02/22-rdf-syntax-ns#langString
-    literalLanguageTag :: (Maybe LanguageTag)}
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.rdf.syntax.Literal"
-
-_Literal_lexicalForm = Core.Name "lexicalForm"
-
-_Literal_datatypeIri = Core.Name "datatypeIri"
-
-_Literal_languageTag = Core.Name "languageTag"
-
-data Node =
-  NodeIri Iri |
-  NodeBnode BlankNode |
-  NodeLiteral Literal
-  deriving (Eq, Ord, Read, Show)
-
-_Node = Core.Name "hydra.rdf.syntax.Node"
-
-_Node_iri = Core.Name "iri"
-
-_Node_bnode = Core.Name "bnode"
-
-_Node_literal = Core.Name "literal"
-
--- | A type representing an RDF property, and encapsulating its domain, range, and subclass relationships
-data Property =
-  Property {
-    -- | State that any resource that has a given property is an instance of one or more classes
-    propertyDomain :: (S.Set RdfsClass),
-    -- | States that the values of a property are instances of one or more classes
-    propertyRange :: (S.Set RdfsClass),
-    propertySubPropertyOf :: (S.Set Property)}
-  deriving (Eq, Ord, Read, Show)
-
-_Property = Core.Name "hydra.rdf.syntax.Property"
-
-_Property_domain = Core.Name "domain"
-
-_Property_range = Core.Name "range"
-
-_Property_subPropertyOf = Core.Name "subPropertyOf"
-
--- | An RDF triple with an optional named graph component
-data Quad =
-  Quad {
-    quadSubject :: Resource,
-    quadPredicate :: Iri,
-    quadObject :: Node,
-    quadGraph :: (Maybe Iri)}
-  deriving (Eq, Ord, Read, Show)
-
-_Quad = Core.Name "hydra.rdf.syntax.Quad"
-
-_Quad_subject = Core.Name "subject"
-
-_Quad_predicate = Core.Name "predicate"
-
-_Quad_object = Core.Name "object"
-
-_Quad_graph = Core.Name "graph"
-
-data Resource =
-  ResourceIri Iri |
-  ResourceBnode BlankNode
-  deriving (Eq, Ord, Read, Show)
-
-_Resource = Core.Name "hydra.rdf.syntax.Resource"
-
-_Resource_iri = Core.Name "iri"
-
-_Resource_bnode = Core.Name "bnode"
-
--- | An RDF triple defined by a subject, predicate, and object
-data Triple =
-  Triple {
-    tripleSubject :: Resource,
-    triplePredicate :: Iri,
-    tripleObject :: Node}
-  deriving (Eq, Ord, Read, Show)
-
-_Triple = Core.Name "hydra.rdf.syntax.Triple"
-
-_Triple_subject = Core.Name "subject"
-
-_Triple_predicate = Core.Name "predicate"
-
-_Triple_object = Core.Name "object"
diff --git a/src/main/haskell/Hydra/Rdf/Utils.hs b/src/main/haskell/Hydra/Rdf/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rdf/Utils.hs
+++ /dev/null
@@ -1,183 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Utility functions for working with RDF graphs and descriptions
-
-module Hydra.Rdf.Utils where
-
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Rdf.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Convert a list of descriptions to an RDF graph
-descriptionsToGraph :: [Syntax.Description] -> Syntax.Graph
-descriptionsToGraph ds = Syntax.Graph (Sets.fromList (triplesOf ds))
-
--- | Create an empty description with a given node
-emptyDescription :: Syntax.Node -> Syntax.Description
-emptyDescription node =
-    Syntax.Description {
-      Syntax.descriptionSubject = node,
-      Syntax.descriptionGraph = emptyRdfGraph}
-
--- | An empty LangStrings value
-emptyLangStrings :: Syntax.LangStrings
-emptyLangStrings = Syntax.LangStrings Maps.empty
-
--- | An empty RDF graph
-emptyRdfGraph :: Syntax.Graph
-emptyRdfGraph = Syntax.Graph Sets.empty
-
--- | Encode a Hydra literal as an RDF literal
-encodeLiteral :: Core.Literal -> Syntax.Literal
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBinary v0 -> Syntax.Literal {
-        Syntax.literalLexicalForm = (Literals.binaryToString v0),
-        Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "base64Binary"),
-        Syntax.literalLanguageTag = Nothing}
-      Core.LiteralBoolean v0 -> Syntax.Literal {
-        Syntax.literalLexicalForm = (Logic.ifElse v0 "true" "false"),
-        Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "boolean"),
-        Syntax.literalLanguageTag = Nothing}
-      Core.LiteralFloat v0 -> case v0 of
-        Core.FloatValueBigfloat v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showBigfloat v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "decimal"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.FloatValueFloat32 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showFloat32 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "float"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.FloatValueFloat64 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showFloat64 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "double"),
-          Syntax.literalLanguageTag = Nothing}
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueBigint v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showBigint v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "integer"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueInt8 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showInt8 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "byte"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueInt16 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showInt16 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "short"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueInt32 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showInt32 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "int"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueInt64 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showInt64 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "long"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueUint8 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showUint8 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "unsignedByte"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueUint16 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showUint16 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "unsignedShort"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueUint32 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showUint32 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "unsignedInt"),
-          Syntax.literalLanguageTag = Nothing}
-        Core.IntegerValueUint64 v1 -> Syntax.Literal {
-          Syntax.literalLexicalForm = (Literals.showUint64 v1),
-          Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "unsignedLong"),
-          Syntax.literalLanguageTag = Nothing}
-      Core.LiteralString v0 -> Syntax.Literal {
-        Syntax.literalLexicalForm = v0,
-        Syntax.literalDatatypeIri = (xmlSchemaDatatypeIri "string"),
-        Syntax.literalLanguageTag = Nothing}
-
--- | Create triples from a subject, predicate, and list of object nodes
-forObjects :: Syntax.Resource -> Syntax.Iri -> [Syntax.Node] -> [Syntax.Triple]
-forObjects subj pred objs =
-    Lists.map (\obj -> Syntax.Triple {
-      Syntax.tripleSubject = subj,
-      Syntax.triplePredicate = pred,
-      Syntax.tripleObject = obj}) objs
-
--- | Construct an IRI from a namespace and local name
-iri :: String -> String -> Syntax.Iri
-iri ns local = Syntax.Iri (Strings.cat2 ns local)
-
--- | Construct a key IRI from a local name
-keyIri :: String -> Syntax.Iri
-keyIri local = iri "urn:key:" local
-
--- | The key used for tracking blank node counters
-key_rdfBlankNodeCounter :: Core.Name
-key_rdfBlankNodeCounter = Core.Name "rdfBlankNodeCounter"
-
--- | Merge a list of RDF graphs into a single graph
-mergeGraphs :: [Syntax.Graph] -> Syntax.Graph
-mergeGraphs graphs = Syntax.Graph (Sets.unions (Lists.map Syntax.unGraph graphs))
-
--- | Convert a Hydra name to an RDF IRI
-nameToIri :: Core.Name -> Syntax.Iri
-nameToIri name = Syntax.Iri (Strings.cat2 "urn:" (Core.unName name))
-
--- | Generate the next blank node and an updated context
-nextBlankNode :: Context.Context -> (Syntax.Resource, Context.Context)
-nextBlankNode cx =
-
-      let result = Annotations.nextCount key_rdfBlankNodeCounter cx
-          count = Pairs.first result
-          cx_ = Pairs.second result
-      in (Syntax.ResourceBnode (Syntax.BlankNode (Strings.cat2 "b" (Literals.showInt32 count))), cx_)
-
--- | Construct a property IRI from a record name and field name
-propertyIri :: Core.Name -> Core.Name -> Syntax.Iri
-propertyIri rname fname =
-
-      let qualName = Names.qualifyName rname
-          gname = Packaging.qualifiedNameNamespace qualName
-          local_ = Packaging.qualifiedNameLocal qualName
-      in (Syntax.Iri (Strings.cat [
-        "urn:",
-        (Maybes.maybe "" Packaging.unNamespace gname),
-        "#",
-        (Formatting.decapitalize local_),
-        (Formatting.capitalize (Core.unName fname))]))
-
--- | Construct an RDF namespace IRI
-rdfIri :: String -> Syntax.Iri
-rdfIri local = iri "http://www.w3.org/1999/02/22-rdf-syntax-ns#" local
-
--- | Convert a resource to a node
-resourceToNode :: Syntax.Resource -> Syntax.Node
-resourceToNode r =
-    case r of
-      Syntax.ResourceIri v0 -> Syntax.NodeIri v0
-      Syntax.ResourceBnode v0 -> Syntax.NodeBnode v0
-
--- | Extract subjects from a list of descriptions
-subjectsOf :: [Syntax.Description] -> [Syntax.Node]
-subjectsOf descs = Lists.map Syntax.descriptionSubject descs
-
--- | Extract all triples from a list of descriptions
-triplesOf :: [Syntax.Description] -> [Syntax.Triple]
-triplesOf descs = Lists.concat (Lists.map (\d -> Sets.toList (Syntax.unGraph (Syntax.descriptionGraph d))) descs)
-
--- | Construct an XML Schema datatype IRI
-xmlSchemaDatatypeIri :: String -> Syntax.Iri
-xmlSchemaDatatypeIri local = iri "http://www.w3.org/2001/XMLSchema#" local
diff --git a/src/main/haskell/Hydra/Reduction.hs b/src/main/haskell/Hydra/Reduction.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Reduction.hs
+++ /dev/null
@@ -1,548 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Functions for reducing terms and types, i.e. performing computations.
-
-module Hydra.Reduction where
-import qualified Hydra.Arity as Arity
-import qualified Hydra.Checking as Checking
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Encode.Core as EncodeCore
-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.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Errors as ShowErrors
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Alpha convert a variable in a term
-alphaConvert :: Core.Name -> Core.Name -> Core.Term -> Core.Term
-alphaConvert vold vnew term = Variables.replaceFreeTermVariable vold (Core.TermVariable vnew) term
--- | Eagerly beta-reduce a type by substituting type arguments into type lambdas
-betaReduceType :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error Core.Type
-betaReduceType cx graph typ =
-
-      let reduceApp =
-              \app ->
-                let lhs = Core.applicationTypeFunction app
-                    rhs = Core.applicationTypeArgument app
-                in case lhs of
-                  Core.TypeAnnotated v0 -> Eithers.bind (reduceApp (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.annotatedTypeBody v0),
-                    Core.applicationTypeArgument = rhs})) (\a -> Right (Core.TypeAnnotated (Core.AnnotatedType {
-                    Core.annotatedTypeBody = a,
-                    Core.annotatedTypeAnnotation = (Core.annotatedTypeAnnotation v0)})))
-                  Core.TypeForall v0 -> betaReduceType cx graph (Variables.replaceFreeTypeVariable (Core.forallTypeParameter v0) rhs (Core.forallTypeBody v0))
-                  Core.TypeVariable v0 -> Eithers.bind (Resolution.requireType cx graph v0) (\t_ -> betaReduceType cx graph (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = t_,
-                    Core.applicationTypeArgument = rhs})))
-          mapExpr =
-                  \recurse -> \t ->
-                    let findApp =
-                            \r -> case r of
-                              Core.TypeApplication v0 -> reduceApp v0
-                              _ -> Right r
-                    in (Eithers.bind (recurse t) (\r -> findApp r))
-      in (Rewriting.rewriteTypeM mapExpr typ)
--- | Apply the special rules:
--- |     ((\x.e1) e2) == e1, where x does not appear free in e1
--- |   and
--- |      ((\x.e1) e2) = e1[x/e2]
--- | These are both limited forms of beta reduction which help to "clean up" a term without fully evaluating it.
-contractTerm :: Core.Term -> Core.Term
-contractTerm term =
-
-      let rewrite =
-              \recurse -> \t ->
-                let rec = recurse t
-                in case rec of
-                  Core.TermApplication v0 ->
-                    let lhs = Core.applicationFunction v0
-                        rhs = Core.applicationArgument v0
-                    in case (Strip.deannotateTerm lhs) of
-                      Core.TermLambda v1 ->
-                        let v = Core.lambdaParameter v1
-                            body = Core.lambdaBody v1
-                        in (Logic.ifElse (Variables.isFreeVariableInTerm v body) body (Variables.replaceFreeTermVariable v rhs body))
-                      _ -> rec
-                  _ -> rec
-      in (Rewriting.rewriteTerm rewrite term)
-countPrimitiveInvocations :: Bool
-countPrimitiveInvocations = True
--- | Recursively transform terms to eliminate partial application, e.g. 'add 42' becomes '\x.add 42 x'. Uses the Graph to look up types for arity calculation. Bare primitives and variables are NOT expanded; eliminations and partial applications are. This version properly tracks the Graph through nested scopes.
-etaExpandTerm :: Graph.Graph -> Core.Term -> Core.Term
-etaExpandTerm tx0 term0 =
-
-      let primTypes =
-              Maps.fromList (Lists.map (\_gpt_p -> (Graph.primitiveName _gpt_p, (Graph.primitiveTypeScheme _gpt_p))) (Maps.elems (Graph.graphPrimitives tx0)))
-          termArityWithContext =
-                  \tx -> \term -> case term of
-                    Core.TermAnnotated v0 -> termArityWithContext tx (Core.annotatedTermBody v0)
-                    Core.TermApplication v0 -> Math.sub (termArityWithContext tx (Core.applicationFunction v0)) 1
-                    Core.TermCases _ -> 1
-                    Core.TermLambda _ -> 0
-                    Core.TermProject _ -> 1
-                    Core.TermUnwrap _ -> 1
-                    Core.TermLet v0 -> termArityWithContext (Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) tx v0) (Core.letBody v0)
-                    Core.TermTypeLambda v0 -> termArityWithContext (Scoping.extendGraphForTypeLambda tx v0) (Core.typeLambdaBody v0)
-                    Core.TermTypeApplication v0 -> termArityWithContext tx (Core.typeApplicationTermBody v0)
-                    Core.TermVariable v0 -> Maybes.maybe (Maybes.maybe 0 Arity.typeSchemeArity (Maps.lookup v0 primTypes)) Arity.typeArity (Maybes.map Scoping.typeSchemeToFType (Maps.lookup v0 (Graph.graphBoundTypes tx)))
-                    _ -> 0
-          domainTypes =
-                  \n -> \mt -> Logic.ifElse (Equality.lte n 0) [] (Maybes.maybe (Lists.map (\_ -> Nothing) (Math.range 1 n)) (\typ -> case typ of
-                    Core.TypeFunction v0 -> Lists.cons (Just (Core.functionTypeDomain v0)) (domainTypes (Math.sub n 1) (Just (Core.functionTypeCodomain v0)))
-                    Core.TypeAnnotated v0 -> domainTypes n (Just (Core.annotatedTypeBody v0))
-                    Core.TypeApplication v0 -> domainTypes n (Just (Core.applicationTypeFunction v0))
-                    Core.TypeForall _ -> Lists.map (\_2 -> Nothing) (Math.range 1 n)
-                    _ -> Lists.map (\_ -> Nothing) (Math.range 1 n)) mt)
-          peelFunctionDomains =
-                  \mtyp -> \n -> Logic.ifElse (Equality.lte n 0) mtyp (Maybes.maybe Nothing (\typ -> case typ of
-                    Core.TypeFunction v0 -> peelFunctionDomains (Just (Core.functionTypeCodomain v0)) (Math.sub n 1)
-                    Core.TypeAnnotated v0 -> peelFunctionDomains (Just (Core.annotatedTypeBody v0)) n
-                    Core.TypeApplication v0 -> peelFunctionDomains (Just (Core.applicationTypeFunction v0)) n
-                    Core.TypeForall _ -> Nothing
-                    _ -> Nothing) mtyp)
-          expand =
-                  \alwaysPad -> \args -> \arity -> \headTyp -> \head ->
-                    let applied =
-                            Lists.foldl (\lhs -> \arg -> Core.TermApplication (Core.Application {
-                              Core.applicationFunction = lhs,
-                              Core.applicationArgument = arg})) head args
-                        numArgs = Lists.length args
-                        needed = Math.sub arity numArgs
-                    in (Logic.ifElse (Logic.and (Equality.gt needed 0) (Logic.or alwaysPad (Equality.gt numArgs 0))) (
-                      let indices = Math.range 1 needed
-                          remainingType = peelFunctionDomains headTyp numArgs
-                          domains = domainTypes needed remainingType
-                          codomainType = peelFunctionDomains remainingType needed
-                          fullyAppliedRaw =
-                                  Lists.foldl (\body -> \i ->
-                                    let vn = Core.Name (Strings.cat2 "v" (Literals.showInt32 i))
-                                    in (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = body,
-                                      Core.applicationArgument = (Core.TermVariable vn)}))) applied indices
-                          fullyApplied =
-                                  Maybes.maybe fullyAppliedRaw (\ct -> Core.TermAnnotated (Core.AnnotatedTerm {
-                                    Core.annotatedTermBody = fullyAppliedRaw,
-                                    Core.annotatedTermAnnotation = (Maps.singleton (Core.Name "type") (EncodeCore.type_ ct))})) codomainType
-                          indexedDomains = Lists.zip indices domains
-                      in (Lists.foldl (\body -> \idPair ->
-                        let i = Pairs.first idPair
-                            dom = Pairs.second idPair
-                            vn = Core.Name (Strings.cat2 "v" (Literals.showInt32 i))
-                        in (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = vn,
-                          Core.lambdaDomain = dom,
-                          Core.lambdaBody = body}))) fullyApplied (Lists.reverse indexedDomains))) applied)
-          rewriteWithArgs =
-                  \args -> \tx -> \term ->
-                    let recurse = \tx1 -> \term1 -> rewriteWithArgs [] tx1 term1
-                        termHeadType =
-                                \tx2 -> \trm2 -> case trm2 of
-                                  Core.TermAnnotated v0 -> termHeadType tx2 (Core.annotatedTermBody v0)
-                                  Core.TermLambda _ -> Nothing
-                                  Core.TermCases _ -> Nothing
-                                  Core.TermProject _ -> Nothing
-                                  Core.TermUnwrap _ -> Nothing
-                                  Core.TermLet v0 -> termHeadType (Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) tx2 v0) (Core.letBody v0)
-                                  Core.TermTypeLambda v0 -> termHeadType (Scoping.extendGraphForTypeLambda tx2 v0) (Core.typeLambdaBody v0)
-                                  Core.TermTypeApplication v0 -> Maybes.bind (termHeadType tx2 (Core.typeApplicationTermBody v0)) (\htyp2 -> case htyp2 of
-                                    Core.TypeForall v1 -> Just (Variables.replaceFreeTypeVariable (Core.forallTypeParameter v1) (Core.typeApplicationTermType v0) (Core.forallTypeBody v1))
-                                    _ -> Just htyp2)
-                                  Core.TermVariable v0 -> Maybes.map Scoping.typeSchemeToFType (Maps.lookup v0 (Graph.graphBoundTypes tx2))
-                                  _ -> Nothing
-                        afterRecursion =
-                                \trm ->
-                                  let arity = termArityWithContext tx trm
-                                      hType = termHeadType tx trm
-                                  in (expand False args arity hType trm)
-                        forField =
-                                \f -> Core.Field {
-                                  Core.fieldName = (Core.fieldName f),
-                                  Core.fieldTerm = (recurse tx (Core.fieldTerm f))}
-                        forCaseBranch =
-                                \f ->
-                                  let branchBody = recurse tx (Core.fieldTerm f)
-                                      arty = termArityWithContext tx branchBody
-                                      branchHType = termHeadType tx branchBody
-                                  in Core.Field {
-                                    Core.fieldName = (Core.fieldName f),
-                                    Core.fieldTerm = (expand True [] arty branchHType branchBody)}
-                        forMap =
-                                \mp ->
-                                  let forPair = \pr -> (recurse tx (Pairs.first pr), (recurse tx (Pairs.second pr)))
-                                  in (Maps.fromList (Lists.map forPair (Maps.toList mp)))
-                    in case term of
-                      Core.TermAnnotated v0 -> afterRecursion (Core.TermAnnotated (Core.AnnotatedTerm {
-                        Core.annotatedTermBody = (recurse tx (Core.annotatedTermBody v0)),
-                        Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)}))
-                      Core.TermApplication v0 ->
-                        let rhs = rewriteWithArgs [] tx (Core.applicationArgument v0)
-                        in (rewriteWithArgs (Lists.cons rhs args) tx (Core.applicationFunction v0))
-                      Core.TermEither v0 -> afterRecursion (Core.TermEither (Eithers.either (\l -> Left (recurse tx l)) (\r -> Right (recurse tx r)) v0))
-                      Core.TermCases v0 ->
-                        let newCs =
-                                Core.CaseStatement {
-                                  Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                                  Core.caseStatementDefault = (Maybes.map (\t1 -> recurse tx t1) (Core.caseStatementDefault v0)),
-                                  Core.caseStatementCases = (Lists.map forCaseBranch (Core.caseStatementCases v0))}
-                            elimTerm = Core.TermCases newCs
-                            elimHeadType =
-                                    Just (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeVariable (Core.caseStatementTypeName v0)),
-                                      Core.functionTypeCodomain = Core.TypeUnit}))
-                        in (expand True args 1 elimHeadType elimTerm)
-                      Core.TermProject v0 -> expand False args 1 Nothing (Core.TermProject v0)
-                      Core.TermUnwrap v0 -> expand False args 1 Nothing (Core.TermUnwrap v0)
-                      Core.TermLambda v0 ->
-                        let tx1 = Scoping.extendGraphForLambda tx v0
-                            body = rewriteWithArgs [] tx1 (Core.lambdaBody v0)
-                            result =
-                                    Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.lambdaParameter v0),
-                                      Core.lambdaDomain = (Core.lambdaDomain v0),
-                                      Core.lambdaBody = body})
-                            arty = termArityWithContext tx result
-                        in (expand False args arty Nothing result)
-                      Core.TermLet v0 ->
-                        let tx1 = Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) tx v0
-                            mapBinding =
-                                    \b -> Core.Binding {
-                                      Core.bindingName = (Core.bindingName b),
-                                      Core.bindingTerm = (rewriteWithArgs [] tx1 (Core.bindingTerm b)),
-                                      Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                            result =
-                                    Core.TermLet (Core.Let {
-                                      Core.letBindings = (Lists.map mapBinding (Core.letBindings v0)),
-                                      Core.letBody = (rewriteWithArgs [] tx1 (Core.letBody v0))})
-                        in (afterRecursion result)
-                      Core.TermList v0 -> afterRecursion (Core.TermList (Lists.map (\el -> recurse tx el) v0))
-                      Core.TermLiteral v0 -> Core.TermLiteral v0
-                      Core.TermMap v0 -> afterRecursion (Core.TermMap (forMap v0))
-                      Core.TermMaybe v0 -> afterRecursion (Core.TermMaybe (Maybes.map (\v -> recurse tx v) v0))
-                      Core.TermPair v0 -> afterRecursion (Core.TermPair (recurse tx (Pairs.first v0), (recurse tx (Pairs.second v0))))
-                      Core.TermRecord v0 -> afterRecursion (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.recordTypeName v0),
-                        Core.recordFields = (Lists.map forField (Core.recordFields v0))}))
-                      Core.TermSet v0 -> afterRecursion (Core.TermSet (Sets.fromList (Lists.map (\el -> recurse tx el) (Sets.toList v0))))
-                      Core.TermTypeApplication v0 -> afterRecursion (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (recurse tx (Core.typeApplicationTermBody v0)),
-                        Core.typeApplicationTermType = (Core.typeApplicationTermType v0)}))
-                      Core.TermTypeLambda v0 ->
-                        let tx1 = Scoping.extendGraphForTypeLambda tx v0
-                            result =
-                                    Core.TermTypeLambda (Core.TypeLambda {
-                                      Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                                      Core.typeLambdaBody = (rewriteWithArgs [] tx1 (Core.typeLambdaBody v0))})
-                        in (afterRecursion result)
-                      Core.TermInject v0 -> afterRecursion (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.injectionTypeName v0),
-                        Core.injectionField = (forField (Core.injectionField v0))}))
-                      Core.TermUnit -> Core.TermUnit
-                      Core.TermVariable v0 ->
-                        let arty = termArityWithContext tx term
-                            varType = Maybes.map Scoping.typeSchemeToFType (Maps.lookup v0 (Graph.graphBoundTypes tx))
-                        in (expand False args arty varType term)
-                      Core.TermWrap v0 -> afterRecursion (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                        Core.wrappedTermBody = (recurse tx (Core.wrappedTermBody v0))}))
-      in (contractTerm (rewriteWithArgs [] tx0 term0))
--- | Recursively transform arbitrary terms like 'add 42' into terms like '\x.add 42 x', eliminating partial application. Variable references are not expanded. This is useful for targets like Python with weaker support for currying than Hydra or Haskell. Note: this is a "trusty" function which assumes the graph is well-formed, i.e. no dangling references. It also assumes that type inference has already been performed. After eta expansion, type inference needs to be performed again, as new, untyped lambdas may have been added.
-etaExpandTypedTerm :: Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error Core.Term
-etaExpandTypedTerm cx tx0 term0 =
-
-      let rewrite =
-              \topLevel -> \forced -> \typeArgs -> \recurse -> \tx -> \term ->
-                let rewriteSpine =
-                        \term2 -> case term2 of
-                          Core.TermAnnotated v0 -> Eithers.bind (rewriteSpine (Core.annotatedTermBody v0)) (\body ->
-                            let ann = Core.annotatedTermAnnotation v0
-                            in (Right (Core.TermAnnotated (Core.AnnotatedTerm {
-                              Core.annotatedTermBody = body,
-                              Core.annotatedTermAnnotation = ann}))))
-                          Core.TermApplication v0 ->
-                            let l = Logic.ifElse False [
-                                  Core.TypeLiteral Core.LiteralTypeString] []
-                            in (Eithers.bind (rewriteSpine (Core.applicationFunction v0)) (\lhs -> Eithers.bind (rewrite True False l recurse tx (Core.applicationArgument v0)) (\rhs -> Right (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = lhs,
-                              Core.applicationArgument = rhs})))))
-                          Core.TermTypeApplication v0 -> Eithers.bind (rewriteSpine (Core.typeApplicationTermBody v0)) (\body ->
-                            let typ = Core.typeApplicationTermType v0
-                            in (Right (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = body,
-                              Core.typeApplicationTermType = typ}))))
-                          _ -> rewrite False False [] recurse tx term2
-                    arityOf =
-                            \tx2 -> \term2 ->
-                              let dflt = Eithers.map (\_tc -> Arity.typeArity (Pairs.first _tc)) (Checking.typeOf cx tx2 [] term2)
-                              in case term2 of
-                                Core.TermAnnotated v0 -> arityOf tx2 (Core.annotatedTermBody v0)
-                                Core.TermCases _ -> Right 1
-                                Core.TermProject _ -> Right 1
-                                Core.TermUnwrap _ -> Right 1
-                                Core.TermLambda v0 ->
-                                  let txl = Scoping.extendGraphForLambda tx2 v0
-                                  in (arityOf txl (Core.lambdaBody v0))
-                                Core.TermLet v0 ->
-                                  let txl = Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) tx2 v0
-                                  in (arityOf txl (Core.letBody v0))
-                                Core.TermTypeApplication v0 -> arityOf tx2 (Core.typeApplicationTermBody v0)
-                                Core.TermTypeLambda v0 ->
-                                  let txt = Scoping.extendGraphForTypeLambda tx2 v0
-                                  in (arityOf txt (Core.typeLambdaBody v0))
-                                Core.TermVariable v0 -> Maybes.maybe (Eithers.map (\_tc -> Arity.typeArity (Pairs.first _tc)) (Checking.typeOf cx tx2 [] (Core.TermVariable v0))) (\t -> Right (Arity.typeArity t)) (Maybes.map Scoping.typeSchemeToFType (Maps.lookup v0 (Graph.graphBoundTypes tx2)))
-                                _ -> dflt
-                    extraVariables = \n -> Lists.map (\i -> Core.Name (Strings.cat2 "v" (Literals.showInt32 i))) (Math.range 1 n)
-                    pad =
-                            \vars -> \body -> Maybes.maybe body (\uc ->
-                              let v0 = Pairs.first uc
-                                  vrest = Pairs.second uc
-                              in (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = v0,
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (pad vrest (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = body,
-                                  Core.applicationArgument = (Core.TermVariable v0)})))}))) (Lists.uncons vars)
-                    padn = \n -> \body -> pad (extraVariables n) body
-                    unwind =
-                            \term2 -> Lists.foldl (\e -> \t -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = e,
-                              Core.typeApplicationTermType = t})) term2 typeArgs
-                    forceExpansion =
-                            \t -> Eithers.bind (Checking.typeOf cx tx [] t) (\typCx ->
-                              let arity = Arity.typeArity (Pairs.first typCx)
-                              in (Right (padn arity (unwind t))))
-                    recurseOrForce = \term2 -> Logic.ifElse forced (forceExpansion term2) (recurse tx (unwind term2))
-                    forCase =
-                            \f -> Eithers.bind (rewrite False True [] recurse tx (Core.fieldTerm f)) (\r -> Right (Core.Field {
-                              Core.fieldName = (Core.fieldName f),
-                              Core.fieldTerm = r}))
-                    forCaseStatement =
-                            \cs ->
-                              let tname = Core.caseStatementTypeName cs
-                                  dflt = Core.caseStatementDefault cs
-                                  csCases = Core.caseStatementCases cs
-                              in (Eithers.bind (Eithers.mapMaybe (rewrite False False [] recurse tx) dflt) (\rdflt -> Eithers.bind (Eithers.mapList forCase csCases) (\rcases -> Right (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = tname,
-                                Core.caseStatementDefault = rdflt,
-                                Core.caseStatementCases = rcases})))))
-                    forCases =
-                            \cs -> Eithers.bind (Eithers.map unwind (forCaseStatement cs)) (\base -> Right (Logic.ifElse (Logic.or topLevel forced) (padn 1 base) base))
-                    forNullaryElim =
-                            \elimTerm ->
-                              let base = unwind elimTerm
-                              in (Logic.ifElse (Logic.or topLevel forced) (padn 1 base) base)
-                in case term of
-                  Core.TermApplication v0 ->
-                    let lhs = Core.applicationFunction v0
-                        rhs = Core.applicationArgument v0
-                    in (Eithers.bind (rewrite True False [] recurse tx rhs) (\rhs2 -> Eithers.bind (arityOf tx lhs) (\lhsarity -> Eithers.bind (rewriteSpine lhs) (\lhs2 ->
-                      let a2 =
-                              Core.TermApplication (Core.Application {
-                                Core.applicationFunction = lhs2,
-                                Core.applicationArgument = rhs2})
-                      in (Right (Logic.ifElse (Equality.gt lhsarity 1) (padn (Math.sub lhsarity 1) a2) a2))))))
-                  Core.TermCases v0 -> forCases v0
-                  Core.TermProject v0 -> Right (forNullaryElim (Core.TermProject v0))
-                  Core.TermUnwrap v0 -> Right (forNullaryElim (Core.TermUnwrap v0))
-                  Core.TermLambda v0 ->
-                    let txl = Scoping.extendGraphForLambda tx v0
-                    in (Eithers.map unwind (recurse txl term))
-                  Core.TermLet v0 ->
-                    let txlt = Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) tx v0
-                    in (recurse txlt term)
-                  Core.TermTypeApplication v0 -> rewrite topLevel forced (Lists.cons (Core.typeApplicationTermType v0) typeArgs) recurse tx (Core.typeApplicationTermBody v0)
-                  Core.TermTypeLambda v0 ->
-                    let txt = Scoping.extendGraphForTypeLambda tx v0
-                    in (recurse txt term)
-                  _ -> recurseOrForce term
-      in (Rewriting.rewriteTermWithContextM (rewrite True False []) tx0 term0)
--- | Calculate the arity for eta expansion Note: this is a "trusty" function which assumes the graph is well-formed, i.e. no dangling references.
-etaExpansionArity :: Graph.Graph -> Core.Term -> Int
-etaExpansionArity graph term =
-    case term of
-      Core.TermAnnotated v0 -> etaExpansionArity graph (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> Math.sub (etaExpansionArity graph (Core.applicationFunction v0)) 1
-      Core.TermCases _ -> 1
-      Core.TermLambda _ -> 0
-      Core.TermProject _ -> 1
-      Core.TermUnwrap _ -> 1
-      Core.TermTypeLambda v0 -> etaExpansionArity graph (Core.typeLambdaBody v0)
-      Core.TermTypeApplication v0 -> etaExpansionArity graph (Core.typeApplicationTermBody v0)
-      Core.TermVariable v0 -> Maybes.maybe 0 (\ts -> Arity.typeArity (Core.typeSchemeBody ts)) (Maybes.bind (Lexical.lookupBinding graph v0) (\b -> Core.bindingTypeScheme b))
-      _ -> 0
--- | Eta-reduce a term by removing redundant lambda abstractions
-etaReduceTerm :: Core.Term -> Core.Term
-etaReduceTerm term =
-
-      let noChange = term
-          reduceLambda =
-                  \l ->
-                    let v = Core.lambdaParameter l
-                        d = Core.lambdaDomain l
-                        body = Core.lambdaBody l
-                    in case (etaReduceTerm body) of
-                      Core.TermAnnotated v0 -> reduceLambda (Core.Lambda {
-                        Core.lambdaParameter = v,
-                        Core.lambdaDomain = d,
-                        Core.lambdaBody = (Core.annotatedTermBody v0)})
-                      Core.TermApplication v0 ->
-                        let lhs = Core.applicationFunction v0
-                            rhs = Core.applicationArgument v0
-                        in case (etaReduceTerm rhs) of
-                          Core.TermAnnotated v1 -> reduceLambda (Core.Lambda {
-                            Core.lambdaParameter = v,
-                            Core.lambdaDomain = d,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = lhs,
-                              Core.applicationArgument = (Core.annotatedTermBody v1)}))})
-                          Core.TermVariable v1 -> Logic.ifElse (Logic.and (Equality.equal (Core.unName v) (Core.unName v1)) (Logic.not (Variables.isFreeVariableInTerm v lhs))) (etaReduceTerm lhs) noChange
-                          _ -> noChange
-                      _ -> noChange
-      in case term of
-        Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-          Core.annotatedTermBody = (etaReduceTerm (Core.annotatedTermBody v0)),
-          Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-        Core.TermLambda v0 -> reduceLambda v0
-        _ -> noChange
--- | A term evaluation function which is alternatively lazy or eager
-reduceTerm :: Context.Context -> Graph.Graph -> Bool -> Core.Term -> Either Errors.Error Core.Term
-reduceTerm cx graph eager term =
-
-      let reduce = \eager2 -> reduceTerm cx graph eager2
-          doRecurse =
-                  \eager2 -> \term2 ->
-                    let isNonLambdaTerm =
-                            case term2 of
-                              Core.TermLambda _ -> False
-                              Core.TermLet _ -> False
-                              _ -> True
-                    in (Logic.and eager2 isNonLambdaTerm)
-          reduceArg = \eager2 -> \arg -> Logic.ifElse eager2 (Right arg) (reduce False arg)
-          applyToArguments =
-                  \fun -> \args -> Maybes.maybe fun (\uc -> applyToArguments (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = fun,
-                    Core.applicationArgument = (Pairs.first uc)})) (Pairs.second uc)) (Lists.uncons args)
-          mapErrorToString = \e -> Errors.ErrorOther (Errors.OtherError (ShowErrors.error e))
-          applyProjection =
-                  \proj -> \reducedArg -> Eithers.bind (ExtractCore.record (Core.projectionTypeName proj) graph (Strip.deannotateTerm reducedArg)) (\fields ->
-                    let matching = Lists.find (\f -> Equality.equal (Core.fieldName f) (Core.projectionField proj)) fields
-                    in (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-                      Errors.noMatchingFieldErrorFieldName = (Core.projectionField proj)})))) (\mf -> Right (Core.fieldTerm mf)) matching))
-          applyCases =
-                  \cs -> \reducedArg -> Eithers.bind (ExtractCore.injection (Core.caseStatementTypeName cs) graph reducedArg) (\field ->
-                    let matching = Lists.find (\f -> Equality.equal (Core.fieldName f) (Core.fieldName field)) (Core.caseStatementCases cs)
-                    in (Maybes.maybe (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-                      Errors.noMatchingFieldErrorFieldName = (Core.fieldName field)})))) (\x -> Right x) (Core.caseStatementDefault cs)) (\mf -> Right (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.fieldTerm mf),
-                      Core.applicationArgument = (Core.fieldTerm field)}))) matching))
-          applyIfNullary =
-                  \eager2 -> \original -> \args ->
-                    let stripped = Strip.deannotateTerm original
-                        forProjection =
-                                \proj -> \args2 -> Maybes.maybe (Right original) (\uc ->
-                                  let arg = Pairs.first uc
-                                      remainingArgs = Pairs.second uc
-                                  in (Eithers.bind (reduceArg eager2 (Strip.deannotateTerm arg)) (\reducedArg -> Eithers.bind (Eithers.bind (applyProjection proj reducedArg) (reduce eager2)) (\reducedResult -> applyIfNullary eager2 reducedResult remainingArgs)))) (Lists.uncons args2)
-                        forCases =
-                                \cs -> \args2 -> Maybes.maybe (Right original) (\uc ->
-                                  let arg = Pairs.first uc
-                                      remainingArgs = Pairs.second uc
-                                  in (Eithers.bind (reduceArg eager2 (Strip.deannotateTerm arg)) (\reducedArg -> Eithers.bind (Eithers.bind (applyCases cs reducedArg) (reduce eager2)) (\reducedResult -> applyIfNullary eager2 reducedResult remainingArgs)))) (Lists.uncons args2)
-                        forUnwrap =
-                                \name -> \args2 -> Maybes.maybe (Right original) (\uc ->
-                                  let arg = Pairs.first uc
-                                      remainingArgs = Pairs.second uc
-                                  in (Eithers.bind (reduceArg eager2 (Strip.deannotateTerm arg)) (\reducedArg -> Eithers.bind (Eithers.bind (ExtractCore.wrap name graph reducedArg) (reduce eager2)) (\reducedResult -> applyIfNullary eager2 reducedResult remainingArgs)))) (Lists.uncons args2)
-                        forLambda =
-                                \l -> \args2 ->
-                                  let param = Core.lambdaParameter l
-                                      body = Core.lambdaBody l
-                                  in (Maybes.maybe (Right original) (\uc ->
-                                    let arg = Pairs.first uc
-                                        remainingArgs = Pairs.second uc
-                                    in (Eithers.bind (reduce eager2 (Strip.deannotateTerm arg)) (\reducedArg -> Eithers.bind (reduce eager2 (Variables.replaceFreeTermVariable param reducedArg body)) (\reducedResult -> applyIfNullary eager2 reducedResult remainingArgs)))) (Lists.uncons args2))
-                        forPrimitive =
-                                \prim -> \arity -> \args2 ->
-                                  let argList = Lists.take arity args2
-                                      remainingArgs = Lists.drop arity args2
-                                  in (Eithers.bind (Eithers.mapList (reduceArg eager2) argList) (\reducedArgs ->
-                                    let strippedArgs = Lists.map Strip.deannotateTerm reducedArgs
-                                    in (Eithers.bind (Eithers.bimap mapErrorToString (\x -> x) (Graph.primitiveImplementation prim cx graph strippedArgs)) (\primResult -> Eithers.bind (reduce eager2 primResult) (\reducedResult -> applyIfNullary eager2 reducedResult remainingArgs)))))
-                    in case stripped of
-                      Core.TermApplication v0 -> applyIfNullary eager2 (Core.applicationFunction v0) (Lists.cons (Core.applicationArgument v0) args)
-                      Core.TermCases v0 -> Logic.ifElse (Lists.null args) (Right original) (forCases v0 args)
-                      Core.TermProject v0 -> Logic.ifElse (Lists.null args) (Right original) (forProjection v0 args)
-                      Core.TermUnwrap v0 -> Logic.ifElse (Lists.null args) (Right original) (forUnwrap v0 args)
-                      Core.TermLambda v0 -> Logic.ifElse (Lists.null args) (Right original) (forLambda v0 args)
-                      Core.TermVariable v0 ->
-                        let mBinding = Lexical.lookupBinding graph v0
-                        in (Maybes.maybe (
-                          let mPrim = Lexical.lookupPrimitive graph v0
-                          in (Maybes.maybe (Right (applyToArguments original args)) (\prim ->
-                            let arity = Arity.primitiveArity prim
-                            in (Logic.ifElse (Equality.gt arity (Lists.length args)) (Right (applyToArguments original args)) (forPrimitive prim arity args))) mPrim)) (\binding -> applyIfNullary eager2 (Core.bindingTerm binding) args) mBinding)
-                      Core.TermLet v0 ->
-                        let bindings = Core.letBindings v0
-                            body = Core.letBody v0
-                            letExpr =
-                                    \b -> Core.TermLet (Core.Let {
-                                      Core.letBindings = [
-                                        b],
-                                      Core.letBody = (Core.TermVariable (Core.bindingName b))})
-                            expandBinding =
-                                    \b -> Core.Binding {
-                                      Core.bindingName = (Core.bindingName b),
-                                      Core.bindingTerm = (Variables.replaceFreeTermVariable (Core.bindingName b) (letExpr b) (Core.bindingTerm b)),
-                                      Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                            expandedBindings = Lists.map expandBinding bindings
-                            substituteBinding = \term2 -> \b -> Variables.replaceFreeTermVariable (Core.bindingName b) (Core.bindingTerm b) term2
-                            substituteAll = \bs -> \term2 -> Lists.foldl substituteBinding term2 bs
-                            expandedBody = substituteAll expandedBindings body
-                        in (Eithers.bind (reduce eager2 expandedBody) (\reducedBody -> applyIfNullary eager2 reducedBody args))
-                      _ -> Right (applyToArguments original args)
-          mapping =
-                  \recurse -> \mid -> Eithers.bind (Logic.ifElse (doRecurse eager mid) (recurse mid) (Right mid)) (\inner -> applyIfNullary eager inner [])
-      in (Rewriting.rewriteTermM mapping term)
--- | Whether a term is closed, i.e. represents a complete program
-termIsClosed :: Core.Term -> Bool
-termIsClosed term = Sets.null (Variables.freeVariablesInTerm term)
--- | Whether a term has been fully reduced to a value
-termIsValue :: Core.Term -> Bool
-termIsValue term =
-
-      let forList = \els -> Lists.foldl (\b -> \t -> Logic.and b (termIsValue t)) True els
-          checkField = \f -> termIsValue (Core.fieldTerm f)
-          checkFields = \fields -> Lists.foldl (\b -> \f -> Logic.and b (checkField f)) True fields
-      in case (Strip.deannotateTerm term) of
-        Core.TermApplication _ -> False
-        Core.TermCases v0 -> Logic.and (checkFields (Core.caseStatementCases v0)) (Maybes.maybe True termIsValue (Core.caseStatementDefault v0))
-        Core.TermEither v0 -> Eithers.either (\l -> termIsValue l) (\r -> termIsValue r) v0
-        Core.TermLambda v0 -> termIsValue (Core.lambdaBody v0)
-        Core.TermLiteral _ -> True
-        Core.TermProject _ -> True
-        Core.TermUnwrap _ -> True
-        Core.TermList v0 -> forList v0
-        Core.TermMap v0 -> Lists.foldl (\b -> \kv -> Logic.and b (Logic.and (termIsValue (Pairs.first kv)) (termIsValue (Pairs.second kv)))) True (Maps.toList v0)
-        Core.TermMaybe v0 -> Maybes.maybe True termIsValue v0
-        Core.TermRecord v0 -> checkFields (Core.recordFields v0)
-        Core.TermSet v0 -> forList (Sets.toList v0)
-        Core.TermInject v0 -> checkField (Core.injectionField v0)
-        Core.TermUnit -> True
-        Core.TermVariable _ -> False
-        _ -> False
diff --git a/src/main/haskell/Hydra/Reflect.hs b/src/main/haskell/Hydra/Reflect.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Reflect.hs
+++ /dev/null
@@ -1,233 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Reflection functions for working with term, type, and literal type variants, as well as numeric precision.
-
-module Hydra.Reflect where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Util as Util
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | All elimination variants (constructors), in a canonical order (legacy)
-eliminationVariants :: [Variants.EliminationVariant]
-eliminationVariants =
-    [
-      Variants.EliminationVariantRecord,
-      Variants.EliminationVariantUnion,
-      Variants.EliminationVariantWrap]
--- | Find the precision of a given floating-point type
-floatTypePrecision :: Core.FloatType -> Util.Precision
-floatTypePrecision x =
-    case x of
-      Core.FloatTypeBigfloat -> Util.PrecisionArbitrary
-      Core.FloatTypeFloat32 -> Util.PrecisionBits 32
-      Core.FloatTypeFloat64 -> Util.PrecisionBits 64
--- | All floating-point types in a canonical order
-floatTypes :: [Core.FloatType]
-floatTypes =
-    [
-      Core.FloatTypeBigfloat,
-      Core.FloatTypeFloat32,
-      Core.FloatTypeFloat64]
--- | Find the float type for a given floating-point value
-floatValueType :: Core.FloatValue -> Core.FloatType
-floatValueType x =
-    case x of
-      Core.FloatValueBigfloat _ -> Core.FloatTypeBigfloat
-      Core.FloatValueFloat32 _ -> Core.FloatTypeFloat32
-      Core.FloatValueFloat64 _ -> Core.FloatTypeFloat64
--- | All function variants (constructors), in a canonical order (legacy)
-functionVariants :: [Variants.FunctionVariant]
-functionVariants =
-    [
-      Variants.FunctionVariantElimination,
-      Variants.FunctionVariantLambda]
--- | Find whether a given integer type is signed (true) or unsigned (false)
-integerTypeIsSigned :: Core.IntegerType -> Bool
-integerTypeIsSigned x =
-    case x of
-      Core.IntegerTypeBigint -> True
-      Core.IntegerTypeInt8 -> True
-      Core.IntegerTypeInt16 -> True
-      Core.IntegerTypeInt32 -> True
-      Core.IntegerTypeInt64 -> True
-      Core.IntegerTypeUint8 -> False
-      Core.IntegerTypeUint16 -> False
-      Core.IntegerTypeUint32 -> False
-      Core.IntegerTypeUint64 -> False
--- | Find the precision of a given integer type
-integerTypePrecision :: Core.IntegerType -> Util.Precision
-integerTypePrecision x =
-    case x of
-      Core.IntegerTypeBigint -> Util.PrecisionArbitrary
-      Core.IntegerTypeInt8 -> Util.PrecisionBits 8
-      Core.IntegerTypeInt16 -> Util.PrecisionBits 16
-      Core.IntegerTypeInt32 -> Util.PrecisionBits 32
-      Core.IntegerTypeInt64 -> Util.PrecisionBits 64
-      Core.IntegerTypeUint8 -> Util.PrecisionBits 8
-      Core.IntegerTypeUint16 -> Util.PrecisionBits 16
-      Core.IntegerTypeUint32 -> Util.PrecisionBits 32
-      Core.IntegerTypeUint64 -> Util.PrecisionBits 64
--- | All integer types, in a canonical order
-integerTypes :: [Core.IntegerType]
-integerTypes =
-    [
-      Core.IntegerTypeBigint,
-      Core.IntegerTypeInt8,
-      Core.IntegerTypeInt16,
-      Core.IntegerTypeInt32,
-      Core.IntegerTypeInt64,
-      Core.IntegerTypeUint8,
-      Core.IntegerTypeUint16,
-      Core.IntegerTypeUint32,
-      Core.IntegerTypeUint64]
--- | Find the integer type for a given integer value
-integerValueType :: Core.IntegerValue -> Core.IntegerType
-integerValueType x =
-    case x of
-      Core.IntegerValueBigint _ -> Core.IntegerTypeBigint
-      Core.IntegerValueInt8 _ -> Core.IntegerTypeInt8
-      Core.IntegerValueInt16 _ -> Core.IntegerTypeInt16
-      Core.IntegerValueInt32 _ -> Core.IntegerTypeInt32
-      Core.IntegerValueInt64 _ -> Core.IntegerTypeInt64
-      Core.IntegerValueUint8 _ -> Core.IntegerTypeUint8
-      Core.IntegerValueUint16 _ -> Core.IntegerTypeUint16
-      Core.IntegerValueUint32 _ -> Core.IntegerTypeUint32
-      Core.IntegerValueUint64 _ -> Core.IntegerTypeUint64
--- | Find the literal type for a given literal value
-literalType :: Core.Literal -> Core.LiteralType
-literalType x =
-    case x of
-      Core.LiteralBinary _ -> Core.LiteralTypeBinary
-      Core.LiteralBoolean _ -> Core.LiteralTypeBoolean
-      Core.LiteralDecimal _ -> Core.LiteralTypeDecimal
-      Core.LiteralFloat v0 -> (\injected_ -> Core.LiteralTypeFloat injected_) (floatValueType v0)
-      Core.LiteralInteger v0 -> (\injected_ -> Core.LiteralTypeInteger injected_) (integerValueType v0)
-      Core.LiteralString _ -> Core.LiteralTypeString
--- | Find the literal type inject (constructor) for a given literal value
-literalTypeVariant :: Core.LiteralType -> Variants.LiteralVariant
-literalTypeVariant x =
-    case x of
-      Core.LiteralTypeBinary -> Variants.LiteralVariantBinary
-      Core.LiteralTypeBoolean -> Variants.LiteralVariantBoolean
-      Core.LiteralTypeDecimal -> Variants.LiteralVariantDecimal
-      Core.LiteralTypeFloat _ -> Variants.LiteralVariantFloat
-      Core.LiteralTypeInteger _ -> Variants.LiteralVariantInteger
-      Core.LiteralTypeString -> Variants.LiteralVariantString
--- | All literal types, in a canonical order
-literalTypes :: [Core.LiteralType]
-literalTypes =
-    Lists.concat [
-      [
-        Core.LiteralTypeBinary,
-        Core.LiteralTypeBoolean,
-        Core.LiteralTypeDecimal],
-      (Lists.map (\x -> Core.LiteralTypeFloat x) floatTypes),
-      (Lists.map (\x -> Core.LiteralTypeInteger x) integerTypes),
-      [
-        Core.LiteralTypeString]]
--- | Find the literal inject (constructor) for a given literal value
-literalVariant :: Core.Literal -> Variants.LiteralVariant
-literalVariant arg_ = literalTypeVariant (literalType arg_)
--- | All literal variants, in a canonical order
-literalVariants :: [Variants.LiteralVariant]
-literalVariants =
-    [
-      Variants.LiteralVariantBinary,
-      Variants.LiteralVariantBoolean,
-      Variants.LiteralVariantDecimal,
-      Variants.LiteralVariantFloat,
-      Variants.LiteralVariantInteger,
-      Variants.LiteralVariantString]
--- | Find the term inject (constructor) for a given term
-termVariant :: Core.Term -> Variants.TermVariant
-termVariant x =
-    case x of
-      Core.TermAnnotated _ -> Variants.TermVariantAnnotated
-      Core.TermApplication _ -> Variants.TermVariantApplication
-      Core.TermCases _ -> Variants.TermVariantCases
-      Core.TermEither _ -> Variants.TermVariantEither
-      Core.TermLambda _ -> Variants.TermVariantLambda
-      Core.TermLet _ -> Variants.TermVariantLet
-      Core.TermList _ -> Variants.TermVariantList
-      Core.TermLiteral _ -> Variants.TermVariantLiteral
-      Core.TermMap _ -> Variants.TermVariantMap
-      Core.TermMaybe _ -> Variants.TermVariantMaybe
-      Core.TermPair _ -> Variants.TermVariantPair
-      Core.TermProject _ -> Variants.TermVariantProject
-      Core.TermRecord _ -> Variants.TermVariantRecord
-      Core.TermSet _ -> Variants.TermVariantSet
-      Core.TermTypeApplication _ -> Variants.TermVariantTypeApplication
-      Core.TermTypeLambda _ -> Variants.TermVariantTypeLambda
-      Core.TermInject _ -> Variants.TermVariantInject
-      Core.TermUnit -> Variants.TermVariantUnit
-      Core.TermUnwrap _ -> Variants.TermVariantUnwrap
-      Core.TermVariable _ -> Variants.TermVariantVariable
-      Core.TermWrap _ -> Variants.TermVariantWrap
--- | All term (expression) variants, in a canonical order
-termVariants :: [Variants.TermVariant]
-termVariants =
-    [
-      Variants.TermVariantAnnotated,
-      Variants.TermVariantApplication,
-      Variants.TermVariantCases,
-      Variants.TermVariantEither,
-      Variants.TermVariantLambda,
-      Variants.TermVariantLet,
-      Variants.TermVariantList,
-      Variants.TermVariantLiteral,
-      Variants.TermVariantMap,
-      Variants.TermVariantMaybe,
-      Variants.TermVariantPair,
-      Variants.TermVariantProject,
-      Variants.TermVariantRecord,
-      Variants.TermVariantSet,
-      Variants.TermVariantTypeLambda,
-      Variants.TermVariantTypeApplication,
-      Variants.TermVariantInject,
-      Variants.TermVariantUnit,
-      Variants.TermVariantUnwrap,
-      Variants.TermVariantVariable,
-      Variants.TermVariantWrap]
--- | Find the type inject (constructor) for a given type
-typeVariant :: Core.Type -> Variants.TypeVariant
-typeVariant x =
-    case x of
-      Core.TypeAnnotated _ -> Variants.TypeVariantAnnotated
-      Core.TypeApplication _ -> Variants.TypeVariantApplication
-      Core.TypeEither _ -> Variants.TypeVariantEither
-      Core.TypeFunction _ -> Variants.TypeVariantFunction
-      Core.TypeForall _ -> Variants.TypeVariantForall
-      Core.TypeList _ -> Variants.TypeVariantList
-      Core.TypeLiteral _ -> Variants.TypeVariantLiteral
-      Core.TypeMap _ -> Variants.TypeVariantMap
-      Core.TypeMaybe _ -> Variants.TypeVariantMaybe
-      Core.TypePair _ -> Variants.TypeVariantPair
-      Core.TypeRecord _ -> Variants.TypeVariantRecord
-      Core.TypeSet _ -> Variants.TypeVariantSet
-      Core.TypeUnion _ -> Variants.TypeVariantUnion
-      Core.TypeUnit -> Variants.TypeVariantUnit
-      Core.TypeVariable _ -> Variants.TypeVariantVariable
-      Core.TypeVoid -> Variants.TypeVariantVoid
-      Core.TypeWrap _ -> Variants.TypeVariantWrap
--- | All type variants, in a canonical order
-typeVariants :: [Variants.TypeVariant]
-typeVariants =
-    [
-      Variants.TypeVariantAnnotated,
-      Variants.TypeVariantApplication,
-      Variants.TypeVariantEither,
-      Variants.TypeVariantFunction,
-      Variants.TypeVariantForall,
-      Variants.TypeVariantList,
-      Variants.TypeVariantLiteral,
-      Variants.TypeVariantMap,
-      Variants.TypeVariantWrap,
-      Variants.TypeVariantMaybe,
-      Variants.TypeVariantPair,
-      Variants.TypeVariantRecord,
-      Variants.TypeVariantSet,
-      Variants.TypeVariantUnion,
-      Variants.TypeVariantUnit,
-      Variants.TypeVariantVariable,
-      Variants.TypeVariantVoid]
diff --git a/src/main/haskell/Hydra/Relational.hs b/src/main/haskell/Hydra/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Relational.hs
+++ /dev/null
@@ -1,84 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | An interpretation of Codd's Relational Model, as described in 'A Relational Model of Data for Large Shared Data Banks' (1970). Types ('domains') and values are parameterized so as to allow for application-specific implementations. No special support is provided for 'nonsimple' domains; i.e. relations are assumed to be normalized.
-
-module Hydra.Relational 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
-import qualified Data.Set as S
--- | A name for a domain which serves to identify the role played by that domain in the given relation; a 'role name' in Codd
-newtype ColumnName =
-  ColumnName {
-    unColumnName :: String}
-  deriving (Eq, Ord, Read, Show)
-_ColumnName = Core.Name "hydra.relational.ColumnName"
--- | An abstract specification of the domain represented by a column in a relation; a role
-data ColumnSchema t =
-  ColumnSchema {
-    -- | A unique name for the column
-    columnSchemaName :: ColumnName,
-    -- | The domain (type) of the column
-    columnSchemaDomain :: t}
-  deriving (Eq, Ord, Read, Show)
-_ColumnSchema = Core.Name "hydra.relational.ColumnSchema"
-_ColumnSchema_name = Core.Name "name"
-_ColumnSchema_domain = Core.Name "domain"
--- | A mapping from certain columns of a source relation to primary key columns of a target relation
-data ForeignKey =
-  ForeignKey {
-    -- | The name of the target relation
-    foreignKeyForeignRelation :: RelationName,
-    -- | The mapping of source column names to target column names. The target column names must together make up the primary key of the target relation.
-    foreignKeyKeys :: (M.Map ColumnName ColumnName)}
-  deriving (Eq, Ord, Read, Show)
-_ForeignKey = Core.Name "hydra.relational.ForeignKey"
-_ForeignKey_foreignRelation = Core.Name "foreignRelation"
-_ForeignKey_keys = Core.Name "keys"
--- | A primary key of a relation, specified either as a single column, or as a list of columns
-newtype PrimaryKey =
-  PrimaryKey {
-    unPrimaryKey :: [ColumnName]}
-  deriving (Eq, Ord, Read, Show)
-_PrimaryKey = Core.Name "hydra.relational.PrimaryKey"
--- | A set of distinct n-tuples; a table
-newtype Relation v =
-  Relation {
-    unRelation :: [Row v]}
-  deriving (Eq, Ord, Read, Show)
-_Relation = Core.Name "hydra.relational.Relation"
--- | A unique relation (table) name
-newtype RelationName =
-  RelationName {
-    unRelationName :: String}
-  deriving (Eq, Ord, Read, Show)
-_RelationName = Core.Name "hydra.relational.RelationName"
--- | An abstract relation; the name and columns of a relation without its actual data
-data RelationSchema t =
-  RelationSchema {
-    -- | A unique name for the relation
-    relationSchemaName :: RelationName,
-    -- | A list of column specifications
-    relationSchemaColumns :: [ColumnSchema t],
-    -- | Any number of primary keys for the relation, each of which must be valid for this relation
-    relationSchemaPrimaryKeys :: [PrimaryKey],
-    -- | Any number of foreign keys, each of which must be valid for both this relation and the target relation
-    relationSchemaForeignKeys :: [ForeignKey]}
-  deriving (Eq, Ord, Read, Show)
-_RelationSchema = Core.Name "hydra.relational.RelationSchema"
-_RelationSchema_name = Core.Name "name"
-_RelationSchema_columns = Core.Name "columns"
-_RelationSchema_primaryKeys = Core.Name "primaryKeys"
-_RelationSchema_foreignKeys = Core.Name "foreignKeys"
--- | A domain-unordered (string-indexed, rather than position-indexed) relation
-newtype Relationship v =
-  Relationship {
-    unRelationship :: (S.Set (M.Map ColumnName v))}
-  deriving (Eq, Ord, Read, Show)
-_Relationship = Core.Name "hydra.relational.Relationship"
--- | An n-tuple which is an element of a given relation
-newtype Row v =
-  Row {
-    unRow :: [v]}
-  deriving (Eq, Ord, Read, Show)
-_Row = Core.Name "hydra.relational.Row"
diff --git a/src/main/haskell/Hydra/Resolution.hs b/src/main/haskell/Hydra/Resolution.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Resolution.hs
+++ /dev/null
@@ -1,198 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type dereference, lookup, requirements, and instantiation
-
-module Hydra.Resolution where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Substitution as Substitution
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Dereference a type name to get the actual type (Either version)
-dereferenceType :: t0 -> Graph.Graph -> Core.Name -> Either Errors.Error (Maybe Core.Type)
-dereferenceType cx graph name =
-
-      let mel = Lexical.lookupBinding graph name
-      in (Maybes.maybe (Right Nothing) (\el -> Eithers.map Maybes.pure (Eithers.bimap (\_e -> Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = "type",
-        Errors.unexpectedShapeErrorActual = (Errors.unDecodingError _e)}))) (\_a -> _a) (DecodeCore.type_ graph (Core.bindingTerm el)))) mel)
--- | Test whether a given System F type is polymorphic (i.e., a forall type)
-fTypeIsPolymorphic :: Core.Type -> Bool
-fTypeIsPolymorphic typ =
-    case typ of
-      Core.TypeAnnotated v0 -> fTypeIsPolymorphic (Core.annotatedTypeBody v0)
-      Core.TypeForall _ -> True
-      _ -> False
-fieldMap :: [Core.Field] -> M.Map Core.Name Core.Term
-fieldMap fields =
-
-      let toPair = \f -> (Core.fieldName f, (Core.fieldTerm f))
-      in (Maps.fromList (Lists.map toPair fields))
-fieldTypeMap :: [Core.FieldType] -> M.Map Core.Name Core.Type
-fieldTypeMap fields =
-
-      let toPair = \f -> (Core.fieldTypeName f, (Core.fieldTypeType f))
-      in (Maps.fromList (Lists.map toPair fields))
--- | Get field types from a record or union type (Either version)
-fieldTypes :: t0 -> Graph.Graph -> Core.Type -> Either Errors.Error (M.Map Core.Name Core.Type)
-fieldTypes cx graph t =
-
-      let toMap = \fields -> Maps.fromList (Lists.map (\ft -> (Core.fieldTypeName ft, (Core.fieldTypeType ft))) fields)
-      in case (Strip.deannotateType t) of
-        Core.TypeForall v0 -> fieldTypes cx graph (Core.forallTypeBody v0)
-        Core.TypeRecord v0 -> Right (toMap v0)
-        Core.TypeUnion v0 -> Right (toMap v0)
-        Core.TypeVariable v0 -> Maybes.maybe (Eithers.bind (Lexical.requireBinding graph v0) (\el -> Eithers.bind (Eithers.bimap (\_e -> Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "type",
-          Errors.unexpectedShapeErrorActual = (Errors.unDecodingError _e)}))) (\_a -> _a) (DecodeCore.type_ graph (Core.bindingTerm el))) (\decodedType -> fieldTypes cx graph decodedType))) (\ts -> fieldTypes cx graph (Core.typeSchemeBody ts)) (Maps.lookup v0 (Graph.graphSchemaTypes graph))
-        _ -> Left (Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "record or union type",
-          Errors.unexpectedShapeErrorActual = (ShowCore.type_ t)})))
--- | Find a field type by name in a list of field types
-findFieldType :: t0 -> Core.Name -> [Core.FieldType] -> Either Errors.Error Core.Type
-findFieldType cx fname fields =
-
-      let matchingFields = Lists.filter (\ft -> Equality.equal (Core.unName (Core.fieldTypeName ft)) (Core.unName fname)) fields
-          noMatch =
-                  Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-                    Errors.noMatchingFieldErrorFieldName = fname})))
-      in (Logic.ifElse (Lists.null matchingFields) noMatch (Logic.ifElse (Equality.equal (Lists.length matchingFields) 1) (Maybes.maybe noMatch (\ft -> Right (Core.fieldTypeType ft)) (Lists.maybeHead matchingFields)) (Left (Errors.ErrorExtraction (Errors.ExtractionErrorMultipleFields (Errors.MultipleFieldsError {
-        Errors.multipleFieldsErrorFieldName = fname}))))))
--- | Fully strip a type of forall quantifiers, normalizing bound variable names for alpha-equivalence comparison
-fullyStripAndNormalizeType :: Core.Type -> Core.Type
-fullyStripAndNormalizeType typ =
-
-      let go =
-              \depth -> \subst -> \t -> case (Strip.deannotateType t) of
-                Core.TypeForall v0 ->
-                  let oldVar = Core.forallTypeParameter v0
-                      newVar = Core.Name (Strings.cat2 "_" (Literals.showInt32 depth))
-                  in (go (Math.add depth 1) (Maps.insert oldVar newVar subst) (Core.forallTypeBody v0))
-                _ -> (subst, t)
-          result = go 0 Maps.empty typ
-          subst = Pairs.first result
-          body = Pairs.second result
-      in (Variables.substituteTypeVariables subst body)
--- | Fully strip a type of forall quantifiers
-fullyStripType :: Core.Type -> Core.Type
-fullyStripType typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeForall v0 -> fullyStripType (Core.forallTypeBody v0)
-      _ -> typ
--- | Instantiate a type by replacing all forall-bound type variables with fresh variables, threading Context
-instantiateType :: Context.Context -> Core.Type -> (Core.Type, Context.Context)
-instantiateType cx typ =
-
-      let result = instantiateTypeScheme cx (typeToTypeScheme typ)
-      in (Scoping.typeSchemeToFType (Pairs.first result), (Pairs.second result))
--- | Instantiate a type scheme with fresh variables, threading Context
-instantiateTypeScheme :: Context.Context -> Core.TypeScheme -> (Core.TypeScheme, Context.Context)
-instantiateTypeScheme cx scheme =
-
-      let oldVars = Core.typeSchemeVariables scheme
-          result = Names.freshNames (Lists.length oldVars) cx
-          newVars = Pairs.first result
-          cx2 = Pairs.second result
-          subst = Typing.TypeSubst (Maps.fromList (Lists.zip oldVars (Lists.map (\x -> Core.TypeVariable x) newVars)))
-          nameSubst = Maps.fromList (Lists.zip oldVars newVars)
-          renamedConstraints =
-                  Maybes.map (\oldConstraints -> Maps.fromList (Lists.map (\kv -> (Maybes.fromMaybe (Pairs.first kv) (Maps.lookup (Pairs.first kv) nameSubst), (Pairs.second kv))) (Maps.toList oldConstraints))) (Core.typeSchemeConstraints scheme)
-      in (Core.TypeScheme {
-        Core.typeSchemeVariables = newVars,
-        Core.typeSchemeBody = (Substitution.substInType subst (Core.typeSchemeBody scheme)),
-        Core.typeSchemeConstraints = renamedConstraints}, cx2)
--- | Apply type arguments to a nominal type
-nominalApplication :: Core.Name -> [Core.Type] -> Core.Type
-nominalApplication tname args =
-    Lists.foldl (\t -> \a -> Core.TypeApplication (Core.ApplicationType {
-      Core.applicationTypeFunction = t,
-      Core.applicationTypeArgument = a})) (Core.TypeVariable tname) args
--- | Require a name to resolve to a record type
-requireRecordType :: t0 -> Graph.Graph -> Core.Name -> Either Errors.Error [Core.FieldType]
-requireRecordType cx graph name =
-
-      let toRecord =
-              \t -> case t of
-                Core.TypeRecord v0 -> Just v0
-                _ -> Nothing
-      in (requireRowType cx "record type" toRecord graph name)
--- | Require a name to resolve to a row type
-requireRowType :: t0 -> String -> (Core.Type -> Maybe t1) -> Graph.Graph -> Core.Name -> Either Errors.Error t1
-requireRowType cx label getter graph name =
-
-      let rawType =
-              \t -> case t of
-                Core.TypeAnnotated v0 -> rawType (Core.annotatedTypeBody v0)
-                Core.TypeForall v0 -> rawType (Core.forallTypeBody v0)
-                _ -> t
-      in (Eithers.bind (requireType cx graph name) (\t -> Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-        Errors.unexpectedShapeErrorExpected = (Strings.cat2 label " type"),
-        Errors.unexpectedShapeErrorActual = (Strings.cat2 (Core.unName name) (Strings.cat2 ": " (ShowCore.type_ t)))})))) (\x -> Right x) (getter (rawType t))))
--- | Look up a schema type and instantiate it, threading Context
-requireSchemaType :: Context.Context -> M.Map Core.Name Core.TypeScheme -> Core.Name -> Either Errors.Error (Core.TypeScheme, Context.Context)
-requireSchemaType cx types tname =
-    Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchBinding (Errors.NoSuchBindingError {
-      Errors.noSuchBindingErrorName = tname})))) (\ts -> Right (instantiateTypeScheme cx (Strip.deannotateTypeSchemeRecursive ts))) (Maps.lookup tname types)
--- | Require a type by name
-requireType :: t0 -> Graph.Graph -> Core.Name -> Either Errors.Error Core.Type
-requireType cx graph name =
-    Maybes.maybe (Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorNoSuchBinding (Errors.NoSuchBindingError {
-      Errors.noSuchBindingErrorName = name})))) (\ts -> Right (Scoping.typeSchemeToFType ts)) (Maps.lookup name (Graph.graphBoundTypes graph))) (\ts -> Right (Scoping.typeSchemeToFType ts)) (Maps.lookup name (Graph.graphSchemaTypes graph))
--- | Require a field type from a union type
-requireUnionField :: t0 -> Graph.Graph -> Core.Name -> Core.Name -> Either Errors.Error Core.Type
-requireUnionField cx graph tname fname =
-
-      let withRowType =
-              \rt ->
-                let noMatchErr =
-                        Left (Errors.ErrorResolution (Errors.ResolutionErrorNoMatchingField (Errors.NoMatchingFieldError {
-                          Errors.noMatchingFieldErrorFieldName = fname})))
-                in (Maybes.maybe noMatchErr (\ft -> Right (Core.fieldTypeType ft)) (Lists.find (\ft -> Equality.equal (Core.fieldTypeName ft) fname) rt))
-      in (Eithers.bind (requireUnionType cx graph tname) withRowType)
--- | Require a name to resolve to a union type
-requireUnionType :: t0 -> Graph.Graph -> Core.Name -> Either Errors.Error [Core.FieldType]
-requireUnionType cx graph name =
-
-      let toUnion =
-              \t -> case t of
-                Core.TypeUnion v0 -> Just v0
-                _ -> Nothing
-      in (requireRowType cx "union" toUnion graph name)
--- | Resolve a type, dereferencing type variables
-resolveType :: Graph.Graph -> Core.Type -> Maybe Core.Type
-resolveType graph typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeVariable v0 -> Maybes.maybe (Maybes.map (\ts -> Scoping.typeSchemeToFType ts) (Maps.lookup v0 (Graph.graphBoundTypes graph))) (\ts -> Just (Scoping.typeSchemeToFType ts)) (Maps.lookup v0 (Graph.graphSchemaTypes graph))
-      _ -> Just typ
--- | Convert a (System F -style) type to a type scheme
-typeToTypeScheme :: Core.Type -> Core.TypeScheme
-typeToTypeScheme t0 =
-
-      let helper =
-              \vars -> \t -> case (Strip.deannotateType t) of
-                Core.TypeForall v0 -> helper (Lists.cons (Core.forallTypeParameter v0) vars) (Core.forallTypeBody v0)
-                _ -> Core.TypeScheme {
-                  Core.typeSchemeVariables = (Lists.reverse vars),
-                  Core.typeSchemeBody = t,
-                  Core.typeSchemeConstraints = Nothing}
-      in (helper [] t0)
diff --git a/src/main/haskell/Hydra/Rewriting.hs b/src/main/haskell/Hydra/Rewriting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rewriting.hs
+++ /dev/null
@@ -1,899 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Core rewrite and fold combinators for terms and types
-
-module Hydra.Rewriting where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Scoping as Scoping
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Apply a term-level function inside any leading type lambdas
-applyInsideTypeLambdasAndAnnotations :: (Core.Term -> Core.Term) -> Core.Term -> Core.Term
-applyInsideTypeLambdasAndAnnotations f term0 =
-    case term0 of
-      Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-        Core.annotatedTermBody = (applyInsideTypeLambdasAndAnnotations f (Core.annotatedTermBody v0)),
-        Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-      Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-        Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-        Core.typeLambdaBody = (applyInsideTypeLambdasAndAnnotations f (Core.typeLambdaBody v0))})
-      _ -> f term0
--- | Fold over a term, traversing its subterms in the specified order
-foldOverTerm :: Coders.TraversalOrder -> (t0 -> Core.Term -> t0) -> t0 -> Core.Term -> t0
-foldOverTerm order fld b0 term =
-    case order of
-      Coders.TraversalOrderPre -> Lists.foldl (foldOverTerm order fld) (fld b0 term) (subterms term)
-      Coders.TraversalOrderPost -> fld (Lists.foldl (foldOverTerm order fld) b0 (subterms term)) term
--- | Fold over a type, traversing its subtypes in the specified order
-foldOverType :: Coders.TraversalOrder -> (t0 -> Core.Type -> t0) -> t0 -> Core.Type -> t0
-foldOverType order fld b0 typ =
-    case order of
-      Coders.TraversalOrderPre -> Lists.foldl (foldOverType order fld) (fld b0 typ) (subtypes typ)
-      Coders.TraversalOrderPost -> fld (Lists.foldl (foldOverType order fld) b0 (subtypes typ)) typ
--- | Fold over a term to produce a value, with both Graph and accessor path tracked. Like rewriteAndFoldTermWithGraphAndPath, but only folds without rewriting. The Graph is automatically updated when descending into lambdas, lets, and type lambdas.
-foldTermWithGraphAndPath :: ((t0 -> Core.Term -> t0) -> [Paths.SubtermStep] -> Graph.Graph -> t0 -> Core.Term -> t0) -> Graph.Graph -> t0 -> Core.Term -> t0
-foldTermWithGraphAndPath f cx0 val0 term0 =
-
-      let wrapper =
-              \recurse -> \path -> \cx -> \val -> \term ->
-                let recurseForUser =
-                        \valIn -> \subterm ->
-                          let r = recurse valIn subterm
-                          in (Pairs.first r)
-                in (f recurseForUser path cx val term, term)
-          result = rewriteAndFoldTermWithGraphAndPath wrapper cx0 val0 term0
-      in (Pairs.first result)
--- | Apply a transformation to the first type beneath a chain of annotations
-mapBeneathTypeAnnotations :: (Core.Type -> Core.Type) -> Core.Type -> Core.Type
-mapBeneathTypeAnnotations f t =
-    case t of
-      Core.TypeAnnotated v0 -> Core.TypeAnnotated (Core.AnnotatedType {
-        Core.annotatedTypeBody = (mapBeneathTypeAnnotations f (Core.annotatedTypeBody v0)),
-        Core.annotatedTypeAnnotation = (Core.annotatedTypeAnnotation v0)})
-      _ -> f t
--- | Rewrite a term, and at the same time, fold a function over it, accumulating a value
-rewriteAndFoldTerm :: ((t0 -> Core.Term -> (t0, Core.Term)) -> t0 -> Core.Term -> (t0, Core.Term)) -> t0 -> Core.Term -> (t0, Core.Term)
-rewriteAndFoldTerm f term0 =
-
-      let fsub =
-              \recurse -> \val0 -> \term02 ->
-                let forSingle =
-                        \rec -> \cons -> \val -> \term ->
-                          let r = rec val term
-                          in (Pairs.first r, (cons (Pairs.second r)))
-                    forMany =
-                            \rec -> \cons -> \val -> \els ->
-                              let rr =
-                                      Lists.foldl (\r -> \el ->
-                                        let r2 = rec (Pairs.first r) el
-                                        in (Pairs.first r2, (Lists.cons (Pairs.second r2) (Pairs.second r)))) (val, []) els
-                              in (Pairs.first rr, (cons (Lists.reverse (Pairs.second rr))))
-                    forField =
-                            \val -> \field ->
-                              let r = recurse val (Core.fieldTerm field)
-                              in (Pairs.first r, Core.Field {
-                                Core.fieldName = (Core.fieldName field),
-                                Core.fieldTerm = (Pairs.second r)})
-                    forFields = forMany forField (\x -> x)
-                    forPair =
-                            \val -> \kv ->
-                              let rk = recurse val (Pairs.first kv)
-                                  rv = recurse (Pairs.first rk) (Pairs.second kv)
-                              in (Pairs.first rv, (Pairs.second rk, (Pairs.second rv)))
-                    forBinding =
-                            \val -> \binding ->
-                              let r = recurse val (Core.bindingTerm binding)
-                              in (Pairs.first r, Core.Binding {
-                                Core.bindingName = (Core.bindingName binding),
-                                Core.bindingTerm = (Pairs.second r),
-                                Core.bindingTypeScheme = (Core.bindingTypeScheme binding)})
-                    dflt = (val0, term02)
-                in case term02 of
-                  Core.TermAnnotated v0 -> forSingle recurse (\t -> Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = t,
-                    Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})) val0 (Core.annotatedTermBody v0)
-                  Core.TermApplication v0 ->
-                    let rlhs = recurse val0 (Core.applicationFunction v0)
-                        rrhs = recurse (Pairs.first rlhs) (Core.applicationArgument v0)
-                    in (Pairs.first rrhs, (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Pairs.second rlhs),
-                      Core.applicationArgument = (Pairs.second rrhs)})))
-                  Core.TermCases v0 ->
-                    let rmd = Maybes.map (recurse val0) (Core.caseStatementDefault v0)
-                        val1 = Maybes.maybe val0 Pairs.first rmd
-                        rcases = forFields val1 (Core.caseStatementCases v0)
-                    in (Pairs.first rcases, (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                      Core.caseStatementDefault = (Maybes.map Pairs.second rmd),
-                      Core.caseStatementCases = (Pairs.second rcases)})))
-                  Core.TermEither v0 -> Eithers.either (\l ->
-                    let rl = recurse val0 l
-                    in (Pairs.first rl, (Core.TermEither (Left (Pairs.second rl))))) (\r ->
-                    let rr = recurse val0 r
-                    in (Pairs.first rr, (Core.TermEither (Right (Pairs.second rr))))) v0
-                  Core.TermLambda v0 ->
-                    let rl = recurse val0 (Core.lambdaBody v0)
-                    in (Pairs.first rl, (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.lambdaParameter v0),
-                      Core.lambdaDomain = (Core.lambdaDomain v0),
-                      Core.lambdaBody = (Pairs.second rl)})))
-                  Core.TermLet v0 ->
-                    let renv = recurse val0 (Core.letBody v0)
-                    in (forMany forBinding (\bins -> Core.TermLet (Core.Let {
-                      Core.letBindings = bins,
-                      Core.letBody = (Pairs.second renv)})) (Pairs.first renv) (Core.letBindings v0))
-                  Core.TermList v0 -> forMany recurse (\x -> Core.TermList x) val0 v0
-                  Core.TermMap v0 -> forMany forPair (\pairs -> Core.TermMap (Maps.fromList pairs)) val0 (Maps.toList v0)
-                  Core.TermMaybe v0 -> Maybes.maybe dflt (\t -> forSingle recurse (\t1 -> Core.TermMaybe (Just t1)) val0 t) v0
-                  Core.TermPair v0 ->
-                    let rf = recurse val0 (Pairs.first v0)
-                        rs = recurse (Pairs.first rf) (Pairs.second v0)
-                    in (Pairs.first rs, (Core.TermPair (Pairs.second rf, (Pairs.second rs))))
-                  Core.TermProject v0 -> (val0, (Core.TermProject v0))
-                  Core.TermRecord v0 -> forMany forField (\fields -> Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.recordTypeName v0),
-                    Core.recordFields = fields})) val0 (Core.recordFields v0)
-                  Core.TermSet v0 -> forMany recurse (\e -> Core.TermSet (Sets.fromList e)) val0 (Sets.toList v0)
-                  Core.TermTypeApplication v0 -> forSingle recurse (\t -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = t,
-                    Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})) val0 (Core.typeApplicationTermBody v0)
-                  Core.TermTypeLambda v0 -> forSingle recurse (\t -> Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                    Core.typeLambdaBody = t})) val0 (Core.typeLambdaBody v0)
-                  Core.TermInject v0 -> forSingle recurse (\t -> Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.injectionTypeName v0),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.fieldName (Core.injectionField v0)),
-                      Core.fieldTerm = t}})) val0 (Core.fieldTerm (Core.injectionField v0))
-                  Core.TermUnwrap v0 -> (val0, (Core.TermUnwrap v0))
-                  Core.TermWrap v0 -> forSingle recurse (\t -> Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                    Core.wrappedTermBody = t})) val0 (Core.wrappedTermBody v0)
-                  _ -> dflt
-          recurse = f (fsub recurse)
-      in (recurse term0)
--- | Rewrite a term while folding to produce a value, with Graph updated as we descend into subterms. Combines the features of rewriteAndFoldTerm and rewriteTermWithGraph. The user function f receives a recurse function that handles subterm traversal and Graph management.
-rewriteAndFoldTermWithGraph :: ((t0 -> Core.Term -> (t0, Core.Term)) -> Graph.Graph -> t0 -> Core.Term -> (t0, Core.Term)) -> Graph.Graph -> t0 -> Core.Term -> (t0, Core.Term)
-rewriteAndFoldTermWithGraph f cx0 val0 term0 =
-
-      let wrapper =
-              \lowLevelRecurse -> \valAndCx -> \term ->
-                let val = Pairs.first valAndCx
-                    cx = Pairs.second valAndCx
-                    cx1 =
-                            case term of
-                              Core.TermLambda v0 -> Scoping.extendGraphForLambda cx v0
-                              Core.TermLet v0 -> Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) cx v0
-                              Core.TermTypeLambda v0 -> Scoping.extendGraphForTypeLambda cx v0
-                              _ -> cx
-                    recurseForUser =
-                            \newVal -> \subterm ->
-                              let result = lowLevelRecurse (newVal, cx1) subterm
-                              in (Pairs.first (Pairs.first result), (Pairs.second result))
-                    fResult = f recurseForUser cx1 val term
-                in ((Pairs.first fResult, cx), (Pairs.second fResult))
-          result = rewriteAndFoldTerm wrapper (val0, cx0) term0
-      in (Pairs.first (Pairs.first result), (Pairs.second result))
--- | Rewrite a term while folding to produce a value, with both Graph and accessor path tracked. The path is a list of SubtermSteps representing the position from the root to the current term. Combines the features of rewriteAndFoldTermWithPath and Graph tracking. The Graph is automatically updated when descending into lambdas, lets, and type lambdas.
-rewriteAndFoldTermWithGraphAndPath :: ((t0 -> Core.Term -> (t0, Core.Term)) -> [Paths.SubtermStep] -> Graph.Graph -> t0 -> Core.Term -> (t0, Core.Term)) -> Graph.Graph -> t0 -> Core.Term -> (t0, Core.Term)
-rewriteAndFoldTermWithGraphAndPath f cx0 val0 term0 =
-
-      let wrapper =
-              \recurse -> \path -> \cxAndVal -> \term ->
-                let cx = Pairs.first cxAndVal
-                    val = Pairs.second cxAndVal
-                    cx1 =
-                            case term of
-                              Core.TermLambda v0 -> Scoping.extendGraphForLambda cx v0
-                              Core.TermLet v0 -> Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) cx v0
-                              Core.TermTypeLambda v0 -> Scoping.extendGraphForTypeLambda cx v0
-                              _ -> cx
-                    recurseForUser =
-                            \valIn -> \termIn ->
-                              let result = recurse path (cx1, valIn) termIn
-                              in (Pairs.second (Pairs.first result), (Pairs.second result))
-                    fResult = f recurseForUser path cx1 val term
-                in ((cx, (Pairs.first fResult)), (Pairs.second fResult))
-          result = rewriteAndFoldTermWithPath wrapper (cx0, val0) term0
-      in (Pairs.second (Pairs.first result), (Pairs.second result))
--- | Rewrite a term with path tracking, and fold a function over it, accumulating a value. The path is a list of SubtermSteps from root to current position.
-rewriteAndFoldTermWithPath :: (([Paths.SubtermStep] -> t0 -> Core.Term -> (t0, Core.Term)) -> [Paths.SubtermStep] -> t0 -> Core.Term -> (t0, Core.Term)) -> t0 -> Core.Term -> (t0, Core.Term)
-rewriteAndFoldTermWithPath f term0 =
-
-      let fsub =
-              \recurse -> \path -> \val0 -> \term02 ->
-                let forSingleWithAccessor =
-                        \rec -> \cons -> \accessor -> \val -> \term ->
-                          let r = rec (Lists.concat2 path [
-                                accessor]) val term
-                          in (Pairs.first r, (cons (Pairs.second r)))
-                    forManyWithAccessors =
-                            \rec -> \cons -> \val -> \accessorTermPairs ->
-                              let rr =
-                                      Lists.foldl (\r -> \atp ->
-                                        let r2 = rec (Lists.concat2 path [
-                                              Pairs.first atp]) (Pairs.first r) (Pairs.second atp)
-                                        in (Pairs.first r2, (Lists.cons (Pairs.second r2) (Pairs.second r)))) (val, []) accessorTermPairs
-                              in (Pairs.first rr, (cons (Lists.reverse (Pairs.second rr))))
-                    forFieldWithAccessor =
-                            \mkAccessor -> \val -> \field ->
-                              let r = recurse (Lists.concat2 path [
-                                    mkAccessor (Core.fieldName field)]) val (Core.fieldTerm field)
-                              in (Pairs.first r, Core.Field {
-                                Core.fieldName = (Core.fieldName field),
-                                Core.fieldTerm = (Pairs.second r)})
-                    forFieldsWithAccessor =
-                            \mkAccessor -> forManyWithAccessors (\path1 -> \val1 -> \field1 -> forFieldWithAccessor mkAccessor val1 field1) (\x -> x)
-                    forPairWithAccessors =
-                            \keyAccessor -> \valAccessor -> \val -> \kv ->
-                              let rk = recurse (Lists.concat2 path [
-                                    keyAccessor]) val (Pairs.first kv)
-                                  rv = recurse (Lists.concat2 path [
-                                        valAccessor]) (Pairs.first rk) (Pairs.second kv)
-                              in (Pairs.first rv, (Pairs.second rk, (Pairs.second rv)))
-                    forBindingWithAccessor =
-                            \val -> \binding ->
-                              let r = recurse (Lists.concat2 path [
-                                    Paths.SubtermStepLetBinding (Core.bindingName binding)]) val (Core.bindingTerm binding)
-                              in (Pairs.first r, Core.Binding {
-                                Core.bindingName = (Core.bindingName binding),
-                                Core.bindingTerm = (Pairs.second r),
-                                Core.bindingTypeScheme = (Core.bindingTypeScheme binding)})
-                    dflt = (val0, term02)
-                in case term02 of
-                  Core.TermAnnotated v0 -> forSingleWithAccessor recurse (\t -> Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = t,
-                    Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})) Paths.SubtermStepAnnotatedBody val0 (Core.annotatedTermBody v0)
-                  Core.TermApplication v0 ->
-                    let rlhs = recurse (Lists.concat2 path [
-                          Paths.SubtermStepApplicationFunction]) val0 (Core.applicationFunction v0)
-                        rrhs = recurse (Lists.concat2 path [
-                              Paths.SubtermStepApplicationArgument]) (Pairs.first rlhs) (Core.applicationArgument v0)
-                    in (Pairs.first rrhs, (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Pairs.second rlhs),
-                      Core.applicationArgument = (Pairs.second rrhs)})))
-                  Core.TermCases v0 ->
-                    let rmd =
-                            Maybes.map (\def -> recurse (Lists.concat2 path [
-                              Paths.SubtermStepUnionCasesDefault]) val0 def) (Core.caseStatementDefault v0)
-                        val1 = Maybes.maybe val0 Pairs.first rmd
-                        rcases =
-                                forManyWithAccessors recurse (\x -> x) val1 (Lists.map (\f2 -> (Paths.SubtermStepUnionCasesBranch (Core.fieldName f2), (Core.fieldTerm f2))) (Core.caseStatementCases v0))
-                    in (Pairs.first rcases, (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                      Core.caseStatementDefault = (Maybes.map Pairs.second rmd),
-                      Core.caseStatementCases = (Lists.map (\ft -> Core.Field {
-                        Core.fieldName = (Pairs.first ft),
-                        Core.fieldTerm = (Pairs.second ft)}) (Lists.zip (Lists.map Core.fieldName (Core.caseStatementCases v0)) (Pairs.second rcases)))})))
-                  Core.TermEither v0 -> Eithers.either (\l ->
-                    let rl = recurse (Lists.concat2 path [
-                          Paths.SubtermStepSumTerm]) val0 l
-                    in (Pairs.first rl, (Core.TermEither (Left (Pairs.second rl))))) (\r ->
-                    let rr = recurse (Lists.concat2 path [
-                          Paths.SubtermStepSumTerm]) val0 r
-                    in (Pairs.first rr, (Core.TermEither (Right (Pairs.second rr))))) v0
-                  Core.TermLambda v0 ->
-                    let rl = recurse (Lists.concat2 path [
-                          Paths.SubtermStepLambdaBody]) val0 (Core.lambdaBody v0)
-                    in (Pairs.first rl, (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.lambdaParameter v0),
-                      Core.lambdaDomain = (Core.lambdaDomain v0),
-                      Core.lambdaBody = (Pairs.second rl)})))
-                  Core.TermLet v0 ->
-                    let renv = recurse (Lists.concat2 path [
-                          Paths.SubtermStepLetBody]) val0 (Core.letBody v0)
-                        rbindings =
-                                Lists.foldl (\r -> \binding ->
-                                  let rb = forBindingWithAccessor (Pairs.first r) binding
-                                  in (Pairs.first rb, (Lists.cons (Pairs.second rb) (Pairs.second r)))) (Pairs.first renv, []) (Core.letBindings v0)
-                    in (Pairs.first rbindings, (Core.TermLet (Core.Let {
-                      Core.letBindings = (Lists.reverse (Pairs.second rbindings)),
-                      Core.letBody = (Pairs.second renv)})))
-                  Core.TermList v0 ->
-                    let idx = 0
-                        rr =
-                                Lists.foldl (\r -> \el ->
-                                  let r2 = recurse (Lists.concat2 path [
-                                        Paths.SubtermStepListElement (Pairs.first r)]) (Pairs.first (Pairs.second r)) el
-                                  in (Math.add (Pairs.first r) 1, (Pairs.first r2, (Lists.cons (Pairs.second r2) (Pairs.second (Pairs.second r)))))) (idx, (val0, [])) v0
-                    in (Pairs.first (Pairs.second rr), (Core.TermList (Lists.reverse (Pairs.second (Pairs.second rr)))))
-                  Core.TermMap v0 ->
-                    let idx = 0
-                        rr =
-                                Lists.foldl (\r -> \kv ->
-                                  let rk = recurse (Lists.concat2 path [
-                                        Paths.SubtermStepMapKey (Pairs.first r)]) (Pairs.first (Pairs.second r)) (Pairs.first kv)
-                                      rv = recurse (Lists.concat2 path [
-                                            Paths.SubtermStepMapValue (Pairs.first r)]) (Pairs.first rk) (Pairs.second kv)
-                                  in (Math.add (Pairs.first r) 1, (Pairs.first rv, (Lists.cons (Pairs.second rk, (Pairs.second rv)) (Pairs.second (Pairs.second r)))))) (idx, (val0, [])) (Maps.toList v0)
-                    in (Pairs.first (Pairs.second rr), (Core.TermMap (Maps.fromList (Lists.reverse (Pairs.second (Pairs.second rr))))))
-                  Core.TermMaybe v0 -> Maybes.maybe dflt (\t -> forSingleWithAccessor recurse (\t1 -> Core.TermMaybe (Just t1)) Paths.SubtermStepMaybeTerm val0 t) v0
-                  Core.TermPair v0 ->
-                    let rf = recurse (Lists.concat2 path [
-                          Paths.SubtermStepProductTerm 0]) val0 (Pairs.first v0)
-                        rs = recurse (Lists.concat2 path [
-                              Paths.SubtermStepProductTerm 1]) (Pairs.first rf) (Pairs.second v0)
-                    in (Pairs.first rs, (Core.TermPair (Pairs.second rf, (Pairs.second rs))))
-                  Core.TermProject v0 -> (val0, (Core.TermProject v0))
-                  Core.TermRecord v0 ->
-                    let rfields =
-                            forManyWithAccessors recurse (\x -> x) val0 (Lists.map (\f2 -> (Paths.SubtermStepRecordField (Core.fieldName f2), (Core.fieldTerm f2))) (Core.recordFields v0))
-                    in (Pairs.first rfields, (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.recordTypeName v0),
-                      Core.recordFields = (Lists.map (\ft -> Core.Field {
-                        Core.fieldName = (Pairs.first ft),
-                        Core.fieldTerm = (Pairs.second ft)}) (Lists.zip (Lists.map Core.fieldName (Core.recordFields v0)) (Pairs.second rfields)))})))
-                  Core.TermSet v0 ->
-                    let idx = 0
-                        rr =
-                                Lists.foldl (\r -> \el ->
-                                  let r2 = recurse (Lists.concat2 path [
-                                        Paths.SubtermStepSetElement (Pairs.first r)]) (Pairs.first (Pairs.second r)) el
-                                  in (Math.add (Pairs.first r) 1, (Pairs.first r2, (Lists.cons (Pairs.second r2) (Pairs.second (Pairs.second r)))))) (idx, (val0, [])) (Sets.toList v0)
-                    in (Pairs.first (Pairs.second rr), (Core.TermSet (Sets.fromList (Lists.reverse (Pairs.second (Pairs.second rr))))))
-                  Core.TermTypeApplication v0 -> forSingleWithAccessor recurse (\t -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = t,
-                    Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})) Paths.SubtermStepTypeApplicationTerm val0 (Core.typeApplicationTermBody v0)
-                  Core.TermTypeLambda v0 -> forSingleWithAccessor recurse (\t -> Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                    Core.typeLambdaBody = t})) Paths.SubtermStepTypeLambdaBody val0 (Core.typeLambdaBody v0)
-                  Core.TermInject v0 -> forSingleWithAccessor recurse (\t -> Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.injectionTypeName v0),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.fieldName (Core.injectionField v0)),
-                      Core.fieldTerm = t}})) Paths.SubtermStepInjectionTerm val0 (Core.fieldTerm (Core.injectionField v0))
-                  Core.TermUnwrap v0 -> (val0, (Core.TermUnwrap v0))
-                  Core.TermWrap v0 -> forSingleWithAccessor recurse (\t -> Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                    Core.wrappedTermBody = t})) Paths.SubtermStepWrappedTerm val0 (Core.wrappedTermBody v0)
-                  _ -> dflt
-          recurse = f (fsub recurse)
-      in (recurse [] term0)
-rewriteTerm :: ((Core.Term -> Core.Term) -> Core.Term -> Core.Term) -> Core.Term -> Core.Term
-rewriteTerm f term0 =
-
-      let fsub =
-              \recurse -> \term ->
-                let forField =
-                        \f2 -> Core.Field {
-                          Core.fieldName = (Core.fieldName f2),
-                          Core.fieldTerm = (recurse (Core.fieldTerm f2))}
-                    forLet =
-                            \lt ->
-                              let mapBinding =
-                                      \b -> Core.Binding {
-                                        Core.bindingName = (Core.bindingName b),
-                                        Core.bindingTerm = (recurse (Core.bindingTerm b)),
-                                        Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                              in Core.Let {
-                                Core.letBindings = (Lists.map mapBinding (Core.letBindings lt)),
-                                Core.letBody = (recurse (Core.letBody lt))}
-                    forMap =
-                            \m ->
-                              let forPair = \p -> (recurse (Pairs.first p), (recurse (Pairs.second p)))
-                              in (Maps.fromList (Lists.map forPair (Maps.toList m)))
-                in case term of
-                  Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (recurse (Core.annotatedTermBody v0)),
-                    Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-                  Core.TermApplication v0 -> Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (recurse (Core.applicationFunction v0)),
-                    Core.applicationArgument = (recurse (Core.applicationArgument v0))})
-                  Core.TermCases v0 -> Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                    Core.caseStatementDefault = (Maybes.map recurse (Core.caseStatementDefault v0)),
-                    Core.caseStatementCases = (Lists.map forField (Core.caseStatementCases v0))})
-                  Core.TermEither v0 -> Core.TermEither (Eithers.either (\l -> Left (recurse l)) (\r -> Right (recurse r)) v0)
-                  Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.lambdaParameter v0),
-                    Core.lambdaDomain = (Core.lambdaDomain v0),
-                    Core.lambdaBody = (recurse (Core.lambdaBody v0))})
-                  Core.TermLet v0 -> Core.TermLet (forLet v0)
-                  Core.TermList v0 -> Core.TermList (Lists.map recurse v0)
-                  Core.TermLiteral v0 -> Core.TermLiteral v0
-                  Core.TermMap v0 -> Core.TermMap (forMap v0)
-                  Core.TermMaybe v0 -> Core.TermMaybe (Maybes.map recurse v0)
-                  Core.TermPair v0 -> Core.TermPair (recurse (Pairs.first v0), (recurse (Pairs.second v0)))
-                  Core.TermProject v0 -> Core.TermProject v0
-                  Core.TermRecord v0 -> Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.recordTypeName v0),
-                    Core.recordFields = (Lists.map forField (Core.recordFields v0))})
-                  Core.TermSet v0 -> Core.TermSet (Sets.fromList (Lists.map recurse (Sets.toList v0)))
-                  Core.TermTypeApplication v0 -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (recurse (Core.typeApplicationTermBody v0)),
-                    Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})
-                  Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                    Core.typeLambdaBody = (recurse (Core.typeLambdaBody v0))})
-                  Core.TermInject v0 -> Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.injectionTypeName v0),
-                    Core.injectionField = (forField (Core.injectionField v0))})
-                  Core.TermUnit -> Core.TermUnit
-                  Core.TermUnwrap v0 -> Core.TermUnwrap v0
-                  Core.TermVariable v0 -> Core.TermVariable v0
-                  Core.TermWrap v0 -> Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                    Core.wrappedTermBody = (recurse (Core.wrappedTermBody v0))})
-          recurse = f (fsub recurse)
-      in (recurse term0)
--- | Either-based term rewriting with custom transformation function
-rewriteTermM :: ((Core.Term -> Either t0 Core.Term) -> Core.Term -> Either t0 Core.Term) -> Core.Term -> Either t0 Core.Term
-rewriteTermM f term0 =
-
-      let fsub =
-              \recurse -> \term ->
-                let forField =
-                        \field -> Eithers.bind (recurse (Core.fieldTerm field)) (\t -> Right (Core.Field {
-                          Core.fieldName = (Core.fieldName field),
-                          Core.fieldTerm = t}))
-                    forPair =
-                            \kv -> Eithers.bind (recurse (Pairs.first kv)) (\k -> Eithers.bind (recurse (Pairs.second kv)) (\v -> Right (k, v)))
-                    mapBinding =
-                            \b -> Eithers.bind (recurse (Core.bindingTerm b)) (\v -> Right (Core.Binding {
-                              Core.bindingName = (Core.bindingName b),
-                              Core.bindingTerm = v,
-                              Core.bindingTypeScheme = (Core.bindingTypeScheme b)}))
-                in case term of
-                  Core.TermAnnotated v0 -> Eithers.bind (recurse (Core.annotatedTermBody v0)) (\ex -> Right (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = ex,
-                    Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})))
-                  Core.TermApplication v0 -> Eithers.bind (recurse (Core.applicationFunction v0)) (\lhs -> Eithers.bind (recurse (Core.applicationArgument v0)) (\rhs -> Right (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = lhs,
-                    Core.applicationArgument = rhs}))))
-                  Core.TermCases v0 ->
-                    let n = Core.caseStatementTypeName v0
-                        def = Core.caseStatementDefault v0
-                        csCases = Core.caseStatementCases v0
-                    in (Eithers.bind (Maybes.maybe (Right Nothing) (\t -> Eithers.map Maybes.pure (recurse t)) def) (\rdef -> Eithers.map (\rcases -> Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = n,
-                      Core.caseStatementDefault = rdef,
-                      Core.caseStatementCases = rcases})) (Eithers.mapList forField csCases)))
-                  Core.TermEither v0 -> Eithers.bind (Eithers.either (\l -> Eithers.map (\x -> Left x) (recurse l)) (\r -> Eithers.map (\x -> Right x) (recurse r)) v0) (\re -> Right (Core.TermEither re))
-                  Core.TermLambda v0 ->
-                    let v = Core.lambdaParameter v0
-                        d = Core.lambdaDomain v0
-                        body = Core.lambdaBody v0
-                    in (Eithers.bind (recurse body) (\rbody -> Right (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = v,
-                      Core.lambdaDomain = d,
-                      Core.lambdaBody = rbody}))))
-                  Core.TermLet v0 ->
-                    let bindings = Core.letBindings v0
-                        env = Core.letBody v0
-                    in (Eithers.bind (Eithers.mapList mapBinding bindings) (\rbindings -> Eithers.bind (recurse env) (\renv -> Right (Core.TermLet (Core.Let {
-                      Core.letBindings = rbindings,
-                      Core.letBody = renv})))))
-                  Core.TermList v0 -> Eithers.bind (Eithers.mapList recurse v0) (\rels -> Right (Core.TermList rels))
-                  Core.TermLiteral v0 -> Right (Core.TermLiteral v0)
-                  Core.TermMap v0 -> Eithers.bind (Eithers.mapList forPair (Maps.toList v0)) (\pairs -> Right (Core.TermMap (Maps.fromList pairs)))
-                  Core.TermMaybe v0 -> Eithers.bind (Eithers.mapMaybe recurse v0) (\rm -> Right (Core.TermMaybe rm))
-                  Core.TermPair v0 -> Eithers.bind (recurse (Pairs.first v0)) (\rf -> Eithers.bind (recurse (Pairs.second v0)) (\rs -> Right (Core.TermPair (rf, rs))))
-                  Core.TermProject v0 -> Right (Core.TermProject v0)
-                  Core.TermRecord v0 ->
-                    let n = Core.recordTypeName v0
-                        fields = Core.recordFields v0
-                    in (Eithers.map (\rfields -> Core.TermRecord (Core.Record {
-                      Core.recordTypeName = n,
-                      Core.recordFields = rfields})) (Eithers.mapList forField fields))
-                  Core.TermSet v0 -> Eithers.bind (Eithers.mapList recurse (Sets.toList v0)) (\rlist -> Right (Core.TermSet (Sets.fromList rlist)))
-                  Core.TermTypeApplication v0 -> Eithers.bind (recurse (Core.typeApplicationTermBody v0)) (\t -> Right (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = t,
-                    Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})))
-                  Core.TermTypeLambda v0 ->
-                    let v = Core.typeLambdaParameter v0
-                        body = Core.typeLambdaBody v0
-                    in (Eithers.bind (recurse body) (\rbody -> Right (Core.TermTypeLambda (Core.TypeLambda {
-                      Core.typeLambdaParameter = v,
-                      Core.typeLambdaBody = rbody}))))
-                  Core.TermInject v0 ->
-                    let n = Core.injectionTypeName v0
-                        field = Core.injectionField v0
-                    in (Eithers.map (\rfield -> Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = n,
-                      Core.injectionField = rfield})) (forField field))
-                  Core.TermUnit -> Right Core.TermUnit
-                  Core.TermUnwrap v0 -> Right (Core.TermUnwrap v0)
-                  Core.TermVariable v0 -> Right (Core.TermVariable v0)
-                  Core.TermWrap v0 ->
-                    let name = Core.wrappedTermTypeName v0
-                        t = Core.wrappedTermBody v0
-                    in (Eithers.bind (recurse t) (\rt -> Right (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = name,
-                      Core.wrappedTermBody = rt}))))
-          recurse = f (fsub recurse)
-      in (recurse term0)
--- | A variant of rewriteTerm which allows a context (e.g. a TypeContext) to be passed down to all subterms during rewriting
-rewriteTermWithContext :: ((t0 -> Core.Term -> Core.Term) -> t0 -> Core.Term -> Core.Term) -> t0 -> Core.Term -> Core.Term
-rewriteTermWithContext f cx0 term0 =
-
-      let forSubterms =
-              \recurse0 -> \cx -> \term ->
-                let recurse = recurse0 cx
-                    forField =
-                            \field -> Core.Field {
-                              Core.fieldName = (Core.fieldName field),
-                              Core.fieldTerm = (recurse (Core.fieldTerm field))}
-                    forLet =
-                            \lt ->
-                              let mapBinding =
-                                      \b -> Core.Binding {
-                                        Core.bindingName = (Core.bindingName b),
-                                        Core.bindingTerm = (recurse (Core.bindingTerm b)),
-                                        Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                              in Core.Let {
-                                Core.letBindings = (Lists.map mapBinding (Core.letBindings lt)),
-                                Core.letBody = (recurse (Core.letBody lt))}
-                    forMap =
-                            \m ->
-                              let forPair = \p -> (recurse (Pairs.first p), (recurse (Pairs.second p)))
-                              in (Maps.fromList (Lists.map forPair (Maps.toList m)))
-                in case term of
-                  Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (recurse (Core.annotatedTermBody v0)),
-                    Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})
-                  Core.TermApplication v0 -> Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (recurse (Core.applicationFunction v0)),
-                    Core.applicationArgument = (recurse (Core.applicationArgument v0))})
-                  Core.TermCases v0 -> Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.caseStatementTypeName v0),
-                    Core.caseStatementDefault = (Maybes.map recurse (Core.caseStatementDefault v0)),
-                    Core.caseStatementCases = (Lists.map forField (Core.caseStatementCases v0))})
-                  Core.TermEither v0 -> Core.TermEither (Eithers.either (\l -> Left (recurse l)) (\r -> Right (recurse r)) v0)
-                  Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.lambdaParameter v0),
-                    Core.lambdaDomain = (Core.lambdaDomain v0),
-                    Core.lambdaBody = (recurse (Core.lambdaBody v0))})
-                  Core.TermLet v0 -> Core.TermLet (forLet v0)
-                  Core.TermList v0 -> Core.TermList (Lists.map recurse v0)
-                  Core.TermLiteral v0 -> Core.TermLiteral v0
-                  Core.TermMap v0 -> Core.TermMap (forMap v0)
-                  Core.TermMaybe v0 -> Core.TermMaybe (Maybes.map recurse v0)
-                  Core.TermPair v0 -> Core.TermPair (recurse (Pairs.first v0), (recurse (Pairs.second v0)))
-                  Core.TermProject v0 -> Core.TermProject v0
-                  Core.TermRecord v0 -> Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.recordTypeName v0),
-                    Core.recordFields = (Lists.map forField (Core.recordFields v0))})
-                  Core.TermSet v0 -> Core.TermSet (Sets.fromList (Lists.map recurse (Sets.toList v0)))
-                  Core.TermTypeApplication v0 -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (recurse (Core.typeApplicationTermBody v0)),
-                    Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})
-                  Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.typeLambdaParameter v0),
-                    Core.typeLambdaBody = (recurse (Core.typeLambdaBody v0))})
-                  Core.TermInject v0 -> Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.injectionTypeName v0),
-                    Core.injectionField = (forField (Core.injectionField v0))})
-                  Core.TermUnit -> Core.TermUnit
-                  Core.TermUnwrap v0 -> Core.TermUnwrap v0
-                  Core.TermVariable v0 -> Core.TermVariable v0
-                  Core.TermWrap v0 -> Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),
-                    Core.wrappedTermBody = (recurse (Core.wrappedTermBody v0))})
-          rewrite = \cx -> \term -> f (forSubterms rewrite) cx term
-      in (rewrite cx0 term0)
--- | Either-based variant of rewriteTermWithContextM which allows a context (e.g. a TypeContext) to be passed down to all subterms during rewriting
-rewriteTermWithContextM :: ((t0 -> Core.Term -> Either t1 Core.Term) -> t0 -> Core.Term -> Either t1 Core.Term) -> t0 -> Core.Term -> Either t1 Core.Term
-rewriteTermWithContextM f cx0 term0 =
-
-      let forSubterms =
-              \recurse0 -> \cx -> \term ->
-                let recurse = recurse0 cx
-                    forField =
-                            \field -> Eithers.bind (recurse (Core.fieldTerm field)) (\t -> Right (Core.Field {
-                              Core.fieldName = (Core.fieldName field),
-                              Core.fieldTerm = t}))
-                    forPair =
-                            \kv -> Eithers.bind (recurse (Pairs.first kv)) (\k -> Eithers.bind (recurse (Pairs.second kv)) (\v -> Right (k, v)))
-                    mapBinding =
-                            \b -> Eithers.bind (recurse (Core.bindingTerm b)) (\v -> Right (Core.Binding {
-                              Core.bindingName = (Core.bindingName b),
-                              Core.bindingTerm = v,
-                              Core.bindingTypeScheme = (Core.bindingTypeScheme b)}))
-                in case term of
-                  Core.TermAnnotated v0 -> Eithers.bind (recurse (Core.annotatedTermBody v0)) (\ex -> Right (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = ex,
-                    Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})))
-                  Core.TermApplication v0 -> Eithers.bind (recurse (Core.applicationFunction v0)) (\lhs -> Eithers.bind (recurse (Core.applicationArgument v0)) (\rhs -> Right (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = lhs,
-                    Core.applicationArgument = rhs}))))
-                  Core.TermCases v0 ->
-                    let n = Core.caseStatementTypeName v0
-                        def = Core.caseStatementDefault v0
-                        csCases = Core.caseStatementCases v0
-                    in (Eithers.bind (Maybes.maybe (Right Nothing) (\t -> Eithers.map Maybes.pure (recurse t)) def) (\rdef -> Eithers.map (\rcases -> Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = n,
-                      Core.caseStatementDefault = rdef,
-                      Core.caseStatementCases = rcases})) (Eithers.mapList forField csCases)))
-                  Core.TermEither v0 -> Eithers.bind (Eithers.either (\l -> Eithers.map (\x -> Left x) (recurse l)) (\r -> Eithers.map (\x -> Right x) (recurse r)) v0) (\re -> Right (Core.TermEither re))
-                  Core.TermLambda v0 ->
-                    let v = Core.lambdaParameter v0
-                        d = Core.lambdaDomain v0
-                        body = Core.lambdaBody v0
-                    in (Eithers.bind (recurse body) (\rbody -> Right (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = v,
-                      Core.lambdaDomain = d,
-                      Core.lambdaBody = rbody}))))
-                  Core.TermLet v0 ->
-                    let bindings = Core.letBindings v0
-                        body = Core.letBody v0
-                    in (Eithers.bind (Eithers.mapList mapBinding bindings) (\rbindings -> Eithers.bind (recurse body) (\rbody -> Right (Core.TermLet (Core.Let {
-                      Core.letBindings = rbindings,
-                      Core.letBody = rbody})))))
-                  Core.TermList v0 -> Eithers.bind (Eithers.mapList recurse v0) (\rels -> Right (Core.TermList rels))
-                  Core.TermLiteral v0 -> Right (Core.TermLiteral v0)
-                  Core.TermMap v0 -> Eithers.bind (Eithers.mapList forPair (Maps.toList v0)) (\pairs -> Right (Core.TermMap (Maps.fromList pairs)))
-                  Core.TermMaybe v0 -> Eithers.bind (Eithers.mapMaybe recurse v0) (\rm -> Right (Core.TermMaybe rm))
-                  Core.TermPair v0 -> Eithers.bind (recurse (Pairs.first v0)) (\rfirst -> Eithers.bind (recurse (Pairs.second v0)) (\rsecond -> Right (Core.TermPair (rfirst, rsecond))))
-                  Core.TermProject v0 -> Right (Core.TermProject v0)
-                  Core.TermRecord v0 ->
-                    let n = Core.recordTypeName v0
-                        fields = Core.recordFields v0
-                    in (Eithers.map (\rfields -> Core.TermRecord (Core.Record {
-                      Core.recordTypeName = n,
-                      Core.recordFields = rfields})) (Eithers.mapList forField fields))
-                  Core.TermSet v0 -> Eithers.bind (Eithers.mapList recurse (Sets.toList v0)) (\rlist -> Right (Core.TermSet (Sets.fromList rlist)))
-                  Core.TermTypeApplication v0 -> Eithers.bind (recurse (Core.typeApplicationTermBody v0)) (\t -> Right (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = t,
-                    Core.typeApplicationTermType = (Core.typeApplicationTermType v0)})))
-                  Core.TermTypeLambda v0 ->
-                    let v = Core.typeLambdaParameter v0
-                        body = Core.typeLambdaBody v0
-                    in (Eithers.bind (recurse body) (\rbody -> Right (Core.TermTypeLambda (Core.TypeLambda {
-                      Core.typeLambdaParameter = v,
-                      Core.typeLambdaBody = rbody}))))
-                  Core.TermInject v0 ->
-                    let n = Core.injectionTypeName v0
-                        field = Core.injectionField v0
-                    in (Eithers.map (\rfield -> Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = n,
-                      Core.injectionField = rfield})) (forField field))
-                  Core.TermUnit -> Right Core.TermUnit
-                  Core.TermUnwrap v0 -> Right (Core.TermUnwrap v0)
-                  Core.TermVariable v0 -> Right (Core.TermVariable v0)
-                  Core.TermWrap v0 ->
-                    let name = Core.wrappedTermTypeName v0
-                        t = Core.wrappedTermBody v0
-                    in (Eithers.bind (recurse t) (\rt -> Right (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = name,
-                      Core.wrappedTermBody = rt}))))
-          rewrite = \cx -> \term -> f (forSubterms rewrite) cx term
-      in (rewrite cx0 term0)
--- | Rewrite a term with the help of a Graph which is updated as we descend into subterms
-rewriteTermWithGraph :: ((Core.Term -> t0) -> Graph.Graph -> Core.Term -> t0) -> Graph.Graph -> Core.Term -> t0
-rewriteTermWithGraph f cx0 term0 =
-
-      let f2 =
-              \recurse -> \cx -> \term ->
-                let recurse1 = \term2 -> recurse cx term2
-                in case term of
-                  Core.TermLambda v0 ->
-                    let cx1 = Scoping.extendGraphForLambda cx v0
-                        recurse2 = \term2 -> recurse cx1 term2
-                    in (f recurse2 cx1 term)
-                  Core.TermLet v0 ->
-                    let cx1 = Scoping.extendGraphForLet (\_ -> \_2 -> Nothing) cx v0
-                        recurse2 = \term2 -> recurse cx1 term2
-                    in (f recurse2 cx1 term)
-                  Core.TermTypeLambda v0 ->
-                    let cx1 = Scoping.extendGraphForTypeLambda cx v0
-                        recurse2 = \term2 -> recurse cx1 term2
-                    in (f recurse2 cx1 term)
-                  _ -> f recurse1 cx term
-          rewrite = \cx -> \term -> f2 rewrite cx term
-      in (rewrite cx0 term0)
-rewriteType :: ((Core.Type -> Core.Type) -> Core.Type -> Core.Type) -> Core.Type -> Core.Type
-rewriteType f typ0 =
-
-      let fsub =
-              \recurse -> \typ ->
-                let forField =
-                        \field -> Core.FieldType {
-                          Core.fieldTypeName = (Core.fieldTypeName field),
-                          Core.fieldTypeType = (recurse (Core.fieldTypeType field))}
-                in case typ of
-                  Core.TypeAnnotated v0 -> Core.TypeAnnotated (Core.AnnotatedType {
-                    Core.annotatedTypeBody = (recurse (Core.annotatedTypeBody v0)),
-                    Core.annotatedTypeAnnotation = (Core.annotatedTypeAnnotation v0)})
-                  Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (recurse (Core.applicationTypeFunction v0)),
-                    Core.applicationTypeArgument = (recurse (Core.applicationTypeArgument v0))})
-                  Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (recurse (Core.eitherTypeLeft v0)),
-                    Core.eitherTypeRight = (recurse (Core.eitherTypeRight v0))})
-                  Core.TypePair v0 -> Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (recurse (Core.pairTypeFirst v0)),
-                    Core.pairTypeSecond = (recurse (Core.pairTypeSecond v0))})
-                  Core.TypeFunction v0 -> Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (recurse (Core.functionTypeDomain v0)),
-                    Core.functionTypeCodomain = (recurse (Core.functionTypeCodomain v0))})
-                  Core.TypeForall v0 -> Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.forallTypeParameter v0),
-                    Core.forallTypeBody = (recurse (Core.forallTypeBody v0))})
-                  Core.TypeList v0 -> Core.TypeList (recurse v0)
-                  Core.TypeLiteral v0 -> Core.TypeLiteral v0
-                  Core.TypeMap v0 -> Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (recurse (Core.mapTypeKeys v0)),
-                    Core.mapTypeValues = (recurse (Core.mapTypeValues v0))})
-                  Core.TypeMaybe v0 -> Core.TypeMaybe (recurse v0)
-                  Core.TypeRecord v0 -> Core.TypeRecord (Lists.map forField v0)
-                  Core.TypeSet v0 -> Core.TypeSet (recurse v0)
-                  Core.TypeUnion v0 -> Core.TypeUnion (Lists.map forField v0)
-                  Core.TypeUnit -> Core.TypeUnit
-                  Core.TypeVariable v0 -> Core.TypeVariable v0
-                  Core.TypeVoid -> Core.TypeVoid
-                  Core.TypeWrap v0 -> Core.TypeWrap (recurse v0)
-          recurse = f (fsub recurse)
-      in (recurse typ0)
--- | Either-based type rewriting
-rewriteTypeM :: ((Core.Type -> Either t0 Core.Type) -> Core.Type -> Either t0 Core.Type) -> Core.Type -> Either t0 Core.Type
-rewriteTypeM f typ0 =
-
-      let fsub =
-              \recurse -> \typ -> case typ of
-                Core.TypeAnnotated v0 -> Eithers.bind (recurse (Core.annotatedTypeBody v0)) (\t -> Right (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = t,
-                  Core.annotatedTypeAnnotation = (Core.annotatedTypeAnnotation v0)})))
-                Core.TypeApplication v0 -> Eithers.bind (recurse (Core.applicationTypeFunction v0)) (\lhs -> Eithers.bind (recurse (Core.applicationTypeArgument v0)) (\rhs -> Right (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = lhs,
-                  Core.applicationTypeArgument = rhs}))))
-                Core.TypeEither v0 -> Eithers.bind (recurse (Core.eitherTypeLeft v0)) (\left -> Eithers.bind (recurse (Core.eitherTypeRight v0)) (\right -> Right (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = left,
-                  Core.eitherTypeRight = right}))))
-                Core.TypePair v0 -> Eithers.bind (recurse (Core.pairTypeFirst v0)) (\pairFirst -> Eithers.bind (recurse (Core.pairTypeSecond v0)) (\pairSecond -> Right (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = pairFirst,
-                  Core.pairTypeSecond = pairSecond}))))
-                Core.TypeFunction v0 -> Eithers.bind (recurse (Core.functionTypeDomain v0)) (\dom -> Eithers.bind (recurse (Core.functionTypeCodomain v0)) (\cod -> Right (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = dom,
-                  Core.functionTypeCodomain = cod}))))
-                Core.TypeForall v0 -> Eithers.bind (recurse (Core.forallTypeBody v0)) (\b -> Right (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.forallTypeParameter v0),
-                  Core.forallTypeBody = b})))
-                Core.TypeList v0 -> Eithers.bind (recurse v0) (\rt -> Right (Core.TypeList rt))
-                Core.TypeLiteral v0 -> Right (Core.TypeLiteral v0)
-                Core.TypeMap v0 -> Eithers.bind (recurse (Core.mapTypeKeys v0)) (\kt -> Eithers.bind (recurse (Core.mapTypeValues v0)) (\vt -> Right (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = kt,
-                  Core.mapTypeValues = vt}))))
-                Core.TypeMaybe v0 -> Eithers.bind (recurse v0) (\rt -> Right (Core.TypeMaybe rt))
-                Core.TypeRecord v0 ->
-                  let forField =
-                          \f2 -> Eithers.bind (recurse (Core.fieldTypeType f2)) (\t -> Right (Core.FieldType {
-                            Core.fieldTypeName = (Core.fieldTypeName f2),
-                            Core.fieldTypeType = t}))
-                  in (Eithers.bind (Eithers.mapList forField v0) (\rfields -> Right (Core.TypeRecord rfields)))
-                Core.TypeSet v0 -> Eithers.bind (recurse v0) (\rt -> Right (Core.TypeSet rt))
-                Core.TypeUnion v0 ->
-                  let forField =
-                          \f2 -> Eithers.bind (recurse (Core.fieldTypeType f2)) (\t -> Right (Core.FieldType {
-                            Core.fieldTypeName = (Core.fieldTypeName f2),
-                            Core.fieldTypeType = t}))
-                  in (Eithers.bind (Eithers.mapList forField v0) (\rfields -> Right (Core.TypeUnion rfields)))
-                Core.TypeUnit -> Right Core.TypeUnit
-                Core.TypeVariable v0 -> Right (Core.TypeVariable v0)
-                Core.TypeVoid -> Right Core.TypeVoid
-                Core.TypeWrap v0 -> Eithers.bind (recurse v0) (\t -> Right (Core.TypeWrap t))
-          recurse = f (fsub recurse)
-      in (recurse typ0)
--- | Find the children of a given term
-subterms :: Core.Term -> [Core.Term]
-subterms x =
-    case x of
-      Core.TermAnnotated v0 -> [
-        Core.annotatedTermBody v0]
-      Core.TermApplication v0 -> [
-        Core.applicationFunction v0,
-        (Core.applicationArgument v0)]
-      Core.TermCases v0 -> Lists.concat2 (Maybes.maybe [] (\t -> [
-        t]) (Core.caseStatementDefault v0)) (Lists.map Core.fieldTerm (Core.caseStatementCases v0))
-      Core.TermEither v0 -> Eithers.either (\l -> [
-        l]) (\r -> [
-        r]) v0
-      Core.TermLambda v0 -> [
-        Core.lambdaBody v0]
-      Core.TermLet v0 -> Lists.cons (Core.letBody v0) (Lists.map Core.bindingTerm (Core.letBindings v0))
-      Core.TermList v0 -> v0
-      Core.TermLiteral _ -> []
-      Core.TermMap v0 -> Lists.concat (Lists.map (\p -> [
-        Pairs.first p,
-        (Pairs.second p)]) (Maps.toList v0))
-      Core.TermMaybe v0 -> Maybes.maybe [] (\t -> [
-        t]) v0
-      Core.TermPair v0 -> [
-        Pairs.first v0,
-        (Pairs.second v0)]
-      Core.TermProject _ -> []
-      Core.TermRecord v0 -> Lists.map Core.fieldTerm (Core.recordFields v0)
-      Core.TermSet v0 -> Sets.toList v0
-      Core.TermTypeApplication v0 -> [
-        Core.typeApplicationTermBody v0]
-      Core.TermTypeLambda v0 -> [
-        Core.typeLambdaBody v0]
-      Core.TermInject v0 -> [
-        Core.fieldTerm (Core.injectionField v0)]
-      Core.TermUnit -> []
-      Core.TermUnwrap _ -> []
-      Core.TermVariable _ -> []
-      Core.TermWrap v0 -> [
-        Core.wrappedTermBody v0]
--- | Find the children of a given term
-subtermsWithSteps :: Core.Term -> [(Paths.SubtermStep, Core.Term)]
-subtermsWithSteps x =
-    case x of
-      Core.TermAnnotated v0 -> [
-        (Paths.SubtermStepAnnotatedBody, (Core.annotatedTermBody v0))]
-      Core.TermApplication v0 -> [
-        (Paths.SubtermStepApplicationFunction, (Core.applicationFunction v0)),
-        (Paths.SubtermStepApplicationArgument, (Core.applicationArgument v0))]
-      Core.TermCases v0 -> Lists.concat2 (Maybes.maybe [] (\t -> [
-        (Paths.SubtermStepUnionCasesDefault, t)]) (Core.caseStatementDefault v0)) (Lists.map (\f -> (Paths.SubtermStepUnionCasesBranch (Core.fieldName f), (Core.fieldTerm f))) (Core.caseStatementCases v0))
-      Core.TermEither _ -> []
-      Core.TermLambda v0 -> [
-        (Paths.SubtermStepLambdaBody, (Core.lambdaBody v0))]
-      Core.TermLet v0 -> Lists.cons (Paths.SubtermStepLetBody, (Core.letBody v0)) (Lists.map (\b -> (Paths.SubtermStepLetBinding (Core.bindingName b), (Core.bindingTerm b))) (Core.letBindings v0))
-      Core.TermList v0 -> Lists.map (\e -> (Paths.SubtermStepListElement 0, e)) v0
-      Core.TermLiteral _ -> []
-      Core.TermMap v0 -> Lists.concat (Lists.map (\p -> [
-        (Paths.SubtermStepMapKey 0, (Pairs.first p)),
-        (Paths.SubtermStepMapValue 0, (Pairs.second p))]) (Maps.toList v0))
-      Core.TermMaybe v0 -> Maybes.maybe [] (\t -> [
-        (Paths.SubtermStepMaybeTerm, t)]) v0
-      Core.TermPair _ -> []
-      Core.TermProject _ -> []
-      Core.TermRecord v0 -> Lists.map (\f -> (Paths.SubtermStepRecordField (Core.fieldName f), (Core.fieldTerm f))) (Core.recordFields v0)
-      Core.TermSet v0 -> Lists.map (\e -> (Paths.SubtermStepListElement 0, e)) (Sets.toList v0)
-      Core.TermTypeApplication v0 -> [
-        (Paths.SubtermStepTypeApplicationTerm, (Core.typeApplicationTermBody v0))]
-      Core.TermTypeLambda v0 -> [
-        (Paths.SubtermStepTypeLambdaBody, (Core.typeLambdaBody v0))]
-      Core.TermInject v0 -> [
-        (Paths.SubtermStepInjectionTerm, (Core.fieldTerm (Core.injectionField v0)))]
-      Core.TermUnit -> []
-      Core.TermUnwrap _ -> []
-      Core.TermVariable _ -> []
-      Core.TermWrap v0 -> [
-        (Paths.SubtermStepWrappedTerm, (Core.wrappedTermBody v0))]
--- | Find the children of a given type expression
-subtypes :: Core.Type -> [Core.Type]
-subtypes x =
-    case x of
-      Core.TypeAnnotated v0 -> [
-        Core.annotatedTypeBody v0]
-      Core.TypeApplication v0 -> [
-        Core.applicationTypeFunction v0,
-        (Core.applicationTypeArgument v0)]
-      Core.TypeEither v0 -> [
-        Core.eitherTypeLeft v0,
-        (Core.eitherTypeRight v0)]
-      Core.TypePair v0 -> [
-        Core.pairTypeFirst v0,
-        (Core.pairTypeSecond v0)]
-      Core.TypeFunction v0 -> [
-        Core.functionTypeDomain v0,
-        (Core.functionTypeCodomain v0)]
-      Core.TypeForall v0 -> [
-        Core.forallTypeBody v0]
-      Core.TypeList v0 -> [
-        v0]
-      Core.TypeLiteral _ -> []
-      Core.TypeMap v0 -> [
-        Core.mapTypeKeys v0,
-        (Core.mapTypeValues v0)]
-      Core.TypeMaybe v0 -> [
-        v0]
-      Core.TypeRecord v0 -> Lists.map Core.fieldTypeType v0
-      Core.TypeSet v0 -> [
-        v0]
-      Core.TypeUnion v0 -> Lists.map Core.fieldTypeType v0
-      Core.TypeUnit -> []
-      Core.TypeVariable _ -> []
-      Core.TypeVoid -> []
-      Core.TypeWrap v0 -> [
-        v0]
diff --git a/src/main/haskell/Hydra/Rust/Coder.hs b/src/main/haskell/Hydra/Rust/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rust/Coder.hs
+++ /dev/null
@@ -1,489 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Rust code generator: converts Hydra type and term modules to Rust source code
-
-module Hydra.Rust.Coder where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Rust.Language as Language
-import qualified Hydra.Rust.Serde as Serde
-import qualified Hydra.Rust.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Util as Util
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
-encodeEnumVariant :: t0 -> t1 -> Core.FieldType -> Either Errors.Error Syntax.EnumVariant
-encodeEnumVariant cx g ft =
-
-      let fname = Core.unName (Core.fieldTypeName ft)
-          ftyp = Core.fieldTypeType ft
-          dtyp = Strip.deannotateType ftyp
-          isUnit =
-                  case dtyp of
-                    Core.TypeUnit -> True
-                    Core.TypeRecord v0 -> Lists.null v0
-                    _ -> False
-      in (Logic.ifElse isUnit (Right (Syntax.EnumVariant {
-        Syntax.enumVariantName = (Formatting.capitalize fname),
-        Syntax.enumVariantBody = Syntax.EnumVariantBodyUnit,
-        Syntax.enumVariantDoc = Nothing})) (case dtyp of
-        Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (encodeStructField cx g) v0) (\sfields -> Right (Syntax.EnumVariant {
-          Syntax.enumVariantName = (Formatting.capitalize fname),
-          Syntax.enumVariantBody = (Syntax.EnumVariantBodyStruct sfields),
-          Syntax.enumVariantDoc = Nothing}))
-        _ -> Eithers.bind (encodeType cx g ftyp) (\sftyp -> Right (Syntax.EnumVariant {
-          Syntax.enumVariantName = (Formatting.capitalize fname),
-          Syntax.enumVariantBody = (Syntax.EnumVariantBodyTuple [
-            sftyp]),
-          Syntax.enumVariantDoc = Nothing}))))
-
-encodeLiteral :: Core.Literal -> Syntax.Expression
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBoolean v0 -> Syntax.ExpressionLiteral (Syntax.LiteralBool v0)
-      Core.LiteralString v0 -> Syntax.ExpressionLiteral (Syntax.LiteralString v0)
-      Core.LiteralFloat v0 -> case v0 of
-        Core.FloatValueFloat32 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-          Syntax.floatLiteralValue = (Literals.bigfloatToFloat64 (Literals.float32ToBigfloat v1)),
-          Syntax.floatLiteralSuffix = (Just "f32")}))
-        Core.FloatValueFloat64 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-          Syntax.floatLiteralValue = v1,
-          Syntax.floatLiteralSuffix = Nothing}))
-        Core.FloatValueBigfloat v1 -> Syntax.ExpressionLiteral (Syntax.LiteralFloat (Syntax.FloatLiteral {
-          Syntax.floatLiteralValue = (Literals.bigfloatToFloat64 v1),
-          Syntax.floatLiteralSuffix = Nothing}))
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueInt8 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int8ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "i8")}))
-        Core.IntegerValueInt16 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int16ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "i16")}))
-        Core.IntegerValueInt32 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int32ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "i32")}))
-        Core.IntegerValueInt64 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.int64ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "i64")}))
-        Core.IntegerValueUint8 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint8ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "u8")}))
-        Core.IntegerValueUint16 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint16ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "u16")}))
-        Core.IntegerValueUint32 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint32ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "u32")}))
-        Core.IntegerValueUint64 v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = (Literals.uint64ToBigint v1),
-          Syntax.integerLiteralSuffix = (Just "u64")}))
-        Core.IntegerValueBigint v1 -> Syntax.ExpressionLiteral (Syntax.LiteralInteger (Syntax.IntegerLiteral {
-          Syntax.integerLiteralValue = v1,
-          Syntax.integerLiteralSuffix = Nothing}))
-
-encodeLiteralType :: Core.LiteralType -> Syntax.Type
-encodeLiteralType lt =
-    case lt of
-      Core.LiteralTypeBinary -> rustApply1 "Vec" (rustPath "u8")
-      Core.LiteralTypeBoolean -> rustPath "bool"
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeBigfloat -> rustPath "f64"
-        Core.FloatTypeFloat32 -> rustPath "f32"
-        Core.FloatTypeFloat64 -> rustPath "f64"
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeBigint -> rustPathSegmented [
-          "num",
-          "BigInt"]
-        Core.IntegerTypeInt8 -> rustPath "i8"
-        Core.IntegerTypeInt16 -> rustPath "i16"
-        Core.IntegerTypeInt32 -> rustPath "i32"
-        Core.IntegerTypeInt64 -> rustPath "i64"
-        Core.IntegerTypeUint8 -> rustPath "u8"
-        Core.IntegerTypeUint16 -> rustPath "u16"
-        Core.IntegerTypeUint32 -> rustPath "u32"
-        Core.IntegerTypeUint64 -> rustPath "u64"
-      Core.LiteralTypeString -> rustPath "String"
-
-encodeProjectionElim :: t0 -> t1 -> Core.Projection -> Maybe Core.Term -> Either Errors.Error Syntax.Expression
-encodeProjectionElim cx g proj marg =
-
-      let fname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.projectionField proj))
-      in (Maybes.cases marg (Right (rustClosure [
-        "v"] (Syntax.ExpressionFieldAccess (Syntax.FieldAccessExpr {
-        Syntax.fieldAccessExprObject = (rustExprPath "v"),
-        Syntax.fieldAccessExprField = fname})))) (\arg -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.ExpressionFieldAccess (Syntax.FieldAccessExpr {
-        Syntax.fieldAccessExprObject = sarg,
-        Syntax.fieldAccessExprField = fname})))))
-
-encodeStructField :: t0 -> t1 -> Core.FieldType -> Either Errors.Error Syntax.StructField
-encodeStructField cx g ft =
-
-      let fname = Core.unName (Core.fieldTypeName ft)
-          ftyp = Core.fieldTypeType ft
-      in (Eithers.bind (encodeType cx g ftyp) (\sftyp -> Right (Syntax.StructField {
-        Syntax.structFieldName = (Formatting.convertCaseCamelToLowerSnake (Formatting.sanitizeWithUnderscores Language.rustReservedWords fname)),
-        Syntax.structFieldType = sftyp,
-        Syntax.structFieldPublic = True,
-        Syntax.structFieldDoc = Nothing})))
-
-encodeTerm :: t0 -> t1 -> Core.Term -> Either Errors.Error Syntax.Expression
-encodeTerm cx g term =
-    case term of
-      Core.TermAnnotated v0 -> encodeTerm cx g (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> Eithers.bind (encodeTerm cx g (Core.applicationFunction v0)) (\fun -> Eithers.bind (encodeTerm cx g (Core.applicationArgument v0)) (\arg -> Right (rustCall fun [
-        arg])))
-      Core.TermEither v0 -> Eithers.either (\l -> Eithers.bind (encodeTerm cx g l) (\sl -> Right (rustCall (rustExprPath "Left") [
-        sl]))) (\r -> Eithers.bind (encodeTerm cx g r) (\sr -> Right (rustCall (rustExprPath "Right") [
-        sr]))) v0
-      Core.TermLambda v0 ->
-        let param = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.lambdaParameter v0))
-        in (Eithers.bind (encodeTerm cx g (Core.lambdaBody v0)) (\body -> Right (rustClosure [
-          param] body)))
-      Core.TermProject v0 -> encodeProjectionElim cx g v0 Nothing
-      Core.TermCases v0 -> encodeUnionElim cx g v0 Nothing
-      Core.TermUnwrap v0 -> encodeUnwrapElim cx g v0 Nothing
-      Core.TermLet v0 ->
-        let bindings = Core.letBindings v0
-            body = Core.letBody v0
-        in (Eithers.bind (Eithers.mapList (\b ->
-          let bname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.bindingName b))
-          in (Eithers.bind (encodeTerm cx g (Core.bindingTerm b)) (\bval -> Right (rustLetStmt bname bval)))) bindings) (\stmts -> Eithers.bind (encodeTerm cx g body) (\bodyExpr -> Right (rustBlock stmts bodyExpr))))
-      Core.TermList v0 -> Eithers.bind (Eithers.mapList (encodeTerm cx g) v0) (\sels -> Right (rustCall (rustExprPath "Vec::from") [
-        Syntax.ExpressionArray (Syntax.ArrayExprElements sels)]))
-      Core.TermLiteral v0 -> Right (encodeLiteral v0)
-      Core.TermMap v0 -> Eithers.bind (Eithers.mapList (\entry -> Eithers.bind (encodeTerm cx g (Pairs.first entry)) (\k -> Eithers.bind (encodeTerm cx g (Pairs.second entry)) (\v -> Right (Syntax.ExpressionTuple [
-        k,
-        v])))) (Maps.toList v0)) (\pairs -> Right (rustCall (rustExprPath "BTreeMap::from") [
-        Syntax.ExpressionArray (Syntax.ArrayExprElements pairs)]))
-      Core.TermMaybe v0 -> Maybes.cases v0 (Right (rustExprPath "None")) (\val -> Eithers.bind (encodeTerm cx g val) (\sval -> Right (rustCall (rustExprPath "Some") [
-        sval])))
-      Core.TermPair v0 -> Eithers.bind (encodeTerm cx g (Pairs.first v0)) (\f -> Eithers.bind (encodeTerm cx g (Pairs.second v0)) (\s -> Right (Syntax.ExpressionTuple [
-        f,
-        s])))
-      Core.TermRecord v0 ->
-        let rname = Core.recordTypeName v0
-            fields = Core.recordFields v0
-        in (Eithers.bind (Eithers.mapList (\f ->
-          let fname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.fieldName f))
-          in (Eithers.bind (encodeTerm cx g (Core.fieldTerm f)) (\fval -> Right (Syntax.FieldValue {
-            Syntax.fieldValueName = fname,
-            Syntax.fieldValueValue = (Just fval)})))) fields) (\sfields -> Right (Syntax.ExpressionStruct (Syntax.StructExpr {
-          Syntax.structExprPath = Syntax.ExprPath {
-            Syntax.exprPathGlobal = False,
-            Syntax.exprPathSegments = [
-              Syntax.PathSegment {
-                Syntax.pathSegmentName = (Formatting.capitalize (Names.localNameOf rname)),
-                Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]},
-          Syntax.structExprFields = sfields,
-          Syntax.structExprRest = Nothing}))))
-      Core.TermSet v0 -> Eithers.bind (Eithers.mapList (encodeTerm cx g) (Sets.toList v0)) (\sels -> Right (rustCall (rustExprPath "BTreeSet::from") [
-        Syntax.ExpressionArray (Syntax.ArrayExprElements sels)]))
-      Core.TermInject v0 ->
-        let tname = Formatting.capitalize (Names.localNameOf (Core.injectionTypeName v0))
-            field = Core.injectionField v0
-            fname = Formatting.capitalize (Core.unName (Core.fieldName field))
-            fterm = Core.fieldTerm field
-            dterm = Strip.deannotateTerm fterm
-            isUnit =
-                    case dterm of
-                      Core.TermUnit -> True
-                      Core.TermRecord v1 -> Lists.null (Core.recordFields v1)
-                      _ -> False
-        in (Logic.ifElse isUnit (Right (rustExprPath (Strings.cat2 (Strings.cat2 tname "::") fname))) (Eithers.bind (encodeTerm cx g fterm) (\sval -> Right (rustCall (rustExprPath (Strings.cat2 (Strings.cat2 tname "::") fname)) [
-          sval]))))
-      Core.TermUnit -> Right (Syntax.ExpressionTuple [])
-      Core.TermVariable v0 -> Right (rustExprPath (Formatting.convertCaseCamelToLowerSnake (Formatting.sanitizeWithUnderscores Language.rustReservedWords (Core.unName v0))))
-      Core.TermWrap v0 ->
-        let tname = Formatting.capitalize (Names.localNameOf (Core.wrappedTermTypeName v0))
-        in (Eithers.bind (encodeTerm cx g (Core.wrappedTermBody v0)) (\inner -> Right (rustCall (rustExprPath tname) [
-          inner])))
-      _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected term variant"))
-
-encodeTermDefinition :: t0 -> t1 -> Packaging.TermDefinition -> Either Errors.Error Syntax.ItemWithComments
-encodeTermDefinition cx g tdef =
-
-      let name = Packaging.termDefinitionName tdef
-          term = Packaging.termDefinitionTerm tdef
-          lname = Formatting.convertCaseCamelToLowerSnake (Names.localNameOf name)
-          typ = Maybes.maybe (Core.TypeVariable (Core.Name "hydra.core.Unit")) Core.typeSchemeBody (Packaging.termDefinitionTypeScheme tdef)
-      in (Eithers.bind (encodeTerm cx g term) (\body -> Eithers.bind (encodeType cx g typ) (\retType -> Right (Syntax.ItemWithComments {
-        Syntax.itemWithCommentsDoc = Nothing,
-        Syntax.itemWithCommentsVisibility = Syntax.VisibilityPublic,
-        Syntax.itemWithCommentsItem = (Syntax.ItemFn (Syntax.FnDef {
-          Syntax.fnDefName = lname,
-          Syntax.fnDefGenerics = [],
-          Syntax.fnDefWhereClause = Nothing,
-          Syntax.fnDefParams = [],
-          Syntax.fnDefReturnType = (Just retType),
-          Syntax.fnDefBody = Syntax.Block {
-            Syntax.blockStatements = [],
-            Syntax.blockExpression = (Just body)},
-          Syntax.fnDefPublic = True,
-          Syntax.fnDefAsync = False,
-          Syntax.fnDefConst = False,
-          Syntax.fnDefUnsafe = False,
-          Syntax.fnDefDoc = Nothing}))}))))
-
-encodeType :: t0 -> t1 -> Core.Type -> Either Errors.Error Syntax.Type
-encodeType cx g t =
-
-      let typ = Strip.deannotateType t
-      in case typ of
-        Core.TypeAnnotated v0 -> encodeType cx g (Core.annotatedTypeBody v0)
-        Core.TypeApplication v0 -> encodeType cx g (Core.applicationTypeFunction v0)
-        Core.TypeUnit -> Right rustUnit
-        Core.TypeVoid -> Right rustUnit
-        Core.TypeLiteral v0 -> Right (encodeLiteralType v0)
-        Core.TypeList v0 -> Eithers.map (\enc -> rustApply1 "Vec" enc) (encodeType cx g v0)
-        Core.TypeSet v0 -> Eithers.map (\enc -> rustApply1 "BTreeSet" enc) (encodeType cx g v0)
-        Core.TypeMap v0 -> Eithers.bind (encodeType cx g (Core.mapTypeKeys v0)) (\kt -> Eithers.bind (encodeType cx g (Core.mapTypeValues v0)) (\vt -> Right (rustApply2 "BTreeMap" kt vt)))
-        Core.TypeMaybe v0 -> Eithers.map (\enc -> rustApply1 "Option" enc) (encodeType cx g v0)
-        Core.TypeEither v0 -> Eithers.bind (encodeType cx g (Core.eitherTypeLeft v0)) (\lt -> Eithers.bind (encodeType cx g (Core.eitherTypeRight v0)) (\rt -> Right (rustApply2 "Either" lt rt)))
-        Core.TypePair v0 -> Eithers.bind (encodeType cx g (Core.pairTypeFirst v0)) (\ft -> Eithers.bind (encodeType cx g (Core.pairTypeSecond v0)) (\st -> Right (Syntax.TypeTuple [
-          ft,
-          st])))
-        Core.TypeFunction v0 -> Eithers.bind (encodeType cx g (Core.functionTypeDomain v0)) (\dom -> Eithers.bind (encodeType cx g (Core.functionTypeCodomain v0)) (\cod -> Right (rustApply1 "Box" (Syntax.TypeDynTrait [
-          Syntax.TypeParamBoundTrait (Syntax.TypePath {
-            Syntax.typePathGlobal = False,
-            Syntax.typePathSegments = [
-              Syntax.PathSegment {
-                Syntax.pathSegmentName = "Fn",
-                Syntax.pathSegmentArguments = (Syntax.GenericArgumentsParenthesized (Syntax.ParenthesizedArgs {
-                  Syntax.parenthesizedArgsInputs = [
-                    dom],
-                  Syntax.parenthesizedArgsOutput = (Just cod)}))}]})]))))
-        Core.TypeRecord _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous record type"))
-        Core.TypeUnion _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous union type"))
-        Core.TypeWrap _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous wrap type"))
-        Core.TypeVariable v0 -> Right (rustPath (Formatting.capitalize (Core.unName v0)))
-        Core.TypeForall v0 -> encodeType cx g (Core.forallTypeBody v0)
-
-encodeTypeDefinition :: t0 -> t1 -> Packaging.TypeDefinition -> Either Errors.Error Syntax.ItemWithComments
-encodeTypeDefinition cx g tdef =
-
-      let name = Packaging.typeDefinitionName tdef
-          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme tdef)
-          lname = Formatting.capitalize (Names.localNameOf name)
-          freeVars =
-                  Lists.filter (\v -> Equality.equal (Lists.length (Strings.splitOn "." (Core.unName v))) 1) (Sets.toList (Variables.freeVariablesInType typ))
-          generics =
-                  Lists.map (\v -> Syntax.GenericParam {
-                    Syntax.genericParamName = (Formatting.capitalize (Core.unName v)),
-                    Syntax.genericParamBounds = []}) freeVars
-          dtyp = Strip.deannotateType typ
-      in (Eithers.bind (case dtyp of
-        Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (encodeStructField cx g) v0) (\sfields -> Right (Syntax.ItemStruct (Syntax.StructDef {
-          Syntax.structDefName = lname,
-          Syntax.structDefGenerics = generics,
-          Syntax.structDefWhereClause = Nothing,
-          Syntax.structDefBody = (Syntax.StructBodyNamed sfields),
-          Syntax.structDefDerives = standardDerives,
-          Syntax.structDefPublic = True,
-          Syntax.structDefDoc = Nothing})))
-        Core.TypeUnion v0 -> Eithers.bind (Eithers.mapList (encodeEnumVariant cx g) v0) (\variants -> Right (Syntax.ItemEnum (Syntax.EnumDef {
-          Syntax.enumDefName = lname,
-          Syntax.enumDefGenerics = generics,
-          Syntax.enumDefWhereClause = Nothing,
-          Syntax.enumDefVariants = variants,
-          Syntax.enumDefDerives = standardDerives,
-          Syntax.enumDefPublic = True,
-          Syntax.enumDefDoc = Nothing})))
-        Core.TypeWrap v0 -> Eithers.bind (encodeType cx g v0) (\styp -> Right (Syntax.ItemStruct (Syntax.StructDef {
-          Syntax.structDefName = lname,
-          Syntax.structDefGenerics = generics,
-          Syntax.structDefWhereClause = Nothing,
-          Syntax.structDefBody = (Syntax.StructBodyTuple [
-            Syntax.TupleField {
-              Syntax.tupleFieldType = styp,
-              Syntax.tupleFieldPublic = True}]),
-          Syntax.structDefDerives = standardDerives,
-          Syntax.structDefPublic = True,
-          Syntax.structDefDoc = Nothing})))
-        _ -> Eithers.bind (encodeType cx g typ) (\styp -> Right (Syntax.ItemTypeAlias (Syntax.TypeAlias {
-          Syntax.typeAliasName = lname,
-          Syntax.typeAliasGenerics = generics,
-          Syntax.typeAliasType = styp,
-          Syntax.typeAliasPublic = True,
-          Syntax.typeAliasDoc = Nothing})))) (\item -> Right (Syntax.ItemWithComments {
-        Syntax.itemWithCommentsDoc = Nothing,
-        Syntax.itemWithCommentsVisibility = Syntax.VisibilityPublic,
-        Syntax.itemWithCommentsItem = item})))
-
-encodeUnionElim :: t0 -> t1 -> Core.CaseStatement -> Maybe Core.Term -> Either Errors.Error Syntax.Expression
-encodeUnionElim cx g cs marg =
-
-      let tname = Formatting.capitalize (Names.localNameOf (Core.caseStatementTypeName cs))
-          caseFields = Core.caseStatementCases cs
-          defCase = Core.caseStatementDefault cs
-      in (Eithers.bind (Eithers.mapList (\cf ->
-        let cfname = Formatting.capitalize (Core.unName (Core.fieldName cf))
-            cfterm = Core.fieldTerm cf
-        in (Eithers.bind (encodeTerm cx g (Core.TermApplication (Core.Application {
-          Core.applicationFunction = cfterm,
-          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))) (\armBody -> Right (Syntax.MatchArm {
-          Syntax.matchArmPattern = (Syntax.PatternTupleStruct (Syntax.TupleStructPattern {
-            Syntax.tupleStructPatternPath = Syntax.ExprPath {
-              Syntax.exprPathGlobal = False,
-              Syntax.exprPathSegments = [
-                Syntax.PathSegment {
-                  Syntax.pathSegmentName = (Strings.cat2 (Strings.cat2 tname "::") cfname),
-                  Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]},
-            Syntax.tupleStructPatternElements = [
-              Syntax.PatternIdentifier (Syntax.IdentifierPattern {
-                Syntax.identifierPatternName = "v",
-                Syntax.identifierPatternMutable = False,
-                Syntax.identifierPatternAtPattern = Nothing})]})),
-          Syntax.matchArmGuard = Nothing,
-          Syntax.matchArmBody = armBody})))) caseFields) (\arms -> Eithers.bind (Maybes.cases defCase (Right arms) (\dt -> Eithers.bind (encodeTerm cx g (Core.TermApplication (Core.Application {
-        Core.applicationFunction = dt,
-        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))) (\defBody -> Right (Lists.concat2 arms [
-        Syntax.MatchArm {
-          Syntax.matchArmPattern = Syntax.PatternWildcard,
-          Syntax.matchArmGuard = Nothing,
-          Syntax.matchArmBody = defBody}])))) (\allArms -> Maybes.cases marg (Right (rustClosure [
-        "v"] (Syntax.ExpressionMatch (Syntax.MatchExpr {
-        Syntax.matchExprScrutinee = (rustExprPath "v"),
-        Syntax.matchExprArms = allArms})))) (\arg -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.ExpressionMatch (Syntax.MatchExpr {
-        Syntax.matchExprScrutinee = sarg,
-        Syntax.matchExprArms = allArms})))))))
-
-encodeUnwrapElim :: t0 -> t1 -> Core.Name -> Maybe Core.Term -> Either Errors.Error Syntax.Expression
-encodeUnwrapElim cx g name marg =
-    Maybes.cases marg (Right (rustClosure [
-      "v"] (Syntax.ExpressionTupleIndex (Syntax.TupleIndexExpr {
-      Syntax.tupleIndexExprTuple = (rustExprPath "v"),
-      Syntax.tupleIndexExprIndex = 0})))) (\arg -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.ExpressionTupleIndex (Syntax.TupleIndexExpr {
-      Syntax.tupleIndexExprTuple = sarg,
-      Syntax.tupleIndexExprIndex = 0}))))
-
-moduleToRust :: Packaging.Module -> [Packaging.Definition] -> t0 -> t1 -> Either Errors.Error (M.Map String String)
-moduleToRust mod defs cx g =
-
-      let partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-          termDefs = Pairs.second partitioned
-      in (Eithers.bind (Eithers.mapList (encodeTypeDefinition cx g) typeDefs) (\typeItems -> Eithers.bind (Eithers.mapList (encodeTermDefinition cx g) termDefs) (\termItems ->
-        let allItems = Lists.concat2 typeItems termItems
-            crate = Syntax.Crate {
-                  Syntax.crateItems = allItems}
-            code = Serialization.printExpr (Serialization.parenthesize (Serde.crateToExpr crate))
-            filePath =
-                    Names.namespaceToFilePath Util.CaseConventionLowerSnake (Packaging.FileExtension "rs") (Packaging.moduleNamespace mod)
-        in (Right (Maps.singleton filePath code)))))
-
-rustApply1 :: String -> Syntax.Type -> Syntax.Type
-rustApply1 name arg =
-    Syntax.TypePath_ (Syntax.TypePath {
-      Syntax.typePathGlobal = False,
-      Syntax.typePathSegments = [
-        Syntax.PathSegment {
-          Syntax.pathSegmentName = name,
-          Syntax.pathSegmentArguments = (Syntax.GenericArgumentsAngleBracketed (Syntax.AngleBracketedArgs {
-            Syntax.angleBracketedArgsArgs = [
-              Syntax.GenericArgType arg]}))}]})
-
-rustApply2 :: String -> Syntax.Type -> Syntax.Type -> Syntax.Type
-rustApply2 name arg1 arg2 =
-    Syntax.TypePath_ (Syntax.TypePath {
-      Syntax.typePathGlobal = False,
-      Syntax.typePathSegments = [
-        Syntax.PathSegment {
-          Syntax.pathSegmentName = name,
-          Syntax.pathSegmentArguments = (Syntax.GenericArgumentsAngleBracketed (Syntax.AngleBracketedArgs {
-            Syntax.angleBracketedArgsArgs = [
-              Syntax.GenericArgType arg1,
-              (Syntax.GenericArgType arg2)]}))}]})
-
-rustBlock :: [Syntax.Statement] -> Syntax.Expression -> Syntax.Expression
-rustBlock stmts expr =
-    Syntax.ExpressionBlock (Syntax.Block {
-      Syntax.blockStatements = stmts,
-      Syntax.blockExpression = (Just expr)})
-
-rustCall :: Syntax.Expression -> [Syntax.Expression] -> Syntax.Expression
-rustCall fun args =
-    Syntax.ExpressionCall (Syntax.CallExpr {
-      Syntax.callExprFunction = fun,
-      Syntax.callExprArgs = args})
-
-rustClosure :: [String] -> Syntax.Expression -> Syntax.Expression
-rustClosure params body =
-    Syntax.ExpressionClosure (Syntax.ClosureExpr {
-      Syntax.closureExprMove = False,
-      Syntax.closureExprParams = (Lists.map (\p -> Syntax.ClosureParam {
-        Syntax.closureParamPattern = (Syntax.PatternIdentifier (Syntax.IdentifierPattern {
-          Syntax.identifierPatternName = p,
-          Syntax.identifierPatternMutable = False,
-          Syntax.identifierPatternAtPattern = Nothing})),
-        Syntax.closureParamType = Nothing}) params),
-      Syntax.closureExprReturnType = Nothing,
-      Syntax.closureExprBody = body})
-
-rustExprPath :: String -> Syntax.Expression
-rustExprPath name =
-    Syntax.ExpressionPath (Syntax.ExprPath {
-      Syntax.exprPathGlobal = False,
-      Syntax.exprPathSegments = [
-        Syntax.PathSegment {
-          Syntax.pathSegmentName = name,
-          Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]})
-
-rustLetStmt :: String -> Syntax.Expression -> Syntax.Statement
-rustLetStmt name expr =
-    Syntax.StatementLet (Syntax.LetStatement {
-      Syntax.letStatementPattern = (Syntax.PatternIdentifier (Syntax.IdentifierPattern {
-        Syntax.identifierPatternName = name,
-        Syntax.identifierPatternMutable = False,
-        Syntax.identifierPatternAtPattern = Nothing})),
-      Syntax.letStatementMutable = False,
-      Syntax.letStatementType = Nothing,
-      Syntax.letStatementInit = (Just expr)})
-
-rustPath :: String -> Syntax.Type
-rustPath name =
-    Syntax.TypePath_ (Syntax.TypePath {
-      Syntax.typePathGlobal = False,
-      Syntax.typePathSegments = [
-        Syntax.PathSegment {
-          Syntax.pathSegmentName = name,
-          Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}]})
-
-rustPathSegmented :: [String] -> Syntax.Type
-rustPathSegmented segs =
-    Syntax.TypePath_ (Syntax.TypePath {
-      Syntax.typePathGlobal = False,
-      Syntax.typePathSegments = (Lists.map (\s -> Syntax.PathSegment {
-        Syntax.pathSegmentName = s,
-        Syntax.pathSegmentArguments = Syntax.GenericArgumentsNone}) segs)})
-
-rustUnit :: Syntax.Type
-rustUnit = Syntax.TypeUnit
-
-standardDerives :: [String]
-standardDerives =
-    [
-      "Clone",
-      "Debug",
-      "PartialEq",
-      "Eq",
-      "PartialOrd",
-      "Ord"]
diff --git a/src/main/haskell/Hydra/Rust/Language.hs b/src/main/haskell/Hydra/Rust/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rust/Language.hs
+++ /dev/null
@@ -1,231 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for Rust
-
-module Hydra.Rust.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
--- | Language constraints for Rust
-rustLanguage :: Coders.Language
-rustLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.rust"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBinary,
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint8,
-          Core.IntegerTypeUint16,
-          Core.IntegerTypeUint32,
-          Core.IntegerTypeUint64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
--- | A set of reserved words in Rust
-rustReservedWords :: S.Set String
-rustReservedWords =
-    Sets.fromList (Lists.concat [
-      strictKeywords,
-      reservedKeywords,
-      weakKeywords,
-      primitiveTypes,
-      stdPreludeTypes,
-      hydraRustKeywords])
-  where
-    strictKeywords =
-        [
-          "as",
-          "async",
-          "await",
-          "break",
-          "const",
-          "continue",
-          "crate",
-          "dyn",
-          "else",
-          "enum",
-          "extern",
-          "false",
-          "fn",
-          "for",
-          "if",
-          "impl",
-          "in",
-          "let",
-          "loop",
-          "match",
-          "mod",
-          "move",
-          "mut",
-          "pub",
-          "ref",
-          "return",
-          "self",
-          "Self",
-          "static",
-          "struct",
-          "super",
-          "trait",
-          "true",
-          "type",
-          "unsafe",
-          "use",
-          "where",
-          "while"]
-    reservedKeywords =
-        [
-          "abstract",
-          "become",
-          "box",
-          "do",
-          "final",
-          "macro",
-          "override",
-          "priv",
-          "try",
-          "typeof",
-          "unsized",
-          "virtual",
-          "yield"]
-    weakKeywords =
-        [
-          "macro_rules",
-          "union",
-          "'static"]
-    primitiveTypes =
-        [
-          "bool",
-          "char",
-          "str",
-          "u8",
-          "u16",
-          "u32",
-          "u64",
-          "u128",
-          "usize",
-          "i8",
-          "i16",
-          "i32",
-          "i64",
-          "i128",
-          "isize",
-          "f32",
-          "f64"]
-    stdPreludeTypes =
-        [
-          "Option",
-          "Some",
-          "None",
-          "Result",
-          "Ok",
-          "Err",
-          "Box",
-          "String",
-          "Vec",
-          "Clone",
-          "Copy",
-          "Default",
-          "Drop",
-          "Eq",
-          "PartialEq",
-          "Ord",
-          "PartialOrd",
-          "Hash",
-          "Debug",
-          "Display",
-          "Iterator",
-          "IntoIterator",
-          "From",
-          "Into",
-          "AsRef",
-          "AsMut",
-          "Send",
-          "Sync",
-          "Sized",
-          "Unpin",
-          "Fn",
-          "FnMut",
-          "FnOnce"]
-    hydraRustKeywords = [
-      "Node"]
diff --git a/src/main/haskell/Hydra/Rust/Operators.hs b/src/main/haskell/Hydra/Rust/Operators.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rust/Operators.hs
+++ /dev/null
@@ -1,242 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | AST operators for Rust serialization
-
-module Hydra.Rust.Operators where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Add-assign operator (+=)
-addAssignOp :: Ast.Op
-addAssignOp = Serialization.op "+=" 1 Ast.AssociativityRight
-
--- | Addition operator (+)
-addOp :: Ast.Op
-addOp = Serialization.op "+" 10 Ast.AssociativityLeft
-
--- | Logical AND operator (&&)
-andOp :: Ast.Op
-andOp = Serialization.op "&&" 4 Ast.AssociativityLeft
-
--- | Function application operator (whitespace)
-appOp :: Ast.Op
-appOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsSpace},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Return type arrow (->)
-arrowOp :: Ast.Op
-arrowOp = Serialization.op "->" 0 Ast.AssociativityRight
-
--- | Type cast operator (as)
-asOp :: Ast.Op
-asOp = Serialization.op "as" 12 Ast.AssociativityLeft
-
--- | Assignment operator (=)
-assignOp :: Ast.Op
-assignOp = Serialization.op "=" 1 Ast.AssociativityRight
-
--- | Bitwise and-assign operator (&=)
-bitAndAssignOp :: Ast.Op
-bitAndAssignOp = Serialization.op "&=" 1 Ast.AssociativityRight
-
--- | Bitwise AND operator (&)
-bitAndOp :: Ast.Op
-bitAndOp = Serialization.op "&" 8 Ast.AssociativityLeft
-
--- | Bitwise or-assign operator (|=)
-bitOrAssignOp :: Ast.Op
-bitOrAssignOp = Serialization.op "|=" 1 Ast.AssociativityRight
-
--- | Bitwise OR operator (|)
-bitOrOp :: Ast.Op
-bitOrOp = Serialization.op "|" 6 Ast.AssociativityLeft
-
--- | Bitwise xor-assign operator (^=)
-bitXorAssignOp :: Ast.Op
-bitXorAssignOp = Serialization.op "^=" 1 Ast.AssociativityRight
-
--- | Bitwise XOR operator (^)
-bitXorOp :: Ast.Op
-bitXorOp = Serialization.op "^" 7 Ast.AssociativityLeft
-
--- | Type annotation (::) for let statements
-colonColonOp :: Ast.Op
-colonColonOp = Serialization.op ":" 0 Ast.AssociativityNone
-
--- | Type ascription operator (:)
-colonOp :: Ast.Op
-colonOp = Serialization.op ":" 12 Ast.AssociativityLeft
-
--- | Dereference operator (*)
-derefOp :: Ast.Op
-derefOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "*"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 13),
-      Ast.opAssociativity = Ast.AssociativityNone}
-
--- | Div-assign operator (/=)
-divAssignOp :: Ast.Op
-divAssignOp = Serialization.op "/=" 1 Ast.AssociativityRight
-
--- | Division operator (/)
-divOp :: Ast.Op
-divOp = Serialization.op "/" 11 Ast.AssociativityLeft
-
--- | Path separator (::)
-doubleColonOp :: Ast.Op
-doubleColonOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "::"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 15),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Equality operator (==)
-eqOp :: Ast.Op
-eqOp = Serialization.op "==" 5 Ast.AssociativityNone
-
--- | Match arm arrow (=>)
-fatArrowOp :: Ast.Op
-fatArrowOp = Serialization.op "=>" 0 Ast.AssociativityNone
-
--- | Field access operator (.)
-fieldOp :: Ast.Op
-fieldOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "."),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 14),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Greater-than-or-equal operator (>=)
-geOp :: Ast.Op
-geOp = Serialization.op ">=" 5 Ast.AssociativityNone
-
--- | Greater-than operator (>)
-gtOp :: Ast.Op
-gtOp = Serialization.op ">" 5 Ast.AssociativityNone
-
--- | Less-than-or-equal operator (<=)
-leOp :: Ast.Op
-leOp = Serialization.op "<=" 5 Ast.AssociativityNone
-
--- | Less-than operator (<)
-ltOp :: Ast.Op
-ltOp = Serialization.op "<" 5 Ast.AssociativityNone
-
--- | Method call operator (.)
-methodOp :: Ast.Op
-methodOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "."),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 14),
-      Ast.opAssociativity = Ast.AssociativityLeft}
-
--- | Mul-assign operator (*=)
-mulAssignOp :: Ast.Op
-mulAssignOp = Serialization.op "*=" 1 Ast.AssociativityRight
-
--- | Multiplication operator (*)
-mulOp :: Ast.Op
-mulOp = Serialization.op "*" 11 Ast.AssociativityLeft
-
--- | Not-equal operator (!=)
-neOp :: Ast.Op
-neOp = Serialization.op "!=" 5 Ast.AssociativityNone
-
--- | Unary negation operator (-)
-negOp :: Ast.Op
-negOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "-"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 13),
-      Ast.opAssociativity = Ast.AssociativityNone}
-
--- | Unary logical not operator (!)
-notOp :: Ast.Op
-notOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "!"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 13),
-      Ast.opAssociativity = Ast.AssociativityNone}
-
--- | Logical OR operator (||)
-orOp :: Ast.Op
-orOp = Serialization.op "||" 3 Ast.AssociativityLeft
-
--- | Inclusive range operator (..=)
-rangeInclusiveOp :: Ast.Op
-rangeInclusiveOp = Serialization.op "..=" 2 Ast.AssociativityNone
-
--- | Range operator (..)
-rangeOp :: Ast.Op
-rangeOp = Serialization.op ".." 2 Ast.AssociativityNone
-
--- | Reference operator (&)
-refOp :: Ast.Op
-refOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "&"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 13),
-      Ast.opAssociativity = Ast.AssociativityNone}
-
--- | Rem-assign operator (%=)
-remAssignOp :: Ast.Op
-remAssignOp = Serialization.op "%=" 1 Ast.AssociativityRight
-
--- | Remainder operator (%)
-remOp :: Ast.Op
-remOp = Serialization.op "%" 11 Ast.AssociativityLeft
-
--- | Shift-left assign operator (<<=)
-shlAssignOp :: Ast.Op
-shlAssignOp = Serialization.op "<<=" 1 Ast.AssociativityRight
-
--- | Shift-left operator (<<)
-shlOp :: Ast.Op
-shlOp = Serialization.op "<<" 9 Ast.AssociativityLeft
-
--- | Shift-right assign operator (>>=)
-shrAssignOp :: Ast.Op
-shrAssignOp = Serialization.op ">>=" 1 Ast.AssociativityRight
-
--- | Shift-right operator (>>)
-shrOp :: Ast.Op
-shrOp = Serialization.op ">>" 9 Ast.AssociativityLeft
-
--- | Sub-assign operator (-=)
-subAssignOp :: Ast.Op
-subAssignOp = Serialization.op "-=" 1 Ast.AssociativityRight
-
--- | Subtraction operator (-)
-subOp :: Ast.Op
-subOp = Serialization.op "-" 10 Ast.AssociativityLeft
diff --git a/src/main/haskell/Hydra/Rust/Serde.hs b/src/main/haskell/Hydra/Rust/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rust/Serde.hs
+++ /dev/null
@@ -1,1367 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Rust serializer: converts Rust AST to concrete syntax
-
-module Hydra.Rust.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Rust.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Serialize an array expression
-arrayExprToExpr :: Syntax.ArrayExpr -> Ast.Expr
-arrayExprToExpr a =
-    case a of
-      Syntax.ArrayExprElements v0 -> Serialization.bracketList Serialization.halfBlockStyle (Lists.map expressionToExpr v0)
-      Syntax.ArrayExprRepeat v0 ->
-        let elem = Syntax.arrayRepeatElement v0
-            len = Syntax.arrayRepeatLength v0
-        in (Serialization.cst (Strings.cat [
-          "[",
-          (Serialization.printExpr (expressionToExpr elem)),
-          "; ",
-          (Serialization.printExpr (expressionToExpr len)),
-          "]"]))
-
--- | Serialize an assignment expression
-assignExprToExpr :: Syntax.AssignExpr -> Ast.Expr
-assignExprToExpr a =
-
-      let target = Syntax.assignExprTarget a
-          val = Syntax.assignExprValue a
-      in (Serialization.spaceSep [
-        expressionToExpr target,
-        (Serialization.cst "="),
-        (expressionToExpr val)])
-
--- | Serialize an attribute
-attributeToExpr :: Syntax.Attribute -> Ast.Expr
-attributeToExpr attr =
-
-      let inner = Syntax.attributeInner attr
-          path = Syntax.attributePath attr
-          tokens = Syntax.attributeTokens attr
-          prefix = Logic.ifElse inner "#![" "#["
-          pathStr = Strings.intercalate "::" path
-          tokensPart =
-                  Maybes.maybe "" (\t -> Strings.cat [
-                    "(",
-                    t,
-                    ")"]) tokens
-      in (Serialization.cst (Strings.cat [
-        prefix,
-        pathStr,
-        tokensPart,
-        "]"]))
-
--- | Serialize a binary expression
-binaryExprToExpr :: Syntax.BinaryExpr -> Ast.Expr
-binaryExprToExpr b =
-
-      let left = Syntax.binaryExprLeft b
-          op = Syntax.binaryExprOp b
-          right = Syntax.binaryExprRight b
-      in (Serialization.spaceSep [
-        expressionToExpr left,
-        (binaryOpToExpr op),
-        (expressionToExpr right)])
-
--- | Serialize a binary operator
-binaryOpToExpr :: Syntax.BinaryOp -> Ast.Expr
-binaryOpToExpr op =
-    Serialization.cst (case op of
-      Syntax.BinaryOpAdd -> "+"
-      Syntax.BinaryOpSub -> "-"
-      Syntax.BinaryOpMul -> "*"
-      Syntax.BinaryOpDiv -> "/"
-      Syntax.BinaryOpRem -> "%"
-      Syntax.BinaryOpAnd -> "&&"
-      Syntax.BinaryOpOr -> "||"
-      Syntax.BinaryOpBitAnd -> "&"
-      Syntax.BinaryOpBitOr -> "|"
-      Syntax.BinaryOpBitXor -> "^"
-      Syntax.BinaryOpShl -> "<<"
-      Syntax.BinaryOpShr -> ">>"
-      Syntax.BinaryOpEq -> "=="
-      Syntax.BinaryOpNe -> "!="
-      Syntax.BinaryOpLt -> "<"
-      Syntax.BinaryOpLe -> "<="
-      Syntax.BinaryOpGt -> ">"
-      Syntax.BinaryOpGe -> ">=")
-
--- | Serialize a block
-blockToExpr :: Syntax.Block -> Ast.Expr
-blockToExpr b =
-
-      let stmts = Syntax.blockStatements b
-          expr = Syntax.blockExpression b
-          stmtExprs = Lists.map statementToExpr stmts
-          exprPart = Maybes.maybe [] (\e -> [
-                expressionToExpr e]) expr
-          allParts = Lists.concat2 stmtExprs exprPart
-      in (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle allParts)
-
--- | Serialize a function call expression
-callExprToExpr :: Syntax.CallExpr -> Ast.Expr
-callExprToExpr c =
-
-      let func = Syntax.callExprFunction c
-          args = Syntax.callExprArgs c
-      in (Serialization.spaceSep [
-        expressionToExpr func,
-        (Serialization.parenList False (Lists.map expressionToExpr args))])
-
--- | Serialize a cast expression
-castExprToExpr :: Syntax.CastExpr -> Ast.Expr
-castExprToExpr c =
-
-      let expr = Syntax.castExprExpr c
-          typ = Syntax.castExprType c
-      in (Serialization.spaceSep [
-        expressionToExpr expr,
-        (Serialization.cst "as"),
-        (typeToExpr typ)])
-
--- | Serialize a closure expression
-closureExprToExpr :: Syntax.ClosureExpr -> Ast.Expr
-closureExprToExpr c =
-
-      let move = Syntax.closureExprMove c
-          params = Syntax.closureExprParams c
-          retType = Syntax.closureExprReturnType c
-          body = Syntax.closureExprBody c
-          moveKw = Logic.ifElse move (Just (Serialization.cst "move")) Nothing
-          paramsStr =
-                  Strings.cat [
-                    "|",
-                    (Strings.intercalate ", " (Lists.map closureParamToStr params)),
-                    "|"]
-          retPart =
-                  Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                    Serialization.cst "->",
-                    (typeToExpr t)])) retType
-      in (Serialization.spaceSep (Maybes.cat [
-        moveKw,
-        (Just (Serialization.cst paramsStr)),
-        retPart,
-        (Just (expressionToExpr body))]))
-
--- | Serialize a closure parameter to string
-closureParamToStr :: Syntax.ClosureParam -> String
-closureParamToStr cp =
-
-      let pat = Syntax.closureParamPattern cp
-          typ = Syntax.closureParamType cp
-          patStr = Serialization.printExpr (patternToExpr pat)
-      in (Maybes.maybe patStr (\t -> Strings.cat [
-        patStr,
-        ": ",
-        (Serialization.printExpr (typeToExpr t))]) typ)
-
--- | Serialize a compound assignment expression
-compoundAssignExprToExpr :: Syntax.CompoundAssignExpr -> Ast.Expr
-compoundAssignExprToExpr c =
-
-      let target = Syntax.compoundAssignExprTarget c
-          op = Syntax.compoundAssignExprOp c
-          val = Syntax.compoundAssignExprValue c
-          opStr =
-                  case op of
-                    Syntax.CompoundAssignOpAddAssign -> "+="
-                    Syntax.CompoundAssignOpSubAssign -> "-="
-                    Syntax.CompoundAssignOpMulAssign -> "*="
-                    Syntax.CompoundAssignOpDivAssign -> "/="
-                    Syntax.CompoundAssignOpRemAssign -> "%="
-                    Syntax.CompoundAssignOpBitAndAssign -> "&="
-                    Syntax.CompoundAssignOpBitOrAssign -> "|="
-                    Syntax.CompoundAssignOpBitXorAssign -> "^="
-                    Syntax.CompoundAssignOpShlAssign -> "<<="
-                    Syntax.CompoundAssignOpShrAssign -> ">>="
-      in (Serialization.spaceSep [
-        expressionToExpr target,
-        (Serialization.cst opStr),
-        (expressionToExpr val)])
-
--- | Serialize a const definition
-constDefToExpr :: Syntax.ConstDef -> Ast.Expr
-constDefToExpr c =
-
-      let name = Syntax.constDefName c
-          typ = Syntax.constDefType c
-          val = Syntax.constDefValue c
-      in (Serialization.spaceSep [
-        Serialization.cst "const",
-        (Serialization.cst (Strings.cat2 name ":")),
-        (typeToExpr typ),
-        (Serialization.cst "="),
-        (expressionToExpr val),
-        (Serialization.cst ";")])
-
--- | Serialize a Rust crate to an AST expression
-crateToExpr :: Syntax.Crate -> Ast.Expr
-crateToExpr crate = Serialization.doubleNewlineSep (Lists.map itemWithCommentsToExpr (Syntax.crateItems crate))
-
--- | Serialize derive macros to an attribute expression
-derivesToExpr :: [String] -> Maybe Ast.Expr
-derivesToExpr derives =
-    Logic.ifElse (Lists.null derives) Nothing (Just (Serialization.cst (Strings.cat [
-      "#[derive(",
-      (Strings.intercalate ", " derives),
-      ")]"])))
-
--- | Serialize an enum definition
-enumDefToExpr :: Syntax.EnumDef -> Ast.Expr
-enumDefToExpr e =
-
-      let name = Syntax.enumDefName e
-          generics = Syntax.enumDefGenerics e
-          whereC = Syntax.enumDefWhereClause e
-          variants = Syntax.enumDefVariants e
-          derives = Syntax.enumDefDerives e
-          docC = Syntax.enumDefDoc e
-          derivesAttr = derivesToExpr derives
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    Just (Serialization.cst "enum"),
-                    (Just (Serialization.cst name)),
-                    (genericParamsToExpr generics)])
-          wherePart = Maybes.maybe Nothing (\w -> Just (whereClauseToExpr w)) whereC
-          body = Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map enumVariantToExpr variants)
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        (Maybes.maybe [] (\d -> [
-          d]) derivesAttr),
-        [
-          Serialization.spaceSep (Maybes.cat [
-            Just header,
-            wherePart,
-            (Just body)])]]))
-
--- | Serialize an enum variant body
-enumVariantBodyToExpr :: Syntax.EnumVariantBody -> Ast.Expr
-enumVariantBodyToExpr body =
-    case body of
-      Syntax.EnumVariantBodyUnit -> Serialization.cst ""
-      Syntax.EnumVariantBodyTuple v0 -> Serialization.parenList False (Lists.map typeToExpr v0)
-      Syntax.EnumVariantBodyStruct v0 -> Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map structFieldToExpr v0)
-
--- | Serialize an enum variant
-enumVariantToExpr :: Syntax.EnumVariant -> Ast.Expr
-enumVariantToExpr v =
-
-      let name = Syntax.enumVariantName v
-          body = Syntax.enumVariantBody v
-          docC = Syntax.enumVariantDoc v
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep [
-            Serialization.cst name,
-            (enumVariantBodyToExpr body)]]]))
-
--- | Serialize an expression path
-exprPathToExpr :: Syntax.ExprPath -> Ast.Expr
-exprPathToExpr ep =
-
-      let global = Syntax.exprPathGlobal ep
-          segs = Syntax.exprPathSegments ep
-          prefix = Logic.ifElse global "::" ""
-          segStrs = Lists.map (\s -> Serialization.printExpr (pathSegmentToExpr s)) segs
-      in (Serialization.cst (Strings.cat2 prefix (Strings.intercalate "::" segStrs)))
-
--- | Serialize a Rust expression
-expressionToExpr :: Syntax.Expression -> Ast.Expr
-expressionToExpr expr =
-    case expr of
-      Syntax.ExpressionLiteral v0 -> literalToExpr v0
-      Syntax.ExpressionPath v0 -> exprPathToExpr v0
-      Syntax.ExpressionBlock v0 -> blockToExpr v0
-      Syntax.ExpressionCall v0 -> callExprToExpr v0
-      Syntax.ExpressionMethodCall v0 -> methodCallExprToExpr v0
-      Syntax.ExpressionFieldAccess v0 -> fieldAccessExprToExpr v0
-      Syntax.ExpressionTupleIndex v0 -> tupleIndexExprToExpr v0
-      Syntax.ExpressionClosure v0 -> closureExprToExpr v0
-      Syntax.ExpressionIf v0 -> ifExprToExpr v0
-      Syntax.ExpressionMatch v0 -> matchExprToExpr v0
-      Syntax.ExpressionLoop v0 -> loopExprToExpr v0
-      Syntax.ExpressionWhile v0 -> whileExprToExpr v0
-      Syntax.ExpressionFor v0 -> forExprToExpr v0
-      Syntax.ExpressionBinary v0 -> binaryExprToExpr v0
-      Syntax.ExpressionUnary v0 -> unaryExprToExpr v0
-      Syntax.ExpressionReference v0 -> refExprToExpr v0
-      Syntax.ExpressionDereference v0 -> Serialization.prefix "*" (expressionToExpr v0)
-      Syntax.ExpressionStruct v0 -> structExprToExpr v0
-      Syntax.ExpressionTuple v0 -> Serialization.parenList False (Lists.map expressionToExpr v0)
-      Syntax.ExpressionArray v0 -> arrayExprToExpr v0
-      Syntax.ExpressionIndex v0 -> indexExprToExpr v0
-      Syntax.ExpressionRange v0 -> rangeExprToExpr v0
-      Syntax.ExpressionReturn v0 -> Maybes.maybe (Serialization.cst "return") (\e -> Serialization.spaceSep [
-        Serialization.cst "return",
-        (expressionToExpr e)]) v0
-      Syntax.ExpressionBreak v0 -> Maybes.maybe (Serialization.cst "break") (\e -> Serialization.spaceSep [
-        Serialization.cst "break",
-        (expressionToExpr e)]) v0
-      Syntax.ExpressionContinue -> Serialization.cst "continue"
-      Syntax.ExpressionTry v0 -> Serialization.cst (Strings.cat2 (Serialization.printExpr (expressionToExpr v0)) "?")
-      Syntax.ExpressionCast v0 -> castExprToExpr v0
-      Syntax.ExpressionTypeAscription v0 -> typeAscriptionExprToExpr v0
-      Syntax.ExpressionAwait v0 -> Serialization.cst (Strings.cat2 (Serialization.printExpr (expressionToExpr v0)) ".await")
-      Syntax.ExpressionAssign v0 -> assignExprToExpr v0
-      Syntax.ExpressionCompoundAssign v0 -> compoundAssignExprToExpr v0
-      Syntax.ExpressionMacro v0 -> macroInvocationToExpr v0
-      Syntax.ExpressionParen v0 -> Serialization.parenthesize (expressionToExpr v0)
-
--- | Serialize a field access expression
-fieldAccessExprToExpr :: Syntax.FieldAccessExpr -> Ast.Expr
-fieldAccessExprToExpr f =
-
-      let obj = Syntax.fieldAccessExprObject f
-          field = Syntax.fieldAccessExprField f
-      in (Serialization.cst (Strings.cat [
-        Serialization.printExpr (expressionToExpr obj),
-        ".",
-        field]))
-
--- | Serialize a field pattern
-fieldPatternToExpr :: Syntax.FieldPattern -> Ast.Expr
-fieldPatternToExpr fp =
-
-      let name = Syntax.fieldPatternName fp
-          pat = Syntax.fieldPatternPattern fp
-      in (Maybes.maybe (Serialization.cst name) (\p -> Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 name ":"),
-        (patternToExpr p)]) pat)
-
--- | Serialize a field-value pair
-fieldValueToExpr :: Syntax.FieldValue -> Ast.Expr
-fieldValueToExpr fv =
-
-      let name = Syntax.fieldValueName fv
-          val = Syntax.fieldValueValue fv
-      in (Maybes.maybe (Serialization.cst name) (\v -> Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 name ":"),
-        (expressionToExpr v)]) val)
-
--- | Serialize a float literal
-floatLiteralToExpr :: Syntax.FloatLiteral -> Ast.Expr
-floatLiteralToExpr fl =
-
-      let val = Syntax.floatLiteralValue fl
-          suf = Syntax.floatLiteralSuffix fl
-          valStr = Literals.showFloat64 val
-          sufStr = Maybes.maybe "" (\s -> s) suf
-      in (Serialization.cst (Strings.cat2 valStr sufStr))
-
--- | Serialize a function definition
-fnDefToExpr :: Syntax.FnDef -> Ast.Expr
-fnDefToExpr f =
-
-      let name = Syntax.fnDefName f
-          generics = Syntax.fnDefGenerics f
-          whereC = Syntax.fnDefWhereClause f
-          params = Syntax.fnDefParams f
-          retType = Syntax.fnDefReturnType f
-          body = Syntax.fnDefBody f
-          isAsync = Syntax.fnDefAsync f
-          isConst = Syntax.fnDefConst f
-          isUnsafe = Syntax.fnDefUnsafe f
-          docC = Syntax.fnDefDoc f
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-          asyncKw = Logic.ifElse isAsync (Just (Serialization.cst "async")) Nothing
-          constKw = Logic.ifElse isConst (Just (Serialization.cst "const")) Nothing
-          unsafeKw = Logic.ifElse isUnsafe (Just (Serialization.cst "unsafe")) Nothing
-          fnKw = Serialization.cst "fn"
-          nameExpr = Serialization.cst name
-          genericsExpr = genericParamsToExpr generics
-          paramsExpr = Serialization.parenList False (Lists.map fnParamToExpr params)
-          retTypeExpr =
-                  Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                    Serialization.cst "->",
-                    (typeToExpr t)])) retType
-          whereExpr = Maybes.maybe Nothing (\w -> Just (whereClauseToExpr w)) whereC
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    asyncKw,
-                    constKw,
-                    unsafeKw,
-                    (Just fnKw),
-                    (Just nameExpr),
-                    genericsExpr,
-                    (Just paramsExpr),
-                    retTypeExpr,
-                    whereExpr])
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep [
-            header,
-            (blockToExpr body)]]]))
-
--- | Serialize a function parameter
-fnParamToExpr :: Syntax.FnParam -> Ast.Expr
-fnParamToExpr param =
-
-      let pat = Syntax.fnParamPattern param
-          typ = Syntax.fnParamType param
-      in (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 (Serialization.printExpr (patternToExpr pat)) ":"),
-        (typeToExpr typ)])
-
--- | Serialize a for expression
-forExprToExpr :: Syntax.ForExpr -> Ast.Expr
-forExprToExpr f =
-
-      let label = Syntax.forExprLabel f
-          pat = Syntax.forExprPattern f
-          iter = Syntax.forExprIter f
-          body = Syntax.forExprBody f
-          labelPart = Maybes.maybe Nothing (\lbl -> Just (Serialization.cst (Strings.cat2 "'" (Strings.cat2 lbl ":")))) label
-      in (Serialization.spaceSep (Maybes.cat [
-        labelPart,
-        (Just (Serialization.cst "for")),
-        (Just (patternToExpr pat)),
-        (Just (Serialization.cst "in")),
-        (Just (expressionToExpr iter)),
-        (Just (blockToExpr body))]))
-
--- | Serialize a generic argument
-genericArgToExpr :: Syntax.GenericArg -> Ast.Expr
-genericArgToExpr arg =
-    case arg of
-      Syntax.GenericArgType v0 -> typeToExpr v0
-      Syntax.GenericArgLifetime v0 -> Serialization.cst (Strings.cat2 "'" (Syntax.lifetimeName v0))
-      Syntax.GenericArgConst v0 -> expressionToExpr v0
-      Syntax.GenericArgBinding v0 ->
-        let name = Syntax.typeBindingName v0
-            typ = Syntax.typeBindingType v0
-        in (Serialization.spaceSep [
-          Serialization.cst name,
-          (Serialization.cst "="),
-          (typeToExpr typ)])
-
--- | Serialize generic arguments
-genericArgumentsToExpr :: Syntax.GenericArguments -> Maybe Ast.Expr
-genericArgumentsToExpr args =
-    case args of
-      Syntax.GenericArgumentsNone -> Nothing
-      Syntax.GenericArgumentsAngleBracketed v0 ->
-        let args = Syntax.angleBracketedArgsArgs v0
-        in (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map genericArgToExpr args)))
-      Syntax.GenericArgumentsParenthesized v0 ->
-        let inputs = Syntax.parenthesizedArgsInputs v0
-            output = Syntax.parenthesizedArgsOutput v0
-            inputPart = Serialization.parenList False (Lists.map typeToExpr inputs)
-            outputPart =
-                    Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                      Serialization.cst "->",
-                      (typeToExpr t)])) output
-        in (Just (Serialization.spaceSep (Maybes.cat [
-          Just inputPart,
-          outputPart])))
-
--- | Serialize a generic parameter
-genericParamToExpr :: Syntax.GenericParam -> Ast.Expr
-genericParamToExpr gp =
-
-      let name = Syntax.genericParamName gp
-          bounds = Syntax.genericParamBounds gp
-      in (Logic.ifElse (Lists.null bounds) (Serialization.cst name) (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 name ":"),
-        (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))]))
-
--- | Serialize a list of generic parameters
-genericParamsToExpr :: [Syntax.GenericParam] -> Maybe Ast.Expr
-genericParamsToExpr gps =
-    Logic.ifElse (Lists.null gps) Nothing (Just (Serialization.angleBracesList Serialization.inlineStyle (Lists.map genericParamToExpr gps)))
-
--- | Serialize an identifier pattern
-identifierPatternToExpr :: Syntax.IdentifierPattern -> Ast.Expr
-identifierPatternToExpr ip =
-
-      let name = Syntax.identifierPatternName ip
-          mut = Syntax.identifierPatternMutable ip
-          atPat = Syntax.identifierPatternAtPattern ip
-          mutKw = Logic.ifElse mut (Just (Serialization.cst "mut")) Nothing
-          atPart =
-                  Maybes.maybe Nothing (\p -> Just (Serialization.spaceSep [
-                    Serialization.cst "@",
-                    (patternToExpr p)])) atPat
-      in (Serialization.spaceSep (Maybes.cat [
-        mutKw,
-        (Just (Serialization.cst name)),
-        atPart]))
-
--- | Serialize an if expression
-ifExprToExpr :: Syntax.IfExpr -> Ast.Expr
-ifExprToExpr i =
-
-      let cond = Syntax.ifExprCondition i
-          thenB = Syntax.ifExprThenBlock i
-          elseB = Syntax.ifExprElseBranch i
-          condExpr =
-                  case cond of
-                    Syntax.IfConditionBool v0 -> expressionToExpr v0
-                    Syntax.IfConditionLet v0 ->
-                      let pat = Syntax.letConditionPattern v0
-                          expr = Syntax.letConditionExpr v0
-                      in (Serialization.spaceSep [
-                        Serialization.cst "let",
-                        (patternToExpr pat),
-                        (Serialization.cst "="),
-                        (expressionToExpr expr)])
-          elsePart =
-                  Maybes.maybe Nothing (\e -> Just (Serialization.spaceSep [
-                    Serialization.cst "else",
-                    (expressionToExpr e)])) elseB
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "if"),
-        (Just condExpr),
-        (Just (blockToExpr thenB)),
-        elsePart]))
-
--- | Serialize an impl block
-implBlockToExpr :: Syntax.ImplBlock -> Ast.Expr
-implBlockToExpr i =
-
-      let generics = Syntax.implBlockGenerics i
-          whereC = Syntax.implBlockWhereClause i
-          trait = Syntax.implBlockTrait i
-          selfType = Syntax.implBlockSelfType i
-          items = Syntax.implBlockItems i
-          genericsExpr = genericParamsToExpr generics
-          traitPart =
-                  Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                    typePathToExpr t,
-                    (Serialization.cst "for")])) trait
-          wherePart = Maybes.maybe Nothing (\w -> Just (whereClauseToExpr w)) whereC
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    Just (Serialization.cst "impl"),
-                    genericsExpr,
-                    traitPart,
-                    (Just (typeToExpr selfType)),
-                    wherePart])
-          body = Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map implItemToExpr items)
-      in (Serialization.spaceSep [
-        header,
-        body])
-
--- | Serialize an impl item
-implItemToExpr :: Syntax.ImplItem -> Ast.Expr
-implItemToExpr item =
-    case item of
-      Syntax.ImplItemMethod v0 -> implMethodToExpr v0
-      Syntax.ImplItemType v0 -> typeAliasToExpr v0
-      Syntax.ImplItemConst v0 -> constDefToExpr v0
-
--- | Serialize an impl method
-implMethodToExpr :: Syntax.ImplMethod -> Ast.Expr
-implMethodToExpr m =
-
-      let name = Syntax.implMethodName m
-          generics = Syntax.implMethodGenerics m
-          whereC = Syntax.implMethodWhereClause m
-          params = Syntax.implMethodParams m
-          retType = Syntax.implMethodReturnType m
-          body = Syntax.implMethodBody m
-          pub = Syntax.implMethodPublic m
-          docC = Syntax.implMethodDoc m
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-          pubKw = Logic.ifElse pub (Just (Serialization.cst "pub")) Nothing
-          genericsExpr = genericParamsToExpr generics
-          paramsExpr = Serialization.parenList False (Lists.map methodParamToExpr params)
-          retTypeExpr =
-                  Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                    Serialization.cst "->",
-                    (typeToExpr t)])) retType
-          whereExpr = Maybes.maybe Nothing (\w -> Just (whereClauseToExpr w)) whereC
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    pubKw,
-                    (Just (Serialization.cst "fn")),
-                    (Just (Serialization.cst name)),
-                    genericsExpr,
-                    (Just paramsExpr),
-                    retTypeExpr,
-                    whereExpr])
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep [
-            header,
-            (blockToExpr body)]]]))
-
--- | Serialize an index expression
-indexExprToExpr :: Syntax.IndexExpr -> Ast.Expr
-indexExprToExpr i =
-
-      let obj = Syntax.indexExprObject i
-          idx = Syntax.indexExprIndex i
-      in (Serialization.cst (Strings.cat [
-        Serialization.printExpr (expressionToExpr obj),
-        "[",
-        (Serialization.printExpr (expressionToExpr idx)),
-        "]"]))
-
--- | Serialize an integer literal
-integerLiteralToExpr :: Syntax.IntegerLiteral -> Ast.Expr
-integerLiteralToExpr il =
-
-      let val = Syntax.integerLiteralValue il
-          suf = Syntax.integerLiteralSuffix il
-          valStr = Literals.showBigint val
-          sufStr = Maybes.maybe "" (\s -> s) suf
-      in (Serialization.cst (Strings.cat2 valStr sufStr))
-
--- | Serialize a Rust item to an AST expression
-itemToExpr :: Syntax.Item -> Ast.Expr
-itemToExpr item =
-    case item of
-      Syntax.ItemUse v0 -> useDeclarationToExpr v0
-      Syntax.ItemStruct v0 -> structDefToExpr v0
-      Syntax.ItemEnum v0 -> enumDefToExpr v0
-      Syntax.ItemFn v0 -> fnDefToExpr v0
-      Syntax.ItemTypeAlias v0 -> typeAliasToExpr v0
-      Syntax.ItemImpl v0 -> implBlockToExpr v0
-      Syntax.ItemTrait v0 -> traitDefToExpr v0
-      Syntax.ItemMod v0 -> modDefToExpr v0
-      Syntax.ItemConst v0 -> constDefToExpr v0
-      Syntax.ItemStatic v0 -> staticDefToExpr v0
-      Syntax.ItemMacro v0 -> macroInvocationToExpr v0
-
--- | Serialize an item with optional doc comments and visibility
-itemWithCommentsToExpr :: Syntax.ItemWithComments -> Ast.Expr
-itemWithCommentsToExpr iwc =
-
-      let doc = Syntax.itemWithCommentsDoc iwc
-          vis = Syntax.itemWithCommentsVisibility iwc
-          item = Syntax.itemWithCommentsItem iwc
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) doc
-          visPart = visibilityToExpr vis
-          itemPart = itemToExpr item
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep (Maybes.cat [
-            visPart,
-            (Just itemPart)])]]))
-
--- | Serialize a let statement
-letStatementToExpr :: Syntax.LetStatement -> Ast.Expr
-letStatementToExpr l =
-
-      let pat = Syntax.letStatementPattern l
-          mut = Syntax.letStatementMutable l
-          typ = Syntax.letStatementType l
-          init = Syntax.letStatementInit l
-          mutKw = Logic.ifElse mut (Just (Serialization.cst "mut")) Nothing
-          typPart =
-                  Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                    Serialization.cst ":",
-                    (typeToExpr t)])) typ
-          initPart =
-                  Maybes.maybe Nothing (\e -> Just (Serialization.spaceSep [
-                    Serialization.cst "=",
-                    (expressionToExpr e)])) init
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "let"),
-        mutKw,
-        (Just (patternToExpr pat)),
-        typPart,
-        initPart,
-        (Just (Serialization.cst ";"))]))
-
--- | Serialize a literal
-literalToExpr :: Syntax.Literal -> Ast.Expr
-literalToExpr lit =
-    case lit of
-      Syntax.LiteralInteger v0 -> integerLiteralToExpr v0
-      Syntax.LiteralFloat v0 -> floatLiteralToExpr v0
-      Syntax.LiteralString v0 -> Serialization.cst (Literals.showString v0)
-      Syntax.LiteralRawString v0 -> Serialization.cst (Strings.cat [
-        "r\"",
-        v0,
-        "\""])
-      Syntax.LiteralByteString _ -> Serialization.cst "b\"...\""
-      Syntax.LiteralChar v0 -> Serialization.cst (Strings.cat [
-        "'",
-        (Literals.showUint32 v0),
-        "'"])
-      Syntax.LiteralByte v0 -> Serialization.cst (Strings.cat [
-        "b'",
-        (Literals.showUint8 v0),
-        "'"])
-      Syntax.LiteralBool v0 -> Serialization.cst (Logic.ifElse v0 "true" "false")
-
--- | Serialize a loop expression
-loopExprToExpr :: Syntax.LoopExpr -> Ast.Expr
-loopExprToExpr l =
-
-      let label = Syntax.loopExprLabel l
-          body = Syntax.loopExprBody l
-          labelPart = Maybes.maybe Nothing (\lbl -> Just (Serialization.cst (Strings.cat2 "'" (Strings.cat2 lbl ":")))) label
-      in (Serialization.spaceSep (Maybes.cat [
-        labelPart,
-        (Just (Serialization.cst "loop")),
-        (Just (blockToExpr body))]))
-
--- | Serialize a macro invocation
-macroInvocationToExpr :: Syntax.MacroInvocation -> Ast.Expr
-macroInvocationToExpr m =
-
-      let path = Syntax.macroInvocationPath m
-          delim = Syntax.macroInvocationDelimiter m
-          tokens = Syntax.macroInvocationTokens m
-          pathStr = Strings.intercalate "::" path
-          open =
-                  case delim of
-                    Syntax.MacroDelimiterParen -> "("
-                    Syntax.MacroDelimiterBracket -> "["
-                    Syntax.MacroDelimiterBrace -> "{"
-          close =
-                  case delim of
-                    Syntax.MacroDelimiterParen -> ")"
-                    Syntax.MacroDelimiterBracket -> "]"
-                    Syntax.MacroDelimiterBrace -> "}"
-      in (Serialization.cst (Strings.cat [
-        pathStr,
-        "!",
-        open,
-        tokens,
-        close]))
-
--- | Serialize a match arm
-matchArmToExpr :: Syntax.MatchArm -> Ast.Expr
-matchArmToExpr arm =
-
-      let pat = Syntax.matchArmPattern arm
-          guard = Syntax.matchArmGuard arm
-          body = Syntax.matchArmBody arm
-          guardPart =
-                  Maybes.maybe Nothing (\g -> Just (Serialization.spaceSep [
-                    Serialization.cst "if",
-                    (expressionToExpr g)])) guard
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (patternToExpr pat),
-        guardPart,
-        (Just (Serialization.cst "=>")),
-        (Just (expressionToExpr body)),
-        (Just (Serialization.cst ","))]))
-
--- | Serialize a match expression
-matchExprToExpr :: Syntax.MatchExpr -> Ast.Expr
-matchExprToExpr m =
-
-      let scrut = Syntax.matchExprScrutinee m
-          arms = Syntax.matchExprArms m
-      in (Serialization.spaceSep [
-        Serialization.cst "match",
-        (expressionToExpr scrut),
-        (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map matchArmToExpr arms))])
-
--- | Serialize a method call expression
-methodCallExprToExpr :: Syntax.MethodCallExpr -> Ast.Expr
-methodCallExprToExpr m =
-
-      let recv = Syntax.methodCallExprReceiver m
-          method = Syntax.methodCallExprMethod m
-          turbo = Syntax.methodCallExprTurbofish m
-          args = Syntax.methodCallExprArgs m
-          turboPart =
-                  Logic.ifElse (Lists.null turbo) "" (Strings.cat [
-                    "::<",
-                    (Strings.intercalate ", " (Lists.map (\t -> Serialization.printExpr (typeToExpr t)) turbo)),
-                    ">"])
-      in (Serialization.cst (Strings.cat [
-        Serialization.printExpr (expressionToExpr recv),
-        ".",
-        method,
-        turboPart,
-        "(",
-        (Strings.intercalate ", " (Lists.map (\a -> Serialization.printExpr (expressionToExpr a)) args)),
-        ")"]))
-
--- | Serialize a method parameter
-methodParamToExpr :: Syntax.MethodParam -> Ast.Expr
-methodParamToExpr param =
-    case param of
-      Syntax.MethodParamSelf v0 -> case v0 of
-        Syntax.SelfParamOwned -> Serialization.cst "self"
-        Syntax.SelfParamRef -> Serialization.cst "&self"
-        Syntax.SelfParamRefMut -> Serialization.cst "&mut self"
-      Syntax.MethodParamRegular v0 -> fnParamToExpr v0
-
--- | Serialize a module definition
-modDefToExpr :: Syntax.ModDef -> Ast.Expr
-modDefToExpr m =
-
-      let name = Syntax.modDefName m
-          body = Syntax.modDefBody m
-      in (Maybes.maybe (Serialization.spaceSep [
-        Serialization.cst "mod",
-        (Serialization.cst name),
-        (Serialization.cst ";")]) (\items -> Serialization.spaceSep [
-        Serialization.cst "mod",
-        (Serialization.cst name),
-        (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map itemToExpr items))]) body)
-
--- | Serialize a path segment
-pathSegmentToExpr :: Syntax.PathSegment -> Ast.Expr
-pathSegmentToExpr seg =
-
-      let name = Syntax.pathSegmentName seg
-          args = Syntax.pathSegmentArguments seg
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst name),
-        (genericArgumentsToExpr args)]))
-
--- | Serialize a pattern
-patternToExpr :: Syntax.Pattern -> Ast.Expr
-patternToExpr pat =
-    case pat of
-      Syntax.PatternWildcard -> Serialization.cst "_"
-      Syntax.PatternIdentifier v0 -> identifierPatternToExpr v0
-      Syntax.PatternLiteral v0 -> literalToExpr v0
-      Syntax.PatternReference v0 -> refPatternToExpr v0
-      Syntax.PatternStruct v0 -> structPatternToExpr v0
-      Syntax.PatternTupleStruct v0 -> tupleStructPatternToExpr v0
-      Syntax.PatternTuple v0 -> Serialization.parenList False (Lists.map patternToExpr v0)
-      Syntax.PatternSlice v0 -> Serialization.bracketList Serialization.halfBlockStyle (Lists.map patternToExpr v0)
-      Syntax.PatternOr v0 -> Serialization.cst (Strings.intercalate " | " (Lists.map (\p -> Serialization.printExpr (patternToExpr p)) v0))
-      Syntax.PatternPath v0 -> exprPathToExpr v0
-      Syntax.PatternRange v0 -> rangePatternToExpr v0
-      Syntax.PatternRest -> Serialization.cst ".."
-      Syntax.PatternParen v0 -> Serialization.parenthesize (patternToExpr v0)
-
--- | Serialize a range expression
-rangeExprToExpr :: Syntax.RangeExpr -> Ast.Expr
-rangeExprToExpr r =
-
-      let from = Syntax.rangeExprFrom r
-          to = Syntax.rangeExprTo r
-          incl = Syntax.rangeExprInclusive r
-          fromStr = Maybes.maybe "" (\f -> Serialization.printExpr (expressionToExpr f)) from
-          toStr = Maybes.maybe "" (\t -> Serialization.printExpr (expressionToExpr t)) to
-          op = Logic.ifElse incl "..=" ".."
-      in (Serialization.cst (Strings.cat [
-        fromStr,
-        op,
-        toStr]))
-
--- | Serialize a range pattern
-rangePatternToExpr :: Syntax.RangePattern -> Ast.Expr
-rangePatternToExpr rp =
-
-      let from = Syntax.rangePatternFrom rp
-          to = Syntax.rangePatternTo rp
-          incl = Syntax.rangePatternInclusive rp
-          fromStr = Maybes.maybe "" (\p -> Serialization.printExpr (patternToExpr p)) from
-          toStr = Maybes.maybe "" (\p -> Serialization.printExpr (patternToExpr p)) to
-          op = Logic.ifElse incl "..=" ".."
-      in (Serialization.cst (Strings.cat [
-        fromStr,
-        op,
-        toStr]))
-
--- | Serialize a reference expression
-refExprToExpr :: Syntax.RefExpr -> Ast.Expr
-refExprToExpr r =
-
-      let mut = Syntax.refExprMutable r
-          expr = Syntax.refExprExpr r
-          prefix = Logic.ifElse mut "&mut " "&"
-      in (Serialization.cst (Strings.cat2 prefix (Serialization.printExpr (expressionToExpr expr))))
-
--- | Serialize a reference pattern
-refPatternToExpr :: Syntax.RefPattern -> Ast.Expr
-refPatternToExpr rp =
-
-      let mut = Syntax.refPatternMutable rp
-          pat = Syntax.refPatternPattern rp
-          prefix = Logic.ifElse mut "&mut " "&"
-      in (Serialization.cst (Strings.cat2 prefix (Serialization.printExpr (patternToExpr pat))))
-
--- | Serialize a reference type
-referenceTypeToExpr :: Syntax.ReferenceType -> Ast.Expr
-referenceTypeToExpr rt =
-
-      let lt = Syntax.referenceTypeLifetime rt
-          mut = Syntax.referenceTypeMutable rt
-          t = Syntax.referenceTypeType rt
-          ltPart = Maybes.maybe "" (\l -> Strings.cat2 "'" (Strings.cat2 (Syntax.lifetimeName l) " ")) lt
-          mutPart = Logic.ifElse mut "mut " ""
-      in (Serialization.cst (Strings.cat [
-        "&",
-        ltPart,
-        mutPart,
-        (Serialization.printExpr (typeToExpr t))]))
-
--- | Serialize a statement
-statementToExpr :: Syntax.Statement -> Ast.Expr
-statementToExpr stmt =
-    case stmt of
-      Syntax.StatementLet v0 -> letStatementToExpr v0
-      Syntax.StatementExpression v0 -> Serialization.spaceSep [
-        expressionToExpr v0,
-        (Serialization.cst ";")]
-      Syntax.StatementItem v0 -> itemToExpr v0
-      Syntax.StatementEmpty -> Serialization.cst ";"
-
--- | Serialize a static definition
-staticDefToExpr :: Syntax.StaticDef -> Ast.Expr
-staticDefToExpr s =
-
-      let name = Syntax.staticDefName s
-          typ = Syntax.staticDefType s
-          val = Syntax.staticDefValue s
-          mut = Syntax.staticDefMutable s
-          mutKw = Logic.ifElse mut (Just (Serialization.cst "mut")) Nothing
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "static"),
-        mutKw,
-        (Just (Serialization.cst (Strings.cat2 name ":"))),
-        (Just (typeToExpr typ)),
-        (Just (Serialization.cst "=")),
-        (Just (expressionToExpr val)),
-        (Just (Serialization.cst ";"))]))
-
--- | Serialize a struct body
-structBodyToExpr :: Syntax.StructBody -> Ast.Expr
-structBodyToExpr body =
-    case body of
-      Syntax.StructBodyNamed v0 -> Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map structFieldToExpr v0)
-      Syntax.StructBodyTuple v0 -> Serialization.spaceSep [
-        Serialization.parenList False (Lists.map (\f -> typeToExpr (Syntax.tupleFieldType f)) v0),
-        (Serialization.cst ";")]
-      Syntax.StructBodyUnit -> Serialization.cst ";"
-
--- | Serialize a struct definition
-structDefToExpr :: Syntax.StructDef -> Ast.Expr
-structDefToExpr s =
-
-      let name = Syntax.structDefName s
-          generics = Syntax.structDefGenerics s
-          whereC = Syntax.structDefWhereClause s
-          body = Syntax.structDefBody s
-          derives = Syntax.structDefDerives s
-          docC = Syntax.structDefDoc s
-          derivesAttr = derivesToExpr derives
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    Just (Serialization.cst "struct"),
-                    (Just (Serialization.cst name)),
-                    (genericParamsToExpr generics)])
-          wherePart = Maybes.maybe Nothing (\w -> Just (whereClauseToExpr w)) whereC
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        (Maybes.maybe [] (\d -> [
-          d]) derivesAttr),
-        [
-          Serialization.spaceSep (Maybes.cat [
-            Just header,
-            wherePart,
-            (Just (structBodyToExpr body))])]]))
-
--- | Serialize a struct literal expression
-structExprToExpr :: Syntax.StructExpr -> Ast.Expr
-structExprToExpr s =
-
-      let path = Syntax.structExprPath s
-          fields = Syntax.structExprFields s
-          rest = Syntax.structExprRest s
-          fieldExprs = Lists.map fieldValueToExpr fields
-          restExpr =
-                  Maybes.maybe [] (\r -> [
-                    Serialization.spaceSep [
-                      Serialization.cst "..",
-                      (expressionToExpr r)]]) rest
-          allFields = Lists.concat2 fieldExprs restExpr
-      in (Serialization.spaceSep [
-        exprPathToExpr path,
-        (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle allFields)])
-
--- | Serialize a struct field
-structFieldToExpr :: Syntax.StructField -> Ast.Expr
-structFieldToExpr field =
-
-      let name = Syntax.structFieldName field
-          typ = Syntax.structFieldType field
-          pub = Syntax.structFieldPublic field
-          docC = Syntax.structFieldDoc field
-          pubKw = Logic.ifElse pub (Just (Serialization.cst "pub")) Nothing
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep (Maybes.cat [
-            pubKw,
-            (Just (Serialization.cst (Strings.cat2 name ":"))),
-            (Just (typeToExpr typ))])]]))
-
--- | Serialize a struct pattern
-structPatternToExpr :: Syntax.StructPattern -> Ast.Expr
-structPatternToExpr sp =
-
-      let path = Syntax.structPatternPath sp
-          fields = Syntax.structPatternFields sp
-          rest = Syntax.structPatternRest sp
-          fieldExprs = Lists.map fieldPatternToExpr fields
-          restExpr = Logic.ifElse rest [
-                Serialization.cst ".."] []
-          allFields = Lists.concat2 fieldExprs restExpr
-      in (Serialization.spaceSep [
-        exprPathToExpr path,
-        (Serialization.curlyBracesList Nothing Serialization.halfBlockStyle allFields)])
-
--- | Convert a string to Rust line comments
-toRustComment :: String -> String
-toRustComment c = Strings.intercalate "\n" (Lists.map (\s -> Strings.cat2 "// " s) (Strings.lines c))
-
--- | Convert a string to Rust doc comments
-toRustDocComment :: String -> String
-toRustDocComment c = Strings.intercalate "\n" (Lists.map (\s -> Strings.cat2 "/// " s) (Strings.lines c))
-
--- | Serialize a trait associated constant
-traitConstToExpr :: Syntax.TraitConst -> Ast.Expr
-traitConstToExpr c =
-
-      let name = Syntax.traitConstName c
-          typ = Syntax.traitConstType c
-          def = Syntax.traitConstDefault c
-          defPart =
-                  Maybes.maybe Nothing (\d -> Just (Serialization.spaceSep [
-                    Serialization.cst "=",
-                    (expressionToExpr d)])) def
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "const"),
-        (Just (Serialization.cst (Strings.cat2 name ":"))),
-        (Just (typeToExpr typ)),
-        defPart,
-        (Just (Serialization.cst ";"))]))
-
--- | Serialize a trait definition
-traitDefToExpr :: Syntax.TraitDef -> Ast.Expr
-traitDefToExpr t =
-
-      let name = Syntax.traitDefName t
-          generics = Syntax.traitDefGenerics t
-          whereC = Syntax.traitDefWhereClause t
-          supers = Syntax.traitDefSuperTraits t
-          items = Syntax.traitDefItems t
-          isUnsafe = Syntax.traitDefUnsafe t
-          docC = Syntax.traitDefDoc t
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-          unsafeKw = Logic.ifElse isUnsafe (Just (Serialization.cst "unsafe")) Nothing
-          genericsExpr = genericParamsToExpr generics
-          superPart =
-                  Logic.ifElse (Lists.null supers) Nothing (Just (Serialization.spaceSep [
-                    Serialization.cst ":",
-                    (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) supers)))]))
-          wherePart = Maybes.maybe Nothing (\w -> Just (whereClauseToExpr w)) whereC
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    unsafeKw,
-                    (Just (Serialization.cst "trait")),
-                    (Just (Serialization.cst name)),
-                    genericsExpr,
-                    superPart,
-                    wherePart])
-          body = Serialization.curlyBracesList Nothing Serialization.halfBlockStyle (Lists.map traitItemToExpr items)
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep [
-            header,
-            body]]]))
-
--- | Serialize a trait item
-traitItemToExpr :: Syntax.TraitItem -> Ast.Expr
-traitItemToExpr item =
-    case item of
-      Syntax.TraitItemMethod v0 -> traitMethodToExpr v0
-      Syntax.TraitItemType v0 -> traitTypeToExpr v0
-      Syntax.TraitItemConst v0 -> traitConstToExpr v0
-
--- | Serialize a trait method
-traitMethodToExpr :: Syntax.TraitMethod -> Ast.Expr
-traitMethodToExpr m =
-
-      let name = Syntax.traitMethodName m
-          generics = Syntax.traitMethodGenerics m
-          params = Syntax.traitMethodParams m
-          retType = Syntax.traitMethodReturnType m
-          defBody = Syntax.traitMethodDefaultBody m
-          genericsExpr = genericParamsToExpr generics
-          paramsExpr = Serialization.parenList False (Lists.map methodParamToExpr params)
-          retTypeExpr =
-                  Maybes.maybe Nothing (\t -> Just (Serialization.spaceSep [
-                    Serialization.cst "->",
-                    (typeToExpr t)])) retType
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    Just (Serialization.cst "fn"),
-                    (Just (Serialization.cst name)),
-                    genericsExpr,
-                    (Just paramsExpr),
-                    retTypeExpr])
-      in (Maybes.maybe (Serialization.spaceSep [
-        header,
-        (Serialization.cst ";")]) (\body -> Serialization.spaceSep [
-        header,
-        (blockToExpr body)]) defBody)
-
--- | Serialize a trait associated type
-traitTypeToExpr :: Syntax.TraitType -> Ast.Expr
-traitTypeToExpr t =
-
-      let name = Syntax.traitTypeName t
-          bounds = Syntax.traitTypeBounds t
-          def = Syntax.traitTypeDefault t
-          boundsPart =
-                  Logic.ifElse (Lists.null bounds) Nothing (Just (Serialization.spaceSep [
-                    Serialization.cst ":",
-                    (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))]))
-          defPart =
-                  Maybes.maybe Nothing (\d -> Just (Serialization.spaceSep [
-                    Serialization.cst "=",
-                    (typeToExpr d)])) def
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "type"),
-        (Just (Serialization.cst name)),
-        boundsPart,
-        defPart,
-        (Just (Serialization.cst ";"))]))
-
--- | Serialize a tuple index expression
-tupleIndexExprToExpr :: Syntax.TupleIndexExpr -> Ast.Expr
-tupleIndexExprToExpr t =
-
-      let tuple = Syntax.tupleIndexExprTuple t
-          idx = Syntax.tupleIndexExprIndex t
-      in (Serialization.cst (Strings.cat [
-        Serialization.printExpr (expressionToExpr tuple),
-        ".",
-        (Literals.showInt32 idx)]))
-
--- | Serialize a tuple struct pattern
-tupleStructPatternToExpr :: Syntax.TupleStructPattern -> Ast.Expr
-tupleStructPatternToExpr tsp =
-
-      let path = Syntax.tupleStructPatternPath tsp
-          elems = Syntax.tupleStructPatternElements tsp
-      in (Serialization.spaceSep [
-        exprPathToExpr path,
-        (Serialization.parenList False (Lists.map patternToExpr elems))])
-
--- | Serialize a type alias
-typeAliasToExpr :: Syntax.TypeAlias -> Ast.Expr
-typeAliasToExpr ta =
-
-      let name = Syntax.typeAliasName ta
-          generics = Syntax.typeAliasGenerics ta
-          typ = Syntax.typeAliasType ta
-          docC = Syntax.typeAliasDoc ta
-          docPart = Maybes.maybe [] (\d -> [
-                Serialization.cst (toRustDocComment d)]) docC
-      in (Serialization.newlineSep (Lists.concat [
-        docPart,
-        [
-          Serialization.spaceSep (Maybes.cat [
-            Just (Serialization.cst "type"),
-            (Just (Serialization.cst name)),
-            (genericParamsToExpr generics),
-            (Just (Serialization.cst "=")),
-            (Just (typeToExpr typ)),
-            (Just (Serialization.cst ";"))])]]))
-
--- | Serialize a type ascription expression
-typeAscriptionExprToExpr :: Syntax.TypeAscriptionExpr -> Ast.Expr
-typeAscriptionExprToExpr t =
-
-      let expr = Syntax.typeAscriptionExprExpr t
-          typ = Syntax.typeAscriptionExprType t
-      in (Serialization.spaceSep [
-        expressionToExpr expr,
-        (Serialization.cst ":"),
-        (typeToExpr typ)])
-
--- | Serialize a type parameter bound
-typeParamBoundToExpr :: Syntax.TypeParamBound -> Ast.Expr
-typeParamBoundToExpr bound =
-    case bound of
-      Syntax.TypeParamBoundTrait v0 -> typePathToExpr v0
-      Syntax.TypeParamBoundLifetime v0 -> Serialization.cst (Strings.cat2 "'" (Syntax.lifetimeName v0))
-
--- | Serialize a type path
-typePathToExpr :: Syntax.TypePath -> Ast.Expr
-typePathToExpr tp =
-
-      let global = Syntax.typePathGlobal tp
-          segs = Syntax.typePathSegments tp
-          prefix = Logic.ifElse global "::" ""
-          segStrs = Lists.map (\s -> Serialization.printExpr (pathSegmentToExpr s)) segs
-      in (Serialization.cst (Strings.cat2 prefix (Strings.intercalate "::" segStrs)))
-
--- | Serialize a Rust type
-typeToExpr :: Syntax.Type -> Ast.Expr
-typeToExpr typ =
-    case typ of
-      Syntax.TypePath_ v0 -> typePathToExpr v0
-      Syntax.TypeReference v0 -> referenceTypeToExpr v0
-      Syntax.TypeSlice v0 -> Serialization.bracketList Serialization.inlineStyle [
-        typeToExpr v0]
-      Syntax.TypeArray v0 ->
-        let elem = Syntax.arrayTypeElement v0
-            len = Syntax.arrayTypeLength v0
-        in (Serialization.cst (Strings.cat [
-          "[",
-          (Serialization.printExpr (typeToExpr elem)),
-          "; ",
-          (Serialization.printExpr (expressionToExpr len)),
-          "]"]))
-      Syntax.TypeTuple v0 -> Serialization.parenList False (Lists.map typeToExpr v0)
-      Syntax.TypeFnPointer v0 ->
-        let params = Syntax.fnPointerTypeParams v0
-            ret = Syntax.fnPointerTypeReturnType v0
-        in (Serialization.spaceSep [
-          Serialization.cst "fn",
-          (Serialization.parenList False (Lists.map typeToExpr params)),
-          (Serialization.cst "->"),
-          (typeToExpr ret)])
-      Syntax.TypeImplTrait v0 -> Serialization.spaceSep [
-        Serialization.cst "impl",
-        (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) v0)))]
-      Syntax.TypeDynTrait v0 -> Serialization.spaceSep [
-        Serialization.cst "dyn",
-        (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) v0)))]
-      Syntax.TypeInferred -> Serialization.cst "_"
-      Syntax.TypeUnit -> Serialization.cst "()"
-      Syntax.TypeNever -> Serialization.cst "!"
-      Syntax.TypeRawPointer v0 ->
-        let mut = Syntax.rawPointerTypeMutable v0
-            t = Syntax.rawPointerTypeType v0
-            kw = Logic.ifElse mut "*mut" "*const"
-        in (Serialization.spaceSep [
-          Serialization.cst kw,
-          (typeToExpr t)])
-      Syntax.TypeMacro v0 -> macroInvocationToExpr v0
-
--- | Serialize a unary expression
-unaryExprToExpr :: Syntax.UnaryExpr -> Ast.Expr
-unaryExprToExpr u =
-
-      let op = Syntax.unaryExprOp u
-          operand = Syntax.unaryExprOperand u
-          opStr =
-                  case op of
-                    Syntax.UnaryOpNeg -> "-"
-                    Syntax.UnaryOpNot -> "!"
-      in (Serialization.cst (Strings.cat2 opStr (Serialization.printExpr (expressionToExpr operand))))
-
--- | Serialize a use declaration
-useDeclarationToExpr :: Syntax.UseDeclaration -> Ast.Expr
-useDeclarationToExpr use =
-
-      let pub = Syntax.useDeclarationPublic use
-          tree = Syntax.useDeclarationTree use
-          pubKw = Logic.ifElse pub (Just (Serialization.cst "pub")) Nothing
-      in (Serialization.spaceSep (Maybes.cat [
-        pubKw,
-        (Just (Serialization.cst "use")),
-        (Just (useTreeToExpr tree)),
-        (Just (Serialization.cst ";"))]))
-
--- | Serialize a use tree
-useTreeToExpr :: Syntax.UseTree -> Ast.Expr
-useTreeToExpr tree =
-    case tree of
-      Syntax.UseTreePath v0 -> Serialization.cst (Strings.intercalate "::" (Syntax.usePathSegments v0))
-      Syntax.UseTreeRename v0 ->
-        let path = Syntax.useRenamePath v0
-            alias = Syntax.useRenameAlias v0
-        in (Serialization.spaceSep [
-          Serialization.cst (Strings.intercalate "::" path),
-          (Serialization.cst "as"),
-          (Serialization.cst alias)])
-      Syntax.UseTreeGlob v0 -> Serialization.cst (Strings.cat2 (Strings.intercalate "::" v0) "::*")
-      Syntax.UseTreeGroup v0 ->
-        let prefix = Syntax.useGroupPrefix v0
-            trees = Syntax.useGroupTrees v0
-            prefixStr = Logic.ifElse (Lists.null prefix) "" (Strings.cat2 (Strings.intercalate "::" prefix) "::")
-        in (Serialization.cst (Strings.cat [
-          prefixStr,
-          "{",
-          (Strings.intercalate ", " (Lists.map (\t -> Serialization.printExpr (useTreeToExpr t)) trees)),
-          "}"]))
-
--- | Serialize visibility to an optional expression
-visibilityToExpr :: Syntax.Visibility -> Maybe Ast.Expr
-visibilityToExpr vis =
-    case vis of
-      Syntax.VisibilityPublic -> Just (Serialization.cst "pub")
-      Syntax.VisibilityCrate -> Just (Serialization.cst "pub(crate)")
-      Syntax.VisibilityRestricted v0 -> Just (Serialization.cst (Strings.cat [
-        "pub(in ",
-        (Strings.intercalate "::" v0),
-        ")"]))
-      Syntax.VisibilityPrivate -> Nothing
-
--- | Serialize a where clause
-whereClauseToExpr :: Syntax.WhereClause -> Ast.Expr
-whereClauseToExpr wc =
-
-      let preds = Syntax.whereClausePredicates wc
-          predExprs =
-                  Lists.map (\p ->
-                    let typ = Syntax.wherePredicateType p
-                        bounds = Syntax.wherePredicateBounds p
-                    in (Serialization.spaceSep [
-                      typeToExpr typ,
-                      (Serialization.cst ":"),
-                      (Serialization.cst (Strings.intercalate " + " (Lists.map (\b -> Serialization.printExpr (typeParamBoundToExpr b)) bounds)))])) preds
-      in (Serialization.spaceSep [
-        Serialization.cst "where",
-        (Serialization.commaSep Serialization.inlineStyle predExprs)])
-
--- | Serialize a while expression
-whileExprToExpr :: Syntax.WhileExpr -> Ast.Expr
-whileExprToExpr w =
-
-      let label = Syntax.whileExprLabel w
-          cond = Syntax.whileExprCondition w
-          body = Syntax.whileExprBody w
-          labelPart = Maybes.maybe Nothing (\lbl -> Just (Serialization.cst (Strings.cat2 "'" (Strings.cat2 lbl ":")))) label
-          condExpr =
-                  case cond of
-                    Syntax.IfConditionBool v0 -> expressionToExpr v0
-                    Syntax.IfConditionLet v0 ->
-                      let pat = Syntax.letConditionPattern v0
-                          expr = Syntax.letConditionExpr v0
-                      in (Serialization.spaceSep [
-                        Serialization.cst "let",
-                        (patternToExpr pat),
-                        (Serialization.cst "="),
-                        (expressionToExpr expr)])
-      in (Serialization.spaceSep (Maybes.cat [
-        labelPart,
-        (Just (Serialization.cst "while")),
-        (Just condExpr),
-        (Just (blockToExpr body))]))
diff --git a/src/main/haskell/Hydra/Rust/Syntax.hs b/src/main/haskell/Hydra/Rust/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Rust/Syntax.hs
+++ /dev/null
@@ -1,2143 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A Rust syntax model, based on the Rust Reference grammar (https://doc.rust-lang.org/reference/), retrieved 2025-01-29
-
-module Hydra.Rust.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.ByteString as B
-import qualified Data.Int as I
-
--- | A Rust crate, represented as a collection of top-level items
-data Crate =
-  Crate {
-    -- | The top-level items in the crate
-    crateItems :: [ItemWithComments]}
-  deriving (Eq, Ord, Read, Show)
-
-_Crate = Core.Name "hydra.rust.syntax.Crate"
-
-_Crate_items = Core.Name "items"
-
--- | A top-level item in a Rust module or crate
-data Item =
-  -- | A use declaration
-  ItemUse UseDeclaration |
-  -- | A struct definition
-  ItemStruct StructDef |
-  -- | An enum definition
-  ItemEnum EnumDef |
-  -- | A function definition
-  ItemFn FnDef |
-  -- | A type alias
-  ItemTypeAlias TypeAlias |
-  -- | An impl block
-  ItemImpl ImplBlock |
-  -- | A trait definition
-  ItemTrait TraitDef |
-  -- | A module definition
-  ItemMod ModDef |
-  -- | A constant item
-  ItemConst ConstDef |
-  -- | A static item
-  ItemStatic StaticDef |
-  -- | A macro invocation as an item
-  ItemMacro MacroInvocation
-  deriving (Eq, Ord, Read, Show)
-
-_Item = Core.Name "hydra.rust.syntax.Item"
-
-_Item_use = Core.Name "use"
-
-_Item_struct = Core.Name "struct"
-
-_Item_enum = Core.Name "enum"
-
-_Item_fn = Core.Name "fn"
-
-_Item_typeAlias = Core.Name "typeAlias"
-
-_Item_impl = Core.Name "impl"
-
-_Item_trait = Core.Name "trait"
-
-_Item_mod = Core.Name "mod"
-
-_Item_const = Core.Name "const"
-
-_Item_static = Core.Name "static"
-
-_Item_macro = Core.Name "macro"
-
--- | An item together with optional doc comments and visibility
-data ItemWithComments =
-  ItemWithComments {
-    -- | Optional documentation comment
-    itemWithCommentsDoc :: (Maybe String),
-    -- | The item's visibility
-    itemWithCommentsVisibility :: Visibility,
-    -- | The item itself
-    itemWithCommentsItem :: Item}
-  deriving (Eq, Ord, Read, Show)
-
-_ItemWithComments = Core.Name "hydra.rust.syntax.ItemWithComments"
-
-_ItemWithComments_doc = Core.Name "doc"
-
-_ItemWithComments_visibility = Core.Name "visibility"
-
-_ItemWithComments_item = Core.Name "item"
-
--- | A use declaration (e.g., use std::collections::BTreeMap;)
-data UseDeclaration =
-  UseDeclaration {
-    -- | Whether the use is public (pub use)
-    useDeclarationPublic :: Bool,
-    -- | The use tree describing what is imported
-    useDeclarationTree :: UseTree}
-  deriving (Eq, Ord, Read, Show)
-
-_UseDeclaration = Core.Name "hydra.rust.syntax.UseDeclaration"
-
-_UseDeclaration_public = Core.Name "public"
-
-_UseDeclaration_tree = Core.Name "tree"
-
--- | A use tree, representing the structure of a use path
-data UseTree =
-  -- | A simple path import
-  UseTreePath UsePath |
-  -- | A renamed import (e.g., BTreeMap as Map)
-  UseTreeRename UseRename |
-  -- | A glob import (e.g., std::collections::*)
-  UseTreeGlob [String] |
-  -- | A grouped import (e.g., {BTreeMap, BTreeSet})
-  UseTreeGroup UseGroup
-  deriving (Eq, Ord, Read, Show)
-
-_UseTree = Core.Name "hydra.rust.syntax.UseTree"
-
-_UseTree_path = Core.Name "path"
-
-_UseTree_rename = Core.Name "rename"
-
-_UseTree_glob = Core.Name "glob"
-
-_UseTree_group = Core.Name "group"
-
--- | A simple path import within a use tree
-data UsePath =
-  UsePath {
-    -- | The path segments
-    usePathSegments :: [String]}
-  deriving (Eq, Ord, Read, Show)
-
-_UsePath = Core.Name "hydra.rust.syntax.UsePath"
-
-_UsePath_segments = Core.Name "segments"
-
--- | A renamed import (e.g., BTreeMap as Map)
-data UseRename =
-  UseRename {
-    -- | The original path segments
-    useRenamePath :: [String],
-    -- | The alias name
-    useRenameAlias :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_UseRename = Core.Name "hydra.rust.syntax.UseRename"
-
-_UseRename_path = Core.Name "path"
-
-_UseRename_alias = Core.Name "alias"
-
--- | A grouped import (e.g., std::collections::{BTreeMap, BTreeSet})
-data UseGroup =
-  UseGroup {
-    -- | The common prefix path segments
-    useGroupPrefix :: [String],
-    -- | The individual subtrees within the group
-    useGroupTrees :: [UseTree]}
-  deriving (Eq, Ord, Read, Show)
-
-_UseGroup = Core.Name "hydra.rust.syntax.UseGroup"
-
-_UseGroup_prefix = Core.Name "prefix"
-
-_UseGroup_trees = Core.Name "trees"
-
--- | A struct definition (e.g., struct Foo<T> { bar: T })
-data StructDef =
-  StructDef {
-    -- | The struct name
-    structDefName :: String,
-    -- | Generic type parameters
-    structDefGenerics :: [GenericParam],
-    -- | Optional where clause
-    structDefWhereClause :: (Maybe WhereClause),
-    -- | The struct body (named fields, tuple fields, or unit)
-    structDefBody :: StructBody,
-    -- | Derive macros to apply
-    structDefDerives :: [String],
-    -- | Whether the struct is public
-    structDefPublic :: Bool,
-    -- | Optional doc comment
-    structDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_StructDef = Core.Name "hydra.rust.syntax.StructDef"
-
-_StructDef_name = Core.Name "name"
-
-_StructDef_generics = Core.Name "generics"
-
-_StructDef_whereClause = Core.Name "whereClause"
-
-_StructDef_body = Core.Name "body"
-
-_StructDef_derives = Core.Name "derives"
-
-_StructDef_public = Core.Name "public"
-
-_StructDef_doc = Core.Name "doc"
-
--- | The body of a struct definition
-data StructBody =
-  -- | A struct with named fields
-  StructBodyNamed [StructField] |
-  -- | A tuple struct
-  StructBodyTuple [TupleField] |
-  -- | A unit struct
-  StructBodyUnit
-  deriving (Eq, Ord, Read, Show)
-
-_StructBody = Core.Name "hydra.rust.syntax.StructBody"
-
-_StructBody_named = Core.Name "named"
-
-_StructBody_tuple = Core.Name "tuple"
-
-_StructBody_unit = Core.Name "unit"
-
--- | A named field within a struct definition
-data StructField =
-  StructField {
-    -- | The field name
-    structFieldName :: String,
-    -- | The field type
-    structFieldType :: Type,
-    -- | Whether the field is public
-    structFieldPublic :: Bool,
-    -- | Optional doc comment for the field
-    structFieldDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_StructField = Core.Name "hydra.rust.syntax.StructField"
-
-_StructField_name = Core.Name "name"
-
-_StructField_type = Core.Name "type"
-
-_StructField_public = Core.Name "public"
-
-_StructField_doc = Core.Name "doc"
-
--- | A positional field within a tuple struct
-data TupleField =
-  TupleField {
-    -- | The field type
-    tupleFieldType :: Type,
-    -- | Whether the field is public
-    tupleFieldPublic :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_TupleField = Core.Name "hydra.rust.syntax.TupleField"
-
-_TupleField_type = Core.Name "type"
-
-_TupleField_public = Core.Name "public"
-
--- | An enum definition (e.g., enum Foo<T> { Bar(T), Baz { x: i32 } })
-data EnumDef =
-  EnumDef {
-    -- | The enum name
-    enumDefName :: String,
-    -- | Generic type parameters
-    enumDefGenerics :: [GenericParam],
-    -- | Optional where clause
-    enumDefWhereClause :: (Maybe WhereClause),
-    -- | The enum variants
-    enumDefVariants :: [EnumVariant],
-    -- | Derive macros to apply
-    enumDefDerives :: [String],
-    -- | Whether the enum is public
-    enumDefPublic :: Bool,
-    -- | Optional doc comment
-    enumDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumDef = Core.Name "hydra.rust.syntax.EnumDef"
-
-_EnumDef_name = Core.Name "name"
-
-_EnumDef_generics = Core.Name "generics"
-
-_EnumDef_whereClause = Core.Name "whereClause"
-
-_EnumDef_variants = Core.Name "variants"
-
-_EnumDef_derives = Core.Name "derives"
-
-_EnumDef_public = Core.Name "public"
-
-_EnumDef_doc = Core.Name "doc"
-
--- | A variant of an enum definition
-data EnumVariant =
-  EnumVariant {
-    -- | The variant name
-    enumVariantName :: String,
-    -- | The variant body
-    enumVariantBody :: EnumVariantBody,
-    -- | Optional doc comment for the variant
-    enumVariantDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_EnumVariant = Core.Name "hydra.rust.syntax.EnumVariant"
-
-_EnumVariant_name = Core.Name "name"
-
-_EnumVariant_body = Core.Name "body"
-
-_EnumVariant_doc = Core.Name "doc"
-
--- | The body of an enum variant
-data EnumVariantBody =
-  -- | A unit variant (e.g., Foo)
-  EnumVariantBodyUnit  |
-  -- | A tuple variant (e.g., Foo(i32, String))
-  EnumVariantBodyTuple [Type] |
-  -- | A struct variant (e.g., Foo { x: i32 })
-  EnumVariantBodyStruct [StructField]
-  deriving (Eq, Ord, Read, Show)
-
-_EnumVariantBody = Core.Name "hydra.rust.syntax.EnumVariantBody"
-
-_EnumVariantBody_unit = Core.Name "unit"
-
-_EnumVariantBody_tuple = Core.Name "tuple"
-
-_EnumVariantBody_struct = Core.Name "struct"
-
--- | A function definition (e.g., fn foo<T>(x: T) -> String { ... })
-data FnDef =
-  FnDef {
-    -- | The function name
-    fnDefName :: String,
-    -- | Generic type parameters
-    fnDefGenerics :: [GenericParam],
-    -- | Optional where clause
-    fnDefWhereClause :: (Maybe WhereClause),
-    -- | The function parameters
-    fnDefParams :: [FnParam],
-    -- | The return type (None means ())
-    fnDefReturnType :: (Maybe Type),
-    -- | The function body
-    fnDefBody :: Block,
-    -- | Whether the function is public
-    fnDefPublic :: Bool,
-    -- | Whether the function is async
-    fnDefAsync :: Bool,
-    -- | Whether the function is const
-    fnDefConst :: Bool,
-    -- | Whether the function is unsafe
-    fnDefUnsafe :: Bool,
-    -- | Optional doc comment
-    fnDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_FnDef = Core.Name "hydra.rust.syntax.FnDef"
-
-_FnDef_name = Core.Name "name"
-
-_FnDef_generics = Core.Name "generics"
-
-_FnDef_whereClause = Core.Name "whereClause"
-
-_FnDef_params = Core.Name "params"
-
-_FnDef_returnType = Core.Name "returnType"
-
-_FnDef_body = Core.Name "body"
-
-_FnDef_public = Core.Name "public"
-
-_FnDef_async = Core.Name "async"
-
-_FnDef_const = Core.Name "const"
-
-_FnDef_unsafe = Core.Name "unsafe"
-
-_FnDef_doc = Core.Name "doc"
-
--- | A function parameter
-data FnParam =
-  FnParam {
-    -- | The parameter pattern
-    fnParamPattern :: Pattern,
-    -- | The parameter type
-    fnParamType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_FnParam = Core.Name "hydra.rust.syntax.FnParam"
-
-_FnParam_pattern = Core.Name "pattern"
-
-_FnParam_type = Core.Name "type"
-
--- | A self parameter in a method
-data SelfParam =
-  SelfParamOwned  |
-  SelfParamRef  |
-  SelfParamRefMut
-  deriving (Eq, Ord, Read, Show)
-
-_SelfParam = Core.Name "hydra.rust.syntax.SelfParam"
-
-_SelfParam_owned = Core.Name "owned"
-
-_SelfParam_ref = Core.Name "ref"
-
-_SelfParam_refMut = Core.Name "refMut"
-
--- | A method parameter, which may be self or a regular parameter
-data MethodParam =
-  -- | A self parameter
-  MethodParamSelf SelfParam |
-  -- | A regular function parameter
-  MethodParamRegular FnParam
-  deriving (Eq, Ord, Read, Show)
-
-_MethodParam = Core.Name "hydra.rust.syntax.MethodParam"
-
-_MethodParam_self = Core.Name "self"
-
-_MethodParam_regular = Core.Name "regular"
-
--- | A type alias definition (e.g., type Foo<T> = Bar<T>;)
-data TypeAlias =
-  TypeAlias {
-    -- | The alias name
-    typeAliasName :: String,
-    -- | Generic type parameters
-    typeAliasGenerics :: [GenericParam],
-    -- | The aliased type
-    typeAliasType :: Type,
-    -- | Whether the alias is public
-    typeAliasPublic :: Bool,
-    -- | Optional doc comment
-    typeAliasDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeAlias = Core.Name "hydra.rust.syntax.TypeAlias"
-
-_TypeAlias_name = Core.Name "name"
-
-_TypeAlias_generics = Core.Name "generics"
-
-_TypeAlias_type = Core.Name "type"
-
-_TypeAlias_public = Core.Name "public"
-
-_TypeAlias_doc = Core.Name "doc"
-
--- | A constant item (e.g., const FOO: u32 = 42;)
-data ConstDef =
-  ConstDef {
-    -- | The constant name
-    constDefName :: String,
-    -- | The constant type
-    constDefType :: Type,
-    -- | The constant value expression
-    constDefValue :: Expression,
-    -- | Whether the constant is public
-    constDefPublic :: Bool,
-    -- | Optional doc comment
-    constDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstDef = Core.Name "hydra.rust.syntax.ConstDef"
-
-_ConstDef_name = Core.Name "name"
-
-_ConstDef_type = Core.Name "type"
-
-_ConstDef_value = Core.Name "value"
-
-_ConstDef_public = Core.Name "public"
-
-_ConstDef_doc = Core.Name "doc"
-
--- | A static item (e.g., static FOO: u32 = 42;)
-data StaticDef =
-  StaticDef {
-    -- | The static name
-    staticDefName :: String,
-    -- | The static type
-    staticDefType :: Type,
-    -- | The static value expression
-    staticDefValue :: Expression,
-    -- | Whether the static is mutable
-    staticDefMutable :: Bool,
-    -- | Whether the static is public
-    staticDefPublic :: Bool,
-    -- | Optional doc comment
-    staticDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_StaticDef = Core.Name "hydra.rust.syntax.StaticDef"
-
-_StaticDef_name = Core.Name "name"
-
-_StaticDef_type = Core.Name "type"
-
-_StaticDef_value = Core.Name "value"
-
-_StaticDef_mutable = Core.Name "mutable"
-
-_StaticDef_public = Core.Name "public"
-
-_StaticDef_doc = Core.Name "doc"
-
--- | A module definition (either inline or external)
-data ModDef =
-  ModDef {
-    -- | The module name
-    modDefName :: String,
-    -- | The module body (None for external file)
-    modDefBody :: (Maybe [Item]),
-    -- | Whether the module is public
-    modDefPublic :: Bool,
-    -- | Optional doc comment
-    modDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_ModDef = Core.Name "hydra.rust.syntax.ModDef"
-
-_ModDef_name = Core.Name "name"
-
-_ModDef_body = Core.Name "body"
-
-_ModDef_public = Core.Name "public"
-
-_ModDef_doc = Core.Name "doc"
-
--- | An impl block (e.g., impl<T> Trait for Foo<T> { ... })
-data ImplBlock =
-  ImplBlock {
-    -- | Generic type parameters
-    implBlockGenerics :: [GenericParam],
-    -- | Optional where clause
-    implBlockWhereClause :: (Maybe WhereClause),
-    -- | The trait being implemented, if any
-    implBlockTrait :: (Maybe TypePath),
-    -- | Whether this is a negative impl
-    implBlockNegative :: Bool,
-    -- | The type being implemented for
-    implBlockSelfType :: Type,
-    -- | The items within the impl block
-    implBlockItems :: [ImplItem]}
-  deriving (Eq, Ord, Read, Show)
-
-_ImplBlock = Core.Name "hydra.rust.syntax.ImplBlock"
-
-_ImplBlock_generics = Core.Name "generics"
-
-_ImplBlock_whereClause = Core.Name "whereClause"
-
-_ImplBlock_trait = Core.Name "trait"
-
-_ImplBlock_negative = Core.Name "negative"
-
-_ImplBlock_selfType = Core.Name "selfType"
-
-_ImplBlock_items = Core.Name "items"
-
--- | An item within an impl block
-data ImplItem =
-  -- | A method definition
-  ImplItemMethod ImplMethod |
-  -- | An associated type definition
-  ImplItemType TypeAlias |
-  -- | An associated constant
-  ImplItemConst ConstDef
-  deriving (Eq, Ord, Read, Show)
-
-_ImplItem = Core.Name "hydra.rust.syntax.ImplItem"
-
-_ImplItem_method = Core.Name "method"
-
-_ImplItem_type = Core.Name "type"
-
-_ImplItem_const = Core.Name "const"
-
--- | A method within an impl block
-data ImplMethod =
-  ImplMethod {
-    -- | The method name
-    implMethodName :: String,
-    -- | Generic type parameters
-    implMethodGenerics :: [GenericParam],
-    -- | Optional where clause
-    implMethodWhereClause :: (Maybe WhereClause),
-    -- | The method parameters (including self)
-    implMethodParams :: [MethodParam],
-    -- | The return type (None means ())
-    implMethodReturnType :: (Maybe Type),
-    -- | The method body
-    implMethodBody :: Block,
-    -- | Whether the method is public
-    implMethodPublic :: Bool,
-    -- | Whether the method has a default implementation
-    implMethodDefault :: Bool,
-    -- | Optional doc comment
-    implMethodDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_ImplMethod = Core.Name "hydra.rust.syntax.ImplMethod"
-
-_ImplMethod_name = Core.Name "name"
-
-_ImplMethod_generics = Core.Name "generics"
-
-_ImplMethod_whereClause = Core.Name "whereClause"
-
-_ImplMethod_params = Core.Name "params"
-
-_ImplMethod_returnType = Core.Name "returnType"
-
-_ImplMethod_body = Core.Name "body"
-
-_ImplMethod_public = Core.Name "public"
-
-_ImplMethod_default = Core.Name "default"
-
-_ImplMethod_doc = Core.Name "doc"
-
--- | A trait definition (e.g., trait Foo<T>: Bar + Baz { ... })
-data TraitDef =
-  TraitDef {
-    -- | The trait name
-    traitDefName :: String,
-    -- | Generic type parameters
-    traitDefGenerics :: [GenericParam],
-    -- | Optional where clause
-    traitDefWhereClause :: (Maybe WhereClause),
-    -- | Supertraits
-    traitDefSuperTraits :: [TypeParamBound],
-    -- | The items within the trait
-    traitDefItems :: [TraitItem],
-    -- | Whether the trait is public
-    traitDefPublic :: Bool,
-    -- | Whether the trait is unsafe
-    traitDefUnsafe :: Bool,
-    -- | Optional doc comment
-    traitDefDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_TraitDef = Core.Name "hydra.rust.syntax.TraitDef"
-
-_TraitDef_name = Core.Name "name"
-
-_TraitDef_generics = Core.Name "generics"
-
-_TraitDef_whereClause = Core.Name "whereClause"
-
-_TraitDef_superTraits = Core.Name "superTraits"
-
-_TraitDef_items = Core.Name "items"
-
-_TraitDef_public = Core.Name "public"
-
-_TraitDef_unsafe = Core.Name "unsafe"
-
-_TraitDef_doc = Core.Name "doc"
-
--- | An item within a trait definition
-data TraitItem =
-  -- | A method signature or default method
-  TraitItemMethod TraitMethod |
-  -- | An associated type
-  TraitItemType TraitType |
-  -- | An associated constant
-  TraitItemConst TraitConst
-  deriving (Eq, Ord, Read, Show)
-
-_TraitItem = Core.Name "hydra.rust.syntax.TraitItem"
-
-_TraitItem_method = Core.Name "method"
-
-_TraitItem_type = Core.Name "type"
-
-_TraitItem_const = Core.Name "const"
-
--- | A method signature or default method within a trait
-data TraitMethod =
-  TraitMethod {
-    -- | The method name
-    traitMethodName :: String,
-    -- | Generic type parameters
-    traitMethodGenerics :: [GenericParam],
-    -- | Optional where clause
-    traitMethodWhereClause :: (Maybe WhereClause),
-    -- | The method parameters (including self)
-    traitMethodParams :: [MethodParam],
-    -- | The return type
-    traitMethodReturnType :: (Maybe Type),
-    -- | Optional default body
-    traitMethodDefaultBody :: (Maybe Block),
-    -- | Optional doc comment
-    traitMethodDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_TraitMethod = Core.Name "hydra.rust.syntax.TraitMethod"
-
-_TraitMethod_name = Core.Name "name"
-
-_TraitMethod_generics = Core.Name "generics"
-
-_TraitMethod_whereClause = Core.Name "whereClause"
-
-_TraitMethod_params = Core.Name "params"
-
-_TraitMethod_returnType = Core.Name "returnType"
-
-_TraitMethod_defaultBody = Core.Name "defaultBody"
-
-_TraitMethod_doc = Core.Name "doc"
-
--- | An associated type within a trait
-data TraitType =
-  TraitType {
-    -- | The associated type name
-    traitTypeName :: String,
-    -- | Type parameter bounds
-    traitTypeBounds :: [TypeParamBound],
-    -- | Optional default type
-    traitTypeDefault :: (Maybe Type),
-    -- | Optional doc comment
-    traitTypeDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_TraitType = Core.Name "hydra.rust.syntax.TraitType"
-
-_TraitType_name = Core.Name "name"
-
-_TraitType_bounds = Core.Name "bounds"
-
-_TraitType_default = Core.Name "default"
-
-_TraitType_doc = Core.Name "doc"
-
--- | An associated constant within a trait
-data TraitConst =
-  TraitConst {
-    -- | The constant name
-    traitConstName :: String,
-    -- | The constant type
-    traitConstType :: Type,
-    -- | Optional default value
-    traitConstDefault :: (Maybe Expression),
-    -- | Optional doc comment
-    traitConstDoc :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_TraitConst = Core.Name "hydra.rust.syntax.TraitConst"
-
-_TraitConst_name = Core.Name "name"
-
-_TraitConst_type = Core.Name "type"
-
-_TraitConst_default = Core.Name "default"
-
-_TraitConst_doc = Core.Name "doc"
-
--- | A generic type parameter (e.g., T: Clone + Debug)
-data GenericParam =
-  GenericParam {
-    -- | The parameter name
-    genericParamName :: String,
-    -- | Trait bounds on the parameter
-    genericParamBounds :: [TypeParamBound]}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericParam = Core.Name "hydra.rust.syntax.GenericParam"
-
-_GenericParam_name = Core.Name "name"
-
-_GenericParam_bounds = Core.Name "bounds"
-
--- | A bound on a type parameter
-data TypeParamBound =
-  -- | A trait bound
-  TypeParamBoundTrait TypePath |
-  -- | A lifetime bound
-  TypeParamBoundLifetime Lifetime
-  deriving (Eq, Ord, Read, Show)
-
-_TypeParamBound = Core.Name "hydra.rust.syntax.TypeParamBound"
-
-_TypeParamBound_trait = Core.Name "trait"
-
-_TypeParamBound_lifetime = Core.Name "lifetime"
-
--- | A lifetime (e.g., 'a, 'static)
-data Lifetime =
-  Lifetime {
-    -- | The lifetime name (without the leading quote)
-    lifetimeName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Lifetime = Core.Name "hydra.rust.syntax.Lifetime"
-
-_Lifetime_name = Core.Name "name"
-
--- | A where clause (e.g., where T: Clone, U: Debug)
-data WhereClause =
-  WhereClause {
-    -- | The predicates in the where clause
-    whereClausePredicates :: [WherePredicate]}
-  deriving (Eq, Ord, Read, Show)
-
-_WhereClause = Core.Name "hydra.rust.syntax.WhereClause"
-
-_WhereClause_predicates = Core.Name "predicates"
-
--- | A single predicate in a where clause
-data WherePredicate =
-  WherePredicate {
-    -- | The type being constrained
-    wherePredicateType :: Type,
-    -- | The bounds on the type
-    wherePredicateBounds :: [TypeParamBound]}
-  deriving (Eq, Ord, Read, Show)
-
-_WherePredicate = Core.Name "hydra.rust.syntax.WherePredicate"
-
-_WherePredicate_type = Core.Name "type"
-
-_WherePredicate_bounds = Core.Name "bounds"
-
--- | A Rust type expression
-data Type =
-  -- | A path type, possibly with generic arguments
-  TypePath_ TypePath |
-  -- | A reference type
-  TypeReference ReferenceType |
-  -- | A slice type
-  TypeSlice Type |
-  -- | An array type with a fixed size
-  TypeArray ArrayType |
-  -- | A tuple type
-  TypeTuple [Type] |
-  -- | A function pointer type
-  TypeFnPointer FnPointerType |
-  -- | An impl Trait type
-  TypeImplTrait [TypeParamBound] |
-  -- | A dyn Trait type
-  TypeDynTrait [TypeParamBound] |
-  -- | The inferred type placeholder (_)
-  TypeInferred  |
-  -- | The unit type (())
-  TypeUnit  |
-  -- | The never type (!)
-  TypeNever  |
-  -- | A raw pointer type
-  TypeRawPointer RawPointerType |
-  -- | A macro invocation in type position
-  TypeMacro MacroInvocation
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.rust.syntax.Type"
-
-_Type_path = Core.Name "path"
-
-_Type_reference = Core.Name "reference"
-
-_Type_slice = Core.Name "slice"
-
-_Type_array = Core.Name "array"
-
-_Type_tuple = Core.Name "tuple"
-
-_Type_fnPointer = Core.Name "fnPointer"
-
-_Type_implTrait = Core.Name "implTrait"
-
-_Type_dynTrait = Core.Name "dynTrait"
-
-_Type_inferred = Core.Name "inferred"
-
-_Type_unit = Core.Name "unit"
-
-_Type_never = Core.Name "never"
-
-_Type_rawPointer = Core.Name "rawPointer"
-
-_Type_macro = Core.Name "macro"
-
--- | A path-based type, possibly with generic arguments
-data TypePath =
-  TypePath {
-    -- | Whether the path is absolute (starts with ::)
-    typePathGlobal :: Bool,
-    -- | The segments of the path
-    typePathSegments :: [PathSegment]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypePath = Core.Name "hydra.rust.syntax.TypePath"
-
-_TypePath_global = Core.Name "global"
-
-_TypePath_segments = Core.Name "segments"
-
--- | A segment within a type path
-data PathSegment =
-  PathSegment {
-    -- | The segment name
-    pathSegmentName :: String,
-    -- | Generic arguments, if any
-    pathSegmentArguments :: GenericArguments}
-  deriving (Eq, Ord, Read, Show)
-
-_PathSegment = Core.Name "hydra.rust.syntax.PathSegment"
-
-_PathSegment_name = Core.Name "name"
-
-_PathSegment_arguments = Core.Name "arguments"
-
--- | Generic arguments to a path segment
-data GenericArguments =
-  -- | No generic arguments
-  GenericArgumentsNone  |
-  -- | Angle-bracketed arguments
-  GenericArgumentsAngleBracketed AngleBracketedArgs |
-  -- | Parenthesized arguments for Fn traits
-  GenericArgumentsParenthesized ParenthesizedArgs
-  deriving (Eq, Ord, Read, Show)
-
-_GenericArguments = Core.Name "hydra.rust.syntax.GenericArguments"
-
-_GenericArguments_none = Core.Name "none"
-
-_GenericArguments_angleBracketed = Core.Name "angleBracketed"
-
-_GenericArguments_parenthesized = Core.Name "parenthesized"
-
--- | Angle-bracketed generic arguments
-data AngleBracketedArgs =
-  AngleBracketedArgs {
-    -- | The generic arguments
-    angleBracketedArgsArgs :: [GenericArg]}
-  deriving (Eq, Ord, Read, Show)
-
-_AngleBracketedArgs = Core.Name "hydra.rust.syntax.AngleBracketedArgs"
-
-_AngleBracketedArgs_args = Core.Name "args"
-
--- | A single generic argument
-data GenericArg =
-  -- | A type argument
-  GenericArgType Type |
-  -- | A lifetime argument
-  GenericArgLifetime Lifetime |
-  -- | A const expression argument
-  GenericArgConst Expression |
-  -- | An associated type binding
-  GenericArgBinding TypeBinding
-  deriving (Eq, Ord, Read, Show)
-
-_GenericArg = Core.Name "hydra.rust.syntax.GenericArg"
-
-_GenericArg_type = Core.Name "type"
-
-_GenericArg_lifetime = Core.Name "lifetime"
-
-_GenericArg_const = Core.Name "const"
-
-_GenericArg_binding = Core.Name "binding"
-
--- | An associated type binding within generic arguments
-data TypeBinding =
-  TypeBinding {
-    -- | The associated type name
-    typeBindingName :: String,
-    -- | The bound type
-    typeBindingType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeBinding = Core.Name "hydra.rust.syntax.TypeBinding"
-
-_TypeBinding_name = Core.Name "name"
-
-_TypeBinding_type = Core.Name "type"
-
--- | Parenthesized generic arguments for Fn traits
-data ParenthesizedArgs =
-  ParenthesizedArgs {
-    -- | The input types
-    parenthesizedArgsInputs :: [Type],
-    -- | The output type
-    parenthesizedArgsOutput :: (Maybe Type)}
-  deriving (Eq, Ord, Read, Show)
-
-_ParenthesizedArgs = Core.Name "hydra.rust.syntax.ParenthesizedArgs"
-
-_ParenthesizedArgs_inputs = Core.Name "inputs"
-
-_ParenthesizedArgs_output = Core.Name "output"
-
--- | A reference type (e.g., &T, &mut T, &'a T)
-data ReferenceType =
-  ReferenceType {
-    -- | Optional lifetime annotation
-    referenceTypeLifetime :: (Maybe Lifetime),
-    -- | Whether the reference is mutable
-    referenceTypeMutable :: Bool,
-    -- | The referenced type
-    referenceTypeType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceType = Core.Name "hydra.rust.syntax.ReferenceType"
-
-_ReferenceType_lifetime = Core.Name "lifetime"
-
-_ReferenceType_mutable = Core.Name "mutable"
-
-_ReferenceType_type = Core.Name "type"
-
--- | An array type with a fixed size (e.g., [T; 3])
-data ArrayType =
-  ArrayType {
-    -- | The element type
-    arrayTypeElement :: Type,
-    -- | The array length (as a constant expression)
-    arrayTypeLength :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayType = Core.Name "hydra.rust.syntax.ArrayType"
-
-_ArrayType_element = Core.Name "element"
-
-_ArrayType_length = Core.Name "length"
-
--- | A function pointer type (e.g., fn(i32, i32) -> i32)
-data FnPointerType =
-  FnPointerType {
-    -- | The parameter types
-    fnPointerTypeParams :: [Type],
-    -- | The return type
-    fnPointerTypeReturnType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_FnPointerType = Core.Name "hydra.rust.syntax.FnPointerType"
-
-_FnPointerType_params = Core.Name "params"
-
-_FnPointerType_returnType = Core.Name "returnType"
-
--- | A raw pointer type (e.g., *const T, *mut T)
-data RawPointerType =
-  RawPointerType {
-    -- | Whether the pointer is mutable (*mut vs *const)
-    rawPointerTypeMutable :: Bool,
-    -- | The pointed-to type
-    rawPointerTypeType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_RawPointerType = Core.Name "hydra.rust.syntax.RawPointerType"
-
-_RawPointerType_mutable = Core.Name "mutable"
-
-_RawPointerType_type = Core.Name "type"
-
--- | A Rust expression
-data Expression =
-  -- | A literal value
-  ExpressionLiteral Literal |
-  -- | A path expression
-  ExpressionPath ExprPath |
-  -- | A block expression
-  ExpressionBlock Block |
-  -- | A function call expression
-  ExpressionCall CallExpr |
-  -- | A method call expression
-  ExpressionMethodCall MethodCallExpr |
-  -- | A field access expression
-  ExpressionFieldAccess FieldAccessExpr |
-  -- | A tuple index expression
-  ExpressionTupleIndex TupleIndexExpr |
-  -- | A closure expression
-  ExpressionClosure ClosureExpr |
-  -- | An if expression, including if let
-  ExpressionIf IfExpr |
-  -- | A match expression
-  ExpressionMatch MatchExpr |
-  -- | A loop expression
-  ExpressionLoop LoopExpr |
-  -- | A while expression, including while let
-  ExpressionWhile WhileExpr |
-  -- | A for expression
-  ExpressionFor ForExpr |
-  -- | A binary operation
-  ExpressionBinary BinaryExpr |
-  -- | A unary operation
-  ExpressionUnary UnaryExpr |
-  -- | A reference expression
-  ExpressionReference RefExpr |
-  -- | A dereference expression
-  ExpressionDereference Expression |
-  -- | A struct literal expression
-  ExpressionStruct StructExpr |
-  -- | A tuple expression
-  ExpressionTuple [Expression] |
-  -- | An array expression
-  ExpressionArray ArrayExpr |
-  -- | An index expression
-  ExpressionIndex IndexExpr |
-  -- | A range expression
-  ExpressionRange RangeExpr |
-  -- | A return expression
-  ExpressionReturn (Maybe Expression) |
-  -- | A break expression
-  ExpressionBreak (Maybe Expression) |
-  -- | A continue expression
-  ExpressionContinue  |
-  -- | A try expression (expr?)
-  ExpressionTry Expression |
-  -- | A type cast expression
-  ExpressionCast CastExpr |
-  -- | A type ascription expression
-  ExpressionTypeAscription TypeAscriptionExpr |
-  -- | An await expression
-  ExpressionAwait Expression |
-  -- | An assignment expression
-  ExpressionAssign AssignExpr |
-  -- | A compound assignment expression
-  ExpressionCompoundAssign CompoundAssignExpr |
-  -- | A macro invocation expression
-  ExpressionMacro MacroInvocation |
-  -- | A parenthesized expression
-  ExpressionParen Expression
-  deriving (Eq, Ord, Read, Show)
-
-_Expression = Core.Name "hydra.rust.syntax.Expression"
-
-_Expression_literal = Core.Name "literal"
-
-_Expression_path = Core.Name "path"
-
-_Expression_block = Core.Name "block"
-
-_Expression_call = Core.Name "call"
-
-_Expression_methodCall = Core.Name "methodCall"
-
-_Expression_fieldAccess = Core.Name "fieldAccess"
-
-_Expression_tupleIndex = Core.Name "tupleIndex"
-
-_Expression_closure = Core.Name "closure"
-
-_Expression_if = Core.Name "if"
-
-_Expression_match = Core.Name "match"
-
-_Expression_loop = Core.Name "loop"
-
-_Expression_while = Core.Name "while"
-
-_Expression_for = Core.Name "for"
-
-_Expression_binary = Core.Name "binary"
-
-_Expression_unary = Core.Name "unary"
-
-_Expression_reference = Core.Name "reference"
-
-_Expression_dereference = Core.Name "dereference"
-
-_Expression_struct = Core.Name "struct"
-
-_Expression_tuple = Core.Name "tuple"
-
-_Expression_array = Core.Name "array"
-
-_Expression_index = Core.Name "index"
-
-_Expression_range = Core.Name "range"
-
-_Expression_return = Core.Name "return"
-
-_Expression_break = Core.Name "break"
-
-_Expression_continue = Core.Name "continue"
-
-_Expression_try = Core.Name "try"
-
-_Expression_cast = Core.Name "cast"
-
-_Expression_typeAscription = Core.Name "typeAscription"
-
-_Expression_await = Core.Name "await"
-
-_Expression_assign = Core.Name "assign"
-
-_Expression_compoundAssign = Core.Name "compoundAssign"
-
-_Expression_macro = Core.Name "macro"
-
-_Expression_paren = Core.Name "paren"
-
--- | A path used as an expression
-data ExprPath =
-  ExprPath {
-    -- | Whether the path is global
-    exprPathGlobal :: Bool,
-    -- | The path segments
-    exprPathSegments :: [PathSegment]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExprPath = Core.Name "hydra.rust.syntax.ExprPath"
-
-_ExprPath_global = Core.Name "global"
-
-_ExprPath_segments = Core.Name "segments"
-
--- | A function call expression
-data CallExpr =
-  CallExpr {
-    -- | The function being called
-    callExprFunction :: Expression,
-    -- | The arguments
-    callExprArgs :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_CallExpr = Core.Name "hydra.rust.syntax.CallExpr"
-
-_CallExpr_function = Core.Name "function"
-
-_CallExpr_args = Core.Name "args"
-
--- | A method call expression
-data MethodCallExpr =
-  MethodCallExpr {
-    -- | The receiver expression
-    methodCallExprReceiver :: Expression,
-    -- | The method name
-    methodCallExprMethod :: String,
-    -- | Optional turbofish generic arguments
-    methodCallExprTurbofish :: [Type],
-    -- | The arguments (excluding the receiver)
-    methodCallExprArgs :: [Expression]}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodCallExpr = Core.Name "hydra.rust.syntax.MethodCallExpr"
-
-_MethodCallExpr_receiver = Core.Name "receiver"
-
-_MethodCallExpr_method = Core.Name "method"
-
-_MethodCallExpr_turbofish = Core.Name "turbofish"
-
-_MethodCallExpr_args = Core.Name "args"
-
--- | A field access expression
-data FieldAccessExpr =
-  FieldAccessExpr {
-    -- | The expression being accessed
-    fieldAccessExprObject :: Expression,
-    -- | The field name
-    fieldAccessExprField :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldAccessExpr = Core.Name "hydra.rust.syntax.FieldAccessExpr"
-
-_FieldAccessExpr_object = Core.Name "object"
-
-_FieldAccessExpr_field = Core.Name "field"
-
--- | A tuple index expression
-data TupleIndexExpr =
-  TupleIndexExpr {
-    -- | The tuple expression
-    tupleIndexExprTuple :: Expression,
-    -- | The index (0-based)
-    tupleIndexExprIndex :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_TupleIndexExpr = Core.Name "hydra.rust.syntax.TupleIndexExpr"
-
-_TupleIndexExpr_tuple = Core.Name "tuple"
-
-_TupleIndexExpr_index = Core.Name "index"
-
--- | A closure expression
-data ClosureExpr =
-  ClosureExpr {
-    -- | Whether the closure captures by move
-    closureExprMove :: Bool,
-    -- | The closure parameters
-    closureExprParams :: [ClosureParam],
-    -- | Optional return type annotation
-    closureExprReturnType :: (Maybe Type),
-    -- | The closure body
-    closureExprBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ClosureExpr = Core.Name "hydra.rust.syntax.ClosureExpr"
-
-_ClosureExpr_move = Core.Name "move"
-
-_ClosureExpr_params = Core.Name "params"
-
-_ClosureExpr_returnType = Core.Name "returnType"
-
-_ClosureExpr_body = Core.Name "body"
-
--- | A closure parameter
-data ClosureParam =
-  ClosureParam {
-    -- | The parameter pattern
-    closureParamPattern :: Pattern,
-    -- | Optional type annotation
-    closureParamType :: (Maybe Type)}
-  deriving (Eq, Ord, Read, Show)
-
-_ClosureParam = Core.Name "hydra.rust.syntax.ClosureParam"
-
-_ClosureParam_pattern = Core.Name "pattern"
-
-_ClosureParam_type = Core.Name "type"
-
--- | An if expression, optionally with if let
-data IfExpr =
-  IfExpr {
-    -- | The condition
-    ifExprCondition :: IfCondition,
-    -- | The then block
-    ifExprThenBlock :: Block,
-    -- | An optional else branch
-    ifExprElseBranch :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_IfExpr = Core.Name "hydra.rust.syntax.IfExpr"
-
-_IfExpr_condition = Core.Name "condition"
-
-_IfExpr_thenBlock = Core.Name "thenBlock"
-
-_IfExpr_elseBranch = Core.Name "elseBranch"
-
--- | The condition of an if expression
-data IfCondition =
-  -- | A boolean condition
-  IfConditionBool Expression |
-  -- | A let condition
-  IfConditionLet LetCondition
-  deriving (Eq, Ord, Read, Show)
-
-_IfCondition = Core.Name "hydra.rust.syntax.IfCondition"
-
-_IfCondition_bool = Core.Name "bool"
-
-_IfCondition_let = Core.Name "let"
-
--- | A match expression
-data MatchExpr =
-  MatchExpr {
-    -- | The expression being matched
-    matchExprScrutinee :: Expression,
-    -- | The match arms
-    matchExprArms :: [MatchArm]}
-  deriving (Eq, Ord, Read, Show)
-
-_MatchExpr = Core.Name "hydra.rust.syntax.MatchExpr"
-
-_MatchExpr_scrutinee = Core.Name "scrutinee"
-
-_MatchExpr_arms = Core.Name "arms"
-
--- | A single arm in a match expression
-data MatchArm =
-  MatchArm {
-    -- | The pattern to match
-    matchArmPattern :: Pattern,
-    -- | Optional guard expression
-    matchArmGuard :: (Maybe Expression),
-    -- | The body expression
-    matchArmBody :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_MatchArm = Core.Name "hydra.rust.syntax.MatchArm"
-
-_MatchArm_pattern = Core.Name "pattern"
-
-_MatchArm_guard = Core.Name "guard"
-
-_MatchArm_body = Core.Name "body"
-
--- | A loop expression
-data LoopExpr =
-  LoopExpr {
-    -- | Optional loop label
-    loopExprLabel :: (Maybe String),
-    -- | The loop body
-    loopExprBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_LoopExpr = Core.Name "hydra.rust.syntax.LoopExpr"
-
-_LoopExpr_label = Core.Name "label"
-
-_LoopExpr_body = Core.Name "body"
-
--- | A while expression, optionally with while let
-data WhileExpr =
-  WhileExpr {
-    -- | Optional loop label
-    whileExprLabel :: (Maybe String),
-    -- | The condition
-    whileExprCondition :: IfCondition,
-    -- | The loop body
-    whileExprBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_WhileExpr = Core.Name "hydra.rust.syntax.WhileExpr"
-
-_WhileExpr_label = Core.Name "label"
-
-_WhileExpr_condition = Core.Name "condition"
-
-_WhileExpr_body = Core.Name "body"
-
--- | A for expression
-data ForExpr =
-  ForExpr {
-    -- | Optional loop label
-    forExprLabel :: (Maybe String),
-    -- | The loop variable pattern
-    forExprPattern :: Pattern,
-    -- | The iterator expression
-    forExprIter :: Expression,
-    -- | The loop body
-    forExprBody :: Block}
-  deriving (Eq, Ord, Read, Show)
-
-_ForExpr = Core.Name "hydra.rust.syntax.ForExpr"
-
-_ForExpr_label = Core.Name "label"
-
-_ForExpr_pattern = Core.Name "pattern"
-
-_ForExpr_iter = Core.Name "iter"
-
-_ForExpr_body = Core.Name "body"
-
--- | A binary operation
-data BinaryExpr =
-  BinaryExpr {
-    -- | The left-hand operand
-    binaryExprLeft :: Expression,
-    -- | The binary operator
-    binaryExprOp :: BinaryOp,
-    -- | The right-hand operand
-    binaryExprRight :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryExpr = Core.Name "hydra.rust.syntax.BinaryExpr"
-
-_BinaryExpr_left = Core.Name "left"
-
-_BinaryExpr_op = Core.Name "op"
-
-_BinaryExpr_right = Core.Name "right"
-
--- | A binary operator
-data BinaryOp =
-  BinaryOpAdd  |
-  BinaryOpSub  |
-  BinaryOpMul  |
-  BinaryOpDiv  |
-  BinaryOpRem  |
-  BinaryOpAnd  |
-  BinaryOpOr  |
-  BinaryOpBitAnd  |
-  BinaryOpBitOr  |
-  BinaryOpBitXor  |
-  BinaryOpShl  |
-  BinaryOpShr  |
-  BinaryOpEq  |
-  BinaryOpNe  |
-  BinaryOpLt  |
-  BinaryOpLe  |
-  BinaryOpGt  |
-  BinaryOpGe
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryOp = Core.Name "hydra.rust.syntax.BinaryOp"
-
-_BinaryOp_add = Core.Name "add"
-
-_BinaryOp_sub = Core.Name "sub"
-
-_BinaryOp_mul = Core.Name "mul"
-
-_BinaryOp_div = Core.Name "div"
-
-_BinaryOp_rem = Core.Name "rem"
-
-_BinaryOp_and = Core.Name "and"
-
-_BinaryOp_or = Core.Name "or"
-
-_BinaryOp_bitAnd = Core.Name "bitAnd"
-
-_BinaryOp_bitOr = Core.Name "bitOr"
-
-_BinaryOp_bitXor = Core.Name "bitXor"
-
-_BinaryOp_shl = Core.Name "shl"
-
-_BinaryOp_shr = Core.Name "shr"
-
-_BinaryOp_eq = Core.Name "eq"
-
-_BinaryOp_ne = Core.Name "ne"
-
-_BinaryOp_lt = Core.Name "lt"
-
-_BinaryOp_le = Core.Name "le"
-
-_BinaryOp_gt = Core.Name "gt"
-
-_BinaryOp_ge = Core.Name "ge"
-
--- | A unary operation
-data UnaryExpr =
-  UnaryExpr {
-    -- | The unary operator
-    unaryExprOp :: UnaryOp,
-    -- | The operand
-    unaryExprOperand :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryExpr = Core.Name "hydra.rust.syntax.UnaryExpr"
-
-_UnaryExpr_op = Core.Name "op"
-
-_UnaryExpr_operand = Core.Name "operand"
-
--- | A unary operator
-data UnaryOp =
-  UnaryOpNeg  |
-  UnaryOpNot
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryOp = Core.Name "hydra.rust.syntax.UnaryOp"
-
-_UnaryOp_neg = Core.Name "neg"
-
-_UnaryOp_not = Core.Name "not"
-
--- | A reference expression
-data RefExpr =
-  RefExpr {
-    -- | Whether the reference is mutable
-    refExprMutable :: Bool,
-    -- | The expression being referenced
-    refExprExpr :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_RefExpr = Core.Name "hydra.rust.syntax.RefExpr"
-
-_RefExpr_mutable = Core.Name "mutable"
-
-_RefExpr_expr = Core.Name "expr"
-
--- | A struct literal expression
-data StructExpr =
-  StructExpr {
-    -- | The struct path
-    structExprPath :: ExprPath,
-    -- | The field assignments
-    structExprFields :: [FieldValue],
-    -- | Optional base expression for struct update syntax
-    structExprRest :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_StructExpr = Core.Name "hydra.rust.syntax.StructExpr"
-
-_StructExpr_path = Core.Name "path"
-
-_StructExpr_fields = Core.Name "fields"
-
-_StructExpr_rest = Core.Name "rest"
-
--- | A field-value pair in a struct literal
-data FieldValue =
-  FieldValue {
-    -- | The field name
-    fieldValueName :: String,
-    -- | The field value (None for shorthand syntax)
-    fieldValueValue :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldValue = Core.Name "hydra.rust.syntax.FieldValue"
-
-_FieldValue_name = Core.Name "name"
-
-_FieldValue_value = Core.Name "value"
-
--- | An array expression
-data ArrayExpr =
-  -- | An array literal
-  ArrayExprElements [Expression] |
-  -- | An array repeat expression
-  ArrayExprRepeat ArrayRepeat
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayExpr = Core.Name "hydra.rust.syntax.ArrayExpr"
-
-_ArrayExpr_elements = Core.Name "elements"
-
-_ArrayExpr_repeat = Core.Name "repeat"
-
--- | An index expression
-data IndexExpr =
-  IndexExpr {
-    -- | The expression being indexed
-    indexExprObject :: Expression,
-    -- | The index expression
-    indexExprIndex :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_IndexExpr = Core.Name "hydra.rust.syntax.IndexExpr"
-
-_IndexExpr_object = Core.Name "object"
-
-_IndexExpr_index = Core.Name "index"
-
--- | A range expression
-data RangeExpr =
-  RangeExpr {
-    -- | The lower bound (optional)
-    rangeExprFrom :: (Maybe Expression),
-    -- | The upper bound (optional)
-    rangeExprTo :: (Maybe Expression),
-    -- | Whether the range is inclusive
-    rangeExprInclusive :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_RangeExpr = Core.Name "hydra.rust.syntax.RangeExpr"
-
-_RangeExpr_from = Core.Name "from"
-
-_RangeExpr_to = Core.Name "to"
-
-_RangeExpr_inclusive = Core.Name "inclusive"
-
--- | A type cast expression
-data CastExpr =
-  CastExpr {
-    -- | The expression being cast
-    castExprExpr :: Expression,
-    -- | The target type
-    castExprType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_CastExpr = Core.Name "hydra.rust.syntax.CastExpr"
-
-_CastExpr_expr = Core.Name "expr"
-
-_CastExpr_type = Core.Name "type"
-
--- | A type ascription expression
-data TypeAscriptionExpr =
-  TypeAscriptionExpr {
-    -- | The expression
-    typeAscriptionExprExpr :: Expression,
-    -- | The ascribed type
-    typeAscriptionExprType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeAscriptionExpr = Core.Name "hydra.rust.syntax.TypeAscriptionExpr"
-
-_TypeAscriptionExpr_expr = Core.Name "expr"
-
-_TypeAscriptionExpr_type = Core.Name "type"
-
--- | An assignment expression
-data AssignExpr =
-  AssignExpr {
-    -- | The left-hand side (target)
-    assignExprTarget :: Expression,
-    -- | The right-hand side (value)
-    assignExprValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_AssignExpr = Core.Name "hydra.rust.syntax.AssignExpr"
-
-_AssignExpr_target = Core.Name "target"
-
-_AssignExpr_value = Core.Name "value"
-
--- | A compound assignment expression
-data CompoundAssignExpr =
-  CompoundAssignExpr {
-    -- | The left-hand side (target)
-    compoundAssignExprTarget :: Expression,
-    -- | The compound assignment operator
-    compoundAssignExprOp :: CompoundAssignOp,
-    -- | The right-hand side (value)
-    compoundAssignExprValue :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_CompoundAssignExpr = Core.Name "hydra.rust.syntax.CompoundAssignExpr"
-
-_CompoundAssignExpr_target = Core.Name "target"
-
-_CompoundAssignExpr_op = Core.Name "op"
-
-_CompoundAssignExpr_value = Core.Name "value"
-
--- | A compound assignment operator
-data CompoundAssignOp =
-  CompoundAssignOpAddAssign  |
-  CompoundAssignOpSubAssign  |
-  CompoundAssignOpMulAssign  |
-  CompoundAssignOpDivAssign  |
-  CompoundAssignOpRemAssign  |
-  CompoundAssignOpBitAndAssign  |
-  CompoundAssignOpBitOrAssign  |
-  CompoundAssignOpBitXorAssign  |
-  CompoundAssignOpShlAssign  |
-  CompoundAssignOpShrAssign
-  deriving (Eq, Ord, Read, Show)
-
-_CompoundAssignOp = Core.Name "hydra.rust.syntax.CompoundAssignOp"
-
-_CompoundAssignOp_addAssign = Core.Name "addAssign"
-
-_CompoundAssignOp_subAssign = Core.Name "subAssign"
-
-_CompoundAssignOp_mulAssign = Core.Name "mulAssign"
-
-_CompoundAssignOp_divAssign = Core.Name "divAssign"
-
-_CompoundAssignOp_remAssign = Core.Name "remAssign"
-
-_CompoundAssignOp_bitAndAssign = Core.Name "bitAndAssign"
-
-_CompoundAssignOp_bitOrAssign = Core.Name "bitOrAssign"
-
-_CompoundAssignOp_bitXorAssign = Core.Name "bitXorAssign"
-
-_CompoundAssignOp_shlAssign = Core.Name "shlAssign"
-
-_CompoundAssignOp_shrAssign = Core.Name "shrAssign"
-
--- | A macro invocation
-data MacroInvocation =
-  MacroInvocation {
-    -- | The macro path
-    macroInvocationPath :: [String],
-    -- | The delimiter style used
-    macroInvocationDelimiter :: MacroDelimiter,
-    -- | The token stream as a raw string
-    macroInvocationTokens :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_MacroInvocation = Core.Name "hydra.rust.syntax.MacroInvocation"
-
-_MacroInvocation_path = Core.Name "path"
-
-_MacroInvocation_delimiter = Core.Name "delimiter"
-
-_MacroInvocation_tokens = Core.Name "tokens"
-
--- | The delimiter style for a macro invocation
-data MacroDelimiter =
-  MacroDelimiterParen  |
-  MacroDelimiterBracket  |
-  MacroDelimiterBrace
-  deriving (Eq, Ord, Read, Show)
-
-_MacroDelimiter = Core.Name "hydra.rust.syntax.MacroDelimiter"
-
-_MacroDelimiter_paren = Core.Name "paren"
-
-_MacroDelimiter_bracket = Core.Name "bracket"
-
-_MacroDelimiter_brace = Core.Name "brace"
-
--- | A statement within a block
-data Statement =
-  -- | A let binding
-  StatementLet LetStatement |
-  -- | An expression statement
-  StatementExpression Expression |
-  -- | An item declaration within a block
-  StatementItem Item |
-  -- | An empty statement
-  StatementEmpty
-  deriving (Eq, Ord, Read, Show)
-
-_Statement = Core.Name "hydra.rust.syntax.Statement"
-
-_Statement_let = Core.Name "let"
-
-_Statement_expression = Core.Name "expression"
-
-_Statement_item = Core.Name "item"
-
-_Statement_empty = Core.Name "empty"
-
--- | A let statement
-data LetStatement =
-  LetStatement {
-    -- | The binding pattern
-    letStatementPattern :: Pattern,
-    -- | Whether the binding is mutable
-    letStatementMutable :: Bool,
-    -- | Optional type annotation
-    letStatementType :: (Maybe Type),
-    -- | Optional initializer expression
-    letStatementInit :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_LetStatement = Core.Name "hydra.rust.syntax.LetStatement"
-
-_LetStatement_pattern = Core.Name "pattern"
-
-_LetStatement_mutable = Core.Name "mutable"
-
-_LetStatement_type = Core.Name "type"
-
-_LetStatement_init = Core.Name "init"
-
--- | A block expression
-data Block =
-  Block {
-    -- | The statements in the block
-    blockStatements :: [Statement],
-    -- | An optional trailing expression
-    blockExpression :: (Maybe Expression)}
-  deriving (Eq, Ord, Read, Show)
-
-_Block = Core.Name "hydra.rust.syntax.Block"
-
-_Block_statements = Core.Name "statements"
-
-_Block_expression = Core.Name "expression"
-
--- | A Rust pattern (used in let, match, function parameters, etc.)
-data Pattern =
-  -- | A wildcard pattern (_)
-  PatternWildcard  |
-  -- | An identifier pattern
-  PatternIdentifier IdentifierPattern |
-  -- | A literal pattern
-  PatternLiteral Literal |
-  -- | A reference pattern
-  PatternReference RefPattern |
-  -- | A struct pattern
-  PatternStruct StructPattern |
-  -- | A tuple struct pattern
-  PatternTupleStruct TupleStructPattern |
-  -- | A tuple pattern
-  PatternTuple [Pattern] |
-  -- | A slice pattern
-  PatternSlice [Pattern] |
-  -- | An or-pattern
-  PatternOr [Pattern] |
-  -- | A path pattern
-  PatternPath ExprPath |
-  -- | A range pattern
-  PatternRange RangePattern |
-  -- | A rest pattern (..)
-  PatternRest  |
-  -- | A parenthesized pattern
-  PatternParen Pattern
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern = Core.Name "hydra.rust.syntax.Pattern"
-
-_Pattern_wildcard = Core.Name "wildcard"
-
-_Pattern_identifier = Core.Name "identifier"
-
-_Pattern_literal = Core.Name "literal"
-
-_Pattern_reference = Core.Name "reference"
-
-_Pattern_struct = Core.Name "struct"
-
-_Pattern_tupleStruct = Core.Name "tupleStruct"
-
-_Pattern_tuple = Core.Name "tuple"
-
-_Pattern_slice = Core.Name "slice"
-
-_Pattern_or = Core.Name "or"
-
-_Pattern_path = Core.Name "path"
-
-_Pattern_range = Core.Name "range"
-
-_Pattern_rest = Core.Name "rest"
-
-_Pattern_paren = Core.Name "paren"
-
--- | An identifier pattern
-data IdentifierPattern =
-  IdentifierPattern {
-    -- | The identifier name
-    identifierPatternName :: String,
-    -- | Whether the binding is mutable
-    identifierPatternMutable :: Bool,
-    -- | Optional sub-pattern (e.g., x @ Some(_))
-    identifierPatternAtPattern :: (Maybe Pattern)}
-  deriving (Eq, Ord, Read, Show)
-
-_IdentifierPattern = Core.Name "hydra.rust.syntax.IdentifierPattern"
-
-_IdentifierPattern_name = Core.Name "name"
-
-_IdentifierPattern_mutable = Core.Name "mutable"
-
-_IdentifierPattern_atPattern = Core.Name "atPattern"
-
--- | A reference pattern
-data RefPattern =
-  RefPattern {
-    -- | Whether the reference is mutable
-    refPatternMutable :: Bool,
-    -- | The inner pattern
-    refPatternPattern :: Pattern}
-  deriving (Eq, Ord, Read, Show)
-
-_RefPattern = Core.Name "hydra.rust.syntax.RefPattern"
-
-_RefPattern_mutable = Core.Name "mutable"
-
-_RefPattern_pattern = Core.Name "pattern"
-
--- | A struct pattern
-data StructPattern =
-  StructPattern {
-    -- | The struct path
-    structPatternPath :: ExprPath,
-    -- | The field patterns
-    structPatternFields :: [FieldPattern],
-    -- | Whether the pattern has a rest (..) at the end
-    structPatternRest :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_StructPattern = Core.Name "hydra.rust.syntax.StructPattern"
-
-_StructPattern_path = Core.Name "path"
-
-_StructPattern_fields = Core.Name "fields"
-
-_StructPattern_rest = Core.Name "rest"
-
--- | A field pattern within a struct pattern
-data FieldPattern =
-  FieldPattern {
-    -- | The field name
-    fieldPatternName :: String,
-    -- | The field pattern (None for shorthand)
-    fieldPatternPattern :: (Maybe Pattern)}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldPattern = Core.Name "hydra.rust.syntax.FieldPattern"
-
-_FieldPattern_name = Core.Name "name"
-
-_FieldPattern_pattern = Core.Name "pattern"
-
--- | A tuple struct pattern
-data TupleStructPattern =
-  TupleStructPattern {
-    -- | The path to the tuple struct or variant
-    tupleStructPatternPath :: ExprPath,
-    -- | The element patterns
-    tupleStructPatternElements :: [Pattern]}
-  deriving (Eq, Ord, Read, Show)
-
-_TupleStructPattern = Core.Name "hydra.rust.syntax.TupleStructPattern"
-
-_TupleStructPattern_path = Core.Name "path"
-
-_TupleStructPattern_elements = Core.Name "elements"
-
--- | A range pattern
-data RangePattern =
-  RangePattern {
-    -- | The lower bound
-    rangePatternFrom :: (Maybe Pattern),
-    -- | The upper bound
-    rangePatternTo :: (Maybe Pattern),
-    -- | Whether the range is inclusive
-    rangePatternInclusive :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_RangePattern = Core.Name "hydra.rust.syntax.RangePattern"
-
-_RangePattern_from = Core.Name "from"
-
-_RangePattern_to = Core.Name "to"
-
-_RangePattern_inclusive = Core.Name "inclusive"
-
--- | A literal value
-data Literal =
-  -- | An integer literal
-  LiteralInteger IntegerLiteral |
-  -- | A floating-point literal
-  LiteralFloat FloatLiteral |
-  -- | A string literal
-  LiteralString String |
-  -- | A raw string literal
-  LiteralRawString String |
-  -- | A byte string literal
-  LiteralByteString B.ByteString |
-  -- | A character literal
-  LiteralChar I.Int64 |
-  -- | A byte literal
-  LiteralByte I.Int16 |
-  -- | A boolean literal
-  LiteralBool Bool
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.rust.syntax.Literal"
-
-_Literal_integer = Core.Name "integer"
-
-_Literal_float = Core.Name "float"
-
-_Literal_string = Core.Name "string"
-
-_Literal_rawString = Core.Name "rawString"
-
-_Literal_byteString = Core.Name "byteString"
-
-_Literal_char = Core.Name "char"
-
-_Literal_byte = Core.Name "byte"
-
-_Literal_bool = Core.Name "bool"
-
--- | An integer literal with optional suffix
-data IntegerLiteral =
-  IntegerLiteral {
-    -- | The integer value
-    integerLiteralValue :: Integer,
-    -- | Optional type suffix
-    integerLiteralSuffix :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_IntegerLiteral = Core.Name "hydra.rust.syntax.IntegerLiteral"
-
-_IntegerLiteral_value = Core.Name "value"
-
-_IntegerLiteral_suffix = Core.Name "suffix"
-
--- | A floating-point literal with optional suffix
-data FloatLiteral =
-  FloatLiteral {
-    -- | The float value
-    floatLiteralValue :: Double,
-    -- | Optional type suffix
-    floatLiteralSuffix :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_FloatLiteral = Core.Name "hydra.rust.syntax.FloatLiteral"
-
-_FloatLiteral_value = Core.Name "value"
-
-_FloatLiteral_suffix = Core.Name "suffix"
-
--- | An attribute (e.g., #[derive(Clone)], #[cfg(test)])
-data Attribute =
-  Attribute {
-    -- | Whether the attribute is an inner attribute (#![...] vs #[...])
-    attributeInner :: Bool,
-    -- | The attribute path
-    attributePath :: [String],
-    -- | The attribute arguments as a raw token string
-    attributeTokens :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Attribute = Core.Name "hydra.rust.syntax.Attribute"
-
-_Attribute_inner = Core.Name "inner"
-
-_Attribute_path = Core.Name "path"
-
-_Attribute_tokens = Core.Name "tokens"
-
--- | A visibility qualifier
-data Visibility =
-  -- | Public (pub)
-  VisibilityPublic  |
-  -- | Crate-visible (pub(crate))
-  VisibilityCrate  |
-  -- | Visible to a specific path (pub(in path))
-  VisibilityRestricted [String] |
-  -- | Private (default)
-  VisibilityPrivate
-  deriving (Eq, Ord, Read, Show)
-
-_Visibility = Core.Name "hydra.rust.syntax.Visibility"
-
-_Visibility_public = Core.Name "public"
-
-_Visibility_crate = Core.Name "crate"
-
-_Visibility_restricted = Core.Name "restricted"
-
-_Visibility_private = Core.Name "private"
-
--- | A let condition (e.g., let Some(x) = opt)
-data LetCondition =
-  LetCondition {
-    -- | The pattern
-    letConditionPattern :: Pattern,
-    -- | The expression being matched
-    letConditionExpr :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_LetCondition = Core.Name "hydra.rust.syntax.LetCondition"
-
-_LetCondition_pattern = Core.Name "pattern"
-
-_LetCondition_expr = Core.Name "expr"
-
--- | An array repeat expression (e.g., [0; 10])
-data ArrayRepeat =
-  ArrayRepeat {
-    -- | The element expression
-    arrayRepeatElement :: Expression,
-    -- | The length expression
-    arrayRepeatLength :: Expression}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayRepeat = Core.Name "hydra.rust.syntax.ArrayRepeat"
-
-_ArrayRepeat_element = Core.Name "element"
-
-_ArrayRepeat_length = Core.Name "length"
diff --git a/src/main/haskell/Hydra/Scala/Coder.hs b/src/main/haskell/Hydra/Scala/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scala/Coder.hs
+++ /dev/null
@@ -1,900 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Scala code generator: converts Hydra modules to Scala source code
-
-module Hydra.Scala.Coder where
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Predicates as Predicates
-import qualified Hydra.Resolution as Resolution
-import qualified Hydra.Scala.Serde as Serde
-import qualified Hydra.Scala.Syntax as Syntax
-import qualified Hydra.Scala.Utils as Utils
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Util as Util
-import qualified Hydra.Variables as Variables
-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
--- | Apply a variable to a term, performing substitution for lambdas
-applyVar :: Core.Term -> Core.Name -> Core.Term
-applyVar fterm avar =
-
-      let v = Core.unName avar
-      in case (Strip.deannotateAndDetypeTerm fterm) of
-        Core.TermLambda v0 ->
-          let lamParam = Core.lambdaParameter v0
-              lamBody = Core.lambdaBody v0
-          in (Logic.ifElse (Variables.isFreeVariableInTerm lamParam lamBody) lamBody (Variables.substituteVariable lamParam avar lamBody))
-        _ -> Core.TermApplication (Core.Application {
-          Core.applicationFunction = fterm,
-          Core.applicationArgument = (Core.TermVariable avar)})
--- | Construct a Scala package from a Hydra module and its definitions
-constructModule :: t0 -> Graph.Graph -> Packaging.Module -> [Packaging.Definition] -> Either Errors.Error Syntax.Pkg
-constructModule cx g mod defs =
-
-      let partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-          termDefs = Pairs.second partitioned
-          nsName = Packaging.unNamespace (Packaging.moduleNamespace mod)
-          pname =
-                  Syntax.Data_Name {
-                    Syntax.data_NameValue = (Syntax.PredefString (Strings.intercalate "." (Strings.splitOn "." nsName)))}
-          pref = Syntax.Data_RefName pname
-      in (Eithers.bind (Eithers.mapList (\td -> encodeTypeDefinition cx g td) typeDefs) (\typeDeclStats -> Eithers.bind (Eithers.mapList (\td -> encodeTermDefinition cx g td) termDefs) (\termDeclStats -> Eithers.bind (findImports cx g mod) (\imports -> Right (Syntax.Pkg {
-        Syntax.pkgName = pname,
-        Syntax.pkgRef = pref,
-        Syntax.pkgStats = (Lists.concat [
-          imports,
-          typeDeclStats,
-          termDeclStats])})))))
--- | Drop N domain types from a function type, returning the remaining type
-dropDomains :: Int -> Core.Type -> Core.Type
-dropDomains n t =
-    Logic.ifElse (Equality.lte n 0) t (case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> dropDomains (Math.sub n 1) (Core.functionTypeCodomain v0)
-      Core.TypeForall v0 -> dropDomains n (Core.forallTypeBody v0)
-      _ -> t)
--- | Encode a case branch
-encodeCase :: t0 -> Graph.Graph -> M.Map Core.Name Core.Type -> Maybe Core.Name -> Core.Field -> Either Errors.Error Syntax.Case
-encodeCase cx g ftypes sn f =
-
-      let fname = Core.fieldName f
-          fterm = Core.fieldTerm f
-          isUnit =
-                  Maybes.maybe (case (Strip.deannotateAndDetypeTerm fterm) of
-                    Core.TermLambda v0 ->
-                      let lamParam = Core.lambdaParameter v0
-                          lamBody = Core.lambdaBody v0
-                          domIsUnit = Maybes.maybe False (\dom -> Equality.equal dom Core.TypeUnit) (Core.lambdaDomain v0)
-                          bodyIgnoresParam = Variables.isFreeVariableInTerm lamParam lamBody
-                      in (Logic.or domIsUnit bodyIgnoresParam)
-                    Core.TermRecord v0 -> Equality.equal (Lists.length (Core.recordFields v0)) 0
-                    Core.TermUnit -> True
-                    _ -> False) (\dom -> case (Strip.deannotateType dom) of
-                    Core.TypeUnit -> True
-                    Core.TypeRecord v0 -> Equality.equal (Lists.length v0) 0
-                    _ -> False) (Maps.lookup fname ftypes)
-          shortTypeName = Maybes.fromMaybe "x" (Lists.maybeLast (Strings.splitOn "." (Maybes.maybe "x" (\n -> Core.unName n) sn)))
-          lamParamSuffix =
-                  case (Strip.deannotateAndDetypeTerm fterm) of
-                    Core.TermLambda v0 ->
-                      let rawName = Core.unName (Core.lambdaParameter v0)
-                          safeName = Strings.fromList (Lists.map (\c -> Logic.ifElse (Equality.equal c 39) 95 c) (Strings.toList rawName))
-                      in (Strings.cat2 "_" safeName)
-                    _ -> ""
-          v =
-                  Core.Name (Strings.cat [
-                    "v_",
-                    shortTypeName,
-                    "_",
-                    (Core.unName fname),
-                    lamParamSuffix])
-          domainIsUnit =
-                  case (Strip.deannotateAndDetypeTerm fterm) of
-                    Core.TermLambda v0 -> Maybes.maybe True (\dom -> Equality.equal dom Core.TypeUnit) (Core.lambdaDomain v0)
-                    _ -> True
-          patArgs = Logic.ifElse isUnit (Logic.ifElse domainIsUnit [] [
-                Syntax.PatWildcard]) [
-                Utils.svar v]
-          pat =
-                  Syntax.PatExtract (Syntax.Pat_Extract {
-                    Syntax.pat_ExtractFun = (Utils.sname (Utils.qualifyUnionFieldName "MATCHED." sn fname)),
-                    Syntax.pat_ExtractArgs = patArgs})
-          applied = applyVar fterm v
-      in (Eithers.bind (encodeTerm cx g applied) (\body -> Right (Syntax.Case {
-        Syntax.casePat = pat,
-        Syntax.caseCond = Nothing,
-        Syntax.caseBody = body})))
--- | Encode a complex term definition with proper parameter types from the type signature
-encodeComplexTermDef :: t0 -> Graph.Graph -> String -> Core.Term -> Core.Type -> Either Errors.Error Syntax.Stat
-encodeComplexTermDef cx g lname term typ =
-
-      let doms = extractDomains typ
-          paramNames = extractParams term
-          paramCount = Math.min (Lists.length paramNames) (Lists.length doms)
-          cod = dropDomains paramCount typ
-          zippedParams = Lists.zip (Lists.take paramCount paramNames) (Lists.take paramCount doms)
-          freeTypeVars =
-                  Lists.filter (\v -> Logic.not (Lists.elem 46 (Strings.toList (Core.unName v)))) (Sets.toList (Variables.freeVariablesInType typ))
-          tparams = Lists.map (\tv -> Utils.stparam tv) freeTypeVars
-          letBindings = extractLetBindings term
-          gWithTypeVars =
-                  Graph.Graph {
-                    Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-                    Graph.graphBoundTypes = (Graph.graphBoundTypes g),
-                    Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-                    Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-                    Graph.graphMetadata = (Graph.graphMetadata g),
-                    Graph.graphPrimitives = (Graph.graphPrimitives g),
-                    Graph.graphSchemaTypes = (Graph.graphSchemaTypes g),
-                    Graph.graphTypeVariables = (Sets.union (Sets.fromList freeTypeVars) (Graph.graphTypeVariables g))}
-      in (Eithers.bind (Eithers.mapList (encodeTypedParam cx gWithTypeVars) zippedParams) (\sparams -> Eithers.bind (encodeTerm cx gWithTypeVars (extractBody term)) (\sbody -> Eithers.bind (encodeType cx g cod) (\scod ->
-        let gForLets =
-                Logic.ifElse (Lists.null letBindings) gWithTypeVars (Scoping.extendGraphForLet (\g2 -> \b -> Logic.ifElse (Predicates.isComplexBinding g2 b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing) gWithTypeVars (Core.Let {
-                  Core.letBindings = letBindings,
-                  Core.letBody = (Core.TermVariable (Core.Name "dummy"))}))
-        in (Eithers.bind (Eithers.mapList (encodeLetBinding cx gForLets (Sets.fromList freeTypeVars)) letBindings) (\sbindings ->
-          let defBody =
-                  Logic.ifElse (Lists.null sbindings) sbody (Syntax.DataBlock (Syntax.Data_Block {
-                    Syntax.data_BlockStats = (Lists.concat2 sbindings [
-                      Syntax.StatTerm sbody])}))
-          in (Right (Syntax.StatDefn (Syntax.DefnDef (Syntax.Defn_Def {
-            Syntax.defn_DefMods = [],
-            Syntax.defn_DefName = Syntax.Data_Name {
-              Syntax.data_NameValue = (Syntax.PredefString lname)},
-            Syntax.defn_DefTparams = tparams,
-            Syntax.defn_DefParamss = (Lists.map (\p -> [
-              p]) sparams),
-            Syntax.defn_DefDecltpe = (Just scod),
-            Syntax.defn_DefBody = defBody}))))))))))
--- | Encode a Hydra function-valued term (lambda, project, cases, or unwrap) as a Scala expression
-encodeFunction :: t0 -> Graph.Graph -> M.Map Core.Name Core.Term -> Core.Term -> Maybe Core.Term -> Either Errors.Error Syntax.Data
-encodeFunction cx g meta funTerm arg =
-    case (Strip.deannotateAndDetypeTerm funTerm) of
-      Core.TermLambda v0 ->
-        let param = Core.lambdaParameter v0
-            v = Utils.scalaEscapeName (Core.unName param)
-            body = Core.lambdaBody v0
-            rawMdom = Core.lambdaDomain v0
-            mdom =
-                    Maybes.bind rawMdom (\dom ->
-                      let freeVars = Variables.freeVariablesInType dom
-                          unqualifiedFreeVars =
-                                  Sets.fromList (Lists.filter (\n -> Logic.not (Lists.elem 46 (Strings.toList (Core.unName n)))) (Sets.toList freeVars))
-                          unresolvedVars = Sets.difference unqualifiedFreeVars (Graph.graphTypeVariables g)
-                      in (Logic.ifElse (Sets.null unresolvedVars) (Just dom) Nothing))
-        in (Eithers.bind (encodeTerm cx g body) (\sbody -> Eithers.bind (Maybes.maybe (findSdom cx g meta) (\dom -> Eithers.bind (encodeType cx g dom) (\sdom -> Right (Just sdom))) mdom) (\sdom -> Right (Utils.slambda v sbody sdom))))
-      Core.TermUnwrap _ -> Maybes.maybe (Eithers.bind (findSdom cx g meta) (\sdom -> Right (Utils.slambda "x" (Utils.sname "x") sdom))) (\a -> encodeTerm cx g a) arg
-      Core.TermProject v0 ->
-        let fname = Utils.scalaEscapeName (Core.unName (Core.projectionField v0))
-            typeName = Core.projectionTypeName v0
-            pv = "x"
-        in (Maybes.maybe (Eithers.bind (Eithers.either (\_ -> Eithers.bind (encodeType cx g (Core.TypeVariable typeName)) (\st -> Right (Just st))) (\msdom -> Maybes.maybe (Eithers.bind (encodeType cx g (Core.TypeVariable typeName)) (\st -> Right (Just st))) (\sdom -> Right (Just sdom)) msdom) (findSdom cx g meta)) (\msdom -> Right (Utils.slambda pv (Syntax.DataRef (Syntax.Data_RefSelect (Syntax.Data_Select {
-          Syntax.data_SelectQual = (Utils.sname pv),
-          Syntax.data_SelectName = Syntax.Data_Name {
-            Syntax.data_NameValue = (Syntax.PredefString fname)}}))) msdom))) (\a -> Eithers.bind (encodeTerm cx g a) (\sa -> Right (Syntax.DataRef (Syntax.Data_RefSelect (Syntax.Data_Select {
-          Syntax.data_SelectQual = sa,
-          Syntax.data_SelectName = Syntax.Data_Name {
-            Syntax.data_NameValue = (Syntax.PredefString fname)}}))))) arg)
-      Core.TermCases v0 ->
-        let v = "v"
-            tname = Core.caseStatementTypeName v0
-            dom = Core.TypeVariable tname
-            sn = Utils.nameOfType g dom
-            cases = Core.caseStatementCases v0
-            dflt = Core.caseStatementDefault v0
-            ftypes = Eithers.either (\_ -> Maps.empty) (\x_ -> x_) (Resolution.fieldTypes cx g dom)
-        in (Eithers.bind (Eithers.mapList (\f -> encodeCase cx g ftypes sn f) cases) (\fieldCases -> Eithers.bind (Maybes.maybe (Right fieldCases) (\dfltTerm -> Eithers.bind (encodeTerm cx g dfltTerm) (\sdflt -> Right (Lists.concat2 fieldCases [
-          Syntax.Case {
-            Syntax.casePat = Syntax.PatWildcard,
-            Syntax.caseCond = Nothing,
-            Syntax.caseBody = sdflt}]))) dflt) (\scases -> Maybes.maybe (Eithers.bind (findSdom cx g meta) (\sdom -> Right (Utils.slambda v (Syntax.DataMatch (Syntax.Data_Match {
-          Syntax.data_MatchExpr = (Utils.sname v),
-          Syntax.data_MatchCases = scases})) sdom))) (\a -> Eithers.bind (encodeTerm cx g a) (\sa -> Right (Syntax.DataMatch (Syntax.Data_Match {
-          Syntax.data_MatchExpr = sa,
-          Syntax.data_MatchCases = scases})))) arg)))
-      _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported function"))
--- | Encode a let binding as a val or def declaration. outerTypeVars are type params from the enclosing scope.
-encodeLetBinding :: t0 -> Graph.Graph -> S.Set Core.Name -> Core.Binding -> Either Errors.Error Syntax.Stat
-encodeLetBinding cx g outerTypeVars b =
-
-      let bname = Utils.scalaEscapeName (Core.unName (Core.bindingName b))
-          bterm = Core.bindingTerm b
-          mts = Maybes.maybe (Maps.lookup (Core.bindingName b) (Graph.graphBoundTypes g)) (\ts -> Just ts) (Core.bindingTypeScheme b)
-          isFn =
-                  Maybes.maybe False (\ts -> case (Strip.deannotateType (Core.typeSchemeBody ts)) of
-                    Core.TypeFunction _ -> True
-                    Core.TypeForall v0 -> case (Strip.deannotateType (Core.forallTypeBody v0)) of
-                      Core.TypeFunction _ -> True
-                      _ -> False
-                    _ -> False) mts
-      in (Maybes.maybe (Eithers.bind (encodeTerm cx g bterm) (\srhs -> Right (Syntax.StatDefn (Syntax.DefnVal (Syntax.Defn_Val {
-        Syntax.defn_ValMods = [
-          Syntax.ModLazy],
-        Syntax.defn_ValPats = [
-          Syntax.PatVar (Syntax.Pat_Var {
-            Syntax.pat_VarName = Syntax.Data_Name {
-              Syntax.data_NameValue = (Syntax.PredefString bname)}})],
-        Syntax.defn_ValDecltpe = Nothing,
-        Syntax.defn_ValRhs = srhs}))))) (\ts ->
-        let newVars = Lists.filter (\v -> Logic.not (Sets.member v outerTypeVars)) (Core.typeSchemeVariables ts)
-            useDef = Logic.or isFn (Logic.not (Lists.null newVars))
-        in (Logic.ifElse useDef (encodeLocalDef cx g outerTypeVars bname bterm (Core.typeSchemeBody ts)) (Eithers.bind (encodeTerm cx g bterm) (\srhs -> Eithers.bind (encodeType cx g (Core.typeSchemeBody ts)) (\styp -> Right (Syntax.StatDefn (Syntax.DefnVal (Syntax.Defn_Val {
-          Syntax.defn_ValMods = [
-            Syntax.ModLazy],
-          Syntax.defn_ValPats = [
-            Syntax.PatVar (Syntax.Pat_Var {
-              Syntax.pat_VarName = Syntax.Data_Name {
-                Syntax.data_NameValue = (Syntax.PredefString bname)}})],
-          Syntax.defn_ValDecltpe = (Just styp),
-          Syntax.defn_ValRhs = srhs})))))))) mts)
--- | Encode a literal value as a Scala literal
-encodeLiteral :: t0 -> t1 -> Core.Literal -> Either Errors.Error Syntax.Lit
-encodeLiteral cx g av =
-    case av of
-      Core.LiteralBinary v0 -> Right (Syntax.LitBytes (Literals.binaryToBytes v0))
-      Core.LiteralBoolean v0 -> Right (Syntax.LitBoolean v0)
-      Core.LiteralDecimal v0 -> Right (Syntax.LitString (Literals.showDecimal v0))
-      Core.LiteralFloat v0 -> case v0 of
-        Core.FloatValueBigfloat v1 -> Right (Syntax.LitDouble (Literals.bigfloatToFloat64 v1))
-        Core.FloatValueFloat32 v1 -> Right (Syntax.LitFloat v1)
-        Core.FloatValueFloat64 v1 -> Right (Syntax.LitDouble v1)
-        _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected float value"))
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueBigint v1 -> Right (Syntax.LitLong (Literals.bigintToInt64 v1))
-        Core.IntegerValueInt8 v1 -> Right (Syntax.LitByte v1)
-        Core.IntegerValueInt16 v1 -> Right (Syntax.LitShort v1)
-        Core.IntegerValueInt32 v1 -> Right (Syntax.LitInt v1)
-        Core.IntegerValueInt64 v1 -> Right (Syntax.LitLong v1)
-        Core.IntegerValueUint8 v1 -> Right (Syntax.LitByte (Literals.bigintToInt8 (Literals.uint8ToBigint v1)))
-        Core.IntegerValueUint16 v1 -> Right (Syntax.LitInt (Literals.bigintToInt32 (Literals.uint16ToBigint v1)))
-        Core.IntegerValueUint32 v1 -> Right (Syntax.LitLong (Literals.bigintToInt64 (Literals.uint32ToBigint v1)))
-        Core.IntegerValueUint64 v1 -> Right (Syntax.LitLong (Literals.bigintToInt64 (Literals.uint64ToBigint v1)))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected integer value"))
-      Core.LiteralString v0 -> Right (Syntax.LitString v0)
-      _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected literal"))
--- | Encode a local def. outerTypeVars are type params already in scope (don't redeclare them).
-encodeLocalDef :: t0 -> Graph.Graph -> S.Set Core.Name -> String -> Core.Term -> Core.Type -> Either Errors.Error Syntax.Stat
-encodeLocalDef cx g outerTypeVars lname term typ =
-
-      let freeTypeVars =
-              Lists.filter (\v -> Logic.and (Logic.not (Lists.elem 46 (Strings.toList (Core.unName v)))) (Logic.not (Sets.member v outerTypeVars))) (Sets.toList (Variables.freeVariablesInType typ))
-          doms = extractDomains typ
-          paramNames = extractParams term
-          paramCount = Math.min (Lists.length paramNames) (Lists.length doms)
-          cod = dropDomains paramCount typ
-          zippedParams = Lists.zip (Lists.take paramCount paramNames) (Lists.take paramCount doms)
-          letBindings = extractLetBindings term
-          tparams = Lists.map (\tv -> Utils.stparam tv) freeTypeVars
-          allTypeVars = Sets.union outerTypeVars (Sets.fromList freeTypeVars)
-          gWithTypeVars =
-                  Graph.Graph {
-                    Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-                    Graph.graphBoundTypes = (Graph.graphBoundTypes g),
-                    Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-                    Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-                    Graph.graphMetadata = (Graph.graphMetadata g),
-                    Graph.graphPrimitives = (Graph.graphPrimitives g),
-                    Graph.graphSchemaTypes = (Graph.graphSchemaTypes g),
-                    Graph.graphTypeVariables = (Sets.union allTypeVars (Graph.graphTypeVariables g))}
-      in (Eithers.bind (Eithers.mapList (encodeTypedParam cx gWithTypeVars) zippedParams) (\sparams -> Eithers.bind (encodeTerm cx gWithTypeVars (extractBody term)) (\sbody -> Eithers.bind (encodeType cx gWithTypeVars cod) (\scod ->
-        let gForLets =
-                Logic.ifElse (Lists.null letBindings) gWithTypeVars (Scoping.extendGraphForLet (\g2 -> \b -> Logic.ifElse (Predicates.isComplexBinding g2 b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing) gWithTypeVars (Core.Let {
-                  Core.letBindings = letBindings,
-                  Core.letBody = (Core.TermVariable (Core.Name "dummy"))}))
-        in (Eithers.bind (Eithers.mapList (encodeLetBinding cx gForLets allTypeVars) letBindings) (\sbindings ->
-          let defBody =
-                  Logic.ifElse (Lists.null sbindings) sbody (Syntax.DataBlock (Syntax.Data_Block {
-                    Syntax.data_BlockStats = (Lists.concat2 sbindings [
-                      Syntax.StatTerm sbody])}))
-          in (Right (Syntax.StatDefn (Syntax.DefnDef (Syntax.Defn_Def {
-            Syntax.defn_DefMods = [],
-            Syntax.defn_DefName = Syntax.Data_Name {
-              Syntax.data_NameValue = (Syntax.PredefString lname)},
-            Syntax.defn_DefTparams = tparams,
-            Syntax.defn_DefParamss = (Lists.map (\p -> [
-              p]) sparams),
-            Syntax.defn_DefDecltpe = (Just scod),
-            Syntax.defn_DefBody = defBody}))))))))))
--- | Encode a Hydra term as a Scala expression
-encodeTerm :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Syntax.Data
-encodeTerm cx g term0 =
-
-      let term = stripWrapEliminations term0
-      in case (Strip.deannotateTerm term) of
-        Core.TermTypeApplication v0 ->
-          let collectTypeArgs =
-                  \t -> \acc -> case (Strip.deannotateTerm t) of
-                    Core.TermTypeApplication v1 -> collectTypeArgs (Core.typeApplicationTermBody v1) (Lists.cons (Core.typeApplicationTermType v1) acc)
-                    _ -> (acc, t)
-              collected = collectTypeArgs (Core.typeApplicationTermBody v0) [
-                    Core.typeApplicationTermType v0]
-              typeArgs = Pairs.first collected
-              innerTerm = Pairs.second collected
-              collectTypeLambdas =
-                      \t -> \acc -> case (Strip.deannotateTerm t) of
-                        Core.TermTypeLambda v1 -> collectTypeLambdas (Core.typeLambdaBody v1) (Lists.cons (Core.typeLambdaParameter v1) acc)
-                        _ -> (acc, t)
-              tlCollected = collectTypeLambdas innerTerm []
-              typeParams = Pairs.first tlCollected
-              bodyAfterTypeLambdas = Pairs.second tlCollected
-              substitutedBody = bodyAfterTypeLambdas
-          in case (Strip.deannotateTerm substitutedBody) of
-            Core.TermProject _ -> encodeTerm cx g substitutedBody
-            Core.TermCases _ -> encodeTerm cx g substitutedBody
-            Core.TermUnwrap _ -> encodeTerm cx g substitutedBody
-            Core.TermVariable v1 -> Maybes.cases (Maps.lookup v1 (Graph.graphPrimitives g)) (encodeTerm cx g substitutedBody) (\_prim -> Eithers.bind (Eithers.mapList (\targ -> encodeType cx g targ) typeArgs) (\stypeArgs ->
-              let inScopeTypeVarNames =
-                      Sets.fromList (Lists.map (\n -> Formatting.capitalize (Core.unName n)) (Sets.toList (Graph.graphTypeVariables g)))
-                  hasForallResidual =
-                          Logic.not (Lists.null (Lists.filter (\st -> case st of
-                            Syntax.TypeVar v2 ->
-                              let tvName = Syntax.type_NameValue (Syntax.type_VarName v2)
-                              in (Logic.and (Logic.not (Lists.elem 46 (Strings.toList tvName))) (Logic.not (Sets.member tvName inScopeTypeVarNames)))
-                            _ -> False) stypeArgs))
-              in (Logic.ifElse hasForallResidual (Right (Utils.sprim v1)) (Right (Utils.sapplyTypes (Utils.sprim v1) stypeArgs)))))
-            _ -> encodeTerm cx g substitutedBody
-        Core.TermTypeLambda v0 -> encodeTerm cx (Scoping.extendGraphForTypeLambda g v0) (Core.typeLambdaBody v0)
-        Core.TermApplication v0 ->
-          let fun = Core.applicationFunction v0
-              arg = Core.applicationArgument v0
-          in case (Strip.deannotateAndDetypeTerm fun) of
-            Core.TermLambda v1 ->
-              let lamBody = Core.lambdaBody v1
-              in case (Strip.deannotateAndDetypeTerm lamBody) of
-                Core.TermApplication v2 ->
-                  let innerFun = Core.applicationFunction v2
-                  in case (Strip.deannotateAndDetypeTerm innerFun) of
-                    Core.TermCases _ -> encodeFunction cx g (Annotations.termAnnotationInternal innerFun) innerFun (Just arg)
-                    _ -> Eithers.bind (encodeTerm cx g fun) (\sfun -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Utils.sapply sfun [
-                      sarg])))
-                _ -> Eithers.bind (encodeTerm cx g fun) (\sfun -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Utils.sapply sfun [
-                  sarg])))
-            Core.TermProject v1 ->
-              let fname = Utils.scalaEscapeName (Core.unName (Core.projectionField v1))
-              in (Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Syntax.DataRef (Syntax.Data_RefSelect (Syntax.Data_Select {
-                Syntax.data_SelectQual = sarg,
-                Syntax.data_SelectName = Syntax.Data_Name {
-                  Syntax.data_NameValue = (Syntax.PredefString fname)}})))))
-            Core.TermCases _ -> encodeFunction cx g (Annotations.termAnnotationInternal fun) fun (Just arg)
-            _ -> Eithers.bind (encodeTerm cx g fun) (\sfun -> Eithers.bind (encodeTerm cx g arg) (\sarg -> Right (Utils.sapply sfun [
-              sarg])))
-        Core.TermLambda _ -> encodeFunction cx g (Annotations.termAnnotationInternal term) term Nothing
-        Core.TermProject _ -> encodeFunction cx g (Annotations.termAnnotationInternal term) term Nothing
-        Core.TermCases _ -> encodeFunction cx g (Annotations.termAnnotationInternal term) term Nothing
-        Core.TermUnwrap _ -> encodeFunction cx g (Annotations.termAnnotationInternal term) term Nothing
-        Core.TermList v0 -> Eithers.bind (Eithers.mapList (\e -> encodeTerm cx g e) v0) (\sels -> Right (Utils.sapply (Utils.sname "Seq") sels))
-        Core.TermLiteral v0 -> Eithers.bind (encodeLiteral cx g v0) (\slit ->
-          let litData = Syntax.DataLit slit
-          in case v0 of
-            Core.LiteralDecimal _ -> Right (Utils.sapply (Utils.sname "BigDecimal") [
-              litData])
-            Core.LiteralInteger v1 -> case v1 of
-              Core.IntegerValueBigint v2 -> Right (Utils.sapply (Utils.sname "BigInt") [
-                Syntax.DataLit (Syntax.LitString (Literals.showBigint v2))])
-              Core.IntegerValueUint64 v2 -> Right (Utils.sapply (Utils.sname "BigInt") [
-                Syntax.DataLit (Syntax.LitString (Literals.showBigint (Literals.uint64ToBigint v2)))])
-              _ -> Right litData
-            Core.LiteralFloat v1 -> case v1 of
-              Core.FloatValueBigfloat _ -> Right (Utils.sapply (Utils.sname "BigDecimal") [
-                litData])
-              _ -> Right litData
-            _ -> Right litData)
-        Core.TermMap v0 -> Eithers.bind (Eithers.mapList (\kv -> Eithers.bind (encodeTerm cx g (Pairs.first kv)) (\sk -> Eithers.bind (encodeTerm cx g (Pairs.second kv)) (\sv -> Right (Utils.sassign sk sv)))) (Maps.toList v0)) (\spairs -> Right (Utils.sapply (Utils.sname "Map") spairs))
-        Core.TermWrap v0 -> encodeTerm cx g (Core.wrappedTermBody v0)
-        Core.TermMaybe v0 -> Maybes.maybe (Right (Utils.sname "None")) (\t -> Eithers.bind (encodeTerm cx g t) (\s -> Right (Utils.sapply (Utils.sname "Some") [
-          s]))) v0
-        Core.TermRecord v0 ->
-          let rname = Core.recordTypeName v0
-              fields = Core.recordFields v0
-              n = Utils.scalaTypeName True rname
-          in (Eithers.bind (Eithers.mapList (\f -> encodeTerm cx g (Core.fieldTerm f)) fields) (\args -> Right (Utils.sapply (Utils.sname n) args)))
-        Core.TermSet v0 -> Eithers.bind (Eithers.mapList (\e -> encodeTerm cx g e) (Sets.toList v0)) (\sels -> Right (Utils.sapply (Utils.sname "scala.collection.immutable.Set") sels))
-        Core.TermInject v0 ->
-          let sn = Core.injectionTypeName v0
-              fn = Core.fieldName (Core.injectionField v0)
-              ft = Core.fieldTerm (Core.injectionField v0)
-              lhs = Utils.sname (Utils.qualifyUnionFieldName "UNION." (Just sn) fn)
-              unionFtypes = Eithers.either (\_ -> Maps.empty) (\x_ -> x_) (Resolution.fieldTypes cx g (Core.TypeVariable sn))
-          in (Logic.ifElse (Maybes.maybe (case (Strip.deannotateAndDetypeTerm ft) of
-            Core.TermUnit -> True
-            Core.TermRecord v1 -> Equality.equal (Lists.length (Core.recordFields v1)) 0
-            _ -> False) (\dom -> case (Strip.deannotateType dom) of
-            Core.TypeUnit -> True
-            Core.TypeRecord v1 -> Equality.equal (Lists.length v1) 0
-            _ -> False) (Maps.lookup fn unionFtypes)) (Right lhs) (Eithers.bind (encodeTerm cx g ft) (\sarg -> Right (Utils.sapply lhs [
-            sarg]))))
-        Core.TermVariable v0 ->
-          let fullName = Core.unName v0
-              localName = Names.localNameOf v0
-              parts = Strings.splitOn "." fullName
-              numParts = Lists.length parts
-              escaped =
-                      Logic.ifElse (Equality.lte numParts 1) (Utils.scalaEscapeName fullName) (Logic.ifElse (Equality.equal numParts 2) (Strings.cat2 (Maybes.fromMaybe fullName (Lists.maybeHead parts)) (Strings.cat2 "." (Utils.scalaEscapeName localName))) (Strings.intercalate "." (Lists.concat2 (Lists.take (Math.sub numParts 1) parts) [
-                        Utils.scalaEscapeName localName])))
-          in (Right (Utils.sname escaped))
-        Core.TermAnnotated v0 -> encodeTerm cx g (Core.annotatedTermBody v0)
-        Core.TermEither v0 -> Eithers.either (\l -> Eithers.bind (encodeTerm cx g l) (\sl -> Right (Utils.sapply (Utils.sname "Left") [
-          sl]))) (\r -> Eithers.bind (encodeTerm cx g r) (\sr -> Right (Utils.sapply (Utils.sname "Right") [
-          sr]))) v0
-        Core.TermPair v0 -> Eithers.bind (encodeTerm cx g (Pairs.first v0)) (\sf -> Eithers.bind (encodeTerm cx g (Pairs.second v0)) (\ss -> Right (Utils.sapply (Utils.sname "Tuple2") [
-          sf,
-          ss])))
-        Core.TermUnit -> Right (Syntax.DataLit Syntax.LitUnit)
-        Core.TermLet v0 ->
-          let bindings = Core.letBindings v0
-              body = Core.letBody v0
-              gLet =
-                      Scoping.extendGraphForLet (\g2 -> \b -> Logic.ifElse (Predicates.isComplexBinding g2 b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing) g v0
-          in (Eithers.bind (Eithers.mapList (encodeLetBinding cx gLet (Graph.graphTypeVariables gLet)) bindings) (\sbindings -> Eithers.bind (encodeTerm cx gLet body) (\sbody -> Right (Syntax.DataBlock (Syntax.Data_Block {
-            Syntax.data_BlockStats = (Lists.concat2 sbindings [
-              Syntax.StatTerm sbody])})))))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected term"))
--- | Encode a term definition as a Scala statement
-encodeTermDefinition :: t0 -> Graph.Graph -> Packaging.TermDefinition -> Either Errors.Error Syntax.Stat
-encodeTermDefinition cx g td =
-
-      let name = Packaging.termDefinitionName td
-          term = Packaging.termDefinitionTerm td
-          lname = Utils.scalaEscapeName (Names.localNameOf name)
-          typ_ =
-                  Maybes.maybe (Core.TypeVariable (Core.Name "hydra.core.Unit")) Core.typeSchemeBody (Packaging.termDefinitionTypeScheme td)
-          isFunctionType =
-                  case (Strip.deannotateType typ_) of
-                    Core.TypeFunction _ -> True
-                    Core.TypeForall v0 -> case (Strip.deannotateType (Core.forallTypeBody v0)) of
-                      Core.TypeFunction _ -> True
-                      _ -> False
-                    _ -> False
-      in (Logic.ifElse isFunctionType (encodeComplexTermDef cx g lname term typ_) (Eithers.bind (encodeType cx g typ_) (\stype -> Eithers.bind (encodeTerm cx g term) (\rhs -> Right (Syntax.StatDefn (Syntax.DefnVal (Syntax.Defn_Val {
-        Syntax.defn_ValMods = [
-          Syntax.ModLazy],
-        Syntax.defn_ValPats = [
-          Syntax.PatVar (Syntax.Pat_Var {
-            Syntax.pat_VarName = Syntax.Data_Name {
-              Syntax.data_NameValue = (Syntax.PredefString lname)}})],
-        Syntax.defn_ValDecltpe = (Just stype),
-        Syntax.defn_ValRhs = rhs})))))))
--- | Encode a Hydra type as a Scala type
-encodeType :: t0 -> t1 -> Core.Type -> Either Errors.Error Syntax.Type
-encodeType cx g t =
-    case (Strip.deannotateType t) of
-      Core.TypeApplication v0 ->
-        let collectTypeArgs =
-                \t2 -> \acc -> case (Strip.deannotateType t2) of
-                  Core.TypeApplication v1 ->
-                    let f2 = Core.applicationTypeFunction v1
-                        a2 = Core.applicationTypeArgument v1
-                    in (collectTypeArgs f2 (Lists.cons a2 acc))
-                  _ -> (t2, acc)
-            collected = collectTypeArgs (Core.TypeApplication v0) []
-            baseFun = Pairs.first collected
-            allArgs = Pairs.second collected
-        in (Eithers.bind (encodeType cx g baseFun) (\sfun -> Eithers.bind (Eithers.mapList (\a -> encodeType cx g a) allArgs) (\sargs -> Right (Utils.stapply sfun sargs))))
-      Core.TypeUnit -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-        Syntax.type_NameValue = "Unit"})))
-      Core.TypeEither v0 ->
-        let lt = Core.eitherTypeLeft v0
-            rt = Core.eitherTypeRight v0
-        in (Eithers.bind (encodeType cx g lt) (\slt -> Eithers.bind (encodeType cx g rt) (\srt -> Right (Utils.stapply2 (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "Either"}))) slt srt))))
-      Core.TypeFunction v0 ->
-        let dom = Core.functionTypeDomain v0
-            cod = Core.functionTypeCodomain v0
-        in (Eithers.bind (encodeType cx g dom) (\sdom -> Eithers.bind (encodeType cx g cod) (\scod -> Right (Syntax.TypeFunctionType (Syntax.Type_FunctionTypeFunction (Syntax.Type_Function {
-          Syntax.type_FunctionParams = [
-            sdom],
-          Syntax.type_FunctionRes = scod}))))))
-      Core.TypeList v0 -> Eithers.bind (encodeType cx g v0) (\slt -> Right (Utils.stapply1 (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-        Syntax.type_NameValue = "Seq"}))) slt))
-      Core.TypeLiteral v0 -> case v0 of
-        Core.LiteralTypeBinary -> Right (Utils.stapply (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "Array"}))) [
-          Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Byte"}))])
-        Core.LiteralTypeBoolean -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "Boolean"})))
-        Core.LiteralTypeDecimal -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "BigDecimal"})))
-        Core.LiteralTypeFloat v1 -> case v1 of
-          Core.FloatTypeBigfloat -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "BigDecimal"})))
-          Core.FloatTypeFloat32 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Float"})))
-          Core.FloatTypeFloat64 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Double"})))
-          _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported float type"))
-        Core.LiteralTypeInteger v1 -> case v1 of
-          Core.IntegerTypeBigint -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "BigInt"})))
-          Core.IntegerTypeInt8 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Byte"})))
-          Core.IntegerTypeInt16 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Short"})))
-          Core.IntegerTypeInt32 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Int"})))
-          Core.IntegerTypeInt64 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Long"})))
-          Core.IntegerTypeUint8 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Byte"})))
-          Core.IntegerTypeUint16 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Int"})))
-          Core.IntegerTypeUint32 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "Long"})))
-          Core.IntegerTypeUint64 -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-            Syntax.type_NameValue = "BigInt"})))
-          _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported integer type"))
-        Core.LiteralTypeString -> Right (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "scala.Predef.String"})))
-        _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported literal type"))
-      Core.TypeMap v0 ->
-        let kt = Core.mapTypeKeys v0
-            vt = Core.mapTypeValues v0
-        in (Eithers.bind (encodeType cx g kt) (\skt -> Eithers.bind (encodeType cx g vt) (\svt -> Right (Utils.stapply2 (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "Map"}))) skt svt))))
-      Core.TypeMaybe v0 -> Eithers.bind (encodeType cx g v0) (\sot -> Right (Utils.stapply1 (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-        Syntax.type_NameValue = "Option"}))) sot))
-      Core.TypePair v0 ->
-        let ft = Core.pairTypeFirst v0
-            st = Core.pairTypeSecond v0
-        in (Eithers.bind (encodeType cx g ft) (\sft -> Eithers.bind (encodeType cx g st) (\sst -> Right (Utils.stapply2 (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-          Syntax.type_NameValue = "Tuple2"}))) sft sst))))
-      Core.TypeRecord _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous record type"))
-      Core.TypeSet v0 -> Eithers.bind (encodeType cx g v0) (\sst -> Right (Utils.stapply1 (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-        Syntax.type_NameValue = "scala.collection.immutable.Set"}))) sst))
-      Core.TypeUnion _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous union type"))
-      Core.TypeWrap _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected anonymous wrap type"))
-      Core.TypeForall v0 ->
-        let v = Core.forallTypeParameter v0
-            body = Core.forallTypeBody v0
-        in (Eithers.bind (encodeType cx g body) (\sbody -> Right (Syntax.TypeLambda (Syntax.Type_Lambda {
-          Syntax.type_LambdaTparams = [
-            Utils.stparam v],
-          Syntax.type_LambdaTpe = sbody}))))
-      Core.TypeVariable v0 ->
-        let rawName = Core.unName v0
-            typeName = Logic.ifElse (Lists.elem 46 (Strings.toList rawName)) rawName (Formatting.capitalize rawName)
-        in (Right (Syntax.TypeVar (Syntax.Type_Var {
-          Syntax.type_VarName = Syntax.Type_Name {
-            Syntax.type_NameValue = typeName}})))
-      _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported type"))
--- | Encode a type definition as a Scala statement
-encodeTypeDefinition :: t0 -> t1 -> Packaging.TypeDefinition -> Either Errors.Error Syntax.Stat
-encodeTypeDefinition cx g td =
-
-      let name = Packaging.typeDefinitionName td
-          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme td)
-          lname = Names.localNameOf name
-          tname = Syntax.Type_Name {
-                Syntax.type_NameValue = lname}
-          dname = Syntax.Data_Name {
-                Syntax.data_NameValue = (Syntax.PredefString lname)}
-          freeVars =
-                  Lists.filter (\v -> Logic.not (Lists.elem 46 (Strings.toList (Core.unName v)))) (Sets.toList (Variables.freeVariablesInType typ))
-          tparams =
-                  Lists.map (\_v ->
-                    let vn = Formatting.capitalize (Core.unName _v)
-                    in Syntax.Type_Param {
-                      Syntax.type_ParamMods = [],
-                      Syntax.type_ParamName = (Syntax.NameValue vn),
-                      Syntax.type_ParamTparams = [],
-                      Syntax.type_ParamTbounds = [],
-                      Syntax.type_ParamVbounds = [],
-                      Syntax.type_ParamCbounds = []}) freeVars
-      in case (Strip.deannotateType typ) of
-        Core.TypeForall v0 ->
-          let forallBody = Core.forallTypeBody v0
-              forallParam = Core.forallTypeParameter v0
-              collectForallParams =
-                      \t -> \acc -> case (Strip.deannotateType t) of
-                        Core.TypeForall v1 -> collectForallParams (Core.forallTypeBody v1) (Lists.cons (Core.forallTypeParameter v1) acc)
-                        _ -> (acc, t)
-              collected = collectForallParams forallBody [
-                    forallParam]
-              allForallParams = Lists.reverse (Pairs.first collected)
-              innerBody = Pairs.second collected
-              allTparams =
-                      Lists.map (\_v ->
-                        let vn = Formatting.capitalize (Core.unName _v)
-                        in Syntax.Type_Param {
-                          Syntax.type_ParamMods = [],
-                          Syntax.type_ParamName = (Syntax.NameValue vn),
-                          Syntax.type_ParamTparams = [],
-                          Syntax.type_ParamTbounds = [],
-                          Syntax.type_ParamVbounds = [],
-                          Syntax.type_ParamCbounds = []}) allForallParams
-          in case (Strip.deannotateType innerBody) of
-            Core.TypeRecord v1 -> Eithers.bind (Eithers.mapList (\f -> fieldToParam cx g f) v1) (\params -> Right (Syntax.StatDefn (Syntax.DefnClass (Syntax.Defn_Class {
-              Syntax.defn_ClassMods = [
-                Syntax.ModCase],
-              Syntax.defn_ClassName = tname,
-              Syntax.defn_ClassTparams = allTparams,
-              Syntax.defn_ClassCtor = Syntax.Ctor_Primary {
-                Syntax.ctor_PrimaryMods = [],
-                Syntax.ctor_PrimaryName = (Syntax.NameValue ""),
-                Syntax.ctor_PrimaryParamss = [
-                  params]},
-              Syntax.defn_ClassTemplate = Syntax.Template {
-                Syntax.templateEarly = [],
-                Syntax.templateInits = [],
-                Syntax.templateSelf = (Syntax.Self ()),
-                Syntax.templateStats = []}}))))
-            Core.TypeUnion v1 -> Eithers.bind (Eithers.mapList (\f -> fieldToEnumCase cx g lname allTparams f) v1) (\cases -> Right (Syntax.StatDefn (Syntax.DefnEnum (Syntax.Defn_Enum {
-              Syntax.defn_EnumMods = [],
-              Syntax.defn_EnumName = tname,
-              Syntax.defn_EnumTparams = allTparams,
-              Syntax.defn_EnumCtor = Syntax.Ctor_Primary {
-                Syntax.ctor_PrimaryMods = [],
-                Syntax.ctor_PrimaryName = (Syntax.NameValue ""),
-                Syntax.ctor_PrimaryParamss = []},
-              Syntax.defn_EnumTemplate = Syntax.Template {
-                Syntax.templateEarly = [],
-                Syntax.templateInits = [],
-                Syntax.templateSelf = (Syntax.Self ()),
-                Syntax.templateStats = cases}}))))
-            Core.TypeWrap v1 -> Eithers.bind (encodeType cx g v1) (\styp -> Right (Syntax.StatDefn (Syntax.DefnType (Syntax.Defn_Type {
-              Syntax.defn_TypeMods = [],
-              Syntax.defn_TypeName = tname,
-              Syntax.defn_TypeTparams = allTparams,
-              Syntax.defn_TypeBody = styp}))))
-            _ ->
-              let mkAlias =
-                      \styp -> Right (Syntax.StatDefn (Syntax.DefnType (Syntax.Defn_Type {
-                        Syntax.defn_TypeMods = [],
-                        Syntax.defn_TypeName = Syntax.Type_Name {
-                          Syntax.type_NameValue = lname},
-                        Syntax.defn_TypeTparams = allTparams,
-                        Syntax.defn_TypeBody = styp})))
-              in (Eithers.either (\_ -> mkAlias (Utils.stref "Any")) mkAlias (encodeType cx g innerBody))
-        Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (\f -> fieldToParam cx g f) v0) (\params -> Right (Syntax.StatDefn (Syntax.DefnClass (Syntax.Defn_Class {
-          Syntax.defn_ClassMods = [
-            Syntax.ModCase],
-          Syntax.defn_ClassName = tname,
-          Syntax.defn_ClassTparams = tparams,
-          Syntax.defn_ClassCtor = Syntax.Ctor_Primary {
-            Syntax.ctor_PrimaryMods = [],
-            Syntax.ctor_PrimaryName = (Syntax.NameValue ""),
-            Syntax.ctor_PrimaryParamss = [
-              params]},
-          Syntax.defn_ClassTemplate = Syntax.Template {
-            Syntax.templateEarly = [],
-            Syntax.templateInits = [],
-            Syntax.templateSelf = (Syntax.Self ()),
-            Syntax.templateStats = []}}))))
-        Core.TypeUnion v0 -> Eithers.bind (Eithers.mapList (\f -> fieldToEnumCase cx g lname tparams f) v0) (\cases -> Right (Syntax.StatDefn (Syntax.DefnEnum (Syntax.Defn_Enum {
-          Syntax.defn_EnumMods = [],
-          Syntax.defn_EnumName = tname,
-          Syntax.defn_EnumTparams = tparams,
-          Syntax.defn_EnumCtor = Syntax.Ctor_Primary {
-            Syntax.ctor_PrimaryMods = [],
-            Syntax.ctor_PrimaryName = (Syntax.NameValue ""),
-            Syntax.ctor_PrimaryParamss = []},
-          Syntax.defn_EnumTemplate = Syntax.Template {
-            Syntax.templateEarly = [],
-            Syntax.templateInits = [],
-            Syntax.templateSelf = (Syntax.Self ()),
-            Syntax.templateStats = cases}}))))
-        Core.TypeWrap v0 -> Eithers.bind (encodeType cx g v0) (\styp -> Right (Syntax.StatDefn (Syntax.DefnType (Syntax.Defn_Type {
-          Syntax.defn_TypeMods = [],
-          Syntax.defn_TypeName = tname,
-          Syntax.defn_TypeTparams = tparams,
-          Syntax.defn_TypeBody = styp}))))
-        _ ->
-          let mkAlias =
-                  \styp -> Right (Syntax.StatDefn (Syntax.DefnType (Syntax.Defn_Type {
-                    Syntax.defn_TypeMods = [],
-                    Syntax.defn_TypeName = Syntax.Type_Name {
-                      Syntax.type_NameValue = lname},
-                    Syntax.defn_TypeTparams = tparams,
-                    Syntax.defn_TypeBody = styp})))
-          in (Eithers.either (\_ -> mkAlias (Utils.stref "Any")) mkAlias (encodeType cx g typ))
--- | Encode a parameter with its type annotation
-encodeTypedParam :: t0 -> t1 -> (Core.Name, Core.Type) -> Either Errors.Error Syntax.Data_Param
-encodeTypedParam cx g pair =
-
-      let pname = Utils.scalaEscapeName (Names.localNameOf (Pairs.first pair))
-          pdom = Pairs.second pair
-      in (Eithers.bind (encodeType cx g pdom) (\sdom -> Right (Syntax.Data_Param {
-        Syntax.data_ParamMods = [],
-        Syntax.data_ParamName = (Syntax.NameValue pname),
-        Syntax.data_ParamDecltpe = (Just sdom),
-        Syntax.data_ParamDefault = Nothing})))
--- | Encode an untyped application term by first inferring types
-encodeUntypeApplicationTerm :: Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error Syntax.Data
-encodeUntypeApplicationTerm cx g term =
-    Eithers.bind (Inference.inferInGraphContext cx g term) (\result -> encodeTerm cx g (Typing.inferenceResultTerm result))
--- | Extract the innermost body from a term
-extractBody :: Core.Term -> Core.Term
-extractBody t =
-    case (Strip.deannotateAndDetypeTerm t) of
-      Core.TermLambda v0 -> extractBody (Core.lambdaBody v0)
-      Core.TermTypeLambda v0 -> extractBody (Core.typeLambdaBody v0)
-      Core.TermTypeApplication v0 -> extractBody (Core.typeApplicationTermBody v0)
-      Core.TermLet v0 -> extractBody (Core.letBody v0)
-      _ -> t
--- | Extract the final return type from a function type
-extractCodomain :: Core.Type -> Core.Type
-extractCodomain t =
-    case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> extractCodomain (Core.functionTypeCodomain v0)
-      Core.TypeForall v0 -> extractCodomain (Core.forallTypeBody v0)
-      _ -> t
--- | Extract domain types from a function type
-extractDomains :: Core.Type -> [Core.Type]
-extractDomains t =
-    case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> Lists.cons (Core.functionTypeDomain v0) (extractDomains (Core.functionTypeCodomain v0))
-      Core.TypeForall v0 -> extractDomains (Core.forallTypeBody v0)
-      _ -> []
--- | Extract let bindings from a term
-extractLetBindings :: Core.Term -> [Core.Binding]
-extractLetBindings t =
-    case (Strip.deannotateAndDetypeTerm t) of
-      Core.TermLambda v0 -> extractLetBindings (Core.lambdaBody v0)
-      Core.TermTypeLambda v0 -> extractLetBindings (Core.typeLambdaBody v0)
-      Core.TermTypeApplication v0 -> extractLetBindings (Core.typeApplicationTermBody v0)
-      Core.TermLet v0 -> Lists.concat2 (Core.letBindings v0) (extractLetBindings (Core.letBody v0))
-      _ -> []
--- | Extract parameter names from a term
-extractParams :: Core.Term -> [Core.Name]
-extractParams t =
-    case (Strip.deannotateAndDetypeTerm t) of
-      Core.TermLambda v0 -> Lists.cons (Core.lambdaParameter v0) (extractParams (Core.lambdaBody v0))
-      Core.TermTypeLambda v0 -> extractParams (Core.typeLambdaBody v0)
-      Core.TermTypeApplication v0 -> extractParams (Core.typeApplicationTermBody v0)
-      Core.TermLet v0 -> extractParams (Core.letBody v0)
-      _ -> []
--- | Convert a field type to a Scala enum case
-fieldToEnumCase :: t0 -> t1 -> String -> [Syntax.Type_Param] -> Core.FieldType -> Either Errors.Error Syntax.Stat
-fieldToEnumCase cx g parentName tparams ft =
-
-      let fname = Utils.scalaEscapeName (Core.unName (Core.fieldTypeName ft))
-          ftyp = Core.fieldTypeType ft
-          caseName = Syntax.Data_Name {
-                Syntax.data_NameValue = (Syntax.PredefString fname)}
-          isUnit =
-                  case (Strip.deannotateType ftyp) of
-                    Core.TypeUnit -> True
-                    Core.TypeRecord v0 -> Equality.equal (Lists.length v0) 0
-                    _ -> False
-          parentType =
-                  Logic.ifElse (Lists.null tparams) (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-                    Syntax.type_NameValue = parentName}))) (Syntax.TypeApply (Syntax.Type_Apply {
-                    Syntax.type_ApplyTpe = (Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-                      Syntax.type_NameValue = parentName}))),
-                    Syntax.type_ApplyArgs = (Lists.map typeParamToTypeVar tparams)}))
-      in (Eithers.bind (encodeType cx g ftyp) (\sftyp -> Right (Syntax.StatDefn (Syntax.DefnEnumCase (Syntax.Defn_EnumCase {
-        Syntax.defn_EnumCaseMods = [],
-        Syntax.defn_EnumCaseName = caseName,
-        Syntax.defn_EnumCaseTparams = [],
-        Syntax.defn_EnumCaseCtor = Syntax.Ctor_Primary {
-          Syntax.ctor_PrimaryMods = [],
-          Syntax.ctor_PrimaryName = (Syntax.NameValue ""),
-          Syntax.ctor_PrimaryParamss = [
-            Logic.ifElse isUnit [] [
-              Syntax.Data_Param {
-                Syntax.data_ParamMods = [],
-                Syntax.data_ParamName = (Syntax.NameValue "value"),
-                Syntax.data_ParamDecltpe = (Just sftyp),
-                Syntax.data_ParamDefault = Nothing}]]},
-        Syntax.defn_EnumCaseInits = [
-          Syntax.Init {
-            Syntax.initTpe = parentType,
-            Syntax.initName = (Syntax.NameValue ""),
-            Syntax.initArgss = []}]})))))
--- | Convert a field type to a Scala parameter
-fieldToParam :: t0 -> t1 -> Core.FieldType -> Either Errors.Error Syntax.Data_Param
-fieldToParam cx g ft =
-
-      let fname = Utils.scalaEscapeName (Core.unName (Core.fieldTypeName ft))
-          ftyp = Core.fieldTypeType ft
-      in (Eithers.bind (encodeType cx g ftyp) (\sftyp -> Right (Syntax.Data_Param {
-        Syntax.data_ParamMods = [],
-        Syntax.data_ParamName = (Syntax.NameValue fname),
-        Syntax.data_ParamDecltpe = (Just sftyp),
-        Syntax.data_ParamDefault = Nothing})))
--- | Find the domain type from annotations
-findDomain :: t0 -> Graph.Graph -> M.Map Core.Name Core.Term -> Either Errors.Error Core.Type
-findDomain cx g meta =
-    Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g meta)) (\r -> Maybes.maybe (Left (Errors.ErrorOther (Errors.OtherError "expected a typed term"))) (\t -> case (Strip.deannotateType t) of
-      Core.TypeFunction v0 -> Right (Core.functionTypeDomain v0)
-      _ -> Left (Errors.ErrorOther (Errors.OtherError "expected a function type"))) r)
--- | Find import statements for the module
-findImports :: t0 -> Graph.Graph -> Packaging.Module -> Either Errors.Error [Syntax.Stat]
-findImports cx g mod =
-    Eithers.bind (Analysis.moduleDependencyNamespaces cx g False False True False mod) (\elImps -> Eithers.bind (Analysis.moduleDependencyNamespaces cx g False True False False mod) (\primImps -> Right (Lists.concat [
-      Lists.map toElImport (Sets.toList elImps),
-      (Lists.map toPrimImport (Sets.toList primImps))])))
--- | Find the Scala domain type for a function from annotations
-findSdom :: t0 -> Graph.Graph -> M.Map Core.Name Core.Term -> Either Errors.Error (Maybe Syntax.Type)
-findSdom cx g meta =
-    Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_a -> _a) (Annotations.getType g meta)) (\mtyp -> Maybes.maybe (Right Nothing) (\t -> case (Strip.deannotateType t) of
-      Core.TypeFunction v0 ->
-        let dom = Core.functionTypeDomain v0
-        in (Eithers.bind (encodeType cx g dom) (\sdom -> Right (Just sdom)))
-      Core.TypeForall v0 -> case (Strip.deannotateType (Core.forallTypeBody v0)) of
-        Core.TypeFunction v1 ->
-          let dom2 = Core.functionTypeDomain v1
-          in (Eithers.bind (encodeType cx g dom2) (\sdom2 -> Right (Just sdom2)))
-        _ -> Right Nothing
-      _ -> Eithers.bind (encodeType cx g t) (\st -> Right (Just st))) mtyp)
--- | Convert a Hydra module to Scala source code
-moduleToScala :: Packaging.Module -> [Packaging.Definition] -> t0 -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToScala mod defs cx g =
-    Eithers.bind (constructModule cx g mod defs) (\pkg ->
-      let s = Serialization.printExpr (Serialization.parenthesize (Serde.writePkg pkg))
-      in (Right (Maps.singleton (Names.namespaceToFilePath Util.CaseConventionCamel (Packaging.FileExtension "scala") (Packaging.moduleNamespace mod)) s)))
--- | Strip wrap eliminations from terms (newtypes are erased in Scala)
-stripWrapEliminations :: Core.Term -> Core.Term
-stripWrapEliminations t =
-    case (Strip.deannotateAndDetypeTerm t) of
-      Core.TermApplication v0 ->
-        let appFun = Core.applicationFunction v0
-            appArg = Core.applicationArgument v0
-        in case (Strip.deannotateAndDetypeTerm appFun) of
-          Core.TermUnwrap _ -> stripWrapEliminations appArg
-          Core.TermApplication v1 ->
-            let innerFun = Core.applicationFunction v1
-                innerArg = Core.applicationArgument v1
-            in case (Strip.deannotateAndDetypeTerm innerFun) of
-              Core.TermUnwrap _ -> stripWrapEliminations (Core.TermApplication (Core.Application {
-                Core.applicationFunction = innerArg,
-                Core.applicationArgument = appArg}))
-              _ -> t
-          _ -> t
-      _ -> t
--- | Create an element import statement
-toElImport :: Packaging.Namespace -> Syntax.Stat
-toElImport ns =
-    Syntax.StatImportExport (Syntax.ImportExportStatImport (Syntax.Import {
-      Syntax.importImporters = [
-        Syntax.Importer {
-          Syntax.importerRef = (Syntax.Data_RefName (Syntax.Data_Name {
-            Syntax.data_NameValue = (Syntax.PredefString (Strings.intercalate "." (Strings.splitOn "." (Packaging.unNamespace ns))))})),
-          Syntax.importerImportees = [
-            Syntax.ImporteeWildcard]}]}))
--- | Create a primitive import statement
-toPrimImport :: Packaging.Namespace -> Syntax.Stat
-toPrimImport ns =
-    Syntax.StatImportExport (Syntax.ImportExportStatImport (Syntax.Import {
-      Syntax.importImporters = [
-        Syntax.Importer {
-          Syntax.importerRef = (Syntax.Data_RefName (Syntax.Data_Name {
-            Syntax.data_NameValue = (Syntax.PredefString (Strings.intercalate "." (Strings.splitOn "." (Packaging.unNamespace ns))))})),
-          Syntax.importerImportees = []}]}))
--- | Convert a type parameter to a type variable reference
-typeParamToTypeVar :: Syntax.Type_Param -> Syntax.Type
-typeParamToTypeVar tp =
-
-      let n = Syntax.type_ParamName tp
-          s =
-                  case n of
-                    Syntax.NameValue v0 -> v0
-                    _ -> ""
-      in (Syntax.TypeVar (Syntax.Type_Var {
-        Syntax.type_VarName = Syntax.Type_Name {
-          Syntax.type_NameValue = s}}))
diff --git a/src/main/haskell/Hydra/Scala/Language.hs b/src/main/haskell/Hydra/Scala/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scala/Language.hs
+++ /dev/null
@@ -1,195 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Language constraints and reserved words for Scala
-
-module Hydra.Scala.Language where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
--- | Language constraints for Scala
-scalaLanguage :: Coders.Language
-scalaLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.scala"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion,
-          Variants.EliminationVariantWrap]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantDecimal,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeBigfloat,
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeBigint,
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint8,
-          Core.IntegerTypeUint16,
-          Core.IntegerTypeUint32,
-          Core.IntegerTypeUint64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantApplication,
-          Variants.TermVariantEither,
-          Variants.TermVariantCases,
-          Variants.TermVariantLambda,
-          Variants.TermVariantProject,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject,
-          Variants.TermVariantUnit,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
--- | A set of reserved words in Scala
-scalaReservedWords :: S.Set String
-scalaReservedWords =
-    Sets.fromList (Lists.concat [
-      keywords,
-      classNames,
-      hydraScalaKeywords])
-  where
-    keywords =
-        [
-          "abstract",
-          "case",
-          "catch",
-          "class",
-          "def",
-          "do",
-          "else",
-          "end",
-          "enum",
-          "export",
-          "extends",
-          "false",
-          "final",
-          "finally",
-          "for",
-          "forSome",
-          "given",
-          "if",
-          "implicit",
-          "import",
-          "lazy",
-          "macro",
-          "match",
-          "new",
-          "null",
-          "object",
-          "override",
-          "package",
-          "private",
-          "protected",
-          "return",
-          "sealed",
-          "super",
-          "then",
-          "this",
-          "throw",
-          "trait",
-          "true",
-          "try",
-          "type",
-          "val",
-          "var",
-          "while",
-          "with",
-          "yield"]
-    classNames =
-        [
-          "Any",
-          "AnyVal",
-          "App",
-          "Array",
-          "Boolean",
-          "Byte",
-          "Char",
-          "Console",
-          "DelayedInit",
-          "Double",
-          "DummyExplicit",
-          "Dynamic",
-          "Enumeration",
-          "Equals",
-          "Float",
-          "Function",
-          "Int",
-          "Long",
-          "MatchError",
-          "None",
-          "Nothing",
-          "Null",
-          "Option",
-          "PartialFunction",
-          "Predef",
-          "Product",
-          "Proxy",
-          "SerialVersionUID",
-          "Short",
-          "Singleton",
-          "Some",
-          "Specializable",
-          "StringContext",
-          "Symbol",
-          "Unit",
-          "ValueOf"]
-    hydraScalaKeywords = []
diff --git a/src/main/haskell/Hydra/Scala/Prepare.hs b/src/main/haskell/Hydra/Scala/Prepare.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scala/Prepare.hs
+++ /dev/null
@@ -1,94 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Type preparation functions for Scala code generation
-
-module Hydra.Scala.Prepare where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Rewriting as Rewriting
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.ByteString as B
-import qualified Data.Int as I
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-
--- | Prepare a literal type for Scala, substituting unsupported types
-prepareLiteralType :: Core.LiteralType -> (Core.LiteralType, ((Core.Literal -> Core.Literal), (S.Set String)))
-prepareLiteralType at =
-    case at of
-      Core.LiteralTypeBinary -> (Core.LiteralTypeString, ((\v -> case v of
-        Core.LiteralBinary v1 -> Core.LiteralString (Literals.binaryToString v1)
-        _ -> v), (Sets.fromList [
-        "replace binary strings with character strings"])))
-      Core.LiteralTypeFloat v0 ->
-        let result = prepareFloatType v0
-            rtyp = Pairs.first result
-            rep = Pairs.first (Pairs.second result)
-            msgs = Pairs.second (Pairs.second result)
-        in (Core.LiteralTypeFloat rtyp, ((\v -> case v of
-          Core.LiteralFloat v1 -> Core.LiteralFloat (rep v1)
-          _ -> v), msgs))
-      Core.LiteralTypeInteger v0 ->
-        let result = prepareIntegerType v0
-            rtyp = Pairs.first result
-            rep = Pairs.first (Pairs.second result)
-            msgs = Pairs.second (Pairs.second result)
-        in (Core.LiteralTypeInteger rtyp, ((\v -> case v of
-          Core.LiteralInteger v1 -> Core.LiteralInteger (rep v1)
-          _ -> v), msgs))
-      _ -> same at
-
--- | Prepare a float type for Scala
-prepareFloatType :: Core.FloatType -> (Core.FloatType, ((Core.FloatValue -> Core.FloatValue), (S.Set String)))
-prepareFloatType ft =
-    case ft of
-      Core.FloatTypeBigfloat -> (Core.FloatTypeFloat64, ((\v -> case v of
-        Core.FloatValueBigfloat v1 -> Core.FloatValueFloat64 (Literals.bigfloatToFloat64 v1)
-        _ -> v), (Sets.fromList [
-        "replace arbitrary-precision floating-point numbers with 64-bit floating-point numbers (doubles)"])))
-      _ -> same ft
-
--- | Prepare an integer type for Scala
-prepareIntegerType :: Core.IntegerType -> (Core.IntegerType, ((Core.IntegerValue -> Core.IntegerValue), (S.Set String)))
-prepareIntegerType it =
-    case it of
-      Core.IntegerTypeBigint -> (Core.IntegerTypeInt64, ((\v -> case v of
-        Core.IntegerValueBigint v1 -> Core.IntegerValueInt64 (Literals.bigintToInt64 v1)
-        _ -> v), (Sets.fromList [
-        "replace arbitrary-precision integers with 64-bit integers"])))
-      Core.IntegerTypeUint8 -> (Core.IntegerTypeInt8, ((\v -> case v of
-        Core.IntegerValueUint8 v1 -> Core.IntegerValueInt8 (Literals.bigintToInt8 (Literals.uint8ToBigint v1))
-        _ -> v), (Sets.fromList [
-        "replace unsigned 8-bit integers with signed 8-bit integers"])))
-      Core.IntegerTypeUint32 -> (Core.IntegerTypeInt32, ((\v -> case v of
-        Core.IntegerValueUint32 v1 -> Core.IntegerValueInt32 (Literals.bigintToInt32 (Literals.uint32ToBigint v1))
-        _ -> v), (Sets.fromList [
-        "replace unsigned 32-bit integers with signed 32-bit integers"])))
-      Core.IntegerTypeUint64 -> (Core.IntegerTypeInt64, ((\v -> case v of
-        Core.IntegerValueUint64 v1 -> Core.IntegerValueInt64 (Literals.bigintToInt64 (Literals.uint64ToBigint v1))
-        _ -> v), (Sets.fromList [
-        "replace unsigned 64-bit integers with signed 64-bit integers"])))
-      _ -> same it
-
--- | Prepare a type for Scala code generation, substituting unsupported types
-prepareType :: t0 -> Core.Type -> (Core.Type, ((Core.Term -> Core.Term), (S.Set String)))
-prepareType cx typ =
-    case (Strip.deannotateType typ) of
-      Core.TypeLiteral v0 ->
-        let result = prepareLiteralType v0
-            rtyp = Pairs.first result
-            rep = Pairs.first (Pairs.second result)
-            msgs = Pairs.second (Pairs.second result)
-        in (Core.TypeLiteral rtyp, ((\v -> case v of
-          Core.TermLiteral v1 -> Core.TermLiteral (rep v1)
-          _ -> v), msgs))
-      _ -> same typ
-
--- | Return a type unchanged with identity transform and no messages
-same :: Ord t2 => (t0 -> (t0, ((t1 -> t1), (S.Set t2))))
-same x = (x, ((\y -> y), Sets.empty))
diff --git a/src/main/haskell/Hydra/Scala/Serde.hs b/src/main/haskell/Hydra/Scala/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scala/Serde.hs
+++ /dev/null
@@ -1,385 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Serialization functions for converting Scala AST to abstract expressions
-
-module Hydra.Scala.Serde where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Java.Serde as Serde
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Scala.Syntax as Syntax
-import qualified Hydra.Serialization as Serialization
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The dot operator for member access
-dotOp :: Ast.Op
-dotOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "."),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityLeft}
--- | The function arrow operator (=>)
-functionArrowOp :: Ast.Op
-functionArrowOp = Serialization.op "=>" (Math.negate 1) Ast.AssociativityRight
--- | The match operator
-matchOp :: Ast.Op
-matchOp =
-    Ast.Op {
-      Ast.opSymbol = (Ast.Symbol "match"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsSpace,
-        Ast.paddingRight = (Ast.WsBreakAndIndent "  ")},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone}
-scalaFloatLiteralText :: String -> String -> String -> String
-scalaFloatLiteralText prefix suffix s =
-    Logic.ifElse (Equality.equal s "NaN") (Strings.cat2 prefix ".NaN") (Logic.ifElse (Equality.equal s "Infinity") (Strings.cat2 prefix ".PositiveInfinity") (Logic.ifElse (Equality.equal s "-Infinity") (Strings.cat2 prefix ".NegativeInfinity") (Strings.cat2 s suffix)))
--- | Convert a case clause to an expression
-writeCase :: Syntax.Case -> Ast.Expr
-writeCase c =
-
-      let pat = Syntax.casePat c
-          term = Syntax.caseBody c
-      in (Serialization.spaceSep [
-        Serialization.cst "case",
-        (writePat pat),
-        (Serialization.cst "=>"),
-        (writeTerm term)])
--- | Convert function data to an expression
-writeData_FunctionData :: Syntax.Data_FunctionData -> Ast.Expr
-writeData_FunctionData ft =
-    case ft of
-      Syntax.Data_FunctionDataFunction v0 ->
-        let params = Syntax.data_FunctionParams v0
-            body = Syntax.data_FunctionBody v0
-            bodyExpr = writeTerm body
-            bodyLen = Serialization.expressionLength bodyExpr
-        in (Logic.ifElse (Equality.gt bodyLen 60) (Serialization.noSep [
-          Serialization.parenList False (Lists.map writeData_Param params),
-          (Serialization.cst " =>\n  "),
-          bodyExpr]) (Serialization.spaceSep [
-          Serialization.parenList False (Lists.map writeData_Param params),
-          (Serialization.cst "=>"),
-          bodyExpr]))
--- | Convert a data name to an expression
-writeData_Name :: Syntax.Data_Name -> Ast.Expr
-writeData_Name dn = Serialization.cst (Syntax.unPredefString (Syntax.data_NameValue dn))
--- | Convert a data parameter to an expression
-writeData_Param :: Syntax.Data_Param -> Ast.Expr
-writeData_Param dp =
-
-      let name = Syntax.data_ParamName dp
-          stype = Syntax.data_ParamDecltpe dp
-      in (Serialization.noSep (Maybes.cat [
-        Maybes.pure (writeName name),
-        (Maybes.map (\t -> Serialization.spaceSep [
-          Serialization.cst ":",
-          (writeType t)]) stype)]))
--- | Convert a data reference to an expression
-writeData_Ref :: Syntax.Data_Ref -> Ast.Expr
-writeData_Ref ref =
-    case ref of
-      Syntax.Data_RefName v0 -> writeData_Name v0
-      Syntax.Data_RefSelect v0 -> writeData_Select v0
--- | Convert a data select to an expression
-writeData_Select :: Syntax.Data_Select -> Ast.Expr
-writeData_Select sel =
-
-      let arg = Syntax.data_SelectQual sel
-          name = Syntax.data_SelectName sel
-      in (Serialization.ifx dotOp (writeTerm arg) (writeTerm (Syntax.DataRef (Syntax.Data_RefName name))))
--- | Convert a definition to an expression
-writeDefn :: Syntax.Defn -> Ast.Expr
-writeDefn def =
-    case def of
-      Syntax.DefnDef v0 ->
-        let name = Syntax.defn_DefName v0
-            tparams = Syntax.defn_DefTparams v0
-            paramss = Syntax.defn_DefParamss v0
-            scod = Syntax.defn_DefDecltpe v0
-            body = Syntax.defn_DefBody v0
-            tparamsExpr =
-                    Logic.ifElse (Lists.null tparams) Nothing (Maybes.pure (Serialization.bracketList Serialization.inlineStyle (Lists.map writeType_Param tparams)))
-            scodExpr =
-                    Maybes.map (\t -> Serialization.spaceSep [
-                      Serialization.cst ":",
-                      (writeType t)]) scod
-            paramssExprs = Lists.map (\ps -> Serialization.parenList False (Lists.map writeData_Param ps)) paramss
-            nameAndParams =
-                    Serialization.noSep (Maybes.cat (Lists.concat [
-                      [
-                        Maybes.pure (writeData_Name name)],
-                      [
-                        tparamsExpr],
-                      (Lists.map (\pe -> Maybes.pure pe) paramssExprs),
-                      [
-                        scodExpr]]))
-            bodyExpr = writeTerm body
-            defSig =
-                    Serialization.spaceSep [
-                      Serialization.cst "def",
-                      nameAndParams,
-                      (Serialization.cst "=")]
-            bodyLen = Serialization.expressionLength bodyExpr
-        in (Logic.ifElse (Equality.gt bodyLen 80) (Serialization.noSep [
-          defSig,
-          (Serialization.cst "\n  "),
-          bodyExpr]) (Serialization.spaceSep [
-          defSig,
-          bodyExpr]))
-      Syntax.DefnType v0 ->
-        let name = Syntax.defn_TypeName v0
-            tparams = Syntax.defn_TypeTparams v0
-            body = Syntax.defn_TypeBody v0
-        in (Serialization.spaceSep (Maybes.cat [
-          Maybes.pure (Serialization.cst "type"),
-          (Maybes.pure (writeType_Name name)),
-          (Logic.ifElse (Lists.null tparams) Nothing (Maybes.pure (Serialization.bracketList Serialization.inlineStyle (Lists.map writeType_Param tparams)))),
-          (Maybes.pure (Serialization.cst "=")),
-          (Maybes.pure (writeType body))]))
-      Syntax.DefnVal v0 ->
-        let mods = Syntax.defn_ValMods v0
-            pats = Syntax.defn_ValPats v0
-            typ = Syntax.defn_ValDecltpe v0
-            rhs = Syntax.defn_ValRhs v0
-            nameStr =
-                    Maybes.fromMaybe "" (Maybes.map (\firstPat ->
-                      let patName =
-                              case firstPat of
-                                Syntax.PatVar v1 -> Syntax.pat_VarName v1
-                      in (Syntax.unPredefString (Syntax.data_NameValue patName))) (Lists.maybeHead pats))
-            nameAndType =
-                    Maybes.maybe (Serialization.cst nameStr) (\t -> Serialization.spaceSep [
-                      Serialization.cst (Strings.cat2 nameStr ":"),
-                      (writeType t)]) typ
-            valKeyword = Logic.ifElse (Lists.null mods) "val" "lazy val"
-        in (Serialization.spaceSep [
-          Serialization.cst valKeyword,
-          nameAndType,
-          (Serialization.cst "="),
-          (writeTerm rhs)])
-      Syntax.DefnClass v0 ->
-        let mods = Syntax.defn_ClassMods v0
-            name = Syntax.defn_ClassName v0
-            tparams = Syntax.defn_ClassTparams v0
-            ctor = Syntax.defn_ClassCtor v0
-            paramss = Syntax.ctor_PrimaryParamss ctor
-            tparamsExpr =
-                    Logic.ifElse (Lists.null tparams) Nothing (Maybes.pure (Serialization.bracketList Serialization.inlineStyle (Lists.map writeType_Param tparams)))
-            paramsExpr =
-                    Logic.ifElse (Lists.null paramss) Nothing (Maybes.pure (Serialization.parenList False (Lists.map writeData_Param (Lists.concat paramss))))
-            nameAndParams =
-                    Serialization.noSep (Maybes.cat [
-                      Maybes.pure (writeType_Name name),
-                      tparamsExpr,
-                      paramsExpr])
-        in (Serialization.spaceSep (Lists.concat [
-          Lists.map writeMod mods,
-          [
-            Serialization.cst "class",
-            nameAndParams]]))
-      Syntax.DefnEnum v0 ->
-        let name = Syntax.defn_EnumName v0
-            tparams = Syntax.defn_EnumTparams v0
-            template = Syntax.defn_EnumTemplate v0
-            stats = Syntax.templateStats template
-            enumHeader =
-                    Serialization.spaceSep [
-                      Serialization.cst "enum",
-                      (Serialization.noSep (Maybes.cat [
-                        Maybes.pure (writeType_Name name),
-                        (Logic.ifElse (Lists.null tparams) Nothing (Maybes.pure (Serialization.bracketList Serialization.inlineStyle (Lists.map writeType_Param tparams))))])),
-                      (Serialization.cst ":")]
-            enumCases =
-                    Lists.map (\s -> Serialization.spaceSep [
-                      Serialization.cst "  ",
-                      (writeStat s)]) stats
-        in (Serialization.newlineSep (Lists.concat [
-          [
-            enumHeader],
-          enumCases]))
-      Syntax.DefnEnumCase v0 ->
-        let name = Syntax.defn_EnumCaseName v0
-            ctor = Syntax.defn_EnumCaseCtor v0
-            inits = Syntax.defn_EnumCaseInits v0
-            paramss = Syntax.ctor_PrimaryParamss ctor
-            allParams = Lists.concat paramss
-            params =
-                    Logic.ifElse (Lists.null allParams) (Serialization.cst "") (Serialization.parenList False (Lists.map writeData_Param allParams))
-            extendsClause =
-                    Logic.ifElse (Lists.null inits) (Serialization.cst "") (Serialization.spaceSep [
-                      Serialization.cst "extends",
-                      (Serialization.commaSep Serialization.inlineStyle (Lists.map writeInit inits))])
-        in (Serialization.spaceSep [
-          Serialization.cst "case",
-          (Serialization.noSep [
-            writeData_Name name,
-            params]),
-          extendsClause])
--- | Convert an import/export statement to an expression
-writeImportExportStat :: Syntax.ImportExportStat -> Ast.Expr
-writeImportExportStat ie =
-    case ie of
-      Syntax.ImportExportStatImport v0 ->
-        let importers = Syntax.importImporters v0
-        in (Serialization.newlineSep (Lists.map writeImporter importers))
--- | Convert an importer to an expression
-writeImporter :: Syntax.Importer -> Ast.Expr
-writeImporter imp =
-
-      let ref = Syntax.importerRef imp
-          importees = Syntax.importerImportees imp
-          refName =
-                  case ref of
-                    Syntax.Data_RefName v0 -> Syntax.unPredefString (Syntax.data_NameValue v0)
-          forImportees =
-                  Logic.ifElse (Lists.null importees) (Serialization.cst "") (Logic.ifElse (Equality.equal (Lists.length importees) 1) (Maybes.fromMaybe (Serialization.cst "") (Maybes.map (\firstImp -> Serialization.noSep [
-                    Serialization.cst ".",
-                    case firstImp of
-                      Syntax.ImporteeWildcard -> Serialization.cst "*"
-                      Syntax.ImporteeName v0 -> Serialization.cst (case (Syntax.importee_NameName v0) of
-                        Syntax.NameValue v1 -> v1)]) (Lists.maybeHead importees))) (Serialization.noSep [
-                    Serialization.cst ".",
-                    (Serialization.curlyBracesList Nothing Serialization.inlineStyle (Lists.map (\it -> case it of
-                      Syntax.ImporteeWildcard -> Serialization.cst "*"
-                      Syntax.ImporteeName v0 -> Serialization.cst (case (Syntax.importee_NameName v0) of
-                        Syntax.NameValue v1 -> v1)) importees))]))
-      in (Serialization.spaceSep [
-        Serialization.cst "import",
-        (Serialization.noSep [
-          Serialization.cst refName,
-          forImportees])])
--- | Convert an init to an expression
-writeInit :: Syntax.Init -> Ast.Expr
-writeInit init = writeType (Syntax.initTpe init)
--- | Convert a literal to an expression
-writeLit :: Syntax.Lit -> Ast.Expr
-writeLit lit =
-    case lit of
-      Syntax.LitBoolean v0 -> Serialization.cst (Logic.ifElse v0 "true" "false")
-      Syntax.LitByte v0 -> Serialization.cst (Strings.cat2 (Literals.showInt8 v0) ".toByte")
-      Syntax.LitShort v0 -> Serialization.cst (Strings.cat2 (Literals.showInt16 v0) ".toShort")
-      Syntax.LitInt v0 -> Serialization.cst (Literals.showInt32 v0)
-      Syntax.LitLong v0 -> Serialization.cst (Strings.cat2 (Literals.showInt64 v0) "L")
-      Syntax.LitFloat v0 -> Serialization.cst (scalaFloatLiteralText "Float" "f" (Literals.showFloat32 v0))
-      Syntax.LitDouble v0 -> Serialization.cst (scalaFloatLiteralText "Double" "" (Literals.showFloat64 v0))
-      Syntax.LitUnit -> Serialization.cst "()"
-      Syntax.LitString v0 -> Serialization.cst (Strings.cat2 "\"" (Strings.cat2 (Serde.escapeJavaString v0) "\""))
-      Syntax.LitBytes v0 -> Serialization.cst (Strings.cat2 "Array[Byte](" (Strings.cat2 (Strings.intercalate ", " (Lists.map (\b -> Strings.cat2 (Literals.showInt32 b) ".toByte") v0)) ")"))
-      _ -> Serialization.cst "TODO:literal"
--- | Convert a modifier to an expression
-writeMod :: Syntax.Mod -> Ast.Expr
-writeMod m =
-    case m of
-      Syntax.ModCase -> Serialization.cst "case"
-      Syntax.ModSealed -> Serialization.cst "sealed"
-      Syntax.ModAbstract -> Serialization.cst "abstract"
-      Syntax.ModFinal -> Serialization.cst "final"
-      Syntax.ModOverride -> Serialization.cst "override"
-      Syntax.ModImplicit -> Serialization.cst "implicit"
-      Syntax.ModLazy -> Serialization.cst "lazy"
-      Syntax.ModPrivate _ -> Serialization.cst "private"
-      Syntax.ModProtected _ -> Serialization.cst "protected"
--- | Convert a name to an expression
-writeName :: Syntax.Name -> Ast.Expr
-writeName name =
-    case name of
-      Syntax.NameValue v0 -> Serialization.cst v0
--- | Convert a pattern to an expression
-writePat :: Syntax.Pat -> Ast.Expr
-writePat pat =
-    case pat of
-      Syntax.PatExtract v0 ->
-        let fun = Syntax.pat_ExtractFun v0
-            args = Syntax.pat_ExtractArgs v0
-        in (Logic.ifElse (Lists.null args) (writeTerm fun) (Serialization.noSep [
-          writeTerm fun,
-          (Serialization.parenList False (Lists.map writePat args))]))
-      Syntax.PatVar v0 -> writeData_Name (Syntax.pat_VarName v0)
-      Syntax.PatWildcard -> Serialization.cst "_"
--- | Convert a package to an expression
-writePkg :: Syntax.Pkg -> Ast.Expr
-writePkg pkg =
-
-      let name = Syntax.pkgName pkg
-          stats = Syntax.pkgStats pkg
-          package =
-                  Serialization.spaceSep [
-                    Serialization.cst "package",
-                    (writeData_Name name)]
-      in (Serialization.doubleNewlineSep (Lists.concat [
-        [
-          package],
-        (Lists.map writeStat stats)]))
--- | Convert a statement to an expression
-writeStat :: Syntax.Stat -> Ast.Expr
-writeStat stat =
-    case stat of
-      Syntax.StatTerm v0 -> writeTerm v0
-      Syntax.StatDefn v0 -> writeDefn v0
-      Syntax.StatImportExport v0 -> writeImportExportStat v0
--- | Convert a term to an expression
-writeTerm :: Syntax.Data -> Ast.Expr
-writeTerm term =
-    case term of
-      Syntax.DataLit v0 -> writeLit v0
-      Syntax.DataRef v0 -> writeData_Ref v0
-      Syntax.DataApply v0 ->
-        let fun = Syntax.data_ApplyFun v0
-            args = Syntax.data_ApplyArgs v0
-        in (Serialization.noSep [
-          writeTerm fun,
-          (Serialization.parenList False (Lists.map writeTerm args))])
-      Syntax.DataAssign v0 ->
-        let lhs = Syntax.data_AssignLhs v0
-            rhs = Syntax.data_AssignRhs v0
-        in (Serialization.spaceSep [
-          writeTerm lhs,
-          (Serialization.cst "->"),
-          (writeTerm rhs)])
-      Syntax.DataTuple v0 -> Serialization.parenList False (Lists.map writeTerm (Syntax.data_TupleArgs v0))
-      Syntax.DataMatch v0 ->
-        let expr = Syntax.data_MatchExpr v0
-            mCases = Syntax.data_MatchCases v0
-        in (Serialization.ifx matchOp (writeTerm expr) (Serialization.newlineSep (Lists.map writeCase mCases)))
-      Syntax.DataFunctionData v0 -> writeData_FunctionData v0
-      Syntax.DataBlock v0 ->
-        let stats = Syntax.data_BlockStats v0
-        in (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map writeStat stats)))
--- | Convert a type to an expression
-writeType :: Syntax.Type -> Ast.Expr
-writeType typ =
-    case typ of
-      Syntax.TypeRef v0 -> case v0 of
-        Syntax.Type_RefName v1 -> writeType_Name v1
-      Syntax.TypeApply v0 ->
-        let fun = Syntax.type_ApplyTpe v0
-            args = Syntax.type_ApplyArgs v0
-        in (Serialization.noSep [
-          writeType fun,
-          (Serialization.bracketList Serialization.inlineStyle (Lists.map writeType args))])
-      Syntax.TypeFunctionType v0 -> case v0 of
-        Syntax.Type_FunctionTypeFunction v1 ->
-          let cod = Syntax.type_FunctionRes v1
-              dom = Maybes.fromMaybe cod (Lists.maybeHead (Syntax.type_FunctionParams v1))
-          in (Serialization.ifx functionArrowOp (writeType dom) (writeType cod))
-      Syntax.TypeLambda v0 ->
-        let params = Syntax.type_LambdaTparams v0
-            body = Syntax.type_LambdaTpe v0
-        in (Serialization.noSep [
-          writeType body,
-          (Serialization.bracketList Serialization.inlineStyle (Lists.map writeType_Param params))])
-      Syntax.TypeVar v0 -> writeType_Name (Syntax.type_VarName v0)
--- | Convert a type name to an expression
-writeType_Name :: Syntax.Type_Name -> Ast.Expr
-writeType_Name tn = Serialization.cst (Syntax.type_NameValue tn)
--- | Convert a type parameter to an expression
-writeType_Param :: Syntax.Type_Param -> Ast.Expr
-writeType_Param tp = writeName (Syntax.type_ParamName tp)
diff --git a/src/main/haskell/Hydra/Scala/Syntax.hs b/src/main/haskell/Hydra/Scala/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scala/Syntax.hs
+++ /dev/null
@@ -1,1508 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A Scala syntax model based on Scalameta (https://scalameta.org)
-
-module Hydra.Scala.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
-newtype PredefString =
-  PredefString {
-    unPredefString :: String}
-  deriving (Eq, Ord, Read, Show)
-_PredefString = Core.Name "hydra.scala.syntax.PredefString"
-data ScalaSymbol =
-  ScalaSymbol {
-    scalaSymbolName :: String}
-  deriving (Eq, Ord, Read, Show)
-_ScalaSymbol = Core.Name "hydra.scala.syntax.ScalaSymbol"
-_ScalaSymbol_name = Core.Name "name"
-data Tree =
-  TreeRef Ref |
-  TreeStat Stat |
-  TreeType Type |
-  TreeBounds TypeBounds |
-  TreePat Pat |
-  TreeMember Member |
-  TreeCtor Ctor |
-  TreeTemplate Template |
-  TreeMod Mod |
-  TreeEnumerator Enumerator |
-  TreeImporter Importer |
-  TreeImportee Importee |
-  TreeCaseTree CaseTree |
-  TreeSource Source |
-  TreeQuasi Quasi
-  deriving (Eq, Ord, Read, Show)
-_Tree = Core.Name "hydra.scala.syntax.Tree"
-_Tree_ref = Core.Name "ref"
-_Tree_stat = Core.Name "stat"
-_Tree_type = Core.Name "type"
-_Tree_bounds = Core.Name "bounds"
-_Tree_pat = Core.Name "pat"
-_Tree_member = Core.Name "member"
-_Tree_ctor = Core.Name "ctor"
-_Tree_template = Core.Name "template"
-_Tree_mod = Core.Name "mod"
-_Tree_enumerator = Core.Name "enumerator"
-_Tree_importer = Core.Name "importer"
-_Tree_importee = Core.Name "importee"
-_Tree_caseTree = Core.Name "caseTree"
-_Tree_source = Core.Name "source"
-_Tree_quasi = Core.Name "quasi"
-data Ref =
-  RefName Name |
-  RefInit Init
-  deriving (Eq, Ord, Read, Show)
-_Ref = Core.Name "hydra.scala.syntax.Ref"
-_Ref_name = Core.Name "name"
-_Ref_init = Core.Name "init"
-data Stat =
-  StatTerm Data |
-  StatDecl Decl |
-  StatDefn Defn |
-  StatImportExport ImportExportStat
-  deriving (Eq, Ord, Read, Show)
-_Stat = Core.Name "hydra.scala.syntax.Stat"
-_Stat_term = Core.Name "term"
-_Stat_decl = Core.Name "decl"
-_Stat_defn = Core.Name "defn"
-_Stat_importExport = Core.Name "importExport"
-data Name =
-  NameValue String |
-  NameAnonymous |
-  NameIndeterminate PredefString
-  deriving (Eq, Ord, Read, Show)
-_Name = Core.Name "hydra.scala.syntax.Name"
-_Name_value = Core.Name "value"
-_Name_anonymous = Core.Name "anonymous"
-_Name_indeterminate = Core.Name "indeterminate"
-data Lit =
-  LitNull |
-  LitInt Int |
-  LitDouble Double |
-  LitFloat Float |
-  LitByte I.Int8 |
-  LitShort I.Int16 |
-  LitChar Int |
-  LitLong I.Int64 |
-  LitBoolean Bool |
-  LitUnit |
-  LitString String |
-  LitBytes [Int] |
-  LitSymbol ScalaSymbol
-  deriving (Eq, Ord, Read, Show)
-_Lit = Core.Name "hydra.scala.syntax.Lit"
-_Lit_null = Core.Name "null"
-_Lit_int = Core.Name "int"
-_Lit_double = Core.Name "double"
-_Lit_float = Core.Name "float"
-_Lit_byte = Core.Name "byte"
-_Lit_short = Core.Name "short"
-_Lit_char = Core.Name "char"
-_Lit_long = Core.Name "long"
-_Lit_boolean = Core.Name "boolean"
-_Lit_unit = Core.Name "unit"
-_Lit_string = Core.Name "string"
-_Lit_bytes = Core.Name "bytes"
-_Lit_symbol = Core.Name "symbol"
-data Data =
-  DataLit Lit |
-  DataRef Data_Ref |
-  DataInterpolate Data_Interpolate |
-  DataXml Data_Xml |
-  DataApply Data_Apply |
-  DataApplyUsing Data_ApplyUsing |
-  DataApplyType Data_ApplyType |
-  DataAssign Data_Assign |
-  DataReturn Data_Return |
-  DataThrow Data_Throw |
-  DataAscribe Data_Ascribe |
-  DataAnnotate Data_Annotate |
-  DataTuple Data_Tuple |
-  DataBlock Data_Block |
-  DataEndMarker Data_EndMarker |
-  DataIf Data_If |
-  DataQuotedMacroExpr Data_QuotedMacroExpr |
-  DataQuotedMacroType Data_QuotedMacroType |
-  DataSplicedMacroExpr Data_SplicedMacroExpr |
-  DataMatch Data_Match |
-  DataTry Data_Try |
-  DataTryWithHandler Data_TryWithHandler |
-  DataFunctionData Data_FunctionData |
-  DataPolyFunction Data_PolyFunction |
-  DataPartialFunction Data_PartialFunction |
-  DataWhile Data_While |
-  DataDo Data_Do |
-  DataFor Data_For |
-  DataForYield Data_ForYield |
-  DataNew Data_New |
-  DataNewAnonymous Data_NewAnonymous |
-  DataPlaceholder |
-  DataEta Data_Eta |
-  DataRepeated Data_Repeated |
-  DataParam Data_Param
-  deriving (Eq, Ord, Read, Show)
-_Data = Core.Name "hydra.scala.syntax.Data"
-_Data_lit = Core.Name "lit"
-_Data_ref = Core.Name "ref"
-_Data_interpolate = Core.Name "interpolate"
-_Data_xml = Core.Name "xml"
-_Data_apply = Core.Name "apply"
-_Data_applyUsing = Core.Name "applyUsing"
-_Data_applyType = Core.Name "applyType"
-_Data_assign = Core.Name "assign"
-_Data_return = Core.Name "return"
-_Data_throw = Core.Name "throw"
-_Data_ascribe = Core.Name "ascribe"
-_Data_annotate = Core.Name "annotate"
-_Data_tuple = Core.Name "tuple"
-_Data_block = Core.Name "block"
-_Data_endMarker = Core.Name "endMarker"
-_Data_if = Core.Name "if"
-_Data_quotedMacroExpr = Core.Name "quotedMacroExpr"
-_Data_quotedMacroType = Core.Name "quotedMacroType"
-_Data_splicedMacroExpr = Core.Name "splicedMacroExpr"
-_Data_match = Core.Name "match"
-_Data_try = Core.Name "try"
-_Data_tryWithHandler = Core.Name "tryWithHandler"
-_Data_functionData = Core.Name "functionData"
-_Data_polyFunction = Core.Name "polyFunction"
-_Data_partialFunction = Core.Name "partialFunction"
-_Data_while = Core.Name "while"
-_Data_do = Core.Name "do"
-_Data_for = Core.Name "for"
-_Data_forYield = Core.Name "forYield"
-_Data_new = Core.Name "new"
-_Data_newAnonymous = Core.Name "newAnonymous"
-_Data_placeholder = Core.Name "placeholder"
-_Data_eta = Core.Name "eta"
-_Data_repeated = Core.Name "repeated"
-_Data_param = Core.Name "param"
-data Data_Ref =
-  Data_RefThis Data_This |
-  Data_RefSuper Data_Super |
-  Data_RefName Data_Name |
-  Data_RefAnonymous Data_Anonymous |
-  Data_RefSelect Data_Select |
-  Data_RefApplyUnary Data_ApplyUnary
-  deriving (Eq, Ord, Read, Show)
-_Data_Ref = Core.Name "hydra.scala.syntax.Data_Ref"
-_Data_Ref_this = Core.Name "this"
-_Data_Ref_super = Core.Name "super"
-_Data_Ref_name = Core.Name "name"
-_Data_Ref_anonymous = Core.Name "anonymous"
-_Data_Ref_select = Core.Name "select"
-_Data_Ref_applyUnary = Core.Name "applyUnary"
-newtype Data_This =
-  Data_This {
-    unData_This :: ()}
-  deriving (Eq, Ord, Read, Show)
-_Data_This = Core.Name "hydra.scala.syntax.Data_This"
-data Data_Super =
-  Data_Super {
-    data_SuperThisp :: Name,
-    data_SuperSuperp :: Name}
-  deriving (Eq, Ord, Read, Show)
-_Data_Super = Core.Name "hydra.scala.syntax.Data_Super"
-_Data_Super_thisp = Core.Name "thisp"
-_Data_Super_superp = Core.Name "superp"
-data Data_Name =
-  Data_Name {
-    data_NameValue :: PredefString}
-  deriving (Eq, Ord, Read, Show)
-_Data_Name = Core.Name "hydra.scala.syntax.Data_Name"
-_Data_Name_value = Core.Name "value"
-newtype Data_Anonymous =
-  Data_Anonymous {
-    unData_Anonymous :: ()}
-  deriving (Eq, Ord, Read, Show)
-_Data_Anonymous = Core.Name "hydra.scala.syntax.Data_Anonymous"
-data Data_Select =
-  Data_Select {
-    data_SelectQual :: Data,
-    data_SelectName :: Data_Name}
-  deriving (Eq, Ord, Read, Show)
-_Data_Select = Core.Name "hydra.scala.syntax.Data_Select"
-_Data_Select_qual = Core.Name "qual"
-_Data_Select_name = Core.Name "name"
-data Data_Interpolate =
-  Data_Interpolate {
-    data_InterpolatePrefix :: Data_Name,
-    data_InterpolateParts :: [Lit],
-    data_InterpolateArgs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Interpolate = Core.Name "hydra.scala.syntax.Data_Interpolate"
-_Data_Interpolate_prefix = Core.Name "prefix"
-_Data_Interpolate_parts = Core.Name "parts"
-_Data_Interpolate_args = Core.Name "args"
-data Data_Xml =
-  Data_Xml {
-    data_XmlParts :: [Lit],
-    data_XmlArgs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Xml = Core.Name "hydra.scala.syntax.Data_Xml"
-_Data_Xml_parts = Core.Name "parts"
-_Data_Xml_args = Core.Name "args"
-data Data_Apply =
-  Data_Apply {
-    data_ApplyFun :: Data,
-    data_ApplyArgs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Apply = Core.Name "hydra.scala.syntax.Data_Apply"
-_Data_Apply_fun = Core.Name "fun"
-_Data_Apply_args = Core.Name "args"
-data Data_ApplyUsing =
-  Data_ApplyUsing {
-    data_ApplyUsingFun :: Data,
-    data_ApplyUsingTargs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_ApplyUsing = Core.Name "hydra.scala.syntax.Data_ApplyUsing"
-_Data_ApplyUsing_fun = Core.Name "fun"
-_Data_ApplyUsing_targs = Core.Name "targs"
-data Data_ApplyType =
-  Data_ApplyType {
-    data_ApplyTypeLhs :: Data,
-    data_ApplyTypeOp :: Data_Name,
-    data_ApplyTypeTargs :: [Type],
-    data_ApplyTypeArgs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_ApplyType = Core.Name "hydra.scala.syntax.Data_ApplyType"
-_Data_ApplyType_lhs = Core.Name "lhs"
-_Data_ApplyType_op = Core.Name "op"
-_Data_ApplyType_targs = Core.Name "targs"
-_Data_ApplyType_args = Core.Name "args"
-data Data_ApplyInfix =
-  Data_ApplyInfix {
-    data_ApplyInfixLhs :: Data,
-    data_ApplyInfixOp :: Data_Name,
-    data_ApplyInfixTargs :: [Type],
-    data_ApplyInfixArgs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_ApplyInfix = Core.Name "hydra.scala.syntax.Data_ApplyInfix"
-_Data_ApplyInfix_lhs = Core.Name "lhs"
-_Data_ApplyInfix_op = Core.Name "op"
-_Data_ApplyInfix_targs = Core.Name "targs"
-_Data_ApplyInfix_args = Core.Name "args"
-data Data_ApplyUnary =
-  Data_ApplyUnary {
-    data_ApplyUnaryOp :: Data_Name,
-    data_ApplyUnaryArg :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_ApplyUnary = Core.Name "hydra.scala.syntax.Data_ApplyUnary"
-_Data_ApplyUnary_op = Core.Name "op"
-_Data_ApplyUnary_arg = Core.Name "arg"
-data Data_Assign =
-  Data_Assign {
-    data_AssignLhs :: Data,
-    data_AssignRhs :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Assign = Core.Name "hydra.scala.syntax.Data_Assign"
-_Data_Assign_lhs = Core.Name "lhs"
-_Data_Assign_rhs = Core.Name "rhs"
-data Data_Return =
-  Data_Return {
-    data_ReturnExpr :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Return = Core.Name "hydra.scala.syntax.Data_Return"
-_Data_Return_expr = Core.Name "expr"
-data Data_Throw =
-  Data_Throw {
-    data_ThrowExpr :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Throw = Core.Name "hydra.scala.syntax.Data_Throw"
-_Data_Throw_expr = Core.Name "expr"
-data Data_Ascribe =
-  Data_Ascribe {
-    data_AscribeExpr :: Data,
-    data_AscribeTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Data_Ascribe = Core.Name "hydra.scala.syntax.Data_Ascribe"
-_Data_Ascribe_expr = Core.Name "expr"
-_Data_Ascribe_tpe = Core.Name "tpe"
-data Data_Annotate =
-  Data_Annotate {
-    data_AnnotateExpr :: Data,
-    data_AnnotateAnnots :: [Mod_Annot]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Annotate = Core.Name "hydra.scala.syntax.Data_Annotate"
-_Data_Annotate_expr = Core.Name "expr"
-_Data_Annotate_annots = Core.Name "annots"
-data Data_Tuple =
-  Data_Tuple {
-    data_TupleArgs :: [Data]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Tuple = Core.Name "hydra.scala.syntax.Data_Tuple"
-_Data_Tuple_args = Core.Name "args"
-data Data_Block =
-  Data_Block {
-    data_BlockStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Block = Core.Name "hydra.scala.syntax.Data_Block"
-_Data_Block_stats = Core.Name "stats"
-data Data_EndMarker =
-  Data_EndMarker {
-    data_EndMarkerName :: Data_Name}
-  deriving (Eq, Ord, Read, Show)
-_Data_EndMarker = Core.Name "hydra.scala.syntax.Data_EndMarker"
-_Data_EndMarker_name = Core.Name "name"
-data Data_If =
-  Data_If {
-    data_IfCond :: Data,
-    data_IfThenp :: Data,
-    data_IfElsep :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_If = Core.Name "hydra.scala.syntax.Data_If"
-_Data_If_cond = Core.Name "cond"
-_Data_If_thenp = Core.Name "thenp"
-_Data_If_elsep = Core.Name "elsep"
-data Data_QuotedMacroExpr =
-  Data_QuotedMacroExpr {
-    data_QuotedMacroExprBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_QuotedMacroExpr = Core.Name "hydra.scala.syntax.Data_QuotedMacroExpr"
-_Data_QuotedMacroExpr_body = Core.Name "body"
-data Data_QuotedMacroType =
-  Data_QuotedMacroType {
-    data_QuotedMacroTypeTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Data_QuotedMacroType = Core.Name "hydra.scala.syntax.Data_QuotedMacroType"
-_Data_QuotedMacroType_tpe = Core.Name "tpe"
-data Data_SplicedMacroExpr =
-  Data_SplicedMacroExpr {
-    data_SplicedMacroExprBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_SplicedMacroExpr = Core.Name "hydra.scala.syntax.Data_SplicedMacroExpr"
-_Data_SplicedMacroExpr_body = Core.Name "body"
-data Data_Match =
-  Data_Match {
-    data_MatchExpr :: Data,
-    data_MatchCases :: [Case]}
-  deriving (Eq, Ord, Read, Show)
-_Data_Match = Core.Name "hydra.scala.syntax.Data_Match"
-_Data_Match_expr = Core.Name "expr"
-_Data_Match_cases = Core.Name "cases"
-data Data_Try =
-  Data_Try {
-    data_TryExpr :: Data,
-    data_TryCatchp :: [Case],
-    data_TryFinallyp :: (Maybe Data)}
-  deriving (Eq, Ord, Read, Show)
-_Data_Try = Core.Name "hydra.scala.syntax.Data_Try"
-_Data_Try_expr = Core.Name "expr"
-_Data_Try_catchp = Core.Name "catchp"
-_Data_Try_finallyp = Core.Name "finallyp"
-data Data_TryWithHandler =
-  Data_TryWithHandler {
-    data_TryWithHandlerExpr :: Data,
-    data_TryWithHandlerCatchp :: Data,
-    data_TryWithHandlerFinallyp :: (Maybe Data)}
-  deriving (Eq, Ord, Read, Show)
-_Data_TryWithHandler = Core.Name "hydra.scala.syntax.Data_TryWithHandler"
-_Data_TryWithHandler_expr = Core.Name "expr"
-_Data_TryWithHandler_catchp = Core.Name "catchp"
-_Data_TryWithHandler_finallyp = Core.Name "finallyp"
-data Data_FunctionData =
-  Data_FunctionDataContextFunction Data_ContextFunction |
-  Data_FunctionDataFunction Data_Function
-  deriving (Eq, Ord, Read, Show)
-_Data_FunctionData = Core.Name "hydra.scala.syntax.Data_FunctionData"
-_Data_FunctionData_contextFunction = Core.Name "contextFunction"
-_Data_FunctionData_function = Core.Name "function"
-data Data_ContextFunction =
-  Data_ContextFunction {
-    data_ContextFunctionParams :: [Data_Param],
-    data_ContextFunctionBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_ContextFunction = Core.Name "hydra.scala.syntax.Data_ContextFunction"
-_Data_ContextFunction_params = Core.Name "params"
-_Data_ContextFunction_body = Core.Name "body"
-data Data_Function =
-  Data_Function {
-    data_FunctionParams :: [Data_Param],
-    data_FunctionBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Function = Core.Name "hydra.scala.syntax.Data_Function"
-_Data_Function_params = Core.Name "params"
-_Data_Function_body = Core.Name "body"
-data Data_PolyFunction =
-  Data_PolyFunction {
-    data_PolyFunctionTparams :: [Type_Param],
-    data_PolyFunctionBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_PolyFunction = Core.Name "hydra.scala.syntax.Data_PolyFunction"
-_Data_PolyFunction_tparams = Core.Name "tparams"
-_Data_PolyFunction_body = Core.Name "body"
-data Data_PartialFunction =
-  Data_PartialFunction {
-    data_PartialFunctionCases :: [Case]}
-  deriving (Eq, Ord, Read, Show)
-_Data_PartialFunction = Core.Name "hydra.scala.syntax.Data_PartialFunction"
-_Data_PartialFunction_cases = Core.Name "cases"
-data Data_While =
-  Data_While {
-    data_WhileExpr :: Data,
-    data_WhileBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_While = Core.Name "hydra.scala.syntax.Data_While"
-_Data_While_expr = Core.Name "expr"
-_Data_While_body = Core.Name "body"
-data Data_Do =
-  Data_Do {
-    data_DoBody :: Data,
-    data_DoExpr :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Do = Core.Name "hydra.scala.syntax.Data_Do"
-_Data_Do_body = Core.Name "body"
-_Data_Do_expr = Core.Name "expr"
-data Data_For =
-  Data_For {
-    data_ForEnums :: [Enumerator]}
-  deriving (Eq, Ord, Read, Show)
-_Data_For = Core.Name "hydra.scala.syntax.Data_For"
-_Data_For_enums = Core.Name "enums"
-data Data_ForYield =
-  Data_ForYield {
-    data_ForYieldEnums :: [Enumerator]}
-  deriving (Eq, Ord, Read, Show)
-_Data_ForYield = Core.Name "hydra.scala.syntax.Data_ForYield"
-_Data_ForYield_enums = Core.Name "enums"
-data Data_New =
-  Data_New {
-    data_NewInit :: Init}
-  deriving (Eq, Ord, Read, Show)
-_Data_New = Core.Name "hydra.scala.syntax.Data_New"
-_Data_New_init = Core.Name "init"
-data Data_NewAnonymous =
-  Data_NewAnonymous {
-    data_NewAnonymousTempl :: Template}
-  deriving (Eq, Ord, Read, Show)
-_Data_NewAnonymous = Core.Name "hydra.scala.syntax.Data_NewAnonymous"
-_Data_NewAnonymous_templ = Core.Name "templ"
-data Data_Eta =
-  Data_Eta {
-    data_EtaExpr :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Eta = Core.Name "hydra.scala.syntax.Data_Eta"
-_Data_Eta_expr = Core.Name "expr"
-data Data_Repeated =
-  Data_Repeated {
-    data_RepeatedExpr :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Data_Repeated = Core.Name "hydra.scala.syntax.Data_Repeated"
-_Data_Repeated_expr = Core.Name "expr"
-data Data_Param =
-  Data_Param {
-    data_ParamMods :: [Mod],
-    data_ParamName :: Name,
-    data_ParamDecltpe :: (Maybe Type),
-    data_ParamDefault :: (Maybe Data)}
-  deriving (Eq, Ord, Read, Show)
-_Data_Param = Core.Name "hydra.scala.syntax.Data_Param"
-_Data_Param_mods = Core.Name "mods"
-_Data_Param_name = Core.Name "name"
-_Data_Param_decltpe = Core.Name "decltpe"
-_Data_Param_default = Core.Name "default"
-data Type =
-  TypeRef Type_Ref |
-  TypeAnonymousName Type_AnonymousName |
-  TypeApply Type_Apply |
-  TypeApplyInfix Type_ApplyInfix |
-  TypeFunctionType Type_FunctionType |
-  TypePolyFunction Type_PolyFunction |
-  TypeImplicitFunction Type_ImplicitFunction |
-  TypeTuple Type_Tuple |
-  TypeWith Type_With |
-  TypeAnd Type_And |
-  TypeOr Type_Or |
-  TypeRefine Type_Refine |
-  TypeExistential Type_Existential |
-  TypeAnnotate Type_Annotate |
-  TypeLambda Type_Lambda |
-  TypeMacro Type_Macro |
-  TypeMethod Type_Method |
-  TypePlaceholder Type_Placeholder |
-  TypeByName Type_ByName |
-  TypeRepeated Type_Repeated |
-  TypeVar Type_Var |
-  TypeTypedParam Type_TypedParam |
-  TypeMatch Type_Match
-  deriving (Eq, Ord, Read, Show)
-_Type = Core.Name "hydra.scala.syntax.Type"
-_Type_ref = Core.Name "ref"
-_Type_anonymousName = Core.Name "anonymousName"
-_Type_apply = Core.Name "apply"
-_Type_applyInfix = Core.Name "applyInfix"
-_Type_functionType = Core.Name "functionType"
-_Type_polyFunction = Core.Name "polyFunction"
-_Type_implicitFunction = Core.Name "implicitFunction"
-_Type_tuple = Core.Name "tuple"
-_Type_with = Core.Name "with"
-_Type_and = Core.Name "and"
-_Type_or = Core.Name "or"
-_Type_refine = Core.Name "refine"
-_Type_existential = Core.Name "existential"
-_Type_annotate = Core.Name "annotate"
-_Type_lambda = Core.Name "lambda"
-_Type_macro = Core.Name "macro"
-_Type_method = Core.Name "method"
-_Type_placeholder = Core.Name "placeholder"
-_Type_byName = Core.Name "byName"
-_Type_repeated = Core.Name "repeated"
-_Type_var = Core.Name "var"
-_Type_typedParam = Core.Name "typedParam"
-_Type_match = Core.Name "match"
-data Type_Ref =
-  Type_RefName Type_Name |
-  Type_RefSelect Type_Select |
-  Type_RefProject Type_Project |
-  Type_RefSingleton Type_Singleton
-  deriving (Eq, Ord, Read, Show)
-_Type_Ref = Core.Name "hydra.scala.syntax.Type_Ref"
-_Type_Ref_name = Core.Name "name"
-_Type_Ref_select = Core.Name "select"
-_Type_Ref_project = Core.Name "project"
-_Type_Ref_singleton = Core.Name "singleton"
-data Type_Name =
-  Type_Name {
-    type_NameValue :: String}
-  deriving (Eq, Ord, Read, Show)
-_Type_Name = Core.Name "hydra.scala.syntax.Type_Name"
-_Type_Name_value = Core.Name "value"
-newtype Type_AnonymousName =
-  Type_AnonymousName {
-    unType_AnonymousName :: ()}
-  deriving (Eq, Ord, Read, Show)
-_Type_AnonymousName = Core.Name "hydra.scala.syntax.Type_AnonymousName"
-data Type_Select =
-  Type_Select {
-    type_SelectQual :: Data_Ref,
-    type_SelectName :: Type_Name}
-  deriving (Eq, Ord, Read, Show)
-_Type_Select = Core.Name "hydra.scala.syntax.Type_Select"
-_Type_Select_qual = Core.Name "qual"
-_Type_Select_name = Core.Name "name"
-data Type_Project =
-  Type_Project {
-    type_ProjectQual :: Type,
-    type_ProjectName :: Type_Name}
-  deriving (Eq, Ord, Read, Show)
-_Type_Project = Core.Name "hydra.scala.syntax.Type_Project"
-_Type_Project_qual = Core.Name "qual"
-_Type_Project_name = Core.Name "name"
-data Type_Singleton =
-  Type_Singleton {
-    type_SingletonRef :: Data_Ref}
-  deriving (Eq, Ord, Read, Show)
-_Type_Singleton = Core.Name "hydra.scala.syntax.Type_Singleton"
-_Type_Singleton_ref = Core.Name "ref"
-data Type_Apply =
-  Type_Apply {
-    type_ApplyTpe :: Type,
-    type_ApplyArgs :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Apply = Core.Name "hydra.scala.syntax.Type_Apply"
-_Type_Apply_tpe = Core.Name "tpe"
-_Type_Apply_args = Core.Name "args"
-data Type_ApplyInfix =
-  Type_ApplyInfix {
-    type_ApplyInfixLhs :: Type,
-    type_ApplyInfixOp :: Type_Name,
-    type_ApplyInfixRhs :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_ApplyInfix = Core.Name "hydra.scala.syntax.Type_ApplyInfix"
-_Type_ApplyInfix_lhs = Core.Name "lhs"
-_Type_ApplyInfix_op = Core.Name "op"
-_Type_ApplyInfix_rhs = Core.Name "rhs"
-data Type_FunctionType =
-  Type_FunctionTypeFunction Type_Function |
-  Type_FunctionTypeContextFunction Type_ContextFunction
-  deriving (Eq, Ord, Read, Show)
-_Type_FunctionType = Core.Name "hydra.scala.syntax.Type_FunctionType"
-_Type_FunctionType_function = Core.Name "function"
-_Type_FunctionType_contextFunction = Core.Name "contextFunction"
-data Type_Function =
-  Type_Function {
-    type_FunctionParams :: [Type],
-    type_FunctionRes :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_Function = Core.Name "hydra.scala.syntax.Type_Function"
-_Type_Function_params = Core.Name "params"
-_Type_Function_res = Core.Name "res"
-data Type_PolyFunction =
-  Type_PolyFunction {
-    type_PolyFunctionTparams :: [Type_Param],
-    type_PolyFunctionTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_PolyFunction = Core.Name "hydra.scala.syntax.Type_PolyFunction"
-_Type_PolyFunction_tparams = Core.Name "tparams"
-_Type_PolyFunction_tpe = Core.Name "tpe"
-data Type_ContextFunction =
-  Type_ContextFunction {
-    type_ContextFunctionParams :: [Type],
-    type_ContextFunctionRes :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_ContextFunction = Core.Name "hydra.scala.syntax.Type_ContextFunction"
-_Type_ContextFunction_params = Core.Name "params"
-_Type_ContextFunction_res = Core.Name "res"
-data Type_ImplicitFunction =
-  Type_ImplicitFunction {
-    type_ImplicitFunctionParams :: [Type],
-    type_ImplicitFunctionRes :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_ImplicitFunction = Core.Name "hydra.scala.syntax.Type_ImplicitFunction"
-_Type_ImplicitFunction_params = Core.Name "params"
-_Type_ImplicitFunction_res = Core.Name "res"
-data Type_Tuple =
-  Type_Tuple {
-    type_TupleArgs :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Tuple = Core.Name "hydra.scala.syntax.Type_Tuple"
-_Type_Tuple_args = Core.Name "args"
-data Type_With =
-  Type_With {
-    type_WithLhs :: Type,
-    type_WithRhs :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_With = Core.Name "hydra.scala.syntax.Type_With"
-_Type_With_lhs = Core.Name "lhs"
-_Type_With_rhs = Core.Name "rhs"
-data Type_And =
-  Type_And {
-    type_AndLhs :: Type,
-    type_AndRhs :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_And = Core.Name "hydra.scala.syntax.Type_And"
-_Type_And_lhs = Core.Name "lhs"
-_Type_And_rhs = Core.Name "rhs"
-data Type_Or =
-  Type_Or {
-    type_OrLhs :: Type,
-    type_OrRhs :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_Or = Core.Name "hydra.scala.syntax.Type_Or"
-_Type_Or_lhs = Core.Name "lhs"
-_Type_Or_rhs = Core.Name "rhs"
-data Type_Refine =
-  Type_Refine {
-    type_RefineTpe :: (Maybe Type),
-    type_RefineStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Refine = Core.Name "hydra.scala.syntax.Type_Refine"
-_Type_Refine_tpe = Core.Name "tpe"
-_Type_Refine_stats = Core.Name "stats"
-data Type_Existential =
-  Type_Existential {
-    type_ExistentialTpe :: Type,
-    type_ExistentialStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Existential = Core.Name "hydra.scala.syntax.Type_Existential"
-_Type_Existential_tpe = Core.Name "tpe"
-_Type_Existential_stats = Core.Name "stats"
-data Type_Annotate =
-  Type_Annotate {
-    type_AnnotateTpe :: Type,
-    type_AnnotateAnnots :: [Mod_Annot]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Annotate = Core.Name "hydra.scala.syntax.Type_Annotate"
-_Type_Annotate_tpe = Core.Name "tpe"
-_Type_Annotate_annots = Core.Name "annots"
-data Type_Lambda =
-  Type_Lambda {
-    type_LambdaTparams :: [Type_Param],
-    type_LambdaTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_Lambda = Core.Name "hydra.scala.syntax.Type_Lambda"
-_Type_Lambda_tparams = Core.Name "tparams"
-_Type_Lambda_tpe = Core.Name "tpe"
-data Type_Macro =
-  Type_Macro {
-    type_MacroBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Type_Macro = Core.Name "hydra.scala.syntax.Type_Macro"
-_Type_Macro_body = Core.Name "body"
-data Type_Method =
-  Type_Method {
-    type_MethodParamss :: [[Data_Param]],
-    type_MethodTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_Method = Core.Name "hydra.scala.syntax.Type_Method"
-_Type_Method_paramss = Core.Name "paramss"
-_Type_Method_tpe = Core.Name "tpe"
-data Type_Placeholder =
-  Type_Placeholder {
-    type_PlaceholderBounds :: TypeBounds}
-  deriving (Eq, Ord, Read, Show)
-_Type_Placeholder = Core.Name "hydra.scala.syntax.Type_Placeholder"
-_Type_Placeholder_bounds = Core.Name "bounds"
-data TypeBounds =
-  TypeBounds {
-    typeBoundsLo :: (Maybe Type),
-    typeBoundsHi :: (Maybe Type)}
-  deriving (Eq, Ord, Read, Show)
-_TypeBounds = Core.Name "hydra.scala.syntax.TypeBounds"
-_TypeBounds_lo = Core.Name "lo"
-_TypeBounds_hi = Core.Name "hi"
-data Type_ByName =
-  Type_ByName {
-    type_ByNameTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_ByName = Core.Name "hydra.scala.syntax.Type_ByName"
-_Type_ByName_tpe = Core.Name "tpe"
-data Type_Repeated =
-  Type_Repeated {
-    type_RepeatedTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_Repeated = Core.Name "hydra.scala.syntax.Type_Repeated"
-_Type_Repeated_tpe = Core.Name "tpe"
-data Type_Var =
-  Type_Var {
-    type_VarName :: Type_Name}
-  deriving (Eq, Ord, Read, Show)
-_Type_Var = Core.Name "hydra.scala.syntax.Type_Var"
-_Type_Var_name = Core.Name "name"
-data Type_TypedParam =
-  Type_TypedParam {
-    type_TypedParamName :: Name,
-    type_TypedParamTyp :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Type_TypedParam = Core.Name "hydra.scala.syntax.Type_TypedParam"
-_Type_TypedParam_name = Core.Name "name"
-_Type_TypedParam_typ = Core.Name "typ"
-data Type_Param =
-  Type_Param {
-    type_ParamMods :: [Mod],
-    type_ParamName :: Name,
-    type_ParamTparams :: [Type_Param],
-    type_ParamTbounds :: [TypeBounds],
-    type_ParamVbounds :: [Type],
-    type_ParamCbounds :: [Type]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Param = Core.Name "hydra.scala.syntax.Type_Param"
-_Type_Param_mods = Core.Name "mods"
-_Type_Param_name = Core.Name "name"
-_Type_Param_tparams = Core.Name "tparams"
-_Type_Param_tbounds = Core.Name "tbounds"
-_Type_Param_vbounds = Core.Name "vbounds"
-_Type_Param_cbounds = Core.Name "cbounds"
-data Type_Match =
-  Type_Match {
-    type_MatchTpe :: Type,
-    type_MatchCases :: [TypeCase]}
-  deriving (Eq, Ord, Read, Show)
-_Type_Match = Core.Name "hydra.scala.syntax.Type_Match"
-_Type_Match_tpe = Core.Name "tpe"
-_Type_Match_cases = Core.Name "cases"
-data Pat =
-  PatVar Pat_Var |
-  PatWildcard |
-  PatSeqWildcard |
-  PatBind Pat_Bind |
-  PatAlternative Pat_Alternative |
-  PatTuple Pat_Tuple |
-  PatRepeated Pat_Repeated |
-  PatExtract Pat_Extract |
-  PatExtractInfix Pat_ExtractInfix |
-  PatInterpolate Pat_Interpolate |
-  PatXml Pat_Xml |
-  PatTyped Pat_Typed |
-  PatMacro Pat_Macro |
-  PatGiven Pat_Given
-  deriving (Eq, Ord, Read, Show)
-_Pat = Core.Name "hydra.scala.syntax.Pat"
-_Pat_var = Core.Name "var"
-_Pat_wildcard = Core.Name "wildcard"
-_Pat_seqWildcard = Core.Name "seqWildcard"
-_Pat_bind = Core.Name "bind"
-_Pat_alternative = Core.Name "alternative"
-_Pat_tuple = Core.Name "tuple"
-_Pat_repeated = Core.Name "repeated"
-_Pat_extract = Core.Name "extract"
-_Pat_extractInfix = Core.Name "extractInfix"
-_Pat_interpolate = Core.Name "interpolate"
-_Pat_xml = Core.Name "xml"
-_Pat_typed = Core.Name "typed"
-_Pat_macro = Core.Name "macro"
-_Pat_given = Core.Name "given"
-data Pat_Var =
-  Pat_Var {
-    pat_VarName :: Data_Name}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Var = Core.Name "hydra.scala.syntax.Pat_Var"
-_Pat_Var_name = Core.Name "name"
-data Pat_Bind =
-  Pat_Bind {
-    pat_BindLhs :: Pat,
-    pat_BindRhs :: Pat}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Bind = Core.Name "hydra.scala.syntax.Pat_Bind"
-_Pat_Bind_lhs = Core.Name "lhs"
-_Pat_Bind_rhs = Core.Name "rhs"
-data Pat_Alternative =
-  Pat_Alternative {
-    pat_AlternativeLhs :: Pat,
-    pat_AlternativeRhs :: Pat}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Alternative = Core.Name "hydra.scala.syntax.Pat_Alternative"
-_Pat_Alternative_lhs = Core.Name "lhs"
-_Pat_Alternative_rhs = Core.Name "rhs"
-data Pat_Tuple =
-  Pat_Tuple {
-    pat_TupleArgs :: [Pat]}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Tuple = Core.Name "hydra.scala.syntax.Pat_Tuple"
-_Pat_Tuple_args = Core.Name "args"
-data Pat_Repeated =
-  Pat_Repeated {
-    pat_RepeatedName :: Data_Name}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Repeated = Core.Name "hydra.scala.syntax.Pat_Repeated"
-_Pat_Repeated_name = Core.Name "name"
-data Pat_Extract =
-  Pat_Extract {
-    pat_ExtractFun :: Data,
-    pat_ExtractArgs :: [Pat]}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Extract = Core.Name "hydra.scala.syntax.Pat_Extract"
-_Pat_Extract_fun = Core.Name "fun"
-_Pat_Extract_args = Core.Name "args"
-data Pat_ExtractInfix =
-  Pat_ExtractInfix {
-    pat_ExtractInfixLhs :: Pat,
-    pat_ExtractInfixOp :: Data_Name,
-    pat_ExtractInfixRhs :: [Pat]}
-  deriving (Eq, Ord, Read, Show)
-_Pat_ExtractInfix = Core.Name "hydra.scala.syntax.Pat_ExtractInfix"
-_Pat_ExtractInfix_lhs = Core.Name "lhs"
-_Pat_ExtractInfix_op = Core.Name "op"
-_Pat_ExtractInfix_rhs = Core.Name "rhs"
-data Pat_Interpolate =
-  Pat_Interpolate {
-    pat_InterpolatePrefix :: Data_Name,
-    pat_InterpolateParts :: [Lit]}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Interpolate = Core.Name "hydra.scala.syntax.Pat_Interpolate"
-_Pat_Interpolate_prefix = Core.Name "prefix"
-_Pat_Interpolate_parts = Core.Name "parts"
-data Pat_Xml =
-  Pat_Xml {
-    pat_XmlParts :: [Lit],
-    pat_XmlArgs :: [Pat]}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Xml = Core.Name "hydra.scala.syntax.Pat_Xml"
-_Pat_Xml_parts = Core.Name "parts"
-_Pat_Xml_args = Core.Name "args"
-data Pat_Typed =
-  Pat_Typed {
-    pat_TypedLhs :: Pat,
-    pat_TypedRhs :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Typed = Core.Name "hydra.scala.syntax.Pat_Typed"
-_Pat_Typed_lhs = Core.Name "lhs"
-_Pat_Typed_rhs = Core.Name "rhs"
-data Pat_Macro =
-  Pat_Macro {
-    pat_MacroBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Macro = Core.Name "hydra.scala.syntax.Pat_Macro"
-_Pat_Macro_body = Core.Name "body"
-data Pat_Given =
-  Pat_Given {
-    pat_GivenTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Pat_Given = Core.Name "hydra.scala.syntax.Pat_Given"
-_Pat_Given_tpe = Core.Name "tpe"
-data Member =
-  MemberTerm Member_Data |
-  MemberType Member_Type |
-  MemberTermParam Data_Param |
-  MemberTypeParam Type_Param |
-  MemberSelf Self
-  deriving (Eq, Ord, Read, Show)
-_Member = Core.Name "hydra.scala.syntax.Member"
-_Member_term = Core.Name "term"
-_Member_type = Core.Name "type"
-_Member_termParam = Core.Name "termParam"
-_Member_typeParam = Core.Name "typeParam"
-_Member_self = Core.Name "self"
-data Member_Data =
-  Member_DataPkg Pkg |
-  Member_DataObject Pkg_Object
-  deriving (Eq, Ord, Read, Show)
-_Member_Data = Core.Name "hydra.scala.syntax.Member_Data"
-_Member_Data_pkg = Core.Name "pkg"
-_Member_Data_object = Core.Name "object"
-data Member_Type =
-  Member_Type {
-    member_TypeName :: Type_Name}
-  deriving (Eq, Ord, Read, Show)
-_Member_Type = Core.Name "hydra.scala.syntax.Member_Type"
-_Member_Type_name = Core.Name "name"
-data Decl =
-  DeclVal Decl_Val |
-  DeclVar Decl_Var |
-  DeclDef Decl_Def |
-  DeclType Decl_Type |
-  DeclGiven Decl_Given
-  deriving (Eq, Ord, Read, Show)
-_Decl = Core.Name "hydra.scala.syntax.Decl"
-_Decl_val = Core.Name "val"
-_Decl_var = Core.Name "var"
-_Decl_def = Core.Name "def"
-_Decl_type = Core.Name "type"
-_Decl_given = Core.Name "given"
-data Decl_Val =
-  Decl_Val {
-    decl_ValMods :: [Mod],
-    decl_ValPats :: [Pat],
-    decl_ValDecltpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Decl_Val = Core.Name "hydra.scala.syntax.Decl_Val"
-_Decl_Val_mods = Core.Name "mods"
-_Decl_Val_pats = Core.Name "pats"
-_Decl_Val_decltpe = Core.Name "decltpe"
-data Decl_Var =
-  Decl_Var {
-    decl_VarMods :: [Mod],
-    decl_VarPats :: [Pat],
-    decl_VarDecltpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Decl_Var = Core.Name "hydra.scala.syntax.Decl_Var"
-_Decl_Var_mods = Core.Name "mods"
-_Decl_Var_pats = Core.Name "pats"
-_Decl_Var_decltpe = Core.Name "decltpe"
-data Decl_Def =
-  Decl_Def {
-    decl_DefMods :: [Mod],
-    decl_DefName :: Data_Name,
-    decl_DefTparams :: [Type_Param],
-    decl_DefParamss :: [[Data_Param]],
-    decl_DefDecltpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Decl_Def = Core.Name "hydra.scala.syntax.Decl_Def"
-_Decl_Def_mods = Core.Name "mods"
-_Decl_Def_name = Core.Name "name"
-_Decl_Def_tparams = Core.Name "tparams"
-_Decl_Def_paramss = Core.Name "paramss"
-_Decl_Def_decltpe = Core.Name "decltpe"
-data Decl_Type =
-  Decl_Type {
-    decl_TypeMods :: [Mod],
-    decl_TypeName :: Type_Name,
-    decl_TypeTparams :: [Type_Param],
-    decl_TypeBounds :: TypeBounds}
-  deriving (Eq, Ord, Read, Show)
-_Decl_Type = Core.Name "hydra.scala.syntax.Decl_Type"
-_Decl_Type_mods = Core.Name "mods"
-_Decl_Type_name = Core.Name "name"
-_Decl_Type_tparams = Core.Name "tparams"
-_Decl_Type_bounds = Core.Name "bounds"
-data Decl_Given =
-  Decl_Given {
-    decl_GivenMods :: [Mod],
-    decl_GivenName :: Data_Name,
-    decl_GivenTparams :: [Type_Param],
-    decl_GivenSparams :: [[Data_Param]],
-    decl_GivenDecltpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Decl_Given = Core.Name "hydra.scala.syntax.Decl_Given"
-_Decl_Given_mods = Core.Name "mods"
-_Decl_Given_name = Core.Name "name"
-_Decl_Given_tparams = Core.Name "tparams"
-_Decl_Given_sparams = Core.Name "sparams"
-_Decl_Given_decltpe = Core.Name "decltpe"
-data Defn =
-  DefnVal Defn_Val |
-  DefnVar Defn_Var |
-  DefnGiven Defn_Given |
-  DefnEnum Defn_Enum |
-  DefnEnumCase Defn_EnumCase |
-  DefnRepeatedEnumCase Defn_RepeatedEnumCase |
-  DefnGivenAlias Defn_GivenAlias |
-  DefnExtensionGroup Defn_ExtensionGroup |
-  DefnDef Defn_Def |
-  DefnMacro Defn_Macro |
-  DefnType Defn_Type |
-  DefnClass Defn_Class |
-  DefnTrait Defn_Trait |
-  DefnObject Defn_Object
-  deriving (Eq, Ord, Read, Show)
-_Defn = Core.Name "hydra.scala.syntax.Defn"
-_Defn_val = Core.Name "val"
-_Defn_var = Core.Name "var"
-_Defn_given = Core.Name "given"
-_Defn_enum = Core.Name "enum"
-_Defn_enumCase = Core.Name "enumCase"
-_Defn_repeatedEnumCase = Core.Name "repeatedEnumCase"
-_Defn_givenAlias = Core.Name "givenAlias"
-_Defn_extensionGroup = Core.Name "extensionGroup"
-_Defn_def = Core.Name "def"
-_Defn_macro = Core.Name "macro"
-_Defn_type = Core.Name "type"
-_Defn_class = Core.Name "class"
-_Defn_trait = Core.Name "trait"
-_Defn_object = Core.Name "object"
-data Defn_Val =
-  Defn_Val {
-    defn_ValMods :: [Mod],
-    defn_ValPats :: [Pat],
-    defn_ValDecltpe :: (Maybe Type),
-    defn_ValRhs :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Val = Core.Name "hydra.scala.syntax.Defn_Val"
-_Defn_Val_mods = Core.Name "mods"
-_Defn_Val_pats = Core.Name "pats"
-_Defn_Val_decltpe = Core.Name "decltpe"
-_Defn_Val_rhs = Core.Name "rhs"
-data Defn_Var =
-  Defn_Var {
-    defn_VarMods :: [Mod],
-    defn_VarPats :: [Pat],
-    defn_VarDecltpe :: Type,
-    defn_VarRhs :: (Maybe Data)}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Var = Core.Name "hydra.scala.syntax.Defn_Var"
-_Defn_Var_mods = Core.Name "mods"
-_Defn_Var_pats = Core.Name "pats"
-_Defn_Var_decltpe = Core.Name "decltpe"
-_Defn_Var_rhs = Core.Name "rhs"
-data Defn_Given =
-  Defn_Given {
-    defn_GivenMods :: [Mod],
-    defn_GivenName :: Name,
-    defn_GivenTparams :: [[Type_Param]],
-    defn_GivenSparams :: [[Data_Param]],
-    defn_GivenTempl :: Template}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Given = Core.Name "hydra.scala.syntax.Defn_Given"
-_Defn_Given_mods = Core.Name "mods"
-_Defn_Given_name = Core.Name "name"
-_Defn_Given_tparams = Core.Name "tparams"
-_Defn_Given_sparams = Core.Name "sparams"
-_Defn_Given_templ = Core.Name "templ"
-data Defn_Enum =
-  Defn_Enum {
-    defn_EnumMods :: [Mod],
-    defn_EnumName :: Type_Name,
-    defn_EnumTparams :: [Type_Param],
-    defn_EnumCtor :: Ctor_Primary,
-    defn_EnumTemplate :: Template}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Enum = Core.Name "hydra.scala.syntax.Defn_Enum"
-_Defn_Enum_mods = Core.Name "mods"
-_Defn_Enum_name = Core.Name "name"
-_Defn_Enum_tparams = Core.Name "tparams"
-_Defn_Enum_ctor = Core.Name "ctor"
-_Defn_Enum_template = Core.Name "template"
-data Defn_EnumCase =
-  Defn_EnumCase {
-    defn_EnumCaseMods :: [Mod],
-    defn_EnumCaseName :: Data_Name,
-    defn_EnumCaseTparams :: [Type_Param],
-    defn_EnumCaseCtor :: Ctor_Primary,
-    defn_EnumCaseInits :: [Init]}
-  deriving (Eq, Ord, Read, Show)
-_Defn_EnumCase = Core.Name "hydra.scala.syntax.Defn_EnumCase"
-_Defn_EnumCase_mods = Core.Name "mods"
-_Defn_EnumCase_name = Core.Name "name"
-_Defn_EnumCase_tparams = Core.Name "tparams"
-_Defn_EnumCase_ctor = Core.Name "ctor"
-_Defn_EnumCase_inits = Core.Name "inits"
-data Defn_RepeatedEnumCase =
-  Defn_RepeatedEnumCase {
-    defn_RepeatedEnumCaseMods :: [Mod],
-    defn_RepeatedEnumCaseCases :: [Data_Name]}
-  deriving (Eq, Ord, Read, Show)
-_Defn_RepeatedEnumCase = Core.Name "hydra.scala.syntax.Defn_RepeatedEnumCase"
-_Defn_RepeatedEnumCase_mods = Core.Name "mods"
-_Defn_RepeatedEnumCase_cases = Core.Name "cases"
-data Defn_GivenAlias =
-  Defn_GivenAlias {
-    defn_GivenAliasMods :: [Mod],
-    defn_GivenAliasName :: Name,
-    defn_GivenAliasTparams :: [[Type_Param]],
-    defn_GivenAliasSparams :: [[Data_Param]],
-    defn_GivenAliasDecltpe :: Type,
-    defn_GivenAliasBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Defn_GivenAlias = Core.Name "hydra.scala.syntax.Defn_GivenAlias"
-_Defn_GivenAlias_mods = Core.Name "mods"
-_Defn_GivenAlias_name = Core.Name "name"
-_Defn_GivenAlias_tparams = Core.Name "tparams"
-_Defn_GivenAlias_sparams = Core.Name "sparams"
-_Defn_GivenAlias_decltpe = Core.Name "decltpe"
-_Defn_GivenAlias_body = Core.Name "body"
-data Defn_ExtensionGroup =
-  Defn_ExtensionGroup {
-    defn_ExtensionGroupTparams :: [Type_Param],
-    defn_ExtensionGroupParmss :: [[Data_Param]],
-    defn_ExtensionGroupBody :: Stat}
-  deriving (Eq, Ord, Read, Show)
-_Defn_ExtensionGroup = Core.Name "hydra.scala.syntax.Defn_ExtensionGroup"
-_Defn_ExtensionGroup_tparams = Core.Name "tparams"
-_Defn_ExtensionGroup_parmss = Core.Name "parmss"
-_Defn_ExtensionGroup_body = Core.Name "body"
-data Defn_Def =
-  Defn_Def {
-    defn_DefMods :: [Mod],
-    defn_DefName :: Data_Name,
-    defn_DefTparams :: [Type_Param],
-    defn_DefParamss :: [[Data_Param]],
-    defn_DefDecltpe :: (Maybe Type),
-    defn_DefBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Def = Core.Name "hydra.scala.syntax.Defn_Def"
-_Defn_Def_mods = Core.Name "mods"
-_Defn_Def_name = Core.Name "name"
-_Defn_Def_tparams = Core.Name "tparams"
-_Defn_Def_paramss = Core.Name "paramss"
-_Defn_Def_decltpe = Core.Name "decltpe"
-_Defn_Def_body = Core.Name "body"
-data Defn_Macro =
-  Defn_Macro {
-    defn_MacroMods :: [Mod],
-    defn_MacroName :: Data_Name,
-    defn_MacroTparams :: [Type_Param],
-    defn_MacroParamss :: [[Data_Param]],
-    defn_MacroDecltpe :: (Maybe Type),
-    defn_MacroBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Macro = Core.Name "hydra.scala.syntax.Defn_Macro"
-_Defn_Macro_mods = Core.Name "mods"
-_Defn_Macro_name = Core.Name "name"
-_Defn_Macro_tparams = Core.Name "tparams"
-_Defn_Macro_paramss = Core.Name "paramss"
-_Defn_Macro_decltpe = Core.Name "decltpe"
-_Defn_Macro_body = Core.Name "body"
-data Defn_Type =
-  Defn_Type {
-    defn_TypeMods :: [Mod],
-    defn_TypeName :: Type_Name,
-    defn_TypeTparams :: [Type_Param],
-    defn_TypeBody :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Type = Core.Name "hydra.scala.syntax.Defn_Type"
-_Defn_Type_mods = Core.Name "mods"
-_Defn_Type_name = Core.Name "name"
-_Defn_Type_tparams = Core.Name "tparams"
-_Defn_Type_body = Core.Name "body"
-data Defn_Class =
-  Defn_Class {
-    defn_ClassMods :: [Mod],
-    defn_ClassName :: Type_Name,
-    defn_ClassTparams :: [Type_Param],
-    defn_ClassCtor :: Ctor_Primary,
-    defn_ClassTemplate :: Template}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Class = Core.Name "hydra.scala.syntax.Defn_Class"
-_Defn_Class_mods = Core.Name "mods"
-_Defn_Class_name = Core.Name "name"
-_Defn_Class_tparams = Core.Name "tparams"
-_Defn_Class_ctor = Core.Name "ctor"
-_Defn_Class_template = Core.Name "template"
-data Defn_Trait =
-  Defn_Trait {
-    defn_TraitMods :: [Mod],
-    defn_TraitName :: Type_Name,
-    defn_TraitTparams :: [Type_Param],
-    defn_TraitCtor :: Ctor_Primary,
-    defn_TraitTemplate :: Template}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Trait = Core.Name "hydra.scala.syntax.Defn_Trait"
-_Defn_Trait_mods = Core.Name "mods"
-_Defn_Trait_name = Core.Name "name"
-_Defn_Trait_tparams = Core.Name "tparams"
-_Defn_Trait_ctor = Core.Name "ctor"
-_Defn_Trait_template = Core.Name "template"
-data Defn_Object =
-  Defn_Object {
-    defn_ObjectName :: Data_Name}
-  deriving (Eq, Ord, Read, Show)
-_Defn_Object = Core.Name "hydra.scala.syntax.Defn_Object"
-_Defn_Object_name = Core.Name "name"
-data Pkg =
-  Pkg {
-    pkgName :: Data_Name,
-    pkgRef :: Data_Ref,
-    pkgStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Pkg = Core.Name "hydra.scala.syntax.Pkg"
-_Pkg_name = Core.Name "name"
-_Pkg_ref = Core.Name "ref"
-_Pkg_stats = Core.Name "stats"
-data Pkg_Object =
-  Pkg_Object {
-    pkg_ObjectMods :: [Mod],
-    pkg_ObjectName :: Data_Name,
-    pkg_ObjectTemplate :: Template}
-  deriving (Eq, Ord, Read, Show)
-_Pkg_Object = Core.Name "hydra.scala.syntax.Pkg_Object"
-_Pkg_Object_mods = Core.Name "mods"
-_Pkg_Object_name = Core.Name "name"
-_Pkg_Object_template = Core.Name "template"
-data Ctor =
-  CtorPrimary Ctor_Primary |
-  CtorSecondary Ctor_Secondary
-  deriving (Eq, Ord, Read, Show)
-_Ctor = Core.Name "hydra.scala.syntax.Ctor"
-_Ctor_primary = Core.Name "primary"
-_Ctor_secondary = Core.Name "secondary"
-data Ctor_Primary =
-  Ctor_Primary {
-    ctor_PrimaryMods :: [Mod],
-    ctor_PrimaryName :: Name,
-    ctor_PrimaryParamss :: [[Data_Param]]}
-  deriving (Eq, Ord, Read, Show)
-_Ctor_Primary = Core.Name "hydra.scala.syntax.Ctor_Primary"
-_Ctor_Primary_mods = Core.Name "mods"
-_Ctor_Primary_name = Core.Name "name"
-_Ctor_Primary_paramss = Core.Name "paramss"
-data Ctor_Secondary =
-  Ctor_Secondary {
-    ctor_SecondaryMods :: [Mod],
-    ctor_SecondaryName :: Name,
-    ctor_SecondaryParamss :: [[Data_Param]],
-    ctor_SecondaryInit :: Init,
-    ctor_SecondaryStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Ctor_Secondary = Core.Name "hydra.scala.syntax.Ctor_Secondary"
-_Ctor_Secondary_mods = Core.Name "mods"
-_Ctor_Secondary_name = Core.Name "name"
-_Ctor_Secondary_paramss = Core.Name "paramss"
-_Ctor_Secondary_init = Core.Name "init"
-_Ctor_Secondary_stats = Core.Name "stats"
-data Init =
-  Init {
-    initTpe :: Type,
-    initName :: Name,
-    initArgss :: [[Data]]}
-  deriving (Eq, Ord, Read, Show)
-_Init = Core.Name "hydra.scala.syntax.Init"
-_Init_tpe = Core.Name "tpe"
-_Init_name = Core.Name "name"
-_Init_argss = Core.Name "argss"
-newtype Self =
-  Self {
-    unSelf :: ()}
-  deriving (Eq, Ord, Read, Show)
-_Self = Core.Name "hydra.scala.syntax.Self"
-data Template =
-  Template {
-    templateEarly :: [Stat],
-    templateInits :: [Init],
-    templateSelf :: Self,
-    templateStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Template = Core.Name "hydra.scala.syntax.Template"
-_Template_early = Core.Name "early"
-_Template_inits = Core.Name "inits"
-_Template_self = Core.Name "self"
-_Template_stats = Core.Name "stats"
-data Mod =
-  ModAnnot Mod_Annot |
-  ModPrivate Mod_Private |
-  ModProtected Mod_Protected |
-  ModImplicit |
-  ModFinal |
-  ModSealed |
-  ModOpen |
-  ModSuper |
-  ModOverride |
-  ModCase |
-  ModAbstract |
-  ModCovariant |
-  ModContravariant |
-  ModLazy |
-  ModValParam |
-  ModVarParam |
-  ModInfix |
-  ModInline |
-  ModUsing |
-  ModOpaque |
-  ModTransparent
-  deriving (Eq, Ord, Read, Show)
-_Mod = Core.Name "hydra.scala.syntax.Mod"
-_Mod_annot = Core.Name "annot"
-_Mod_private = Core.Name "private"
-_Mod_protected = Core.Name "protected"
-_Mod_implicit = Core.Name "implicit"
-_Mod_final = Core.Name "final"
-_Mod_sealed = Core.Name "sealed"
-_Mod_open = Core.Name "open"
-_Mod_super = Core.Name "super"
-_Mod_override = Core.Name "override"
-_Mod_case = Core.Name "case"
-_Mod_abstract = Core.Name "abstract"
-_Mod_covariant = Core.Name "covariant"
-_Mod_contravariant = Core.Name "contravariant"
-_Mod_lazy = Core.Name "lazy"
-_Mod_valParam = Core.Name "valParam"
-_Mod_varParam = Core.Name "varParam"
-_Mod_infix = Core.Name "infix"
-_Mod_inline = Core.Name "inline"
-_Mod_using = Core.Name "using"
-_Mod_opaque = Core.Name "opaque"
-_Mod_transparent = Core.Name "transparent"
-data Mod_Annot =
-  Mod_Annot {
-    mod_AnnotInit :: Init}
-  deriving (Eq, Ord, Read, Show)
-_Mod_Annot = Core.Name "hydra.scala.syntax.Mod_Annot"
-_Mod_Annot_init = Core.Name "init"
-data Mod_Private =
-  Mod_Private {
-    mod_PrivateWithin :: Ref}
-  deriving (Eq, Ord, Read, Show)
-_Mod_Private = Core.Name "hydra.scala.syntax.Mod_Private"
-_Mod_Private_within = Core.Name "within"
-data Mod_Protected =
-  Mod_Protected {
-    mod_ProtectedWithin :: Ref}
-  deriving (Eq, Ord, Read, Show)
-_Mod_Protected = Core.Name "hydra.scala.syntax.Mod_Protected"
-_Mod_Protected_within = Core.Name "within"
-data Enumerator =
-  EnumeratorGenerator Enumerator_Generator |
-  EnumeratorCaseGenerator Enumerator_CaseGenerator |
-  EnumeratorVal Enumerator_Val |
-  EnumeratorGuard Enumerator_Guard
-  deriving (Eq, Ord, Read, Show)
-_Enumerator = Core.Name "hydra.scala.syntax.Enumerator"
-_Enumerator_generator = Core.Name "generator"
-_Enumerator_caseGenerator = Core.Name "caseGenerator"
-_Enumerator_val = Core.Name "val"
-_Enumerator_guard = Core.Name "guard"
-data Enumerator_Generator =
-  Enumerator_Generator {
-    enumerator_GeneratorPat :: Pat,
-    enumerator_GeneratorRhs :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Enumerator_Generator = Core.Name "hydra.scala.syntax.Enumerator_Generator"
-_Enumerator_Generator_pat = Core.Name "pat"
-_Enumerator_Generator_rhs = Core.Name "rhs"
-data Enumerator_CaseGenerator =
-  Enumerator_CaseGenerator {
-    enumerator_CaseGeneratorPat :: Pat,
-    enumerator_CaseGeneratorRhs :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Enumerator_CaseGenerator = Core.Name "hydra.scala.syntax.Enumerator_CaseGenerator"
-_Enumerator_CaseGenerator_pat = Core.Name "pat"
-_Enumerator_CaseGenerator_rhs = Core.Name "rhs"
-data Enumerator_Val =
-  Enumerator_Val {
-    enumerator_ValPat :: Pat,
-    enumerator_ValRhs :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Enumerator_Val = Core.Name "hydra.scala.syntax.Enumerator_Val"
-_Enumerator_Val_pat = Core.Name "pat"
-_Enumerator_Val_rhs = Core.Name "rhs"
-data Enumerator_Guard =
-  Enumerator_Guard {
-    enumerator_GuardCond :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Enumerator_Guard = Core.Name "hydra.scala.syntax.Enumerator_Guard"
-_Enumerator_Guard_cond = Core.Name "cond"
-data ImportExportStat =
-  ImportExportStatImport Import |
-  ImportExportStatExport Export
-  deriving (Eq, Ord, Read, Show)
-_ImportExportStat = Core.Name "hydra.scala.syntax.ImportExportStat"
-_ImportExportStat_import = Core.Name "import"
-_ImportExportStat_export = Core.Name "export"
-data Import =
-  Import {
-    importImporters :: [Importer]}
-  deriving (Eq, Ord, Read, Show)
-_Import = Core.Name "hydra.scala.syntax.Import"
-_Import_importers = Core.Name "importers"
-data Export =
-  Export {
-    exportImporters :: [Importer]}
-  deriving (Eq, Ord, Read, Show)
-_Export = Core.Name "hydra.scala.syntax.Export"
-_Export_importers = Core.Name "importers"
-data Importer =
-  Importer {
-    importerRef :: Data_Ref,
-    importerImportees :: [Importee]}
-  deriving (Eq, Ord, Read, Show)
-_Importer = Core.Name "hydra.scala.syntax.Importer"
-_Importer_ref = Core.Name "ref"
-_Importer_importees = Core.Name "importees"
-data Importee =
-  ImporteeWildcard |
-  ImporteeGiven Importee_Given |
-  ImporteeGivenAll |
-  ImporteeName Importee_Name |
-  ImporteeRename Importee_Rename |
-  ImporteeUnimport Importee_Unimport
-  deriving (Eq, Ord, Read, Show)
-_Importee = Core.Name "hydra.scala.syntax.Importee"
-_Importee_wildcard = Core.Name "wildcard"
-_Importee_given = Core.Name "given"
-_Importee_givenAll = Core.Name "givenAll"
-_Importee_name = Core.Name "name"
-_Importee_rename = Core.Name "rename"
-_Importee_unimport = Core.Name "unimport"
-data Importee_Given =
-  Importee_Given {
-    importee_GivenTpe :: Type}
-  deriving (Eq, Ord, Read, Show)
-_Importee_Given = Core.Name "hydra.scala.syntax.Importee_Given"
-_Importee_Given_tpe = Core.Name "tpe"
-data Importee_Name =
-  Importee_Name {
-    importee_NameName :: Name}
-  deriving (Eq, Ord, Read, Show)
-_Importee_Name = Core.Name "hydra.scala.syntax.Importee_Name"
-_Importee_Name_name = Core.Name "name"
-data Importee_Rename =
-  Importee_Rename {
-    importee_RenameName :: Name,
-    importee_RenameRename :: Name}
-  deriving (Eq, Ord, Read, Show)
-_Importee_Rename = Core.Name "hydra.scala.syntax.Importee_Rename"
-_Importee_Rename_name = Core.Name "name"
-_Importee_Rename_rename = Core.Name "rename"
-data Importee_Unimport =
-  Importee_Unimport {
-    importee_UnimportName :: Name}
-  deriving (Eq, Ord, Read, Show)
-_Importee_Unimport = Core.Name "hydra.scala.syntax.Importee_Unimport"
-_Importee_Unimport_name = Core.Name "name"
-data CaseTree =
-  CaseTreeCase Case |
-  CaseTreeTypeCase TypeCase
-  deriving (Eq, Ord, Read, Show)
-_CaseTree = Core.Name "hydra.scala.syntax.CaseTree"
-_CaseTree_case = Core.Name "case"
-_CaseTree_typeCase = Core.Name "typeCase"
-data Case =
-  Case {
-    casePat :: Pat,
-    caseCond :: (Maybe Data),
-    caseBody :: Data}
-  deriving (Eq, Ord, Read, Show)
-_Case = Core.Name "hydra.scala.syntax.Case"
-_Case_pat = Core.Name "pat"
-_Case_cond = Core.Name "cond"
-_Case_body = Core.Name "body"
-data TypeCase =
-  TypeCase {
-    typeCasePat :: Type,
-    typeCaseBody :: Type}
-  deriving (Eq, Ord, Read, Show)
-_TypeCase = Core.Name "hydra.scala.syntax.TypeCase"
-_TypeCase_pat = Core.Name "pat"
-_TypeCase_body = Core.Name "body"
-data Source =
-  Source {
-    sourceStats :: [Stat]}
-  deriving (Eq, Ord, Read, Show)
-_Source = Core.Name "hydra.scala.syntax.Source"
-_Source_stats = Core.Name "stats"
-newtype Quasi =
-  Quasi {
-    unQuasi :: ()}
-  deriving (Eq, Ord, Read, Show)
-_Quasi = Core.Name "hydra.scala.syntax.Quasi"
diff --git a/src/main/haskell/Hydra/Scala/Utils.hs b/src/main/haskell/Hydra/Scala/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scala/Utils.hs
+++ /dev/null
@@ -1,173 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utility functions for constructing Scala AST nodes
-
-module Hydra.Scala.Utils where
-import qualified Hydra.Core as Core
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Scala.Language as Language
-import qualified Hydra.Scala.Syntax as Syntax
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Extract the name from a type, if it is a named type
-nameOfType :: t0 -> Core.Type -> Maybe Core.Name
-nameOfType cx t =
-    case (Strip.deannotateType t) of
-      Core.TypeVariable v0 -> Just v0
-      Core.TypeForall v0 -> nameOfType cx (Core.forallTypeBody v0)
-      _ -> Nothing
--- | Qualify a union field name, optionally prefixing with the Scala type name
-qualifyUnionFieldName :: String -> Maybe Core.Name -> Core.Name -> String
-qualifyUnionFieldName dlft sname fname =
-    Strings.cat2 (Maybes.maybe dlft (\n -> Strings.cat2 (scalaTypeName True n) ".") sname) (scalaEscapeName (Core.unName fname))
--- | Apply a Scala data expression to a list of arguments
-sapply :: Syntax.Data -> [Syntax.Data] -> Syntax.Data
-sapply fun args =
-    Syntax.DataApply (Syntax.Data_Apply {
-      Syntax.data_ApplyFun = fun,
-      Syntax.data_ApplyArgs = args})
--- | Apply explicit type parameters to a Scala expression (e.g. f[A, B])
-sapplyTypes :: Syntax.Data -> [Syntax.Type] -> Syntax.Data
-sapplyTypes fun typeArgs =
-
-      let typeToStr = \t -> typeToString t
-          typeStrings = Lists.map typeToStr typeArgs
-          typeArgStr =
-                  Strings.cat [
-                    "[",
-                    (Strings.intercalate ", " typeStrings),
-                    "]"]
-      in case fun of
-        Syntax.DataRef v0 -> case v0 of
-          Syntax.Data_RefName v1 ->
-            let nameStr = Syntax.data_NameValue v1
-                rawName = Syntax.unPredefString nameStr
-            in (sname (Strings.cat2 rawName typeArgStr))
-          _ -> fun
-        _ -> fun
--- | Create a Scala assignment expression
-sassign :: Syntax.Data -> Syntax.Data -> Syntax.Data
-sassign lhs rhs =
-    Syntax.DataAssign (Syntax.Data_Assign {
-      Syntax.data_AssignLhs = lhs,
-      Syntax.data_AssignRhs = rhs})
--- | Sanitize a name for Scala: escape reserved words, replace invalid characters
-scalaEscapeName :: String -> String
-scalaEscapeName s =
-
-      let sanitized = Strings.fromList (Lists.map (\c -> Logic.ifElse (Equality.equal c 39) 95 c) (Strings.toList s))
-          sanitized2 = Logic.ifElse (Equality.equal sanitized "_") "_x" sanitized
-          sanitized3 = Logic.ifElse (Equality.equal sanitized2 "toString") "toString_" sanitized2
-          needsBackticks =
-                  Logic.or (Sets.member sanitized3 scalaReservedWords) (Logic.and (Equality.gt (Strings.length sanitized3) 0) (Equality.equal (Maybes.fromMaybe 0 (Strings.maybeCharAt (Math.sub (Strings.length sanitized3) 1) sanitized3)) 95))
-      in (Logic.ifElse needsBackticks (Strings.cat [
-        "`",
-        sanitized3,
-        "`"]) sanitized3)
--- | Reference to scalaReservedWords from the language module
-scalaReservedWords :: S.Set String
-scalaReservedWords = Language.scalaReservedWords
--- | Convert a Hydra name to a Scala type name
-scalaTypeName :: Bool -> Core.Name -> String
-scalaTypeName qualify name =
-    Logic.ifElse (Logic.or qualify (Sets.member (Names.localNameOf name) scalaReservedWords)) (Core.unName name) (Names.localNameOf name)
--- | Create a Scala lambda (function) expression
-slambda :: String -> Syntax.Data -> Maybe Syntax.Type -> Syntax.Data
-slambda v body sdom =
-    Syntax.DataFunctionData (Syntax.Data_FunctionDataFunction (Syntax.Data_Function {
-      Syntax.data_FunctionParams = [
-        Syntax.Data_Param {
-          Syntax.data_ParamMods = [],
-          Syntax.data_ParamName = (Syntax.NameValue v),
-          Syntax.data_ParamDecltpe = sdom,
-          Syntax.data_ParamDefault = Nothing}],
-      Syntax.data_FunctionBody = body}))
--- | Create a Scala name reference
-sname :: String -> Syntax.Data
-sname s = Syntax.DataRef (Syntax.Data_RefName (Syntax.Data_Name {
-  Syntax.data_NameValue = (Syntax.PredefString s)}))
--- | Create a Scala primitive reference from a Hydra name
-sprim :: Core.Name -> Syntax.Data
-sprim name =
-
-      let qname = Names.qualifyName name
-          prefix = Packaging.unNamespace (Maybes.fromMaybe (Packaging.Namespace "") (Packaging.qualifiedNameNamespace qname))
-          local = scalaEscapeName (Packaging.qualifiedNameLocal qname)
-      in (sname (Strings.cat2 (Strings.cat2 prefix ".") local))
--- | Apply a Scala type to a list of type arguments
-stapply :: Syntax.Type -> [Syntax.Type] -> Syntax.Type
-stapply t args =
-    Syntax.TypeApply (Syntax.Type_Apply {
-      Syntax.type_ApplyTpe = t,
-      Syntax.type_ApplyArgs = args})
--- | Apply a Scala type to one type argument
-stapply1 :: Syntax.Type -> Syntax.Type -> Syntax.Type
-stapply1 t1 t2 = stapply t1 [
-  t2]
--- | Apply a Scala type to two type arguments
-stapply2 :: Syntax.Type -> Syntax.Type -> Syntax.Type -> Syntax.Type
-stapply2 t1 t2 t3 =
-    stapply t1 [
-      t2,
-      t3]
--- | Create a Scala type parameter from a Hydra name, capitalizing to avoid collision with value params
-stparam :: Core.Name -> Syntax.Type_Param
-stparam name =
-
-      let v = Formatting.capitalize (Core.unName name)
-      in Syntax.Type_Param {
-        Syntax.type_ParamMods = [],
-        Syntax.type_ParamName = (Syntax.NameValue v),
-        Syntax.type_ParamTparams = [],
-        Syntax.type_ParamTbounds = [],
-        Syntax.type_ParamVbounds = [],
-        Syntax.type_ParamCbounds = []}
--- | Create a Scala type reference by name
-stref :: String -> Syntax.Type
-stref s = Syntax.TypeRef (Syntax.Type_RefName (Syntax.Type_Name {
-  Syntax.type_NameValue = s}))
--- | Create a Scala pattern variable
-svar :: Core.Name -> Syntax.Pat
-svar name =
-
-      let v = Core.unName name
-      in (Syntax.PatVar (Syntax.Pat_Var {
-        Syntax.pat_VarName = Syntax.Data_Name {
-          Syntax.data_NameValue = (Syntax.PredefString v)}}))
--- | Convert a Scala type to its string representation
-typeToString :: Syntax.Type -> String
-typeToString t =
-    case t of
-      Syntax.TypeRef v0 -> case v0 of
-        Syntax.Type_RefName v1 -> Syntax.type_NameValue v1
-        _ -> "Any"
-      Syntax.TypeVar v0 -> Syntax.type_NameValue (Syntax.type_VarName v0)
-      Syntax.TypeFunctionType v0 -> case v0 of
-        Syntax.Type_FunctionTypeFunction v1 ->
-          let params = Lists.map typeToString (Syntax.type_FunctionParams v1)
-              res = typeToString (Syntax.type_FunctionRes v1)
-          in (Strings.cat [
-            "(",
-            (Strings.intercalate ", " params),
-            ") => ",
-            res])
-        _ -> "Any"
-      Syntax.TypeApply v0 ->
-        let base = typeToString (Syntax.type_ApplyTpe v0)
-            argStrs = Lists.map typeToString (Syntax.type_ApplyArgs v0)
-        in (Strings.cat [
-          base,
-          "[",
-          (Strings.intercalate ", " argStrs),
-          "]"])
-      _ -> "Any"
diff --git a/src/main/haskell/Hydra/Scoping.hs b/src/main/haskell/Hydra/Scoping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Scoping.hs
+++ /dev/null
@@ -1,107 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Graph context extension and type scheme conversion
-
-module Hydra.Scoping where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Sets as Sets
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Extend a graph by descending into a lambda body
-extendGraphForLambda :: Graph.Graph -> Core.Lambda -> Graph.Graph
-extendGraphForLambda g lam =
-
-      let var = Core.lambdaParameter lam
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-        Graph.graphBoundTypes = (Maybes.maybe (Graph.graphBoundTypes g) (\dom -> Maps.insert var (fTypeToTypeScheme dom) (Graph.graphBoundTypes g)) (Core.lambdaDomain lam)),
-        Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-        Graph.graphLambdaVariables = (Sets.insert var (Graph.graphLambdaVariables g)),
-        Graph.graphMetadata = (Maps.delete var (Graph.graphMetadata g)),
-        Graph.graphPrimitives = (Graph.graphPrimitives g),
-        Graph.graphSchemaTypes = (Graph.graphSchemaTypes g),
-        Graph.graphTypeVariables = (Graph.graphTypeVariables g)}
--- | Extend a graph by descending into a let body
-extendGraphForLet :: (Graph.Graph -> Core.Binding -> Maybe Core.Term) -> Graph.Graph -> Core.Let -> Graph.Graph
-extendGraphForLet forBinding g letrec =
-
-      let bindings = Core.letBindings letrec
-          g2 = extendGraphWithBindings bindings g
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Maps.union (Maps.fromList (Lists.map (\b -> (Core.bindingName b, (Core.bindingTerm b))) bindings)) (Graph.graphBoundTerms g)),
-        Graph.graphBoundTypes = (Maps.union (Maps.fromList (Maybes.cat (Lists.map (\b -> Maybes.map (\ts -> (Core.bindingName b, ts)) (Core.bindingTypeScheme b)) bindings))) (Graph.graphBoundTypes g)),
-        Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-        Graph.graphLambdaVariables = (Lists.foldl (\s -> \b -> Sets.delete (Core.bindingName b) s) (Graph.graphLambdaVariables g) bindings),
-        Graph.graphMetadata = (Graph.graphMetadata (Lists.foldl (\gAcc -> \b ->
-          let m = Graph.graphMetadata gAcc
-              newMeta = Maybes.maybe (Maps.delete (Core.bindingName b) m) (\t -> Maps.insert (Core.bindingName b) t m) (forBinding gAcc b)
-          in Graph.Graph {
-            Graph.graphBoundTerms = (Graph.graphBoundTerms gAcc),
-            Graph.graphBoundTypes = (Graph.graphBoundTypes gAcc),
-            Graph.graphClassConstraints = (Graph.graphClassConstraints gAcc),
-            Graph.graphLambdaVariables = (Graph.graphLambdaVariables gAcc),
-            Graph.graphMetadata = newMeta,
-            Graph.graphPrimitives = (Graph.graphPrimitives gAcc),
-            Graph.graphSchemaTypes = (Graph.graphSchemaTypes gAcc),
-            Graph.graphTypeVariables = (Graph.graphTypeVariables gAcc)}) g2 bindings)),
-        Graph.graphPrimitives = (Graph.graphPrimitives g),
-        Graph.graphSchemaTypes = (Graph.graphSchemaTypes g),
-        Graph.graphTypeVariables = (Graph.graphTypeVariables g)}
--- | Extend a graph by descending into a type lambda body
-extendGraphForTypeLambda :: Graph.Graph -> Core.TypeLambda -> Graph.Graph
-extendGraphForTypeLambda g tlam =
-
-      let name = Core.typeLambdaParameter tlam
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Graph.graphBoundTerms g),
-        Graph.graphBoundTypes = (Graph.graphBoundTypes g),
-        Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-        Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-        Graph.graphMetadata = (Graph.graphMetadata g),
-        Graph.graphPrimitives = (Graph.graphPrimitives g),
-        Graph.graphSchemaTypes = (Graph.graphSchemaTypes g),
-        Graph.graphTypeVariables = (Sets.insert name (Graph.graphTypeVariables g))}
--- | Add bindings to an existing graph
-extendGraphWithBindings :: [Core.Binding] -> Graph.Graph -> Graph.Graph
-extendGraphWithBindings bindings g =
-
-      let newTerms = Maps.fromList (Lists.map (\b -> (Core.bindingName b, (Core.bindingTerm b))) bindings)
-          newTypes =
-                  Maps.fromList (Maybes.cat (Lists.map (\b -> Maybes.map (\ts -> (Core.bindingName b, ts)) (Core.bindingTypeScheme b)) bindings))
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Maps.union newTerms (Graph.graphBoundTerms g)),
-        Graph.graphBoundTypes = (Maps.union newTypes (Graph.graphBoundTypes g)),
-        Graph.graphClassConstraints = (Graph.graphClassConstraints g),
-        Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),
-        Graph.graphMetadata = (Graph.graphMetadata g),
-        Graph.graphPrimitives = (Graph.graphPrimitives g),
-        Graph.graphSchemaTypes = (Graph.graphSchemaTypes g),
-        Graph.graphTypeVariables = (Graph.graphTypeVariables g)}
--- | Convert a forall type to a type scheme
-fTypeToTypeScheme :: Core.Type -> Core.TypeScheme
-fTypeToTypeScheme typ =
-
-      let stripAnnotations =
-              \t -> case t of
-                Core.TypeAnnotated v0 -> stripAnnotations (Core.annotatedTypeBody v0)
-                _ -> t
-          gatherForall =
-                  \vars -> \typ2 -> case (stripAnnotations typ2) of
-                    Core.TypeForall v0 -> gatherForall (Lists.cons (Core.forallTypeParameter v0) vars) (Core.forallTypeBody v0)
-                    _ -> Core.TypeScheme {
-                      Core.typeSchemeVariables = (Lists.reverse vars),
-                      Core.typeSchemeBody = typ2,
-                      Core.typeSchemeConstraints = Nothing}
-      in (gatherForall [] typ)
--- | Convert a type scheme to a forall type
-typeSchemeToFType :: Core.TypeScheme -> Core.Type
-typeSchemeToFType ts =
-
-      let vars = Core.typeSchemeVariables ts
-          body = Core.typeSchemeBody ts
-      in (Lists.foldl (\t -> \v -> Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = v,
-        Core.forallTypeBody = t})) body (Lists.reverse vars))
diff --git a/src/main/haskell/Hydra/Serialization.hs b/src/main/haskell/Hydra/Serialization.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Serialization.hs
+++ /dev/null
@@ -1,511 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for constructing generic program code ASTs, used for the serialization phase of source code generation.
-
-module Hydra.Serialization where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-angleBraces :: Ast.Brackets
-angleBraces =
-    Ast.Brackets {
-      Ast.bracketsOpen = (Ast.Symbol "<"),
-      Ast.bracketsClose = (Ast.Symbol ">")}
-angleBracesList :: Ast.BlockStyle -> [Ast.Expr] -> Ast.Expr
-angleBracesList style els = Logic.ifElse (Lists.null els) (cst "<>") (brackets angleBraces style (commaSep style els))
--- | Produce a bracketed list which separates elements by spaces or newlines depending on the estimated width of the expression.
-bracesListAdaptive :: [Ast.Expr] -> Ast.Expr
-bracesListAdaptive els =
-
-      let inlineList = curlyBracesList Nothing inlineStyle els
-      in (Logic.ifElse (Equality.gt (expressionLength inlineList) 70) (curlyBracesList Nothing halfBlockStyle els) inlineList)
-bracketList :: Ast.BlockStyle -> [Ast.Expr] -> Ast.Expr
-bracketList style els = Logic.ifElse (Lists.null els) (cst "[]") (brackets squareBrackets style (commaSep style els))
--- | Produce a bracketed list which separates elements by spaces or newlines depending on the estimated width of the expression.
-bracketListAdaptive :: [Ast.Expr] -> Ast.Expr
-bracketListAdaptive els =
-
-      let inlineList = bracketList inlineStyle els
-      in (Logic.ifElse (Equality.gt (expressionLength inlineList) 70) (bracketList halfBlockStyle els) inlineList)
-brackets :: Ast.Brackets -> Ast.BlockStyle -> Ast.Expr -> Ast.Expr
-brackets br style e =
-    Ast.ExprBrackets (Ast.BracketExpr {
-      Ast.bracketExprBrackets = br,
-      Ast.bracketExprEnclosed = e,
-      Ast.bracketExprStyle = style})
-commaSep :: Ast.BlockStyle -> [Ast.Expr] -> Ast.Expr
-commaSep = symbolSep ","
-cst :: String -> Ast.Expr
-cst s = Ast.ExprConst (sym s)
-curlyBlock :: Ast.BlockStyle -> Ast.Expr -> Ast.Expr
-curlyBlock style e = curlyBracesList Nothing style [
-  e]
-curlyBraces :: Ast.Brackets
-curlyBraces =
-    Ast.Brackets {
-      Ast.bracketsOpen = (Ast.Symbol "{"),
-      Ast.bracketsClose = (Ast.Symbol "}")}
-curlyBracesList :: Maybe String -> Ast.BlockStyle -> [Ast.Expr] -> Ast.Expr
-curlyBracesList msymb style els =
-    Logic.ifElse (Lists.null els) (cst "{}") (brackets curlyBraces style (symbolSep (Maybes.fromMaybe "," msymb) style els))
--- | Indent every non-empty line of `s` by `idt`. Empty lines stay empty (no trailing whitespace) so downstream byte-identity checks don't care about indent depth.
-customIndent :: String -> String -> String
-customIndent idt s =
-    Strings.cat (Lists.intersperse "\n" (Lists.map (\line -> Logic.ifElse (Equality.equal line "") line (Strings.cat2 idt line)) (Strings.lines s)))
-customIndentBlock :: String -> [Ast.Expr] -> Ast.Expr
-customIndentBlock idt els =
-
-      let idtOp =
-              Ast.Op {
-                Ast.opSymbol = (sym ""),
-                Ast.opPadding = Ast.Padding {
-                  Ast.paddingLeft = Ast.WsSpace,
-                  Ast.paddingRight = (Ast.WsBreakAndIndent idt)},
-                Ast.opPrecedence = (Ast.Precedence 0),
-                Ast.opAssociativity = Ast.AssociativityNone}
-      in (Maybes.maybe (cst "") (\head -> Logic.ifElse (Equality.equal (Lists.length els) 1) head (ifx idtOp head (newlineSep (Lists.drop 1 els)))) (Lists.maybeHead els))
-dotSep :: [Ast.Expr] -> Ast.Expr
-dotSep =
-    sep (Ast.Op {
-      Ast.opSymbol = (sym "."),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone})
-doubleNewlineSep :: [Ast.Expr] -> Ast.Expr
-doubleNewlineSep =
-    sep (Ast.Op {
-      Ast.opSymbol = (sym ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsBreak,
-        Ast.paddingRight = Ast.WsBreak},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone})
-doubleSpace :: String
-doubleSpace = "  "
--- | Find the approximate length (number of characters, including spaces and newlines) of an expression without actually printing it.
-expressionLength :: Ast.Expr -> Int
-expressionLength e =
-
-      let symbolLength = \s -> Strings.length (Ast.unSymbol s)
-          wsLength =
-                  \ws -> case ws of
-                    Ast.WsNone -> 0
-                    Ast.WsSpace -> 1
-                    Ast.WsBreak -> 10000
-                    Ast.WsBreakAndIndent _ -> 10000
-                    Ast.WsDoubleBreak -> 10000
-          blockStyleLength =
-                  \style ->
-                    let mindentLen = Maybes.maybe 0 Strings.length (Ast.blockStyleIndent style)
-                        nlBeforeLen = Logic.ifElse (Ast.blockStyleNewlineBeforeContent style) 1 0
-                        nlAfterLen = Logic.ifElse (Ast.blockStyleNewlineAfterContent style) 1 0
-                    in (Math.add mindentLen (Math.add nlBeforeLen nlAfterLen))
-          bracketsLength =
-                  \brackets -> Math.add (symbolLength (Ast.bracketsOpen brackets)) (symbolLength (Ast.bracketsClose brackets))
-          bracketExprLength =
-                  \be -> Math.add (bracketsLength (Ast.bracketExprBrackets be)) (Math.add (expressionLength (Ast.bracketExprEnclosed be)) (blockStyleLength (Ast.bracketExprStyle be)))
-          indentedExpressionLength =
-                  \ie ->
-                    let baseLen = expressionLength (Ast.indentedExpressionExpr ie)
-                        indentLen =
-                                case (Ast.indentedExpressionStyle ie) of
-                                  Ast.IndentStyleAllLines v0 -> Strings.length v0
-                                  Ast.IndentStyleSubsequentLines v0 -> Strings.length v0
-                    in (Math.add baseLen indentLen)
-          opLength =
-                  \op ->
-                    let symLen = symbolLength (Ast.opSymbol op)
-                        padding = Ast.opPadding op
-                        leftLen = wsLength (Ast.paddingLeft padding)
-                        rightLen = wsLength (Ast.paddingRight padding)
-                    in (Math.add symLen (Math.add leftLen rightLen))
-          opExprLength =
-                  \oe ->
-                    let opLen = opLength (Ast.opExprOp oe)
-                        leftLen = expressionLength (Ast.opExprLhs oe)
-                        rightLen = expressionLength (Ast.opExprRhs oe)
-                    in (Math.add opLen (Math.add leftLen rightLen))
-          seqExprLength =
-                  \se ->
-                    let sopLen = opLength (Ast.seqExprOp se)
-                        elementLens = Lists.map expressionLength (Ast.seqExprElements se)
-                        totalElLen = Lists.foldl Math.add 0 elementLens
-                        numSeps = Math.sub (Lists.length (Ast.seqExprElements se)) 1
-                    in (Math.add totalElLen (Math.mul sopLen (Logic.ifElse (Equality.gt numSeps 0) numSeps 0)))
-      in case e of
-        Ast.ExprConst v0 -> symbolLength v0
-        Ast.ExprIndent v0 -> indentedExpressionLength v0
-        Ast.ExprOp v0 -> opExprLength v0
-        Ast.ExprBrackets v0 -> bracketExprLength v0
-        Ast.ExprSeq v0 -> seqExprLength v0
-fullBlockStyle :: Ast.BlockStyle
-fullBlockStyle =
-    Ast.BlockStyle {
-      Ast.blockStyleIndent = (Just doubleSpace),
-      Ast.blockStyleNewlineBeforeContent = True,
-      Ast.blockStyleNewlineAfterContent = True}
-halfBlockStyle :: Ast.BlockStyle
-halfBlockStyle =
-    Ast.BlockStyle {
-      Ast.blockStyleIndent = (Just doubleSpace),
-      Ast.blockStyleNewlineBeforeContent = True,
-      Ast.blockStyleNewlineAfterContent = False}
-ifx :: Ast.Op -> Ast.Expr -> Ast.Expr -> Ast.Expr
-ifx op lhs rhs =
-    Ast.ExprOp (Ast.OpExpr {
-      Ast.opExprOp = op,
-      Ast.opExprLhs = lhs,
-      Ast.opExprRhs = rhs})
-indent :: String -> String
-indent = customIndent doubleSpace
-indentBlock :: [Ast.Expr] -> Ast.Expr
-indentBlock = customIndentBlock doubleSpace
-indentSubsequentLines :: String -> Ast.Expr -> Ast.Expr
-indentSubsequentLines idt e =
-    Ast.ExprIndent (Ast.IndentedExpression {
-      Ast.indentedExpressionStyle = (Ast.IndentStyleSubsequentLines idt),
-      Ast.indentedExpressionExpr = e})
-infixWs :: String -> Ast.Expr -> Ast.Expr -> Ast.Expr
-infixWs op l r =
-    spaceSep [
-      l,
-      (cst op),
-      r]
-infixWsList :: String -> [Ast.Expr] -> Ast.Expr
-infixWsList op opers =
-
-      let opExpr = cst op
-          foldFun = \e -> \r -> Logic.ifElse (Lists.null e) [
-                r] (Lists.cons r (Lists.cons opExpr e))
-      in (spaceSep (Lists.foldl foldFun [] (Lists.reverse opers)))
-inlineStyle :: Ast.BlockStyle
-inlineStyle =
-    Ast.BlockStyle {
-      Ast.blockStyleIndent = Nothing,
-      Ast.blockStyleNewlineBeforeContent = False,
-      Ast.blockStyleNewlineAfterContent = False}
-newlineSep :: [Ast.Expr] -> Ast.Expr
-newlineSep =
-    sep (Ast.Op {
-      Ast.opSymbol = (sym ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsBreak},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone})
-noPadding :: Ast.Padding
-noPadding =
-    Ast.Padding {
-      Ast.paddingLeft = Ast.WsNone,
-      Ast.paddingRight = Ast.WsNone}
-noSep :: [Ast.Expr] -> Ast.Expr
-noSep =
-    sep (Ast.Op {
-      Ast.opSymbol = (sym ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsNone,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone})
-num :: Int -> Ast.Expr
-num i = cst (Literals.showInt32 i)
-op :: String -> Int -> Ast.Associativity -> Ast.Op
-op s p assoc =
-    Ast.Op {
-      Ast.opSymbol = (sym s),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsSpace,
-        Ast.paddingRight = Ast.WsSpace},
-      Ast.opPrecedence = (Ast.Precedence p),
-      Ast.opAssociativity = assoc}
-orOp :: Bool -> Ast.Op
-orOp newlines =
-    Ast.Op {
-      Ast.opSymbol = (sym "|"),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsSpace,
-        Ast.paddingRight = (Logic.ifElse newlines Ast.WsBreak Ast.WsSpace)},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone}
-orSep :: Ast.BlockStyle -> [Ast.Expr] -> Ast.Expr
-orSep style l =
-
-      let newlines = Ast.blockStyleNewlineBeforeContent style
-      in (Maybes.maybe (cst "") (\h -> Lists.foldl (\acc -> \el -> ifx (orOp newlines) acc el) h (Lists.drop 1 l)) (Lists.maybeHead l))
-parenList :: Bool -> [Ast.Expr] -> Ast.Expr
-parenList newlines els =
-
-      let style = Logic.ifElse (Logic.and newlines (Equality.gt (Lists.length els) 1)) halfBlockStyle inlineStyle
-      in (Logic.ifElse (Lists.null els) (cst "()") (brackets parentheses style (commaSep style els)))
-parens :: Ast.Expr -> Ast.Expr
-parens = brackets parentheses inlineStyle
-parentheses :: Ast.Brackets
-parentheses =
-    Ast.Brackets {
-      Ast.bracketsOpen = (Ast.Symbol "("),
-      Ast.bracketsClose = (Ast.Symbol ")")}
-parenthesize :: Ast.Expr -> Ast.Expr
-parenthesize exp =
-
-      let assocLeft =
-              \a -> case a of
-                Ast.AssociativityRight -> False
-                _ -> True
-          assocRight =
-                  \a -> case a of
-                    Ast.AssociativityLeft -> False
-                    _ -> True
-      in case exp of
-        Ast.ExprBrackets v0 -> Ast.ExprBrackets (Ast.BracketExpr {
-          Ast.bracketExprBrackets = (Ast.bracketExprBrackets v0),
-          Ast.bracketExprEnclosed = (parenthesize (Ast.bracketExprEnclosed v0)),
-          Ast.bracketExprStyle = (Ast.bracketExprStyle v0)})
-        Ast.ExprConst _ -> exp
-        Ast.ExprIndent v0 -> Ast.ExprIndent (Ast.IndentedExpression {
-          Ast.indentedExpressionStyle = (Ast.indentedExpressionStyle v0),
-          Ast.indentedExpressionExpr = (parenthesize (Ast.indentedExpressionExpr v0))})
-        Ast.ExprSeq v0 -> Ast.ExprSeq (Ast.SeqExpr {
-          Ast.seqExprOp = (Ast.seqExprOp v0),
-          Ast.seqExprElements = (Lists.map parenthesize (Ast.seqExprElements v0))})
-        Ast.ExprOp v0 ->
-          let op = Ast.opExprOp v0
-              prec = Ast.unPrecedence (Ast.opPrecedence op)
-              assoc = Ast.opAssociativity op
-              lhs = Ast.opExprLhs v0
-              rhs = Ast.opExprRhs v0
-              lhs_ = parenthesize lhs
-              rhs_ = parenthesize rhs
-              lhs2 =
-                      case lhs_ of
-                        Ast.ExprOp v1 ->
-                          let lop = Ast.opExprOp v1
-                              lprec = Ast.unPrecedence (Ast.opPrecedence lop)
-                              lassoc = Ast.opAssociativity lop
-                              comparison = Equality.compare prec lprec
-                          in case comparison of
-                            Util.ComparisonLessThan -> lhs_
-                            Util.ComparisonGreaterThan -> parens lhs_
-                            Util.ComparisonEqualTo -> Logic.ifElse (Logic.and (assocLeft assoc) (assocLeft lassoc)) lhs_ (parens lhs_)
-                        _ -> lhs_
-              rhs2 =
-                      case rhs_ of
-                        Ast.ExprOp v1 ->
-                          let rop = Ast.opExprOp v1
-                              rprec = Ast.unPrecedence (Ast.opPrecedence rop)
-                              rassoc = Ast.opAssociativity rop
-                              comparison = Equality.compare prec rprec
-                          in case comparison of
-                            Util.ComparisonLessThan -> rhs_
-                            Util.ComparisonGreaterThan -> parens rhs_
-                            Util.ComparisonEqualTo -> Logic.ifElse (Logic.and (assocRight assoc) (assocRight rassoc)) rhs_ (parens rhs_)
-                        _ -> rhs_
-          in (Ast.ExprOp (Ast.OpExpr {
-            Ast.opExprOp = op,
-            Ast.opExprLhs = lhs2,
-            Ast.opExprRhs = rhs2}))
-prefix :: String -> Ast.Expr -> Ast.Expr
-prefix p expr =
-
-      let preOp =
-              Ast.Op {
-                Ast.opSymbol = (sym p),
-                Ast.opPadding = Ast.Padding {
-                  Ast.paddingLeft = Ast.WsNone,
-                  Ast.paddingRight = Ast.WsNone},
-                Ast.opPrecedence = (Ast.Precedence 0),
-                Ast.opAssociativity = Ast.AssociativityNone}
-      in (ifx preOp (cst "") expr)
-printExpr :: Ast.Expr -> String
-printExpr e =
-
-      let pad =
-              \ws -> case ws of
-                Ast.WsNone -> ""
-                Ast.WsSpace -> " "
-                Ast.WsBreak -> "\n"
-                Ast.WsBreakAndIndent _ -> "\n"
-                Ast.WsDoubleBreak -> "\n\n"
-          idt =
-                  \ws -> \s -> case ws of
-                    Ast.WsBreakAndIndent v0 -> customIndent v0 s
-                    _ -> s
-      in case e of
-        Ast.ExprConst v0 -> Ast.unSymbol v0
-        Ast.ExprIndent v0 ->
-          let style = Ast.indentedExpressionStyle v0
-              expr = Ast.indentedExpressionExpr v0
-              lns = Strings.lines (printExpr expr)
-              indentLine = \idt2 -> \line -> Logic.ifElse (Equality.equal line "") line (Strings.cat2 idt2 line)
-              ilns =
-                      case style of
-                        Ast.IndentStyleAllLines v1 -> Lists.map (indentLine v1) lns
-                        Ast.IndentStyleSubsequentLines v1 -> Logic.ifElse (Equality.equal (Lists.length lns) 1) lns (Maybes.fromMaybe lns (Maybes.map (\uc -> Lists.cons (Pairs.first uc) (Lists.map (indentLine v1) (Pairs.second uc))) (Lists.uncons lns)))
-          in (Strings.intercalate "\n" ilns)
-        Ast.ExprSeq v0 ->
-          let sop = Ast.seqExprOp v0
-              ssym = Ast.unSymbol (Ast.opSymbol sop)
-              spadding = Ast.opPadding sop
-              spadl = Ast.paddingLeft spadding
-              spadr = Ast.paddingRight spadding
-              selements = Ast.seqExprElements v0
-              printedElements = Lists.map (\el -> idt spadr (printExpr el)) selements
-              isNewlineWs =
-                      \ws -> case ws of
-                        Ast.WsBreak -> True
-                        Ast.WsBreakAndIndent _ -> True
-                        Ast.WsDoubleBreak -> True
-                        _ -> False
-              spadlIsNewline = isNewlineWs spadl
-              spadrIsNewline = isNewlineWs spadr
-              joinElements =
-                      \acc -> \el ->
-                        let elStartsWithNewline = Maybes.maybe False (\c -> Equality.equal c 10) (Strings.maybeCharAt 0 el)
-                            elIsEmpty = Equality.equal el ""
-                            padlEff =
-                                    Logic.ifElse (Logic.or (Logic.and elStartsWithNewline (Logic.not spadlIsNewline)) (Logic.and elIsEmpty (Equality.equal ssym ""))) "" (pad spadl)
-                            padrEff =
-                                    Logic.ifElse (Logic.or (Logic.and elStartsWithNewline (Logic.not spadrIsNewline)) (Logic.and elIsEmpty (Equality.equal ssym ""))) "" (pad spadr)
-                        in (Strings.cat [
-                          acc,
-                          padlEff,
-                          ssym,
-                          padrEff,
-                          el])
-          in (Maybes.maybe "" (\h -> Lists.foldl joinElements h (Lists.drop 1 printedElements)) (Lists.maybeHead printedElements))
-        Ast.ExprOp v0 ->
-          let op = Ast.opExprOp v0
-              sym = Ast.unSymbol (Ast.opSymbol op)
-              padding = Ast.opPadding op
-              padl = Ast.paddingLeft padding
-              padr = Ast.paddingRight padding
-              l = Ast.opExprLhs v0
-              r = Ast.opExprRhs v0
-              lhs = idt padl (printExpr l)
-              rhs = idt padr (printExpr r)
-              padrIsNewline =
-                      case padr of
-                        Ast.WsBreak -> True
-                        Ast.WsBreakAndIndent _ -> True
-                        Ast.WsDoubleBreak -> True
-                        _ -> False
-              padlEffective = Logic.ifElse (Logic.and (Equality.equal sym "") (Logic.or padrIsNewline (Equality.equal rhs ""))) "" (pad padl)
-              padrPad = pad padr
-              rhsStartsWithNewline = Maybes.maybe False (\c -> Equality.equal c 10) (Strings.maybeCharAt 0 rhs)
-              padrEffective = Logic.ifElse (Logic.and rhsStartsWithNewline (Logic.not padrIsNewline)) "" padrPad
-          in (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 lhs padlEffective) sym) padrEffective) rhs)
-        Ast.ExprBrackets v0 ->
-          let brs = Ast.bracketExprBrackets v0
-              l = Ast.unSymbol (Ast.bracketsOpen brs)
-              r = Ast.unSymbol (Ast.bracketsClose brs)
-              e = Ast.bracketExprEnclosed v0
-              style = Ast.bracketExprStyle v0
-              body = printExpr e
-              doIndent = Ast.blockStyleIndent style
-              nlBefore = Ast.blockStyleNewlineBeforeContent style
-              nlAfter = Ast.blockStyleNewlineAfterContent style
-              ibody = Maybes.maybe body (\idt2 -> customIndent idt2 body) doIndent
-              pre = Logic.ifElse nlBefore "\n" ""
-              suf = Logic.ifElse nlAfter "\n" ""
-          in (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 l pre) ibody) suf) r)
-semicolonSep :: [Ast.Expr] -> Ast.Expr
-semicolonSep = symbolSep ";" inlineStyle
-sep :: Ast.Op -> [Ast.Expr] -> Ast.Expr
-sep op els =
-    Maybes.maybe (cst "") (\h -> Lists.foldl (\acc -> \el -> ifx op acc el) h (Lists.drop 1 els)) (Lists.maybeHead els)
-spaceSep :: [Ast.Expr] -> Ast.Expr
-spaceSep =
-    sep (Ast.Op {
-      Ast.opSymbol = (sym ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsSpace,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone})
-squareBrackets :: Ast.Brackets
-squareBrackets =
-    Ast.Brackets {
-      Ast.bracketsOpen = (Ast.Symbol "["),
-      Ast.bracketsClose = (Ast.Symbol "]")}
--- | Like sep, but produces a SeqExpr instead of an OpExpr chain. SeqExpr is treated as structural layout and is not subject to parenthesization.
-structuralSep :: Ast.Op -> [Ast.Expr] -> Ast.Expr
-structuralSep op els =
-    Logic.ifElse (Lists.null els) (cst "") (Logic.ifElse (Equality.equal (Lists.length els) 1) (Maybes.fromMaybe (cst "") (Lists.maybeHead els)) (Ast.ExprSeq (Ast.SeqExpr {
-      Ast.seqExprOp = op,
-      Ast.seqExprElements = els})))
--- | Like spaceSep, but produces a SeqExpr. Use for structural layout that should not trigger parenthesization of children.
-structuralSpaceSep :: [Ast.Expr] -> Ast.Expr
-structuralSpaceSep =
-    structuralSep (Ast.Op {
-      Ast.opSymbol = (sym ""),
-      Ast.opPadding = Ast.Padding {
-        Ast.paddingLeft = Ast.WsSpace,
-        Ast.paddingRight = Ast.WsNone},
-      Ast.opPrecedence = (Ast.Precedence 0),
-      Ast.opAssociativity = Ast.AssociativityNone})
--- | Append a suffix string to an expression
-suffix :: String -> Ast.Expr -> Ast.Expr
-suffix s expr =
-
-      let sufOp =
-              Ast.Op {
-                Ast.opSymbol = (sym s),
-                Ast.opPadding = Ast.Padding {
-                  Ast.paddingLeft = Ast.WsNone,
-                  Ast.paddingRight = Ast.WsNone},
-                Ast.opPrecedence = (Ast.Precedence 0),
-                Ast.opAssociativity = Ast.AssociativityNone}
-      in (ifx sufOp expr (cst ""))
-sym :: String -> Ast.Symbol
-sym s = Ast.Symbol s
-symbolSep :: String -> Ast.BlockStyle -> [Ast.Expr] -> Ast.Expr
-symbolSep symb style l =
-
-      let breakCount =
-              Lists.length (Lists.filter (\x_ -> x_) [
-                Ast.blockStyleNewlineBeforeContent style,
-                (Ast.blockStyleNewlineAfterContent style)])
-          break =
-                  Logic.ifElse (Equality.equal breakCount 0) Ast.WsSpace (Logic.ifElse (Equality.equal breakCount 1) Ast.WsBreak Ast.WsDoubleBreak)
-          commaOp =
-                  Ast.Op {
-                    Ast.opSymbol = (sym symb),
-                    Ast.opPadding = Ast.Padding {
-                      Ast.paddingLeft = Ast.WsNone,
-                      Ast.paddingRight = break},
-                    Ast.opPrecedence = (Ast.Precedence 0),
-                    Ast.opAssociativity = Ast.AssociativityNone}
-      in (Maybes.maybe (cst "") (\h -> Lists.foldl (\acc -> \el -> ifx commaOp acc el) h (Lists.drop 1 l)) (Lists.maybeHead l))
-tabIndent :: Ast.Expr -> Ast.Expr
-tabIndent e =
-    Ast.ExprIndent (Ast.IndentedExpression {
-      Ast.indentedExpressionStyle = (Ast.IndentStyleAllLines "    "),
-      Ast.indentedExpressionExpr = e})
-tabIndentDoubleSpace :: [Ast.Expr] -> Ast.Expr
-tabIndentDoubleSpace exprs = tabIndent (doubleNewlineSep exprs)
-tabIndentSingleSpace :: [Ast.Expr] -> Ast.Expr
-tabIndentSingleSpace exprs = tabIndent (newlineSep exprs)
-unsupportedType :: String -> Ast.Expr
-unsupportedType label = cst (Strings.cat2 (Strings.cat2 "[" label) "]")
-unsupportedVariant :: String -> String -> Ast.Expr
-unsupportedVariant label obj =
-    cst (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "[unsupported " label) ": ") (Literals.showString obj)) "]")
-withComma :: Ast.Expr -> Ast.Expr
-withComma e =
-    noSep [
-      e,
-      (cst ",")]
-withSemi :: Ast.Expr -> Ast.Expr
-withSemi e =
-    noSep [
-      e,
-      (cst ";")]
diff --git a/src/main/haskell/Hydra/Settings.hs b/src/main/haskell/Hydra/Settings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Settings.hs
+++ /dev/null
@@ -1,5 +0,0 @@
--- | The one non-generated Hydra kernel module. It contains constants which are set individually in each Hydra implementation.
-
-module Hydra.Settings where
-
-hydraDebug = True :: Bool
diff --git a/src/main/haskell/Hydra/Shacl/Coder.hs b/src/main/haskell/Hydra/Shacl/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Shacl/Coder.hs
+++ /dev/null
@@ -1,298 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | SHACL coder: converts Hydra types and terms to SHACL shapes and RDF descriptions
-
-module Hydra.Shacl.Coder where
-
-import qualified Hydra.Annotations as Annotations
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Rdf.Syntax as Syntax
-import qualified Hydra.Rdf.Utils as Utils
-import qualified Hydra.Shacl.Model as Model
-import qualified Hydra.Strip as Strip
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Construct CommonProperties from a list of constraints, using defaults for other fields
-common :: [Model.CommonConstraint] -> Model.CommonProperties
-common constraints =
-    Model.CommonProperties {
-      Model.commonPropertiesConstraints = (Sets.fromList constraints),
-      Model.commonPropertiesDeactivated = Nothing,
-      Model.commonPropertiesMessage = (Syntax.LangStrings Maps.empty),
-      Model.commonPropertiesSeverity = Model.SeverityInfo,
-      Model.commonPropertiesTargetClass = Sets.empty,
-      Model.commonPropertiesTargetNode = Sets.empty,
-      Model.commonPropertiesTargetObjectsOf = Sets.empty,
-      Model.commonPropertiesTargetSubjectsOf = Sets.empty}
-
--- | Default CommonProperties with empty constraints and default severity
-defaultCommonProperties :: Model.CommonProperties
-defaultCommonProperties = common []
-
--- | Convert a binding's name to an RDF IRI
-elementIri :: Core.Binding -> Syntax.Iri
-elementIri el = Utils.nameToIri (Core.bindingName el)
-
--- | Encode a record field as RDF triples with a given subject
-encodeField :: Core.Name -> Syntax.Resource -> Core.Field -> Context.Context -> Graph.Graph -> Either Errors.Error ([Syntax.Triple], Context.Context)
-encodeField rname subject field cx g =
-
-      let pair1 = Utils.nextBlankNode cx
-          node = Pairs.first pair1
-          cx1 = Pairs.second pair1
-      in (Eithers.bind (encodeTerm node (Core.fieldTerm field) cx1 g) (\_r1 ->
-        let descs = Pairs.first _r1
-            cx2 = Pairs.second _r1
-        in (Right (Lists.concat2 (Utils.triplesOf descs) (Utils.forObjects subject (Utils.propertyIri rname (Core.fieldName field)) (Utils.subjectsOf descs)), cx2))))
-
--- | Encode a FieldType as a SHACL property shape Definition
-encodeFieldType :: Core.Name -> Maybe Integer -> Core.FieldType -> t0 -> Either Errors.Error (Model.Definition Model.PropertyShape)
-encodeFieldType rname order ft cx =
-
-      let fname = Core.fieldTypeName ft
-          ftype = Core.fieldTypeType ft
-          iri = Utils.propertyIri rname fname
-          forType =
-                  \mn -> \mx -> \t -> case (Strip.deannotateType t) of
-                    Core.TypeMaybe v0 -> forType (Just 0) mx v0
-                    Core.TypeSet v0 -> forType mn Nothing v0
-                    _ -> forTypeDefault mn mx t
-          forTypeDefault =
-                  \mn -> \mx -> \t -> Eithers.map (\_cp ->
-                    let baseProp = property iri
-                        minC = Maybes.map (\_n -> Model.PropertyShapeConstraintMinCount _n) mn
-                        maxC = Maybes.map (\_n -> Model.PropertyShapeConstraintMaxCount _n) mx
-                    in Model.Definition {
-                      Model.definitionIri = iri,
-                      Model.definitionTarget = Model.PropertyShape {
-                        Model.propertyShapeCommon = _cp,
-                        Model.propertyShapeConstraints = (Sets.fromList (Maybes.cat [
-                          minC,
-                          maxC])),
-                        Model.propertyShapeDefaultValue = Nothing,
-                        Model.propertyShapeDescription = (Syntax.LangStrings Maps.empty),
-                        Model.propertyShapeName = (Syntax.LangStrings Maps.empty),
-                        Model.propertyShapeOrder = order,
-                        Model.propertyShapePath = iri}}) (encodeType rname t cx)
-      in (forType (Just 1) (Just 1) ftype)
-
--- | Encode a list of terms as RDF list structure
-encodeList :: Syntax.Resource -> [Core.Term] -> Context.Context -> Graph.Graph -> Either Errors.Error ([Syntax.Description], Context.Context)
-encodeList subj terms cx0 g =
-    Logic.ifElse (Lists.null terms) (Right ([
-      Syntax.Description {
-        Syntax.descriptionSubject = (Syntax.NodeIri (Syntax.Iri "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")),
-        Syntax.descriptionGraph = (Syntax.Graph Sets.empty)}], cx0)) (Maybes.maybe (Right ([], cx0)) (\p ->
-      let pair1 = Utils.nextBlankNode cx0
-          node1 = Pairs.first pair1
-          cx1 = Pairs.second pair1
-      in (Eithers.bind (encodeTerm node1 (Pairs.first p) cx1 g) (\_r1 ->
-        let fdescs = Pairs.first _r1
-            cx2 = Pairs.second _r1
-            firstTriples = Lists.concat2 (Utils.triplesOf fdescs) (Utils.forObjects subj (Utils.rdfIri "first") (Utils.subjectsOf fdescs))
-            pair2 = Utils.nextBlankNode cx2
-            next = Pairs.first pair2
-            cx3 = Pairs.second pair2
-        in (Eithers.map (\_r2 ->
-          let rdescs = Pairs.first _r2
-              cx4 = Pairs.second _r2
-              restTriples = Lists.concat2 (Utils.triplesOf rdescs) (Utils.forObjects subj (Utils.rdfIri "rest") (Utils.subjectsOf rdescs))
-          in ([
-            Syntax.Description {
-              Syntax.descriptionSubject = (Utils.resourceToNode subj),
-              Syntax.descriptionGraph = (Syntax.Graph (Sets.fromList (Lists.concat2 firstTriples restTriples)))}], cx4)) (encodeList next (Pairs.second p) cx3 g))))) (Lists.uncons terms))
-
--- | Encode a LiteralType as SHACL CommonProperties with an XSD datatype constraint
-encodeLiteralType :: Core.LiteralType -> Model.CommonProperties
-encodeLiteralType lt =
-
-      let xsd = \local -> common [
-            Model.CommonConstraintDatatype (Utils.xmlSchemaDatatypeIri local)]
-      in case lt of
-        Core.LiteralTypeBinary -> xsd "base64Binary"
-        Core.LiteralTypeBoolean -> xsd "boolean"
-        Core.LiteralTypeFloat v0 -> case v0 of
-          Core.FloatTypeBigfloat -> xsd "decimal"
-          Core.FloatTypeFloat32 -> xsd "float"
-          Core.FloatTypeFloat64 -> xsd "double"
-        Core.LiteralTypeInteger v0 -> case v0 of
-          Core.IntegerTypeBigint -> xsd "integer"
-          Core.IntegerTypeInt8 -> xsd "byte"
-          Core.IntegerTypeInt16 -> xsd "short"
-          Core.IntegerTypeInt32 -> xsd "int"
-          Core.IntegerTypeInt64 -> xsd "long"
-          Core.IntegerTypeUint8 -> xsd "unsignedByte"
-          Core.IntegerTypeUint16 -> xsd "unsignedShort"
-          Core.IntegerTypeUint32 -> xsd "unsignedInt"
-          Core.IntegerTypeUint64 -> xsd "unsignedLong"
-        Core.LiteralTypeString -> xsd "string"
-
--- | Encode a Hydra term as a list of RDF Descriptions
-encodeTerm :: Syntax.Resource -> Core.Term -> Context.Context -> Graph.Graph -> Either Errors.Error ([Syntax.Description], Context.Context)
-encodeTerm subject term cx g =
-    case term of
-      Core.TermAnnotated v0 -> encodeTerm subject (Core.annotatedTermBody v0) cx g
-      Core.TermList v0 -> encodeList subject v0 cx g
-      Core.TermLiteral v0 -> Right ([
-        Syntax.Description {
-          Syntax.descriptionSubject = (Syntax.NodeLiteral (Utils.encodeLiteral v0)),
-          Syntax.descriptionGraph = (Syntax.Graph Sets.empty)}], cx)
-      Core.TermMap v0 -> Eithers.map (\_r -> ([
-        Syntax.Description {
-          Syntax.descriptionSubject = (Utils.resourceToNode subject),
-          Syntax.descriptionGraph = (Syntax.Graph (Sets.fromList (Lists.concat (Pairs.first _r))))}], (Pairs.second _r))) (foldAccumResult (\_cx0 -> \kv -> Eithers.bind (ExtractCore.string g (Strip.deannotateTerm (Pairs.first kv))) (\_ks ->
-        let pair2 = Utils.nextBlankNode _cx0
-            node2 = Pairs.first pair2
-            cx2 = Pairs.second pair2
-        in (Eithers.map (\_dr -> (Lists.concat2 (Utils.forObjects subject (Utils.keyIri _ks) (Utils.subjectsOf (Pairs.first _dr))) (Utils.triplesOf (Pairs.first _dr)), (Pairs.second _dr))) (encodeTerm node2 (Pairs.second kv) cx2 g)))) cx (Maps.toList v0))
-      Core.TermWrap v0 -> Eithers.map (\_dr ->
-        let descs = Pairs.first _dr
-            cx1 = Pairs.second _dr
-        in (Maybes.fromMaybe descs (Maybes.map (\p -> Lists.cons (withType (Core.wrappedTermTypeName v0) (Pairs.first p)) (Pairs.second p)) (Lists.uncons descs)), cx1)) (encodeTerm subject (Core.wrappedTermBody v0) cx g)
-      Core.TermMaybe v0 -> Maybes.maybe (Right ([], cx)) (\_inner -> encodeTerm subject _inner cx g) v0
-      Core.TermRecord v0 ->
-        let rname = Core.recordTypeName v0
-            fields = Core.recordFields v0
-        in (Eithers.map (\_r -> ([
-          withType rname (Syntax.Description {
-            Syntax.descriptionSubject = (Utils.resourceToNode subject),
-            Syntax.descriptionGraph = (Syntax.Graph (Sets.fromList (Lists.concat (Pairs.first _r))))})], (Pairs.second _r))) (foldAccumResult (\_cx0 -> \field -> encodeField rname subject field _cx0 g) cx fields))
-      Core.TermSet v0 -> Eithers.map (\_r -> (Lists.concat (Pairs.first _r), (Pairs.second _r))) (foldAccumResult (\_cx0 -> \t ->
-        let pair3 = Utils.nextBlankNode _cx0
-            node3 = Pairs.first pair3
-            cx3 = Pairs.second pair3
-        in (encodeTerm node3 t cx3 g)) cx (Sets.toList v0))
-      Core.TermInject v0 ->
-        let rname = Core.injectionTypeName v0
-            field = Core.injectionField v0
-        in (Eithers.map (\_r -> ([
-          withType rname (Syntax.Description {
-            Syntax.descriptionSubject = (Utils.resourceToNode subject),
-            Syntax.descriptionGraph = (Syntax.Graph (Sets.fromList (Pairs.first _r)))})], (Pairs.second _r))) (encodeField rname subject field cx g))
-      _ -> unexpectedE cx "RDF-compatible term" "unsupported term variant"
-
--- | Encode a Hydra type as SHACL CommonProperties
-encodeType :: Core.Name -> Core.Type -> t0 -> Either Errors.Error Model.CommonProperties
-encodeType tname typ cx =
-
-      let any = Right (common [])
-      in case (Strip.deannotateType typ) of
-        Core.TypeEither _ -> any
-        Core.TypeList _ -> any
-        Core.TypeLiteral v0 -> Right (encodeLiteralType v0)
-        Core.TypeMap _ -> any
-        Core.TypePair _ -> any
-        Core.TypeWrap _ -> any
-        Core.TypeRecord v0 -> Eithers.map (\_props -> common [
-          Model.CommonConstraintProperty (Sets.fromList (Lists.map (\_p -> Model.ReferenceDefinition _p) _props))]) (Eithers.mapList (\_pair -> encodeFieldType tname (Just (Pairs.first _pair)) (Pairs.second _pair) cx) (Lists.zip (Lists.map (\_i -> Literals.int32ToBigint _i) (Math.range 0 (Lists.length v0))) v0))
-        Core.TypeSet _ -> any
-        Core.TypeUnion v0 -> Eithers.map (\_props -> common [
-          Model.CommonConstraintXone (Sets.fromList (Lists.map (\_p -> Model.ReferenceAnonymous (node [
-            Model.CommonConstraintProperty (Sets.fromList [
-              Model.ReferenceDefinition _p])])) _props))]) (Eithers.mapList (\_ft -> encodeFieldType tname Nothing _ft cx) v0)
-        Core.TypeUnit -> any
-        Core.TypeVariable v0 -> Right (common [
-          Model.CommonConstraintNode (Sets.fromList [
-            Model.ReferenceNamed (Utils.nameToIri v0)])])
-        _ -> unexpectedE cx "type" "unsupported type variant"
-
--- | Construct an error result with a context and message
-err :: t0 -> String -> Either Errors.Error t1
-err cx msg = Left (Errors.ErrorOther (Errors.OtherError msg))
-
--- | Fold over a list, accumulating results and threading context through each step
-foldAccumResult :: (t0 -> t1 -> Either t2 (t3, t0)) -> t0 -> [t1] -> Either t2 ([t3], t0)
-foldAccumResult f cx xs =
-    Maybes.maybe (Right ([], cx)) (\p -> Eithers.bind (f cx (Pairs.first p)) (\_r -> Eithers.map (\_rest -> (Lists.cons (Pairs.first _r) (Pairs.first _rest), (Pairs.second _rest))) (foldAccumResult f (Pairs.second _r) (Pairs.second p)))) (Lists.uncons xs)
-
--- | Construct a SHACL node shape from a list of common constraints
-node :: [Model.CommonConstraint] -> Model.Shape
-node constraints = Model.ShapeNode (Model.NodeShape {
-  Model.nodeShapeCommon = (common constraints)})
-
--- | Construct a default property shape with the given IRI as its path
-property :: Syntax.Iri -> Model.PropertyShape
-property iri =
-    Model.PropertyShape {
-      Model.propertyShapeCommon = defaultCommonProperties,
-      Model.propertyShapeConstraints = Sets.empty,
-      Model.propertyShapeDefaultValue = Nothing,
-      Model.propertyShapeDescription = (Syntax.LangStrings Maps.empty),
-      Model.propertyShapeName = (Syntax.LangStrings Maps.empty),
-      Model.propertyShapeOrder = Nothing,
-      Model.propertyShapePath = iri}
-
--- | Encode a module's type elements as a SHACL ShapesGraph
-shaclCoder :: Packaging.Module -> t0 -> Graph.Graph -> Either Errors.Error (Model.ShapesGraph, t0)
-shaclCoder mod cx g =
-
-      let typeEls =
-              Maybes.cat (Lists.map (\d -> case d of
-                Packaging.DefinitionType v0 -> Just ((\name -> \typ ->
-                  let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")
-                      dataTerm =
-                              Annotations.normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {
-                                Core.annotatedTermBody = (EncodeCore.type_ typ),
-                                Core.annotatedTermAnnotation = (Maps.fromList [
-                                  (Constants.key_type, schemaTerm)])}))
-                  in Core.Binding {
-                    Core.bindingName = name,
-                    Core.bindingTerm = dataTerm,
-                    Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                      Core.typeSchemeVariables = [],
-                      Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                      Core.typeSchemeConstraints = Nothing}))}) (Packaging.typeDefinitionName v0) (Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)))
-                _ -> Nothing) (Packaging.moduleDefinitions mod))
-          toShape =
-                  \el -> Eithers.bind (Eithers.bimap (\_de -> Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError _de))) (\_t -> _t) (DecodeCore.type_ g (Core.bindingTerm el))) (\_typ -> Eithers.map (\_cp -> Model.Definition {
-                    Model.definitionIri = (elementIri el),
-                    Model.definitionTarget = (Model.ShapeNode (Model.NodeShape {
-                      Model.nodeShapeCommon = _cp}))}) (encodeType (Core.bindingName el) _typ cx))
-      in (Eithers.map (\_shapes -> (Model.ShapesGraph (Sets.fromList _shapes), cx)) (Eithers.mapList toShape typeEls))
-
--- | Construct an error for unexpected input, given expected and found descriptions
-unexpectedE :: t0 -> String -> String -> Either Errors.Error t1
-unexpectedE cx expected found =
-    err cx (Strings.cat [
-      "Expected ",
-      expected,
-      ", found: ",
-      found])
-
--- | Add an rdf:type triple to an RDF Description
-withType :: Core.Name -> Syntax.Description -> Syntax.Description
-withType name desc =
-
-      let subj = Syntax.descriptionSubject desc
-          triples = Syntax.unGraph (Syntax.descriptionGraph desc)
-          subjRes =
-                  case subj of
-                    Syntax.NodeIri v0 -> Syntax.ResourceIri v0
-                    Syntax.NodeBnode v0 -> Syntax.ResourceBnode v0
-          triple =
-                  Syntax.Triple {
-                    Syntax.tripleSubject = subjRes,
-                    Syntax.triplePredicate = (Utils.rdfIri "type"),
-                    Syntax.tripleObject = (Syntax.NodeIri (Utils.nameToIri name))}
-      in Syntax.Description {
-        Syntax.descriptionSubject = subj,
-        Syntax.descriptionGraph = (Syntax.Graph (Sets.insert triple triples))}
diff --git a/src/main/haskell/Hydra/Shacl/Language.hs b/src/main/haskell/Hydra/Shacl/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Shacl/Language.hs
+++ /dev/null
@@ -1,66 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for W3C SHACL
-
-module Hydra.Shacl.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Language constraints for W3C SHACL
-shaclLanguage :: Coders.Language
-shaclLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.shacl"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants = Sets.empty
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantWrap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantInject]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantWrap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion]
-    typePredicate = \_ -> True
diff --git a/src/main/haskell/Hydra/Shacl/Model.hs b/src/main/haskell/Hydra/Shacl/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Shacl/Model.hs
+++ /dev/null
@@ -1,358 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A SHACL syntax model. See https://www.w3.org/TR/shacl
-
-module Hydra.Shacl.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Rdf.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-
--- | See https://www.w3.org/TR/shacl/#ClosedPatterConstraintComponent
-data Closed =
-  Closed {
-    closedIsClosed :: Bool,
-    closedIgnoredProperties :: (Maybe (S.Set Syntax.Property))}
-  deriving (Eq, Ord, Read, Show)
-
-_Closed = Core.Name "hydra.shacl.model.Closed"
-
-_Closed_isClosed = Core.Name "isClosed"
-
-_Closed_ignoredProperties = Core.Name "ignoredProperties"
-
--- | Any of a number of constraint parameters which can be applied either to node or property shapes
-data CommonConstraint =
-  -- | See https://www.w3.org/TR/shacl/#AndConstraintComponent
-  CommonConstraintAnd (S.Set (Reference Shape)) |
-  -- | See https://www.w3.org/TR/shacl/#ClosedConstraintComponent
-  CommonConstraintClosed Closed |
-  -- | See https://www.w3.org/TR/shacl/#ClassConstraintComponent
-  CommonConstraintClass (S.Set Syntax.RdfsClass) |
-  -- | See https://www.w3.org/TR/shacl/#DatatypeConstraintComponent
-  CommonConstraintDatatype Syntax.Iri |
-  -- | See https://www.w3.org/TR/shacl/#DisjointConstraintComponent
-  CommonConstraintDisjoint (S.Set Syntax.Property) |
-  -- | See https://www.w3.org/TR/shacl/#EqualsConstraintComponent
-  CommonConstraintEquals (S.Set Syntax.Property) |
-  -- | Specifies the condition that at least one value node is equal to the given RDF term. See https://www.w3.org/TR/shacl/#HasValueConstraintComponent
-  CommonConstraintHasValue (S.Set Syntax.Node) |
-  -- | Specifies the condition that each value node is a member of a provided SHACL list. See https://www.w3.org/TR/shacl/#InConstraintComponent
-  CommonConstraintIn [Syntax.Node] |
-  -- | See https://www.w3.org/TR/shacl/#LanguageInConstraintComponent
-  CommonConstraintLanguageIn (S.Set Syntax.LanguageTag) |
-  -- | See https://www.w3.org/TR/shacl/#NodeKindConstraintComponent
-  CommonConstraintNodeKind NodeKind |
-  -- | See https://www.w3.org/TR/shacl/#NodeConstraintComponent
-  CommonConstraintNode (S.Set (Reference NodeShape)) |
-  -- | See https://www.w3.org/TR/shacl/#NotConstraintComponent
-  CommonConstraintNot (S.Set (Reference Shape)) |
-  -- | See https://www.w3.org/TR/shacl/#MaxExclusiveConstraintComponent
-  CommonConstraintMaxExclusive Syntax.Literal |
-  -- | See https://www.w3.org/TR/shacl/#MaxInclusiveConstraintComponent
-  CommonConstraintMaxInclusive Syntax.Literal |
-  -- | See https://www.w3.org/TR/shacl/#MaxLengthConstraintComponent
-  CommonConstraintMaxLength Integer |
-  -- | See https://www.w3.org/TR/shacl/#MinExclusiveConstraintComponent
-  CommonConstraintMinExclusive Syntax.Literal |
-  -- | See https://www.w3.org/TR/shacl/#MinInclusiveConstraintComponent
-  CommonConstraintMinInclusive Syntax.Literal |
-  -- | See https://www.w3.org/TR/shacl/#MinLengthConstraintComponent
-  CommonConstraintMinLength Integer |
-  -- | See https://www.w3.org/TR/shacl/#PatternConstraintComponent
-  CommonConstraintPattern Pattern |
-  -- | See https://www.w3.org/TR/shacl/#PropertyConstraintComponent
-  CommonConstraintProperty (S.Set (Reference PropertyShape)) |
-  -- | See https://www.w3.org/TR/shacl/#OrConstraintComponent
-  CommonConstraintOr (S.Set (Reference Shape)) |
-  -- | See https://www.w3.org/TR/shacl/#XoneConstraintComponent
-  CommonConstraintXone (S.Set (Reference Shape))
-  deriving (Eq, Ord, Read, Show)
-
-_CommonConstraint = Core.Name "hydra.shacl.model.CommonConstraint"
-
-_CommonConstraint_and = Core.Name "and"
-
-_CommonConstraint_closed = Core.Name "closed"
-
-_CommonConstraint_class = Core.Name "class"
-
-_CommonConstraint_datatype = Core.Name "datatype"
-
-_CommonConstraint_disjoint = Core.Name "disjoint"
-
-_CommonConstraint_equals = Core.Name "equals"
-
-_CommonConstraint_hasValue = Core.Name "hasValue"
-
-_CommonConstraint_in = Core.Name "in"
-
-_CommonConstraint_languageIn = Core.Name "languageIn"
-
-_CommonConstraint_nodeKind = Core.Name "nodeKind"
-
-_CommonConstraint_node = Core.Name "node"
-
-_CommonConstraint_not = Core.Name "not"
-
-_CommonConstraint_maxExclusive = Core.Name "maxExclusive"
-
-_CommonConstraint_maxInclusive = Core.Name "maxInclusive"
-
-_CommonConstraint_maxLength = Core.Name "maxLength"
-
-_CommonConstraint_minExclusive = Core.Name "minExclusive"
-
-_CommonConstraint_minInclusive = Core.Name "minInclusive"
-
-_CommonConstraint_minLength = Core.Name "minLength"
-
-_CommonConstraint_pattern = Core.Name "pattern"
-
-_CommonConstraint_property = Core.Name "property"
-
-_CommonConstraint_or = Core.Name "or"
-
-_CommonConstraint_xone = Core.Name "xone"
-
--- | Common constraint parameters and other properties for SHACL shapes
-data CommonProperties =
-  CommonProperties {
-    -- | Common constraint parameters attached to this shape
-    commonPropertiesConstraints :: (S.Set CommonConstraint),
-    -- | See https://www.w3.org/TR/shacl/#deactivated
-    commonPropertiesDeactivated :: (Maybe Bool),
-    -- | See https://www.w3.org/TR/shacl/#message
-    commonPropertiesMessage :: Syntax.LangStrings,
-    -- | See https://www.w3.org/TR/shacl/#severity
-    commonPropertiesSeverity :: Severity,
-    -- | See https://www.w3.org/TR/shacl/#targetClass
-    commonPropertiesTargetClass :: (S.Set Syntax.RdfsClass),
-    -- | See https://www.w3.org/TR/shacl/#targetNode
-    commonPropertiesTargetNode :: (S.Set Syntax.IriOrLiteral),
-    -- | See https://www.w3.org/TR/shacl/#targetObjectsOf
-    commonPropertiesTargetObjectsOf :: (S.Set Syntax.Property),
-    -- | See https://www.w3.org/TR/shacl/#targetSubjectsOf
-    commonPropertiesTargetSubjectsOf :: (S.Set Syntax.Property)}
-  deriving (Eq, Ord, Read, Show)
-
-_CommonProperties = Core.Name "hydra.shacl.model.CommonProperties"
-
-_CommonProperties_constraints = Core.Name "constraints"
-
-_CommonProperties_deactivated = Core.Name "deactivated"
-
-_CommonProperties_message = Core.Name "message"
-
-_CommonProperties_severity = Core.Name "severity"
-
-_CommonProperties_targetClass = Core.Name "targetClass"
-
-_CommonProperties_targetNode = Core.Name "targetNode"
-
-_CommonProperties_targetObjectsOf = Core.Name "targetObjectsOf"
-
-_CommonProperties_targetSubjectsOf = Core.Name "targetSubjectsOf"
-
--- | An instance of a type like sh:Shape or sh:NodeShape, together with a unique IRI for that instance
-data Definition a =
-  Definition {
-    definitionIri :: Syntax.Iri,
-    definitionTarget :: a}
-  deriving (Eq, Ord, Read, Show)
-
-_Definition = Core.Name "hydra.shacl.model.Definition"
-
-_Definition_iri = Core.Name "iri"
-
-_Definition_target = Core.Name "target"
-
-data NodeKind =
-  -- | A blank node
-  NodeKindBlankNode  |
-  -- | An IRI
-  NodeKindIri  |
-  -- | A literal
-  NodeKindLiteral  |
-  -- | A blank node or an IRI
-  NodeKindBlankNodeOrIri  |
-  -- | A blank node or a literal
-  NodeKindBlankNodeOrLiteral  |
-  -- | An IRI or a literal
-  NodeKindIriOrLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_NodeKind = Core.Name "hydra.shacl.model.NodeKind"
-
-_NodeKind_blankNode = Core.Name "blankNode"
-
-_NodeKind_iri = Core.Name "iri"
-
-_NodeKind_literal = Core.Name "literal"
-
-_NodeKind_blankNodeOrIri = Core.Name "blankNodeOrIri"
-
-_NodeKind_blankNodeOrLiteral = Core.Name "blankNodeOrLiteral"
-
-_NodeKind_iriOrLiteral = Core.Name "iriOrLiteral"
-
--- | A SHACL node shape. See https://www.w3.org/TR/shacl/#node-shapes
-data NodeShape =
-  NodeShape {
-    nodeShapeCommon :: CommonProperties}
-  deriving (Eq, Ord, Read, Show)
-
-_NodeShape = Core.Name "hydra.shacl.model.NodeShape"
-
-_NodeShape_common = Core.Name "common"
-
--- | A SHACL pattern. See https://www.w3.org/TR/shacl/#PatternConstraintComponent
-data Pattern =
-  Pattern {
-    patternRegex :: String,
-    patternFlags :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Pattern = Core.Name "hydra.shacl.model.Pattern"
-
-_Pattern_regex = Core.Name "regex"
-
-_Pattern_flags = Core.Name "flags"
-
--- | A SHACL property shape. See https://www.w3.org/TR/shacl/#property-shapes
-data PropertyShape =
-  PropertyShape {
-    propertyShapeCommon :: CommonProperties,
-    -- | Any property shape -specific constraint parameters
-    propertyShapeConstraints :: (S.Set PropertyShapeConstraint),
-    -- | See https://www.w3.org/TR/shacl/#defaultValue
-    propertyShapeDefaultValue :: (Maybe Syntax.Node),
-    -- | See https://www.w3.org/TR/shacl/#name
-    propertyShapeDescription :: Syntax.LangStrings,
-    -- | See https://www.w3.org/TR/shacl/#name
-    propertyShapeName :: Syntax.LangStrings,
-    -- | See https://www.w3.org/TR/shacl/#order
-    propertyShapeOrder :: (Maybe Integer),
-    propertyShapePath :: Syntax.Iri}
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyShape = Core.Name "hydra.shacl.model.PropertyShape"
-
-_PropertyShape_common = Core.Name "common"
-
-_PropertyShape_constraints = Core.Name "constraints"
-
-_PropertyShape_defaultValue = Core.Name "defaultValue"
-
-_PropertyShape_description = Core.Name "description"
-
-_PropertyShape_name = Core.Name "name"
-
-_PropertyShape_order = Core.Name "order"
-
-_PropertyShape_path = Core.Name "path"
-
--- | A number of constraint parameters which are specific to property shapes, and cannot be applied to node shapes
-data PropertyShapeConstraint =
-  -- | See https://www.w3.org/TR/shacl/#LessThanConstraintComponent
-  PropertyShapeConstraintLessThan (S.Set Syntax.Property) |
-  -- | See https://www.w3.org/TR/shacl/#LessThanOrEqualsConstraintComponent
-  PropertyShapeConstraintLessThanOrEquals (S.Set Syntax.Property) |
-  -- | The maximum cardinality. Node shapes cannot have any value for sh:maxCount. See https://www.w3.org/TR/shacl/#MaxCountConstraintComponent
-  PropertyShapeConstraintMaxCount Integer |
-  -- | The minimum cardinality. Node shapes cannot have any value for sh:minCount. See https://www.w3.org/TR/shacl/#MinCountConstraintComponent
-  PropertyShapeConstraintMinCount Integer |
-  -- | See https://www.w3.org/TR/shacl/#UniqueLangConstraintComponent
-  PropertyShapeConstraintUniqueLang Bool |
-  -- | See https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent
-  PropertyShapeConstraintQualifiedValueShape QualifiedValueShape
-  deriving (Eq, Ord, Read, Show)
-
-_PropertyShapeConstraint = Core.Name "hydra.shacl.model.PropertyShapeConstraint"
-
-_PropertyShapeConstraint_lessThan = Core.Name "lessThan"
-
-_PropertyShapeConstraint_lessThanOrEquals = Core.Name "lessThanOrEquals"
-
-_PropertyShapeConstraint_maxCount = Core.Name "maxCount"
-
-_PropertyShapeConstraint_minCount = Core.Name "minCount"
-
-_PropertyShapeConstraint_uniqueLang = Core.Name "uniqueLang"
-
-_PropertyShapeConstraint_qualifiedValueShape = Core.Name "qualifiedValueShape"
-
--- | See https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent
-data QualifiedValueShape =
-  QualifiedValueShape {
-    qualifiedValueShapeQualifiedValueShape :: (Reference Shape),
-    qualifiedValueShapeQualifiedMaxCount :: Integer,
-    qualifiedValueShapeQualifiedMinCount :: Integer,
-    qualifiedValueShapeQualifiedValueShapesDisjoint :: (Maybe Bool)}
-  deriving (Eq, Ord, Read, Show)
-
-_QualifiedValueShape = Core.Name "hydra.shacl.model.QualifiedValueShape"
-
-_QualifiedValueShape_qualifiedValueShape = Core.Name "qualifiedValueShape"
-
-_QualifiedValueShape_qualifiedMaxCount = Core.Name "qualifiedMaxCount"
-
-_QualifiedValueShape_qualifiedMinCount = Core.Name "qualifiedMinCount"
-
-_QualifiedValueShape_qualifiedValueShapesDisjoint = Core.Name "qualifiedValueShapesDisjoint"
-
--- | Either an instance of a type like sh:Shape or sh:NodeShape, or an IRI which refers to an instance of that type
-data Reference a =
-  ReferenceNamed Syntax.Iri |
-  -- | An anonymous instance
-  ReferenceAnonymous a |
-  -- | An inline definition
-  ReferenceDefinition (Definition a)
-  deriving (Eq, Ord, Read, Show)
-
-_Reference = Core.Name "hydra.shacl.model.Reference"
-
-_Reference_named = Core.Name "named"
-
-_Reference_anonymous = Core.Name "anonymous"
-
-_Reference_definition = Core.Name "definition"
-
-data Severity =
-  -- | A non-critical constraint violation indicating an informative message
-  SeverityInfo  |
-  -- | A non-critical constraint violation indicating a warning
-  SeverityWarning  |
-  -- | A constraint violation
-  SeverityViolation
-  deriving (Eq, Ord, Read, Show)
-
-_Severity = Core.Name "hydra.shacl.model.Severity"
-
-_Severity_info = Core.Name "info"
-
-_Severity_warning = Core.Name "warning"
-
-_Severity_violation = Core.Name "violation"
-
--- | A SHACL node or property shape. See https://www.w3.org/TR/shacl/#shapes
-data Shape =
-  ShapeNode NodeShape |
-  ShapeProperty PropertyShape
-  deriving (Eq, Ord, Read, Show)
-
-_Shape = Core.Name "hydra.shacl.model.Shape"
-
-_Shape_node = Core.Name "node"
-
-_Shape_property = Core.Name "property"
-
--- | An RDF graph containing zero or more shapes that is passed into a SHACL validation process so that a data graph can be validated against the shapes
-newtype ShapesGraph =
-  ShapesGraph {
-    unShapesGraph :: (S.Set (Definition Shape))}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapesGraph = Core.Name "hydra.shacl.model.ShapesGraph"
diff --git a/src/main/haskell/Hydra/Shex/Syntax.hs b/src/main/haskell/Hydra/Shex/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Shex/Syntax.hs
+++ /dev/null
@@ -1,1613 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A Shex model. Based on the BNF at:
--- |   https://github.com/shexSpec/grammar/blob/master/bnf
-
-module Hydra.Shex.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
-
-data ShexDoc =
-  ShexDoc {
-    shexDocListOfDirective :: [Directive],
-    shexDocSequence :: (Maybe ShexDoc_Sequence_Option),
-    shexDocPrefixDecl :: PrefixDecl}
-  deriving (Eq, Ord, Read, Show)
-
-_ShexDoc = Core.Name "hydra.shex.syntax.ShexDoc"
-
-_ShexDoc_listOfDirective = Core.Name "listOfDirective"
-
-_ShexDoc_Sequence = Core.Name "Sequence"
-
-_ShexDoc_PrefixDecl = Core.Name "PrefixDecl"
-
-data ShexDoc_Sequence_Option =
-  ShexDoc_Sequence_Option {
-    shexDoc_Sequence_OptionAlts :: ShexDoc_Sequence_Option_Alts,
-    shexDoc_Sequence_OptionListOfStatement :: [Statement]}
-  deriving (Eq, Ord, Read, Show)
-
-_ShexDoc_Sequence_Option = Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option"
-
-_ShexDoc_Sequence_Option_alts = Core.Name "alts"
-
-_ShexDoc_Sequence_Option_listOfStatement = Core.Name "listOfStatement"
-
-data ShexDoc_Sequence_Option_Alts =
-  ShexDoc_Sequence_Option_AltsNotStartAction NotStartAction |
-  ShexDoc_Sequence_Option_AltsStartActions StartActions
-  deriving (Eq, Ord, Read, Show)
-
-_ShexDoc_Sequence_Option_Alts = Core.Name "hydra.shex.syntax.ShexDoc_Sequence_Option_Alts"
-
-_ShexDoc_Sequence_Option_Alts_NotStartAction = Core.Name "NotStartAction"
-
-_ShexDoc_Sequence_Option_Alts_StartActions = Core.Name "StartActions"
-
-data Directive =
-  DirectiveBaseDecl BaseDecl |
-  DirectivePrefixDecl PrefixDecl
-  deriving (Eq, Ord, Read, Show)
-
-_Directive = Core.Name "hydra.shex.syntax.Directive"
-
-_Directive_BaseDecl = Core.Name "BaseDecl"
-
-_Directive_PrefixDecl = Core.Name "PrefixDecl"
-
-newtype BaseDecl =
-  BaseDecl {
-    unBaseDecl :: IriRef}
-  deriving (Eq, Ord, Read, Show)
-
-_BaseDecl = Core.Name "hydra.shex.syntax.BaseDecl"
-
-data PrefixDecl =
-  PrefixDecl {
-    prefixDeclPnameNs :: PnameNs,
-    prefixDeclIriRef :: IriRef}
-  deriving (Eq, Ord, Read, Show)
-
-_PrefixDecl = Core.Name "hydra.shex.syntax.PrefixDecl"
-
-_PrefixDecl_PnameNs = Core.Name "PnameNs"
-
-_PrefixDecl_IriRef = Core.Name "IriRef"
-
-data NotStartAction =
-  NotStartActionStart ShapeExpression |
-  NotStartActionShapeExprDecl NotStartAction_ShapeExprDecl
-  deriving (Eq, Ord, Read, Show)
-
-_NotStartAction = Core.Name "hydra.shex.syntax.NotStartAction"
-
-_NotStartAction_start = Core.Name "start"
-
-_NotStartAction_shapeExprDecl = Core.Name "shapeExprDecl"
-
-data NotStartAction_ShapeExprDecl =
-  NotStartAction_ShapeExprDecl {
-    notStartAction_ShapeExprDeclShapeExprLabel :: ShapeExprLabel,
-    notStartAction_ShapeExprDeclAlts :: NotStartAction_ShapeExprDecl_Alts}
-  deriving (Eq, Ord, Read, Show)
-
-_NotStartAction_ShapeExprDecl = Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl"
-
-_NotStartAction_ShapeExprDecl_ShapeExprLabel = Core.Name "ShapeExprLabel"
-
-_NotStartAction_ShapeExprDecl_alts = Core.Name "alts"
-
-data NotStartAction_ShapeExprDecl_Alts =
-  NotStartAction_ShapeExprDecl_AltsShapeExpression ShapeExpression |
-  NotStartAction_ShapeExprDecl_AltsEXTERNAL
-  deriving (Eq, Ord, Read, Show)
-
-_NotStartAction_ShapeExprDecl_Alts = Core.Name "hydra.shex.syntax.NotStartAction_ShapeExprDecl_Alts"
-
-_NotStartAction_ShapeExprDecl_Alts_ShapeExpression = Core.Name "ShapeExpression"
-
-_NotStartAction_ShapeExprDecl_Alts_EXTERNAL = Core.Name "EXTERNAL"
-
-newtype StartActions =
-  StartActions {
-    unStartActions :: [CodeDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_StartActions = Core.Name "hydra.shex.syntax.StartActions"
-
-data Statement =
-  StatementDirective Directive |
-  StatementNotStartAction NotStartAction
-  deriving (Eq, Ord, Read, Show)
-
-_Statement = Core.Name "hydra.shex.syntax.Statement"
-
-_Statement_Directive = Core.Name "Directive"
-
-_Statement_NotStartAction = Core.Name "NotStartAction"
-
-newtype ShapeExpression =
-  ShapeExpression {
-    unShapeExpression :: ShapeOr}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeExpression = Core.Name "hydra.shex.syntax.ShapeExpression"
-
-newtype InlineShapeExpression =
-  InlineShapeExpression {
-    unInlineShapeExpression :: InlineShapeOr}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeExpression = Core.Name "hydra.shex.syntax.InlineShapeExpression"
-
-data ShapeOr =
-  ShapeOr {
-    shapeOrShapeAnd :: ShapeAnd,
-    shapeOrListOfSequence :: [ShapeAnd]}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeOr = Core.Name "hydra.shex.syntax.ShapeOr"
-
-_ShapeOr_ShapeAnd = Core.Name "ShapeAnd"
-
-_ShapeOr_listOfSequence = Core.Name "listOfSequence"
-
-data InlineShapeOr =
-  InlineShapeOr {
-    inlineShapeOrShapeAnd :: ShapeAnd,
-    inlineShapeOrListOfSequence :: [InlineShapeAnd]}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeOr = Core.Name "hydra.shex.syntax.InlineShapeOr"
-
-_InlineShapeOr_ShapeAnd = Core.Name "ShapeAnd"
-
-_InlineShapeOr_listOfSequence = Core.Name "listOfSequence"
-
-data ShapeAnd =
-  ShapeAnd {
-    shapeAndShapeNot :: ShapeNot,
-    shapeAndListOfSequence :: [ShapeNot]}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeAnd = Core.Name "hydra.shex.syntax.ShapeAnd"
-
-_ShapeAnd_ShapeNot = Core.Name "ShapeNot"
-
-_ShapeAnd_listOfSequence = Core.Name "listOfSequence"
-
-data InlineShapeAnd =
-  InlineShapeAnd {
-    inlineShapeAndInlineShapeNot :: InlineShapeNot,
-    inlineShapeAndListOfSequence :: [InlineShapeNot]}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeAnd = Core.Name "hydra.shex.syntax.InlineShapeAnd"
-
-_InlineShapeAnd_InlineShapeNot = Core.Name "InlineShapeNot"
-
-_InlineShapeAnd_listOfSequence = Core.Name "listOfSequence"
-
-data ShapeNot =
-  ShapeNot {
-    shapeNotNOT :: (Maybe ()),
-    shapeNotShapeAtom :: ShapeAtom}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeNot = Core.Name "hydra.shex.syntax.ShapeNot"
-
-_ShapeNot_NOT = Core.Name "NOT"
-
-_ShapeNot_ShapeAtom = Core.Name "ShapeAtom"
-
-data InlineShapeNot =
-  InlineShapeNot {
-    inlineShapeNotNOT :: (Maybe ()),
-    inlineShapeNotInlineShapeAtom :: InlineShapeAtom}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeNot = Core.Name "hydra.shex.syntax.InlineShapeNot"
-
-_InlineShapeNot_NOT = Core.Name "NOT"
-
-_InlineShapeNot_InlineShapeAtom = Core.Name "InlineShapeAtom"
-
-data ShapeAtom =
-  ShapeAtomSequence ShapeAtom_Sequence |
-  ShapeAtomShapeOrRef ShapeOrRef |
-  ShapeAtomSequence2 ShapeExpression |
-  ShapeAtomPeriod
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeAtom = Core.Name "hydra.shex.syntax.ShapeAtom"
-
-_ShapeAtom_sequence = Core.Name "sequence"
-
-_ShapeAtom_ShapeOrRef = Core.Name "ShapeOrRef"
-
-_ShapeAtom_sequence2 = Core.Name "sequence2"
-
-_ShapeAtom_Period = Core.Name "Period"
-
-data ShapeAtom_Sequence =
-  ShapeAtom_Sequence {
-    shapeAtom_SequenceNodeConstraint :: NodeConstraint,
-    shapeAtom_SequenceShapeOrRef :: (Maybe ShapeOrRef)}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeAtom_Sequence = Core.Name "hydra.shex.syntax.ShapeAtom_Sequence"
-
-_ShapeAtom_Sequence_NodeConstraint = Core.Name "NodeConstraint"
-
-_ShapeAtom_Sequence_ShapeOrRef = Core.Name "ShapeOrRef"
-
-data InlineShapeAtom =
-  InlineShapeAtomSequence InlineShapeAtom_Sequence |
-  InlineShapeAtomSequence2 InlineShapeAtom_Sequence2 |
-  InlineShapeAtomSequence3 ShapeExpression |
-  InlineShapeAtomPeriod
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeAtom = Core.Name "hydra.shex.syntax.InlineShapeAtom"
-
-_InlineShapeAtom_sequence = Core.Name "sequence"
-
-_InlineShapeAtom_sequence2 = Core.Name "sequence2"
-
-_InlineShapeAtom_sequence3 = Core.Name "sequence3"
-
-_InlineShapeAtom_Period = Core.Name "Period"
-
-data InlineShapeAtom_Sequence =
-  InlineShapeAtom_Sequence {
-    inlineShapeAtom_SequenceNodeConstraint :: NodeConstraint,
-    inlineShapeAtom_SequenceInlineShapeOrRef :: (Maybe InlineShapeOrRef)}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeAtom_Sequence = Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence"
-
-_InlineShapeAtom_Sequence_NodeConstraint = Core.Name "NodeConstraint"
-
-_InlineShapeAtom_Sequence_InlineShapeOrRef = Core.Name "InlineShapeOrRef"
-
-data InlineShapeAtom_Sequence2 =
-  InlineShapeAtom_Sequence2 {
-    inlineShapeAtom_Sequence2InlineShapeOrRef :: InlineShapeOrRef,
-    inlineShapeAtom_Sequence2NodeConstraint :: (Maybe NodeConstraint)}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeAtom_Sequence2 = Core.Name "hydra.shex.syntax.InlineShapeAtom_Sequence2"
-
-_InlineShapeAtom_Sequence2_InlineShapeOrRef = Core.Name "InlineShapeOrRef"
-
-_InlineShapeAtom_Sequence2_NodeConstraint = Core.Name "NodeConstraint"
-
-data ShapeOrRef =
-  ShapeOrRefShapeDefinition ShapeDefinition |
-  ShapeOrRefAtpNameLn AtpNameLn |
-  ShapeOrRefAtpNameNs AtpNameNs |
-  ShapeOrRefSequence ShapeExprLabel
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeOrRef = Core.Name "hydra.shex.syntax.ShapeOrRef"
-
-_ShapeOrRef_ShapeDefinition = Core.Name "ShapeDefinition"
-
-_ShapeOrRef_AtpNameLn = Core.Name "AtpNameLn"
-
-_ShapeOrRef_AtpNameNs = Core.Name "AtpNameNs"
-
-_ShapeOrRef_sequence = Core.Name "sequence"
-
-data InlineShapeOrRef =
-  InlineShapeOrRefInlineShapeDefinition InlineShapeDefinition |
-  InlineShapeOrRefAtpNameLn AtpNameLn |
-  InlineShapeOrRefAtpNameNs AtpNameNs |
-  InlineShapeOrRefSequence ShapeExprLabel
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeOrRef = Core.Name "hydra.shex.syntax.InlineShapeOrRef"
-
-_InlineShapeOrRef_InlineShapeDefinition = Core.Name "InlineShapeDefinition"
-
-_InlineShapeOrRef_AtpNameLn = Core.Name "AtpNameLn"
-
-_InlineShapeOrRef_AtpNameNs = Core.Name "AtpNameNs"
-
-_InlineShapeOrRef_sequence = Core.Name "sequence"
-
-data NodeConstraint =
-  NodeConstraintSequence [XsFacet] |
-  NodeConstraintSequence2 NodeConstraint_Sequence2 |
-  NodeConstraintSequence3 NodeConstraint_Sequence3 |
-  NodeConstraintSequence4 NodeConstraint_Sequence4 |
-  NodeConstraintSequence5 NodeConstraint_Sequence5 |
-  NodeConstraintListOfXsFacet [XsFacet]
-  deriving (Eq, Ord, Read, Show)
-
-_NodeConstraint = Core.Name "hydra.shex.syntax.NodeConstraint"
-
-_NodeConstraint_sequence = Core.Name "sequence"
-
-_NodeConstraint_sequence2 = Core.Name "sequence2"
-
-_NodeConstraint_sequence3 = Core.Name "sequence3"
-
-_NodeConstraint_sequence4 = Core.Name "sequence4"
-
-_NodeConstraint_sequence5 = Core.Name "sequence5"
-
-_NodeConstraint_listOfXsFacet = Core.Name "listOfXsFacet"
-
-data NodeConstraint_Sequence2 =
-  NodeConstraint_Sequence2 {
-    nodeConstraint_Sequence2NonLiteralKind :: NonLiteralKind,
-    nodeConstraint_Sequence2ListOfStringFacet :: [StringFacet]}
-  deriving (Eq, Ord, Read, Show)
-
-_NodeConstraint_Sequence2 = Core.Name "hydra.shex.syntax.NodeConstraint_Sequence2"
-
-_NodeConstraint_Sequence2_NonLiteralKind = Core.Name "NonLiteralKind"
-
-_NodeConstraint_Sequence2_listOfStringFacet = Core.Name "listOfStringFacet"
-
-data NodeConstraint_Sequence3 =
-  NodeConstraint_Sequence3 {
-    nodeConstraint_Sequence3Datatype :: Datatype,
-    nodeConstraint_Sequence3ListOfXsFacet :: [XsFacet]}
-  deriving (Eq, Ord, Read, Show)
-
-_NodeConstraint_Sequence3 = Core.Name "hydra.shex.syntax.NodeConstraint_Sequence3"
-
-_NodeConstraint_Sequence3_Datatype = Core.Name "Datatype"
-
-_NodeConstraint_Sequence3_listOfXsFacet = Core.Name "listOfXsFacet"
-
-data NodeConstraint_Sequence4 =
-  NodeConstraint_Sequence4 {
-    nodeConstraint_Sequence4ValueSet :: ValueSet,
-    nodeConstraint_Sequence4ListOfXsFacet :: [XsFacet]}
-  deriving (Eq, Ord, Read, Show)
-
-_NodeConstraint_Sequence4 = Core.Name "hydra.shex.syntax.NodeConstraint_Sequence4"
-
-_NodeConstraint_Sequence4_ValueSet = Core.Name "ValueSet"
-
-_NodeConstraint_Sequence4_listOfXsFacet = Core.Name "listOfXsFacet"
-
-data NodeConstraint_Sequence5 =
-  NodeConstraint_Sequence5 {
-    nodeConstraint_Sequence5ValueSet :: ValueSet,
-    nodeConstraint_Sequence5ListOfXsFacet :: [XsFacet]}
-  deriving (Eq, Ord, Read, Show)
-
-_NodeConstraint_Sequence5 = Core.Name "hydra.shex.syntax.NodeConstraint_Sequence5"
-
-_NodeConstraint_Sequence5_ValueSet = Core.Name "ValueSet"
-
-_NodeConstraint_Sequence5_listOfXsFacet = Core.Name "listOfXsFacet"
-
-data NonLiteralKind =
-  NonLiteralKindIRI  |
-  NonLiteralKindBNODE  |
-  NonLiteralKindNONLITERAL
-  deriving (Eq, Ord, Read, Show)
-
-_NonLiteralKind = Core.Name "hydra.shex.syntax.NonLiteralKind"
-
-_NonLiteralKind_IRI = Core.Name "IRI"
-
-_NonLiteralKind_BNODE = Core.Name "BNODE"
-
-_NonLiteralKind_NONLITERAL = Core.Name "NONLITERAL"
-
-data XsFacet =
-  XsFacetStringFacet StringFacet |
-  XsFacetNumericFacet NumericFacet
-  deriving (Eq, Ord, Read, Show)
-
-_XsFacet = Core.Name "hydra.shex.syntax.XsFacet"
-
-_XsFacet_StringFacet = Core.Name "StringFacet"
-
-_XsFacet_NumericFacet = Core.Name "NumericFacet"
-
-data StringFacet =
-  StringFacetSequence StringFacet_Sequence |
-  StringFacetRegexp Regexp
-  deriving (Eq, Ord, Read, Show)
-
-_StringFacet = Core.Name "hydra.shex.syntax.StringFacet"
-
-_StringFacet_sequence = Core.Name "sequence"
-
-_StringFacet_Regexp = Core.Name "Regexp"
-
-data StringFacet_Sequence =
-  StringFacet_Sequence {
-    stringFacet_SequenceStringLength :: StringLength,
-    stringFacet_SequenceInteger :: Integer_}
-  deriving (Eq, Ord, Read, Show)
-
-_StringFacet_Sequence = Core.Name "hydra.shex.syntax.StringFacet_Sequence"
-
-_StringFacet_Sequence_StringLength = Core.Name "StringLength"
-
-_StringFacet_Sequence_Integer = Core.Name "Integer"
-
-data StringLength =
-  StringLengthLENGTH  |
-  StringLengthMINLENGTH  |
-  StringLengthMAXLENGTH
-  deriving (Eq, Ord, Read, Show)
-
-_StringLength = Core.Name "hydra.shex.syntax.StringLength"
-
-_StringLength_LENGTH = Core.Name "LENGTH"
-
-_StringLength_MINLENGTH = Core.Name "MINLENGTH"
-
-_StringLength_MAXLENGTH = Core.Name "MAXLENGTH"
-
-data NumericFacet =
-  NumericFacetSequence NumericFacet_Sequence |
-  NumericFacetSequence2 NumericFacet_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_NumericFacet = Core.Name "hydra.shex.syntax.NumericFacet"
-
-_NumericFacet_sequence = Core.Name "sequence"
-
-_NumericFacet_sequence2 = Core.Name "sequence2"
-
-data NumericFacet_Sequence =
-  NumericFacet_Sequence {
-    numericFacet_SequenceNumericRange :: NumericRange,
-    numericFacet_SequenceNumericLiteral :: NumericLiteral}
-  deriving (Eq, Ord, Read, Show)
-
-_NumericFacet_Sequence = Core.Name "hydra.shex.syntax.NumericFacet_Sequence"
-
-_NumericFacet_Sequence_NumericRange = Core.Name "NumericRange"
-
-_NumericFacet_Sequence_NumericLiteral = Core.Name "NumericLiteral"
-
-data NumericFacet_Sequence2 =
-  NumericFacet_Sequence2 {
-    numericFacet_Sequence2NumericLength :: NumericLength,
-    numericFacet_Sequence2Integer :: Integer_}
-  deriving (Eq, Ord, Read, Show)
-
-_NumericFacet_Sequence2 = Core.Name "hydra.shex.syntax.NumericFacet_Sequence2"
-
-_NumericFacet_Sequence2_NumericLength = Core.Name "NumericLength"
-
-_NumericFacet_Sequence2_Integer = Core.Name "Integer"
-
-data NumericRange =
-  NumericRangeMININCLUSIVE  |
-  NumericRangeMINEXCLUSIVE  |
-  NumericRangeMAXINCLUSIVE  |
-  NumericRangeMAXEXCLUSIVE
-  deriving (Eq, Ord, Read, Show)
-
-_NumericRange = Core.Name "hydra.shex.syntax.NumericRange"
-
-_NumericRange_MININCLUSIVE = Core.Name "MININCLUSIVE"
-
-_NumericRange_MINEXCLUSIVE = Core.Name "MINEXCLUSIVE"
-
-_NumericRange_MAXINCLUSIVE = Core.Name "MAXINCLUSIVE"
-
-_NumericRange_MAXEXCLUSIVE = Core.Name "MAXEXCLUSIVE"
-
-data NumericLength =
-  NumericLengthTOTALDIGITS  |
-  NumericLengthFRACTIONDIGITS
-  deriving (Eq, Ord, Read, Show)
-
-_NumericLength = Core.Name "hydra.shex.syntax.NumericLength"
-
-_NumericLength_TOTALDIGITS = Core.Name "TOTALDIGITS"
-
-_NumericLength_FRACTIONDIGITS = Core.Name "FRACTIONDIGITS"
-
-data ShapeDefinition =
-  ShapeDefinition {
-    shapeDefinitionListOfAlts :: [ShapeDefinition_ListOfAlts_Elmt],
-    shapeDefinitionTripleExpression :: (Maybe TripleExpression),
-    shapeDefinitionListOfAnnotation :: [Annotation],
-    shapeDefinitionSemanticActions :: SemanticActions}
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeDefinition = Core.Name "hydra.shex.syntax.ShapeDefinition"
-
-_ShapeDefinition_listOfAlts = Core.Name "listOfAlts"
-
-_ShapeDefinition_TripleExpression = Core.Name "TripleExpression"
-
-_ShapeDefinition_listOfAnnotation = Core.Name "listOfAnnotation"
-
-_ShapeDefinition_SemanticActions = Core.Name "SemanticActions"
-
-data ShapeDefinition_ListOfAlts_Elmt =
-  ShapeDefinition_ListOfAlts_ElmtIncludeSet IncludeSet |
-  ShapeDefinition_ListOfAlts_ElmtExtraPropertySet ExtraPropertySet |
-  ShapeDefinition_ListOfAlts_ElmtCLOSED
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeDefinition_ListOfAlts_Elmt = Core.Name "hydra.shex.syntax.ShapeDefinition_ListOfAlts_Elmt"
-
-_ShapeDefinition_ListOfAlts_Elmt_IncludeSet = Core.Name "IncludeSet"
-
-_ShapeDefinition_ListOfAlts_Elmt_ExtraPropertySet = Core.Name "ExtraPropertySet"
-
-_ShapeDefinition_ListOfAlts_Elmt_CLOSED = Core.Name "CLOSED"
-
-data InlineShapeDefinition =
-  InlineShapeDefinition {
-    inlineShapeDefinitionListOfAlts :: [InlineShapeDefinition_ListOfAlts_Elmt],
-    inlineShapeDefinitionTripleExpression :: (Maybe TripleExpression)}
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeDefinition = Core.Name "hydra.shex.syntax.InlineShapeDefinition"
-
-_InlineShapeDefinition_listOfAlts = Core.Name "listOfAlts"
-
-_InlineShapeDefinition_TripleExpression = Core.Name "TripleExpression"
-
-data InlineShapeDefinition_ListOfAlts_Elmt =
-  InlineShapeDefinition_ListOfAlts_ElmtIncludeSet IncludeSet |
-  InlineShapeDefinition_ListOfAlts_ElmtExtraPropertySet ExtraPropertySet |
-  InlineShapeDefinition_ListOfAlts_ElmtCLOSED
-  deriving (Eq, Ord, Read, Show)
-
-_InlineShapeDefinition_ListOfAlts_Elmt = Core.Name "hydra.shex.syntax.InlineShapeDefinition_ListOfAlts_Elmt"
-
-_InlineShapeDefinition_ListOfAlts_Elmt_IncludeSet = Core.Name "IncludeSet"
-
-_InlineShapeDefinition_ListOfAlts_Elmt_ExtraPropertySet = Core.Name "ExtraPropertySet"
-
-_InlineShapeDefinition_ListOfAlts_Elmt_CLOSED = Core.Name "CLOSED"
-
-newtype ExtraPropertySet =
-  ExtraPropertySet {
-    unExtraPropertySet :: [Predicate]}
-  deriving (Eq, Ord, Read, Show)
-
-_ExtraPropertySet = Core.Name "hydra.shex.syntax.ExtraPropertySet"
-
-newtype TripleExpression =
-  TripleExpression {
-    unTripleExpression :: OneOfTripleExpr}
-  deriving (Eq, Ord, Read, Show)
-
-_TripleExpression = Core.Name "hydra.shex.syntax.TripleExpression"
-
-data OneOfTripleExpr =
-  OneOfTripleExprGroupTripleExpr GroupTripleExpr |
-  OneOfTripleExprMultiElementOneOf MultiElementOneOf
-  deriving (Eq, Ord, Read, Show)
-
-_OneOfTripleExpr = Core.Name "hydra.shex.syntax.OneOfTripleExpr"
-
-_OneOfTripleExpr_GroupTripleExpr = Core.Name "GroupTripleExpr"
-
-_OneOfTripleExpr_MultiElementOneOf = Core.Name "MultiElementOneOf"
-
-data MultiElementOneOf =
-  MultiElementOneOf {
-    multiElementOneOfGroupTripleExpr :: GroupTripleExpr,
-    multiElementOneOfListOfSequence :: [GroupTripleExpr]}
-  deriving (Eq, Ord, Read, Show)
-
-_MultiElementOneOf = Core.Name "hydra.shex.syntax.MultiElementOneOf"
-
-_MultiElementOneOf_GroupTripleExpr = Core.Name "GroupTripleExpr"
-
-_MultiElementOneOf_listOfSequence = Core.Name "listOfSequence"
-
-data InnerTripleExpr =
-  InnerTripleExprMultiElementGroup MultiElementGroup |
-  InnerTripleExprMultiElementOneOf MultiElementOneOf
-  deriving (Eq, Ord, Read, Show)
-
-_InnerTripleExpr = Core.Name "hydra.shex.syntax.InnerTripleExpr"
-
-_InnerTripleExpr_MultiElementGroup = Core.Name "MultiElementGroup"
-
-_InnerTripleExpr_MultiElementOneOf = Core.Name "MultiElementOneOf"
-
-data GroupTripleExpr =
-  GroupTripleExprSingleElementGroup SingleElementGroup |
-  GroupTripleExprMultiElementGroup MultiElementGroup
-  deriving (Eq, Ord, Read, Show)
-
-_GroupTripleExpr = Core.Name "hydra.shex.syntax.GroupTripleExpr"
-
-_GroupTripleExpr_SingleElementGroup = Core.Name "SingleElementGroup"
-
-_GroupTripleExpr_MultiElementGroup = Core.Name "MultiElementGroup"
-
-data SingleElementGroup =
-  SingleElementGroup {
-    singleElementGroupUnaryTripleExpr :: UnaryTripleExpr,
-    singleElementGroupSemi :: (Maybe ())}
-  deriving (Eq, Ord, Read, Show)
-
-_SingleElementGroup = Core.Name "hydra.shex.syntax.SingleElementGroup"
-
-_SingleElementGroup_UnaryTripleExpr = Core.Name "UnaryTripleExpr"
-
-_SingleElementGroup_Semi = Core.Name "Semi"
-
-data MultiElementGroup =
-  MultiElementGroup {
-    multiElementGroupUnaryTripleExpr :: UnaryTripleExpr,
-    multiElementGroupListOfSequence :: [UnaryTripleExpr],
-    multiElementGroupSemi :: (Maybe ())}
-  deriving (Eq, Ord, Read, Show)
-
-_MultiElementGroup = Core.Name "hydra.shex.syntax.MultiElementGroup"
-
-_MultiElementGroup_UnaryTripleExpr = Core.Name "UnaryTripleExpr"
-
-_MultiElementGroup_listOfSequence = Core.Name "listOfSequence"
-
-_MultiElementGroup_Semi = Core.Name "Semi"
-
-data UnaryTripleExpr =
-  UnaryTripleExprSequence UnaryTripleExpr_Sequence |
-  UnaryTripleExprInclude Include
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryTripleExpr = Core.Name "hydra.shex.syntax.UnaryTripleExpr"
-
-_UnaryTripleExpr_sequence = Core.Name "sequence"
-
-_UnaryTripleExpr_Include = Core.Name "Include"
-
-data UnaryTripleExpr_Sequence =
-  UnaryTripleExpr_Sequence {
-    unaryTripleExpr_SequenceSequence :: (Maybe TripleExprLabel),
-    unaryTripleExpr_SequenceAlts :: UnaryTripleExpr_Sequence_Alts}
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryTripleExpr_Sequence = Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence"
-
-_UnaryTripleExpr_Sequence_Sequence = Core.Name "Sequence"
-
-_UnaryTripleExpr_Sequence_alts = Core.Name "alts"
-
-data UnaryTripleExpr_Sequence_Alts =
-  UnaryTripleExpr_Sequence_AltsTripleConstraint TripleConstraint |
-  UnaryTripleExpr_Sequence_AltsBracketedTripleExpr BracketedTripleExpr
-  deriving (Eq, Ord, Read, Show)
-
-_UnaryTripleExpr_Sequence_Alts = Core.Name "hydra.shex.syntax.UnaryTripleExpr_Sequence_Alts"
-
-_UnaryTripleExpr_Sequence_Alts_TripleConstraint = Core.Name "TripleConstraint"
-
-_UnaryTripleExpr_Sequence_Alts_BracketedTripleExpr = Core.Name "BracketedTripleExpr"
-
-data BracketedTripleExpr =
-  BracketedTripleExpr {
-    bracketedTripleExprInnerTripleExpr :: InnerTripleExpr,
-    bracketedTripleExprCardinality :: (Maybe Cardinality),
-    bracketedTripleExprListOfAnnotation :: [Annotation],
-    bracketedTripleExprSemanticActions :: SemanticActions}
-  deriving (Eq, Ord, Read, Show)
-
-_BracketedTripleExpr = Core.Name "hydra.shex.syntax.BracketedTripleExpr"
-
-_BracketedTripleExpr_InnerTripleExpr = Core.Name "InnerTripleExpr"
-
-_BracketedTripleExpr_Cardinality = Core.Name "Cardinality"
-
-_BracketedTripleExpr_listOfAnnotation = Core.Name "listOfAnnotation"
-
-_BracketedTripleExpr_SemanticActions = Core.Name "SemanticActions"
-
-data TripleConstraint =
-  TripleConstraint {
-    tripleConstraintSenseFlags :: (Maybe SenseFlags),
-    tripleConstraintPredicate :: Predicate,
-    tripleConstraintInlineShapeExpression :: InlineShapeExpression,
-    tripleConstraintCardinality :: (Maybe Cardinality),
-    tripleConstraintListOfAnnotation :: [Annotation],
-    tripleConstraintSemanticActions :: SemanticActions}
-  deriving (Eq, Ord, Read, Show)
-
-_TripleConstraint = Core.Name "hydra.shex.syntax.TripleConstraint"
-
-_TripleConstraint_SenseFlags = Core.Name "SenseFlags"
-
-_TripleConstraint_Predicate = Core.Name "Predicate"
-
-_TripleConstraint_InlineShapeExpression = Core.Name "InlineShapeExpression"
-
-_TripleConstraint_Cardinality = Core.Name "Cardinality"
-
-_TripleConstraint_listOfAnnotation = Core.Name "listOfAnnotation"
-
-_TripleConstraint_SemanticActions = Core.Name "SemanticActions"
-
-data Cardinality =
-  CardinalityAst  |
-  CardinalityPlus  |
-  CardinalityQuest  |
-  CardinalityRepeatRange RepeatRange
-  deriving (Eq, Ord, Read, Show)
-
-_Cardinality = Core.Name "hydra.shex.syntax.Cardinality"
-
-_Cardinality_Ast = Core.Name "Ast"
-
-_Cardinality_Plus = Core.Name "Plus"
-
-_Cardinality_Quest = Core.Name "Quest"
-
-_Cardinality_RepeatRange = Core.Name "RepeatRange"
-
-newtype SenseFlags =
-  SenseFlags {
-    unSenseFlags :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_SenseFlags = Core.Name "hydra.shex.syntax.SenseFlags"
-
-newtype ValueSet =
-  ValueSet {
-    unValueSet :: [ValueSetValue]}
-  deriving (Eq, Ord, Read, Show)
-
-_ValueSet = Core.Name "hydra.shex.syntax.ValueSet"
-
-data ValueSetValue =
-  ValueSetValueIriRange IriRange |
-  ValueSetValueLiteral Literal
-  deriving (Eq, Ord, Read, Show)
-
-_ValueSetValue = Core.Name "hydra.shex.syntax.ValueSetValue"
-
-_ValueSetValue_IriRange = Core.Name "IriRange"
-
-_ValueSetValue_Literal = Core.Name "Literal"
-
-data IriRange =
-  IriRangeSequence IriRange_Sequence |
-  IriRangeSequence2 [Exclusion]
-  deriving (Eq, Ord, Read, Show)
-
-_IriRange = Core.Name "hydra.shex.syntax.IriRange"
-
-_IriRange_sequence = Core.Name "sequence"
-
-_IriRange_sequence2 = Core.Name "sequence2"
-
-data IriRange_Sequence =
-  IriRange_Sequence {
-    iriRange_SequenceIri :: Iri,
-    iriRange_SequenceSequence :: (Maybe [Exclusion])}
-  deriving (Eq, Ord, Read, Show)
-
-_IriRange_Sequence = Core.Name "hydra.shex.syntax.IriRange_Sequence"
-
-_IriRange_Sequence_Iri = Core.Name "Iri"
-
-_IriRange_Sequence_Sequence = Core.Name "Sequence"
-
-newtype Exclusion =
-  Exclusion {
-    unExclusion :: Iri}
-  deriving (Eq, Ord, Read, Show)
-
-_Exclusion = Core.Name "hydra.shex.syntax.Exclusion"
-
-newtype Include =
-  Include {
-    unInclude :: TripleExprLabel}
-  deriving (Eq, Ord, Read, Show)
-
-_Include = Core.Name "hydra.shex.syntax.Include"
-
-data Annotation =
-  Annotation {
-    annotationPredicate :: Predicate,
-    annotationAlts :: Annotation_Alts}
-  deriving (Eq, Ord, Read, Show)
-
-_Annotation = Core.Name "hydra.shex.syntax.Annotation"
-
-_Annotation_Predicate = Core.Name "Predicate"
-
-_Annotation_alts = Core.Name "alts"
-
-data Annotation_Alts =
-  Annotation_AltsIri Iri |
-  Annotation_AltsLiteral Literal
-  deriving (Eq, Ord, Read, Show)
-
-_Annotation_Alts = Core.Name "hydra.shex.syntax.Annotation_Alts"
-
-_Annotation_Alts_Iri = Core.Name "Iri"
-
-_Annotation_Alts_Literal = Core.Name "Literal"
-
-newtype SemanticActions =
-  SemanticActions {
-    unSemanticActions :: [CodeDecl]}
-  deriving (Eq, Ord, Read, Show)
-
-_SemanticActions = Core.Name "hydra.shex.syntax.SemanticActions"
-
-data CodeDecl =
-  CodeDecl {
-    codeDeclIri :: Iri,
-    codeDeclAlts :: CodeDecl_Alts}
-  deriving (Eq, Ord, Read, Show)
-
-_CodeDecl = Core.Name "hydra.shex.syntax.CodeDecl"
-
-_CodeDecl_Iri = Core.Name "Iri"
-
-_CodeDecl_alts = Core.Name "alts"
-
-data CodeDecl_Alts =
-  CodeDecl_AltsCode Code |
-  CodeDecl_AltsPercnt
-  deriving (Eq, Ord, Read, Show)
-
-_CodeDecl_Alts = Core.Name "hydra.shex.syntax.CodeDecl_Alts"
-
-_CodeDecl_Alts_Code = Core.Name "Code"
-
-_CodeDecl_Alts_Percnt = Core.Name "Percnt"
-
-data Literal =
-  LiteralRdfLiteral RdfLiteral |
-  LiteralNumericLiteral NumericLiteral |
-  LiteralBooleanLiteral BooleanLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_Literal = Core.Name "hydra.shex.syntax.Literal"
-
-_Literal_RdfLiteral = Core.Name "RdfLiteral"
-
-_Literal_NumericLiteral = Core.Name "NumericLiteral"
-
-_Literal_BooleanLiteral = Core.Name "BooleanLiteral"
-
-data Predicate =
-  PredicateIri Iri |
-  PredicateRdfType RdfType
-  deriving (Eq, Ord, Read, Show)
-
-_Predicate = Core.Name "hydra.shex.syntax.Predicate"
-
-_Predicate_Iri = Core.Name "Iri"
-
-_Predicate_RdfType = Core.Name "RdfType"
-
-newtype Datatype =
-  Datatype {
-    unDatatype :: Iri}
-  deriving (Eq, Ord, Read, Show)
-
-_Datatype = Core.Name "hydra.shex.syntax.Datatype"
-
-data ShapeExprLabel =
-  ShapeExprLabelIri Iri |
-  ShapeExprLabelBlankNode BlankNode
-  deriving (Eq, Ord, Read, Show)
-
-_ShapeExprLabel = Core.Name "hydra.shex.syntax.ShapeExprLabel"
-
-_ShapeExprLabel_Iri = Core.Name "Iri"
-
-_ShapeExprLabel_BlankNode = Core.Name "BlankNode"
-
-data TripleExprLabel =
-  TripleExprLabelIri Iri |
-  TripleExprLabelBlankNode BlankNode
-  deriving (Eq, Ord, Read, Show)
-
-_TripleExprLabel = Core.Name "hydra.shex.syntax.TripleExprLabel"
-
-_TripleExprLabel_Iri = Core.Name "Iri"
-
-_TripleExprLabel_BlankNode = Core.Name "BlankNode"
-
-data NumericLiteral =
-  NumericLiteralInteger Integer_ |
-  NumericLiteralDecimal Decimal |
-  NumericLiteralDouble Double_
-  deriving (Eq, Ord, Read, Show)
-
-_NumericLiteral = Core.Name "hydra.shex.syntax.NumericLiteral"
-
-_NumericLiteral_Integer = Core.Name "Integer"
-
-_NumericLiteral_Decimal = Core.Name "Decimal"
-
-_NumericLiteral_Double = Core.Name "Double"
-
-data RdfLiteral =
-  RdfLiteral {
-    rdfLiteralString :: String_,
-    rdfLiteralAlts :: (Maybe RdfLiteral_Alts_Option)}
-  deriving (Eq, Ord, Read, Show)
-
-_RdfLiteral = Core.Name "hydra.shex.syntax.RdfLiteral"
-
-_RdfLiteral_String = Core.Name "String"
-
-_RdfLiteral_Alts = Core.Name "Alts"
-
-data RdfLiteral_Alts_Option =
-  RdfLiteral_Alts_OptionLangTag LangTag |
-  RdfLiteral_Alts_OptionSequence Datatype
-  deriving (Eq, Ord, Read, Show)
-
-_RdfLiteral_Alts_Option = Core.Name "hydra.shex.syntax.RdfLiteral_Alts_Option"
-
-_RdfLiteral_Alts_Option_LangTag = Core.Name "LangTag"
-
-_RdfLiteral_Alts_Option_sequence = Core.Name "sequence"
-
-data BooleanLiteral =
-  BooleanLiteralTrue  |
-  BooleanLiteralFalse
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanLiteral = Core.Name "hydra.shex.syntax.BooleanLiteral"
-
-_BooleanLiteral_True = Core.Name "True"
-
-_BooleanLiteral_False = Core.Name "False"
-
-data String_ =
-  StringStringLiteral1 StringLiteral1 |
-  StringStringLiteralLong1 StringLiteralLong1 |
-  StringStringLiteral2 StringLiteral2 |
-  StringStringLiteralLong2 StringLiteralLong2
-  deriving (Eq, Ord, Read, Show)
-
-_String = Core.Name "hydra.shex.syntax.String"
-
-_String_StringLiteral1 = Core.Name "StringLiteral1"
-
-_String_StringLiteralLong1 = Core.Name "StringLiteralLong1"
-
-_String_StringLiteral2 = Core.Name "StringLiteral2"
-
-_String_StringLiteralLong2 = Core.Name "StringLiteralLong2"
-
-data Iri =
-  IriIriRef IriRef |
-  IriPrefixedName PrefixedName
-  deriving (Eq, Ord, Read, Show)
-
-_Iri = Core.Name "hydra.shex.syntax.Iri"
-
-_Iri_IriRef = Core.Name "IriRef"
-
-_Iri_PrefixedName = Core.Name "PrefixedName"
-
-data PrefixedName =
-  PrefixedNamePnameLn PnameLn |
-  PrefixedNamePnameNs PnameNs
-  deriving (Eq, Ord, Read, Show)
-
-_PrefixedName = Core.Name "hydra.shex.syntax.PrefixedName"
-
-_PrefixedName_PnameLn = Core.Name "PnameLn"
-
-_PrefixedName_PnameNs = Core.Name "PnameNs"
-
-newtype BlankNode =
-  BlankNode {
-    unBlankNode :: BlankNodeLabel}
-  deriving (Eq, Ord, Read, Show)
-
-_BlankNode = Core.Name "hydra.shex.syntax.BlankNode"
-
-newtype IncludeSet =
-  IncludeSet {
-    unIncludeSet :: [ShapeExprLabel]}
-  deriving (Eq, Ord, Read, Show)
-
-_IncludeSet = Core.Name "hydra.shex.syntax.IncludeSet"
-
-newtype Code =
-  Code {
-    unCode :: [Code_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_Code = Core.Name "hydra.shex.syntax.Code"
-
-data Code_Elmt =
-  Code_ElmtRegex String |
-  Code_ElmtSequence String |
-  Code_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_Code_Elmt = Core.Name "hydra.shex.syntax.Code_Elmt"
-
-_Code_Elmt_regex = Core.Name "regex"
-
-_Code_Elmt_sequence = Core.Name "sequence"
-
-_Code_Elmt_Uchar = Core.Name "Uchar"
-
-data RepeatRange =
-  RepeatRange {
-    repeatRangeInteger :: Integer_,
-    repeatRangeSequence :: (Maybe (Maybe (Maybe RepeatRange_Sequence_Option_Option_Option)))}
-  deriving (Eq, Ord, Read, Show)
-
-_RepeatRange = Core.Name "hydra.shex.syntax.RepeatRange"
-
-_RepeatRange_Integer = Core.Name "Integer"
-
-_RepeatRange_Sequence = Core.Name "Sequence"
-
-data RepeatRange_Sequence_Option_Option_Option =
-  RepeatRange_Sequence_Option_Option_OptionInteger Integer_ |
-  RepeatRange_Sequence_Option_Option_OptionAst
-  deriving (Eq, Ord, Read, Show)
-
-_RepeatRange_Sequence_Option_Option_Option = Core.Name "hydra.shex.syntax.RepeatRange_Sequence_Option_Option_Option"
-
-_RepeatRange_Sequence_Option_Option_Option_Integer = Core.Name "Integer"
-
-_RepeatRange_Sequence_Option_Option_Option_Ast = Core.Name "Ast"
-
-newtype RdfType =
-  RdfType {
-    unRdfType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_RdfType = Core.Name "hydra.shex.syntax.RdfType"
-
-newtype IriRef =
-  IriRef {
-    unIriRef :: [IriRef_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_IriRef = Core.Name "hydra.shex.syntax.IriRef"
-
-data IriRef_Elmt =
-  IriRef_ElmtRegex String |
-  IriRef_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_IriRef_Elmt = Core.Name "hydra.shex.syntax.IriRef_Elmt"
-
-_IriRef_Elmt_regex = Core.Name "regex"
-
-_IriRef_Elmt_Uchar = Core.Name "Uchar"
-
-newtype PnameNs =
-  PnameNs {
-    unPnameNs :: (Maybe PnPrefix)}
-  deriving (Eq, Ord, Read, Show)
-
-_PnameNs = Core.Name "hydra.shex.syntax.PnameNs"
-
-data PnameLn =
-  PnameLn {
-    pnameLnPnameNs :: PnameNs,
-    pnameLnPnLocal :: PnLocal}
-  deriving (Eq, Ord, Read, Show)
-
-_PnameLn = Core.Name "hydra.shex.syntax.PnameLn"
-
-_PnameLn_PnameNs = Core.Name "PnameNs"
-
-_PnameLn_PnLocal = Core.Name "PnLocal"
-
-newtype AtpNameNs =
-  AtpNameNs {
-    unAtpNameNs :: (Maybe PnPrefix)}
-  deriving (Eq, Ord, Read, Show)
-
-_AtpNameNs = Core.Name "hydra.shex.syntax.AtpNameNs"
-
-data AtpNameLn =
-  AtpNameLn {
-    atpNameLnPnameNs :: PnameNs,
-    atpNameLnPnLocal :: PnLocal}
-  deriving (Eq, Ord, Read, Show)
-
-_AtpNameLn = Core.Name "hydra.shex.syntax.AtpNameLn"
-
-_AtpNameLn_PnameNs = Core.Name "PnameNs"
-
-_AtpNameLn_PnLocal = Core.Name "PnLocal"
-
-data Regexp =
-  Regexp {
-    regexpListOfAlts :: [Regexp_ListOfAlts_Elmt],
-    regexpListOfRegex :: [String]}
-  deriving (Eq, Ord, Read, Show)
-
-_Regexp = Core.Name "hydra.shex.syntax.Regexp"
-
-_Regexp_listOfAlts = Core.Name "listOfAlts"
-
-_Regexp_listOfRegex = Core.Name "listOfRegex"
-
-data Regexp_ListOfAlts_Elmt =
-  Regexp_ListOfAlts_ElmtRegex String |
-  Regexp_ListOfAlts_ElmtSequence String |
-  Regexp_ListOfAlts_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_Regexp_ListOfAlts_Elmt = Core.Name "hydra.shex.syntax.Regexp_ListOfAlts_Elmt"
-
-_Regexp_ListOfAlts_Elmt_regex = Core.Name "regex"
-
-_Regexp_ListOfAlts_Elmt_sequence = Core.Name "sequence"
-
-_Regexp_ListOfAlts_Elmt_Uchar = Core.Name "Uchar"
-
-data BlankNodeLabel =
-  BlankNodeLabel {
-    blankNodeLabelAlts :: BlankNodeLabel_Alts,
-    blankNodeLabelListOfAlts :: (Maybe [BlankNodeLabel_ListOfAlts_Option_Elmt]),
-    blankNodeLabelPnChars :: PnChars}
-  deriving (Eq, Ord, Read, Show)
-
-_BlankNodeLabel = Core.Name "hydra.shex.syntax.BlankNodeLabel"
-
-_BlankNodeLabel_alts = Core.Name "alts"
-
-_BlankNodeLabel_ListOfAlts = Core.Name "ListOfAlts"
-
-_BlankNodeLabel_PnChars = Core.Name "PnChars"
-
-data BlankNodeLabel_Alts =
-  BlankNodeLabel_AltsPnCharsU PnCharsU |
-  BlankNodeLabel_AltsRegex String
-  deriving (Eq, Ord, Read, Show)
-
-_BlankNodeLabel_Alts = Core.Name "hydra.shex.syntax.BlankNodeLabel_Alts"
-
-_BlankNodeLabel_Alts_PnCharsU = Core.Name "PnCharsU"
-
-_BlankNodeLabel_Alts_regex = Core.Name "regex"
-
-data BlankNodeLabel_ListOfAlts_Option_Elmt =
-  BlankNodeLabel_ListOfAlts_Option_ElmtPnChars PnChars |
-  BlankNodeLabel_ListOfAlts_Option_ElmtPeriod
-  deriving (Eq, Ord, Read, Show)
-
-_BlankNodeLabel_ListOfAlts_Option_Elmt = Core.Name "hydra.shex.syntax.BlankNodeLabel_ListOfAlts_Option_Elmt"
-
-_BlankNodeLabel_ListOfAlts_Option_Elmt_PnChars = Core.Name "PnChars"
-
-_BlankNodeLabel_ListOfAlts_Option_Elmt_Period = Core.Name "Period"
-
-newtype LangTag =
-  LangTag {
-    unLangTag :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_LangTag = Core.Name "hydra.shex.syntax.LangTag"
-
-newtype Integer_ =
-  Integer_ {
-    unInteger :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Integer = Core.Name "hydra.shex.syntax.Integer"
-
-newtype Decimal =
-  Decimal {
-    unDecimal :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Decimal = Core.Name "hydra.shex.syntax.Decimal"
-
-newtype Double_ =
-  Double_ {
-    unDouble :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Double = Core.Name "hydra.shex.syntax.Double"
-
-newtype StringLiteral1 =
-  StringLiteral1 {
-    unStringLiteral1 :: [StringLiteral1_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteral1 = Core.Name "hydra.shex.syntax.StringLiteral1"
-
-data StringLiteral1_Elmt =
-  StringLiteral1_ElmtRegex String |
-  StringLiteral1_ElmtEchar Echar |
-  StringLiteral1_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteral1_Elmt = Core.Name "hydra.shex.syntax.StringLiteral1_Elmt"
-
-_StringLiteral1_Elmt_regex = Core.Name "regex"
-
-_StringLiteral1_Elmt_Echar = Core.Name "Echar"
-
-_StringLiteral1_Elmt_Uchar = Core.Name "Uchar"
-
-newtype StringLiteral2 =
-  StringLiteral2 {
-    unStringLiteral2 :: [StringLiteral2_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteral2 = Core.Name "hydra.shex.syntax.StringLiteral2"
-
-data StringLiteral2_Elmt =
-  StringLiteral2_ElmtRegex String |
-  StringLiteral2_ElmtEchar Echar |
-  StringLiteral2_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteral2_Elmt = Core.Name "hydra.shex.syntax.StringLiteral2_Elmt"
-
-_StringLiteral2_Elmt_regex = Core.Name "regex"
-
-_StringLiteral2_Elmt_Echar = Core.Name "Echar"
-
-_StringLiteral2_Elmt_Uchar = Core.Name "Uchar"
-
-newtype StringLiteralLong1 =
-  StringLiteralLong1 {
-    unStringLiteralLong1 :: [StringLiteralLong1_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong1 = Core.Name "hydra.shex.syntax.StringLiteralLong1"
-
-data StringLiteralLong1_Elmt =
-  StringLiteralLong1_ElmtSequence StringLiteralLong1_Elmt_Sequence |
-  StringLiteralLong1_ElmtEchar Echar |
-  StringLiteralLong1_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong1_Elmt = Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt"
-
-_StringLiteralLong1_Elmt_sequence = Core.Name "sequence"
-
-_StringLiteralLong1_Elmt_Echar = Core.Name "Echar"
-
-_StringLiteralLong1_Elmt_Uchar = Core.Name "Uchar"
-
-data StringLiteralLong1_Elmt_Sequence =
-  StringLiteralLong1_Elmt_Sequence {
-    stringLiteralLong1_Elmt_SequenceAlts :: (Maybe StringLiteralLong1_Elmt_Sequence_Alts_Option),
-    stringLiteralLong1_Elmt_SequenceRegex :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong1_Elmt_Sequence = Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence"
-
-_StringLiteralLong1_Elmt_Sequence_Alts = Core.Name "Alts"
-
-_StringLiteralLong1_Elmt_Sequence_regex = Core.Name "regex"
-
-data StringLiteralLong1_Elmt_Sequence_Alts_Option =
-  StringLiteralLong1_Elmt_Sequence_Alts_OptionApos  |
-  StringLiteralLong1_Elmt_Sequence_Alts_OptionSequence StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong1_Elmt_Sequence_Alts_Option =
-    Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option"
-
-_StringLiteralLong1_Elmt_Sequence_Alts_Option_Apos = Core.Name "Apos"
-
-_StringLiteralLong1_Elmt_Sequence_Alts_Option_sequence = Core.Name "sequence"
-
-data StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence =
-  StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence {}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence =
-    Core.Name "hydra.shex.syntax.StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence"
-
-newtype StringLiteralLong2 =
-  StringLiteralLong2 {
-    unStringLiteralLong2 :: [StringLiteralLong2_Elmt]}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong2 = Core.Name "hydra.shex.syntax.StringLiteralLong2"
-
-data StringLiteralLong2_Elmt =
-  StringLiteralLong2_ElmtSequence StringLiteralLong2_Elmt_Sequence |
-  StringLiteralLong2_ElmtEchar Echar |
-  StringLiteralLong2_ElmtUchar Uchar
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong2_Elmt = Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt"
-
-_StringLiteralLong2_Elmt_sequence = Core.Name "sequence"
-
-_StringLiteralLong2_Elmt_Echar = Core.Name "Echar"
-
-_StringLiteralLong2_Elmt_Uchar = Core.Name "Uchar"
-
-data StringLiteralLong2_Elmt_Sequence =
-  StringLiteralLong2_Elmt_Sequence {
-    stringLiteralLong2_Elmt_SequenceAlts :: (Maybe StringLiteralLong2_Elmt_Sequence_Alts_Option),
-    stringLiteralLong2_Elmt_SequenceRegex :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong2_Elmt_Sequence = Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence"
-
-_StringLiteralLong2_Elmt_Sequence_Alts = Core.Name "Alts"
-
-_StringLiteralLong2_Elmt_Sequence_regex = Core.Name "regex"
-
-data StringLiteralLong2_Elmt_Sequence_Alts_Option =
-  StringLiteralLong2_Elmt_Sequence_Alts_OptionQuot  |
-  StringLiteralLong2_Elmt_Sequence_Alts_OptionSequence StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong2_Elmt_Sequence_Alts_Option =
-    Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option"
-
-_StringLiteralLong2_Elmt_Sequence_Alts_Option_Quot = Core.Name "Quot"
-
-_StringLiteralLong2_Elmt_Sequence_Alts_Option_sequence = Core.Name "sequence"
-
-data StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence =
-  StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence {}
-  deriving (Eq, Ord, Read, Show)
-
-_StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence =
-    Core.Name "hydra.shex.syntax.StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence"
-
-data Uchar =
-  UcharSequence Uchar_Sequence |
-  UcharSequence2 Uchar_Sequence2
-  deriving (Eq, Ord, Read, Show)
-
-_Uchar = Core.Name "hydra.shex.syntax.Uchar"
-
-_Uchar_sequence = Core.Name "sequence"
-
-_Uchar_sequence2 = Core.Name "sequence2"
-
-data Uchar_Sequence =
-  Uchar_Sequence {
-    uchar_SequenceHex :: Hex,
-    uchar_SequenceHex2 :: Hex,
-    uchar_SequenceHex3 :: Hex,
-    uchar_SequenceHex4 :: Hex}
-  deriving (Eq, Ord, Read, Show)
-
-_Uchar_Sequence = Core.Name "hydra.shex.syntax.Uchar_Sequence"
-
-_Uchar_Sequence_Hex = Core.Name "Hex"
-
-_Uchar_Sequence_Hex2 = Core.Name "Hex2"
-
-_Uchar_Sequence_Hex3 = Core.Name "Hex3"
-
-_Uchar_Sequence_Hex4 = Core.Name "Hex4"
-
-data Uchar_Sequence2 =
-  Uchar_Sequence2 {
-    uchar_Sequence2Hex :: Hex,
-    uchar_Sequence2Hex2 :: Hex,
-    uchar_Sequence2Hex3 :: Hex,
-    uchar_Sequence2Hex4 :: Hex,
-    uchar_Sequence2Hex5 :: Hex,
-    uchar_Sequence2Hex6 :: Hex,
-    uchar_Sequence2Hex7 :: Hex,
-    uchar_Sequence2Hex8 :: Hex}
-  deriving (Eq, Ord, Read, Show)
-
-_Uchar_Sequence2 = Core.Name "hydra.shex.syntax.Uchar_Sequence2"
-
-_Uchar_Sequence2_Hex = Core.Name "Hex"
-
-_Uchar_Sequence2_Hex2 = Core.Name "Hex2"
-
-_Uchar_Sequence2_Hex3 = Core.Name "Hex3"
-
-_Uchar_Sequence2_Hex4 = Core.Name "Hex4"
-
-_Uchar_Sequence2_Hex5 = Core.Name "Hex5"
-
-_Uchar_Sequence2_Hex6 = Core.Name "Hex6"
-
-_Uchar_Sequence2_Hex7 = Core.Name "Hex7"
-
-_Uchar_Sequence2_Hex8 = Core.Name "Hex8"
-
-newtype Echar =
-  Echar {
-    unEchar :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Echar = Core.Name "hydra.shex.syntax.Echar"
-
-data PnCharsBase =
-  PnCharsBaseRegex String |
-  PnCharsBaseRegex2 String
-  deriving (Eq, Ord, Read, Show)
-
-_PnCharsBase = Core.Name "hydra.shex.syntax.PnCharsBase"
-
-_PnCharsBase_regex = Core.Name "regex"
-
-_PnCharsBase_regex2 = Core.Name "regex2"
-
-data PnCharsU =
-  PnCharsUPnCharsBase PnCharsBase |
-  PnCharsULowbar
-  deriving (Eq, Ord, Read, Show)
-
-_PnCharsU = Core.Name "hydra.shex.syntax.PnCharsU"
-
-_PnCharsU_PnCharsBase = Core.Name "PnCharsBase"
-
-_PnCharsU_Lowbar = Core.Name "Lowbar"
-
-data PnChars =
-  PnCharsPnCharsU PnCharsU |
-  PnCharsMinus  |
-  PnCharsRegex String
-  deriving (Eq, Ord, Read, Show)
-
-_PnChars = Core.Name "hydra.shex.syntax.PnChars"
-
-_PnChars_PnCharsU = Core.Name "PnCharsU"
-
-_PnChars_Minus = Core.Name "Minus"
-
-_PnChars_regex = Core.Name "regex"
-
-data PnPrefix =
-  PnPrefix {
-    pnPrefixPnCharsBase :: PnCharsBase,
-    pnPrefixSequence :: (Maybe PnPrefix_Sequence_Option)}
-  deriving (Eq, Ord, Read, Show)
-
-_PnPrefix = Core.Name "hydra.shex.syntax.PnPrefix"
-
-_PnPrefix_PnCharsBase = Core.Name "PnCharsBase"
-
-_PnPrefix_Sequence = Core.Name "Sequence"
-
-data PnPrefix_Sequence_Option =
-  PnPrefix_Sequence_Option {
-    pnPrefix_Sequence_OptionAlts :: PnPrefix_Sequence_Option_Alts,
-    pnPrefix_Sequence_OptionPnChars :: PnChars}
-  deriving (Eq, Ord, Read, Show)
-
-_PnPrefix_Sequence_Option = Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option"
-
-_PnPrefix_Sequence_Option_alts = Core.Name "alts"
-
-_PnPrefix_Sequence_Option_PnChars = Core.Name "PnChars"
-
-data PnPrefix_Sequence_Option_Alts =
-  PnPrefix_Sequence_Option_AltsPnChars PnChars |
-  PnPrefix_Sequence_Option_AltsPeriod
-  deriving (Eq, Ord, Read, Show)
-
-_PnPrefix_Sequence_Option_Alts = Core.Name "hydra.shex.syntax.PnPrefix_Sequence_Option_Alts"
-
-_PnPrefix_Sequence_Option_Alts_PnChars = Core.Name "PnChars"
-
-_PnPrefix_Sequence_Option_Alts_Period = Core.Name "Period"
-
-data PnLocal =
-  PnLocal {
-    pnLocalAlts :: PnLocal_Alts,
-    pnLocalSequence :: (Maybe PnLocal_Sequence_Option)}
-  deriving (Eq, Ord, Read, Show)
-
-_PnLocal = Core.Name "hydra.shex.syntax.PnLocal"
-
-_PnLocal_alts = Core.Name "alts"
-
-_PnLocal_Sequence = Core.Name "Sequence"
-
-data PnLocal_Alts =
-  PnLocal_AltsPnCharsU PnCharsU |
-  PnLocal_AltsColon  |
-  PnLocal_AltsRegex String |
-  PnLocal_AltsPlx Plx
-  deriving (Eq, Ord, Read, Show)
-
-_PnLocal_Alts = Core.Name "hydra.shex.syntax.PnLocal_Alts"
-
-_PnLocal_Alts_PnCharsU = Core.Name "PnCharsU"
-
-_PnLocal_Alts_Colon = Core.Name "Colon"
-
-_PnLocal_Alts_regex = Core.Name "regex"
-
-_PnLocal_Alts_Plx = Core.Name "Plx"
-
-data PnLocal_Sequence_Option =
-  PnLocal_Sequence_Option {
-    pnLocal_Sequence_OptionListOfAlts :: [PnLocal_Sequence_Option_ListOfAlts_Elmt],
-    pnLocal_Sequence_OptionAlts :: PnLocal_Sequence_Option_Alts}
-  deriving (Eq, Ord, Read, Show)
-
-_PnLocal_Sequence_Option = Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option"
-
-_PnLocal_Sequence_Option_listOfAlts = Core.Name "listOfAlts"
-
-_PnLocal_Sequence_Option_alts = Core.Name "alts"
-
-data PnLocal_Sequence_Option_ListOfAlts_Elmt =
-  PnLocal_Sequence_Option_ListOfAlts_ElmtPnChars PnChars |
-  PnLocal_Sequence_Option_ListOfAlts_ElmtPeriod  |
-  PnLocal_Sequence_Option_ListOfAlts_ElmtColon  |
-  PnLocal_Sequence_Option_ListOfAlts_ElmtPlx Plx
-  deriving (Eq, Ord, Read, Show)
-
-_PnLocal_Sequence_Option_ListOfAlts_Elmt = Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_ListOfAlts_Elmt"
-
-_PnLocal_Sequence_Option_ListOfAlts_Elmt_PnChars = Core.Name "PnChars"
-
-_PnLocal_Sequence_Option_ListOfAlts_Elmt_Period = Core.Name "Period"
-
-_PnLocal_Sequence_Option_ListOfAlts_Elmt_Colon = Core.Name "Colon"
-
-_PnLocal_Sequence_Option_ListOfAlts_Elmt_Plx = Core.Name "Plx"
-
-data PnLocal_Sequence_Option_Alts =
-  PnLocal_Sequence_Option_AltsPnChars PnChars |
-  PnLocal_Sequence_Option_AltsColon  |
-  PnLocal_Sequence_Option_AltsPlx Plx
-  deriving (Eq, Ord, Read, Show)
-
-_PnLocal_Sequence_Option_Alts = Core.Name "hydra.shex.syntax.PnLocal_Sequence_Option_Alts"
-
-_PnLocal_Sequence_Option_Alts_PnChars = Core.Name "PnChars"
-
-_PnLocal_Sequence_Option_Alts_Colon = Core.Name "Colon"
-
-_PnLocal_Sequence_Option_Alts_Plx = Core.Name "Plx"
-
-data Plx =
-  PlxPercent Percent |
-  PlxPnLocalEsc PnLocalEsc
-  deriving (Eq, Ord, Read, Show)
-
-_Plx = Core.Name "hydra.shex.syntax.Plx"
-
-_Plx_Percent = Core.Name "Percent"
-
-_Plx_PnLocalEsc = Core.Name "PnLocalEsc"
-
-data Percent =
-  Percent {
-    percentHex :: Hex,
-    percentHex2 :: Hex}
-  deriving (Eq, Ord, Read, Show)
-
-_Percent = Core.Name "hydra.shex.syntax.Percent"
-
-_Percent_Hex = Core.Name "Hex"
-
-_Percent_Hex2 = Core.Name "Hex2"
-
-newtype Hex =
-  Hex {
-    unHex :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Hex = Core.Name "hydra.shex.syntax.Hex"
-
-newtype PnLocalEsc =
-  PnLocalEsc {
-    unPnLocalEsc :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PnLocalEsc = Core.Name "hydra.shex.syntax.PnLocalEsc"
diff --git a/src/main/haskell/Hydra/Show/Core.hs b/src/main/haskell/Hydra/Show/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Core.hs
+++ /dev/null
@@ -1,472 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.core types
-
-module Hydra.Show.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-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
--- | Show a binding as a string
-binding :: Core.Binding -> String
-binding el =
-
-      let name = Core.unName (Core.bindingName el)
-          t = Core.bindingTerm el
-          typeStr =
-                  Maybes.maybe "" (\ts -> Strings.cat [
-                    ":(",
-                    (typeScheme ts),
-                    ")"]) (Core.bindingTypeScheme el)
-      in (Strings.cat [
-        name,
-        typeStr,
-        " = ",
-        (term t)])
--- | Show a case statement as a string
-caseStatement :: Core.CaseStatement -> String
-caseStatement cs =
-
-      let tname = Core.unName (Core.caseStatementTypeName cs)
-          mdef = Core.caseStatementDefault cs
-          csCases = Core.caseStatementCases cs
-          defaultField =
-                  Maybes.maybe [] (\d -> [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "[default]"),
-                      Core.fieldTerm = d}]) mdef
-          allFields =
-                  Lists.concat [
-                    csCases,
-                    defaultField]
-      in (Strings.cat [
-        "case(",
-        tname,
-        ")",
-        (fields allFields)])
--- | Show an Either value using given functions for left and right
-either :: (t0 -> String) -> (t1 -> String) -> Either t0 t1 -> String
-either showA showB e =
-    Eithers.either (\a -> Strings.cat2 "left(" (Strings.cat2 (showA a) ")")) (\b -> Strings.cat2 "right(" (Strings.cat2 (showB b) ")")) e
-field :: Core.Field -> String
-field field =
-
-      let fname = Core.unName (Core.fieldName field)
-          fterm = Core.fieldTerm field
-      in (Strings.cat [
-        fname,
-        "=",
-        (term fterm)])
-fieldType :: Core.FieldType -> String
-fieldType ft =
-
-      let fname = Core.unName (Core.fieldTypeName ft)
-          ftyp = Core.fieldTypeType ft
-      in (Strings.cat [
-        fname,
-        ":",
-        (type_ ftyp)])
--- | Show a list of fields as a string
-fields :: [Core.Field] -> String
-fields flds =
-
-      let fieldStrs = Lists.map field flds
-      in (Strings.cat [
-        "{",
-        (Strings.intercalate ", " fieldStrs),
-        "}"])
--- | Show a float value as a string
-float :: Core.FloatValue -> String
-float fv =
-    case fv of
-      Core.FloatValueBigfloat v0 -> Strings.cat2 (Literals.showBigfloat v0) ":bigfloat"
-      Core.FloatValueFloat32 v0 -> Strings.cat2 (Literals.showFloat32 v0) ":float32"
-      Core.FloatValueFloat64 v0 -> Strings.cat2 (Literals.showFloat64 v0) ":float64"
--- | Show a float type as a string
-floatType :: Core.FloatType -> String
-floatType ft =
-    case ft of
-      Core.FloatTypeBigfloat -> "bigfloat"
-      Core.FloatTypeFloat32 -> "float32"
-      Core.FloatTypeFloat64 -> "float64"
--- | Show an injection as a string
-injection :: Core.Injection -> String
-injection inj =
-
-      let tname = Core.injectionTypeName inj
-          f = Core.injectionField inj
-      in (Strings.cat [
-        "inject(",
-        (Core.unName tname),
-        ")",
-        (fields [
-          f])])
--- | Show an integer value as a string
-integer :: Core.IntegerValue -> String
-integer iv =
-    case iv of
-      Core.IntegerValueBigint v0 -> Strings.cat2 (Literals.showBigint v0) ":bigint"
-      Core.IntegerValueInt8 v0 -> Strings.cat2 (Literals.showInt8 v0) ":int8"
-      Core.IntegerValueInt16 v0 -> Strings.cat2 (Literals.showInt16 v0) ":int16"
-      Core.IntegerValueInt32 v0 -> Strings.cat2 (Literals.showInt32 v0) ":int32"
-      Core.IntegerValueInt64 v0 -> Strings.cat2 (Literals.showInt64 v0) ":int64"
-      Core.IntegerValueUint8 v0 -> Strings.cat2 (Literals.showUint8 v0) ":uint8"
-      Core.IntegerValueUint16 v0 -> Strings.cat2 (Literals.showUint16 v0) ":uint16"
-      Core.IntegerValueUint32 v0 -> Strings.cat2 (Literals.showUint32 v0) ":uint32"
-      Core.IntegerValueUint64 v0 -> Strings.cat2 (Literals.showUint64 v0) ":uint64"
--- | Show an integer type as a string
-integerType :: Core.IntegerType -> String
-integerType it =
-    case it of
-      Core.IntegerTypeBigint -> "bigint"
-      Core.IntegerTypeInt8 -> "int8"
-      Core.IntegerTypeInt16 -> "int16"
-      Core.IntegerTypeInt32 -> "int32"
-      Core.IntegerTypeInt64 -> "int64"
-      Core.IntegerTypeUint8 -> "uint8"
-      Core.IntegerTypeUint16 -> "uint16"
-      Core.IntegerTypeUint32 -> "uint32"
-      Core.IntegerTypeUint64 -> "uint64"
--- | Show a lambda as a string
-lambda :: Core.Lambda -> String
-lambda l =
-
-      let v = Core.unName (Core.lambdaParameter l)
-          mt = Core.lambdaDomain l
-          body = Core.lambdaBody l
-          typeStr = Maybes.maybe "" (\t -> Strings.cat2 ":" (type_ t)) mt
-      in (Strings.cat [
-        "\955",
-        v,
-        typeStr,
-        ".",
-        (term body)])
--- | Show a let expression as a string
-let_ :: Core.Let -> String
-let_ l =
-
-      let bindings = Core.letBindings l
-          env = Core.letBody l
-          bindingStrs = Lists.map binding bindings
-      in (Strings.cat [
-        "let ",
-        (Strings.intercalate ", " bindingStrs),
-        " in ",
-        (term env)])
--- | Show a list using a given function to show each element
-list :: (t0 -> String) -> [t0] -> String
-list f xs =
-
-      let elementStrs = Lists.map f xs
-      in (Strings.cat [
-        "[",
-        (Strings.intercalate ", " elementStrs),
-        "]"])
--- | Show a literal as a string
-literal :: Core.Literal -> String
-literal l =
-    case l of
-      Core.LiteralBinary _ -> "[binary]"
-      Core.LiteralBoolean v0 -> Logic.ifElse v0 "true" "false"
-      Core.LiteralDecimal v0 -> Literals.showDecimal v0
-      Core.LiteralFloat v0 -> float v0
-      Core.LiteralInteger v0 -> integer v0
-      Core.LiteralString v0 -> Literals.showString v0
--- | Show a literal type as a string
-literalType :: Core.LiteralType -> String
-literalType lt =
-    case lt of
-      Core.LiteralTypeBinary -> "binary"
-      Core.LiteralTypeBoolean -> "boolean"
-      Core.LiteralTypeDecimal -> "decimal"
-      Core.LiteralTypeFloat v0 -> floatType v0
-      Core.LiteralTypeInteger v0 -> integerType v0
-      Core.LiteralTypeString -> "string"
--- | Show a map using given functions to show keys and values
-map :: Ord t0 => ((t0 -> String) -> (t1 -> String) -> M.Map t0 t1 -> String)
-map showK showV m =
-
-      let pairStrs =
-              Lists.map (\p -> Strings.cat [
-                showK (Pairs.first p),
-                ": ",
-                (showV (Pairs.second p))]) (Maps.toList m)
-      in (Strings.cat [
-        "{",
-        (Strings.intercalate ", " pairStrs),
-        "}"])
--- | Show a Maybe value using a given function to show the element
-maybe :: (t0 -> String) -> Maybe t0 -> String
-maybe f mx = Maybes.maybe "nothing" (\x -> Strings.cat2 "just(" (Strings.cat2 (f x) ")")) mx
--- | Show a pair using given functions to show each element
-pair :: (t0 -> String) -> (t1 -> String) -> (t0, t1) -> String
-pair showA showB p =
-    Strings.cat [
-      "(",
-      (showA (Pairs.first p)),
-      ", ",
-      (showB (Pairs.second p)),
-      ")"]
--- | Show a projection as a string
-projection :: Core.Projection -> String
-projection proj =
-
-      let tname = Core.unName (Core.projectionTypeName proj)
-          fname = Core.unName (Core.projectionField proj)
-      in (Strings.cat [
-        "project(",
-        tname,
-        "){",
-        fname,
-        "}"])
--- | A placeholder for reading terms from their serialized form. Not implemented.
-readTerm :: String -> Maybe Core.Term
-readTerm s = Just (Core.TermLiteral (Core.LiteralString s))
--- | Show a set using a given function to show each element
-set :: Ord t0 => ((t0 -> String) -> S.Set t0 -> String)
-set f xs =
-
-      let elementStrs = Lists.map f (Sets.toList xs)
-      in (Strings.cat [
-        "{",
-        (Strings.intercalate ", " elementStrs),
-        "}"])
--- | Show a term as a string
-term :: Core.Term -> String
-term t =
-
-      let gatherTerms =
-              \prev -> \app ->
-                let lhs = Core.applicationFunction app
-                    rhs = Core.applicationArgument app
-                in case lhs of
-                  Core.TermApplication v0 -> gatherTerms (Lists.cons rhs prev) v0
-                  _ -> Lists.cons lhs (Lists.cons rhs prev)
-      in case t of
-        Core.TermAnnotated v0 -> term (Core.annotatedTermBody v0)
-        Core.TermApplication v0 ->
-          let terms = gatherTerms [] v0
-              termStrs = Lists.map term terms
-          in (Strings.cat [
-            "(",
-            (Strings.intercalate " @ " termStrs),
-            ")"])
-        Core.TermCases v0 -> caseStatement v0
-        Core.TermEither v0 -> Eithers.either (\l -> Strings.cat [
-          "left(",
-          (term l),
-          ")"]) (\r -> Strings.cat [
-          "right(",
-          (term r),
-          ")"]) v0
-        Core.TermLambda v0 -> lambda v0
-        Core.TermLet v0 -> let_ v0
-        Core.TermList v0 ->
-          let termStrs = Lists.map term v0
-          in (Strings.cat [
-            "[",
-            (Strings.intercalate ", " termStrs),
-            "]"])
-        Core.TermLiteral v0 -> literal v0
-        Core.TermMap v0 ->
-          let entry =
-                  \p -> Strings.cat [
-                    term (Pairs.first p),
-                    "=",
-                    (term (Pairs.second p))]
-          in (Strings.cat [
-            "{",
-            (Strings.intercalate ", " (Lists.map entry (Maps.toList v0))),
-            "}"])
-        Core.TermMaybe v0 -> Maybes.maybe "nothing" (\t2 -> Strings.cat [
-          "just(",
-          (term t2),
-          ")"]) v0
-        Core.TermPair v0 -> Strings.cat [
-          "(",
-          (term (Pairs.first v0)),
-          ", ",
-          (term (Pairs.second v0)),
-          ")"]
-        Core.TermProject v0 -> projection v0
-        Core.TermRecord v0 ->
-          let tname = Core.unName (Core.recordTypeName v0)
-              flds = Core.recordFields v0
-          in (Strings.cat [
-            "record(",
-            tname,
-            ")",
-            (fields flds)])
-        Core.TermSet v0 -> Strings.cat [
-          "{",
-          (Strings.intercalate ", " (Lists.map term (Sets.toList v0))),
-          "}"]
-        Core.TermTypeLambda v0 ->
-          let param = Core.unName (Core.typeLambdaParameter v0)
-              body = Core.typeLambdaBody v0
-          in (Strings.cat [
-            "\923",
-            param,
-            ".",
-            (term body)])
-        Core.TermTypeApplication v0 ->
-          let t2 = Core.typeApplicationTermBody v0
-              typ = Core.typeApplicationTermType v0
-          in (Strings.cat [
-            term t2,
-            "\10216",
-            (type_ typ),
-            "\10217"])
-        Core.TermInject v0 -> injection v0
-        Core.TermUnit -> "unit"
-        Core.TermUnwrap v0 -> Strings.cat [
-          "unwrap(",
-          (Core.unName v0),
-          ")"]
-        Core.TermVariable v0 -> Core.unName v0
-        Core.TermWrap v0 ->
-          let tname = Core.unName (Core.wrappedTermTypeName v0)
-              term1 = Core.wrappedTermBody v0
-          in (Strings.cat [
-            "wrap(",
-            tname,
-            "){",
-            (term term1),
-            "}"])
--- | Show a type as a string
-type_ :: Core.Type -> String
-type_ typ =
-
-      let showRowType =
-              \flds ->
-                let fieldStrs = Lists.map fieldType flds
-                in (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " fieldStrs),
-                  "}"])
-          gatherTypes =
-                  \prev -> \app ->
-                    let lhs = Core.applicationTypeFunction app
-                        rhs = Core.applicationTypeArgument app
-                    in case lhs of
-                      Core.TypeApplication v0 -> gatherTypes (Lists.cons rhs prev) v0
-                      _ -> Lists.cons lhs (Lists.cons rhs prev)
-          gatherFunctionTypes =
-                  \prev -> \t -> case t of
-                    Core.TypeFunction v0 ->
-                      let dom = Core.functionTypeDomain v0
-                          cod = Core.functionTypeCodomain v0
-                      in (gatherFunctionTypes (Lists.cons dom prev) cod)
-                    _ -> Lists.reverse (Lists.cons t prev)
-      in case typ of
-        Core.TypeAnnotated v0 -> type_ (Core.annotatedTypeBody v0)
-        Core.TypeApplication v0 ->
-          let types = gatherTypes [] v0
-              typeStrs = Lists.map type_ types
-          in (Strings.cat [
-            "(",
-            (Strings.intercalate " @ " typeStrs),
-            ")"])
-        Core.TypeEither v0 ->
-          let leftTyp = Core.eitherTypeLeft v0
-              rightTyp = Core.eitherTypeRight v0
-          in (Strings.cat [
-            "either<",
-            (type_ leftTyp),
-            ", ",
-            (type_ rightTyp),
-            ">"])
-        Core.TypeForall v0 ->
-          let var = Core.unName (Core.forallTypeParameter v0)
-              body = Core.forallTypeBody v0
-          in (Strings.cat [
-            "(\8704",
-            var,
-            ".",
-            (type_ body),
-            ")"])
-        Core.TypeFunction _ ->
-          let types = gatherFunctionTypes [] typ
-              typeStrs = Lists.map type_ types
-          in (Strings.cat [
-            "(",
-            (Strings.intercalate " \8594 " typeStrs),
-            ")"])
-        Core.TypeList v0 -> Strings.cat [
-          "list<",
-          (type_ v0),
-          ">"]
-        Core.TypeLiteral v0 -> literalType v0
-        Core.TypeMap v0 ->
-          let keyTyp = Core.mapTypeKeys v0
-              valTyp = Core.mapTypeValues v0
-          in (Strings.cat [
-            "map<",
-            (type_ keyTyp),
-            ", ",
-            (type_ valTyp),
-            ">"])
-        Core.TypeMaybe v0 -> Strings.cat [
-          "maybe<",
-          (type_ v0),
-          ">"]
-        Core.TypePair v0 ->
-          let firstTyp = Core.pairTypeFirst v0
-              secondTyp = Core.pairTypeSecond v0
-          in (Strings.cat [
-            "(",
-            (type_ firstTyp),
-            ", ",
-            (type_ secondTyp),
-            ")"])
-        Core.TypeRecord v0 -> Strings.cat2 "record" (showRowType v0)
-        Core.TypeSet v0 -> Strings.cat [
-          "set<",
-          (type_ v0),
-          ">"]
-        Core.TypeUnion v0 -> Strings.cat2 "union" (showRowType v0)
-        Core.TypeUnit -> "unit"
-        Core.TypeVariable v0 -> Core.unName v0
-        Core.TypeVoid -> "void"
-        Core.TypeWrap v0 -> Strings.cat [
-          "wrap(",
-          (type_ v0),
-          ")"]
--- | Show a type scheme as a string
-typeScheme :: Core.TypeScheme -> String
-typeScheme ts =
-
-      let vars = Core.typeSchemeVariables ts
-          body = Core.typeSchemeBody ts
-          varNames = Lists.map Core.unName vars
-          fa =
-                  Logic.ifElse (Lists.null vars) "" (Strings.cat [
-                    "forall ",
-                    (Strings.intercalate "," varNames),
-                    ". "])
-          toConstraintPair =
-                  \v -> \c -> Strings.cat [
-                    Core.unName c,
-                    " ",
-                    (Core.unName v)]
-          toConstraintPairs =
-                  \p -> Lists.map (toConstraintPair (Pairs.first p)) (Sets.toList (Core.typeVariableMetadataClasses (Pairs.second p)))
-          tc = Maybes.maybe [] (\m -> Lists.concat (Lists.map toConstraintPairs (Maps.toList m))) (Core.typeSchemeConstraints ts)
-      in (Strings.cat [
-        "(",
-        fa,
-        (Logic.ifElse (Lists.null tc) "" (Strings.cat [
-          "(",
-          (Strings.intercalate ", " tc),
-          ") => "])),
-        (type_ body),
-        ")"])
diff --git a/src/main/haskell/Hydra/Show/Error/Core.hs b/src/main/haskell/Hydra/Show/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Error/Core.hs
+++ /dev/null
@@ -1,276 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.error.core types
-
-module Hydra.Show.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Show.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Show a constant condition error as a string
-constantConditionError :: ErrorCore.ConstantConditionError -> String
-constantConditionError e =
-    Strings.cat [
-      "constant condition: ifElse with literal ",
-      (Literals.showBoolean (ErrorCore.constantConditionErrorValue e))]
--- | Show a duplicate binding error as a string
-duplicateBindingError :: ErrorCore.DuplicateBindingError -> String
-duplicateBindingError e =
-    Strings.cat [
-      "duplicate binding: ",
-      (Core.unName (ErrorCore.duplicateBindingErrorName e))]
--- | Show a duplicate field error as a string
-duplicateFieldError :: ErrorCore.DuplicateFieldError -> String
-duplicateFieldError e =
-    Strings.cat [
-      "duplicate field: ",
-      (Core.unName (ErrorCore.duplicateFieldErrorName e))]
--- | Show a duplicate record type field names error as a string
-duplicateRecordTypeFieldNamesError :: ErrorCore.DuplicateRecordTypeFieldNamesError -> String
-duplicateRecordTypeFieldNamesError e =
-    Strings.cat [
-      "duplicate field in record type: ",
-      (Core.unName (ErrorCore.duplicateRecordTypeFieldNamesErrorName e))]
--- | Show a duplicate union type field names error as a string
-duplicateUnionTypeFieldNamesError :: ErrorCore.DuplicateUnionTypeFieldNamesError -> String
-duplicateUnionTypeFieldNamesError e =
-    Strings.cat [
-      "duplicate field in union type: ",
-      (Core.unName (ErrorCore.duplicateUnionTypeFieldNamesErrorName e))]
--- | Show an empty case statement error as a string
-emptyCaseStatementError :: ErrorCore.EmptyCaseStatementError -> String
-emptyCaseStatementError e =
-    Strings.cat [
-      "empty case statement for type: ",
-      (Core.unName (ErrorCore.emptyCaseStatementErrorTypeName e))]
--- | Show an empty let bindings error as a string
-emptyLetBindingsError :: t0 -> String
-emptyLetBindingsError e = "let expression with no bindings"
--- | Show an empty record type error as a string
-emptyRecordTypeError :: t0 -> String
-emptyRecordTypeError e = "record type with no fields (use TypeUnit instead)"
--- | Show an empty term annotation error as a string
-emptyTermAnnotationError :: t0 -> String
-emptyTermAnnotationError e = "term annotation with empty annotation map"
--- | Show an empty type annotation error as a string
-emptyTypeAnnotationError :: t0 -> String
-emptyTypeAnnotationError e = "type annotation with empty annotation map"
--- | Show an empty type name in term error as a string
-emptyTypeNameInTermError :: t0 -> String
-emptyTypeNameInTermError e = "term with empty type name"
--- | Show an empty union type error as a string
-emptyUnionTypeError :: t0 -> String
-emptyUnionTypeError e = "union type with no alternatives (use TypeVoid instead)"
--- | Show an invalid forall parameter name error as a string
-invalidForallParameterNameError :: ErrorCore.InvalidForallParameterNameError -> String
-invalidForallParameterNameError e =
-    Strings.cat [
-      "invalid forall parameter name: ",
-      (Core.unName (ErrorCore.invalidForallParameterNameErrorName e))]
--- | Show an invalid lambda parameter name error as a string
-invalidLambdaParameterNameError :: ErrorCore.InvalidLambdaParameterNameError -> String
-invalidLambdaParameterNameError e =
-    Strings.cat [
-      "invalid lambda parameter name: ",
-      (Core.unName (ErrorCore.invalidLambdaParameterNameErrorName e))]
--- | Show an invalid let binding name error as a string
-invalidLetBindingNameError :: ErrorCore.InvalidLetBindingNameError -> String
-invalidLetBindingNameError e =
-    Strings.cat [
-      "invalid let binding name: ",
-      (Core.unName (ErrorCore.invalidLetBindingNameErrorName e))]
--- | Show an invalid term error as a string
-invalidTermError :: ErrorCore.InvalidTermError -> String
-invalidTermError e =
-    Strings.cat2 "invalid term: " (case e of
-      ErrorCore.InvalidTermErrorConstantCondition v0 -> constantConditionError v0
-      ErrorCore.InvalidTermErrorDuplicateBinding v0 -> duplicateBindingError v0
-      ErrorCore.InvalidTermErrorDuplicateField v0 -> duplicateFieldError v0
-      ErrorCore.InvalidTermErrorEmptyCaseStatement v0 -> emptyCaseStatementError v0
-      ErrorCore.InvalidTermErrorEmptyLetBindings v0 -> emptyLetBindingsError v0
-      ErrorCore.InvalidTermErrorEmptyTermAnnotation v0 -> emptyTermAnnotationError v0
-      ErrorCore.InvalidTermErrorEmptyTypeNameInTerm v0 -> emptyTypeNameInTermError v0
-      ErrorCore.InvalidTermErrorInvalidLambdaParameterName v0 -> invalidLambdaParameterNameError v0
-      ErrorCore.InvalidTermErrorInvalidLetBindingName v0 -> invalidLetBindingNameError v0
-      ErrorCore.InvalidTermErrorInvalidTypeLambdaParameterName v0 -> invalidTypeLambdaParameterNameError v0
-      ErrorCore.InvalidTermErrorNestedTermAnnotation v0 -> nestedTermAnnotationError v0
-      ErrorCore.InvalidTermErrorRedundantWrapUnwrap v0 -> redundantWrapUnwrapError v0
-      ErrorCore.InvalidTermErrorSelfApplication v0 -> selfApplicationError v0
-      ErrorCore.InvalidTermErrorTermVariableShadowing v0 -> termVariableShadowingError v0
-      ErrorCore.InvalidTermErrorTypeVariableShadowingInTypeLambda v0 -> typeVariableShadowingInTypeLambdaError v0
-      ErrorCore.InvalidTermErrorUndefinedTermVariable v0 -> undefinedTermVariableError v0
-      ErrorCore.InvalidTermErrorUndefinedTypeVariableInBindingType v0 -> undefinedTypeVariableInBindingTypeError v0
-      ErrorCore.InvalidTermErrorUndefinedTypeVariableInLambdaDomain v0 -> undefinedTypeVariableInLambdaDomainError v0
-      ErrorCore.InvalidTermErrorUndefinedTypeVariableInTypeApplication v0 -> undefinedTypeVariableInTypeApplicationError v0
-      ErrorCore.InvalidTermErrorUnknownPrimitiveName v0 -> unknownPrimitiveNameError v0
-      ErrorCore.InvalidTermErrorUnnecessaryIdentityApplication v0 -> unnecessaryIdentityApplicationError v0
-      ErrorCore.InvalidTermErrorUntypedTermVariable v0 -> untypedTermVariableError v0)
--- | Show an invalid type error as a string
-invalidTypeError :: ErrorCore.InvalidTypeError -> String
-invalidTypeError e =
-    Strings.cat2 "invalid type: " (case e of
-      ErrorCore.InvalidTypeErrorDuplicateRecordTypeFieldNames v0 -> duplicateRecordTypeFieldNamesError v0
-      ErrorCore.InvalidTypeErrorDuplicateUnionTypeFieldNames v0 -> duplicateUnionTypeFieldNamesError v0
-      ErrorCore.InvalidTypeErrorEmptyRecordType v0 -> emptyRecordTypeError v0
-      ErrorCore.InvalidTypeErrorEmptyTypeAnnotation v0 -> emptyTypeAnnotationError v0
-      ErrorCore.InvalidTypeErrorEmptyUnionType v0 -> emptyUnionTypeError v0
-      ErrorCore.InvalidTypeErrorInvalidForallParameterName v0 -> invalidForallParameterNameError v0
-      ErrorCore.InvalidTypeErrorInvalidTypeSchemeVariableName v0 -> invalidTypeSchemeVariableNameError v0
-      ErrorCore.InvalidTypeErrorNestedTypeAnnotation v0 -> nestedTypeAnnotationError v0
-      ErrorCore.InvalidTypeErrorNonComparableMapKeyType v0 -> nonComparableMapKeyTypeError v0
-      ErrorCore.InvalidTypeErrorNonComparableSetElementType v0 -> nonComparableSetElementTypeError v0
-      ErrorCore.InvalidTypeErrorSingleVariantUnion v0 -> singleVariantUnionError v0
-      ErrorCore.InvalidTypeErrorTypeVariableShadowingInForall v0 -> typeVariableShadowingInForallError v0
-      ErrorCore.InvalidTypeErrorUndefinedTypeVariable v0 -> undefinedTypeVariableError v0
-      ErrorCore.InvalidTypeErrorVoidInNonBottomPosition v0 -> voidInNonBottomPositionError v0)
--- | Show an invalid type lambda parameter name error as a string
-invalidTypeLambdaParameterNameError :: ErrorCore.InvalidTypeLambdaParameterNameError -> String
-invalidTypeLambdaParameterNameError e =
-    Strings.cat [
-      "invalid type lambda parameter name: ",
-      (Core.unName (ErrorCore.invalidTypeLambdaParameterNameErrorName e))]
--- | Show an invalid type scheme variable name error as a string
-invalidTypeSchemeVariableNameError :: ErrorCore.InvalidTypeSchemeVariableNameError -> String
-invalidTypeSchemeVariableNameError e =
-    Strings.cat [
-      "invalid type scheme variable name: ",
-      (Core.unName (ErrorCore.invalidTypeSchemeVariableNameErrorName e))]
--- | Show a nested term annotation error as a string
-nestedTermAnnotationError :: t0 -> String
-nestedTermAnnotationError e = "nested term annotations should be merged"
--- | Show a nested type annotation error as a string
-nestedTypeAnnotationError :: t0 -> String
-nestedTypeAnnotationError e = "nested type annotations should be merged"
--- | Show a non-comparable map key type error as a string
-nonComparableMapKeyTypeError :: ErrorCore.NonComparableMapKeyTypeError -> String
-nonComparableMapKeyTypeError e =
-    Strings.cat [
-      "map key type contains a function type: ",
-      (ShowCore.type_ (ErrorCore.nonComparableMapKeyTypeErrorKeyType e))]
--- | Show a non-comparable set element type error as a string
-nonComparableSetElementTypeError :: ErrorCore.NonComparableSetElementTypeError -> String
-nonComparableSetElementTypeError e =
-    Strings.cat [
-      "set element type contains a function type: ",
-      (ShowCore.type_ (ErrorCore.nonComparableSetElementTypeErrorElementType e))]
--- | Show a redundant wrap/unwrap error as a string
-redundantWrapUnwrapError :: ErrorCore.RedundantWrapUnwrapError -> String
-redundantWrapUnwrapError e =
-    Strings.cat [
-      "redundant wrap/unwrap for type: ",
-      (Core.unName (ErrorCore.redundantWrapUnwrapErrorTypeName e))]
--- | Show a self-application error as a string
-selfApplicationError :: ErrorCore.SelfApplicationError -> String
-selfApplicationError e =
-    Strings.cat [
-      "self-application of variable: ",
-      (Core.unName (ErrorCore.selfApplicationErrorName e))]
--- | Show a single variant union error as a string
-singleVariantUnionError :: ErrorCore.SingleVariantUnionError -> String
-singleVariantUnionError e =
-    Strings.cat [
-      "union type with single variant: ",
-      (Core.unName (ErrorCore.singleVariantUnionErrorFieldName e))]
--- | Show a term variable shadowing error as a string
-termVariableShadowingError :: ErrorCore.TermVariableShadowingError -> String
-termVariableShadowingError e =
-    Strings.cat [
-      "variable shadowing: ",
-      (Core.unName (ErrorCore.termVariableShadowingErrorName e))]
--- | Show a type variable shadowing in forall error as a string
-typeVariableShadowingInForallError :: ErrorCore.TypeVariableShadowingInForallError -> String
-typeVariableShadowingInForallError e =
-    Strings.cat [
-      "type variable shadowing in forall: ",
-      (Core.unName (ErrorCore.typeVariableShadowingInForallErrorName e))]
--- | Show a type variable shadowing in type lambda error as a string
-typeVariableShadowingInTypeLambdaError :: ErrorCore.TypeVariableShadowingInTypeLambdaError -> String
-typeVariableShadowingInTypeLambdaError e =
-    Strings.cat [
-      "type variable shadowing in type lambda: ",
-      (Core.unName (ErrorCore.typeVariableShadowingInTypeLambdaErrorName e))]
--- | Show an undefined field error as a string
-undefinedFieldError :: ErrorCore.UndefinedFieldError -> String
-undefinedFieldError e =
-
-      let fname = ErrorCore.undefinedFieldErrorFieldName e
-          tname = ErrorCore.undefinedFieldErrorTypeName e
-      in (Strings.cat [
-        "no such field \"",
-        (Core.unName fname),
-        "\" in type \"",
-        (Core.unName tname),
-        "\""])
--- | Show an undefined term variable error as a string
-undefinedTermVariableError :: ErrorCore.UndefinedTermVariableError -> String
-undefinedTermVariableError e =
-    Strings.cat [
-      "undefined term variable: ",
-      (Core.unName (ErrorCore.undefinedTermVariableErrorName e))]
--- | Show an undefined type variable error as a string
-undefinedTypeVariableError :: ErrorCore.UndefinedTypeVariableError -> String
-undefinedTypeVariableError e =
-    Strings.cat [
-      "undefined type variable: ",
-      (Core.unName (ErrorCore.undefinedTypeVariableErrorName e))]
--- | Show an undefined type variable in binding type error as a string
-undefinedTypeVariableInBindingTypeError :: ErrorCore.UndefinedTypeVariableInBindingTypeError -> String
-undefinedTypeVariableInBindingTypeError e =
-    Strings.cat [
-      "undefined type variable in binding type: ",
-      (Core.unName (ErrorCore.undefinedTypeVariableInBindingTypeErrorName e))]
--- | Show an undefined type variable in lambda domain error as a string
-undefinedTypeVariableInLambdaDomainError :: ErrorCore.UndefinedTypeVariableInLambdaDomainError -> String
-undefinedTypeVariableInLambdaDomainError e =
-    Strings.cat [
-      "undefined type variable in lambda domain: ",
-      (Core.unName (ErrorCore.undefinedTypeVariableInLambdaDomainErrorName e))]
--- | Show an undefined type variable in type application error as a string
-undefinedTypeVariableInTypeApplicationError :: ErrorCore.UndefinedTypeVariableInTypeApplicationError -> String
-undefinedTypeVariableInTypeApplicationError e =
-    Strings.cat [
-      "undefined type variable in type application: ",
-      (Core.unName (ErrorCore.undefinedTypeVariableInTypeApplicationErrorName e))]
--- | Show an unexpected term variant error as a string
-unexpectedTermVariantError :: ErrorCore.UnexpectedTermVariantError -> String
-unexpectedTermVariantError e =
-
-      let expected = ErrorCore.unexpectedTermVariantErrorExpectedVariant e
-          actual = ErrorCore.unexpectedTermVariantErrorActualTerm e
-      in (Strings.cat [
-        "expected ",
-        (Variants.termVariant expected),
-        " term but found ",
-        (ShowCore.term actual)])
--- | Show an unexpected type variant error as a string
-unexpectedTypeVariantError :: ErrorCore.UnexpectedTypeVariantError -> String
-unexpectedTypeVariantError e =
-
-      let expected = ErrorCore.unexpectedTypeVariantErrorExpectedVariant e
-          actual = ErrorCore.unexpectedTypeVariantErrorActualType e
-      in (Strings.cat [
-        "expected ",
-        (Variants.typeVariant expected),
-        " type but found ",
-        (ShowCore.type_ actual)])
--- | Show an unknown primitive name error as a string
-unknownPrimitiveNameError :: ErrorCore.UnknownPrimitiveNameError -> String
-unknownPrimitiveNameError e =
-    Strings.cat [
-      "unknown primitive: ",
-      (Core.unName (ErrorCore.unknownPrimitiveNameErrorName e))]
--- | Show an unnecessary identity application error as a string
-unnecessaryIdentityApplicationError :: t0 -> String
-unnecessaryIdentityApplicationError e = "unnecessary application of identity lambda"
--- | Show an untyped term variable error as a string
-untypedTermVariableError :: ErrorCore.UntypedTermVariableError -> String
-untypedTermVariableError e =
-    Strings.cat [
-      "untyped term variable: ",
-      (Core.unName (ErrorCore.untypedTermVariableErrorName e))]
--- | Show a void in non-bottom position error as a string
-voidInNonBottomPositionError :: t0 -> String
-voidInNonBottomPositionError e = "TypeVoid in a position where no value can be constructed"
diff --git a/src/main/haskell/Hydra/Show/Errors.hs b/src/main/haskell/Hydra/Show/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Errors.hs
+++ /dev/null
@@ -1,171 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.error types
-
-module Hydra.Show.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Checking as Checking
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Show.Error.Core as ErrorCore
-import qualified Hydra.Show.Typing as Typing
-import qualified Hydra.Show.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Show a checking error as a string
-checkingError :: Checking.CheckingError -> String
-checkingError ce =
-    case ce of
-      Checking.CheckingErrorIncorrectUnification v0 -> incorrectUnificationError v0
-      Checking.CheckingErrorNotAForallType v0 -> notAForallTypeError v0
-      Checking.CheckingErrorNotAFunctionType v0 -> notAFunctionTypeError v0
-      Checking.CheckingErrorTypeArityMismatch v0 -> typeArityMismatchError v0
-      Checking.CheckingErrorTypeMismatch v0 -> typeMismatchError v0
-      Checking.CheckingErrorUnboundTypeVariables v0 -> unboundTypeVariablesError v0
-      Checking.CheckingErrorUnequalTypes v0 -> unequalTypesError v0
-      Checking.CheckingErrorUnsupportedTermVariant v0 -> unsupportedTermVariantError v0
-      Checking.CheckingErrorUntypedLambda v0 -> untypedLambdaError v0
-      Checking.CheckingErrorUntypedLetBinding v0 -> untypedLetBindingError v0
--- | Show a decoding error as a string
-decodingError :: Errors.DecodingError -> String
-decodingError de = Strings.cat2 "decoding error: " (Errors.unDecodingError de)
--- | Show an error as a string
-error :: Errors.Error -> String
-error e =
-    case e of
-      Errors.ErrorChecking v0 -> checkingError v0
-      Errors.ErrorDecoding v0 -> decodingError v0
-      Errors.ErrorDuplicateBinding v0 -> ErrorCore.duplicateBindingError v0
-      Errors.ErrorDuplicateField v0 -> ErrorCore.duplicateFieldError v0
-      Errors.ErrorExtraction _ -> "extraction error"
-      Errors.ErrorInference _ -> "inference error"
-      Errors.ErrorOther v0 -> otherError v0
-      Errors.ErrorResolution v0 -> resolutionError v0
-      Errors.ErrorUndefinedField v0 -> ErrorCore.undefinedFieldError v0
-      Errors.ErrorUndefinedTermVariable v0 -> ErrorCore.undefinedTermVariableError v0
-      Errors.ErrorUntypedTermVariable v0 -> ErrorCore.untypedTermVariableError v0
-      Errors.ErrorUnexpectedTermVariant v0 -> ErrorCore.unexpectedTermVariantError v0
-      Errors.ErrorUnexpectedTypeVariant v0 -> ErrorCore.unexpectedTypeVariantError v0
-      Errors.ErrorUnification v0 -> unificationError v0
--- | Show an incorrect unification error as a string
-incorrectUnificationError :: Checking.IncorrectUnificationError -> String
-incorrectUnificationError e =
-
-      let subst = Checking.incorrectUnificationErrorSubstitution e
-      in (Strings.cat2 "incorrect unification: " (Typing.typeSubst subst))
--- | Show a not-a-forall-type error as a string
-notAForallTypeError :: Checking.NotAForallTypeError -> String
-notAForallTypeError e =
-
-      let typ = Checking.notAForallTypeErrorType e
-          args = Checking.notAForallTypeErrorTypeArguments e
-      in (Strings.cat [
-        "not a forall type: ",
-        (ShowCore.type_ typ),
-        ". Trying to apply ",
-        (Literals.showInt32 (Lists.length args)),
-        " type argument(s): ",
-        (Formatting.showList ShowCore.type_ args)])
--- | Show a not-a-function-type error as a string
-notAFunctionTypeError :: Checking.NotAFunctionTypeError -> String
-notAFunctionTypeError e =
-
-      let typ = Checking.notAFunctionTypeErrorType e
-      in (Strings.cat2 "not a function type: " (ShowCore.type_ typ))
--- | Show an other error as a string
-otherError :: Errors.OtherError -> String
-otherError oe = Errors.unOtherError oe
--- | Show a resolution error as a string, including the offending name or shape
-resolutionError :: Errors.ResolutionError -> String
-resolutionError re =
-    case re of
-      Errors.ResolutionErrorNoSuchBinding v0 -> Strings.cat2 "no such binding: " (Core.unName (Errors.noSuchBindingErrorName v0))
-      Errors.ResolutionErrorNoSuchPrimitive v0 -> Strings.cat2 "no such primitive: " (Core.unName (Errors.noSuchPrimitiveErrorName v0))
-      Errors.ResolutionErrorNoMatchingField v0 -> Strings.cat2 "no matching field: " (Core.unName (Errors.noMatchingFieldErrorFieldName v0))
-      Errors.ResolutionErrorOther v0 -> Strings.cat2 "resolution error: " (Errors.unOtherResolutionError v0)
-      Errors.ResolutionErrorUnexpectedShape v0 -> Strings.cat [
-        "unexpected shape: expected ",
-        (Errors.unexpectedShapeErrorExpected v0),
-        " but got ",
-        (Errors.unexpectedShapeErrorActual v0)]
--- | Show a type arity mismatch error as a string
-typeArityMismatchError :: Checking.TypeArityMismatchError -> String
-typeArityMismatchError e =
-
-      let typ = Checking.typeArityMismatchErrorType e
-          expected = Checking.typeArityMismatchErrorExpectedArity e
-          actual = Checking.typeArityMismatchErrorActualArity e
-          args = Checking.typeArityMismatchErrorTypeArguments e
-      in (Strings.cat [
-        "type ",
-        (ShowCore.type_ typ),
-        " applied to the wrong number of type arguments (expected ",
-        (Literals.showInt32 expected),
-        ", got ",
-        (Literals.showInt32 actual),
-        "): ",
-        (Formatting.showList ShowCore.type_ args)])
--- | Show a type mismatch error as a string
-typeMismatchError :: Checking.TypeMismatchError -> String
-typeMismatchError e =
-
-      let expected = Checking.typeMismatchErrorExpectedType e
-          actual = Checking.typeMismatchErrorActualType e
-      in (Strings.cat [
-        "type mismatch: expected ",
-        (ShowCore.type_ expected),
-        " but found ",
-        (ShowCore.type_ actual)])
--- | Show an unbound type variables error as a string
-unboundTypeVariablesError :: Checking.UnboundTypeVariablesError -> String
-unboundTypeVariablesError e =
-
-      let vars = Checking.unboundTypeVariablesErrorVariables e
-          typ = Checking.unboundTypeVariablesErrorType e
-      in (Strings.cat [
-        "unbound type variables: {",
-        (Strings.intercalate ", " (Lists.map Core.unName (Sets.toList vars))),
-        "} in type ",
-        (ShowCore.type_ typ)])
--- | Show an unequal types error as a string
-unequalTypesError :: Checking.UnequalTypesError -> String
-unequalTypesError e =
-
-      let types = Checking.unequalTypesErrorTypes e
-          desc = Checking.unequalTypesErrorDescription e
-      in (Strings.cat [
-        "unequal types ",
-        (Formatting.showList ShowCore.type_ types),
-        " in ",
-        desc])
--- | Show a unification error as a string
-unificationError :: Errors.UnificationError -> String
-unificationError e =
-
-      let lt = Errors.unificationErrorLeftType e
-          rt = Errors.unificationErrorRightType e
-          msg = Errors.unificationErrorMessage e
-      in (Strings.cat [
-        "unification error: cannot unify ",
-        (ShowCore.type_ lt),
-        " with ",
-        (ShowCore.type_ rt),
-        ": ",
-        msg])
--- | Show an unsupported term variant error as a string
-unsupportedTermVariantError :: Checking.UnsupportedTermVariantError -> String
-unsupportedTermVariantError e =
-    Strings.cat2 "unsupported term variant: " (Variants.termVariant (Checking.unsupportedTermVariantErrorTermVariant e))
--- | Show an untyped lambda error as a string
-untypedLambdaError :: t0 -> String
-untypedLambdaError _ = "untyped lambda"
--- | Show an untyped let binding error as a string
-untypedLetBindingError :: Checking.UntypedLetBindingError -> String
-untypedLetBindingError e =
-
-      let b = Checking.untypedLetBindingErrorBinding e
-      in (Strings.cat2 "untyped let binding: " (ShowCore.binding b))
diff --git a/src/main/haskell/Hydra/Show/Graph.hs b/src/main/haskell/Hydra/Show/Graph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Graph.hs
+++ /dev/null
@@ -1,19 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.graph types
-
-module Hydra.Show.Graph where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Show a list of bindings as a string
-graph :: [Core.Binding] -> String
-graph elements =
-
-      let elementStrs = Lists.map ShowCore.binding elements
-      in (Strings.cat [
-        "{",
-        (Strings.intercalate ", " elementStrs),
-        "}"])
diff --git a/src/main/haskell/Hydra/Show/Paths.hs b/src/main/haskell/Hydra/Show/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Paths.hs
+++ /dev/null
@@ -1,111 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for working with subterm steps and paths.
-
-module Hydra.Show.Paths where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Rewriting as Rewriting
-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 subterm step to a string representation
-subtermStep :: Paths.SubtermStep -> Maybe String
-subtermStep step =
-
-      let idx = \i -> Nothing
-          idxSuff = \suffix -> \i -> Maybes.map (\s -> Strings.cat2 s suffix) (idx i)
-      in case step of
-        Paths.SubtermStepAnnotatedBody -> Nothing
-        Paths.SubtermStepApplicationFunction -> Just "fun"
-        Paths.SubtermStepApplicationArgument -> Just "arg"
-        Paths.SubtermStepLambdaBody -> Just "body"
-        Paths.SubtermStepUnionCasesDefault -> Just "default"
-        Paths.SubtermStepUnionCasesBranch v0 -> Just (Strings.cat2 "." (Core.unName v0))
-        Paths.SubtermStepLetBody -> Just "in"
-        Paths.SubtermStepLetBinding v0 -> Just (Strings.cat2 (Core.unName v0) "=")
-        Paths.SubtermStepListElement v0 -> idx v0
-        Paths.SubtermStepMapKey v0 -> idxSuff ".key" v0
-        Paths.SubtermStepMapValue v0 -> idxSuff ".value" v0
-        Paths.SubtermStepMaybeTerm -> Just "just"
-        Paths.SubtermStepProductTerm v0 -> idx v0
-        Paths.SubtermStepRecordField v0 -> Just (Strings.cat2 "." (Core.unName v0))
-        Paths.SubtermStepSetElement v0 -> idx v0
-        Paths.SubtermStepSumTerm -> Nothing
-        Paths.SubtermStepTypeLambdaBody -> Nothing
-        Paths.SubtermStepTypeApplicationTerm -> Nothing
-        Paths.SubtermStepInjectionTerm -> Nothing
-        Paths.SubtermStepWrappedTerm -> Nothing
--- | Build a subterm graph from a term
-termToSubtermGraph :: M.Map Packaging.Namespace String -> Core.Term -> Paths.SubtermGraph
-termToSubtermGraph namespaces term =
-
-      let dontCareStep = Paths.SubtermStepAnnotatedBody
-          helper =
-                  \ids -> \mroot -> \path -> \state -> \stepTerm ->
-                    let step = Pairs.first stepTerm
-                        currentTerm = Pairs.second stepTerm
-                        nodesEdges = Pairs.first state
-                        visited = Pairs.second state
-                        nodes = Pairs.first nodesEdges
-                        edges = Pairs.second nodesEdges
-                        nextPath = Lists.cons step path
-                    in case currentTerm of
-                      Core.TermLet v0 ->
-                        let bindings = Core.letBindings v0
-                            env = Core.letBody v0
-                            bindingNames = Lists.map Core.bindingName bindings
-                            addBindingName =
-                                    \nodesVisitedIds -> \name ->
-                                      let currentNodesVisited = Pairs.first nodesVisitedIds
-                                          currentIds = Pairs.second nodesVisitedIds
-                                          currentNodes = Pairs.first currentNodesVisited
-                                          currentVisited = Pairs.second currentNodesVisited
-                                          rawLabel = Names.compactName namespaces name
-                                          uniqueLabel = Names.uniqueLabel currentVisited rawLabel
-                                          node =
-                                                  Paths.SubtermNode {
-                                                    Paths.subtermNodeName = name,
-                                                    Paths.subtermNodeLabel = rawLabel,
-                                                    Paths.subtermNodeId = uniqueLabel}
-                                          newVisited = Sets.insert uniqueLabel currentVisited
-                                          newNodes = Lists.cons node currentNodes
-                                          newIds = Maps.insert name node currentIds
-                                      in ((newNodes, newVisited), newIds)
-                            nodesVisitedIds1 = Lists.foldl addBindingName (([], visited), ids) bindingNames
-                            nodes1 = Pairs.first (Pairs.first nodesVisitedIds1)
-                            visited1 = Pairs.second (Pairs.first nodesVisitedIds1)
-                            ids1 = Pairs.second nodesVisitedIds1
-                            addBindingTerm =
-                                    \currentState -> \nodeBinding ->
-                                      let root = Pairs.first nodeBinding
-                                          binding = Pairs.second nodeBinding
-                                          term1 = Core.bindingTerm binding
-                                      in (helper ids1 (Just root) [] currentState (dontCareStep, term1))
-                            nodeBindingPairs = Lists.zip nodes1 bindings
-                            stateAfterBindings = Lists.foldl addBindingTerm ((Lists.concat2 nodes1 nodes, edges), visited1) nodeBindingPairs
-                        in (helper ids1 mroot nextPath stateAfterBindings (Paths.SubtermStepLetBody, env))
-                      Core.TermVariable v0 -> Maybes.maybe state (\root -> Maybes.maybe state (\node ->
-                        let edge =
-                                Paths.SubtermEdge {
-                                  Paths.subtermEdgeSource = root,
-                                  Paths.subtermEdgePath = (Paths.SubtermPath (Lists.reverse nextPath)),
-                                  Paths.subtermEdgeTarget = node}
-                            newEdges = Lists.cons edge edges
-                        in ((nodes, newEdges), visited)) (Maps.lookup v0 ids)) mroot
-                      _ -> Lists.foldl (helper ids mroot nextPath) state (Rewriting.subtermsWithSteps currentTerm)
-          initialState = (([], []), Sets.empty)
-          result = helper Maps.empty Nothing [] initialState (dontCareStep, term)
-          finalNodesEdges = Pairs.first result
-          finalNodes = Pairs.first finalNodesEdges
-          finalEdges = Pairs.second finalNodesEdges
-      in Paths.SubtermGraph {
-        Paths.subtermGraphNodes = finalNodes,
-        Paths.subtermGraphEdges = finalEdges}
diff --git a/src/main/haskell/Hydra/Show/Typing.hs b/src/main/haskell/Hydra/Show/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Typing.hs
+++ /dev/null
@@ -1,42 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.typing types
-
-module Hydra.Show.Typing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Show a type constraint as a string
-typeConstraint :: Typing.TypeConstraint -> String
-typeConstraint tc =
-
-      let ltyp = Typing.typeConstraintLeft tc
-          rtyp = Typing.typeConstraintRight tc
-      in (Strings.cat [
-        ShowCore.type_ ltyp,
-        "\8801",
-        (ShowCore.type_ rtyp)])
--- | Show a type substitution as a string
-typeSubst :: Typing.TypeSubst -> String
-typeSubst ts =
-
-      let subst = Typing.unTypeSubst ts
-          pairs = Maps.toList subst
-          showPair =
-                  \pair ->
-                    let name = Core.unName (Pairs.first pair)
-                        typ = Pairs.second pair
-                    in (Strings.cat [
-                      name,
-                      "\8614",
-                      (ShowCore.type_ typ)])
-          pairStrs = Lists.map showPair pairs
-      in (Strings.cat [
-        "{",
-        (Strings.intercalate "," pairStrs),
-        "}"])
diff --git a/src/main/haskell/Hydra/Show/Util.hs b/src/main/haskell/Hydra/Show/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Util.hs
+++ /dev/null
@@ -1,22 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.util types
-
-module Hydra.Show.Util where
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Show a case convention as a string
-caseConvention :: Util.CaseConvention -> String
-caseConvention c =
-    case c of
-      Util.CaseConventionLowerSnake -> "lower_snake_case"
-      Util.CaseConventionUpperSnake -> "UPPER_SNAKE_CASE"
-      Util.CaseConventionCamel -> "camelCase"
-      Util.CaseConventionPascal -> "PascalCase"
--- | Show a comparison result as a string
-comparison :: Util.Comparison -> String
-comparison c =
-    case c of
-      Util.ComparisonLessThan -> "lessThan"
-      Util.ComparisonEqualTo -> "equalTo"
-      Util.ComparisonGreaterThan -> "greaterThan"
diff --git a/src/main/haskell/Hydra/Show/Variants.hs b/src/main/haskell/Hydra/Show/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Show/Variants.hs
+++ /dev/null
@@ -1,53 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | String representations of hydra.variants types
-
-module Hydra.Show.Variants where
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Show a term variant as a string
-termVariant :: Variants.TermVariant -> String
-termVariant x =
-    case x of
-      Variants.TermVariantAnnotated -> "annotated"
-      Variants.TermVariantApplication -> "application"
-      Variants.TermVariantCases -> "cases"
-      Variants.TermVariantEither -> "either"
-      Variants.TermVariantLambda -> "lambda"
-      Variants.TermVariantLet -> "let"
-      Variants.TermVariantList -> "list"
-      Variants.TermVariantLiteral -> "literal"
-      Variants.TermVariantMap -> "map"
-      Variants.TermVariantMaybe -> "maybe"
-      Variants.TermVariantPair -> "pair"
-      Variants.TermVariantProject -> "project"
-      Variants.TermVariantRecord -> "record"
-      Variants.TermVariantSet -> "set"
-      Variants.TermVariantTypeLambda -> "typeLambda"
-      Variants.TermVariantTypeApplication -> "typeApplication"
-      Variants.TermVariantInject -> "inject"
-      Variants.TermVariantUnit -> "unit"
-      Variants.TermVariantUnwrap -> "unwrap"
-      Variants.TermVariantVariable -> "variable"
-      Variants.TermVariantWrap -> "wrap"
--- | Show a type variant as a string
-typeVariant :: Variants.TypeVariant -> String
-typeVariant x =
-    case x of
-      Variants.TypeVariantAnnotated -> "annotated"
-      Variants.TypeVariantApplication -> "application"
-      Variants.TypeVariantEither -> "either"
-      Variants.TypeVariantForall -> "forall"
-      Variants.TypeVariantFunction -> "function"
-      Variants.TypeVariantList -> "list"
-      Variants.TypeVariantLiteral -> "literal"
-      Variants.TypeVariantMap -> "map"
-      Variants.TypeVariantMaybe -> "maybe"
-      Variants.TypeVariantPair -> "pair"
-      Variants.TypeVariantRecord -> "record"
-      Variants.TypeVariantSet -> "set"
-      Variants.TypeVariantUnion -> "union"
-      Variants.TypeVariantUnit -> "unit"
-      Variants.TypeVariantVariable -> "variable"
-      Variants.TypeVariantVoid -> "void"
-      Variants.TypeVariantWrap -> "wrap"
diff --git a/src/main/haskell/Hydra/Sorting.hs b/src/main/haskell/Hydra/Sorting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sorting.hs
+++ /dev/null
@@ -1,207 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for sorting. This module includes an implementation of Tarjan's algorithm, originally based on GraphSCC by Iavor S. Diatchki: https://hackage.haskell.org/package/GraphSCC.
-
-module Hydra.Sorting where
-import qualified Hydra.Constants as Constants
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Topology as Topology
-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
--- | Convert an adjacency list to a map, concatenating values for duplicate keys
-adjacencyListToMap :: Ord t0 => ([(t0, [t1])] -> M.Map t0 [t1])
-adjacencyListToMap pairs =
-    Lists.foldl (\mp -> \p ->
-      let k = Pairs.first p
-          vs = Pairs.second p
-          existing = Maybes.maybe [] Equality.identity (Maps.lookup k mp)
-      in (Maps.insert k (Lists.concat2 existing vs) mp)) Maps.empty pairs
--- | Given a list of adjacency lists represented as (key, [key]) pairs, construct a graph along with a function mapping each vertex (an Int) back to its original key (Nothing for unknown vertices).
-adjacencyListsToGraph :: Ord t0 => ([(t0, [t0])] -> (M.Map Int [Int], (Int -> Maybe t0)))
-adjacencyListsToGraph edges0 =
-
-      let sortedEdges = Lists.sortOn Pairs.first edges0
-          indexedEdges = Lists.zip (Math.range 0 (Lists.length sortedEdges)) sortedEdges
-          keyToVertex =
-                  Maps.fromList (Lists.map (\vkNeighbors ->
-                    let v = Pairs.first vkNeighbors
-                        kNeighbors = Pairs.second vkNeighbors
-                        k = Pairs.first kNeighbors
-                    in (k, v)) indexedEdges)
-          vertexMap =
-                  Maps.fromList (Lists.map (\vkNeighbors ->
-                    let v = Pairs.first vkNeighbors
-                        kNeighbors = Pairs.second vkNeighbors
-                        k = Pairs.first kNeighbors
-                    in (v, k)) indexedEdges)
-          graph =
-                  Maps.fromList (Lists.map (\vkNeighbors ->
-                    let v = Pairs.first vkNeighbors
-                        kNeighbors = Pairs.second vkNeighbors
-                        neighbors = Pairs.second kNeighbors
-                    in (v, (Maybes.mapMaybe (\k -> Maps.lookup k keyToVertex) neighbors))) indexedEdges)
-          vertexToKey = \v -> Maps.lookup v vertexMap
-      in (graph, vertexToKey)
-createOrderingIsomorphism :: Ord t0 => ([t0] -> [t0] -> Topology.OrderingIsomorphism t1)
-createOrderingIsomorphism sourceOrd targetOrd =
-
-      let sourceToTargetMapping =
-              \els ->
-                let mp = Maps.fromList (Lists.zip sourceOrd els)
-                in (Maybes.cat (Lists.map (\n -> Maps.lookup n mp) targetOrd))
-          targetToSourceMapping =
-                  \els ->
-                    let mp = Maps.fromList (Lists.zip targetOrd els)
-                    in (Maybes.cat (Lists.map (\n -> Maps.lookup n mp) sourceOrd))
-      in Topology.OrderingIsomorphism {
-        Topology.orderingIsomorphismEncode = sourceToTargetMapping,
-        Topology.orderingIsomorphismDecode = targetToSourceMapping}
--- | Given an adjacency function and a distinguished root node, find all reachable nodes (including the root node)
-findReachableNodes :: Ord t0 => ((t0 -> S.Set t0) -> t0 -> S.Set t0)
-findReachableNodes adj root =
-
-      let visit =
-              \visited -> \node ->
-                let toVisit = Sets.difference (adj node) visited
-                in (Logic.ifElse (Sets.null toVisit) visited (Lists.foldl (\v -> \n -> visit (Sets.insert n v) n) visited (Sets.toList toVisit)))
-      in (visit (Sets.singleton root) root)
--- | Initial state for Tarjan's algorithm
-initialState :: Topology.TarjanState
-initialState =
-    Topology.TarjanState {
-      Topology.tarjanStateCounter = 0,
-      Topology.tarjanStateIndices = Maps.empty,
-      Topology.tarjanStateLowLinks = Maps.empty,
-      Topology.tarjanStateStack = [],
-      Topology.tarjanStateOnStack = Sets.empty,
-      Topology.tarjanStateSccs = []}
--- | Pop vertices off the stack until the given vertex is reached, collecting the current strongly connected component
-popStackUntil :: Int -> Topology.TarjanState -> ([Int], Topology.TarjanState)
-popStackUntil v st0 =
-
-      let go =
-              \acc -> \st -> Maybes.maybe (Lists.reverse acc, st) (\uc ->
-                let x = Pairs.first uc
-                    xs = Pairs.second uc
-                    newSt =
-                            Topology.TarjanState {
-                              Topology.tarjanStateCounter = (Topology.tarjanStateCounter st),
-                              Topology.tarjanStateIndices = (Topology.tarjanStateIndices st),
-                              Topology.tarjanStateLowLinks = (Topology.tarjanStateLowLinks st),
-                              Topology.tarjanStateStack = xs,
-                              Topology.tarjanStateOnStack = (Topology.tarjanStateOnStack st),
-                              Topology.tarjanStateSccs = (Topology.tarjanStateSccs st)}
-                    newSt2 =
-                            Topology.TarjanState {
-                              Topology.tarjanStateCounter = (Topology.tarjanStateCounter newSt),
-                              Topology.tarjanStateIndices = (Topology.tarjanStateIndices newSt),
-                              Topology.tarjanStateLowLinks = (Topology.tarjanStateLowLinks newSt),
-                              Topology.tarjanStateStack = (Topology.tarjanStateStack newSt),
-                              Topology.tarjanStateOnStack = (Sets.delete x (Topology.tarjanStateOnStack st)),
-                              Topology.tarjanStateSccs = (Topology.tarjanStateSccs newSt)}
-                    acc_ = Lists.cons x acc
-                in (Logic.ifElse (Equality.equal x v) (Lists.reverse acc_, newSt2) (go acc_ newSt2))) (Lists.uncons (Topology.tarjanStateStack st))
-      in (go [] st0)
--- | Given a graph as an adjacency list of edges and a list of explicit tags per node, compute the full set of tags for each node by propagating tags through edges. If there is an edge from n1 to n2 and n2 has tag t, then n1 also has tag t. Note: pairs in the output are not ordered.
-propagateTags :: (Ord t0, Ord t1) => ([(t0, [t0])] -> [(t0, [t1])] -> [(t0, (S.Set t1))])
-propagateTags edges nodeTags =
-
-      let adjMap = adjacencyListToMap edges
-          tagMap = Maps.map Sets.fromList (adjacencyListToMap nodeTags)
-          allNodes = Sets.toList (Sets.fromList (Lists.concat2 (Lists.map Pairs.first edges) (Lists.map Pairs.first nodeTags)))
-          getTagsForNode =
-                  \node ->
-                    let reachable = findReachableNodes (\n -> Sets.fromList (Maybes.maybe [] Equality.identity (Maps.lookup n adjMap))) node
-                    in (Sets.unions (Lists.map (\n -> Maybes.maybe Sets.empty Equality.identity (Maps.lookup n tagMap)) (Sets.toList reachable)))
-      in (Lists.map (\n -> (n, (getTagsForNode n))) allNodes)
--- | Visit a vertex and recursively explore its successors
-strongConnect :: M.Map Int [Int] -> Int -> Topology.TarjanState -> Topology.TarjanState
-strongConnect graph v st =
-
-      let i = Topology.tarjanStateCounter st
-          newSt =
-                  Topology.TarjanState {
-                    Topology.tarjanStateCounter = (Math.add i 1),
-                    Topology.tarjanStateIndices = (Maps.insert v i (Topology.tarjanStateIndices st)),
-                    Topology.tarjanStateLowLinks = (Maps.insert v i (Topology.tarjanStateLowLinks st)),
-                    Topology.tarjanStateStack = (Lists.cons v (Topology.tarjanStateStack st)),
-                    Topology.tarjanStateOnStack = (Sets.insert v (Topology.tarjanStateOnStack st)),
-                    Topology.tarjanStateSccs = (Topology.tarjanStateSccs st)}
-          neighbors = Maps.findWithDefault [] v graph
-          processNeighbor =
-                  \st_ -> \w ->
-                    let lowLink =
-                            \s ->
-                              let lowV1 = Maps.findWithDefault Constants.maxInt32 v (Topology.tarjanStateLowLinks s)
-                                  idx_w = Maps.findWithDefault Constants.maxInt32 w (Topology.tarjanStateIndices s)
-                              in Topology.TarjanState {
-                                Topology.tarjanStateCounter = (Topology.tarjanStateCounter s),
-                                Topology.tarjanStateIndices = (Topology.tarjanStateIndices s),
-                                Topology.tarjanStateLowLinks = (Maps.insert v (Equality.min lowV1 idx_w) (Topology.tarjanStateLowLinks s)),
-                                Topology.tarjanStateStack = (Topology.tarjanStateStack s),
-                                Topology.tarjanStateOnStack = (Topology.tarjanStateOnStack s),
-                                Topology.tarjanStateSccs = (Topology.tarjanStateSccs s)}
-                    in (Logic.ifElse (Logic.not (Maps.member w (Topology.tarjanStateIndices st_))) (
-                      let stAfter = strongConnect graph w st_
-                          lowV2 = Maps.findWithDefault Constants.maxInt32 v (Topology.tarjanStateLowLinks stAfter)
-                          low_w = Maps.findWithDefault Constants.maxInt32 w (Topology.tarjanStateLowLinks stAfter)
-                      in Topology.TarjanState {
-                        Topology.tarjanStateCounter = (Topology.tarjanStateCounter stAfter),
-                        Topology.tarjanStateIndices = (Topology.tarjanStateIndices stAfter),
-                        Topology.tarjanStateLowLinks = (Maps.insert v (Equality.min lowV2 low_w) (Topology.tarjanStateLowLinks stAfter)),
-                        Topology.tarjanStateStack = (Topology.tarjanStateStack stAfter),
-                        Topology.tarjanStateOnStack = (Topology.tarjanStateOnStack stAfter),
-                        Topology.tarjanStateSccs = (Topology.tarjanStateSccs stAfter)}) (Logic.ifElse (Sets.member w (Topology.tarjanStateOnStack st_)) (lowLink st_) st_))
-          stAfterNeighbors = Lists.foldl processNeighbor newSt neighbors
-          low_v = Maps.findWithDefault Constants.maxInt32 v (Topology.tarjanStateLowLinks stAfterNeighbors)
-          idx_v = Maps.findWithDefault Constants.maxInt32 v (Topology.tarjanStateIndices stAfterNeighbors)
-      in (Logic.ifElse (Equality.equal low_v idx_v) (
-        let compResult = popStackUntil v stAfterNeighbors
-            comp = Pairs.first compResult
-            stPopped = Pairs.second compResult
-        in Topology.TarjanState {
-          Topology.tarjanStateCounter = (Topology.tarjanStateCounter stPopped),
-          Topology.tarjanStateIndices = (Topology.tarjanStateIndices stPopped),
-          Topology.tarjanStateLowLinks = (Topology.tarjanStateLowLinks stPopped),
-          Topology.tarjanStateStack = (Topology.tarjanStateStack stPopped),
-          Topology.tarjanStateOnStack = (Topology.tarjanStateOnStack stPopped),
-          Topology.tarjanStateSccs = (Lists.cons comp (Topology.tarjanStateSccs stPopped))}) stAfterNeighbors)
--- | Compute the strongly connected components of the given graph. The components are returned in reverse topological order
-stronglyConnectedComponents :: M.Map Int [Int] -> [[Int]]
-stronglyConnectedComponents graph =
-
-      let verts = Maps.keys graph
-          finalState =
-                  Lists.foldl (\st -> \v -> Logic.ifElse (Maps.member v (Topology.tarjanStateIndices st)) st (strongConnect graph v st)) initialState verts
-      in (Lists.reverse (Lists.map Lists.sort (Topology.tarjanStateSccs finalState)))
--- | Sort a directed acyclic graph (DAG) based on an adjacency list. Yields a list of nontrivial strongly connected components if the graph has cycles, otherwise a simple list.
-topologicalSort :: Ord t0 => ([(t0, [t0])] -> Either [[t0]] [t0])
-topologicalSort pairs =
-
-      let sccs = topologicalSortComponents pairs
-          isCycle = \scc -> Equality.gt (Lists.length scc) 1
-          withCycles = Lists.filter isCycle sccs
-      in (Logic.ifElse (Lists.null withCycles) (Right (Lists.concat sccs)) (Left withCycles))
--- | Find the strongly connected components (including cycles and isolated vertices) of a graph, in (reverse) topological order, i.e. dependencies before dependents
-topologicalSortComponents :: Ord t0 => ([(t0, [t0])] -> [[t0]])
-topologicalSortComponents pairs =
-
-      let graphResult = adjacencyListsToGraph pairs
-          g = Pairs.first graphResult
-      in (Lists.map (\comp -> Maybes.mapMaybe (Pairs.second graphResult) comp) (stronglyConnectedComponents g))
--- | Sort a directed acyclic graph (DAG) of nodes using two helper functions: one for node keys, and one for the adjacency list of connected node keys. The result is a list of strongly-connected components (cycles), in which singleton lists represent acyclic nodes.
-topologicalSortNodes :: Ord t1 => ((t0 -> t1) -> (t0 -> [t1]) -> [t0] -> [[t0]])
-topologicalSortNodes getKey getAdj nodes =
-
-      let nodesByKey = Maps.fromList (Lists.map (\n -> (getKey n, n)) nodes)
-          pairs = Lists.map (\n -> (getKey n, (getAdj n))) nodes
-          comps = topologicalSortComponents pairs
-      in (Lists.map (\c -> Maybes.cat (Lists.map (\k -> Maps.lookup k nodesByKey) c)) comps)
diff --git a/src/main/haskell/Hydra/Sources/All.hs b/src/main/haskell/Hydra/Sources/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/All.hs
+++ /dev/null
@@ -1,49 +0,0 @@
--- | Aggregates Hydra source modules via per-package manifest modules.
---
--- The per-package sublists (kernelModules, haskellModules, jsonModules,
--- otherModules) are defined in terms of imports from each package's
--- Manifest module. See feature_290_packaging-plan.md, "Sync system redesign
--- / Package manifests".
-
-module Hydra.Sources.All(
-  module Hydra.Sources.All,
-  module Hydra.Sources.Kernel.Terms.All,
-  module Hydra.Sources.Kernel.Types.All,
-  module Hydra.Sources.Test.All,
-) where
-
-import Hydra.Kernel
-import Hydra.Sources.Kernel.Terms.All
-import Hydra.Sources.Kernel.Types.All
-import Hydra.Sources.Test.All
-
-import qualified Hydra.Sources.Kernel.Manifest as KernelManifest
-import qualified Hydra.Sources.Haskell.Manifest as HaskellManifest
-
-import qualified Hydra.Sources.Kernel.Terms.Dsls as Dsls
-
-
-mainModules :: [Module]
-mainModules = kernelModules ++ haskellModules ++ jsonModules ++ otherModules
-
--- | The DSL source module (hydra.dsls) must be generated separately from mainModules
--- because including it in the main generation causes a stack overflow due to the
--- complexity of its term definitions (which reference decoders, the full type graph, etc.)
-dslSourceModules :: [Module]
-dslSourceModules = [Dsls.module_]
-
--- | Kernel types and terms plus JSON runtime.
---
--- Note: this is the subset used by update-json-kernel. It is a strict subset
--- of KernelManifest.mainModules (which also includes otherModules).
-kernelModules :: [Module]
-kernelModules = kernelTypesModules ++ kernelTermsModules ++ jsonModules
-
-haskellModules :: [Module]
-haskellModules = HaskellManifest.mainModules
-
-jsonModules :: [Module]
-jsonModules = KernelManifest.jsonModules
-
-otherModules :: [Module]
-otherModules = KernelManifest.otherModules
diff --git a/src/main/haskell/Hydra/Sources/Avro/Coder.hs b/src/main/haskell/Hydra/Sources/Avro/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/Coder.hs
+++ /dev/null
@@ -1,923 +0,0 @@
-module Hydra.Sources.Avro.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Avro.Schema as Avro
-import qualified Hydra.Json.Model as JM
-import qualified Hydra.Sources.Avro.Schema as AvroSchema
-import qualified Hydra.Avro.Environment as AvroEnv
--- Local type aliases
-type Result a = Either Error a
-type AvroHydraAdapter = Adapter Avro.Schema Type JM.Value Term
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-avroSchemaPhantomNs :: Namespace
-avroSchemaPhantomNs = Namespace "hydra.avro.schema"
-
-jsonModelNs :: Namespace
-jsonModelNs = Namespace "hydra.json.model"
-
-ns :: Namespace
-ns = Namespace "hydra.avro.coder"
-
-avroEnvironmentNs :: Namespace
-avroEnvironmentNs = Namespace "hydra.avro.environment"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, Strip.ns],
-            moduleTypeDependencies = (avroEnvironmentNs:AvroSchema.ns:jsonModelNs:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Avro-to-Hydra adapter for converting Avro schemas and data to Hydra types and terms"}
-  where
-    definitions = [
-      toDefinition annotateAdapter,
-      toDefinition avroHydraAdapter,
-      toDefinition avroNameToHydraName,
-      toDefinition avro_foreignKey,
-      toDefinition avro_primaryKey,
-      toDefinition emptyAvroEnvironment,
-      toDefinition encodeAnnotationValue,
-      toDefinition err,
-      toDefinition expectArrayE,
-      toDefinition expectObjectE,
-      toDefinition expectStringE,
-      toDefinition fieldAnnotationsToCore,
-      toDefinition findAvroPrimaryKeyField,
-      toDefinition foreignKeyE,
-      toDefinition getAvroHydraAdapter,
-      toDefinition jsonToStringE,
-      toDefinition namedAnnotationsToCore,
-      toDefinition optStringE,
-      toDefinition parseAvroName,
-      toDefinition patternToNameConstructor,
-      toDefinition prepareField,
-      toDefinition prepareFields,
-      toDefinition primaryKeyE,
-      toDefinition putAvroHydraAdapter,
-      toDefinition requireStringE,
-      toDefinition rewriteAvroSchemaM,
-      toDefinition showQname,
-      toDefinition stringToTermE,
-      toDefinition termToStringE,
-      toDefinition unexpectedE]
-
-
--- | Error helpers
-
-annotateAdapter :: TTermDefinition (Maybe (M.Map Name Term) -> AvroHydraAdapter -> AvroHydraAdapter)
-annotateAdapter = define "annotateAdapter" $
-  doc "Annotate an adapter's target type with optional annotations" $
-  lambda "ann" $ lambda "ad" $
-    Maybes.maybe
-      (var "ad")
-      (lambda "n" $ Coders.adapterWithTarget (var "ad") (MetaTypes.annot (var "n") (Coders.adapterTarget (var "ad"))))
-      (var "ann")
-
-avroHydraAdapter :: TTermDefinition (Context -> Avro.Schema -> AvroEnv.AvroEnvironment -> Result (AvroHydraAdapter, AvroEnv.AvroEnvironment))
-avroHydraAdapter = define "avroHydraAdapter" $
-  doc "Create an adapter between Avro schemas and Hydra types/terms" $
-  lambda "cx" $ lambda "schema" $ lambda "env0" $ lets [
-    -- simpleAdapter: create a non-lossy adapter with given type, encode, and decode functions
-    "simpleAdapter">: lambda "env" $ lambda "typ" $ lambda "encode" $ lambda "decode" $
-      right (pair
-        (Coders.adapter (boolean False) (var "schema") (var "typ") (Coders.coder (var "encode") (var "decode")))
-        (var "env")),
-    -- doubleToInt / doubleToLong: truncate a JSON number (now decimal) to a bounded integer.
-    -- decimalToBigint already truncates toward zero, so no intermediate Math.truncate is needed.
-    "doubleToInt">: lambda "d" $ Literals.bigintToInt32 (Literals.decimalToBigint (var "d")),
-    "doubleToLong">: lambda "d" $ Literals.bigintToInt64 (Literals.decimalToBigint (var "d"))] $
-    cases Avro._Schema (var "schema") Nothing [
-      -- SchemaArray
-      Avro._Schema_array>>: lambda "arr" $
-        Eithers.bind (avroHydraAdapter @@ var "cx" @@ (project Avro._Array Avro._Array_items @@ var "arr") @@ var "env0") (lambda "adEnv" $ lets [
-          "ad">: Pairs.first (var "adEnv"),
-          "env1">: Pairs.second (var "adEnv")] $
-          right (pair
-            (Coders.adapter (Coders.adapterIsLossy (var "ad")) (var "schema")
-              (MetaTypes.list (Coders.adapterTarget (var "ad")))
-              (Coders.coder
-                (lambda "cx1" $ lambda "v" $
-                  cases JM._Value (var "v") Nothing [
-                    JM._Value_array>>: lambda "vals" $
-                      Eithers.map (lambda "ts" $ Core.termList (var "ts"))
-                        (Eithers.mapList (lambda "jv" $ Coders.coderEncode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "jv") (var "vals"))])
-                (lambda "cx1" $ lambda "t" $
-                  cases _Term (var "t") Nothing [
-                    _Term_list>>: lambda "vals" $
-                      Eithers.map (lambda "jvs" $ inject JM._Value JM._Value_array (var "jvs"))
-                        (Eithers.mapList (lambda "tv" $ Coders.coderDecode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "tv") (var "vals"))])))
-            (var "env1"))),
-
-      -- SchemaMap
-      Avro._Schema_map>>: lambda "mp" $
-        Eithers.bind (avroHydraAdapter @@ var "cx" @@ (project Avro._Map Avro._Map_values @@ var "mp") @@ var "env0") (lambda "adEnv" $ lets [
-          "ad">: Pairs.first (var "adEnv"),
-          "env1">: Pairs.second (var "adEnv"),
-          "pairToHydra">: lambda "cx1" $ lambda "entry" $ lets [
-            "k">: Pairs.first (var "entry"),
-            "v">: Pairs.second (var "entry")] $
-            Eithers.map
-              (lambda "v'" $ pair (MetaTerms.stringLift (var "k")) (var "v'"))
-              (Coders.coderEncode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "v")] $
-          right (pair
-            (Coders.adapter (Coders.adapterIsLossy (var "ad")) (var "schema")
-              (MetaTypes.map MetaTypes.string (Coders.adapterTarget (var "ad")))
-              (Coders.coder
-                (lambda "cx1" $ lambda "v" $
-                  cases JM._Value (var "v") Nothing [
-                    JM._Value_object>>: lambda "m" $
-                      Eithers.map (lambda "pairs" $ Core.termMap (Maps.fromList (var "pairs")))
-                        (Eithers.mapList (lambda "e" $ var "pairToHydra" @@ var "cx1" @@ var "e") (Maps.toList (var "m")))])
-                (lambda "cx1" $ lambda "m" $
-                  Eithers.map (lambda "mp'" $ inject JM._Value JM._Value_object (var "mp'"))
-                    (ExtractCore.map @@ (lambda "t" $ ExtractCore.string @@ Graph.emptyGraph @@ var "t")
-                      @@ (lambda "t" $ Coders.coderDecode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "t")
-                      @@ Graph.emptyGraph @@ var "m"))))
-            (var "env1"))),
-
-      -- SchemaNamed
-      Avro._Schema_named>>: lambda "n" $ lets [
-        "ns">: project Avro._Named Avro._Named_namespace @@ var "n",
-        "manns">: namedAnnotationsToCore @@ var "n",
-        "ann">: Logic.ifElse (Maps.null (var "manns")) nothing (just (var "manns")),
-        "lastNs">: project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namespace @@ var "env0",
-        "nextNs">: Maybes.maybe (var "lastNs") (lambda "s" $ just (var "s")) (var "ns"),
-        "env1">: record AvroEnv._AvroEnvironment [
-          AvroEnv._AvroEnvironment_namedAdapters>>:
-            project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namedAdapters @@ var "env0",
-          AvroEnv._AvroEnvironment_namespace>>: var "nextNs",
-          AvroEnv._AvroEnvironment_elements>>:
-            project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_elements @@ var "env0"],
-        "qname">: record AvroEnv._AvroQualifiedName [
-          AvroEnv._AvroQualifiedName_namespace>>: var "nextNs",
-          AvroEnv._AvroQualifiedName_name>>: project Avro._Named Avro._Named_name @@ var "n"],
-        "hydraName">: avroNameToHydraName @@ var "qname"] $
-        -- Check if already defined
-        Maybes.maybe
-          -- Not previously defined: process based on named type
-          (Eithers.bind
-            (cases Avro._NamedType (project Avro._Named Avro._Named_type @@ var "n") Nothing [
-              -- Enum
-              Avro._NamedType_enum>>: lambda "e" $ lets [
-                "syms">: project Avro._Enum Avro._Enum_symbols @@ var "e",
-                "typ">: Core.typeUnion
-                  (Lists.map (lambda "s" $ Core.fieldType (Core.name (var "s")) MetaTypes.unit) (var "syms"))] $
-                var "simpleAdapter" @@ var "env1" @@ var "typ"
-                  @@ (lambda "_cx" $ lambda "jv" $
-                    cases JM._Value (var "jv") Nothing [
-                      JM._Value_string>>: lambda "s" $
-                        right (Core.termInject (Core.injection (var "hydraName") (Core.field (Core.name (var "s")) Core.termUnit)))])
-                  @@ (lambda "_cx" $ lambda "t" $
-                    cases _Term (var "t") Nothing [
-                      _Term_inject>>: lambda "inj" $ lets [
-                        "fld">: project _Injection _Injection_field @@ var "inj",
-                        "fn">: project _Field _Field_name @@ var "fld"] $
-                        right (inject JM._Value JM._Value_string (unwrap _Name @@ var "fn"))]),
-
-              -- Fixed
-              Avro._NamedType_fixed>>: lambda "_f" $
-                var "simpleAdapter" @@ var "env1" @@ MetaTypes.binary
-                  @@ (lambda "_cx" $ lambda "jv" $
-                    cases JM._Value (var "jv") Nothing [
-                      JM._Value_string>>: lambda "s" $
-                        right (Core.termLiteral (Core.literalBinary (Literals.stringToBinary (var "s"))))])
-                  @@ (lambda "cx1" $ lambda "t" $
-                    Eithers.map (lambda "b" $ inject JM._Value JM._Value_string (Literals.binaryToString (var "b")))
-                      (ExtractCore.binary @@ Graph.emptyGraph @@ var "t")),
-
-              -- Record
-              Avro._NamedType_record>>: lambda "r" $ lets [
-                "avroFields">: project Avro._Record Avro._Record_fields @@ var "r"] $
-                Eithers.bind (prepareFields @@ var "cx" @@ var "env1" @@ var "avroFields") (lambda "prepResult" $ lets [
-                  "adaptersByFieldName">: Pairs.first (var "prepResult"),
-                  "env2">: Pairs.second (var "prepResult")] $
-                  Eithers.bind (findAvroPrimaryKeyField @@ var "cx" @@ var "qname" @@ var "avroFields") (lambda "pk" $ lets [
-                    -- encodePair: encode a key-value pair from JSON object
-                    "encodePair">: lambda "cx1" $ lambda "entry" $ lets [
-                      "k">: Pairs.first (var "entry"),
-                      "v">: Pairs.second (var "entry")] $
-                      Maybes.maybe
-                        (err @@ var "cx1" @@ Strings.cat (list [string "unrecognized field for ", showQname @@ var "qname", string ": ", var "k"]))
-                        (lambda "fad" $ Eithers.map
-                          (lambda "v'" $ Core.field (Core.name (var "k")) (var "v'"))
-                          (Coders.coderEncode (Coders.adapterCoder (Pairs.second (var "fad"))) @@ var "cx1" @@ var "v"))
-                        (Maps.lookup (var "k") (var "adaptersByFieldName")),
-                    -- decodeField: decode a Hydra field back to a key-value pair
-                    "decodeField">: lambda "cx1" $ lambda "fld" $ lets [
-                      "k">: unwrap _Name @@ (project _Field _Field_name @@ var "fld"),
-                      "v">: project _Field _Field_term @@ var "fld"] $
-                      Maybes.maybe
-                        (err @@ var "cx1" @@ Strings.cat (list [string "unrecognized field for ", showQname @@ var "qname", string ": ", var "k"]))
-                        (lambda "fad" $ Eithers.map
-                          (lambda "v'" $ pair (var "k") (var "v'"))
-                          (Coders.coderDecode (Coders.adapterCoder (Pairs.second (var "fad"))) @@ var "cx1" @@ var "v"))
-                        (Maps.lookup (var "k") (var "adaptersByFieldName")),
-                    -- lossy: any adapter is lossy?
-                    "lossy">: Lists.foldl (lambda "b" $ lambda "fad" $ Logic.or (var "b") (Coders.adapterIsLossy (Pairs.second (var "fad"))))
-                      (boolean False) (Maps.elems (var "adaptersByFieldName")),
-                    -- hfields: Hydra field types
-                    "hfields">: Lists.map (lambda "fad" $
-                      Core.fieldType (Core.name (project Avro._Field Avro._Field_name @@ Pairs.first (var "fad")))
-                        (Coders.adapterTarget (Pairs.second (var "fad"))))
-                      (Maps.elems (var "adaptersByFieldName")),
-                    "target">: Core.typeRecord (var "hfields")] $
-                    right (pair
-                      (Coders.adapter (var "lossy") (var "schema") (var "target")
-                        (Coders.coder
-                          (lambda "cx1" $ lambda "jv" $
-                            cases JM._Value (var "jv") Nothing [
-                              JM._Value_object>>: lambda "m" $
-                                Eithers.map (lambda "fields" $ Core.termRecord (Core.record (var "hydraName") (var "fields")))
-                                  (Eithers.mapList (lambda "e" $ var "encodePair" @@ var "cx1" @@ var "e") (Maps.toList (var "m")))])
-                          (lambda "cx1" $ lambda "t" $
-                            cases _Term (var "t") Nothing [
-                              _Term_record>>: lambda "rec" $
-                                Eithers.map (lambda "kvs" $ inject JM._Value JM._Value_object (Maps.fromList (var "kvs")))
-                                  (Eithers.mapList (lambda "fld" $ var "decodeField" @@ var "cx1" @@ var "fld")
-                                    (project _Record _Record_fields @@ var "rec"))])))
-                      (var "env2"))))])
-            (lambda "adEnv2" $ lets [
-              "ad">: Pairs.first (var "adEnv2"),
-              "env2">: Pairs.second (var "adEnv2"),
-              -- Note: staging stores unannotated adapter in env but returns annotated
-              "env3">: putAvroHydraAdapter @@ var "qname" @@ var "ad" @@ var "env2",
-              -- Restore the previous namespace
-              "env4">: record AvroEnv._AvroEnvironment [
-                AvroEnv._AvroEnvironment_namedAdapters>>:
-                  project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namedAdapters @@ var "env3",
-                AvroEnv._AvroEnvironment_namespace>>: var "lastNs",
-                AvroEnv._AvroEnvironment_elements>>:
-                  project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_elements @@ var "env3"]] $
-              right (pair (annotateAdapter @@ var "ann" @@ var "ad") (var "env4"))))
-          -- Already defined: error
-          (lambda "_ad" $ err @@ var "cx" @@ Strings.cat2 (string "Avro named type defined more than once: ") (showQname @@ var "qname"))
-          (getAvroHydraAdapter @@ var "qname" @@ var "env1"),
-
-      -- SchemaPrimitive
-      Avro._Schema_primitive>>: lambda "p" $
-        cases Avro._Primitive (var "p") Nothing [
-          -- Null
-          Avro._Primitive_null>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.unit
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_string>>: lambda "s" $ right (MetaTerms.stringLift (var "s"))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "s" $ inject JM._Value JM._Value_string (var "s"))
-                  (ExtractCore.string @@ Graph.emptyGraph @@ var "t")),
-          -- Boolean
-          Avro._Primitive_boolean>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.boolean
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_boolean>>: lambda "b" $ right (MetaTerms.booleanLift (var "b"))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "b" $ inject JM._Value JM._Value_boolean (var "b"))
-                  (ExtractCore.boolean @@ Graph.emptyGraph @@ var "t")),
-          -- Int
-          Avro._Primitive_int>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.int32
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalInteger (Core.integerValueInt32 (var "doubleToInt" @@ var "d"))))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "i" $ inject JM._Value JM._Value_number (Literals.bigintToDecimal (Literals.int32ToBigint (var "i"))))
-                  (ExtractCore.int32 @@ Graph.emptyGraph @@ var "t")),
-          -- Long
-          Avro._Primitive_long>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.int64
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalInteger (Core.integerValueInt64 (var "doubleToLong" @@ var "d"))))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "i" $ inject JM._Value JM._Value_number (Literals.bigintToDecimal (Literals.int64ToBigint (var "i"))))
-                  (ExtractCore.int64 @@ Graph.emptyGraph @@ var "t")),
-          -- Float
-          Avro._Primitive_float>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.float32
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalFloat (Core.floatValueFloat32 (Literals.decimalToFloat32 (var "d")))))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "f" $ inject JM._Value JM._Value_number (Literals.float32ToDecimal (var "f")))
-                  (ExtractCore.float32 @@ Graph.emptyGraph @@ var "t")),
-          -- Double
-          Avro._Primitive_double>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.float64
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalFloat (Core.floatValueFloat64 (Literals.decimalToFloat64 (var "d")))))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "d" $ inject JM._Value JM._Value_number (Literals.float64ToDecimal (var "d")))
-                  (ExtractCore.float64 @@ Graph.emptyGraph @@ var "t")),
-          -- Bytes
-          Avro._Primitive_bytes>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.binary
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_string>>: lambda "s" $ right (Core.termLiteral (Core.literalBinary (Literals.stringToBinary (var "s"))))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "b" $ inject JM._Value JM._Value_string (Literals.binaryToString (var "b")))
-                  (ExtractCore.binary @@ Graph.emptyGraph @@ var "t")),
-          -- String
-          Avro._Primitive_string>>: constant $
-            var "simpleAdapter" @@ var "env0" @@ MetaTypes.string
-              @@ (lambda "_cx" $ lambda "jv" $
-                cases JM._Value (var "jv") Nothing [
-                  JM._Value_string>>: lambda "s" $ right (MetaTerms.stringLift (var "s"))])
-              @@ (lambda "cx1" $ lambda "t" $
-                Eithers.map (lambda "s" $ inject JM._Value JM._Value_string (var "s"))
-                  (ExtractCore.string @@ Graph.emptyGraph @@ var "t"))],
-
-      -- SchemaReference
-      Avro._Schema_reference>>: lambda "name_" $ lets [
-        "qname">: parseAvroName @@ (project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namespace @@ var "env0") @@ var "name_"] $
-        Maybes.maybe
-          (err @@ var "cx" @@ Strings.cat2 (string "Referenced Avro type has not been defined: ") (showQname @@ var "qname"))
-          (lambda "ad" $ right (pair (var "ad") (var "env0")))
-          (getAvroHydraAdapter @@ var "qname" @@ var "env0"),
-
-      -- SchemaUnion
-      Avro._Schema_union>>: lambda "u" $ lets [
-        "schemas">: unwrap Avro._Union @@ var "u",
-        "isNull">: lambda "s" $
-          cases Avro._Schema (var "s") (Just (boolean False)) [
-            Avro._Schema_primitive>>: lambda "prim" $
-              cases Avro._Primitive (var "prim") (Just (boolean False)) [
-                Avro._Primitive_null>>: constant (boolean True)]],
-        "hasNull">: Logic.not (Lists.null (Lists.filter (var "isNull") (var "schemas"))),
-        "nonNulls">: Lists.filter (lambda "s" $ Logic.not (var "isNull" @@ var "s")) (var "schemas"),
-        "forOptional">: lambda "s" $
-          Eithers.bind (avroHydraAdapter @@ var "cx" @@ var "s" @@ var "env0") (lambda "adEnv" $ lets [
-            "ad">: Pairs.first (var "adEnv"),
-            "env1">: Pairs.second (var "adEnv")] $
-            right (pair
-              (Coders.adapter (Coders.adapterIsLossy (var "ad")) (var "schema")
-                (MetaTypes.optional (Coders.adapterTarget (var "ad")))
-                (Coders.coder
-                  (lambda "cx1" $ lambda "v" $
-                    cases JM._Value (var "v") (Just (
-                      Eithers.map (lambda "t" $ Core.termMaybe (just (var "t")))
-                        (Coders.coderEncode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "v"))) [
-                      JM._Value_null>>: constant (right (Core.termMaybe nothing))])
-                  (lambda "cx1" $ lambda "t" $
-                    cases _Term (var "t") Nothing [
-                      _Term_maybe>>: lambda "ot" $
-                        Maybes.maybe
-                          (right (injectUnit JM._Value JM._Value_null))
-                          (lambda "term'" $ Coders.coderDecode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "term'")
-                          (var "ot")])))
-              (var "env1")))] $
-        Logic.ifElse (Equality.gt (Lists.length (var "nonNulls")) (int32 1))
-          (err @@ var "cx" @@ string "general-purpose unions are not yet supported")
-          (Maybes.maybe
-            (err @@ var "cx" @@ string "cannot generate the empty type")
-            (lambda "nonNullHead" $
-              Logic.ifElse (var "hasNull")
-                (var "forOptional" @@ var "nonNullHead")
-                (Eithers.bind (avroHydraAdapter @@ var "cx" @@ var "nonNullHead" @@ var "env0") (lambda "adEnv" $ lets [
-                  "ad">: Pairs.first (var "adEnv"),
-                  "env1">: Pairs.second (var "adEnv")] $
-                  right (pair
-                    (Coders.adapter (Coders.adapterIsLossy (var "ad")) (var "schema")
-                      (Coders.adapterTarget (var "ad")) (Coders.adapterCoder (var "ad")))
-                    (var "env1")))))
-            (Lists.maybeHead (var "nonNulls")))
-      ]
-
-avroNameToHydraName :: TTermDefinition (AvroEnv.AvroQualifiedName -> Name)
-avroNameToHydraName = define "avroNameToHydraName" $
-  doc "Convert an Avro qualified name to a Hydra name" $
-  lambda "qname" $ lets [
-    "mns">: project AvroEnv._AvroQualifiedName AvroEnv._AvroQualifiedName_namespace @@ var "qname",
-    "local">: project AvroEnv._AvroQualifiedName AvroEnv._AvroQualifiedName_name @@ var "qname"] $
-    Names.unqualifyName @@ Packaging.qualifiedName
-      (Maybes.map (lambda "s" $ wrap _Namespace (var "s")) (var "mns"))
-      (var "local")
-
-avro_foreignKey :: TTermDefinition String
-avro_foreignKey = define "avro_foreignKey" $
-  string "@foreignKey"
-
-avro_primaryKey :: TTermDefinition String
-avro_primaryKey = define "avro_primaryKey" $
-  string "@primaryKey"
-
-emptyAvroEnvironment :: TTermDefinition AvroEnv.AvroEnvironment
-emptyAvroEnvironment = define "emptyAvroEnvironment" $
-  doc "An empty Avro environment with no named adapters, no namespace, and no elements" $
-  record (Name "hydra.avro.environment.AvroEnvironment") [
-    (Name "namedAdapters")>>: Maps.empty,
-    (Name "namespace")>>: nothing,
-    (Name "elements")>>: Maps.empty]
-
-
--- | Core functions
-
-encodeAnnotationValue :: TTermDefinition (JM.Value -> Term)
-encodeAnnotationValue = define "encodeAnnotationValue" $
-  doc "Encode a JSON value as a Hydra term for annotation purposes" $
-  lambda "v" $
-    cases JM._Value (var "v") Nothing [
-      JM._Value_array>>: lambda "vals" $
-        Core.termList (Lists.map encodeAnnotationValue (var "vals")),
-      JM._Value_boolean>>: lambda "b" $
-        MetaTerms.booleanLift (var "b"),
-      JM._Value_null>>: constant $
-        MetaTerms.tuple ([] :: [TTerm Term]),
-      JM._Value_number>>: lambda "d" $
-        MetaTerms.decimalLift (var "d"),
-      JM._Value_object>>: lambda "m" $
-        MetaTerms.map (Maps.fromList (Lists.map
-          (lambda "entry" $ lets [
-            "k">: Pairs.first (var "entry"),
-            "v'">: Pairs.second (var "entry")] $
-            pair (MetaTerms.stringLift (var "k")) (encodeAnnotationValue @@ var "v'"))
-          (Maps.toList (var "m")))),
-      JM._Value_string>>: lambda "s" $
-        MetaTerms.stringLift (var "s")]
-
-err :: TTermDefinition (Context -> String -> Result a)
-err = define "err" $
-  doc "Construct an error result with a message in context" $
-  lambda "cx" $ lambda "msg" $
-    Ctx.failInContext (Error.errorOther $ Error.otherError (var "msg")) (var "cx")
-
-expectArrayE :: TTermDefinition (Context -> JM.Value -> Result [JM.Value])
-expectArrayE = define "expectArrayE" $
-  doc "Extract a JSON array or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_array>>: lambda "v" $ right (var "v")]
-
-expectObjectE :: TTermDefinition (Context -> JM.Value -> Result (M.Map String JM.Value))
-expectObjectE = define "expectObjectE" $
-  doc "Extract a JSON object or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_object>>: lambda "v" $ right (var "v")]
-
-expectStringE :: TTermDefinition (Context -> JM.Value -> Result String)
-expectStringE = define "expectStringE" $
-  doc "Extract a JSON string or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_string>>: lambda "v" $ right (var "v")]
-
-fieldAnnotationsToCore :: TTermDefinition (Avro.Field -> M.Map Name Term)
-fieldAnnotationsToCore = define "fieldAnnotationsToCore" $
-  doc "Extract field annotations and convert them to core Name/Term pairs" $
-  lambda "f" $
-    Maps.fromList (Lists.map
-      (lambda "entry" $ lets [
-        "k">: Pairs.first (var "entry"),
-        "v">: Pairs.second (var "entry")] $
-        pair (Core.name (var "k")) (encodeAnnotationValue @@ var "v"))
-      (Maps.toList (project Avro._Field Avro._Field_annotations @@ var "f")))
-
-findAvroPrimaryKeyField :: TTermDefinition (Context -> AvroEnv.AvroQualifiedName -> [Avro.Field] -> Result (Maybe AvroEnv.AvroPrimaryKey))
-findAvroPrimaryKeyField = define "findAvroPrimaryKeyField" $
-  doc "Find the primary key field among a list of Avro fields" $
-  lambda "cx" $ lambda "qname" $ lambda "avroFields" $ lets [
-    "keys">: Maybes.cat (Lists.map (lambda "f" $ primaryKeyE @@ var "cx" @@ var "f") (var "avroFields"))] $
-    Logic.ifElse (Lists.null (var "keys"))
-      (right nothing)
-      (Logic.ifElse (Equality.equal (Lists.length (var "keys")) (int32 1))
-        (right (Lists.maybeHead (var "keys")))
-        (err @@ var "cx" @@ Strings.cat2 (string "multiple primary key fields for ") (showQname @@ var "qname")))
-
-foreignKeyE :: TTermDefinition (Context -> Avro.Field -> Result (Maybe AvroEnv.AvroForeignKey))
-foreignKeyE = define "foreignKeyE" $
-  doc "Extract a foreign key annotation from a field, if present" $
-  lambda "cx" $ lambda "f" $
-    Maybes.maybe
-      (right nothing)
-      (lambda "v" $
-        Eithers.bind (expectObjectE @@ var "cx" @@ var "v") (lambda "m" $
-        Eithers.bind (Eithers.map (lambda "s" $ Core.name (var "s")) (requireStringE @@ var "cx" @@ string "type" @@ var "m")) (lambda "tname" $
-        Eithers.bind (optStringE @@ var "cx" @@ string "pattern" @@ var "m") (lambda "pattern_" $
-          lets [
-            "constr">: Maybes.maybe
-              (lambda "s" $ Core.name (var "s"))
-              (lambda "pat" $ patternToNameConstructor @@ var "pat")
-              (var "pattern_")] $
-            right (just $ record AvroEnv._AvroForeignKey [
-              AvroEnv._AvroForeignKey_typeName>>: var "tname",
-              AvroEnv._AvroForeignKey_constructor>>: var "constr"])))))
-      (Maps.lookup (avro_foreignKey) (project Avro._Field Avro._Field_annotations @@ var "f"))
-
-getAvroHydraAdapter :: TTermDefinition (AvroEnv.AvroQualifiedName -> AvroEnv.AvroEnvironment -> Maybe AvroHydraAdapter)
-getAvroHydraAdapter = define "getAvroHydraAdapter" $
-  doc "Look up an adapter by qualified name in the environment" $
-  lambda "qname" $ lambda "env" $
-    Maps.lookup (var "qname") (project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namedAdapters @@ var "env")
-
-jsonToStringE :: TTermDefinition (Context -> JM.Value -> Result String)
-jsonToStringE = define "jsonToStringE" $
-  doc "Convert a JSON value to a string, supporting booleans, strings, and numbers" $
-  lambda "cx" $ lambda "v" $
-    cases JM._Value (var "v") (Just (unexpectedE @@ var "cx" @@ string "string, number, or boolean" @@ string "other")) [
-      JM._Value_boolean>>: lambda "b" $
-        right (Logic.ifElse (var "b") (string "true") (string "false")),
-      JM._Value_string>>: lambda "s" $
-        right (var "s"),
-      JM._Value_number>>: lambda "d" $
-        right (Literals.showDecimal (var "d"))]
-
-namedAnnotationsToCore :: TTermDefinition (Avro.Named -> M.Map Name Term)
-namedAnnotationsToCore = define "namedAnnotationsToCore" $
-  doc "Extract named type annotations and convert them to core Name/Term pairs" $
-  lambda "n" $
-    Maps.fromList (Lists.map
-      (lambda "entry" $ lets [
-        "k">: Pairs.first (var "entry"),
-        "v">: Pairs.second (var "entry")] $
-        pair (Core.name (var "k")) (encodeAnnotationValue @@ var "v"))
-      (Maps.toList (project Avro._Named Avro._Named_annotations @@ var "n")))
-
-optStringE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result (Maybe String))
-optStringE = define "optStringE" $
-  doc "Look up an optional string attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Maybes.maybe
-      (right nothing)
-      (lambda "v" $ Eithers.map (lambda "s" $ Maybes.pure (var "s")) (expectStringE @@ var "cx" @@ var "v"))
-      (Maps.lookup (var "fname") (var "m"))
-
-
--- | Constants
-
-parseAvroName :: TTermDefinition (Maybe String -> String -> AvroEnv.AvroQualifiedName)
-parseAvroName = define "parseAvroName" $
-  doc "Parse a dotted Avro name into a qualified name" $
-  lambda "mns" $ lambda "name_" $ lets [
-    "parts">: Strings.splitOn (string ".") (var "name_"),
-    "local">: Maybes.fromMaybe (var "name_") (Lists.maybeLast (var "parts"))] $
-    Logic.ifElse (Equality.equal (Lists.length (var "parts")) (int32 1))
-      (record AvroEnv._AvroQualifiedName [
-        AvroEnv._AvroQualifiedName_namespace>>: var "mns",
-        AvroEnv._AvroQualifiedName_name>>: var "local"])
-      (record AvroEnv._AvroQualifiedName [
-        AvroEnv._AvroQualifiedName_namespace>>: Maybes.map (lambda "ps" $ Strings.intercalate (string ".") (var "ps")) (Lists.maybeInit (var "parts")),
-        AvroEnv._AvroQualifiedName_name>>: var "local"])
-
-patternToNameConstructor :: TTermDefinition (String -> String -> Name)
-patternToNameConstructor = define "patternToNameConstructor" $
-  doc "Create a name constructor from a pattern string" $
-  lambda "pat" $ lambda "s" $
-    Core.name (Strings.intercalate (var "s") (Strings.splitOn (string "${}") (var "pat")))
-
-prepareField :: TTermDefinition (Context -> AvroEnv.AvroEnvironment -> Avro.Field -> Result ((String, (Avro.Field, AvroHydraAdapter)), AvroEnv.AvroEnvironment))
-prepareField = define "prepareField" $
-  doc "Prepare a single field, producing an adapter and updated environment" $
-  lambda "cx" $ lambda "env" $ lambda "f" $ lets [
-    "manns">: fieldAnnotationsToCore @@ var "f",
-    "ann">: Logic.ifElse (Maps.null (var "manns")) nothing (just (var "manns"))] $
-    Eithers.bind (foreignKeyE @@ var "cx" @@ var "f") (lambda "fk" $
-    Eithers.bind
-      (Maybes.maybe
-        -- No foreign key: just use avroHydraAdapter directly
-        (avroHydraAdapter @@ var "cx" @@ (project Avro._Field Avro._Field_type @@ var "f") @@ var "env")
-        -- Foreign key present: build a specialized adapter
-        (lambda "fkVal" $ lets [
-          "fkName">: project AvroEnv._AvroForeignKey AvroEnv._AvroForeignKey_typeName @@ var "fkVal",
-          "fkConstr">: project AvroEnv._AvroForeignKey AvroEnv._AvroForeignKey_constructor @@ var "fkVal"] $
-          Eithers.bind (avroHydraAdapter @@ var "cx" @@ (project Avro._Field Avro._Field_type @@ var "f") @@ var "env") (lambda "adEnvPair" $ lets [
-            "ad0">: Pairs.first (var "adEnvPair"),
-            "env1">: Pairs.second (var "adEnvPair"),
-            "elTyp">: Core.typeVariable (var "fkName"),
-            -- encodeValue: encode a JSON value to a TermVariable via the adapter
-            "encodeValue">: lambda "cx1" $ lambda "v" $
-              Eithers.bind (Coders.coderEncode (Coders.adapterCoder (var "ad0")) @@ var "cx1" @@ var "v") (lambda "encoded" $
-              Eithers.bind (termToStringE @@ var "cx1" @@ var "encoded") (lambda "s" $
-                right (Core.termVariable (var "fkConstr" @@ var "s")))),
-            -- decodeTerm: decode a TermVariable back via the adapter
-            "decodeTerm">: lambda "cx1" $ lambda "t" $
-              cases _Term (var "t") (Just (err @@ var "cx1" @@ string "expected variable")) [
-                _Term_variable>>: lambda "name_" $
-                  Eithers.bind (stringToTermE @@ var "cx1" @@ Coders.adapterTarget (var "ad0") @@ (unwrap _Name @@ var "name_")) (lambda "term_" $
-                  Coders.coderDecode (Coders.adapterCoder (var "ad0")) @@ var "cx1" @@ var "term_")],
-            -- forTypeAndCoder: build an adapter with a given type and coder
-            "forTypeAndCoder">: lambda "env2" $ lambda "ad1" $ lambda "typ" $ lambda "cdr" $
-              right (pair
-                (Coders.adapter (Coders.adapterIsLossy (var "ad1")) (project Avro._Field Avro._Field_type @@ var "f") (var "typ") (var "cdr"))
-                (var "env2"))] $
-            -- Match on the deannotated target type for foreign key handling
-            cases _Type (Strip.deannotateType @@ Coders.adapterTarget (var "ad0"))
-              (Just (err @@ var "cx" @@ Strings.cat2 (string "unsupported type annotated as foreign key: ") (string "unknown"))) [
-              _Type_maybe>>: lambda "innerTyp" $
-                cases _Type (var "innerTyp") (Just (err @@ var "cx" @@ string "expected literal type inside optional foreign key")) [
-                  _Type_literal>>: lambda "_" $
-                    var "forTypeAndCoder" @@ var "env1" @@ var "ad0"
-                      @@ (MetaTypes.optional (var "elTyp"))
-                      @@ (Coders.coder
-                        (lambda "cx2" $ lambda "json" $
-                          Eithers.map (lambda "v'" $ Core.termMaybe (just (var "v'"))) (var "encodeValue" @@ var "cx2" @@ var "json"))
-                        (var "decodeTerm"))],
-              _Type_list>>: lambda "innerTyp2" $
-                cases _Type (var "innerTyp2") (Just (err @@ var "cx" @@ string "expected literal type inside list foreign key")) [
-                  _Type_literal>>: lambda "_" $
-                    var "forTypeAndCoder" @@ var "env1" @@ var "ad0"
-                      @@ (MetaTypes.list (var "elTyp"))
-                      @@ (Coders.coder
-                        (lambda "cx2" $ lambda "json" $
-                          cases JM._Value (var "json") (Just (err @@ var "cx2" @@ string "Expected JSON array")) [
-                            JM._Value_array>>: lambda "vals" $
-                              Eithers.map (lambda "terms" $ Core.termList (var "terms"))
-                                (Eithers.mapList (lambda "jv" $ var "encodeValue" @@ var "cx2" @@ var "jv") (var "vals"))])
-                        (var "decodeTerm"))],
-              _Type_literal>>: lambda "_" $
-                var "forTypeAndCoder" @@ var "env1" @@ var "ad0"
-                  @@ var "elTyp"
-                  @@ (Coders.coder (var "encodeValue") (var "decodeTerm"))]))
-        (var "fk"))
-      (lambda "adEnv" $ lets [
-        "ad">: Pairs.first (var "adEnv"),
-        "env1">: Pairs.second (var "adEnv")] $
-        right (pair
-          (pair (project Avro._Field Avro._Field_name @@ var "f") (pair (var "f") (annotateAdapter @@ var "ann" @@ var "ad")))
-          (var "env1"))))
-
-prepareFields :: TTermDefinition (Context -> AvroEnv.AvroEnvironment -> [Avro.Field] -> Result (M.Map String (Avro.Field, AvroHydraAdapter), AvroEnv.AvroEnvironment))
-prepareFields = define "prepareFields" $
-  doc "Thread AvroEnvironment through preparing multiple fields" $
-  lambda "cx" $ lambda "env" $ lambda "fields" $
-    Lists.foldl
-      (lambda "acc" $ lambda "f" $
-        Eithers.bind (var "acc") (lambda "accPair" $ lets [
-          "m">: Pairs.first (var "accPair"),
-          "env1">: Pairs.second (var "accPair")] $
-          Eithers.bind (prepareField @@ var "cx" @@ var "env1" @@ var "f") (lambda "result" $ lets [
-            "kv">: Pairs.first (var "result"),
-            "env2">: Pairs.second (var "result"),
-            "k">: Pairs.first (var "kv"),
-            "v">: Pairs.second (var "kv")] $
-            right (pair (Maps.insert (var "k") (var "v") (var "m")) (var "env2")))))
-      (right (pair Maps.empty (var "env")))
-      (var "fields")
-
-primaryKeyE :: TTermDefinition (Context -> Avro.Field -> Maybe AvroEnv.AvroPrimaryKey)
-primaryKeyE = define "primaryKeyE" $
-  doc "Extract a primary key annotation from a field, if present" $
-  lambda "cx" $ lambda "f" $
-    Maybes.maybe
-      nothing
-      (lambda "v" $
-        Eithers.either_
-          (lambda "_" $ nothing)
-          (lambda "s" $ just $ record AvroEnv._AvroPrimaryKey [
-            AvroEnv._AvroPrimaryKey_fieldName>>: Core.name (project Avro._Field Avro._Field_name @@ var "f"),
-            AvroEnv._AvroPrimaryKey_constructor>>: patternToNameConstructor @@ var "s"])
-          (expectStringE @@ var "cx" @@ var "v"))
-      (Maps.lookup (avro_primaryKey) (project Avro._Field Avro._Field_annotations @@ var "f"))
-
-putAvroHydraAdapter :: TTermDefinition (AvroEnv.AvroQualifiedName -> AvroHydraAdapter -> AvroEnv.AvroEnvironment -> AvroEnv.AvroEnvironment)
-putAvroHydraAdapter = define "putAvroHydraAdapter" $
-  doc "Store an adapter in the environment by qualified name" $
-  lambda "qname" $ lambda "ad" $ lambda "env" $
-    record AvroEnv._AvroEnvironment [
-      AvroEnv._AvroEnvironment_namedAdapters>>:
-        Maps.insert (var "qname") (var "ad")
-          (project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namedAdapters @@ var "env"),
-      AvroEnv._AvroEnvironment_namespace>>:
-        project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_namespace @@ var "env",
-      AvroEnv._AvroEnvironment_elements>>:
-        project AvroEnv._AvroEnvironment AvroEnv._AvroEnvironment_elements @@ var "env"]
-
-requireStringE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result String)
-requireStringE = define "requireStringE" $
-  doc "Look up a required string attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Maybes.maybe
-      (err @@ var "cx" @@ (Strings.cat $ list [string "required attribute ", Literals.showString (var "fname"), string " not found"]))
-      (lambda "v" $ expectStringE @@ var "cx" @@ var "v")
-      (Maps.lookup (var "fname") (var "m"))
-
-rewriteAvroSchemaM :: TTermDefinition (((Avro.Schema -> Result Avro.Schema) -> Avro.Schema -> Result Avro.Schema) -> Avro.Schema -> Result Avro.Schema)
-rewriteAvroSchemaM = define "rewriteAvroSchemaM" $
-  doc "Recursively rewrite an Avro schema using a monadic transformation function" $
-  lambda "f" $ lambda "schema" $ lets [
-    "recurse">: rewriteAvroSchemaM @@ var "f",
-    -- fsub: structural descent into schema subtypes
-    "fsub">: lambda "s" $
-      cases Avro._Schema (var "s") (Just (right (var "s"))) [
-        Avro._Schema_array>>: lambda "arr" $
-          Eithers.map
-            (lambda "els'" $ inject Avro._Schema Avro._Schema_array (record Avro._Array [
-              Avro._Array_items>>: var "els'"]))
-            (var "recurse" @@ (project Avro._Array Avro._Array_items @@ var "arr")),
-        Avro._Schema_map>>: lambda "mp" $
-          Eithers.map
-            (lambda "vs'" $ inject Avro._Schema Avro._Schema_map (record Avro._Map [
-              Avro._Map_values>>: var "vs'"]))
-            (var "recurse" @@ (project Avro._Map Avro._Map_values @@ var "mp")),
-        Avro._Schema_named>>: lambda "n" $
-          Eithers.map
-            (lambda "nt'" $ inject Avro._Schema Avro._Schema_named (record Avro._Named [
-              Avro._Named_name>>: project Avro._Named Avro._Named_name @@ var "n",
-              Avro._Named_namespace>>: project Avro._Named Avro._Named_namespace @@ var "n",
-              Avro._Named_aliases>>: project Avro._Named Avro._Named_aliases @@ var "n",
-              Avro._Named_doc>>: project Avro._Named Avro._Named_doc @@ var "n",
-              Avro._Named_type>>: var "nt'",
-              Avro._Named_annotations>>: project Avro._Named Avro._Named_annotations @@ var "n"]))
-            (cases Avro._NamedType (project Avro._Named Avro._Named_type @@ var "n")
-              (Just (right (project Avro._Named Avro._Named_type @@ var "n"))) [
-              Avro._NamedType_record>>: lambda "r" $
-                Eithers.map
-                  (lambda "fields'" $ inject Avro._NamedType Avro._NamedType_record (record Avro._Record [
-                    Avro._Record_fields>>: var "fields'"]))
-                  (Eithers.mapList
-                    (lambda "fld" $
-                      Eithers.map
-                        (lambda "t'" $ record Avro._Field [
-                          Avro._Field_name>>: project Avro._Field Avro._Field_name @@ var "fld",
-                          Avro._Field_doc>>: project Avro._Field Avro._Field_doc @@ var "fld",
-                          Avro._Field_type>>: var "t'",
-                          Avro._Field_default>>: project Avro._Field Avro._Field_default @@ var "fld",
-                          Avro._Field_order>>: project Avro._Field Avro._Field_order @@ var "fld",
-                          Avro._Field_aliases>>: project Avro._Field Avro._Field_aliases @@ var "fld",
-                          Avro._Field_annotations>>: project Avro._Field Avro._Field_annotations @@ var "fld"])
-                        (var "recurse" @@ (project Avro._Field Avro._Field_type @@ var "fld")))
-                    (project Avro._Record Avro._Record_fields @@ var "r"))]),
-        Avro._Schema_union>>: lambda "u" $
-          Eithers.map
-            (lambda "schemas'" $ inject Avro._Schema Avro._Schema_union (wrap Avro._Union (var "schemas'")))
-            (Eithers.mapList (lambda "us" $ var "recurse" @@ var "us")
-              (unwrap Avro._Union @@ var "u"))]] $
-    var "f" @@ var "fsub" @@ var "schema"
-
-showQname :: TTermDefinition (AvroEnv.AvroQualifiedName -> String)
-showQname = define "showQname" $
-  doc "Convert an Avro qualified name to a display string" $
-  lambda "qname" $ lets [
-    "mns">: project AvroEnv._AvroQualifiedName AvroEnv._AvroQualifiedName_namespace @@ var "qname",
-    "local">: project AvroEnv._AvroQualifiedName AvroEnv._AvroQualifiedName_name @@ var "qname"] $
-    Strings.cat2
-      (Maybes.maybe (string "") (lambda "ns" $ Strings.cat2 (var "ns") (string ".")) (var "mns"))
-      (var "local")
-
-stringToTermE :: TTermDefinition (Context -> Type -> String -> Result Term)
-stringToTermE = define "stringToTermE" $
-  doc "Parse a string into a term of the expected type" $
-  lambda "cx" $ lambda "typ" $ lambda "s" $ lets [
-    "readErr">: err @@ var "cx" @@ string "failed to read value",
-    "readAndWrap">: lambda "reader" $ lambda "wrapper" $
-      Maybes.maybe (var "readErr") (lambda "v" $ right (Core.termLiteral (var "wrapper" @@ var "v"))) (var "reader" @@ var "s")] $
-    cases _Type (Strip.deannotateType @@ var "typ")
-      (Just (unexpectedE @@ var "cx" @@ string "literal type" @@ string "other")) [
-      _Type_literal>>: lambda "lt" $
-        cases _LiteralType (var "lt")
-          (Just (unexpectedE @@ var "cx" @@ string "literal type" @@ string "other literal type")) [
-          _LiteralType_boolean>>: constant $
-            var "readAndWrap" @@ (lambda "x" $ Literals.readBoolean (var "x")) @@ (lambda "b" $ Core.literalBoolean (var "b")),
-          _LiteralType_integer>>: lambda "it" $
-            cases _IntegerType (var "it") Nothing [
-              _IntegerType_bigint>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readBigint (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueBigint (var "i")),
-              _IntegerType_int8>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readInt8 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueInt8 (var "i")),
-              _IntegerType_int16>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readInt16 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueInt16 (var "i")),
-              _IntegerType_int32>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readInt32 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueInt32 (var "i")),
-              _IntegerType_int64>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readInt64 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueInt64 (var "i")),
-              _IntegerType_uint8>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readUint8 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueUint8 (var "i")),
-              _IntegerType_uint16>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readUint16 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueUint16 (var "i")),
-              _IntegerType_uint32>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readUint32 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueUint32 (var "i")),
-              _IntegerType_uint64>>: constant $
-                var "readAndWrap" @@ (lambda "x" $ Literals.readUint64 (var "x")) @@ (lambda "i" $ Core.literalInteger $ Core.integerValueUint64 (var "i"))],
-          _LiteralType_string>>: constant $
-            right (Core.termLiteral $ Core.literalString (var "s"))]]
-
-termToStringE :: TTermDefinition (Context -> Term -> Result String)
-termToStringE = define "termToStringE" $
-  doc "Convert a literal term to its string representation" $
-  lambda "cx" $ lambda "term" $
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just (unexpectedE @@ var "cx" @@ string "literal value" @@ string "other")) [
-      _Term_literal>>: lambda "l" $
-        cases _Literal (var "l")
-          (Just (unexpectedE @@ var "cx" @@ string "boolean, integer, or string" @@ string "other literal")) [
-          _Literal_boolean>>: lambda "b" $
-            right (Literals.showBoolean (var "b")),
-          _Literal_integer>>: lambda "iv" $
-            right (cases _IntegerValue (var "iv") Nothing [
-              _IntegerValue_bigint>>: lambda "i" $ Literals.showBigint (var "i"),
-              _IntegerValue_int8>>: lambda "i" $ Literals.showInt8 (var "i"),
-              _IntegerValue_int16>>: lambda "i" $ Literals.showInt16 (var "i"),
-              _IntegerValue_int32>>: lambda "i" $ Literals.showInt32 (var "i"),
-              _IntegerValue_int64>>: lambda "i" $ Literals.showInt64 (var "i"),
-              _IntegerValue_uint8>>: lambda "i" $ Literals.showUint8 (var "i"),
-              _IntegerValue_uint16>>: lambda "i" $ Literals.showUint16 (var "i"),
-              _IntegerValue_uint32>>: lambda "i" $ Literals.showUint32 (var "i"),
-              _IntegerValue_uint64>>: lambda "i" $ Literals.showUint64 (var "i")]),
-          _Literal_string>>: lambda "s" $
-            right (var "s")],
-      _Term_maybe>>: lambda "ot" $
-        Maybes.maybe
-          (unexpectedE @@ var "cx" @@ string "literal value" @@ string "Nothing")
-          (lambda "term'" $ termToStringE @@ var "cx" @@ var "term'")
-          (var "ot")]
-
-unexpectedE :: TTermDefinition (Context -> String -> String -> Result a)
-unexpectedE = define "unexpectedE" $
-  doc "Construct an error for unexpected values" $
-  lambda "cx" $ lambda "expected" $ lambda "found" $
-    err @@ var "cx" @@ (Strings.cat $ list [string "Expected ", var "expected", string ", found: ", var "found"])
-
--- | JSON extraction helpers
-
--- Note: the error branches in these three functions are dropped during code generation because the
--- success branches don't constrain the `cx` parameter, so inference generalizes it to `t0` and the
--- code generator eliminates type-incompatible default branches. The functions remain safe because
--- callers (foreignKeyE, requireStringE, optStringE) always pass the correct JSON value types.
--- This mirrors the staging behavior (partial patterns with explicit error branches) but with
--- implicit rather than explicit partiality.
diff --git a/src/main/haskell/Hydra/Sources/Avro/Encoder.hs b/src/main/haskell/Hydra/Sources/Avro/Encoder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/Encoder.hs
+++ /dev/null
@@ -1,759 +0,0 @@
-module Hydra.Sources.Avro.Encoder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Scientific                           as Sci
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Avro.Schema as Avro
-import qualified Hydra.Json.Model as JM
-import qualified Hydra.Sources.Avro.Schema as AvroSchema
-import qualified Hydra.Avro.Environment as AvroEnv
-
--- Local type aliases
-type Result a = Either Error a
-type HydraAvroAdapter = Adapter Type Avro.Schema Term JM.Value
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-avroSchemaPhantomNs :: Namespace
-avroSchemaPhantomNs = Namespace "hydra.avro.schema"
-
-jsonModelNs :: Namespace
-jsonModelNs = Namespace "hydra.json.model"
-
-avroEnvironmentNs :: Namespace
-avroEnvironmentNs = Namespace "hydra.avro.environment"
-
-ns :: Namespace
-ns = Namespace "hydra.avro.encoder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, Strip.ns],
-            moduleTypeDependencies = (avroEnvironmentNs:AvroSchema.ns:jsonModelNs:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Hydra-to-Avro encoder: converts Hydra types and terms to Avro schemas and JSON values"}
-  where
-    definitions = [
-      toDefinition buildAvroField,
-      toDefinition emptyEncodeEnvironment,
-      toDefinition encodeType,
-      toDefinition encodeTypeInner,
-      toDefinition encodeTypeWithEnv,
-      toDefinition enumAdapter,
-      toDefinition err,
-      toDefinition extractAnnotations,
-      toDefinition floatAdapter,
-      toDefinition floatValueToDouble,
-      toDefinition foldFieldAdapters,
-      toDefinition hydraAnnotationsToAvro,
-      toDefinition hydraAvroAdapter,
-      toDefinition hydraNameToAvroName,
-      toDefinition integerAdapter,
-      toDefinition integerValueToDouble,
-      toDefinition literalAdapter,
-      toDefinition localName,
-      toDefinition nameNamespace,
-      toDefinition namedTypeAdapter,
-      toDefinition recordTermCoder,
-      toDefinition termToJsonValue,
-      toDefinition typeToName,
-      toDefinition unionAsRecordAdapter]
-
-
-buildAvroField :: TTermDefinition ((Name, HydraAvroAdapter) -> Avro.Field)
-buildAvroField = define "buildAvroField" $
-  doc "Build an Avro field from a name-adapter pair" $
-  lambda "nameAd" $ lets [
-    "name_">: Pairs.first (var "nameAd"),
-    "ad">: Pairs.second (var "nameAd")] $
-    record Avro._Field [
-      Avro._Field_name>>: localName @@ var "name_",
-      Avro._Field_doc>>: nothing,
-      Avro._Field_type>>: Coders.adapterTarget (var "ad"),
-      Avro._Field_default>>: nothing,
-      Avro._Field_order>>: nothing,
-      Avro._Field_aliases>>: nothing,
-      Avro._Field_annotations>>: Maps.empty]
-
-emptyEncodeEnvironment :: TTermDefinition (M.Map Name Type -> AvroEnv.EncodeEnvironment)
-emptyEncodeEnvironment = define "emptyEncodeEnvironment" $
-  doc "Create an empty encode environment with the given type map" $
-  lambda "typeMap" $
-    record AvroEnv._EncodeEnvironment [
-      AvroEnv._EncodeEnvironment_typeMap>>: var "typeMap",
-      AvroEnv._EncodeEnvironment_emitted>>: Maps.empty]
-
-encodeType :: TTermDefinition (Context -> M.Map Name Type -> Name -> Result HydraAvroAdapter)
-encodeType = define "encodeType" $
-  doc "Encode a Hydra type to an Avro schema adapter, given the type map and a root name" $
-  lambda "cx" $ lambda "typeMap" $ lambda "name_" $
-    Eithers.map (lambda "adEnv" $ Pairs.first (var "adEnv"))
-      (encodeTypeWithEnv @@ var "cx" @@ var "name_" @@ (emptyEncodeEnvironment @@ var "typeMap"))
-
-encodeTypeInner :: TTermDefinition (Context -> Maybe Name -> Type -> AvroEnv.EncodeEnvironment -> Result (HydraAvroAdapter, AvroEnv.EncodeEnvironment))
-encodeTypeInner = define "encodeTypeInner" $
-  doc "Core encoding logic: recursively encode a Hydra type to an Avro schema" $
-  lambda "cx" $ lambda "mName" $ lambda "typ" $ lambda "env" $ lets [
-    "annResult">: extractAnnotations @@ var "typ",
-    "annotations">: Pairs.first (var "annResult"),
-    "bareType">: Pairs.second (var "annResult"),
-    "simpleAdapter">: lambda "target" $ lambda "lossy" $ lambda "encode" $ lambda "decode" $
-      right (pair
-        (Coders.adapter (var "lossy") (var "typ") (var "target") (Coders.coder (var "encode") (var "decode")))
-        (var "env"))] $
-    cases _Type (var "bareType") (Just (err @@ var "cx" @@ string "unsupported Hydra type for Avro encoding")) [
-      _Type_unit>>: constant $
-        var "simpleAdapter"
-          @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_null)
-          @@ boolean False
-          @@ (lambda "_cx" $ lambda "_t" $ right (injectUnit JM._Value JM._Value_null))
-          @@ (lambda "_cx" $ lambda "_j" $ right Core.termUnit),
-      _Type_literal>>: lambda "lt" $
-        Eithers.map (lambda "ad" $ pair (var "ad") (var "env"))
-          (literalAdapter @@ var "cx" @@ var "typ" @@ var "lt"),
-      _Type_list>>: lambda "innerType" $
-        Eithers.bind (encodeTypeInner @@ var "cx" @@ (nothing :: TTerm (Maybe Name)) @@ var "innerType" @@ var "env") (lambda "adEnv" $ lets [
-          "innerAd">: Pairs.first (var "adEnv"),
-          "env1">: Pairs.second (var "adEnv")] $
-          right (pair
-            (Coders.adapter (Coders.adapterIsLossy (var "innerAd")) (var "typ")
-              (inject Avro._Schema Avro._Schema_array (record Avro._Array [
-                Avro._Array_items>>: Coders.adapterTarget (var "innerAd")]))
-              (Coders.coder
-                (lambda "cx1" $ lambda "t" $
-                  cases _Term (var "t") Nothing [
-                    _Term_list>>: lambda "elements" $
-                      Eithers.map (lambda "jvs" $ inject JM._Value JM._Value_array (var "jvs"))
-                        (Eithers.mapList (lambda "el" $ Coders.coderEncode (Coders.adapterCoder (var "innerAd")) @@ var "cx1" @@ var "el") (var "elements"))])
-                (lambda "cx1" $ lambda "j" $
-                  cases JM._Value (var "j") Nothing [
-                    JM._Value_array>>: lambda "elements" $
-                      Eithers.map (lambda "ts" $ Core.termList (var "ts"))
-                        (Eithers.mapList (lambda "el" $ Coders.coderDecode (Coders.adapterCoder (var "innerAd")) @@ var "cx1" @@ var "el") (var "elements"))])))
-            (var "env1"))),
-      _Type_map>>: lambda "mt" $ lets [
-        "keyType">: project _MapType _MapType_keys @@ var "mt",
-        "valType">: project _MapType _MapType_values @@ var "mt"] $
-        cases _Type (Strip.deannotateType @@ var "keyType")
-          (Just (err @@ var "cx" @@ string "Avro maps require string keys")) [
-          _Type_literal>>: lambda "lt" $
-            cases _LiteralType (var "lt") (Just (err @@ var "cx" @@ string "Avro maps require string keys")) [
-              _LiteralType_string>>: constant $
-                Eithers.bind (encodeTypeInner @@ var "cx" @@ (nothing :: TTerm (Maybe Name)) @@ var "valType" @@ var "env") (lambda "adEnv" $ lets [
-                  "valAd">: Pairs.first (var "adEnv"),
-                  "env1">: Pairs.second (var "adEnv")] $
-                  right (pair
-                    (Coders.adapter (Coders.adapterIsLossy (var "valAd")) (var "typ")
-                      (inject Avro._Schema Avro._Schema_map (record Avro._Map [
-                        Avro._Map_values>>: Coders.adapterTarget (var "valAd")]))
-                      (Coders.coder
-                        (lambda "cx1" $ lambda "t" $
-                          cases _Term (var "t") Nothing [
-                            _Term_map>>: lambda "entries" $ lets [
-                              "encodeEntry">: lambda "entry" $ lets [
-                                "k">: Pairs.first (var "entry"),
-                                "v">: Pairs.second (var "entry")] $
-                                Eithers.bind (ExtractCore.string @@ Graph.emptyGraph @@ var "k") (lambda "kStr" $
-                                Eithers.map (lambda "vJson" $ pair (var "kStr") (var "vJson"))
-                                  (Coders.coderEncode (Coders.adapterCoder (var "valAd")) @@ var "cx1" @@ var "v"))] $
-                              Eithers.map (lambda "pairs" $ inject JM._Value JM._Value_object (Maps.fromList (var "pairs")))
-                                (Eithers.mapList (var "encodeEntry") (Maps.toList (var "entries")))])
-                        (lambda "cx1" $ lambda "j" $
-                          cases JM._Value (var "j") Nothing [
-                            JM._Value_object>>: lambda "m" $ lets [
-                              "decodeEntry">: lambda "entry" $ lets [
-                                "k">: Pairs.first (var "entry"),
-                                "v">: Pairs.second (var "entry")] $
-                                Eithers.map (lambda "vTerm" $ pair (MetaTerms.stringLift (var "k")) (var "vTerm"))
-                                  (Coders.coderDecode (Coders.adapterCoder (var "valAd")) @@ var "cx1" @@ var "v")] $
-                              Eithers.map (lambda "pairs" $ Core.termMap (Maps.fromList (var "pairs")))
-                                (Eithers.mapList (var "decodeEntry") (Maps.toList (var "m")))])))
-                    (var "env1")))]],
-      _Type_record>>: lambda "fieldTypes" $
-        namedTypeAdapter @@ var "cx" @@ var "typ" @@ var "mName" @@ var "annotations" @@ var "fieldTypes" @@ var "env"
-          @@ (lambda "avroFields" $ inject Avro._NamedType Avro._NamedType_record (record Avro._Record [
-            Avro._Record_fields>>: var "avroFields"]))
-          @@ recordTermCoder,
-      _Type_union>>: lambda "fieldTypes" $ lets [
-        "allUnit">: Lists.foldl
-          (lambda "b" $ lambda "ft" $ Logic.and (var "b")
-            (cases _Type (project _FieldType _FieldType_type @@ var "ft") (Just (boolean False)) [
-              _Type_unit>>: constant (boolean True)]))
-          (boolean True) (var "fieldTypes")] $
-        Logic.ifElse (var "allUnit")
-          (enumAdapter @@ var "cx" @@ var "typ" @@ var "mName" @@ var "annotations" @@ var "fieldTypes" @@ var "env")
-          (unionAsRecordAdapter @@ var "cx" @@ var "typ" @@ var "mName" @@ var "annotations" @@ var "fieldTypes" @@ var "env"),
-      _Type_maybe>>: lambda "innerType" $
-        Eithers.bind (encodeTypeInner @@ var "cx" @@ (nothing :: TTerm (Maybe Name)) @@ var "innerType" @@ var "env") (lambda "adEnv" $ lets [
-          "innerAd">: Pairs.first (var "adEnv"),
-          "env1">: Pairs.second (var "adEnv")] $
-          right (pair
-            (Coders.adapter (Coders.adapterIsLossy (var "innerAd")) (var "typ")
-              (inject Avro._Schema Avro._Schema_union (wrap Avro._Union (list [
-                inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_null),
-                Coders.adapterTarget (var "innerAd")])))
-              (Coders.coder
-                (lambda "cx1" $ lambda "t" $
-                  cases _Term (var "t") Nothing [
-                    _Term_maybe>>: lambda "ot" $
-                      Maybes.maybe
-                        (right (injectUnit JM._Value JM._Value_null))
-                        (lambda "inner" $ Coders.coderEncode (Coders.adapterCoder (var "innerAd")) @@ var "cx1" @@ var "inner")
-                        (var "ot")])
-                (lambda "cx1" $ lambda "j" $
-                  cases JM._Value (var "j") (Just (
-                    Eithers.map (lambda "t" $ Core.termMaybe (just (var "t")))
-                      (Coders.coderDecode (Coders.adapterCoder (var "innerAd")) @@ var "cx1" @@ var "j"))) [
-                    JM._Value_null>>: constant (right (Core.termMaybe nothing))])))
-            (var "env1"))),
-      _Type_wrap>>: lambda "inner" $
-        encodeTypeInner @@ var "cx" @@ var "mName" @@ var "inner" @@ var "env",
-      _Type_variable>>: lambda "name_" $
-        Maybes.maybe
-          (Maybes.maybe
-            (err @@ var "cx" @@ Strings.cat2 (string "referenced type not found: ") (unwrap _Name @@ var "name_"))
-            (lambda "refType" $ encodeTypeInner @@ var "cx" @@ just (var "name_") @@ var "refType" @@ var "env")
-            (Maps.lookup (var "name_") (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_typeMap @@ var "env")))
-          (lambda "existingAd" $
-            right (pair
-              (Coders.adapterWithTarget (var "existingAd") (inject Avro._Schema Avro._Schema_reference (localName @@ var "name_")))
-              (var "env")))
-          (Maps.lookup (var "name_") (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_emitted @@ var "env"))
-    ]
-
-encodeTypeWithEnv :: TTermDefinition (Context -> Name -> AvroEnv.EncodeEnvironment -> Result (HydraAvroAdapter, AvroEnv.EncodeEnvironment))
-encodeTypeWithEnv = define "encodeTypeWithEnv" $
-  doc "Encode with full environment threading. Returns the adapter and updated environment" $
-  lambda "cx" $ lambda "name_" $ lambda "env" $
-    Maybes.maybe
-      (err @@ var "cx" @@ Strings.cat2 (string "type not found in type map: ") (Literals.showString (unwrap _Name @@ var "name_")))
-      (lambda "typ" $ encodeTypeInner @@ var "cx" @@ just (var "name_") @@ var "typ" @@ var "env")
-      (Maps.lookup (var "name_") (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_typeMap @@ var "env"))
-
-enumAdapter :: TTermDefinition (Context -> Type -> Maybe Name -> M.Map Name Term -> [FieldType] -> AvroEnv.EncodeEnvironment -> Result (HydraAvroAdapter, AvroEnv.EncodeEnvironment))
-enumAdapter = define "enumAdapter" $
-  doc "Adapter for all-unit union types (enums)" $
-  lambda "cx" $ lambda "typ" $ lambda "mName" $ lambda "annotations" $ lambda "fieldTypes" $ lambda "env0" $ lets [
-    "symbols">: Lists.map (lambda "ft" $ localName @@ (project _FieldType _FieldType_name @@ var "ft")) (var "fieldTypes"),
-    "typeName">: Maybes.fromMaybe (typeToName @@ var "typ") (var "mName"),
-    "avroAnnotations">: hydraAnnotationsToAvro @@ var "annotations",
-    "avroSchema">: inject Avro._Schema Avro._Schema_named (record Avro._Named [
-      Avro._Named_name>>: localName @@ var "typeName",
-      Avro._Named_namespace>>: nameNamespace @@ var "typeName",
-      Avro._Named_aliases>>: nothing,
-      Avro._Named_doc>>: nothing,
-      Avro._Named_type>>: inject Avro._NamedType Avro._NamedType_enum (record Avro._Enum [
-        Avro._Enum_symbols>>: var "symbols",
-        Avro._Enum_default>>: nothing]),
-      Avro._Named_annotations>>: var "avroAnnotations"]),
-    "adapter_">: Coders.adapter (boolean False) (var "typ") (var "avroSchema")
-      (Coders.coder
-        (lambda "cx1" $ lambda "t" $
-          cases _Term (var "t") (Just (err @@ var "cx1" @@ string "expected union term for enum")) [
-            _Term_inject>>: lambda "inj" $ lets [
-              "fname">: project _Injection _Injection_field @@ var "inj"] $
-              right (inject JM._Value JM._Value_string (localName @@ (project _Field _Field_name @@ var "fname")))])
-        (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_string>>: lambda "s" $
-              right (Core.termInject (Core.injection (var "typeName") (Core.field (Core.name (var "s")) Core.termUnit)))])),
-    "env1">: record AvroEnv._EncodeEnvironment [
-      AvroEnv._EncodeEnvironment_typeMap>>: project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_typeMap @@ var "env0",
-      AvroEnv._EncodeEnvironment_emitted>>: Maps.insert (var "typeName") (var "adapter_")
-        (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_emitted @@ var "env0")]] $
-    right (pair (var "adapter_") (var "env1"))
-
-err :: TTermDefinition (Context -> String -> Result a)
-err = define "err" $
-  doc "Construct an error result with a message in context" $
-  lambda "cx" $ lambda "msg" $
-    Ctx.failInContext (Error.errorOther $ Error.otherError (var "msg")) (var "cx")
-
-extractAnnotations :: TTermDefinition (Type -> (M.Map Name Term, Type))
-extractAnnotations = define "extractAnnotations" $
-  doc "Extract annotations from a potentially annotated type" $
-  lambda "typ" $
-    cases _Type (var "typ") (Just (pair Maps.empty (var "typ"))) [
-      _Type_annotated>>: lambda "at" $ lets [
-        "inner">: project _AnnotatedType _AnnotatedType_body @@ var "at",
-        "anns">: project _AnnotatedType _AnnotatedType_annotation @@ var "at",
-        "innerResult">: extractAnnotations @@ var "inner",
-        "innerAnns">: Pairs.first (var "innerResult"),
-        "bareType">: Pairs.second (var "innerResult")] $
-        pair (Maps.union (var "anns") (var "innerAnns")) (var "bareType")]
-
-floatAdapter :: TTermDefinition (Context -> Type -> FloatType -> Result HydraAvroAdapter)
-floatAdapter = define "floatAdapter" $
-  doc "Create an adapter for float types" $
-  lambda "cx" $ lambda "typ" $ lambda "ft" $ lets [
-    "simple">: lambda "target" $ lambda "lossy" $ lambda "encode" $ lambda "decode" $
-      right (Coders.adapter (var "lossy") (var "typ") (var "target") (Coders.coder (var "encode") (var "decode")))] $
-    cases _FloatType (var "ft") (Just $
-      var "simple"
-        @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_double)
-        @@ boolean True
-        @@ (lambda "_cx" $ lambda "t" $
-          cases _Term (var "t") Nothing [
-            _Term_literal>>: lambda "lit" $
-              cases _Literal (var "lit") Nothing [
-                _Literal_float>>: lambda "fv" $ right (inject JM._Value JM._Value_number (floatValueToDouble @@ var "fv"))]])
-        @@ (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalFloat (Core.floatValueFloat64 (Literals.decimalToFloat64 (var "d")))))])) [
-    _FloatType_float32>>: constant $
-      var "simple"
-        @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_float)
-        @@ boolean False
-        @@ (lambda "_cx" $ lambda "t" $
-          Eithers.map (lambda "f" $ inject JM._Value JM._Value_number (Literals.float32ToDecimal (var "f")))
-            (ExtractCore.float32 @@ Graph.emptyGraph @@ var "t"))
-        @@ (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalFloat (Core.floatValueFloat32 (Literals.decimalToFloat32 (var "d")))))]),
-    _FloatType_float64>>: constant $
-      var "simple"
-        @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_double)
-        @@ boolean False
-        @@ (lambda "_cx" $ lambda "t" $
-          Eithers.map (lambda "d" $ inject JM._Value JM._Value_number (Literals.float64ToDecimal (var "d")))
-            (ExtractCore.float64 @@ Graph.emptyGraph @@ var "t"))
-        @@ (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalFloat (Core.floatValueFloat64 (Literals.decimalToFloat64 (var "d")))))])]
-
-floatValueToDouble :: TTermDefinition (FloatValue -> Sci.Scientific)
-floatValueToDouble = define "floatValueToDouble" $
-  doc "Convert any float value to a JSON decimal number" $
-  lambda "fv" $
-    cases _FloatValue (var "fv") Nothing [
-      _FloatValue_bigfloat>>: lambda "d" $ Literals.float64ToDecimal (Literals.bigfloatToFloat64 (var "d")),
-      _FloatValue_float32>>: lambda "f" $ Literals.float32ToDecimal (var "f"),
-      _FloatValue_float64>>: lambda "d" $ Literals.float64ToDecimal (var "d")]
-
-foldFieldAdapters :: TTermDefinition (Context -> [FieldType] -> AvroEnv.EncodeEnvironment -> Result ([(Name, HydraAvroAdapter)], AvroEnv.EncodeEnvironment))
-foldFieldAdapters = define "foldFieldAdapters" $
-  doc "Fold over field types, building adapters and threading the environment" $
-  lambda "cx" $ lambda "fieldTypes" $ lambda "env0" $
-    Lists.foldl
-      (lambda "acc" $ lambda "ft" $
-        Eithers.bind (var "acc") (lambda "accPair" $ lets [
-          "soFar">: Pairs.first (var "accPair"),
-          "env1">: Pairs.second (var "accPair"),
-          "fname">: project _FieldType _FieldType_name @@ var "ft",
-          "ftype">: project _FieldType _FieldType_type @@ var "ft"] $
-          Eithers.bind (encodeTypeInner @@ var "cx" @@ (nothing :: TTerm (Maybe Name)) @@ var "ftype" @@ var "env1") (lambda "adEnv" $ lets [
-            "ad">: Pairs.first (var "adEnv"),
-            "env2">: Pairs.second (var "adEnv")] $
-            right (pair (Lists.concat2 (var "soFar") (list [pair (var "fname") (var "ad")])) (var "env2")))))
-      (right (pair (Phantoms.list emptyFieldAdapters) (var "env0")))
-      (var "fieldTypes")
-  where
-    emptyFieldAdapters :: [TTerm (Name, HydraAvroAdapter)]
-    emptyFieldAdapters = []
-
-hydraAnnotationsToAvro :: TTermDefinition (M.Map Name Term -> M.Map String JM.Value)
-hydraAnnotationsToAvro = define "hydraAnnotationsToAvro" $
-  doc "Convert Hydra annotations to Avro annotation map" $
-  lambda "anns" $
-    Maps.fromList (Lists.map
-      (lambda "entry" $ lets [
-        "k">: Pairs.first (var "entry"),
-        "v">: Pairs.second (var "entry")] $
-        pair (unwrap _Name @@ var "k") (termToJsonValue @@ var "v"))
-      (Maps.toList (var "anns")))
-
-hydraAvroAdapter :: TTermDefinition (Context -> M.Map Name Type -> Type -> Result HydraAvroAdapter)
-hydraAvroAdapter = define "hydraAvroAdapter" $
-  doc "Encode a single type without a type map (for simple/anonymous types)" $
-  lambda "cx" $ lambda "typeMap" $ lambda "typ" $
-    Eithers.map (lambda "adEnv" $ Pairs.first (var "adEnv"))
-      (encodeTypeInner @@ var "cx" @@ (nothing :: TTerm (Maybe Name)) @@ var "typ" @@ (emptyEncodeEnvironment @@ var "typeMap"))
-
-hydraNameToAvroName :: TTermDefinition (Name -> (String, Maybe String))
-hydraNameToAvroName = define "hydraNameToAvroName" $
-  doc "Convert a Hydra Name to an Avro qualified name (local name, optional namespace)" $
-  lambda "name_" $
-    pair (localName @@ var "name_") (nameNamespace @@ var "name_")
-
-integerAdapter :: TTermDefinition (Context -> Type -> IntegerType -> Result HydraAvroAdapter)
-integerAdapter = define "integerAdapter" $
-  doc "Create an adapter for integer types" $
-  lambda "cx" $ lambda "typ" $ lambda "it" $ lets [
-    "simple">: lambda "target" $ lambda "lossy" $ lambda "encode" $ lambda "decode" $
-      right (Coders.adapter (var "lossy") (var "typ") (var "target") (Coders.coder (var "encode") (var "decode")))] $
-    cases _IntegerType (var "it") (Just $
-      var "simple"
-        @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_long)
-        @@ boolean True
-        @@ (lambda "_cx" $ lambda "t" $
-          cases _Term (var "t") Nothing [
-            _Term_literal>>: lambda "lit" $
-              cases _Literal (var "lit") Nothing [
-                _Literal_integer>>: lambda "iv" $ right (inject JM._Value JM._Value_number (integerValueToDouble @@ var "iv"))]])
-        @@ (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalInteger (Core.integerValueInt64 (Literals.bigintToInt64 (Literals.decimalToBigint (var "d"))))))])) [
-    _IntegerType_int32>>: constant $
-      var "simple"
-        @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_int)
-        @@ boolean False
-        @@ (lambda "_cx" $ lambda "t" $
-          Eithers.map (lambda "i" $ inject JM._Value JM._Value_number (Literals.bigintToDecimal (Literals.int32ToBigint (var "i"))))
-            (ExtractCore.int32 @@ Graph.emptyGraph @@ var "t"))
-        @@ (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalInteger (Core.integerValueInt32 (Literals.bigintToInt32 (Literals.decimalToBigint (var "d"))))))]),
-    _IntegerType_int64>>: constant $
-      var "simple"
-        @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_long)
-        @@ boolean False
-        @@ (lambda "_cx" $ lambda "t" $
-          Eithers.map (lambda "i" $ inject JM._Value JM._Value_number (Literals.bigintToDecimal (Literals.int64ToBigint (var "i"))))
-            (ExtractCore.int64 @@ Graph.emptyGraph @@ var "t"))
-        @@ (lambda "_cx" $ lambda "j" $
-          cases JM._Value (var "j") Nothing [
-            JM._Value_number>>: lambda "d" $ right (Core.termLiteral (Core.literalInteger (Core.integerValueInt64 (Literals.bigintToInt64 (Literals.decimalToBigint (var "d"))))))])]
-
-integerValueToDouble :: TTermDefinition (IntegerValue -> Sci.Scientific)
-integerValueToDouble = define "integerValueToDouble" $
-  doc "Convert any integer value to a JSON decimal number" $
-  lambda "iv" $
-    cases _IntegerValue (var "iv") Nothing [
-      _IntegerValue_bigint>>: lambda "i" $ Literals.bigintToDecimal (var "i"),
-      _IntegerValue_int8>>: lambda "i" $ Literals.bigintToDecimal (Literals.int8ToBigint (var "i")),
-      _IntegerValue_int16>>: lambda "i" $ Literals.bigintToDecimal (Literals.int16ToBigint (var "i")),
-      _IntegerValue_int32>>: lambda "i" $ Literals.bigintToDecimal (Literals.int32ToBigint (var "i")),
-      _IntegerValue_int64>>: lambda "i" $ Literals.bigintToDecimal (Literals.int64ToBigint (var "i")),
-      _IntegerValue_uint8>>: lambda "i" $ Literals.bigintToDecimal (Literals.uint8ToBigint (var "i")),
-      _IntegerValue_uint16>>: lambda "i" $ Literals.bigintToDecimal (Literals.uint16ToBigint (var "i")),
-      _IntegerValue_uint32>>: lambda "i" $ Literals.bigintToDecimal (Literals.uint32ToBigint (var "i")),
-      _IntegerValue_uint64>>: lambda "i" $ Literals.bigintToDecimal (Literals.uint64ToBigint (var "i"))]
-
-literalAdapter :: TTermDefinition (Context -> Type -> LiteralType -> Result HydraAvroAdapter)
-literalAdapter = define "literalAdapter" $
-  doc "Create an adapter for literal types" $
-  lambda "cx" $ lambda "typ" $ lambda "lt" $ lets [
-    "simple">: lambda "target" $ lambda "lossy" $ lambda "encode" $ lambda "decode" $
-      right (Coders.adapter (var "lossy") (var "typ") (var "target") (Coders.coder (var "encode") (var "decode")))] $
-    cases _LiteralType (var "lt") Nothing [
-      _LiteralType_boolean>>: constant $
-        var "simple"
-          @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_boolean)
-          @@ boolean False
-          @@ (lambda "_cx" $ lambda "t" $
-            cases _Term (var "t") Nothing [
-              _Term_literal>>: lambda "lit" $
-                cases _Literal (var "lit") Nothing [
-                  _Literal_boolean>>: lambda "b" $ right (inject JM._Value JM._Value_boolean (var "b"))]])
-          @@ (lambda "_cx" $ lambda "j" $
-            cases JM._Value (var "j") Nothing [
-              JM._Value_boolean>>: lambda "b" $ right (Core.termLiteral (Core.literalBoolean (var "b")))]),
-      _LiteralType_string>>: constant $
-        var "simple"
-          @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_string)
-          @@ boolean False
-          @@ (lambda "_cx" $ lambda "t" $
-            cases _Term (var "t") Nothing [
-              _Term_literal>>: lambda "lit" $
-                cases _Literal (var "lit") Nothing [
-                  _Literal_string>>: lambda "s" $ right (inject JM._Value JM._Value_string (var "s"))]])
-          @@ (lambda "_cx" $ lambda "j" $
-            cases JM._Value (var "j") Nothing [
-              JM._Value_string>>: lambda "s" $ right (Core.termLiteral (Core.literalString (var "s")))]),
-      _LiteralType_binary>>: constant $
-        var "simple"
-          @@ inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_bytes)
-          @@ boolean False
-          @@ (lambda "_cx" $ lambda "t" $
-            cases _Term (var "t") Nothing [
-              _Term_literal>>: lambda "lit" $
-                cases _Literal (var "lit") Nothing [
-                  _Literal_binary>>: lambda "b" $ right (inject JM._Value JM._Value_string (Literals.binaryToString (var "b")))]])
-          @@ (lambda "_cx" $ lambda "j" $
-            cases JM._Value (var "j") Nothing [
-              JM._Value_string>>: lambda "s" $ right (Core.termLiteral (Core.literalBinary (Literals.stringToBinary (var "s"))))]),
-      _LiteralType_integer>>: lambda "it" $ integerAdapter @@ var "cx" @@ var "typ" @@ var "it",
-      _LiteralType_float>>: lambda "ft" $ floatAdapter @@ var "cx" @@ var "typ" @@ var "ft"]
-
-localName :: TTermDefinition (Name -> String)
-localName = define "localName" $
-  doc "Extract the local part of a qualified name" $
-  lambda "name_" $ lets [
-    "s">: unwrap _Name @@ var "name_",
-    "parts">: Strings.splitOn (string ".") (var "s")] $
-    Maybes.fromMaybe (var "s") (Lists.maybeLast (var "parts"))
-
-nameNamespace :: TTermDefinition (Name -> Maybe String)
-nameNamespace = define "nameNamespace" $
-  doc "Extract the namespace from a qualified name, if any" $
-  lambda "name_" $ lets [
-    "s">: unwrap _Name @@ var "name_",
-    "parts">: Strings.splitOn (string ".") (var "s")] $
-    Logic.ifElse (Equality.equal (Lists.length (var "parts")) (int32 1))
-      nothing
-      (Maybes.map (lambda "ps" $ Strings.intercalate (string ".") (var "ps")) (Lists.maybeInit (var "parts")))
-
-namedTypeAdapter :: TTermDefinition (Context -> Type -> Maybe Name -> M.Map Name Term -> [FieldType] -> AvroEnv.EncodeEnvironment
-  -> ([Avro.Field] -> Avro.NamedType)
-  -> (Context -> Name -> [(Name, HydraAvroAdapter)]
-      -> (Context -> Term -> Result JM.Value, Context -> JM.Value -> Result Term))
-  -> Result (HydraAvroAdapter, AvroEnv.EncodeEnvironment))
-namedTypeAdapter = define "namedTypeAdapter" $
-  doc "Build a named type adapter (shared between record and union-as-record)" $
-  lambda "cx" $ lambda "typ" $ lambda "mName" $ lambda "annotations" $ lambda "fieldTypes" $ lambda "env0"
-    $ lambda "mkNamedType" $ lambda "mkCoder" $ lets [
-    "typeName">: Maybes.fromMaybe (typeToName @@ var "typ") (var "mName")] $
-    Maybes.maybe
-      (Eithers.bind (foldFieldAdapters @@ var "cx" @@ var "fieldTypes" @@ var "env0") (lambda "faResult" $ lets [
-        "fieldAdapters">: Pairs.first (var "faResult"),
-        "env1">: Pairs.second (var "faResult"),
-        "avroFields">: Lists.map buildAvroField (var "fieldAdapters"),
-        "avroAnnotations">: hydraAnnotationsToAvro @@ var "annotations",
-        "avroSchema">: inject Avro._Schema Avro._Schema_named (record Avro._Named [
-          Avro._Named_name>>: localName @@ var "typeName",
-          Avro._Named_namespace>>: nameNamespace @@ var "typeName",
-          Avro._Named_aliases>>: nothing,
-          Avro._Named_doc>>: nothing,
-          Avro._Named_type>>: var "mkNamedType" @@ var "avroFields",
-          Avro._Named_annotations>>: var "avroAnnotations"]),
-        "lossy">: Lists.foldl (lambda "b" $ lambda "fa" $ Logic.or (var "b") (Coders.adapterIsLossy (Pairs.second (var "fa"))))
-          (boolean False) (var "fieldAdapters"),
-        "coderPair">: var "mkCoder" @@ var "cx" @@ var "typeName" @@ var "fieldAdapters",
-        "encodeFn">: Pairs.first (var "coderPair"),
-        "decodeFn">: Pairs.second (var "coderPair"),
-        "adapter_">: Coders.adapter (var "lossy") (var "typ") (var "avroSchema") (Coders.coder (var "encodeFn") (var "decodeFn")),
-        "env2">: record AvroEnv._EncodeEnvironment [
-          AvroEnv._EncodeEnvironment_typeMap>>: project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_typeMap @@ var "env1",
-          AvroEnv._EncodeEnvironment_emitted>>: Maps.insert (var "typeName") (var "adapter_")
-            (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_emitted @@ var "env1")]] $
-        right (pair (var "adapter_") (var "env2"))))
-      (lambda "existingAd" $ right (pair (var "existingAd") (var "env0")))
-      (Maps.lookup (var "typeName") (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_emitted @@ var "env0"))
-
-recordTermCoder :: TTermDefinition (Context -> Name -> [(Name, HydraAvroAdapter)]
-  -> (Context -> Term -> Result JM.Value, Context -> JM.Value -> Result Term))
-recordTermCoder = define "recordTermCoder" $
-  doc "Build a record term coder from field adapters" $
-  lambda "cx" $ lambda "typeName" $ lambda "fieldAdapters" $ lets [
-    "encode">: lambda "cx1" $ lambda "term" $
-      cases _Term (var "term") (Just (err @@ var "cx" @@ string "expected record term")) [
-        _Term_record>>: lambda "rec" $ lets [
-          "fields">: project _Record _Record_fields @@ var "rec",
-          "fieldMap">: Maps.fromList (Lists.map (lambda "f" $ pair (project _Field _Field_name @@ var "f") (project _Field _Field_term @@ var "f")) (var "fields")),
-          "encodeField">: lambda "nameAd" $ lets [
-            "fname">: Pairs.first (var "nameAd"),
-            "ad">: Pairs.second (var "nameAd"),
-            "fTerm">: Maybes.fromMaybe Core.termUnit (Maps.lookup (var "fname") (var "fieldMap"))] $
-            Eithers.map (lambda "jv" $ pair (localName @@ var "fname") (var "jv"))
-              (Coders.coderEncode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "fTerm")] $
-          Eithers.map (lambda "pairs" $ inject JM._Value JM._Value_object (Maps.fromList (var "pairs")))
-            (Eithers.mapList (var "encodeField") (var "fieldAdapters"))],
-    "decode">: lambda "cx1" $ lambda "json" $
-      cases JM._Value (var "json") (Just (err @@ var "cx" @@ string "expected JSON object")) [
-        JM._Value_object>>: lambda "m" $ lets [
-          "decodeField">: lambda "nameAd" $ lets [
-            "fname">: Pairs.first (var "nameAd"),
-            "ad">: Pairs.second (var "nameAd"),
-            "jv">: Maybes.fromMaybe (injectUnit JM._Value JM._Value_null) (Maps.lookup (localName @@ var "fname") (var "m"))] $
-            Eithers.map (lambda "t" $ Core.field (var "fname") (var "t"))
-              (Coders.coderDecode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "jv")] $
-          Eithers.map (lambda "fields" $ Core.termRecord (Core.record (var "typeName") (var "fields")))
-            (Eithers.mapList (var "decodeField") (var "fieldAdapters"))]] $
-    pair (var "encode") (var "decode")
-
-termToJsonValue :: TTermDefinition (Term -> JM.Value)
-termToJsonValue = define "termToJsonValue" $
-  doc "Convert a Hydra term to a JSON value (for annotation values)" $
-  lambda "term" $
-    cases _Term (var "term") (Just (inject JM._Value JM._Value_string (string "<term>"))) [
-      _Term_literal>>: lambda "lit" $
-        cases _Literal (var "lit") Nothing [
-          _Literal_string>>: lambda "s" $ inject JM._Value JM._Value_string (var "s"),
-          _Literal_boolean>>: lambda "b" $ inject JM._Value JM._Value_boolean (var "b"),
-          _Literal_integer>>: lambda "iv" $ inject JM._Value JM._Value_number (integerValueToDouble @@ var "iv"),
-          _Literal_float>>: lambda "fv" $ inject JM._Value JM._Value_number (floatValueToDouble @@ var "fv"),
-          _Literal_binary>>: lambda "b" $ inject JM._Value JM._Value_string (Literals.binaryToString (var "b"))],
-      _Term_list>>: lambda "ts" $
-        inject JM._Value JM._Value_array (Lists.map termToJsonValue (var "ts")),
-      _Term_map>>: lambda "m" $
-        inject JM._Value JM._Value_object (Maps.fromList (Lists.map
-          (lambda "entry" $ lets [
-            "k">: Pairs.first (var "entry"),
-            "v">: Pairs.second (var "entry")] $
-            pair
-              (cases _Term (var "k") (Just (string "<key>")) [
-                _Term_literal>>: lambda "kl" $
-                  cases _Literal (var "kl") (Just (string "<key>")) [
-                    _Literal_string>>: lambda "s" $ var "s"]])
-              (termToJsonValue @@ var "v"))
-          (Maps.toList (var "m")))),
-      _Term_record>>: lambda "rec" $
-        Logic.ifElse (Lists.null (project _Record _Record_fields @@ var "rec"))
-          (injectUnit JM._Value JM._Value_null)
-          (inject JM._Value JM._Value_string (string "<record>"))]
-
-typeToName :: TTermDefinition (Type -> Name)
-typeToName = define "typeToName" $
-  doc "Generate a default name for an anonymous type" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t") (Just (Core.name (string "Unknown"))) [
-      _Type_record>>: constant $ Core.name (string "Record"),
-      _Type_union>>: constant $ Core.name (string "Union")]
-
-unionAsRecordAdapter :: TTermDefinition (Context -> Type -> Maybe Name -> M.Map Name Term -> [FieldType] -> AvroEnv.EncodeEnvironment -> Result (HydraAvroAdapter, AvroEnv.EncodeEnvironment))
-unionAsRecordAdapter = define "unionAsRecordAdapter" $
-  doc "Adapter for general unions (encoded as records with optional fields)" $
-  lambda "cx" $ lambda "typ" $ lambda "mName" $ lambda "annotations" $ lambda "fieldTypes" $ lambda "env0" $
-    Eithers.bind (foldFieldAdapters @@ var "cx" @@ var "fieldTypes" @@ var "env0") (lambda "faResult" $ lets [
-      "fieldAdapters">: Pairs.first (var "faResult"),
-      "env1">: Pairs.second (var "faResult"),
-      "avroFields">: Lists.map
-        (lambda "nameAd" $ lets [
-          "fname">: Pairs.first (var "nameAd"),
-          "ad">: Pairs.second (var "nameAd")] $
-          record Avro._Field [
-            Avro._Field_name>>: localName @@ var "fname",
-            Avro._Field_doc>>: nothing,
-            Avro._Field_type>>: inject Avro._Schema Avro._Schema_union (wrap Avro._Union (list [
-              inject Avro._Schema Avro._Schema_primitive (injectUnit Avro._Primitive Avro._Primitive_null),
-              Coders.adapterTarget (var "ad")])),
-            Avro._Field_default>>: just (injectUnit JM._Value JM._Value_null),
-            Avro._Field_order>>: nothing,
-            Avro._Field_aliases>>: nothing,
-            Avro._Field_annotations>>: Maps.empty])
-        (var "fieldAdapters"),
-      "typeName">: Maybes.fromMaybe (typeToName @@ var "typ") (var "mName"),
-      "avroAnnotations">: hydraAnnotationsToAvro @@ var "annotations",
-      "avroSchema">: inject Avro._Schema Avro._Schema_named (record Avro._Named [
-        Avro._Named_name>>: localName @@ var "typeName",
-        Avro._Named_namespace>>: nameNamespace @@ var "typeName",
-        Avro._Named_aliases>>: nothing,
-        Avro._Named_doc>>: nothing,
-        Avro._Named_type>>: inject Avro._NamedType Avro._NamedType_record (record Avro._Record [
-          Avro._Record_fields>>: var "avroFields"]),
-        Avro._Named_annotations>>: var "avroAnnotations"]),
-      "adapter_">: Coders.adapter (boolean True) (var "typ") (var "avroSchema")
-        (Coders.coder
-          (lambda "cx1" $ lambda "t" $
-            cases _Term (var "t") (Just (err @@ var "cx1" @@ string "expected union term")) [
-              _Term_inject>>: lambda "inj" $ lets [
-                "activeName">: project _Field _Field_name @@ (project _Injection _Injection_field @@ var "inj"),
-                "activeValue">: project _Field _Field_term @@ (project _Injection _Injection_field @@ var "inj"),
-                "encodePair">: lambda "nameAd" $ lets [
-                  "fname">: Pairs.first (var "nameAd"),
-                  "ad">: Pairs.second (var "nameAd")] $
-                  Logic.ifElse (Core.equalName_ (var "fname") (var "activeName"))
-                    (Eithers.map (lambda "jv" $ pair (localName @@ var "fname") (var "jv"))
-                      (Coders.coderEncode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "activeValue"))
-                    (right (pair (localName @@ var "fname") (injectUnit JM._Value JM._Value_null)))] $
-                Eithers.map (lambda "pairs" $ inject JM._Value JM._Value_object (Maps.fromList (var "pairs")))
-                  (Eithers.mapList (var "encodePair") (var "fieldAdapters"))])
-          (lambda "cx1" $ lambda "j" $
-            cases JM._Value (var "j") (Just (err @@ var "cx1" @@ string "expected JSON object for union-as-record")) [
-              JM._Value_object>>: lambda "m" $ lets [
-                "findActive">: lambda "remaining" $
-                  Maybes.maybe
-                    (err @@ var "cx1" @@ string "no non-null field in union record")
-                    (lambda "p" $ lets [
-                      "head_">: Pairs.first (var "p"),
-                      "rest_">: Pairs.second (var "p"),
-                      "fname">: Pairs.first (var "head_"),
-                      "ad">: Pairs.second (var "head_"),
-                      "mjv">: Maps.lookup (localName @@ var "fname") (var "m")] $
-                      Maybes.maybe
-                        (var "findActive" @@ var "rest_")
-                        (lambda "jv" $
-                          cases JM._Value (var "jv") (Just (
-                            Eithers.map (lambda "t" $ Core.termInject (Core.injection (var "typeName") (Core.field (var "fname") (var "t"))))
-                              (Coders.coderDecode (Coders.adapterCoder (var "ad")) @@ var "cx1" @@ var "jv"))) [
-                            JM._Value_null>>: constant (var "findActive" @@ var "rest_")])
-                        (var "mjv"))
-                    (Lists.uncons (var "remaining"))] $
-                var "findActive" @@ var "fieldAdapters"])),
-      "env2">: record AvroEnv._EncodeEnvironment [
-        AvroEnv._EncodeEnvironment_typeMap>>: project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_typeMap @@ var "env1",
-        AvroEnv._EncodeEnvironment_emitted>>: Maps.insert (var "typeName") (var "adapter_")
-          (project AvroEnv._EncodeEnvironment AvroEnv._EncodeEnvironment_emitted @@ var "env1")]] $
-      right (pair (var "adapter_") (var "env2")))
diff --git a/src/main/haskell/Hydra/Sources/Avro/Environment.hs b/src/main/haskell/Hydra/Sources/Avro/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/Environment.hs
+++ /dev/null
@@ -1,118 +0,0 @@
--- | Type definitions for the Avro code generation environment.
-
-module Hydra.Sources.Avro.Environment where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as CoreTypes
-import qualified Hydra.Sources.Kernel.Types.Coders as CodersTypes
-
-ns :: Namespace
-ns = Namespace "hydra.avro.environment"
-
-computeType :: String -> Type
-computeType = typeref CodersTypes.ns
-
-avroSchemaType :: Type
-avroSchemaType = typeref (Namespace "hydra.avro.schema") "Schema"
-
-jsonValueType :: Type
-jsonValueType = typeref (Namespace "hydra.json.model") "Value"
-
--- | AvroHydraAdapter = Adapter Avro.Schema Type Json.Value Term
-avroHydraAdapterType :: Type
-avroHydraAdapterType = T.apply (T.apply (T.apply (T.apply (computeType "Adapter") avroSchemaType) (coreType "Type")) jsonValueType) (coreType "Term")
-
--- | HydraAvroAdapter = Adapter Type Avro.Schema Term Json.Value (reverse direction)
-hydraAvroAdapterType :: Type
-hydraAvroAdapterType = T.apply (T.apply (T.apply (T.apply (computeType "Adapter") (coreType "Type")) avroSchemaType) (coreType "Term")) jsonValueType
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-coreType :: String -> Type
-coreType = typeref CoreTypes.ns
-
-localType :: String -> Type
-localType = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [CoreTypes.ns, CodersTypes.ns, Namespace "hydra.avro.schema", Namespace "hydra.json.model"],
-            moduleDescription = Just "Type definitions for the Avro code generation environment"}
-  where
-    definitions = [
-      avroQualifiedNameType,
-      avroForeignKeyType,
-      avroPrimaryKeyType,
-      avroEnvironmentType,
-      encodeEnvironmentType]
-
--- | An Avro qualified name with optional namespace
-avroQualifiedNameType :: Binding
-avroQualifiedNameType = define "AvroQualifiedName" $
-  doc "An Avro qualified name with optional namespace" $
-  T.record [
-    "namespace" >:
-      doc "The optional namespace" $
-      T.optional T.string,
-    "name" >:
-      doc "The local name" $
-      T.string]
-
--- | An Avro foreign key annotation
-avroForeignKeyType :: Binding
-avroForeignKeyType = define "AvroForeignKey" $
-  doc "An Avro foreign key annotation linking a field to another type" $
-  T.record [
-    "typeName" >:
-      doc "The Hydra type name referenced by this foreign key" $
-      coreType "Name",
-    "constructor" >:
-      doc "A function which constructs element names from string values" $
-      T.function T.string (coreType "Name")]
-
--- | An Avro primary key annotation
-avroPrimaryKeyType :: Binding
-avroPrimaryKeyType = define "AvroPrimaryKey" $
-  doc "An Avro primary key annotation identifying the element name field" $
-  T.record [
-    "fieldName" >:
-      doc "The name of the primary key field" $
-      coreType "Name",
-    "constructor" >:
-      doc "A function which constructs element names from string values" $
-      T.function T.string (coreType "Name")]
-
--- | The environment for Avro-to-Hydra code generation
-avroEnvironmentType :: Binding
-avroEnvironmentType = define "AvroEnvironment" $
-  doc "Environment for Avro-to-Hydra code generation" $
-  T.record [
-    "namedAdapters" >:
-      doc "Named adapters for previously processed schemas" $
-      T.map (localType "AvroQualifiedName") avroHydraAdapterType,
-    "namespace" >:
-      doc "The current Avro namespace" $
-      T.optional T.string,
-    "elements" >:
-      doc "Generated Hydra elements" $
-      T.map (coreType "Name") (coreType "Binding")]
-
--- | Environment for encoding Hydra types to Avro schemas
-encodeEnvironmentType :: Binding
-encodeEnvironmentType = define "EncodeEnvironment" $
-  doc "Environment for Hydra-to-Avro encoding, tracking which named types have been emitted" $
-  T.record [
-    "typeMap" >:
-      doc "All named types available for reference" $
-      T.map (coreType "Name") (coreType "Type"),
-    "emitted" >:
-      doc "Adapters for types that have already been fully emitted (emit references for these)" $
-      T.map (coreType "Name") hydraAvroAdapterType]
diff --git a/src/main/haskell/Hydra/Sources/Avro/Language.hs b/src/main/haskell/Hydra/Sources/Avro/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/Language.hs
+++ /dev/null
@@ -1,138 +0,0 @@
-module Hydra.Sources.Avro.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.avro.language"),
-            moduleDefinitions = [toDefinition avroLanguage],
-            moduleTermDependencies = [Lexical.ns, Strip.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for Apache Avro"}
-avroLanguage :: TTermDefinition Language
-avroLanguage = define "avroLanguage" $
-  doc "Language constraints for Apache Avro" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary,
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat32,
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeInt32,
-    Core.integerTypeInt64],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantWrap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord],
-  "typePredicate">: "typ" ~> cases _Type (Strip.deannotateType @@ var "typ")
-    (Just true) [
-    _Type_maybe>>: "inner" ~> cases _Type (Strip.deannotateType @@ var "inner")
-      (Just true) [
-      _Type_maybe>>: constant false]]] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.avro")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
diff --git a/src/main/haskell/Hydra/Sources/Avro/Schema.hs b/src/main/haskell/Hydra/Sources/Avro/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/Schema.hs
+++ /dev/null
@@ -1,182 +0,0 @@
-module Hydra.Sources.Avro.Schema where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Json.Model        as JsonModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.avro.schema"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-avro :: String -> Type
-avro = typeref ns
-
-json :: String -> Type
-json = typeref $ JsonModel.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [JsonModel.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model for Avro schemas. Based on the Avro 1.11.1 specification:\n" ++
-      "  https://avro.apache.org/docs/1.11.1/specification")}
-  where
-    definitions = [
-      array_,
-      enum_,
-      field_,
-      fixed_,
-      map_,
-      named,
-      namedType,
-      order,
-      primitive,
-      record_,
-      schema,
-      union_]
-
-array_ :: Binding
-array_ = define "Array" $
-  T.record [
-    "items">: avro "Schema"]
-
-enum_ :: Binding
-enum_ = define "Enum" $
-  T.record [
-    "symbols">:
-      doc ("a JSON array, listing symbols, as JSON strings. All symbols in an enum must be unique; " ++
-        "duplicates are prohibited. Every symbol must match the regular expression [A-Za-z_][A-Za-z0-9_]* " ++
-        "(the same requirement as for names)") $
-      T.list T.string,
-    "default">:
-      doc ("A default value for this enumeration, used during resolution when the reader encounters " ++
-        "a symbol from the writer that isn't defined in the reader's schema. " ++
-        "The value provided here must be a JSON string that's a member of the symbols array") $
-      T.maybe T.string]
-
-field_ :: Binding
-field_ = define "Field" $
-  T.record [
-    "name">:
-      doc "a JSON string providing the name of the field"
-      T.string,
-    "doc">:
-      doc "a JSON string describing this field for users" $
-      T.maybe T.string,
-    "type">:
-      doc "a schema" $
-      avro "Schema",
-    "default">:
-      doc "default value for this field, only used when reading instances that lack the field for schema evolution purposes" $
-      T.maybe $ json "Value",
-    "order">:
-      doc "specifies how this field impacts sort ordering of this record" $
-      T.maybe $ avro "Order",
-    "aliases">:
-      doc "a JSON array of strings, providing alternate names for this field" $
-      T.maybe $ T.list T.string,
-    "annotations">:
-      doc "Any additional key/value pairs attached to the field" $
-      T.map T.string $ json "Value"]
-
-fixed_ :: Binding
-fixed_ = define "Fixed" $
-  T.record [
-    "size">:
-      doc "an integer, specifying the number of bytes per value"
-      T.int32]
-
-map_ :: Binding
-map_ = define "Map" $
-  T.record [
-    "values">: avro "Schema"]
-
-named :: Binding
-named = define "Named" $
-  T.record [
-    "name">:
-      doc "a string naming this schema"
-      T.string,
-    "namespace">:
-      doc "a string that qualifies the name" $
-      T.maybe T.string,
-    "aliases">:
-      doc "a JSON array of strings, providing alternate names for this schema" $
-      T.maybe $ T.list T.string,
-    "doc">:
-      doc "a JSON string providing documentation to the user of this schema" $
-      T.maybe T.string,
-    "type">: avro "NamedType",
-    "annotations">:
-      doc "Any additional key/value pairs attached to the type" $
-      T.map T.string $ json "Value"]
-
-namedType :: Binding
-namedType = define "NamedType" $
-  T.union [
-    "enum">: avro "Enum",
-    "fixed">: avro "Fixed",
-    "record">: avro "Record"]
-
-order :: Binding
-order = define "Order" $
-  T.enum ["ascending", "descending", "ignore"]
-
-primitive :: Binding
-primitive = define "Primitive" $
-  T.union [
-    "null">:
-      doc "no value" T.unit,
-    "boolean">:
-      doc "A binary value" T.unit,
-    "int">:
-      doc "32-bit signed integer" T.unit,
-    "long">:
-      doc "64-bit signed integer" T.unit,
-    "float">:
-      doc "single precision (32-bit) IEEE 754 floating-point number" T.unit,
-    "double">:
-      doc "double precision (64-bit) IEEE 754 floating-point number" T.unit,
-    "bytes">:
-      doc "sequence of 8-bit unsigned bytes" T.unit,
-    "string">:
-      doc "unicode character sequence" T.unit]
-
-record_ :: Binding
-record_ = define "Record" $
-  T.record [
-    "fields">:
-      doc "a JSON array, listing fields" $
-      T.list $ avro "Field"]
-
-schema :: Binding
-schema = define "Schema" $
-  T.union [
-    "array">: avro "Array",
-    "map">: avro "Map",
-    "named">: avro "Named",
-    "primitive">: avro "Primitive",
-    "reference">: -- Note: "reference" is not described in the Avro specification; this has been added
-      doc "A reference by name to a previously defined type" T.string,
-    "union">: avro "Union"
-  ]
-
-union_ :: Binding
-union_ = define "Union" $
-  T.wrap $ T.list $ avro "Schema"
diff --git a/src/main/haskell/Hydra/Sources/Avro/SchemaJson.hs b/src/main/haskell/Hydra/Sources/Avro/SchemaJson.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/SchemaJson.hs
+++ /dev/null
@@ -1,780 +0,0 @@
-module Hydra.Sources.Avro.SchemaJson where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Scientific                           as Sci
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Avro.Schema as Avro
-import qualified Hydra.Json.Model as JM
-import qualified Hydra.Parsing as Parsing
-import qualified Hydra.Sources.Avro.Schema as AvroSchema
--- Result type alias (was previously imported from Staging module)
-type Result a = Either Error a
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-avroSchemaPhantomNs :: Namespace
-avroSchemaPhantomNs = Namespace "hydra.avro.schema"
-
-jsonModelNs :: Namespace
-jsonModelNs = Namespace "hydra.json.model"
-
-jsonParserNs :: Namespace
-jsonParserNs = Namespace "hydra.json.parser"
-
-jsonWriterNs :: Namespace
-jsonWriterNs = Namespace "hydra.json.writer"
-
-ns :: Namespace
-ns = Namespace "hydra.avro.schemaJson"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [jsonWriterNs, jsonParserNs],
-            moduleTypeDependencies = (AvroSchema.ns:jsonModelNs:Namespace "hydra.parsing":KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "JSON serialization and deserialization for Avro schemas"}
-  where
-    definitions = [
-      -- String constants
-      toDefinition avro_aliases,
-      toDefinition avro_array,
-      toDefinition avro_ascending,
-      toDefinition avro_boolean,
-      toDefinition avro_bytes,
-      toDefinition avro_default,
-      toDefinition avro_descending,
-      toDefinition avro_doc,
-      toDefinition avro_double,
-      toDefinition avro_enum,
-      toDefinition avro_fields,
-      toDefinition avro_fixed,
-      toDefinition avro_float,
-      toDefinition avro_ignore,
-      toDefinition avro_int,
-      toDefinition avro_items,
-      toDefinition avro_long,
-      toDefinition avro_map,
-      toDefinition avro_name,
-      toDefinition avro_namespace,
-      toDefinition avro_null,
-      toDefinition avro_order,
-      toDefinition avro_record,
-      toDefinition avro_size,
-      toDefinition avro_string,
-      toDefinition avro_symbols,
-      toDefinition avro_type,
-      toDefinition avro_values,
-      -- Error helpers
-      toDefinition err,
-      toDefinition unexpectedE,
-      -- JSON extraction helpers
-      toDefinition expectArrayE,
-      toDefinition expectNumberE,
-      toDefinition expectObjectE,
-      toDefinition expectStringE,
-      toDefinition requireE,
-      toDefinition requireArrayE,
-      toDefinition requireNumberE,
-      toDefinition requireStringE,
-      toDefinition optE,
-      toDefinition optArrayE,
-      toDefinition optStringE,
-      toDefinition showJsonValue,
-      toDefinition stringToJsonValue,
-      -- Encode functions
-      toDefinition encodeSchema,
-      toDefinition encodePrimitive,
-      toDefinition encodeArray,
-      toDefinition encodeMap,
-      toDefinition encodeNamed,
-      toDefinition encodeNamedType,
-      toDefinition encodeEnumE,
-      toDefinition encodeFixedE,
-      toDefinition encodeRecordE,
-      toDefinition encodeFieldE,
-      toDefinition encodeOrderE,
-      toDefinition encodeUnion,
-      toDefinition encodeAnnotations,
-      -- Coder functions
-      toDefinition avroSchemaJsonCoder,
-      toDefinition avroSchemaStringCoder,
-      -- Decode functions
-      toDefinition decodeAliases,
-      toDefinition decodeArraySchema,
-      toDefinition decodeEnum,
-      toDefinition decodeField,
-      toDefinition decodeFixed,
-      toDefinition decodeMapSchema,
-      toDefinition decodeNamedSchema,
-      toDefinition decodeObjectSchema,
-      toDefinition decodeOrder,
-      toDefinition decodePrimitiveName,
-      toDefinition decodeRecord,
-      toDefinition decodeSchema,
-      toDefinition getAnnotations]
-
-
--- | Error helpers
-
-err :: TTermDefinition (Context -> String -> Result a)
-err = define "err" $
-  doc "Construct an error result with a message in context" $
-  lambda "cx" $ lambda "msg" $
-    Ctx.failInContext (Error.errorOther $ Error.otherError (var "msg")) (var "cx")
-
-unexpectedE :: TTermDefinition (Context -> String -> String -> Result a)
-unexpectedE = define "unexpectedE" $
-  doc "Construct an error for unexpected values" $
-  lambda "cx" $ lambda "expected" $ lambda "found" $
-    err @@ var "cx" @@ (Strings.cat $ list [string "Expected ", var "expected", string ", found: ", var "found"])
-
-
--- | JSON extraction helpers
-
-expectArrayE :: TTermDefinition (Context -> JM.Value -> Result [JM.Value])
-expectArrayE = define "expectArrayE" $
-  doc "Extract a JSON array or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_array>>: lambda "v" $ Phantoms.right (var "v")]
-
-expectNumberE :: TTermDefinition (Context -> JM.Value -> Result Sci.Scientific)
-expectNumberE = define "expectNumberE" $
-  doc "Extract a JSON number or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_number>>: lambda "v" $ Phantoms.right (var "v")]
-
-expectObjectE :: TTermDefinition (Context -> JM.Value -> Result (M.Map String JM.Value))
-expectObjectE = define "expectObjectE" $
-  doc "Extract a JSON object or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_object>>: lambda "v" $ Phantoms.right (var "v")]
-
-expectStringE :: TTermDefinition (Context -> JM.Value -> Result String)
-expectStringE = define "expectStringE" $
-  doc "Extract a JSON string or return an error" $
-  lambda "cx" $ lambda "value" $
-    cases JM._Value (var "value") Nothing [
-      JM._Value_string>>: lambda "v" $ Phantoms.right (var "v")]
-
-requireE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result JM.Value)
-requireE = define "requireE" $
-  doc "Look up a required attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Maybes.maybe
-      (err @@ var "cx" @@ (Strings.cat $ list [string "required attribute ", Literals.showString (var "fname"), string " not found"]))
-      (lambda "v" $ Phantoms.right (var "v"))
-      (Maps.lookup (var "fname") (var "m"))
-
-requireArrayE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result [JM.Value])
-requireArrayE = define "requireArrayE" $
-  doc "Look up a required array attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Eithers.bind (requireE @@ var "cx" @@ var "fname" @@ var "m")
-      (lambda "v" $ expectArrayE @@ var "cx" @@ var "v")
-
-requireNumberE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result Sci.Scientific)
-requireNumberE = define "requireNumberE" $
-  doc "Look up a required number attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Eithers.bind (requireE @@ var "cx" @@ var "fname" @@ var "m")
-      (lambda "v" $ expectNumberE @@ var "cx" @@ var "v")
-
-requireStringE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result String)
-requireStringE = define "requireStringE" $
-  doc "Look up a required string attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Eithers.bind (requireE @@ var "cx" @@ var "fname" @@ var "m")
-      (lambda "v" $ expectStringE @@ var "cx" @@ var "v")
-
-optE :: TTermDefinition (String -> M.Map String JM.Value -> Maybe JM.Value)
-optE = define "optE" $
-  doc "Look up an optional attribute in a JSON object map" $
-  lambda "k" $ lambda "m" $
-    Maps.lookup (var "k") (var "m")
-
-optArrayE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result (Maybe [JM.Value]))
-optArrayE = define "optArrayE" $
-  doc "Look up an optional array attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Maybes.maybe
-      (Phantoms.right nothing)
-      (lambda "v" $ Eithers.map (lambda "a" $ Maybes.pure (var "a")) (expectArrayE @@ var "cx" @@ var "v"))
-      (Maps.lookup (var "fname") (var "m"))
-
-optStringE :: TTermDefinition (Context -> String -> M.Map String JM.Value -> Result (Maybe String))
-optStringE = define "optStringE" $
-  doc "Look up an optional string attribute in a JSON object map" $
-  lambda "cx" $ lambda "fname" $ lambda "m" $
-    Maybes.maybe
-      (Phantoms.right nothing)
-      (lambda "v" $ Eithers.map (lambda "s" $ Maybes.pure (var "s")) (expectStringE @@ var "cx" @@ var "v"))
-      (Maps.lookup (var "fname") (var "m"))
-
-showJsonValue :: TTermDefinition (JM.Value -> String)
-showJsonValue = define "showJsonValue" $
-  doc "Convert a JSON value to its string representation" $
-  lambda "v" $
-    var "hydra.json.writer.printJson" @@ var "v"
-
-stringToJsonValue :: TTermDefinition (String -> Either String JM.Value)
-stringToJsonValue = define "stringToJsonValue" $
-  doc "Parse a JSON string, returning Either for compatibility" $
-  lambda "s" $
-    cases Parsing._ParseResult (var "hydra.json.parser.parseJson" @@ var "s") Nothing [
-      Parsing._ParseResult_success>>: lambda "success" $
-        Phantoms.right (project Parsing._ParseSuccess Parsing._ParseSuccess_value @@ var "success"),
-      Parsing._ParseResult_failure>>: lambda "failure" $
-        Phantoms.left (project Parsing._ParseError Parsing._ParseError_message @@ var "failure")]
-
-
--- | String constants
-
-avro_aliases :: TTermDefinition String
-avro_aliases = define "avro_aliases" $ string "aliases"
-
-avro_array :: TTermDefinition String
-avro_array = define "avro_array" $ string "array"
-
-avro_ascending :: TTermDefinition String
-avro_ascending = define "avro_ascending" $ string "ascending"
-
-avro_boolean :: TTermDefinition String
-avro_boolean = define "avro_boolean" $ string "boolean"
-
-avro_bytes :: TTermDefinition String
-avro_bytes = define "avro_bytes" $ string "bytes"
-
-avro_default :: TTermDefinition String
-avro_default = define "avro_default" $ string "default"
-
-avro_descending :: TTermDefinition String
-avro_descending = define "avro_descending" $ string "descending"
-
-avro_doc :: TTermDefinition String
-avro_doc = define "avro_doc" $ string "doc"
-
-avro_double :: TTermDefinition String
-avro_double = define "avro_double" $ string "double"
-
-avro_enum :: TTermDefinition String
-avro_enum = define "avro_enum" $ string "enum"
-
-avro_fields :: TTermDefinition String
-avro_fields = define "avro_fields" $ string "fields"
-
-avro_fixed :: TTermDefinition String
-avro_fixed = define "avro_fixed" $ string "fixed"
-
-avro_float :: TTermDefinition String
-avro_float = define "avro_float" $ string "float"
-
-avro_ignore :: TTermDefinition String
-avro_ignore = define "avro_ignore" $ string "ignore"
-
-avro_int :: TTermDefinition String
-avro_int = define "avro_int" $ string "int"
-
-avro_items :: TTermDefinition String
-avro_items = define "avro_items" $ string "items"
-
-avro_long :: TTermDefinition String
-avro_long = define "avro_long" $ string "long"
-
-avro_map :: TTermDefinition String
-avro_map = define "avro_map" $ string "map"
-
-avro_name :: TTermDefinition String
-avro_name = define "avro_name" $ string "name"
-
-avro_namespace :: TTermDefinition String
-avro_namespace = define "avro_namespace" $ string "namespace"
-
-avro_null :: TTermDefinition String
-avro_null = define "avro_null" $ string "null"
-
-avro_order :: TTermDefinition String
-avro_order = define "avro_order" $ string "order"
-
-avro_record :: TTermDefinition String
-avro_record = define "avro_record" $ string "record"
-
-avro_size :: TTermDefinition String
-avro_size = define "avro_size" $ string "size"
-
-avro_string :: TTermDefinition String
-avro_string = define "avro_string" $ string "string"
-
-avro_symbols :: TTermDefinition String
-avro_symbols = define "avro_symbols" $ string "symbols"
-
-avro_type :: TTermDefinition String
-avro_type = define "avro_type" $ string "type"
-
-avro_values :: TTermDefinition String
-avro_values = define "avro_values" $ string "values"
-
-
--- | Encode functions
-
-encodeSchema :: TTermDefinition (Avro.Schema -> JM.Value)
-encodeSchema = define "encodeSchema" $
-  doc "Encode an Avro schema to a JSON value" $
-  lambda "schema" $
-    cases Avro._Schema (var "schema") Nothing [
-      Avro._Schema_primitive>>: lambda "p" $ encodePrimitive @@ var "p",
-      Avro._Schema_array>>: lambda "arr" $ encodeArray @@ var "arr",
-      Avro._Schema_map>>: lambda "mp" $ encodeMap @@ var "mp",
-      Avro._Schema_named>>: lambda "n" $ encodeNamed @@ var "n",
-      Avro._Schema_reference>>: lambda "ref" $ inject JM._Value JM._Value_string (var "ref"),
-      Avro._Schema_union>>: lambda "u" $ encodeUnion @@ var "u"]
-
-encodePrimitive :: TTermDefinition (Avro.Primitive -> JM.Value)
-encodePrimitive = define "encodePrimitive" $
-  doc "Encode an Avro primitive type as a JSON string" $
-  lambda "p" $
-    inject JM._Value JM._Value_string
-      (cases Avro._Primitive (var "p") Nothing [
-        Avro._Primitive_null>>: constant (string "null"),
-        Avro._Primitive_boolean>>: constant (string "boolean"),
-        Avro._Primitive_int>>: constant (string "int"),
-        Avro._Primitive_long>>: constant (string "long"),
-        Avro._Primitive_float>>: constant (string "float"),
-        Avro._Primitive_double>>: constant (string "double"),
-        Avro._Primitive_bytes>>: constant (string "bytes"),
-        Avro._Primitive_string>>: constant (string "string")])
-
-encodeArray :: TTermDefinition (Avro.Array -> JM.Value)
-encodeArray = define "encodeArray" $
-  doc "Encode an Avro array schema to a JSON object" $
-  lambda "arr" $
-    inject JM._Value JM._Value_object
-      (Maps.fromList (list [
-        pair (string "type") (inject JM._Value JM._Value_string (string "array")),
-        pair (string "items") (encodeSchema @@ (project Avro._Array Avro._Array_items @@ var "arr"))]))
-
-encodeMap :: TTermDefinition (Avro.Map -> JM.Value)
-encodeMap = define "encodeMap" $
-  doc "Encode an Avro map schema to a JSON object" $
-  lambda "mp" $
-    inject JM._Value JM._Value_object
-      (Maps.fromList (list [
-        pair (string "type") (inject JM._Value JM._Value_string (string "map")),
-        pair (string "values") (encodeSchema @@ (project Avro._Map Avro._Map_values @@ var "mp"))]))
-
-encodeNamed :: TTermDefinition (Avro.Named -> JM.Value)
-encodeNamed = define "encodeNamed" $
-  doc "Encode an Avro named type to a JSON object" $
-  lambda "n" $
-    inject JM._Value JM._Value_object
-      (Maps.fromList (Lists.concat (list [
-        list [pair (string "name") (inject JM._Value JM._Value_string (project Avro._Named Avro._Named_name @@ var "n"))],
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "ns" $ list [pair (string "namespace") (inject JM._Value JM._Value_string (var "ns"))]) (project Avro._Named Avro._Named_namespace @@ var "n"),
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "d" $ list [pair (string "doc") (inject JM._Value JM._Value_string (var "d"))]) (project Avro._Named Avro._Named_doc @@ var "n"),
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "als" $ list [pair (string "aliases") (inject JM._Value JM._Value_array (Lists.map (lambda "a" $ inject JM._Value JM._Value_string (var "a")) (var "als")))]) (project Avro._Named Avro._Named_aliases @@ var "n"),
-        encodeNamedType @@ (project Avro._Named Avro._Named_type @@ var "n"),
-        encodeAnnotations @@ (project Avro._Named Avro._Named_annotations @@ var "n")])))
-
-encodeNamedType :: TTermDefinition (Avro.NamedType -> [(String, JM.Value)])
-encodeNamedType = define "encodeNamedType" $
-  doc "Encode the specific variant of a named Avro type" $
-  lambda "nt" $
-    cases Avro._NamedType (var "nt") Nothing [
-      Avro._NamedType_enum>>: lambda "e" $ encodeEnumE @@ var "e",
-      Avro._NamedType_fixed>>: lambda "f" $ encodeFixedE @@ var "f",
-      Avro._NamedType_record>>: lambda "r" $ encodeRecordE @@ var "r"]
-
-encodeEnumE :: TTermDefinition (Avro.Enum -> [(String, JM.Value)])
-encodeEnumE = define "encodeEnum" $
-  doc "Encode an Avro enum type as key-value pairs" $
-  lambda "e" $
-    Lists.concat (list [
-      list [pair (string "type") (inject JM._Value JM._Value_string (string "enum"))],
-      list [pair (string "symbols") (inject JM._Value JM._Value_array (Lists.map (lambda "s" $ inject JM._Value JM._Value_string (var "s")) (project Avro._Enum Avro._Enum_symbols @@ var "e")))],
-      Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "d" $ list [pair (string "default") (inject JM._Value JM._Value_string (var "d"))]) (project Avro._Enum Avro._Enum_default @@ var "e")])
-
-encodeFixedE :: TTermDefinition (Avro.Fixed -> [(String, JM.Value)])
-encodeFixedE = define "encodeFixed" $
-  doc "Encode an Avro fixed type as key-value pairs" $
-  lambda "f" $
-    list [
-      pair (string "type") (inject JM._Value JM._Value_string (string "fixed")),
-      pair (string "size") (inject JM._Value JM._Value_number (Literals.bigintToDecimal (Literals.int32ToBigint (project Avro._Fixed Avro._Fixed_size @@ var "f"))))]
-
-encodeRecordE :: TTermDefinition (Avro.Record -> [(String, JM.Value)])
-encodeRecordE = define "encodeRecord" $
-  doc "Encode an Avro record type as key-value pairs" $
-  lambda "r" $
-    list [
-      pair (string "type") (inject JM._Value JM._Value_string (string "record")),
-      pair (string "fields") (inject JM._Value JM._Value_array (Lists.map encodeFieldE (project Avro._Record Avro._Record_fields @@ var "r")))]
-
-encodeFieldE :: TTermDefinition (Avro.Field -> JM.Value)
-encodeFieldE = define "encodeField" $
-  doc "Encode an Avro field to a JSON object" $
-  lambda "f" $
-    inject JM._Value JM._Value_object
-      (Maps.fromList (Lists.concat (list [
-        list [pair (string "name") (inject JM._Value JM._Value_string (project Avro._Field Avro._Field_name @@ var "f"))],
-        list [pair (string "type") (encodeSchema @@ (project Avro._Field Avro._Field_type @@ var "f"))],
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "d" $ list [pair (string "doc") (inject JM._Value JM._Value_string (var "d"))]) (project Avro._Field Avro._Field_doc @@ var "f"),
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "d" $ list [pair (string "default") (var "d")]) (project Avro._Field Avro._Field_default @@ var "f"),
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "o" $ list [encodeOrderE @@ var "o"]) (project Avro._Field Avro._Field_order @@ var "f"),
-        Maybes.maybe (list ([] :: [TTerm (String, JM.Value)])) (lambda "als" $ list [pair (string "aliases") (inject JM._Value JM._Value_array (Lists.map (lambda "a" $ inject JM._Value JM._Value_string (var "a")) (var "als")))]) (project Avro._Field Avro._Field_aliases @@ var "f"),
-        encodeAnnotations @@ (project Avro._Field Avro._Field_annotations @@ var "f")])))
-
-encodeOrderE :: TTermDefinition (Avro.Order -> (String, JM.Value))
-encodeOrderE = define "encodeOrder" $
-  doc "Encode an Avro field ordering as a key-value pair" $
-  lambda "o" $
-    pair (string "order") (inject JM._Value JM._Value_string
-      (cases Avro._Order (var "o") Nothing [
-        Avro._Order_ascending>>: constant (string "ascending"),
-        Avro._Order_descending>>: constant (string "descending"),
-        Avro._Order_ignore>>: constant (string "ignore")]))
-
-encodeUnion :: TTermDefinition (Avro.Union -> JM.Value)
-encodeUnion = define "encodeUnion" $
-  doc "Encode an Avro union as a JSON array of schemas" $
-  lambda "u" $
-    inject JM._Value JM._Value_array
-      (Lists.map encodeSchema (unwrap Avro._Union @@ var "u"))
-
-encodeAnnotations :: TTermDefinition (M.Map String JM.Value -> [(String, JM.Value)])
-encodeAnnotations = define "encodeAnnotations" $
-  doc "Encode annotations as key-value pairs with @ prefix on keys" $
-  lambda "m" $
-    Lists.map
-      (lambda "entry" $ pair
-        (Strings.cat2 (string "@") (Pairs.first (var "entry")))
-        (Pairs.second (var "entry")))
-      (Maps.toList (var "m"))
-
-
--- | Coder functions
-
-avroSchemaJsonCoder :: TTermDefinition (Context -> Coder Avro.Schema JM.Value)
-avroSchemaJsonCoder = define "avroSchemaJsonCoder" $
-  doc "Create a coder between Avro schemas and JSON values" $
-  lambda "cx" $
-    record _Coder [
-      _Coder_encode>>: lambda "_cx" $ lambda "schema" $ Phantoms.right (encodeSchema @@ var "schema"),
-      _Coder_decode>>: lambda "cx2" $ lambda "json" $ decodeSchema @@ var "cx2" @@ var "json"]
-
-avroSchemaStringCoder :: TTermDefinition (Context -> Coder Avro.Schema String)
-avroSchemaStringCoder = define "avroSchemaStringCoder" $
-  doc "Create a coder between Avro schemas and JSON strings" $
-  lambda "cx" $
-    record _Coder [
-      _Coder_encode>>: lambda "_cx" $ lambda "schema" $
-        Phantoms.right (showJsonValue @@ (encodeSchema @@ var "schema")),
-      _Coder_decode>>: lambda "cx2" $ lambda "s" $
-        Eithers.bind
-          (Eithers.either_
-            (lambda "e" $ err @@ var "cx2" @@ var "e")
-            (lambda "v" $ Phantoms.right (var "v"))
-            (stringToJsonValue @@ var "s"))
-          (lambda "json" $ decodeSchema @@ var "cx2" @@ var "json")]
-
-
--- | Decode functions
-
-decodeAliases :: TTermDefinition (Context -> M.Map String JM.Value -> Result (Maybe [String]))
-decodeAliases = define "decodeAliases" $
-  doc "Decode aliases from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (optArrayE @@ var "cx" @@ avro_aliases @@ var "m")
-      (lambda "mArr" $
-        Maybes.maybe
-          (Phantoms.right nothing)
-          (lambda "arr" $
-            Eithers.map
-              (lambda "strs" $ Maybes.pure (var "strs"))
-              (Eithers.mapList (expectStringE @@ var "cx") (var "arr")))
-          (var "mArr"))
-
-decodeEnum :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.NamedType)
-decodeEnum = define "decodeEnum" $
-  doc "Decode an Avro enum type from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (requireArrayE @@ var "cx" @@ avro_symbols @@ var "m")
-      (lambda "syms" $
-        Eithers.bind (Eithers.mapList (expectStringE @@ var "cx") (var "syms"))
-          (lambda "symbols" $
-            Eithers.bind (optStringE @@ var "cx" @@ avro_default @@ var "m")
-              (lambda "defVal" $
-                Phantoms.right (inject Avro._NamedType Avro._NamedType_enum
-                  (record Avro._Enum [
-                    Avro._Enum_symbols>>: var "symbols",
-                    Avro._Enum_default>>: var "defVal"])))))
-
-decodeField :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.Field)
-decodeField = define "decodeField" $
-  doc "Decode an Avro field from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (requireStringE @@ var "cx" @@ avro_name @@ var "m")
-      (lambda "name" $
-        Eithers.bind (optStringE @@ var "cx" @@ avro_doc @@ var "m")
-          (lambda "fdoc" $
-            Eithers.bind (requireE @@ var "cx" @@ avro_type @@ var "m")
-              (lambda "typeJson" $
-                Eithers.bind (decodeSchema @@ var "cx" @@ var "typeJson")
-                  (lambda "fieldType" $
-                    Eithers.bind (Eithers.bind (optStringE @@ var "cx" @@ avro_order @@ var "m")
-                      (lambda "mOrd" $
-                        Eithers.mapMaybe (decodeOrder @@ var "cx") (var "mOrd")))
-                      (lambda "order" $
-                        Eithers.bind (decodeAliases @@ var "cx" @@ var "m")
-                          (lambda "aliases" $
-                            Phantoms.right (record Avro._Field [
-                              Avro._Field_name>>: var "name",
-                              Avro._Field_doc>>: var "fdoc",
-                              Avro._Field_type>>: var "fieldType",
-                              Avro._Field_default>>: optE @@ avro_default @@ var "m",
-                              Avro._Field_order>>: var "order",
-                              Avro._Field_aliases>>: var "aliases",
-                              Avro._Field_annotations>>: getAnnotations @@ var "m"])))))))
-
-decodeFixed :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.NamedType)
-decodeFixed = define "decodeFixed" $
-  doc "Decode an Avro fixed type from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (requireNumberE @@ var "cx" @@ avro_size @@ var "m")
-      (lambda "n" $
-        lets ["size">: Literals.bigintToInt32 (Literals.decimalToBigint (var "n"))] $
-        Phantoms.right $ inject Avro._NamedType Avro._NamedType_fixed $
-          record Avro._Fixed [
-            Avro._Fixed_size>>: var "size"])
-
-decodeNamedSchema :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.NamedType -> Result Avro.Schema)
-decodeNamedSchema = define "decodeNamedSchema" $
-  doc "Decode a named Avro schema from a JSON object map and a decoded named type result" $
-  lambda "cx" $ lambda "m" $ lambda "namedTypeResult" $
-    Eithers.bind (requireStringE @@ var "cx" @@ avro_name @@ var "m")
-      (lambda "name" $
-        Eithers.bind (optStringE @@ var "cx" @@ avro_namespace @@ var "m")
-          (lambda "ns" $
-            Eithers.bind (optStringE @@ var "cx" @@ avro_doc @@ var "m")
-              (lambda "sdoc" $
-                Eithers.bind (decodeAliases @@ var "cx" @@ var "m")
-                  (lambda "aliases" $
-                    Eithers.bind (var "namedTypeResult")
-                      (lambda "namedType" $
-                        Phantoms.right (inject Avro._Schema Avro._Schema_named
-                          (record Avro._Named [
-                            Avro._Named_name>>: var "name",
-                            Avro._Named_namespace>>: var "ns",
-                            Avro._Named_aliases>>: var "aliases",
-                            Avro._Named_doc>>: var "sdoc",
-                            Avro._Named_type>>: var "namedType",
-                            Avro._Named_annotations>>: getAnnotations @@ var "m"])))))))
-
-decodeOrder :: TTermDefinition (Context -> String -> Result Avro.Order)
-decodeOrder = define "decodeOrder" $
-  doc "Decode an Avro field ordering from a string" $
-  lambda "cx" $ lambda "o" $
-    Logic.ifElse (Equality.equal (var "o") (string "ascending"))
-      (Phantoms.right (inject Avro._Order Avro._Order_ascending unit))
-      (Logic.ifElse (Equality.equal (var "o") (string "descending"))
-        (Phantoms.right (inject Avro._Order Avro._Order_descending unit))
-        (Logic.ifElse (Equality.equal (var "o") (string "ignore"))
-          (Phantoms.right (inject Avro._Order Avro._Order_ignore unit))
-          (err @@ var "cx" @@ (Strings.cat $ list [string "unknown order: ", var "o"]))))
-
-decodeRecord :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.NamedType)
-decodeRecord = define "decodeRecord" $
-  doc "Decode an Avro record type from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (requireArrayE @@ var "cx" @@ avro_fields @@ var "m")
-      (lambda "fieldJsons" $
-        Eithers.bind (Eithers.mapList
-          (lambda "fj" $
-            Eithers.bind (expectObjectE @@ var "cx" @@ var "fj")
-              (lambda "fm" $ decodeField @@ var "cx" @@ var "fm"))
-          (var "fieldJsons"))
-          (lambda "fields" $
-            Phantoms.right (inject Avro._NamedType Avro._NamedType_record
-              (record Avro._Record [
-                Avro._Record_fields>>: var "fields"]))))
-
-decodePrimitiveName :: TTermDefinition (String -> Maybe Avro.Primitive)
-decodePrimitiveName = define "decodePrimitiveName" $
-  doc "Decode a primitive type name string to a Primitive, or Nothing if not a primitive" $
-  lambda "s" $
-    Logic.ifElse (Equality.equal (var "s") (string "null"))
-      (just (inject Avro._Primitive Avro._Primitive_null unit))
-      (Logic.ifElse (Equality.equal (var "s") (string "boolean"))
-        (just (inject Avro._Primitive Avro._Primitive_boolean unit))
-        (Logic.ifElse (Equality.equal (var "s") (string "int"))
-          (just (inject Avro._Primitive Avro._Primitive_int unit))
-          (Logic.ifElse (Equality.equal (var "s") (string "long"))
-            (just (inject Avro._Primitive Avro._Primitive_long unit))
-            (Logic.ifElse (Equality.equal (var "s") (string "float"))
-              (just (inject Avro._Primitive Avro._Primitive_float unit))
-              (Logic.ifElse (Equality.equal (var "s") (string "double"))
-                (just (inject Avro._Primitive Avro._Primitive_double unit))
-                (Logic.ifElse (Equality.equal (var "s") (string "bytes"))
-                  (just (inject Avro._Primitive Avro._Primitive_bytes unit))
-                  (Logic.ifElse (Equality.equal (var "s") (string "string"))
-                    (just (inject Avro._Primitive Avro._Primitive_string unit))
-                    nothing)))))))
-
-decodeSchema :: TTermDefinition (Context -> JM.Value -> Result Avro.Schema)
-decodeSchema = define "decodeSchema" $
-  doc "Decode an Avro schema from a JSON value" $
-  lambda "cx" $ lambda "v" $
-    cases JM._Value (var "v") (Just (err @@ var "cx" @@ (Strings.cat $ list [string "unexpected JSON value for schema: ", showJsonValue @@ var "v"]))) [
-      -- String: primitive type name or reference
-      JM._Value_string>>: lambda "s" $
-        Maybes.maybe
-          (Phantoms.right (inject Avro._Schema Avro._Schema_reference (var "s")))
-          (lambda "p" $ Phantoms.right (inject Avro._Schema Avro._Schema_primitive (var "p")))
-          (decodePrimitiveName @@ var "s"),
-      -- Array: union type
-      JM._Value_array>>: lambda "schemas" $
-        Eithers.map
-          (lambda "decoded" $ inject Avro._Schema Avro._Schema_union (wrap Avro._Union (var "decoded")))
-          (Eithers.mapList (decodeSchema @@ var "cx") (var "schemas")),
-      -- Object: named type or container
-      JM._Value_object>>: lambda "m" $
-        Eithers.bind (requireStringE @@ var "cx" @@ avro_type @@ var "m")
-          (lambda "typeName" $ decodeObjectSchema @@ var "cx" @@ var "m" @@ var "typeName")]
-
-decodeObjectSchema :: TTermDefinition (Context -> M.Map String JM.Value -> String -> Result Avro.Schema)
-decodeObjectSchema = define "decodeObjectSchema" $
-  doc "Decode an Avro schema from a JSON object given the type name" $
-  lambda "cx" $ lambda "m" $ lambda "typeName" $
-    Logic.ifElse (Equality.equal (var "typeName") (string "array"))
-      (decodeArraySchema @@ var "cx" @@ var "m")
-      (Logic.ifElse (Equality.equal (var "typeName") (string "map"))
-        (decodeMapSchema @@ var "cx" @@ var "m")
-        (Logic.ifElse (Equality.equal (var "typeName") (string "record"))
-          (decodeNamedSchema @@ var "cx" @@ var "m" @@ (decodeRecord @@ var "cx" @@ var "m"))
-          (Logic.ifElse (Equality.equal (var "typeName") (string "enum"))
-            (decodeNamedSchema @@ var "cx" @@ var "m" @@ (decodeEnum @@ var "cx" @@ var "m"))
-            (Logic.ifElse (Equality.equal (var "typeName") (string "fixed"))
-              (decodeNamedSchema @@ var "cx" @@ var "m" @@ (decodeFixed @@ var "cx" @@ var "m"))
-              -- Primitive type as object (unusual but valid, e.g. {"type": "string"})
-              (Maybes.maybe
-                (err @@ var "cx" @@ (Strings.cat $ list [string "unknown type: ", var "typeName"]))
-                (lambda "p" $ Phantoms.right (inject Avro._Schema Avro._Schema_primitive (var "p")))
-                (decodePrimitiveName @@ var "typeName"))))))
-
-decodeArraySchema :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.Schema)
-decodeArraySchema = define "decodeArraySchema" $
-  doc "Decode an Avro array schema from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (requireE @@ var "cx" @@ avro_items @@ var "m")
-      (lambda "items" $
-        Eithers.map
-          (lambda "s" $ inject Avro._Schema Avro._Schema_array (record Avro._Array [
-            Avro._Array_items>>: var "s"]))
-          (decodeSchema @@ var "cx" @@ var "items"))
-
-decodeMapSchema :: TTermDefinition (Context -> M.Map String JM.Value -> Result Avro.Schema)
-decodeMapSchema = define "decodeMapSchema" $
-  doc "Decode an Avro map schema from a JSON object map" $
-  lambda "cx" $ lambda "m" $
-    Eithers.bind (requireE @@ var "cx" @@ avro_values @@ var "m")
-      (lambda "values" $
-        Eithers.map
-          (lambda "s" $ inject Avro._Schema Avro._Schema_map (record Avro._Map [
-            Avro._Map_values>>: var "s"]))
-          (decodeSchema @@ var "cx" @@ var "values"))
-
-getAnnotations :: TTermDefinition (M.Map String JM.Value -> M.Map String JM.Value)
-getAnnotations = define "getAnnotations" $
-  doc "Extract annotation entries (keys starting with @) from a JSON object map" $
-  lambda "m" $
-    Maps.fromList (Maybes.cat (Lists.map
-      (lambda "entry" $ lets [
-        "k">: Pairs.first (var "entry"),
-        "v">: Pairs.second (var "entry")] $
-        Logic.ifElse
-          (Equality.equal (Maybes.fromMaybe (int32 0) (Strings.maybeCharAt (int32 0) (var "k"))) (int32 64))  -- 64 = '@'
-          (Maybes.pure (pair (Strings.fromList (Lists.drop (int32 1) (Strings.toList (var "k")))) (var "v")))
-          nothing)
-      (Maps.toList (var "m"))))
diff --git a/src/main/haskell/Hydra/Sources/Avro/Testing.hs b/src/main/haskell/Hydra/Sources/Avro/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Avro/Testing.hs
+++ /dev/null
@@ -1,297 +0,0 @@
--- | Test case types for the bidirectional Avro coder
-
-module Hydra.Sources.Avro.Testing where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Json.Model        as JsonModel
-import qualified Hydra.Sources.Avro.Schema   as AvroSchema
-
-
-ns :: Namespace
-ns = Namespace "hydra.avro.testing"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-avro :: String -> Type
-avro = typeref AvroSchema.ns
-
-json :: String -> Type
-json = typeref JsonModel.ns
-
-local :: String -> Type
-local = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns, AvroSchema.ns, JsonModel.ns],
-            moduleDescription = Just "Test case types for the bidirectional Avro coder"}
-  where
-    definitions = [
-      typeLevelForwardTestCase,
-      typeLevelReverseTestCase,
-      typeLevelRoundTripAvroTestCase,
-      typeLevelRoundTripHydraTestCase,
-      termLevelForwardTestCase,
-      termLevelReverseTestCase,
-      termLevelRoundTripJsonTestCase,
-      termLevelRoundTripTermTestCase,
-      unionTestCase,
-      nameMappingTestCase,
-      lossinessTestCase,
-      schemaSerializationTestCase,
-      avroTestCase]
-
--- | Category 1: Type-level forward (Avro Schema -> Hydra Type)
-typeLevelForwardTestCase :: Binding
-typeLevelForwardTestCase = define "TypeLevelForwardTestCase" $
-  doc "A test case which maps an Avro schema to a Hydra type and compares the result" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "schema">:
-      doc "The input Avro schema"
-      (avro "Schema"),
-    "type">:
-      doc "The expected Hydra type"
-      Core.type_]
-
--- | Category 2: Type-level reverse (Hydra Type -> Avro Schema)
-typeLevelReverseTestCase :: Binding
-typeLevelReverseTestCase = define "TypeLevelReverseTestCase" $
-  doc "A test case which maps a Hydra type to an Avro schema and compares the result" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "type">:
-      doc "The input Hydra type"
-      Core.type_,
-    "schema">:
-      doc "The expected Avro schema"
-      (avro "Schema")]
-
--- | Category 3: Type-level round-trip starting from Avro (Avro -> Hydra -> Avro)
-typeLevelRoundTripAvroTestCase :: Binding
-typeLevelRoundTripAvroTestCase = define "TypeLevelRoundTripAvroTestCase" $
-  doc "A test case which maps an Avro schema to a Hydra type and back, verifying the result" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "schema">:
-      doc "The original Avro schema"
-      (avro "Schema"),
-    "expectedSchema">:
-      doc "The expected Avro schema after the round-trip, which may differ from the original due to normalization or information loss"
-      (avro "Schema")]
-
--- | Category 4: Type-level round-trip starting from Hydra (Hydra -> Avro -> Hydra)
-typeLevelRoundTripHydraTestCase :: Binding
-typeLevelRoundTripHydraTestCase = define "TypeLevelRoundTripHydraTestCase" $
-  doc "A test case which maps a Hydra type to an Avro schema and back, verifying the result" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "type">:
-      doc "The original Hydra type"
-      Core.type_,
-    "expectedType">:
-      doc "The expected Hydra type after the round-trip, which may differ from the original due to normalization or information loss"
-      Core.type_]
-
--- | Category 5: Term-level forward (JSON -> Hydra Term)
-termLevelForwardTestCase :: Binding
-termLevelForwardTestCase = define "TermLevelForwardTestCase" $
-  doc "A test case which encodes a JSON value as a Hydra term using an Avro schema" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "schema">:
-      doc "The Avro schema describing the JSON value"
-      (avro "Schema"),
-    "json">:
-      doc "The input JSON value"
-      (json "Value"),
-    "term">:
-      doc "The expected Hydra term"
-      Core.term]
-
--- | Category 6: Term-level reverse (Hydra Term -> JSON)
-termLevelReverseTestCase :: Binding
-termLevelReverseTestCase = define "TermLevelReverseTestCase" $
-  doc "A test case which decodes a Hydra term to a JSON value using an Avro schema" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "schema">:
-      doc "The Avro schema describing the expected JSON value"
-      (avro "Schema"),
-    "term">:
-      doc "The input Hydra term"
-      Core.term,
-    "json">:
-      doc "The expected JSON value"
-      (json "Value")]
-
--- | Category 7: Term-level round-trip starting from JSON (JSON -> Term -> JSON)
-termLevelRoundTripJsonTestCase :: Binding
-termLevelRoundTripJsonTestCase = define "TermLevelRoundTripJsonTestCase" $
-  doc "A test case which encodes a JSON value as a Hydra term and decodes it back, verifying the result" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "schema">:
-      doc "The Avro schema describing the JSON value"
-      (avro "Schema"),
-    "json">:
-      doc "The original JSON value"
-      (json "Value"),
-    "expectedJson">:
-      doc "The expected JSON value after the round-trip, which may differ from the original due to normalization"
-      (json "Value")]
-
--- | Category 8: Term-level round-trip starting from a term (Term -> JSON -> Term)
-termLevelRoundTripTermTestCase :: Binding
-termLevelRoundTripTermTestCase = define "TermLevelRoundTripTermTestCase" $
-  doc "A test case which decodes a Hydra term to JSON and encodes it back, verifying the result" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "type">:
-      doc "The Hydra type of the term"
-      Core.type_,
-    "term">:
-      doc "The original Hydra term"
-      Core.term,
-    "expectedTerm">:
-      doc "The expected Hydra term after the round-trip, which may differ from the original due to normalization"
-      Core.term]
-
--- | Category 9: Union-specific tests
-unionTestCase :: Binding
-unionTestCase = define "UnionTestCase" $
-  doc "A test case for union type encoding and decoding, covering the various strategies for representing unions in Avro" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "hydraType">:
-      doc "The Hydra union type"
-      Core.type_,
-    "avroSchema">:
-      doc "The expected Avro schema (enum for all-unit unions, record with optional fields for general unions)"
-      (avro "Schema"),
-    "termPairs">:
-      doc "Pairs of corresponding Hydra terms and JSON values for this union"
-      (T.list (T.pair Core.term (json "Value")))]
-
--- | Category 10: Name mapping tests
-nameMappingTestCase :: Binding
-nameMappingTestCase = define "NameMappingTestCase" $
-  doc "A test case for bidirectional name mapping between Hydra and Avro" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "hydraName">:
-      doc "The Hydra name"
-      Core.name,
-    "avroName">:
-      doc "The expected Avro qualified name (dotted string)"
-      T.string,
-    "avroNamespace">:
-      doc "The expected Avro namespace, if any"
-      (T.optional T.string)]
-
--- | Category 11: Lossiness and annotation tests
-lossinessTestCase :: Binding
-lossinessTestCase = define "LossinessTestCase" $
-  doc "A test case which verifies that lossy conversions stash original information in annotations" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "originalSchema">:
-      doc "The original Avro schema containing information that may be lost"
-      (avro "Schema"),
-    "hydraType">:
-      doc "The resulting Hydra type, which should carry annotations for any lost information"
-      Core.type_,
-    "recoveredSchema">:
-      doc "The Avro schema recovered from the annotated Hydra type"
-      (avro "Schema"),
-    "isLossy">:
-      doc "Whether the adapter reports this conversion as lossy"
-      T.boolean]
-
--- | Category 12: Schema serialization (Avro Schema <-> JSON)
-schemaSerializationTestCase :: Binding
-schemaSerializationTestCase = define "SchemaSerializationTestCase" $
-  doc "A test case for Avro schema serialization to and from JSON" $
-  T.record [
-    "description">:
-      doc "A human-readable description of what this test case covers"
-      T.string,
-    "schema">:
-      doc "The Avro schema"
-      (avro "Schema"),
-    "json">:
-      doc "The expected JSON representation of the schema"
-      (json "Value")]
-
--- | The union of all Avro test case types
-avroTestCase :: Binding
-avroTestCase = define "AvroTestCase" $
-  doc "A test case for the bidirectional Avro coder" $
-  T.union [
-    "typeLevelForward">:
-      doc "Type-level forward mapping (Avro Schema -> Hydra Type)"
-      (local "TypeLevelForwardTestCase"),
-    "typeLevelReverse">:
-      doc "Type-level reverse mapping (Hydra Type -> Avro Schema)"
-      (local "TypeLevelReverseTestCase"),
-    "typeLevelRoundTripAvro">:
-      doc "Type-level round-trip starting from Avro (Avro -> Hydra -> Avro)"
-      (local "TypeLevelRoundTripAvroTestCase"),
-    "typeLevelRoundTripHydra">:
-      doc "Type-level round-trip starting from Hydra (Hydra -> Avro -> Hydra)"
-      (local "TypeLevelRoundTripHydraTestCase"),
-    "termLevelForward">:
-      doc "Term-level forward mapping (JSON -> Hydra Term)"
-      (local "TermLevelForwardTestCase"),
-    "termLevelReverse">:
-      doc "Term-level reverse mapping (Hydra Term -> JSON)"
-      (local "TermLevelReverseTestCase"),
-    "termLevelRoundTripJson">:
-      doc "Term-level round-trip starting from JSON (JSON -> Term -> JSON)"
-      (local "TermLevelRoundTripJsonTestCase"),
-    "termLevelRoundTripTerm">:
-      doc "Term-level round-trip starting from a term (Term -> JSON -> Term)"
-      (local "TermLevelRoundTripTermTestCase"),
-    "union">:
-      doc "Union-specific encoding and decoding"
-      (local "UnionTestCase"),
-    "nameMapping">:
-      doc "Name mapping between Hydra and Avro"
-      (local "NameMappingTestCase"),
-    "lossiness">:
-      doc "Lossy conversion with annotation stashing"
-      (local "LossinessTestCase"),
-    "schemaSerialization">:
-      doc "Schema serialization to and from JSON"
-      (local "SchemaSerializationTestCase")]
diff --git a/src/main/haskell/Hydra/Sources/Coq/Coder.hs b/src/main/haskell/Hydra/Sources/Coq/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Coder.hs
+++ /dev/null
@@ -1,1047 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Coq code generator: converts Hydra type and term modules to Coq source code (.v files).
--- This is a DSL port of the previously hand-written Hydra.Coq.Coder.
-
-module Hydra.Sources.Coq.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Coq.Syntax                  as CoqSyntax
-import qualified Hydra.Sources.Coq.Environment             as CoqEnvironmentSource
-import qualified Hydra.Sources.Coq.Language                as CoqLanguage
-import qualified Hydra.Sources.Coq.Utils                   as CoqUtils
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as DL
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports for Coq AST
-import Hydra.Ast
-import qualified Hydra.Coq.Syntax as C
-import qualified Hydra.Coq.Environment as CE
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Local helper: listAny via Lists.find + Maybes.isJust, since the DSL list
--- library does not expose an `any` primitive directly.
-listAny :: TTerm (a -> Bool) -> TTerm [a] -> TTerm Bool
-listAny pred xs = Maybes.isJust (Lists.find pred xs)
-
-ns :: Namespace
-ns = Namespace "hydra.coq.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, CoqLanguage.ns],
-            moduleTypeDependencies = (CoqEnvironmentSource.ns:CoqSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Coq code generator: converts Hydra modules to Coq source"}
-  where
-    definitions = [
-      toDefinition coqArrow,
-      toDefinition coqIdent,
-      toDefinition coqName,
-      toDefinition coqQualid,
-      toDefinition coqTermApp,
-      toDefinition coqTermCast,
-      toDefinition coqTermQualid,
-      toDefinition coqTypeTerm,
-      toDefinition encodeAxiomDefinitionPair,
-      toDefinition encodeFloatLiteral,
-      toDefinition encodeLambdaTerm,
-      toDefinition encodeLiteral,
-      toDefinition encodeLiteralType,
-      toDefinition encodeProjectionElim,
-      toDefinition encodeTerm,
-      toDefinition encodeTermDefinition,
-      toDefinition encodeTermDefinitionPair,
-      toDefinition encodeType,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeTypeDefinitionPair,
-      toDefinition encodeUnionConstructor,
-      toDefinition encodeUnionElim,
-      toDefinition encodeWrapElim,
-      toDefinition escapeCoqString,
-      toDefinition extractLambdaBinders,
-      toDefinition isUnitDomain,
-      toDefinition isUnitLambda,
-      toDefinition localTypeName,
-      toDefinition moduleToCoq,
-      toDefinition renameLibKeyword,
-      toDefinition requireImportSentence,
-      toDefinition resolveQualifiedName,
-      toDefinition sanitizeStripped,
-      toDefinition sanitizeVar,
-      toDefinition standardImports,
-      toDefinition stripLambdas,
-      toDefinition termReferencesVar,
-      toDefinition unionConstructorName,
-      toDefinition unitLambdaBody]
-
--- | Build a Coq arrow type "dom -> cod", represented as forall (_ : dom), cod.
-coqArrow :: TTermDefinition (C.Term -> C.Term -> C.Term)
-coqArrow = define "coqArrow" $
-  doc "Build the Coq dependent-function term `forall (_ : dom), cod` used as the arrow type" $
-  lambdas ["dom", "cod"] $
-    inject C._Term C._Term_forallOrFun $
-      inject C._ForallOrFun C._ForallOrFun_forall $
-        record C._Forall [
-          C._Forall_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-            inject C._Binder C._Binder_type $
-              record C._TypeBinders [
-                C._TypeBinders_names>>: list [wrap C._Name (nothing :: TTerm (Maybe C.Ident))],
-                C._TypeBinders_type>>: coqTypeTerm @@ var "dom"]]),
-          C._Forall_type>>: coqTypeTerm @@ var "cod"]
-
--- | Build a Coq Ident from a string.
-coqIdent :: TTermDefinition (String -> C.Ident)
-coqIdent = define "coqIdent" $
-  lambda "s" $ wrap C._Ident $ wrap C._String $ var "s"
-
--- | Build a Coq Name (optional Ident) from a string.
-coqName :: TTermDefinition (String -> C.Name)
-coqName = define "coqName" $
-  lambda "s" $ wrap C._Name $ just (coqIdent @@ var "s")
-
--- | Build a simple Coq Qualid from a string (no field-path components).
-coqQualid :: TTermDefinition (String -> C.Qualid)
-coqQualid = define "coqQualid" $
-  lambda "s" $ record C._Qualid [
-    C._Qualid_id>>: coqIdent @@ var "s",
-    C._Qualid_fieldIds>>: list ([] :: [TTerm C.FieldIdent])]
-
--- | Build a Coq function application term "f args..." (or just "f" when there are no args).
-coqTermApp :: TTermDefinition (C.Term -> [C.Term] -> C.Term)
-coqTermApp = define "coqTermApp" $
-  doc "Apply a Coq term to a list of argument terms, parenthesising each" $
-  lambdas ["f", "args"] $
-    Logic.ifElse (Lists.null (var "args"))
-      (var "f")
-      (inject C._Term C._Term_term100 $
-        inject C._Term100 C._Term100_term10 $
-          inject C._Term10 C._Term10_application $
-            inject C._Application C._Application_normal $
-              record C._NormalApplication [
-                C._NormalApplication_lhs>>:
-                  inject C._Term1 C._Term1_term0 $
-                    inject C._Term0 C._Term0_parens (var "f"),
-                C._NormalApplication_rhs>>:
-                  Lists.map
-                    (lambda "a" $ inject C._Arg C._Arg_term $
-                      inject C._Term1 C._Term1_term0 $
-                        inject C._Term0 C._Term0_parens (var "a"))
-                    (var "args")])
-
--- | Wrap a term in a Coq type annotation: `(t : T)`. Used to force type
--- inference for empty containers like `None`, `nil`, and empty maps/sets,
--- whose element type cannot otherwise be inferred from context.
-coqTermCast :: TTermDefinition (C.Term -> C.Type -> C.Term)
-coqTermCast = define "coqTermCast" $
-  doc "Build a Coq Term expressing `(t : T)` with the normal cast operator" $
-  lambdas ["t", "ty"] $
-    inject C._Term C._Term_term100 $
-      inject C._Term100 C._Term100_cast $
-        record C._TypeCast [
-          C._TypeCast_term>>:
-            inject C._Term10 C._Term10_oneTerm $
-              inject C._OneTerm C._OneTerm_term1 $
-                inject C._Term1 C._Term1_term0 $
-                  inject C._Term0 C._Term0_parens (var "t"),
-          C._TypeCast_type>>: var "ty",
-          C._TypeCast_operator>>:
-            inject C._TypeCastOperator C._TypeCastOperator_normal unit]
-
--- | Build a Coq atomic term from a qualified name (unapplied).
-coqTermQualid :: TTermDefinition (String -> C.Term)
-coqTermQualid = define "coqTermQualid" $
-  doc "Build a Coq Term that references a (possibly qualified) identifier" $
-  lambda "s" $
-    inject C._Term C._Term_term100 $
-      inject C._Term100 C._Term100_term10 $
-        inject C._Term10 C._Term10_oneTerm $
-          inject C._OneTerm C._OneTerm_explicit $
-            record C._QualidAnnotated [
-              C._QualidAnnotated_qualid>>: coqQualid @@ var "s",
-              C._QualidAnnotated_univAnnot>>: (nothing :: TTerm (Maybe C.UnivAnnot))]
-
--- | Wrap a Term as a Type.
-coqTypeTerm :: TTermDefinition (C.Term -> C.Type)
-coqTypeTerm = define "coqTypeTerm" $
-  lambda "t" $ wrap C._Type $ var "t"
-
--- | Escape double quotes in a Coq string literal by doubling them.
-escapeCoqString :: TTermDefinition (String -> String)
-escapeCoqString = define "escapeCoqString" $
-  doc "Escape a string for Coq string literals: double any embedded quotes" $
-  lambda "s" $ Strings.intercalate (string "\"\"") (Strings.splitOn (string "\"") (var "s"))
-
--- | Sanitize a variable name to avoid Coq reserved words by appending an underscore.
-sanitizeVar :: TTermDefinition (String -> String)
-sanitizeVar = define "sanitizeVar" $
-  doc "Append an underscore if the name collides with a Coq reserved word" $
-  lambda "s" $ Formatting.escapeWithUnderscore @@ CoqLanguage.coqReservedWords @@ var "s"
-
--- | Sanitize a stripped local reference. Uses a narrower reserved-word set
--- than `sanitizeVar`, matching the old text-stripper's behaviour.
-sanitizeStripped :: TTermDefinition (String -> String)
-sanitizeStripped = define "sanitizeStripped" $
-  doc "Append an underscore if a stripped-local-name reference collides with a Coq reserved word" $
-  lambda "s" $ Formatting.escapeWithUnderscore @@ CoqLanguage.coqStrippedReservedWords @@ var "s"
-
--- | Encode a Hydra LiteralType to a Coq Term (qualid reference).
-encodeLiteralType :: TTermDefinition (LiteralType -> C.Term)
-encodeLiteralType = define "encodeLiteralType" $
-  doc "Map a Hydra LiteralType to its Coq stdlib counterpart" $
-  lambda "lt" $ cases _LiteralType (var "lt") Nothing [
-    _LiteralType_boolean>>: constant (coqTermQualid @@ string "bool"),
-    _LiteralType_decimal>>: constant (coqTermQualid @@ string "Q"),
-    _LiteralType_float>>: constant (coqTermQualid @@ string "Q"),
-    _LiteralType_integer>>: "it" ~> cases _IntegerType (var "it") Nothing [
-      _IntegerType_bigint>>: constant (coqTermQualid @@ string "Z"),
-      _IntegerType_int8>>: constant (coqTermQualid @@ string "Z"),
-      _IntegerType_int16>>: constant (coqTermQualid @@ string "Z"),
-      _IntegerType_int32>>: constant (coqTermQualid @@ string "Z"),
-      _IntegerType_int64>>: constant (coqTermQualid @@ string "Z"),
-      _IntegerType_uint8>>: constant (coqTermQualid @@ string "nat"),
-      _IntegerType_uint16>>: constant (coqTermQualid @@ string "nat"),
-      _IntegerType_uint32>>: constant (coqTermQualid @@ string "nat"),
-      _IntegerType_uint64>>: constant (coqTermQualid @@ string "nat")],
-    _LiteralType_string>>: constant (coqTermQualid @@ string "string"),
-    _LiteralType_binary>>: constant (coqTermQualid @@ string "string")]
-
--- | Encode a Hydra Type to a Coq Term.
-encodeType :: TTermDefinition (CE.CoqEnvironment -> Type -> C.Term)
-encodeType = define "encodeType" $
-  doc "Translate a Hydra Type into a Coq Term representing that type. The environment is consulted to resolve qualified type variable references" $
-  lambdas ["env", "ty"] $ cases _Type (var "ty") Nothing [
-    _Type_annotated>>: "at" ~> encodeType @@ var "env" @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~>
-      coqTermApp
-        @@ (encodeType @@ var "env" @@ (Core.applicationTypeFunction $ var "app"))
-        @@ list [encodeType @@ var "env" @@ (Core.applicationTypeArgument $ var "app")],
-    _Type_either>>: "et" ~>
-      coqTermApp @@ (coqTermQualid @@ string "sum") @@ list [
-        encodeType @@ var "env" @@ (Core.eitherTypeLeft $ var "et"),
-        encodeType @@ var "env" @@ (Core.eitherTypeRight $ var "et")],
-    _Type_forall>>: "ft" ~>
-      inject C._Term C._Term_forallOrFun $
-        inject C._ForallOrFun C._ForallOrFun_forall $
-          record C._Forall [
-            C._Forall_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-              inject C._Binder C._Binder_type $
-                record C._TypeBinders [
-                  C._TypeBinders_names>>:
-                    list [coqName @@ (unwrap _Name @@ (Core.forallTypeParameter $ var "ft"))],
-                  C._TypeBinders_type>>: coqTypeTerm @@ (coqTermQualid @@ string "Type")]]),
-            C._Forall_type>>: coqTypeTerm @@ (encodeType @@ var "env" @@ (Core.forallTypeBody $ var "ft"))],
-    _Type_function>>: "ft" ~>
-      coqArrow
-        @@ (encodeType @@ var "env" @@ (Core.functionTypeDomain $ var "ft"))
-        @@ (encodeType @@ var "env" @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_list>>: "t" ~>
-      coqTermApp @@ (coqTermQualid @@ string "list") @@ list [encodeType @@ var "env" @@ var "t"],
-    _Type_literal>>: "lt" ~> encodeLiteralType @@ var "lt",
-    _Type_map>>: "mt" ~>
-      coqTermApp @@ (coqTermQualid @@ string "list") @@ list [
-        coqTermApp @@ (coqTermQualid @@ string "prod") @@ list [
-          encodeType @@ var "env" @@ (Core.mapTypeKeys $ var "mt"),
-          encodeType @@ var "env" @@ (Core.mapTypeValues $ var "mt")]],
-    _Type_maybe>>: "t" ~>
-      coqTermApp @@ (coqTermQualid @@ string "option") @@ list [encodeType @@ var "env" @@ var "t"],
-    _Type_pair>>: "pt" ~>
-      coqTermApp @@ (coqTermQualid @@ string "prod") @@ list [
-        encodeType @@ var "env" @@ (Core.pairTypeFirst $ var "pt"),
-        encodeType @@ var "env" @@ (Core.pairTypeSecond $ var "pt")],
-    _Type_record>>: constant (coqTermQualid @@ string "unit"),
-    _Type_set>>: "t" ~>
-      coqTermApp @@ (coqTermQualid @@ string "list") @@ list [encodeType @@ var "env" @@ var "t"],
-    _Type_union>>: constant (coqTermQualid @@ string "unit"),
-    _Type_unit>>: constant (coqTermQualid @@ string "unit"),
-    _Type_variable>>: "n" ~> lets [
-      "raw">: unwrap _Name @@ var "n",
-      -- Type-variable references are emitted raw when unqualified (Coq
-      -- primitives like `Type`, locally-bound type-param names like `t0`);
-      -- only `hydra.<ns>.<x>` / `Build_hydra.<ns>.<x>` references need to
-      -- flow through the full qualified-name resolver.
-      "headSeg">: Maybes.fromMaybe (var "raw") (Lists.maybeHead (Strings.splitOn (string ".") (var "raw")))] $
-      Logic.ifElse (Logic.or
-          (Equality.equal (var "headSeg") (string "hydra"))
-          (Equality.equal (var "headSeg") (string "Build_hydra")))
-        (coqTermQualid @@ (resolveQualifiedName @@ var "env" @@ var "raw"))
-        (coqTermQualid @@ var "raw"),
-    _Type_void>>: constant (coqTermQualid @@ string "Empty_set"),
-    _Type_wrap>>: "wt" ~> encodeType @@ var "env" @@ var "wt"]
-
--- | Encode a (name, Type) pair as a Coq Sentence containing an Axiom declaration.
--- Used for modules whose definitions cannot practically compile under coqc (e.g.
--- hydra.hoisting, hydra.inference) — their term definitions are replaced by
--- axioms of the same type, which the rest of the Coq build can still consume.
-encodeAxiomDefinitionPair :: TTermDefinition (CE.CoqEnvironment -> (String, Type) -> C.Sentence)
-encodeAxiomDefinitionPair = define "encodeAxiomDefinitionPair" $
-  doc "Produce `Axiom name : type.` from a (name, Hydra type) pair" $
-  lambdas ["env", "nt"] $
-    record C._Sentence [
-      C._Sentence_comment>>: (nothing :: TTerm (Maybe C.Comment)),
-      C._Sentence_content>>:
-        inject C._SentenceContent C._SentenceContent_axiom $
-          record C._AxiomDeclaration [
-            C._AxiomDeclaration_name>>: coqIdent @@ Pairs.first (var "nt"),
-            C._AxiomDeclaration_type>>: coqTypeTerm @@ (encodeType @@ var "env" @@ Pairs.second (var "nt"))]]
-
--- | Translate a float string (produced by `showBigfloat`) to a Coq Term.
--- Ordinary values become parenthesised `Q`-scope literals. IEEE 754 special
--- values (`Infinity`, `-Infinity`, `NaN`) have no representation in Coq's
--- exact rationals, so they are emitted as references to the corresponding
--- `hydra_posInf`/`hydra_negInf`/`hydra_nan` axioms from `hydra.lib.base`.
-encodeFloatLiteral :: TTermDefinition (String -> C.Term)
-encodeFloatLiteral = define "encodeFloatLiteral" $
-  doc "Map a Haskell-`show`n Double/Scientific to a Coq term, routing NaN/Inf to base-lib axioms" $
-  lambda "s" $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (coqTermQualid @@ string "hydra_posInf") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (coqTermQualid @@ string "hydra_negInf") $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (coqTermQualid @@ string "hydra_nan")
-      (coqTermQualid @@ Strings.cat (list [string "(", var "s", string ")"]))
-
--- | Encode a single Hydra Lambda term into a Coq `fun` term.
-encodeLambdaTerm :: TTermDefinition (CE.CoqEnvironment -> Lambda -> C.Term)
-encodeLambdaTerm = define "encodeLambdaTerm" $
-  doc "Encode a Lambda into a Coq `fun` expression, sanitising the parameter name" $
-  lambdas ["env", "lam"] $ lets [
-    "paramName">: sanitizeVar @@ (unwrap _Name @@ (Core.lambdaParameter $ var "lam")),
-    "binder">: Maybes.maybe
-      (inject C._Binder C._Binder_name (coqName @@ var "paramName"))
-      (lambda "domTy" $ inject C._Binder C._Binder_type $
-        record C._TypeBinders [
-          C._TypeBinders_names>>: list [coqName @@ var "paramName"],
-          C._TypeBinders_type>>: coqTypeTerm @@ (encodeType @@ var "env" @@ var "domTy")])
-      (Core.lambdaDomain $ var "lam")] $
-    inject C._Term C._Term_forallOrFun $
-      inject C._ForallOrFun C._ForallOrFun_fun $
-        record C._Fun [
-          C._Fun_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [var "binder"]),
-          C._Fun_body>>: encodeTerm @@ var "env" @@ (Core.lambdaBody $ var "lam")]
-
--- | Encode a Hydra literal into a Coq Term.
-encodeLiteral :: TTermDefinition (Literal -> C.Term)
-encodeLiteral = define "encodeLiteral" $
-  doc "Translate a Hydra literal into its Coq stdlib form, with disambiguating parentheses" $
-  lambda "lit" $ cases _Literal (var "lit") Nothing [
-    _Literal_boolean>>: "b" ~>
-      Logic.ifElse (var "b") (coqTermQualid @@ string "true") (coqTermQualid @@ string "false"),
-    _Literal_decimal>>: "d" ~> coqTermQualid @@ Strings.cat (list [
-      string "(", Literals.showDecimal (var "d"), string ")"]),
-    _Literal_float>>: "fv" ~> cases _FloatValue (var "fv") Nothing [
-      _FloatValue_bigfloat>>: "v" ~> encodeFloatLiteral @@ Literals.showBigfloat (var "v"),
-      _FloatValue_float32>>: "v" ~> encodeFloatLiteral @@ Literals.showBigfloat (Literals.float32ToBigfloat $ var "v"),
-      _FloatValue_float64>>: "v" ~> encodeFloatLiteral @@ Literals.showBigfloat (Literals.float64ToBigfloat $ var "v")],
-    _Literal_integer>>: "iv" ~> cases _IntegerValue (var "iv") Nothing [
-      _IntegerValue_bigint>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showBigint (var "v"), string ")%Z"]),
-      _IntegerValue_int8>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showInt8 (var "v"), string ")%Z"]),
-      _IntegerValue_int16>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showInt16 (var "v"), string ")%Z"]),
-      _IntegerValue_int32>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showInt32 (var "v"), string ")%Z"]),
-      _IntegerValue_int64>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showInt64 (var "v"), string ")%Z"]),
-      _IntegerValue_uint8>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showUint8 (var "v"), string ")"]),
-      _IntegerValue_uint16>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showUint16 (var "v"), string ")"]),
-      _IntegerValue_uint32>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showUint32 (var "v"), string ")"]),
-      _IntegerValue_uint64>>: "v" ~> coqTermQualid @@ Strings.cat (list [
-        string "(", Literals.showUint64 (var "v"), string ")"])],
-    _Literal_string>>: "s" ~> coqTermQualid @@ Strings.cat (list [
-      string "\"", escapeCoqString @@ var "s", string "\"%string"]),
-    _Literal_binary>>: constant (coqTermQualid @@ string "\"\"")]
-
--- | Encode a Hydra record projection as a Coq `fun r_ => r_.(field)` term.
--- If the projection refers to a field that was sanitised to `unit` during
--- type generation (because of a positivity failure), emit an unreachable
--- stub instead. That replaces the former `replaceSanitizedAccessors` text
--- post-processor in `packages/hydra-coq/.../Hydra/Coq/Generate.hs`.
-encodeProjectionElim :: TTermDefinition (CE.CoqEnvironment -> Projection -> C.Term)
-encodeProjectionElim = define "encodeProjectionElim" $
-  doc "Translate a Hydra record projection into a Coq lambda that pulls out the field" $
-  lambdas ["env", "p"] $ lets [
-    "fname">: Core.projectionField $ var "p",
-    "rawFname">: unwrap _Name @@ var "fname",
-    "sanitizedSet">: project CE._CoqEnvironment CE._CoqEnvironment_sanitizedAccessors @@ var "env"] $
-    Logic.ifElse (Sets.member (var "rawFname") (var "sanitizedSet"))
-      -- Sanitised accessor: the field is typed as `unit` in the generated
-      -- record (positivity workaround). Any call site that projects it would
-      -- get `tt`, which is never the real value. Emit `hydra_unreachable`
-      -- so the caller traps rather than silently proceeding.
-      (inject C._Term C._Term_forallOrFun $
-        inject C._ForallOrFun C._ForallOrFun_fun $
-          record C._Fun [
-            C._Fun_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-              inject C._Binder C._Binder_name (coqName @@ string "_")]),
-            C._Fun_body>>: coqTermQualid @@ string "hydra_unreachable"])
-      (inject C._Term C._Term_forallOrFun $
-        inject C._ForallOrFun C._ForallOrFun_fun $
-          record C._Fun [
-            C._Fun_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-              inject C._Binder C._Binder_name (coqName @@ string "r_")]),
-            C._Fun_body>>: coqTermApp
-              @@ (coqTermQualid @@ var "rawFname")
-              @@ list [coqTermQualid @@ string "r_"]])
-
--- | Encode a Hydra Term into a Coq Term.
-encodeTerm :: TTermDefinition (CE.CoqEnvironment -> Term -> C.Term)
-encodeTerm = define "encodeTerm" $
-  doc "Translate a Hydra Term into its Coq Term counterpart. The environment provides the constructor-count map used by encodeUnionElim (to decide whether a match is exhaustive) and the ambiguous-name set used by resolveQualifiedName (to decide whether cross-module references need to stay fully qualified)." $
-  lambdas ["env", "tm"] $ cases _Term (var "tm") Nothing [
-    _Term_annotated>>: "at" ~> encodeTerm @@ var "env" @@ (Core.annotatedTermBody $ var "at"),
-    _Term_application>>: "app" ~>
-      coqTermApp
-        @@ (encodeTerm @@ var "env" @@ (Core.applicationFunction $ var "app"))
-        @@ list [encodeTerm @@ var "env" @@ (Core.applicationArgument $ var "app")],
-    _Term_cases>>: "cs" ~> encodeUnionElim @@ var "env" @@ var "cs",
-    _Term_either>>: "e" ~> Eithers.either_
-      (lambda "l" $ coqTermApp @@ (coqTermQualid @@ string "inl") @@ list [encodeTerm @@ var "env" @@ var "l"])
-      (lambda "r" $ coqTermApp @@ (coqTermQualid @@ string "inr") @@ list [encodeTerm @@ var "env" @@ var "r"])
-      (var "e"),
-    _Term_inject>>: "inj" ~> lets [
-      "uname">: Core.injectionTypeName $ var "inj",
-      "ufield">: Core.injectionField $ var "inj",
-      "fname">: Core.fieldName $ var "ufield",
-      "fterm">: Core.fieldTerm $ var "ufield",
-      "constrName">: unionConstructorName
-        @@ (unwrap _Name @@ var "uname")
-        @@ (unwrap _Name @@ var "fname")] $
-      coqTermApp
-        @@ (coqTermQualid @@ (resolveQualifiedName @@ var "env" @@ var "constrName"))
-        @@ list [encodeTerm @@ var "env" @@ var "fterm"],
-    _Term_lambda>>: "lam" ~> encodeLambdaTerm @@ var "env" @@ var "lam",
-    _Term_let>>: "lt" ~> lets [
-      "bindings">: Core.letBindings $ var "lt",
-      "body">: Core.letBody $ var "lt"] $
-      Lists.foldr
-        (lambdas ["binding", "acc"] $ lets [
-          "bname">: Core.bindingName $ var "binding",
-          "bterm">: Core.bindingTerm $ var "binding",
-          "safeName">: sanitizeVar @@ (unwrap _Name @@ var "bname"),
-          "recursive">: termReferencesVar @@ var "bname" @@ var "bterm",
-          "recBody">: coqTermApp @@ (coqTermQualid @@ string "hydra_fix") @@ list [
-            inject C._Term C._Term_forallOrFun $
-              inject C._ForallOrFun C._ForallOrFun_fun $
-                record C._Fun [
-                  C._Fun_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-                    inject C._Binder C._Binder_name (coqName @@ var "safeName")]),
-                  C._Fun_body>>: encodeTerm @@ var "env" @@ var "bterm"]],
-          "boundTerm">: Logic.ifElse (var "recursive") (var "recBody") (encodeTerm @@ var "env" @@ var "bterm")] $
-          inject C._Term C._Term_let $
-            record C._Let [
-              C._Let_bindings>>:
-                inject C._LetBindings C._LetBindings_named $
-                  record C._LetNamed [
-                    C._LetNamed_binder>>: record C._LetBinder [
-                      C._LetBinder_name>>: coqName @@ var "safeName",
-                      C._LetBinder_type>>: (nothing :: TTerm (Maybe C.Type)),
-                      C._LetBinder_term>>: var "boundTerm"],
-                    C._LetNamed_binders>>: list ([] :: [TTerm C.LetBinder])],
-              C._Let_in>>: var "acc"])
-        (encodeTerm @@ var "env" @@ var "body")
-        (var "bindings"),
-    _Term_list>>: "xs" ~>
-      Lists.foldr
-        (lambdas ["el", "acc"] $ coqTermApp @@ (coqTermQualid @@ string "cons") @@ list [
-          encodeTerm @@ var "env" @@ var "el", var "acc"])
-        (coqTermQualid @@ string "nil")
-        (var "xs"),
-    _Term_literal>>: "l" ~> encodeLiteral @@ var "l",
-    -- Maps are encoded as Coq association lists `list (k * v)`, matching
-    -- the representation used by `hydra.lib.maps.*`. An empty map becomes
-    -- bare `nil`; a non-empty map becomes `cons (pair k1 v1) (cons (pair k2 v2) ... nil)`.
-    -- Coq can infer the element type from surrounding context in almost all
-    -- cases; bare-`nil` cases that need an explicit cast go through
-    -- `_Term_typeApplication`.
-    _Term_map>>: "mt" ~>
-      Lists.foldr
-        (lambdas ["kv", "acc"] $ coqTermApp @@ (coqTermQualid @@ string "cons") @@ list [
-          coqTermApp @@ (coqTermQualid @@ string "pair") @@ list [
-            encodeTerm @@ var "env" @@ Pairs.first (var "kv"),
-            encodeTerm @@ var "env" @@ Pairs.second (var "kv")],
-          var "acc"])
-        (coqTermQualid @@ string "nil")
-        (Maps.toList $ var "mt"),
-    _Term_maybe>>: "mt" ~> Maybes.maybe
-      (coqTermQualid @@ string "None")
-      (lambda "v" $ coqTermApp @@ (coqTermQualid @@ string "Some") @@ list [encodeTerm @@ var "env" @@ var "v"])
-      (var "mt"),
-    _Term_pair>>: "p" ~>
-      coqTermApp @@ (coqTermQualid @@ string "pair") @@ list [
-        encodeTerm @@ var "env" @@ Pairs.first (var "p"),
-        encodeTerm @@ var "env" @@ Pairs.second (var "p")],
-    _Term_project>>: "pr" ~> encodeProjectionElim @@ var "env" @@ var "pr",
-    _Term_record>>: "r" ~> lets [
-      "rname">: Core.recordTypeName $ var "r",
-      "rfields">: Core.recordFields $ var "r"] $
-      Logic.ifElse (Lists.null $ var "rfields")
-        (coqTermQualid @@ string "tt")
-        (coqTermApp
-          @@ (coqTermQualid @@ (resolveQualifiedName @@ var "env"
-                @@ (Strings.cat2 (string "Build_") (unwrap _Name @@ var "rname"))))
-          @@ Lists.map
-            (lambda "f" $ encodeTerm @@ var "env" @@ (Core.fieldTerm $ var "f"))
-            (var "rfields")),
-    -- Sets are encoded as deduplicated Coq `list x`, matching the
-    -- representation used by `hydra.lib.sets.*`. An empty set becomes
-    -- bare `nil`; a non-empty set becomes `cons v1 (cons v2 ... nil)`.
-    _Term_set>>: "st" ~>
-      Lists.foldr
-        (lambdas ["el", "acc"] $ coqTermApp @@ (coqTermQualid @@ string "cons") @@ list [
-          encodeTerm @@ var "env" @@ var "el", var "acc"])
-        (coqTermQualid @@ string "nil")
-        (Sets.toList $ var "st"),
-    _Term_typeApplication>>: "ta" ~> lets [
-      "body">: Core.typeApplicationTermBody $ var "ta",
-      "tyArg">: Core.typeApplicationTermType $ var "ta",
-      "encoded">: encodeTerm @@ var "env" @@ var "body",
-      -- A ground (free-variable-free) type argument can safely be emitted as
-      -- a Coq type annotation `(t : T)`. A type that mentions a Hydra type
-      -- variable cannot, because such variables come from outer `TypeLambda`
-      -- binders that Hydra erases in Coq — the variable would be free.
-      "isGround">: Sets.null (CoqUtils.collectFreeTypeVarsInType @@ var "tyArg")] $
-      -- An empty container (None, [], empty map, empty set) cannot have its
-      -- element type inferred by Coq from the surrounding context. Emit an
-      -- explicit `(None : option T)` / `(nil : list T)` cast using the type
-      -- argument from the enclosing TypeApplication, but only when the type
-      -- is ground. Non-empty bodies are left untouched.
-      Logic.ifElse (Logic.not $ var "isGround") (var "encoded") $
-      -- `_Term_maybe Nothing` and `_Term_either (inl|inr)` need type
-      -- annotations: Coq cannot infer the "other" type parameter of `option`
-      -- / `sum` from context when these appear as record fields or function
-      -- arguments. Empty lists/maps/sets are NOT annotated here because the
-      -- TypeApplication's `type` field does not always match the Coq-side
-      -- expected type (e.g. Hydra's `Map Name Term` vs Coq's
-      -- `list (Name * Term)`), so a blind cast would produce the wrong type.
-      cases _Term (var "body")
-        (Just (var "encoded")) [
-        _Term_maybe>>: "mt" ~> Maybes.maybe
-          (coqTermCast @@ (coqTermQualid @@ string "None")
-            @@ (coqTypeTerm @@ (coqTermApp @@ (coqTermQualid @@ string "option")
-              @@ list [encodeType @@ var "env" @@ var "tyArg"])))
-          (constant $ var "encoded")
-          (var "mt"),
-        -- Empty list: annotate with `list <tyArg>` when the element type is
-        -- compound (either, pair, map). This handles `lefts nil` / `rights nil`
-        -- (tyArg = sum) and similar. Simple tyArgs like `Name` are skipped
-        -- because Hydra sometimes passes a wrong single-type element (e.g.
-        -- `Name` for an annotation field whose Coq type is `list (Name * Term)`).
-        _Term_list>>: "xs" ~> Logic.ifElse
-          (Logic.and (Lists.null $ var "xs")
-            (cases _Type (var "tyArg") (Just (boolean False)) [
-              _Type_either>>: constant (boolean True),
-              _Type_pair>>: constant (boolean True),
-              _Type_map>>: constant (boolean True)]))
-          (coqTermCast @@ (coqTermQualid @@ string "nil")
-            @@ (coqTypeTerm @@ (coqTermApp @@ (coqTermQualid @@ string "list")
-              @@ list [encodeType @@ var "env" @@ var "tyArg"])))
-          (var "encoded"),
-        -- For `_Term_either`, Hydra wraps in TWO nested TypeApplications
-        -- (one per type parameter): `TypeApp (TypeApp (Either x) L) R`.
-        -- We receive the outer one here. If `tyArg` is already a full
-        -- `_Type_either`, use it directly. Otherwise, fall through.
-        _Term_either>>: "e" ~>
-          cases _Type (var "tyArg")
-            (Just (var "encoded")) [
-            _Type_either>>: "et" ~> lets [
-              "sumTy">: coqTypeTerm @@ (coqTermApp @@ (coqTermQualid @@ string "sum") @@ list [
-                encodeType @@ var "env" @@ (Core.eitherTypeLeft $ var "et"),
-                encodeType @@ var "env" @@ (Core.eitherTypeRight $ var "et")])] $
-              coqTermCast @@ var "encoded" @@ var "sumTy"],
-        -- Nested TypeApplication: body is another TypeApplication.
-        -- Peel one layer and recurse. This handles `TypeApp (TypeApp (Either x) L) R`
-        -- where the inner body is `_Term_either`.
-        _Term_typeApplication>>: "innerTa" ~> lets [
-          "innerBody">: Core.typeApplicationTermBody $ var "innerTa",
-          "innerTyArg">: Core.typeApplicationTermType $ var "innerTa",
-          "innerEncoded">: encodeTerm @@ var "env" @@ var "innerBody"] $
-          cases _Term (var "innerBody")
-            (Just (var "encoded")) [
-            _Term_either>>: "innerE" ~> lets [
-              "sumTy">: coqTypeTerm @@ (coqTermApp @@ (coqTermQualid @@ string "sum") @@ list [
-                encodeType @@ var "env" @@ var "innerTyArg",
-                encodeType @@ var "env" @@ var "tyArg"])] $
-              coqTermCast @@ var "innerEncoded" @@ var "sumTy"]],
-    _Term_typeLambda>>: "tl" ~> encodeTerm @@ var "env" @@ (Core.typeLambdaBody $ var "tl"),
-    _Term_unit>>: constant (coqTermQualid @@ string "tt"),
-    _Term_unwrap>>: "n" ~> encodeWrapElim @@ var "n",
-    _Term_variable>>: "n" ~>
-      coqTermQualid @@ (resolveQualifiedName @@ var "env" @@ (unwrap _Name @@ var "n")),
-    _Term_wrap>>: "wt" ~> encodeTerm @@ var "env" @@ (Core.wrappedTermBody $ var "wt")]
-
--- | Wrap an encoded term body as a Coq Definition sentence content.
-encodeTermDefinition :: TTermDefinition (CE.CoqEnvironment -> String -> Term -> C.SentenceContent)
-encodeTermDefinition = define "encodeTermDefinition" $
-  doc "Build a Coq `Definition name := body.` sentence from a Hydra term" $
-  lambdas ["env", "name", "body"] $
-    inject C._SentenceContent C._SentenceContent_definition $
-      record C._Definition [
-        C._Definition_locality>>: (nothing :: TTerm (Maybe C.Locality)),
-        C._Definition_name>>: coqIdent @@ var "name",
-        C._Definition_binders>>: list ([] :: [TTerm C.Binder]),
-        C._Definition_type>>: (nothing :: TTerm (Maybe C.Type)),
-        C._Definition_body>>: encodeTerm @@ var "env" @@ var "body"]
-
--- | Encode a (name, Term) pair as a Coq Sentence.
-encodeTermDefinitionPair :: TTermDefinition (CE.CoqEnvironment -> (String, Term) -> C.Sentence)
-encodeTermDefinitionPair = define "encodeTermDefinitionPair" $
-  doc "Wrap encodeTermDefinition in a Coq Sentence with no leading comment" $
-  lambdas ["env", "ed"] $
-    record C._Sentence [
-      C._Sentence_comment>>: (nothing :: TTerm (Maybe C.Comment)),
-      C._Sentence_content>>: encodeTermDefinition @@ var "env" @@ Pairs.first (var "ed") @@ Pairs.second (var "ed")]
-
--- | Wrap an encoded type body as a Coq Definition sentence content (typed `: Type`).
-encodeTypeDefinition :: TTermDefinition (CE.CoqEnvironment -> String -> Type -> C.SentenceContent)
-encodeTypeDefinition = define "encodeTypeDefinition" $
-  doc "Build a Coq `Definition name : Type := body.` sentence from a Hydra type" $
-  lambdas ["env", "name", "ty"] $
-    inject C._SentenceContent C._SentenceContent_definition $
-      record C._Definition [
-        C._Definition_locality>>: (nothing :: TTerm (Maybe C.Locality)),
-        C._Definition_name>>: coqIdent @@ var "name",
-        C._Definition_binders>>: list ([] :: [TTerm C.Binder]),
-        C._Definition_type>>: just (coqTypeTerm @@ (coqTermQualid @@ string "Type")),
-        C._Definition_body>>: encodeType @@ var "env" @@ var "ty"]
-
--- | Encode a (name, Type) pair as a Coq Sentence.
-encodeTypeDefinitionPair :: TTermDefinition (CE.CoqEnvironment -> (String, Type) -> C.Sentence)
-encodeTypeDefinitionPair = define "encodeTypeDefinitionPair" $
-  doc "Wrap encodeTypeDefinition in a Coq Sentence with no leading comment" $
-  lambdas ["env", "td"] $
-    record C._Sentence [
-      C._Sentence_comment>>: (nothing :: TTerm (Maybe C.Comment)),
-      C._Sentence_content>>: encodeTypeDefinition @@ var "env" @@ Pairs.first (var "td") @@ Pairs.second (var "td")]
-
--- | Build a Coq Constructor from a Hydra union FieldType.
-encodeUnionConstructor :: TTermDefinition (CE.CoqEnvironment -> String -> FieldType -> C.Constructor)
-encodeUnionConstructor = define "encodeUnionConstructor" $
-  doc "Construct a Coq Inductive Constructor line `Name_Tag : body -> Name` for a union variant" $
-  lambdas ["env", "typeName", "f"] $ lets [
-    "ufn">: Core.fieldTypeName $ var "f",
-    "uft">: Core.fieldTypeType $ var "f",
-    "constrName">: Strings.cat (list [
-      var "typeName", string "_",
-      Formatting.capitalize @@ (unwrap _Name @@ var "ufn")])] $
-    record C._Constructor [
-      C._Constructor_name>>: coqIdent @@ var "constrName",
-      C._Constructor_binders>>: list ([] :: [TTerm C.Binder]),
-      C._Constructor_type>>: just $ coqTypeTerm @@
-        (coqArrow
-          @@ (encodeType @@ var "env" @@ var "uft")
-          @@ (coqTermQualid @@ var "typeName"))]
-
--- | Translate a union eliminator (Hydra `TermCases`) into a Coq `fun x_ => match x_ with ... end`.
-encodeUnionElim :: TTermDefinition (CE.CoqEnvironment -> CaseStatement -> C.Term)
-encodeUnionElim = define "encodeUnionElim" $
-  doc "Build a Coq match expression from a Hydra union eliminator. Uses the constructor-count map in the environment to decide whether the match is exhaustive: if so, an explicit default is suppressed; if not and the kernel didn't provide one, inserts `| _ => hydra_unreachable`." $
-  lambdas ["env", "cs"] $ lets [
-    "csName">: Core.caseStatementTypeName $ var "cs",
-    "csCases">: Core.caseStatementCases $ var "cs",
-    "csDefault">: Core.caseStatementDefault $ var "cs",
-    "csLocalName">: localTypeName @@ (unwrap _Name @@ var "csName"),
-    "expectedCount">: Maps.lookup (var "csLocalName")
-      (project CE._CoqEnvironment CE._CoqEnvironment_constructorCounts @@ var "env"),
-    "caseCount">: Lists.length $ var "csCases",
-    "baseEqs">: Lists.map
-      (lambda "c" $ lets [
-        "cfn">: Core.fieldName $ var "c",
-        "cft">: Core.fieldTerm $ var "c",
-        "constr">: resolveQualifiedName @@ var "env" @@ (unionConstructorName
-          @@ (unwrap _Name @@ var "csName")
-          @@ (unwrap _Name @@ var "cfn"))] $
-        Logic.ifElse (isUnitLambda @@ var "cft")
-          -- Unit-typed variant: wildcard pattern for unused unit arg.
-          (record C._Equation [
-            C._Equation_pattern>>: list [list [
-              inject C._Pattern C._Pattern_pattern $
-                inject C._Pattern10 C._Pattern10_qualiid $
-                  record C._Pattern10_Qualid [
-                    C._Pattern10_Qualid_qualid>>: coqQualid @@ var "constr",
-                    C._Pattern10_Qualid_patterns>>: list [
-                      record C._Pattern1 [
-                        C._Pattern1_pattern>>:
-                          inject C._Pattern0 C._Pattern0_qualid (coqQualid @@ string "_"),
-                        C._Pattern1_scope>>: (nothing :: TTerm (Maybe C.ScopeKey))]]]]],
-            C._Equation_term>>: encodeTerm @@ var "env" @@ (unitLambdaBody @@ var "cft")])
-          -- Normal variant: bind v_ and apply the case body to it.
-          (record C._Equation [
-            C._Equation_pattern>>: list [list [
-              inject C._Pattern C._Pattern_pattern $
-                inject C._Pattern10 C._Pattern10_qualiid $
-                  record C._Pattern10_Qualid [
-                    C._Pattern10_Qualid_qualid>>: coqQualid @@ var "constr",
-                    C._Pattern10_Qualid_patterns>>: list [
-                      record C._Pattern1 [
-                        C._Pattern1_pattern>>:
-                          inject C._Pattern0 C._Pattern0_qualid (coqQualid @@ string "v_"),
-                        C._Pattern1_scope>>: (nothing :: TTerm (Maybe C.ScopeKey))]]]]],
-            C._Equation_term>>:
-              coqTermApp @@ (encodeTerm @@ var "env" @@ var "cft") @@ list [coqTermQualid @@ string "v_"]]))
-      (var "csCases"),
-    "wildcardEq">: lambda "body" $ record C._Equation [
-      C._Equation_pattern>>: list [list [
-        inject C._Pattern C._Pattern_pattern $
-          inject C._Pattern10 C._Pattern10_qualiid $
-            record C._Pattern10_Qualid [
-              C._Pattern10_Qualid_qualid>>: coqQualid @@ string "_",
-              C._Pattern10_Qualid_patterns>>: list ([] :: [TTerm C.Pattern1])]]],
-      C._Equation_term>>: var "body"],
-    "defaultEqs">: Maybes.maybe
-      -- No explicit default: if the match is non-exhaustive, synthesize one as
-      -- `| _ => hydra_unreachable` (replacing the old addPartialMatchCatchAll pass).
-      -- If the match is exhaustive (or we lack the count), emit no default.
-      (Logic.ifElse
-        (Maybes.maybe (boolean False)
-          (lambda "n" $ Logic.not $ Equality.gte (var "caseCount") (var "n"))
-          (var "expectedCount"))
-        (list [var "wildcardEq" @@ (coqTermQualid @@ string "hydra_unreachable")])
-        (list ([] :: [TTerm C.Equation])))
-      -- Kernel provided an explicit default: if the non-default cases already cover
-      -- every constructor, drop it (replacing the old removeRedundantDefaults pass);
-      -- otherwise keep it.
-      (lambda "defT" $ Logic.ifElse
-        (Maybes.maybe (boolean False)
-          (lambda "n" $ Equality.gte (var "caseCount") (var "n"))
-          (var "expectedCount"))
-        (list ([] :: [TTerm C.Equation]))
-        (list [var "wildcardEq" @@ (encodeTerm @@ var "env" @@ var "defT")]))
-      (var "csDefault"),
-    "allEqs">: Lists.concat2 (var "baseEqs") (var "defaultEqs")] $
-    inject C._Term C._Term_forallOrFun $
-      inject C._ForallOrFun C._ForallOrFun_fun $
-        record C._Fun [
-          C._Fun_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-            inject C._Binder C._Binder_name (coqName @@ string "x_")]),
-          C._Fun_body>>:
-            inject C._Term C._Term_term100 $
-              inject C._Term100 C._Term100_term10 $
-                inject C._Term10 C._Term10_oneTerm $
-                  inject C._OneTerm C._OneTerm_term1 $
-                    inject C._Term1 C._Term1_term0 $
-                      inject C._Term0 C._Term0_match $
-                        record C._Match [
-                          C._Match_caseItems>>: list [
-                            record C._CaseItem [
-                              C._CaseItem_term>>:
-                                inject C._Term100 C._Term100_term10 $
-                                  inject C._Term10 C._Term10_oneTerm $
-                                    inject C._OneTerm C._OneTerm_explicit $
-                                      record C._QualidAnnotated [
-                                        C._QualidAnnotated_qualid>>: coqQualid @@ string "x_",
-                                        C._QualidAnnotated_univAnnot>>: (nothing :: TTerm (Maybe C.UnivAnnot))],
-                              C._CaseItem_as>>: (nothing :: TTerm (Maybe Name)),
-                              C._CaseItem_in>>: (nothing :: TTerm (Maybe C.Pattern))]],
-                          C._Match_return>>: (nothing :: TTerm (Maybe C.Term100)),
-                          C._Match_pipe>>: true,
-                          C._Match_equations>>: var "allEqs"]]
-
--- | Translate a Hydra wrap eliminator (`TermUnwrap`) into a Coq identity lambda.
-encodeWrapElim :: TTermDefinition (Name -> C.Term)
-encodeWrapElim = define "encodeWrapElim" $
-  doc "A Hydra wrap eliminator is just the identity on the wrapped object in Coq" $
-  lambda "_n" $
-    inject C._Term C._Term_forallOrFun $
-      inject C._ForallOrFun C._ForallOrFun_fun $
-        record C._Fun [
-          C._Fun_binders>>: inject C._OpenBinders C._OpenBinders_binders (list [
-            inject C._Binder C._Binder_name (coqName @@ string "w_")]),
-          C._Fun_body>>: coqTermQualid @@ string "w_"]
-
--- | Walk a Hydra term, collecting the leading lambda binders as Coq Binders.
-extractLambdaBinders :: TTermDefinition (CE.CoqEnvironment -> Term -> [C.Binder])
-extractLambdaBinders = define "extractLambdaBinders" $
-  doc "Collect a chain of leading lambdas as Coq binders, converting type annotations as well" $
-  lambdas ["env", "tm"] $ cases _Term (var "tm") (Just $ list ([] :: [TTerm C.Binder])) [
-    _Term_annotated>>: "at" ~>
-      extractLambdaBinders @@ var "env" @@ (Core.annotatedTermBody $ var "at"),
-    _Term_lambda>>: "lam" ~> lets [
-      "param">: Core.lambdaParameter $ var "lam",
-      "mDomain">: Core.lambdaDomain $ var "lam",
-      "binder">: Maybes.maybe
-        (inject C._Binder C._Binder_name (coqName @@ (unwrap _Name @@ var "param")))
-        (lambda "domTy" $ inject C._Binder C._Binder_type $
-          record C._TypeBinders [
-            C._TypeBinders_names>>: list [coqName @@ (unwrap _Name @@ var "param")],
-            C._TypeBinders_type>>: coqTypeTerm @@ (encodeType @@ var "env" @@ var "domTy")])
-        (var "mDomain")] $
-      Lists.cons (var "binder") (extractLambdaBinders @@ var "env" @@ (Core.lambdaBody $ var "lam"))]
-
--- | Test whether a domain type is the unit type (possibly wrapped in annotations).
-isUnitDomain :: TTermDefinition (Maybe Type -> Bool)
-isUnitDomain = define "isUnitDomain" $
-  doc "True if the Maybe Type is the unit type, looking through annotations" $
-  lambda "mty" $ Maybes.maybe (boolean False)
-    (lambda "ty" $ cases _Type (var "ty") (Just (boolean False)) [
-      _Type_unit>>: constant true,
-      _Type_record>>: "fs" ~> Lists.null (var "fs"),
-      _Type_annotated>>: "at" ~>
-        isUnitDomain @@ just (Core.annotatedTypeBody $ var "at")])
-    (var "mty")
-
--- | Test whether a Hydra term is a lambda that ignores its (unit-typed) parameter.
-isUnitLambda :: TTermDefinition (Term -> Bool)
-isUnitLambda = define "isUnitLambda" $
-  doc "Detect a lambda over the unit type whose parameter is not referenced in the body" $
-  lambda "tm" $ cases _Term (var "tm") (Just (boolean False)) [
-    _Term_annotated>>: "at" ~>
-      isUnitLambda @@ (Core.annotatedTermBody $ var "at"),
-    _Term_lambda>>: "lam" ~> lets [
-      "unused">: Logic.not $ termReferencesVar
-        @@ (Core.lambdaParameter $ var "lam")
-        @@ (Core.lambdaBody $ var "lam")] $
-      Logic.and
-        (isUnitDomain @@ (Core.lambdaDomain $ var "lam"))
-        (var "unused")]
-
--- | Given a possibly-qualified name (e.g. "hydra.core.Term"), return its local
--- part sanitized to avoid Coq reserved words. Used as the lookup key for the
--- constructor-count map in encodeUnionElim.
-localTypeName :: TTermDefinition (String -> String)
-localTypeName = define "localTypeName" $
-  doc "Take the last dot-separated segment of a (possibly) qualified Hydra name and sanitize it" $
-  lambda "s" $ lets [
-    "parts">: Strings.splitOn (string ".") (var "s"),
-    "localPart">: Maybes.fromMaybe (var "s") (Lists.maybeLast $ var "parts")] $
-    sanitizeVar @@ var "localPart"
-
--- | Combine a universe of type and term definitions into a single Coq Document.
--- The CoqEnvironment is threaded through every encoder so that match expressions
--- can decide whether to emit a default arm and qualified references can be
--- rewritten to their short forms.
-moduleToCoq :: TTermDefinition (CE.CoqEnvironment -> [(String, Type)] -> [(String, Term)] -> C.Document)
-moduleToCoq = define "moduleToCoq" $
-  doc "Build a Coq Document from lists of type definitions and term definitions" $
-  lambdas ["env", "typeDefs", "termDefs"] $ lets [
-    "typesSentences">: Lists.map (lambda "td" $ encodeTypeDefinitionPair @@ var "env" @@ var "td") (var "typeDefs"),
-    "termsSentences">: Lists.map (lambda "ed" $ encodeTermDefinitionPair @@ var "env" @@ var "ed") (var "termDefs")] $
-    record C._Document [
-      C._Document_sentences>>: Lists.concat $ list [
-        list [standardImports],
-        var "typesSentences",
-        var "termsSentences"]]
-
--- | Rename a small set of hydra.lib.* identifiers whose stripped form would
--- collide with a Coq reserved word (e.g., `lists.at` -> `lists.at_`).
-renameLibKeyword :: TTermDefinition (String -> String)
-renameLibKeyword = define "renameLibKeyword" $
-  doc "Rewrite a stripped hydra.lib.<mod>.<func> name to avoid Coq keyword collisions" $
-  lambda "s" $
-    Logic.ifElse (Equality.equal (var "s") (string "lists.at"))
-      (string "lists.at_") $
-    Logic.ifElse (Equality.equal (var "s") (string "math.mod"))
-      (string "math.mod_")
-      (var "s")
-
--- | Build a Require Import sentence for a list of module names.
-requireImportSentence :: TTermDefinition ([String] -> C.Sentence)
-requireImportSentence = define "requireImportSentence" $
-  doc "Emit a Coq `Require Import m1 m2 ...` sentence with a `Standard library imports` comment" $
-  lambda "mods" $
-    record C._Sentence [
-      C._Sentence_comment>>: just (wrap C._Comment $ string "Standard library imports"),
-      C._Sentence_content>>:
-        inject C._SentenceContent C._SentenceContent_requireImport $
-          record C._RequireImport [
-            C._RequireImport_from>>: (nothing :: TTerm (Maybe C.Qualid)),
-            C._RequireImport_require>>: true,
-            C._RequireImport_qualification>>:
-              just (inject C._ImportQualification C._ImportQualification_import unit),
-            C._RequireImport_modules>>:
-              Lists.map (lambda "m" $ coqQualid @@ var "m") (var "mods")]]
-
--- | Rewrite a (possibly qualified) Hydra name into the form that should appear
--- in emitted Coq source. Replaces the former text post-processor
--- `stripHydraQualifications` in `packages/hydra-coq/.../Hydra/Coq/Generate.hs`.
---
--- * `hydra.lib.<mod>.<func>` -> `<mod>.<func>` (with keyword rewrites).
--- * `Build_hydra.<ns>.<x>`   -> `Build_<sanitizeVar x>`.
--- * `hydra.<ns>.<x>`         -> fully qualified `<ns>.<sanitizeVar x>` when
---   `<x>` is in `ambiguousNames` and `<ns>` is not the current module's
---   namespace, or when `<ns>` matches one of the hardcoded
---   collision-prone modules (e.g. `parsers`); otherwise `<sanitizeVar x>`.
--- * Otherwise the input is returned unchanged, after `sanitizeVar`.
-resolveQualifiedName :: TTermDefinition (CE.CoqEnvironment -> String -> String)
-resolveQualifiedName = define "resolveQualifiedName" $
-  doc "Resolve a (possibly qualified) Hydra identifier to the form that should appear in Coq source" $
-  lambdas ["env", "s"] $ lets [
-    "parts">: Strings.splitOn (string ".") (var "s"),
-    "head1">: Maybes.fromMaybe (var "s") (Lists.maybeHead (var "parts")),
-    "currentNs">: project CE._CoqEnvironment CE._CoqEnvironment_currentNamespace @@ var "env",
-    "ambig">: project CE._CoqEnvironment CE._CoqEnvironment_ambiguousNames @@ var "env"] $
-    -- Coq.<name> : synthetic marker (from `typeToTerm`) for a Coq-builtin
-    -- type constructor referenced in a term position. Emit the tail segment
-    -- raw, bypassing sanitizeVar — otherwise `Coq.list` would collide with a
-    -- user-level lambda parameter named `list` and get escaped to `list_`.
-    Logic.ifElse (Equality.equal (var "head1") (string "Coq"))
-      (Maybes.fromMaybe (var "s") (Lists.maybeLast (var "parts"))) $
-    -- Build_hydra.<ns>.<x> : strip to Build_<sanitized local>.
-    Logic.ifElse (Equality.equal (var "head1") (string "Build_hydra"))
-      (Strings.cat2 (string "Build_") (sanitizeStripped @@ (Maybes.fromMaybe (var "s") (Lists.maybeLast (var "parts"))))) $
-    Logic.ifElse (Equality.equal (var "head1") (string "hydra"))
-      (lets [
-        "rest">: Lists.drop (int32 1) (var "parts"),
-        "head2">: Maybes.fromMaybe (string "") (Lists.maybeHead (var "rest"))] $
-        -- hydra.lib.<mod>.<func> : keep module.function, with keyword rewrites.
-        Logic.ifElse (Equality.equal (var "head2") (string "lib"))
-          (renameLibKeyword @@ (Strings.intercalate (string ".") (Lists.drop (int32 1) (var "rest")))) $
-          -- hydra.<ns>...<x> : compute local name + source namespace.
-          lets [
-            "localRaw">: Maybes.fromMaybe (var "s") (Lists.maybeLast (var "parts")),
-            "localN">: sanitizeStripped @@ var "localRaw",
-            "sourceNs">: Strings.intercalate (string ".") (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts"))),
-            "isCurrent">: Equality.equal (var "sourceNs") (var "currentNs"),
-            -- Ambiguity check is against the raw (unsanitised) local name,
-            -- since the ambiguous-names set in the environment is populated
-            -- from pre-sanitisation Hydra names (`localName td`).
-            "isAmbig">: Sets.member (var "localRaw") (var "ambig"),
-            -- Non-lib modules whose function names may collide with other imports
-            -- (e.g. `parsers.map` vs `maps.map`). Cross-namespace references to
-            -- these are kept in `<mod>.<func>` form.
-            "isCollisionProne">: Logic.and
-              (Equality.equal (Lists.length (var "parts")) (int32 3))
-              (Logic.and
-                (Equality.equal (var "head2") (string "parsers"))
-                (Logic.not (var "isCurrent")))] $
-          Logic.ifElse (Logic.and (var "isAmbig") (Logic.not (var "isCurrent")))
-            (Strings.cat (list [var "sourceNs", string ".", var "localN"])) $
-          Logic.ifElse (var "isCollisionProne")
-            (Strings.cat (list [
-              sanitizeStripped @@ var "head2",
-              string ".",
-              sanitizeStripped @@ var "localRaw"]))
-            (var "localN"))
-      -- Non-hydra identifiers: apply the WIDE `sanitizeVar`, matching the
-      -- pre-refactor DSL encoder's behaviour for local (unqualified) term
-      -- variable references (lambda parameters like `at`, `end` etc., which
-      -- must become `at_`, `end_` to avoid Coq keyword conflicts).
-      (sanitizeVar @@ var "s")
-
--- | The fixed set of imports used at the head of every generated .v file.
-standardImports :: TTermDefinition C.Sentence
-standardImports = define "standardImports" $
-  doc "The Coq stdlib modules plus the hand-written hydra.lib.base axioms" $
-  requireImportSentence @@ list [
-    string "Stdlib.Strings.String",
-    string "Stdlib.Lists.List",
-    string "Stdlib.ZArith.ZArith",
-    string "Stdlib.QArith.QArith",
-    string "hydra.lib.base"]
-
--- | Strip a chain of leading lambdas from a term, returning the inner body.
-stripLambdas :: TTermDefinition (Term -> Term)
-stripLambdas = define "stripLambdas" $
-  doc "Peel off leading lambdas and annotations, returning the first non-lambda body" $
-  lambda "tm" $ cases _Term (var "tm") (Just (var "tm")) [
-    _Term_annotated>>: "at" ~>
-      stripLambdas @@ (Core.annotatedTermBody $ var "at"),
-    _Term_lambda>>: "lam" ~>
-      stripLambdas @@ (Core.lambdaBody $ var "lam")]
-
--- | Test whether a variable name appears free within a term.
-termReferencesVar :: TTermDefinition (Name -> Term -> Bool)
-termReferencesVar = define "termReferencesVar" $
-  doc "Syntactic free-variable check over the shapes encodeTerm walks through" $
-  lambdas ["name", "tm"] $ cases _Term (var "tm") (Just (boolean False)) [
-    _Term_variable>>: "v" ~> Equality.equal (var "v") (var "name"),
-    _Term_annotated>>: "at" ~>
-      termReferencesVar @@ var "name" @@ (Core.annotatedTermBody $ var "at"),
-    _Term_application>>: "app" ~> Logic.or
-      (termReferencesVar @@ var "name" @@ (Core.applicationFunction $ var "app"))
-      (termReferencesVar @@ var "name" @@ (Core.applicationArgument $ var "app")),
-    _Term_lambda>>: "lam" ~>
-      termReferencesVar @@ var "name" @@ (Core.lambdaBody $ var "lam"),
-    _Term_cases>>: "cs" ~> Logic.or
-      (listAny
-        (lambda "f" $ termReferencesVar @@ var "name" @@ (Core.fieldTerm $ var "f"))
-        (Core.caseStatementCases $ var "cs"))
-      (Maybes.maybe (boolean False)
-        (lambda "d" $ termReferencesVar @@ var "name" @@ var "d")
-        (Core.caseStatementDefault $ var "cs")),
-    _Term_let>>: "lt" ~> Logic.or
-      (listAny
-        (lambda "b" $ termReferencesVar @@ var "name" @@ (Core.bindingTerm $ var "b"))
-        (Core.letBindings $ var "lt"))
-      (termReferencesVar @@ var "name" @@ (Core.letBody $ var "lt")),
-    _Term_list>>: "xs" ~>
-      listAny (lambda "el" $ termReferencesVar @@ var "name" @@ var "el") (var "xs"),
-    _Term_maybe>>: "mt" ~> Maybes.maybe (boolean False)
-      (lambda "el" $ termReferencesVar @@ var "name" @@ var "el")
-      (var "mt"),
-    _Term_pair>>: "p" ~> Logic.or
-      (termReferencesVar @@ var "name" @@ Pairs.first (var "p"))
-      (termReferencesVar @@ var "name" @@ Pairs.second (var "p")),
-    _Term_record>>: "r" ~>
-      listAny
-        (lambda "f" $ termReferencesVar @@ var "name" @@ (Core.fieldTerm $ var "f"))
-        (Core.recordFields $ var "r"),
-    _Term_inject>>: "inj" ~>
-      termReferencesVar @@ var "name" @@
-        (Core.fieldTerm $ Core.injectionField $ var "inj"),
-    _Term_either>>: "e" ~> Eithers.either_
-      (lambda "l" $ termReferencesVar @@ var "name" @@ var "l")
-      (lambda "r" $ termReferencesVar @@ var "name" @@ var "r")
-      (var "e"),
-    _Term_typeApplication>>: "ta" ~>
-      termReferencesVar @@ var "name" @@ (Core.typeApplicationTermBody $ var "ta"),
-    _Term_typeLambda>>: "tl" ~>
-      termReferencesVar @@ var "name" @@ (Core.typeLambdaBody $ var "tl"),
-    _Term_wrap>>: "wt" ~>
-      termReferencesVar @@ var "name" @@ (Core.wrappedTermBody $ var "wt")]
-
--- | Build a union-constructor name by combining a (possibly qualified) type name and a field.
-unionConstructorName :: TTermDefinition (String -> String -> String)
-unionConstructorName = define "unionConstructorName" $
-  doc "Combine a type name and field name into a constructor identifier, preserving the namespace prefix" $
-  lambdas ["typeName", "fieldName"] $ lets [
-    "parts">: Strings.splitOn (string ".") (var "typeName"),
-    "localPart">: Maybes.fromMaybe (var "typeName") (Lists.maybeLast $ var "parts"),
-    "prefixParts">: Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit $ var "parts"),
-    "prefix">: Logic.ifElse (Lists.null $ var "prefixParts")
-      (string "")
-      (Strings.cat2 (Strings.intercalate (string ".") (var "prefixParts")) (string ".")),
-    "sanitized">: sanitizeVar @@ var "localPart"] $
-    Strings.cat (list [
-      var "prefix",
-      var "sanitized",
-      string "_",
-      Formatting.capitalize @@ var "fieldName"])
-
--- | Extract the body of a unit-consuming lambda, skipping lambda/annotation wrappers.
-unitLambdaBody :: TTermDefinition (Term -> Term)
-unitLambdaBody = define "unitLambdaBody" $
-  doc "Peel the outer unit lambda off a term, returning the body" $
-  lambda "tm" $ cases _Term (var "tm") (Just (var "tm")) [
-    _Term_annotated>>: "at" ~>
-      unitLambdaBody @@ (Core.annotatedTermBody $ var "at"),
-    _Term_lambda>>: "lam" ~> (Core.lambdaBody $ var "lam")]
diff --git a/src/main/haskell/Hydra/Sources/Coq/Environment.hs b/src/main/haskell/Hydra/Sources/Coq/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Environment.hs
+++ /dev/null
@@ -1,60 +0,0 @@
--- | Environment types for Coq code generation.
--- Threaded through the term and type encoders so that they have access to
--- cross-module state (constructor counts, ambiguous-name sets, etc.) without
--- passing each piece as a separate argument.
-
-module Hydra.Sources.Coq.Environment where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                           ((>:))
-import qualified Hydra.Dsl.Types                           as T
-import qualified Hydra.Sources.Kernel.Types.Core           as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.coq.environment"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-environment :: String -> Type
-environment = typeref ns
-
-core :: String -> Type
-core = typeref Core.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Environment types for Coq code generation"}
-  where
-    definitions = [
-      coqEnvironment]
-
--- | Cross-module state threaded through the Coq encoder.
--- Populated by the host-side pipeline (heads/haskell/.../ExtGeneration.hs) before
--- each module is encoded; consulted by encodeUnionElim, encodeTerm, etc. to
--- make output-level decisions (e.g., whether to emit a catch-all match arm or
--- whether a reference needs to stay fully qualified).
-coqEnvironment :: Binding
-coqEnvironment = def "CoqEnvironment" $
-  doc "Cross-module state threaded through the Coq encoder" $
-  T.record [
-    "currentNamespace">:
-      doc "The Hydra namespace of the module currently being encoded (e.g. \"hydra.core\"). Used by the name resolver to decide whether a cross-namespace reference needs to stay qualified." $
-      T.string,
-    "constructorCounts">:
-      doc "Number of constructors in each union type, keyed by local type name (e.g. \"Term\" -> 14). Used to decide whether a match is exhaustive." $
-      T.map T.string T.int32,
-    "ambiguousNames">:
-      doc "Local names (without namespace prefix) that are defined in more than one module. References to these must be kept fully qualified." $
-      T.set T.string,
-    "sanitizedAccessors">:
-      doc "Accessor names for record fields that were sanitized to unit due to Coq's strict positivity requirement. Applications of these accessors are replaced with hydra_unreachable at emission time." $
-      T.set T.string]
diff --git a/src/main/haskell/Hydra/Sources/Coq/Generate.hs b/src/main/haskell/Hydra/Sources/Coq/Generate.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Generate.hs
+++ /dev/null
@@ -1,1149 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Coq code generation driver: per-module pipeline, sentence producers,
--- and cross-module pre-passes. This is the DSL port of the previously
--- hand-written `Hydra.Coq.Generate` in `heads/haskell/`. Anything that
--- needs IO (writing files, creating directories) stays in `heads/`.
-
-module Hydra.Sources.Coq.Generate where
-
-import Hydra.Kernel
-import Hydra.Dsl.AsTerm (asTerm)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Coq.Syntax                      as CSyntax
-import qualified Hydra.Dsl.Packaging                       as Packaging
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Coq.Syntax                  as CoqSyntax
-import qualified Hydra.Sources.Coq.Coder                   as CoqCoderSource
-import qualified Hydra.Sources.Coq.Environment             as CoqEnvironmentSource
-import qualified Hydra.Sources.Coq.Language                as CoqLanguage
-import qualified Hydra.Sources.Coq.Serde                   as CoqSerdeSource
-import qualified Hydra.Sources.Coq.Utils                   as CoqUtils
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-
-import Hydra.Ast
-import qualified Hydra.Coq.Syntax as C
-import qualified Hydra.Coq.Environment as CE
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.coq.generate"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [CoqUtils.ns, CoqCoderSource.ns, CoqSerdeSource.ns, Formatting.ns, Serialization.ns,
-     CoqLanguage.ns, CoqEnvironmentSource.ns, CoqSyntax.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Coq code generation driver — pre-passes, sentence producers, and per-module pipeline"}
-  where
-    definitions = [
-      toDefinition buildAxiomOnlyContent,
-      toDefinition buildFullModule,
-      toDefinition dependencyImports,
-      toDefinition encodeMutualGroupText,
-      toDefinition encodeTermGroupSingleton,
-      toDefinition generateArgumentsDecls,
-      toDefinition generateTypeGroup,
-      toDefinition generateTypeSentence,
-      toDefinition globalAmbiguousNames,
-      toDefinition globalConstructorCounts,
-      toDefinition globalFieldMapping,
-      toDefinition globalSanitizedAccessors,
-      toDefinition implicitArgsLine,
-      toDefinition makeAccessorDefs,
-      toDefinition makeConstructor,
-      toDefinition makeInductiveBody,
-      toDefinition makeOneAccessor,
-      toDefinition makeProdType,
-      toDefinition makeProdVal,
-      toDefinition makeProjectionExprs,
-      toDefinition makeReturnType,
-      toDefinition makeTypeBinder,
-      toDefinition mkTypeBinders,
-      toDefinition moduleToCoq,
-      toDefinition namespaceToPath,
-      toDefinition renderRequireImports,
-      toDefinition renderSentences,
-      toDefinition replaceBundle]
-
--- | Build the global (qualifiedTypeName, rawFieldName) -> prefixedFieldName
--- map across all modules in the kernel universe.
-globalFieldMapping :: TTermDefinition ([Module] -> M.Map (String, String) String)
-globalFieldMapping = define "globalFieldMapping" $
-  doc "Delegate to CoqUtils.buildFieldMapping across all supplied modules" $
-  lambda "modules" $ CoqUtils.buildFieldMapping @@ var "modules"
-
--- | Build the global map from each union-type name to its constructor count.
--- Used by the encoder's match-exhaustiveness decision.
-globalConstructorCounts :: TTermDefinition ([Module] -> M.Map String I.Int32)
-globalConstructorCounts = define "globalConstructorCounts" $
-  doc "Collect all type definitions from every module and run buildConstructorCounts over them" $
-  lambda "modules" $ lets [
-    "allTypeDefs">: Lists.concat $ Lists.map
-      ("m" ~> Maybes.cat $ Lists.map
-        ("def_" ~> cases _Definition (var "def_") (Just (Phantoms.nothing :: TTerm (Maybe (String, Type)))) [
-          _Definition_type>>: "td" ~> Phantoms.just $ pair
-            (CoqUtils.localName @@ (unwrap _Name @@ (Packaging.typeDefinitionName $ var "td")))
-            (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td")])
-        (Packaging.moduleDefinitions $ var "m"))
-      (var "modules")] $
-    CoqUtils.buildConstructorCounts @@ var "allTypeDefs"
-
--- | Build the global set of sanitized field accessor names across every
--- module. Accessors listed here came from record fields that were replaced
--- with `unit` to satisfy Coq's strict positivity constraint. The encoder
--- replaces their call sites with `hydra_unreachable`.
-globalSanitizedAccessors :: TTermDefinition ([Module] -> S.Set String)
-globalSanitizedAccessors = define "globalSanitizedAccessors" $
-  doc "Collect sanitized accessor names by SCC-sorting every module's type defs and folding collectSanitizedAccessors" $
-  lambda "modules" $ lets [
-    "allTypeGroups">: Lists.concat $ Lists.map
-      ("m" ~> lets [
-        "typeDefs">: Maybes.cat $ Lists.map
-          ("def_" ~> cases _Definition (var "def_") (Just (Phantoms.nothing :: TTerm (Maybe (String, Type)))) [
-            _Definition_type>>: "td" ~> Phantoms.just $ pair
-              (CoqUtils.localName @@ (unwrap _Name @@ (Packaging.typeDefinitionName $ var "td")))
-              (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td")])
-          (Packaging.moduleDefinitions $ var "m")] $
-        CoqUtils.sortTypeDefsSCC @@ var "typeDefs")
-      (var "modules")] $
-    CoqUtils.collectSanitizedAccessors @@ var "allTypeGroups"
-
--- | Build the global set of local names that appear in more than one
--- module. References to such names must remain fully qualified so that
--- Coq's module system resolves the right definition.
-globalAmbiguousNames :: TTermDefinition ([Module] -> S.Set String)
-globalAmbiguousNames = define "globalAmbiguousNames" $
-  doc "Collect local names that occur in more than one module's type or term definitions" $
-  lambda "modules" $ lets [
-    "allNames">: Lists.concat $ Lists.map
-      ("m" ~> lets [
-        "nsStr">: Packaging.unNamespace (Packaging.moduleNamespace $ var "m"),
-        "fromDef">: lambda "def_" $ cases _Definition (var "def_")
-          (Just (Phantoms.nothing :: TTerm (Maybe (String, String)))) [
-            _Definition_type>>: "td" ~> Phantoms.just $ pair
-              (CoqUtils.localName @@ (unwrap _Name @@ (Packaging.typeDefinitionName $ var "td")))
-              (var "nsStr"),
-            _Definition_term>>: "td" ~> Phantoms.just $ pair
-              (CoqUtils.localName @@ (unwrap _Name @@ (Packaging.termDefinitionName $ var "td")))
-              (var "nsStr")]] $
-        Maybes.cat $ Lists.map (var "fromDef") (Packaging.moduleDefinitions $ var "m"))
-      (var "modules"),
-    -- Group by local name, collecting the set of namespaces each name appears in.
-    "nameToNs">: Lists.foldl
-      ("acc" ~> "np" ~>
-        "n" <~ Pairs.first (var "np") $
-        "nsVal" <~ Pairs.second (var "np") $
-        "existing" <~ Maybes.fromMaybe
-          (Sets.empty :: TTerm (S.Set String))
-          (Maps.lookup (var "n") (var "acc")) $
-        Maps.insert (var "n") (Sets.insert (var "nsVal") (var "existing")) (var "acc"))
-      (Maps.empty :: TTerm (M.Map String (S.Set String)))
-      (var "allNames")] $
-    -- A name is ambiguous iff it appears in >= 2 distinct namespaces.
-    Sets.fromList $ Maybes.cat $ Lists.map
-      ("entry" ~> Logic.ifElse
-        (Equality.gte (Lists.length $ Sets.toList $ Pairs.second $ var "entry") (int32 2))
-        (Phantoms.just $ Pairs.first $ var "entry")
-        (Phantoms.nothing :: TTerm (Maybe String)))
-      (Maps.toList $ var "nameToNs")
-
--- | Produce the list of Coq `Require Import` sentences for a list of
--- dependency namespace strings. Returns an empty list when the input is
--- empty, otherwise a single `Sentence` containing all deps under one
--- `RequireImport` node with the comment "Module dependencies".
-dependencyImports :: TTermDefinition ([String] -> [C.Sentence])
-dependencyImports = define "dependencyImports" $
-  doc "Emit a Require Import sentence for the given dependency namespaces; empty list yields no sentence" $
-  lambda "deps" $
-    Logic.ifElse (Lists.null $ var "deps")
-      (list ([] :: [TTerm C.Sentence]))
-      (list [CSyntax.sentence
-        (Phantoms.just $ CSyntax.comment (string "Module dependencies"))
-        (CSyntax.sentenceContentRequireImport $ CSyntax.requireImport
-          (Phantoms.nothing :: TTerm (Maybe C.Qualid))
-          (boolean True)
-          (Phantoms.just CSyntax.importQualificationImport)
-          (Lists.map (lambda "d" $ CoqCoderSource.coqQualid @@ var "d") (var "deps")))])
-
--- | Emit the Arguments declarations that follow the type definitions.
--- Only parameterized types produce output; for each one we mark every
--- type parameter implicit on `Build_T`, on each field accessor, and on
--- each union constructor. Returns the Coq source fragment (or empty
--- string if there are no parameterized types), leading with a newline.
-generateArgumentsDecls :: TTermDefinition ([(String, Type)] -> String)
-generateArgumentsDecls = define "generateArgumentsDecls" $
-  doc "Produce Arguments {p} declarations for every parameterized type's constructor and field accessors" $
-  "typeDefs" ~>
-  -- Build the implicit-all text "{p1} {p2} ..." for a list of parameter names.
-  "implicitAll" <~ ("params" ~>
-    Strings.intercalate (string " ") $ Lists.map
-      ("p" ~> Strings.cat (list [string "{", var "p", string "}"]))
-      (var "params")) $
-  -- Emit all lines contributed by a single (name, params, bodyTy) triple.
-  "linesFor" <~ ("triple" ~>
-    "name" <~ (Pairs.first $ var "triple") $
-    "params" <~ (Pairs.first $ Pairs.second $ var "triple") $
-    "bodyTy" <~ (Pairs.second $ Pairs.second $ var "triple") $
-    "impAll" <~ (var "implicitAll" @@ var "params") $
-    cases _Type (var "bodyTy") (Just $ list ([] :: [TTerm String])) [
-      _Type_union>>: "fields" ~> Lists.map
-        ("ft" ~> Strings.cat (list [
-          string "Arguments ",
-          var "name",
-          string "_",
-          Formatting.capitalize @@ (unwrap _Name @@ (Core.fieldTypeName $ var "ft")),
-          string " ",
-          var "impAll",
-          string "."]))
-        (var "fields"),
-      _Type_record>>: "fields" ~>
-        Logic.ifElse (Lists.null $ var "fields")
-          (list ([] :: [TTerm String]))
-          (lets [
-            "constrLine">: Strings.cat (list [
-              string "Arguments Build_",
-              var "name",
-              string " ",
-              var "impAll",
-              string "."]),
-            "fieldLines">: Lists.map
-              ("ft" ~> Strings.cat (list [
-                string "Arguments ",
-                Formatting.decapitalize @@ var "name",
-                string "_",
-                CoqUtils.sanitize @@ (CoqUtils.localName @@ (unwrap _Name @@ (Core.fieldTypeName $ var "ft"))),
-                string " ",
-                var "impAll",
-                string "."]))
-              (var "fields")] $
-            Lists.cons (var "constrLine") (var "fieldLines"))]) $
-  -- For each (name, ty), peel forall binders and only emit lines when there
-  -- are actual type parameters to make implicit.
-  "triples" <~ (Maybes.cat $ Lists.map
-    ("nt" ~>
-      "name" <~ (Pairs.first $ var "nt") $
-      "ty" <~ (Pairs.second $ var "nt") $
-      "ep" <~ (CoqUtils.extractTypeParams @@ var "ty") $
-      "params" <~ (Pairs.first $ var "ep") $
-      "bodyTy" <~ (Pairs.second $ var "ep") $
-      Logic.ifElse (Lists.null $ var "params")
-        (Phantoms.nothing :: TTerm (Maybe (String, ([String], Type))))
-        (Phantoms.just $ pair (var "name") (pair (var "params") (var "bodyTy"))))
-    (var "typeDefs")) $
-  "allLines" <~ (Lists.concat $ Lists.map (var "linesFor") (var "triples")) $
-  Logic.ifElse (Lists.null $ var "allLines")
-    (string "")
-    (Strings.cat (list [
-      string "\n",
-      Strings.intercalate (string "\n") (var "allLines"),
-      string "\n"]))
-
--- | Build the return-type Coq term for a type definition with the given
--- name and parameter-name list. Zero-param: just a qualified reference;
--- otherwise apply the type to each parameter name.
-makeReturnType :: TTermDefinition (String -> [String] -> C.Term)
-makeReturnType = define "makeReturnType" $
-  doc "Return-type Coq term: `TypeName` or `TypeName p1 p2 ...`" $
-  lambdas ["typeName", "params"] $
-    Logic.ifElse (Lists.null $ var "params")
-      (CoqCoderSource.coqTermQualid @@ var "typeName")
-      (CoqCoderSource.coqTermApp
-        @@ (CoqCoderSource.coqTermQualid @@ var "typeName")
-        @@ (Lists.map (lambda "p" $ CoqCoderSource.coqTermQualid @@ var "p") (var "params")))
-
--- | Build one Coq constructor for a union field: a curried arrow of its
--- field types (just the return type if the field carries `unit`).
-makeConstructor :: TTermDefinition (CE.CoqEnvironment -> String -> [String] -> FieldType -> C.Constructor)
-makeConstructor = define "makeConstructor" $
-  doc "Build a Coq Constructor from a union field (prepended with the type name and capitalized field name)" $
-  lambdas ["env", "typeName", "params", "ft"] $
-  "fn" <~ (unwrap _Name @@ (Core.fieldTypeName $ var "ft")) $
-  "constrName" <~ Strings.cat (list [var "typeName", string "_", Formatting.capitalize @@ var "fn"]) $
-  "fieldTy" <~ (Core.fieldTypeType $ var "ft") $
-  "argType" <~ (CoqCoderSource.encodeType @@ var "env" @@ var "fieldTy") $
-  "returnType" <~ (makeReturnType @@ var "typeName" @@ var "params") $
-  CSyntax.constructor
-    (CoqCoderSource.coqIdent @@ var "constrName")
-    (list ([] :: [TTerm C.Binder]))
-    (Phantoms.just $ CSyntax.type_ $ CoqCoderSource.coqArrow @@ var "argType" @@ var "returnType")
-
--- | Build one field-accessor Definition sentence for a field at the given
--- index of a record inductive body. The accessor pattern-matches on the
--- `Build_T` constructor and returns the indexed projection variable.
-makeOneAccessor :: TTermDefinition (String -> C.Pattern10_Qualid -> [String] -> I.Int32 -> FieldType -> C.Sentence)
-makeOneAccessor = define "makeOneAccessor" $
-  doc "Emit a Definition for a record field accessor, keyed by the Build_T pattern" $
-  lambdas ["typeName", "constrPat", "fieldVars", "idx", "ft"] $
-  "fn" <~ (CoqUtils.sanitize @@ (CoqUtils.localName @@ (unwrap _Name @@ (Core.fieldTypeName $ var "ft")))) $
-  "prefixedFn" <~ Strings.cat (list [
-    Formatting.decapitalize @@ var "typeName",
-    string "_",
-    var "fn"]) $
-  "returnExpr" <~ (CoqCoderSource.coqTermQualid @@
-    (Maybes.fromMaybe (string "") (Maps.lookup (var "idx")
-      (Maps.fromList $ Lists.zip
-        (Math.range (int32 0) (Math.sub (Lists.length $ var "fieldVars") (int32 1)))
-        (var "fieldVars"))))) $
-  "matchExpr" <~ (inject C._Term C._Term_term100 $
-    CSyntax.term100Term10 $
-      CSyntax.term10OneTerm $
-        CSyntax.oneTermTerm1 $
-          CSyntax.term1Term0 $
-            CSyntax.term0Match $ CSyntax.match
-              (list [CSyntax.caseItem
-                (CSyntax.term100Term10 $ CSyntax.term10OneTerm $
-                  CSyntax.oneTermExplicit $ CSyntax.qualidAnnotated
-                    (CoqCoderSource.coqQualid @@ string "r_")
-                    (Phantoms.nothing :: TTerm (Maybe C.UnivAnnot)))
-                (Phantoms.nothing :: TTerm (Maybe C.Name))
-                (Phantoms.nothing :: TTerm (Maybe C.Pattern))])
-              (Phantoms.nothing :: TTerm (Maybe C.Term100))
-              (boolean False)
-              (list [CSyntax.equation
-                (list [list [inject C._Pattern C._Pattern_pattern (CSyntax.pattern10Qualiid $ var "constrPat")]])
-                (var "returnExpr")])) $
-  CSyntax.sentence
-    (Phantoms.nothing :: TTerm (Maybe C.Comment))
-    (CSyntax.sentenceContentDefinition $ CSyntax.definition
-      (Phantoms.nothing :: TTerm (Maybe C.Locality))
-      (CoqCoderSource.coqIdent @@ var "prefixedFn")
-      (list [CSyntax.binderType $ CSyntax.typeBinders
-        (list [CoqCoderSource.coqName @@ string "r_"])
-        (CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ var "typeName")])
-      (Phantoms.nothing :: TTerm (Maybe C.Type))
-      (var "matchExpr"))
-
--- | Emit field-accessor Definitions for every field of a record type.
--- Non-record types produce an empty list. Used inside mutual inductive
--- groups where records can't use `Record` syntax, so explicit accessors
--- are generated as separate Definitions.
-makeAccessorDefs :: TTermDefinition ((String, Type) -> [C.Sentence])
-makeAccessorDefs = define "makeAccessorDefs" $
-  doc "Build one Definition per record field, pattern-matching on Build_T" $
-  lambda "nt" $
-  "name" <~ (Pairs.first $ var "nt") $
-  "ty" <~ (Pairs.second $ var "nt") $
-  "extracted" <~ (CoqUtils.extractTypeParams @@ var "ty") $
-  "bodyTy" <~ (Pairs.second $ var "extracted") $
-  cases _Type (var "bodyTy") (Just $ list ([] :: [TTerm C.Sentence])) [
-    _Type_record>>: "fields" ~>
-      Logic.ifElse (Lists.null $ var "fields")
-        (list ([] :: [TTerm C.Sentence]))
-        (lets [
-          "nFields">: Lists.length $ var "fields",
-          "fieldVars">: Lists.map
-            (lambda "i" $ Strings.cat (list [string "f", Literals.showInt32 $ var "i"]))
-            (Math.range (int32 0) (Math.sub (var "nFields") (int32 1))),
-          "constrPat">: CSyntax.pattern10_Qualid
-            (CoqCoderSource.coqQualid @@ Strings.cat (list [string "Build_", var "name"]))
-            (Lists.map
-              (lambda "v" $ CSyntax.pattern1
-                (CSyntax.pattern0Qualid $ CoqCoderSource.coqQualid @@ var "v")
-                (Phantoms.nothing :: TTerm (Maybe C.ScopeKey)))
-              (var "fieldVars")),
-          "indexed">: Lists.zip
-            (Math.range (int32 0) (Math.sub (var "nFields") (int32 1)))
-            (var "fields")] $
-          Lists.map (lambda "ift" $ makeOneAccessor
-            @@ var "name"
-            @@ var "constrPat"
-            @@ var "fieldVars"
-            @@ (Pairs.first $ var "ift")
-            @@ (Pairs.second $ var "ift"))
-            (var "indexed"))]
-
--- | Build an Inductive body for a type in a mutual group: either a
--- sum-type (`TypeUnion`) with one Coq Constructor per field, or a product
--- (`TypeRecord`) with a single `Build_T` constructor whose arrow chain
--- threads the field types to the return type.
-makeInductiveBody :: TTermDefinition (CE.CoqEnvironment -> String -> Type -> [C.InductiveBody])
-makeInductiveBody = define "makeInductiveBody" $
-  doc "Build an Inductive body for a union or record type in a mutual group" $
-  lambdas ["env", "name", "ty"] $
-  "extracted" <~ (CoqUtils.extractTypeParams @@ var "ty") $
-  "params" <~ (Pairs.first $ var "extracted") $
-  "bodyTy" <~ (Pairs.second $ var "extracted") $
-  "paramBinders" <~ Lists.map
-    ("p" ~> CSyntax.binderType $ CSyntax.typeBinders
-      (list [CoqCoderSource.coqName @@ var "p"])
-      (CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type"))
-    (var "params") $
-  cases _Type (var "bodyTy") (Just $ list ([] :: [TTerm C.InductiveBody])) [
-    _Type_union>>: "fields" ~>
-      list [CSyntax.inductiveBody
-        (CoqCoderSource.coqIdent @@ var "name")
-        (var "paramBinders")
-        (Phantoms.just $ CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type")
-        (Lists.map
-          (lambda "ft" $ makeConstructor @@ var "env" @@ var "name" @@ var "params" @@ var "ft")
-          (var "fields"))],
-    _Type_record>>: "fields" ~>
-      Logic.ifElse (Lists.null $ var "fields")
-        (list [CSyntax.inductiveBody
-          (CoqCoderSource.coqIdent @@ var "name")
-          (var "paramBinders")
-          (Phantoms.just $ CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type")
-          (list [CSyntax.constructor
-            (CoqCoderSource.coqIdent @@ Strings.cat (list [string "Build_", var "name"]))
-            (list ([] :: [TTerm C.Binder]))
-            (Phantoms.just $ CSyntax.type_ $ makeReturnType @@ var "name" @@ var "params")])])
-        -- Non-empty record: Build_T with an arrow-chain of field types.
-        (lets [
-          "constrType">: Lists.foldr
-            ("ft" ~> "acc" ~>
-              CoqCoderSource.coqArrow
-                @@ (CoqCoderSource.encodeType @@ var "env" @@ (Core.fieldTypeType $ var "ft"))
-                @@ var "acc")
-            (makeReturnType @@ var "name" @@ var "params")
-            (var "fields")] $
-          list [CSyntax.inductiveBody
-            (CoqCoderSource.coqIdent @@ var "name")
-            (var "paramBinders")
-            (Phantoms.just $ CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type")
-            (list [CSyntax.constructor
-              (CoqCoderSource.coqIdent @@ Strings.cat (list [string "Build_", var "name"]))
-              (list ([] :: [TTerm C.Binder]))
-              (Phantoms.just $ CSyntax.type_ $ var "constrType")])])]
-
--- | Emit sentences for a single (non-mutual) type definition. Records
--- become Coq `Record`s with prefixed field names; unions become `Inductive`s;
--- other types become `Definition` aliases. Returns a list of sentences
--- so that future extensions can emit multiple related sentences at once.
-generateTypeSentence :: TTermDefinition (CE.CoqEnvironment -> String -> Type -> [C.Sentence])
-generateTypeSentence = define "generateTypeSentence" $
-  doc "Generate the Coq sentence(s) for a non-cyclic type definition" $
-  lambdas ["env", "name", "ty"] $
-  "extracted" <~ (CoqUtils.extractTypeParams @@ var "ty") $
-  "params" <~ (Pairs.first $ var "extracted") $
-  "bodyTy" <~ (Pairs.second $ var "extracted") $
-  "paramBinders" <~ Lists.map
-    ("p" ~> CSyntax.binderType $ CSyntax.typeBinders
-      (list [CoqCoderSource.coqName @@ var "p"])
-      (CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type"))
-    (var "params") $
-  "mkDef" <~ ("n" ~> "binders" ~> "body" ~>
-    CSyntax.sentence
-      (Phantoms.nothing :: TTerm (Maybe C.Comment))
-      (CSyntax.sentenceContentDefinition $ CSyntax.definition
-        (Phantoms.nothing :: TTerm (Maybe C.Locality))
-        (CoqCoderSource.coqIdent @@ var "n")
-        (var "binders")
-        (Phantoms.just $ CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type")
-        (var "body"))) $
-  cases _Type (var "bodyTy") (Just $
-    list [var "mkDef" @@ var "name" @@ var "paramBinders"
-            @@ (CoqCoderSource.encodeType @@ var "env" @@ var "bodyTy")]) [
-    _Type_union>>: "fields" ~> lets [
-        "body">: CSyntax.inductiveBody
-          (CoqCoderSource.coqIdent @@ var "name")
-          (var "paramBinders")
-          (Phantoms.just $ CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type")
-          (Lists.map
-            (lambda "ft" $ makeConstructor @@ var "env" @@ var "name" @@ var "params" @@ var "ft")
-            (var "fields")),
-        "indDef">: CSyntax.inductiveDefinition
-          (Phantoms.nothing :: TTerm (Maybe C.Locality))
-          (boolean False)
-          (list [var "body"])] $
-        list [CSyntax.sentence
-          (Phantoms.nothing :: TTerm (Maybe C.Comment))
-          (CSyntax.sentenceContentInductive $ var "indDef")],
-    _Type_record>>: "fields" ~>
-      Logic.ifElse (Lists.null $ var "fields")
-        (list [var "mkDef" @@ var "name" @@ var "paramBinders"
-                @@ (CoqCoderSource.coqTermQualid @@ string "unit")])
-        (list [CSyntax.sentence
-          (Phantoms.nothing :: TTerm (Maybe C.Comment))
-          (CSyntax.sentenceContentRecord $ CSyntax.recordDefinition
-            (Phantoms.nothing :: TTerm (Maybe C.Locality))
-            (CoqCoderSource.coqIdent @@ var "name")
-            (var "paramBinders")
-            (Phantoms.just CSyntax.sortType)
-            (CSyntax.recordBody
-              (Phantoms.just $ CoqCoderSource.coqIdent @@ Strings.cat (list [string "Build_", var "name"]))
-              (Lists.map
-                (lambda "ft" $ lets [
-                  "fn">: CoqUtils.sanitize @@ (CoqUtils.localName @@ (unwrap _Name @@ (Core.fieldTypeName $ var "ft"))),
-                  "prefixedFn">: Strings.cat (list [
-                    Formatting.decapitalize @@ var "name",
-                    string "_",
-                    var "fn"]),
-                  "ftCoq">: CoqCoderSource.encodeType @@ var "env" @@ (Core.fieldTypeType $ var "ft")] $
-                  CSyntax.recordField
-                    (CoqCoderSource.coqIdent @@ var "prefixedFn")
-                    (CSyntax.type_ $ var "ftCoq"))
-                (var "fields"))))])]
-
--- | Emit sentences for an SCC group of type definitions. Non-cyclic
--- singletons delegate to `generateTypeSentence`. Cyclic groups produce a
--- single `Inductive ... with ...` block plus accessor Definitions for any
--- record members; positivity-violating fields are replaced with `unit`.
-generateTypeGroup :: TTermDefinition (CE.CoqEnvironment -> (Bool, [(String, Type)]) -> [C.Sentence])
-generateTypeGroup = define "generateTypeGroup" $
-  doc "Emit Coq sentences for a type-definition SCC group, handling mutual recursion and positivity" $
-  lambdas ["env", "group"] $
-  "cyclic" <~ (Pairs.first $ var "group") $
-  "defs" <~ (Pairs.second $ var "group") $
-  Logic.ifElse
-    (Logic.and (Logic.not $ var "cyclic") (Equality.equal (Lists.length $ var "defs") (int32 1)))
-    -- Non-cyclic singleton: delegate.
-    (Maybes.fromMaybe (list ([] :: [TTerm C.Sentence])) (Maybes.map
-      (lambda "d" $
-        generateTypeSentence @@ var "env" @@ (Pairs.first $ var "d") @@ (Pairs.second $ var "d"))
-      (Lists.maybeHead $ var "defs")))
-    -- Mutual group (possibly with positivity sanitization).
-    (lets [
-      "groupNames">: Sets.fromList $ Lists.map (lambda "d" $ Pairs.first $ var "d") (var "defs"),
-      "hasPositivity">: CoqUtils.hasPositivityIssue @@ var "groupNames" @@ var "defs",
-      "sanitizedGroup">: Logic.ifElse (var "hasPositivity")
-        (Lists.map
-          (lambda "d" $ pair
-            (Pairs.first $ var "d")
-            (CoqUtils.sanitizePositivity @@ var "groupNames" @@ (Pairs.second $ var "d")))
-          (var "defs"))
-        (var "defs"),
-      "bodies">: Lists.concat $ Lists.map
-        (lambda "d" $ makeInductiveBody
-          @@ var "env"
-          @@ (Pairs.first $ var "d")
-          @@ (Pairs.second $ var "d"))
-        (var "sanitizedGroup"),
-      "accessors">: Lists.concat $ Lists.map
-        (lambda "d" $ makeAccessorDefs @@ var "d")
-        (var "sanitizedGroup"),
-      "inductiveSent">: Logic.ifElse (Lists.null $ var "bodies")
-        (list ([] :: [TTerm C.Sentence]))
-        (list [CSyntax.sentence
-          (Phantoms.nothing :: TTerm (Maybe C.Comment))
-          (CSyntax.sentenceContentInductive $ CSyntax.inductiveDefinition
-            (Phantoms.nothing :: TTerm (Maybe C.Locality))
-            (boolean False)
-            (var "bodies"))])] $
-      Lists.concat2 (var "inductiveSent") (var "accessors"))
-
--- | Convert a dot-separated Hydra namespace into a relative file path,
--- using `/` as the directory separator and appending `.v`. For example,
--- `"hydra.show.core"` becomes `"hydra/show/core.v"`. The last dotted
--- segment becomes the file name; earlier segments become directories.
-namespaceToPath :: TTermDefinition (String -> String)
-namespaceToPath = define "namespaceToPath" $
-  doc "Convert a Hydra namespace string (e.g. hydra.show.core) into a relative .v file path" $
-  lambda "ns" $ lets [
-    "parts">: Strings.splitOn (string ".") (var "ns"),
-    "dirParts">: Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts")),
-    "fileName">: Strings.cat (list [Maybes.fromMaybe (var "ns") (Lists.maybeLast (var "parts")), string ".v"])] $
-    Logic.ifElse (Lists.null (var "dirParts"))
-      (var "fileName")
-      (Strings.cat (list [
-        Strings.intercalate (string "/") (var "dirParts"),
-        string "/",
-        var "fileName"]))
-
--- | Assemble the full textual body of an axiom-only module. Emits the
--- standard imports header, dependency imports, then one `Axiom` sentence
--- per type definition and one per term definition with a declared scheme.
--- Axiom-only modules bypass term encoding entirely to avoid Coq
--- type-checking memory blowups on heavily polymorphic modules like
--- `hydra.hoisting` and `hydra.inference`.
-buildAxiomOnlyContent :: TTermDefinition (CE.CoqEnvironment
-                                       -> String
-                                       -> String
-                                       -> [(String, Type)]
-                                       -> [(String, Term, [Name], Maybe Type)]
-                                       -> Module
-                                       -> String)
-buildAxiomOnlyContent = define "buildAxiomOnlyContent" $
-  doc "Render an axiom-only Coq module: imports + dependency imports + Axiom declarations" $
-  lambdas ["env", "desc", "nsStr", "typeDefs", "termDefs", "mod_"] $
-  "typeOfType" <~ (Core.typeVariable (wrap _Name (string "Type"))) $
-  "typeAxioms" <~ Lists.map
-    ("nt" ~> CoqCoderSource.encodeAxiomDefinitionPair @@ var "env" @@
-      pair (Pairs.first $ var "nt") (var "typeOfType"))
-    (var "typeDefs") $
-  "termAxioms" <~ (Maybes.cat $ Lists.map
-    ("td" ~>
-      "name" <~ (Pairs.first $ var "td") $
-      "tvars" <~ (Pairs.first $ Pairs.second $ Pairs.second $ var "td") $
-      "mty" <~ (Pairs.second $ Pairs.second $ Pairs.second $ var "td") $
-      Maybes.maybe
-        (Phantoms.nothing :: TTerm (Maybe C.Sentence))
-        ("schemeTy" ~>
-          -- Re-wrap the TypeScheme's forall binders around the body type so
-          -- the emitted axiom has well-scoped type variables:
-          -- `Axiom f : forall (t0 : Type) (t1 : Type), <body>`.
-          "wrapped" <~ Lists.foldr
-            (lambdas ["v", "t"] $ Core.typeForall
-              (Core.forallType (var "v") (var "t")))
-            (var "schemeTy")
-            (var "tvars") $
-          Phantoms.just $ CoqCoderSource.encodeAxiomDefinitionPair @@ var "env" @@
-            pair (var "name") (var "wrapped"))
-        (var "mty"))
-    (var "termDefs")) $
-  "deps" <~ (CoqUtils.moduleDependencies @@ var "mod_") $
-  "depSentences" <~ (dependencyImports @@ var "deps") $
-  "allSentences" <~ (Lists.cons (asTerm CoqCoderSource.standardImports)
-    (Lists.concat2 (var "depSentences")
-      (Lists.concat2 (var "typeAxioms") (var "termAxioms")))) $
-  "doc_" <~ (CSyntax.document (var "allSentences")) $
-  "body" <~ (Serialization.printExpr @@
-    (Serialization.parenthesize @@ (CoqSerdeSource.documentToExpr @@ var "doc_"))) $
-  Strings.cat (list [var "desc", var "body", string "\n"])
-
--- | Build a nested Coq product-type textual expression from a list of type
--- text fragments. `[t]` -> `"t"`; `[t1, t2, ...]` -> `"prod (t1) (prod (...))"`.
--- Empty list defaults to `"unit"`.
-makeProdType :: TTermDefinition ([String] -> String)
-makeProdType = define "makeProdType" $
-  doc "Emit nested `prod (T1) (prod ...)` textual type expression" $
-  lambda "ts" $
-    Maybes.fromMaybe (string "unit") (Maybes.map
-      (lambda "p" $
-        Logic.ifElse (Equality.equal (Lists.length $ var "ts") (int32 1))
-          (Pairs.first $ var "p")
-          (Strings.cat (list [
-            string "prod (",
-            Pairs.first $ var "p",
-            string ") (",
-            makeProdType @@ (Pairs.second $ var "p"),
-            string ")"])))
-      (Lists.uncons $ var "ts"))
-
--- | Build a nested Coq pair-value textual expression.
--- `[b]` -> `"b"`; multi -> `"(pair (b1) ((pair (b2) (...))))"`.
--- Empty list defaults to `"tt"`.
-makeProdVal :: TTermDefinition ([String] -> String)
-makeProdVal = define "makeProdVal" $
-  doc "Emit a nested `(pair (b1) (...))` textual value expression" $
-  lambda "bs" $
-    Maybes.fromMaybe (string "tt") (Maybes.map
-      (lambda "p" $
-        Logic.ifElse (Equality.equal (Lists.length $ var "bs") (int32 1))
-          (Pairs.first $ var "p")
-          (Strings.cat (list [
-            string "(pair (",
-            Pairs.first $ var "p",
-            string ") (",
-            makeProdVal @@ (Pairs.second $ var "p"),
-            string "))"])))
-      (Lists.uncons $ var "bs"))
-
--- | Build n projection expressions for a given bundle variable name.
--- n = 0: []; n = 1: [var]; n > 1: for each index 0..n-1, emit
--- `(fst v)`, `(fst (snd v))`, ..., `(snd (... (snd v)))`.
-makeProjectionExprs :: TTermDefinition (I.Int32 -> String -> [String])
-makeProjectionExprs = define "makeProjectionExprs" $
-  doc "Emit the n projection expressions extracting each member of a nested pair bundle" $
-  lambdas ["n", "bvar"] $
-  "snds" <~ ("k" ~> "v" ~>
-    Logic.ifElse (Equality.equal (var "k") (int32 0))
-      (var "v")
-      (var "snds" @@ (Math.sub (var "k") (int32 1)) @@
-        (Strings.cat (list [string "(snd ", var "v", string ")"])))) $
-  "mkProj" <~ ("i" ~> "total" ~> "v" ~>
-    Logic.ifElse (Equality.equal (var "i") (int32 0))
-      (Strings.cat (list [string "(fst ", var "v", string ")"]))
-      (Logic.ifElse (Equality.equal (var "i") (Math.sub (var "total") (int32 1)))
-        (var "snds" @@ var "i" @@ var "v")
-        (Strings.cat (list [string "(fst ", var "snds" @@ var "i" @@ var "v", string ")"])))) $
-    Logic.ifElse (Equality.lte (var "n") (int32 0))
-      (list ([] :: [TTerm String]))
-      (Logic.ifElse (Equality.equal (var "n") (int32 1))
-        (list [var "bvar"])
-        (Lists.map
-          ("i" ~> var "mkProj" @@ var "i" @@ var "n" @@ var "bvar")
-          (Math.range (int32 0) (Math.sub (var "n") (int32 1)))))
-
--- | Replace every occurrence of the literal `"bundle_"` in a string with a
--- given replacement. Implemented by splitting on the sentinel and
--- intercalating with the replacement.
-replaceBundle :: TTermDefinition (String -> String -> String)
-replaceBundle = define "replaceBundle" $
-  doc "Replace literal `bundle_` with the given replacement string" $
-  lambdas ["s", "bname"] $
-    Strings.intercalate (var "bname") (Strings.splitOn (string "bundle_") (var "s"))
-
--- | Build a single Coq TypeBinder for a type parameter name.
-makeTypeBinder :: TTermDefinition (String -> C.Binder)
-makeTypeBinder = define "makeTypeBinder" $
-  doc "Build a Coq `(p : Type)` binder for a type parameter" $
-  lambda "p" $ CSyntax.binderType $ CSyntax.typeBinders
-    (list [CoqCoderSource.coqName @@ var "p"])
-    (CSyntax.type_ $ CoqCoderSource.coqTermQualid @@ string "Type")
-
--- | Compute the full list of type-variable names and corresponding Coq
--- binders for a term definition: union of the explicit scheme variables
--- with any `t0`/`t1`-like variables discovered in the body (only when the
--- scheme already has type parameters — monomorphic functions never hoist).
-mkTypeBinders :: TTermDefinition (Term -> [Name] -> ([String], [C.Binder]))
-mkTypeBinders = define "mkTypeBinders" $
-  doc "Collect type-variable names and the Coq binders needed for a term definition" $
-  lambdas ["body", "typeVars"] $
-  "schemeVarNames" <~ (Sets.fromList $ Lists.map
-    ("n" ~> unwrap _Name @@ var "n") (var "typeVars")) $
-  "innerTypeVars" <~ Logic.ifElse (Lists.null $ var "typeVars")
-    (Sets.empty :: TTerm (S.Set String))
-    (CoqUtils.collectFreeTypeVars @@ var "body") $
-  "explicit" <~ (Lists.map ("n" ~> unwrap _Name @@ var "n") (var "typeVars")) $
-  "extras" <~ (Lists.filter
-    ("nm" ~> Logic.not (Sets.member (var "nm") (var "schemeVarNames")))
-    (Sets.toList $ var "innerTypeVars")) $
-  "allTypeVarNames" <~ ((Lists.nub :: TTerm [String] -> TTerm [String])
-    (Lists.concat2 (var "explicit") (var "extras"))) $
-  "binders" <~ Lists.map (lambda "v" $ makeTypeBinder @@ var "v") (var "allTypeVarNames") $
-  pair (var "allTypeVarNames") (var "binders")
-
--- | Emit the "Arguments name {v1} {v2} ...\n" line for a definition with
--- implicit type variable binders. Returns empty string when there are no
--- type variables.
-implicitArgsLine :: TTermDefinition (String -> [String] -> String)
-implicitArgsLine = define "implicitArgsLine" $
-  doc "Emit an Arguments line marking every type parameter of a definition as implicit" $
-  lambdas ["name", "typeVarNames"] $
-    Logic.ifElse (Lists.null $ var "typeVarNames")
-      (string "")
-      (Strings.cat (list [
-        string "Arguments ",
-        var "name",
-        string " ",
-        Strings.intercalate (string " ")
-          (Lists.map ("v" ~> Strings.cat (list [string "{", var "v", string "}"]))
-            (var "typeVarNames")),
-        string ".\n"]))
-
--- | Encode a single acyclic term definition as a Coq `Definition` sentence.
--- The body is first passed through `reorderLetBindings` and
--- `eraseUnboundTypeVarDomains` so that only scheme-bound type variables
--- remain as Coq definition parameters.
-encodeTermGroupSingleton :: TTermDefinition (CE.CoqEnvironment -> (String, (Term, ([Name], Maybe Type))) -> [C.Sentence])
-encodeTermGroupSingleton = define "encodeTermGroupSingleton" $
-  doc "Encode a non-cyclic term definition as a Coq Definition sentence" $
-  lambdas ["env", "td"] $
-  "name" <~ Pairs.first (var "td") $
-  "rest1" <~ Pairs.second (var "td") $
-  "body" <~ Pairs.first (var "rest1") $
-  "rest2" <~ Pairs.second (var "rest1") $
-  "typeVars" <~ Pairs.first (var "rest2") $
-  "mType" <~ Pairs.second (var "rest2") $
-  "schemeVarNames" <~ (Sets.fromList $ Lists.map ("n" ~> unwrap _Name @@ var "n") (var "typeVars")) $
-  "body2" <~ (CoqUtils.reorderLetBindings @@
-    (CoqUtils.eraseUnboundTypeVarDomains @@ var "schemeVarNames" @@ var "body")) $
-  "coqBody" <~ (CoqCoderSource.encodeTerm @@ var "env" @@ var "body2") $
-  "binders" <~ (mkTypeBinders @@ var "body2" @@ var "typeVars") $
-  "typeBinders" <~ Pairs.second (var "binders") $
-  "returnType" <~ Maybes.maybe
-    (Phantoms.nothing :: TTerm (Maybe C.Type))
-    ("ty" ~>
-      "ep" <~ (CoqUtils.extractTypeParams @@ var "ty") $
-      "bodyTy" <~ Pairs.second (var "ep") $
-      Phantoms.just $ CSyntax.type_ $ CoqCoderSource.encodeType @@ var "env" @@ var "bodyTy")
-    (var "mType") $
-  list [CSyntax.sentence
-    (Phantoms.nothing :: TTerm (Maybe C.Comment))
-    (CSyntax.sentenceContentDefinition $ CSyntax.definition
-      (Phantoms.nothing :: TTerm (Maybe C.Locality))
-      (CoqCoderSource.coqIdent @@ var "name")
-      (var "typeBinders")
-      (var "returnType")
-      (var "coqBody"))]
-
--- | Render a list of Coq sentences as a textual Document via the Serde
--- layer, parenthesising and pretty-printing the resulting expression.
-renderSentences :: TTermDefinition ([C.Sentence] -> String)
-renderSentences = define "renderSentences" $
-  doc "Pretty-print a Document containing the given Coq sentences" $
-  lambda "sentences" $
-    Serialization.printExpr @@
-      (Serialization.parenthesize @@
-        (CoqSerdeSource.documentToExpr @@ (CSyntax.document $ var "sentences")))
-
--- | Render the Require Import block: the standard imports followed by any
--- user-supplied dependency import sentences.
-renderRequireImports :: TTermDefinition ([C.Sentence] -> String)
-renderRequireImports = define "renderRequireImports" $
-  doc "Pretty-print the standard-imports sentence followed by additional dependency imports" $
-  lambda "depSentences" $
-    renderSentences @@
-      (Lists.cons (asTerm CoqCoderSource.standardImports) (var "depSentences"))
-
--- | Produce the raw Coq text for a mutually recursive group of term
--- definitions, bundling them via `hydra_fix` over a nested product type.
--- Each (name, body, typeVars, mType) entry is fed into the bundle; the
--- surrounding `letBlock` binds each name to its corresponding projection.
-encodeMutualGroupText :: TTermDefinition (CE.CoqEnvironment -> [(String, (Term, ([Name], Maybe Type)))] -> String)
-encodeMutualGroupText = define "encodeMutualGroupText" $
-  doc "Render a mutually recursive term group as a hydra_fix bundle plus projection Definitions" $
-  lambdas ["env", "group"] $
-  -- Collect scheme vars across the entire group so each body's unbound-var
-  -- erasure uses the union.
-  "groupSchemeVars" <~ (Sets.fromList $ Lists.concat $ Lists.map
-    ("td" ~>
-      "rest1" <~ Pairs.second (var "td") $
-      "rest2" <~ Pairs.second (var "rest1") $
-      "tv" <~ Pairs.first (var "rest2") $
-      Lists.map ("n" ~> unwrap _Name @@ var "n") (var "tv"))
-    (var "group")) $
-  -- For each entry, produce (name, typeText, bodyText).
-  "funInfos" <~ (Lists.map
-    ("td" ~>
-      "name" <~ Pairs.first (var "td") $
-      "rest1" <~ Pairs.second (var "td") $
-      "body" <~ Pairs.first (var "rest1") $
-      "rest2" <~ Pairs.second (var "rest1") $
-      "mType" <~ Pairs.second (var "rest2") $
-      "body2" <~ (CoqUtils.reorderLetBindings @@
-        (CoqUtils.eraseUnboundTypeVarDomains @@ var "groupSchemeVars" @@ var "body")) $
-      "coqBody" <~ (CoqCoderSource.encodeTerm @@ var "env" @@ var "body2") $
-      "bodyText" <~ (Serialization.printExpr @@
-        (Serialization.parenthesize @@ (CoqSerdeSource.termToExpr @@ var "coqBody"))) $
-      "typeText" <~ Maybes.maybe
-        (string "_")
-        ("ty" ~>
-          "ep" <~ (CoqUtils.extractTypeParams @@ var "ty") $
-          "bodyTy" <~ Pairs.second (var "ep") $
-          Serialization.printExpr @@
-            (Serialization.parenthesize @@
-              (CoqSerdeSource.typeToExpr @@
-                (CSyntax.type_ $ CoqCoderSource.encodeType @@ var "env" @@ var "bodyTy"))))
-        (var "mType") $
-      pair (var "name") (pair (var "typeText") (var "bodyText")))
-    (var "group")) $
-  -- Collect type variable binders across the whole group.
-  "allTypeVarNames" <~ ((Lists.nub :: TTerm [String] -> TTerm [String]) $ Lists.concat $ Lists.map
-    ("td" ~>
-      "rest1" <~ Pairs.second (var "td") $
-      "b" <~ Pairs.first (var "rest1") $
-      "rest2" <~ Pairs.second (var "rest1") $
-      "tv" <~ Pairs.first (var "rest2") $
-      "binders" <~ (mkTypeBinders @@ var "b" @@ var "tv") $
-      Pairs.first (var "binders"))
-    (var "group")) $
-  "names" <~ Lists.map ("fi" ~> Pairs.first (var "fi")) (var "funInfos") $
-  "bundleName" <~ Strings.cat (list [
-    Strings.intercalate (string "_") (Lists.take (int32 2) (var "names")),
-    string "_bundle"]) $
-  "n" <~ Lists.length (var "funInfos") $
-  "types" <~ Lists.map
-    ("fi" ~> Pairs.first $ Pairs.second $ var "fi")
-    (var "funInfos") $
-  "productType" <~ (makeProdType @@ var "types") $
-  "projExprs" <~ (makeProjectionExprs @@ var "n" @@ string "bundle_") $
-  -- Assemble the inner let-block: name1 := proj1 in\n    let name2 := proj2 in\n    ... in\n
-  "letParts" <~ Lists.map
-    ("np" ~> lets [
-      "nm">: Pairs.first $ Pairs.first $ var "np",
-      "proj">: Pairs.second $ var "np"] $
-      Strings.cat (list [var "nm", string " := ", var "proj"]))
-    (Lists.zip (var "funInfos") (var "projExprs")) $
-  "letBlock" <~ Logic.ifElse (Lists.null $ var "letParts")
-    (string "")
-    (Strings.cat (list [
-      string "let ",
-      Strings.intercalate (string " in\n    let ") (var "letParts"),
-      string " in\n    "])) $
-  -- Product value: (pair body1 (pair body2 ...))
-  "bodies" <~ Lists.map
-    ("fi" ~> Pairs.second $ Pairs.second $ var "fi")
-    (var "funInfos") $
-  "prodVal" <~ (makeProdVal @@ var "bodies") $
-  -- Type binder text for the bundle Definition header.
-  "typBindText" <~ Logic.ifElse (Lists.null $ var "allTypeVarNames")
-    (string "")
-    (Strings.cat (list [
-      string " ",
-      Strings.intercalate (string " ")
-        (Lists.map ("v" ~> Strings.cat (list [string "(", var "v", string " : Type)"]))
-          (var "allTypeVarNames"))])) $
-  "bundleArgsLine" <~ (implicitArgsLine @@ var "bundleName" @@ var "allTypeVarNames") $
-  "bundleDef" <~ Strings.cat (list [
-    string "Definition ",
-    var "bundleName",
-    var "typBindText",
-    string " :=\n  hydra_fix (fun (bundle_ : ",
-    var "productType",
-    string ") =>\n    ",
-    var "letBlock",
-    var "prodVal",
-    string ").\n",
-    var "bundleArgsLine"]) $
-  -- Projection Definitions: one per function in the group.
-  "indexed" <~ (Lists.zip
-    (Math.range (int32 0) (Math.sub (var "n") (int32 1)))
-    (var "funInfos")) $
-  "projDefs" <~ Strings.cat (Lists.map
-    ("iFi" ~>
-      "i" <~ Pairs.first (var "iFi") $
-      "fi" <~ Pairs.second (var "iFi") $
-      "nm" <~ Pairs.first (var "fi") $
-      "t" <~ Pairs.first (Pairs.second (var "fi")) $
-      "projText0" <~ Maybes.fromMaybe (string "") (Maps.lookup (var "i")
-        (Maps.fromList $ Lists.zip
-          (Math.range (int32 0) (Math.sub (var "n") (int32 1)))
-          (var "projExprs"))) $
-      "projText" <~ (replaceBundle @@ var "projText0" @@ var "bundleName") $
-      "argsDef" <~ (implicitArgsLine @@ var "nm" @@ var "allTypeVarNames") $
-      Strings.cat (list [
-        string "Definition ",
-        var "nm",
-        var "typBindText",
-        string " : ",
-        var "t",
-        string " :=\n  ",
-        var "projText",
-        string ".\n",
-        var "argsDef"]))
-    (var "indexed")) $
-  Strings.cat (list [var "bundleDef", string "\n", var "projDefs"])
-
--- | Assemble the source for a full (non-axiom) Coq module. Walks the type
--- and term definitions through SCC sorting and term-level transforms,
--- produces sentences + per-mutual-group text, and joins the pieces with
--- the standard header and discovered dependency imports. Returns the file
--- content keyed by its relative output path.
-buildFullModule :: TTermDefinition (CE.CoqEnvironment
-                                  -> M.Map (String, String) String
-                                  -> Module
-                                  -> String
-                                  -> String
-                                  -> String
-                                  -> [(String, Type)]
-                                  -> [(String, (Term, ([Name], Maybe Type)))]
-                                  -> M.Map String String)
-buildFullModule = define "buildFullModule" $
-  doc "Assemble the full (non-axiom) Coq source for a module" $
-  lambdas ["env", "fieldMap", "mod_", "nsStr", "path", "desc", "typeDefs", "termDefs"] $
-  -- Convert nested-pair termDefs to (name, term) pairs for SCC sorting.
-  "termDefsForSort" <~ Lists.map
-    ("td" ~> pair (Pairs.first $ var "td") (Pairs.first $ Pairs.second $ var "td"))
-    (var "termDefs") $
-  "termDefMap" <~ Maps.fromList (Lists.map
-    ("td" ~> pair (Pairs.first $ var "td") (Pairs.second $ var "td"))
-    (var "termDefs")) $
-  "termGroups" <~ (CoqUtils.sortTermDefsSCC @@ var "termDefsForSort") $
-  -- Enrich each SCC member with its (term, vars, mType), normalize inner
-  -- type lambdas, and rewrite field names.
-  "termGroups2" <~ Lists.map
-    ("cg" ~>
-      "cyc" <~ Pairs.first (var "cg") $
-      "grp" <~ Pairs.second (var "cg") $
-      "enriched" <~ Maybes.cat (Lists.map
-        ("nt" ~>
-          "nm" <~ Pairs.first (var "nt") $
-          "t" <~ Pairs.second (var "nt") $
-          Maybes.map
-            ("rec" ~>
-              "body2" <~ (CoqUtils.normalizeInnerTypeLambdas @@
-                (CoqUtils.rewriteTermFields @@ var "fieldMap" @@ var "t")) $
-              -- rec :: (Term, ([Name], Maybe Type)) — we already recomputed the
-              -- body via `t`, so we only care about the type-var list and the
-              -- optional type scheme from rec.
-              "rest" <~ Pairs.second (var "rec") $
-              "vs" <~ Pairs.first (var "rest") $
-              "mty" <~ Pairs.second (var "rest") $
-              pair (var "nm") (pair (var "body2") (pair (var "vs") (var "mty"))))
-            (Maps.lookup (var "nm") (var "termDefMap")))
-        (var "grp")) $
-      pair (var "cyc") (var "enriched"))
-    (var "termGroups") $
-  -- Type sentences via the already-ported generateTypeGroup.
-  "typeGroups" <~ (CoqUtils.sortTypeDefsSCC @@ var "typeDefs") $
-  "typeSentences" <~ (Lists.concat $ Lists.map
-    ("g" ~> generateTypeGroup @@ var "env" @@ var "g")
-    (var "typeGroups")) $
-  -- Render term output parts: singletons produce AST sentences (wrapped in
-  -- a Document) plus an implicit-Arguments line; cyclic groups produce raw
-  -- bundling text via encodeMutualGroupText.
-  "termRenderedParts" <~ Lists.concat (Lists.map
-    ("cg" ~>
-      "cyc" <~ Pairs.first (var "cg") $
-      "grp" <~ Pairs.second (var "cg") $
-      Logic.ifElse (var "cyc")
-        (list [encodeMutualGroupText @@ var "env" @@ var "grp"])
-        (Lists.map
-          ("td" ~>
-            "sentences" <~ (encodeTermGroupSingleton @@ var "env" @@ var "td") $
-            "nm" <~ Pairs.first (var "td") $
-            "body" <~ Pairs.first (Pairs.second (var "td")) $
-            "tv" <~ Pairs.first (Pairs.second (Pairs.second (var "td"))) $
-            "schemeVarNames" <~ (Sets.fromList $ Lists.map
-              ("n" ~> unwrap _Name @@ var "n") (var "tv")) $
-            "body2" <~ (CoqUtils.reorderLetBindings @@
-              (CoqUtils.eraseUnboundTypeVarDomains @@ var "schemeVarNames" @@ var "body")) $
-            "binders" <~ (mkTypeBinders @@ var "body2" @@ var "tv") $
-            "allTypeVarNames" <~ Pairs.first (var "binders") $
-            "rendered" <~ (renderSentences @@ var "sentences") $
-            "argsLine" <~ Logic.ifElse (Lists.null $ var "allTypeVarNames")
-              (string "")
-              (Strings.cat (list [
-                string "\nArguments ",
-                var "nm",
-                string " ",
-                Strings.intercalate (string " ")
-                  (Lists.map ("v" ~> Strings.cat (list [string "{", var "v", string "}"]))
-                    (var "allTypeVarNames")),
-                string "."])) $
-            Strings.cat (list [var "rendered", var "argsLine", string "\n"]))
-          (var "grp")))
-    (var "termGroups2")) $
-  -- Discover cross-module namespace dependencies via the already-ported
-  -- walkers.
-  "allQualifiedNamesFromTypes" <~ (Sets.unions $ Lists.map
-    ("nt" ~> CoqUtils.collectQualifiedNamesInType @@ Pairs.second (var "nt"))
-    (var "typeDefs")) $
-  "allQualifiedNamesFromTerms" <~ (Sets.unions $ Lists.map
-    ("td" ~> CoqUtils.collectQualifiedNamesInTerm @@
-      (Pairs.first (Pairs.second (var "td"))))
-    (var "termDefs")) $
-  "allQualifiedNamesFromTermTypes" <~ (Sets.unions $ Maybes.cat $ Lists.map
-    ("td" ~>
-      "mty" <~ Pairs.second (Pairs.second (Pairs.second (var "td"))) $
-      Maybes.map
-        ("ty" ~> lets [
-          "ep">: CoqUtils.extractTypeParams @@ var "ty",
-          "bodyTy">: Pairs.second (var "ep")] $
-          CoqUtils.collectQualifiedNamesInType @@ var "bodyTy")
-        (var "mty"))
-    (var "termDefs")) $
-  "allQualifiedNames" <~ (Sets.union (var "allQualifiedNamesFromTypes")
-    (Sets.union (var "allQualifiedNamesFromTerms") (var "allQualifiedNamesFromTermTypes"))) $
-  "nsSet" <~ (Sets.fromList $ Lists.map
-    ("q" ~> CoqUtils.extractQualifiedNamespace @@ var "q")
-    (Sets.toList $ var "allQualifiedNames")) $
-  -- Keep only namespaces that aren't the current one and have no strict
-  -- suffix present in the set (avoid importing both `hydra.foo` and
-  -- `hydra.foo.bar` redundantly).
-  "strStartsWith" <~ ("pref" ~> "s" ~>
-    Logic.and
-      (Equality.gte (Strings.length $ var "s") (Strings.length $ var "pref"))
-      (Equality.equal
-        (Strings.fromList $ Lists.take (Strings.length $ var "pref") (Strings.toList $ var "s"))
-        (var "pref"))) $
-  "hasStrictSuffix" <~ ("nsC" ~> "otherList" ~>
-    Maybes.isJust $ Lists.find
-      ("other" ~> Logic.and
-        (Logic.not (Equality.equal (var "other") (var "nsC")))
-        (var "strStartsWith" @@
-          (Strings.cat (list [var "nsC", string "."])) @@
-          (var "other")))
-      (var "otherList")) $
-  "referencedNs" <~ ((Lists.nub :: TTerm [String] -> TTerm [String]) $ Lists.filter
-    ("nsC" ~> Logic.and
-      (Logic.not (Equality.equal (var "nsC") (var "nsStr")))
-      (Logic.not (var "hasStrictSuffix" @@ var "nsC" @@ (Sets.toList $ var "nsSet"))))
-    (Sets.toList $ var "nsSet")) $
-  "depSentences" <~ (dependencyImports @@ var "referencedNs") $
-  -- Assemble the final output: header + imports + type sentences + term
-  -- parts + Arguments declarations for parameterized types.
-  "importText" <~ (renderRequireImports @@ var "depSentences") $
-  "typeSentencesText" <~ (renderSentences @@ var "typeSentences") $
-  "allTermText" <~ (Strings.cat $ var "termRenderedParts") $
-  "typeArgsDecls" <~ (generateArgumentsDecls @@ var "typeDefs") $
-  "content" <~ Strings.cat (list [
-    var "desc",
-    var "importText",
-    string "\n",
-    var "typeSentencesText",
-    string "\n",
-    var "allTermText",
-    var "typeArgsDecls",
-    string "\n"]) $
-  Maps.fromList (list [pair (var "path") (var "content")])
-
--- | Standard coder entry point: given the cross-module pre-pass results
--- and a single adapted module, produce the map from output file path to
--- generated Coq source text. `moduleToCoq` either delegates to
--- `buildFullModule` or (for modules that exceed Coq's practical
--- type-checking limits) emits an axiom-only stub via
--- `buildAxiomOnlyContent`.
-moduleToCoq :: TTermDefinition (M.Map (String, String) String
-                              -> M.Map String I.Int32
-                              -> S.Set String
-                              -> S.Set String
-                              -> Module
-                              -> [Definition]
-                              -> M.Map String String)
-moduleToCoq = define "moduleToCoq" $
-  doc "Top-level driver: dispatch a module to either full-emission or axiom-only emission, producing (path, content) pairs" $
-  lambdas ["fieldMap", "constrCounts", "ambiguousNames", "globalSanitizedAcc", "mod_", "defs"] $
-  "nsStr" <~ (Packaging.unNamespace (Packaging.moduleNamespace $ var "mod_")) $
-  "path" <~ (namespaceToPath @@ var "nsStr") $
-  "desc" <~ Maybes.maybe
-    (string "")
-    ("d" ~> Strings.cat (list [string "(* ", var "d", string " *)\n\n"]))
-    (Packaging.moduleDescription $ var "mod_") $
-  -- Modules known to blow up Coq's type-checker; emit axiom stubs instead.
-  "axiomOnlyModules" <~ (list [string "hydra.hoisting", string "hydra.inference"]) $
-  "isAxiomOnly" <~ ((Lists.elem :: TTerm String -> TTerm [String] -> TTerm Bool)
-    (var "nsStr") (var "axiomOnlyModules")) $
-  -- Extract type and term definitions from the adapted definition list.
-  "typeDefs" <~ Maybes.cat (Lists.map
-    ("def_" ~> cases _Definition (var "def_") (Just (Phantoms.nothing :: TTerm (Maybe (String, Type)))) [
-      _Definition_type>>: "td" ~> Phantoms.just $ pair
-        (CoqUtils.localName @@ (unwrap _Name @@ (Packaging.typeDefinitionName $ var "td")))
-        (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td")])
-    (var "defs")) $
-  "termDefs" <~ Maybes.cat (Lists.map
-    ("def_" ~> cases _Definition (var "def_")
-      (Just (Phantoms.nothing :: TTerm (Maybe (String, (Term, ([Name], Maybe Type)))))) [
-      _Definition_term>>: "td" ~>
-        "mts" <~ (Packaging.termDefinitionTypeScheme $ var "td") $
-        "vs" <~ Maybes.maybe
-          (list ([] :: [TTerm Name]))
-          ("ts" ~> Core.typeSchemeVariables $ var "ts")
-          (var "mts") $
-        "mty" <~ Maybes.map ("ts" ~> Core.typeSchemeBody $ var "ts") (var "mts") $
-        Phantoms.just $ pair
-          (CoqUtils.localName @@ (unwrap _Name @@ (Packaging.termDefinitionName $ var "td")))
-          (pair
-            (Packaging.termDefinitionTerm $ var "td")
-            (pair (var "vs") (var "mty")))])
-    (var "defs")) $
-  -- Local definition names (both type and term), used to extend the
-  -- ambiguous-names set so that cross-module references to those names
-  -- stay fully qualified.
-  "localDefNames" <~ (Sets.fromList $ Lists.concat2
-    (Lists.map (lambda "nt" $ Pairs.first $ var "nt") (var "typeDefs"))
-    (Lists.map (lambda "td" $ Pairs.first $ var "td") (var "termDefs"))) $
-  "moduleAmbig" <~ (Sets.union (var "ambiguousNames") (var "localDefNames")) $
-  -- Construct the CoqEnvironment record that threads through every encoder.
-  "env" <~ (record CE._CoqEnvironment [
-    CE._CoqEnvironment_currentNamespace>>: var "nsStr",
-    CE._CoqEnvironment_constructorCounts>>: var "constrCounts",
-    CE._CoqEnvironment_ambiguousNames>>: var "moduleAmbig",
-    CE._CoqEnvironment_sanitizedAccessors>>: var "globalSanitizedAcc"]) $
-  Logic.ifElse (var "isAxiomOnly")
-    (Maps.fromList (list [pair
-      (var "path")
-      (buildAxiomOnlyContent @@ var "env" @@ var "desc" @@ var "nsStr"
-         @@ var "typeDefs" @@ var "termDefs" @@ var "mod_")]))
-    (buildFullModule @@ var "env" @@ var "fieldMap" @@ var "mod_"
-       @@ var "nsStr" @@ var "path" @@ var "desc" @@ var "typeDefs" @@ var "termDefs")
-
-
-
-
-
diff --git a/src/main/haskell/Hydra/Sources/Coq/Language.hs b/src/main/haskell/Hydra/Sources/Coq/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Language.hs
+++ /dev/null
@@ -1,185 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Language constraints for Coq code generation.
-
-module Hydra.Sources.Coq.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Coders                          as Coders
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Sources.Kernel.Terms.Constants       as Constants
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Coq.Syntax              as CoqSyntax
-import           Prelude hiding ((++))
-import qualified Data.List                                 as DL
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-import Hydra.Ast
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.coq.language"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Formatting.ns],
-            moduleTypeDependencies = (CoqSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Language constraints for Coq code generation"}
-  where
-    definitions = [
-      toDefinition coqLanguage,
-      toDefinition coqReservedWords,
-      toDefinition coqStrippedReservedWords]
-
--- | Language constraints for Coq.
--- Coq's type system (CIC) is a strict superset of System F, so it supports all Hydra features.
-coqLanguage :: TTermDefinition Language
-coqLanguage = define "coqLanguage" $ lets [
-    "eliminationVariants">: Sets.fromList $ list [
-      Variants.eliminationVariantRecord,
-      Variants.eliminationVariantUnion,
-      Variants.eliminationVariantWrap],
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBoolean,
-      Variants.literalVariantFloat,
-      Variants.literalVariantInteger,
-      Variants.literalVariantString],
-    "floatTypes">: Sets.fromList $ list [
-      Core.floatTypeFloat64],
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination,
-      Variants.functionVariantLambda],
-    "integerTypes">: Sets.fromList $ list [
-      Core.integerTypeBigint],
-    "termVariants">: Sets.fromList $ list [
-      Variants.termVariantApplication,
-      Variants.termVariantEither,
-
-      Variants.termVariantCases,
-
-      Variants.termVariantLambda,
-
-      Variants.termVariantProject,
-
-      Variants.termVariantUnwrap,
-
-      Variants.termVariantTypeApplication,
-
-      Variants.termVariantTypeLambda,
-      Variants.termVariantLet,
-      Variants.termVariantList,
-      Variants.termVariantLiteral,
-      Variants.termVariantMap,
-      Variants.termVariantMaybe,
-      Variants.termVariantPair,
-      Variants.termVariantRecord,
-      Variants.termVariantSet,
-      Variants.termVariantInject,
-      Variants.termVariantUnit,
-      Variants.termVariantVariable,
-      Variants.termVariantWrap],
-    "typeVariants">: Sets.fromList $ list [
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication,
-      Variants.typeVariantEither,
-      Variants.typeVariantForall,
-      Variants.typeVariantFunction,
-      Variants.typeVariantList,
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap,
-      Variants.typeVariantMaybe,
-      Variants.typeVariantPair,
-      Variants.typeVariantRecord,
-      Variants.typeVariantSet,
-      Variants.typeVariantUnion,
-      Variants.typeVariantUnit,
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap],
-    "typePredicate">: constant true] $
-    Coders.language
-      (Coders.languageName_ $ string "hydra.coq")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
--- | Reserved words that must be renamed when used as Coq variable or binding names.
--- This set is kept narrower than the full Coq lexicon: it includes only the tokens
--- that actually clash with Coq variable-name usage (Gallina and vernacular keywords)
--- plus a few stdlib names that appear as Hydra-generated lambda parameter names.
-coqReservedWords :: TTermDefinition (S.Set String)
-coqReservedWords = define "coqReservedWords" $
-  Sets.fromList $ list $ fmap string reservedWords
-  where
-    reservedWords = [
-      -- Gallina and vernacular keywords
-      "as", "at", "cofix", "do", "else", "end", "exists", "exists2",
-      "fix", "for", "forall", "fun", "if", "IF", "in", "let", "match",
-      "mod", "open", "Prop", "return", "Set", "then", "Type", "using",
-      "where", "with",
-      "Axiom", "Class", "Coercion", "Context", "Definition", "Fixpoint",
-      "Hypothesis", "Inductive", "Instance", "Lemma", "Module", "Notation",
-      "Proof", "Qed", "Record", "Require", "Import", "Section", "End",
-      "Theorem", "Example", "Variable", "Variables",
-      -- Coq stdlib names that appear as Hydra-generated lambda parameter names
-      "cons", "pair", "nil",
-      -- Coq stdlib type constructors that can be shadowed by local let bindings,
-      -- causing cryptic "Non-functional construction" errors when subsequent
-      -- code tries to use the type.
-      "list", "option", "prod", "sum", "unit", "bool", "nat", "string",
-      -- Names that collide with Hydra kernel function names after namespace
-      -- stripping (e.g., hydra.show.core.term, hydra.show.core.type).
-      "term", "literal", "graph", "element"]
-
--- | Reserved words that must be renamed when they appear as a stripped-local
--- form of a cross-module Hydra reference. This set is used only by
--- `resolveQualifiedName` when it converts a `hydra.<ns>.<x>` reference to its
--- short form. It is strictly narrower than `coqReservedWords` — in particular
--- it does *not* include `term`, `literal`, `element`, whose cross-module
--- disambiguation is handled by the ambiguous-names mechanism, not by
--- underscore-escaping. It is narrower at the lambda-parameter side too, but
--- that set is tracked separately via `coqReservedWords`.
-coqStrippedReservedWords :: TTermDefinition (S.Set String)
-coqStrippedReservedWords = define "coqStrippedReservedWords" $
-  Sets.fromList $ list $ fmap string reservedWords
-  where
-    reservedWords = [
-      -- Gallina and vernacular keywords
-      "as", "at", "cofix", "do", "else", "end", "exists", "exists2",
-      "fix", "for", "forall", "fun", "if", "IF", "in", "let", "match",
-      "mod", "Prop", "return", "Set", "then", "Type", "using",
-      "where", "with",
-      "Axiom", "Class", "Coercion", "Context", "Definition", "Fixpoint",
-      "Hypothesis", "Inductive", "Instance", "Lemma", "Module", "Notation",
-      "Proof", "Qed", "Record", "Require", "Import", "Section", "End",
-      "Theorem", "Example", "Variable", "Variables",
-      -- Coq stdlib type names
-      "bool", "nat", "list", "option", "prod", "sum", "unit",
-      "string", "String", "Empty_set",
-      -- Coq stdlib value constructors
-      "true", "false", "None", "Some", "nil", "cons", "pair",
-      "inl", "inr", "tt",
-      -- Hydra module name whose stripped form collides with generated
-      -- definition names.
-      "graph"]
diff --git a/src/main/haskell/Hydra/Sources/Coq/Manifest.hs b/src/main/haskell/Hydra/Sources/Coq/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Manifest.hs
+++ /dev/null
@@ -1,38 +0,0 @@
--- | Package manifest for hydra-coq.
---
--- Owns the Coq coder DSL sources. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
---
--- As of #337 (feature_326_coq), the entire Coq code generator lives in
--- DSL form under `Sources/Coq/`: Coder, Environment, Generate, Language,
--- Serde, Syntax, and Utils. Only a 36-line host-side driver remains in
--- `heads/haskell/.../Hydra/Coq/GenerateDriver.hs` for the
--- `generateSources` signature adaptation and the `_CoqProject` writer.
-
-module Hydra.Sources.Coq.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Coq.Coder as CoqCoder
-import qualified Hydra.Sources.Coq.Environment as CoqEnvironment
-import qualified Hydra.Sources.Coq.Generate as CoqGenerate
-import qualified Hydra.Sources.Coq.Language as CoqLanguage
-import qualified Hydra.Sources.Coq.Serde as CoqSerde
-import qualified Hydra.Sources.Coq.Syntax as CoqSyntax
-import qualified Hydra.Sources.Coq.Utils as CoqUtils
-
-mainModules :: [Module]
-mainModules = [
-  CoqCoder.module_,
-  CoqEnvironment.module_,
-  CoqGenerate.module_,
-  CoqLanguage.module_,
-  CoqSerde.module_,
-  CoqSyntax.module_,
-  CoqUtils.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Coq/Serde.hs b/src/main/haskell/Hydra/Sources/Coq/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Serde.hs
+++ /dev/null
@@ -1,722 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Coq serializer: converts the Coq syntax AST to concrete Coq source code (.v files).
-
-module Hydra.Sources.Coq.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Constants       as Constants
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Coq.Syntax              as CoqSyntax
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as DL
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports for Coq AST
-import Hydra.Ast
-import qualified Hydra.Coq.Syntax as C
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.coq.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Formatting.ns, Serialization.ns],
-            moduleTypeDependencies = (CoqSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Coq serializer: converts Coq AST to concrete Coq source code"}
-  where
-    definitions = [
-      toDefinition applicationToExpr,
-      toDefinition axiomDeclarationToExpr,
-      toDefinition binderToExpr,
-      toDefinition commentToExpr,
-      toDefinition constructorToExpr,
-      toDefinition definitionToExpr,
-      toDefinition documentToExpr,
-      toDefinition fixpointDefinitionToExpr,
-      toDefinition identToExpr,
-      toDefinition inductiveBodyToExpr,
-      toDefinition inductiveDefinitionToExpr,
-      toDefinition localityToExpr,
-      toDefinition matchToExpr,
-      toDefinition moduleDefinitionToExpr,
-      toDefinition pattern0ToExpr,
-      toDefinition pattern10ToExpr,
-      toDefinition pattern1ToExpr,
-      toDefinition patternToExpr,
-      toDefinition qualidToExpr,
-      toDefinition recordDefinitionToExpr,
-      toDefinition recordFieldToExpr,
-      toDefinition requireImportToExpr,
-      toDefinition sectionDefinitionToExpr,
-      toDefinition sentenceContentToExpr,
-      toDefinition sentenceToExpr,
-      toDefinition sortToExpr,
-      toDefinition termToExpr,
-      toDefinition term0ToExpr,
-      toDefinition term1ToExpr,
-      toDefinition term10ToExpr,
-      toDefinition term100ToExpr,
-      toDefinition theoremBodyToExpr,
-      toDefinition typeToExpr]
-
--- ===========================================================================
--- Helpers
--- ===========================================================================
-
--- | Render a Coq keyword
-kw :: String -> TTerm Expr
-kw s = Serialization.cst @@ string s
-
--- | Render space-separated expressions
-sp :: [TTerm Expr] -> TTerm Expr
-sp xs = Serialization.spaceSep @@ list xs
-
--- | Render with a period terminator
-withDot :: TTerm Expr -> TTerm Expr
-withDot e = Serialization.suffix @@ string "." @@ e
-
--- | Render an optional part, yielding empty list or singleton
-optPart :: TTerm (Maybe a) -> (TTerm a -> TTerm Expr) -> TTerm [Expr]
-optPart opt f = Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "x" $ list [f (var "x")]) opt
-
--- ===========================================================================
--- Term language serialization
--- ===========================================================================
-
--- | Serialize an Ident
-identToExpr :: TTermDefinition (C.Ident -> Expr)
-identToExpr = define "identToExpr" $
-  lambda "ident" $
-    Serialization.cst @@ (unwrap C._String @@ (unwrap C._Ident @@ var "ident"))
-
--- | Serialize a Qualid: ident.field1.field2
-qualidToExpr :: TTermDefinition (C.Qualid -> Expr)
-qualidToExpr = define "qualidToExpr" $
-  lambda "q" $ lets [
-    "idExpr">: identToExpr @@ (project C._Qualid C._Qualid_id @@ var "q"),
-    "fieldIds">: project C._Qualid C._Qualid_fieldIds @@ var "q",
-    "fieldExprs">: Lists.map
-      (lambda "f" $ identToExpr @@ (unwrap C._FieldIdent @@ var "f"))
-      (var "fieldIds")] $
-    Logic.ifElse (Lists.null $ var "fieldExprs")
-      (var "idExpr")
-      (Serialization.dotSep @@ Lists.concat2 (list [var "idExpr"]) (var "fieldExprs"))
-
--- | Serialize a Sort
-sortToExpr :: TTermDefinition (C.Sort -> Expr)
-sortToExpr = define "sortToExpr" $
-  lambda "s" $ cases C._Sort (var "s") Nothing [
-    C._Sort_set>>: constant $ kw "Set",
-    C._Sort_prop>>: constant $ kw "Prop",
-    C._Sort_sProp>>: constant $ kw "SProp",
-    C._Sort_type>>: constant $ kw "Type",
-    C._Sort_typeWithAnyUniverse>>: constant $ kw "Type",
-    C._Sort_typeWithUniverse>>: lambda "u" $
-      Serialization.noSep @@ list [kw "Type", kw "@{", kw "}" ]]
-
--- | Serialize a Type (which is just a wrapper around Term)
-typeToExpr :: TTermDefinition (C.Type -> Expr)
-typeToExpr = define "typeToExpr" $
-  lambda "t" $ termToExpr @@ (unwrap C._Type @@ var "t")
-
--- | Serialize a Binder
-binderToExpr :: TTermDefinition (C.Binder -> Expr)
-binderToExpr = define "binderToExpr" $
-  lambda "b" $ cases C._Binder (var "b") Nothing [
-    C._Binder_name>>: lambda "n" $
-      Maybes.maybe (kw "_")
-        (lambda "i" $ identToExpr @@ var "i")
-        (unwrap C._Name @@ var "n"),
-    C._Binder_type>>: lambda "tb" $ lets [
-      "names">: Lists.map
-        (lambda "n" $ Maybes.maybe (kw "_")
-          (lambda "i" $ identToExpr @@ var "i")
-          (unwrap C._Name @@ var "n"))
-        (project C._TypeBinders C._TypeBinders_names @@ var "tb"),
-      "ty">: typeToExpr @@ (project C._TypeBinders C._TypeBinders_type @@ var "tb")] $
-      Serialization.parens @@ (sp [
-        Serialization.spaceSep @@ var "names",
-        kw ":",
-        var "ty"]),
-    C._Binder_term>>: lambda "lb" $ lets [
-      "name">: Maybes.maybe (kw "_")
-        (lambda "i" $ identToExpr @@ var "i")
-        (unwrap C._Name @@ (project C._LetBinder C._LetBinder_name @@ var "lb")),
-      "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-        (lambda "t" $ list [kw ":", typeToExpr @@ var "t"])
-        (project C._LetBinder C._LetBinder_type @@ var "lb"),
-      "body">: termToExpr @@ (project C._LetBinder C._LetBinder_term @@ var "lb")] $
-      Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-        list [var "name"],
-        var "ty",
-        list [kw ":=", var "body"]])),
-    C._Binder_implicit>>: lambda "ib" $
-      cases C._ImplicitBinders (var "ib") Nothing [
-        C._ImplicitBinders_maximallyInserted>>: lambda "tb" $ lets [
-          "names">: Lists.map
-            (lambda "n" $ Maybes.maybe (kw "_")
-              (lambda "i" $ identToExpr @@ var "i")
-              (unwrap C._Name @@ var "n"))
-            (project C._TypeBinders C._TypeBinders_names @@ var "tb"),
-          "ty">: typeToExpr @@ (project C._TypeBinders C._TypeBinders_type @@ var "tb")] $
-          Serialization.brackets @@ (asTerm Serialization.curlyBraces) @@ (asTerm Serialization.inlineStyle) @@
-            (sp [Serialization.spaceSep @@ var "names", kw ":", var "ty"]),
-        C._ImplicitBinders_nonMaximallyInserted>>: lambda "tb" $ lets [
-          "names">: Lists.map
-            (lambda "n" $ Maybes.maybe (kw "_")
-              (lambda "i" $ identToExpr @@ var "i")
-              (unwrap C._Name @@ var "n"))
-            (project C._TypeBinders C._TypeBinders_names @@ var "tb"),
-          "ty">: typeToExpr @@ (project C._TypeBinders C._TypeBinders_type @@ var "tb")] $
-          Serialization.brackets @@ (asTerm Serialization.squareBrackets) @@ (asTerm Serialization.inlineStyle) @@
-            (sp [Serialization.spaceSep @@ var "names", kw ":", var "ty"])],
-    C._Binder_generalizing>>: lambda "gb" $
-      cases C._GeneralizingBinder (var "gb") Nothing [
-        C._GeneralizingBinder_explicit>>: lambda "tc" $
-          Serialization.parens @@ (termToExpr @@ (project C._TypeclassConstraint C._TypeclassConstraint_term @@ var "tc")),
-        C._GeneralizingBinder_implicitMaximallyInserted>>: lambda "tc" $
-          Serialization.brackets @@ (asTerm Serialization.curlyBraces) @@ (asTerm Serialization.inlineStyle) @@
-            (termToExpr @@ (project C._TypeclassConstraint C._TypeclassConstraint_term @@ var "tc")),
-        C._GeneralizingBinder_implicitNonMaximallyInserted>>: lambda "tc" $
-          Serialization.brackets @@ (asTerm Serialization.squareBrackets) @@ (asTerm Serialization.inlineStyle) @@
-            (termToExpr @@ (project C._TypeclassConstraint C._TypeclassConstraint_term @@ var "tc"))],
-    C._Binder_pattern>>: lambda "p" $ kw "_"]
-
--- | Serialize a Term
-termToExpr :: TTermDefinition (C.Term -> Expr)
-termToExpr = define "termToExpr" $
-  lambda "t" $ cases C._Term (var "t") Nothing [
-    C._Term_forallOrFun>>: lambda "fof" $
-      cases C._ForallOrFun (var "fof") Nothing [
-        C._ForallOrFun_forall>>: lambda "fa" $ sp [
-          kw "forall",
-          openBindersToExpr (project C._Forall C._Forall_binders @@ var "fa"),
-          kw ",",
-          typeToExpr @@ (project C._Forall C._Forall_type @@ var "fa")],
-        C._ForallOrFun_fun>>: lambda "fn" $ sp [
-          kw "fun",
-          openBindersToExpr (project C._Fun C._Fun_binders @@ var "fn"),
-          kw "=>",
-          termToExpr @@ (project C._Fun C._Fun_body @@ var "fn")]],
-    C._Term_let>>: lambda "lt" $ lets [
-      "bindings">: project C._Let C._Let_bindings @@ var "lt",
-      "body">: termToExpr @@ (project C._Let C._Let_in @@ var "lt")] $
-      cases C._LetBindings (var "bindings") Nothing [
-        C._LetBindings_named>>: lambda "ln" $ lets [
-          "binder">: project C._LetNamed C._LetNamed_binder @@ var "ln",
-          "name">: Maybes.maybe (kw "_")
-            (lambda "i" $ identToExpr @@ var "i")
-            (unwrap C._Name @@ (project C._LetBinder C._LetBinder_name @@ var "binder")),
-          "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-            (project C._LetNamed C._LetNamed_binders @@ var "ln"),
-          "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-            (lambda "t2" $ list [kw ":", typeToExpr @@ var "t2"])
-            (project C._LetBinder C._LetBinder_type @@ var "binder"),
-          "val">: termToExpr @@ (project C._LetBinder C._LetBinder_term @@ var "binder")] $
-          sp [kw "let", Serialization.spaceSep @@ Lists.concat (list [
-            list [var "name"],
-            var "binders",
-            var "ty",
-            list [kw ":=", var "val"],
-            list [kw "in"]]),
-            var "body"],
-        C._LetBindings_destructuring>>: lambda "ld" $ sp [kw "let", kw "...", kw "in", var "body"]],
-    C._Term_if>>: lambda "ifE" $ lets [
-      "cond">: termToExpr @@ (project C._If C._If_condition @@ var "ifE"),
-      "thn">: termToExpr @@ (project C._If C._If_then @@ var "ifE"),
-      "els">: termToExpr @@ (project C._If C._If_else @@ var "ifE")] $
-      sp [kw "if", var "cond", kw "then", var "thn", kw "else", var "els"],
-    C._Term_fix>>: lambda "fx" $
-      cases C._Fix (var "fx") Nothing [
-        C._Fix_decl>>: lambda "d" $ sp [kw "fix", fixDeclToExpr (var "d")],
-        C._Fix_qual>>: lambda "q" $ kw "fix"],
-    C._Term_cofix>>: lambda "cf" $ sp [kw "cofix", kw "..."],
-    C._Term_term100>>: lambda "t100" $ term100ToExpr @@ var "t100"]
-
--- | Serialize OpenBinders
-openBindersToExpr :: TTerm C.OpenBinders -> TTerm Expr
-openBindersToExpr ob =
-  cases C._OpenBinders ob Nothing [
-    C._OpenBinders_type>>: lambda "tb" $ lets [
-      "names">: Lists.map
-        (lambda "n" $ Maybes.maybe (kw "_")
-          (lambda "i" $ identToExpr @@ var "i")
-          (unwrap C._Name @@ var "n"))
-        (project C._TypeBinders C._TypeBinders_names @@ var "tb"),
-      "ty">: typeToExpr @@ (project C._TypeBinders C._TypeBinders_type @@ var "tb")] $
-      sp [Serialization.parens @@ (sp [Serialization.spaceSep @@ var "names", kw ":", var "ty"])],
-    C._OpenBinders_binders>>: lambda "bs" $
-      Serialization.spaceSep @@ Lists.map (lambda "b" $ binderToExpr @@ var "b") (var "bs")]
-
--- | Serialize a Fix_Decl
-fixDeclToExpr :: TTerm C.Fix_Decl -> TTerm Expr
-fixDeclToExpr d = lets [
-  "name">: identToExpr @@ (project C._Fix_Decl C._Fix_Decl_ident @@ d),
-  "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-    (project C._Fix_Decl C._Fix_Decl_binders @@ d),
-  "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-    (lambda "t" $ list [kw ":", typeToExpr @@ var "t"])
-    (project C._Fix_Decl C._Fix_Decl_type @@ d),
-  "body">: termToExpr @@ (project C._Fix_Decl C._Fix_Decl_term @@ d)] $
-  Serialization.spaceSep @@ Lists.concat (list [
-    list [var "name"],
-    var "binders",
-    var "ty",
-    list [kw ":=", var "body"]])
-
--- | Serialize a Term100
-term100ToExpr :: TTermDefinition (C.Term100 -> Expr)
-term100ToExpr = define "term100ToExpr" $
-  lambda "t" $ cases C._Term100 (var "t") Nothing [
-    C._Term100_cast>>: lambda "tc" $ sp [
-      term10ToExpr @@ (project C._TypeCast C._TypeCast_term @@ var "tc"),
-      kw ":",
-      typeToExpr @@ (project C._TypeCast C._TypeCast_type @@ var "tc")],
-    C._Term100_term10>>: lambda "t10" $ term10ToExpr @@ var "t10"]
-
--- | Serialize a Term10
-term10ToExpr :: TTermDefinition (C.Term10 -> Expr)
-term10ToExpr = define "term10ToExpr" $
-  lambda "t" $ cases C._Term10 (var "t") Nothing [
-    C._Term10_application>>: lambda "app" $ applicationToExpr @@ var "app",
-    C._Term10_oneTerm>>: lambda "ot" $
-      cases C._OneTerm (var "ot") Nothing [
-        C._OneTerm_explicit>>: lambda "qa" $ qualidAnnotatedToExpr (var "qa"),
-        C._OneTerm_term1>>: lambda "t1" $ term1ToExpr @@ var "t1"]]
-
--- | Serialize a Term1
-term1ToExpr :: TTermDefinition (C.Term1 -> Expr)
-term1ToExpr = define "term1ToExpr" $
-  lambda "t" $ cases C._Term1 (var "t") Nothing [
-    C._Term1_projection>>: constant $ kw "?projection",
-    C._Term1_scope>>: constant $ kw "?scope",
-    C._Term1_term0>>: lambda "t0" $ term0ToExpr @@ var "t0"]
-
--- | Serialize a Term0
-term0ToExpr :: TTermDefinition (C.Term0 -> Expr)
-term0ToExpr = define "term0ToExpr" $
-  lambda "t" $ cases C._Term0 (var "t") Nothing [
-    C._Term0_qualidAnnotated>>: lambda "qa" $ qualidAnnotatedToExpr (var "qa"),
-    C._Term0_sort>>: lambda "s" $ sortToExpr @@ var "s",
-    C._Term0_primitiveNotations>>: lambda "pn" $
-      cases C._PrimitiveNotations (var "pn") Nothing [
-        C._PrimitiveNotations_number>>: lambda "n" $ lets [
-          "v">: unwrap C._Number @@ var "n"] $
-          Serialization.cst @@ (Literals.showBigfloat (var "v")),
-        C._PrimitiveNotations_string>>: lambda "s2" $
-          sp [kw "\"", Serialization.cst @@ (unwrap C._String @@ var "s2"), kw "\""]],
-    C._Term0_evar>>: lambda "ev" $ kw "?evar",
-    C._Term0_match>>: lambda "m" $ matchToExpr @@ var "m",
-    C._Term0_record>>: constant $ kw "{| |}",
-    C._Term0_generalizing>>: constant $ kw "`( )",
-    C._Term0_ltac>>: constant $ kw "ltac:( )",
-    C._Term0_parens>>: lambda "inner" $
-      Serialization.parens @@ (termToExpr @@ var "inner")]
-
--- | Serialize a QualidAnnotated
-qualidAnnotatedToExpr :: TTerm C.QualidAnnotated -> TTerm Expr
-qualidAnnotatedToExpr qa = qualidToExpr @@ (project C._QualidAnnotated C._QualidAnnotated_qualid @@ qa)
-
--- | Serialize an Application
-applicationToExpr :: TTermDefinition (C.Application -> Expr)
-applicationToExpr = define "applicationToExpr" $
-  lambda "app" $ cases C._Application (var "app") Nothing [
-    C._Application_normal>>: lambda "na" $ sp [
-      term1ToExpr @@ (project C._NormalApplication C._NormalApplication_lhs @@ var "na"),
-      Serialization.spaceSep @@ Lists.map
-        (lambda "a" $ cases C._Arg (var "a") Nothing [
-          C._Arg_ident>>: lambda "ia" $ sp [
-            Serialization.parens @@ (sp [
-              identToExpr @@ (project C._IdentArg C._IdentArg_ident @@ var "ia"),
-              kw ":=",
-              termToExpr @@ (project C._IdentArg C._IdentArg_term @@ var "ia")])],
-          C._Arg_natural>>: lambda "na2" $ lets [
-            "v">: unwrap C._Natural @@ (project C._NaturalArg C._NaturalArg_natural @@ var "na2")] $
-            Serialization.cst @@ (Literals.showBigint (var "v")),
-          C._Arg_term>>: lambda "t1" $ term1ToExpr @@ var "t1"])
-        (project C._NormalApplication C._NormalApplication_rhs @@ var "na")],
-    C._Application_annotated>>: lambda "aa" $ sp [
-      kw "@",
-      qualidAnnotatedToExpr (project C._AnnotatedApplication C._AnnotatedApplication_annot @@ var "aa")]]
-
--- | Serialize an AxiomDeclaration: `Axiom name : type.`
-axiomDeclarationToExpr :: TTermDefinition (C.AxiomDeclaration -> Expr)
-axiomDeclarationToExpr = define "axiomDeclarationToExpr" $
-  lambda "a" $
-    withDot $ sp [
-      kw "Axiom",
-      identToExpr @@ (project C._AxiomDeclaration C._AxiomDeclaration_name @@ var "a"),
-      kw ":",
-      typeToExpr @@ (project C._AxiomDeclaration C._AxiomDeclaration_type @@ var "a")]
-
--- | Serialize a Pattern0 (primitive / grouped pattern)
-pattern0ToExpr :: TTermDefinition (C.Pattern0 -> Expr)
-pattern0ToExpr = define "pattern0ToExpr" $
-  lambda "p" $ cases C._Pattern0 (var "p") Nothing [
-    C._Pattern0_qualid>>: lambda "q" $ qualidToExpr @@ var "q",
-    C._Pattern0_qualIdAndPattern>>: constant $ kw "...",
-    C._Pattern0_placeholder>>: constant $ kw "_",
-    C._Pattern0_parens>>: lambda "ps" $ Serialization.parens @@
-      (Serialization.infixWsList @@ string ", " @@
-        Lists.map (lambda "p2" $ patternToExpr @@ var "p2") (var "ps")),
-    C._Pattern0_number>>: lambda "n" $ lets [
-      "v">: unwrap C._Number @@ var "n"] $
-      Serialization.cst @@ (Literals.showBigfloat (var "v")),
-    C._Pattern0_string>>: lambda "s" $ sp [
-      kw "\"", Serialization.cst @@ (unwrap C._String @@ var "s"), kw "\""]]
-
--- | Serialize a Pattern1 (scoped pattern; we ignore the scope for now)
-pattern1ToExpr :: TTermDefinition (C.Pattern1 -> Expr)
-pattern1ToExpr = define "pattern1ToExpr" $
-  lambda "p" $ pattern0ToExpr @@ (project C._Pattern1 C._Pattern1_pattern @@ var "p")
-
--- | Serialize a Pattern10 (as-binding, juxtaposition, or qualid-with-args)
-pattern10ToExpr :: TTermDefinition (C.Pattern10 -> Expr)
-pattern10ToExpr = define "pattern10ToExpr" $
-  lambda "p" $ cases C._Pattern10 (var "p") Nothing [
-    C._Pattern10_as>>: lambda "pa" $ sp [
-      pattern1ToExpr @@ (project C._Pattern10_As C._Pattern10_As_pattern @@ var "pa"),
-      kw "as",
-      Maybes.maybe (kw "_")
-        (lambda "i" $ identToExpr @@ var "i")
-        (unwrap C._Name @@ (project C._Pattern10_As C._Pattern10_As_as @@ var "pa"))],
-    C._Pattern10_patterns>>: lambda "pps" $ lets [
-      "first">: pattern1ToExpr @@ (project C._Pattern10_Patterns C._Pattern10_Patterns_pattern @@ var "pps"),
-      "rest">: Lists.map (lambda "p2" $ pattern1ToExpr @@ var "p2")
-        (project C._Pattern10_Patterns C._Pattern10_Patterns_patterns @@ var "pps")] $
-      Serialization.spaceSep @@ Lists.cons (var "first") (var "rest"),
-    C._Pattern10_qualiid>>: lambda "pq" $ lets [
-      "q">: qualidToExpr @@ (project C._Pattern10_Qualid C._Pattern10_Qualid_qualid @@ var "pq"),
-      "args">: Lists.map (lambda "p2" $ pattern1ToExpr @@ var "p2")
-        (project C._Pattern10_Qualid C._Pattern10_Qualid_patterns @@ var "pq")] $
-      Logic.ifElse (Lists.null (var "args"))
-        (var "q")
-        (Serialization.spaceSep @@ Lists.cons (var "q") (var "args"))]
-
--- | Serialize a Pattern (top-level; we delegate to Pattern10 and ignore the annotation term)
-patternToExpr :: TTermDefinition (C.Pattern -> Expr)
-patternToExpr = define "patternToExpr" $
-  lambda "p" $ cases C._Pattern (var "p") Nothing [
-    C._Pattern_pattern>>: lambda "p10" $ pattern10ToExpr @@ var "p10",
-    C._Pattern_term>>: constant $ kw "_"]
-
--- | Serialize a Match expression
-matchToExpr :: TTermDefinition (C.Match -> Expr)
-matchToExpr = define "matchToExpr" $
-  lambda "m" $ lets [
-    "items">: Lists.map
-      (lambda "ci" $ lets [
-        "t">: term100ToExpr @@ (project C._CaseItem C._CaseItem_term @@ var "ci"),
-        "asP">: Maybes.maybe (list ([] :: [TTerm Expr]))
-          (lambda "n" $ list [kw "as", Maybes.maybe (kw "_") (lambda "i" $ identToExpr @@ var "i")
-            (unwrap C._Name @@ var "n")])
-          (project C._CaseItem C._CaseItem_as @@ var "ci")] $
-        Serialization.spaceSep @@ Lists.concat (list [list [var "t"], var "asP"]))
-      (project C._Match C._Match_caseItems @@ var "m"),
-    "ret">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "r" $ list [kw "return", term100ToExpr @@ var "r"])
-      (project C._Match C._Match_return @@ var "m"),
-    "eqs">: Lists.map
-      (lambda "eq" $ lets [
-        "patGroups">: Lists.map
-          (lambda "grp" $ Serialization.spaceSep @@
-            Lists.map (lambda "p" $ patternToExpr @@ var "p") (var "grp"))
-          (project C._Equation C._Equation_pattern @@ var "eq"),
-        "pats">: Serialization.infixWsList @@ string " | " @@ (var "patGroups"),
-        "body">: termToExpr @@ (project C._Equation C._Equation_term @@ var "eq")] $
-        sp [kw "|", var "pats", kw "=>", var "body"])
-      (project C._Match C._Match_equations @@ var "m")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      list [Serialization.spaceSep @@ Lists.concat (list [
-        list [kw "match"],
-        var "items",
-        var "ret",
-        list [kw "with"]])],
-      var "eqs",
-      list [kw "end"]])
-
--- ===========================================================================
--- Vernacular serialization
--- ===========================================================================
-
--- | Serialize a Comment
-commentToExpr :: TTermDefinition (C.Comment -> Expr)
-commentToExpr = define "commentToExpr" $
-  lambda "c" $
-    Serialization.cst @@ Strings.cat (list [
-      string "(* ", unwrap C._Comment @@ var "c", string " *)"])
-
--- | Serialize a Locality qualifier
-localityToExpr :: TTermDefinition (C.Locality -> Expr)
-localityToExpr = define "localityToExpr" $
-  lambda "loc" $ cases C._Locality (var "loc") Nothing [
-    C._Locality_local>>: constant $ kw "Local",
-    C._Locality_global>>: constant $ kw "Global"]
-
--- | Serialize a RequireImport
-requireImportToExpr :: TTermDefinition (C.RequireImport -> Expr)
-requireImportToExpr = define "requireImportToExpr" $
-  lambda "ri" $ lets [
-    "fromPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "q" $ list [kw "From", qualidToExpr @@ var "q"])
-      (project C._RequireImport C._RequireImport_from @@ var "ri"),
-    "requirePart">: Logic.ifElse (project C._RequireImport C._RequireImport_require @@ var "ri")
-      (list [kw "Require"])
-      (list ([] :: [TTerm Expr])),
-    "qualPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "q" $ cases C._ImportQualification (var "q") Nothing [
-        C._ImportQualification_import>>: constant $ list [kw "Import"],
-        C._ImportQualification_export>>: constant $ list [kw "Export"]])
-      (project C._RequireImport C._RequireImport_qualification @@ var "ri"),
-    "mods">: Lists.map (lambda "m" $ qualidToExpr @@ var "m")
-      (project C._RequireImport C._RequireImport_modules @@ var "ri")] $
-    withDot $ Serialization.spaceSep @@ Lists.concat (list [
-      var "fromPart",
-      var "requirePart",
-      var "qualPart",
-      var "mods"])
-
--- | Serialize a Constructor
-constructorToExpr :: TTermDefinition (C.Constructor -> Expr)
-constructorToExpr = define "constructorToExpr" $
-  lambda "c" $ lets [
-    "name">: identToExpr @@ (project C._Constructor C._Constructor_name @@ var "c"),
-    "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-      (project C._Constructor C._Constructor_binders @@ var "c"),
-    "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "t" $ list [kw ":", typeToExpr @@ var "t"])
-      (project C._Constructor C._Constructor_type @@ var "c")] $
-    Serialization.spaceSep @@ Lists.concat (list [
-      list [kw "|", var "name"],
-      var "binders",
-      var "ty"])
-
--- | Serialize an InductiveBody
-inductiveBodyToExpr :: TTermDefinition (C.InductiveBody -> Expr)
-inductiveBodyToExpr = define "inductiveBodyToExpr" $
-  lambda "ib" $ lets [
-    "name">: identToExpr @@ (project C._InductiveBody C._InductiveBody_name @@ var "ib"),
-    "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-      (project C._InductiveBody C._InductiveBody_binders @@ var "ib"),
-    "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "t" $ list [kw ":", typeToExpr @@ var "t"])
-      (project C._InductiveBody C._InductiveBody_type @@ var "ib"),
-    "constrs">: Lists.map (lambda "c" $ constructorToExpr @@ var "c")
-      (project C._InductiveBody C._InductiveBody_constructors @@ var "ib")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      list [Serialization.spaceSep @@ Lists.concat (list [
-        list [var "name"],
-        var "binders",
-        var "ty",
-        list [kw ":="]])],
-      var "constrs"])
-
--- | Serialize an InductiveDefinition.
--- Produces "[Locality] Inductive body1 with body2 with body3." for mutual inductives.
-inductiveDefinitionToExpr :: TTermDefinition (C.InductiveDefinition -> Expr)
-inductiveDefinitionToExpr = define "inductiveDefinitionToExpr" $
-  lambda "id" $ lets [
-    "locPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "l" $ list [localityToExpr @@ var "l"])
-      (project C._InductiveDefinition C._InductiveDefinition_locality @@ var "id"),
-    "kwPart">: Logic.ifElse (project C._InductiveDefinition C._InductiveDefinition_coinductive @@ var "id")
-      (kw "CoInductive")
-      (kw "Inductive"),
-    "bodyExprs">: Lists.map (lambda "b" $ inductiveBodyToExpr @@ var "b")
-      (project C._InductiveDefinition C._InductiveDefinition_bodies @@ var "id"),
-    "firstBody">: Maybes.fromMaybe (Serialization.cst @@ string "") (Lists.maybeHead $ var "bodyExprs"),
-    "restBodies">: Lists.map
-      (lambda "b" $ Serialization.spaceSep @@ list [kw "with", var "b"])
-      (Lists.drop (int32 1) $ var "bodyExprs"),
-    "firstLine">: Serialization.spaceSep @@ Lists.concat (list [
-      var "locPart",
-      list [var "kwPart", var "firstBody"]])] $
-    withDot $ Serialization.newlineSep @@ Lists.cons (var "firstLine") (var "restBodies")
-
--- | Serialize a RecordField
-recordFieldToExpr :: TTermDefinition (C.RecordField -> Expr)
-recordFieldToExpr = define "recordFieldToExpr" $
-  lambda "rf" $ sp [
-    identToExpr @@ (project C._RecordField C._RecordField_name @@ var "rf"),
-    kw ":",
-    typeToExpr @@ (project C._RecordField C._RecordField_type @@ var "rf")]
-
--- | Serialize a RecordDefinition
-recordDefinitionToExpr :: TTermDefinition (C.RecordDefinition -> Expr)
-recordDefinitionToExpr = define "recordDefinitionToExpr" $
-  lambda "rd" $ lets [
-    "locPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "l" $ list [localityToExpr @@ var "l"])
-      (project C._RecordDefinition C._RecordDefinition_locality @@ var "rd"),
-    "name">: identToExpr @@ (project C._RecordDefinition C._RecordDefinition_name @@ var "rd"),
-    "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-      (project C._RecordDefinition C._RecordDefinition_binders @@ var "rd"),
-    "sortPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "s" $ list [kw ":", sortToExpr @@ var "s"])
-      (project C._RecordDefinition C._RecordDefinition_sort @@ var "rd"),
-    "body">: project C._RecordDefinition C._RecordDefinition_body @@ var "rd",
-    "constrPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "c" $ list [identToExpr @@ var "c"])
-      (project C._RecordBody C._RecordBody_constructor @@ var "body"),
-    "fields">: Lists.map (lambda "f" $ Serialization.suffix @@ string " ;" @@ (recordFieldToExpr @@ var "f"))
-      (project C._RecordBody C._RecordBody_fields @@ var "body")] $
-    withDot $ Serialization.newlineSep @@ Lists.concat (list [
-      list [Serialization.spaceSep @@ Lists.concat (list [
-        var "locPart",
-        list [kw "Record"],
-        list [var "name"],
-        var "binders",
-        var "sortPart",
-        list [kw ":="],
-        var "constrPart",
-        list [kw "{"]])],
-      var "fields",
-      list [kw "}"]])
-
--- | Serialize a Definition
-definitionToExpr :: TTermDefinition (C.Definition -> Expr)
-definitionToExpr = define "definitionToExpr" $
-  lambda "d" $ lets [
-    "locPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "l" $ list [localityToExpr @@ var "l"])
-      (project C._Definition C._Definition_locality @@ var "d"),
-    "name">: identToExpr @@ (project C._Definition C._Definition_name @@ var "d"),
-    "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-      (project C._Definition C._Definition_binders @@ var "d"),
-    "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "t" $ list [kw ":", typeToExpr @@ var "t"])
-      (project C._Definition C._Definition_type @@ var "d"),
-    "body">: termToExpr @@ (project C._Definition C._Definition_body @@ var "d")] $
-    withDot $ Serialization.spaceSep @@ Lists.concat (list [
-      var "locPart",
-      list [kw "Definition", var "name"],
-      var "binders",
-      var "ty",
-      list [kw ":=", var "body"]])
-
--- | Serialize a FixpointDefinition
-fixpointDefinitionToExpr :: TTermDefinition (C.FixpointDefinition -> Expr)
-fixpointDefinitionToExpr = define "fixpointDefinitionToExpr" $
-  lambda "fd" $ lets [
-    "locPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "l" $ list [localityToExpr @@ var "l"])
-      (project C._FixpointDefinition C._FixpointDefinition_locality @@ var "fd"),
-    "name">: identToExpr @@ (project C._FixpointDefinition C._FixpointDefinition_name @@ var "fd"),
-    "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-      (project C._FixpointDefinition C._FixpointDefinition_binders @@ var "fd"),
-    "ty">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "t" $ list [kw ":", typeToExpr @@ var "t"])
-      (project C._FixpointDefinition C._FixpointDefinition_type @@ var "fd"),
-    "body">: termToExpr @@ (project C._FixpointDefinition C._FixpointDefinition_body @@ var "fd")] $
-    withDot $ Serialization.spaceSep @@ Lists.concat (list [
-      var "locPart",
-      list [kw "Fixpoint", var "name"],
-      var "binders",
-      var "ty",
-      list [kw ":=", var "body"]])
-
--- | Serialize a TheoremBody
-theoremBodyToExpr :: TTermDefinition (C.TheoremBody -> Expr)
-theoremBodyToExpr = define "theoremBodyToExpr" $
-  lambda "tb" $ lets [
-    "kindKw">: cases C._TheoremKind (project C._TheoremBody C._TheoremBody_kind @@ var "tb") Nothing [
-      C._TheoremKind_theorem>>: constant $ kw "Theorem",
-      C._TheoremKind_lemma>>: constant $ kw "Lemma",
-      C._TheoremKind_proposition>>: constant $ kw "Proposition",
-      C._TheoremKind_corollary>>: constant $ kw "Corollary",
-      C._TheoremKind_example>>: constant $ kw "Example"],
-    "name">: identToExpr @@ (project C._TheoremBody C._TheoremBody_name @@ var "tb"),
-    "binders">: Lists.map (lambda "b" $ binderToExpr @@ var "b")
-      (project C._TheoremBody C._TheoremBody_binders @@ var "tb"),
-    "ty">: typeToExpr @@ (project C._TheoremBody C._TheoremBody_type @@ var "tb"),
-    "proof">: termToExpr @@ (project C._TheoremBody C._TheoremBody_proof @@ var "tb")] $
-    Serialization.newlineSep @@ list [
-      withDot $ Serialization.spaceSep @@ Lists.concat (list [
-        list [var "kindKw", var "name"],
-        var "binders",
-        list [kw ":", var "ty"]]),
-      kw "Proof.",
-      sp [kw "exact", Serialization.parens @@ var "proof"],
-      kw "Qed."]
-
--- | Serialize a ModuleDefinition
-moduleDefinitionToExpr :: TTermDefinition (C.ModuleDefinition -> Expr)
-moduleDefinitionToExpr = define "moduleDefinitionToExpr" $
-  lambda "md" $ lets [
-    "name">: identToExpr @@ (project C._ModuleDefinition C._ModuleDefinition_name @@ var "md"),
-    "sentences">: Lists.map (lambda "s" $ sentenceToExpr @@ var "s")
-      (project C._ModuleDefinition C._ModuleDefinition_sentences @@ var "md")] $
-    Serialization.doubleNewlineSep @@ Lists.concat (list [
-      list [withDot $ sp [kw "Module", var "name"]],
-      var "sentences",
-      list [withDot $ sp [kw "End", var "name"]]])
-
--- | Serialize a SectionDefinition
-sectionDefinitionToExpr :: TTermDefinition (C.SectionDefinition -> Expr)
-sectionDefinitionToExpr = define "sectionDefinitionToExpr" $
-  lambda "sd" $ lets [
-    "name">: identToExpr @@ (project C._SectionDefinition C._SectionDefinition_name @@ var "sd"),
-    "sentences">: Lists.map (lambda "s" $ sentenceToExpr @@ var "s")
-      (project C._SectionDefinition C._SectionDefinition_sentences @@ var "sd")] $
-    Serialization.doubleNewlineSep @@ Lists.concat (list [
-      list [withDot $ sp [kw "Section", var "name"]],
-      var "sentences",
-      list [withDot $ sp [kw "End", var "name"]]])
-
--- | Serialize a SentenceContent
-sentenceContentToExpr :: TTermDefinition (C.SentenceContent -> Expr)
-sentenceContentToExpr = define "sentenceContentToExpr" $
-  lambda "sc" $ cases C._SentenceContent (var "sc") Nothing [
-    C._SentenceContent_axiom>>: lambda "a" $ axiomDeclarationToExpr @@ var "a",
-    C._SentenceContent_definition>>: lambda "d" $ definitionToExpr @@ var "d",
-    C._SentenceContent_fixpoint>>: lambda "f" $ fixpointDefinitionToExpr @@ var "f",
-    C._SentenceContent_inductive>>: lambda "i" $ inductiveDefinitionToExpr @@ var "i",
-    C._SentenceContent_module>>: lambda "m" $ moduleDefinitionToExpr @@ var "m",
-    C._SentenceContent_notation>>: lambda "n" $ kw "(* notation *)",
-    C._SentenceContent_record>>: lambda "r" $ recordDefinitionToExpr @@ var "r",
-    C._SentenceContent_requireImport>>: lambda "ri" $ requireImportToExpr @@ var "ri",
-    C._SentenceContent_section>>: lambda "s" $ sectionDefinitionToExpr @@ var "s",
-    C._SentenceContent_theorem>>: lambda "t" $ theoremBodyToExpr @@ var "t"]
-
--- | Serialize a Sentence (optional comment + content)
-sentenceToExpr :: TTermDefinition (C.Sentence -> Expr)
-sentenceToExpr = define "sentenceToExpr" $
-  lambda "s" $ lets [
-    "cmtPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "c" $ list [commentToExpr @@ var "c"])
-      (project C._Sentence C._Sentence_comment @@ var "s"),
-    "content">: sentenceContentToExpr @@ (project C._Sentence C._Sentence_content @@ var "s")] $
-    Serialization.newlineSep @@ Lists.concat (list [var "cmtPart", list [var "content"]])
-
--- | Serialize a Document (complete .v file)
-documentToExpr :: TTermDefinition (C.Document -> Expr)
-documentToExpr = define "documentToExpr" $
-  lambda "doc" $
-    Serialization.doubleNewlineSep @@ Lists.map
-      (lambda "s" $ sentenceToExpr @@ var "s")
-      (project C._Document C._Document_sentences @@ var "doc")
diff --git a/src/main/haskell/Hydra/Sources/Coq/Syntax.hs b/src/main/haskell/Hydra/Sources/Coq/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Syntax.hs
+++ /dev/null
@@ -1,760 +0,0 @@
-module Hydra.Sources.Coq.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel                    hiding (letBindings)
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.coq.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-coq :: String -> Type
-coq = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("A model for Coq core and extensions. Based on the Coq 8.15 grammar:\n" ++
-      "  https://coq.github.io/doc/v8.15/refman/language/core/basic.html#essential-vocabulary\n" ++
-      "  Extended with Vernacular commands for complete .v file generation.")}
-  where
-    definitions = termLanguage ++ vernacular
-
-    -- Term language (Gallina core)
-    termLanguage = [
-      annotatedApplication,
-      application,
-      arg,
-      binder,
-      caseItem,
-      cofix,
-      cofixBody,
-      cofixQual,
-      cofixWith,
-      equation,
-      existentialVariable,
-      existentialVariableVariant,
-      fieldIdent,
-      fix_,
-      fixAnnot,
-      fixAnnot_Measure,
-      fixAnnot_Wf,
-      fix_Decl,
-      fix_Qual,
-      fixWith,
-      forall_,
-      forallOrFun,
-      fun,
-      generalizingBinder,
-      ident,
-      identArg,
-      if_,
-      implicitBinders,
-      let_,
-      letBinder,
-      letBindings,
-      letNamed,
-      letDestructuring,
-      letDestructuring_Variant1,
-      letDestructuring_Variant2,
-      letDestructuring_Variant3,
-      match,
-      name_,
-      natural,
-      naturalArg,
-      normalApplication,
-      number,
-      oneTerm,
-      openBinders,
-      pattern_,
-      pattern0,
-      pattern1,
-      pattern10,
-      pattern10_As,
-      pattern10_Patterns,
-      pattern10_Qualid,
-      primitiveNotations,
-      qualid,
-      qualidAndPattern,
-      qualidAnnotated,
-      returnAs,
-      scopeKey,
-      sort,
-      string_,
-      term,
-      term0,
-      term1,
-      term10,
-      term100,
-      type_,
-      typeCast,
-      typeCastOperator,
-      typeBinders,
-      typeclassConstraint,
-      univAnnot,
-      universe,
-      universe_Expr,
-      universeLevel,
-      universeName]
-
-    -- Vernacular commands (for generating complete .v files)
-    vernacular = [
-      axiomDeclaration,
-      comment,
-      constructor,
-      definition,
-      document,
-      fixpointDefinition,
-      importQualification,
-      inductiveBody,
-      inductiveDefinition,
-      locality,
-      moduleDefinition,
-      notationDeclaration,
-      recordBody,
-      recordDefinition,
-      recordField,
-      requireImport,
-      sectionDefinition,
-      sentence,
-      sentenceContent,
-      theoremBody,
-      theoremKind]
-
-annotatedApplication :: Binding
-annotatedApplication = define "AnnotatedApplication" $ T.record [
-  "annot">: coq "QualidAnnotated",
-  "terms">: nonemptyList $ coq "Term1"]
-
-application :: Binding
-application = define "Application" $ T.union [
-  "normal">: coq "NormalApplication",
-  "annotated">: coq "AnnotatedApplication"]
-
-arg :: Binding
-arg = define "Arg" $ T.union [
-  "ident">: coq "IdentArg",
-  "natural">: coq "NaturalArg",
-  "term">: coq "Term1"]
-
-axiomDeclaration :: Binding
-axiomDeclaration = define "AxiomDeclaration" $
-  doc "An Axiom declaration: `Axiom <name> : <type>.`" $
-  T.record [
-    "name">: coq "Ident",
-    "type">: coq "Type"]
-
-binder :: Binding
-binder = define "Binder" $ T.union [
-  "name">: coq "Name",
-  "type">: coq "TypeBinders",
-  "term">: coq "LetBinder",
-  "implicit">: coq "ImplicitBinders",
-  "generalizing">: coq "GeneralizingBinder",
-  -- 	( name : type | term )  -- TODO
-  "pattern">: coq "Pattern0"]
-
-caseItem :: Binding
-caseItem = define "CaseItem" $ T.record [
-  "term">: coq "Term100",
-  "as">: T.maybe $ coq "Name",
-  "in">: T.maybe $ coq "Pattern"]
-
-cofix :: Binding
-cofix = define "Cofix" $ T.record [
-  "body">: coq "CofixBody",
-  "qual">: T.maybe $ coq "CofixQual"]
-
-cofixBody :: Binding
-cofixBody = define "CofixBody" $ T.record [
-  "ident">: coq "Ident",
-  "binders">: T.list $ coq "Binder",
-  "type">: T.maybe $ coq "Type",
-  "term">: coq "Term"]
-
-cofixQual :: Binding
-cofixQual = define "CofixQual" $ T.union [
-  "in">: coq "Term",
-  "with">: coq "CofixWith"]
-
-cofixWith :: Binding
-cofixWith = define "CofixWith" $ T.record [
-  "with">: nonemptyList $ coq "CofixBody",
-  "for">: T.maybe $ coq "Ident"]
-
-equation :: Binding
-equation = define "Equation" $ T.record [
-  "pattern">: nonemptyList $ nonemptyList $ coq "Pattern",
-  "term">: coq "Term"]
-
-existentialVariable :: Binding
-existentialVariable = define "ExistentialVariable" $ T.record [
-  "ident">: coq "Ident",
-  "variant">: coq "ExistentialVariableVariant"]
-
-existentialVariableVariant :: Binding
-existentialVariableVariant = define "ExistentialVariableVariant" $ T.union [
-  "placeholder">: T.unit,
-  "inside1">: T.unit,
-  "inside2">: T.unit,
-  "outside">: T.maybe $ coq "IdentArg"]
-
-fieldIdent :: Binding
-fieldIdent = define "FieldIdent" $ T.wrap $ coq "Ident"
-
-fix_ :: Binding
-fix_ = define "Fix" $ T.union [
-  "decl">: coq "Fix_Decl",
-  "qual">: T.maybe $ coq "Fix_Qual"]
-
-fixAnnot :: Binding
-fixAnnot = define "FixAnnot" $ T.union [
-  "struct">: coq "Ident",
-  "wf">: coq "FixAnnot_Wf",
-  "measure">: coq "FixAnnot_Measure"]
-
-fixAnnot_Measure :: Binding
-fixAnnot_Measure = define "FixAnnot_Measure" $ T.record [
-  "term">: coq "OneTerm",
-  "ident">: T.maybe $ coq "Ident",
-  "term2">: T.maybe $ coq "OneTerm"]
-
-fixAnnot_Wf :: Binding
-fixAnnot_Wf = define "FixAnnot_Wf" $ T.record [
-  "term">: coq "OneTerm",
-  "ident">: coq "Ident"]
-
-fix_Decl :: Binding
-fix_Decl = define "Fix_Decl" $ T.record [
-  "ident">: coq "Ident",
-  "binders">: T.list $ coq "Binder",
-  "annot">: T.maybe $ coq "FixAnnot",
-  "type">: T.maybe $ coq "Type",
-  "term">: coq "Term"]
-
-fix_Qual :: Binding
-fix_Qual = define "Fix_Qual" $ T.union [
-  "in">: coq "Term",
-  "with">: coq "FixWith"]
-
-fixWith :: Binding
-fixWith = define "FixWith" $ T.record [
-  "decls">: nonemptyList $ coq "Fix_Decl",
-  "for">: T.maybe $ coq "Ident"]
-
-forall_ :: Binding
-forall_ = define "Forall" $ T.record [
-  "binders">: coq "OpenBinders",
-  "type">: coq "Type"]
-
-forallOrFun :: Binding
-forallOrFun = define "ForallOrFun" $ T.union [
-  "forall">: coq "Forall",
-  "fun">: coq "Fun"]
-
-fun :: Binding
-fun = define "Fun" $ T.record [
-  "binders">: coq "OpenBinders",
-  "body">: coq "Term"]
-
-generalizingBinder :: Binding
-generalizingBinder = define "GeneralizingBinder" $ T.union [
-  "explicit">:
-    doc "Terms surrounded by `( ) introduce their free variables as explicit arguments" $
-    coq "TypeclassConstraint",
-
-  "implicitMaximallyInserted">:
-    doc "Terms surrounded by `{ } introduce their free variables as maximally inserted implicit arguments" $
-    coq "TypeclassConstraint",
-
-  "implicitNonMaximallyInserted">:
-    doc "Terms surrounded by `[ ] introduce them as non-maximally inserted implicit arguments" $
-    coq "TypeclassConstraint"]
-
-ident :: Binding
-ident = define "Ident" $ T.wrap $ coq "String"
-
-identArg :: Binding
-identArg = define "IdentArg" $ T.record [
-  "ident">: coq "Ident",
-  "term">: coq "Term"]
-
-if_ :: Binding
-if_ = define "If" $
-  doc "Pattern match on boolean values" $
-  T.record [
-    "condition">: coq "Term",
-    "returnAs">: T.maybe $ coq "ReturnAs",
-    "then">: coq "Term",
-    "else">: coq "Term"]
-
-implicitBinders :: Binding
-implicitBinders = define "ImplicitBinders" $
-  doc "In the context of a function definition, these forms specify that name is an implicit argument." $
-  T.union [
-    "maximallyInserted">:
-      doc "The first form, with curly braces, makes name a maximally inserted implicit argument" $
-      coq "TypeBinders",
-
-    "nonMaximallyInserted">:
-      doc "The second form, with square brackets, makes name a non-maximally inserted implicit argument." $
-      coq "TypeBinders"]
-
-let_ :: Binding
-let_ = define "Let" $
-  doc "A let-in definition" $
-  T.record [
-    "bindings">: coq "LetBindings",
-    "in">: coq "Term"]
-
-letBinder :: Binding
-letBinder = define "LetBinder" $
-  doc "Some constructions allow the binding of a variable to value. This is called a 'let-binder'." $
-  T.record [
-    "name">: coq "Name",
-    "type">: T.maybe $ coq "Type",
-    "term">: coq "Term"]
-
-letBindings :: Binding
-letBindings = define "LetBindings" $ T.union [
-  "named">: coq "LetNamed",
-  "destructuring">: coq "LetDestructuring"]
-
-letNamed :: Binding
-letNamed = define "LetNamed" $ T.record [
-  "binder">: coq "LetBinder",
-  "binders">: T.list $ coq "Binder"]
-
-letDestructuring :: Binding
-letDestructuring = define "LetDestructuring" $ T.union [
-  "variant1">: coq "LetDestructuring_Variant1",
-  "variant2">: coq "LetDestructuring_Variant2",
-  "variant3">: coq "LetDestructuring_Variant3"]
-
-letDestructuring_Variant1 :: Binding
-letDestructuring_Variant1 = define "LetDestructuring_Variant1" $ T.record [
-  "names">: T.list $ coq "Name",
-  "returnAs">: T.maybe $ coq "ReturnAs",
-  "term">: coq "Term"]
-
-letDestructuring_Variant2 :: Binding
-letDestructuring_Variant2 = define "LetDestructuring_Variant2" $ T.record [
-  "pattern">: coq "Pattern",
-  "term">: coq "Term",
-  "return">: T.maybe $ coq "Term100"]
-
-letDestructuring_Variant3 :: Binding
-letDestructuring_Variant3 = define "LetDestructuring_Variant3" $ T.record [
-  "pattern1">: coq "Pattern",
-  "pattern2">: coq "Pattern",
-  "term">: coq "Term",
-  "return">: coq "Term100"]
-
-match :: Binding
-match = define "Match" $ T.record [
-  "caseItems">: nonemptyList $ coq "CaseItem",
-  "return">: T.maybe $ coq "Term100",
-  "pipe">: T.boolean,
-  "equations">: T.list $ coq "Equation"]
-
-name_ :: Binding
-name_ = define "Name" $ T.wrap $ T.maybe $ coq "Ident"
-
-natural :: Binding
-natural = define "Natural" $
-  doc "A non-negative arbitrary-precision integer" $
-  T.wrap T.bigint
-
-naturalArg :: Binding
-naturalArg = define "NaturalArg" $ T.record [
-  "natural">: coq "Natural",
-  "term">: coq "Term"]
-
-normalApplication :: Binding
-normalApplication = define "NormalApplication" $ T.record [
-  "lhs">: coq "Term1",
-  "rhs">: nonemptyList $ coq "Arg"]
-
-number :: Binding
-number = define "Number" $ T.wrap T.bigfloat
-
-oneTerm :: Binding
-oneTerm = define "OneTerm" $ T.union [
-  "explicit">: coq "QualidAnnotated",
-  "term1">: coq "Term1"]
-
-openBinders :: Binding
-openBinders = define "OpenBinders" $ T.union [
-  "type">: coq "TypeBinders",
-  "binders">: T.list $ coq "Binder"]
-
-pattern_ :: Binding
-pattern_ = define "Pattern" $ T.union [
-  "pattern">: coq "Pattern10",
-  "term">: T.maybe $ coq "Term"]
-
-pattern0 :: Binding
-pattern0 = define "Pattern0" $ T.union [
-  "qualid">: coq "Qualid",
-  "qualIdAndPattern">: coq "QualidAndPattern",
-  "placeholder">: T.unit,
-  "parens">: nonemptyList $ coq "Pattern",
-  "number">: coq "Number",
-  "string">: coq "String"]
-
-pattern1 :: Binding
-pattern1 = define "Pattern1" $ T.record [
-  "pattern">: coq "Pattern0",
-  "scope">: T.maybe $ coq "ScopeKey"]
-
-pattern10 :: Binding
-pattern10 = define "Pattern10" $ T.union [
-  "as">: coq "Pattern10_As",
-  "patterns">: coq "Pattern10_Patterns",
-  "qualiid">: coq "Pattern10_Qualid"]
-
-pattern10_As :: Binding
-pattern10_As = define "Pattern10_As" $ T.record [
-  "pattern">: coq "Pattern1",
-  "as">: coq "Name"]
-
-pattern10_Patterns :: Binding
-pattern10_Patterns = define "Pattern10_Patterns" $ T.record [
-  "pattern">: coq "Pattern1",
-  "patterns">: T.list $ coq "Pattern1"]
-
-pattern10_Qualid :: Binding
-pattern10_Qualid = define "Pattern10_Qualid" $ T.record [
-  "qualid">: coq "Qualid",
-  "patterns">: T.list $ coq "Pattern1"]
-
-primitiveNotations :: Binding
-primitiveNotations = define "PrimitiveNotations" $ T.union [
-  "number">: coq "Number",
-  "string">: coq "String"]
-
-qualid :: Binding
-qualid = define "Qualid" $
-  doc "A qualified identifier" $
-  T.record [
-    "id">: coq "Ident",
-    "fieldIds">: T.list $ coq "FieldIdent"]
-
-qualidAndPattern :: Binding
-qualidAndPattern = define "QualidAndPattern" $ T.record [
-  "qualid">: coq "Qualid",
-  "pattern">: coq "Pattern"]
-
-qualidAnnotated :: Binding
-qualidAnnotated = define "QualidAnnotated" $ T.record [
-  "qualid">: coq "Qualid",
-  "univAnnot">: T.maybe $ coq "UnivAnnot"]
-
-returnAs :: Binding
-returnAs = define "ReturnAs" $ T.record [
-  "as">: T.maybe $ coq "Name",
-  "return">: coq "Term100"]
-
-scopeKey :: Binding
-scopeKey = define "ScopeKey" $ T.wrap $ coq "Ident"
-
-sort :: Binding
-sort = define "Sort" $
-  doc "The types of types are called sorts." $
-  T.union [
-    "set">:
-      doc "The sort 𝖲𝖾𝗍 intends to be the type of small sets." T.unit,
-    "prop">:
-      doc "The sort 𝖯𝗋𝗈𝗉 intends to be the type of logical propositions." T.unit,
-    "sProp">:
-      doc "The sort 𝖲𝖯𝗋𝗈𝗉 is like 𝖯𝗋𝗈𝗉 but the propositions in 𝖲𝖯𝗋𝗈𝗉 are known to have irrelevant proofs (all proofs are equal)." T.unit,
-    "type">: T.unit,
-    "typeWithAnyUniverse">: T.unit,
-    "typeWithUniverse">: coq "Universe"]
-
-string_ :: Binding
-string_ = define "String" $ T.wrap T.string
-
-term :: Binding
-term = define "Term" $ T.union [
-  "forallOrFun">: coq "ForallOrFun",
-  "let">: coq "Let",
-  "if">: coq "If",
-  "fix">: coq "Fix",
-  "cofix">: coq "Cofix",
-  "term100">: coq "Term100"]
-
-term0 :: Binding
-term0 = define "Term0" $ T.union [
-  "qualidAnnotated">: coq "QualidAnnotated",
-  "sort">: coq "Sort",
-  "primitiveNotations">: coq "PrimitiveNotations",
-  "evar">: coq "ExistentialVariable",
-  "match">: coq "Match",
-  "record">: T.unit,
-  "generalizing">: T.unit,
-  -- 	[| term*; | term : type? |] univ_annot? -- TODO
-  "ltac">: T.unit,
-  "parens">: coq "Term"]
-
-term1 :: Binding
-term1 = define "Term1" $ T.union [
-  "projection">: T.unit,
-  "scope">: T.unit,
-  "term0">: coq "Term0"]
-
-term10 :: Binding
-term10 = define "Term10" $ T.union [
-  "application">: coq "Application",
-  "oneTerm">: coq "OneTerm"]
-
-term100 :: Binding
-term100 = define "Term100" $ T.union [
-  "cast">: coq "TypeCast",
-  "term10">: coq "Term10"]
-
-type_ :: Binding
-type_ = define "Type" $ T.wrap $ coq "Term"
-
-typeCast :: Binding
-typeCast = define "TypeCast" $ T.record [
-  "term">: coq "Term10",
-  "type">: coq "Type",
-  "operator">: coq "TypeCastOperator"]
-
-typeCastOperator :: Binding
-typeCastOperator = define "TypeCastOperator" $ T.union [
-  "normal">:
-    doc "The expression term10 : type is a type cast expression. It enforces the type of term10 to be type." T.unit,
-  "vmCompute">:
-    doc "term10 <: type specifies that the virtual machine will be used to type check that term10 has type type (see vm_compute)." T.unit,
-  "nativeCompute">:
-    doc "term10 <<: type specifies that compilation to OCaml will be used to type check that term10 has type type (see native_compute)." T.unit]
-
-typeBinders :: Binding
-typeBinders = define "TypeBinders" $ T.record [
-  "names">: nonemptyList $ coq "Name",
-  "type">: coq "Type"]
-
-typeclassConstraint :: Binding
-typeclassConstraint = define "TypeclassConstraint" $
-  T.record [
-    "name">: T.maybe $ coq "Name",
-    "generalizing">: T.boolean,
-    "term">: coq "Term"]
-
-univAnnot :: Binding
-univAnnot = define "UnivAnnot" $
-  T.wrap $ T.list $ coq "UniverseLevel"
-
-universe :: Binding
-universe = define "Universe" $ T.union [
-  "max">: nonemptyList $ coq "Universe_Expr",
-  "expr">: coq "Universe_Expr"]
-
-universe_Expr :: Binding
-universe_Expr = define "Universe_Expr" $ T.record [
-  "name">: coq "UniverseName",
-  "number">: T.maybe $ coq "Natural"]
-
-universeLevel :: Binding
-universeLevel = define "UniverseLevel" $ T.union [
-  "set">: T.unit,
-  "prop">: T.unit,
-  "type">: T.unit,
-  "ignored">: T.unit,
-  "qualid">: coq "Qualid"]
-
-universeName :: Binding
-universeName = define "UniverseName" $ T.union [
-  "qualid">: coq "Qualid",
-  "set">: T.unit,
-  "prop">: T.unit]
-
--- ===========================================================================
--- Vernacular commands (for generating complete .v files)
--- ===========================================================================
-
-comment :: Binding
-comment = define "Comment" $
-  doc "A Coq comment (* ... *)" $
-  T.wrap T.string
-
-constructor :: Binding
-constructor = define "Constructor" $
-  doc "A constructor in an Inductive definition" $
-  T.record [
-    "name">: coq "Ident",
-    "binders">: T.list $ coq "Binder",
-    "type">: T.maybe $ coq "Type"]
-
-definition :: Binding
-definition = define "Definition" $
-  doc "A Definition or Let command: Definition name binders : type := term." $
-  T.record [
-    "locality">: T.maybe $ coq "Locality",
-    "name">: coq "Ident",
-    "binders">: T.list $ coq "Binder",
-    "type">: T.maybe $ coq "Type",
-    "body">: coq "Term"]
-
-document :: Binding
-document = define "Document" $
-  doc "A complete Coq .v file" $
-  T.record [
-    "sentences">: T.list $ coq "Sentence"]
-
-fixpointDefinition :: Binding
-fixpointDefinition = define "FixpointDefinition" $
-  doc "A Fixpoint command for recursive definitions" $
-  T.record [
-    "locality">: T.maybe $ coq "Locality",
-    "name">: coq "Ident",
-    "binders">: T.list $ coq "Binder",
-    "annot">: T.maybe $ coq "FixAnnot",
-    "type">: T.maybe $ coq "Type",
-    "body">: coq "Term",
-    "with">: T.list $ coq "Fix_Decl"]
-
-importQualification :: Binding
-importQualification = define "ImportQualification" $
-  doc "Qualification for Require/Import commands" $
-  T.union [
-    "import">: T.unit,
-    "export">: T.unit]
-
-inductiveBody :: Binding
-inductiveBody = define "InductiveBody" $
-  doc "A single body in an Inductive definition (supports mutual induction via 'with')" $
-  T.record [
-    "name">: coq "Ident",
-    "binders">: T.list $ coq "Binder",
-    "type">: T.maybe $ coq "Type",
-    "constructors">: T.list $ coq "Constructor"]
-
-inductiveDefinition :: Binding
-inductiveDefinition = define "InductiveDefinition" $
-  doc "An Inductive or CoInductive definition with one or more mutually inductive bodies" $
-  T.record [
-    "locality">: T.maybe $ coq "Locality",
-    "coinductive">: T.boolean,
-    "bodies">: nonemptyList $ coq "InductiveBody"]
-
-locality :: Binding
-locality = define "Locality" $
-  doc "Local or Global qualifier for commands" $
-  T.union [
-    "local">: T.unit,
-    "global">: T.unit]
-
-moduleDefinition :: Binding
-moduleDefinition = define "ModuleDefinition" $
-  doc "A Module ... End block" $
-  T.record [
-    "name">: coq "Ident",
-    "sentences">: T.list $ coq "Sentence"]
-
-notationDeclaration :: Binding
-notationDeclaration = define "NotationDeclaration" $
-  doc "A Notation declaration" $
-  T.record [
-    "notation">: coq "String",
-    "definition">: coq "Term",
-    "level">: T.maybe $ coq "Natural",
-    "associativity">: T.maybe T.string]
-
-recordBody :: Binding
-recordBody = define "RecordBody" $
-  doc "The body of a Record definition" $
-  T.record [
-    "constructor">: T.maybe $ coq "Ident",
-    "fields">: T.list $ coq "RecordField"]
-
-recordDefinition :: Binding
-recordDefinition = define "RecordDefinition" $
-  doc "A Record or Structure definition" $
-  T.record [
-    "locality">: T.maybe $ coq "Locality",
-    "name">: coq "Ident",
-    "binders">: T.list $ coq "Binder",
-    "sort">: T.maybe $ coq "Sort",
-    "body">: coq "RecordBody"]
-
-recordField :: Binding
-recordField = define "RecordField" $
-  doc "A field in a Record definition" $
-  T.record [
-    "name">: coq "Ident",
-    "type">: coq "Type"]
-
-requireImport :: Binding
-requireImport = define "RequireImport" $
-  doc "A Require Import/Export command" $
-  T.record [
-    "from">: T.maybe $ coq "Qualid",
-    "require">: T.boolean,
-    "qualification">: T.maybe $ coq "ImportQualification",
-    "modules">: nonemptyList $ coq "Qualid"]
-
-sectionDefinition :: Binding
-sectionDefinition = define "SectionDefinition" $
-  doc "A Section ... End block" $
-  T.record [
-    "name">: coq "Ident",
-    "sentences">: T.list $ coq "Sentence"]
-
-sentence :: Binding
-sentence = define "Sentence" $
-  doc "A top-level sentence in a Coq document, optionally preceded by a comment" $
-  T.record [
-    "comment">: T.maybe $ coq "Comment",
-    "content">: coq "SentenceContent"]
-
-sentenceContent :: Binding
-sentenceContent = define "SentenceContent" $
-  doc "The content of a top-level sentence" $
-  T.union [
-    "axiom">: coq "AxiomDeclaration",
-    "definition">: coq "Definition",
-    "fixpoint">: coq "FixpointDefinition",
-    "inductive">: coq "InductiveDefinition",
-    "module">: coq "ModuleDefinition",
-    "notation">: coq "NotationDeclaration",
-    "record">: coq "RecordDefinition",
-    "requireImport">: coq "RequireImport",
-    "section">: coq "SectionDefinition",
-    "theorem">: coq "TheoremBody"]
-
-theoremBody :: Binding
-theoremBody = define "TheoremBody" $
-  doc "A Theorem/Lemma/Proposition with a proof term" $
-  T.record [
-    "kind">: coq "TheoremKind",
-    "name">: coq "Ident",
-    "binders">: T.list $ coq "Binder",
-    "type">: coq "Type",
-    "proof">: coq "Term"]
-
-theoremKind :: Binding
-theoremKind = define "TheoremKind" $
-  doc "The kind of theorem command" $
-  T.union [
-    "theorem">: T.unit,
-    "lemma">: T.unit,
-    "proposition">: T.unit,
-    "corollary">: T.unit,
-    "example">: T.unit]
diff --git a/src/main/haskell/Hydra/Sources/Coq/Utils.hs b/src/main/haskell/Hydra/Sources/Coq/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Coq/Utils.hs
+++ /dev/null
@@ -1,1165 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Pure helper functions for the Coq code generator. These were previously
--- hand-written Haskell in `heads/haskell/.../Hydra/Coq/Generate.hs`; this
--- module promotes them to DSL form so that the host-side Generate.hs shrinks
--- to an IO / per-module driver. See issue #337.
-
-module Hydra.Sources.Coq.Utils where
-
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Packaging                       as Packaging
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Coq.Language                as CoqLanguage
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.coq.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Rewriting.ns, Sorting.ns, Variables.ns, CoqLanguage.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Pure helpers for the Coq code generator"}
-  where
-    definitions = [
-      toDefinition buildConstructorCounts,
-      toDefinition buildFieldMapping,
-      toDefinition collectFreeTypeVars,
-      toDefinition collectFreeTypeVarsInType,
-      toDefinition collectFreeTypeVarsInTypeScheme,
-      toDefinition collectLetBindings,
-      toDefinition collectQualifiedNamesInTerm,
-      toDefinition collectQualifiedNamesInType,
-      toDefinition collectQualifiedNamesInTypeScheme,
-      toDefinition collectSanitizedAccessors,
-      toDefinition encodeMutualLetGroup,
-      toDefinition eraseUnboundTypeVarDomains,
-      toDefinition extractQualifiedNamespace,
-      toDefinition extractTypeParams,
-      toDefinition fieldCausesPositivityIssue,
-      toDefinition hasPositivityIssue,
-      toDefinition hasUnboundTypeVar,
-      toDefinition isTypeLambdaTerm,
-      toDefinition isTypeVarLike,
-      toDefinition localName,
-      toDefinition localNameRaw,
-      toDefinition moduleDependencies,
-      toDefinition normalizeInnerTypeLambdas,
-      toDefinition processLetSCCs,
-      toDefinition qualifiedFromName,
-      toDefinition rebuildLets,
-      toDefinition rebuildMutualLets,
-      toDefinition reorderLetBindings,
-      toDefinition rewriteTermFields,
-      toDefinition sanitize,
-      toDefinition sanitizePositivity,
-      toDefinition sortTermDefsSCC,
-      toDefinition sortTypeDefsSCC,
-      toDefinition stripHydraFix,
-      toDefinition targetsPolyName,
-      toDefinition termRefs,
-      toDefinition typeContainsGroupRef,
-      toDefinition typeRefs,
-      toDefinition typeToTerm]
-
--- | Extract the qualified-namespace part of a Hydra Name string.
--- `"hydra.core.Term_Literal"` -> `"hydra.core"`.
--- `"hydra.lib.strings.cat"` -> `"hydra.lib.strings"`.
--- Names without at least one dot are returned unchanged.
-extractQualifiedNamespace :: TTermDefinition (String -> String)
-extractQualifiedNamespace = define "extractQualifiedNamespace" $
-  doc "Extract the namespace (everything except the last dot-separated component) from a qualified Hydra name" $
-  lambda "s" $ lets [
-    "parts">: Strings.splitOn (string ".") (var "s")] $
-    Logic.ifElse (Equality.gte (Lists.length (var "parts")) (int32 2))
-      (Strings.intercalate (string ".") (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts"))))
-      (var "s")
-
--- | Extract the leading forall-bound parameter names from a type, returning
--- the remaining body.
-extractTypeParams :: TTermDefinition (Type -> ([String], Type))
-extractTypeParams = define "extractTypeParams" $
-  doc "Peel off leading forall binders, returning the list of parameter names and the inner body type" $
-  lambda "ty" $ cases _Type (var "ty") (Just (pair (list ([] :: [TTerm String])) (var "ty"))) [
-    _Type_forall>>: "ft" ~> lets [
-      "param">: unwrap _Name @@ (Core.forallTypeParameter $ var "ft"),
-      "rest">: extractTypeParams @@ (Core.forallTypeBody $ var "ft")] $
-      pair (Lists.cons (var "param") (Pairs.first $ var "rest")) (Pairs.second $ var "rest"),
-    _Type_annotated>>: "at" ~>
-      extractTypeParams @@ (Core.annotatedTypeBody $ var "at")]
-
--- | Does a name look like a Hydra-generated type variable (`t0`, `t1`, ...)?
-isTypeVarLike :: TTermDefinition (String -> Bool)
-isTypeVarLike = define "isTypeVarLike" $
-  doc "Return True if the string is of the form `t<digits>` with at least one digit" $
-  lambda "s" $ lets [
-    "chars">: Strings.toList (var "s")] $
-    Maybes.fromMaybe (boolean False) (Maybes.map
-      (lambda "p" $ lets [
-        "firstCh">: Pairs.first (var "p"),
-        "rest">: Pairs.second (var "p")] $
-        Logic.ifElse (Logic.not (Equality.equal (var "firstCh") (int32 116)))
-          (boolean False)
-          (Logic.and (Logic.not (Lists.null (var "rest")))
-                    (Lists.foldl
-                      (lambdas ["acc", "c"] $ Logic.and (var "acc")
-                        (Logic.and (Equality.gte (var "c") (int32 48))
-                                   (Equality.lte (var "c") (int32 57))))
-                      (boolean True)
-                      (var "rest"))))
-      (Lists.uncons (var "chars")))
-
--- | Take the last dot-separated segment of a qualified Hydra name and sanitise
--- it against Coq's stripped-reserved-words list.
-localName :: TTermDefinition (String -> String)
-localName = define "localName" $
-  doc "Return the last dot-separated segment of a qualified Hydra name, sanitised via `sanitize`" $
-  lambda "s" $ lets [
-    "parts">: Strings.splitOn (string ".") (var "s"),
-    "raw">: Maybes.fromMaybe (var "s") (Lists.maybeLast (var "parts"))] $
-    sanitize @@ var "raw"
-
--- | Sanitise a name that appears in a stripped-local reference position: if it
--- collides with a Coq reserved word, append an underscore.
-sanitize :: TTermDefinition (String -> String)
-sanitize = define "sanitize" $
-  doc "Escape a stripped local name against Coq's stripped reserved-words set" $
-  lambda "s" $ Formatting.escapeWithUnderscore @@ CoqLanguage.coqStrippedReservedWords @@ var "s"
-
--- | Build a map from union-type name to the number of its constructors. Used
--- by the encoder's union-eliminator to decide whether a match is exhaustive.
-buildConstructorCounts :: TTermDefinition ([(String, Type)] -> M.Map String I.Int32)
-buildConstructorCounts = define "buildConstructorCounts" $
-  doc "Build a map from each union-type definition's name to its constructor count" $
-  lambda "defs" $ Maps.fromList $ Lists.concat $
-    Lists.map (lambda "nt" $ lets [
-      "name">: Pairs.first (var "nt"),
-      "ty">: Pairs.second (var "nt"),
-      "extracted">: extractTypeParams @@ var "ty",
-      "bodyTy">: Pairs.second (var "extracted")] $
-      cases _Type (var "bodyTy") (Just $ list ([] :: [TTerm (String, I.Int32)])) [
-        _Type_union>>: "fields" ~>
-          list [pair (var "name") (Lists.length $ var "fields")]])
-    (var "defs")
-
--- | Return a singleton set containing the given Name's raw string iff it begins
--- with `"hydra."`; empty set otherwise.
-qualifiedFromName :: TTermDefinition (Name -> S.Set String)
-qualifiedFromName = define "qualifiedFromName" $
-  doc "Wrap a Hydra Name as a singleton set of its raw string, iff it is a qualified (hydra.*) reference" $
-  lambda "n" $ lets [
-    "raw">: unwrap _Name @@ var "n",
-    "parts">: Strings.splitOn (string ".") (var "raw")] $
-    Logic.ifElse (Logic.and
-        (Equality.gte (Lists.length (var "parts")) (int32 2))
-        (Equality.equal (Maybes.fromMaybe (string "") (Lists.maybeHead (var "parts"))) (string "hydra")))
-      (Sets.singleton (var "raw"))
-      (Sets.empty :: TTerm (S.Set String))
-
--- | Walk a Hydra Type and collect every Name occurrence that begins with
--- `"hydra."` (a qualified cross-module reference).
-collectQualifiedNamesInType :: TTermDefinition (Type -> S.Set String)
-collectQualifiedNamesInType = define "collectQualifiedNamesInType" $
-  doc "Collect the set of qualified (hydra.*) Name strings that a Hydra Type references" $
-  lambda "ty" $ cases _Type (var "ty") (Just (Sets.empty :: TTerm (S.Set String))) [
-    _Type_annotated>>: "at" ~>
-      collectQualifiedNamesInType @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~> Sets.union
-      (collectQualifiedNamesInType @@ (Core.applicationTypeFunction $ var "app"))
-      (collectQualifiedNamesInType @@ (Core.applicationTypeArgument $ var "app")),
-    _Type_either>>: "et" ~> Sets.union
-      (collectQualifiedNamesInType @@ (Core.eitherTypeLeft $ var "et"))
-      (collectQualifiedNamesInType @@ (Core.eitherTypeRight $ var "et")),
-    _Type_forall>>: "ft" ~>
-      collectQualifiedNamesInType @@ (Core.forallTypeBody $ var "ft"),
-    _Type_function>>: "ft" ~> Sets.union
-      (collectQualifiedNamesInType @@ (Core.functionTypeDomain $ var "ft"))
-      (collectQualifiedNamesInType @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_list>>: "t" ~> collectQualifiedNamesInType @@ var "t",
-    _Type_map>>: "mt" ~> Sets.union
-      (collectQualifiedNamesInType @@ (Core.mapTypeKeys $ var "mt"))
-      (collectQualifiedNamesInType @@ (Core.mapTypeValues $ var "mt")),
-    _Type_maybe>>: "t" ~> collectQualifiedNamesInType @@ var "t",
-    _Type_pair>>: "pt" ~> Sets.union
-      (collectQualifiedNamesInType @@ (Core.pairTypeFirst $ var "pt"))
-      (collectQualifiedNamesInType @@ (Core.pairTypeSecond $ var "pt")),
-    _Type_record>>: "fields" ~> Sets.unions $
-      Lists.map (lambda "f" $ collectQualifiedNamesInType @@ (Core.fieldTypeType $ var "f")) (var "fields"),
-    _Type_set>>: "t" ~> collectQualifiedNamesInType @@ var "t",
-    _Type_union>>: "fields" ~> Sets.unions $
-      Lists.map (lambda "f" $ collectQualifiedNamesInType @@ (Core.fieldTypeType $ var "f")) (var "fields"),
-    _Type_variable>>: "n" ~> qualifiedFromName @@ var "n",
-    _Type_wrap>>: "wt" ~> collectQualifiedNamesInType @@ var "wt"]
-
--- | Walk a Hydra Term and collect every qualified Name occurrence. Also
--- recurses into type annotations and type applications so that qualified
--- type-level references are picked up.
-collectQualifiedNamesInTerm :: TTermDefinition (Term -> S.Set String)
-collectQualifiedNamesInTerm = define "collectQualifiedNamesInTerm" $
-  doc "Collect the set of qualified (hydra.*) Name strings that a Hydra Term references" $
-  lambda "tm" $ cases _Term (var "tm") (Just (Sets.empty :: TTerm (S.Set String))) [
-    _Term_annotated>>: "at" ~>
-      collectQualifiedNamesInTerm @@ (Core.annotatedTermBody $ var "at"),
-    _Term_application>>: "app" ~> Sets.union
-      (collectQualifiedNamesInTerm @@ (Core.applicationFunction $ var "app"))
-      (collectQualifiedNamesInTerm @@ (Core.applicationArgument $ var "app")),
-    _Term_cases>>: "cs" ~> Sets.union
-      (qualifiedFromName @@ (Core.caseStatementTypeName $ var "cs"))
-      (Sets.union
-        (Sets.unions $ Lists.map
-          (lambda "f" $ collectQualifiedNamesInTerm @@ (Core.fieldTerm $ var "f"))
-          (Core.caseStatementCases $ var "cs"))
-        (Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-          (lambda "d" $ collectQualifiedNamesInTerm @@ var "d")
-          (Core.caseStatementDefault $ var "cs"))),
-    _Term_either>>: "e" ~> Eithers.either_
-      (lambda "l" $ collectQualifiedNamesInTerm @@ var "l")
-      (lambda "r" $ collectQualifiedNamesInTerm @@ var "r")
-      (var "e"),
-    _Term_inject>>: "inj" ~> Sets.union
-      (qualifiedFromName @@ (Core.injectionTypeName $ var "inj"))
-      (collectQualifiedNamesInTerm @@ (Core.fieldTerm $ Core.injectionField $ var "inj")),
-    _Term_lambda>>: "lam" ~> Sets.union
-      (Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-        (lambda "domTy" $ collectQualifiedNamesInType @@ var "domTy")
-        (Core.lambdaDomain $ var "lam"))
-      (collectQualifiedNamesInTerm @@ (Core.lambdaBody $ var "lam")),
-    _Term_let>>: "lt" ~> Sets.union
-      (Sets.unions $ Lists.map
-        (lambda "b" $ collectQualifiedNamesInTerm @@ (Core.bindingTerm $ var "b"))
-        (Core.letBindings $ var "lt"))
-      (collectQualifiedNamesInTerm @@ (Core.letBody $ var "lt")),
-    _Term_list>>: "xs" ~> Sets.unions $
-      Lists.map (lambda "el" $ collectQualifiedNamesInTerm @@ var "el") (var "xs"),
-    _Term_maybe>>: "mt" ~> Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-      (lambda "el" $ collectQualifiedNamesInTerm @@ var "el")
-      (var "mt"),
-    _Term_pair>>: "p" ~> Sets.union
-      (collectQualifiedNamesInTerm @@ Pairs.first (var "p"))
-      (collectQualifiedNamesInTerm @@ Pairs.second (var "p")),
-    _Term_record>>: "r" ~> Sets.union
-      (qualifiedFromName @@ (Core.recordTypeName $ var "r"))
-      (Sets.unions $ Lists.map
-        (lambda "f" $ collectQualifiedNamesInTerm @@ (Core.fieldTerm $ var "f"))
-        (Core.recordFields $ var "r")),
-    _Term_typeApplication>>: "ta" ~> Sets.union
-      (collectQualifiedNamesInTerm @@ (Core.typeApplicationTermBody $ var "ta"))
-      (collectQualifiedNamesInType @@ (Core.typeApplicationTermType $ var "ta")),
-    _Term_typeLambda>>: "tl" ~>
-      collectQualifiedNamesInTerm @@ (Core.typeLambdaBody $ var "tl"),
-    _Term_variable>>: "n" ~> qualifiedFromName @@ var "n",
-    _Term_wrap>>: "wt" ~>
-      collectQualifiedNamesInTerm @@ (Core.wrappedTermBody $ var "wt")]
-
--- | Walk a Hydra TypeScheme, collecting qualified Names from its body type.
-collectQualifiedNamesInTypeScheme :: TTermDefinition (TypeScheme -> S.Set String)
-collectQualifiedNamesInTypeScheme = define "collectQualifiedNamesInTypeScheme" $
-  doc "Collect qualified (hydra.*) Name strings from a TypeScheme's body, after stripping forall binders" $
-  lambda "ts" $ lets [
-    "extracted">: extractTypeParams @@ (Core.typeSchemeBody $ var "ts"),
-    "body">: Pairs.second (var "extracted")] $
-    collectQualifiedNamesInType @@ var "body"
-
--- | Extract the set of local type names (sanitised-local forms) that a Hydra
--- Type refers to, filtered by a provided set of locally-defined names. Used to
--- build the dependency graph for SCC-based mutual-recursion detection in type
--- definitions.
-typeRefs :: TTermDefinition (S.Set String -> Type -> S.Set String)
-typeRefs = define "typeRefs" $
-  doc "Walk a Type and collect the local names it references, intersected with the given locally-defined names" $
-  lambdas ["locals", "ty"] $ cases _Type (var "ty") (Just (Sets.empty :: TTerm (S.Set String))) [
-    _Type_annotated>>: "at" ~>
-      typeRefs @@ var "locals" @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~> Sets.union
-      (typeRefs @@ var "locals" @@ (Core.applicationTypeFunction $ var "app"))
-      (typeRefs @@ var "locals" @@ (Core.applicationTypeArgument $ var "app")),
-    _Type_either>>: "et" ~> Sets.union
-      (typeRefs @@ var "locals" @@ (Core.eitherTypeLeft $ var "et"))
-      (typeRefs @@ var "locals" @@ (Core.eitherTypeRight $ var "et")),
-    _Type_forall>>: "ft" ~>
-      typeRefs @@ var "locals" @@ (Core.forallTypeBody $ var "ft"),
-    _Type_function>>: "ft" ~> Sets.union
-      (typeRefs @@ var "locals" @@ (Core.functionTypeDomain $ var "ft"))
-      (typeRefs @@ var "locals" @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_list>>: "t" ~> typeRefs @@ var "locals" @@ var "t",
-    _Type_map>>: "mt" ~> Sets.union
-      (typeRefs @@ var "locals" @@ (Core.mapTypeKeys $ var "mt"))
-      (typeRefs @@ var "locals" @@ (Core.mapTypeValues $ var "mt")),
-    _Type_maybe>>: "t" ~> typeRefs @@ var "locals" @@ var "t",
-    _Type_pair>>: "pt" ~> Sets.union
-      (typeRefs @@ var "locals" @@ (Core.pairTypeFirst $ var "pt"))
-      (typeRefs @@ var "locals" @@ (Core.pairTypeSecond $ var "pt")),
-    _Type_record>>: "fields" ~> Sets.unions $
-      Lists.map (lambda "f" $ typeRefs @@ var "locals" @@ (Core.fieldTypeType $ var "f")) (var "fields"),
-    _Type_set>>: "t" ~> typeRefs @@ var "locals" @@ var "t",
-    _Type_union>>: "fields" ~> Sets.unions $
-      Lists.map (lambda "f" $ typeRefs @@ var "locals" @@ (Core.fieldTypeType $ var "f")) (var "fields"),
-    _Type_variable>>: "n" ~> lets [
-      "local">: localName @@ (unwrap _Name @@ var "n")] $
-      Logic.ifElse (Sets.member (var "local") (var "locals"))
-        (Sets.singleton (var "local"))
-        (Sets.empty :: TTerm (S.Set String)),
-    _Type_wrap>>: "wt" ~> typeRefs @@ var "locals" @@ var "wt"]
-
--- | Walk a Term collecting local name references, filtered by a provided set
--- of locally-defined names.
-termRefs :: TTermDefinition (S.Set String -> Term -> S.Set String)
-termRefs = define "termRefs" $
-  doc "Walk a Term and collect the local names it references, intersected with the given locally-defined names" $
-  lambdas ["locals", "tm"] $ cases _Term (var "tm") (Just (Sets.empty :: TTerm (S.Set String))) [
-    _Term_annotated>>: "at" ~>
-      termRefs @@ var "locals" @@ (Core.annotatedTermBody $ var "at"),
-    _Term_application>>: "app" ~> Sets.union
-      (termRefs @@ var "locals" @@ (Core.applicationFunction $ var "app"))
-      (termRefs @@ var "locals" @@ (Core.applicationArgument $ var "app")),
-    _Term_cases>>: "cs" ~> Sets.union
-      (Sets.unions $ Lists.map
-        (lambda "f" $ termRefs @@ var "locals" @@ (Core.fieldTerm $ var "f"))
-        (Core.caseStatementCases $ var "cs"))
-      (Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-        (lambda "d" $ termRefs @@ var "locals" @@ var "d")
-        (Core.caseStatementDefault $ var "cs")),
-    _Term_either>>: "e" ~> Eithers.either_
-      (lambda "l" $ termRefs @@ var "locals" @@ var "l")
-      (lambda "r" $ termRefs @@ var "locals" @@ var "r")
-      (var "e"),
-    _Term_inject>>: "inj" ~>
-      termRefs @@ var "locals" @@ (Core.fieldTerm $ Core.injectionField $ var "inj"),
-    _Term_lambda>>: "lam" ~>
-      termRefs @@ var "locals" @@ (Core.lambdaBody $ var "lam"),
-    _Term_let>>: "lt" ~> Sets.union
-      (Sets.unions $ Lists.map
-        (lambda "b" $ termRefs @@ var "locals" @@ (Core.bindingTerm $ var "b"))
-        (Core.letBindings $ var "lt"))
-      (termRefs @@ var "locals" @@ (Core.letBody $ var "lt")),
-    _Term_list>>: "xs" ~> Sets.unions $
-      Lists.map (lambda "el" $ termRefs @@ var "locals" @@ var "el") (var "xs"),
-    _Term_maybe>>: "mt" ~> Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-      (lambda "el" $ termRefs @@ var "locals" @@ var "el")
-      (var "mt"),
-    _Term_pair>>: "p" ~> Sets.union
-      (termRefs @@ var "locals" @@ Pairs.first (var "p"))
-      (termRefs @@ var "locals" @@ Pairs.second (var "p")),
-    _Term_record>>: "r" ~> Sets.unions $
-      Lists.map
-        (lambda "f" $ termRefs @@ var "locals" @@ (Core.fieldTerm $ var "f"))
-        (Core.recordFields $ var "r"),
-    _Term_typeApplication>>: "ta" ~>
-      termRefs @@ var "locals" @@ (Core.typeApplicationTermBody $ var "ta"),
-    _Term_typeLambda>>: "tl" ~>
-      termRefs @@ var "locals" @@ (Core.typeLambdaBody $ var "tl"),
-    _Term_variable>>: "n" ~> lets [
-      "local">: localName @@ (unwrap _Name @@ var "n")] $
-      Logic.ifElse (Sets.member (var "local") (var "locals"))
-        (Sets.singleton (var "local"))
-        (Sets.empty :: TTerm (S.Set String)),
-    _Term_wrap>>: "wt" ~>
-      termRefs @@ var "locals" @@ (Core.wrappedTermBody $ var "wt")]
-
--- | Collect the dependency namespaces of a Hydra Module: the union of its
--- type and term dependency namespaces, minus the module's own namespace,
--- deduplicated while preserving first-occurrence order.
-moduleDependencies :: TTermDefinition (Module -> [String])
-moduleDependencies = define "moduleDependencies" $
-  doc "Return the deduplicated list of dependency namespace strings for a Module, excluding its own namespace" $
-  lambda "m" $ lets [
-    "typeDeps">: Lists.map (lambda "ns" $ Packaging.unNamespace (var "ns")) (Packaging.moduleTypeDependencies (var "m")),
-    "termDeps">: Lists.map (lambda "ns" $ Packaging.unNamespace (var "ns")) (Packaging.moduleTermDependencies (var "m")),
-    "ownNs">: Packaging.unNamespace (Packaging.moduleNamespace (var "m")),
-    "allDeps">: Lists.concat2 (var "typeDeps") (var "termDeps"),
-    "filtered">: Lists.filter (lambda "s" $ Logic.not (Equality.equal (var "s") (var "ownNs"))) (var "allDeps")] $
-    (Lists.nub :: TTerm [String] -> TTerm [String]) (var "filtered")
-
--- | Does a Type reference any type variable whose sanitized local name
--- belongs to the given set of group names? Used by the mutual-inductive
--- positivity analysis.
-typeContainsGroupRef :: TTermDefinition (S.Set String -> Type -> Bool)
-typeContainsGroupRef = define "typeContainsGroupRef" $
-  doc "Return True if the Type mentions any type variable whose local name is in the given set" $
-  lambdas ["groupNames", "ty"] $ cases _Type (var "ty") (Just (boolean False)) [
-    _Type_annotated>>: "at" ~>
-      typeContainsGroupRef @@ var "groupNames" @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~> Logic.or
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.applicationTypeFunction $ var "app"))
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.applicationTypeArgument $ var "app")),
-    _Type_either>>: "et" ~> Logic.or
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.eitherTypeLeft $ var "et"))
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.eitherTypeRight $ var "et")),
-    _Type_forall>>: "ft" ~>
-      typeContainsGroupRef @@ var "groupNames" @@ (Core.forallTypeBody $ var "ft"),
-    _Type_function>>: "ft" ~> Logic.or
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.functionTypeDomain $ var "ft"))
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_list>>: "t" ~> typeContainsGroupRef @@ var "groupNames" @@ var "t",
-    _Type_map>>: "mt" ~> Logic.or
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.mapTypeKeys $ var "mt"))
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.mapTypeValues $ var "mt")),
-    _Type_maybe>>: "t" ~> typeContainsGroupRef @@ var "groupNames" @@ var "t",
-    _Type_pair>>: "pt" ~> Logic.or
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.pairTypeFirst $ var "pt"))
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.pairTypeSecond $ var "pt")),
-    _Type_set>>: "t" ~> typeContainsGroupRef @@ var "groupNames" @@ var "t",
-    _Type_variable>>: "n" ~>
-      Sets.member (localName @@ (unwrap _Name @@ var "n")) (var "groupNames"),
-    _Type_wrap>>: "wt" ~> typeContainsGroupRef @@ var "groupNames" @@ var "wt"]
-
--- | Does a field's type cause a strict-positivity violation with respect to
--- the given group? A violation occurs when any group member appears in the
--- domain of a function type, recursively descending through annotations,
--- foralls, wrappers, and function codomains.
-fieldCausesPositivityIssue :: TTermDefinition (S.Set String -> Type -> Bool)
-fieldCausesPositivityIssue = define "fieldCausesPositivityIssue" $
-  doc "Return True if the field type contains a function whose domain mentions a group member" $
-  lambdas ["groupNames", "fty"] $ cases _Type (var "fty") (Just (boolean False)) [
-    _Type_function>>: "ft" ~> Logic.or
-      (typeContainsGroupRef @@ var "groupNames" @@ (Core.functionTypeDomain $ var "ft"))
-      (fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_annotated>>: "at" ~>
-      fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_forall>>: "ft" ~>
-      fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.forallTypeBody $ var "ft"),
-    _Type_wrap>>: "wt" ~>
-      fieldCausesPositivityIssue @@ var "groupNames" @@ var "wt"]
-
--- | Does a mutual group of type definitions contain any field that causes a
--- strict-positivity violation?
-hasPositivityIssue :: TTermDefinition (S.Set String -> [(String, Type)] -> Bool)
-hasPositivityIssue = define "hasPositivityIssue" $
-  doc "Return True if any definition in the group has a record/union field whose type causes a positivity violation" $
-  lambdas ["groupNames", "defs"] $
-    Lists.foldl
-      (lambdas ["acc", "nt"] $ Logic.or (var "acc") $ lets [
-        "ty">: Pairs.second (var "nt"),
-        "extracted">: extractTypeParams @@ var "ty",
-        "bodyTy">: Pairs.second (var "extracted")] $
-        cases _Type (var "bodyTy") (Just (boolean False)) [
-          _Type_record>>: "fields" ~>
-            Lists.foldl
-              (lambdas ["acc2", "f"] $ Logic.or (var "acc2")
-                (fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.fieldTypeType $ var "f")))
-              (boolean False)
-              (var "fields"),
-          _Type_union>>: "fields" ~>
-            Lists.foldl
-              (lambdas ["acc2", "f"] $ Logic.or (var "acc2")
-                (fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.fieldTypeType $ var "f")))
-              (boolean False)
-              (var "fields")])
-      (boolean False)
-      (var "defs")
-
--- | Replace positivity-violating fields with `unit`, re-wrapping any forall
--- binders. Used to allow otherwise mutually recursive Coq Inductive groups to
--- type-check. The generated accessor becomes a dummy that callers replace
--- with `hydra_unreachable`; see `collectSanitizedAccessors`.
-sanitizePositivity :: TTermDefinition (S.Set String -> Type -> Type)
-sanitizePositivity = define "sanitizePositivity" $
-  doc "Rewrite a Type, replacing offending record/union fields with TypeUnit and restoring forall binders" $
-  lambdas ["groupNames", "ty"] $ lets [
-    "extracted">: extractTypeParams @@ var "ty",
-    "params">: Pairs.first (var "extracted"),
-    "bodyTy">: Pairs.second (var "extracted"),
-    "sanitizeField">: lambda "f" $
-      Logic.ifElse (fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.fieldTypeType $ var "f"))
-        (Core.fieldType (Core.fieldTypeName $ var "f") (Core.typeUnit))
-        (var "f"),
-    "sanitized">: cases _Type (var "bodyTy") (Just (var "bodyTy")) [
-      _Type_record>>: "fields" ~>
-        Core.typeRecord (Lists.map (var "sanitizeField") (var "fields")),
-      _Type_union>>: "fields" ~>
-        Core.typeUnion (Lists.map (var "sanitizeField") (var "fields"))]] $
-    Lists.foldr
-      (lambdas ["p", "t"] $ Core.typeForall (Core.forallType (wrap _Name (var "p")) (var "t")))
-      (var "sanitized")
-      (var "params")
-
--- | Collect the names of accessor functions generated for fields that were
--- sanitized away due to positivity issues. These names look like
--- `typeName_fieldName` (with the type name decapitalized and the field name
--- sanitized against Coq reserved words). The Coq encoder replaces references
--- to these accessors with `hydra_unreachable`.
-collectSanitizedAccessors :: TTermDefinition ([(Bool, [(String, Type)])] -> S.Set String)
-collectSanitizedAccessors = define "collectSanitizedAccessors" $
-  doc "Return the set of decapitalized, sanitized accessor names whose fields were replaced with unit due to positivity issues" $
-  lambda "typeGroups" $ Sets.fromList $ Lists.concat $
-    Lists.map (lambda "group" $ lets [
-      "defs">: Pairs.second (var "group"),
-      "groupNames">: Sets.fromList $ Lists.map (lambda "nt" $ Pairs.first (var "nt")) (var "defs")] $
-      Logic.ifElse (hasPositivityIssue @@ var "groupNames" @@ var "defs")
-        (Lists.concat $ Lists.map (lambda "nt" $ lets [
-          "typeName">: Pairs.first (var "nt"),
-          "ty">: Pairs.second (var "nt"),
-          "extracted">: extractTypeParams @@ var "ty",
-          "bodyTy">: Pairs.second (var "extracted")] $
-          cases _Type (var "bodyTy") (Just $ list ([] :: [TTerm String])) [
-            _Type_record>>: "fields" ~>
-              Maybes.cat $ Lists.map (lambda "f" $
-                Logic.ifElse (fieldCausesPositivityIssue @@ var "groupNames" @@ (Core.fieldTypeType $ var "f"))
-                  (Phantoms.just $ Strings.cat (list [
-                    Formatting.decapitalize @@ var "typeName",
-                    string "_",
-                    sanitize @@ (localName @@ (unwrap _Name @@ (Core.fieldTypeName $ var "f")))]))
-                  (Phantoms.nothing :: TTerm (Maybe String)))
-                (var "fields")]) (var "defs"))
-        (list ([] :: [TTerm String])))
-      (var "typeGroups")
-
--- | Take the last dot-separated segment of a qualified Hydra name, without
--- sanitizing it against Coq reserved words. Used when the raw field name is
--- needed as a map key; contrast with `localName` which sanitizes.
-localNameRaw :: TTermDefinition (String -> String)
-localNameRaw = define "localNameRaw" $
-  doc "Return the last dot-separated segment of a qualified Hydra name, unsanitized" $
-  lambda "s" $ lets [
-    "parts">: Strings.splitOn (string ".") (var "s")] $
-    Maybes.fromMaybe (var "s") (Lists.maybeLast (var "parts"))
-
--- | Build a map from (qualifiedTypeName, bareFieldName) to a prefixed field
--- name like `typeName_fieldName`. Used to disambiguate Coq record accessor
--- names across a multi-module kernel where plain Hydra field names collide.
-buildFieldMapping :: TTermDefinition ([Module] -> M.Map (String, String) String)
-buildFieldMapping = define "buildFieldMapping" $
-  doc "Build a map keyed by (qualifiedTypeName, rawFieldName) producing the prefixed Coq accessor name" $
-  lambda "modules" $ Maps.fromList $ Lists.concat $
-    Lists.map (lambda "m" $ Lists.concat $
-      Lists.map (lambda "def_" $
-        cases _Definition (var "def_") (Just $ list ([] :: [TTerm ((String, String), String)])) [
-          _Definition_type>>: "td" ~> lets [
-            "qname">: unwrap _Name @@ (Packaging.typeDefinitionName $ var "td"),
-            "tname">: localName @@ var "qname",
-            "ty">: Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme $ var "td"),
-            "extracted">: extractTypeParams @@ var "ty",
-            "bodyTy">: Pairs.second (var "extracted")] $
-            cases _Type (var "bodyTy") (Just $ list ([] :: [TTerm ((String, String), String)])) [
-              _Type_record>>: "fields" ~> Lists.map (lambda "ft" $ lets [
-                "rawFn">: localNameRaw @@ (unwrap _Name @@ (Core.fieldTypeName $ var "ft")),
-                "fn">: sanitize @@ var "rawFn",
-                "prefixed">: Strings.cat (list [
-                  Formatting.decapitalize @@ var "tname",
-                  string "_",
-                  var "fn"])] $
-                pair (pair (var "qname") (var "rawFn")) (var "prefixed")) (var "fields")]])
-        (Packaging.moduleDefinitions $ var "m"))
-      (var "modules")
-
--- | Rewrite all TermProject nodes in a term, replacing each field name with
--- its prefixed form from the supplied mapping. Leaves unmapped projections
--- untouched. Recurses over all subterms via `Rewriting.rewriteTerm`.
-rewriteTermFields :: TTermDefinition (M.Map (String, String) String -> Term -> Term)
-rewriteTermFields = define "rewriteTermFields" $
-  doc "Replace field names in TermProject nodes using the given (typeName, rawFieldName) -> prefixedName map" $
-  lambdas ["fm", "term0"] $ lets [
-    "rewrite">: lambdas ["recurse", "term"] $
-      cases _Term (var "term") (Just $ var "recurse" @@ var "term") [
-        _Term_project>>: "p" ~> lets [
-          "tname">: unwrap _Name @@ (Core.projectionTypeName $ var "p"),
-          "rawFn">: localNameRaw @@ (unwrap _Name @@ (Core.projectionField $ var "p")),
-          "key">: pair (var "tname") (var "rawFn"),
-          "newFname">: Maybes.fromMaybe (Core.projectionField $ var "p")
-            (Maybes.map (lambda "s" $ wrap _Name (var "s")) (Maps.lookup (var "key") (var "fm")))] $
-          Core.termProject $ Core.projection
-            (Core.projectionTypeName $ var "p")
-            (var "newFname")]] $
-    Rewriting.rewriteTerm @@ var "rewrite" @@ var "term0"
-
--- | Collect free type-variable-like names (e.g. `t0`, `t1`) from a Type.
--- Used by the inner-term transformations to detect type parameters that
--- escape their binders and must be rebound at a higher forall.
-collectFreeTypeVarsInType :: TTermDefinition (Type -> S.Set String)
-collectFreeTypeVarsInType = define "collectFreeTypeVarsInType" $
-  doc "Collect names of type-variable-like references (t0, t1, ...) inside a Type" $
-  lambda "ty" $ cases _Type (var "ty") (Just (Sets.empty :: TTerm (S.Set String))) [
-    _Type_annotated>>: "at" ~>
-      collectFreeTypeVarsInType @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~> Sets.union
-      (collectFreeTypeVarsInType @@ (Core.applicationTypeFunction $ var "app"))
-      (collectFreeTypeVarsInType @@ (Core.applicationTypeArgument $ var "app")),
-    _Type_forall>>: "ft" ~>
-      collectFreeTypeVarsInType @@ (Core.forallTypeBody $ var "ft"),
-    _Type_function>>: "ft" ~> Sets.union
-      (collectFreeTypeVarsInType @@ (Core.functionTypeDomain $ var "ft"))
-      (collectFreeTypeVarsInType @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_list>>: "t" ~> collectFreeTypeVarsInType @@ var "t",
-    _Type_map>>: "mt" ~> Sets.union
-      (collectFreeTypeVarsInType @@ (Core.mapTypeKeys $ var "mt"))
-      (collectFreeTypeVarsInType @@ (Core.mapTypeValues $ var "mt")),
-    _Type_maybe>>: "t" ~> collectFreeTypeVarsInType @@ var "t",
-    _Type_pair>>: "pt" ~> Sets.union
-      (collectFreeTypeVarsInType @@ (Core.pairTypeFirst $ var "pt"))
-      (collectFreeTypeVarsInType @@ (Core.pairTypeSecond $ var "pt")),
-    _Type_record>>: "fields" ~> Sets.unions $
-      Lists.map (lambda "f" $ collectFreeTypeVarsInType @@ (Core.fieldTypeType $ var "f")) (var "fields"),
-    _Type_set>>: "t" ~> collectFreeTypeVarsInType @@ var "t",
-    _Type_union>>: "fields" ~> Sets.unions $
-      Lists.map (lambda "f" $ collectFreeTypeVarsInType @@ (Core.fieldTypeType $ var "f")) (var "fields"),
-    _Type_variable>>: "n" ~> lets [
-      "nm">: unwrap _Name @@ var "n"] $
-      Logic.ifElse (isTypeVarLike @@ var "nm")
-        (Sets.singleton (var "nm"))
-        (Sets.empty :: TTerm (S.Set String)),
-    _Type_wrap>>: "wt" ~> collectFreeTypeVarsInType @@ var "wt"]
-
--- | Collect free type-variable-like names from a TypeScheme: both the
--- explicitly quantified variables (if they look like `t0`) and any such
--- references inside the body type.
-collectFreeTypeVarsInTypeScheme :: TTermDefinition (TypeScheme -> S.Set String)
-collectFreeTypeVarsInTypeScheme = define "collectFreeTypeVarsInTypeScheme" $
-  doc "Collect type-variable-like names declared or referenced by a TypeScheme" $
-  lambda "ts" $ lets [
-    "explicit">: Sets.fromList $ Lists.map (lambda "n" $ unwrap _Name @@ var "n") $
-      Lists.filter (lambda "n" $ isTypeVarLike @@ (unwrap _Name @@ var "n"))
-        (Core.typeSchemeVariables $ var "ts")] $
-    Sets.union (var "explicit") (collectFreeTypeVarsInType @@ (Core.typeSchemeBody $ var "ts"))
-
--- | Collect all free type-variable-like names referenced inside a Term,
--- recursing through lambda domains, type applications, let binding type
--- schemes, etc. Binding occurrences remove the bound name from the result
--- (both type lambdas and term lambdas whose parameter looks like `t<n>`).
-collectFreeTypeVars :: TTermDefinition (Term -> S.Set String)
-collectFreeTypeVars = define "collectFreeTypeVars" $
-  doc "Collect the set of free type-variable-like names (t0, t1, ...) referenced anywhere inside a Term" $
-  lambda "tm" $ cases _Term (var "tm") (Just (Sets.empty :: TTerm (S.Set String))) [
-    _Term_annotated>>: "at" ~>
-      collectFreeTypeVars @@ (Core.annotatedTermBody $ var "at"),
-    _Term_application>>: "app" ~> Sets.union
-      (collectFreeTypeVars @@ (Core.applicationFunction $ var "app"))
-      (collectFreeTypeVars @@ (Core.applicationArgument $ var "app")),
-    _Term_cases>>: "cs" ~> Sets.union
-      (Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-        (lambda "d" $ collectFreeTypeVars @@ var "d")
-        (Core.caseStatementDefault $ var "cs"))
-      (Sets.unions $ Lists.map
-        (lambda "f" $ collectFreeTypeVars @@ (Core.fieldTerm $ var "f"))
-        (Core.caseStatementCases $ var "cs")),
-    _Term_either>>: "e" ~> Eithers.either_
-      (lambda "l" $ collectFreeTypeVars @@ var "l")
-      (lambda "r" $ collectFreeTypeVars @@ var "r")
-      (var "e"),
-    _Term_inject>>: "inj" ~>
-      collectFreeTypeVars @@ (Core.fieldTerm $ Core.injectionField $ var "inj"),
-    _Term_lambda>>: "lam" ~> lets [
-      "paramName">: unwrap _Name @@ (Core.lambdaParameter $ var "lam"),
-      "domVars">: Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-        (lambda "dty" $ collectFreeTypeVarsInType @@ var "dty")
-        (Core.lambdaDomain $ var "lam"),
-      "bodyVars">: collectFreeTypeVars @@ (Core.lambdaBody $ var "lam"),
-      "allVars">: Sets.union (var "domVars") (var "bodyVars")] $
-      Logic.ifElse (isTypeVarLike @@ var "paramName")
-        (Sets.delete (var "paramName") (var "allVars"))
-        (var "allVars"),
-    _Term_let>>: "lt" ~> lets [
-      "bindVars">: Sets.unions $ Lists.map
-        (lambda "b" $ Sets.union
-          (collectFreeTypeVars @@ (Core.bindingTerm $ var "b"))
-          (Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-            (lambda "sch" $ collectFreeTypeVarsInTypeScheme @@ var "sch")
-            (Core.bindingTypeScheme $ var "b")))
-        (Core.letBindings $ var "lt")] $
-      Sets.union (var "bindVars") (collectFreeTypeVars @@ (Core.letBody $ var "lt")),
-    _Term_list>>: "xs" ~> Sets.unions $
-      Lists.map (lambda "el" $ collectFreeTypeVars @@ var "el") (var "xs"),
-    _Term_maybe>>: "mt" ~> Maybes.maybe (Sets.empty :: TTerm (S.Set String))
-      (lambda "el" $ collectFreeTypeVars @@ var "el") (var "mt"),
-    _Term_pair>>: "p" ~> Sets.union
-      (collectFreeTypeVars @@ Pairs.first (var "p"))
-      (collectFreeTypeVars @@ Pairs.second (var "p")),
-    _Term_record>>: "r" ~> Sets.unions $
-      Lists.map
-        (lambda "f" $ collectFreeTypeVars @@ (Core.fieldTerm $ var "f"))
-        (Core.recordFields $ var "r"),
-    _Term_set>>: "s" ~> Sets.unions $
-      Lists.map (lambda "el" $ collectFreeTypeVars @@ var "el") (Sets.toList $ var "s"),
-    _Term_typeApplication>>: "ta" ~>
-      collectFreeTypeVars @@ (Core.typeApplicationTermBody $ var "ta"),
-    _Term_typeLambda>>: "tl" ~>
-      Sets.delete (unwrap _Name @@ (Core.typeLambdaParameter $ var "tl"))
-        (collectFreeTypeVars @@ (Core.typeLambdaBody $ var "tl")),
-    _Term_wrap>>: "wt" ~>
-      collectFreeTypeVars @@ (Core.wrappedTermBody $ var "wt")]
-
--- | Does a Type reference any type-variable-like name (e.g. `t0`) that is
--- NOT in the given set of bound type variables?
-hasUnboundTypeVar :: TTermDefinition (S.Set String -> Type -> Bool)
-hasUnboundTypeVar = define "hasUnboundTypeVar" $
-  doc "Return True if the type mentions a t<digits> variable not present in the given set" $
-  lambdas ["bound", "ty"] $ cases _Type (var "ty") (Just (boolean False)) [
-    _Type_annotated>>: "at" ~>
-      hasUnboundTypeVar @@ var "bound" @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~> Logic.or
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.applicationTypeFunction $ var "app"))
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.applicationTypeArgument $ var "app")),
-    _Type_function>>: "ft" ~> Logic.or
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.functionTypeDomain $ var "ft"))
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.functionTypeCodomain $ var "ft")),
-    _Type_list>>: "t" ~> hasUnboundTypeVar @@ var "bound" @@ var "t",
-    _Type_map>>: "mt" ~> Logic.or
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.mapTypeKeys $ var "mt"))
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.mapTypeValues $ var "mt")),
-    _Type_maybe>>: "t" ~> hasUnboundTypeVar @@ var "bound" @@ var "t",
-    _Type_pair>>: "pt" ~> Logic.or
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.pairTypeFirst $ var "pt"))
-      (hasUnboundTypeVar @@ var "bound" @@ (Core.pairTypeSecond $ var "pt")),
-    _Type_set>>: "t" ~> hasUnboundTypeVar @@ var "bound" @@ var "t",
-    _Type_variable>>: "n" ~> lets [
-      "nm">: unwrap _Name @@ var "n"] $
-      Logic.and (isTypeVarLike @@ var "nm")
-                (Logic.not (Sets.member (var "nm") (var "bound")))]
-
--- | Erase lambda domain types that reference type-variable-like names not
--- present in the current bound set. These spurious domains are artifacts of
--- Hydra's generic type inference; erasing them lets Coq reinfer a concrete
--- domain. Term lambdas whose domain is `TypeVariable "Type"` introduce a
--- fresh type binder and extend the bound set before recursing into the body.
-eraseUnboundTypeVarDomains :: TTermDefinition (S.Set String -> Term -> Term)
-eraseUnboundTypeVarDomains = define "eraseUnboundTypeVarDomains" $
-  doc "Erase lambda domain annotations referencing unbound type variables; recurse under new type binders" $
-  "initialBound" ~> "term0" ~>
-  "eraseIfUnbound" <~ ("bound" ~> "mdom" ~>
-    Maybes.maybe (Phantoms.nothing :: TTerm (Maybe Type))
-      ("ty" ~> Logic.ifElse (hasUnboundTypeVar @@ var "bound" @@ var "ty")
-        (Phantoms.nothing :: TTerm (Maybe Type))
-        (Phantoms.just $ var "ty"))
-      (var "mdom")) $
-  "f" <~ ("recurse" ~> "bound" ~> "term" ~>
-    cases _Term (var "term") (Just $ var "recurse" @@ var "bound" @@ var "term") [
-      _Term_lambda>>: "lam" ~>
-        "paramName" <~ (unwrap _Name @@ (Core.lambdaParameter $ var "lam")) $
-        "dom" <~ (Core.lambdaDomain $ var "lam") $
-        "isTypeParam" <~ Maybes.maybe (boolean False)
-          ("d" ~> cases _Type (var "d") (Just (boolean False)) [
-            _Type_variable>>: "v" ~>
-              Equality.equal (unwrap _Name @@ var "v") (string "Type")])
-          (var "dom") $
-        "bound2" <~ Logic.ifElse
-          (Logic.and (var "isTypeParam") (isTypeVarLike @@ var "paramName"))
-          (Sets.insert (var "paramName") (var "bound"))
-          (var "bound") $
-        Core.termLambda $ Core.lambda
-          (Core.lambdaParameter $ var "lam")
-          (var "eraseIfUnbound" @@ var "bound" @@ var "dom")
-          (var "f" @@ var "recurse" @@ var "bound2" @@ (Core.lambdaBody $ var "lam"))]) $
-  Rewriting.rewriteTermWithContext @@ var "f" @@ var "initialBound" @@ var "term0"
-
--- | Is this Term a TermTypeLambda (after peeling TermAnnotated wrappers)?
--- Used to detect let-bindings whose body starts with a type lambda so that
--- the binding gets converted into a polymorphic value at Coq emission time.
-isTypeLambdaTerm :: TTermDefinition (Term -> Bool)
-isTypeLambdaTerm = define "isTypeLambdaTerm" $
-  doc "Return True if a Term (possibly under TermAnnotated wrappers) is a TermTypeLambda" $
-  lambda "tm" $ cases _Term (var "tm") (Just (boolean False)) [
-    _Term_annotated>>: "at" ~>
-      isTypeLambdaTerm @@ (Core.annotatedTermBody $ var "at"),
-    _Term_typeLambda>>: constant (boolean True)]
-
--- | Does a type application's ultimate target (after peeling TermAnnotated
--- and nested TermTypeApplication wrappers) resolve to a variable in the
--- given poly-names set?
-targetsPolyName :: TTermDefinition (S.Set String -> Term -> Bool)
-targetsPolyName = define "targetsPolyName" $
-  doc "Return True if the innermost target of a (possibly nested) type application is a poly-converted local name" $
-  lambdas ["polyNames", "tm"] $ cases _Term (var "tm") (Just (boolean False)) [
-    _Term_variable>>: "v" ~>
-      Sets.member (unwrap _Name @@ var "v") (var "polyNames"),
-    _Term_typeApplication>>: "ta" ~>
-      targetsPolyName @@ var "polyNames" @@ (Core.typeApplicationTermBody $ var "ta"),
-    _Term_annotated>>: "at" ~>
-      targetsPolyName @@ var "polyNames" @@ (Core.annotatedTermBody $ var "at")]
-
--- | Convert a Hydra Type into a Term that can be passed as an explicit type
--- argument in Coq. For aggregate types (records, unions, functions),
--- function types used as type args, and literal/unit, falls back to the
--- `unit` variable, since these are rarely used as explicit type parameters.
--- TypeForall binders are stripped; TypeAnnotated passes through.
-typeToTerm :: TTermDefinition (Type -> Term)
-typeToTerm = define "typeToTerm" $
-  doc "Convert a Hydra Type to a placeholder Term for use as an explicit Coq type argument. Coq-builtin type constructors are marked with a `Coq.` prefix so the encoder can emit them raw without going through sanitizeVar, which would clash with user-level lambda parameters of the same name (e.g. `list` -> `list_`)." $
-  lambda "ty" $ cases _Type (var "ty") (Just $ Core.termVariable (wrap _Name (string "Coq.unit"))) [
-    _Type_variable>>: "v" ~> Core.termVariable $ var "v",
-    _Type_list>>: "t" ~> Core.termApplication $ Core.application
-      (Core.termVariable (wrap _Name (string "Coq.list"))) (typeToTerm @@ var "t"),
-    _Type_maybe>>: "t" ~> Core.termApplication $ Core.application
-      (Core.termVariable (wrap _Name (string "Coq.option"))) (typeToTerm @@ var "t"),
-    _Type_set>>: "t" ~> Core.termApplication $ Core.application
-      (Core.termVariable (wrap _Name (string "Coq.list"))) (typeToTerm @@ var "t"),
-    _Type_application>>: "at" ~> Core.termApplication $ Core.application
-      (typeToTerm @@ (Core.applicationTypeFunction $ var "at"))
-      (typeToTerm @@ (Core.applicationTypeArgument $ var "at")),
-    _Type_function>>: constant (Core.termVariable $ wrap _Name (string "Coq.unit")),
-    _Type_pair>>: "pt" ~> Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable (wrap _Name (string "Coq.prod")))
-        (typeToTerm @@ (Core.pairTypeFirst $ var "pt")))
-      (typeToTerm @@ (Core.pairTypeSecond $ var "pt")),
-    _Type_map>>: "mt" ~> Core.termApplication $ Core.application
-      (Core.termVariable (wrap _Name (string "Coq.list")))
-      (Core.termApplication $ Core.application
-        (Core.termVariable (wrap _Name (string "Coq.prod")))
-        (typeToTerm @@ (Core.mapTypeKeys $ var "mt"))),
-    _Type_unit>>: constant (Core.termVariable $ wrap _Name (string "Coq.unit")),
-    _Type_literal>>: constant (Core.termVariable $ wrap _Name (string "Coq.unit")),
-    _Type_either>>: "et" ~> Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable (wrap _Name (string "Coq.sum")))
-        (typeToTerm @@ (Core.eitherTypeLeft $ var "et")))
-      (typeToTerm @@ (Core.eitherTypeRight $ var "et")),
-    _Type_record>>: constant (Core.termVariable $ wrap _Name (string "Coq.unit")),
-    _Type_union>>: constant (Core.termVariable $ wrap _Name (string "Coq.unit")),
-    _Type_wrap>>: "wt" ~> typeToTerm @@ var "wt",
-    _Type_annotated>>: "at" ~> typeToTerm @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_forall>>: "ft" ~> typeToTerm @@ (Core.forallTypeBody $ var "ft"),
-    _Type_void>>: constant (Core.termVariable $ wrap _Name (string "Coq.Empty_set"))]
-
--- | Normalize inner TermTypeLambda nodes inside a term, rewriting them as
--- regular term lambdas whose domain is `Type`. At each TermLet node, any
--- binding whose term starts with a TermTypeLambda is recorded in a
--- poly-names context and its bindingType cleared. Subsequent type
--- applications targeting those names get rewritten into term applications
--- (with `typeToTerm` producing the type argument); other type applications
--- are erased since their targets are treated as implicitly polymorphic.
--- The outer TermTypeLambda chain (matching the definition's `typeVars`) is
--- stripped and rebuilt around the transformed body so it stays intact.
-normalizeInnerTypeLambdas :: TTermDefinition (Term -> Term)
-normalizeInnerTypeLambdas = define "normalizeInnerTypeLambdas" $
-  doc "Rewrite inner TermTypeLambda nodes and type applications so that polymorphic helpers work under Coq's erasure-based encoding" $
-  "term" ~>
-  -- Strip outer TermTypeLambda chain: returns (params, innerBody).
-  "stripTypeLambdas" <~ ("tm" ~>
-    cases _Term (var "tm") (Just $ pair (list ([] :: [TTerm String])) (var "tm")) [
-      _Term_typeLambda>>: "tl" ~>
-        "rest" <~ (var "stripTypeLambdas" @@ (Core.typeLambdaBody $ var "tl")) $
-        pair
-          (Lists.cons (unwrap _Name @@ (Core.typeLambdaParameter $ var "tl"))
-                      (Pairs.first $ var "rest"))
-          (Pairs.second $ var "rest")]) $
-  -- Rebuild a TermTypeLambda chain from a list of param names wrapped around body.
-  "rebuildTypeLambdas" <~ ("params" ~> "body" ~>
-    Lists.foldr
-      ("p" ~> "acc" ~> Core.termTypeLambda $ Core.typeLambda (wrap _Name (var "p")) (var "acc"))
-      (var "body")
-      (var "params")) $
-  -- Custom rewriter: threads the set of "poly-converted" let-bound names.
-  "f" <~ ("recurse" ~> "polyNames" ~> "tm" ~>
-    cases _Term (var "tm") (Just $ var "recurse" @@ var "polyNames" @@ var "tm") [
-      _Term_let>>: "lt" ~>
-        -- Newly converted names: bindings whose term is (transitively) a TermTypeLambda.
-        "newPoly" <~ Sets.fromList (Maybes.cat $ Lists.map
-          ("b" ~> Logic.ifElse (isTypeLambdaTerm @@ (Core.bindingTerm $ var "b"))
-            (Phantoms.just $ unwrap _Name @@ (Core.bindingName $ var "b"))
-            (Phantoms.nothing :: TTerm (Maybe String)))
-          (Core.letBindings $ var "lt")) $
-        "polyNames2" <~ Sets.union (var "polyNames") (var "newPoly") $
-        Core.termLet $ Core.let_
-          (Lists.map ("b" ~> Core.binding
-            (Core.bindingName $ var "b")
-            (var "f" @@ var "recurse" @@ var "polyNames2" @@ (Core.bindingTerm $ var "b"))
-            (Logic.ifElse (isTypeLambdaTerm @@ (Core.bindingTerm $ var "b"))
-              (Phantoms.nothing :: TTerm (Maybe TypeScheme))
-              (Core.bindingTypeScheme $ var "b")))
-            (Core.letBindings $ var "lt"))
-          (var "f" @@ var "recurse" @@ var "polyNames2" @@ (Core.letBody $ var "lt")),
-      _Term_typeLambda>>: "tl" ~>
-        -- Inner type lambda (outer chain has already been stripped): convert to a
-        -- plain term lambda over the "Type" type variable, then reprocess.
-        var "f" @@ var "recurse" @@ var "polyNames" @@ (Core.termLambda $ Core.lambda
-          (Core.typeLambdaParameter $ var "tl")
-          (Phantoms.just $ Core.typeVariable (wrap _Name (string "Type")))
-          (Core.typeLambdaBody $ var "tl")),
-      _Term_typeApplication>>: "ta" ~>
-        "body" <~ (Core.typeApplicationTermBody $ var "ta") $
-        "ttype" <~ (Core.typeApplicationTermType $ var "ta") $
-        Logic.ifElse (targetsPolyName @@ var "polyNames" @@ var "body")
-          -- Poly target: reify the type argument as a term application.
-          (var "f" @@ var "recurse" @@ var "polyNames" @@ (Core.termApplication $ Core.application
-            (var "body") (typeToTerm @@ var "ttype")))
-          -- Non-poly target (library / imported): erase the type application entirely.
-          (var "f" @@ var "recurse" @@ var "polyNames" @@ var "body")]) $
-  -- Entry point: strip outer chain, transform body with empty polyNames, rebuild chain.
-  "stripped" <~ var "stripTypeLambdas" @@ var "term" $
-  "outerParams" <~ Pairs.first (var "stripped") $
-  "body0" <~ Pairs.second (var "stripped") $
-  Logic.ifElse (Lists.null (var "outerParams"))
-    (var "term")
-    (var "rebuildTypeLambdas" @@ var "outerParams" @@
-      (Rewriting.rewriteTermWithContext @@ var "f" @@ (Sets.empty :: TTerm (S.Set String)) @@ var "body0"))
-
--- | Peel off consecutive TermLet wrappers from a term, returning the flat
--- list of all their bindings (in source order) and the final innermost body.
--- Hydra emits nested single-binding lets where Haskell's mutual let would
--- have appeared, and this helper recovers the flat binding group so that
--- SCC-based reordering can be applied to it.
-collectLetBindings :: TTermDefinition (Term -> ([Binding], Term))
-collectLetBindings = define "collectLetBindings" $
-  doc "Flatten consecutive TermLet wrappers into (bindings, innermostBody)" $
-  lambda "tm" $ cases _Term (var "tm") (Just $ pair (list ([] :: [TTerm Binding])) (var "tm")) [
-    _Term_let>>: "lt" ~> lets [
-      "rest">: collectLetBindings @@ (Core.letBody $ var "lt")] $
-      pair
-        (Lists.concat2 (Core.letBindings $ var "lt") (Pairs.first $ var "rest"))
-        (Pairs.second $ var "rest")]
-
--- | Wrap each binding in its own nested TermLet, producing a sequence of
--- single-binding lets terminating in `body`.
-rebuildLets :: TTermDefinition ([Binding] -> Term -> Term)
-rebuildLets = define "rebuildLets" $
-  doc "Build a chain of single-binding TermLet wrappers around the given body" $
-  lambdas ["bindings", "body"] $
-    Lists.foldr
-      ("b" ~> "acc" ~> Core.termLet $ Core.let_ (list [var "b"]) (var "acc"))
-      (var "body")
-      (var "bindings")
-
--- | Group a list of bindings into SCC components in dependency order,
--- using topological sort over a graph whose edges are the free variables of
--- each binding's term intersected with the set of local binding names.
--- Qualified names like `hydra.foo.bar.f` are additionally matched by their
--- unqualified local part so that references inside a binding term pick up
--- the corresponding local binding even when written without a qualifier.
---
--- Note: the DSL `Sorting.topologicalSortNodes` walks vertices in map-key
--- order (alphabetical), so independent siblings come out in alphabetical
--- rather than source order. This differs from `Data.Graph.stronglyConnComp`
--- (which preserved source order) but is semantically equivalent for Coq's
--- sequential `let ... in`, and the common test suite still compiles 128/132
--- `.v` files — matching the pre-refactor baseline exactly.
-processLetSCCs :: TTermDefinition ([Binding] -> [[Binding]])
-processLetSCCs = define "processLetSCCs" $
-  doc "Sort bindings into SCC groups using free-var analysis and local-name matching" $
-  lambda "bindings" $ lets [
-    "getName">: lambda "b" $ unwrap _Name @@ (Core.bindingName $ var "b"),
-    "names">: Sets.fromList $ Lists.map (var "getName") (var "bindings"),
-    "localNames">: Sets.fromList $ Lists.map
-      (lambda "b" $ localNameRaw @@ (var "getName" @@ var "b"))
-      (var "bindings"),
-    "allNames">: Sets.union (var "names") (var "localNames"),
-    "depVars">: lambda "b" $ lets [
-      "varsName">: Variables.freeVariablesInTerm @@ (Core.bindingTerm $ var "b"),
-      "vars">: Sets.fromList $ Lists.map (lambda "n" $ unwrap _Name @@ var "n") (Sets.toList $ var "varsName"),
-      "localVars">: Sets.fromList $ Lists.map
-        (lambda "v" $ localNameRaw @@ var "v")
-        (Sets.toList $ var "vars")] $
-      Sets.toList $ Sets.intersection (var "allNames") (Sets.union (var "vars") (var "localVars"))] $
-    Sorting.topologicalSortNodes
-      @@ var "getName"
-      @@ var "depVars"
-      @@ var "bindings"
-
--- | If a term is `hydra_fix (fun innerName => body)`, return `body` with
--- free occurrences of `innerName` substituted by `bName`. Otherwise return
--- the term unchanged. Used while bundling a mutually recursive group so
--- that the outer bundle's fixpoint replaces the per-binding wrappers.
-stripHydraFix :: TTermDefinition (Name -> Term -> Term)
-stripHydraFix = define "stripHydraFix" $
-  doc "Strip an outer hydra_fix lambda wrapper, substituting the inner self-reference for the binding name" $
-  lambdas ["bName", "tm"] $ cases _Term (var "tm") (Just $ var "tm") [
-    _Term_application>>: "app" ~> lets [
-      "fn">: Core.applicationFunction $ var "app",
-      "arg">: Core.applicationArgument $ var "app"] $
-      cases _Term (var "fn") (Just $ var "tm") [
-        _Term_variable>>: "v" ~>
-          Logic.ifElse (Equality.equal (unwrap _Name @@ var "v") (string "hydra_fix"))
-            (cases _Term (var "arg") (Just $ var "tm") [
-              _Term_lambda>>: "lam" ~>
-                Variables.substituteVariable
-                  @@ (Core.lambdaParameter $ var "lam")
-                  @@ var "bName"
-                  @@ (Core.lambdaBody $ var "lam")])
-            (var "tm")]]
-
--- | Encode a mutually recursive group of let bindings via hydra_fix bundling.
--- For a group of `n` bindings, emits a single outer let binding
--- `hydra_mutual_bundle_` whose value is a `hydra_fix` over a nested pair of
--- the bindings' (stripped) terms, followed by `n` projection lets that
--- restore access to each individual binding name. See the hand-written
--- original in `heads/haskell/.../Hydra/Coq/Generate.hs` for the emitted
--- Coq shape.
-encodeMutualLetGroup :: TTermDefinition ([Binding] -> Term -> Term)
-encodeMutualLetGroup = define "encodeMutualLetGroup" $
-  doc "Wrap a mutually recursive binding group in a hydra_fix nested-pair bundle with per-name projection lets" $
-  lambdas ["grp", "body"] $
-  "n" <~ Lists.length (var "grp") $
-  "bundleName" <~ (wrap _Name (string "hydra_mutual_bundle_")) $
-  "bundleInner" <~ (wrap _Name (string "hydra_mutual_b_")) $
-  "innerBundleVar" <~ (Core.termVariable $ var "bundleInner") $
-  "outerBundleVar" <~ (Core.termVariable $ var "bundleName") $
-  -- appVar fname v = TermApplication (TermVariable fname) v
-  "appVar" <~ ("fname" ~> "v" ~> Core.termApplication $ Core.application
-    (Core.termVariable $ wrap _Name (var "fname"))
-    (var "v")) $
-  -- nestedSecond k v: apply pairs.second k times to v
-  "nestedSecond" <~ ("k" ~> "v" ~>
-    Logic.ifElse (Equality.equal (var "k") (int32 0))
-      (var "v")
-      (var "appVar" @@ (string "pairs.second") @@
-        (var "nestedSecond" @@ (Math.sub (var "k") (int32 1)) @@ var "v"))) $
-  -- mkProj bvar i: projection expression for the i-th of n bindings
-  "mkProj" <~ ("bvar" ~> "i" ~>
-    Logic.ifElse (Equality.equal (var "i") (Math.sub (var "n") (int32 1)))
-      (var "nestedSecond" @@ var "i" @@ var "bvar")
-      (var "appVar" @@ (string "pairs.first") @@
-        (var "nestedSecond" @@ var "i" @@ var "bvar"))) $
-  -- Build projection bindings for a given bundle variable
-  "mkProjBindings" <~ ("bvar" ~>
-    Lists.map ("ib" ~>
-      "i" <~ Pairs.first (var "ib") $
-      "b" <~ Pairs.second (var "ib") $
-      Core.binding
-        (Core.bindingName $ var "b")
-        (var "mkProj" @@ var "bvar" @@ var "i")
-        (Core.bindingTypeScheme $ var "b"))
-      (Lists.zip
-        (Math.range (int32 0) (Math.sub (var "n") (int32 1)))
-        (var "grp"))) $
-  "innerProjBindings" <~ (var "mkProjBindings" @@ var "innerBundleVar") $
-  "outerProjBindings" <~ (var "mkProjBindings" @@ var "outerBundleVar") $
-  -- Strip per-binding hydra_fix wrappers (they're replaced by the bundle's fixpoint)
-  "strippedBindings" <~ Lists.map
-    ("b" ~> Core.binding
-      (Core.bindingName $ var "b")
-      (stripHydraFix @@ (Core.bindingName $ var "b") @@ (Core.bindingTerm $ var "b"))
-      (Core.bindingTypeScheme $ var "b"))
-    (var "grp") $
-  -- Build a nested pair from the stripped binding terms
-  "mkPair" <~ ("ts" ~>
-    Maybes.fromMaybe (Core.termVariable $ wrap _Name (string "tt")) (Maybes.map
-      (lambda "p" $
-        Logic.ifElse (Equality.equal (Lists.length (var "ts")) (int32 1))
-          (Pairs.first (var "p"))
-          (Core.termPair $ pair
-            (Pairs.first (var "p"))
-            (var "mkPair" @@ (Pairs.second (var "p")))))
-      (Lists.uncons (var "ts")))) $
-  "pairExpr" <~ (var "mkPair" @@
-    Lists.map ("b" ~> Core.bindingTerm $ var "b") (var "strippedBindings")) $
-  "fixBody" <~ (rebuildLets @@ var "innerProjBindings" @@ var "pairExpr") $
-  "fixTerm" <~ (Core.termApplication $ Core.application
-    (Core.termVariable $ wrap _Name (string "hydra_fix"))
-    (Core.termLambda $ Core.lambda (var "bundleInner")
-      (Phantoms.nothing :: TTerm (Maybe Type))
-      (var "fixBody"))) $
-  "bundleBinding" <~ Core.binding (var "bundleName") (var "fixTerm")
-    (Phantoms.nothing :: TTerm (Maybe TypeScheme)) $
-  Core.termLet $ Core.let_
-    (list [var "bundleBinding"])
-    (rebuildLets @@ var "outerProjBindings" @@ var "body")
-
--- | Rebuild a let sequence from a list of SCC groups: each acyclic singleton
--- becomes a plain TermLet, each cyclic group is wrapped via
--- `encodeMutualLetGroup`, and groups are nested in dependency order.
-rebuildMutualLets :: TTermDefinition ([[Binding]] -> Term -> Term)
-rebuildMutualLets = define "rebuildMutualLets" $
-  doc "Rebuild a chain of TermLet/hydra_fix wrappers from SCC-sorted binding groups" $
-  lambdas ["groups", "body"] $
-    Lists.foldr
-      ("grp" ~> "acc" ~> Logic.ifElse
-        (Equality.equal (Lists.length (var "grp")) (int32 1))
-        (Core.termLet $ Core.let_ (var "grp") (var "acc"))
-        (encodeMutualLetGroup @@ var "grp" @@ var "acc"))
-      (var "body")
-      (var "groups")
-
--- | Reorder let bindings within a term so that dependencies precede
--- dependents, matching Coq's sequential `let ... in`. At each TermLet node
--- the full chain of nested lets is flattened, grouped into SCCs by
--- free-variable analysis, and rebuilt. Mutually recursive groups get
--- encoded via `encodeMutualLetGroup`.
-reorderLetBindings :: TTermDefinition (Term -> Term)
-reorderLetBindings = define "reorderLetBindings" $
-  doc "Topologically reorder let bindings and pair-encode mutually recursive groups" $
-  "term0" ~>
-  "f" <~ ("recurse" ~> "tm" ~>
-    cases _Term (var "tm") (Just $ var "recurse" @@ var "tm") [
-      _Term_let>>: constant $
-        "flat" <~ (collectLetBindings @@ var "tm") $
-        "allBindings" <~ Pairs.first (var "flat") $
-        "innerBody" <~ Pairs.second (var "flat") $
-        "groups" <~ (processLetSCCs @@ var "allBindings") $
-        "groups2" <~ Lists.map
-          ("grp" ~> Lists.map
-            ("b" ~> Core.binding
-              (Core.bindingName $ var "b")
-              (reorderLetBindings @@ (Core.bindingTerm $ var "b"))
-              (Core.bindingTypeScheme $ var "b"))
-            (var "grp"))
-          (var "groups") $
-        rebuildMutualLets @@ var "groups2" @@ (reorderLetBindings @@ var "innerBody")]) $
-  Rewriting.rewriteTerm @@ var "f" @@ var "term0"
-
--- | Sort a list of (name, Type) pairs into SCC groups, flagging each group
--- with a Bool indicating whether it is cyclic (mutually recursive, including
--- self-loops). Acyclic singletons produce Coq `Inductive`/`Definition`/
--- `Record` sentences; cyclic groups produce `Inductive ... with ...` blocks.
-sortTypeDefsSCC :: TTermDefinition ([(String, Type)] -> [(Bool, [(String, Type)])])
-sortTypeDefsSCC = define "sortTypeDefsSCC" $
-  doc "Group type definitions into SCC components with a cyclic/acyclic flag" $
-  lambda "defs" $ lets [
-    "localNames">: Sets.fromList $ Lists.map (lambda "d" $ Pairs.first $ var "d") (var "defs"),
-    "depsOf">: lambda "d" $ Sets.toList $ typeRefs @@ var "localNames" @@ (Pairs.second $ var "d"),
-    "comps">: Sorting.topologicalSortNodes
-      @@ (lambda "d" $ Pairs.first $ var "d")
-      @@ (var "depsOf")
-      @@ (var "defs")] $
-    Lists.map (lambda "grp" $
-      Logic.ifElse (Equality.gte (Lists.length $ var "grp") (int32 2))
-        (pair (boolean True) (var "grp"))
-        -- Singleton: cyclic iff it references itself.
-        (Maybes.fromMaybe (pair (boolean False) (var "grp")) (Maybes.map
-          (lambda "d" $ lets [
-            "name">: Pairs.first $ var "d",
-            "deps">: typeRefs @@ var "localNames" @@ (Pairs.second $ var "d")] $
-            pair (Sets.member (var "name") (var "deps")) (var "grp"))
-          (Lists.maybeHead (var "grp")))))
-      (var "comps")
-
--- | Sort a list of (name, Term) pairs into SCC groups, flagging each group
--- as cyclic or acyclic. Acyclic singletons become `Definition`; cyclic
--- groups get emitted via the `hydra_fix` bundling pipeline.
-sortTermDefsSCC :: TTermDefinition ([(String, Term)] -> [(Bool, [(String, Term)])])
-sortTermDefsSCC = define "sortTermDefsSCC" $
-  doc "Group term definitions into SCC components with a cyclic/acyclic flag" $
-  lambda "defs" $ lets [
-    "localNames">: Sets.fromList $ Lists.map (lambda "d" $ Pairs.first $ var "d") (var "defs"),
-    "depsOf">: lambda "d" $ Sets.toList $ termRefs @@ var "localNames" @@ (Pairs.second $ var "d"),
-    "comps">: Sorting.topologicalSortNodes
-      @@ (lambda "d" $ Pairs.first $ var "d")
-      @@ (var "depsOf")
-      @@ (var "defs")] $
-    Lists.map (lambda "grp" $
-      Logic.ifElse (Equality.gte (Lists.length $ var "grp") (int32 2))
-        (pair (boolean True) (var "grp"))
-        (Maybes.fromMaybe (pair (boolean False) (var "grp")) (Maybes.map
-          (lambda "d" $ lets [
-            "name">: Pairs.first $ var "d",
-            "deps">: termRefs @@ var "localNames" @@ (Pairs.second $ var "d")] $
-            pair (Sets.member (var "name") (var "deps")) (var "grp"))
-          (Lists.maybeHead (var "grp")))))
-      (var "comps")
-
-
-
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Coder.hs b/src/main/haskell/Hydra/Sources/Cpp/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Coder.hs
+++ /dev/null
@@ -1,1217 +0,0 @@
--- Note: this file was created with the help of a large language model. It requires further human review.
-
-module Hydra.Sources.Cpp.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Dependencies   as Dependencies
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Resolution    as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import           Prelude hiding ((++))
-
-import qualified Data.Map as M
-import qualified Data.Set as S
-
--- Additional imports for Cpp AST
-import qualified Hydra.Cpp.Syntax as Cpp
-import qualified Hydra.Sources.Cpp.Serde as CppSerde
-import qualified Hydra.Sources.Cpp.Syntax as CppSyntax
-import qualified Hydra.Sources.Cpp.Language as CppLanguageSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-
--- | An empty list term, avoiding ambiguous type variable issues with 'list []'
-emptyList :: TTerm [a]
-emptyList = TTerm $ TermList []
-
-ns :: Namespace
-ns = Namespace "hydra.cpp.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [moduleNamespace CppLanguageSource.module_,
-      CppSerde.ns,
-      Formatting.ns, Names.ns, Dependencies.ns, Strip.ns, Environment.ns, Predicates.ns, Resolution.ns, Lexical.ns,
-      ShowCore.ns, Annotations.ns, Sorting.ns, SerializationSource.ns,
-      moduleNamespace DecodeCore.module_, moduleNamespace EncodeCore.module_],
-            moduleTypeDependencies = (CppSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "C++ code generator: converts Hydra modules to C++ header files"}
-  where
-    definitions = [
-      -- Cpp AST helper functions
-      toDefinition cppClassDeclaration,
-      toDefinition cppEnumDeclaration,
-      toDefinition cppEnumForwardDeclaration,
-      toDefinition memberSpecificationPublic,
-      toDefinition memberSpecificationProtected,
-      toDefinition createTemplateType,
-      toDefinition createIdentifierExpr,
-      toDefinition createLiteralBoolExpr,
-      toDefinition createLiteralIntExpr,
-      toDefinition createFunctionCallExpr,
-      toDefinition createHeaderFile,
-      toDefinition createConstructorBody,
-      toDefinition constParameter,
-      toDefinition unnamedParameter,
-      toDefinition toConstType,
-      toDefinition createTypeIdNameCall,
-      toDefinition createThrowStmt,
-      -- Expression chain helpers
-      toDefinition cppPrimaryExpressionToCppExpression,
-      toDefinition cppUnaryExpressionToCppExpression,
-      toDefinition cppPostfixExpressionToCppExpression,
-      toDefinition cppUnaryExpressionToCppLogicalOrExpression,
-      -- Naming functions
-      toDefinition encodeName,
-      toDefinition encodeNamespace,
-      toDefinition encodeFieldName,
-      toDefinition encodeEnumValue,
-      toDefinition sanitizeCppName,
-      toDefinition className,
-      toDefinition variantName,
-      toDefinition visitorName,
-      toDefinition partialVisitorName,
-      toDefinition fwdHeaderName,
-      toDefinition namespaceDecl,
-      toDefinition createTypeReference,
-      -- Type encoding
-      toDefinition encodeLiteralType,
-      toDefinition encodeType,
-      toDefinition encodeForallType,
-      toDefinition encodeFunctionType,
-      toDefinition encodeApplicationType,
-      toDefinition encodeTypeAlias,
-      toDefinition encodeTypeDefinition,
-      -- Struct/union/enum encoding
-      toDefinition encodeFieldType,
-      toDefinition encodeRecordType,
-      toDefinition encodeUnionType,
-      toDefinition encodeEnumType,
-      toDefinition encodeVariantType,
-      toDefinition encodeWrappedType,
-      -- Visitor pattern
-      toDefinition createVisitorInterface,
-      toDefinition createPartialVisitorInterface,
-      toDefinition createUnionBaseClass,
-      toDefinition createVariantClass,
-      toDefinition createAcceptImplementation,
-      toDefinition generateForwardDeclarations,
-      toDefinition createLessThanOperator,
-      -- File generation
-      toDefinition serializeHeaderFile,
-      toDefinition bindingNameToFilePath,
-      toDefinition findIncludes,
-      toDefinition findTypeDependencies,
-      toDefinition gatherMetadata,
-      toDefinition isStdContainerType,
-      toDefinition isStructType,
-      toDefinition isTemplateType,
-      -- Module entry point
-      toDefinition generateTypeFile,
-      toDefinition generateTypeFiles,
-      toDefinition moduleToCpp]
-
-
--- ============================================================================
--- Cpp AST helper functions
--- ============================================================================
-
--- | Create a class declaration
-cppClassDeclaration :: TTermDefinition (String -> [Cpp.BaseSpecifier] -> Maybe Cpp.ClassBody -> Cpp.Declaration)
-cppClassDeclaration = def "cppClassDeclaration" $
-  lambda "name" $ lambda "baseSpecs" $ lambda "mbody" $
-    inject Cpp._Declaration Cpp._Declaration_class $
-      record Cpp._ClassDeclaration [
-        Cpp._ClassDeclaration_specifier>>:
-          record Cpp._ClassSpecifier [
-            Cpp._ClassSpecifier_key>>: inject Cpp._ClassKey Cpp._ClassKey_class unit,
-            Cpp._ClassSpecifier_name>>: var "name",
-            Cpp._ClassSpecifier_inheritance>>: var "baseSpecs"],
-        Cpp._ClassDeclaration_body>>: var "mbody"]
-
--- | Create an enum class declaration
-cppEnumDeclaration :: TTermDefinition (String -> Maybe Cpp.ClassBody -> Cpp.Declaration)
-cppEnumDeclaration = def "cppEnumDeclaration" $
-  lambda "name" $ lambda "mbody" $
-    inject Cpp._Declaration Cpp._Declaration_class $
-      record Cpp._ClassDeclaration [
-        Cpp._ClassDeclaration_specifier>>:
-          record Cpp._ClassSpecifier [
-            Cpp._ClassSpecifier_key>>: inject Cpp._ClassKey Cpp._ClassKey_enumClass unit,
-            Cpp._ClassSpecifier_name>>: var "name",
-            Cpp._ClassSpecifier_inheritance>>: list ([] :: [TTerm Cpp.BaseSpecifier])],
-        Cpp._ClassDeclaration_body>>: var "mbody"]
-
--- | Create an enum forward declaration (no body)
-cppEnumForwardDeclaration :: TTermDefinition (String -> Cpp.Declaration)
-cppEnumForwardDeclaration = def "cppEnumForwardDeclaration" $
-  lambda "name" $
-    cppEnumDeclaration @@ var "name" @@ nothing
-
--- | Public access label
-memberSpecificationPublic :: TTermDefinition Cpp.MemberSpecification
-memberSpecificationPublic = def "memberSpecificationPublic" $
-  inject Cpp._MemberSpecification Cpp._MemberSpecification_accessLabel $
-    inject Cpp._AccessSpecifier Cpp._AccessSpecifier_public unit
-
--- | Protected access label
-memberSpecificationProtected :: TTermDefinition Cpp.MemberSpecification
-memberSpecificationProtected = def "memberSpecificationProtected" $
-  inject Cpp._MemberSpecification Cpp._MemberSpecification_accessLabel $
-    inject Cpp._AccessSpecifier Cpp._AccessSpecifier_protected unit
-
--- | Create a template type (e.g., std::vector<T>)
-createTemplateType :: TTermDefinition (String -> [Cpp.TypeExpression] -> Cpp.TypeExpression)
-createTemplateType = def "createTemplateType" $
-  lambda "name" $ lambda "args" $
-    inject Cpp._TypeExpression Cpp._TypeExpression_template $
-      record Cpp._TemplateType [
-        Cpp._TemplateType_name>>: var "name",
-        Cpp._TemplateType_arguments>>:
-          Lists.map (lambda "a" $
-            inject Cpp._TemplateArgument Cpp._TemplateArgument_type (var "a"))
-          (var "args")]
-
--- | Create an identifier expression
-createIdentifierExpr :: TTermDefinition (String -> Cpp.Expression)
-createIdentifierExpr = def "createIdentifierExpr" $
-  lambda "name" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (var "name"))
-
--- | Create a boolean literal expression
-createLiteralBoolExpr :: TTermDefinition (Bool -> Cpp.Expression)
-createLiteralBoolExpr = def "createLiteralBoolExpr" $
-  lambda "val" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_literal $
-        inject Cpp._Literal Cpp._Literal_boolean $
-          wrap Cpp._BooleanLiteral (var "val"))
-
--- | Create an integer literal expression
-createLiteralIntExpr :: TTermDefinition (Int -> Cpp.Expression)
-createLiteralIntExpr = def "createLiteralIntExpr" $
-  lambda "val" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_literal $
-        inject Cpp._Literal Cpp._Literal_integer $
-          inject Cpp._IntegerLiteral Cpp._IntegerLiteral_decimal (var "val"))
-
--- | Create a function call expression
-createFunctionCallExpr :: TTermDefinition (String -> [Cpp.Expression] -> Cpp.Expression)
-createFunctionCallExpr = def "createFunctionCallExpr" $
-  lambda "funcName" $ lambda "args" $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-        record Cpp._FunctionCallOperation [
-          Cpp._FunctionCallOperation_function>>:
-            inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-              inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (var "funcName"),
-          Cpp._FunctionCallOperation_arguments>>: var "args"])
-
--- | Create a header file with pragma once, includes, and declarations
-createHeaderFile :: TTermDefinition ([Cpp.IncludeDirective] -> [Cpp.Declaration] -> Cpp.Program)
-createHeaderFile = def "createHeaderFile" $
-  lambda "includes" $ lambda "decls" $
-    record Cpp._Program [
-      Cpp._Program_preprocessorDirectives>>: list [
-        inject Cpp._PreprocessorDirective Cpp._PreprocessorDirective_pragma $
-          record Cpp._PragmaDirective [Cpp._PragmaDirective_content>>: string "once"]],
-      Cpp._Program_includes>>: var "includes",
-      Cpp._Program_declarations>>: var "decls"]
-
--- | Create function body: default if no params, empty compound otherwise
-createConstructorBody :: TTermDefinition ([Cpp.Parameter] -> Cpp.FunctionBody)
-createConstructorBody = def "createConstructorBody" $
-  lambda "params" $
-    Logic.ifElse
-      (Lists.null (var "params"))
-      (inject Cpp._FunctionBody Cpp._FunctionBody_default unit)
-      (inject Cpp._FunctionBody Cpp._FunctionBody_compound $
-        wrap Cpp._CompoundStatement (list ([] :: [TTerm Cpp.Statement])))
-
--- | Create a const reference parameter
-constParameter :: TTermDefinition (String -> Cpp.TypeExpression -> Cpp.Parameter)
-constParameter = def "constParameter" $
-  lambda "name" $ lambda "typ" $
-    record Cpp._Parameter [
-      Cpp._Parameter_type>>:
-        inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-          record Cpp._QualifiedType [
-            Cpp._QualifiedType_baseType>>:
-              inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-                record Cpp._QualifiedType [
-                  Cpp._QualifiedType_baseType>>: var "typ",
-                  Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_const unit],
-            Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_lvalueRef unit],
-      Cpp._Parameter_name>>: var "name",
-      Cpp._Parameter_unnamed>>: boolean False,
-      Cpp._Parameter_defaultValue>>: nothing]
-
--- | Create an unnamed parameter (for operator overloads, etc.)
-unnamedParameter :: TTermDefinition (String -> Cpp.TypeExpression -> Cpp.Parameter)
-unnamedParameter = def "unnamedParameter" $
-  lambda "name" $ lambda "typ" $
-    record Cpp._Parameter [
-      Cpp._Parameter_type>>: var "typ",
-      Cpp._Parameter_name>>: var "name",
-      Cpp._Parameter_unnamed>>: boolean True,
-      Cpp._Parameter_defaultValue>>: nothing]
-
--- | Wrap a type expression with const qualifier
-toConstType :: TTermDefinition (Cpp.TypeExpression -> Cpp.TypeExpression)
-toConstType = def "toConstType" $
-  lambda "baseType" $
-    inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-      record Cpp._QualifiedType [
-        Cpp._QualifiedType_baseType>>: var "baseType",
-        Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_const unit]
-
--- | Create a typeid(*this).name() call expression
-createTypeIdNameCall :: TTermDefinition Cpp.Expression
-createTypeIdNameCall = def "createTypeIdNameCall" $
-  cppPostfixExpressionToCppExpression @@
-    (inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-      record Cpp._FunctionCallOperation [
-        Cpp._FunctionCallOperation_function>>:
-          inject Cpp._PostfixExpression Cpp._PostfixExpression_memberAccess $
-            record Cpp._MemberAccessOperation [
-              Cpp._MemberAccessOperation_object>>:
-                inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-                  record Cpp._FunctionCallOperation [
-                    Cpp._FunctionCallOperation_function>>:
-                      inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                        inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (string "typeid"),
-                    Cpp._FunctionCallOperation_arguments>>: list [
-                      cppPrimaryExpressionToCppExpression @@
-                        (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_parenthesized $
-                          cppPostfixExpressionToCppExpression @@
-                            (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                              inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (string "*this")))]],
-              Cpp._MemberAccessOperation_member>>: string "name"],
-        Cpp._FunctionCallOperation_arguments>>: list ([] :: [TTerm Cpp.Expression])])
-
--- | Create a throw statement
-createThrowStmt :: TTermDefinition (String -> Cpp.Expression -> Cpp.Statement)
-createThrowStmt = def "createThrowStmt" $
-  lambda "exceptionType" $ lambda "arg" $
-    inject Cpp._Statement Cpp._Statement_jump $
-      inject Cpp._JumpStatement Cpp._JumpStatement_throw $
-        createFunctionCallExpr @@ var "exceptionType" @@ list [var "arg"]
-
-
--- ============================================================================
--- Expression chain helpers
--- ============================================================================
-
--- | Convert a PrimaryExpression to a full Expression
-cppPrimaryExpressionToCppExpression :: TTermDefinition (Cpp.PrimaryExpression -> Cpp.Expression)
-cppPrimaryExpressionToCppExpression = def "cppPrimaryExpressionToCppExpression" $
-  lambda "prim" $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary (var "prim"))
-
--- | Convert a UnaryExpression to a full Expression
-cppUnaryExpressionToCppExpression :: TTermDefinition (Cpp.UnaryExpression -> Cpp.Expression)
-cppUnaryExpressionToCppExpression = def "cppUnaryExpressionToCppExpression" $
-  lambda "ue" $
-    inject Cpp._Expression Cpp._Expression_assignment $
-      inject Cpp._AssignmentExpression Cpp._AssignmentExpression_conditional $
-        inject Cpp._ConditionalExpression Cpp._ConditionalExpression_logicalOr $
-          cppUnaryExpressionToCppLogicalOrExpression @@ var "ue"
-
--- | Convert a PostfixExpression to a full Expression
-cppPostfixExpressionToCppExpression :: TTermDefinition (Cpp.PostfixExpression -> Cpp.Expression)
-cppPostfixExpressionToCppExpression = def "cppPostfixExpressionToCppExpression" $
-  lambda "pe" $
-    cppUnaryExpressionToCppExpression @@
-      (inject Cpp._UnaryExpression Cpp._UnaryExpression_postfix (var "pe"))
-
--- | Convert a UnaryExpression to a LogicalOrExpression
-cppUnaryExpressionToCppLogicalOrExpression :: TTermDefinition (Cpp.UnaryExpression -> Cpp.LogicalOrExpression)
-cppUnaryExpressionToCppLogicalOrExpression = def "cppUnaryExpressionToCppLogicalOrExpression" $
-  lambda "ue" $
-    inject Cpp._LogicalOrExpression Cpp._LogicalOrExpression_logicalAnd $
-      inject Cpp._LogicalAndExpression Cpp._LogicalAndExpression_inclusiveOr $
-        inject Cpp._InclusiveOrExpression Cpp._InclusiveOrExpression_exclusiveOr $
-          inject Cpp._ExclusiveOrExpression Cpp._ExclusiveOrExpression_and $
-            inject Cpp._AndExpression Cpp._AndExpression_equality $
-              inject Cpp._EqualityExpression Cpp._EqualityExpression_relational $
-                inject Cpp._RelationalExpression Cpp._RelationalExpression_shift $
-                  inject Cpp._ShiftExpression Cpp._ShiftExpression_additive $
-                    inject Cpp._AdditiveExpression Cpp._AdditiveExpression_multiplicative $
-                      inject Cpp._MultiplicativeExpression Cpp._MultiplicativeExpression_unary (var "ue")
-
-
--- ============================================================================
--- Naming functions
--- ============================================================================
-
--- | Encode a name with specified convention and optional qualification
-encodeName :: TTermDefinition (Bool -> CaseConvention -> x -> Name -> String)
-encodeName = def "encodeName" $
-  doc "Encode a name with a specified case convention, optionally qualified" $
-  lambda "isQualified" $ lambda "conv" $ lambda "env" $ lambda "name" $
-    -- Simplified: use local name with sanitization
-    sanitizeCppName @@ (Names.localNameOf @@ var "name")
-
--- | Encode a namespace as a C++ namespace string (e.g., "hydra.cpp" -> "hydra::ext::cpp")
-encodeNamespace :: TTermDefinition (Namespace -> String)
-encodeNamespace = def "encodeNamespace" $
-  lambda "ns" $
-    Strings.intercalate (string "::")
-      (Lists.map
-        (lambda "seg" $ Formatting.convertCaseCamelToLowerSnake @@ var "seg")
-        (Strings.splitOn (string ".") (Packaging.unNamespace (var "ns"))))
-
--- | Encode a field name in lower_snake_case
-encodeFieldName :: TTermDefinition (Name -> String)
-encodeFieldName = def "encodeFieldName" $
-  lambda "fname" $
-    sanitizeCppName @@ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (var "fname"))
-
--- | Encode an enum value in UPPER_SNAKE_CASE
-encodeEnumValue :: TTermDefinition (Name -> String)
-encodeEnumValue = def "encodeEnumValue" $
-  lambda "fname" $
-    sanitizeCppName @@ (Formatting.convertCaseCamelToUpperSnake @@ Core.unName (var "fname"))
-
--- | Sanitize a name to be valid in C++
-sanitizeCppName :: TTermDefinition (String -> String)
-sanitizeCppName = def "sanitizeCppName" $
-  lambda "name" $
-    Formatting.sanitizeWithUnderscores @@ (asTerm CppLanguageSource.cppReservedWords) @@ var "name"
-
--- | Get the class name from a fully qualified Name
-className :: TTermDefinition (Name -> String)
-className = def "className" $
-  lambda "name" $
-    sanitizeCppName @@ (Names.localNameOf @@ var "name")
-
--- | Construct a variant class name (e.g., "MyType" + "field" -> "MyTypeField")
-variantName :: TTermDefinition (Name -> Name -> String)
-variantName = def "variantName" $
-  lambda "tname" $ lambda "fname" $
-    sanitizeCppName @@ (
-      (Names.localNameOf @@ var "tname")
-      ++ (Formatting.capitalize @@ Core.unName (var "fname")))
-
--- | Construct a visitor interface name
-visitorName :: TTermDefinition (Name -> String)
-visitorName = def "visitorName" $
-  lambda "name" $
-    sanitizeCppName @@ ((Names.localNameOf @@ var "name") ++ string "Visitor")
-
--- | Construct a partial visitor interface name
-partialVisitorName :: TTermDefinition (Name -> String)
-partialVisitorName = def "partialVisitorName" $
-  lambda "name" $
-    sanitizeCppName @@ ((Names.localNameOf @@ var "name") ++ string "PartialVisitor")
-
--- | Construct the forward-declaration header name for a namespace
-fwdHeaderName :: TTermDefinition (Namespace -> Name)
-fwdHeaderName = def "fwdHeaderName" $
-  lambda "ns" $
-    Names.unqualifyName @@
-      (record _QualifiedName [
-        _QualifiedName_namespace>>: just (var "ns"),
-        _QualifiedName_local>>: string "Fwd"])
-
--- | Create a namespace declaration wrapping declarations
-namespaceDecl :: TTermDefinition (Namespace -> [Cpp.Declaration] -> Cpp.Declaration)
-namespaceDecl = def "namespaceDecl" $
-  lambda "ns" $ lambda "decls" $
-    inject Cpp._Declaration Cpp._Declaration_namespace $
-      record Cpp._NamespaceDeclaration [
-        Cpp._NamespaceDeclaration_name>>: encodeNamespace @@ var "ns",
-        Cpp._NamespaceDeclaration_declarations>>: var "decls"]
-
--- | Create a type reference, optionally as a shared_ptr for struct types
-createTypeReference :: TTermDefinition (Bool -> Name -> Cpp.TypeExpression)
-createTypeReference = def "createTypeReference" $
-  lambda "isPointer" $ lambda "name" $
-    Logic.ifElse (var "isPointer")
-      (createTemplateType @@ string "std::shared_ptr" @@
-        list [toConstType @@ (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-          inject Cpp._BasicType Cpp._BasicType_named (sanitizeCppName @@ (Names.localNameOf @@ var "name")))])
-      (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-        inject Cpp._BasicType Cpp._BasicType_named (sanitizeCppName @@ (Names.localNameOf @@ var "name")))
-
-
--- ============================================================================
--- Type encoding
--- ============================================================================
-
--- | Encode a literal type as a C++ type expression
-encodeLiteralType :: TTermDefinition (LiteralType -> Cpp.TypeExpression)
-encodeLiteralType = def "encodeLiteralType" $
-  lambda "lt" $
-    inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-      cases _LiteralType (var "lt") Nothing [
-        _LiteralType_binary>>: constant $
-          inject Cpp._BasicType Cpp._BasicType_char unit,
-        _LiteralType_boolean>>: constant $
-          inject Cpp._BasicType Cpp._BasicType_bool unit,
-        _LiteralType_float>>: lambda "ft" $
-          cases _FloatType (var "ft") (Just $ inject Cpp._BasicType Cpp._BasicType_double unit) [
-            _FloatType_float32>>: constant $ inject Cpp._BasicType Cpp._BasicType_float unit,
-            _FloatType_float64>>: constant $ inject Cpp._BasicType Cpp._BasicType_double unit],
-        _LiteralType_integer>>: lambda "it" $
-          cases _IntegerType (var "it") (Just $ inject Cpp._BasicType Cpp._BasicType_int unit) [
-            _IntegerType_bigint>>: constant $ inject Cpp._BasicType Cpp._BasicType_int unit,
-            _IntegerType_int8>>: constant $ inject Cpp._BasicType Cpp._BasicType_char unit,
-            _IntegerType_int16>>: constant $ inject Cpp._BasicType Cpp._BasicType_named (string "int16_t"),
-            _IntegerType_int32>>: constant $ inject Cpp._BasicType Cpp._BasicType_int unit,
-            _IntegerType_int64>>: constant $ inject Cpp._BasicType Cpp._BasicType_named (string "int64_t")],
-        _LiteralType_string>>: constant $
-          inject Cpp._BasicType Cpp._BasicType_string unit]
-
--- | Encode a Hydra type as a C++ type expression
-encodeType :: TTermDefinition (Context -> Graph -> Type -> Either Error Cpp.TypeExpression)
-encodeType = def "encodeType" $
-  "cx" ~> "g" ~> lambda "typ" $
-    "t" <~ (Strip.deannotateType @@ var "typ") $
-    cases _Type (var "t") (Just $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "Unsupported type") (var "cx"))
-    [_Type_application>>: lambda "at" $
-       encodeApplicationType @@ var "cx" @@ var "g" @@ var "at",
-     _Type_either>>: lambda "et" $
-       "lt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.eitherTypeLeft (var "et")) $
-       "rt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.eitherTypeRight (var "et")) $
-         right (toConstType @@ (createTemplateType @@ string "std::variant" @@ list [var "lt", var "rt"])),
-     _Type_function>>: lambda "ft" $
-       encodeFunctionType @@ var "cx" @@ var "g" @@ var "ft",
-     _Type_forall>>: lambda "lt" $
-       encodeForallType @@ var "cx" @@ var "g" @@ var "lt",
-     _Type_list>>: lambda "et" $
-       Eithers.map (lambda "enc" $ toConstType @@ (createTemplateType @@ string "std::vector" @@ list [var "enc"]))
-         (encodeType @@ var "cx" @@ var "g" @@ var "et"),
-     _Type_map>>: lambda "mt" $
-       "kt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.mapTypeKeys (var "mt")) $
-       "vt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.mapTypeValues (var "mt")) $
-         right (toConstType @@ (createTemplateType @@ string "std::map" @@ list [var "kt", var "vt"])),
-     _Type_literal>>: lambda "lt" $
-       right (encodeLiteralType @@ var "lt"),
-     _Type_maybe>>: lambda "et" $
-       Eithers.map (lambda "enc" $ toConstType @@ (createTemplateType @@ string "std::optional" @@ list [var "enc"]))
-         (encodeType @@ var "cx" @@ var "g" @@ var "et"),
-     _Type_pair>>: lambda "pt" $
-       "ft" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.pairTypeFirst (var "pt")) $
-       "st" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.pairTypeSecond (var "pt")) $
-         right (toConstType @@ (createTemplateType @@ string "std::pair" @@ list [var "ft", var "st"])),
-     _Type_record>>: lambda "rt" $
-       Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous record type")) (var "cx"),
-     _Type_set>>: lambda "et" $
-       Eithers.map (lambda "enc" $ toConstType @@ (createTemplateType @@ string "std::set" @@ list [var "enc"]))
-         (encodeType @@ var "cx" @@ var "g" @@ var "et"),
-     _Type_union>>: lambda "rt" $
-       Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous union type")) (var "cx"),
-     _Type_variable>>: lambda "name" $
-       right (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-         inject Cpp._BasicType Cpp._BasicType_named (sanitizeCppName @@ Core.unName (var "name"))),
-     _Type_wrap>>: lambda "wt" $
-       Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous wrapped type")) (var "cx"),
-     _Type_unit>>: constant $
-       right (createTemplateType @@ string "std::tuple" @@ list ([] :: [TTerm Cpp.TypeExpression]))]
-
--- | Encode a forall type (strip the quantifier)
-encodeForallType :: TTermDefinition (Context -> Graph -> ForallType -> Either Error Cpp.TypeExpression)
-encodeForallType = def "encodeForallType" $
-  "cx" ~> "g" ~> lambda "lt" $
-    encodeType @@ var "cx" @@ var "g" @@ Core.forallTypeBody (var "lt")
-
--- | Encode a function type as std::function<R(Args...)>
-encodeFunctionType :: TTermDefinition (Context -> Graph -> FunctionType -> Either Error Cpp.TypeExpression)
-encodeFunctionType = def "encodeFunctionType" $
-  "cx" ~> "g" ~> lambda "ft" $
-    "dom" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.functionTypeDomain (var "ft")) $
-    "cod" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.functionTypeCodomain (var "ft")) $
-      right (inject Cpp._TypeExpression Cpp._TypeExpression_function $
-        record Cpp._FunctionType [
-          Cpp._FunctionType_returnType>>: var "cod",
-          Cpp._FunctionType_parameters>>: list [
-            record Cpp._Parameter [
-              Cpp._Parameter_type>>: var "dom",
-              Cpp._Parameter_name>>: string "",
-              Cpp._Parameter_unnamed>>: boolean False,
-              Cpp._Parameter_defaultValue>>: nothing]]])
-
--- | Encode a type application (template instantiation)
-encodeApplicationType :: TTermDefinition (Context -> Graph -> ApplicationType -> Either Error Cpp.TypeExpression)
-encodeApplicationType = def "encodeApplicationType" $
-  "cx" ~> "g" ~> lambda "at" $
-    "body" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.applicationTypeFunction (var "at")) $
-    "arg" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.applicationTypeArgument (var "at")) $
-      right (createTemplateType @@ string "TODO_template" @@ list [var "body", var "arg"])
-
--- | Encode a type as a typedef / using declaration
-encodeTypeAlias :: TTermDefinition (Context -> Graph -> Name -> Type -> Maybe String -> Either Error Cpp.Declaration)
-encodeTypeAlias = def "encodeTypeAlias" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "typ" $ lambda "comment" $
-    "cppType" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "typ") $
-      right (inject Cpp._Declaration Cpp._Declaration_typedef $
-        record Cpp._TypedefDeclaration [
-          Cpp._TypedefDeclaration_name>>: className @@ var "name",
-          Cpp._TypedefDeclaration_type>>: var "cppType",
-          Cpp._TypedefDeclaration_isUsing>>: boolean True])
-
--- | Encode a top-level type definition (dispatches to record/union/wrap)
-encodeTypeDefinition :: TTermDefinition (Context -> Graph -> Name -> Type -> Either Error [Cpp.Declaration])
-encodeTypeDefinition = def "encodeTypeDefinition" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "typ" $
-    "t" <~ (Strip.deannotateType @@ var "typ") $
-    cases _Type (var "t") (Just $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "unexpected type in definition: " ++ (ShowCore.type_ @@ var "typ")) (var "cx"))
-    [_Type_forall>>: lambda "fa" $
-       encodeTypeDefinition @@ var "cx" @@ var "g" @@ var "name" @@ Core.forallTypeBody (var "fa"),
-     _Type_record>>: lambda "rt" $
-       encodeRecordType @@ var "cx" @@ var "g" @@ var "name" @@ var "rt" @@ nothing,
-     _Type_union>>: lambda "rt" $
-       encodeUnionType @@ var "cx" @@ var "g" @@ var "name" @@ var "rt" @@ nothing,
-     _Type_wrap>>: lambda "wt" $
-       encodeWrappedType @@ var "cx" @@ var "g" @@ var "name" @@ var "wt" @@ nothing]
-
-
--- ============================================================================
--- Struct/union/enum encoding
--- ============================================================================
-
--- | Encode a field type as a VariableDeclaration
-encodeFieldType :: TTermDefinition (Bool -> FieldType -> Context -> Graph -> Either Error Cpp.VariableDeclaration)
-encodeFieldType = def "encodeFieldType" $
-  lambda "isParameter" $ lambda "ft" $ "cx" ~> lambda "g" $
-    "fname" <~ Core.fieldTypeName (var "ft") $
-    "ftype" <~ Core.fieldTypeType (var "ft") $
-    "cppType" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "ftype") $
-      right (record Cpp._VariableDeclaration [
-        Cpp._VariableDeclaration_type>>: just (var "cppType"),
-        Cpp._VariableDeclaration_name>>: encodeFieldName @@ var "fname",
-        Cpp._VariableDeclaration_initializer>>: nothing,
-        Cpp._VariableDeclaration_isAuto>>: boolean False])
-
--- | Encode a record type as a C++ class with fields and constructor
-encodeRecordType :: TTermDefinition (Context -> Graph -> Name -> [FieldType] -> Maybe String -> Either Error [Cpp.Declaration])
-encodeRecordType = def "encodeRecordType" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "rt" $ lambda "comment" $
-    "cppFields" <<~ (Eithers.mapList (lambda "f" $ encodeFieldType @@ boolean False @@ var "f" @@ var "cx" @@ var "g") (var "rt")) $
-    "constructorParams" <<~ (Eithers.mapList (lambda "f" $ encodeFieldType @@ boolean True @@ var "f" @@ var "cx" @@ var "g") (var "rt")) $
-      let classDecl = cppClassDeclaration @@ (className @@ var "name") @@ list ([] :: [TTerm Cpp.BaseSpecifier]) @@
-            (just (wrap Cpp._ClassBody (
-              Lists.concat (list [
-                list [asTerm memberSpecificationPublic],
-                Lists.map (lambda "field" $
-                  inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-                    inject Cpp._MemberDeclaration Cpp._MemberDeclaration_variable (var "field"))
-                  (var "cppFields"),
-                list [inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-                  inject Cpp._MemberDeclaration Cpp._MemberDeclaration_constructor $
-                    record Cpp._ConstructorDeclaration [
-                      Cpp._ConstructorDeclaration_name>>: className @@ var "name",
-                      Cpp._ConstructorDeclaration_parameters>>:
-                        Lists.map (lambda "p" $
-                          record Cpp._Parameter [
-                            Cpp._Parameter_type>>: Maybes.fromMaybe
-                              (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                                inject Cpp._BasicType Cpp._BasicType_int unit)
-                              ((project Cpp._VariableDeclaration Cpp._VariableDeclaration_type @@ var "p")),
-                            Cpp._Parameter_name>>: (project Cpp._VariableDeclaration Cpp._VariableDeclaration_name @@ var "p"),
-                            Cpp._Parameter_unnamed>>: boolean False,
-                            Cpp._Parameter_defaultValue>>: nothing])
-                          (var "constructorParams"),
-                      Cpp._ConstructorDeclaration_initializers>>:
-                        Lists.map (lambda "field" $
-                          record Cpp._MemInitializer [
-                            Cpp._MemInitializer_name>>: (project Cpp._VariableDeclaration Cpp._VariableDeclaration_name @@ var "field"),
-                            Cpp._MemInitializer_arguments>>: list [
-                              createIdentifierExpr @@ (project Cpp._VariableDeclaration Cpp._VariableDeclaration_name @@ var "field")]])
-                          (var "cppFields"),
-                      Cpp._ConstructorDeclaration_body>>: createConstructorBody @@ var "constructorParams"]]]
-              ))))
-          ltOp = createLessThanOperator @@ var "name" @@ var "rt"
-      in right (list [classDecl, ltOp])
-
--- | Encode a union type (dispatches to enum or variant based on content)
-encodeUnionType :: TTermDefinition (Context -> Graph -> Name -> [FieldType] -> Maybe String -> Either Error [Cpp.Declaration])
-encodeUnionType = def "encodeUnionType" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "rt" $ lambda "comment" $
-    Logic.ifElse (Predicates.isEnumRowType @@ var "rt")
-      (encodeEnumType @@ var "cx" @@ var "g" @@ var "name" @@ var "rt" @@ var "comment")
-      (encodeVariantType @@ var "cx" @@ var "g" @@ var "name" @@ var "rt" @@ var "comment")
-
--- | Encode an enum type as a C++ enum class
-encodeEnumType :: TTermDefinition (Context -> Graph -> Name -> [FieldType] -> Maybe String -> Either Error [Cpp.Declaration])
-encodeEnumType = def "encodeEnumType" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "tfields" $ lambda "comment" $
-    right (list [
-      cppEnumDeclaration @@ (className @@ var "name") @@
-        (just (wrap Cpp._ClassBody (
-          Lists.map (lambda "ft" $
-            inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-              inject Cpp._MemberDeclaration Cpp._MemberDeclaration_variable $
-                record Cpp._VariableDeclaration [
-                  Cpp._VariableDeclaration_type>>: nothing,
-                  Cpp._VariableDeclaration_name>>: encodeEnumValue @@ Core.fieldTypeName (var "ft"),
-                  Cpp._VariableDeclaration_initializer>>: nothing,
-                  Cpp._VariableDeclaration_isAuto>>: boolean False])
-          (var "tfields"))))])
-
--- | Encode a variant (tagged union) type as a class hierarchy with visitor pattern
-encodeVariantType :: TTermDefinition (Context -> Graph -> Name -> [FieldType] -> Maybe String -> Either Error [Cpp.Declaration])
-encodeVariantType = def "encodeVariantType" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "variants" $ lambda "comment" $
-    "variantClasses" <<~ (Eithers.mapList
-      (lambda "v" $ createVariantClass @@ var "cx" @@ var "g" @@ var "name" @@ var "name" @@ var "v")
-      (var "variants")) $
-      right (Lists.concat (list [
-        generateForwardDeclarations @@ var "name" @@ var "variants",
-        list [createVisitorInterface @@ var "name" @@ var "variants"],
-        list [createUnionBaseClass @@ var "name" @@ var "variants"],
-        var "variantClasses",
-        list [createPartialVisitorInterface @@ var "name" @@ var "variants"],
-        list [createAcceptImplementation @@ var "name" @@ var "variants"]]))
-
--- | Encode a wrapped type as a single-field record
-encodeWrappedType :: TTermDefinition (Context -> Graph -> Name -> Type -> Maybe String -> Either Error [Cpp.Declaration])
-encodeWrappedType = def "encodeWrappedType" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "typ" $ lambda "comment" $
-    encodeRecordType @@ var "cx" @@ var "g" @@ var "name"
-      @@ list [
-            record _FieldType [
-              _FieldType_name>>: wrap _Name (string "value"),
-              _FieldType_type>>: var "typ"]]
-      @@ var "comment"
-
-
--- ============================================================================
--- Visitor pattern
--- ============================================================================
-
--- | Create a visitor interface with pure virtual visit methods
-createVisitorInterface :: TTermDefinition (Name -> [FieldType] -> Cpp.Declaration)
-createVisitorInterface = def "createVisitorInterface" $
-  lambda "tname" $ lambda "variants" $
-    inject Cpp._Declaration Cpp._Declaration_template $
-      record Cpp._TemplateDeclaration [
-        Cpp._TemplateDeclaration_inline>>: boolean False,
-        Cpp._TemplateDeclaration_parameters>>: list [string "typename R"],
-        Cpp._TemplateDeclaration_declaration>>:
-          cppClassDeclaration @@ (visitorName @@ var "tname") @@ list ([] :: [TTerm Cpp.BaseSpecifier]) @@
-            (just (wrap Cpp._ClassBody (
-              Lists.concat (list [
-                list [asTerm memberSpecificationPublic],
-                Lists.map (lambda "ft" $
-                  "fname" <~ Core.fieldTypeName (var "ft") $
-                  inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-                    inject Cpp._MemberDeclaration Cpp._MemberDeclaration_function $
-                      record Cpp._FunctionDeclaration [
-                        Cpp._FunctionDeclaration_prefixSpecifiers>>: list [
-                          inject Cpp._FunctionSpecifierPrefix Cpp._FunctionSpecifierPrefix_virtual unit],
-                        Cpp._FunctionDeclaration_returnType>>:
-                          inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                            inject Cpp._BasicType Cpp._BasicType_named (string "R"),
-                        Cpp._FunctionDeclaration_name>>: string "visit",
-                        Cpp._FunctionDeclaration_parameters>>: list [
-                          record Cpp._Parameter [
-                            Cpp._Parameter_type>>:
-                              inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-                                record Cpp._QualifiedType [
-                                  Cpp._QualifiedType_baseType>>:
-                                    inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-                                      record Cpp._QualifiedType [
-                                        Cpp._QualifiedType_baseType>>:
-                                          inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                                            inject Cpp._BasicType Cpp._BasicType_named (variantName @@ var "tname" @@ var "fname"),
-                                        Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_const unit],
-                                  Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_lvalueRef unit],
-                            Cpp._Parameter_name>>: string "value",
-                            Cpp._Parameter_unnamed>>: boolean False,
-                            Cpp._Parameter_defaultValue>>: nothing]],
-                        Cpp._FunctionDeclaration_suffixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierSuffix]),
-                        Cpp._FunctionDeclaration_body>>: inject Cpp._FunctionBody Cpp._FunctionBody_pure unit])
-                (var "variants"),
-                list [inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-                  inject Cpp._MemberDeclaration Cpp._MemberDeclaration_destructor $
-                    record Cpp._DestructorDeclaration [
-                      Cpp._DestructorDeclaration_prefixSpecifiers>>: list [
-                        inject Cpp._FunctionSpecifierPrefix Cpp._FunctionSpecifierPrefix_virtual unit],
-                      Cpp._DestructorDeclaration_name>>: visitorName @@ var "tname",
-                      Cpp._DestructorDeclaration_suffixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierSuffix]),
-                      Cpp._DestructorDeclaration_body>>: inject Cpp._FunctionBody Cpp._FunctionBody_default unit]]]))))]
-
--- | Create a partial visitor interface with default visit methods that delegate to otherwise()
-createPartialVisitorInterface :: TTermDefinition (Name -> [FieldType] -> Cpp.Declaration)
-createPartialVisitorInterface = def "createPartialVisitorInterface" $
-  lambda "tname" $ lambda "variants" $
-    inject Cpp._Declaration Cpp._Declaration_template $
-      record Cpp._TemplateDeclaration [
-        Cpp._TemplateDeclaration_inline>>: boolean False,
-        Cpp._TemplateDeclaration_parameters>>: list [string "typename R"],
-        Cpp._TemplateDeclaration_declaration>>:
-          cppClassDeclaration @@ (partialVisitorName @@ var "tname")
-            @@ list [record Cpp._BaseSpecifier [
-                 Cpp._BaseSpecifier_access>>: inject Cpp._AccessSpecifier Cpp._AccessSpecifier_public unit,
-                 Cpp._BaseSpecifier_name>>: (visitorName @@ var "tname") ++ string "<R>"]]
-            @@ (just (wrap Cpp._ClassBody (
-              Lists.concat (list [
-                list [asTerm memberSpecificationPublic],
-                -- otherwise() pure virtual method
-                list [inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-                  inject Cpp._MemberDeclaration Cpp._MemberDeclaration_function $
-                    record Cpp._FunctionDeclaration [
-                      Cpp._FunctionDeclaration_prefixSpecifiers>>: list [
-                        inject Cpp._FunctionSpecifierPrefix Cpp._FunctionSpecifierPrefix_virtual unit],
-                      Cpp._FunctionDeclaration_returnType>>:
-                        inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                          inject Cpp._BasicType Cpp._BasicType_named (string "R"),
-                      Cpp._FunctionDeclaration_name>>: string "otherwise",
-                      Cpp._FunctionDeclaration_parameters>>: list [
-                        constParameter @@ string "value" @@
-                          (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                            inject Cpp._BasicType Cpp._BasicType_named (className @@ var "tname"))],
-                      Cpp._FunctionDeclaration_suffixSpecifiers>>: list [
-                        inject Cpp._FunctionSpecifierSuffix Cpp._FunctionSpecifierSuffix_const unit],
-                      Cpp._FunctionDeclaration_body>>: inject Cpp._FunctionBody Cpp._FunctionBody_pure unit]],
-                -- Default visit methods delegating to otherwise
-                Lists.map (lambda "ft" $
-                  "fname" <~ Core.fieldTypeName (var "ft") $
-                  inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-                    inject Cpp._MemberDeclaration Cpp._MemberDeclaration_function $
-                      record Cpp._FunctionDeclaration [
-                        Cpp._FunctionDeclaration_prefixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierPrefix]),
-                        Cpp._FunctionDeclaration_returnType>>:
-                          inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                            inject Cpp._BasicType Cpp._BasicType_named (string "R"),
-                        Cpp._FunctionDeclaration_name>>: string "visit",
-                        Cpp._FunctionDeclaration_parameters>>: list [
-                          constParameter @@ string "value" @@
-                            (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                              inject Cpp._BasicType Cpp._BasicType_named (variantName @@ var "tname" @@ var "fname"))],
-                        Cpp._FunctionDeclaration_suffixSpecifiers>>: list [
-                          inject Cpp._FunctionSpecifierSuffix Cpp._FunctionSpecifierSuffix_override unit],
-                        Cpp._FunctionDeclaration_body>>:
-                          inject Cpp._FunctionBody Cpp._FunctionBody_compound $
-                            wrap Cpp._CompoundStatement (list [
-                              inject Cpp._Statement Cpp._Statement_jump $
-                                inject Cpp._JumpStatement Cpp._JumpStatement_returnValue $
-                                  createFunctionCallExpr @@ string "otherwise" @@ list [
-                                    createIdentifierExpr @@ string "value"]])])
-                (var "variants")]))))]
-
-
--- | Create the union base class with protected constructor, virtual destructor, and accept method
-createUnionBaseClass :: TTermDefinition (Name -> [FieldType] -> Cpp.Declaration)
-createUnionBaseClass = def "createUnionBaseClass" $
-  lambda "name" $ lambda "variants" $
-    cppClassDeclaration @@ (className @@ var "name") @@ list ([] :: [TTerm Cpp.BaseSpecifier]) @@
-      (just (wrap Cpp._ClassBody (list [
-        asTerm memberSpecificationProtected,
-        -- Protected constructor
-        inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-          inject Cpp._MemberDeclaration Cpp._MemberDeclaration_constructor $
-            record Cpp._ConstructorDeclaration [
-              Cpp._ConstructorDeclaration_name>>: className @@ var "name",
-              Cpp._ConstructorDeclaration_parameters>>: list ([] :: [TTerm Cpp.Parameter]),
-              Cpp._ConstructorDeclaration_initializers>>: list ([] :: [TTerm Cpp.MemInitializer]),
-              Cpp._ConstructorDeclaration_body>>: inject Cpp._FunctionBody Cpp._FunctionBody_default unit],
-        asTerm memberSpecificationPublic,
-        -- Virtual destructor
-        inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-          inject Cpp._MemberDeclaration Cpp._MemberDeclaration_destructor $
-            record Cpp._DestructorDeclaration [
-              Cpp._DestructorDeclaration_prefixSpecifiers>>: list [
-                inject Cpp._FunctionSpecifierPrefix Cpp._FunctionSpecifierPrefix_virtual unit],
-              Cpp._DestructorDeclaration_name>>: className @@ var "name",
-              Cpp._DestructorDeclaration_suffixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierSuffix]),
-              Cpp._DestructorDeclaration_body>>: inject Cpp._FunctionBody Cpp._FunctionBody_default unit],
-        -- Template accept method
-        inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-          inject Cpp._MemberDeclaration Cpp._MemberDeclaration_template $
-            record Cpp._TemplateDeclaration [
-              Cpp._TemplateDeclaration_inline>>: boolean False,
-              Cpp._TemplateDeclaration_parameters>>: list [string "typename R"],
-              Cpp._TemplateDeclaration_declaration>>:
-                inject Cpp._Declaration Cpp._Declaration_function $
-                  record Cpp._FunctionDeclaration [
-                    Cpp._FunctionDeclaration_prefixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierPrefix]),
-                    Cpp._FunctionDeclaration_returnType>>:
-                      inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                        inject Cpp._BasicType Cpp._BasicType_named (string "R"),
-                    Cpp._FunctionDeclaration_name>>: string "accept",
-                    Cpp._FunctionDeclaration_parameters>>: list [
-                      record Cpp._Parameter [
-                        Cpp._Parameter_type>>:
-                          inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-                            record Cpp._QualifiedType [
-                              Cpp._QualifiedType_baseType>>:
-                                inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                                  inject Cpp._BasicType Cpp._BasicType_named (
-                                    (visitorName @@ var "name") ++ string "<R>"),
-                              Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_lvalueRef unit],
-                        Cpp._Parameter_name>>: string "visitor",
-                        Cpp._Parameter_unnamed>>: boolean False,
-                        Cpp._Parameter_defaultValue>>: nothing]],
-                    Cpp._FunctionDeclaration_suffixSpecifiers>>: list [
-                      inject Cpp._FunctionSpecifierSuffix Cpp._FunctionSpecifierSuffix_const unit],
-                    Cpp._FunctionDeclaration_body>>: inject Cpp._FunctionBody Cpp._FunctionBody_declaration unit]]])))
-
--- | Create a variant subclass (one branch of a union type)
-createVariantClass :: TTermDefinition (Context -> Graph -> Name -> Name -> FieldType -> Either Error Cpp.Declaration)
-createVariantClass = def "createVariantClass" $
-  "cx" ~> "g" ~> lambda "tname" $ lambda "parentClass" $ lambda "ft" $
-    "fname" <~ Core.fieldTypeName (var "ft") $
-    "variantType" <~ Core.fieldTypeType (var "ft") $
-    "hasValue" <~ Logic.not (Predicates.isUnitType @@ var "variantType") $
-    "valueField" <~ Logic.ifElse (var "hasValue")
-      (Eithers.map (lambda "cppType" $
-        list [inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-          inject Cpp._MemberDeclaration Cpp._MemberDeclaration_variable $
-            record Cpp._VariableDeclaration [
-              Cpp._VariableDeclaration_type>>: just (var "cppType"),
-              Cpp._VariableDeclaration_name>>: string "value",
-              Cpp._VariableDeclaration_initializer>>: nothing,
-              Cpp._VariableDeclaration_isAuto>>: boolean False]])
-        (encodeType @@ var "cx" @@ var "g" @@ (Strip.deannotateType @@ var "variantType")))
-      (right (list ([] :: [TTerm Cpp.MemberSpecification]))) $
-    "constructorParams" <~ Logic.ifElse (var "hasValue")
-      (Eithers.map (lambda "paramType" $
-        list [record Cpp._Parameter [
-          Cpp._Parameter_type>>: var "paramType",
-          Cpp._Parameter_name>>: string "value",
-          Cpp._Parameter_unnamed>>: boolean False,
-          Cpp._Parameter_defaultValue>>: nothing]])
-        (encodeType @@ var "cx" @@ var "g" @@ (Strip.deannotateType @@ var "variantType")))
-      (right (list ([] :: [TTerm Cpp.Parameter]))) $
-    "vFields" <<~ (var "valueField") $
-    "vParams" <<~ (var "constructorParams") $
-    "initList" <~ Logic.ifElse (var "hasValue")
-      (list [record Cpp._MemInitializer [
-        Cpp._MemInitializer_name>>: string "value",
-        Cpp._MemInitializer_arguments>>: list [createIdentifierExpr @@ string "value"]]])
-      (list ([] :: [TTerm Cpp.MemInitializer])) $
-      right (cppClassDeclaration
-        @@ (variantName @@ var "tname" @@ var "fname")
-        @@ list [record Cpp._BaseSpecifier [
-             Cpp._BaseSpecifier_access>>: inject Cpp._AccessSpecifier Cpp._AccessSpecifier_public unit,
-             Cpp._BaseSpecifier_name>>: className @@ var "parentClass"]]
-        @@ (just (wrap Cpp._ClassBody (
-          Lists.concat (list [
-            list [asTerm memberSpecificationPublic],
-            var "vFields",
-            list [inject Cpp._MemberSpecification Cpp._MemberSpecification_member $
-              inject Cpp._MemberDeclaration Cpp._MemberDeclaration_constructor $
-                record Cpp._ConstructorDeclaration [
-                  Cpp._ConstructorDeclaration_name>>: variantName @@ var "tname" @@ var "fname",
-                  Cpp._ConstructorDeclaration_parameters>>: var "vParams",
-                  Cpp._ConstructorDeclaration_initializers>>: var "initList",
-                  Cpp._ConstructorDeclaration_body>>: createConstructorBody @@ var "vParams"]]])))))
-
--- | Create the accept() method implementation using dynamic_cast chain
-createAcceptImplementation :: TTermDefinition (Name -> [FieldType] -> Cpp.Declaration)
-createAcceptImplementation = def "createAcceptImplementation" $
-  lambda "tname" $ lambda "variants" $
-    inject Cpp._Declaration Cpp._Declaration_template $
-      record Cpp._TemplateDeclaration [
-        Cpp._TemplateDeclaration_inline>>: boolean False,
-        Cpp._TemplateDeclaration_parameters>>: list [string "typename R"],
-        Cpp._TemplateDeclaration_declaration>>:
-          inject Cpp._Declaration Cpp._Declaration_function $
-            record Cpp._FunctionDeclaration [
-              Cpp._FunctionDeclaration_prefixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierPrefix]),
-              Cpp._FunctionDeclaration_returnType>>:
-                inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                  inject Cpp._BasicType Cpp._BasicType_named (string "R"),
-              Cpp._FunctionDeclaration_name>>: (className @@ var "tname") ++ string "::accept",
-              Cpp._FunctionDeclaration_parameters>>: list [
-                record Cpp._Parameter [
-                  Cpp._Parameter_type>>:
-                    inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-                      record Cpp._QualifiedType [
-                        Cpp._QualifiedType_baseType>>:
-                          inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-                            inject Cpp._BasicType Cpp._BasicType_named (
-                              (visitorName @@ var "tname") ++ string "<R>"),
-                        Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_lvalueRef unit],
-                  Cpp._Parameter_name>>: string "visitor",
-                  Cpp._Parameter_unnamed>>: boolean False,
-                  Cpp._Parameter_defaultValue>>: nothing]],
-              Cpp._FunctionDeclaration_suffixSpecifiers>>: list [
-                inject Cpp._FunctionSpecifierSuffix Cpp._FunctionSpecifierSuffix_const unit],
-              Cpp._FunctionDeclaration_body>>:
-                inject Cpp._FunctionBody Cpp._FunctionBody_compound $
-                  wrap Cpp._CompoundStatement (
-                    -- Generate dynamic_cast if-else chain for each variant
-                    -- Each variant checks dynamic_cast and calls visitor.visit(*ptr)
-                    -- The last branch throws std::runtime_error with typeid name
-                    Lists.map (lambda "ft" $
-                      "fname" <~ Core.fieldTypeName (var "ft") $
-                      -- Create an if statement with dynamic_cast and visitor.visit call
-                      inject Cpp._Statement Cpp._Statement_selection $
-                        record Cpp._SelectionStatement [
-                          Cpp._SelectionStatement_condition>>:
-                            -- auto ptr = dynamic_cast<const VariantName*>(this)
-                            inject Cpp._Expression Cpp._Expression_assignment $
-                              inject Cpp._AssignmentExpression Cpp._AssignmentExpression_assignment $
-                                record Cpp._ExplicitAssignment [
-                                  Cpp._ExplicitAssignment_left>>:
-                                    cppUnaryExpressionToCppLogicalOrExpression @@
-                                      (inject Cpp._UnaryExpression Cpp._UnaryExpression_postfix $
-                                        inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                                          inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (string "auto ptr")),
-                                  Cpp._ExplicitAssignment_op>>:
-                                    inject Cpp._AssignmentOperator Cpp._AssignmentOperator_assign unit,
-                                  Cpp._ExplicitAssignment_right>>:
-                                    inject Cpp._AssignmentExpression Cpp._AssignmentExpression_conditional $
-                                      inject Cpp._ConditionalExpression Cpp._ConditionalExpression_logicalOr $
-                                        cppUnaryExpressionToCppLogicalOrExpression @@
-                                          (inject Cpp._UnaryExpression Cpp._UnaryExpression_postfix $
-                                            inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-                                              record Cpp._FunctionCallOperation [
-                                                Cpp._FunctionCallOperation_function>>:
-                                                  inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                                                    inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (
-                                                      string "dynamic_cast<const " ++ (variantName @@ var "tname" @@ var "fname") ++ string "*>"),
-                                                Cpp._FunctionCallOperation_arguments>>: list [
-                                                  cppPrimaryExpressionToCppExpression @@
-                                                    (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (string "this"))]])],
-                          Cpp._SelectionStatement_thenBranch>>:
-                            inject Cpp._Statement Cpp._Statement_compound $
-                              wrap Cpp._CompoundStatement (list [
-                                inject Cpp._Statement Cpp._Statement_jump $
-                                  inject Cpp._JumpStatement Cpp._JumpStatement_returnValue $
-                                    cppPostfixExpressionToCppExpression @@
-                                      (inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-                                        record Cpp._FunctionCallOperation [
-                                          Cpp._FunctionCallOperation_function>>:
-                                            inject Cpp._PostfixExpression Cpp._PostfixExpression_memberAccess $
-                                              record Cpp._MemberAccessOperation [
-                                                Cpp._MemberAccessOperation_object>>:
-                                                  inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                                                    inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (string "visitor"),
-                                                Cpp._MemberAccessOperation_member>>: string "visit"],
-                                          Cpp._FunctionCallOperation_arguments>>: list [
-                                            cppUnaryExpressionToCppExpression @@
-                                              (inject Cpp._UnaryExpression Cpp._UnaryExpression_unaryOp $
-                                                record Cpp._UnaryOperation [
-                                                  Cpp._UnaryOperation_operator>>:
-                                                    inject Cpp._UnaryOperator Cpp._UnaryOperator_dereference unit,
-                                                  Cpp._UnaryOperation_operand>>:
-                                                    inject Cpp._UnaryExpression Cpp._UnaryExpression_postfix $
-                                                      inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                                                        inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier (string "ptr")])]])]),
-                          Cpp._SelectionStatement_elseBranch>>:
-                            just (createThrowStmt @@ string "std::runtime_error" @@ (asTerm createTypeIdNameCall))])
-                    (var "variants"))]]
-
--- | Generate forward declarations for all variant subclasses
-generateForwardDeclarations :: TTermDefinition (Name -> [FieldType] -> [Cpp.Declaration])
-generateForwardDeclarations = def "generateForwardDeclarations" $
-  lambda "tname" $ lambda "fields" $
-    Lists.map (lambda "ft" $
-      cppClassDeclaration @@ (variantName @@ var "tname" @@ Core.fieldTypeName (var "ft")) @@ list ([] :: [TTerm Cpp.BaseSpecifier]) @@ nothing)
-    (var "fields")
-
--- | Create a less-than operator for a record type (trivial/placeholder implementation)
-createLessThanOperator :: TTermDefinition (Name -> [FieldType] -> Cpp.Declaration)
-createLessThanOperator = def "createLessThanOperator" $
-  lambda "typeName" $ lambda "fields" $
-    inject Cpp._Declaration Cpp._Declaration_function $
-      record Cpp._FunctionDeclaration [
-        Cpp._FunctionDeclaration_prefixSpecifiers>>: list [
-          inject Cpp._FunctionSpecifierPrefix Cpp._FunctionSpecifierPrefix_inline unit],
-        Cpp._FunctionDeclaration_returnType>>:
-          inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-            inject Cpp._BasicType Cpp._BasicType_bool unit,
-        Cpp._FunctionDeclaration_name>>: string "operator<",
-        Cpp._FunctionDeclaration_parameters>>: list [
-          unnamedParameter @@ string "lhs" @@
-            (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-              inject Cpp._BasicType Cpp._BasicType_named (className @@ var "typeName")),
-          unnamedParameter @@ string "rhs" @@
-            (inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-              inject Cpp._BasicType Cpp._BasicType_named (className @@ var "typeName"))],
-        Cpp._FunctionDeclaration_suffixSpecifiers>>: list ([] :: [TTerm Cpp.FunctionSpecifierSuffix]),
-        Cpp._FunctionDeclaration_body>>:
-          inject Cpp._FunctionBody Cpp._FunctionBody_compound $
-            wrap Cpp._CompoundStatement (list [
-              inject Cpp._Statement Cpp._Statement_jump $
-                inject Cpp._JumpStatement Cpp._JumpStatement_returnValue $
-                  createLiteralBoolExpr @@ boolean False])]
-
-
--- ============================================================================
--- File generation
--- ============================================================================
-
--- | Serialize a header file from name, includes, and declarations
-serializeHeaderFile :: TTermDefinition (Name -> [Cpp.IncludeDirective] -> [Cpp.Declaration] -> (FilePath, String))
-serializeHeaderFile = def "serializeHeaderFile" $
-  lambda "name" $ lambda "includes" $ lambda "decls" $
-    pair
-      (bindingNameToFilePath @@ var "name")
-      (SerializationSource.printExpr @@
-        (SerializationSource.parenthesize @@
-          (TTerm (TermVariable (Name "hydra.cpp.serde.encodeProgram"))
-            @@ (createHeaderFile @@ var "includes" @@ var "decls"))))
-
--- | Convert a binding name to a file path
-bindingNameToFilePath :: TTermDefinition (Name -> FilePath)
-bindingNameToFilePath = def "bindingNameToFilePath" $
-  lambda "name" $
-    Names.nameToFilePath
-      @@ (inject _CaseConvention _CaseConvention_lowerSnake unit)
-      @@ (inject _CaseConvention _CaseConvention_lowerSnake unit)
-      @@ wrap _FileExtension (string "h")
-      @@ var "name"
-
--- | Find includes for a set of type definitions
-findIncludes :: TTermDefinition (Bool -> Namespace -> [TypeDefinition] -> [Cpp.IncludeDirective])
-findIncludes = def "findIncludes" $
-  lambda "withFwd" $ lambda "ns" $ lambda "defs" $
-    -- System includes based on metadata, plus domain includes for cross-namespace dependencies
-    -- For simplicity, include the standard set that the staging code conditionally includes
-    Lists.concat (list [
-      list [
-        record Cpp._IncludeDirective [
-          Cpp._IncludeDirective_name>>: string "memory",
-          Cpp._IncludeDirective_isSystem>>: boolean True],
-        record Cpp._IncludeDirective [
-          Cpp._IncludeDirective_name>>: string "stdexcept",
-          Cpp._IncludeDirective_isSystem>>: boolean True]],
-      -- Domain includes from cross-namespace type dependencies
-      Lists.map (lambda "depName" $
-        record Cpp._IncludeDirective [
-          Cpp._IncludeDirective_name>>: bindingNameToFilePath @@ var "depName",
-          Cpp._IncludeDirective_isSystem>>: boolean False])
-        (findTypeDependencies @@ var "ns" @@ var "defs"),
-      -- Fwd include if needed
-      Logic.ifElse (var "withFwd")
-        (list [record Cpp._IncludeDirective [
-          Cpp._IncludeDirective_name>>: bindingNameToFilePath @@ (fwdHeaderName @@ var "ns"),
-          Cpp._IncludeDirective_isSystem>>: boolean False]])
-        (list ([] :: [TTerm Cpp.IncludeDirective]))])
-
--- | Find type dependencies that are in other namespaces
-findTypeDependencies :: TTermDefinition (Namespace -> [TypeDefinition] -> [Name])
-findTypeDependencies = def "findTypeDependencies" $
-  lambda "ns" $ lambda "defs" $
-    Lists.filter
-      (lambda "n" $
-        Logic.not (Equality.equal
-          (Maybes.map (unaryFunction Packaging.unNamespace) (Names.namespaceOf @@ var "n"))
-          (just (Packaging.unNamespace (var "ns")))))
-      (Sets.toList (Lists.foldl
-        (lambda "acc" $ lambda "d" $
-          Sets.union (var "acc") (Dependencies.typeDependencyNames @@ boolean True @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "d"))))
-        (Sets.empty)
-        (var "defs")))
-
--- | Gather metadata from definitions (simplified: always include common headers)
-gatherMetadata :: TTermDefinition ([Definition] -> Bool)
-gatherMetadata = def "gatherMetadata" $
-  lambda "defs" $ boolean True
-
--- | Check whether a type maps to an STL container type
-isStdContainerType :: TTermDefinition (Type -> Bool)
-isStdContainerType = def "isStdContainerType" $
-  lambda "typ" $
-    "t" <~ (Strip.deannotateType @@ var "typ") $
-    cases _Type (var "t") (Just $ boolean False)
-    [_Type_application>>: lambda "at" $
-       isStdContainerType @@ Core.applicationTypeFunction (var "at"),
-     _Type_list>>: constant $ boolean True,
-     _Type_map>>: constant $ boolean True,
-     _Type_maybe>>: constant $ boolean True,
-     _Type_set>>: constant $ boolean True]
-
--- | Check whether a type is a struct type (not a literal and not an enum)
-isStructType :: TTermDefinition (Type -> Bool)
-isStructType = def "isStructType" $
-  lambda "rawType" $
-    "t" <~ (Resolution.fullyStripType @@ var "rawType") $
-    "isLiteral" <~ cases _Type (var "t") (Just $ boolean False)
-      [_Type_literal>>: constant $ boolean True] $
-    Logic.and
-      (Logic.not (var "isLiteral"))
-      (Logic.not (Predicates.isEnumType @@ var "rawType"))
-
--- | Check whether a type maps to a C++ template type (string or STL container)
-isTemplateType :: TTermDefinition (Type -> Bool)
-isTemplateType = def "isTemplateType" $
-  lambda "typ" $
-    "t" <~ (Strip.deannotateType @@ var "typ") $
-    Logic.or
-      (cases _Type (var "t") (Just $ boolean False)
-        [_Type_literal>>: lambda "lt" $
-          cases _LiteralType (var "lt") (Just $ boolean False)
-            [_LiteralType_string>>: constant $ boolean True]])
-      (isStdContainerType @@ var "typ")
-
-
--- ============================================================================
--- Module entry point
--- ============================================================================
-
--- | Generate a single type header file
-generateTypeFile :: TTermDefinition (Namespace -> TypeDefinition -> Context -> Graph -> Either Error (FilePath, String))
-generateTypeFile = def "generateTypeFile" $
-  lambda "ns" $ lambda "def_" $ "cx" ~> lambda "g" $
-    "name" <~ Packaging.typeDefinitionName (var "def_") $
-    "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "def_")) $
-    "decls" <<~ (encodeTypeDefinition @@ var "cx" @@ var "g" @@ var "name" @@ var "typ") $
-    "includes" <~ (findIncludes @@ boolean True @@ var "ns" @@ list [var "def_"]) $
-      right (serializeHeaderFile @@ var "name" @@ var "includes"
-        @@ list [namespaceDecl @@ var "ns" @@ var "decls"])
-
--- | Generate all type header files for a module (fwd file + individual class files)
-generateTypeFiles :: TTermDefinition (Namespace -> [TypeDefinition] -> Context -> Graph -> Either Error [(FilePath, String)])
-generateTypeFiles = def "generateTypeFiles" $
-  lambda "ns" $ lambda "defs" $ "cx" ~> lambda "g" $
-    "classFiles" <<~ (Eithers.mapList
-      (lambda "d" $ generateTypeFile @@ var "ns" @@ var "d" @@ var "cx" @@ var "g")
-      (var "defs")) $
-      right (var "classFiles")
-
--- | Convert a module to C++ code files (entry point)
-moduleToCpp :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToCpp = def "moduleToCpp" $
-  lambda "mod" $ lambda "defs" $ "cx" ~> lambda "g" $
-    "ns" <~ Packaging.moduleNamespace (var "mod") $
-    "typeDefs" <~ Pairs.first (Environment.partitionDefinitions @@ var "defs") $
-    "typeFiles" <<~ (generateTypeFiles @@ var "ns" @@ var "typeDefs" @@ var "cx" @@ var "g") $
-      right (Maps.fromList (var "typeFiles"))
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Environment.hs b/src/main/haskell/Hydra/Sources/Cpp/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Environment.hs
+++ /dev/null
@@ -1,47 +0,0 @@
--- | The CppEnvironment type used by C++ code generation.
-
-module Hydra.Sources.Cpp.Environment where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as CoreTypes
-import qualified Hydra.Sources.Kernel.Types.Packaging as ModuleTypes
-import qualified Hydra.Sources.Cpp.Syntax as CppSyntax
-
-ns :: Namespace
-ns = Namespace "hydra.cpp.environment"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-coreType :: String -> Type
-coreType = typeref CoreTypes.ns
-
-modulType :: String -> Type
-modulType = typeref ModuleTypes.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [CoreTypes.ns, ModuleTypes.ns],
-            moduleDescription = Just "Type definitions for C++ code generation environment"}
-  where
-    definitions = [
-      cppEnvironmentType]
-
--- | The CppEnvironment type definition
-cppEnvironmentType :: Binding
-cppEnvironmentType = define "CppEnvironment" $
-  doc "Environment for C++ code generation" $
-  T.record [
-    "namespaces" >:
-      doc "Namespace mapping for code generation" $
-      T.apply (modulType "Namespaces") T.string,
-    "boundTypeVariables" >:
-      doc "Type variables in scope, with their C++ names" $
-      T.pair (T.list (coreType "Name")) (T.map (coreType "Name") T.string)]
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Language.hs b/src/main/haskell/Hydra/Sources/Cpp/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Language.hs
+++ /dev/null
@@ -1,208 +0,0 @@
--- Note: this file was created with the help of a large language model. It requires further human review.
-
-module Hydra.Sources.Cpp.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.cpp.language"),
-            moduleDefinitions = [toDefinition cppLanguage, toDefinition cppReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for C++"}
-cppLanguage :: TTermDefinition Language
-cppLanguage = define "cppLanguage" $
-  doc "Language constraints for C++" $ lets [
-  "eliminationVariants">: Sets.fromList $ list [
-    Variants.eliminationVariantRecord,
-    Variants.eliminationVariantUnion,
-    Variants.eliminationVariantWrap],
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary,  -- char arrays, std::byte arrays
-    Variants.literalVariantBoolean, -- bool
-    Variants.literalVariantFloat,   -- float, double
-    Variants.literalVariantInteger, -- int, long, etc.
-    Variants.literalVariantString], -- std::string
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat32,      -- float
-    Core.floatTypeFloat64],     -- double
-  "functionVariants">: Sets.fromList $ list [
-    Variants.functionVariantElimination,
-    Variants.functionVariantLambda],
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeInt8,       -- char, int8_t
-    Core.integerTypeInt16,      -- short, int16_t
-    Core.integerTypeInt32,      -- int, int32_t
-    Core.integerTypeInt64,      -- long, long long, int64_t
-    Core.integerTypeBigint],    -- custom big integer implementation
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantApplication,
-    Variants.termVariantEither,      -- std::variant<Left, Right> with left/right semantics
-
-    Variants.termVariantCases,
-
-    Variants.termVariantLambda,
-
-    Variants.termVariantProject,
-
-    Variants.termVariantUnwrap,
-
-    Variants.termVariantTypeApplication,
-
-    Variants.termVariantTypeLambda,
-    Variants.termVariantLet,
-    Variants.termVariantList,        -- std::vector
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,         -- std::map
-    Variants.termVariantMaybe,       -- std::optional
-    Variants.termVariantPair,        -- std::pair
-    Variants.termVariantRecord,      -- struct with named fields
-    Variants.termVariantSet,         -- std::set
-    Variants.termVariantInject,       -- std::inject or enum
-    Variants.termVariantVariable,
-    Variants.termVariantWrap],       -- wrapper class
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantApplication, -- template instantiation
-    Variants.typeVariantEither,      -- std::variant<Left, Right>
-    Variants.typeVariantFunction,    -- function types
-    Variants.typeVariantForall,      -- templates
-    Variants.typeVariantList,        -- std::vector
-    Variants.typeVariantLiteral,     -- primitive types
-    Variants.typeVariantMap,         -- std::map
-    Variants.typeVariantMaybe,       -- std::optional
-    Variants.typeVariantPair,        -- std::pair
-    Variants.typeVariantRecord,      -- structs
-    Variants.typeVariantSet,         -- std::set
-    Variants.typeVariantUnion,       -- std::variant, enum
-    Variants.typeVariantVariable,    -- type parameters
-    Variants.typeVariantWrap],       -- wrapper class
-  "typePredicate">: constant true] $ -- TODO: refine this with C++ specific constraints
-  Coders.language
-    (Coders.languageName_ $ string "hydra.cpp")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-cppReservedWords :: TTermDefinition (S.Set String)
-cppReservedWords = define "cppReservedWords" $
-  doc "A set of reserved words in C++" $ lets [
-  "cppKeywords">:
-    doc "C++ keywords, including C++11/14/17/20 additions" $
-    list $ string <$> [
-      -- C++ keywords
-      "alignas", "alignof", "and", "and_eq", "asm", "auto", "bitand", "bitor", "bool", "break",
-      "case", "catch", "char", "char8_t", "char16_t", "char32_t", "class", "compl", "concept", "const",
-      "consteval", "constexpr", "constinit", "const_cast", "continue", "co_await", "co_return", "co_yield",
-      "decltype", "default", "delete", "do", "double", "dynamic_cast", "else", "enum", "explicit", "export",
-      "extern", "false", "float", "for", "friend", "goto", "if", "inline", "int", "long", "mutable",
-      "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", "private",
-      "protected", "public", "register", "reinterpret_cast", "requires", "return", "short", "signed",
-      "sizeof", "static", "static_assert", "static_cast", "struct", "switch", "template", "this",
-      "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", "union", "unsigned", "using",
-      "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq"],
-  "cppPreprocessor">:
-    doc "C++ preprocessor directives" $
-    list $ string <$> [
-      "#define", "#elif", "#else", "#endif", "#error", "#if", "#ifdef", "#ifndef", "#include", "#line",
-      "#pragma", "#undef"],
-  "cppStlTypes">:
-    doc "Common STL types and namespaces that should be treated as reserved" $
-    list $ string <$> [
-      "std", "string", "vector", "map", "set", "optional", "variant", "pair", "tuple",
-      "function", "array", "deque", "forward_list", "list", "multimap", "multiset",
-      "unordered_map", "unordered_set", "unordered_multimap", "unordered_multiset",
-      "stack", "queue", "priority_queue", "shared_ptr", "unique_ptr", "weak_ptr"],
-  "hydraCppKeywords">:
-    doc "Reserved words which are specific to Hydra" $
-    list $ string <$> []] $
-  Sets.fromList $ Lists.concat $ list [
-    var "cppKeywords",
-    var "cppPreprocessor",
-    var "cppStlTypes",
-    var "hydraCppKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Names.hs b/src/main/haskell/Hydra/Sources/Cpp/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Names.hs
+++ /dev/null
@@ -1,291 +0,0 @@
--- | C++ naming utilities: encoding Hydra names as C++ names.
--- Provides functions for converting Hydra names to C++ naming conventions.
-
-module Hydra.Sources.Cpp.Names where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Cpp.Syntax as Cpp
-import qualified Hydra.Sources.Cpp.Syntax as CppSyntax
-import qualified Hydra.Sources.Cpp.Utils as CppUtils
-import qualified Hydra.Sources.Cpp.Environment as CppEnvironment
-import qualified Hydra.Sources.Cpp.Language as CppLanguage
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.cpp.names"
-
-cppLanguageNs :: Namespace
-cppLanguageNs = Namespace "hydra.cpp.language"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Names.ns, Formatting.ns, cppLanguageNs, CppUtils.ns],
-            moduleTypeDependencies = (CppEnvironment.ns:CppSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "C++ naming utilities: encoding Hydra names as C++ names"}
-  where
-    definitions = [
-      toDefinition className,
-      toDefinition createTypeReference,
-      toDefinition encodeEnumValue,
-      toDefinition encodeFieldName,
-      toDefinition encodeName,
-      toDefinition encodeNameQualified,
-      toDefinition encodeNamespace,
-      toDefinition encodeTypeVariable,
-      toDefinition fwdHeaderName,
-      toDefinition namespaceDecl,
-      toDefinition partialVisitorName,
-      toDefinition sanitizeCppName,
-      toDefinition termVariableReference,
-      toDefinition typeVariableReference,
-      toDefinition variableReference,
-      toDefinition variantName,
-      toDefinition visitorName]
-
--- | Get the C++ class name from a Hydra Name
-className :: TTermDefinition (Name -> String)
-className = def "className" $
-  doc "Get the C++ class name from a Hydra Name" $
-  lambda "name" $
-    sanitizeCppName @@ (Names.localNameOf @@ var "name")
-
--- | Create a type reference, optionally wrapped in shared_ptr
-createTypeReference :: TTermDefinition (Bool -> CppUtils.CppEnvironment -> Name -> Cpp.TypeExpression)
-createTypeReference = def "createTypeReference" $
-  doc "Create a type reference, optionally wrapped in shared_ptr" $
-  lambdas ["isPointer", "env", "name"] $ lets [
-    "baseType">:
-      inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-        inject Cpp._BasicType Cpp._BasicType_named $
-          encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ var "name"] $
-    Logic.ifElse (var "isPointer")
-      (CppUtils.toConstType @@ var "baseType")
-      (var "baseType")
-
--- | Encode an enum value with appropriate naming convention
-encodeEnumValue :: TTermDefinition (CppUtils.CppEnvironment -> Name -> String)
-encodeEnumValue = def "encodeEnumValue" $
-  doc "Encode an enum value with appropriate naming convention" $
-  encodeName @@ false @@ Util.caseConventionUpperSnake
-
--- | Encode a field name with appropriate naming convention
-encodeFieldName :: TTermDefinition (CppUtils.CppEnvironment -> Name -> String)
-encodeFieldName = def "encodeFieldName" $
-  doc "Encode a field name with appropriate naming convention" $
-  lambdas ["env", "fname"] $
-    encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "fname"
-
--- | Encode a qualified name with namespace
-encodeNameQualified :: TTermDefinition (CppUtils.CppEnvironment -> Name -> String)
-encodeNameQualified = def "encodeNameQualified" $
-  doc "Encode a qualified name with namespace" $
-  lambdas ["env", "name"] $ lets [
-    "boundVars">: Pairs.second $
-      project CppUtils._CppEnvironment CppUtils._CppEnvironment_boundTypeVariables @@ var "env",
-    "focusNs">: Pairs.first $
-      Packaging.namespacesFocus
-        (project CppUtils._CppEnvironment CppUtils._CppEnvironment_namespaces @@ var "env"),
-    "qualName">: Names.qualifyName @@ var "name",
-    "mns">: Packaging.qualifiedNameNamespace $ var "qualName",
-    "local">: Packaging.qualifiedNameLocal $ var "qualName"] $
-    Maybes.maybe
-      (Logic.ifElse (Equality.equal (var "mns") (just $ var "focusNs"))
-        (sanitizeCppName @@ var "local")
-        (Strings.intercalate (string "::")
-          (Lists.map sanitizeCppName
-            (Strings.splitOn (string ".") (Core.unName $ var "name")))))
-      (lambda "n" $ var "n")
-      (Maps.lookup (var "name") (var "boundVars"))
-
--- | Encode a name with specified convention
-encodeName :: TTermDefinition (Bool -> CaseConvention -> CppUtils.CppEnvironment -> Name -> String)
-encodeName = def "encodeName" $
-  doc "Encode a name with specified convention" $
-  lambdas ["isQualified", "conv", "env", "name"] $ lets [
-    "focusNs">: Pairs.first $
-      Packaging.namespacesFocus
-        (project CppUtils._CppEnvironment CppUtils._CppEnvironment_namespaces @@ var "env"),
-    "boundVars">: Pairs.second $
-      project CppUtils._CppEnvironment CppUtils._CppEnvironment_boundTypeVariables @@ var "env",
-    "qualName">: Names.qualifyName @@ var "name",
-    "mns">: Packaging.qualifiedNameNamespace $ var "qualName",
-    "local">: Packaging.qualifiedNameLocal $ var "qualName",
-    "cppLocal">: sanitizeCppName @@ (Formatting.convertCase @@ Util.caseConventionCamel @@ var "conv" @@ var "local"),
-    "cppNs">: lambda "nsVal" $ Strings.intercalate (string "::")
-      (Lists.map (Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionLowerSnake)
-        (Strings.splitOn (string ".") (Packaging.unNamespace $ var "nsVal")))] $
-    Logic.ifElse (var "isQualified")
-      (Maybes.maybe
-        (Maybes.maybe
-          (var "cppLocal")
-          (lambda "nsVal" $ Strings.cat2 (var "cppNs" @@ var "nsVal") (Strings.cat2 (string "::") (var "cppLocal")))
-          (var "mns"))
-        (lambda "n" $ var "n")
-        (Maps.lookup (var "name") (var "boundVars")))
-      (var "cppLocal")
-
--- | Encode a namespace as a C++ namespace string
-encodeNamespace :: TTermDefinition (Namespace -> String)
-encodeNamespace = def "encodeNamespace" $
-  doc "Encode a namespace as a C++ namespace string" $
-  lambda "nsVal" $
-    Strings.intercalate (string "::")
-      (Lists.map (Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionLowerSnake)
-        (Strings.splitOn (string ".") (Packaging.unNamespace $ var "nsVal")))
-
--- | Encode a type variable name
-encodeTypeVariable :: TTermDefinition (Name -> String)
-encodeTypeVariable = def "encodeTypeVariable" $
-  doc "Encode a type variable name" $
-  lambda "name" $
-    Formatting.capitalize @@ (Core.unName $ var "name")
-
--- | Get the forward header name for a namespace
-fwdHeaderName :: TTermDefinition (Namespace -> Name)
-fwdHeaderName = def "fwdHeaderName" $
-  doc "Get the forward header name for a namespace" $
-  lambda "nsVal" $
-    Names.unqualifyName @@
-      (Packaging.qualifiedName (just $ var "nsVal") (string "Fwd"))
-
--- | Create a namespace declaration wrapping inner declarations
-namespaceDecl :: TTermDefinition (Namespace -> [Cpp.Declaration] -> Cpp.Declaration)
-namespaceDecl = def "namespaceDecl" $
-  doc "Create a namespace declaration wrapping inner declarations" $
-  lambdas ["nsVal", "decls"] $
-    inject Cpp._Declaration Cpp._Declaration_namespace $
-      record Cpp._NamespaceDeclaration [
-        Cpp._NamespaceDeclaration_name>>: encodeNamespace @@ var "nsVal",
-        Cpp._NamespaceDeclaration_declarations>>: var "decls"]
-
--- | Get the partial visitor name for a type
-partialVisitorName :: TTermDefinition (Name -> String)
-partialVisitorName = def "partialVisitorName" $
-  doc "Get the partial visitor name for a type" $
-  lambda "name" $
-    sanitizeCppName @@ (Strings.cat2 (Names.localNameOf @@ var "name") (string "PartialVisitor"))
-
--- | Sanitize a name to be valid in C++
-sanitizeCppName :: TTermDefinition (String -> String)
-sanitizeCppName = def "sanitizeCppName" $
-  doc "Sanitize a name to be valid in C++" $
-  Formatting.sanitizeWithUnderscores @@ CppLanguage.cppReservedWords
-
--- | Create a reference to a term variable
-termVariableReference :: TTermDefinition (CppUtils.CppEnvironment -> Name -> Cpp.Expression)
-termVariableReference = def "termVariableReference" $
-  doc "Create a reference to a term variable" $
-  variableReference @@ Util.caseConventionLowerSnake
-
--- | Create a reference to a type variable
-typeVariableReference :: TTermDefinition (CppUtils.CppEnvironment -> Name -> Cpp.TypeExpression)
-typeVariableReference = def "typeVariableReference" $
-  doc "Create a reference to a type variable" $
-  lambdas ["env", "name"] $
-    inject Cpp._TypeExpression Cpp._TypeExpression_basic $
-      inject Cpp._BasicType Cpp._BasicType_named $
-        encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ var "name"
-
--- | Create a variable reference expression
-variableReference :: TTermDefinition (CaseConvention -> CppUtils.CppEnvironment -> Name -> Cpp.Expression)
-variableReference = def "variableReference" $
-  doc "Create a variable reference expression" $
-  lambdas ["conv", "env", "name"] $
-    CppUtils.createIdentifierExpr @@ (encodeName @@ true @@ var "conv" @@ var "env" @@ var "name")
-
--- | Get the variant name by combining type name and field name
-variantName :: TTermDefinition (Name -> Name -> String)
-variantName = def "variantName" $
-  doc "Get the variant name by combining type name and field name" $
-  lambdas ["tname", "fname"] $
-    sanitizeCppName @@
-      (Strings.cat2 (Names.localNameOf @@ var "tname") (Formatting.capitalize @@ (Core.unName $ var "fname")))
-
--- | Get the visitor name for a type
-visitorName :: TTermDefinition (Name -> String)
-visitorName = def "visitorName" $
-  doc "Get the visitor name for a type" $
-  lambda "name" $
-    sanitizeCppName @@ (Strings.cat2 (Names.localNameOf @@ var "name") (string "Visitor"))
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Serde.hs b/src/main/haskell/Hydra/Sources/Cpp/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Serde.hs
+++ /dev/null
@@ -1,1590 +0,0 @@
--- Note: this file was created with the help of a large language model. It requires further human review.
-
-module Hydra.Sources.Cpp.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Cpp.Syntax as Cpp
-import qualified Hydra.Sources.Cpp.Syntax as CppSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.cpp.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = (CppSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting C++ AST to abstract expressions"}
-  where
-    definitions = [
-      toDefinition encodeAccessSpecifier,
-      toDefinition encodeAddOperation,
-      toDefinition encodeAdditiveExpression,
-      toDefinition encodeAndExpression,
-      toDefinition encodeAssignmentExpression,
-      toDefinition encodeAssignmentOperator,
-      toDefinition encodeBaseSpecifier,
-      toDefinition encodeBasicType,
-      toDefinition encodeBitwiseAndOperation,
-      toDefinition encodeBitwiseOrOperation,
-      toDefinition encodeBitwiseXorOperation,
-      toDefinition encodeBooleanLiteral,
-      toDefinition encodeCapture,
-      toDefinition encodeCaptureList,
-      toDefinition encodeCaseStatement,
-      toDefinition encodeCaseValue,
-      toDefinition encodeClassBody,
-      toDefinition encodeClassDeclaration,
-      toDefinition encodeClassKey,
-      toDefinition encodeClassSpecifier,
-      toDefinition encodeCommaExpression,
-      toDefinition encodeComment,
-      toDefinition encodeCompoundStatement,
-      toDefinition encodeConditionalExpression,
-      toDefinition encodeConstructorDeclaration,
-      toDefinition encodeDeclaration,
-      toDefinition encodeDefineDirective,
-      toDefinition encodeDestructorDeclaration,
-      toDefinition encodeDivideOperation,
-      toDefinition encodeDoStatement,
-      toDefinition encodeElifDirective,
-      toDefinition encodeElseDirective,
-      toDefinition encodeEndifDirective,
-      toDefinition encodeEqualOperation,
-      toDefinition encodeEqualityExpression,
-      toDefinition encodeErrorDirective,
-      toDefinition encodeExclusiveOrExpression,
-      toDefinition encodeExplicitAssignment,
-      toDefinition encodeExpression,
-      toDefinition encodeForInit,
-      toDefinition encodeForStatement,
-      toDefinition encodeFunctionApplication,
-      toDefinition encodeFunctionBody,
-      toDefinition encodeFunctionCallOperation,
-      toDefinition encodeFunctionDeclaration,
-      toDefinition encodeFunctionIdentifier,
-      toDefinition encodeFunctionSpecifierPrefix,
-      toDefinition encodeFunctionSpecifierSuffix,
-      toDefinition encodeFunctionType,
-      toDefinition encodeGreaterEqualOperation,
-      toDefinition encodeGreaterOperation,
-      toDefinition encodeIfDirective,
-      toDefinition encodeIfdefDirective,
-      toDefinition encodeIfndefDirective,
-      toDefinition encodeIncludeDirective,
-      toDefinition encodeInclusiveOrExpression,
-      toDefinition encodeIntegerLiteral,
-      toDefinition encodeIterationStatement,
-      toDefinition encodeJumpStatement,
-      toDefinition encodeLabeledStatement,
-      toDefinition encodeLambdaExpression,
-      toDefinition encodeLeftShiftOperation,
-      toDefinition encodeLessEqualOperation,
-      toDefinition encodeLessOperation,
-      toDefinition encodeLineDirective,
-      toDefinition encodeLiteral,
-      toDefinition encodeLogicalAndExpression,
-      toDefinition encodeLogicalAndOperation,
-      toDefinition encodeLogicalOrExpression,
-      toDefinition encodeLogicalOrOperation,
-      toDefinition encodeMap,
-      toDefinition encodeMapEntry,
-      toDefinition encodeMemInitializer,
-      toDefinition encodeMemberAccessOperation,
-      toDefinition encodeMemberDeclaration,
-      toDefinition encodeMemberSpecification,
-      toDefinition encodeModuloOperation,
-      toDefinition encodeMultiplicativeExpression,
-      toDefinition encodeMultiplyOperation,
-      toDefinition encodeNamespaceDeclaration,
-      toDefinition encodeNotEqualOperation,
-      toDefinition encodeOptional,
-      toDefinition encodeOverloadedLambdas,
-      toDefinition encodeParameter,
-      toDefinition encodePatternMatch,
-      toDefinition encodePointerMemberAccessOperation,
-      toDefinition encodePostfixExpression,
-      toDefinition encodePragmaDirective,
-      toDefinition encodePreprocessorDirective,
-      toDefinition encodePrimaryExpression,
-      toDefinition encodeProgram,
-      toDefinition encodeQualifiedIdentifier,
-      toDefinition encodeQualifiedType,
-      toDefinition encodeRangeForStatement,
-      toDefinition encodeRelationalExpression,
-      toDefinition encodeRightShiftOperation,
-      toDefinition encodeSelectionStatement,
-      toDefinition encodeSet,
-      toDefinition encodeShiftExpression,
-      toDefinition encodeSizeofExpression,
-      toDefinition encodeStatement,
-      toDefinition encodeSubscriptOperation,
-      toDefinition encodeSubtractOperation,
-      toDefinition encodeSwitchStatement,
-      toDefinition encodeTemplateArgument,
-      toDefinition encodeTemplateDeclaration,
-      toDefinition encodeTemplateFunctionCallOperation,
-      toDefinition encodeTemplateType,
-      toDefinition encodeTernaryExpression,
-      toDefinition encodeToCppComments,
-      toDefinition encodeTypeExpression,
-      toDefinition encodeTypedefDeclaration,
-      toDefinition encodeUnaryExpression,
-      toDefinition encodeUnaryOperation,
-      toDefinition encodeUnaryOperator,
-      toDefinition encodeUndefDirective,
-      toDefinition encodeVariableDeclaration,
-      toDefinition encodeVector,
-      toDefinition encodeVisitor,
-      toDefinition encodeWarningDirective,
-      toDefinition encodeWhileStatement]
-
-
-encodeAccessSpecifier :: TTermDefinition (Cpp.AccessSpecifier -> Expr)
-encodeAccessSpecifier = define "encodeAccessSpecifier" $
-  doc "Convert an access specifier to an expression" $
-  lambda "a" $
-    cases Cpp._AccessSpecifier (var "a") Nothing [
-      Cpp._AccessSpecifier_public>>: constant $ Serialization.cst @@ string "public",
-      Cpp._AccessSpecifier_protected>>: constant $ Serialization.cst @@ string "protected",
-      Cpp._AccessSpecifier_private>>: constant $ Serialization.cst @@ string "private",
-      Cpp._AccessSpecifier_none>>: constant $ Serialization.cst @@ string ""]
-
-encodeAddOperation :: TTermDefinition (Cpp.AddOperation -> Expr)
-encodeAddOperation = define "encodeAddOperation" $
-  doc "Convert an add operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._AddOperation Cpp._AddOperation_left @@ var "op",
-    "right">: project Cpp._AddOperation Cpp._AddOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeAdditiveExpression @@ var "left",
-      Serialization.cst @@ string "+",
-      encodeMultiplicativeExpression @@ var "right"]
-
-encodeAdditiveExpression :: TTermDefinition (Cpp.AdditiveExpression -> Expr)
-encodeAdditiveExpression = define "encodeAdditiveExpression" $
-  doc "Convert an additive expression to an expression" $
-  lambda "e" $
-    cases Cpp._AdditiveExpression (var "e") Nothing [
-      Cpp._AdditiveExpression_multiplicative>>: lambda "m" $ encodeMultiplicativeExpression @@ var "m",
-      Cpp._AdditiveExpression_add>>: lambda "a" $ encodeAddOperation @@ var "a",
-      Cpp._AdditiveExpression_subtract>>: lambda "s" $ encodeSubtractOperation @@ var "s"]
-
-encodeAndExpression :: TTermDefinition (Cpp.AndExpression -> Expr)
-encodeAndExpression = define "encodeAndExpression" $
-  doc "Convert an and expression to an expression" $
-  lambda "e" $
-    cases Cpp._AndExpression (var "e") Nothing [
-      Cpp._AndExpression_equality>>: lambda "eq" $ encodeEqualityExpression @@ var "eq",
-      Cpp._AndExpression_bitwiseAnd>>: lambda "a" $ encodeBitwiseAndOperation @@ var "a"]
-
-encodeAssignmentExpression :: TTermDefinition (Cpp.AssignmentExpression -> Expr)
-encodeAssignmentExpression = define "encodeAssignmentExpression" $
-  doc "Convert an assignment expression to an expression" $
-  lambda "a" $
-    cases Cpp._AssignmentExpression (var "a") Nothing [
-      Cpp._AssignmentExpression_conditional>>: lambda "c" $ encodeConditionalExpression @@ var "c",
-      Cpp._AssignmentExpression_assignment>>: lambda "e" $ encodeExplicitAssignment @@ var "e"]
-
-encodeAssignmentOperator :: TTermDefinition (Cpp.AssignmentOperator -> Expr)
-encodeAssignmentOperator = define "encodeAssignmentOperator" $
-  doc "Convert an assignment operator to an expression" $
-  lambda "op" $
-    cases Cpp._AssignmentOperator (var "op") Nothing [
-      Cpp._AssignmentOperator_assign>>: constant $ Serialization.cst @@ string "=",
-      Cpp._AssignmentOperator_plusAssign>>: constant $ Serialization.cst @@ string "+=",
-      Cpp._AssignmentOperator_minusAssign>>: constant $ Serialization.cst @@ string "-=",
-      Cpp._AssignmentOperator_multiplyAssign>>: constant $ Serialization.cst @@ string "*=",
-      Cpp._AssignmentOperator_divideAssign>>: constant $ Serialization.cst @@ string "/=",
-      Cpp._AssignmentOperator_moduloAssign>>: constant $ Serialization.cst @@ string "%=",
-      Cpp._AssignmentOperator_leftShiftAssign>>: constant $ Serialization.cst @@ string "<<=",
-      Cpp._AssignmentOperator_rightShiftAssign>>: constant $ Serialization.cst @@ string ">>=",
-      Cpp._AssignmentOperator_bitwiseAndAssign>>: constant $ Serialization.cst @@ string "&=",
-      Cpp._AssignmentOperator_bitwiseXorAssign>>: constant $ Serialization.cst @@ string "^=",
-      Cpp._AssignmentOperator_bitwiseOrAssign>>: constant $ Serialization.cst @@ string "|="]
-
-encodeBaseSpecifier :: TTermDefinition (Cpp.BaseSpecifier -> Expr)
-encodeBaseSpecifier = define "encodeBaseSpecifier" $
-  doc "Convert a base specifier to an expression" $
-  lambda "bs" $ lets [
-    "access">: project Cpp._BaseSpecifier Cpp._BaseSpecifier_access @@ var "bs",
-    "name">: project Cpp._BaseSpecifier Cpp._BaseSpecifier_name @@ var "bs"] $
-    Serialization.spaceSep @@ list [encodeAccessSpecifier @@ var "access", Serialization.cst @@ var "name"]
-
-encodeBasicType :: TTermDefinition (Cpp.BasicType -> Expr)
-encodeBasicType = define "encodeBasicType" $
-  doc "Convert a basic type to an expression" $
-  lambda "t" $
-    cases Cpp._BasicType (var "t") Nothing [
-      Cpp._BasicType_void>>: constant $ Serialization.cst @@ string "void",
-      Cpp._BasicType_bool>>: constant $ Serialization.cst @@ string "bool",
-      Cpp._BasicType_char>>: constant $ Serialization.cst @@ string "char",
-      Cpp._BasicType_int>>: constant $ Serialization.cst @@ string "int",
-      Cpp._BasicType_float>>: constant $ Serialization.cst @@ string "float",
-      Cpp._BasicType_double>>: constant $ Serialization.cst @@ string "double",
-      Cpp._BasicType_string>>: constant $ Serialization.cst @@ string "std::string",
-      Cpp._BasicType_auto>>: constant $ Serialization.cst @@ string "auto",
-      Cpp._BasicType_named>>: lambda "name" $ Serialization.cst @@ var "name"]
-
-encodeBitwiseAndOperation :: TTermDefinition (Cpp.BitwiseAndOperation -> Expr)
-encodeBitwiseAndOperation = define "encodeBitwiseAndOperation" $
-  doc "Convert a bitwise and operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._BitwiseAndOperation Cpp._BitwiseAndOperation_left @@ var "op",
-    "right">: project Cpp._BitwiseAndOperation Cpp._BitwiseAndOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeAndExpression @@ var "left",
-      Serialization.cst @@ string "&",
-      encodeEqualityExpression @@ var "right"]
-
-encodeBitwiseOrOperation :: TTermDefinition (Cpp.BitwiseOrOperation -> Expr)
-encodeBitwiseOrOperation = define "encodeBitwiseOrOperation" $
-  doc "Convert a bitwise or operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._BitwiseOrOperation Cpp._BitwiseOrOperation_left @@ var "op",
-    "right">: project Cpp._BitwiseOrOperation Cpp._BitwiseOrOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeInclusiveOrExpression @@ var "left",
-      Serialization.cst @@ string "|",
-      encodeExclusiveOrExpression @@ var "right"]
-
-encodeBitwiseXorOperation :: TTermDefinition (Cpp.BitwiseXorOperation -> Expr)
-encodeBitwiseXorOperation = define "encodeBitwiseXorOperation" $
-  doc "Convert a bitwise xor operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._BitwiseXorOperation Cpp._BitwiseXorOperation_left @@ var "op",
-    "right">: project Cpp._BitwiseXorOperation Cpp._BitwiseXorOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeExclusiveOrExpression @@ var "left",
-      Serialization.cst @@ string "^",
-      encodeAndExpression @@ var "right"]
-
-encodeBooleanLiteral :: TTermDefinition (Cpp.BooleanLiteral -> Expr)
-encodeBooleanLiteral = define "encodeBooleanLiteral" $
-  doc "Convert a boolean literal to an expression" $
-  lambda "bl" $
-    Logic.ifElse (unwrap Cpp._BooleanLiteral @@ var "bl")
-      (Serialization.cst @@ string "true")
-      (Serialization.cst @@ string "false")
-
-encodeCapture :: TTermDefinition (Cpp.Capture -> Expr)
-encodeCapture = define "encodeCapture" $
-  doc "Convert a capture to an expression" $
-  lambda "cap" $ lets [
-    "name">: project Cpp._Capture Cpp._Capture_name @@ var "cap",
-    "byRef">: project Cpp._Capture Cpp._Capture_byReference @@ var "cap"] $
-    Logic.ifElse (var "byRef")
-      (Serialization.cst @@ (Strings.cat2 (string "&") (var "name")))
-      (Serialization.cst @@ var "name")
-
-encodeCaptureList :: TTermDefinition (Cpp.CaptureList -> Expr)
-encodeCaptureList = define "encodeCaptureList" $
-  doc "Convert a capture list to an expression" $
-  lambda "cl" $
-    cases Cpp._CaptureList (var "cl") Nothing [
-      Cpp._CaptureList_captureByValue>>: constant $ Serialization.cst @@ string "[=]",
-      Cpp._CaptureList_captures>>: lambda "cs" $
-        Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map encodeCapture (var "cs"))]
-
-encodeCaseStatement :: TTermDefinition (Cpp.CaseStatement -> Expr)
-encodeCaseStatement = define "encodeCaseStatement" $
-  doc "Convert a case statement to an expression" $
-  lambda "stmt" $
-    cases Cpp._CaseStatement (var "stmt") Nothing [
-      Cpp._CaseStatement_case>>: lambda "cv" $ encodeCaseValue @@ var "cv",
-      Cpp._CaseStatement_default>>: lambda "s" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "default:",
-          encodeStatement @@ var "s"]]
-
-encodeCaseValue :: TTermDefinition (Cpp.CaseValue -> Expr)
-encodeCaseValue = define "encodeCaseValue" $
-  doc "Convert a case value to an expression" $
-  lambda "cv" $ lets [
-    "value">: project Cpp._CaseValue Cpp._CaseValue_value @@ var "cv",
-    "statement">: project Cpp._CaseValue Cpp._CaseValue_statement @@ var "cv"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "case",
-      Serialization.noSep @@ list [encodeExpression @@ var "value", Serialization.cst @@ string ":"],
-      encodeStatement @@ var "statement"]
-
-encodeClassBody :: TTermDefinition (Bool -> Cpp.ClassBody -> Expr)
-encodeClassBody = define "encodeClassBody" $
-  doc "Convert a class body to an expression" $
-  lambda "commas" $ lambda "cb" $
-    Serialization.curlyBlock @@ Serialization.fullBlockStyle @@
-      (Serialization.doubleNewlineSep @@ (Lists.map (encodeMemberSpecification @@ var "commas") (unwrap Cpp._ClassBody @@ var "cb")))
-
-encodeClassDeclaration :: TTermDefinition (Cpp.ClassDeclaration -> Expr)
-encodeClassDeclaration = define "encodeClassDeclaration" $
-  doc "Convert a class declaration to an expression" $
-  lambda "cd" $ lets [
-    "spec">: project Cpp._ClassDeclaration Cpp._ClassDeclaration_specifier @@ var "cd",
-    "mbody">: project Cpp._ClassDeclaration Cpp._ClassDeclaration_body @@ var "cd",
-    "key">: project Cpp._ClassSpecifier Cpp._ClassSpecifier_key @@ var "spec",
-    "isEnum">: Logic.or
-      (Equality.equal (var "key") (inject Cpp._ClassKey Cpp._ClassKey_enum unit))
-      (Equality.equal (var "key") (inject Cpp._ClassKey Cpp._ClassKey_enumClass unit))] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ (Maybes.cat $ list [
-      just (encodeClassSpecifier @@ var "spec"),
-      Maybes.map (lambda "body" $ encodeClassBody @@ var "isEnum" @@ var "body") (var "mbody")]))
-
-encodeClassKey :: TTermDefinition (Cpp.ClassKey -> Expr)
-encodeClassKey = define "encodeClassKey" $
-  doc "Convert a class key to an expression" $
-  lambda "k" $
-    cases Cpp._ClassKey (var "k") Nothing [
-      Cpp._ClassKey_class>>: constant $ Serialization.cst @@ string "class",
-      Cpp._ClassKey_enum>>: constant $ Serialization.cst @@ string "enum",
-      Cpp._ClassKey_enumClass>>: constant $ Serialization.cst @@ string "enum class",
-      Cpp._ClassKey_struct>>: constant $ Serialization.cst @@ string "struct"]
-
-encodeClassSpecifier :: TTermDefinition (Cpp.ClassSpecifier -> Expr)
-encodeClassSpecifier = define "encodeClassSpecifier" $
-  doc "Convert a class specifier to an expression" $
-  lambda "cs" $ lets [
-    "key">: project Cpp._ClassSpecifier Cpp._ClassSpecifier_key @@ var "cs",
-    "name">: project Cpp._ClassSpecifier Cpp._ClassSpecifier_name @@ var "cs",
-    "inheritance">: project Cpp._ClassSpecifier Cpp._ClassSpecifier_inheritance @@ var "cs"] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      list [encodeClassKey @@ var "key", Serialization.cst @@ var "name"],
-      Logic.ifElse (Lists.null (var "inheritance"))
-        (list ([] :: [TTerm Expr]))
-        (list [Serialization.cst @@ string ":",
-          Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeBaseSpecifier (var "inheritance"))])])
-
-encodeCommaExpression :: TTermDefinition (Cpp.CommaExpression -> Expr)
-encodeCommaExpression = define "encodeCommaExpression" $
-  doc "Convert a comma expression to an expression" $
-  lambda "ce" $ lets [
-    "left">: project Cpp._CommaExpression Cpp._CommaExpression_left @@ var "ce",
-    "right">: project Cpp._CommaExpression Cpp._CommaExpression_right @@ var "ce"] $
-    Serialization.spaceSep @@ list [
-      encodeExpression @@ var "left",
-      Serialization.cst @@ string ",",
-      encodeAssignmentExpression @@ var "right"]
-
-encodeComment :: TTermDefinition (Cpp.Comment -> Expr)
-encodeComment = define "encodeComment" $
-  doc "Convert a comment to an expression" $
-  lambda "c" $ lets [
-    "text">: project Cpp._Comment Cpp._Comment_text @@ var "c",
-    "isMultiline">: project Cpp._Comment Cpp._Comment_isMultiline @@ var "c"] $
-    Serialization.cst @@ (encodeToCppComments @@ var "text" @@ var "isMultiline")
-
-encodeCompoundStatement :: TTermDefinition (Cpp.CompoundStatement -> Expr)
-encodeCompoundStatement = define "encodeCompoundStatement" $
-  doc "Convert a compound statement to an expression" $
-  lambda "cs" $
-    Serialization.curlyBracesList @@ (just (string "")) @@ Serialization.fullBlockStyle @@
-      (Lists.map encodeStatement (unwrap Cpp._CompoundStatement @@ var "cs"))
-
-encodeConditionalExpression :: TTermDefinition (Cpp.ConditionalExpression -> Expr)
-encodeConditionalExpression = define "encodeConditionalExpression" $
-  doc "Convert a conditional expression to an expression" $
-  lambda "c" $
-    cases Cpp._ConditionalExpression (var "c") Nothing [
-      Cpp._ConditionalExpression_logicalOr>>: lambda "l" $ encodeLogicalOrExpression @@ var "l",
-      Cpp._ConditionalExpression_ternary>>: lambda "t" $ encodeTernaryExpression @@ var "t"]
-
-encodeConstructorDeclaration :: TTermDefinition (Cpp.ConstructorDeclaration -> Expr)
-encodeConstructorDeclaration = define "encodeConstructorDeclaration" $
-  doc "Convert a constructor declaration to an expression" $
-  lambda "cd" $ lets [
-    "name">: project Cpp._ConstructorDeclaration Cpp._ConstructorDeclaration_name @@ var "cd",
-    "params">: project Cpp._ConstructorDeclaration Cpp._ConstructorDeclaration_parameters @@ var "cd",
-    "inits">: project Cpp._ConstructorDeclaration Cpp._ConstructorDeclaration_initializers @@ var "cd",
-    "body">: project Cpp._ConstructorDeclaration Cpp._ConstructorDeclaration_body @@ var "cd"] $
-    Serialization.spaceSep @@ (Maybes.cat $ list [
-      just (Serialization.noSep @@ list [
-        Serialization.cst @@ var "name",
-        Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeParameter (var "params")))]),
-      Logic.ifElse (Lists.null (var "inits"))
-        nothing
-        (just (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string ":",
-          Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeMemInitializer (var "inits"))])),
-      just (encodeFunctionBody @@ var "body")])
-
-encodeDeclaration :: TTermDefinition (Cpp.Declaration -> Expr)
-encodeDeclaration = define "encodeDeclaration" $
-  doc "Convert a declaration to an expression" $
-  lambda "d" $
-    cases Cpp._Declaration (var "d") Nothing [
-      Cpp._Declaration_preprocessor>>: lambda "p" $ encodePreprocessorDirective @@ var "p",
-      Cpp._Declaration_class>>: lambda "c" $ encodeClassDeclaration @@ var "c",
-      Cpp._Declaration_function>>: lambda "f" $ encodeFunctionDeclaration @@ var "f",
-      Cpp._Declaration_variable>>: lambda "v" $ encodeVariableDeclaration @@ false @@ var "v",
-      Cpp._Declaration_typedef>>: lambda "t" $ encodeTypedefDeclaration @@ var "t",
-      Cpp._Declaration_namespace>>: lambda "n" $ encodeNamespaceDeclaration @@ var "n",
-      Cpp._Declaration_template>>: lambda "t" $ encodeTemplateDeclaration @@ var "t"]
-
-encodeDefineDirective :: TTermDefinition (Cpp.DefineDirective -> Expr)
-encodeDefineDirective = define "encodeDefineDirective" $
-  doc "Convert a define directive to an expression" $
-  lambda "dd" $ lets [
-    "name">: project Cpp._DefineDirective Cpp._DefineDirective_name @@ var "dd",
-    "params">: project Cpp._DefineDirective Cpp._DefineDirective_parameters @@ var "dd",
-    "replacement">: project Cpp._DefineDirective Cpp._DefineDirective_replacement @@ var "dd"] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      list [Serialization.cst @@ string "#define", Serialization.cst @@ var "name"],
-      Maybes.maybe
-        (list ([] :: [TTerm Expr]))
-        (lambda "ps" $ list [Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map (lambda "p" $ Serialization.cst @@ var "p") (var "ps")))])
-        (var "params"),
-      Maybes.maybe
-        (list ([] :: [TTerm Expr]))
-        (lambda "r" $ list [Serialization.cst @@ var "r"])
-        (var "replacement")])
-
-encodeDestructorDeclaration :: TTermDefinition (Cpp.DestructorDeclaration -> Expr)
-encodeDestructorDeclaration = define "encodeDestructorDeclaration" $
-  doc "Convert a destructor declaration to an expression" $
-  lambda "dd" $ lets [
-    "prefixSpecs">: project Cpp._DestructorDeclaration Cpp._DestructorDeclaration_prefixSpecifiers @@ var "dd",
-    "name">: project Cpp._DestructorDeclaration Cpp._DestructorDeclaration_name @@ var "dd",
-    "suffixSpecs">: project Cpp._DestructorDeclaration Cpp._DestructorDeclaration_suffixSpecifiers @@ var "dd",
-    "body">: project Cpp._DestructorDeclaration Cpp._DestructorDeclaration_body @@ var "dd"] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      Lists.map encodeFunctionSpecifierPrefix (var "prefixSpecs"),
-      list [Serialization.noSep @@ list [
-        Serialization.cst @@ (Strings.cat2 (string "~") (var "name")),
-        Serialization.parens @@ (Serialization.cst @@ string "")]],
-      Lists.map encodeFunctionSpecifierSuffix (var "suffixSpecs"),
-      list [encodeFunctionBody @@ var "body"]])
-
-encodeDivideOperation :: TTermDefinition (Cpp.DivideOperation -> Expr)
-encodeDivideOperation = define "encodeDivideOperation" $
-  doc "Convert a divide operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._DivideOperation Cpp._DivideOperation_left @@ var "op",
-    "right">: project Cpp._DivideOperation Cpp._DivideOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeMultiplicativeExpression @@ var "left",
-      Serialization.cst @@ string "/",
-      encodeUnaryExpression @@ var "right"]
-
-encodeDoStatement :: TTermDefinition (Cpp.DoStatement -> Expr)
-encodeDoStatement = define "encodeDoStatement" $
-  doc "Convert a do statement to an expression" $
-  lambda "ds" $ lets [
-    "body">: project Cpp._DoStatement Cpp._DoStatement_body @@ var "ds",
-    "cond">: project Cpp._DoStatement Cpp._DoStatement_condition @@ var "ds"] $
-    Serialization.newlineSep @@ list [
-      Serialization.cst @@ string "do",
-      encodeStatement @@ var "body",
-      Serialization.withSemi @@ (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "while",
-        Serialization.parens @@ (encodeExpression @@ var "cond")])]
-
-encodeElifDirective :: TTermDefinition (Cpp.ElifDirective -> Expr)
-encodeElifDirective = define "encodeElifDirective" $
-  doc "Convert an elif directive to an expression" $
-  lambda "ed" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#elif",
-      Serialization.cst @@ (project Cpp._ElifDirective Cpp._ElifDirective_condition @@ var "ed")]
-
-encodeElseDirective :: TTermDefinition (Cpp.ElseDirective -> Expr)
-encodeElseDirective = define "encodeElseDirective" $
-  doc "Convert an else directive to an expression" $
-  lambda "ed" $ Serialization.cst @@ string "#else"
-
-encodeEndifDirective :: TTermDefinition (Cpp.EndifDirective -> Expr)
-encodeEndifDirective = define "encodeEndifDirective" $
-  doc "Convert an endif directive to an expression" $
-  lambda "ed" $ Serialization.cst @@ string "#endif"
-
-encodeEqualOperation :: TTermDefinition (Cpp.EqualOperation -> Expr)
-encodeEqualOperation = define "encodeEqualOperation" $
-  doc "Convert an equal operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._EqualOperation Cpp._EqualOperation_left @@ var "op",
-    "right">: project Cpp._EqualOperation Cpp._EqualOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeEqualityExpression @@ var "left",
-      Serialization.cst @@ string "==",
-      encodeRelationalExpression @@ var "right"]
-
-encodeEqualityExpression :: TTermDefinition (Cpp.EqualityExpression -> Expr)
-encodeEqualityExpression = define "encodeEqualityExpression" $
-  doc "Convert an equality expression to an expression" $
-  lambda "e" $
-    cases Cpp._EqualityExpression (var "e") Nothing [
-      Cpp._EqualityExpression_relational>>: lambda "r" $ encodeRelationalExpression @@ var "r",
-      Cpp._EqualityExpression_equal>>: lambda "eq" $ encodeEqualOperation @@ var "eq",
-      Cpp._EqualityExpression_notEqual>>: lambda "ne" $ encodeNotEqualOperation @@ var "ne"]
-
-encodeErrorDirective :: TTermDefinition (Cpp.ErrorDirective -> Expr)
-encodeErrorDirective = define "encodeErrorDirective" $
-  doc "Convert an error directive to an expression" $
-  lambda "ed" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#error",
-      Serialization.cst @@ (project Cpp._ErrorDirective Cpp._ErrorDirective_message @@ var "ed")]
-
-encodeExclusiveOrExpression :: TTermDefinition (Cpp.ExclusiveOrExpression -> Expr)
-encodeExclusiveOrExpression = define "encodeExclusiveOrExpression" $
-  doc "Convert an exclusive or expression to an expression" $
-  lambda "e" $
-    cases Cpp._ExclusiveOrExpression (var "e") Nothing [
-      Cpp._ExclusiveOrExpression_and>>: lambda "a" $ encodeAndExpression @@ var "a",
-      Cpp._ExclusiveOrExpression_bitwiseXor>>: lambda "x" $ encodeBitwiseXorOperation @@ var "x"]
-
-encodeExplicitAssignment :: TTermDefinition (Cpp.ExplicitAssignment -> Expr)
-encodeExplicitAssignment = define "encodeExplicitAssignment" $
-  doc "Convert an explicit assignment to an expression" $
-  lambda "ea" $ lets [
-    "left">: project Cpp._ExplicitAssignment Cpp._ExplicitAssignment_left @@ var "ea",
-    "op">: project Cpp._ExplicitAssignment Cpp._ExplicitAssignment_op @@ var "ea",
-    "right">: project Cpp._ExplicitAssignment Cpp._ExplicitAssignment_right @@ var "ea"] $
-    Serialization.spaceSep @@ list [
-      encodeLogicalOrExpression @@ var "left",
-      encodeAssignmentOperator @@ var "op",
-      encodeAssignmentExpression @@ var "right"]
-
-encodeExpression :: TTermDefinition (Cpp.Expression -> Expr)
-encodeExpression = define "encodeExpression" $
-  doc "Convert an expression to an expression" $
-  lambda "e" $
-    cases Cpp._Expression (var "e") Nothing [
-      Cpp._Expression_assignment>>: lambda "a" $ encodeAssignmentExpression @@ var "a",
-      Cpp._Expression_comma>>: lambda "c" $ encodeCommaExpression @@ var "c"]
-
-encodeForInit :: TTermDefinition (Cpp.ForInit -> Expr)
-encodeForInit = define "encodeForInit" $
-  doc "Convert a for-init to an expression" $
-  lambda "i" $
-    cases Cpp._ForInit (var "i") Nothing [
-      Cpp._ForInit_expression>>: lambda "e" $ encodeExpression @@ var "e",
-      Cpp._ForInit_declaration>>: lambda "d" $ encodeVariableDeclaration @@ false @@ var "d",
-      Cpp._ForInit_empty>>: constant $ Serialization.cst @@ string ""]
-
-encodeForStatement :: TTermDefinition (Cpp.ForStatement -> Expr)
-encodeForStatement = define "encodeForStatement" $
-  doc "Convert a for statement to an expression" $
-  lambda "fs" $ lets [
-    "init">: project Cpp._ForStatement Cpp._ForStatement_init @@ var "fs",
-    "cond">: project Cpp._ForStatement Cpp._ForStatement_condition @@ var "fs",
-    "inc">: project Cpp._ForStatement Cpp._ForStatement_increment @@ var "fs",
-    "body">: project Cpp._ForStatement Cpp._ForStatement_body @@ var "fs"] $
-    Serialization.newlineSep @@ list [
-      Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "for",
-        Serialization.parens @@ (Serialization.noSep @@ list [
-          encodeForInit @@ var "init",
-          Serialization.cst @@ string ";",
-          encodeExpression @@ var "cond",
-          Serialization.cst @@ string ";",
-          encodeExpression @@ var "inc"])],
-      encodeStatement @@ var "body"]
-
-encodeFunctionApplication :: TTermDefinition (Cpp.FunctionApplication -> Expr)
-encodeFunctionApplication = define "encodeFunctionApplication" $
-  doc "Convert a function application to an expression" $
-  lambda "fa" $ lets [
-    "func">: project Cpp._FunctionApplication Cpp._FunctionApplication_function @@ var "fa",
-    "args">: project Cpp._FunctionApplication Cpp._FunctionApplication_arguments @@ var "fa"] $
-    Serialization.spaceSep @@ list [
-      encodeFunctionIdentifier @@ var "func",
-      Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeExpression (var "args")))]
-
-encodeFunctionBody :: TTermDefinition (Cpp.FunctionBody -> Expr)
-encodeFunctionBody = define "encodeFunctionBody" $
-  doc "Convert a function body to an expression" $
-  lambda "b" $
-    cases Cpp._FunctionBody (var "b") Nothing [
-      Cpp._FunctionBody_compound>>: lambda "c" $ encodeCompoundStatement @@ var "c",
-      Cpp._FunctionBody_declaration>>: constant $ Serialization.cst @@ string ";",
-      Cpp._FunctionBody_pure>>: constant $ Serialization.withSemi @@ (Serialization.cst @@ string "= 0"),
-      Cpp._FunctionBody_default>>: constant $ Serialization.withSemi @@ (Serialization.cst @@ string "= default")]
-
-encodeFunctionCallOperation :: TTermDefinition (Cpp.FunctionCallOperation -> Expr)
-encodeFunctionCallOperation = define "encodeFunctionCallOperation" $
-  doc "Convert a function call operation to an expression" $
-  lambda "fco" $ lets [
-    "func">: project Cpp._FunctionCallOperation Cpp._FunctionCallOperation_function @@ var "fco",
-    "args">: project Cpp._FunctionCallOperation Cpp._FunctionCallOperation_arguments @@ var "fco"] $
-    Serialization.noSep @@ list [
-      encodePostfixExpression @@ var "func",
-      Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeExpression (var "args")))]
-
-encodeFunctionDeclaration :: TTermDefinition (Cpp.FunctionDeclaration -> Expr)
-encodeFunctionDeclaration = define "encodeFunctionDeclaration" $
-  doc "Convert a function declaration to an expression" $
-  lambda "fd" $ lets [
-    "prefixSpecs">: project Cpp._FunctionDeclaration Cpp._FunctionDeclaration_prefixSpecifiers @@ var "fd",
-    "retType">: project Cpp._FunctionDeclaration Cpp._FunctionDeclaration_returnType @@ var "fd",
-    "name">: project Cpp._FunctionDeclaration Cpp._FunctionDeclaration_name @@ var "fd",
-    "params">: project Cpp._FunctionDeclaration Cpp._FunctionDeclaration_parameters @@ var "fd",
-    "suffixSpecs">: project Cpp._FunctionDeclaration Cpp._FunctionDeclaration_suffixSpecifiers @@ var "fd",
-    "body">: project Cpp._FunctionDeclaration Cpp._FunctionDeclaration_body @@ var "fd"] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      Lists.map encodeFunctionSpecifierPrefix (var "prefixSpecs"),
-      list [
-        encodeTypeExpression @@ var "retType",
-        Serialization.noSep @@ list [
-          Serialization.cst @@ var "name",
-          Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeParameter (var "params")))]],
-      Lists.map encodeFunctionSpecifierSuffix (var "suffixSpecs"),
-      list [encodeFunctionBody @@ var "body"]])
-
-encodeFunctionIdentifier :: TTermDefinition (Cpp.FunctionIdentifier -> Expr)
-encodeFunctionIdentifier = define "encodeFunctionIdentifier" $
-  doc "Convert a function identifier to an expression" $
-  lambda "f" $
-    cases Cpp._FunctionIdentifier (var "f") Nothing [
-      Cpp._FunctionIdentifier_simple>>: lambda "name" $ Serialization.cst @@ var "name",
-      Cpp._FunctionIdentifier_qualified>>: lambda "q" $ encodeQualifiedIdentifier @@ var "q"]
-
-encodeFunctionSpecifierPrefix :: TTermDefinition (Cpp.FunctionSpecifierPrefix -> Expr)
-encodeFunctionSpecifierPrefix = define "encodeFunctionSpecifierPrefix" $
-  doc "Convert a function specifier prefix to an expression" $
-  lambda "s" $
-    cases Cpp._FunctionSpecifierPrefix (var "s") Nothing [
-      Cpp._FunctionSpecifierPrefix_inline>>: constant $ Serialization.cst @@ string "inline",
-      Cpp._FunctionSpecifierPrefix_virtual>>: constant $ Serialization.cst @@ string "virtual",
-      Cpp._FunctionSpecifierPrefix_static>>: constant $ Serialization.cst @@ string "static",
-      Cpp._FunctionSpecifierPrefix_explicit>>: constant $ Serialization.cst @@ string "explicit"]
-
-encodeFunctionSpecifierSuffix :: TTermDefinition (Cpp.FunctionSpecifierSuffix -> Expr)
-encodeFunctionSpecifierSuffix = define "encodeFunctionSpecifierSuffix" $
-  doc "Convert a function specifier suffix to an expression" $
-  lambda "s" $
-    cases Cpp._FunctionSpecifierSuffix (var "s") Nothing [
-      Cpp._FunctionSpecifierSuffix_const>>: constant $ Serialization.cst @@ string "const",
-      Cpp._FunctionSpecifierSuffix_noexcept>>: constant $ Serialization.cst @@ string "noexcept",
-      Cpp._FunctionSpecifierSuffix_override>>: constant $ Serialization.cst @@ string "override",
-      Cpp._FunctionSpecifierSuffix_final>>: constant $ Serialization.cst @@ string "final"]
-
-encodeFunctionType :: TTermDefinition (Cpp.FunctionType -> Expr)
-encodeFunctionType = define "encodeFunctionType" $
-  doc "Convert a function type to an expression" $
-  lambda "ft" $ lets [
-    "retType">: project Cpp._FunctionType Cpp._FunctionType_returnType @@ var "ft",
-    "params">: project Cpp._FunctionType Cpp._FunctionType_parameters @@ var "ft"] $
-    Serialization.spaceSep @@ list [
-      encodeTypeExpression @@ var "retType",
-      Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeParameter (var "params")))]
-
-encodeGreaterEqualOperation :: TTermDefinition (Cpp.GreaterEqualOperation -> Expr)
-encodeGreaterEqualOperation = define "encodeGreaterEqualOperation" $
-  doc "Convert a greater-than-or-equal operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._GreaterEqualOperation Cpp._GreaterEqualOperation_left @@ var "op",
-    "right">: project Cpp._GreaterEqualOperation Cpp._GreaterEqualOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeRelationalExpression @@ var "left",
-      Serialization.cst @@ string ">=",
-      encodeShiftExpression @@ var "right"]
-
-encodeGreaterOperation :: TTermDefinition (Cpp.GreaterOperation -> Expr)
-encodeGreaterOperation = define "encodeGreaterOperation" $
-  doc "Convert a greater-than operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._GreaterOperation Cpp._GreaterOperation_left @@ var "op",
-    "right">: project Cpp._GreaterOperation Cpp._GreaterOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeRelationalExpression @@ var "left",
-      Serialization.cst @@ string ">",
-      encodeShiftExpression @@ var "right"]
-
-encodeIfDirective :: TTermDefinition (Cpp.IfDirective -> Expr)
-encodeIfDirective = define "encodeIfDirective" $
-  doc "Convert an if directive to an expression" $
-  lambda "ifd" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#if",
-      Serialization.cst @@ (project Cpp._IfDirective Cpp._IfDirective_condition @@ var "ifd")]
-
-encodeIfdefDirective :: TTermDefinition (Cpp.IfdefDirective -> Expr)
-encodeIfdefDirective = define "encodeIfdefDirective" $
-  doc "Convert an ifdef directive to an expression" $
-  lambda "id" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#ifdef",
-      Serialization.cst @@ (project Cpp._IfdefDirective Cpp._IfdefDirective_identifier @@ var "id")]
-
-encodeIfndefDirective :: TTermDefinition (Cpp.IfndefDirective -> Expr)
-encodeIfndefDirective = define "encodeIfndefDirective" $
-  doc "Convert an ifndef directive to an expression" $
-  lambda "ind" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#ifndef",
-      Serialization.cst @@ (project Cpp._IfndefDirective Cpp._IfndefDirective_identifier @@ var "ind")]
-
-encodeIncludeDirective :: TTermDefinition (Cpp.IncludeDirective -> Expr)
-encodeIncludeDirective = define "encodeIncludeDirective" $
-  doc "Convert an include directive to an expression" $
-  lambda "incl" $ lets [
-    "name">: project Cpp._IncludeDirective Cpp._IncludeDirective_name @@ var "incl",
-    "isSystem">: project Cpp._IncludeDirective Cpp._IncludeDirective_isSystem @@ var "incl"] $
-    Logic.ifElse (var "isSystem")
-      (Serialization.cst @@ (Strings.cat $ list [string "#include <", var "name", string ">"]))
-      (Serialization.cst @@ (Strings.cat $ list [string "#include \"", var "name", string "\""]))
-
-encodeInclusiveOrExpression :: TTermDefinition (Cpp.InclusiveOrExpression -> Expr)
-encodeInclusiveOrExpression = define "encodeInclusiveOrExpression" $
-  doc "Convert an inclusive or expression to an expression" $
-  lambda "e" $
-    cases Cpp._InclusiveOrExpression (var "e") Nothing [
-      Cpp._InclusiveOrExpression_exclusiveOr>>: lambda "x" $ encodeExclusiveOrExpression @@ var "x",
-      Cpp._InclusiveOrExpression_bitwiseOr>>: lambda "o" $ encodeBitwiseOrOperation @@ var "o"]
-
-encodeIntegerLiteral :: TTermDefinition (Cpp.IntegerLiteral -> Expr)
-encodeIntegerLiteral = define "encodeIntegerLiteral" $
-  doc "Convert an integer literal to an expression" $
-  lambda "i" $
-    cases Cpp._IntegerLiteral (var "i") Nothing [
-      Cpp._IntegerLiteral_decimal>>: lambda "n" $ Serialization.cst @@ (Literals.showBigint (var "n")),
-      Cpp._IntegerLiteral_hexadecimal>>: lambda "h" $ Serialization.cst @@ (Strings.cat2 (string "0x") (var "h")),
-      Cpp._IntegerLiteral_octal>>: lambda "o" $ Serialization.cst @@ (Strings.cat2 (string "0") (var "o")),
-      Cpp._IntegerLiteral_binary>>: lambda "b" $ Serialization.cst @@ (Strings.cat2 (string "0b") (var "b"))]
-
-encodeIterationStatement :: TTermDefinition (Cpp.IterationStatement -> Expr)
-encodeIterationStatement = define "encodeIterationStatement" $
-  doc "Convert an iteration statement to an expression" $
-  lambda "i" $
-    cases Cpp._IterationStatement (var "i") Nothing [
-      Cpp._IterationStatement_while>>: lambda "w" $ encodeWhileStatement @@ var "w",
-      Cpp._IterationStatement_do>>: lambda "d" $ encodeDoStatement @@ var "d",
-      Cpp._IterationStatement_for>>: lambda "f" $ encodeForStatement @@ var "f",
-      Cpp._IterationStatement_rangeFor>>: lambda "r" $ encodeRangeForStatement @@ var "r"]
-
-encodeJumpStatement :: TTermDefinition (Cpp.JumpStatement -> Expr)
-encodeJumpStatement = define "encodeJumpStatement" $
-  doc "Convert a jump statement to an expression" $
-  lambda "j" $
-    cases Cpp._JumpStatement (var "j") Nothing [
-      Cpp._JumpStatement_break>>: constant $ Serialization.withSemi @@ (Serialization.cst @@ string "break"),
-      Cpp._JumpStatement_continue>>: constant $ Serialization.withSemi @@ (Serialization.cst @@ string "continue"),
-      Cpp._JumpStatement_returnValue>>: lambda "e" $
-        Serialization.withSemi @@ (Serialization.spaceSep @@ list [Serialization.cst @@ string "return", encodeExpression @@ var "e"]),
-      Cpp._JumpStatement_returnVoid>>: constant $ Serialization.withSemi @@ (Serialization.cst @@ string "return"),
-      Cpp._JumpStatement_throw>>: lambda "e" $
-        Serialization.withSemi @@ (Serialization.spaceSep @@ list [Serialization.cst @@ string "throw", encodeExpression @@ var "e"])]
-
-encodeLabeledStatement :: TTermDefinition (Cpp.LabeledStatement -> Expr)
-encodeLabeledStatement = define "encodeLabeledStatement" $
-  doc "Convert a labeled statement to an expression" $
-  lambda "ls" $ lets [
-    "label">: project Cpp._LabeledStatement Cpp._LabeledStatement_label @@ var "ls",
-    "stmt">: project Cpp._LabeledStatement Cpp._LabeledStatement_statement @@ var "ls"] $
-    Serialization.newlineSep @@ list [
-      Serialization.cst @@ (Strings.cat2 (var "label") (string ":")),
-      encodeStatement @@ var "stmt"]
-
-encodeLambdaExpression :: TTermDefinition (Cpp.LambdaExpression -> Expr)
-encodeLambdaExpression = define "encodeLambdaExpression" $
-  doc "Convert a lambda expression to an expression" $
-  lambda "le" $ lets [
-    "captures">: project Cpp._LambdaExpression Cpp._LambdaExpression_captures @@ var "le",
-    "params">: project Cpp._LambdaExpression Cpp._LambdaExpression_parameters @@ var "le",
-    "retType">: project Cpp._LambdaExpression Cpp._LambdaExpression_returnType @@ var "le",
-    "body">: project Cpp._LambdaExpression Cpp._LambdaExpression_body @@ var "le"] $
-    Serialization.spaceSep @@ list [
-      encodeCaptureList @@ var "captures",
-      Logic.ifElse (Lists.null (var "params"))
-        (Serialization.parens @@ (Serialization.cst @@ string ""))
-        (Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeParameter (var "params")))),
-      Maybes.maybe
-        (Serialization.cst @@ string "")
-        (lambda "t" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "->", encodeTypeExpression @@ var "t"])
-        (var "retType"),
-      encodeCompoundStatement @@ var "body"]
-
-encodeLeftShiftOperation :: TTermDefinition (Cpp.LeftShiftOperation -> Expr)
-encodeLeftShiftOperation = define "encodeLeftShiftOperation" $
-  doc "Convert a left shift operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._LeftShiftOperation Cpp._LeftShiftOperation_left @@ var "op",
-    "right">: project Cpp._LeftShiftOperation Cpp._LeftShiftOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeShiftExpression @@ var "left",
-      Serialization.cst @@ string "<<",
-      encodeAdditiveExpression @@ var "right"]
-
-encodeLessEqualOperation :: TTermDefinition (Cpp.LessEqualOperation -> Expr)
-encodeLessEqualOperation = define "encodeLessEqualOperation" $
-  doc "Convert a less-than-or-equal operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._LessEqualOperation Cpp._LessEqualOperation_left @@ var "op",
-    "right">: project Cpp._LessEqualOperation Cpp._LessEqualOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeRelationalExpression @@ var "left",
-      Serialization.cst @@ string "<=",
-      encodeShiftExpression @@ var "right"]
-
-encodeLessOperation :: TTermDefinition (Cpp.LessOperation -> Expr)
-encodeLessOperation = define "encodeLessOperation" $
-  doc "Convert a less-than operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._LessOperation Cpp._LessOperation_left @@ var "op",
-    "right">: project Cpp._LessOperation Cpp._LessOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeRelationalExpression @@ var "left",
-      Serialization.cst @@ string "<",
-      encodeShiftExpression @@ var "right"]
-
-encodeLineDirective :: TTermDefinition (Cpp.LineDirective -> Expr)
-encodeLineDirective = define "encodeLineDirective" $
-  doc "Convert a line directive to an expression" $
-  lambda "ld" $ lets [
-    "lineNumber">: project Cpp._LineDirective Cpp._LineDirective_lineNumber @@ var "ld",
-    "filename">: project Cpp._LineDirective Cpp._LineDirective_filename @@ var "ld"] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      list [Serialization.cst @@ string "#line", Serialization.cst @@ (Literals.showInt32 (var "lineNumber"))],
-      Maybes.maybe
-        (list ([] :: [TTerm Expr]))
-        (lambda "f" $ list [Serialization.cst @@ (Strings.cat $ list [string "\"", var "f", string "\""])])
-        (var "filename")])
-
-encodeLiteral :: TTermDefinition (Cpp.Literal -> Expr)
-encodeLiteral = define "encodeLiteral" $
-  doc "Convert a literal to an expression" $
-  lambda "l" $
-    cases Cpp._Literal (var "l") Nothing [
-      Cpp._Literal_integer>>: lambda "i" $ encodeIntegerLiteral @@ var "i",
-      Cpp._Literal_floating>>: lambda "f" $ Serialization.cst @@ (Literals.showBigfloat (unwrap Cpp._FloatingLiteral @@ var "f")),
-      Cpp._Literal_character>>: lambda "c" $
-        Serialization.cst @@ (Strings.cat $ list [string "'", unwrap Cpp._CharacterLiteral @@ var "c", string "'"]),
-      Cpp._Literal_string>>: lambda "s" $
-        Serialization.cst @@ (Strings.cat $ list [string "\"", unwrap Cpp._StringLiteral @@ var "s", string "\""]),
-      Cpp._Literal_boolean>>: lambda "b" $ encodeBooleanLiteral @@ var "b",
-      Cpp._Literal_null>>: constant $ Serialization.cst @@ string "nullptr"]
-
-encodeLogicalAndExpression :: TTermDefinition (Cpp.LogicalAndExpression -> Expr)
-encodeLogicalAndExpression = define "encodeLogicalAndExpression" $
-  doc "Convert a logical and expression to an expression" $
-  lambda "e" $
-    cases Cpp._LogicalAndExpression (var "e") Nothing [
-      Cpp._LogicalAndExpression_inclusiveOr>>: lambda "i" $ encodeInclusiveOrExpression @@ var "i",
-      Cpp._LogicalAndExpression_logicalAnd>>: lambda "a" $ encodeLogicalAndOperation @@ var "a"]
-
-encodeLogicalAndOperation :: TTermDefinition (Cpp.LogicalAndOperation -> Expr)
-encodeLogicalAndOperation = define "encodeLogicalAndOperation" $
-  doc "Convert a logical and operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._LogicalAndOperation Cpp._LogicalAndOperation_left @@ var "op",
-    "right">: project Cpp._LogicalAndOperation Cpp._LogicalAndOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeLogicalAndExpression @@ var "left",
-      Serialization.cst @@ string "&&",
-      encodeInclusiveOrExpression @@ var "right"]
-
-encodeLogicalOrExpression :: TTermDefinition (Cpp.LogicalOrExpression -> Expr)
-encodeLogicalOrExpression = define "encodeLogicalOrExpression" $
-  doc "Convert a logical or expression to an expression" $
-  lambda "e" $
-    cases Cpp._LogicalOrExpression (var "e") Nothing [
-      Cpp._LogicalOrExpression_logicalAnd>>: lambda "l" $ encodeLogicalAndExpression @@ var "l",
-      Cpp._LogicalOrExpression_logicalOr>>: lambda "o" $ encodeLogicalOrOperation @@ var "o"]
-
-encodeLogicalOrOperation :: TTermDefinition (Cpp.LogicalOrOperation -> Expr)
-encodeLogicalOrOperation = define "encodeLogicalOrOperation" $
-  doc "Convert a logical or operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._LogicalOrOperation Cpp._LogicalOrOperation_left @@ var "op",
-    "right">: project Cpp._LogicalOrOperation Cpp._LogicalOrOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeLogicalOrExpression @@ var "left",
-      Serialization.cst @@ string "||",
-      encodeLogicalAndExpression @@ var "right"]
-
-encodeMap :: TTermDefinition (Cpp.Map -> Expr)
-encodeMap = define "encodeMap" $
-  doc "Convert a map to an expression" $
-  lambda "m" $ lets [
-    "keyType">: project Cpp._Map Cpp._Map_keyType @@ var "m",
-    "valType">: project Cpp._Map Cpp._Map_valueType @@ var "m",
-    "entries">: project Cpp._Map Cpp._Map_entries @@ var "m"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "std::map<",
-      Serialization.commaSep @@ Serialization.inlineStyle @@ list [
-        encodeTypeExpression @@ var "keyType",
-        encodeTypeExpression @@ var "valType"],
-      Serialization.cst @@ string ">",
-      Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ (Lists.map encodeMapEntry (var "entries"))]
-
-encodeMapEntry :: TTermDefinition (Cpp.MapEntry -> Expr)
-encodeMapEntry = define "encodeMapEntry" $
-  doc "Convert a map entry to an expression" $
-  lambda "me" $ lets [
-    "key">: project Cpp._MapEntry Cpp._MapEntry_key @@ var "me",
-    "val">: project Cpp._MapEntry Cpp._MapEntry_value @@ var "me"] $
-    Serialization.spaceSep @@ list [
-      Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ list [encodeExpression @@ var "key"],
-      Serialization.cst @@ string "->",
-      encodeExpression @@ var "val"]
-
-encodeMemInitializer :: TTermDefinition (Cpp.MemInitializer -> Expr)
-encodeMemInitializer = define "encodeMemInitializer" $
-  doc "Convert a member initializer to an expression" $
-  lambda "mi" $ lets [
-    "name">: project Cpp._MemInitializer Cpp._MemInitializer_name @@ var "mi",
-    "args">: project Cpp._MemInitializer Cpp._MemInitializer_arguments @@ var "mi"] $
-    Serialization.noSep @@ list [
-      Serialization.cst @@ var "name",
-      Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeExpression (var "args")))]
-
-encodeMemberAccessOperation :: TTermDefinition (Cpp.MemberAccessOperation -> Expr)
-encodeMemberAccessOperation = define "encodeMemberAccessOperation" $
-  doc "Convert a member access operation to an expression" $
-  lambda "mao" $ lets [
-    "obj">: project Cpp._MemberAccessOperation Cpp._MemberAccessOperation_object @@ var "mao",
-    "member">: project Cpp._MemberAccessOperation Cpp._MemberAccessOperation_member @@ var "mao"] $
-    Serialization.noSep @@ list [
-      encodePostfixExpression @@ var "obj",
-      Serialization.cst @@ string ".",
-      Serialization.cst @@ var "member"]
-
-encodeMemberDeclaration :: TTermDefinition (Bool -> Cpp.MemberDeclaration -> Expr)
-encodeMemberDeclaration = define "encodeMemberDeclaration" $
-  doc "Convert a member declaration to an expression" $
-  lambda "commas" $ lambda "m" $
-    cases Cpp._MemberDeclaration (var "m") Nothing [
-      Cpp._MemberDeclaration_function>>: lambda "f" $ encodeFunctionDeclaration @@ var "f",
-      Cpp._MemberDeclaration_variable>>: lambda "v" $ encodeVariableDeclaration @@ var "commas" @@ var "v",
-      Cpp._MemberDeclaration_constructor>>: lambda "c" $ encodeConstructorDeclaration @@ var "c",
-      Cpp._MemberDeclaration_destructor>>: lambda "d" $ encodeDestructorDeclaration @@ var "d",
-      Cpp._MemberDeclaration_nestedClass>>: lambda "c" $ encodeClassDeclaration @@ var "c",
-      Cpp._MemberDeclaration_template>>: lambda "t" $ encodeTemplateDeclaration @@ var "t"]
-
-encodeMemberSpecification :: TTermDefinition (Bool -> Cpp.MemberSpecification -> Expr)
-encodeMemberSpecification = define "encodeMemberSpecification" $
-  doc "Convert a member specification to an expression" $
-  lambda "commas" $ lambda "m" $
-    cases Cpp._MemberSpecification (var "m") Nothing [
-      Cpp._MemberSpecification_accessLabel>>: lambda "a" $
-        Serialization.noSep @@ list [encodeAccessSpecifier @@ var "a", Serialization.cst @@ string ":"],
-      Cpp._MemberSpecification_member>>: lambda "d" $ encodeMemberDeclaration @@ var "commas" @@ var "d"]
-
-encodeModuloOperation :: TTermDefinition (Cpp.ModuloOperation -> Expr)
-encodeModuloOperation = define "encodeModuloOperation" $
-  doc "Convert a modulo operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._ModuloOperation Cpp._ModuloOperation_left @@ var "op",
-    "right">: project Cpp._ModuloOperation Cpp._ModuloOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeMultiplicativeExpression @@ var "left",
-      Serialization.cst @@ string "%",
-      encodeUnaryExpression @@ var "right"]
-
-encodeMultiplicativeExpression :: TTermDefinition (Cpp.MultiplicativeExpression -> Expr)
-encodeMultiplicativeExpression = define "encodeMultiplicativeExpression" $
-  doc "Convert a multiplicative expression to an expression" $
-  lambda "e" $
-    cases Cpp._MultiplicativeExpression (var "e") Nothing [
-      Cpp._MultiplicativeExpression_unary>>: lambda "u" $ encodeUnaryExpression @@ var "u",
-      Cpp._MultiplicativeExpression_multiply>>: lambda "m" $ encodeMultiplyOperation @@ var "m",
-      Cpp._MultiplicativeExpression_divide>>: lambda "d" $ encodeDivideOperation @@ var "d",
-      Cpp._MultiplicativeExpression_modulo>>: lambda "m" $ encodeModuloOperation @@ var "m"]
-
-encodeMultiplyOperation :: TTermDefinition (Cpp.MultiplyOperation -> Expr)
-encodeMultiplyOperation = define "encodeMultiplyOperation" $
-  doc "Convert a multiply operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._MultiplyOperation Cpp._MultiplyOperation_left @@ var "op",
-    "right">: project Cpp._MultiplyOperation Cpp._MultiplyOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeMultiplicativeExpression @@ var "left",
-      Serialization.cst @@ string "*",
-      encodeUnaryExpression @@ var "right"]
-
-encodeNamespaceDeclaration :: TTermDefinition (Cpp.NamespaceDeclaration -> Expr)
-encodeNamespaceDeclaration = define "encodeNamespaceDeclaration" $
-  doc "Convert a namespace declaration to an expression" $
-  lambda "nd" $ lets [
-    "name">: project Cpp._NamespaceDeclaration Cpp._NamespaceDeclaration_name @@ var "nd",
-    "decls">: project Cpp._NamespaceDeclaration Cpp._NamespaceDeclaration_declarations @@ var "nd"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ (Strings.cat2 (string "namespace ") (var "name")),
-      Serialization.curlyBlock @@ Serialization.fullBlockStyle @@
-        (Serialization.doubleNewlineSep @@ (Lists.map encodeDeclaration (var "decls")))]
-
-encodeNotEqualOperation :: TTermDefinition (Cpp.NotEqualOperation -> Expr)
-encodeNotEqualOperation = define "encodeNotEqualOperation" $
-  doc "Convert a not-equal operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._NotEqualOperation Cpp._NotEqualOperation_left @@ var "op",
-    "right">: project Cpp._NotEqualOperation Cpp._NotEqualOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeEqualityExpression @@ var "left",
-      Serialization.cst @@ string "!=",
-      encodeRelationalExpression @@ var "right"]
-
-encodeOptional :: TTermDefinition (Cpp.Optional -> Expr)
-encodeOptional = define "encodeOptional" $
-  doc "Convert an optional to an expression" $
-  lambda "opt" $ lets [
-    "valType">: project Cpp._Optional Cpp._Optional_valueType @@ var "opt",
-    "val">: project Cpp._Optional Cpp._Optional_value @@ var "opt"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "std::optional<",
-      encodeTypeExpression @@ var "valType",
-      Serialization.cst @@ string ">",
-      Maybes.maybe
-        (Serialization.cst @@ string "{}")
-        (lambda "v" $ Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ list [encodeExpression @@ var "v"])
-        (var "val")]
-
-encodeOverloadedLambdas :: TTermDefinition (Cpp.OverloadedLambdas -> Expr)
-encodeOverloadedLambdas = define "encodeOverloadedLambdas" $
-  doc "Convert overloaded lambdas to an expression" $
-  lambda "ol" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "overloaded",
-      Serialization.curlyBlock @@ Serialization.fullBlockStyle @@
-        (Serialization.newlineSep @@ (Lists.map encodeLambdaExpression (unwrap Cpp._OverloadedLambdas @@ var "ol")))]
-
-encodeParameter :: TTermDefinition (Cpp.Parameter -> Expr)
-encodeParameter = define "encodeParameter" $
-  doc "Convert a parameter to an expression" $
-  lambda "p" $ lets [
-    "typ">: project Cpp._Parameter Cpp._Parameter_type @@ var "p",
-    "name">: project Cpp._Parameter Cpp._Parameter_name @@ var "p",
-    "unnamed">: project Cpp._Parameter Cpp._Parameter_unnamed @@ var "p",
-    "defaultVal">: project Cpp._Parameter Cpp._Parameter_defaultValue @@ var "p",
-    "nameExpr">: Serialization.cst @@ (Logic.ifElse (var "unnamed")
-      (Strings.cat $ list [string "/*", var "name", string "*/"])
-      (var "name"))] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      list [encodeTypeExpression @@ var "typ", var "nameExpr"],
-      Maybes.maybe
-        (list ([] :: [TTerm Expr]))
-        (lambda "expr" $ list [Serialization.cst @@ string "=", encodeExpression @@ var "expr"])
-        (var "defaultVal")])
-
-encodePatternMatch :: TTermDefinition (Cpp.PatternMatch -> Expr)
-encodePatternMatch = define "encodePatternMatch" $
-  doc "Convert a pattern match to an expression" $
-  lambda "pm" $ lets [
-    "visitor">: project Cpp._PatternMatch Cpp._PatternMatch_visitor @@ var "pm",
-    "variant">: project Cpp._PatternMatch Cpp._PatternMatch_variant @@ var "pm"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "std::visit",
-      Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ list [
-        encodeVisitor @@ var "visitor",
-        encodeExpression @@ var "variant"])]
-
-encodePointerMemberAccessOperation :: TTermDefinition (Cpp.PointerMemberAccessOperation -> Expr)
-encodePointerMemberAccessOperation = define "encodePointerMemberAccessOperation" $
-  doc "Convert a pointer member access operation to an expression" $
-  lambda "pmao" $ lets [
-    "ptr">: project Cpp._PointerMemberAccessOperation Cpp._PointerMemberAccessOperation_pointer @@ var "pmao",
-    "member">: project Cpp._PointerMemberAccessOperation Cpp._PointerMemberAccessOperation_member @@ var "pmao"] $
-    Serialization.noSep @@ list [
-      encodePostfixExpression @@ var "ptr",
-      Serialization.cst @@ string "->",
-      Serialization.cst @@ var "member"]
-
-encodePostfixExpression :: TTermDefinition (Cpp.PostfixExpression -> Expr)
-encodePostfixExpression = define "encodePostfixExpression" $
-  doc "Convert a postfix expression to an expression" $
-  lambda "e" $
-    cases Cpp._PostfixExpression (var "e") Nothing [
-      Cpp._PostfixExpression_primary>>: lambda "p" $ encodePrimaryExpression @@ var "p",
-      Cpp._PostfixExpression_subscript>>: lambda "s" $ encodeSubscriptOperation @@ var "s",
-      Cpp._PostfixExpression_functionCall>>: lambda "f" $ encodeFunctionCallOperation @@ var "f",
-      Cpp._PostfixExpression_templateFunctionCall>>: lambda "t" $ encodeTemplateFunctionCallOperation @@ var "t",
-      Cpp._PostfixExpression_memberAccess>>: lambda "m" $ encodeMemberAccessOperation @@ var "m",
-      Cpp._PostfixExpression_pointerMemberAccess>>: lambda "p" $ encodePointerMemberAccessOperation @@ var "p",
-      Cpp._PostfixExpression_postIncrement>>: lambda "p" $
-        Serialization.noSep @@ list [encodePostfixExpression @@ var "p", Serialization.cst @@ string "++"],
-      Cpp._PostfixExpression_postDecrement>>: lambda "p" $
-        Serialization.noSep @@ list [encodePostfixExpression @@ var "p", Serialization.cst @@ string "--"]]
-
-encodePragmaDirective :: TTermDefinition (Cpp.PragmaDirective -> Expr)
-encodePragmaDirective = define "encodePragmaDirective" $
-  doc "Convert a pragma directive to an expression" $
-  lambda "pd" $
-    Serialization.cst @@ (Strings.cat2 (string "#pragma ") (project Cpp._PragmaDirective Cpp._PragmaDirective_content @@ var "pd"))
-
-encodePreprocessorDirective :: TTermDefinition (Cpp.PreprocessorDirective -> Expr)
-encodePreprocessorDirective = define "encodePreprocessorDirective" $
-  doc "Convert a preprocessor directive to an expression" $
-  lambda "d" $
-    cases Cpp._PreprocessorDirective (var "d") Nothing [
-      Cpp._PreprocessorDirective_include>>: lambda "i" $ encodeIncludeDirective @@ var "i",
-      Cpp._PreprocessorDirective_pragma>>: lambda "p" $ encodePragmaDirective @@ var "p",
-      Cpp._PreprocessorDirective_define>>: lambda "d" $ encodeDefineDirective @@ var "d",
-      Cpp._PreprocessorDirective_undef>>: lambda "u" $ encodeUndefDirective @@ var "u",
-      Cpp._PreprocessorDirective_ifdef>>: lambda "i" $ encodeIfdefDirective @@ var "i",
-      Cpp._PreprocessorDirective_ifndef>>: lambda "i" $ encodeIfndefDirective @@ var "i",
-      Cpp._PreprocessorDirective_if>>: lambda "i" $ encodeIfDirective @@ var "i",
-      Cpp._PreprocessorDirective_elif>>: lambda "e" $ encodeElifDirective @@ var "e",
-      Cpp._PreprocessorDirective_else>>: lambda "e" $ encodeElseDirective @@ var "e",
-      Cpp._PreprocessorDirective_endif>>: lambda "e" $ encodeEndifDirective @@ var "e",
-      Cpp._PreprocessorDirective_line>>: lambda "l" $ encodeLineDirective @@ var "l",
-      Cpp._PreprocessorDirective_error>>: lambda "e" $ encodeErrorDirective @@ var "e",
-      Cpp._PreprocessorDirective_warning>>: lambda "w" $ encodeWarningDirective @@ var "w"]
-
-encodePrimaryExpression :: TTermDefinition (Cpp.PrimaryExpression -> Expr)
-encodePrimaryExpression = define "encodePrimaryExpression" $
-  doc "Convert a primary expression to an expression" $
-  lambda "e" $
-    cases Cpp._PrimaryExpression (var "e") Nothing [
-      Cpp._PrimaryExpression_identifier>>: lambda "id" $ Serialization.cst @@ var "id",
-      Cpp._PrimaryExpression_literal>>: lambda "l" $ encodeLiteral @@ var "l",
-      Cpp._PrimaryExpression_parenthesized>>: lambda "p" $ Serialization.parens @@ (encodeExpression @@ var "p"),
-      Cpp._PrimaryExpression_lambda>>: lambda "l" $ encodeLambdaExpression @@ var "l"]
-
-encodeProgram :: TTermDefinition (Cpp.Program -> Expr)
-encodeProgram = define "encodeProgram" $
-  doc "Convert a program to an expression" $
-  lambda "prog" $ lets [
-    "preps">: project Cpp._Program Cpp._Program_preprocessorDirectives @@ var "prog",
-    "includes">: project Cpp._Program Cpp._Program_includes @@ var "prog",
-    "decls">: project Cpp._Program Cpp._Program_declarations @@ var "prog",
-    "separate">: lambda "sep" $ lambda "defs" $
-      Logic.ifElse (Lists.null (var "defs"))
-        nothing
-        (just (var "sep" @@ var "defs"))] $
-    Serialization.doubleNewlineSep @@ (Maybes.cat $ list [
-      var "separate" @@ Serialization.newlineSep @@ (Lists.map encodePreprocessorDirective (var "preps")),
-      var "separate" @@ Serialization.newlineSep @@ (Lists.map encodeIncludeDirective (var "includes")),
-      var "separate" @@ Serialization.doubleNewlineSep @@ (Lists.map encodeDeclaration (var "decls"))])
-
-encodeQualifiedIdentifier :: TTermDefinition (Cpp.QualifiedIdentifier -> Expr)
-encodeQualifiedIdentifier = define "encodeQualifiedIdentifier" $
-  doc "Convert a qualified identifier to an expression" $
-  lambda "qi" $ lets [
-    "ns">: project Cpp._QualifiedIdentifier Cpp._QualifiedIdentifier_namespace @@ var "qi",
-    "name">: project Cpp._QualifiedIdentifier Cpp._QualifiedIdentifier_name @@ var "qi"] $
-    Serialization.cst @@ (Strings.cat $ list [var "ns", string "::", var "name"])
-
-encodeQualifiedType :: TTermDefinition (Cpp.QualifiedType -> Expr)
-encodeQualifiedType = define "encodeQualifiedType" $
-  doc "Convert a qualified type to an expression" $
-  lambda "qt" $ lets [
-    "baseType">: project Cpp._QualifiedType Cpp._QualifiedType_baseType @@ var "qt",
-    "qualifier">: project Cpp._QualifiedType Cpp._QualifiedType_qualifier @@ var "qt"] $
-    cases Cpp._TypeQualifier (var "qualifier") Nothing [
-      Cpp._TypeQualifier_const>>: constant $
-        Serialization.spaceSep @@ list [Serialization.cst @@ string "const", encodeTypeExpression @@ var "baseType"],
-      Cpp._TypeQualifier_lvalueRef>>: constant $
-        Serialization.noSep @@ list [encodeTypeExpression @@ var "baseType", Serialization.cst @@ string "&"],
-      Cpp._TypeQualifier_rvalueRef>>: constant $
-        Serialization.noSep @@ list [encodeTypeExpression @@ var "baseType", Serialization.cst @@ string "&&"],
-      Cpp._TypeQualifier_pointer>>: constant $
-        Serialization.noSep @@ list [encodeTypeExpression @@ var "baseType", Serialization.cst @@ string "*"]]
-
-encodeRangeForStatement :: TTermDefinition (Cpp.RangeForStatement -> Expr)
-encodeRangeForStatement = define "encodeRangeForStatement" $
-  doc "Convert a range-for statement to an expression" $
-  lambda "rfs" $ lets [
-    "typ">: project Cpp._RangeForStatement Cpp._RangeForStatement_type @@ var "rfs",
-    "var">: project Cpp._RangeForStatement Cpp._RangeForStatement_variable @@ var "rfs",
-    "range">: project Cpp._RangeForStatement Cpp._RangeForStatement_range @@ var "rfs",
-    "body">: project Cpp._RangeForStatement Cpp._RangeForStatement_body @@ var "rfs"] $
-    Serialization.newlineSep @@ list [
-      Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "for",
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          encodeTypeExpression @@ var "typ",
-          Serialization.cst @@ var "var",
-          Serialization.cst @@ string ":",
-          encodeExpression @@ var "range"])],
-      encodeStatement @@ var "body"]
-
-encodeRelationalExpression :: TTermDefinition (Cpp.RelationalExpression -> Expr)
-encodeRelationalExpression = define "encodeRelationalExpression" $
-  doc "Convert a relational expression to an expression" $
-  lambda "e" $
-    cases Cpp._RelationalExpression (var "e") Nothing [
-      Cpp._RelationalExpression_shift>>: lambda "s" $ encodeShiftExpression @@ var "s",
-      Cpp._RelationalExpression_less>>: lambda "l" $ encodeLessOperation @@ var "l",
-      Cpp._RelationalExpression_greater>>: lambda "g" $ encodeGreaterOperation @@ var "g",
-      Cpp._RelationalExpression_lessEqual>>: lambda "le" $ encodeLessEqualOperation @@ var "le",
-      Cpp._RelationalExpression_greaterEqual>>: lambda "ge" $ encodeGreaterEqualOperation @@ var "ge"]
-
-encodeRightShiftOperation :: TTermDefinition (Cpp.RightShiftOperation -> Expr)
-encodeRightShiftOperation = define "encodeRightShiftOperation" $
-  doc "Convert a right shift operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._RightShiftOperation Cpp._RightShiftOperation_left @@ var "op",
-    "right">: project Cpp._RightShiftOperation Cpp._RightShiftOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeShiftExpression @@ var "left",
-      Serialization.cst @@ string ">>",
-      encodeAdditiveExpression @@ var "right"]
-
-encodeSelectionStatement :: TTermDefinition (Cpp.SelectionStatement -> Expr)
-encodeSelectionStatement = define "encodeSelectionStatement" $
-  doc "Convert a selection statement to an expression" $
-  lambda "ss" $ lets [
-    "cond">: project Cpp._SelectionStatement Cpp._SelectionStatement_condition @@ var "ss",
-    "thenBranch">: project Cpp._SelectionStatement Cpp._SelectionStatement_thenBranch @@ var "ss",
-    "elseBranch">: project Cpp._SelectionStatement Cpp._SelectionStatement_elseBranch @@ var "ss"] $
-    Serialization.newlineSep @@ list [
-      Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "if",
-        Serialization.parens @@ (encodeExpression @@ var "cond")],
-      encodeStatement @@ var "thenBranch",
-      Maybes.maybe
-        (Serialization.cst @@ string "")
-        (lambda "stmt" $ Serialization.newlineSep @@ list [Serialization.cst @@ string "else", encodeStatement @@ var "stmt"])
-        (var "elseBranch")]
-
-encodeSet :: TTermDefinition (Cpp.Set -> Expr)
-encodeSet = define "encodeSet" $
-  doc "Convert a set to an expression" $
-  lambda "s" $ lets [
-    "elemType">: project Cpp._Set Cpp._Set_elementType @@ var "s",
-    "elems">: project Cpp._Set Cpp._Set_elements @@ var "s"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "std::set<",
-      encodeTypeExpression @@ var "elemType",
-      Serialization.cst @@ string ">",
-      Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ (Lists.map encodeExpression (var "elems"))]
-
-encodeShiftExpression :: TTermDefinition (Cpp.ShiftExpression -> Expr)
-encodeShiftExpression = define "encodeShiftExpression" $
-  doc "Convert a shift expression to an expression" $
-  lambda "e" $
-    cases Cpp._ShiftExpression (var "e") Nothing [
-      Cpp._ShiftExpression_additive>>: lambda "a" $ encodeAdditiveExpression @@ var "a",
-      Cpp._ShiftExpression_leftShift>>: lambda "ls" $ encodeLeftShiftOperation @@ var "ls",
-      Cpp._ShiftExpression_rightShift>>: lambda "rs" $ encodeRightShiftOperation @@ var "rs"]
-
-encodeSizeofExpression :: TTermDefinition (Cpp.SizeofExpression -> Expr)
-encodeSizeofExpression = define "encodeSizeofExpression" $
-  doc "Convert a sizeof expression to an expression" $
-  lambda "se" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "sizeof",
-      Serialization.parens @@ (encodeTypeExpression @@ (unwrap Cpp._SizeofExpression @@ var "se"))]
-
-encodeStatement :: TTermDefinition (Cpp.Statement -> Expr)
-encodeStatement = define "encodeStatement" $
-  doc "Convert a statement to an expression" $
-  lambda "s" $
-    cases Cpp._Statement (var "s") Nothing [
-      Cpp._Statement_labeled>>: lambda "l" $ encodeLabeledStatement @@ var "l",
-      Cpp._Statement_compound>>: lambda "c" $ encodeCompoundStatement @@ var "c",
-      Cpp._Statement_selection>>: lambda "s" $ encodeSelectionStatement @@ var "s",
-      Cpp._Statement_switch>>: lambda "s" $ encodeSwitchStatement @@ var "s",
-      Cpp._Statement_iteration>>: lambda "i" $ encodeIterationStatement @@ var "i",
-      Cpp._Statement_jump>>: lambda "j" $ encodeJumpStatement @@ var "j",
-      Cpp._Statement_declaration>>: lambda "v" $ Serialization.withSemi @@ (encodeVariableDeclaration @@ false @@ var "v"),
-      Cpp._Statement_expression>>: lambda "e" $ Serialization.withSemi @@ (encodeExpression @@ var "e")]
-
-encodeSubscriptOperation :: TTermDefinition (Cpp.SubscriptOperation -> Expr)
-encodeSubscriptOperation = define "encodeSubscriptOperation" $
-  doc "Convert a subscript operation to an expression" $
-  lambda "so" $ lets [
-    "array">: project Cpp._SubscriptOperation Cpp._SubscriptOperation_array @@ var "so",
-    "index">: project Cpp._SubscriptOperation Cpp._SubscriptOperation_index @@ var "so"] $
-    Serialization.noSep @@ list [
-      encodePostfixExpression @@ var "array",
-      Serialization.cst @@ string "[",
-      encodeExpression @@ var "index",
-      Serialization.cst @@ string "]"]
-
-encodeSubtractOperation :: TTermDefinition (Cpp.SubtractOperation -> Expr)
-encodeSubtractOperation = define "encodeSubtractOperation" $
-  doc "Convert a subtract operation to an expression" $
-  lambda "op" $ lets [
-    "left">: project Cpp._SubtractOperation Cpp._SubtractOperation_left @@ var "op",
-    "right">: project Cpp._SubtractOperation Cpp._SubtractOperation_right @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      encodeAdditiveExpression @@ var "left",
-      Serialization.cst @@ string "-",
-      encodeMultiplicativeExpression @@ var "right"]
-
-encodeSwitchStatement :: TTermDefinition (Cpp.SwitchStatement -> Expr)
-encodeSwitchStatement = define "encodeSwitchStatement" $
-  doc "Convert a switch statement to an expression" $
-  lambda "ss" $ lets [
-    "value">: project Cpp._SwitchStatement Cpp._SwitchStatement_value @@ var "ss",
-    "cases">: project Cpp._SwitchStatement Cpp._SwitchStatement_cases @@ var "ss"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "switch",
-      Serialization.parens @@ (encodeExpression @@ var "value"),
-      Serialization.curlyBlock @@ Serialization.fullBlockStyle @@
-        (Serialization.newlineSep @@ (Lists.map encodeCaseStatement (var "cases")))]
-
-encodeTemplateArgument :: TTermDefinition (Cpp.TemplateArgument -> Expr)
-encodeTemplateArgument = define "encodeTemplateArgument" $
-  doc "Convert a template argument to an expression" $
-  lambda "a" $
-    cases Cpp._TemplateArgument (var "a") Nothing [
-      Cpp._TemplateArgument_type>>: lambda "t" $ encodeTypeExpression @@ var "t",
-      Cpp._TemplateArgument_value>>: lambda "e" $ encodeExpression @@ var "e"]
-
-encodeTemplateDeclaration :: TTermDefinition (Cpp.TemplateDeclaration -> Expr)
-encodeTemplateDeclaration = define "encodeTemplateDeclaration" $
-  doc "Convert a template declaration to an expression" $
-  lambda "td" $ lets [
-    "inline">: project Cpp._TemplateDeclaration Cpp._TemplateDeclaration_inline @@ var "td",
-    "params">: project Cpp._TemplateDeclaration Cpp._TemplateDeclaration_parameters @@ var "td",
-    "declaration">: project Cpp._TemplateDeclaration Cpp._TemplateDeclaration_declaration @@ var "td",
-    "sep">: Logic.ifElse (var "inline") Serialization.spaceSep Serialization.newlineSep] $
-    var "sep" @@ list [
-      Serialization.noSep @@ list [
-        Serialization.cst @@ string "template",
-        Serialization.angleBracesList @@ Serialization.inlineStyle @@
-          (Lists.map (lambda "p" $ Serialization.cst @@ var "p") (var "params"))],
-      encodeDeclaration @@ var "declaration"]
-
-encodeTemplateFunctionCallOperation :: TTermDefinition (Cpp.TemplateFunctionCallOperation -> Expr)
-encodeTemplateFunctionCallOperation = define "encodeTemplateFunctionCallOperation" $
-  doc "Convert a template function call operation to an expression" $
-  lambda "tfco" $ lets [
-    "func">: project Cpp._TemplateFunctionCallOperation Cpp._TemplateFunctionCallOperation_function @@ var "tfco",
-    "templateArgs">: project Cpp._TemplateFunctionCallOperation Cpp._TemplateFunctionCallOperation_templateArguments @@ var "tfco",
-    "args">: project Cpp._TemplateFunctionCallOperation Cpp._TemplateFunctionCallOperation_arguments @@ var "tfco"] $
-    Serialization.noSep @@ list [
-      encodePostfixExpression @@ var "func",
-      Serialization.angleBracesList @@ Serialization.inlineStyle @@ (Lists.map encodeTemplateArgument (var "templateArgs")),
-      Serialization.parens @@ (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map encodeExpression (var "args")))]
-
-encodeTemplateType :: TTermDefinition (Cpp.TemplateType -> Expr)
-encodeTemplateType = define "encodeTemplateType" $
-  doc "Convert a template type to an expression" $
-  lambda "tt" $ lets [
-    "name">: project Cpp._TemplateType Cpp._TemplateType_name @@ var "tt",
-    "args">: project Cpp._TemplateType Cpp._TemplateType_arguments @@ var "tt"] $
-    Serialization.noSep @@ list [
-      Serialization.cst @@ var "name",
-      Serialization.angleBracesList @@ Serialization.inlineStyle @@ (Lists.map encodeTemplateArgument (var "args"))]
-
-encodeTernaryExpression :: TTermDefinition (Cpp.TernaryExpression -> Expr)
-encodeTernaryExpression = define "encodeTernaryExpression" $
-  doc "Convert a ternary expression to an expression" $
-  lambda "te" $ lets [
-    "cond">: project Cpp._TernaryExpression Cpp._TernaryExpression_condition @@ var "te",
-    "trueExpr">: project Cpp._TernaryExpression Cpp._TernaryExpression_trueExpr @@ var "te",
-    "falseExpr">: project Cpp._TernaryExpression Cpp._TernaryExpression_falseExpr @@ var "te"] $
-    Serialization.spaceSep @@ list [
-      encodeLogicalOrExpression @@ var "cond",
-      Serialization.cst @@ string "?",
-      encodeExpression @@ var "trueExpr",
-      Serialization.cst @@ string ":",
-      encodeConditionalExpression @@ var "falseExpr"]
-
-encodeToCppComments :: TTermDefinition (String -> Bool -> String)
-encodeToCppComments = define "toCppComments" $
-  doc ("Convert a string to a C++ comment. Empty single-line comments emit `//`"
-    <> " (no trailing space).") $
-  lambda "s" $ lambda "isMultiline" $
-    Logic.ifElse (var "isMultiline")
-      (Strings.cat $ list [string "/* ", var "s", string " */"])
-      (Logic.ifElse (Equality.equal (var "s") (string ""))
-        (string "//")
-        (Strings.cat2 (string "// ") (var "s")))
-
-encodeTypeExpression :: TTermDefinition (Cpp.TypeExpression -> Expr)
-encodeTypeExpression = define "encodeTypeExpression" $
-  doc "Convert a type expression to an expression" $
-  lambda "t" $
-    cases Cpp._TypeExpression (var "t") Nothing [
-      Cpp._TypeExpression_basic>>: lambda "b" $ encodeBasicType @@ var "b",
-      Cpp._TypeExpression_qualified>>: lambda "q" $ encodeQualifiedType @@ var "q",
-      Cpp._TypeExpression_template>>: lambda "t" $ encodeTemplateType @@ var "t",
-      Cpp._TypeExpression_function>>: lambda "f" $ encodeFunctionType @@ var "f",
-      Cpp._TypeExpression_auto>>: constant $ Serialization.cst @@ string "auto"]
-
-encodeTypedefDeclaration :: TTermDefinition (Cpp.TypedefDeclaration -> Expr)
-encodeTypedefDeclaration = define "encodeTypedefDeclaration" $
-  doc "Convert a typedef declaration to an expression" $
-  lambda "td" $ lets [
-    "name">: project Cpp._TypedefDeclaration Cpp._TypedefDeclaration_name @@ var "td",
-    "typ">: project Cpp._TypedefDeclaration Cpp._TypedefDeclaration_type @@ var "td",
-    "isUsing">: project Cpp._TypedefDeclaration Cpp._TypedefDeclaration_isUsing @@ var "td"] $
-    Logic.ifElse (var "isUsing")
-      (Serialization.withSemi @@ (Serialization.spaceSep @@ list [
-        Serialization.cst @@ (Strings.cat2 (string "using ") (var "name")),
-        Serialization.cst @@ string "=",
-        encodeTypeExpression @@ var "typ"]))
-      (Serialization.withSemi @@ (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "typedef",
-        encodeTypeExpression @@ var "typ",
-        Serialization.cst @@ var "name"]))
-
-encodeUnaryExpression :: TTermDefinition (Cpp.UnaryExpression -> Expr)
-encodeUnaryExpression = define "encodeUnaryExpression" $
-  doc "Convert a unary expression to an expression" $
-  lambda "e" $
-    cases Cpp._UnaryExpression (var "e") Nothing [
-      Cpp._UnaryExpression_postfix>>: lambda "p" $ encodePostfixExpression @@ var "p",
-      Cpp._UnaryExpression_unaryOp>>: lambda "o" $ encodeUnaryOperation @@ var "o",
-      Cpp._UnaryExpression_sizeof>>: lambda "s" $ encodeSizeofExpression @@ var "s"]
-
-encodeUnaryOperation :: TTermDefinition (Cpp.UnaryOperation -> Expr)
-encodeUnaryOperation = define "encodeUnaryOperation" $
-  doc "Convert a unary operation to an expression" $
-  lambda "uo" $ lets [
-    "op">: project Cpp._UnaryOperation Cpp._UnaryOperation_operator @@ var "uo",
-    "operand">: project Cpp._UnaryOperation Cpp._UnaryOperation_operand @@ var "uo"] $
-    Serialization.spaceSep @@ list [
-      encodeUnaryOperator @@ var "op",
-      encodeUnaryExpression @@ var "operand"]
-
-encodeUnaryOperator :: TTermDefinition (Cpp.UnaryOperator -> Expr)
-encodeUnaryOperator = define "encodeUnaryOperator" $
-  doc "Convert a unary operator to an expression" $
-  lambda "op" $
-    cases Cpp._UnaryOperator (var "op") Nothing [
-      Cpp._UnaryOperator_plus>>: constant $ Serialization.cst @@ string "+",
-      Cpp._UnaryOperator_minus>>: constant $ Serialization.cst @@ string "-",
-      Cpp._UnaryOperator_logicalNot>>: constant $ Serialization.cst @@ string "!",
-      Cpp._UnaryOperator_bitwiseNot>>: constant $ Serialization.cst @@ string "~",
-      Cpp._UnaryOperator_dereference>>: constant $ Serialization.cst @@ string "*",
-      Cpp._UnaryOperator_addressOf>>: constant $ Serialization.cst @@ string "&",
-      Cpp._UnaryOperator_preIncrement>>: constant $ Serialization.cst @@ string "++",
-      Cpp._UnaryOperator_preDecrement>>: constant $ Serialization.cst @@ string "--"]
-
-encodeUndefDirective :: TTermDefinition (Cpp.UndefDirective -> Expr)
-encodeUndefDirective = define "encodeUndefDirective" $
-  doc "Convert an undef directive to an expression" $
-  lambda "ud" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#undef",
-      Serialization.cst @@ (project Cpp._UndefDirective Cpp._UndefDirective_name @@ var "ud")]
-
-encodeVariableDeclaration :: TTermDefinition (Bool -> Cpp.VariableDeclaration -> Expr)
-encodeVariableDeclaration = define "encodeVariableDeclaration" $
-  doc "Convert a variable declaration to an expression" $
-  lambda "commas" $ lambda "vd" $ lets [
-    "typ">: project Cpp._VariableDeclaration Cpp._VariableDeclaration_type @@ var "vd",
-    "name">: project Cpp._VariableDeclaration Cpp._VariableDeclaration_name @@ var "vd",
-    "init">: project Cpp._VariableDeclaration Cpp._VariableDeclaration_initializer @@ var "vd",
-    "isAuto">: project Cpp._VariableDeclaration Cpp._VariableDeclaration_isAuto @@ var "vd",
-    "terminator">: Logic.ifElse (var "commas") Serialization.withComma Serialization.withSemi] $
-    var "terminator" @@ (Serialization.spaceSep @@ (Lists.concat $ list [
-      Logic.ifElse (var "isAuto")
-        (list [Serialization.cst @@ string "auto"])
-        (Maybes.maybe
-          (list ([] :: [TTerm Expr]))
-          (lambda "t" $ list [encodeTypeExpression @@ var "t"])
-          (var "typ")),
-      list [Serialization.cst @@ var "name"],
-      Maybes.maybe
-        (list ([] :: [TTerm Expr]))
-        (lambda "expr" $ list [Serialization.cst @@ string "=", encodeExpression @@ var "expr"])
-        (var "init")]))
-
-encodeVector :: TTermDefinition (Cpp.Vector -> Expr)
-encodeVector = define "encodeVector" $
-  doc "Convert a vector to an expression" $
-  lambda "v" $ lets [
-    "elemType">: project Cpp._Vector Cpp._Vector_elementType @@ var "v",
-    "elems">: project Cpp._Vector Cpp._Vector_elements @@ var "v"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "std::vector<",
-      encodeTypeExpression @@ var "elemType",
-      Serialization.cst @@ string ">",
-      Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ (Lists.map encodeExpression (var "elems"))]
-
-encodeVisitor :: TTermDefinition (Cpp.Visitor -> Expr)
-encodeVisitor = define "encodeVisitor" $
-  doc "Convert a visitor to an expression" $
-  lambda "v" $
-    cases Cpp._Visitor (var "v") Nothing [
-      Cpp._Visitor_lambda>>: lambda "l" $ encodeLambdaExpression @@ var "l",
-      Cpp._Visitor_overloaded>>: lambda "o" $ encodeOverloadedLambdas @@ var "o"]
-
-encodeWarningDirective :: TTermDefinition (Cpp.WarningDirective -> Expr)
-encodeWarningDirective = define "encodeWarningDirective" $
-  doc "Convert a warning directive to an expression" $
-  lambda "wd" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "#warning",
-      Serialization.cst @@ (project Cpp._WarningDirective Cpp._WarningDirective_message @@ var "wd")]
-
-encodeWhileStatement :: TTermDefinition (Cpp.WhileStatement -> Expr)
-encodeWhileStatement = define "encodeWhileStatement" $
-  doc "Convert a while statement to an expression" $
-  lambda "ws" $ lets [
-    "cond">: project Cpp._WhileStatement Cpp._WhileStatement_condition @@ var "ws",
-    "body">: project Cpp._WhileStatement Cpp._WhileStatement_body @@ var "ws"] $
-    Serialization.newlineSep @@ list [
-      Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "while",
-        Serialization.parens @@ (encodeExpression @@ var "cond")],
-      encodeStatement @@ var "body"]
-
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Syntax.hs b/src/main/haskell/Hydra/Sources/Cpp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Syntax.hs
+++ /dev/null
@@ -1,821 +0,0 @@
--- Note: this file was created with the help of a large language model. It requires further human review.
-
-module Hydra.Sources.Cpp.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.cpp.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-cpp :: String -> Type
-cpp = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A C++ syntax model, focusing on features for representing algebraic data types and declarative computations"}
-  where
-    definitions = accessSpecifiers ++ declarationTypes ++ expressionTypes ++ statementTypes
-               ++ typeTypes ++ literalTypes ++ containers ++ utilities ++ operatorTypes
-
-    accessSpecifiers = [accessSpecifier]
-
-    declarationTypes = [
-      program, includeDirective, declaration, namespaceDeclaration, typedefDeclaration,
-      classDeclaration, templateDeclaration, preprocessorDirective, pragmaDirective,
-      defineDirective, undefDirective, ifdefDirective, ifndefDirective, ifDirective,
-      elifDirective, elseDirective, endifDirective, lineDirective, errorDirective,
-      warningDirective, classSpecifier, classKey, baseSpecifier, classBody,
-      memberSpecification, memberDeclaration, constructorDeclaration, memInitializer,
-      destructorDeclaration, functionDeclaration, functionSpecifierPrefix, functionSpecifierSuffix,
-      parameter, functionBody, variableDeclaration, variantDeclaration, productDeclaration,
-      containerDeclaration, listDeclaration, mapDeclaration, setDeclaration, optionalDeclaration]
-
-    expressionTypes = [
-      expression, commaExpression, assignmentExpression, explicitAssignment, assignmentOperator,
-      conditionalExpression, ternaryExpression, logicalOrExpression, logicalOrOperation,
-      logicalAndExpression, logicalAndOperation, inclusiveOrExpression, bitwiseOrOperation,
-      exclusiveOrExpression, bitwiseXorOperation, andExpression, bitwiseAndOperation,
-      equalityExpression, equalOperation, notEqualOperation, relationalExpression,
-      lessOperation, greaterOperation, lessEqualOperation, greaterEqualOperation,
-      shiftExpression, leftShiftOperation, rightShiftOperation, additiveExpression,
-      addOperation, subtractOperation, multiplicativeExpression, multiplyOperation,
-      divideOperation, moduloOperation, unaryExpression, unaryOperation, unaryOperator,
-      sizeofExpression, postfixExpression, subscriptOperation, functionCallOperation,
-      memberAccessOperation, pointerMemberAccessOperation, templateFunctionCallOperation,
-      primaryExpression, lambdaExpression, captureList, capture, patternMatch, visitor,
-      overloadedLambdas, functionApplication, functionIdentifier, qualifiedIdentifier]
-
-    statementTypes = [
-      statement, labeledStatement, compoundStatement, selectionStatement, switchStatement,
-      caseStatement, caseValue, iterationStatement, whileStatement, doStatement,
-      forStatement, forInit, rangeForStatement, jumpStatement, expressionStatement]
-
-    typeTypes = [
-      typeExpression, basicType, qualifiedType, typeQualifier, templateType,
-      templateArgument, functionType_]
-
-    literalTypes = [
-      literal, integerLiteral, floatingLiteral, characterLiteral, stringLiteral, booleanLiteral]
-
-    containers = [vector, map_, mapEntry, set_, optional]
-
-    operatorTypes = [binaryOperator]
-
-    utilities = [identifier_, comment]
-
--- Access specifiers
-accessSpecifier :: Binding
-accessSpecifier = define "AccessSpecifier" $ T.enum ["public", "protected", "private", "none"]
-
--- Declaration-related types
-program :: Binding
-program = define "Program" $ T.record [
-  "preprocessorDirectives">: T.list $ cpp "PreprocessorDirective",
-  "includes">: T.list $ cpp "IncludeDirective",
-  "declarations">: T.list $ cpp "Declaration"]
-
-includeDirective :: Binding
-includeDirective = define "IncludeDirective" $ T.record [
-  "name">: T.string,
-  "isSystem">: T.boolean]
-
-declaration :: Binding
-declaration = define "Declaration" $ T.union [
-  "preprocessor">: cpp "PreprocessorDirective",
-  "class">: cpp "ClassDeclaration",
-  "function">: cpp "FunctionDeclaration",
-  "variable">: cpp "VariableDeclaration",
-  "typedef">: cpp "TypedefDeclaration",
-  "namespace">: cpp "NamespaceDeclaration",
-  "template">: cpp "TemplateDeclaration"]
-
-namespaceDeclaration :: Binding
-namespaceDeclaration = define "NamespaceDeclaration" $ T.record [
-  "name">: T.string,
-  "declarations">: T.list $ cpp "Declaration"]
-
-typedefDeclaration :: Binding
-typedefDeclaration = define "TypedefDeclaration" $ T.record [
-  "name">: T.string,
-  "type">: cpp "TypeExpression",
-  "isUsing">: T.boolean]
-
-classDeclaration :: Binding
-classDeclaration = define "ClassDeclaration" $ T.record [
-  "specifier">: cpp "ClassSpecifier",
-  "body">: T.optional $ cpp "ClassBody"]
-
-templateDeclaration :: Binding
-templateDeclaration = define "TemplateDeclaration" $ T.record [
-  "inline">: T.boolean,
-  "parameters">: T.list T.string,
-  "declaration">: cpp "Declaration"]
-
-preprocessorDirective :: Binding
-preprocessorDirective = define "PreprocessorDirective" $ T.union [
-  "include">: cpp "IncludeDirective",
-  "pragma">: cpp "PragmaDirective",
-  "define">: cpp "DefineDirective",
-  "undef">: cpp "UndefDirective",
-  "ifdef">: cpp "IfdefDirective",
-  "ifndef">: cpp "IfndefDirective",
-  "if">: cpp "IfDirective",
-  "elif">: cpp "ElifDirective",
-  "else">: cpp "ElseDirective",
-  "endif">: cpp "EndifDirective",
-  "line">: cpp "LineDirective",
-  "error">: cpp "ErrorDirective",
-  "warning">: cpp "WarningDirective"]
-
-pragmaDirective :: Binding
-pragmaDirective = define "PragmaDirective" $ T.record [
-  "content">: T.string]
-
-defineDirective :: Binding
-defineDirective = define "DefineDirective" $ T.record [
-  "name">: T.string,
-  "parameters">: T.optional $ T.list T.string,
-  "replacement">: T.optional T.string]
-
-undefDirective :: Binding
-undefDirective = define "UndefDirective" $ T.record [
-  "name">: T.string]
-
-ifdefDirective :: Binding
-ifdefDirective = define "IfdefDirective" $ T.record [
-  "identifier">: T.string]
-
-ifndefDirective :: Binding
-ifndefDirective = define "IfndefDirective" $ T.record [
-  "identifier">: T.string]
-
-ifDirective :: Binding
-ifDirective = define "IfDirective" $ T.record [
-  "condition">: T.string]
-
-elifDirective :: Binding
-elifDirective = define "ElifDirective" $ T.record [
-  "condition">: T.string]
-
-elseDirective :: Binding
-elseDirective = define "ElseDirective" T.unit
-
-endifDirective :: Binding
-endifDirective = define "EndifDirective" T.unit
-
-lineDirective :: Binding
-lineDirective = define "LineDirective" $ T.record [
-  "lineNumber">: T.int32,
-  "filename">: T.optional T.string]
-
-errorDirective :: Binding
-errorDirective = define "ErrorDirective" $ T.record [
-  "message">: T.string]
-
-warningDirective :: Binding
-warningDirective = define "WarningDirective" $ T.record [
-  "message">: T.string]
-
-classSpecifier :: Binding
-classSpecifier = define "ClassSpecifier" $ T.record [
-  "key">: cpp "ClassKey",
-  "name">: T.string,
-  "inheritance">: T.list $ cpp "BaseSpecifier"]
-
-classKey :: Binding
-classKey = define "ClassKey" $ T.enum ["class", "enum", "enumClass", "struct"]
-
-baseSpecifier :: Binding
-baseSpecifier = define "BaseSpecifier" $ T.record [
-  "access">: cpp "AccessSpecifier",
-  "name">: T.string]
-
-classBody :: Binding
-classBody = define "ClassBody" $ T.wrap $ T.list $ cpp "MemberSpecification"
-
-memberSpecification :: Binding
-memberSpecification = define "MemberSpecification" $ T.union [
-  "accessLabel">: cpp "AccessSpecifier",
-  "member">: cpp "MemberDeclaration"]
-
-memberDeclaration :: Binding
-memberDeclaration = define "MemberDeclaration" $ T.union [
-  "function">: cpp "FunctionDeclaration",
-  "variable">: cpp "VariableDeclaration",
-  "constructor">: cpp "ConstructorDeclaration",
-  "destructor">: cpp "DestructorDeclaration",
-  "nestedClass">: cpp "ClassDeclaration",
-  "template">: cpp "TemplateDeclaration"]
-
-constructorDeclaration :: Binding
-constructorDeclaration = define "ConstructorDeclaration" $ T.record [
-  "name">: T.string,
-  "parameters">: T.list $ cpp "Parameter",
-  "initializers">: T.list $ cpp "MemInitializer",
-  "body">: cpp "FunctionBody"]
-
-memInitializer :: Binding
-memInitializer = define "MemInitializer" $ T.record [
-  "name">: T.string,
-  "arguments">: T.list $ cpp "Expression"]
-
-destructorDeclaration :: Binding
-destructorDeclaration = define "DestructorDeclaration" $ T.record [
-  "prefixSpecifiers" >: T.list (cpp "FunctionSpecifierPrefix"),
-  "name" >: T.string,
-  "suffixSpecifiers" >: T.list (cpp "FunctionSpecifierSuffix"),
-  "body" >: cpp "FunctionBody"]
-
-functionDeclaration :: Binding
-functionDeclaration = define "FunctionDeclaration" $ T.record [
-  "prefixSpecifiers" >: T.list (cpp "FunctionSpecifierPrefix"),
-  "returnType" >: cpp "TypeExpression",
-  "name" >: T.string,
-  "parameters" >: T.list (cpp "Parameter"),
-  "suffixSpecifiers" >: T.list (cpp "FunctionSpecifierSuffix"),
-  "body" >: cpp "FunctionBody"]
-
-functionSpecifierPrefix :: Binding
-functionSpecifierPrefix = define "FunctionSpecifierPrefix" $ T.enum ["inline", "virtual", "static", "explicit"]
-
-functionSpecifierSuffix :: Binding
-functionSpecifierSuffix = define "FunctionSpecifierSuffix" $ T.enum ["const", "noexcept", "override", "final"]
-
-parameter :: Binding
-parameter = define "Parameter" $ T.record [
-  "type">: cpp "TypeExpression",
-  "name">: T.string,
-  "unnamed">: T.boolean,
-  "defaultValue">: T.optional $ cpp "Expression"]
-
-functionBody :: Binding
-functionBody = define "FunctionBody" $ T.union [
-  "compound">: cpp "CompoundStatement",
-  "declaration">: T.unit,
-  "pure">: T.unit,
-  "default">: T.unit]
-
-variableDeclaration :: Binding
-variableDeclaration = define "VariableDeclaration" $ T.record [
-  "type">: T.optional $ cpp "TypeExpression",
-  "name">: T.string,
-  "initializer">: T.optional $ cpp "Expression",
-  "isAuto">: T.boolean]
-
-variantDeclaration :: Binding
-variantDeclaration = define "VariantDeclaration" $ T.record [
-  "types">: T.list $ cpp "TypeExpression",
-  "name">: T.string]
-
-productDeclaration :: Binding
-productDeclaration = define "ProductDeclaration" $ T.record [
-  "name">: T.string,
-  "fields">: T.list $ cpp "VariableDeclaration"]
-
-containerDeclaration :: Binding
-containerDeclaration = define "ContainerDeclaration" $ T.union [
-  "list">: cpp "ListDeclaration",
-  "map">: cpp "MapDeclaration",
-  "set">: cpp "SetDeclaration",
-  "optional">: cpp "OptionalDeclaration"]
-
-listDeclaration :: Binding
-listDeclaration = define "ListDeclaration" $ T.record [
-  "elementType">: cpp "TypeExpression",
-  "name">: T.string]
-
-mapDeclaration :: Binding
-mapDeclaration = define "MapDeclaration" $ T.record [
-  "keyType">: cpp "TypeExpression",
-  "valueType">: cpp "TypeExpression",
-  "name">: T.string]
-
-setDeclaration :: Binding
-setDeclaration = define "SetDeclaration" $ T.record [
-  "elementType">: cpp "TypeExpression",
-  "name">: T.string]
-
-optionalDeclaration :: Binding
-optionalDeclaration = define "OptionalDeclaration" $ T.record [
-  "valueType">: cpp "TypeExpression",
-  "name">: T.string]
-
--- Expression-related types
-expression :: Binding
-expression = define "Expression" $ T.union [
-  "assignment">: cpp "AssignmentExpression",
-  "comma">: cpp "CommaExpression"]
-
-commaExpression :: Binding
-commaExpression = define "CommaExpression" $ T.record [
-  "left">: cpp "Expression",
-  "right">: cpp "AssignmentExpression"]
-
-assignmentExpression :: Binding
-assignmentExpression = define "AssignmentExpression" $ T.union [
-  "conditional">: cpp "ConditionalExpression",
-  "assignment">: cpp "ExplicitAssignment"]
-
-explicitAssignment :: Binding
-explicitAssignment = define "ExplicitAssignment" $ T.record [
-  "left">: cpp "LogicalOrExpression",
-  "op">: cpp "AssignmentOperator",
-  "right">: cpp "AssignmentExpression"]
-
-assignmentOperator :: Binding
-assignmentOperator = define "AssignmentOperator" $ T.enum [
-  "assign", "plusAssign", "minusAssign", "multiplyAssign", "divideAssign",
-  "moduloAssign", "leftShiftAssign", "rightShiftAssign", "bitwiseAndAssign",
-  "bitwiseXorAssign", "bitwiseOrAssign"]
-
-conditionalExpression :: Binding
-conditionalExpression = define "ConditionalExpression" $ T.union [
-  "logicalOr">: cpp "LogicalOrExpression",
-  "ternary">: cpp "TernaryExpression"]
-
-ternaryExpression :: Binding
-ternaryExpression = define "TernaryExpression" $ T.record [
-  "condition">: cpp "LogicalOrExpression",
-  "trueExpr">: cpp "Expression",
-  "falseExpr">: cpp "ConditionalExpression"]
-
-logicalOrExpression :: Binding
-logicalOrExpression = define "LogicalOrExpression" $ T.union [
-  "logicalAnd">: cpp "LogicalAndExpression",
-  "logicalOr">: cpp "LogicalOrOperation"]
-
-logicalOrOperation :: Binding
-logicalOrOperation = define "LogicalOrOperation" $ T.record [
-  "left">: cpp "LogicalOrExpression",
-  "right">: cpp "LogicalAndExpression"]
-
-logicalAndExpression :: Binding
-logicalAndExpression = define "LogicalAndExpression" $ T.union [
-  "inclusiveOr">: cpp "InclusiveOrExpression",
-  "logicalAnd">: cpp "LogicalAndOperation"]
-
-logicalAndOperation :: Binding
-logicalAndOperation = define "LogicalAndOperation" $ T.record [
-  "left">: cpp "LogicalAndExpression",
-  "right">: cpp "InclusiveOrExpression"]
-
-inclusiveOrExpression :: Binding
-inclusiveOrExpression = define "InclusiveOrExpression" $ T.union [
-  "exclusiveOr">: cpp "ExclusiveOrExpression",
-  "bitwiseOr">: cpp "BitwiseOrOperation"]
-
-bitwiseOrOperation :: Binding
-bitwiseOrOperation = define "BitwiseOrOperation" $ T.record [
-  "left">: cpp "InclusiveOrExpression",
-  "right">: cpp "ExclusiveOrExpression"]
-
-exclusiveOrExpression :: Binding
-exclusiveOrExpression = define "ExclusiveOrExpression" $ T.union [
-  "and">: cpp "AndExpression",
-  "bitwiseXor">: cpp "BitwiseXorOperation"]
-
-bitwiseXorOperation :: Binding
-bitwiseXorOperation = define "BitwiseXorOperation" $ T.record [
-  "left">: cpp "ExclusiveOrExpression",
-  "right">: cpp "AndExpression"]
-
-andExpression :: Binding
-andExpression = define "AndExpression" $ T.union [
-  "equality">: cpp "EqualityExpression",
-  "bitwiseAnd">: cpp "BitwiseAndOperation"]
-
-bitwiseAndOperation :: Binding
-bitwiseAndOperation = define "BitwiseAndOperation" $ T.record [
-  "left">: cpp "AndExpression",
-  "right">: cpp "EqualityExpression"]
-
-equalityExpression :: Binding
-equalityExpression = define "EqualityExpression" $ T.union [
-  "relational">: cpp "RelationalExpression",
-  "equal">: cpp "EqualOperation",
-  "notEqual">: cpp "NotEqualOperation"]
-
-equalOperation :: Binding
-equalOperation = define "EqualOperation" $ T.record [
-  "left">: cpp "EqualityExpression",
-  "right">: cpp "RelationalExpression"]
-
-notEqualOperation :: Binding
-notEqualOperation = define "NotEqualOperation" $ T.record [
-  "left">: cpp "EqualityExpression",
-  "right">: cpp "RelationalExpression"]
-
-relationalExpression :: Binding
-relationalExpression = define "RelationalExpression" $ T.union [
-  "shift">: cpp "ShiftExpression",
-  "less">: cpp "LessOperation",
-  "greater">: cpp "GreaterOperation",
-  "lessEqual">: cpp "LessEqualOperation",
-  "greaterEqual">: cpp "GreaterEqualOperation"]
-
-lessOperation :: Binding
-lessOperation = define "LessOperation" $ T.record [
-  "left">: cpp "RelationalExpression",
-  "right">: cpp "ShiftExpression"]
-
-greaterOperation :: Binding
-greaterOperation = define "GreaterOperation" $ T.record [
-  "left">: cpp "RelationalExpression",
-  "right">: cpp "ShiftExpression"]
-
-lessEqualOperation :: Binding
-lessEqualOperation = define "LessEqualOperation" $ T.record [
-  "left">: cpp "RelationalExpression",
-  "right">: cpp "ShiftExpression"]
-
-greaterEqualOperation :: Binding
-greaterEqualOperation = define "GreaterEqualOperation" $ T.record [
-  "left">: cpp "RelationalExpression",
-  "right">: cpp "ShiftExpression"]
-
-shiftExpression :: Binding
-shiftExpression = define "ShiftExpression" $ T.union [
-  "additive">: cpp "AdditiveExpression",
-  "leftShift">: cpp "LeftShiftOperation",
-  "rightShift">: cpp "RightShiftOperation"]
-
-leftShiftOperation :: Binding
-leftShiftOperation = define "LeftShiftOperation" $ T.record [
-  "left">: cpp "ShiftExpression",
-  "right">: cpp "AdditiveExpression"]
-
-rightShiftOperation :: Binding
-rightShiftOperation = define "RightShiftOperation" $ T.record [
-  "left">: cpp "ShiftExpression",
-  "right">: cpp "AdditiveExpression"]
-
-additiveExpression :: Binding
-additiveExpression = define "AdditiveExpression" $ T.union [
-  "multiplicative">: cpp "MultiplicativeExpression",
-  "add">: cpp "AddOperation",
-  "subtract">: cpp "SubtractOperation"]
-
-addOperation :: Binding
-addOperation = define "AddOperation" $ T.record [
-  "left">: cpp "AdditiveExpression",
-  "right">: cpp "MultiplicativeExpression"]
-
-subtractOperation :: Binding
-subtractOperation = define "SubtractOperation" $ T.record [
-  "left">: cpp "AdditiveExpression",
-  "right">: cpp "MultiplicativeExpression"]
-
-multiplicativeExpression :: Binding
-multiplicativeExpression = define "MultiplicativeExpression" $ T.union [
-  "unary">: cpp "UnaryExpression",
-  "multiply">: cpp "MultiplyOperation",
-  "divide">: cpp "DivideOperation",
-  "modulo">: cpp "ModuloOperation"]
-
-multiplyOperation :: Binding
-multiplyOperation = define "MultiplyOperation" $ T.record [
-  "left">: cpp "MultiplicativeExpression",
-  "right">: cpp "UnaryExpression"]
-
-divideOperation :: Binding
-divideOperation = define "DivideOperation" $ T.record [
-  "left">: cpp "MultiplicativeExpression",
-  "right">: cpp "UnaryExpression"]
-
-moduloOperation :: Binding
-moduloOperation = define "ModuloOperation" $ T.record [
-  "left">: cpp "MultiplicativeExpression",
-  "right">: cpp "UnaryExpression"]
-
-unaryExpression :: Binding
-unaryExpression = define "UnaryExpression" $ T.union [
-  "postfix">: cpp "PostfixExpression",
-  "unaryOp">: cpp "UnaryOperation",
-  "sizeof">: cpp "SizeofExpression"]
-
-unaryOperation :: Binding
-unaryOperation = define "UnaryOperation" $ T.record [
-  "operator">: cpp "UnaryOperator",
-  "operand">: cpp "UnaryExpression"]
-
-unaryOperator :: Binding
-unaryOperator = define "UnaryOperator" $ T.enum [
-  "plus", "minus", "logicalNot", "bitwiseNot", "dereference",
-  "addressOf", "preIncrement", "preDecrement"]
-
-sizeofExpression :: Binding
-sizeofExpression = define "SizeofExpression" $ T.wrap $ cpp "TypeExpression"
-
-postfixExpression :: Binding
-postfixExpression = define "PostfixExpression" $ T.union [
-  "primary">: cpp "PrimaryExpression",
-  "subscript">: cpp "SubscriptOperation",
-  "functionCall">: cpp "FunctionCallOperation",
-  "templateFunctionCall">: cpp "TemplateFunctionCallOperation",
-  "memberAccess">: cpp "MemberAccessOperation",
-  "pointerMemberAccess">: cpp "PointerMemberAccessOperation",
-  "postIncrement">: cpp "PostfixExpression",
-  "postDecrement">: cpp "PostfixExpression"]
-
-subscriptOperation :: Binding
-subscriptOperation = define "SubscriptOperation" $ T.record [
-  "array">: cpp "PostfixExpression",
-  "index">: cpp "Expression"]
-
-functionCallOperation :: Binding
-functionCallOperation = define "FunctionCallOperation" $ T.record [
-  "function">: cpp "PostfixExpression",
-  "arguments">: T.list $ cpp "Expression"]
-
-memberAccessOperation :: Binding
-memberAccessOperation = define "MemberAccessOperation" $ T.record [
-  "object">: cpp "PostfixExpression",
-  "member">: T.string]
-
-pointerMemberAccessOperation :: Binding
-pointerMemberAccessOperation = define "PointerMemberAccessOperation" $ T.record [
-  "pointer">: cpp "PostfixExpression",
-  "member">: T.string]
-
-templateFunctionCallOperation :: Binding
-templateFunctionCallOperation = define "TemplateFunctionCallOperation" $ T.record [
-  "function">: cpp "PostfixExpression",
-  "templateArguments">: T.list $ cpp "TemplateArgument",
-  "arguments">: T.list $ cpp "Expression"]
-
-primaryExpression :: Binding
-primaryExpression = define "PrimaryExpression" $ T.union [
-  "identifier">: T.string,
-  "literal">: cpp "Literal",
-  "parenthesized">: cpp "Expression",
-  "lambda">: cpp "LambdaExpression"]
-
-lambdaExpression :: Binding
-lambdaExpression = define "LambdaExpression" $ T.record [
-  "captures">: cpp "CaptureList",
-  "parameters">: T.list $ cpp "Parameter",
-  "returnType">: T.optional $ cpp "TypeExpression",
-  "body">: cpp "CompoundStatement"]
-
-captureList :: Binding
-captureList = define "CaptureList" $ T.union [
-  "captureByValue">: T.unit,
-  "captures">: T.list $ cpp "Capture"]
-
-capture :: Binding
-capture = define "Capture" $ T.record [
-  "name">: T.string,
-  "byReference">: T.boolean]
-
-patternMatch :: Binding
-patternMatch = define "PatternMatch" $ T.record [
-  "visitor">: cpp "Visitor",
-  "variant">: cpp "Expression"]
-
-visitor :: Binding
-visitor = define "Visitor" $ T.union [
-  "lambda">: cpp "LambdaExpression",
-  "overloaded">: cpp "OverloadedLambdas"]
-
-overloadedLambdas :: Binding
-overloadedLambdas = define "OverloadedLambdas" $ T.wrap $ T.list $ cpp "LambdaExpression"
-
-functionApplication :: Binding
-functionApplication = define "FunctionApplication" $ T.record [
-  "function">: cpp "FunctionIdentifier",
-  "arguments">: T.list $ cpp "Expression"]
-
-functionIdentifier :: Binding
-functionIdentifier = define "FunctionIdentifier" $ T.union [
-  "simple">: T.string,
-  "qualified">: cpp "QualifiedIdentifier"]
-
-qualifiedIdentifier :: Binding
-qualifiedIdentifier = define "QualifiedIdentifier" $ T.record [
-  "namespace">: T.string,
-  "name">: T.string]
-
--- Statement-related types
-statement :: Binding
-statement = define "Statement" $ T.union [
-  "labeled">: cpp "LabeledStatement",
-  "compound">: cpp "CompoundStatement",
-  "selection">: cpp "SelectionStatement",
-  "switch">: cpp "SwitchStatement",
-  "iteration">: cpp "IterationStatement",
-  "jump">: cpp "JumpStatement",
-  "declaration">: cpp "VariableDeclaration",
-  "expression">: cpp "Expression"]
-
-labeledStatement :: Binding
-labeledStatement = define "LabeledStatement" $ T.record [
-  "label">: T.string,
-  "statement">: cpp "Statement"]
-
-compoundStatement :: Binding
-compoundStatement = define "CompoundStatement" $ T.wrap $ T.list $ cpp "Statement"
-
-selectionStatement :: Binding
-selectionStatement = define "SelectionStatement" $ T.record [
-  "condition">: cpp "Expression",
-  "thenBranch">: cpp "Statement",
-  "elseBranch">: T.optional $ cpp "Statement"]
-
-switchStatement :: Binding
-switchStatement = define "SwitchStatement" $ T.record [
-  "value">: cpp "Expression",
-  "cases">: T.list $ cpp "CaseStatement"]
-
-caseStatement :: Binding
-caseStatement = define "CaseStatement" $ T.union [
-  "case">: cpp "CaseValue",
-  "default">: cpp "Statement"]
-
-caseValue :: Binding
-caseValue = define "CaseValue" $ T.record [
-  "value">: cpp "Expression",
-  "statement">: cpp "Statement"]
-
-iterationStatement :: Binding
-iterationStatement = define "IterationStatement" $ T.union [
-  "while">: cpp "WhileStatement",
-  "do">: cpp "DoStatement",
-  "for">: cpp "ForStatement",
-  "rangeFor">: cpp "RangeForStatement"]
-
-whileStatement :: Binding
-whileStatement = define "WhileStatement" $ T.record [
-  "condition">: cpp "Expression",
-  "body">: cpp "Statement"]
-
-doStatement :: Binding
-doStatement = define "DoStatement" $ T.record [
-  "body">: cpp "Statement",
-  "condition">: cpp "Expression"]
-
-forStatement :: Binding
-forStatement = define "ForStatement" $ T.record [
-  "init">: cpp "ForInit",
-  "condition">: cpp "Expression",
-  "increment">: cpp "Expression",
-  "body">: cpp "Statement"]
-
-forInit :: Binding
-forInit = define "ForInit" $ T.union [
-  "expression">: cpp "Expression",
-  "declaration">: cpp "VariableDeclaration",
-  "empty">: T.unit]
-
-rangeForStatement :: Binding
-rangeForStatement = define "RangeForStatement" $ T.record [
-  "type">: cpp "TypeExpression",
-  "variable">: T.string,
-  "range">: cpp "Expression",
-  "body">: cpp "Statement"]
-
-jumpStatement :: Binding
-jumpStatement = define "JumpStatement" $ T.union [
-  "break">: T.unit,
-  "continue">: T.unit,
-  "returnValue">: cpp "Expression",
-  "returnVoid">: T.unit,
-  "throw">: cpp "Expression"]
-
-expressionStatement :: Binding
-expressionStatement = define "ExpressionStatement" $ T.wrap $ cpp "Expression"
-
--- Type-related types
-typeExpression :: Binding
-typeExpression = define "TypeExpression" $ T.union [
-  "basic">: cpp "BasicType",
-  "qualified">: cpp "QualifiedType",
-  "template">: cpp "TemplateType",
-  "function">: cpp "FunctionType",
-  "auto">: T.unit]
-
-basicType :: Binding
-basicType = define "BasicType" $ T.union [
-  "void">: T.unit,
-  "bool">: T.unit,
-  "char">: T.unit,
-  "int">: T.unit,
-  "float">: T.unit,
-  "double">: T.unit,
-  "string">: T.unit,
-  "auto">: T.unit,
-  "named">: T.string]
-
-qualifiedType :: Binding
-qualifiedType = define "QualifiedType" $ T.record [
-  "baseType">: cpp "TypeExpression",
-  "qualifier">: cpp "TypeQualifier"]
-
-typeQualifier :: Binding
-typeQualifier = define "TypeQualifier" $ T.enum ["const", "lvalueRef", "rvalueRef", "pointer"]
-
-templateType :: Binding
-templateType = define "TemplateType" $ T.record [
-  "name">: T.string,
-  "arguments">: T.list $ cpp "TemplateArgument"]
-
-templateArgument :: Binding
-templateArgument = define "TemplateArgument" $ T.union [
-  "type">: cpp "TypeExpression",
-  "value">: cpp "Expression"]
-
-functionType_ :: Binding
-functionType_ = define "FunctionType" $ T.record [
-  "returnType">: cpp "TypeExpression",
-  "parameters">: T.list $ cpp "Parameter"]
-
--- Literal-related types
-literal :: Binding
-literal = define "Literal" $ T.union [
-  "integer">: cpp "IntegerLiteral",
-  "floating">: cpp "FloatingLiteral",
-  "character">: cpp "CharacterLiteral",
-  "string">: cpp "StringLiteral",
-  "boolean">: cpp "BooleanLiteral",
-  "null">: T.unit]
-
-integerLiteral :: Binding
-integerLiteral = define "IntegerLiteral" $ T.union [
-  "decimal">: T.bigint,
-  "hexadecimal">: T.string,
-  "octal">: T.string,
-  "binary">: T.string]
-
-floatingLiteral :: Binding
-floatingLiteral = define "FloatingLiteral" $ T.wrap T.bigfloat
-
-characterLiteral :: Binding
-characterLiteral = define "CharacterLiteral" $ T.wrap T.string
-
-stringLiteral :: Binding
-stringLiteral = define "StringLiteral" $ T.wrap T.string
-
-booleanLiteral :: Binding
-booleanLiteral = define "BooleanLiteral" $ T.wrap T.boolean
-
--- Container-related types
-vector :: Binding
-vector = define "Vector" $ T.record [
-  "elementType">: cpp "TypeExpression",
-  "elements">: T.list $ cpp "Expression"]
-
-map_ :: Binding
-map_ = define "Map" $ T.record [
-  "keyType">: cpp "TypeExpression",
-  "valueType">: cpp "TypeExpression",
-  "entries">: T.list $ cpp "MapEntry"]
-
-mapEntry :: Binding
-mapEntry = define "MapEntry" $ T.record [
-  "key">: cpp "Expression",
-  "value">: cpp "Expression"]
-
-set_ :: Binding
-set_ = define "Set" $ T.record [
-  "elementType">: cpp "TypeExpression",
-  "elements">: T.list $ cpp "Expression"]
-
-optional :: Binding
-optional = define "Optional" $ T.record [
-  "valueType">: cpp "TypeExpression",
-  "value">: T.optional $ cpp "Expression"]
-
--- Operator types
-binaryOperator :: Binding
-binaryOperator = define "BinaryOperator" $ T.enum [
-  "plus", "minus", "multiply", "divide", "modulo",
-  "bitwiseAnd", "bitwiseOr", "bitwiseXor",
-  "logicalAnd", "logicalOr",
-  "equal", "notEqual", "less", "greater", "lessEqual", "greaterEqual",
-  "leftShift", "rightShift"]
-
--- Utility types
-identifier_ :: Binding
-identifier_ = define "Identifier" T.string
-
-comment :: Binding
-comment = define "Comment" $ T.record [
-  "text">: T.string,
-  "isMultiline">: T.boolean]
diff --git a/src/main/haskell/Hydra/Sources/Cpp/Utils.hs b/src/main/haskell/Hydra/Sources/Cpp/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cpp/Utils.hs
+++ /dev/null
@@ -1,610 +0,0 @@
--- | C++ utilities for constructing C++ syntax trees.
--- Provides functions for building common C++ AST patterns, and the CppEnvironment type.
-
-module Hydra.Sources.Cpp.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as KAnnotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Cpp.Syntax as Cpp
-import qualified Hydra.Sources.Cpp.Syntax as CppSyntax
-
-
--- Phantom type for CppEnvironment, defined in Hydra.Sources.Cpp.Environment
-data CppEnvironment
-
-_CppEnvironment :: Name
-_CppEnvironment = Name "hydra.cpp.environment.CppEnvironment"
-
-_CppEnvironment_namespaces :: Name
-_CppEnvironment_namespaces = Name "namespaces"
-
-_CppEnvironment_boundTypeVariables :: Name
-_CppEnvironment_boundTypeVariables = Name "boundTypeVariables"
-
-
--- Term-level definitions
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.cpp.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = (CppSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "C++ utilities for constructing C++ syntax trees"}
-  where
-    definitions = [
-      toDefinition constParameter,
-      toDefinition cppClassDeclaration,
-      toDefinition cppEnumDeclaration,
-      toDefinition cppEnumForwardDeclaration,
-      toDefinition cppPostfixExpressionToCppExpression,
-      toDefinition cppPrimaryExpressionToCppExpression,
-      toDefinition cppUnaryExpressionToCppExpression,
-      toDefinition cppUnaryExpressionToCppLogicalOrExpression,
-      toDefinition createCastExpr,
-      toDefinition createCompoundStmt,
-      toDefinition createConstRefType,
-      toDefinition createConstType,
-      toDefinition createConstructorBody,
-      toDefinition createEnumAccessExpr,
-      toDefinition createFunctionCallExpr,
-      toDefinition createHeaderFile,
-      toDefinition createIdentifierExpr,
-      toDefinition createLambdaExpr,
-      toDefinition createLiteralBoolExpr,
-      toDefinition createLiteralIntExpr,
-      toDefinition createLiteralStringExpr,
-      toDefinition createMemberAccessExpr,
-      toDefinition createQualifiedType,
-      toDefinition createReferenceType,
-      toDefinition createReturnStmt,
-      toDefinition createReturnVoidStmt,
-      toDefinition createTemplateType,
-      toDefinition createThisExpr,
-      toDefinition createThrowStmt,
-      toDefinition createTypeIdNameCall,
-      toDefinition createTypeNameExpr,
-      toDefinition createVariantExpr,
-      toDefinition emptyFunctionBody,
-      toDefinition extractPostfixExpression,
-      toDefinition memberSpecificationProtected,
-      toDefinition memberSpecificationPublic,
-      toDefinition stringExpression,
-      toDefinition toConstType,
-      toDefinition unnamedParameter]
-
--- | Create a const reference parameter
-constParameter :: TTermDefinition (String -> Cpp.TypeExpression -> Cpp.Parameter)
-constParameter = def "constParameter" $
-  doc "Create a const reference parameter" $
-  lambdas ["name", "typ"] $
-    record Cpp._Parameter [
-      Cpp._Parameter_type>>:
-        inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-          record Cpp._QualifiedType [
-            Cpp._QualifiedType_baseType>>:
-              inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-                record Cpp._QualifiedType [
-                  Cpp._QualifiedType_baseType>>: var "typ",
-                  Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_const unit],
-            Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_lvalueRef unit],
-      Cpp._Parameter_name>>: var "name",
-      Cpp._Parameter_unnamed>>: false,
-      Cpp._Parameter_defaultValue>>: nothing]
-
--- | Create a C++ class declaration
-cppClassDeclaration :: TTermDefinition (String -> [Cpp.BaseSpecifier] -> Maybe Cpp.ClassBody -> Cpp.Declaration)
-cppClassDeclaration = def "cppClassDeclaration" $
-  doc "Create a C++ class declaration" $
-  lambdas ["name", "baseSpecs", "mbody"] $
-    inject Cpp._Declaration Cpp._Declaration_class $
-      record Cpp._ClassDeclaration [
-        Cpp._ClassDeclaration_specifier>>:
-          record Cpp._ClassSpecifier [
-            Cpp._ClassSpecifier_key>>: inject Cpp._ClassKey Cpp._ClassKey_class unit,
-            Cpp._ClassSpecifier_name>>: var "name",
-            Cpp._ClassSpecifier_inheritance>>: var "baseSpecs"],
-        Cpp._ClassDeclaration_body>>: var "mbody"]
-
--- | Create a C++ enum class declaration
-cppEnumDeclaration :: TTermDefinition (String -> Maybe Cpp.ClassBody -> Cpp.Declaration)
-cppEnumDeclaration = def "cppEnumDeclaration" $
-  doc "Create a C++ enum class declaration" $
-  lambdas ["name", "mbody"] $
-    inject Cpp._Declaration Cpp._Declaration_class $
-      record Cpp._ClassDeclaration [
-        Cpp._ClassDeclaration_specifier>>:
-          record Cpp._ClassSpecifier [
-            Cpp._ClassSpecifier_key>>: inject Cpp._ClassKey Cpp._ClassKey_enumClass unit,
-            Cpp._ClassSpecifier_name>>: var "name",
-            Cpp._ClassSpecifier_inheritance>>: list ([] :: [TTerm Cpp.BaseSpecifier])],
-        Cpp._ClassDeclaration_body>>: var "mbody"]
-
--- | Create a C++ enum class forward declaration
-cppEnumForwardDeclaration :: TTermDefinition (String -> Cpp.Declaration)
-cppEnumForwardDeclaration = def "cppEnumForwardDeclaration" $
-  doc "Create a C++ enum class forward declaration" $
-  lambda "name" $
-    inject Cpp._Declaration Cpp._Declaration_class $
-      record Cpp._ClassDeclaration [
-        Cpp._ClassDeclaration_specifier>>:
-          record Cpp._ClassSpecifier [
-            Cpp._ClassSpecifier_key>>: inject Cpp._ClassKey Cpp._ClassKey_enumClass unit,
-            Cpp._ClassSpecifier_name>>: var "name",
-            Cpp._ClassSpecifier_inheritance>>: list ([] :: [TTerm Cpp.BaseSpecifier])],
-        Cpp._ClassDeclaration_body>>: nothing]
-
--- | Convert a PostfixExpression to an Expression
-cppPostfixExpressionToCppExpression :: TTermDefinition (Cpp.PostfixExpression -> Cpp.Expression)
-cppPostfixExpressionToCppExpression = def "cppPostfixExpressionToCppExpression" $
-  doc "Convert a PostfixExpression to an Expression" $
-  lambda "pf" $
-    cppUnaryExpressionToCppExpression @@
-      (inject Cpp._UnaryExpression Cpp._UnaryExpression_postfix $ var "pf")
-
--- | Convert a PrimaryExpression to an Expression
-cppPrimaryExpressionToCppExpression :: TTermDefinition (Cpp.PrimaryExpression -> Cpp.Expression)
-cppPrimaryExpressionToCppExpression = def "cppPrimaryExpressionToCppExpression" $
-  doc "Convert a PrimaryExpression to an Expression" $
-  lambda "prim" $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $ var "prim")
-
--- | Convert a UnaryExpression to an Expression
-cppUnaryExpressionToCppExpression :: TTermDefinition (Cpp.UnaryExpression -> Cpp.Expression)
-cppUnaryExpressionToCppExpression = def "cppUnaryExpressionToCppExpression" $
-  doc "Convert a UnaryExpression to an Expression" $
-  lambda "ue" $
-    inject Cpp._Expression Cpp._Expression_assignment $
-      inject Cpp._AssignmentExpression Cpp._AssignmentExpression_conditional $
-        inject Cpp._ConditionalExpression Cpp._ConditionalExpression_logicalOr $
-          cppUnaryExpressionToCppLogicalOrExpression @@ var "ue"
-
--- | Convert a UnaryExpression to a LogicalOrExpression
-cppUnaryExpressionToCppLogicalOrExpression :: TTermDefinition (Cpp.UnaryExpression -> Cpp.LogicalOrExpression)
-cppUnaryExpressionToCppLogicalOrExpression = def "cppUnaryExpressionToCppLogicalOrExpression" $
-  doc "Convert a UnaryExpression to a LogicalOrExpression" $
-  lambda "ue" $
-    inject Cpp._LogicalOrExpression Cpp._LogicalOrExpression_logicalAnd $
-      inject Cpp._LogicalAndExpression Cpp._LogicalAndExpression_inclusiveOr $
-        inject Cpp._InclusiveOrExpression Cpp._InclusiveOrExpression_exclusiveOr $
-          inject Cpp._ExclusiveOrExpression Cpp._ExclusiveOrExpression_and $
-            inject Cpp._AndExpression Cpp._AndExpression_equality $
-              inject Cpp._EqualityExpression Cpp._EqualityExpression_relational $
-                inject Cpp._RelationalExpression Cpp._RelationalExpression_shift $
-                  inject Cpp._ShiftExpression Cpp._ShiftExpression_additive $
-                    inject Cpp._AdditiveExpression Cpp._AdditiveExpression_multiplicative $
-                      inject Cpp._MultiplicativeExpression Cpp._MultiplicativeExpression_unary $
-                        var "ue"
-
--- | Create a cast expression
-createCastExpr :: TTermDefinition (Cpp.TypeExpression -> Cpp.Expression -> Cpp.Expression)
-createCastExpr = def "createCastExpr" $
-  doc "Create a cast expression" $
-  lambdas ["targetType", "expr"] $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_parenthesized $
-        cppPrimaryExpressionToCppExpression @@
-          (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_parenthesized $ var "expr"))
-
--- | Create a compound statement
-createCompoundStmt :: TTermDefinition ([Cpp.Statement] -> Cpp.CompoundStatement)
-createCompoundStmt = def "createCompoundStmt" $
-  doc "Create a compound statement" $
-  lambda "stmts" $ wrap Cpp._CompoundStatement $ var "stmts"
-
--- | Create a const reference type
-createConstRefType :: TTermDefinition (Cpp.TypeExpression -> Cpp.TypeExpression)
-createConstRefType = def "createConstRefType" $
-  doc "Create a const reference type" $
-  lambda "baseType" $
-    createReferenceType @@ (createConstType @@ var "baseType")
-
--- | Create a const-qualified type
-createConstType :: TTermDefinition (Cpp.TypeExpression -> Cpp.TypeExpression)
-createConstType = def "createConstType" $
-  doc "Create a const-qualified type" $
-  lambda "baseType" $
-    createQualifiedType @@ var "baseType" @@ (inject Cpp._TypeQualifier Cpp._TypeQualifier_const unit)
-
--- | Create a constructor body (default if no params, empty otherwise)
-createConstructorBody :: TTermDefinition ([Cpp.Parameter] -> Cpp.FunctionBody)
-createConstructorBody = def "createConstructorBody" $
-  doc "Create a constructor body (default if no params, empty otherwise)" $
-  lambda "params" $
-    Logic.ifElse (Lists.null $ var "params")
-      (inject Cpp._FunctionBody Cpp._FunctionBody_default unit)
-      emptyFunctionBody
-
--- | Create an enum access expression (e.g., EnumName.valueName)
-createEnumAccessExpr :: TTermDefinition (String -> String -> Cpp.Expression)
-createEnumAccessExpr = def "createEnumAccessExpr" $
-  doc "Create an enum access expression" $
-  lambdas ["enumName", "valueName"] $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_memberAccess $
-        record Cpp._MemberAccessOperation [
-          Cpp._MemberAccessOperation_object>>:
-            inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-              inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ var "enumName",
-          Cpp._MemberAccessOperation_member>>: var "valueName"])
-
--- | Create a function call expression
-createFunctionCallExpr :: TTermDefinition (String -> [Cpp.Expression] -> Cpp.Expression)
-createFunctionCallExpr = def "createFunctionCallExpr" $
-  doc "Create a function call expression" $
-  lambdas ["funcName", "args"] $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-        record Cpp._FunctionCallOperation [
-          Cpp._FunctionCallOperation_function>>:
-            inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-              inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ var "funcName",
-          Cpp._FunctionCallOperation_arguments>>: var "args"])
-
--- | Create a header file with pragma once
-createHeaderFile :: TTermDefinition ([Cpp.IncludeDirective] -> [Cpp.Declaration] -> Cpp.Program)
-createHeaderFile = def "createHeaderFile" $
-  doc "Create a header file with pragma once" $
-  lambdas ["includes", "decls"] $
-    record Cpp._Program [
-      Cpp._Program_preprocessorDirectives>>:
-        list [inject Cpp._PreprocessorDirective Cpp._PreprocessorDirective_pragma $
-          record Cpp._PragmaDirective [Cpp._PragmaDirective_content>>: string "once"]],
-      Cpp._Program_includes>>: var "includes",
-      Cpp._Program_declarations>>: var "decls"]
-
--- | Create an identifier expression
-createIdentifierExpr :: TTermDefinition (String -> Cpp.Expression)
-createIdentifierExpr = def "createIdentifierExpr" $
-  doc "Create an identifier expression" $
-  lambda "name" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ var "name")
-
--- | Create a lambda expression
-createLambdaExpr :: TTermDefinition ([Cpp.Parameter] -> Cpp.Expression -> Cpp.Expression)
-createLambdaExpr = def "createLambdaExpr" $
-  doc "Create a lambda expression" $
-  lambdas ["params", "body"] $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-        inject Cpp._PrimaryExpression Cpp._PrimaryExpression_lambda $
-          record Cpp._LambdaExpression [
-            Cpp._LambdaExpression_captures>>:
-              inject Cpp._CaptureList Cpp._CaptureList_captures $
-                list ([] :: [TTerm Cpp.Capture]),
-            Cpp._LambdaExpression_parameters>>: var "params",
-            Cpp._LambdaExpression_returnType>>: nothing,
-            Cpp._LambdaExpression_body>>:
-              wrap Cpp._CompoundStatement $
-                list [inject Cpp._Statement Cpp._Statement_expression $ var "body"]])
-
--- | Create a boolean literal expression
-createLiteralBoolExpr :: TTermDefinition (Bool -> Cpp.Expression)
-createLiteralBoolExpr = def "createLiteralBoolExpr" $
-  doc "Create a boolean literal expression" $
-  lambda "val" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_literal $
-        inject Cpp._Literal Cpp._Literal_boolean $
-          wrap Cpp._BooleanLiteral $ var "val")
-
--- | Create an integer literal expression
-createLiteralIntExpr :: TTermDefinition (I.Int32 -> Cpp.Expression)
-createLiteralIntExpr = def "createLiteralIntExpr" $
-  doc "Create an integer literal expression" $
-  lambda "val" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_literal $
-        inject Cpp._Literal Cpp._Literal_integer $
-          inject Cpp._IntegerLiteral Cpp._IntegerLiteral_decimal $
-            var "val")
-
--- | Create a string literal expression
-createLiteralStringExpr :: TTermDefinition (String -> Cpp.Expression)
-createLiteralStringExpr = def "createLiteralStringExpr" $
-  doc "Create a string literal expression" $
-  lambda "val" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_literal $
-        inject Cpp._Literal Cpp._Literal_string $
-          wrap Cpp._StringLiteral $ var "val")
-
--- | Create a member access expression (e.g., obj.member)
-createMemberAccessExpr :: TTermDefinition (Cpp.Expression -> String -> Cpp.Expression)
-createMemberAccessExpr = def "createMemberAccessExpr" $
-  doc "Create a member access expression" $
-  lambdas ["objExpr", "member"] $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_memberAccess $
-        record Cpp._MemberAccessOperation [
-          Cpp._MemberAccessOperation_object>>: extractPostfixExpression @@ var "objExpr",
-          Cpp._MemberAccessOperation_member>>: var "member"])
-
--- | Create a qualified type with a qualifier
-createQualifiedType :: TTermDefinition (Cpp.TypeExpression -> Cpp.TypeQualifier -> Cpp.TypeExpression)
-createQualifiedType = def "createQualifiedType" $
-  doc "Create a qualified type with a qualifier" $
-  lambdas ["baseType", "qualifier"] $
-    inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-      record Cpp._QualifiedType [
-        Cpp._QualifiedType_baseType>>: var "baseType",
-        Cpp._QualifiedType_qualifier>>: var "qualifier"]
-
--- | Create a reference type
-createReferenceType :: TTermDefinition (Cpp.TypeExpression -> Cpp.TypeExpression)
-createReferenceType = def "createReferenceType" $
-  doc "Create a reference type" $
-  lambda "baseType" $
-    createQualifiedType @@ var "baseType" @@ (inject Cpp._TypeQualifier Cpp._TypeQualifier_lvalueRef unit)
-
--- | Create a return statement with a value
-createReturnStmt :: TTermDefinition (Cpp.Expression -> Cpp.Statement)
-createReturnStmt = def "createReturnStmt" $
-  doc "Create a return statement with a value" $
-  lambda "expr" $
-    inject Cpp._Statement Cpp._Statement_jump $
-      inject Cpp._JumpStatement Cpp._JumpStatement_returnValue $ var "expr"
-
--- | Create a void return statement
-createReturnVoidStmt :: TTermDefinition Cpp.Statement
-createReturnVoidStmt = def "createReturnVoidStmt" $
-  doc "Create a void return statement" $
-  inject Cpp._Statement Cpp._Statement_jump $
-    inject Cpp._JumpStatement Cpp._JumpStatement_returnVoid unit
-
--- | Create a template type (e.g., std::shared_ptr<T>)
-createTemplateType :: TTermDefinition (String -> [Cpp.TypeExpression] -> Cpp.TypeExpression)
-createTemplateType = def "createTemplateType" $
-  doc "Create a template type" $
-  lambdas ["name", "args"] $
-    inject Cpp._TypeExpression Cpp._TypeExpression_template $
-      record Cpp._TemplateType [
-        Cpp._TemplateType_name>>: var "name",
-        Cpp._TemplateType_arguments>>:
-          Lists.map
-            (lambda "a" $ inject Cpp._TemplateArgument Cpp._TemplateArgument_type $ var "a")
-            (var "args")]
-
--- | Create a *this expression
-createThisExpr :: TTermDefinition Cpp.Expression
-createThisExpr = def "createThisExpr" $
-  doc "Create a *this expression" $
-  cppPostfixExpressionToCppExpression @@
-    (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-      inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ string "*this")
-
--- | Create a throw statement
-createThrowStmt :: TTermDefinition (String -> Cpp.Expression -> Cpp.Statement)
-createThrowStmt = def "createThrowStmt" $
-  doc "Create a throw statement" $
-  lambdas ["exceptionType", "arg"] $
-    inject Cpp._Statement Cpp._Statement_jump $
-      inject Cpp._JumpStatement Cpp._JumpStatement_throw $
-        createFunctionCallExpr @@ var "exceptionType" @@ list [var "arg"]
-
--- | Create a typeid(...).name() call expression
-createTypeIdNameCall :: TTermDefinition Cpp.Expression
-createTypeIdNameCall = def "createTypeIdNameCall" $
-  doc "Create a typeid(...).name() call expression" $
-  cppPostfixExpressionToCppExpression @@
-    (inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-      record Cpp._FunctionCallOperation [
-        Cpp._FunctionCallOperation_function>>:
-          inject Cpp._PostfixExpression Cpp._PostfixExpression_memberAccess $
-            record Cpp._MemberAccessOperation [
-              Cpp._MemberAccessOperation_object>>:
-                inject Cpp._PostfixExpression Cpp._PostfixExpression_functionCall $
-                  record Cpp._FunctionCallOperation [
-                    Cpp._FunctionCallOperation_function>>:
-                      inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-                        inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ string "typeid",
-                    Cpp._FunctionCallOperation_arguments>>:
-                      list [cppPrimaryExpressionToCppExpression @@
-                        (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_parenthesized $ asTerm createThisExpr)]],
-              Cpp._MemberAccessOperation_member>>: string "name"],
-        Cpp._FunctionCallOperation_arguments>>: list ([] :: [TTerm Cpp.Expression])])
-
--- | Create a type name expression
-createTypeNameExpr :: TTermDefinition (String -> Cpp.Expression)
-createTypeNameExpr = def "createTypeNameExpr" $
-  doc "Create a type name expression" $
-  lambda "typeName" $
-    cppPostfixExpressionToCppExpression @@
-      (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-        inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ var "typeName")
-
--- | Create a variant expression
-createVariantExpr :: TTermDefinition Cpp.Expression
-createVariantExpr = def "createVariantExpr" $
-  doc "Create a variant expression" $
-  cppPostfixExpressionToCppExpression @@
-    (inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-      inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ string "variant")
-
--- | An empty function body
-emptyFunctionBody :: TTermDefinition Cpp.FunctionBody
-emptyFunctionBody = def "emptyFunctionBody" $
-  doc "An empty function body" $
-  inject Cpp._FunctionBody Cpp._FunctionBody_compound $
-    wrap Cpp._CompoundStatement $ list ([] :: [TTerm Cpp.Statement])
-
--- | Extract the PostfixExpression from a fully-wrapped Expression
-extractPostfixExpression :: TTermDefinition (Cpp.Expression -> Cpp.PostfixExpression)
-extractPostfixExpression = def "extractPostfixExpression" $
-  doc "Extract the PostfixExpression from a fully-wrapped Expression" $
-  lambda "expr" $
-    match Cpp._Expression (Just defaultPostfix) [
-      Cpp._Expression_assignment>>: lambda "a" $
-        match Cpp._AssignmentExpression (Just defaultPostfix) [
-          Cpp._AssignmentExpression_conditional>>: lambda "c" $
-            match Cpp._ConditionalExpression (Just defaultPostfix) [
-              Cpp._ConditionalExpression_logicalOr>>: lambda "lo" $
-                match Cpp._LogicalOrExpression (Just defaultPostfix) [
-                  Cpp._LogicalOrExpression_logicalAnd>>: lambda "la" $
-                    match Cpp._LogicalAndExpression (Just defaultPostfix) [
-                      Cpp._LogicalAndExpression_inclusiveOr>>: lambda "io" $
-                        match Cpp._InclusiveOrExpression (Just defaultPostfix) [
-                          Cpp._InclusiveOrExpression_exclusiveOr>>: lambda "xo" $
-                            match Cpp._ExclusiveOrExpression (Just defaultPostfix) [
-                              Cpp._ExclusiveOrExpression_and>>: lambda "ae" $
-                                match Cpp._AndExpression (Just defaultPostfix) [
-                                  Cpp._AndExpression_equality>>: lambda "eq" $
-                                    match Cpp._EqualityExpression (Just defaultPostfix) [
-                                      Cpp._EqualityExpression_relational>>: lambda "re" $
-                                        match Cpp._RelationalExpression (Just defaultPostfix) [
-                                          Cpp._RelationalExpression_shift>>: lambda "sh" $
-                                            match Cpp._ShiftExpression (Just defaultPostfix) [
-                                              Cpp._ShiftExpression_additive>>: lambda "ad" $
-                                                match Cpp._AdditiveExpression (Just defaultPostfix) [
-                                                  Cpp._AdditiveExpression_multiplicative>>: lambda "mu" $
-                                                    match Cpp._MultiplicativeExpression (Just defaultPostfix) [
-                                                      Cpp._MultiplicativeExpression_unary>>: lambda "ue" $
-                                                        match Cpp._UnaryExpression (Just defaultPostfix) [
-                                                          Cpp._UnaryExpression_postfix>>: lambda "pf" $ var "pf"]
-                                                        @@ var "ue"]
-                                                    @@ var "mu"]
-                                                @@ var "ad"]
-                                            @@ var "sh"]
-                                        @@ var "re"]
-                                    @@ var "eq"]
-                                @@ var "ae"]
-                            @@ var "xo"]
-                        @@ var "io"]
-                    @@ var "la"]
-                @@ var "lo"]
-            @@ var "c"]
-        @@ var "a"]
-    @@ var "expr"
-  where
-    defaultPostfix =
-      inject Cpp._PostfixExpression Cpp._PostfixExpression_primary $
-        inject Cpp._PrimaryExpression Cpp._PrimaryExpression_identifier $ string "error"
-
--- | Protected access specifier member specification
-memberSpecificationProtected :: TTermDefinition Cpp.MemberSpecification
-memberSpecificationProtected = def "memberSpecificationProtected" $
-  doc "Protected access specifier member specification" $
-  inject Cpp._MemberSpecification Cpp._MemberSpecification_accessLabel $
-    inject Cpp._AccessSpecifier Cpp._AccessSpecifier_protected unit
-
--- | Public access specifier member specification
-memberSpecificationPublic :: TTermDefinition Cpp.MemberSpecification
-memberSpecificationPublic = def "memberSpecificationPublic" $
-  doc "Public access specifier member specification" $
-  inject Cpp._MemberSpecification Cpp._MemberSpecification_accessLabel $
-    inject Cpp._AccessSpecifier Cpp._AccessSpecifier_public unit
-
--- | Create a string expression
-stringExpression :: TTermDefinition (String -> Cpp.Expression)
-stringExpression = def "stringExpression" $
-  doc "Create a string expression" $
-  lambda "s" $
-    cppPrimaryExpressionToCppExpression @@
-      (inject Cpp._PrimaryExpression Cpp._PrimaryExpression_literal $
-        inject Cpp._Literal Cpp._Literal_string $
-          wrap Cpp._StringLiteral $ var "s")
-
--- | Add const qualifier to a type
-toConstType :: TTermDefinition (Cpp.TypeExpression -> Cpp.TypeExpression)
-toConstType = def "toConstType" $
-  doc "Add const qualifier to a type" $
-  lambda "baseType" $
-    inject Cpp._TypeExpression Cpp._TypeExpression_qualified $
-      record Cpp._QualifiedType [
-        Cpp._QualifiedType_baseType>>: var "baseType",
-        Cpp._QualifiedType_qualifier>>: inject Cpp._TypeQualifier Cpp._TypeQualifier_const unit]
-
--- | Create an unnamed parameter
-unnamedParameter :: TTermDefinition (String -> Cpp.TypeExpression -> Cpp.Parameter)
-unnamedParameter = def "unnamedParameter" $
-  doc "Create an unnamed parameter" $
-  lambdas ["name", "typ"] $
-    record Cpp._Parameter [
-      Cpp._Parameter_type>>: var "typ",
-      Cpp._Parameter_name>>: var "name",
-      Cpp._Parameter_unnamed>>: true,
-      Cpp._Parameter_defaultValue>>: nothing]
diff --git a/src/main/haskell/Hydra/Sources/Csharp/Language.hs b/src/main/haskell/Hydra/Sources/Csharp/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Csharp/Language.hs
+++ /dev/null
@@ -1,194 +0,0 @@
-module Hydra.Sources.Csharp.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.csharp.language"),
-            moduleDefinitions = [toDefinition csharpLanguage, toDefinition csharpReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for C Sharp (C#)"}
-csharpLanguage :: TTermDefinition Language
-csharpLanguage = define "csharpLanguage" $
-  doc "Language constraints for C Sharp (C#)" $ lets [
-  "eliminationVariants">: Sets.fromList $ list [ -- TODO: verify whether all are supported
-    Variants.eliminationVariantRecord,
-    Variants.eliminationVariantUnion,
-    Variants.eliminationVariantWrap],
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary, -- byte[]
-    Variants.literalVariantBoolean, -- bool
-    Variants.literalVariantFloat, -- (see float types)
-    Variants.literalVariantInteger, -- (see integer types)
-    Variants.literalVariantString], -- String/string
-  "floatTypes">: Sets.fromList $ list [
-    -- See: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types
-    -- Note: the other C# floating point type, decimal, has no equivalent in Hydra
-    Core.floatTypeFloat32,
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.fromList $ list [
-    Variants.functionVariantElimination,
-    Variants.functionVariantLambda],
-  "integerTypes">: Sets.fromList $ list [
-    -- See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types
-    -- Note: the other two C# integral types, nint and nuint, have no equivalents in Hydra
-    Core.integerTypeInt8, -- sbyte
-    Core.integerTypeInt16, -- short
-    Core.integerTypeInt32, -- int
-    Core.integerTypeInt64, -- long
-    Core.integerTypeUint8, -- byte
-    Core.integerTypeUint16, -- ushort
-    Core.integerTypeUint32, -- uint
-    Core.integerTypeUint64], -- ulong
-  "termVariants">: Sets.fromList $ list [ -- TODO: verify whether all are supported
-    Variants.termVariantApplication,
-
-    Variants.termVariantCases,
-
-    Variants.termVariantLambda,
-
-    Variants.termVariantProject,
-
-    Variants.termVariantUnwrap,
-
-    Variants.termVariantTypeApplication,
-
-    Variants.termVariantTypeLambda,
-    Variants.termVariantLet,
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord,
-    Variants.termVariantSet,
-    Variants.termVariantInject,
-    Variants.termVariantVariable,
-    Variants.termVariantWrap],
-  "typeVariants">: Sets.fromList $ list [ -- TODO: verify whether all are supported
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantApplication,
-    Variants.typeVariantFunction,
-    Variants.typeVariantForall,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion,
-    Variants.typeVariantVariable,
-    Variants.typeVariantWrap],
-  "typePredicate">: constant true] $ -- TODO: verify whether all are supported
-  Coders.language
-    (Coders.languageName_ $ string "hydra.csharp")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-csharpReservedWords :: TTermDefinition (S.Set String)
-csharpReservedWords = define "csharpReservedWords" $
-  doc ("A set of reserved words in C#. Both the \"keywords\" and \"contextual keywords\" are drawn from"
-    <> " section 6.4.4 of the C# documentation:\n"
-    <> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#64-tokens") $ lets [
-  "keywords">: list $ string <$> [
-      "DEFAULT", "FALSE", "NULL", "TRUE",
-      "abstract", "as", "base", "bool", "break", "byte", "case", "catch", "char", "checked", "class", "const",
-      "continue", "decimal", "delegate", "do", "double", "else", "enum", "event", "explicit", "extern", "finally",
-      "fixed", "float", "for", "foreach", "goto", "if", "implicit", "in", "int", "interface", "internal", "is",
-      "lock", "long", "namespace", "new", "object", "operator", "out", "override", "params", "private", "protected",
-      "public", "readonly", "ref", "return", "sbyte", "sealed", "short", "sizeof", "stackalloc", "static", "string",
-      "struct", "switch", "this", "throw", "try", "typeof", "uint", "ulong", "unchecked", "unsafe", "ushort", "using",
-      "virtual", "void", "volatile", "while"],
-  "contextualKeywords">: list $ string <$> [
-      "add", "alias", "ascending", "async", "await", "by", "descending", "dynamic", "equals", "from", "get", "global",
-      "group", "into", "join", "let", "nameof", "on", "orderby", "partial", "remove", "select", "set", "unmanaged",
-      "value", "var", "when", "where", "yield"]] $
-  Sets.fromList $ Lists.concat $ list [
-    var "keywords",
-    var "contextualKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Csharp/Syntax.hs b/src/main/haskell/Hydra/Sources/Csharp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Csharp/Syntax.hs
+++ /dev/null
@@ -1,2405 +0,0 @@
-module Hydra.Sources.Csharp.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.csharp.syntax"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-csharp :: String -> Type
-csharp = typeref ns
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A C# syntax module based on the ANTLR grammar dated 02/07/2024 and available at:\n"
-      ++ "  https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/grammar")}
-  where
-    definitions = lexicalElements ++ syntacticElements ++ unsafeElements
-
-    lexicalElements = [
-      identifier,
-      keyword,
-      literal,
-      integerLiteral]
-
-    syntacticElements = [
-      namespaceName,
-      typeName,
-      namespaceOrTypeName,
-      identifierNamespaceOrTypeName,
-      qualifiedNamespaceOrTypeName,
-      type_,
-      referenceType,
-      classType,
-      interfaceType,
-      arrayType,
-      nonArrayType,
-      rankSpecifier,
-      delegateType,
-      valueType,
-      structOrEnumType,
-      structType,
-      simpleType,
-      numericType,
-      integralType,
-      floatingPointType,
-      tupleType,
-      tupleTypeElement,
-      enumType,
-      typeArgumentList,
-      typeParameter,
-      unmanagedType,
-      variableReference,
-      pattern_,
-      declarationPattern,
-      designation,
-      argumentList,
-      argument,
-      argumentValue,
-      primaryExpression,
-      primaryNoArrayCreationExpression,
-      interpolatedStringExpression,
-      interpolatedRegularStringExpression,
-      regularInterpolation,
-      interpolatedVerbatimStringExpression,
-      verbatimInterpolation,
-      simpleName,
-      tupleExpression,
-      tupleElement,
-      deconstructionTuple,
-      deconstructionElement,
-      memberAccess,
-      memberAccessHead,
-      predefinedType,
-      nullConditionalMemberAccess,
-      dependentAccess,
-      dependentAccessForMember,
-      nullConditionalProjectionInitializer,
-      invocationExpression,
-      nullConditionalInvocationExpression,
-      nullConditionalInvocationExpressionHead,
-      elementAccess,
-      nullConditionalElementAccess,
-      baseAccess,
-      baseAccessWithIdentifier,
-      objectCreationExpression,
-      objectOrCollectionInitializer,
-      memberInitializer,
-      initializerTarget,
-      initializerValue,
-      elementInitializer,
-      expressionList,
-      arrayCreationExpression,
-      nonArrayTypeArrayCreationExpression,
-      arrayTypeArrayCreationExpression,
-      rankSpecifierArrayCreationExpression,
-      delegateCreationExpression,
-      memberDeclaratorList,
-      memberDeclarator,
-      assignmentMemberDeclarator,
-      typeofExpression,
-      unboundTypeName,
-      unboundTypeNamePart,
-      defaultValueExpression,
-      stackallocExpression,
-      namedEntity,
-      namedEntityPart,
-      namedEntityTarget,
-      unaryExpression,
-      castExpression,
-      multiplicativeExpression,
-      binaryMultiplicativeExpression,
-      multiplicativeOperator,
-      additiveExpression,
-      binaryAdditiveExpression,
-      additiveOperator,
-      shiftExpression,
-      binaryShiftExpression,
-      shiftOperator,
-      relationalExpression,
-      binaryRelationalExpression,
-      relationalOperator,
-      isTypeExpression,
-      isPatternExpression,
-      asTypeExpression,
-      equalityExpression,
-      binaryEqualityExpression,
-      equalityOperator,
-      andExpression,
-      binaryAndExpression,
-      exclusiveOrExpression,
-      binaryExclusiveOrExpression,
-      inclusiveOrExpression,
-      binaryInclusiveOrExpression,
-      conditionalAndExpression,
-      binaryConditionalAndExpression,
-      conditionalOrExpression,
-      binaryConditionalOrExpression,
-      nullCoalescingExpression,
-      binaryNullCoalescingExpression,
-      declarationExpression,
-      localVariableType,
-      conditionalExpression,
-      simpleConditionalExpression,
-      refConditionalExpression,
-      lambdaExpression,
-      anonymousMethodExpression,
-      anonymousFunctionSignature,
-      explicitAnonymousFunctionParameter,
-      anonymousFunctionParameterModifier,
-      anonymousFunctionBody,
-      queryExpression,
-      fromClause,
-      queryBody,
-      queryBodyClause,
-      letClause,
-      joinClause,
-      ordering,
-      orderingDirection,
-      selectOrGroupClause,
-      groupClause,
-      queryContinuation,
-      assignment,
-      assignmentOperator,
-      expression,
-      nonAssignmentExpression,
-      constantExpression,
-      booleanExpression,
-      statement,
-      embeddedStatement,
-      block,
-      labeledStatement,
-      declarationStatement,
-      localVariableDeclaration,
-      implicitlyTypedLocalVariableDeclaration,
-      refVarImplicitlyTypedLocalVariableDeclaration,
-      implicitlyTypedLocalVariableDeclarator,
-      explicitlyTypedLocalVariableDeclaration,
-      explicitlyTypedLocalVariableDeclarator,
-      localVariableInitializer,
-      refLocalVariableDeclaration,
-      refLocalVariableDeclarator,
-      localConstantDeclaration,
-      constantDeclarator,
-      localFunctionDeclaration,
-      standardLocalFunctionDeclaration,
-      refLocalFunctionDeclaration,
-      localFunctionHeader,
-      localFunctionModifier,
-      refLocalFunctionModifier,
-      localFunctionBody,
-      refLocalFunctionBody,
-      statementExpression,
-      selectionStatement,
-      ifStatement,
-      switchStatement,
-      switchSection,
-      switchLabel,
-      switchBranch,
-      iterationStatement,
-      whileStatement,
-      doStatement,
-      forStatement,
-      forInitializer,
-      statementExpressionList,
-      foreachStatement,
-      jumpStatement,
-      gotoStatement,
-      returnStatement,
-      tryStatement,
-      catchClauses,
-      specificCatchClause,
-      exceptionSpecifier,
-      lockStatement,
-      usingStatement,
-      resourceAcquisition,
-      yieldStatement,
-      compilationUnit,
-      namespaceDeclaration,
-      qualifiedIdentifier,
-      namespaceBody,
-      externAliasDirective,
-      usingDirective,
-      usingAliasDirective,
-      namespaceMemberDeclaration,
-      typeDeclaration,
-      qualifiedAliasMember,
-      classDeclaration,
-      classModifier,
-      typeParameterList,
-      typeParameterPart,
-      classBase,
-      typeParameterConstraintsClause,
-      typeParameterConstraints,
-      primaryConstraint,
-      secondaryConstraints,
-      secondaryConstraint,
-      classBody,
-      classMemberDeclaration,
-      constantDeclaration,
-      constantModifier,
-      fieldDeclaration,
-      fieldModifier,
-      variableDeclarators,
-      variableDeclarator,
-      methodDeclaration,
-      standardMethodDeclaration,
-      refReturnMethodDeclaration,
-      methodModifiers,
-      refKind,
-      methodHeader,
-      methodModifier,
-      refMethodModifier,
-      returnType,
-      memberName,
-      methodBody,
-      refMethodBody,
-      formalParameterList,
-      fixedParameter,
-      parameterModifier,
-      parameterModeModifier,
-      parameterArray,
-      propertyDeclaration,
-      standardPropertyDeclaration,
-      refReturnPropertyDeclaration,
-      propertyModifier,
-      propertyBody,
-      blockPropertyBody,
-      refPropertyBody,
-      accessorDeclarations,
-      accessorDeclaration,
-      accessorModifier,
-      accessorBody,
-      refGetAccessorDeclaration,
-      refAccessorBody,
-      eventDeclaration,
-      standardEventDeclaration,
-      accessorsEventDeclaration,
-      eventModifier,
-      eventAccessorDeclarations,
-      addRemoveAccessorDeclaration,
-      indexerDeclaration,
-      standardIndexerDeclaration,
-      refIndexerDeclaration,
-      indexerModifier,
-      indexerDeclarator,
-      indexerBody,
-      refIndexerBody,
-      operatorDeclaration,
-      operatorModifier,
-      operatorDeclarator,
-      unaryOperatorDeclarator,
-      overloadableUnaryOperator,
-      binaryOperatorDeclarator,
-      overloadableBinaryOperator,
-      conversionOperatorDeclarator,
-      conversionKind,
-      operatorBody,
-      constructorDeclaration,
-      constructorModifier,
-      constructorDeclarator,
-      constructorInitializer,
-      constructorBody,
-      staticConstructorDeclaration,
-      staticConstructorModifiers,
-      staticConstructorBody,
-      finalizerDeclaration,
-      finalizerBody,
-      structDeclaration,
-      structModifier,
-      structMemberDeclaration,
-      arrayInitializer,
-      variableInitializer,
-      interfaceDeclaration,
-      interfaceModifier,
-      variantTypeParameters,
-      variantTypeParameter,
-      varianceAnnotation,
-      interfaceMemberDeclaration,
-      interfaceMethodDeclaration,
-      interfaceMethodHeader,
-      interfacePropertyDeclaration,
-      interfaceAccessors,
-      interfaceEventDeclaration,
-      interfaceIndexerDeclaration,
-      enumDeclaration,
-      enumBase,
-      enumBody,
-      enumModifier,
-      enumMemberDeclaration,
-      delegateDeclaration,
-      delegateHeader,
-      delegateModifier,
-      globalAttributeSection,
-      attributes,
-      attributeSection,
-      attributeTarget,
-      attributeList,
-      attribute,
-      attributeName,
-      attributeArguments,
-      positionalArgumentList,
-      positionalArgument,
-      namedArgumentList,
-      namedArgument,
-      attributeArgumentExpression]
-
-    unsafeElements = [
-      pointerType,
-      pointerMemberAccess,
-      pointerElementAccess,
-      fixedStatement,
-      fixedPointerDeclarator,
-      fixedSizeBufferDeclaration,
-      fixedSizeBufferModifier,
-      fixedSizeBufferDeclarator]
-
-
--- Lexical Elements
-
-identifier :: Binding
-identifier = def "Identifier" $ T.wrap T.string
-
-keyword :: Binding
-keyword = def "Keyword" $ T.wrap T.string
-
-literal :: Binding
-literal = def "Literal" $ T.union [
-  "boolean">: T.boolean,
-  "integer">: csharp "IntegerLiteral",
-  "real">: T.bigfloat,
-  "character">: T.string,
-  "string">: T.string,
-  "null">: T.unit]
-
-integerLiteral :: Binding
-integerLiteral = def "IntegerLiteral" $ T.union [
-  "decimal">: T.string,
-  "hexadecimal">: T.string,
-  "binary">: T.bigint]
-
-
--- Syntactic Elements
-
-namespaceName :: Binding
-namespaceName = def "NamespaceName" $ T.wrap $
-  csharp "NamespaceOrTypeName"
-
-typeName :: Binding
-typeName = def "TypeName" $ T.wrap $
-  csharp "NamespaceOrTypeName"
-
-namespaceOrTypeName :: Binding
-namespaceOrTypeName = def "NamespaceOrTypeName" $ T.union [
-  "identifier">: csharp "IdentifierNamespaceOrTypeName",
-  "qualified">: csharp "QualifiedNamespaceOrTypeName",
-  "alias">: csharp "QualifiedAliasMember"]
-
-identifierNamespaceOrTypeName :: Binding
-identifierNamespaceOrTypeName = def "IdentifierNamespaceOrTypeName" $ T.record [
-  "identifier">: csharp "Identifier",
-  "arguments">: T.maybe $ csharp "TypeArgumentList"]
-
-qualifiedNamespaceOrTypeName :: Binding
-qualifiedNamespaceOrTypeName = def "QualifiedNamespaceOrTypeName" $ T.record [
-  "namespaceOrType">: csharp "NamespaceOrTypeName",
-  "identifier">: csharp "Identifier",
-  "arguments">: T.maybe $ csharp "TypeArgumentList"]
-
-type_ :: Binding
-type_ = def "Type" $ T.union [
-  "reference">: csharp "ReferenceType",
-  "value">: csharp "ValueType",
-  "param">: csharp "TypeParameter",
-  "pointer">: csharp "PointerType"]
-
-referenceType :: Binding
-referenceType = def "ReferenceType" $ T.union [
-  "class">: csharp "ClassType",
-  "interface">: csharp "InterfaceType",
-  "array">: csharp "ArrayType",
-  "delegate">: csharp "DelegateType",
-  "dynamic">: T.unit]
-
-classType :: Binding
-classType = def "ClassType" $ T.union [
-  "typeName">: csharp "TypeName",
-  "object">: T.unit,
-  "string">: T.unit]
-
-interfaceType :: Binding
-interfaceType = def "InterfaceType" $ T.wrap $
-  csharp "TypeName"
-
-arrayType :: Binding
-arrayType = def "ArrayType" $ T.record [
-  "type">: csharp "NonArrayType",
-  "rank">: T.list $ csharp "RankSpecifier"]
-
-nonArrayType :: Binding
-nonArrayType = def "NonArrayType" $ T.union [
-  "value">: csharp "ValueType",
-  "class">: csharp "ClassType",
-  "interface">: csharp "InterfaceType",
-  "delegate">: csharp "DelegateType",
-  "dynamic">: T.unit,
-  "parameter">: csharp "TypeParameter",
-  "pointer">: csharp "PointerType"]
-
-rankSpecifier :: Binding
-rankSpecifier = def "RankSpecifier" $ T.wrap T.int32
-
-delegateType :: Binding
-delegateType = def "DelegateType" $ T.wrap $
-  csharp "TypeName"
-
-valueType :: Binding
-valueType = def "ValueType" $ T.union [
-  "nonNullable">: csharp "StructOrEnumType",
-  "nullable">: csharp "StructOrEnumType"]
-
-structOrEnumType :: Binding
-structOrEnumType = def "StructOrEnumType" $ T.union [
-  "struct">: csharp "StructType",
-  "enum">: csharp "EnumType"]
-
-structType :: Binding
-structType = def "StructType" $ T.union [
-  "typeName">: csharp "TypeName",
-  "simple">: csharp "SimpleType",
-  "tuple">: csharp "TupleType"]
-
-simpleType :: Binding
-simpleType = def "SimpleType" $ T.union [
-  "numeric">: csharp "NumericType",
-  "bool">: T.unit]
-
-numericType :: Binding
-numericType = def "NumericType" $ T.union [
-  "integral">: csharp "IntegralType",
-  "floatingPoint">: csharp "FloatingPointType",
-  "decimal">: T.unit]
-
-integralType :: Binding
-integralType = def "IntegralType" $ T.union [
-  "sbyte">: T.unit,
-  "byte">: T.unit,
-  "short">: T.unit,
-  "ushort">: T.unit,
-  "int">: T.unit,
-  "uint">: T.unit,
-  "long">: T.unit,
-  "ulong">: T.unit,
-  "char">: T.unit]
-
-floatingPointType :: Binding
-floatingPointType = def "FloatingPointType" $ T.union [
-  "float">: T.unit,
-  "double">: T.unit]
-
-tupleType :: Binding
-tupleType = def "TupleType" $ T.wrap $
-  nonemptyList $ csharp "TupleTypeElement"
-
-tupleTypeElement :: Binding
-tupleTypeElement = def "TupleTypeElement" $ T.record [
-  "type">: csharp "Type",
-  "identifier">: T.maybe $ csharp "Identifier"]
-
-enumType :: Binding
-enumType = def "EnumType" $ T.wrap $
-  csharp "TypeName"
-
-typeArgumentList :: Binding
-typeArgumentList = def "TypeArgumentList" $ T.wrap $ T.list $ csharp "Type"
-
-typeParameter :: Binding
-typeParameter = def "TypeParameter" $ T.wrap $
-  csharp "Identifier"
-
-unmanagedType :: Binding
-unmanagedType = def "UnmanagedType" $ T.union [
-  "value">: csharp "ValueType",
-  "pointer">: csharp "PointerType"]
-
-variableReference :: Binding
-variableReference = def "VariableReference" $ T.wrap $
-  csharp "Expression"
-
-pattern_ :: Binding
-pattern_ = def "Pattern" $ T.union [
-  "declaration">: csharp "DeclarationPattern",
-  "constant">: csharp "Expression",
-  "var">: csharp "Designation"]
-
-declarationPattern :: Binding
-declarationPattern = def "DeclarationPattern" $ T.record [
-  "type">: csharp "Type",
-  "designation">: csharp "Designation"]
-
-designation :: Binding
-designation = def "Designation" $ T.wrap $
-  csharp "Identifier"
-
-argumentList :: Binding
-argumentList = def "ArgumentList" $ T.wrap $ nonemptyList $ csharp "Argument"
-
-argument :: Binding
-argument = def "Argument" $ T.record [
-  "name">: T.maybe $ csharp "Identifier",
-  "value">: csharp "ArgumentValue"]
-
-argumentValue :: Binding
-argumentValue = def "ArgumentValue" $ T.union [
-  "expression">: csharp "Expression",
-  "in">: csharp "VariableReference",
-  "ref">: csharp "VariableReference",
-  "out">: csharp "VariableReference"]
-
-primaryExpression :: Binding
-primaryExpression = def "PrimaryExpression" $ T.union [
-  "noArray">: csharp "PrimaryNoArrayCreationExpression",
-  "array">: csharp "ArrayCreationExpression"]
-
-primaryNoArrayCreationExpression :: Binding
-primaryNoArrayCreationExpression = def "PrimaryNoArrayCreationExpression" $ T.union [
-  "literal">: csharp "Literal",
-  "interpolatedString">: csharp "InterpolatedStringExpression",
-  "simpleName">: csharp "SimpleName",
-  "parenthesized">: csharp "Expression",
-  "tuple">: csharp "TupleExpression",
-  "memberAccess">: csharp "MemberAccess",
-  "nullConditionalMemberAccess">: csharp "NullConditionalMemberAccess",
-  "invocation">: csharp "InvocationExpression",
-  "elementAccess">: csharp "ElementAccess",
-  "nullConditionalElementAccess">: csharp "NullConditionalElementAccess",
-  "thisAccess">: T.unit,
-  "baseAccess">: csharp "BaseAccess",
-  "postIncrement">: csharp "PrimaryExpression",
-  "postDecrement">: csharp "PrimaryExpression",
-  "objectCreation">: csharp "ObjectCreationExpression",
-  "delegateCreation">: csharp "DelegateCreationExpression",
-  "anonymousObjectCreation">: T.maybe $ csharp "MemberDeclaratorList",
-  "typeof">: csharp "TypeofExpression",
-  "sizeof">: csharp "UnmanagedType",
-  "checked">: csharp "Expression",
-  "unchecked">: csharp "Expression",
-  "defaultValue">: csharp "DefaultValueExpression",
-  "nameof">: csharp "NamedEntity",
-  "anonymousMethod">: csharp "AnonymousMethodExpression",
-  "pointerMemberAccess">: csharp "PointerMemberAccess",
-  "pointerElementAccess">: csharp "PointerElementAccess",
-  "stackalloc">: csharp "StackallocExpression"]
-
-interpolatedStringExpression :: Binding
-interpolatedStringExpression = def "InterpolatedStringExpression" $ T.union [
-  "regular">: csharp "InterpolatedRegularStringExpression",
-  "verbatim">: csharp "InterpolatedVerbatimStringExpression"]
-
-interpolatedRegularStringExpression :: Binding
-interpolatedRegularStringExpression = def "InterpolatedRegularStringExpression" $ T.wrap T.string
-
-regularInterpolation :: Binding
-regularInterpolation = def "RegularInterpolation" $ T.record [
-  "expression">: csharp "Expression",
-  "width">: T.maybe $ csharp "Expression",
-  "format">: T.maybe T.string]
-
-interpolatedVerbatimStringExpression :: Binding
-interpolatedVerbatimStringExpression = def "InterpolatedVerbatimStringExpression" $ T.wrap T.string
-
-verbatimInterpolation :: Binding
-verbatimInterpolation = def "VerbatimInterpolation" $ T.record [
-  "expression">: csharp "Expression",
-  "width">: T.maybe $ csharp "ConstantExpression",
-  "format">: T.maybe T.string]
-
-simpleName :: Binding
-simpleName = def "SimpleName" $ T.record [
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-tupleExpression :: Binding
-tupleExpression = def "TupleExpression" $ T.union [
-  "elements">: nonemptyList $ csharp "TupleElement",
-  "deconstruction">: csharp "DeconstructionTuple"]
-
-tupleElement :: Binding
-tupleElement = def "TupleElement" $ T.record [
-  "name">: T.maybe $ csharp "Identifier",
-  "expression">: csharp "Expression"]
-
-deconstructionTuple :: Binding
-deconstructionTuple = def "DeconstructionTuple" $ T.wrap $
-  nonemptyList $ csharp "DeconstructionElement"
-
-deconstructionElement :: Binding
-deconstructionElement = def "DeconstructionElement" $ T.union [
-  "tuple">: csharp "DeconstructionTuple",
-  "identifier">: csharp "Identifier"]
-
-memberAccess :: Binding
-memberAccess = def "MemberAccess" $ T.record [
-  "head">: csharp "MemberAccessHead",
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-memberAccessHead :: Binding
-memberAccessHead = def "MemberAccessHead" $ T.union [
-  "primary">: csharp "PrimaryExpression",
-  "predefined">: csharp "PredefinedType",
-  "qualifiedAlias">: csharp "QualifiedAliasMember"]
-
-predefinedType :: Binding
-predefinedType = def "PredefinedType" $ T.enum [
-  "bool", "byte", "char", "decimal", "double", "float", "int", "long", "object", "sbyte", "short", "string",
-  "uint", "ulong", "ushort"]
-
-nullConditionalMemberAccess :: Binding
-nullConditionalMemberAccess = def "NullConditionalMemberAccess" $ T.record [
-  "expression">: csharp "PrimaryExpression",
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList",
-  "dependentAccess">: T.list $ csharp "DependentAccess"]
-
-dependentAccess :: Binding
-dependentAccess = def "DependentAccess" $ T.union [
-  "memberAccess">: csharp "DependentAccessForMember",
-  "elementAccess">: csharp "ArgumentList",
-  "invocation">: T.maybe $ csharp "ArgumentList"]
-
-dependentAccessForMember :: Binding
-dependentAccessForMember = def "DependentAccessForMember" $ T.record [
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-nullConditionalProjectionInitializer :: Binding
-nullConditionalProjectionInitializer = def "NullConditionalProjectionInitializer" $ T.record [
-  "expression">: csharp "PrimaryExpression",
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-invocationExpression :: Binding
-invocationExpression = def "InvocationExpression" $ T.record [
-  "expression">: csharp "PrimaryExpression",
-  "arguments">: T.maybe $ csharp "ArgumentList"]
-
-nullConditionalInvocationExpression :: Binding
-nullConditionalInvocationExpression = def "NullConditionalInvocationExpression" $ T.record [
-  "head">: csharp "NullConditionalInvocationExpressionHead",
-  "arguments">: T.maybe $ csharp "ArgumentList"]
-
-nullConditionalInvocationExpressionHead :: Binding
-nullConditionalInvocationExpressionHead = def "NullConditionalInvocationExpressionHead" $ T.union [
-  "member">: csharp "NullConditionalMemberAccess",
-  "element">: csharp "NullConditionalElementAccess"]
-
-elementAccess :: Binding
-elementAccess = def "ElementAccess" $ T.record [
-  "expression">: csharp "PrimaryNoArrayCreationExpression",
-  "arguments">: csharp "ArgumentList"]
-
-nullConditionalElementAccess :: Binding
-nullConditionalElementAccess = def "NullConditionalElementAccess" $ T.record [
-  "expression">: csharp "PrimaryNoArrayCreationExpression",
-  "arguments">: csharp "ArgumentList",
-  "dependentAccess">: T.list $ csharp "DependentAccess"]
-
-baseAccess :: Binding
-baseAccess = def "BaseAccess" $ T.union [
-  "identifier">: csharp "BaseAccessWithIdentifier",
-  "arguments">: csharp "ArgumentList"]
-
-baseAccessWithIdentifier :: Binding
-baseAccessWithIdentifier = def "BaseAccessWithIdentifier" $ T.record [
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-objectCreationExpression :: Binding
-objectCreationExpression = def "ObjectCreationExpression" $ T.record [
-  "type">: csharp "Type",
-  "arguments">: T.maybe $ csharp "ArgumentList",
-  "initializer">: T.maybe $ csharp "ObjectOrCollectionInitializer"]
-
-objectOrCollectionInitializer :: Binding
-objectOrCollectionInitializer = def "ObjectOrCollectionInitializer" $ T.union [
-  "object">: T.list $ csharp "MemberInitializer",
-  "collection">: T.list $ csharp "ElementInitializer"]
-
-memberInitializer :: Binding
-memberInitializer = def "MemberInitializer" $ T.record [
-  "target">: csharp "InitializerTarget",
-  "value">: csharp "InitializerValue"]
-
-initializerTarget :: Binding
-initializerTarget = def "InitializerTarget" $ T.union [
-  "identifier">: csharp "Identifier",
-  "arguments">: csharp "ArgumentList"]
-
-initializerValue :: Binding
-initializerValue = def "InitializerValue" $ T.union [
-  "expression">: csharp "Expression",
-  "objectOrCollection">: csharp "ObjectOrCollectionInitializer"]
-
-elementInitializer :: Binding
-elementInitializer = def "ElementInitializer" $ T.union [
-  "single">: csharp "NonAssignmentExpression",
-  "list">: csharp "ExpressionList"]
-
-expressionList :: Binding
-expressionList = def "ExpressionList" $ T.wrap $ nonemptyList $ csharp "Expression"
-
-arrayCreationExpression :: Binding
-arrayCreationExpression = def "ArrayCreationExpression" $ T.union [
-  "nonArrayType">: csharp "NonArrayTypeArrayCreationExpression",
-  "arrayType">: csharp "ArrayTypeArrayCreationExpression",
-  "rankSpecifier">: csharp "RankSpecifierArrayCreationExpression"]
-
-nonArrayTypeArrayCreationExpression :: Binding
-nonArrayTypeArrayCreationExpression = def "NonArrayTypeArrayCreationExpression" $ T.record [
-  "type">: csharp "NonArrayType",
-  "expressions">: csharp "ExpressionList",
-  "rankSpecifiers">: T.list $ csharp "RankSpecifier",
-  "initializer">: T.maybe $ csharp "ArrayInitializer"]
-
-arrayTypeArrayCreationExpression :: Binding
-arrayTypeArrayCreationExpression = def "ArrayTypeArrayCreationExpression" $ T.record [
-  "type">: csharp "ArrayType",
-  "initializer">: csharp "ArrayInitializer"]
-
-rankSpecifierArrayCreationExpression :: Binding
-rankSpecifierArrayCreationExpression = def "RankSpecifierArrayCreationExpression" $ T.record [
-  "rankSpecifier">: csharp "RankSpecifier",
-  "initializer">: csharp "ArrayInitializer"]
-
-delegateCreationExpression :: Binding
-delegateCreationExpression = def "DelegateCreationExpression" $ T.record [
-  "type">: csharp "DelegateType",
-  "expression">: csharp "Expression"]
-
-memberDeclaratorList :: Binding
-memberDeclaratorList = def "MemberDeclaratorList" $ T.wrap $ nonemptyList $ csharp "MemberDeclarator"
-
-memberDeclarator :: Binding
-memberDeclarator = def "MemberDeclarator" $ T.union [
-  "name">: csharp "SimpleName",
-  "memberAccess">: csharp "MemberAccess",
-  "nullConditionalProjectionInitializer">: csharp "NullConditionalProjectionInitializer",
-  "baseAccess">: csharp "BaseAccess",
-  "assignment">: csharp "AssignmentMemberDeclarator"]
-
-assignmentMemberDeclarator :: Binding
-assignmentMemberDeclarator = def "AssignmentMemberDeclarator" $ T.record [
-  "identifier">: csharp "Identifier",
-  "expression">: csharp "Expression"]
-
-typeofExpression :: Binding
-typeofExpression = def "TypeofExpression" $ T.union [
-  "type">: csharp "Type",
-  "unboundTypeName">: csharp "UnboundTypeName",
-  "void">: T.unit]
-
-unboundTypeName :: Binding
-unboundTypeName = def "UnboundTypeName" $ T.wrap $
-  nonemptyList $ csharp "UnboundTypeNamePart"
-
-unboundTypeNamePart :: Binding
-unboundTypeNamePart = def "UnboundTypeNamePart" $ T.record [
-  "identifier">: csharp "Identifier",
-  "aliased">: T.boolean,
-  "dimension">: T.maybe T.int32]
-
-defaultValueExpression :: Binding
-defaultValueExpression = def "DefaultValueExpression" $ T.union [
-  "explicitlyTyped">: csharp "Type",
-  "defaultLiteral">: T.unit]
-
-stackallocExpression :: Binding
-stackallocExpression = def "StackallocExpression" $ T.record [
-  "type">: T.maybe $ csharp "UnmanagedType",
-  "expression">: T.maybe $ csharp "ConstantExpression",
-  "initializer">: T.list $ csharp "Expression"]
-
-namedEntity :: Binding
-namedEntity = def "NamedEntity" $ T.record [
-  "target">: csharp "NamedEntityTarget",
-  "parts">: T.list $ csharp "NamedEntityPart"]
-
-namedEntityPart :: Binding
-namedEntityPart = def "NamedEntityPart" $ T.record [
-  "identifier">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-namedEntityTarget :: Binding
-namedEntityTarget = def "NamedEntityTarget" $ T.union [
-  "name">: csharp "SimpleName",
-  "this">: T.unit,
-  "base">: T.unit,
-  "predefinedType">: csharp "PredefinedType",
-  "qualifiedAliasMember">: csharp "QualifiedAliasMember"]
-
-unaryExpression :: Binding
-unaryExpression = def "UnaryExpression" $ T.union [
-  "primary">: csharp "PrimaryExpression",
-  "plus">: csharp "UnaryExpression",
-  "minus">: csharp "UnaryExpression",
-  "not">: csharp "UnaryExpression",
-  "bitwiseComplement">: csharp "UnaryExpression",
-  "preIncrement">: csharp "UnaryExpression",
-  "preDecrement">: csharp "UnaryExpression",
-  "cast">: csharp "CastExpression",
-  "await">: csharp "UnaryExpression",
-  "pointerIndirection">: csharp "UnaryExpression",
-  "addressOf">: csharp "UnaryExpression"]
-
-castExpression :: Binding
-castExpression = def "CastExpression" $ T.record [
-  "type">: csharp "Type",
-  "expression">: csharp "UnaryExpression"]
-
-multiplicativeExpression :: Binding
-multiplicativeExpression = def "MultiplicativeExpression" $ T.union [
-  "simple">: csharp "UnaryExpression",
-  "binary">: csharp "BinaryMultiplicativeExpression"]
-
-binaryMultiplicativeExpression :: Binding
-binaryMultiplicativeExpression = def "BinaryMultiplicativeExpression" $ T.record [
-  "left">: csharp "MultiplicativeExpression",
-  "operator">: csharp "MultiplicativeOperator",
-  "right">: csharp "UnaryExpression"]
-
-multiplicativeOperator :: Binding
-multiplicativeOperator = def "MultiplicativeOperator" $ T.enum [
-  "times",
-  "divide",
-  "modulo"]
-
-additiveExpression :: Binding
-additiveExpression = def "AdditiveExpression" $ T.union [
-  "simple">: csharp "MultiplicativeExpression",
-  "binary">: csharp "BinaryAdditiveExpression"]
-
-binaryAdditiveExpression :: Binding
-binaryAdditiveExpression = def "BinaryAdditiveExpression" $ T.record [
-  "left">: csharp "AdditiveExpression",
-  "operator">: csharp "AdditiveOperator",
-  "right">: csharp "MultiplicativeExpression"]
-
-additiveOperator :: Binding
-additiveOperator = def "AdditiveOperator" $ T.enum [
-  "plus",
-  "minus"]
-
-shiftExpression :: Binding
-shiftExpression = def "ShiftExpression" $ T.union [
-  "simple">: csharp "AdditiveExpression",
-  "binary">: csharp "BinaryShiftExpression"]
-
-binaryShiftExpression :: Binding
-binaryShiftExpression = def "BinaryShiftExpression" $ T.record [
-  "left">: csharp "ShiftExpression",
-  "operator">: csharp "ShiftOperator",
-  "right">: csharp "AdditiveExpression"]
-
-shiftOperator :: Binding
-shiftOperator = def "ShiftOperator" $ T.enum [
-  "left",
-  "right"]
-
-relationalExpression :: Binding
-relationalExpression = def "RelationalExpression" $ T.union [
-  "simple">: csharp "ShiftExpression",
-  "binary">: csharp "BinaryRelationalExpression",
-  "isType">: csharp "IsTypeExpression",
-  "isPattern">: csharp "IsPatternExpression",
-  "asType">: csharp "AsTypeExpression"]
-
-binaryRelationalExpression :: Binding
-binaryRelationalExpression = def "BinaryRelationalExpression" $ T.record [
-  "left">: csharp "RelationalExpression",
-  "operator">: csharp "RelationalOperator",
-  "right">: csharp "ShiftExpression"]
-
-relationalOperator :: Binding
-relationalOperator = def "RelationalOperator" $ T.enum [
-  "lessThan", "greaterThan", "lessThanOrEqual", "greaterThanOrEqual"]
-
-isTypeExpression :: Binding
-isTypeExpression = def "IsTypeExpression" $ T.record [
-  "expression">: csharp "RelationalExpression",
-  "type">: csharp "Type"]
-
-isPatternExpression :: Binding
-isPatternExpression = def "IsPatternExpression" $ T.record [
-  "expression">: csharp "RelationalExpression",
-  "pattern">: csharp "Pattern"]
-
-asTypeExpression :: Binding
-asTypeExpression = def "AsTypeExpression" $ T.record [
-  "expression">: csharp "RelationalExpression",
-  "type">: csharp "Type"]
-
-equalityExpression :: Binding
-equalityExpression = def "EqualityExpression" $ T.union [
-  "simple">: csharp "RelationalExpression",
-  "binary">: csharp "BinaryEqualityExpression"]
-
-binaryEqualityExpression :: Binding
-binaryEqualityExpression = def "BinaryEqualityExpression" $ T.record [
-  "left">: csharp "EqualityExpression",
-  "operator">: csharp "EqualityOperator",
-  "right">: csharp "RelationalExpression"]
-
-equalityOperator :: Binding
-equalityOperator = def "EqualityOperator" $ T.enum [
-  "equal",
-  "notEqual"]
-
-andExpression :: Binding
-andExpression = def "AndExpression" $ T.union [
-  "simple">: csharp "EqualityExpression",
-  "binary">: csharp "BinaryAndExpression"]
-
-binaryAndExpression :: Binding
-binaryAndExpression = def "BinaryAndExpression" $ T.record [
-  "left">: csharp "AndExpression",
-  "right">: csharp "EqualityExpression"]
-
-exclusiveOrExpression :: Binding
-exclusiveOrExpression = def "ExclusiveOrExpression" $ T.union [
-  "simple">: csharp "AndExpression",
-  "binary">: csharp "BinaryExclusiveOrExpression"]
-
-binaryExclusiveOrExpression :: Binding
-binaryExclusiveOrExpression = def "BinaryExclusiveOrExpression" $ T.record [
-  "left">: csharp "ExclusiveOrExpression",
-  "right">: csharp "AndExpression"]
-
-inclusiveOrExpression :: Binding
-inclusiveOrExpression = def "InclusiveOrExpression" $ T.union [
-  "simple">: csharp "ExclusiveOrExpression",
-  "binary">: csharp "BinaryInclusiveOrExpression"]
-
-binaryInclusiveOrExpression :: Binding
-binaryInclusiveOrExpression = def "BinaryInclusiveOrExpression" $ T.record [
-  "left">: csharp "InclusiveOrExpression",
-  "right">: csharp "ExclusiveOrExpression"]
-
-conditionalAndExpression :: Binding
-conditionalAndExpression = def "ConditionalAndExpression" $ T.union [
-  "simple">: csharp "InclusiveOrExpression",
-  "binary">: csharp "BinaryConditionalAndExpression"]
-
-binaryConditionalAndExpression :: Binding
-binaryConditionalAndExpression = def "BinaryConditionalAndExpression" $ T.record [
-  "left">: csharp "ConditionalAndExpression",
-  "right">: csharp "InclusiveOrExpression"]
-
-conditionalOrExpression :: Binding
-conditionalOrExpression = def "ConditionalOrExpression" $ T.union [
-  "simple">: csharp "ConditionalAndExpression",
-  "binary">: csharp "BinaryConditionalOrExpression"]
-
-binaryConditionalOrExpression :: Binding
-binaryConditionalOrExpression = def "BinaryConditionalOrExpression" $ T.record [
-  "left">: csharp "ConditionalOrExpression",
-  "right">: csharp "ConditionalAndExpression"]
-
-nullCoalescingExpression :: Binding
-nullCoalescingExpression = def "NullCoalescingExpression" $ T.union [
-  "simple">: csharp "ConditionalOrExpression",
-  "binary">: csharp "BinaryNullCoalescingExpression",
-  "throw">: csharp "NullCoalescingExpression"]
-
-binaryNullCoalescingExpression :: Binding
-binaryNullCoalescingExpression = def "BinaryNullCoalescingExpression" $ T.record [
-  "left">: csharp "ConditionalOrExpression",
-  "right">: csharp "NullCoalescingExpression"]
-
-declarationExpression :: Binding
-declarationExpression = def "DeclarationExpression" $ T.record [
-  "type">: csharp "LocalVariableType",
-  "identifier">: csharp "Identifier"]
-
-localVariableType :: Binding
-localVariableType = def "LocalVariableType" $ T.union [
-  "type">: csharp "Type",
-  "var">: T.unit]
-
-conditionalExpression :: Binding
-conditionalExpression = def "ConditionalExpression" $ T.union [
-  "simple">: csharp "NullCoalescingExpression",
-  "simpleConditional">: csharp "SimpleConditionalExpression",
-  "refConditional">: csharp "RefConditionalExpression"]
-
-simpleConditionalExpression :: Binding
-simpleConditionalExpression = def "SimpleConditionalExpression" $ T.record [
-  "condition">: csharp "NullCoalescingExpression",
-  "true">: csharp "Expression",
-  "false">: csharp "Expression"]
-
-refConditionalExpression :: Binding
-refConditionalExpression = def "RefConditionalExpression" $ T.record [
-  "condition">: csharp "NullCoalescingExpression",
-  "true">: csharp "VariableReference",
-  "false">: csharp "VariableReference"]
-
-lambdaExpression :: Binding
-lambdaExpression = def "LambdaExpression" $ T.record [
-  "async">: T.boolean,
-  "signature">: csharp "AnonymousFunctionSignature",
-  "body">: csharp "AnonymousFunctionBody"]
-
-anonymousMethodExpression :: Binding
-anonymousMethodExpression = def "AnonymousMethodExpression" $ T.record [
-  "async">: T.boolean,
-  "signature">: T.list $ csharp "ExplicitAnonymousFunctionParameter",
-  "body">: csharp "Block"]
-
-anonymousFunctionSignature :: Binding
-anonymousFunctionSignature = def "AnonymousFunctionSignature" $ T.union [
-  "explicit">: T.list $ csharp "ExplicitAnonymousFunctionParameter",
-  "implicit">: T.list $ csharp "Identifier"]
-
-explicitAnonymousFunctionParameter :: Binding
-explicitAnonymousFunctionParameter = def "ExplicitAnonymousFunctionParameter" $ T.record [
-  "modifier">: T.maybe $ csharp "AnonymousFunctionParameterModifier",
-  "type">: csharp "Type",
-  "identifier">: csharp "Identifier"]
-
-anonymousFunctionParameterModifier :: Binding
-anonymousFunctionParameterModifier = def "AnonymousFunctionParameterModifier" $ T.enum [
-  "ref",
-  "out",
-  "in"]
-
-anonymousFunctionBody :: Binding
-anonymousFunctionBody = def "AnonymousFunctionBody" $ T.union [
-  "nullConditionalInvocation">: csharp "NullConditionalInvocationExpression",
-  "expression">: csharp "Expression",
-  "ref">: csharp "VariableReference",
-  "block">: csharp "Block"]
-
-queryExpression :: Binding
-queryExpression = def "QueryExpression" $ T.record [
-  "from">: csharp "FromClause",
-  "body">: csharp "QueryBody"]
-
-fromClause :: Binding
-fromClause = def "FromClause" $ T.record [
-  "type">: T.maybe $ csharp "Type",
-  "identifier">: csharp "Identifier",
-  "in">: csharp "Expression"]
-
-queryBody :: Binding
-queryBody = def "QueryBody" $ T.record [
-  "clauses">: T.list $ csharp "QueryBodyClause",
-  "selectOrGroup">: csharp "SelectOrGroupClause",
-  "continuation">: T.maybe $ csharp "QueryContinuation"]
-
-queryBodyClause :: Binding
-queryBodyClause = def "QueryBodyClause" $ T.union [
-  "from">: csharp "FromClause",
-  "let">: csharp "LetClause",
-  "where">: csharp "BooleanExpression",
-  "join">: csharp "JoinClause",
-  "orderby">: nonemptyList $ csharp "Ordering"]
-
-letClause :: Binding
-letClause = def "LetClause" $ T.record [
-  "left">: csharp "Identifier",
-  "right">: csharp "Expression"]
-
-joinClause :: Binding
-joinClause = def "JoinClause" $ T.record [
-  "type">: T.maybe $ csharp "Type",
-  "identifier">: csharp "Identifier",
-  "in">: csharp "Expression",
-  "on">: csharp "Expression",
-  "equals">: csharp "Expression",
-  "into">: T.maybe $ csharp "Identifier"]
-
-ordering :: Binding
-ordering = def "Ordering" $ T.record [
-  "expression">: csharp "Expression",
-  "direction">: T.maybe $ csharp "OrderingDirection"]
-
-orderingDirection :: Binding
-orderingDirection = def "OrderingDirection" $ T.enum [
-  "ascending",
-  "descending"]
-
-selectOrGroupClause :: Binding
-selectOrGroupClause = def "SelectOrGroupClause" $ T.union [
-  "select">: csharp "Expression",
-  "group">: csharp "GroupClause"]
-
-groupClause :: Binding
-groupClause = def "GroupClause" $ T.record [
-  "grouped">: csharp "Expression",
-  "by">: csharp "Expression"]
-
-queryContinuation :: Binding
-queryContinuation = def "QueryContinuation" $ T.record [
-  "into">: csharp "Identifier",
-  "body">: csharp "QueryBody"]
-
-assignment :: Binding
-assignment = def "Assignment" $ T.record [
-  "left">: csharp "UnaryExpression",
-  "operator">: csharp "AssignmentOperator",
-  "right">: csharp "Expression"]
-
-assignmentOperator :: Binding
-assignmentOperator = def "AssignmentOperator" $ T.union [
-  "simple">: T.boolean,
-  "plusEquals">: T.unit,
-  "minusEquals">: T.unit,
-  "timesEquals">: T.unit,
-  "divideEquals">: T.unit,
-  "modEquals">: T.unit,
-  "andEquals">: T.unit,
-  "orEquals">: T.unit,
-  "xorEquals">: T.unit,
-  "leftShiftEquals">: T.unit,
-  "rightShiftEquals">: T.unit]
-
-expression :: Binding
-expression = def "Expression" $ T.union [
-  "nonAssignment">: csharp "NonAssignmentExpression",
-  "assignment">: csharp "Assignment"]
-
-nonAssignmentExpression :: Binding
-nonAssignmentExpression = def "NonAssignmentExpression" $ T.union [
-  "declaration">: csharp "DeclarationExpression",
-  "conditional">: csharp "ConditionalExpression",
-  "lambda">: csharp "LambdaExpression",
-  "query">: csharp "QueryExpression"]
-
-constantExpression :: Binding
-constantExpression = def "ConstantExpression" $ T.wrap $
-  csharp "Expression"
-
-booleanExpression :: Binding
-booleanExpression = def "BooleanExpression" $ T.wrap $
-  csharp "Expression"
-
-statement :: Binding
-statement = def "Statement" $ T.union [
-  "labeled">: csharp "LabeledStatement",
-  "declaration">: csharp "DeclarationStatement",
-  "embedded">: csharp "EmbeddedStatement"]
-
-embeddedStatement :: Binding
-embeddedStatement = def "EmbeddedStatement" $ T.union [
-  "block">: csharp "Block",
-  "empty">: T.unit,
-  "expression">: csharp "StatementExpression",
-  "selection">: csharp "SelectionStatement",
-  "iteration">: csharp "IterationStatement",
-  "jump">: csharp "JumpStatement",
-  "try">: csharp "TryStatement",
-  "checked">: csharp "Block",
-  "unchecked">: csharp "Block",
-  "lock">: csharp "LockStatement",
-  "using">: csharp "UsingStatement",
-  "yield">: csharp "YieldStatement",
-  "unsafe">: csharp "Block",
-  "fixed">: csharp "FixedStatement"]
-
-block :: Binding
-block = def "Block" $ T.wrap $
-  T.list $ csharp "Statement"
-
-labeledStatement :: Binding
-labeledStatement = def "LabeledStatement" $ T.record [
-  "label">: csharp "Identifier",
-  "statement">: csharp "Statement"]
-
-declarationStatement :: Binding
-declarationStatement = def "DeclarationStatement" $ T.union [
-  "variable">: csharp "LocalVariableDeclaration",
-  "constant">: csharp "LocalConstantDeclaration",
-  "function">: csharp "LocalFunctionDeclaration"]
-
-localVariableDeclaration :: Binding
-localVariableDeclaration = def "LocalVariableDeclaration" $ T.union [
-  "implicitlyTyped">: csharp "ImplicitlyTypedLocalVariableDeclaration",
-  "explicitlyTyped">: csharp "ExplicitlyTypedLocalVariableDeclaration",
-  "ref">: csharp "RefLocalVariableDeclaration"]
-
-implicitlyTypedLocalVariableDeclaration :: Binding
-implicitlyTypedLocalVariableDeclaration = def "ImplicitlyTypedLocalVariableDeclaration" $ T.union [
-  "var">: csharp "ImplicitlyTypedLocalVariableDeclarator",
-  "refVar">: csharp "RefVarImplicitlyTypedLocalVariableDeclaration"]
-
-refVarImplicitlyTypedLocalVariableDeclaration :: Binding
-refVarImplicitlyTypedLocalVariableDeclaration = def "RefVarImplicitlyTypedLocalVariableDeclaration" $ T.record [
-  "refKind">: csharp "RefKind",
-  "declarator">: csharp "RefLocalVariableDeclarator"]
-
-implicitlyTypedLocalVariableDeclarator :: Binding
-implicitlyTypedLocalVariableDeclarator = def "ImplicitlyTypedLocalVariableDeclarator" $ T.record [
-  "identifier">: csharp "Identifier",
-  "expression">: csharp "Expression"]
-
-explicitlyTypedLocalVariableDeclaration :: Binding
-explicitlyTypedLocalVariableDeclaration = def "ExplicitlyTypedLocalVariableDeclaration" $ T.record [
-  "type">: csharp "Type",
-  "declarators">: T.list $ csharp "ExplicitlyTypedLocalVariableDeclarator"]
-
-explicitlyTypedLocalVariableDeclarator :: Binding
-explicitlyTypedLocalVariableDeclarator = def "ExplicitlyTypedLocalVariableDeclarator" $ T.record [
-  "identifier">: csharp "Identifier",
-  "initializer">: T.maybe $ csharp "LocalVariableInitializer"]
-
-localVariableInitializer :: Binding
-localVariableInitializer = def "LocalVariableInitializer" $ T.union [
-  "expression">: csharp "Expression",
-  "initializer">: csharp "ArrayInitializer"]
-
-refLocalVariableDeclaration :: Binding
-refLocalVariableDeclaration = def "RefLocalVariableDeclaration" $ T.record [
-  "refKind">: csharp "RefKind",
-  "type">: csharp "Type",
-  "declarators">: nonemptyList $ csharp "RefLocalVariableDeclarator"]
-
-refLocalVariableDeclarator :: Binding
-refLocalVariableDeclarator = def "RefLocalVariableDeclarator" $ T.record [
-  "left">: csharp "Identifier",
-  "right">: csharp "VariableReference"]
-
-localConstantDeclaration :: Binding
-localConstantDeclaration = def "LocalConstantDeclaration" $ T.record [
-  "type">: csharp "Type",
-  "declarators">: nonemptyList $ csharp "ConstantDeclarator"]
-
-constantDeclarator :: Binding
-constantDeclarator = def "ConstantDeclarator" $ T.record [
-  "identifier">: csharp "Identifier",
-  "expression">: csharp "ConstantExpression"]
-
-localFunctionDeclaration :: Binding
-localFunctionDeclaration = def "LocalFunctionDeclaration" $ T.union [
-  "standard">: csharp "StandardLocalFunctionDeclaration",
-  "ref">: csharp "RefLocalFunctionDeclaration"]
-
-standardLocalFunctionDeclaration :: Binding
-standardLocalFunctionDeclaration = def "StandardLocalFunctionDeclaration" $ T.record [
-  "modifiers">: T.list $ csharp "LocalFunctionModifier",
-  "returnType">: csharp "ReturnType",
-  "header">: csharp "LocalFunctionHeader",
-  "body">: csharp "LocalFunctionBody"]
-
-refLocalFunctionDeclaration :: Binding
-refLocalFunctionDeclaration = def "RefLocalFunctionDeclaration" $ T.record [
-  "modifiers">: T.list $ csharp "RefLocalFunctionModifier",
-  "refKind">: csharp "RefKind",
-  "returnType">: csharp "Type",
-  "header">: csharp "LocalFunctionHeader",
-  "body">: csharp "RefLocalFunctionBody"]
-
-localFunctionHeader :: Binding
-localFunctionHeader = def "LocalFunctionHeader" $ T.record [
-  "identifier">: csharp "Identifier",
-  "typeParameters">: T.maybe $ csharp "TypeParameterList",
-  "parameters">: csharp "FormalParameterList",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause"]
-
-localFunctionModifier :: Binding
-localFunctionModifier = def "LocalFunctionModifier" $ T.union [
-  "ref">: csharp "RefLocalFunctionModifier",
-  "async">: T.unit]
-
-refLocalFunctionModifier :: Binding
-refLocalFunctionModifier = def "RefLocalFunctionModifier" $ T.enum [
-  "static",
-  "unsafe"]
-
-localFunctionBody :: Binding
-localFunctionBody = def "LocalFunctionBody" $ T.union [
-  "block">: csharp "Block",
-  "nullConditionalInvocation">: csharp "NullConditionalInvocationExpression",
-  "expression">: csharp "Expression"]
-
-refLocalFunctionBody :: Binding
-refLocalFunctionBody = def "RefLocalFunctionBody" $ T.union [
-  "block">: csharp "Block",
-  "ref">: csharp "VariableReference"]
-
-statementExpression :: Binding
-statementExpression = def "StatementExpression" $ T.union [
-  "nullConditionalInvocation">: csharp "NullConditionalInvocationExpression",
-  "invocation">: csharp "InvocationExpression",
-  "objectCreation">: csharp "ObjectCreationExpression",
-  "assignment">: csharp "Assignment",
-  "postIncrement">: csharp "PrimaryExpression",
-  "postDecrement">: csharp "PrimaryExpression",
-  "preIncrement">: csharp "UnaryExpression",
-  "preDecrement">: csharp "UnaryExpression",
-  "await">: csharp "UnaryExpression"]
-
-selectionStatement :: Binding
-selectionStatement = def "SelectionStatement" $ T.union [
-  "if">: csharp "IfStatement",
-  "switch">: csharp "SwitchStatement"]
-
-ifStatement :: Binding
-ifStatement = def "IfStatement" $ T.record [
-  "condition">: csharp "BooleanExpression",
-  "ifBranch">: csharp "EmbeddedStatement",
-  "elseBranch">: csharp "EmbeddedStatement"]
-
-switchStatement :: Binding
-switchStatement = def "SwitchStatement" $ T.record [
-  "expression">: csharp "Expression",
-  "branches">: T.list $ csharp "SwitchSection"]
-
-switchSection :: Binding
-switchSection = def "SwitchSection" $ T.record [
-  "labels">: nonemptyList $ csharp "SwitchLabel",
-  "statements">: T.list $ csharp "Statement"]
-
-switchLabel :: Binding
-switchLabel = def "SwitchLabel" $ T.union [
-  "branch">: csharp "SwitchBranch",
-  "default">: T.unit]
-
-switchBranch :: Binding
-switchBranch = def "SwitchBranch" $ T.record [
-  "pattern">: csharp "Pattern",
-  "guard">: T.maybe $ csharp "Expression"]
-
-iterationStatement :: Binding
-iterationStatement = def "IterationStatement" $ T.union [
-  "while">: csharp "WhileStatement",
-  "do">: csharp "DoStatement",
-  "for">: csharp "ForStatement",
-  "foreach">: csharp "ForeachStatement"]
-
-whileStatement :: Binding
-whileStatement = def "WhileStatement" $ T.record [
-  "condition">: csharp "BooleanExpression",
-  "body">: csharp "EmbeddedStatement"]
-
-doStatement :: Binding
-doStatement = def "DoStatement" $ T.record [
-  "body">: csharp "EmbeddedStatement",
-  "while">: csharp "BooleanExpression"]
-
-forStatement :: Binding
-forStatement = def "ForStatement" $ T.record [
-  "initializer">: T.maybe $ csharp "ForInitializer",
-  "condition">: T.maybe $ csharp "BooleanExpression",
-  "iterator">: T.maybe $ csharp "StatementExpressionList",
-  "body">: csharp "EmbeddedStatement"]
-
-forInitializer :: Binding
-forInitializer = def "ForInitializer" $ T.union [
-  "variable">: csharp "LocalVariableDeclaration",
-  "statements">: csharp "StatementExpressionList"]
-
-statementExpressionList :: Binding
-statementExpressionList = def "StatementExpressionList" $ T.wrap $ nonemptyList $ csharp "StatementExpression"
-
-foreachStatement :: Binding
-foreachStatement = def "ForeachStatement" $ T.record [
-  "kind">: T.maybe $ csharp "RefKind",
-  "type">: csharp "LocalVariableType",
-  "identifier">: csharp "Identifier",
-  "expression">: csharp "Expression",
-  "body">: csharp "EmbeddedStatement"]
-
-jumpStatement :: Binding
-jumpStatement = def "JumpStatement" $ T.union [
-  "break">: T.unit,
-  "continue">: T.unit,
-  "goto">: csharp "GotoStatement",
-  "return">: csharp "ReturnStatement",
-  "throw">: T.maybe $ csharp "Expression"]
-
-gotoStatement :: Binding
-gotoStatement = def "GotoStatement" $ T.union [
-  "identifier">: csharp "Identifier",
-  "case">: csharp "ConstantExpression",
-  "default">: T.unit]
-
-returnStatement :: Binding
-returnStatement = def "ReturnStatement" $ T.union [
-  "simple">: T.unit,
-  "value">: csharp "Expression",
-  "ref">: csharp "VariableReference"]
-
-tryStatement :: Binding
-tryStatement = def "TryStatement" $ T.record [
-  "body">: csharp "Block",
-  "catches">: csharp "CatchClauses",
-  "finally">: T.maybe $ csharp "Block"]
-
-catchClauses :: Binding
-catchClauses = def "CatchClauses" $ T.union [
-  "specific">: T.list $ csharp "SpecificCatchClause",
-  "general">: csharp "Block"]
-
-specificCatchClause :: Binding
-specificCatchClause = def "SpecificCatchClause" $ T.record [
-  "specifier">: T.maybe $ csharp "ExceptionSpecifier",
-  "filter">: T.maybe $ csharp "BooleanExpression",
-  "body">: csharp "Block"]
-
-exceptionSpecifier :: Binding
-exceptionSpecifier = def "ExceptionSpecifier" $ T.record [
-  "type">: csharp "Type",
-  "identifier">: T.maybe $ csharp "Identifier"]
-
-lockStatement :: Binding
-lockStatement = def "LockStatement" $ T.record [
-  "expression">: csharp "Expression",
-  "body">: csharp "EmbeddedStatement"]
-
-usingStatement :: Binding
-usingStatement = def "UsingStatement" $ T.record [
-  "acquisition">: csharp "ResourceAcquisition",
-  "body">: csharp "EmbeddedStatement"]
-
-resourceAcquisition :: Binding
-resourceAcquisition = def "ResourceAcquisition" $ T.union [
-  "local">: csharp "LocalVariableDeclaration",
-  "expression">: csharp "Expression"]
-
-yieldStatement :: Binding
-yieldStatement = def "YieldStatement" $ T.union [
-  "return">: csharp "Expression",
-  "break">: T.unit]
-
-compilationUnit :: Binding
-compilationUnit = def "CompilationUnit" $ T.record [
-  "externs">: T.list $ csharp "ExternAliasDirective",
-  "usings">: T.list $ csharp "UsingDirective",
-  "attributes">: T.list $ csharp "GlobalAttributeSection",
-  "members">: T.list $ csharp "NamespaceMemberDeclaration"]
-
-namespaceDeclaration :: Binding
-namespaceDeclaration = def "NamespaceDeclaration" $ T.record [
-  "name">: csharp "QualifiedIdentifier",
-  "body">: csharp "NamespaceBody"]
-
-qualifiedIdentifier :: Binding
-qualifiedIdentifier = def "QualifiedIdentifier" $ T.wrap $
-  nonemptyList $ csharp "Identifier"
-
-namespaceBody :: Binding
-namespaceBody = def "NamespaceBody" $ T.record [
-  "externs">: T.list $ csharp "ExternAliasDirective",
-  "usings">: T.list $ csharp "UsingDirective",
-  "members">: T.list $ csharp "NamespaceMemberDeclaration"]
-
-externAliasDirective :: Binding
-externAliasDirective = def "ExternAliasDirective" $ T.wrap $
-  csharp "Identifier"
-
-usingDirective :: Binding
-usingDirective = def "UsingDirective" $ T.union [
-  "alias">: csharp "UsingAliasDirective",
-  "namespace">: csharp "NamespaceName",
-  "static">: csharp "TypeName"]
-
-usingAliasDirective :: Binding
-usingAliasDirective = def "UsingAliasDirective" $ T.record [
-  "alias">: csharp "Identifier",
-  "name">: csharp "NamespaceOrTypeName"]
-
-namespaceMemberDeclaration :: Binding
-namespaceMemberDeclaration = def "NamespaceMemberDeclaration" $ T.union [
-  "namespace">: csharp "NamespaceDeclaration",
-  "type">: csharp "TypeDeclaration"]
-
-typeDeclaration :: Binding
-typeDeclaration = def "TypeDeclaration" $ T.union [
-  "class">: csharp "ClassDeclaration",
-  "struct">: csharp "StructDeclaration",
-  "interface">: csharp "InterfaceDeclaration",
-  "enum">: csharp "EnumDeclaration",
-  "delegate">: csharp "DelegateDeclaration"]
-
-qualifiedAliasMember :: Binding
-qualifiedAliasMember = def "QualifiedAliasMember" $ T.record [
-  "alias">: csharp "Identifier",
-  "member">: csharp "Identifier",
-  "arguments">: T.maybe $ csharp "TypeArgumentList"]
-
-classDeclaration :: Binding
-classDeclaration = def "ClassDeclaration" $ T.record [
-  "attributes">: T.list $ csharp "AttributeSection",
-  "modifiers">: T.list $ csharp "ClassModifier",
-  "partial">: T.boolean,
-  "name">: csharp "Identifier",
-  "parameters">: T.maybe $ csharp "TypeParameterList",
-  "base">: T.maybe $ csharp "ClassBase",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause",
-  "body">: csharp "ClassBody"]
-
-classModifier :: Binding
-classModifier = def "ClassModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "abstract",
-  "sealed",
-  "static",
-  "unsafe"]
-
-typeParameterList :: Binding
-typeParameterList = def "TypeParameterList" $ T.wrap $ nonemptyList $ csharp "TypeParameterPart"
-
-typeParameterPart :: Binding
-typeParameterPart = def "TypeParameterPart" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "name">: csharp "TypeParameter"]
-
-classBase :: Binding
-classBase = def "ClassBase" $ T.union [
-  "class">: T.maybe $ csharp "ClassType",
-  "interfaces">: T.list $ csharp "InterfaceType"]
-
-typeParameterConstraintsClause :: Binding
-typeParameterConstraintsClause = def "TypeParameterConstraintsClause" $ T.record [
-  "parameter">: csharp "TypeParameter",
-  "constraints">: T.list $ csharp "TypeParameterConstraints"]
-
-typeParameterConstraints :: Binding
-typeParameterConstraints = def "TypeParameterConstraints" $ T.record [
-  "primary">: T.maybe $ csharp "PrimaryConstraint",
-  "secondary">: T.maybe $ csharp "SecondaryConstraints",
-  "constructor">: T.boolean]
-
-primaryConstraint :: Binding
-primaryConstraint = def "PrimaryConstraint" $ T.union [
-  "classType">: csharp "ClassType",
-  "class">: T.unit,
-  "struct">: T.unit,
-  "unmanaged">: T.unit]
-
-secondaryConstraints :: Binding
-secondaryConstraints = def "SecondaryConstraints" $ T.wrap $ nonemptyList $ csharp "SecondaryConstraint"
-
-secondaryConstraint :: Binding
-secondaryConstraint = def "SecondaryConstraint" $ T.union [
-  "interface">: csharp "InterfaceType",
-  "parameter">: csharp "TypeParameter"]
-
-classBody :: Binding
-classBody = def "ClassBody" $ T.wrap $
-  T.list $ csharp "ClassMemberDeclaration"
-
-classMemberDeclaration :: Binding
-classMemberDeclaration = def "ClassMemberDeclaration" $ T.union [
-  "constant">: csharp "ConstantDeclaration",
-  "field">: csharp "FieldDeclaration",
-  "method">: csharp "MethodDeclaration",
-  "property">: csharp "PropertyDeclaration",
-  "event">: csharp "EventDeclaration",
-  "indexer">: csharp "IndexerDeclaration",
-  "operator">: csharp "OperatorDeclaration",
-  "constructor">: csharp "ConstructorDeclaration",
-  "finalizer">: csharp "FinalizerDeclaration",
-  "staticConstructor">: csharp "StaticConstructorDeclaration",
-  "type">: csharp "TypeDeclaration"]
-
-constantDeclaration :: Binding
-constantDeclaration = def "ConstantDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "ConstantModifier",
-  "type">: csharp "Type",
-  "declarators">: nonemptyList $ csharp "ConstantDeclarator"]
-
-constantModifier :: Binding
-constantModifier = def "ConstantModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private"]
-
-fieldDeclaration :: Binding
-fieldDeclaration = def "FieldDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "FieldModifier",
-  "type">: csharp "Type",
-  "declarators">: nonemptyList $ csharp "VariableDeclarator"]
-
-fieldModifier :: Binding
-fieldModifier = def "FieldModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "static",
-  "readonly",
-  "volatile",
-  "unsafe"]
-
-variableDeclarators :: Binding
-variableDeclarators = def "VariableDeclarators" $ T.wrap $ nonemptyList $ csharp "VariableDeclarator"
-
-variableDeclarator :: Binding
-variableDeclarator = def "VariableDeclarator" $ T.record [
-  "identifier">: csharp "Identifier",
-  "initializer">: T.maybe $ csharp "VariableInitializer"]
-
-methodDeclaration :: Binding
-methodDeclaration = def "MethodDeclaration" $ T.union [
-  "standard">: csharp "StandardMethodDeclaration",
-  "refReturn">: csharp "RefReturnMethodDeclaration"]
-
-standardMethodDeclaration :: Binding
-standardMethodDeclaration = def "StandardMethodDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "MethodModifier",
-  "returnType">: csharp "ReturnType",
-  "header">: csharp "MethodHeader",
-  "body">: csharp "MethodBody"]
-
-refReturnMethodDeclaration :: Binding
-refReturnMethodDeclaration = def "RefReturnMethodDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "RefMethodModifier",
-  "kind">: csharp "RefKind",
-  "returnType">: csharp "ReturnType",
-  "header">: csharp "MethodHeader",
-  "body">: csharp "RefMethodBody"]
-
-methodModifiers :: Binding
-methodModifiers = def "MethodModifiers" $ T.record [
-  "modifiers">: T.list $ csharp "MethodModifier",
-  "partial">: T.boolean]
-
-refKind :: Binding
-refKind = def "RefKind" $ T.enum [
-  "ref",
-  "refReadonly"]
-
-methodHeader :: Binding
-methodHeader = def "MethodHeader" $ T.record [
-  "name">: csharp "MemberName",
-  "typeParameters">: T.maybe $ csharp "TypeParameterList",
-  "parameters">: T.maybe $ csharp "FormalParameterList",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause"]
-
-methodModifier :: Binding
-methodModifier = def "MethodModifier" $ T.union [
-  "ref">: csharp "RefMethodModifier",
-  "async">: T.unit]
-
-refMethodModifier :: Binding
-refMethodModifier = def "RefMethodModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "static",
-  "virtual",
-  "sealed",
-  "override",
-  "abstract",
-  "extern",
-  "unsafe"]
-
-returnType :: Binding
-returnType = def "ReturnType" $ T.union [
-  "ref">: csharp "Type",
-  "void">: T.unit]
-
-memberName :: Binding
-memberName = def "MemberName" $ T.record [
-  "interfaceType">: T.maybe $ csharp "TypeName",
-  "identifier">: csharp "Identifier"]
-
-methodBody :: Binding
-methodBody = def "MethodBody" $ T.union [
-  "block">: csharp "Block",
-  "nullConditionalInvocation">: csharp "NullConditionalInvocationExpression",
-  "expression">: csharp "Expression",
-  "empty">: T.unit]
-
-refMethodBody :: Binding
-refMethodBody = def "RefMethodBody" $ T.union [
-  "block">: csharp "Block",
-  "ref">: csharp "VariableReference",
-  "empty">: T.unit]
-
-formalParameterList :: Binding
-formalParameterList = def "FormalParameterList" $ T.record [
-  "fixed">: T.list $ csharp "FixedParameter",
-  "array">: T.maybe $ csharp "ParameterArray"]
-
-fixedParameter :: Binding
-fixedParameter = def "FixedParameter" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifier">: T.maybe $ csharp "ParameterModifier",
-  "type">: csharp "Type",
-  "identifier">: csharp "Identifier",
-  "defaultArgument">: T.maybe $ csharp "Expression"]
-
-parameterModifier :: Binding
-parameterModifier = def "ParameterModifier" $ T.union [
-  "mode">: csharp "ParameterModeModifier",
-  "this">: T.unit]
-
-parameterModeModifier :: Binding
-parameterModeModifier = def "ParameterModeModifier" $ T.enum [
-  "ref",
-  "out",
-  "in"]
-
-parameterArray :: Binding
-parameterArray = def "ParameterArray" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "type">: csharp "ArrayType",
-  "identifier">: csharp "Identifier"]
-
-propertyDeclaration :: Binding
-propertyDeclaration = def "PropertyDeclaration" $ T.union [
-  "standard">: csharp "StandardPropertyDeclaration",
-  "refReturn">: csharp "RefReturnPropertyDeclaration"]
-
-standardPropertyDeclaration :: Binding
-standardPropertyDeclaration = def "StandardPropertyDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "PropertyModifier",
-  "type">: csharp "Type",
-  "name">: csharp "MemberName",
-  "body">: csharp "PropertyBody"]
-
-refReturnPropertyDeclaration :: Binding
-refReturnPropertyDeclaration = def "RefReturnPropertyDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "PropertyModifier",
-  "refKind">: csharp "RefKind",
-  "type">: csharp "Type",
-  "name">: csharp "MemberName",
-  "body">: csharp "RefPropertyBody"]
-
-propertyModifier :: Binding
-propertyModifier = def "PropertyModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "static",
-  "virtual",
-  "sealed",
-  "override",
-  "abstract",
-  "extern",
-  "unsafe"]
-
-propertyBody :: Binding
-propertyBody = def "PropertyBody" $ T.union [
-  "block">: csharp "BlockPropertyBody",
-  "expression">: csharp "Expression"]
-
-blockPropertyBody :: Binding
-blockPropertyBody = def "BlockPropertyBody" $ T.record [
-  "accessors">: csharp "AccessorDeclarations",
-  "initializer">: T.maybe $ csharp "VariableInitializer"]
-
-refPropertyBody :: Binding
-refPropertyBody = def "RefPropertyBody" $ T.union [
-  "block">: csharp "RefGetAccessorDeclaration",
-  "ref">: csharp "VariableReference"]
-
-accessorDeclarations :: Binding
-accessorDeclarations = def "AccessorDeclarations" $ T.union [
-  "get">: T.maybe $ csharp "AccessorDeclaration",
-  "set">: T.maybe $ csharp "AccessorDeclaration"]
-
-accessorDeclaration :: Binding
-accessorDeclaration = def "AccessorDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifier">: T.maybe $ csharp "AccessorModifier",
-  "body">: csharp "AccessorBody"]
-
-accessorModifier :: Binding
-accessorModifier = def "AccessorModifier" $ T.enum [
-  "protected",
-  "internal",
-  "private",
-  "protectedInternal",
-  "internalProtected",
-  "protectedPrivate",
-  "privateProtected"]
-
-accessorBody :: Binding
-accessorBody = def "AccessorBody" $ T.union [
-  "block">: csharp "Block",
-  "expression">: csharp "Expression",
-  "empty">: T.unit]
-
-refGetAccessorDeclaration :: Binding
-refGetAccessorDeclaration = def "RefGetAccessorDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifier">: T.maybe $ csharp "AccessorModifier",
-  "body">: csharp "RefAccessorBody"]
-
-refAccessorBody :: Binding
-refAccessorBody = def "RefAccessorBody" $ T.union [
-  "block">: csharp "Block",
-  "ref">: csharp "VariableReference",
-  "empty">: T.unit]
-
-eventDeclaration :: Binding
-eventDeclaration = def "EventDeclaration" $ T.union [
-  "standard">: csharp "StandardEventDeclaration",
-  "accessors">: csharp "AccessorsEventDeclaration"]
-
-standardEventDeclaration :: Binding
-standardEventDeclaration = def "StandardEventDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "EventModifier",
-  "type">: csharp "Type",
-  "declarators">: csharp "VariableDeclarators"]
-
-accessorsEventDeclaration :: Binding
-accessorsEventDeclaration = def "AccessorsEventDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "EventModifier",
-  "type">: csharp "Type",
-  "name">: csharp "MemberName",
-  "accessors">: csharp "EventAccessorDeclarations"]
-
-eventModifier :: Binding
-eventModifier = def "EventModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "static",
-  "virtual",
-  "sealed",
-  "override",
-  "abstract",
-  "extern",
-  "unsafe"]
-
-eventAccessorDeclarations :: Binding
-eventAccessorDeclarations = def "EventAccessorDeclarations" $ T.union [
-  "add">: csharp "AddRemoveAccessorDeclaration",
-  "remove">: csharp "AddRemoveAccessorDeclaration"]
-
-addRemoveAccessorDeclaration :: Binding
-addRemoveAccessorDeclaration = def "AddRemoveAccessorDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "body">: csharp "Block"]
-
-indexerDeclaration :: Binding
-indexerDeclaration = def "IndexerDeclaration" $ T.union [
-  "standard">: csharp "StandardIndexerDeclaration",
-  "ref">: csharp "RefIndexerDeclaration"]
-
-standardIndexerDeclaration :: Binding
-standardIndexerDeclaration = def "StandardIndexerDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "IndexerModifier",
-  "declarator">: csharp "IndexerDeclarator",
-  "body">: csharp "IndexerBody"]
-
-refIndexerDeclaration :: Binding
-refIndexerDeclaration = def "RefIndexerDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "IndexerModifier",
-  "refKind">: csharp "RefKind",
-  "declarator">: csharp "IndexerDeclarator",
-  "body">: csharp "RefIndexerBody"]
-
-indexerModifier :: Binding
-indexerModifier = def "IndexerModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "virtual",
-  "sealed",
-  "override",
-  "abstract",
-  "extern",
-  "unsafe"]
-
-indexerDeclarator :: Binding
-indexerDeclarator = def "IndexerDeclarator" $ T.record [
-  "type">: csharp "Type",
-  "interface">: T.maybe $ csharp "InterfaceType",
-  "parameters">: csharp "FormalParameterList"]
-
-indexerBody :: Binding
-indexerBody = def "IndexerBody" $ T.union [
-  "block">: csharp "AccessorDeclarations",
-  "expression">: csharp "Expression"]
-
-refIndexerBody :: Binding
-refIndexerBody = def "RefIndexerBody" $ T.union [
-  "block">: csharp "RefGetAccessorDeclaration",
-  "ref">: csharp "VariableReference"]
-
-operatorDeclaration :: Binding
-operatorDeclaration = def "OperatorDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "OperatorModifier",
-  "declarator">: csharp "OperatorDeclarator",
-  "body">: csharp "OperatorBody"]
-
-operatorModifier :: Binding
-operatorModifier = def "OperatorModifier" $ T.enum [
-  "public",
-  "static",
-  "extern",
-  "unsafe"]
-
-operatorDeclarator :: Binding
-operatorDeclarator = def "OperatorDeclarator" $ T.union [
-  "unary">: csharp "UnaryOperatorDeclarator",
-  "binary">: csharp "BinaryOperatorDeclarator",
-  "conversion">: csharp "ConversionOperatorDeclarator"]
-
-unaryOperatorDeclarator :: Binding
-unaryOperatorDeclarator = def "UnaryOperatorDeclarator" $ T.record [
-  "type">: csharp "Type",
-  "operator">: csharp "OverloadableUnaryOperator",
-  "parameter">: csharp "FixedParameter"]
-
-overloadableUnaryOperator :: Binding
-overloadableUnaryOperator = def "OverloadableUnaryOperator" $ T.enum [
-  "plus",
-  "minus",
-  "not",
-  "complement",
-  "increment",
-  "decrement",
-  "true",
-  "false"]
-
-binaryOperatorDeclarator :: Binding
-binaryOperatorDeclarator = def "BinaryOperatorDeclarator" $ T.record [
-  "type">: csharp "Type",
-  "operator">: csharp "OverloadableBinaryOperator",
-  "left">: csharp "FixedParameter",
-  "right">: csharp "FixedParameter"]
-
-overloadableBinaryOperator :: Binding
-overloadableBinaryOperator = def "OverloadableBinaryOperator" $ T.enum [
-  "add",
-  "subtract",
-  "multiply",
-  "divide",
-  "modulus",
-  "and",
-  "or",
-  "xor",
-  "leftShift",
-  "rightShift",
-  "equal",
-  "notEqual",
-  "greaterThan",
-  "lessThan",
-  "greaterThanOrEqual",
-  "lessThanOrEqual"]
-
-conversionOperatorDeclarator :: Binding
-conversionOperatorDeclarator = def "ConversionOperatorDeclarator" $ T.record [
-  "kind">: csharp "ConversionKind",
-  "type">: csharp "Type",
-  "parameter">: csharp "FixedParameter"]
-
-conversionKind :: Binding
-conversionKind = def "ConversionKind" $ T.enum [
-  "implicit",
-  "explicit"]
-
-operatorBody :: Binding
-operatorBody = def "OperatorBody" $ T.union [
-  "block">: csharp "Block",
-  "expression">: csharp "Expression",
-  "empty">: T.unit]
-
-constructorDeclaration :: Binding
-constructorDeclaration = def "ConstructorDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "ConstructorModifier",
-  "declarator">: csharp "ConstructorDeclarator",
-  "body">: csharp "ConstructorBody"]
-
-constructorModifier :: Binding
-constructorModifier = def "ConstructorModifier" $ T.enum [
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "extern",
-  "unsafe"]
-
-constructorDeclarator :: Binding
-constructorDeclarator = def "ConstructorDeclarator" $ T.record [
-  "name">: csharp "Identifier",
-  "parameters">: T.maybe $ csharp "FormalParameterList",
-  "initializer">: T.maybe $ csharp "ConstructorInitializer"]
-
-constructorInitializer :: Binding
-constructorInitializer = def "ConstructorInitializer" $ T.union [
-  "base">: T.maybe $ csharp "ArgumentList",
-  "this">: T.maybe $ csharp "ArgumentList"]
-
-constructorBody :: Binding
-constructorBody = def "ConstructorBody" $ T.union [
-  "block">: csharp "Block",
-  "expression">: csharp "Expression",
-  "empty">: T.unit]
-
-staticConstructorDeclaration :: Binding
-staticConstructorDeclaration = def "StaticConstructorDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: csharp "StaticConstructorModifiers",
-  "name">: csharp "Identifier",
-  "body">: csharp "StaticConstructorBody"]
-
-staticConstructorModifiers :: Binding
-staticConstructorModifiers = def "StaticConstructorModifiers" $ T.record [
-  "extern">: T.boolean,
-  "unsafe">: T.boolean]
-
-staticConstructorBody :: Binding
-staticConstructorBody = def "StaticConstructorBody" $ T.union [
-  "block">: csharp "Block",
-  "expression">: csharp "Expression",
-  "empty">: T.unit]
-
-finalizerDeclaration :: Binding
-finalizerDeclaration = def "FinalizerDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "extern">: T.boolean,
-  "unsafe">: T.boolean,
-  "name">: csharp "Identifier",
-  "body">: csharp "FinalizerBody"]
-
-finalizerBody :: Binding
-finalizerBody = def "FinalizerBody" $ T.union [
-  "block">: csharp "Block",
-  "expression">: csharp "Expression",
-  "empty">: T.unit]
-
-structDeclaration :: Binding
-structDeclaration = def "StructDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "StructModifier",
-  "ref">: T.boolean,
-  "partial">: T.boolean,
-  "name">: csharp "Identifier",
-  "parameters">: T.maybe $ csharp "TypeParameterList",
-  "interfaces">: T.list $ csharp "InterfaceType",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause",
-  "body">: T.list $ csharp "StructMemberDeclaration"]
-
-structModifier :: Binding
-structModifier = def "StructModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "readonly",
-  "unsafe"]
-
-structMemberDeclaration :: Binding
-structMemberDeclaration = def "StructMemberDeclaration" $ T.union [
-  "constant">: csharp "ConstantDeclaration",
-  "field">: csharp "FieldDeclaration",
-  "method">: csharp "MethodDeclaration",
-  "property">: csharp "PropertyDeclaration",
-  "event">: csharp "EventDeclaration",
-  "indexer">: csharp "IndexerDeclaration",
-  "operator">: csharp "OperatorDeclaration",
-  "constructor">: csharp "ConstructorDeclaration",
-  "staticConstructor">: csharp "StaticConstructorDeclaration",
-  "type">: csharp "TypeDeclaration",
-  "fixedSizeBuffer">: csharp "FixedSizeBufferDeclaration"]
-
-arrayInitializer :: Binding
-arrayInitializer = def "ArrayInitializer" $ T.wrap $
-  T.list $ csharp "VariableInitializer"
-
-variableInitializer :: Binding
-variableInitializer = def "VariableInitializer" $ T.union [
-  "expression">: csharp "Expression",
-  "array">: csharp "ArrayInitializer"]
-
-interfaceDeclaration :: Binding
-interfaceDeclaration = def "InterfaceDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "InterfaceModifier",
-  "partial">: T.boolean,
-  "name">: csharp "Identifier",
-  "parameters">: T.maybe $ csharp "VariantTypeParameters",
-  "base">: T.list $ csharp "InterfaceType",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause",
-  "body">: T.list $ csharp "InterfaceMemberDeclaration"]
-
-interfaceModifier :: Binding
-interfaceModifier = def "InterfaceModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "unsafe"]
-
-variantTypeParameters :: Binding
-variantTypeParameters = def "VariantTypeParameters" $ T.wrap $ T.list $ csharp "VariantTypeParameter"
-
-variantTypeParameter :: Binding
-variantTypeParameter = def "VariantTypeParameter" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "variance">: T.maybe $ csharp "VarianceAnnotation",
-  "parameter">: csharp "TypeParameter"]
-
-varianceAnnotation :: Binding
-varianceAnnotation = def "VarianceAnnotation" $ T.enum [
-  "in",
-  "out"]
-
-interfaceMemberDeclaration :: Binding
-interfaceMemberDeclaration = def "InterfaceMemberDeclaration" $ T.union [
-  "method">: csharp "InterfaceMethodDeclaration",
-  "property">: csharp "InterfacePropertyDeclaration",
-  "event">: csharp "InterfaceEventDeclaration",
-  "indexer">: csharp "InterfaceIndexerDeclaration"]
-
-interfaceMethodDeclaration :: Binding
-interfaceMethodDeclaration = def "InterfaceMethodDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "new">: T.boolean,
-  "returnType">: csharp "ReturnType",
-  "refKind">: T.maybe $ csharp "RefKind",
-  "header">: csharp "InterfaceMethodHeader"]
-
-interfaceMethodHeader :: Binding
-interfaceMethodHeader = def "InterfaceMethodHeader" $ T.record [
-  "name">: csharp "Identifier",
-  "parameters">: T.maybe $ csharp "FormalParameterList",
-  "typeParameters">: T.maybe $ csharp "TypeParameterList",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause"]
-
-interfacePropertyDeclaration :: Binding
-interfacePropertyDeclaration = def "InterfacePropertyDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "new">: T.boolean,
-  "refKind">: T.maybe $ csharp "RefKind",
-  "type">: csharp "Type",
-  "name">: csharp "Identifier",
-  "accessors">: csharp "InterfaceAccessors"]
-
-interfaceAccessors :: Binding
-interfaceAccessors = def "InterfaceAccessors" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "get">: T.maybe $ csharp "Attributes",
-  "set">: T.maybe $ csharp "Attributes"]
-
-interfaceEventDeclaration :: Binding
-interfaceEventDeclaration = def "InterfaceEventDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "new">: T.boolean,
-  "type">: csharp "Type",
-  "name">: csharp "Identifier"]
-
-interfaceIndexerDeclaration :: Binding
-interfaceIndexerDeclaration = def "InterfaceIndexerDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "new">: T.boolean,
-  "refKind">: T.maybe $ csharp "RefKind",
-  "type">: csharp "Type",
-  "parameters">: csharp "FormalParameterList",
-  "accessors">: csharp "InterfaceAccessors"]
-
-enumDeclaration :: Binding
-enumDeclaration = def "EnumDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "EnumModifier",
-  "name">: csharp "Identifier",
-  "base">: T.maybe $ csharp "EnumBase",
-  "body">: T.maybe $ csharp "EnumBody"]
-
-enumBase :: Binding
-enumBase = def "EnumBase" $ T.union [
-  "type">: csharp "IntegralType",
-  "name">: csharp "TypeName"]
-
-enumBody :: Binding
-enumBody = def "EnumBody" $ T.wrap $
-  T.list $ csharp "EnumMemberDeclaration"
-
-enumModifier :: Binding
-enumModifier = def "EnumModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private"]
-
-enumMemberDeclaration :: Binding
-enumMemberDeclaration = def "EnumMemberDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "name">: csharp "Identifier",
-  "value">: T.maybe $ csharp "ConstantExpression"]
-
-delegateDeclaration :: Binding
-delegateDeclaration = def "DelegateDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: T.list $ csharp "DelegateModifier",
-  "returnType">: csharp "ReturnType",
-  "refKind">: T.maybe $ csharp "RefKind",
-  "refReturnType">: T.maybe $ csharp "Type",
-  "header">: csharp "DelegateHeader"]
-
-delegateHeader :: Binding
-delegateHeader = def "DelegateHeader" $ T.record [
-  "name">: csharp "Identifier",
-  "typeParameters">: T.maybe $ csharp "VariantTypeParameters",
-  "parameters">: T.maybe $ csharp "FormalParameterList",
-  "constraints">: T.list $ csharp "TypeParameterConstraintsClause"]
-
-delegateModifier :: Binding
-delegateModifier = def "DelegateModifier" $ T.enum [
-  "new",
-  "public",
-  "protected",
-  "internal",
-  "private",
-  "unsafe"]
-
-globalAttributeSection :: Binding
-globalAttributeSection = def "GlobalAttributeSection" $ T.record [
-  "target">: csharp "Identifier",
-  "attributes">: csharp "AttributeList"]
-
-attributes :: Binding
-attributes = def "Attributes" $ T.wrap $ nonemptyList $ csharp "AttributeSection"
-
-attributeSection :: Binding
-attributeSection = def "AttributeSection" $ T.record [
-  "target">: T.maybe $ csharp "AttributeTarget",
-  "attributes">: csharp "AttributeList"]
-
-attributeTarget :: Binding
-attributeTarget = def "AttributeTarget" $ T.union [
-  "identifier">: csharp "Identifier",
-  "keyword">: csharp "Keyword"]
-
-attributeList :: Binding
-attributeList = def "AttributeList" $ T.wrap $ nonemptyList $ csharp "Attribute"
-
-attribute :: Binding
-attribute = def "Attribute" $ T.record [
-  "name">: csharp "AttributeName",
-  "arguments">: T.maybe $ csharp "AttributeArguments"]
-
-attributeName :: Binding
-attributeName = def "AttributeName" $ T.wrap $
-  csharp "TypeName"
-
-attributeArguments :: Binding
-attributeArguments = def "AttributeArguments" $ T.record [
-  "positonal">: T.maybe $ csharp "PositionalArgumentList",
-  "named">: T.maybe $ csharp "NamedArgumentList"]
-
-positionalArgumentList :: Binding
-positionalArgumentList = def "PositionalArgumentList" $ T.wrap $ nonemptyList $ csharp "PositionalArgument"
-
-positionalArgument :: Binding
-positionalArgument = def "PositionalArgument" $ T.record [
-  "name">: T.maybe $ csharp "Identifier",
-  "value">: csharp "AttributeArgumentExpression"]
-
-namedArgumentList :: Binding
-namedArgumentList = def "NamedArgumentList" $ T.wrap $ nonemptyList $ csharp "NamedArgument"
-
-namedArgument :: Binding
-namedArgument = def "NamedArgument" $ T.record [
-  "name">: csharp "Identifier",
-  "value">: csharp "AttributeArgumentExpression"]
-
-attributeArgumentExpression :: Binding
-attributeArgumentExpression = def "AttributeArgumentExpression" $ T.wrap $
-  csharp "NonAssignmentExpression"
-
-
--- Unsafe Elements
-
-pointerType :: Binding
-pointerType = def "PointerType" $ T.union [
-  "valueType">: T.maybe $ csharp "ValueType",
-  "pointerDepth">: T.int32]
-
-pointerMemberAccess :: Binding
-pointerMemberAccess = def "PointerMemberAccess" $ T.record [
-  "pointer">: csharp "PrimaryExpression",
-  "member">: csharp "Identifier",
-  "typeArguments">: T.maybe $ csharp "TypeArgumentList"]
-
-pointerElementAccess :: Binding
-pointerElementAccess = def "PointerElementAccess" $ T.record [
-  "pointer">: csharp "PrimaryNoArrayCreationExpression",
-  "index">: csharp "Expression"]
-
-fixedStatement :: Binding
-fixedStatement = def "FixedStatement" $ T.record [
-  "pointerType">: csharp "PointerType",
-  "declarators">: nonemptyList $ csharp "FixedPointerDeclarator",
-  "statement">: csharp "EmbeddedStatement"]
-
-fixedPointerDeclarator :: Binding
-fixedPointerDeclarator = def "FixedPointerDeclarator" $ T.union [
-  "reference">: csharp "VariableReference",
-  "expression">: csharp "Expression"]
-
-fixedSizeBufferDeclaration :: Binding
-fixedSizeBufferDeclaration = def "FixedSizeBufferDeclaration" $ T.record [
-  "attributes">: T.maybe $ csharp "Attributes",
-  "modifiers">: nonemptyList $ csharp "FixedSizeBufferModifier",
-  "elementType">: csharp "Type",
-  "declarators">: nonemptyList $ csharp "FixedSizeBufferDeclarator"]
-
-fixedSizeBufferModifier :: Binding
-fixedSizeBufferModifier = def "FixedSizeBufferModifier" $ T.enum [
-  "new",
-  "public",
-  "internal",
-  "private",
-  "unsafe"]
-
-fixedSizeBufferDeclarator :: Binding
-fixedSizeBufferDeclarator = def "FixedSizeBufferDeclarator" $ T.record [
-  "name">: csharp "Identifier",
-  "size">: csharp "ConstantExpression"]
diff --git a/src/main/haskell/Hydra/Sources/Cypher/Features.hs b/src/main/haskell/Hydra/Sources/Cypher/Features.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cypher/Features.hs
+++ /dev/null
@@ -1,255 +0,0 @@
-module Hydra.Sources.Cypher.Features where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import Hydra.Sources.Cypher.Functions
-
-
-ns :: Namespace
-ns = Namespace "hydra.cypher.features"
-
-cypherFeatures :: String -> Type
-cypherFeatures = typeref ns
-
-data FeatureSet = FeatureSet {
-  featureSetName :: String,
-  featureSetDescription :: String,
-  featureSetChildren :: [FeatureSet]}
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("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.")}
-  where
-    definitions = featureSetToType <$> flatten openCypherFeatures
-      where
-        flatten fs = if L.null children then [] else (fs:(L.concat (flatten <$> children)))
-          where
-            children = featureSetChildren fs
-    featureSetToType (FeatureSet name desc children) = datatype ns (featureSetNameToTypeName name) $
-        doc (featureSetDesc desc) $ T.record (toField <$> children)
-      where
-        toField (FeatureSet name1 desc1 children1) = (dotsToCamel name1)>: if L.null children1
-          then doc (featureSetDesc desc1) T.boolean
-          else doc (featureSetDesc desc1) $ cypherFeatures $ featureSetNameToTypeName name1
-          where
-            fieldDesc = "Whether to expect " ++ desc1
-    -- Convert dotted names like "date.realtime" to camelCase "dateRealtime"
-    dotsToCamel name = case break (== '.') name of
-      (first, []) -> decapitalize first
-      (first, _:rest) -> decapitalize first ++ capitalize (dotsToCamel rest)
-    featureSetNameToTypeName name = capitalize name ++ "Features"
-    featureSetDesc desc = capitalize desc
-
-openCypherFeatures :: FeatureSet
-openCypherFeatures =  FeatureSet "Cypher"
-  ("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.") [
-
-    FeatureSet "Arithmetic" "arithmetic operations" [
-      feature "plus" "the + operator",
-      feature "minus" "the - operator",
-      feature "multiply" "the * operator",
-      feature "divide" "the / operator",
-      feature "modulus" "the % operator",
-      feature "powerOf" "the ^ operator"],
-
-    FeatureSet "Atom" "various kinds of atomic expressions" [
-      feature "caseExpression" "CASE expressions",
-      feature "count" "the COUNT (*) expression",
-      feature "existentialSubquery" "existential subqueries",
-      feature "functionInvocation" "function invocation",
-      feature "parameter" "parameter expressions",
-      feature "patternComprehension" "pattern comprehensions",
-      feature "patternPredicate" "relationship patterns as subexpressions",
-      fixed $ feature "variable" "variable expressions"],
-
-    FeatureSet "Comparison" "comparison operators and functions" [
-      feature "equal" "the = comparison operator",
-      feature "greaterThan" "the > comparison operator",
-      feature "greaterThanOrEqual" "the >= comparison operator",
-      feature "lessThan" "the < comparison operator",
-      feature "lessThanOrEqual" "the <= comparison operator",
-      feature "notEqual" "the <> comparison operator"],
-
-    FeatureSet "Delete" "delete operations" [
-      feature "delete" "the basic DELETE clause",
-      feature "detachDelete" "the DETACH DELETE clause"],
-
-    FeatureSet "Function" "standard Cypher functions" (libraryToFeatureSet <$> cypherLibraries),
-
-    FeatureSet "List" "list functionality" [
-      feature "listComprehension" "basic list comprehensions",
-      feature "listRange" "list range comprehensions (e.g. [1..10])"],
-
-    FeatureSet "Literal" "various types of literal values" [
-      fixed $ feature "boolean" "boolean literals",
-      feature "double" "double-precision floating-point literals",
-      feature "integer" "integer literals",
-      feature "list" "list literals",
-      feature "map" "map literals",
-      feature "null" "the NULL literal",
-      fixed $ feature "string" "string literals"],
-
-    FeatureSet "Logical" "logical operations" [
-      feature "and" "the AND operator",
-      feature "not" "the NOT operator",
-      feature "or" "the OR operator",
-      feature "xor" "the XOR operator"],
-
-    FeatureSet "Match" "match queries" [
-      feature "match" "the basic (non-optional) MATCH clause",
-      feature "optionalMatch" "OPTIONAL MATCH"],
-
-    FeatureSet "Merge" "merge operations" [
-      feature "merge" "the basic MERGE clause",
-      feature "mergeOnCreate" "MERGE with the ON CREATE action",
-      feature "mergeOnMatch" "MERGE with the ON MATCH action"],
-
-    FeatureSet "NodePattern" "node patterns" [
-      feature "multipleLabels" "specifying multiple labels in a node pattern",
-      feature "parameter" "specifying a parameter as part of a node pattern",
-      feature "propertyMap" "specifying a key/value map of properties in a node pattern",
-      fixed $ feature "variableNode" "binding a variable to a node in a node pattern",
-      feature "wildcardLabel" "omitting labels from a node pattern"],
-
-    FeatureSet "Null" "IS NULL / IS NOT NULL checks" [
-      feature "isNull" "the IS NULL operator",
-      feature "isNotNull" "the IS NOT NULL operator"],
-
-    FeatureSet "Path" "path functions only found in OpenCypher" [
-      function "shortestPath"],
-
-    FeatureSet "ProcedureCall" "procedure calls" [
-      feature "inQueryCall" "CALL within a query",
-      feature "standaloneCall" "standalone / top-level CALL",
-      -- Note: additional features are possible around YIELD
-      feature "yield" "the YIELD clause in CALL"],
-
-    FeatureSet "Projection" "projections" [
-      feature "limit" "the LIMIT clause",
-      feature "orderBy" "the ORDER BY clause",
-      feature "projectDistinct" "the DISTINCT keyword",
-      feature "projectAll" "the * projection",
-      feature "projectAs" "the AS keyword",
-      feature "skip" "the SKIP clause",
-      feature "sortOrder" "the ASC/ASCENDING and DESC/DESCENDING keywords"],
-
-    FeatureSet "Quantifier" "quantifier expressions" [
-      feature "all" "the ALL quantifier",
-      feature "any" "the ANY quantifier",
-      feature "none" "the NONE quantifier",
-      feature "single" "the SINGLE quantifier"],
-
-    FeatureSet "RangeLiteral" "range literals within relationship patterns" [
-      feature "bounds" "range literals with both lower and upper bounds",
-      feature "exactRange" "range literals providing an exact number of repetitions",
-      feature "lowerBound" "range literals with a lower bound (only)",
-      feature "starRange" "the * range literal",
-      feature "upperBound" "range literals with an upper bound (only)"],
-
-    FeatureSet "Reading" "specific syntax related to reading data from the graph." [
-      feature "union" "the UNION operator",
-      feature "unionAll" "the UNION ALL operator",
-      feature "unwind" "the UNWIND clause"],
-
-    FeatureSet "RelationshipDirection" "relationship directions / arrow patterns" [
-      feature "both" "the two-headed arrow (<-[]->) relationship direction",
-      feature "left" "the left arrow (<-[]-) relationship direction",
-      feature "neither" "the headless arrow (-[]-) relationship direction",
-      feature "right" "the right arrow (-[]->) relationship direction"],
-
-    FeatureSet "RelationshipPattern" "relationship patterns" [
-      feature "multipleTypes" "specifying a disjunction of multiple types in a relationship pattern",
-      fixed $ feature "variableRelationship" "binding a variable to a relationship in a relationship pattern",
-      feature "wildcardType" "omitting types from a relationship pattern"],
-
-    FeatureSet "Remove" "REMOVE operations" [
-      feature "byLabel" "REMOVE Variable:NodeLabels",
-      feature "byProperty" "REMOVE PropertyExpression"],
-
-    FeatureSet "Set" "set definitions" [
-      feature "propertyEquals" "defining a set using PropertyExpression = Expression",
-      feature "variableEquals" "defining a set using Variable = Expression",
-      feature "variablePlusEquals" "defining a set using Variable += Expression",
-      feature "variableWithNodeLabels" "defining a set using Variable:NodeLabels"],
-
-    FeatureSet "String" "string functions/keywords only found in OpenCypher" [
-      functionWithKeyword "contains" "CONTAINS",
-      functionWithKeyword "endsWith" "ENDS WITH",
-      functionWithKeyword "in" "IN",
-      functionWithKeyword "startsWith" "STARTS WITH"],
-
-    FeatureSet "Updating" "specific syntax related to updating data in the graph" [
-      feature "create" "the CREATE clause",
-      feature "set" "the SET clause",
-      feature "with" "multi-part queries using WITH"]]
-  where
-    feature name desc = FeatureSet name desc []
-    fixed (FeatureSet name desc children)
-      = FeatureSet name (desc ++ " (note: included by most if not all implementations).") children
-    function name = FeatureSet name (funDesc name Nothing Nothing) []
-    funDesc name mkeyword mdesc = "the " ++ name ++ "() function" ++ keyword ++ desc
-      where
-        keyword = Y.maybe "" (\k -> " / " ++ k) mkeyword
-        desc = Y.maybe "" (\d -> ". " ++ d) mdesc
-    functionWithKeyword name keyword = FeatureSet name (funDesc name (Just keyword) Nothing) []
-    libraryToFeatureSet (CypherLibrary name desc funs) = FeatureSet (capitalize name ++ "Function") desc (toFeature <$> funs)
-      where
-        toFeature (CypherFunction name keyword forms) = FeatureSet name (funDesc name keyword $ Just desc) []
-          where
-            -- Note: signatures are currently not used
-            desc = L.intercalate "; " (cypherFunctionFormDescription <$> forms)
-
--- | An alternative model of (Open)Cypher features, flattened into an enumeration.
--- Usage:
---   writeProtobuf "/tmp/proto" [openCypherFeaturesEnumModule]
-openCypherFeaturesEnumModule :: Module
-openCypherFeaturesEnumModule = Module {
-                                 moduleNamespace = ns2,
-                                 moduleDefinitions = (map toTypeDef definitions),
-                                 moduleTermDependencies = [Core.ns],
-                                 moduleTypeDependencies = [Core.ns],
-                                 moduleDescription = Just ("A model with an enumeration of (Open)Cypher features.")}
-  where
-    ns2 = Namespace "hydra.org/opencypher/features"
-    def = datatype ns2
-    definitions = [
-      def "CypherFeature" $
-        doc "An enumeration of (Open)Cypher features."
-        openCypherFeaturesEnum]
-
-openCypherFeaturesEnum :: Type
-openCypherFeaturesEnum = T.union $ gatherFields True "" openCypherFeatures
-  where
-    gatherFields root prefix (FeatureSet name desc children) = if L.null children
-        then [FieldType (Name selfName) $ doc (capitalize desc) T.unit]
-        else L.concat (gatherFields False selfName <$> children)
-      where
-        --selfName = capitalize name
-        selfName = if root
-          then ""
-          else prefix ++ stripFunctionSuffix (capitalize name)
-    stripFunctionSuffix name = if "Function" `L.isSuffixOf` name && L.length name > flen
-        then removeLastN flen name
-        else name
-      where
-        removeLastN n xs = L.take (L.length xs - n) xs
-        flen = L.length ("Function" :: String)
diff --git a/src/main/haskell/Hydra/Sources/Cypher/Functions.hs b/src/main/haskell/Hydra/Sources/Cypher/Functions.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cypher/Functions.hs
+++ /dev/null
@@ -1,587 +0,0 @@
-module Hydra.Sources.Cypher.Functions where
-
-data CypherFunction = CypherFunction {
-  cypherFunctionName :: String,
-  cypherFunctionKeyword :: Maybe String,
-  cypherFunctionForms :: [CypherFunctionForm]} deriving (Eq, Ord, Show)
-
-data CypherFunctionForm = CypherFunctionForm {
-  cypherFunctionFormSignature :: String,
-  cypherFunctionFormDescription :: String} deriving (Eq, Ord, Show)
-
-data CypherLibrary = CypherLibrary {
-  cypherLibraryName :: String,
-  cypherLibraryDescription :: String,
-  cypherLibraryFunctions :: [CypherFunction]} deriving (Eq, Ord, Show)
-
-cypherLibraries :: [CypherLibrary]
-cypherLibraries = [
-  CypherLibrary "Aggregate" "aggregate functions" [
-    CypherFunction "avg" (Just "AVG") [
-      CypherFunctionForm
-        "avg(input :: DURATION) :: DURATION"
-        "Returns the average of a set of DURATION values.",
-      CypherFunctionForm
-        "avg(input :: FLOAT) :: FLOAT"
-        "Returns the average of a set of FLOAT values.",
-      CypherFunctionForm
-        "avg(input :: INTEGER) :: INTEGER"
-        "Returns the average of a set of INTEGER values."],
-    CypherFunction "collect" (Just "COLLECT") [CypherFunctionForm
-      "collect(input :: ANY) :: LIST<ANY>"
-      "Returns a list containing the values returned by an expression."],
-    CypherFunction "count" (Just "COUNT") [CypherFunctionForm
-      "count(input :: ANY) :: INTEGER"
-      "Returns the number of values or rows."],
-    CypherFunction "max" (Just "MAX") [CypherFunctionForm
-      "max(input :: ANY) :: ANY"
-      "Returns the maximum value in a set of values."],
-    CypherFunction "min" (Just "MIN") [CypherFunctionForm
-      "min(input :: ANY) :: ANY"
-      "Returns the minimum value in a set of values."],
-    CypherFunction "percentileCont" Nothing [CypherFunctionForm
-      "percentileCont(input :: FLOAT, percentile :: FLOAT) :: FLOAT"
-      "Returns the percentile of a value over a group using linear interpolation."],
-    CypherFunction "percentileDisc" Nothing [
-      CypherFunctionForm
-        "percentileDisc(input :: FLOAT, percentile :: FLOAT) :: FLOAT"
-        "Returns the nearest FLOAT value to the given percentile over a group using a rounding method.",
-      CypherFunctionForm
-        "percentileDisc(input :: INTEGER, percentile :: FLOAT) :: INTEGER"
-        "Returns the nearest INTEGER value to the given percentile over a group using a rounding method."],
-    CypherFunction "stdev" Nothing [CypherFunctionForm
-      "stdev(input :: FLOAT) :: FLOAT"
-      "Returns the standard deviation for the given value over a group for a sample of a population."],
-    CypherFunction "stdevp" Nothing [CypherFunctionForm
-      "stdevp(input :: FLOAT) :: FLOAT"
-      "Returns the standard deviation for the given value over a group for an entire population."],
-    CypherFunction "sum" (Just "SUM") [
-      CypherFunctionForm
-        "sum(input :: DURATION) :: DURATION"
-        "Returns the sum of a set of DURATION values.",
-      CypherFunctionForm
-        "sum(input :: FLOAT) :: FLOAT"
-        "Returns the sum of a set of FLOAT values.",
-      CypherFunctionForm
-        "sum(input :: INTEGER) :: INTEGER"
-        "Returns the sum of a set of INTEGER values."]],
-
-  CypherLibrary "Database" "database functions" [
-    CypherFunction "db.nameFromElementId" Nothing [CypherFunctionForm
-      "db.nameFromElementId(name :: STRING) :: STRING"
-      "Resolves the database name from the given element id. Introduced in 5.12."]],
-
-  CypherLibrary "GenAI" "genAI functions" [
-    CypherFunction "genai.vector.encode" Nothing [CypherFunctionForm
-      "genai.vector.encode(resource :: STRING, provider :: STRING, configuration :: MAP = {}) :: LIST<FLOAT>"
-      "Encode a given resource as a vector using the named provider. Introduced in 5.17."]],
-
-  CypherLibrary "Graph" "graph functions" [
-    CypherFunction "graph.byElementId" Nothing [CypherFunctionForm
-      "USE graph.byElementId(elementId :: STRING)"
-      "Resolves the constituent graph to which a given element id belongs. Introduced in 5.13."],
-    CypherFunction "graph.byName" Nothing [CypherFunctionForm
-      "USE graph.byName(name :: STRING)"
-      "Resolves a constituent graph by name."],
-    CypherFunction "graph.names" Nothing [CypherFunctionForm
-      "graph.names() :: LIST<STRING>"
-      "Returns a list containing the names of all graphs in the current composite database."],
-    CypherFunction "graph.propertiesByName" Nothing [CypherFunctionForm
-      "graph.propertiesByName(name :: STRING) :: MAP"
-      "Returns a map containing the properties associated with the given graph."]],
-
-  CypherLibrary "List" "list functions" [
-    CypherFunction "keys" Nothing [
-      CypherFunctionForm
-        "keys(input :: MAP) :: LIST<STRING>"
-        "Returns a LIST<STRING> containing the STRING representations for all the property names of a MAP.",
-      CypherFunctionForm
-        "keys(input :: NODE) :: LIST<STRING>"
-        "Returns a LIST<STRING> containing the STRING representations for all the property names of a NODE.",
-      CypherFunctionForm
-        "keys(input :: RELATIONSHIP) :: LIST<STRING>"
-        "Returns a LIST<STRING> containing the STRING representations for all the property names of a RELATIONSHIP."],
-    CypherFunction "labels" Nothing [CypherFunctionForm
-      "labels(input :: NODE) :: LIST<STRING>"
-      "Returns a LIST<STRING> containing the STRING representations for all the labels of a NODE."],
-    CypherFunction "nodes" Nothing [CypherFunctionForm
-      "nodes(input :: PATH) :: LIST<NODE>"
-      "Returns a LIST<NODE> containing all the NODE values in a PATH."],
-    CypherFunction "range" Nothing [
-      CypherFunctionForm
-        "range(start :: INTEGER, end :: INTEGER) :: LIST<INTEGER>"
-        "Returns a LIST<INTEGER> comprising all INTEGER values within a specified range.",
-      CypherFunctionForm
-        "range(start :: INTEGER, end :: INTEGER, step :: INTEGER) :: LIST<INTEGER>"
-        "Returns a LIST<INTEGER> comprising all INTEGER values within a specified range created with step length."],
-    CypherFunction "reduce" Nothing [CypherFunctionForm
-      "reduce(accumulator :: VARIABLE = initial :: ANY, variable :: VARIABLE IN list :: LIST<ANY> | expression :: ANY) :: ANY"
-      "Runs an expression against individual elements of a LIST<ANY>, storing the result of the expression in an accumulator."],
-    CypherFunction "relationships" Nothing [CypherFunctionForm
-      "relationships(input :: PATH) :: LIST<RELATIONSHIP>"
-      "Returns a LIST<RELATIONSHIP> containing all the RELATIONSHIP values in a PATH."],
-    CypherFunction "reverse" Nothing [CypherFunctionForm
-      "reverse(input :: LIST<ANY>) :: LIST<ANY>"
-      "Returns a LIST<ANY> in which the order of all elements in the given LIST<ANY> have been reversed."],
-    CypherFunction "tail" Nothing [CypherFunctionForm
-      "tail(input :: LIST<ANY>) :: LIST<ANY>"
-      "Returns all but the first element in a LIST<ANY>."],
-    CypherFunction "toBooleanList" Nothing [CypherFunctionForm
-      "toBooleanList(input :: LIST<ANY>) :: LIST<BOOLEAN>"
-      "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."],
-    CypherFunction "toFloatList" Nothing [CypherFunctionForm
-      "toFloatList(input :: LIST<ANY>) :: LIST<FLOAT>"
-      "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."],
-    CypherFunction "toIntegerList" Nothing [CypherFunctionForm
-      "toIntegerList(input :: LIST<ANY>) :: LIST<INTEGER>"
-      "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."],
-    CypherFunction "toStringList" Nothing [CypherFunctionForm
-      "toStringList(input :: LIST<ANY>) :: LIST<STRING>"
-      "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."]],
-
-  CypherLibrary "LoadCSV" "load CSV functions" [
-    CypherFunction "file" Nothing [CypherFunctionForm
-      "file() :: STRING"
-      "Returns the absolute path of the file that LOAD CSV is using."],
-    CypherFunction "linenumber" Nothing [CypherFunctionForm
-      "linenumber() :: INTEGER"
-      "Returns the line number that LOAD CSV is currently using."]],
-
-  CypherLibrary "Logarithmic" "logarithmic functions" [
-    CypherFunction "e" Nothing [CypherFunctionForm
-      "e() :: FLOAT"
-      "Returns the base of the natural logarithm, e."],
-    CypherFunction "exp" Nothing [CypherFunctionForm
-      "exp(input :: FLOAT) :: FLOAT"
-      "Returns e^n, where e is the base of the natural logarithm, and n is the value of the argument expression."],
-    CypherFunction "log" Nothing [CypherFunctionForm
-      "log(input :: FLOAT) :: FLOAT"
-      "Returns the natural logarithm of a FLOAT."],
-    CypherFunction "log10" Nothing [CypherFunctionForm
-      "log10(input :: FLOAT) :: FLOAT"
-      "Returns the common logarithm (base 10) of a FLOAT."],
-    CypherFunction "sqrt" Nothing [CypherFunctionForm
-      "sqrt(input :: FLOAT) :: FLOAT"
-      "Returns the square root of a FLOAT."]],
-
-  CypherLibrary "Numeric" "numeric functions" [
-    CypherFunction "abs" Nothing [
-      CypherFunctionForm
-        "abs(input :: FLOAT) :: FLOAT"
-        "Returns the absolute value of a FLOAT.",
-      CypherFunctionForm
-        "abs(input :: INTEGER) :: INTEGER"
-        "Returns the absolute value of an INTEGER."],
-    CypherFunction "ceil" Nothing [CypherFunctionForm
-      "ceil(input :: FLOAT) :: FLOAT"
-      "Returns the smallest FLOAT that is greater than or equal to a number and equal to an INTEGER."],
-    CypherFunction "floor" Nothing [CypherFunctionForm
-      "floor(input :: FLOAT) :: FLOAT"
-      "Returns the largest FLOAT that is less than or equal to a number and equal to an INTEGER."],
-    CypherFunction "isNaN" Nothing [
-      CypherFunctionForm
-        "isNaN(input :: FLOAT) :: BOOLEAN"
-        "Returns true if the floating point number is NaN.",
-      CypherFunctionForm
-        "isNaN(input :: INTEGER) :: BOOLEAN"
-        "Returns true if the integer number is NaN."],
-    CypherFunction "rand" Nothing [CypherFunctionForm
-      "rand() :: FLOAT"
-      "Returns a random FLOAT in the range from 0 (inclusive) to 1 (exclusive)."],
-    CypherFunction "round" Nothing [
-      CypherFunctionForm
-        "round(input :: FLOAT) :: FLOAT"
-        "Returns the value of a number rounded to the nearest INTEGER.",
-      CypherFunctionForm
-        "round(value :: FLOAT, precision :: INTEGER | FLOAT) :: FLOAT"
-        "Returns the value of a number rounded to the specified precision using rounding mode HALF_UP.",
-      CypherFunctionForm
-        "round(value :: FLOAT, precision :: INTEGER | FLOAT, mode :: STRING) :: FLOAT"
-        "Returns the value of a number rounded to the specified precision with the specified rounding mode."],
-    CypherFunction "sign" Nothing [
-      CypherFunctionForm
-        "sign(input :: FLOAT) :: INTEGER"
-        "Returns the signum of a FLOAT: 0 if the number is 0, -1 for any negative number, and 1 for any positive number.",
-      CypherFunctionForm
-        "sign(input :: INTEGER) :: INTEGER"
-        "Returns the signum of an INTEGER: 0 if the number is 0, -1 for any negative number, and 1 for any positive number."]],
-
-  CypherLibrary "Predicate" "predicate functions" [
-    CypherFunction "all" Nothing [CypherFunctionForm
-      "all(variable :: VARIABLE IN list :: LIST<ANY> WHERE predicate :: ANY) :: BOOLEAN"
-      "Returns true if the predicate holds for all elements in the given LIST<ANY>."],
-    CypherFunction "any" Nothing [CypherFunctionForm
-      "any(variable :: VARIABLE IN list :: LIST<ANY> WHERE predicate :: ANY) :: BOOLEAN"
-      "Returns true if the predicate holds for at least one element in the given LIST<ANY>."],
-    CypherFunction "exists" Nothing [CypherFunctionForm
-      "exists(input :: ANY) :: BOOLEAN"
-      "Returns true if a match for the pattern exists in the graph."],
-    CypherFunction "isEmpty" Nothing [
-      CypherFunctionForm
-        "isEmpty(input :: LIST<ANY>) :: BOOLEAN"
-        "Checks whether a LIST<ANY> is empty.",
-      CypherFunctionForm
-        "isEmpty(input :: MAP) :: BOOLEAN"
-        "Checks whether a MAP is empty.",
-      CypherFunctionForm
-        "isEmpty(input :: STRING) :: BOOLEAN"
-        "Checks whether a STRING is empty."],
-    CypherFunction "none" Nothing [CypherFunctionForm
-      "none(variable :: VARIABLE IN list :: LIST<ANY> WHERE predicate :: ANY) :: BOOLEAN"
-      "Returns true if the predicate holds for no element in the given LIST<ANY>."],
-    CypherFunction "single" Nothing [CypherFunctionForm
-      "single(variable :: VARIABLE IN list :: LIST<ANY> WHERE predicate :: ANY) :: BOOLEAN"
-      "Returns true if the predicate holds for exactly one of the elements in the given LIST<ANY>."]],
-
-  CypherLibrary "Scalar" "scalar functions" [
-    CypherFunction "char_length" Nothing [CypherFunctionForm
-      "char_length(input :: STRING) :: INTEGER"
-      "Returns the number of Unicode characters in a STRING."],
-    CypherFunction "character_length" Nothing [CypherFunctionForm
-      "character_length(input :: STRING) :: INTEGER"
-      "Returns the number of Unicode characters in a STRING."],
-    CypherFunction "coalesce" Nothing [CypherFunctionForm
-      "coalesce(input :: ANY) :: ANY"
-      "Returns the first non-null value in a list of expressions."],
-    CypherFunction "elementId" Nothing [
-      CypherFunctionForm
-        "elementId(input :: NODE) :: STRING"
-        "Returns a node identifier, unique within a specific transaction and DBMS.",
-      CypherFunctionForm
-        "elementId(input :: RELATIONSHIP) :: STRING"
-        "Returns a relationship identifier, unique within a specific transaction and DBMS."],
-    CypherFunction "endNode" Nothing [CypherFunctionForm
-      "elementId(input :: RELATIONSHIP) :: STRING"
-      "Returns a relationship identifier, unique within a specific transaction and DBMS."],
-    CypherFunction "head" Nothing [CypherFunctionForm
-      "head(list :: LIST<ANY>) :: ANY"
-      "Returns the first element in a LIST<ANY>."],
-    CypherFunction "id" Nothing [
-      CypherFunctionForm
-        "id(input :: NODE) :: INTEGER"
-        "[Deprecated] Returns the id of a NODE. Replaced by elementId().",
-      CypherFunctionForm
-        "id(input :: RELATIONSHIP) :: INTEGER"
-        "[Deprecated] Returns the id of a RELATIONSHIP. Replaced by elementId()."],
-    CypherFunction "last" Nothing [CypherFunctionForm
-      "last(list :: LIST<ANY>) :: ANY"
-      "Returns the last element in a LIST<ANY>."],
-    CypherFunction "length" Nothing [CypherFunctionForm
-      "length(input :: PATH) :: INTEGER"
-      "Returns the length of a PATH."],
-    CypherFunction "nullIf" Nothing [CypherFunctionForm
-      "nullIf(v1 :: ANY, v2 :: ANY) :: ANY"
-      "Returns null if the two given parameters are equivalent, otherwise returns the value of the first parameter."],
-    CypherFunction "properties" Nothing [
-      CypherFunctionForm
-        "properties(input :: MAP) :: MAP"
-        "Returns a MAP containing all the properties of a MAP.",
-      CypherFunctionForm
-        "properties(input :: NODE) :: MAP"
-        "Returns a MAP containing all the properties of a NODE.",
-      CypherFunctionForm
-        "properties(input :: RELATIONSHIP) :: MAP"
-        "Returns a MAP containing all the properties of a RELATIONSHIP."],
-    CypherFunction "randomUUID" Nothing [CypherFunctionForm
-      "randomUUID() :: STRING"
-      "Generates a random UUID."],
-    CypherFunction "size" Nothing [
-      CypherFunctionForm
-        "size(input :: LIST<ANY>) :: INTEGER"
-        "Returns the number of items in a LIST<ANY>.",
-      CypherFunctionForm
-        "size(input :: STRING) :: INTEGER"
-        "Returns the number of Unicode characters in a STRING."],
-    CypherFunction "startNode" Nothing [CypherFunctionForm
-      "startNode(input :: RELATIONSHIP) :: NODE"
-      "Returns the start NODE of a RELATIONSHIP."],
-    CypherFunction "toBoolean" Nothing [
-      CypherFunctionForm
-        "toBoolean(input :: STRING) :: BOOLEAN"
-        "Converts a STRING value to a BOOLEAN value.",
-      CypherFunctionForm
-        "toBoolean(input :: BOOLEAN) :: BOOLEAN"
-        "Converts a BOOLEAN value to a BOOLEAN value.",
-      CypherFunctionForm
-        "toBoolean(input :: INTEGER) :: BOOLEAN"
-        "Converts an INTEGER value to a BOOLEAN value."],
-    CypherFunction "toBooleanOrNull" Nothing [CypherFunctionForm
-      "toBooleanOrNull(input :: ANY) :: BOOLEAN"
-      "Converts a value to a BOOLEAN value, or null if the value cannot be converted."],
-    CypherFunction "toFloat" Nothing [
-      CypherFunctionForm
-        "toFloat(input :: INTEGER | FLOAT) :: FLOAT"
-        "Converts an INTEGER value to a FLOAT value.",
-      CypherFunctionForm
-        "toFloat(input :: STRING) :: FLOAT"
-        "Converts a STRING value to a FLOAT value."],
-    CypherFunction "toFloatOrNull" Nothing [CypherFunctionForm
-      "toFloatOrNull(input :: ANY) :: FLOAT"
-      "Converts a value to a FLOAT value, or null if the value cannot be converted."],
-    CypherFunction "toInteger" Nothing [
-      CypherFunctionForm
-        "toInteger(input :: INTEGER | FLOAT) :: INTEGER"
-        "Converts a FLOAT value to an INTEGER value.",
-      CypherFunctionForm
-        "toInteger(input :: BOOLEAN) :: INTEGER"
-        "Converts a BOOLEAN value to an INTEGER value.",
-      CypherFunctionForm
-        "toInteger(input :: STRING) :: INTEGER"
-        "Converts a STRING value to an INTEGER value."],
-    CypherFunction "toIntegerOrNull" Nothing [CypherFunctionForm
-      "toIntegerOrNull(input :: ANY) :: INTEGER"
-      "Converts a value to an INTEGER value, or null if the value cannot be converted."],
-    CypherFunction "type" Nothing [CypherFunctionForm
-      "type(input :: RELATIONSHIP) :: STRING"
-      "Returns a STRING representation of the RELATIONSHIP type."],
-    CypherFunction "valueType" Nothing [CypherFunctionForm
-      "valueType(input :: ANY) :: STRING"
-      "Returns a STRING representation of the most precise value type that the given expression evaluates to."]],
-
-  CypherLibrary "Spatial" "spatial functions" [
-    CypherFunction "point.distance" Nothing [CypherFunctionForm
-      "point.distance(from :: POINT, to :: POINT) :: FLOAT"
-      "Returns a FLOAT representing the geodesic distance between any two points in the same CRS."],
-    CypherFunction "point" Nothing [
-      CypherFunctionForm
-        "point(input :: MAP) :: POINT"
-        "Returns a 2D point object, given two coordinate values in the Cartesian coordinate system.",
-      CypherFunctionForm
-        "point(input :: MAP) :: POINT"
-        "Returns a 3D point object, given three coordinate values in the Cartesian coordinate system.",
-      CypherFunctionForm
-        "point(input :: MAP) :: POINT"
-        "Returns a 2D point object, given two coordinate values in the WGS 84 geographic coordinate system.",
-      CypherFunctionForm
-        "point(input :: MAP) :: POINT"
-        "Returns a 3D point object, given three coordinate values in the WGS 84 geographic coordinate system."],
-    CypherFunction "point.withinBBox" Nothing [CypherFunctionForm
-      "point.withinBBox(point :: POINT, lowerLeft :: POINT, upperRight :: POINT) :: BOOLEAN"
-      "Returns true if the provided point is within the bounding box defined by the two provided points, lowerLeft and upperRight."]],
-
-  CypherLibrary "String" "string functions" [
-    CypherFunction "btrim" Nothing [
-      CypherFunctionForm
-        "btrim(original :: STRING) :: STRING"
-        "Returns the given STRING with leading and trailing whitespace removed.",
-      CypherFunctionForm
-        "btrim(input :: STRING, trimCharacterString :: STRING) :: STRING"
-        "Returns the given STRING with leading and trailing trimCharacterString characters removed. Introduced in 5.20."],
-    CypherFunction "left" Nothing [CypherFunctionForm
-      "left(original :: STRING, length :: INTEGER) :: STRING"
-      "Returns a STRING containing the specified number (INTEGER) of leftmost characters in the given STRING."],
-    CypherFunction "lower" Nothing [CypherFunctionForm
-      "lower(input :: STRING) :: STRING"
-      "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."],
-    CypherFunction "ltrim" Nothing [
-      CypherFunctionForm
-        "ltrim(input :: STRING) :: STRING"
-        "Returns the given STRING with leading whitespace removed.",
-      CypherFunctionForm
-        "ltrim(input :: STRING, trimCharacterString :: STRING) :: STRING"
-        "Returns the given STRING with leading trimCharacterString characters removed. Introduced in 5.20."],
-    CypherFunction "normalize" Nothing [
-      CypherFunctionForm
-        "normalize(input :: STRING) :: STRING"
-        "Returns the given STRING normalized according to the normalization CypherFunctionForm NFC. Introduced in 5.17.",
-      CypherFunctionForm
-        "normalize(input :: STRING, normalForm = NFC :: [NFC, NFD, NFKC, NFKD]) :: STRING"
-        "Returns the given STRING normalized according to the specified normalization CypherFunctionForm. Introduced in 5.17."],
-    CypherFunction "replace" Nothing [CypherFunctionForm
-      "replace(original :: STRING, search :: STRING, replace :: STRING) :: STRING"
-      "Returns a STRING in which all occurrences of a specified search STRING in the given STRING have been replaced by another (specified) replacement STRING."],
-    CypherFunction "reverse" Nothing [CypherFunctionForm
-      "reverse(input :: STRING) :: STRING"
-      "Returns a STRING in which the order of all characters in the given STRING have been reversed."],
-    CypherFunction "right" Nothing [CypherFunctionForm
-      "right(original :: STRING, length :: INTEGER) :: STRING"
-      "Returns a STRING containing the specified number of rightmost characters in the given STRING."],
-    CypherFunction "rtrim" Nothing [
-      CypherFunctionForm
-        "rtrim(input :: STRING) :: STRING"
-        "Returns the given STRING with trailing whitespace removed.",
-      CypherFunctionForm
-        "rtrim(input :: STRING, trimCharacterString :: STRING) :: STRING"
-        "Returns the given STRING with trailing trimCharacterString characters removed. Introduced in 5.20."],
-    CypherFunction "split" Nothing [
-      CypherFunctionForm
-        "split(original :: STRING, splitDelimiter :: STRING) :: LIST<STRING>"
-        "Returns a LIST<STRING> resulting from the splitting of the given STRING around matches of the given delimiter.",
-      CypherFunctionForm
-        "split(original :: STRING, splitDelimiters :: LIST<STRING>) :: LIST<STRING>"
-        "Returns a LIST<STRING> resulting from the splitting of the given STRING around matches of any of the given delimiters."],
-    CypherFunction "substring" Nothing [
-      CypherFunctionForm
-        "substring(original :: STRING, start :: INTEGER) :: STRING"
-        "Returns a substring of the given STRING, beginning with a 0-based index start.",
-      CypherFunctionForm
-        "substring(original :: STRING, start :: INTEGER, length :: INTEGER) :: STRING"
-        "Returns a substring of a given length from the given STRING, beginning with a 0-based index start."],
-    CypherFunction "toLower" Nothing [CypherFunctionForm
-      "toLower(input :: STRING) :: STRING"
-      "Returns the given STRING in lowercase."],
-    CypherFunction "toString" Nothing [CypherFunctionForm
-      "toString(input :: ANY) :: STRING"
-      "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."],
-    CypherFunction "toStringOrNull" Nothing [CypherFunctionForm
-      "toStringOrNull(input :: ANY) :: STRING"
-      "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."],
-    CypherFunction "toUpper" Nothing [CypherFunctionForm
-      "toUpper(input :: STRING) :: STRING"
-      "Returns the given STRING in uppercase."],
-    CypherFunction "trim" Nothing [
-      CypherFunctionForm
-        "trim(input :: STRING) :: STRING"
-        "Returns the given STRING with leading and trailing whitespace removed.",
-      CypherFunctionForm
-        "trim([LEADING | TRAILING | BOTH] [trimCharacterString :: STRING] FROM input :: STRING) :: STRING"
-        "Returns the given STRING with the leading and/or trailing trimCharacterString character removed. Introduced in 5.20."],
-    CypherFunction "upper" Nothing [CypherFunctionForm
-      "upper(input :: STRING) :: STRING"
-      "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."]],
-
-  CypherLibrary "TemporalDuration" "temporal duration functions" [
-    CypherFunction "duration" Nothing [CypherFunctionForm
-      "duration(input :: ANY) :: DURATION"
-      "Constructs a DURATION value."],
-    CypherFunction "duration.between" Nothing [CypherFunctionForm
-      "duration.between(from :: ANY, to :: ANY) :: DURATION"
-      "Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in logical units."],
-    CypherFunction "duration.inDays" Nothing [CypherFunctionForm
-      "duration.inDays(from :: ANY, to :: ANY) :: DURATION"
-      "Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in days."],
-    CypherFunction "duration.inMonths" Nothing [CypherFunctionForm
-      "duration.inMonths(from :: ANY, to :: ANY) :: DURATION"
-      "Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in months."],
-    CypherFunction "duration.inSeconds" Nothing [CypherFunctionForm
-      "duration.inSeconds(from :: ANY, to :: ANY) :: DURATION"
-      "Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in seconds."]],
-
-  CypherLibrary "TemporalInstant" "temporal instant functions" [
-    CypherFunction "date" Nothing [CypherFunctionForm
-      "date(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: DATE"
-      "Creates a DATE instant."],
-    CypherFunction "date.realtime" Nothing [CypherFunctionForm
-      "date.realtime(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: DATE"
-      "Returns the current DATE instant using the realtime clock."],
-    CypherFunction "date.statement" Nothing [CypherFunctionForm
-      "date.statement(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: DATE"
-      "Returns the current DATE instant using the statement clock."],
-    CypherFunction "date.transaction" Nothing [CypherFunctionForm
-      "date.transaction(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: DATE"
-      "Returns the current DATE instant using the transaction clock."],
-    CypherFunction "date.truncate" Nothing [CypherFunctionForm
-      "date.truncate(unit :: STRING, input = DEFAULT_TEMPORAL_ARGUMENT :: ANY, fields = null :: MAP) :: DATE"
-      "Truncates the given temporal value to a DATE instant using the specified unit."],
-    CypherFunction "datetime" Nothing [CypherFunctionForm
-      "datetime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED DATETIME"
-      "Creates a ZONED DATETIME instant."],
-    CypherFunction "datetime.fromepoch" Nothing [CypherFunctionForm
-      "datetime.fromepoch(seconds :: INTEGER | FLOAT, nanoseconds :: INTEGER | FLOAT) :: ZONED DATETIME"
-      "Creates a ZONED DATETIME given the seconds and nanoseconds since the start of the epoch."],
-    CypherFunction "datetime.fromepochmillis" Nothing [CypherFunctionForm
-      "datetime.fromepochmillis(milliseconds :: INTEGER | FLOAT) :: ZONED DATETIME"
-      "Creates a ZONED DATETIME given the milliseconds since the start of the epoch."],
-    CypherFunction "datetime.realtime" Nothing [CypherFunctionForm
-      "datetime.realtime(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED DATETIME"
-      "Returns the current ZONED DATETIME instant using the realtime clock."],
-    CypherFunction "datetime.statement" Nothing [CypherFunctionForm
-      "datetime.statement(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED DATETIME"
-      "Returns the current ZONED DATETIME instant using the statement clock."],
-    CypherFunction "datetime.transaction" Nothing [CypherFunctionForm
-      "datetime.transaction(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED DATETIME"
-      "Returns the current ZONED DATETIME instant using the transaction clock."],
-    CypherFunction "datetime.truncate" Nothing [CypherFunctionForm
-      "datetime.truncate(unit :: STRING, input = DEFAULT_TEMPORAL_ARGUMENT :: ANY, fields = null :: MAP) :: ZONED DATETIME"
-      "Truncates the given temporal value to a ZONED DATETIME instant using the specified unit."],
-    CypherFunction "localdatetime" Nothing [CypherFunctionForm
-      "localdatetime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL DATETIME"
-      "Creates a LOCAL DATETIME instant."],
-    CypherFunction "localdatetime.realtime" Nothing [CypherFunctionForm
-      "localdatetime.realtime(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL DATETIME"
-      "Returns the current LOCAL DATETIME instant using the realtime clock."],
-    CypherFunction "localdatetime.statement" Nothing [CypherFunctionForm
-      "localdatetime.statement(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL DATETIME"
-      "Returns the current LOCAL DATETIME instant using the statement clock."],
-    CypherFunction "localdatetime.transaction" Nothing [CypherFunctionForm
-      "localdatetime.transaction(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL DATETIME"
-      "Returns the current LOCAL DATETIME instant using the transaction clock."],
-    CypherFunction "localdatetime.truncate" Nothing [CypherFunctionForm
-      "localdatetime.truncate(unit :: STRING, input = DEFAULT_TEMPORAL_ARGUMENT :: ANY, fields = null :: MAP) :: LOCAL DATETIME"
-      "Truncates the given temporal value to a LOCAL DATETIME instant using the specified unit."],
-    CypherFunction "localtime" Nothing [CypherFunctionForm
-      "localtime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL TIME"
-      "Creates a LOCAL TIME instant."],
-    CypherFunction "localtime.realtime" Nothing [CypherFunctionForm
-      "localtime.realtime(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL TIME"
-      "Returns the current LOCAL TIME instant using the realtime clock."],
-    CypherFunction "localtime.statement" Nothing [CypherFunctionForm
-      "localtime.statement(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL TIME"
-      "Returns the current LOCAL TIME instant using the statement clock."],
-    CypherFunction "localtime.transaction" Nothing [CypherFunctionForm
-      "localtime.transaction(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: LOCAL TIME"
-      "Returns the current LOCAL TIME instant using the transaction clock."],
-    CypherFunction "localtime.truncate" Nothing [CypherFunctionForm
-      "localtime.truncate(unit :: STRING, input = DEFAULT_TEMPORAL_ARGUMENT :: ANY, fields = null :: MAP) :: LOCAL TIME"
-      "Truncates the given temporal value to a LOCAL TIME instant using the specified unit."],
-    CypherFunction "time" Nothing [CypherFunctionForm
-      "time(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED TIME"
-      "Creates a ZONED TIME instant."],
-    CypherFunction "time.realtime" Nothing [CypherFunctionForm
-      "time.realtime(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED TIME"
-      "Returns the current ZONED TIME instant using the realtime clock."],
-    CypherFunction "time.statement" Nothing [CypherFunctionForm
-      "time.statement(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED TIME"
-      "Returns the current ZONED TIME instant using the statement clock."],
-    CypherFunction "time.transaction" Nothing [CypherFunctionForm
-      "time.transaction(timezone = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED TIME"
-      "Returns the current ZONED TIME instant using the transaction clock."],
-    CypherFunction "time.truncate" Nothing [CypherFunctionForm
-      "time.truncate(unit :: STRING, input = DEFAULT_TEMPORAL_ARGUMENT :: ANY, fields = null :: MAP) :: ZONED TIME"
-      "Truncates the given temporal value to a ZONED TIME instant using the specified unit."]],
-
-  CypherLibrary "Trigonometric" "trigonometric functions" [
-    CypherFunction "acos" Nothing [CypherFunctionForm
-      "acos(input :: FLOAT) :: FLOAT"
-      "Returns the arccosine of a FLOAT in radians."],
-    CypherFunction "asin" Nothing [CypherFunctionForm
-      "asin(input :: FLOAT) :: FLOAT"
-      "Returns the arcsine of a FLOAT in radians."],
-    CypherFunction "atan" Nothing [CypherFunctionForm
-      "atan(input :: FLOAT) :: FLOAT"
-      "Returns the arctangent of a FLOAT in radians."],
-    CypherFunction "atan2" Nothing [CypherFunctionForm
-      "atan2(y :: FLOAT, x :: FLOAT) :: FLOAT"
-      "Returns the arctangent2 of a set of coordinates in radians."],
-    CypherFunction "cos" Nothing [CypherFunctionForm
-      "cos(input :: FLOAT) :: FLOAT"
-      "Returns the cosine of a FLOAT."],
-    CypherFunction "cot" Nothing [CypherFunctionForm
-      "cot(input :: FLOAT) :: FLOAT"
-      "Returns the cotangent of a FLOAT."],
-    CypherFunction "degrees" Nothing [CypherFunctionForm
-      "degrees(input :: FLOAT) :: FLOAT"
-      "Converts radians to degrees."],
-    CypherFunction "haversin" Nothing [CypherFunctionForm
-      "haversin(input :: FLOAT) :: FLOAT"
-      "Returns half the versine of a number."],
-    CypherFunction "pi" Nothing [CypherFunctionForm
-      "pi() :: FLOAT"
-      "Returns the mathematical constant pi."],
-    CypherFunction "radians" Nothing [CypherFunctionForm
-      "radians(input :: FLOAT) :: FLOAT"
-      "Converts degrees to radians."],
-    CypherFunction "sin" Nothing [CypherFunctionForm
-      "sin(input :: FLOAT) :: FLOAT"
-      "Returns the sine of a FLOAT."],
-    CypherFunction "tan" Nothing [CypherFunctionForm
-      "tan(input :: FLOAT) :: FLOAT"
-      "Returns the tangent of a FLOAT."]],
-
-  CypherLibrary "Vector" "vector functions" [
-    CypherFunction "vector.similarity.cosine" Nothing [CypherFunctionForm
-      "vector.similarity.cosine(a :: LIST<INTEGER | FLOAT>, b :: LIST<INTEGER | FLOAT>) :: FLOAT"
-      "Returns a FLOAT representing the similarity between the argument vectors based on their cosine."],
-    CypherFunction "vector.similarity.euclidean" Nothing [CypherFunctionForm
-      "vector.similarity.euclidean(a :: LIST<INTEGER | FLOAT>, b :: LIST<INTEGER | FLOAT>) :: FLOAT"
-      "Returns a FLOAT representing the similarity between the argument vectors based on their Euclidean distance."]]]
diff --git a/src/main/haskell/Hydra/Sources/Cypher/OpenCypher.hs b/src/main/haskell/Hydra/Sources/Cypher/OpenCypher.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Cypher/OpenCypher.hs
+++ /dev/null
@@ -1,1072 +0,0 @@
-module Hydra.Sources.Cypher.OpenCypher where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.cypher.openCypher"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-cypher :: String -> Type
-cypher = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A Cypher model based on the OpenCypher specification (version 23), copyright Neo Technology, available at:\n" ++
-      "  https://opencypher.org/resources/")}
-  where
-    definitions = [
-      query,
-      regularQuery,
-      union_,
-      singleQuery,
-      singlePartQuery,
-      withClause,
-      multiPartQuery,
-      updatingClause,
-      readingClause,
-      match,
-      unwind,
-      merge,
-      matchOrCreate,
-      mergeAction,
-      create,
-      set,
-      setItem,
-      propertyEquals,
-      variableEquals,
-      variablePlusEquals,
-      variableAndNodeLabels,
-      delete,
-      remove,
-      removeItem,
-      inQueryCall,
-      procedureInvocation,
-      starOrYieldItems,
-      standaloneCall,
-      yieldItems,
-      yieldItem,
-      with,
-      return_,
-      projectionBody,
-      projectionItems,
-      projectionItem,
-      order,
-      skip,
-      limit,
-      sortOrder,
-      sortItem,
-      where_,
-      pattern,
-      patternPart,
-      anonymousPatternPart,
-      nodePatternChain,
-      patternElement,
-      relationshipsPattern,
-      nodePattern,
-      patternElementChain,
-      relationshipPattern,
-      relationshipDetail,
-      properties,
-      relationshipTypes,
-      nodeLabels,
-      nodeLabel,
-      rangeLiteral,
-      relTypeName,
-      propertyExpression,
-      expression,
-      orExpression,
-      xorExpression,
-      andExpression,
-      notExpression,
-      comparisonExpression,
-      comparisonOperator,
-      partialComparisonExpression,
-      stringListNullPredicateExpression,
-      stringListNullPredicateRightHandSide,
-      stringPredicateExpression,
-      stringPredicateOperator,
-      listPredicateExpression,
-      nullPredicateExpression,
-      addOrSubtractExpression,
-      addOrSubtractRightHandSide,
-      addOrSubtractOperator,
-      multiplyDivideModuloExpression,
-      multiplyDivideModuloRightHandSide,
-      multiplyDivideModuloOperator,
-      powerOfExpression,
-      unaryAddOrSubtractExpression,
-      listOperatorExpressionOrPropertyLookup,
-      nonArithmeticOperatorExpression,
-      rangeExpression,
-      listOperatorExpression,
-      propertyLookup,
-      atom,
-      caseExpression,
-      caseAlternative,
-      listComprehension,
-      patternComprehension,
-      quantifier,
-      quantifierOperator,
-      filterExpression,
-      patternPredicate,
-      parenthesizedExpression,
-      idInColl,
-      functionInvocation,
-      qualifiedName,
-      patternWhere,
-      existentialSubquery,
-      explicitProcedureInvocation,
-      implicitProcedureInvocation,
-      procedureResultField,
-      variable,
-      literal,
-      numberLiteral,
-      stringLiteral,
-      listLiteral,
-      mapLiteral,
-      keyValuePair,
-      propertyKeyName,
-      parameter]
-
--- Cypher = [SP], Statement, [[SP], ';'], [SP], EOI ;
---
--- Statement = Query ;
---
--- Query = RegularQuery
---       | StandaloneCall
---       ;
-
-query :: Binding
-query = define "Query" $
-  T.union [
-    "regular">: cypher "RegularQuery",
-    "standalone">: cypher "StandaloneCall"]
-
--- RegularQuery = SingleQuery, { [SP], Union } ;
-
-regularQuery :: Binding
-regularQuery = define "RegularQuery" $
-  T.record [
-    "head">: cypher "SingleQuery",
-    "rest">: T.list $ cypher "Union"]
-
--- Union = ((U,N,I,O,N), SP, (A,L,L), [SP], SingleQuery)
---       | ((U,N,I,O,N), [SP], SingleQuery)
---       ;
-
-union_ :: Binding
-union_ = define "Union" $
-  T.record [
-    "all">: T.boolean,
-    "query">: cypher "SingleQuery"]
-
--- SingleQuery = SinglePartQuery
---             | MultiPartQuery
---             ;
-singleQuery :: Binding
-singleQuery = define "SingleQuery" $
-  T.union [
-    "singlePart">: cypher "SinglePartQuery",
-    "multiPart">: cypher "MultiPartQuery"]
-
--- SinglePartQuery = ({ ReadingClause, [SP] }, Return)
---                 | ({ ReadingClause, [SP] }, UpdatingClause, { [SP], UpdatingClause }, [[SP], Return])
---                 ;
-
-singlePartQuery :: Binding
-singlePartQuery = define "SinglePartQuery" $
-  T.record [
-    "reading">: T.list $ cypher "ReadingClause",
-    "updating">: T.list $ cypher "UpdatingClause",
-    "return">: T.maybe $ cypher "Return"]
-
--- MultiPartQuery = { { ReadingClause, [SP] }, { UpdatingClause, [SP] }, With, [SP] }-, SinglePartQuery ;
-
-withClause :: Binding
-withClause = define "WithClause" $
-  T.record [
-    "reading">: T.list $ cypher "ReadingClause",
-    "updating">: T.list $ cypher "UpdatingClause",
-    "with">: cypher "With"]
-
-multiPartQuery :: Binding
-multiPartQuery = define "MultiPartQuery" $
-  T.record [
-    "with">: T.list $ cypher "WithClause",
-    "body">: cypher "SinglePartQuery"]
-
--- UpdatingClause = Create
---                | Merge
---                | Delete
---                | Set
---                | Remove
---                ;
-
-updatingClause :: Binding
-updatingClause = define "UpdatingClause" $
-  T.union [
-    "create">: cypher "Create",
-    "merge">: cypher "Merge",
-    "delete">: cypher "Delete",
-    "set">: cypher "Set",
-    "remove">: cypher "Remove"]
-
--- ReadingClause = Match
---               | Unwind
---               | InQueryCall
---               ;
-
-readingClause :: Binding
-readingClause = define "ReadingClause" $
-  T.union [
-    "match">: cypher "Match",
-    "unwind">: cypher "Unwind",
-    "inQueryCall">: cypher "InQueryCall"]
-
--- Match = [(O,P,T,I,O,N,A,L), SP], (M,A,T,C,H), [SP], Pattern, [[SP], Where] ;
-
-match :: Binding
-match = define "Match" $
-  T.record [
-    "optional">: T.boolean,
-    "pattern">: cypher "Pattern",
-    "where">: T.maybe $ cypher "Where"]
-
--- Unwind = (U,N,W,I,N,D), [SP], Expression, SP, (A,S), SP, Variable ;
-
-unwind :: Binding
-unwind = define "Unwind" $
-  T.record [
-    "expression">: cypher "Expression",
-    "variable">: cypher "Variable"]
-
--- Merge = (M,E,R,G,E), [SP], PatternPart, { SP, MergeAction } ;
-
-merge :: Binding
-merge = define "Merge" $
-  T.record [
-    "patternPart">: cypher "PatternPart",
-    "actions">: T.list $ cypher "MergeAction"]
-
--- MergeAction = ((O,N), SP, (M,A,T,C,H), SP, Set)
---             | ((O,N), SP, (C,R,E,A,T,E), SP, Set)
---             ;
-
-matchOrCreate :: Binding
-matchOrCreate = define "MatchOrCreate" $
-  T.enum ["match", "create"]
-
-mergeAction :: Binding
-mergeAction = define "MergeAction" $
-  T.record [
-    "action">: cypher "MatchOrCreate",
-    "set">: cypher "Set"]
-
--- Create = (C,R,E,A,T,E), [SP], Pattern ;
-
-create :: Binding
-create = define "Create" $
-  T.wrap $ cypher "Pattern"
-
--- Set = (S,E,T), [SP], SetItem, { [SP], ',', [SP], SetItem } ;
-
-set :: Binding
-set = define "Set" $
-  T.wrap $ T.list $ cypher "SetItem"
-
--- SetItem = (PropertyExpression, [SP], '=', [SP], Expression)
---         | (Variable, [SP], '=', [SP], Expression)
---         | (Variable, [SP], '+=', [SP], Expression)
---         | (Variable, [SP], NodeLabels)
---         ;
-
-setItem :: Binding
-setItem = define "SetItem" $
-  T.union [
-    "property">: cypher "PropertyEquals",
-    "variableEqual">: cypher "VariableEquals",
-    "variablePlusEqual">: cypher "VariablePlusEquals",
-    "variableLabels">: cypher "VariableAndNodeLabels"]
-
-propertyEquals :: Binding
-propertyEquals = define "PropertyEquals" $
-  T.record [
-    "lhs">: cypher "PropertyExpression",
-    "rhs">: cypher "Expression"]
-
-variableEquals :: Binding
-variableEquals = define "VariableEquals" $
-  T.record [
-    "lhs">: cypher "Variable",
-    "rhs">: cypher "Expression"]
-
-variablePlusEquals :: Binding
-variablePlusEquals = define "VariablePlusEquals" $
-  T.record [
-    "lhs">: cypher "Variable",
-    "rhs">: cypher "Expression"]
-
-variableAndNodeLabels :: Binding
-variableAndNodeLabels = define "VariableAndNodeLabels" $
-  T.record [
-    "variable">: cypher "Variable",
-    "labels">: cypher "NodeLabels"]
-
--- Delete = [(D,E,T,A,C,H), SP], (D,E,L,E,T,E), [SP], Expression, { [SP], ',', [SP], Expression } ;
-
-delete :: Binding
-delete = define "Delete" $
-  T.record [
-    "detach">: T.boolean,
-    "expressions">: T.list $ cypher "Expression"]
-
--- Remove = (R,E,M,O,V,E), SP, RemoveItem, { [SP], ',', [SP], RemoveItem } ;
-
-remove :: Binding
-remove = define "Remove" $
-  T.wrap $ T.list $ cypher "RemoveItem"
-
--- RemoveItem = (Variable, NodeLabels)
---            | PropertyExpression
---            ;
-
-removeItem :: Binding
-removeItem = define "RemoveItem" $
-  T.union [
-    "variableLabels">: cypher "VariableAndNodeLabels",
-    "property">: cypher "PropertyExpression"]
-
--- InQueryCall = (C,A,L,L), SP, ExplicitProcedureInvocation, [[SP], (Y,I,E,L,D), SP, YieldItems] ;
-
-inQueryCall :: Binding
-inQueryCall = define "InQueryCall" $
-  T.record [
-    "call">: cypher "ExplicitProcedureInvocation",
-    "yieldItems">: T.maybe $ cypher "YieldItems"]
-
--- StandaloneCall = (C,A,L,L), SP, (ExplicitProcedureInvocation | ImplicitProcedureInvocation), [[SP], (Y,I,E,L,D), SP, ('*' | YieldItems)] ;
-
-procedureInvocation :: Binding
-procedureInvocation = define "ProcedureInvocation" $
-  T.union [
-    "explicit">: cypher "ExplicitProcedureInvocation",
-    "implicit">: cypher "ImplicitProcedureInvocation"]
-
-starOrYieldItems :: Binding
-starOrYieldItems = define "StarOrYieldItems" $
-  T.union [
-    "star">: T.unit,
-    "items">: cypher "YieldItems"]
-
-standaloneCall :: Binding
-standaloneCall = define "StandaloneCall" $
-  T.record [
-    "call">: cypher "ProcedureInvocation",
-    "yieldItems">: T.maybe $ cypher "StarOrYieldItems"]
-
--- YieldItems = YieldItem, { [SP], ',', [SP], YieldItem }, [[SP], Where] ;
-
-yieldItems :: Binding
-yieldItems = define "YieldItems" $
-  T.record [
-    "items">: T.list $ cypher "YieldItem",
-    "where">: T.maybe $ cypher "Where"]
-
--- YieldItem = [ProcedureResultField, SP, (A,S), SP], Variable ;
-
-yieldItem :: Binding
-yieldItem = define "YieldItem" $
-  T.record [
-    "field">: T.maybe $ cypher "ProcedureResultField",
-    "variable">: cypher "Variable"]
-
--- With = (W,I,T,H), ProjectionBody, [[SP], Where] ;
-
-with :: Binding
-with = define "With" $
-  T.record [
-    "projection">: cypher "ProjectionBody",
-    "where">: T.maybe $ cypher "Where"]
-
--- Return = (R,E,T,U,R,N), ProjectionBody ;
-
-return_ :: Binding
-return_ = define "Return" $
-  T.wrap $ cypher "ProjectionBody"
-
--- ProjectionBody = [[SP], (D,I,S,T,I,N,C,T)], SP, ProjectionItems, [SP, Order], [SP, Skip], [SP, Limit] ;
-
-projectionBody :: Binding
-projectionBody = define "ProjectionBody" $
-  T.record [
-    "distinct">: T.boolean,
-    "projectionItems">: cypher "ProjectionItems",
-    "order">: T.maybe $ cypher "Order",
-    "skip">: T.maybe $ cypher "Skip",
-    "limit">: T.maybe $ cypher "Limit"]
-
--- ProjectionItems = ('*', { [SP], ',', [SP], ProjectionItem })
---                 | (ProjectionItem, { [SP], ',', [SP], ProjectionItem })
---                 ;
-
-projectionItems :: Binding
-projectionItems = define "ProjectionItems" $
-  T.record [
-    "star">: T.boolean,
-    "explicit">: T.list $ cypher "ProjectionItem"]
-
--- ProjectionItem = (Expression, SP, (A,S), SP, Variable)
---                | Expression
---                ;
-
-projectionItem :: Binding
-projectionItem = define "ProjectionItem" $
-    T.record [
-      "expression">: cypher "Expression",
-      "variable">: T.maybe $ cypher "Variable"]
-
--- Order = (O,R,D,E,R), SP, (B,Y), SP, SortItem, { ',', [SP], SortItem } ;
-
-order :: Binding
-order = define "Order" $
-  T.wrap $ T.list $ cypher "SortItem"
-
--- Skip = (S,K,I,P), SP, Expression ;
-
-skip :: Binding
-skip = define "Skip" $
-  T.wrap $ cypher "Expression"
-
--- Limit = (L,I,M,I,T), SP, Expression ;
-
-limit :: Binding
-limit = define "Limit" $
-  T.wrap $ cypher "Expression"
-
--- SortItem = Expression, [[SP], ((A,S,C,E,N,D,I,N,G) | (A,S,C) | (D,E,S,C,E,N,D,I,N,G) | (D,E,S,C))] ;
-
-sortOrder :: Binding
-sortOrder = define "SortOrder" $
-  T.enum ["ascending", "descending"]
-
-sortItem :: Binding
-sortItem = define "SortItem" $
-  T.record [
-    "expression">: cypher "Expression",
-    "order">: T.maybe $ cypher "SortOrder"]
-
--- Where = (W,H,E,R,E), SP, Expression ;
-
-where_ :: Binding
-where_ = define "Where" $
-  T.wrap $ cypher "Expression"
-
--- Pattern = PatternPart, { [SP], ',', [SP], PatternPart } ;
-
-pattern :: Binding
-pattern = define "Pattern" $
-  T.wrap $ T.list $ cypher "PatternPart"
-
--- PatternPart = (Variable, [SP], '=', [SP], AnonymousPatternPart)
---             | AnonymousPatternPart
---             ;
-
-patternPart :: Binding
-patternPart = define "PatternPart" $
-  T.record [
-    "variable">: T.maybe $ cypher "Variable",
-    "pattern">: cypher "AnonymousPatternPart"]
-
--- AnonymousPatternPart = PatternElement ;
-
-anonymousPatternPart :: Binding
-anonymousPatternPart = define "AnonymousPatternPart" $
-    T.wrap $ cypher "PatternElement"
-
--- PatternElement = (NodePattern, { [SP], PatternElementChain })
---                | ('(', PatternElement, ')')
---                ;
-
-nodePatternChain :: Binding
-nodePatternChain = define "NodePatternChain" $
-  T.record [
-    "nodePattern">: cypher "NodePattern",
-    "chain">: T.list $ cypher "PatternElementChain"]
-
-patternElement :: Binding
-patternElement = define "PatternElement" $
-  T.union [
-    "chained">: cypher "NodePatternChain",
-    "parenthesized">: cypher "PatternElement"]
-
--- RelationshipsPattern = NodePattern, { [SP], PatternElementChain }- ;
-
-relationshipsPattern :: Binding
-relationshipsPattern = define "RelationshipsPattern" $
-  T.record [
-    "nodePattern">: cypher "NodePattern",
-    "chain">: T.list $ cypher "PatternElementChain"]
-
--- NodePattern = '(', [SP], [Variable, [SP]], [NodeLabels, [SP]], [Properties, [SP]], ')' ;
-nodePattern :: Binding
-nodePattern = define "NodePattern" $
-  T.record [
-    "variable">: T.maybe $ cypher "Variable",
-    "labels">: T.maybe $ cypher "NodeLabels",
-    "properties">: T.maybe $ cypher "Properties"]
-
--- PatternElementChain = RelationshipPattern, [SP], NodePattern ;
-
-patternElementChain :: Binding
-patternElementChain = define "PatternElementChain" $
-    T.record [
-      "relationship">: cypher "RelationshipPattern",
-      "node">: cypher "NodePattern"]
-
--- RelationshipPattern = (LeftArrowHead, [SP], Dash, [SP], [RelationshipDetail], [SP], Dash, [SP], RightArrowHead)
---                     | (LeftArrowHead, [SP], Dash, [SP], [RelationshipDetail], [SP], Dash)
---                     | (Dash, [SP], [RelationshipDetail], [SP], Dash, [SP], RightArrowHead)
---                     | (Dash, [SP], [RelationshipDetail], [SP], Dash)
---                     ;
-
-relationshipPattern :: Binding
-relationshipPattern = define "RelationshipPattern" $
-    T.record [
-      "leftArrow">: T.boolean,
-      "detail">: T.maybe $ cypher "RelationshipDetail",
-      "rightArrow">: T.boolean]
-
--- RelationshipDetail = '[', [SP], [Variable, [SP]], [RelationshipTypes, [SP]], [RangeLiteral], [Properties, [SP]], ']' ;
-
-relationshipDetail :: Binding
-relationshipDetail = define "RelationshipDetail" $
-  T.record [
-    "variable">: T.maybe $ cypher "Variable",
-    "types">: T.maybe $ cypher "RelationshipTypes",
-    "range">: T.maybe $ cypher "RangeLiteral",
-    "properties">: T.maybe $ cypher "Properties"]
-
--- Properties = MapLiteral
---            | Parameter
---            ;
-
-properties :: Binding
-properties = define "Properties" $
-  T.union [
-    "map">: cypher "MapLiteral",
-    "parameter">: cypher "Parameter"]
-
--- RelationshipTypes = ':', [SP], RelTypeName, { [SP], '|', [':'], [SP], RelTypeName } ;
-
--- TODO: check whether the slight difference in colon syntax is significant
-relationshipTypes :: Binding
-relationshipTypes = define "RelationshipTypes" $
-  T.wrap $ T.list $ cypher "RelTypeName"
-
--- NodeLabels = NodeLabel, { [SP], NodeLabel } ;
-
-nodeLabels :: Binding
-nodeLabels = define "NodeLabels" $
-  T.wrap $ T.list $ cypher "NodeLabel"
-
--- NodeLabel = ':', [SP], LabelName ;
-
-nodeLabel :: Binding
-nodeLabel = define "NodeLabel" $
-  T.wrap T.string
-
--- RangeLiteral = '*', [SP], [IntegerLiteral, [SP]], ['..', [SP], [IntegerLiteral, [SP]]] ;
-
-rangeLiteral :: Binding
-rangeLiteral = define "RangeLiteral" $
-  T.record [
-    "start">: T.maybe T.bigint,
-    "end">: T.maybe T.bigint]
-
--- LabelName = SchemaName ;
---
--- RelTypeName = SchemaName ;
-
-relTypeName :: Binding
-relTypeName = define "RelTypeName" $
-  T.wrap T.string
-
--- PropertyExpression = Atom, { [SP], PropertyLookup }- ;
-
-propertyExpression :: Binding
-propertyExpression = define "PropertyExpression" $
-  T.record [
-    "atom">: cypher "Atom",
-    "lookups">: T.list $ cypher "PropertyLookup"]
-
--- Expression = OrExpression ;
-
-expression :: Binding
-expression = define "Expression" $
-  T.wrap $ cypher "OrExpression"
-
--- OrExpression = XorExpression, { SP, (O,R), SP, XorExpression } ;
-
-orExpression :: Binding
-orExpression = define "OrExpression" $
-  T.wrap $ T.list $ cypher "XorExpression"
-
--- XorExpression = AndExpression, { SP, (X,O,R), SP, AndExpression } ;
-
-xorExpression :: Binding
-xorExpression = define "XorExpression" $
-  T.wrap $ T.list $ cypher "AndExpression"
-
--- AndExpression = NotExpression, { SP, (A,N,D), SP, NotExpression } ;
-
-andExpression :: Binding
-andExpression = define "AndExpression" $
-  T.wrap $ T.list $ cypher "NotExpression"
-
--- NotExpression = { (N,O,T), [SP] }, ComparisonExpression ;
-
-notExpression :: Binding
-notExpression = define "NotExpression" $
-  T.record [
-    "not">: T.boolean,
-    "expression">: cypher "ComparisonExpression"]
-
--- ComparisonExpression = StringListNullPredicateExpression, { [SP], PartialComparisonExpression } ;
-
-comparisonExpression :: Binding
-comparisonExpression = define "ComparisonExpression" $
-  T.record [
-    "left">: cypher "StringListNullPredicateExpression",
-    "right">: T.list $ cypher "PartialComparisonExpression"]
-
--- PartialComparisonExpression = ('=', [SP], StringListNullPredicateExpression)
---                             | ('<>', [SP], StringListNullPredicateExpression)
---                             | ('<', [SP], StringListNullPredicateExpression)
---                             | ('>', [SP], StringListNullPredicateExpression)
---                             | ('<=', [SP], StringListNullPredicateExpression)
---                             | ('>=', [SP], StringListNullPredicateExpression)
---                             ;
-
-comparisonOperator :: Binding
-comparisonOperator = define "ComparisonOperator" $
-  T.enum [
-    "eq",
-    "neq",
-    "lt",
-    "gt",
-    "lte",
-    "gte"]
-
-partialComparisonExpression :: Binding
-partialComparisonExpression = define "PartialComparisonExpression" $
-  T.record [
-    "operator">: cypher "ComparisonOperator",
-    "right">: cypher "StringListNullPredicateExpression"]
-
--- StringListNullPredicateExpression = AddOrSubtractExpression, { StringPredicateExpression | ListPredicateExpression | NullPredicateExpression } ;
-
-stringListNullPredicateExpression :: Binding
-stringListNullPredicateExpression = define "StringListNullPredicateExpression" $
-  T.record [
-    "left">: cypher "AddOrSubtractExpression",
-    "right">: T.list $ cypher "StringListNullPredicateRightHandSide"]
-
-stringListNullPredicateRightHandSide :: Binding
-stringListNullPredicateRightHandSide = define "StringListNullPredicateRightHandSide" $
-  T.union [
-    "string">: cypher "StringPredicateExpression",
-    "list">: cypher "ListPredicateExpression",
-    "null">: cypher "NullPredicateExpression"]
-
--- StringPredicateExpression = ((SP, (S,T,A,R,T,S), SP, (W,I,T,H)) | (SP, (E,N,D,S), SP, (W,I,T,H)) | (SP, (C,O,N,T,A,I,N,S))), [SP], AddOrSubtractExpression ;
-
-stringPredicateExpression :: Binding
-stringPredicateExpression = define "StringPredicateExpression" $
-  T.record [
-    "operator">: cypher "StringPredicateOperator",
-    "expression">: cypher "AddOrSubtractExpression"]
-
-stringPredicateOperator :: Binding
-stringPredicateOperator = define "StringPredicateOperator" $
-  T.enum [
-    "startsWith",
-    "endsWith",
-    "contains"]
-
--- ListPredicateExpression = SP, (I,N), [SP], AddOrSubtractExpression ;
-
-listPredicateExpression :: Binding
-listPredicateExpression = define "ListPredicateExpression" $
-  T.wrap $ cypher "AddOrSubtractExpression"
-
--- NullPredicateExpression = (SP, (I,S), SP, (N,U,L,L))
---                         | (SP, (I,S), SP, (N,O,T), SP, (N,U,L,L))
---                         ;
-
-nullPredicateExpression :: Binding
-nullPredicateExpression = define "NullPredicateExpression" $
-  T.wrap T.boolean -- true: NULL, false: NOT NULL
-
--- AddOrSubtractExpression = MultiplyDivideModuloExpression, { ([SP], '+', [SP], MultiplyDivideModuloExpression) | ([SP], '-', [SP], MultiplyDivideModuloExpression) } ;
-
-addOrSubtractExpression :: Binding
-addOrSubtractExpression = define "AddOrSubtractExpression" $
-  T.record [
-    "left">: cypher "MultiplyDivideModuloExpression",
-    "right">: T.list $ cypher "AddOrSubtractRightHandSide"]
-
-addOrSubtractRightHandSide :: Binding
-addOrSubtractRightHandSide = define "AddOrSubtractRightHandSide" $
-  T.record [
-    "operator">: cypher "AddOrSubtractOperator",
-    "expression">: cypher "MultiplyDivideModuloExpression"]
-
-addOrSubtractOperator :: Binding
-addOrSubtractOperator = define "AddOrSubtractOperator" $
-  T.enum [
-    "add",
-    "subtract"]
-
--- MultiplyDivideModuloExpression = PowerOfExpression, { ([SP], '*', [SP], PowerOfExpression) | ([SP], '/', [SP], PowerOfExpression) | ([SP], '%', [SP], PowerOfExpression) } ;
-
-multiplyDivideModuloExpression :: Binding
-multiplyDivideModuloExpression = define "MultiplyDivideModuloExpression" $
-  T.record [
-    "left">: cypher "PowerOfExpression",
-    "right">: T.list $ cypher "MultiplyDivideModuloRightHandSide"]
-
-multiplyDivideModuloRightHandSide :: Binding
-multiplyDivideModuloRightHandSide = define "MultiplyDivideModuloRightHandSide" $
-  T.record [
-    "operator">: cypher "MultiplyDivideModuloOperator",
-    "expression">: cypher "PowerOfExpression"]
-
-multiplyDivideModuloOperator :: Binding
-multiplyDivideModuloOperator = define "MultiplyDivideModuloOperator" $
-  T.enum [
-    "multiply",
-    "divide",
-    "modulo"]
-
--- PowerOfExpression = UnaryAddOrSubtractExpression, { [SP], '^', [SP], UnaryAddOrSubtractExpression } ;
-
-powerOfExpression :: Binding
-powerOfExpression = define "PowerOfExpression" $
-  T.wrap $ T.list $ cypher "UnaryAddOrSubtractExpression"
-
--- UnaryAddOrSubtractExpression = NonArithmeticOperatorExpression
---                              | (('+' | '-'), [SP], NonArithmeticOperatorExpression)
---                              ;
-
-unaryAddOrSubtractExpression :: Binding
-unaryAddOrSubtractExpression = define "UnaryAddOrSubtractExpression" $
-  T.record [
-    "operator">: T.maybe $ cypher "AddOrSubtractOperator",
-    "expression">: cypher "NonArithmeticOperatorExpression"]
-
--- NonArithmeticOperatorExpression = Atom, { ([SP], ListOperatorExpression) | ([SP], PropertyLookup) }, [[SP], NodeLabels] ;
-
-listOperatorExpressionOrPropertyLookup :: Binding
-listOperatorExpressionOrPropertyLookup = define "ListOperatorExpressionOrPropertyLookup" $
-  T.union [
-    "list">: cypher "ListOperatorExpression",
-    "property">: cypher "PropertyLookup"]
-
-nonArithmeticOperatorExpression :: Binding
-nonArithmeticOperatorExpression = define "NonArithmeticOperatorExpression" $
-  T.record [
-    "atom">: cypher "Atom",
-    "listsAndLookups">: T.list $ cypher "ListOperatorExpressionOrPropertyLookup",
-    "labels">: T.maybe $ cypher "NodeLabels"]
-
--- ListOperatorExpression = ('[', Expression, ']')
---                        | ('[', [Expression], '..', [Expression], ']')
---                        ;
-
-rangeExpression :: Binding
-rangeExpression = define "RangeExpression" $
-   T.record [
-      "start">: T.maybe $ cypher "Expression",
-      "end">: T.maybe $ cypher "Expression"]
-
-listOperatorExpression :: Binding
-listOperatorExpression = define "ListOperatorExpression" $
-  T.union [
-    "single">: cypher "Expression",
-    "range">: cypher "RangeExpression"]
-
--- PropertyLookup = '.', [SP], (PropertyKeyName) ;
-
-propertyLookup :: Binding
-propertyLookup = define "PropertyLookup" $
-  T.wrap $ cypher "PropertyKeyName"
-
--- Atom = Literal
---      | Parameter
---      | CaseExpression
---      | ((C,O,U,N,T), [SP], '(', [SP], '*', [SP], ')')
---      | ListComprehension
---      | PatternComprehension
---      | Quantifier
---      | PatternPredicate
---      | ParenthesizedExpression
---      | FunctionInvocation
---      | ExistentialSubquery
---      | Variable
---      ;
-
-atom :: Binding
-atom = define "Atom" $
-  T.union [
-    "literal">: cypher "Literal",
-    "parameter">: cypher "Parameter",
-    "case">: cypher "CaseExpression",
-    "countStar">: T.unit,
-    "listComprehension">: cypher "ListComprehension",
-    "patternComprehension">: cypher "PatternComprehension",
-    "quantifier">: cypher "Quantifier",
-    "patternPredicate">: cypher "PatternPredicate",
-    "parenthesized">: cypher "ParenthesizedExpression",
-    "functionInvocation">: cypher "FunctionInvocation",
-    "existentialSubquery">: cypher "ExistentialSubquery",
-    "variable">: cypher "Variable"]
-
--- CaseExpression = (((C,A,S,E), { [SP], CaseAlternative }-) | ((C,A,S,E), [SP], Expression, { [SP], CaseAlternative }-)), [[SP], (E,L,S,E), [SP], Expression], [SP], (E,N,D) ;
-
-caseExpression :: Binding
-caseExpression = define "CaseExpression" $
-  T.record [
-    "expression">: T.maybe $ cypher "Expression",
-    "alternatives">: T.list $ cypher "CaseAlternative",
-    "else">: T.maybe $ cypher "Expression"]
-
--- CaseAlternative = (W,H,E,N), [SP], Expression, [SP], (T,H,E,N), [SP], Expression ;
-
-caseAlternative :: Binding
-caseAlternative = define "CaseAlternative" $
-  T.record [
-    "condition">: cypher "Expression",
-    "result">: cypher "Expression"]
-
--- ListComprehension = '[', [SP], FilterExpression, [[SP], '|', [SP], Expression], [SP], ']' ;
-
-listComprehension :: Binding
-listComprehension = define "ListComprehension" $
-  T.record [
-    "left">: cypher "FilterExpression",
-    "right">: T.maybe $ cypher "Expression"]
-
--- PatternComprehension = '[', [SP], [Variable, [SP], '=', [SP]], RelationshipsPattern, [SP], [Where, [SP]], '|', [SP], Expression, [SP], ']' ;
-
-patternComprehension :: Binding
-patternComprehension = define "PatternComprehension" $
-  T.record [
-    "variable">: T.maybe $ cypher "Variable",
-    "pattern">: cypher "RelationshipsPattern",
-    "where">: T.maybe $ cypher "Where",
-    "right">: cypher "Expression"]
-
--- Quantifier = ((A,L,L), [SP], '(', [SP], FilterExpression, [SP], ')')
---            | ((A,N,Y), [SP], '(', [SP], FilterExpression, [SP], ')')
---            | ((N,O,N,E), [SP], '(', [SP], FilterExpression, [SP], ')')
---            | ((S,I,N,G,L,E), [SP], '(', [SP], FilterExpression, [SP], ')')
---            ;
-
-quantifier :: Binding
-quantifier = define "Quantifier" $
-  T.record [
-    "operator">: cypher "QuantifierOperator",
-    "expression">: cypher "FilterExpression"]
-
-quantifierOperator :: Binding
-quantifierOperator = define "QuantifierOperator" $
-  T.enum [
-    "all",
-    "any",
-    "none",
-    "single"]
-
--- FilterExpression = IdInColl, [[SP], Where] ;
-
-filterExpression :: Binding
-filterExpression = define "FilterExpression" $
-  T.record [
-    "idInColl">: cypher "IdInColl",
-    "where">: T.maybe $ cypher "Where"]
-
--- PatternPredicate = RelationshipsPattern ;
-
-patternPredicate :: Binding
-patternPredicate = define "PatternPredicate" $
-  T.wrap $ cypher "RelationshipsPattern"
-
--- ParenthesizedExpression = '(', [SP], Expression, [SP], ')' ;
-
-parenthesizedExpression :: Binding
-parenthesizedExpression = define "ParenthesizedExpression" $
-  T.wrap $ cypher "Expression"
-
--- IdInColl = Variable, SP, (I,N), SP, Expression ;
-
-idInColl :: Binding
-idInColl = define "IdInColl" $
-  T.record [
-    "variable">: cypher "Variable",
-    "expression">: cypher "Expression"]
-
--- FunctionInvocation = FunctionName, [SP], '(', [SP], [(D,I,S,T,I,N,C,T), [SP]], [Expression, [SP], { ',', [SP], Expression, [SP] }], ')' ;
-
-functionInvocation :: Binding
-functionInvocation = define "FunctionInvocation" $
-  T.record [
-    "name">: cypher "QualifiedName",
-    "distinct">: T.boolean,
-    "arguments">: T.list $ cypher "Expression"]
-
--- FunctionName = Namespace, SymbolicName ;
-
-qualifiedName :: Binding
-qualifiedName = define "QualifiedName" $
-  T.record [
-    "namespace">: T.string,
-    "local">: T.string]
-
--- ExistentialSubquery = (E,X,I,S,T,S), [SP], '{', [SP], (RegularQuery | (Pattern, [[SP], Where])), [SP], '}' ;
-
-patternWhere :: Binding
-patternWhere = define "PatternWhere" $
-  T.record [
-    "pattern">: cypher "Pattern",
-    "where">: T.maybe $ cypher "Where"]
-
-existentialSubquery :: Binding
-existentialSubquery = define "ExistentialSubquery" $
-  T.union [
-    "regular">: cypher "RegularQuery",
-    "pattern">: cypher "PatternWhere"]
-
--- ExplicitProcedureInvocation = ProcedureName, [SP], '(', [SP], [Expression, [SP], { ',', [SP], Expression, [SP] }], ')' ;
-
-explicitProcedureInvocation :: Binding
-explicitProcedureInvocation = define "ExplicitProcedureInvocation" $
-  T.record [
-    "name">: cypher "QualifiedName",
-    "arguments">: T.list $ cypher "Expression"]
-
--- ImplicitProcedureInvocation = ProcedureName ;
-
-implicitProcedureInvocation :: Binding
-implicitProcedureInvocation = define "ImplicitProcedureInvocation" $
-  T.wrap $ cypher "QualifiedName"
-
--- ProcedureResultField = SymbolicName ;
-
-procedureResultField :: Binding
-procedureResultField = define "ProcedureResultField" $
-  T.wrap T.string
-
--- ProcedureName = Namespace, SymbolicName ;
---
--- Namespace = { SymbolicName, '.' } ;
---
--- Variable = SymbolicName ;
-
-variable :: Binding
-variable = define "Variable" $
-  T.wrap T.string
-
--- Literal = BooleanLiteral
---         | (N,U,L,L)
---         | NumberLiteral
---         | StringLiteral
---         | ListLiteral
---         | MapLiteral
---         ;
-
-literal :: Binding
-literal = define "Literal" $
-  T.union [
-    "boolean">: T.boolean,
-    "null">: T.unit,
-    "number">: cypher "NumberLiteral",
-    "string">: cypher "StringLiteral",
-    "list">: cypher "ListLiteral",
-    "map">: cypher "MapLiteral"]
-
--- BooleanLiteral = (T,R,U,E)
---                | (F,A,L,S,E)
---                ;
---
--- NumberLiteral = DoubleLiteral
---               | IntegerLiteral
---               ;
-
-numberLiteral :: Binding
-numberLiteral = define "NumberLiteral" $
-  T.union [
-    "double">: T.float64,
-    "integer">: T.bigint]
-
--- IntegerLiteral = HexInteger
---                | OctalInteger
---                | DecimalInteger
---                ;
---
--- ... (many more lexical productions omitted)
---
--- StringLiteral = ('"', { ANY - ('"' | '\') | EscapedChar }, '"')
---               | ("'", { ANY - ("'" | '\') | EscapedChar }, "'")
---               ;
-
-stringLiteral :: Binding
-stringLiteral = define "StringLiteral" $
-  T.wrap T.string
-
--- ListLiteral = '[', [SP], [Expression, [SP], { ',', [SP], Expression, [SP] }], ']' ;
-
-listLiteral :: Binding
-listLiteral = define "ListLiteral" $
-  T.wrap $ T.list $ cypher "Expression"
-
--- MapLiteral = '{', [SP], [PropertyKeyName, [SP], ':', [SP], Expression, [SP], { ',', [SP], PropertyKeyName, [SP], ':', [SP], Expression, [SP] }], '}' ;
-
-mapLiteral :: Binding
-mapLiteral = define "MapLiteral" $
-  T.wrap $ T.list $ cypher "KeyValuePair"
-
-keyValuePair :: Binding
-keyValuePair = define "KeyValuePair" $
-  T.record [
-    "key">: cypher "PropertyKeyName",
-    "value">: cypher "Expression"]
-
--- PropertyKeyName = SchemaName ;
-
-propertyKeyName :: Binding
-propertyKeyName = define "PropertyKeyName" $
-  T.wrap T.string
-
--- Parameter = '$', (SymbolicName | DecimalInteger) ;
-
-parameter :: Binding
-parameter = define "Parameter" $
-  T.union [
-    "symbolic">: T.string,
-    "integer">: T.bigint]
diff --git a/src/main/haskell/Hydra/Sources/Decode/Ast.hs b/src/main/haskell/Hydra/Sources/Decode/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Ast.hs
+++ /dev/null
@@ -1,2222 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.ast
-
-module Hydra.Sources.Decode.Ast where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.ast"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.ast"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.ast",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.associativity"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "none"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "none"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "left"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "left"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "right"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "right"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "both"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "both"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Associativity"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.blockStyle"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "indent"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "cx"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "raw"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "err"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "stripped"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                          Core.caseStatementCases = [
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "literal"),
-                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "v"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                    Core.caseStatementCases = [
-                                                                      Core.Field {
-                                                                        Core.fieldName = (Core.Name "string"),
-                                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                          Core.lambdaParameter = (Core.Name "s"),
-                                                                          Core.lambdaDomain = Nothing,
-                                                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_indent"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "newlineBeforeContent"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "boolean"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "b"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_newlineBeforeContent"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "newlineAfterContent"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "boolean"),
-                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "b"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_newlineAfterContent"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "indent"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_indent"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "newlineBeforeContent"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_newlineBeforeContent"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "newlineAfterContent"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_newlineAfterContent"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.BlockStyle"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.bracketExpr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "brackets"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.brackets"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_brackets"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "enclosed"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.expr"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_enclosed"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "style"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.blockStyle"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_style"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "brackets"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_brackets"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "enclosed"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_enclosed"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "style"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_style"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.BracketExpr"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.brackets"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "open"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.symbol"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_open"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "close"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.symbol"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_close"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "open"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_open"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "close"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_close"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Brackets"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.expr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "const"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "const"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.ast.symbol")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "indent"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "indent"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.ast.indentedExpression")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "op"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "op"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.ast.opExpr")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "brackets"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "brackets"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.ast.bracketExpr")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "seq"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "seq"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.ast.seqExpr")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Expr"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.indentedExpression"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "style"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.indentStyle"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_style"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expr"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.expr"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_expr"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "style"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_style"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "expr"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_expr"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.IndentedExpression"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.indentStyle"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "allLines"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "allLines"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "subsequentLines"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "subsequentLines"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.IndentStyle"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.op"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "symbol"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.symbol"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_symbol"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "padding"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.padding"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_padding"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "precedence"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.precedence"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_precedence"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "associativity"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.associativity"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_associativity"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                  Core.recordTypeName = (Core.Name "hydra.ast.Op"),
-                                                  Core.recordFields = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "symbol"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_symbol"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "padding"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_padding"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "precedence"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_precedence"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "associativity"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_associativity"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Op"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.opExpr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "op"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.op"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_op"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "lhs"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.expr"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_lhs"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "rhs"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.expr"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_rhs"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "op"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_op"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "lhs"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_lhs"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "rhs"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_rhs"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.OpExpr"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.padding"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "left"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.ws"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_left"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "right"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.ws"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_right"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.ast.Padding"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "left"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_left"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "right"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_right"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Padding"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.precedence"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Precedence"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "integer"),
-                                                                Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "int32"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "i"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Precedence"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.seqExpr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "op"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.op"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_op"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "elements"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.ast.expr"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_elements"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "op"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_op"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "elements"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_elements"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.SeqExpr"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.symbol"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Symbol"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Symbol"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.ast.ws"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "none"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "none"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "space"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "space"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "break"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "break"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "breakAndIndent"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "breakAndIndent"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "doubleBreak"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "doubleBreak"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.ast.Ws"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Classes.hs b/src/main/haskell/Hydra/Sources/Decode/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Classes.hs
+++ /dev/null
@@ -1,188 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.classes
-
-module Hydra.Sources.Decode.Classes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.classes"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.classes"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.classes",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.classes.typeClass"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "equality"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "equality"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "ordering"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "ordering"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.classes.TypeClass"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Coders.hs b/src/main/haskell/Hydra/Sources/Decode/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Coders.hs
+++ /dev/null
@@ -1,471 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.coders
-
-module Hydra.Sources.Decode.Coders where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.coders"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.coders"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.context"),
-        (Packaging.Namespace "hydra.decode.errors"),
-        (Packaging.Namespace "hydra.decode.graph"),
-        (Packaging.Namespace "hydra.decode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.coders",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.coders.coderDirection"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "encode"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "encode"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decode"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "decode"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.coders.CoderDirection"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.coders.languageName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.coders.LanguageName"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.coders.LanguageName"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.coders.traversalOrder"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pre"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pre"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "post"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "post"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.coders.TraversalOrder"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Context.hs b/src/main/haskell/Hydra/Sources/Decode/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Context.hs
+++ /dev/null
@@ -1,346 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.context
-
-module Hydra.Sources.Decode.Context where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.context"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.context"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.context",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.context.context"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "trace"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "cx"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "raw"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "err"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "stripped"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                          Core.caseStatementCases = [
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "literal"),
-                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "v"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                    Core.caseStatementCases = [
-                                                                      Core.Field {
-                                                                        Core.fieldName = (Core.Name "string"),
-                                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                          Core.lambdaParameter = (Core.Name "s"),
-                                                                          Core.lambdaDomain = Nothing,
-                                                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_trace"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "messages"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_messages"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "other"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_other"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.context.Context"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "trace"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_trace"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "messages"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_messages"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "other"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_other"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.context.Context"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.context.inContext"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "e"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "object"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "e"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_object"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "context"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.context.context"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_context"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.context.InContext"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "object"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_object"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "context"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_context"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "e"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "e"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.context.InContext")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "e"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Core.hs b/src/main/haskell/Hydra/Sources/Decode/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Core.hs
+++ /dev/null
@@ -1,5843 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.core
-
-module Hydra.Sources.Decode.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.core"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.core"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.core",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.annotatedTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_body"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "annotation"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_annotation"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "annotation"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_annotation"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.AnnotatedTerm"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.annotatedType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_body"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "annotation"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_annotation"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "annotation"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_annotation"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.AnnotatedType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.application"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "function"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_function"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "argument"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_argument"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.Application"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "function"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_function"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "argument"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_argument"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Application"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.applicationType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "function"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_function"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "argument"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_argument"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "function"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_function"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "argument"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_argument"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.ApplicationType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.binding"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "term"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_term"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeScheme"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.typeScheme"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_typeScheme"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.core.Binding"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "name"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "term"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_term"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "typeScheme"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeScheme"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Binding"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.caseStatement"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_typeName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "default"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_default"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cases"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.field"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_cases"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "typeName"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "default"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_default"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "cases"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_cases"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.CaseStatement"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.eitherType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "left"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_left"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "right"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_right"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.EitherType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "left"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_left"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "right"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_right"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.EitherType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.pairType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "first"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_first"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "second"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_second"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.PairType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "first"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_first"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "second"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_second"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.PairType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.field"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "term"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_term"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "term"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_term"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Field"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.fieldType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_type"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.FieldType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "type"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.FieldType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.floatType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigfloat"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "bigfloat"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float32"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float32"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float64"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float64"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.FloatType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.floatValue"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigfloat"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "bigfloat"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected bigfloat literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "float"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected bigfloat value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "bigfloat"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "f"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float32"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float32"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected float32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "float"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected float32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "float32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "f"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float64"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float64"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected float64 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "float"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected float64 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "float64"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "f"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.FloatValue"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.forallType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "parameter"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_parameter"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_body"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.ForallType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "parameter"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_parameter"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.ForallType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.functionType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "domain"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_domain"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "codomain"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_codomain"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "domain"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_domain"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "codomain"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_codomain"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.FunctionType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.injection"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_typeName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "field"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.field"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_field"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "field"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_field"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Injection"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.integerType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigint"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "bigint"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int8"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int8"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int16"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int16"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int32"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int32"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int64"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int64"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint8"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint8"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint16"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint16"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint32"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint32"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint64"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint64"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.IntegerType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.integerValue"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigint"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "bigint"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected bigint literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected bigint value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "bigint"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int8"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int8"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int8 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int8 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int8"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int16"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int16"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int16 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int16 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int16"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int32"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int32"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int64"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "int64"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int64 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int64 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int64"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint8"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint8"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint8 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint8 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "uint8"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint16"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint16"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint16 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint16 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "uint16"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint32"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint32"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "uint32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint64"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "uint64"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint64 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected uint64 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "uint64"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.IntegerValue"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.lambda"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "parameter"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_parameter"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "domain"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_domain"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_body"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.core.Lambda"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "parameter"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_parameter"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "domain"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_domain"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "body"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Lambda"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.let"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bindings"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.binding"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_bindings"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_body"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.Let"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "bindings"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_bindings"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Let"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.literal"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binary"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "binary"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected binary literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "binary"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "b"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "boolean"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "boolean"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "b"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decimal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "decimal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected decimal literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "decimal"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "d"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "d"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.floatValue")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "integer"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "integer"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.integerValue")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Literal"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.literalType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binary"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "binary"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "boolean"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decimal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "decimal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.floatType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "integer"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "integer"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.integerType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.LiteralType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.mapType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "keys"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_keys"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "values"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_values"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.MapType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "keys"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_keys"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "values"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_values"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.MapType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.name"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Name"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.projection"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_typeName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "field"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_field"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.Projection"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "field"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_field"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Projection"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.record"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_typeName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "fields"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.field"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_fields"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "fields"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_fields"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Record"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.term"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "annotated"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.annotatedTerm")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "application"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.application")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cases"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "cases"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.caseStatement")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "either"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeEither")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inject"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "inject"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.injection")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.lambda")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "let"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "let"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.let")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "list"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.literal")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "map"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "maybe"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pair"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodePair")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "project"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "project"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.projection")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "record"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.record")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "set"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeSet")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeApplication"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeApplication"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.typeApplicationTerm")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeLambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeLambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.typeLambda")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unit"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unwrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unwrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "variable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.wrappedTerm")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.type"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "annotated"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.annotatedType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "application"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.applicationType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "either"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.eitherType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "forall"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "forall"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.forallType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "function"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "function"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.functionType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "list"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.type")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.literalType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "map"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.mapType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "maybe"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.type")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pair"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.pairType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "record"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.fieldType"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "set"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.type")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "union"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "union"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.fieldType"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unit"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "variable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "void"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "void"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Type"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.type")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Type"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.typeApplicationTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_body"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_type"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "type"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.TypeApplicationTerm"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.typeLambda"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "parameter"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_parameter"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_body"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "parameter"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_parameter"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.TypeLambda"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.typeScheme"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "variables"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_variables"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_body"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "constraints"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.typeVariableMetadata"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_constraints"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "variables"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_variables"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "body"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "constraints"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_constraints"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.typeVariableMetadata"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "classes"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeSet")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_classes"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "classes"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_classes"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.TypeVariableMetadata"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.core.wrappedTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_typeName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_body"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "body"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.WrappedTerm"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Error/Checking.hs b/src/main/haskell/Hydra/Sources/Decode/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Error/Checking.hs
+++ /dev/null
@@ -1,1768 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.error.checking
-
-module Hydra.Sources.Decode.Error.Checking where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.error.checking"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.error.checking"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.paths"),
-        (Packaging.Namespace "hydra.decode.typing"),
-        (Packaging.Namespace "hydra.decode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.error.checking",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.checkingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "incorrectUnification"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "incorrectUnification"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.incorrectUnificationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notAForallType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "notAForallType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.notAForallTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notAFunctionType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "notAFunctionType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.notAFunctionTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "other"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.otherCheckingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeArityMismatch"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeArityMismatch"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.typeArityMismatchError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeMismatch"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeMismatch"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.typeMismatchError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unboundTypeVariables"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unboundTypeVariables"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.unboundTypeVariablesError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTermVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTermVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.undefinedTermVariableCheckingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unequalTypes"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unequalTypes"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.unequalTypesError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupportedTermVariant"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unsupportedTermVariant"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.unsupportedTermVariantError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedLambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "untypedLambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.untypedLambdaError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedLetBinding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "untypedLetBinding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.untypedLetBindingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedTermVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "untypedTermVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.untypedTermVariableCheckingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.CheckingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.incorrectUnificationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "substitution"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.typing.typeSubst"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_substitution"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "substitution"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_substitution"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.IncorrectUnificationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.notAForallTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_type"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeArguments"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_typeArguments"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "type"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeArguments"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeArguments"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.NotAForallTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.notAFunctionTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_type"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "type"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.NotAFunctionTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.otherCheckingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_path"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "message"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_message"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "path"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "message"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_message"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.OtherCheckingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.typeArityMismatchError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_type"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expectedArity"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "integer"),
-                                                                          Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "int32"),
-                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "i"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_expectedArity"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "actualArity"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "integer"),
-                                                                              Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                                Core.caseStatementCases = [
-                                                                                  Core.Field {
-                                                                                    Core.fieldName = (Core.Name "int32"),
-                                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                      Core.lambdaParameter = (Core.Name "i"),
-                                                                                      Core.lambdaDomain = Nothing,
-                                                                                      Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_actualArity"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeArguments"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_typeArguments"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                  Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-                                                  Core.recordFields = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "type"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "expectedArity"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_expectedArity"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "actualArity"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_actualArity"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "typeArguments"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeArguments"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.TypeArityMismatchError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.typeMismatchError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expectedType"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_expectedType"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "actualType"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_actualType"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "expectedType"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_expectedType"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "actualType"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_actualType"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.TypeMismatchError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.unboundTypeVariablesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "variables"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeSet")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_variables"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_type"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "variables"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_variables"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "type"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UnboundTypeVariablesError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.undefinedTermVariableCheckingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_path"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "path"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.unequalTypesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "types"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_types"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "description"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_description"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "types"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_types"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "description"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_description"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UnequalTypesError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.unsupportedTermVariantError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "termVariant"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.variants.termVariant"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_termVariant"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "termVariant"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_termVariant"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UnsupportedTermVariantError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.untypedLambdaError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                  Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLambdaError"),
-                                  Core.recordFields = []}))))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UntypedLambdaError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.untypedLetBindingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "binding"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.binding"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_binding"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "binding"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_binding"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UntypedLetBindingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.checking.untypedTermVariableCheckingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_path"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "path"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Error/Core.hs b/src/main/haskell/Hydra/Sources/Decode/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Error/Core.hs
+++ /dev/null
@@ -1,4522 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.error.core
-
-module Hydra.Sources.Decode.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.error.core"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.error.core"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.paths"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.error.core",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.duplicateBindingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateBindingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.duplicateFieldError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateFieldError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.undefinedFieldError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "fieldName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_fieldName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_typeName"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "fieldName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_fieldName"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedFieldError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.unexpectedTermVariantError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expectedVariant"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.variants.termVariant"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_expectedVariant"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "actualTerm"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_actualTerm"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "expectedVariant"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_expectedVariant"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "actualTerm"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_actualTerm"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UnexpectedTermVariantError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.unexpectedTypeVariantError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expectedVariant"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.variants.typeVariant"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_expectedVariant"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "actualType"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_actualType"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "expectedVariant"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_expectedVariant"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "actualType"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_actualType"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UnexpectedTypeVariantError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.constantConditionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "value"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "boolean"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "b"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_value"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "value"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_value"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.ConstantConditionError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyCaseStatementError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_typeName"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyCaseStatementError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyLetBindingsError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyLetBindingsError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyTermAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyTermAnnotationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyTypeNameInTermError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyTypeNameInTermError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidLambdaParameterNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidLetBindingNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidLetBindingNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidTypeLambdaParameterNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.nestedTermAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.NestedTermAnnotationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.redundantWrapUnwrapError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_typeName"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.RedundantWrapUnwrapError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.selfApplicationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.SelfApplicationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.termVariableShadowingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.TermVariableShadowingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.typeVariableShadowingInTypeLambdaError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.undefinedTermVariableError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTermVariableError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.undefinedTypeVariableInBindingTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.undefinedTypeVariableInLambdaDomainError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.undefinedTypeVariableInTypeApplicationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.unknownPrimitiveNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UnknownPrimitiveNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.unnecessaryIdentityApplicationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.untypedTermVariableError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UntypedTermVariableError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidTermError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "constantCondition"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "constantCondition"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.constantConditionError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateBinding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateBinding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.duplicateBindingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.duplicateFieldError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyCaseStatement"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyCaseStatement"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyCaseStatementError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyLetBindings"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyLetBindings"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyLetBindingsError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyTermAnnotation"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyTermAnnotation"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyTermAnnotationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyTypeNameInTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyTypeNameInTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyTypeNameInTermError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidLambdaParameterName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "invalidLambdaParameterName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.invalidLambdaParameterNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidLetBindingName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "invalidLetBindingName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.invalidLetBindingNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidTypeLambdaParameterName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "invalidTypeLambdaParameterName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.invalidTypeLambdaParameterNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nestedTermAnnotation"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "nestedTermAnnotation"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.nestedTermAnnotationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "redundantWrapUnwrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "redundantWrapUnwrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.redundantWrapUnwrapError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "selfApplication"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "selfApplication"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.selfApplicationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "termVariableShadowing"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "termVariableShadowing"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.termVariableShadowingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeVariableShadowingInTypeLambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeVariableShadowingInTypeLambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.typeVariableShadowingInTypeLambdaError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTermVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTermVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedTermVariableError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariableInBindingType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTypeVariableInBindingType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedTypeVariableInBindingTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariableInLambdaDomain"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTypeVariableInLambdaDomain"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedTypeVariableInLambdaDomainError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariableInTypeApplication"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTypeVariableInTypeApplication"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedTypeVariableInTypeApplicationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unknownPrimitiveName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unknownPrimitiveName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.unknownPrimitiveNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unnecessaryIdentityApplication"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unnecessaryIdentityApplication"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.unnecessaryIdentityApplicationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedTermVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "untypedTermVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.untypedTermVariableError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTermError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.duplicateRecordTypeFieldNamesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.duplicateUnionTypeFieldNamesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyRecordTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyRecordTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyTypeAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyTypeAnnotationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.emptyUnionTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyUnionTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidForallParameterNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidForallParameterNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidTypeSchemeVariableNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.nestedTypeAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.NestedTypeAnnotationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.nonComparableMapKeyTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "keyType"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_keyType"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "keyType"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_keyType"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.nonComparableSetElementTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "elementType"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_elementType"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "elementType"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_elementType"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.NonComparableSetElementTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.singleVariantUnionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "fieldName"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_fieldName"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "fieldName"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_fieldName"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.SingleVariantUnionError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.typeVariableShadowingInForallError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.undefinedTypeVariableError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "location"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.voidInNonBottomPositionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "location"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_location"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "location"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_location"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.VoidInNonBottomPositionError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.core.invalidTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateRecordTypeFieldNames"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateRecordTypeFieldNames"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.duplicateRecordTypeFieldNamesError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateUnionTypeFieldNames"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateUnionTypeFieldNames"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.duplicateUnionTypeFieldNamesError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyRecordType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyRecordType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyRecordTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyTypeAnnotation"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyTypeAnnotation"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyTypeAnnotationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyUnionType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyUnionType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.emptyUnionTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidForallParameterName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "invalidForallParameterName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.invalidForallParameterNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidTypeSchemeVariableName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "invalidTypeSchemeVariableName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.invalidTypeSchemeVariableNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nestedTypeAnnotation"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "nestedTypeAnnotation"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.nestedTypeAnnotationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nonComparableMapKeyType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "nonComparableMapKeyType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.nonComparableMapKeyTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nonComparableSetElementType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "nonComparableSetElementType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.nonComparableSetElementTypeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "singleVariantUnion"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "singleVariantUnion"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.singleVariantUnionError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeVariableShadowingInForall"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeVariableShadowingInForall"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.typeVariableShadowingInForallError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTypeVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedTypeVariableError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "voidInNonBottomPosition"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "voidInNonBottomPosition"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.voidInNonBottomPositionError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTypeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Error/Packaging.hs b/src/main/haskell/Hydra/Sources/Decode/Error/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Error/Packaging.hs
+++ /dev/null
@@ -1,845 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.error.packaging
-
-module Hydra.Sources.Decode.Error.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.error.packaging"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.error.packaging"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.packaging")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.error.packaging",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.conflictingModuleNamespaceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "first"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_first"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "second"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_second"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "first"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_first"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "second"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_second"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.conflictingVariantNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "namespace"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_namespace"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeName"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_typeName"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "variantName"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_variantName"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "conflictingName"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_conflictingName"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                  Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-                                                  Core.recordFields = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "namespace"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_namespace"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "typeName"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeName"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "variantName"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_variantName"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "conflictingName"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_conflictingName"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.ConflictingVariantNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.definitionNotInModuleNamespaceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "namespace"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_namespace"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "namespace"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_namespace"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.duplicateDefinitionNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "namespace"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_namespace"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_name"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "namespace"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_namespace"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.duplicateModuleNamespaceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "namespace"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_namespace"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "namespace"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_namespace"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.invalidModuleError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conflictingVariantName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "conflictingVariantName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.packaging.conflictingVariantNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "definitionNotInModuleNamespace"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "definitionNotInModuleNamespace"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.packaging.definitionNotInModuleNamespaceError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateDefinitionName"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateDefinitionName"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.packaging.duplicateDefinitionNameError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.InvalidModuleError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.error.packaging.invalidPackageError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conflictingModuleNamespace"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "conflictingModuleNamespace"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.packaging.conflictingModuleNamespaceError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateModuleNamespace"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateModuleNamespace"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.packaging.duplicateModuleNamespaceError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidModule"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "invalidModule"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.packaging.invalidModuleError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.error.packaging.InvalidPackageError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Errors.hs b/src/main/haskell/Hydra/Sources/Decode/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Errors.hs
+++ /dev/null
@@ -1,2404 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.errors
-
-module Hydra.Sources.Decode.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.errors"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.errors"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.context"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.error.checking"),
-        (Packaging.Namespace "hydra.decode.error.core"),
-        (Packaging.Namespace "hydra.decode.paths"),
-        (Packaging.Namespace "hydra.decode.typing"),
-        (Packaging.Namespace "hydra.decode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.errors",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.decodingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.emptyListError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "t"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = Core.TypeUnit}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.error"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "checking"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "checking"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.checkingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decoding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "decoding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.decodingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateBinding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateBinding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.duplicateBindingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "duplicateField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.duplicateFieldError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "extraction"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "extraction"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.extractionError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inference"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "inference"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.inferenceError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "other"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.otherError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "resolution"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "resolution"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.resolutionError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedFieldError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTermVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undefinedTermVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.undefinedTermVariableError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedTermVariable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "untypedTermVariable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.untypedTermVariableError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedTermVariant"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unexpectedTermVariant"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.unexpectedTermVariantError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedTypeVariant"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unexpectedTypeVariant"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.core.unexpectedTypeVariantError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unification"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.Error"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unification"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.unificationError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.Error"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.extractionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyList"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "emptyList"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.emptyListError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "multipleBindings"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "multipleBindings"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.multipleBindingsError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "multipleFields"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "multipleFields"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.multipleFieldsError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noMatchingField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "noMatchingField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.noMatchingFieldError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noSuchBinding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "noSuchBinding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.noSuchBindingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notEnoughCases"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "notEnoughCases"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.notEnoughCasesError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedShape"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ExtractionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unexpectedShape"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.unexpectedShapeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.ExtractionError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.inferenceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "checking"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "checking"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.error.checking.checkingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "other"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.otherInferenceError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unification"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.InferenceError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unification"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.unificationInferenceError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.InferenceError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.multipleBindingsError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.errors.MultipleBindingsError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "name"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.MultipleBindingsError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.multipleFieldsError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "fieldName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_fieldName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.errors.MultipleFieldsError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "fieldName"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_fieldName"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.MultipleFieldsError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.noMatchingFieldError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "fieldName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_fieldName"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.errors.NoMatchingFieldError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "fieldName"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_fieldName"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.NoMatchingFieldError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.noSuchBindingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchBindingError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "name"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchBindingError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.noSuchPrimitiveError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                      Core.recordTypeName = (Core.Name "hydra.errors.NoSuchPrimitiveError"),
-                                      Core.recordFields = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "name"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))}]}))))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchPrimitiveError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.notEnoughCasesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "t"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = Core.TypeUnit}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.otherError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherError"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.OtherError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.otherInferenceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_path"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "message"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_message"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "path"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "message"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_message"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.OtherInferenceError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.otherResolutionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherResolutionError"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.OtherResolutionError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.resolutionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noSuchBinding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "noSuchBinding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.noSuchBindingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noSuchPrimitive"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "noSuchPrimitive"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.noSuchPrimitiveError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noMatchingField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "noMatchingField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.noMatchingFieldError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "other"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.otherResolutionError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedShape"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.errors.ResolutionError"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unexpectedShape"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.errors.unexpectedShapeError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.ResolutionError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.unexpectedShapeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expected"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "string"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_expected"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "actual"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_actual"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "expected"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_expected"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "actual"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_actual"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.UnexpectedShapeError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.unificationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "leftType"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_leftType"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "rightType"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_rightType"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "message"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "string"),
-                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_message"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "leftType"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_leftType"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "rightType"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_rightType"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "message"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_message"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.UnificationError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.errors.unificationInferenceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_path"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cause"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.errors.unificationError"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_cause"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "path"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "cause"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_cause"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.errors.UnificationInferenceError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Json/Model.hs b/src/main/haskell/Hydra/Sources/Decode/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Json/Model.hs
+++ /dev/null
@@ -1,460 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.json.model
-
-module Hydra.Sources.Decode.Json.Model where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.json.model"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.json.model"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.json.model",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.json.model.value"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "array"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "array"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.json.model.value"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "boolean"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "boolean"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "b"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "null"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "null"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "number"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "number"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected decimal literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "decimal"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "d"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "d"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "object"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "object"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "cx"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "raw"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "err"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "literal"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "string"),
-                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.json.model.value"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.json.model.Value"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Packaging.hs b/src/main/haskell/Hydra/Sources/Decode/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Packaging.hs
+++ /dev/null
@@ -1,1364 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.packaging
-
-module Hydra.Sources.Decode.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.packaging"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.packaging"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.graph")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.packaging",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.definition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.packaging.Definition"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "term"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.packaging.termDefinition")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.packaging.Definition"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "type"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.packaging.typeDefinition")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.Definition"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.fileExtension"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.FileExtension"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.FileExtension"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.module"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "description"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "cx"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "raw"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "err"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "stripped"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                          Core.caseStatementCases = [
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "literal"),
-                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "v"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                    Core.caseStatementCases = [
-                                                                      Core.Field {
-                                                                        Core.fieldName = (Core.Name "string"),
-                                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                          Core.lambdaParameter = (Core.Name "s"),
-                                                                          Core.lambdaDomain = Nothing,
-                                                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_description"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "namespace"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_namespace"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "termDependencies"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_termDependencies"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeDependencies"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_typeDependencies"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "definitions"))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.definition"))}))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "field_definitions"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                      Core.recordTypeName = (Core.Name "hydra.packaging.Module"),
-                                                      Core.recordFields = [
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "description"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_description"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "namespace"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_namespace"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "termDependencies"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_termDependencies"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "typeDependencies"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeDependencies"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "definitions"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_definitions"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.Module"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.namespace"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.Namespace"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.Namespace"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.namespaces"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "n"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "focus"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodePair")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "n"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_focus"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "mapping"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "n"))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_mapping"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.packaging.Namespaces"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "focus"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_focus"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "mapping"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_mapping"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "n"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "n"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.packaging.Namespaces")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "n"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.package"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.packageName"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "modules"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.module"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_modules"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "dependencies"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.packageName"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_dependencies"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "description"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "cx"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "raw"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "err"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "stripped"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "literal"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "v"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                Core.caseStatementCases = [
-                                                                                  Core.Field {
-                                                                                    Core.fieldName = (Core.Name "string"),
-                                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                      Core.lambdaParameter = (Core.Name "s"),
-                                                                                      Core.lambdaDomain = Nothing,
-                                                                                      Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_description"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                  Core.recordTypeName = (Core.Name "hydra.packaging.Package"),
-                                                  Core.recordFields = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "name"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "modules"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_modules"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "dependencies"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_dependencies"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "description"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_description"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.Package"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.packageName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.PackageName"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.PackageName"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.qualifiedName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "namespace"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.packaging.namespace"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_namespace"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "local"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_local"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "namespace"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_namespace"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "local"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_local"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.QualifiedName"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.termDefinition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "term"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_term"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeScheme"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.typeScheme"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_typeScheme"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "name"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "term"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_term"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "typeScheme"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeScheme"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.TermDefinition"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.packaging.typeDefinition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeScheme"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.typeScheme"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_typeScheme"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "typeScheme"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeScheme"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.packaging.TypeDefinition"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Parsing.hs b/src/main/haskell/Hydra/Sources/Decode/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Parsing.hs
+++ /dev/null
@@ -1,530 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.parsing
-
-module Hydra.Sources.Decode.Parsing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.parsing"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.parsing"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.parsing",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.parsing.parseError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "message"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "string"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_message"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "remainder"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_remainder"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "message"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_message"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "remainder"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_remainder"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.parsing.ParseError"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.parsing.parseResult"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "inject"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "inj"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "field"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                          Core.projectionField = (Core.Name "field")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fname"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.projectionField = (Core.Name "name")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fterm"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.projectionField = (Core.Name "term")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "variantMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                        Core.applicationArgument = (Core.TermList [
-                                          Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "success"))}), (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "input"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "t"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "success"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.parsing.parseSuccess")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                          (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "failure"))}), (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "input"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "t"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "failure"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.parsing.parseError")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                        Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                          Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                            Core.applicationArgument = (Core.TermList [
-                                              Core.TermLiteral (Core.LiteralString "no such field "),
-                                              (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                              (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "f"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.parsing.ParseResult")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.parsing.parseSuccess"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "value"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_value"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "remainder"))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_remainder"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "value"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_value"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "remainder"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_remainder"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.parsing.ParseSuccess")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Paths.hs b/src/main/haskell/Hydra/Sources/Decode/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Paths.hs
+++ /dev/null
@@ -1,2558 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.paths
-
-module Hydra.Sources.Decode.Paths where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.paths"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.paths"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.paths",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtermEdge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "source"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermNode"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_source"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermPath"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_path"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "target"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermNode"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_target"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "source"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_source"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "path"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "target"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_target"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtermEdge"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtermGraph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "nodes"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermNode"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_nodes"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edges"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermEdge"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_edges"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "nodes"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_nodes"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "edges"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_edges"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtermGraph"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtermNode"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_label"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "string"),
-                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_id"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "name"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "label"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "id"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtermNode"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtermPath"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtermPath"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtermStep"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtermPath"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtermStep"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotatedBody"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "annotatedBody"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationFunction"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "applicationFunction"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationArgument"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "applicationArgument"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambdaBody"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lambdaBody"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unionCasesDefault"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unionCasesDefault"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unionCasesBranch"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unionCasesBranch"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "letBody"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "letBody"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "letBinding"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "letBinding"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "listElement"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "listElement"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapKey"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "mapKey"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapValue"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "mapValue"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybeTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "maybeTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "productTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "productTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "recordField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "recordField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "setElement"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "setElement"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "sumTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "sumTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeLambdaBody"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeLambdaBody"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeApplicationTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeApplicationTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "injectionTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "injectionTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrappedTerm"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrappedTerm"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtermStep"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtypeEdge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "source"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtypeNode"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_source"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtypePath"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_path"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "target"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtypeNode"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_target"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "source"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_source"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "path"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "target"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_target"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeEdge"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtypeGraph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "nodes"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtypeNode"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_nodes"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edges"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtypeEdge"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_edges"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "nodes"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_nodes"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "edges"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_edges"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeGraph"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtypeNode"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_label"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "string"),
-                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_id"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "name"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "label"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "id"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeNode"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtypePath"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtypePath"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.paths.subtypeStep"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtypePath"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.paths.subtypeStep"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotatedBody"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "annotatedBody"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationFunction"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "applicationFunction"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationArgument"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "applicationArgument"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "eitherLeft"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "eitherLeft"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "eitherRight"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "eitherRight"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "forallBody"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "forallBody"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "functionDomain"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "functionDomain"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "functionCodomain"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "functionCodomain"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "listElement"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "listElement"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapKeys"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "mapKeys"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapValues"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "mapValues"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybeElement"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "maybeElement"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pairFirst"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pairFirst"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pairSecond"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pairSecond"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "recordField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "recordField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "setElement"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "setElement"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unionField"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unionField"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrappedType"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrappedType"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeStep"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Pg/Mapping.hs b/src/main/haskell/Hydra/Sources/Decode/Pg/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Pg/Mapping.hs
+++ /dev/null
@@ -1,1783 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Source module for hydra.decode.pg.mapping
-
-module Hydra.Sources.Decode.Pg.Mapping where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.pg.mapping"),
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.mapping.annotationSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertexLabel"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "string"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_vertexLabel"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edgeLabel"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_edgeLabel"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertexId"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "string"),
-                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_vertexId"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edgeId"))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "cx"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "raw"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "err"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "stripped"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                    Core.caseStatementCases = [
-                                                                      Core.Field {
-                                                                        Core.fieldName = (Core.Name "literal"),
-                                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                          Core.lambdaParameter = (Core.Name "v"),
-                                                                          Core.lambdaDomain = Nothing,
-                                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "string"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "s"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_edgeId"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "propertyKey"))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "cx"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "raw"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "literal"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                  Core.caseStatementCases = [
-                                                                                    Core.Field {
-                                                                                      Core.fieldName = (Core.Name "string"),
-                                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                                        Core.lambdaDomain = Nothing,
-                                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "field_propertyKey"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "propertyValue"))})),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                                          Core.lambdaDomain = Nothing,
-                                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "literal"),
-                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                      Core.caseStatementCases = [
-                                                                                        Core.Field {
-                                                                                          Core.fieldName = (Core.Name "string"),
-                                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                                            Core.lambdaDomain = Nothing,
-                                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "field_propertyValue"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "outVertex"))})),
-                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                Core.caseStatementCases = [
-                                                                                  Core.Field {
-                                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                                      Core.lambdaDomain = Nothing,
-                                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                          Core.caseStatementCases = [
-                                                                                            Core.Field {
-                                                                                              Core.fieldName = (Core.Name "string"),
-                                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                                Core.lambdaDomain = Nothing,
-                                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "field_outVertex"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "outVertexLabel"))})),
-                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "cx"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                          Core.lambdaParameter = (Core.Name "raw"),
-                                                                          Core.lambdaDomain = Nothing,
-                                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "err"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                    Core.caseStatementCases = [
-                                                                                      Core.Field {
-                                                                                        Core.fieldName = (Core.Name "literal"),
-                                                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                          Core.lambdaParameter = (Core.Name "v"),
-                                                                                          Core.lambdaDomain = Nothing,
-                                                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                              Core.caseStatementCases = [
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "string"),
-                                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                    Core.lambdaParameter = (Core.Name "s"),
-                                                                                                    Core.lambdaDomain = Nothing,
-                                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "field_outVertexLabel"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "inVertex"))})),
-                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "cx"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "raw"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                                                      Core.lambdaDomain = Nothing,
-                                                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                        Core.caseStatementCases = [
-                                                                                          Core.Field {
-                                                                                            Core.fieldName = (Core.Name "literal"),
-                                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                                                              Core.lambdaDomain = Nothing,
-                                                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                  Core.caseStatementCases = [
-                                                                                                    Core.Field {
-                                                                                                      Core.fieldName = (Core.Name "string"),
-                                                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                                                        Core.lambdaDomain = Nothing,
-                                                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "field_inVertex"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "inVertexLabel"))})),
-                                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                                                          Core.lambdaDomain = Nothing,
-                                                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                        Core.lambdaDomain = Nothing,
-                                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                            Core.caseStatementCases = [
-                                                                                              Core.Field {
-                                                                                                Core.fieldName = (Core.Name "literal"),
-                                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                                                  Core.lambdaDomain = Nothing,
-                                                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                      Core.caseStatementCases = [
-                                                                                                        Core.Field {
-                                                                                                          Core.fieldName = (Core.Name "string"),
-                                                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                                                            Core.lambdaDomain = Nothing,
-                                                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "field_inVertexLabel"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "outEdge"))})),
-                                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                                                      Core.lambdaDomain = Nothing,
-                                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                                                              Core.lambdaDomain = Nothing,
-                                                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                            Core.lambdaDomain = Nothing,
-                                                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                                Core.caseStatementCases = [
-                                                                                                  Core.Field {
-                                                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                                                      Core.lambdaDomain = Nothing,
-                                                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                          Core.caseStatementCases = [
-                                                                                                            Core.Field {
-                                                                                                              Core.fieldName = (Core.Name "string"),
-                                                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                                                Core.lambdaDomain = Nothing,
-                                                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "field_outEdge"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "outEdgeLabel"))})),
-                                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                        Core.lambdaParameter = (Core.Name "cx"),
-                                                                                        Core.lambdaDomain = Nothing,
-                                                                                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                                          Core.lambdaParameter = (Core.Name "raw"),
-                                                                                          Core.lambdaDomain = Nothing,
-                                                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                  Core.lambdaParameter = (Core.Name "err"),
-                                                                                                  Core.lambdaDomain = Nothing,
-                                                                                                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                                Core.lambdaDomain = Nothing,
-                                                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                                    Core.caseStatementCases = [
-                                                                                                      Core.Field {
-                                                                                                        Core.fieldName = (Core.Name "literal"),
-                                                                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                          Core.lambdaParameter = (Core.Name "v"),
-                                                                                                          Core.lambdaDomain = Nothing,
-                                                                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                              Core.caseStatementCases = [
-                                                                                                                Core.Field {
-                                                                                                                  Core.fieldName = (Core.Name "string"),
-                                                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                    Core.lambdaParameter = (Core.Name "s"),
-                                                                                                                    Core.lambdaDomain = Nothing,
-                                                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "field_outEdgeLabel"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "inEdge"))})),
-                                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                            Core.lambdaParameter = (Core.Name "cx"),
-                                                                                            Core.lambdaDomain = Nothing,
-                                                                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                                              Core.lambdaParameter = (Core.Name "raw"),
-                                                                                              Core.lambdaDomain = Nothing,
-                                                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                                                                      Core.lambdaDomain = Nothing,
-                                                                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                                    Core.lambdaDomain = Nothing,
-                                                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                                        Core.caseStatementCases = [
-                                                                                                          Core.Field {
-                                                                                                            Core.fieldName = (Core.Name "literal"),
-                                                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                                                                              Core.lambdaDomain = Nothing,
-                                                                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                                  Core.caseStatementCases = [
-                                                                                                                    Core.Field {
-                                                                                                                      Core.fieldName = (Core.Name "string"),
-                                                                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                                                                        Core.lambdaDomain = Nothing,
-                                                                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "field_inEdge"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "inEdgeLabel"))})),
-                                                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                                                                Core.lambdaDomain = Nothing,
-                                                                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                                                                  Core.lambdaDomain = Nothing,
-                                                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                                                                          Core.lambdaDomain = Nothing,
-                                                                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                                        Core.lambdaDomain = Nothing,
-                                                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                                            Core.caseStatementCases = [
-                                                                                                              Core.Field {
-                                                                                                                Core.fieldName = (Core.Name "literal"),
-                                                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                                                                  Core.lambdaDomain = Nothing,
-                                                                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                                      Core.caseStatementCases = [
-                                                                                                                        Core.Field {
-                                                                                                                          Core.fieldName = (Core.Name "string"),
-                                                                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                                                                            Core.lambdaDomain = Nothing,
-                                                                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                        Core.lambdaParameter = (Core.Name "field_inEdgeLabel"),
-                                                                                        Core.lambdaDomain = Nothing,
-                                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ignore"))})),
-                                                                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                                                                    Core.lambdaDomain = Nothing,
-                                                                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                                                                      Core.lambdaDomain = Nothing,
-                                                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                                                                              Core.lambdaDomain = Nothing,
-                                                                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                                                                            Core.lambdaDomain = Nothing,
-                                                                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                                                                Core.caseStatementCases = [
-                                                                                                                  Core.Field {
-                                                                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                                                                      Core.lambdaDomain = Nothing,
-                                                                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                                                                          Core.caseStatementCases = [
-                                                                                                                            Core.Field {
-                                                                                                                              Core.fieldName = (Core.Name "string"),
-                                                                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                                                                Core.lambdaDomain = Nothing,
-                                                                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                                            Core.lambdaParameter = (Core.Name "field_ignore"),
-                                                                                            Core.lambdaDomain = Nothing,
-                                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                                                              Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                                                                              Core.recordFields = [
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "vertexLabel"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertexLabel"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "edgeLabel"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_edgeLabel"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "vertexId"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertexId"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "edgeId"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_edgeId"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "propertyKey"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_propertyKey"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "propertyValue"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_propertyValue"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "outVertex"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_outVertex"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "outVertexLabel"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_outVertexLabel"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "inVertex"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_inVertex"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "inVertexLabel"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_inVertexLabel"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "outEdge"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_outEdge"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "outEdgeLabel"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_outEdgeLabel"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "inEdge"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_inEdge"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "inEdgeLabel"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_inEdgeLabel"))},
-                                                                                                Core.Field {
-                                                                                                  Core.fieldName = (Core.Name "ignore"),
-                                                                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_ignore"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.mapping.AnnotationSchema"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.mapping.edgeSpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeLabel"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_label"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.valueSpec"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_id"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "out"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.valueSpec"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_out"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "in"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.valueSpec"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_in"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.propertySpec"))}))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "field_properties"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-                                                      Core.recordFields = [
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "label"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "id"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "out"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_out"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "in"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_in"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "properties"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.mapping.EdgeSpec"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.mapping.elementSpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "vertex"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.vertexSpec")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "edge"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.edgeSpec")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.mapping.ElementSpec"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.mapping.propertySpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "key"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyKey"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_key"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "value"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.valueSpec"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_value"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "key"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_key"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "value"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_value"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.mapping.PropertySpec"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.mapping.valueSpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ValueSpec"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "value"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pattern"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ValueSpec"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pattern"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.mapping.ValueSpec"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.mapping.vertexSpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_label"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.valueSpec"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_id"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.mapping.propertySpec"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_properties"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "label"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "id"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "properties"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.mapping.VertexSpec"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))],
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.pg.model"),
-        (Packaging.Namespace "hydra.decode.coders")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.pg.mapping",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDescription = (Just "Term decoders for hydra.pg.mapping")}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Pg/Model.hs b/src/main/haskell/Hydra/Sources/Decode/Pg/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Pg/Model.hs
+++ /dev/null
@@ -1,2979 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Source module for hydra.decode.pg.model
-
-module Hydra.Sources.Decode.Pg.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-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
-
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.pg.model"),
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.adjacentEdge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeLabel"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_label"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_id"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertex"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_vertex"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyKey"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "field_properties"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                    Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-                                                    Core.recordFields = [
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "label"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "id"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "vertex"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertex"))},
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "properties"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.AdjacentEdge")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.direction"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "out"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "out"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "in"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "in"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "both"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "both"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undirected"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "undirected"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.model.Direction"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.edge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeLabel"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_label"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_id"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "out"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_out"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "in"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "field_in"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyKey"))})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "field_properties"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                        Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
-                                                        Core.recordFields = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "label"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "id"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "out"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_out"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "in"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_in"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "properties"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Edge")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.edgeLabel"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.EdgeLabel"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.model.EdgeLabel"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.edgeType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeLabel"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_label"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_id"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "out"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_out"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "in"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "field_in"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyType")),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "field_properties"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                        Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-                                                        Core.recordFields = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "label"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "id"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "out"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_out"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "in"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_in"))},
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "properties"),
-                                                            Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.EdgeType")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.element"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "inject"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "inj"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "field"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                          Core.projectionField = (Core.Name "field")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fname"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.projectionField = (Core.Name "name")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fterm"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.projectionField = (Core.Name "term")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "variantMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                        Core.applicationArgument = (Core.TermList [
-                                          Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}), (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "input"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "t"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "vertex"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertex")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                          (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}), (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "input"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "t"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "edge"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edge")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                        Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                          Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                            Core.applicationArgument = (Core.TermList [
-                                              Core.TermLiteral (Core.LiteralString "no such field "),
-                                              (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                              (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "f"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Element")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.elementKind"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementKind"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "vertex"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementKind"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "edge"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementKind"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.elementTree"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "self"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.element")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_self"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "dependencies"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.elementTree")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_dependencies"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "self"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_self"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "dependencies"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_dependencies"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementTree")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.elementType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "inject"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "inj"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "field"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                          Core.projectionField = (Core.Name "field")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fname"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.projectionField = (Core.Name "name")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fterm"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                          Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                          Core.projectionField = (Core.Name "term")})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                      Core.bindingTypeScheme = Nothing},
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "variantMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                        Core.applicationArgument = (Core.TermList [
-                                          Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}), (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "input"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "t"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "vertex"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexType")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                          (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}), (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "input"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "t"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "edge"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeType")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                        Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                          Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                            Core.applicationArgument = (Core.TermList [
-                                              Core.TermLiteral (Core.LiteralString "no such field "),
-                                              (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                              (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "f"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementType")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.elementTypeTree"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "self"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.elementType")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_self"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "dependencies"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.elementTypeTree")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_dependencies"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "self"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_self"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "dependencies"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_dependencies"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementTypeTree")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.graph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertices"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertex")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_vertices"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edges"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edge")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_edges"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "vertices"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertices"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "edges"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_edges"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Graph")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = (Just (M.fromList [
-              (Core.Name "v", Core.TypeVariableMetadata {
-                Core.typeVariableMetadataClasses = (S.fromList [
-                  Core.Name "ordering"])})]))}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.graphSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertices"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexType")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_vertices"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edges"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeLabel"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeType")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_edges"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "vertices"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertices"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "edges"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_edges"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.GraphSchema")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.label"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "vertex"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "edge"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edgeLabel")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.model.Label"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.lazyGraph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertices"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertex")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_vertices"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "edges"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.edge")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_edges"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "vertices"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertices"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "edges"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_edges"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.LazyGraph")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.property"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "key"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyKey"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_key"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "value"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_value"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "key"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_key"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "value"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_value"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Property")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.propertyKey"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.PropertyKey"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.model.PropertyKey"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.propertyType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "key"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyKey"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_key"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "value"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_value"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "required"))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "cx"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "raw"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "err"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "literal"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "boolean"),
-                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "b"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))}))}]})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_required"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-                                                Core.recordFields = [
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "key"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_key"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "value"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_value"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "required"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_required"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.PropertyType")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.vertex"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_label"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_id"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyKey"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_properties"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
-                                                Core.recordFields = [
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "label"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "id"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "properties"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Vertex")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.vertexLabel"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.VertexLabel"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.pg.model.VertexLabel"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.vertexType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "label"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertexLabel"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_label"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "id"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_id"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "properties"))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.propertyType")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_properties"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
-                                                Core.recordFields = [
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "label"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_label"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "id"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_id"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "properties"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_properties"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.VertexType")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.pg.model.vertexWithAdjacentEdges"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "vertex"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.vertex")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_vertex"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ins"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.adjacentEdge")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_ins"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "outs"))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.pg.model.adjacentEdge")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_outs"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-                                                Core.recordFields = [
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "vertex"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_vertex"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "ins"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_ins"))},
-                                                  Core.Field {
-                                                    Core.fieldName = (Core.Name "outs"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_outs"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.VertexWithAdjacentEdges")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))],
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.pg.model",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDescription = (Just "Term decoders for hydra.pg.model")}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Phantoms.hs b/src/main/haskell/Hydra/Sources/Decode/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Phantoms.hs
+++ /dev/null
@@ -1,321 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.phantoms
-
-module Hydra.Sources.Decode.Phantoms where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.phantoms"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.phantoms"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.phantoms",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.phantoms.tBinding"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_name"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "term"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.phantoms.tTerm")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_term"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.phantoms.TBinding"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "name"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "term"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_term"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TBinding")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.phantoms.tTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "wrap"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),
-                                        Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.term")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                        Core.projectionField = (Core.Name "body")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.phantoms.tTermDefinition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_name"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "term"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.phantoms.tTerm")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_term"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.phantoms.TTermDefinition"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "name"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "term"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_term"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTermDefinition")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Query.hs b/src/main/haskell/Hydra/Sources/Decode/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Query.hs
+++ /dev/null
@@ -1,2462 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.query
-
-module Hydra.Sources.Decode.Query where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.query"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.query"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.query",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.comparisonConstraint"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "equal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "equal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notEqual"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "notEqual"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lessThan"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lessThan"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "greaterThan"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "greaterThan"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lessThanOrEqual"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lessThanOrEqual"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "greaterThanOrEqual"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "greaterThanOrEqual"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.ComparisonConstraint"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.edge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_type"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "out"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_out"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "in"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_in"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.query.Edge"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "type"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "out"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_out"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "in"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_in"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Edge"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.graphPattern"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "graph"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_graph"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "patterns"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.pattern"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_patterns"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "graph"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_graph"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "patterns"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_patterns"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.GraphPattern"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.node"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "term"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.term")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "variable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.variable")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wildcard"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Node"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wildcard"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Node"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.path"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "step"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "step"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.step")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "regex"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "regex"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.regexSequence")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inverse"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Path"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "inverse"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.path")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Path"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.pathEquation"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "left"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.path"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_left"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "right"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.path"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_right"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "left"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_left"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "right"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_right"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.PathEquation"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.pattern"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "triple"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "triple"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.triplePattern")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "negation"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "negation"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.pattern")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conjunction"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "conjunction"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.pattern"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "disjunction"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "disjunction"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.pattern"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "graph"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "graph"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.graphPattern")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Pattern"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.patternImplication"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "antecedent"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.pattern"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_antecedent"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "consequent"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.pattern"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_consequent"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "antecedent"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_antecedent"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "consequent"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_consequent"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.PatternImplication"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.query"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "variables"))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.variable"))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_variables"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "patterns"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.pattern"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_patterns"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.query.Query"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "variables"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_variables"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "patterns"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_patterns"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Query"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.range"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "min"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "integer"),
-                                                                      Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "int32"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "i"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_min"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "max"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "integer"),
-                                                                          Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "int32"),
-                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "i"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_max"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.query.Range"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "min"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_min"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "max"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_max"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Range"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.regexQuantifier"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "one"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "zeroOrOne"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "zeroOrOne"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "zeroOrMore"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "zeroOrMore"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "oneOrMore"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "oneOrMore"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "exactly"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "exactly"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "atLeast"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "atLeast"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "range"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "range"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.range")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.RegexQuantifier"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.regexSequence"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "path"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.path"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_path"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "quantifier"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.regexQuantifier"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_quantifier"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "path"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_path"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "quantifier"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_quantifier"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.RegexSequence"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.step"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "edge"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.edge")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "project"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "project"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.core.projection")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "compare"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.query.Step"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "compare"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.query.comparisonConstraint")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Step"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.triplePattern"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "subject"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.node"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_subject"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "predicate"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.path"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_predicate"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "object"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.query.node"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_object"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "subject"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_subject"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "predicate"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_predicate"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "object"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_object"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.TriplePattern"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.query.variable"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.query.Variable"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.query.Variable"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Relational.hs b/src/main/haskell/Hydra/Sources/Decode/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Relational.hs
+++ /dev/null
@@ -1,927 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.relational
-
-module Hydra.Sources.Decode.Relational where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-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
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.relational"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.relational"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.relational",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.columnName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.relational.ColumnName"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.relational.ColumnName"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.columnSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.columnName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_name"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "domain"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_domain"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "name"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "domain"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_domain"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.ColumnSchema")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.foreignKey"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foreignRelation"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.relationName"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_foreignRelation"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "keys"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.columnName"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.columnName"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_keys"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "foreignRelation"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_foreignRelation"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "keys"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_keys"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.relational.ForeignKey"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.primaryKey"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.relational.PrimaryKey"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.columnName"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.relational.PrimaryKey"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.relation"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "wrap"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relation"),
-                                        Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.relational.row")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                        Core.projectionField = (Core.Name "body")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.Relation")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.relationName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.relational.RelationName"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.relational.RelationName"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.relationSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.relationName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_name"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "columns"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.relational.columnSchema")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_columns"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "primaryKeys"))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.primaryKey"))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_primaryKeys"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foreignKeys"))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.foreignKey"))}))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "field_foreignKeys"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                    Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),
-                                                    Core.recordFields = [
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "name"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "columns"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_columns"))},
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "primaryKeys"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_primaryKeys"))},
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "foreignKeys"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "field_foreignKeys"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.RelationSchema")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.relationship"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "wrap"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relationship"),
-                                        Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeSet")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.columnName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                        Core.projectionField = (Core.Name "body")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.Relationship")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = (Just (M.fromList [
-              (Core.Name "v", Core.TypeVariableMetadata {
-                Core.typeVariableMetadataClasses = (S.fromList [
-                  Core.Name "ordering"])})]))}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.relational.row"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "wrap"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.relational.Row"),
-                                        Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                        Core.projectionField = (Core.Name "body")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.Row")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Tabular.hs b/src/main/haskell/Hydra/Sources/Decode/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Tabular.hs
+++ /dev/null
@@ -1,525 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.tabular
-
-module Hydra.Sources.Decode.Tabular where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.tabular"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.tabular"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.relational")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.tabular",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.tabular.columnType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.columnName"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_type"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "type"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.tabular.ColumnType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.tabular.dataRow"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "wrap"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.tabular.DataRow"),
-                                        Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                        Core.projectionField = (Core.Name "body")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.tabular.DataRow")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.tabular.headerRow"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.HeaderRow"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "cx"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "raw"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "err"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "stripped"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                    Core.caseStatementCases = [
-                                                      Core.Field {
-                                                        Core.fieldName = (Core.Name "literal"),
-                                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "v"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "string"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "s"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.tabular.HeaderRow"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.tabular.table"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "header"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.tabular.headerRow"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_header"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "data"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.tabular.dataRow")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_data"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.tabular.Table"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "header"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_header"))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "data"),
-                                                Core.fieldTerm = (Core.TermVariable (Core.Name "field_data"))}]}))))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "v"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.tabular.Table")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.tabular.tableType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.relational.relationName"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "columns"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.tabular.columnType"))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_columns"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "name"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "columns"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_columns"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.tabular.TableType"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Testing.hs b/src/main/haskell/Hydra/Sources/Decode/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Testing.hs
+++ /dev/null
@@ -1,912 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.testing
-
-module Hydra.Sources.Decode.Testing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.testing"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.testing"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.testing",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.testing.tag"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.testing.Tag"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "cx"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "raw"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "err"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                  Core.caseStatementCases = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "string"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.testing.Tag"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.testing.testCase"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "universal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "universal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.decode.testing.universalTestCase")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.testing.TestCase"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.testing.testCaseWithMetadata"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "string"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "case"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.testing.testCase"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_case"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "description"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "cx"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "raw"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "err"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "literal"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "string"),
-                                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                  Core.lambdaParameter = (Core.Name "s"),
-                                                                                  Core.lambdaDomain = Nothing,
-                                                                                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_description"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "tags"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.testing.tag"))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_tags"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                  Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-                                                  Core.recordFields = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "name"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "case"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_case"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "description"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_description"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "tags"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_tags"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.testing.TestCaseWithMetadata"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.testing.testGroup"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "name"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "string"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_name"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "description"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "string"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "s"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_description"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "subgroups"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.testing.testGroup"))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_subgroups"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cases"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.testing.testCaseWithMetadata"))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_cases"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                  Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),
-                                                  Core.recordFields = [
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "name"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_name"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "description"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_description"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "subgroups"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_subgroups"))},
-                                                    Core.Field {
-                                                      Core.fieldName = (Core.Name "cases"),
-                                                      Core.fieldTerm = (Core.TermVariable (Core.Name "field_cases"))}]}))))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.testing.TestGroup"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.testing.universalTestCase"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "actual"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "string"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "s"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_actual"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "expected"))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "cx"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "raw"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "err"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "stripped"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                            Core.caseStatementCases = [
-                                                              Core.Field {
-                                                                Core.fieldName = (Core.Name "literal"),
-                                                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                  Core.lambdaParameter = (Core.Name "v"),
-                                                                  Core.lambdaDomain = Nothing,
-                                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                      Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                      Core.caseStatementCases = [
-                                                                        Core.Field {
-                                                                          Core.fieldName = (Core.Name "string"),
-                                                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                            Core.lambdaParameter = (Core.Name "s"),
-                                                                            Core.lambdaDomain = Nothing,
-                                                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_expected"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                          Core.recordTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-                                          Core.recordFields = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "actual"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_actual"))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "expected"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_expected"))}]}))))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.testing.UniversalTestCase"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Topology.hs b/src/main/haskell/Hydra/Sources/Decode/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Topology.hs
+++ /dev/null
@@ -1,462 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.topology
-
-module Hydra.Sources.Decode.Topology where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.topology"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.topology"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.topology",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.topology.graph"),
-          Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-            Core.applicationFunction = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))})),
-            Core.applicationArgument = (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.topology.Vertex")),
-                    Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.topology.Vertex")))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.topology.tarjanState"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "counter"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "cx"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "raw"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "err"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "stripped"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                        Core.caseStatementCases = [
-                                                          Core.Field {
-                                                            Core.fieldName = (Core.Name "literal"),
-                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "v"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "integer"),
-                                                                      Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "int32"),
-                                                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                              Core.lambdaParameter = (Core.Name "i"),
-                                                                              Core.lambdaDomain = Nothing,
-                                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_counter"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "indices"))})),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_indices"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "lowLinks"))})),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "cx"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "raw"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                                Core.lambdaParameter = (Core.Name "err"),
-                                                                Core.lambdaDomain = Nothing,
-                                                                Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "stripped"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                  Core.caseStatementCases = [
-                                                                    Core.Field {
-                                                                      Core.fieldName = (Core.Name "literal"),
-                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                        Core.lambdaParameter = (Core.Name "v"),
-                                                                        Core.lambdaDomain = Nothing,
-                                                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                              Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                            Core.caseStatementCases = [
-                                                                              Core.Field {
-                                                                                Core.fieldName = (Core.Name "integer"),
-                                                                                Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                                  Core.caseStatementCases = [
-                                                                                    Core.Field {
-                                                                                      Core.fieldName = (Core.Name "int32"),
-                                                                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                        Core.lambdaParameter = (Core.Name "i"),
-                                                                                        Core.lambdaDomain = Nothing,
-                                                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_lowLinks"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "stack"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_stack"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "onStack"))})),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeSet")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))}))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "field_onStack"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "sccs"))})),
-                                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.topology.vertex"))}))}))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                        Core.lambdaParameter = (Core.Name "field_sccs"),
-                                                        Core.lambdaDomain = Nothing,
-                                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                          Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                                          Core.recordFields = [
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "counter"),
-                                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_counter"))},
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "indices"),
-                                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_indices"))},
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "lowLinks"),
-                                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_lowLinks"))},
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "stack"),
-                                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_stack"))},
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "onStack"),
-                                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_onStack"))},
-                                                            Core.Field {
-                                                              Core.fieldName = (Core.Name "sccs"),
-                                                              Core.fieldTerm = (Core.TermVariable (Core.Name "field_sccs"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.topology.TarjanState"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.topology.vertex"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "literal"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "v"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "integer"),
-                                      Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                        Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                        Core.caseStatementCases = [
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "int32"),
-                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "i"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.core.Literal"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Typing.hs b/src/main/haskell/Hydra/Sources/Decode/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Typing.hs
+++ /dev/null
@@ -1,681 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.typing
-
-module Hydra.Sources.Decode.Typing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.typing"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.typing"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core"),
-        (Packaging.Namespace "hydra.decode.context")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.typing",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.typing.functionStructure"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "env"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "cx"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "raw"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "err"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "stripped"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "record"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "record"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "fieldMap"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "typeParams"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "field_typeParams"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "params"))})),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "field_params"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bindings"))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.binding"))}))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "field_bindings"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "body"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "field_body"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "domains"))})),
-                                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeList")),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))}))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "field_domains"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "codomain"))})),
-                                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMaybe")),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))}))})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "field_codomain"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "environment"))})),
-                                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "env"))})),
-                                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "field_environment"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                                Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                                                Core.recordFields = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "typeParams"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_typeParams"))},
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "params"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_params"))},
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "bindings"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_bindings"))},
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "body"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_body"))},
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "domains"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_domains"))},
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "codomain"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_codomain"))},
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "environment"),
-                                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "field_environment"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "env"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "env"))}))}))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                    Core.eitherTypeRight = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.typing.FunctionStructure")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "env"))}))}))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.typing.inferenceResult"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "term"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_term"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "type"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_type"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "subst"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.typing.typeSubst"))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_subst"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "classConstraints"))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.typeVariableMetadata"))}))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "field_classConstraints"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "context"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.context.context"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "field_context"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                                      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),
-                                                      Core.recordFields = [
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "term"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_term"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "type"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_type"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "subst"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_subst"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "classConstraints"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_classConstraints"))},
-                                                        Core.Field {
-                                                          Core.fieldName = (Core.Name "context"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "field_context"))}]}))))}))}))}))}))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.typing.InferenceResult"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.typing.termSubst"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TermSubst"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.term"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.typing.TermSubst"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.typing.typeConstraint"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "record"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "record"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fieldMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.toFieldMap")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "left"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "field_left"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "right"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                      Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "field_right"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bind")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.requireField")),
-                                                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "comment"))})),
-                                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "cx"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                      Core.lambdaParameter = (Core.Name "raw"),
-                                                      Core.lambdaDomain = Nothing,
-                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                              Core.lambdaParameter = (Core.Name "err"),
-                                                              Core.lambdaDomain = Nothing,
-                                                              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "stripped"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                                Core.caseStatementCases = [
-                                                                  Core.Field {
-                                                                    Core.fieldName = (Core.Name "literal"),
-                                                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                      Core.lambdaParameter = (Core.Name "v"),
-                                                                      Core.lambdaDomain = Nothing,
-                                                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),
-                                                                          Core.caseStatementCases = [
-                                                                            Core.Field {
-                                                                              Core.fieldName = (Core.Name "string"),
-                                                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                Core.lambdaParameter = (Core.Name "s"),
-                                                                                Core.lambdaDomain = Nothing,
-                                                                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))}))}]})),
-                                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "field_comment"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermRecord (Core.Record {
-                                              Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-                                              Core.recordFields = [
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "left"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_left"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "right"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_right"))},
-                                                Core.Field {
-                                                  Core.fieldName = (Core.Name "comment"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "field_comment"))}]}))))}))}))}))}))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.typing.TypeConstraint"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.typing.typeSubst"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "wrap"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "wrappedTerm"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TypeSubst"),
-                                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeMap")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.name"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.decode.core.type"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.typing.TypeSubst"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Util.hs b/src/main/haskell/Hydra/Sources/Decode/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Util.hs
+++ /dev/null
@@ -1,659 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.util
-
-module Hydra.Sources.Decode.Util where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.util"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.util"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.util",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.util.caseConvention"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "camel"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "camel"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pascal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pascal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lowerSnake"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lowerSnake"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "upperSnake"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "upperSnake"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.util.CaseConvention"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.util.comparison"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lessThan"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lessThan"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "equalTo"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "equalTo"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "greaterThan"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "greaterThan"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.util.Comparison"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.util.precision"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "arbitrary"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.Precision"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "arbitrary"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bits"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.util.Precision"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "bits"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "raw"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                            Core.lambdaParameter = (Core.Name "err"),
-                                                            Core.lambdaDomain = Nothing,
-                                                            Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                                                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                          Core.lambdaParameter = (Core.Name "stripped"),
-                                                          Core.lambdaDomain = Nothing,
-                                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),
-                                                              Core.caseStatementCases = [
-                                                                Core.Field {
-                                                                  Core.fieldName = (Core.Name "literal"),
-                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                    Core.lambdaParameter = (Core.Name "v"),
-                                                                    Core.lambdaDomain = Nothing,
-                                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                                                        Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-                                                                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 literal"))}))))),
-                                                                        Core.caseStatementCases = [
-                                                                          Core.Field {
-                                                                            Core.fieldName = (Core.Name "integer"),
-                                                                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                                                                              Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                                                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                                                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected int32 value"))}))))),
-                                                                              Core.caseStatementCases = [
-                                                                                Core.Field {
-                                                                                  Core.fieldName = (Core.Name "int32"),
-                                                                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                                                    Core.lambdaParameter = (Core.Name "i"),
-                                                                                    Core.lambdaDomain = Nothing,
-                                                                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))}))}]}))}]})),
-                                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))}]})),
-                                                            Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                                                          Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.util.Precision"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Decode/Variants.hs b/src/main/haskell/Hydra/Sources/Decode/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Decode/Variants.hs
+++ /dev/null
@@ -1,2061 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.decode.variants
-
-module Hydra.Sources.Decode.Variants where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term decoders for hydra.variants"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.decode.variants"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.extract.core",
-        (Packaging.Namespace "hydra.lexical"),
-        (Packaging.Namespace "hydra.rewriting"),
-        (Packaging.Namespace "hydra.decode.core")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.variants",
-        (Packaging.Namespace "hydra.util")],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.variants.eliminationVariant"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "record"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "union"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "union"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.variants.EliminationVariant"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.variants.functionVariant"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "elimination"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "elimination"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.variants.FunctionVariant"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.variants.literalVariant"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binary"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "binary"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "boolean"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decimal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "decimal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "float"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "integer"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "integer"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.variants.LiteralVariant"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.variants.termVariant"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "annotated"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "application"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cases"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "cases"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "either"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inject"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "inject"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "lambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "let"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "let"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "list"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "map"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "maybe"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pair"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "project"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "project"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "record"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "set"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeApplication"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeApplication"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeLambda"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "typeLambda"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unit"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unwrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unwrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "variable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.variants.TermVariant"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.decode.variants.typeVariant"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "cx"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "raw"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.either")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "err"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "err"))))}))})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "stripped"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-                        Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "inject"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "inj"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "field"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                        Core.projectionField = (Core.Name "field")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fname"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "name")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "fterm"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                        Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                        Core.projectionField = (Core.Name "term")})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),
-                                    Core.bindingTypeScheme = Nothing},
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "variantMap"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                                      Core.applicationArgument = (Core.TermList [
-                                        Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "annotated"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "application"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "either"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "forall"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "forall"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "function"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "function"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "list"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "map"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "maybe"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "pair"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "record"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "set"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "union"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "union"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "unit"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "variable"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "void"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "void"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))),
-                                        (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-                                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}), (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "input"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.map")),
-                                              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "t"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "wrap"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "cx"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                                    Core.lambdaParameter = (Core.Name "t"),
-                                                    Core.lambdaDomain = Nothing,
-                                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.decodeUnit")),
-                                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))])})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                                      Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),
-                                        Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                          Core.applicationArgument = (Core.TermList [
-                                            Core.TermLiteral (Core.LiteralString "no such field "),
-                                            (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                            (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "f"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.core.stripWithDecodingError")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-                Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "hydra.variants.TypeVariant"))}))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Delta/Parquet.hs b/src/main/haskell/Hydra/Sources/Delta/Parquet.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Delta/Parquet.hs
+++ /dev/null
@@ -1,123 +0,0 @@
-module Hydra.Sources.Delta.Parquet where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.delta.parquet"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-delta :: String -> Type
-delta = typeref ns
-
-enumVal :: String -> String -> FieldType
-enumVal name desc = name>: doc desc T.unit
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A partial Delta Parquet model, based on DataType and its subclasses as specified in the 3.0.0 Java API:"
-      ++ " https://docs.delta.io/3.0.0/api/java/kernel/io/delta/kernel/types/DataType.html")}
-  where
-    definitions = [
-      arrayType,
-      basePrimitiveType,
-      dataType,
-      decimalType,
-      mapType,
-      structField,
-      structType]
-
-arrayType :: Binding
-arrayType = define "ArrayType" $
-  doc "Represent array data type." $
-  T.record [
-    "elementType">: delta "DataType",
-    "containsNull">: T.boolean]
-
-basePrimitiveType :: Binding
-basePrimitiveType = define "BasePrimitiveType" $
-  doc "Base class for all primitive types DataType." $
-  T.union [
-    enumVal "binary" "The data type representing byte[] values.",
-    enumVal "boolean" "Data type representing boolean type values.",
-    enumVal "byte" "The data type representing byte type values.",
-    enumVal "date" (
-      "A date type, supporting \"0001-01-01\" through \"9999-12-31\"."
-      ++ " Internally, this is represented as the number of days from 1970-01-01."),
-    enumVal "double" "The data type representing double type values.",
-    enumVal "float" "The data type representing float type values.",
-    enumVal "integer" "The data type representing integer type values.",
-    enumVal "long" "The data type representing long type values.",
-    enumVal "short" "The data type representing short type values.",
-    enumVal "string" "The data type representing string type values.",
-    enumVal "timestamp" (
-      "A timestamp type, supporting [0001-01-01T00:00:00.000000Z, 9999-12-31T23:59:59.999999Z]"
-      ++ " where the left/right-bound is a date and time of the proleptic Gregorian calendar in UTC+00:00."
-      ++ " Internally, this is represented as the number of microseconds since the Unix epoch,"
-      ++ " 1970-01-01 00:00:00 UTC.")]
-
-dataType :: Binding
-dataType = define "DataType" $
-  T.union [
-    "array">:
-      doc "Represent array data type." $
-      delta "ArrayType",
-    "base">:
-      doc "Base class for all primitive types DataType." $
-      delta "BasePrimitiveType",
-    "decimal">:
-      doc "A decimal data type." $
-      delta "DecimalType",
-    "map">:
-      doc "Data type representing a map type." $
-      delta "MapType",
-    "struct">:
-      doc "Struct type which contains one or more columns." $
-      delta "StructType"]
-
-decimalType :: Binding
-decimalType = define "DecimalType" $
-  doc ("A decimal data type with fixed precision (the maximum number of digits)"
-    ++ " and scale (the number of digits on right side of dot)."
-    ++ " The precision can be up to 38, scale can also be up to 38 (less or equal to precision).") $
-  T.record [
-    "precision">: T.int32,
-    "scale">: T.int32]
-
-mapType :: Binding
-mapType = define "MapType" $
-  doc "Data type representing a map type." $
-  T.record [
-    "keyType">: delta "DataType",
-    "valueType">: delta "DataType",
-    "valueContainsNull">: T.boolean]
-
-structField :: Binding
-structField = define "StructField" $
-  doc "Represents a subfield of StructType with additional properties and metadata." $
-  T.record [
-    "name">: T.string,
-    "dataType">: delta "DataType",
-    "nullable">: T.boolean]
-
-structType :: Binding
-structType = define "StructType" $
-  doc "Struct type which contains one or more columns." $
-  T.record [
-    "fields">: T.list $ delta "StructField"]
diff --git a/src/main/haskell/Hydra/Sources/Demos/GenPG/Transform.hs b/src/main/haskell/Hydra/Sources/Demos/GenPG/Transform.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Demos/GenPG/Transform.hs
+++ /dev/null
@@ -1,652 +0,0 @@
-module Hydra.Sources.Demos.GenPG.Transform where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Kernel.Types.Tabular as TabularModel
-import qualified Hydra.Sources.Kernel.Types.Relational as RelationalModel
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Pg.Model as PG            -- Generated PG model types
-import qualified Hydra.Tabular as Tab            -- Generated tabular types
-import qualified Hydra.Relational as Rel         -- Generated relational types
-
-
-ns :: Namespace
-ns = Namespace "hydra.demos.genpg.transform"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Reduction.ns, Rewriting.ns, Strip.ns, ExtractCore.ns],
-            moduleTypeDependencies = (kernelTypesNamespaces L.++ [PgModel.ns, TabularModel.ns, RelationalModel.ns]),
-            moduleDescription = Just "Functions for transforming property graph mappings into property graph elements."}
-  where
-    definitions = [
-      toDefinition concatPairs,
-      toDefinition decodeCell,
-      toDefinition decodeRow,
-      toDefinition decodeTable,
-      toDefinition elementIsEdge,
-      toDefinition elementIsVertex,
-      toDefinition elementSpecsByTable,
-      toDefinition evaluateEdge,
-      toDefinition evaluateProperties,
-      toDefinition evaluateVertex,
-      toDefinition findTablesInTerm,
-      toDefinition findTablesInTerms,
-      toDefinition listAny,
-      toDefinition makeLazyGraph,
-      toDefinition normalizeField,
-      toDefinition parseCsvChar,
-      toDefinition parseCsvLine,
-      toDefinition parseSingleLine,
-      toDefinition parseTableLines,
-      toDefinition stripWhitespace,
-      toDefinition tableForEdge,
-      toDefinition tableForVertex,
-      toDefinition tableTypesByName,
-      toDefinition termRowToRecord,
-      toDefinition transformRecord,
-      toDefinition transformTableRows]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Type references
-pg :: String -> Type
-pg = Bootstrap.typeref PgModel.ns
-
-tab :: String -> Type
-tab = Bootstrap.typeref TabularModel.ns
-
--- | Evaluate properties by applying each spec to the record and extracting optional values
-evaluateProperties :: TTermDefinition (Context -> Graph -> M.Map PG.PropertyKey Term -> Term -> Either Error (M.Map PG.PropertyKey Term))
-evaluateProperties = define "evaluateProperties" $
-  doc "Evaluate property specifications against a record term" $
-  "cx" ~> "g" ~> "specs" ~> "record" ~>
-    -- Lift the match extractor outside the inner lambda to avoid Python inline match issues
-    -- This takes the key as parameter so it doesn't need to capture it
-    "extractMaybe" <~ ("k" ~> "term" ~>
-      match _Term Nothing [
-        _Term_maybe>>: "mv" ~>
-          right $ Maybes.map ("v" ~> pair (var "k") (var "v")) (var "mv")]
-      @@ var "term") $
-    Eithers.map
-      ("pairs" ~> Maps.fromList $ Maybes.cat $ var "pairs")
-      (Eithers.mapList
-        ("pair" ~>
-          "k" <~ Pairs.first (var "pair") $
-          "spec" <~ Pairs.second (var "pair") $
-          Eithers.bind
-            (Reduction.reduceTerm @@ var "cx" @@ var "g" @@ boolean True @@ (Core.termApplication $ Core.application (var "spec") (var "record")))
-            ("value" ~> var "extractMaybe" @@ var "k" @@ (Strip.deannotateTerm @@ var "value")))
-        (Maps.toList $ var "specs"))
-
--- | Evaluate an edge specification against a record term
-evaluateEdge :: TTermDefinition (Context -> Graph -> PG.Edge Term -> Term -> Either Error (Maybe (PG.Edge Term)))
-evaluateEdge = define "evaluateEdge" $
-  doc "Evaluate an edge specification against a record term to produce an optional edge" $
-  "cx" ~> "g" ~> "edgeSpec" ~> "record" ~>
-    "label" <~ (project PG._Edge PG._Edge_label @@ var "edgeSpec") $
-    "idSpec" <~ (project PG._Edge PG._Edge_id @@ var "edgeSpec") $
-    "outSpec" <~ (project PG._Edge PG._Edge_out @@ var "edgeSpec") $
-    "inSpec" <~ (project PG._Edge PG._Edge_in @@ var "edgeSpec") $
-    "propSpecs" <~ (project PG._Edge PG._Edge_properties @@ var "edgeSpec") $
-    Eithers.bind
-      (Reduction.reduceTerm @@ var "cx" @@ var "g" @@ boolean True @@ (Core.termApplication $ Core.application (var "idSpec") (var "record")))
-      ("id" ~>
-        Eithers.bind
-          (Eithers.bind
-            (Reduction.reduceTerm @@ var "cx" @@ var "g" @@ boolean True @@ (Core.termApplication $ Core.application (var "outSpec") (var "record")))
-            ("__term" ~>
-              ExtractCore.maybeTerm @@ ("t" ~> right (var "t")) @@ var "g" @@ var "__term"))
-          ("mOutId" ~>
-            Eithers.bind
-              (Eithers.bind
-                (Reduction.reduceTerm @@ var "cx" @@ var "g" @@ boolean True @@ (Core.termApplication $ Core.application (var "inSpec") (var "record")))
-                ("__term" ~>
-                  ExtractCore.maybeTerm @@ ("t" ~> right (var "t")) @@ var "g" @@ var "__term"))
-              ("mInId" ~>
-                Eithers.bind
-                  (evaluateProperties @@ var "cx" @@ var "g" @@ var "propSpecs" @@ var "record")
-                  ("props" ~>
-                    right $
-                      Maybes.bind (var "mOutId")
-                        ("outId" ~>
-                          Maybes.map
-                            ("inId" ~>
-                              record PG._Edge [
-                                PG._Edge_label>>: var "label",
-                                PG._Edge_id>>: var "id",
-                                PG._Edge_out>>: var "outId",
-                                PG._Edge_in>>: var "inId",
-                                PG._Edge_properties>>: var "props"])
-                            (var "mInId"))))))
-
--- | Evaluate a vertex specification against a record term
-evaluateVertex :: TTermDefinition (Context -> Graph -> PG.Vertex Term -> Term -> Either Error (Maybe (PG.Vertex Term)))
-evaluateVertex = define "evaluateVertex" $
-  doc "Evaluate a vertex specification against a record term to produce an optional vertex" $
-  "cx" ~> "g" ~> "vertexSpec" ~> "record" ~>
-    "label" <~ (project PG._Vertex PG._Vertex_label @@ var "vertexSpec") $
-    "idSpec" <~ (project PG._Vertex PG._Vertex_id @@ var "vertexSpec") $
-    "propSpecs" <~ (project PG._Vertex PG._Vertex_properties @@ var "vertexSpec") $
-    Eithers.bind
-      (Eithers.bind
-        (Reduction.reduceTerm @@ var "cx" @@ var "g" @@ boolean True @@ (Core.termApplication $ Core.application (var "idSpec") (var "record")))
-        ("__term" ~>
-          ExtractCore.maybeTerm @@ ("t" ~> right (var "t")) @@ var "g" @@ var "__term"))
-      ("mId" ~>
-        Eithers.bind
-          (evaluateProperties @@ var "cx" @@ var "g" @@ var "propSpecs" @@ var "record")
-          ("props" ~>
-            right $
-              Maybes.map
-                ("id" ~>
-                  record PG._Vertex [
-                    PG._Vertex_label>>: var "label",
-                    PG._Vertex_id>>: var "id",
-                    PG._Vertex_properties>>: var "props"])
-                (var "mId")))
-
--- | Check if an element is an edge
-elementIsEdge :: TTermDefinition (PG.Element a -> Bool)
-elementIsEdge = define "elementIsEdge" $
-  doc "Check if an element is an edge" $
-  "el" ~>
-    match PG._Element (Just $ boolean False) [
-      PG._Element_edge>>: constant $ boolean True]
-    @@ var "el"
-
--- | Check if an element is a vertex
-elementIsVertex :: TTermDefinition (PG.Element a -> Bool)
-elementIsVertex = define "elementIsVertex" $
-  doc "Check if an element is a vertex" $
-  "el" ~>
-    match PG._Element (Just $ boolean False) [
-      PG._Element_vertex>>: constant $ boolean True]
-    @@ var "el"
-
--- | Find table names referenced in a term by looking for record projections
-findTablesInTerm :: TTermDefinition (Term -> S.Set String)
-findTablesInTerm = define "findTablesInTerm" $
-  doc "Find table names referenced in a term by looking for record projections" $
-  "term" ~>
-    Rewriting.foldOverTerm @@ Coders.traversalOrderPre
-      @@ ("names" ~> "t" ~>
-        match _Term (Just $ var "names") [
-          _Term_project>>: "proj" ~>
-            Sets.insert
-              (Core.unName (project _Projection _Projection_typeName @@ var "proj"))
-              (var "names")]
-        @@ var "t")
-      @@ Sets.empty
-      @@ var "term"
-
--- | Find table names referenced in multiple terms
-findTablesInTerms :: TTermDefinition ([Term] -> S.Set String)
-findTablesInTerms = define "findTablesInTerms" $
-  doc "Find table names referenced in multiple terms" $
-  "terms" ~>
-    Sets.unions $ Lists.map findTablesInTerm (var "terms")
-
--- | Get the table name for an edge specification
-tableForEdge :: TTermDefinition (PG.Edge Term -> Either String String)
-tableForEdge = define "tableForEdge" $
-  doc "Get the table name for an edge specification. Returns an error if not exactly one table is referenced." $
-  "edge" ~>
-    "label" <~ (project PG._Edge PG._Edge_label @@ var "edge") $
-    "id" <~ (project PG._Edge PG._Edge_id @@ var "edge") $
-    "outId" <~ (project PG._Edge PG._Edge_out @@ var "edge") $
-    "inId" <~ (project PG._Edge PG._Edge_in @@ var "edge") $
-    "props" <~ (project PG._Edge PG._Edge_properties @@ var "edge") $
-    "tables" <~ (findTablesInTerms @@ Lists.concat2
-      (list [var "id", var "outId", var "inId"])
-      (Maps.elems $ var "props")) $
-    Logic.ifElse (Equality.equal (Sets.size $ var "tables") (int32 1))
-      (Maybes.maybe
-        (left $ string "unreachable: empty tables set")
-        (unaryFunction right)
-        (Lists.maybeHead $ Sets.toList $ var "tables"))
-      (left $ Strings.cat $ list [
-        string "Specification for ",
-        unwrap PG._EdgeLabel @@ var "label",
-        string " edges has wrong number of tables"])
-
--- | Get the table name for a vertex specification
-tableForVertex :: TTermDefinition (PG.Vertex Term -> Either String String)
-tableForVertex = define "tableForVertex" $
-  doc "Get the table name for a vertex specification. Returns an error if not exactly one table is referenced." $
-  "vertex" ~>
-    "label" <~ (project PG._Vertex PG._Vertex_label @@ var "vertex") $
-    "id" <~ (project PG._Vertex PG._Vertex_id @@ var "vertex") $
-    "props" <~ (project PG._Vertex PG._Vertex_properties @@ var "vertex") $
-    "tables" <~ (findTablesInTerms @@ Lists.cons (var "id") (Maps.elems $ var "props")) $
-    Logic.ifElse (Equality.equal (Sets.size $ var "tables") (int32 1))
-      (Maybes.maybe
-        (left $ string "unreachable: empty tables set")
-        (unaryFunction right)
-        (Lists.maybeHead $ Sets.toList $ var "tables"))
-      (left $ Strings.cat $ list [
-        string "Specification for ",
-        unwrap PG._VertexLabel @@ var "label",
-        string " vertices has wrong number of tables"])
-
--- | Group element specifications by their source table
-elementSpecsByTable :: TTermDefinition (PG.LazyGraph Term -> Either String (M.Map String ([PG.Vertex Term], [PG.Edge Term])))
-elementSpecsByTable = define "elementSpecsByTable" $
-  doc "Group element specifications by their source table" $
-  "graph" ~>
-    "vertices" <~ (project PG._LazyGraph PG._LazyGraph_vertices @@ var "graph") $
-    "edges" <~ (project PG._LazyGraph PG._LazyGraph_edges @@ var "graph") $
-    -- Map vertices to (table, vertex) pairs
-    Eithers.bind
-      (Eithers.mapList
-        ("v" ~> Eithers.map ("t" ~> pair (var "t") (var "v")) (tableForVertex @@ var "v"))
-        (var "vertices"))
-      ("vertexPairs" ~>
-        -- Map edges to (table, edge) pairs
-        Eithers.bind
-          (Eithers.mapList
-            ("e" ~> Eithers.map ("t" ~> pair (var "t") (var "e")) (tableForEdge @@ var "e"))
-            (var "edges"))
-          ("edgePairs" ~>
-            -- Build the map by folding over pairs
-            "addVertex" <~ ("m" ~> "p" ~>
-              "table" <~ Pairs.first (var "p") $
-              "v" <~ Pairs.second (var "p") $
-              "existing" <~ Maps.lookup (var "table") (var "m") $
-              "current" <~ Maybes.fromMaybe (pair (list ([] :: [TTerm (PG.Vertex Term)])) (list ([] :: [TTerm (PG.Edge Term)]))) (var "existing") $
-              Maps.insert (var "table")
-                (pair
-                  (Lists.cons (var "v") (Pairs.first $ var "current"))
-                  (Pairs.second $ var "current"))
-                (var "m")) $
-            "addEdge" <~ ("m" ~> "p" ~>
-              "table" <~ Pairs.first (var "p") $
-              "e" <~ Pairs.second (var "p") $
-              "existing" <~ Maps.lookup (var "table") (var "m") $
-              "current" <~ Maybes.fromMaybe (pair (list ([] :: [TTerm (PG.Vertex Term)])) (list ([] :: [TTerm (PG.Edge Term)]))) (var "existing") $
-              Maps.insert (var "table")
-                (pair
-                  (Pairs.first $ var "current")
-                  (Lists.cons (var "e") (Pairs.second $ var "current")))
-                (var "m")) $
-            "vertexMap" <~ Lists.foldl (var "addVertex") Maps.empty (var "vertexPairs") $
-            right $ Lists.foldl (var "addEdge") (var "vertexMap") (var "edgePairs")))
-
--- | Convert a data row to a record term given a table type
-termRowToRecord :: TTermDefinition (Tab.TableType -> Tab.DataRow Term -> Term)
-termRowToRecord = define "termRowToRecord" $
-  doc "Convert a data row to a record term given a table type" $
-  "tableType" ~> "row" ~>
-    "tname" <~ (unwrap Rel._RelationName @@ (project Tab._TableType Tab._TableType_name @@ var "tableType")) $
-    "colTypes" <~ (project Tab._TableType Tab._TableType_columns @@ var "tableType") $
-    "cells" <~ (unwrap Tab._DataRow @@ var "row") $
-    Core.termRecord $ Core.record (wrap _Name $ var "tname") $
-      Lists.zipWith
-        ("colType" ~> "mvalue" ~>
-          "cname" <~ (unwrap Rel._ColumnName @@ (project Tab._ColumnType Tab._ColumnType_name @@ var "colType")) $
-          Core.field (wrap _Name $ var "cname") (Core.termMaybe $ var "mvalue"))
-        (var "colTypes")
-        (var "cells")
-
--- | Transform a record through vertex and edge specifications
-transformRecord :: TTermDefinition (Context -> Graph -> [PG.Vertex Term] -> [PG.Edge Term] -> Term -> Either Error ([PG.Vertex Term], [PG.Edge Term]))
-transformRecord = define "transformRecord" $
-  doc "Transform a record through vertex and edge specifications to produce vertices and edges" $
-  "cx" ~> "g" ~> "vspecs" ~> "especs" ~> "record" ~>
-    Eithers.bind
-      (Eithers.mapList ("spec" ~> evaluateVertex @@ var "cx" @@ var "g" @@ var "spec" @@ var "record") (var "vspecs"))
-      ("mVertices" ~>
-        Eithers.bind
-          (Eithers.mapList ("spec" ~> evaluateEdge @@ var "cx" @@ var "g" @@ var "spec" @@ var "record") (var "especs"))
-          ("mEdges" ~>
-            right $ pair (Maybes.cat $ var "mVertices") (Maybes.cat $ var "mEdges")))
-
---------------------------------------------------------------------------------
--- CSV Parsing (pure functions)
-
--- | Parse a CSV line into a list of optional string values
--- Empty fields become Nothing, non-empty fields become Just value
--- Handles quoted fields (double-quote to escape quotes within quoted fields)
-parseCsvLine :: TTermDefinition (String -> Either String [Maybe String])
-parseCsvLine = define "parseCsvLine" $
-  doc "Parse a CSV line into fields. Empty fields become Nothing." $
-  "line" ~>
-    -- State is (accumulator, currentField, inQuotes) as a nested pair
-    -- ((acc, field), inQuotes)
-    "chars" <~ Strings.toList (var "line") $
-    "initState" <~ pair (pair (list ([] :: [TTerm (Maybe String)])) (string "")) (boolean False) $
-    "finalState" <~ Lists.foldl parseCsvChar (var "initState") (var "chars") $
-    -- Extract final state
-    "acc" <~ Pairs.first (Pairs.first $ var "finalState") $
-    "field" <~ Pairs.second (Pairs.first $ var "finalState") $
-    "inQuotes" <~ Pairs.second (var "finalState") $
-    -- Finalize: check for unclosed quote, add final field
-    Logic.ifElse (var "inQuotes")
-      (left $ string "Unclosed quoted field")
-      (right $ Lists.reverse $ Lists.cons (normalizeField @@ var "field") (var "acc"))
-
--- | Process a single character during CSV parsing
--- State: ((accumulator, currentField), inQuotes)
-parseCsvChar :: TTermDefinition ((([Maybe String], String), Bool) -> Int -> (([Maybe String], String), Bool))
-parseCsvChar = define "parseCsvChar" $
-  doc "Process a single character during CSV parsing" $
-  "state" ~> "c" ~>
-    "acc" <~ Pairs.first (Pairs.first $ var "state") $
-    "field" <~ Pairs.second (Pairs.first $ var "state") $
-    "inQuotes" <~ Pairs.second (var "state") $
-    Logic.ifElse (Equality.equal (var "c") (int32 34))  -- '"' = 34
-      (-- Quote character
-        Logic.ifElse (var "inQuotes")
-          (-- Inside quotes - this ends the quoted section
-            pair (pair (var "acc") (var "field")) (boolean False))
-          (-- Not inside quotes - start quoted section (only if field is empty)
-            Logic.ifElse (Strings.null $ var "field")
-              (pair (pair (var "acc") (var "field")) (boolean True))
-              (-- Quote inside non-empty unquoted field - just add it (simplified behavior)
-                pair (pair (var "acc") (Strings.cat2 (var "field") (string "\""))) (var "inQuotes"))))
-      (-- Not a quote
-        Logic.ifElse (Logic.and (Equality.equal (var "c") (int32 44)) (Logic.not $ var "inQuotes"))  -- ',' = 44
-          (-- Comma outside quotes - end of field
-            pair (pair (Lists.cons (normalizeField @@ var "field") (var "acc")) (string "")) (boolean False))
-          (-- Regular character - append to field
-            pair (pair (var "acc") (Strings.cat2 (var "field") (Strings.fromList $ list [var "c"]))) (var "inQuotes")))
-
--- | Normalize a CSV field - empty string becomes Nothing, otherwise Just
-normalizeField :: TTermDefinition (String -> Maybe String)
-normalizeField = define "normalizeField" $
-  doc "Normalize a CSV field value - empty becomes Nothing" $
-  "s" ~>
-    Logic.ifElse (Strings.null $ var "s")
-      nothing
-      (just $ var "s")
-
--- | Concatenate two pairs of lists (used for accumulating vertices and edges)
-concatPairs :: TTermDefinition (([a], [b]) -> ([a], [b]) -> ([a], [b]))
-concatPairs = define "concatPairs" $
-  doc "Concatenate two pairs of lists" $
-  "acc" ~> "p" ~>
-    pair
-      (Lists.concat2 (Pairs.first $ var "acc") (Pairs.first $ var "p"))
-      (Lists.concat2 (Pairs.second $ var "acc") (Pairs.second $ var "p"))
-
--- | Build a map from table name to table type for efficient lookup
-tableTypesByName :: TTermDefinition ([Tab.TableType] -> M.Map Rel.RelationName Tab.TableType)
-tableTypesByName = define "tableTypesByName" $
-  doc "Build a map from table name to table type" $
-  "tableTypes" ~>
-    Maps.fromList $ Lists.map
-      ("t" ~> pair (project Tab._TableType Tab._TableType_name @@ var "t") (var "t"))
-      (var "tableTypes")
-
--- | Strip leading and trailing whitespace from a string
-stripWhitespace :: TTermDefinition (String -> String)
-stripWhitespace = define "stripWhitespace" $
-  doc "Strip leading and trailing whitespace from a string" $
-  "s" ~>
-    -- Convert to list of chars, drop leading spaces, reverse, drop leading spaces, reverse back
-    "chars" <~ Strings.toList (var "s") $
-    "isSpaceChar" <~ ("c" ~> Chars.isSpace (var "c")) $
-    "trimLeft" <~ Lists.dropWhile (var "isSpaceChar") (var "chars") $
-    "trimRight" <~ Lists.reverse (Lists.dropWhile (var "isSpaceChar") (Lists.reverse $ var "trimLeft")) $
-    Strings.fromList (var "trimRight")
-
--- | Check if any element in a list satisfies a predicate
-listAny :: TTermDefinition ((a -> Bool) -> [a] -> Bool)
-listAny = define "listAny" $
-  doc "Check if any element in a list satisfies a predicate" $
-  "pred" ~> "xs" ~>
-    Logic.not $ Lists.null $ Lists.filter (var "pred") (var "xs")
-
--- | Parse a single CSV line, returning Nothing for empty/whitespace-only lines
-parseSingleLine :: TTermDefinition (String -> Either String (Maybe [Maybe String]))
-parseSingleLine = define "parseSingleLine" $
-  doc "Parse a single CSV line, returning Nothing for empty lines" $
-  "line" ~>
-    "trimmed" <~ (stripWhitespace @@ var "line") $
-    Logic.ifElse (Strings.null $ var "trimmed")
-      (right nothing)
-      (Eithers.map ("x" ~> just (var "x")) (parseCsvLine @@ var "trimmed"))
-
--- | Parse raw CSV lines into a Table of strings
--- Takes: hasHeader flag, list of raw lines
--- Returns: Either error or Table String
-parseTableLines :: TTermDefinition (Bool -> [String] -> Either String (Tab.Table String))
-parseTableLines = define "parseTableLines" $
-  doc "Parse raw CSV lines into a Table of strings" $
-  "hasHeader" ~> "rawLines" ~>
-    -- Parse each line (returns Either String (Maybe [Maybe String]) for each)
-    Eithers.bind
-      (Eithers.mapList ("ln" ~> parseSingleLine @@ var "ln") (var "rawLines"))
-      ("parsedRows" ~>
-        -- Filter out empty lines (Nothing values) to get [[Maybe String]]
-        "rows" <~ Maybes.cat (var "parsedRows") $
-        -- Build the table based on hasHeader flag
-        Logic.ifElse (var "hasHeader")
-          (-- With header: first row is header, rest are data
-            Maybes.maybe
-              (left $ string "empty rows: cannot parse header")
-              (lambda "p" $ lets [
-                "headerRow">: Pairs.first (var "p"),
-                "dataRows">: Pairs.second (var "p")] $
-                -- Check for null headers
-                Logic.ifElse (listAny @@ ("m" ~> Maybes.isNothing (var "m")) @@ var "headerRow")
-                  (left $ string "null header column(s)")
-                  (right $ record Tab._Table [
-                    Tab._Table_header>>: just (wrap Tab._HeaderRow $ Maybes.cat $ var "headerRow"),
-                    Tab._Table_data>>: Lists.map ("r" ~> wrap Tab._DataRow (var "r")) (var "dataRows")]))
-              (Lists.uncons (var "rows")))
-          (-- No header: all rows are data
-            right $ record Tab._Table [
-              Tab._Table_header>>: nothing,
-              Tab._Table_data>>: Lists.map ("r" ~> wrap Tab._DataRow (var "r")) (var "rows")]))
-
--- | Transform all rows from a decoded table through vertex/edge specs
--- This is the pure part of table transformation (runs in Either monad)
-transformTableRows :: TTermDefinition (Context -> Graph -> [PG.Vertex Term] -> [PG.Edge Term] -> Tab.TableType -> [Tab.DataRow Term] -> Either Error ([PG.Vertex Term], [PG.Edge Term]))
-transformTableRows = define "transformTableRows" $
-  doc "Transform all rows from a table through vertex/edge specifications" $
-  "cx" ~> "g" ~> "vspecs" ~> "especs" ~> "tableType" ~> "rows" ~>
-    Eithers.map
-      ("pairs" ~> Lists.foldl concatPairs (pair (list ([] :: [TTerm (PG.Vertex Term)])) (list ([] :: [TTerm (PG.Edge Term)]))) (var "pairs"))
-      (Eithers.mapList
-        ("row" ~> transformRecord @@ var "cx" @@ var "g" @@ var "vspecs" @@ var "especs" @@ (termRowToRecord @@ var "tableType" @@ var "row"))
-        (var "rows"))
-
--- | Construct a LazyGraph from lists of vertices and edges
-makeLazyGraph :: TTermDefinition ([PG.Vertex Term] -> [PG.Edge Term] -> PG.LazyGraph Term)
-makeLazyGraph = define "makeLazyGraph" $
-  doc "Construct a LazyGraph from vertices and edges" $
-  "vertices" ~> "edges" ~>
-    record PG._LazyGraph [
-      PG._LazyGraph_vertices>>: var "vertices",
-      PG._LazyGraph_edges>>: var "edges"]
-
---------------------------------------------------------------------------------
--- Table Decoding (pure functions)
-
--- | Decode a table of strings into a table of terms based on column types
-decodeTable :: TTermDefinition (Tab.TableType -> Tab.Table String -> Either String (Tab.Table Term))
-decodeTable = define "decodeTable" $
-  doc "Decode a table of strings into a table of terms based on column type specifications" $
-  "tableType" ~> "table" ~>
-    "colTypes" <~ (project Tab._TableType Tab._TableType_columns @@ var "tableType") $
-    "header" <~ (project Tab._Table Tab._Table_header @@ var "table") $
-    "rows" <~ (project Tab._Table Tab._Table_data @@ var "table") $
-    Eithers.map
-      ("decodedRows" ~>
-        record Tab._Table [
-          Tab._Table_header>>: var "header",
-          Tab._Table_data>>: var "decodedRows"])
-      (Eithers.mapList
-        ("row" ~> decodeRow @@ var "colTypes" @@ var "row")
-        (var "rows"))
-
--- | Decode a single row based on column types
-decodeRow :: TTermDefinition ([Tab.ColumnType] -> Tab.DataRow String -> Either String (Tab.DataRow Term))
-decodeRow = define "decodeRow" $
-  doc "Decode a single data row based on column types" $
-  "colTypes" ~> "row" ~>
-    "cells" <~ (unwrap Tab._DataRow @@ var "row") $
-    Eithers.map
-      ("decodedCells" ~> wrap Tab._DataRow (var "decodedCells"))
-      (Eithers.mapList
-        ("pair" ~>
-          "colType" <~ Pairs.first (var "pair") $
-          "mvalue" <~ Pairs.second (var "pair") $
-          decodeCell @@ var "colType" @@ var "mvalue")
-        (Lists.zip (var "colTypes") (var "cells")))
-
--- | Decode a single cell value based on its column type
-decodeCell :: TTermDefinition (Tab.ColumnType -> Maybe String -> Either String (Maybe Term))
-decodeCell = define "decodeCell" $
-  doc "Decode a single cell value based on its column type" $
-  "colType" ~> "mvalue" ~>
-    "cname" <~ (unwrap Rel._ColumnName @@ (project Tab._ColumnType Tab._ColumnType_name @@ var "colType")) $
-    "typ" <~ (project Tab._ColumnType Tab._ColumnType_type @@ var "colType") $
-    -- Lift the decoder function to a let binding before Maybes.maybe
-    -- This avoids Python issues with match statements inside inline lambdas
-    "decodeValue" <~ ("value" ~>
-      "parseError" <~ (Strings.cat $ list [
-        string "Invalid value for column ",
-        var "cname",
-        string ": ",
-        var "value"]) $
-      match _Type (Just $ left $ Strings.cat $ list [
-        string "Unsupported type for column ",
-        var "cname"]) [
-        _Type_literal>>: "lt" ~>
-          match _LiteralType (Just $ left $ Strings.cat $ list [
-            string "Unsupported literal type for column ",
-            var "cname"]) [
-            _LiteralType_boolean>>: constant $
-              Maybes.maybe
-                (left $ var "parseError")
-                ("parsed" ~> right $ just $ Core.termLiteral $ Core.literalBoolean $ var "parsed")
-                (Literals.readBoolean $ var "value"),
-            _LiteralType_float>>: "ft" ~>
-              match _FloatType (Just $ left $ Strings.cat $ list [
-                string "Unsupported float type for column ",
-                var "cname"]) [
-                _FloatType_bigfloat>>: constant $
-                  Maybes.maybe
-                    (left $ var "parseError")
-                    ("parsed" ~> right $ just $ Core.termLiteral $ Core.literalFloat $ Core.floatValueBigfloat $ var "parsed")
-                    (Literals.readBigfloat $ var "value"),
-                _FloatType_float32>>: constant $
-                  Maybes.maybe
-                    (left $ var "parseError")
-                    ("parsed" ~> right $ just $ Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat32 $ var "parsed")
-                    (Literals.readFloat32 $ var "value"),
-                _FloatType_float64>>: constant $
-                  Maybes.maybe
-                    (left $ var "parseError")
-                    ("parsed" ~> right $ just $ Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat64 $ var "parsed")
-                    (Literals.readFloat64 $ var "value")]
-              @@ var "ft",
-            _LiteralType_integer>>: "it" ~>
-              match _IntegerType (Just $ left $ Strings.cat $ list [
-                string "Unsupported integer type for column ",
-                var "cname"]) [
-                _IntegerType_int32>>: constant $
-                  Maybes.maybe
-                    (left $ var "parseError")
-                    ("parsed" ~> right $ just $ Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ var "parsed")
-                    (Literals.readInt32 $ var "value"),
-                _IntegerType_int64>>: constant $
-                  Maybes.maybe
-                    (left $ var "parseError")
-                    ("parsed" ~> right $ just $ Core.termLiteral $ Core.literalInteger $ Core.integerValueInt64 $ var "parsed")
-                    (Literals.readInt64 $ var "value")]
-              @@ var "it",
-            _LiteralType_string>>: constant $
-              right $ just $ Core.termLiteral $ Core.literalString $ var "value"]
-          @@ var "lt"]
-      @@ var "typ") $
-    Maybes.maybe
-      (right nothing)  -- No value - return Nothing
-      (var "decodeValue")  -- Has value - use the lifted decoder function
-      (var "mvalue")
diff --git a/src/main/haskell/Hydra/Sources/Encode/Ast.hs b/src/main/haskell/Hydra/Sources/Encode/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Ast.hs
+++ /dev/null
@@ -1,1373 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.ast
-
-module Hydra.Sources.Encode.Ast where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.ast"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.ast"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.ast"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.associativity"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.ast.Associativity"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "none"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Associativity"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "none"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "left"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Associativity"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "left"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "right"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Associativity"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "right"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "both"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Associativity"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "both"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Associativity")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.blockStyle"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.BlockStyle"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "indent"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-                                    Core.projectionField = (Core.Name "indent")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "newlineBeforeContent"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "boolean"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-                                    Core.projectionField = (Core.Name "newlineBeforeContent")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "newlineAfterContent"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "boolean"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),
-                                    Core.projectionField = (Core.Name "newlineAfterContent")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.BlockStyle")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.bracketExpr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.BracketExpr"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "brackets"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.brackets")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-                                    Core.projectionField = (Core.Name "brackets")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "enclosed"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.expr")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-                                    Core.projectionField = (Core.Name "enclosed")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "style"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.blockStyle")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),
-                                    Core.projectionField = (Core.Name "style")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.BracketExpr")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.brackets"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Brackets"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "open"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.symbol")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),
-                                    Core.projectionField = (Core.Name "open")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "close"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.symbol")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),
-                                    Core.projectionField = (Core.Name "close")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Brackets")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.expr"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.ast.Expr"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "const"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Expr"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "const"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.symbol")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "indent"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Expr"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "indent"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.indentedExpression")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "op"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Expr"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "op"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.opExpr")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "brackets"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Expr"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "brackets"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.bracketExpr")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "seq"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Expr"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "seq"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.seqExpr")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Expr")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.indentedExpression"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.IndentedExpression"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "style"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.indentStyle")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-                                    Core.projectionField = (Core.Name "style")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expr"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.expr")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),
-                                    Core.projectionField = (Core.Name "expr")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.IndentedExpression")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.indentStyle"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.ast.IndentStyle"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "allLines"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.IndentStyle"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "allLines"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "string"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "subsequentLines"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.IndentStyle"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "subsequentLines"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "string"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.IndentStyle")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.op"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Op"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "symbol"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.symbol")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-                                    Core.projectionField = (Core.Name "symbol")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "padding"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.padding")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-                                    Core.projectionField = (Core.Name "padding")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "precedence"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.precedence")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-                                    Core.projectionField = (Core.Name "precedence")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "associativity"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.associativity")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Op"),
-                                    Core.projectionField = (Core.Name "associativity")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Op")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.opExpr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.OpExpr"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "op"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.op")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-                                    Core.projectionField = (Core.Name "op")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lhs"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.expr")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-                                    Core.projectionField = (Core.Name "lhs")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "rhs"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.expr")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),
-                                    Core.projectionField = (Core.Name "rhs")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.OpExpr")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.padding"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Padding"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "left"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.ws")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),
-                                    Core.projectionField = (Core.Name "left")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "right"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.ws")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),
-                                    Core.projectionField = (Core.Name "right")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Padding")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.precedence"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Precedence"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.ast.Precedence")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Precedence")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.seqExpr"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.SeqExpr"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "op"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.ast.op")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),
-                                    Core.projectionField = (Core.Name "op")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "elements"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.ast.expr"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),
-                                    Core.projectionField = (Core.Name "elements")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.SeqExpr")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.symbol"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Symbol"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.ast.Symbol")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Symbol")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.ast.ws"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.ast.Ws"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "none"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Ws"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "none"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "space"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Ws"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "space"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "break"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Ws"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "break"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "breakAndIndent"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Ws"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "breakAndIndent"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "string"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "doubleBreak"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.ast.Ws"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "doubleBreak"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.ast.Ws")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Classes.hs b/src/main/haskell/Hydra/Sources/Encode/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Classes.hs
+++ /dev/null
@@ -1,108 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.classes
-
-module Hydra.Sources.Encode.Classes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.classes"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.classes"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.classes"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.classes.typeClass"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.classes.TypeClass"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "equality"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.classes.TypeClass"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "equality"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "ordering"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.classes.TypeClass"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "ordering"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.classes.TypeClass")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Coders.hs b/src/main/haskell/Hydra/Sources/Encode/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Coders.hs
+++ /dev/null
@@ -1,243 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.coders
-
-module Hydra.Sources.Encode.Coders where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.coders"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.coders"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.context"),
-        (Packaging.Namespace "hydra.encode.errors"),
-        (Packaging.Namespace "hydra.encode.graph"),
-        (Packaging.Namespace "hydra.encode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.coders"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.coders.coderDirection"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.coders.CoderDirection"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "encode"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.coders.CoderDirection"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "encode"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "decode"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.coders.CoderDirection"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decode"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.coders.CoderDirection")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.coders.languageName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.coders.LanguageName"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.coders.LanguageName")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.coders.LanguageName")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.coders.traversalOrder"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.coders.TraversalOrder"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "pre"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.coders.TraversalOrder"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pre"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "post"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.coders.TraversalOrder"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "post"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.coders.TraversalOrder")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Context.hs b/src/main/haskell/Hydra/Sources/Encode/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Context.hs
+++ /dev/null
@@ -1,222 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.context
-
-module Hydra.Sources.Encode.Context where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.context"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.context"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.context"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.context.context"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.context.Context"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "trace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-                                    Core.projectionField = (Core.Name "trace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "messages"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-                                    Core.projectionField = (Core.Name "messages")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.context.Context"),
-                                    Core.projectionField = (Core.Name "other")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.context.inContext"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "e"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.context.InContext"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "object"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "e")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.context.InContext"),
-                                      Core.projectionField = (Core.Name "object")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "context"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.context.context")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.context.InContext"),
-                                      Core.projectionField = (Core.Name "context")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "e"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "e")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.context.InContext")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "e"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Core.hs b/src/main/haskell/Hydra/Sources/Encode/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Core.hs
+++ /dev/null
@@ -1,4543 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.core
-
-module Hydra.Sources.Encode.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.core"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.core"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.core"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.annotatedTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.AnnotatedTerm"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotation"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                    Core.projectionField = (Core.Name "annotation")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.AnnotatedTerm")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.annotatedType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.AnnotatedType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotation"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),
-                                    Core.projectionField = (Core.Name "annotation")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.AnnotatedType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.application"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Application"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "function"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Application"),
-                                    Core.projectionField = (Core.Name "function")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "argument"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Application"),
-                                    Core.projectionField = (Core.Name "argument")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Application")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.applicationType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.ApplicationType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "function"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),
-                                    Core.projectionField = (Core.Name "function")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "argument"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),
-                                    Core.projectionField = (Core.Name "argument")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.ApplicationType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.binding"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Binding"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-                                    Core.projectionField = (Core.Name "term")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeScheme"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.typeScheme"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Binding"),
-                                    Core.projectionField = (Core.Name "typeScheme")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Binding")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.caseStatement"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.CaseStatement"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "default"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-                                    Core.projectionField = (Core.Name "default")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cases"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.field"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),
-                                    Core.projectionField = (Core.Name "cases")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.CaseStatement")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.eitherType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.EitherType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "left"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),
-                                    Core.projectionField = (Core.Name "left")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "right"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),
-                                    Core.projectionField = (Core.Name "right")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.EitherType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.pairType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.PairType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "first"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.PairType"),
-                                    Core.projectionField = (Core.Name "first")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "second"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.PairType"),
-                                    Core.projectionField = (Core.Name "second")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.PairType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.field"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Field"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Field"),
-                                    Core.projectionField = (Core.Name "term")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Field")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.fieldType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FieldType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.FieldType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.floatType"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.FloatType"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "bigfloat"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FloatType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigfloat"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float32"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FloatType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float32"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float64"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FloatType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float64"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.FloatType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.floatValue"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "bigfloat"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FloatValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigfloat"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "float"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "bigfloat"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float32"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FloatValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float32"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "float"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "float32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float64"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FloatValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float64"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "float"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "float64"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.FloatValue")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.forallType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.ForallType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "parameter"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-                                    Core.projectionField = (Core.Name "parameter")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.ForallType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.functionType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.FunctionType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "domain"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),
-                                    Core.projectionField = (Core.Name "domain")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "codomain"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),
-                                    Core.projectionField = (Core.Name "codomain")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.FunctionType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.injection"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Injection"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "field"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.field")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Injection"),
-                                    Core.projectionField = (Core.Name "field")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Injection")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.integerType"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerType"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "bigint"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigint"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int8"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int8"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int16"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int16"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int32"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int32"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int64"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int64"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint8"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint8"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint16"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint16"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint32"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint32"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint64"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint64"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.IntegerType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.integerValue"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "bigint"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bigint"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "bigint"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int8"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int8"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int8"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int16"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int16"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int16"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int32"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int32"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "int64"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "int64"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int64"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint8"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint8"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "uint8"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint16"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint16"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "uint16"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint32"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint32"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "uint32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "uint64"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.IntegerValue"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "uint64"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "uint64"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.IntegerValue")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.lambda"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Lambda"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "parameter"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-                                    Core.projectionField = (Core.Name "parameter")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "domain"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-                                    Core.projectionField = (Core.Name "domain")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Lambda")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.let"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Let"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bindings"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.binding"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Let"),
-                                    Core.projectionField = (Core.Name "bindings")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Let"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Let")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.literal"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "binary"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Literal"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binary"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "binary"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "boolean"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Literal"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "boolean"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "decimal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Literal"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decimal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "decimal"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Literal"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.floatValue")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "integer"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Literal"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "integer"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.integerValue")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "string"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Literal"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "string"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Literal")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.literalType"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.LiteralType"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "binary"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.LiteralType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binary"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "boolean"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.LiteralType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "decimal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.LiteralType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decimal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.LiteralType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.floatType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "integer"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.LiteralType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "integer"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.integerType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "string"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.LiteralType"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.LiteralType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.mapType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.MapType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "keys"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.MapType"),
-                                    Core.projectionField = (Core.Name "keys")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "values"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.MapType"),
-                                    Core.projectionField = (Core.Name "values")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.MapType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.name"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Name"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.core.Name")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.projection"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Projection"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Projection"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "field"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Projection"),
-                                    Core.projectionField = (Core.Name "field")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Projection")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.record"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Record"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Record"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "fields"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.field"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.Record"),
-                                    Core.projectionField = (Core.Name "fields")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Record")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.term"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "annotated"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.annotatedTerm")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "application"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.application")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "cases"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cases"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.caseStatement")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "either"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "e"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "either"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.bimap")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "inject"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inject"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.injection")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.lambda")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "let"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "let"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.let")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "list"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "xs"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "list"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "literal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.literal")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "map"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "m"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "map"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "maybe"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "opt"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "maybe"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pair"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "p"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "pair"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.bimap")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "project"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "project"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.projection")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.record")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "set"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "s"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "set"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeApplication"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeApplication"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.typeApplicationTerm")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeLambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeLambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.typeLambda")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unit"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unwrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unwrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "variable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Term"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.wrappedTerm")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.type"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.core.Type"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "annotated"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.annotatedType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "application"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.applicationType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "either"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.eitherType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "forall"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "forall"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.forallType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "function"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "function"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.functionType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "list"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "literal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.literalType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "map"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.mapType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "maybe"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pair"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.pairType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "xs"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "list"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.fieldType"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "set"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "union"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "union"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "xs"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "list"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.fieldType"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unit"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "variable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "void"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "void"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.Type"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.typeApplicationTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.TypeApplicationTerm"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.TypeApplicationTerm")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.typeLambda"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.TypeLambda"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "parameter"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),
-                                    Core.projectionField = (Core.Name "parameter")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.TypeLambda")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.typeScheme"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.TypeScheme"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variables"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-                                    Core.projectionField = (Core.Name "variables")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "constraints"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "m"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "map"),
-                                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.typeVariableMetadata"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),
-                                    Core.projectionField = (Core.Name "constraints")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.TypeScheme")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.typeVariableMetadata"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.TypeVariableMetadata"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "classes"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "s"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "set"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),
-                                    Core.projectionField = (Core.Name "classes")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.TypeVariableMetadata")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.core.wrappedTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.core.WrappedTerm"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                                    Core.projectionField = (Core.Name "body")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.WrappedTerm")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Error/Checking.hs b/src/main/haskell/Hydra/Sources/Encode/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Error/Checking.hs
+++ /dev/null
@@ -1,1257 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.error.checking
-
-module Hydra.Sources.Encode.Error.Checking where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.error.checking"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.error.checking"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.paths"),
-        (Packaging.Namespace "hydra.encode.typing"),
-        (Packaging.Namespace "hydra.encode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.error.checking"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.checkingError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.error.checking.CheckingError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "incorrectUnification"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "incorrectUnification"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.incorrectUnificationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "notAForallType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notAForallType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.notAForallTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "notAFunctionType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notAFunctionType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.notAFunctionTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "other"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.otherCheckingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeArityMismatch"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeArityMismatch"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.typeArityMismatchError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeMismatch"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeMismatch"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.typeMismatchError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unboundTypeVariables"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unboundTypeVariables"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.unboundTypeVariablesError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTermVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTermVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.undefinedTermVariableCheckingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unequalTypes"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unequalTypes"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.unequalTypesError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unsupportedTermVariant"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupportedTermVariant"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.unsupportedTermVariantError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "untypedLambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedLambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.untypedLambdaError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "untypedLetBinding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedLetBinding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.untypedLetBindingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "untypedTermVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.CheckingError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedTermVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.untypedTermVariableCheckingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.CheckingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.incorrectUnificationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.IncorrectUnificationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "substitution"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.typing.typeSubst")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),
-                                    Core.projectionField = (Core.Name "substitution")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.IncorrectUnificationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.notAForallTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.NotAForallTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeArguments"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),
-                                    Core.projectionField = (Core.Name "typeArguments")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.NotAForallTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.notAFunctionTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.NotAFunctionTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.NotAFunctionTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.otherCheckingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.OtherCheckingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "message"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.OtherCheckingError"),
-                                    Core.projectionField = (Core.Name "message")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.OtherCheckingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.typeArityMismatchError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.TypeArityMismatchError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expectedArity"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "integer"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "int32"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-                                    Core.projectionField = (Core.Name "expectedArity")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "actualArity"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "integer"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "int32"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-                                    Core.projectionField = (Core.Name "actualArity")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeArguments"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),
-                                    Core.projectionField = (Core.Name "typeArguments")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.TypeArityMismatchError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.typeMismatchError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.TypeMismatchError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expectedType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-                                    Core.projectionField = (Core.Name "expectedType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "actualType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),
-                                    Core.projectionField = (Core.Name "actualType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.TypeMismatchError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.unboundTypeVariablesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UnboundTypeVariablesError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variables"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "s"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "set"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-                                    Core.projectionField = (Core.Name "variables")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UnboundTypeVariablesError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.undefinedTermVariableCheckingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UndefinedTermVariableCheckingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UndefinedTermVariableCheckingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.unequalTypesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UnequalTypesError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "types"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-                                    Core.projectionField = (Core.Name "types")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),
-                                    Core.projectionField = (Core.Name "description")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UnequalTypesError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.unsupportedTermVariantError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UnsupportedTermVariantError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "termVariant"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.variants.termVariant")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),
-                                    Core.projectionField = (Core.Name "termVariant")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UnsupportedTermVariantError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.untypedLambdaError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UntypedLambdaError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UntypedLambdaError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.untypedLetBindingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UntypedLetBindingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binding"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.binding")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),
-                                    Core.projectionField = (Core.Name "binding")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UntypedLetBindingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.checking.untypedTermVariableCheckingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.checking.UntypedTermVariableCheckingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.checking.UntypedTermVariableCheckingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Error/Core.hs b/src/main/haskell/Hydra/Sources/Encode/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Error/Core.hs
+++ /dev/null
@@ -1,3377 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.error.core
-
-module Hydra.Sources.Encode.Error.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.error.core"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.error.core"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.paths",
-        (Packaging.Namespace "hydra.encode.core"),
-        (Packaging.Namespace "hydra.encode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.error.core"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.duplicateBindingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.DuplicateBindingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateBindingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.duplicateFieldError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.DuplicateFieldError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateFieldError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.undefinedFieldError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UndefinedFieldError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "fieldName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-                                    Core.projectionField = (Core.Name "fieldName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedFieldError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.unexpectedTermVariantError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UnexpectedTermVariantError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expectedVariant"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.variants.termVariant")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-                                    Core.projectionField = (Core.Name "expectedVariant")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "actualTerm"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),
-                                    Core.projectionField = (Core.Name "actualTerm")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UnexpectedTermVariantError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.unexpectedTypeVariantError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UnexpectedTypeVariantError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expectedVariant"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.variants.typeVariant")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-                                    Core.projectionField = (Core.Name "expectedVariant")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "actualType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),
-                                    Core.projectionField = (Core.Name "actualType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UnexpectedTypeVariantError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.constantConditionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.ConstantConditionError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "boolean"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),
-                                    Core.projectionField = (Core.Name "value")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.ConstantConditionError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyCaseStatementError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyCaseStatementError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyCaseStatementError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyLetBindingsError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyLetBindingsError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyLetBindingsError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyTermAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyTermAnnotationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyTermAnnotationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyTypeNameInTermError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyTypeNameInTermError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyTypeNameInTermError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidLambdaParameterNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidLambdaParameterNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidLambdaParameterNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidLetBindingNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidLetBindingNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidLetBindingNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidTypeLambdaParameterNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeLambdaParameterNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.nestedTermAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.NestedTermAnnotationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.NestedTermAnnotationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.redundantWrapUnwrapError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.RedundantWrapUnwrapError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.RedundantWrapUnwrapError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.selfApplicationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.SelfApplicationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.SelfApplicationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.termVariableShadowingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.TermVariableShadowingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.TermVariableShadowingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.typeVariableShadowingInTypeLambdaError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.TypeVariableShadowingInTypeLambdaError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.undefinedTermVariableError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UndefinedTermVariableError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTermVariableError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.undefinedTypeVariableInBindingTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UndefinedTypeVariableInBindingTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.undefinedTypeVariableInLambdaDomainError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.undefinedTypeVariableInTypeApplicationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.unknownPrimitiveNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UnknownPrimitiveNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UnknownPrimitiveNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.unnecessaryIdentityApplicationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UnnecessaryIdentityApplicationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.untypedTermVariableError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UntypedTermVariableError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UntypedTermVariableError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidTermError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.error.core.InvalidTermError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "constantCondition"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "constantCondition"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.constantConditionError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateBinding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateBinding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.duplicateBindingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.duplicateFieldError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyCaseStatement"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyCaseStatement"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyCaseStatementError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyLetBindings"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyLetBindings"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyLetBindingsError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyTermAnnotation"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyTermAnnotation"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyTermAnnotationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyTypeNameInTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyTypeNameInTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyTypeNameInTermError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "invalidLambdaParameterName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidLambdaParameterName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.invalidLambdaParameterNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "invalidLetBindingName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidLetBindingName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.invalidLetBindingNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "invalidTypeLambdaParameterName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidTypeLambdaParameterName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.invalidTypeLambdaParameterNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "nestedTermAnnotation"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nestedTermAnnotation"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.nestedTermAnnotationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "redundantWrapUnwrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "redundantWrapUnwrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.redundantWrapUnwrapError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "selfApplication"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "selfApplication"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.selfApplicationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "termVariableShadowing"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "termVariableShadowing"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.termVariableShadowingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeVariableShadowingInTypeLambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeVariableShadowingInTypeLambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.typeVariableShadowingInTypeLambdaError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTermVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTermVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedTermVariableError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTypeVariableInBindingType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariableInBindingType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedTypeVariableInBindingTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTypeVariableInLambdaDomain"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariableInLambdaDomain"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedTypeVariableInLambdaDomainError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTypeVariableInTypeApplication"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariableInTypeApplication"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedTypeVariableInTypeApplicationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unknownPrimitiveName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unknownPrimitiveName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.unknownPrimitiveNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unnecessaryIdentityApplication"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unnecessaryIdentityApplication"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.unnecessaryIdentityApplicationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "untypedTermVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTermError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedTermVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.untypedTermVariableError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTermError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.duplicateRecordTypeFieldNamesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.DuplicateRecordTypeFieldNamesError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.duplicateUnionTypeFieldNamesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.DuplicateUnionTypeFieldNamesError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyRecordTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyRecordTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyRecordTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyTypeAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyTypeAnnotationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyTypeAnnotationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.emptyUnionTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.EmptyUnionTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.EmptyUnionTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidForallParameterNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidForallParameterNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidForallParameterNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidTypeSchemeVariableNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeSchemeVariableNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.nestedTypeAnnotationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.NestedTypeAnnotationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.NestedTypeAnnotationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.nonComparableMapKeyTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.NonComparableMapKeyTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "keyType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),
-                                    Core.projectionField = (Core.Name "keyType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.NonComparableMapKeyTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.nonComparableSetElementTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.NonComparableSetElementTypeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "elementType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),
-                                    Core.projectionField = (Core.Name "elementType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.NonComparableSetElementTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.singleVariantUnionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.SingleVariantUnionError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "fieldName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),
-                                    Core.projectionField = (Core.Name "fieldName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.SingleVariantUnionError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.typeVariableShadowingInForallError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.TypeVariableShadowingInForallError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.TypeVariableShadowingInForallError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.undefinedTypeVariableError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.UndefinedTypeVariableError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.UndefinedTypeVariableError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.voidInNonBottomPositionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.VoidInNonBottomPositionError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "location"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),
-                                    Core.projectionField = (Core.Name "location")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.VoidInNonBottomPositionError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.core.invalidTypeError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateRecordTypeFieldNames"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateRecordTypeFieldNames"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.duplicateRecordTypeFieldNamesError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateUnionTypeFieldNames"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateUnionTypeFieldNames"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.duplicateUnionTypeFieldNamesError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyRecordType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyRecordType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyRecordTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyTypeAnnotation"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyTypeAnnotation"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyTypeAnnotationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyUnionType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyUnionType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.emptyUnionTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "invalidForallParameterName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidForallParameterName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.invalidForallParameterNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "invalidTypeSchemeVariableName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidTypeSchemeVariableName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.invalidTypeSchemeVariableNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "nestedTypeAnnotation"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nestedTypeAnnotation"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.nestedTypeAnnotationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "nonComparableMapKeyType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nonComparableMapKeyType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.nonComparableMapKeyTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "nonComparableSetElementType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nonComparableSetElementType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.nonComparableSetElementTypeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "singleVariantUnion"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "singleVariantUnion"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.singleVariantUnionError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeVariableShadowingInForall"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeVariableShadowingInForall"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.typeVariableShadowingInForallError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTypeVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTypeVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedTypeVariableError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "voidInNonBottomPosition"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.core.InvalidTypeError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "voidInNonBottomPosition"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.voidInNonBottomPositionError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.core.InvalidTypeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Error/Packaging.hs b/src/main/haskell/Hydra/Sources/Encode/Error/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Error/Packaging.hs
+++ /dev/null
@@ -1,552 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.error.packaging
-
-module Hydra.Sources.Encode.Error.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.error.packaging"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.error.packaging"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.packaging")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.error.packaging"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.conflictingModuleNamespaceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.ConflictingModuleNamespaceError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "first"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-                                    Core.projectionField = (Core.Name "first")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "second"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),
-                                    Core.projectionField = (Core.Name "second")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.conflictingVariantNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.ConflictingVariantNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "namespace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-                                    Core.projectionField = (Core.Name "namespace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-                                    Core.projectionField = (Core.Name "typeName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variantName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-                                    Core.projectionField = (Core.Name "variantName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conflictingName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),
-                                    Core.projectionField = (Core.Name "conflictingName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.ConflictingVariantNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.definitionNotInModuleNamespaceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.DefinitionNotInModuleNamespaceError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "namespace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-                                    Core.projectionField = (Core.Name "namespace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.duplicateDefinitionNameError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.DuplicateDefinitionNameError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "namespace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-                                    Core.projectionField = (Core.Name "namespace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.duplicateModuleNamespaceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.DuplicateModuleNamespaceError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "namespace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),
-                                    Core.projectionField = (Core.Name "namespace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.invalidModuleError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "conflictingVariantName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.InvalidModuleError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conflictingVariantName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.packaging.conflictingVariantNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "definitionNotInModuleNamespace"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.InvalidModuleError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "definitionNotInModuleNamespace"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.packaging.definitionNotInModuleNamespaceError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateDefinitionName"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.InvalidModuleError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateDefinitionName"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.packaging.duplicateDefinitionNameError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.InvalidModuleError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.error.packaging.invalidPackageError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "conflictingModuleNamespace"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.InvalidPackageError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conflictingModuleNamespace"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.packaging.conflictingModuleNamespaceError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateModuleNamespace"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.InvalidPackageError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateModuleNamespace"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.packaging.duplicateModuleNamespaceError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "invalidModule"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.error.packaging.InvalidPackageError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "invalidModule"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.packaging.invalidModuleError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.error.packaging.InvalidPackageError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Errors.hs b/src/main/haskell/Hydra/Sources/Encode/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Errors.hs
+++ /dev/null
@@ -1,1671 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.errors
-
-module Hydra.Sources.Encode.Errors where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.errors"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.errors"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.context",
-        (Packaging.Namespace "hydra.encode.core"),
-        (Packaging.Namespace "hydra.encode.error.checking"),
-        (Packaging.Namespace "hydra.encode.error.core"),
-        (Packaging.Namespace "hydra.encode.paths"),
-        (Packaging.Namespace "hydra.encode.typing"),
-        (Packaging.Namespace "hydra.encode.variants")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.errors"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.decodingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.DecodingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.errors.DecodingError")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.emptyListError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "_"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "unit"),
-                Core.fieldTerm = Core.TermUnit}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = Core.TypeUnit,
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.error"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.errors.Error"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "checking"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "checking"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.checkingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "decoding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decoding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.decodingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateBinding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateBinding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.duplicateBindingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "duplicateField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "duplicateField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.duplicateFieldError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "extraction"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "extraction"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.extractionError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "inference"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inference"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.inferenceError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "other"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.otherError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "resolution"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "resolution"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.resolutionError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedFieldError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undefinedTermVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undefinedTermVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.undefinedTermVariableError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "untypedTermVariable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "untypedTermVariable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.untypedTermVariableError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unexpectedTermVariant"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedTermVariant"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.unexpectedTermVariantError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unexpectedTypeVariant"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedTypeVariant"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.core.unexpectedTypeVariantError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unification"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.Error"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unification"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.unificationError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.Error")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.extractionError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.errors.ExtractionError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "emptyList"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "emptyList"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.emptyListError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "multipleBindings"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "multipleBindings"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.multipleBindingsError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "multipleFields"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "multipleFields"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.multipleFieldsError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "noMatchingField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noMatchingField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.noMatchingFieldError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "noSuchBinding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noSuchBinding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.noSuchBindingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "notEnoughCases"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notEnoughCases"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.notEnoughCasesError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unexpectedShape"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ExtractionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedShape"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.unexpectedShapeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.ExtractionError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.inferenceError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.errors.InferenceError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "checking"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.InferenceError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "checking"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.error.checking.checkingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "other"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.InferenceError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.otherInferenceError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unification"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.InferenceError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unification"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.unificationInferenceError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.InferenceError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.multipleBindingsError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.MultipleBindingsError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.MultipleBindingsError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.MultipleBindingsError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.multipleFieldsError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.MultipleFieldsError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "fieldName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.MultipleFieldsError"),
-                                    Core.projectionField = (Core.Name "fieldName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.MultipleFieldsError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.noMatchingFieldError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.NoMatchingFieldError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "fieldName"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.NoMatchingFieldError"),
-                                    Core.projectionField = (Core.Name "fieldName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.NoMatchingFieldError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.noSuchBindingError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.NoSuchBindingError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.NoSuchBindingError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchBindingError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.noSuchPrimitiveError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.NoSuchPrimitiveError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.NoSuchPrimitiveError"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.NoSuchPrimitiveError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.notEnoughCasesError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "_"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "unit"),
-                Core.fieldTerm = Core.TermUnit}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = Core.TypeUnit,
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.otherError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.OtherError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.errors.OtherError")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.OtherError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.otherInferenceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.OtherInferenceError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "message"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.OtherInferenceError"),
-                                    Core.projectionField = (Core.Name "message")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.OtherInferenceError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.otherResolutionError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.OtherResolutionError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.errors.OtherResolutionError")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.OtherResolutionError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.resolutionError"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.errors.ResolutionError"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "noSuchBinding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ResolutionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noSuchBinding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.noSuchBindingError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "noSuchPrimitive"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ResolutionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noSuchPrimitive"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.noSuchPrimitiveError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "noMatchingField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ResolutionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "noMatchingField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.noMatchingFieldError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "other"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ResolutionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "other"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.otherResolutionError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unexpectedShape"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.ResolutionError"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unexpectedShape"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.unexpectedShapeError")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.ResolutionError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.unexpectedShapeError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.UnexpectedShapeError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-                                    Core.projectionField = (Core.Name "expected")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "actual"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnexpectedShapeError"),
-                                    Core.projectionField = (Core.Name "actual")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.UnexpectedShapeError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.unificationError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.UnificationError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "leftType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-                                    Core.projectionField = (Core.Name "leftType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "rightType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-                                    Core.projectionField = (Core.Name "rightType")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "message"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),
-                                    Core.projectionField = (Core.Name "message")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.UnificationError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.errors.unificationInferenceError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.errors.UnificationInferenceError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cause"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.errors.unificationError")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.errors.UnificationInferenceError"),
-                                    Core.projectionField = (Core.Name "cause")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.errors.UnificationInferenceError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Json/Model.hs b/src/main/haskell/Hydra/Sources/Encode/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Json/Model.hs
+++ /dev/null
@@ -1,297 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.json.model
-
-module Hydra.Sources.Encode.Json.Model where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.json.model"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.json.model"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.json.model"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.json.model.value"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.json.model.Value"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "array"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.json.model.Value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "array"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "xs"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "list"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.json.model.value"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "boolean"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.json.model.Value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "boolean"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "null"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.json.model.Value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "null"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "number"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.json.model.Value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "number"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "decimal"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "object"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.json.model.Value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "object"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "m"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "map"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                                  Core.lambdaParameter = (Core.Name "x"),
-                                                  Core.lambdaDomain = Nothing,
-                                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                    Core.injectionField = Core.Field {
-                                                      Core.fieldName = (Core.Name "literal"),
-                                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                        Core.injectionField = Core.Field {
-                                                          Core.fieldName = (Core.Name "string"),
-                                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.json.model.value"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "string"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.json.model.Value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "string"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.json.model.Value")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Packaging.hs b/src/main/haskell/Hydra/Sources/Encode/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Packaging.hs
+++ /dev/null
@@ -1,848 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.packaging
-
-module Hydra.Sources.Encode.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.packaging"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.packaging"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.graph")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.packaging"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.definition"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.packaging.Definition"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "term"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.Definition"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.termDefinition")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "type"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.Definition"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.typeDefinition")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.Definition")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.fileExtension"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.FileExtension"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.packaging.FileExtension")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.FileExtension")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.module"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.Module"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-                                    Core.projectionField = (Core.Name "description")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "namespace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-                                    Core.projectionField = (Core.Name "namespace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "termDependencies"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-                                    Core.projectionField = (Core.Name "termDependencies")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeDependencies"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-                                    Core.projectionField = (Core.Name "typeDependencies")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "definitions"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.definition"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Module"),
-                                    Core.projectionField = (Core.Name "definitions")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.Module")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.namespace"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.Namespace"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.packaging.Namespace")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.Namespace")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.namespaces"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "n"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.Namespaces"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "focus"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "p"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "pair"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.packaging.Namespaces"),
-                                      Core.projectionField = (Core.Name "focus")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapping"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.packaging.Namespaces"),
-                                      Core.projectionField = (Core.Name "mapping")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "n"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "n")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.packaging.Namespaces")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "n"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.package"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.Package"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.packaging.packageName")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "modules"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.module"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-                                    Core.projectionField = (Core.Name "modules")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "dependencies"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.packageName"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-                                    Core.projectionField = (Core.Name "dependencies")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),
-                                    Core.projectionField = (Core.Name "description")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.Package")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.packageName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.PackageName"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.packaging.PackageName")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.PackageName")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.qualifiedName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.QualifiedName"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "namespace"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.packaging.namespace"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-                                    Core.projectionField = (Core.Name "namespace")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "local"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.QualifiedName"),
-                                    Core.projectionField = (Core.Name "local")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.QualifiedName")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.termDefinition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.TermDefinition"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-                                    Core.projectionField = (Core.Name "term")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeScheme"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.typeScheme"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.TermDefinition"),
-                                    Core.projectionField = (Core.Name "typeScheme")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.TermDefinition")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.packaging.typeDefinition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.packaging.TypeDefinition"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeScheme"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.typeScheme")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.packaging.TypeDefinition"),
-                                    Core.projectionField = (Core.Name "typeScheme")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.packaging.TypeDefinition")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Parsing.hs b/src/main/haskell/Hydra/Sources/Encode/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Parsing.hs
+++ /dev/null
@@ -1,269 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.parsing
-
-module Hydra.Sources.Encode.Parsing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.parsing"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.parsing"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.parsing"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.parsing.parseError"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.parsing.ParseError"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "message"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),
-                                    Core.projectionField = (Core.Name "message")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "remainder"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),
-                                    Core.projectionField = (Core.Name "remainder")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.parsing.ParseError")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.parsing.parseResult"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = (Core.Name "hydra.parsing.ParseResult"),
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "success"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.parsing.ParseResult"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "success"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.parsing.parseSuccess")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "failure"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.parsing.ParseResult"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "failure"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.parsing.parseError")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.parsing.ParseResult")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.parsing.parseSuccess"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.parsing.ParseSuccess"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "a")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-                                      Core.projectionField = (Core.Name "value")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "remainder"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "x"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "literal"),
-                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                          Core.injectionField = Core.Field {
-                                            Core.fieldName = (Core.Name "string"),
-                                            Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),
-                                      Core.projectionField = (Core.Name "remainder")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.parsing.ParseSuccess")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Paths.hs b/src/main/haskell/Hydra/Sources/Encode/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Paths.hs
+++ /dev/null
@@ -1,2127 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.paths
-
-module Hydra.Sources.Encode.Paths where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.paths"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.paths"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.paths"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtermEdge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermEdge"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "source"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermNode")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-                                    Core.projectionField = (Core.Name "source")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermPath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "target"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermNode")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),
-                                    Core.projectionField = (Core.Name "target")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtermEdge")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtermGraph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermGraph"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nodes"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermNode"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-                                    Core.projectionField = (Core.Name "nodes")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edges"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermEdge"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),
-                                    Core.projectionField = (Core.Name "edges")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtermGraph")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtermNode"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermNode"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-                                    Core.projectionField = (Core.Name "label")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),
-                                    Core.projectionField = (Core.Name "id")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtermNode")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtermPath"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermPath"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "xs"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "list"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.paths.subtermStep"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.paths.SubtermPath")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtermPath")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtermStep"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.paths.SubtermStep"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "annotatedBody"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotatedBody"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "applicationFunction"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationFunction"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "applicationArgument"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationArgument"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lambdaBody"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambdaBody"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unionCasesDefault"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unionCasesDefault"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unionCasesBranch"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unionCasesBranch"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "letBody"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "letBody"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "letBinding"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "letBinding"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "listElement"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "listElement"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "mapKey"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapKey"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "mapValue"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapValue"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "maybeTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybeTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "productTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "productTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "recordField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "recordField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "setElement"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "setElement"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "sumTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "sumTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeLambdaBody"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeLambdaBody"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeApplicationTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeApplicationTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "injectionTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "injectionTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrappedTerm"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtermStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrappedTerm"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtermStep")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtypeEdge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeEdge"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "source"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtypeNode")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-                                    Core.projectionField = (Core.Name "source")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtypePath")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "target"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.paths.subtypeNode")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),
-                                    Core.projectionField = (Core.Name "target")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeEdge")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtypeGraph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeGraph"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nodes"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.paths.subtypeNode"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-                                    Core.projectionField = (Core.Name "nodes")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edges"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.paths.subtypeEdge"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),
-                                    Core.projectionField = (Core.Name "edges")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeGraph")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtypeNode"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeNode"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-                                    Core.projectionField = (Core.Name "label")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),
-                                    Core.projectionField = (Core.Name "id")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeNode")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtypePath"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypePath"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "xs"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "list"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.paths.subtypeStep"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.paths.SubtypePath")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtypePath")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.paths.subtypeStep"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.paths.SubtypeStep"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "annotatedBody"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotatedBody"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "applicationFunction"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationFunction"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "applicationArgument"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "applicationArgument"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "eitherLeft"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "eitherLeft"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "eitherRight"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "eitherRight"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "forallBody"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "forallBody"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "functionDomain"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "functionDomain"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "functionCodomain"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "functionCodomain"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "listElement"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "listElement"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "mapKeys"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapKeys"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "mapValues"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "mapValues"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "maybeElement"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybeElement"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pairFirst"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pairFirst"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pairSecond"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pairSecond"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "recordField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "recordField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "setElement"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "setElement"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unionField"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unionField"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrappedType"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.paths.SubtypeStep"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrappedType"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.paths.SubtypeStep")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Pg/Mapping.hs b/src/main/haskell/Hydra/Sources/Encode/Pg/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Pg/Mapping.hs
+++ /dev/null
@@ -1,909 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Source module for hydra.encode.pg.mapping
-
-module Hydra.Sources.Encode.Pg.Mapping where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.pg.mapping"),
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.mapping.annotationSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.AnnotationSchema"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertexLabel"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "vertexLabel")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edgeLabel"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "edgeLabel")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertexId"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "vertexId")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edgeId"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "edgeId")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "propertyKey"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "propertyKey")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "propertyValue"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "propertyValue")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "outVertex"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "outVertex")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "outVertexLabel"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "outVertexLabel")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inVertex"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "inVertex")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inVertexLabel"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "inVertexLabel")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "outEdge"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "outEdge")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "outEdgeLabel"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "outEdgeLabel")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inEdge"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "inEdge")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inEdgeLabel"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "inEdgeLabel")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "ignore"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
-                                    Core.projectionField = (Core.Name "ignore")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.mapping.AnnotationSchema")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.mapping.edgeSpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.EdgeSpec"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeLabel")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-                                    Core.projectionField = (Core.Name "label")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.valueSpec")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-                                    Core.projectionField = (Core.Name "id")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "out"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.valueSpec")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-                                    Core.projectionField = (Core.Name "out")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "in"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.valueSpec")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-                                    Core.projectionField = (Core.Name "in")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.propertySpec"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
-                                    Core.projectionField = (Core.Name "properties")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.mapping.EdgeSpec")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.mapping.elementSpec"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "vertex"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.ElementSpec"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.vertexSpec")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "edge"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.ElementSpec"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.edgeSpec")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.mapping.ElementSpec")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.mapping.propertySpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.PropertySpec"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyKey")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-                                    Core.projectionField = (Core.Name "key")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.valueSpec")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
-                                    Core.projectionField = (Core.Name "value")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.mapping.PropertySpec")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.mapping.valueSpec"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.pg.mapping.ValueSpec"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "value"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.ValueSpec"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pattern"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.ValueSpec"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pattern"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "string"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.mapping.ValueSpec")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.mapping.vertexSpec"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.mapping.VertexSpec"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-                                    Core.projectionField = (Core.Name "label")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.valueSpec")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-                                    Core.projectionField = (Core.Name "id")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.mapping.propertySpec"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
-                                    Core.projectionField = (Core.Name "properties")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.mapping.VertexSpec")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))],
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.pg.model"),
-        (Packaging.Namespace "hydra.encode.coders")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.pg.mapping"],
-      Packaging.moduleDescription = (Just "Term encoders for hydra.pg.mapping")}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Pg/Model.hs b/src/main/haskell/Hydra/Sources/Encode/Pg/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Pg/Model.hs
+++ /dev/null
@@ -1,1997 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Source module for hydra.encode.pg.model
-
-module Hydra.Sources.Encode.Pg.Model where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-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
-
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.pg.model"),
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.adjacentEdge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.AdjacentEdge"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-                                      Core.projectionField = (Core.Name "label")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-                                      Core.projectionField = (Core.Name "id")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-                                      Core.projectionField = (Core.Name "vertex")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyKey"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
-                                      Core.projectionField = (Core.Name "properties")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.AdjacentEdge")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.direction"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.pg.model.Direction"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "out"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Direction"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "out"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "in"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Direction"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "in"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "both"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Direction"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "both"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "undirected"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Direction"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "undirected"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.model.Direction")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.edge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Edge"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-                                      Core.projectionField = (Core.Name "label")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-                                      Core.projectionField = (Core.Name "id")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "out"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-                                      Core.projectionField = (Core.Name "out")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "in"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-                                      Core.projectionField = (Core.Name "in")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyKey"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
-                                      Core.projectionField = (Core.Name "properties")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Edge")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.edgeLabel"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.EdgeLabel"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.EdgeLabel")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.model.EdgeLabel")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.edgeType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.EdgeType"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-                                      Core.projectionField = (Core.Name "label")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "t")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-                                      Core.projectionField = (Core.Name "id")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "out"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-                                      Core.projectionField = (Core.Name "out")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "in"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-                                      Core.projectionField = (Core.Name "in")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyType")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
-                                      Core.projectionField = (Core.Name "properties")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.EdgeType")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.element"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = (Core.Name "hydra.pg.model.Element"),
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "vertex"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Element"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertex")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "edge"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Element"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edge")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Element")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.elementKind"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.pg.model.ElementKind"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "vertex"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.ElementKind"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "edge"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.ElementKind"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementKind")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.elementTree"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.ElementTree"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "self"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.element")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-                                      Core.projectionField = (Core.Name "self")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "dependencies"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.elementTree")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
-                                      Core.projectionField = (Core.Name "dependencies")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementTree")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.elementType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = (Core.Name "hydra.pg.model.ElementType"),
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "vertex"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.ElementType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexType")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "edge"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "inject"),
-                        Core.fieldTerm = (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "typeName"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.ElementType"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "field"),
-                              Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                                Core.recordFields = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "name"),
-                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "term"),
-                                    Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeType")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementType")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.elementTypeTree"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.ElementTypeTree"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "self"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.elementType")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-                                      Core.projectionField = (Core.Name "self")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "dependencies"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.elementTypeTree")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
-                                      Core.projectionField = (Core.Name "dependencies")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.ElementTypeTree")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.graph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Graph"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertices"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertex")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
-                                      Core.projectionField = (Core.Name "vertices")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edges"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edge")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
-                                      Core.projectionField = (Core.Name "edges")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Graph")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = (Just (M.fromList [
-              (Core.Name "v", Core.TypeVariableMetadata {
-                Core.typeVariableMetadataClasses = (S.fromList [
-                  Core.Name "ordering"])})]))}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.graphSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.GraphSchema"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertices"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexType")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-                                      Core.projectionField = (Core.Name "vertices")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edges"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeLabel"))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeType")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
-                                      Core.projectionField = (Core.Name "edges")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.GraphSchema")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.label"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.pg.model.Label"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "vertex"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Label"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "edge"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Label"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edgeLabel")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.model.Label")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.lazyGraph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.LazyGraph"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertices"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertex")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-                                      Core.projectionField = (Core.Name "vertices")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edges"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.edge")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
-                                      Core.projectionField = (Core.Name "edges")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.LazyGraph")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.property"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Property"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyKey")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
-                                      Core.projectionField = (Core.Name "key")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
-                                      Core.projectionField = (Core.Name "value")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Property")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.propertyKey"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.PropertyKey"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.PropertyKey")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.model.PropertyKey")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.propertyType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.PropertyType"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyKey")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-                                      Core.projectionField = (Core.Name "key")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "value"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "t")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-                                      Core.projectionField = (Core.Name "value")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "required"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "x"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "literal"),
-                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                          Core.injectionField = Core.Field {
-                                            Core.fieldName = (Core.Name "boolean"),
-                                            Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
-                                      Core.projectionField = (Core.Name "required")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.PropertyType")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.vertex"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.Vertex"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
-                                      Core.projectionField = (Core.Name "label")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "v")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
-                                      Core.projectionField = (Core.Name "id")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "m"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "map"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyKey"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
-                                      Core.projectionField = (Core.Name "properties")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.Vertex")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.vertexLabel"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.VertexLabel"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.VertexLabel")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.pg.model.VertexLabel")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.vertexType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.VertexType"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "label"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertexLabel")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
-                                      Core.projectionField = (Core.Name "label")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "id"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "t")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
-                                      Core.projectionField = (Core.Name "id")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "properties"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.propertyType")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
-                                      Core.projectionField = (Core.Name "properties")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.VertexType")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.pg.model.vertexWithAdjacentEdges"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.pg.model.VertexWithAdjacentEdges"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "vertex"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.vertex")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-                                      Core.projectionField = (Core.Name "vertex")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "ins"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.adjacentEdge")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-                                      Core.projectionField = (Core.Name "ins")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "outs"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.pg.model.adjacentEdge")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
-                                      Core.projectionField = (Core.Name "outs")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.pg.model.VertexWithAdjacentEdges")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))],
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.pg.model"],
-      Packaging.moduleDescription = (Just "Term encoders for hydra.pg.model")}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Phantoms.hs b/src/main/haskell/Hydra/Sources/Encode/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Phantoms.hs
+++ /dev/null
@@ -1,202 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.phantoms
-
-module Hydra.Sources.Encode.Phantoms where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.phantoms"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.phantoms"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.phantoms"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.phantoms.tBinding"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.phantoms.TBinding"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.phantoms.TBinding"),
-                                      Core.projectionField = (Core.Name "name")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.phantoms.tTerm")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.phantoms.TBinding"),
-                                      Core.projectionField = (Core.Name "term")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TBinding")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.phantoms.tTerm"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "wrap"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.phantoms.TTerm"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "body"),
-                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.phantoms.TTerm")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.phantoms.tTermDefinition"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "a"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.phantoms.TTermDefinition"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.phantoms.TTermDefinition"),
-                                      Core.projectionField = (Core.Name "name")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.phantoms.tTerm")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.phantoms.TTermDefinition"),
-                                      Core.projectionField = (Core.Name "term")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "a"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTermDefinition")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Query.hs b/src/main/haskell/Hydra/Sources/Encode/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Query.hs
+++ /dev/null
@@ -1,1723 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.query
-
-module Hydra.Sources.Encode.Query where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.query"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.query"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.query"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.comparisonConstraint"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.query.ComparisonConstraint"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "equal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.ComparisonConstraint"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "equal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "notEqual"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.ComparisonConstraint"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "notEqual"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lessThan"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.ComparisonConstraint"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lessThan"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "greaterThan"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.ComparisonConstraint"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "greaterThan"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lessThanOrEqual"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.ComparisonConstraint"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lessThanOrEqual"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "greaterThanOrEqual"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.ComparisonConstraint"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "greaterThanOrEqual"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.ComparisonConstraint")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.edge"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Edge"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "out"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-                                    Core.projectionField = (Core.Name "out")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "in"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Edge"),
-                                    Core.projectionField = (Core.Name "in")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Edge")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.graphPattern"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.GraphPattern"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "graph"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.name")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),
-                                    Core.projectionField = (Core.Name "graph")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "patterns"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.query.pattern"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),
-                                    Core.projectionField = (Core.Name "patterns")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.GraphPattern")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.node"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.query.Node"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "term"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Node"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "variable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Node"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.variable")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wildcard"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Node"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wildcard"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Node")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.path"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.query.Path"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "step"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Path"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "step"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.step")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "regex"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Path"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "regex"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.regexSequence")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "inverse"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Path"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inverse"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.path")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Path")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.pathEquation"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.PathEquation"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "left"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.path")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),
-                                    Core.projectionField = (Core.Name "left")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "right"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.path")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),
-                                    Core.projectionField = (Core.Name "right")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.PathEquation")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.pattern"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.query.Pattern"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "triple"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Pattern"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "triple"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.triplePattern")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "negation"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Pattern"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "negation"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.pattern")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "conjunction"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Pattern"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "conjunction"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "xs"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "list"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.query.pattern"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "disjunction"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Pattern"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "disjunction"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "xs"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "list"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.query.pattern"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "graph"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Pattern"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "graph"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.graphPattern")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Pattern")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.patternImplication"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.PatternImplication"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "antecedent"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.pattern")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),
-                                    Core.projectionField = (Core.Name "antecedent")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "consequent"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.pattern")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),
-                                    Core.projectionField = (Core.Name "consequent")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.PatternImplication")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.query"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Query"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variables"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.query.variable"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Query"),
-                                    Core.projectionField = (Core.Name "variables")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "patterns"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.query.pattern"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Query"),
-                                    Core.projectionField = (Core.Name "patterns")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Query")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.range"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Range"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "min"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "integer"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "int32"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Range"),
-                                    Core.projectionField = (Core.Name "min")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "max"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "integer"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "int32"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.Range"),
-                                    Core.projectionField = (Core.Name "max")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Range")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.regexQuantifier"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.query.RegexQuantifier"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "one"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "zeroOrOne"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "zeroOrOne"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "zeroOrMore"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "zeroOrMore"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "oneOrMore"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "oneOrMore"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "exactly"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "exactly"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "atLeast"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "atLeast"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "range"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexQuantifier"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "range"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.range")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.RegexQuantifier")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.regexSequence"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.RegexSequence"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "path"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.path")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),
-                                    Core.projectionField = (Core.Name "path")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "quantifier"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.regexQuantifier")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),
-                                    Core.projectionField = (Core.Name "quantifier")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.RegexSequence")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.step"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.query.Step"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "edge"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Step"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "edge"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.edge")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "project"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Step"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "project"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.projection")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "compare"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Step"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "compare"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.comparisonConstraint")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Step")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.triplePattern"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.TriplePattern"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "subject"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.node")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-                                    Core.projectionField = (Core.Name "subject")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "predicate"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.path")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-                                    Core.projectionField = (Core.Name "predicate")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "object"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.query.node")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),
-                                    Core.projectionField = (Core.Name "object")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.TriplePattern")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.query.variable"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.query.Variable"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.query.Variable")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.query.Variable")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Relational.hs b/src/main/haskell/Hydra/Sources/Encode/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Relational.hs
+++ /dev/null
@@ -1,596 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.relational
-
-module Hydra.Sources.Encode.Relational where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-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
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.relational"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.relational"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.relational"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.columnName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.ColumnName"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.ColumnName")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.relational.ColumnName")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.columnSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.ColumnSchema"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.columnName")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-                                      Core.projectionField = (Core.Name "name")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "domain"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "t")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),
-                                      Core.projectionField = (Core.Name "domain")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.ColumnSchema")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.foreignKey"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.ForeignKey"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foreignRelation"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.relationName")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),
-                                    Core.projectionField = (Core.Name "foreignRelation")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "keys"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.relational.columnName"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.relational.columnName"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),
-                                    Core.projectionField = (Core.Name "keys")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.relational.ForeignKey")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.primaryKey"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.PrimaryKey"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "xs"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "list"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.relational.columnName"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.PrimaryKey")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.relational.PrimaryKey")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.relation"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "wrap"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.Relation"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "body"),
-                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "xs"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "list"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.row")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.Relation")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.Relation")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.relationName"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.RelationName"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.RelationName")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.relational.RelationName")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.relationSchema"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "t"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.RelationSchema"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.relationName")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-                                      Core.projectionField = (Core.Name "name")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "columns"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.columnSchema")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-                                      Core.projectionField = (Core.Name "columns")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "primaryKeys"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.relational.primaryKey"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-                                      Core.projectionField = (Core.Name "primaryKeys")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foreignKeys"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.relational.foreignKey"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),
-                                      Core.projectionField = (Core.Name "foreignKeys")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "t"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.RelationSchema")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.relationship"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "wrap"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.Relationship"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "body"),
-                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "s"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "set"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "m"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "map"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                                Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.relational.columnName"))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))}))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}}))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.Relationship")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.Relationship")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = (Just (M.fromList [
-              (Core.Name "v", Core.TypeVariableMetadata {
-                Core.typeVariableMetadataClasses = (S.fromList [
-                  Core.Name "ordering"])})]))}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.relational.row"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "wrap"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.relational.Row"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "body"),
-                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "xs"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "list"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.relational.Row")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.relational.Row")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Tabular.hs b/src/main/haskell/Hydra/Sources/Encode/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Tabular.hs
+++ /dev/null
@@ -1,358 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.tabular
-
-module Hydra.Sources.Encode.Tabular where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.tabular"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.tabular"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.relational")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.tabular"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.tabular.columnType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.tabular.ColumnType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.columnName")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.tabular.ColumnType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.tabular.dataRow"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "wrap"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.tabular.DataRow"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "body"),
-                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "xs"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "list"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "opt"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "maybe"),
-                                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))}))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tabular.DataRow")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.tabular.DataRow")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.tabular.headerRow"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.tabular.HeaderRow"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "xs"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "list"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "x"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "literal"),
-                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                          Core.injectionField = Core.Field {
-                                            Core.fieldName = (Core.Name "string"),
-                                            Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.tabular.HeaderRow")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.tabular.HeaderRow")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.tabular.table"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "v"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.tabular.Table"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "header"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "opt"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "maybe"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.tabular.headerRow"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),
-                                      Core.projectionField = (Core.Name "header")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "data"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.tabular.dataRow")),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),
-                                      Core.projectionField = (Core.Name "data")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "v"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.tabular.Table")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.tabular.tableType"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.tabular.TableType"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.relational.relationName")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "columns"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.tabular.columnType"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),
-                                    Core.projectionField = (Core.Name "columns")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.tabular.TableType")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Testing.hs b/src/main/haskell/Hydra/Sources/Encode/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Testing.hs
+++ /dev/null
@@ -1,472 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.testing
-
-module Hydra.Sources.Encode.Testing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.testing"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.testing"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.testing"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.testing.tag"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.testing.Tag"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.testing.Tag")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.testing.Tag")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.testing.testCase"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.testing.TestCase"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "universal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.testing.TestCase"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "universal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.testing.universalTestCase")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.testing.TestCase")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.testing.testCaseWithMetadata"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.testing.TestCaseWithMetadata"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "case"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.testing.testCase")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-                                    Core.projectionField = (Core.Name "case")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-                                    Core.projectionField = (Core.Name "description")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "tags"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.testing.tag"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),
-                                    Core.projectionField = (Core.Name "tags")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.testing.TestCaseWithMetadata")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.testing.testGroup"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.testing.TestGroup"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "name"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-                                    Core.projectionField = (Core.Name "name")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "opt"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "maybe"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "string"),
-                                                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-                                    Core.projectionField = (Core.Name "description")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "subgroups"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.testing.testGroup"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-                                    Core.projectionField = (Core.Name "subgroups")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cases"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.testing.testCaseWithMetadata"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),
-                                    Core.projectionField = (Core.Name "cases")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.testing.TestGroup")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.testing.universalTestCase"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.testing.UniversalTestCase"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "actual"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-                                    Core.projectionField = (Core.Name "actual")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.testing.UniversalTestCase"),
-                                    Core.projectionField = (Core.Name "expected")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.testing.UniversalTestCase")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Topology.hs b/src/main/haskell/Hydra/Sources/Encode/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Topology.hs
+++ /dev/null
@@ -1,320 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.topology
-
-module Hydra.Sources.Encode.Topology where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.topology"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.topology"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.topology"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.topology.graph"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "m"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "map"),
-                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "xs"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "list"),
-                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))}))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.topology.Vertex")),
-                Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "hydra.topology.Vertex")))})),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.topology.tarjanState"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.topology.TarjanState"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "counter"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "integer"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "int32"),
-                                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                    Core.projectionField = (Core.Name "counter")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "indices"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "integer"),
-                                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                      Core.injectionField = Core.Field {
-                                                        Core.fieldName = (Core.Name "int32"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                    Core.projectionField = (Core.Name "indices")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lowLinks"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "x"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "literal"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "integer"),
-                                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                      Core.injectionField = Core.Field {
-                                                        Core.fieldName = (Core.Name "int32"),
-                                                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                    Core.projectionField = (Core.Name "lowLinks")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "stack"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                    Core.projectionField = (Core.Name "stack")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "onStack"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "s"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "set"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                    Core.projectionField = (Core.Name "onStack")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "sccs"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "xs"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "list"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "xs"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                              Core.injectionField = Core.Field {
-                                                Core.fieldName = (Core.Name "list"),
-                                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.topology.vertex"))})),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))}))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),
-                                    Core.projectionField = (Core.Name "sccs")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.topology.TarjanState")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.topology.vertex"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "literal"),
-                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "integer"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "int32"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Literal")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Typing.hs b/src/main/haskell/Hydra/Sources/Encode/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Typing.hs
+++ /dev/null
@@ -1,527 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.typing
-
-module Hydra.Sources.Encode.Typing where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.typing"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.typing"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core",
-        (Packaging.Namespace "hydra.encode.context")],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.typing"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.typing.functionStructure"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "env"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "record"),
-                  Core.fieldTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "typeName"),
-                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.typing.FunctionStructure"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fields"),
-                        Core.fieldTerm = (Core.TermList [
-                          Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeParams"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "typeParams")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "params"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "params")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bindings"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.binding"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "bindings")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "body"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "body")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "domains"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "xs"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "list"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "domains")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "codomain"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "opt"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "maybe"),
-                                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.map")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "opt"))}))}}))})),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "codomain")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                          (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "name"),
-                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "environment"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "term"),
-                                Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "env")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                      Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),
-                                      Core.projectionField = (Core.Name "environment")})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [
-              Core.Name "env"],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "env")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.typing.FunctionStructure")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "env"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))}))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.typing.inferenceResult"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.typing.InferenceResult"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "term"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.term")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-                                    Core.projectionField = (Core.Name "term")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "type"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-                                    Core.projectionField = (Core.Name "type")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "subst"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.typing.typeSubst")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-                                    Core.projectionField = (Core.Name "subst")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "classConstraints"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "m"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "map"),
-                                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.typeVariableMetadata"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-                                    Core.projectionField = (Core.Name "classConstraints")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "context"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.context.context")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),
-                                    Core.projectionField = (Core.Name "context")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.typing.InferenceResult")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.typing.termSubst"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.typing.TermSubst"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "m"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "map"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.term"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typing.TermSubst")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.typing.TermSubst")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.typing.typeConstraint"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.Record"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.typing.TypeConstraint"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "fields"),
-                      Core.fieldTerm = (Core.TermList [
-                        Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "left"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-                                    Core.projectionField = (Core.Name "left")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "right"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.encode.core.type")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-                                    Core.projectionField = (Core.Name "right")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})),
-                        (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "name"),
-                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "comment"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "term"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "literal"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "string"),
-                                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),
-                                    Core.projectionField = (Core.Name "comment")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))])}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.typing.TypeConstraint")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.typing.typeSubst"),
-          Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-            Core.lambdaParameter = (Core.Name "x"),
-            Core.lambdaDomain = Nothing,
-            Core.lambdaBody = (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "typeName"),
-                      Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.typing.TypeSubst"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "body"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "m"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "map"),
-                              Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.bimap")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.name"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.encode.core.type"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typing.TypeSubst")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]}))}}))})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.typing.TypeSubst")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Util.hs b/src/main/haskell/Hydra/Sources/Encode/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Util.hs
+++ /dev/null
@@ -1,413 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.util
-
-module Hydra.Sources.Encode.Util where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.util"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.util"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.util"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.util.caseConvention"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.util.CaseConvention"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "camel"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.CaseConvention"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "camel"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pascal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.CaseConvention"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pascal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lowerSnake"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.CaseConvention"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lowerSnake"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "upperSnake"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.CaseConvention"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "upperSnake"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.util.CaseConvention")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.util.comparison"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.util.Comparison"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "lessThan"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.Comparison"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lessThan"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "equalTo"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.Comparison"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "equalTo"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "greaterThan"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.Comparison"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "greaterThan"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.util.Comparison")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.util.precision"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.util.Precision"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "arbitrary"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.Precision"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "arbitrary"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "bits"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.util.Precision"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bits"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "x"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))}}))}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.util.Precision")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Encode/Variants.hs b/src/main/haskell/Hydra/Sources/Encode/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Encode/Variants.hs
+++ /dev/null
@@ -1,1989 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Source module for hydra.encode.variants
-
-module Hydra.Sources.Encode.Variants where
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-module_ :: Packaging.Module
-module_ =
-    Packaging.Module {
-      Packaging.moduleDescription = (Just "Term encoders for hydra.variants"),
-      Packaging.moduleNamespace = (Packaging.Namespace "hydra.encode.variants"),
-      Packaging.moduleTermDependencies = [
-        Packaging.Namespace "hydra.encode.core"],
-      Packaging.moduleTypeDependencies = [
-        Packaging.Namespace "hydra.variants"],
-      Packaging.moduleDefinitions = [
-        Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.variants.eliminationVariant"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.variants.EliminationVariant"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.EliminationVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "union"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.EliminationVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "union"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.EliminationVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.variants.EliminationVariant")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.variants.functionVariant"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.variants.FunctionVariant"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "elimination"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.FunctionVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "elimination"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.FunctionVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.variants.FunctionVariant")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.variants.literalVariant"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.variants.LiteralVariant"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "binary"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.LiteralVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "binary"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "boolean"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.LiteralVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "boolean"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "decimal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.LiteralVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "decimal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "float"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.LiteralVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "float"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "integer"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.LiteralVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "integer"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "string"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.LiteralVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "string"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.variants.LiteralVariant")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.variants.termVariant"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.variants.TermVariant"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "annotated"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "application"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "cases"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "cases"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "either"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "inject"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "inject"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "lambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "lambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "let"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "let"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "list"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "literal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "map"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "maybe"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pair"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "project"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "project"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "set"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeApplication"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeApplication"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "typeLambda"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "typeLambda"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unit"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unwrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unwrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "variable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TermVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.variants.TermVariant")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))})),
-        (Packaging.DefinitionTerm (Packaging.TermDefinition {
-          Packaging.termDefinitionName = (Core.Name "hydra.encode.variants.typeVariant"),
-          Packaging.termDefinitionTerm = (Core.TermCases (Core.CaseStatement {
-            Core.caseStatementTypeName = (Core.Name "hydra.variants.TypeVariant"),
-            Core.caseStatementDefault = Nothing,
-            Core.caseStatementCases = [
-              Core.Field {
-                Core.fieldName = (Core.Name "annotated"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "annotated"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "application"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "application"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "either"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "either"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "forall"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "forall"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "function"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "function"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "list"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "list"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "literal"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "literal"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "map"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "map"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "maybe"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "maybe"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "pair"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "pair"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "record"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "record"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "set"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "set"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "union"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "union"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "unit"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unit"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "variable"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "variable"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "void"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "void"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))},
-              Core.Field {
-                Core.fieldName = (Core.Name "wrap"),
-                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "inject"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.Injection"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "typeName"),
-                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hydra.variants.TypeVariant"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "field"),
-                            Core.fieldTerm = (Core.TermRecord (Core.Record {
-                              Core.recordTypeName = (Core.Name "hydra.core.Field"),
-                              Core.recordFields = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "name"),
-                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {
-                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrap"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "term"),
-                                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "_"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "unit"),
-                                          Core.fieldTerm = Core.TermUnit}}))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}]}))}]}))}}))}))}]})),
-          Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-            Core.typeSchemeVariables = [],
-            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.variants.TypeVariant")),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.core.Term"))})),
-            Core.typeSchemeConstraints = Nothing}))}))]}
diff --git a/src/main/haskell/Hydra/Sources/Error/Pg.hs b/src/main/haskell/Hydra/Sources/Error/Pg.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Error/Pg.hs
+++ /dev/null
@@ -1,176 +0,0 @@
-module Hydra.Sources.Error.Pg where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Pg.Model      as PgModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.error.pg"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pg :: String -> Type
-pg = typeref PgModel.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [PgModel.ns],
-            moduleDescription = Just "Error types for property graph validation"}
-  where
-    definitions = [
-      invalidEdgeError,
-      invalidElementPropertyError,
-      invalidGraphEdgeError,
-      invalidGraphError,
-      invalidGraphVertexError,
-      invalidPropertyError,
-      invalidValueError,
-      invalidVertexError,
-      noSuchEdgeLabelError,
-      noSuchVertexLabelError,
-      wrongVertexLabelError]
-
-invalidEdgeError :: Binding
-invalidEdgeError = define "InvalidEdgeError" $
-  doc "An error indicating that an edge is invalid" $
-  T.union [
-    "id">:
-      doc "The edge id value is invalid" $
-      invalidValueError,
-    "inVertexLabel">:
-      doc "The in-vertex has the wrong label" $
-      wrongVertexLabelError,
-    "inVertexNotFound">:
-      doc "The in-vertex does not exist in the graph" $
-      T.unit,
-    "label">:
-      doc "The edge label does not exist in the schema" $
-      noSuchEdgeLabelError,
-    "outVertexLabel">:
-      doc "The out-vertex has the wrong label" $
-      wrongVertexLabelError,
-    "outVertexNotFound">:
-      doc "The out-vertex does not exist in the graph" $
-      T.unit,
-    "property">:
-      doc "A property of the edge is invalid" $
-      invalidElementPropertyError]
-
-invalidElementPropertyError :: Binding
-invalidElementPropertyError = define "InvalidElementPropertyError" $
-  doc "An invalid property on a vertex or edge, identified by its key" $
-  T.record [
-    "key">:
-      doc "The key of the invalid property" $
-      pg "PropertyKey",
-    "error">:
-      doc "The specific error" $
-      invalidPropertyError]
-
-invalidGraphEdgeError :: Binding
-invalidGraphEdgeError = define "InvalidGraphEdgeError" $
-  doc "An invalid edge within a graph, identified by its id" $
-  T.forAll "v" $ T.record [
-    "id">:
-      doc "The id of the invalid edge" $
-      "v",
-    "error">:
-      doc "The specific error" $
-      invalidEdgeError]
-
-invalidGraphError :: Binding
-invalidGraphError = define "InvalidGraphError" $
-  doc "An error indicating that a property graph is invalid" $
-  T.forAll "v" $ T.union [
-    "edge">:
-      doc "An edge in the graph is invalid" $
-      T.apply invalidGraphEdgeError "v",
-    "vertex">:
-      doc "A vertex in the graph is invalid" $
-      T.apply invalidGraphVertexError "v"]
-
-invalidGraphVertexError :: Binding
-invalidGraphVertexError = define "InvalidGraphVertexError" $
-  doc "An invalid vertex within a graph, identified by its id" $
-  T.forAll "v" $ T.record [
-    "id">:
-      doc "The id of the invalid vertex" $
-      "v",
-    "error">:
-      doc "The specific error" $
-      invalidVertexError]
-
-invalidPropertyError :: Binding
-invalidPropertyError = define "InvalidPropertyError" $
-  doc "An error indicating that a property is invalid" $
-  T.union [
-    "invalidValue">:
-      doc "The property value failed type validation" $
-      invalidValueError,
-    "missingRequired">:
-      doc "A required property is missing" $
-      pg "PropertyKey",
-    "unexpectedKey">:
-      doc "A property has an unexpected key not in the schema" $
-      pg "PropertyKey"]
-
-invalidValueError :: Binding
-invalidValueError = define "InvalidValueError" $
-  doc "An error indicating that a value does not match the expected type" $
-  T.record [
-    "expectedType">:
-      doc "The expected type, as a string" $
-      T.string,
-    "value">:
-      doc "The actual value, as a string" $
-      T.string]
-
-invalidVertexError :: Binding
-invalidVertexError = define "InvalidVertexError" $
-  doc "An error indicating that a vertex is invalid" $
-  T.union [
-    "id">:
-      doc "The vertex id value is invalid" $
-      invalidValueError,
-    "label">:
-      doc "The vertex label does not exist in the schema" $
-      noSuchVertexLabelError,
-    "property">:
-      doc "A property of the vertex is invalid" $
-      invalidElementPropertyError]
-
-noSuchEdgeLabelError :: Binding
-noSuchEdgeLabelError = define "NoSuchEdgeLabelError" $
-  doc "An error indicating that an edge label does not exist in the schema" $
-  T.record [
-    "label">:
-      doc "The edge label that was not found" $
-      pg "EdgeLabel"]
-
-noSuchVertexLabelError :: Binding
-noSuchVertexLabelError = define "NoSuchVertexLabelError" $
-  doc "An error indicating that a vertex label does not exist in the schema" $
-  T.record [
-    "label">:
-      doc "The vertex label that was not found" $
-      pg "VertexLabel"]
-
-wrongVertexLabelError :: Binding
-wrongVertexLabelError = define "WrongVertexLabelError" $
-  doc "An error indicating that a vertex has the wrong label" $
-  T.record [
-    "expected">:
-      doc "The expected vertex label" $
-      pg "VertexLabel",
-    "actual">:
-      doc "The actual vertex label" $
-      pg "VertexLabel"]
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/All.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/All.hs
+++ /dev/null
@@ -1,101 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.All where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Sources.Eval.Lib.Eithers as EvalEithers
-import qualified Hydra.Sources.Eval.Lib.Equality as EvalEquality
-import qualified Hydra.Sources.Eval.Lib.Lists as EvalLists
-import qualified Hydra.Sources.Eval.Lib.Logic as EvalLogic
-import qualified Hydra.Sources.Eval.Lib.Maps as EvalMaps
-import qualified Hydra.Sources.Eval.Lib.Math as EvalMath
-import qualified Hydra.Sources.Eval.Lib.Maybes as EvalMaybes
-import qualified Hydra.Sources.Eval.Lib.Pairs as EvalPairs
-import qualified Hydra.Sources.Eval.Lib.Sets as EvalSets
-
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
--- | All eval library modules
--- Note: Eithers, Lists, Maps, Maybes, and Sets modules cannot currently be code-generated
--- due to DSL type inference limitations. The eval primitive implementations in those modules
--- use meta-level DSL functions (Maybes.maybe, Eithers.either_, etc.) applied to Term-level
--- values, which causes unification errors. These modules still work at runtime via the
--- native Haskell implementations in EvalPrimitives.hs.
-evalLibModules :: [Module]
-evalLibModules = [
-  EvalEithers.module_,
-  EvalEquality.module_,
-  EvalLists.module_,
-  EvalLogic.module_,
-  EvalMaps.module_,
-  EvalMath.module_,
-  EvalMaybes.module_,
-  EvalPairs.module_,
-  EvalSets.module_
-  ]
-
--- | Namespaces of all eval library modules
-evalLibNamespaces :: [Namespace]
-evalLibNamespaces = Prelude.map moduleNamespace evalLibModules
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = evalLibNamespaces,
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Registry of evaluation-level primitive implementations for the Hydra interpreter.")}
-  where
-    definitions = []
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Eithers.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Eithers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Eithers.hs
+++ /dev/null
@@ -1,417 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Eithers where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (either)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Literals as MetaLiterals
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), either)
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.eithers"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Either functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition bind_,
-      toDefinition bimap_,
-      toDefinition either_,
-      toDefinition foldl_,
-      toDefinition fromLeft_,
-      toDefinition fromRight_,
-      toDefinition isLeft_,
-      toDefinition isRight_,
-      toDefinition lefts_,
-      toDefinition map_,
-      toDefinition mapList_,
-      toDefinition mapMaybe_,
-      toDefinition mapSet_,
-      toDefinition partitionEithers_,
-      toDefinition rights_]
-
--- | Interpreter-friendly bind for Either terms.
--- Takes an Either term and a function term, applies the function to the Right
--- value and returns the result (which should be an Either), or returns the Left unchanged.
-bind_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-bind_ = define "bind" $
-  doc "Interpreter-friendly bind for Either terms." $
-  "cx" ~> "g" ~>
-  "eitherTerm" ~> "funTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        -- If Left: return the Left unchanged
-        ("val" ~> Core.termEither $ left $ var "val")
-        -- If Right: apply funTerm to the value
-        ("val" ~> Core.termApplication $ Core.application (var "funTerm") (var "val"))
-        (var "e")]
-
--- | Interpreter-friendly bimap for Either terms.
--- Takes two function terms (for left and right) and an Either term, applies
--- the appropriate function to the contained value and re-wraps the result.
-bimap_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-bimap_ = define "bimap" $
-  doc "Interpreter-friendly bimap for Either terms." $
-  "cx" ~> "g" ~>
-  "leftFun" ~> "rightFun" ~> "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("val" ~> Core.termEither $ left $ Core.termApplication $ Core.application (var "leftFun") (var "val"))
-        ("val" ~> Core.termEither $ right $ Core.termApplication $ Core.application (var "rightFun") (var "val"))
-        (var "e")]
-
--- | Interpreter-friendly case analysis for Either terms.
--- Takes two function terms and an Either term, applies the appropriate function
--- to the contained value.
-either_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-either_ = define "either" $
-  doc "Interpreter-friendly case analysis for Either terms." $
-  "cx" ~> "g" ~>
-  "leftFun" ~> "rightFun" ~> "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("val" ~> Core.termApplication $ Core.application (var "leftFun") (var "val"))
-        ("val" ~> Core.termApplication $ Core.application (var "rightFun") (var "val"))
-        (var "e")]
-
--- | Interpreter-friendly foldl for Either.
--- foldl funTerm initTerm listTerm: folds funTerm over elements of listTerm,
--- threading an accumulator starting from initTerm. Short-circuits on first Left.
-foldl_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-foldl_ = define "foldl" $
-  doc "Interpreter-friendly foldl for Either." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "initTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Fold: for each element, apply funTerm acc el, then bind to check Left/Right
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      -- bind acc (\a -> funTerm a el)
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _eithers_either)
-            -- If acc is Left: short-circuit
-            (Core.termLambda $ Core.lambda (wrap _Name $ string "err") nothing $
-              Core.termEither $ left $ Core.termVariable $ wrap _Name $ string "err"))
-          -- If acc is Right: apply funTerm to acc value and element
-          (Core.termLambda $ Core.lambda (wrap _Name $ string "a") nothing $
-            Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application (var "funTerm") (Core.termVariable $ wrap _Name $ string "a"))
-              (var "el")))
-        (var "acc"))
-    -- Initial accumulator: Right initTerm
-    (Core.termEither $ right $ var "initTerm")
-    (var "elements")
-
--- | Interpreter-friendly fromLeft for Either terms.
--- fromLeft default eitherTerm: returns the Left value, or default if Right.
-fromLeft_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-fromLeft_ = define "fromLeft" $
-  doc "Interpreter-friendly fromLeft for Either terms." $
-  "cx" ~> "g" ~>
-  "defaultTerm" ~> "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("val" ~> var "val")
-        ("_" ~> var "defaultTerm")
-        (var "e")]
-
--- | Interpreter-friendly fromRight for Either terms.
--- fromRight default eitherTerm: returns the Right value, or default if Left.
-fromRight_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-fromRight_ = define "fromRight" $
-  doc "Interpreter-friendly fromRight for Either terms." $
-  "cx" ~> "g" ~>
-  "defaultTerm" ~> "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("_" ~> var "defaultTerm")
-        ("val" ~> var "val")
-        (var "e")]
-
--- | Interpreter-friendly isLeft for Either terms.
-isLeft_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-isLeft_ = define "isLeft" $
-  doc "Interpreter-friendly isLeft for Either terms." $
-  "cx" ~> "g" ~>
-  "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("_" ~> Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-        ("_" ~> Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False)
-        (var "e")]
-
--- | Interpreter-friendly isRight for Either terms.
-isRight_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-isRight_ = define "isRight" $
-  doc "Interpreter-friendly isRight for Either terms." $
-  "cx" ~> "g" ~>
-  "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("_" ~> Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False)
-        ("_" ~> Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-        (var "e")]
-
--- | Interpreter-friendly lefts for list of Either terms.
--- Extracts all Left values from a list.
-lefts_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-lefts_ = define "lefts" $
-  doc "Interpreter-friendly lefts for list of Either terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Core.termList $ Lists.foldl
-    ("acc" ~> "el" ~>
-      cases _Term (var "el")
-        (Just (var "acc")) [
-        _Term_either>>: "e" ~>
-          Eithers.either_
-            ("val" ~> Lists.concat2 (var "acc") (Lists.pure (var "val")))
-            ("_" ~> var "acc")
-            (var "e")])
-    (list ([] :: [TTerm Term]))
-    (var "elements")
-
-map_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-map_ = define "map" $
-  doc "Interpreter-friendly map for Either terms." $
-  "cx" ~> "g" ~>
-  "rightFun" ~> "eitherTerm" ~>
-  cases _Term (var "eitherTerm")
-    (Just (ExtractCore.unexpected (string "either value") (ShowCore.term @@ var "eitherTerm"))) [
-    _Term_either>>: "e" ~>
-      right $ Eithers.either_
-        ("val" ~> Core.termEither $ left $ var "val")
-        ("val" ~> Core.termEither $ right $ Core.termApplication $ Core.application (var "rightFun") (var "val"))
-        (var "e")]
-
--- | Interpreter-friendly mapList for Either (traverse).
--- mapList funTerm listTerm: applies funTerm to each element, collecting results.
--- Short-circuits on first Left error.
-mapList_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-mapList_ = define "mapList" $
-  doc "Interpreter-friendly mapList for Either (traverse)." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Fold over reversed elements so that cons builds list in original order
-  -- foldl (\acc el -> bind (f el) (\y -> map (cons y) acc)) (Right []) (reverse xs)
-  right $ Lists.foldl
-    -- Accumulator function: acc -> el -> Either err [results]
-    ("acc" ~> "el" ~>
-      -- First apply funTerm to element: funTerm el
-      -- Then bind the result to check if Left or Right
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _eithers_either)
-            -- If Left: return the Left unchanged (short-circuit)
-            (Core.termLambda $ Core.lambda (wrap _Name $ string "err") nothing $
-              Core.termEither $ left $ Core.termVariable $ wrap _Name $ string "err"))
-          -- If Right: check acc, if acc is Right then cons, else return acc's Left
-          (Core.termLambda $ Core.lambda (wrap _Name $ string "y") nothing $
-            Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termVariable $ encodedName _eithers_either)
-                  -- If acc is Left: return it
-                  (Core.termLambda $ Core.lambda (wrap _Name $ string "accErr") nothing $
-                    Core.termEither $ left $ Core.termVariable $ wrap _Name $ string "accErr"))
-                -- If acc is Right: cons y onto the list using primitive
-                (Core.termLambda $ Core.lambda (wrap _Name $ string "ys") nothing $
-                  Core.termEither $ right $
-                    Core.termApplication $ Core.application
-                      (Core.termApplication $ Core.application
-                        (Core.termVariable $ encodedName _lists_cons)
-                        (Core.termVariable $ wrap _Name $ string "y"))
-                      (Core.termVariable $ wrap _Name $ string "ys")))
-              (var "acc")))
-        (Core.termApplication $ Core.application (var "funTerm") (var "el")))
-    -- Initial accumulator: Right []
-    (Core.termEither $ right $ Core.termList $ list ([] :: [TTerm Term]))
-    -- Reverse elements so foldl with cons builds list in original order
-    (Lists.reverse $ var "elements")
-
--- | Interpreter-friendly mapSet for Either (traverse over Set).
--- mapSet funTerm setTerm: applies funTerm to each element, collecting results as a set.
--- Short-circuits on first Left error.
-mapSet_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-mapSet_ = define "mapSet" $
-  doc "Interpreter-friendly mapSet for Either (traverse over Set)." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "setTerm" ~>
-  "elements" <<~ (ExtractCore.set @@ var "g" @@ var "setTerm") $
-  -- Convert set to list, apply mapList logic, convert back to set
-  -- Fold over elements: foldl (\acc el -> either (\e -> Left e) (\y -> either (\e -> Left e) (\ys -> Right (cons y ys)) acc) (f el)) (Right []) elements
-  -- Then wrap result in Set
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _eithers_either)
-            -- If Left: return the Left unchanged (short-circuit)
-            (Core.termLambda $ Core.lambda (wrap _Name $ string "err") nothing $
-              Core.termEither $ left $ Core.termVariable $ wrap _Name $ string "err"))
-          -- If Right: check acc, if acc is Right then cons, else return acc's Left
-          (Core.termLambda $ Core.lambda (wrap _Name $ string "y") nothing $
-            Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termVariable $ encodedName _eithers_either)
-                  -- If acc is Left: return it
-                  (Core.termLambda $ Core.lambda (wrap _Name $ string "accErr") nothing $
-                    Core.termEither $ left $ Core.termVariable $ wrap _Name $ string "accErr"))
-                -- If acc is Right: insert y into the set using primitive
-                (Core.termLambda $ Core.lambda (wrap _Name $ string "ys") nothing $
-                  Core.termEither $ right $
-                    Core.termApplication $ Core.application
-                      (Core.termApplication $ Core.application
-                        (Core.termVariable $ encodedName _sets_insert)
-                        (Core.termVariable $ wrap _Name $ string "y"))
-                      (Core.termVariable $ wrap _Name $ string "ys")))
-              (var "acc")))
-        (Core.termApplication $ Core.application (var "funTerm") (var "el")))
-    -- Initial accumulator: Right (empty set)
-    (Core.termEither $ right $ Core.termSet $ Sets.fromList (list ([] :: [TTerm Term])))
-    -- Convert set elements to list for folding
-    (Sets.toList $ var "elements")
-
--- | Interpreter-friendly mapMaybe for Either (traverse over Maybe).
--- mapMaybe funTerm maybeTerm: if Just, applies funTerm to the value.
-mapMaybe_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-mapMaybe_ = define "mapMaybe" $
-  doc "Interpreter-friendly mapMaybe for Either (traverse over Maybe)." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "maybeTerm" ~>
-  cases _Term (var "maybeTerm")
-    (Just (ExtractCore.unexpected (string "maybe value") (ShowCore.term @@ var "maybeTerm"))) [
-    _Term_maybe>>: "opt" ~>
-      right $ Maybes.maybe
-        -- Nothing: return Right Nothing
-        (Core.termEither $ right $ Core.termMaybe nothing)
-        -- Just val: apply funTerm, wrap result in Just
-        ("val" ~>
-          Core.termApplication $ Core.application
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _eithers_either)
-                (Core.termLambda $ Core.lambda (wrap _Name $ string "err") nothing $
-                  Core.termEither $ left $ Core.termVariable $ wrap _Name $ string "err"))
-              (Core.termLambda $ Core.lambda (wrap _Name $ string "y") nothing $
-                Core.termEither $ right $ Core.termMaybe $ just $ Core.termVariable $ wrap _Name $ string "y"))
-            (Core.termApplication $ Core.application (var "funTerm") (var "val")))
-        (var "opt")]
-
--- | Interpreter-friendly partitionEithers for list of Either terms.
--- Splits a list of Eithers into (lefts, rights).
-partitionEithers_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-partitionEithers_ = define "partitionEithers" $
-  doc "Interpreter-friendly partitionEithers for list of Either terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      "ls" <~ Pairs.first (var "acc") $
-      "rs" <~ Pairs.second (var "acc") $
-      cases _Term (var "el")
-        (Just (var "acc")) [
-        _Term_either>>: "e" ~>
-          Eithers.either_
-            ("val" ~> pair (Lists.concat2 (var "ls") (Lists.pure (var "val"))) (var "rs"))
-            ("val" ~> pair (var "ls") (Lists.concat2 (var "rs") (Lists.pure (var "val"))))
-            (var "e")])
-    (pair (list ([] :: [TTerm Term])) (list ([] :: [TTerm Term])))
-    (var "elements")
-
--- | Interpreter-friendly rights for list of Either terms.
--- Extracts all Right values from a list.
-rights_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-rights_ = define "rights" $
-  doc "Interpreter-friendly rights for list of Either terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Core.termList $ Lists.foldl
-    ("acc" ~> "el" ~>
-      cases _Term (var "el")
-        (Just (var "acc")) [
-        _Term_either>>: "e" ~>
-          Eithers.either_
-            ("_" ~> var "acc")
-            ("val" ~> Lists.concat2 (var "acc") (Lists.pure (var "val")))
-            (var "e")])
-    (list ([] :: [TTerm Term]))
-    (var "elements")
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Equality.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Equality.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Equality.hs
+++ /dev/null
@@ -1,118 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Equality where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.equality"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Equality functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition identity_,
-      toDefinition max_,
-      toDefinition min_]
-
--- | Interpreter-friendly identity function.
--- identity x = x
-identity_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-identity_ = define "identity" $
-  doc "Interpreter-friendly identity function." $
-  "cx" ~> "g" ~>
-  "x" ~>
-  right $ var "x"
-
--- | Interpreter-friendly max.
--- max x y = ifElse (gte x y) x y
-max_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-max_ = define "max" $
-  doc "Interpreter-friendly max." $
-  "cx" ~> "g" ~>
-  "x" ~> "y" ~>
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _logic_ifElse)
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _equality_gte)
-            (var "x"))
-          (var "y")))
-      (var "x"))
-    (var "y")
-
--- | Interpreter-friendly min.
--- min x y = ifElse (lte x y) x y
-min_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-min_ = define "min" $
-  doc "Interpreter-friendly min." $
-  "cx" ~> "g" ~>
-  "x" ~> "y" ~>
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _logic_ifElse)
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _equality_lte)
-            (var "x"))
-          (var "y")))
-      (var "x"))
-    (var "y")
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Lists.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Lists.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Lists.hs
+++ /dev/null
@@ -1,678 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Lists where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (map)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Literals as MetaLiterals
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), map)
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Reduction as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.lists"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, Reduction.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of List functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition apply_,
-      toDefinition bind_,
-      toDefinition concat2_,
-      toDefinition dropWhile_,
-      toDefinition elem_,
-      toDefinition filter_,
-      toDefinition find_,
-      toDefinition foldl_,
-      toDefinition foldr_,
-      toDefinition group_,
-      toDefinition intercalate_,
-      toDefinition intersperse_,
-      toDefinition map_,
-      toDefinition maybeHead_,
-      toDefinition nub_,
-      toDefinition partition_,
-      toDefinition pure_,
-      toDefinition replicate_,
-      toDefinition singleton_,
-      toDefinition sort_,
-      toDefinition sortOn_,
-      toDefinition span_,
-      toDefinition uncons_,
-      toDefinition zipWith_]
-
--- | Interpreter-friendly applicative apply for List terms.
--- Applies each function in funsTerm to each argument in argsTerm.
-apply_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-apply_ = define "apply" $
-  doc "Interpreter-friendly applicative apply for List terms." $
-  "cx" ~> "g" ~>
-  "funsTerm" ~> "argsTerm" ~>
-  "funs" <<~ (ExtractCore.list @@ var "g" @@ var "funsTerm") $
-  "arguments" <<~ (ExtractCore.list @@ var "g" @@ var "argsTerm") $
-  "applyOne" <~ ("f" ~> Lists.map
-    ("arg" ~> Core.termApplication $ Core.application (var "f") (var "arg"))
-    (var "arguments")) $
-  right $ Core.termList $ Lists.concat $ Lists.map (var "applyOne") (var "funs")
-
--- | Interpreter-friendly monadic bind for List terms.
--- Applies funTerm to each element and concatenates the results.
-bind_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-bind_ = define "bind" $
-  doc "Interpreter-friendly monadic bind for List terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~> "funTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _lists_concat)
-    (Core.termList $ Lists.map
-      ("el" ~> Core.termApplication $ Core.application (var "funTerm") (var "el"))
-      (var "elements"))
-
--- | Interpreter-friendly concat2 for List terms.
--- Concatenates two lists.
-concat2_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-concat2_ = define "concat2" $
-  doc "Interpreter-friendly concat2 for List terms." $
-  "cx" ~> "g" ~>
-  "list1" ~> "list2" ~>
-  -- Build: concat [list1, list2]
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _lists_concat)
-    (Core.termList $ list [var "list1", var "list2"])
-
--- | Interpreter-friendly dropWhile for List terms.
--- Drops elements from the front while predTerm returns true.
-dropWhile_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-dropWhile_ = define "dropWhile" $
-  doc "Interpreter-friendly dropWhile for List terms." $
-  "cx" ~> "g" ~>
-  "predTerm" ~> "listTerm" ~>
-  -- Build: snd (span predTerm listTerm) - delegate to span primitive
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _pairs_second)
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _lists_span)
-        (var "predTerm"))
-      (var "listTerm"))
-
--- | Interpreter-friendly filter for List terms.
--- Keeps elements where predTerm returns true.
-filter_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-filter_ = define "filter" $
-  doc "Interpreter-friendly filter for List terms." $
-  "cx" ~> "g" ~>
-  "predTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build: concat (map (\el -> ifElse (pred el) [el] []) elements)
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _lists_concat)
-    (Core.termList $ Lists.map
-      ("el" ~> Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _logic_ifElse)
-            (Core.termApplication $ Core.application (var "predTerm") (var "el")))
-          (Core.termList $ Lists.pure (var "el")))
-        (Core.termList $ list ([] :: [TTerm Term])))
-      (var "elements"))
-
--- | Interpreter-friendly find for List terms.
--- Returns the first element where predTerm returns true, or Nothing if none found.
-find_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-find_ = define "find" $
-  doc "Interpreter-friendly find for List terms." $
-  "cx" ~> "g" ~>
-  "predTerm" ~> "listTerm" ~>
-  -- Build: maybeHead (filter predTerm listTerm) - delegate to filter and maybeHead
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _lists_maybeHead)
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _lists_filter)
-        (var "predTerm"))
-      (var "listTerm"))
-
--- | Interpreter-friendly left fold for List terms.
--- Folds from the left: foldl f init [e1,e2,e3] = f (f (f init e1) e2) e3
--- Each step is reduced through the interpreter so that the accumulator is always a value.
-foldl_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-foldl_ = define "foldl" $
-  doc "Interpreter-friendly left fold for List terms." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "initTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Fold with reduction at each step: reduce f(acc, el) before next iteration.
-  -- The accumulator is Either Error Term to thread errors through.
-  Lists.foldl
-    ("acc" ~> "el" ~>
-      Eithers.bind (var "acc") $
-        "reducedAcc" ~>
-          Reduction.reduceTerm @@ var "cx" @@ var "g" @@ MetaLiterals.boolean True @@
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application (var "funTerm") (var "reducedAcc"))
-              (var "el")))
-    (right $ var "initTerm")
-    (var "elements")
-
--- | Interpreter-friendly right fold for List terms.
--- Folds from the right: foldr f init [e1,e2,e3] = f e1 (f e2 (f e3 init))
--- Each step is reduced through the interpreter so that the accumulator is always a value.
-foldr_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-foldr_ = define "foldr" $
-  doc "Interpreter-friendly right fold for List terms." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "initTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Fold with reduction at each step
-  Lists.foldr
-    ("el" ~> "acc" ~>
-      Eithers.bind (var "acc") $
-        "reducedAcc" ~>
-          Reduction.reduceTerm @@ var "cx" @@ var "g" @@ MetaLiterals.boolean True @@
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application (var "funTerm") (var "el"))
-              (var "reducedAcc")))
-    (right $ var "initTerm")
-    (var "elements")
-
--- | Interpreter-friendly map for List terms.
--- Applies funTerm to each element of listTerm.
--- Note: builds result directly using foldl to avoid recursive primitive calls.
-map_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-map_ = define "map" $
-  doc "Interpreter-friendly map for List terms." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build the mapped list by folding over elements and accumulating applications
-  -- This avoids calling lists.map recursively
-  right $ Core.termList $ Lists.reverse $ Lists.foldl
-    ("acc" ~> "el" ~> Lists.cons
-      (Core.termApplication $ Core.application (var "funTerm") (var "el"))
-      (var "acc"))
-    (list ([] :: [TTerm Term]))
-    (var "elements")
-
--- | Interpreter-friendly partition for List terms.
--- Partitions elements into (satisfying predicate, not satisfying predicate).
--- Unlike span, partition checks ALL elements, not just the prefix.
-partition_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-partition_ = define "partition" $
-  doc "Interpreter-friendly partition for List terms." $
-  "cx" ~> "g" ~>
-  "predTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- State: (yeses, nos) - two accumulators
-  -- Initial: ([], [])
-  -- Step: ifElse (pred el) (append yeses [el], nos) (yeses, append nos [el])
-  -- Result: (yeses, nos) - already in correct order due to foldl + concat2
-  "initialState" <~ (Core.termPair $ pair
-    (Core.termList $ list ([] :: [TTerm Term]))
-    (Core.termList $ list ([] :: [TTerm Term]))) $
-  "finalState" <~ (Lists.foldl
-    ("acc" ~> "el" ~>
-      -- Extract state components
-      "yeses" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_first)
-        (var "acc")) $
-      "nos" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_second)
-        (var "acc")) $
-      -- Build ifElse (pred el) trueCase falseCase
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _logic_ifElse)
-            -- condition: pred el
-            (Core.termApplication $ Core.application (var "predTerm") (var "el")))
-          -- true branch: (append yeses [el], nos)
-          (Core.termPair $ pair
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _lists_concat2)
-                (var "yeses"))
-              (Core.termList $ list [var "el"]))
-            (var "nos")))
-        -- false branch: (yeses, append nos [el])
-        (Core.termPair $ pair
-          (var "yeses")
-          (Core.termApplication $ Core.application
-            (Core.termApplication $ Core.application
-              (Core.termVariable $ encodedName _lists_concat2)
-              (var "nos"))
-            (Core.termList $ list [var "el"]))))
-    (var "initialState")
-    (var "elements")) $
-  -- Return the final state directly (it's already a pair)
-  right $ var "finalState"
-
--- | Interpreter-friendly sortOn for List terms.
--- Sorts elements by comparing the results of applying projTerm to each.
--- Uses insertion sort: for each element, use span to find insertion point.
-sortOn_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-sortOn_ = define "sortOn" $
-  doc "Interpreter-friendly sortOn for List terms." $
-  "cx" ~> "g" ~>
-  "projTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build: foldl (\sorted x -> insert x sorted) [] elements
-  -- where insert x sorted = let (before, after) = span (\y -> lte (proj y) (proj x)) sorted
-  --                         in concat [before, [x], after]
-  right $ Lists.foldl
-    ("sorted" ~> "x" ~>
-      -- Build the split using span with predicate: \y -> lte (proj y) (proj x)
-      "splitResult" <~ (Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _lists_span)
-          -- predicate lambda: \y -> lte (proj y) (proj x) -- use lte for stable sort
-          (Core.termLambda $ Core.lambda (wrap _Name $ string "y") nothing $
-            Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _equality_lte)
-                (Core.termApplication $ Core.application
-                  (var "projTerm")
-                  (Core.termVariable $ wrap _Name $ string "y")))
-              (Core.termApplication $ Core.application (var "projTerm") (var "x"))))
-        (var "sorted")) $
-      -- Build: concat [before, [x], after]
-      "before" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_first)
-        (var "splitResult")) $
-      "after" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_second)
-        (var "splitResult")) $
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _lists_concat2)
-          (var "before"))
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _lists_cons)
-            (var "x"))
-          (var "after")))
-    (Core.termList $ list ([] :: [TTerm Term]))
-    (var "elements")
-
--- | Interpreter-friendly span for List terms.
--- Splits the list into (takeWhile pred list, dropWhile pred list).
--- Uses foldl with state ((stillTaking, left), right) to track the split point.
-span_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-span_ = define "span" $
-  doc "Interpreter-friendly span for List terms." $
-  "cx" ~> "g" ~>
-  "predTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- State: ((taking, left), right) as nested pairs
-  -- Initial: ((true, []), [])
-  -- Step: ifElse (and taking (pred el))
-  --         ((true, append left [el]), right)
-  --         ((false, left), append right [el])
-  -- Result: (snd (fst result), snd result)
-  "initialState" <~ (Core.termPair $ pair
-    (Core.termPair $ pair
-      (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-      (Core.termList $ list ([] :: [TTerm Term])))
-    (Core.termList $ list ([] :: [TTerm Term]))) $
-  "finalState" <~ (Lists.foldl
-    ("acc" ~> "el" ~>
-      -- Extract state components using term-level pairs
-      "takingLeft" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_first)
-        (var "acc")) $
-      "right" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_second)
-        (var "acc")) $
-      "taking" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_first)
-        (var "takingLeft")) $
-      "left" <~ (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_second)
-        (var "takingLeft")) $
-      -- Build ifElse (and taking (pred el)) trueCase falseCase
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _logic_ifElse)
-            -- condition: and taking (pred el)
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _logic_and)
-                (var "taking"))
-              (Core.termApplication $ Core.application (var "predTerm") (var "el"))))
-          -- true branch: ((true, append left [el]), right)
-          (Core.termPair $ pair
-            (Core.termPair $ pair
-              (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-              (Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termVariable $ encodedName _lists_concat2)
-                  (var "left"))
-                (Core.termList $ list [var "el"])))
-            (var "right")))
-        -- false branch: ((false, left), append right [el])
-        (Core.termPair $ pair
-          (Core.termPair $ pair
-            (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False)
-            (var "left"))
-          (Core.termApplication $ Core.application
-            (Core.termApplication $ Core.application
-              (Core.termVariable $ encodedName _lists_concat2)
-              (var "right"))
-            (Core.termList $ list [var "el"]))))
-    (var "initialState")
-    (var "elements")) $
-  -- Extract result: (snd (fst finalState), snd finalState)
-  right $ Core.termPair $ pair
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _pairs_second)
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _pairs_first)
-        (var "finalState")))
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _pairs_second)
-      (var "finalState"))
-
--- | Interpreter-friendly uncons for List terms.
--- uncons xs = maybe Nothing (\h -> Just (h, drop 1 xs)) (maybeAt 0 xs)
-uncons_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-uncons_ = define "uncons" $
-  doc "Interpreter-friendly uncons for List terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Core.termMaybe $ Maybes.maybe
-    nothing
-    ("h" ~> just $ Core.termPair $ pair
-      (var "h")
-      (Core.termList $ Lists.drop (int32 1) (var "elements")))
-    (Lists.maybeAt (int32 0) (var "elements"))
-
--- | Interpreter-friendly zipWith for List terms.
--- Applies funTerm to corresponding pairs of elements.
-zipWith_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-zipWith_ = define "zipWith" $
-  doc "Interpreter-friendly zipWith for List terms." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "listTerm1" ~> "listTerm2" ~>
-  "elements1" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm1") $
-  "elements2" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm2") $
-  -- Build: [f a1 b1, f a2 b2, ...]
-  right $ Core.termList $ Lists.map
-    ("p" ~>
-      "a" <~ Pairs.first (var "p") $
-      "b" <~ Pairs.second (var "p") $
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application (var "funTerm") (var "a"))
-        (var "b"))
-    (Lists.zip (var "elements1") (var "elements2"))
-
--- | Interpreter-friendly elem for List terms.
--- Tests whether an element is in the list: elem x xs = isJust (find (equal x) xs)
-elem_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-elem_ = define "elem" $
-  doc "Interpreter-friendly elem for List terms." $
-  "cx" ~> "g" ~>
-  "x" ~> "listTerm" ~>
-  -- Build: isJust (find (equal x) listTerm)
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _maybes_isJust)
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _lists_find)
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _equality_equal)
-          (var "x")))
-      (var "listTerm"))
-
--- | Interpreter-friendly group for List terms.
--- Groups consecutive equal elements: group [1,1,2,2,2,3] = [[1,1],[2,2,2],[3]]
--- Returns a term that delegates to the lists.foldl primitive with a term-level lambda.
--- The interpreter's native foldl uses functionWithReduce, which reduces each step
--- via reduceTerm — so the accumulator is always a value, not an unreduced expression.
--- Uses maybeHead+maybe instead of null+head+ifElse to avoid eager evaluation of head on empty lists.
-group_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-group_ = define "group" $
-  doc "Interpreter-friendly group for List terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  right $ Core.termApplication $ Core.application flushFn foldExpr
-  where
-    -- Helper: build a primitive application
-    prim1 n x = Core.termApplication $ Core.application (Core.termVariable $ encodedName n) x
-    prim2 n x y = Core.termApplication $ Core.application (Core.termApplication $ Core.application (Core.termVariable $ encodedName n) x) y
-    prim3 n x y z = Core.termApplication $ Core.application (Core.termApplication $ Core.application (Core.termApplication $ Core.application (Core.termVariable $ encodedName n) x) y) z
-    -- Helper: term-level variable
-    tv s = Core.termVariable $ wrap _Name $ string s
-    -- Helper: term-level lambda
-    lam s body = Core.termLambda $ Core.lambda (wrap _Name $ string s) nothing body
-
-    -- stepFn: \acc el -> maybe ([el], snd acc) (\h -> ifElse (equal el h) (extend) (flush)) (maybeHead (fst acc))
-    stepFn = lam "acc" $ lam "el" $
-      prim3 _maybes_maybe
-        -- Nothing (empty group): start new with [el]
-        (Core.termPair $ pair
-          (Core.termList $ list [tv "el"])
-          (prim1 _pairs_second (tv "acc")))
-        -- Just h: check equality
-        (lam "h" $
-          prim3 _logic_ifElse
-            (prim2 _equality_equal (tv "el") (tv "h"))
-            -- Same: extend current group
-            (Core.termPair $ pair
-              (prim2 _lists_concat2 (prim1 _pairs_first (tv "acc")) (Core.termList $ list [tv "el"]))
-              (prim1 _pairs_second (tv "acc")))
-            -- Different: flush and start new
-            (Core.termPair $ pair
-              (Core.termList $ list [tv "el"])
-              (prim2 _lists_concat2
-                (prim1 _pairs_second (tv "acc"))
-                (Core.termList $ list [prim1 _pairs_first (tv "acc")]))))
-        -- maybeHead (fst acc)
-        (prim1 _lists_maybeHead (prim1 _pairs_first (tv "acc")))
-
-    initState = Core.termPair $ pair
-      (Core.termList $ list ([] :: [TTerm Term]))
-      (Core.termList $ list ([] :: [TTerm Term]))
-
-    foldExpr = prim3 _lists_foldl stepFn initState (var "listTerm")
-
-    -- Flush: \foldResult -> ifElse (null (fst r)) (snd r) (concat2 (snd r) [fst r])
-    flushFn = lam "foldResult" $
-      prim3 _logic_ifElse
-        (prim1 _lists_null (prim1 _pairs_first (tv "foldResult")))
-        (prim1 _pairs_second (tv "foldResult"))
-        (prim2 _lists_concat2
-          (prim1 _pairs_second (tv "foldResult"))
-          (Core.termList $ list [prim1 _pairs_first (tv "foldResult")]))
-
--- | Interpreter-friendly intercalate for List terms.
--- intercalate sep xss = concat (intersperse sep xss)
-intercalate_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-intercalate_ = define "intercalate" $
-  doc "Interpreter-friendly intercalate for List terms." $
-  "cx" ~> "g" ~>
-  "sep" ~> "listsTerm" ~>
-  -- Build: concat (intersperse sep listsTerm)
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _lists_concat)
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _lists_intersperse)
-        (var "sep"))
-      (var "listsTerm"))
-
--- | Interpreter-friendly intersperse for List terms.
--- intersperse sep [a,b,c] = [a,sep,b,sep,c]
-intersperse_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-intersperse_ = define "intersperse" $
-  doc "Interpreter-friendly intersperse for List terms." $
-  "cx" ~> "g" ~>
-  "sep" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Core.termList $ Maybes.maybe
-    (list ([] :: [TTerm Term]))
-    ("p" ~> Lists.cons
-      (Pairs.first (var "p"))
-      (Lists.concat $ Lists.map
-        ("el" ~> list [var "sep", var "el"])
-        (Pairs.second (var "p"))))
-    (Lists.uncons (var "elements"))
-
--- | Interpreter-friendly maybeHead for List terms.
--- maybeHead xs = maybe Nothing (Just . fst) (uncons xs)
-maybeHead_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-maybeHead_ = define "maybeHead" $
-  doc "Interpreter-friendly maybeHead for List terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  right $ Core.termMaybe $ Maybes.maybe
-    nothing
-    ("p" ~> just (Pairs.first (var "p")))
-    (Lists.uncons (var "elements"))
-
--- | Interpreter-friendly nub for List terms.
--- Removes duplicates using equality. nub xs = foldl (\acc x -> ifElse (elem x acc) acc (concat2 acc [x])) [] xs
-nub_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-nub_ = define "nub" $
-  doc "Interpreter-friendly nub for List terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build: foldl (\acc x -> ifElse (elem x acc) acc (concat2 acc [x])) [] xs
-  -- This must be entirely at the term level since we need runtime equality checks
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _lists_foldl)
-        -- fold function: \acc x -> ifElse (elem x acc) acc (concat2 acc [x])
-        (Core.termLambda $ Core.lambda (wrap _Name $ string "acc") nothing $
-          Core.termLambda $ Core.lambda (wrap _Name $ string "x") nothing $
-            Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termVariable $ encodedName _logic_ifElse)
-                  (Core.termApplication $ Core.application
-                    (Core.termApplication $ Core.application
-                      (Core.termVariable $ encodedName _lists_elem)
-                      (Core.termVariable $ wrap _Name $ string "x"))
-                    (Core.termVariable $ wrap _Name $ string "acc")))
-                (Core.termVariable $ wrap _Name $ string "acc"))
-              (Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termVariable $ encodedName _lists_concat2)
-                  (Core.termVariable $ wrap _Name $ string "acc"))
-                (Core.termList $ list [Core.termVariable $ wrap _Name $ string "x"]))))
-      -- initial: []
-      (Core.termList $ list ([] :: [TTerm Term])))
-    -- list
-    (var "listTerm")
-
--- | Interpreter-friendly pure for List terms.
--- Wraps a single element in a list: pure x = [x]
-pure_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-pure_ = define "pure" $
-  doc "Interpreter-friendly pure for List terms." $
-  "cx" ~> "g" ~>
-  "x" ~>
-  right $ Core.termList $ list [var "x"]
-
--- | Interpreter-friendly replicate for List terms.
--- replicate n x = map (const x) (range 0 n)
-replicate_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-replicate_ = define "replicate" $
-  doc "Interpreter-friendly replicate for List terms." $
-  "cx" ~> "g" ~>
-  "n" ~> "x" ~>
-  -- Build: map (\_ -> x) (range 1 n)  -- range is inclusive, so range 1 n has n elements
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _lists_map)
-      (Core.termLambda $ Core.lambda (wrap _Name $ string "_") nothing $
-        var "x"))
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _math_range)
-        (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ MetaLiterals.int32 1))
-      (var "n"))
-
--- | Interpreter-friendly singleton for List terms.
--- singleton x = [x]
-singleton_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-singleton_ = define "singleton" $
-  doc "Interpreter-friendly singleton for List terms." $
-  "cx" ~> "g" ~>
-  "x" ~>
-  right $ Core.termList $ list [var "x"]
-
--- | Interpreter-friendly sort for List terms.
--- sort xs = sortOn identity xs
-sort_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-sort_ = define "sort" $
-  doc "Interpreter-friendly sort for List terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  -- Build: sortOn identity listTerm
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _lists_sortOn)
-      (Core.termVariable $ encodedName _equality_identity))
-    (var "listTerm")
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Logic.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Logic.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Logic.hs
+++ /dev/null
@@ -1,117 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Logic where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Literals as MetaLiterals
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.logic"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Logic functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition and_,
-      toDefinition not_,
-      toDefinition or_]
-
--- | Interpreter-friendly logical AND.
--- and a b = ifElse a b false
-and_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-and_ = define "and" $
-  doc "Interpreter-friendly logical AND." $
-  "cx" ~> "g" ~>
-  "a" ~> "b" ~>
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _logic_ifElse)
-        (var "a"))
-      (var "b"))
-    (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False)
-
--- | Interpreter-friendly logical NOT.
--- not a = ifElse a false true
-not_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-not_ = define "not" $
-  doc "Interpreter-friendly logical NOT." $
-  "cx" ~> "g" ~>
-  "a" ~>
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _logic_ifElse)
-        (var "a"))
-      (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False))
-    (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-
--- | Interpreter-friendly logical OR.
--- or a b = ifElse a true b
-or_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-or_ = define "or" $
-  doc "Interpreter-friendly logical OR." $
-  "cx" ~> "g" ~>
-  "a" ~> "b" ~>
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _logic_ifElse)
-        (var "a"))
-      (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True))
-    (var "b")
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Maps.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Maps.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Maps.hs
+++ /dev/null
@@ -1,255 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Maps where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (map)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), map)
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.maps"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Map functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition alter_,
-      toDefinition bimap_,
-      toDefinition filter_,
-      toDefinition filterWithKey_,
-      toDefinition findWithDefault_,
-      toDefinition map_,
-      toDefinition mapKeys_]
-
--- | Interpreter-friendly alter for Map terms.
--- Applies funTerm to the current value (or Nothing) and updates accordingly.
-alter_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-alter_ = define "alter" $
-  doc "Interpreter-friendly alter for Map terms." $
-  "cx" ~> "g" ~>
-  "funTerm" ~> "keyTerm" ~> "mapTerm" ~>
-  cases _Term (var "mapTerm")
-    (Just (ExtractCore.unexpected (string "map value") (ShowCore.term @@ var "mapTerm"))) [
-    _Term_map>>: "m" ~>
-      -- Get current value: lookup key m
-      "currentVal" <~ Maps.lookup (var "keyTerm") (var "m") $
-      -- Apply function to get new value: funTerm (Just v) or funTerm Nothing
-      "newVal" <~ Core.termApplication (Core.application
-        (var "funTerm")
-        (Core.termMaybe (var "currentVal"))) $
-      -- Result depends on newVal:
-      -- If newVal is Nothing, delete the key
-      -- If newVal is Just v', insert/update with v'
-      right $ Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _maybes_maybe)
-            -- default: delete key from map
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _maps_delete)
-                (var "keyTerm"))
-              (var "mapTerm")))
-          -- function: insert new value (as a term-level lambda)
-          (Core.termLambda $ Core.lambda (wrap _Name $ string "newV") nothing $
-            Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termVariable $ encodedName _maps_insert)
-                  (var "keyTerm"))
-                (Core.termVariable $ wrap _Name $ string "newV"))
-              (var "mapTerm")))
-        (var "newVal")]
-
--- | Interpreter-friendly bimap for Map terms.
--- Applies keyFun to each key and valFun to each value.
-bimap_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-bimap_ = define "bimap" $
-  doc "Interpreter-friendly bimap for Map terms." $
-  "cx" ~> "g" ~>
-  "keyFun" ~> "valFun" ~> "mapTerm" ~>
-  cases _Term (var "mapTerm")
-    (Just (ExtractCore.unexpected (string "map value") (ShowCore.term @@ var "mapTerm"))) [
-    _Term_map>>: "m" ~>
-      -- m is Map Term Term, convert to list of pairs
-      "pairs" <~ Maps.toList (var "m") $
-      -- Build: fromList (map (\(k,v) -> (keyFun k, valFun v)) pairs)
-      right $ Core.termMap $ Maps.fromList $ Lists.map
-        ("p" ~>
-          "k" <~ Pairs.first (var "p") $
-          "v" <~ Pairs.second (var "p") $
-          pair
-            (Core.termApplication $ Core.application (var "keyFun") (var "k"))
-            (Core.termApplication $ Core.application (var "valFun") (var "v")))
-        (var "pairs")]
-
--- | Interpreter-friendly filter for Map terms.
--- Keeps entries where valPred returns true for the value.
-filter_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-filter_ = define "filter" $
-  doc "Interpreter-friendly filter for Map terms." $
-  "cx" ~> "g" ~>
-  "valPred" ~> "mapTerm" ~>
-  cases _Term (var "mapTerm")
-    (Just (ExtractCore.unexpected (string "map value") (ShowCore.term @@ var "mapTerm"))) [
-    _Term_map>>: "m" ~>
-      "pairs" <~ Maps.toList (var "m") $
-      -- Build: fromList (concat (map (\(k,v) -> if valPred v then [(k,v)] else []) pairs))
-      right $ Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _maps_fromList)
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _lists_concat)
-          (Core.termList $ Lists.map
-            ("p" ~>
-              "v" <~ Pairs.second (var "p") $
-              Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termApplication $ Core.application
-                    (Core.termVariable $ encodedName _logic_ifElse)
-                    (Core.termApplication $ Core.application (var "valPred") (var "v")))
-                  (Core.termList $ Lists.pure $ Core.termPair $ pair (Pairs.first $ var "p") (var "v")))
-                (Core.termList $ list ([] :: [TTerm Term])))
-            (var "pairs")))]
-
--- | Interpreter-friendly filterWithKey for Map terms.
--- Keeps entries where pred returns true for the key and value.
-filterWithKey_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-filterWithKey_ = define "filterWithKey" $
-  doc "Interpreter-friendly filterWithKey for Map terms." $
-  "cx" ~> "g" ~>
-  "pred" ~> "mapTerm" ~>
-  cases _Term (var "mapTerm")
-    (Just (ExtractCore.unexpected (string "map value") (ShowCore.term @@ var "mapTerm"))) [
-    _Term_map>>: "m" ~>
-      "pairs" <~ Maps.toList (var "m") $
-      -- Build: fromList (concat (map (\(k,v) -> if pred k v then [(k,v)] else []) pairs))
-      right $ Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _maps_fromList)
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _lists_concat)
-          (Core.termList $ Lists.map
-            ("p" ~>
-              "k" <~ Pairs.first (var "p") $
-              "v" <~ Pairs.second (var "p") $
-              Core.termApplication $ Core.application
-                (Core.termApplication $ Core.application
-                  (Core.termApplication $ Core.application
-                    (Core.termVariable $ encodedName _logic_ifElse)
-                    (Core.termApplication $ Core.application
-                      (Core.termApplication $ Core.application (var "pred") (var "k"))
-                      (var "v")))
-                  (Core.termList $ Lists.pure $ Core.termPair $ pair (var "k") (var "v")))
-                (Core.termList $ list ([] :: [TTerm Term])))
-            (var "pairs")))]
-
--- | Interpreter-friendly findWithDefault for Map terms.
--- findWithDefault default key map: returns the value at key, or default if not found.
-findWithDefault_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-findWithDefault_ = define "findWithDefault" $
-  doc "Interpreter-friendly findWithDefault for Map terms." $
-  "cx" ~> "g" ~>
-  "defaultTerm" ~> "keyTerm" ~> "mapTerm" ~>
-  -- Build: fromMaybe default (lookup key map)
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _maybes_fromMaybe)
-      (var "defaultTerm"))
-    (Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termVariable $ encodedName _maps_lookup)
-        (var "keyTerm"))
-      (var "mapTerm"))
-
--- | Interpreter-friendly map for Map terms.
--- Applies valFun to each value.
-map_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-map_ = define "map" $
-  doc "Interpreter-friendly map for Map terms." $
-  "cx" ~> "g" ~>
-  "valFun" ~> "mapTerm" ~>
-  cases _Term (var "mapTerm")
-    (Just (ExtractCore.unexpected (string "map value") (ShowCore.term @@ var "mapTerm"))) [
-    _Term_map>>: "m" ~>
-      "pairs" <~ Maps.toList (var "m") $
-      -- Build: fromList (map (\(k,v) -> (k, valFun v)) pairs)
-      right $ Core.termMap $ Maps.fromList $ Lists.map
-        ("p" ~>
-          "k" <~ Pairs.first (var "p") $
-          "v" <~ Pairs.second (var "p") $
-          pair (var "k") (Core.termApplication $ Core.application (var "valFun") (var "v")))
-        (var "pairs")]
-
--- | Interpreter-friendly mapKeys for Map terms.
--- Applies keyFun to each key.
-mapKeys_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-mapKeys_ = define "mapKeys" $
-  doc "Interpreter-friendly mapKeys for Map terms." $
-  "cx" ~> "g" ~>
-  "keyFun" ~> "mapTerm" ~>
-  cases _Term (var "mapTerm")
-    (Just (ExtractCore.unexpected (string "map value") (ShowCore.term @@ var "mapTerm"))) [
-    _Term_map>>: "m" ~>
-      "pairs" <~ Maps.toList (var "m") $
-      -- Build: fromList (map (\(k,v) -> (keyFun k, v)) pairs)
-      right $ Core.termMap $ Maps.fromList $ Lists.map
-        ("p" ~>
-          "k" <~ Pairs.first (var "p") $
-          "v" <~ Pairs.second (var "p") $
-          pair (Core.termApplication $ Core.application (var "keyFun") (var "k")) (var "v"))
-        (var "pairs")]
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Math.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Math.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Math.hs
+++ /dev/null
@@ -1,112 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Math where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Literals as MetaLiterals
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.math"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Math functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition even_,
-      toDefinition odd_]
-
--- | Interpreter-friendly even.
--- even x = equal (mod x 2) 0
-even_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-even_ = define "even" $
-  doc "Interpreter-friendly even." $
-  "cx" ~> "g" ~>
-  "x" ~>
-  -- fromMaybe 0 (maybeMod x 2) == 0
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _equality_equal)
-      (Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _maybes_fromMaybe)
-          (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ MetaLiterals.int32 0))
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _math_maybeMod)
-            (var "x"))
-          (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ MetaLiterals.int32 2))))
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ MetaLiterals.int32 0)
-
--- | Interpreter-friendly odd.
--- odd x = not (even x)
-odd_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-odd_ = define "odd" $
-  doc "Interpreter-friendly odd." $
-  "cx" ~> "g" ~>
-  "x" ~>
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _logic_not)
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ encodedName _math_even)
-      (var "x"))
-
--- TODO: range lo hi = ifElse (gt lo hi) [] (cons lo (range (add lo 1) hi))
---   The recursive definition causes the interpreter to loop. The eval primitive returns a term
---   containing ifElse(gt(lo,hi), [], cons(lo, range(add(lo,1), hi))), but reduction does not
---   terminate. Needs investigation of the reducer's handling of recursive primitive references.
--- range_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Maybes.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Maybes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Maybes.hs
+++ /dev/null
@@ -1,295 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Maybes where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (maybe)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Literals as MetaLiterals
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), maybe, map)
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.maybes"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Maybe functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition apply_,
-      toDefinition bind_,
-      toDefinition cases_,
-      toDefinition cat_,
-      toDefinition compose_,
-      toDefinition fromJust_,
-      toDefinition fromMaybe_,
-      toDefinition isJust_,
-      toDefinition isNothing_,
-      toDefinition map_,
-      toDefinition mapMaybe_,
-      toDefinition maybe_,
-      toDefinition pure_,
-      toDefinition toList_]
-
--- | Interpreter-friendly applicative apply for Maybe terms.
--- apply (Just f) (Just x) = Just (f x); otherwise Nothing
--- We manually construct the result because the nested lambda would be flattened in Python.
--- The logic is: apply (Just f) (Just x) = Just (f x)
-apply_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-apply_ = define "apply" $
-  doc "Interpreter-friendly applicative apply for Maybe terms." $
-  "cx" ~> "g" ~> "funOptTerm" ~> "argOptTerm" ~>
-  cases _Term (var "funOptTerm")
-    (Just (ExtractCore.unexpected (string "optional function") (ShowCore.term @@ var "funOptTerm"))) [
-    _Term_maybe>>: "mf" ~>
-      cases _Term (var "argOptTerm")
-        (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "argOptTerm"))) [
-        _Term_maybe>>: "mx" ~>
-          -- Manual applicative apply: for Just f, Just x => Just (f x); else Nothing
-          -- We use Maybes.bind to handle the nested Maybes without requiring curried lambdas
-          right $ Core.termMaybe $
-            Maybes.bind (var "mf") $
-              "f" ~> Maybes.map ("x" ~> Core.termApplication $ Core.application (var "f") (var "x")) (var "mx")]]
-
--- | Interpreter-friendly monadic bind for Maybe terms.
--- bind (Just x) f = f x; bind Nothing f = Nothing
-bind_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-bind_ = define "bind" $
-  doc "Interpreter-friendly monadic bind for Maybe terms." $
-  "cx" ~> "g" ~> "optTerm" ~> "funTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Maybes.maybe
-        (Core.termMaybe nothing)
-        ("val" ~> Core.termApplication $ Core.application (var "funTerm") (var "val"))
-        (var "m")]
-
--- | Interpreter-friendly cat (catMaybes) for list of Maybe terms.
--- Filters out Nothings and unwraps Justs.
-cat_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-cat_ = define "cat" $
-  doc "Interpreter-friendly cat for list of Maybe terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build: foldl (\acc el -> case el of TermMaybe m -> maybe acc (\v -> concat2 acc [v]) m; _ -> acc) [] elements
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      cases _Term (var "el")
-        (Just (var "acc")) [
-        _Term_maybe>>: "m" ~>
-          Maybes.maybe
-            (var "acc")
-            ("v" ~> Lists.concat2 (var "acc") (Lists.pure (var "v")))
-            (var "m")])
-    (list ([] :: [TTerm Term]))
-    (var "elements")
-
--- | Interpreter-friendly case analysis for Maybe terms (cases variant).
--- Takes optTerm, defaultTerm, funTerm - returns defaultTerm if Nothing,
--- or applies funTerm to the value if Just.
-cases_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-cases_ = define "cases" $
-  doc "Interpreter-friendly case analysis for Maybe terms (cases argument order)." $
-  "cx" ~> "g" ~> "optTerm" ~> "defaultTerm" ~> "funTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Maybes.maybe
-        (var "defaultTerm")
-        ("val" ~> Core.termApplication $ Core.application (var "funTerm") (var "val"))
-        (var "m")]
-
--- | Interpreter-friendly fromJust for Maybe terms.
--- Extracts the value from Just, or errors on Nothing.
-fromJust_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-fromJust_ = define "fromJust" $
-  doc "Interpreter-friendly fromJust for Maybe terms." $
-  "cx" ~> "g" ~>
-  "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      Maybes.maybe
-        (ExtractCore.unexpected (string "Just value") (ShowCore.term @@ var "optTerm"))
-        ("val" ~> right $ var "val")
-        (var "m")]
-
--- | Interpreter-friendly fromMaybe for Maybe terms.
--- Returns the contained value or a default.
-fromMaybe_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-fromMaybe_ = define "fromMaybe" $
-  doc "Interpreter-friendly fromMaybe for Maybe terms." $
-  "cx" ~> "g" ~>
-  "defaultTerm" ~> "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Maybes.maybe
-        (var "defaultTerm")
-        ("val" ~> var "val")
-        (var "m")]
-
--- | Interpreter-friendly isJust for Maybe terms.
-isJust_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-isJust_ = define "isJust" $
-  doc "Interpreter-friendly isJust for Maybe terms." $
-  "cx" ~> "g" ~>
-  "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Maybes.maybe
-        (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False)
-        ("_" ~> Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-        (var "m")]
-
--- | Interpreter-friendly isNothing for Maybe terms.
-isNothing_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-isNothing_ = define "isNothing" $
-  doc "Interpreter-friendly isNothing for Maybe terms." $
-  "cx" ~> "g" ~>
-  "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Maybes.maybe
-        (Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean True)
-        ("_" ~> Core.termLiteral $ Core.literalBoolean $ MetaLiterals.boolean False)
-        (var "m")]
-
--- | Interpreter-friendly Kleisli composition for Maybe.
--- compose f g x = bind (f x) g
-compose_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-compose_ = define "compose" $
-  doc "Interpreter-friendly Kleisli composition for Maybe." $
-  "cx" ~> "g" ~> "funF" ~> "funG" ~> "xTerm" ~>
-  -- Compute: bind (f x) g
-  -- This builds the term: bind @ (funF @ xTerm) @ funG
-  right $ Core.termApplication $ Core.application
-    (Core.termApplication $ Core.application
-      (Core.termVariable $ wrap _Name $ string "hydra.lib.maybes.bind")
-      (Core.termApplication $ Core.application (var "funF") (var "xTerm")))
-    (var "funG")
-
--- | Interpreter-friendly map for Maybe terms.
--- Returns Nothing if Nothing, or Just (fun val) if Just val.
-map_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-map_ = define "map" $
-  doc "Interpreter-friendly map for Maybe terms." $
-  "cx" ~> "g" ~> "funTerm" ~> "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Core.termMaybe $ Maybes.map
-        ("val" ~> Core.termApplication $ Core.application (var "funTerm") (var "val"))
-        (var "m")]
-
--- | Interpreter-friendly mapMaybe for List terms.
--- Applies funTerm to each element, keeping only Just results.
-mapMaybe_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-mapMaybe_ = define "mapMaybe" $
-  doc "Interpreter-friendly mapMaybe for List terms." $
-  "cx" ~> "g" ~> "funTerm" ~> "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build: cat (map funTerm elements) - cat filters out Nothings and unwraps Justs
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ wrap _Name $ string "hydra.lib.maybes.cat")
-    (Core.termList $ Lists.map
-      ("el" ~> Core.termApplication $ Core.application (var "funTerm") (var "el"))
-      (var "elements"))
-
--- | Interpreter-friendly case analysis for Maybe terms.
--- Takes defaultTerm, funTerm, optTerm - returns defaultTerm if Nothing,
--- or applies funTerm to the value if Just.
-maybe_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-maybe_ = define "maybe" $
-  doc "Interpreter-friendly case analysis for Maybe terms." $
-  "cx" ~> "g" ~> "defaultTerm" ~> "funTerm" ~> "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Maybes.maybe
-        (var "defaultTerm")
-        ("val" ~> Core.termApplication $ Core.application (var "funTerm") (var "val"))
-        (var "m")]
-
--- | Interpreter-friendly pure for Maybe terms.
--- Wraps a value in Just.
-pure_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-pure_ = define "pure" $
-  doc "Interpreter-friendly pure for Maybe terms." $
-  "cx" ~> "g" ~>
-  "x" ~>
-  right $ Core.termMaybe $ just $ var "x"
-
--- | Interpreter-friendly toList for Maybe terms.
--- Just x -> [x], Nothing -> []
-toList_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-toList_ = define "toList" $
-  doc "Interpreter-friendly toList for Maybe terms." $
-  "cx" ~> "g" ~>
-  "optTerm" ~>
-  cases _Term (var "optTerm")
-    (Just (ExtractCore.unexpected (string "optional value") (ShowCore.term @@ var "optTerm"))) [
-    _Term_maybe>>: "m" ~>
-      right $ Core.termList $ Maybes.maybe
-        (list ([] :: [TTerm Term]))
-        ("val" ~> Lists.pure (var "val"))
-        (var "m")]
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Pairs.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Pairs.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Pairs.hs
+++ /dev/null
@@ -1,114 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Pairs where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.pairs"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Pair functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition bimap_,
-      toDefinition first_,
-      toDefinition second_]
-
--- | Interpreter-friendly bimap for Pair terms.
--- Applies firstFun to the first element and secondFun to the second element.
-bimap_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Term -> Either Error Term)
-bimap_ = define "bimap" $
-  doc "Interpreter-friendly bimap for Pair terms." $
-  "cx" ~> "g" ~>
-  "firstFun" ~> "secondFun" ~> "pairTerm" ~>
-  cases _Term (var "pairTerm")
-    (Just (ExtractCore.unexpected (string "pair value") (ShowCore.term @@ var "pairTerm"))) [
-    _Term_pair>>: "p" ~>
-      "fst" <~ Pairs.first (var "p") $
-      "snd" <~ Pairs.second (var "p") $
-      right $ Core.termPair $ pair
-        (Core.termApplication $ Core.application (var "firstFun") (var "fst"))
-        (Core.termApplication $ Core.application (var "secondFun") (var "snd"))]
-
--- | Interpreter-friendly first for Pair terms.
--- Extracts the first element of a pair.
-first_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-first_ = define "first" $
-  doc "Interpreter-friendly first for Pair terms." $
-  "cx" ~> "g" ~>
-  "pairTerm" ~>
-  cases _Term (var "pairTerm")
-    (Just (ExtractCore.unexpected (string "pair value") (ShowCore.term @@ var "pairTerm"))) [
-    _Term_pair>>: "p" ~>
-      right $ Pairs.first (var "p")]
-
--- | Interpreter-friendly second for Pair terms.
--- Extracts the second element of a pair.
-second_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-second_ = define "second" $
-  doc "Interpreter-friendly second for Pair terms." $
-  "cx" ~> "g" ~>
-  "pairTerm" ~>
-  cases _Term (var "pairTerm")
-    (Just (ExtractCore.unexpected (string "pair value") (ShowCore.term @@ var "pairTerm"))) [
-    _Term_pair>>: "p" ~>
-      right $ Pairs.second (var "p")]
diff --git a/src/main/haskell/Hydra/Sources/Eval/Lib/Sets.hs b/src/main/haskell/Hydra/Sources/Eval/Lib/Sets.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Eval/Lib/Sets.hs
+++ /dev/null
@@ -1,186 +0,0 @@
-
-module Hydra.Sources.Eval.Lib.Sets where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (map)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths     as Paths
-import qualified Hydra.Dsl.Annotations   as Annotations
-import qualified Hydra.Dsl.Ast           as Ast
-import qualified Hydra.Dsl.Bootstrap     as Bootstrap
-import qualified Hydra.Dsl.Coders        as Coders
-import qualified Hydra.Dsl.Util       as Util
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Json.Model          as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Literals      as Literals
-import qualified Hydra.Dsl.LiteralTypes  as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base     as MetaBase
-import qualified Hydra.Dsl.Meta.Terms    as MetaTerms
-import qualified Hydra.Dsl.Meta.Types    as MetaTypes
-import qualified Hydra.Dsl.Packaging        as Packaging
-import           Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Prims         as Prims
-import qualified Hydra.Dsl.Meta.Tabular       as Tabular
-import qualified Hydra.Dsl.Meta.Testing       as Testing
-import qualified Hydra.Dsl.Terms         as Terms
-import qualified Hydra.Dsl.Tests         as Tests
-import qualified Hydra.Dsl.Topology      as Topology
-import qualified Hydra.Dsl.Types         as Types
-import qualified Hydra.Dsl.Typing        as Typing
-import qualified Hydra.Dsl.Util          as Util
-import qualified Hydra.Dsl.Meta.Variants      as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), map)
-import qualified Data.Int                as I
-import qualified Data.List               as L
-import qualified Data.Map                as M
-import qualified Data.Set                as S
-import qualified Data.Maybe              as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-ns :: Namespace
-ns = Namespace "hydra.eval.lib.sets"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Evaluation-level implementations of Set functions for the Hydra interpreter.")}
-  where
-    definitions = [
-      toDefinition difference_,
-      toDefinition intersection_,
-      toDefinition map_,
-      toDefinition union_,
-      toDefinition unions_]
-
--- | Interpreter-friendly set difference.
--- difference s1 s2: elements in s1 that are not in s2.
-difference_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-difference_ = define "difference" $
-  doc "Interpreter-friendly set difference." $
-  "cx" ~> "g" ~>
-  "set1Term" ~> "set2Term" ~>
-  "elements" <<~ (ExtractCore.set @@ var "g" @@ var "set1Term") $
-  -- Build: foldl (\acc el -> ifElse (member el set2) acc (insert el acc)) empty (toList set1)
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _logic_ifElse)
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _sets_member)
-                (var "el"))
-              (var "set2Term")))
-          (var "acc"))
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _sets_insert)
-            (var "el"))
-          (var "acc")))
-    (Core.termSet $ Sets.fromList (list ([] :: [TTerm Term])))
-    (Sets.toList $ var "elements")
-
--- | Interpreter-friendly set intersection.
--- intersection s1 s2: elements in both s1 and s2.
-intersection_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-intersection_ = define "intersection" $
-  doc "Interpreter-friendly set intersection." $
-  "cx" ~> "g" ~>
-  "set1Term" ~> "set2Term" ~>
-  "elements" <<~ (ExtractCore.set @@ var "g" @@ var "set1Term") $
-  -- Build: foldl (\acc el -> ifElse (member el set2) (insert el acc) acc) empty (toList set1)
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termApplication $ Core.application
-            (Core.termVariable $ encodedName _logic_ifElse)
-            (Core.termApplication $ Core.application
-              (Core.termApplication $ Core.application
-                (Core.termVariable $ encodedName _sets_member)
-                (var "el"))
-              (var "set2Term")))
-          (Core.termApplication $ Core.application
-            (Core.termApplication $ Core.application
-              (Core.termVariable $ encodedName _sets_insert)
-              (var "el"))
-            (var "acc")))
-        (var "acc"))
-    (Core.termSet $ Sets.fromList (list ([] :: [TTerm Term])))
-    (Sets.toList $ var "elements")
-
--- | Interpreter-friendly map for Set terms.
--- Applies fun to each element.
-map_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-map_ = define "map" $
-  doc "Interpreter-friendly map for Set terms." $
-  "cx" ~> "g" ~>
-  "fun" ~> "setTerm" ~>
-  "elements" <<~ (ExtractCore.set @@ var "g" @@ var "setTerm") $
-  -- Build: fromList (map fun (toList elements))
-  right $ Core.termApplication $ Core.application
-    (Core.termVariable $ encodedName _sets_fromList)
-    (Core.termList $ Lists.map
-      ("el" ~> Core.termApplication $ Core.application (var "fun") (var "el"))
-      (Sets.toList $ var "elements"))
-
--- | Interpreter-friendly set union.
--- union s1 s2: elements in either s1 or s2.
-union_ :: TTermDefinition (Context -> Graph -> Term -> Term -> Either Error Term)
-union_ = define "union" $
-  doc "Interpreter-friendly set union." $
-  "cx" ~> "g" ~>
-  "set1Term" ~> "set2Term" ~>
-  "elements" <<~ (ExtractCore.set @@ var "g" @@ var "set1Term") $
-  -- Build: foldl (\acc el -> insert el acc) set2 (toList set1)
-  right $ Lists.foldl
-    ("acc" ~> "el" ~>
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _sets_insert)
-          (var "el"))
-        (var "acc"))
-    (var "set2Term")
-    (Sets.toList $ var "elements")
-
--- | Interpreter-friendly unions for list of Set terms.
--- unions [s1, s2, ...]: union of all sets.
-unions_ :: TTermDefinition (Context -> Graph -> Term -> Either Error Term)
-unions_ = define "unions" $
-  doc "Interpreter-friendly unions for list of Set terms." $
-  "cx" ~> "g" ~>
-  "listTerm" ~>
-  "elements" <<~ (ExtractCore.list @@ var "g" @@ var "listTerm") $
-  -- Build: foldl union empty sets
-  right $ Lists.foldl
-    ("acc" ~> "s" ~>
-      Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _sets_union)
-          (var "acc"))
-        (var "s"))
-    (Core.termSet $ Sets.fromList (list ([] :: [TTerm Term])))
-    (var "elements")
diff --git a/src/main/haskell/Hydra/Sources/Ext.hs b/src/main/haskell/Hydra/Sources/Ext.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Ext.hs
+++ /dev/null
@@ -1,233 +0,0 @@
--- | Aggregates Hydra ext source modules via per-package manifest modules.
---
--- Top-level unions (`hydraExtModules`, `hydraExtJsonModules`,
--- `hydraExtDemoModules`, `genpgModules`, etc.) are defined in terms of
--- imports from each package's Manifest module plus a small set of
--- overrides for second-order meta-sources and demo-only modules. See
--- feature_290_packaging-plan.md, "Sync system redesign / Package manifests".
---
--- Overrides (things not in any package's physical manifest):
---
---   * `DecodePgMapping`, `DecodePgModel`, `EncodePgMapping`, `EncodePgModel`
---     are second-order DSL sources living under
---     `dist/haskell/hydra-pg/src/main/haskell/`. They are generated from
---     hydra-pg's type modules and fed back in as inputs to ext generation.
---     Packaging them cleanly is deferred to #228 / future cleanup.
---   * `GenPGTransform` physically lives under `demos/` but today leaks into
---     `hydraExtModules` via `otherExtModules`. Preserved here to avoid
---     behavior change; flagged for future cleanup (it should move into a
---     demo-specific module list).
---
--- Legacy compatibility: `hydraExtDemoModules` and `genpgModules` preserve
--- the exact content they had before the manifest refactor. In particular,
--- `pgLegacyModules` is narrower than `PgManifest.mainModules` (it excludes
--- Graphson, Graphviz, and GQL but includes the decode/encode pg meta-sources).
--- Similarly, `graphsonLegacyModules` is extracted from PgManifest content
--- for use by `genpgModules`. These legacy shapes will be revisited when the
--- demo build files move to per-package source lists.
-
-module Hydra.Sources.Ext (
-  module Hydra.Sources.Ext,
-  module Hydra.Sources.All,
-) where
-
-import Hydra.Kernel
-import Hydra.Sources.All
-
-import qualified Hydra.Sources.Coq.Manifest as CoqManifest
-import qualified Hydra.Sources.Ext.Manifest as ExtManifest
-import qualified Hydra.Sources.Java.Manifest as JavaManifest
-import qualified Hydra.Sources.JavaScript.Manifest as JavaScriptManifest
-import qualified Hydra.Sources.Lisp.Manifest as LispManifest
-import qualified Hydra.Sources.Pg.Manifest as PgManifest
-import qualified Hydra.Sources.Python.Manifest as PythonManifest
-import qualified Hydra.Sources.Rdf.Manifest as RdfManifest
-import qualified Hydra.Sources.Scala.Manifest as ScalaManifest
-import qualified Hydra.Sources.Wasm.Manifest as WasmManifest
-
--- Overrides: second-order meta-sources living under dist/haskell/hydra-pg/.
-import qualified Hydra.Sources.Decode.Pg.Mapping as DecodePgMapping
-import qualified Hydra.Sources.Decode.Pg.Model as DecodePgModel
-import qualified Hydra.Sources.Encode.Pg.Mapping as EncodePgMapping
-import qualified Hydra.Sources.Encode.Pg.Model as EncodePgModel
-
--- Override: demo-only module that today leaks into hydraExtModules.
-import qualified Hydra.Sources.Demos.GenPG.Transform as GenPGTransform
-
--- Legacy compatibility: explicit imports for the historical pgModules /
--- graphsonModules shape, used by hydraExtDemoModules and genpgModules.
-import qualified Hydra.Sources.Cypher.Features as CypherFeatures
-import qualified Hydra.Sources.Cypher.OpenCypher as OpenCypher
-import qualified Hydra.Sources.Error.Pg as ErrorPg
-import qualified Hydra.Sources.Pg.Coder as PgCoder
-import qualified Hydra.Sources.Pg.Graphson.Coder as GraphsonCoder
-import qualified Hydra.Sources.Pg.Graphson.Construct as GraphsonConstruct
-import qualified Hydra.Sources.Pg.Graphson.Syntax as GraphsonSyntax
-import qualified Hydra.Sources.Pg.Graphson.Utils as GraphsonUtils
-import qualified Hydra.Sources.Pg.Mapping as PgMapping
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Pg.Printing as PgPrinting
-import qualified Hydra.Sources.Pg.Query as PgQuery
-import qualified Hydra.Sources.Pg.Rdf.Environment as PgRdfEnvironment
-import qualified Hydra.Sources.Pg.Rdf.Mappings as PgRdfMappings
-import qualified Hydra.Sources.Pg.TermsToElements as PgTermsToElements
-import qualified Hydra.Sources.Pg.Utils as PgUtils
-import qualified Hydra.Sources.Tinkerpop.Features as TinkerpopFeatures
-import qualified Hydra.Sources.Tinkerpop.Gremlin as Gremlin
-import qualified Hydra.Sources.Tinkerpop.Language as TinkerpopLanguage
-import qualified Hydra.Sources.Validate.Pg as ValidatePg
-
-import qualified Data.List as L
-
--- ----------------------------------------------------------------------
--- Per-package unions (thin aliases over each package's manifest)
--- ----------------------------------------------------------------------
-
-hydraCoqModules :: [Module]
-hydraCoqModules = CoqManifest.mainModules
-
-hydraExtPackageModules :: [Module]
-hydraExtPackageModules = ExtManifest.mainModules
-
-hydraJavaModules :: [Module]
-hydraJavaModules = JavaManifest.mainModules
-
-hydraJavaScriptModules :: [Module]
-hydraJavaScriptModules = JavaScriptManifest.mainModules
-
-hydraLispModules :: [Module]
-hydraLispModules = LispManifest.mainModules
-
-hydraPgModules :: [Module]
-hydraPgModules = PgManifest.mainModules
-
-hydraPythonModules :: [Module]
-hydraPythonModules = PythonManifest.mainModules
-
-hydraRdfModules :: [Module]
-hydraRdfModules = RdfManifest.mainModules
-
-hydraScalaModules :: [Module]
-hydraScalaModules = ScalaManifest.mainModules
-
-hydraWasmModules :: [Module]
-hydraWasmModules = WasmManifest.mainModules
-
--- ----------------------------------------------------------------------
--- Overrides for second-order and demo-only modules
--- ----------------------------------------------------------------------
-
--- | Decode-side meta-sources for hydra-pg. Generated from hydra-pg's type
---   modules; live under dist/haskell/hydra-pg/.
-hydraExtDecodingModules :: [Module]
-hydraExtDecodingModules = [
-  DecodePgMapping.module_,
-  DecodePgModel.module_]
-
--- | Encode-side meta-sources for hydra-pg. Generated from hydra-pg's type
---   modules; live under dist/haskell/hydra-pg/.
-hydraExtEncodingModules :: [Module]
-hydraExtEncodingModules = [
-  EncodePgMapping.module_,
-  EncodePgModel.module_]
-
--- ----------------------------------------------------------------------
--- Legacy compatibility shapes
--- ----------------------------------------------------------------------
-
--- | Historical pgModules: the subset of PgManifest content plus the
---   decode/encode pg meta-sources, used by hydraExtDemoModules and
---   genpgModules. Narrower than PgManifest.mainModules (excludes Graphson,
---   Graphviz, Gql/PathAlgebra).
-pgLegacyModules :: [Module]
-pgLegacyModules = [
-  CypherFeatures.module_,
-  DecodePgMapping.module_,
-  DecodePgModel.module_,
-  EncodePgMapping.module_,
-  EncodePgModel.module_,
-  ErrorPg.module_,
-  Gremlin.module_,
-  OpenCypher.module_,
-  PgCoder.module_,
-  PgMapping.module_,
-  PgModel.module_,
-  PgPrinting.module_,
-  PgQuery.module_,
-  PgRdfEnvironment.module_,
-  PgRdfMappings.module_,
-  PgTermsToElements.module_,
-  PgUtils.module_,
-  TinkerpopFeatures.module_,
-  TinkerpopLanguage.module_,
-  ValidatePg.module_]
-
--- | Historical graphsonModules, used to compose genpgModules.
-graphsonLegacyModules :: [Module]
-graphsonLegacyModules = [
-  GraphsonCoder.module_,
-  GraphsonConstruct.module_,
-  GraphsonSyntax.module_,
-  GraphsonUtils.module_]
-
--- ----------------------------------------------------------------------
--- Top-level unions consumed by execs and demos
--- ----------------------------------------------------------------------
-
--- | Coder modules for the bootstrap-relevant languages: Haskell, Java, Python,
---   Scala, and Lisp.
-hydraBootstrapCoderModules :: [Module]
-hydraBootstrapCoderModules =
-  haskellModules ++ hydraJavaModules ++ hydraPythonModules ++ hydraScalaModules ++ hydraLispModules
-
--- | Essential hydra-ext modules: the Java and Python coder families.
-hydraExtEssentialModules :: [Module]
-hydraExtEssentialModules = hydraJavaModules ++ hydraPythonModules
-
--- | The full union of modules in the ext universe, as today.
---
--- Constructed from the per-package manifest unions plus the decode/encode
--- meta-source overrides and the demo-only GenPGTransform. The second-order
--- meta-sources and GenPGTransform are preserved here so that today's sync
--- output matches exactly; both are flagged for future cleanup.
-hydraExtModules :: [Module]
-hydraExtModules =
-     hydraCoqModules
-  ++ hydraExtPackageModules
-  ++ hydraJavaModules
-  ++ hydraJavaScriptModules
-  ++ hydraLispModules
-  ++ hydraPgModules
-  ++ hydraPythonModules
-  ++ hydraRdfModules
-  ++ hydraScalaModules
-  ++ [DecodePgMapping.module_, DecodePgModel.module_,
-      EncodePgMapping.module_, EncodePgModel.module_,
-      GenPGTransform.module_]
-
--- | All modules that should be exported to JSON, including decode/encode modules
---   that are not part of hydraExtModules in all contexts.
-hydraExtJsonModules :: [Module]
-hydraExtJsonModules = hydraExtModules
-  ++ hydraExtDecodingModules
-  ++ hydraExtEncodingModules
-
--- | Ext modules whose generated code is checked into hydra-ext/src/gen-main/
---   for each target language (Haskell, Java, Python). These are the modules
---   needed by hydra-ext demos and other target-language code. Not to be
---   confused with language coder modules.
---
--- Uses the legacy pgLegacyModules shape so that the list of modules exposed
--- to `bootstrap-from-json --ext-only` is identical to pre-refactor behavior.
-hydraExtDemoModules :: [Module]
-hydraExtDemoModules = L.nub $ L.concat [pgLegacyModules, genpgModules, hydraRdfModules]
-
--- | Legacy alias.
-hydraExtJavaModules :: [Module]
-hydraExtJavaModules = hydraExtDemoModules
-
--- | All hydra-ext modules for the GenPG demo.
---
--- Historically: graphsonLegacyModules ++ pgLegacyModules ++ [GenPGTransform].
-genpgModules :: [Module]
-genpgModules = graphsonLegacyModules ++ pgLegacyModules ++ [GenPGTransform.module_]
diff --git a/src/main/haskell/Hydra/Sources/Ext/Manifest.hs b/src/main/haskell/Hydra/Sources/Ext/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Ext/Manifest.hs
+++ /dev/null
@@ -1,144 +0,0 @@
--- | Package manifest for hydra-ext.
---
--- Owns DSL sources for the "truly-ext" coders and formats: Avro, Protobuf,
--- GraphQL, Pegasus/PDL, Yaml, Atlas, Cpp, Csharp, Go, Json Schema, Rust,
--- TypeScript, and various miscellaneous domain modules. See
--- feature_290_packaging-plan.md, "Sync system redesign / Package manifests".
---
--- Note: The following files exist in packages/hydra-ext/ but are intentionally
--- excluded from mainModules, preserving the exclusions from
--- heads/haskell/Sources/Ext.hs:
---
---   * Go.Serde — WIP, incomplete module
-
-module Hydra.Sources.Ext.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Avro.Coder as AvroCoder
-import qualified Hydra.Sources.Avro.Encoder as AvroEncoder
-import qualified Hydra.Sources.Avro.Environment as AvroEnvironment
-import qualified Hydra.Sources.Avro.Language as AvroLanguage
-import qualified Hydra.Sources.Avro.Schema as AvroSchema
-import qualified Hydra.Sources.Avro.SchemaJson as AvroSchemaJson
-import qualified Hydra.Sources.Avro.Testing as AvroTesting
-import qualified Hydra.Sources.Cpp.Coder as CppCoder
-import qualified Hydra.Sources.Cpp.Environment as CppEnvironment
-import qualified Hydra.Sources.Cpp.Language as CppLanguage
-import qualified Hydra.Sources.Cpp.Names as CppNames
-import qualified Hydra.Sources.Cpp.Serde as CppSerde
-import qualified Hydra.Sources.Cpp.Syntax as CppSyntax
-import qualified Hydra.Sources.Cpp.Utils as CppUtils
-import qualified Hydra.Sources.Csharp.Language as CsharpLanguage
-import qualified Hydra.Sources.Csharp.Syntax as CsharpSyntax
-import qualified Hydra.Sources.Delta.Parquet as DeltaParquet
-import qualified Hydra.Sources.Go.Language as GoLanguage
-import qualified Hydra.Sources.Go.Syntax as GoSyntax
-import qualified Hydra.Sources.Graphql.Coder as GraphqlCoder
-import qualified Hydra.Sources.Graphql.Language as GraphqlLanguage
-import qualified Hydra.Sources.Graphql.Serde as GraphqlSerde
-import qualified Hydra.Sources.Graphql.Syntax as GraphqlSyntax
-import qualified Hydra.Sources.Json.Schema as JsonSchema
-import qualified Hydra.Sources.Json.Schema.Coder as JsonSchemaCoder
-import qualified Hydra.Sources.Json.Schema.Language as JsonSchemaLanguage
-import qualified Hydra.Sources.Json.Schema.Serde as JsonSchemaSerde
-import qualified Hydra.Sources.Kusto.Kql as Kql
-import qualified Hydra.Sources.Other.Atlas as Atlas
-import qualified Hydra.Sources.Other.AzureDtld as AzureDtld
-import qualified Hydra.Sources.Other.Datalog as Datalog
-import qualified Hydra.Sources.Other.GeoJson as GeoJson
-import qualified Hydra.Sources.Other.IanaRelations as IanaRelations
-import qualified Hydra.Sources.Other.Osv as Osv
-import qualified Hydra.Sources.Other.StacItems as StacItems
-import qualified Hydra.Sources.Parquet.Format as ParquetFormat
-import qualified Hydra.Sources.Pegasus.Coder as PegasusCoder
-import qualified Hydra.Sources.Pegasus.Language as PegasusLanguage
-import qualified Hydra.Sources.Pegasus.Pdl as Pdl
-import qualified Hydra.Sources.Pegasus.Serde as PegasusSerde
-import qualified Hydra.Sources.Protobuf.Any as ProtobufAny
-import qualified Hydra.Sources.Protobuf.Coder as ProtobufCoder
-import qualified Hydra.Sources.Protobuf.Environment as ProtobufEnvironment
-import qualified Hydra.Sources.Protobuf.Language as ProtobufLanguage
-import qualified Hydra.Sources.Protobuf.Proto3 as Proto3
-import qualified Hydra.Sources.Protobuf.Serde as ProtobufSerde
-import qualified Hydra.Sources.Protobuf.SourceContext as ProtobufSourceContext
-import qualified Hydra.Sources.Rust.Coder as RustCoder
-import qualified Hydra.Sources.Rust.Language as RustLanguage
-import qualified Hydra.Sources.Rust.Operators as RustOperators
-import qualified Hydra.Sources.Rust.Serde as RustSerde
-import qualified Hydra.Sources.Rust.Syntax as RustSyntax
-import qualified Hydra.Sources.Sql.Ansi as SqlAnsi
-import qualified Hydra.Sources.TypeScript.Language as TypeScriptLanguage
-import qualified Hydra.Sources.TypeScript.Model as TypeScriptModel
-import qualified Hydra.Sources.Workflow as Workflow
-import qualified Hydra.Sources.Yaml.Coder as YamlCoder
-import qualified Hydra.Sources.Yaml.Language as YamlLanguage
-import qualified Hydra.Sources.Yaml.Serde as YamlSerde
-
-mainModules :: [Module]
-mainModules = [
-  Atlas.module_,
-  AvroCoder.module_,
-  AvroEncoder.module_,
-  AvroEnvironment.module_,
-  AvroLanguage.module_,
-  AvroSchema.module_,
-  AvroSchemaJson.module_,
-  AvroTesting.module_,
-  AzureDtld.module_,
-  CppCoder.module_,
-  CppEnvironment.module_,
-  CppLanguage.module_,
-  CppNames.module_,
-  CppSerde.module_,
-  CppSyntax.module_,
-  CppUtils.module_,
-  CsharpLanguage.module_,
-  CsharpSyntax.module_,
-  Datalog.module_,
-  DeltaParquet.module_,
-  GeoJson.module_,
-  GoLanguage.module_,
-  GoSyntax.module_,
-  GraphqlCoder.module_,
-  GraphqlLanguage.module_,
-  GraphqlSerde.module_,
-  GraphqlSyntax.module_,
-  IanaRelations.module_,
-  JsonSchema.module_,
-  JsonSchemaCoder.module_,
-  JsonSchemaLanguage.module_,
-  JsonSchemaSerde.module_,
-  Kql.module_,
-  Osv.module_,
-  ParquetFormat.module_,
-  Pdl.module_,
-  PegasusCoder.module_,
-  PegasusLanguage.module_,
-  PegasusSerde.module_,
-  Proto3.module_,
-  ProtobufAny.module_,
-  ProtobufCoder.module_,
-  ProtobufEnvironment.module_,
-  ProtobufLanguage.module_,
-  ProtobufSerde.module_,
-  ProtobufSourceContext.module_,
-  RustCoder.module_,
-  RustLanguage.module_,
-  RustOperators.module_,
-  RustSerde.module_,
-  RustSyntax.module_,
-  SqlAnsi.module_,
-  StacItems.module_,
-  TypeScriptLanguage.module_,
-  TypeScriptModel.module_,
-  Workflow.module_,
-  YamlCoder.module_,
-  YamlLanguage.module_,
-  YamlSerde.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Go/Language.hs b/src/main/haskell/Hydra/Sources/Go/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Go/Language.hs
+++ /dev/null
@@ -1,212 +0,0 @@
-module Hydra.Sources.Go.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.go.language"),
-            moduleDefinitions = [toDefinition goLanguage, toDefinition goReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Go 1.22+"}
-goLanguage :: TTermDefinition Language
-goLanguage = define "goLanguage" $
-    doc "Language constraints for Go 1.22+" $ lets [
-    -- Go supports record projection, union elimination via type switch, and wrap/unwrap
-    "eliminationVariants">: Sets.fromList $ list [
-      Variants.eliminationVariantRecord,
-      Variants.eliminationVariantUnion,
-      Variants.eliminationVariantWrap],
-    -- Go supports all literal variants
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBinary, -- []byte
-      Variants.literalVariantBoolean, -- bool
-      Variants.literalVariantFloat, -- float32, float64
-      Variants.literalVariantInteger, -- int8, int16, int32, int64, uint8, uint16, uint32, uint64
-      Variants.literalVariantString], -- string
-    -- Go has float32 and float64 but no native arbitrary-precision float
-    "floatTypes">: Sets.fromList $ list [
-      Core.floatTypeFloat32, -- float32
-      Core.floatTypeFloat64], -- float64
-    -- Go supports all three function variants
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination,
-      Variants.functionVariantLambda],
-    -- Go has all standard integer types plus big.Int from math/big
-    "integerTypes">: Sets.fromList $ list [
-      Core.integerTypeBigint, -- math/big.Int
-      Core.integerTypeInt8, -- int8
-      Core.integerTypeInt16, -- int16
-      Core.integerTypeInt32, -- int32 (also rune)
-      Core.integerTypeInt64, -- int64
-      Core.integerTypeUint8, -- uint8 (also byte)
-      Core.integerTypeUint16, -- uint16
-      Core.integerTypeUint32, -- uint32
-      Core.integerTypeUint64], -- uint64
-    -- Go supports most term variants; some require interface{} + type switch patterns
-    "termVariants">: Sets.fromList $ list [
-      Variants.termVariantAnnotated,
-      Variants.termVariantApplication,
-      Variants.termVariantEither, -- via interface with Left/Right structs
-
-      Variants.termVariantCases,
-
-      Variants.termVariantLambda,
-
-      Variants.termVariantProject,
-
-      Variants.termVariantUnwrap,
-      Variants.termVariantLet, -- via := and var
-      Variants.termVariantList, -- slices []T
-      Variants.termVariantLiteral,
-      Variants.termVariantMap, -- map[K]V
-      Variants.termVariantMaybe, -- *T (pointer) or custom Maybe type
-      Variants.termVariantPair, -- struct{First T; Second U}
-      Variants.termVariantRecord, -- struct
-      Variants.termVariantSet, -- map[T]struct{} or custom Set type
-      Variants.termVariantTypeApplication, -- generics T[U]
-      Variants.termVariantTypeLambda, -- generic functions func[T any](...)
-      Variants.termVariantInject, -- interface with sealed marker method
-      Variants.termVariantUnit, -- struct{}
-      Variants.termVariantVariable,
-      Variants.termVariantWrap], -- type aliases / named types
-    -- Go 1.22+ supports generics, so most type variants are available
-    "typeVariants">: Sets.fromList $ list [
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication, -- T[U]
-      Variants.typeVariantEither, -- interface
-      Variants.typeVariantFunction, -- func(A) B
-      Variants.typeVariantForall, -- [T any]
-      Variants.typeVariantList, -- []T
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap, -- map[K]V
-      Variants.typeVariantMaybe, -- *T
-      Variants.typeVariantPair, -- struct{First T; Second U}
-      Variants.typeVariantRecord, -- struct
-      Variants.typeVariantSet, -- map[T]struct{}
-      Variants.typeVariantUnion, -- interface
-      Variants.typeVariantUnit, -- struct{}
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap], -- type Name T
-    -- Go's type system is more restrictive than Haskell's, but with generics most types work
-    "typePredicate">: constant true] $
-    Coders.language
-      (Coders.languageName_ $ string "hydra.go")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
-goReservedWords :: TTermDefinition (S.Set String)
-goReservedWords = define "goReservedWords" $
-  doc "A set of reserved words in Go" $
-  lets [
-    "goKeywords">:
-      doc "Go keywords, as enumerated at https://go.dev/ref/spec#Keywords" $
-      list $ string <$> [
-        "break", "case", "chan", "const", "continue", "default", "defer", "else",
-        "fallthrough", "for", "func", "go", "goto", "if", "import", "interface",
-        "map", "package", "range", "return", "select", "struct", "switch", "type", "var"],
-    "goPredeclaredIdentifiers">:
-      doc "Predeclared identifiers in Go, as enumerated at https://go.dev/ref/spec#Predeclared_identifiers" $
-      list $ string <$> [
-        -- Types
-        "any", "bool", "byte", "comparable", "complex64", "complex128", "error",
-        "float32", "float64", "int", "int8", "int16", "int32", "int64",
-        "rune", "string", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr",
-        -- Constants
-        "true", "false", "iota",
-        -- Zero value
-        "nil",
-        -- Functions
-        "append", "cap", "clear", "close", "complex", "copy", "delete", "imag",
-        "len", "make", "max", "min", "new", "panic", "print", "println", "real", "recover"],
-    "hydraGoKeywords">:
-      doc "Reserved words which are specific to Hydra-Go" $
-      list $ string <$> ["Node", "Maybe", "Either", "Left", "Right", "Just", "Nothing", "Unit", "Pair"]] $
-    Sets.fromList $ Lists.concat $ list [var "goKeywords", var "goPredeclaredIdentifiers", var "hydraGoKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Go/Serde.hs b/src/main/haskell/Hydra/Sources/Go/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Go/Serde.hs
+++ /dev/null
@@ -1,789 +0,0 @@
--- | Serialization of Go syntax to source code.
---
--- This module provides functions for converting Go AST nodes to source code text,
--- using Hydra's Ast.Expr representation as an intermediate form.
-module Hydra.Sources.Go.Serde where
-
-import Hydra.Constants
-import Hydra.Kernel
-import Hydra.Serialization
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Go.Syntax as Go
-
-import qualified Data.List as L
-import qualified Data.Maybe as Y
-import qualified Data.Char as C
-import Data.Char (ord, toUpper)
-import Numeric (showHex)
-
--- ============================================================================
--- Source File Structure
--- ============================================================================
-
-writeSourceFile :: Go.SourceFile -> Ast.Expr
-writeSourceFile (Go.SourceFile pkg imports decls) = doubleNewlineSep $ Y.catMaybes [
-  Just $ singleLineComment warningAutoGeneratedFile,
-  Just $ writePackageClause pkg,
-  if L.null imports then Nothing else Just $ newlineSep (writeImportDecl <$> imports),
-  if L.null decls then Nothing else Just $ doubleNewlineSep (writeTopLevelDecl <$> decls)]
-
-writeModule :: Go.Module -> Ast.Expr
-writeModule (Go.Module pkg imports decls) = doubleNewlineSep $ Y.catMaybes [
-  Just $ singleLineComment warningAutoGeneratedFile,
-  Just $ writePackageClause pkg,
-  if L.null imports then Nothing else Just $ newlineSep (writeImportDecl <$> imports),
-  if L.null decls then Nothing else Just $ doubleNewlineSep (writeTopLevelDecl <$> decls)]
-
-writePackageClause :: Go.PackageClause -> Ast.Expr
-writePackageClause (Go.PackageClause ident) = spaceSep [cst "package", writeIdentifier ident]
-
-writeImportDecl :: Go.ImportDecl -> Ast.Expr
-writeImportDecl (Go.ImportDecl specs) = case specs of
-  [spec] -> spaceSep [cst "import", writeImportSpec spec]
-  _ -> spaceSep [cst "import", parenList True (writeImportSpec <$> specs)]
-
-writeImportSpec :: Go.ImportSpec -> Ast.Expr
-writeImportSpec (Go.ImportSpec malias path) = case malias of
-  Nothing -> writeImportPath path
-  Just alias -> spaceSep [writeImportAlias alias, writeImportPath path]
-
-writeImportAlias :: Go.ImportAlias -> Ast.Expr
-writeImportAlias alias = case alias of
-  Go.ImportAliasDot -> cst "."
-  Go.ImportAliasName ident -> writeIdentifier ident
-
-writeImportPath :: Go.ImportPath -> Ast.Expr
-writeImportPath (Go.ImportPath lit) = writeStringLit lit
-
--- ============================================================================
--- Declarations
--- ============================================================================
-
-writeTopLevelDecl :: Go.TopLevelDecl -> Ast.Expr
-writeTopLevelDecl decl = case decl of
-  Go.TopLevelDeclDeclaration d -> writeDeclaration d
-  Go.TopLevelDeclFunction f -> writeFunctionDecl f
-  Go.TopLevelDeclMethod m -> writeMethodDecl m
-
-writeDeclaration :: Go.Declaration -> Ast.Expr
-writeDeclaration decl = case decl of
-  Go.DeclarationConst c -> writeConstDecl c
-  Go.DeclarationType t -> writeTypeDecl t
-  Go.DeclarationVar v -> writeVarDecl v
-
-writeConstDecl :: Go.ConstDecl -> Ast.Expr
-writeConstDecl (Go.ConstDecl specs) = case specs of
-  [spec] -> spaceSep [cst "const", writeConstSpec spec]
-  _ -> spaceSep [cst "const", parenList True (writeConstSpec <$> specs)]
-
-writeConstSpec :: Go.ConstSpec -> Ast.Expr
-writeConstSpec (Go.ConstSpec names mtyp values) = spaceSep $ Y.catMaybes [
-  Just $ commaSep inlineStyle (writeIdentifier <$> names),
-  writeType <$> mtyp,
-  if L.null values then Nothing else Just $ spaceSep [cst "=", commaSep inlineStyle (writeExpression <$> values)]]
-
-writeVarDecl :: Go.VarDecl -> Ast.Expr
-writeVarDecl (Go.VarDecl specs) = case specs of
-  [spec] -> spaceSep [cst "var", writeVarSpec spec]
-  _ -> spaceSep [cst "var", parenList True (writeVarSpec <$> specs)]
-
-writeVarSpec :: Go.VarSpec -> Ast.Expr
-writeVarSpec (Go.VarSpec names mtyp values) = spaceSep $ Y.catMaybes [
-  Just $ commaSep inlineStyle (writeIdentifier <$> names),
-  writeType <$> mtyp,
-  if L.null values then Nothing else Just $ spaceSep [cst "=", commaSep inlineStyle (writeExpression <$> values)]]
-
-writeShortVarDecl :: Go.ShortVarDecl -> Ast.Expr
-writeShortVarDecl (Go.ShortVarDecl names values) = spaceSep [
-  commaSep inlineStyle (writeIdentifier <$> names),
-  cst ":=",
-  commaSep inlineStyle (writeExpression <$> values)]
-
-writeTypeDecl :: Go.TypeDecl -> Ast.Expr
-writeTypeDecl (Go.TypeDecl specs) = case specs of
-  [spec] -> spaceSep [cst "type", writeTypeSpec spec]
-  _ -> spaceSep [cst "type", parenList True (writeTypeSpec <$> specs)]
-
-writeTypeSpec :: Go.TypeSpec -> Ast.Expr
-writeTypeSpec spec = case spec of
-  Go.TypeSpecAlias a -> writeAliasDecl a
-  Go.TypeSpecDefinition d -> writeTypeDef d
-
-writeAliasDecl :: Go.AliasDecl -> Ast.Expr
-writeAliasDecl (Go.AliasDecl name typ) = spaceSep [writeIdentifier name, cst "=", writeType typ]
-
-writeTypeDef :: Go.TypeDef -> Ast.Expr
-writeTypeDef (Go.TypeDef name mtparams typ) = spaceSep $ Y.catMaybes [
-  Just $ writeIdentifier name,
-  writeTypeParameters <$> mtparams,
-  Just $ writeType typ]
-
-writeTypeParameters :: Go.TypeParameters -> Ast.Expr
-writeTypeParameters (Go.TypeParameters decls) = brackets squareBrackets inlineStyle $
-  commaSep inlineStyle (writeTypeParamDecl <$> decls)
-
-writeTypeParamDecl :: Go.TypeParamDecl -> Ast.Expr
-writeTypeParamDecl (Go.TypeParamDecl names constraint) = spaceSep [
-  commaSep inlineStyle (writeIdentifier <$> names),
-  writeTypeConstraint constraint]
-
-writeTypeConstraint :: Go.TypeConstraint -> Ast.Expr
-writeTypeConstraint (Go.TypeConstraint elem) = writeTypeElem elem
-
-writeFunctionDecl :: Go.FunctionDecl -> Ast.Expr
-writeFunctionDecl (Go.FunctionDecl name mtparams sig mbody) = spaceSep $ Y.catMaybes [
-  Just $ cst "func",
-  Just $ noSep $ Y.catMaybes [
-    Just $ writeIdentifier name,
-    writeTypeParameters <$> mtparams],
-  Just $ writeSignature sig,
-  writeFunctionBody <$> mbody]
-
-writeFunctionBody :: Go.FunctionBody -> Ast.Expr
-writeFunctionBody (Go.FunctionBody block) = writeBlock block
-
-writeMethodDecl :: Go.MethodDecl -> Ast.Expr
-writeMethodDecl (Go.MethodDecl recv name sig mbody) = spaceSep $ Y.catMaybes [
-  Just $ cst "func",
-  Just $ writeReceiver recv,
-  Just $ noSep [writeIdentifier name, writeSignature sig],
-  writeFunctionBody <$> mbody]
-
-writeReceiver :: Go.Receiver -> Ast.Expr
-writeReceiver (Go.Receiver mname typ) = parenList False $ case mname of
-  Nothing -> [writeType typ]
-  Just name -> [spaceSep [writeIdentifier name, writeType typ]]
-
--- ============================================================================
--- Types
--- ============================================================================
-
-writeType :: Go.Type -> Ast.Expr
-writeType typ = case typ of
-  Go.TypeName_ tn -> writeTypeName tn
-  Go.TypeLiteral lit -> writeTypeLit lit
-  Go.TypeParen t -> parens (writeType t)
-
-writeTypeName :: Go.TypeName -> Ast.Expr
-writeTypeName (Go.TypeName qid targs) = noSep $ Y.catMaybes [
-  Just $ writeQualifiedIdent qid,
-  if L.null targs then Nothing else Just $ brackets squareBrackets inlineStyle $
-    commaSep inlineStyle (writeType <$> targs)]
-
-writeQualifiedIdent :: Go.QualifiedIdent -> Ast.Expr
-writeQualifiedIdent (Go.QualifiedIdent mpkg name) = case mpkg of
-  Nothing -> writeIdentifier name
-  Just pkg -> dotSep [writeIdentifier pkg, writeIdentifier name]
-
-writeTypeLit :: Go.TypeLit -> Ast.Expr
-writeTypeLit lit = case lit of
-  Go.TypeLitArray a -> writeArrayType a
-  Go.TypeLitStruct s -> writeStructType s
-  Go.TypeLitPointer p -> writePointerType p
-  Go.TypeLitFunction f -> writeFunctionType f
-  Go.TypeLitInterface i -> writeInterfaceType i
-  Go.TypeLitSlice s -> writeSliceType s
-  Go.TypeLitMap m -> writeMapType m
-  Go.TypeLitChannel c -> writeChannelType c
-
-writeArrayType :: Go.ArrayType -> Ast.Expr
-writeArrayType (Go.ArrayType len elem) = noSep [
-  brackets squareBrackets inlineStyle (writeExpression len),
-  writeType elem]
-
-writeSliceType :: Go.SliceType -> Ast.Expr
-writeSliceType (Go.SliceType elem) = noSep [cst "[]", writeType elem]
-
-writeStructType :: Go.StructType -> Ast.Expr
-writeStructType (Go.StructType fields) = if L.null fields
-  then cst "struct{}"
-  else spaceSep [cst "struct", curlyBlock fullBlockStyle $ newlineSep (writeFieldDecl <$> fields)]
-
-writeFieldDecl :: Go.FieldDecl -> Ast.Expr
-writeFieldDecl field = case field of
-  Go.FieldDeclNamed nf -> writeNamedField nf
-  Go.FieldDeclEmbedded ef -> writeEmbeddedField ef
-
-writeNamedField :: Go.NamedField -> Ast.Expr
-writeNamedField (Go.NamedField names typ mtag) = spaceSep $ Y.catMaybes [
-  Just $ commaSep inlineStyle (writeIdentifier <$> names),
-  Just $ writeType typ,
-  writeTag <$> mtag]
-
-writeEmbeddedField :: Go.EmbeddedField -> Ast.Expr
-writeEmbeddedField (Go.EmbeddedField isPtr typName mtag) = spaceSep $ Y.catMaybes [
-  Just $ noSep $ Y.catMaybes [
-    if isPtr then Just (cst "*") else Nothing,
-    Just $ writeTypeName typName],
-  writeTag <$> mtag]
-
-writeTag :: Go.Tag -> Ast.Expr
-writeTag (Go.Tag lit) = writeStringLit lit
-
-writePointerType :: Go.PointerType -> Ast.Expr
-writePointerType (Go.PointerType typ) = noSep [cst "*", writeType typ]
-
-writeFunctionType :: Go.FunctionType -> Ast.Expr
-writeFunctionType (Go.FunctionType sig) = noSep [cst "func", writeSignature sig]
-
-writeSignature :: Go.Signature -> Ast.Expr
-writeSignature (Go.Signature params mresult) = noSep $ Y.catMaybes [
-  Just $ writeParameters params,
-  writeResult <$> mresult]
-
-writeResult :: Go.Result -> Ast.Expr
-writeResult result = case result of
-  Go.ResultParameters p -> spaceSep [cst "", writeParameters p]
-  Go.ResultType t -> spaceSep [cst "", writeType t]
-
-writeParameters :: Go.Parameters -> Ast.Expr
-writeParameters (Go.Parameters decls) = parenList False (writeParameterDecl <$> decls)
-
-writeParameterDecl :: Go.ParameterDecl -> Ast.Expr
-writeParameterDecl (Go.ParameterDecl names variadic typ) = spaceSep $ Y.catMaybes [
-  if L.null names then Nothing else Just $ commaSep inlineStyle (writeIdentifier <$> names),
-  Just $ noSep $ Y.catMaybes [
-    if variadic then Just (cst "...") else Nothing,
-    Just $ writeType typ]]
-
-writeInterfaceType :: Go.InterfaceType -> Ast.Expr
-writeInterfaceType (Go.InterfaceType elems) = if L.null elems
-  then cst "interface{}"
-  else spaceSep [cst "interface", curlyBlock fullBlockStyle $ newlineSep (writeInterfaceElem <$> elems)]
-
-writeInterfaceElem :: Go.InterfaceElem -> Ast.Expr
-writeInterfaceElem elem = case elem of
-  Go.InterfaceElemMethod m -> writeMethodElem m
-  Go.InterfaceElemType t -> writeTypeElem t
-
-writeMethodElem :: Go.MethodElem -> Ast.Expr
-writeMethodElem (Go.MethodElem name sig) = noSep [writeIdentifier name, writeSignature sig]
-
-writeTypeElem :: Go.TypeElem -> Ast.Expr
-writeTypeElem (Go.TypeElem terms) = sep (orOp False) (writeTypeTerm <$> terms)
-
-writeTypeTerm :: Go.TypeTerm -> Ast.Expr
-writeTypeTerm (Go.TypeTerm underlying typ) = noSep $ Y.catMaybes [
-  if underlying then Just (cst "~") else Nothing,
-  Just $ writeType typ]
-
-writeMapType :: Go.MapType -> Ast.Expr
-writeMapType (Go.MapType key val) = noSep [
-  cst "map",
-  brackets squareBrackets inlineStyle (writeType key),
-  writeType val]
-
-writeChannelType :: Go.ChannelType -> Ast.Expr
-writeChannelType (Go.ChannelType dir elem) = spaceSep [writeChannelDirection dir, writeType elem]
-
-writeChannelDirection :: Go.ChannelDirection -> Ast.Expr
-writeChannelDirection dir = case dir of
-  Go.ChannelDirectionBidirectional -> cst "chan"
-  Go.ChannelDirectionSend -> cst "chan<-"
-  Go.ChannelDirectionReceive -> cst "<-chan"
-
--- ============================================================================
--- Expressions
--- ============================================================================
-
-writeExpression :: Go.Expression -> Ast.Expr
-writeExpression expr = case expr of
-  Go.ExpressionUnary u -> writeUnaryExpr u
-  Go.ExpressionBinary b -> writeBinaryExpr b
-
-writeUnaryExpr :: Go.UnaryExpr -> Ast.Expr
-writeUnaryExpr expr = case expr of
-  Go.UnaryExprPrimary p -> writePrimaryExpr p
-  Go.UnaryExprOp op -> writeUnaryOperation op
-
-writeUnaryOperation :: Go.UnaryOperation -> Ast.Expr
-writeUnaryOperation (Go.UnaryOperation op operand) = noSep [writeUnaryOp op, writeUnaryExpr operand]
-
-writeBinaryExpr :: Go.BinaryExpr -> Ast.Expr
-writeBinaryExpr (Go.BinaryExpr left op right) = spaceSep [
-  writeExpression left,
-  writeBinaryOp op,
-  writeExpression right]
-
-writeBinaryOp :: Go.BinaryOp -> Ast.Expr
-writeBinaryOp op = cst $ case op of
-  Go.BinaryOpOr -> "||"
-  Go.BinaryOpAnd -> "&&"
-  Go.BinaryOpEqual -> "=="
-  Go.BinaryOpNotEqual -> "!="
-  Go.BinaryOpLess -> "<"
-  Go.BinaryOpLessEqual -> "<="
-  Go.BinaryOpGreater -> ">"
-  Go.BinaryOpGreaterEqual -> ">="
-  Go.BinaryOpAdd -> "+"
-  Go.BinaryOpSubtract -> "-"
-  Go.BinaryOpBitwiseOr -> "|"
-  Go.BinaryOpBitwiseXor -> "^"
-  Go.BinaryOpMultiply -> "*"
-  Go.BinaryOpDivide -> "/"
-  Go.BinaryOpRemainder -> "%"
-  Go.BinaryOpLeftShift -> "<<"
-  Go.BinaryOpRightShift -> ">>"
-  Go.BinaryOpBitwiseAnd -> "&"
-  Go.BinaryOpBitClear -> "&^"
-
-writePrimaryExpr :: Go.PrimaryExpr -> Ast.Expr
-writePrimaryExpr expr = case expr of
-  Go.PrimaryExprOperand o -> writeOperand o
-  Go.PrimaryExprConversion c -> writeConversion c
-  Go.PrimaryExprMethodExpr m -> writeMethodExpr m
-  Go.PrimaryExprSelector s -> writeSelectorExpr s
-  Go.PrimaryExprIndex i -> writeIndexExpr i
-  Go.PrimaryExprSlice s -> writeSliceExpr s
-  Go.PrimaryExprTypeAssertion t -> writeTypeAssertionExpr t
-  Go.PrimaryExprCall c -> writeCallExpr c
-
-writeSelectorExpr :: Go.SelectorExpr -> Ast.Expr
-writeSelectorExpr (Go.SelectorExpr expr sel) = dotSep [writePrimaryExpr expr, writeIdentifier sel]
-
-writeIndexExpr :: Go.IndexExpr -> Ast.Expr
-writeIndexExpr (Go.IndexExpr expr idx) = noSep [
-  writePrimaryExpr expr,
-  brackets squareBrackets inlineStyle (writeExpression idx)]
-
-writeSliceExpr :: Go.SliceExpr -> Ast.Expr
-writeSliceExpr (Go.SliceExpr expr slice) = noSep [writePrimaryExpr expr, writeSlice slice]
-
-writeTypeAssertionExpr :: Go.TypeAssertionExpr -> Ast.Expr
-writeTypeAssertionExpr (Go.TypeAssertionExpr expr typ) = noSep [
-  writePrimaryExpr expr,
-  cst ".",
-  parenList False [writeType typ]]
-
-writeCallExpr :: Go.CallExpr -> Ast.Expr
-writeCallExpr (Go.CallExpr func args) = noSep [writePrimaryExpr func, writeArguments args]
-
-writeOperand :: Go.Operand -> Ast.Expr
-writeOperand op = case op of
-  Go.OperandLiteral l -> writeLiteral l
-  Go.OperandName_ n -> writeOperandName n
-  Go.OperandParen e -> parens (writeExpression e)
-
-writeOperandName :: Go.OperandName -> Ast.Expr
-writeOperandName (Go.OperandName qid targs) = noSep $ Y.catMaybes [
-  Just $ writeQualifiedIdent qid,
-  if L.null targs then Nothing else Just $ brackets squareBrackets inlineStyle $
-    commaSep inlineStyle (writeType <$> targs)]
-
-writeLiteral :: Go.Literal -> Ast.Expr
-writeLiteral lit = case lit of
-  Go.LiteralBasic b -> writeBasicLit b
-  Go.LiteralComposite c -> writeCompositeLit c
-  Go.LiteralFunction f -> writeFunctionLit f
-
-writeBasicLit :: Go.BasicLit -> Ast.Expr
-writeBasicLit lit = case lit of
-  Go.BasicLitInt i -> writeIntLit i
-  Go.BasicLitFloat f -> writeFloatLit f
-  Go.BasicLitImaginary i -> writeImaginaryLit i
-  Go.BasicLitRune r -> writeRuneLit r
-  Go.BasicLitString s -> writeStringLit s
-
-writeCompositeLit :: Go.CompositeLit -> Ast.Expr
-writeCompositeLit (Go.CompositeLit typ val) = noSep [writeLiteralType typ, writeLiteralValue val]
-
-writeLiteralType :: Go.LiteralType -> Ast.Expr
-writeLiteralType typ = case typ of
-  Go.LiteralTypeStruct s -> writeStructType s
-  Go.LiteralTypeArray a -> writeArrayType a
-  Go.LiteralTypeInferredArray t -> noSep [cst "[...]", writeType t]
-  Go.LiteralTypeSlice s -> writeSliceType s
-  Go.LiteralTypeMap m -> writeMapType m
-  Go.LiteralTypeName n -> writeTypeName n
-
-writeLiteralValue :: Go.LiteralValue -> Ast.Expr
-writeLiteralValue (Go.LiteralValue elems) = if L.null elems
-  then cst "{}"
-  else curlyBracesList Nothing inlineStyle (writeKeyedElement <$> elems)
-
-writeKeyedElement :: Go.KeyedElement -> Ast.Expr
-writeKeyedElement (Go.KeyedElement mkey elem) = case mkey of
-  Nothing -> writeElement elem
-  Just key -> spaceSep [noSep [writeKey key, cst ":"], writeElement elem]
-
-writeKey :: Go.Key -> Ast.Expr
-writeKey key = case key of
-  Go.KeyField ident -> writeIdentifier ident
-  Go.KeyExpression e -> writeExpression e
-  Go.KeyLiteral lv -> writeLiteralValue lv
-
-writeElement :: Go.Element -> Ast.Expr
-writeElement elem = case elem of
-  Go.ElementExpression e -> writeExpression e
-  Go.ElementLiteral lv -> writeLiteralValue lv
-
-writeFunctionLit :: Go.FunctionLit -> Ast.Expr
-writeFunctionLit (Go.FunctionLit sig body) = spaceSep [
-  cst "func",
-  writeSignature sig,
-  writeFunctionBody body]
-
-writeSelector :: Go.Selector -> Ast.Expr
-writeSelector (Go.Selector ident) = noSep [cst ".", writeIdentifier ident]
-
-writeIndex :: Go.Index -> Ast.Expr
-writeIndex (Go.Index exprs) = brackets squareBrackets inlineStyle $ commaSep inlineStyle (writeExpression <$> exprs)
-
-writeSlice :: Go.Slice -> Ast.Expr
-writeSlice slice = case slice of
-  Go.SliceSimple s -> writeSimpleSlice s
-  Go.SliceFull f -> writeFullSlice f
-
-writeSimpleSlice :: Go.SimpleSlice -> Ast.Expr
-writeSimpleSlice (Go.SimpleSlice mlo mhi) = brackets squareBrackets inlineStyle $ noSep [
-  Y.maybe (cst "") writeExpression mlo,
-  cst ":",
-  Y.maybe (cst "") writeExpression mhi]
-
-writeFullSlice :: Go.FullSlice -> Ast.Expr
-writeFullSlice (Go.FullSlice mlo hi maxv) = brackets squareBrackets inlineStyle $ noSep [
-  Y.maybe (cst "") writeExpression mlo,
-  cst ":",
-  writeExpression hi,
-  cst ":",
-  writeExpression maxv]
-
-writeTypeAssertion :: Go.TypeAssertion -> Ast.Expr
-writeTypeAssertion (Go.TypeAssertion typ) = noSep [cst ".", parenList False [writeType typ]]
-
-writeArguments :: Go.Arguments -> Ast.Expr
-writeArguments (Go.Arguments mtypeArg exprs ellipsis) = parenList False $ Y.catMaybes $
-  [writeType <$> mtypeArg] ++ (fmap Just (writeExpression <$> exprs)) ++ [if ellipsis then Just (cst "...") else Nothing]
-
-writeMethodExpr :: Go.MethodExpr -> Ast.Expr
-writeMethodExpr (Go.MethodExpr recv method) = dotSep [writeType recv, writeIdentifier method]
-
-writeConversion :: Go.Conversion -> Ast.Expr
-writeConversion (Go.Conversion typ expr) = noSep [writeType typ, parenList False [writeExpression expr]]
-
--- ============================================================================
--- Statements
--- ============================================================================
-
-writeStatement :: Go.Statement -> Ast.Expr
-writeStatement stmt = case stmt of
-  Go.StatementDeclaration d -> writeDeclaration d
-  Go.StatementLabeled l -> writeLabeledStmt l
-  Go.StatementSimple s -> writeSimpleStmt s
-  Go.StatementGo g -> writeGoStmt g
-  Go.StatementReturn r -> writeReturnStmt r
-  Go.StatementBreak b -> writeBreakStmt b
-  Go.StatementContinue c -> writeContinueStmt c
-  Go.StatementGoto g -> writeGotoStmt g
-  Go.StatementFallthrough f -> writeFallthroughStmt f
-  Go.StatementBlock b -> writeBlock b
-  Go.StatementIf i -> writeIfStmt i
-  Go.StatementSwitch s -> writeSwitchStmt s
-  Go.StatementSelect s -> writeSelectStmt s
-  Go.StatementFor f -> writeForStmt f
-  Go.StatementDefer d -> writeDeferStmt d
-
-writeSimpleStmt :: Go.SimpleStmt -> Ast.Expr
-writeSimpleStmt stmt = case stmt of
-  Go.SimpleStmtEmpty e -> writeEmptyStmt e
-  Go.SimpleStmtExpression e -> writeExpressionStmt e
-  Go.SimpleStmtSend s -> writeSendStmt s
-  Go.SimpleStmtIncDec i -> writeIncDecStmt i
-  Go.SimpleStmtAssignment a -> writeAssignment a
-  Go.SimpleStmtShortVarDecl s -> writeShortVarDecl s
-
-writeEmptyStmt :: Go.EmptyStmt -> Ast.Expr
-writeEmptyStmt (Go.EmptyStmt ()) = cst ""
-
-writeLabeledStmt :: Go.LabeledStmt -> Ast.Expr
-writeLabeledStmt (Go.LabeledStmt label stmt) = newlineSep [
-  noSep [writeIdentifier label, cst ":"],
-  writeStatement stmt]
-
-writeExpressionStmt :: Go.ExpressionStmt -> Ast.Expr
-writeExpressionStmt (Go.ExpressionStmt expr) = writeExpression expr
-
-writeSendStmt :: Go.SendStmt -> Ast.Expr
-writeSendStmt (Go.SendStmt ch val) = spaceSep [writeExpression ch, cst "<-", writeExpression val]
-
-writeIncDecStmt :: Go.IncDecStmt -> Ast.Expr
-writeIncDecStmt (Go.IncDecStmt expr isInc) = noSep [
-  writeExpression expr,
-  cst $ if isInc then "++" else "--"]
-
-writeAssignment :: Go.Assignment -> Ast.Expr
-writeAssignment (Go.Assignment lhs op rhs) = spaceSep [
-  commaSep inlineStyle (writeExpression <$> lhs),
-  writeAssignOp op,
-  commaSep inlineStyle (writeExpression <$> rhs)]
-
-writeAssignOp :: Go.AssignOp -> Ast.Expr
-writeAssignOp op = case op of
-  Go.AssignOpSimple -> cst "="
-  Go.AssignOpAdd addOp -> noSep [writeAddOp addOp, cst "="]
-  Go.AssignOpMul mulOp -> noSep [writeMulOp mulOp, cst "="]
-
-writeIfStmt :: Go.IfStmt -> Ast.Expr
-writeIfStmt (Go.IfStmt minit cond thenBlock melseClause) = spaceSep $ Y.catMaybes [
-  Just $ cst "if",
-  (\s -> noSep [writeSimpleStmt s, cst ";"]) <$> minit,
-  Just $ writeExpression cond,
-  Just $ writeBlock thenBlock,
-  writeElseClause <$> melseClause]
-
-writeElseClause :: Go.ElseClause -> Ast.Expr
-writeElseClause clause = case clause of
-  Go.ElseClauseIf ifStmt -> spaceSep [cst "else", writeIfStmt ifStmt]
-  Go.ElseClauseBlock block -> spaceSep [cst "else", writeBlock block]
-
-writeSwitchStmt :: Go.SwitchStmt -> Ast.Expr
-writeSwitchStmt stmt = case stmt of
-  Go.SwitchStmtExpression e -> writeExprSwitchStmt e
-  Go.SwitchStmtType t -> writeTypeSwitchStmt t
-
-writeExprSwitchStmt :: Go.ExprSwitchStmt -> Ast.Expr
-writeExprSwitchStmt (Go.ExprSwitchStmt minit mexpr cases) = spaceSep $ Y.catMaybes [
-  Just $ cst "switch",
-  (\s -> noSep [writeSimpleStmt s, cst ";"]) <$> minit,
-  writeExpression <$> mexpr,
-  Just $ curlyBlock fullBlockStyle $ newlineSep (writeExprCaseClause <$> cases)]
-
-writeExprCaseClause :: Go.ExprCaseClause -> Ast.Expr
-writeExprCaseClause (Go.ExprCaseClause mexprs stmts) = newlineSep [
-  case mexprs of
-    Nothing -> cst "default:"
-    Just exprs -> noSep [cst "case ", commaSep inlineStyle (writeExpression <$> exprs), cst ":"],
-  indentBlock (writeStatement <$> stmts)]
-
-writeTypeSwitchStmt :: Go.TypeSwitchStmt -> Ast.Expr
-writeTypeSwitchStmt (Go.TypeSwitchStmt minit guard cases) = spaceSep $ Y.catMaybes [
-  Just $ cst "switch",
-  (\s -> noSep [writeSimpleStmt s, cst ";"]) <$> minit,
-  Just $ writeTypeSwitchGuard guard,
-  Just $ curlyBlock fullBlockStyle $ newlineSep (writeTypeCaseClause <$> cases)]
-
-writeTypeSwitchGuard :: Go.TypeSwitchGuard -> Ast.Expr
-writeTypeSwitchGuard (Go.TypeSwitchGuard mname expr) = case mname of
-  Nothing -> noSep [writePrimaryExpr expr, cst ".(type)"]
-  Just name -> spaceSep [writeIdentifier name, cst ":=", noSep [writePrimaryExpr expr, cst ".(type)"]]
-
-writeTypeCaseClause :: Go.TypeCaseClause -> Ast.Expr
-writeTypeCaseClause (Go.TypeCaseClause mtypes stmts) = newlineSep [
-  case mtypes of
-    Nothing -> cst "default:"
-    Just types -> noSep [cst "case ", commaSep inlineStyle (writeType <$> types), cst ":"],
-  indentBlock (writeStatement <$> stmts)]
-
-writeForStmt :: Go.ForStmt -> Ast.Expr
-writeForStmt (Go.ForStmt mclause body) = spaceSep $ Y.catMaybes [
-  Just $ cst "for",
-  writeForClauseOrRange <$> mclause,
-  Just $ writeBlock body]
-
-writeForClauseOrRange :: Go.ForClauseOrRange -> Ast.Expr
-writeForClauseOrRange clause = case clause of
-  Go.ForClauseOrRangeCondition e -> writeExpression e
-  Go.ForClauseOrRangeClause c -> writeForClause c
-  Go.ForClauseOrRangeRange r -> writeRangeClause r
-
-writeForClause :: Go.ForClause -> Ast.Expr
-writeForClause (Go.ForClause minit mcond mpost) = noSep [
-  Y.maybe (cst "") writeSimpleStmt minit,
-  cst ";",
-  Y.maybe (cst "") (\e -> spaceSep [cst "", writeExpression e]) mcond,
-  cst ";",
-  Y.maybe (cst "") (\s -> spaceSep [cst "", writeSimpleStmt s]) mpost]
-
-writeRangeClause :: Go.RangeClause -> Ast.Expr
-writeRangeClause (Go.RangeClause mvars expr) = spaceSep $ Y.catMaybes [
-  writeRangeVars <$> mvars,
-  Just $ cst "range",
-  Just $ writeExpression expr]
-
-writeRangeVars :: Go.RangeVars -> Ast.Expr
-writeRangeVars vars = case vars of
-  Go.RangeVarsAssign exprs -> spaceSep [commaSep inlineStyle (writeExpression <$> exprs), cst "="]
-  Go.RangeVarsDeclare idents -> spaceSep [commaSep inlineStyle (writeIdentifier <$> idents), cst ":="]
-
-writeGoStmt :: Go.GoStmt -> Ast.Expr
-writeGoStmt (Go.GoStmt expr) = spaceSep [cst "go", writeExpression expr]
-
-writeSelectStmt :: Go.SelectStmt -> Ast.Expr
-writeSelectStmt (Go.SelectStmt clauses) = spaceSep [
-  cst "select",
-  curlyBlock fullBlockStyle $ newlineSep (writeCommClause <$> clauses)]
-
-writeCommClause :: Go.CommClause -> Ast.Expr
-writeCommClause (Go.CommClause commCase stmts) = newlineSep [
-  writeCommCase commCase,
-  indentBlock (writeStatement <$> stmts)]
-
-writeCommCase :: Go.CommCase -> Ast.Expr
-writeCommCase commCase = case commCase of
-  Go.CommCaseSend s -> noSep [cst "case ", writeSendStmt s, cst ":"]
-  Go.CommCaseReceive r -> noSep [cst "case ", writeReceiveCase r, cst ":"]
-  Go.CommCaseDefault -> cst "default:"
-
-writeReceiveCase :: Go.ReceiveCase -> Ast.Expr
-writeReceiveCase (Go.ReceiveCase mvars expr) = spaceSep $ Y.catMaybes [
-  writeRangeVars <$> mvars,
-  Just $ noSep [cst "<-", writeExpression expr]]
-
-writeReturnStmt :: Go.ReturnStmt -> Ast.Expr
-writeReturnStmt (Go.ReturnStmt exprs) = if L.null exprs
-  then cst "return"
-  else spaceSep [cst "return", commaSep inlineStyle (writeExpression <$> exprs)]
-
-writeBreakStmt :: Go.BreakStmt -> Ast.Expr
-writeBreakStmt (Go.BreakStmt mlabel) = case mlabel of
-  Nothing -> cst "break"
-  Just label -> spaceSep [cst "break", writeIdentifier label]
-
-writeContinueStmt :: Go.ContinueStmt -> Ast.Expr
-writeContinueStmt (Go.ContinueStmt mlabel) = case mlabel of
-  Nothing -> cst "continue"
-  Just label -> spaceSep [cst "continue", writeIdentifier label]
-
-writeGotoStmt :: Go.GotoStmt -> Ast.Expr
-writeGotoStmt (Go.GotoStmt label) = spaceSep [cst "goto", writeIdentifier label]
-
-writeFallthroughStmt :: Go.FallthroughStmt -> Ast.Expr
-writeFallthroughStmt (Go.FallthroughStmt ()) = cst "fallthrough"
-
-writeDeferStmt :: Go.DeferStmt -> Ast.Expr
-writeDeferStmt (Go.DeferStmt expr) = spaceSep [cst "defer", writeExpression expr]
-
-writeBlock :: Go.Block -> Ast.Expr
-writeBlock (Go.Block stmts) = curlyBlock fullBlockStyle $ newlineSep (writeStatement <$> stmts)
-
--- ============================================================================
--- Operators
--- ============================================================================
-
-writeUnaryOp :: Go.UnaryOp -> Ast.Expr
-writeUnaryOp op = cst $ case op of
-  Go.UnaryOpPlus -> "+"
-  Go.UnaryOpMinus -> "-"
-  Go.UnaryOpNot -> "!"
-  Go.UnaryOpXor -> "^"
-  Go.UnaryOpDeref -> "*"
-  Go.UnaryOpAddressOf -> "&"
-  Go.UnaryOpReceive -> "<-"
-
-writeMulOp :: Go.MulOp -> Ast.Expr
-writeMulOp op = cst $ case op of
-  Go.MulOpMultiply -> "*"
-  Go.MulOpDivide -> "/"
-  Go.MulOpRemainder -> "%"
-  Go.MulOpLeftShift -> "<<"
-  Go.MulOpRightShift -> ">>"
-  Go.MulOpBitwiseAnd -> "&"
-  Go.MulOpBitClear -> "&^"
-
-writeAddOp :: Go.AddOp -> Ast.Expr
-writeAddOp op = cst $ case op of
-  Go.AddOpAdd -> "+"
-  Go.AddOpSubtract -> "-"
-  Go.AddOpBitwiseOr -> "|"
-  Go.AddOpBitwiseXor -> "^"
-
-writeRelOp :: Go.RelOp -> Ast.Expr
-writeRelOp op = cst $ case op of
-  Go.RelOpEqual -> "=="
-  Go.RelOpNotEqual -> "!="
-  Go.RelOpLess -> "<"
-  Go.RelOpLessEqual -> "<="
-  Go.RelOpGreater -> ">"
-  Go.RelOpGreaterEqual -> ">="
-
--- ============================================================================
--- Terminal Tokens
--- ============================================================================
-
-writeIdentifier :: Go.Identifier -> Ast.Expr
-writeIdentifier (Go.Identifier s) = cst s
-
-writeIntLit :: Go.IntLit -> Ast.Expr
-writeIntLit (Go.IntLit n) = cst $ show n
-
-writeFloatLit :: Go.FloatLit -> Ast.Expr
-writeFloatLit (Go.FloatLit d) = cst $ show d
-
-writeImaginaryLit :: Go.ImaginaryLit -> Ast.Expr
-writeImaginaryLit (Go.ImaginaryLit d) = cst $ show d ++ "i"
-
-writeRuneLit :: Go.RuneLit -> Ast.Expr
-writeRuneLit (Go.RuneLit c) = cst $ "'" ++ escapeRune (C.chr $ fromIntegral c) ++ "'"
-  where
-    escapeRune ch = case ch of
-      '\'' -> "\\'"
-      '\\' -> "\\\\"
-      '\n' -> "\\n"
-      '\r' -> "\\r"
-      '\t' -> "\\t"
-      _ -> if ord ch >= 32 && ord ch < 127
-           then [ch]
-           else if ord ch > 0xFFFF
-             then -- Supplementary plane: use UTF-16 surrogate pair
-               let n = ord ch - 0x10000
-                   hi = 0xD800 + (n `div` 0x400)
-                   lo = 0xDC00 + (n `mod` 0x400)
-                   padH x = let h = fmap C.toUpper $ showHex x "" in
-                            replicate (4 - L.length h) '0' ++ h
-               in "\\u" ++ padH hi ++ "\\u" ++ padH lo
-             else "\\u" ++ L.take (4 - L.length hex) "0000" ++ hex
-               where hex = showHex (ord ch) ""
-
-writeStringLit :: Go.StringLit -> Ast.Expr
-writeStringLit lit = case lit of
-  Go.StringLitRaw r -> writeRawStringLit r
-  Go.StringLitInterpreted i -> writeInterpretedStringLit i
-
-writeRawStringLit :: Go.RawStringLit -> Ast.Expr
-writeRawStringLit (Go.RawStringLit s) = cst $ "`" ++ s ++ "`"
-
-writeInterpretedStringLit :: Go.InterpretedStringLit -> Ast.Expr
-writeInterpretedStringLit (Go.InterpretedStringLit s) = cst $ "\"" ++ escapeGoString s ++ "\""
-  where
-    escapeGoString = concatMap escapeChar
-    escapeChar c = case c of
-      '"'  -> "\\\""
-      '\\' -> "\\\\"
-      '\n' -> "\\n"
-      '\r' -> "\\r"
-      '\t' -> "\\t"
-      _ | c < ' ' || c > '~' -> goUnicodeEscape (ord c)
-        | otherwise -> [c]
-    goUnicodeEscape n
-      | n > 0xFFFF = -- Supplementary plane: use UTF-16 surrogate pair
-          let n' = n - 0x10000
-              hi = 0xD800 + (n' `div` 0x400)
-              lo = 0xDC00 + (n' `mod` 0x400)
-          in "\\u" ++ padHex hi ++ "\\u" ++ padHex lo
-      | otherwise = "\\u" ++ padHex n
-    padHex n = replicate (4 - length hex) '0' ++ hex
-      where hex = fmap toUpper $ showHex n ""
-
--- ============================================================================
--- Hydra-specific constructs
--- ============================================================================
-
-writeAnnotatedDeclaration :: Go.AnnotatedDeclaration -> Ast.Expr
-writeAnnotatedDeclaration (Go.AnnotatedDeclaration comment decl) = newlineSep [
-  writeComment comment,
-  writeTopLevelDecl decl]
-
-writeComment :: String -> Ast.Expr
-writeComment s = if L.null (lines s)
-  then cst ""
-  else newlineSep (singleLineComment <$> lines s)
-
--- ============================================================================
--- Helpers
--- ============================================================================
-
-singleLineComment :: String -> Ast.Expr
-singleLineComment c = cst $ "// " ++ sanitizeGoComment c
-
-sanitizeGoComment :: String -> String
-sanitizeGoComment = id  -- Go comments don't need special escaping like HTML
diff --git a/src/main/haskell/Hydra/Sources/Go/Syntax.hs b/src/main/haskell/Hydra/Sources/Go/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Go/Syntax.hs
+++ /dev/null
@@ -1,1064 +0,0 @@
-module Hydra.Sources.Go.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel                    hiding (literalType)
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.go.syntax"
-
-define :: String -> Type -> Binding
-define = datatype ns
-
-go :: String -> Type
-go = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A Go syntax model, based on the Go Language Specification retrieved on 2025-02-05"
-      ++ " from https://go.dev/ref/spec")}
-  where
-    definitions = constructs ++ terminals ++ sourceFile ++ declarations ++ types
-      ++ expressions ++ statements ++ miscellaneous
-
-    -- These definitions are not based on the grammar, but are convenient for working with Go sources in Hydra.
-    constructs = [
-      annotatedDeclaration,
-      goModule]
-
-    -- Terminal tokens
-    terminals = [
-      identifier,
-      intLit,
-      floatLit,
-      imaginaryLit,
-      runeLit,
-      stringLit,
-      rawStringLit,
-      interpretedStringLit]
-
-    -- Source file structure
-    sourceFile = [
-      sourceFile_,
-      packageClause,
-      importDecl,
-      importSpec,
-      importAlias,
-      importPath]
-
-    -- Declarations
-    declarations = [
-      declaration,
-      topLevelDecl,
-      constDecl,
-      constSpec,
-      varDecl,
-      varSpec,
-      shortVarDecl,
-      typeDecl,
-      typeSpec,
-      aliasDecl,
-      typeDef,
-      typeParameters,
-      typeParamDecl,
-      typeConstraint,
-      functionDecl,
-      functionBody,
-      methodDecl,
-      receiver]
-
-    -- Types
-    types = [
-      type_,
-      typeName,
-      qualifiedIdent,
-      typeLit,
-      arrayType,
-      sliceType,
-      structType,
-      fieldDecl,
-      namedField,
-      embeddedField,
-      tag,
-      pointerType,
-      functionType,
-      signature,
-      result,
-      parameters,
-      parameterDecl,
-      interfaceType,
-      interfaceElem,
-      methodElem,
-      typeElem,
-      typeTerm,
-      mapType,
-      channelType,
-      channelDirection]
-
-    -- Expressions
-    expressions = [
-      expression,
-      unaryExpr,
-      unaryOperation,
-      binaryExpr,
-      binaryOp,
-      primaryExpr,
-      selectorExpr,
-      indexExpr,
-      sliceExpr,
-      typeAssertionExpr,
-      callExpr,
-      operand,
-      operandName,
-      literal,
-      basicLit,
-      compositeLit,
-      literalType,
-      literalValue,
-      elementList,
-      keyedElement,
-      key,
-      element,
-      functionLit,
-      selector,
-      index,
-      slice_,
-      simpleSlice,
-      fullSlice,
-      typeAssertion,
-      arguments,
-      methodExpr,
-      conversion]
-
-    -- Statements
-    statements = [
-      statement,
-      simpleStmt,
-      emptyStmt,
-      labeledStmt,
-      expressionStmt,
-      sendStmt,
-      incDecStmt,
-      assignment,
-      assignOp,
-      ifStmt,
-      elseClause,
-      switchStmt,
-      exprSwitchStmt,
-      exprCaseClause,
-      typeSwitchStmt,
-      typeSwitchGuard,
-      typeCaseClause,
-      forStmt,
-      forClauseOrRange,
-      forClause,
-      rangeClause,
-      rangeVars,
-      goStmt,
-      selectStmt,
-      commClause,
-      commCase,
-      receiveCase,
-      returnStmt,
-      breakStmt,
-      continueStmt,
-      gotoStmt,
-      fallthroughStmt,
-      deferStmt,
-      block]
-
-    -- Miscellaneous
-    miscellaneous = [
-      unaryOp,
-      mulOp,
-      addOp,
-      relOp]
-
--- ============================================================================
--- Constructs (Hydra-specific, not from grammar)
--- ============================================================================
-
-annotatedDeclaration :: Binding
-annotatedDeclaration = define "AnnotatedDeclaration" $ T.record [
-  "comment">: T.string,
-  "declaration">: go "TopLevelDecl"]
-
-goModule :: Binding
-goModule = define "Module" $ T.record [
-  "package">: go "PackageClause",
-  "imports">: T.list $ go "ImportDecl",
-  "declarations">: T.list $ go "TopLevelDecl"]
-
--- ============================================================================
--- Terminals
--- ============================================================================
-
--- identifier = letter { letter | unicode_digit } .
-identifier :: Binding
-identifier = define "Identifier" $ T.wrap T.string
-
--- int_lit        = decimal_lit | binary_lit | octal_lit | hex_lit .
--- decimal_lit    = "0" | ( "1" … "9" ) [ [ "_" ] decimal_digits ] .
--- binary_lit     = "0" ( "b" | "B" ) [ "_" ] binary_digits .
--- octal_lit      = "0" [ "o" | "O" ] [ "_" ] octal_digits .
--- hex_lit        = "0" ( "x" | "X" ) [ "_" ] hex_digits .
-intLit :: Binding
-intLit = define "IntLit" $ T.wrap T.bigint
-
--- float_lit         = decimal_float_lit | hex_float_lit .
--- decimal_float_lit = decimal_digits "." [ decimal_digits ] [ decimal_exponent ] |
---                     decimal_digits decimal_exponent |
---                     "." decimal_digits [ decimal_exponent ] .
--- hex_float_lit     = "0" ( "x" | "X" ) hex_mantissa hex_exponent .
-floatLit :: Binding
-floatLit = define "FloatLit" $ T.wrap T.float64
-
--- imaginary_lit = (decimal_digits | int_lit | float_lit) "i" .
-imaginaryLit :: Binding
-imaginaryLit = define "ImaginaryLit" $ T.wrap T.float64
-
--- rune_lit         = "'" ( unicode_value | byte_value ) "'" .
-runeLit :: Binding
-runeLit = define "RuneLit" $ T.wrap T.int32 -- rune is int32
-
--- string_lit             = raw_string_lit | interpreted_string_lit .
-stringLit :: Binding
-stringLit = define "StringLit" $ T.union [
-  "raw">: go "RawStringLit",
-  "interpreted">: go "InterpretedStringLit"]
-
--- raw_string_lit         = "`" { unicode_char | newline } "`" .
-rawStringLit :: Binding
-rawStringLit = define "RawStringLit" $ T.wrap T.string
-
--- interpreted_string_lit = `"` { unicode_value | byte_value } `"` .
-interpretedStringLit :: Binding
-interpretedStringLit = define "InterpretedStringLit" $ T.wrap T.string
-
--- ============================================================================
--- Source file structure
--- ============================================================================
-
--- SourceFile       = PackageClause ";" { ImportDecl ";" } { TopLevelDecl ";" } .
-sourceFile_ :: Binding
-sourceFile_ = define "SourceFile" $ T.record [
-  "package">: go "PackageClause",
-  "imports">: T.list $ go "ImportDecl",
-  "declarations">: T.list $ go "TopLevelDecl"]
-
--- PackageClause  = "package" PackageName .
--- PackageName    = identifier .
-packageClause :: Binding
-packageClause = define "PackageClause" $ T.wrap $ go "Identifier"
-
--- ImportDecl       = "import" ( ImportSpec | "(" { ImportSpec ";" } ")" ) .
-importDecl :: Binding
-importDecl = define "ImportDecl" $ T.wrap $ nonemptyList $ go "ImportSpec"
-
--- ImportSpec       = [ "." | PackageName ] ImportPath .
-importSpec :: Binding
-importSpec = define "ImportSpec" $ T.record [
-  "alias">: T.maybe $ go "ImportAlias",
-  "path">: go "ImportPath"]
-
--- Hydra: ImportAlias represents the optional alias in an import
--- Either "." for dot import, or an identifier for named alias
-importAlias :: Binding
-importAlias = define "ImportAlias" $ T.union [
-  "dot">: T.unit,
-  "name">: go "Identifier"]
-
--- ImportPath       = string_lit .
-importPath :: Binding
-importPath = define "ImportPath" $ T.wrap $ go "StringLit"
-
--- ============================================================================
--- Declarations
--- ============================================================================
-
--- Declaration   = ConstDecl | TypeDecl | VarDecl .
-declaration :: Binding
-declaration = define "Declaration" $ T.union [
-  "const">: go "ConstDecl",
-  "type">: go "TypeDecl",
-  "var">: go "VarDecl"]
-
--- TopLevelDecl  = Declaration | FunctionDecl | MethodDecl .
-topLevelDecl :: Binding
-topLevelDecl = define "TopLevelDecl" $ T.union [
-  "declaration">: go "Declaration",
-  "function">: go "FunctionDecl",
-  "method">: go "MethodDecl"]
-
--- ConstDecl      = "const" ( ConstSpec | "(" { ConstSpec ";" } ")" ) .
-constDecl :: Binding
-constDecl = define "ConstDecl" $ T.wrap $ nonemptyList $ go "ConstSpec"
-
--- ConstSpec      = IdentifierList [ [ Type ] "=" ExpressionList ] .
-constSpec :: Binding
-constSpec = define "ConstSpec" $ T.record [
-  "names">: nonemptyList $ go "Identifier",
-  "type">: T.maybe $ go "Type",
-  "values">: T.list $ go "Expression"]
-
--- VarDecl     = "var" ( VarSpec | "(" { VarSpec ";" } ")" ) .
-varDecl :: Binding
-varDecl = define "VarDecl" $ T.wrap $ nonemptyList $ go "VarSpec"
-
--- VarSpec     = IdentifierList ( Type [ "=" ExpressionList ] | "=" ExpressionList ) .
-varSpec :: Binding
-varSpec = define "VarSpec" $ T.record [
-  "names">: nonemptyList $ go "Identifier",
-  "type">: T.maybe $ go "Type",
-  "values">: T.list $ go "Expression"]
-
--- ShortVarDecl = IdentifierList ":=" ExpressionList .
-shortVarDecl :: Binding
-shortVarDecl = define "ShortVarDecl" $ T.record [
-  "names">: nonemptyList $ go "Identifier",
-  "values">: nonemptyList $ go "Expression"]
-
--- TypeDecl = "type" ( TypeSpec | "(" { TypeSpec ";" } ")" ) .
-typeDecl :: Binding
-typeDecl = define "TypeDecl" $ T.wrap $ nonemptyList $ go "TypeSpec"
-
--- TypeSpec = AliasDecl | TypeDef .
-typeSpec :: Binding
-typeSpec = define "TypeSpec" $ T.union [
-  "alias">: go "AliasDecl",
-  "definition">: go "TypeDef"]
-
--- AliasDecl = identifier "=" Type .
-aliasDecl :: Binding
-aliasDecl = define "AliasDecl" $ T.record [
-  "name">: go "Identifier",
-  "type">: go "Type"]
-
--- TypeDef = identifier [ TypeParameters ] Type .
-typeDef :: Binding
-typeDef = define "TypeDef" $ T.record [
-  "name">: go "Identifier",
-  "typeParams">: T.maybe $ go "TypeParameters",
-  "type">: go "Type"]
-
--- TypeParameters  = "[" TypeParamList [ "," ] "]" .
--- TypeParamList   = TypeParamDecl { "," TypeParamDecl } .
-typeParameters :: Binding
-typeParameters = define "TypeParameters" $ T.wrap $ nonemptyList $ go "TypeParamDecl"
-
--- TypeParamDecl = IdentifierList TypeConstraint .
-typeParamDecl :: Binding
-typeParamDecl = define "TypeParamDecl" $ T.record [
-  "names">: nonemptyList $ go "Identifier",
-  "constraint">: go "TypeConstraint"]
-
--- TypeConstraint = TypeElem .
-typeConstraint :: Binding
-typeConstraint = define "TypeConstraint" $ T.wrap $ go "TypeElem"
-
--- FunctionDecl = "func" FunctionName [ TypeParameters ] Signature [ FunctionBody ] .
--- FunctionName = identifier .
-functionDecl :: Binding
-functionDecl = define "FunctionDecl" $ T.record [
-  "name">: go "Identifier",
-  "typeParams">: T.maybe $ go "TypeParameters",
-  "signature">: go "Signature",
-  "body">: T.maybe $ go "FunctionBody"]
-
--- FunctionBody = Block .
-functionBody :: Binding
-functionBody = define "FunctionBody" $ T.wrap $ go "Block"
-
--- MethodDecl = "func" Receiver MethodName Signature [ FunctionBody ] .
--- MethodName = identifier .
-methodDecl :: Binding
-methodDecl = define "MethodDecl" $ T.record [
-  "receiver">: go "Receiver",
-  "name">: go "Identifier",
-  "signature">: go "Signature",
-  "body">: T.maybe $ go "FunctionBody"]
-
--- Receiver       = Parameters .
--- (Note: Go spec says the receiver must be a single non-variadic parameter)
-receiver :: Binding
-receiver = define "Receiver" $ T.record [
-  "name">: T.maybe $ go "Identifier",
-  "type">: go "Type"]
-
--- ============================================================================
--- Types
--- ============================================================================
-
--- Type      = TypeName [ TypeArgs ] | TypeLit | "(" Type ")" .
-type_ :: Binding
-type_ = define "Type" $ T.union [
-  "name">: go "TypeName",
-  "literal">: go "TypeLit",
-  "paren">: go "Type"]
-
--- TypeName  = identifier | QualifiedIdent .
-typeName :: Binding
-typeName = define "TypeName" $ T.record [
-  "name">: go "QualifiedIdent",
-  "typeArgs">: T.list $ go "Type"]
-
--- QualifiedIdent = PackageName "." identifier .
-qualifiedIdent :: Binding
-qualifiedIdent = define "QualifiedIdent" $ T.record [
-  "package">: T.maybe $ go "Identifier",
-  "name">: go "Identifier"]
-
--- TypeLit   = ArrayType | StructType | PointerType | FunctionType | InterfaceType |
---             SliceType | MapType | ChannelType .
-typeLit :: Binding
-typeLit = define "TypeLit" $ T.union [
-  "array">: go "ArrayType",
-  "struct">: go "StructType",
-  "pointer">: go "PointerType",
-  "function">: go "FunctionType",
-  "interface">: go "InterfaceType",
-  "slice">: go "SliceType",
-  "map">: go "MapType",
-  "channel">: go "ChannelType"]
-
--- ArrayType   = "[" ArrayLength "]" ElementType .
--- ArrayLength = Expression .
--- ElementType = Type .
-arrayType :: Binding
-arrayType = define "ArrayType" $ T.record [
-  "length">: go "Expression",
-  "element">: go "Type"]
-
--- SliceType = "[" "]" ElementType .
-sliceType :: Binding
-sliceType = define "SliceType" $ T.wrap $ go "Type"
-
--- StructType    = "struct" "{" { FieldDecl ";" } "}" .
-structType :: Binding
-structType = define "StructType" $ T.wrap $ T.list $ go "FieldDecl"
-
--- FieldDecl     = (IdentifierList Type | EmbeddedField) [ Tag ] .
--- EmbeddedField = [ "*" ] TypeName [ TypeArgs ] .
-fieldDecl :: Binding
-fieldDecl = define "FieldDecl" $ T.union [
-  "named">: go "NamedField",
-  "embedded">: go "EmbeddedField"]
-
--- Hydra: Named field with names, type, and optional tag
-namedField :: Binding
-namedField = define "NamedField" $ T.record [
-  "names">: nonemptyList $ go "Identifier",
-  "type">: go "Type",
-  "tag">: T.maybe $ go "Tag"]
-
--- Hydra: Embedded field (anonymous field)
-embeddedField :: Binding
-embeddedField = define "EmbeddedField" $ T.record [
-  "pointer">: T.boolean,
-  "type">: go "TypeName",
-  "tag">: T.maybe $ go "Tag"]
-
--- Tag = string_lit .
-tag :: Binding
-tag = define "Tag" $ T.wrap $ go "StringLit"
-
--- PointerType = "*" BaseType .
--- BaseType    = Type .
-pointerType :: Binding
-pointerType = define "PointerType" $ T.wrap $ go "Type"
-
--- FunctionType   = "func" Signature .
-functionType :: Binding
-functionType = define "FunctionType" $ T.wrap $ go "Signature"
-
--- Signature      = Parameters [ Result ] .
-signature :: Binding
-signature = define "Signature" $ T.record [
-  "parameters">: go "Parameters",
-  "result">: T.maybe $ go "Result"]
-
--- Result         = Parameters | Type .
-result :: Binding
-result = define "Result" $ T.union [
-  "parameters">: go "Parameters",
-  "type">: go "Type"]
-
--- Parameters     = "(" [ ParameterList [ "," ] ] ")" .
--- ParameterList  = ParameterDecl { "," ParameterDecl } .
-parameters :: Binding
-parameters = define "Parameters" $ T.wrap $ T.list $ go "ParameterDecl"
-
--- ParameterDecl  = [ IdentifierList ] [ "..." ] Type .
-parameterDecl :: Binding
-parameterDecl = define "ParameterDecl" $ T.record [
-  "names">: T.list $ go "Identifier",
-  "variadic">: T.boolean,
-  "type">: go "Type"]
-
--- InterfaceType  = "interface" "{" { InterfaceElem ";" } "}" .
-interfaceType :: Binding
-interfaceType = define "InterfaceType" $ T.wrap $ T.list $ go "InterfaceElem"
-
--- InterfaceElem  = MethodElem | TypeElem .
-interfaceElem :: Binding
-interfaceElem = define "InterfaceElem" $ T.union [
-  "method">: go "MethodElem",
-  "type">: go "TypeElem"]
-
--- MethodElem     = MethodName Signature .
-methodElem :: Binding
-methodElem = define "MethodElem" $ T.record [
-  "name">: go "Identifier",
-  "signature">: go "Signature"]
-
--- TypeElem       = TypeTerm { "|" TypeTerm } .
-typeElem :: Binding
-typeElem = define "TypeElem" $ T.wrap $ nonemptyList $ go "TypeTerm"
-
--- TypeTerm       = Type | UnderlyingType .
--- UnderlyingType = "~" Type .
-typeTerm :: Binding
-typeTerm = define "TypeTerm" $ T.record [
-  "underlying">: T.boolean, -- true if ~Type
-  "type">: go "Type"]
-
--- MapType     = "map" "[" KeyType "]" ElementType .
--- KeyType     = Type .
-mapType :: Binding
-mapType = define "MapType" $ T.record [
-  "key">: go "Type",
-  "value">: go "Type"]
-
--- ChannelType = ( "chan" | "chan" "<-" | "<-" "chan" ) ElementType .
-channelType :: Binding
-channelType = define "ChannelType" $ T.record [
-  "direction">: go "ChannelDirection",
-  "element">: go "Type"]
-
-channelDirection :: Binding
-channelDirection = define "ChannelDirection" $ T.enum [
-  "bidirectional", -- chan
-  "send",          -- chan<-
-  "receive"]       -- <-chan
-
--- ============================================================================
--- Expressions
--- ============================================================================
-
--- Expression = UnaryExpr | Expression binary_op Expression .
-expression :: Binding
-expression = define "Expression" $ T.union [
-  "unary">: go "UnaryExpr",
-  "binary">: go "BinaryExpr"]
-
--- UnaryExpr  = PrimaryExpr | unary_op UnaryExpr .
-unaryExpr :: Binding
-unaryExpr = define "UnaryExpr" $ T.union [
-  "primary">: go "PrimaryExpr",
-  "op">: go "UnaryOperation"]
-
--- Hydra: Unary operation with operator and operand
-unaryOperation :: Binding
-unaryOperation = define "UnaryOperation" $ T.record [
-  "op">: go "UnaryOp",
-  "operand">: go "UnaryExpr"]
-
--- binary_op  = "||" | "&&" | rel_op | add_op | mul_op .
-binaryExpr :: Binding
-binaryExpr = define "BinaryExpr" $ T.record [
-  "left">: go "Expression",
-  "op">: go "BinaryOp",
-  "right">: go "Expression"]
-
-binaryOp :: Binding
-binaryOp = define "BinaryOp" $ T.enum [
-  -- Logical
-  "or",          -- ||
-  "and",         -- &&
-  -- Relational
-  "equal",       -- ==
-  "notEqual",    -- !=
-  "less",        -- <
-  "lessEqual",   -- <=
-  "greater",     -- >
-  "greaterEqual", -- >=
-  -- Additive
-  "add",         -- +
-  "subtract",    -- -
-  "bitwiseOr",   -- |
-  "bitwiseXor",  -- ^
-  -- Multiplicative
-  "multiply",    -- *
-  "divide",      -- /
-  "remainder",   -- %
-  "leftShift",   -- <<
-  "rightShift",  -- >>
-  "bitwiseAnd",  -- &
-  "bitClear"]    -- &^
-
--- PrimaryExpr =
---     Operand |
---     Conversion |
---     MethodExpr |
---     PrimaryExpr Selector |
---     PrimaryExpr Index |
---     PrimaryExpr Slice |
---     PrimaryExpr TypeAssertion |
---     PrimaryExpr Arguments .
-primaryExpr :: Binding
-primaryExpr = define "PrimaryExpr" $ T.union [
-  "operand">: go "Operand",
-  "conversion">: go "Conversion",
-  "methodExpr">: go "MethodExpr",
-  "selector">: go "SelectorExpr",
-  "index">: go "IndexExpr",
-  "slice">: go "SliceExpr",
-  "typeAssertion">: go "TypeAssertionExpr",
-  "call">: go "CallExpr"]
-
--- Hydra: Selector expression (x.y)
-selectorExpr :: Binding
-selectorExpr = define "SelectorExpr" $ T.record [
-  "expr">: go "PrimaryExpr",
-  "selector">: go "Identifier"]
-
--- Hydra: Index expression (x[i])
-indexExpr :: Binding
-indexExpr = define "IndexExpr" $ T.record [
-  "expr">: go "PrimaryExpr",
-  "index">: go "Expression"]
-
--- Hydra: Slice expression (x[lo:hi] or x[lo:hi:max])
-sliceExpr :: Binding
-sliceExpr = define "SliceExpr" $ T.record [
-  "expr">: go "PrimaryExpr",
-  "slice">: go "Slice"]
-
--- Hydra: Type assertion expression (x.(T))
-typeAssertionExpr :: Binding
-typeAssertionExpr = define "TypeAssertionExpr" $ T.record [
-  "expr">: go "PrimaryExpr",
-  "type">: go "Type"]
-
--- Hydra: Call expression (f(args))
-callExpr :: Binding
-callExpr = define "CallExpr" $ T.record [
-  "function">: go "PrimaryExpr",
-  "arguments">: go "Arguments"]
-
--- Operand     = Literal | OperandName [ TypeArgs ] | "(" Expression ")" .
--- OperandName = identifier | QualifiedIdent .
-operand :: Binding
-operand = define "Operand" $ T.union [
-  "literal">: go "Literal",
-  "name">: go "OperandName",
-  "paren">: go "Expression"]
-
--- Hydra: Operand name with optional type arguments
-operandName :: Binding
-operandName = define "OperandName" $ T.record [
-  "name">: go "QualifiedIdent",
-  "typeArgs">: T.list $ go "Type"]
-
--- Literal     = BasicLit | CompositeLit | FunctionLit .
-literal :: Binding
-literal = define "Literal" $ T.union [
-  "basic">: go "BasicLit",
-  "composite">: go "CompositeLit",
-  "function">: go "FunctionLit"]
-
--- BasicLit    = int_lit | float_lit | imaginary_lit | rune_lit | string_lit .
-basicLit :: Binding
-basicLit = define "BasicLit" $ T.union [
-  "int">: go "IntLit",
-  "float">: go "FloatLit",
-  "imaginary">: go "ImaginaryLit",
-  "rune">: go "RuneLit",
-  "string">: go "StringLit"]
-
--- CompositeLit  = LiteralType LiteralValue .
-compositeLit :: Binding
-compositeLit = define "CompositeLit" $ T.record [
-  "type">: go "LiteralType",
-  "value">: go "LiteralValue"]
-
--- LiteralType   = StructType | ArrayType | "[" "..." "]" ElementType |
---                 SliceType | MapType | TypeName [ TypeArgs ] .
-literalType :: Binding
-literalType = define "LiteralType" $ T.union [
-  "struct">: go "StructType",
-  "array">: go "ArrayType",
-  "inferredArray">: go "Type", -- [...]T
-  "slice">: go "SliceType",
-  "map">: go "MapType",
-  "name">: go "TypeName"]
-
--- LiteralValue  = "{" [ ElementList [ "," ] ] "}" .
-literalValue :: Binding
-literalValue = define "LiteralValue" $ T.wrap $ T.list $ go "KeyedElement"
-
--- ElementList   = KeyedElement { "," KeyedElement } .
-elementList :: Binding
-elementList = define "ElementList" $ T.wrap $ nonemptyList $ go "KeyedElement"
-
--- KeyedElement  = [ Key ":" ] Element .
-keyedElement :: Binding
-keyedElement = define "KeyedElement" $ T.record [
-  "key">: T.maybe $ go "Key",
-  "element">: go "Element"]
-
--- Key           = FieldName | Expression | LiteralValue .
--- FieldName     = identifier .
-key :: Binding
-key = define "Key" $ T.union [
-  "field">: go "Identifier",
-  "expression">: go "Expression",
-  "literal">: go "LiteralValue"]
-
--- Element       = Expression | LiteralValue .
-element :: Binding
-element = define "Element" $ T.union [
-  "expression">: go "Expression",
-  "literal">: go "LiteralValue"]
-
--- FunctionLit = "func" Signature FunctionBody .
-functionLit :: Binding
-functionLit = define "FunctionLit" $ T.record [
-  "signature">: go "Signature",
-  "body">: go "FunctionBody"]
-
--- Selector       = "." identifier .
-selector :: Binding
-selector = define "Selector" $ T.wrap $ go "Identifier"
-
--- Index          = "[" Expression [ "," ] "]" .
-index :: Binding
-index = define "Index" $ T.wrap $ nonemptyList $ go "Expression"
-
--- Slice          = "[" [ Expression ] ":" [ Expression ] "]" |
---                  "[" [ Expression ] ":" Expression ":" Expression "]" .
-slice_ :: Binding
-slice_ = define "Slice" $ T.union [
-  "simple">: go "SimpleSlice",
-  "full">: go "FullSlice"]
-
--- Hydra: Simple slice [lo:hi]
-simpleSlice :: Binding
-simpleSlice = define "SimpleSlice" $ T.record [
-  "low">: T.maybe $ go "Expression",
-  "high">: T.maybe $ go "Expression"]
-
--- Hydra: Full slice [lo:hi:max]
-fullSlice :: Binding
-fullSlice = define "FullSlice" $ T.record [
-  "low">: T.maybe $ go "Expression",
-  "high">: go "Expression",
-  "max">: go "Expression"]
-
--- TypeAssertion = "." "(" Type ")" .
-typeAssertion :: Binding
-typeAssertion = define "TypeAssertion" $ T.wrap $ go "Type"
-
--- Arguments      = "(" [ ( ExpressionList | Type [ "," ExpressionList ] ) [ "..." ] [ "," ] ] ")" .
-arguments :: Binding
-arguments = define "Arguments" $ T.record [
-  "typeArg">: T.maybe $ go "Type",
-  "expressions">: T.list $ go "Expression",
-  "ellipsis">: T.boolean]
-
--- MethodExpr    = ReceiverType "." MethodName .
--- ReceiverType  = Type .
-methodExpr :: Binding
-methodExpr = define "MethodExpr" $ T.record [
-  "receiver">: go "Type",
-  "method">: go "Identifier"]
-
--- Conversion = Type "(" Expression [ "," ] ")" .
-conversion :: Binding
-conversion = define "Conversion" $ T.record [
-  "type">: go "Type",
-  "expression">: go "Expression"]
-
--- ============================================================================
--- Statements
--- ============================================================================
-
--- Statement =
---     Declaration | LabeledStmt | SimpleStmt |
---     GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt |
---     FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt |
---     DeferStmt .
-statement :: Binding
-statement = define "Statement" $ T.union [
-  "declaration">: go "Declaration",
-  "labeled">: go "LabeledStmt",
-  "simple">: go "SimpleStmt",
-  "go">: go "GoStmt",
-  "return">: go "ReturnStmt",
-  "break">: go "BreakStmt",
-  "continue">: go "ContinueStmt",
-  "goto">: go "GotoStmt",
-  "fallthrough">: go "FallthroughStmt",
-  "block">: go "Block",
-  "if">: go "IfStmt",
-  "switch">: go "SwitchStmt",
-  "select">: go "SelectStmt",
-  "for">: go "ForStmt",
-  "defer">: go "DeferStmt"]
-
--- SimpleStmt = EmptyStmt | ExpressionStmt | SendStmt | IncDecStmt | Assignment | ShortVarDecl .
-simpleStmt :: Binding
-simpleStmt = define "SimpleStmt" $ T.union [
-  "empty">: go "EmptyStmt",
-  "expression">: go "ExpressionStmt",
-  "send">: go "SendStmt",
-  "incDec">: go "IncDecStmt",
-  "assignment">: go "Assignment",
-  "shortVarDecl">: go "ShortVarDecl"]
-
--- EmptyStmt = .
-emptyStmt :: Binding
-emptyStmt = define "EmptyStmt" $ T.wrap T.unit
-
--- LabeledStmt = Label ":" Statement .
--- Label       = identifier .
-labeledStmt :: Binding
-labeledStmt = define "LabeledStmt" $ T.record [
-  "label">: go "Identifier",
-  "statement">: go "Statement"]
-
--- ExpressionStmt = Expression .
-expressionStmt :: Binding
-expressionStmt = define "ExpressionStmt" $ T.wrap $ go "Expression"
-
--- SendStmt = Channel "<-" Expression .
--- Channel  = Expression .
-sendStmt :: Binding
-sendStmt = define "SendStmt" $ T.record [
-  "channel">: go "Expression",
-  "value">: go "Expression"]
-
--- IncDecStmt = Expression ( "++" | "--" ) .
-incDecStmt :: Binding
-incDecStmt = define "IncDecStmt" $ T.record [
-  "expression">: go "Expression",
-  "increment">: T.boolean] -- true for ++, false for --
-
--- Assignment = ExpressionList assign_op ExpressionList .
-assignment :: Binding
-assignment = define "Assignment" $ T.record [
-  "lhs">: nonemptyList $ go "Expression",
-  "op">: go "AssignOp",
-  "rhs">: nonemptyList $ go "Expression"]
-
--- assign_op = [ add_op | mul_op ] "=" .
-assignOp :: Binding
-assignOp = define "AssignOp" $ T.union [
-  "simple">: T.unit,     -- =
-  "add">: go "AddOp",    -- +=, -=, |=, ^=
-  "mul">: go "MulOp"]    -- *=, /=, %=, <<=, >>=, &=, &^=
-
--- IfStmt = "if" [ SimpleStmt ";" ] Expression Block [ "else" ( IfStmt | Block ) ] .
-ifStmt :: Binding
-ifStmt = define "IfStmt" $ T.record [
-  "init">: T.maybe $ go "SimpleStmt",
-  "condition">: go "Expression",
-  "then">: go "Block",
-  "else">: T.maybe $ go "ElseClause"]
-
--- Hydra: Else clause (either another if or a block)
-elseClause :: Binding
-elseClause = define "ElseClause" $ T.union [
-  "if">: go "IfStmt",
-  "block">: go "Block"]
-
--- SwitchStmt = ExprSwitchStmt | TypeSwitchStmt .
-switchStmt :: Binding
-switchStmt = define "SwitchStmt" $ T.union [
-  "expression">: go "ExprSwitchStmt",
-  "type">: go "TypeSwitchStmt"]
-
--- ExprSwitchStmt = "switch" [ SimpleStmt ";" ] [ Expression ] "{" { ExprCaseClause } "}" .
-exprSwitchStmt :: Binding
-exprSwitchStmt = define "ExprSwitchStmt" $ T.record [
-  "init">: T.maybe $ go "SimpleStmt",
-  "expression">: T.maybe $ go "Expression",
-  "cases">: T.list $ go "ExprCaseClause"]
-
--- ExprCaseClause = ExprSwitchCase ":" StatementList .
--- ExprSwitchCase = "case" ExpressionList | "default" .
-exprCaseClause :: Binding
-exprCaseClause = define "ExprCaseClause" $ T.record [
-  "case">: T.maybe $ nonemptyList $ go "Expression", -- Nothing for default
-  "statements">: T.list $ go "Statement"]
-
--- TypeSwitchStmt  = "switch" [ SimpleStmt ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" .
-typeSwitchStmt :: Binding
-typeSwitchStmt = define "TypeSwitchStmt" $ T.record [
-  "init">: T.maybe $ go "SimpleStmt",
-  "guard">: go "TypeSwitchGuard",
-  "cases">: T.list $ go "TypeCaseClause"]
-
--- TypeSwitchGuard = [ identifier ":=" ] PrimaryExpr "." "(" "type" ")" .
-typeSwitchGuard :: Binding
-typeSwitchGuard = define "TypeSwitchGuard" $ T.record [
-  "name">: T.maybe $ go "Identifier",
-  "expression">: go "PrimaryExpr"]
-
--- TypeCaseClause  = TypeSwitchCase ":" StatementList .
--- TypeSwitchCase  = "case" TypeList | "default" .
--- TypeList        = Type { "," Type } .
-typeCaseClause :: Binding
-typeCaseClause = define "TypeCaseClause" $ T.record [
-  "case">: T.maybe $ nonemptyList $ go "Type", -- Nothing for default
-  "statements">: T.list $ go "Statement"]
-
--- ForStmt = "for" [ Condition | ForClause | RangeClause ] Block .
--- Condition = Expression .
-forStmt :: Binding
-forStmt = define "ForStmt" $ T.record [
-  "clause">: T.maybe $ go "ForClauseOrRange",
-  "body">: go "Block"]
-
--- Hydra: Either a for clause, range clause, or simple condition
-forClauseOrRange :: Binding
-forClauseOrRange = define "ForClauseOrRange" $ T.union [
-  "condition">: go "Expression",
-  "clause">: go "ForClause",
-  "range">: go "RangeClause"]
-
--- ForClause = [ InitStmt ] ";" [ Condition ] ";" [ PostStmt ] .
--- InitStmt = SimpleStmt .
--- PostStmt = SimpleStmt .
-forClause :: Binding
-forClause = define "ForClause" $ T.record [
-  "init">: T.maybe $ go "SimpleStmt",
-  "condition">: T.maybe $ go "Expression",
-  "post">: T.maybe $ go "SimpleStmt"]
-
--- RangeClause = [ ExpressionList "=" | IdentifierList ":=" ] "range" Expression .
-rangeClause :: Binding
-rangeClause = define "RangeClause" $ T.record [
-  "vars">: T.maybe $ go "RangeVars",
-  "expression">: go "Expression"]
-
--- Hydra: Range variables (either assignment or short declaration)
-rangeVars :: Binding
-rangeVars = define "RangeVars" $ T.union [
-  "assign">: nonemptyList $ go "Expression",
-  "declare">: nonemptyList $ go "Identifier"]
-
--- GoStmt = "go" Expression .
-goStmt :: Binding
-goStmt = define "GoStmt" $ T.wrap $ go "Expression"
-
--- SelectStmt = "select" "{" { CommClause } "}" .
-selectStmt :: Binding
-selectStmt = define "SelectStmt" $ T.wrap $ T.list $ go "CommClause"
-
--- CommClause = CommCase ":" StatementList .
-commClause :: Binding
-commClause = define "CommClause" $ T.record [
-  "case">: go "CommCase",
-  "statements">: T.list $ go "Statement"]
-
--- CommCase   = "case" ( SendStmt | RecvStmt ) | "default" .
--- RecvStmt   = [ ExpressionList "=" | IdentifierList ":=" ] RecvExpr .
--- RecvExpr   = Expression .
-commCase :: Binding
-commCase = define "CommCase" $ T.union [
-  "send">: go "SendStmt",
-  "receive">: go "ReceiveCase",
-  "default">: T.unit]
-
--- Hydra: Receive case with optional assignment
-receiveCase :: Binding
-receiveCase = define "ReceiveCase" $ T.record [
-  "vars">: T.maybe $ go "RangeVars", -- reuse RangeVars type
-  "expression">: go "Expression"]
-
--- ReturnStmt = "return" [ ExpressionList ] .
-returnStmt :: Binding
-returnStmt = define "ReturnStmt" $ T.wrap $ T.list $ go "Expression"
-
--- BreakStmt = "break" [ Label ] .
-breakStmt :: Binding
-breakStmt = define "BreakStmt" $ T.wrap $ T.maybe $ go "Identifier"
-
--- ContinueStmt = "continue" [ Label ] .
-continueStmt :: Binding
-continueStmt = define "ContinueStmt" $ T.wrap $ T.maybe $ go "Identifier"
-
--- GotoStmt = "goto" Label .
-gotoStmt :: Binding
-gotoStmt = define "GotoStmt" $ T.wrap $ go "Identifier"
-
--- FallthroughStmt = "fallthrough" .
-fallthroughStmt :: Binding
-fallthroughStmt = define "FallthroughStmt" $ T.wrap T.unit
-
--- DeferStmt = "defer" Expression .
-deferStmt :: Binding
-deferStmt = define "DeferStmt" $ T.wrap $ go "Expression"
-
--- Block = "{" StatementList "}" .
--- StatementList = { Statement ";" } .
-block :: Binding
-block = define "Block" $ T.wrap $ T.list $ go "Statement"
-
--- ============================================================================
--- Operators (miscellaneous)
--- ============================================================================
-
--- unary_op   = "+" | "-" | "!" | "^" | "*" | "&" | "<-" .
-unaryOp :: Binding
-unaryOp = define "UnaryOp" $ T.enum [
-  "plus",       -- +
-  "minus",      -- -
-  "not",        -- !
-  "xor",        -- ^
-  "deref",      -- *
-  "addressOf",  -- &
-  "receive"]    -- <-
-
--- mul_op     = "*" | "/" | "%" | "<<" | ">>" | "&" | "&^" .
-mulOp :: Binding
-mulOp = define "MulOp" $ T.enum [
-  "multiply",
-  "divide",
-  "remainder",
-  "leftShift",
-  "rightShift",
-  "bitwiseAnd",
-  "bitClear"]
-
--- add_op     = "+" | "-" | "|" | "^" .
-addOp :: Binding
-addOp = define "AddOp" $ T.enum [
-  "add",
-  "subtract",
-  "bitwiseOr",
-  "bitwiseXor"]
-
--- rel_op     = "==" | "!=" | "<" | "<=" | ">" | ">=" .
-relOp :: Binding
-relOp = define "RelOp" $ T.enum [
-  "equal",
-  "notEqual",
-  "less",
-  "lessEqual",
-  "greater",
-  "greaterEqual"]
diff --git a/src/main/haskell/Hydra/Sources/Gql/OpenGql.hs b/src/main/haskell/Hydra/Sources/Gql/OpenGql.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Gql/OpenGql.hs
+++ /dev/null
@@ -1,5219 +0,0 @@
-module Hydra.Sources.Gql.OpenGql where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "openGql.grammar"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-gql :: String -> Type
-gql = typeref ns
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("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")}
-  where
-    definitions = [
-      gqlProgram,
-      programActivity,
-      sessionActivity,
-      sessionSetAndResetCommands,
-      transactionActivity,
-      startAndMaybeProcedureAndMaybeEnd,
-      procedureAndMaybeEnd,
-      endTransactionCommand,
-      sessionSetCommand,
-      sessionSetSchemaClause,
-      sessionSetGraphClause,
-      sessionSetTimeZoneClause,
-      setTimeZoneValue,
-      sessionSetParameterClause,
-      sessionSetGraphParameterClause,
-      sessionSetBindingTableParameterClause,
-      sessionSetValueParameterClause,
-      sessionSetParameterName,
-      sessionResetCommand,
-      sessionResetArguments,
-      allParametersOrCharacteristics,
-      parametersOrCharacteristics,
-      parameterSessionSpecification,
-      sessionCloseCommand,
-      sessionParameterSpecification,
-      startTransactionCommand,
-      transactionCharacteristics,
-      transactionMode,
-      transactionAccessMode,
-      rollbackCommand,
-      commitCommand,
-      nestedProcedureSpecification,
-      procedureSpecification,
-      nestedDataModifyingProcedureSpecification,
-      nestedQuerySpecification,
-      procedureBody,
-      bindingVariableDefinitionBlock,
-      bindingVariableDefinition,
-      statementBlock,
-      statement,
-      nextStatement,
-      graphVariableDefinition,
-      optTypedGraphInitializer,
-      typedGraphReferenceValueType,
-      graphInitializer,
-      bindingTableVariableDefinition,
-      optTypedBindingTableInitializer,
-      typedBindingTableReferenceValueType,
-      bindingTableInitializer,
-      valueVariableDefinition,
-      optTypedValueInitializer,
-      typedValueType,
-      valueInitializer,
-      graphExpression,
-      currentGraph,
-      bindingTableExpression,
-      nestedBindingTableQuerySpecification,
-      objectExpressionPrimary,
-      linearCatalogModifyingStatement,
-      simpleCatalogModifyingStatement,
-      primitiveCatalogModifyingStatement,
-      createSchemaStatement,
-      dropSchemaStatement,
-      createGraphStatement,
-      createGraphOption,
-      graphTypeOption,
-      openGraphType,
-      ofGraphType,
-      graphTypeLikeGraph,
-      graphSource,
-      typedGraphTypeReference,
-      typedNestedGraphTypeSpecification,
-      dropGraphStatement,
-      createGraphTypeStatement,
-      createGraphTypeOption,
-      graphTypeSource,
-      copyOfGraphType,
-      dropGraphTypeStatement,
-      callCatalogModifyingProcedureStatement,
-      linearDataModifyingStatement,
-      focusedLinearDataModifyingStatement,
-      focusedLinearDataModifyingStatementBody,
-      focusedNestedDataModifyingProcedureSpecification,
-      ambientLinearDataModifyingStatement,
-      ambientLinearDataModifyingStatementBody,
-      simpleLinearDataAccessingStatement,
-      simpleDataAccessingStatement,
-      simpleDataModifyingStatement,
-      primitiveDataModifyingStatement,
-      insertStatement,
-      setStatement,
-      setItemList,
-      setItem,
-      setPropertyItem,
-      setAllPropertiesItem,
-      setLabelItem,
-      removeStatement,
-      removeItemList,
-      removeItem,
-      removePropertyItem,
-      removeLabelItem,
-      deleteStatement,
-      detachOption,
-      deleteItemList,
-      deleteItem,
-      callDataModifyingProcedureStatement,
-      compositeQueryStatement,
-      compositeQueryExpression,
-      compositeQueryExpressionConjunction,
-      queryConjunction,
-      setOperator,
-      setOperatorType,
-      compositeQueryPrimary,
-      linearQueryStatement,
-      focusedLinearQueryStatement,
-      focusedLinearQueryStatementPartsAndResult,
-      focusedLinearQueryStatementPart,
-      focusedLinearQueryAndPrimitiveResultStatementPart,
-      focusedPrimitiveResultStatement,
-      focusedNestedQuerySpecification,
-      ambientLinearQueryStatement,
-      ambientLinearQueryStatementSimpleAndPrimitiveResult,
-      simpleLinearQueryStatement,
-      simpleQueryStatement,
-      primitiveQueryStatement,
-      matchStatement,
-      simpleMatchStatement,
-      optionalMatchStatement,
-      optionalOperand,
-      matchStatementBlock,
-      callQueryStatement,
-      filterStatement,
-      letStatement,
-      letVariableDefinitionList,
-      letVariableDefinition,
-      bindingEqualsValue,
-      forStatement,
-      forItem,
-      forItemAlias,
-      forItemSource,
-      forOrdinalityOrOffset,
-      ordinalityOrOffsetType,
-      orderByAndPageStatement,
-      orderByAndOptionalOffsetAndLimit,
-      offsetAndOptionalLimit,
-      primitiveResultStatement,
-      returnAndOptionalOrderByAndPage,
-      returnStatement,
-      returnStatementBody,
-      returnItemsAndGroupBy,
-      returnItems,
-      returnItemList,
-      returnItem,
-      returnItemAlias,
-      selectStatement,
-      selectItems,
-      selectStatementBodyAndClauses,
-      selectItemList,
-      selectItem,
-      selectItemAlias,
-      havingClause,
-      selectStatementBody,
-      selectGraphMatchList,
-      selectGraphMatch,
-      selectQuerySpecification,
-      graphAndNestedQuerySpecification,
-      callProcedureStatement,
-      procedureCall,
-      inlineProcedureCall,
-      variableScopeClause,
-      bindingVariableReferenceList,
-      namedProcedureCall,
-      procedureArgumentList,
-      procedureArgument,
-      atSchemaClause,
-      useGraphClause,
-      graphPatternBindingTable,
-      graphPatternYieldClause,
-      graphPatternYieldItemList,
-      graphPatternYieldItem,
-      graphPattern,
-      matchMode,
-      repeatableElementsMatchMode,
-      differentEdgesMatchMode,
-      elementBindingsOrElements,
-      edgeBindingsOrEdges,
-      pathPatternList,
-      pathPattern,
-      pathVariableDeclaration,
-      keepClause,
-      graphPatternWhereClause,
-      insertGraphPattern,
-      insertPathPatternList,
-      insertPathPattern,
-      insertEdgeAndNode,
-      insertNodePattern,
-      insertEdgePattern,
-      insertEdgePointingLeft,
-      insertEdgePointingRight,
-      insertEdgeUndirected,
-      insertElementPatternFiller,
-      labelAndPropertySetSpecification,
-      pathPatternPrefix,
-      pathModePrefix,
-      pathMode,
-      pathSearchPrefix,
-      allPathSearch,
-      pathOrPaths,
-      anyPathSearch,
-      numberOfPaths,
-      shortestPathSearch,
-      allShortestPathSearch,
-      anyShortestPathSearch,
-      countedShortestPathSearch,
-      countedShortestGroupSearch,
-      numberOfGroups,
-      pathPatternExpression,
-      pathTerm,
-      pathFactor,
-      quantifiedPathPrimary,
-      questionedPathPrimary,
-      pathPrimary,
-      elementPattern,
-      nodePattern,
-      elementPatternFiller,
-      elementVariableDeclaration,
-      isLabelExpression,
-      isOrColon,
-      elementPatternPredicate,
-      elementPatternWhereClause,
-      elementPropertySpecification,
-      propertyKeyValuePairList,
-      propertyKeyValuePair,
-      edgePattern,
-      fullEdgePattern,
-      fullEdgePointingLeft,
-      fullEdgeUndirected,
-      fullEdgePointingRight,
-      fullEdgeLeftOrUndirected,
-      fullEdgeUndirectedOrRight,
-      fullEdgeLeftOrRight,
-      fullEdgeAnyDirection,
-      abbreviatedEdgePattern,
-      parenthesizedPathPatternExpression,
-      subpathVariableDeclaration,
-      parenthesizedPathPatternWhereClause,
-      labelExpression,
-      conjunctionLabelExpression,
-      disjunctionLabelExpression,
-      pathVariableReference,
-      elementVariableReference,
-      graphPatternQuantifier,
-      fixedQuantifier,
-      generalQuantifier,
-      lowerBound,
-      upperBound,
-      simplifiedPathPatternExpression,
-      simplifiedDefaultingLeft,
-      simplifiedDefaultingUndirected,
-      simplifiedDefaultingRight,
-      simplifiedDefaultingLeftOrUndirected,
-      simplifiedDefaultingUndirectedOrRight,
-      simplifiedDefaultingLeftOrRight,
-      simplifiedDefaultingAnyDirection,
-      simplifiedContents,
-      simplifiedPathUnion,
-      simplifiedMultisetAlternation,
-      simplifiedTerm,
-      simplifiedConcatenation,
-      simplifiedFactorLow,
-      simplifiedConjunction,
-      simplifiedFactorHigh,
-      simplifiedQuantified,
-      simplifiedQuestioned,
-      simplifiedTertiary,
-      simplifiedDirectionOverride,
-      simplifiedOverrideLeft,
-      simplifiedOverrideUndirected,
-      simplifiedOverrideRight,
-      simplifiedOverrideLeftOrUndirected,
-      simplifiedOverrideUndirectedOrRight,
-      simplifiedOverrideLeftOrRight,
-      simplifiedOverrideAnyDirection,
-      simplifiedSecondary,
-      simplifiedNegation,
-      simplifiedPrimary,
-      whereClause,
-      yieldClause,
-      yieldItemList,
-      yieldItem,
-      yieldItemName,
-      yieldItemAlias,
-      groupByClause,
-      groupingElementList,
-      groupingElement,
-      orderByClause,
-      sortSpecificationList,
-      sortSpecification,
-      sortKey,
-      orderingSpecification,
-      nullOrdering,
-      limitClause,
-      offsetClause,
-      offsetSynonym,
-      schemaReference,
-      absoluteCatalogSchemaReference,
-      absoluteDirectoryAndSchema,
-      catalogSchemaParentAndName,
-      relativeCatalogSchemaReference,
-      relativeDirectoryAndSchema,
-      predefinedSchemaReference,
-      absoluteDirectoryPath,
-      relativeDirectoryPath,
-      simpleDirectoryPath,
-      graphReference,
-      parentAndGraphName,
-      catalogGraphParentAndName,
-      homeGraph,
-      graphTypeReference,
-      catalogGraphTypeParentAndName,
-      bindingTableReference,
-      parentAndTableName,
-      procedureReference,
-      catalogProcedureParentAndName,
-      catalogObjectParentReference,
-      schemaAndObjects,
-      referenceParameterSpecification,
-      nestedGraphTypeSpecification,
-      graphTypeSpecificationBody,
-      elementTypeList,
-      elementTypeSpecification,
-      nodeTypeSpecification,
-      nodeTypePattern,
-      nodeSynonymAndTypeName,
-      nodeTypePhrase,
-      nodeTypePhraseFiller,
-      nodeTypeNameWithFiller,
-      nodeTypeFiller,
-      nodeKeyLabelSetWithContent,
-      localNodeTypeAlias,
-      nodeTypeImpliedContent,
-      nodeLabelSetWithProperties,
-      nodeTypeKeyLabelSet,
-      nodeTypeLabelSet,
-      nodeTypePropertyTypes,
-      edgeTypeSpecification,
-      edgeTypePattern,
-      edgeKindAndSynonym,
-      edgeTypePatternType,
-      edgeTypePhrase,
-      edgeTypePhraseFiller,
-      edgeTypeNameWithFiller,
-      edgeTypeFiller,
-      edgeKeyLabelSetWithContent,
-      edgeTypeImpliedContent,
-      edgeLabelSetWithProperties,
-      edgeTypeKeyLabelSet,
-      edgeTypeLabelSet,
-      edgeTypePropertyTypes,
-      edgeTypePatternDirected,
-      edgeTypePatternPointingRight,
-      edgeTypePatternPointingLeft,
-      edgeTypePatternUndirected,
-      arcTypePointingRight,
-      arcTypePointingLeft,
-      arcTypeUndirected,
-      sourceNodeTypeReference,
-      destinationNodeTypeReference,
-      edgeKind,
-      endpointPairPhrase,
-      endpointPair,
-      endpointPairDirected,
-      endpointPairPointingRight,
-      endpointPairPointingLeft,
-      endpointPairUndirected,
-      connectorPointingRight,
-      connectorUndirected,
-      sourceNodeTypeAlias,
-      destinationNodeTypeAlias,
-      labelSetPhrase,
-      isOrColonWithLabels,
-      labelSetSpecification,
-      propertyTypesSpecification,
-      propertyTypeList,
-      propertyType,
-      propertyValueType,
-      bindingTableType,
-      valueType,
-      listValueTypeAlt1,
-      listValueTypeAlt2,
-      listValueTypeAlt3,
-      openDynamicUnionType,
-      dynamicPropertyValueType,
-      closedDynamicUnionTypeAlt1,
-      closedDynamicUnionTypeAlt2,
-      typed,
-      predefinedType,
-      booleanType,
-      characterStringType,
-      stringType,
-      charType,
-      varcharType,
-      byteStringType,
-      bytesType,
-      binaryType,
-      varbinaryType,
-      minLength,
-      fixedLength,
-      maxLength,
-      numericType,
-      exactNumericType,
-      binaryExactNumericType,
-      signedBinaryExactNumericType,
-      int8Type,
-      int16Type,
-      int32Type,
-      int64Type,
-      int128Type,
-      int256Type,
-      smallIntType,
-      bigIntType,
-      intWithPrecision,
-      signedVerboseBinaryExactNumericType,
-      unsignedBinaryExactNumericType,
-      uint8Type,
-      uint16Type,
-      uint32Type,
-      uint64Type,
-      uint128Type,
-      uint256Type,
-      uSmallIntType,
-      uBigIntType,
-      uintWithPrecision,
-      verboseBinaryExactNumericType,
-      integer8Type,
-      integer16Type,
-      integer32Type,
-      integer64Type,
-      integer128Type,
-      integer256Type,
-      smallIntegerType,
-      bigIntegerType,
-      integerWithPrecision,
-      precision,
-      decimalExactNumericType,
-      precisionAndScale,
-      scale,
-      approximateNumericType,
-      float16Type,
-      float32Type,
-      float64Type,
-      float128Type,
-      float256Type,
-      floatTypeWithPrecision,
-      realType,
-      doubleTypeWithPrecision,
-      temporalType,
-      temporalInstantType,
-      datetimeType,
-      zonedDatetimeType,
-      timestampWithTimeZoneType,
-      localDatetimeTypeChoice,
-      localDatetimeType,
-      timestampWithoutTimeZoneType,
-      dateType,
-      timeType,
-      zonedTimeType,
-      timeWithTimeZoneType,
-      localTimeTypeChoice,
-      localTimeType,
-      timeWithoutTimeZoneType,
-      temporalDurationType,
-      temporalDurationQualifier,
-      referenceValueType,
-      immaterialValueType,
-      nullType,
-      emptyType,
-      graphReferenceValueType,
-      closedGraphReferenceValueType,
-      openGraphReferenceValueType,
-      bindingTableReferenceValueType,
-      nodeReferenceValueType,
-      closedNodeReferenceValueType,
-      openNodeReferenceValueType,
-      edgeReferenceValueType,
-      closedEdgeReferenceValueType,
-      openEdgeReferenceValueType,
-      pathValueType,
-      listValueTypeName,
-      listValueTypeNameSynonym,
-      recordType,
-      anyRecordType,
-      specifiedRecordType,
-      fieldTypesSpecification,
-      fieldTypeList,
-      notNull,
-      fieldType,
-      searchCondition,
-      predicate,
-      comparisonPredicatePart2,
-      compOp,
-      existsPredicate,
-      nullPredicate,
-      nullPredicatePart2,
-      valueTypePredicate,
-      valueTypePredicatePart2,
-      normalizedPredicatePart2,
-      directedPredicate,
-      directedPredicatePart2,
-      labeledPredicate,
-      labeledPredicatePart2,
-      isLabeledOrColon,
-      sourceDestinationPredicate,
-      nodeReference,
-      sourcePredicate,
-      destinationPredicate,
-      edgeReference,
-      allDifferentPredicate,
-      samePredicate,
-      propertyExistsPredicate,
-      valueExpression,
-      signedExpr,
-      multDivExpr,
-      addSubtractExpr,
-      concatenationExpr,
-      notExpr,
-      isNotExpr,
-      conjunctiveExpr,
-      disjunctiveExpr,
-      comparisonExpr,
-      normalizedPredicateExpr,
-      sign,
-      multDivOperator,
-      addSubtractOperator,
-      disjunctiveOperator,
-      valueFunction,
-      booleanValueExpression,
-      characterOrByteStringFunction,
-      subCharacterOrByteString,
-      side,
-      trimSingleCharacterOrByteString,
-      foldCharacterString,
-      case_,
-      trimMultiCharacterCharacterString,
-      trimType,
-      normalizeCharacterString,
-      nodeReferenceValueExpression,
-      edgeReferenceValueExpression,
-      aggregatingValueExpression,
-      primaryValueExpression,
-      parenthesizedValueExpression,
-      nonParenthesizedPrimaryValueExpression,
-      nonParenthesizedPrimaryValueExpressionSpecialCase,
-      unsignedValueSpecification,
-      nonNegativeIntegerSpecification,
-      generalValueSpecification,
-      dynamicParameterSpecification,
-      letValueExpression,
-      valueQueryExpression,
-      caseExpression,
-      caseAbbreviation,
-      nullIfAbbreviation,
-      caseSpecification,
-      simpleCase,
-      searchedCase,
-      simpleWhenClause,
-      searchedWhenClause,
-      elseClause,
-      caseOperand,
-      whenOperandList,
-      whenOperand,
-      result,
-      resultExpression,
-      castSpecification,
-      castOperand,
-      castTarget,
-      aggregateFunction,
-      generalSetFunction,
-      binarySetFunction,
-      generalSetFunctionType,
-      setQuantifier,
-      binarySetFunctionType,
-      dependentValueExpression,
-      independentValueExpression,
-      elementIdFunction,
-      propertyReference,
-      bindingVariableReference,
-      pathValueExpression,
-      pathValueConstructor,
-      pathValueConstructorByEnumeration,
-      pathElementList,
-      pathElementListStart,
-      pathElementListStep,
-      listValueExpression,
-      listValueFunction,
-      trimListFunction,
-      elementsFunction,
-      listValueConstructor,
-      listValueConstructorByEnumeration,
-      listElementList,
-      listElement,
-      recordConstructor,
-      fieldsSpecification,
-      fieldList,
-      field,
-      truthValue,
-      numericValueExpression,
-      signedNumericValueExpression,
-      mulDivNumericValueExpression,
-      addSubNumericValueExpression,
-      numericValueFunction,
-      lengthExpression,
-      cardinalityExpression,
-      cardinalityArgumentExpression,
-      charLengthExpression,
-      byteLengthExpression,
-      pathLengthExpression,
-      absoluteValueExpression,
-      modulusExpression,
-      numericValueExpressionDividend,
-      numericValueExpressionDivisor,
-      trigonometricFunction,
-      trigonometricFunctionName,
-      generalLogarithmFunction,
-      generalLogarithmBase,
-      generalLogarithmArgument,
-      commonLogarithm,
-      naturalLogarithm,
-      exponentialFunction,
-      powerFunction,
-      numericValueExpressionBase,
-      numericValueExpressionExponent,
-      squareRoot,
-      floorFunction,
-      ceilingFunction,
-      characterStringValueExpression,
-      byteStringValueExpression,
-      trimOperands,
-      trimCharacterOrByteStringSource,
-      trimSpecification,
-      trimCharacterOrByteString,
-      normalForm,
-      stringLength,
-      datetimeValueExpression,
-      datetimeValueFunction,
-      dateFunction,
-      timeFunction,
-      localtimeFunction,
-      datetimeFunction,
-      localdatetimeFunction,
-      dateFunctionParameters,
-      timeFunctionParameters,
-      datetimeFunctionParameters,
-      durationValueExpression,
-      datetimeSubtraction,
-      datetimeSubtractionParameters,
-      datetimeValueExpression1,
-      datetimeValueExpression2,
-      durationValueFunction,
-      durationFunction,
-      durationFunctionParameters,
-      objectName,
-      objectNameOrBindingVariable,
-      directoryName,
-      schemaName,
-      graphName,
-      delimitedGraphName,
-      graphTypeName,
-      nodeTypeName,
-      edgeTypeName,
-      bindingTableName,
-      delimitedBindingTableName,
-      procedureName,
-      labelName,
-      propertyName,
-      fieldName_,
-      elementVariable,
-      pathVariable,
-      subpathVariable,
-      bindingVariable,
-      unsignedLiteral,
-      generalLiteral,
-      temporalLiteral,
-      dateLiteral,
-      timeLiteral,
-      datetimeLiteral,
-      listLiteral,
-      recordLiteral,
-      identifier,
-      regularIdentifier,
-      timeZoneString,
-      characterStringLiteral,
-      unsignedNumericLiteral,
-      exactNumericLiteral,
-      approximateNumericLiteral,
-      unsignedInteger,
-      unsignedDecimalInteger,
-      nullLiteral,
-      dateString,
-      timeString,
-      datetimeString,
-      durationLiteral,
-      durationString,
-      nodeSynonym,
-      edgesSynonym,
-      edgeSynonym,
-      implies,
-      parameterName,
-      booleanLiteral,
-      byteStringLiteral]
-
-gqlProgram :: Binding
-gqlProgram = def "GqlProgram" $
-  T.record [
-    "activity">: T.maybe $ gql "ProgramActivity",
-    "close">: T.maybe $ gql "SessionCloseCommand"]
-
-programActivity :: Binding
-programActivity = def "ProgramActivity" $
-  T.union [
-    "session">: gql "SessionActivity",
-    "transaction">: gql "TransactionActivity"]
-
-sessionActivity :: Binding
-sessionActivity = def "SessionActivity" $
-  T.union [
-    "reset">: nonemptyList $ gql "SessionResetCommand",
-    "setAndResetCommands">: gql "SessionSetAndResetCommands"]
-
-sessionSetAndResetCommands :: Binding
-sessionSetAndResetCommands = def "SessionSetAndResetCommands" $
-  T.record [
-    "set">: nonemptyList $ gql "SessionSetCommand",
-    "reset">: T.list $ gql "SessionResetCommand"]
-
-transactionActivity :: Binding
-transactionActivity = def "TransactionActivity" $
-  T.union [
-    "start">: gql "StartAndMaybeProcedureAndMaybeEnd",
-    "procedure">: gql "ProcedureAndMaybeEnd",
-    "end">: gql "EndTransactionCommand"]
-
-startAndMaybeProcedureAndMaybeEnd :: Binding
-startAndMaybeProcedureAndMaybeEnd = def "StartAndMaybeProcedureAndMaybeEnd" $
-  T.record [
-    "start">: gql "StartTransactionCommand",
-    "procedureAndEnd">: T.maybe $ gql "ProcedureAndMaybeEnd"]
-
-procedureAndMaybeEnd :: Binding
-procedureAndMaybeEnd = def "ProcedureAndMaybeEnd" $
-  T.record [
-    "procedure">: gql "ProcedureSpecification",
-    "end">: T.maybe $ gql "EndTransactionCommand"]
-
-endTransactionCommand :: Binding
-endTransactionCommand = def "EndTransactionCommand" $
-  T.union [
-    "rollback">: gql "RollbackCommand",
-    "commit">: gql "CommitCommand"]
-
-sessionSetCommand :: Binding
-sessionSetCommand = def "SessionSetCommand" $
-  T.union [
-    "schema">: gql "SessionSetSchemaClause",
-    "graph">: gql "SessionSetGraphClause",
-    "timeZone">: gql "SessionSetTimeZoneClause",
-    "parameter">: gql "SessionSetParameterClause"]
-
-sessionSetSchemaClause :: Binding
-sessionSetSchemaClause = def "SessionSetSchemaClause" $
-  gql "SchemaReference"
-
-sessionSetGraphClause :: Binding
-sessionSetGraphClause = def "SessionSetGraphClause" $
-  gql "GraphExpression"
-
-sessionSetTimeZoneClause :: Binding
-sessionSetTimeZoneClause = def "SessionSetTimeZoneClause" $
-  gql "SetTimeZoneValue"
-
-setTimeZoneValue :: Binding
-setTimeZoneValue = def "SetTimeZoneValue" $
-  gql "TimeZoneString"
-
-sessionSetParameterClause :: Binding
-sessionSetParameterClause = def "SessionSetParameterClause" $
-  T.union [
-    "graph">: gql "SessionSetGraphParameterClause",
-    "bindings">: gql "SessionSetBindingTableParameterClause",
-    "value">: gql "SessionSetValueParameterClause"]
-
-sessionSetGraphParameterClause :: Binding
-sessionSetGraphParameterClause = def "SessionSetGraphParameterClause" $
-  T.record [
-    "graph">: gql "SessionSetParameterName",
-    "initializer">: gql "OptTypedGraphInitializer"]
-
-sessionSetBindingTableParameterClause :: Binding
-sessionSetBindingTableParameterClause = def "SessionSetBindingTableParameterClause" $
-  T.record [
-    "binding">: T.boolean,
-    "param">: gql "SessionSetParameterName",
-    "init">: gql "OptTypedBindingTableInitializer"]
-
-sessionSetValueParameterClause :: Binding
-sessionSetValueParameterClause = def "SessionSetValueParameterClause" $
-  T.record [
-    "value">: gql "SessionSetParameterName",
-    "initializer">: gql "OptTypedValueInitializer"]
-
-sessionSetParameterName :: Binding
-sessionSetParameterName = def "SessionSetParameterName" $
-  T.record [
-    "ifNotExists">: T.boolean,
-    "parameter">: gql "SessionParameterSpecification"]
-
-sessionResetCommand :: Binding
-sessionResetCommand = def "SessionResetCommand" $
-  T.maybe $ gql "SessionResetArguments"
-
-sessionResetArguments :: Binding
-sessionResetArguments = def "SessionResetArguments" $
-  T.union [
-    "parametersOrCharacteristics">: gql "AllParametersOrCharacteristics",
-    "schema">: T.unit,
-    "graph">: T.unit,
-    "timeZone">: T.unit,
-    "parameterSessionSpecification">: gql "ParameterSessionSpecification"]
-
-allParametersOrCharacteristics :: Binding
-allParametersOrCharacteristics = def "AllParametersOrCharacteristics" $
-  T.record [
-    "all">: T.boolean,
-    "type">: gql "ParametersOrCharacteristics"]
-
-parametersOrCharacteristics :: Binding
-parametersOrCharacteristics = def "ParametersOrCharacteristics" $
-  T.enum ["parameters", "characteristics"]
-
-parameterSessionSpecification :: Binding
-parameterSessionSpecification = def "ParameterSessionSpecification" $
-  T.record [
-    "parameter">: T.boolean,
-    "sessionParameterSpecification">: gql "SessionParameterSpecification"]
-
-sessionCloseCommand :: Binding
-sessionCloseCommand = def "SessionCloseCommand" $
-  T.unit
-
-sessionParameterSpecification :: Binding
-sessionParameterSpecification = def "SessionParameterSpecification" $
-  gql "ParameterName"
-
-startTransactionCommand :: Binding
-startTransactionCommand = def "StartTransactionCommand" $
-  T.maybe $ gql "TransactionCharacteristics"
-
-transactionCharacteristics :: Binding
-transactionCharacteristics = def "TransactionCharacteristics" $
-  nonemptyList $ gql "TransactionMode"
-
-transactionMode :: Binding
-transactionMode = def "TransactionMode" $
-  gql "TransactionAccessMode"
-
-transactionAccessMode :: Binding
-transactionAccessMode = def "TransactionAccessMode" $
-  T.enum [
-    "readOnly",
-    "readWrite"]
-
-rollbackCommand :: Binding
-rollbackCommand = def "RollbackCommand" $
-  T.unit
-
-commitCommand :: Binding
-commitCommand = def "CommitCommand" $
-  T.unit
-
-nestedProcedureSpecification :: Binding
-nestedProcedureSpecification = def "NestedProcedureSpecification" $
-  gql "ProcedureSpecification"
-
-procedureSpecification :: Binding
-procedureSpecification = def "ProcedureSpecification" $
-  gql "ProcedureBody"
-
-nestedDataModifyingProcedureSpecification :: Binding
-nestedDataModifyingProcedureSpecification = def "NestedDataModifyingProcedureSpecification" $
-  gql "ProcedureBody"
-
-nestedQuerySpecification :: Binding
-nestedQuerySpecification = def "NestedQuerySpecification" $
-  gql "ProcedureBody"
-
-procedureBody :: Binding
-procedureBody = def "ProcedureBody" $
-  T.record [
-    "atSchema">: T.maybe $ gql "AtSchemaClause",
-    "bindings">: T.maybe $ gql "BindingVariableDefinitionBlock",
-    "statements">: gql "StatementBlock"]
-
-bindingVariableDefinitionBlock :: Binding
-bindingVariableDefinitionBlock = def "BindingVariableDefinitionBlock" $
-  nonemptyList $ gql "BindingVariableDefinition"
-
-bindingVariableDefinition :: Binding
-bindingVariableDefinition = def "BindingVariableDefinition" $
-  T.union [
-    "graph">: gql "GraphVariableDefinition",
-    "table">: gql "BindingTableVariableDefinition",
-    "value">: gql "ValueVariableDefinition"]
-
-statementBlock :: Binding
-statementBlock = def "StatementBlock" $
-  T.record [
-    "statement">: gql "Statement",
-    "nextStatements">: T.list $ gql "NextStatement"]
-
-statement :: Binding
-statement = def "Statement" $
-  T.union [
-    "linearCatalogModifying">: gql "LinearCatalogModifyingStatement",
-    "linearDataModifying">: gql "LinearDataModifyingStatement",
-    "compositeQuery">: gql "CompositeQueryStatement"]
-
-nextStatement :: Binding
-nextStatement = def "NextStatement" $
-  T.record [
-    "yieldClause">: T.maybe $ gql "YieldClause",
-    "statement">: gql "Statement"]
-
-graphVariableDefinition :: Binding
-graphVariableDefinition = def "GraphVariableDefinition" $
-  T.record [
-    "variable">: gql "BindingVariable",
-    "initializer">: gql "OptTypedGraphInitializer"]
-
-optTypedGraphInitializer :: Binding
-optTypedGraphInitializer = def "OptTypedGraphInitializer" $
-  T.record [
-    "type">: T.maybe $ gql "TypedGraphReferenceValueType",
-    "initializer">: gql "GraphInitializer"]
-
-typedGraphReferenceValueType :: Binding
-typedGraphReferenceValueType = def "TypedGraphReferenceValueType" $
-  T.record [
-    "typed">: T.maybe $ gql "Typed",
-    "valueType">: gql "GraphReferenceValueType"]
-
-graphInitializer :: Binding
-graphInitializer = def "GraphInitializer" T.unit
-
-bindingTableVariableDefinition :: Binding
-bindingTableVariableDefinition = def "BindingTableVariableDefinition" $
-  T.record [
-    "binding">: T.boolean,
-    "variable">: gql "BindingVariable",
-    "initializer">: gql "OptTypedBindingTableInitializer"]
-
-optTypedBindingTableInitializer :: Binding
-optTypedBindingTableInitializer = def "OptTypedBindingTableInitializer" $
-  T.record [
-    "type">: T.maybe $ gql "TypedBindingTableReferenceValueType",
-    "initializer">: gql "BindingTableInitializer"]
-
-typedBindingTableReferenceValueType :: Binding
-typedBindingTableReferenceValueType = def "TypedBindingTableReferenceValueType" $
-  T.record [
-    "typed">: T.maybe $ gql "Typed",
-    "valueType">: gql "BindingTableReferenceValueType"]
-
-bindingTableInitializer :: Binding
-bindingTableInitializer = def "BindingTableInitializer" T.unit
-
-valueVariableDefinition :: Binding
-valueVariableDefinition = def "ValueVariableDefinition" $
-  T.record [
-    "variable">: gql "BindingVariable",
-    "initializer">: gql "OptTypedValueInitializer"]
-
-optTypedValueInitializer :: Binding
-optTypedValueInitializer = def "OptTypedValueInitializer" $
-  T.record [
-    "type">: T.maybe $ gql "TypedValueType",
-    "initializer">: gql "ValueInitializer"]
-
-typedValueType :: Binding
-typedValueType = def "TypedValueType" $
-  T.record [
-    "typed">: T.maybe $ gql "Typed",
-    "valueType">: gql "ValueType"]
-
-valueInitializer :: Binding
-valueInitializer = def "ValueInitializer" T.unit
-
-graphExpression :: Binding
-graphExpression = def "GraphExpression" $
-  T.union [
-    "object">: gql "ObjectExpressionPrimary",
-    "reference">: gql "GraphReference",
-    "name">: gql "ObjectNameOrBindingVariable",
-    "current">: gql "CurrentGraph"]
-
-currentGraph :: Binding
-currentGraph = def "CurrentGraph" $
-  T.enum ["graph", "propertyGraph"]
-
-bindingTableExpression :: Binding
-bindingTableExpression = def "BindingTableExpression" $
-  T.union [
-    "nested">: gql "NestedBindingTableQuerySpecification",
-    "object">: gql "ObjectExpressionPrimary",
-    "table">: gql "BindingTableReference",
-    "name">: gql "ObjectNameOrBindingVariable"]
-
-nestedBindingTableQuerySpecification :: Binding
-nestedBindingTableQuerySpecification = def "NestedBindingTableQuerySpecification" T.unit
-
-objectExpressionPrimary :: Binding
-objectExpressionPrimary = def "ObjectExpressionPrimary" $
-  T.union [
-    "variable">: gql "PrimaryValueExpression",
-    "parenthesized">: gql "ParenthesizedValueExpression",
-    "nonParenthesized">: gql "NonParenthesizedPrimaryValueExpressionSpecialCase"]
-
-linearCatalogModifyingStatement :: Binding
-linearCatalogModifyingStatement = def "LinearCatalogModifyingStatement" $
-  nonemptyList $ gql "SimpleCatalogModifyingStatement"
-
-simpleCatalogModifyingStatement :: Binding
-simpleCatalogModifyingStatement = def "SimpleCatalogModifyingStatement" $
-  T.union [
-    "primitive">: gql "PrimitiveCatalogModifyingStatement",
-    "callProcedure">: gql "CallCatalogModifyingProcedureStatement"]
-
-primitiveCatalogModifyingStatement :: Binding
-primitiveCatalogModifyingStatement = def "PrimitiveCatalogModifyingStatement" $
-  T.union [
-    "createSchema">: gql "CreateSchemaStatement",
-    "dropSchema">: gql "DropSchemaStatement",
-    "createGraph">: gql "CreateGraphStatement",
-    "dropGraph">: gql "DropGraphStatement",
-    "createGraphType">: gql "CreateGraphTypeStatement",
-    "dropGraphType">: gql "DropGraphTypeStatement"]
-
-createSchemaStatement :: Binding
-createSchemaStatement = def "CreateSchemaStatement" $
-  T.record [
-    "ifNotExists">: T.boolean,
-    "parentAndName">: gql "CatalogSchemaParentAndName"]
-
-dropSchemaStatement :: Binding
-dropSchemaStatement = def "DropSchemaStatement" $
-  T.record [
-    "ifExists">: T.boolean,
-    "parentAndName">: gql "CatalogSchemaParentAndName"]
-
-createGraphStatement :: Binding
-createGraphStatement = def "CreateGraphStatement" $
-  T.record [
-    "createOption">: gql "CreateGraphOption",
-    "parentAndName">: gql "CatalogGraphParentAndName",
-    "type">: gql "GraphTypeOption",
-    "source">: T.maybe $ gql "GraphSource"]
-
-createGraphOption :: Binding
-createGraphOption = def "CreateGraphOption" $
-  T.union [
-    "graphIfNotExists">: T.boolean,
-    "orReplace">: T.unit]
-
-graphTypeOption :: Binding
-graphTypeOption = def "GraphTypeOption" $
-  T.union [
-    "openGraphType">: gql "OpenGraphType",
-    "ofGraphType">: gql "OfGraphType"]
-
-openGraphType :: Binding
-openGraphType = def "OpenGraphType" $
-  T.record [
-    "typed">: T.maybe $ gql "Typed",
-    "graph">: T.boolean]
-
-ofGraphType :: Binding
-ofGraphType = def "OfGraphType" $
-  T.union [
-    "likeGraph">: gql "GraphTypeLikeGraph",
-    "reference">: gql "TypedGraphTypeReference",
-    "nested">: gql "TypedNestedGraphTypeSpecification"]
-
-graphTypeLikeGraph :: Binding
-graphTypeLikeGraph = def "GraphTypeLikeGraph" $
-  gql "GraphExpression"
-
-graphSource :: Binding
-graphSource = def "GraphSource" $
-  gql "GraphExpression"
-
-typedGraphTypeReference :: Binding
-typedGraphTypeReference = def "TypedGraphTypeReference" $
-  T.record [
-    "typed">: T.maybe $ gql "Typed",
-    "reference">: gql "GraphTypeReference"]
-
-typedNestedGraphTypeSpecification :: Binding
-typedNestedGraphTypeSpecification = def "TypedNestedGraphTypeSpecification" $
-  T.record [
-    "typed">: T.maybe $ gql "Typed",
-    "graph">: T.boolean,
-    "specification">: gql "NestedGraphTypeSpecification"]
-
-dropGraphStatement :: Binding
-dropGraphStatement = def "DropGraphStatement" $
-  T.record [
-    "ifExists">: T.boolean,
-    "parentAndName">: gql "CatalogGraphParentAndName"]
-
-createGraphTypeStatement :: Binding
-createGraphTypeStatement = def "CreateGraphTypeStatement" $
-  T.record [
-    "createOption">: gql "CreateGraphTypeOption",
-    "parentAndName">: gql "CatalogGraphTypeParentAndName",
-    "source">: gql "GraphTypeSource"]
-
-createGraphTypeOption :: Binding
-createGraphTypeOption = def "CreateGraphTypeOption" $
-  T.union [
-    "typeIfNotExists">: T.boolean,
-    "orReplace">: T.unit]
-
-graphTypeSource :: Binding
-graphTypeSource = def "GraphTypeSource" $
-  T.union [
-    "copyOf">: gql "CopyOfGraphType",
-    "likeGraph">: gql "GraphTypeLikeGraph",
-    "nestedSpecification">: gql "NestedGraphTypeSpecification"]
-
-copyOfGraphType :: Binding
-copyOfGraphType = def "CopyOfGraphType" $
-  gql "GraphTypeReference"
-
-dropGraphTypeStatement :: Binding
-dropGraphTypeStatement = def "DropGraphTypeStatement" $
-  T.record [
-    "ifExists">: T.boolean,
-    "parentAndName">: gql "CatalogGraphTypeParentAndName"]
-
-callCatalogModifyingProcedureStatement :: Binding
-callCatalogModifyingProcedureStatement = def "CallCatalogModifyingProcedureStatement" $
-  gql "CallProcedureStatement"
-
-linearDataModifyingStatement :: Binding
-linearDataModifyingStatement = def "LinearDataModifyingStatement" $
-  T.union [
-    "focused">: gql "FocusedLinearDataModifyingStatement",
-    "ambient">: gql "AmbientLinearDataModifyingStatement"]
-
-focusedLinearDataModifyingStatement :: Binding
-focusedLinearDataModifyingStatement = def "FocusedLinearDataModifyingStatement" $
-  T.union [
-    "simple">: gql "FocusedLinearDataModifyingStatementBody",
-    "nested">: gql "FocusedNestedDataModifyingProcedureSpecification"]
-
-focusedLinearDataModifyingStatementBody :: Binding
-focusedLinearDataModifyingStatementBody = def "FocusedLinearDataModifyingStatementBody" $
-  T.record [
-    "useGraph">: gql "UseGraphClause",
-    "simpleAccess">: gql "SimpleLinearDataAccessingStatement",
-    "primitiveResult">: T.maybe $ gql "PrimitiveResultStatement"]
-
-focusedNestedDataModifyingProcedureSpecification :: Binding
-focusedNestedDataModifyingProcedureSpecification = def "FocusedNestedDataModifyingProcedureSpecification" $
-  T.record [
-    "useGraph">: gql "UseGraphClause",
-    "nestedSpec">: gql "NestedDataModifyingProcedureSpecification"]
-
-ambientLinearDataModifyingStatement :: Binding
-ambientLinearDataModifyingStatement = def "AmbientLinearDataModifyingStatement" $
-  T.union [
-    "simple">: gql "AmbientLinearDataModifyingStatementBody",
-    "nested">: gql "NestedDataModifyingProcedureSpecification"]
-
-ambientLinearDataModifyingStatementBody :: Binding
-ambientLinearDataModifyingStatementBody = def "AmbientLinearDataModifyingStatementBody" $
-  T.record [
-    "simpleAccess">: gql "SimpleLinearDataAccessingStatement",
-    "primitiveResult">: T.maybe $ gql "PrimitiveResultStatement"]
-
-simpleLinearDataAccessingStatement :: Binding
-simpleLinearDataAccessingStatement = def "SimpleLinearDataAccessingStatement" $
-  nonemptyList $ gql "SimpleDataAccessingStatement"
-
-simpleDataAccessingStatement :: Binding
-simpleDataAccessingStatement = def "SimpleDataAccessingStatement" $
-  T.union [
-    "query">: gql "SimpleQueryStatement",
-    "modifying">: gql "SimpleDataModifyingStatement"]
-
-simpleDataModifyingStatement :: Binding
-simpleDataModifyingStatement = def "SimpleDataModifyingStatement" $
-  T.union [
-    "primitive">: gql "PrimitiveDataModifyingStatement",
-    "callProcedure">: gql "CallDataModifyingProcedureStatement"]
-
-primitiveDataModifyingStatement :: Binding
-primitiveDataModifyingStatement = def "PrimitiveDataModifyingStatement" $
-  T.union [
-    "insert">: gql "InsertStatement",
-    "set">: gql "SetStatement",
-    "remove">: gql "RemoveStatement",
-    "delete">: gql "DeleteStatement"]
-
-insertStatement :: Binding
-insertStatement = def "InsertStatement" $
-  gql "InsertGraphPattern"
-
-setStatement :: Binding
-setStatement = def "SetStatement" $
-  gql "SetItemList"
-
-setItemList :: Binding
-setItemList = def "SetItemList" $
-  nonemptyList $ gql "SetItem"
-
-setItem :: Binding
-setItem = def "SetItem" $
-  T.union [
-    "property">: gql "SetPropertyItem",
-    "allProperties">: gql "SetAllPropertiesItem",
-    "label">: gql "SetLabelItem"]
-
-setPropertyItem :: Binding
-setPropertyItem = def "SetPropertyItem" $
-  T.record [
-    "variable">: gql "BindingVariableReference",
-    "propertyName">: gql "PropertyName",
-    "value">: gql "ValueExpression"]
-
-setAllPropertiesItem :: Binding
-setAllPropertiesItem = def "SetAllPropertiesItem" $
-  T.record [
-    "variable">: gql "BindingVariableReference",
-    "properties">: T.maybe $ gql "PropertyKeyValuePairList"]
-
-setLabelItem :: Binding
-setLabelItem = def "SetLabelItem" $
-  T.record [
-    "variable">: gql "BindingVariableReference",
-    "isOrColon">: gql "IsOrColon",
-    "label">: gql "LabelName"]
-
-removeStatement :: Binding
-removeStatement = def "RemoveStatement" $
-  gql "RemoveItemList"
-
-removeItemList :: Binding
-removeItemList = def "RemoveItemList" $
-  nonemptyList $ gql "RemoveItem"
-
-removeItem :: Binding
-removeItem = def "RemoveItem" $
-  T.union [
-    "property">: gql "RemovePropertyItem",
-    "label">: gql "RemoveLabelItem"]
-
-removePropertyItem :: Binding
-removePropertyItem = def "RemovePropertyItem" $
-  T.record [
-    "variable">: gql "BindingVariableReference",
-    "propertyName">: gql "PropertyName"]
-
-removeLabelItem :: Binding
-removeLabelItem = def "RemoveLabelItem" $
-  T.record [
-    "variable">: gql "BindingVariableReference",
-    "isOrColon">: gql "IsOrColon",
-    "label">: gql "LabelName"]
-
-deleteStatement :: Binding
-deleteStatement = def "DeleteStatement" $
-  T.record [
-    "detach">: T.maybe $ gql "DetachOption",
-    "items">: gql "DeleteItemList"]
-
-detachOption :: Binding
-detachOption = def "DetachOption" $
-  T.enum [
-    "detach",
-    "noDetach"]
-
-deleteItemList :: Binding
-deleteItemList = def "DeleteItemList" $
-  nonemptyList $ gql "DeleteItem"
-
-deleteItem :: Binding
-deleteItem = def "DeleteItem" $
-  gql "ValueExpression"
-
-callDataModifyingProcedureStatement :: Binding
-callDataModifyingProcedureStatement = def "CallDataModifyingProcedureStatement" $
-  gql "CallProcedureStatement"
-
-compositeQueryStatement :: Binding
-compositeQueryStatement = def "CompositeQueryStatement" $
-  gql "CompositeQueryExpression"
-
-compositeQueryExpression :: Binding
-compositeQueryExpression = def "CompositeQueryExpression" $
-  T.union [
-    "simple">: gql "CompositeQueryExpressionConjunction",
-    "primary">: gql "CompositeQueryPrimary"]
-
-compositeQueryExpressionConjunction :: Binding
-compositeQueryExpressionConjunction = def "CompositeQueryExpressionConjunction" $
-  T.record [
-    "left">: gql "CompositeQueryExpression",
-    "conjunction">: gql "QueryConjunction",
-    "right">: gql "CompositeQueryPrimary"]
-
-queryConjunction :: Binding
-queryConjunction = def "QueryConjunction" $
-  T.union [
-    "setOperator">: gql "SetOperator",
-    "otherwise">: T.unit]
-
-setOperator :: Binding
-setOperator = def "SetOperator" $
-  T.record [
-    "operatorType">: gql "SetOperatorType",
-    "quantifier">: T.maybe $ gql "SetQuantifier"]
-
-setOperatorType :: Binding
-setOperatorType = def "SetOperatorType" $
-  T.enum ["union", "except", "intersect"]
-
-compositeQueryPrimary :: Binding
-compositeQueryPrimary = def "CompositeQueryPrimary" $
-  gql "LinearQueryStatement"
-
-linearQueryStatement :: Binding
-linearQueryStatement = def "LinearQueryStatement" $
-  T.union [
-    "focused">: gql "FocusedLinearQueryStatement",
-    "ambient">: gql "AmbientLinearQueryStatement"]
-
-focusedLinearQueryStatement :: Binding
-focusedLinearQueryStatement = def "FocusedLinearQueryStatement" $
-  T.union [
-    "parts">: gql "FocusedLinearQueryStatementPartsAndResult",
-    "primitive">: gql "FocusedPrimitiveResultStatement",
-    "nested">: gql "FocusedNestedQuerySpecification",
-    "select">: gql "SelectStatement"]
-
-focusedLinearQueryStatementPartsAndResult :: Binding
-focusedLinearQueryStatementPartsAndResult = def "FocusedLinearQueryStatementPartsAndResult" $
-  T.record [
-    "parts">: T.list $ gql "FocusedLinearQueryStatementPart",
-    "result">: gql "FocusedLinearQueryAndPrimitiveResultStatementPart"]
-
-focusedLinearQueryStatementPart :: Binding
-focusedLinearQueryStatementPart = def "FocusedLinearQueryStatementPart" $
-  T.record [
-    "useGraph">: gql "UseGraphClause",
-    "simple">: gql "SimpleLinearQueryStatement"]
-
-focusedLinearQueryAndPrimitiveResultStatementPart :: Binding
-focusedLinearQueryAndPrimitiveResultStatementPart = def "FocusedLinearQueryAndPrimitiveResultStatementPart" $
-  T.record [
-    "useGraph">: gql "UseGraphClause",
-    "simple">: gql "SimpleLinearQueryStatement",
-    "primitiveResult">: gql "PrimitiveResultStatement"]
-
-focusedPrimitiveResultStatement :: Binding
-focusedPrimitiveResultStatement = def "FocusedPrimitiveResultStatement" $
-  T.record [
-    "useGraph">: gql "UseGraphClause",
-    "primitiveResult">: gql "PrimitiveResultStatement"]
-
-focusedNestedQuerySpecification :: Binding
-focusedNestedQuerySpecification = def "FocusedNestedQuerySpecification" $
-  T.record [
-    "useGraph">: gql "UseGraphClause",
-    "nested">: gql "NestedQuerySpecification"]
-
-ambientLinearQueryStatement :: Binding
-ambientLinearQueryStatement = def "AmbientLinearQueryStatement" $
-  T.union [
-    "simple">: gql "AmbientLinearQueryStatementSimpleAndPrimitiveResult",
-    "nested">: gql "NestedQuerySpecification"]
-
-ambientLinearQueryStatementSimpleAndPrimitiveResult :: Binding
-ambientLinearQueryStatementSimpleAndPrimitiveResult = def "AmbientLinearQueryStatementSimpleAndPrimitiveResult" $
-  T.record [
-    "simple">: T.maybe $ gql "SimpleLinearQueryStatement",
-    "primitiveResult">: gql "PrimitiveResultStatement"]
-
-simpleLinearQueryStatement :: Binding
-simpleLinearQueryStatement = def "SimpleLinearQueryStatement" $
-  nonemptyList $ gql "SimpleQueryStatement"
-
-simpleQueryStatement :: Binding
-simpleQueryStatement = def "SimpleQueryStatement" $
-  T.union [
-    "primitive">: gql "PrimitiveQueryStatement",
-    "call">: gql "CallQueryStatement"]
-
-primitiveQueryStatement :: Binding
-primitiveQueryStatement = def "PrimitiveQueryStatement" $
-  T.union [
-    "match">: gql "MatchStatement",
-    "let">: gql "LetStatement",
-    "for">: gql "ForStatement",
-    "filter">: gql "FilterStatement",
-    "orderByAndPage">: gql "OrderByAndPageStatement"]
-
-matchStatement :: Binding
-matchStatement = def "MatchStatement" $
-  T.union [
-    "simple">: gql "SimpleMatchStatement",
-    "optional">: gql "OptionalMatchStatement"]
-
-simpleMatchStatement :: Binding
-simpleMatchStatement = def "SimpleMatchStatement" $
-  gql "GraphPatternBindingTable"
-
-optionalMatchStatement :: Binding
-optionalMatchStatement = def "OptionalMatchStatement" $
-  gql "OptionalOperand"
-
-optionalOperand :: Binding
-optionalOperand = def "OptionalOperand" $
-  T.union [
-    "simple">: gql "SimpleMatchStatement",
-    "braceBlock">: gql "MatchStatementBlock",
-    "parenBlock">: gql "MatchStatementBlock"]
-
-matchStatementBlock :: Binding
-matchStatementBlock = def "MatchStatementBlock" $
-  nonemptyList $ gql "MatchStatement"
-
-callQueryStatement :: Binding
-callQueryStatement = def "CallQueryStatement" $
-  gql "CallProcedureStatement"
-
-filterStatement :: Binding
-filterStatement = def "FilterStatement" $
-  T.union [
-    "whereClause">: gql "WhereClause",
-    "searchCondition">: gql "SearchCondition"]
-
-letStatement :: Binding
-letStatement = def "LetStatement" $
-  gql "LetVariableDefinitionList"
-
-letVariableDefinitionList :: Binding
-letVariableDefinitionList = def "LetVariableDefinitionList" $
-  nonemptyList $ gql "LetVariableDefinition"
-
-letVariableDefinition :: Binding
-letVariableDefinition = def "LetVariableDefinition" $
-  T.union [
-    "valueVariable">: gql "ValueVariableDefinition",
-    "bindingEqualsValue">: gql "BindingEqualsValue"]
-
-bindingEqualsValue :: Binding
-bindingEqualsValue = def "BindingEqualsValue" $
-  T.record [
-    "binding">: gql "BindingVariable",
-    "value">: gql "ValueExpression"]
-
-forStatement :: Binding
-forStatement = def "ForStatement" $
-  T.record [
-    "item">: gql "ForItem",
-    "ordinalityOrOffset">: T.maybe $ gql "ForOrdinalityOrOffset"]
-
-forItem :: Binding
-forItem = def "ForItem" $
-  T.record [
-    "alias">: gql "ForItemAlias",
-    "source">: gql "ForItemSource"]
-
-forItemAlias :: Binding
-forItemAlias = def "ForItemAlias" $
-  gql "BindingVariable"
-
-forItemSource :: Binding
-forItemSource = def "ForItemSource" $
-  gql "ValueExpression"
-
-forOrdinalityOrOffset :: Binding
-forOrdinalityOrOffset = def "ForOrdinalityOrOffset" $
-  T.record [
-    "type">: gql "OrdinalityOrOffsetType",
-    "variable">: gql "BindingVariable"]
-
-ordinalityOrOffsetType :: Binding
-ordinalityOrOffsetType = def "OrdinalityOrOffsetType" $
-  T.enum ["ordinality", "offset"]
-
-orderByAndPageStatement :: Binding
-orderByAndPageStatement = def "OrderByAndPageStatement" $
-  T.union [
-    "orderByAndOptionalOffsetAndLimit">: gql "OrderByAndOptionalOffsetAndLimit",
-    "offsetAndOptionalLimit">: gql "OffsetAndOptionalLimit",
-    "limitOnly">: gql "LimitClause"]
-
-orderByAndOptionalOffsetAndLimit :: Binding
-orderByAndOptionalOffsetAndLimit = def "OrderByAndOptionalOffsetAndLimit" $
-  T.record [
-    "orderBy">: gql "OrderByClause",
-    "offset">: T.maybe $ gql "OffsetClause",
-    "limit">: T.maybe $ gql "LimitClause"]
-
-offsetAndOptionalLimit :: Binding
-offsetAndOptionalLimit = def "OffsetAndOptionalLimit" $
-  T.record [
-    "offset">: gql "OffsetClause",
-    "limit">: T.maybe $ gql "LimitClause"]
-
-primitiveResultStatement :: Binding
-primitiveResultStatement = def "PrimitiveResultStatement" $
-  T.union [
-    "returnAndOptionalOrderBy">: gql "ReturnAndOptionalOrderByAndPage",
-    "finish">: T.unit]
-
-returnAndOptionalOrderByAndPage :: Binding
-returnAndOptionalOrderByAndPage = def "ReturnAndOptionalOrderByAndPage" $
-  T.record [
-    "return">: gql "ReturnStatement",
-    "orderByAndPage">: T.maybe $ gql "OrderByAndPageStatement"]
-
-returnStatement :: Binding
-returnStatement = def "ReturnStatement" $
-  gql "ReturnStatementBody"
-
-returnStatementBody :: Binding
-returnStatementBody = def "ReturnStatementBody" $
-  T.union [
-    "items">: gql "ReturnItemsAndGroupBy",
-    "noBindings">: T.unit]
-
-returnItemsAndGroupBy :: Binding
-returnItemsAndGroupBy = def "ReturnItemsAndGroupBy" $
-  T.record [
-    "quantifier">: T.maybe $ gql "SetQuantifier",
-    "items">: gql "ReturnItems",
-    "groupBy">: T.maybe $ gql "GroupByClause"]
-
-returnItems :: Binding
-returnItems = def "ReturnItems" $
-  T.union [
-    "asterisk">: T.unit,
-    "itemList">: gql "ReturnItemList"]
-
-returnItemList :: Binding
-returnItemList = def "ReturnItemList" $
-  nonemptyList $ gql "ReturnItem"
-
-returnItem :: Binding
-returnItem = def "ReturnItem" $
-  T.record [
-    "expression">: gql "AggregatingValueExpression",
-    "alias">: T.maybe $ gql "ReturnItemAlias"]
-
-returnItemAlias :: Binding
-returnItemAlias = def "ReturnItemAlias" $
-  T.string
-
-selectStatement :: Binding
-selectStatement = def "SelectStatement" $
-  T.record [
-    "quantifier">: T.maybe $ gql "SetQuantifier",
-    "items">: gql "SelectItems",
-    "body">: T.maybe $ gql "SelectStatementBodyAndClauses"]
-
-selectItems :: Binding
-selectItems = def "SelectItems" $
-  T.union [
-    "asterisk">: T.unit,
-    "itemList">: gql "SelectItemList"]
-
-selectStatementBodyAndClauses :: Binding
-selectStatementBodyAndClauses = def "SelectStatementBodyAndClauses" $
-  T.record [
-    "body">: gql "SelectStatementBody",
-    "where">: T.maybe $ gql "WhereClause",
-    "groupBy">: T.maybe $ gql "GroupByClause",
-    "having">: T.maybe $ gql "HavingClause",
-    "orderBy">: T.maybe $ gql "OrderByClause",
-    "offset">: T.maybe $ gql "OffsetClause",
-    "limit">: T.maybe $ gql "LimitClause"]
-
-selectItemList :: Binding
-selectItemList = def "SelectItemList" $
-  nonemptyList $ gql "SelectItem"
-
-selectItem :: Binding
-selectItem = def "SelectItem" $
-  T.record [
-    "expression">: gql "AggregatingValueExpression",
-    "alias">: T.maybe $ gql "SelectItemAlias"]
-
-selectItemAlias :: Binding
-selectItemAlias = def "SelectItemAlias" $
-  T.string
-
-havingClause :: Binding
-havingClause = def "HavingClause" $
-  gql "SearchCondition"
-
-selectStatementBody :: Binding
-selectStatementBody = def "SelectStatementBody" $
-  T.union [
-    "graphMatchList">: gql "SelectGraphMatchList",
-    "querySpecification">: gql "SelectQuerySpecification"]
-
-selectGraphMatchList :: Binding
-selectGraphMatchList = def "SelectGraphMatchList" $
-  nonemptyList $ gql "SelectGraphMatch"
-
-selectGraphMatch :: Binding
-selectGraphMatch = def "SelectGraphMatch" $
-  T.record [
-    "graphExpression">: gql "GraphExpression",
-    "matchStatement">: gql "MatchStatement"]
-
-selectQuerySpecification :: Binding
-selectQuerySpecification = def "SelectQuerySpecification" $
-  T.union [
-    "nested">: gql "NestedQuerySpecification",
-    "graphAndNested">: gql "GraphAndNestedQuerySpecification"]
-
-graphAndNestedQuerySpecification :: Binding
-graphAndNestedQuerySpecification = def "GraphAndNestedQuerySpecification" $
-  T.record [
-    "graphExpression">: gql "GraphExpression",
-    "nested">: gql "NestedQuerySpecification"]
-
-callProcedureStatement :: Binding
-callProcedureStatement = def "CallProcedureStatement" $
-  T.record [
-    "optional">: T.boolean,
-    "call">: gql "ProcedureCall"]
-
-procedureCall :: Binding
-procedureCall = def "ProcedureCall" $
-  T.union [
-    "inline">: gql "InlineProcedureCall",
-    "named">: gql "NamedProcedureCall"]
-
-inlineProcedureCall :: Binding
-inlineProcedureCall = def "InlineProcedureCall" $
-  T.record [
-    "scope">: T.maybe $ gql "VariableScopeClause",
-    "nested">: gql "NestedProcedureSpecification"]
-
-variableScopeClause :: Binding
-variableScopeClause = def "VariableScopeClause" $
-  T.maybe $ gql "BindingVariableReferenceList"
-
-bindingVariableReferenceList :: Binding
-bindingVariableReferenceList = def "BindingVariableReferenceList" $
-  nonemptyList $ gql "BindingVariableReference"
-
-namedProcedureCall :: Binding
-namedProcedureCall = def "NamedProcedureCall" $
-  T.record [
-    "reference">: gql "ProcedureReference",
-    "arguments">: T.maybe $ gql "ProcedureArgumentList",
-    "yield">: T.maybe $ gql "YieldClause"]
-
-procedureArgumentList :: Binding
-procedureArgumentList = def "ProcedureArgumentList" $
-  nonemptyList $ gql "ProcedureArgument"
-
-procedureArgument :: Binding
-procedureArgument = def "ProcedureArgument" $
-  gql "ValueExpression"
-
-atSchemaClause :: Binding
-atSchemaClause = def "AtSchemaClause" $
-  gql "SchemaReference"
-
-useGraphClause :: Binding
-useGraphClause = def "UseGraphClause" $
-  gql "GraphExpression"
-
-graphPatternBindingTable :: Binding
-graphPatternBindingTable = def "GraphPatternBindingTable" $
-  T.record [
-    "pattern">: gql "GraphPattern",
-    "yieldClause">: T.maybe $ gql "GraphPatternYieldClause"]
-
-graphPatternYieldClause :: Binding
-graphPatternYieldClause = def "GraphPatternYieldClause" $
-  gql "GraphPatternYieldItemList"
-
-graphPatternYieldItemList :: Binding
-graphPatternYieldItemList = def "GraphPatternYieldItemList" $
-  T.union [
-    "items">: nonemptyList $ gql "GraphPatternYieldItem",
-    "noBindings">: T.unit]
-
-graphPatternYieldItem :: Binding
-graphPatternYieldItem = def "GraphPatternYieldItem" $
-  gql "BindingVariableReference"
-
-graphPattern :: Binding
-graphPattern = def "GraphPattern" $
-  T.record [
-    "matchMode">: T.maybe $ gql "MatchMode",
-    "pathPatterns">: gql "PathPatternList",
-    "keepClause">: T.maybe $ gql "KeepClause",
-    "whereClause">: T.maybe $ gql "GraphPatternWhereClause"]
-
-matchMode :: Binding
-matchMode = def "MatchMode" $
-  T.union [
-    "repeatableElements">: gql "RepeatableElementsMatchMode",
-    "differentEdges">: gql "DifferentEdgesMatchMode"]
-
-repeatableElementsMatchMode :: Binding
-repeatableElementsMatchMode = def "RepeatableElementsMatchMode" $
-  gql "ElementBindingsOrElements"
-
-differentEdgesMatchMode :: Binding
-differentEdgesMatchMode = def "DifferentEdgesMatchMode" $
-  gql "EdgeBindingsOrEdges"
-
-elementBindingsOrElements :: Binding
-elementBindingsOrElements = def "ElementBindingsOrElements" $
-  T.union [
-    "elementBindings">: T.boolean,
-    "elements">: T.unit]
-
-edgeBindingsOrEdges :: Binding
-edgeBindingsOrEdges = def "EdgeBindingsOrEdges" $
-  T.union [
-    "edgeBindings">: T.boolean,
-    "edges">: T.unit]
-
-pathPatternList :: Binding
-pathPatternList = def "PathPatternList" $
-  nonemptyList $ gql "PathPattern"
-
-pathPattern :: Binding
-pathPattern = def "PathPattern" $
-  T.record [
-    "variableDeclaration">: T.maybe $ gql "PathVariableDeclaration",
-    "prefix">: T.maybe $ gql "PathPatternPrefix",
-    "expression">: gql "PathPatternExpression"]
-
-pathVariableDeclaration :: Binding
-pathVariableDeclaration = def "PathVariableDeclaration" $
-  gql "PathVariable"
-
-keepClause :: Binding
-keepClause = def "KeepClause" $
-  gql "PathPatternPrefix"
-
-graphPatternWhereClause :: Binding
-graphPatternWhereClause = def "GraphPatternWhereClause" $
-  gql "SearchCondition"
-
-insertGraphPattern :: Binding
-insertGraphPattern = def "InsertGraphPattern" $
-  gql "InsertPathPatternList"
-
-insertPathPatternList :: Binding
-insertPathPatternList = def "InsertPathPatternList" $
-  nonemptyList $ gql "InsertPathPattern"
-
-insertPathPattern :: Binding
-insertPathPattern = def "InsertPathPattern" $
-  T.record [
-    "startNode">: gql "InsertNodePattern",
-    "edgesAndNodes">: T.list $ gql "InsertEdgeAndNode"]
-
-insertEdgeAndNode :: Binding
-insertEdgeAndNode = def "InsertEdgeAndNode" $
-  T.record [
-    "edge">: gql "InsertEdgePattern",
-    "node">: gql "InsertNodePattern"]
-
-insertNodePattern :: Binding
-insertNodePattern = def "InsertNodePattern" $
-  T.maybe $ gql "InsertElementPatternFiller"
-
-insertEdgePattern :: Binding
-insertEdgePattern = def "InsertEdgePattern" $
-  T.union [
-    "pointingLeft">: gql "InsertEdgePointingLeft",
-    "pointingRight">: gql "InsertEdgePointingRight",
-    "undirected">: gql "InsertEdgeUndirected"]
-
-insertEdgePointingLeft :: Binding
-insertEdgePointingLeft = def "InsertEdgePointingLeft" $
-  T.maybe $ gql "InsertElementPatternFiller"
-
-insertEdgePointingRight :: Binding
-insertEdgePointingRight = def "InsertEdgePointingRight" $
-  T.maybe $ gql "InsertElementPatternFiller"
-
-insertEdgeUndirected :: Binding
-insertEdgeUndirected = def "InsertEdgeUndirected" $
-  T.maybe $ gql "InsertElementPatternFiller"
-
-insertElementPatternFiller :: Binding
-insertElementPatternFiller = def "InsertElementPatternFiller" $
-  T.record [
-    "variableDeclaration">: T.maybe $ gql "ElementVariableDeclaration",
-    "labelAndProperties">: T.maybe $ gql "LabelAndPropertySetSpecification"]
-
-labelAndPropertySetSpecification :: Binding
-labelAndPropertySetSpecification = def "LabelAndPropertySetSpecification" $
-  T.record [
-    "isOrColon">: T.maybe $ gql "IsOrColon",
-    "labelSet">: T.maybe $ gql "LabelSetSpecification",
-    "propertySpecification">: T.maybe $ gql "ElementPropertySpecification"]
-
-pathPatternPrefix :: Binding
-pathPatternPrefix = def "PathPatternPrefix" $
-  T.union [
-    "modePrefix">: gql "PathModePrefix",
-    "searchPrefix">: gql "PathSearchPrefix"]
-
-pathModePrefix :: Binding
-pathModePrefix = def "PathModePrefix" $
-  T.record [
-    "mode">: gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths"]
-
-pathMode :: Binding
-pathMode = def "PathMode" $
-  T.enum ["walk", "trail", "simple", "acyclic"]
-
-pathSearchPrefix :: Binding
-pathSearchPrefix = def "PathSearchPrefix" $
-  T.union [
-    "all">: gql "AllPathSearch",
-    "any">: gql "AnyPathSearch",
-    "shortest">: gql "ShortestPathSearch"]
-
-allPathSearch :: Binding
-allPathSearch = def "AllPathSearch" $
-  T.record [
-    "mode">: T.maybe $ gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths"]
-
-pathOrPaths :: Binding
-pathOrPaths = def "PathOrPaths" $
-  T.enum ["path", "paths"]
-
-anyPathSearch :: Binding
-anyPathSearch = def "AnyPathSearch" $
-  T.record [
-    "numberOfPaths">: T.maybe $ gql "NumberOfPaths",
-    "mode">: T.maybe $ gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths"]
-
-numberOfPaths :: Binding
-numberOfPaths = def "NumberOfPaths" $
-  gql "NonNegativeIntegerSpecification"
-
-shortestPathSearch :: Binding
-shortestPathSearch = def "ShortestPathSearch" $
-  T.union [
-    "allShortest">: gql "AllShortestPathSearch",
-    "anyShortest">: gql "AnyShortestPathSearch",
-    "countedShortest">: gql "CountedShortestPathSearch",
-    "countedShortestGroup">: gql "CountedShortestGroupSearch"]
-
-allShortestPathSearch :: Binding
-allShortestPathSearch = def "AllShortestPathSearch" $
-  T.record [
-    "mode">: T.maybe $ gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths"]
-
-anyShortestPathSearch :: Binding
-anyShortestPathSearch = def "AnyShortestPathSearch" $
-  T.record [
-    "mode">: T.maybe $ gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths"]
-
-countedShortestPathSearch :: Binding
-countedShortestPathSearch = def "CountedShortestPathSearch" $
-  T.record [
-    "numberOfPaths">: gql "NumberOfPaths",
-    "mode">: T.maybe $ gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths"]
-
-countedShortestGroupSearch :: Binding
-countedShortestGroupSearch = def "CountedShortestGroupSearch" $
-  T.record [
-    "numberOfGroups">: T.maybe $ gql "NumberOfGroups",
-    "mode">: T.maybe $ gql "PathMode",
-    "orPaths">: T.maybe $ gql "PathOrPaths",
-    "groups">: T.boolean]
-
-numberOfGroups :: Binding
-numberOfGroups = def "NumberOfGroups" $
-  gql "NonNegativeIntegerSpecification"
-
-pathPatternExpression :: Binding
-pathPatternExpression = def "PathPatternExpression" $
-  T.union [
-    "term">: gql "PathTerm",
-    "multisetAlternation">: nonemptyList $ gql "PathTerm",
-    "patternUnion">: nonemptyList $ gql "PathTerm"]
-
-pathTerm :: Binding
-pathTerm = def "PathTerm" $
-  nonemptyList $ gql "PathFactor"
-
-pathFactor :: Binding
-pathFactor = def "PathFactor" $
-  T.union [
-    "primary">: gql "PathPrimary",
-    "quantifiedPrimary">: gql "QuantifiedPathPrimary",
-    "questionedPrimary">: gql "QuestionedPathPrimary"]
-
-quantifiedPathPrimary :: Binding
-quantifiedPathPrimary = def "QuantifiedPathPrimary" $
-  T.record [
-    "primary">: gql "PathPrimary",
-    "quantifier">: gql "GraphPatternQuantifier"]
-
-questionedPathPrimary :: Binding
-questionedPathPrimary = def "QuestionedPathPrimary" $
-  gql "PathPrimary"
-
-pathPrimary :: Binding
-pathPrimary = def "PathPrimary" $
-  T.union [
-    "elementPattern">: gql "ElementPattern",
-    "parenthesizedExpression">: gql "ParenthesizedPathPatternExpression",
-    "simplifiedExpression">: gql "SimplifiedPathPatternExpression"]
-
-elementPattern :: Binding
-elementPattern = def "ElementPattern" $
-  T.union [
-    "node">: gql "NodePattern",
-    "edge">: gql "EdgePattern"]
-
-nodePattern :: Binding
-nodePattern = def "NodePattern" $
-  gql "ElementPatternFiller"
-
-elementPatternFiller :: Binding
-elementPatternFiller = def "ElementPatternFiller" $
-  T.record [
-    "variableDeclaration">: T.maybe $ gql "ElementVariableDeclaration",
-    "isLabelExpression">: T.maybe $ gql "IsLabelExpression",
-    "predicate">: T.maybe $ gql "ElementPatternPredicate"]
-
-elementVariableDeclaration :: Binding
-elementVariableDeclaration = def "ElementVariableDeclaration" $
-  T.record [
-    "temp">: T.maybe T.boolean,
-    "variable">: gql "ElementVariable"]
-
-isLabelExpression :: Binding
-isLabelExpression = def "IsLabelExpression" $
-  T.record [
-    "isOrColon">: gql "IsOrColon",
-    "label">: gql "LabelExpression"]
-
-isOrColon :: Binding
-isOrColon = def "IsOrColon" $
-  T.enum ["is", "colon"]
-
-elementPatternPredicate :: Binding
-elementPatternPredicate = def "ElementPatternPredicate" $
-  T.union [
-    "whereClause">: gql "ElementPatternWhereClause",
-    "propertySpecification">: gql "ElementPropertySpecification"]
-
-elementPatternWhereClause :: Binding
-elementPatternWhereClause = def "ElementPatternWhereClause" $
-  gql "SearchCondition"
-
-elementPropertySpecification :: Binding
-elementPropertySpecification = def "ElementPropertySpecification" $
-  gql "PropertyKeyValuePairList"
-
-propertyKeyValuePairList :: Binding
-propertyKeyValuePairList = def "PropertyKeyValuePairList" $
-  nonemptyList $ gql "PropertyKeyValuePair"
-
-propertyKeyValuePair :: Binding
-propertyKeyValuePair = def "PropertyKeyValuePair" $
-  T.record [
-    "name">: gql "PropertyName",
-    "value">: gql "ValueExpression"]
-
-edgePattern :: Binding
-edgePattern = def "EdgePattern" $
-  T.union [
-    "fullEdge">: gql "FullEdgePattern",
-    "abbreviatedEdge">: gql "AbbreviatedEdgePattern"]
-
-fullEdgePattern :: Binding
-fullEdgePattern = def "FullEdgePattern" $
-  T.union [
-    "pointingLeft">: gql "FullEdgePointingLeft",
-    "undirected">: gql "FullEdgeUndirected",
-    "pointingRight">: gql "FullEdgePointingRight",
-    "leftOrUndirected">: gql "FullEdgeLeftOrUndirected",
-    "undirectedOrRight">: gql "FullEdgeUndirectedOrRight",
-    "leftOrRight">: gql "FullEdgeLeftOrRight",
-    "anyDirection">: gql "FullEdgeAnyDirection"]
-
-fullEdgePointingLeft :: Binding
-fullEdgePointingLeft = def "FullEdgePointingLeft" $
-  gql "ElementPatternFiller"
-
-fullEdgeUndirected :: Binding
-fullEdgeUndirected = def "FullEdgeUndirected" $
-  gql "ElementPatternFiller"
-
-fullEdgePointingRight :: Binding
-fullEdgePointingRight = def "FullEdgePointingRight" $
-  gql "ElementPatternFiller"
-
-fullEdgeLeftOrUndirected :: Binding
-fullEdgeLeftOrUndirected = def "FullEdgeLeftOrUndirected" $
-  gql "ElementPatternFiller"
-
-fullEdgeUndirectedOrRight :: Binding
-fullEdgeUndirectedOrRight = def "FullEdgeUndirectedOrRight" $
-  gql "ElementPatternFiller"
-
-fullEdgeLeftOrRight :: Binding
-fullEdgeLeftOrRight = def "FullEdgeLeftOrRight" $
-  gql "ElementPatternFiller"
-
-fullEdgeAnyDirection :: Binding
-fullEdgeAnyDirection = def "FullEdgeAnyDirection" $
-  gql "ElementPatternFiller"
-
-abbreviatedEdgePattern :: Binding
-abbreviatedEdgePattern = def "AbbreviatedEdgePattern" $
-  T.enum ["leftArrow", "tilde", "rightArrow", "leftArrowTilde", "tildeRightArrow", "leftMinusRight", "minusSign"]
-
-parenthesizedPathPatternExpression :: Binding
-parenthesizedPathPatternExpression = def "ParenthesizedPathPatternExpression" $
-  T.record [
-    "subpathDeclaration">: T.maybe $ gql "SubpathVariableDeclaration",
-    "pathMode">: T.maybe $ gql "PathModePrefix",
-    "expression">: gql "PathPatternExpression",
-    "whereClause">: T.maybe $ gql "ParenthesizedPathPatternWhereClause"]
-
-subpathVariableDeclaration :: Binding
-subpathVariableDeclaration = def "SubpathVariableDeclaration" $
-  gql "SubpathVariable"
-
-parenthesizedPathPatternWhereClause :: Binding
-parenthesizedPathPatternWhereClause = def "ParenthesizedPathPatternWhereClause" $
-  gql "SearchCondition"
-
-labelExpression :: Binding
-labelExpression = def "LabelExpression" $
-  T.union [
-    "negation">: gql "LabelExpression",
-    "conjunction">: gql "ConjunctionLabelExpression",
-    "disjunction">: gql "DisjunctionLabelExpression",
-    "name">: gql "LabelName",
-    "wildcard">: T.unit,
-    "parenthesized">: gql "LabelExpression"]
-
-conjunctionLabelExpression :: Binding
-conjunctionLabelExpression = def "ConjunctionLabelExpression" $
-  T.record [
-    "left">: gql "LabelExpression",
-    "right">: gql "LabelExpression"]
-
-disjunctionLabelExpression :: Binding
-disjunctionLabelExpression = def "DisjunctionLabelExpression" $
-  T.record [
-    "left">: gql "LabelExpression",
-    "right">: gql "LabelExpression"]
-
-pathVariableReference :: Binding
-pathVariableReference = def "PathVariableReference" $
-  gql "BindingVariableReference"
-
-elementVariableReference :: Binding
-elementVariableReference = def "ElementVariableReference" $
-  gql "BindingVariableReference"
-
-graphPatternQuantifier :: Binding
-graphPatternQuantifier = def "GraphPatternQuantifier" $
-  T.union [
-    "asterisk">: T.unit,
-    "plusSign">: T.unit,
-    "fixed">: gql "FixedQuantifier",
-    "general">: gql "GeneralQuantifier"]
-
-fixedQuantifier :: Binding
-fixedQuantifier = def "FixedQuantifier" $
-  gql "UnsignedInteger"
-
-generalQuantifier :: Binding
-generalQuantifier = def "GeneralQuantifier" $
-  T.record [
-    "lowerBound">: T.maybe $ gql "LowerBound",
-    "upperBound">: T.maybe $ gql "UpperBound"]
-
-lowerBound :: Binding
-lowerBound = def "LowerBound" $
-  gql "UnsignedInteger"
-
-upperBound :: Binding
-upperBound = def "UpperBound" $
-  gql "UnsignedInteger"
-
-simplifiedPathPatternExpression :: Binding
-simplifiedPathPatternExpression = def "SimplifiedPathPatternExpression" $
-  T.union [
-    "left">: gql "SimplifiedDefaultingLeft",
-    "undirected">: gql "SimplifiedDefaultingUndirected",
-    "right">: gql "SimplifiedDefaultingRight",
-    "leftOrUndirected">: gql "SimplifiedDefaultingLeftOrUndirected",
-    "undirectedOrRight">: gql "SimplifiedDefaultingUndirectedOrRight",
-    "leftOrRight">: gql "SimplifiedDefaultingLeftOrRight",
-    "anyDirection">: gql "SimplifiedDefaultingAnyDirection"]
-
-simplifiedDefaultingLeft :: Binding
-simplifiedDefaultingLeft = def "SimplifiedDefaultingLeft" $
-  gql "SimplifiedContents"
-
-simplifiedDefaultingUndirected :: Binding
-simplifiedDefaultingUndirected = def "SimplifiedDefaultingUndirected" $
-  gql "SimplifiedContents"
-
-simplifiedDefaultingRight :: Binding
-simplifiedDefaultingRight = def "SimplifiedDefaultingRight" $
-  gql "SimplifiedContents"
-
-simplifiedDefaultingLeftOrUndirected :: Binding
-simplifiedDefaultingLeftOrUndirected = def "SimplifiedDefaultingLeftOrUndirected" $
-  gql "SimplifiedContents"
-
-simplifiedDefaultingUndirectedOrRight :: Binding
-simplifiedDefaultingUndirectedOrRight = def "SimplifiedDefaultingUndirectedOrRight" $
-  gql "SimplifiedContents"
-
-simplifiedDefaultingLeftOrRight :: Binding
-simplifiedDefaultingLeftOrRight = def "SimplifiedDefaultingLeftOrRight" $
-  gql "SimplifiedContents"
-
-simplifiedDefaultingAnyDirection :: Binding
-simplifiedDefaultingAnyDirection = def "SimplifiedDefaultingAnyDirection" $
-  gql "SimplifiedContents"
-
-simplifiedContents :: Binding
-simplifiedContents = def "SimplifiedContents" $
-  T.union [
-    "term">: gql "SimplifiedTerm",
-    "pathUnion">: gql "SimplifiedPathUnion",
-    "multisetAlternation">: gql "SimplifiedMultisetAlternation"]
-
-simplifiedPathUnion :: Binding
-simplifiedPathUnion = def "SimplifiedPathUnion" $
-  nonemptyList $ gql "SimplifiedTerm"
-
-simplifiedMultisetAlternation :: Binding
-simplifiedMultisetAlternation = def "SimplifiedMultisetAlternation" $
-  nonemptyList $ gql "SimplifiedTerm"
-
-simplifiedTerm :: Binding
-simplifiedTerm = def "SimplifiedTerm" $
-  T.union [
-    "factorLow">: gql "SimplifiedFactorLow",
-    "concatenation">: gql "SimplifiedConcatenation"]
-
-simplifiedConcatenation :: Binding
-simplifiedConcatenation = def "SimplifiedConcatenation" $
-  T.record [
-    "initialTerm">: gql "SimplifiedTerm",
-    "nextFactor">: gql "SimplifiedFactorLow"]
-
-simplifiedFactorLow :: Binding
-simplifiedFactorLow = def "SimplifiedFactorLow" $
-  T.union [
-    "factorHigh">: gql "SimplifiedFactorHigh",
-    "conjunction">: gql "SimplifiedConjunction"]
-
-simplifiedConjunction :: Binding
-simplifiedConjunction = def "SimplifiedConjunction" $
-  T.record [
-    "left">: gql "SimplifiedFactorLow",
-    "right">: gql "SimplifiedFactorHigh"]
-
-simplifiedFactorHigh :: Binding
-simplifiedFactorHigh = def "SimplifiedFactorHigh" $
-  T.union [
-    "tertiary">: gql "SimplifiedTertiary",
-    "quantified">: gql "SimplifiedQuantified",
-    "questioned">: gql "SimplifiedQuestioned"]
-
-simplifiedQuantified :: Binding
-simplifiedQuantified = def "SimplifiedQuantified" $
-  T.record [
-    "tertiary">: gql "SimplifiedTertiary",
-    "quantifier">: gql "GraphPatternQuantifier"]
-
-simplifiedQuestioned :: Binding
-simplifiedQuestioned = def "SimplifiedQuestioned" $
-  gql "SimplifiedTertiary"
-
-simplifiedTertiary :: Binding
-simplifiedTertiary = def "SimplifiedTertiary" $
-  T.union [
-    "directionOverride">: gql "SimplifiedDirectionOverride",
-    "secondary">: gql "SimplifiedSecondary"]
-
-simplifiedDirectionOverride :: Binding
-simplifiedDirectionOverride = def "SimplifiedDirectionOverride" $
-  T.union [
-    "overrideLeft">: gql "SimplifiedOverrideLeft",
-    "overrideUndirected">: gql "SimplifiedOverrideUndirected",
-    "overrideRight">: gql "SimplifiedOverrideRight",
-    "overrideLeftOrUndirected">: gql "SimplifiedOverrideLeftOrUndirected",
-    "overrideUndirectedOrRight">: gql "SimplifiedOverrideUndirectedOrRight",
-    "overrideLeftOrRight">: gql "SimplifiedOverrideLeftOrRight",
-    "overrideAnyDirection">: gql "SimplifiedOverrideAnyDirection"]
-
-simplifiedOverrideLeft :: Binding
-simplifiedOverrideLeft = def "SimplifiedOverrideLeft" $
-  gql "SimplifiedSecondary"
-
-simplifiedOverrideUndirected :: Binding
-simplifiedOverrideUndirected = def "SimplifiedOverrideUndirected" $
-  gql "SimplifiedSecondary"
-
-simplifiedOverrideRight :: Binding
-simplifiedOverrideRight = def "SimplifiedOverrideRight" $
-  gql "SimplifiedSecondary"
-
-simplifiedOverrideLeftOrUndirected :: Binding
-simplifiedOverrideLeftOrUndirected = def "SimplifiedOverrideLeftOrUndirected" $
-  gql "SimplifiedSecondary"
-
-simplifiedOverrideUndirectedOrRight :: Binding
-simplifiedOverrideUndirectedOrRight = def "SimplifiedOverrideUndirectedOrRight" $
-  gql "SimplifiedSecondary"
-
-simplifiedOverrideLeftOrRight :: Binding
-simplifiedOverrideLeftOrRight = def "SimplifiedOverrideLeftOrRight" $
-  gql "SimplifiedSecondary"
-
-simplifiedOverrideAnyDirection :: Binding
-simplifiedOverrideAnyDirection = def "SimplifiedOverrideAnyDirection" $
-  gql "SimplifiedSecondary"
-
-simplifiedSecondary :: Binding
-simplifiedSecondary = def "SimplifiedSecondary" $
-  T.union [
-    "primary">: gql "SimplifiedPrimary",
-    "negation">: gql "SimplifiedNegation"]
-
-simplifiedNegation :: Binding
-simplifiedNegation = def "SimplifiedNegation" $
-  gql "SimplifiedPrimary"
-
-simplifiedPrimary :: Binding
-simplifiedPrimary = def "SimplifiedPrimary" $
-  T.union [
-    "labelName">: gql "LabelName",
-    "parenthesizedContents">: gql "SimplifiedContents"]
-
-whereClause :: Binding
-whereClause = def "WhereClause" $
-  gql "SearchCondition"
-
-yieldClause :: Binding
-yieldClause = def "YieldClause" $
-  gql "YieldItemList"
-
-yieldItemList :: Binding
-yieldItemList = def "YieldItemList" $
-  nonemptyList $ gql "YieldItem"
-
-yieldItem :: Binding
-yieldItem = def "YieldItem" $
-  T.record [
-    "name">: gql "YieldItemName",
-    "alias">: T.maybe $ gql "YieldItemAlias"]
-
-yieldItemName :: Binding
-yieldItemName = def "YieldItemName" $
-  gql "FieldName"
-
-yieldItemAlias :: Binding
-yieldItemAlias = def "YieldItemAlias" $
-  gql "BindingVariable"
-
-groupByClause :: Binding
-groupByClause = def "GroupByClause" $
-  gql "GroupingElementList"
-
-groupingElementList :: Binding
-groupingElementList = def "GroupingElementList" $
-  T.union [
-    "elements">: nonemptyList $ gql "GroupingElement",
-    "emptySet">: T.unit]
-
-groupingElement :: Binding
-groupingElement = def "GroupingElement" $
-  gql "BindingVariableReference"
-
-orderByClause :: Binding
-orderByClause = def "OrderByClause" $
-  gql "SortSpecificationList"
-
-sortSpecificationList :: Binding
-sortSpecificationList = def "SortSpecificationList" $
-  nonemptyList $ gql "SortSpecification"
-
-sortSpecification :: Binding
-sortSpecification = def "SortSpecification" $
-  T.record [
-    "sortKey">: gql "SortKey",
-    "ordering">: T.maybe $ gql "OrderingSpecification",
-    "nullOrdering">: T.maybe $ gql "NullOrdering"]
-
-sortKey :: Binding
-sortKey = def "SortKey" $
-  gql "AggregatingValueExpression"
-
-orderingSpecification :: Binding
-orderingSpecification = def "OrderingSpecification" $
-  T.enum ["ascending", "descending"]
-
-nullOrdering :: Binding
-nullOrdering = def "NullOrdering" $
-  T.enum ["nullsFirst", "nullsLast"]
-
-limitClause :: Binding
-limitClause = def "LimitClause" $
-  gql "NonNegativeIntegerSpecification"
-
-offsetClause :: Binding
-offsetClause = def "OffsetClause" $
-  T.record [
-    "synonym">: gql "OffsetSynonym",
-    "value">: gql "NonNegativeIntegerSpecification"]
-
-offsetSynonym :: Binding
-offsetSynonym = def "OffsetSynonym" $
-  T.enum ["offset", "skipReservedWord"]
-
-schemaReference :: Binding
-schemaReference = def "SchemaReference" $
-  T.union [
-    "absoluteReference">: gql "AbsoluteCatalogSchemaReference",
-    "relativeReference">: gql "RelativeCatalogSchemaReference",
-    "parameterSpecification">: gql "ReferenceParameterSpecification"]
-
-absoluteCatalogSchemaReference :: Binding
-absoluteCatalogSchemaReference = def "AbsoluteCatalogSchemaReference" $
-  T.union [
-    "root">: T.unit,
-    "directoryAndSchema">: gql "AbsoluteDirectoryAndSchema"]
-
-absoluteDirectoryAndSchema :: Binding
-absoluteDirectoryAndSchema = def "AbsoluteDirectoryAndSchema" $
-  T.record [
-    "directoryPath">: gql "AbsoluteDirectoryPath",
-    "schemaName">: gql "SchemaName"]
-
-catalogSchemaParentAndName :: Binding
-catalogSchemaParentAndName = def "CatalogSchemaParentAndName" $
-  gql "AbsoluteDirectoryAndSchema"
-
-relativeCatalogSchemaReference :: Binding
-relativeCatalogSchemaReference = def "RelativeCatalogSchemaReference" $
-  T.union [
-    "predefinedReference">: gql "PredefinedSchemaReference",
-    "directoryAndSchema">: gql "RelativeDirectoryAndSchema"]
-
-relativeDirectoryAndSchema :: Binding
-relativeDirectoryAndSchema = def "RelativeDirectoryAndSchema" $
-  T.record [
-    "directoryPath">: gql "RelativeDirectoryPath",
-    "schemaName">: gql "SchemaName"]
-
-predefinedSchemaReference :: Binding
-predefinedSchemaReference = def "PredefinedSchemaReference" $
-  T.enum ["homeSchema", "currentSchema", "period"]
-
-absoluteDirectoryPath :: Binding
-absoluteDirectoryPath = def "AbsoluteDirectoryPath" $
-  T.maybe $ gql "SimpleDirectoryPath"
-
-relativeDirectoryPath :: Binding
-relativeDirectoryPath = def "RelativeDirectoryPath" $
-  T.record [
-    "parentDirectories">: T.nonNegativeInt32,
-    "simplePath">: T.maybe $ gql "SimpleDirectoryPath"]
-
-simpleDirectoryPath :: Binding
-simpleDirectoryPath = def "SimpleDirectoryPath" $
-  nonemptyList $ gql "DirectoryName"
-
-graphReference :: Binding
-graphReference = def "GraphReference" $
-  T.union [
-    "parentAndGraphName">: gql "ParentAndGraphName",
-    "delimitedGraphName">: gql "DelimitedGraphName",
-    "homeGraph">: gql "HomeGraph",
-    "parameterSpecification">: gql "ReferenceParameterSpecification"]
-
-parentAndGraphName :: Binding
-parentAndGraphName = def "ParentAndGraphName" $
-  T.record [
-    "parentReference">: gql "CatalogObjectParentReference",
-    "graphName">: gql "GraphName"]
-
-catalogGraphParentAndName :: Binding
-catalogGraphParentAndName = def "CatalogGraphParentAndName" $
-  T.record [
-    "parentReference">: T.maybe $ gql "CatalogObjectParentReference",
-    "graphName">: gql "GraphName"]
-
-homeGraph :: Binding
-homeGraph = def "HomeGraph" $
-  T.enum ["homePropertyGraph", "homeGraph"]
-
-graphTypeReference :: Binding
-graphTypeReference = def "GraphTypeReference" $
-  T.union [
-    "parentAndTypeName">: gql "CatalogGraphTypeParentAndName",
-    "parameterSpecification">: gql "ReferenceParameterSpecification"]
-
-catalogGraphTypeParentAndName :: Binding
-catalogGraphTypeParentAndName = def "CatalogGraphTypeParentAndName" $
-  T.record [
-    "parentReference">: T.maybe $ gql "CatalogObjectParentReference",
-    "graphTypeName">: gql "GraphTypeName"]
-
-bindingTableReference :: Binding
-bindingTableReference = def "BindingTableReference" $
-  T.union [
-    "parentAndTableName">: gql "ParentAndTableName",
-    "delimitedBindingTableName">: gql "DelimitedBindingTableName",
-    "parameterSpecification">: gql "ReferenceParameterSpecification"]
-
-parentAndTableName :: Binding
-parentAndTableName = def "ParentAndTableName" $
-  T.record [
-    "parentReference">: gql "CatalogObjectParentReference",
-    "tableName">: gql "BindingTableName"]
-
-procedureReference :: Binding
-procedureReference = def "ProcedureReference" $
-  T.union [
-    "parentAndProcedureName">: gql "CatalogProcedureParentAndName",
-    "parameterSpecification">: gql "ReferenceParameterSpecification"]
-
-catalogProcedureParentAndName :: Binding
-catalogProcedureParentAndName = def "CatalogProcedureParentAndName" $
-  T.record [
-    "parentReference">: T.maybe $ gql "CatalogObjectParentReference",
-    "procedureName">: gql "ProcedureName"]
-
-catalogObjectParentReference :: Binding
-catalogObjectParentReference = def "CatalogObjectParentReference" $
-  T.union [
-    "schemaAndObjects">: gql "SchemaAndObjects",
-    "objectsOnly">: nonemptyList $ gql "ObjectName"]
-
-schemaAndObjects :: Binding
-schemaAndObjects = def "SchemaAndObjects" $
-  T.record [
-    "schemaReference">: gql "SchemaReference",
-    "objects">: T.list $ gql "ObjectName"]
-
-referenceParameterSpecification :: Binding
-referenceParameterSpecification = def "ReferenceParameterSpecification" $
-  T.unit
-
-nestedGraphTypeSpecification :: Binding
-nestedGraphTypeSpecification = def "NestedGraphTypeSpecification" $
-  gql "GraphTypeSpecificationBody"
-
-graphTypeSpecificationBody :: Binding
-graphTypeSpecificationBody = def "GraphTypeSpecificationBody" $
-  gql "ElementTypeList"
-
-elementTypeList :: Binding
-elementTypeList = def "ElementTypeList" $
-  nonemptyList $ gql "ElementTypeSpecification"
-
-elementTypeSpecification :: Binding
-elementTypeSpecification = def "ElementTypeSpecification" $
-  T.union [
-    "nodeType">: gql "NodeTypeSpecification",
-    "edgeType">: gql "EdgeTypeSpecification"]
-
-nodeTypeSpecification :: Binding
-nodeTypeSpecification = def "NodeTypeSpecification" $
-  T.union [
-    "pattern">: gql "NodeTypePattern",
-    "phrase">: gql "NodeTypePhrase"]
-
-nodeTypePattern :: Binding
-nodeTypePattern = def "NodeTypePattern" $
-  T.record [
-    "synonymAndTypeName">: T.maybe $ gql "NodeSynonymAndTypeName",
-    "alias">: T.maybe $ gql "LocalNodeTypeAlias",
-    "filler">: T.maybe $ gql "NodeTypeFiller"]
-
-nodeSynonymAndTypeName :: Binding
-nodeSynonymAndTypeName = def "NodeSynonymAndTypeName" $
-  T.record [
-    "nodeSynonym">: gql "NodeSynonym",
-    "typeName">: T.maybe $ gql "NodeTypeName"]
-
-nodeTypePhrase :: Binding
-nodeTypePhrase = def "NodeTypePhrase" $
-  T.record [
-    "synonym">: gql "NodeSynonym",
-    "typePhraseFiller">: gql "NodeTypePhraseFiller",
-    "alias">: T.maybe $ gql "LocalNodeTypeAlias"]
-
-nodeTypePhraseFiller :: Binding
-nodeTypePhraseFiller = def "NodeTypePhraseFiller" $
-  T.union [
-    "typeName">: gql "NodeTypeNameWithFiller",
-    "fillerOnly">: gql "NodeTypeFiller"]
-
-nodeTypeNameWithFiller :: Binding
-nodeTypeNameWithFiller = def "NodeTypeNameWithFiller" $
-  T.record [
-    "typeName">: gql "NodeTypeName",
-    "filler">: T.maybe $ gql "NodeTypeFiller"]
-
-nodeTypeFiller :: Binding
-nodeTypeFiller = def "NodeTypeFiller" $
-  T.union [
-    "keyLabelSet">: gql "NodeKeyLabelSetWithContent",
-    "impliedContent">: gql "NodeTypeImpliedContent"]
-
-nodeKeyLabelSetWithContent :: Binding
-nodeKeyLabelSetWithContent = def "NodeKeyLabelSetWithContent" $
-  T.record [
-    "keyLabelSet">: gql "NodeTypeKeyLabelSet",
-    "impliedContent">: T.maybe $ gql "NodeTypeImpliedContent"]
-
-localNodeTypeAlias :: Binding
-localNodeTypeAlias = def "LocalNodeTypeAlias" $
-  T.string
-
-nodeTypeImpliedContent :: Binding
-nodeTypeImpliedContent = def "NodeTypeImpliedContent" $
-  T.union [
-    "labelSet">: gql "NodeTypeLabelSet",
-    "propertyTypes">: gql "NodeTypePropertyTypes",
-    "labelSetWithProperties">: gql "NodeLabelSetWithProperties"]
-
-nodeLabelSetWithProperties :: Binding
-nodeLabelSetWithProperties = def "NodeLabelSetWithProperties" $
-  T.record [
-    "labelSet">: gql "NodeTypeLabelSet",
-    "propertyTypes">: gql "NodeTypePropertyTypes"]
-
-nodeTypeKeyLabelSet :: Binding
-nodeTypeKeyLabelSet = def "NodeTypeKeyLabelSet" $
-  T.maybe $ gql "LabelSetPhrase"
-
-nodeTypeLabelSet :: Binding
-nodeTypeLabelSet = def "NodeTypeLabelSet" $
-  gql "LabelSetPhrase"
-
-nodeTypePropertyTypes :: Binding
-nodeTypePropertyTypes = def "NodeTypePropertyTypes" $
-  gql "PropertyTypesSpecification"
-
-edgeTypeSpecification :: Binding
-edgeTypeSpecification = def "EdgeTypeSpecification" $
-  T.union [
-    "pattern">: gql "EdgeTypePattern",
-    "phrase">: gql "EdgeTypePhrase"]
-
-edgeTypePattern :: Binding
-edgeTypePattern = def "EdgeTypePattern" $
-  T.record [
-    "kindAndSynonym">: T.maybe $ gql "EdgeKindAndSynonym",
-    "patternType">: gql "EdgeTypePatternType"]
-
-edgeKindAndSynonym :: Binding
-edgeKindAndSynonym = def "EdgeKindAndSynonym" $
-  T.record [
-    "kind">: T.maybe $ gql "EdgeKind",
-    "synonym">: gql "EdgeSynonym",
-    "typeName">: T.maybe $ gql "EdgeTypeName"]
-
-edgeTypePatternType :: Binding
-edgeTypePatternType = def "EdgeTypePatternType" $
-  T.union [
-    "directed">: gql "EdgeTypePatternDirected",
-    "undirected">: gql "EdgeTypePatternUndirected"]
-
-edgeTypePhrase :: Binding
-edgeTypePhrase = def "EdgeTypePhrase" $
-  T.record [
-    "kind">: gql "EdgeKind",
-    "synonym">: gql "EdgeSynonym",
-    "typeNameAndFiller">: gql "EdgeTypePhraseFiller",
-    "endpointPair">: gql "EndpointPairPhrase"]
-
-edgeTypePhraseFiller :: Binding
-edgeTypePhraseFiller = def "EdgeTypePhraseFiller" $
-  T.union [
-    "typeNameWithFiller">: gql "EdgeTypeNameWithFiller",
-    "fillerOnly">: gql "EdgeTypeFiller"]
-
-edgeTypeNameWithFiller :: Binding
-edgeTypeNameWithFiller = def "EdgeTypeNameWithFiller" $
-  T.record [
-    "typeName">: gql "EdgeTypeName",
-    "filler">: T.maybe $ gql "EdgeTypeFiller"]
-
-edgeTypeFiller :: Binding
-edgeTypeFiller = def "EdgeTypeFiller" $
-  T.union [
-    "keyLabelSetWithContent">: gql "EdgeKeyLabelSetWithContent",
-    "impliedContent">: gql "EdgeTypeImpliedContent"]
-
-edgeKeyLabelSetWithContent :: Binding
-edgeKeyLabelSetWithContent = def "EdgeKeyLabelSetWithContent" $
-  T.record [
-    "keyLabelSet">: gql "EdgeTypeKeyLabelSet",
-    "impliedContent">: T.maybe $ gql "EdgeTypeImpliedContent"]
-
-edgeTypeImpliedContent :: Binding
-edgeTypeImpliedContent = def "EdgeTypeImpliedContent" $
-  T.union [
-    "labelSet">: gql "EdgeTypeLabelSet",
-    "propertyTypes">: gql "EdgeTypePropertyTypes",
-    "labelSetWithProperties">: gql "EdgeLabelSetWithProperties"]
-
-edgeLabelSetWithProperties :: Binding
-edgeLabelSetWithProperties = def "EdgeLabelSetWithProperties" $
-  T.record [
-    "labelSet">: gql "EdgeTypeLabelSet",
-    "propertyTypes">: gql "EdgeTypePropertyTypes"]
-
-edgeTypeKeyLabelSet :: Binding
-edgeTypeKeyLabelSet = def "EdgeTypeKeyLabelSet" $
-  T.maybe $ gql "LabelSetPhrase"
-
-edgeTypeLabelSet :: Binding
-edgeTypeLabelSet = def "EdgeTypeLabelSet" $
-  gql "LabelSetPhrase"
-
-edgeTypePropertyTypes :: Binding
-edgeTypePropertyTypes = def "EdgeTypePropertyTypes" $
-  gql "PropertyTypesSpecification"
-
-edgeTypePatternDirected :: Binding
-edgeTypePatternDirected = def "EdgeTypePatternDirected" $
-  T.union [
-    "pointingRight">: gql "EdgeTypePatternPointingRight",
-    "pointingLeft">: gql "EdgeTypePatternPointingLeft"]
-
-edgeTypePatternPointingRight :: Binding
-edgeTypePatternPointingRight = def "EdgeTypePatternPointingRight" $
-  T.record [
-    "source">: gql "SourceNodeTypeReference",
-    "arc">: gql "ArcTypePointingRight",
-    "destination">: gql "DestinationNodeTypeReference"]
-
-edgeTypePatternPointingLeft :: Binding
-edgeTypePatternPointingLeft = def "EdgeTypePatternPointingLeft" $
-  T.record [
-    "destination">: gql "DestinationNodeTypeReference",
-    "arc">: gql "ArcTypePointingLeft",
-    "source">: gql "SourceNodeTypeReference"]
-
-edgeTypePatternUndirected :: Binding
-edgeTypePatternUndirected = def "EdgeTypePatternUndirected" $
-  T.record [
-    "source">: gql "SourceNodeTypeReference",
-    "arc">: gql "ArcTypeUndirected",
-    "destination">: gql "DestinationNodeTypeReference"]
-
-arcTypePointingRight :: Binding
-arcTypePointingRight = def "ArcTypePointingRight" $
-  gql "EdgeTypeFiller"
-
-arcTypePointingLeft :: Binding
-arcTypePointingLeft = def "ArcTypePointingLeft" $
-  gql "EdgeTypeFiller"
-
-arcTypeUndirected :: Binding
-arcTypeUndirected = def "ArcTypeUndirected" $
-  gql "EdgeTypeFiller"
-
-sourceNodeTypeReference :: Binding
-sourceNodeTypeReference = def "SourceNodeTypeReference" $
-  T.union [
-    "alias">: gql "SourceNodeTypeAlias",
-    "filler">: T.maybe $ gql "NodeTypeFiller"]
-
-destinationNodeTypeReference :: Binding
-destinationNodeTypeReference = def "DestinationNodeTypeReference" $
-  T.union [
-    "alias">: gql "DestinationNodeTypeAlias",
-    "filler">: T.maybe $ gql "NodeTypeFiller"]
-
-edgeKind :: Binding
-edgeKind = def "EdgeKind" $
-  T.enum ["directed", "undirected"]
-
-endpointPairPhrase :: Binding
-endpointPairPhrase = def "EndpointPairPhrase" $
-  gql "EndpointPair"
-
-endpointPair :: Binding
-endpointPair = def "EndpointPair" $
-  T.union [
-    "directedPair">: gql "EndpointPairDirected",
-    "undirectedPair">: gql "EndpointPairUndirected"]
-
-endpointPairDirected :: Binding
-endpointPairDirected = def "EndpointPairDirected" $
-  T.union [
-    "pointingRight">: gql "EndpointPairPointingRight",
-    "pointingLeft">: gql "EndpointPairPointingLeft"]
-
-endpointPairPointingRight :: Binding
-endpointPairPointingRight = def "EndpointPairPointingRight" $
-  T.record [
-    "sourceAlias">: gql "SourceNodeTypeAlias",
-    "connector">: gql "ConnectorPointingRight",
-    "destinationAlias">: gql "DestinationNodeTypeAlias"]
-
-endpointPairPointingLeft :: Binding
-endpointPairPointingLeft = def "EndpointPairPointingLeft" $
-  T.record [
-    "destinationAlias">: gql "DestinationNodeTypeAlias",
-    "sourceAlias">: gql "SourceNodeTypeAlias"]
-
-endpointPairUndirected :: Binding
-endpointPairUndirected = def "EndpointPairUndirected" $
-  T.record [
-    "sourceAlias">: gql "SourceNodeTypeAlias",
-    "connector">: gql "ConnectorUndirected",
-    "destinationAlias">: gql "DestinationNodeTypeAlias"]
-
-connectorPointingRight :: Binding
-connectorPointingRight = def "ConnectorPointingRight" $
-  T.enum ["to", "rightArrow"]
-
-connectorUndirected :: Binding
-connectorUndirected = def "ConnectorUndirected" $
-  T.enum ["to", "tilde"]
-
-sourceNodeTypeAlias :: Binding
-sourceNodeTypeAlias = def "SourceNodeTypeAlias" $
-  T.string
-
-destinationNodeTypeAlias :: Binding
-destinationNodeTypeAlias = def "DestinationNodeTypeAlias" $
-  T.string
-
-labelSetPhrase :: Binding
-labelSetPhrase = def "LabelSetPhrase" $
-  T.union [
-    "singleLabel">: gql "LabelName",
-    "multipleLabels">: gql "LabelSetSpecification",
-    "isOrColonWithLabels">: gql "IsOrColonWithLabels"]
-
-isOrColonWithLabels :: Binding
-isOrColonWithLabels = def "IsOrColonWithLabels" $
-  T.record [
-    "isOrColon">: gql "IsOrColon",
-    "labels">: gql "LabelSetSpecification"]
-
-labelSetSpecification :: Binding
-labelSetSpecification = def "LabelSetSpecification" $
-  nonemptyList $ gql "LabelName"
-
-propertyTypesSpecification :: Binding
-propertyTypesSpecification = def "PropertyTypesSpecification" $
-  T.maybe $ gql "PropertyTypeList"
-
-propertyTypeList :: Binding
-propertyTypeList = def "PropertyTypeList" $
-  nonemptyList $ gql "PropertyType"
-
-propertyType :: Binding
-propertyType = def "PropertyType" $
-  T.record [
-    "name">: gql "PropertyName",
-    "typed">: T.maybe $ gql "Typed",
-    "valueType">: gql "PropertyValueType"]
-
-propertyValueType :: Binding
-propertyValueType = def "PropertyValueType" $
-  gql "ValueType"
-
-bindingTableType :: Binding
-bindingTableType = def "BindingTableType" $
-  T.record [
-    "binding">: T.boolean,
-    "fieldTypes">: gql "FieldTypesSpecification"]
-
-valueType :: Binding
-valueType = def "ValueType" $
-  T.union [
-    "predefinedType">: gql "PredefinedType",
-    "pathValueType">: gql "PathValueType",
-    "listValueTypeAlt1">: gql "ListValueTypeAlt1",
-    "listValueTypeAlt2">: gql "ListValueTypeAlt2",
-    "listValueTypeAlt3">: gql "ListValueTypeAlt3",
-    "recordType">: gql "RecordType",
-    "openDynamicUnionType">: gql "OpenDynamicUnionType",
-    "dynamicPropertyValueType">: gql "DynamicPropertyValueType",
-    "closedDynamicUnionTypeAlt1">: gql "ClosedDynamicUnionTypeAlt1",
-    "closedDynamicUnionTypeAlt2">: gql "ClosedDynamicUnionTypeAlt2"]
-
-listValueTypeAlt1 :: Binding
-listValueTypeAlt1 = def "ListValueTypeAlt1" $
-  T.record [
-    "typeName">: gql "ListValueTypeName",
-    "valueType">: gql "ValueType",
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-listValueTypeAlt2 :: Binding
-listValueTypeAlt2 = def "ListValueTypeAlt2" $
-  T.record [
-    "valueType">: gql "ValueType",
-    "typeName">: gql "ListValueTypeName",
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-listValueTypeAlt3 :: Binding
-listValueTypeAlt3 = def "ListValueTypeAlt3" $
-  T.record [
-    "typeName">: gql "ListValueTypeName",
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-openDynamicUnionType :: Binding
-openDynamicUnionType = def "OpenDynamicUnionType" $
-  T.record [
-    "value">: T.boolean,
-    "notNull">: T.boolean]
-
-dynamicPropertyValueType :: Binding
-dynamicPropertyValueType = def "DynamicPropertyValueType" $
-  T.record [
-    "any">: T.maybe T.boolean,
-    "property">: T.unit,
-    "value">: T.unit,
-    "notNull">: T.boolean]
-
-closedDynamicUnionTypeAlt1 :: Binding
-closedDynamicUnionTypeAlt1 = def "ClosedDynamicUnionTypeAlt1" $
-  T.record [
-    "anyValue">: T.maybe T.boolean,
-    "valueTypes">: nonemptyList $ gql "ValueType"]
-
-closedDynamicUnionTypeAlt2 :: Binding
-closedDynamicUnionTypeAlt2 = def "ClosedDynamicUnionTypeAlt2" $
-  T.record [
-    "valueTypes">: nonemptyList $ gql "ValueType"]
-
-typed :: Binding
-typed = def "Typed" $
-  T.unit
-
-predefinedType :: Binding
-predefinedType = def "PredefinedType" $
-  T.union [
-    "booleanType">: gql "BooleanType",
-    "characterStringType">: gql "CharacterStringType",
-    "byteStringType">: gql "ByteStringType",
-    "numericType">: gql "NumericType",
-    "temporalType">: gql "TemporalType",
-    "referenceValueType">: gql "ReferenceValueType",
-    "immaterialValueType">: gql "ImmaterialValueType"]
-
-booleanType :: Binding
-booleanType = def "BooleanType" $
-  T.record [
-    "notNull">: T.boolean]
-
-characterStringType :: Binding
-characterStringType = def "CharacterStringType" $
-  T.union [
-    "stringType">: gql "StringType",
-    "charType">: gql "CharType",
-    "varcharType">: gql "VarcharType"]
-
-stringType :: Binding
-stringType = def "StringType" $
-  T.record [
-    "minLength">: T.maybe $ gql "MinLength",
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-charType :: Binding
-charType = def "CharType" $
-  T.record [
-    "fixedLength">: T.maybe $ gql "FixedLength",
-    "notNull">: T.boolean]
-
-varcharType :: Binding
-varcharType = def "VarcharType" $
-  T.record [
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-byteStringType :: Binding
-byteStringType = def "ByteStringType" $
-  T.union [
-    "bytesType">: gql "BytesType",
-    "binaryType">: gql "BinaryType",
-    "varbinaryType">: gql "VarbinaryType"]
-
-bytesType :: Binding
-bytesType = def "BytesType" $
-  T.record [
-    "minLength">: T.maybe $ gql "MinLength",
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-binaryType :: Binding
-binaryType = def "BinaryType" $
-  T.record [
-    "fixedLength">: T.maybe $ gql "FixedLength",
-    "notNull">: T.boolean]
-
-varbinaryType :: Binding
-varbinaryType = def "VarbinaryType" $
-  T.record [
-    "maxLength">: T.maybe $ gql "MaxLength",
-    "notNull">: T.boolean]
-
-minLength :: Binding
-minLength = def "MinLength" $
-  gql "UnsignedInteger"
-
-fixedLength :: Binding
-fixedLength = def "FixedLength" $
-  gql "UnsignedInteger"
-
-maxLength :: Binding
-maxLength = def "MaxLength" $
-  gql "UnsignedInteger"
-
-numericType :: Binding
-numericType = def "NumericType" $
-  T.union [
-    "exact">: gql "ExactNumericType",
-    "approximate">: gql "ApproximateNumericType"]
-
-exactNumericType :: Binding
-exactNumericType = def "ExactNumericType" $
-  T.union [
-    "binary">: gql "BinaryExactNumericType",
-    "decimal">: gql "DecimalExactNumericType"]
-
-binaryExactNumericType :: Binding
-binaryExactNumericType = def "BinaryExactNumericType" $
-  T.union [
-    "signed">: gql "SignedBinaryExactNumericType",
-    "unsigned">: gql "UnsignedBinaryExactNumericType"]
-
-signedBinaryExactNumericType :: Binding
-signedBinaryExactNumericType = def "SignedBinaryExactNumericType" $
-  T.union [
-    "int8">: gql "Int8Type",
-    "int16">: gql "Int16Type",
-    "int32">: gql "Int32Type",
-    "int64">: gql "Int64Type",
-    "int128">: gql "Int128Type",
-    "int256">: gql "Int256Type",
-    "smallInt">: gql "SmallIntType",
-    "intWithPrecision">: gql "IntWithPrecision",
-    "bigInt">: gql "BigIntType",
-    "signedVerboseType">: gql "SignedVerboseBinaryExactNumericType"]
-
-int8Type :: Binding
-int8Type = def "Int8Type" $
-  T.record ["notNull">: T.boolean]
-
-int16Type :: Binding
-int16Type = def "Int16Type" $
-  T.record ["notNull">: T.boolean]
-
-int32Type :: Binding
-int32Type = def "Int32Type" $
-  T.record ["notNull">: T.boolean]
-
-int64Type :: Binding
-int64Type = def "Int64Type" $
-  T.record ["notNull">: T.boolean]
-
-int128Type :: Binding
-int128Type = def "Int128Type" $
-  T.record ["notNull">: T.boolean]
-
-int256Type :: Binding
-int256Type = def "Int256Type" $
-  T.record ["notNull">: T.boolean]
-
-smallIntType :: Binding
-smallIntType = def "SmallIntType" $
-  T.record ["notNull">: T.boolean]
-
-bigIntType :: Binding
-bigIntType = def "BigIntType" $
-  T.record ["notNull">: T.boolean]
-
-intWithPrecision :: Binding
-intWithPrecision = def "IntWithPrecision" $
-  T.record [
-    "precision">: T.maybe $ gql "Precision",
-    "notNull">: T.boolean]
-
-signedVerboseBinaryExactNumericType :: Binding
-signedVerboseBinaryExactNumericType = def "SignedVerboseBinaryExactNumericType" $
-  T.record [
-    "signed">: T.boolean,
-    "verboseType">: gql "VerboseBinaryExactNumericType"]
-
-unsignedBinaryExactNumericType :: Binding
-unsignedBinaryExactNumericType = def "UnsignedBinaryExactNumericType" $
-  T.union [
-    "uint8">: gql "Uint8Type",
-    "uint16">: gql "Uint16Type",
-    "uint32">: gql "Uint32Type",
-    "uint64">: gql "Uint64Type",
-    "uint128">: gql "Uint128Type",
-    "uint256">: gql "Uint256Type",
-    "uSmallInt">: gql "USmallIntType",
-    "uintWithPrecision">: gql "UintWithPrecision",
-    "uBigInt">: gql "UBigIntType",
-    "unsigned">: gql "VerboseBinaryExactNumericType"]
-
-uint8Type :: Binding
-uint8Type = def "Uint8Type" $
-  T.record ["notNull">: T.boolean]
-
-uint16Type :: Binding
-uint16Type = def "Uint16Type" $
-  T.record ["notNull">: T.boolean]
-
-uint32Type :: Binding
-uint32Type = def "Uint32Type" $
-  T.record ["notNull">: T.boolean]
-
-uint64Type :: Binding
-uint64Type = def "Uint64Type" $
-  T.record ["notNull">: T.boolean]
-
-uint128Type :: Binding
-uint128Type = def "Uint128Type" $
-  T.record ["notNull">: T.boolean]
-
-uint256Type :: Binding
-uint256Type = def "Uint256Type" $
-  T.record ["notNull">: T.boolean]
-
-uSmallIntType :: Binding
-uSmallIntType = def "USmallIntType" $
-  T.record ["notNull">: T.boolean]
-
-uBigIntType :: Binding
-uBigIntType = def "UBigIntType" $
-  T.record ["notNull">: T.boolean]
-
-uintWithPrecision :: Binding
-uintWithPrecision = def "UintWithPrecision" $
-  T.record [
-    "precision">: T.maybe $ gql "Precision",
-    "notNull">: T.boolean]
-
-verboseBinaryExactNumericType :: Binding
-verboseBinaryExactNumericType = def "VerboseBinaryExactNumericType" $
-  T.union [
-    "integer8">: gql "Integer8Type",
-    "integer16">: gql "Integer16Type",
-    "integer32">: gql "Integer32Type",
-    "integer64">: gql "Integer64Type",
-    "integer128">: gql "Integer128Type",
-    "integer256">: gql "Integer256Type",
-    "smallInteger">: gql "SmallIntegerType",
-    "integerWithPrecision">: gql "IntegerWithPrecision",
-    "bigInteger">: gql "BigIntegerType"]
-
-integer8Type :: Binding
-integer8Type = def "Integer8Type" $
-  T.record ["notNull">: T.boolean]
-
-integer16Type :: Binding
-integer16Type = def "Integer16Type" $
-  T.record ["notNull">: T.boolean]
-
-integer32Type :: Binding
-integer32Type = def "Integer32Type" $
-  T.record ["notNull">: T.boolean]
-
-integer64Type :: Binding
-integer64Type = def "Integer64Type" $
-  T.record ["notNull">: T.boolean]
-
-integer128Type :: Binding
-integer128Type = def "Integer128Type" $
-  T.record ["notNull">: T.boolean]
-
-integer256Type :: Binding
-integer256Type = def "Integer256Type" $
-  T.record ["notNull">: T.boolean]
-
-smallIntegerType :: Binding
-smallIntegerType = def "SmallIntegerType" $
-  T.record ["notNull">: T.boolean]
-
-bigIntegerType :: Binding
-bigIntegerType = def "BigIntegerType" $
-  T.record ["notNull">: T.boolean]
-
-integerWithPrecision :: Binding
-integerWithPrecision = def "IntegerWithPrecision" $
-  T.record [
-    "precision">: T.maybe $ gql "Precision",
-    "notNull">: T.boolean]
-
-precision :: Binding
-precision = def "Precision" $
-  gql "UnsignedDecimalInteger"
-
-decimalExactNumericType :: Binding
-decimalExactNumericType = def "DecimalExactNumericType" $
-  T.maybe $ gql "PrecisionAndScale"
-
-precisionAndScale :: Binding
-precisionAndScale = def "PrecisionAndScale" $
-  T.record [
-    "precision">: gql "Precision",
-    "scale">: T.maybe $ gql "Scale",
-    "notNull">: T.boolean]
-
-scale :: Binding
-scale = def "Scale" $
-  gql "UnsignedDecimalInteger"
-
-approximateNumericType :: Binding
-approximateNumericType = def "ApproximateNumericType" $
-  T.union [
-    "float16">: gql "Float16Type",
-    "float32">: gql "Float32Type",
-    "float64">: gql "Float64Type",
-    "float128">: gql "Float128Type",
-    "float256">: gql "Float256Type",
-    "floatWithPrecision">: gql "FloatTypeWithPrecision",
-    "real">: gql "RealType",
-    "doubleWithPrecision">: gql "DoubleTypeWithPrecision"]
-
-float16Type :: Binding
-float16Type = def "Float16Type" $
-  T.record [
-    "notNull">: T.boolean]
-
-float32Type :: Binding
-float32Type = def "Float32Type" $
-  T.record [
-    "notNull">: T.boolean]
-
-float64Type :: Binding
-float64Type = def "Float64Type" $
-  T.record [
-    "notNull">: T.boolean]
-
-float128Type :: Binding
-float128Type = def "Float128Type" $
-  T.record [
-    "notNull">: T.boolean]
-
-float256Type :: Binding
-float256Type = def "Float256Type" $
-  T.record [
-    "notNull">: T.boolean]
-
-floatTypeWithPrecision :: Binding
-floatTypeWithPrecision = def "FloatTypeWithPrecision" $
-  T.record [
-    "precisionAndScale">: T.maybe $ gql "PrecisionAndScale",
-    "notNull">: T.boolean]
-
-realType :: Binding
-realType = def "RealType" $
-  T.record [
-    "notNull">: T.boolean]
-
-doubleTypeWithPrecision :: Binding
-doubleTypeWithPrecision = def "DoubleTypeWithPrecision" $
-  T.record [
-    "precision">: T.boolean,
-    "notNull">: T.boolean]
-
-temporalType :: Binding
-temporalType = def "TemporalType" $
-  T.union [
-    "instantType">: gql "TemporalInstantType",
-    "durationType">: gql "TemporalDurationType"]
-
-temporalInstantType :: Binding
-temporalInstantType = def "TemporalInstantType" $
-  T.union [
-    "datetimeType">: gql "DatetimeType",
-    "localDatetimeTypeChoice">: gql "LocalDatetimeTypeChoice",
-    "dateType">: gql "DateType",
-    "timeType">: gql "TimeType",
-    "localTimeTypeChoice">: gql "LocalTimeTypeChoice"]
-
-datetimeType :: Binding
-datetimeType = def "DatetimeType" $
-  T.union [
-    "zonedDatetime">: gql "ZonedDatetimeType",
-    "timestampWithTimeZone">: gql "TimestampWithTimeZoneType"]
-
-zonedDatetimeType :: Binding
-zonedDatetimeType = def "ZonedDatetimeType" $
-  T.record [
-    "notNull">: T.boolean]
-
-timestampWithTimeZoneType :: Binding
-timestampWithTimeZoneType = def "TimestampWithTimeZoneType" $
-  T.record [
-    "notNull">: T.boolean]
-
-localDatetimeTypeChoice :: Binding
-localDatetimeTypeChoice = def "LocalDatetimeTypeChoice" $
-  T.union [
-    "localDatetime">: gql "LocalDatetimeType",
-    "timestampWithoutTimeZone">: gql "TimestampWithoutTimeZoneType"]
-
-localDatetimeType :: Binding
-localDatetimeType = def "LocalDatetimeType" $
-  T.record [
-    "notNull">: T.boolean]
-
-timestampWithoutTimeZoneType :: Binding
-timestampWithoutTimeZoneType = def "TimestampWithoutTimeZoneType" $
-  T.record [
-    "notNull">: T.boolean]
-
-dateType :: Binding
-dateType = def "DateType" $
-  T.record [
-    "notNull">: T.boolean]
-
-timeType :: Binding
-timeType = def "TimeType" $
-  T.union [
-    "zonedTime">: gql "ZonedTimeType",
-    "timeWithTimeZone">: gql "TimeWithTimeZoneType"]
-
-zonedTimeType :: Binding
-zonedTimeType = def "ZonedTimeType" $
-  T.record [
-    "notNull">: T.boolean]
-
-timeWithTimeZoneType :: Binding
-timeWithTimeZoneType = def "TimeWithTimeZoneType" $
-  T.record [
-    "notNull">: T.boolean]
-
-localTimeTypeChoice :: Binding
-localTimeTypeChoice = def "LocalTimeTypeChoice" $
-  T.union [
-    "localTime">: gql "LocalTimeType",
-    "timeWithoutTimeZone">: gql "TimeWithoutTimeZoneType"]
-
-localTimeType :: Binding
-localTimeType = def "LocalTimeType" $
-  T.record [
-    "notNull">: T.boolean]
-
-timeWithoutTimeZoneType :: Binding
-timeWithoutTimeZoneType = def "TimeWithoutTimeZoneType" $
-  T.record [
-    "notNull">: T.boolean]
-
-temporalDurationType :: Binding
-temporalDurationType = def "TemporalDurationType" $
-  T.record [
-    "qualifier">: gql "TemporalDurationQualifier",
-    "notNull">: T.boolean]
-
-temporalDurationQualifier :: Binding
-temporalDurationQualifier = def "TemporalDurationQualifier" $
-  T.enum ["yearToMonth", "dayToSecond"]
-
-referenceValueType :: Binding
-referenceValueType = def "ReferenceValueType" $
-  T.union [
-    "graph">: gql "GraphReferenceValueType",
-    "bindingTable">: gql "BindingTableReferenceValueType",
-    "node">: gql "NodeReferenceValueType",
-    "edge">: gql "EdgeReferenceValueType"]
-
-immaterialValueType :: Binding
-immaterialValueType = def "ImmaterialValueType" $
-  T.union [
-    "nullType">: gql "NullType",
-    "emptyType">: gql "EmptyType"]
-
-nullType :: Binding
-nullType = def "NullType" $
-  T.unit
-
-emptyType :: Binding
-emptyType = def "EmptyType" $
-  T.unit
-
-graphReferenceValueType :: Binding
-graphReferenceValueType = def "GraphReferenceValueType" $
-  T.union [
-    "open">: gql "OpenGraphReferenceValueType",
-    "closed">: gql "ClosedGraphReferenceValueType"]
-
-closedGraphReferenceValueType :: Binding
-closedGraphReferenceValueType = def "ClosedGraphReferenceValueType" $
-  T.record [
-    "property">: T.boolean,
-    "nestedSpec">: gql "NestedGraphTypeSpecification",
-    "notNull">: T.boolean]
-
-openGraphReferenceValueType :: Binding
-openGraphReferenceValueType = def "OpenGraphReferenceValueType" $
-  T.record [
-    "any">: T.maybe T.boolean,
-    "property">: T.boolean,
-    "notNull">: T.boolean]
-
-bindingTableReferenceValueType :: Binding
-bindingTableReferenceValueType = def "BindingTableReferenceValueType" $
-  T.record [
-    "bindingTableType">: gql "BindingTableType",
-    "notNull">: T.boolean]
-
-nodeReferenceValueType :: Binding
-nodeReferenceValueType = def "NodeReferenceValueType" $
-  T.union [
-    "open">: gql "OpenNodeReferenceValueType",
-    "closed">: gql "ClosedNodeReferenceValueType"]
-
-closedNodeReferenceValueType :: Binding
-closedNodeReferenceValueType = def "ClosedNodeReferenceValueType" $
-  T.record [
-    "nodeTypeSpec">: gql "NodeTypeSpecification",
-    "notNull">: T.boolean]
-
-openNodeReferenceValueType :: Binding
-openNodeReferenceValueType = def "OpenNodeReferenceValueType" $
-  T.record [
-    "any">: T.boolean,
-    "nodeSynonym">: gql "NodeSynonym",
-    "notNull">: T.boolean]
-
-edgeReferenceValueType :: Binding
-edgeReferenceValueType = def "EdgeReferenceValueType" $
-  T.union [
-    "open">: gql "OpenEdgeReferenceValueType",
-    "closed">: gql "ClosedEdgeReferenceValueType"]
-
-closedEdgeReferenceValueType :: Binding
-closedEdgeReferenceValueType = def "ClosedEdgeReferenceValueType" $
-  T.record [
-    "edgeTypeSpec">: gql "EdgeTypeSpecification",
-    "notNull">: T.boolean]
-
-openEdgeReferenceValueType :: Binding
-openEdgeReferenceValueType = def "OpenEdgeReferenceValueType" $
-  T.record [
-    "any">: T.boolean,
-    "edgeSynonym">: gql "EdgeSynonym",
-    "notNull">: T.boolean]
-
-pathValueType :: Binding
-pathValueType = def "PathValueType" $
-  T.record [
-    "notNull">: T.boolean]
-
-listValueTypeName :: Binding
-listValueTypeName = def "ListValueTypeName" $
-  T.record [
-    "group">: T.boolean,
-    "synonym">: gql "ListValueTypeNameSynonym"]
-
-listValueTypeNameSynonym :: Binding
-listValueTypeNameSynonym = def "ListValueTypeNameSynonym" $
-  T.enum ["list", "array"]
-
-recordType :: Binding
-recordType = def "RecordType" $
-  T.union [
-    "anyRecord">: gql "AnyRecordType",
-    "specifiedRecord">: gql "SpecifiedRecordType"]
-
-anyRecordType :: Binding
-anyRecordType = def "AnyRecordType" $
-  T.record [
-    "any">: T.boolean,
-    "notNull">: T.boolean]
-
-specifiedRecordType :: Binding
-specifiedRecordType = def "SpecifiedRecordType" $
-  T.record [
-    "record">: T.boolean,
-    "fieldTypes">: gql "FieldTypesSpecification",
-    "notNull">: T.boolean]
-
-fieldTypesSpecification :: Binding
-fieldTypesSpecification = def "FieldTypesSpecification" $
-  T.maybe $ gql "FieldTypeList"
-
-fieldTypeList :: Binding
-fieldTypeList = def "FieldTypeList" $
-  nonemptyList $ gql "FieldType"
-
-notNull :: Binding
-notNull = def "NotNull" $
-  T.unit
-
-fieldType :: Binding
-fieldType = def "FieldType" $
-  T.record [
-    "fieldName">: gql "FieldName",
-    "typed">: T.maybe $ gql "Typed",
-    "valueType">: gql "ValueType"]
-
-searchCondition :: Binding
-searchCondition = def "SearchCondition" $
-  gql "BooleanValueExpression"
-
-predicate :: Binding
-predicate = def "Predicate" $
-  T.union [
-    "existsPredicate">: gql "ExistsPredicate",
-    "nullPredicate">: gql "NullPredicate",
-    "valueTypePredicate">: gql "ValueTypePredicate",
-    "directedPredicate">: gql "DirectedPredicate",
-    "labeledPredicate">: gql "LabeledPredicate",
-    "sourceDestinationPredicate">: gql "SourceDestinationPredicate",
-    "allDifferentPredicate">: gql "AllDifferentPredicate",
-    "samePredicate">: gql "SamePredicate",
-    "propertyExistsPredicate">: gql "PropertyExistsPredicate"]
-
-comparisonPredicatePart2 :: Binding
-comparisonPredicatePart2 = def "ComparisonPredicatePart2" $
-  T.record [
-    "compOp">: gql "CompOp",
-    "valueExpression">: gql "ValueExpression"]
-
-compOp :: Binding
-compOp = def "CompOp" $
-  T.enum [
-    "equals",
-    "notEquals",
-    "lessThan",
-    "greaterThan",
-    "lessThanOrEquals",
-    "greaterThanOrEquals"]
-
-existsPredicate :: Binding
-existsPredicate = def "ExistsPredicate" $
-  T.union [
-    "graphPatternBrace">: gql "GraphPattern",
-    "graphPatternParen">: gql "GraphPattern",
-    "matchBlockBrace">: gql "MatchStatementBlock",
-    "matchBlockParen">: gql "MatchStatementBlock",
-    "nestedQuery">: gql "NestedQuerySpecification"]
-
-nullPredicate :: Binding
-nullPredicate = def "NullPredicate" $
-  T.record [
-    "valueExpression">: gql "PrimaryValueExpression",
-    "nullPart">: gql "NullPredicatePart2"]
-
-nullPredicatePart2 :: Binding
-nullPredicatePart2 = def "NullPredicatePart2" $
-  T.record [
-    "not">: T.boolean]
-
-valueTypePredicate :: Binding
-valueTypePredicate = def "ValueTypePredicate" $
-  T.record [
-    "valueExpression">: gql "PrimaryValueExpression",
-    "valueTypePart">: gql "ValueTypePredicatePart2"]
-
-valueTypePredicatePart2 :: Binding
-valueTypePredicatePart2 = def "ValueTypePredicatePart2" $
-  T.record [
-    "not">: T.boolean,
-    "typed">: gql "Typed",
-    "valueType">: gql "ValueType"]
-
-normalizedPredicatePart2 :: Binding
-normalizedPredicatePart2 = def "NormalizedPredicatePart2" $
-  T.record [
-    "not">: T.boolean,
-    "normalForm">: T.maybe $ gql "NormalForm"]
-
-directedPredicate :: Binding
-directedPredicate = def "DirectedPredicate" $
-  T.record [
-    "elementVariableReference">: gql "ElementVariableReference",
-    "directedPart">: gql "DirectedPredicatePart2"]
-
-directedPredicatePart2 :: Binding
-directedPredicatePart2 = def "DirectedPredicatePart2" $
-  T.record [
-    "not">: T.boolean]
-
-labeledPredicate :: Binding
-labeledPredicate = def "LabeledPredicate" $
-  T.record [
-    "elementVariableReference">: gql "ElementVariableReference",
-    "labeledPart">: gql "LabeledPredicatePart2"]
-
-labeledPredicatePart2 :: Binding
-labeledPredicatePart2 = def "LabeledPredicatePart2" $
-  T.record [
-    "isLabeledOrColon">: gql "IsLabeledOrColon",
-    "labelExpression">: gql "LabelExpression"]
-
-isLabeledOrColon :: Binding
-isLabeledOrColon = def "IsLabeledOrColon" $
-  T.union [
-    "not">: T.boolean,
-    "colon">: T.unit]
-
-sourceDestinationPredicate :: Binding
-sourceDestinationPredicate = def "SourceDestinationPredicate" $
-  T.union [
-    "sourcePredicate">: gql "SourcePredicate",
-    "destinationPredicate">: gql "DestinationPredicate"]
-
-nodeReference :: Binding
-nodeReference = def "NodeReference" $
-  gql "ElementVariableReference"
-
-sourcePredicate :: Binding
-sourcePredicate = def "SourcePredicate" $
-  T.record [
-    "not">: T.boolean,
-    "sourceOf">: gql "EdgeReference"]
-
-destinationPredicate :: Binding
-destinationPredicate = def "DestinationPredicate" $
-  T.record [
-    "nodeReference">: gql "NodeReference",
-    "not">: T.boolean,
-    "destinationOf">: gql "EdgeReference"]
-
-edgeReference :: Binding
-edgeReference = def "EdgeReference" $
-  gql "ElementVariableReference"
-
-allDifferentPredicate :: Binding
-allDifferentPredicate = def "AllDifferentPredicate" $
-  T.record [
-    "references">: nonemptyList $ gql "ElementVariableReference"]
-
-samePredicate :: Binding
-samePredicate = def "SamePredicate" $
-  T.record [
-    "references">: nonemptyList $ gql "ElementVariableReference"]
-
-propertyExistsPredicate :: Binding
-propertyExistsPredicate = def "PropertyExistsPredicate" $
-  T.record [
-    "elementVariableReference">: gql "ElementVariableReference",
-    "propertyName">: gql "PropertyName"]
-
-valueExpression :: Binding
-valueExpression = def "ValueExpression" $
-  T.union [
-    "signed">: gql "SignedExpr",
-    "multDiv">: gql "MultDivExpr",
-    "addSubtract">: gql "AddSubtractExpr",
-    "concatenation">: gql "ConcatenationExpr",
-    "not">: gql "NotExpr",
-    "isNot">: gql "IsNotExpr",
-    "conjunctive">: gql "ConjunctiveExpr",
-    "disjunctive">: gql "DisjunctiveExpr",
-    "comparison">: gql "ComparisonExpr",
-    "predicate">: gql "Predicate",
-    "normalizedPredicate">: gql "NormalizedPredicateExpr",
-    "propertyGraph">: gql "GraphExpression",
-    "bindingTable">: gql "BindingTableExpression",
-    "valueFunction">: gql "ValueFunction",
-    "primary">: gql "PrimaryValueExpression"]
-
-signedExpr :: Binding
-signedExpr = def "SignedExpr" $
-  T.record [
-    "sign">: gql "Sign",
-    "valueExpression">: gql "ValueExpression"]
-
-multDivExpr :: Binding
-multDivExpr = def "MultDivExpr" $
-  T.record [
-    "left">: gql "ValueExpression",
-    "operator">: gql "MultDivOperator",
-    "right">: gql "ValueExpression"]
-
-addSubtractExpr :: Binding
-addSubtractExpr = def "AddSubtractExpr" $
-  T.record [
-    "left">: gql "ValueExpression",
-    "operator">: gql "AddSubtractOperator",
-    "right">: gql "ValueExpression"]
-
-concatenationExpr :: Binding
-concatenationExpr = def "ConcatenationExpr" $
-  T.record [
-    "left">: gql "ValueExpression",
-    "right">: gql "ValueExpression"]
-
-notExpr :: Binding
-notExpr = def "NotExpr" $
-  gql "ValueExpression"
-
-isNotExpr :: Binding
-isNotExpr = def "IsNotExpr" $
-  T.record [
-    "valueExpression">: gql "ValueExpression",
-    "not">: T.boolean,
-    "truthValue">: gql "TruthValue"]
-
-conjunctiveExpr :: Binding
-conjunctiveExpr = def "ConjunctiveExpr" $
-  T.record [
-    "left">: gql "ValueExpression",
-    "right">: gql "ValueExpression"]
-
-disjunctiveExpr :: Binding
-disjunctiveExpr = def "DisjunctiveExpr" $
-  T.record [
-    "left">: gql "ValueExpression",
-    "operator">: gql "DisjunctiveOperator",
-    "right">: gql "ValueExpression"]
-
-comparisonExpr :: Binding
-comparisonExpr = def "ComparisonExpr" $
-  T.record [
-    "valueExpression">: gql "ValueExpression",
-    "comparison">: gql "ComparisonPredicatePart2"]
-
-normalizedPredicateExpr :: Binding
-normalizedPredicateExpr = def "NormalizedPredicateExpr" $
-  T.record [
-    "valueExpression">: gql "ValueExpression",
-    "normalizedPredicate">: gql "NormalizedPredicatePart2"]
-
-sign :: Binding
-sign = def "Sign" $
-  T.enum ["plus", "minus"]
-
-multDivOperator :: Binding
-multDivOperator = def "MultDivOperator" $
-  T.enum ["multiply", "divide"]
-
-addSubtractOperator :: Binding
-addSubtractOperator = def "AddSubtractOperator" $
-  T.enum ["add", "subtract"]
-
-disjunctiveOperator :: Binding
-disjunctiveOperator = def "DisjunctiveOperator" $
-  T.enum ["or", "xor"]
-
-valueFunction :: Binding
-valueFunction = def "ValueFunction" $
-  T.union [
-    "numeric">: gql "NumericValueFunction",
-    "datetimeSubtraction">: gql "DatetimeSubtraction",
-    "datetime">: gql "DatetimeValueFunction",
-    "duration">: gql "DurationValueFunction",
-    "characterOrByteString">: gql "CharacterOrByteStringFunction",
-    "list">: gql "ListValueFunction"]
-
-booleanValueExpression :: Binding
-booleanValueExpression = def "BooleanValueExpression" $
-  gql "ValueExpression"
-
-characterOrByteStringFunction :: Binding
-characterOrByteStringFunction = def "CharacterOrByteStringFunction" $
-  T.union [
-    "sub">: gql "SubCharacterOrByteString",
-    "trimSingle">: gql "TrimSingleCharacterOrByteString",
-    "fold">: gql "FoldCharacterString",
-    "trimMultiCharacter">: gql "TrimMultiCharacterCharacterString",
-    "normalize">: gql "NormalizeCharacterString"]
-
-subCharacterOrByteString :: Binding
-subCharacterOrByteString = def "SubCharacterOrByteString" $
-  T.record [
-    "side">: gql "Side",
-    "valueExpression">: gql "ValueExpression",
-    "stringLength">: gql "StringLength"]
-
-side :: Binding
-side = def "Side" $
-  T.enum ["left", "right"]
-
-trimSingleCharacterOrByteString :: Binding
-trimSingleCharacterOrByteString = def "TrimSingleCharacterOrByteString" $
-  gql "TrimOperands"
-
-foldCharacterString :: Binding
-foldCharacterString = def "FoldCharacterString" $
-  T.record [
-    "case">: gql "Case",
-    "valueExpression">: gql "ValueExpression"]
-
-case_ :: Binding
-case_ = def "Case" $
-  T.enum ["upper", "lower"]
-
-trimMultiCharacterCharacterString :: Binding
-trimMultiCharacterCharacterString = def "TrimMultiCharacterCharacterString" $
-  T.record [
-    "trimType">: gql "TrimType",
-    "valueExpression">: gql "ValueExpression",
-    "optionalValueExpression">: T.maybe $ gql "ValueExpression"]
-
-trimType :: Binding
-trimType = def "TrimType" $
-  T.enum ["btrim", "ltrim", "rtrim"]
-
-normalizeCharacterString :: Binding
-normalizeCharacterString = def "NormalizeCharacterString" $
-  T.record [
-    "valueExpression">: gql "ValueExpression",
-    "normalForm">: T.maybe $ gql "NormalForm"]
-
-nodeReferenceValueExpression :: Binding
-nodeReferenceValueExpression = def "NodeReferenceValueExpression" $
-  gql "PrimaryValueExpression"
-
-edgeReferenceValueExpression :: Binding
-edgeReferenceValueExpression = def "EdgeReferenceValueExpression" $
-  gql "PrimaryValueExpression"
-
-aggregatingValueExpression :: Binding
-aggregatingValueExpression = def "AggregatingValueExpression" $
-  gql "ValueExpression"
-
-primaryValueExpression :: Binding
-primaryValueExpression = def "PrimaryValueExpression" $
-  T.union [
-    "parenthesized">: gql "ParenthesizedValueExpression",
-    "aggregateFunction">: gql "AggregateFunction",
-    "unsignedValueSpecification">: gql "UnsignedValueSpecification",
-    "pathValueConstructor">: gql "PathValueConstructor",
-    "propertyReference">: gql "PropertyReference",
-    "valueQueryExpression">: gql "ValueQueryExpression",
-    "caseExpression">: gql "CaseExpression",
-    "castSpecification">: gql "CastSpecification",
-    "elementIdFunction">: gql "ElementIdFunction",
-    "letValueExpression">: gql "LetValueExpression",
-    "bindingVariableReference">: gql "BindingVariableReference"]
-
-parenthesizedValueExpression :: Binding
-parenthesizedValueExpression = def "ParenthesizedValueExpression" $
-  gql "ValueExpression"
-
-nonParenthesizedPrimaryValueExpression :: Binding
-nonParenthesizedPrimaryValueExpression = def "NonParenthesizedPrimaryValueExpression" $
-  T.union [
-    "special">: gql "NonParenthesizedPrimaryValueExpressionSpecialCase",
-    "bindingVariable">: gql "BindingVariableReference"]
-
-nonParenthesizedPrimaryValueExpressionSpecialCase :: Binding
-nonParenthesizedPrimaryValueExpressionSpecialCase = def "NonParenthesizedPrimaryValueExpressionSpecialCase" $
-  T.union [
-    "aggregateFunction">: gql "AggregateFunction",
-    "unsignedValueSpecification">: gql "UnsignedValueSpecification",
-    "pathValueConstructor">: gql "PathValueConstructor",
-    "propertyReference">: gql "PropertyReference",
-    "valueQueryExpression">: gql "ValueQueryExpression",
-    "caseExpression">: gql "CaseExpression",
-    "castSpecification">: gql "CastSpecification",
-    "elementIdFunction">: gql "ElementIdFunction",
-    "letValueExpression">: gql "LetValueExpression"]
-
-unsignedValueSpecification :: Binding
-unsignedValueSpecification = def "UnsignedValueSpecification" $
-  T.union [
-    "unsignedLiteral">: gql "UnsignedLiteral",
-    "generalValueSpecification">: gql "GeneralValueSpecification"]
-
-nonNegativeIntegerSpecification :: Binding
-nonNegativeIntegerSpecification = def "NonNegativeIntegerSpecification" $
-  T.union [
-    "unsignedInteger">: gql "UnsignedInteger",
-    "dynamicParameterSpecification">: gql "DynamicParameterSpecification"]
-
-generalValueSpecification :: Binding
-generalValueSpecification = def "GeneralValueSpecification" $
-  T.union [
-    "dynamicParameterSpecification">: gql "DynamicParameterSpecification",
-    "sessionUser">: T.unit]
-
-dynamicParameterSpecification :: Binding
-dynamicParameterSpecification = def "DynamicParameterSpecification" $
-  gql "ParameterName"
-
-letValueExpression :: Binding
-letValueExpression = def "LetValueExpression" $
-  T.record [
-    "letVariables">: gql "LetVariableDefinitionList",
-    "valueExpression">: gql "ValueExpression"]
-
-valueQueryExpression :: Binding
-valueQueryExpression = def "ValueQueryExpression" $
-  gql "NestedQuerySpecification"
-
-caseExpression :: Binding
-caseExpression = def "CaseExpression" $
-  T.union [
-    "abbreviation">: gql "CaseAbbreviation",
-    "specification">: gql "CaseSpecification"]
-
-caseAbbreviation :: Binding
-caseAbbreviation = def "CaseAbbreviation" $
-  T.union [
-    "nullIf">: gql "NullIfAbbreviation",
-    "coalesce">: nonemptyList $ gql "ValueExpression"]
-
-nullIfAbbreviation :: Binding
-nullIfAbbreviation = def "NullIfAbbreviation" $
-  T.record [
-    "first">: gql "ValueExpression",
-    "second">: gql "ValueExpression"]
-
-caseSpecification :: Binding
-caseSpecification = def "CaseSpecification" $
-  T.union [
-    "simple">: gql "SimpleCase",
-    "searched">: gql "SearchedCase"]
-
-simpleCase :: Binding
-simpleCase = def "SimpleCase" $
-  T.record [
-    "caseOperand">: gql "CaseOperand",
-    "whenClauses">: nonemptyList $ gql "SimpleWhenClause",
-    "elseClause">: T.maybe $ gql "ElseClause"]
-
-searchedCase :: Binding
-searchedCase = def "SearchedCase" $
-  T.record [
-    "whenClauses">: nonemptyList $ gql "SearchedWhenClause",
-    "elseClause">: T.maybe $ gql "ElseClause"]
-
-simpleWhenClause :: Binding
-simpleWhenClause = def "SimpleWhenClause" $
-  T.record [
-    "whenOperands">: gql "WhenOperandList",
-    "result">: gql "Result"]
-
-searchedWhenClause :: Binding
-searchedWhenClause = def "SearchedWhenClause" $
-  T.record [
-    "searchCondition">: gql "SearchCondition",
-    "result">: gql "Result"]
-
-elseClause :: Binding
-elseClause = def "ElseClause" $
-  gql "Result"
-
-caseOperand :: Binding
-caseOperand = def "CaseOperand" $
-  T.union [
-    "valueExpression">: gql "NonParenthesizedPrimaryValueExpression",
-    "elementReference">: gql "ElementVariableReference"]
-
-whenOperandList :: Binding
-whenOperandList = def "WhenOperandList" $
-  nonemptyList $ gql "WhenOperand"
-
-whenOperand :: Binding
-whenOperand = def "WhenOperand" $
-  T.union [
-    "valueExpression">: gql "NonParenthesizedPrimaryValueExpression",
-    "comparison">: gql "ComparisonPredicatePart2",
-    "nullPredicate">: gql "NullPredicatePart2",
-    "valueTypePredicate">: gql "ValueTypePredicatePart2",
-    "normalizedPredicate">: gql "NormalizedPredicatePart2",
-    "directedPredicate">: gql "DirectedPredicatePart2",
-    "labeledPredicate">: gql "LabeledPredicatePart2",
-    "sourcePredicate">: gql "SourcePredicate",
-    "destinationPredicate">: gql "DestinationPredicate"]
-
-result :: Binding
-result = def "Result" $
-  T.union [
-    "simple">: gql "ResultExpression",
-    "nullLiteral">: T.unit]
-
-resultExpression :: Binding
-resultExpression = def "ResultExpression" $
-  gql "ValueExpression"
-
-castSpecification :: Binding
-castSpecification = def "CastSpecification" $
-  T.record [
-    "operand">: gql "CastOperand",
-    "target">: gql "CastTarget"]
-
-castOperand :: Binding
-castOperand = def "CastOperand" $
-  T.union [
-    "valueExpression">: gql "ValueExpression",
-    "nullLiteral">: T.unit]
-
-castTarget :: Binding
-castTarget = def "CastTarget" $
-  gql "ValueType"
-
-aggregateFunction :: Binding
-aggregateFunction = def "AggregateFunction" $
-  T.union [
-    "countAll">: T.unit,
-    "generalSetFunction">: gql "GeneralSetFunction",
-    "binarySetFunction">: gql "BinarySetFunction"]
-
-generalSetFunction :: Binding
-generalSetFunction = def "GeneralSetFunction" $
-  T.record [
-    "functionType">: gql "GeneralSetFunctionType",
-    "setQuantifier">: T.maybe $ gql "SetQuantifier",
-    "valueExpression">: gql "ValueExpression"]
-
-binarySetFunction :: Binding
-binarySetFunction = def "BinarySetFunction" $
-  T.record [
-    "functionType">: gql "BinarySetFunctionType",
-    "dependentValue">: gql "DependentValueExpression",
-    "independentValue">: gql "IndependentValueExpression"]
-
-generalSetFunctionType :: Binding
-generalSetFunctionType = def "GeneralSetFunctionType" $
-  T.enum [
-    "avg",
-    "count",
-    "max",
-    "min",
-    "sum",
-    "collectList",
-    "stddevSamp",
-    "stddevPop"]
-
-setQuantifier :: Binding
-setQuantifier = def "SetQuantifier" $
-  T.enum ["distinct", "all"]
-
-binarySetFunctionType :: Binding
-binarySetFunctionType = def "BinarySetFunctionType" $
-  T.enum ["percentileCont", "percentileDisc"]
-
-dependentValueExpression :: Binding
-dependentValueExpression = def "DependentValueExpression" $
-  T.record [
-    "setQuantifier">: T.maybe $ gql "SetQuantifier",
-    "numericValue">: gql "NumericValueExpression"]
-
-independentValueExpression :: Binding
-independentValueExpression = def "IndependentValueExpression" $
-  gql "NumericValueExpression"
-
-elementIdFunction :: Binding
-elementIdFunction = def "ElementIdFunction" $
-  gql "ElementVariableReference"
-
-propertyReference :: Binding
-propertyReference = def "PropertyReference" $
-  T.record [
-    "valueExpression">: gql "PrimaryValueExpression",
-    "propertyName">: gql "PropertyName"]
-
-bindingVariableReference :: Binding
-bindingVariableReference = def "BindingVariableReference" $
-  gql "BindingVariable"
-
-pathValueExpression :: Binding
-pathValueExpression = def "PathValueExpression" $
-  gql "ValueExpression"
-
-pathValueConstructor :: Binding
-pathValueConstructor = def "PathValueConstructor" $
-  gql "PathValueConstructorByEnumeration"
-
-pathValueConstructorByEnumeration :: Binding
-pathValueConstructorByEnumeration = def "PathValueConstructorByEnumeration" $
-  gql "PathElementList"
-
-pathElementList :: Binding
-pathElementList = def "PathElementList" $
-  T.record [
-    "start">: gql "PathElementListStart",
-    "steps">: T.list $ gql "PathElementListStep"]
-
-pathElementListStart :: Binding
-pathElementListStart = def "PathElementListStart" $
-  gql "NodeReferenceValueExpression"
-
-pathElementListStep :: Binding
-pathElementListStep = def "PathElementListStep" $
-  T.record [
-    "edgeReference">: gql "EdgeReferenceValueExpression",
-    "nodeReference">: gql "NodeReferenceValueExpression"]
-
-listValueExpression :: Binding
-listValueExpression = def "ListValueExpression" $
-  gql "ValueExpression"
-
-listValueFunction :: Binding
-listValueFunction = def "ListValueFunction" $
-  T.union [
-    "trim">: gql "TrimListFunction",
-    "elements">: gql "ElementsFunction"]
-
-trimListFunction :: Binding
-trimListFunction = def "TrimListFunction" $
-  T.record [
-    "listValue">: gql "ListValueExpression",
-    "numericValue">: gql "NumericValueExpression"]
-
-elementsFunction :: Binding
-elementsFunction = def "ElementsFunction" $
-  gql "PathValueExpression"
-
-listValueConstructor :: Binding
-listValueConstructor = def "ListValueConstructor" $
-  gql "ListValueConstructorByEnumeration"
-
-listValueConstructorByEnumeration :: Binding
-listValueConstructorByEnumeration = def "ListValueConstructorByEnumeration" $
-  T.record [
-    "listValueTypeName">: T.maybe $ gql "ListValueTypeName",
-    "elements">: T.maybe $ gql "ListElementList"]
-
-listElementList :: Binding
-listElementList = def "ListElementList" $
-  nonemptyList $ gql "ListElement"
-
-listElement :: Binding
-listElement = def "ListElement" $
-  gql "ValueExpression"
-
-recordConstructor :: Binding
-recordConstructor = def "RecordConstructor" $
-  gql "FieldsSpecification"
-
-fieldsSpecification :: Binding
-fieldsSpecification = def "FieldsSpecification" $
-  T.maybe $ gql "FieldList"
-
-fieldList :: Binding
-fieldList = def "FieldList" $
-  nonemptyList $ gql "Field"
-
-field :: Binding
-field = def "Field" $
-  T.record [
-    "name">: gql "FieldName",
-    "value">: gql "ValueExpression"]
-
-truthValue :: Binding
-truthValue = def "TruthValue" $
-  gql "BooleanLiteral"
-
-numericValueExpression :: Binding
-numericValueExpression = def "NumericValueExpression" $
-  T.union [
-    "signed">: gql "SignedNumericValueExpression",
-    "multiplicationOrDivision">: gql "MulDivNumericValueExpression",
-    "additionOrSubtraction">: gql "AddSubNumericValueExpression",
-    "primary">: gql "PrimaryValueExpression",
-    "function">: gql "NumericValueFunction"]
-
-signedNumericValueExpression :: Binding
-signedNumericValueExpression = def "SignedNumericValueExpression" $
-  T.record [
-    "sign">: gql "Sign",
-    "expression">: gql "NumericValueExpression"]
-
-mulDivNumericValueExpression :: Binding
-mulDivNumericValueExpression = def "MulDivNumericValueExpression" $
-  T.record [
-    "left">: gql "NumericValueExpression",
-    "operator">: gql "MultDivOperator",
-    "right">: gql "NumericValueExpression"]
-
-addSubNumericValueExpression :: Binding
-addSubNumericValueExpression = def "AddSubNumericValueExpression" $
-  T.record [
-    "left">: gql "NumericValueExpression",
-    "operator">: gql "AddSubtractOperator",
-    "right">: gql "NumericValueExpression"]
-
-numericValueFunction :: Binding
-numericValueFunction = def "NumericValueFunction" $
-  T.union [
-    "length">: gql "LengthExpression",
-    "cardinality">: gql "CardinalityExpression",
-    "absoluteValue">: gql "AbsoluteValueExpression",
-    "modulus">: gql "ModulusExpression",
-    "trigonometric">: gql "TrigonometricFunction",
-    "logarithm">: gql "GeneralLogarithmFunction",
-    "commonLogarithm">: gql "CommonLogarithm",
-    "naturalLogarithm">: gql "NaturalLogarithm",
-    "exponential">: gql "ExponentialFunction",
-    "power">: gql "PowerFunction",
-    "squareRoot">: gql "SquareRoot",
-    "floor">: gql "FloorFunction",
-    "ceiling">: gql "CeilingFunction"]
-
-lengthExpression :: Binding
-lengthExpression = def "LengthExpression" $
-  T.union [
-    "char">: gql "CharLengthExpression",
-    "byte">: gql "ByteLengthExpression",
-    "path">: gql "PathLengthExpression"]
-
-cardinalityExpression :: Binding
-cardinalityExpression = def "CardinalityExpression" $
-  T.union [
-    "cardinality">: gql "CardinalityArgumentExpression",
-    "size">: gql "ListValueExpression"]
-
-cardinalityArgumentExpression :: Binding
-cardinalityArgumentExpression = def "CardinalityArgumentExpression" $
-  gql "ValueExpression"
-
-charLengthExpression :: Binding
-charLengthExpression = def "CharLengthExpression" $
-  gql "CharacterStringValueExpression"
-
-byteLengthExpression :: Binding
-byteLengthExpression = def "ByteLengthExpression" $
-  gql "ByteStringValueExpression"
-
-pathLengthExpression :: Binding
-pathLengthExpression = def "PathLengthExpression" $
-  gql "PathValueExpression"
-
-absoluteValueExpression :: Binding
-absoluteValueExpression = def "AbsoluteValueExpression" $
-  gql "ValueExpression"
-
-modulusExpression :: Binding
-modulusExpression = def "ModulusExpression" $
-  T.record [
-    "dividend">: gql "NumericValueExpressionDividend",
-    "divisor">: gql "NumericValueExpressionDivisor"]
-
-numericValueExpressionDividend :: Binding
-numericValueExpressionDividend = def "NumericValueExpressionDividend" $
-  gql "NumericValueExpression"
-
-numericValueExpressionDivisor :: Binding
-numericValueExpressionDivisor = def "NumericValueExpressionDivisor" $
-  gql "NumericValueExpression"
-
-trigonometricFunction :: Binding
-trigonometricFunction = def "TrigonometricFunction" $
-  T.record [
-    "name">: gql "TrigonometricFunctionName",
-    "value">: gql "NumericValueExpression"]
-
-trigonometricFunctionName :: Binding
-trigonometricFunctionName = def "TrigonometricFunctionName" $
-  T.enum ["sin", "cos", "tan", "cot", "sinh", "cosh", "tanh", "asin", "acos", "atan", "degrees", "radians"]
-
-generalLogarithmFunction :: Binding
-generalLogarithmFunction = def "GeneralLogarithmFunction" $
-  T.record [
-    "base">: gql "GeneralLogarithmBase",
-    "argument">: gql "GeneralLogarithmArgument"]
-
-generalLogarithmBase :: Binding
-generalLogarithmBase = def "GeneralLogarithmBase" $
-  gql "NumericValueExpression"
-
-generalLogarithmArgument :: Binding
-generalLogarithmArgument = def "GeneralLogarithmArgument" $
-  gql "NumericValueExpression"
-
-commonLogarithm :: Binding
-commonLogarithm = def "CommonLogarithm" $
-  gql "NumericValueExpression"
-
-naturalLogarithm :: Binding
-naturalLogarithm = def "NaturalLogarithm" $
-  gql "NumericValueExpression"
-
-exponentialFunction :: Binding
-exponentialFunction = def "ExponentialFunction" $
-  gql "NumericValueExpression"
-
-powerFunction :: Binding
-powerFunction = def "PowerFunction" $
-  T.record [
-    "base">: gql "NumericValueExpressionBase",
-    "exponent">: gql "NumericValueExpressionExponent"]
-
-numericValueExpressionBase :: Binding
-numericValueExpressionBase = def "NumericValueExpressionBase" $
-  gql "NumericValueExpression"
-
-numericValueExpressionExponent :: Binding
-numericValueExpressionExponent = def "NumericValueExpressionExponent" $
-  gql "NumericValueExpression"
-
-squareRoot :: Binding
-squareRoot = def "SquareRoot" $
-  gql "NumericValueExpression"
-
-floorFunction :: Binding
-floorFunction = def "FloorFunction" $
-  gql "NumericValueExpression"
-
-ceilingFunction :: Binding
-ceilingFunction = def "CeilingFunction" $
-  gql "NumericValueExpression"
-
-characterStringValueExpression :: Binding
-characterStringValueExpression = def "CharacterStringValueExpression" $
-  gql "ValueExpression"
-
-byteStringValueExpression :: Binding
-byteStringValueExpression = def "ByteStringValueExpression" $
-  gql "ValueExpression"
-
-trimOperands :: Binding
-trimOperands = def "TrimOperands" $
-  T.record [
-    "specification">: T.maybe $ gql "TrimSpecification",
-    "characterOrByteString">: T.maybe $ gql "TrimCharacterOrByteString",
-    "source">: gql "TrimCharacterOrByteStringSource"]
-
-trimCharacterOrByteStringSource :: Binding
-trimCharacterOrByteStringSource = def "TrimCharacterOrByteStringSource" $
-  gql "ValueExpression"
-
-trimSpecification :: Binding
-trimSpecification = def "TrimSpecification" $
-  T.enum ["leading", "trailing", "both"]
-
-trimCharacterOrByteString :: Binding
-trimCharacterOrByteString = def "TrimCharacterOrByteString" $
-  gql "ValueExpression"
-
-normalForm :: Binding
-normalForm = def "NormalForm" $
-  T.enum ["nfc", "nfd", "nfkc", "nfkd"]
-
-stringLength :: Binding
-stringLength = def "StringLength" $
-  gql "NumericValueExpression"
-
-datetimeValueExpression :: Binding
-datetimeValueExpression = def "DatetimeValueExpression" $
-  gql "ValueExpression"
-
-datetimeValueFunction :: Binding
-datetimeValueFunction = def "DatetimeValueFunction" $
-  T.union [
-    "dateFunction">: gql "DateFunction",
-    "timeFunction">: gql "TimeFunction",
-    "datetimeFunction">: gql "DatetimeFunction",
-    "localtimeFunction">: gql "LocaltimeFunction",
-    "localdatetimeFunction">: gql "LocaldatetimeFunction"]
-
-dateFunction :: Binding
-dateFunction = def "DateFunction" $
-  T.union [
-    "currentDate">: T.unit,
-    "dateWithParams">: T.maybe $ gql "DateFunctionParameters"]
-
-timeFunction :: Binding
-timeFunction = def "TimeFunction" $
-  T.union [
-    "currentTime">: T.unit,
-    "zonedTimeWithParams">: T.maybe $ gql "TimeFunctionParameters"]
-
-localtimeFunction :: Binding
-localtimeFunction = def "LocaltimeFunction" $
-  T.maybe $ gql "TimeFunctionParameters"
-
-datetimeFunction :: Binding
-datetimeFunction = def "DatetimeFunction" $
-  T.union [
-    "currentTimestamp">: T.unit,
-    "zonedDatetimeWithParams">: T.maybe $ gql "DatetimeFunctionParameters"]
-
-localdatetimeFunction :: Binding
-localdatetimeFunction = def "LocaldatetimeFunction" $
-  T.union [
-    "localTimestamp">: T.unit,
-    "localDatetimeWithParams">: T.maybe $ gql "DatetimeFunctionParameters"]
-
-dateFunctionParameters :: Binding
-dateFunctionParameters = def "DateFunctionParameters" $
-  T.union [
-    "dateString">: gql "DateString",
-    "recordConstructor">: gql "RecordConstructor"]
-
-timeFunctionParameters :: Binding
-timeFunctionParameters = def "TimeFunctionParameters" $
-  T.union [
-    "timeString">: gql "TimeString",
-    "recordConstructor">: gql "RecordConstructor"]
-
-datetimeFunctionParameters :: Binding
-datetimeFunctionParameters = def "DatetimeFunctionParameters" $
-  T.union [
-    "datetimeString">: gql "DatetimeString",
-    "recordConstructor">: gql "RecordConstructor"]
-
-durationValueExpression :: Binding
-durationValueExpression = def "DurationValueExpression" $
-  gql "ValueExpression"
-
-datetimeSubtraction :: Binding
-datetimeSubtraction = def "DatetimeSubtraction" $
-  T.record [
-    "parameters">: gql "DatetimeSubtractionParameters",
-    "temporalDurationQualifier">: T.maybe $ gql "TemporalDurationQualifier"]
-
-datetimeSubtractionParameters :: Binding
-datetimeSubtractionParameters = def "DatetimeSubtractionParameters" $
-  T.record [
-    "expression1">: gql "DatetimeValueExpression1",
-    "expression2">: gql "DatetimeValueExpression2"]
-
-datetimeValueExpression1 :: Binding
-datetimeValueExpression1 = def "DatetimeValueExpression1" $
-  gql "DatetimeValueExpression"
-
-datetimeValueExpression2 :: Binding
-datetimeValueExpression2 = def "DatetimeValueExpression2" $
-  gql "DatetimeValueExpression"
-
-durationValueFunction :: Binding
-durationValueFunction = def "DurationValueFunction" $
-  T.union [
-    "durationFunction">: gql "DurationFunction",
-    "absoluteValue">: gql "AbsoluteValueExpression"]
-
-durationFunction :: Binding
-durationFunction = def "DurationFunction" $
-  gql "DurationFunctionParameters"
-
-durationFunctionParameters :: Binding
-durationFunctionParameters = def "DurationFunctionParameters" $
-  T.union [
-    "durationString">: gql "DurationString",
-    "recordConstructor">: gql "RecordConstructor"]
-
-objectName :: Binding
-objectName = def "ObjectName" $
-  T.string
-
-objectNameOrBindingVariable :: Binding
-objectNameOrBindingVariable = def "ObjectNameOrBindingVariable" $
-  T.string
-
-directoryName :: Binding
-directoryName = def "DirectoryName" $
-  T.string
-
-schemaName :: Binding
-schemaName = def "SchemaName" $
-  T.string
-
-graphName :: Binding
-graphName = def "GraphName" $
-  T.string
-
-delimitedGraphName :: Binding
-delimitedGraphName = def "DelimitedGraphName" $
-  T.string
-
-graphTypeName :: Binding
-graphTypeName = def "GraphTypeName" $
-  T.string
-
-nodeTypeName :: Binding
-nodeTypeName = def "NodeTypeName" $
-  T.string
-
-edgeTypeName :: Binding
-edgeTypeName = def "EdgeTypeName" $
-  T.string
-
-bindingTableName :: Binding
-bindingTableName = def "BindingTableName" $
-  T.union [
-    "regularIdentifier">: T.string,
-    "delimitedBindingTableName">: gql "DelimitedBindingTableName"]
-
-delimitedBindingTableName :: Binding
-delimitedBindingTableName = def "DelimitedBindingTableName" $
-  T.string
-
-procedureName :: Binding
-procedureName = def "ProcedureName" $
-  T.string
-
-labelName :: Binding
-labelName = def "LabelName" $
-  T.string
-
-propertyName :: Binding
-propertyName = def "PropertyName" $
-  T.string
-
-fieldName_ :: Binding
-fieldName_ = def "FieldName" $
-  T.string
-
-elementVariable :: Binding
-elementVariable = def "ElementVariable" $
-  gql "BindingVariable"
-
-pathVariable :: Binding
-pathVariable = def "PathVariable" $
-  gql "BindingVariable"
-
-subpathVariable :: Binding
-subpathVariable = def "SubpathVariable" $
-  T.string
-
-bindingVariable :: Binding
-bindingVariable = def "BindingVariable" $
-  T.string
-
-unsignedLiteral :: Binding
-unsignedLiteral = def "UnsignedLiteral" $
-  T.union [
-    "numeric">: gql "UnsignedNumericLiteral",
-    "general">: gql "GeneralLiteral"]
-
-generalLiteral :: Binding
-generalLiteral = def "GeneralLiteral" $
-  T.union [
-    "boolean">: gql "BooleanLiteral",
-    "characterString">: gql "CharacterStringLiteral",
-    "byteString">: gql "ByteStringLiteral",
-    "temporal">: gql "TemporalLiteral",
-    "duration">: gql "DurationLiteral",
-    "nullLiteral">: gql "NullLiteral",
-    "list">: gql "ListLiteral",
-    "record">: gql "RecordLiteral"]
-
-temporalLiteral :: Binding
-temporalLiteral = def "TemporalLiteral" $
-  T.union [
-    "date">: gql "DateLiteral",
-    "time">: gql "TimeLiteral",
-    "datetime">: gql "DatetimeLiteral"]
-
-dateLiteral :: Binding
-dateLiteral = def "DateLiteral" $
-  gql "DateString"
-
-timeLiteral :: Binding
-timeLiteral = def "TimeLiteral" $
-  gql "TimeString"
-
-datetimeLiteral :: Binding
-datetimeLiteral = def "DatetimeLiteral" $
-  gql "DatetimeString"
-
-listLiteral :: Binding
-listLiteral = def "ListLiteral" $
-  gql "ListValueConstructorByEnumeration"
-
-recordLiteral :: Binding
-recordLiteral = def "RecordLiteral" $
-  gql "RecordConstructor"
-
-identifier :: Binding
-identifier = def "Identifier" $
-  T.string
-
-regularIdentifier :: Binding
-regularIdentifier = def "RegularIdentifier" $
-  T.string
-
-timeZoneString :: Binding
-timeZoneString = def "TimeZoneString" $
-  gql "CharacterStringLiteral"
-
-characterStringLiteral :: Binding
-characterStringLiteral = def "CharacterStringLiteral" $
-  T.string
-
-unsignedNumericLiteral :: Binding
-unsignedNumericLiteral = def "UnsignedNumericLiteral" $
-  T.union [
-    "exact">: gql "ExactNumericLiteral",
-    "approximate">: gql "ApproximateNumericLiteral"]
-
-exactNumericLiteral :: Binding
-exactNumericLiteral = def "ExactNumericLiteral" $
-  T.union [
-    "scientificWithSuffix">: T.string,
-    "commonWithSuffix">: T.string,
-    "commonWithoutSuffix">: T.string,
-    "integerWithSuffix">: T.string,
-    "unsignedInteger">: gql "UnsignedInteger"]
-
-approximateNumericLiteral :: Binding
-approximateNumericLiteral = def "ApproximateNumericLiteral" $
-  T.union [
-    "scientificWithSuffix">: T.string,
-    "scientificWithoutSuffix">: T.string,
-    "commonWithSuffix">: T.string,
-    "integerWithSuffix">: T.string]
-
-unsignedInteger :: Binding
-unsignedInteger = def "UnsignedInteger" $
-  T.union [
-    "decimal">: T.string,
-    "hexadecimal">: T.string,
-    "octal">: T.string,
-    "binary">: T.string]
-
-unsignedDecimalInteger :: Binding
-unsignedDecimalInteger = def "UnsignedDecimalInteger" $
-  T.string
-
-nullLiteral :: Binding
-nullLiteral = def "NullLiteral" $
-  T.unit
-
-dateString :: Binding
-dateString = def "DateString" $
-  gql "CharacterStringLiteral"
-
-timeString :: Binding
-timeString = def "TimeString" $
-  gql "CharacterStringLiteral"
-
-datetimeString :: Binding
-datetimeString = def "DatetimeString" $
-  gql "CharacterStringLiteral"
-
-durationLiteral :: Binding
-durationLiteral = def "DurationLiteral" $
-  gql "DurationString"
-
-durationString :: Binding
-durationString = def "DurationString" $
-  gql "CharacterStringLiteral"
-
-nodeSynonym :: Binding
-nodeSynonym = def "NodeSynonym" $
-  T.enum ["node", "vertex"]
-
-edgesSynonym :: Binding
-edgesSynonym = def "EdgesSynonym" $
-  T.enum ["edges", "relationships"]
-
-edgeSynonym :: Binding
-edgeSynonym = def "EdgeSynonym" $
-  T.enum ["edge", "relationship"]
-
-implies :: Binding
-implies = def "Implies" $
-  T.enum ["rightDoubleArrow", "implies"]
-
-parameterName :: Binding
-parameterName = def "ParameterName" $
-  T.string
-
-booleanLiteral :: Binding
-booleanLiteral = def "BooleanLiteral" $
-  T.enum ["true", "false", "unknown"]
-
-byteStringLiteral :: Binding
-byteStringLiteral = def "ByteStringLiteral" $
-    T.string
-
-
--- UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION_WITH_EXACT_NUMBER_SUFFIX
---     : UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION EXACT_NUMBER_SUFFIX
---     ;
---
--- UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION_WITHOUT_SUFFIX
---     : UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION
---     ;
---
--- UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION_WITH_APPROXIMATE_NUMBER_SUFFIX
---     : UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION APPROXIMATE_NUMBER_SUFFIX
---     ;
---
--- UNSIGNED_DECIMAL_IN_COMMON_NOTATION_WITH_EXACT_NUMBER_SUFFIX
---     : UNSIGNED_DECIMAL_IN_COMMON_NOTATION EXACT_NUMBER_SUFFIX
---     ;
---
--- UNSIGNED_DECIMAL_IN_COMMON_NOTATION_WITHOUT_SUFFIX
---     : UNSIGNED_DECIMAL_IN_COMMON_NOTATION
---     ;
---
--- UNSIGNED_DECIMAL_IN_COMMON_NOTATION_WITH_APPROXIMATE_NUMBER_SUFFIX
---     : UNSIGNED_DECIMAL_IN_COMMON_NOTATION APPROXIMATE_NUMBER_SUFFIX
---     ;
---
--- UNSIGNED_DECIMAL_INTEGER_WITH_EXACT_NUMBER_SUFFIX
---     : UNSIGNED_DECIMAL_INTEGER EXACT_NUMBER_SUFFIX
---     ;
---
--- UNSIGNED_DECIMAL_INTEGER_WITH_APPROXIMATE_NUMBER_SUFFIX
---     : UNSIGNED_DECIMAL_INTEGER APPROXIMATE_NUMBER_SUFFIX
---     ;
---
--- UNSIGNED_DECIMAL_INTEGER
---     : DIGIT (UNDERSCORE? DIGIT)*
---     ;
---
--- fragment EXACT_NUMBER_SUFFIX
---     : 'M'
---     ;
---
--- fragment UNSIGNED_DECIMAL_IN_SCIENTIFIC_NOTATION
---     : MANTISSA 'E' EXPONENT
---     ;
---
--- fragment MANTISSA
---     : UNSIGNED_DECIMAL_IN_COMMON_NOTATION
---     | UNSIGNED_DECIMAL_INTEGER
---     ;
---
--- fragment EXPONENT
---     : SIGNED_DECIMAL_INTEGER
---     ;
---
--- fragment UNSIGNED_DECIMAL_IN_COMMON_NOTATION
---     : UNSIGNED_DECIMAL_INTEGER (PERIOD UNSIGNED_DECIMAL_INTEGER?)
---     | PERIOD UNSIGNED_DECIMAL_INTEGER
---     ;
---
--- fragment SIGNED_DECIMAL_INTEGER
---     : (PLUS_SIGN | MINUS_SIGN)? UNSIGNED_DECIMAL_INTEGER
---     ;
---
--- UNSIGNED_HEXADECIMAL_INTEGER
---     : '0x' ('_'? HEX_DIGIT)+
---     ;
---
--- UNSIGNED_OCTAL_INTEGER
---     : '0o' ('_'? OCTAL_DIGIT)+
---     ;
---
--- UNSIGNED_BINARY_INTEGER
---     : '0b' ('_'? BINARY_DIGIT)+
---     ;
---
--- fragment APPROXIMATE_NUMBER_SUFFIX
---     : 'F'
---     | 'D'
---     ;
---
--- // 21.3 <token>, <separator>, and <identifier>
---
--- // Reserved words
--- ABS: 'ABS';
--- ACOS: 'ACOS';
--- ALL: 'ALL';
--- ALL_DIFFERENT: 'ALL_DIFFERENT';
--- AND: 'AND';
--- ANY: 'ANY';
--- ARRAY: 'ARRAY';
--- AS: 'AS';
--- ASC: 'ASC';
--- ASCENDING: 'ASCENDING';
--- ASIN: 'ASIN';
--- AT: 'AT';
--- ATAN: 'ATAN';
--- AVG: 'AVG';
--- BIG: 'BIG';
--- BIGINT: 'BIGINT';
--- BINARY: 'BINARY';
--- BOOL: 'BOOL';
--- BOOLEAN: 'BOOLEAN';
--- BOTH: 'BOTH';
--- BTRIM: 'BTRIM';
--- BY: 'BY';
--- BYTE_LENGTH: 'BYTE_LENGTH';
--- BYTES: 'BYTES';
--- CALL: 'CALL';
--- CARDINALITY: 'CARDINALITY';
--- CASE: 'CASE';
--- CAST: 'CAST';
--- CEIL: 'CEIL';
--- CEILING: 'CEILING';
--- CHAR: 'CHAR';
--- CHAR_LENGTH: 'CHAR_LENGTH';
--- CHARACTER_LENGTH: 'CHARACTER_LENGTH';
--- CHARACTERISTICS: 'CHARACTERISTICS';
--- CLOSE: 'CLOSE';
--- COALESCE: 'COALESCE';
--- COLLECT_LIST: 'COLLECT_LIST';
--- COMMIT: 'COMMIT';
--- COPY: 'COPY';
--- COS: 'COS';
--- COSH: 'COSH';
--- COT: 'COT';
--- COUNT: 'COUNT';
--- CREATE: 'CREATE';
--- CURRENT_DATE: 'CURRENT_DATE';
--- CURRENT_GRAPH: 'CURRENT_GRAPH';
--- CURRENT_PROPERTY_GRAPH: 'CURRENT_PROPERTY_GRAPH';
--- CURRENT_SCHEMA: 'CURRENT_SCHEMA';
--- CURRENT_TIME: 'CURRENT_TIME';
--- CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP';
--- DATE: 'DATE';
--- DATETIME: 'DATETIME';
--- DAY: 'DAY';
--- DEC: 'DEC';
--- DECIMAL: 'DECIMAL';
--- DEGREES: 'DEGREES';
--- DELETE: 'DELETE';
--- DESC: 'DESC';
--- DESCENDING: 'DESCENDING';
--- DETACH: 'DETACH';
--- DISTINCT: 'DISTINCT';
--- DOUBLE: 'DOUBLE';
--- DROP: 'DROP';
--- DURATION: 'DURATION';
--- DURATION_BETWEEN: 'DURATION_BETWEEN';
--- ELEMENT_ID: 'ELEMENT_ID';
--- ELSE: 'ELSE';
--- END: 'END';
--- EXCEPT: 'EXCEPT';
--- EXISTS: 'EXISTS';
--- EXP: 'EXP';
--- FILTER: 'FILTER';
--- FINISH: 'FINISH';
--- FLOAT: 'FLOAT';
--- FLOAT16: 'FLOAT16';
--- FLOAT32: 'FLOAT32';
--- FLOAT64: 'FLOAT64';
--- FLOAT128: 'FLOAT128';
--- FLOAT256: 'FLOAT256';
--- FLOOR: 'FLOOR';
--- FOR: 'FOR';
--- FROM: 'FROM';
--- GROUP: 'GROUP';
--- HAVING: 'HAVING';
--- HOME_GRAPH: 'HOME_GRAPH';
--- HOME_PROPERTY_GRAPH: 'HOME_PROPERTY_GRAPH';
--- HOME_SCHEMA: 'HOME_SCHEMA';
--- HOUR: 'HOUR';
--- IF: 'IF';
--- IN: 'IN';
--- INSERT: 'INSERT';
--- INT: 'INT';
--- INTEGER: 'INTEGER';
--- INT8: 'INT8';
--- INTEGER8: 'INTEGER8';
--- INT16: 'INT16';
--- INTEGER16: 'INTEGER16';
--- INT32: 'INT32';
--- INTEGER32: 'INTEGER32';
--- INT64: 'INT64';
--- INTEGER64: 'INTEGER64';
--- INT128: 'INT128';
--- INTEGER128: 'INTEGER128';
--- INT256: 'INT256';
--- INTEGER256: 'INTEGER256';
--- INTERSECT: 'INTERSECT';
--- INTERVAL: 'INTERVAL';
--- IS: 'IS';
--- LEADING: 'LEADING';
--- LEFT: 'LEFT';
--- LET: 'LET';
--- LIKE: 'LIKE';
--- LIMIT: 'LIMIT';
--- LIST: 'LIST';
--- LN: 'LN';
--- LOCAL: 'LOCAL';
--- LOCAL_DATETIME: 'LOCAL_DATETIME';
--- LOCAL_TIME: 'LOCAL_TIME';
--- LOCAL_TIMESTAMP: 'LOCAL_TIMESTAMP';
--- LOG: 'LOG';
--- LOG10: 'LOG10';
--- LOWER: 'LOWER';
--- LTRIM: 'LTRIM';
--- MATCH: 'MATCH';
--- MAX: 'MAX';
--- MIN: 'MIN';
--- MINUTE: 'MINUTE';
--- MOD: 'MOD';
--- MONTH: 'MONTH';
--- NEXT: 'NEXT';
--- NODETACH: 'NODETACH';
--- NORMALIZE: 'NORMALIZE';
--- NOT: 'NOT';
--- NOTHING: 'NOTHING';
--- NULL_KW: 'NULL';            // NULL is a commonly used macro in C++.
--- NULLS: 'NULLS';
--- NULLIF: 'NULLIF';
--- OCTET_LENGTH: 'OCTET_LENGTH';
--- OF: 'OF';
--- OFFSET: 'OFFSET';
--- OPTIONAL: 'OPTIONAL';
--- OR: 'OR';
--- ORDER: 'ORDER';
--- OTHERWISE: 'OTHERWISE';
--- PARAMETER: 'PARAMETER';
--- PARAMETERS: 'PARAMETERS';
--- PATH: 'PATH';
--- PATH_LENGTH: 'PATH_LENGTH';
--- PATHS: 'PATHS';
--- PERCENTILE_CONT: 'PERCENTILE_CONT';
--- PERCENTILE_DISC: 'PERCENTILE_DISC';
--- POWER: 'POWER';
--- PRECISION: 'PRECISION';
--- PROPERTY_EXISTS: 'PROPERTY_EXISTS';
--- RADIANS: 'RADIANS';
--- REAL: 'REAL';
--- RECORD: 'RECORD';
--- REMOVE: 'REMOVE';
--- REPLACE: 'REPLACE';
--- RESET: 'RESET';
--- RETURN: 'RETURN';
--- RIGHT: 'RIGHT';
--- ROLLBACK: 'ROLLBACK';
--- RTRIM: 'RTRIM';
--- SAME: 'SAME';
--- SCHEMA: 'SCHEMA';
--- SECOND: 'SECOND';
--- SELECT: 'SELECT';
--- SESSION: 'SESSION';
--- SESSION_USER: 'SESSION_USER';
--- SET: 'SET';
--- SIGNED: 'SIGNED';
--- SIN: 'SIN';
--- SINH: 'SINH';
--- SIZE: 'SIZE';
--- SKIP_RESERVED_WORD: 'SKIP';
--- SMALL: 'SMALL';
--- SMALLINT: 'SMALLINT';
--- SQRT: 'SQRT';
--- START: 'START';
--- STDDEV_POP: 'STDDEV_POP';
--- STDDEV_SAMP: 'STDDEV_SAMP';
--- STRING: 'STRING';
--- SUM: 'SUM';
--- TAN: 'TAN';
--- TANH: 'TANH';
--- THEN: 'THEN';
--- TIME: 'TIME';
--- TIMESTAMP: 'TIMESTAMP';
--- TRAILING: 'TRAILING';
--- TRIM: 'TRIM';
--- TYPED: 'TYPED';
--- UBIGINT: 'UBIGINT';
--- UINT: 'UINT';
--- UINT8: 'UINT8';
--- UINT16: 'UINT16';
--- UINT32: 'UINT32';
--- UINT64: 'UINT64';
--- UINT128: 'UINT128';
--- UINT256: 'UINT256';
--- UNION: 'UNION';
--- UNSIGNED: 'UNSIGNED';
--- UPPER: 'UPPER';
--- USE: 'USE';
--- USMALLINT: 'USMALLINT';
--- VALUE: 'VALUE';
--- VARBINARY: 'VARBINARY';
--- VARCHAR: 'VARCHAR';
--- VARIABLE: 'VARIABLE';
--- WHEN: 'WHEN';
--- WHERE: 'WHERE';
--- WITH: 'WITH';
--- XOR: 'XOR';
--- YEAR: 'YEAR';
--- YIELD: 'YIELD';
--- ZONED: 'ZONED';
--- ZONED_DATETIME: 'ZONED_DATETIME';
--- ZONED_TIME: 'ZONED_TIME';
---
--- // Prereserved words
--- ABSTRACT: 'ABSTRACT';
--- AGGREGATE: 'AGGREGATE';
--- AGGREGATES: 'AGGREGATES';
--- ALTER: 'ALTER';
--- CATALOG: 'CATALOG';
--- CLEAR: 'CLEAR';
--- CLONE: 'CLONE';
--- CONSTRAINT: 'CONSTRAINT';
--- CURRENT_ROLE: 'CURRENT_ROLE';
--- CURRENT_USER: 'CURRENT_USER';
--- DATA: 'DATA';
--- DIRECTORY: 'DIRECTORY';
--- DRYRUN: 'DRYRUN';
--- EXACT: 'EXACT';
--- EXISTING: 'EXISTING';
--- FUNCTION: 'FUNCTION';
--- GQLSTATUS: 'GQLSTATUS';
--- GRANT: 'GRANT';
--- INSTANT: 'INSTANT';
--- INFINITY_KW: 'INFINITY';            // INFINITY is a commonly used macro in C++
--- NUMBER: 'NUMBER';
--- NUMERIC: 'NUMERIC';
--- ON: 'ON';
--- OPEN: 'OPEN';
--- PARTITION: 'PARTITION';
--- PROCEDURE: 'PROCEDURE';
--- PRODUCT: 'PRODUCT';
--- PROJECT: 'PROJECT';
--- QUERY: 'QUERY';
--- RECORDS: 'RECORDS';
--- REFERENCE: 'REFERENCE';
--- RENAME: 'RENAME';
--- REVOKE: 'REVOKE';
--- SUBSTRING: 'SUBSTRING';
--- SYSTEM_USER: 'SYSTEM_USER';
--- TEMPORAL: 'TEMPORAL';
--- UNIQUE: 'UNIQUE';
--- UNIT: 'UNIT';
--- VALUES: 'VALUES';
---
--- // Nonreserved words
--- ACYCLIC: 'ACYCLIC';
--- BINDING: 'BINDING';
--- BINDINGS: 'BINDINGS';
--- CONNECTING: 'CONNECTING';
--- DESTINATION: 'DESTINATION';
--- DIFFERENT: 'DIFFERENT';
--- DIRECTED: 'DIRECTED';
--- EDGE: 'EDGE';
--- EDGES: 'EDGES';
--- ELEMENT: 'ELEMENT';
--- ELEMENTS: 'ELEMENTS';
--- FIRST: 'FIRST';
--- GRAPH: 'GRAPH';
--- GROUPS: 'GROUPS';
--- KEEP: 'KEEP';
--- LABEL: 'LABEL';
--- LABELED: 'LABELED';
--- LABELS: 'LABELS';
--- LAST: 'LAST';
--- NFC: 'NFC';
--- NFD: 'NFD';
--- NFKC: 'NFKC';
--- NFKD: 'NFKD';
--- NO: 'NO';
--- NODE: 'NODE';
--- NORMALIZED: 'NORMALIZED';
--- ONLY: 'ONLY';
--- ORDINALITY: 'ORDINALITY';
--- PROPERTY: 'PROPERTY';
--- READ: 'READ';
--- RELATIONSHIP: 'RELATIONSHIP';
--- RELATIONSHIPS: 'RELATIONSHIPS';
--- REPEATABLE: 'REPEATABLE';
--- SHORTEST: 'SHORTEST';
--- SIMPLE: 'SIMPLE';
--- SOURCE: 'SOURCE';
--- TABLE: 'TABLE';
--- TEMP: 'TEMP';
--- TO: 'TO';
--- TRAIL: 'TRAIL';
--- TRANSACTION: 'TRANSACTION';
--- TYPE: 'TYPE';
--- UNDIRECTED: 'UNDIRECTED';
--- VERTEX: 'VERTEX';
--- WALK: 'WALK';
--- WITHOUT: 'WITHOUT';
--- WRITE: 'WRITE';
--- ZONE: 'ZONE';
---
--- fragment SEPARATED_IDENTIFIER
---     : DELIMITED_IDENTIFIER
---     | EXTENDED_IDENTIFIER
---     ;
---
--- REGULAR_IDENTIFIER
---     : IDENTIFIER_START IDENTIFIER_EXTEND*
---     ;
---
--- fragment EXTENDED_IDENTIFIER
---     : IDENTIFIER_EXTEND+
---     ;
---
--- fragment DELIMITED_IDENTIFIER
---     : DOUBLE_QUOTED_CHARACTER_SEQUENCE
---     | ACCENT_QUOTED_CHARACTER_SEQUENCE
---     ;
---
--- SUBSTITUTED_PARAMETER_REFERENCE
---     : DOUBLE_DOLLAR_SIGN PARAMETER_NAME
---     ;
---
--- GENERAL_PARAMETER_REFERENCE
---     : DOLLAR_SIGN PARAMETER_NAME
---     ;
---
--- fragment IDENTIFIER_START
---     : ID_Start
---     | Pc
---     ;
---
--- fragment IDENTIFIER_EXTEND
---     : ID_Continue
---     ;
---
--- fragment ID_Start
---     : [\p{ID_Start}]
---     ;
---
--- fragment ID_Continue
---     : [\p{ID_Continue}]
---     ;
---
--- MULTISET_ALTERNATION_OPERATOR: '|+|';
---
--- BRACKET_RIGHT_ARROW: ']->';
--- BRACKET_TILDE_RIGHT_ARROW: ']~>';
--- CONCATENATION_OPERATOR: '||';
--- DOUBLE_COLON: '::';
--- DOUBLE_DOLLAR_SIGN: '$$';
--- DOUBLE_PERIOD: '..';
--- GREATER_THAN_OR_EQUALS_OPERATOR: '>=';
--- LEFT_ARROW: '<-';
--- LEFT_ARROW_TILDE: '<~';
--- LEFT_ARROW_BRACKET: '<-[';
--- LEFT_ARROW_TILDE_BRACKET: '<~[';
--- LEFT_MINUS_RIGHT: '<->';
--- LEFT_MINUS_SLASH: '<-/';
--- LEFT_TILDE_SLASH: '<~/';
--- LESS_THAN_OR_EQUALS_OPERATOR: '<=';
--- MINUS_LEFT_BRACKET: '-[';
--- MINUS_SLASH: '-/';
--- NOT_EQUALS_OPERATOR: '<>';
--- RIGHT_ARROW: '->';
--- RIGHT_BRACKET_MINUS: ']-';
--- RIGHT_BRACKET_TILDE: ']~';
--- RIGHT_DOUBLE_ARROW: '=>';
--- SLASH_MINUS: '/-';
--- SLASH_MINUS_RIGHT: '/->';
--- SLASH_TILDE: '/~';
--- SLASH_TILDE_RIGHT: '/~>';
--- TILDE_LEFT_BRACKET: '~[';
--- TILDE_RIGHT_ARROW: '~>';
--- TILDE_SLASH: '~/';
---
--- // 21.4 GQL terminal characters
---
--- AMPERSAND: '&';
--- ASTERISK: '*';
--- COLON: ':';
--- COMMA: ',';
--- COMMERCIAL_AT: '@';
--- DOLLAR_SIGN: '$';
--- DOUBLE_QUOTE: '"';
--- EQUALS_OPERATOR: '=';
--- EXCLAMATION_MARK: '!';
--- RIGHT_ANGLE_BRACKET: '>';
--- GRAVE_ACCENT: '`';
--- LEFT_BRACE: '{';
--- LEFT_BRACKET: '[';
--- LEFT_PAREN: '(';
--- LEFT_ANGLE_BRACKET: '<';
--- MINUS_SIGN: '-';
--- PERCENT: '%';
--- PERIOD: '.';
--- PLUS_SIGN: '+';
--- QUESTION_MARK: '?';
--- QUOTE: '\'';
--- REVERSE_SOLIDUS: '\\';
--- RIGHT_BRACE: '}';
--- RIGHT_BRACKET: ']';
--- RIGHT_PAREN: ')';
--- SOLIDUS: '/';
--- TILDE: '~';
--- UNDERSCORE: '_';
--- VERTICAL_BAR: '|';
---
--- fragment HEX_DIGIT
---     : [0-9a-f]
---     ;
---
--- fragment DIGIT
---     : [0-9]
---     ;
---
--- fragment OCTAL_DIGIT
---     : [0-7]
---     ;
---
--- fragment BINARY_DIGIT
---     : [0-1]
---     ;
---
--- SP
---   : (WHITESPACE)+
---   -> channel(HIDDEN)
---   ;
---
--- WHITESPACE
---     : SPACE
---     | TAB
---     | LF
---     | VT
---     | FF
---     | CR
---     | FS
---     | GS
---     | RS
---     | US
---     | '\u1680'
---     | '\u180e'
---     | '\u2000'
---     | '\u2001'
---     | '\u2002'
---     | '\u2003'
---     | '\u2004'
---     | '\u2005'
---     | '\u2006'
---     | '\u2008'
---     | '\u2009'
---     | '\u200a'
---     | '\u2028'
---     | '\u2029'
---     | '\u205f'
---     | '\u3000'
---     | '\u00a0'
---     | '\u2007'
---     | '\u202f'
---     ;
---
--- BRACKETED_COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
---
--- SIMPLE_COMMENT_SOLIDUS: '//' ~[\r\n]* -> channel(HIDDEN);
---
--- SIMPLE_COMMENT_MINUS: '--' ~[\r\n]* -> channel(HIDDEN);
---
--- fragment GS : [\u001D];
---
--- fragment FS : [\u001C];
---
--- fragment CR : [\r];
---
--- fragment Sc : [\p{Sc}];
---
--- fragment SPACE : [ ];
---
--- fragment Pc : [\p{Pc}];
---
--- fragment TAB : [\t];
---
--- fragment LF : [\n];
---
--- fragment VT : [\u000B];
---
--- fragment US : [\u001F];
---
--- fragment FF: [\f];
---
--- fragment RS: [\u001E];
diff --git a/src/main/haskell/Hydra/Sources/Gql/PathAlgebra/Expressions.hs b/src/main/haskell/Hydra/Sources/Gql/PathAlgebra/Expressions.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Gql/PathAlgebra/Expressions.hs
+++ /dev/null
@@ -1,337 +0,0 @@
-module Hydra.Sources.Gql.PathAlgebra.Expressions where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-
-
-ns :: Namespace
-ns = Namespace "com.gdblab.pathAlgebra.expressions"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-expr :: String -> Type
-expr = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Algebraic expression trees for the path algebra by Angles et al., extended for GQL support"}
-  where
-    definitions = [
-      queryExpression, pathExpression, baseExpression, graphReference,
-      selectionExpression, selectionCondition, simpleCondition, labelCondition,
-      propertyCondition, propertyComparisonCondition, comparisonOperator,
-      literalValue, lengthCondition, pathElement, andCondition, orCondition,
-      notCondition, joinExpression, unionExpression, recursiveExpression,
-      pathSemantics, solutionSpaceExpression, groupByExpression_, groupByCriterion,
-      orderByExpression_, orderByCriterion, projectionExpression, projectionSpec,
-      resultProjection, propertyExtraction, propertySource, nodePropertyRef,
-      edgePropertyRef, pathPropertyRef]
-
-queryExpression :: Binding
-queryExpression = define "QueryExpression" $
-  doc "Complete query with path algebra and result projection" $
-  T.record [
-    "pathExpression">: expr "PathExpression",
-    "resultProjection">: T.optional $ expr "ResultProjection"]
-
-pathExpression :: Binding
-pathExpression = define "PathExpression" $
-  doc "A path algebra expression that evaluates to a set of paths" $
-  T.union [
-    "base">:
-      doc "Base case: extract paths from graph" $
-      expr "BaseExpression",
-    "selection">:
-      doc "Selection operator (σ): filter paths by condition" $
-      expr "SelectionExpression",
-    "join">:
-      doc "Join operator (⊲⊳): concatenate compatible paths" $
-      expr "JoinExpression",
-    "union">:
-      doc "Union operator (∪): combine path sets" $
-      expr "UnionExpression",
-    "recursive">:
-      doc "Recursive operator (φ): compute transitive closure with semantics" $
-      expr "RecursiveExpression",
-    "groupBy">:
-      doc "Group-by operator (γ): organize paths into solution space" $
-      expr "GroupByExpression",
-    "orderBy">:
-      doc "Order-by operator (τ): sort solution space" $
-      expr "OrderByExpression",
-    "projection">:
-      doc "Projection operator (π): extract paths from solution space" $
-      expr "ProjectionExpression"]
-
-baseExpression :: Binding
-baseExpression = define "BaseExpression" $
-  doc "Base path expressions that extract paths from graph" $
-  T.union [
-    "paths0">:
-      doc "Paths0(G): all paths of length 0 (nodes)" $
-      expr "GraphReference",
-    "paths1">:
-      doc "Paths1(G): all paths of length 1 (edges)" $
-      expr "GraphReference",
-    "pathsStar">:
-      doc "Paths*(G): all paths in graph (infinite without restrictions)" $
-      expr "GraphReference"]
-
-graphReference :: Binding
-graphReference = define "GraphReference" $
-  doc "Reference to a property graph" $
-  T.wrap T.string
-
-selectionExpression :: Binding
-selectionExpression = define "SelectionExpression" $
-  doc "Selection operator: σ_condition(expression)" $
-  T.record [
-    "condition">: expr "SelectionCondition",
-    "expression">: expr "PathExpression"]
-
-selectionCondition :: Binding
-selectionCondition = define "SelectionCondition" $
-  doc "Conditions for filtering paths" $
-  T.union [
-    "simple">: expr "SimpleCondition",
-    "and">: expr "AndCondition",
-    "or">: expr "OrCondition",
-    "not">: expr "NotCondition"]
-
-simpleCondition :: Binding
-simpleCondition = define "SimpleCondition" $
-  doc "Atomic selection conditions" $
-  T.union [
-    "labelEquals">: expr "LabelCondition",
-    "propertyEquals">: expr "PropertyCondition",
-    "propertyComparison">: expr "PropertyComparisonCondition",
-    "lengthEquals">: expr "LengthCondition"]
-
-labelCondition :: Binding
-labelCondition = define "LabelCondition" $
-  doc "Conditions on node/edge labels: label(node(i)) = v" $
-  T.record [
-    "target">: expr "PathElement",
-    "value">: T.string]
-
-propertyCondition :: Binding
-propertyCondition = define "PropertyCondition" $
-  doc "Property equality conditions: node(i).prop = v" $
-  T.record [
-    "target">: expr "PathElement",
-    "property">: T.string,
-    "value">: expr "LiteralValue"]
-
-propertyComparisonCondition :: Binding
-propertyComparisonCondition = define "PropertyComparisonCondition" $
-  doc "Property comparison conditions: node(i).prop > v, etc." $
-  T.record [
-    "target">: expr "PathElement",
-    "property">: T.string,
-    "operator">: expr "ComparisonOperator",
-    "value">: expr "LiteralValue"]
-
-comparisonOperator :: Binding
-comparisonOperator = define "ComparisonOperator" $
-  doc "Comparison operators for property conditions" $
-  T.enum [
-    "equal",
-    "notEqual",
-    "lessThan",
-    "lessThanOrEqual",
-    "greaterThan",
-    "greaterThanOrEqual"]
-
-literalValue :: Binding
-literalValue = define "LiteralValue" $
-  doc "Literal values for comparisons" $
-  T.union [
-    "string">: T.string,
-    "integer">: T.int32,
-    "float">: T.float64,
-    "boolean">: T.boolean]
-
-lengthCondition :: Binding
-lengthCondition = define "LengthCondition" $
-  doc "Condition on path length: len() = i" $
-  T.record [
-    "length">: T.int32]
-
-pathElement :: Binding
-pathElement = define "PathElement" $
-  doc "References to elements within a path" $
-  T.union [
-    "node">: T.int32,
-    "edge">: T.int32,
-    "first">: T.unit,
-    "last">: T.unit]
-
-andCondition :: Binding
-andCondition = define "AndCondition" $
-  T.record [
-    "left">: expr "SelectionCondition",
-    "right">: expr "SelectionCondition"]
-
-orCondition :: Binding
-orCondition = define "OrCondition" $
-  T.record [
-    "left">: expr "SelectionCondition",
-    "right">: expr "SelectionCondition"]
-
-notCondition :: Binding
-notCondition = define "NotCondition" $
-  T.record [
-    "condition">: expr "SelectionCondition"]
-
-joinExpression :: Binding
-joinExpression = define "JoinExpression" $
-  doc "Join operator: expr1 ⊲⊳ expr2" $
-  T.record [
-    "left">: expr "PathExpression",
-    "right">: expr "PathExpression"]
-
-unionExpression :: Binding
-unionExpression = define "UnionExpression" $
-  doc "Union operator: expr1 ∪ expr2" $
-  T.record [
-    "left">: expr "PathExpression",
-    "right">: expr "PathExpression"]
-
-recursiveExpression :: Binding
-recursiveExpression = define "RecursiveExpression" $
-  doc "Recursive operator with path semantics" $
-  T.record [
-    "semantics">: expr "PathSemantics",
-    "expression">: expr "PathExpression"]
-
-pathSemantics :: Binding
-pathSemantics = define "PathSemantics" $
-  doc "Path semantics for recursive operations" $
-  T.enum [
-    "walk",
-    "trail",
-    "acyclic",
-    "simple",
-    "shortest"]
-
-solutionSpaceExpression :: Binding
-solutionSpaceExpression = define "SolutionSpaceExpression" $
-  doc "Expressions that work with solution spaces" $
-  T.union [
-    "groupBy">: expr "GroupByExpression",
-    "orderBy">: expr "OrderByExpression"]
-
-groupByExpression_ :: Binding
-groupByExpression_ = define "GroupByExpression" $
-  doc "Group-by operator: γ_criterion(expression)" $
-  T.record [
-    "criterion">: expr "GroupByCriterion",
-    "expression">: expr "PathExpression"]
-
-groupByCriterion :: Binding
-groupByCriterion = define "GroupByCriterion" $
-  doc "Grouping criteria corresponding to paper's γ variants" $
-  T.enum [
-    "none",
-    "source",
-    "target",
-    "length",
-    "sourceTarget",
-    "sourceLength",
-    "targetLength",
-    "sourceTargetLength"]
-
-orderByExpression_ :: Binding
-orderByExpression_ = define "OrderByExpression" $
-  doc "Order-by operator: τ_criterion(solutionSpace)" $
-  T.record [
-    "criterion">: expr "OrderByCriterion",
-    "expression">: expr "SolutionSpaceExpression"]
-
-orderByCriterion :: Binding
-orderByCriterion = define "OrderByCriterion" $
-  doc "Ordering criteria corresponding to paper's τ variants" $
-  T.enum [
-    "partition",
-    "group",
-    "path",
-    "partitionGroup",
-    "partitionPath",
-    "groupPath",
-    "partitionGroupPath"]
-
-projectionExpression :: Binding
-projectionExpression = define "ProjectionExpression" $
-  doc "Projection operator: π_(#P,#G,#A)(solutionSpace)" $
-  T.record [
-    "partitions">: expr "ProjectionSpec",
-    "groups">: expr "ProjectionSpec",
-    "paths">: expr "ProjectionSpec",
-    "expression">: expr "SolutionSpaceExpression"]
-
-projectionSpec :: Binding
-projectionSpec = define "ProjectionSpec" $
-  doc "Projection specification: * or specific number" $
-  T.union [
-    "all">: T.unit,
-    "limited">: T.int32]
-
-resultProjection :: Binding
-resultProjection = define "ResultProjection" $
-  doc "Extract specific values from paths for RETURN clause" $
-  T.record [
-    "projections">: T.list $ expr "PropertyExtraction"]
-
-propertyExtraction :: Binding
-propertyExtraction = define "PropertyExtraction" $
-  doc "Extract properties from path elements" $
-  T.record [
-    "alias">: T.optional T.string,
-    "source">: expr "PropertySource"]
-
-propertySource :: Binding
-propertySource = define "PropertySource" $
-  doc "Source of a property value" $
-  T.union [
-    "nodeProperty">: expr "NodePropertyRef",
-    "edgeProperty">: expr "EdgePropertyRef",
-    "pathProperty">: expr "PathPropertyRef"]
-
-nodePropertyRef :: Binding
-nodePropertyRef = define "NodePropertyRef" $
-  doc "Reference to a node property: node.property" $
-  T.record [
-    "element">: expr "PathElement",
-    "property">: T.string]
-
-edgePropertyRef :: Binding
-edgePropertyRef = define "EdgePropertyRef" $
-  doc "Reference to an edge property: edge.property" $
-  T.record [
-    "element">: expr "PathElement",
-    "property">: T.string]
-
-pathPropertyRef :: Binding
-pathPropertyRef = define "PathPropertyRef" $
-  doc "Reference to path-level properties: length, etc." $
-  T.enum [
-    "length",
-    "startNode",
-    "endNode"]
diff --git a/src/main/haskell/Hydra/Sources/Gql/PathAlgebra/Syntax.hs b/src/main/haskell/Hydra/Sources/Gql/PathAlgebra/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Gql/PathAlgebra/Syntax.hs
+++ /dev/null
@@ -1,236 +0,0 @@
-module Hydra.Sources.Gql.PathAlgebra.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "com.gdblab.pathAlgebra.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pathAlg :: String -> Type
-pathAlg = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("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")}
-  where
-    definitions = terminals ++ nonterminals
-
-    terminals = [
-      number, text, label, variable, pathName_]
-
-    nonterminals = [
-      pathQuery, projection, partProj, groupProj, pathProj, restrictorExt,
-      orderBy, groupBy, orderByOption, groupByOption, pathPattern, nodePattern,
-      edgePattern, edgeDirection, rpq, plus_, star_, concatenation, alternation,
-      rpqRestrictor, complexCondition, compoundComplexCondition, condition,
-      compareSym, function_, simpleFunction, nestedFunction, complexFunction, boolOp]
-
--- Terminals from the grammar
-number :: Binding
-number = define "Number" T.bigint
-
-text :: Binding
-text = define "Text" T.string
-
-label :: Binding
-label = define "Label" T.string
-
-variable :: Binding
-variable = define "Variable" T.string
-
-pathName_ :: Binding
-pathName_ = define "PathName" T.string
-
--- Nonterminal productions from the grammar
-pathQuery :: Binding
-pathQuery = define "PathQuery" $ T.record [
-  "projection">: pathAlg "Projection",
-  "restrictorExt">: T.optional $ pathAlg "RestrictorExt",
-  "pathPattern">: pathAlg "PathPattern",
-  "groupBy">: T.optional $ pathAlg "GroupBy",
-  "orderBy">: T.optional $ pathAlg "OrderBy"]
-
-projection :: Binding
-projection = define "Projection" $ T.record [
-  "partProj">: pathAlg "PartProj",
-  "groupProj">: pathAlg "GroupProj",
-  "pathProj">: pathAlg "PathProj"]
-
-partProj :: Binding
-partProj = define "PartProj" $ T.union [
-  "all">: T.unit,
-  "limited">: pathAlg "Number"]
-
-groupProj :: Binding
-groupProj = define "GroupProj" $ T.union [
-  "all">: T.unit,
-  "limited">: pathAlg "Number"]
-
-pathProj :: Binding
-pathProj = define "PathProj" $ T.union [
-  "all">: T.unit,
-  "limited">: pathAlg "Number"]
-
-restrictorExt :: Binding
-restrictorExt = define "RestrictorExt" $ T.enum [
-  "walk",
-  "trail",
-  "simple",
-  "acyclic",
-  "shortest"]
-
-orderBy :: Binding
-orderBy = define "OrderBy" $ T.wrap $ pathAlg "OrderByOption"
-
-groupBy :: Binding
-groupBy = define "GroupBy" $ T.wrap $ pathAlg "GroupByOption"
-
-orderByOption :: Binding
-orderByOption = define "OrderByOption" $ T.enum [
-  "partition",
-  "group",
-  "path",
-  "partitionGroup",
-  "partitionPath",
-  "groupPath",
-  "partitionGroupPath"]
-
-groupByOption :: Binding
-groupByOption = define "GroupByOption" $ T.enum [
-  "source",
-  "target",
-  "length",
-  "sourceTarget",
-  "sourceLength",
-  "targetLength",
-  "sourceTargetLength"]
-
-pathPattern :: Binding
-pathPattern = define "PathPattern" $ T.record [
-  "pathName">: pathAlg "PathName",
-  "startNode">: pathAlg "NodePattern",
-  "edge">: pathAlg "EdgePattern",
-  "endNode">: pathAlg "NodePattern",
-  "condition">: T.optional $ pathAlg "ComplexCondition"]
-
-nodePattern :: Binding
-nodePattern = define "NodePattern" $ T.record [
-  "variable">: T.optional $ pathAlg "Variable"]
-
-edgePattern :: Binding
-edgePattern = define "EdgePattern" $ T.record [
-  "direction">: pathAlg "EdgeDirection",
-  "rpq">: T.optional $ pathAlg "Rpq"]
-
-edgeDirection :: Binding
-edgeDirection = define "EdgeDirection" $ T.enum [
-  "outgoing",
-  "incoming",
-  "undirected"]
-
-rpq :: Binding
-rpq = define "Rpq" $ T.union [
-  "parenthesis">: pathAlg "Rpq",
-  "label">: pathAlg "Label",
-  "negated">: pathAlg "Label",
-  "reverse">: pathAlg "Label",
-  "optional">: pathAlg "Rpq",
-  "plus">: pathAlg "Plus",
-  "star">: pathAlg "Star",
-  "concatenation">: pathAlg "Concatenation",
-  "alternation">: pathAlg "Alternation"]
-
-plus_ :: Binding
-plus_ = define "Plus" $ T.record [
-  "expression">: pathAlg "Rpq",
-  "restrictor">: T.optional $ pathAlg "RpqRestrictor"]
-
-star_ :: Binding
-star_ = define "Star" $ T.record [
-  "expression">: pathAlg "Rpq",
-  "restrictor">: T.optional $ pathAlg "RpqRestrictor"]
-
-concatenation :: Binding
-concatenation = define "Concatenation" $ T.record [
-  "left">: pathAlg "Rpq",
-  "right">: pathAlg "Rpq"]
-
-alternation :: Binding
-alternation = define "Alternation" $ T.record [
-  "left">: pathAlg "Rpq",
-  "right">: pathAlg "Rpq"]
-
-rpqRestrictor :: Binding
-rpqRestrictor = define "RpqRestrictor" $ T.wrap $ pathAlg "RestrictorExt"
-
-complexCondition :: Binding
-complexCondition = define "ComplexCondition" $ T.union [
-  "simple">: pathAlg "Condition",
-  "compound">: pathAlg "CompoundComplexCondition"]
-
-compoundComplexCondition :: Binding
-compoundComplexCondition = define "CompoundComplexCondition" $ T.record [
-  "lhs">: pathAlg "Condition",
-  "operator">: pathAlg "BoolOp",
-  "rhs">: pathAlg "ComplexCondition"]
-
-condition :: Binding
-condition = define "Condition" $ T.record [
-  "function">: pathAlg "Function",
-  "compareSym">: pathAlg "CompareSym",
-  "value">: pathAlg "Text"]
-
-compareSym :: Binding
-compareSym = define "CompareSym" $ T.enum [
-  "equal",
-  "notEqual",
-  "lessThan",
-  "greaterThan",
-  "lessThanOrEqual",
-  "greaterThanOrEqual"]
-
-function_ :: Binding
-function_ = define "Function" $ T.union [
-  "simple">: pathAlg "SimpleFunction",
-  "nested">: pathAlg "NestedFunction",
-  "complex">: pathAlg "ComplexFunction"]
-
-simpleFunction :: Binding
-simpleFunction = define "SimpleFunction" $ T.record [
-  "name">: pathAlg "Text",
-  "argument">: pathAlg "Text"]
-
-nestedFunction :: Binding
-nestedFunction = define "NestedFunction" $ T.record [
-  "name">: pathAlg "Text",
-  "innerFunction">: pathAlg "Function"]
-
-complexFunction :: Binding
-complexFunction = define "ComplexFunction" $ T.record [
-  "name">: pathAlg "Text",
-  "innerFunction">: pathAlg "Function",
-  "additionalArg">: pathAlg "Text"]
-
-boolOp :: Binding
-boolOp = define "BoolOp" $ T.enum [
-  "and",
-  "or"]
diff --git a/src/main/haskell/Hydra/Sources/Graphql/Coder.hs b/src/main/haskell/Hydra/Sources/Graphql/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphql/Coder.hs
+++ /dev/null
@@ -1,424 +0,0 @@
-module Hydra.Sources.Graphql.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Graphql.Syntax as G
-import qualified Hydra.Sources.Graphql.Syntax as GraphqlSyntax
-import qualified Hydra.Sources.Graphql.Language as GraphqlLanguage
-import qualified Hydra.Sources.Graphql.Serde as GraphqlSerde
-import qualified Hydra.Dsl.Meta.Context as Ctx
-import qualified Hydra.Dsl.Errors as Error
-
-
-ns :: Namespace
-ns = Namespace "hydra.graphql.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Names.ns, Strip.ns, Environment.ns, Predicates.ns, Annotations.ns, Serialization.ns,
-      moduleNamespace GraphqlLanguage.module_,
-      GraphqlSerde.ns],
-            moduleTypeDependencies = (moduleNamespace GraphqlSyntax.module_:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "GraphQL code generator: converts Hydra modules to GraphQL schema definitions"}
-  where
-    definitions = [
-      toDefinition descriptionFromType,
-      toDefinition encodeEnumFieldName,
-      toDefinition encodeEnumFieldType,
-      toDefinition encodeFieldName,
-      toDefinition encodeFieldType,
-      toDefinition encodeLiteralType,
-      toDefinition encodeNamedType,
-      toDefinition encodeType,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeTypeName,
-      toDefinition encodeUnionFieldType,
-      toDefinition moduleToGraphql,
-      toDefinition sanitize]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Helper: find namespace prefixes from type definitions
-findPrefixes :: TTerm (Namespace -> [TypeDefinition] -> M.Map Namespace String)
-findPrefixes = lambda "modNs" $ lambda "tdefs" $ lets [
-  "namespaces">: (Lists.nub :: TTerm [Namespace] -> TTerm [Namespace]) $ Maybes.cat $ Lists.map
-    (lambda "td" $ Names.namespaceOf @@ (Packaging.typeDefinitionName $ var "td"))
-    (var "tdefs")] $
-  Maps.fromList $ Lists.map
-    (lambda "ns_" $ pair (var "ns_")
-      (Logic.ifElse (Equality.equal (var "ns_") (var "modNs"))
-        (string "")
-        (Strings.cat2 (Formatting.sanitizeWithUnderscores @@ Sets.empty @@ (Packaging.unNamespace $ var "ns_")) (string "_"))))
-    (var "namespaces")
-
--- | Helper: wrap a type in a record with a single "value" field
-wrapAsRecord :: TTerm Name -> TTerm Context -> TTerm Graph -> TTerm (M.Map Namespace String) -> TTerm Type -> TTerm (Either Error G.TypeDefinition)
-wrapAsRecord name cx g prefixes innerTyp =
-  encodeNamedType @@ cx @@ g @@ prefixes @@ name @@
-    (inject _Type _Type_record $ list [
-      Core.fieldType (Core.name $ string "value") innerTyp])
-
--- | Get the description from a type as a GraphQL Description
-descriptionFromType :: TTermDefinition (Context -> Graph -> Type -> Either Error (Maybe G.Description))
-descriptionFromType = define "descriptionFromType" $
-  "cx" ~> "g" ~> lambda "typ" $
-    Eithers.map
-      (lambda "mval" $ Maybes.map
-        (lambda "s" $ wrap G._Description (wrap G._StringValue (var "s")))
-        (var "mval"))
-      (Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "typ")
-
--- | Encode a field name to a GraphQL EnumValue
-encodeEnumFieldName :: TTermDefinition (Name -> G.EnumValue)
-encodeEnumFieldName = define "encodeEnumFieldName" $
-  lambda "name" $ wrap G._EnumValue (wrap G._Name (sanitize @@ (Core.unName $ var "name")))
-
--- | Encode an enum field type to a GraphQL EnumValueDefinition
-encodeEnumFieldType :: TTermDefinition (Context -> Graph -> FieldType -> Either Error G.EnumValueDefinition)
-encodeEnumFieldType = define "encodeEnumFieldType" $
-  "cx" ~> "g" ~> lambda "ft" $
-    "desc" <<~ (descriptionFromType @@ var "cx" @@ var "g" @@ (Core.fieldTypeType $ var "ft")) $
-    right (record G._EnumValueDefinition [
-      G._EnumValueDefinition_Description>>: var "desc",
-      G._EnumValueDefinition_EnumValue>>: (encodeEnumFieldName @@ (Core.fieldTypeName $ var "ft")),
-      G._EnumValueDefinition_Directives>>: nothing])
-
--- | Encode a field name to a GraphQL Name
-encodeFieldName :: TTermDefinition (Name -> G.Name)
-encodeFieldName = define "encodeFieldName" $
-  lambda "name" $ wrap G._Name (sanitize @@ (Core.unName $ var "name"))
-
--- | Encode a field type to a GraphQL FieldDefinition
-encodeFieldType :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> FieldType -> Either Error G.FieldDefinition)
-encodeFieldType = define "encodeFieldType" $
-  "cx" ~> "g" ~> lambda "prefixes" $ lambda "ft" $
-    "gtype" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (Core.fieldTypeType $ var "ft")) $
-    "desc" <<~ (descriptionFromType @@ var "cx" @@ var "g" @@ (Core.fieldTypeType $ var "ft")) $
-    right (record G._FieldDefinition [
-      G._FieldDefinition_Description>>: var "desc",
-      G._FieldDefinition_Name>>: (encodeFieldName @@ (Core.fieldTypeName $ var "ft")),
-      G._FieldDefinition_ArgumentsDefinition>>: nothing,
-      G._FieldDefinition_Type>>: var "gtype",
-      G._FieldDefinition_Directives>>: nothing])
-
--- | Encode a literal type to a GraphQL NamedType
-encodeLiteralType :: TTermDefinition (Context -> LiteralType -> Either Error G.NamedType)
-encodeLiteralType = define "encodeLiteralType" $
-  "cx" ~> lambda "lt" $
-    cases _LiteralType (var "lt")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "Expected GraphQL-compatible literal type, found: ") (ShowCore.literalType @@ var "lt")) (var "cx")) [
-      _LiteralType_boolean>>: constant $
-        right (wrap G._NamedType (wrap G._Name (string "Boolean"))),
-      _LiteralType_float>>: lambda "ft_" $
-        cases _FloatType (var "ft_")
-          (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "Expected 64-bit float type, found: ") (ShowCore.floatType @@ var "ft_")) (var "cx")) [
-          _FloatType_float64>>: constant $
-            right (wrap G._NamedType (wrap G._Name (string "Float")))],
-      _LiteralType_integer>>: lambda "it_" $
-        cases _IntegerType (var "it_")
-          (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "Expected 32-bit signed integer type, found: ") (ShowCore.integerType @@ var "it_")) (var "cx")) [
-          _IntegerType_int32>>: constant $
-            right (wrap G._NamedType (wrap G._Name (string "Int")))],
-      _LiteralType_string>>: constant $
-        right (wrap G._NamedType (wrap G._Name (string "String")))]
-
--- | Encode a named type to a GraphQL type definition.
-encodeNamedType :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Name -> Type -> Either Error G.TypeDefinition)
-encodeNamedType = define "encodeNamedType" $
-  "cx" ~> "g" ~> lambda "prefixes" $ lambda "name" $ lambda "typ" $
-    cases _Type (Strip.deannotateType @@ var "typ")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "Expected record or union type, found: ") (ShowCore.type_ @@ var "typ")) (var "cx")) [
-      _Type_record>>: lambda "rt" $
-        "gfields" <<~ (Eithers.mapList (lambda "f" $ encodeFieldType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "f") (var "rt")) $
-        "desc" <<~ (descriptionFromType @@ var "cx" @@ var "g" @@ var "typ") $
-        right (inject G._TypeDefinition G._TypeDefinition_object $ record G._ObjectTypeDefinition [
-          G._ObjectTypeDefinition_Description>>: var "desc",
-          G._ObjectTypeDefinition_Name>>: (encodeTypeName @@ var "prefixes" @@ var "name"),
-          G._ObjectTypeDefinition_ImplementsInterfaces>>: nothing,
-          G._ObjectTypeDefinition_Directives>>: nothing,
-          G._ObjectTypeDefinition_FieldsDefinition>>: just (wrap G._FieldsDefinition (var "gfields"))]),
-      _Type_union>>: lambda "rt" $
-        Logic.ifElse (Predicates.isEnumRowType @@ var "rt")
-          -- Pure enum: all variants are unit-typed
-          ("values" <<~ (Eithers.mapList (lambda "f" $ encodeEnumFieldType @@ var "cx" @@ var "g" @@ var "f") (var "rt")) $
-           "desc" <<~ (descriptionFromType @@ var "cx" @@ var "g" @@ var "typ") $
-           right (inject G._TypeDefinition G._TypeDefinition_enum $ record G._EnumTypeDefinition [
-             G._EnumTypeDefinition_Description>>: var "desc",
-             G._EnumTypeDefinition_Name>>: (encodeTypeName @@ var "prefixes" @@ var "name"),
-             G._EnumTypeDefinition_Directives>>: nothing,
-             G._EnumTypeDefinition_EnumValuesDefinition>>: just (wrap G._EnumValuesDefinition (var "values"))]))
-          -- Data-carrying union: encode as object type with nullable fields (one per variant)
-          ("gfields" <<~ (Eithers.mapList (lambda "f" $ encodeUnionFieldType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "f") (var "rt")) $
-           "desc" <<~ (descriptionFromType @@ var "cx" @@ var "g" @@ var "typ") $
-           right (inject G._TypeDefinition G._TypeDefinition_object $ record G._ObjectTypeDefinition [
-             G._ObjectTypeDefinition_Description>>: var "desc",
-             G._ObjectTypeDefinition_Name>>: (encodeTypeName @@ var "prefixes" @@ var "name"),
-             G._ObjectTypeDefinition_ImplementsInterfaces>>: nothing,
-             G._ObjectTypeDefinition_Directives>>: nothing,
-             G._ObjectTypeDefinition_FieldsDefinition>>: just (wrap G._FieldsDefinition (var "gfields"))])),
-      _Type_either>>: lambda "et" $
-        encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "name" @@
-          (inject _Type _Type_record $ list [
-            Core.fieldType (Core.name $ string "left") (MetaTypes.optional (project _EitherType _EitherType_left @@ var "et")),
-            Core.fieldType (Core.name $ string "right") (MetaTypes.optional (project _EitherType _EitherType_right @@ var "et"))]),
-      _Type_pair>>: lambda "pt" $
-        encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "name" @@
-          (inject _Type _Type_record $ list [
-            Core.fieldType (Core.name $ string "first") (project _PairType _PairType_first @@ var "pt"),
-            Core.fieldType (Core.name $ string "second") (project _PairType _PairType_second @@ var "pt")]),
-      _Type_list>>: lambda "lt_" $
-        wrapAsRecord (var "name") (var "cx") (var "g") (var "prefixes") (inject _Type _Type_list (var "lt_")),
-      _Type_set>>: lambda "st" $
-        wrapAsRecord (var "name") (var "cx") (var "g") (var "prefixes") (inject _Type _Type_list (var "st")),
-      _Type_map>>: lambda "mt" $
-        encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "name" @@
-          (inject _Type _Type_record $ list [
-            Core.fieldType (Core.name $ string "key") (Core.mapTypeKeys (var "mt")),
-            Core.fieldType (Core.name $ string "value") (Core.mapTypeValues (var "mt"))]),
-      _Type_literal>>: lambda "lt_" $
-        wrapAsRecord (var "name") (var "cx") (var "g") (var "prefixes") (inject _Type _Type_literal (var "lt_")),
-      _Type_variable>>: lambda "vn" $
-        wrapAsRecord (var "name") (var "cx") (var "g") (var "prefixes") (inject _Type _Type_variable (var "vn")),
-      _Type_wrap>>: lambda "wt" $
-        wrapAsRecord (var "name") (var "cx") (var "g") (var "prefixes") (var "wt"),
-      _Type_unit>>: constant $
-        wrapAsRecord (var "name") (var "cx") (var "g") (var "prefixes") (inject _Type _Type_literal (inject _LiteralType _LiteralType_boolean unit)),
-      -- Forall: strip the quantifier and encode the body type
-      _Type_forall>>: lambda "ft" $
-        encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "name" @@ (Core.forallTypeBody (var "ft")),
-      -- Type application: use the function type (strip the argument)
-      _Type_application>>: lambda "at" $
-        encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "name" @@ (Core.applicationTypeFunction (var "at")),
-      -- Function types: encode as a record with domain and codomain fields
-      _Type_function>>: lambda "ft" $
-        encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "name" @@
-          (inject _Type _Type_record $ list [
-            Core.fieldType (Core.name $ string "domain") (Core.functionTypeDomain (var "ft")),
-            Core.fieldType (Core.name $ string "codomain") (Core.functionTypeCodomain (var "ft"))])]
-
--- | Encode a Hydra type as a GraphQL type reference
-encodeType :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Type -> Either Error G.Type)
-encodeType = define "encodeType" $
-  "cx" ~> "g" ~> lambda "prefixes" $ lambda "typ" $
-    cases _Type (Strip.deannotateType @@ var "typ")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "Expected GraphQL-compatible type, found: ") (ShowCore.type_ @@ var "typ")) (var "cx")) [
-      _Type_maybe>>: lambda "et" $
-        cases _Type (Strip.deannotateType @@ var "et")
-          (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "Expected GraphQL-compatible type, found: ") (ShowCore.type_ @@ var "et")) (var "cx")) [
-          _Type_list>>: lambda "et2" $
-            Eithers.map (lambda "gt" $ inject G._Type G._Type_list (wrap G._ListType (var "gt")))
-              (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "et2"),
-          _Type_set>>: lambda "st" $
-            Eithers.map (lambda "gt" $ inject G._Type G._Type_list (wrap G._ListType (var "gt")))
-              (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "st"),
-          _Type_map>>: lambda "mt" $
-            Eithers.map (lambda "gt" $ inject G._Type G._Type_list (wrap G._ListType (var "gt")))
-              (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (Core.mapTypeValues (var "mt"))),
-          _Type_literal>>: lambda "lt_" $
-            Eithers.map (lambda "nt" $ inject G._Type G._Type_named (var "nt"))
-              (encodeLiteralType @@ var "cx" @@ var "lt_"),
-          _Type_pair>>: constant $
-            right (inject G._Type G._Type_named (wrap G._NamedType (encodeTypeName @@ var "prefixes" @@ (Core.name $ string "hydra.util.Pair")))),
-          _Type_either>>: constant $
-            right (inject G._Type G._Type_named (wrap G._NamedType (encodeTypeName @@ var "prefixes" @@ (Core.name $ string "hydra.util.Either")))),
-          _Type_record>>: constant $
-            Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous record type")) (var "cx"),
-          _Type_union>>: constant $
-            Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous union type")) (var "cx"),
-          _Type_wrap>>: lambda "wt" $
-            encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (MetaTypes.optional (var "wt")),
-          _Type_variable>>: lambda "n" $
-            right (inject G._Type G._Type_named (wrap G._NamedType (encodeTypeName @@ var "prefixes" @@ (var "n")))),
-          _Type_forall>>: lambda "ft" $
-            encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (MetaTypes.optional (Core.forallTypeBody (var "ft"))),
-          _Type_application>>: lambda "at" $
-            encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (MetaTypes.optional (Core.applicationTypeFunction (var "at"))),
-          _Type_function>>: constant $
-            right (inject G._Type G._Type_named (wrap G._NamedType (wrap G._Name (string "String")))),
-          _Type_unit>>: constant $
-            right (inject G._Type G._Type_named (wrap G._NamedType (wrap G._Name (string "Boolean"))))],
-      -- Non-optional types become non-null
-      _Type_list>>: lambda "et" $
-        Eithers.map (lambda "gt" $ inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_list (wrap G._ListType (var "gt"))))
-          (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "et"),
-      _Type_set>>: lambda "st" $
-        Eithers.map (lambda "gt" $ inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_list (wrap G._ListType (var "gt"))))
-          (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "st"),
-      _Type_map>>: lambda "mt" $
-        Eithers.map (lambda "gt" $ inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_list (wrap G._ListType (var "gt"))))
-          (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (Core.mapTypeValues (var "mt"))),
-      _Type_literal>>: lambda "lt_" $
-        Eithers.map (lambda "nt" $ inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_named (var "nt")))
-          (encodeLiteralType @@ var "cx" @@ var "lt_"),
-      _Type_pair>>: constant $
-        right (inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_named
-          (wrap G._NamedType (encodeTypeName @@ var "prefixes" @@ (Core.name $ string "hydra.util.Pair"))))),
-      _Type_either>>: constant $
-        right (inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_named
-          (wrap G._NamedType (encodeTypeName @@ var "prefixes" @@ (Core.name $ string "hydra.util.Either"))))),
-      _Type_record>>: constant $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous record type")) (var "cx"),
-      _Type_union>>: constant $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous union type")) (var "cx"),
-      _Type_variable>>: lambda "n" $
-        right (inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_named
-          (wrap G._NamedType (encodeTypeName @@ var "prefixes" @@ (var "n"))))),
-      _Type_wrap>>: lambda "wt" $
-        encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "wt",
-      _Type_forall>>: lambda "ft" $
-        encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (Core.forallTypeBody (var "ft")),
-      _Type_application>>: lambda "at" $
-        encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ (Core.applicationTypeFunction (var "at")),
-      _Type_function>>: lambda "ft" $
-        right (inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_named
-          (wrap G._NamedType (wrap G._Name (string "String"))))),
-      _Type_unit>>: constant $
-        right (inject G._Type G._Type_nonNull (inject G._NonNullType G._NonNullType_named
-          (wrap G._NamedType (wrap G._Name (string "Boolean")))))]
-
--- | Encode a TypeDefinition to a GraphQL TypeDefinition
-encodeTypeDefinition :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> TypeDefinition -> Either Error G.TypeDefinition)
-encodeTypeDefinition = define "encodeTypeDefinition" $
-  "cx" ~> "g" ~> lambda "prefixes" $ lambda "tdef" $
-    encodeNamedType @@ var "cx" @@ var "g" @@ var "prefixes"
-      @@ (Packaging.typeDefinitionName $ var "tdef")
-      @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "tdef")
-
--- | Encode a Hydra Name as a GraphQL Name with namespace prefix
-encodeTypeName :: TTermDefinition (M.Map Namespace String -> Name -> G.Name)
-encodeTypeName = define "encodeTypeName" $
-  lambda "prefixes" $ lambda "name" $ lets [
-    "qualName">: Names.qualifyName @@ var "name",
-    "local">: Packaging.qualifiedNameLocal (var "qualName"),
-    "mns">: Packaging.qualifiedNameNamespace (var "qualName"),
-    "prefix">: Maybes.maybe (string "")
-      (lambda "ns_" $ Maybes.maybe (string "") ("p" ~> var "p") (Maps.lookup (var "ns_") (var "prefixes")))
-      (var "mns")] $
-    wrap G._Name (Strings.cat2 (var "prefix") (sanitize @@ var "local"))
-
--- | Encode a union variant field type to a nullable GraphQL FieldDefinition.
--- Unit-typed variants become Boolean fields; data-carrying variants use their actual type, made nullable.
-encodeUnionFieldType :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> FieldType -> Either Error G.FieldDefinition)
-encodeUnionFieldType = define "encodeUnionFieldType" $
-  "cx" ~> "g" ~> lambda "prefixes" $ lambda "ft" $ lets [
-    "innerType">: Core.fieldTypeType $ var "ft",
-    "isUnit">: Predicates.isUnitType @@ (Strip.deannotateType @@ var "innerType"),
-    -- Unit variants use nullable Boolean; data-carrying variants use Maybe<innerType>
-    "effectiveType">: Logic.ifElse (var "isUnit")
-      (MetaTypes.optional (inject _Type _Type_literal (inject _LiteralType _LiteralType_boolean unit)))
-      (MetaTypes.optional (var "innerType"))] $
-    "gtype" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "effectiveType") $
-    "desc" <<~ (descriptionFromType @@ var "cx" @@ var "g" @@ var "innerType") $
-    right (record G._FieldDefinition [
-      G._FieldDefinition_Description>>: var "desc",
-      G._FieldDefinition_Name>>: (encodeFieldName @@ (Core.fieldTypeName $ var "ft")),
-      G._FieldDefinition_ArgumentsDefinition>>: nothing,
-      G._FieldDefinition_Type>>: var "gtype",
-      G._FieldDefinition_Directives>>: nothing])
-
--- | Top-level entry point: convert a module to GraphQL schema files.
-moduleToGraphql :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToGraphql = define "moduleToGraphql" $
-  lambda "mod" $ lambda "defs" $
-    "cx" ~> "g" ~> lets [
-    "partitioned">: Environment.partitionDefinitions @@ var "defs",
-    "typeDefs">: Pairs.first (var "partitioned"),
-    "prefixes">: findPrefixes @@ Packaging.moduleNamespace (var "mod") @@ var "typeDefs",
-    "filePath">: Names.namespaceToFilePath @@ Util.caseConventionCamel @@ (wrap _FileExtension (string "graphql")) @@ Packaging.moduleNamespace (var "mod")] $
-    "gtdefs" <<~ (Eithers.mapList (lambda "td" $ encodeTypeDefinition @@ var "cx" @@ var "g" @@ var "prefixes" @@ var "td") (var "typeDefs")) $
-    right (Maps.fromList $ Lists.pure $ pair (var "filePath")
-      (Serialization.printExpr @@ (Serialization.parenthesize @@
-        (GraphqlSerde.exprDocument @@ (wrap G._Document
-          (Lists.map
-            (lambda "gtdef" $
-              inject G._Definition G._Definition_typeSystem
-                (inject G._TypeSystemDefinitionOrExtension G._TypeSystemDefinitionOrExtension_definition
-                  (inject G._TypeSystemDefinition G._TypeSystemDefinition_type (var "gtdef"))))
-            (var "gtdefs")))))))
-
--- | Sanitize a string for use as a GraphQL identifier
-sanitize :: TTermDefinition (String -> String)
-sanitize = define "sanitize" $
-  lambda "s" $ Formatting.sanitizeWithUnderscores @@ GraphqlLanguage.graphqlReservedWords @@ var "s"
diff --git a/src/main/haskell/Hydra/Sources/Graphql/Language.hs b/src/main/haskell/Hydra/Sources/Graphql/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphql/Language.hs
+++ /dev/null
@@ -1,148 +0,0 @@
-module Hydra.Sources.Graphql.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.graphql.language"),
-            moduleDefinitions = [toDefinition graphqlLanguage, toDefinition graphqlReservedWords],
-            moduleTermDependencies = [Lexical.ns, Strip.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for GraphQL"}
-graphqlLanguage :: TTermDefinition Language
-graphqlLanguage = define "graphqlLanguage" $
-  doc "Language constraints for GraphQL" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeInt32],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord,
-    Variants.termVariantInject],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantApplication,
-    Variants.typeVariantEither,
-    Variants.typeVariantForall,
-    Variants.typeVariantFunction,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantPair,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnit,
-    Variants.typeVariantWrap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord,
-    Variants.typeVariantUnion,
-    Variants.typeVariantVariable],
-  "typePredicate">: "typ" ~> cases _Type (Strip.deannotateType @@ var "typ")
-    (Just true) [
-    _Type_maybe>>: "inner" ~> cases _Type (Strip.deannotateType @@ var "inner")
-      (Just true) [
-      _Type_maybe>>: constant false]]] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.graphql")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-graphqlReservedWords :: TTermDefinition (S.Set String)
-graphqlReservedWords = define "graphqlReservedWords" $
-  doc "A set of reserved words in GraphQL" $
-  Sets.fromList $ list $ string <$> ["true", "false"]
diff --git a/src/main/haskell/Hydra/Sources/Graphql/Serde.hs b/src/main/haskell/Hydra/Sources/Graphql/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphql/Serde.hs
+++ /dev/null
@@ -1,282 +0,0 @@
-module Hydra.Sources.Graphql.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Graphql.Syntax as G
-import qualified Hydra.Sources.Graphql.Syntax as GraphqlSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.graphql.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = (moduleNamespace GraphqlSyntax.module_:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting GraphQL AST to abstract expressions"}
-  where
-    definitions = [
-      toDefinition exprDefinition,
-      toDefinition exprDescription,
-      toDefinition exprDocument,
-      toDefinition exprEnumTypeDefinition,
-      toDefinition exprEnumValue,
-      toDefinition exprEnumValueDefinition,
-      toDefinition exprFieldDefinition,
-      toDefinition exprListType,
-      toDefinition exprName,
-      toDefinition exprNamedType,
-      toDefinition exprNonNullType,
-      toDefinition exprObjectTypeDefinition,
-      toDefinition exprType,
-      toDefinition exprTypeDefinition,
-      toDefinition exprTypeSystemDefinition,
-      toDefinition exprTypeSystemDefinitionOrExtension,
-      toDefinition withDescription]
-
-
-exprDefinition :: TTermDefinition (G.Definition -> Expr)
-exprDefinition = define "exprDefinition" $
-  doc "Convert a GraphQL definition to an expression" $
-  lambda "def" $
-    cases G._Definition (var "def") Nothing [
-      G._Definition_executable>>: constant $
-        Serialization.cst @@ string "Unsupported: executable definition",
-      G._Definition_typeSystem>>: lambda "de" $
-        exprTypeSystemDefinitionOrExtension @@ var "de"]
-
-exprDescription :: TTermDefinition (G.Description -> Expr)
-exprDescription = define "exprDescription" $
-  doc "Convert a GraphQL description to a triple-quoted comment" $
-  lambda "desc" $ lets [
-    "delim">: Serialization.cst @@ string "\"\"\"",
-    "text">: unwrap G._StringValue @@ (unwrap G._Description @@ var "desc")] $
-    Serialization.newlineSep @@ list [var "delim", Serialization.cst @@ var "text", var "delim"]
-
-exprDocument :: TTermDefinition (G.Document -> Expr)
-exprDocument = define "exprDocument" $
-  doc "Convert a GraphQL document to an expression" $
-  lambda "d" $ Serialization.doubleNewlineSep @@
-    (Lists.map exprDefinition (unwrap G._Document @@ var "d"))
-
-exprEnumTypeDefinition :: TTermDefinition (G.EnumTypeDefinition -> Expr)
-exprEnumTypeDefinition = define "exprEnumTypeDefinition" $
-  doc "Convert a GraphQL enum type definition to an expression" $
-  lambda "def" $ lets [
-    "desc">: project G._EnumTypeDefinition G._EnumTypeDefinition_Description @@ var "def",
-    "name">: project G._EnumTypeDefinition G._EnumTypeDefinition_Name @@ var "def",
-    "values">: project G._EnumTypeDefinition G._EnumTypeDefinition_EnumValuesDefinition @@ var "def",
-    "valuesExpr">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "vs" $ Lists.map exprEnumValueDefinition (unwrap G._EnumValuesDefinition @@ var "vs"))
-      (var "values")] $
-    withDescription @@ var "desc" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "enum",
-        exprName @@ var "name",
-        Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@ var "valuesExpr"])
-
-exprEnumValue :: TTermDefinition (G.EnumValue -> Expr)
-exprEnumValue = define "exprEnumValue" $
-  doc "Convert a GraphQL enum value to an expression" $
-  lambda "ev" $ exprName @@ (unwrap G._EnumValue @@ var "ev")
-
-exprEnumValueDefinition :: TTermDefinition (G.EnumValueDefinition -> Expr)
-exprEnumValueDefinition = define "exprEnumValueDefinition" $
-  doc "Convert a GraphQL enum value definition to an expression" $
-  lambda "def" $ lets [
-    "desc">: project G._EnumValueDefinition G._EnumValueDefinition_Description @@ var "def",
-    "ev">: project G._EnumValueDefinition G._EnumValueDefinition_EnumValue @@ var "def"] $
-    withDescription @@ var "desc" @@ (exprEnumValue @@ var "ev")
-
-exprFieldDefinition :: TTermDefinition (G.FieldDefinition -> Expr)
-exprFieldDefinition = define "exprFieldDefinition" $
-  doc "Convert a GraphQL field definition to an expression" $
-  lambda "def" $ lets [
-    "desc">: project G._FieldDefinition G._FieldDefinition_Description @@ var "def",
-    "name">: project G._FieldDefinition G._FieldDefinition_Name @@ var "def",
-    "typ">: project G._FieldDefinition G._FieldDefinition_Type @@ var "def",
-    "namePart">: Serialization.noSep @@ list [exprName @@ var "name", Serialization.cst @@ string ":"],
-    "typePart">: exprType @@ var "typ"] $
-    withDescription @@ var "desc" @@
-      (Serialization.spaceSep @@ list [var "namePart", var "typePart"])
-
-exprListType :: TTermDefinition (G.ListType -> Expr)
-exprListType = define "exprListType" $
-  doc "Convert a GraphQL list type to an expression" $
-  lambda "lt" $ Serialization.noSep @@ list [
-    Serialization.cst @@ string "[",
-    exprType @@ (unwrap G._ListType @@ var "lt"),
-    Serialization.cst @@ string "]"]
-
-exprName :: TTermDefinition (G.Name -> Expr)
-exprName = define "exprName" $
-  doc "Convert a GraphQL name to an expression" $
-  lambda "n" $ Serialization.cst @@ (unwrap G._Name @@ var "n")
-
-exprNamedType :: TTermDefinition (G.NamedType -> Expr)
-exprNamedType = define "exprNamedType" $
-  doc "Convert a GraphQL named type to an expression" $
-  lambda "nt" $ exprName @@ (unwrap G._NamedType @@ var "nt")
-
-exprNonNullType :: TTermDefinition (G.NonNullType -> Expr)
-exprNonNullType = define "exprNonNullType" $
-  doc "Convert a GraphQL non-null type to an expression" $
-  lambda "nnt" $ lets [
-    "typeExpr">: cases G._NonNullType (var "nnt") Nothing [
-      G._NonNullType_named>>: lambda "nt" $ exprNamedType @@ var "nt",
-      G._NonNullType_list>>: lambda "lt" $ exprListType @@ var "lt"]] $
-    Serialization.noSep @@ list [var "typeExpr", Serialization.cst @@ string "!"]
-
-exprObjectTypeDefinition :: TTermDefinition (G.ObjectTypeDefinition -> Expr)
-exprObjectTypeDefinition = define "exprObjectTypeDefinition" $
-  doc "Convert a GraphQL object type definition to an expression" $
-  lambda "def" $ lets [
-    "desc">: project G._ObjectTypeDefinition G._ObjectTypeDefinition_Description @@ var "def",
-    "name">: project G._ObjectTypeDefinition G._ObjectTypeDefinition_Name @@ var "def",
-    "fields">: project G._ObjectTypeDefinition G._ObjectTypeDefinition_FieldsDefinition @@ var "def",
-    "fieldsExpr">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "fs" $ Lists.map exprFieldDefinition (unwrap G._FieldsDefinition @@ var "fs"))
-      (var "fields")] $
-    withDescription @@ var "desc" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "type",
-        exprName @@ var "name",
-        Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@ var "fieldsExpr"])
-
-exprType :: TTermDefinition (G.Type -> Expr)
-exprType = define "exprType" $
-  doc "Convert a GraphQL type to an expression" $
-  lambda "typ" $
-    cases G._Type (var "typ") Nothing [
-      G._Type_named>>: lambda "nt" $ exprNamedType @@ var "nt",
-      G._Type_list>>: lambda "lt" $ exprListType @@ var "lt",
-      G._Type_nonNull>>: lambda "nnt" $ exprNonNullType @@ var "nnt"]
-
-exprTypeDefinition :: TTermDefinition (G.TypeDefinition -> Expr)
-exprTypeDefinition = define "exprTypeDefinition" $
-  doc "Convert a GraphQL type definition to an expression" $
-  lambda "def" $
-    cases G._TypeDefinition (var "def") Nothing [
-      G._TypeDefinition_scalar>>: constant $
-        Serialization.cst @@ string "Unsupported: scalar type definition",
-      G._TypeDefinition_object>>: lambda "od" $ exprObjectTypeDefinition @@ var "od",
-      G._TypeDefinition_interface>>: constant $
-        Serialization.cst @@ string "Unsupported: interface type definition",
-      G._TypeDefinition_union>>: constant $
-        Serialization.cst @@ string "Unsupported: union type definition",
-      G._TypeDefinition_enum>>: lambda "ed" $ exprEnumTypeDefinition @@ var "ed",
-      G._TypeDefinition_inputObject>>: constant $
-        Serialization.cst @@ string "Unsupported: input object type definition"]
-
-exprTypeSystemDefinition :: TTermDefinition (G.TypeSystemDefinition -> Expr)
-exprTypeSystemDefinition = define "exprTypeSystemDefinition" $
-  doc "Convert a GraphQL type system definition to an expression" $
-  lambda "def" $
-    cases G._TypeSystemDefinition (var "def") Nothing [
-      G._TypeSystemDefinition_schema>>: constant $
-        Serialization.cst @@ string "Unsupported: schema definition",
-      G._TypeSystemDefinition_type>>: lambda "dt" $ exprTypeDefinition @@ var "dt",
-      G._TypeSystemDefinition_directive>>: constant $
-        Serialization.cst @@ string "Unsupported: directive definition"]
-
-exprTypeSystemDefinitionOrExtension :: TTermDefinition (G.TypeSystemDefinitionOrExtension -> Expr)
-exprTypeSystemDefinitionOrExtension = define "exprTypeSystemDefinitionOrExtension" $
-  doc "Convert a GraphQL type system definition or extension to an expression" $
-  lambda "de" $
-    cases G._TypeSystemDefinitionOrExtension (var "de") Nothing [
-      G._TypeSystemDefinitionOrExtension_definition>>: lambda "d" $
-        exprTypeSystemDefinition @@ var "d",
-      G._TypeSystemDefinitionOrExtension_extension>>: constant $
-        Serialization.cst @@ string "Unsupported: type system extension"]
-
-withDescription :: TTermDefinition (Maybe G.Description -> Expr -> Expr)
-withDescription = define "withDescription" $
-  doc "Prepend an optional description to an expression" $
-  lambda "mdesc" $ lambda "expr" $
-    Serialization.newlineSep @@ (Maybes.cat $ list [
-      Maybes.map exprDescription (var "mdesc"),
-      Maybes.pure (var "expr")])
diff --git a/src/main/haskell/Hydra/Sources/Graphql/Syntax.hs b/src/main/haskell/Hydra/Sources/Graphql/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphql/Syntax.hs
+++ /dev/null
@@ -1,746 +0,0 @@
-module Hydra.Sources.Graphql.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-
-
-ns :: Namespace
-ns = Namespace "hydra.graphql.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-gql :: String -> Type
-gql = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("A GraphQL model. Based on the (extended) BNF at:\n" ++
-      "  https://spec.graphql.org/draft/#sec-Appendix-Grammar-Summary")}
-  where
-    definitions = [
-      name_,
-      intValue,
-      floatValue,
-      stringValue,
-      document,
-      definition,
-      executableDocument,
-      executableDefinition,
-      operationDefinition,
-      operationDefinition_Sequence,
-      operationType,
-      selectionSet,
-      selection,
-      field_,
-      alias_,
-      arguments,
-      argument,
-      fragmentSpread,
-      inlineFragment,
-      fragmentDefinition,
-      fragmentName,
-      typeCondition,
-      value,
-      booleanValue,
-      nullValue,
-      enumValue,
-      listValue,
-      listValue_Sequence,
-      objectValue,
-      objectValue_Sequence,
-      objectField,
-      variablesDefinition,
-      variable,
-      defaultValue,
-      type_,
-      namedType,
-      listType,
-      nonNullType,
-      directives,
-      directive,
-      typeSystemDocment,
-      typeSystemDefinition,
-      typeSystemExtensionDocument,
-      typeSystemDefinitionOrExtension,
-      typeSystemExtension,
-      schemaDefinition,
-      schemaExtension,
-      schemaExtension_Sequence,
-      rootOperationTypeDefinition,
-      description,
-      typeDefinition,
-      typeExtension,
-      scalarTypeDefinition,
-      scalarTypeExtension,
-      objectTypeDefinition,
-      objectTypeExtension,
-      objectTypeExtension_Sequence,
-      objectTypeExtension_Sequence2,
-      objectTypeExtension_Sequence3,
-      implementsInterfaces,
-      implementsInterfaces_Sequence,
-      implementsInterfaces_Sequence2,
-      fieldsDefinition,
-      fieldDefinition,
-      argumentsDefinition,
-      inputValueDefinition,
-      interfaceTypeDefinition,
-      interfaceTypeDefinition_Sequence,
-      interfaceTypeDefinition_Sequence2,
-      interfaceTypeExtension,
-      interfaceTypeExtension_Sequence,
-      interfaceTypeExtension_Sequence2,
-      interfaceTypeExtension_Sequence3,
-      unionTypeDefinition,
-      unionMemberTypes,
-      unionMemberTypes_Sequence,
-      unionMemberTypes_Sequence2,
-      unionTypeExtension,
-      unionTypeExtension_Sequence,
-      unionTypeExtension_Sequence2,
-      enumTypeDefinition,
-      enumValuesDefinition,
-      enumValueDefinition,
-      enumTypeExtension,
-      enumTypeExtension_Sequence,
-      enumTypeExtension_Sequence2,
-      inputObjectTypeDefinition,
-      inputObjectTypeDefinition_Sequence,
-      inputObjectTypeDefinition_Sequence2,
-      inputFieldsDefinition,
-      inputObjectTypeExtension,
-      inputObjectTypeExtension_Sequence,
-      inputObjectTypeExtension_Sequence2,
-      directiveDefinition,
-      directiveLocations,
-      directiveLocations_Sequence,
-      directiveLocations_Sequence2,
-      directiveLocation,
-      executableDirectiveLocation,
-      typeSystemDirectiveLocation]
-
--- Token definitions
-
-name_ :: Binding
-name_ = define "Name" $ T.wrap T.string
-
-intValue :: Binding
-intValue = define "IntValue" $ T.wrap T.string
-
-floatValue :: Binding
-floatValue = define "FloatValue" $ T.wrap T.string
-
-stringValue :: Binding
-stringValue = define "StringValue" $ T.wrap T.string
-
--- Document definitions
-
-document :: Binding
-document = define "Document" $ T.wrap $ T.list $ gql "Definition"
-
-definition :: Binding
-definition = define "Definition" $
-  T.union [
-    "executable">: gql "ExecutableDefinition",
-    "typeSystem">: gql "TypeSystemDefinitionOrExtension"]
-
-executableDocument :: Binding
-executableDocument = define "ExecutableDocument" $ T.wrap $ T.list $ gql "ExecutableDefinition"
-
-executableDefinition :: Binding
-executableDefinition = define "ExecutableDefinition" $
-  T.union [
-    "operation">: gql "OperationDefinition",
-    "fragment">: gql "FragmentDefinition"]
-
-operationDefinition :: Binding
-operationDefinition = define "OperationDefinition" $
-  T.union [
-    "sequence">: gql "OperationDefinition_Sequence",
-    "SelectionSet">: gql "SelectionSet"]
-
-operationDefinition_Sequence :: Binding
-operationDefinition_Sequence = define "OperationDefinition_Sequence" $
-  T.record [
-    "OperationType">: gql "OperationType",
-    "Name">: T.maybe $ gql "Name",
-    "VariablesDefinition">: T.maybe $ gql "VariablesDefinition",
-    "Directives">: T.maybe $ gql "Directives",
-    "SelectionSet">: gql "SelectionSet"]
-
-operationType :: Binding
-operationType = define "OperationType" $
-  T.union [
-    "Query">: T.unit,
-    "Mutation">: T.unit,
-    "Subscription">: T.unit]
-
-selectionSet :: Binding
-selectionSet = define "SelectionSet" $ T.wrap $ T.list $ gql "Selection"
-
-selection :: Binding
-selection = define "Selection" $
-  T.union [
-    "Field">: gql "Field",
-    "FragmentSpread">: gql "FragmentSpread",
-    "InlineFragment">: gql "InlineFragment"]
-
-field_ :: Binding
-field_ = define "Field" $
-  T.record [
-    "Alias">: T.maybe $ gql "Alias",
-    "Name">: gql "Name",
-    "Arguments">: T.maybe $ gql "Arguments",
-    "Directives">: T.maybe $ gql "Directives",
-    "SelectionSet">: T.maybe $ gql "SelectionSet"]
-
-alias_ :: Binding
-alias_ = define "Alias" $
-  T.union [
-    "Name">: gql "Name",
-    "Colon">: T.unit]
-
-arguments :: Binding
-arguments = define "Arguments" $ T.wrap $ T.list $ gql "Argument"
-
-argument :: Binding
-argument = define "Argument" $
-  T.record [
-    "Name">: gql "Name",
-    "Value">: gql "Value"]
-
-fragmentSpread :: Binding
-fragmentSpread = define "FragmentSpread" $
-  T.record [
-    "FragmentName">: gql "FragmentName",
-    "Directives">: T.maybe $ gql "Directives"]
-
-inlineFragment :: Binding
-inlineFragment = define "InlineFragment" $
-  T.record [
-    "TypeCondition">: T.maybe $ gql "TypeCondition",
-    "Directives">: T.maybe $ gql "Directives",
-    "SelectionSet">: gql "SelectionSet"]
-
-fragmentDefinition :: Binding
-fragmentDefinition = define "FragmentDefinition" $
-  T.record [
-    "FragmentName">: gql "FragmentName",
-    "TypeCondition">: gql "TypeCondition",
-    "Directives">: T.maybe $ gql "Directives",
-    "SelectionSet">: gql "SelectionSet"]
-
-fragmentName :: Binding
-fragmentName = define "FragmentName" $ T.wrap $ gql "Name"
-
-typeCondition :: Binding
-typeCondition = define "TypeCondition" $
-  T.union [
-    "On">: T.unit,
-    "NamedType">: gql "NamedType"]
-
-value :: Binding
-value = define "Value" $
-  T.union [
-    "Variable">: gql "Variable",
-    "int">: gql "IntValue",
-    "float">: gql "FloatValue",
-    "string">: gql "StringValue",
-    "boolean">: gql "BooleanValue",
-    "null">: gql "NullValue",
-    "enum">: gql "EnumValue",
-    "list">: gql "ListValue",
-    "object">: gql "ObjectValue"]
-
-booleanValue :: Binding
-booleanValue = define "BooleanValue" $
-  T.union [
-    "True">: T.unit,
-    "False">: T.unit]
-
-nullValue :: Binding
-nullValue = define "NullValue" $ T.wrap T.unit
-
-enumValue :: Binding
-enumValue = define "EnumValue" $ T.wrap $ gql "Name"
-
-listValue :: Binding
-listValue = define "ListValue" $
-  T.union [
-    "sequence">: gql "ListValue_Sequence",
-    "sequence2">: T.list $ gql "Value"]
-
-listValue_Sequence :: Binding
-listValue_Sequence = define "ListValue_Sequence" $ T.record []
-
-objectValue :: Binding
-objectValue = define "ObjectValue" $
-  T.union [
-    "sequence">: gql "ObjectValue_Sequence",
-    "sequence2">: T.list $ gql "ObjectField"]
-
-objectValue_Sequence :: Binding
-objectValue_Sequence = define "ObjectValue_Sequence" $ T.record []
-
-objectField :: Binding
-objectField = define "ObjectField" $
-  T.record [
-    "Name">: gql "Name",
-    "Value">: gql "Value"]
-
-variablesDefinition :: Binding
-variablesDefinition = define "VariablesDefinition" $
-  T.record [
-    "Variable">: gql "Variable",
-    "Type">: gql "Type",
-    "DefaultValue">: T.maybe $ gql "DefaultValue",
-    "Directives">: T.maybe $ gql "Directives"]
-
-variable :: Binding
-variable = define "Variable" $ T.wrap $ gql "Name"
-
-defaultValue :: Binding
-defaultValue = define "DefaultValue" $ T.wrap $ gql "Value"
-
-type_ :: Binding
-type_ = define "Type" $
-  T.union [
-    "named">: gql "NamedType",
-    "list">: gql "ListType",
-    "nonNull">: gql "NonNullType"]
-
-namedType :: Binding
-namedType = define "NamedType" $ T.wrap $ gql "Name"
-
-listType :: Binding
-listType = define "ListType" $ T.wrap $ gql "Type"
-
-nonNullType :: Binding
-nonNullType = define "NonNullType" $
-  T.union [
-    "named">: gql "NamedType",
-    "list">: gql "ListType"]
-
-directives :: Binding
-directives = define "Directives" $ T.wrap $ T.list $ gql "Directive"
-
-directive :: Binding
-directive = define "Directive" $
-  T.record [
-    "Name">: gql "Name",
-    "Arguments">: T.maybe $ gql "Arguments"]
-
--- Type system definitions
-
-typeSystemDocment :: Binding
-typeSystemDocment = define "TypeSystemDocment" $ T.wrap $ T.list $ gql "TypeSystemDefinition"
-
-typeSystemDefinition :: Binding
-typeSystemDefinition = define "TypeSystemDefinition" $
-  T.union [
-    "schema">: gql "SchemaDefinition",
-    "type">: gql "TypeDefinition",
-    "directive">: gql "DirectiveDefinition"]
-
-typeSystemExtensionDocument :: Binding
-typeSystemExtensionDocument = define "TypeSystemExtensionDocument" $
-  T.wrap $ T.list $ gql "TypeSystemDefinitionOrExtension"
-
-typeSystemDefinitionOrExtension :: Binding
-typeSystemDefinitionOrExtension = define "TypeSystemDefinitionOrExtension" $
-  T.union [
-    "definition">: gql "TypeSystemDefinition",
-    "extension">: gql "TypeSystemExtension"]
-
-typeSystemExtension :: Binding
-typeSystemExtension = define "TypeSystemExtension" $
-  T.union [
-    "schema">: gql "SchemaExtension",
-    "type">: gql "TypeExtension"]
-
-schemaDefinition :: Binding
-schemaDefinition = define "SchemaDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Directives">: T.maybe $ gql "Directives",
-    "RootOperationTypeDefinition">: gql "RootOperationTypeDefinition"]
-
-schemaExtension :: Binding
-schemaExtension = define "SchemaExtension" $
-  T.union [
-    "sequence">: gql "SchemaExtension_Sequence",
-    "sequence2">: gql "Directives"]
-
-schemaExtension_Sequence :: Binding
-schemaExtension_Sequence = define "SchemaExtension_Sequence" $
-  T.record [
-    "Directives">: T.maybe $ gql "Directives",
-    "RootOperationTypeDefinition">: gql "RootOperationTypeDefinition"]
-
-rootOperationTypeDefinition :: Binding
-rootOperationTypeDefinition = define "RootOperationTypeDefinition" $
-  T.record [
-    "OperationType">: gql "OperationType",
-    "NamedType">: gql "NamedType"]
-
-description :: Binding
-description = define "Description" $ T.wrap $ gql "StringValue"
-
-typeDefinition :: Binding
-typeDefinition = define "TypeDefinition" $
-  T.union [
-    "scalar">: gql "ScalarTypeDefinition",
-    "object">: gql "ObjectTypeDefinition",
-    "interface">: gql "InterfaceTypeDefinition",
-    "union">: gql "UnionTypeDefinition",
-    "enum">: gql "EnumTypeDefinition",
-    "inputObject">: gql "InputObjectTypeDefinition"]
-
-typeExtension :: Binding
-typeExtension = define "TypeExtension" $
-  T.union [
-    "scalar">: gql "ScalarTypeExtension",
-    "object">: gql "ObjectTypeExtension",
-    "interface">: gql "InterfaceTypeExtension",
-    "union">: gql "UnionTypeExtension",
-    "enum">: gql "EnumTypeExtension",
-    "inputObject">: gql "InputObjectTypeExtension"]
-
-scalarTypeDefinition :: Binding
-scalarTypeDefinition = define "ScalarTypeDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives"]
-
-scalarTypeExtension :: Binding
-scalarTypeExtension = define "ScalarTypeExtension" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: gql "Directives"]
-
-objectTypeDefinition :: Binding
-objectTypeDefinition = define "ObjectTypeDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: T.maybe $ gql "ImplementsInterfaces",
-    "Directives">: T.maybe $ gql "Directives",
-    "FieldsDefinition">: T.maybe $ gql "FieldsDefinition"]
-
-objectTypeExtension :: Binding
-objectTypeExtension = define "ObjectTypeExtension" $
-  T.union [
-    "sequence">: gql "ObjectTypeExtension_Sequence",
-    "sequence2">: gql "ObjectTypeExtension_Sequence2",
-    "sequence3">: gql "ObjectTypeExtension_Sequence3"]
-
-objectTypeExtension_Sequence :: Binding
-objectTypeExtension_Sequence = define "ObjectTypeExtension_Sequence" $
-  T.record [
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: T.maybe $ gql "ImplementsInterfaces",
-    "Directives">: T.maybe $ gql "Directives",
-    "FieldsDefinition">: gql "FieldsDefinition"]
-
-objectTypeExtension_Sequence2 :: Binding
-objectTypeExtension_Sequence2 = define "ObjectTypeExtension_Sequence2" $
-  T.record [
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: T.maybe $ gql "ImplementsInterfaces",
-    "Directives">: T.maybe $ gql "Directives"]
-
-objectTypeExtension_Sequence3 :: Binding
-objectTypeExtension_Sequence3 = define "ObjectTypeExtension_Sequence3" $
-  T.record [
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: gql "ImplementsInterfaces"]
-
-implementsInterfaces :: Binding
-implementsInterfaces = define "ImplementsInterfaces" $
-  T.union [
-    "sequence">: gql "ImplementsInterfaces_Sequence",
-    "sequence2">: gql "ImplementsInterfaces_Sequence2"]
-
-implementsInterfaces_Sequence :: Binding
-implementsInterfaces_Sequence = define "ImplementsInterfaces_Sequence" $
-  T.record [
-    "ImplementsInterfaces">: gql "ImplementsInterfaces",
-    "NamedType">: gql "NamedType"]
-
-implementsInterfaces_Sequence2 :: Binding
-implementsInterfaces_Sequence2 = define "ImplementsInterfaces_Sequence2" $
-  T.record [
-    "Amp">: T.maybe T.unit,
-    "NamedType">: gql "NamedType"]
-
-fieldsDefinition :: Binding
-fieldsDefinition = define "FieldsDefinition" $ T.wrap $ T.list $ gql "FieldDefinition"
-
-fieldDefinition :: Binding
-fieldDefinition = define "FieldDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "ArgumentsDefinition">: T.maybe $ gql "ArgumentsDefinition",
-    "Type">: gql "Type",
-    "Directives">: T.maybe $ gql "Directives"]
-
-argumentsDefinition :: Binding
-argumentsDefinition = define "ArgumentsDefinition" $ T.wrap $ T.list $ gql "InputValueDefinition"
-
-inputValueDefinition :: Binding
-inputValueDefinition = define "InputValueDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "Type">: gql "Type",
-    "DefaultValue">: T.maybe $ gql "DefaultValue",
-    "Directives">: T.maybe $ gql "Directives"]
-
-interfaceTypeDefinition :: Binding
-interfaceTypeDefinition = define "InterfaceTypeDefinition" $
-  T.union [
-    "sequence">: gql "InterfaceTypeDefinition_Sequence",
-    "sequence2">: gql "InterfaceTypeDefinition_Sequence2"]
-
-interfaceTypeDefinition_Sequence :: Binding
-interfaceTypeDefinition_Sequence = define "InterfaceTypeDefinition_Sequence" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: T.maybe $ gql "ImplementsInterfaces",
-    "Directives">: T.maybe $ gql "Directives",
-    "FieldsDefinition">: gql "FieldsDefinition"]
-
-interfaceTypeDefinition_Sequence2 :: Binding
-interfaceTypeDefinition_Sequence2 = define "InterfaceTypeDefinition_Sequence2" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: gql "ImplementsInterfaces",
-    "Directives">: T.maybe $ gql "Directives"]
-
-interfaceTypeExtension :: Binding
-interfaceTypeExtension = define "InterfaceTypeExtension" $
-  T.union [
-    "sequence">: gql "InterfaceTypeExtension_Sequence",
-    "sequence2">: gql "InterfaceTypeExtension_Sequence2",
-    "sequence3">: gql "InterfaceTypeExtension_Sequence3"]
-
-interfaceTypeExtension_Sequence :: Binding
-interfaceTypeExtension_Sequence = define "InterfaceTypeExtension_Sequence" $
-  T.record [
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: T.maybe $ gql "ImplementsInterfaces",
-    "Directives">: T.maybe $ gql "Directives",
-    "FieldsDefinition">: gql "FieldsDefinition"]
-
-interfaceTypeExtension_Sequence2 :: Binding
-interfaceTypeExtension_Sequence2 = define "InterfaceTypeExtension_Sequence2" $
-  T.record [
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: T.maybe $ gql "ImplementsInterfaces",
-    "Directives">: gql "Directives"]
-
-interfaceTypeExtension_Sequence3 :: Binding
-interfaceTypeExtension_Sequence3 = define "InterfaceTypeExtension_Sequence3" $
-  T.record [
-    "Name">: gql "Name",
-    "ImplementsInterfaces">: gql "ImplementsInterfaces"]
-
-unionTypeDefinition :: Binding
-unionTypeDefinition = define "UnionTypeDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives",
-    "UnionMemberTypes">: T.maybe $ gql "UnionMemberTypes"]
-
-unionMemberTypes :: Binding
-unionMemberTypes = define "UnionMemberTypes" $
-  T.union [
-    "sequence">: gql "UnionMemberTypes_Sequence",
-    "sequence2">: gql "UnionMemberTypes_Sequence2"]
-
-unionMemberTypes_Sequence :: Binding
-unionMemberTypes_Sequence = define "UnionMemberTypes_Sequence" $
-  T.record [
-    "UnionMemberTypes">: gql "UnionMemberTypes",
-    "NamedType">: gql "NamedType"]
-
-unionMemberTypes_Sequence2 :: Binding
-unionMemberTypes_Sequence2 = define "UnionMemberTypes_Sequence2" $
-  T.record [
-    "Or">: T.maybe T.unit,
-    "NamedType">: gql "NamedType"]
-
-unionTypeExtension :: Binding
-unionTypeExtension = define "UnionTypeExtension" $
-  T.union [
-    "sequence">: gql "UnionTypeExtension_Sequence",
-    "sequence2">: gql "UnionTypeExtension_Sequence2"]
-
-unionTypeExtension_Sequence :: Binding
-unionTypeExtension_Sequence = define "UnionTypeExtension_Sequence" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives",
-    "UnionMemberTypes">: gql "UnionMemberTypes"]
-
-unionTypeExtension_Sequence2 :: Binding
-unionTypeExtension_Sequence2 = define "UnionTypeExtension_Sequence2" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: gql "Directives"]
-
-enumTypeDefinition :: Binding
-enumTypeDefinition = define "EnumTypeDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives",
-    "EnumValuesDefinition">: T.maybe $ gql "EnumValuesDefinition"]
-
-enumValuesDefinition :: Binding
-enumValuesDefinition = define "EnumValuesDefinition" $ T.wrap $ T.list $ gql "EnumValueDefinition"
-
-enumValueDefinition :: Binding
-enumValueDefinition = define "EnumValueDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "EnumValue">: gql "EnumValue",
-    "Directives">: T.maybe $ gql "Directives"]
-
-enumTypeExtension :: Binding
-enumTypeExtension = define "EnumTypeExtension" $
-  T.union [
-    "sequence">: gql "EnumTypeExtension_Sequence",
-    "sequence2">: gql "EnumTypeExtension_Sequence2"]
-
-enumTypeExtension_Sequence :: Binding
-enumTypeExtension_Sequence = define "EnumTypeExtension_Sequence" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives",
-    "EnumValuesDefinition">: gql "EnumValuesDefinition"]
-
-enumTypeExtension_Sequence2 :: Binding
-enumTypeExtension_Sequence2 = define "EnumTypeExtension_Sequence2" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: gql "Directives"]
-
-inputObjectTypeDefinition :: Binding
-inputObjectTypeDefinition = define "InputObjectTypeDefinition" $
-  T.union [
-    "sequence">: gql "InputObjectTypeDefinition_Sequence",
-    "sequence2">: gql "InputObjectTypeDefinition_Sequence2"]
-
-inputObjectTypeDefinition_Sequence :: Binding
-inputObjectTypeDefinition_Sequence = define "InputObjectTypeDefinition_Sequence" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives",
-    "InputFieldsDefinition">: gql "InputFieldsDefinition"]
-
-inputObjectTypeDefinition_Sequence2 :: Binding
-inputObjectTypeDefinition_Sequence2 = define "InputObjectTypeDefinition_Sequence2" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives"]
-
-inputFieldsDefinition :: Binding
-inputFieldsDefinition = define "InputFieldsDefinition" $ T.wrap $ T.list $ gql "InputValueDefinition"
-
-inputObjectTypeExtension :: Binding
-inputObjectTypeExtension = define "InputObjectTypeExtension" $
-  T.union [
-    "sequence">: gql "InputObjectTypeExtension_Sequence",
-    "sequence2">: gql "InputObjectTypeExtension_Sequence2"]
-
-inputObjectTypeExtension_Sequence :: Binding
-inputObjectTypeExtension_Sequence = define "InputObjectTypeExtension_Sequence" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: T.maybe $ gql "Directives",
-    "InputFieldsDefinition">: gql "InputFieldsDefinition"]
-
-inputObjectTypeExtension_Sequence2 :: Binding
-inputObjectTypeExtension_Sequence2 = define "InputObjectTypeExtension_Sequence2" $
-  T.record [
-    "Name">: gql "Name",
-    "Directives">: gql "Directives"]
-
--- Directive definitions
-
-directiveDefinition :: Binding
-directiveDefinition = define "DirectiveDefinition" $
-  T.record [
-    "Description">: T.maybe $ gql "Description",
-    "Name">: gql "Name",
-    "ArgumentsDefinition">: T.maybe $ gql "ArgumentsDefinition",
-    "Repeatable">: T.maybe T.unit,
-    "DirectiveLocations">: gql "DirectiveLocations"]
-
-directiveLocations :: Binding
-directiveLocations = define "DirectiveLocations" $
-  T.union [
-    "sequence">: gql "DirectiveLocations_Sequence",
-    "sequence2">: gql "DirectiveLocations_Sequence2"]
-
-directiveLocations_Sequence :: Binding
-directiveLocations_Sequence = define "DirectiveLocations_Sequence" $
-  T.record [
-    "DirectiveLocations">: gql "DirectiveLocations",
-    "DirectiveLocation">: gql "DirectiveLocation"]
-
-directiveLocations_Sequence2 :: Binding
-directiveLocations_Sequence2 = define "DirectiveLocations_Sequence2" $
-  T.record [
-    "Or">: T.maybe T.unit,
-    "DirectiveLocation">: gql "DirectiveLocation"]
-
-directiveLocation :: Binding
-directiveLocation = define "DirectiveLocation" $
-  T.union [
-    "executable">: gql "ExecutableDirectiveLocation",
-    "typeSystem">: gql "TypeSystemDirectiveLocation"]
-
-executableDirectiveLocation :: Binding
-executableDirectiveLocation = define "ExecutableDirectiveLocation" $
-  T.union [
-    "QUERY">: T.unit,
-    "MUTATION">: T.unit,
-    "SUBSCRIPTION">: T.unit,
-    "FIELD">: T.unit,
-    "FRAGMENT_DEFINITION">: T.unit,
-    "FRAGMENT_SPREAD">: T.unit,
-    "INLINE_FRAGMENT">: T.unit,
-    "VARIABLE_DEFINITION">: T.unit]
-
-typeSystemDirectiveLocation :: Binding
-typeSystemDirectiveLocation = define "TypeSystemDirectiveLocation" $
-  T.union [
-    "SCHEMA">: T.unit,
-    "SCALAR">: T.unit,
-    "OBJECT">: T.unit,
-    "FIELD_DEFINITION">: T.unit,
-    "ARGUMENT_DEFINITION">: T.unit,
-    "INTERFACE">: T.unit,
-    "UNION">: T.unit,
-    "ENUM">: T.unit,
-    "ENUM_VALUE">: T.unit,
-    "INPUT_OBJECT">: T.unit,
-    "INPUT_FIELD_DEFINITION">: T.unit]
diff --git a/src/main/haskell/Hydra/Sources/Graphviz/Coder.hs b/src/main/haskell/Hydra/Sources/Graphviz/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphviz/Coder.hs
+++ /dev/null
@@ -1,426 +0,0 @@
-module Hydra.Sources.Graphviz.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Graphviz.Dot as Dot
-import qualified Hydra.Sources.Graphviz.Dot as DotSyntax
-
-
-ns :: Namespace
-ns = Namespace "hydra.graphviz.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowPaths.ns, Names.ns, Rewriting.ns],
-            moduleTypeDependencies = (DotSyntax.ns:kernelTypesNamespaces),
-            moduleDescription = Just "Functions for converting Hydra terms to Graphviz DOT graphs"}
-  where
-    definitions = [
-      toDefinition labelAttr,
-      toDefinition labelAttrs,
-      toDefinition nodeStyleElement,
-      toDefinition nodeStylePrimitive,
-      toDefinition nodeStyleSimple,
-      toDefinition nodeStyleVariable,
-      toDefinition standardNamespaces,
-      toDefinition termLabel,
-      toDefinition termToDotGraph,
-      toDefinition termToDotStmts,
-      toDefinition termToSubtermDotGraph,
-      toDefinition termToSubtermDotStmts,
-      toDefinition toEdgeStmt,
-      toDefinition toNodeId,
-      toDefinition toNodeOrSubgraph]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- NodeStyle is represented as a string constant, as there is no custom type definition in the target schema.
--- We use string tags to distinguish styles: "simple", "element", "variable", "primitive"
-
--- | Create a label attribute equality pair
-labelAttr :: TTermDefinition (String -> Dot.EqualityPair)
-labelAttr = define "labelAttr" $
-  doc "Create a DOT label attribute" $
-  "lab" ~>
-    record Dot._EqualityPair [
-      Dot._EqualityPair_left>>: wrap Dot._Id (string "label"),
-      Dot._EqualityPair_right>>: wrap Dot._Id (var "lab")]
-
--- | Create label attributes with style
-labelAttrs :: TTermDefinition (String -> String -> Dot.AttrList)
-labelAttrs = define "labelAttrs" $
-  doc "Create DOT label attributes with a node style" $
-  "style" ~> "lab" ~> lets [
-    "styleAttrs">:
-      Logic.ifElse (Equality.equal (var "style") nodeStyleSimple)
-        (list ([] :: [TTerm Dot.EqualityPair]))
-        (Logic.ifElse (Equality.equal (var "style") nodeStyleElement)
-          (list [
-            record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "style"), Dot._EqualityPair_right>>: wrap Dot._Id (string "filled")],
-            record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "fillcolor"), Dot._EqualityPair_right>>: wrap Dot._Id (string "lightyellow")]])
-          (Logic.ifElse (Equality.equal (var "style") nodeStyleVariable)
-            (list [
-              record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "style"), Dot._EqualityPair_right>>: wrap Dot._Id (string "filled")],
-              record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "fillcolor"), Dot._EqualityPair_right>>: wrap Dot._Id (string "lightcyan")]])
-            (list [
-              record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "style"), Dot._EqualityPair_right>>: wrap Dot._Id (string "filled")],
-              record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "fillcolor"), Dot._EqualityPair_right>>: wrap Dot._Id (string "linen")]])))]
-    $ wrap Dot._AttrList (list [Lists.concat2 (list [labelAttr @@ var "lab"]) (var "styleAttrs")])
-
-nodeStyleElement :: TTermDefinition String
-nodeStyleElement = define "nodeStyleElement" $
-  doc "The 'element' node style" $
-  string "element"
-
-nodeStylePrimitive :: TTermDefinition String
-nodeStylePrimitive = define "nodeStylePrimitive" $
-  doc "The 'primitive' node style" $
-  string "primitive"
-
-nodeStyleSimple :: TTermDefinition String
-nodeStyleSimple = define "nodeStyleSimple" $
-  doc "The 'simple' node style" $
-  string "simple"
-
-nodeStyleVariable :: TTermDefinition String
-nodeStyleVariable = define "nodeStyleVariable" $
-  doc "The 'variable' node style" $
-  string "variable"
-
--- | Construct the standard namespaces map from the standard libraries
-standardNamespaces :: TTermDefinition (M.Map Namespace String)
-standardNamespaces = define "standardNamespaces" $
-  doc "Construct a map from namespace to prefix for all standard libraries" $
-  Phantoms.map $ M.fromList [(wrap _Namespace (string (unNamespace ns_)), string (libraryPrefix lib)) | lib <- standardLibraries, let ns_ = libraryNamespace lib]
-
--- | Compute the label and style for a term
-termLabel :: TTermDefinition (Bool -> M.Map Namespace String -> Term -> (String, String))
-termLabel = define "termLabel" $
-  doc "Compute a label and node style for a term" $
-  "compact" ~> "namespaces" ~> "term" ~> lets [
-    "simpleLabel">: "lab" ~> pair (var "lab") nodeStyleSimple] $
-    match _Term (Just $ var "simpleLabel" @@ string "?") [
-      _Term_annotated>>: constant $ var "simpleLabel" @@ string "@{}",
-      _Term_application>>: constant $ var "simpleLabel" @@ (Logic.ifElse (var "compact") (string "$") (string "apply")),
-      _Term_lambda>>: constant $ var "simpleLabel" @@ (Logic.ifElse (var "compact") (string "\x03BB") (string "lambda")),
-      _Term_project>>: "proj" ~>
-        var "simpleLabel" @@ Strings.cat (list [
-          string "{",
-          Names.compactName @@ var "namespaces" @@ (project _Projection _Projection_typeName @@ var "proj"),
-          string "}.",
-          Core.unName (project _Projection _Projection_field @@ var "proj")]),
-      _Term_cases>>: "cs" ~>
-        var "simpleLabel" @@ Strings.cat (list [
-          string "cases_{",
-          Names.compactName @@ var "namespaces" @@ (project _CaseStatement _CaseStatement_typeName @@ var "cs"),
-          string "}"]),
-      _Term_unwrap>>: "name" ~>
-        var "simpleLabel" @@ Strings.cat (list [
-          string "unwrap_{",
-          Names.compactName @@ var "namespaces" @@ var "name",
-          string "}"]),
-      _Term_let>>: constant $ var "simpleLabel" @@ string "let",
-      _Term_list>>: constant $ var "simpleLabel" @@ (Logic.ifElse (var "compact") (string "[]") (string "list")),
-      _Term_literal>>: "l" ~>
-        var "simpleLabel" @@ (match _Literal (Just $ string "?") [
-          _Literal_binary>>: "s" ~> Literals.binaryToString (var "s"),
-          _Literal_boolean>>: "b" ~> Literals.showBoolean (var "b"),
-          _Literal_integer>>: "i" ~>
-            match _IntegerValue (Just $ string "?") [
-              _IntegerValue_bigint>>: "v" ~> Literals.showBigint (var "v"),
-              _IntegerValue_int8>>: "v" ~> Literals.showInt8 (var "v"),
-              _IntegerValue_int16>>: "v" ~> Literals.showInt16 (var "v"),
-              _IntegerValue_int32>>: "v" ~> Literals.showInt32 (var "v"),
-              _IntegerValue_int64>>: "v" ~> Literals.showInt64 (var "v"),
-              _IntegerValue_uint8>>: "v" ~> Literals.showUint8 (var "v"),
-              _IntegerValue_uint16>>: "v" ~> Literals.showUint16 (var "v"),
-              _IntegerValue_uint32>>: "v" ~> Literals.showUint32 (var "v"),
-              _IntegerValue_uint64>>: "v" ~> Literals.showUint64 (var "v")]
-              @@ var "i",
-          _Literal_float>>: "f" ~>
-            match _FloatValue (Just $ string "?") [
-              _FloatValue_bigfloat>>: "v" ~> Literals.showBigfloat (var "v"),
-              _FloatValue_float32>>: "v" ~> Literals.showFloat32 (var "v"),
-              _FloatValue_float64>>: "v" ~> Literals.showFloat64 (var "v")]
-              @@ var "f",
-          _Literal_string>>: "s" ~> var "s"]
-          @@ var "l"),
-      _Term_map>>: constant $ var "simpleLabel" @@ (Logic.ifElse (var "compact") (string "<,>") (string "map")),
-      _Term_maybe>>: constant $ var "simpleLabel" @@ (Logic.ifElse (var "compact") (string "opt") (string "optional")),
-      _Term_record>>: "rec" ~>
-        var "simpleLabel" @@ Strings.cat2 (string "\x2227") (Names.compactName @@ var "namespaces" @@ (project _Record _Record_typeName @@ var "rec")),
-      _Term_typeLambda>>: constant $ var "simpleLabel" @@ string "tyabs",
-      _Term_typeApplication>>: constant $ var "simpleLabel" @@ string "tyapp",
-      _Term_inject>>: "inj" ~>
-        var "simpleLabel" @@ Strings.cat2 (string "\x22BB") (Names.compactName @@ var "namespaces" @@ (project _Injection _Injection_typeName @@ var "inj")),
-      _Term_variable>>: "name" ~>
-        var "simpleLabel" @@ (Names.compactName @@ var "namespaces" @@ var "name"),
-      _Term_wrap>>: "wt" ~>
-        var "simpleLabel" @@ Strings.cat (list [
-          string "(",
-          Names.compactName @@ var "namespaces" @@ (project _WrappedTerm _WrappedTerm_typeName @@ var "wt"),
-          string ")"])]
-      @@ var "term"
-
--- | Convert a term to a full DOT graph
-termToDotGraph :: TTermDefinition (Term -> Dot.Graph)
-termToDotGraph = define "termToDotGraph" $
-  doc "Convert a term to a full DOT graph" $
-  "term" ~>
-    record Dot._Graph [
-      Dot._Graph_strict>>: false,
-      Dot._Graph_directed>>: true,
-      Dot._Graph_id>>: nothing,
-      Dot._Graph_statements>>: termToDotStmts @@ standardNamespaces @@ var "term"]
-
--- | Convert a term to full DOT statements with structural detail
-termToDotStmts :: TTermDefinition (M.Map Namespace String -> Term -> [Dot.Stmt])
-termToDotStmts = define "termToDotStmts" $
-  doc "Convert a term to full DOT statements showing term structure" $
-  "namespaces" ~> "term" ~> lets [
-    -- encode is the main recursive helper
-    -- Parameters: mlabstyle isElement ids mparent stmtsVisited accessorTerm
-    -- stmtsVisited is a pair of (stmts, visited)
-    -- accessorTerm is a pair of (accessor, term)
-    -- Returns a pair of (stmts, visited)
-    "encode">: lambdas ["mlabstyle", "isElement", "ids", "mparent", "stmtsVisited", "accessorTerm"] $ lets [
-      "accessor">: Pairs.first $ var "accessorTerm",
-      "currentTerm">: Pairs.second $ var "accessorTerm",
-      "stmts">: Pairs.first $ var "stmtsVisited",
-      "visited">: Pairs.second $ var "stmtsVisited",
-      -- Compute term label and style
-      "termLS">: termLabel @@ true @@ var "namespaces" @@ var "currentTerm",
-      "rawLabel">: Pairs.first $ var "termLS",
-      "termNodeStyle">: Pairs.second $ var "termLS",
-      -- labelOf: compute unique label and style for a term
-      "labelOf">: "vis" ~> "t" ~> lets [
-        "tls">: termLabel @@ true @@ var "namespaces" @@ var "t",
-        "l">: Pairs.first $ var "tls",
-        "s">: Pairs.second $ var "tls"]
-        $ pair (Names.uniqueLabel @@ var "vis" @@ var "l") (var "s"),
-      -- Determine actual label and style
-      "labstyle">: Maybes.maybe
-        (var "labelOf" @@ var "visited" @@ var "currentTerm")
-        ("ls" ~> var "ls")
-        (var "mlabstyle"),
-      "label">: Pairs.first $ var "labstyle",
-      "style">: Pairs.second $ var "labstyle",
-      "nodeStyle">: Logic.ifElse (var "isElement") nodeStyleElement (var "termNodeStyle"),
-      "selfId">: wrap Dot._Id (var "label"),
-      "selfVisited">: Sets.insert (var "label") (var "visited"),
-      -- Node statement for this term
-      "nodeStmt">: inject Dot._Stmt Dot._Stmt_node (record Dot._NodeStmt [
-        Dot._NodeStmt_id>>: toNodeId @@ var "selfId",
-        Dot._NodeStmt_attributes>>: just $ labelAttrs @@ var "nodeStyle" @@ var "rawLabel"]),
-      -- Edge to parent (accessor edge)
-      "toAccessorEdgeStmt">: lambdas ["acc", "sty", "i1", "i2"] $
-        toEdgeStmt @@ var "i1" @@ var "i2" @@
-          (Maybes.map ("s" ~> labelAttrs @@ var "sty" @@ var "s") (ShowPaths.subtermStep @@ var "acc")),
-      "edgeAttrs">: "lab" ~>
-        wrap Dot._AttrList (list [list [record Dot._EqualityPair [Dot._EqualityPair_left>>: wrap Dot._Id (string "label"), Dot._EqualityPair_right>>: wrap Dot._Id (var "lab")]]]),
-      "parentStmt">: Maybes.maybe
-        (list ([] :: [TTerm Dot.Stmt]))
-        ("parent" ~> list [var "toAccessorEdgeStmt" @@ var "accessor" @@ var "style" @@ var "parent" @@ var "selfId"])
-        (var "mparent"),
-      "selfStmts">: Lists.concat (list [var "stmts", list [var "nodeStmt"], var "parentStmt"]),
-      -- Default case: fold over subterms
-      "dflt">: Lists.foldl
-        (var "encode" @@ nothing @@ false @@ var "ids" @@ just (var "selfId"))
-        (pair (var "selfStmts") (var "selfVisited"))
-        (Rewriting.subtermsWithSteps @@ var "currentTerm")]
-      -- Main case dispatch on the current term
-      $ match _Term (Just $ var "dflt") [
-          _Term_lambda>>: "lam" ~> lets [
-            "v">: Core.lambdaParameter $ var "lam",
-            "body">: Core.lambdaBody $ var "lam",
-            "vstr">: Core.unName (var "v"),
-            "varLabel">: Names.uniqueLabel @@ var "selfVisited" @@ var "vstr",
-            "varId">: wrap Dot._Id (var "varLabel"),
-            "visited1">: Sets.insert (var "varLabel") (var "selfVisited"),
-            "ids1">: Maps.insert (var "v") (var "varId") (var "ids"),
-            "varNodeStmt">: inject Dot._Stmt Dot._Stmt_node (record Dot._NodeStmt [
-              Dot._NodeStmt_id>>: toNodeId @@ var "varId",
-              Dot._NodeStmt_attributes>>: just $ labelAttrs @@ nodeStyleVariable @@ var "vstr"]),
-            "varEdgeStmt">: inject Dot._Stmt Dot._Stmt_edge (record Dot._EdgeStmt [
-              Dot._EdgeStmt_left>>: toNodeOrSubgraph @@ var "selfId",
-              Dot._EdgeStmt_right>>: list [toNodeOrSubgraph @@ var "varId"],
-              Dot._EdgeStmt_attributes>>: just $ var "edgeAttrs" @@ string "var"])]
-            $ var "encode" @@ nothing @@ false @@ var "ids1" @@ just (var "selfId")
-                @@ pair (Lists.concat (list [var "selfStmts", list [var "varNodeStmt", var "varEdgeStmt"]])) (var "visited1")
-                @@ pair Paths.subtermStepLambdaBody (var "body"),
-          _Term_let>>: "letExpr" ~> lets [
-            "bindings">: Core.letBindings $ var "letExpr",
-            "env">: Core.letBody $ var "letExpr",
-            -- First pass: compute ids and visited for all binding names
-            "addBindingIds">: lambdas ["idsVis", "binding"] $ lets [
-              "curIds">: Pairs.first $ var "idsVis",
-              "curVis">: Pairs.second $ var "idsVis",
-              "bname">: Core.bindingName $ var "binding",
-              "bterm">: Core.bindingTerm $ var "binding",
-              "bls">: var "labelOf" @@ var "curVis" @@ var "bterm",
-              "blab">: Pairs.first $ var "bls"]
-              $ pair (Maps.insert (var "bname") (wrap Dot._Id (var "blab")) (var "curIds"))
-                     (Sets.insert (var "blab") (var "curVis")),
-            "idsVis1">: Lists.foldl (var "addBindingIds") (pair (var "ids") (var "visited")) (var "bindings"),
-            "ids1">: Pairs.first $ var "idsVis1",
-            -- Second pass: encode each binding term
-            "addBindingTerm">: lambdas ["stVis", "binding"] $ lets [
-              "bname">: Core.bindingName $ var "binding",
-              "bterm">: Core.bindingTerm $ var "binding",
-              "blab">: unwrap Dot._Id @@ (Maybes.fromMaybe (wrap Dot._Id (string "?")) (Maps.lookup (var "bname") (var "ids1")))]
-              $ var "encode"
-                  @@ just (pair (var "blab") nodeStyleElement) @@ true @@ var "ids1" @@ just (var "selfId")
-                  @@ var "stVis"
-                  @@ pair (Paths.subtermStepLetBinding (var "bname")) (var "bterm"),
-            "stmts1">: Lists.foldl (var "addBindingTerm") (pair (var "selfStmts") (var "selfVisited")) (var "bindings")]
-            -- Encode the let body
-            $ var "encode" @@ nothing @@ false @@ var "ids1" @@ just (var "selfId")
-                @@ var "stmts1"
-                @@ pair Paths.subtermStepLetBody (var "env"),
-          _Term_variable>>: "name" ~>
-            Maybes.maybe
-              (var "dflt")
-              ("i" ~> pair
-                (Lists.concat2 (var "stmts") (list [var "toAccessorEdgeStmt" @@ var "accessor" @@ var "style" @@ (Maybes.fromMaybe (var "selfId") (var "mparent")) @@ var "i"]))
-                (var "visited"))
-              (Maps.lookup (var "name") (var "ids"))]
-        @@ var "currentTerm"]
-    $ Pairs.first $ var "encode"
-        @@ nothing @@ false @@ Maps.empty @@ nothing
-        @@ pair (list ([] :: [TTerm Dot.Stmt])) Sets.empty
-        @@ pair Paths.subtermStepAnnotatedBody (var "term")
-
--- | Convert a term to an subterm-style DOT graph
-termToSubtermDotGraph :: TTermDefinition (Term -> Dot.Graph)
-termToSubtermDotGraph = define "termToSubtermDotGraph" $
-  doc "Convert a term to an subterm-style DOT graph" $
-  "term" ~>
-    record Dot._Graph [
-      Dot._Graph_strict>>: false,
-      Dot._Graph_directed>>: true,
-      Dot._Graph_id>>: nothing,
-      Dot._Graph_statements>>: termToSubtermDotStmts @@ standardNamespaces @@ var "term"]
-
--- | Convert a term to subterm-style DOT statements
-termToSubtermDotStmts :: TTermDefinition (M.Map Namespace String -> Term -> [Dot.Stmt])
-termToSubtermDotStmts = define "termToSubtermDotStmts" $
-  doc "Convert a term to subterm-style DOT statements" $
-  "namespaces" ~> "term" ~> lets [
-    "accessorGraph">: ShowPaths.termToSubtermGraph @@ var "namespaces" @@ var "term",
-    "nodes">: project _SubtermGraph _SubtermGraph_nodes @@ var "accessorGraph",
-    "edges">: project _SubtermGraph _SubtermGraph_edges @@ var "accessorGraph",
-    "nodeStmt">: "node" ~>
-      inject Dot._Stmt Dot._Stmt_node (record Dot._NodeStmt [
-        Dot._NodeStmt_id>>: toNodeId @@ wrap Dot._Id (project _SubtermNode _SubtermNode_id @@ var "node"),
-        Dot._NodeStmt_attributes>>: just $ wrap Dot._AttrList (list [list [labelAttr @@ (project _SubtermNode _SubtermNode_label @@ var "node")]])]),
-    "edgeStmt">: "edge" ~> lets [
-      "lab1">: project _SubtermNode _SubtermNode_id @@ (project _SubtermEdge _SubtermEdge_source @@ var "edge"),
-      "lab2">: project _SubtermNode _SubtermNode_id @@ (project _SubtermEdge _SubtermEdge_target @@ var "edge"),
-      "pathAccessors">: unwrap _SubtermPath @@ (project _SubtermEdge _SubtermEdge_path @@ var "edge"),
-      "showPath">: Strings.intercalate (string "/") (Maybes.cat (Lists.map ShowPaths.subtermStep (var "pathAccessors")))]
-      $ toEdgeStmt @@ wrap Dot._Id (var "lab1") @@ wrap Dot._Id (var "lab2") @@
-          (just $ wrap Dot._AttrList (list [list [labelAttr @@ var "showPath"]]))]
-    $ Lists.concat2 (Lists.map (var "nodeStmt") (var "nodes")) (Lists.map (var "edgeStmt") (var "edges"))
-
--- | Create an edge statement
-toEdgeStmt :: TTermDefinition (Dot.Id -> Dot.Id -> Maybe Dot.AttrList -> Dot.Stmt)
-toEdgeStmt = define "toEdgeStmt" $
-  doc "Create a DOT edge statement" $
-  "i1" ~> "i2" ~> "attrs" ~>
-    inject Dot._Stmt Dot._Stmt_edge (record Dot._EdgeStmt [
-      Dot._EdgeStmt_left>>: toNodeOrSubgraph @@ var "i1",
-      Dot._EdgeStmt_right>>: list [toNodeOrSubgraph @@ var "i2"],
-      Dot._EdgeStmt_attributes>>: var "attrs"])
-
--- | Create a node ID from a DOT Id
-toNodeId :: TTermDefinition (Dot.Id -> Dot.NodeId)
-toNodeId = define "toNodeId" $
-  doc "Create a DOT NodeId from an Id" $
-  "i" ~> record Dot._NodeId [Dot._NodeId_id>>: var "i", Dot._NodeId_port>>: nothing]
-
--- | Create a NodeOrSubgraph from an Id
-toNodeOrSubgraph :: TTermDefinition (Dot.Id -> Dot.NodeOrSubgraph)
-toNodeOrSubgraph = define "toNodeOrSubgraph" $
-  doc "Create a DOT NodeOrSubgraph from an Id" $
-  "i" ~> inject Dot._NodeOrSubgraph Dot._NodeOrSubgraph_node (toNodeId @@ var "i")
diff --git a/src/main/haskell/Hydra/Sources/Graphviz/Dot.hs b/src/main/haskell/Hydra/Sources/Graphviz/Dot.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphviz/Dot.hs
+++ /dev/null
@@ -1,152 +0,0 @@
-module Hydra.Sources.Graphviz.Dot where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.graphviz.dot"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-dot :: String -> Type
-dot = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model from the Graphviz DOT graph description language."
-      ++ " Based on the grammar at https://graphviz.org/doc/info/lang.html")}
-  where
-    definitions = [
-      id_,
-      graph_,
-      stmt,
-      equalityPair,
-      attrStmt,
-      attrType,
-      attrList,
-      edgeStmt,
-      nodeOrSubgraph,
-      nodeStmt,
-      nodeId,
-      port,
-      subgraph,
-      subgraphId,
-      compassPt]
-
-id_ :: Binding
-id_ = define "Id" $ T.wrap T.string
-
---graph	:	[ strict ] (graph | digraph) [ ID ] '{' stmt_list '}'
-graph_ :: Binding
-graph_ = define "Graph" $
-  T.record [
-    "strict">: T.boolean,
-    "directed">: T.boolean,
-    "id">: T.maybe $ dot "Id",
-    "statements">: T.list $ dot "Stmt"]
-
---stmt_list	:	[ stmt [ ';' ] stmt_list ]
---stmt	:	node_stmt
---      |	edge_stmt
---      |	attr_stmt
---      |	ID '=' ID
---      |	subgraph
-stmt :: Binding
-stmt = define "Stmt" $
-  T.union [
-    "node">: dot "NodeStmt",
-    "edge">: dot "EdgeStmt",
-    "attr">: dot "AttrStmt",
-    "equals">: dot "EqualityPair",
-    "subgraph">: dot "Subgraph"]
-
-equalityPair :: Binding
-equalityPair = define "EqualityPair" $
-  T.record [
-    "left">: dot "Id",
-    "right">: dot "Id"]
-
---attr_stmt	:	(graph | node | edge) attr_list
---attr_list	:	'[' [ a_list ] ']' [ attr_list ]
---a_list	:	ID '=' ID [ (';' | ',') ] [ a_list ]
-attrStmt :: Binding
-attrStmt = define "AttrStmt" $
-  T.record [
-    "type">: dot "AttrType",
-    "attributes">: dot "AttrList"]
-
-attrType :: Binding
-attrType = define "AttrType" $
-  T.enum ["graph", "node", "edge"]
-
-attrList :: Binding
-attrList = define "AttrList" $
-  T.wrap $ nonemptyList $ nonemptyList $ dot "EqualityPair"
-
---edge_stmt	:	(node_id | subgraph) edgeRHS [ attr_list ]
---edgeRHS	:	edgeop (node_id | subgraph) [ edgeRHS ]
-edgeStmt :: Binding
-edgeStmt = define "EdgeStmt" $
-  T.record [
-    "left">: dot "NodeOrSubgraph",
-    "right">: nonemptyList $ dot "NodeOrSubgraph",
-    "attributes">: T.maybe $ dot "AttrList"]
-
-nodeOrSubgraph :: Binding
-nodeOrSubgraph = define "NodeOrSubgraph" $
-  T.union [
-    "node">: dot "NodeId",
-    "subgraph">: dot "Subgraph"]
-
---node_stmt	:	node_id [ attr_list ]
-nodeStmt :: Binding
-nodeStmt = define "NodeStmt" $
-  T.record [
-    "id">: dot "NodeId",
-    "attributes">: T.maybe $ dot "AttrList"]
-
---node_id	:	ID [ port ]
-nodeId :: Binding
-nodeId = define "NodeId" $
-  T.record [
-    "id">: dot "Id",
-    "port">: T.maybe $ dot "Port"]
-
---port	:	':' ID [ ':' compass_pt ]
---      |	':' compass_pt
-port :: Binding
-port = define "Port" $
-  T.record [
-    "id">: T.maybe $ dot "Id",
-    "position">: T.maybe $ dot "CompassPt"]
-
---subgraph	:	[ subgraph [ ID ] ] '{' stmt_list '}'
-subgraph :: Binding
-subgraph = define "Subgraph" $
-  T.record [
-    "subgraphId">: T.maybe $ dot "SubgraphId",
-    "statements">: T.list $ dot "Stmt"]
-
-subgraphId :: Binding
-subgraphId = define "SubgraphId" $
-  T.wrap $ T.maybe $ dot "Id"
-
---compass_pt	:	(n | ne | e | se | s | sw | w | nw | c | _)
-compassPt :: Binding
-compassPt = define "CompassPt" $
-  T.enum ["n", "ne", "e", "se", "s", "sw", "w", "nw", "c", "none"]
diff --git a/src/main/haskell/Hydra/Sources/Graphviz/Serde.hs b/src/main/haskell/Hydra/Sources/Graphviz/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Graphviz/Serde.hs
+++ /dev/null
@@ -1,284 +0,0 @@
-module Hydra.Sources.Graphviz.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Graphviz.Dot as Dot
-import qualified Hydra.Sources.Graphviz.Dot as DotSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.graphviz.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = (DotSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting Graphviz DOT AST to abstract expressions"}
-  where
-    definitions = [
-      toDefinition writeAttrList,
-      toDefinition writeAttrStmt,
-      toDefinition writeAttrType,
-      toDefinition writeCompassPt,
-      toDefinition writeEdgeStmt,
-      toDefinition writeEqualityPair,
-      toDefinition writeGraph,
-      toDefinition writeId,
-      toDefinition writeNodeId,
-      toDefinition writeNodeOrSubgraph,
-      toDefinition writeNodeStmt,
-      toDefinition writePort,
-      toDefinition writeStmt,
-      toDefinition writeSubgraph,
-      toDefinition writeSubgraphId]
-
-
-writeAttrList :: TTermDefinition (Dot.AttrList -> Expr)
-writeAttrList = define "writeAttrList" $
-  doc "Convert an attribute list to an expression" $
-  lambda "al" $
-    Serialization.spaceSep @@ (Lists.map
-      (lambda "alist" $
-        Serialization.brackets @@ Serialization.squareBrackets @@ Serialization.inlineStyle @@
-          (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map writeEqualityPair (var "alist"))))
-      (unwrap Dot._AttrList @@ var "al"))
-
-writeAttrStmt :: TTermDefinition (Dot.AttrStmt -> Expr)
-writeAttrStmt = define "writeAttrStmt" $
-  doc "Convert an attribute statement to an expression" $
-  lambda "as" $ lets [
-    "t">: project Dot._AttrStmt Dot._AttrStmt_type @@ var "as",
-    "attr">: project Dot._AttrStmt Dot._AttrStmt_attributes @@ var "as"] $
-    Serialization.spaceSep @@ list [writeAttrType @@ var "t", writeAttrList @@ var "attr"]
-
-writeAttrType :: TTermDefinition (Dot.AttrType -> Expr)
-writeAttrType = define "writeAttrType" $
-  doc "Convert an attribute type to an expression" $
-  lambda "t" $
-    cases Dot._AttrType (var "t") Nothing [
-      Dot._AttrType_graph>>: constant $ Serialization.cst @@ string "graph",
-      Dot._AttrType_node>>: constant $ Serialization.cst @@ string "node",
-      Dot._AttrType_edge>>: constant $ Serialization.cst @@ string "edge"]
-
-writeCompassPt :: TTermDefinition (Dot.CompassPt -> Expr)
-writeCompassPt = define "writeCompassPt" $
-  doc "Convert a compass point to an expression" $
-  lambda "p" $
-    cases Dot._CompassPt (var "p") Nothing [
-      Dot._CompassPt_n>>: constant $ Serialization.cst @@ string "n",
-      Dot._CompassPt_ne>>: constant $ Serialization.cst @@ string "ne",
-      Dot._CompassPt_e>>: constant $ Serialization.cst @@ string "e",
-      Dot._CompassPt_se>>: constant $ Serialization.cst @@ string "se",
-      Dot._CompassPt_s>>: constant $ Serialization.cst @@ string "s",
-      Dot._CompassPt_sw>>: constant $ Serialization.cst @@ string "sw",
-      Dot._CompassPt_w>>: constant $ Serialization.cst @@ string "w",
-      Dot._CompassPt_nw>>: constant $ Serialization.cst @@ string "nw",
-      Dot._CompassPt_c>>: constant $ Serialization.cst @@ string "c",
-      Dot._CompassPt_none>>: constant $ Serialization.cst @@ string "none"]
-
-writeEdgeStmt :: TTermDefinition (Bool -> Dot.EdgeStmt -> Expr)
-writeEdgeStmt = define "writeEdgeStmt" $
-  doc "Convert an edge statement to an expression" $
-  lambda "directed" $ lambda "es" $ lets [
-    "l">: project Dot._EdgeStmt Dot._EdgeStmt_left @@ var "es",
-    "r">: project Dot._EdgeStmt Dot._EdgeStmt_right @@ var "es",
-    "attr">: project Dot._EdgeStmt Dot._EdgeStmt_attributes @@ var "es",
-    "arrow">: Logic.ifElse (var "directed") (string "->") (string "--"),
-    "rhsParts">: Lists.concat (Lists.map
-      (lambda "n" $ list [Serialization.cst @@ var "arrow", writeNodeOrSubgraph @@ var "directed" @@ var "n"])
-      (var "r")),
-    "attrParts">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "a" $ list [writeAttrList @@ var "a"])
-      (var "attr")] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      list [writeNodeOrSubgraph @@ var "directed" @@ var "l"],
-      var "rhsParts",
-      var "attrParts"])
-
-writeEqualityPair :: TTermDefinition (Dot.EqualityPair -> Expr)
-writeEqualityPair = define "writeEqualityPair" $
-  doc "Convert an equality pair to an expression" $
-  lambda "eq" $ lets [
-    "l">: project Dot._EqualityPair Dot._EqualityPair_left @@ var "eq",
-    "r">: project Dot._EqualityPair Dot._EqualityPair_right @@ var "eq"] $
-    Serialization.spaceSep @@ list [writeId @@ var "l", Serialization.cst @@ string "=", writeId @@ var "r"]
-
-writeGraph :: TTermDefinition (Dot.Graph -> Expr)
-writeGraph = define "writeGraph" $
-  doc "Convert a graph to an expression" $
-  lambda "g" $ lets [
-    "strict">: project Dot._Graph Dot._Graph_strict @@ var "g",
-    "directed">: project Dot._Graph Dot._Graph_directed @@ var "g",
-    "stmts">: project Dot._Graph Dot._Graph_statements @@ var "g",
-    "graphKeyword">: Logic.ifElse (var "directed") (string "digraph") (string "graph"),
-    "graphExpr">: Logic.ifElse (var "strict")
-      (Serialization.spaceSep @@ list [Serialization.cst @@ string "strict", Serialization.cst @@ var "graphKeyword"])
-      (Serialization.cst @@ var "graphKeyword"),
-    "body">: Serialization.brackets @@ Serialization.curlyBraces @@ Serialization.fullBlockStyle @@
-      (Serialization.symbolSep @@ string ";" @@ Serialization.fullBlockStyle @@
-        (Lists.map (writeStmt @@ var "directed") (var "stmts")))] $
-    Serialization.spaceSep @@ list [var "graphExpr", var "body"]
-
-writeId :: TTermDefinition (Dot.Id -> Expr)
-writeId = define "writeId" $
-  doc "Convert an identifier to an expression" $
-  lambda "i" $ Serialization.cst @@
-    (Strings.cat $ list [string "\"", unwrap Dot._Id @@ var "i", string "\""])
-
-writeNodeId :: TTermDefinition (Dot.NodeId -> Expr)
-writeNodeId = define "writeNodeId" $
-  doc "Convert a node identifier to an expression" $
-  lambda "nid" $ lets [
-    "i">: project Dot._NodeId Dot._NodeId_id @@ var "nid",
-    "mp">: project Dot._NodeId Dot._NodeId_port @@ var "nid"] $
-    Serialization.noSep @@ (Maybes.cat $ list [
-      Maybes.pure (writeId @@ var "i"),
-      Maybes.map writePort (var "mp")])
-
-writeNodeOrSubgraph :: TTermDefinition (Bool -> Dot.NodeOrSubgraph -> Expr)
-writeNodeOrSubgraph = define "writeNodeOrSubgraph" $
-  doc "Convert a node or subgraph to an expression" $
-  lambda "directed" $ lambda "ns" $
-    cases Dot._NodeOrSubgraph (var "ns") Nothing [
-      Dot._NodeOrSubgraph_node>>: lambda "n" $ writeNodeId @@ var "n",
-      Dot._NodeOrSubgraph_subgraph>>: lambda "sg" $ writeSubgraph @@ var "directed" @@ var "sg"]
-
-writeNodeStmt :: TTermDefinition (Dot.NodeStmt -> Expr)
-writeNodeStmt = define "writeNodeStmt" $
-  doc "Convert a node statement to an expression" $
-  lambda "ns" $ lets [
-    "i">: project Dot._NodeStmt Dot._NodeStmt_id @@ var "ns",
-    "attr">: project Dot._NodeStmt Dot._NodeStmt_attributes @@ var "ns"] $
-    Serialization.spaceSep @@ (Maybes.cat $ list [
-      Maybes.pure (writeNodeId @@ var "i"),
-      Maybes.map writeAttrList (var "attr")])
-
-writePort :: TTermDefinition (Dot.Port -> Expr)
-writePort = define "writePort" $
-  doc "Convert a port to an expression" $
-  lambda "p" $ lets [
-    "mi">: project Dot._Port Dot._Port_id @@ var "p",
-    "mp">: project Dot._Port Dot._Port_position @@ var "p",
-    "pre">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "i" $ list [Serialization.cst @@ string ":", writeId @@ var "i"])
-      (var "mi"),
-    "suf">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "cp" $ list [Serialization.cst @@ string ":", writeCompassPt @@ var "cp"])
-      (var "mp")] $
-    Serialization.noSep @@ (Lists.concat $ list [var "pre", var "suf"])
-
-writeStmt :: TTermDefinition (Bool -> Dot.Stmt -> Expr)
-writeStmt = define "writeStmt" $
-  doc "Convert a statement to an expression" $
-  lambda "directed" $ lambda "s" $
-    cases Dot._Stmt (var "s") Nothing [
-      Dot._Stmt_node>>: lambda "n" $ writeNodeStmt @@ var "n",
-      Dot._Stmt_edge>>: lambda "e" $ writeEdgeStmt @@ var "directed" @@ var "e",
-      Dot._Stmt_attr>>: lambda "a" $ writeAttrStmt @@ var "a",
-      Dot._Stmt_equals>>: lambda "eq" $ writeEqualityPair @@ var "eq",
-      Dot._Stmt_subgraph>>: lambda "sg" $ writeSubgraph @@ var "directed" @@ var "sg"]
-
-writeSubgraph :: TTermDefinition (Bool -> Dot.Subgraph -> Expr)
-writeSubgraph = define "writeSubgraph" $
-  doc "Convert a subgraph to an expression" $
-  lambda "directed" $ lambda "sg" $ lets [
-    "mid">: project Dot._Subgraph Dot._Subgraph_subgraphId @@ var "sg",
-    "stmts">: project Dot._Subgraph Dot._Subgraph_statements @@ var "sg",
-    "body">: Serialization.brackets @@ Serialization.curlyBraces @@ Serialization.inlineStyle @@
-      (Serialization.spaceSep @@ (Lists.map (writeStmt @@ var "directed") (var "stmts")))] $
-    Serialization.spaceSep @@ (Maybes.cat $ list [
-      Maybes.map writeSubgraphId (var "mid"),
-      Maybes.pure (var "body")])
-
-writeSubgraphId :: TTermDefinition (Dot.SubgraphId -> Expr)
-writeSubgraphId = define "writeSubgraphId" $
-  doc "Convert a subgraph identifier to an expression" $
-  lambda "sid" $
-    Serialization.spaceSep @@ (Maybes.cat $ list [
-      Maybes.pure (Serialization.cst @@ string "subgraph"),
-      Maybes.map writeId (unwrap Dot._SubgraphId @@ var "sid")])
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Coder.hs b/src/main/haskell/Hydra/Sources/Haskell/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Coder.hs
+++ /dev/null
@@ -1,1147 +0,0 @@
-
-module Hydra.Sources.Haskell.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                     as Error
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Dependencies   as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Analysis       as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Predicates     as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Resolution     as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Haskell.Environment as HE
-import qualified Hydra.Haskell.Syntax as H
-import qualified Hydra.Sources.Haskell.Environment as HaskellEnvironment
-import qualified Hydra.Sources.Haskell.Language as HaskellLanguage
-import qualified Hydra.Sources.Haskell.Syntax as HaskellSyntax
-import qualified Hydra.Sources.Haskell.Serde as HaskellSerde
-import qualified Hydra.Sources.Haskell.Utils as HaskellUtils
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
--- | Lift Either String to Either Error using a context
-liftStringError :: TTerm Context -> TTerm (Either String a) -> TTerm (Either Error a)
-liftStringError cx = Eithers.bimap ("_s" ~> Ctx.inContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "valid input") (var "_s")) cx) ("_x" ~> var "_x")
-
-type HaskellNamespaces = Namespaces H.ModuleName
-
-haskellCoderDefinition :: String -> TTerm a -> TTermDefinition a
-haskellCoderDefinition = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [HaskellSerde.ns, HaskellUtils.ns,
-      Adapt.ns, Analysis.ns, Dependencies.ns, Predicates.ns, Resolution.ns, Rewriting.ns, Serialization.ns, ShowError.ns, Strip.ns, Variables.ns],
-            moduleTypeDependencies = (HaskellEnvironment.ns:HaskellSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Functions for encoding Hydra modules as Haskell modules"}
-  where
-    ns = Namespace "hydra.haskell.coder"
-    definitions = [
-      toDefinition includeTypeDefinitions,
-      toDefinition useCoreImport,
-      toDefinition keyHaskellVar,
-      toDefinition adaptTypeToHaskellAndEncode,
-      toDefinition constantForFieldName,
-      toDefinition constantForTypeName,
-      toDefinition constructModule,
-      toDefinition emptyMetadata,
-      toDefinition encodeCaseExpression,
-      toDefinition encodeLambdaTerm,
-      toDefinition encodeLiteral,
-      toDefinition encodeProjection,
-      toDefinition encodeStandaloneCases,
-      toDefinition encodeTerm,
-      toDefinition encodeUnwrap,
-      toDefinition encodeType,
-      toDefinition encodeTypeWithClassAssertions,
-      toDefinition extendMetaForTerm,
-      toDefinition extendMetaForType,
-      toDefinition findOrdVariables,
-      toDefinition gatherMetadata,
-      toDefinition getImplicitTypeClasses,
-      toDefinition moduleToHaskellModule,
-      toDefinition moduleToHaskell,
-      toDefinition nameDecls,
-      toDefinition setMetaUsesByteString,
-      toDefinition setMetaUsesInt,
-      toDefinition setMetaUsesMap,
-      toDefinition setMetaUsesSet,
-      toDefinition toDataDeclaration,
---      toDefinition toTypeDeclarations,
-      toDefinition toTypeDeclarationsFrom,
-      toDefinition typeDecl,
-      toDefinition typeSchemeConstraintsToClassMap]
-
--- TODO: make these settings configurable
-includeTypeDefinitions :: TTermDefinition Bool
-includeTypeDefinitions = haskellCoderDefinition "includeTypeDefinitions" $
-  doc "Whether to include type definitions in generated Haskell modules" $
-  false
-useCoreImport :: TTermDefinition Bool
-useCoreImport = haskellCoderDefinition "useCoreImport" $
-  doc "Whether to use the Hydra core import in generated modules" $
-  true
-
-keyHaskellVar :: TTermDefinition Name
-keyHaskellVar = haskellCoderDefinition "keyHaskellVar" $
-  doc "The key used to track Haskell variable depth in annotations" $
-  wrap _Name $ string "haskellVar"
-
-adaptTypeToHaskellAndEncode :: TTermDefinition (HaskellNamespaces -> Type -> Context -> Graph -> Either Error H.Type)
-adaptTypeToHaskellAndEncode = haskellCoderDefinition "adaptTypeToHaskellAndEncode" $
-  doc "Adapt a Hydra type to Haskell's type system and encode it" $
-  "namespaces" ~> "typ" ~> "cx" ~> "g" ~>
-  "enc" <~ ("t" ~> encodeType @@ var "namespaces" @@ var "t" @@ var "cx" @@ var "g") $
-  cases _Type (Strip.deannotateType @@ var "typ")
-    (Just (
-      "adaptedType" <<~ Adapt.adaptTypeForLanguage @@ HaskellLanguage.haskellLanguage @@ var "typ" $
-      var "enc" @@ var "adaptedType")) [
-    _Type_variable>>: constant (var "enc" @@ var "typ")]
-
-constantForFieldName :: TTermDefinition (Name -> Name -> String)
-constantForFieldName = haskellCoderDefinition "constantForFieldName" $
-  doc "Generate a constant name for a field (e.g., '_TypeName_fieldName')" $
-  "tname" ~> "fname" ~>
-    Strings.cat $ list [
-      string "_",
-      Names.localNameOf @@ var "tname",
-      string "_",
-      Core.unName $ var "fname"]
-
-constantForTypeName :: TTermDefinition (Name -> String)
-constantForTypeName = haskellCoderDefinition "constantForTypeName" $
-  doc "Generate a constant name for a type (e.g., '_TypeName')" $
-  "tname" ~>
-    Strings.cat2 (string "_") (Names.localNameOf @@ var "tname")
-
-constructModule :: TTermDefinition (HaskellNamespaces -> Module -> [Definition] -> Context -> Graph -> Either Error H.Module)
-constructModule = haskellCoderDefinition "constructModule" $
-  doc "Construct a Haskell module from a Hydra module and its definitions" $
-  "namespaces" ~> "mod" ~> "defs" ~> "cx" ~> "g" ~> lets [
-  "h">: "namespace" ~>
-    unwrap _Namespace @@ var "namespace",
-  "createDeclarations">: "def" ~>
-    cases _Definition (var "def") Nothing [
-      _Definition_type>>: "type" ~> lets [
-        "name">: Packaging.typeDefinitionName $ var "type",
-        "typ">: Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "type"] $
-        toTypeDeclarationsFrom @@ var "namespaces" @@ var "name" @@ var "typ" @@ var "cx" @@ var "g",
-      _Definition_term>>: "term" ~>
-        "d" <<~ toDataDeclaration @@ var "namespaces" @@ var "term" @@ var "cx" @@ var "g" $
-        right $ list [var "d"]],
-    "importName">: "name" ~>
-      wrap H._ModuleName $ Strings.intercalate (string ".") (Lists.map (Formatting.capitalize) (Strings.splitOn (string ".") (var "name"))),
-    "imports">: Lists.concat2 (var "domainImports") (var "standardImports"),
-    "domainImports">: lets [
-      "toImport">: "pair" ~> lets [
-        "namespace">: Pairs.first $ var "pair",
-        "alias">: Pairs.second $ var "pair",
-        "name">: var "h" @@ var "namespace"] $
-        record H._Import [
-          H._Import_qualified>>: true,
-          H._Import_module>>: var "importName" @@ var "name",
-          H._Import_as>>: just $ var "alias",
-          H._Import_spec>>: nothing]] $
-      Lists.map (var "toImport") (Maps.toList $ Packaging.namespacesMapping $ var "namespaces"),
-    "meta">: gatherMetadata @@ var "defs",
-    "condImport">: "flag" ~> "triple" ~>
-      Logic.ifElse (var "flag")
-        (list [var "triple"])
-        (list ([] :: [TTerm ((String, Maybe String), [String])])),
-    "standardImports">: lets [
-      "toImport">: "triple" ~> lets [
-        "name">: Pairs.first $ Pairs.first $ var "triple",
-        "malias">: Pairs.second $ Pairs.first $ var "triple",
-        "hidden">: Pairs.second $ var "triple",
-        "spec">: Logic.ifElse (Lists.null $ var "hidden")
-          nothing
-          (just $ inject H._SpecImport H._SpecImport_hiding $ Lists.map ("n" ~> record H._ImportExportSpec [
-            H._ImportExportSpec_modifier>>: nothing,
-            H._ImportExportSpec_name>>: HaskellUtils.simpleName @@ var "n",
-            H._ImportExportSpec_subspec>>: nothing]) (var "hidden"))] $
-        record H._Import [
-          H._Import_qualified>>: Maybes.isJust $ var "malias",
-          H._Import_module>>: wrap H._ModuleName $ var "name",
-          H._Import_as>>: Maybes.map (unaryFunction $ wrap H._ModuleName) (var "malias"),
-          H._Import_spec>>: var "spec"]] $
-      Lists.map (var "toImport") $ Lists.concat $ list [
-        -- Prelude is always imported (hides names that conflict with Hydra)
-        list [
-          pair (pair (string "Prelude") nothing) (list $ string <$> [
-            "Enum", "Ordering", "decodeFloat", "encodeFloat", "fail", "map", "pure", "sum"])],
-        -- Data.Scientific is always imported (modules that don't use it produce an unused-import warning)
-        list [
-          pair (pair (string "Data.Scientific") (just $ string "Sci")) (list ([] :: [TTerm String]))],
-        -- Conditional standard imports based on metadata
-        var "condImport"
-          @@ (project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesByteString @@ var "meta")
-          @@ pair (pair (string "Data.ByteString") (just $ string "B")) (list ([] :: [TTerm String])),
-        var "condImport"
-          @@ (project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesInt @@ var "meta")
-          @@ pair (pair (string "Data.Int") (just $ string "I")) (list ([] :: [TTerm String])),
-        var "condImport"
-          @@ (project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesMap @@ var "meta")
-          @@ pair (pair (string "Data.Map") (just $ string "M")) (list ([] :: [TTerm String])),
-        var "condImport"
-          @@ (project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesSet @@ var "meta")
-          @@ pair (pair (string "Data.Set") (just $ string "S")) (list ([] :: [TTerm String])),
-        -- Conditionally add Hydra.Lib.Literals import if binary or decimal literals are present
-        Logic.ifElse (Logic.or
-            (Analysis.moduleContainsBinaryLiterals @@ var "mod")
-            (Analysis.moduleContainsDecimalLiterals @@ var "mod"))
-          (list [pair (pair (string "Hydra.Lib.Literals") (just $ string "Literals")) (list ([] :: [TTerm String]))])
-          (list ([] :: [TTerm ((String, Maybe String), [String])]))]] $
-    "declLists" <<~ Eithers.mapList (var "createDeclarations") (var "defs") $ lets [
-    "decls">: Lists.concat $ var "declLists",
-    "mc">: Packaging.moduleDescription $ var "mod"] $
-    right $ record H._Module [
-      H._Module_head>>: just $ record H._ModuleHead [
-        H._ModuleHead_comments>>: var "mc",
-        H._ModuleHead_name>>: var "importName" @@ (var "h" @@ (Packaging.moduleNamespace $ var "mod")),
-        H._ModuleHead_exports>>: list ([] :: [TTerm H.Export])],
-      H._Module_imports>>: var "imports",
-      H._Module_declarations>>: var "decls"]
-
-emptyMetadata :: TTermDefinition HE.HaskellModuleMetadata
-emptyMetadata = haskellCoderDefinition "emptyMetadata" $
-  doc "Create an initial empty metadata record with all flags set to false" $
-  record HE._HaskellModuleMetadata [
-    HE._HaskellModuleMetadata_usesByteString>>: false,
-    HE._HaskellModuleMetadata_usesInt>>: false,
-    HE._HaskellModuleMetadata_usesMap>>: false,
-    HE._HaskellModuleMetadata_usesSet>>: false]
-
-encodeCaseExpression :: TTermDefinition (Int -> HaskellNamespaces -> CaseStatement -> H.Expression -> Context -> Graph -> Either Error H.Expression)
-encodeCaseExpression = haskellCoderDefinition "encodeCaseExpression" $
-  doc "Encode a Hydra case statement as a Haskell case expression with a given scrutinee" $
-  "depth" ~> "namespaces" ~> "stmt" ~> "scrutinee" ~> "cx" ~> "g" ~> lets [
-    "dn">: Core.caseStatementTypeName $ var "stmt",
-    "def">: Core.caseStatementDefault $ var "stmt",
-    "fields">: Core.caseStatementCases $ var "stmt",
-    "toAlt">: "fieldMap" ~> "field" ~> lets [
-      "fn">: Core.fieldName $ var "field",
-      "fun'">: Core.fieldTerm $ var "field",
-      "v0">: Strings.cat2 (string "v") (Literals.showInt32 $ var "depth"),
-      "raw">: MetaTerms.apply (var "fun'") (Core.termVariable $ Core.name $ var "v0"),
-      "rhsTerm">: Dependencies.simplifyTerm @@ var "raw",
-      "v1">: Logic.ifElse (Variables.isFreeVariableInTerm @@ (wrap _Name $ var "v0") @@ var "rhsTerm")
-        (Constants.ignoredVariable)
-        (var "v0"),
-      "hname">: HaskellUtils.unionFieldReference @@ (Sets.union (Sets.fromList (Maps.keys (Graph.graphBoundTerms $ var "g"))) (Sets.fromList (Maps.keys (Graph.graphSchemaTypes $ var "g")))) @@ var "namespaces" @@ var "dn" @@ var "fn"] $
-          "args" <<~ (Maybes.cases (Maps.lookup (var "fn") (var "fieldMap"))
-              (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (var "fn")) (var "cx")) $
-              "fieldType" ~> lets [
-                "ft">: Core.fieldTypeType $ var "fieldType",
-                "noArgs">: list ([] :: [TTerm H.Pattern]),
-                "singleArg">: list [inject H._Pattern H._Pattern_name $ HaskellUtils.rawName @@ var "v1"]] $
-                cases _Type (Strip.deannotateType @@ var "ft")
-                  (Just $ right $ var "singleArg") [
-                  _Type_unit>>: constant $ right $ var "noArgs"]) $ lets [
-          "lhs">: HaskellUtils.applicationPattern @@ var "hname" @@ var "args"] $
-          "rhs" <<~ Eithers.map (unaryFunction $ wrap H._CaseRhs) (encodeTerm @@ (Math.add (var "depth") (int32 1)) @@ var "namespaces" @@ var "rhsTerm" @@ var "cx" @@ var "g") $
-          right $ record H._Alternative [
-            H._Alternative_pattern>>: var "lhs",
-            H._Alternative_rhs>>: var "rhs",
-            H._Alternative_binds>>: nothing]] $
-    "rt" <<~ Resolution.requireUnionType @@ var "cx" @@ var "g" @@ var "dn" $ lets [
-    "toFieldMapEntry">: "f" ~>
-      pair (Core.fieldTypeName $ var "f") (var "f"),
-    "fieldMap">: Maps.fromList $ Lists.map (var "toFieldMapEntry") (var "rt")] $
-    "ecases" <<~ Eithers.mapList (var "toAlt" @@ var "fieldMap") (var "fields") $
-    "dcases" <<~ (Maybes.cases (var "def")
-      (right $ list ([] :: [TTerm H.CaseRhs])) $
-      "d" ~>
-        "cs" <<~ Eithers.map (unaryFunction $ wrap H._CaseRhs) (encodeTerm @@ var "depth" @@ var "namespaces" @@ var "d" @@ var "cx" @@ var "g") $ lets [
-        "lhs">: inject H._Pattern H._Pattern_name $ HaskellUtils.rawName @@ (Constants.ignoredVariable),
-        "alt">: record H._Alternative [
-          H._Alternative_pattern>>: var "lhs",
-          H._Alternative_rhs>>: var "cs",
-          H._Alternative_binds>>: nothing]] $
-        right $ list [var "alt"]) $
-    right $ inject H._Expression H._Expression_case $ record H._CaseExpression [
-      H._CaseExpression_case>>: var "scrutinee",
-      H._CaseExpression_alternatives>>: Lists.concat2 (var "ecases") (var "dcases")]
-
-encodeUnwrap :: TTermDefinition (HaskellNamespaces -> Name -> Either Error H.Expression)
-encodeUnwrap = haskellCoderDefinition "encodeUnwrap" $
-  doc "Encode an unwrap term as a Haskell expression" $
-  "namespaces" ~> "name" ~>
-  right $ inject H._Expression H._Expression_variable $ HaskellUtils.elementReference @@ var "namespaces" @@
-    (Names.qname @@ (Maybes.fromMaybe (wrap _Namespace $ string "") (Names.namespaceOf @@ var "name")) @@ (HaskellUtils.newtypeAccessorName @@ var "name"))
-
-encodeProjection :: TTermDefinition (HaskellNamespaces -> Projection -> Either Error H.Expression)
-encodeProjection = haskellCoderDefinition "encodeProjection" $
-  doc "Encode a record projection as a Haskell expression" $
-  "namespaces" ~> "proj" ~> lets [
-    "dn">: Core.projectionTypeName $ var "proj",
-    "fname">: Core.projectionField $ var "proj"] $
-    right $ inject H._Expression H._Expression_variable $ HaskellUtils.recordFieldReference @@ var "namespaces" @@ var "dn" @@ var "fname"
-
-encodeLambdaTerm :: TTermDefinition (Int -> HaskellNamespaces -> Lambda -> Context -> Graph -> Either Error H.Expression)
-encodeLambdaTerm = haskellCoderDefinition "encodeLambdaTerm" $
-  doc "Encode a Hydra lambda as a Haskell expression" $
-  "depth" ~> "namespaces" ~> "lam" ~> "cx" ~> "g" ~> lets [
-    "v">: Core.lambdaParameter $ var "lam",
-    "body">: Core.lambdaBody $ var "lam"] $
-    "hbody" <<~ encodeTerm @@ var "depth" @@ var "namespaces" @@ var "body" @@ var "cx" @@ var "g" $
-      right $ HaskellUtils.hslambda @@ (HaskellUtils.elementReference @@ var "namespaces" @@ var "v") @@ var "hbody"
-
-encodeStandaloneCases :: TTermDefinition (Int -> HaskellNamespaces -> CaseStatement -> Context -> Graph -> Either Error H.Expression)
-encodeStandaloneCases = haskellCoderDefinition "encodeStandaloneCases" $
-  doc "Encode a standalone (un-applied) case statement as a Haskell lambda over a case expression" $
-  "depth" ~> "namespaces" ~> "stmt" ~> "cx" ~> "g" ~>
-  -- When used standalone (not applied to an argument), wrap in a lambda
-  Eithers.map (HaskellUtils.hslambda @@ (HaskellUtils.rawName @@ string "x"))
-    (encodeCaseExpression @@ var "depth" @@ var "namespaces" @@ var "stmt" @@ (HaskellUtils.hsvar @@ string "x") @@ var "cx" @@ var "g")
-
-encodeLiteral :: TTermDefinition (Literal -> Context -> Either Error H.Expression)
-encodeLiteral = haskellCoderDefinition "encodeLiteral" $
-  doc "Encode a Hydra literal as a Haskell expression" $
-  "l" ~> "cx" ~>
-    cases _Literal (var "l")
-      (Just $ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "supported literal") (ShowCore.literal @@ var "l")) (var "cx")) [
-      _Literal_binary>>: "bs" ~>
-        right $ HaskellUtils.hsapp
-          @@ (HaskellUtils.hsvar @@ string "Literals.stringToBinary")
-          @@ (HaskellUtils.hslit @@ (inject H._Literal H._Literal_string
-              $ Literals.binaryToString $ var "bs")),
-      _Literal_boolean>>: "b" ~>
-        right $ HaskellUtils.hsvar @@ Logic.ifElse (var "b") (string "True") (string "False"),
-      _Literal_decimal>>: "d" ~>
-        right $ HaskellUtils.hsapp
-          @@ (HaskellUtils.hsvar @@ string "Literals.stringToDecimal")
-          @@ (HaskellUtils.hslit @@ (inject H._Literal H._Literal_string
-              $ Literals.showDecimal $ var "d")),
-      _Literal_float>>: "fv" ~>
-        cases _FloatValue (var "fv") Nothing [
-          _FloatValue_float32>>: "f" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_float $ var "f"),
-          _FloatValue_float64>>: "f" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_double $ var "f"),
-          _FloatValue_bigfloat>>: "f" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_double $ Literals.bigfloatToFloat64 $ var "f")],
-      _Literal_integer>>: "iv" ~>
-        cases _IntegerValue (var "iv") Nothing [
-          _IntegerValue_bigint>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ var "i"),
-          _IntegerValue_int8>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.int8ToBigint $ var "i"),
-          _IntegerValue_int16>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.int16ToBigint $ var "i"),
-          _IntegerValue_int32>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_int $ var "i"),
-          _IntegerValue_int64>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.int64ToBigint $ var "i"),
-          _IntegerValue_uint8>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.uint8ToBigint $ var "i"),
-          _IntegerValue_uint16>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.uint16ToBigint $ var "i"),
-          _IntegerValue_uint32>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.uint32ToBigint $ var "i"),
-          _IntegerValue_uint64>>: "i" ~>
-            right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_integer $ Literals.uint64ToBigint $ var "i")],
-      _Literal_string>>: "s" ~>
-        right $ HaskellUtils.hslit @@ (inject H._Literal H._Literal_string $ var "s")]
-
-encodeTerm :: TTermDefinition (Int -> HaskellNamespaces -> Term -> Context -> Graph -> Either Error H.Expression)
-encodeTerm = haskellCoderDefinition "encodeTerm" $
-  doc "Encode a Hydra term as a Haskell expression" $
-  "depth" ~> "namespaces" ~> "term" ~> "cx" ~> "g" ~> lets [
-    "encode">: "t" ~> encodeTerm @@ var "depth" @@ var "namespaces" @@ var "t" @@ var "cx" @@ var "g"] $
-    "nonemptyMap" <~ ("m" ~> lets [
-      "lhs">: HaskellUtils.hsvar @@ string "M.fromList",
-      "encodePair">: "pair" ~> lets [
-        "k">: Pairs.first $ var "pair",
-        "v">: Pairs.second $ var "pair"] $
-        "hk" <<~ var "encode" @@ var "k" $
-        "hv" <<~ var "encode" @@ var "v" $
-        right $ inject H._Expression H._Expression_tuple $ list [var "hk", var "hv"]] $
-      "rhs" <<~ Eithers.map
-        (unaryFunction $ inject H._Expression H._Expression_list)
-        (Eithers.mapList (var "encodePair") $ Maps.toList (var "m")) $
-      right $ HaskellUtils.hsapp @@ var "lhs" @@ var "rhs") $
-    "nonemptySet" <~ ("s" ~> lets [
-      "lhs">: HaskellUtils.hsvar @@ string "S.fromList" ] $
-      "rhs" <<~ encodeTerm @@ var "depth" @@ var "namespaces" @@ (inject _Term _Term_list $ Sets.toList $ var "s") @@ var "cx" @@ var "g" $
-      right $ HaskellUtils.hsapp @@ var "lhs" @@ var "rhs") $
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just $ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "supported term") (ShowCore.term @@ var "term")) (var "cx")) [
-      _Term_application>>: "app" ~> lets [
-        "fun">: Core.applicationFunction $ var "app",
-        "arg">: Core.applicationArgument $ var "app",
-        "deannotatedFun">: Strip.deannotateTerm @@ (var "fun")] $
-        -- When the function is a union elimination, encode as a direct case expression
-        -- instead of (\x -> case x of ...) arg
-        cases _Term (var "deannotatedFun")
-          (Just $
-            "hfun" <<~ var "encode" @@ var "fun" $
-              "harg" <<~ var "encode" @@ var "arg" $
-                right $ HaskellUtils.hsapp @@ var "hfun" @@ var "harg") [
-          _Term_cases>>: "stmt" ~>
-            "harg" <<~ var "encode" @@ var "arg" $
-              encodeCaseExpression @@ var "depth" @@ var "namespaces" @@ var "stmt" @@ var "harg" @@ var "cx" @@ var "g"],
-      _Term_cases>>: "stmt" ~>
-        encodeStandaloneCases @@ var "depth" @@ var "namespaces" @@ var "stmt" @@ var "cx" @@ var "g",
-      _Term_either>>: "e" ~> Eithers.either_
-          ("l" ~>
-            "hl" <<~ var "encode" @@ var "l" $
-              right $ HaskellUtils.hsapp @@ (HaskellUtils.hsvar @@ string "Left") @@ var "hl")
-          ("r" ~>
-            "hr" <<~ var "encode" @@ var "r" $
-              right $ HaskellUtils.hsapp @@ (HaskellUtils.hsvar @@ string "Right") @@ var "hr")
-          (var "e"),
-      _Term_lambda>>: "lam" ~>
-        encodeLambdaTerm @@ var "depth" @@ var "namespaces" @@ var "lam" @@ var "cx" @@ var "g",
-      _Term_project>>: "proj" ~>
-        encodeProjection @@ var "namespaces" @@ var "proj",
-      _Term_unwrap>>: "name" ~>
-        encodeUnwrap @@ var "namespaces" @@ var "name",
-      _Term_let>>: "letTerm" ~> lets [
-        "collectBindings">: "lt" ~>
-          "bs" <~ Core.letBindings (var "lt") $
-          "body" <~ Core.letBody (var "lt") $
-          cases _Term (Strip.deannotateTerm @@ var "body")
-            (Just $ pair (var "bs") (var "body")) [
-            _Term_let>>: "innerLt" ~>
-              "innerResult" <~ var "collectBindings" @@ var "innerLt" $
-              pair (Lists.concat2 (var "bs") (Pairs.first $ var "innerResult")) (Pairs.second $ var "innerResult")],
-        "collected">: var "collectBindings" @@ var "letTerm",
-        "allBindings">: Pairs.first $ var "collected",
-        "finalBody">: Pairs.second $ var "collected",
-        "encodeBinding">: "binding" ~> lets [
-          "name">: Core.bindingName $ var "binding",
-          "term'">: Core.bindingTerm $ var "binding",
-          "hname">: HaskellUtils.simpleName @@ (Core.unName $ var "name")] $
-          "hexpr" <<~ var "encode" @@ var "term'" $
-          right $ inject H._LocalBinding H._LocalBinding_value $ HaskellUtils.simpleValueBinding @@ var "hname" @@ var "hexpr" @@ nothing] $
-        "hbindings" <<~ Eithers.mapList (var "encodeBinding") (var "allBindings") $
-        "hinner" <<~ var "encode" @@ var "finalBody" $
-        right $ inject H._Expression H._Expression_let $ record H._LetExpression [
-          H._LetExpression_bindings>>: var "hbindings",
-          H._LetExpression_inner>>: var "hinner"],
-      _Term_list>>: "els" ~>
-        "helems" <<~ Eithers.mapList (var "encode") (var "els") $
-          right $ inject H._Expression H._Expression_list $ var "helems",
-      _Term_literal>>: "v" ~>
-        encodeLiteral @@ var "v" @@ var "cx",
-      _Term_map>>: "m" ~> Logic.ifElse (Maps.null $ var "m")
-        (right $ HaskellUtils.hsvar @@ string "M.empty")
-        (var "nonemptyMap" @@ var "m"),
-      _Term_maybe>>: "m" ~>
-        Maybes.cases (var "m")
-          (right $ HaskellUtils.hsvar @@ string "Nothing") $
-          "t" ~>
-            "ht" <<~ var "encode" @@ var "t" $
-              right $ HaskellUtils.hsapp @@ (HaskellUtils.hsvar @@ string "Just") @@ var "ht",
-      _Term_pair>>: "p" ~>
-        "f" <<~ var "encode" @@ Pairs.first (var "p") $
-        "s" <<~ var "encode" @@ Pairs.second (var "p") $
-        right $ inject H._Expression H._Expression_tuple $ list [var "f", var "s"],
-      _Term_record>>: "record" ~> lets [
-        "sname">: Core.recordTypeName $ var "record",
-        "fields">: Core.recordFields $ var "record",
-        "toFieldUpdate">: "field" ~> lets [
-          "fn">: Core.fieldName $ var "field",
-          "ft">: Core.fieldTerm $ var "field",
-          "fieldRef">: HaskellUtils.recordFieldReference @@ var "namespaces" @@ var "sname" @@ var "fn"] $
-          "hft" <<~ var "encode" @@ var "ft" $
-          right $ record H._FieldUpdate [
-            H._FieldUpdate_name>>: var "fieldRef",
-            H._FieldUpdate_value>>: var "hft"],
-          "typeName">: HaskellUtils.elementReference @@ var "namespaces" @@ var "sname"] $
-          "updates" <<~ Eithers.mapList (var "toFieldUpdate") (var "fields") $
-          right $ inject H._Expression H._Expression_constructRecord $ record H._ConstructRecordExpression [
-            H._ConstructRecordExpression_name>>: var "typeName",
-            H._ConstructRecordExpression_fields>>: var "updates"],
-      _Term_set>>: "s" ~> Logic.ifElse (Sets.null $ var "s")
-        (right $ HaskellUtils.hsvar @@ string "S.empty")
-        (var "nonemptySet" @@ var "s"),
-      _Term_typeLambda>>: "abs" ~> lets [
-        "term1">: Core.typeLambdaBody $ var "abs"] $
-        var "encode" @@ var "term1",
-      _Term_typeApplication>>: "typed" ~> lets [
-        "term1">: Core.typeApplicationTermBody $ var "typed"] $
-        var "encode" @@ var "term1",
-      _Term_inject>>: "injection" ~> lets [
-        "sname">: Core.injectionTypeName $ var "injection",
-        "field">: Core.injectionField $ var "injection",
-        "fn">: Core.fieldName $ var "field",
-        "ft">: Core.fieldTerm $ var "field",
-        "lhs">: inject H._Expression H._Expression_variable $ HaskellUtils.unionFieldReference @@ (Sets.union (Sets.fromList (Maps.keys (Graph.graphBoundTerms $ var "g"))) (Sets.fromList (Maps.keys (Graph.graphSchemaTypes $ var "g")))) @@ var "namespaces" @@ var "sname" @@ var "fn",
-        "dflt">: Eithers.map (HaskellUtils.hsapp @@ var "lhs") (var "encode" @@ var "ft")] $
-        "ftyp" <<~ Resolution.requireUnionField_ @@ var "cx" @@ var "g" @@ var "sname" @@ var "fn" $
-        cases _Type (Strip.deannotateType @@ var "ftyp")
-          (Just $ var "dflt") [
-          _Type_unit>>: constant $ right $ var "lhs"],
-      _Term_unit>>: constant $ right $ inject H._Expression H._Expression_tuple $ list ([] :: [TTerm H.Expression]),
-      _Term_variable>>: "name" ~>
-        right $ inject H._Expression H._Expression_variable $ HaskellUtils.elementReference @@ var "namespaces" @@ var "name",
-      _Term_wrap>>: "wrapped" ~> lets [
-        "tname">: Core.wrappedTermTypeName $ var "wrapped",
-        "term'">: Core.wrappedTermBody $ var "wrapped",
-        "lhs">: inject H._Expression H._Expression_variable $ HaskellUtils.elementReference @@ var "namespaces" @@ var "tname"] $
-        "rhs" <<~ var "encode" @@ var "term'" $
-        right $ HaskellUtils.hsapp @@ var "lhs" @@ var "rhs"]
-
-encodeType :: TTermDefinition (HaskellNamespaces -> Type -> Context -> Graph -> Either Error H.Type)
-encodeType = haskellCoderDefinition "encodeType" $
-  doc "Encode a Hydra type as a Haskell type" $
-  "namespaces" ~>
-  "typ" ~> "cx" ~> "g" ~> lets [
-  "encode">: "t" ~> encodeType @@ var "namespaces" @@ var "t" @@ var "cx" @@ var "g",
-  "ref">: "name" ~>
-    right $ inject H._Type H._Type_variable $ HaskellUtils.elementReference @@ var "namespaces" @@ var "name",
-  "unitTuple">: inject H._Type H._Type_tuple $ list ([] :: [TTerm H.Type])] $
-  cases _Type (Strip.deannotateType @@ var "typ")
-    (Just $ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "supported type") (ShowCore.type_ @@ var "typ")) (var "cx")) [
-    _Type_application>>: "app" ~> lets [
-      "lhs">: Core.applicationTypeFunction $ var "app",
-      "rhs">: Core.applicationTypeArgument $ var "app"] $
-      "hlhs" <<~ var "encode" @@ var "lhs" $
-        "hrhs" <<~ var "encode" @@ var "rhs" $
-          right $ HaskellUtils.toTypeApplication @@ list [var "hlhs", var "hrhs"],
-    _Type_either>>: "eitherType" ~> lets [
-      "left'">: Core.eitherTypeLeft $ var "eitherType",
-      "right'">: Core.eitherTypeRight $ var "eitherType"] $
-      "hleft" <<~ var "encode" @@ var "left'" $
-      "hright" <<~ var "encode" @@ var "right'" $
-      right $ HaskellUtils.toTypeApplication @@ list [
-          inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Either",
-          var "hleft",
-          var "hright"],
-    _Type_function>>: "funType" ~> lets [
-      "dom">: Core.functionTypeDomain $ var "funType",
-      "cod">: Core.functionTypeCodomain $ var "funType"] $
-      "hdom" <<~ var "encode" @@ var "dom" $
-        "hcod" <<~ var "encode" @@ var "cod" $
-          right $ inject H._Type H._Type_function $ record H._FunctionType [
-            H._FunctionType_domain>>: var "hdom",
-            H._FunctionType_codomain>>: var "hcod"],
-    _Type_forall>>: "forallType" ~> lets [
-      "v">: Core.forallTypeParameter $ var "forallType",
-      "body">: Core.forallTypeBody $ var "forallType"] $
-      var "encode" @@ var "body",
-    _Type_list>>: "lt" ~>
-      "hlt" <<~ var "encode" @@ var "lt" $
-        right $ inject H._Type H._Type_list $ var "hlt",
-    _Type_literal>>: "lt" ~>
-      cases _LiteralType (var "lt")
-        (Just $ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "supported literal type") (ShowCore.literalType @@ var "lt")) (var "cx")) [
-        _LiteralType_binary>>: constant $
-          right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "B.ByteString",
-        _LiteralType_boolean>>: constant $
-          right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Bool",
-        _LiteralType_decimal>>: constant $
-          right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Sci.Scientific",
-        _LiteralType_float>>: "ft" ~>
-          cases _FloatType (var "ft") Nothing [
-            _FloatType_float32>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Float",
-            _FloatType_float64>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Double",
-            _FloatType_bigfloat>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Double"],
-        _LiteralType_integer>>: "it" ~>
-          cases _IntegerType (var "it")
-            (Just $ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "supported integer type") (ShowCore.integerType @@ var "it")) (var "cx")) [
-            _IntegerType_bigint>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Integer",
-            _IntegerType_int8>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "I.Int8",
-            _IntegerType_int16>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "I.Int16",
-            _IntegerType_int32>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Int",
-            _IntegerType_int64>>: constant $
-              right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "I.Int64"],
-        _LiteralType_string>>: constant $
-          right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "String"],
-    _Type_map>>: "mapType" ~> lets [
-      "kt">: Core.mapTypeKeys $ var "mapType",
-      "vt">: Core.mapTypeValues $ var "mapType"] $
-      "hkt" <<~ var "encode" @@ var "kt" $
-      "hvt" <<~ var "encode" @@ var "vt" $
-      right $ HaskellUtils.toTypeApplication @@ list [
-          inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "M.Map",
-          var "hkt",
-          var "hvt"],
-    _Type_maybe>>: "ot" ~>
-      "hot" <<~ var "encode" @@ var "ot" $
-      right $ HaskellUtils.toTypeApplication @@ list [
-          inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Maybe",
-          var "hot"],
-    _Type_pair>>: "pt" ~>
-      "f" <<~ var "encode" @@ (Core.pairTypeFirst $ var "pt") $
-      "s" <<~ var "encode" @@ (Core.pairTypeSecond $ var "pt") $
-        right $ inject H._Type H._Type_tuple $ list [var "f", var "s"],
-    _Type_record>>: constant (var "ref" @@ Core.name (string "placeholder")),
-    _Type_set>>: "st" ~>
-      "hst" <<~ var "encode" @@ var "st" $
-      right $ HaskellUtils.toTypeApplication @@ list [
-          inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "S.Set",
-          var "hst"],
-    _Type_union>>: constant (var "ref" @@ Core.name (string "placeholder")),
-    _Type_unit>>: constant $ right $ var "unitTuple",
-    _Type_variable>>: "v1" ~> var "ref" @@ var "v1",
-    _Type_void>>: constant $
-      right $ inject H._Type H._Type_variable $ HaskellUtils.rawName @@ string "Void",
-    _Type_wrap>>: constant (var "ref" @@ Core.name (string "placeholder"))]
-
-encodeTypeWithClassAssertions :: TTermDefinition (HaskellNamespaces -> M.Map Name (S.Set TypeClass) -> Type -> Context -> Graph -> Either Error H.Type)
-encodeTypeWithClassAssertions = haskellCoderDefinition "encodeTypeWithClassAssertions" $
-  doc "Encode a Hydra type as a Haskell type with typeclass assertions" $
-  "namespaces" ~> "explicitClasses" ~> "typ" ~> "cx" ~> "g" ~> lets [
-    "classes">: Maps.union (var "explicitClasses") (getImplicitTypeClasses @@ var "typ"),
-    "implicitClasses">: getImplicitTypeClasses @@ var "typ",
-    "encodeAssertion">: "pair" ~> lets [
-      "name">: Pairs.first $ var "pair",
-      "cls">: Pairs.second $ var "pair",
-      "hname">: HaskellUtils.rawName @@ cases _TypeClass (var "cls") Nothing [
-        _TypeClass_equality>>: constant $ string "Eq",
-        _TypeClass_ordering>>: constant $ string "Ord"],
-      "htype">: inject H._Type H._Type_variable $ HaskellUtils.rawName @@ (Core.unName $ var "name")] $
-      inject H._Assertion H._Assertion_class $ record H._ClassAssertion [
-        H._ClassAssertion_name>>: var "hname",
-        H._ClassAssertion_types>>: list [var "htype"]],
-    "assertPairs">: Lists.concat $ Lists.map (var "toPairs") (Maps.toList $ var "classes"),
-    "toPairs">: "mapEntry" ~> lets [
-      "name">: Pairs.first $ var "mapEntry",
-      "clsSet">: Pairs.second $ var "mapEntry",
-      "toPair">: "c" ~>
-        pair (var "name") (var "c")] $
-      Lists.map (var "toPair") (Sets.toList $ var "clsSet")] $
-      "htyp" <<~ adaptTypeToHaskellAndEncode @@ var "namespaces" @@ var "typ" @@ var "cx" @@ var "g" $
-      Logic.ifElse (Lists.null $ var "assertPairs")
-        (right $ var "htyp") (lets [
-          "encoded">: Lists.map (var "encodeAssertion") (var "assertPairs"),
-          "hassert">: Logic.ifElse (Equality.equal (Lists.length $ var "encoded") (int32 1))
-            (Maybes.fromMaybe (inject H._Assertion H._Assertion_tuple $ var "encoded") (Lists.maybeHead $ var "encoded"))
-            (inject H._Assertion H._Assertion_tuple $ var "encoded")] $
-          right $ inject H._Type H._Type_ctx $ record H._ContextType [
-            H._ContextType_ctx>>: var "hassert",
-            H._ContextType_type>>: var "htyp"])
-
-extendMetaForTerm :: TTermDefinition (HE.HaskellModuleMetadata -> Term -> HE.HaskellModuleMetadata)
-extendMetaForTerm = haskellCoderDefinition "extendMetaForTerm" $
-  doc "Extend metadata by analyzing a term for standard import usage (bottom-up step function)" $
-  "meta" ~> "term" ~>
-    cases _Term (var "term") (Just $ var "meta") [
-      _Term_map>>: constant $
-        setMetaUsesMap @@ true @@ var "meta",
-      _Term_set>>: constant $
-        setMetaUsesSet @@ true @@ var "meta"]
-
-extendMetaForType :: TTermDefinition (HE.HaskellModuleMetadata -> Type -> HE.HaskellModuleMetadata)
-extendMetaForType = haskellCoderDefinition "extendMetaForType" $
-  doc "Extend metadata by analyzing a type for standard import usage (bottom-up step function)" $
-  "meta" ~> "typ" ~>
-    cases _Type (Strip.deannotateType @@ var "typ") (Just $ var "meta") [
-      _Type_literal>>: "lt" ~>
-        cases _LiteralType (var "lt") (Just $ var "meta") [
-          _LiteralType_binary>>: constant $
-            setMetaUsesByteString @@ true @@ var "meta",
-          _LiteralType_integer>>: "it" ~>
-            cases _IntegerType (var "it") (Just $ var "meta") [
-              _IntegerType_int8>>: constant $ setMetaUsesInt @@ true @@ var "meta",
-              _IntegerType_int16>>: constant $ setMetaUsesInt @@ true @@ var "meta",
-              _IntegerType_int64>>: constant $ setMetaUsesInt @@ true @@ var "meta"]],
-      _Type_map>>: constant $
-        setMetaUsesMap @@ true @@ var "meta",
-      _Type_set>>: constant $
-        setMetaUsesSet @@ true @@ var "meta"]
-
-findOrdVariables :: TTermDefinition (Type -> S.Set Name)
-findOrdVariables = haskellCoderDefinition "findOrdVariables" $
-  doc "Find type variables that require an Ord constraint (used in maps or sets)" $
-  "typ" ~> lets [
-    "fold">: "names" ~> "typ'" ~>
-      cases _Type (var "typ'")
-        (Just $ var "names") [
-        _Type_map>>: "mapType" ~> lets [
-          "kt">: Core.mapTypeKeys $ var "mapType"] $
-          var "tryType" @@ var "names" @@ var "kt",
-        _Type_set>>: "et" ~>
-          var "tryType" @@ var "names" @@ var "et"],
-    "isTypeVariable">: "v" ~>
-      Maybes.isNothing $ Names.namespaceOf @@ var "v",
-    "tryType">: "names" ~> "t" ~>
-      cases _Type (Strip.deannotateType @@ var "t")
-        (Just $ var "names") [
-        _Type_variable>>: "v" ~>
-          Logic.ifElse (var "isTypeVariable" @@ var "v")
-            (Sets.insert (var "v") (var "names"))
-            (var "names")]] $
-    Rewriting.foldOverType @@ Coders.traversalOrderPre @@ var "fold" @@ Sets.empty @@ var "typ"
-
-gatherMetadata :: TTermDefinition ([Definition] -> HE.HaskellModuleMetadata)
-gatherMetadata = haskellCoderDefinition "gatherMetadata" $
-  doc "Gather metadata from definitions by bottom-up traversal of all terms and types" $
-  "defs" ~>
-    "addDef" <~ ("meta" ~> "def" ~>
-      cases _Definition (var "def") Nothing [
-        _Definition_term>>: "termDef" ~>
-          "term" <~ Packaging.termDefinitionTerm (var "termDef") $
-          "metaWithTerm" <~ (Rewriting.foldOverTerm @@ Coders.traversalOrderPre
-            @@ ("m" ~> "t" ~> extendMetaForTerm @@ var "m" @@ var "t") @@ var "meta" @@ var "term") $
-          Maybes.maybe (var "metaWithTerm")
-            ("ts" ~>
-              Rewriting.foldOverType @@ Coders.traversalOrderPre
-                @@ ("m" ~> "t" ~> extendMetaForType @@ var "m" @@ var "t") @@ var "metaWithTerm" @@ (Core.typeSchemeBody $ var "ts"))
-            (Packaging.termDefinitionTypeScheme $ var "termDef"),
-        _Definition_type>>: "typeDef" ~>
-          "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "typeDef")) $
-          Rewriting.foldOverType @@ Coders.traversalOrderPre
-            @@ ("m" ~> "t" ~> extendMetaForType @@ var "m" @@ var "t") @@ var "meta" @@ var "typ"]) $
-    Lists.foldl (var "addDef") (asTerm emptyMetadata) (var "defs")
-
-getImplicitTypeClasses :: TTermDefinition (Type -> M.Map Name (S.Set TypeClass))
-getImplicitTypeClasses = haskellCoderDefinition "getImplicitTypeClasses" $
-  doc "Get implicit typeclass constraints for type variables that need Ord" $
-  "typ" ~> lets [
-    "toPair">: "name" ~>
-      pair (var "name") (Sets.fromList $ list [Graph.typeClassOrdering])] $
-    Maps.fromList $ Lists.map (var "toPair") (Sets.toList $ findOrdVariables @@ var "typ")
-
-moduleToHaskellModule :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Prelude.Either Error H.Module)
-moduleToHaskellModule = haskellCoderDefinition "moduleToHaskellModule" $
-  doc "Convert a Hydra module and definitions to a Haskell module AST" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~>
-    "namespaces" <<~ HaskellUtils.namespacesForModule @@ var "mod" @@ var "cx" @@ var "g" $
-      constructModule @@ var "namespaces" @@ var "mod" @@ var "defs" @@ var "cx" @@ var "g"
-
-moduleToHaskell :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Prelude.Either Error (M.Map String String))
-moduleToHaskell = haskellCoderDefinition "moduleToHaskell" $
-  doc "Convert a Hydra module to Haskell source code as a filepath-to-content map" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~>
-  "hsmod" <<~ moduleToHaskellModule @@ var "mod" @@ var "defs" @@ var "cx" @@ var "g" $ lets [
-  "s">: Serialization.printExpr @@ (Serialization.parenthesize @@ (HaskellSerde.moduleToExpr @@ var "hsmod")),
-  "filepath">: Names.namespaceToFilePath @@ Util.caseConventionPascal @@ (wrap _FileExtension $ string "hs") @@ (Packaging.moduleNamespace $ var "mod")] $
-  right $ Maps.singleton (var "filepath") (var "s")
-
-nameDecls :: TTermDefinition (HaskellNamespaces -> Name -> Type -> [H.DeclarationWithComments])
-nameDecls = haskellCoderDefinition "nameDecls" $
-  doc "Generate Haskell declarations for type and field name constants" $
-  "namespaces" ~> "name" ~> "typ" ~> lets [
-    "nm">: Core.unName $ var "name",
-    "toDecl">: "n" ~> "pair" ~> lets [
-      "k">: Pairs.first $ var "pair",
-      "v">: Pairs.second $ var "pair",
-      "decl">: inject H._Declaration H._Declaration_valueBinding $ inject H._ValueBinding H._ValueBinding_simple $ record H._SimpleValueBinding [
-        H._SimpleValueBinding_pattern>>: HaskellUtils.applicationPattern @@ (HaskellUtils.simpleName @@ var "k") @@ list ([] :: [TTerm H.Pattern]),
-        H._SimpleValueBinding_rhs>>: wrap H._RightHandSide $ inject H._Expression H._Expression_application $ record H._ApplicationExpression [
-          H._ApplicationExpression_function>>: inject H._Expression H._Expression_variable $ HaskellUtils.elementReference @@ var "namespaces" @@ var "n",
-          H._ApplicationExpression_argument>>: inject H._Expression H._Expression_literal $ inject H._Literal H._Literal_string $ var "v"],
-        H._SimpleValueBinding_localBindings>>: nothing]] $
-      record H._DeclarationWithComments [
-        H._DeclarationWithComments_body>>: var "decl",
-        H._DeclarationWithComments_comments>>: nothing],
-    "nameDecl">: pair (constantForTypeName @@ var "name") (var "nm"),
-    "fieldDecls">: Lists.map (var "toConstant") (Lexical.fieldsOf @@ var "typ"),
-    "toConstant">: "fieldType" ~> lets [
-      "fname">: Core.fieldTypeName $ var "fieldType"] $
-      pair (constantForFieldName @@ var "name" @@ var "fname") (Core.unName $ var "fname")] $
-    Logic.ifElse (useCoreImport)
-      (Lists.cons (var "toDecl" @@ Core.nameLift _Name @@ var "nameDecl") (Lists.map (var "toDecl" @@ Core.nameLift _Name) (var "fieldDecls")))
-      (list ([] :: [TTerm H.DeclarationWithComments]))
-
-setMetaUsesByteString :: TTermDefinition (Bool -> HE.HaskellModuleMetadata -> HE.HaskellModuleMetadata)
-setMetaUsesByteString = haskellCoderDefinition "setMetaUsesByteString" $
-  "b" ~> "m" ~>
-    record HE._HaskellModuleMetadata [
-      HE._HaskellModuleMetadata_usesByteString>>: var "b",
-      HE._HaskellModuleMetadata_usesInt>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesInt @@ var "m",
-      HE._HaskellModuleMetadata_usesMap>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesMap @@ var "m",
-      HE._HaskellModuleMetadata_usesSet>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesSet @@ var "m"]
-
-setMetaUsesInt :: TTermDefinition (Bool -> HE.HaskellModuleMetadata -> HE.HaskellModuleMetadata)
-setMetaUsesInt = haskellCoderDefinition "setMetaUsesInt" $
-  "b" ~> "m" ~>
-    record HE._HaskellModuleMetadata [
-      HE._HaskellModuleMetadata_usesByteString>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesByteString @@ var "m",
-      HE._HaskellModuleMetadata_usesInt>>: var "b",
-      HE._HaskellModuleMetadata_usesMap>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesMap @@ var "m",
-      HE._HaskellModuleMetadata_usesSet>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesSet @@ var "m"]
-
-setMetaUsesMap :: TTermDefinition (Bool -> HE.HaskellModuleMetadata -> HE.HaskellModuleMetadata)
-setMetaUsesMap = haskellCoderDefinition "setMetaUsesMap" $
-  "b" ~> "m" ~>
-    record HE._HaskellModuleMetadata [
-      HE._HaskellModuleMetadata_usesByteString>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesByteString @@ var "m",
-      HE._HaskellModuleMetadata_usesInt>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesInt @@ var "m",
-      HE._HaskellModuleMetadata_usesMap>>: var "b",
-      HE._HaskellModuleMetadata_usesSet>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesSet @@ var "m"]
-
-setMetaUsesSet :: TTermDefinition (Bool -> HE.HaskellModuleMetadata -> HE.HaskellModuleMetadata)
-setMetaUsesSet = haskellCoderDefinition "setMetaUsesSet" $
-  "b" ~> "m" ~>
-    record HE._HaskellModuleMetadata [
-      HE._HaskellModuleMetadata_usesByteString>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesByteString @@ var "m",
-      HE._HaskellModuleMetadata_usesInt>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesInt @@ var "m",
-      HE._HaskellModuleMetadata_usesMap>>:
-        project HE._HaskellModuleMetadata HE._HaskellModuleMetadata_usesMap @@ var "m",
-      HE._HaskellModuleMetadata_usesSet>>: var "b"]
-
-toDataDeclaration :: TTermDefinition (HaskellNamespaces -> TermDefinition -> Context -> Graph -> Either Error H.DeclarationWithComments)
-toDataDeclaration = haskellCoderDefinition "toDataDeclaration" $
-  doc "Convert a Hydra term definition to a Haskell declaration with comments" $
-  "namespaces" ~> "def" ~> "cx" ~> "g" ~> lets [
-    "name">: Packaging.termDefinitionName $ var "def",
-    "term">: Packaging.termDefinitionTerm $ var "def",
-    "typ">: Packaging.termDefinitionTypeScheme $ var "def",
-    "hname">: HaskellUtils.simpleName @@ (Names.localNameOf @@ var "name"),
-    "rewriteValueBinding">: "vb" ~>
-      cases H._ValueBinding (var "vb") Nothing [
-        H._ValueBinding_simple>>: "simple" ~> lets [
-          "pattern'">: project H._SimpleValueBinding H._SimpleValueBinding_pattern @@ var "simple",
-          "rhs">: project H._SimpleValueBinding H._SimpleValueBinding_rhs @@ var "simple",
-          "bindings">: project H._SimpleValueBinding H._SimpleValueBinding_localBindings @@ var "simple"] $
-          cases H._Pattern (var "pattern'")
-            (Just $ var "vb") [
-            H._Pattern_application>>: "appPat" ~> lets [
-              "name'">: project H._ApplicationPattern H._ApplicationPattern_name @@ var "appPat",
-              "args">: project H._ApplicationPattern H._ApplicationPattern_args @@ var "appPat",
-              "rhsExpr">: unwrap H._RightHandSide @@ var "rhs"] $
-              cases H._Expression (var "rhsExpr")
-                (Just $ var "vb") [
-                H._Expression_lambda>>: "lambda'" ~> lets [
-                  "vars">: project H._LambdaExpression H._LambdaExpression_bindings @@ var "lambda'",
-                  "body">: project H._LambdaExpression H._LambdaExpression_inner @@ var "lambda'",
-                  "newPattern">: HaskellUtils.applicationPattern @@ var "name'" @@ (Lists.concat2 (var "args") (var "vars")),
-                  "newRhs">: wrap H._RightHandSide $ var "body"] $
-                  var "rewriteValueBinding" @@ (inject H._ValueBinding H._ValueBinding_simple $ record H._SimpleValueBinding [
-                    H._SimpleValueBinding_pattern>>: var "newPattern",
-                    H._SimpleValueBinding_rhs>>: var "newRhs",
-                    H._SimpleValueBinding_localBindings>>: var "bindings"])]]],
-    "toDecl">: "comments" ~> "hname'" ~> "term'" ~> "bindings" ~>
-      cases _Term (Strip.deannotateTerm @@ var "term'")
-        (Just $
-          "hterm" <<~ encodeTerm @@ int32 0 @@ var "namespaces" @@ var "term'" @@ var "cx" @@ var "g" $ lets [
-         "vb">: HaskellUtils.simpleValueBinding @@ var "hname'" @@ var "hterm" @@ var "bindings",
-         -- Extract constraints from the TypeScheme and convert to class assertions
-         "schemeConstraints">: optCases (var "typ") Phantoms.nothing ("ts" ~> Core.typeSchemeConstraints (var "ts")),
-         "schemeClasses">: typeSchemeConstraintsToClassMap @@ var "schemeConstraints"] $
-         "explicitClasses" <<~ Annotations.getTypeClasses @@ var "cx" @@ var "g" @@ (Strip.removeTypesFromTerm @@ var "term") $
-         -- Combine constraints from TypeScheme with any explicit annotations
-         "combinedClasses" <~ Maps.union (var "schemeClasses") (var "explicitClasses") $
-         "schemeType" <~ optCases (var "typ") Core.typeUnit ("ts" ~> Core.typeSchemeBody (var "ts")) $
-         "htype" <<~ encodeTypeWithClassAssertions @@ var "namespaces" @@ var "combinedClasses" @@ var "schemeType" @@ var "cx" @@ var "g" $ lets [
-         "decl">: inject H._Declaration H._Declaration_typedBinding $ record H._TypedBinding [
-           H._TypedBinding_typeSignature>>: record H._TypeSignature [
-             H._TypeSignature_name>>: var "hname'",
-             H._TypeSignature_type>>: var "htype"],
-           H._TypedBinding_valueBinding>>: var "rewriteValueBinding" @@ var "vb"]] $
-          right $ record H._DeclarationWithComments [
-            H._DeclarationWithComments_body>>: var "decl",
-            H._DeclarationWithComments_comments>>: var "comments"]) [
-        _Term_let>>: "letTerm" ~> lets [
-          -- For let terms, encode each binding's term directly
-          "lbindings">: Core.letBindings $ var "letTerm",
-          "env">: Core.letBody $ var "letTerm",
-          "toTermDefinition">: "hname''" ~> "hterm'" ~>
-            inject H._LocalBinding H._LocalBinding_value $ HaskellUtils.simpleValueBinding @@ var "hname''" @@ var "hterm'" @@ nothing,
-          "hnames">: Lists.map ("binding" ~> HaskellUtils.simpleName @@ (Core.unName $ Core.bindingName $ var "binding")) (var "lbindings"),
-          "terms">: Lists.map (unaryFunction $ Core.bindingTerm) (var "lbindings")] $
-          "hterms" <<~ Eithers.mapList ("t" ~> encodeTerm @@ int32 0 @@ var "namespaces" @@ var "t" @@ var "cx" @@ var "g") (var "terms") $ lets [
-          "hbindings">: Lists.zipWith (var "toTermDefinition") (var "hnames") (var "hterms"),
-          -- Merge new bindings with any previously accumulated bindings from outer lets
-          "prevBindings">: Maybes.maybe (list ([] :: [TTerm H.LocalBinding])) ("lb" ~> unwrap H._LocalBindings @@ var "lb") (var "bindings"),
-          "allBindings">: Lists.concat2 (var "prevBindings") (var "hbindings")] $
-          var "toDecl" @@ var "comments" @@ var "hname'" @@ var "env" @@ (just $ wrap H._LocalBindings $ var "allBindings")]] $
-    "comments" <<~ Annotations.getTermDescription @@ var "cx" @@ var "g" @@ var "term" $
-    var "toDecl" @@ var "comments" @@ var "hname" @@ var "term" @@ nothing
-
--- | Simplified version of toTypeDeclarations that works with Name and Type directly
--- This is used with the new Definition-based API
-toTypeDeclarationsFrom :: TTermDefinition (HaskellNamespaces -> Name -> Type -> Context -> Graph -> Either Error [H.DeclarationWithComments])
-toTypeDeclarationsFrom = haskellCoderDefinition "toTypeDeclarationsFrom" $
-  doc "Convert a Hydra type definition to Haskell declarations" $
-  "namespaces" ~> "elementName" ~> "typ" ~> "cx" ~> "g" ~> lets [
-    "lname">: Names.localNameOf @@ var "elementName",
-    "hname">: HaskellUtils.simpleName @@ var "lname",
-    "declHead">: "name" ~> "vars'" ~>
-      Maybes.fromMaybe
-        (inject H._DeclarationHead H._DeclarationHead_simple $ var "name")
-        (Maybes.map
-          ("p" ~> lets [
-            "h">: Pairs.first $ var "p",
-            "rest">: Pairs.second $ var "p",
-            "hvar">: wrap H._Variable $ HaskellUtils.simpleName @@ (Core.unName $ var "h")] $
-            inject H._DeclarationHead H._DeclarationHead_application $ record H._ApplicationDeclarationHead [
-              H._ApplicationDeclarationHead_function>>: var "declHead" @@ var "name" @@ var "rest",
-              H._ApplicationDeclarationHead_operand>>: var "hvar"])
-          (Lists.uncons $ var "vars'")),
-    "newtypeCons">: "tname" ~> "typ'" ~> lets [
-      "hname0">: HaskellUtils.simpleName @@ (HaskellUtils.newtypeAccessorName @@ var "tname")] $
-      "htype" <<~ adaptTypeToHaskellAndEncode @@ var "namespaces" @@ var "typ'" @@ var "cx" @@ var "g" $ lets [
-      "hfield">: record H._FieldWithComments [
-        H._FieldWithComments_field>>: record H._Field [
-          H._Field_name>>: var "hname0",
-          H._Field_type>>: var "htype"],
-        H._FieldWithComments_comments>>: nothing],
-      "constructorName">: HaskellUtils.simpleName @@ (Names.localNameOf @@ var "tname")] $
-      right $ record H._ConstructorWithComments [
-        H._ConstructorWithComments_body>>: inject H._Constructor H._Constructor_record $ record H._RecordConstructor [
-          H._RecordConstructor_name>>: var "constructorName",
-          H._RecordConstructor_fields>>: list [var "hfield"]],
-        H._ConstructorWithComments_comments>>: nothing],
-    "recordCons">: "lname'" ~> "fields" ~> lets [
-      "toField">: "fieldType" ~> lets [
-        "fname">: Core.fieldTypeName $ var "fieldType",
-        "ftype">: Core.fieldTypeType $ var "fieldType",
-        "hname'">: HaskellUtils.simpleName @@ Strings.cat2
-          (Formatting.decapitalize @@ var "lname'")
-          (Formatting.capitalize @@ (Core.unName $ var "fname"))] $
-        "htype" <<~ adaptTypeToHaskellAndEncode @@ var "namespaces" @@ var "ftype" @@ var "cx" @@ var "g" $
-        "comments" <<~ Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "ftype" $
-        right $ record H._FieldWithComments [
-          H._FieldWithComments_field>>: record H._Field [
-            H._Field_name>>: var "hname'",
-            H._Field_type>>: var "htype"],
-          H._FieldWithComments_comments>>: var "comments"]] $
-      "hFields" <<~ Eithers.mapList (var "toField") (var "fields") $
-      right $ record H._ConstructorWithComments [
-        H._ConstructorWithComments_body>>: inject H._Constructor H._Constructor_record $ record H._RecordConstructor [
-          H._RecordConstructor_name>>: HaskellUtils.simpleName @@ var "lname'",
-          H._RecordConstructor_fields>>: var "hFields"],
-        H._ConstructorWithComments_comments>>: nothing],
-    "unionCons">: "boundNames'" ~> "lname'" ~> "fieldType" ~> lets [
-      "fname">: Core.fieldTypeName $ var "fieldType",
-      "ftype">: Core.fieldTypeType $ var "fieldType",
-      "deconflict">: "name" ~> lets [
-        "tname">: Names.unqualifyName @@ record _QualifiedName [
-          _QualifiedName_namespace>>: just $ Pairs.first $ Packaging.namespacesFocus $ var "namespaces",
-          _QualifiedName_local>>: var "name"]] $
-        Logic.ifElse (Sets.member (var "tname") (var "boundNames'"))
-          (var "deconflict" @@ Strings.cat2 (var "name") (string "_"))
-          (var "name")] $
-      "comments" <<~ Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "ftype" $ lets [
-      "nm">: var "deconflict" @@ Strings.cat2 (Formatting.capitalize @@ var "lname'") (Formatting.capitalize @@ (Core.unName $ var "fname"))] $
-      "typeList" <<~ (Logic.ifElse (Equality.equal (Strip.deannotateType @@ var "ftype") MetaTypes.unit)
-        (right $ list ([] :: [TTerm H.CaseRhs])) $
-        "htype" <<~ adaptTypeToHaskellAndEncode @@ var "namespaces" @@ var "ftype" @@ var "cx" @@ var "g" $
-          right $ list [var "htype"]) $
-      right $ record H._ConstructorWithComments [
-        H._ConstructorWithComments_body>>: inject H._Constructor H._Constructor_ordinary $ record H._OrdinaryConstructor [
-          H._OrdinaryConstructor_name>>: HaskellUtils.simpleName @@ var "nm",
-          H._OrdinaryConstructor_fields>>: var "typeList"],
-        H._ConstructorWithComments_comments>>: var "comments"]] $
-      "isSer" <<~ Predicates.isSerializableByName @@ var "cx" @@ var "g" @@ var "elementName" $ lets [
-      "deriv">: wrap H._Deriving $ Logic.ifElse (var "isSer")
-        (Lists.map (HaskellUtils.rawName) (list [string "Eq", string "Ord", string "Read", string "Show"]))
-        (list ([] :: [TTerm H.Name])),
-      "unpackResult">: HaskellUtils.unpackForallType @@ var "typ",
-      "vars">: Pairs.first $ var "unpackResult",
-      "t'">: Pairs.second $ var "unpackResult",
-      "hd">: var "declHead" @@ var "hname" @@ (Lists.reverse $ var "vars")] $
-      "decl" <<~ (cases _Type (Strip.deannotateType @@ var "t'")
-        (Just $ "htype" <<~ (adaptTypeToHaskellAndEncode @@ var "namespaces" @@ var "typ" @@ var "cx" @@ var "g") $
-          right $ inject H._Declaration H._Declaration_type $ record H._TypeDeclaration [
-            H._TypeDeclaration_name>>: var "hd",
-            H._TypeDeclaration_type>>: var "htype"]) [
-        _Type_record>>: "rt" ~>
-          "cons" <<~ (var "recordCons" @@ var "lname" @@ var "rt") $
-          right $ inject H._Declaration H._Declaration_data $ record H._DataDeclaration [
-            H._DataDeclaration_keyword>>: injectUnit H._DataOrNewtype H._DataOrNewtype_data,
-            H._DataDeclaration_context>>: list ([] :: [TTerm H.Assertion]),
-            H._DataDeclaration_head>>: var "hd",
-            H._DataDeclaration_constructors>>: list [var "cons"],
-            H._DataDeclaration_deriving>>: list [var "deriv"]],
-        _Type_union>>: "rt" ~>
-          "cons" <<~ Eithers.mapList (var "unionCons" @@ (Sets.fromList (Maps.keys (Graph.graphBoundTerms $ var "g"))) @@ var "lname") (var "rt") $
-          right $ inject H._Declaration H._Declaration_data $ record H._DataDeclaration [
-            H._DataDeclaration_keyword>>: injectUnit H._DataOrNewtype H._DataOrNewtype_data,
-            H._DataDeclaration_context>>: list ([] :: [TTerm H.Assertion]),
-            H._DataDeclaration_head>>: var "hd",
-            H._DataDeclaration_constructors>>: var "cons",
-            H._DataDeclaration_deriving>>: list [var "deriv"]],
-        _Type_wrap>>: "wrapped" ~>
-          "cons" <<~ var "newtypeCons" @@ var "elementName" @@ var "wrapped" $
-            right $ inject H._Declaration H._Declaration_data $ record H._DataDeclaration [
-              H._DataDeclaration_keyword>>: injectUnit H._DataOrNewtype H._DataOrNewtype_newtype,
-              H._DataDeclaration_context>>: list ([] :: [TTerm H.Assertion]),
-              H._DataDeclaration_head>>: var "hd",
-              H._DataDeclaration_constructors>>: list [var "cons"],
-              H._DataDeclaration_deriving>>: list [var "deriv"]]]) $
-      "comments" <<~ Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "typ" $
-      "tdecls" <<~ (Logic.ifElse (includeTypeDefinitions)
-        ("decl'" <<~ typeDecl @@ var "namespaces" @@ var "elementName" @@ var "typ" @@ var "cx" @@ var "g" $
-          right $ list [var "decl'"])
-        (right $ list ([] :: [TTerm H.DeclarationWithComments]))) $ lets [
-      "mainDecl">: record H._DeclarationWithComments [
-        H._DeclarationWithComments_body>>: var "decl",
-        H._DeclarationWithComments_comments>>: var "comments"],
-      "nameDecls'">: nameDecls @@ var "namespaces" @@ var "elementName" @@ var "typ"] $
-      right $ Lists.concat $ list [list [var "mainDecl"], var "nameDecls'", var "tdecls"]
-
-typeDecl :: TTermDefinition (HaskellNamespaces -> Name -> Type -> Context -> Graph -> Either Error H.DeclarationWithComments)
-typeDecl = haskellCoderDefinition "typeDecl" $
-  doc "Generate a Haskell declaration for a type definition constant" $
-  "namespaces" ~> "name" ~> "typ" ~> "cx" ~> "g" ~> lets [
-    "typeName">: "ns" ~> "name'" ~>
-      Names.qname @@ var "ns" @@ (var "typeNameLocal" @@ var "name'"),
-    "typeNameLocal">: "name'" ~>
-      Strings.cat $ list [string "_", Names.localNameOf @@ var "name'", string "_type_"],
-    "rawTerm">: encoderFor _Type @@ var "typ",
-    "rewrite">: "recurse" ~> "term" ~> lets [
-      "variantResult">: cases _Term (Strip.deannotateTerm @@ var "term")
-        (Just nothing) [
-        _Term_inject>>: "inj" ~> Logic.ifElse (Equality.equal (Core.injectionTypeName $ var "inj") (Core.nameLift _Type))
-          (just $ Core.injectionField $ var "inj")
-          nothing],
-      "decodeString">: "term" ~> (cases _Term (Strip.deannotateTerm @@ var "term")
-        (Just nothing) [
-        _Term_literal>>: "lit" ~> cases _Literal (var "lit")
-          (Just nothing) [
-          _Literal_string>>: "s" ~> just (var "s")]]),
-      "decodeName">: "term" ~> (cases _Term (Strip.deannotateTerm @@ var "term")
-        (Just nothing) [
-        _Term_wrap>>: "wt" ~> Logic.ifElse (Equality.equal (Core.wrappedTermTypeName $ var "wt") (Core.nameLift _Name))
-          (Maybes.map (unaryFunction Core.name) $ var "decodeString" @@ (Core.wrappedTermBody $ var "wt"))
-          nothing]),
-      "forType">: "field" ~> lets [
-        "fname">: Core.fieldName $ var "field",
-        "fterm">: Core.fieldTerm $ var "field"] $
-        Logic.ifElse (Equality.equal (var "fname") $ Core.nameLift _Type_record)
-          nothing
-          (Logic.ifElse (Equality.equal (var "fname") $ Core.nameLift _Type_variable)
-            (Maybes.bind (var "decodeName" @@ var "fterm") (var "forVariableType"))
-            nothing),
-      "forVariableType">: "vname" ~> lets [
-        "qname">: Names.qualifyName @@ var "vname",
-        "mns">: Packaging.qualifiedNameNamespace $ var "qname",
-        "local">: Packaging.qualifiedNameLocal $ var "qname"] $
-        Maybes.map ("ns" ~> Core.termVariable $ Names.qname @@ var "ns" @@ (Strings.cat $ list [string "_", var "local", string "_type_"])) (var "mns")] $
-      Maybes.fromMaybe (var "recurse" @@ var "term") (Maybes.bind (var "variantResult") (var "forType")),
-    "finalTerm">: Rewriting.rewriteTerm @@ var "rewrite" @@ var "rawTerm"] $
-    "expr" <<~ encodeTerm @@ int32 0 @@ var "namespaces" @@ var "finalTerm" @@ var "cx" @@ var "g" $ lets [
-    "rhs">: wrap H._RightHandSide $ var "expr",
-    "hname">: HaskellUtils.simpleName @@ (var "typeNameLocal" @@ var "name"),
-    "pat">: HaskellUtils.applicationPattern @@ var "hname" @@ list ([] :: [TTerm H.Pattern]),
-    "decl">: inject H._Declaration H._Declaration_valueBinding $ inject H._ValueBinding H._ValueBinding_simple $ record H._SimpleValueBinding [
-      H._SimpleValueBinding_pattern>>: var "pat",
-      H._SimpleValueBinding_rhs>>: var "rhs",
-      H._SimpleValueBinding_localBindings>>: nothing]] $
-    right $ record H._DeclarationWithComments [
-      H._DeclarationWithComments_body>>: var "decl",
-      H._DeclarationWithComments_comments>>: nothing]
-
--- | Convert TypeScheme constraints to the Map format used by encodeTypeWithClassAssertions.
--- TypeScheme constraints are Maybe (Map Name TypeVariableMetadata), where TypeVariableMetadata
--- has a 'classes' field of type Set Name. We convert this to Map Name (Set TypeClass).
-typeSchemeConstraintsToClassMap :: TTermDefinition (Maybe (M.Map Name TypeVariableMetadata) -> M.Map Name (S.Set TypeClass))
-typeSchemeConstraintsToClassMap = haskellCoderDefinition "typeSchemeConstraintsToClassMap" $
-  doc "Convert type scheme constraints to a map of type variables to typeclasses" $
-  "maybeConstraints" ~> lets [
-    -- Convert a class name to a TypeClass, returning Nothing for unknown classes
-    "nameToTypeClass">: "className" ~> lets [
-      "classNameStr">: Core.unName $ var "className",
-      "isEq">: Equality.equal (var "classNameStr") (Core.unName $ Core.nameLift _TypeClass_equality),
-      "isOrd">: Equality.equal (var "classNameStr") (Core.unName $ Core.nameLift _TypeClass_ordering)] $
-      Logic.ifElse (var "isEq")
-        (just $ inject _TypeClass _TypeClass_equality unit)
-        (Logic.ifElse (var "isOrd")
-          (just $ inject _TypeClass _TypeClass_ordering unit)
-          nothing)] $
-    Maybes.maybe
-      Maps.empty
-      ("constraints" ~>
-        Maps.map
-          ("meta" ~> Sets.fromList $
-            Maybes.cat $ Lists.map (var "nameToTypeClass") $ Sets.toList $ Core.typeVariableMetadataClasses (var "meta"))
-          (var "constraints"))
-      (var "maybeConstraints")
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Environment.hs b/src/main/haskell/Hydra/Sources/Haskell/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Environment.hs
+++ /dev/null
@@ -1,47 +0,0 @@
--- | Environment types for Haskell code generation.
--- These types support the Haskell coder and are used to track code generation state.
-
-module Hydra.Sources.Haskell.Environment where
-
--- Standard type-level imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.environment"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Environment types for Haskell code generation"}
-  where
-    definitions = [
-      haskellModuleMetadata]
-
--- | Metadata for Haskell module generation.
-haskellModuleMetadata :: Binding
-haskellModuleMetadata = define "HaskellModuleMetadata" $
-  doc "Metadata used to determine which standard imports are needed in a generated Haskell module" $
-  T.record [
-    "usesByteString">:
-      doc "Whether the module uses Data.ByteString (B.ByteString)" $
-      T.boolean,
-    "usesInt">:
-      doc "Whether the module uses Data.Int (I.Int8, I.Int16, I.Int64)" $
-      T.boolean,
-    "usesMap">:
-      doc "Whether the module uses Data.Map (M.Map, M.fromList, M.empty)" $
-      T.boolean,
-    "usesSet">:
-      doc "Whether the module uses Data.Set (S.Set, S.fromList, S.empty)" $
-      T.boolean]
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Language.hs b/src/main/haskell/Hydra/Sources/Haskell/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Language.hs
+++ /dev/null
@@ -1,190 +0,0 @@
-module Hydra.Sources.Haskell.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-haskellLanguageDefinition :: String -> TTerm a -> TTermDefinition a
-haskellLanguageDefinition = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.language"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = [toDefinition haskellLanguage, toDefinition reservedWords],
-            moduleTermDependencies = [],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Haskell"}
-haskellLanguage :: TTermDefinition Language
-haskellLanguage = haskellLanguageDefinition "haskellLanguage" $
-  doc "Language constraints for Haskell" $ lets [
-  "eliminationVariants">: Sets.fromList $ list [
-    Variants.eliminationVariantRecord,
-    Variants.eliminationVariantUnion,
-    Variants.eliminationVariantWrap],
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary,
-    Variants.literalVariantBoolean,
-    Variants.literalVariantDecimal,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat32, -- Float
-    Core.floatTypeFloat64], -- Double
-  "functionVariants">: Sets.fromList $ list [
-    Variants.functionVariantElimination,
-    Variants.functionVariantLambda],
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeBigint, -- Integer
-    Core.integerTypeInt8, -- Int8
-    Core.integerTypeInt16, -- Int16
-    Core.integerTypeInt32, -- Int
-    Core.integerTypeInt64], -- Int64
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantAnnotated,
-    Variants.termVariantApplication,
-    Variants.termVariantCases,
-    Variants.termVariantEither,
-    Variants.termVariantLambda,
-    Variants.termVariantLet,
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantPair,
-    Variants.termVariantProject,
-    Variants.termVariantRecord,
-    Variants.termVariantSet,
-    Variants.termVariantTypeApplication,
-    Variants.termVariantTypeLambda,
-    Variants.termVariantInject,
-    Variants.termVariantUnit,
-    Variants.termVariantUnwrap,
-    Variants.termVariantVariable,
-    Variants.termVariantWrap],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantApplication,
-    Variants.typeVariantEither,
-    Variants.typeVariantFunction,
-    Variants.typeVariantForall,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantPair,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion,
-    Variants.typeVariantUnit,
-    Variants.typeVariantVariable,
-    Variants.typeVariantVoid,
-    Variants.typeVariantWrap],
-  "typePredicate">: constant true] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.haskell")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-reservedWords :: TTermDefinition (S.Set String)
-reservedWords = haskellLanguageDefinition "reservedWords" $
-  doc ("Created on 2025-02-28 using GHCi 9.6.6\n\n"
-    <> "You can reproduce these lists of symbols by issuing the command `:browse Prelude` in GHCi, pasting the results into\n"
-    <> "/tmp/browse_Prelude.txt, and then running the Bash command provided with each list.\n\n"
-    <> "See also https://www.haskell.org/onlinereport/standard-prelude.html") $
-  lets [
-    "keywordSymbols">:
-      doc "Haskell's strictly reserved keywords; they cannot be used as identifiers." $
-      list $ string <$> [
-        "case", "class", "data", "default", "deriving", "do", "else", "forall", "foreign", "if", "import", "in",
-        "infix", "infixl", "infixr", "instance", "let", "module", "newtype", "of", "then", "type", "where"],
-    "reservedSymbols">:
-      doc "Hydra uses these symbols in generated code, so we reserve them to avoid conflicts." $
-      list $ string <$> [
-        "Bool", "Double", "False", "Float", "Int", "Integer", "Just", "Maybe", "Nothing", "Ord", "Show", "String", "True"]]
-    $ Sets.fromList $ Lists.concat2 (var "keywordSymbols") (var "reservedSymbols")
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Manifest.hs b/src/main/haskell/Hydra/Sources/Haskell/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Manifest.hs
+++ /dev/null
@@ -1,34 +0,0 @@
--- | Package manifest for hydra-haskell.
---
--- Owns the Haskell coder DSL sources. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
-
-module Hydra.Sources.Haskell.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Haskell.Coder as HaskellCoder
-import qualified Hydra.Sources.Haskell.Environment as HaskellEnvironment
-import qualified Hydra.Sources.Haskell.Language as HaskellLanguage
-import qualified Hydra.Sources.Haskell.Operators as HaskellOperators
-import qualified Hydra.Sources.Haskell.Serde as HaskellSerde
-import qualified Hydra.Sources.Haskell.Syntax as HaskellSyntax
-import qualified Hydra.Sources.Haskell.Testing as HaskellTesting
-import qualified Hydra.Sources.Haskell.Utils as HaskellUtils
-
-mainModules :: [Module]
-mainModules = [
-  HaskellCoder.module_,
-  HaskellEnvironment.module_,
-  HaskellLanguage.module_,
-  HaskellOperators.module_,
-  HaskellSerde.module_,
-  HaskellSyntax.module_,
-  HaskellTesting.module_,
-  HaskellUtils.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Operators.hs b/src/main/haskell/Hydra/Sources/Haskell/Operators.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Operators.hs
+++ /dev/null
@@ -1,307 +0,0 @@
-module Hydra.Sources.Haskell.Operators where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (orOp)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-
-
-haskellOperatorsDefinition :: String -> TTerm a -> TTermDefinition a
-haskellOperatorsDefinition = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.operators"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "AST operators for Haskell"}
-  where
-    definitions = [
-      toDefinition andOp,
-      toDefinition apOp,
-      toDefinition appOp,
-      toDefinition applyOp,
-      toDefinition arrowOp,
-      toDefinition assertOp,
-      toDefinition bindOp,
-      toDefinition caseOp,
-      toDefinition composeOp,
-      toDefinition concatOp,
-      toDefinition consOp,
-      toDefinition defineOp,
-      toDefinition diamondOp,
-      toDefinition divOp,
-      toDefinition divideOp,
-      toDefinition elemOp,
-      toDefinition equalOp,
-      toDefinition fmapOp,
-      toDefinition gtOp,
-      toDefinition gteOp,
-      toDefinition indexOp,
-      toDefinition lambdaOp,
-      toDefinition ltOp,
-      toDefinition lteOp,
-      toDefinition minusOp,
-      toDefinition modOp,
-      toDefinition multOp,
-      toDefinition neqOp,
-      toDefinition notElemOp,
-      toDefinition orOp,
-      toDefinition plusOp,
-      toDefinition quotOp,
-      toDefinition remOp,
-      toDefinition typeOp]
-
-andOp :: TTermDefinition Op
-andOp = haskellOperatorsDefinition "andOp" $
-  doc "Logical AND operator (&&)" $
-  Serialization.op @@ string "&&" @@ int32 3 @@ Ast.associativityRight
-
-apOp :: TTermDefinition Op
-apOp = haskellOperatorsDefinition "apOp" $
-  doc "Applicative apply operator (<*>)" $
-  Serialization.op @@ string "<*>" @@ int32 4 @@ Ast.associativityLeft
-
-appOp :: TTermDefinition Op
-appOp = haskellOperatorsDefinition "appOp" $
-  doc "Function application operator (whitespace)" $
-  Ast.op
-    (Ast.symbol $ string "")
-    (Ast.padding Ast.wsNone Ast.wsSpace)
-    (Ast.precedence $ int32 0)
-    Ast.associativityLeft
-
-applyOp :: TTermDefinition Op
-applyOp = haskellOperatorsDefinition "applyOp" $
-  doc "Low-precedence function application ($)" $
-  Serialization.op @@ string "$" @@ int32 0 @@ Ast.associativityRight
-
-arrowOp :: TTermDefinition Op
-arrowOp = haskellOperatorsDefinition "arrowOp" $
-  doc "Function type arrow (->)" $
-  Serialization.op @@ string "->" @@ (Math.negate $ int32 1) @@ Ast.associativityRight
-
-assertOp :: TTermDefinition Op
-assertOp = haskellOperatorsDefinition "assertOp" $
-  doc "Type class constraint arrow (=>)" $
-  Serialization.op @@ string "=>" @@ int32 0 @@ Ast.associativityNone
-
-bindOp :: TTermDefinition Op
-bindOp = haskellOperatorsDefinition "bindOp" $
-  doc "Monadic bind operator (>>=)" $
-  Serialization.op @@ string ">>=" @@ int32 1 @@ Ast.associativityLeft
-
-caseOp :: TTermDefinition Op
-caseOp = haskellOperatorsDefinition "caseOp" $
-  doc "Case alternative arrow (->)" $
-  Serialization.op @@ string "->" @@ int32 0 @@ Ast.associativityNone
-
-composeOp :: TTermDefinition Op
-composeOp = haskellOperatorsDefinition "composeOp" $
-  doc "Function composition (.)" $
-  Serialization.op @@ string "." @@ int32 9 @@ Ast.associativityLeft
-
-concatOp :: TTermDefinition Op
-concatOp = haskellOperatorsDefinition "concatOp" $
-  doc "List concatenation (++)" $
-  Serialization.op @@ string "++" @@ int32 5 @@ Ast.associativityRight
-
-consOp :: TTermDefinition Op
-consOp = haskellOperatorsDefinition "consOp" $
-  doc "List cons (:)" $
-  Serialization.op @@ string ":" @@ int32 5 @@ Ast.associativityRight
-
-defineOp :: TTermDefinition Op
-defineOp = haskellOperatorsDefinition "defineOp" $
-  doc "Definition operator (=)" $
-  Serialization.op @@ string "=" @@ int32 0 @@ Ast.associativityNone
-
-diamondOp :: TTermDefinition Op
-diamondOp = haskellOperatorsDefinition "diamondOp" $
-  doc "Semigroup append (<>)" $
-  Serialization.op @@ string "<>" @@ int32 6 @@ Ast.associativityRight
-
-divOp :: TTermDefinition Op
-divOp = haskellOperatorsDefinition "divOp" $
-  doc "Integer division (`div`)" $
-  Serialization.op @@ string "`div`" @@ int32 7 @@ Ast.associativityLeft
-
-divideOp :: TTermDefinition Op
-divideOp = haskellOperatorsDefinition "divideOp" $
-  doc "Fractional division (/)" $
-  Serialization.op @@ string "/" @@ int32 7 @@ Ast.associativityLeft
-
-elemOp :: TTermDefinition Op
-elemOp = haskellOperatorsDefinition "elemOp" $
-  doc "List membership (`elem`)" $
-  Serialization.op @@ string "`elem`" @@ int32 4 @@ Ast.associativityNone
-
-equalOp :: TTermDefinition Op
-equalOp = haskellOperatorsDefinition "equalOp" $
-  doc "Equality comparison (==)" $
-  Serialization.op @@ string "==" @@ int32 4 @@ Ast.associativityNone
-
-fmapOp :: TTermDefinition Op
-fmapOp = haskellOperatorsDefinition "fmapOp" $
-  doc "Functor map (<$>)" $
-  Serialization.op @@ string "<$>" @@ int32 4 @@ Ast.associativityLeft
-
-gtOp :: TTermDefinition Op
-gtOp = haskellOperatorsDefinition "gtOp" $
-  doc "Greater than (>)" $
-  Serialization.op @@ string ">" @@ int32 4 @@ Ast.associativityNone
-
-gteOp :: TTermDefinition Op
-gteOp = haskellOperatorsDefinition "gteOp" $
-  doc "Greater than or equal (>=)" $
-  Serialization.op @@ string ">=" @@ int32 4 @@ Ast.associativityNone
-
-indexOp :: TTermDefinition Op
-indexOp = haskellOperatorsDefinition "indexOp" $
-  doc "List indexing (!!)" $
-  Serialization.op @@ string "!!" @@ int32 9 @@ Ast.associativityLeft
-
-lambdaOp :: TTermDefinition Op
-lambdaOp = haskellOperatorsDefinition "lambdaOp" $
-  doc "Lambda body arrow (->)" $
-  Serialization.op @@ string "->" @@ (Math.negate $ int32 1) @@ Ast.associativityRight
-
-ltOp :: TTermDefinition Op
-ltOp = haskellOperatorsDefinition "ltOp" $
-  doc "Less than (<)" $
-  Serialization.op @@ string "<" @@ int32 4 @@ Ast.associativityNone
-
-lteOp :: TTermDefinition Op
-lteOp = haskellOperatorsDefinition "lteOp" $
-  doc "Less than or equal (<=)" $
-  Serialization.op @@ string ">=" @@ int32 4 @@ Ast.associativityNone
-
-minusOp :: TTermDefinition Op
-minusOp = haskellOperatorsDefinition "minusOp" $
-  doc "Subtraction (-). Originally: associativityLeft" $
-  Serialization.op @@ string "-" @@ int32 6 @@ Ast.associativityBoth
-
-modOp :: TTermDefinition Op
-modOp = haskellOperatorsDefinition "modOp" $
-  doc "Modulo (`mod`)" $
-  Serialization.op @@ string "`mod`" @@ int32 7 @@ Ast.associativityLeft
-
-multOp :: TTermDefinition Op
-multOp = haskellOperatorsDefinition "multOp" $
-  doc "Multiplication (*). Originally: associativityLeft" $
-  Serialization.op @@ string "*" @@ int32 7 @@ Ast.associativityBoth
-
-neqOp :: TTermDefinition Op
-neqOp = haskellOperatorsDefinition "neqOp" $
-  doc "Not equal (/=)" $
-  Serialization.op @@ string "/=" @@ int32 4 @@ Ast.associativityNone
-
-notElemOp :: TTermDefinition Op
-notElemOp = haskellOperatorsDefinition "notElemOp" $
-  doc "List non-membership (`notElem`)" $
-  Serialization.op @@ string "`notElem`" @@ int32 4 @@ Ast.associativityNone
-
-orOp :: TTermDefinition Op
-orOp = haskellOperatorsDefinition "orOp" $
-  doc "Logical OR (||)" $
-  Serialization.op @@ string "||" @@ int32 2 @@ Ast.associativityRight
-
-plusOp :: TTermDefinition Op
-plusOp = haskellOperatorsDefinition "plusOp" $
-  doc "Addition (+). Originally: associativityLeft" $
-  Serialization.op @@ string "+" @@ int32 6 @@ Ast.associativityBoth
-
-quotOp :: TTermDefinition Op
-quotOp = haskellOperatorsDefinition "quotOp" $
-  doc "Integer quotient (`quot`)" $
-  Serialization.op @@ string "`quot`" @@ int32 7 @@ Ast.associativityLeft
-
-remOp :: TTermDefinition Op
-remOp = haskellOperatorsDefinition "remOp" $
-  doc "Integer remainder (`rem`)" $
-  Serialization.op @@ string "`rem`" @@ int32 7 @@ Ast.associativityLeft
-
-typeOp :: TTermDefinition Op
-typeOp = haskellOperatorsDefinition "typeOp" $
-  doc "Type annotation (::)" $
-  Serialization.op @@ string "::" @@ int32 0 @@ Ast.associativityNone
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Serde.hs b/src/main/haskell/Hydra/Sources/Haskell/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Serde.hs
+++ /dev/null
@@ -1,666 +0,0 @@
-
-module Hydra.Sources.Haskell.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Haskell.Syntax as H
-import qualified Hydra.Sources.Haskell.Syntax as HaskellSyntax
-import qualified Hydra.Sources.Haskell.Operators as HaskellOperators
-
-
-haskellSerdeDefinition :: String -> TTerm a -> TTermDefinition a
-haskellSerdeDefinition = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Serialization.ns, HaskellOperators.ns],
-            moduleTypeDependencies = (HaskellSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just ("Haskell operator precendence and associativity are drawn from:\n"
-      <> "https://self-learning-java-tutorial.blogspot.com/2016/04/haskell-operator-precedence.html\n"
-      <> "Other operators were investigated using GHCi, e.g. \":info (->)\"\n"
-      <> "Operator names are drawn (loosely) from:\n"
-      <> "https://stackoverflow.com/questions/7746894/are-there-pronounceable-names-for-common-haskell-operators")}
-  where
-    definitions = [
-      toDefinition alternativeToExpr,
-      toDefinition applicationExpressionToExpr,
-      toDefinition applicationPatternToExpr,
-      toDefinition assertionToExpr,
-      toDefinition caseExpressionToExpr,
-      toDefinition caseRhsToExpr,
-      toDefinition classAssertionToExpr,
-      toDefinition constructRecordExpressionToExpr,
-      toDefinition constructorToExpr,
-      toDefinition constructorWithCommentsToExpr,
-      toDefinition dataOrNewtypeToExpr,
-      toDefinition declarationHeadToExpr,
-      toDefinition declarationToExpr,
-      toDefinition declarationWithCommentsToExpr,
-      toDefinition expressionToExpr,
-      toDefinition fieldToExpr,
-      toDefinition fieldWithCommentsToExpr,
-      toDefinition ifExpressionToExpr,
-      toDefinition importExportSpecToExpr,
-      toDefinition importToExpr,
-      toDefinition lambdaExpressionToExpr,
-      toDefinition literalToExpr,
-      toDefinition localBindingToExpr,
-      toDefinition moduleHeadToExpr,
-      toDefinition moduleToExpr,
-      toDefinition nameToExpr,
-      toDefinition patternToExpr,
-      toDefinition rightHandSideToExpr,
-      toDefinition statementToExpr,
-      toDefinition toHaskellComments,
-      toDefinition toSimpleComments,
-      toDefinition typeSignatureToExpr,
-      toDefinition typeToExpr,
-      toDefinition valueBindingToExpr,
-      toDefinition variableToExpr,
-      toDefinition writeQualifiedName]
-
-alternativeToExpr :: TTermDefinition (H.Alternative -> Expr)
-alternativeToExpr = haskellSerdeDefinition "alternativeToExpr" $
-  doc "Convert a pattern-matching alternative to an AST expression" $
-  lambda "alt" $
-    -- Use structuralSpaceSep to avoid triggering parenthesize on the RHS
-    Serialization.structuralSpaceSep @@ list [
-      patternToExpr @@ (project H._Alternative H._Alternative_pattern @@ var "alt"),
-      Serialization.cst @@ string "->",
-      caseRhsToExpr @@ (project H._Alternative H._Alternative_rhs @@ var "alt")]
-
-applicationExpressionToExpr :: TTermDefinition (H.ApplicationExpression -> Expr)
-applicationExpressionToExpr = haskellSerdeDefinition "applicationExpressionToExpr" $
-  doc "Convert a function application expression to an AST expression" $
-  lambda "app" $
-    Serialization.ifx @@ HaskellOperators.appOp @@
-      (expressionToExpr @@ (project H._ApplicationExpression H._ApplicationExpression_function @@ var "app")) @@
-      (expressionToExpr @@ (project H._ApplicationExpression H._ApplicationExpression_argument @@ var "app"))
-
-applicationPatternToExpr :: TTermDefinition (H.ApplicationPattern -> Expr)
-applicationPatternToExpr = haskellSerdeDefinition "applicationPatternToExpr" $
-  doc "Convert an application pattern to an AST expression" $
-  lambda "appPat" $ lets [
-            "name">: project H._ApplicationPattern H._ApplicationPattern_name @@ var "appPat",
-    "pats">: project H._ApplicationPattern H._ApplicationPattern_args @@ var "appPat"] $
-    Serialization.spaceSep @@ (Lists.cons (nameToExpr @@ var "name") (Lists.map (patternToExpr) (var "pats")))
-
-assertionToExpr :: TTermDefinition (H.Assertion -> Expr)
-assertionToExpr = haskellSerdeDefinition "assertionToExpr" $
-  doc "Convert a type class assertion to an AST expression" $
-  lambda "sert" $
-    cases H._Assertion (var "sert") Nothing [
-      H._Assertion_class>>: lambda "cls" $ classAssertionToExpr @@ var "cls",
-      H._Assertion_tuple>>: lambda "serts" $
-        Serialization.parenList @@ false @@ (Lists.map (assertionToExpr) (var "serts"))]
-
-caseExpressionToExpr :: TTermDefinition (H.CaseExpression -> Expr)
-caseExpressionToExpr = haskellSerdeDefinition "caseExpressionToExpr" $
-  doc "Convert a case expression to an AST expression" $
-  lambda "caseExpr" $ lets [
-    "cs">: project H._CaseExpression H._CaseExpression_case @@ var "caseExpr",
-    "alts">: project H._CaseExpression H._CaseExpression_alternatives @@ var "caseExpr",
-    "ofOp">: Ast.op
-      (Ast.symbol $ string "of")
-      (Ast.padding Ast.wsSpace (Ast.wsBreakAndIndent $ string "  "))
-      (Ast.precedence $ int32 0)
-      Ast.associativityNone,
-    "lhs">: Serialization.spaceSep @@ list [Serialization.cst @@ (string "case"), expressionToExpr @@ var "cs"],
-    "rhs">: Serialization.newlineSep @@ (Lists.map (alternativeToExpr) (var "alts"))] $
-    Serialization.ifx @@ var "ofOp" @@ var "lhs" @@ var "rhs"
-
-caseRhsToExpr :: TTermDefinition (H.CaseRhs -> Expr)
-caseRhsToExpr = haskellSerdeDefinition "caseRhsToExpr" $
-  doc "Convert a case right-hand side to an AST expression" $
-  lambda "rhs" $ expressionToExpr @@ (unwrap H._CaseRhs @@ var "rhs")
-
-classAssertionToExpr :: TTermDefinition (H.ClassAssertion -> Expr)
-classAssertionToExpr = haskellSerdeDefinition "classAssertionToExpr" $
-  doc "Convert a class assertion to an AST expression" $
-  lambda "clsAsrt" $ lets [
-    "name">: project H._ClassAssertion H._ClassAssertion_name @@ var "clsAsrt",
-    "types">: project H._ClassAssertion H._ClassAssertion_types @@ var "clsAsrt"] $
-    Serialization.spaceSep @@ (Lists.cons (nameToExpr @@ var "name") (list [
-      Serialization.commaSep @@ Serialization.halfBlockStyle @@ (Lists.map (typeToExpr) (var "types"))]))
-
-constructRecordExpressionToExpr :: TTermDefinition (H.ConstructRecordExpression -> Expr)
-constructRecordExpressionToExpr = haskellSerdeDefinition "constructRecordExpressionToExpr" $
-  doc "Convert a record construction expression to an AST expression" $
-  lambda "constructRecord" $ lets [
-    "name">: project H._ConstructRecordExpression H._ConstructRecordExpression_name @@ var "constructRecord",
-    "updates">: project H._ConstructRecordExpression H._ConstructRecordExpression_fields @@ var "constructRecord",
-    "fromUpdate">: lambda "update" $ lets [
-      "fn">: project H._FieldUpdate H._FieldUpdate_name @@ var "update",
-      "val">: project H._FieldUpdate H._FieldUpdate_value @@ var "update"] $
-      Serialization.ifx @@ HaskellOperators.defineOp @@ (nameToExpr @@ var "fn") @@ (expressionToExpr @@ var "val"),
-    "body">: Serialization.commaSep @@ Serialization.halfBlockStyle @@ (Lists.map (var "fromUpdate") (var "updates"))] $
-    Serialization.spaceSep @@ (Lists.cons (nameToExpr @@ var "name") (list [
-      Serialization.brackets @@ Serialization.curlyBraces @@ Serialization.halfBlockStyle @@ var "body"]))
-
-constructorToExpr :: TTermDefinition (H.Constructor -> Expr)
-constructorToExpr = haskellSerdeDefinition "constructorToExpr" $
-  doc "Convert a data constructor to an AST expression" $
-  lambda "cons" $
-    cases H._Constructor (var "cons") Nothing [
-      H._Constructor_ordinary>>: lambda "ord" $ lets [
-        "name">: project H._OrdinaryConstructor H._OrdinaryConstructor_name @@ var "ord",
-        "types">: project H._OrdinaryConstructor H._OrdinaryConstructor_fields @@ var "ord"] $
-        Serialization.spaceSep @@ (Lists.cons (nameToExpr @@ var "name") (list [Serialization.spaceSep @@ (Lists.map (typeToExpr) (var "types"))])),
-      H._Constructor_record>>: lambda "rec" $ lets [
-        "name">: project H._RecordConstructor H._RecordConstructor_name @@ var "rec",
-        "fields">: project H._RecordConstructor H._RecordConstructor_fields @@ var "rec"] $
-        Serialization.spaceSep @@ (Lists.cons (nameToExpr @@ var "name") (list [
-          Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@ (Lists.map (fieldWithCommentsToExpr) (var "fields"))]))]
-
-constructorWithCommentsToExpr :: TTermDefinition (H.ConstructorWithComments -> Expr)
-constructorWithCommentsToExpr = haskellSerdeDefinition "constructorWithCommentsToExpr" $
-  doc "Convert a data constructor with comments to an AST expression" $
-  lambda "consWithComments" $ lets [
-    "body">: project H._ConstructorWithComments H._ConstructorWithComments_body @@ var "consWithComments",
-    "mc">: project H._ConstructorWithComments H._ConstructorWithComments_comments @@ var "consWithComments"] $
-    Maybes.maybe
-      (constructorToExpr @@ var "body")
-      (lambda "c" $ Serialization.newlineSep @@ (Lists.cons (Serialization.cst @@ (toHaskellComments @@ var "c")) (list [
-        constructorToExpr @@ var "body"])))
-      (var "mc")
-
-dataOrNewtypeToExpr :: TTermDefinition (H.DataOrNewtype -> Expr)
-dataOrNewtypeToExpr = haskellSerdeDefinition "dataOrNewtypeToExpr" $
-  doc "Convert a data/newtype keyword to an AST expression" $
-  lambda "kw" $
-    cases H._DataOrNewtype (var "kw") Nothing [
-      H._DataOrNewtype_data>>: constant $ Serialization.cst @@ string "data",
-      H._DataOrNewtype_newtype>>: constant $ Serialization.cst @@ string "newtype"]
-
-declarationHeadToExpr :: TTermDefinition (H.DeclarationHead -> Expr)
-declarationHeadToExpr = haskellSerdeDefinition "declarationHeadToExpr" $
-  doc "Convert a declaration head to an AST expression" $
-  lambda "hd" $
-    cases H._DeclarationHead (var "hd") Nothing [
-      H._DeclarationHead_application>>: lambda "appHead" $ lets [
-        "fun">: project H._ApplicationDeclarationHead H._ApplicationDeclarationHead_function @@ var "appHead",
-        "op">: project H._ApplicationDeclarationHead H._ApplicationDeclarationHead_operand @@ var "appHead"] $
-        Serialization.spaceSep @@ (Lists.cons (declarationHeadToExpr @@ var "fun") (list [variableToExpr @@ var "op"])),
-      H._DeclarationHead_simple>>: lambda "name" $ nameToExpr @@ var "name"]
-
-declarationToExpr :: TTermDefinition (H.Declaration -> Expr)
-declarationToExpr = haskellSerdeDefinition "declarationToExpr" $
-  doc "Convert a declaration to an AST expression" $
-  lambda "decl" $
-    cases H._Declaration (var "decl") Nothing [
-      H._Declaration_data>>: lambda "dataDecl" $ lets [
-        "kw">: project H._DataDeclaration H._DataDeclaration_keyword @@ var "dataDecl",
-        "hd">: project H._DataDeclaration H._DataDeclaration_head @@ var "dataDecl",
-        "cons">: project H._DataDeclaration H._DataDeclaration_constructors @@ var "dataDecl",
-        "deriv">: project H._DataDeclaration H._DataDeclaration_deriving @@ var "dataDecl",
-        "derivCat">: Lists.concat $ Lists.map (unwrap H._Deriving) (var "deriv"),
-        "constructors">: Serialization.orSep @@ Serialization.halfBlockStyle @@ (Lists.map (constructorWithCommentsToExpr) (var "cons")),
-        "derivingClause">: Logic.ifElse (Lists.null $ var "derivCat")
-          (list ([] :: [TTerm Expr]))
-          (list [Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "deriving")) (list [
-            Serialization.parenList @@ false @@ (Lists.map (nameToExpr) (var "derivCat"))]))]),
-        "mainParts">: list [
-          Serialization.spaceSep @@ (Lists.cons (dataOrNewtypeToExpr @@ var "kw") (Lists.cons (declarationHeadToExpr @@ var "hd") (list [Serialization.cst @@ (string "=")]))),
-          var "constructors"]] $
-        Serialization.indentBlock @@ Lists.concat2 (var "mainParts") (var "derivingClause"),
-      H._Declaration_type>>: lambda "typeDecl" $ lets [
-        "hd">: project H._TypeDeclaration H._TypeDeclaration_name @@ var "typeDecl",
-        "typ">: project H._TypeDeclaration H._TypeDeclaration_type @@ var "typeDecl"] $
-        Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "type")) (Lists.cons (declarationHeadToExpr @@ var "hd") (Lists.cons (Serialization.cst @@ (string "=")) (list [
-          typeToExpr @@ var "typ"])))),
-      H._Declaration_valueBinding>>: lambda "vb" $ valueBindingToExpr @@ var "vb",
-      H._Declaration_typedBinding>>: lambda "typedBinding" $ lets [
-        "typeSig">: project H._TypedBinding H._TypedBinding_typeSignature @@ var "typedBinding",
-        "vb">: project H._TypedBinding H._TypedBinding_valueBinding @@ var "typedBinding",
-        "name">: project H._TypeSignature H._TypeSignature_name @@ var "typeSig",
-        "htype">: project H._TypeSignature H._TypeSignature_type @@ var "typeSig"] $
-        Serialization.newlineSep @@ (Lists.cons (Serialization.structuralSpaceSep @@ list [nameToExpr @@ var "name", Serialization.cst @@ string "::", typeToExpr @@ var "htype"]) (list [
-          valueBindingToExpr @@ var "vb"]))]
-
-declarationWithCommentsToExpr :: TTermDefinition (H.DeclarationWithComments -> Expr)
-declarationWithCommentsToExpr = haskellSerdeDefinition "declarationWithCommentsToExpr" $
-  doc "Convert a declaration with comments to an AST expression" $
-  lambda "declWithComments" $ lets [
-    "body">: project H._DeclarationWithComments H._DeclarationWithComments_body @@ var "declWithComments",
-    "mc">: project H._DeclarationWithComments H._DeclarationWithComments_comments @@ var "declWithComments"] $
-    Maybes.maybe
-      (declarationToExpr @@ var "body")
-      (lambda "c" $ Serialization.newlineSep @@ (Lists.cons (Serialization.cst @@ (toHaskellComments @@ var "c")) (list [
-        declarationToExpr @@ var "body"])))
-      (var "mc")
-
-expressionToExpr :: TTermDefinition (H.Expression -> Expr)
-expressionToExpr = haskellSerdeDefinition "expressionToExpr" $
-  doc "Convert a Haskell expression to an AST expression" $
-  lambda "expr" $
-    cases H._Expression (var "expr") Nothing [
-      H._Expression_application>>: lambda "app" $ applicationExpressionToExpr @@ var "app",
-      H._Expression_case>>: lambda "cases" $ caseExpressionToExpr @@ var "cases",
-      H._Expression_constructRecord>>: lambda "r" $ constructRecordExpressionToExpr @@ var "r",
-      H._Expression_do>>: lambda "statements" $
-        Serialization.indentBlock @@ Lists.cons (Serialization.cst @@ (string "do")) (Lists.map (statementToExpr) (var "statements")),
-      H._Expression_if>>: lambda "ifte" $ ifExpressionToExpr @@ var "ifte",
-      H._Expression_literal>>: lambda "lit" $ literalToExpr @@ var "lit",
-      H._Expression_lambda>>: lambda "lam" $ Serialization.parenthesize @@ (lambdaExpressionToExpr @@ var "lam"),
-      H._Expression_let>>: lambda "letExpr" $ lets [
-        "bindings">: project H._LetExpression H._LetExpression_bindings @@ var "letExpr",
-        "inner">: project H._LetExpression H._LetExpression_inner @@ var "letExpr",
-        "encodeBinding">: lambda "binding" $
-          Serialization.indentSubsequentLines @@ (string "    ") @@ (localBindingToExpr @@ var "binding")] $
-        Serialization.indentBlock @@ (Lists.cons (Serialization.cst @@ (string "")) (Lists.cons
-          (Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "let")) (list [Serialization.customIndentBlock @@ (string "    ") @@ (Lists.map (var "encodeBinding") (var "bindings"))])))
-          (list [Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "in")) (list [expressionToExpr @@ var "inner"]))]))),
-      H._Expression_list>>: lambda "exprs" $
-        Serialization.bracketList @@ Serialization.halfBlockStyle @@ (Lists.map (expressionToExpr) (var "exprs")),
-      H._Expression_parens>>: lambda "expr'" $ Serialization.parenthesize @@ (expressionToExpr @@ var "expr'"),
-      H._Expression_tuple>>: lambda "exprs" $
-        Serialization.parenList @@ false @@ (Lists.map (expressionToExpr) (var "exprs")),
-      H._Expression_variable>>: lambda "name" $ nameToExpr @@ var "name"]
-
-fieldToExpr :: TTermDefinition (H.Field -> Expr)
-fieldToExpr = haskellSerdeDefinition "fieldToExpr" $
-  doc "Convert a field declaration to an AST expression" $
-  lambda "field" $ lets [
-    "name">: project H._Field H._Field_name @@ var "field",
-    "typ">: project H._Field H._Field_type @@ var "field"] $
-    Serialization.spaceSep @@ (Lists.cons (nameToExpr @@ var "name") (Lists.cons (Serialization.cst @@ (string "::")) (list [typeToExpr @@ var "typ"])))
-
-fieldWithCommentsToExpr :: TTermDefinition (H.FieldWithComments -> Expr)
-fieldWithCommentsToExpr = haskellSerdeDefinition "fieldWithCommentsToExpr" $
-  doc "Convert a field with comments to an AST expression" $
-  lambda "fieldWithComments" $ lets [
-    "field">: project H._FieldWithComments H._FieldWithComments_field @@ var "fieldWithComments",
-    "mc">: project H._FieldWithComments H._FieldWithComments_comments @@ var "fieldWithComments"] $
-    Maybes.maybe
-      (fieldToExpr @@ var "field")
-      (lambda "c" $ Serialization.newlineSep @@ (Lists.cons (Serialization.cst @@ (toHaskellComments @@ var "c")) (list [
-        fieldToExpr @@ var "field"])))
-      (var "mc")
-
-ifExpressionToExpr :: TTermDefinition (H.IfExpression -> Expr)
-ifExpressionToExpr = haskellSerdeDefinition "ifExpressionToExpr" $
-  doc "Convert an if-then-else expression to an AST expression" $
-  lambda "ifExpr" $ lets [
-    "eif">: project H._IfExpression H._IfExpression_condition @@ var "ifExpr",
-    "ethen">: project H._IfExpression H._IfExpression_then @@ var "ifExpr",
-    "eelse">: project H._IfExpression H._IfExpression_else @@ var "ifExpr",
-    "ifOp">: Ast.op
-      (Ast.symbol $ string "")
-      (Ast.padding Ast.wsNone (Ast.wsBreakAndIndent $ string "  "))
-      (Ast.precedence $ int32 0)
-      Ast.associativityNone,
-    "body">: Serialization.newlineSep @@ (Lists.cons
-      (Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "then")) (list [expressionToExpr @@ var "ethen"])))
-      (list [Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "else")) (list [expressionToExpr @@ var "eelse"]))]))] $
-    Serialization.ifx @@ var "ifOp" @@
-      (Serialization.spaceSep @@ (Lists.cons (Serialization.cst @@ (string "if")) (list [expressionToExpr @@ var "eif"]))) @@
-      var "body"
-
-importExportSpecToExpr :: TTermDefinition (H.ImportExportSpec -> Expr)
-importExportSpecToExpr = haskellSerdeDefinition "importExportSpecToExpr" $
-  doc "Convert an import/export specification to an AST expression" $
-  lambda "spec" $ nameToExpr @@ (project H._ImportExportSpec H._ImportExportSpec_name @@ var "spec")
-
-importToExpr :: TTermDefinition (H.Import -> Expr)
-importToExpr = haskellSerdeDefinition "importToExpr" $
-  doc "Convert an import statement to an AST expression" $
-  lambda "import" $ lets [
-    "qual">: project H._Import H._Import_qualified @@ var "import",
-    "modName">: project H._Import H._Import_module @@ var "import",
-    "mod">: project H._Import H._Import_as @@ var "import",
-    "mspec">: project H._Import H._Import_spec @@ var "import",
-    "name">: unwrap H._ModuleName @@ var "modName",
-    "hidingSec">: lambda "spec" $
-      cases H._SpecImport (var "spec") Nothing [
-        H._SpecImport_hiding>>: lambda "names" $
-          Serialization.spaceSep @@ (Lists.cons
-            (Serialization.cst @@ (string "hiding "))
-            (list [Serialization.parens @@
-              (Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map (importExportSpecToExpr) (var "names")))]))],
-    "parts">: Maybes.cat $ list [
-      just $ Serialization.cst @@ (string "import"),
-      Logic.ifElse (var "qual") (just $ Serialization.cst @@ (string "qualified")) nothing,
-      just $ Serialization.cst @@ var "name",
-      Maybes.map (lambda "m" $ Serialization.cst @@ (Strings.cat2 (string "as ") (unwrap H._ModuleName @@ var "m"))) (var "mod"),
-      Maybes.map (var "hidingSec") (var "mspec")]] $
-    Serialization.spaceSep @@ var "parts"
-
-lambdaExpressionToExpr :: TTermDefinition (H.LambdaExpression -> Expr)
-lambdaExpressionToExpr = haskellSerdeDefinition "lambdaExpressionToExpr" $
-  doc "Convert a lambda expression to an AST expression" $
-  lambda "lambdaExpr" $ lets [
-    "bindings">: project H._LambdaExpression H._LambdaExpression_bindings @@ var "lambdaExpr",
-            "inner">: project H._LambdaExpression H._LambdaExpression_inner @@ var "lambdaExpr",
-    "head">: Serialization.spaceSep @@ (Lists.map (patternToExpr) (var "bindings")),
-    "body">: expressionToExpr @@ var "inner"] $
-    Serialization.ifx @@ HaskellOperators.lambdaOp @@
-      (Serialization.prefix @@ (string "\\") @@ var "head") @@
-      var "body"
-
---literalToExpr :: TTermDefinition (H.Literal -> Expr)
---literalToExpr = haskellSerdeDefinition "literalToExpr" $
---  "lit" ~>
---  "parensIfNeg" <~ ("b" ~> "e" ~> Logic.ifElse (var "b")
---    (Strings.cat $ list ["(", var "e", ")"])
---    (var "e")) $
---  Serialization.cst @@
---    cases H._Literal (var "lit") Nothing [
---      H._Literal_char>>: lambda "c" $ Literals.showString $ Literals.showUint16 $ var "c", -- Simplified char handling
---      H._Literal_double>>: "d" ~> var "parensIfNeg"
---        @@ (Equality.lt (var "d") (float64 0.0))
---        @@ (Literals.showFloat64 $ var "d"),
---      H._Literal_float>>: "f" ~> var "parensIfNeg"
---        @@ (Equality.lt (var "f") (float32 0.0))
---        @@ (Literals.showFloat32 $ var "f"),
---      H._Literal_int>>: "i" ~> var "parensIfNeg"
---        @@ (Equality.lt (var "i") (int32 0))
---        @@ (Literals.showInt32 $ var "i"),
---
---      H._Literal_integer>>: lambda "i" $ Literals.showBigint $ var "i",
---      H._Literal_string>>: lambda "s" $ Literals.showString $ var "s"]
-
--- KNOWN LIMITATION: when generating Haskell source from Double/Float values,
--- NaN and Infinity come through as "NaN"/"Infinity"/"-Infinity" (from Haskell's Show),
--- which are not valid Haskell literals. The gen-main/haskell/Hydra/Ext/Haskell/Serde.hs
--- includes a bootstrap patch that emits (0/0), (1/0), and (-1/0) in those cases.
--- If this DSL source is regenerated, the patch in the generated Serde.hs MUST be
--- restored via bin/patch-haskell-serde.sh — otherwise test-suite generation will
--- emit uncompilable Haskell for primitives that produce NaN/Inf outputs.
--- See feature_312_float_tests.
-literalToExpr :: TTermDefinition (H.Literal -> Expr)
-literalToExpr = haskellSerdeDefinition "literalToExpr" $
-  doc "Convert a literal value to an AST expression" $
-  "lit" ~>
-  "parensIfNeg" <~ ("b" ~> "e" ~> Logic.ifElse (var "b")
-    (Strings.cat $ list [string "(", var "e", string ")"])
-    (var "e")) $
-  "showFloat" <~ ("showFn" ~> "v" ~>
-    "raw" <~ (var "showFn" @@ var "v") $
-    Logic.ifElse (Equality.equal (var "raw") (string "NaN"))
-      (string "(0/0)") $
-    Logic.ifElse (Equality.equal (var "raw") (string "Infinity"))
-      (string "(1/0)") $
-    Logic.ifElse (Equality.equal (var "raw") (string "-Infinity"))
-      (string "(-(1/0))") $
-    var "parensIfNeg"
-      @@ Equality.equal (Maybes.fromMaybe (int32 0) (Strings.maybeCharAt (int32 0) (var "raw"))) (int32 45)
-      @@ var "raw") $
-  Serialization.cst @@
-    cases H._Literal (var "lit") Nothing [
-      H._Literal_char>>: "c" ~> Literals.showString $ Literals.showUint16 $ var "c",
-      H._Literal_double>>: "d" ~> var "showFloat"
-        @@ (lambda "v" $ Literals.showFloat64 $ var "v")
-        @@ var "d",
-      H._Literal_float>>: "f" ~> var "showFloat"
-        @@ (lambda "v" $ Literals.showFloat32 $ var "v")
-        @@ var "f",
-      H._Literal_int>>: "i" ~> var "parensIfNeg"
-        @@ (Equality.lt (var "i") (int32 0))
-        @@ (Literals.showInt32 $ var "i"),
-      H._Literal_integer>>: "i" ~> var "parensIfNeg"
-        @@ (Equality.lt (var "i") (bigint 0))
-        @@ (Literals.showBigint $ var "i"),
-      H._Literal_string>>: lambda "s" $ Literals.showString $ var "s"]
-
-localBindingToExpr :: TTermDefinition (H.LocalBinding -> Expr)
-localBindingToExpr = haskellSerdeDefinition "localBindingToExpr" $
-  doc "Convert a local binding to an AST expression" $
-  lambda "binding" $
-    cases H._LocalBinding (var "binding") Nothing [
-      H._LocalBinding_signature>>: lambda "ts" $ typeSignatureToExpr @@ var "ts",
-      H._LocalBinding_value>>: lambda "vb" $ valueBindingToExpr @@ var "vb"]
-
-moduleHeadToExpr :: TTermDefinition (H.ModuleHead -> Expr)
-moduleHeadToExpr = haskellSerdeDefinition "moduleHeadToExpr" $
-  doc "Convert a module head to an AST expression" $
-  lambda "moduleHead" $ lets [
-    "mc">: project H._ModuleHead H._ModuleHead_comments @@ var "moduleHead",
-    "modName">: project H._ModuleHead H._ModuleHead_name @@ var "moduleHead",
-    "mname">: unwrap H._ModuleName @@ var "modName",
-    "head">: Serialization.spaceSep @@ (Lists.cons
-      (Serialization.cst @@ (string "module")) (Lists.cons
-      (Serialization.cst @@ var "mname")
-      (list [Serialization.cst @@ (string "where")])))] $
-    Maybes.maybe
-      (var "head")
-      (lambda "c" $ Serialization.newlineSep @@ (Lists.cons
-        (Serialization.cst @@ (toHaskellComments @@ var "c")) (Lists.cons
-        (Serialization.cst @@ (string ""))
-        (list [var "head"]))))
-      (var "mc")
-
-moduleToExpr :: TTermDefinition (H.Module -> Expr)
-moduleToExpr = haskellSerdeDefinition "moduleToExpr" $
-  doc "Convert a Haskell module to an AST expression" $
-  lambda "module" $ lets [
-    "mh">: project H._Module H._Module_head @@ var "module",
-    "imports">: project H._Module H._Module_imports @@ var "module",
-    "decls">: project H._Module H._Module_declarations @@ var "module",
-    "warning">: list [Serialization.cst @@ (toSimpleComments @@ Constants.warningAutoGeneratedFile)],
-    "headerLine">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "h" $ list [moduleHeadToExpr @@ var "h"]) (var "mh"),
-    "declLines">: Lists.map (declarationWithCommentsToExpr) (var "decls"),
-    "importLines">: Logic.ifElse (Lists.null $ var "imports")
-      (list ([] :: [TTerm Expr]))
-      (list [Serialization.newlineSep @@ (Lists.map (importToExpr) (var "imports"))])] $
-    Serialization.doubleNewlineSep @@ (Lists.concat $ list [var "warning", var "headerLine", var "importLines", var "declLines"])
-
-nameToExpr :: TTermDefinition (H.Name -> Expr)
-nameToExpr = haskellSerdeDefinition "nameToExpr" $
-  doc "Convert a Haskell name to an AST expression" $
-  lambda "name" $
-    Serialization.cst @@
-      cases H._Name (var "name") Nothing [
-        H._Name_implicit>>: lambda "qn" $ Strings.cat2 (string "?") (writeQualifiedName @@ var "qn"),
-        H._Name_normal>>: lambda "qn" $ writeQualifiedName @@ var "qn",
-        H._Name_parens>>: lambda "qn" $ Strings.cat $ list [string "(", writeQualifiedName @@ var "qn", string ")"]]
-
-patternToExpr :: TTermDefinition (H.Pattern -> Expr)
-patternToExpr = haskellSerdeDefinition "patternToExpr" $
-  doc "Convert a pattern to an AST expression" $
-  lambda "pat" $
-    cases H._Pattern (var "pat") Nothing [
-      H._Pattern_application>>: lambda "app" $ applicationPatternToExpr @@ var "app",
-      H._Pattern_list>>: lambda "pats" $
-        Serialization.bracketList @@ Serialization.halfBlockStyle @@ (Lists.map (patternToExpr) (var "pats")),
-      H._Pattern_literal>>: lambda "lit" $ literalToExpr @@ var "lit",
-      H._Pattern_name>>: lambda "name" $ nameToExpr @@ var "name",
-      H._Pattern_parens>>: lambda "pat'" $ Serialization.parenthesize @@ (patternToExpr @@ var "pat'"),
-      H._Pattern_tuple>>: lambda "pats" $
-        Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "pats")),
-      H._Pattern_wildcard>>: constant $ Serialization.cst @@ (string "_")]
-
-rightHandSideToExpr :: TTermDefinition (H.RightHandSide -> Expr)
-rightHandSideToExpr = haskellSerdeDefinition "rightHandSideToExpr" $
-  doc "Convert a right-hand side to an AST expression" $
-  lambda "rhs" $ expressionToExpr @@ (unwrap H._RightHandSide @@ var "rhs")
-
-statementToExpr :: TTermDefinition (H.Statement -> Expr)
-statementToExpr = haskellSerdeDefinition "statementToExpr" $
-  doc "Convert a statement to an AST expression" $
-  lambda "stmt" $ expressionToExpr @@ (unwrap H._Statement @@ var "stmt")
-
-toHaskellComments :: TTermDefinition (String -> String)
-toHaskellComments = haskellSerdeDefinition "toHaskellComments" $
-  doc ("Convert a string to Haddock documentation comments. Empty source lines"
-    <> " emit `-- |` (no trailing space) so blank doc lines don't carry trailing"
-    <> " whitespace into the generated file.") $
-  lambda "c" $ Strings.intercalate (string "\n") $ Lists.map
-    (lambda "s" $ Logic.ifElse (Equality.equal (var "s") (string ""))
-      (string "-- |")
-      (Strings.cat2 (string "-- | ") (var "s")))
-    (Strings.lines $ var "c")
-
-toSimpleComments :: TTermDefinition (String -> String)
-toSimpleComments = haskellSerdeDefinition "toSimpleComments" $
-  doc ("Convert a string to simple line comments. Empty source lines emit"
-    <> " `--` (no trailing space) for the same reason as toHaskellComments.") $
-  lambda "c" $ Strings.intercalate (string "\n") $ Lists.map
-    (lambda "s" $ Logic.ifElse (Equality.equal (var "s") (string ""))
-      (string "--")
-      (Strings.cat2 (string "-- ") (var "s")))
-    (Strings.lines $ var "c")
-
-typeSignatureToExpr :: TTermDefinition (H.TypeSignature -> Expr)
-typeSignatureToExpr = haskellSerdeDefinition "typeSignatureToExpr" $
-  doc "Convert a type signature to an AST expression" $
-  lambda "typeSig" $ lets [
-    "name">: project H._TypeSignature H._TypeSignature_name @@ var "typeSig",
-    "typ">: project H._TypeSignature H._TypeSignature_type @@ var "typeSig",
-    "nameExpr">: nameToExpr @@ var "name",
-    "typeExpr">: typeToExpr @@ var "typ",
-    "inlineSig">: Serialization.structuralSpaceSep @@ list [var "nameExpr", Serialization.cst @@ string "::", var "typeExpr"]] $
-    -- If the inline form exceeds 120 chars, break the type onto the next line with indentation
-    Logic.ifElse (Equality.gt (Serialization.expressionLength @@ var "inlineSig") (int32 120))
-      (Serialization.newlineSep @@ list [
-        Serialization.spaceSep @@ list [var "nameExpr", Serialization.cst @@ string "::"],
-        Serialization.tabIndent @@ var "typeExpr"])
-      (var "inlineSig")
-
-typeToExpr :: TTermDefinition (H.Type -> Expr)
-typeToExpr = haskellSerdeDefinition "typeToExpr" $
-  doc "Convert a Haskell type to an AST expression" $
-  lambda "htype" $
-    cases H._Type (var "htype") Nothing [
-      H._Type_application>>: lambda "appType" $ lets [
-        "lhs">: project H._ApplicationType H._ApplicationType_context @@ var "appType",
-        "rhs">: project H._ApplicationType H._ApplicationType_argument @@ var "appType"] $
-        Serialization.ifx @@ HaskellOperators.appOp @@ (typeToExpr @@ var "lhs") @@ (typeToExpr @@ var "rhs"),
-      H._Type_ctx>>: lambda "ctxType" $ lets [
-        "ctx">: project H._ContextType H._ContextType_ctx @@ var "ctxType",
-        "typ">: project H._ContextType H._ContextType_type @@ var "ctxType"] $
-        Serialization.ifx @@ HaskellOperators.assertOp @@ (assertionToExpr @@ var "ctx") @@ (typeToExpr @@ var "typ"),
-      H._Type_function>>: lambda "funType" $ lets [
-        "dom">: project H._FunctionType H._FunctionType_domain @@ var "funType",
-        "cod">: project H._FunctionType H._FunctionType_codomain @@ var "funType"] $
-        Serialization.ifx @@ HaskellOperators.arrowOp @@ (typeToExpr @@ var "dom") @@ (typeToExpr @@ var "cod"),
-      H._Type_list>>: lambda "htype'" $
-        Serialization.bracketList @@ Serialization.inlineStyle @@ list [typeToExpr @@ var "htype'"],
-      H._Type_tuple>>: lambda "types" $
-        Serialization.parenList @@ false @@ (Lists.map (typeToExpr) (var "types")),
-      H._Type_variable>>: lambda "name" $ nameToExpr @@ var "name"]
-
-valueBindingToExpr :: TTermDefinition (H.ValueBinding -> Expr)
-valueBindingToExpr = haskellSerdeDefinition "valueBindingToExpr" $
-  doc "Convert a value binding to an AST expression" $
-  lambda "vb" $
-    cases H._ValueBinding (var "vb") Nothing [
-      H._ValueBinding_simple>>: lambda "simpleVB" $ lets [
-        "pat">: project H._SimpleValueBinding H._SimpleValueBinding_pattern @@ var "simpleVB",
-        "rhs">: project H._SimpleValueBinding H._SimpleValueBinding_rhs @@ var "simpleVB",
-        "local">: project H._SimpleValueBinding H._SimpleValueBinding_localBindings @@ var "simpleVB",
-        "lhsExpr">: patternToExpr @@ var "pat",
-        "rhsExpr">: rightHandSideToExpr @@ var "rhs",
-        -- Use structuralSpaceSep to avoid triggering parenthesize on the RHS
-        "inlineBody">: Serialization.structuralSpaceSep @@ list [var "lhsExpr", Serialization.cst @@ string "=", var "rhsExpr"],
-        -- If the inline form exceeds 120 chars, break the RHS onto the next line with indentation
-        "body">: Logic.ifElse (Equality.gt (Serialization.expressionLength @@ var "inlineBody") (int32 120))
-          (Serialization.newlineSep @@ list [
-            Serialization.spaceSep @@ list [var "lhsExpr", Serialization.cst @@ string "="],
-            Serialization.tabIndent @@ var "rhsExpr"])
-          (var "inlineBody")] $
-        Maybes.maybe
-          (var "body")
-          (lambda "localBindings" $ lets [
-            "bindings">: unwrap H._LocalBindings @@ var "localBindings"] $
-            Serialization.indentBlock @@ (Lists.cons
-              (var "body")
-              (list [Serialization.indentBlock @@ Lists.cons (Serialization.cst @@ (string "where")) (Lists.map (localBindingToExpr) (var "bindings"))])))
-          (var "local")]
-
-variableToExpr :: TTermDefinition (H.Variable -> Expr)
-variableToExpr = haskellSerdeDefinition "variableToExpr" $
-  doc "Convert a type variable to an AST expression" $
-  lambda "variable" $ nameToExpr @@ (unwrap H._Variable @@ var "variable")
-
-writeQualifiedName :: TTermDefinition (H.QualifiedName -> String)
-writeQualifiedName = haskellSerdeDefinition "writeQualifiedName" $
-  doc "Write a qualified name as a string" $
-  lambda "qname" $ lets [
-    "qualifiers">: project H._QualifiedName H._QualifiedName_qualifiers @@ var "qname",
-    "unqual">: project H._QualifiedName H._QualifiedName_unqualified @@ var "qname",
-    "h">: lambda "namePart" $ unwrap H._NamePart @@ var "namePart",
-    "allParts">: Lists.concat2 (Lists.map (var "h") (var "qualifiers")) (list [var "h" @@ var "unqual"])] $
-    Strings.intercalate (string ".") $ var "allParts"
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Syntax.hs b/src/main/haskell/Hydra/Sources/Haskell/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Syntax.hs
+++ /dev/null
@@ -1,923 +0,0 @@
--- | A Haskell syntax model, loosely based on Language.Haskell.Tools.AST
-
-module Hydra.Sources.Haskell.Syntax where
-
--- Standard type-level imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A Haskell syntax model, loosely based on Language.Haskell.Tools.AST"}
-  where
-    definitions = [
-      alternative,
-      assertion,
-      classAssertion,
-      caseRhs,
-      constructor,
-      ordinaryConstructor,
-      recordConstructor,
-      constructorWithComments,
-      dataDeclaration,
-      dataOrNewtype,
-      declarationWithComments,
-      declaration,
-      declarationHead,
-      applicationDeclarationHead,
-      deriving_,
-      export,
-      expression,
-      applicationExpression,
-      caseExpression,
-      constructRecordExpression,
-      ifExpression,
-      infixApplicationExpression,
-      lambdaExpression,
-      letExpression,
-      prefixApplicationExpression,
-      sectionExpression,
-      typeSignatureExpression,
-      updateRecordExpression,
-      field,
-      fieldWithComments,
-      fieldUpdate,
-      import_,
-      specImport,
-      importModifier,
-      importExportSpec,
-      subspecImportExportSpec,
-      literal,
-      localBinding,
-      localBindings,
-      module',
-      moduleHead,
-      moduleName,
-      name,
-      namePart,
-      operator,
-      pattern,
-      applicationPattern,
-      asPattern,
-      recordPattern,
-      typedPattern,
-      patternField,
-      qualifiedName,
-      rightHandSide,
-      statement,
-      type_,
-      applicationType,
-      contextType,
-      functionType,
-      infixType,
-      typeDeclaration,
-      typeSignature,
-      typedBinding,
-      valueBinding,
-      simpleValueBinding,
-      variable]
-
-alternative :: Binding -- UAlt
-alternative = define "Alternative" $
-  doc "A pattern-matching alternative" $
-  T.record [
-    "pattern">:
-      doc "The pattern to match"
-      pattern,
-    "rhs">:
-      doc "The right-hand side of the alternative"
-      caseRhs,
-    "binds">:
-      doc "Optional local bindings" $
-      T.maybe localBindings]
-
-assertion :: Binding -- UAssertion (UClassAssert)
-assertion = define "Assertion" $
-  doc "A type assertion" $
-  T.union [
-    "class">:
-      doc "A class assertion"
-      classAssertion,
-    "tuple">:
-      doc "A tuple of assertions" $
-      T.list assertion]
-  -- omitted for now: implicit and infix assertions
-
-classAssertion :: Binding -- UClassAssert
-classAssertion = define "ClassAssertion" $
-  doc "A class assertion" $
-  T.record [
-    "name">:
-      doc "The name of the class"
-      name,
-    "types">:
-      doc "The types to which the class is applied" $
-      T.list type_]
-
-caseRhs :: Binding -- UCaseRhs'
-caseRhs = define "CaseRhs" $
-  doc "The right-hand side of a pattern-matching alternative" $
-  -- omitted for now: guarded
-  T.wrap expression
-
-constructor :: Binding -- UConDecl
-constructor = define "Constructor" $
-  doc "A data constructor" $
-  -- omitted for now: ordinary (positional), infix
-  T.union [
-    "ordinary">:
-      doc "An ordinary (positional) constructor"
-      ordinaryConstructor,
-    "record">:
-      doc "A record constructor"
-      recordConstructor]
-
-ordinaryConstructor :: Binding
-ordinaryConstructor = define "OrdinaryConstructor" $
-  doc "An ordinary (positional) data constructor" $
-  T.record [
-    "name">:
-      doc "The name of the constructor"
-      name,
-    "fields">:
-      doc "The types of the positional fields" $
-      T.list type_]
-
-recordConstructor :: Binding
-recordConstructor = define "RecordConstructor" $
-  doc "A record-style data constructor" $
-  T.record [
-    "name">:
-      doc "The name of the constructor"
-      name,
-    "fields">:
-      doc "The named fields of the record" $
-      T.list fieldWithComments]
-
-constructorWithComments :: Binding
-constructorWithComments = define "ConstructorWithComments" $
-  doc "A data constructor together with any comments" $
-  T.record [
-    "body">:
-      doc "The constructor"
-      constructor,
-    "comments">:
-      doc "Optional comments" $
-      T.maybe T.string]
-
-dataDeclaration :: Binding -- UDataDecl
-dataDeclaration = define "DataDeclaration" $
-  doc "A data type declaration" $
-  T.record [
-    "keyword">:
-      doc "The 'data' or 'newtype' keyword"
-      dataOrNewtype,
-    "context">:
-      doc "Type class constraints" $
-      T.list assertion,
-    "head">:
-      doc "The declaration head"
-      declarationHead,
-    "constructors">:
-      doc "The data constructors" $
-      T.list constructorWithComments,
-    "deriving">:
-      doc "Derived type class instances" $
-      T.list deriving_]
-
-dataOrNewtype :: Binding
-dataOrNewtype = define "DataOrNewtype" $
-  doc "The 'data' versus 'newtype keyword" $
-  T.enum ["data", "newtype"]
-
-declarationWithComments :: Binding
-declarationWithComments = define "DeclarationWithComments" $
-  doc "A data declaration together with any comments" $
-  T.record [
-    "body">:
-      doc "The declaration"
-      declaration,
-    "comments">:
-      doc "Optional comments" $
-      T.maybe T.string]
-
-declaration :: Binding -- UDecl
-declaration = define "Declaration" $
-  doc "A data or value declaration" $
-  -- omitted for now: typeFamily, typeSignature, closedTypeFamily, gDataDecl, typeInst, dataInst, gDataInst, class, inst,
-  --                  patternSynonym, deriv, fixity, default, patTypeSig, foreignImport, foreignExport, pragma,
-  --                  role, splice
-  T.union [
-    "data">:
-      doc "A data type declaration"
-      dataDeclaration,
-    "type">:
-      doc "A type synonym declaration"
-      typeDeclaration,
-    "valueBinding">:
-      doc "A value binding"
-      valueBinding,
-    "typedBinding">:
-      doc "A typed binding"
-      typedBinding]
-
-declarationHead :: Binding -- UDeclHead
-declarationHead = define "DeclarationHead" $
-  doc "The left-hand side of a declaration" $
-  -- omitted for now: infix application
-  T.union [
-    "application">:
-      doc "An application-style declaration head"
-      applicationDeclarationHead,
-    "parens">:
-      doc "A parenthesized declaration head"
-      declarationHead,
-    "simple">:
-      doc "A simple name"
-      name]
-
-applicationDeclarationHead :: Binding
-applicationDeclarationHead = define "ApplicationDeclarationHead" $
-  doc "An application-style declaration head" $
-  T.record [
-    "function">:
-      doc "The function being applied"
-      declarationHead,
-    "operand">:
-      doc "The type variable operand"
-      variable]
-
-deriving_ :: Binding -- UDeriving
-deriving_ = define "Deriving" $
-  doc "A 'deriving' statement" $
-  -- omitted for now: infix, parenthesized, and application instance heads
-  T.wrap $ T.list name
-
-export :: Binding -- UExportSpec
-export = define "Export" $
-  doc "An export statement" $
-  T.union [
-    "declaration">:
-      doc "An exported declaration"
-      importExportSpec,
-    "module">:
-      doc "An exported module"
-      moduleName]
-
-expression :: Binding -- UExpr
-expression = define "Expression" $
-  doc "A data expression" $
-  -- omitted for now: multi-if, unboxed tuple, tuple section, unboxed tuple section, parallel array,
-  --                  enum, parallel array enum, list comp, parallel array comp, type application,
-  --                  (all Template Haskell constructors), pragma, arrow definition, arrow application,
-  --                  lambda cases, static, unboxed sum, hole
-  T.union [
-    "application">:
-      doc "A function application"
-      applicationExpression,
-    "case">:
-      doc "A case expression"
-      caseExpression,
-    "constructRecord">:
-      doc "A record constructor expression"
-      constructRecordExpression,
-    "do">:
-      doc "A 'do' expression" $
-      T.list statement, -- omitted for now: do vs. mdo
-    "if">:
-      doc "An 'if' expression"
-      ifExpression,
-    "infixApplication">:
-      doc "An infix application"
-      infixApplicationExpression,
-    "literal">:
-      doc "A literal value"
-      literal,
-    "lambda">:
-      doc "A lambda expression"
-      lambdaExpression,
-    "leftSection">:
-      doc "A left section expression"
-      sectionExpression,
-    "let">:
-      doc "A 'let' expression"
-      letExpression,
-    "list">:
-      doc "A list expression" $
-      T.list expression,
-    "parens">:
-      doc "A parenthesized expression"
-      expression,
-    "prefixApplication">:
-      doc "A prefix application"
-      prefixApplicationExpression,
-    "rightSection">:
-      doc "A right section expression"
-      sectionExpression,
-    "tuple">:
-      doc "A tuple expression" $
-      T.list expression,
-    "typeSignature">:
-      doc "A type signature expression"
-      typeSignatureExpression,
-    "updateRecord">:
-      doc "A record update expression"
-      updateRecordExpression,
-    "variable">:
-      doc "A variable reference"
-      name]
-
-applicationExpression :: Binding
-applicationExpression = define "ApplicationExpression" $
-  doc "An application expression" $
-  T.record [
-    "function">:
-      doc "The function being applied"
-      expression,
-    "argument">:
-      doc "The argument"
-      expression]
-
-caseExpression :: Binding
-caseExpression = define "CaseExpression" $
-  doc "A case expression" $
-  T.record [
-    "case">:
-      doc "The expression being matched"
-      expression,
-    "alternatives">:
-      doc "The pattern-matching alternatives" $
-      T.list alternative]
-
-constructRecordExpression :: Binding
-constructRecordExpression = define "ConstructRecordExpression" $
-  doc "A record constructor expression" $
-  T.record [
-    "name">:
-      doc "The constructor name"
-      name,
-    "fields">:
-      doc "The field assignments" $
-      T.list fieldUpdate]
-
-ifExpression :: Binding
-ifExpression = define "IfExpression" $
-  doc "An 'if' expression" $
-  T.record [
-    "condition">:
-      doc "The condition expression"
-      expression,
-    "then">:
-      doc "The 'then' branch"
-      expression,
-    "else">:
-      doc "The 'else' branch"
-      expression]
-
-infixApplicationExpression :: Binding
-infixApplicationExpression = define "InfixApplicationExpression" $
-  doc "An infix application expression" $
-  T.record [
-    "lhs">:
-      doc "The left-hand operand"
-      expression,
-    "operator">:
-      doc "The infix operator"
-      operator,
-    "rhs">:
-      doc "The right-hand operand"
-      expression]
-
-lambdaExpression :: Binding
-lambdaExpression = define "LambdaExpression" $
-  doc "A lambda expression" $
-  T.record [
-    "bindings">:
-      doc "The patterns binding parameters" $
-      T.list pattern,
-    "inner">:
-      doc "The body of the lambda"
-      expression]
-
-letExpression :: Binding
-letExpression = define "LetExpression" $
-  doc "A 'let' expression" $
-  T.record [
-    "bindings">:
-      doc "The local bindings" $
-      T.list localBinding,
-    "inner">:
-      doc "The body of the let expression"
-      expression]
-
-prefixApplicationExpression :: Binding
-prefixApplicationExpression = define "PrefixApplicationExpression" $
-  doc "A prefix expression" $
-  T.record [
-    "operator">:
-      doc "The prefix operator"
-      operator,
-    "rhs">:
-      doc "The operand"
-      expression]
-
-sectionExpression :: Binding
-sectionExpression = define "SectionExpression" $
-  doc "A section expression" $
-  T.record [
-    "operator">:
-      doc "The operator"
-      operator,
-    "expression">:
-      doc "The operand"
-      expression]
-
-typeSignatureExpression :: Binding
-typeSignatureExpression = define "TypeSignatureExpression" $
-  doc "A type signature expression" $
-  T.record [
-    "inner">:
-      doc "The expression being typed"
-      expression,
-    "type">:
-      doc "The type signature"
-      type_]
-
-updateRecordExpression :: Binding
-updateRecordExpression = define "UpdateRecordExpression" $
-  doc "An update record expression" $
-  T.record [
-    "inner">:
-      doc "The record being updated"
-      expression,
-    "fields">:
-      doc "The field updates" $
-      T.list fieldUpdate]
-
-field :: Binding -- UFieldDecl
-field = define "Field" $
-  doc "A field (name/type pair)" $
-  T.record [
-    "name">:
-      doc "The field name"
-      name,
-    "type">:
-      doc "The field type"
-      type_]
-
-fieldWithComments :: Binding
-fieldWithComments = define "FieldWithComments" $
-  doc "A field together with any comments" $
-  T.record [
-    "field">:
-      doc "The field"
-      field,
-    "comments">:
-      doc "Optional comments" $
-      T.maybe T.string]
-
-fieldUpdate :: Binding -- UFieldUpdate
-fieldUpdate = define "FieldUpdate" $
-  doc "A field name and value" $
-  -- omitted for now: pun, wildcard
-  T.record [
-    "name">:
-      doc "The field name"
-      name,
-    "value">:
-      doc "The field value"
-      expression]
-
-import_ :: Binding -- UImportDecl
-import_ = define "Import" $
-  doc "An import statement" $
-  -- omitted for now: source, safe, pkg
-  T.record [
-    "qualified">:
-      doc "Whether the import is qualified"
-      T.boolean,
-    "module">:
-      doc "The module being imported"
-      moduleName,
-    "as">:
-      doc "Optional alias for the module" $
-      T.maybe moduleName,
-    "spec">:
-      doc "Optional import specification" $
-      T.maybe specImport]
-
-specImport :: Binding
-specImport = define "SpecImport" $
-  doc "An import specification" $
-  T.union [
-    "list">:
-      doc "A list of imports to include" $
-      T.list importExportSpec,
-    "hiding">:
-      doc "A list of imports to exclude" $
-      T.list importExportSpec]
-
-importModifier :: Binding -- UImportModifier
-importModifier = define "ImportModifier" $
-  doc "An import modifier ('pattern' or 'type')" $
-  T.enum ["pattern", "type"]
-
-importExportSpec :: Binding -- UIESpec
-importExportSpec = define "ImportExportSpec" $
-  doc "An import or export specification" $
-  T.record [
-    "modifier">:
-      doc "Optional import modifier" $
-      T.maybe importModifier,
-    "name">:
-      doc "The name being imported or exported"
-      name,
-    "subspec">:
-      doc "Optional subspecification" $
-      T.maybe subspecImportExportSpec]
-
-subspecImportExportSpec :: Binding
-subspecImportExportSpec = define "SubspecImportExportSpec" $
-  doc "A subspecification within an import/export" $
-  T.union [
-    "all">:
-      doc "Import/export all"
-      T.unit,
-    "list">:
-      doc "Import/export specific names" $
-      T.list name]
-
-literal :: Binding -- ULiteral
-literal = define "Literal" $
-  doc "A literal value" $
-  -- omitted for now: frac, primChar
-  T.union [
-    "char">:
-      doc "A character literal"
-      T.uint16,
-    "double">:
-      doc "A double-precision floating point literal"
-      T.float64,
-    "float">:
-      doc "A single-precision floating point literal"
-      T.float32,
-    "int">:
-      doc "A 32-bit integer literal"
-      T.int32,
-    "integer">:
-      doc "An arbitrary-precision integer literal"
-      T.bigint,
-    "string">:
-      doc "A string literal"
-      T.string]
-
-localBinding :: Binding -- ULocalBind
-localBinding = define "LocalBinding" $
-  doc "A local binding" $
-  -- omitted for now: fixity, pragma
-  T.union [
-    "signature">:
-      doc "A type signature"
-      typeSignature,
-    "value">:
-      doc "A value binding"
-      valueBinding]
-
-localBindings :: Binding -- ULocalBinds
-localBindings = define "LocalBindings" $
-  doc "A collection of local bindings" $
-  T.wrap $ T.list localBinding
-
-module' :: Binding -- UModule
-module' = define "Module" $
-  doc "A Haskell module" $
-  -- omitted for now: pragma
-  T.record [
-    "head">:
-      doc "Optional module head" $
-      T.maybe moduleHead,
-    "imports">:
-      doc "Import statements" $
-      T.list import_,
-    "declarations">:
-      doc "Module declarations" $
-      T.list declarationWithComments]
-
-moduleHead :: Binding -- UModuleHead
-moduleHead = define "ModuleHead" $
-  doc "A module head" $
-  -- omitted for now: pragma
-  T.record [
-    "comments">:
-      doc "Optional module-level comments" $
-      T.maybe T.string,
-    "name">:
-      doc "The module name"
-      moduleName,
-    "exports">:
-      doc "Export list" $
-      T.list export] -- UExportSpecs
-
-moduleName :: Binding -- UModuleName
-moduleName = define "ModuleName" $
-  doc "A module name" $
-  T.wrap T.string
-
-name :: Binding -- UName
-name = define "Name" $
-  doc "A name" $
-  T.union [
-    "implicit">:
-      doc "An implicit name"
-      qualifiedName,
-    "normal">:
-      doc "A normal name"
-      qualifiedName,
-    "parens">:
-      doc "A parenthesized name"
-      qualifiedName]
-
-namePart :: Binding -- UNamePart
-namePart = define "NamePart" $
-  doc "A component of a qualified name" $
-  T.wrap T.string
-
-operator :: Binding -- UOperator
-operator = define "Operator" $
-  doc "An operator" $
-  T.union [
-    "backtick">:
-      doc "A function used as an infix operator"
-      qualifiedName,
-    "normal">:
-      doc "A normal infix operator"
-      qualifiedName]
-
-pattern :: Binding -- UPattern
-pattern = define "Pattern" $
-  doc "A pattern" $
-  -- omitted for now: unboxed tuples, parallel arrays, irrefutable, bang, view, splice, quasiquote, plusk, unboxed sum
-  T.union [
-    "application">:
-      doc "An application pattern"
-      applicationPattern,
-    "as">:
-      doc "An 'as' pattern"
-      asPattern,
-    "list">:
-      doc "A list pattern" $
-      T.list pattern,
-    "literal">:
-      doc "A literal pattern"
-      literal,
-    "name">:
-      doc "A name pattern"
-      name,
-    "parens">:
-      doc "A parenthesized pattern"
-      pattern,
-    "record">:
-      doc "A record pattern"
-      recordPattern,
-    "tuple">:
-      doc "A tuple pattern" $
-      T.list pattern,
-    "typed">:
-      doc "A typed pattern"
-      typedPattern,
-    "wildcard">:
-      doc "A wildcard pattern"
-      T.unit]
-
-applicationPattern :: Binding
-applicationPattern = define "ApplicationPattern" $
-  doc "An application pattern" $
-  T.record [
-    "name">:
-      doc "The constructor name"
-      name,
-    "args">:
-      doc "The pattern arguments" $
-      T.list pattern]
-
-asPattern :: Binding
-asPattern = define "AsPattern" $
-  doc "An 'as' pattern" $
-  T.record [
-    "name">:
-      doc "The bound name"
-      name,
-    "inner">:
-      doc "The inner pattern"
-      pattern]
-
-recordPattern :: Binding
-recordPattern = define "RecordPattern" $
-  doc "A record pattern" $
-  T.record [
-    "name">:
-      doc "The constructor name"
-      name,
-    "fields">:
-      doc "The field patterns" $
-      T.list patternField]
-
-typedPattern :: Binding
-typedPattern = define "TypedPattern" $
-  doc "A typed pattern" $
-  T.record [
-    "inner">:
-      doc "The inner pattern"
-      pattern,
-    "type">:
-      doc "The type annotation"
-      type_]
-
-patternField :: Binding -- UPatternField
-patternField = define "PatternField" $
-  doc "A pattern field" $
-  -- omitted for now: puns, wildcards
-  T.record [
-    "name">:
-      doc "The field name"
-      name,
-    "pattern">:
-      doc "The field pattern"
-      pattern]
-
-qualifiedName :: Binding -- UQualifiedName
-qualifiedName = define "QualifiedName" $
-  doc "A qualified name" $
-  T.record [
-    "qualifiers">:
-      doc "The qualifier parts" $
-      T.list namePart,
-    "unqualified">:
-      doc "The unqualified name part"
-      namePart]
-
-rightHandSide :: Binding -- URhs
-rightHandSide = define "RightHandSide" $
-  doc "A right-hand side of a binding" $
-  -- omitted for now: guarded rhs
-  T.wrap expression
-
-statement :: Binding -- UStmt
-statement = define "Statement" $
-  doc "A do-notation statement" $
-  T.wrap expression
-
-type_ :: Binding -- UType
-type_ = define "Type" $
-  doc "A type expression" $
-  -- omitted for now: forall, unboxed tuple, parallel array, kinded, promoted, splice, quasiquote, bang,
-  --                  lazy, unpack, nounpack, wildcard, named wildcard, sum
-  T.union [
-    "application">:
-      doc "An application type"
-      applicationType,
-    "ctx">:
-      doc "A context type"
-      contextType,
-    "function">:
-      doc "A function type"
-      functionType,
-    "infix">:
-      doc "An infix type"
-      infixType,
-    "list">:
-      doc "A list type"
-      type_,
-    "parens">:
-      doc "A parenthesized type"
-      type_,
-    "tuple">:
-      doc "A tuple type" $
-      T.list type_,
-    "variable">:
-      doc "A type variable or type name"
-      name]
-
-applicationType :: Binding
-applicationType = define "ApplicationType" $
-  doc "An application type" $
-  T.record [
-    "context">:
-      doc "The type being applied"
-      type_,
-    "argument">:
-      doc "The type argument"
-      type_]
-
-contextType :: Binding
-contextType = define "ContextType" $
-  doc "A type with a context (type class constraints)" $
-  T.record [
-    "ctx">:
-      doc "The type class context"
-      assertion, -- UContext
-    "type">:
-      doc "The constrained type"
-      type_]
-
-functionType :: Binding
-functionType = define "FunctionType" $
-  doc "A function type" $
-  T.record [
-    "domain">:
-      doc "The domain type"
-      type_,
-    "codomain">:
-      doc "The codomain type"
-      type_]
-
-infixType :: Binding
-infixType = define "InfixType" $
-  doc "An infix type application" $
-  T.record [
-    "lhs">:
-      doc "The left-hand type"
-      type_,
-    "operator">:
-      doc "The type operator"
-      operator,
-    "rhs">:
-      doc "The right-hand operator"
-      operator]
-
-typeDeclaration :: Binding -- UTypeDecl
-typeDeclaration = define "TypeDeclaration" $
-  doc "A type synonym declaration" $
-  T.record [
-    "name">:
-      doc "The declaration head"
-      declarationHead,
-    "type">:
-      doc "The type being defined"
-      type_]
-
-typeSignature :: Binding -- UTypeSignature
-typeSignature = define "TypeSignature" $
-  doc "A type signature" $
-  T.record [
-    "name">:
-      doc "The name being typed"
-      name,
-    "type">:
-      doc "The type"
-      type_]
-
-typedBinding :: Binding -- Added for convenience
-typedBinding = define "TypedBinding" $
-  doc "A binding with its type signature" $
-  T.record [
-    "typeSignature">:
-      doc "The type signature"
-      typeSignature,
-    "valueBinding">:
-      doc "The value binding"
-      valueBinding]
-
-valueBinding :: Binding -- UValueBind
-valueBinding = define "ValueBinding" $
-  doc "A value binding" $
-  -- omitted for now: funBind
-  T.union [
-    "simple">:
-      doc "A simple value binding"
-      simpleValueBinding]
-
-simpleValueBinding :: Binding
-simpleValueBinding = define "SimpleValueBinding" $
-  doc "A simple value binding" $
-  T.record [
-    "pattern">:
-      doc "The pattern being bound"
-      pattern,
-    "rhs">:
-      doc "The right-hand side"
-      rightHandSide,
-    "localBindings">:
-      doc "Optional local bindings (where clause)" $
-      T.maybe localBindings]
-
-variable :: Binding
-variable = define "Variable" $
-  doc "A type variable" $
-  -- omitted for now: kind constraints
-  T.wrap name
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Testing.hs b/src/main/haskell/Hydra/Sources/Haskell/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Testing.hs
+++ /dev/null
@@ -1,313 +0,0 @@
--- | Haskell test code generation in Hydra DSL.
--- This module generates HSpec-based test files for Haskell from universal test cases.
-
-module Hydra.Sources.Haskell.Testing where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Dependencies   as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Predicates     as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors    as ShowError
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-
--- Additional imports
-import qualified Hydra.Haskell.Syntax as H
-import qualified Hydra.Sources.Haskell.Syntax as HaskellSyntax
-import qualified Hydra.Sources.Haskell.Utils as HaskellUtilsSource
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.testing"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [HaskellUtilsSource.ns, Formatting.ns, Names.ns,
-     Constants.ns, Dependencies.ns, Predicates.ns, Rewriting.ns, ShowError.ns, Lexical.ns, Strip.ns],
-            moduleTypeDependencies = (HaskellSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Haskell test code generation for HSpec-based generation tests"}
-  where
-    definitions = [
-      toDefinition addNamespacesToNamespaces,
-      toDefinition buildNamespacesForTestGroup,
-      toDefinition buildTestModule,
-      toDefinition collectNames,
-      toDefinition collectTestCases,
-      toDefinition extractEncodedTermVariableNames,
-      toDefinition extractTestTerms,
-      toDefinition findHaskellImports,
-      toDefinition generateHaskellTestFile,
-      toDefinition generateTestCase,
-      toDefinition generateTestFile,
-      toDefinition generateTestGroupHierarchy,
-      toDefinition namespaceToModuleName]
-
-
--- | Add namespaces from a set of names to existing namespaces
-addNamespacesToNamespaces :: TTermDefinition (Namespaces H.ModuleName -> S.Set Name -> Namespaces H.ModuleName)
-addNamespacesToNamespaces = define "addNamespacesToNamespaces" $
-  doc "Add namespaces from a set of names to existing namespaces" $
-  lambda "ns0" $ lambda "names" $ lets [
-    "newNamespaces">: Sets.fromList (Maybes.cat (Lists.map Names.namespaceOf (Sets.toList (var "names")))),
-    "toModuleName">: lambda "namespace" $
-      wrap H._ModuleName (Formatting.capitalize @@ (Maybes.fromMaybe (unwrap _Namespace @@ var "namespace") (Lists.maybeLast (Strings.splitOn (string ".") (unwrap _Namespace @@ var "namespace"))))),
-    "newMappings">: Maps.fromList (Lists.map (lambda "ns_" $ pair (var "ns_") (var "toModuleName" @@ var "ns_")) (Sets.toList (var "newNamespaces")))] $
-    record _Namespaces [
-      _Namespaces_focus>>: project _Namespaces _Namespaces_focus @@ var "ns0",
-      _Namespaces_mapping>>: Maps.union (project _Namespaces _Namespaces_mapping @@ var "ns0") (var "newMappings")]
-
-
--- | Build namespaces for a test group including encoded term references
-buildNamespacesForTestGroup :: TTermDefinition (Module -> TestGroup -> Graph -> Either String (Namespaces H.ModuleName))
-buildNamespacesForTestGroup = define "buildNamespacesForTestGroup" $
-  doc "Build namespaces for a test group including encoded term references" $
-  lambda "mod" $ lambda "tgroup" $ lambda "graph_" $ lets [
-    "testCases_">: collectTestCases @@ var "tgroup",
-    "testTerms">: Lists.concat (Lists.map extractTestTerms (var "testCases_")),
-    "testBindings">: Lists.map
-      (lambda "term" $
-        record _Binding [
-          _Binding_name>>: wrap _Name (string "_test_"),
-          _Binding_term>>: var "term",
-          _Binding_typeScheme>>: nothing])
-      (var "testTerms"),
-    "tempModule">: record _Module [
-      _Module_description>>: project _Module _Module_description @@ var "mod",
-      _Module_namespace>>: Packaging.moduleNamespace (var "mod"),
-      _Module_termDependencies>>: project _Module _Module_termDependencies @@ var "mod",
-      _Module_typeDependencies>>: project _Module _Module_typeDependencies @@ var "mod",
-      _Module_definitions>>: Lists.map ("b" ~> Packaging.definitionTerm (Packaging.termDefinition
-        (Core.bindingName $ var "b") (Core.bindingTerm $ var "b")
-        (Core.bindingTypeScheme $ var "b")))
-        (var "testBindings")]] $
-    Eithers.bind
-      (Eithers.bimap
-        (lambda "e" $ ShowError.error_ @@ var "e")
-        (lambda "a" $ var "a")
-        (HaskellUtilsSource.namespacesForModule @@ var "tempModule" @@ asTerm Lexical.emptyContext @@ var "graph_"))
-      (lambda "baseNamespaces" $ lets [
-        "encodedNames">: Sets.unions (Lists.map (lambda "t" $ extractEncodedTermVariableNames @@ var "graph_" @@ var "t") (var "testTerms"))] $
-        right (addNamespacesToNamespaces @@ var "baseNamespaces" @@ var "encodedNames"))
-
-
--- | Build the complete test module for Haskell HSpec
-buildTestModule :: TTermDefinition (Module -> TestGroup -> String -> Namespaces H.ModuleName -> String)
-buildTestModule = define "buildTestModule" $
-  doc "Build the complete test module for Haskell HSpec" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "testBody" $ lambda "namespaces" $ lets [
-    "ns_">: Packaging.moduleNamespace (var "testModule"),
-    "specNs">: wrap _Namespace (Strings.cat2 (unwrap _Namespace @@ var "ns_") (string "Spec")),
-    "moduleNameString">: namespaceToModuleName @@ var "specNs",
-    "groupName_">: project _TestGroup _TestGroup_name @@ var "testGroup",
-    "domainImports">: findHaskellImports @@ var "namespaces" @@ Sets.empty,
-    "standardImports">: list [
-      string "import Hydra.Kernel",
-      string "import qualified Test.Hspec as H",
-      string "import qualified Data.List as L",
-      string "import qualified Data.Map as M",
-      string "import qualified Data.Set as S",
-      string "import qualified Data.Maybe as Y"],
-    "allImports">: Lists.concat2 (var "standardImports") (var "domainImports"),
-    "header">: Strings.intercalate (string "\n") (Lists.concat (list [
-      list [
-        Strings.cat2 (string "-- ") (asTerm Constants.warningAutoGeneratedFile),
-        string ""],
-      list [
-        string "",
-        Strings.cat (list [string "module ", var "moduleNameString", string " where"]),
-        string ""],
-      var "allImports",
-      list [
-        string "",
-        string "spec :: H.Spec",
-        Strings.cat (list [string "spec = H.describe ", Literals.showString (var "groupName_"), string " $ do"])]]))] $
-    Strings.cat (list [var "header", string "\n", var "testBody", string "\n"])
-
-
--- | Collect variable names from encoded terms within a single term node
-collectNames :: TTermDefinition (Graph -> S.Set Name -> Term -> S.Set Name)
-collectNames = define "collectNames" $
-  doc "Collect variable names from encoded terms within a single term node" $
-  lambda "graf" $ lambda "names" $ lambda "t" $
-    Logic.ifElse (Predicates.isEncodedTerm @@ (Strip.deannotateTerm @@ var "t"))
-      (Eithers.either_
-        (lambda "_" $ var "names")
-        (lambda "decodedTerm" $
-          Sets.union (var "names") (Dependencies.termDependencyNames @@ true @@ true @@ true @@ var "decodedTerm"))
-        (Eithers.bimap
-          (lambda "_e" $ var "_e")
-          (lambda "_a" $ var "_a")
-          (decoderFor _Term @@ var "graf" @@ var "t")))
-      (var "names")
-
-
--- | Collect all test cases from a test group (recursively)
-collectTestCases :: TTermDefinition (TestGroup -> [TestCaseWithMetadata])
-collectTestCases = define "collectTestCases" $
-  doc "Collect all test cases from a test group recursively" $
-  lambda "tg" $
-    Lists.concat2
-      (project _TestGroup _TestGroup_cases @@ var "tg")
-      (Lists.concat (Lists.map collectTestCases (project _TestGroup _TestGroup_subgroups @@ var "tg")))
-
-
--- | Extract all variable names from term-encoded terms in a given term
-extractEncodedTermVariableNames :: TTermDefinition (Graph -> Term -> S.Set Name)
-extractEncodedTermVariableNames = define "extractEncodedTermVariableNames" $
-  doc "Extract all variable names from term-encoded terms in a given term" $
-  lambda "graf" $ lambda "term" $
-    Rewriting.foldOverTerm @@ inject _TraversalOrder _TraversalOrder_pre unit @@ (collectNames @@ var "graf") @@ Sets.empty @@ var "term"
-
-
--- | Extract terms from a test case
-extractTestTerms :: TTermDefinition (TestCaseWithMetadata -> [Term])
-extractTestTerms = define "extractTestTerms" $
-  doc "Extract input and output terms from a test case" $
-  lambda "tcm" $
-    list ([] :: [TTerm Term])
-
-
--- | Find necessary imports for Haskell based on referenced names
-findHaskellImports :: TTermDefinition (Namespaces H.ModuleName -> S.Set Name -> [String])
-findHaskellImports = define "findHaskellImports" $
-  doc "Find necessary imports for Haskell based on referenced names" $
-  lambda "namespaces" $ lambda "names_" $ lets [
-    "mapping_">: project _Namespaces _Namespaces_mapping @@ var "namespaces",
-    "filtered">: Maps.filterWithKey
-      (lambda "ns_" $ lambda "_v" $
-        Logic.not (Equality.equal
-          (Maybes.fromMaybe (string "") (Lists.maybeHead (Strings.splitOn (string "hydra.test.") (unwrap _Namespace @@ var "ns_"))))
-          (string "")))
-      (var "mapping_")] $
-    Lists.map
-      (lambda "entry" $ Strings.cat (list [
-        string "import qualified ",
-        Strings.intercalate (string ".") (Lists.map Formatting.capitalize (Strings.splitOn (string ".") (unwrap _Namespace @@ Pairs.first (var "entry")))),
-        string " as ",
-        unwrap H._ModuleName @@ Pairs.second (var "entry")]))
-      (Maps.toList (var "filtered"))
-
-
--- | Generate a Haskell test file for a test group, with type inference and namespace building
-generateHaskellTestFile :: TTermDefinition (Module -> TestGroup -> Graph -> Either String (String, String))
-generateHaskellTestFile = define "generateHaskellTestFile" $
-  doc "Generate a Haskell test file for a test group, with type inference and namespace building" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "g" $
-    Eithers.bind
-      (buildNamespacesForTestGroup @@ var "testModule" @@ var "testGroup" @@ var "g")
-      (lambda "namespaces" $
-        generateTestFile @@ var "testModule" @@ var "testGroup" @@ var "namespaces")
-
-
--- | Generate a single HSpec test case from a universal test case
-generateTestCase :: TTermDefinition (Int -> TestCaseWithMetadata -> Either String [String])
-generateTestCase = define "generateTestCase" $
-  doc "Generate a single HSpec test case from a universal test case" $
-  lambda "depth" $ lambda "tcm" $ lets [
-    "name_">: project _TestCaseWithMetadata _TestCaseWithMetadata_name @@ var "tcm",
-    "tcase">: project _TestCaseWithMetadata _TestCaseWithMetadata_case @@ var "tcm",
-    "universal">: match _TestCase Nothing ["universal">: lambda "u" $ var "u"] @@ var "tcase",
-    "actual_">: project _UniversalTestCase _UniversalTestCase_actual @@ var "universal",
-    "expected_">: project _UniversalTestCase _UniversalTestCase_expected @@ var "universal"] $
-    right (list [
-      Strings.cat (list [string "H.it ", Literals.showString (var "name_"), string " $ H.shouldBe"]),
-      Strings.cat (list [string "  (", var "actual_", string ")"]),
-      Strings.cat (list [string "  (", var "expected_", string ")"])])
-
-
--- | Generate a complete Haskell test file
-generateTestFile :: TTermDefinition (Module -> TestGroup -> Namespaces H.ModuleName -> Either String (String, String))
-generateTestFile = define "generateTestFile" $
-  doc "Generate a complete Haskell test file" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "namespaces" $
-    Eithers.map
-      (lambda "testBody" $ lets [
-        "testModuleContent">: buildTestModule @@ var "testModule" @@ var "testGroup" @@ var "testBody" @@ var "namespaces",
-        "ns_">: Packaging.moduleNamespace (var "testModule"),
-        "specNs">: wrap _Namespace (Strings.cat2 (unwrap _Namespace @@ var "ns_") (string "Spec")),
-        "filePath">: Names.namespaceToFilePath @@ Util.caseConventionPascal @@ (wrap _FileExtension (string "hs")) @@ var "specNs"] $
-        pair (var "filePath") (var "testModuleContent"))
-      (generateTestGroupHierarchy @@ int32 1 @@ var "testGroup")
-
-
--- | Generate test hierarchy preserving the structure with H.describe blocks for subgroups
-generateTestGroupHierarchy :: TTermDefinition (Int -> TestGroup -> Either String String)
-generateTestGroupHierarchy = define "generateTestGroupHierarchy" $
-  doc "Generate test hierarchy preserving the structure with H.describe blocks for subgroups" $
-  lambda "depth" $ lambda "testGroup" $ lets [
-    "cases_">: project _TestGroup _TestGroup_cases @@ var "testGroup",
-    "subgroups">: project _TestGroup _TestGroup_subgroups @@ var "testGroup",
-    "indent">: Strings.fromList (Lists.replicate (Math.mul (var "depth") (int32 2)) (int32 32))] $  -- space char
-    Eithers.bind
-      (Eithers.mapList
-        (lambda "tc" $ generateTestCase @@ var "depth" @@ var "tc")
-        (var "cases_"))
-      (lambda "testCaseLinesRaw" $ lets [
-        "testCaseLines">: Lists.map
-          (lambda "lines_" $ Lists.map (lambda "line" $ Strings.cat2 (var "indent") (var "line")) (var "lines_"))
-          (var "testCaseLinesRaw"),
-        "testCasesStr">: Strings.intercalate (string "\n") (Lists.concat (var "testCaseLines"))] $
-        Eithers.map
-          (lambda "subgroupsStr" $
-            Strings.cat (list [
-              var "testCasesStr",
-              Logic.ifElse (Logic.or (Equality.equal (var "testCasesStr") (string "")) (Equality.equal (var "subgroupsStr") (string "")))
-                (string "")
-                (string "\n"),
-              var "subgroupsStr"]))
-          (Eithers.map
-            (lambda "blocks" $ Strings.intercalate (string "\n") (var "blocks"))
-            (Eithers.mapList
-              (lambda "subgroup" $ lets [
-                "groupName_">: project _TestGroup _TestGroup_name @@ var "subgroup"] $
-                Eithers.map
-                  (lambda "content" $
-                    Strings.cat (list [
-                      var "indent",
-                      string "H.describe ",
-                      Literals.showString (var "groupName_"),
-                      string " $ do\n",
-                      var "content"]))
-                  (generateTestGroupHierarchy @@ Math.add (var "depth") (int32 1) @@ var "subgroup"))
-              (var "subgroups"))))
-
-
--- | Convert namespace to Haskell module name
-namespaceToModuleName :: TTermDefinition (Namespace -> String)
-namespaceToModuleName = define "namespaceToModuleName" $
-  doc "Convert namespace to Haskell module name" $
-  lambda "ns_" $
-    Strings.intercalate (string ".") (Lists.map Formatting.capitalize (Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_")))
-
-
diff --git a/src/main/haskell/Hydra/Sources/Haskell/Utils.hs b/src/main/haskell/Hydra/Sources/Haskell/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Haskell/Utils.hs
+++ /dev/null
@@ -1,431 +0,0 @@
-module Hydra.Sources.Haskell.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                     as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Analysis       as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Haskell.Syntax as H
-import qualified Hydra.Sources.Haskell.Syntax as HaskellSyntax
-import qualified Hydra.Sources.Haskell.Language as HaskellLanguage
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-
-
-type HaskellNamespaces = Namespaces H.ModuleName
-
-haskellUtilsDefinition :: String -> TTerm a -> TTermDefinition a
-haskellUtilsDefinition = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.haskell.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Analysis.ns, Formatting.ns, HaskellLanguage.ns, Names.ns],
-            moduleTypeDependencies = (HaskellSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Utilities for working with Haskell syntax trees"}
-  where
-    definitions = [
-      toDefinition applicationPattern,
-      toDefinition elementReference,
-      toDefinition hsapp,
-      toDefinition hslambda,
-      toDefinition hslit,
-      toDefinition hsvar,
-      toDefinition namespacesForModule,
-      toDefinition newtypeAccessorName,
-      toDefinition rawName,
-      toDefinition recordFieldReference,
-      toDefinition sanitizeHaskellName,
-      toDefinition simpleName,
-      toDefinition simpleValueBinding,
-      toDefinition toTypeApplication,
-      toDefinition typeNameForRecord,
-      toDefinition unionFieldReference,
-      toDefinition unpackForallType]
-
-applicationPattern :: TTermDefinition (H.Name -> [H.Pattern] -> H.Pattern)
-applicationPattern = haskellUtilsDefinition "applicationPattern" $
-  doc "Create an application pattern from a name and argument patterns" $
-  "name" ~> "args" ~>
-  inject H._Pattern H._Pattern_application $
-    record H._ApplicationPattern [
-      H._ApplicationPattern_name>>: var "name",
-      H._ApplicationPattern_args>>: var "args"]
-
-elementReference :: TTermDefinition (HaskellNamespaces -> Name -> H.Name)
-elementReference = haskellUtilsDefinition "elementReference" $
-  doc "Generate a Haskell name reference for a Hydra element" $
-  "namespaces" ~> "name" ~> lets [
-    "namespacePair">: Packaging.namespacesFocus $ var "namespaces",
-    "gname">: Pairs.first $ var "namespacePair",
-    "gmod">: unwrap H._ModuleName @@ (Pairs.second $ var "namespacePair"),
-    "namespacesMap">: Packaging.namespacesMapping $ var "namespaces",
-    "qname">: Names.qualifyName @@ var "name",
-    "local">: Packaging.qualifiedNameLocal $ var "qname",
-    "escLocal">: sanitizeHaskellName @@ var "local",
-    "mns">: Packaging.qualifiedNameNamespace $ var "qname"] $
-    Maybes.cases (Packaging.qualifiedNameNamespace $ var "qname")
-      (simpleName @@ var "local") $
-      "ns" ~>
-        Maybes.cases (Maps.lookup (var "ns") (var "namespacesMap"))
-          (simpleName @@ var "local") $
-          "mn" ~> lets [
-            "aliasStr">: unwrap H._ModuleName @@ var "mn"] $
-            Logic.ifElse (Equality.equal (var "ns") (var "gname"))
-              (simpleName @@ var "escLocal")
-              (rawName @@ (Strings.cat $ list [
-                var "aliasStr",
-                string ".",
-                sanitizeHaskellName @@ var "local"]))
-
-hsapp :: TTermDefinition (H.Expression -> H.Expression -> H.Expression)
-hsapp = haskellUtilsDefinition "hsapp" $
-  doc "Create a Haskell function application expression" $
-  "l" ~> "r" ~>
-    inject H._Expression H._Expression_application $
-      record H._ApplicationExpression [
-        H._ApplicationExpression_function>>: var "l",
-        H._ApplicationExpression_argument>>: var "r"]
-
-hslambda :: TTermDefinition (H.Name -> H.Expression -> H.Expression)
-hslambda = haskellUtilsDefinition "hslambda" $
-  doc "Create a Haskell lambda expression" $
-  "name" ~> "rhs" ~>
-    inject H._Expression H._Expression_lambda $
-      record H._LambdaExpression [
-        H._LambdaExpression_bindings>>: list [inject H._Pattern H._Pattern_name $ var "name"],
-        H._LambdaExpression_inner>>: var "rhs"]
-
-hslit :: TTermDefinition (H.Literal -> H.Expression)
-hslit = haskellUtilsDefinition "hslit" $
-  doc "Create a Haskell literal expression" $
-  "lit" ~>
-    inject H._Expression H._Expression_literal $ var "lit"
-
-hsvar :: TTermDefinition (String -> H.Expression)
-hsvar = haskellUtilsDefinition "hsvar" $
-  doc "Create a Haskell variable expression from a string" $
-  "s" ~>
-    inject H._Expression H._Expression_variable $ (rawName @@ var "s")
-
-namespacesForModule :: TTermDefinition (Module -> Context -> Graph -> Either Error HaskellNamespaces)
-namespacesForModule = haskellUtilsDefinition "namespacesForModule" $
-  doc "Compute the Haskell module namespaces for a Hydra module" $
-  "mod" ~> "cx" ~> "g" ~>
-    "nss" <<~ Analysis.moduleDependencyNamespaces @@ var "cx" @@ var "g" @@ true @@ true @@ true @@ true @@ var "mod" $
-    "ns" <~ (Packaging.moduleNamespace $ var "mod") $
-    "segmentsOf" <~ ("namespace" ~>
-      Strings.splitOn (string ".") (unwrap _Namespace @@ var "namespace")) $
-    -- Build an alias by taking the last `n` segments of `segs`, capitalizing each,
-    -- and concatenating. E.g. ["hydra","encode","core"] with n=2 becomes "EncodeCore".
-    "aliasFromSuffix" <~ ("segs" ~> "n" ~> lets [
-      "dropCount">: Math.sub (Lists.length $ var "segs") (var "n"),
-      "suffix">: Lists.drop (var "dropCount") (var "segs"),
-      "capitalizedSuffix">: Lists.map (Formatting.capitalize) (var "suffix")] $
-      wrap H._ModuleName $ Strings.cat $ var "capitalizedSuffix") $
-    "toModuleName" <~ ("namespace" ~>
-      var "aliasFromSuffix" @@ (var "segmentsOf" @@ var "namespace") @@ (int32 1)) $
-    "focusPair" <~ pair (var "ns") (var "toModuleName" @@ var "ns") $
-    "nssAsList" <~ (Sets.toList $ var "nss") $
-    "segsMap" <~ (Maps.fromList $ Lists.map
-      ("nm" ~> pair (var "nm") (var "segmentsOf" @@ var "nm"))
-      (var "nssAsList")) $
-    -- Maximum number of segments across all dependency namespaces; used as an
-    -- upper bound on how many disambiguation passes are needed. At least 1 so
-    -- the fold runs at least once even for single-namespace inputs.
-    "maxSegs" <~ Lists.foldl
-      ("a" ~> "b" ~> Logic.ifElse (Equality.gt (var "a") (var "b")) (var "a") (var "b"))
-      (int32 1)
-      (Lists.map ("nm" ~> Lists.length (var "segmentsOf" @@ var "nm")) (var "nssAsList")) $
-    -- Disambiguation state: Map Namespace Int, where the Int is the number of
-    -- trailing segments currently used to form the alias. Every namespace starts
-    -- at 1 (just the last segment, matching the legacy behavior).
-    "initialState" <~ (Maps.fromList $ Lists.map
-      ("nm" ~> pair (var "nm") (int32 1))
-      (var "nssAsList")) $
-    "segsFor" <~ ("nm" ~> Maybes.fromMaybe (list ([] :: [TTerm String])) (Maps.lookup (var "nm") (var "segsMap"))) $
-    "takenFor" <~ ("state" ~> "nm" ~> Maybes.fromMaybe (int32 1) (Maps.lookup (var "nm") (var "state"))) $
-    -- One pass of the fixed point: within each collision group (namespaces
-    -- currently sharing an alias), only namespaces with *more* segments than
-    -- the shortest in the group grow. This realizes the "shortest module
-    -- name gets the shortest alias" rule from issue #322: e.g. for
-    -- {hydra.core, hydra.extract.core}, hydra.core stays `Core` and
-    -- hydra.extract.core grows to `ExtractCore`.
-    "growStep" <~ ("state" ~> "_ign" ~> lets [
-      -- Parallel lists of (nm, segs, n, aliasStr, segCount) per namespace.
-      "aliasEntries">: Lists.map
-        ("nm" ~> lets [
-          "segs">: var "segsFor" @@ var "nm",
-          "n">: var "takenFor" @@ var "state" @@ var "nm",
-          "segCount">: Lists.length $ var "segs",
-          "aliasStr">: unwrap H._ModuleName @@ (var "aliasFromSuffix" @@ var "segs" @@ var "n")] $
-          pair (var "nm") (pair (var "n") (pair (var "segCount") (var "aliasStr"))))
-        (var "nssAsList"),
-      -- Map alias-string -> number of namespaces producing that alias.
-      "aliasCounts">: Lists.foldl
-        ("m" ~> "e" ~> lets [
-          "k">: Pairs.second $ Pairs.second $ Pairs.second $ var "e"] $
-          Maps.insert (var "k")
-            (Math.add (int32 1) (Maybes.fromMaybe (int32 0) (Maps.lookup (var "k") (var "m"))))
-            (var "m"))
-        Maps.empty
-        (var "aliasEntries"),
-      -- Map alias-string -> smallest total segment count among colliding namespaces.
-      -- Used to identify the "winner" (shortest name) in each collision group.
-      "aliasMinSegs">: Lists.foldl
-        ("m" ~> "e" ~> lets [
-          "segCount">: Pairs.first $ Pairs.second $ Pairs.second $ var "e",
-          "k">: Pairs.second $ Pairs.second $ Pairs.second $ var "e",
-          "existing">: Maps.lookup (var "k") (var "m")] $
-          Maps.insert (var "k")
-            (Maybes.cases (var "existing")
-              (var "segCount") $
-              "prev" ~> Logic.ifElse (Equality.lt (var "segCount") (var "prev")) (var "segCount") (var "prev"))
-            (var "m"))
-        Maps.empty
-        (var "aliasEntries")] $
-      -- Map alias-string -> number of colliding namespaces tied at the minimum
-      -- segment count. If >1, every tied-minimum member must grow too (no one
-      -- can unambiguously claim the shortest alias).
-      lets [
-        "aliasMinSegsCount">: Lists.foldl
-          ("m" ~> "e" ~> lets [
-            "segCount">: Pairs.first $ Pairs.second $ Pairs.second $ var "e",
-            "k">: Pairs.second $ Pairs.second $ Pairs.second $ var "e",
-            "minSegs">: Maybes.fromMaybe (var "segCount") (Maps.lookup (var "k") (var "aliasMinSegs"))] $
-            Logic.ifElse (Equality.equal (var "segCount") (var "minSegs"))
-              (Maps.insert (var "k")
-                (Math.add (int32 1) (Maybes.fromMaybe (int32 0) (Maps.lookup (var "k") (var "m"))))
-                (var "m"))
-              (var "m"))
-          Maps.empty
-          (var "aliasEntries")] $
-      Maps.fromList $ Lists.map
-        ("e" ~> lets [
-          "nm">: Pairs.first $ var "e",
-          "n">: Pairs.first $ Pairs.second $ var "e",
-          "segCount">: Pairs.first $ Pairs.second $ Pairs.second $ var "e",
-          "aliasStr">: Pairs.second $ Pairs.second $ Pairs.second $ var "e",
-          "count">: Maybes.fromMaybe (int32 0) (Maps.lookup (var "aliasStr") (var "aliasCounts")),
-          "minSegs">: Maybes.fromMaybe (var "segCount") (Maps.lookup (var "aliasStr") (var "aliasMinSegs")),
-          "minSegsCount">: Maybes.fromMaybe (int32 0) (Maps.lookup (var "aliasStr") (var "aliasMinSegsCount")),
-          -- A namespace grows iff (1) its alias currently collides, (2) it
-          -- still has room to grow, and (3) it is strictly longer than the
-          -- shortest in its group OR the shortest position is tied (in which
-          -- case no single winner exists and every tied-minimum must grow).
-          "canGrow">: Logic.and
-            (Equality.gt (var "count") (int32 1))
-            (Logic.and
-              (Equality.gt (var "segCount") (var "n"))
-              (Logic.or
-                (Equality.gt (var "segCount") (var "minSegs"))
-                (Equality.gt (var "minSegsCount") (int32 1)))),
-          "newN">: Logic.ifElse (var "canGrow") (Math.add (var "n") (int32 1)) (var "n")] $
-          pair (var "nm") (var "newN"))
-        (var "aliasEntries")) $
-    "finalState" <~ (Lists.foldl (var "growStep") (var "initialState") (Lists.replicate (var "maxSegs") unit)) $
-    "resultMap" <~ (Maps.fromList $ Lists.map
-      ("nm" ~> pair (var "nm")
-        (var "aliasFromSuffix" @@ (var "segsFor" @@ var "nm") @@ (var "takenFor" @@ var "finalState" @@ var "nm"))) $
-      (var "nssAsList")) $
-    right $ Packaging.namespaces (var "focusPair") (var "resultMap")
-
-newtypeAccessorName :: TTermDefinition (Name -> String)
-newtypeAccessorName = haskellUtilsDefinition "newtypeAccessorName" $
-  doc "Generate an accessor name for a newtype wrapper (e.g., 'unFoo' for Foo)" $
-  "name" ~>
-    Strings.cat2 (string "un") (Names.localNameOf @@ var "name")
-
-rawName :: TTermDefinition (String -> H.Name)
-rawName = haskellUtilsDefinition "rawName" $
-  doc "Create a raw Haskell name from a string without sanitization" $
-  "n" ~>
-    inject H._Name H._Name_normal $
-      record H._QualifiedName [
-        H._QualifiedName_qualifiers>>: list ([] :: [TTerm H.NamePart]),
-        H._QualifiedName_unqualified>>: wrap H._NamePart $ var "n"]
-
-recordFieldReference :: TTermDefinition (HaskellNamespaces -> Name -> Name -> H.Name)
-recordFieldReference = haskellUtilsDefinition "recordFieldReference" $
-  doc "Generate a Haskell name for a record field accessor" $
-  "namespaces" ~> "sname" ~> "fname" ~> lets [
-    "fnameStr">: unwrap _Name @@ var "fname",
-    "qname">: Names.qualifyName @@ var "sname",
-    "ns">: Packaging.qualifiedNameNamespace $ var "qname",
-    "typeNameStr">: typeNameForRecord @@ var "sname",
-    "decapitalized">: Formatting.decapitalize @@ var "typeNameStr",
-    "capitalized">: Formatting.capitalize @@ var "fnameStr",
-    "nm">: Strings.cat2 (var "decapitalized") (var "capitalized"),
-    "qualName">: record _QualifiedName [
-      _QualifiedName_namespace>>: var "ns",
-      _QualifiedName_local>>: var "nm"],
-    "unqualName">: Names.unqualifyName @@ var "qualName"] $
-    elementReference @@ var "namespaces" @@ var "unqualName"
-
-sanitizeHaskellName :: TTermDefinition (String -> String)
-sanitizeHaskellName = haskellUtilsDefinition "sanitizeHaskellName" $
-  doc "Sanitize a string to be a valid Haskell identifier, escaping reserved words" $
-  Formatting.sanitizeWithUnderscores @@ (HaskellLanguage.reservedWords)
-
-simpleName :: TTermDefinition (String -> H.Name)
-simpleName = haskellUtilsDefinition "simpleName" $
-  doc "Create a sanitized Haskell name from a string" $
-  compose (rawName) (sanitizeHaskellName)
-
-simpleValueBinding :: TTermDefinition (H.Name -> H.Expression -> Maybe H.LocalBindings -> H.ValueBinding)
-simpleValueBinding = haskellUtilsDefinition "simpleValueBinding" $
-  doc "Create a simple value binding (e.g., 'foo = expr' or 'foo = expr where ...')" $
-  "hname" ~> "rhs" ~> "bindings" ~> lets [
-    "pat">: inject H._Pattern H._Pattern_application $
-      record H._ApplicationPattern [
-        H._ApplicationPattern_name>>: var "hname",
-        H._ApplicationPattern_args>>: list ([] :: [TTerm H.Pattern])],
-    "rightHandSide">: wrap H._RightHandSide $ var "rhs"] $
-    inject H._ValueBinding H._ValueBinding_simple $
-      record H._SimpleValueBinding [
-        H._SimpleValueBinding_pattern>>: var "pat",
-        H._SimpleValueBinding_rhs>>: var "rightHandSide",
-        H._SimpleValueBinding_localBindings>>: var "bindings"]
-
-toTypeApplication :: TTermDefinition ([H.Type] -> H.Type)
-toTypeApplication = haskellUtilsDefinition "toTypeApplication" $
-  doc "Convert a list of types into a nested type application" $
-  "types" ~> lets [
-    "dummyType">: inject H._Type H._Type_variable $ inject H._Name H._Name_normal $
-      record H._QualifiedName [
-        H._QualifiedName_qualifiers>>: list ([] :: [TTerm H.NamePart]),
-        H._QualifiedName_unqualified>>: wrap H._NamePart $ string ""],
-    "app">: "l" ~>
-      Maybes.fromMaybe (var "dummyType")
-        (Maybes.map
-          ("p" ~> Logic.ifElse (Lists.null (Pairs.second (var "p")))
-            (Pairs.first (var "p"))
-            (inject H._Type H._Type_application $ record H._ApplicationType [
-              H._ApplicationType_context>>: var "app" @@ (Pairs.second (var "p")),
-              H._ApplicationType_argument>>: Pairs.first (var "p")]))
-          (Lists.uncons (var "l")))] $
-    var "app" @@ (Lists.reverse $ var "types")
-
-typeNameForRecord :: TTermDefinition (Name -> String)
-typeNameForRecord = haskellUtilsDefinition "typeNameForRecord" $
-  doc "Extract the local type name from a fully qualified record type name" $
-  "sname" ~> lets [
-    "snameStr">: Core.unName $ var "sname",
-    "parts">: Strings.splitOn (string ".") (var "snameStr")] $
-    Maybes.fromMaybe (var "snameStr") (Lists.maybeLast (var "parts"))
-
-unionFieldReference :: TTermDefinition (S.Set Name -> HaskellNamespaces -> Name -> Name -> H.Name)
-unionFieldReference = haskellUtilsDefinition "unionFieldReference" $
-  doc "Generate a Haskell name for a union variant constructor, with disambiguation" $
-  "boundNames" ~> "namespaces" ~> "sname" ~> "fname" ~> lets [
-    "fnameStr">: unwrap _Name @@ var "fname",
-    "qname">: Names.qualifyName @@ var "sname",
-    "ns">: Packaging.qualifiedNameNamespace $ var "qname",
-    "typeNameStr">: typeNameForRecord @@ var "sname",
-    "capitalizedTypeName">: Formatting.capitalize @@ var "typeNameStr",
-    "capitalizedFieldName">: Formatting.capitalize @@ var "fnameStr",
-    "deconflict">: "name" ~> lets [
-      "tname">: Names.unqualifyName @@ record _QualifiedName [
-        _QualifiedName_namespace>>: var "ns",
-        _QualifiedName_local>>: var "name"]] $
-      Logic.ifElse (Sets.member (var "tname") (var "boundNames"))
-        (var "deconflict" @@ Strings.cat2 (var "name") (string "_"))
-        (var "name"),
-    "nm">: var "deconflict" @@ Strings.cat2 (var "capitalizedTypeName") (var "capitalizedFieldName"),
-    "qualName">: record _QualifiedName [
-      _QualifiedName_namespace>>: var "ns",
-      _QualifiedName_local>>: var "nm"],
-    "unqualName">: Names.unqualifyName @@ var "qualName"] $
-    elementReference @@ var "namespaces" @@ var "unqualName"
-
-unpackForallType :: TTermDefinition (Type -> ([Name], Type))
-unpackForallType = haskellUtilsDefinition "unpackForallType" $
-  doc "Unpack nested forall types into a list of type variables and the inner type" $
-  "t" ~> cases _Type (Strip.deannotateType @@ var "t")
-    (Just $ pair (list ([] :: [TTerm Name])) (var "t")) [
-    _Type_forall>>: "fat" ~> lets [
-      "v">: Core.forallTypeParameter $ var "fat",
-      "tbody">: Core.forallTypeBody $ var "fat",
-      "recursiveResult">: unpackForallType @@ var "tbody",
-      "vars">: Pairs.first $ var "recursiveResult",
-      "finalType">: Pairs.second $ var "recursiveResult"] $
-      pair (Lists.cons (var "v") (var "vars")) (var "finalType")]
diff --git a/src/main/haskell/Hydra/Sources/Java/Coder.hs b/src/main/haskell/Hydra/Sources/Java/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Coder.hs
+++ /dev/null
@@ -1,5319 +0,0 @@
--- | Java code generator in Hydra DSL.
--- This module provides DSL versions of Java code generation functions.
-
-module Hydra.Sources.Java.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Dependencies   as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Scoping        as Scoping
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Kernel.Terms.Analysis       as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Resolution    as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Constants       as Constants
-import qualified Hydra.Sources.Kernel.Terms.Arity           as Arity
-import qualified Hydra.Dsl.Meta.Graph                       as Graph
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import           Prelude hiding ((++))
-
-import qualified Data.Map as M
-import qualified Data.Set as S
-import Data.Coerce (coerce)
-
--- Additional imports
-import qualified Hydra.Java.Syntax as Java
-import qualified Hydra.Java.Environment as JavaHelpers
-import qualified Hydra.Dsl.Java.Helpers as JavaDsl
-import qualified Hydra.Sources.Java.Syntax as JavaSyntax
-import qualified Hydra.Sources.Java.Environment as JavaEnvironmentSource
-import qualified Hydra.Sources.Java.Language as JavaLanguageSource
-import qualified Hydra.Sources.Java.Names as JavaNamesSource
-import qualified Hydra.Sources.Java.Serde as JavaSerdeSource
-import qualified Hydra.Sources.Java.Utils as JavaUtilsSource
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
--- | Get a type annotation, converting DecodingError to InContext Error.
-getTypeE :: TTerm Context -> TTerm Graph -> TTerm (M.Map Name Term) -> TTerm (Either Error (Maybe Type))
-getTypeE cx g ann = Eithers.bimap
-  ("__de" ~> Error.errorOther (Error.otherError ((unwrap _DecodingError) @@ var "__de")))
-  ("__a" ~> var "__a")
-  (Annotations.getType @@ g @@ ann)
-
--- | Reference to the hydra.encode.core.type function (Type -> Term encoder)
-encodeTypeAsTerm :: TTerm (Type -> Term)
-encodeTypeAsTerm = TTerm $ TermVariable $ Name "hydra.encode.core.type"
-
-ns :: Namespace
-ns = Namespace "hydra.java.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [JavaUtilsSource.ns, JavaNamesSource.ns, JavaSerdeSource.ns, moduleNamespace JavaLanguageSource.module_, Analysis.ns, Checking.ns, Formatting.ns, Names.ns, Rewriting.ns, Dependencies.ns, Scoping.ns, Strip.ns, Variables.ns, Lexical.ns, Environment.ns, Predicates.ns, Resolution.ns, ShowCore.ns, Annotations.ns, Constants.ns,
-      Inference.ns, Sorting.ns, Arity.ns, moduleNamespace DecodeCore.module_, moduleNamespace EncodeCore.module_, SerializationSource.ns],
-            moduleTypeDependencies = (JavaEnvironmentSource.ns:JavaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Java code generator: converts Hydra modules to Java source code"}
-  where
-    definitions = [
-      toDefinition addComment,
-      toDefinition analyzeJavaFunction,
-      toDefinition annotateBodyWithCod,
-      toDefinition annotateLambdaArgs,
-      toDefinition applyCastIfSafe,
-      toDefinition applyJavaArg,
-      toDefinition applyOvergenSubstToTermAnnotations,
-      toDefinition applyOvergenSubstToTermAnnotations_go,
-      toDefinition applySubstFull,
-      toDefinition applySubstSimple,
-      toDefinition arraysCompareExpr,
-      toDefinition arraysEqualsClause,
-      toDefinition augmentVariantClass,
-      toDefinition bindingIsFunctionType,
-      toDefinition bindingNameToFilePath,
-      toDefinition bindingsToStatements,
-      toDefinition boundTypeVariables,
-      toDefinition buildArgSubst,
-      toDefinition buildCurriedLambda,
-      toDefinition buildSubstFromAnnotations,
-      toDefinition buildSubstFromAnnotations_go,
-      toDefinition buildTypeSubst,
-      toDefinition buildTypeSubst_go,
-      toDefinition buildTypeVarSubst,
-      toDefinition buildTypeVarSubst_go,
-      toDefinition classModsPublic,
-      toDefinition classifyDataReference,
-      toDefinition classifyDataTerm,
-      toDefinition classifyDataTerm_countLambdaParams,
-      toDefinition classifyDataTerm_stripTypeLambdas,
-      toDefinition cmpDeclStatement,
-      toDefinition cmpNotZeroExpr,
-      toDefinition collectForallParams,
-      toDefinition collectLambdaDomains,
-      toDefinition collectTypeApps,
-      toDefinition collectTypeApps0,
-      toDefinition collectTypeVars,
-      toDefinition collectTypeVars_go,
-      toDefinition comparableCompareExpr,
-      toDefinition compareAndReturnStmts,
-      toDefinition compareFieldExpr,
-      toDefinition compareToBody,
-      toDefinition compareToZeroClause,
-      toDefinition constantDecl,
-      toDefinition constantDeclForFieldType,
-      toDefinition constantDeclForTypeName,
-      toDefinition constructElementsInterface,
-      toDefinition correctCastType,
-      toDefinition correctTypeApps,
-      toDefinition correctTypeAppsWithArgs,
-      toDefinition countFunctionParams,
-      toDefinition declarationForRecordType,
-      toDefinition declarationForRecordType',
-      toDefinition declarationForUnionType,
-      toDefinition decodeTypeFromTerm,
-      toDefinition dedupBindings,
-      toDefinition detectAccumulatorUnification,
-      toDefinition directRefSubstitution,
-      toDefinition directRefSubstitution_processGroup,
-      toDefinition domTypeArgs,
-      toDefinition elementJavaIdentifier,
-      toDefinition elementJavaIdentifier_qualify,
-      toDefinition elementsClassName,
-      toDefinition elementsQualifiedName,
-      toDefinition encodeApplication,
-      toDefinition encodeApplication_fallback,
-      toDefinition encodeDefinitions,
-      toDefinition encodeElimination,
-      toDefinition encodeFunction,
-      toDefinition encodeFunctionFormTerm,
-      toDefinition encodeFunctionPrimitiveByName,
-      toDefinition encodeLiteral,
-      toDefinition encodeLiteralType,
-      toDefinition encodeLiteralType_simple,
-      toDefinition encodeLiteral_encodeFloat,
-      toDefinition encodeLiteral_encodeFloat32,
-      toDefinition encodeLiteral_encodeFloat64,
-      toDefinition encodeLiteral_encodeInteger,
-      toDefinition encodeLiteral_javaParseDouble,
-      toDefinition encodeLiteral_javaSpecialFloatExpr,
-      toDefinition encodeLiteral_litExp,
-      toDefinition encodeLiteral_primCast,
-      toDefinition encodeNullaryConstant,
-      toDefinition encodeNullaryConstant_typeArgsFromReturnType,
-      toDefinition encodeNullaryPrimitiveByName,
-      toDefinition encodeTerm,
-      toDefinition encodeTermDefinition,
-      toDefinition encodeTermInternal,
-      toDefinition encodeTermTCO,
-      toDefinition encodeType,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeType_resolveIfTypedef,
-      toDefinition encodeVariable,
-      toDefinition encodeVariable_buildCurried,
-      toDefinition encodeVariable_hoistedLambdaCase,
-      toDefinition eqClause,
-      toDefinition equalsClause,
-      toDefinition extractArgType,
-      toDefinition extractDirectReturn,
-      toDefinition extractDirectReturn_go,
-      toDefinition extractInOutPair,
-      toDefinition extractTypeApplicationArgs,
-      toDefinition extractTypeApplicationArgs_go,
-      toDefinition fieldTypeToFormalParam,
-      toDefinition filterByFlags,
-      toDefinition filterPhantomTypeArgs,
-      toDefinition filterPhantomTypeArgs_filterAndApply,
-      toDefinition findMatchingLambdaVar,
-      toDefinition findPairFirst,
-      toDefinition findSelfRefVar,
-      toDefinition first20Primes,
-      toDefinition flattenApps,
-      toDefinition flattenBindings,
-      toDefinition freshJavaName,
-      toDefinition freshJavaName_go,
-      toDefinition functionCall,
-      toDefinition getCodomain,
-      toDefinition getFunctionType,
-      toDefinition groupPairsByFirst,
-      toDefinition hashCodeCompareExpr,
-      toDefinition hashCodeMultPair,
-      toDefinition innerClassRef,
-      toDefinition insertBranchVar,
-      toDefinition interfaceTypes,
-      toDefinition isBigNumericType,
-      toDefinition isBinaryType,
-      toDefinition isFieldUnitType,
-      toDefinition isLambdaBoundIn,
-      toDefinition isLambdaBoundIn_isQualified,
-      toDefinition isLambdaBoundVariable,
-      toDefinition isLocalVariable,
-      toDefinition isNonComparableType,
-      toDefinition isRecursiveVariable,
-      toDefinition isSerializableJavaType,
-      toDefinition isSimpleName,
-      toDefinition isUnresolvedInferenceVar,
-      toDefinition isUnresolvedInferenceVar_isDigit,
-      toDefinition java11Features,
-      toDefinition java8Features,
-      toDefinition javaComparableRefType,
-      toDefinition javaEnvGetGraph,
-      toDefinition javaEnvSetGraph,
-      toDefinition javaFeatures,
-      toDefinition javaIdentifierToString,
-      toDefinition javaTypeArgumentsForNamedType,
-      toDefinition javaTypeArgumentsForType,
-      toDefinition javaTypeParametersForType,
-      toDefinition javaTypeParametersForType_bvars,
-      toDefinition moduleToJava,
-      toDefinition nameMapToTypeMap,
-      toDefinition namespaceParent,
-      toDefinition needsThunking,
-      toDefinition noComment,
-      toDefinition otherwiseBranch,
-      toDefinition peelDomainTypes,
-      toDefinition peelDomainsAndCod,
-      toDefinition peelExpectedTypes,
-      toDefinition propagateType,
-      toDefinition propagateType_propagateIntoLambda,
-      toDefinition propagateType_rebuildLet,
-      toDefinition propagateTypesInAppChain,
-      toDefinition rebuildApps,
-      toDefinition recordCompareToMethod,
-      toDefinition recordConstructor,
-      toDefinition recordEqualsMethod,
-      toDefinition recordHashCodeMethod,
-      toDefinition recordMemberVar,
-      toDefinition recordWithMethod,
-      toDefinition resolveTypeApps,
-      toDefinition selfRefSubstitution,
-      toDefinition selfRefSubstitution_processGroup,
-      toDefinition serializableTypes,
-      toDefinition splitConstantInitializer,
-      toDefinition splitConstantInitializer_splitVar,
-      toDefinition stripForalls,
-      toDefinition substituteTypeVarsWithTypes,
-      toDefinition substituteTypeVarsWithTypes_go,
-      toDefinition tagCmpNotZeroExpr,
-      toDefinition tagCompareExpr,
-      toDefinition takeTypeArgs,
-      toDefinition toClassDecl,
-      toDefinition toDeclInit,
-      toDefinition toDeclStatement,
-      toDefinition tryInferFunctionType,
-      toDefinition typeAppFallbackCast,
-      toDefinition typeAppNullaryOrHoisted,
-      toDefinition typeArgsOrDiamond,
-      toDefinition typesMatch,
-      toDefinition unwrapReturnType,
-      toDefinition variantCompareToMethod,
-      toDefinition visitBranch,
-      toDefinition withLambda,
-      toDefinition withTypeLambda,
-      toDefinition wrapInSupplierLambda,
-      toDefinition wrapLazyArguments]
-
--- | Helper: coerce bigint to int for javaInt/javaIntExpression TTermDefinition (phantom type mismatch workaround)
-bigintAsInt :: TTerm Integer -> TTerm Int
-bigintAsInt = coerce
-
--- | Add a comment from a FieldType to a class body declaration
-addComment :: TTermDefinition (Java.ClassBodyDeclaration -> FieldType -> Context -> Graph -> Either Error Java.ClassBodyDeclarationWithComments)
-addComment = def "addComment" $
-  lambda "decl" $ lambda "field" $
-        "cx" ~> "g" ~>
-        Eithers.map
-          (lambda "c" $ JavaDsl.classBodyDeclarationWithComments (var "decl") (var "c"))
-          (Annotations.commentsFromFieldType @@ var "cx" @@ var "g" @@ var "field")
-
--- | Analyze a Java function term, collecting lambdas, type lambdas, lets, and type applications
-analyzeJavaFunction :: TTermDefinition (JavaHelpers.JavaEnvironment -> Term -> Context -> Graph -> Either Error (FunctionStructure JavaHelpers.JavaEnvironment))
-analyzeJavaFunction = def "analyzeJavaFunction" $
-  lambda "env" $ lambda "term" $
-    "cx" ~> "g" ~>
-    Analysis.analyzeFunctionTerm @@ var "cx" @@ javaEnvGetGraph @@ javaEnvSetGraph @@ var "env" @@ var "term"
-
--- | Annotate a term body with the expected codomain type, propagating through
--- applications so that inner type-applied subterms also get correct annotations.
-annotateBodyWithCod :: TTermDefinition (Type -> Term -> Term)
-annotateBodyWithCod = def "annotateBodyWithCod" $
-  lambda "typ" $ lambda "term" $
-    "setAnn" <~ (lambda "t" $
-      Annotations.setTermAnnotation @@ asTerm Constants.key_type
-        @@ just (encodeTypeAsTerm @@ var "typ")
-        @@ var "t") $
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just $ var "setAnn" @@ var "term") [
-      -- For type applications, annotate the whole thing with the expected type
-      _Term_typeApplication>>: lambda "_ta" $
-        var "setAnn" @@ var "term",
-      -- For applications, annotate the application with the overall type,
-      -- and also annotate arguments that have type applications
-      _Term_application>>: lambda "app" $
-        "lhs" <~ Core.applicationFunction (var "app") $
-        "rhs" <~ Core.applicationArgument (var "app") $
-        "annotatedRhs" <~ cases _Term (Strip.deannotateTerm @@ var "rhs")
-          (Just $ var "rhs") [
-          _Term_typeApplication>>: lambda "_ta2" $
-            annotateBodyWithCod @@ (extractArgType @@ var "lhs" @@ var "typ") @@ var "rhs"] $
-        var "setAnn" @@ (inject _Term _Term_application (record _Application [
-          _Application_function>>: var "lhs",
-          _Application_argument>>: var "annotatedRhs"]))]
-
--- | Annotate lambda arguments with expected types computed from the callee's type scheme
--- and type applications. This corrects type annotations that normalizeTypeVariablesInTerm
--- may have made inconsistent with the outer scope.
-annotateLambdaArgs :: TTermDefinition (Name -> [Type] -> [Term] -> Context -> Graph -> Either Error [Term])
-annotateLambdaArgs = def "annotateLambdaArgs" $
-  lambda "cname" $ lambda "tApps" $ lambda "argTerms" $
-    "cx" ~> "g" ~>
-    Logic.ifElse (Lists.null (var "tApps"))
-      (right (var "argTerms"))
-      -- Look up the type scheme from either elements or primitives
-      ("mts" <<~ (
-        "mel" <<~ right (Lexical.lookupBinding @@ var "g" @@ var "cname") $
-        Maybes.cases (var "mel")
-          (right (Maybes.map
-              (lambda "prim" $ Graph.primitiveTypeScheme (var "prim"))
-              (Maps.lookup (var "cname") (Graph.graphPrimitives (var "g")))))
-          (lambda "el" $ right (Core.bindingTypeScheme (var "el")))) $
-      Maybes.cases (var "mts")
-        (right (var "argTerms"))
-        (lambda "ts" $
-          "schemeType" <~ Core.typeSchemeBody (var "ts") $
-          "schemeTypeVars" <~ (collectTypeVars @@ var "schemeType") $
-          "schemeVars" <~ Lists.filter
-            (lambda "v" $ Sets.member (var "v") (var "schemeTypeVars"))
-            (Core.typeSchemeVariables (var "ts")) $
-          Logic.ifElse (Logic.or (Lists.null (var "schemeVars"))
-              (Logic.not (Equality.equal (Lists.length (var "schemeVars")) (Lists.length (var "tApps")))))
-            (right (var "argTerms"))
-            ("subst" <~ Maps.fromList (Lists.zip (var "schemeVars") (var "tApps")) $
-              "expectedTypes" <~ (peelExpectedTypes @@ var "subst" @@ Lists.length (var "argTerms") @@ var "schemeType") $
-              right (Lists.zipWith
-                (lambda "arg" $ lambda "mExpected" $ propagateType @@ var "mExpected" @@ var "arg")
-                (var "argTerms")
-                (Lists.concat2 (var "expectedTypes")
-                  (Lists.replicate (Lists.length (var "argTerms")) (inject _Type _Type_variable (wrap _Name (string "unused")))))))))
-
--- | Apply a lambda cast if the type is safe (doesn't contain potentially wrong type variables).
-applyCastIfSafe :: TTermDefinition (JavaHelpers.Aliases -> Type -> Java.Expression -> Context -> Graph -> Either Error Java.Expression)
-applyCastIfSafe = def "applyCastIfSafe" $
-  lambda "aliases" $ lambda "castType" $ lambda "expr" $
-    "cx" ~> "g" ~>
-    "trusted" <~ (project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases") $
-    "inScope" <~ (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases") $
-    "castVars" <~ (collectTypeVars @@ var "castType") $
-    "javaTypeVars" <~ Sets.fromList (Lists.filter
-      (lambda "v" $ Logic.or
-        (Sets.member (var "v") (var "inScope"))
-        (isLambdaBoundVariable @@ var "v"))
-      (Sets.toList (var "castVars"))) $
-    "isSafe" <~ Logic.or (Sets.null (var "trusted"))
-      (Logic.or (Sets.null (var "javaTypeVars"))
-        (Sets.null (Sets.difference (var "javaTypeVars") (var "trusted")))) $
-    Logic.ifElse (var "isSafe")
-      ("jtype" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "castType" @@ var "cx" @@ var "g") $
-       "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jtype" @@ var "cx") $
-       right (JavaUtilsSource.javaCastExpressionToJavaExpression @@
-         (JavaUtilsSource.javaCastExpression @@ var "rt" @@
-           (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "expr"))))
-      (right (var "expr"))
-
--- | Apply a Java argument to a Java expression using .apply() method invocation.
-applyJavaArg :: TTermDefinition (Java.Expression -> Java.Expression -> Java.Expression)
-applyJavaArg = def "applyJavaArg" $
-  lambda "expr" $ lambda "jarg" $
-    JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-      (JavaUtilsSource.methodInvocation @@ just (right
-        (JavaUtilsSource.javaExpressionToJavaPrimary @@ var "expr"))
-        @@ JavaDsl.identifier (asTerm JavaNamesSource.applyMethodName)
-        @@ list [var "jarg"])
-
--- | Apply a type substitution to all type annotations in a term.
--- Monadic wrapper that gets the graph state and delegates to the pure helper.
-applyOvergenSubstToTermAnnotations :: TTermDefinition (M.Map Name Type -> Term -> Context -> Graph -> Either Error Term)
-applyOvergenSubstToTermAnnotations = def "applyOvergenSubstToTermAnnotations" $
-  lambda "subst" $ lambda "term0" $
-    "cx" ~> "g" ~>
-    right (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "g" @@ var "term0")
-
--- | Recursive helper for applyOvergenSubstToTermAnnotations. Walks a term and applies
--- a type substitution to all type annotations. Also updates lambda domains and type applications.
--- Pure function: takes the substitution, graph context, and term directly.
-applyOvergenSubstToTermAnnotations_go :: TTermDefinition (M.Map Name Type -> Graph -> Term -> Term)
-applyOvergenSubstToTermAnnotations_go = def "applyOvergenSubstToTermAnnotations_go" $
-  lambda "subst" $ lambda "cx" $ lambda "term" $
-    cases _Term (var "term")
-      (Just $ var "term") [
-      _Term_annotated>>: lambda "at" $
-        "inner" <~ Core.annotatedTermBody (var "at") $
-        "ann" <~ Core.annotatedTermAnnotation (var "at") $
-        "ann'" <~ Maybes.cases (Maps.lookup Constants.key_type (var "ann"))
-          (var "ann")
-          (lambda "typeTerm" $
-            Eithers.either_
-              (lambda "_" $ var "ann")
-              (lambda "t" $
-                "t'" <~ (substituteTypeVarsWithTypes @@ var "subst" @@ var "t") $
-                Maps.insert (asTerm Constants.key_type) (Phantoms.encoderFor _Type @@ var "t'") (var "ann"))
-              (Phantoms.decoderFor _Type @@ var "cx" @@ var "typeTerm")) $
-        Core.termAnnotated (Core.annotatedTerm
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ var "inner")
-          (var "ann'")),
-      _Term_application>>: lambda "app" $
-        Core.termApplication (Core.application
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ Core.applicationFunction (var "app"))
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ Core.applicationArgument (var "app"))),
-      _Term_lambda>>: lambda "lam" $
-        Core.termLambda (Core.lambda
-          (Core.lambdaParameter (var "lam"))
-          (Maybes.map (lambda "d" $ substituteTypeVarsWithTypes @@ var "subst" @@ var "d") (Core.lambdaDomain (var "lam")))
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ Core.lambdaBody (var "lam"))),
-      _Term_cases>>: lambda "cs" $
-        Core.termCases (Core.caseStatement
-          (Core.caseStatementTypeName (var "cs"))
-          (Maybes.map (lambda "d" $ applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ var "d") (Core.caseStatementDefault (var "cs")))
-          (Lists.map (lambda "fld" $ Core.field (Core.fieldName (var "fld")) (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ Core.fieldTerm (var "fld"))) (Core.caseStatementCases (var "cs")))),
-      _Term_let>>: lambda "lt" $
-        Core.termLet (Core.let_
-          (Lists.map (lambda "b" $ Core.binding (Core.bindingName (var "b")) (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ Core.bindingTerm (var "b")) (Core.bindingTypeScheme (var "b"))) (Core.letBindings (var "lt")))
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx" @@ Core.letBody (var "lt"))),
-      _Term_typeApplication>>: lambda "ta" $
-        Core.termTypeApplication (Core.typeApplicationTerm
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx"
-            @@ Core.typeApplicationTermBody (var "ta"))
-          (substituteTypeVarsWithTypes @@ var "subst"
-            @@ Core.typeApplicationTermType (var "ta"))),
-      _Term_typeLambda>>: lambda "tl" $
-        Core.termTypeLambda (Core.typeLambda
-          (Core.typeLambdaParameter (var "tl"))
-          (applyOvergenSubstToTermAnnotations_go @@ var "subst" @@ var "cx"
-            @@ Core.typeLambdaBody (var "tl")))]
-
--- | Recursively apply a type substitution
-applySubstFull :: TTermDefinition (M.Map Name Type -> Type -> Type)
-applySubstFull = def "applySubstFull" $
-  lambda "s" $ lambda "t" $ cases _Type (Strip.deannotateType @@ var "t")
-    (Just $ var "t") [
-    _Type_variable>>: lambda "v" $
-      Maps.findWithDefault (var "t") (var "v") (var "s"),
-    _Type_function>>: lambda "ft" $
-      Core.typeFunction (Core.functionType
-        (applySubstFull @@ var "s" @@ Core.functionTypeDomain (var "ft"))
-        (applySubstFull @@ var "s" @@ Core.functionTypeCodomain (var "ft"))),
-    _Type_application>>: lambda "at" $
-      Core.typeApplication (Core.applicationType
-        (applySubstFull @@ var "s" @@ Core.applicationTypeFunction (var "at"))
-        (applySubstFull @@ var "s" @@ (project _ApplicationType _ApplicationType_argument @@ var "at"))),
-    _Type_list>>: lambda "inner" $
-      Core.typeList (applySubstFull @@ var "s" @@ var "inner"),
-    _Type_set>>: lambda "inner" $
-      Core.typeSet (applySubstFull @@ var "s" @@ var "inner"),
-    _Type_maybe>>: lambda "inner" $
-      Core.typeMaybe (applySubstFull @@ var "s" @@ var "inner"),
-    _Type_map>>: lambda "mt" $
-      Core.typeMap (Core.mapType
-        (applySubstFull @@ var "s" @@ Core.mapTypeKeys (var "mt"))
-        (applySubstFull @@ var "s" @@ Core.mapTypeValues (var "mt"))),
-    _Type_pair>>: lambda "pt" $
-      Core.typePair (Core.pairType
-        (applySubstFull @@ var "s" @@ Core.pairTypeFirst (var "pt"))
-        (applySubstFull @@ var "s" @@ Core.pairTypeSecond (var "pt"))),
-    _Type_either>>: lambda "et" $
-      Core.typeEither (Core.eitherType
-        (applySubstFull @@ var "s" @@ Core.eitherTypeLeft (var "et"))
-        (applySubstFull @@ var "s" @@ Core.eitherTypeRight (var "et"))),
-    _Type_forall>>: lambda "ft" $
-      Core.typeForall (Core.forallType
-        (Core.forallTypeParameter (var "ft"))
-        (applySubstFull @@ (Maps.delete (Core.forallTypeParameter (var "ft")) (var "s"))
-          @@ Core.forallTypeBody (var "ft")))]
-
--- | Simple top-level-only type variable substitution.
-applySubstSimple :: TTermDefinition (M.Map Name Type -> Type -> Type)
-applySubstSimple = def "applySubstSimple" $
-  lambda "subst" $ lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ var "t") [
-      _Type_variable>>: lambda "v" $
-        Maps.findWithDefault (var "t") (var "v") (var "subst")]
-
--- | Shared helper: java.util.Arrays.compare(this.field, otherVar.field)
-arraysCompareExpr :: TTermDefinition (String -> String -> Java.Expression)
-arraysCompareExpr = def "arraysCompareExpr" $
-  lambda "otherVar" $ lambda "fname" $ lets [
-    "header">: JavaDsl.methodInvocationHeaderComplex
-      (JavaDsl.methodInvocationComplex
-        (JavaDsl.methodInvocationVariantType (JavaUtilsSource.javaTypeName @@ wrap Java._Identifier (string "java.util.Arrays")))
-        (list ([] :: [TTerm Java.TypeArgument]))
-        (wrap Java._Identifier (string "compare"))),
-    "arg1">: JavaUtilsSource.javaExpressionNameToJavaExpression @@
-      (JavaDsl.expressionName nothing (wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ var "fname"))),
-    "arg2">: JavaUtilsSource.javaExpressionNameToJavaExpression @@
-      (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.javaIdentifier @@ var "otherVar") @@ (JavaUtilsSource.javaIdentifier @@ var "fname"))] $
-    JavaUtilsSource.javaMethodInvocationToJavaExpression @@ (JavaDsl.methodInvocation_ (var "header") (list [var "arg1", var "arg2"]))
-
--- | java.util.Arrays.equals(this.field, other.field) for byte[] fields
-arraysEqualsClause :: TTermDefinition (String -> String -> Java.InclusiveOrExpression)
-arraysEqualsClause = def "arraysEqualsClause" $
-  lambda "tmpName" $ lambda "fname" $ lets [
-    "thisArg">: JavaUtilsSource.javaExpressionNameToJavaExpression
-      @@ (JavaUtilsSource.fieldExpression @@ wrap Java._Identifier (string "this")
-        @@ (JavaUtilsSource.javaIdentifier @@ var "fname")),
-    "otherArg">: JavaUtilsSource.javaExpressionNameToJavaExpression
-      @@ (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.javaIdentifier @@ var "tmpName")
-        @@ (JavaUtilsSource.javaIdentifier @@ var "fname")),
-    "header">: JavaDsl.methodInvocationHeaderComplex
-      (JavaDsl.methodInvocationComplex
-        (JavaDsl.methodInvocationVariantType (JavaUtilsSource.javaTypeName @@ wrap Java._Identifier (string "java.util.Arrays")))
-        (list ([] :: [TTerm Java.TypeArgument]))
-        (wrap Java._Identifier (asTerm JavaNamesSource.equalsMethodName)))] $
-    JavaUtilsSource.javaPostfixExpressionToJavaInclusiveOrExpression
-      @@ (JavaUtilsSource.javaMethodInvocationToJavaPostfixExpression
-        @@ (JavaDsl.methodInvocation_ (var "header") (list [var "thisArg", var "otherArg"])))
-
--- | Augment a variant class declaration for union types.
--- Adds public static final modifiers, sets parent class extends, and adds accept method.
-augmentVariantClass :: TTermDefinition (JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> Java.ClassDeclaration -> Java.ClassDeclaration)
-augmentVariantClass = def "augmentVariantClass" $
-  lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "cd" $
-    cases Java._ClassDeclaration (var "cd")
-      (Just $ var "cd") [
-      Java._ClassDeclaration_normal>>: lambda "ncd" $
-        "args" <~ Lists.map (lambda "tp" $ JavaUtilsSource.typeParameterToTypeArgument @@ var "tp") (var "tparams") $
-        "extendsPart" <~ (JavaUtilsSource.nameToJavaClassType @@ var "aliases" @@ true @@ var "args" @@ var "elName" @@ nothing) $
-        "newMods" <~ list [
-          inject Java._ClassModifier Java._ClassModifier_public unit,
-          inject Java._ClassModifier Java._ClassModifier_static unit,
-          inject Java._ClassModifier Java._ClassModifier_final unit] $
-        "oldBody" <~ project Java._NormalClassDeclaration Java._NormalClassDeclaration_body @@ var "ncd" $
-        "oldDecls" <~ (unwrap Java._ClassBody @@ var "oldBody") $
-        "acceptDecl" <~ (noComment @@ (JavaUtilsSource.toAcceptMethod @@ false @@ var "tparams")) $
-        "newBody" <~ wrap Java._ClassBody (Lists.concat2 (var "oldDecls") (list [var "acceptDecl"])) $
-        inject Java._ClassDeclaration Java._ClassDeclaration_normal (record Java._NormalClassDeclaration [
-          Java._NormalClassDeclaration_modifiers>>: var "newMods",
-          Java._NormalClassDeclaration_identifier>>:
-            project Java._NormalClassDeclaration Java._NormalClassDeclaration_identifier @@ var "ncd",
-          Java._NormalClassDeclaration_parameters>>: var "tparams",
-          Java._NormalClassDeclaration_extends>>: just (var "extendsPart"),
-          Java._NormalClassDeclaration_implements>>:
-            project Java._NormalClassDeclaration Java._NormalClassDeclaration_implements @@ var "ncd",
-          Java._NormalClassDeclaration_body>>: var "newBody"])]
-
--- | Check if a Binding has function type.
-bindingIsFunctionType :: TTermDefinition (Binding -> Bool)
-bindingIsFunctionType = def "bindingIsFunctionType" $
-  lambda "b" $
-    Maybes.maybe
-      -- No type scheme: check term structure
-      (cases _Term (Strip.deannotateTerm @@ Core.bindingTerm (var "b"))
-        (Just $ boolean False) [
-        _Term_lambda>>: lambda "_f" $ boolean True,
-        _Term_project>>: lambda "_f" $ boolean True,
-        _Term_cases>>: lambda "_f" $ boolean True,
-        _Term_unwrap>>: lambda "_f" $ boolean True])
-      -- Has type scheme: check type
-      (lambda "ts" $
-        cases _Type (Strip.deannotateType @@ Core.typeSchemeBody (var "ts"))
-          (Just $ boolean False) [
-          _Type_function>>: lambda "_ft" $ boolean True,
-          _Type_forall>>: lambda "fa" $
-            cases _Type (Strip.deannotateType @@ Core.forallTypeBody (var "fa"))
-              (Just $ boolean False) [
-              _Type_function>>: lambda "_ft2" $ boolean True]])
-      (Core.bindingTypeScheme (var "b"))
-
--- | Decode a Type from its term encoding (limited subset).
-
-bindingNameToFilePath :: TTermDefinition (Name -> String)
-bindingNameToFilePath = def "bindingNameToFilePath" $
-  lambda "name" $ lets [
-    "qn">: Names.qualifyName @@ var "name",
-    "ns_">: Packaging.qualifiedNameNamespace (var "qn"),
-    "local">: Packaging.qualifiedNameLocal (var "qn"),
-    "sanitized">: Formatting.sanitizeWithUnderscores @@ JavaLanguageSource.reservedWords @@ var "local",
-    "unq">: Names.unqualifyName @@ Packaging.qualifiedName (var "ns_") (var "sanitized")] $
-    Names.nameToFilePath @@ Util.caseConventionCamel @@ Util.caseConventionPascal
-      @@ wrap _FileExtension (string "java") @@ var "unq"
-
--- | Convert let-bindings to Java block statements.
-bindingsToStatements :: TTermDefinition (JavaHelpers.JavaEnvironment -> [Binding] -> Context -> Graph -> Either Error ([Java.BlockStatement], JavaHelpers.JavaEnvironment))
-bindingsToStatements = def "bindingsToStatements" $
-  lambda "env" $ lambda "bindings" $
-    "cx" ~> "g0" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    "g" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env") $
-    -- Flatten nested lets then deduplicate names
-    "flatBindings" <~ (dedupBindings @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases")
-      @@ (flattenBindings @@ var "bindings")) $
-    -- Extend Graph with flattened bindings
-    "gExtended" <~ (Scoping.extendGraphForLet @@ ("g" ~> "b" ~> Logic.ifElse (Predicates.isComplexBinding @@ var "g" @@ var "b") (just MetaTerms.true) nothing) @@ var "g"
-      @@ record _Let [
-        _Let_bindings>>: var "flatBindings",
-        _Let_body>>: inject _Term _Term_variable (wrap _Name (string "dummy"))]) $
-    -- Compute binding vars
-    "bindingVars" <~ Sets.fromList (Lists.map (lambda "b" $ Core.bindingName (var "b")) (var "flatBindings")) $
-    -- Build dependency graph
-    "allDeps" <~ Maps.fromList (Lists.map
-      (lambda "b" $
-        "key" <~ Core.bindingName (var "b") $
-        "deps" <~ Sets.intersection (var "bindingVars") (Variables.freeVariablesInTerm @@ Core.bindingTerm (var "b")) $
-        pair (var "key") (var "deps"))
-      (var "flatBindings")) $
-    -- Topological sort for correct declaration order
-    "sorted" <~ (Sorting.topologicalSortComponents @@
-      (Lists.map (lambda "entry" $
-        "key" <~ Pairs.first (var "entry") $
-        "deps" <~ Pairs.second (var "entry") $
-        pair (var "key") (Sets.toList (var "deps")))
-        (Maps.toList (var "allDeps")))) $
-    -- Identify recursive bindings
-    "recursiveVars" <~ Sets.fromList (Lists.concat (Lists.map
-      (lambda "names" $
-        Logic.ifElse (Equality.equal (Lists.length (var "names")) (int32 1))
-          (Maybes.maybe
-            (list ([] :: [TTerm Name]))
-            (lambda "singleName" $
-              Maybes.cases (Maps.lookup (var "singleName") (var "allDeps"))
-                (list ([] :: [TTerm Name]))
-                (lambda "deps" $
-                  Logic.ifElse (Sets.member (var "singleName") (var "deps"))
-                    (list [var "singleName"])
-                    (list ([] :: [TTerm Name]))))
-            (Lists.maybeHead (var "names")))
-          (var "names"))
-      (var "sorted"))) $
-    -- Identify thunked vars
-    "thunkedVars" <~ Sets.fromList (Lists.concat (Lists.map
-      (lambda "b" $
-        "bname" <~ Core.bindingName (var "b") $
-        Logic.ifElse (Logic.and
-          (Logic.not (Sets.member (var "bname") (var "recursiveVars")))
-          (Logic.and
-            (needsThunking @@ Core.bindingTerm (var "b"))
-            (Logic.not (bindingIsFunctionType @@ var "b"))))
-          (list [var "bname"])
-          (list ([] :: [TTerm Name])))
-      (var "flatBindings"))) $
-    -- Build extended aliases
-    "aliasesExtended" <~ (record JavaHelpers._Aliases [
-      JavaHelpers._Aliases_currentNamespace>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases",
-      JavaHelpers._Aliases_packages>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases",
-      JavaHelpers._Aliases_branchVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases",
-      JavaHelpers._Aliases_recursiveVars>>:
-        Sets.union (project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases") (var "recursiveVars"),
-      JavaHelpers._Aliases_inScopeTypeParams>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases",
-      JavaHelpers._Aliases_polymorphicLocals>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases",
-      JavaHelpers._Aliases_inScopeJavaVars>>:
-        Sets.union (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases") (var "bindingVars"),
-      JavaHelpers._Aliases_varRenames>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases",
-      JavaHelpers._Aliases_lambdaVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases",
-      JavaHelpers._Aliases_typeVarSubst>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases",
-      JavaHelpers._Aliases_trustedTypeVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases",
-      JavaHelpers._Aliases_methodCodomain>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_methodCodomain @@ var "aliases",
-      JavaHelpers._Aliases_thunkedVars>>:
-        Sets.union (project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases") (var "thunkedVars")]) $
-    -- Build extended environment
-    "envExtended" <~ (record JavaHelpers._JavaEnvironment [
-      JavaHelpers._JavaEnvironment_aliases>>: var "aliasesExtended",
-      JavaHelpers._JavaEnvironment_graph>>: var "gExtended"]) $
-    -- Generate statements
-    Logic.ifElse (Lists.null (var "bindings"))
-      (right (pair (list ([] :: [TTerm Java.BlockStatement])) (var "envExtended")))
-      ("groups" <<~ (Eithers.mapList
-        (lambda "names" $
-          -- For each group: generate init statements (for recursive vars) and decl statements
-          "inits" <<~ (Eithers.mapList (lambda "n" $ toDeclInit @@ var "aliasesExtended" @@ var "gExtended" @@ var "recursiveVars" @@ var "flatBindings" @@ var "n" @@ var "cx" @@ var "g") (var "names")) $
-          "decls" <<~ (Eithers.mapList (lambda "n" $ toDeclStatement @@ var "envExtended" @@ var "aliasesExtended" @@ var "gExtended" @@ var "recursiveVars" @@ var "thunkedVars" @@ var "flatBindings" @@ var "n" @@ var "cx" @@ var "g") (var "names")) $
-          right (Lists.concat2 (Maybes.cat (var "inits")) (var "decls")))
-        (var "sorted")) $
-        right (pair (Lists.concat (var "groups")) (var "envExtended")))
-
--- | Dispatch type to class declaration.
-
-boundTypeVariables :: TTermDefinition (Type -> [Name])
-boundTypeVariables = def "boundTypeVariables" $
-  lambda "typ" $ cases _Type (var "typ")
-    (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: lambda "at" $
-      boundTypeVariables @@ (Core.annotatedTypeBody (var "at")),
-    _Type_forall>>: lambda "ft" $
-      Lists.cons
-        (Core.forallTypeParameter (var "ft"))
-        (boundTypeVariables @@ (Core.forallTypeBody (var "ft")))]
-
--- | Build a type substitution from scheme domain types and actual argument types.
-buildArgSubst :: TTermDefinition (S.Set Name -> [Type] -> [Type] -> M.Map Name Type)
-buildArgSubst = def "buildArgSubst" $
-  lambda "schemeVarSet" $ lambda "schemeDoms" $ lambda "argTypes" $
-    Maps.fromList (Lists.bind
-      (Lists.zip (var "schemeDoms") (var "argTypes"))
-      (lambda "p" $
-        "sdom" <~ Pairs.first (var "p") $
-        "argType" <~ Pairs.second (var "p") $
-        cases _Type (Strip.deannotateType @@ var "sdom")
-          (Just $ list ([] :: [TTerm (Name, Type)])) [
-          _Type_variable>>: lambda "v" $
-            Logic.ifElse
-              (Sets.member (var "v") (var "schemeVarSet"))
-              (list [pair (var "v") (var "argType")])
-              (list ([] :: [TTerm (Name, Type)]))]))
-
--- | Build a curried lambda chain from a list of parameter names wrapping an inner expression.
--- E.g., buildCurriedLambda [p0, p1] inner = javaLambda p0 (javaLambda p1 inner)
-buildCurriedLambda :: TTermDefinition ([Name] -> Java.Expression -> Java.Expression)
-buildCurriedLambda = def "buildCurriedLambda" $
-  lambda "params" $ lambda "inner" $
-    Lists.foldl
-      (lambda "acc" $ lambda "p" $ JavaUtilsSource.javaLambda @@ var "p" @@ var "acc")
-      (var "inner")
-      (Lists.reverse (var "params"))
-
--- | Build a type variable substitution by walking a term and comparing lambda domain types
--- against annotation map types. Returns a Map Name Name (fresh→canonical mapping).
-buildSubstFromAnnotations :: TTermDefinition (S.Set Name -> Term -> Context -> Graph -> Either Error (M.Map Name Name))
-buildSubstFromAnnotations = def "buildSubstFromAnnotations" $
-  lambda "schemeVarSet" $ lambda "term" $
-    "cx" ~> "g" ~>
-    right (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "term")
-
--- | Recursive helper for buildSubstFromAnnotations. Walks a term and compares lambda domain types
--- (normalized) against annotation map types (NOT normalized) to recover the fresh→canonical mapping.
--- Pure function: takes the graph and term directly.
-buildSubstFromAnnotations_go :: TTermDefinition (S.Set Name -> Graph -> Term -> M.Map Name Name)
-buildSubstFromAnnotations_go = def "buildSubstFromAnnotations_go" $
-  lambda "schemeVarSet" $ lambda "g" $ lambda "term" $
-    cases _Term (var "term")
-      (Just Maps.empty) [
-      _Term_annotated>>: lambda "at" $
-        "body" <~ Core.annotatedTermBody (var "at") $
-        "anns" <~ Core.annotatedTermAnnotation (var "at") $
-        "bodySubst" <~ (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "body") $
-        "annSubst" <~ Maybes.cases (Maps.lookup Constants.key_type (var "anns"))
-          Maps.empty
-          (lambda "typeTerm" $
-            Eithers.either_
-              (lambda "_" Maps.empty)
-              (lambda "annType" $
-                cases _Term (Strip.deannotateTerm @@ var "body")
-                  (Just Maps.empty) [
-                  _Term_lambda>>: lambda "lam" $
-                    Maybes.cases (Core.lambdaDomain (var "lam"))
-                      Maps.empty
-                      (lambda "dom" $
-                        cases _Type (Strip.deannotateType @@ var "annType")
-                          (Just Maps.empty) [
-                          _Type_function>>: lambda "ft" $
-                            buildTypeVarSubst @@ var "schemeVarSet"
-                              @@ Core.functionTypeDomain (var "ft")
-                              @@ var "dom"])])
-              (Phantoms.decoderFor _Type @@ var "g" @@ var "typeTerm")) $
-        Maps.union (var "annSubst") (var "bodySubst"),
-      _Term_application>>: lambda "app" $
-        Maps.union
-          (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.applicationFunction (var "app"))
-          (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.applicationArgument (var "app")),
-      _Term_lambda>>: lambda "lam" $
-        buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.lambdaBody (var "lam"),
-      _Term_cases>>: lambda "cs" $
-        "defSubst" <~ Maybes.cases (Core.caseStatementDefault (var "cs"))
-          Maps.empty
-          (lambda "d" $ buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "d") $
-        "caseSubsts" <~ Lists.foldl
-          (lambda "acc" $ lambda "fld" $
-            Maps.union (var "acc") (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.fieldTerm (var "fld")))
-          Maps.empty
-          (Core.caseStatementCases (var "cs")) $
-        Maps.union (var "defSubst") (var "caseSubsts"),
-      _Term_let>>: lambda "lt" $
-        "bindingSubst" <~ Lists.foldl
-          (lambda "acc" $ lambda "b" $
-            Maps.union (var "acc") (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.bindingTerm (var "b")))
-          Maps.empty
-          (Core.letBindings (var "lt")) $
-        Maps.union (var "bindingSubst") (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.letBody (var "lt")),
-      _Term_list>>: lambda "terms" $
-        Lists.foldl
-          (lambda "acc" $ lambda "t" $
-            Maps.union (var "acc") (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "t"))
-          Maps.empty
-          (var "terms"),
-      _Term_maybe>>: lambda "mt" $
-        Maybes.cases (var "mt")
-          Maps.empty
-          (lambda "t" $ buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "t"),
-      _Term_pair>>: lambda "p" $
-        Maps.union
-          (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Pairs.first (var "p"))
-          (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Pairs.second (var "p")),
-      _Term_record>>: lambda "r" $
-        Lists.foldl
-          (lambda "acc" $ lambda "fld" $
-            Maps.union (var "acc") (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ Core.fieldTerm (var "fld")))
-          Maps.empty
-          (Core.recordFields (var "r")),
-      _Term_set>>: lambda "terms" $
-        Lists.foldl
-          (lambda "acc" $ lambda "t" $
-            Maps.union (var "acc") (buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "t"))
-          Maps.empty
-          (Sets.toList (var "terms")),
-      _Term_typeApplication>>: lambda "ta" $
-        buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g"
-          @@ Core.typeApplicationTermBody (var "ta"),
-      _Term_typeLambda>>: lambda "tl" $
-        buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g"
-          @@ Core.typeLambdaBody (var "tl"),
-      _Term_either>>: lambda "e" $
-        Eithers.either_
-          (lambda "t" $ buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "t")
-          (lambda "t" $ buildSubstFromAnnotations_go @@ var "schemeVarSet" @@ var "g" @@ var "t")
-          (var "e")]
-
--- | Build a mapping from scheme type variables to actual types by structurally matching
--- a scheme type against an actual type. Only maps variables that are in the schemeVarSet.
-buildTypeSubst :: TTermDefinition (S.Set Name -> Type -> Type -> M.Map Name Type)
-buildTypeSubst = def "buildTypeSubst" $
-  lambda "schemeVarSet" $ lambda "schemeType" $ lambda "actualType" $
-    buildTypeSubst_go @@ var "schemeVarSet"
-      @@ (Strip.deannotateType @@ var "schemeType")
-      @@ (Strip.deannotateType @@ var "actualType")
-
--- | Recursive helper for buildTypeSubst. Takes deannotated types.
-buildTypeSubst_go :: TTermDefinition (S.Set Name -> Type -> Type -> M.Map Name Type)
-buildTypeSubst_go = def "buildTypeSubst_go" $
-  lambda "svs" $ lambda "st" $ lambda "at" $
-    "goSub" <~ (lambda "a" $ lambda "b" $
-      buildTypeSubst_go @@ var "svs"
-        @@ (Strip.deannotateType @@ var "a")
-        @@ (Strip.deannotateType @@ var "b")) $
-    cases _Type (var "st")
-      (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-      _Type_variable>>: lambda "v" $
-        Logic.ifElse (Sets.member (var "v") (var "svs"))
-          (Maps.singleton (var "v") (var "at"))
-          (Maps.empty :: TTerm (M.Map Name Type)),
-      _Type_function>>: lambda "sft" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_function>>: lambda "aft" $
-            Maps.union
-              (var "goSub" @@ Core.functionTypeDomain (var "sft") @@ Core.functionTypeDomain (var "aft"))
-              (var "goSub" @@ Core.functionTypeCodomain (var "sft") @@ Core.functionTypeCodomain (var "aft"))],
-      _Type_application>>: lambda "sat" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_application>>: lambda "aat" $
-            Maps.union
-              (var "goSub" @@ Core.applicationTypeFunction (var "sat") @@ Core.applicationTypeFunction (var "aat"))
-              (var "goSub" @@ (project _ApplicationType _ApplicationType_argument @@ var "sat")
-                           @@ (project _ApplicationType _ApplicationType_argument @@ var "aat"))],
-      _Type_list>>: lambda "sl" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_list>>: lambda "al" $
-            var "goSub" @@ var "sl" @@ var "al"],
-      _Type_set>>: lambda "ss" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_set>>: lambda "as'" $
-            var "goSub" @@ var "ss" @@ var "as'"],
-      _Type_maybe>>: lambda "sm" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_maybe>>: lambda "am" $
-            var "goSub" @@ var "sm" @@ var "am"],
-      _Type_map>>: lambda "smt" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_map>>: lambda "amt" $
-            Maps.union
-              (var "goSub" @@ Core.mapTypeKeys (var "smt") @@ Core.mapTypeKeys (var "amt"))
-              (var "goSub" @@ Core.mapTypeValues (var "smt") @@ Core.mapTypeValues (var "amt"))],
-      _Type_pair>>: lambda "spt" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_pair>>: lambda "apt" $
-            Maps.union
-              (var "goSub" @@ Core.pairTypeFirst (var "spt") @@ Core.pairTypeFirst (var "apt"))
-              (var "goSub" @@ Core.pairTypeSecond (var "spt") @@ Core.pairTypeSecond (var "apt"))],
-      _Type_either>>: lambda "set'" $
-        cases _Type (var "at")
-          (Just (Maps.empty :: TTerm (M.Map Name Type))) [
-          _Type_either>>: lambda "aet" $
-            Maps.union
-              (var "goSub" @@ Core.eitherTypeLeft (var "set'") @@ Core.eitherTypeLeft (var "aet"))
-              (var "goSub" @@ Core.eitherTypeRight (var "set'") @@ Core.eitherTypeRight (var "aet"))],
-      _Type_forall>>: lambda "sfa" $
-        -- For forall, unwrap both sides if matching, or just the scheme side
-        cases _Type (var "at")
-          (Just $ var "goSub" @@ Core.forallTypeBody (var "sfa") @@ var "at") [
-          _Type_forall>>: lambda "afa" $
-            var "goSub" @@ Core.forallTypeBody (var "sfa") @@ Core.forallTypeBody (var "afa")]]
-
--- | Build a type variable substitution by structurally matching a "fresh" type (from inference
--- annotations) against a "canonical" type (from the type scheme). When both types have a
--- TypeVariable at the same structural position, maps the fresh name to the canonical name.
--- Only includes mappings where the names actually differ.
-buildTypeVarSubst :: TTermDefinition (S.Set Name -> Type -> Type -> M.Map Name Name)
-buildTypeVarSubst = def "buildTypeVarSubst" $
-  lambda "schemeVarSet" $ lambda "freshTyp" $ lambda "canonTyp" $
-    buildTypeVarSubst_go @@ var "schemeVarSet"
-      @@ (Strip.deannotateType @@ var "freshTyp")
-      @@ (Strip.deannotateType @@ var "canonTyp")
-
--- | Recursive helper for buildTypeVarSubst. Takes deannotated types.
-buildTypeVarSubst_go :: TTermDefinition (S.Set Name -> Type -> Type -> M.Map Name Name)
-buildTypeVarSubst_go = def "buildTypeVarSubst_go" $
-  lambda "svs" $ lambda "ft" $ lambda "ct" $
-    "goSub" <~ (lambda "a" $ lambda "b" $
-      buildTypeVarSubst_go @@ var "svs"
-        @@ (Strip.deannotateType @@ var "a")
-        @@ (Strip.deannotateType @@ var "b")) $
-    cases _Type (var "ft")
-      (Just $ -- Default: check if ct is a forall, and if so unwrap it
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_forall>>: lambda "cfa" $
-            buildTypeVarSubst_go @@ var "svs" @@ var "ft"
-              @@ (Strip.deannotateType @@ Core.forallTypeBody (var "cfa"))]) [
-      _Type_variable>>: lambda "fn" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_variable>>: lambda "cn" $
-            Logic.ifElse
-              (Logic.and (Logic.not (Equality.equal (var "fn") (var "cn"))) (Sets.member (var "cn") (var "svs")))
-              (Maps.singleton (var "fn") (var "cn"))
-              (Maps.empty :: TTerm (M.Map Name Name))],
-      _Type_function>>: lambda "fft" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_function>>: lambda "cft" $
-            Maps.union
-              (var "goSub" @@ Core.functionTypeDomain (var "fft") @@ Core.functionTypeDomain (var "cft"))
-              (var "goSub" @@ Core.functionTypeCodomain (var "fft") @@ Core.functionTypeCodomain (var "cft"))],
-      _Type_application>>: lambda "fat" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_application>>: lambda "cat" $
-            Maps.union
-              (var "goSub" @@ Core.applicationTypeFunction (var "fat") @@ Core.applicationTypeFunction (var "cat"))
-              (var "goSub" @@ (project _ApplicationType _ApplicationType_argument @@ var "fat")
-                           @@ (project _ApplicationType _ApplicationType_argument @@ var "cat"))],
-      _Type_list>>: lambda "fl" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_list>>: lambda "cl" $
-            var "goSub" @@ var "fl" @@ var "cl"],
-      _Type_set>>: lambda "fs" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_set>>: lambda "cs" $
-            var "goSub" @@ var "fs" @@ var "cs"],
-      _Type_maybe>>: lambda "fm" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_maybe>>: lambda "cm" $
-            var "goSub" @@ var "fm" @@ var "cm"],
-      _Type_map>>: lambda "fmt" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_map>>: lambda "cmt" $
-            Maps.union
-              (var "goSub" @@ Core.mapTypeKeys (var "fmt") @@ Core.mapTypeKeys (var "cmt"))
-              (var "goSub" @@ Core.mapTypeValues (var "fmt") @@ Core.mapTypeValues (var "cmt"))],
-      _Type_pair>>: lambda "fpt" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_pair>>: lambda "cpt" $
-            Maps.union
-              (var "goSub" @@ Core.pairTypeFirst (var "fpt") @@ Core.pairTypeFirst (var "cpt"))
-              (var "goSub" @@ Core.pairTypeSecond (var "fpt") @@ Core.pairTypeSecond (var "cpt"))],
-      _Type_either>>: lambda "fet" $
-        cases _Type (var "ct")
-          (Just (Maps.empty :: TTerm (M.Map Name Name))) [
-          _Type_either>>: lambda "cet" $
-            Maps.union
-              (var "goSub" @@ Core.eitherTypeLeft (var "fet") @@ Core.eitherTypeLeft (var "cet"))
-              (var "goSub" @@ Core.eitherTypeRight (var "fet") @@ Core.eitherTypeRight (var "cet"))],
-      _Type_forall>>: lambda "ffa" $
-        cases _Type (var "ct")
-          (Just $ -- ct is not a forall, but ft is: unwrap ft and recurse
-            buildTypeVarSubst_go @@ var "svs"
-              @@ (Strip.deannotateType @@ Core.forallTypeBody (var "ffa"))
-              @@ var "ct") [
-          _Type_forall>>: lambda "cfa" $
-            var "goSub" @@ Core.forallTypeBody (var "ffa") @@ Core.forallTypeBody (var "cfa")]]
-
-classModsPublic :: TTermDefinition [Java.ClassModifier]
-classModsPublic = def "classModsPublic" $
-  list [inject Java._ClassModifier Java._ClassModifier_public unit]
-
--- | Classify a data reference by looking up its element and classifying its term
-classifyDataReference :: TTermDefinition (Name -> Context -> Graph -> Either Error JavaHelpers.JavaSymbolClass)
-classifyDataReference = def "classifyDataReference" $
-  lambda "name" $
-    "cx" ~> "g" ~>
-    "mel" <<~ right (Lexical.lookupBinding @@ var "g" @@ var "name") $
-    Maybes.cases (var "mel")
-      -- Not found: treat as local variable
-      (right $ inject JavaHelpers._JavaSymbolClass JavaHelpers._JavaSymbolClass_localVariable unit)
-      (lambda "el" $
-        Maybes.cases (Core.bindingTypeScheme (var "el"))
-          (Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "no type scheme for element ") ((unwrap _Name @@ Core.bindingName (var "el")))) (var "cx"))
-          (lambda "ts" $
-            right $ classifyDataTerm @@ var "ts" @@ Core.bindingTerm (var "el")))
-
--- | Classify a data term by its symbol class (constant, nullary function, hoisted lambda, etc.)
-classifyDataTerm :: TTermDefinition (TypeScheme -> Term -> JavaHelpers.JavaSymbolClass)
-classifyDataTerm = def "classifyDataTerm" $
-  lambda "ts" $ lambda "term" $
-    Logic.ifElse (Dependencies.isLambda @@ var "term")
-      -- Lambda terms
-      ("n" <~ classifyDataTerm_countLambdaParams @@ var "term" $
-        Logic.ifElse (Equality.gt (var "n") (int32 1))
-          (inject JavaHelpers._JavaSymbolClass JavaHelpers._JavaSymbolClass_hoistedLambda (var "n"))
-          (inject JavaHelpers._JavaSymbolClass JavaHelpers._JavaSymbolClass_unaryFunction unit))
-      -- Non-lambda terms
-      ("hasTypeParams" <~ Logic.not (Lists.null (Core.typeSchemeVariables (var "ts"))) $
-        Logic.ifElse (var "hasTypeParams")
-          -- Polymorphic: check stripped body
-          ("n2" <~ classifyDataTerm_countLambdaParams @@ (classifyDataTerm_stripTypeLambdas @@ var "term") $
-            Logic.ifElse (Equality.gt (var "n2") (int32 0))
-              (inject JavaHelpers._JavaSymbolClass JavaHelpers._JavaSymbolClass_hoistedLambda (var "n2"))
-              (inject JavaHelpers._JavaSymbolClass JavaHelpers._JavaSymbolClass_nullaryFunction unit))
-          -- Non-lambda, non-polymorphic: nullary function
-          (inject JavaHelpers._JavaSymbolClass JavaHelpers._JavaSymbolClass_nullaryFunction unit))
-
--- | Count the number of lambda parameters in a term (recursing through let bodies)
-classifyDataTerm_countLambdaParams :: TTermDefinition (Term -> Int)
-classifyDataTerm_countLambdaParams = def "classifyDataTerm_countLambdaParams" $
-  lambda "t" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ int32 0) [
-      _Term_lambda>>: lambda "lam" $
-        Math.add (int32 1)
-          (classifyDataTerm_countLambdaParams @@ (project _Lambda _Lambda_body @@ var "lam")),
-      _Term_let>>: lambda "lt" $
-        classifyDataTerm_countLambdaParams @@ (project _Let _Let_body @@ var "lt")]
-
--- | Strip type lambda wrappers from a term
-classifyDataTerm_stripTypeLambdas :: TTermDefinition (Term -> Term)
-classifyDataTerm_stripTypeLambdas = def "classifyDataTerm_stripTypeLambdas" $
-  lambda "t" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ var "t") [
-      _Term_typeLambda>>: lambda "tl" $
-        classifyDataTerm_stripTypeLambdas @@ (project _TypeLambda _TypeLambda_body @@ var "tl")]
-
--- | Classify a data reference by looking up its element and classifying its term
-
--- | Shared helper: int cmp = 0; declaration
-cmpDeclStatement :: TTermDefinition (JavaHelpers.Aliases -> Java.BlockStatement)
-cmpDeclStatement = def "cmpDeclStatement" $
-  lambda "aliases" $
-    JavaUtilsSource.variableDeclarationStatement @@ var "aliases" @@ (asTerm JavaUtilsSource.javaIntType)
-      @@ (JavaUtilsSource.javaIdentifier @@ string "cmp") @@ (JavaUtilsSource.javaIntExpression @@ bigintAsInt (bigint 0))
-
--- | Shared helper: cmp != 0 expression
-cmpNotZeroExpr :: TTermDefinition Java.Expression
-cmpNotZeroExpr = def "cmpNotZeroExpr" $ lets [
-    "lhs">: JavaUtilsSource.javaRelationalExpressionToJavaEqualityExpression @@
-      (JavaUtilsSource.javaPostfixExpressionToJavaRelationalExpression @@
-        (JavaDsl.postfixExpressionName (JavaDsl.expressionName nothing (JavaUtilsSource.javaIdentifier @@ string "cmp")))),
-    "rhs">: JavaUtilsSource.javaPostfixExpressionToJavaRelationalExpression @@
-      (JavaDsl.postfixExpressionPrimary (JavaUtilsSource.javaLiteralToJavaPrimary @@ (JavaUtilsSource.javaInt @@ bigintAsInt (bigint 0))))] $
-    JavaUtilsSource.javaEqualityExpressionToJavaExpression @@
-      (JavaDsl.equalityExpressionNotEqual (JavaDsl.equalityExpressionBinary (var "lhs") (var "rhs")))
-
--- | Collect forall-bound type parameter names from a type
-collectForallParams :: TTermDefinition (Type -> [Name])
-collectForallParams = def "collectForallParams" $
-  lambda "t" $ cases _Type (Strip.deannotateType @@ var "t")
-    (Just $ list ([] :: [TTerm Name])) [
-    _Type_forall>>: lambda "fa" $
-      Lists.cons (Core.forallTypeParameter (var "fa"))
-        (collectForallParams @@ Core.forallTypeBody (var "fa"))]
-
--- | Collect domain annotations from a chain of nested lambdas.
--- Returns (domains, innerBody).
-collectLambdaDomains :: TTermDefinition (Term -> ([Type], Term))
-collectLambdaDomains = def "collectLambdaDomains" $
-  lambda "t" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ pair (list ([] :: [TTerm Type])) (var "t")) [
-      _Term_lambda>>: lambda "lam" $
-        Maybes.cases (Core.lambdaDomain (var "lam"))
-          (pair (list ([] :: [TTerm Type])) (var "t"))
-          (lambda "dom" $
-            "rest" <~ (collectLambdaDomains @@ Core.lambdaBody (var "lam")) $
-            pair (Lists.cons (var "dom") (Pairs.first (var "rest")))
-              (Pairs.second (var "rest")))]
-
--- | Collect type arguments from nested TermTypeApplication chain, stripping annotations.
-collectTypeApps :: TTermDefinition (Term -> [Type] -> (Term, [Type]))
-collectTypeApps = def "collectTypeApps" $
-  lambda "t" $ lambda "acc" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ pair (Strip.deannotateTerm @@ var "t") (var "acc")) [
-      _Term_typeApplication>>: lambda "ta" $
-        collectTypeApps
-          @@ Core.typeApplicationTermBody (var "ta")
-          @@ Lists.cons (Core.typeApplicationTermType (var "ta")) (var "acc")]
-
--- | Like collectTypeApps but preserves the original (annotated) term when no more type apps.
-collectTypeApps0 :: TTermDefinition (Term -> [Type] -> (Term, [Type]))
-collectTypeApps0 = def "collectTypeApps0" $
-  lambda "t" $ lambda "acc" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ pair (var "t") (var "acc")) [
-      _Term_typeApplication>>: lambda "ta" $
-        collectTypeApps0
-          @@ Core.typeApplicationTermBody (var "ta")
-          @@ Lists.cons (Core.typeApplicationTermType (var "ta")) (var "acc")]
-
--- | Collect all type variable names from a type
-collectTypeVars :: TTermDefinition (Type -> S.Set Name)
-collectTypeVars = def "collectTypeVars" $
-  lambda "typ" $ collectTypeVars_go @@ (Strip.deannotateType @@ var "typ")
-
--- | Helper for collectTypeVars
-collectTypeVars_go :: TTermDefinition (Type -> S.Set Name)
-collectTypeVars_go = def "collectTypeVars_go" $
-  lambda "t" $ cases _Type (var "t")
-    (Just $ (Sets.empty :: TTerm (S.Set Name))) [
-    _Type_variable>>: lambda "name" $
-      Sets.singleton (var "name"),
-    _Type_function>>: lambda "ft" $
-      Sets.union
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.functionTypeDomain (var "ft")))
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.functionTypeCodomain (var "ft"))),
-    _Type_application>>: lambda "at" $
-      Sets.union
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.applicationTypeFunction (var "at")))
-        (collectTypeVars_go @@ (Strip.deannotateType @@ (project _ApplicationType _ApplicationType_argument @@ var "at"))),
-    _Type_list>>: lambda "inner" $
-      collectTypeVars_go @@ (Strip.deannotateType @@ var "inner"),
-    _Type_set>>: lambda "inner" $
-      collectTypeVars_go @@ (Strip.deannotateType @@ var "inner"),
-    _Type_maybe>>: lambda "inner" $
-      collectTypeVars_go @@ (Strip.deannotateType @@ var "inner"),
-    _Type_map>>: lambda "mt" $
-      Sets.union
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.mapTypeKeys (var "mt")))
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.mapTypeValues (var "mt"))),
-    _Type_pair>>: lambda "pt" $
-      Sets.union
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.pairTypeFirst (var "pt")))
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.pairTypeSecond (var "pt"))),
-    _Type_either>>: lambda "et" $
-      Sets.union
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.eitherTypeLeft (var "et")))
-        (collectTypeVars_go @@ (Strip.deannotateType @@ Core.eitherTypeRight (var "et"))),
-    _Type_forall>>: lambda "ft" $
-      collectTypeVars_go @@ (Strip.deannotateType @@ Core.forallTypeBody (var "ft"))]
-
--- | Shared helper: hydra.util.Comparing.compare(this.field, otherVar.field)
-comparableCompareExpr :: TTermDefinition (String -> String -> Java.Expression)
-comparableCompareExpr = def "comparableCompareExpr" $
-  lambda "otherVar" $ lambda "fname" $ lets [
-    "thisField">: JavaUtilsSource.javaIdentifierToJavaExpression @@ wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ var "fname"),
-    "otherField">: JavaUtilsSource.javaExpressionNameToJavaExpression @@
-      (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.javaIdentifier @@ var "otherVar") @@ (JavaUtilsSource.javaIdentifier @@ var "fname"))] $
-    JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-      (JavaUtilsSource.methodInvocationStatic
-        @@ JavaDsl.identifier (string "hydra.util.Comparing")
-        @@ JavaDsl.identifier (string "compare")
-        @@ list [var "thisField", var "otherField"])
-
--- | Shared helper: cmp = expr; if (cmp != 0) return cmp;
-compareAndReturnStmts :: TTermDefinition (String -> FieldType -> [Java.BlockStatement])
-compareAndReturnStmts = def "compareAndReturnStmts" $
-  lambda "otherVar" $ lambda "f" $
-    list [
-      JavaDsl.blockStatementStatement
-        (JavaUtilsSource.javaAssignmentStatement
-          @@ (JavaDsl.leftHandSideExpressionName (JavaDsl.expressionName nothing (JavaUtilsSource.javaIdentifier @@ string "cmp")))
-          @@ (compareFieldExpr @@ var "otherVar" @@ var "f")),
-      JavaDsl.blockStatementStatement
-        (JavaDsl.statementIfThen (JavaDsl.ifThenStatement (asTerm cmpNotZeroExpr)
-          (JavaUtilsSource.javaReturnStatement @@ just
-            (JavaUtilsSource.javaExpressionNameToJavaExpression @@ (JavaDsl.expressionName nothing (JavaUtilsSource.javaIdentifier @@ string "cmp"))))))]
-
--- | Shared helper: dispatch to appropriate comparison expression based on field type
-compareFieldExpr :: TTermDefinition (String -> FieldType -> Java.Expression)
-compareFieldExpr = def "compareFieldExpr" $
-  lambda "otherVar" $ lambda "ft" $
-    "fname" <~ Core.unName (Core.fieldTypeName (var "ft")) $
-    "ftype" <~ Core.fieldTypeType (var "ft") $
-    Logic.ifElse (isBinaryType @@ var "ftype")
-      (arraysCompareExpr @@ var "otherVar" @@ var "fname")
-      (Logic.ifElse (isNonComparableType @@ var "ftype")
-        (hashCodeCompareExpr @@ var "otherVar" @@ var "fname")
-        (comparableCompareExpr @@ var "otherVar" @@ var "fname"))
-
--- | Shared helper: build the compareTo method body for a list of fields
-compareToBody :: TTermDefinition (JavaHelpers.Aliases -> String -> [FieldType] -> [Java.BlockStatement])
-compareToBody = def "compareToBody" $
-  lambda "aliases" $ lambda "otherVar" $ lambda "fields" $ lets [
-    "zeroStmts">: list [JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (JavaUtilsSource.javaIntExpression @@ bigintAsInt (bigint 0)))]] $
-    Maybes.fromMaybe (var "zeroStmts") (Maybes.map
-      (lambda "p" $ lets [
-        "firstField">: Pairs.first (var "p"),
-        "restFields">: Pairs.second (var "p")] $
-        Logic.ifElse (Lists.null (var "restFields"))
-          (list [JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (compareFieldExpr @@ var "otherVar" @@ var "firstField"))])
-          (Lists.concat2
-            (list [cmpDeclStatement @@ var "aliases"])
-            (Lists.concat2
-              (Lists.concat (Lists.map (lambda "f" $ compareAndReturnStmts @@ var "otherVar" @@ var "f") (Lists.cons (var "firstField") (Maybes.fromMaybe (list ([] :: [TTerm FieldType])) (Lists.maybeInit (var "restFields"))))))
-              (list [JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (compareFieldExpr @@ var "otherVar" @@ (Maybes.fromMaybe (var "firstField") (Lists.maybeLast (var "restFields")))))]))))
-      (Lists.uncons (var "fields")))
-
--- | this.field.compareTo(other.field) == 0 for BigDecimal/BigInteger fields
-compareToZeroClause :: TTermDefinition (String -> String -> Java.InclusiveOrExpression)
-compareToZeroClause = def "compareToZeroClause" $
-  lambda "tmpName" $ lambda "fname" $ lets [
-    "compareToArg">: JavaUtilsSource.javaExpressionNameToJavaExpression
-      @@ (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.javaIdentifier @@ var "tmpName")
-        @@ (JavaUtilsSource.javaIdentifier @@ var "fname")),
-    "compareToVar">: JavaDsl.methodInvocationVariantExpression
-      (JavaUtilsSource.fieldExpression @@ wrap Java._Identifier (string "this")
-        @@ (JavaUtilsSource.javaIdentifier @@ var "fname")),
-    "compareToHeader">: JavaDsl.methodInvocationHeaderComplex
-      (JavaDsl.methodInvocationComplex (var "compareToVar")
-        (list ([] :: [TTerm Java.TypeArgument]))
-        (wrap Java._Identifier (asTerm JavaNamesSource.compareToMethodName))),
-    "lhs">: JavaUtilsSource.javaRelationalExpressionToJavaEqualityExpression
-      @@ (JavaUtilsSource.javaPostfixExpressionToJavaRelationalExpression
-        @@ (JavaUtilsSource.javaMethodInvocationToJavaPostfixExpression
-          @@ (JavaDsl.methodInvocation_ (var "compareToHeader") (list [var "compareToArg"])))),
-    "rhs">: JavaUtilsSource.javaPostfixExpressionToJavaRelationalExpression
-      @@ (JavaDsl.postfixExpressionPrimary
-        (JavaUtilsSource.javaLiteralToJavaPrimary @@ (JavaUtilsSource.javaInt @@ bigintAsInt (bigint 0))))] $
-    JavaUtilsSource.javaEqualityExpressionToJavaInclusiveOrExpression
-      @@ (JavaDsl.equalityExpressionEqual (JavaDsl.equalityExpressionBinary (var "lhs") (var "rhs")))
-
--- | Create a constant field declaration (e.g., public static final Name TYPE_ = new Name("..."))
-constantDecl :: TTermDefinition (String -> JavaHelpers.Aliases -> Name -> Context -> Graph -> Either Error Java.ClassBodyDeclarationWithComments)
-constantDecl = def "constantDecl" $
-  lambda "javaName" $ lambda "aliases" $ lambda "name" $
-    "cx" ~> "g" ~>
-    lets [
-    "mods">: list [inject Java._FieldModifier Java._FieldModifier_public unit,
-                   inject Java._FieldModifier Java._FieldModifier_static unit,
-                   inject Java._FieldModifier Java._FieldModifier_final unit],
-    "nameName">: JavaUtilsSource.nameToJavaName @@ var "aliases" @@ Core.name (string "hydra.core.Name")] $
-    "env" <~ (record JavaHelpers._JavaEnvironment [
-      JavaHelpers._JavaEnvironment_aliases>>: var "aliases",
-      JavaHelpers._JavaEnvironment_graph>>: var "g"]) $
-    "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ (Core.typeVariable (Core.name (string "hydra.core.Name"))) @@ var "cx" @@ var "g") $
-    "arg" <<~ (encodeTerm @@ var "env" @@ (Core.termLiteral (Core.literalString (unwrap _Name @@ var "name"))) @@ var "cx" @@ var "g") $
-    "init" <~ (inject Java._VariableInitializer Java._VariableInitializer_expression
-      (JavaUtilsSource.javaConstructorCall @@ (JavaUtilsSource.javaConstructorName @@ var "nameName" @@ nothing)
-        @@ list [var "arg"] @@ nothing)) $
-    "var" <~ (JavaUtilsSource.javaVariableDeclarator @@ wrap Java._Identifier (var "javaName") @@ just (var "init")) $
-    right (noComment @@ (JavaUtilsSource.javaMemberField @@ var "mods" @@ var "jt" @@ var "var"))
-
--- | Create a constant field declaration for a field name.
-constantDeclForFieldType :: TTermDefinition (JavaHelpers.Aliases -> FieldType -> Context -> Graph -> Either Error Java.ClassBodyDeclarationWithComments)
-constantDeclForFieldType = def "constantDeclForFieldType" $
-  lambda "aliases" $ lambda "ftyp" $
-    "cx" ~> "g" ~>
-    lets [
-    "name">: Core.fieldTypeName (var "ftyp"),
-    "javaName">: Formatting.nonAlnumToUnderscores @@ (Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionUpperSnake @@ (unwrap _Name @@ var "name"))] $
-    constantDecl @@ var "javaName" @@ var "aliases" @@ var "name" @@ var "cx" @@ var "g"
-
--- | Create a constant field declaration for a type name.
-constantDeclForTypeName :: TTermDefinition (JavaHelpers.Aliases -> Name -> Context -> Graph -> Either Error Java.ClassBodyDeclarationWithComments)
-constantDeclForTypeName = def "constantDeclForTypeName" $
-  lambda "aliases" $ lambda "name" $
-    "cx" ~> "g" ~>
-    constantDecl @@ string "TYPE_" @@ var "aliases" @@ var "name" @@ var "cx" @@ var "g"
-
--- | Construct an elements interface for a module's data definitions
-constructElementsInterface :: TTermDefinition (Module -> [Java.InterfaceMemberDeclaration] -> (Name, Java.CompilationUnit))
-constructElementsInterface = def "constructElementsInterface" $
-  lambda "mod" $ lambda "members" $ lets [
-    "ns">: Packaging.moduleNamespace (var "mod"),
-    "parentNs">: namespaceParent @@ var "ns",
-    "pkg">: Maybes.cases (var "parentNs")
-      (JavaUtilsSource.javaPackageDeclaration @@ var "ns")
-      (lambda "pns" $ JavaUtilsSource.javaPackageDeclaration @@ var "pns"),
-    "mods">: list [inject Java._InterfaceModifier Java._InterfaceModifier_public unit],
-    "className">: elementsClassName @@ var "ns",
-    "elName">: elementsQualifiedName @@ var "ns",
-    "body">: wrap Java._InterfaceBody (var "members"),
-    "itf">: inject Java._TypeDeclaration Java._TypeDeclaration_interface
-      (inject Java._InterfaceDeclaration Java._InterfaceDeclaration_normalInterface
-        (record Java._NormalInterfaceDeclaration [
-          Java._NormalInterfaceDeclaration_modifiers>>: var "mods",
-          Java._NormalInterfaceDeclaration_identifier>>:
-            JavaUtilsSource.javaTypeIdentifier @@ var "className",
-          Java._NormalInterfaceDeclaration_parameters>>:
-            list ([] :: [TTerm Java.TypeParameter]),
-          Java._NormalInterfaceDeclaration_extends>>:
-            list ([] :: [TTerm Java.InterfaceType]),
-          Java._NormalInterfaceDeclaration_body>>: var "body"])),
-    "decl">: record Java._TypeDeclarationWithComments [
-      Java._TypeDeclarationWithComments_value>>: var "itf",
-      Java._TypeDeclarationWithComments_comments>>: Packaging.moduleDescription (var "mod")]] $
-    pair (var "elName")
-      (inject Java._CompilationUnit Java._CompilationUnit_ordinary
-        (record Java._OrdinaryCompilationUnit [
-          Java._OrdinaryCompilationUnit_package>>: just (var "pkg"),
-          Java._OrdinaryCompilationUnit_imports>>:
-            list ([] :: [TTerm Java.ImportDeclaration]),
-          Java._OrdinaryCompilationUnit_types>>: list [var "decl"]]))
-
--- | Correct the cast type for pair terms. When we have a TermTypeApplication wrapping
--- a TermPair with exactly 2 type args, reconstruct the pair type from the type args
--- (which have been correctly renamed by normalizeTypeVariablesInTerm) instead of using
--- the annotation type (which may have stale variable names).
-correctCastType :: TTermDefinition (Term -> [Type] -> Type -> Context -> Graph -> Either Error Type)
-correctCastType = def "correctCastType" $
-  lambda "innerBody" $ lambda "typeArgs" $ lambda "fallback" $
-    "cx" ~> "g" ~>
-    cases _Term (Strip.deannotateTerm @@ var "innerBody")
-      (Just $ right (var "fallback")) [
-      _Term_pair>>: lambda "_p" $
-        Logic.ifElse (Equality.equal (Lists.length (var "typeArgs")) (int32 2))
-          (right (inject _Type _Type_pair (Core.pairType
-            (Maybes.fromMaybe (var "fallback") (Lists.maybeAt (int32 0) (var "typeArgs")))
-            (Maybes.fromMaybe (var "fallback") (Lists.maybeAt (int32 1) (var "typeArgs"))))))
-          (right (var "fallback"))]
-
--- | Compute corrected type applications for a function call.
-correctTypeApps :: TTermDefinition (Graph -> Name -> [Term] -> [Type] -> Context -> Graph -> Either Error [Type])
-correctTypeApps = def "correctTypeApps" $
-  lambda "gr" $ lambda "name" $ lambda "args" $ lambda "fallbackTypeApps" $
-    "cx" ~> "g" ~>
-    "mel" <<~ right (Lexical.lookupBinding @@ var "g" @@ var "name") $
-    Maybes.cases (var "mel")
-      (right (var "fallbackTypeApps"))
-      (lambda "el" $
-        Maybes.cases (Core.bindingTypeScheme (var "el"))
-          (right (var "fallbackTypeApps"))
-          (lambda "ts" $
-            "schemeType" <~ Core.typeSchemeBody (var "ts") $
-            "allSchemeVars" <~ Lists.filter (lambda "v" $ isSimpleName @@ var "v") (Core.typeSchemeVariables (var "ts")) $
-            "schemeTypeVars" <~ collectTypeVars @@ var "schemeType" $
-            "usedFlags" <~ Lists.map (lambda "v" $ Sets.member (var "v") (var "schemeTypeVars")) (var "allSchemeVars") $
-            "usedSchemeVars" <~ filterByFlags @@ var "allSchemeVars" @@ var "usedFlags" $
-            "nParams" <~ countFunctionParams @@ var "schemeType" $
-            "peeled" <~ peelDomainTypes @@ var "nParams" @@ var "schemeType" $
-            "calleeDoms" <~ Pairs.first (var "peeled") $
-            "calleeCod" <~ Pairs.second (var "peeled") $
-            "overgenSubst" <~ detectAccumulatorUnification @@ var "calleeDoms" @@ var "calleeCod" @@ var "usedSchemeVars" $
-            "keepFlags" <~ Lists.map
-              (lambda "v" $ Logic.and
-                (Sets.member (var "v") (var "schemeTypeVars"))
-                (Logic.not (Maps.member (var "v") (var "overgenSubst"))))
-              (var "allSchemeVars") $
-            "schemeVars" <~ filterByFlags @@ var "allSchemeVars" @@ var "keepFlags" $
-            "filteredFallback0" <~ Logic.ifElse
-              (Equality.equal (Lists.length (var "allSchemeVars")) (Lists.length (var "fallbackTypeApps")))
-              (filterByFlags @@ var "fallbackTypeApps" @@ var "keepFlags")
-              (var "fallbackTypeApps") $
-            "filteredFallback" <~ Logic.ifElse
-              (Maps.null (var "overgenSubst"))
-              (var "filteredFallback0")
-              (Lists.map (lambda "t" $ substituteTypeVarsWithTypes @@ var "overgenSubst" @@ var "t") (var "filteredFallback0")) $
-            Logic.ifElse
-              (Logic.or (Lists.null (var "schemeVars"))
-                (Logic.not (Equality.equal (Lists.length (var "schemeVars")) (Lists.length (var "filteredFallback")))))
-              (right (var "filteredFallback"))
-              (correctTypeAppsWithArgs @@ var "schemeVars" @@ var "filteredFallback" @@ var "schemeType" @@ var "args" @@ var "cx" @@ var "g")))
-
--- | Try to verify and correct IR type args using annotation-based arg types.
-correctTypeAppsWithArgs :: TTermDefinition ([Name] -> [Type] -> Type -> [Term] -> Context -> Graph -> Either Error [Type])
-correctTypeAppsWithArgs = def "correctTypeAppsWithArgs" $
-  lambda "schemeVars" $ lambda "fallbackTypeApps" $ lambda "schemeType" $ lambda "args" $
-    "cx" ~> "g" ~>
-    "schemeVarSet" <~ Sets.fromList (var "schemeVars") $
-    "irSubst" <~ Maps.fromList (Lists.zip (var "schemeVars") (var "fallbackTypeApps")) $
-    "peeled" <~ peelDomainTypes @@ Lists.length (var "args") @@ var "schemeType" $
-    "schemeDoms" <~ Pairs.first (var "peeled") $
-    "mArgTypes" <<~ Eithers.mapList
-      (lambda "arg" $
-        getTypeE (var "cx") (var "g") ((Annotations.termAnnotationInternal @@ var "arg")))
-      (var "args") $
-    Logic.ifElse
-      (Logic.not (Lists.null (Lists.filter (lambda "m" $ Maybes.isNothing (var "m")) (var "mArgTypes"))))
-      (right (var "fallbackTypeApps"))
-      ("argTypes" <~ Lists.bind (var "mArgTypes")
-        (lambda "m" $ Maybes.cases (var "m") (list ([] :: [TTerm Type])) (lambda "x" $ Lists.pure (var "x"))) $
-      "irDoms" <~ Lists.map (lambda "d" $ applySubstSimple @@ var "irSubst" @@ var "d") (var "schemeDoms") $
-      "domsMatch" <~ Lists.null (Lists.filter
-        (lambda "p" $ Logic.not (typesMatch @@ (Strip.deannotateType @@ Pairs.first (var "p"))
-                                              @@ (Strip.deannotateType @@ Pairs.second (var "p"))))
-        (Lists.zip (var "irDoms") (var "argTypes"))) $
-      Logic.ifElse (var "domsMatch")
-        (right (var "fallbackTypeApps"))
-        (right (resolveTypeApps @@ var "schemeVars" @@ var "fallbackTypeApps"
-          @@ (buildArgSubst @@ var "schemeVarSet" @@ var "schemeDoms" @@ var "argTypes"))))
-
--- | Count the number of parameters in a function type by peeling domain types.
-countFunctionParams :: TTermDefinition (Type -> Int)
-countFunctionParams = def "countFunctionParams" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ int32 0) [
-      _Type_function>>: lambda "ft" $
-        Math.add (int32 1) (countFunctionParams @@ Core.functionTypeCodomain (var "ft"))]
-
--- | Create a record type class declaration (without parent class).
-declarationForRecordType :: TTermDefinition (Bool -> Bool -> JavaHelpers.Aliases -> [Java.TypeParameter] -> Name
-  -> [FieldType] -> Context -> Graph -> Either Error Java.ClassDeclaration)
-declarationForRecordType = def "declarationForRecordType" $
-  lambda "isInner" $ lambda "isSer" $ lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "fields" $
-    "cx" ~> "g" ~>
-    declarationForRecordType' @@ var "isInner" @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName" @@ nothing @@ var "fields" @@ var "cx" @@ var "g"
-
--- | Create a record type class declaration (with optional parent class).
-declarationForRecordType' :: TTermDefinition (Bool -> Bool -> JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> Maybe Name -> [FieldType]
-  -> Context -> Graph -> Either Error Java.ClassDeclaration)
-declarationForRecordType' = def "declarationForRecordType'" $
-  lambda "isInner" $ lambda "isSer" $ lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "parentName" $ lambda "fields" $
-    "cx" ~> "g" ~>
-    "memberVars" <<~ (Eithers.mapList (lambda "f" $ recordMemberVar @@ var "aliases" @@ var "f" @@ var "cx" @@ var "g") (var "fields")) $
-    "memberVars'" <<~ (Eithers.mapList (lambda "p" $ addComment @@ (Pairs.first (var "p")) @@ (Pairs.second (var "p")) @@ var "cx" @@ var "g")
-      (Lists.zip (var "memberVars") (var "fields"))) $
-    "withMethods" <<~ (Logic.ifElse (Equality.gt (Lists.length (var "fields")) (int32 1))
-      (Eithers.mapList (lambda "f" $ recordWithMethod @@ var "aliases" @@ var "elName" @@ var "fields" @@ var "f" @@ var "cx" @@ var "g") (var "fields"))
-      (right (list ([] :: [TTerm Java.ClassBodyDeclaration])))) $
-    "cons" <<~ (recordConstructor @@ var "aliases" @@ var "elName" @@ var "fields" @@ var "cx" @@ var "g") $
-    "tn" <<~ (Logic.ifElse (var "isInner")
-      (right (list ([] :: [TTerm Java.ClassBodyDeclarationWithComments])))
-      ("d" <<~ (constantDeclForTypeName @@ var "aliases" @@ var "elName" @@ var "cx" @@ var "g") $
-        "dfields" <<~ (Eithers.mapList (lambda "f" $ constantDeclForFieldType @@ var "aliases" @@ var "f" @@ var "cx" @@ var "g") (var "fields")) $
-        right (Lists.cons (var "d") (var "dfields")))) $
-    "comparableMethods" <~ (Maybes.cases (var "parentName")
-      (Logic.ifElse (Logic.and (Logic.not (var "isInner")) (var "isSer"))
-        (list [recordCompareToMethod @@ var "aliases" @@ var "tparams" @@ var "elName" @@ var "fields"])
-        (list ([] :: [TTerm Java.ClassBodyDeclaration])))
-      (lambda "pn" $ Logic.ifElse (var "isSer")
-        (list [variantCompareToMethod @@ var "aliases" @@ var "tparams" @@ var "pn" @@ var "elName" @@ var "fields"])
-        (list ([] :: [TTerm Java.ClassBodyDeclaration])))) $
-    "bodyDecls" <~ (Lists.concat2 (var "tn") (Lists.concat2 (var "memberVars'")
-      (Lists.map (lambda "x" $ noComment @@ var "x")
-        (Lists.concat2
-          (list [var "cons",
-                 recordEqualsMethod @@ var "aliases" @@ var "elName" @@ var "fields",
-                 recordHashCodeMethod @@ var "fields"])
-          (Lists.concat2 (var "comparableMethods") (var "withMethods")))))) $
-    "ifaces" <~ (Logic.ifElse (var "isInner")
-      (serializableTypes @@ var "isSer")
-      (interfaceTypes @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName")) $
-    right (JavaUtilsSource.javaClassDeclaration @@ var "aliases" @@ var "tparams" @@ var "elName"
-      @@ asTerm classModsPublic @@ nothing @@ var "ifaces" @@ var "bodyDecls")
-
--- | Generate class declaration for a union type.
-declarationForUnionType :: TTermDefinition (Bool -> JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> [FieldType] -> Context -> Graph -> Either Error Java.ClassDeclaration)
-declarationForUnionType = def "declarationForUnionType" $
-  lambda "isSer" $ lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "fields" $
-    "cx" ~> "g" ~>
-    -- Generate variant subclasses
-    "variantClasses" <<~ (Eithers.mapList (lambda "ft" $
-      "fname" <~ (project _FieldType _FieldType_name @@ var "ft") $
-      "ftype" <~ (project _FieldType _FieldType_type @@ var "ft") $
-      "rfields" <~ Logic.ifElse (Predicates.isUnitType @@ (Strip.deannotateType @@ var "ftype"))
-        (list ([] :: [TTerm FieldType]))
-        (list [Core.fieldType (wrap _Name (string "value")) (Strip.deannotateType @@ var "ftype")]) $
-      "varName" <~ (JavaUtilsSource.variantClassName @@ false @@ var "elName" @@ var "fname") $
-      "innerDecl" <<~ (declarationForRecordType' @@ true @@ var "isSer" @@ var "aliases" @@ (list ([] :: [TTerm Java.TypeParameter]))
-        @@ var "varName" @@ (Logic.ifElse (var "isSer") (just (var "elName")) nothing) @@ var "rfields" @@ var "cx" @@ var "g") $
-      right (augmentVariantClass @@ var "aliases" @@ var "tparams" @@ var "elName" @@ var "innerDecl"))
-      (var "fields")) $
-    -- Wrap variant classes as class body declarations and add comments
-    "variantDecls" <~ Lists.map
-      (lambda "vc" $ inject Java._ClassBodyDeclaration Java._ClassBodyDeclaration_classMember
-        (inject Java._ClassMemberDeclaration Java._ClassMemberDeclaration_class (var "vc")))
-      (var "variantClasses") $
-    "variantDecls'" <<~ (Eithers.mapList
-      (lambda "pair" $ addComment @@ (Pairs.first (var "pair")) @@ (Pairs.second (var "pair")) @@ var "cx" @@ var "g")
-      (Lists.zip (var "variantDecls") (var "fields"))) $
-    -- Build other declarations
-    "privateConst" <~ (JavaUtilsSource.makeConstructor @@ var "aliases" @@ var "elName" @@ true
-      @@ list ([] :: [TTerm Java.FormalParameter]) @@ list ([] :: [TTerm Java.BlockStatement])) $
-    "acceptDecl" <~ (JavaUtilsSource.toAcceptMethod @@ true @@ var "tparams") $
-    -- Build visitor and partial visitor interfaces
-    "vtparams" <~ Lists.concat2 (var "tparams") (list [JavaUtilsSource.javaTypeParameter @@ asTerm JavaNamesSource.visitorReturnParameter]) $
-    "visitorMethods" <~ Lists.map
-      (lambda "ft" $
-        "fname" <~ (project _FieldType _FieldType_name @@ var "ft") $
-        "typeArgs" <~ Lists.map (lambda "tp" $ JavaUtilsSource.typeParameterToTypeArgument @@ var "tp") (var "tparams") $
-        "varRef" <~ (JavaUtilsSource.javaClassTypeToJavaType @@
-          (JavaUtilsSource.nameToJavaClassType @@ var "aliases" @@ false @@ var "typeArgs"
-            @@ (JavaUtilsSource.variantClassName @@ false @@ var "elName" @@ var "fname") @@ nothing)) $
-        "param" <~ (JavaUtilsSource.javaTypeToJavaFormalParameter @@ var "varRef" @@ wrap _Name (string "instance")) $
-        "resultR" <~ (JavaUtilsSource.javaTypeToJavaResult @@ (JavaDsl.typeReference (asTerm JavaUtilsSource.visitorTypeVariable))) $
-        JavaUtilsSource.interfaceMethodDeclaration @@ list ([] :: [TTerm Java.InterfaceMethodModifier]) @@ list ([] :: [TTerm Java.TypeParameter])
-          @@ asTerm JavaNamesSource.visitMethodName @@ list [var "param"] @@ var "resultR" @@ nothing)
-      (var "fields") $
-    "visitorBody" <~ wrap Java._InterfaceBody (var "visitorMethods") $
-    "visitor" <~ (JavaUtilsSource.javaInterfaceDeclarationToJavaClassBodyDeclaration @@
-      (record Java._NormalInterfaceDeclaration [
-        Java._NormalInterfaceDeclaration_modifiers>>: list [inject Java._InterfaceModifier Java._InterfaceModifier_public unit],
-        Java._NormalInterfaceDeclaration_identifier>>: wrap Java._TypeIdentifier (JavaDsl.identifier (asTerm JavaNamesSource.visitorName)),
-        Java._NormalInterfaceDeclaration_parameters>>: var "vtparams",
-        Java._NormalInterfaceDeclaration_extends>>: list ([] :: [TTerm Java.InterfaceType]),
-        Java._NormalInterfaceDeclaration_body>>: var "visitorBody"])) $
-    -- Partial visitor: extends Visitor, has default otherwise() and override visit methods
-    "typeArgs" <~ Lists.map (lambda "tp" $ JavaUtilsSource.typeParameterToTypeArgument @@ var "tp") (var "tparams") $
-    "visitorClassType" <~ (JavaUtilsSource.javaClassType @@
-      (Lists.concat2 (Lists.map (lambda "tp" $ JavaUtilsSource.typeParameterToReferenceType @@ var "tp") (var "tparams"))
-        (list [asTerm JavaUtilsSource.visitorTypeVariable]))
-      @@ nothing @@ asTerm JavaNamesSource.visitorName) $
-    -- otherwise method: throws IllegalStateException
-    "mainInstanceParam" <~ (JavaUtilsSource.javaTypeToJavaFormalParameter @@
-      (JavaUtilsSource.javaClassTypeToJavaType @@
-        (JavaUtilsSource.nameToJavaClassType @@ var "aliases" @@ false @@ var "typeArgs" @@ var "elName" @@ nothing))
-      @@ wrap _Name (string "instance")) $
-    "resultR" <~ (JavaUtilsSource.javaTypeToJavaResult @@ (JavaDsl.typeReference (asTerm JavaUtilsSource.visitorTypeVariable))) $
-    "throwStmt" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaThrowIllegalStateException @@
-      list [JavaUtilsSource.javaAdditiveExpressionToJavaExpression @@ (JavaUtilsSource.addExpressions @@ list [
-        JavaUtilsSource.javaStringMultiplicativeExpression @@ string "Non-exhaustive patterns when matching: ",
-        inject Java._MultiplicativeExpression Java._MultiplicativeExpression_unary
-          (JavaUtilsSource.javaIdentifierToJavaUnaryExpression @@ (JavaDsl.identifier (string "instance")))])])) $
-    "defaultMod" <~ list [inject Java._InterfaceMethodModifier Java._InterfaceMethodModifier_default unit] $
-    "otherwiseDecl" <~ (JavaUtilsSource.interfaceMethodDeclaration @@ var "defaultMod" @@ list ([] :: [TTerm Java.TypeParameter])
-      @@ asTerm JavaNamesSource.otherwiseMethodName @@ list [var "mainInstanceParam"] @@ var "resultR"
-      @@ just (list [var "throwStmt"])) $
-    -- Partial visitor visit methods: default to calling otherwise()
-    "pvVisitMethods" <~ Lists.map
-      (lambda "ft" $
-        "fname" <~ (project _FieldType _FieldType_name @@ var "ft") $
-        "varRef" <~ (JavaUtilsSource.javaClassTypeToJavaType @@
-          (JavaUtilsSource.nameToJavaClassType @@ var "aliases" @@ false @@ var "typeArgs"
-            @@ (JavaUtilsSource.variantClassName @@ false @@ var "elName" @@ var "fname") @@ nothing)) $
-        "param" <~ (JavaUtilsSource.javaTypeToJavaFormalParameter @@ var "varRef" @@ wrap _Name (string "instance")) $
-        "mi" <~ (JavaUtilsSource.methodInvocation @@ nothing
-              @@ JavaDsl.identifier (asTerm JavaNamesSource.otherwiseMethodName)
-              @@ list [JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaDsl.identifier (string "instance"))]) $
-        "returnOtherwise" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just
-          (JavaUtilsSource.javaPrimaryToJavaExpression @@
-            (JavaUtilsSource.javaMethodInvocationToJavaPrimary @@ var "mi")))) $
-        JavaUtilsSource.interfaceMethodDeclaration @@ var "defaultMod" @@ list ([] :: [TTerm Java.TypeParameter])
-          @@ asTerm JavaNamesSource.visitMethodName @@ list [var "param"] @@ var "resultR"
-          @@ just (list [var "returnOtherwise"]))
-      (var "fields") $
-    "pvBody" <~ wrap Java._InterfaceBody (list [var "otherwiseDecl"] `Lists.concat2` var "pvVisitMethods") $
-    "partialVisitor" <~ (JavaUtilsSource.javaInterfaceDeclarationToJavaClassBodyDeclaration @@
-      (record Java._NormalInterfaceDeclaration [
-        Java._NormalInterfaceDeclaration_modifiers>>: list [inject Java._InterfaceModifier Java._InterfaceModifier_public unit],
-        Java._NormalInterfaceDeclaration_identifier>>: wrap Java._TypeIdentifier (JavaDsl.identifier (asTerm JavaNamesSource.partialVisitorName)),
-        Java._NormalInterfaceDeclaration_parameters>>: var "vtparams",
-        Java._NormalInterfaceDeclaration_extends>>: list [wrap Java._InterfaceType (var "visitorClassType")],
-        Java._NormalInterfaceDeclaration_body>>: var "pvBody"])) $
-    -- Build constant declarations
-    "tn0" <<~ (constantDeclForTypeName @@ var "aliases" @@ var "elName" @@ var "cx" @@ var "g") $
-    "tn1" <<~ (Eithers.mapList (lambda "ft" $ constantDeclForFieldType @@ var "aliases" @@ var "ft" @@ var "cx" @@ var "g") (var "fields")) $
-    "tn" <~ list [var "tn0"] `Lists.concat2` var "tn1" $
-    "otherDecls" <~ Lists.map (lambda "d" $ noComment @@ var "d")
-      (list [var "privateConst", var "acceptDecl", var "visitor", var "partialVisitor"]) $
-    "bodyDecls" <~ Lists.concat (list [var "tn", var "otherDecls", var "variantDecls'"]) $
-    "mods" <~ Lists.concat2 (asTerm classModsPublic) (list [inject Java._ClassModifier Java._ClassModifier_abstract unit]) $
-    right (JavaUtilsSource.javaClassDeclaration @@ var "aliases" @@ var "tparams" @@ var "elName" @@ var "mods"
-      @@ nothing @@ (interfaceTypes @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName") @@ var "bodyDecls")
-
--- | Decode a Type from its term encoding (limited subset).
-decodeTypeFromTerm :: TTermDefinition (Term -> Maybe Type)
-decodeTypeFromTerm = def "decodeTypeFromTerm" $
-  lambda "term" $
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just nothing) [
-      _Term_inject>>: lambda "inj" $
-        Logic.ifElse
-          (Equality.equal (Core.injectionTypeName (var "inj")) (Core.name (string "hydra.core.Type")))
-          ("fname" <~ Core.unName (Core.fieldName (Core.injectionField (var "inj"))) $
-           "fterm" <~ Core.fieldTerm (Core.injectionField (var "inj")) $
-           Logic.ifElse
-             (Equality.equal (var "fname") (string "variable"))
-             (cases _Term (var "fterm")
-               (Just nothing) [
-               _Term_wrap>>: lambda "wt" $
-                 cases _Term (Core.wrappedTermBody (var "wt"))
-                   (Just nothing) [
-                   _Term_literal>>: lambda "lit" $
-                     cases _Literal (var "lit")
-                       (Just nothing) [
-                       _Literal_string>>: lambda "s" $
-                         just (Core.typeVariable (Core.name (var "s")))]]])
-             (Logic.ifElse
-               (Equality.equal (var "fname") (string "annotated"))
-               (cases _Term (var "fterm")
-                 (Just nothing) [
-                 _Term_record>>: lambda "rec" $
-                   Maybes.bind
-                     (Lists.maybeHead (Lists.filter
-                       (lambda "f" $ Equality.equal (Core.fieldName (var "f")) (Core.name (string "body")))
-                       (Core.recordFields (var "rec"))))
-                     (lambda "bodyField" $
-                       decodeTypeFromTerm @@ Core.fieldTerm (var "bodyField"))])
-               (Logic.ifElse
-                 (Equality.equal (var "fname") (string "application"))
-                 (cases _Term (var "fterm")
-                   (Just nothing) [
-                   _Term_record>>: lambda "rec" $
-                     Maybes.bind
-                       (Lists.maybeHead (Lists.filter
-                         (lambda "f" $ Equality.equal (Core.fieldName (var "f")) (Core.name (string "function")))
-                         (Core.recordFields (var "rec"))))
-                       (lambda "funcField" $
-                         Maybes.bind (decodeTypeFromTerm @@ Core.fieldTerm (var "funcField")) (lambda "func" $
-                           Maybes.bind
-                             (Lists.maybeHead (Lists.filter
-                               (lambda "f" $ Equality.equal (Core.fieldName (var "f")) (Core.name (string "argument")))
-                               (Core.recordFields (var "rec"))))
-                             (lambda "argField" $
-                               Maybes.map
-                                 (lambda "arg" $ Core.typeApplication (Core.applicationType (var "func") (var "arg")))
-                                 (decodeTypeFromTerm @@ Core.fieldTerm (var "argField")))))])
-                 (Logic.ifElse
-                   (Equality.equal (var "fname") (string "function"))
-                   (cases _Term (var "fterm")
-                     (Just nothing) [
-                     _Term_record>>: lambda "rec" $
-                       Maybes.bind
-                         (Lists.maybeHead (Lists.filter
-                           (lambda "f" $ Equality.equal (Core.fieldName (var "f")) (Core.name (string "domain")))
-                           (Core.recordFields (var "rec"))))
-                         (lambda "domField" $
-                           Maybes.bind (decodeTypeFromTerm @@ Core.fieldTerm (var "domField")) (lambda "dom" $
-                             Maybes.bind
-                               (Lists.maybeHead (Lists.filter
-                                 (lambda "f" $ Equality.equal (Core.fieldName (var "f")) (Core.name (string "codomain")))
-                                 (Core.recordFields (var "rec"))))
-                               (lambda "codField" $
-                                 Maybes.map
-                                   (lambda "cod" $ Core.typeFunction (Core.functionType (var "dom") (var "cod")))
-                                   (decodeTypeFromTerm @@ Core.fieldTerm (var "codField")))))])
-                   (Logic.ifElse
-                     (Equality.equal (var "fname") (string "literal"))
-                     (cases _Term (var "fterm")
-                       (Just nothing) [
-                       _Term_inject>>: lambda "litInj" $
-                         Logic.ifElse
-                           (Equality.equal (Core.unName (Core.fieldName (Core.injectionField (var "litInj")))) (string "string"))
-                           (just (Core.typeLiteral (inject _LiteralType _LiteralType_string unit)))
-                           nothing])
-                     nothing)))))
-          nothing]
-
--- | Deduplicate binding names that collide with in-scope variables.
-dedupBindings :: TTermDefinition (S.Set Name -> [Binding] -> [Binding])
-dedupBindings = def "dedupBindings" $
-  lambda "inScope" $ lambda "bs" $
-    Maybes.fromMaybe (list ([] :: [TTerm Binding])) (Maybes.map
-      (lambda "p" $
-        "b" <~ Pairs.first (var "p") $
-        "rest" <~ Pairs.second (var "p") $
-        "name" <~ Core.bindingName (var "b") $
-       Logic.ifElse
-         (Sets.member (var "name") (var "inScope"))
-         ("newName" <~ (freshJavaName @@ var "name" @@ var "inScope") $
-          "subst" <~ Maps.singleton (var "name") (var "newName") $
-          "rest2" <~ Lists.map
-            (lambda "b2" $ Core.binding
-              (Core.bindingName (var "b2"))
-              (Variables.substituteVariables @@ var "subst" @@ Core.bindingTerm (var "b2"))
-              (Core.bindingTypeScheme (var "b2")))
-            (var "rest") $
-          Lists.cons
-            (Core.binding (var "newName") (Core.bindingTerm (var "b")) (Core.bindingTypeScheme (var "b")))
-            (dedupBindings @@ Sets.insert (var "newName") (var "inScope") @@ var "rest2"))
-         (Lists.cons (var "b")
-           (dedupBindings @@ Sets.insert (var "name") (var "inScope") @@ var "rest")))
-      (Lists.uncons (var "bs")))
-
--- | Detect over-generalized type variables in a scheme type.
-detectAccumulatorUnification :: TTermDefinition ([Type] -> Type -> [Name] -> M.Map Name Type)
-detectAccumulatorUnification = def "detectAccumulatorUnification" $
-  lambda "doms" $ lambda "cod" $ lambda "tparams" $
-    "tparamSet" <~ Sets.fromList (var "tparams") $
-    "allPairs" <~ Lists.bind (var "doms") (lambda "d" $ extractInOutPair @@ var "d") $
-    "groupedByInput" <~ (groupPairsByFirst @@ var "allPairs") $
-    "selfRefSubst" <~ (selfRefSubstitution @@ var "groupedByInput") $
-    "directPairs" <~ Lists.bind (var "doms") (lambda "d" $ extractDirectReturn @@ var "tparamSet" @@ var "d") $
-    "groupedDirect" <~ (groupPairsByFirst @@ var "directPairs") $
-    "directInputVars" <~ Sets.fromList (Lists.map (lambda "p" $ Pairs.first (var "p")) (var "directPairs")) $
-    "codVar" <~ (cases _Type (Strip.deannotateType @@ var "cod")
-      (Just nothing) [
-      _Type_variable>>: lambda "v" $ just (var "v")]) $
-    "directRefSubst" <~ (directRefSubstitution @@ var "directInputVars" @@ var "codVar" @@ var "groupedDirect") $
-    "codSubst" <~ (Maybes.maybe
-      (Maps.empty)
-      (lambda "cv" $
-        Logic.ifElse
-          (Maps.member (var "cv") (var "selfRefSubst"))
-          (Maps.empty)
-          (Maybes.maybe
-            (Maps.empty)
-            (lambda "refVar" $
-              Logic.ifElse
-                (Equality.equal (var "cv") (var "refVar"))
-                (Maps.empty)
-                (Maps.singleton (var "cv") (var "refVar")))
-            (findSelfRefVar @@ var "groupedByInput")))
-      (findPairFirst @@ var "cod")) $
-    "domVars" <~ Sets.fromList (Lists.bind (var "doms") (lambda "d" $ Sets.toList (collectTypeVars @@ var "d"))) $
-    "danglingSubst" <~ (Maybes.maybe
-      (Maps.empty)
-      (lambda "cv" $
-        Logic.ifElse
-          (Sets.member (var "cv") (var "domVars"))
-          (Maps.empty)
-          (Maybes.maybe
-            (Maps.empty)
-            (lambda "refVar" $ Maps.singleton (var "cv") (Core.typeVariable (var "refVar")))
-            (findSelfRefVar @@ var "groupedByInput")))
-      (findPairFirst @@ var "cod")) $
-    Maps.union (Maps.union (Maps.union
-      (nameMapToTypeMap @@ var "selfRefSubst")
-      (nameMapToTypeMap @@ var "codSubst"))
-      (var "danglingSubst"))
-      (nameMapToTypeMap @@ var "directRefSubst")
-
--- | Direct-return substitution: for each input var with >=2 self-refs and
--- safe non-self vars, substitute those vars to the input var.
-directRefSubstitution :: TTermDefinition (S.Set Name -> Maybe Name -> M.Map Name [Name] -> M.Map Name Name)
-directRefSubstitution = def "directRefSubstitution" $
-  lambda "directInputVars" $ lambda "codVar" $ lambda "grouped" $
-    Lists.foldl
-      (lambda "subst" $ lambda "entry" $
-        directRefSubstitution_processGroup
-          @@ var "directInputVars" @@ var "codVar"
-          @@ var "subst" @@ Pairs.first (var "entry") @@ Pairs.second (var "entry"))
-      (Maps.empty)
-      (Maps.toList (var "grouped"))
-
-directRefSubstitution_processGroup :: TTermDefinition (S.Set Name -> Maybe Name -> M.Map Name Name -> Name -> [Name] -> M.Map Name Name)
-directRefSubstitution_processGroup = def "directRefSubstitution_processGroup" $
-  lambda "directInputVars" $ lambda "codVar" $ lambda "subst" $ lambda "inVar" $ lambda "outVars" $
-    "selfRefCount" <~ Lists.length (Lists.filter (lambda "v" $ Equality.equal (var "v") (var "inVar")) (var "outVars")) $
-    "nonSelfVars" <~ Lists.filter (lambda "v" $ Logic.not (Equality.equal (var "v") (var "inVar"))) (var "outVars") $
-    "safeNonSelfVars" <~ Lists.filter
-      (lambda "v" $ Logic.and
-        (Logic.not (Sets.member (var "v") (var "directInputVars")))
-        (Logic.not (Equality.equal (just (var "v")) (var "codVar"))))
-      (var "nonSelfVars") $
-    Logic.ifElse
-      (Logic.and
-        (Equality.gte (var "selfRefCount") (int32 2))
-        (Logic.not (Lists.null (var "safeNonSelfVars"))))
-      (Lists.foldl
-        (lambda "s" $ lambda "v" $ Maps.insert (var "v") (var "inVar") (var "s"))
-        (var "subst")
-        (var "safeNonSelfVars"))
-      (var "subst")
-
--- | Extract Java type arguments from a domain type.
--- Uses actual type application args when available, falling back to javaTypeArgumentsForType.
-domTypeArgs :: TTermDefinition (JavaHelpers.Aliases -> Type -> Context -> Graph -> Either Error [Java.TypeArgument])
-domTypeArgs = def "domTypeArgs" $
-  lambda "aliases" $ lambda "d" $
-    "cx" ~> "g" ~>
-    "args" <~ (extractTypeApplicationArgs @@ (Strip.deannotateType @@ var "d")) $
-    Logic.ifElse (Logic.not (Lists.null (var "args")))
-      (Eithers.mapList (lambda "t" $
-        "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "t" @@ var "cx" @@ var "g") $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") $
-        right (JavaDsl.typeArgumentReference (var "rt")))
-        (var "args"))
-      (right (javaTypeArgumentsForType @@ var "d"))
-
--- | Generate a Java identifier for a data element (variable, constant, function, etc.)
-elementJavaIdentifier :: TTermDefinition (Bool -> Bool -> JavaHelpers.Aliases -> Name -> Java.Identifier)
-elementJavaIdentifier = def "elementJavaIdentifier" $
-  lambda "isPrim" $ lambda "isMethod" $ lambda "aliases" $ lambda "name" $ lets [
-    "qn">: Names.qualifyName @@ var "name",
-    "ns_">: Packaging.qualifiedNameNamespace (var "qn"),
-    "local">: Packaging.qualifiedNameLocal (var "qn"),
-    "sep">: Logic.ifElse (var "isMethod") (string "::") (string ".")] $
-    Logic.ifElse (var "isPrim")
-      (wrap Java._Identifier (Strings.cat2
-        (Strings.cat2
-          (elementJavaIdentifier_qualify @@ var "aliases" @@ var "ns_"
-            @@ (Formatting.capitalize @@ var "local"))
-          (string "."))
-        (asTerm JavaNamesSource.applyMethodName)))
-      (Maybes.cases (var "ns_")
-        (wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ var "local"))
-        (lambda "n" $ wrap Java._Identifier (Strings.cat2
-          (Strings.cat2
-            (elementJavaIdentifier_qualify @@ var "aliases" @@ (namespaceParent @@ var "n")
-              @@ (elementsClassName @@ var "n"))
-            (var "sep"))
-          (JavaUtilsSource.sanitizeJavaName @@ var "local"))))
-
--- | Helper for elementJavaIdentifier: qualify a name through the aliases
-elementJavaIdentifier_qualify :: TTermDefinition (JavaHelpers.Aliases -> Maybe Namespace -> String -> String)
-elementJavaIdentifier_qualify = def "elementJavaIdentifier_qualify" $
-  lambda "aliases" $ lambda "mns" $ lambda "s" $
-    unwrap Java._Identifier @@ (JavaUtilsSource.nameToJavaName @@ var "aliases"
-      @@ (Names.unqualifyName @@ Packaging.qualifiedName (var "mns") (var "s")))
-
--- | Convert a namespace to an elements class name (e.g., "hydra.java.syntax" -> "Syntax")
-elementsClassName :: TTermDefinition (Namespace -> String)
-elementsClassName = def "elementsClassName" $
-  lambda "ns" $ lets [
-    "nsStr">: unwrap _Namespace @@ var "ns",
-    "parts">: Strings.splitOn (string ".") (var "nsStr")] $
-    Formatting.sanitizeWithUnderscores @@ JavaLanguageSource.reservedWords
-      @@ (Formatting.capitalize @@ (Maybes.fromMaybe (var "nsStr") (Lists.maybeLast (var "parts"))))
-
--- | Produce the qualified name for a term module's elements interface.
--- Uses the parent namespace so that e.g. "hydra.formatting" -> "hydra.Formatting" (not "hydra.formatting.Formatting").
-elementsQualifiedName :: TTermDefinition (Namespace -> Name)
-elementsQualifiedName = def "elementsQualifiedName" $
-  lambda "ns" $
-    Names.unqualifyName @@ Packaging.qualifiedName (namespaceParent @@ var "ns") (elementsClassName @@ var "ns")
-
--- | Encode a function application.
-encodeApplication :: TTermDefinition (JavaHelpers.JavaEnvironment -> Application -> Context -> Graph -> Either Error Java.Expression)
-encodeApplication = def "encodeApplication" $
-  lambda "env" $ lambda "app" $
-    "cx" ~> "g0" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    "g" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env") $
-    -- Gather function, args, and type applications
-    "gathered" <~ (Analysis.gatherArgsWithTypeApps
-      @@ (inject _Term _Term_application (var "app"))
-      @@ list ([] :: [TTerm Term])
-      @@ list ([] :: [TTerm Type])) $
-    "fun" <~ Pairs.first (var "gathered") $
-    "args" <~ Pairs.first (Pairs.second (var "gathered")) $
-    "typeApps" <~ Pairs.second (Pairs.second (var "gathered")) $
-    -- Get the function's arity from its type
-    "mfunTyp" <<~ (getTypeE (var "cx") (var "g") (Annotations.termAnnotationInternal @@ var "fun")) $
-    "funTyp" <<~ (Maybes.cases (var "mfunTyp")
-      (Checking.typeOfTerm @@ var "cx" @@ var "g" @@ var "fun")
-      (lambda "t" $ right (var "t"))) $
-    "arity" <~ (Arity.typeArity @@ var "funTyp") $
-    -- Determine callee name for type annotation correction
-    "deannotatedFun" <~ (Strip.deannotateTerm @@ var "fun") $
-    "calleeName" <~ (cases _Term (var "deannotatedFun")
-      (Just nothing) [
-      _Term_variable>>: lambda "n" $ just (var "n")]) $
-    -- Annotate lambda args if we have a callee name
-    "annotatedArgs" <<~ (Maybes.cases (var "calleeName")
-      (right (var "args"))
-      (lambda "cname" $ annotateLambdaArgs @@ var "cname" @@ var "typeApps" @@ var "args" @@ var "cx" @@ var "g")) $
-    -- Dispatch based on the deannotated function form
-    cases _Term (var "deannotatedFun")
-      (Just $ encodeApplication_fallback @@ var "env" @@ var "aliases" @@ var "g" @@ var "typeApps"
-        @@ (Core.applicationFunction (var "app")) @@ (Core.applicationArgument (var "app")) @@ var "cx" @@ var "g") [
-      _Term_variable>>: lambda "name" $
-        -- If the variable resolves to a primitive, handle it like FunctionPrimitive
-        Logic.ifElse (Maybes.isJust (Maps.lookup (var "name") (Graph.graphPrimitives (var "g"))))
-          ("hargs" <~ Lists.take (var "arity") (var "annotatedArgs") $
-           "rargs" <~ Lists.drop (var "arity") (var "annotatedArgs") $
-           "initialCall" <<~ (functionCall @@ var "env" @@ true @@ var "name" @@ var "hargs" @@ (list ([] :: [TTerm Type])) @@ var "cx" @@ var "g") $
-           Eithers.foldl (lambda "acc" $ lambda "h" $
-             "jarg" <<~ (encodeTerm @@ var "env" @@ var "h" @@ var "cx" @@ var "g") $
-             right (applyJavaArg @@ var "acc" @@ var "jarg"))
-             (var "initialCall") (var "rargs"))
-        -- Check if this is a recursive let-bound variable (not shadowed by lambda parameter)
-        (Logic.ifElse (Logic.and (isRecursiveVariable @@ var "aliases" @@ var "name")
-            (Logic.not (isLambdaBoundIn @@ var "name"
-              @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases"))))
-          -- Use curried construction for recursive bindings
-          (encodeApplication_fallback @@ var "env" @@ var "aliases" @@ var "g" @@ var "typeApps"
-            @@ (Core.applicationFunction (var "app")) @@ (Core.applicationArgument (var "app")) @@ var "cx" @@ var "g")
-          -- Normal variable application
-          ("symClass" <<~ (classifyDataReference @@ var "name" @@ var "cx" @@ var "g") $
-            "methodArity" <~ (cases JavaHelpers._JavaSymbolClass (var "symClass")
-              (Just $ var "arity") [
-              JavaHelpers._JavaSymbolClass_hoistedLambda>>: lambda "n" $ var "n"]) $
-            "hargs" <~ Lists.take (var "methodArity") (var "annotatedArgs") $
-            "rargs" <~ Lists.drop (var "methodArity") (var "annotatedArgs") $
-            -- Filter type applications: drop all type args if any references a type variable not in scope
-            "trusted" <~ (project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases") $
-            "inScope" <~ (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases") $
-            "filteredTypeApps" <~ (Logic.ifElse (Logic.or (Sets.null (var "trusted")) (Sets.null (var "inScope")))
-              (list ([] :: [TTerm Type]))
-              ("allVars" <~ Sets.unions (Lists.map (lambda "t" $ collectTypeVars @@ var "t") (var "typeApps")) $
-                Logic.ifElse (Logic.not (Sets.null (Sets.difference (var "allVars") (var "inScope"))))
-                  (list ([] :: [TTerm Type]))
-                  (Logic.ifElse (Sets.null (Sets.difference (var "allVars") (var "trusted")))
-                    (var "typeApps")
-                    (list ([] :: [TTerm Type]))))) $
-            -- Correct the type application ordering
-            "safeTypeApps" <<~ (Logic.ifElse (Lists.null (var "filteredTypeApps"))
-              (right (list ([] :: [TTerm Type])))
-              (correctTypeApps @@ var "g" @@ var "name" @@ var "hargs" @@ var "filteredTypeApps" @@ var "cx" @@ var "g")) $
-            -- Filter phantom type args
-            "finalTypeApps" <<~ (filterPhantomTypeArgs @@ var "name" @@ var "safeTypeApps" @@ var "cx" @@ var "g") $
-            "initialCall" <<~ (functionCall @@ var "env" @@ false @@ var "name" @@ var "hargs" @@ var "finalTypeApps" @@ var "cx" @@ var "g") $
-            Eithers.foldl (lambda "acc" $ lambda "h" $
-              "jarg" <<~ (encodeTerm @@ var "env" @@ var "h" @@ var "cx" @@ var "g") $
-              right (applyJavaArg @@ var "acc" @@ var "jarg"))
-              (var "initialCall") (var "rargs")))]
-
--- | Fallback path for encodeApplication — used for eliminations and default expressions.
-encodeApplication_fallback :: TTermDefinition (JavaHelpers.JavaEnvironment -> JavaHelpers.Aliases -> Graph -> [Type] -> Term -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeApplication_fallback = def "encodeApplication_fallback" $
-  lambda "env" $ lambda "aliases" $ lambda "gr" $ lambda "typeApps" $ lambda "lhs" $ lambda "rhs" $
-    "cx" ~> "g" ~>
-    ("mt" <<~ (getTypeE (var "cx") (var "g") (Annotations.termAnnotationInternal @@ var "lhs")) $
-    "t" <<~ (Maybes.cases (var "mt")
-      (Checking.typeOfTerm @@ var "cx" @@ var "g" @@ var "lhs")
-      (lambda "typ" $ right (var "typ"))) $
-    cases _Type (Strip.deannotateTypeParameters @@ (Strip.deannotateType @@ var "t"))
-      (Just $
-        -- Non-function type: encode as generic .apply() call
-        "jfun" <<~ (encodeTerm @@ var "env" @@ var "lhs" @@ var "cx" @@ var "g") $
-        "jarg" <<~ (encodeTerm @@ var "env" @@ var "rhs" @@ var "cx" @@ var "g") $
-        right (applyJavaArg @@ var "jfun" @@ var "jarg")) [
-      _Type_function>>: lambda "ft" $
-        "dom" <~ Core.functionTypeDomain (var "ft") $
-        "cod" <~ Core.functionTypeCodomain (var "ft") $
-        "defaultExpr" <~ (
-            "jfun" <<~ (encodeTerm @@ var "env" @@ var "lhs" @@ var "cx" @@ var "g") $
-            "jarg" <<~ (encodeTerm @@ var "env" @@ var "rhs" @@ var "cx" @@ var "g") $
-            right (applyJavaArg @@ var "jfun" @@ var "jarg")) $
-        "elimBranch" <~ (
-            "jarg" <<~ (encodeTerm @@ var "env" @@ var "rhs" @@ var "cx" @@ var "g") $
-            -- If dom has no type args, try to get a richer type from the argument
-            "enrichedDom" <<~ (Logic.ifElse
-              (Logic.not (Lists.null (javaTypeArgumentsForType @@ var "dom")))
-              (right (var "dom"))
-              ("mrt" <<~ (getTypeE (var "cx") (var "g") (Annotations.termAnnotationInternal @@ var "rhs")) $
-                Maybes.cases (var "mrt")
-                  ("rt" <<~ (Checking.typeOfTerm @@ var "cx" @@ var "g" @@ var "rhs") $
-                    right (Logic.ifElse (Logic.not (Lists.null (javaTypeArgumentsForType @@ var "rt")))
-                      (var "rt")
-                      (var "dom")))
-                  (lambda "rt" $
-                    right (Logic.ifElse (Logic.not (Lists.null (javaTypeArgumentsForType @@ var "rt")))
-                      (var "rt")
-                      (var "dom"))))) $
-            encodeElimination @@ var "env" @@ just (var "jarg") @@ var "enrichedDom" @@ var "cod" @@ (Strip.deannotateTerm @@ var "lhs") @@ var "cx" @@ var "g") $
-        cases _Term (Strip.deannotateTerm @@ var "lhs")
-          (Just $ var "defaultExpr") [
-          _Term_project>>: lambda "_p" $ var "elimBranch",
-          _Term_cases>>: lambda "_c" $ var "elimBranch",
-          _Term_unwrap>>: lambda "_w" $ var "elimBranch"]])
-
--- | Encode all definitions in a module to Java compilation units.
-encodeDefinitions :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map Name Java.CompilationUnit))
-encodeDefinitions = def "encodeDefinitions" $
-  lambda "mod" $ lambda "defs" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (JavaUtilsSource.importAliasesForModule @@ var "mod") $
-    "env" <~ (record JavaHelpers._JavaEnvironment [
-      JavaHelpers._JavaEnvironment_aliases>>: var "aliases",
-      JavaHelpers._JavaEnvironment_graph>>: var "g"]) $
-    "pkg" <~ (JavaUtilsSource.javaPackageDeclaration @@ (Packaging.moduleNamespace (var "mod"))) $
-    "partitioned" <~ (Environment.partitionDefinitions @@ var "defs") $
-    "typeDefs" <~ Pairs.first (var "partitioned") $
-    "termDefs" <~ Pairs.second (var "partitioned") $
-    -- Filter out typedefs (non-record/union/wrap types)
-    "nonTypedefDefs" <~ Lists.filter (lambda "td" $
-      "typ" <~ (Core.typeSchemeBody $ project _TypeDefinition _TypeDefinition_typeScheme @@ var "td") $
-      isSerializableJavaType @@ (var "typ"))
-      (var "typeDefs") $
-    "typeUnits" <<~ (Eithers.mapList (lambda "td" $ encodeTypeDefinition @@ var "pkg" @@ var "aliases" @@ var "td" @@ var "cx" @@ var "g") (var "nonTypedefDefs")) $
-    "termUnits" <<~ Logic.ifElse (Lists.null (var "termDefs"))
-      (right (list ([] :: [TTerm (Name, Java.CompilationUnit)])))
-      ("dataMembers" <<~ (Eithers.mapList (lambda "td" $ encodeTermDefinition @@ var "env" @@ var "td" @@ var "cx" @@ var "g") (var "termDefs")) $
-        right (list [constructElementsInterface @@ var "mod" @@ var "dataMembers"])) $
-    right (Maps.fromList (Lists.concat2 (var "typeUnits") (var "termUnits")))
-
--- | Encode an elimination expression. The "elimTerm" argument must be one of
--- the elimination-form Term variants: project, cases, or unwrap.
-encodeElimination :: TTermDefinition (JavaHelpers.JavaEnvironment -> Maybe Java.Expression -> Type -> Type -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeElimination = def "encodeElimination" $
-  lambda "env" $ lambda "marg" $ lambda "dom" $ lambda "cod" $ lambda "elimTerm" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    cases _Term (Strip.deannotateTerm @@ var "elimTerm")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "unexpected ") (Strings.cat2 (string "elimination case") (Strings.cat2 (string " in ") (string "encodeElimination")))) (var "cx")) [
-
-      -- Projection: field projection
-      _Term_project>>: lambda "proj" $
-        "fname" <~ (Core.projectionField (var "proj")) $
-        "jdom0" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "dom" @@ var "cx" @@ var "g") $
-        "jdomr" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jdom0" @@ var "cx") $
-        Maybes.cases (var "marg")
-          -- No arg: generate lambda for projection
-          ("projVar" <~ wrap _Name (string "projected") $
-            "jbody" <~ (JavaUtilsSource.javaExpressionNameToJavaExpression @@
-              (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "projVar")
-                @@ (JavaUtilsSource.javaIdentifier @@ (Core.unName (var "fname"))))) $
-            right (JavaUtilsSource.javaLambda @@ var "projVar" @@ var "jbody"))
-          -- With arg: field access on expression
-          (lambda "jarg" $
-            "qual" <~ (inject Java._FieldAccess_Qualifier Java._FieldAccess_Qualifier_primary
-              (JavaUtilsSource.javaExpressionToJavaPrimary @@ var "jarg")) $
-            right (JavaUtilsSource.javaFieldAccessToJavaExpression @@ (record Java._FieldAccess [
-              Java._FieldAccess_qualifier>>: var "qual",
-              Java._FieldAccess_identifier>>: JavaUtilsSource.javaIdentifier @@ (Core.unName (var "fname"))]))),
-
-      -- Case statement
-      _Term_cases>>: lambda "cs" $
-        "tname" <~ (project _CaseStatement _CaseStatement_typeName @@ var "cs") $
-        "def_" <~ (project _CaseStatement _CaseStatement_default @@ var "cs") $
-        "fields" <~ (project _CaseStatement _CaseStatement_cases @@ var "cs") $
-        Maybes.cases (var "marg")
-          -- No arg: wrap elimination in a lambda
-          ("uVar" <~ wrap _Name (string "u") $
-            "typedLambda" <~ (inject _Term _Term_lambda (record _Lambda [
-              _Lambda_parameter>>: var "uVar",
-              _Lambda_domain>>: just (var "dom"),
-              _Lambda_body>>: inject _Term _Term_application (record _Application [
-                _Application_function>>: var "elimTerm",
-                _Application_argument>>: inject _Term _Term_variable (var "uVar")])])) $
-            encodeTerm @@ var "env" @@ var "typedLambda" @@ var "cx" @@ var "g")
-          -- With arg: apply elimination to visitor
-          (lambda "jarg" $
-            "prim" <~ (JavaUtilsSource.javaExpressionToJavaPrimary @@ var "jarg") $
-            "consId" <~ (innerClassRef @@ var "aliases" @@ var "tname" @@ asTerm JavaNamesSource.partialVisitorName) $
-            "effectiveCod" <~ (var "cod") $
-            "jcod" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "effectiveCod" @@ var "cx" @@ var "g") $
-            "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jcod" @@ var "cx") $
-            "domArgs" <<~ (domTypeArgs @@ var "aliases" @@ var "dom" @@ var "cx" @@ var "g") $
-            "targs" <~ (typeArgsOrDiamond @@ (Lists.concat2 (var "domArgs") (list [JavaDsl.typeArgumentReference (var "rt")]))) $
-            "otherwiseBranches" <<~ (Maybes.cases (var "def_")
-              (right (list ([] :: [TTerm Java.ClassBodyDeclarationWithComments])))
-              (lambda "d" $
-                "b" <<~ (otherwiseBranch @@ var "env" @@ var "aliases" @@ var "dom" @@ var "cod" @@ var "tname" @@ var "jcod" @@ var "domArgs" @@ var "d" @@ var "cx" @@ var "g") $
-                right (list [var "b"]))) $
-            "visitBranches" <<~ (Eithers.mapList (lambda "f" $ visitBranch @@ var "env" @@ var "aliases" @@ var "dom" @@ var "tname" @@ var "jcod" @@ var "domArgs" @@ var "f" @@ var "cx" @@ var "g") (var "fields")) $
-            "body" <~ wrap Java._ClassBody (Lists.concat2 (var "otherwiseBranches") (var "visitBranches")) $
-            "visitor" <~ (JavaUtilsSource.javaConstructorCall @@ (JavaUtilsSource.javaConstructorName @@ var "consId" @@ just (var "targs")) @@ list ([] :: [TTerm Java.Expression]) @@ just (var "body")) $
-            right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocation @@ just (right (var "prim"))
-                @@ JavaDsl.identifier (asTerm JavaNamesSource.acceptMethodName) @@ list [var "visitor"]))),
-
-      -- Unwrap: unwrap a newtype
-      _Term_unwrap>>: lambda "wrapName" $
-        "withArg" <~ (lambda "ja" $
-          JavaUtilsSource.javaFieldAccessToJavaExpression @@ (record Java._FieldAccess [
-            Java._FieldAccess_qualifier>>: inject Java._FieldAccess_Qualifier Java._FieldAccess_Qualifier_primary
-              (JavaUtilsSource.javaExpressionToJavaPrimary @@ var "ja"),
-            Java._FieldAccess_identifier>>: JavaUtilsSource.javaIdentifier @@ asTerm JavaNamesSource.valueFieldName])) $
-        right (Maybes.cases (var "marg")
-          -- No arg: generate lambda for unwrapping
-          ("wVar" <~ wrap _Name (string "wrapped") $
-            "wArg" <~ (JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "wVar")) $
-            JavaUtilsSource.javaLambda @@ var "wVar" @@ (var "withArg" @@ var "wArg"))
-          -- With arg: field access
-          (lambda "jarg" $ var "withArg" @@ var "jarg"))]
-
--- | Encode a function-form term. The "funTerm" argument must be one of
--- the function-form Term variants: lambda, project, cases, or unwrap.
-encodeFunction :: TTermDefinition (JavaHelpers.JavaEnvironment -> Type -> Type -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeFunction = def "encodeFunction" $
-  lambda "env" $ lambda "dom" $ lambda "cod" $ lambda "funTerm" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    "encodeLambdaFallback" <~ (lambda "env2" $ lambda "lam" $
-      "lambdaVar" <~ Core.lambdaParameter (var "lam") $
-      "body" <~ Core.lambdaBody (var "lam") $
-      "fs" <<~ (analyzeJavaFunction @@ var "env2" @@ var "body" @@ var "cx" @@ var "g") $
-      "bindings" <~ (project _FunctionStructure _FunctionStructure_bindings @@ var "fs") $
-      "innerBody" <~ (project _FunctionStructure _FunctionStructure_body @@ var "fs") $
-      "env3" <~ (project _FunctionStructure _FunctionStructure_environment @@ var "fs") $
-      "bindResult" <<~ (bindingsToStatements @@ var "env3" @@ var "bindings" @@ var "cx" @@ var "g") $
-      "bindingStmts" <~ Pairs.first (var "bindResult") $
-      "env4" <~ Pairs.second (var "bindResult") $
-      "jbody" <<~ (encodeTerm @@ var "env4" @@ var "innerBody" @@ var "cx" @@ var "g") $
-      "lam1" <~ (Logic.ifElse (Lists.null (var "bindings"))
-        (JavaUtilsSource.javaLambda @@ var "lambdaVar" @@ var "jbody")
-        ("returnSt" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "jbody"))) $
-          JavaUtilsSource.javaLambdaFromBlock @@ var "lambdaVar" @@
-            (wrap Java._Block (Lists.concat2 (var "bindingStmts") (list [var "returnSt"]))))) $
-      applyCastIfSafe @@ var "aliases" @@ (inject _Type _Type_function (record _FunctionType [
-        _FunctionType_domain>>: var "dom",
-        _FunctionType_codomain>>: var "cod"])) @@ var "lam1" @@ var "cx" @@ var "g") $
-    cases _Term (Strip.deannotateTerm @@ var "funTerm")
-      (Just $ right (encodeLiteral @@ (inject _Literal _Literal_string
-        (Strings.cat2 (string "Unimplemented function variant: ") (ShowCore.term @@ var "funTerm"))))) [
-
-      -- Projection: delegate to encodeElimination
-      _Term_project>>: lambda "_p" $
-        (encodeElimination @@ var "env" @@ nothing @@ var "dom" @@ var "cod" @@ (Strip.deannotateTerm @@ var "funTerm") @@ var "cx" @@ var "g"),
-
-      -- Case statement: delegate to encodeElimination
-      _Term_cases>>: lambda "_c" $
-        (encodeElimination @@ var "env" @@ nothing @@ var "dom" @@ var "cod" @@ (Strip.deannotateTerm @@ var "funTerm") @@ var "cx" @@ var "g"),
-
-      -- Unwrap: delegate to encodeElimination
-      _Term_unwrap>>: lambda "_w" $
-        (encodeElimination @@ var "env" @@ nothing @@ var "dom" @@ var "cod" @@ (Strip.deannotateTerm @@ var "funTerm") @@ var "cx" @@ var "g"),
-
-      -- Lambda: encode as Java lambda
-      _Term_lambda>>: lambda "lam" $
-        (withLambda @@ var "env" @@ var "lam" @@ (lambda "env2" $
-          "lambdaVar" <~ Core.lambdaParameter (var "lam") $
-          "body" <~ Core.lambdaBody (var "lam") $
-          cases _Term (Strip.deannotateTerm @@ var "body")
-            (Just $ var "encodeLambdaFallback" @@ var "env2" @@ var "lam") [
-
-            -- Body is another lambda: recursively encode it
-            _Term_lambda>>: lambda "innerLam" $
-              cases _Type (Strip.deannotateType @@ var "cod")
-                (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "expected function type for lambda body, but got: ")
-                  (ShowCore.type_ @@ var "cod")) (var "cx")) [
-                _Type_function>>: lambda "ft" $
-                  "dom2" <~ Core.functionTypeDomain (var "ft") $
-                  "cod2" <~ Core.functionTypeCodomain (var "ft") $
-                  "innerJavaLambda" <<~ (encodeFunction @@ var "env2" @@ var "dom2" @@ var "cod2"
-                    @@ (inject _Term _Term_lambda (var "innerLam")) @@ var "cx" @@ var "g") $
-                  "lam1" <~ (JavaUtilsSource.javaLambda @@ var "lambdaVar" @@ var "innerJavaLambda") $
-                  applyCastIfSafe @@ var "aliases" @@ (inject _Type _Type_function (record _FunctionType [
-                    _FunctionType_domain>>: var "dom",
-                    _FunctionType_codomain>>: var "cod"])) @@ var "lam1" @@ var "cx" @@ var "g"]]))]
-
--- | Shared handler for function-form Term variants (lambda, project, cases, unwrap)
--- at the encodeTermInternal level. Resolves the term's type and delegates to encodeFunction.
-encodeFunctionFormTerm :: TTermDefinition (JavaHelpers.JavaEnvironment -> [M.Map Name Term] -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeFunctionFormTerm = def "encodeFunctionFormTerm" $
-  lambda "env" $ lambda "anns" $ lambda "term" $
-    "cx" ~> "g" ~>
-    "combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-    "mt" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-    "typ" <<~ (Maybes.cases (var "mt")
-      (Maybes.cases (tryInferFunctionType @@ var "term")
-        (Checking.typeOfTerm @@ var "cx" @@ var "g" @@ var "term")
-        (lambda "inferredType" $ right (var "inferredType")))
-      (lambda "t" $ right (var "t"))) $
-    cases _Type (Strip.deannotateType @@ var "typ")
-      (Just $ encodeNullaryConstant @@ var "env" @@ var "typ" @@ var "term" @@ var "cx" @@ var "g") [
-      _Type_function>>: lambda "ft" $
-        encodeFunction @@ var "env" @@ (Core.functionTypeDomain (var "ft")) @@ (Core.functionTypeCodomain (var "ft")) @@ var "term" @@ var "cx" @@ var "g"]
-
--- | Encode a primitive reference (by name) with function-type arity, as a method reference or curried wrapper.
-encodeFunctionPrimitiveByName :: TTermDefinition (JavaHelpers.JavaEnvironment -> Type -> Type -> Name -> Context -> Graph -> Either Error Java.Expression)
-encodeFunctionPrimitiveByName = def "encodeFunctionPrimitiveByName" $
-  lambda "env" $ lambda "dom" $ lambda "cod" $ lambda "name" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    "classWithApply" <~ (JavaDsl.unIdentifier (elementJavaIdentifier @@ true @@ false @@ var "aliases" @@ var "name")) $
-    "suffix" <~ Strings.cat2 (string ".") (asTerm JavaNamesSource.applyMethodName) $
-    "className" <~ Strings.fromList (Lists.take
-      (Math.sub (Strings.length (var "classWithApply")) (Strings.length (var "suffix")))
-      (Strings.toList (var "classWithApply"))) $
-    "arity" <~ (Arity.typeArity @@ (inject _Type _Type_function (record _FunctionType [
-      _FunctionType_domain>>: var "dom",
-      _FunctionType_codomain>>: var "cod"]))) $
-    Logic.ifElse (Equality.lte (var "arity") (int32 1))
-      (right (JavaUtilsSource.javaIdentifierToJavaExpression @@
-        (JavaDsl.identifier (Strings.cat (list [var "className", string "::", asTerm JavaNamesSource.applyMethodName])))))
-      ("paramNames" <~ Lists.map
-        (lambda "i" $ wrap _Name (Strings.cat2 (string "p") (Literals.showInt32 (var "i"))))
-        (Math.range (int32 0) (Math.sub (var "arity") (int32 1))) $
-        "paramExprs" <~ Lists.map
-          (lambda "p" $ JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "p"))
-          (var "paramNames") $
-        "classId" <~ JavaDsl.identifier (var "className") $
-        "call" <~ (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-          (JavaUtilsSource.methodInvocationStatic @@ var "classId" @@ JavaDsl.identifier (asTerm JavaNamesSource.applyMethodName) @@ var "paramExprs")) $
-        "curried" <~ (buildCurriedLambda @@ var "paramNames" @@ var "call") $
-        "jtype" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ (inject _Type _Type_function (record _FunctionType [
-          _FunctionType_domain>>: var "dom",
-          _FunctionType_codomain>>: var "cod"])) @@ var "cx" @@ var "g") $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jtype" @@ var "cx") $
-        right (JavaUtilsSource.javaCastExpressionToJavaExpression @@
-          (JavaUtilsSource.javaCastExpression @@ var "rt" @@ (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "curried"))))
-
--- | Encode a literal value to a Java expression
-encodeLiteral :: TTermDefinition (Literal -> Java.Expression)
-encodeLiteral = def "encodeLiteral" $
-  lambda "lit" $
-    cases _Literal (var "lit") Nothing [
-      _Literal_binary>>: "bs" ~>
-        "byteValues" <~ Literals.binaryToBytes (var "bs") $
-        JavaUtilsSource.javaArrayCreation @@
-          (asTerm JavaUtilsSource.javaBytePrimitiveType) @@
-          (just $ JavaUtilsSource.javaArrayInitializer @@
-            (Lists.map
-              (lambda "w" $
-                JavaUtilsSource.javaLiteralToJavaExpression @@
-                  (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.int32ToBigint (var "w")))
-              (var "byteValues"))),
-      _Literal_boolean>>: "b" ~>
-        encodeLiteral_litExp @@ (JavaUtilsSource.javaBoolean @@ var "b"),
-      _Literal_decimal>>: "v" ~>
-        JavaUtilsSource.javaConstructorCall @@
-          (JavaUtilsSource.javaConstructorName @@
-            (JavaDsl.identifier $ string "java.math.BigDecimal") @@ nothing) @@
-          list [encodeLiteral @@ inject _Literal _Literal_string (Literals.showDecimal $ var "v")] @@
-          nothing,
-      _Literal_float>>: "f" ~> encodeLiteral_encodeFloat @@ var "f",
-      _Literal_integer>>: "i" ~> encodeLiteral_encodeInteger @@ var "i",
-      _Literal_string>>: "s" ~>
-        encodeLiteral_litExp @@ (JavaUtilsSource.javaString @@ var "s")]
-
--- | Encode a Hydra literal type to a Java type
-encodeLiteralType :: TTermDefinition (LiteralType -> Context -> Graph -> Either Error Java.Type)
-encodeLiteralType = def "encodeLiteralType" $
-  lambda "lt" $ 
-    "cx" ~> "g" ~>
-    cases _LiteralType (var "lt") Nothing [
-    _LiteralType_binary>>: constant $
-      right (JavaDsl.typeReference
-        (JavaDsl.referenceTypeArray
-          (JavaDsl.arrayType
-            (JavaDsl.dims (list [list ([] :: [TTerm Java.Annotation])]))
-            (JavaDsl.arrayTypeVariantPrimitive
-              (JavaDsl.primitiveTypeWithAnnotations
-                (JavaDsl.primitiveTypeNumeric (JavaDsl.numericTypeIntegral JavaDsl.integralTypeByte))
-                (list ([] :: [TTerm Java.Annotation]))))))),
-    _LiteralType_boolean>>: constant $
-      encodeLiteralType_simple @@ string "Boolean" @@ var "cx" @@ var "g",
-    _LiteralType_decimal>>: constant $
-      right (JavaUtilsSource.javaRefType
-        @@ list ([] :: [TTerm Java.ReferenceType])
-        @@ just (JavaNamesSource.javaPackageName @@ list [string "java", string "math"])
-        @@ string "BigDecimal"),
-    _LiteralType_float>>: lambda "ft" $
-      cases _FloatType (var "ft") Nothing [
-        _FloatType_bigfloat>>: constant $
-          right (JavaUtilsSource.javaRefType
-            @@ list ([] :: [TTerm Java.ReferenceType])
-            @@ just (JavaNamesSource.javaPackageName @@ list [string "java", string "math"])
-            @@ string "BigDecimal"),
-        _FloatType_float32>>: constant $
-          encodeLiteralType_simple @@ string "Float" @@ var "cx" @@ var "g",
-        _FloatType_float64>>: constant $
-          encodeLiteralType_simple @@ string "Double" @@ var "cx" @@ var "g"],
-    _LiteralType_integer>>: lambda "it" $
-      cases _IntegerType (var "it") Nothing [
-        _IntegerType_bigint>>: constant $
-          right (JavaUtilsSource.javaRefType
-            @@ list ([] :: [TTerm Java.ReferenceType])
-            @@ just (JavaNamesSource.javaPackageName @@ list [string "java", string "math"])
-            @@ string "BigInteger"),
-        _IntegerType_int8>>: constant $
-          encodeLiteralType_simple @@ string "Byte" @@ var "cx" @@ var "g",
-        _IntegerType_int16>>: constant $
-          encodeLiteralType_simple @@ string "Short" @@ var "cx" @@ var "g",
-        _IntegerType_int32>>: constant $
-          encodeLiteralType_simple @@ string "Integer" @@ var "cx" @@ var "g",
-        _IntegerType_int64>>: constant $
-          encodeLiteralType_simple @@ string "Long" @@ var "cx" @@ var "g",
-        _IntegerType_uint8>>: constant $
-          encodeLiteralType_simple @@ string "Short" @@ var "cx" @@ var "g",
-        _IntegerType_uint16>>: constant $
-          encodeLiteralType_simple @@ string "Character" @@ var "cx" @@ var "g",
-        _IntegerType_uint32>>: constant $
-          encodeLiteralType_simple @@ string "Long" @@ var "cx" @@ var "g",
-        _IntegerType_uint64>>: constant $
-          right (JavaUtilsSource.javaRefType
-            @@ list ([] :: [TTerm Java.ReferenceType])
-            @@ just (JavaNamesSource.javaPackageName @@ list [string "java", string "math"])
-            @@ string "BigInteger")],
-    _LiteralType_string>>: constant $
-      encodeLiteralType_simple @@ string "String" @@ var "cx" @@ var "g"]
-
--- | Helper: encode a simple Java reference type by class name (no package, no type arguments)
-encodeLiteralType_simple :: TTermDefinition (String -> Context -> Graph -> Either Error Java.Type)
-encodeLiteralType_simple = def "encodeLiteralType_simple" $
-  lambda "n" $ 
-    "cx" ~> "g" ~>
-    right (JavaUtilsSource.javaRefType
-    @@ list ([] :: [TTerm Java.ReferenceType])
-    @@ nothing
-    @@ var "n")
-
--- | Encode a float value to a Java expression
-encodeLiteral_encodeFloat :: TTermDefinition (FloatValue -> Java.Expression)
-encodeLiteral_encodeFloat = def "encodeLiteral_encodeFloat" $
-  lambda "f" $
-    cases _FloatValue (var "f") Nothing [
-      _FloatValue_bigfloat>>: "v" ~>
-        JavaUtilsSource.javaConstructorCall @@
-          (JavaUtilsSource.javaConstructorName @@
-            (JavaDsl.identifier $ string "java.math.BigDecimal") @@ nothing) @@
-          list [encodeLiteral @@ inject _Literal _Literal_string (Literals.showBigfloat $ var "v")] @@
-          nothing,
-      _FloatValue_float32>>: "v" ~>
-        encodeLiteral_encodeFloat32 @@ var "v",
-      _FloatValue_float64>>: "v" ~>
-        encodeLiteral_encodeFloat64 @@ var "v"]
-
--- | Encode a float32 value, handling NaN and Infinity specially since BigDecimal cannot represent them.
-encodeLiteral_encodeFloat32 :: TTermDefinition (Float -> Java.Expression)
-encodeLiteral_encodeFloat32 = def "encodeLiteral_encodeFloat32" $
-  lambda "v" $ lets [
-    "s">: Literals.showFloat32 (var "v")] $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (encodeLiteral_javaSpecialFloatExpr @@ string "Float" @@ string "NaN") $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (encodeLiteral_javaSpecialFloatExpr @@ string "Float" @@ string "POSITIVE_INFINITY") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (encodeLiteral_javaSpecialFloatExpr @@ string "Float" @@ string "NEGATIVE_INFINITY") $
-    encodeLiteral_primCast @@
-      (JavaDsl.primitiveTypeNumeric $ JavaDsl.numericTypeFloatingPoint JavaDsl.floatingPointTypeFloat) @@
-      (encodeLiteral_litExp @@
-        (JavaDsl.literalFloatingPoint $ JavaDsl.floatingPointLiteral $
-          Literals.float32ToBigfloat (var "v")))
-
--- | Encode a float64 value, handling NaN, Infinity, and negative zero specially.
--- BigDecimal (Java's bigfloat) cannot represent NaN, Infinity, or signed zero.
-encodeLiteral_encodeFloat64 :: TTermDefinition (Double -> Java.Expression)
-encodeLiteral_encodeFloat64 = def "encodeLiteral_encodeFloat64" $
-  lambda "v" $ lets [
-    "s">: Literals.showFloat64 (var "v")] $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (encodeLiteral_javaSpecialFloatExpr @@ string "Double" @@ string "NaN") $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (encodeLiteral_javaSpecialFloatExpr @@ string "Double" @@ string "POSITIVE_INFINITY") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (encodeLiteral_javaSpecialFloatExpr @@ string "Double" @@ string "NEGATIVE_INFINITY") $
-    -- Negative zero must be emitted via Double.parseDouble("-0.0") because routing it
-    -- through Bigfloat (which on the Java host is BigDecimal) would strip the sign.
-    Logic.ifElse (Equality.equal (var "s") (string "-0.0"))
-      (encodeLiteral_javaParseDouble @@ string "-0.0") $
-    encodeLiteral_litExp @@
-      (JavaDsl.literalFloatingPoint $ JavaDsl.floatingPointLiteral $
-        Literals.float64ToBigfloat (var "v"))
-
--- | Encode an integer value to a Java expression
-encodeLiteral_encodeInteger :: TTermDefinition (IntegerValue -> Java.Expression)
-encodeLiteral_encodeInteger = def "encodeLiteral_encodeInteger" $
-  lambda "i" $
-    cases _IntegerValue (var "i") Nothing [
-      _IntegerValue_bigint>>: "v" ~>
-        JavaUtilsSource.javaConstructorCall @@
-          (JavaUtilsSource.javaConstructorName @@
-            (JavaDsl.identifier $ string "java.math.BigInteger") @@ nothing) @@
-          list [encodeLiteral @@ inject _Literal _Literal_string (Literals.showBigint $ var "v")] @@
-          nothing,
-      _IntegerValue_int8>>: "v" ~>
-        encodeLiteral_primCast @@
-          (JavaDsl.primitiveTypeNumeric $ JavaDsl.numericTypeIntegral JavaDsl.integralTypeByte) @@
-          (encodeLiteral_litExp @@
-            (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.int8ToBigint (var "v"))),
-      _IntegerValue_int16>>: "v" ~>
-        encodeLiteral_primCast @@
-          (JavaDsl.primitiveTypeNumeric $ JavaDsl.numericTypeIntegral JavaDsl.integralTypeShort) @@
-          (encodeLiteral_litExp @@
-            (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.int16ToBigint (var "v"))),
-      _IntegerValue_int32>>: "v" ~>
-        encodeLiteral_litExp @@
-          (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.int32ToBigint (var "v")),
-      _IntegerValue_int64>>: "v" ~>
-        encodeLiteral_primCast @@
-          (JavaDsl.primitiveTypeNumeric $ JavaDsl.numericTypeIntegral JavaDsl.integralTypeLong) @@
-          (encodeLiteral_litExp @@
-            (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.int64ToBigint (var "v"))),
-      _IntegerValue_uint8>>: "v" ~>
-        encodeLiteral_primCast @@
-          (JavaDsl.primitiveTypeNumeric $ JavaDsl.numericTypeIntegral JavaDsl.integralTypeShort) @@
-          (encodeLiteral_litExp @@
-            (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.uint8ToBigint (var "v"))),
-      _IntegerValue_uint16>>: "v" ~>
-        encodeLiteral_litExp @@
-          (JavaDsl.literalCharacter $ var "v"),
-      _IntegerValue_uint32>>: "v" ~>
-        encodeLiteral_primCast @@
-          (JavaDsl.primitiveTypeNumeric $ JavaDsl.numericTypeIntegral JavaDsl.integralTypeLong) @@
-          (encodeLiteral_litExp @@
-            (JavaDsl.literalInteger $ JavaDsl.integerLiteral $ Literals.uint32ToBigint (var "v"))),
-      _IntegerValue_uint64>>: "v" ~>
-        JavaUtilsSource.javaConstructorCall @@
-          (JavaUtilsSource.javaConstructorName @@
-            (JavaDsl.identifier $ string "java.math.BigInteger") @@ nothing) @@
-          list [encodeLiteral @@ inject _Literal _Literal_string
-            (Literals.showBigint $ Literals.uint64ToBigint (var "v"))] @@
-          nothing]
-
--- | Emit a Java method call expression Double.parseDouble("<value>"). Used for
--- float64 values that cannot round-trip through Bigfloat (e.g., negative zero).
-encodeLiteral_javaParseDouble :: TTermDefinition (String -> Java.Expression)
-encodeLiteral_javaParseDouble = def "encodeLiteral_javaParseDouble" $
-  lambda "value" $
-    JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-      (JavaUtilsSource.methodInvocationStatic
-        @@ JavaDsl.identifier (string "Double")
-        @@ JavaDsl.identifier (string "parseDouble")
-        @@ list [encodeLiteral @@ inject _Literal _Literal_string (var "value")])
-
--- | Emit a Java field access expression like Float.NaN or Double.POSITIVE_INFINITY.
-encodeLiteral_javaSpecialFloatExpr :: TTermDefinition (String -> String -> Java.Expression)
-encodeLiteral_javaSpecialFloatExpr = def "encodeLiteral_javaSpecialFloatExpr" $
-  lambda "className" $ lambda "fieldName" $
-    JavaUtilsSource.javaExpressionNameToJavaExpression @@
-      (JavaDsl.expressionName
-        (just (JavaDsl.ambiguousName (list [JavaDsl.identifier $ var "className"])))
-        (JavaDsl.identifier $ var "fieldName"))
-
--- | Helper: convert a Java literal to a Java expression
-encodeLiteral_litExp :: TTermDefinition (Java.Literal -> Java.Expression)
-encodeLiteral_litExp = def "encodeLiteral_litExp" $
-  lambda "l" $ JavaUtilsSource.javaLiteralToJavaExpression @@ var "l"
-
--- | Helper: cast an expression to a primitive type
-encodeLiteral_primCast :: TTermDefinition (Java.PrimitiveType -> Java.Expression -> Java.Expression)
-encodeLiteral_primCast = def "encodeLiteral_primCast" $
-  lambda "pt" $ lambda "expr" $
-    JavaUtilsSource.javaCastExpressionToJavaExpression @@
-      (JavaUtilsSource.javaCastPrimitive @@ var "pt" @@
-        (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "expr"))
-
--- | Encode a nullary constant function as a Java expression
-encodeNullaryConstant :: TTermDefinition (JavaHelpers.JavaEnvironment -> Type -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeNullaryConstant = def "encodeNullaryConstant" $
-  lambda "env" $ lambda "typ" $ lambda "funTerm" $
-    "cx" ~> "g" ~>
-    Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "unexpected ") (Strings.cat2 (string "nullary function") (Strings.cat2 (string " in ") (ShowCore.term @@ var "funTerm")))) (var "cx")
-
--- | Extract type arguments from the return type for generic method calls
-encodeNullaryConstant_typeArgsFromReturnType :: TTermDefinition (JavaHelpers.Aliases -> Type -> Context -> Graph -> Either Error [Java.TypeArgument])
-encodeNullaryConstant_typeArgsFromReturnType = def "encodeNullaryConstant_typeArgsFromReturnType" $
-  lambda "aliases" $ lambda "t" $
-    "cx" ~> "g" ~>
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ right (list ([] :: [TTerm Java.TypeArgument]))) [
-      _Type_set>>: "st" ~>
-        "jst" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "st" @@ var "cx" @@ var "g") $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jst" @@ var "cx") $
-        right (list [JavaDsl.typeArgumentReference (var "rt")]),
-      _Type_list>>: "lt_" ~>
-        "jlt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "lt_" @@ var "cx" @@ var "g") $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jlt" @@ var "cx") $
-        right (list [JavaDsl.typeArgumentReference (var "rt")]),
-      _Type_maybe>>: "mt" ~>
-        "jmt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "mt" @@ var "cx" @@ var "g") $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jmt" @@ var "cx") $
-        right (list [JavaDsl.typeArgumentReference (var "rt")]),
-      _Type_map>>: "mp" ~>
-        "jkt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ (project _MapType _MapType_keys @@ var "mp") @@ var "cx" @@ var "g") $
-        "rk" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jkt" @@ var "cx") $
-        "jvt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ (project _MapType _MapType_values @@ var "mp") @@ var "cx" @@ var "g") $
-        "rv" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jvt" @@ var "cx") $
-        right (list [JavaDsl.typeArgumentReference (var "rk"), JavaDsl.typeArgumentReference (var "rv")])]
-
--- | Encode a nullary primitive reference (by name) as a Java expression.
-encodeNullaryPrimitiveByName :: TTermDefinition (JavaHelpers.JavaEnvironment -> Type -> Name -> Context -> Graph -> Either Error Java.Expression)
-encodeNullaryPrimitiveByName = def "encodeNullaryPrimitiveByName" $
-  lambda "env" $ lambda "typ" $ lambda "name" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    "targs" <<~ (encodeNullaryConstant_typeArgsFromReturnType @@ var "aliases" @@ var "typ" @@ var "cx" @@ var "g") $
-    Logic.ifElse (Lists.null (var "targs"))
-      ("header" <~ (inject Java._MethodInvocation_Header Java._MethodInvocation_Header_simple
-        (wrap Java._MethodName
-          (elementJavaIdentifier @@ boolean True @@ boolean False @@ var "aliases" @@ var "name"))) $
-       right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-         (record Java._MethodInvocation [
-           Java._MethodInvocation_header>>: var "header",
-           Java._MethodInvocation_arguments>>: list ([] :: [TTerm Java.Expression])])))
-      ("fullName" <~ (unwrap Java._Identifier @@ (elementJavaIdentifier @@ boolean True @@ boolean False @@ var "aliases" @@ var "name")) $
-       "parts" <~ Strings.splitOn (string ".") (var "fullName") $
-       "className" <~ JavaDsl.identifier (Strings.intercalate (string ".") (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts")))) $
-       "methodName" <~ JavaDsl.identifier (Maybes.fromMaybe (var "fullName") (Lists.maybeLast (var "parts"))) $
-       right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-         (JavaUtilsSource.methodInvocationStaticWithTypeArgs @@ var "className" @@ var "methodName" @@ var "targs" @@ (list ([] :: [TTerm Java.Expression])))))
-
--- | Encode a Hydra term as a Java expression.
--- Wrapper that calls encodeTermInternal with empty accumulators.
-encodeTerm :: TTermDefinition (JavaHelpers.JavaEnvironment -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeTerm = def "encodeTerm" $
-  lambda "env" $ lambda "term" $
-    "cx" ~> "g" ~>
-    encodeTermInternal @@ var "env" @@ list ([] :: [TTerm (M.Map Name Term)]) @@ list ([] :: [TTerm Java.Type]) @@ var "term" @@ var "cx" @@ var "g"
-
--- | Encode a term definition as a Java interface method declaration.
--- This is the most complex function — it handles type parameters, lambda analysis,
--- type variable substitution, accumulator unification, and body annotation.
-encodeTermDefinition :: TTermDefinition (JavaHelpers.JavaEnvironment -> TermDefinition -> Context -> Graph -> Either Error Java.InterfaceMemberDeclaration)
-encodeTermDefinition = def "encodeTermDefinition" $
-  lambda "env" $ lambda "tdef" $
-    "cx" ~> "g" ~>
-    "name" <~ (project _TermDefinition _TermDefinition_name @@ var "tdef") $
-    "term0" <~ (project _TermDefinition _TermDefinition_term @@ var "tdef") $
-    "ts" <~ Maybes.maybe
-      (Core.typeScheme (list ([] :: [TTerm Name])) (Core.typeVariable (wrap _Name (string "hydra.core.Unit"))) nothing)
-      ("x" ~> var "x")
-      (project _TermDefinition _TermDefinition_typeScheme @@ var "tdef") $
-    -- Unshadow variables
-    ("term" <~ (Variables.unshadowVariables @@ var "term0") $
-      "fs" <<~ (analyzeJavaFunction @@ var "env" @@ var "term" @@ var "cx" @@ var "g") $
-      -- Get type parameters from scheme
-      "schemeVars" <~ Lists.filter (lambda "v" $ isSimpleName @@ var "v") (Core.typeSchemeVariables (var "ts")) $
-      "termVars" <~ (project _FunctionStructure _FunctionStructure_typeParams @@ var "fs") $
-      "schemeTypeVars" <~ (collectTypeVars @@ Core.typeSchemeBody (var "ts")) $
-      "usedSchemeVars" <~ Lists.filter (lambda "v" $ Sets.member (var "v") (var "schemeTypeVars")) (var "schemeVars") $
-      "tparams" <~ Logic.ifElse (Lists.null (var "usedSchemeVars")) (var "termVars") (var "usedSchemeVars") $
-      "params" <~ (project _FunctionStructure _FunctionStructure_params @@ var "fs") $
-      "bindings" <~ (project _FunctionStructure _FunctionStructure_bindings @@ var "fs") $
-      "body" <~ (project _FunctionStructure _FunctionStructure_body @@ var "fs") $
-      "doms" <~ (project _FunctionStructure _FunctionStructure_domains @@ var "fs") $
-      "env2" <~ (project _FunctionStructure _FunctionStructure_environment @@ var "fs") $
-      -- Derive codomain from TypeScheme
-      "schemeType" <~ Core.typeSchemeBody (var "ts") $
-      "numParams" <~ Lists.length (var "params") $
-      "peelResult" <~ (peelDomainsAndCod @@ var "numParams" @@ var "schemeType") $
-      "schemeDoms" <~ Pairs.first (var "peelResult") $
-      "cod" <~ Pairs.second (var "peelResult") $
-      "schemeVarSet" <~ Sets.fromList (var "tparams") $
-      -- Build type variable substitution from annotations
-      "typeVarSubst" <<~ Logic.ifElse (Lists.null (var "tparams"))
-        (right (Maps.empty))
-        (buildSubstFromAnnotations @@ var "schemeVarSet" @@ var "term" @@ var "cx" @@ var "g") $
-      -- Fix over-generalized type variables
-      "overgenSubst" <~ (detectAccumulatorUnification @@ var "schemeDoms" @@ var "cod" @@ var "tparams") $
-      "overgenVarSubst" <~ Maps.fromList (Maybes.cat (Lists.map
-        (lambda "entry" $
-          "k" <~ Pairs.first (var "entry") $
-          "v" <~ Pairs.second (var "entry") $
-          cases _Type (var "v")
-            (Just nothing) [
-            _Type_variable>>: lambda "n" $ just (pair (var "k") (var "n"))])
-        (Maps.toList (var "overgenSubst")))) $
-      "fixedCod" <~ Logic.ifElse (Maps.null (var "overgenSubst")) (var "cod")
-        (substituteTypeVarsWithTypes @@ var "overgenSubst" @@ var "cod") $
-      "fixedDoms" <~ Logic.ifElse (Maps.null (var "overgenSubst")) (var "schemeDoms")
-        (Lists.map (lambda "d" $ substituteTypeVarsWithTypes @@ var "overgenSubst" @@ var "d") (var "schemeDoms")) $
-      "fixedTparams" <~ Logic.ifElse (Maps.null (var "overgenSubst")) (var "tparams")
-        (Lists.filter (lambda "v" $ Logic.not (Maps.member (var "v") (var "overgenSubst"))) (var "tparams")) $
-      "constraints" <~ Maybes.fromMaybe (Maps.empty) (Core.typeSchemeConstraints (var "ts")) $
-      "jparams" <~ Lists.map (lambda "v" $
-        JavaUtilsSource.javaTypeParameter @@ (Formatting.capitalize @@ (Core.unName (var "v"))))
-        (var "fixedTparams") $
-      -- Update aliases
-      "aliases2base" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env2") $
-      "trustedVars" <~ Sets.unions (Lists.map (lambda "d" $ collectTypeVars @@ var "d")
-        (Lists.concat2 (var "fixedDoms") (list [var "fixedCod"]))) $
-      "fixedSchemeVarSet" <~ Sets.fromList (var "fixedTparams") $
-      "aliases2" <~ (record JavaHelpers._Aliases [
-        JavaHelpers._Aliases_currentNamespace>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases2base",
-        JavaHelpers._Aliases_packages>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases2base",
-        JavaHelpers._Aliases_branchVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases2base",
-        JavaHelpers._Aliases_recursiveVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases2base",
-        JavaHelpers._Aliases_inScopeTypeParams>>: var "fixedSchemeVarSet",
-        JavaHelpers._Aliases_polymorphicLocals>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases2base",
-        JavaHelpers._Aliases_inScopeJavaVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases2base",
-        JavaHelpers._Aliases_varRenames>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases2base",
-        JavaHelpers._Aliases_lambdaVars>>:
-          Sets.union (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases2base")
-            (Sets.fromList (var "params")),
-        JavaHelpers._Aliases_typeVarSubst>>:
-          Maps.union (var "overgenVarSubst") (var "typeVarSubst"),
-        JavaHelpers._Aliases_trustedTypeVars>>:
-          Sets.intersection (var "trustedVars") (var "fixedSchemeVarSet"),
-        JavaHelpers._Aliases_methodCodomain>>: just (var "fixedCod"),
-        JavaHelpers._Aliases_thunkedVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases2base"]) $
-      "env2WithTypeParams" <~ (record JavaHelpers._JavaEnvironment [
-        JavaHelpers._JavaEnvironment_aliases>>: var "aliases2",
-        JavaHelpers._JavaEnvironment_graph>>:
-          project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env2"]) $
-      -- Convert bindings to statements
-      "bindResult" <<~ (bindingsToStatements @@ var "env2WithTypeParams" @@ var "bindings" @@ var "cx" @@ var "g") $
-      "bindingStmts" <~ Pairs.first (var "bindResult") $
-      "env3" <~ Pairs.second (var "bindResult") $
-      -- Apply overgen subst to body annotations
-      "body'" <<~ Logic.ifElse (Maps.null (var "overgenSubst"))
-        (right (var "body"))
-        (applyOvergenSubstToTermAnnotations @@ var "overgenSubst" @@ var "body" @@ var "cx" @@ var "g") $
-      -- Annotate the body with its expected type using propagateTypesInAppChain
-      "annotatedBody" <~ (propagateTypesInAppChain @@ var "fixedCod" @@ var "fixedCod" @@ var "body'") $
-      -- Generate method declaration
-      "jformalParams" <<~ (Eithers.mapList
-        (lambda "pair" $
-          "jdom" <<~ (encodeType @@ var "aliases2" @@ Sets.empty @@ (Pairs.first (var "pair")) @@ var "cx" @@ var "g") $
-          right (JavaUtilsSource.javaTypeToJavaFormalParameter @@ var "jdom" @@ Pairs.second (var "pair")))
-        (Lists.zip (var "fixedDoms") (var "params"))) $
-      "jcod" <<~ (encodeType @@ var "aliases2" @@ Sets.empty @@ var "fixedCod" @@ var "cx" @@ var "g") $
-      "result" <~ (JavaUtilsSource.javaTypeToJavaResult @@ var "jcod") $
-      "mods" <~ list [inject Java._InterfaceMethodModifier Java._InterfaceMethodModifier_static unit] $
-      "jname" <~ (JavaUtilsSource.sanitizeJavaName @@ (Formatting.decapitalize @@ (Names.localNameOf @@ var "name"))) $
-      -- TCO disabled for now: instanceof chains cause significant regression vs visitor pattern.
-      -- To re-enable, restore the following:
-      --   "isTCO" <~ (Logic.and
-      --     (Logic.not $ Lists.null (var "params"))
-      --     (Analysis.isSelfTailRecursive @@ var "name" @@ var "body")) $
-      "isTCO" <~ boolean False $
-      "methodBody" <<~ (Logic.ifElse (var "isTCO")
-        -- TCO path: wrap body in while(true) loop
-        -- Note: bindingStmts (let-binding prefixes) go INSIDE the while loop so they are
-        -- re-evaluated each iteration when parameters change via reassignment + continue.
-        -- Create snapshot names for each parameter (e.g. term -> term_tco) so that
-        -- non-continue branches can capture effectively-final variables in lambdas.
-        ("tcoSuffix" <~ string "_tco" $
-          "snapshotNames" <~ Lists.map ("p" ~> wrap _Name (Strings.cat2 (unwrap _Name @@ var "p") (var "tcoSuffix"))) (var "params") $
-          "tcoVarRenames" <~ (Maps.fromList (Lists.zip (var "params") (var "snapshotNames"))) $
-          -- Generate: final var param_tco = param;
-          "snapshotDecls" <~ Lists.map ("pair" ~>
-            JavaUtilsSource.finalVarDeclarationStatement
-              @@ (JavaUtilsSource.variableToJavaIdentifier @@ Pairs.second (var "pair"))
-              @@ (JavaUtilsSource.javaIdentifierToJavaExpression
-                    @@ (JavaUtilsSource.variableToJavaIdentifier @@ Pairs.first (var "pair"))))
-            (Lists.zip (var "params") (var "snapshotNames")) $
-          -- For TCO, re-wrap the body with any let-bindings so encodeTermTCO handles them
-          -- with the renamed environment (tcoVarRenames). This ensures let-bound lambdas
-          -- capture the effectively-final snapshot variables instead of the reassigned parameters.
-          "tcoBody" <~ Logic.ifElse (Lists.null (var "bindings"))
-            (var "annotatedBody")
-            (Core.termLet (Core.let_ (var "bindings") (var "annotatedBody"))) $
-          "tcoStmts" <<~ (encodeTermTCO @@ var "env2WithTypeParams" @@ var "name" @@ var "params" @@ var "tcoVarRenames" @@ int32 0 @@ var "tcoBody" @@ var "cx" @@ var "g") $
-          "whileBodyStmts" <~ Lists.concat2 (var "snapshotDecls") (var "tcoStmts") $
-          "whileBodyBlock" <~ (JavaDsl.statementWithoutTrailing (JavaDsl.stmtBlock (JavaDsl.block (var "whileBodyStmts")))) $
-          "noCond" <~ (nothing :: TTerm (Maybe Java.Expression)) $
-          "whileStmt" <~ (JavaDsl.blockStatementStatement
-            (JavaDsl.statementWhile (record Java._WhileStatement [
-              Java._WhileStatement_cond>>: var "noCond",
-              Java._WhileStatement_body>>: var "whileBodyBlock"]))) $
-          right $ list [var "whileStmt"])
-        -- Normal path: encode body as expression with return
-        ("jbody" <<~ (encodeTerm @@ var "env3" @@ var "annotatedBody" @@ var "cx" @@ var "g") $
-          "returnSt" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "jbody"))) $
-          right $ Lists.concat2 (var "bindingStmts") (list [var "returnSt"]))) $
-      right (JavaUtilsSource.interfaceMethodDeclaration @@ var "mods" @@ var "jparams"
-        @@ var "jname" @@ var "jformalParams" @@ var "result"
-        @@ just (var "methodBody")))
-
--- | Internal term encoder with annotation and type-application accumulators.
-encodeTermInternal :: TTermDefinition (JavaHelpers.JavaEnvironment -> [M.Map Name Term] -> [Java.Type] -> Term -> Context -> Graph -> Either Error Java.Expression)
-encodeTermInternal = def "encodeTermInternal" $
-  lambda "env" $ lambda "anns" $ lambda "tyapps" $ lambda "term" $
-    "cx" ~> "g0" ~>
-    lets [
-    "aliases">: project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env",
-    "g">: project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env",
-    "encode">: lambda "t" $ encodeTerm @@ var "env" @@ var "t" @@ var "cx" @@ var "g"] $
-    cases _Term (var "term") (Just $
-      right (encodeLiteral @@ inject _Literal _Literal_string (string "Unimplemented term variant")))
-      [
-
-      -- TermAnnotated: accumulate annotation, recurse
-      _Term_annotated>>: lambda "at" $
-        encodeTermInternal @@ var "env"
-          @@ Lists.cons (Core.annotatedTermAnnotation (var "at")) (var "anns")
-          @@ var "tyapps"
-          @@ (Core.annotatedTermBody (var "at")) @@ var "cx" @@ var "g",
-
-      -- TermApplication: delegate to encodeApplication
-      _Term_application>>: lambda "app" $
-        encodeApplication @@ var "env" @@ var "app" @@ var "cx" @@ var "g",
-
-      -- TermEither: left or right
-      -- Extract the Either type from annotations so we can pass component types to inner terms.
-      -- Without this, inner lambdas lose their type context and type variables get concretized.
-      _Term_either>>: lambda "et" $
-        "mtargs" <<~ (Logic.ifElse (Lists.null (var "tyapps"))
-          (right nothing)
-          ("ta" <<~ (takeTypeArgs @@ string "either" @@ int32 2 @@ var "tyapps" @@ var "cx" @@ var "g") $
-            right (just (var "ta")))) $
-        "combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-        "mEitherType" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-        "branchTypes" <~ (Maybes.bind (var "mEitherType") (lambda "etyp" $
-          cases _Type (Strip.deannotateType @@ var "etyp")
-            (Just nothing) [
-            _Type_either>>: lambda "et2" $
-              just (pair (Core.eitherTypeLeft (var "et2")) (Core.eitherTypeRight (var "et2")))])) $
-        "encodeWithType" <~ (lambda "branchType" $ lambda "t1" $
-          "annotated" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-            @@ just (encodeTypeAsTerm @@ var "branchType") @@ var "t1") $
-          encodeTermInternal @@ var "env" @@ var "anns" @@ list ([] :: [TTerm Java.Type]) @@ var "annotated" @@ var "cx" @@ var "g") $
-        "eitherCall" <~ (lambda "methodName" $ lambda "expr" $
-          Maybes.cases (var "mtargs")
-            (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "hydra.util.Either")
-                @@ JavaDsl.identifier (var "methodName")
-                @@ list [var "expr"]))
-            (lambda "targs" $ JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                @@ JavaDsl.identifier (string "hydra.util.Either")
-                @@ JavaDsl.identifier (var "methodName")
-                @@ var "targs" @@ list [var "expr"]))) $
-        Eithers.either_
-          (lambda "term1" $
-            "expr" <<~ (Maybes.cases (var "branchTypes")
-              (var "encode" @@ var "term1")
-              (lambda "bt" $ var "encodeWithType" @@ Pairs.first (var "bt") @@ var "term1")) $
-            right (var "eitherCall" @@ string "left" @@ var "expr"))
-          (lambda "term1" $
-            "expr" <<~ (Maybes.cases (var "branchTypes")
-              (var "encode" @@ var "term1")
-              (lambda "bt" $ var "encodeWithType" @@ Pairs.second (var "bt") @@ var "term1")) $
-            right (var "eitherCall" @@ string "right" @@ var "expr"))
-          (var "et"),
-
-      -- Function-form terms: encode with type from annotations.
-      _Term_lambda>>: lambda "_lam" $ encodeFunctionFormTerm @@ var "env" @@ var "anns" @@ var "term" @@ var "cx" @@ var "g",
-      _Term_project>>: lambda "_p" $ encodeFunctionFormTerm @@ var "env" @@ var "anns" @@ var "term" @@ var "cx" @@ var "g",
-      _Term_cases>>: lambda "_c" $ encodeFunctionFormTerm @@ var "env" @@ var "anns" @@ var "term" @@ var "cx" @@ var "g",
-      _Term_unwrap>>: lambda "_w" $ encodeFunctionFormTerm @@ var "env" @@ var "anns" @@ var "term" @@ var "cx" @@ var "g",
-
-      -- TermLet: convert let bindings to block-bodied nullary lambda with .get()
-      _Term_let>>: lambda "lt" $
-        ("bindings" <~ Core.letBindings (var "lt") $
-        "body" <~ Core.letBody (var "lt") $
-        Logic.ifElse (Lists.null (var "bindings"))
-          (encodeTermInternal @@ var "env" @@ var "anns" @@ list ([] :: [TTerm Java.Type]) @@ var "body" @@ var "cx" @@ var "g")
-          ("bindResult" <<~ (bindingsToStatements @@ var "env" @@ var "bindings" @@ var "cx" @@ var "g") $
-            "bindingStmts" <~ Pairs.first (var "bindResult") $
-            "env2" <~ Pairs.second (var "bindResult") $
-            "jbody" <<~ (encodeTermInternal @@ var "env2" @@ var "anns" @@ list ([] :: [TTerm Java.Type]) @@ var "body" @@ var "cx" @@ var "g") $
-            "returnSt" <~ JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "jbody")) $
-            "block" <~ (wrap Java._Block (Lists.concat2 (var "bindingStmts") (list [var "returnSt"]))) $
-            "nullaryLambda" <~ JavaDsl.expressionLambda
-              (JavaDsl.lambdaExpression
-                (JavaDsl.lambdaParametersTuple (list ([] :: [TTerm Java.FormalParameter])))
-                (JavaDsl.lambdaBodyBlock (var "block"))) $
-            "combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-            "g2" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env2") $
-            "aliases2" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env2") $
-            "mt" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-            "letType" <<~ (Maybes.cases (var "mt")
-              (Checking.typeOfTerm @@ var "cx" @@ var "g2" @@ var "body")
-              (lambda "t" $ right (var "t"))) $
-            "jLetType" <<~ (encodeType @@ var "aliases2" @@ Sets.empty @@ var "letType" @@ var "cx" @@ var "g") $
-            "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jLetType" @@ var "cx") $
-            "supplierRt" <~ JavaDsl.referenceTypeClassOrInterface
-              (JavaDsl.classOrInterfaceTypeClass
-                (JavaUtilsSource.javaClassType @@ list [var "rt"] @@ asTerm JavaNamesSource.javaUtilFunctionPackageName @@ string "Supplier")) $
-            "castExpr" <~ (JavaUtilsSource.javaCastExpressionToJavaExpression @@
-              (JavaUtilsSource.javaCastExpression @@ var "supplierRt" @@ (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "nullaryLambda"))) $
-            right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocation @@ just (right
-                (JavaUtilsSource.javaExpressionToJavaPrimary @@ var "castExpr")) @@ JavaDsl.identifier (string "get") @@ list ([] :: [TTerm Java.Expression]))))),
-
-      -- TermList: java.util.Arrays.asList(elements) or java.util.Collections.emptyList()
-      _Term_list>>: lambda "els" $
-        Logic.ifElse (Lists.null (var "els"))
-          (Logic.ifElse (Lists.null (var "tyapps"))
-            (right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "java.util.Collections")
-                @@ JavaDsl.identifier (string "emptyList")
-                @@ list ([] :: [TTerm Java.Expression]))))
-            ("targs" <<~ (takeTypeArgs @@ string "list" @@ int32 1 @@ var "tyapps" @@ var "cx" @@ var "g") $
-              right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                  @@ JavaDsl.identifier (string "java.util.Collections")
-                  @@ JavaDsl.identifier (string "emptyList")
-                  @@ var "targs" @@ list ([] :: [TTerm Java.Expression])))))
-          ("jels" <<~ (Eithers.mapList (var "encode") (var "els")) $
-            right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "java.util.Arrays")
-                @@ JavaDsl.identifier (string "asList")
-                @@ var "jels"))),
-
-      -- TermLiteral: direct encoding
-      _Term_literal>>: lambda "l" $
-        right (encodeLiteral @@ var "l"),
-
-      -- TermMap: java.util.Collections.emptyMap() or java.util.Map.ofEntries(java.util.Map.entry(k,v), ...)
-      _Term_map>>: lambda "m" $
-        Logic.ifElse (Maps.null (var "m"))
-          (Logic.ifElse (Lists.null (var "tyapps"))
-            (right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "java.util.Collections")
-                @@ JavaDsl.identifier (string "emptyMap")
-                @@ list ([] :: [TTerm Java.Expression]))))
-            ("targs" <<~ (takeTypeArgs @@ string "map" @@ int32 2 @@ var "tyapps" @@ var "cx" @@ var "g") $
-              right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                  @@ JavaDsl.identifier (string "java.util.Collections")
-                  @@ JavaDsl.identifier (string "emptyMap")
-                  @@ var "targs" @@ list ([] :: [TTerm Java.Expression])))))
-          ("jkeys" <<~ (Eithers.mapList (var "encode") (Maps.keys (var "m"))) $
-            "jvals" <<~ (Eithers.mapList (var "encode") (Maps.elems (var "m"))) $
-            "pairExprs" <~ Lists.map
-              (lambda "kv" $ JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                (JavaUtilsSource.methodInvocationStatic
-                  @@ JavaDsl.identifier (string "java.util.Map")
-                  @@ JavaDsl.identifier (string "entry")
-                  @@ list [Pairs.first (var "kv"), Pairs.second (var "kv")]))
-              (Lists.zip (var "jkeys") (var "jvals")) $
-            "innerMap" <~ (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "java.util.Map")
-                @@ JavaDsl.identifier (string "ofEntries")
-                @@ var "pairExprs")) $
-            right (JavaUtilsSource.javaConstructorCall
-              @@ (JavaUtilsSource.javaConstructorName @@ JavaDsl.identifier (string "java.util.TreeMap") @@ nothing)
-              @@ list [var "innerMap"] @@ nothing)),
-
-      -- TermMaybe: Maybe.nothing() or Maybe.just(x)
-      _Term_maybe>>: lambda "mt" $
-        Maybes.cases (var "mt")
-          (Logic.ifElse (Lists.null (var "tyapps"))
-            (right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "hydra.util.Maybe")
-                @@ JavaDsl.identifier (string "nothing")
-                @@ list ([] :: [TTerm Java.Expression]))))
-            ("targs" <<~ (takeTypeArgs @@ string "maybe" @@ int32 1 @@ var "tyapps" @@ var "cx" @@ var "g") $
-              right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                  @@ JavaDsl.identifier (string "hydra.util.Maybe")
-                  @@ JavaDsl.identifier (string "nothing")
-                  @@ var "targs" @@ list ([] :: [TTerm Java.Expression])))))
-          (lambda "term1" $
-            "expr" <<~ (var "encode" @@ var "term1") $
-            right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "hydra.util.Maybe")
-                @@ JavaDsl.identifier (string "just")
-                @@ list [var "expr"]))),
-
-      -- TermPair: new Pair(t1, t2)
-      _Term_pair>>: lambda "p" $
-        "jterm1" <<~ (var "encode" @@ Pairs.first (var "p")) $
-        "jterm2" <<~ (var "encode" @@ Pairs.second (var "p")) $
-        "mtargs" <<~ (Logic.ifElse (Lists.null (var "tyapps"))
-          (right nothing)
-          ("rts" <<~ (Eithers.mapList (lambda "jt" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") (var "tyapps")) $
-            right (just (JavaDsl.typeArgumentsOrDiamondArguments
-              (Lists.map (lambda "rt" $ JavaDsl.typeArgumentReference (var "rt")) (var "rts")))))) $
-        right (JavaUtilsSource.javaConstructorCall
-          @@ (JavaUtilsSource.javaConstructorName @@ JavaDsl.identifier (string "hydra.util.Pair") @@ var "mtargs")
-          @@ list [var "jterm1", var "jterm2"] @@ nothing),
-
-      -- TermRecord: new RecordType(field1, field2, ...)
-      -- When tyapps is non-empty (from TermTypeApplication wrappers), use those directly.
-      -- When tyapps is empty, fall back to extracting type args from the annotation type.
-      -- This handles cases like unitCoder where the record has concrete type parameters
-      -- (e.g. Coder<Graph, Graph, Term, Value>) but no TermTypeApplication wrappers in the term.
-      _Term_record>>: lambda "rec" $
-        "recName" <~ Core.recordTypeName (var "rec") $
-        -- Try to resolve the record type from the graph to get expected field types.
-        -- This allows us to annotate field terms with their expected types, preventing
-        -- type variable concretization in polymorphic lambdas (e.g. Coder encode/decode fields).
-        "mRecordType" <~ Eithers.either_ (constant nothing) ("t" ~> just (var "t"))
-          (Resolution.requireType @@ var "cx" @@ var "g" @@ var "recName") $
-        "strippedRecTyp" <~ Maybes.map (lambda "recTyp" $ stripForalls @@ (Strip.deannotateType @@ var "recTyp"))
-          (var "mRecordType") $
-        "mFieldTypeMap" <~ (Maybes.bind (var "strippedRecTyp") (lambda "bodyTyp" $
-          cases _Type (var "bodyTyp")
-            (Just nothing) [
-            _Type_record>>: lambda "rt" $
-              just (Maps.fromList (Lists.map
-                (lambda "ft" $ pair (Core.fieldTypeName (var "ft")) (Core.fieldTypeType (var "ft")))
-                (var "rt")))])) $
-        -- Build type variable substitution from the annotation type's type arguments
-        "combinedAnnsRec" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-        "mAnnotType" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnnsRec")) $
-        "mTypeSubst" <~ (Maybes.bind (var "mAnnotType") (lambda "annTyp" $
-          Maybes.bind (var "mRecordType") (lambda "recTyp" $
-            -- Extract type args from annotation and type params from definition
-            "args" <~ (extractTypeApplicationArgs @@ (Strip.deannotateType @@ var "annTyp")) $
-            "params" <~ (collectForallParams @@ (Strip.deannotateType @@ var "recTyp")) $
-            Logic.ifElse (Logic.or (Lists.null (var "args")) (Logic.not (Equality.equal (Lists.length (var "args")) (Lists.length (var "params")))))
-              nothing
-              (just (Maps.fromList (Lists.zip (var "params") (var "args"))))))) $
-        "encodeField" <~ (lambda "fld" $
-          Maybes.cases (var "mFieldTypeMap")
-            (var "encode" @@ Core.fieldTerm (var "fld"))
-            (lambda "ftmap" $
-              "mftyp" <~ Maps.lookup (Core.fieldName (var "fld")) (var "ftmap") $
-              Maybes.cases (var "mftyp")
-                (var "encode" @@ Core.fieldTerm (var "fld"))
-                (lambda "ftyp" $
-                  -- Apply type substitution to the field type if available
-                  "resolvedType" <~ Maybes.cases (var "mTypeSubst")
-                    (var "ftyp")
-                    (lambda "subst" $ applySubstFull @@ var "subst" @@ var "ftyp") $
-                  -- Annotate the field term with the resolved type before encoding
-                  "annotatedFieldTerm" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-                    @@ just (encodeTypeAsTerm @@ var "resolvedType") @@ Core.fieldTerm (var "fld")) $
-                  encodeTermInternal @@ var "env" @@ var "anns" @@ list ([] :: [TTerm Java.Type]) @@ var "annotatedFieldTerm" @@ var "cx" @@ var "g"))) $
-        "fieldExprs" <<~ (Eithers.mapList (var "encodeField") (Core.recordFields (var "rec"))) $
-        "consId" <~ (JavaUtilsSource.nameToJavaName @@ var "aliases" @@ var "recName") $
-        "mtargs" <<~ (Logic.ifElse (Logic.not (Lists.null (var "tyapps")))
-          ("rts" <<~ (Eithers.mapList (lambda "jt" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") (var "tyapps")) $
-            right (just (JavaDsl.typeArgumentsOrDiamondArguments
-              (Lists.map (lambda "rt" $ JavaDsl.typeArgumentReference (var "rt")) (var "rts")))))
-          -- tyapps is empty: try to extract type args from annotation
-          ("combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-           "mtyp" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-           Maybes.cases (var "mtyp")
-             (right nothing)
-             (lambda "annTyp" $
-               "typeArgs" <~ (extractTypeApplicationArgs @@ (Strip.deannotateType @@ var "annTyp")) $
-               Logic.ifElse (Lists.null (var "typeArgs"))
-                 (right nothing)
-                 ("jTypeArgs" <<~ (Eithers.mapList (lambda "t" $
-                   "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "t" @@ var "cx" @@ var "g") $
-                   JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") (var "typeArgs")) $
-                  right (just (JavaDsl.typeArgumentsOrDiamondArguments
-                    (Lists.map (lambda "rt" $ JavaDsl.typeArgumentReference (var "rt")) (var "jTypeArgs")))))))) $
-        right (JavaUtilsSource.javaConstructorCall
-          @@ (JavaUtilsSource.javaConstructorName @@ var "consId" @@ var "mtargs")
-          @@ var "fieldExprs" @@ nothing),
-
-      -- TermSet: java.util.Collections.emptySet() or java.util.Set.of(elements)
-      _Term_set>>: lambda "s" $
-        Logic.ifElse (Sets.null (var "s"))
-          (Logic.ifElse (Lists.null (var "tyapps"))
-            (right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "java.util.Collections")
-                @@ JavaDsl.identifier (string "emptySet")
-                @@ list ([] :: [TTerm Java.Expression]))))
-            ("targs" <<~ (takeTypeArgs @@ string "set" @@ int32 1 @@ var "tyapps" @@ var "cx" @@ var "g") $
-              right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                  @@ JavaDsl.identifier (string "java.util.Collections")
-                  @@ JavaDsl.identifier (string "emptySet")
-                  @@ var "targs" @@ list ([] :: [TTerm Java.Expression])))))
-          ("slist" <~ Sets.toList (var "s") $
-            "jels" <<~ (Eithers.mapList (var "encode") (var "slist")) $
-            "innerSet" <~ (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocationStatic
-                @@ JavaDsl.identifier (string "java.util.Set")
-                @@ JavaDsl.identifier (string "of")
-                @@ var "jels")) $
-            right (JavaUtilsSource.javaConstructorCall
-              @@ (JavaUtilsSource.javaConstructorName @@ JavaDsl.identifier (string "java.util.TreeSet") @@ nothing)
-              @@ list [var "innerSet"] @@ nothing)),
-
-      -- TermTypeLambda: enter type lambda scope
-      _Term_typeLambda>>: lambda "tl" $
-        withTypeLambda @@ var "env" @@ var "tl" @@ (lambda "env2" $
-          "combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-          "mtyp" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-          "annotatedBody" <~ (Maybes.cases (var "mtyp")
-            (Core.typeLambdaBody (var "tl"))
-            (lambda "t" $ cases _Type (var "t") (Just $ Core.typeLambdaBody (var "tl")) [
-              _Type_forall>>: lambda "fa" $
-                Annotations.setTermAnnotation @@ asTerm Constants.key_type
-                  @@ just (encodeTypeAsTerm @@ Core.forallTypeBody (var "fa"))
-                  @@ Core.typeLambdaBody (var "tl")])) $
-          encodeTerm @@ var "env2" @@ var "annotatedBody" @@ var "cx" @@ var "g"),
-
-      -- TermInject: new Variant(args)
-      _Term_inject>>: lambda "inj" $
-        "injTypeName" <~ Core.injectionTypeName (var "inj") $
-        "injField" <~ Core.injectionField (var "inj") $
-        "injFieldName" <~ Core.fieldName (var "injField") $
-        "injFieldTerm" <~ Core.fieldTerm (var "injField") $
-        "typeId" <~ JavaDsl.unIdentifier (JavaUtilsSource.nameToJavaName @@ var "aliases" @@ var "injTypeName") $
-        "consId" <~ JavaDsl.identifier (Strings.cat (list [var "typeId", string ".", JavaUtilsSource.sanitizeJavaName @@ (Formatting.capitalize @@ (unwrap _Name @@ var "injFieldName"))])) $
-        "fieldIsUnit" <<~ (isFieldUnitType @@ var "injTypeName" @@ var "injFieldName" @@ var "cx" @@ var "g") $
-        "args" <<~ (Logic.ifElse (Logic.or (Predicates.isUnitTerm @@ (Strip.deannotateTerm @@ var "injFieldTerm")) (var "fieldIsUnit"))
-          (right (list ([] :: [TTerm Java.Expression])))
-          ("ex" <<~ (var "encode" @@ var "injFieldTerm") $
-            right (list [var "ex"]))) $
-        right (JavaUtilsSource.javaConstructorCall
-          @@ (JavaUtilsSource.javaConstructorName @@ var "consId" @@ nothing)
-          @@ var "args" @@ nothing),
-
-      -- TermVariable: encode variable reference, or handle as primitive if it resolves to one
-      _Term_variable>>: lambda "name" $
-        Maybes.cases (Maps.lookup (var "name") (Graph.graphPrimitives (var "g")))
-          (encodeVariable @@ var "env" @@ var "name" @@ var "cx" @@ var "g")
-          (lambda "_prim" $
-            "combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-            "mt" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-            "typ" <<~ (Maybes.cases (var "mt")
-              (Checking.typeOfTerm @@ var "cx" @@ var "g" @@ var "term")
-              (lambda "t" $ right (var "t"))) $
-            cases _Type (Strip.deannotateType @@ var "typ")
-              (Just $ encodeNullaryPrimitiveByName @@ var "env" @@ var "typ" @@ var "name" @@ var "cx" @@ var "g") [
-              _Type_function>>: lambda "ft" $
-                encodeFunctionPrimitiveByName @@ var "env" @@ (Core.functionTypeDomain (var "ft")) @@ (Core.functionTypeCodomain (var "ft")) @@ var "name" @@ var "cx" @@ var "g"]),
-
-      -- TermUnit: emit null
-      _Term_unit>>: lambda "_" $
-        right (JavaUtilsSource.javaLiteralToJavaExpression @@ JavaDsl.literalNull),
-
-      -- TermWrap: new WrapperType(arg)
-      _Term_wrap>>: lambda "wt" $
-        "jarg" <<~ (var "encode" @@ Core.wrappedTermBody (var "wt")) $
-        right (JavaUtilsSource.javaConstructorCall
-          @@ (JavaUtilsSource.javaConstructorName @@ (JavaUtilsSource.nameToJavaName @@ var "aliases" @@ Core.wrappedTermTypeName (var "wt")) @@ nothing)
-          @@ list [var "jarg"] @@ nothing),
-
-      -- TermTypeApplication: handle type casts with correctCastType for pair types
-      _Term_typeApplication>>: lambda "ta" $
-        "atyp" <~ Core.typeApplicationTermType (var "ta") $
-        "body" <~ Core.typeApplicationTermBody (var "ta") $
-        "jatyp" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "atyp" @@ var "cx" @@ var "g") $
-        "combinedAnns" <~ Lists.foldl (lambda "acc" $ lambda "m" $ Maps.union (var "acc") (var "m")) Maps.empty (var "anns") $
-        "mtyp" <<~ (getTypeE (var "cx") (var "g") (var "combinedAnns")) $
-        "typ" <<~ (Maybes.cases (var "mtyp")
-          (Checking.typeOfTerm @@ var "cx" @@ var "g" @@ var "term")
-          (lambda "t" $ right (var "t"))) $
-        -- Collect all nested type applications (preserving annotations)
-        "collected0" <~ (collectTypeApps0 @@ var "body" @@ list [var "atyp"]) $
-        "innermostBody0" <~ Pairs.first (var "collected0") $
-        "allTypeArgs0" <~ Pairs.second (var "collected0") $
-        -- Correct the type for pair terms
-        "correctedTyp" <<~ (correctCastType @@ var "innermostBody0" @@ var "allTypeArgs0" @@ var "typ" @@ var "cx" @@ var "g") $
-        -- Collect all nested type applications (stripping annotations)
-        "collected" <~ (collectTypeApps @@ var "body" @@ list [var "atyp"]) $
-        "innermostBody" <~ Pairs.first (var "collected") $
-        "allTypeArgs" <~ Pairs.second (var "collected") $
-        -- Classify the innermost body if it's a variable or an Either injection
-        cases _Term (var "innermostBody")
-          (Just $ typeAppFallbackCast @@ var "env" @@ var "aliases" @@ var "anns" @@ var "tyapps"
-            @@ var "jatyp" @@ var "body" @@ var "correctedTyp" @@ var "cx" @@ var "g") [
-          _Term_variable>>: lambda "varName" $
-            "cls" <<~ (classifyDataReference @@ var "varName" @@ var "cx" @@ var "g") $
-            typeAppNullaryOrHoisted @@ var "env" @@ var "aliases" @@ var "anns" @@ var "tyapps"
-              @@ var "jatyp" @@ var "body" @@ var "correctedTyp" @@ var "varName"
-              @@ var "cls" @@ var "allTypeArgs" @@ var "cx" @@ var "g",
-          -- Either injections: pass branch types from the TypeApp type args
-          -- so inner lambdas don't lose their type variables
-          _Term_either>>: lambda "eitherTerm" $
-            Logic.ifElse (Equality.equal (Lists.length (var "allTypeArgs")) (int32 2))
-              -- We have exactly 2 type args: the Either type parameters
-              -- allTypeArgs order depends on collectTypeApps, which prepends: [outerType, innerType]
-              -- For Either<L,R>, TypeApp(typeR, TypeApp(typeL, Either(...))):
-              --   outer TypeApp has typeR (right branch type), inner has typeL (left branch type)
-              --   collectTypeApps starts with [atyp] and prepends, so allTypeArgs = [typeL, typeR]
-              ("eitherBranchTypes" <~ pair
-                  (Maybes.fromMaybe (var "correctedTyp") (Lists.maybeAt (int32 0) (var "allTypeArgs")))
-                  (Maybes.fromMaybe (var "correctedTyp") (Lists.maybeAt (int32 1) (var "allTypeArgs"))) $
-                "jTypeArgs" <<~ (Eithers.mapList (lambda "t" $
-                  "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "t" @@ var "cx" @@ var "g") $
-                  JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") (var "allTypeArgs")) $
-                "eitherTargs" <~ Lists.map (lambda "rt" $ JavaDsl.typeArgumentReference (var "rt")) (var "jTypeArgs") $
-                "encodeEitherBranch" <~ (lambda "branchType" $ lambda "t1" $
-                  "annotated" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-                    @@ just (encodeTypeAsTerm @@ var "branchType") @@ var "t1") $
-                  encodeTermInternal @@ var "env" @@ var "anns" @@ list ([] :: [TTerm Java.Type]) @@ var "annotated" @@ var "cx" @@ var "g") $
-                Eithers.either_
-                  (lambda "term1" $
-                    "expr" <<~ (var "encodeEitherBranch" @@ Pairs.first (var "eitherBranchTypes") @@ var "term1") $
-                    right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                      (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                        @@ JavaDsl.identifier (string "hydra.util.Either")
-                        @@ JavaDsl.identifier (string "left")
-                        @@ var "eitherTargs" @@ list [var "expr"])))
-                  (lambda "term1" $
-                    "expr" <<~ (var "encodeEitherBranch" @@ Pairs.second (var "eitherBranchTypes") @@ var "term1") $
-                    right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                      (JavaUtilsSource.methodInvocationStaticWithTypeArgs
-                        @@ JavaDsl.identifier (string "hydra.util.Either")
-                        @@ JavaDsl.identifier (string "right")
-                        @@ var "eitherTargs" @@ list [var "expr"])))
-                  (var "eitherTerm"))
-              -- Fallback if we don't have exactly 2 type args
-              (typeAppFallbackCast @@ var "env" @@ var "aliases" @@ var "anns" @@ var "tyapps"
-                @@ var "jatyp" @@ var "body" @@ var "correctedTyp" @@ var "cx" @@ var "g")
-          ]
-        ]
-
--- | Encode a term for TCO: self-tail-calls become param reassignment + continue.
---   Returns a list of Java BlockStatements (if/instanceof checks + return/continue).
---   tcoVarRenames maps original parameter names to snapshot names (e.g. term -> term_tco).
---   Non-continue paths use the snapshot names so lambdas capture effectively-final variables.
-encodeTermTCO :: TTermDefinition (JavaHelpers.JavaEnvironment -> Name -> [Name] -> M.Map Name Name -> Int -> Term -> Context -> Graph -> Either Error [Java.BlockStatement])
-encodeTermTCO = def "encodeTermTCO" $
-  "env0" ~> "funcName" ~> "paramNames" ~> "tcoVarRenames" ~> "tcoDepth" ~> "term" ~>
-    "cx" ~> "g" ~>
-    -- Apply varRenames to the environment so encodeTerm uses snapshot variable names
-    "aliases0" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env0") $
-    "env" <~ (record JavaHelpers._JavaEnvironment [
-      JavaHelpers._JavaEnvironment_aliases>>: record JavaHelpers._Aliases [
-        JavaHelpers._Aliases_currentNamespace>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases0",
-        JavaHelpers._Aliases_packages>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases0",
-        JavaHelpers._Aliases_branchVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases0",
-        JavaHelpers._Aliases_recursiveVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases0",
-        JavaHelpers._Aliases_inScopeTypeParams>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases0",
-        JavaHelpers._Aliases_polymorphicLocals>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases0",
-        JavaHelpers._Aliases_inScopeJavaVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases0",
-        JavaHelpers._Aliases_varRenames>>:
-          Maps.union (var "tcoVarRenames") (project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases0"),
-        JavaHelpers._Aliases_lambdaVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases0",
-        JavaHelpers._Aliases_typeVarSubst>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases0",
-        JavaHelpers._Aliases_trustedTypeVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases0",
-        JavaHelpers._Aliases_methodCodomain>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_methodCodomain @@ var "aliases0",
-        JavaHelpers._Aliases_thunkedVars>>:
-          project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases0"],
-      JavaHelpers._JavaEnvironment_graph>>:
-        project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env0"]) $
-    "stripped" <~ (Strip.deannotateAndDetypeTerm @@ var "term") $
-    -- Check if this term is a direct self-tail-call: funcName(args...)
-    "gathered" <~ (Analysis.gatherApplications @@ var "stripped") $
-    "gatherArgs" <~ (Pairs.first $ var "gathered") $
-    "gatherFun" <~ (Pairs.second $ var "gathered") $
-    "strippedFun" <~ (Strip.deannotateAndDetypeTerm @@ var "gatherFun") $
-    -- Check for self-call pattern: Variable(funcName)
-    "isSelfCall" <~ (cases _Term (var "strippedFun")
-      (Just false) [
-        _Term_variable>>: "n" ~> Equality.equal (var "n") (var "funcName")]) $
-    Logic.ifElse (Logic.and (var "isSelfCall")
-                            (Equality.equal (Lists.length $ var "gatherArgs") (Lists.length $ var "paramNames")))
-      -- TAIL CALL: emit param reassignment + continue
-      (-- Filter out self-assignments (e.g. x = x) so params remain effectively final for lambdas
-        "changePairs" <~ Lists.filter ("pair" ~>
-          Logic.not (cases _Term (Strip.deannotateAndDetypeTerm @@ Pairs.second (var "pair"))
-            (Just false) [
-            _Term_variable>>: "n" ~> Equality.equal (var "n") (Pairs.first (var "pair"))]))
-          (Lists.zip (var "paramNames") (var "gatherArgs")) $
-        "changedParams" <~ Lists.map (unaryFunction Pairs.first) (var "changePairs") $
-        "jChangedArgs" <<~ Eithers.mapList ("pair" ~> encodeTerm @@ var "env" @@ (Pairs.second (var "pair")) @@ var "cx" @@ var "g")
-          (var "changePairs") $
-        "assignments" <~ (Lists.map ("pair" ~>
-          "paramName" <~ (Pairs.first $ var "pair") $
-          "jArg" <~ (Pairs.second $ var "pair") $
-          JavaDsl.blockStatementStatement
-            (JavaUtilsSource.javaAssignmentStatement
-              @@ (JavaDsl.leftHandSideExpressionName
-                    (JavaUtilsSource.javaIdentifierToJavaExpressionName
-                      @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "paramName")))
-              @@ var "jArg"))
-          (Lists.zip (var "changedParams") (var "jChangedArgs"))) $
-        "continueStmt" <~ (JavaDsl.blockStatementStatement
-          (JavaDsl.statementWithoutTrailing
-            (inject Java._StatementWithoutTrailingSubstatement Java._StatementWithoutTrailingSubstatement_continue
-              (wrap Java._ContinueStatement (nothing :: TTerm (Maybe Java.Identifier)))))) $
-        right $ Lists.concat2 (var "assignments") (list [var "continueStmt"]))
-      -- NOT a self-call: check for let-expression or case statement application
-      (cases _Term (var "stripped")
-        (Just $
-          -- Default: check for case statement application
-          "gathered2" <~ (Analysis.gatherApplications @@ var "term") $
-        "args2" <~ (Pairs.first $ var "gathered2") $
-        "body2" <~ (Pairs.second $ var "gathered2") $
-        Logic.ifElse (Equality.equal (Lists.length $ var "args2") (int32 1))
-          -- Single argument: try to match as case statement
-          ("arg" <~ (Maybes.fromMaybe Core.termUnit (Lists.maybeHead $ var "args2")) $
-            cases _Term (Strip.deannotateAndDetypeTerm @@ var "body2") (Just $
-              -- Default: not a case statement, encode as return
-              "expr" <<~ (encodeTerm @@ var "env" @@ var "term" @@ var "cx" @@ var "g") $
-              right $ list [JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "expr"))]) [
-              _Term_cases>>: "cs" ~>
-                        -- Case statement: generate if/instanceof chain
-                        "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-                        "tname" <~ (Core.caseStatementTypeName $ var "cs") $
-                        "dflt" <~ (Core.caseStatementDefault $ var "cs") $
-                        "cases_" <~ (Core.caseStatementCases $ var "cs") $
-                        "domArgs" <<~ (domTypeArgs @@ var "aliases" @@ (Resolution.nominalApplication @@ var "tname" @@ list ([] :: [TTerm Type])) @@ var "cx" @@ var "g") $
-                        -- Encode the argument (the value being matched) and cache in a local variable
-                        -- so that complex expressions (e.g. deannotateType(t_tco)) are computed once,
-                        -- not duplicated across every instanceof check and cast.
-                        "jArgRaw" <<~ (encodeTerm @@ var "env" @@ var "arg" @@ var "cx" @@ var "g") $
-                        "depthSuffix" <~ Logic.ifElse (Equality.equal (var "tcoDepth") (int32 0))
-                          (string "")
-                          (Literals.showInt32 (var "tcoDepth")) $
-                        "matchVarId" <~ (JavaUtilsSource.javaIdentifier @@
-                          Strings.cat (list [string "_tco_match_", Formatting.decapitalize @@ (Names.localNameOf @@ var "tname"), var "depthSuffix"])) $
-                        "matchDecl" <~ (JavaUtilsSource.varDeclarationStatement @@ var "matchVarId" @@ var "jArgRaw") $
-                        "jArg" <~ (JavaUtilsSource.javaIdentifierToJavaExpression @@ var "matchVarId") $
-                        -- Generate if/instanceof blocks for each case branch
-                        "ifBlocks" <<~ (Eithers.mapList ("field" ~>
-                          "fieldName" <~ (Core.fieldName (var "field")) $
-                          -- Build the variant reference type for instanceof
-                          "variantRefType" <~ (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ true @@ var "domArgs"
-                            @@ var "tname" @@ just (Formatting.capitalize @@ (Core.unName (var "fieldName")))) $
-                          -- Extract the lambda body from this case branch
-                          cases _Term (Strip.deannotateTerm @@ Core.fieldTerm (var "field"))
-                            (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ string "TCO: case branch is not a lambda") (var "cx")) [
-                            _Term_lambda>>: "lam" ~>
-                                  -- Use withLambda to properly set up the lambda context
-                                  withLambda @@ var "env" @@ var "lam" @@ (lambda "env2" $
-                                  "lambdaParam" <~ Core.lambdaParameter (var "lam") $
-                                  "branchBody" <~ Core.lambdaBody (var "lam") $
-                                  "env3" <~ (insertBranchVar @@ var "lambdaParam" @@ var "env2") $
-                                  -- Build local var: VariantType varName = (VariantType) arg;
-                                  "varId" <~ (JavaUtilsSource.variableToJavaIdentifier @@ var "lambdaParam") $
-                                  "castExpr" <~ (JavaUtilsSource.javaCastExpressionToJavaExpression
-                                    @@ (JavaUtilsSource.javaCastExpression @@ var "variantRefType"
-                                          @@ (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "jArg"))) $
-                                  "localDecl" <~ (JavaUtilsSource.varDeclarationStatement @@ var "varId" @@ var "castExpr") $
-                                  -- Check if this branch body is a self-tail-call
-                                  "isBranchTailCall" <~ (Analysis.isTailRecursiveInTailPosition @@ var "funcName" @@ var "branchBody") $
-                                  "bodyStmts" <<~ (Logic.ifElse (var "isBranchTailCall")
-                                    -- Self-call: emit assignment + continue via encodeTermTCO
-                                    (encodeTermTCO @@ var "env3" @@ var "funcName" @@ var "paramNames" @@ var "tcoVarRenames" @@ (Math.add (var "tcoDepth") (int32 1)) @@ var "branchBody" @@ var "cx" @@ var "g")
-                                    -- Not a self-call: use normal encoding with analyzeJavaFunction
-                                    ("fs" <<~ (analyzeJavaFunction @@ var "env3" @@ var "branchBody" @@ var "cx" @@ var "g") $
-                                      "bindings" <~ (project _FunctionStructure _FunctionStructure_bindings @@ var "fs") $
-                                      "innerBody" <~ (project _FunctionStructure _FunctionStructure_body @@ var "fs") $
-                                      "env4" <~ (project _FunctionStructure _FunctionStructure_environment @@ var "fs") $
-                                      "bindResult" <<~ (bindingsToStatements @@ var "env4" @@ var "bindings" @@ var "cx" @@ var "g") $
-                                      "bindingStmts" <~ Pairs.first (var "bindResult") $
-                                      "env5" <~ Pairs.second (var "bindResult") $
-                                      "jret" <<~ (encodeTerm @@ var "env5" @@ var "innerBody" @@ var "cx" @@ var "g") $
-                                      "returnStmt" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "jret"))) $
-                                      right $ Lists.concat2 (var "bindingStmts") (list [var "returnStmt"]))) $
-                                  -- Build: if (arg instanceof VariantType) { VariantType v = (VariantType) arg; stmts... }
-                                  -- Use jArg (the encoded case argument) for the instanceof check,
-                                  -- not paramNames[0], which may differ from the actual matched variable
-                                  "relExpr" <~ (JavaUtilsSource.javaInstanceOf
-                                    @@ (JavaUtilsSource.javaUnaryExpressionToJavaRelationalExpression
-                                          @@ (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "jArg"))
-                                    @@ var "variantRefType") $
-                                  "condExpr" <~ (JavaUtilsSource.javaRelationalExpressionToJavaExpression @@ var "relExpr") $
-                                  "blockStmts" <~ Lists.cons (var "localDecl") (var "bodyStmts") $
-                                  "ifBody" <~ (JavaDsl.statementWithoutTrailing
-                                    (JavaDsl.stmtBlock (JavaDsl.block (var "blockStmts")))) $
-                                  right $ JavaDsl.blockStatementStatement
-                                    (JavaDsl.statementIfThen (JavaDsl.ifThenStatement (var "condExpr") (var "ifBody"))))])
-                          (var "cases_")) $
-                        -- Default: return the expression (or the arg for otherwise)
-                        "defaultStmt" <<~ (Maybes.cases (var "dflt")
-                          -- No default: return the argument unchanged
-                          (right $ list [JavaDsl.blockStatementStatement
-                            (JavaUtilsSource.javaReturnStatement @@ just (var "jArg"))])
-                          ("d" ~>
-                            -- Default is a value to return, not a function to apply to the argument
-                            "dExpr" <<~ (encodeTerm @@ var "env" @@ var "d" @@ var "cx" @@ var "g") $
-                            right $ list [JavaDsl.blockStatementStatement
-                              (JavaUtilsSource.javaReturnStatement @@ just (var "dExpr"))])) $
-                        right $ Lists.concat (list [list [var "matchDecl"], var "ifBlocks", var "defaultStmt"])])
-          -- Not a single-arg application: fall back to normal return
-          ("expr" <<~ (encodeTerm @@ var "env" @@ var "term" @@ var "cx" @@ var "g") $
-            right $ list [JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "expr"))])) [
-        -- Let-expression: encode bindings as statements, then recurse on body
-        _Term_let>>: "lt" ~>
-          "letBindings" <~ Core.letBindings (var "lt") $
-          "letBody" <~ Core.letBody (var "lt") $
-          "bindResult" <<~ (bindingsToStatements @@ var "env" @@ var "letBindings" @@ var "cx" @@ var "g") $
-          "letStmts" <~ Pairs.first (var "bindResult") $
-          "envAfterLet" <~ Pairs.second (var "bindResult") $
-          "tcoBodyStmts" <<~ (encodeTermTCO @@ var "envAfterLet" @@ var "funcName" @@ var "paramNames" @@ var "tcoVarRenames" @@ var "tcoDepth" @@ var "letBody" @@ var "cx" @@ var "g") $
-          right $ Lists.concat2 (var "letStmts") (var "tcoBodyStmts")])
-
--- | Encode a Hydra type as a Java type
-encodeType :: TTermDefinition (JavaHelpers.Aliases -> S.Set Name -> Type -> Context -> Graph -> Either Error Java.Type)
-encodeType = def "encodeType" $
-  lambda "aliases" $ lambda "boundVars" $ lambda "t" $
-    "cx" ~> "g" ~>
-    "inScopeTypeParams" <~ project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases" $
-    "typeVarSubst" <~ project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "can't encode unsupported type in Java: ") (ShowCore.type_ @@ var "t")) (var "cx")) [
-      _Type_application>>: lambda "at" $
-        "jlhs" <<~ (encodeType @@ var "aliases" @@ var "boundVars" @@ (Core.applicationTypeFunction (var "at")) @@ var "cx" @@ var "g") $
-        "jrhs" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (Core.applicationTypeArgument (var "at")) @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        JavaUtilsSource.addJavaTypeParameter @@ var "jrhs" @@ var "jlhs" @@ var "cx",
-      _Type_function>>: lambda "ft" $
-        "jdom" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (Core.functionTypeDomain (var "ft")) @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        "jcod" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (Core.functionTypeCodomain (var "ft")) @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "jdom", var "jcod"]
-          @@ asTerm JavaNamesSource.javaUtilFunctionPackageName
-          @@ string "Function"),
-      _Type_forall>>: lambda "fa" $
-        "jbody" <<~ (encodeType @@ var "aliases"
-          @@ (Sets.insert (Core.forallTypeParameter (var "fa")) (var "boundVars"))
-          @@ (Core.forallTypeBody (var "fa")) @@ var "cx" @@ var "g") $
-        JavaUtilsSource.addJavaTypeParameter
-          @@ (JavaUtilsSource.javaTypeVariable @@ (unwrap _Name @@ Core.forallTypeParameter (var "fa")))
-          @@ var "jbody" @@ var "cx",
-      _Type_list>>: lambda "et" $
-        "jet" <<~ (encodeType @@ var "aliases" @@ var "boundVars" @@ var "et" @@ var "cx" @@ var "g") $
-        "rt" <<~ (Eithers.bind (right (var "jet")) (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "rt"]
-          @@ asTerm JavaNamesSource.javaUtilPackageName
-          @@ string "List"),
-      _Type_literal>>: lambda "lt" $
-        encodeLiteralType @@ var "lt" @@ var "cx" @@ var "g",
-      _Type_either>>: lambda "et" $
-        "jlt" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (project _EitherType _EitherType_left @@ var "et") @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        "jrt" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (project _EitherType _EitherType_right @@ var "et") @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "jlt", var "jrt"]
-          @@ asTerm JavaNamesSource.hydraUtilPackageName
-          @@ string "Either"),
-      _Type_map>>: lambda "mt" $
-        "jkt" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (Core.mapTypeKeys (var "mt")) @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        "jvt" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (Core.mapTypeValues (var "mt")) @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "jkt", var "jvt"]
-          @@ asTerm JavaNamesSource.javaUtilPackageName
-          @@ string "Map"),
-      _Type_pair>>: lambda "pt" $
-        "jfirst" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (project _PairType _PairType_first @@ var "pt") @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        "jsecond" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ (project _PairType _PairType_second @@ var "pt") @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "jfirst", var "jsecond"]
-          @@ asTerm JavaNamesSource.hydraUtilPackageName
-          @@ string "Pair"),
-      _Type_unit>>: lambda "_" $
-        right (JavaUtilsSource.javaRefType
-          @@ list ([] :: [TTerm Java.ReferenceType])
-          @@ asTerm JavaNamesSource.javaLangPackageName
-          @@ string "Void"),
-      _Type_record>>: lambda "rt" $
-        Logic.ifElse
-          (Lists.null (var "rt"))
-          (right (JavaUtilsSource.javaRefType
-            @@ list ([] :: [TTerm Java.ReferenceType])
-            @@ asTerm JavaNamesSource.javaLangPackageName
-            @@ string "Void"))
-          (Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous record type")) (var "cx")),
-      _Type_maybe>>: lambda "ot" $
-        "jot" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ var "ot" @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "jot"]
-          @@ asTerm JavaNamesSource.hydraUtilPackageName
-          @@ string "Maybe"),
-      _Type_set>>: lambda "st" $
-        "jst" <<~ (Eithers.bind
-          (encodeType @@ var "aliases" @@ var "boundVars" @@ var "st" @@ var "cx" @@ var "g")
-          (lambda "jt_" $ JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt_" @@ var "cx")) $
-        right (JavaUtilsSource.javaRefType
-          @@ list [var "jst"]
-          @@ asTerm JavaNamesSource.javaUtilPackageName
-          @@ string "Set"),
-      _Type_union>>: lambda "_" $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous union type")) (var "cx"),
-      _Type_variable>>: lambda "name0" $
-        -- Apply type variable substitution
-        "name" <~ Maybes.fromMaybe (var "name0") (Maps.lookup (var "name0") (var "typeVarSubst")) $
-        -- Check if it's a typedef that should be resolved
-        "resolved" <<~ (encodeType_resolveIfTypedef @@ var "aliases" @@ var "boundVars" @@ var "inScopeTypeParams" @@ var "name" @@ var "cx" @@ var "g") $
-        Maybes.cases (var "resolved")
-          -- Not a typedef: determine reference kind
-          (right $
-            Logic.ifElse (Logic.or (Sets.member (var "name") (var "boundVars")) (Sets.member (var "name") (var "inScopeTypeParams")))
-              -- In scope: type variable reference
-              (inject Java._Type Java._Type_reference (JavaUtilsSource.javaTypeVariable @@ (unwrap _Name @@ var "name")))
-              (Logic.ifElse (isLambdaBoundVariable @@ var "name")
-                (inject Java._Type Java._Type_reference (JavaUtilsSource.javaTypeVariable @@ (unwrap _Name @@ var "name")))
-                (Logic.ifElse (isUnresolvedInferenceVar @@ var "name")
-                  -- Unresolved inference var: Object
-                  (inject Java._Type Java._Type_reference
-                    (inject Java._ReferenceType Java._ReferenceType_classOrInterface
-                      (inject Java._ClassOrInterfaceType Java._ClassOrInterfaceType_class
-                        (JavaUtilsSource.javaClassType
-                          @@ list ([] :: [TTerm Java.ReferenceType])
-                          @@ asTerm JavaNamesSource.javaLangPackageName
-                          @@ string "Object"))))
-                  -- Named reference
-                  (inject Java._Type Java._Type_reference
-                    (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ boolean True
-                      @@ list ([] :: [TTerm Java.TypeArgument])
-                      @@ var "name"
-                      @@ nothing)))))
-          -- Typedef resolved: encode the resolved type
-          (lambda "resolvedType" $
-            encodeType @@ var "aliases" @@ var "boundVars" @@ var "resolvedType" @@ var "cx" @@ var "g"),
-      _Type_wrap>>: lambda "_" $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous wrap type")) (var "cx")]
-
--- | Encode a type definition as a Java compilation unit.
-encodeTypeDefinition :: TTermDefinition (Java.PackageDeclaration -> JavaHelpers.Aliases -> TypeDefinition -> Context -> Graph -> Either Error (Name, Java.CompilationUnit))
-encodeTypeDefinition = def "encodeTypeDefinition" $
-  lambda "pkg" $ lambda "aliases" $ lambda "tdef" $
-    "cx" ~> "g" ~>
-    "name" <~ (project _TypeDefinition _TypeDefinition_name @@ var "tdef") $
-    "typ" <~ (Core.typeSchemeBody $ project _TypeDefinition _TypeDefinition_typeScheme @@ var "tdef") $
-    -- Check if serializable
-    "serializable" <~ (isSerializableJavaType @@ var "typ") $
-    "imports" <~ Logic.ifElse (var "serializable")
-      (list [inject Java._ImportDeclaration Java._ImportDeclaration_singleType
-        (wrap Java._SingleTypeImportDeclaration
-          (JavaUtilsSource.javaTypeName @@ (JavaDsl.identifier (string "java.io.Serializable"))))])
-      (list ([] :: [TTerm Java.ImportDeclaration])) $
-    "decl" <<~ (toClassDecl @@ false @@ var "serializable" @@ var "aliases"
-      @@ (list ([] :: [TTerm Java.TypeParameter])) @@ var "name" @@ var "typ" @@ var "cx" @@ var "g") $
-    "comment" <<~ (Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "typ") $
-    "tdecl" <~ record Java._TypeDeclarationWithComments [
-      Java._TypeDeclarationWithComments_value>>: inject Java._TypeDeclaration Java._TypeDeclaration_class (var "decl"),
-      Java._TypeDeclarationWithComments_comments>>: var "comment"] $
-    right (pair (var "name")
-      (inject Java._CompilationUnit Java._CompilationUnit_ordinary (record Java._OrdinaryCompilationUnit [
-        Java._OrdinaryCompilationUnit_package>>: just (var "pkg"),
-        Java._OrdinaryCompilationUnit_imports>>: var "imports",
-        Java._OrdinaryCompilationUnit_types>>: list [var "tdecl"]])))
-
--- | Resolve a TypeVariable name if it refers to a typedef (simple type alias)
-encodeType_resolveIfTypedef :: TTermDefinition (JavaHelpers.Aliases -> S.Set Name -> S.Set Name -> Name -> Context -> Graph -> Either Error (Maybe Type))
-encodeType_resolveIfTypedef = def "encodeType_resolveIfTypedef" $
-  lambda "aliases" $ lambda "boundVars" $ lambda "inScopeTypeParams" $ lambda "name" $
-    "cx" ~> "g" ~>
-    Logic.ifElse (Logic.or (Sets.member (var "name") (var "boundVars")) (Sets.member (var "name") (var "inScopeTypeParams")))
-      (right nothing)
-      (Logic.ifElse (isLambdaBoundVariable @@ var "name")
-        (right nothing)
-        ("schemaTypes" <~ Graph.graphSchemaTypes (var "g") $
-          Maybes.cases (Maps.lookup (var "name") (var "schemaTypes"))
-            (right nothing)
-            (lambda "ts" $
-              Logic.ifElse (Logic.not (Lists.null (Core.typeSchemeVariables (var "ts"))))
-                (right nothing)
-                (cases _Type (Strip.deannotateType @@ Core.typeSchemeBody (var "ts"))
-                  (Just $ right (just (Core.typeSchemeBody (var "ts")))) [
-                  _Type_record>>: lambda "_" $ right nothing,
-                  _Type_union>>: lambda "_" $ right nothing,
-                  _Type_wrap>>: lambda "_" $ right nothing]))))
-
--- | Encode a variable reference as a Java expression
-encodeVariable :: TTermDefinition (JavaHelpers.JavaEnvironment -> Name -> Context -> Graph -> Either Error Java.Expression)
-encodeVariable = def "encodeVariable" $
-  lambda "env" $ lambda "name" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    -- Apply varRenames to get the Java-level variable name (for TCO snapshot support)
-    "resolvedName" <~ (JavaUtilsSource.lookupJavaVarName @@ var "aliases" @@ var "name") $
-    "jid" <~ (JavaUtilsSource.javaIdentifier @@ (unwrap _Name @@ var "resolvedName")) $
-    -- Branch vars: access .value field
-    Logic.ifElse (Sets.member (var "name") (project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases"))
-      (right (JavaUtilsSource.javaFieldAccessToJavaExpression @@
-        (JavaDsl.fieldAccess
-          (inject Java._FieldAccess_Qualifier Java._FieldAccess_Qualifier_primary
-            (JavaUtilsSource.javaExpressionToJavaPrimary @@ (JavaUtilsSource.javaIdentifierToJavaExpression @@ var "jid")))
-          (JavaUtilsSource.javaIdentifier @@ asTerm JavaNamesSource.valueFieldName))))
-      -- instance_value special case
-      (Logic.ifElse (Logic.and
-          (Equality.equal (var "name") (wrap _Name (Strings.cat (list [asTerm JavaNamesSource.instanceName, string "_", asTerm JavaNamesSource.valueFieldName]))))
-          (isRecursiveVariable @@ var "aliases" @@ var "name"))
-        ("instanceExpr" <~ (JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaUtilsSource.javaIdentifier @@ asTerm JavaNamesSource.instanceName)) $
-         right (JavaUtilsSource.javaFieldAccessToJavaExpression @@
-          (JavaDsl.fieldAccess
-            (inject Java._FieldAccess_Qualifier Java._FieldAccess_Qualifier_primary
-              (JavaUtilsSource.javaExpressionToJavaPrimary @@ var "instanceExpr"))
-            (JavaUtilsSource.javaIdentifier @@ asTerm JavaNamesSource.valueFieldName))))
-        -- Recursive variables use .get()
-        (Logic.ifElse (Logic.and
-            (isRecursiveVariable @@ var "aliases" @@ var "name")
-            (Logic.not (isLambdaBoundIn @@ var "name" @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases"))))
-          (right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-            (JavaUtilsSource.methodInvocation @@
-              (just (Phantoms.left (JavaDsl.expressionName nothing (var "jid"))))
-              @@ (JavaDsl.identifier (asTerm JavaNamesSource.getMethodName)) @@ (list ([] :: [TTerm Java.Expression])))))
-          -- Thunked variables use .get()
-          (Logic.ifElse (Logic.and
-              (Sets.member (var "name") (project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases"))
-              (Logic.not (isLambdaBoundIn @@ var "name" @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases"))))
-            (right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocation @@
-                (just (Phantoms.left (JavaDsl.expressionName nothing (var "jid"))))
-                @@ (JavaDsl.identifier (asTerm JavaNamesSource.getMethodName)) @@ (list ([] :: [TTerm Java.Expression])))))
-            -- Lambda-bound variables
-            (Logic.ifElse (isLambdaBoundIn @@ var "name" @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases"))
-              ("actualName" <~ (findMatchingLambdaVar @@ var "name" @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases")) $
-               "resolvedActual" <~ (JavaUtilsSource.lookupJavaVarName @@ var "aliases" @@ var "actualName") $
-               right (JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "resolvedActual")))
-              -- In-scope let-bound variables: treat as local (skip classifyDataReference which may find them in the extended graph)
-              (Logic.ifElse (Sets.member (var "name") (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases"))
-                (right (JavaUtilsSource.javaIdentifierToJavaExpression @@ (elementJavaIdentifier @@ boolean False @@ boolean False @@ var "aliases" @@ var "resolvedName")))
-              -- Classify and encode
-              ("cls" <<~ (classifyDataReference @@ var "name" @@ var "cx" @@ var "g") $
-               cases JavaHelpers._JavaSymbolClass (var "cls") Nothing [
-                 JavaHelpers._JavaSymbolClass_hoistedLambda>>: "arity" ~>
-                   encodeVariable_hoistedLambdaCase @@ var "aliases" @@ var "name" @@ var "arity" @@ var "cx" @@ var "g",
-                 JavaHelpers._JavaSymbolClass_localVariable>>: lambda "_" $
-                   right (JavaUtilsSource.javaIdentifierToJavaExpression @@ (elementJavaIdentifier @@ boolean False @@ boolean False @@ var "aliases" @@ var "resolvedName")),
-                 JavaHelpers._JavaSymbolClass_constant>>: lambda "_" $
-                   right (JavaUtilsSource.javaIdentifierToJavaExpression @@ (elementJavaIdentifier @@ boolean False @@ boolean False @@ var "aliases" @@ var "name")),
-                 JavaHelpers._JavaSymbolClass_nullaryFunction>>: lambda "_" $
-                   right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                     (JavaUtilsSource.methodInvocation @@ nothing @@
-                       (elementJavaIdentifier @@ boolean False @@ boolean False @@ var "aliases" @@ var "name") @@
-                       (list ([] :: [TTerm Java.Expression])))),
-                 JavaHelpers._JavaSymbolClass_unaryFunction>>: lambda "_" $
-                   right (JavaUtilsSource.javaIdentifierToJavaExpression @@ (elementJavaIdentifier @@ boolean False @@ boolean True @@ var "aliases" @@ var "name"))]))))))
-
--- | Build a curried lambda from a list of parameter names wrapping a call expression
-encodeVariable_buildCurried :: TTermDefinition ([Name] -> Java.Expression -> Java.Expression)
-encodeVariable_buildCurried = def "encodeVariable_buildCurried" $
-  lambda "params" $ lambda "inner" $
-    Maybes.fromMaybe (var "inner") (Maybes.map
-      (lambda "p" $
-        JavaUtilsSource.javaLambda @@ Pairs.first (var "p") @@
-          (encodeVariable_buildCurried @@
-            Pairs.second (var "p") @@ var "inner"))
-      (Lists.uncons (var "params")))
-
--- | Handle the HoistedLambda case of encodeVariable
-encodeVariable_hoistedLambdaCase :: TTermDefinition (JavaHelpers.Aliases -> Name -> Int -> Context -> Graph -> Either Error Java.Expression)
-encodeVariable_hoistedLambdaCase = def "encodeVariable_hoistedLambdaCase" $
-  lambda "aliases" $ lambda "name" $ lambda "arity" $
-    "cx" ~> "g" ~>
-    "paramNames" <~ Lists.map
-      (lambda "i" $ wrap _Name (Strings.cat2 (string "p") (Literals.showInt32 (var "i"))))
-      (Math.range (int32 0) (Math.sub (var "arity") (int32 1))) $
-    "paramExprs" <~ Lists.map
-      (lambda "pn" $ JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "pn"))
-      (var "paramNames") $
-    "call" <~ (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-      (JavaUtilsSource.methodInvocation @@ nothing @@
-        (elementJavaIdentifier @@ boolean False @@ boolean False @@ var "aliases" @@ var "name") @@
-        var "paramExprs")) $
-    "lam" <~ encodeVariable_buildCurried @@ var "paramNames" @@ var "call" $
-    -- Try to cast to the function's curried type
-    "mel" <<~ right (Lexical.lookupBinding @@ var "g" @@ var "name") $
-    Maybes.cases (var "mel")
-      (right (var "lam"))
-      (lambda "el" $
-        Maybes.cases (Core.bindingTypeScheme (var "el"))
-          (right (var "lam"))
-          (lambda "ts" $
-            "typ" <~ Core.typeSchemeBody (var "ts") $
-            "jtype" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "typ" @@ var "cx" @@ var "g") $
-            "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jtype" @@ var "cx") $
-            right (JavaUtilsSource.javaCastExpressionToJavaExpression @@
-              (JavaUtilsSource.javaCastExpression @@ var "rt" @@
-                (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "lam")))))
-
--- | Build an equality clause for a single field in the equals() method.
-eqClause :: TTermDefinition (String -> FieldType -> Java.InclusiveOrExpression)
-eqClause = def "eqClause" $
-  lambda "tmpName" $ lambda "ft" $ lets [
-    "fname">: unwrap _Name @@ Core.fieldTypeName (var "ft"),
-    "ftype">: Core.fieldTypeType (var "ft")] $
-    Logic.ifElse (isBinaryType @@ var "ftype")
-      (arraysEqualsClause @@ var "tmpName" @@ var "fname")
-      (Logic.ifElse (isBigNumericType @@ var "ftype")
-        (compareToZeroClause @@ var "tmpName" @@ var "fname")
-        (equalsClause @@ var "tmpName" @@ var "fname"))
-
--- | Objects.equals(this.field, other.field) for null-safe comparison
-equalsClause :: TTermDefinition (String -> String -> Java.InclusiveOrExpression)
-equalsClause = def "equalsClause" $
-  lambda "tmpName" $ lambda "fname" $ lets [
-    "thisArg">: JavaUtilsSource.javaExpressionNameToJavaExpression
-      @@ (JavaUtilsSource.fieldExpression @@ wrap Java._Identifier (string "this")
-        @@ (JavaUtilsSource.javaIdentifier @@ var "fname")),
-    "otherArg">: JavaUtilsSource.javaExpressionNameToJavaExpression
-      @@ (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.javaIdentifier @@ var "tmpName")
-        @@ (JavaUtilsSource.javaIdentifier @@ var "fname")),
-    "header">: JavaDsl.methodInvocationHeaderComplex
-      (JavaDsl.methodInvocationComplex
-        (JavaDsl.methodInvocationVariantType (JavaUtilsSource.javaTypeName @@ wrap Java._Identifier (string "java.util.Objects")))
-        (list ([] :: [TTerm Java.TypeArgument]))
-        (wrap Java._Identifier (asTerm JavaNamesSource.equalsMethodName)))] $
-    JavaUtilsSource.javaPostfixExpressionToJavaInclusiveOrExpression
-      @@ (JavaUtilsSource.javaMethodInvocationToJavaPostfixExpression
-        @@ (JavaDsl.methodInvocation_ (var "header") (list [var "thisArg", var "otherArg"])))
-
--- | Try to extract the argument type from a function application.
--- For a function like a constructor :: a -> Wrapper a with return type Wrapper a,
--- the argument type is a (the type parameter of the wrapper).
-extractArgType :: TTermDefinition (Type -> Type -> Type)
-extractArgType = def "extractArgType" $
-  lambda "_lhs" $ lambda "typ" $
-    cases _Type (var "typ")
-      (Just $ var "typ") [
-      _Type_application>>: lambda "at1" $
-        cases _Type (Core.applicationTypeFunction (var "at1"))
-          (Just $ var "typ") [
-          _Type_application>>: lambda "_at2" $
-            Core.applicationTypeArgument (var "at1")]]
-
--- | Extract input/output pairs for direct variable returns in
--- "context extension" functions: ... -> V -> X -> V (or W)
-extractDirectReturn :: TTermDefinition (S.Set Name -> Type -> [(Name, Name)])
-extractDirectReturn = def "extractDirectReturn" $
-  lambda "tparamSet" $ lambda "t" $
-    extractDirectReturn_go @@ var "tparamSet" @@ var "t"
-
-extractDirectReturn_go :: TTermDefinition (S.Set Name -> Type -> [(Name, Name)])
-extractDirectReturn_go = def "extractDirectReturn_go" $
-  lambda "tparamSet" $ lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ list ([] :: [TTerm (Name, Name)])) [
-      _Type_function>>: lambda "ft" $
-        "dom" <~ (Strip.deannotateType @@ Core.functionTypeDomain (var "ft")) $
-        "cod" <~ Core.functionTypeCodomain (var "ft") $
-        cases _Type (var "dom")
-          (Just $ extractDirectReturn_go @@ var "tparamSet" @@ var "cod") [
-          _Type_variable>>: lambda "inVar" $
-            Logic.ifElse
-              (Sets.member (var "inVar") (var "tparamSet"))
-              (cases _Type (Strip.deannotateType @@ var "cod")
-                (Just $ list ([] :: [TTerm (Name, Name)])) [
-                _Type_function>>: lambda "ft2" $
-                  "midArg" <~ (Strip.deannotateType @@ Core.functionTypeDomain (var "ft2")) $
-                  "retPart" <~ (Strip.deannotateType @@ Core.functionTypeCodomain (var "ft2")) $
-                  cases _Type (var "midArg")
-                    (Just $
-                      cases _Type (var "retPart")
-                        (Just $ list ([] :: [TTerm (Name, Name)])) [
-                        _Type_variable>>: lambda "outVar" $
-                          Logic.ifElse
-                            (Sets.member (var "outVar") (var "tparamSet"))
-                            (list [pair (var "inVar") (var "outVar")])
-                            (list ([] :: [TTerm (Name, Name)]))]
-                    ) [
-                    _Type_variable>>: lambda "midVar" $
-                      Logic.ifElse
-                        (Sets.member (var "midVar") (var "tparamSet"))
-                        (list ([] :: [TTerm (Name, Name)]))
-                        (cases _Type (var "retPart")
-                          (Just $ list ([] :: [TTerm (Name, Name)])) [
-                          _Type_variable>>: lambda "outVar" $
-                            Logic.ifElse
-                              (Sets.member (var "outVar") (var "tparamSet"))
-                              (list [pair (var "inVar") (var "outVar")])
-                              (list ([] :: [TTerm (Name, Name)]))])]])
-              (extractDirectReturn_go @@ var "tparamSet" @@ var "cod")]]
-
--- | Extract input/output type variable pairs from function-typed parameters.
--- For a param like (A -> ... -> (B, ...)), extract (A, B) where B is
--- the first element of a pair return type.
-extractInOutPair :: TTermDefinition (Type -> [(Name, Name)])
-extractInOutPair = def "extractInOutPair" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ list ([] :: [TTerm (Name, Name)])) [
-      _Type_function>>: lambda "ft" $
-        cases _Type (Strip.deannotateType @@ Core.functionTypeDomain (var "ft"))
-          (Just $ list ([] :: [TTerm (Name, Name)])) [
-          _Type_variable>>: lambda "inVar" $
-            "retType" <~ (unwrapReturnType @@ Core.functionTypeCodomain (var "ft")) $
-            cases _Type (Strip.deannotateType @@ var "retType")
-              (Just $ list ([] :: [TTerm (Name, Name)])) [
-              _Type_pair>>: lambda "pt" $
-                cases _Type (Strip.deannotateType @@ Core.pairTypeFirst (var "pt"))
-                  (Just $ list ([] :: [TTerm (Name, Name)])) [
-                  _Type_variable>>: lambda "outVar" $
-                    list [pair (var "inVar") (var "outVar")]]]]]
-
--- | Extract input/output pairs for direct variable returns in
-
-extractTypeApplicationArgs :: TTermDefinition (Type -> [Type])
-extractTypeApplicationArgs = def "extractTypeApplicationArgs" $
-  lambda "typ" $ Lists.reverse (extractTypeApplicationArgs_go @@ var "typ")
-
-extractTypeApplicationArgs_go :: TTermDefinition (Type -> [Type])
-extractTypeApplicationArgs_go = def "extractTypeApplicationArgs_go" $
-  lambda "t" $ cases _Type (var "t")
-    (Just $ list ([] :: [TTerm Type])) [
-    _Type_application>>: lambda "at" $
-      Lists.cons
-        (Core.applicationTypeArgument (var "at"))
-        (extractTypeApplicationArgs_go @@ (Core.applicationTypeFunction (var "at")))]
-
--- | Convert a field type to a Java formal parameter
-fieldTypeToFormalParam :: TTermDefinition (JavaHelpers.Aliases -> FieldType -> Context -> Graph -> Either Error Java.FormalParameter)
-fieldTypeToFormalParam = def "fieldTypeToFormalParam" $
-  lambda "aliases" $ lambda "ft" $
-    "cx" ~> "g" ~>
-    "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ (Core.fieldTypeType (var "ft")) @@ var "cx" @@ var "g") $
-    right (JavaUtilsSource.javaTypeToJavaFormalParameter @@ var "jt" @@ Core.fieldTypeName (var "ft"))
-
--- | Select elements from a list where the corresponding flag is True.
-filterByFlags :: TTermDefinition ([a] -> [Bool] -> [a])
-filterByFlags = def "filterByFlags" $
-  lambda "xs" $ lambda "flags" $
-    Lists.map (lambda "p" $ Pairs.first (var "p"))
-      (Lists.filter (lambda "p" $ Pairs.second (var "p"))
-        (Lists.zip (var "xs") (var "flags")))
-
--- | Filter type arguments to remove those at positions corresponding to phantom
--- or over-generalized scheme variables.
-filterPhantomTypeArgs :: TTermDefinition (Name -> [Type] -> Context -> Graph -> Either Error [Type])
-filterPhantomTypeArgs = def "filterPhantomTypeArgs" $
-  lambda "calleeName" $ lambda "allTypeArgs" $
-    "cx" ~> "g" ~>
-    "mel" <<~ right (Lexical.lookupBinding @@ var "g" @@ var "calleeName") $
-    Maybes.cases (var "mel")
-      (right (var "allTypeArgs"))
-      (lambda "el" $
-        Maybes.cases (Core.bindingTypeScheme (var "el"))
-          (right (var "allTypeArgs"))
-          (lambda "ts" $
-            "schemeVars" <~ Lists.filter (lambda "v" $ isSimpleName @@ var "v") (Core.typeSchemeVariables (var "ts")) $
-            "schemeTypeVars" <~ collectTypeVars @@ Core.typeSchemeBody (var "ts") $
-            "schemeType" <~ Core.typeSchemeBody (var "ts") $
-            "nParams" <~ countFunctionParams @@ var "schemeType" $
-            "peeled" <~ peelDomainTypes @@ var "nParams" @@ var "schemeType" $
-            "calleeDoms" <~ Pairs.first (var "peeled") $
-            "calleeCod" <~ Pairs.second (var "peeled") $
-            "overgenSubst" <~ detectAccumulatorUnification @@ var "calleeDoms" @@ var "calleeCod" @@ var "schemeVars" $
-            "keepFlags" <~ Lists.map
-              (lambda "v" $ Logic.and
-                (Sets.member (var "v") (var "schemeTypeVars"))
-                (Logic.not (Maps.member (var "v") (var "overgenSubst"))))
-              (var "schemeVars") $
-            Logic.ifElse
-              (Logic.not (Equality.equal (Lists.length (var "schemeVars")) (Lists.length (var "allTypeArgs"))))
-              (right (var "allTypeArgs"))
-              (right (filterPhantomTypeArgs_filterAndApply @@ var "allTypeArgs" @@ var "keepFlags" @@ var "overgenSubst"))))
-
--- | Helper: given type args, keep-flags, and overgen subst, filter and apply.
-filterPhantomTypeArgs_filterAndApply :: TTermDefinition ([Type] -> [Bool] -> M.Map Name Type -> [Type])
-filterPhantomTypeArgs_filterAndApply = def "filterPhantomTypeArgs_filterAndApply" $
-  lambda "allTypeArgs" $ lambda "keepFlags" $ lambda "overgenSubst" $
-    "filtered" <~ Lists.map
-      (lambda "p" $ Pairs.first (var "p"))
-      (Lists.filter (lambda "p" $ Pairs.second (var "p"))
-        (Lists.zip (var "allTypeArgs") (var "keepFlags"))) $
-    Logic.ifElse
-      (Logic.not (Maps.null (var "overgenSubst")))
-      (Lists.map (lambda "t" $ substituteTypeVarsWithTypes @@ var "overgenSubst" @@ var "t") (var "filtered"))
-      (var "filtered")
-
--- | Find the actual lambda variable name that matches a given reference
-findMatchingLambdaVar :: TTermDefinition (Name -> S.Set Name -> Name)
-findMatchingLambdaVar = def "findMatchingLambdaVar" $
-  lambda "name" $ lambda "lambdaVars" $
-    Logic.ifElse (Sets.member (var "name") (var "lambdaVars"))
-      (var "name")
-      (Logic.ifElse (isLambdaBoundIn_isQualified @@ var "name")
-        (Maybes.fromMaybe (var "name")
-          (Lists.find
-            (lambda "lv" $ Logic.and
-              (isLambdaBoundIn_isQualified @@ var "lv")
-              (Equality.equal
-                (Names.localNameOf @@ var "lv")
-                (Names.localNameOf @@ var "name")))
-            (Sets.toList (var "lambdaVars"))))
-        (Logic.ifElse
-          (Sets.member (wrap _Name (Names.localNameOf @@ var "name")) (var "lambdaVars"))
-          (wrap _Name (Names.localNameOf @@ var "name"))
-          (var "name")))
-
--- | Extract the type variable from the first element of a pair type.
-findPairFirst :: TTermDefinition (Type -> Maybe Name)
-findPairFirst = def "findPairFirst" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just nothing) [
-      _Type_pair>>: lambda "pt" $
-        cases _Type (Strip.deannotateType @@ Core.pairTypeFirst (var "pt"))
-          (Just nothing) [
-          _Type_variable>>: lambda "v" $ just (var "v")]]
-
--- | Find the first self-referencing input var in a grouped map.
-findSelfRefVar :: TTermDefinition (M.Map Name [Name] -> Maybe Name)
-findSelfRefVar = def "findSelfRefVar" $
-  lambda "grouped" $
-    "selfRefs" <~ Lists.filter
-      (lambda "entry" $ (Lists.elem :: TTerm Name -> TTerm [Name] -> TTerm Bool) (Pairs.first (var "entry")) (Pairs.second (var "entry")))
-      (Maps.toList (var "grouped")) $
-    Maybes.map (lambda "entry" $ Pairs.first (var "entry")) (Lists.maybeHead (var "selfRefs"))
-
--- | First 20 prime numbers used as hash code multipliers.
-first20Primes :: TTermDefinition [Int]
-first20Primes = def "first20Primes" $
-  list (fmap bigintAsInt [bigint 2, bigint 3, bigint 5, bigint 7, bigint 11, bigint 13, bigint 17, bigint 19,
-    bigint 23, bigint 29, bigint 31, bigint 37, bigint 41, bigint 43, bigint 47, bigint 53, bigint 59,
-    bigint 61, bigint 67, bigint 71])
-
--- | Flatten a nested application chain f(a1)(a2)...(aN) into ([a1,...,aN], f).
-flattenApps :: TTermDefinition (Term -> [Term] -> ([Term], Term))
-flattenApps = def "flattenApps" $
-  lambda "t" $ lambda "acc" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ pair (var "acc") (var "t")) [
-      _Term_application>>: lambda "app" $
-        flattenApps
-          @@ (project _Application _Application_function @@ var "app")
-          @@ Lists.cons (project _Application _Application_argument @@ var "app") (var "acc")]
-
--- | Flatten nested TermLet into a flat list of Bindings.
-flattenBindings :: TTermDefinition ([Binding] -> [Binding])
-flattenBindings = def "flattenBindings" $
-  lambda "bindings" $
-    Lists.bind (var "bindings") (lambda "b" $
-      cases _Term (Strip.deannotateTerm @@ Core.bindingTerm (var "b"))
-        (Just $ list [var "b"]) [
-        _Term_let>>: lambda "lt" $
-          Lists.concat2
-            (flattenBindings @@ Core.letBindings (var "lt"))
-            (list [Core.binding (Core.bindingName (var "b")) (Core.letBody (var "lt")) (Core.bindingTypeScheme (var "b"))])])
-
--- | Generate a unique name by appending increasing integers, avoiding a given set.
-freshJavaName :: TTermDefinition (Name -> S.Set Name -> Name)
-freshJavaName = def "freshJavaName" $
-  lambda "base" $ lambda "avoid" $
-    freshJavaName_go @@ var "base" @@ var "avoid" @@ int32 2
-
-freshJavaName_go :: TTermDefinition (Name -> S.Set Name -> Int -> Name)
-freshJavaName_go = def "freshJavaName_go" $
-  lambda "base" $ lambda "avoid" $ lambda "i" $
-    "candidate" <~ Core.name (Strings.cat2 (Core.unName (var "base")) (Literals.showInt32 (var "i"))) $
-    Logic.ifElse
-      (Sets.member (var "candidate") (var "avoid"))
-      (freshJavaName_go @@ var "base" @@ var "avoid" @@ Math.add (var "i") (int32 1))
-      (var "candidate")
-
--- | Generate a method invocation for a function call.
-functionCall :: TTermDefinition (JavaHelpers.JavaEnvironment -> Bool -> Name -> [Term] -> [Type] -> Context -> Graph -> Either Error Java.Expression)
-functionCall = def "functionCall" $
-  lambda "env" $ lambda "isPrim" $ lambda "name" $ lambda "args" $ lambda "typeApps" $
-    "cx" ~> "g" ~>
-    "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env") $
-    "isLambdaBound" <~ (isLambdaBoundIn @@ var "name"
-      @@ (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases")) $
-    -- Encode arguments and generate method invocation
-    ("jargs0" <<~ (Eithers.mapList (lambda "arg" $ encodeTerm @@ var "env" @@ var "arg" @@ var "cx" @@ var "g") (var "args")) $
-        "wrapResult" <~ (wrapLazyArguments @@ var "name" @@ var "jargs0") $
-        "jargs" <~ Pairs.first (var "wrapResult") $
-        "mMethodOverride" <~ Pairs.second (var "wrapResult") $
-        Logic.ifElse (Logic.or (isLocalVariable @@ var "name") (var "isLambdaBound"))
-          -- Local/lambda-bound: apply arguments one at a time via .apply()
-          ("baseExpr" <<~ (encodeVariable @@ var "env" @@ var "name" @@ var "cx" @@ var "g") $
-            right (Lists.foldl (lambda "acc" $ lambda "jarg" $ applyJavaArg @@ var "acc" @@ var "jarg")
-              (var "baseExpr") (var "jargs")))
-          -- Module-level functions: call with all args directly
-          ("overrideMethodName" <~ (lambda "jid" $
-              Maybes.cases (var "mMethodOverride")
-                (var "jid")
-                (lambda "m" $
-                  "s" <~ (JavaDsl.unIdentifier (var "jid")) $
-                  JavaDsl.identifier (Strings.cat2
-                    (Strings.fromList (Lists.take
-                      (Math.sub (Strings.length (var "s")) (Strings.length (asTerm JavaNamesSource.applyMethodName)))
-                      (Strings.toList (var "s"))))
-                    (var "m")))) $
-            Logic.ifElse (Lists.null (var "typeApps"))
-              -- No type applications: simple header
-              ("header" <~ JavaDsl.methodInvocationHeaderSimple
-                (wrap Java._MethodName (var "overrideMethodName" @@ (elementJavaIdentifier @@ var "isPrim" @@ false @@ var "aliases" @@ var "name"))) $
-                right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                  (JavaDsl.methodInvocation_ (var "header") (var "jargs"))))
-              -- With type applications: need qualified invocation
-              ("qn" <~ (Names.qualifyName @@ var "name") $
-                "mns" <~ (Packaging.qualifiedNameNamespace (var "qn")) $
-                "localName" <~ (Packaging.qualifiedNameLocal (var "qn")) $
-                Maybes.cases (var "mns")
-                  -- No namespace: simple header
-                  ("header" <~ JavaDsl.methodInvocationHeaderSimple
-                    (wrap Java._MethodName (var "overrideMethodName" @@ (elementJavaIdentifier @@ var "isPrim" @@ false @@ var "aliases" @@ var "name"))) $
-                    right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                      (JavaDsl.methodInvocation_ (var "header") (var "jargs"))))
-                  (lambda "ns_" $
-                    "classId" <~ (JavaUtilsSource.nameToJavaName @@ var "aliases" @@ (elementsQualifiedName @@ var "ns_")) $
-                    "methodId" <~ (Logic.ifElse (var "isPrim")
-                      (var "overrideMethodName" @@ (JavaDsl.identifier (Strings.cat2
-                        (JavaDsl.unIdentifier (JavaUtilsSource.nameToJavaName @@ var "aliases" @@ (Names.unqualifyName @@ (Packaging.qualifiedName (just (var "ns_")) (Formatting.capitalize @@ var "localName")))))
-                        (Strings.cat2 (string ".") (asTerm JavaNamesSource.applyMethodName)))))
-                      (JavaDsl.identifier (JavaUtilsSource.sanitizeJavaName @@ var "localName"))) $
-                    "jTypeArgs" <<~ (Eithers.mapList (lambda "t" $
-                      "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "t" @@ var "cx" @@ var "g") $
-                      "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") $
-                      right (JavaDsl.typeArgumentReference (var "rt")))
-                      (var "typeApps")) $
-                    right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                      (JavaUtilsSource.methodInvocationStaticWithTypeArgs @@ var "classId" @@ var "methodId" @@ var "jTypeArgs" @@ var "jargs"))))))
-
--- | Get the codomain type from annotations
-getCodomain :: TTermDefinition (M.Map Name Term -> Context -> Graph -> Either Error Type)
-getCodomain = def "getCodomain" $
-  lambda "ann" $
-    "cx" ~> "g" ~>
-    Eithers.map
-      (lambda "ft" $ Core.functionTypeCodomain (var "ft"))
-      (getFunctionType @@ var "ann" @@ var "cx" @@ var "g")
-
--- | Get the function type from annotations
-getFunctionType :: TTermDefinition (M.Map Name Term -> Context -> Graph -> Either Error FunctionType)
-getFunctionType = def "getFunctionType" $
-  lambda "ann" $
-    "cx" ~> "g" ~>
-    "mt" <<~ (getTypeE (var "cx") (var "g") (var "ann")) $
-    Maybes.cases (var "mt")
-      (Ctx.failInContext (Error.errorOther $ Error.otherError $ string "type annotation is required for function and elimination terms in Java") (var "cx"))
-      (lambda "t" $ cases _Type (var "t")
-        (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "expected function type, got: ") (ShowCore.type_ @@ var "t")) (var "cx")) [
-        _Type_function>>: lambda "ft" $ right (var "ft")])
-
--- | Group pairs by their first element, collecting second elements into lists.
-groupPairsByFirst :: TTermDefinition ([(Name, Name)] -> M.Map Name [Name])
-groupPairsByFirst = def "groupPairsByFirst" $
-  lambda "pairs" $
-    Lists.foldl
-      (lambda "m" $ lambda "p" $
-        "k" <~ Pairs.first (var "p") $
-        "v" <~ Pairs.second (var "p") $
-        Maps.alter
-          (lambda "mv" $
-            Maybes.maybe
-              (just (list [var "v"]))
-              (lambda "vs" $ just (Lists.concat2 (var "vs") (list [var "v"])))
-              (var "mv"))
-          (var "k")
-          (var "m"))
-      (Maps.empty)
-      (var "pairs")
-
--- | Shared helper: Integer.compare(this.field.hashCode(), otherVar.field.hashCode())
-hashCodeCompareExpr :: TTermDefinition (String -> String -> Java.Expression)
-hashCodeCompareExpr = def "hashCodeCompareExpr" $
-  lambda "otherVar" $ lambda "fname" $ lets [
-    "header">: JavaDsl.methodInvocationHeaderComplex
-      (JavaDsl.methodInvocationComplex
-        (JavaDsl.methodInvocationVariantType (JavaUtilsSource.javaTypeName @@ wrap Java._Identifier (string "Integer")))
-        (list ([] :: [TTerm Java.TypeArgument]))
-        (wrap Java._Identifier (string "compare"))),
-    "thisHashCode">: JavaUtilsSource.javaMethodInvocationToJavaExpression @@ (JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantExpression
-            (JavaDsl.expressionName nothing (wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ var "fname"))))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (asTerm JavaNamesSource.hashCodeMethodName))))
-      (list ([] :: [TTerm Java.Expression]))),
-    "otherHashCode">: JavaUtilsSource.javaMethodInvocationToJavaExpression @@ (JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantExpression
-            (JavaUtilsSource.fieldExpression @@ (JavaUtilsSource.javaIdentifier @@ var "otherVar") @@ (JavaUtilsSource.javaIdentifier @@ var "fname")))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (asTerm JavaNamesSource.hashCodeMethodName))))
-      (list ([] :: [TTerm Java.Expression])))] $
-    JavaUtilsSource.javaMethodInvocationToJavaExpression @@ (JavaDsl.methodInvocation_ (var "header") (list [var "thisHashCode", var "otherHashCode"]))
-
--- | Build a hashCode multiplier pair: prime * Objects.hashCode(field)
-hashCodeMultPair :: TTermDefinition (Int -> Name -> Java.MultiplicativeExpression)
-hashCodeMultPair = def "hashCodeMultPair" $
-  lambda "i" $ lambda "fname" $ lets [
-    "fnameStr">: unwrap _Name @@ var "fname",
-    "lhs">: JavaDsl.multiplicativeExpressionUnary
-      (JavaUtilsSource.javaPrimaryToJavaUnaryExpression
-        @@ (JavaUtilsSource.javaLiteralToJavaPrimary @@ (JavaUtilsSource.javaInt @@ var "i"))),
-    "rhs">: JavaUtilsSource.javaPostfixExpressionToJavaUnaryExpression
-      @@ (JavaUtilsSource.javaMethodInvocationToJavaPostfixExpression
-        @@ (JavaDsl.methodInvocation_
-          (JavaDsl.methodInvocationHeaderComplex
-            (JavaDsl.methodInvocationComplex
-              (JavaDsl.methodInvocationVariantType
-                (JavaUtilsSource.javaTypeName @@ wrap Java._Identifier (string "java.util.Objects")))
-              (list ([] :: [TTerm Java.TypeArgument]))
-              (wrap Java._Identifier (asTerm JavaNamesSource.hashCodeMethodName))))
-          (list [JavaUtilsSource.javaExpressionNameToJavaExpression
-            @@ (JavaDsl.expressionName nothing
-              (wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ var "fnameStr")))])))] $
-    JavaDsl.multiplicativeExpressionTimes
-      (JavaDsl.multiplicativeExpressionBinary (var "lhs") (var "rhs"))
-
--- | Create a qualified reference to an inner class member
-innerClassRef :: TTermDefinition (JavaHelpers.Aliases -> Name -> String -> Java.Identifier)
-innerClassRef = def "innerClassRef" $
-  lambda "aliases" $ lambda "name" $ lambda "local" $ lets [
-    "id">: unwrap Java._Identifier @@ (JavaUtilsSource.nameToJavaName @@ var "aliases" @@ var "name")] $
-    wrap Java._Identifier (Strings.cat2 (Strings.cat2 (var "id") (string ".")) (var "local"))
-
--- | Insert a branch variable into the environment
-insertBranchVar :: TTermDefinition (Name -> JavaHelpers.JavaEnvironment -> JavaHelpers.JavaEnvironment)
-insertBranchVar = def "insertBranchVar" $
-  lambda "name" $ lambda "env" $ lets [
-    "aliases">: project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env"] $
-    record JavaHelpers._JavaEnvironment [
-      JavaHelpers._JavaEnvironment_aliases>>:
-        record JavaHelpers._Aliases [
-          JavaHelpers._Aliases_currentNamespace>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases",
-          JavaHelpers._Aliases_packages>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases",
-          JavaHelpers._Aliases_branchVars>>:
-            Sets.insert (var "name") (project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases"),
-          JavaHelpers._Aliases_recursiveVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases",
-          JavaHelpers._Aliases_inScopeTypeParams>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases",
-          JavaHelpers._Aliases_polymorphicLocals>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases",
-          JavaHelpers._Aliases_inScopeJavaVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases",
-          JavaHelpers._Aliases_varRenames>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases",
-          JavaHelpers._Aliases_lambdaVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases",
-          JavaHelpers._Aliases_typeVarSubst>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases",
-          JavaHelpers._Aliases_trustedTypeVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases",
-          JavaHelpers._Aliases_methodCodomain>>: nothing,
-          JavaHelpers._Aliases_thunkedVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases"],
-      JavaHelpers._JavaEnvironment_graph>>:
-        project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env"]
-
--- | Compute the list of interface types for a Java class declaration.
---   If serializable, includes both Serializable and Comparable<Self>.
-interfaceTypes :: TTermDefinition (Bool -> JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> [Java.InterfaceType])
-interfaceTypes = def "interfaceTypes" $
-  lambda "isSer" $ lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lets [
-    "javaSerializableType">: JavaDsl.interfaceType
-      (JavaDsl.classType
-        (list ([] :: [TTerm Java.Annotation]))
-        JavaDsl.classTypeQualifierNone
-        (JavaUtilsSource.javaTypeIdentifier @@ string "Serializable")
-        (list ([] :: [TTerm Java.TypeArgument]))),
-    "selfTypeArg">: (JavaDsl.typeArgumentReference
-      (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ boolean False
-        @@ Lists.map (lambda "tp_" $ JavaUtilsSource.typeParameterToTypeArgument @@ var "tp_") (var "tparams")
-        @@ var "elName" @@ nothing) :: TTerm Java.TypeArgument),
-    "javaComparableType">: JavaDsl.interfaceType
-      (JavaDsl.classType
-        (list ([] :: [TTerm Java.Annotation]))
-        JavaDsl.classTypeQualifierNone
-        (JavaUtilsSource.javaTypeIdentifier @@ string "Comparable")
-        (list [var "selfTypeArg"]))] $
-    Logic.ifElse (var "isSer")
-      (list [var "javaSerializableType", var "javaComparableType"])
-      (list ([] :: [TTerm Java.InterfaceType]))
-
--- | Check whether a Hydra type maps to BigDecimal or BigInteger in Java
-isBigNumericType :: TTermDefinition (Type -> Bool)
-isBigNumericType = def "isBigNumericType" $
-  lambda "typ" $ cases _Type (Strip.deannotateType @@ var "typ")
-    (Just $ boolean False) [
-    _Type_literal>>: lambda "lt" $
-      cases _LiteralType (var "lt") (Just $ boolean False) [
-        _LiteralType_decimal>>: constant $ boolean True,
-        _LiteralType_float>>: lambda "ft" $
-          cases _FloatType (var "ft") (Just $ boolean False) [
-            _FloatType_bigfloat>>: constant $ boolean True],
-        _LiteralType_integer>>: lambda "it" $
-          cases _IntegerType (var "it") (Just $ boolean False) [
-            _IntegerType_bigint>>: constant $ boolean True]]]
-
--- | Check whether a Hydra type is the binary literal type (maps to byte[])
-isBinaryType :: TTermDefinition (Type -> Bool)
-isBinaryType = def "isBinaryType" $
-  lambda "typ" $ cases _Type (Strip.deannotateType @@ var "typ")
-    (Just $ boolean False) [
-    _Type_literal>>: lambda "lt" $
-      cases _LiteralType (var "lt") (Just $ boolean False) [
-        _LiteralType_binary>>: constant $ boolean True]]
-
--- | Check if a union variant field's type is a unit type, by looking up the union type schema.
-isFieldUnitType :: TTermDefinition (Name -> Name -> Context -> Graph -> Either Error Bool)
-isFieldUnitType = def "isFieldUnitType" $
-  lambda "typeName" $ lambda "fieldName" $
-    "cx" ~> "g" ~>
-    "schemaTypes" <~ Graph.graphSchemaTypes (var "g") $
-    Maybes.cases (Maps.lookup (var "typeName") (var "schemaTypes"))
-      (right false)
-      (lambda "ts" $
-        cases _Type (Strip.deannotateType @@ Core.typeSchemeBody (var "ts"))
-          (Just $ right false) [
-          _Type_union>>: lambda "rt" $
-            right (Maybes.cases
-              (Lists.find (lambda "ft" $ Equality.equal (Core.fieldTypeName (var "ft")) (var "fieldName"))
-                (var "rt"))
-              false
-              (lambda "ft" $ Predicates.isUnitType @@ (Strip.deannotateType @@ Core.fieldTypeType (var "ft"))))])
-
--- | Check if a name (possibly qualified) is lambda-bound
-isLambdaBoundIn :: TTermDefinition (Name -> S.Set Name -> Bool)
-isLambdaBoundIn = def "isLambdaBoundIn" $
-  lambda "name" $ lambda "lambdaVars" $
-    Logic.or (Sets.member (var "name") (var "lambdaVars"))
-      (Logic.or
-        -- For qualified names, check if any qualified lambda var has the same local name
-        (Logic.and (isLambdaBoundIn_isQualified @@ var "name")
-          (Maybes.isJust (Lists.find
-            (lambda "lv" $ Logic.and
-              (isLambdaBoundIn_isQualified @@ var "lv")
-              (Equality.equal
-                (Names.localNameOf @@ var "lv")
-                (Names.localNameOf @@ var "name")))
-            (Sets.toList (var "lambdaVars")))))
-        -- For unqualified names, check if the local name is in lambdaVars
-        (Logic.and (Logic.not (isLambdaBoundIn_isQualified @@ var "name"))
-          (Sets.member (wrap _Name (Names.localNameOf @@ var "name")) (var "lambdaVars"))))
-
--- | Helper: check if a name is qualified (has a namespace)
-isLambdaBoundIn_isQualified :: TTermDefinition (Name -> Bool)
-isLambdaBoundIn_isQualified = def "isLambdaBoundIn_isQualified" $
-  lambda "n" $ Maybes.isJust (Packaging.qualifiedNameNamespace (Names.qualifyName @@ var "n"))
-
--- | Check if a name (possibly qualified) is lambda-bound
-
-isLambdaBoundVariable :: TTermDefinition (Name -> Bool)
-isLambdaBoundVariable = def "isLambdaBoundVariable" $
-  lambda "name" $ lets [
-    "v">: Core.unName $ var "name"] $
-    Equality.lte (Strings.length (var "v")) (int32 4)
-
-isLocalVariable :: TTermDefinition (Name -> Bool)
-isLocalVariable = def "isLocalVariable" $
-  lambda "name" $ Maybes.isNothing
-    (Packaging.qualifiedNameNamespace (Names.qualifyName @@ var "name"))
-
--- | Check whether a Hydra type maps to a Java type that does not implement Comparable
-isNonComparableType :: TTermDefinition (Type -> Bool)
-isNonComparableType = def "isNonComparableType" $
-  lambda "typ" $ cases _Type (Strip.deannotateType @@ var "typ")
-    (Just $ boolean False) [
-    _Type_either>>: constant $ boolean True,
-    _Type_function>>: constant $ boolean True,
-    _Type_unit>>: constant $ boolean True,
-    _Type_literal>>: lambda "lt" $
-      cases _LiteralType (var "lt") (Just $ boolean False) [
-        _LiteralType_binary>>: constant $ boolean True],
-    _Type_forall>>: lambda "ft" $
-      isNonComparableType @@ (Core.forallTypeBody (var "ft"))]
-
--- | Check if a variable is recursive (self-referencing) in the current context
-isRecursiveVariable :: TTermDefinition (JavaHelpers.Aliases -> Name -> Bool)
-isRecursiveVariable = def "isRecursiveVariable" $
-  lambda "aliases" $ lambda "name" $
-    Sets.member (var "name")
-      (project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases")
-
--- | Check whether a type is "serializable" (record, union, wrap, or forall wrapping a serializable type).
--- These are the types that get promoted to Java class declarations.
--- Delegates to the shared isNominalType in Predicates.
-isSerializableJavaType :: TTermDefinition (Type -> Bool)
-isSerializableJavaType = def "isSerializableJavaType" $
-  lambda "typ" $ Predicates.isNominalType @@ var "typ"
-
--- | Check if a Name is simple (unqualified, no dots).
-isSimpleName :: TTermDefinition (Name -> Bool)
-isSimpleName = def "isSimpleName" $
-  lambda "name" $
-    Equality.equal
-      (Lists.length (Strings.splitOn (string ".") (Core.unName (var "name"))))
-      (int32 1)
-
--- | Check if a name looks like an unresolved type inference variable.
--- These are generated by the type inference engine and have the form 't' followed by digits.
-isUnresolvedInferenceVar :: TTermDefinition (Name -> Bool)
-isUnresolvedInferenceVar = def "isUnresolvedInferenceVar" $
-  lambda "name" $
-    "chars" <~ Strings.toList (unwrap _Name @@ var "name") $
-    Maybes.fromMaybe (boolean False) (Maybes.map
-      (lambda "p" $ lets [
-        "firstCh">: Pairs.first (var "p"),
-        "rest">: Pairs.second (var "p")] $
-        Logic.ifElse
-          (Logic.not $ Equality.equal (var "firstCh") (int32 116))  -- 't'
-          (boolean False)
-          (Logic.and
-            (Logic.not $ Lists.null (var "rest"))
-            (Lists.null $ Lists.filter
-              (lambda "c" $ Logic.not (isUnresolvedInferenceVar_isDigit @@ var "c"))
-              (var "rest"))))
-      (Lists.uncons (var "chars")))
-
-isUnresolvedInferenceVar_isDigit :: TTermDefinition (Int -> Bool)
-isUnresolvedInferenceVar_isDigit = def "isUnresolvedInferenceVar_isDigit" $
-  lambda "c" $
-    Logic.and (Equality.gte (var "c") (int32 48)) (Equality.lte (var "c") (int32 57))
-
--- | Classify a data term by its symbol class (constant, nullary function, hoisted lambda, etc.)
-
-java11Features :: TTermDefinition JavaHelpers.JavaFeatures
-java11Features = def "java11Features" $
-  record JavaHelpers._JavaFeatures [
-    JavaHelpers._JavaFeatures_supportsDiamondOperator>>: boolean True]
-
-java8Features :: TTermDefinition JavaHelpers.JavaFeatures
-java8Features = def "java8Features" $
-  record JavaHelpers._JavaFeatures [
-    JavaHelpers._JavaFeatures_supportsDiamondOperator>>: boolean False]
-
--- | Shared helper: reference type for Comparable, used in cast expressions for compareTo
-javaComparableRefType :: TTermDefinition Java.ReferenceType
-javaComparableRefType = def "javaComparableRefType" $
-  JavaDsl.referenceTypeClassOrInterface (JavaDsl.classOrInterfaceTypeClass
-    (JavaDsl.classType
-      (list ([] :: [TTerm Java.Annotation]))
-      JavaDsl.classTypeQualifierNone
-      (JavaUtilsSource.javaTypeIdentifier @@ string "Comparable")
-      (list ([] :: [TTerm Java.TypeArgument]))))
-
--- | Get Graph from JavaEnvironment
-javaEnvGetGraph :: TTermDefinition (JavaHelpers.JavaEnvironment -> Graph)
-javaEnvGetGraph = def "javaEnvGetGraph" $
-  lambda "env" $ project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env"
-
--- | Set Graph in JavaEnvironment (preserving other fields)
-javaEnvSetGraph :: TTermDefinition (Graph -> JavaHelpers.JavaEnvironment -> JavaHelpers.JavaEnvironment)
-javaEnvSetGraph = def "javaEnvSetGraph" $
-  lambda "g" $ lambda "env" $
-    record JavaHelpers._JavaEnvironment [
-      JavaHelpers._JavaEnvironment_aliases>>:
-        project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env",
-      JavaHelpers._JavaEnvironment_graph>>: var "g"]
-
--- | Analyze a Java function term, collecting lambdas, type lambdas, lets, and type applications
-
-javaFeatures :: TTermDefinition JavaHelpers.JavaFeatures
-javaFeatures = def "javaFeatures" $
-  asTerm java11Features
-
-javaIdentifierToString :: TTermDefinition (Java.Identifier -> String)
-javaIdentifierToString = def "javaIdentifierToString" $
-  lambda "id" $ unwrap Java._Identifier @@ var "id"
-
--- | Get type arguments for a named type by looking up its definition
-javaTypeArgumentsForNamedType :: TTermDefinition (Name -> Context -> Graph -> Either Error [Java.TypeArgument])
-javaTypeArgumentsForNamedType = def "javaTypeArgumentsForNamedType" $
-  lambda "tname" $
-    "cx" ~> "g" ~>
-    "typ" <<~ (Resolution.requireType @@ var "cx" @@ var "g" @@ var "tname") $
-    right $ Lists.map (lambda "tp_" $ JavaUtilsSource.typeParameterToTypeArgument @@ var "tp_")
-      (javaTypeParametersForType @@ var "typ")
-
--- | Helper: convert a Java literal to a Java expression
-
-javaTypeArgumentsForType :: TTermDefinition (Type -> [Java.TypeArgument])
-javaTypeArgumentsForType = def "javaTypeArgumentsForType" $
-  lambda "typ" $ Lists.reverse
-    (Lists.map JavaUtilsSource.typeParameterToTypeArgument (javaTypeParametersForType @@ var "typ"))
-
-javaTypeParametersForType :: TTermDefinition (Type -> [Java.TypeParameter])
-javaTypeParametersForType = def "javaTypeParametersForType" $
-  lambda "typ" $ lets [
-    "toParam">: lambda "name" $
-      JavaUtilsSource.javaTypeParameter @@ (Formatting.capitalize @@ (Core.unName $ var "name")),
-    "boundVars">: javaTypeParametersForType_bvars @@ var "typ",
-    "freeVars">: Lists.filter (lambda "v" $ isLambdaBoundVariable @@ var "v")
-      (Sets.toList (Variables.freeVariablesInType @@ var "typ")),
-    "vars">: (Lists.nub :: TTerm [Name] -> TTerm [Name]) (Lists.concat2 (var "boundVars") (var "freeVars"))] $
-    Lists.map (var "toParam") (var "vars")
-
-javaTypeParametersForType_bvars :: TTermDefinition (Type -> [Name])
-javaTypeParametersForType_bvars = def "javaTypeParametersForType_bvars" $
-  lambda "t" $ cases _Type (var "t")
-    (Just $ list ([] :: [TTerm Name])) [
-    _Type_forall>>: lambda "ft" $
-      Lists.cons
-        (Core.forallTypeParameter (var "ft"))
-        (javaTypeParametersForType_bvars @@ (Core.forallTypeBody (var "ft")))]
-
--- | Top-level entry point: convert a module to Java source files.
-moduleToJava :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToJava = def "moduleToJava" $
-  lambda "mod" $ lambda "defs" $
-    "cx" ~> "g" ~>
-    ("units" <<~ (encodeDefinitions @@ var "mod" @@ var "defs" @@ var "cx" @@ var "g") $
-      right (Maps.fromList (Lists.map
-        (lambda "entry" $
-          "name" <~ Pairs.first (var "entry") $
-          "unit" <~ Pairs.second (var "entry") $
-          pair (bindingNameToFilePath @@ var "name")
-            (SerializationSource.printExpr @@ (SerializationSource.parenthesize @@ (JavaSerdeSource.writeCompilationUnit @@ var "unit"))))
-        (Maps.toList (var "units")))))
-
--- | Convert Name->Name map to Name->Type map (wrapping values as TypeVariable)
-nameMapToTypeMap :: TTermDefinition (M.Map Name Name -> M.Map Name Type)
-nameMapToTypeMap = def "nameMapToTypeMap" $
-  lambda "m" $
-    Maps.map (lambda "v" $ Core.typeVariable (var "v")) (var "m")
-
--- | Get the parent namespace (all but last segment), or Nothing if there is no parent.
--- E.g., "hydra.formatting" -> Just "hydra", "hydra.java.syntax" -> Just "hydra.java"
-namespaceParent :: TTermDefinition (Namespace -> Maybe Namespace)
-namespaceParent = def "namespaceParent" $
-  lambda "ns" $ lets [
-    "parts">: Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns"),
-    "initParts">: Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts"))] $
-    Logic.ifElse (Lists.null (var "initParts"))
-      nothing
-      (just (wrap _Namespace (Strings.intercalate (string ".") (var "initParts"))))
-
--- | Check if a term structurally needs lazy evaluation.
-needsThunking :: TTermDefinition (Term -> Bool)
-needsThunking = def "needsThunking" $
-  lambda "t" $
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ Lists.foldl
-        (lambda "b" $ lambda "st" $ Logic.or (var "b") (needsThunking @@ var "st"))
-        (boolean False)
-        (Rewriting.subterms @@ var "t")) [
-      _Term_let>>: lambda "_lt" $ boolean True,
-      _Term_typeApplication>>: lambda "_ta" $ boolean True,
-      _Term_typeLambda>>: lambda "_tl" $ boolean True]
-
--- | Check if a Binding has function type.
-
-noComment :: TTermDefinition (Java.ClassBodyDeclaration -> Java.ClassBodyDeclarationWithComments)
-noComment = def "noComment" $
-  lambda "decl" $ JavaDsl.classBodyDeclarationWithComments (var "decl") nothing
-
--- | Generate the otherwise (default) branch of a visitor.
-otherwiseBranch :: TTermDefinition (JavaHelpers.JavaEnvironment -> JavaHelpers.Aliases -> Type -> Type -> Name -> Java.Type -> [Java.TypeArgument] -> Term -> Context -> Graph -> Either Error Java.ClassBodyDeclarationWithComments)
-otherwiseBranch = def "otherwiseBranch" $
-  lambda "env" $ lambda "aliases" $ lambda "dom" $ lambda "cod" $ lambda "tname" $ lambda "jcod" $ lambda "targs" $ lambda "d" $
-    "cx" ~> "g" ~>
-    "jdom" <~ (JavaDsl.typeReference (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ true @@ var "targs" @@ var "tname" @@ nothing)) $
-    "mods" <~ list [inject Java._MethodModifier Java._MethodModifier_public unit] $
-    "anns" <~ list [asTerm JavaUtilsSource.overrideAnnotation] $
-    "param" <~ (JavaUtilsSource.javaTypeToJavaFormalParameter @@ var "jdom" @@ wrap _Name (string "instance")) $
-    "result" <~ (JavaDsl.resultType (JavaDsl.unannType (var "jcod"))) $
-    "fs" <<~ (analyzeJavaFunction @@ var "env" @@ var "d" @@ var "cx" @@ var "g") $
-    "bindings" <~ (project _FunctionStructure _FunctionStructure_bindings @@ var "fs") $
-    "rawBody" <~ (project _FunctionStructure _FunctionStructure_body @@ var "fs") $
-    "innerBody" <~ (annotateBodyWithCod @@ var "cod" @@ var "rawBody") $
-    "env2" <~ (project _FunctionStructure _FunctionStructure_environment @@ var "fs") $
-    "bindResult" <<~ (bindingsToStatements @@ var "env2" @@ var "bindings" @@ var "cx" @@ var "g") $
-    "bindingStmts" <~ Pairs.first (var "bindResult") $
-    "env3" <~ Pairs.second (var "bindResult") $
-    "jret" <<~ (encodeTerm @@ var "env3" @@ var "innerBody" @@ var "cx" @@ var "g") $
-    "returnStmt" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "jret"))) $
-    "allStmts" <~ Lists.concat2 (var "bindingStmts") (list [var "returnStmt"]) $
-    right (noComment @@ (JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter]) @@ var "anns"
-      @@ asTerm JavaNamesSource.otherwiseMethodName @@ list [var "param"] @@ var "result" @@ just (var "allStmts")))
-
--- | Peel N domain types from a function type, returning the domains and the final codomain.
-peelDomainTypes :: TTermDefinition (Int -> Type -> ([Type], Type))
-peelDomainTypes = def "peelDomainTypes" $
-  lambda "n" $ lambda "t" $
-    Logic.ifElse
-      (Equality.lte (var "n") (int32 0))
-      (pair (list ([] :: [TTerm Type])) (var "t"))
-      (cases _Type (Strip.deannotateType @@ var "t")
-        (Just $ pair (list ([] :: [TTerm Type])) (var "t")) [
-        _Type_function>>: lambda "ft" $
-          "rest" <~ (peelDomainTypes @@ Math.sub (var "n") (int32 1) @@ Core.functionTypeCodomain (var "ft")) $
-          pair
-            (Lists.cons (Core.functionTypeDomain (var "ft")) (Pairs.first (var "rest")))
-            (Pairs.second (var "rest"))])
-
--- | Peel domain types from a function type, returning the list of domains and the codomain.
--- Given a count n and a type, peels up to n function types off the front.
-peelDomainsAndCod :: TTermDefinition (Int -> Type -> ([Type], Type))
-peelDomainsAndCod = def "peelDomainsAndCod" $
-  lambda "n" $ lambda "t" $
-    Logic.ifElse (Equality.lte (var "n") (int32 0))
-      (pair (list ([] :: [TTerm Type])) (var "t"))
-      (cases _Type (Strip.deannotateType @@ var "t")
-        (Just $ pair (list ([] :: [TTerm Type])) (var "t")) [
-        _Type_function>>: lambda "ft" $
-          "rest" <~ (peelDomainsAndCod @@ Math.sub (var "n") (int32 1) @@ Core.functionTypeCodomain (var "ft")) $
-          pair (Lists.cons (Core.functionTypeDomain (var "ft")) (Pairs.first (var "rest")))
-            (Pairs.second (var "rest"))])
-
--- | Peel expected argument types from a type scheme body using a substitution
-peelExpectedTypes :: TTermDefinition (M.Map Name Type -> Int -> Type -> [Type])
-peelExpectedTypes = def "peelExpectedTypes" $
-  lambda "subst" $ lambda "n" $ lambda "t" $
-    Logic.ifElse (Equality.equal (var "n") (int32 0))
-      (list ([] :: [TTerm Type]))
-      (cases _Type (Strip.deannotateType @@ var "t")
-        (Just $ list ([] :: [TTerm Type])) [
-        _Type_function>>: lambda "ft" $
-          Lists.cons
-            (applySubstFull @@ var "subst" @@ Core.functionTypeDomain (var "ft"))
-            (peelExpectedTypes @@ var "subst" @@ Math.sub (var "n") (int32 1) @@ Core.functionTypeCodomain (var "ft"))])
-
--- | Propagate a correct type annotation through a term. Sets the type annotation on the term
--- and, for lambdas, also recursively annotates the body with the codomain type.
-propagateType :: TTermDefinition (Type -> Term -> Term)
-propagateType = def "propagateType" $
-  lambda "typ" $ lambda "term" $
-    "setTypeAnn" <~ (lambda "t" $
-      Annotations.setTermAnnotation @@ Constants.key_type
-        @@ just (Phantoms.encoderFor _Type @@ var "typ")
-        @@ var "t") $
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just $ var "setTypeAnn" @@ var "term") [
-      _Term_lambda>>: lambda "lam" $
-        "annotated" <~ (var "setTypeAnn" @@ var "term") $
-        cases _Type (Strip.deannotateType @@ var "typ")
-          (Just $ var "annotated") [
-          _Type_function>>: lambda "ft" $
-            propagateType_propagateIntoLambda
-              @@ (Core.functionTypeCodomain (var "ft"))
-              @@ var "annotated"],
-      _Term_let>>: lambda "lt" $
-        -- Propagate into let binding values using each binding's type scheme
-        "propagatedBindings" <~ Lists.map
-          ("b" ~>
-            optCases (Core.bindingTypeScheme $ var "b")
-              (var "b")
-              ("ts" ~> Core.binding
-                (Core.bindingName $ var "b")
-                (propagateType @@ (Core.typeSchemeBody $ var "ts") @@ (Core.bindingTerm $ var "b"))
-                (Core.bindingTypeScheme $ var "b")))
-          (Core.letBindings (var "lt")) $
-        var "setTypeAnn" @@
-          (propagateType_rebuildLet @@ var "term"
-            @@ (var "propagatedBindings")
-            @@ (propagateType @@ var "typ" @@ Core.letBody (var "lt"))),
-      -- Propagate into application: annotate union case elimination LHS with function type
-      _Term_application>>: lambda "app" $
-        "fun" <~ Core.applicationFunction (var "app") $
-        "arg" <~ Core.applicationArgument (var "app") $
-        "annotatedFun" <~ (cases _Term (Strip.deannotateTerm @@ var "fun")
-          (Just $ var "fun") [
-          _Term_cases>>: lambda "cs" $
-            "dom" <~ (Resolution.nominalApplication @@ (Core.caseStatementTypeName (var "cs"))
-              @@ list ([] :: [TTerm Type])) $
-            "ft" <~ inject _Type _Type_function (Core.functionType (var "dom") (var "typ")) $
-            Annotations.setTermAnnotation @@ asTerm Constants.key_type
-              @@ just (Phantoms.encoderFor _Type @@ var "ft") @@ var "fun"]) $
-        var "setTypeAnn" @@ Core.termApplication (Core.application (var "annotatedFun") (var "arg"))]
-
--- | Propagate the codomain type into a lambda's body, traversing through annotations
-propagateType_propagateIntoLambda :: TTermDefinition (Type -> Term -> Term)
-propagateType_propagateIntoLambda = def "propagateType_propagateIntoLambda" $
-  lambda "cod" $ lambda "t" $
-    cases _Term (var "t")
-      (Just $ var "t") [
-      _Term_annotated>>: lambda "at" $
-        Core.termAnnotated (Core.annotatedTerm
-          (propagateType_propagateIntoLambda @@ var "cod" @@ Core.annotatedTermBody (var "at"))
-          (Core.annotatedTermAnnotation (var "at"))),
-      _Term_lambda>>: lambda "lam" $
-        Core.termLambda (Core.lambda
-          (Core.lambdaParameter (var "lam"))
-          (Core.lambdaDomain (var "lam"))
-          (propagateType @@ var "cod" @@ Core.lambdaBody (var "lam")))]
-
--- | Rebuild a let expression with a new body, preserving annotations
-propagateType_rebuildLet :: TTermDefinition (Term -> [Binding] -> Term -> Term)
-propagateType_rebuildLet = def "propagateType_rebuildLet" $
-  lambda "t" $ lambda "bindings" $ lambda "newBody" $
-    cases _Term (var "t")
-      (Just $ var "t") [
-      _Term_annotated>>: lambda "at" $
-        Core.termAnnotated (Core.annotatedTerm
-          (propagateType_rebuildLet @@ Core.annotatedTermBody (var "at") @@ var "bindings" @@ var "newBody")
-          (Core.annotatedTermAnnotation (var "at"))),
-      _Term_let>>: lambda "_lt" $
-        Core.termLet (Core.let_ (var "bindings") (var "newBody"))]
-
--- | For application chains, propagate type annotations through the chain.
--- If f is a lambda with domain annotations and N args are applied,
--- annotate f with its full type and rebuild the chain with intermediate annotations.
-propagateTypesInAppChain :: TTermDefinition (Type -> Type -> Term -> Term)
-propagateTypesInAppChain = def "propagateTypesInAppChain" $
-  lambda "fixedCod" $ lambda "resultType" $ lambda "t" $
-    "flattened" <~ (flattenApps @@ var "t" @@ list ([] :: [TTerm Term])) $
-    "args" <~ Pairs.first (var "flattened") $
-    "fun" <~ Pairs.second (var "flattened") $
-    "lambdaDomsResult" <~ (collectLambdaDomains @@ var "fun") $
-    "lambdaDoms" <~ Pairs.first (var "lambdaDomsResult") $
-    "nArgs" <~ Lists.length (var "args") $
-    "nLambdaDoms" <~ Lists.length (var "lambdaDoms") $
-    Logic.ifElse (Logic.and (Equality.gt (var "nLambdaDoms") (int32 0))
-                            (Equality.gt (var "nArgs") (int32 0)))
-      -- Lambda with args applied: compute full type and rebuild with annotations
-      ("bodyRetType" <~ Pairs.second (peelDomainsAndCod @@ Math.sub (var "nLambdaDoms") (var "nArgs") @@ var "resultType") $
-       "funType" <~ Lists.foldl (lambda "c" $ lambda "d" $
-         inject _Type _Type_function (Core.functionType (var "d") (var "c")))
-         (var "bodyRetType") (Lists.reverse (var "lambdaDoms")) $
-       "annotatedFun" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-         @@ just (encodeTypeAsTerm @@ var "funType") @@ var "fun") $
-       rebuildApps @@ var "annotatedFun" @@ var "args" @@ var "funType")
-      -- Not a lambda or no args: fall back to simple annotation
-      (cases _Term (Strip.deannotateTerm @@ var "t")
-        (Just $ Annotations.setTermAnnotation @@ asTerm Constants.key_type
-          @@ just (encodeTypeAsTerm @@ var "resultType") @@ var "t") [
-        _Term_application>>: lambda "app" $
-          "lhs" <~ (project _Application _Application_function @@ var "app") $
-          "rhs" <~ (project _Application _Application_argument @@ var "app") $
-          -- Annotate case statement LHS with function type
-          "annotatedLhs" <~ (cases _Term (Strip.deannotateTerm @@ var "lhs")
-            (Just $ var "lhs") [
-            _Term_cases>>: lambda "cs" $
-              "dom" <~ (Resolution.nominalApplication @@ (Core.caseStatementTypeName (var "cs"))
-                @@ list ([] :: [TTerm Type])) $
-              "ft" <~ inject _Type _Type_function (Core.functionType (var "dom") (var "fixedCod")) $
-              Annotations.setTermAnnotation @@ asTerm Constants.key_type
-                @@ just (encodeTypeAsTerm @@ var "ft") @@ var "lhs"]) $
-          Annotations.setTermAnnotation @@ asTerm Constants.key_type
-            @@ just (encodeTypeAsTerm @@ var "resultType")
-            @@ inject _Term _Term_application (Core.application (var "annotatedLhs") (var "rhs"))])
-
--- | Rebuild an application chain with proper type annotations at each step.
-rebuildApps :: TTermDefinition (Term -> [Term] -> Type -> Term)
-rebuildApps = def "rebuildApps" $
-  lambda "f" $ lambda "args" $ lambda "fType" $
-    Logic.ifElse (Lists.null (var "args"))
-      (var "f")
-      (cases _Type (Strip.deannotateType @@ var "fType")
-        (Just $ Lists.foldl (lambda "acc" $ lambda "a" $
-          inject _Term _Term_application (Core.application (var "acc") (var "a")))
-          (var "f") (var "args")) [
-        _Type_function>>: lambda "ft" $
-          Maybes.fromMaybe (var "f") (Maybes.map
-            (lambda "p" $
-              "arg" <~ Pairs.first (var "p") $
-              "rest" <~ Pairs.second (var "p") $
-              "remainingType" <~ Core.functionTypeCodomain (var "ft") $
-              "app" <~ inject _Term _Term_application (Core.application (var "f") (var "arg")) $
-              "annotatedApp" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-                @@ just (encodeTypeAsTerm @@ var "remainingType") @@ var "app") $
-              rebuildApps @@ var "annotatedApp" @@ var "rest" @@ var "remainingType")
-            (Lists.uncons (var "args")))])
-
--- | Generate a compareTo method for a record type.
-recordCompareToMethod :: TTermDefinition (JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> [FieldType] -> Java.ClassBodyDeclaration)
-recordCompareToMethod = def "recordCompareToMethod" $
-  lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "fields" $ lets [
-    "anns">: list [asTerm JavaUtilsSource.overrideAnnotation, asTerm JavaUtilsSource.suppressWarningsUncheckedAnnotation],
-    "mods">: list [inject Java._MethodModifier Java._MethodModifier_public unit],
-    "param">: JavaUtilsSource.javaTypeToJavaFormalParameter @@ (JavaUtilsSource.javaTypeFromTypeName @@ var "aliases" @@ var "elName") @@ wrap _Name (asTerm JavaNamesSource.otherInstanceName),
-    "result">: JavaUtilsSource.javaTypeToJavaResult @@ (asTerm JavaUtilsSource.javaIntType)] $
-    JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter]) @@ var "anns"
-      @@ (asTerm JavaNamesSource.compareToMethodName) @@ list [var "param"] @@ var "result"
-      @@ just (compareToBody @@ var "aliases" @@ (asTerm JavaNamesSource.otherInstanceName) @@ var "fields")
-
--- | Build a record constructor.
-recordConstructor :: TTermDefinition (JavaHelpers.Aliases -> Name -> [FieldType] -> Context -> Graph -> Either Error Java.ClassBodyDeclaration)
-recordConstructor = def "recordConstructor" $
-  lambda "aliases" $ lambda "elName" $ lambda "fields" $
-    "cx" ~> "g" ~>
-    lets [
-    "assignStmts">: Lists.map
-      (lambda "f" $ JavaDsl.blockStatementStatement (JavaUtilsSource.toAssignStmt @@ Core.fieldTypeName (var "f")))
-      (var "fields")] $
-    "params" <<~ (Eithers.mapList (lambda "f" $ fieldTypeToFormalParam @@ var "aliases" @@ var "f" @@ var "cx" @@ var "g") (var "fields")) $
-    right (JavaUtilsSource.makeConstructor @@ var "aliases" @@ var "elName" @@ false @@ var "params" @@ var "assignStmts")
-
--- | Build the equals() method for a record class.
-recordEqualsMethod :: TTermDefinition (JavaHelpers.Aliases -> Name -> [FieldType] -> Java.ClassBodyDeclaration)
-recordEqualsMethod = def "recordEqualsMethod" $
-  lambda "aliases" $ lambda "elName" $ lambda "fields" $ lets [
-    "anns">: list [asTerm JavaUtilsSource.overrideAnnotation],
-    "mods">: list [inject Java._MethodModifier Java._MethodModifier_public unit],
-    "param">: JavaUtilsSource.javaTypeToJavaFormalParameter
-      @@ (JavaUtilsSource.javaRefType @@ list ([] :: [TTerm Java.ReferenceType]) @@ nothing @@ string "Object")
-      @@ wrap _Name (asTerm JavaNamesSource.otherInstanceName),
-    "result">: JavaUtilsSource.javaTypeToJavaResult @@ (asTerm JavaUtilsSource.javaBooleanType),
-    "tmpName">: string "o",
-    -- if (!(other instanceof ElName)) return false;
-    "instanceOfStmt">: JavaDsl.blockStatementStatement
-      (JavaDsl.statementIfThen (JavaDsl.ifThenStatement
-        (JavaUtilsSource.javaUnaryExpressionToJavaExpression @@
-          (JavaDsl.unaryExpressionOther
-            (JavaDsl.unaryExpressionNotPlusMinusNot
-              (JavaUtilsSource.javaRelationalExpressionToJavaUnaryExpression @@
-                (JavaUtilsSource.javaInstanceOf
-                  @@ (JavaUtilsSource.javaIdentifierToJavaRelationalExpression
-                    @@ (JavaUtilsSource.javaIdentifier @@ (asTerm JavaNamesSource.otherInstanceName)))
-                  @@ (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ false
-                    @@ list ([] :: [TTerm Java.TypeArgument]) @@ var "elName" @@ nothing))))))
-        (JavaUtilsSource.javaReturnStatement @@ just (JavaUtilsSource.javaBooleanExpression @@ false)))),
-    -- ElName o = (ElName) other;
-    "castStmt">: JavaUtilsSource.variableDeclarationStatement @@ var "aliases"
-      @@ (JavaUtilsSource.javaTypeFromTypeName @@ var "aliases" @@ var "elName")
-      @@ (JavaUtilsSource.javaIdentifier @@ var "tmpName")
-      @@ (JavaUtilsSource.javaCastExpressionToJavaExpression @@
-        (JavaUtilsSource.javaCastExpression
-          @@ (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ false
-            @@ list ([] :: [TTerm Java.TypeArgument]) @@ var "elName" @@ nothing)
-          @@ (JavaUtilsSource.javaIdentifierToJavaUnaryExpression
-            @@ wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ (asTerm JavaNamesSource.otherInstanceName))))),
-    -- return Objects.equals(this.f1, o.f1) && Objects.equals(this.f2, o.f2) && ...
-    "returnAllFieldsEqual">: JavaDsl.blockStatementStatement
-      (JavaUtilsSource.javaReturnStatement @@ just
-        (Logic.ifElse (Lists.null (var "fields"))
-          (JavaUtilsSource.javaBooleanExpression @@ true)
-          (JavaUtilsSource.javaConditionalAndExpressionToJavaExpression @@
-            (JavaDsl.conditionalAndExpression
-              (Lists.map (lambda "f" $ eqClause @@ var "tmpName" @@ var "f") (var "fields"))))))] $
-    JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter]) @@ var "anns"
-      @@ (asTerm JavaNamesSource.equalsMethodName) @@ list [var "param"] @@ var "result"
-      @@ just (list [var "instanceOfStmt", var "castStmt", var "returnAllFieldsEqual"])
-
--- | Build the hashCode() method for a record class.
-recordHashCodeMethod :: TTermDefinition ([FieldType] -> Java.ClassBodyDeclaration)
-recordHashCodeMethod = def "recordHashCodeMethod" $
-  lambda "fields" $ lets [
-    "anns">: list [asTerm JavaUtilsSource.overrideAnnotation],
-    "mods">: list [inject Java._MethodModifier Java._MethodModifier_public unit],
-    "result">: JavaUtilsSource.javaTypeToJavaResult @@ (asTerm JavaUtilsSource.javaIntType),
-    "returnSum">: JavaDsl.blockStatementStatement
-      (Logic.ifElse (Lists.null (var "fields"))
-        (JavaUtilsSource.javaReturnStatement @@ just (JavaUtilsSource.javaIntExpression @@ bigintAsInt (bigint 0)))
-        (JavaUtilsSource.javaReturnStatement @@ just
-          (JavaUtilsSource.javaAdditiveExpressionToJavaExpression @@
-            (JavaUtilsSource.addExpressions @@
-              (Lists.zipWith (asTerm hashCodeMultPair)
-                (asTerm first20Primes)
-                (Lists.map (lambda "f" $ Core.fieldTypeName (var "f")) (var "fields")))))))] $
-    JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter]) @@ var "anns"
-      @@ (asTerm JavaNamesSource.hashCodeMethodName) @@ list ([] :: [TTerm Java.FormalParameter]) @@ var "result"
-      @@ just (list [var "returnSum"])
-
--- | Build a record field as a public final member variable declaration.
-recordMemberVar :: TTermDefinition (JavaHelpers.Aliases -> FieldType -> Context -> Graph -> Either Error Java.ClassBodyDeclaration)
-recordMemberVar = def "recordMemberVar" $
-  lambda "aliases" $ lambda "ft" $
-    "cx" ~> "g" ~>
-    lets [
-    "mods">: list [inject Java._FieldModifier Java._FieldModifier_public unit,
-                   inject Java._FieldModifier Java._FieldModifier_final unit],
-    "fname">: Core.fieldTypeName (var "ft"),
-    "ftype">: Core.fieldTypeType (var "ft")] $
-    "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "ftype" @@ var "cx" @@ var "g") $
-    right (JavaUtilsSource.javaMemberField @@ var "mods" @@ var "jt"
-      @@ (JavaUtilsSource.fieldNameToJavaVariableDeclarator @@ var "fname"))
-
--- | Build a "with" method for a record field.
-recordWithMethod :: TTermDefinition (JavaHelpers.Aliases -> Name -> [FieldType] -> FieldType -> Context -> Graph -> Either Error Java.ClassBodyDeclaration)
-recordWithMethod = def "recordWithMethod" $
-  lambda "aliases" $ lambda "elName" $ lambda "fields" $ lambda "field" $
-    "cx" ~> "g" ~>
-    lets [
-    "mods">: list [inject Java._MethodModifier Java._MethodModifier_public unit],
-    "anns">: list ([] :: [TTerm Java.Annotation]),
-    "methodName">: Strings.cat2 (string "with")
-      (Formatting.nonAlnumToUnderscores @@ (Formatting.capitalize @@ (unwrap _Name @@ Core.fieldTypeName (var "field")))),
-    "result">: JavaUtilsSource.referenceTypeToResult
-      @@ (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ false
-        @@ list ([] :: [TTerm Java.TypeArgument]) @@ var "elName" @@ nothing),
-    "consId">: wrap Java._Identifier (JavaUtilsSource.sanitizeJavaName @@ (Names.localNameOf @@ var "elName")),
-    "fieldArgs">: Lists.map (lambda "f" $ JavaUtilsSource.fieldNameToJavaExpression @@ Core.fieldTypeName (var "f")) (var "fields"),
-    "returnStmt">: JavaDsl.blockStatementStatement
-      (JavaUtilsSource.javaReturnStatement @@ just
-        (JavaUtilsSource.javaConstructorCall @@ (JavaUtilsSource.javaConstructorName @@ var "consId" @@ nothing)
-          @@ var "fieldArgs" @@ nothing))] $
-    "param" <<~ (fieldTypeToFormalParam @@ var "aliases" @@ var "field" @@ var "cx" @@ var "g") $
-    right (JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter])
-      @@ var "anns" @@ var "methodName" @@ list [var "param"] @@ var "result"
-      @@ just (list [var "returnStmt"]))
-
--- | Given a partial argSubst, fill in unresolved vars from unused IR types.
-resolveTypeApps :: TTermDefinition ([Name] -> [Type] -> M.Map Name Type -> [Type])
-resolveTypeApps = def "resolveTypeApps" $
-  lambda "schemeVars" $ lambda "fallbackTypeApps" $ lambda "argSubst" $
-    "resolvedVars" <~ Sets.fromList (Maps.keys (var "argSubst")) $
-    "unresolvedVars" <~ Lists.filter (lambda "v" $ Logic.not (Sets.member (var "v") (var "resolvedVars"))) (var "schemeVars") $
-    "usedTypes" <~ Sets.fromList (Maps.elems (var "argSubst")) $
-    "unusedIrTypes" <~ Lists.filter (lambda "t" $ Logic.not (Sets.member (var "t") (var "usedTypes"))) (var "fallbackTypeApps") $
-    "remainingSubst" <~ Maps.fromList (Lists.zip (var "unresolvedVars") (var "unusedIrTypes")) $
-    "fullSubst" <~ Maps.union (var "argSubst") (var "remainingSubst") $
-    Lists.map (lambda "v" $ Maps.findWithDefault (Core.typeVariable (var "v")) (var "v") (var "fullSubst"))
-      (var "schemeVars")
-
--- | For each group where the input var appears in its own output list,
--- substitute all other output vars to that input var.
-selfRefSubstitution :: TTermDefinition (M.Map Name [Name] -> M.Map Name Name)
-selfRefSubstitution = def "selfRefSubstitution" $
-  lambda "grouped" $
-    Lists.foldl
-      (lambda "subst" $ lambda "entry" $
-        selfRefSubstitution_processGroup @@ var "subst" @@ Pairs.first (var "entry") @@ Pairs.second (var "entry"))
-      (Maps.empty)
-      (Maps.toList (var "grouped"))
-
-selfRefSubstitution_processGroup :: TTermDefinition (M.Map Name Name -> Name -> [Name] -> M.Map Name Name)
-selfRefSubstitution_processGroup = def "selfRefSubstitution_processGroup" $
-  lambda "subst" $ lambda "inVar" $ lambda "outVars" $
-    Logic.ifElse
-      ((Lists.elem :: TTerm Name -> TTerm [Name] -> TTerm Bool) (var "inVar") (var "outVars"))
-      (Lists.foldl
-        (lambda "s" $ lambda "v" $
-          Logic.ifElse
-            (Equality.equal (var "v") (var "inVar"))
-            (var "s")
-            (Maps.insert (var "v") (var "inVar") (var "s")))
-        (var "subst")
-        (var "outVars"))
-      (var "subst")
-
--- | Direct-return substitution: for each input var with >=2 self-refs and
-
-serializableTypes :: TTermDefinition (Bool -> [Java.InterfaceType])
-serializableTypes = def "serializableTypes" $
-  lambda "isSer" $ lets [
-    "javaSerializableType">: JavaDsl.interfaceType
-      (JavaDsl.classType
-        (list ([] :: [TTerm Java.Annotation]))
-        JavaDsl.classTypeQualifierNone
-        (JavaUtilsSource.javaTypeIdentifier @@ string "Serializable")
-        (list ([] :: [TTerm Java.TypeArgument])))] $
-    Logic.ifElse (var "isSer")
-      (list [var "javaSerializableType"])
-      (list ([] :: [TTerm Java.InterfaceType]))
-
--- | Split a constant declaration into a field + helper method to avoid large <clinit>
-splitConstantInitializer :: TTermDefinition (Java.InterfaceMemberDeclaration -> [Java.InterfaceMemberDeclaration])
-splitConstantInitializer = def "splitConstantInitializer" $
-  lambda "member" $ cases Java._InterfaceMemberDeclaration (var "member")
-    (Just $ list [var "member"]) [
-    Java._InterfaceMemberDeclaration_constant>>: lambda "cd" $
-      Lists.bind
-        (project Java._ConstantDeclaration Java._ConstantDeclaration_variables @@ var "cd")
-        (splitConstantInitializer_splitVar
-          @@ (project Java._ConstantDeclaration Java._ConstantDeclaration_modifiers @@ var "cd")
-          @@ (project Java._ConstantDeclaration Java._ConstantDeclaration_type @@ var "cd"))]
-
--- | Helper for splitConstantInitializer: split a single variable declarator
-splitConstantInitializer_splitVar :: TTermDefinition ([Java.ConstantModifier] -> Java.UnannType -> Java.VariableDeclarator -> [Java.InterfaceMemberDeclaration])
-splitConstantInitializer_splitVar = def "splitConstantInitializer_splitVar" $
-  lambda "mods" $ lambda "utype" $ lambda "vd" $ lets [
-    "vid">: project Java._VariableDeclarator Java._VariableDeclarator_id @@ var "vd",
-    "mInit">: project Java._VariableDeclarator Java._VariableDeclarator_initializer @@ var "vd"] $
-    Maybes.cases (var "mInit")
-      -- No initializer: keep as-is
-      (list [inject Java._InterfaceMemberDeclaration Java._InterfaceMemberDeclaration_constant
-        (record Java._ConstantDeclaration [
-          Java._ConstantDeclaration_modifiers>>: var "mods",
-          Java._ConstantDeclaration_type>>: var "utype",
-          Java._ConstantDeclaration_variables>>: list [var "vd"]])])
-      (lambda "init_" $
-        cases Java._VariableInitializer (var "init_")
-          -- Not an expression initializer: keep as-is
-          (Just $ list [inject Java._InterfaceMemberDeclaration Java._InterfaceMemberDeclaration_constant
-            (record Java._ConstantDeclaration [
-              Java._ConstantDeclaration_modifiers>>: var "mods",
-              Java._ConstantDeclaration_type>>: var "utype",
-              Java._ConstantDeclaration_variables>>: list [var "vd"]])]) [
-          Java._VariableInitializer_expression>>: lambda "expr" $ lets [
-            "varName">: javaIdentifierToString @@
-              (project Java._VariableDeclaratorId Java._VariableDeclaratorId_identifier @@ var "vid"),
-            "helperName">: Strings.cat2 (string "_init_") (var "varName"),
-            "callExpr">: JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-              (JavaUtilsSource.methodInvocation @@ nothing @@ wrap Java._Identifier (var "helperName")
-                @@ list ([] :: [TTerm Java.Expression])),
-            "field">: inject Java._InterfaceMemberDeclaration Java._InterfaceMemberDeclaration_constant
-              (record Java._ConstantDeclaration [
-                Java._ConstantDeclaration_modifiers>>: var "mods",
-                Java._ConstantDeclaration_type>>: var "utype",
-                Java._ConstantDeclaration_variables>>: list [
-                  record Java._VariableDeclarator [
-                    Java._VariableDeclarator_id>>: var "vid",
-                    Java._VariableDeclarator_initializer>>: just
-                      (inject Java._VariableInitializer Java._VariableInitializer_expression
-                        (var "callExpr"))]]]),
-            "returnSt">: inject Java._BlockStatement Java._BlockStatement_statement
-              (JavaUtilsSource.javaReturnStatement @@ just (var "expr")),
-            "resultType">: inject Java._Result Java._Result_type (var "utype"),
-            "helper">: JavaUtilsSource.interfaceMethodDeclaration
-              @@ list [
-                inject Java._InterfaceMethodModifier Java._InterfaceMethodModifier_static unit,
-                inject Java._InterfaceMethodModifier Java._InterfaceMethodModifier_private unit]
-              @@ list ([] :: [TTerm Java.TypeParameter])
-              @@ var "helperName"
-              @@ list ([] :: [TTerm Java.FormalParameter])
-              @@ var "resultType"
-              @@ just (list [var "returnSt"])] $
-            list [var "field", var "helper"]])
-
--- | Strip all forall wrappers from a type, returning the body
-stripForalls :: TTermDefinition (Type -> Type)
-stripForalls = def "stripForalls" $
-  lambda "t" $ cases _Type (Strip.deannotateType @@ var "t")
-    (Just $ var "t") [
-    _Type_forall>>: lambda "fa" $
-      stripForalls @@ Core.forallTypeBody (var "fa")]
-
--- | Substitute type variables with types
-substituteTypeVarsWithTypes :: TTermDefinition (M.Map Name Type -> Type -> Type)
-substituteTypeVarsWithTypes = def "substituteTypeVarsWithTypes" $
-  lambda "subst" $ lambda "t" $ substituteTypeVarsWithTypes_go @@ var "subst" @@ (Strip.deannotateType @@ var "t")
-
--- | Helper for substituteTypeVarsWithTypes
-substituteTypeVarsWithTypes_go :: TTermDefinition (M.Map Name Type -> Type -> Type)
-substituteTypeVarsWithTypes_go = def "substituteTypeVarsWithTypes_go" $
-  lambda "subst" $ lambda "t" $ cases _Type (Strip.deannotateType @@ var "t")
-    (Just $ var "t") [
-    _Type_variable>>: lambda "v" $
-      Maybes.cases (Maps.lookup (var "v") (var "subst")) (var "t") (lambda "rep" $ var "rep"),
-    _Type_function>>: lambda "ft" $
-      Core.typeFunction (Core.functionType
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.functionTypeDomain (var "ft"))
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.functionTypeCodomain (var "ft"))),
-    _Type_application>>: lambda "at" $
-      Core.typeApplication (Core.applicationType
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.applicationTypeFunction (var "at"))
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ (project _ApplicationType _ApplicationType_argument @@ var "at"))),
-    _Type_list>>: lambda "inner" $
-      Core.typeList (substituteTypeVarsWithTypes_go @@ var "subst" @@ var "inner"),
-    _Type_set>>: lambda "inner" $
-      Core.typeSet (substituteTypeVarsWithTypes_go @@ var "subst" @@ var "inner"),
-    _Type_maybe>>: lambda "inner" $
-      Core.typeMaybe (substituteTypeVarsWithTypes_go @@ var "subst" @@ var "inner"),
-    _Type_map>>: lambda "mt" $
-      Core.typeMap (Core.mapType
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.mapTypeKeys (var "mt"))
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.mapTypeValues (var "mt"))),
-    _Type_pair>>: lambda "pt" $
-      Core.typePair (Core.pairType
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.pairTypeFirst (var "pt"))
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.pairTypeSecond (var "pt"))),
-    _Type_either>>: lambda "et" $
-      Core.typeEither (Core.eitherType
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.eitherTypeLeft (var "et"))
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.eitherTypeRight (var "et"))),
-    _Type_forall>>: lambda "ft" $
-      Core.typeForall (Core.forallType
-        (Core.forallTypeParameter (var "ft"))
-        (substituteTypeVarsWithTypes_go @@ var "subst" @@ Core.forallTypeBody (var "ft")))]
-
--- | Shared helper: tagCmp != 0
-tagCmpNotZeroExpr :: TTermDefinition Java.Expression
-tagCmpNotZeroExpr = def "tagCmpNotZeroExpr" $ lets [
-    "lhs">: JavaUtilsSource.javaRelationalExpressionToJavaEqualityExpression @@
-      (JavaUtilsSource.javaPostfixExpressionToJavaRelationalExpression @@
-        (JavaDsl.postfixExpressionName (JavaDsl.expressionName nothing (JavaUtilsSource.javaIdentifier @@ string "tagCmp")))),
-    "rhs">: JavaUtilsSource.javaPostfixExpressionToJavaRelationalExpression @@
-      (JavaDsl.postfixExpressionPrimary (JavaUtilsSource.javaLiteralToJavaPrimary @@ (JavaUtilsSource.javaInt @@ bigintAsInt (bigint 0))))] $
-    JavaUtilsSource.javaEqualityExpressionToJavaExpression @@
-      (JavaDsl.equalityExpressionNotEqual (JavaDsl.equalityExpressionBinary (var "lhs") (var "rhs")))
-
--- | Shared helper: this.getClass().getName().compareTo(other.getClass().getName())
--- Used in variant compareTo to compare by class name for tag ordering.
-tagCompareExpr :: TTermDefinition Java.Expression
-tagCompareExpr = def "tagCompareExpr" $ lets [
-    "thisGetClass">: JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantPrimary (JavaUtilsSource.javaExpressionToJavaPrimary @@ (asTerm JavaUtilsSource.javaThis)))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (string "getClass"))))
-      (list ([] :: [TTerm Java.Expression])),
-    "thisGetName">: JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantPrimary (JavaUtilsSource.javaMethodInvocationToJavaPrimary @@ var "thisGetClass"))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (string "getName"))))
-      (list ([] :: [TTerm Java.Expression])),
-    "otherGetClass">: JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantExpression
-            (JavaDsl.expressionName nothing (wrap Java._Identifier (asTerm JavaNamesSource.otherInstanceName))))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (string "getClass"))))
-      (list ([] :: [TTerm Java.Expression])),
-    "otherGetName">: JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantPrimary (JavaUtilsSource.javaMethodInvocationToJavaPrimary @@ var "otherGetClass"))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (string "getName"))))
-      (list ([] :: [TTerm Java.Expression]))] $
-    JavaUtilsSource.javaMethodInvocationToJavaExpression @@ (JavaDsl.methodInvocation_
-      (JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (JavaDsl.methodInvocationVariantPrimary (JavaUtilsSource.javaMethodInvocationToJavaPrimary @@ var "thisGetName"))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (wrap Java._Identifier (asTerm JavaNamesSource.compareToMethodName))))
-      (list [JavaUtilsSource.javaMethodInvocationToJavaExpression @@ var "otherGetName"]))
-
--- | Take N type arguments from the accumulated type applications list,
--- converting them to Java TypeArguments via javaTypeToJavaReferenceType.
-takeTypeArgs :: TTermDefinition (String -> Int -> [Java.Type] -> Context -> Graph -> Either Error [Java.TypeArgument])
-takeTypeArgs = def "takeTypeArgs" $
-  lambda "label" $ lambda "n" $ lambda "tyapps" $
-    "cx" ~> "g" ~>
-    Logic.ifElse (Equality.lt (Lists.length (var "tyapps")) (var "n"))
-      (Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat (list [string "needed type arguments for ", var "label", string ", found too few"])) (var "cx"))
-      (Eithers.mapList (lambda "jt" $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") $
-        right (JavaDsl.typeArgumentReference (var "rt")))
-        (Lists.take (var "n") (var "tyapps")))
-
--- | Dispatch type to class declaration.
-toClassDecl :: TTermDefinition (Bool -> Bool -> JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> Type -> Context -> Graph -> Either Error Java.ClassDeclaration)
-toClassDecl = def "toClassDecl" $
-  lambda "isInner" $ lambda "isSer" $ lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "t" $
-    "cx" ~> "g" ~>
-    "wrap" <~ (lambda "t'" $
-      declarationForRecordType @@ var "isInner" @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName"
-        @@ (list [Core.fieldType (wrap _Name (string "value")) (Strip.deannotateType @@ var "t'")]) @@ var "cx" @@ var "g") $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ var "wrap" @@ var "t") [
-      _Type_record>>: lambda "rt" $
-        declarationForRecordType @@ var "isInner" @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName"
-          @@ (var "rt") @@ var "cx" @@ var "g",
-      _Type_union>>: lambda "rt" $
-        declarationForUnionType @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName"
-          @@ (var "rt") @@ var "cx" @@ var "g",
-      _Type_forall>>: lambda "fa" $
-        "v" <~ Core.forallTypeParameter (var "fa") $
-        "body" <~ Core.forallTypeBody (var "fa") $
-        "param" <~ (JavaUtilsSource.javaTypeParameter @@ (Formatting.capitalize @@ (Core.unName (var "v")))) $
-        toClassDecl @@ false @@ var "isSer" @@ var "aliases"
-          @@ (Lists.concat2 (var "tparams") (list [var "param"])) @@ var "elName" @@ var "body" @@ var "cx" @@ var "g",
-      _Type_wrap>>: lambda "wt" $
-        declarationForRecordType @@ var "isInner" @@ var "isSer" @@ var "aliases" @@ var "tparams" @@ var "elName"
-          @@ (list [Core.fieldType (wrap _Name (string "value")) (var "wt")]) @@ var "cx" @@ var "g"]
-
--- | Initialize a recursive binding with AtomicReference (for toDeclInit).
-toDeclInit :: TTermDefinition (JavaHelpers.Aliases -> Graph -> S.Set Name -> [Binding] -> Name -> Context -> Graph -> Either Error (Maybe Java.BlockStatement))
-toDeclInit = def "toDeclInit" $
-  lambda "aliasesExt" $ lambda "gExt" $ lambda "recursiveVars" $ lambda "flatBindings" $ lambda "name" $
-    "cx" ~> "g" ~>
-    Logic.ifElse (Sets.member (var "name") (var "recursiveVars"))
-      ("binding" <~ Maybes.fromMaybe (Core.binding (var "name") Core.termUnit nothing) (Lists.maybeHead (Lists.filter (lambda "b" $ Equality.equal (Core.bindingName (var "b")) (var "name")) (var "flatBindings"))) $
-        "value" <~ Core.bindingTerm (var "binding") $
-        "typ" <<~ Maybes.cases (Core.bindingTypeScheme (var "binding"))
-          (Checking.typeOfTerm @@ var "cx" @@ var "gExt" @@ var "value")
-          (lambda "ts" $ right (Core.typeSchemeBody (var "ts"))) $
-        "jtype" <<~ (encodeType @@ var "aliasesExt" @@ Sets.empty @@ var "typ" @@ var "cx" @@ var "g") $
-        "id" <~ (JavaUtilsSource.variableToJavaIdentifier @@ var "name") $
-        "arid" <~ (JavaDsl.identifier (string "java.util.concurrent.atomic.AtomicReference")) $
-        "aid" <~ (JavaDsl.annotatedIdentifier (list ([] :: [TTerm Java.Annotation])) (var "arid")) $
-        "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jtype" @@ var "cx") $
-        "targs" <~ (typeArgsOrDiamond @@ list [JavaDsl.typeArgumentReference (var "rt")]) $
-        "ci" <~ record Java._ClassOrInterfaceTypeToInstantiate [
-          Java._ClassOrInterfaceTypeToInstantiate_identifiers>>: list [var "aid"],
-          Java._ClassOrInterfaceTypeToInstantiate_typeArguments>>: just (var "targs")] $
-        "body" <~ (JavaUtilsSource.javaConstructorCall @@ var "ci" @@ list ([] :: [TTerm Java.Expression]) @@ nothing) $
-        "pkg" <~ (JavaNamesSource.javaPackageName @@ list [string "java", string "util", string "concurrent", string "atomic"]) $
-        "artype" <~ (JavaUtilsSource.javaRefType @@ list [var "rt"] @@ just (var "pkg") @@ string "AtomicReference") $
-        right (just (JavaUtilsSource.variableDeclarationStatement @@ var "aliasesExt" @@ var "artype" @@ var "id" @@ var "body")))
-      (right nothing)
-
--- | Declare or set a binding value (for toDeclStatement).
-toDeclStatement :: TTermDefinition (JavaHelpers.JavaEnvironment -> JavaHelpers.Aliases -> Graph -> S.Set Name -> S.Set Name -> [Binding] -> Name -> Context -> Graph -> Either Error Java.BlockStatement)
-toDeclStatement = def "toDeclStatement" $
-  lambda "envExt" $ lambda "aliasesExt" $ lambda "gExt" $ lambda "recursiveVars" $ lambda "thunkedVars" $ lambda "flatBindings" $ lambda "name" $
-    "cx" ~> "g" ~>
-    "binding" <~ Maybes.fromMaybe (Core.binding (var "name") Core.termUnit nothing) (Lists.maybeHead (Lists.filter (lambda "b" $ Equality.equal (Core.bindingName (var "b")) (var "name")) (var "flatBindings"))) $
-    "value" <~ Core.bindingTerm (var "binding") $
-    "typ" <<~ Maybes.cases (Core.bindingTypeScheme (var "binding"))
-      (Checking.typeOfTerm @@ var "cx" @@ var "gExt" @@ var "value")
-      (lambda "ts" $ right (Core.typeSchemeBody (var "ts"))) $
-    "jtype" <<~ (encodeType @@ var "aliasesExt" @@ Sets.empty @@ var "typ" @@ var "cx" @@ var "g") $
-    "id" <~ (JavaUtilsSource.variableToJavaIdentifier @@ var "name") $
-    "annotatedValue" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-      @@ just (encodeTypeAsTerm @@ var "typ")
-      @@ var "value") $
-    "rhs" <<~ (encodeTerm @@ var "envExt" @@ var "annotatedValue" @@ var "cx" @@ var "g") $
-    Logic.ifElse (Sets.member (var "name") (var "recursiveVars"))
-      -- Recursive: call .set() on AtomicReference
-      (right (JavaDsl.blockStatementStatement (JavaUtilsSource.javaMethodInvocationToJavaStatement @@
-        (JavaUtilsSource.methodInvocation @@
-          just (Phantoms.left (JavaDsl.expressionName nothing (var "id")))
-          @@ JavaDsl.identifier (asTerm JavaNamesSource.setMethodName) @@ list [var "rhs"]))))
-      (Logic.ifElse (Sets.member (var "name") (var "thunkedVars"))
-        -- Thunked: wrap in Lazy<T>
-        ("rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jtype" @@ var "cx") $
-          "lazyType" <~ (JavaUtilsSource.javaRefType @@ list [var "rt"] @@ asTerm JavaNamesSource.hydraUtilPackageName @@ string "Lazy") $
-          "lambdaBody" <~ inject Java._LambdaBody Java._LambdaBody_expression (var "rhs") $
-          "supplierLambda" <~ (JavaDsl.expressionLambda (JavaDsl.lambdaExpression
-            (inject Java._LambdaParameters Java._LambdaParameters_tuple (list ([] :: [TTerm Java.FormalParameter])))
-            (var "lambdaBody"))) $
-          "targs" <~ (typeArgsOrDiamond @@ list [JavaDsl.typeArgumentReference (var "rt")]) $
-          "lazyExpr" <~ (JavaUtilsSource.javaConstructorCall
-            @@ (JavaUtilsSource.javaConstructorName @@ JavaDsl.identifier (string "hydra.util.Lazy") @@ just (var "targs"))
-            @@ list [var "supplierLambda"] @@ nothing) $
-          right (JavaUtilsSource.variableDeclarationStatement @@ var "aliasesExt" @@ var "lazyType" @@ var "id" @@ var "lazyExpr"))
-        -- Normal: simple variable declaration
-        (right (JavaUtilsSource.variableDeclarationStatement @@ var "aliasesExt" @@ var "jtype" @@ var "id" @@ var "rhs")))
-
--- | Try to infer the function type from lambda structure when type annotations are unavailable.
--- The "funTerm" argument should be a function-form Term (lambda, project, cases, or unwrap).
-tryInferFunctionType :: TTermDefinition (Term -> Maybe Type)
-tryInferFunctionType = def "tryInferFunctionType" $
-  lambda "funTerm" $
-    cases _Term (Strip.deannotateTerm @@ var "funTerm")
-      (Just nothing) [
-      _Term_lambda>>: lambda "lam" $
-        Maybes.bind (Core.lambdaDomain (var "lam")) (lambda "dom" $
-          "mCod" <~ (cases _Term (Core.lambdaBody (var "lam"))
-            (Just nothing) [
-            _Term_annotated>>: lambda "at" $
-              Maybes.bind
-                (Maps.lookup (Constants.key_type) (Core.annotatedTermAnnotation (var "at")))
-                (lambda "typeTerm" $
-                  decodeTypeFromTerm @@ var "typeTerm"),
-            _Term_lambda>>: lambda "_innerLam" $
-              tryInferFunctionType @@ (Core.lambdaBody (var "lam"))]) $
-          Maybes.map (lambda "cod" $
-            Core.typeFunction (Core.functionType (var "dom") (var "cod")))
-            (var "mCod"))]
-
--- | Fallback cast for TermTypeApplication: re-annotate the body with corrected type
--- before encoding, then cast.
-typeAppFallbackCast :: TTermDefinition (JavaHelpers.JavaEnvironment -> JavaHelpers.Aliases -> [M.Map Name Term] -> [Java.Type] -> Java.Type -> Term -> Type -> Context -> Graph -> Either Error Java.Expression)
-typeAppFallbackCast = def "typeAppFallbackCast" $
-  lambda "env" $ lambda "aliases" $ lambda "anns" $ lambda "tyapps" $
-    lambda "jatyp" $ lambda "body" $ lambda "typ" $
-      "cx" ~> "g" ~>
-      "annotatedBody" <~ (Annotations.setTermAnnotation @@ asTerm Constants.key_type
-        @@ just (encodeTypeAsTerm @@ var "typ") @@ var "body") $
-      "jbody" <<~ (encodeTermInternal @@ var "env" @@ var "anns" @@ (Lists.cons (var "jatyp") (var "tyapps")) @@ var "annotatedBody" @@ var "cx" @@ var "g") $
-      "jtype" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "typ" @@ var "cx" @@ var "g") $
-      "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jtype" @@ var "cx") $
-      right (JavaUtilsSource.javaCastExpressionToJavaExpression @@
-        (JavaUtilsSource.javaCastExpression @@ var "rt" @@ (JavaUtilsSource.javaExpressionToJavaUnaryExpression @@ var "jbody")))
-
--- | Handle TermTypeApplication when the innermost body is a variable.
--- Generates explicit type witnesses for nullary static methods and hoisted lambdas
--- instead of casts, which Java can't resolve for methods with unconstrained type params.
-typeAppNullaryOrHoisted :: TTermDefinition (JavaHelpers.JavaEnvironment -> JavaHelpers.Aliases -> [M.Map Name Term] -> [Java.Type] -> Java.Type -> Term -> Type -> Name -> JavaHelpers.JavaSymbolClass -> [Type] -> Context -> Graph -> Either Error Java.Expression)
-typeAppNullaryOrHoisted = def "typeAppNullaryOrHoisted" $
-  lambda "env" $ lambda "aliases" $ lambda "anns" $ lambda "tyapps" $
-    lambda "jatyp" $ lambda "body" $ lambda "correctedTyp" $ lambda "varName" $
-      lambda "cls" $ lambda "allTypeArgs" $
-        "cx" ~> "g" ~>
-        "qn" <~ (Names.qualifyName @@ var "varName") $
-        "mns" <~ Packaging.qualifiedNameNamespace (var "qn") $
-        "localName" <~ Packaging.qualifiedNameLocal (var "qn") $
-        cases JavaHelpers._JavaSymbolClass (var "cls")
-          (Just $ typeAppFallbackCast @@ var "env" @@ var "aliases" @@ var "anns" @@ var "tyapps"
-            @@ var "jatyp" @@ var "body" @@ var "correctedTyp" @@ var "cx" @@ var "g") [
-          JavaHelpers._JavaSymbolClass_nullaryFunction>>: lambda "_u" $
-            Maybes.cases (var "mns")
-              (typeAppFallbackCast @@ var "env" @@ var "aliases" @@ var "anns" @@ var "tyapps"
-                @@ var "jatyp" @@ var "body" @@ var "correctedTyp" @@ var "cx" @@ var "g")
-              (lambda "ns_" $
-                "classId" <~ (JavaUtilsSource.nameToJavaName @@ var "aliases"
-                  @@ (elementsQualifiedName @@ var "ns_")) $
-                "methodId" <~ JavaDsl.identifier (JavaUtilsSource.sanitizeJavaName @@ var "localName") $
-                "filteredTypeArgs" <<~ (filterPhantomTypeArgs @@ var "varName" @@ var "allTypeArgs" @@ var "cx" @@ var "g") $
-                "jTypeArgs" <<~ (Eithers.mapList (lambda "t" $
-                  "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "t" @@ var "cx" @@ var "g") $
-                  "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") $
-                  right (inject Java._TypeArgument Java._TypeArgument_reference (var "rt")))
-                  (var "filteredTypeArgs")) $
-                right (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                  (JavaUtilsSource.methodInvocationStaticWithTypeArgs @@ var "classId" @@ var "methodId"
-                    @@ var "jTypeArgs" @@ list ([] :: [TTerm Java.Expression])))),
-          JavaHelpers._JavaSymbolClass_hoistedLambda>>: lambda "arity" $
-            Maybes.cases (var "mns")
-              (typeAppFallbackCast @@ var "env" @@ var "aliases" @@ var "anns" @@ var "tyapps"
-                @@ var "jatyp" @@ var "body" @@ var "correctedTyp" @@ var "cx" @@ var "g")
-              (lambda "ns_" $
-                "classId" <~ (JavaUtilsSource.nameToJavaName @@ var "aliases"
-                  @@ (elementsQualifiedName @@ var "ns_")) $
-                "methodId" <~ JavaDsl.identifier (JavaUtilsSource.sanitizeJavaName @@ var "localName") $
-                "filteredTypeArgs" <<~ (filterPhantomTypeArgs @@ var "varName" @@ var "allTypeArgs" @@ var "cx" @@ var "g") $
-                "jTypeArgs" <<~ (Eithers.mapList (lambda "t" $
-                  "jt" <<~ (encodeType @@ var "aliases" @@ Sets.empty @@ var "t" @@ var "cx" @@ var "g") $
-                  "rt" <<~ (JavaUtilsSource.javaTypeToJavaReferenceType @@ var "jt" @@ var "cx") $
-                  right (inject Java._TypeArgument Java._TypeArgument_reference (var "rt")))
-                  (var "filteredTypeArgs")) $
-                "paramNames" <~ Lists.map (lambda "i" $ Core.name (Strings.cat2 (string "p") (Literals.showInt32 (var "i"))))
-                  (Math.range (int32 0) (Math.sub (var "arity") (int32 1))) $
-                "paramExprs" <~ Lists.map (lambda "p" $
-                  JavaUtilsSource.javaIdentifierToJavaExpression @@ (JavaUtilsSource.variableToJavaIdentifier @@ var "p"))
-                  (var "paramNames") $
-                "call" <~ (JavaUtilsSource.javaMethodInvocationToJavaExpression @@
-                  (JavaUtilsSource.methodInvocationStaticWithTypeArgs @@ var "classId" @@ var "methodId"
-                    @@ var "jTypeArgs" @@ var "paramExprs")) $
-                right (buildCurriedLambda @@ var "paramNames" @@ var "call"))]
-
--- | Flatten a nested application chain f(a1)(a2)...(aN) into ([a1,...,aN], f).
-
-typeArgsOrDiamond :: TTermDefinition ([Java.TypeArgument] -> Java.TypeArgumentsOrDiamond)
-typeArgsOrDiamond = def "typeArgsOrDiamond" $
-  lambda "args" $
-    Logic.ifElse
-      (project JavaHelpers._JavaFeatures JavaHelpers._JavaFeatures_supportsDiamondOperator @@ javaFeatures)
-      JavaDsl.typeArgumentsOrDiamondDiamond
-      (JavaDsl.typeArgumentsOrDiamondArguments (var "args"))
-
--- | Shallow structural match for types.
--- TypeVariable: check names match. TypeWrap: check type names match. Otherwise: True.
-typesMatch :: TTermDefinition (Type -> Type -> Bool)
-typesMatch = def "typesMatch" $
-  lambda "a" $ lambda "b" $ cases _Type (var "a")
-    (Just $ boolean True) [
-    _Type_variable>>: lambda "va" $
-      cases _Type (var "b")
-        (Just $ boolean True) [
-        _Type_variable>>: lambda "vb" $
-          Equality.equal (var "va") (var "vb")],
-    _Type_wrap>>: lambda "wa" $
-      cases _Type (var "b")
-        (Just $ boolean True) [
-        _Type_wrap>>: lambda "wb" $
-          Equality.equal (var "wa") (var "wb")]]
-
--- | Unwrap nested function types to get the final return type.
--- Also looks through type application wrappers (TypeApplication).
-unwrapReturnType :: TTermDefinition (Type -> Type)
-unwrapReturnType = def "unwrapReturnType" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ var "t") [
-      _Type_function>>: lambda "ft" $
-        unwrapReturnType @@ Core.functionTypeCodomain (var "ft"),
-      _Type_application>>: lambda "at" $
-        unwrapReturnType @@ Core.applicationTypeArgument (var "at")]
-
--- | Generate a compareTo method for a union variant (inner) class.
--- Takes the parent type as the compareTo parameter.
--- First compares variant class names for tag ordering,
--- then casts 'other' to the same variant class and compares the 'value' field.
-variantCompareToMethod :: TTermDefinition (JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> Name -> [FieldType] -> Java.ClassBodyDeclaration)
-variantCompareToMethod = def "variantCompareToMethod" $
-  lambda "aliases" $ lambda "tparams" $ lambda "parentName" $ lambda "variantName" $ lambda "fields" $ lets [
-    "anns">: list [asTerm JavaUtilsSource.overrideAnnotation, asTerm JavaUtilsSource.suppressWarningsUncheckedAnnotation],
-    "mods">: list [inject Java._MethodModifier Java._MethodModifier_public unit],
-    "param">: JavaUtilsSource.javaTypeToJavaFormalParameter @@ (JavaUtilsSource.javaTypeFromTypeName @@ var "aliases" @@ var "parentName") @@ wrap _Name (asTerm JavaNamesSource.otherInstanceName),
-    "result">: JavaUtilsSource.javaTypeToJavaResult @@ (asTerm JavaUtilsSource.javaIntType),
-    "varTmpName">: string "o",
-    "tagDeclStmt">: JavaUtilsSource.variableDeclarationStatement @@ var "aliases" @@ (asTerm JavaUtilsSource.javaIntType)
-      @@ (JavaUtilsSource.javaIdentifier @@ string "tagCmp") @@ (asTerm tagCompareExpr),
-    "tagReturnStmt">: JavaDsl.blockStatementStatement
-      (JavaDsl.statementIfThen (JavaDsl.ifThenStatement (asTerm tagCmpNotZeroExpr)
-        (JavaUtilsSource.javaReturnStatement @@ just
-          (JavaUtilsSource.javaExpressionNameToJavaExpression @@ (JavaDsl.expressionName nothing (JavaUtilsSource.javaIdentifier @@ string "tagCmp")))))),
-    "variantJavaType">: JavaUtilsSource.javaTypeFromTypeName @@ var "aliases" @@ var "variantName",
-    "castOtherExpr">: JavaUtilsSource.javaCastExpressionToJavaExpression @@
-      (JavaUtilsSource.javaCastExpression
-        @@ (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ false @@ list ([] :: [TTerm Java.TypeArgument]) @@ var "variantName" @@ nothing)
-        @@ (JavaUtilsSource.javaIdentifierToJavaUnaryExpression @@ wrap Java._Identifier (asTerm JavaNamesSource.otherInstanceName))),
-    "castDeclStmt">: JavaUtilsSource.variableDeclarationStatement @@ var "aliases" @@ var "variantJavaType"
-      @@ (JavaUtilsSource.javaIdentifier @@ var "varTmpName") @@ var "castOtherExpr",
-    "emptyReturn">: list [JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (JavaUtilsSource.javaIntExpression @@ bigintAsInt (bigint 0)))],
-    "valueCompareStmt">: Logic.ifElse (Lists.null (var "fields"))
-      (var "emptyReturn")
-      (Lists.concat2 (list [var "castDeclStmt"]) (compareToBody @@ var "aliases" @@ var "varTmpName" @@ var "fields")),
-    "body">: Lists.concat2 (list [var "tagDeclStmt", var "tagReturnStmt"]) (var "valueCompareStmt")] $
-    JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter]) @@ var "anns"
-      @@ (asTerm JavaNamesSource.compareToMethodName) @@ list [var "param"] @@ var "result"
-      @@ just (var "body")
-
--- | Generate a visit branch for a field of a union type.
-visitBranch :: TTermDefinition (JavaHelpers.JavaEnvironment -> JavaHelpers.Aliases -> Type -> Name -> Java.Type -> [Java.TypeArgument] -> Field -> Context -> Graph -> Either Error Java.ClassBodyDeclarationWithComments)
-visitBranch = def "visitBranch" $
-  lambda "env" $ lambda "aliases" $ lambda "dom" $ lambda "tname" $ lambda "jcod" $ lambda "targs" $ lambda "field" $
-    "cx" ~> "g" ~>
-    -- Compute the domain type for this specific branch
-    "jdom" <~ (JavaDsl.typeReference (JavaUtilsSource.nameToJavaReferenceType @@ var "aliases" @@ true @@ var "targs"
-      @@ var "tname" @@ just (Formatting.capitalize @@ (Core.unName (Core.fieldName (var "field")))))) $
-    "mods" <~ list [inject Java._MethodModifier Java._MethodModifier_public unit] $
-    "anns" <~ list [asTerm JavaUtilsSource.overrideAnnotation] $
-    "result" <~ (JavaDsl.resultType (JavaDsl.unannType (var "jcod"))) $
-    -- Field terms are lambdas; apply to special var that encodes to instance.value
-    cases _Term (Strip.deannotateTerm @@ Core.fieldTerm (var "field"))
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError $ Strings.cat2 (string "visitBranch: field term is not a lambda: ") (ShowCore.term @@ Core.fieldTerm (var "field"))) (var "cx")) [
-      _Term_lambda>>: lambda "lam" $
-        withLambda @@ var "env" @@ var "lam" @@ (lambda "env2" $
-          "lambdaParam" <~ Core.lambdaParameter (var "lam") $
-          "body" <~ Core.lambdaBody (var "lam") $
-          "env3" <~ (insertBranchVar @@ var "lambdaParam" @@ var "env2") $
-          "fs" <<~ (analyzeJavaFunction @@ var "env3" @@ var "body" @@ var "cx" @@ var "g") $
-          "bindings" <~ (project _FunctionStructure _FunctionStructure_bindings @@ var "fs") $
-          "innerBody" <~ (project _FunctionStructure _FunctionStructure_body @@ var "fs") $
-          "env4" <~ (project _FunctionStructure _FunctionStructure_environment @@ var "fs") $
-          "bindResult" <<~ (bindingsToStatements @@ var "env4" @@ var "bindings" @@ var "cx" @@ var "g") $
-          "bindingStmts" <~ Pairs.first (var "bindResult") $
-          "env5" <~ Pairs.second (var "bindResult") $
-          "jret" <<~ (encodeTerm @@ var "env5" @@ var "innerBody" @@ var "cx" @@ var "g") $
-          "param" <~ (JavaUtilsSource.javaTypeToJavaFormalParameter @@ var "jdom" @@ var "lambdaParam") $
-          "returnStmt" <~ (JavaDsl.blockStatementStatement (JavaUtilsSource.javaReturnStatement @@ just (var "jret"))) $
-          "allStmts" <~ Lists.concat2 (var "bindingStmts") (list [var "returnStmt"]) $
-          right (noComment @@ (JavaUtilsSource.methodDeclaration @@ var "mods" @@ list ([] :: [TTerm Java.TypeParameter]) @@ var "anns"
-            @@ asTerm JavaNamesSource.visitMethodName @@ list [var "param"] @@ var "result" @@ just (var "allStmts"))))]
-
--- | Execute a computation in the context of a lambda, extending both the Graph
--- and aliasesLambdaVars with the lambda parameter.
-withLambda :: TTermDefinition (JavaHelpers.JavaEnvironment -> Lambda -> (JavaHelpers.JavaEnvironment -> a) -> a)
-withLambda = def "withLambda" $
-  lambda "env" $ lambda "lam" $ lambda "k" $
-    Environment.withLambdaContext @@ javaEnvGetGraph @@ javaEnvSetGraph @@ var "env" @@ var "lam" @@
-      (lambda "env1" $
-        "aliases" <~ (project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_aliases @@ var "env1") $
-        "aliases2" <~ (record JavaHelpers._Aliases [
-          JavaHelpers._Aliases_currentNamespace>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases",
-          JavaHelpers._Aliases_packages>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases",
-          JavaHelpers._Aliases_branchVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases",
-          JavaHelpers._Aliases_recursiveVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases",
-          JavaHelpers._Aliases_inScopeTypeParams>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases",
-          JavaHelpers._Aliases_polymorphicLocals>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases",
-          JavaHelpers._Aliases_inScopeJavaVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases",
-          JavaHelpers._Aliases_varRenames>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases",
-          JavaHelpers._Aliases_lambdaVars>>:
-            Sets.insert (Core.lambdaParameter (var "lam"))
-              (project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases"),
-          JavaHelpers._Aliases_typeVarSubst>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases",
-          JavaHelpers._Aliases_trustedTypeVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases",
-          JavaHelpers._Aliases_methodCodomain>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_methodCodomain @@ var "aliases",
-          JavaHelpers._Aliases_thunkedVars>>:
-            project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases"]) $
-        "env2" <~ (record JavaHelpers._JavaEnvironment [
-          JavaHelpers._JavaEnvironment_aliases>>: var "aliases2",
-          JavaHelpers._JavaEnvironment_graph>>:
-            project JavaHelpers._JavaEnvironment JavaHelpers._JavaEnvironment_graph @@ var "env1"]) $
-        var "k" @@ var "env2")
-
--- | Execute a computation in the context of a type lambda
-withTypeLambda :: TTermDefinition (JavaHelpers.JavaEnvironment -> TypeLambda -> (JavaHelpers.JavaEnvironment -> a) -> a)
-withTypeLambda = def "withTypeLambda" $
-  Environment.withTypeLambdaContext @@ javaEnvGetGraph @@ javaEnvSetGraph
-
--- | Wrap a single expression in a Supplier lambda: () -> expr
-wrapInSupplierLambda :: TTermDefinition (Java.Expression -> Java.Expression)
-wrapInSupplierLambda = def "wrapInSupplierLambda" $
-  lambda "expr" $
-    inject Java._Expression Java._Expression_lambda
-      (JavaDsl.lambdaExpression
-        (inject Java._LambdaParameters Java._LambdaParameters_tuple
-          (list ([] :: [TTerm Java.FormalParameter])))
-        (inject Java._LambdaBody Java._LambdaBody_expression (var "expr")))
-
--- | For primitives requiring lazy evaluation, wrap branch arguments in Supplier lambdas.
--- Java eagerly evaluates all method arguments, so ifElse branches must be wrapped
--- in () -> expr and called via IfElse.lazy(). Similarly, maybe's nothing case must be
--- wrapped to avoid constructing expensive error messages on the success path.
-wrapLazyArguments :: TTermDefinition (Name -> [Java.Expression] -> ([Java.Expression], Maybe String))
-wrapLazyArguments = def "wrapLazyArguments" $
-  lambda "name" $ lambda "args" $ lets [
-    "dummyExpr">: JavaUtilsSource.javaIntExpression @@ bigintAsInt (bigint 0),
-    "argAt">: "i" ~> Maybes.fromMaybe (var "dummyExpr") (Lists.maybeAt (var "i") (var "args"))] $
-    Logic.ifElse
-      (Logic.and
-        (Equality.equal (var "name") (Core.nameLift _logic_ifElse))
-        (Equality.equal (Lists.length (var "args")) (int32 3)))
-      (pair
-        (list [
-          var "argAt" @@ int32 0,
-          wrapInSupplierLambda @@ (var "argAt" @@ int32 1),
-          wrapInSupplierLambda @@ (var "argAt" @@ int32 2)])
-        (just (string "lazy")))
-      (Logic.ifElse
-        (Logic.and
-          (Equality.equal (var "name") (Core.nameLift _maybes_maybe))
-          (Equality.equal (Lists.length (var "args")) (int32 3)))
-        (pair
-          (list [
-            wrapInSupplierLambda @@ (var "argAt" @@ int32 0),
-            var "argAt" @@ int32 1,
-            var "argAt" @@ int32 2])
-          (just (string "applyLazy")))
-      (Logic.ifElse
-        (Logic.and
-          (Equality.equal (var "name") (Core.nameLift _maybes_cases))
-          (Equality.equal (Lists.length (var "args")) (int32 3)))
-        (pair
-          (list [
-            var "argAt" @@ int32 0,
-            wrapInSupplierLambda @@ (var "argAt" @@ int32 1),
-            var "argAt" @@ int32 2])
-          (just (string "applyLazy")))
-      (Logic.ifElse
-        (Logic.and
-          (Equality.equal (var "name") (Core.nameLift _maps_findWithDefault))
-          (Equality.equal (Lists.length (var "args")) (int32 3)))
-        (pair
-          (list [
-            wrapInSupplierLambda @@ (var "argAt" @@ int32 0),
-            var "argAt" @@ int32 1,
-            var "argAt" @@ int32 2])
-          (just (string "applyLazy")))
-      (Logic.ifElse
-        (Logic.and
-          (Logic.or
-            (Equality.equal (var "name") (Core.nameLift _maybes_fromMaybe))
-            (Logic.or
-              (Equality.equal (var "name") (Core.nameLift _eithers_fromLeft))
-              (Equality.equal (var "name") (Core.nameLift _eithers_fromRight))))
-          (Equality.equal (Lists.length (var "args")) (int32 2)))
-        (pair
-          (list [
-            wrapInSupplierLambda @@ (var "argAt" @@ int32 0),
-            var "argAt" @@ int32 1])
-          (just (string "applyLazy")))
-        (pair (var "args") (nothing :: TTerm (Maybe String)))))))
diff --git a/src/main/haskell/Hydra/Sources/Java/Environment.hs b/src/main/haskell/Hydra/Sources/Java/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Environment.hs
+++ /dev/null
@@ -1,145 +0,0 @@
--- | Environment types for Java code generation.
--- These types support the Java coder and are used to track code generation state.
-
-module Hydra.Sources.Java.Environment where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                           ((>:), (@@))
-import qualified Hydra.Dsl.Types                           as T
-import qualified Hydra.Sources.Kernel.Types.Core           as Core
--- Additional imports
-import qualified Hydra.Sources.Kernel.Types.Graph as Graph
-import qualified Hydra.Sources.Kernel.Types.Packaging as Module
-import qualified Hydra.Sources.Kernel.Types.Typing as Typing
-import qualified Hydra.Sources.Java.Syntax as Syntax
-
-
-ns :: Namespace
-ns = Namespace "hydra.java.environment"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-environment :: String -> Type
-environment = typeref ns
-
-syntax :: String -> Type
-syntax = typeref Syntax.ns
-
-core :: String -> Type
-core = typeref Core.ns
-
-graph :: String -> Type
-graph = typeref Graph.ns
-
-modul :: String -> Type
-modul = typeref Module.ns
-
-typing :: String -> Type
-typing = typeref Typing.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Syntax.ns, Core.ns, Graph.ns, Module.ns, Typing.ns],
-            moduleDescription = Just "Environment types for Java code generation"}
-  where
-    definitions = [
-      javaSymbolClass,
-      javaFeatures,
-      aliases,
-      javaEnvironment]
-
--- | Classification of a Java symbol for code generation.
-javaSymbolClass :: Binding
-javaSymbolClass = def "JavaSymbolClass" $
-  doc "Classification of a Java symbol for code generation" $
-  T.union [
-    "constant">:
-      doc "A constant value" $
-      T.unit,
-    "nullaryFunction">:
-      doc "A nullary function (no arguments)" $
-      T.unit,
-    "hoistedLambda">:
-      doc "A hoisted lambda wrapped in type lambdas. The Int is the number of curried lambda parameters." $
-      T.int32,
-    "unaryFunction">:
-      doc "A unary function (single argument)" $
-      T.unit,
-    "localVariable">:
-      doc "A local variable" $
-      T.unit]
-
--- | Feature flags for the target Java version.
-javaFeatures :: Binding
-javaFeatures = def "JavaFeatures" $
-  doc "Feature flags for the target Java version" $
-  T.record [
-    "supportsDiamondOperator">:
-      doc "Whether the diamond operator (<>) is supported (Java 7+)" $
-      T.boolean]
-
--- | Aliases and context for Java code generation.
--- Tracks namespace mapping, variable scoping, type parameters, and other state
--- needed during the encoding of Hydra terms to Java syntax.
-aliases :: Binding
-aliases = def "Aliases" $
-  doc "Aliases and context for Java code generation" $
-  T.record [
-    "currentNamespace">:
-      doc "Current module namespace context" $
-      modul "Namespace",
-    "packages">:
-      doc "Maps namespaces to Java package names" $
-      T.map (modul "Namespace") (syntax "PackageName"),
-    "branchVars">:
-      doc "Variables bound in pattern matching branches" $
-      T.set (core "Name"),
-    "recursiveVars">:
-      doc "Variables that are self-recursive" $
-      T.set (core "Name"),
-    "inScopeTypeParams">:
-      doc "Type parameters that are in scope (from method-level type parameters)" $
-      T.set (core "Name"),
-    "polymorphicLocals">:
-      doc "Local variables that have polymorphic types (declared with raw types)" $
-      T.set (core "Name"),
-    "inScopeJavaVars">:
-      doc "All in-scope Java variable names (for avoiding lambda parameter shadowing)" $
-      T.set (core "Name"),
-    "varRenames">:
-      doc "Variable renames for avoiding shadowing (maps Hydra name to Java name)" $
-      T.map (core "Name") (core "Name"),
-    "lambdaVars">:
-      doc "Lambda-bound variables (including hoisted captures with qualified names)" $
-      T.set (core "Name"),
-    "typeVarSubst">:
-      doc "Type variable substitution: maps fresh inference variable names to canonical scheme variable names" $
-      T.map (core "Name") (core "Name"),
-    "trustedTypeVars">:
-      doc "Type variables that actually appear in the method's formal parameter types" $
-      T.set (core "Name"),
-    "methodCodomain">:
-      doc "The enclosing method's codomain (return type), used for casting pair expressions" $
-      T.optional (core "Type"),
-    "thunkedVars">:
-      doc "Variables that have been thunked (wrapped in Supplier) for lazy evaluation" $
-      T.set (core "Name")]
-
--- | Environment for Java code generation.
-javaEnvironment :: Binding
-javaEnvironment = def "JavaEnvironment" $
-  doc "Environment for Java code generation" $
-  T.record [
-    "aliases">:
-      doc "Aliases and context state" $
-      environment "Aliases",
-    "graph">:
-      doc "Graph context for type inference" $
-      graph "Graph"]
diff --git a/src/main/haskell/Hydra/Sources/Java/Language.hs b/src/main/haskell/Hydra/Sources/Java/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Language.hs
+++ /dev/null
@@ -1,227 +0,0 @@
-module Hydra.Sources.Java.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.java.language"),
-            moduleDefinitions = [toDefinition javaMaxTupleLength, toDefinition javaLanguage, toDefinition reservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Java"}
-javaMaxTupleLength :: TTermDefinition Int
-javaMaxTupleLength = define "javaMaxTupleLength" $
-  doc ("The maximum supported length of a tuple in Hydra-Java. "
-    <> "Note: if this constant is changed, also change Tuples.java correspondingly") $
-  int32 9
-
-javaLanguage :: TTermDefinition Language
-javaLanguage = define "javaLanguage" $
-  doc "Language constraints for Java" $ lets [
-  "eliminationVariants">: Sets.fromList $ list [
-    Variants.eliminationVariantRecord,
-    Variants.eliminationVariantUnion,
-    Variants.eliminationVariantWrap],
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary, -- byte[]
-    Variants.literalVariantBoolean, -- boolean
-    Variants.literalVariantDecimal, -- java.math.BigDecimal
-    Variants.literalVariantFloat, -- (see float types)
-    Variants.literalVariantInteger, -- (see integer types)
-    Variants.literalVariantString], -- string
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeBigfloat, -- java.math.Bigfloat
-    Core.floatTypeFloat32, -- float
-    Core.floatTypeFloat64], -- double
-  "functionVariants">: Sets.fromList $ list [
-    Variants.functionVariantElimination,
-    Variants.functionVariantLambda],
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeBigint, -- java.math.BigInteger
-    Core.integerTypeInt8, -- byte (signed, 8-bit)
-    Core.integerTypeInt16, -- short (signed, 16-bit)
-    Core.integerTypeInt32, -- int (signed, 32-bit)
-    Core.integerTypeInt64, -- long (signed, 64-bit)
-    Core.integerTypeUint16], -- char (unsigned, 16-bit)
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantApplication,
-    Variants.termVariantEither,
-
-    Variants.termVariantCases,
-
-    Variants.termVariantLambda,
-
-    Variants.termVariantProject,
-
-    Variants.termVariantUnwrap,
-
-    Variants.termVariantTypeApplication,
-
-    Variants.termVariantTypeLambda,
-    Variants.termVariantLet,
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantPair,
-    Variants.termVariantRecord,
-    Variants.termVariantSet,
-    Variants.termVariantInject,
-    Variants.termVariantUnit,
-    Variants.termVariantVariable,
-    Variants.termVariantWrap],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantApplication,
-    Variants.typeVariantEither,
-    Variants.typeVariantFunction,
-    Variants.typeVariantForall,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantPair,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion,
-    Variants.typeVariantUnit,
-    Variants.typeVariantVariable,
-    Variants.typeVariantVoid,
-    Variants.typeVariantWrap],
-  "typePredicate">: constant true] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.java")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-reservedWords :: TTermDefinition (S.Set String)
-reservedWords = define "reservedWords" $
-  doc "A set of reserved words in Java" $ lets [
-  "specialNames">:
-    doc "Special names reserved for use by Hydra" $
-    list $ string <$> ["Elements"],
-  "classNames">:
-    doc ("java.lang classes as of JDK 7\n"
-      <> "See: https://docs.oracle.com/javase/7/docs/api/java/lang/package-summary.html") $
-    list $ string <$> [
-      "AbstractMethodError", "Appendable", "ArithmeticException", "ArrayIndexOutOfBoundsException",
-      "ArrayStoreException", "AssertionError", "AutoCloseable", "Boolean", "BootstrapMethodError", "Byte",
-      "CharSequence", "Character", "Class", "ClassCastException", "ClassCircularityError", "ClassFormatError",
-      "ClassLoader", "ClassNotFoundException", "ClassValue", "CloneNotSupportedException", "Cloneable", "Comparable",
-      "Compiler", "Deprecated", "Double", "Enum", "EnumConstantNotPresentException", "Error", "Exception",
-      "ExceptionInInitializerError", "Float", "IllegalAccessError", "IllegalAccessException",
-      "IllegalArgumentException", "IllegalMonitorStateException", "IllegalStateException",
-      "IllegalThreadStateException", "IncompatibleClassChangeError", "IndexOutOfBoundsException",
-      "InheritableThreadLocal", "InstantiationError", "InstantiationException", "Integer", "InternalError",
-      "InterruptedException", "Iterable", "LinkageError", "Long", "Math", "NegativeArraySizeException",
-      "NoClassDefFoundError", "NoSuchFieldError", "NoSuchFieldException", "NoSuchMethodError", "NoSuchMethodException",
-      "NullPointerException", "Number", "NumberFormatException", "Object", "OutOfMemoryError", "Override", "Package",
-      "Process", "ProcessBuilder", "Readable", "ReflectiveOperationException", "Runnable", "Runtime",
-      "RuntimeException", "RuntimePermission", "SafeVarargs", "SecurityException", "SecurityManager", "Short",
-      "StackOverflowError", "StackTraceElement", "StrictMath", "String", "StringBuffer", "StringBuilder",
-      "StringIndexOutOfBoundsException", "SuppressWarnings", "System", "Thread", "ThreadDeath",
-      "ThreadGroup", "ThreadLocal", "Throwable", "TypeNotPresentException",
-      "UnknownError", "UnsatisfiedLinkError", "UnsupportedClassVersionError",
-      "UnsupportedOperationException", "VerifyError", "VirtualMachineError", "Void"],
-  "keywords">:
-    doc ("Keywords and literals are taken from Oracle's Java Tutorials on 2022-05-27; said to be complete for Java 1.8 only\n"
-        <> "See: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html") $
-    list $ string <$> [
-      "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue",
-      "default", "do", "double", "else", "enum", "extends", "final", "finally", "float", "for", "goto", "if",
-      "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "package", "private",
-      "protected", "public", "return", "short", "static", "strictfp", "super", "switch", "synchronized", "this",
-      "throw", "throws", "transient", "try", "void", "volatile", "while"],
-  "literals">:
-    list $ string <$> ["false", "null", "true"]] $
-  Sets.fromList $ Lists.concat $ list [
-    var "specialNames",
-    var "classNames",
-    var "keywords",
-    var "literals"]
diff --git a/src/main/haskell/Hydra/Sources/Java/Manifest.hs b/src/main/haskell/Hydra/Sources/Java/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Manifest.hs
+++ /dev/null
@@ -1,34 +0,0 @@
--- | Package manifest for hydra-java.
---
--- Owns the Java coder DSL sources. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
-
-module Hydra.Sources.Java.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Java.Coder as JavaCoder
-import qualified Hydra.Sources.Java.Environment as JavaEnvironment
-import qualified Hydra.Sources.Java.Language as JavaLanguage
-import qualified Hydra.Sources.Java.Names as JavaNames
-import qualified Hydra.Sources.Java.Serde as JavaSerde
-import qualified Hydra.Sources.Java.Syntax as JavaSyntax
-import qualified Hydra.Sources.Java.Testing as JavaTesting
-import qualified Hydra.Sources.Java.Utils as JavaUtils
-
-mainModules :: [Module]
-mainModules = [
-  JavaCoder.module_,
-  JavaEnvironment.module_,
-  JavaLanguage.module_,
-  JavaNames.module_,
-  JavaSerde.module_,
-  JavaSyntax.module_,
-  JavaTesting.module_,
-  JavaUtils.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Java/Names.hs b/src/main/haskell/Hydra/Sources/Java/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Names.hs
+++ /dev/null
@@ -1,201 +0,0 @@
--- | Java naming constants and package name utilities.
--- Provides string constants for Java method names, field names, and visitor patterns,
--- as well as package name constructors.
-
-module Hydra.Sources.Java.Names where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Java.Syntax as Java
-import qualified Hydra.Sources.Java.Syntax as JavaSyntax
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.java.names"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = (JavaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Java naming constants and package name utilities"}
-  where
-    definitions = [
-      toDefinition acceptMethodName,
-      toDefinition applyMethodName,
-      toDefinition compareToMethodName,
-      toDefinition equalsMethodName,
-      toDefinition getMethodName,
-      toDefinition hashCodeMethodName,
-      toDefinition hydraCorePackageName,
-      toDefinition hydraUtilPackageName,
-      toDefinition instanceName,
-      toDefinition javaLangPackageName,
-      toDefinition javaPackageName,
-      toDefinition javaUtilFunctionPackageName,
-      toDefinition javaUtilPackageName,
-      toDefinition otherInstanceName,
-      toDefinition otherwiseMethodName,
-      toDefinition partialVisitorName,
-      toDefinition setMethodName,
-      toDefinition valueFieldName,
-      toDefinition visitMethodName,
-      toDefinition visitorName,
-      toDefinition visitorReturnParameter]
-
-acceptMethodName :: TTermDefinition String
-acceptMethodName = def "acceptMethodName" $ string "accept"
-
-applyMethodName :: TTermDefinition String
-applyMethodName = def "applyMethodName" $ string "apply"
-
-compareToMethodName :: TTermDefinition String
-compareToMethodName = def "compareToMethodName" $ string "compareTo"
-
-equalsMethodName :: TTermDefinition String
-equalsMethodName = def "equalsMethodName" $ string "equals"
-
-getMethodName :: TTermDefinition String
-getMethodName = def "getMethodName" $ string "get"
-
-hashCodeMethodName :: TTermDefinition String
-hashCodeMethodName = def "hashCodeMethodName" $ string "hashCode"
-
-hydraCorePackageName :: TTermDefinition (Maybe Java.PackageName)
-hydraCorePackageName = def "hydraCorePackageName" $
-  doc "The hydra.core package name" $
-  just (javaPackageName @@ list [string "hydra", string "core"])
-
-hydraUtilPackageName :: TTermDefinition (Maybe Java.PackageName)
-hydraUtilPackageName = def "hydraUtilPackageName" $
-  doc "The hydra.util package name" $
-  just (javaPackageName @@ list [string "hydra", string "util"])
-
-instanceName :: TTermDefinition String
-instanceName = def "instanceName" $ string "instance"
-
-javaLangPackageName :: TTermDefinition (Maybe Java.PackageName)
-javaLangPackageName = def "javaLangPackageName" $
-  doc "The java.lang package name" $
-  just (javaPackageName @@ list [string "java", string "lang"])
-
-javaPackageName :: TTermDefinition ([String] -> Java.PackageName)
-javaPackageName = def "javaPackageName" $
-  doc "Construct a Java package name from a list of string parts" $
-  "parts" ~>
-    wrap Java._PackageName $
-      Lists.map ("p" ~> wrap Java._Identifier (var "p")) (var "parts")
-
-javaUtilFunctionPackageName :: TTermDefinition (Maybe Java.PackageName)
-javaUtilFunctionPackageName = def "javaUtilFunctionPackageName" $
-  doc "The java.util.function package name" $
-  just (javaPackageName @@ list [string "java", string "util", string "function"])
-
-javaUtilPackageName :: TTermDefinition (Maybe Java.PackageName)
-javaUtilPackageName = def "javaUtilPackageName" $
-  doc "The java.util package name" $
-  just (javaPackageName @@ list [string "java", string "util"])
-
-otherInstanceName :: TTermDefinition String
-otherInstanceName = def "otherInstanceName" $ string "other"
-
-otherwiseMethodName :: TTermDefinition String
-otherwiseMethodName = def "otherwiseMethodName" $ string "otherwise"
-
-partialVisitorName :: TTermDefinition String
-partialVisitorName = def "partialVisitorName" $ string "PartialVisitor"
-
-setMethodName :: TTermDefinition String
-setMethodName = def "setMethodName" $ string "set"
-
-valueFieldName :: TTermDefinition String
-valueFieldName = def "valueFieldName" $ string "value"
-
-visitMethodName :: TTermDefinition String
-visitMethodName = def "visitMethodName" $ string "visit"
-
-visitorName :: TTermDefinition String
-visitorName = def "visitorName" $ string "Visitor"
-
-visitorReturnParameter :: TTermDefinition String
-visitorReturnParameter = def "visitorReturnParameter" $ string "R"
diff --git a/src/main/haskell/Hydra/Sources/Java/Serde.hs b/src/main/haskell/Hydra/Sources/Java/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Serde.hs
+++ /dev/null
@@ -1,1783 +0,0 @@
--- | Java serializer: converts Java AST to concrete syntax (source code).
-
-module Hydra.Sources.Java.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as LibLiterals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Java.Syntax as Java
-import qualified Hydra.Sources.Java.Syntax as JavaSyntax
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.java.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Serialization.ns],
-            moduleTypeDependencies = (JavaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Java serializer: converts Java AST to concrete syntax"}
-  where
-    definitions = [
-      toDefinition escapeJavaChar,
-      toDefinition escapeJavaString,
-      toDefinition hexDigit,
-      toDefinition javaFloatLiteralText,
-      toDefinition javaUnicodeEscape,
-      toDefinition padHex4,
-      toDefinition sanitizeJavaComment,
-      toDefinition singleLineComment,
-      toDefinition withComments,
-      toDefinition writeAdditionalBound,
-      toDefinition writeAdditiveExpression,
-      toDefinition writeAmbiguousName,
-      toDefinition writeAndExpression,
-      toDefinition writeAnnotatedIdentifier,
-      toDefinition writeAnnotation,
-      toDefinition writeAnnotationTypeDeclaration,
-      toDefinition writeArrayAccess,
-      toDefinition writeArrayCreationExpression,
-      toDefinition writeArrayInitializer,
-      toDefinition writeArrayType,
-      toDefinition writeAssertStatement,
-      toDefinition writeAssignment,
-      toDefinition writeAssignmentExpression,
-      toDefinition writeBlock,
-      toDefinition writeBlockStatement,
-      toDefinition writeBreakStatement,
-      toDefinition writeCastExpression,
-      toDefinition writeCastExpression_Lambda,
-      toDefinition writeCastExpression_NotPlusMinus,
-      toDefinition writeCastExpression_Primitive,
-      toDefinition writeCastExpression_RefAndBounds,
-      toDefinition writeClassBody,
-      toDefinition writeClassBodyDeclaration,
-      toDefinition writeClassBodyDeclarationWithComments,
-      toDefinition writeClassDeclaration,
-      toDefinition writeClassInstanceCreationExpression,
-      toDefinition writeClassInstanceCreationExpression_Qualifier,
-      toDefinition writeClassLiteral,
-      toDefinition writeClassMemberDeclaration,
-      toDefinition writeClassModifier,
-      toDefinition writeClassOrInterfaceType,
-      toDefinition writeClassOrInterfaceTypeToInstantiate,
-      toDefinition writeClassType,
-      toDefinition writeCompilationUnit,
-      toDefinition writeConditionalAndExpression,
-      toDefinition writeConditionalExpression,
-      toDefinition writeConditionalExpression_TernaryCond,
-      toDefinition writeConditionalExpression_TernaryLambda,
-      toDefinition writeConditionalOrExpression,
-      toDefinition writeConstantDeclaration,
-      toDefinition writeConstantModifier,
-      toDefinition writeConstructorBody,
-      toDefinition writeConstructorDeclaration,
-      toDefinition writeConstructorDeclarator,
-      toDefinition writeConstructorModifier,
-      toDefinition writeContinueStatement,
-      toDefinition writeDims,
-      toDefinition writeDoStatement,
-      toDefinition writeElementValue,
-      toDefinition writeElementValuePair,
-      toDefinition writeEnumDeclaration,
-      toDefinition writeEqualityExpression,
-      toDefinition writeExclusiveOrExpression,
-      toDefinition writeExplicitConstructorInvocation,
-      toDefinition writeExpression,
-      toDefinition writeExpressionName,
-      toDefinition writeExpressionStatement,
-      toDefinition writeFieldAccess,
-      toDefinition writeFieldDeclaration,
-      toDefinition writeFieldModifier,
-      toDefinition writeFloatingPointLiteral,
-      toDefinition writeFloatingPointType,
-      toDefinition writeForStatement,
-      toDefinition writeFormalParameter,
-      toDefinition writeFormalParameter_Simple,
-      toDefinition writeIdentifier,
-      toDefinition writeIfThenElseStatement,
-      toDefinition writeIfThenStatement,
-      toDefinition writeImportDeclaration,
-      toDefinition writeInclusiveOrExpression,
-      toDefinition writeInstanceInitializer,
-      toDefinition writeIntegerLiteral,
-      toDefinition writeIntegralType,
-      toDefinition writeInterfaceBody,
-      toDefinition writeInterfaceDeclaration,
-      toDefinition writeInterfaceMemberDeclaration,
-      toDefinition writeInterfaceMethodDeclaration,
-      toDefinition writeInterfaceMethodModifier,
-      toDefinition writeInterfaceModifier,
-      toDefinition writeInterfaceType,
-      toDefinition writeLabeledStatement,
-      toDefinition writeLambdaBody,
-      toDefinition writeLambdaExpression,
-      toDefinition writeLambdaParameters,
-      toDefinition writeLeftHandSide,
-      toDefinition writeLiteral,
-      toDefinition writeLocalName,
-      toDefinition writeLocalVariableDeclaration,
-      toDefinition writeLocalVariableDeclarationStatement,
-      toDefinition writeMarkerAnnotation,
-      toDefinition writeMethodBody,
-      toDefinition writeMethodDeclaration,
-      toDefinition writeMethodDeclarator,
-      toDefinition writeMethodHeader,
-      toDefinition writeMethodInvocation,
-      toDefinition writeMethodModifier,
-      toDefinition writeMethodName,
-      toDefinition writeMethodReference,
-      toDefinition writeMultiplicativeExpression,
-      toDefinition writeNormalAnnotation,
-      toDefinition writeNormalClassDeclaration,
-      toDefinition writeNormalInterfaceDeclaration,
-      toDefinition writeNumericType,
-      toDefinition writePackageDeclaration,
-      toDefinition writePackageModifier,
-      toDefinition writePackageName,
-      toDefinition writePackageOrTypeName,
-      toDefinition writePostDecrementExpression,
-      toDefinition writePostIncrementExpression,
-      toDefinition writePostfixExpression,
-      toDefinition writePreDecrementExpression,
-      toDefinition writePreIncrementExpression,
-      toDefinition writePrimary,
-      toDefinition writePrimaryNoNewArrayExpressionExpression,
-      toDefinition writePrimitiveType,
-      toDefinition writePrimitiveTypeWithAnnotations,
-      toDefinition writeReceiverParameter,
-      toDefinition writeReferenceType,
-      toDefinition writeRelationalExpression,
-      toDefinition writeRelationalExpression_GreaterThan,
-      toDefinition writeRelationalExpression_GreaterThanEqual,
-      toDefinition writeRelationalExpression_InstanceOf,
-      toDefinition writeRelationalExpression_LessThan,
-      toDefinition writeRelationalExpression_LessThanEqual,
-      toDefinition writeResult,
-      toDefinition writeReturnStatement,
-      toDefinition writeShiftExpression,
-      toDefinition writeSimpleTypeName,
-      toDefinition writeSingleElementAnnotation,
-      toDefinition writeStatement,
-      toDefinition writeStatementExpression,
-      toDefinition writeStatementWithoutTrailingSubstatement,
-      toDefinition writeStaticInitializer,
-      toDefinition writeStringLiteral,
-      toDefinition writeSwitchStatement,
-      toDefinition writeSynchronizedStatement,
-      toDefinition writeThrowStatement,
-      toDefinition writeThrows,
-      toDefinition writeTryStatement,
-      toDefinition writeType,
-      toDefinition writeTypeArgument,
-      toDefinition writeTypeArgumentsOrDiamond,
-      toDefinition writeTypeBound,
-      toDefinition writeTypeDeclaration,
-      toDefinition writeTypeDeclarationWithComments,
-      toDefinition writeTypeIdentifier,
-      toDefinition writeTypeName,
-      toDefinition writeTypeParameter,
-      toDefinition writeTypeParameterModifier,
-      toDefinition writeTypeVariable,
-      toDefinition writeUnannType,
-      toDefinition writeUnaryExpression,
-      toDefinition writeUnaryExpressionNotPlusMinus,
-      toDefinition writeUnqualifiedClassInstanceCreationExpression,
-      toDefinition writeVariableArityParameter,
-      toDefinition writeVariableDeclarator,
-      toDefinition writeVariableDeclaratorId,
-      toDefinition writeVariableInitializer,
-      toDefinition writeVariableModifier,
-      toDefinition writeWhileStatement,
-      toDefinition writeWildcard,
-      toDefinition writeWildcardBounds]
-
--- | Escape a single character (given as its code point) for use in a Java string or char literal.
-escapeJavaChar :: TTermDefinition (Int -> String)
-escapeJavaChar = def "escapeJavaChar" $
-  lambda "c" $
-    Logic.ifElse (Equality.equal (var "c") (int32 34))   -- '"'
-      (string "\\\"")
-      (Logic.ifElse (Equality.equal (var "c") (int32 92))  -- '\\'
-        (string "\\\\")
-        (Logic.ifElse (Equality.equal (var "c") (int32 10))  -- '\n'
-          (string "\\n")
-          (Logic.ifElse (Equality.equal (var "c") (int32 13))  -- '\r'
-            (string "\\r")
-            (Logic.ifElse (Equality.equal (var "c") (int32 9))  -- '\t'
-              (string "\\t")
-              (Logic.ifElse (Equality.equal (var "c") (int32 8))  -- '\b'
-                (string "\\b")
-                (Logic.ifElse (Equality.equal (var "c") (int32 12))  -- '\f'
-                  (string "\\f")
-                  (Logic.ifElse (Logic.and (Equality.gte (var "c") (int32 32))
-                                           (Equality.lt (var "c") (int32 127)))
-                    (Strings.fromList (list [var "c"]))
-                    (javaUnicodeEscape @@ var "c"))))))))
-
--- | Escape a string for use in a Java string literal.
-escapeJavaString :: TTermDefinition (String -> String)
-escapeJavaString = def "escapeJavaString" $
-  lambda "s" $
-    Strings.cat (Lists.map (lambda "c" $ escapeJavaChar @@ var "c") (Strings.toList (var "s")))
-
--- | Convert a value 0-15 to an uppercase hex digit character code.
-hexDigit :: TTermDefinition (Int -> Int)
-hexDigit = def "hexDigit" $
-  lambda "n" $
-    Logic.ifElse (Equality.lt (var "n") (int32 10))
-      (Math.add (var "n") (int32 48))   -- '0' = 48
-      (Math.add (Math.sub (var "n") (int32 10)) (int32 65))  -- 'A' = 65
-
--- | Convert an integer to a 4-digit uppercase hex string (zero-padded).
-padHex4 :: TTermDefinition (Int -> String)
-padHex4 = def "padHex4" $
-  lambda "n" $
-    "d3" <~ Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "n") (int32 4096)) $     -- n / 16^3
-    "r3" <~ Maybes.fromMaybe (int32 0) (Math.maybeMod (var "n") (int32 4096)) $
-    "d2" <~ Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "r3") (int32 256)) $      -- remainder / 16^2
-    "r2" <~ Maybes.fromMaybe (int32 0) (Math.maybeMod (var "r3") (int32 256)) $
-    "d1" <~ Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "r2") (int32 16)) $       -- remainder / 16
-    "d0" <~ Maybes.fromMaybe (int32 0) (Math.maybeMod (var "r2") (int32 16)) $        -- remainder
-    Strings.fromList (list [hexDigit @@ var "d3", hexDigit @@ var "d2",
-                            hexDigit @@ var "d1", hexDigit @@ var "d0"])
-
--- | Convert an integer to a \\uXXXX escape sequence.
--- For supplementary plane characters (> 0xFFFF), produces a UTF-16 surrogate pair.
-javaUnicodeEscape :: TTermDefinition (Int -> String)
-javaUnicodeEscape = def "javaUnicodeEscape" $
-  lambda "n" $
-    Logic.ifElse (Equality.gt (var "n") (int32 65535))
-      -- Supplementary plane: UTF-16 surrogate pair
-      ("n'" <~ Math.sub (var "n") (int32 65536) $
-       "hi" <~ Math.add (int32 55296) (Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "n'") (int32 1024))) $  -- 0xD800
-       "lo" <~ Math.add (int32 56320) (Maybes.fromMaybe (int32 0) (Math.maybeMod (var "n'") (int32 1024))) $  -- 0xDC00
-       Strings.cat2 (Strings.cat2 (string "\\u") (padHex4 @@ var "hi"))
-                     (Strings.cat2 (string "\\u") (padHex4 @@ var "lo")))
-      -- Basic multilingual plane
-      (Strings.cat2 (string "\\u") (padHex4 @@ var "n"))
-
-sanitizeJavaComment :: TTermDefinition (String -> String)
-sanitizeJavaComment = def "sanitizeJavaComment" $
-  doc "Sanitize a string for use in a Java comment" $
-  lambda "s" $
-    Strings.intercalate (string "&gt;")
-      (Strings.splitOn (string ">")
-        (Strings.intercalate (string "&lt;")
-          (Strings.splitOn (string "<") (var "s"))))
-
-singleLineComment :: TTermDefinition (String -> Expr)
-singleLineComment = def "singleLineComment" $
-  doc ("Create a single-line Java comment. Empty text emits `//` (no"
-    <> " trailing space) so blank line comments don't carry trailing whitespace.") $
-  lambda "c" $ lets [
-    "sanitized">: sanitizeJavaComment @@ var "c"] $
-    Serialization.cst @@ Logic.ifElse (Equality.equal (var "sanitized") (string ""))
-      (string "//")
-      (Strings.cat2 (string "// ") (var "sanitized"))
-
-withComments :: TTermDefinition (Maybe String -> Expr -> Expr)
-withComments = def "withComments" $
-  doc ("Wrap an expression with optional Javadoc comments. Blank lines"
-    <> " inside the doc body emit ` *` (no trailing space) instead of ` * `.") $
-  lambda "mc" $ lambda "expr" $
-    Maybes.maybe
-      (var "expr")
-      (lambda "c" $ Serialization.newlineSep @@ list [
-        Serialization.cst @@ (Strings.cat2 (string "/**\n")
-          (Strings.cat2
-            (Strings.intercalate (string "\n")
-              (Lists.map (lambda "l" $ Logic.ifElse (Equality.equal (var "l") (string ""))
-                  (string " *")
-                  (Strings.cat2 (string " * ") (var "l")))
-                (Strings.lines (sanitizeJavaComment @@ var "c"))))
-            (string "\n */"))),
-        var "expr"])
-      (var "mc")
-
-writeIdentifier :: TTermDefinition (Java.Identifier -> Expr)
-writeIdentifier = def "writeIdentifier" $
-  lambda "id" $
-    Serialization.cst @@ (unwrap Java._Identifier @@ var "id")
-
-writeTypeIdentifier :: TTermDefinition (Java.TypeIdentifier -> Expr)
-writeTypeIdentifier = def "writeTypeIdentifier" $
-  lambda "tid" $
-    writeIdentifier @@ (unwrap Java._TypeIdentifier @@ var "tid")
-
-writeSimpleTypeName :: TTermDefinition (Java.SimpleTypeName -> Expr)
-writeSimpleTypeName = def "writeSimpleTypeName" $
-  lambda "stn" $
-    writeTypeIdentifier @@ (unwrap Java._SimpleTypeName @@ var "stn")
-
-writeMethodName :: TTermDefinition (Java.MethodName -> Expr)
-writeMethodName = def "writeMethodName" $
-  lambda "mn" $
-    writeIdentifier @@ (unwrap Java._MethodName @@ var "mn")
-
-writeUnannType :: TTermDefinition (Java.UnannType -> Expr)
-writeUnannType = def "writeUnannType" $
-  lambda "ut" $
-    writeType @@ (unwrap Java._UnannType @@ var "ut")
-
-writeInterfaceType :: TTermDefinition (Java.InterfaceType -> Expr)
-writeInterfaceType = def "writeInterfaceType" $
-  lambda "it" $
-    writeClassType @@ (unwrap Java._InterfaceType @@ var "it")
-
-writePackageModifier :: TTermDefinition (Java.PackageModifier -> Expr)
-writePackageModifier = def "writePackageModifier" $
-  lambda "pm" $
-    writeAnnotation @@ (unwrap Java._PackageModifier @@ var "pm")
-
-writeTypeParameterModifier :: TTermDefinition (Java.TypeParameterModifier -> Expr)
-writeTypeParameterModifier = def "writeTypeParameterModifier" $
-  lambda "tpm" $
-    writeAnnotation @@ (unwrap Java._TypeParameterModifier @@ var "tpm")
-
-
-writeAnnotationTypeDeclaration :: TTermDefinition (Java.AnnotationTypeDeclaration -> Expr)
-writeAnnotationTypeDeclaration = def "writeAnnotationTypeDeclaration" $
-  lambda "_" $ Serialization.cst @@ string "STUB:AnnotationTypeDeclaration"
-
-writeArrayAccess :: TTermDefinition (Java.ArrayAccess -> Expr)
-writeArrayAccess = def "writeArrayAccess" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ArrayAccess"
-
-writeAssertStatement :: TTermDefinition (Java.AssertStatement -> Expr)
-writeAssertStatement = def "writeAssertStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:AssertStatement"
-
-writeCastExpression_Lambda :: TTermDefinition (Java.CastExpression_Lambda -> Expr)
-writeCastExpression_Lambda = def "writeCastExpression_Lambda" $
-  lambda "_" $ Serialization.cst @@ string "STUB:CastExpression_Lambda"
-
-writeClassLiteral :: TTermDefinition (Java.ClassLiteral -> Expr)
-writeClassLiteral = def "writeClassLiteral" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ClassLiteral"
-
-writeConditionalExpression_TernaryCond :: TTermDefinition (Java.ConditionalExpression_TernaryCond -> Expr)
-writeConditionalExpression_TernaryCond = def "writeConditionalExpression_TernaryCond" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ConditionalExpression_TernaryCond"
-
-writeConditionalExpression_TernaryLambda :: TTermDefinition (Java.ConditionalExpression_TernaryLambda -> Expr)
-writeConditionalExpression_TernaryLambda = def "writeConditionalExpression_TernaryLambda" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ConditionalExpression_TernaryLambda"
-
-writeConstantModifier :: TTermDefinition (Java.ConstantModifier -> Expr)
-writeConstantModifier = def "writeConstantModifier" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ConstantModifier"
-
-writeDoStatement :: TTermDefinition (Java.DoStatement -> Expr)
-writeDoStatement = def "writeDoStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:DoStatement"
-
-writeEnumDeclaration :: TTermDefinition (Java.EnumDeclaration -> Expr)
-writeEnumDeclaration = def "writeEnumDeclaration" $
-  lambda "_" $ Serialization.cst @@ string "STUB:EnumDeclaration"
-
-writeExplicitConstructorInvocation :: TTermDefinition (Java.ExplicitConstructorInvocation -> Expr)
-writeExplicitConstructorInvocation = def "writeExplicitConstructorInvocation" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ExplicitConstructorInvocation"
-
-writeForStatement :: TTermDefinition (Java.ForStatement -> Expr)
-writeForStatement = def "writeForStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ForStatement"
-
-writeIfThenElseStatement :: TTermDefinition (Java.IfThenElseStatement -> Expr)
-writeIfThenElseStatement = def "writeIfThenElseStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:IfThenElseStatement"
-
-writeInstanceInitializer :: TTermDefinition (Java.InstanceInitializer -> Expr)
-writeInstanceInitializer = def "writeInstanceInitializer" $
-  lambda "_" $ Serialization.cst @@ string "STUB:InstanceInitializer"
-
-writeLabeledStatement :: TTermDefinition (Java.LabeledStatement -> Expr)
-writeLabeledStatement = def "writeLabeledStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:LabeledStatement"
-
-writeMethodReference :: TTermDefinition (Java.MethodReference -> Expr)
-writeMethodReference = def "writeMethodReference" $
-  lambda "_" $ Serialization.cst @@ string "STUB:MethodReference"
-
-writePostDecrementExpression :: TTermDefinition (Java.PostDecrementExpression -> Expr)
-writePostDecrementExpression = def "writePostDecrementExpression" $
-  lambda "_" $ Serialization.cst @@ string "STUB:PostDecrementExpression"
-
-writePostIncrementExpression :: TTermDefinition (Java.PostIncrementExpression -> Expr)
-writePostIncrementExpression = def "writePostIncrementExpression" $
-  lambda "_" $ Serialization.cst @@ string "STUB:PostIncrementExpression"
-
-writePreDecrementExpression :: TTermDefinition (Java.PreDecrementExpression -> Expr)
-writePreDecrementExpression = def "writePreDecrementExpression" $
-  lambda "_" $ Serialization.cst @@ string "STUB:PreDecrementExpression"
-
-writePreIncrementExpression :: TTermDefinition (Java.PreIncrementExpression -> Expr)
-writePreIncrementExpression = def "writePreIncrementExpression" $
-  lambda "_" $ Serialization.cst @@ string "STUB:PreIncrementExpression"
-
-writeReceiverParameter :: TTermDefinition (Java.ReceiverParameter -> Expr)
-writeReceiverParameter = def "writeReceiverParameter" $
-  lambda "_" $ Serialization.cst @@ string "STUB:ReceiverParameter"
-
-writeStaticInitializer :: TTermDefinition (Java.StaticInitializer -> Expr)
-writeStaticInitializer = def "writeStaticInitializer" $
-  lambda "_" $ Serialization.cst @@ string "STUB:StaticInitializer"
-
-writeSwitchStatement :: TTermDefinition (Java.SwitchStatement -> Expr)
-writeSwitchStatement = def "writeSwitchStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:SwitchStatement"
-
-writeSynchronizedStatement :: TTermDefinition (Java.SynchronizedStatement -> Expr)
-writeSynchronizedStatement = def "writeSynchronizedStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:SynchronizedStatement"
-
-writeThrows :: TTermDefinition (Java.Throws -> Expr)
-writeThrows = def "writeThrows" $
-  lambda "_" $ Serialization.cst @@ string "STUB:Throws"
-
-writeTryStatement :: TTermDefinition (Java.TryStatement -> Expr)
-writeTryStatement = def "writeTryStatement" $
-  lambda "_" $ Serialization.cst @@ string "STUB:TryStatement"
-
-writeVariableArityParameter :: TTermDefinition (Java.VariableArityParameter -> Expr)
-writeVariableArityParameter = def "writeVariableArityParameter" $
-  lambda "_" $ Serialization.cst @@ string "STUB:VariableArityParameter"
-
-writeWhileStatement :: TTermDefinition (Java.WhileStatement -> Expr)
-writeWhileStatement = def "writeWhileStatement" $
-  lambda "ws" $ lets [
-    "mcond">: project Java._WhileStatement Java._WhileStatement_cond @@ var "ws",
-    "body">: project Java._WhileStatement Java._WhileStatement_body @@ var "ws",
-    "condSer">: Maybes.maybe
-      (Serialization.cst @@ string "true")
-      (lambda "c" $ writeExpression @@ var "c")
-      (var "mcond")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "while",
-      Serialization.parenList @@ false @@ list [var "condSer"],
-      Serialization.curlyBlock @@ Serialization.fullBlockStyle @@ (writeStatement @@ var "body")]
-
-
-writeType :: TTermDefinition (Java.Type -> Expr)
-writeType = def "writeType" $
-  lambda "t" $
-    cases Java._Type (var "t") Nothing [
-      Java._Type_primitive>>: lambda "pt" $ writePrimitiveTypeWithAnnotations @@ var "pt",
-      Java._Type_reference>>: lambda "rt" $ writeReferenceType @@ var "rt"]
-
-writeAnnotation :: TTermDefinition (Java.Annotation -> Expr)
-writeAnnotation = def "writeAnnotation" $
-  lambda "ann" $
-    cases Java._Annotation (var "ann") Nothing [
-      Java._Annotation_normal>>: lambda "n" $ writeNormalAnnotation @@ var "n",
-      Java._Annotation_marker>>: lambda "m" $ writeMarkerAnnotation @@ var "m",
-      Java._Annotation_singleElement>>: lambda "s" $ writeSingleElementAnnotation @@ var "s"]
-
-writePrimitiveType :: TTermDefinition (Java.PrimitiveType -> Expr)
-writePrimitiveType = def "writePrimitiveType" $
-  lambda "pt" $
-    cases Java._PrimitiveType (var "pt") Nothing [
-      Java._PrimitiveType_numeric>>: lambda "nt" $ writeNumericType @@ var "nt",
-      Java._PrimitiveType_boolean>>: constant $ Serialization.cst @@ string "boolean"]
-
-writeNumericType :: TTermDefinition (Java.NumericType -> Expr)
-writeNumericType = def "writeNumericType" $
-  lambda "nt" $
-    cases Java._NumericType (var "nt") Nothing [
-      Java._NumericType_integral>>: lambda "it" $ writeIntegralType @@ var "it",
-      Java._NumericType_floatingPoint>>: lambda "ft" $ writeFloatingPointType @@ var "ft"]
-
-writeIntegralType :: TTermDefinition (Java.IntegralType -> Expr)
-writeIntegralType = def "writeIntegralType" $
-  lambda "t" $
-    cases Java._IntegralType (var "t") Nothing [
-      Java._IntegralType_byte>>: constant $ Serialization.cst @@ string "byte",
-      Java._IntegralType_short>>: constant $ Serialization.cst @@ string "short",
-      Java._IntegralType_int>>: constant $ Serialization.cst @@ string "int",
-      Java._IntegralType_long>>: constant $ Serialization.cst @@ string "long",
-      Java._IntegralType_char>>: constant $ Serialization.cst @@ string "char"]
-
-writeFloatingPointType :: TTermDefinition (Java.FloatingPointType -> Expr)
-writeFloatingPointType = def "writeFloatingPointType" $
-  lambda "ft" $
-    cases Java._FloatingPointType (var "ft") Nothing [
-      Java._FloatingPointType_float>>: constant $ Serialization.cst @@ string "float",
-      Java._FloatingPointType_double>>: constant $ Serialization.cst @@ string "double"]
-
-writeReferenceType :: TTermDefinition (Java.ReferenceType -> Expr)
-writeReferenceType = def "writeReferenceType" $
-  lambda "rt" $
-    cases Java._ReferenceType (var "rt") Nothing [
-      Java._ReferenceType_classOrInterface>>: lambda "cit" $ writeClassOrInterfaceType @@ var "cit",
-      Java._ReferenceType_variable>>: lambda "v" $ writeTypeVariable @@ var "v",
-      Java._ReferenceType_array>>: lambda "at" $ writeArrayType @@ var "at"]
-
-writeClassOrInterfaceType :: TTermDefinition (Java.ClassOrInterfaceType -> Expr)
-writeClassOrInterfaceType = def "writeClassOrInterfaceType" $
-  lambda "cit" $
-    cases Java._ClassOrInterfaceType (var "cit") Nothing [
-      Java._ClassOrInterfaceType_class>>: lambda "ct" $ writeClassType @@ var "ct",
-      Java._ClassOrInterfaceType_interface>>: lambda "it" $ writeInterfaceType @@ var "it"]
-
-writeExpression :: TTermDefinition (Java.Expression -> Expr)
-writeExpression = def "writeExpression" $
-  lambda "e" $
-    cases Java._Expression (var "e") Nothing [
-      Java._Expression_lambda>>: lambda "l" $ writeLambdaExpression @@ var "l",
-      Java._Expression_assignment>>: lambda "a" $ writeAssignmentExpression @@ var "a"]
-
-writeAssignmentExpression :: TTermDefinition (Java.AssignmentExpression -> Expr)
-writeAssignmentExpression = def "writeAssignmentExpression" $
-  lambda "e" $
-    cases Java._AssignmentExpression (var "e") Nothing [
-      Java._AssignmentExpression_conditional>>: lambda "c" $ writeConditionalExpression @@ var "c",
-      Java._AssignmentExpression_assignment>>: lambda "a" $ writeAssignment @@ var "a"]
-
-writeConditionalExpression :: TTermDefinition (Java.ConditionalExpression -> Expr)
-writeConditionalExpression = def "writeConditionalExpression" $
-  lambda "c" $
-    cases Java._ConditionalExpression (var "c") Nothing [
-      Java._ConditionalExpression_simple>>: lambda "co" $ writeConditionalOrExpression @@ var "co",
-      Java._ConditionalExpression_ternaryCond>>: lambda "tc" $ writeConditionalExpression_TernaryCond @@ var "tc",
-      Java._ConditionalExpression_ternaryLambda>>: lambda "tl" $ writeConditionalExpression_TernaryLambda @@ var "tl"]
-
-writeResult :: TTermDefinition (Java.Result -> Expr)
-writeResult = def "writeResult" $
-  lambda "r" $
-    cases Java._Result (var "r") Nothing [
-      Java._Result_type>>: lambda "t" $ writeUnannType @@ var "t",
-      Java._Result_void>>: constant $ Serialization.cst @@ string "void"]
-
-writeMethodBody :: TTermDefinition (Java.MethodBody -> Expr)
-writeMethodBody = def "writeMethodBody" $
-  lambda "b" $
-    cases Java._MethodBody (var "b") Nothing [
-      Java._MethodBody_block>>: lambda "block" $ writeBlock @@ var "block",
-      Java._MethodBody_none>>: constant $ Serialization.cst @@ string ";"]
-
-writeClassDeclaration :: TTermDefinition (Java.ClassDeclaration -> Expr)
-writeClassDeclaration = def "writeClassDeclaration" $
-  lambda "d" $
-    cases Java._ClassDeclaration (var "d") Nothing [
-      Java._ClassDeclaration_normal>>: lambda "nd" $ writeNormalClassDeclaration @@ var "nd",
-      Java._ClassDeclaration_enum>>: lambda "ed" $ writeEnumDeclaration @@ var "ed"]
-
-writeInterfaceDeclaration :: TTermDefinition (Java.InterfaceDeclaration -> Expr)
-writeInterfaceDeclaration = def "writeInterfaceDeclaration" $
-  lambda "d" $
-    cases Java._InterfaceDeclaration (var "d") Nothing [
-      Java._InterfaceDeclaration_normalInterface>>: lambda "n" $ writeNormalInterfaceDeclaration @@ var "n",
-      Java._InterfaceDeclaration_annotationType>>: lambda "a" $ writeAnnotationTypeDeclaration @@ var "a"]
-
-writeCastExpression :: TTermDefinition (Java.CastExpression -> Expr)
-writeCastExpression = def "writeCastExpression" $
-  lambda "e" $
-    cases Java._CastExpression (var "e") Nothing [
-      Java._CastExpression_primitive>>: lambda "p" $ writeCastExpression_Primitive @@ var "p",
-      Java._CastExpression_notPlusMinus>>: lambda "npm" $ writeCastExpression_NotPlusMinus @@ var "npm",
-      Java._CastExpression_lambda>>: lambda "l" $ writeCastExpression_Lambda @@ var "l"]
-
-writeFormalParameter :: TTermDefinition (Java.FormalParameter -> Expr)
-writeFormalParameter = def "writeFormalParameter" $
-  lambda "p" $
-    cases Java._FormalParameter (var "p") Nothing [
-      Java._FormalParameter_simple>>: lambda "s" $ writeFormalParameter_Simple @@ var "s",
-      Java._FormalParameter_variableArity>>: lambda "v" $ writeVariableArityParameter @@ var "v"]
-
-writeLocalName :: TTermDefinition (Java.LocalVariableType -> Expr)
-writeLocalName = def "writeLocalName" $
-  lambda "t" $
-    cases Java._LocalVariableType (var "t") Nothing [
-      Java._LocalVariableType_type>>: lambda "ut" $ writeUnannType @@ var "ut",
-      Java._LocalVariableType_var>>: constant $ Serialization.cst @@ string "var"]
-
-writeVariableInitializer :: TTermDefinition (Java.VariableInitializer -> Expr)
-writeVariableInitializer = def "writeVariableInitializer" $
-  lambda "i" $
-    cases Java._VariableInitializer (var "i") Nothing [
-      Java._VariableInitializer_expression>>: lambda "e" $ writeExpression @@ var "e",
-      Java._VariableInitializer_arrayInitializer>>: lambda "ai" $ writeArrayInitializer @@ var "ai"]
-
-writeVariableModifier :: TTermDefinition (Java.VariableModifier -> Expr)
-writeVariableModifier = def "writeVariableModifier" $
-  lambda "m" $
-    cases Java._VariableModifier (var "m") Nothing [
-      Java._VariableModifier_annotation>>: lambda "ann" $ writeAnnotation @@ var "ann",
-      Java._VariableModifier_final>>: constant $ Serialization.cst @@ string "final"]
-
-writeLeftHandSide :: TTermDefinition (Java.LeftHandSide -> Expr)
-writeLeftHandSide = def "writeLeftHandSide" $
-  lambda "lhs" $
-    cases Java._LeftHandSide (var "lhs") Nothing [
-      Java._LeftHandSide_expressionName>>: lambda "en" $ writeExpressionName @@ var "en",
-      Java._LeftHandSide_fieldAccess>>: lambda "fa" $ writeFieldAccess @@ var "fa",
-      Java._LeftHandSide_arrayAccess>>: lambda "aa" $ writeArrayAccess @@ var "aa"]
-
-writeLambdaBody :: TTermDefinition (Java.LambdaBody -> Expr)
-writeLambdaBody = def "writeLambdaBody" $
-  lambda "b" $
-    cases Java._LambdaBody (var "b") Nothing [
-      Java._LambdaBody_expression>>: lambda "e" $ writeExpression @@ var "e",
-      Java._LambdaBody_block>>: lambda "b" $ writeBlock @@ var "b"]
-
-writeLambdaParameters :: TTermDefinition (Java.LambdaParameters -> Expr)
-writeLambdaParameters = def "writeLambdaParameters" $
-  lambda "p" $
-    cases Java._LambdaParameters (var "p") Nothing [
-      Java._LambdaParameters_tuple>>: lambda "l" $ Serialization.parenList @@ false @@ Lists.map writeLambdaParameters (var "l"),
-      Java._LambdaParameters_single>>: lambda "id" $ writeIdentifier @@ var "id"]
-
-writeTypeArgument :: TTermDefinition (Java.TypeArgument -> Expr)
-writeTypeArgument = def "writeTypeArgument" $
-  lambda "a" $
-    cases Java._TypeArgument (var "a") Nothing [
-      Java._TypeArgument_reference>>: lambda "rt" $ writeReferenceType @@ var "rt",
-      Java._TypeArgument_wildcard>>: lambda "w" $ writeWildcard @@ var "w"]
-
-writeTypeDeclaration :: TTermDefinition (Java.TypeDeclaration -> Expr)
-writeTypeDeclaration = def "writeTypeDeclaration" $
-  lambda "d" $
-    cases Java._TypeDeclaration (var "d") Nothing [
-      Java._TypeDeclaration_class>>: lambda "d" $ writeClassDeclaration @@ var "d",
-      Java._TypeDeclaration_interface>>: lambda "d" $ writeInterfaceDeclaration @@ var "d",
-      Java._TypeDeclaration_none>>: constant $ Serialization.cst @@ string ";"]
-
-writePrimary :: TTermDefinition (Java.Primary -> Expr)
-writePrimary = def "writePrimary" $
-  lambda "p" $
-    cases Java._Primary (var "p") Nothing [
-      Java._Primary_noNewArray>>: lambda "n" $ writePrimaryNoNewArrayExpressionExpression @@ var "n",
-      Java._Primary_arrayCreation>>: lambda "a" $ writeArrayCreationExpression @@ var "a"]
-
-writeWildcardBounds :: TTermDefinition (Java.WildcardBounds -> Expr)
-writeWildcardBounds = def "writeWildcardBounds" $
-  lambda "b" $
-    cases Java._WildcardBounds (var "b") Nothing [
-      Java._WildcardBounds_extends>>: lambda "rt" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "extends", writeReferenceType @@ var "rt"],
-      Java._WildcardBounds_super>>: lambda "rt" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "super", writeReferenceType @@ var "rt"]]
-
-writeTypeArgumentsOrDiamond :: TTermDefinition (Java.TypeArgumentsOrDiamond -> Expr)
-writeTypeArgumentsOrDiamond = def "writeTypeArgumentsOrDiamond" $
-  lambda "targs" $
-    cases Java._TypeArgumentsOrDiamond (var "targs") Nothing [
-      Java._TypeArgumentsOrDiamond_arguments>>: lambda "args" $
-        Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeArgument (var "args"),
-      Java._TypeArgumentsOrDiamond_diamond>>: constant $ Serialization.cst @@ string "<>"]
-
-
-writeFloatingPointLiteral :: TTermDefinition (Java.FloatingPointLiteral -> Expr)
-writeFloatingPointLiteral = def "writeFloatingPointLiteral" $
-  lambda "fl" $
-    Serialization.cst @@ (javaFloatLiteralText @@ LibLiterals.showBigfloat (unwrap Java._FloatingPointLiteral @@ var "fl"))
-
--- | Convert a showBigfloat result into valid Java source syntax, mapping
--- NaN and ±Infinity to Double.NaN / Double.POSITIVE_INFINITY / Double.NEGATIVE_INFINITY.
-javaFloatLiteralText :: TTermDefinition (String -> String)
-javaFloatLiteralText = def "javaFloatLiteralText" $
-  lambda "s" $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN")) (string "Double.NaN") $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity")) (string "Double.POSITIVE_INFINITY") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity")) (string "Double.NEGATIVE_INFINITY")
-      (var "s")
-
-writeIntegerLiteral :: TTermDefinition (Java.IntegerLiteral -> Expr)
-writeIntegerLiteral = def "writeIntegerLiteral" $
-  lambda "il" $ lets [
-    "i">: unwrap Java._IntegerLiteral @@ var "il",
-    "suffix">: Logic.ifElse (Logic.or
-        (Equality.gt (var "i") (bigint 2147483647))
-        (Equality.lt (var "i") (bigint (-2147483648))))
-      (string "L")
-      (string "")] $
-    Serialization.cst @@ Strings.cat2 (LibLiterals.showBigint (var "i")) (var "suffix")
-
-writeStringLiteral :: TTermDefinition (Java.StringLiteral -> Expr)
-writeStringLiteral = def "writeStringLiteral" $
-  doc "Serialize a Java string literal with proper Unicode escaping." $
-  lambda "sl" $
-    "s" <~ unwrap Java._StringLiteral @@ var "sl" $
-    Serialization.cst @@ Strings.cat2 (string "\"") (Strings.cat2 (escapeJavaString @@ var "s") (string "\""))
-
-writeLiteral :: TTermDefinition (Java.Literal -> Expr)
-writeLiteral = def "writeLiteral" $
-  lambda "l" $
-    cases Java._Literal (var "l") Nothing [
-      Java._Literal_null>>: constant $ Serialization.cst @@ string "null",
-      Java._Literal_integer>>: lambda "il" $ writeIntegerLiteral @@ var "il",
-      Java._Literal_floatingPoint>>: lambda "fl" $ writeFloatingPointLiteral @@ var "fl",
-      Java._Literal_boolean>>: lambda "b" $ Serialization.cst @@ Logic.ifElse (var "b") (string "true") (string "false"),
-      Java._Literal_character>>: lambda "c" $
-        -- Convert uint16 char to int32 for comparison and string operations
-        "ci" <~ LibLiterals.bigintToInt32 (LibLiterals.uint16ToBigint $ var "c") $
-        -- Escape the character code for a Java char literal
-        Serialization.cst @@ Strings.cat2 (string "'")
-          (Strings.cat2
-            (Logic.ifElse (Equality.equal (var "ci") (int32 39))  -- '\''
-              (string "\\'")
-              (Logic.ifElse (Equality.equal (var "ci") (int32 92))  -- '\\'
-                (string "\\\\")
-                (Logic.ifElse (Equality.equal (var "ci") (int32 10))  -- '\n'
-                  (string "\\n")
-                  (Logic.ifElse (Equality.equal (var "ci") (int32 13))  -- '\r'
-                    (string "\\r")
-                    (Logic.ifElse (Equality.equal (var "ci") (int32 9))  -- '\t'
-                      (string "\\t")
-                      (Logic.ifElse (Logic.and (Equality.gte (var "ci") (int32 32))
-                                               (Equality.lt (var "ci") (int32 127)))
-                        (Strings.fromList (list [var "ci"]))
-                        (javaUnicodeEscape @@ var "ci")))))))
-            (string "'")),
-      Java._Literal_string>>: lambda "sl" $ writeStringLiteral @@ var "sl"]
-
-
-writeAmbiguousName :: TTermDefinition (Java.AmbiguousName -> Expr)
-writeAmbiguousName = def "writeAmbiguousName" $
-  lambda "an" $
-    Serialization.dotSep @@ Lists.map writeIdentifier (unwrap Java._AmbiguousName @@ var "an")
-
-writeExpressionName :: TTermDefinition (Java.ExpressionName -> Expr)
-writeExpressionName = def "writeExpressionName" $
-  lambda "en" $ lets [
-    "mqual">: project Java._ExpressionName Java._ExpressionName_qualifier @@ var "en",
-    "id">: project Java._ExpressionName Java._ExpressionName_identifier @@ var "en"] $
-    Serialization.dotSep @@ Maybes.cat (list [
-      Maybes.map writeAmbiguousName (var "mqual"),
-      just $ writeIdentifier @@ var "id"])
-
-writeTypeName :: TTermDefinition (Java.TypeName -> Expr)
-writeTypeName = def "writeTypeName" $
-  lambda "tn" $ lets [
-    "id">: project Java._TypeName Java._TypeName_identifier @@ var "tn",
-    "mqual">: project Java._TypeName Java._TypeName_qualifier @@ var "tn"] $
-    Serialization.dotSep @@ Maybes.cat (list [
-      Maybes.map writePackageOrTypeName (var "mqual"),
-      just $ writeTypeIdentifier @@ var "id"])
-
-writePackageName :: TTermDefinition (Java.PackageName -> Expr)
-writePackageName = def "writePackageName" $
-  lambda "pn" $
-    Serialization.dotSep @@ Lists.map writeIdentifier (unwrap Java._PackageName @@ var "pn")
-
-writePackageOrTypeName :: TTermDefinition (Java.PackageOrTypeName -> Expr)
-writePackageOrTypeName = def "writePackageOrTypeName" $
-  lambda "potn" $
-    Serialization.dotSep @@ Lists.map writeIdentifier (unwrap Java._PackageOrTypeName @@ var "potn")
-
-writeAnnotatedIdentifier :: TTermDefinition (Java.AnnotatedIdentifier -> Expr)
-writeAnnotatedIdentifier = def "writeAnnotatedIdentifier" $
-  lambda "ai" $
-    writeIdentifier @@ (project Java._AnnotatedIdentifier Java._AnnotatedIdentifier_identifier @@ var "ai")
-
-writeTypeVariable :: TTermDefinition (Java.TypeVariable -> Expr)
-writeTypeVariable = def "writeTypeVariable" $
-  lambda "tv" $ lets [
-    "anns">: project Java._TypeVariable Java._TypeVariable_annotations @@ var "tv",
-    "id">: project Java._TypeVariable Java._TypeVariable_identifier @@ var "tv"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "anns"))
-        nothing
-        (just $ Serialization.spaceSep @@ Lists.map writeAnnotation (var "anns")),
-      just $ writeTypeIdentifier @@ var "id"])
-
-
-writeClassModifier :: TTermDefinition (Java.ClassModifier -> Expr)
-writeClassModifier = def "writeClassModifier" $
-  lambda "m" $
-    cases Java._ClassModifier (var "m") Nothing [
-      Java._ClassModifier_annotation>>: lambda "ann" $ writeAnnotation @@ var "ann",
-      Java._ClassModifier_public>>: constant $ Serialization.cst @@ string "public",
-      Java._ClassModifier_protected>>: constant $ Serialization.cst @@ string "protected",
-      Java._ClassModifier_private>>: constant $ Serialization.cst @@ string "private",
-      Java._ClassModifier_abstract>>: constant $ Serialization.cst @@ string "abstract",
-      Java._ClassModifier_static>>: constant $ Serialization.cst @@ string "static",
-      Java._ClassModifier_final>>: constant $ Serialization.cst @@ string "final",
-      Java._ClassModifier_strictfp>>: constant $ Serialization.cst @@ string "strictfp"]
-
-writeFieldModifier :: TTermDefinition (Java.FieldModifier -> Expr)
-writeFieldModifier = def "writeFieldModifier" $
-  lambda "m" $
-    cases Java._FieldModifier (var "m") Nothing [
-      Java._FieldModifier_annotation>>: lambda "ann" $ writeAnnotation @@ var "ann",
-      Java._FieldModifier_public>>: constant $ Serialization.cst @@ string "public",
-      Java._FieldModifier_protected>>: constant $ Serialization.cst @@ string "protected",
-      Java._FieldModifier_private>>: constant $ Serialization.cst @@ string "private",
-      Java._FieldModifier_static>>: constant $ Serialization.cst @@ string "static",
-      Java._FieldModifier_final>>: constant $ Serialization.cst @@ string "final",
-      Java._FieldModifier_transient>>: constant $ Serialization.cst @@ string "transient",
-      Java._FieldModifier_volatile>>: constant $ Serialization.cst @@ string "volatile"]
-
-writeMethodModifier :: TTermDefinition (Java.MethodModifier -> Expr)
-writeMethodModifier = def "writeMethodModifier" $
-  lambda "m" $
-    cases Java._MethodModifier (var "m") Nothing [
-      Java._MethodModifier_annotation>>: lambda "ann" $ writeAnnotation @@ var "ann",
-      Java._MethodModifier_public>>: constant $ Serialization.cst @@ string "public",
-      Java._MethodModifier_protected>>: constant $ Serialization.cst @@ string "protected",
-      Java._MethodModifier_private>>: constant $ Serialization.cst @@ string "private",
-      Java._MethodModifier_abstract>>: constant $ Serialization.cst @@ string "abstract",
-      Java._MethodModifier_final>>: constant $ Serialization.cst @@ string "final",
-      Java._MethodModifier_synchronized>>: constant $ Serialization.cst @@ string "synchronized",
-      Java._MethodModifier_native>>: constant $ Serialization.cst @@ string "native",
-      Java._MethodModifier_strictfb>>: constant $ Serialization.cst @@ string "strictfb"]
-
-writeConstructorModifier :: TTermDefinition (Java.ConstructorModifier -> Expr)
-writeConstructorModifier = def "writeConstructorModifier" $
-  lambda "m" $
-    cases Java._ConstructorModifier (var "m") Nothing [
-      Java._ConstructorModifier_annotation>>: lambda "ann" $ writeAnnotation @@ var "ann",
-      Java._ConstructorModifier_public>>: constant $ Serialization.cst @@ string "public",
-      Java._ConstructorModifier_protected>>: constant $ Serialization.cst @@ string "protected",
-      Java._ConstructorModifier_private>>: constant $ Serialization.cst @@ string "private"]
-
-writeInterfaceModifier :: TTermDefinition (Java.InterfaceModifier -> Expr)
-writeInterfaceModifier = def "writeInterfaceModifier" $
-  lambda "m" $
-    cases Java._InterfaceModifier (var "m") Nothing [
-      Java._InterfaceModifier_annotation>>: lambda "a" $ writeAnnotation @@ var "a",
-      Java._InterfaceModifier_public>>: constant $ Serialization.cst @@ string "public",
-      Java._InterfaceModifier_protected>>: constant $ Serialization.cst @@ string "protected",
-      Java._InterfaceModifier_private>>: constant $ Serialization.cst @@ string "private",
-      Java._InterfaceModifier_abstract>>: constant $ Serialization.cst @@ string "abstract",
-      Java._InterfaceModifier_static>>: constant $ Serialization.cst @@ string "static",
-      Java._InterfaceModifier_strictfb>>: constant $ Serialization.cst @@ string "strictfb"]
-
-writeInterfaceMethodModifier :: TTermDefinition (Java.InterfaceMethodModifier -> Expr)
-writeInterfaceMethodModifier = def "writeInterfaceMethodModifier" $
-  lambda "m" $
-    cases Java._InterfaceMethodModifier (var "m") Nothing [
-      Java._InterfaceMethodModifier_annotation>>: lambda "a" $ writeAnnotation @@ var "a",
-      Java._InterfaceMethodModifier_public>>: constant $ Serialization.cst @@ string "public",
-      Java._InterfaceMethodModifier_private>>: constant $ Serialization.cst @@ string "private",
-      Java._InterfaceMethodModifier_abstract>>: constant $ Serialization.cst @@ string "abstract",
-      Java._InterfaceMethodModifier_default>>: constant $ Serialization.cst @@ string "default",
-      Java._InterfaceMethodModifier_static>>: constant $ Serialization.cst @@ string "static",
-      Java._InterfaceMethodModifier_strictfp>>: constant $ Serialization.cst @@ string "strictfp"]
-
-
-writeAdditionalBound :: TTermDefinition (Java.AdditionalBound -> Expr)
-writeAdditionalBound = def "writeAdditionalBound" $
-  lambda "ab" $
-    Serialization.spaceSep @@ list [Serialization.cst @@ string "&", writeInterfaceType @@ (unwrap Java._AdditionalBound @@ var "ab")]
-
-writeAdditiveExpression :: TTermDefinition (Java.AdditiveExpression -> Expr)
-writeAdditiveExpression = def "writeAdditiveExpression" $
-  lambda "e" $
-    cases Java._AdditiveExpression (var "e") Nothing [
-      Java._AdditiveExpression_unary>>: lambda "m" $ writeMultiplicativeExpression @@ var "m",
-      Java._AdditiveExpression_plus>>: lambda "b" $
-        Serialization.infixWs @@ string "+" @@
-          (writeAdditiveExpression @@ (project Java._AdditiveExpression_Binary Java._AdditiveExpression_Binary_lhs @@ var "b")) @@
-          (writeMultiplicativeExpression @@ (project Java._AdditiveExpression_Binary Java._AdditiveExpression_Binary_rhs @@ var "b")),
-      Java._AdditiveExpression_minus>>: lambda "b" $
-        Serialization.infixWs @@ string "-" @@
-          (writeAdditiveExpression @@ (project Java._AdditiveExpression_Binary Java._AdditiveExpression_Binary_lhs @@ var "b")) @@
-          (writeMultiplicativeExpression @@ (project Java._AdditiveExpression_Binary Java._AdditiveExpression_Binary_rhs @@ var "b"))]
-
-writeMultiplicativeExpression :: TTermDefinition (Java.MultiplicativeExpression -> Expr)
-writeMultiplicativeExpression = def "writeMultiplicativeExpression" $
-  lambda "e" $
-    cases Java._MultiplicativeExpression (var "e") Nothing [
-      Java._MultiplicativeExpression_unary>>: lambda "u" $ writeUnaryExpression @@ var "u",
-      Java._MultiplicativeExpression_times>>: lambda "b" $
-        Serialization.infixWs @@ string "*" @@
-          (writeMultiplicativeExpression @@ (project Java._MultiplicativeExpression_Binary Java._MultiplicativeExpression_Binary_lhs @@ var "b")) @@
-          (writeUnaryExpression @@ (project Java._MultiplicativeExpression_Binary Java._MultiplicativeExpression_Binary_rhs @@ var "b")),
-      Java._MultiplicativeExpression_divide>>: lambda "b" $
-        Serialization.infixWs @@ string "/" @@
-          (writeMultiplicativeExpression @@ (project Java._MultiplicativeExpression_Binary Java._MultiplicativeExpression_Binary_lhs @@ var "b")) @@
-          (writeUnaryExpression @@ (project Java._MultiplicativeExpression_Binary Java._MultiplicativeExpression_Binary_rhs @@ var "b")),
-      Java._MultiplicativeExpression_mod>>: lambda "b" $
-        Serialization.infixWs @@ string "%" @@
-          (writeMultiplicativeExpression @@ (project Java._MultiplicativeExpression_Binary Java._MultiplicativeExpression_Binary_lhs @@ var "b")) @@
-          (writeUnaryExpression @@ (project Java._MultiplicativeExpression_Binary Java._MultiplicativeExpression_Binary_rhs @@ var "b"))]
-
-writeUnaryExpression :: TTermDefinition (Java.UnaryExpression -> Expr)
-writeUnaryExpression = def "writeUnaryExpression" $
-  lambda "e" $
-    cases Java._UnaryExpression (var "e") Nothing [
-      Java._UnaryExpression_preIncrement>>: lambda "pi" $ writePreIncrementExpression @@ var "pi",
-      Java._UnaryExpression_preDecrement>>: lambda "pd" $ writePreDecrementExpression @@ var "pd",
-      Java._UnaryExpression_plus>>: lambda "p" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "+", writeUnaryExpression @@ var "p"],
-      Java._UnaryExpression_minus>>: lambda "m" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "-", writeUnaryExpression @@ var "m"],
-      Java._UnaryExpression_other>>: lambda "o" $ writeUnaryExpressionNotPlusMinus @@ var "o"]
-
-writeUnaryExpressionNotPlusMinus :: TTermDefinition (Java.UnaryExpressionNotPlusMinus -> Expr)
-writeUnaryExpressionNotPlusMinus = def "writeUnaryExpressionNotPlusMinus" $
-  lambda "e" $
-    cases Java._UnaryExpressionNotPlusMinus (var "e") Nothing [
-      Java._UnaryExpressionNotPlusMinus_postfix>>: lambda "p" $ writePostfixExpression @@ var "p",
-      Java._UnaryExpressionNotPlusMinus_tilde>>: lambda "u" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "~", writeUnaryExpression @@ var "u"],
-      Java._UnaryExpressionNotPlusMinus_not>>: lambda "u" $ Serialization.noSep @@ list [Serialization.cst @@ string "!", writeUnaryExpression @@ var "u"],
-      Java._UnaryExpressionNotPlusMinus_cast>>: lambda "c" $ writeCastExpression @@ var "c"]
-
-writePostfixExpression :: TTermDefinition (Java.PostfixExpression -> Expr)
-writePostfixExpression = def "writePostfixExpression" $
-  lambda "e" $
-    cases Java._PostfixExpression (var "e") Nothing [
-      Java._PostfixExpression_primary>>: lambda "p" $ writePrimary @@ var "p",
-      Java._PostfixExpression_name>>: lambda "en" $ writeExpressionName @@ var "en",
-      Java._PostfixExpression_postIncrement>>: lambda "pi" $ writePostIncrementExpression @@ var "pi",
-      Java._PostfixExpression_postDecrement>>: lambda "pd" $ writePostDecrementExpression @@ var "pd"]
-
-writeAndExpression :: TTermDefinition (Java.AndExpression -> Expr)
-writeAndExpression = def "writeAndExpression" $
-  lambda "ae" $
-    Serialization.infixWsList @@ string "&" @@ Lists.map writeEqualityExpression (unwrap Java._AndExpression @@ var "ae")
-
-writeExclusiveOrExpression :: TTermDefinition (Java.ExclusiveOrExpression -> Expr)
-writeExclusiveOrExpression = def "writeExclusiveOrExpression" $
-  lambda "eoe" $
-    Serialization.infixWsList @@ string "^" @@ Lists.map writeAndExpression (unwrap Java._ExclusiveOrExpression @@ var "eoe")
-
-writeInclusiveOrExpression :: TTermDefinition (Java.InclusiveOrExpression -> Expr)
-writeInclusiveOrExpression = def "writeInclusiveOrExpression" $
-  lambda "ioe" $
-    Serialization.infixWsList @@ string "|" @@ Lists.map writeExclusiveOrExpression (unwrap Java._InclusiveOrExpression @@ var "ioe")
-
-writeConditionalAndExpression :: TTermDefinition (Java.ConditionalAndExpression -> Expr)
-writeConditionalAndExpression = def "writeConditionalAndExpression" $
-  lambda "cae" $
-    Serialization.infixWsList @@ string "&&" @@ Lists.map writeInclusiveOrExpression (unwrap Java._ConditionalAndExpression @@ var "cae")
-
-writeConditionalOrExpression :: TTermDefinition (Java.ConditionalOrExpression -> Expr)
-writeConditionalOrExpression = def "writeConditionalOrExpression" $
-  lambda "coe" $
-    Serialization.infixWsList @@ string "||" @@ Lists.map writeConditionalAndExpression (unwrap Java._ConditionalOrExpression @@ var "coe")
-
-writeEqualityExpression :: TTermDefinition (Java.EqualityExpression -> Expr)
-writeEqualityExpression = def "writeEqualityExpression" $
-  lambda "e" $
-    cases Java._EqualityExpression (var "e") Nothing [
-      Java._EqualityExpression_unary>>: lambda "r" $ writeRelationalExpression @@ var "r",
-      Java._EqualityExpression_equal>>: lambda "b" $
-        Serialization.infixWs @@ string "==" @@
-          (writeEqualityExpression @@ (project Java._EqualityExpression_Binary Java._EqualityExpression_Binary_lhs @@ var "b")) @@
-          (writeRelationalExpression @@ (project Java._EqualityExpression_Binary Java._EqualityExpression_Binary_rhs @@ var "b")),
-      Java._EqualityExpression_notEqual>>: lambda "b" $
-        Serialization.infixWs @@ string "!=" @@
-          (writeEqualityExpression @@ (project Java._EqualityExpression_Binary Java._EqualityExpression_Binary_lhs @@ var "b")) @@
-          (writeRelationalExpression @@ (project Java._EqualityExpression_Binary Java._EqualityExpression_Binary_rhs @@ var "b"))]
-
-writeRelationalExpression :: TTermDefinition (Java.RelationalExpression -> Expr)
-writeRelationalExpression = def "writeRelationalExpression" $
-  lambda "e" $
-    cases Java._RelationalExpression (var "e") Nothing [
-      Java._RelationalExpression_simple>>: lambda "s" $ writeShiftExpression @@ var "s",
-      Java._RelationalExpression_lessThan>>: lambda "lt" $ writeRelationalExpression_LessThan @@ var "lt",
-      Java._RelationalExpression_greaterThan>>: lambda "gt" $ writeRelationalExpression_GreaterThan @@ var "gt",
-      Java._RelationalExpression_lessThanEqual>>: lambda "lte" $ writeRelationalExpression_LessThanEqual @@ var "lte",
-      Java._RelationalExpression_greaterThanEqual>>: lambda "gte" $ writeRelationalExpression_GreaterThanEqual @@ var "gte",
-      Java._RelationalExpression_instanceof>>: lambda "i" $ writeRelationalExpression_InstanceOf @@ var "i"]
-
-writeRelationalExpression_LessThan :: TTermDefinition (Java.RelationalExpression_LessThan -> Expr)
-writeRelationalExpression_LessThan = def "writeRelationalExpression_LessThan" $
-  lambda "lt" $
-    Serialization.infixWs @@ string "<" @@
-      (writeRelationalExpression @@ (project Java._RelationalExpression_LessThan Java._RelationalExpression_LessThan_lhs @@ var "lt")) @@
-      (writeShiftExpression @@ (project Java._RelationalExpression_LessThan Java._RelationalExpression_LessThan_rhs @@ var "lt"))
-
-writeRelationalExpression_GreaterThan :: TTermDefinition (Java.RelationalExpression_GreaterThan -> Expr)
-writeRelationalExpression_GreaterThan = def "writeRelationalExpression_GreaterThan" $
-  lambda "gt" $
-    Serialization.infixWs @@ string ">" @@
-      (writeRelationalExpression @@ (project Java._RelationalExpression_GreaterThan Java._RelationalExpression_GreaterThan_lhs @@ var "gt")) @@
-      (writeShiftExpression @@ (project Java._RelationalExpression_GreaterThan Java._RelationalExpression_GreaterThan_rhs @@ var "gt"))
-
-writeRelationalExpression_LessThanEqual :: TTermDefinition (Java.RelationalExpression_LessThanEqual -> Expr)
-writeRelationalExpression_LessThanEqual = def "writeRelationalExpression_LessThanEqual" $
-  lambda "lte" $
-    Serialization.infixWs @@ string "<=" @@
-      (writeRelationalExpression @@ (project Java._RelationalExpression_LessThanEqual Java._RelationalExpression_LessThanEqual_lhs @@ var "lte")) @@
-      (writeShiftExpression @@ (project Java._RelationalExpression_LessThanEqual Java._RelationalExpression_LessThanEqual_rhs @@ var "lte"))
-
-writeRelationalExpression_GreaterThanEqual :: TTermDefinition (Java.RelationalExpression_GreaterThanEqual -> Expr)
-writeRelationalExpression_GreaterThanEqual = def "writeRelationalExpression_GreaterThanEqual" $
-  lambda "gte" $
-    Serialization.infixWs @@ string ">=" @@
-      (writeRelationalExpression @@ (project Java._RelationalExpression_GreaterThanEqual Java._RelationalExpression_GreaterThanEqual_lhs @@ var "gte")) @@
-      (writeShiftExpression @@ (project Java._RelationalExpression_GreaterThanEqual Java._RelationalExpression_GreaterThanEqual_rhs @@ var "gte"))
-
-writeRelationalExpression_InstanceOf :: TTermDefinition (Java.RelationalExpression_InstanceOf -> Expr)
-writeRelationalExpression_InstanceOf = def "writeRelationalExpression_InstanceOf" $
-  lambda "io" $
-    Serialization.infixWs @@ string "instanceof" @@
-      (writeRelationalExpression @@ (project Java._RelationalExpression_InstanceOf Java._RelationalExpression_InstanceOf_lhs @@ var "io")) @@
-      (writeReferenceType @@ (project Java._RelationalExpression_InstanceOf Java._RelationalExpression_InstanceOf_rhs @@ var "io"))
-
-writeShiftExpression :: TTermDefinition (Java.ShiftExpression -> Expr)
-writeShiftExpression = def "writeShiftExpression" $
-  lambda "e" $
-    cases Java._ShiftExpression (var "e") Nothing [
-      Java._ShiftExpression_unary>>: lambda "a" $ writeAdditiveExpression @@ var "a",
-      Java._ShiftExpression_shiftLeft>>: lambda "b" $
-        Serialization.infixWs @@ string "<<" @@
-          (writeShiftExpression @@ (project Java._ShiftExpression_Binary Java._ShiftExpression_Binary_lhs @@ var "b")) @@
-          (writeAdditiveExpression @@ (project Java._ShiftExpression_Binary Java._ShiftExpression_Binary_rhs @@ var "b")),
-      Java._ShiftExpression_shiftRight>>: lambda "b" $
-        Serialization.infixWs @@ string ">>" @@
-          (writeShiftExpression @@ (project Java._ShiftExpression_Binary Java._ShiftExpression_Binary_lhs @@ var "b")) @@
-          (writeAdditiveExpression @@ (project Java._ShiftExpression_Binary Java._ShiftExpression_Binary_rhs @@ var "b")),
-      Java._ShiftExpression_shiftRightZeroFill>>: lambda "b" $
-        Serialization.infixWs @@ string ">>>" @@
-          (writeShiftExpression @@ (project Java._ShiftExpression_Binary Java._ShiftExpression_Binary_lhs @@ var "b")) @@
-          (writeAdditiveExpression @@ (project Java._ShiftExpression_Binary Java._ShiftExpression_Binary_rhs @@ var "b"))]
-
-writeLambdaExpression :: TTermDefinition (Java.LambdaExpression -> Expr)
-writeLambdaExpression = def "writeLambdaExpression" $
-  lambda "le" $ lets [
-    "params">: project Java._LambdaExpression Java._LambdaExpression_parameters @@ var "le",
-    "body">: project Java._LambdaExpression Java._LambdaExpression_body @@ var "le"] $
-    Serialization.infixWs @@ string "->" @@ (writeLambdaParameters @@ var "params") @@ (writeLambdaBody @@ var "body")
-
-writeAssignment :: TTermDefinition (Java.Assignment -> Expr)
-writeAssignment = def "writeAssignment" $
-  lambda "a" $ lets [
-    "lhs">: project Java._Assignment Java._Assignment_lhs @@ var "a",
-    "op">: project Java._Assignment Java._Assignment_op @@ var "a",
-    "rhs">: project Java._Assignment Java._Assignment_expression @@ var "a",
-    "ctop">: cases Java._AssignmentOperator (var "op") Nothing [
-      Java._AssignmentOperator_simple>>: constant $ string "=",
-      Java._AssignmentOperator_times>>: constant $ string "*=",
-      Java._AssignmentOperator_div>>: constant $ string "/=",
-      Java._AssignmentOperator_mod>>: constant $ string "%=",
-      Java._AssignmentOperator_plus>>: constant $ string "+=",
-      Java._AssignmentOperator_minus>>: constant $ string "-=",
-      Java._AssignmentOperator_shiftLeft>>: constant $ string "<<=",
-      Java._AssignmentOperator_shiftRight>>: constant $ string ">>=",
-      Java._AssignmentOperator_shiftRightZeroFill>>: constant $ string ">>>=",
-      Java._AssignmentOperator_and>>: constant $ string "&=",
-      Java._AssignmentOperator_xor>>: constant $ string "^=",
-      Java._AssignmentOperator_or>>: constant $ string "|="]] $
-    Serialization.infixWs @@ var "ctop" @@ (writeLeftHandSide @@ var "lhs") @@ (writeExpression @@ var "rhs")
-
-
-writeStatement :: TTermDefinition (Java.Statement -> Expr)
-writeStatement = def "writeStatement" $
-  lambda "s" $
-    cases Java._Statement (var "s") Nothing [
-      Java._Statement_withoutTrailing>>: lambda "s" $ writeStatementWithoutTrailingSubstatement @@ var "s",
-      Java._Statement_labeled>>: lambda "l" $ writeLabeledStatement @@ var "l",
-      Java._Statement_ifThen>>: lambda "it" $ writeIfThenStatement @@ var "it",
-      Java._Statement_ifThenElse>>: lambda "ite" $ writeIfThenElseStatement @@ var "ite",
-      Java._Statement_while>>: lambda "w" $ writeWhileStatement @@ var "w",
-      Java._Statement_for>>: lambda "f" $ writeForStatement @@ var "f"]
-
-writeStatementWithoutTrailingSubstatement :: TTermDefinition (Java.StatementWithoutTrailingSubstatement -> Expr)
-writeStatementWithoutTrailingSubstatement = def "writeStatementWithoutTrailingSubstatement" $
-  lambda "s" $
-    cases Java._StatementWithoutTrailingSubstatement (var "s") Nothing [
-      Java._StatementWithoutTrailingSubstatement_block>>: lambda "b" $ writeBlock @@ var "b",
-      Java._StatementWithoutTrailingSubstatement_empty>>: constant $ Serialization.cst @@ string ";",
-      Java._StatementWithoutTrailingSubstatement_expression>>: lambda "e" $ writeExpressionStatement @@ var "e",
-      Java._StatementWithoutTrailingSubstatement_assert>>: lambda "a" $ writeAssertStatement @@ var "a",
-      Java._StatementWithoutTrailingSubstatement_switch>>: lambda "s" $ writeSwitchStatement @@ var "s",
-      Java._StatementWithoutTrailingSubstatement_do>>: lambda "d" $ writeDoStatement @@ var "d",
-      Java._StatementWithoutTrailingSubstatement_break>>: lambda "b" $ writeBreakStatement @@ var "b",
-      Java._StatementWithoutTrailingSubstatement_continue>>: lambda "c" $ writeContinueStatement @@ var "c",
-      Java._StatementWithoutTrailingSubstatement_return>>: lambda "r" $ writeReturnStatement @@ var "r",
-      Java._StatementWithoutTrailingSubstatement_synchronized>>: lambda "s" $ writeSynchronizedStatement @@ var "s",
-      Java._StatementWithoutTrailingSubstatement_throw>>: lambda "t" $ writeThrowStatement @@ var "t",
-      Java._StatementWithoutTrailingSubstatement_try>>: lambda "t" $ writeTryStatement @@ var "t"]
-
-writeStatementExpression :: TTermDefinition (Java.StatementExpression -> Expr)
-writeStatementExpression = def "writeStatementExpression" $
-  lambda "e" $
-    cases Java._StatementExpression (var "e") Nothing [
-      Java._StatementExpression_assignment>>: lambda "a" $ writeAssignment @@ var "a",
-      Java._StatementExpression_preIncrement>>: lambda "pi" $ writePreIncrementExpression @@ var "pi",
-      Java._StatementExpression_preDecrement>>: lambda "pd" $ writePreDecrementExpression @@ var "pd",
-      Java._StatementExpression_postIncrement>>: lambda "pi" $ writePostIncrementExpression @@ var "pi",
-      Java._StatementExpression_postDecrement>>: lambda "pd" $ writePostDecrementExpression @@ var "pd",
-      Java._StatementExpression_methodInvocation>>: lambda "m" $ writeMethodInvocation @@ var "m",
-      Java._StatementExpression_classInstanceCreation>>: lambda "cic" $ writeClassInstanceCreationExpression @@ var "cic"]
-
-writeExpressionStatement :: TTermDefinition (Java.ExpressionStatement -> Expr)
-writeExpressionStatement = def "writeExpressionStatement" $
-  lambda "es" $
-    Serialization.withSemi @@ (writeStatementExpression @@ (unwrap Java._ExpressionStatement @@ var "es"))
-
-writeBlock :: TTermDefinition (Java.Block -> Expr)
-writeBlock = def "writeBlock" $
-  lambda "b" $
-    Serialization.curlyBlock @@ Serialization.fullBlockStyle @@ (Serialization.newlineSep @@ Lists.map writeBlockStatement (unwrap Java._Block @@ var "b"))
-
-writeBlockStatement :: TTermDefinition (Java.BlockStatement -> Expr)
-writeBlockStatement = def "writeBlockStatement" $
-  lambda "s" $
-    cases Java._BlockStatement (var "s") Nothing [
-      Java._BlockStatement_localVariableDeclaration>>: lambda "d" $ writeLocalVariableDeclarationStatement @@ var "d",
-      Java._BlockStatement_class>>: lambda "cd" $ writeClassDeclaration @@ var "cd",
-      Java._BlockStatement_statement>>: lambda "s" $ writeStatement @@ var "s"]
-
-writeLocalVariableDeclarationStatement :: TTermDefinition (Java.LocalVariableDeclarationStatement -> Expr)
-writeLocalVariableDeclarationStatement = def "writeLocalVariableDeclarationStatement" $
-  lambda "lvds" $
-    Serialization.withSemi @@ (writeLocalVariableDeclaration @@ (unwrap Java._LocalVariableDeclarationStatement @@ var "lvds"))
-
-writeLocalVariableDeclaration :: TTermDefinition (Java.LocalVariableDeclaration -> Expr)
-writeLocalVariableDeclaration = def "writeLocalVariableDeclaration" $
-  lambda "lvd" $ lets [
-    "mods">: project Java._LocalVariableDeclaration Java._LocalVariableDeclaration_modifiers @@ var "lvd",
-    "t">: project Java._LocalVariableDeclaration Java._LocalVariableDeclaration_type @@ var "lvd",
-    "decls">: project Java._LocalVariableDeclaration Java._LocalVariableDeclaration_declarators @@ var "lvd"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeVariableModifier (var "mods")),
-      just $ writeLocalName @@ var "t",
-      just $ Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeVariableDeclarator (var "decls")])
-
-writeReturnStatement :: TTermDefinition (Java.ReturnStatement -> Expr)
-writeReturnStatement = def "writeReturnStatement" $
-  lambda "rs" $ lets [
-    "mex">: unwrap Java._ReturnStatement @@ var "rs"] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "return",
-      Maybes.map writeExpression (var "mex")]))
-
-writeThrowStatement :: TTermDefinition (Java.ThrowStatement -> Expr)
-writeThrowStatement = def "writeThrowStatement" $
-  lambda "ts" $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "throw",
-      writeExpression @@ (unwrap Java._ThrowStatement @@ var "ts")])
-
-writeBreakStatement :: TTermDefinition (Java.BreakStatement -> Expr)
-writeBreakStatement = def "writeBreakStatement" $
-  lambda "bs" $ lets [
-    "mlabel">: unwrap Java._BreakStatement @@ var "bs"] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "break",
-      Maybes.map writeIdentifier (var "mlabel")]))
-
-writeContinueStatement :: TTermDefinition (Java.ContinueStatement -> Expr)
-writeContinueStatement = def "writeContinueStatement" $
-  lambda "cs" $ lets [
-    "mlabel">: unwrap Java._ContinueStatement @@ var "cs"] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "continue",
-      Maybes.map writeIdentifier (var "mlabel")]))
-
-writeIfThenStatement :: TTermDefinition (Java.IfThenStatement -> Expr)
-writeIfThenStatement = def "writeIfThenStatement" $
-  lambda "its" $ lets [
-    "cond">: project Java._IfThenStatement Java._IfThenStatement_expression @@ var "its",
-    "thn">: project Java._IfThenStatement Java._IfThenStatement_statement @@ var "its"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "if",
-      Serialization.parenList @@ false @@ list [writeExpression @@ var "cond"],
-      Serialization.curlyBlock @@ Serialization.fullBlockStyle @@ (writeStatement @@ var "thn")]
-
-
-writePrimaryNoNewArrayExpressionExpression :: TTermDefinition (Java.PrimaryNoNewArrayExpression -> Expr)
-writePrimaryNoNewArrayExpressionExpression = def "writePrimaryNoNewArrayExpressionExpression" $
-  lambda "p" $
-    cases Java._PrimaryNoNewArrayExpression (var "p") Nothing [
-      Java._PrimaryNoNewArrayExpression_literal>>: lambda "l" $ writeLiteral @@ var "l",
-      Java._PrimaryNoNewArrayExpression_classLiteral>>: lambda "cl" $ writeClassLiteral @@ var "cl",
-      Java._PrimaryNoNewArrayExpression_this>>: constant $ Serialization.cst @@ string "this",
-      Java._PrimaryNoNewArrayExpression_dotThis>>: lambda "n" $ Serialization.dotSep @@ list [writeTypeName @@ var "n", Serialization.cst @@ string "this"],
-      Java._PrimaryNoNewArrayExpression_parens>>: lambda "e" $ Serialization.parenList @@ false @@ list [writeExpression @@ var "e"],
-      Java._PrimaryNoNewArrayExpression_classInstance>>: lambda "ci" $ writeClassInstanceCreationExpression @@ var "ci",
-      Java._PrimaryNoNewArrayExpression_fieldAccess>>: lambda "fa" $ writeFieldAccess @@ var "fa",
-      Java._PrimaryNoNewArrayExpression_arrayAccess>>: lambda "aa" $ writeArrayAccess @@ var "aa",
-      Java._PrimaryNoNewArrayExpression_methodInvocation>>: lambda "mi" $ writeMethodInvocation @@ var "mi",
-      Java._PrimaryNoNewArrayExpression_methodReference>>: lambda "mr" $ writeMethodReference @@ var "mr"]
-
-writeFieldAccess :: TTermDefinition (Java.FieldAccess -> Expr)
-writeFieldAccess = def "writeFieldAccess" $
-  lambda "fa" $ lets [
-    "qual">: project Java._FieldAccess Java._FieldAccess_qualifier @@ var "fa",
-    "id">: project Java._FieldAccess Java._FieldAccess_identifier @@ var "fa"] $
-    cases Java._FieldAccess_Qualifier (var "qual") Nothing [
-      Java._FieldAccess_Qualifier_primary>>: lambda "p" $ Serialization.dotSep @@ list [writePrimary @@ var "p", writeIdentifier @@ var "id"],
-      Java._FieldAccess_Qualifier_super>>: constant $ Serialization.dotSep @@ list [Serialization.cst @@ string "super", writeIdentifier @@ var "id"],
-      Java._FieldAccess_Qualifier_typed>>: lambda "tn" $ Serialization.dotSep @@ list [writeTypeName @@ var "tn", Serialization.cst @@ string "super", writeIdentifier @@ var "id"]]
-
-
-writeMarkerAnnotation :: TTermDefinition (Java.MarkerAnnotation -> Expr)
-writeMarkerAnnotation = def "writeMarkerAnnotation" $
-  lambda "ma" $
-    Serialization.prefix @@ string "@" @@ (writeTypeName @@ (unwrap Java._MarkerAnnotation @@ var "ma"))
-
-writeNormalAnnotation :: TTermDefinition (Java.NormalAnnotation -> Expr)
-writeNormalAnnotation = def "writeNormalAnnotation" $
-  lambda "na" $ lets [
-    "tname">: project Java._NormalAnnotation Java._NormalAnnotation_typeName @@ var "na",
-    "pairs">: project Java._NormalAnnotation Java._NormalAnnotation_pairs @@ var "na"] $
-    Serialization.prefix @@ string "@" @@ (Serialization.noSep @@ list [
-      writeTypeName @@ var "tname",
-      Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeElementValuePair (var "pairs")])
-
-writeSingleElementAnnotation :: TTermDefinition (Java.SingleElementAnnotation -> Expr)
-writeSingleElementAnnotation = def "writeSingleElementAnnotation" $
-  lambda "sea" $ lets [
-    "tname">: project Java._SingleElementAnnotation Java._SingleElementAnnotation_name @@ var "sea",
-    "mv">: project Java._SingleElementAnnotation Java._SingleElementAnnotation_value @@ var "sea"] $
-    Maybes.maybe
-      (writeMarkerAnnotation @@ (wrap Java._MarkerAnnotation (var "tname")))
-      (lambda "v" $ Serialization.prefix @@ string "@" @@ (Serialization.noSep @@ list [
-        writeTypeName @@ var "tname",
-        Serialization.parenList @@ false @@ list [writeElementValue @@ var "v"]]))
-      (var "mv")
-
-writeElementValue :: TTermDefinition (Java.ElementValue -> Expr)
-writeElementValue = def "writeElementValue" $
-  lambda "ev" $
-    cases Java._ElementValue (var "ev") Nothing [
-      Java._ElementValue_conditionalExpression>>: lambda "c" $ writeConditionalExpression @@ var "c",
-      Java._ElementValue_elementValueArrayInitializer>>: lambda "evai" $
-        Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeElementValue (unwrap Java._ElementValueArrayInitializer @@ var "evai"),
-      Java._ElementValue_annotation>>: lambda "ann" $ writeAnnotation @@ var "ann"]
-
-writeElementValuePair :: TTermDefinition (Java.ElementValuePair -> Expr)
-writeElementValuePair = def "writeElementValuePair" $
-  lambda "evp" $ lets [
-    "k">: project Java._ElementValuePair Java._ElementValuePair_key @@ var "evp",
-    "v">: project Java._ElementValuePair Java._ElementValuePair_value @@ var "evp"] $
-    Serialization.infixWs @@ string "=" @@ (writeIdentifier @@ var "k") @@ (writeElementValue @@ var "v")
-
-
-writePrimitiveTypeWithAnnotations :: TTermDefinition (Java.PrimitiveTypeWithAnnotations -> Expr)
-writePrimitiveTypeWithAnnotations = def "writePrimitiveTypeWithAnnotations" $
-  lambda "ptwa" $ lets [
-    "pt">: project Java._PrimitiveTypeWithAnnotations Java._PrimitiveTypeWithAnnotations_type @@ var "ptwa",
-    "anns">: project Java._PrimitiveTypeWithAnnotations Java._PrimitiveTypeWithAnnotations_annotations @@ var "ptwa"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "anns")) nothing (just $ Serialization.spaceSep @@ Lists.map writeAnnotation (var "anns")),
-      just $ writePrimitiveType @@ var "pt"])
-
-writeClassType :: TTermDefinition (Java.ClassType -> Expr)
-writeClassType = def "writeClassType" $
-  lambda "ct" $ lets [
-    "anns">: project Java._ClassType Java._ClassType_annotations @@ var "ct",
-    "qual">: project Java._ClassType Java._ClassType_qualifier @@ var "ct",
-    "id">: project Java._ClassType Java._ClassType_identifier @@ var "ct",
-    "args">: project Java._ClassType Java._ClassType_arguments @@ var "ct",
-    "qualifiedId">: cases Java._ClassTypeQualifier (var "qual") Nothing [
-      Java._ClassTypeQualifier_none>>: constant $ writeTypeIdentifier @@ var "id",
-      Java._ClassTypeQualifier_package>>: lambda "pkg" $ Serialization.dotSep @@ list [writePackageName @@ var "pkg", writeTypeIdentifier @@ var "id"],
-      Java._ClassTypeQualifier_parent>>: lambda "cit" $ Serialization.dotSep @@ list [writeClassOrInterfaceType @@ var "cit", writeTypeIdentifier @@ var "id"]]] $
-    Serialization.noSep @@ Maybes.cat (list [
-      just $ Serialization.spaceSep @@ Maybes.cat (list [
-        Logic.ifElse (Lists.null (var "anns")) nothing (just $ Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeAnnotation (var "anns")),
-        just $ var "qualifiedId"]),
-      Logic.ifElse (Lists.null (var "args")) nothing (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeArgument (var "args"))])
-
-writeArrayType :: TTermDefinition (Java.ArrayType -> Expr)
-writeArrayType = def "writeArrayType" $
-  lambda "at" $ lets [
-    "dims">: project Java._ArrayType Java._ArrayType_dims @@ var "at",
-    "variant">: project Java._ArrayType Java._ArrayType_variant @@ var "at",
-    "varExpr">: cases Java._ArrayType_Variant (var "variant") Nothing [
-      Java._ArrayType_Variant_primitive>>: lambda "pt" $ writePrimitiveTypeWithAnnotations @@ var "pt",
-      Java._ArrayType_Variant_classOrInterface>>: lambda "cit" $ writeClassOrInterfaceType @@ var "cit",
-      Java._ArrayType_Variant_variable>>: lambda "tv" $ writeTypeVariable @@ var "tv"]] $
-    Serialization.noSep @@ list [var "varExpr", writeDims @@ var "dims"]
-
-writeDims :: TTermDefinition (Java.Dims -> Expr)
-writeDims = def "writeDims" $
-  lambda "d" $
-    Serialization.noSep @@ Lists.map (lambda "_" $ Serialization.cst @@ string "[]") (unwrap Java._Dims @@ var "d")
-
-writeTypeBound :: TTermDefinition (Java.TypeBound -> Expr)
-writeTypeBound = def "writeTypeBound" $
-  lambda "b" $
-    cases Java._TypeBound (var "b") Nothing [
-      Java._TypeBound_variable>>: lambda "tv" $ writeTypeVariable @@ var "tv",
-      Java._TypeBound_classOrInterface>>: lambda "ci" $ lets [
-        "cit">: project Java._TypeBound_ClassOrInterface Java._TypeBound_ClassOrInterface_type @@ var "ci",
-        "additional">: project Java._TypeBound_ClassOrInterface Java._TypeBound_ClassOrInterface_additional @@ var "ci"] $
-        Logic.ifElse (Lists.null (var "additional"))
-          (writeClassOrInterfaceType @@ var "cit")
-          (Serialization.spaceSep @@ Lists.cons (writeClassOrInterfaceType @@ var "cit") (Lists.map writeAdditionalBound (var "additional")))]
-
-writeTypeParameter :: TTermDefinition (Java.TypeParameter -> Expr)
-writeTypeParameter = def "writeTypeParameter" $
-  lambda "tp" $ lets [
-    "mods">: project Java._TypeParameter Java._TypeParameter_modifiers @@ var "tp",
-    "id">: project Java._TypeParameter Java._TypeParameter_identifier @@ var "tp",
-    "bound">: project Java._TypeParameter Java._TypeParameter_bound @@ var "tp"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeTypeParameterModifier (var "mods")),
-      just $ writeTypeIdentifier @@ var "id",
-      Maybes.map (lambda "b" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "extends", writeTypeBound @@ var "b"]) (var "bound")])
-
-writeWildcard :: TTermDefinition (Java.Wildcard -> Expr)
-writeWildcard = def "writeWildcard" $
-  lambda "w" $ lets [
-    "anns">: project Java._Wildcard Java._Wildcard_annotations @@ var "w",
-    "mbounds">: project Java._Wildcard Java._Wildcard_wildcard @@ var "w"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "anns")) nothing (just $ Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeAnnotation (var "anns")),
-      just $ Serialization.cst @@ string "*",
-      Maybes.map writeWildcardBounds (var "mbounds")])
-
-
-writeClassBody :: TTermDefinition (Java.ClassBody -> Expr)
-writeClassBody = def "writeClassBody" $
-  lambda "cb" $
-    Serialization.curlyBlock @@ Serialization.fullBlockStyle @@
-      (Serialization.doubleNewlineSep @@ Lists.map writeClassBodyDeclarationWithComments (unwrap Java._ClassBody @@ var "cb"))
-
-writeClassBodyDeclaration :: TTermDefinition (Java.ClassBodyDeclaration -> Expr)
-writeClassBodyDeclaration = def "writeClassBodyDeclaration" $
-  lambda "d" $
-    cases Java._ClassBodyDeclaration (var "d") Nothing [
-      Java._ClassBodyDeclaration_classMember>>: lambda "d" $ writeClassMemberDeclaration @@ var "d",
-      Java._ClassBodyDeclaration_instanceInitializer>>: lambda "i" $ writeInstanceInitializer @@ var "i",
-      Java._ClassBodyDeclaration_staticInitializer>>: lambda "i" $ writeStaticInitializer @@ var "i",
-      Java._ClassBodyDeclaration_constructorDeclaration>>: lambda "d" $ writeConstructorDeclaration @@ var "d"]
-
-writeClassBodyDeclarationWithComments :: TTermDefinition (Java.ClassBodyDeclarationWithComments -> Expr)
-writeClassBodyDeclarationWithComments = def "writeClassBodyDeclarationWithComments" $
-  lambda "cbdwc" $ lets [
-    "d">: project Java._ClassBodyDeclarationWithComments Java._ClassBodyDeclarationWithComments_value @@ var "cbdwc",
-    "mc">: project Java._ClassBodyDeclarationWithComments Java._ClassBodyDeclarationWithComments_comments @@ var "cbdwc"] $
-    withComments @@ var "mc" @@ (writeClassBodyDeclaration @@ var "d")
-
-writeClassMemberDeclaration :: TTermDefinition (Java.ClassMemberDeclaration -> Expr)
-writeClassMemberDeclaration = def "writeClassMemberDeclaration" $
-  lambda "d" $
-    cases Java._ClassMemberDeclaration (var "d") Nothing [
-      Java._ClassMemberDeclaration_field>>: lambda "fd" $ writeFieldDeclaration @@ var "fd",
-      Java._ClassMemberDeclaration_method>>: lambda "md" $ writeMethodDeclaration @@ var "md",
-      Java._ClassMemberDeclaration_class>>: lambda "cd" $ writeClassDeclaration @@ var "cd",
-      Java._ClassMemberDeclaration_interface>>: lambda "id" $ writeInterfaceDeclaration @@ var "id",
-      Java._ClassMemberDeclaration_none>>: constant $ Serialization.cst @@ string ";"]
-
-writeFieldDeclaration :: TTermDefinition (Java.FieldDeclaration -> Expr)
-writeFieldDeclaration = def "writeFieldDeclaration" $
-  lambda "fd" $ lets [
-    "mods">: project Java._FieldDeclaration Java._FieldDeclaration_modifiers @@ var "fd",
-    "typ">: project Java._FieldDeclaration Java._FieldDeclaration_unannType @@ var "fd",
-    "vars">: project Java._FieldDeclaration Java._FieldDeclaration_variableDeclarators @@ var "fd"] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeFieldModifier (var "mods")),
-      just $ writeUnannType @@ var "typ",
-      just $ Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeVariableDeclarator (var "vars")]))
-
-writeVariableDeclarator :: TTermDefinition (Java.VariableDeclarator -> Expr)
-writeVariableDeclarator = def "writeVariableDeclarator" $
-  lambda "vd" $ lets [
-    "id">: project Java._VariableDeclarator Java._VariableDeclarator_id @@ var "vd",
-    "minit">: project Java._VariableDeclarator Java._VariableDeclarator_initializer @@ var "vd",
-    "idSec">: writeVariableDeclaratorId @@ var "id"] $
-    Maybes.maybe (var "idSec")
-      (lambda "init" $ Serialization.infixWs @@ string "=" @@ var "idSec" @@ (writeVariableInitializer @@ var "init"))
-      (var "minit")
-
-writeVariableDeclaratorId :: TTermDefinition (Java.VariableDeclaratorId -> Expr)
-writeVariableDeclaratorId = def "writeVariableDeclaratorId" $
-  lambda "vdi" $ lets [
-    "id">: project Java._VariableDeclaratorId Java._VariableDeclaratorId_identifier @@ var "vdi",
-    "mdims">: project Java._VariableDeclaratorId Java._VariableDeclaratorId_dims @@ var "vdi"] $
-    Serialization.noSep @@ Maybes.cat (list [
-      just $ writeIdentifier @@ var "id",
-      Maybes.map writeDims (var "mdims")])
-
-writeMethodDeclaration :: TTermDefinition (Java.MethodDeclaration -> Expr)
-writeMethodDeclaration = def "writeMethodDeclaration" $
-  lambda "md" $ lets [
-    "anns">: project Java._MethodDeclaration Java._MethodDeclaration_annotations @@ var "md",
-    "mods">: project Java._MethodDeclaration Java._MethodDeclaration_modifiers @@ var "md",
-    "header">: project Java._MethodDeclaration Java._MethodDeclaration_header @@ var "md",
-    "body">: project Java._MethodDeclaration Java._MethodDeclaration_body @@ var "md",
-    "headerAndBody">: Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeMethodModifier (var "mods")),
-      just $ writeMethodHeader @@ var "header",
-      just $ writeMethodBody @@ var "body"])] $
-    Serialization.newlineSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "anns")) nothing (just $ Serialization.newlineSep @@ Lists.map writeAnnotation (var "anns")),
-      just $ var "headerAndBody"])
-
-writeMethodHeader :: TTermDefinition (Java.MethodHeader -> Expr)
-writeMethodHeader = def "writeMethodHeader" $
-  lambda "mh" $ lets [
-    "params">: project Java._MethodHeader Java._MethodHeader_parameters @@ var "mh",
-    "result">: project Java._MethodHeader Java._MethodHeader_result @@ var "mh",
-    "decl">: project Java._MethodHeader Java._MethodHeader_declarator @@ var "mh",
-    "mthrows">: project Java._MethodHeader Java._MethodHeader_throws @@ var "mh"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "params")) nothing (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeParameter (var "params")),
-      just $ writeResult @@ var "result",
-      just $ writeMethodDeclarator @@ var "decl",
-      Maybes.map writeThrows (var "mthrows")])
-
-writeMethodDeclarator :: TTermDefinition (Java.MethodDeclarator -> Expr)
-writeMethodDeclarator = def "writeMethodDeclarator" $
-  lambda "md" $ lets [
-    "id">: project Java._MethodDeclarator Java._MethodDeclarator_identifier @@ var "md",
-    "params">: project Java._MethodDeclarator Java._MethodDeclarator_formalParameters @@ var "md"] $
-    Serialization.noSep @@ list [
-      writeIdentifier @@ var "id",
-      Serialization.parenList @@ false @@ Lists.map writeFormalParameter (var "params")]
-
-writeFormalParameter_Simple :: TTermDefinition (Java.FormalParameter_Simple -> Expr)
-writeFormalParameter_Simple = def "writeFormalParameter_Simple" $
-  lambda "fps" $ lets [
-    "mods">: project Java._FormalParameter_Simple Java._FormalParameter_Simple_modifiers @@ var "fps",
-    "typ">: project Java._FormalParameter_Simple Java._FormalParameter_Simple_type @@ var "fps",
-    "id">: project Java._FormalParameter_Simple Java._FormalParameter_Simple_id @@ var "fps"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeVariableModifier (var "mods")),
-      just $ writeUnannType @@ var "typ",
-      just $ writeVariableDeclaratorId @@ var "id"])
-
-writeConstructorDeclaration :: TTermDefinition (Java.ConstructorDeclaration -> Expr)
-writeConstructorDeclaration = def "writeConstructorDeclaration" $
-  lambda "cd" $ lets [
-    "mods">: project Java._ConstructorDeclaration Java._ConstructorDeclaration_modifiers @@ var "cd",
-    "cons">: project Java._ConstructorDeclaration Java._ConstructorDeclaration_constructor @@ var "cd",
-    "mthrows">: project Java._ConstructorDeclaration Java._ConstructorDeclaration_throws @@ var "cd",
-    "body">: project Java._ConstructorDeclaration Java._ConstructorDeclaration_body @@ var "cd"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeConstructorModifier (var "mods")),
-      just $ writeConstructorDeclarator @@ var "cons",
-      Maybes.map writeThrows (var "mthrows"),
-      just $ writeConstructorBody @@ var "body"])
-
-writeConstructorDeclarator :: TTermDefinition (Java.ConstructorDeclarator -> Expr)
-writeConstructorDeclarator = def "writeConstructorDeclarator" $
-  lambda "cd" $ lets [
-    "tparams">: project Java._ConstructorDeclarator Java._ConstructorDeclarator_parameters @@ var "cd",
-    "name">: project Java._ConstructorDeclarator Java._ConstructorDeclarator_name @@ var "cd",
-    "fparams">: project Java._ConstructorDeclarator Java._ConstructorDeclarator_formalParameters @@ var "cd"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "tparams")) nothing (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeParameter (var "tparams")),
-      just $ writeSimpleTypeName @@ var "name",
-      just $ Serialization.parenList @@ false @@ Lists.map writeFormalParameter (var "fparams")])
-
-writeConstructorBody :: TTermDefinition (Java.ConstructorBody -> Expr)
-writeConstructorBody = def "writeConstructorBody" $
-  lambda "cb" $ lets [
-    "minvoc">: project Java._ConstructorBody Java._ConstructorBody_invocation @@ var "cb",
-    "stmts">: project Java._ConstructorBody Java._ConstructorBody_statements @@ var "cb"] $
-    Serialization.curlyBlock @@ Serialization.fullBlockStyle @@ (Serialization.doubleNewlineSep @@ Maybes.cat (list [
-      Maybes.map writeExplicitConstructorInvocation (var "minvoc"),
-      just $ Serialization.newlineSep @@ Lists.map writeBlockStatement (var "stmts")]))
-
-
-writeInterfaceBody :: TTermDefinition (Java.InterfaceBody -> Expr)
-writeInterfaceBody = def "writeInterfaceBody" $
-  lambda "ib" $
-    Serialization.curlyBlock @@ Serialization.fullBlockStyle @@
-      (Serialization.doubleNewlineSep @@ Lists.map writeInterfaceMemberDeclaration (unwrap Java._InterfaceBody @@ var "ib"))
-
-writeInterfaceMemberDeclaration :: TTermDefinition (Java.InterfaceMemberDeclaration -> Expr)
-writeInterfaceMemberDeclaration = def "writeInterfaceMemberDeclaration" $
-  lambda "d" $
-    cases Java._InterfaceMemberDeclaration (var "d") Nothing [
-      Java._InterfaceMemberDeclaration_constant>>: lambda "c" $ writeConstantDeclaration @@ var "c",
-      Java._InterfaceMemberDeclaration_interfaceMethod>>: lambda "im" $ writeInterfaceMethodDeclaration @@ var "im",
-      Java._InterfaceMemberDeclaration_class>>: lambda "cd" $ writeClassDeclaration @@ var "cd",
-      Java._InterfaceMemberDeclaration_interface>>: lambda "id" $ writeInterfaceDeclaration @@ var "id"]
-
-writeInterfaceMethodDeclaration :: TTermDefinition (Java.InterfaceMethodDeclaration -> Expr)
-writeInterfaceMethodDeclaration = def "writeInterfaceMethodDeclaration" $
-  lambda "imd" $ lets [
-    "mods">: project Java._InterfaceMethodDeclaration Java._InterfaceMethodDeclaration_modifiers @@ var "imd",
-    "header">: project Java._InterfaceMethodDeclaration Java._InterfaceMethodDeclaration_header @@ var "imd",
-    "body">: project Java._InterfaceMethodDeclaration Java._InterfaceMethodDeclaration_body @@ var "imd"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeInterfaceMethodModifier (var "mods")),
-      just $ writeMethodHeader @@ var "header",
-      just $ writeMethodBody @@ var "body"])
-
-writeConstantDeclaration :: TTermDefinition (Java.ConstantDeclaration -> Expr)
-writeConstantDeclaration = def "writeConstantDeclaration" $
-  lambda "cd" $ lets [
-    "mods">: project Java._ConstantDeclaration Java._ConstantDeclaration_modifiers @@ var "cd",
-    "typ">: project Java._ConstantDeclaration Java._ConstantDeclaration_type @@ var "cd",
-    "vars">: project Java._ConstantDeclaration Java._ConstantDeclaration_variables @@ var "cd"] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeConstantModifier (var "mods")),
-      just $ writeUnannType @@ var "typ",
-      just $ Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeVariableDeclarator (var "vars")]))
-
-
-writeNormalClassDeclaration :: TTermDefinition (Java.NormalClassDeclaration -> Expr)
-writeNormalClassDeclaration = def "writeNormalClassDeclaration" $
-  lambda "ncd" $ lets [
-    "mods">: project Java._NormalClassDeclaration Java._NormalClassDeclaration_modifiers @@ var "ncd",
-    "id">: project Java._NormalClassDeclaration Java._NormalClassDeclaration_identifier @@ var "ncd",
-    "tparams">: project Java._NormalClassDeclaration Java._NormalClassDeclaration_parameters @@ var "ncd",
-    "msuperc">: project Java._NormalClassDeclaration Java._NormalClassDeclaration_extends @@ var "ncd",
-    "superi">: project Java._NormalClassDeclaration Java._NormalClassDeclaration_implements @@ var "ncd",
-    "body">: project Java._NormalClassDeclaration Java._NormalClassDeclaration_body @@ var "ncd"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeClassModifier (var "mods")),
-      just $ Serialization.cst @@ string "class",
-      just $ Serialization.noSep @@ Maybes.cat (list [
-        just $ writeTypeIdentifier @@ var "id",
-        Logic.ifElse (Lists.null (var "tparams")) nothing (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeParameter (var "tparams"))]),
-      Maybes.map (lambda "c" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "extends", writeClassType @@ var "c"]) (var "msuperc"),
-      Logic.ifElse (Lists.null (var "superi")) nothing
-        (just $ Serialization.spaceSep @@ list [Serialization.cst @@ string "implements", Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeInterfaceType (var "superi")]),
-      just $ writeClassBody @@ var "body"])
-
-writeNormalInterfaceDeclaration :: TTermDefinition (Java.NormalInterfaceDeclaration -> Expr)
-writeNormalInterfaceDeclaration = def "writeNormalInterfaceDeclaration" $
-  lambda "nid" $ lets [
-    "mods">: project Java._NormalInterfaceDeclaration Java._NormalInterfaceDeclaration_modifiers @@ var "nid",
-    "id">: project Java._NormalInterfaceDeclaration Java._NormalInterfaceDeclaration_identifier @@ var "nid",
-    "tparams">: project Java._NormalInterfaceDeclaration Java._NormalInterfaceDeclaration_parameters @@ var "nid",
-    "extends">: project Java._NormalInterfaceDeclaration Java._NormalInterfaceDeclaration_extends @@ var "nid",
-    "body">: project Java._NormalInterfaceDeclaration Java._NormalInterfaceDeclaration_body @@ var "nid"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writeInterfaceModifier (var "mods")),
-      just $ Serialization.cst @@ string "interface",
-      just $ Serialization.noSep @@ Maybes.cat (list [
-        just $ writeTypeIdentifier @@ var "id",
-        Logic.ifElse (Lists.null (var "tparams")) nothing (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeParameter (var "tparams"))]),
-      Logic.ifElse (Lists.null (var "extends")) nothing
-        (just $ Serialization.spaceSep @@ list [Serialization.cst @@ string "extends", Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeInterfaceType (var "extends")]),
-      just $ writeInterfaceBody @@ var "body"])
-
-writeTypeDeclarationWithComments :: TTermDefinition (Java.TypeDeclarationWithComments -> Expr)
-writeTypeDeclarationWithComments = def "writeTypeDeclarationWithComments" $
-  lambda "tdwc" $ lets [
-    "d">: project Java._TypeDeclarationWithComments Java._TypeDeclarationWithComments_value @@ var "tdwc",
-    "mc">: project Java._TypeDeclarationWithComments Java._TypeDeclarationWithComments_comments @@ var "tdwc"] $
-    withComments @@ var "mc" @@ (writeTypeDeclaration @@ var "d")
-
-
-writePackageDeclaration :: TTermDefinition (Java.PackageDeclaration -> Expr)
-writePackageDeclaration = def "writePackageDeclaration" $
-  lambda "pd" $ lets [
-    "mods">: project Java._PackageDeclaration Java._PackageDeclaration_modifiers @@ var "pd",
-    "ids">: project Java._PackageDeclaration Java._PackageDeclaration_identifiers @@ var "pd"] $
-    Serialization.withSemi @@ (Serialization.spaceSep @@ Maybes.cat (list [
-      Logic.ifElse (Lists.null (var "mods")) nothing (just $ Serialization.spaceSep @@ Lists.map writePackageModifier (var "mods")),
-      just $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "package",
-        Serialization.cst @@ (Strings.intercalate (string ".") (Lists.map (lambda "id" $ unwrap Java._Identifier @@ var "id") (var "ids")))]]))
-
-writeImportDeclaration :: TTermDefinition (Java.ImportDeclaration -> Expr)
-writeImportDeclaration = def "writeImportDeclaration" $
-  lambda "imp" $
-    cases Java._ImportDeclaration (var "imp") Nothing [
-      Java._ImportDeclaration_singleType>>: lambda "st" $
-        Serialization.withSemi @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "import",
-          writeTypeName @@ (unwrap Java._SingleTypeImportDeclaration @@ var "st")]),
-      Java._ImportDeclaration_typeImportOnDemand>>: lambda "_" $ Serialization.cst @@ string "STUB:ImportDeclarationTypeImportOnDemand",
-      Java._ImportDeclaration_singleStaticImport>>: lambda "_" $ Serialization.cst @@ string "STUB:ImportDeclarationSingleStaticImport",
-      Java._ImportDeclaration_staticImportOnDemand>>: lambda "_" $ Serialization.cst @@ string "STUB:ImportDeclarationStaticImportOnDemand"]
-
-writeCompilationUnit :: TTermDefinition (Java.CompilationUnit -> Expr)
-writeCompilationUnit = def "writeCompilationUnit" $
-  lambda "u" $
-    cases Java._CompilationUnit (var "u") Nothing [
-      Java._CompilationUnit_ordinary>>: lambda "ocu" $ lets [
-        "mpkg">: project Java._OrdinaryCompilationUnit Java._OrdinaryCompilationUnit_package @@ var "ocu",
-        "imports">: project Java._OrdinaryCompilationUnit Java._OrdinaryCompilationUnit_imports @@ var "ocu",
-        "types">: project Java._OrdinaryCompilationUnit Java._OrdinaryCompilationUnit_types @@ var "ocu",
-        "warning">: just $ singleLineComment @@ Constants.warningAutoGeneratedFile,
-        "pkgSec">: Maybes.map writePackageDeclaration (var "mpkg"),
-        "importsSec">: Logic.ifElse (Lists.null (var "imports")) nothing
-          (just $ Serialization.newlineSep @@ Lists.map writeImportDeclaration (var "imports")),
-        "typesSec">: Logic.ifElse (Lists.null (var "types")) nothing
-          (just $ Serialization.doubleNewlineSep @@ Lists.map writeTypeDeclarationWithComments (var "types"))] $
-        Serialization.doubleNewlineSep @@ Maybes.cat (list [var "warning", var "pkgSec", var "importsSec", var "typesSec"])]
-
-
-writeMethodInvocation :: TTermDefinition (Java.MethodInvocation -> Expr)
-writeMethodInvocation = def "writeMethodInvocation" $
-  lambda "mi" $ lets [
-    "header">: project Java._MethodInvocation Java._MethodInvocation_header @@ var "mi",
-    "args">: project Java._MethodInvocation Java._MethodInvocation_arguments @@ var "mi",
-    "argSec">: Serialization.parenList @@ true @@ Lists.map writeExpression (var "args"),
-    "headerSec">: cases Java._MethodInvocation_Header (var "header") Nothing [
-      Java._MethodInvocation_Header_simple>>: lambda "mname" $ writeMethodName @@ var "mname",
-      Java._MethodInvocation_Header_complex>>: lambda "cx" $ lets [
-        "cvar">: project Java._MethodInvocation_Complex Java._MethodInvocation_Complex_variant @@ var "cx",
-        "targs">: project Java._MethodInvocation_Complex Java._MethodInvocation_Complex_typeArguments @@ var "cx",
-        "cid">: project Java._MethodInvocation_Complex Java._MethodInvocation_Complex_identifier @@ var "cx",
-        "idSec">: Serialization.noSep @@ Maybes.cat (list [
-          Logic.ifElse (Lists.null (var "targs")) nothing
-            (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeArgument (var "targs")),
-          just $ writeIdentifier @@ var "cid"])] $
-        cases Java._MethodInvocation_Variant (var "cvar") Nothing [
-          Java._MethodInvocation_Variant_type>>: lambda "tname" $ Serialization.dotSep @@ list [writeTypeName @@ var "tname", var "idSec"],
-          Java._MethodInvocation_Variant_expression>>: lambda "en" $ Serialization.dotSep @@ list [writeExpressionName @@ var "en", var "idSec"],
-          Java._MethodInvocation_Variant_primary>>: lambda "p" $ Serialization.dotSep @@ list [writePrimary @@ var "p", var "idSec"],
-          Java._MethodInvocation_Variant_super>>: constant $ Serialization.dotSep @@ list [Serialization.cst @@ string "super", var "idSec"],
-          Java._MethodInvocation_Variant_typeSuper>>: lambda "tname" $ Serialization.dotSep @@ list [writeTypeName @@ var "tname", Serialization.cst @@ string "super", var "idSec"]]]] $
-    Serialization.noSep @@ list [var "headerSec", var "argSec"]
-
-
-writeCastExpression_NotPlusMinus :: TTermDefinition (Java.CastExpression_NotPlusMinus -> Expr)
-writeCastExpression_NotPlusMinus = def "writeCastExpression_NotPlusMinus" $
-  lambda "npm" $ lets [
-    "rb">: project Java._CastExpression_NotPlusMinus Java._CastExpression_NotPlusMinus_refAndBounds @@ var "npm",
-    "ex">: project Java._CastExpression_NotPlusMinus Java._CastExpression_NotPlusMinus_expression @@ var "npm"] $
-    Serialization.spaceSep @@ list [writeCastExpression_RefAndBounds @@ var "rb", writeUnaryExpression @@ var "ex"]
-
-writeCastExpression_RefAndBounds :: TTermDefinition (Java.CastExpression_RefAndBounds -> Expr)
-writeCastExpression_RefAndBounds = def "writeCastExpression_RefAndBounds" $
-  lambda "rab" $ lets [
-    "rt">: project Java._CastExpression_RefAndBounds Java._CastExpression_RefAndBounds_type @@ var "rab",
-    "adds">: project Java._CastExpression_RefAndBounds Java._CastExpression_RefAndBounds_bounds @@ var "rab"] $
-    Serialization.parenList @@ false @@ list [Serialization.spaceSep @@ Maybes.cat (list [
-      just $ writeReferenceType @@ var "rt",
-      Logic.ifElse (Lists.null (var "adds")) nothing (just $ Serialization.spaceSep @@ Lists.map writeAdditionalBound (var "adds"))])]
-
-writeCastExpression_Primitive :: TTermDefinition (Java.CastExpression_Primitive -> Expr)
-writeCastExpression_Primitive = def "writeCastExpression_Primitive" $
-  lambda "cp" $ lets [
-    "pt">: project Java._CastExpression_Primitive Java._CastExpression_Primitive_type @@ var "cp",
-    "ex">: project Java._CastExpression_Primitive Java._CastExpression_Primitive_expression @@ var "cp"] $
-    Serialization.spaceSep @@ list [
-      Serialization.parenList @@ false @@ list [writePrimitiveTypeWithAnnotations @@ var "pt"],
-      writeUnaryExpression @@ var "ex"]
-
-
-writeClassInstanceCreationExpression :: TTermDefinition (Java.ClassInstanceCreationExpression -> Expr)
-writeClassInstanceCreationExpression = def "writeClassInstanceCreationExpression" $
-  lambda "cice" $ lets [
-    "mqual">: project Java._ClassInstanceCreationExpression Java._ClassInstanceCreationExpression_qualifier @@ var "cice",
-    "e">: project Java._ClassInstanceCreationExpression Java._ClassInstanceCreationExpression_expression @@ var "cice"] $
-    Maybes.maybe
-      (writeUnqualifiedClassInstanceCreationExpression @@ var "e")
-      (lambda "q" $ Serialization.dotSep @@ list [writeClassInstanceCreationExpression_Qualifier @@ var "q", writeUnqualifiedClassInstanceCreationExpression @@ var "e"])
-      (var "mqual")
-
-writeClassInstanceCreationExpression_Qualifier :: TTermDefinition (Java.ClassInstanceCreationExpression_Qualifier -> Expr)
-writeClassInstanceCreationExpression_Qualifier = def "writeClassInstanceCreationExpression_Qualifier" $
-  lambda "q" $
-    cases Java._ClassInstanceCreationExpression_Qualifier (var "q") Nothing [
-      Java._ClassInstanceCreationExpression_Qualifier_expression>>: lambda "en" $ writeExpressionName @@ var "en",
-      Java._ClassInstanceCreationExpression_Qualifier_primary>>: lambda "p" $ writePrimary @@ var "p"]
-
-writeUnqualifiedClassInstanceCreationExpression :: TTermDefinition (Java.UnqualifiedClassInstanceCreationExpression -> Expr)
-writeUnqualifiedClassInstanceCreationExpression = def "writeUnqualifiedClassInstanceCreationExpression" $
-  lambda "ucice" $ lets [
-    "targs">: project Java._UnqualifiedClassInstanceCreationExpression Java._UnqualifiedClassInstanceCreationExpression_typeArguments @@ var "ucice",
-    "cit">: project Java._UnqualifiedClassInstanceCreationExpression Java._UnqualifiedClassInstanceCreationExpression_classOrInterface @@ var "ucice",
-    "args">: project Java._UnqualifiedClassInstanceCreationExpression Java._UnqualifiedClassInstanceCreationExpression_arguments @@ var "ucice",
-    "mbody">: project Java._UnqualifiedClassInstanceCreationExpression Java._UnqualifiedClassInstanceCreationExpression_body @@ var "ucice"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "new",
-      Logic.ifElse (Lists.null (var "targs")) nothing (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ Lists.map writeTypeArgument (var "targs")),
-      just $ Serialization.noSep @@ list [writeClassOrInterfaceTypeToInstantiate @@ var "cit", Serialization.parenList @@ false @@ Lists.map writeExpression (var "args")],
-      Maybes.map writeClassBody (var "mbody")])
-
-writeClassOrInterfaceTypeToInstantiate :: TTermDefinition (Java.ClassOrInterfaceTypeToInstantiate -> Expr)
-writeClassOrInterfaceTypeToInstantiate = def "writeClassOrInterfaceTypeToInstantiate" $
-  lambda "coitti" $ lets [
-    "ids">: project Java._ClassOrInterfaceTypeToInstantiate Java._ClassOrInterfaceTypeToInstantiate_identifiers @@ var "coitti",
-    "margs">: project Java._ClassOrInterfaceTypeToInstantiate Java._ClassOrInterfaceTypeToInstantiate_typeArguments @@ var "coitti"] $
-    Serialization.noSep @@ Maybes.cat (list [
-      just $ Serialization.dotSep @@ Lists.map writeAnnotatedIdentifier (var "ids"),
-      Maybes.map writeTypeArgumentsOrDiamond (var "margs")])
-
-
-writeArrayCreationExpression :: TTermDefinition (Java.ArrayCreationExpression -> Expr)
-writeArrayCreationExpression = def "writeArrayCreationExpression" $
-  lambda "ace" $
-    cases Java._ArrayCreationExpression (var "ace") Nothing [
-      Java._ArrayCreationExpression_primitiveArray>>: lambda "pa" $ lets [
-        "pt">: project Java._ArrayCreationExpression_PrimitiveArray Java._ArrayCreationExpression_PrimitiveArray_type @@ var "pa",
-        "ai">: project Java._ArrayCreationExpression_PrimitiveArray Java._ArrayCreationExpression_PrimitiveArray_array @@ var "pa"] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "new",
-          Serialization.noSep @@ list [writePrimitiveTypeWithAnnotations @@ var "pt", Serialization.cst @@ string "[]"],
-          writeArrayInitializer @@ var "ai"],
-      Java._ArrayCreationExpression_classOrInterfaceArray>>: lambda "_" $ Serialization.cst @@ string "STUB:ArrayCreationExpression",
-      Java._ArrayCreationExpression_primitive>>: lambda "_" $ Serialization.cst @@ string "STUB:ArrayCreationExpression",
-      Java._ArrayCreationExpression_classOrInterface>>: lambda "_" $ Serialization.cst @@ string "STUB:ArrayCreationExpression"]
-
-writeArrayInitializer :: TTermDefinition (Java.ArrayInitializer -> Expr)
-writeArrayInitializer = def "writeArrayInitializer" $
-  lambda "ai" $ lets [
-    "groups">: unwrap Java._ArrayInitializer @@ var "ai"] $
-    Maybes.fromMaybe (Serialization.cst @@ string "{}") (Maybes.map
-      (lambda "firstGroup" $
-        Logic.ifElse (Equality.equal (Lists.length (var "groups")) (int32 1))
-          (Serialization.noSep @@ list [
-            Serialization.cst @@ string "{",
-            Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.map writeVariableInitializer (var "firstGroup"),
-            Serialization.cst @@ string "}"])
-          (Serialization.cst @@ string "{}"))
-      (Lists.maybeHead (var "groups")))
diff --git a/src/main/haskell/Hydra/Sources/Java/Syntax.hs b/src/main/haskell/Hydra/Sources/Java/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Syntax.hs
+++ /dev/null
@@ -1,2324 +0,0 @@
-module Hydra.Sources.Java.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel hiding (packageName)
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.java.syntax"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-java :: String -> Type
-java = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A Java syntax module. Based on the Oracle Java SE 12 BNF:\n" ++
-      "  https://docs.oracle.com/javase/specs/jls/se12/html/jls-19.html\n" ++
-      "Note: all *WithComments types were added manually, rather than derived from the BNF, which does not allow for comments.")}
-  where
-    definitions = [
-      identifier,
-      typeIdentifier,
-      literal,
-      integerLiteral,
-      floatingPointLiteral,
-      stringLiteral,
-      type_,
-      primitiveTypeWithAnnotations,
-      primitiveType_,
-      numericType,
-      integralType,
-      floatingPointType,
-      referenceType,
-      classOrInterfaceType,
-      classType,
-      classTypeQualifier,
-      interfaceType,
-      typeVariable,
-      arrayType,
-      arrayType_Variant,
-      dims,
-      typeParameter,
-      typeParameterModifier,
-      typeBound,
-      typeBound_ClassOrInterface,
-      additionalBound,
-      typeArgument,
-      wildcard,
-      wildcardBounds,
-      moduleName,
-      packageName,
-      typeName,
-      expressionName,
-      methodName,
-      packageOrTypeName,
-      ambiguousName,
-      compilationUnit,
-      ordinaryCompilationUnit,
-      modularCompilationUnit,
-      packageDeclaration,
-      packageModifier,
-      importDeclaration,
-      singleTypeImportDeclaration,
-      typeImportOnDemandDeclaration,
-      singleStaticImportDeclaration,
-      staticImportOnDemandDeclaration,
-      typeDeclaration,
-      typeDeclarationWithComments,
-      moduleDeclaration,
-      moduleDirective,
-      moduleDirective_Requires,
-      moduleDirective_ExportsOrOpens,
-      moduleDirective_Provides,
-      requiresModifier,
-      classDeclaration,
-      normalClassDeclaration,
-      classModifier,
-      classBody,
-      classBodyDeclaration,
-      classBodyDeclarationWithComments,
-      classMemberDeclaration,
-      fieldDeclaration,
-      fieldModifier,
-      variableDeclarator,
-      variableDeclaratorId,
-      variableInitializer,
-      unannType,
-      unannClassType,
-      methodDeclaration,
-      methodModifier,
-      methodHeader,
-      result,
-      methodDeclarator,
-      receiverParameter,
-      formalParameter,
-      formalParameter_Simple,
-      variableArityParameter,
-      variableModifier,
-      throws,
-      exceptionType,
-      methodBody,
-      instanceInitializer,
-      staticInitializer,
-      constructorDeclaration,
-      constructorModifier,
-      constructorDeclarator,
-      simpleTypeName,
-      constructorBody,
-      explicitConstructorInvocation,
-      explicitConstructorInvocation_Variant,
-      enumDeclaration,
-      enumBody,
-      enumBody_Element,
-      enumConstant,
-      enumConstantModifier,
-      interfaceDeclaration,
-      normalInterfaceDeclaration,
-      interfaceModifier,
-      interfaceBody,
-      interfaceMemberDeclaration,
-      constantDeclaration,
-      constantModifier,
-      interfaceMethodDeclaration,
-      interfaceMethodModifier,
-      annotationTypeDeclaration,
-      annotationTypeBody,
-      annotationTypeMemberDeclaration,
-      annotationTypeElementDeclaration,
-      annotationTypeElementModifier,
-      defaultValue,
-      annotation,
-      normalAnnotation,
-      elementValuePair,
-      elementValue,
-      elementValueArrayInitializer,
-      markerAnnotation,
-      singleElementAnnotation,
-      arrayInitializer,
-      block,
-      blockStatement,
-      localVariableDeclarationStatement,
-      localVariableDeclaration,
-      localVariableType,
-      statement,
-      statementNoShortIf,
-      statementWithoutTrailingSubstatement,
-      labeledStatement,
-      labeledStatementNoShortIf,
-      expressionStatement,
-      statementExpression,
-      ifThenStatement,
-      ifThenElseStatement,
-      ifThenElseStatementNoShortIf,
-      assertStatement,
-      assertStatement_Pair,
-      switchStatement,
-      switchBlock,
-      switchBlock_Pair,
-      switchBlockStatementGroup,
-      switchLabel,
-      enumConstantName,
-      whileStatement,
-      whileStatementNoShortIf,
-      doStatement,
-      forStatement,
-      forStatementNoShortIf,
-      basicForStatement,
-      forCond,
-      basicForStatementNoShortIf,
-      forInit,
-      forUpdate,
-      enhancedForStatement,
-      enhancedForCond,
-      enhancedForStatementNoShortIf,
-      breakStatement,
-      continueStatement,
-      returnStatement,
-      throwStatement,
-      synchronizedStatement,
-      tryStatement,
-      tryStatement_Simple,
-      tryStatement_WithFinally,
-      catches,
-      catchClause,
-      catchFormalParameter,
-      catchType,
-      finally_,
-      tryWithResourcesStatement,
-      resourceSpecification,
-      resource,
-      resource_Local,
-      variableAccess,
-      primary,
-      primaryNoNewArrayExpression,
-      classLiteral,
-      typeNameArray,
-      numericTypeArray,
-      booleanArray,
-      classInstanceCreationExpression,
-      classInstanceCreationExpression_Qualifier,
-      unqualifiedClassInstanceCreationExpression,
-      classOrInterfaceTypeToInstantiate,
-      annotatedIdentifier,
-      typeArgumentsOrDiamond,
-      fieldAccess,
-      fieldAccess_Qualifier,
-      arrayAccess,
-      arrayAccess_Variant,
-      methodInvocation,
-      methodInvocation_Header,
-      methodInvocation_Complex,
-      methodInvocation_Variant,
-      methodReference,
-      methodReference_Expression,
-      methodReference_Primary,
-      methodReference_ReferenceType,
-      methodReference_Super,
-      methodReference_New,
-      methodReference_Array,
-      arrayCreationExpression,
-      arrayCreationExpression_Primitive,
-      arrayCreationExpression_ClassOrInterface,
-      arrayCreationExpression_PrimitiveArray,
-      arrayCreationExpression_ClassOrInterfaceArray,
-      dimExpr,
-      expression,
-      lambdaExpression,
-      lambdaParameters,
-      lambdaParameter_,
-      lambdaParameter_Normal,
-      lambdaParameterType,
-      lambdaBody_,
-      assignmentExpression,
-      assignment,
-      leftHandSide,
-      assignmentOperator,
-      conditionalExpression,
-      conditionalExpression_TernaryCond,
-      conditionalExpression_TernaryLambda,
-      conditionalOrExpression,
-      conditionalAndExpression,
-      inclusiveOrExpression,
-      exclusiveOrExpression,
-      andExpression,
-      equalityExpression,
-      equalityExpression_Binary,
-      relationalExpression,
-      relationalExpression_LessThan,
-      relationalExpression_GreaterThan,
-      relationalExpression_LessThanEqual,
-      relationalExpression_GreaterThanEqual,
-      relationalExpression_InstanceOf,
-      shiftExpression,
-      shiftExpression_Binary,
-      additiveExpression,
-      additiveExpression_Binary,
-      multiplicativeExpression,
-      multiplicativeExpression_Binary,
-      unaryExpression,
-      preIncrementExpression,
-      preDecrementExpression,
-      unaryExpressionNotPlusMinus,
-      postfixExpression,
-      postIncrementExpression,
-      postDecrementExpression,
-      castExpression,
-      castExpression_Primitive,
-      castExpression_NotPlusMinus,
-      castExpression_Lambda,
-      castExpression_RefAndBounds,
-      constantExpression]
-
---Productions from §3 (Lexical Structure)
-
---Identifier:
---  IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral
-identifier :: Binding
-identifier = def "Identifier" $ T.wrap T.string
-
---IdentifierChars:
---  JavaLetter {JavaLetterOrDigit}
---
---JavaLetter:
---  any Unicode character that is a "Java letter"
---
---JavaLetterOrDigit:
---  any Unicode character that is a "Java letter-or-digit"
-
---TypeIdentifier:
---  Identifier but not var
-typeIdentifier :: Binding
-typeIdentifier = def "TypeIdentifier" $ T.wrap $ java "Identifier"
-
---Literal:
-literal :: Binding
-literal = def "Literal" $
-  T.union [
---  NullLiteral
-    "null">: T.unit,
---  IntegerLiteral
-    "integer">: java "IntegerLiteral",
---  FloatingPointLiteral
-    "floatingPoint">: java "FloatingPointLiteral",
---  BooleanLiteral
-    "boolean">: T.boolean,
---  CharacterLiteral
-    "character">: T.uint16,
---  StringLiteral
-    "string">: java "StringLiteral"]
-
-integerLiteral :: Binding
-integerLiteral = def "IntegerLiteral" $
-  doc "Note: this is an approximation which ignores encoding" $
-  T.wrap T.bigint
-
-floatingPointLiteral :: Binding
-floatingPointLiteral = def "FloatingPointLiteral" $
-  doc "Note: this is an approximation which ignores encoding" $
-  T.wrap T.bigfloat
-
-stringLiteral :: Binding
-stringLiteral = def "StringLiteral" $
-  doc "Note: this is an approximation which ignores encoding" $
-  T.wrap T.string
-
---Productions from §4 (Types, Values, and Variables)
-
---Type:
-type_ :: Binding
-type_ = def "Type" $ T.union [
---  PrimitiveType
-    "primitive">: java "PrimitiveTypeWithAnnotations",
---  ReferenceType
-    "reference">: java "ReferenceType"]
-
---PrimitiveType:
-primitiveTypeWithAnnotations :: Binding
-primitiveTypeWithAnnotations = def "PrimitiveTypeWithAnnotations" $ T.record [
-  "type">: java "PrimitiveType",
-  "annotations">: T.list $ java "Annotation"]
-
-primitiveType_ :: Binding
-primitiveType_ = def "PrimitiveType" $ T.union [
---  {Annotation} NumericType
-  "numeric">: java "NumericType",
---  {Annotation} boolean
-  "boolean">: T.unit]
-
---NumericType:
-numericType :: Binding
-numericType = def "NumericType" $ T.union [
---  IntegralType
-  "integral">: java "IntegralType",
---  FloatingPointType
-  "floatingPoint">: java "FloatingPointType"]
-
---IntegralType:
-integralType :: Binding
-integralType = def "IntegralType" $ T.enum [
---  (one of)
---  byte short int long char
-  "byte", "short", "int", "long", "char"]
-
---FloatingPointType:
-floatingPointType :: Binding
-floatingPointType = def "FloatingPointType" $ T.enum [
---  (one of)
---  float double
-  "float", "double"]
-
---ReferenceType:
-referenceType :: Binding
-referenceType = def "ReferenceType" $ T.union [
---  ClassOrInterfaceType
-  "classOrInterface">: java "ClassOrInterfaceType",
---  TypeVariable
-  "variable">: java "TypeVariable",
---  ArrayType
-  "array">: java "ArrayType"]
-
---ClassOrInterfaceType:
-classOrInterfaceType :: Binding
-classOrInterfaceType = def "ClassOrInterfaceType" $ T.union [
---  ClassType
-  "class">: java "ClassType",
---  InterfaceType
-  "interface">: java "InterfaceType"]
-
---ClassType:
-classType :: Binding
-classType = def "ClassType" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "qualifier">: java "ClassTypeQualifier",
-  "identifier">: java "TypeIdentifier",
-  "arguments">: T.list $ java "TypeArgument"]
-
-classTypeQualifier :: Binding
-classTypeQualifier = def "ClassTypeQualifier" $ T.union [
---  {Annotation} TypeIdentifier [TypeArguments]
-  "none">: T.unit,
---  PackageName . {Annotation} TypeIdentifier [TypeArguments]
-  "package">: java "PackageName",
---  ClassOrInterfaceType . {Annotation} TypeIdentifier [TypeArguments]
-  "parent">: java "ClassOrInterfaceType"]
-
---InterfaceType:
---  ClassType
-interfaceType :: Binding
-interfaceType = def "InterfaceType" $ T.wrap $ java "ClassType"
-
---TypeVariable:
---  {Annotation} TypeIdentifier
-typeVariable :: Binding
-typeVariable = def "TypeVariable" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "identifier">: java "TypeIdentifier"]
-
---ArrayType:
-arrayType :: Binding
-arrayType = def "ArrayType" $ T.record [
-  "dims">: java "Dims",
-  "variant">: java "ArrayType_Variant"]
-
-arrayType_Variant :: Binding
-arrayType_Variant = def "ArrayType_Variant" $ T.union [
---  PrimitiveType Dims
-  "primitive">: java "PrimitiveTypeWithAnnotations",
---  ClassOrInterfaceType Dims
-  "classOrInterface">: java "ClassOrInterfaceType",
---  TypeVariable Dims
-  "variable">: java "TypeVariable"]
-
---Dims:
---  {Annotation} [ ] {{Annotation} [ ]}
-dims :: Binding
-dims = def "Dims" $ T.wrap $ T.list $ T.list $ java "Annotation"
-
---TypeParameter:
---  {TypeParameterModifier} TypeIdentifier [TypeBound]
-typeParameter :: Binding
-typeParameter = def "TypeParameter" $ T.record [
-  "modifiers">: T.list $ java "TypeParameterModifier",
-  "identifier">: java "TypeIdentifier",
-  "bound">: T.maybe $ java "TypeBound"]
-
---TypeParameterModifier:
---  Annotation
-typeParameterModifier :: Binding
-typeParameterModifier = def "TypeParameterModifier" $ T.wrap $ java "Annotation"
-
---TypeBound:
-typeBound :: Binding
-typeBound = def "TypeBound" $ T.union [
---  extends TypeVariable
-  "variable">: java "TypeVariable",
---  extends ClassOrInterfaceType {AdditionalBound}
-  "classOrInterface">: java "TypeBound_ClassOrInterface"]
-
-typeBound_ClassOrInterface :: Binding
-typeBound_ClassOrInterface = def "TypeBound_ClassOrInterface" $ T.record [
-  "type">: java "ClassOrInterfaceType",
-  "additional">: T.list $ java "AdditionalBound"]
-
---AdditionalBound:
---  & InterfaceType
-additionalBound :: Binding
-additionalBound = def "AdditionalBound" $ T.wrap $ java "InterfaceType"
-
---TypeArguments:
---  < TypeArgumentList >
---TypeArgumentList:
---  TypeArgument {, TypeArgument}
-
---TypeArgument:
-typeArgument :: Binding
-typeArgument = def "TypeArgument" $ T.union [
---  ReferenceType
-  "reference">: java "ReferenceType",
---  Wildcard
-  "wildcard">: java "Wildcard"]
-
---Wildcard:
---  {Annotation} ? [WildcardBounds]
-wildcard :: Binding
-wildcard = def "Wildcard" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "wildcard">: T.maybe $ java "WildcardBounds"]
-
---WildcardBounds:
-wildcardBounds :: Binding
-wildcardBounds = def "WildcardBounds" $ T.union [
---  extends ReferenceType
-  "extends">: java "ReferenceType",
---  super ReferenceType
-  "super">: java "ReferenceType"]
-
---Productions from §6 (Names)
-
---ModuleName:
-moduleName :: Binding
-moduleName = def "ModuleName" $ T.record [
---  Identifier
-  "identifier">: java "Identifier",
---  ModuleName . Identifier
-  "name">: T.maybe $ java "ModuleName"]
-
---PackageName:
---  Identifier
---  PackageName . Identifier
-packageName :: Binding
-packageName = def "PackageName" $ T.wrap $ T.list $ java "Identifier"
-
---TypeName:
-typeName :: Binding
-typeName = def "TypeName" $ T.record [
---  TypeIdentifier
-  "identifier">: java "TypeIdentifier",
---  PackageOrTypeName . TypeIdentifier
-  "qualifier">: T.maybe $ java "PackageOrTypeName"]
-
---ExpressionName:
---  Identifier
---  AmbiguousName . Identifier
-expressionName :: Binding
-expressionName = def "ExpressionName" $ T.record [
-  "qualifier">: T.maybe $ java "AmbiguousName",
-  "identifier">: java "Identifier"]
-
---MethodName:
---  Identifier
-methodName :: Binding
-methodName = def "MethodName" $ T.wrap $ java "Identifier"
-
---PackageOrTypeName:
---  Identifier
---  PackageOrTypeName . Identifier
-packageOrTypeName :: Binding
-packageOrTypeName = def "PackageOrTypeName" $ T.wrap $ T.list $ java "Identifier"
-
---AmbiguousName:
---  Identifier
---  AmbiguousName . Identifier
-ambiguousName :: Binding
-ambiguousName = def "AmbiguousName" $ T.wrap $ T.list $ java "Identifier"
-
---Productions from §7 (Packages and Modules)
-
---CompilationUnit:
-compilationUnit :: Binding
-compilationUnit = def "CompilationUnit" $ T.union [
---  OrdinaryCompilationUnit
-  "ordinary">: java "OrdinaryCompilationUnit",
---  ModularCompilationUnit
-  "modular">: java "ModularCompilationUnit"]
-
---OrdinaryCompilationUnit:
---  [PackageDeclaration] {ImportDeclaration} {TypeDeclaration}
-ordinaryCompilationUnit :: Binding
-ordinaryCompilationUnit = def "OrdinaryCompilationUnit" $ T.record [
-  "package">: T.maybe $ java "PackageDeclaration",
-  "imports">: T.list $ java "ImportDeclaration",
-  "types">: T.list $ java "TypeDeclarationWithComments"]
-
---ModularCompilationUnit:
---  {ImportDeclaration} ModuleDeclaration
-modularCompilationUnit :: Binding
-modularCompilationUnit = def "ModularCompilationUnit" $ T.record [
-  "imports">: T.list $ java "ImportDeclaration",
-  "module">: java "ModuleDeclaration"]
-
---PackageDeclaration:
---  {PackageModifier} package Identifier {. Identifier} ;
-packageDeclaration :: Binding
-packageDeclaration = def "PackageDeclaration" $ T.record [
-  "modifiers">: T.list $ java "PackageModifier",
-  "identifiers">: T.list $ java "Identifier"]
-
---PackageModifier:
---  Annotation
-packageModifier :: Binding
-packageModifier = def "PackageModifier" $ T.wrap $ java "Annotation"
-
---ImportDeclaration:
-importDeclaration :: Binding
-importDeclaration = def "ImportDeclaration" $ T.union [
---  SingleTypeImportDeclaration
-  "singleType">: java "SingleTypeImportDeclaration",
---  TypeImportOnDemandDeclaration
-  "typeImportOnDemand">: java "TypeImportOnDemandDeclaration",
---  SingleStaticImportDeclaration
-  "singleStaticImport">: java "SingleStaticImportDeclaration",
---  StaticImportOnDemandDeclaration
-  "staticImportOnDemand">: java "StaticImportOnDemandDeclaration"]
-
---SingleTypeImportDeclaration:
---  import TypeName ;
-singleTypeImportDeclaration :: Binding
-singleTypeImportDeclaration = def "SingleTypeImportDeclaration" $ T.wrap $ java "TypeName"
-
---TypeImportOnDemandDeclaration:
---  import PackageOrTypeName . * ;
-typeImportOnDemandDeclaration :: Binding
-typeImportOnDemandDeclaration = def "TypeImportOnDemandDeclaration" $ T.wrap $ java "PackageOrTypeName"
-
---SingleStaticImportDeclaration:
---  import static TypeName . Identifier ;
-singleStaticImportDeclaration :: Binding
-singleStaticImportDeclaration = def "SingleStaticImportDeclaration" $ T.record [
-  "typeName">: java "TypeName",
-  "identifier">: java "Identifier"]
-
---StaticImportOnDemandDeclaration:
---  import static TypeName . * ;
-staticImportOnDemandDeclaration :: Binding
-staticImportOnDemandDeclaration = def "StaticImportOnDemandDeclaration" $ T.wrap $ java "TypeName"
-
---TypeDeclaration:
-typeDeclaration :: Binding
-typeDeclaration = def "TypeDeclaration" $ T.union [
---  ClassDeclaration
-  "class">: java "ClassDeclaration",
---  InterfaceDeclaration
-  "interface">: java "InterfaceDeclaration",
---  ;
-  "none">: T.unit]
-
-typeDeclarationWithComments :: Binding
-typeDeclarationWithComments = def "TypeDeclarationWithComments" $
-  T.record [
-    "value">: java "TypeDeclaration",
-    "comments">: T.maybe T.string]
-
---ModuleDeclaration:
---  {Annotation} [open] module Identifier {. Identifier} { {ModuleDirective} }
-moduleDeclaration :: Binding
-moduleDeclaration = def "ModuleDeclaration" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "open">: T.boolean,
-  "identifiers">: T.list $ java "Identifier",
-  "directives">: T.list $ T.list $ java "ModuleDirective"]
-
---ModuleDirective:
-moduleDirective :: Binding
-moduleDirective = def "ModuleDirective" $ T.union [
---  requires {RequiresModifier} ModuleName ;
-  "requires">: java "ModuleDirective_Requires",
---  exports PackageName [to ModuleName {, ModuleName}] ;
-  "exports">: java "ModuleDirective_ExportsOrOpens",
---  opens PackageName [to ModuleName {, ModuleName}] ;
-  "opens">: java "ModuleDirective_ExportsOrOpens",
---  uses TypeName ;
-  "uses">: java "TypeName",
---  provides TypeName with TypeName {, TypeName} ;
-  "provides">: java "ModuleDirective_Provides"]
-
-moduleDirective_Requires :: Binding
-moduleDirective_Requires = def "ModuleDirective_Requires" $ T.record [
-  "modifiers">: T.list $ java "RequiresModifier",
-  "module">: java "ModuleName"]
-
-moduleDirective_ExportsOrOpens :: Binding
-moduleDirective_ExportsOrOpens = def "ModuleDirective_ExportsOrOpens" $ T.record [
-  "package">: java "PackageName",
-  "modules">:
-    doc "At least one module" $
-    T.list $ java "ModuleName"]
-
-moduleDirective_Provides :: Binding
-moduleDirective_Provides = def "ModuleDirective_Provides" $ T.record [
-  "to">: java "TypeName",
-  "with">:
-    doc "At least one type" $
-    T.list $ java "TypeName"]
-
---RequiresModifier:
-requiresModifier :: Binding
-requiresModifier = def "RequiresModifier" $ T.enum [
---  (one of)
---  transitive static
-  "transitive", "static"]
-
---Productions from §8 (Classes)
-
---ClassDeclaration:
-classDeclaration :: Binding
-classDeclaration = def "ClassDeclaration" $ T.union [
---  NormalClassDeclaration
-  "normal">: java "NormalClassDeclaration",
---  EnumDeclaration
-  "enum">: java "EnumDeclaration"]
-
---NormalClassDeclaration:
---  {ClassModifier} class TypeIdentifier [TypeParameters] [Superclass] [Superinterfaces] ClassBody
-normalClassDeclaration :: Binding
-normalClassDeclaration = def "NormalClassDeclaration" $ T.record [
-  "modifiers">: T.list $ java "ClassModifier",
-  "identifier">: java "TypeIdentifier",
-  "parameters">: T.list $ java "TypeParameter",
-  "extends">: T.maybe $ java "ClassType",
-  "implements">: T.list $ java "InterfaceType",
-  "body">: java "ClassBody"]
-
---ClassModifier:
-classModifier :: Binding
-classModifier = def "ClassModifier" $ T.union [
---  (one of)
---  Annotation public protected private
---  abstract static final strictfp
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "protected">: T.unit,
-  "private">: T.unit,
-  "abstract">: T.unit,
-  "static">: T.unit,
-  "final">: T.unit,
-  "strictfp">: T.unit]
-
---TypeParameters:
---  < TypeParameterList >
---TypeParameterList:
---  TypeParameter {, TypeParameter}
---Superclass:
---  extends ClassType
---Superinterfaces:
---  implements InterfaceTypeList
---InterfaceTypeList:
---  InterfaceType {, InterfaceType}
-
---ClassBody:
---  { {ClassBodyDeclaration} }
-classBody :: Binding
-classBody = def "ClassBody" $ T.wrap $ T.list $ java "ClassBodyDeclarationWithComments"
-
---ClassBodyDeclaration:
-classBodyDeclaration :: Binding
-classBodyDeclaration = def "ClassBodyDeclaration" $ T.union [
---  ClassMemberDeclaration
-  "classMember">: java "ClassMemberDeclaration",
---  InstanceInitializer
-  "instanceInitializer">: java "InstanceInitializer",
---  StaticInitializer
-  "staticInitializer">: java "StaticInitializer",
---  ConstructorDeclaration
-  "constructorDeclaration">: java "ConstructorDeclaration"]
-
-classBodyDeclarationWithComments :: Binding
-classBodyDeclarationWithComments = def "ClassBodyDeclarationWithComments" $
-  T.record [
-    "value">: java "ClassBodyDeclaration",
-    "comments">: T.maybe T.string]
-
---ClassMemberDeclaration:
-classMemberDeclaration :: Binding
-classMemberDeclaration = def "ClassMemberDeclaration" $ T.union [
---  FieldDeclaration
-  "field">: java "FieldDeclaration",
---  MethodDeclaration
-  "method">: java "MethodDeclaration",
---  ClassDeclaration
-  "class">: java "ClassDeclaration",
---  InterfaceDeclaration
-  "interface">: java "InterfaceDeclaration",
---  ;
-  "none">: T.unit]
-
---FieldDeclaration:
---  {FieldModifier} UnannType VariableDeclaratorList ;
-fieldDeclaration :: Binding
-fieldDeclaration = def "FieldDeclaration" $ T.record [
-  "modifiers">: T.list $ java "FieldModifier",
-  "unannType">: java "UnannType",
-  "variableDeclarators">: nonemptyList $ java "VariableDeclarator"]
-
---FieldModifier:
---  (one of)
-fieldModifier :: Binding
-fieldModifier = def "FieldModifier" $ T.union [
---  Annotation public protected private
---  static final transient volatile
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "protected">: T.unit,
-  "private">: T.unit,
-  "static">: T.unit,
-  "final">: T.unit,
-  "transient">: T.unit,
-  "volatile">: T.unit]
-
---VariableDeclaratorList:
---  VariableDeclarator {, VariableDeclarator}
---VariableDeclarator:
---  VariableDeclaratorId [= VariableInitializer]
-variableDeclarator :: Binding
-variableDeclarator = def "VariableDeclarator" $ T.record [
-  "id">: java "VariableDeclaratorId",
-  "initializer">: T.maybe $ java "VariableInitializer"]
-
---VariableDeclaratorId:
---  Identifier [Dims]
-variableDeclaratorId :: Binding
-variableDeclaratorId = def "VariableDeclaratorId" $ T.record [
-  "identifier">: java "Identifier",
-  "dims">: T.maybe $ java "Dims"]
-
---VariableInitializer:
-variableInitializer :: Binding
-variableInitializer = def "VariableInitializer" $ T.union [
---  Expression
-  "expression">: java "Expression",
---  ArrayInitializer
-  "arrayInitializer">: java "ArrayInitializer"]
-
---UnannType:
---  UnannPrimitiveType
---  UnannReferenceType
-unannType :: Binding
-unannType = def "UnannType" $
-  doc "A Type which does not allow annotations" $
-  T.wrap $ java "Type"
-
---UnannPrimitiveType:
---  NumericType
---  boolean
---UnannReferenceType:
---  UnannClassOrInterfaceType
---  UnannTypeVariable
---  UnannArrayType
---UnannClassOrInterfaceType:
---  UnannClassType
---  UnannInterfaceType
---UnannClassType:
---  TypeIdentifier [TypeArguments]
---  PackageName . {Annotation} TypeIdentifier [TypeArguments]
---  UnannClassOrInterfaceType . {Annotation} TypeIdentifier [TypeArguments]
-unannClassType :: Binding
-unannClassType = def "UnannClassType" $
-  doc "A ClassType which does not allow annotations" $
-  T.wrap $ java "ClassType"
-
---UnannInterfaceType:
---  UnannClassType
---UnannTypeVariable:
---  TypeIdentifier
---UnannArrayType:
---  UnannPrimitiveType Dims
---  UnannClassOrInterfaceType Dims
---  UnannTypeVariable Dims
-
---MethodDeclaration:
---  {MethodModifier} MethodHeader MethodBody
-methodDeclaration :: Binding
-methodDeclaration = def "MethodDeclaration" $ T.record [
-  "annotations">:
-    doc "Note: simple methods cannot have annotations" $
-    T.list $ java "Annotation",
-  "modifiers">: T.list $ java "MethodModifier",
-  "header">: java "MethodHeader",
-  "body">: java "MethodBody"]
-
---MethodModifier:
---  (one of)
-methodModifier :: Binding
-methodModifier = def "MethodModifier" $ T.union [
---  Annotation public protected private
---  abstract static final synchronized native strictfp
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "protected">: T.unit,
-  "private">: T.unit,
-  "abstract">: T.unit,
-  "static">: T.unit,
-  "final">: T.unit,
-  "synchronized">: T.unit,
-  "native">: T.unit,
-  "strictfb">: T.unit]
-
---MethodHeader:
---  Result MethodDeclarator [Throws]
---  TypeParameters {Annotation} Result MethodDeclarator [Throws]
-methodHeader :: Binding
-methodHeader = def "MethodHeader" $ T.record [
-  "parameters">: T.list $ java "TypeParameter",
-  "result">: java "Result",
-  "declarator">: java "MethodDeclarator",
-  "throws">: T.maybe $ java "Throws"]
-
---Result:
-result :: Binding
-result = def "Result" $ T.union [
---  UnannType
-  "type">: java "UnannType",
---  void
-  "void">: T.unit]
-
---MethodDeclarator:
---  Identifier ( [ReceiverParameter ,] [FormalParameterList] ) [Dims]
-methodDeclarator :: Binding
-methodDeclarator = def "MethodDeclarator" $ T.record [
-  "identifier">: java "Identifier",
-  "receiverParameter">: T.maybe $ java "ReceiverParameter",
-  "formalParameters">: nonemptyList $ java "FormalParameter"]
-
---ReceiverParameter:
---  {Annotation} UnannType [Identifier .] this
-receiverParameter :: Binding
-receiverParameter = def "ReceiverParameter" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "unannType">: java "UnannType",
-  "identifier">: T.maybe $ java "Identifier"]
-
---FormalParameterList:
---  FormalParameter {, FormalParameter}
---FormalParameter:
-formalParameter :: Binding
-formalParameter = def "FormalParameter" $ T.union [
---  {VariableModifier} UnannType VariableDeclaratorId
-  "simple">: java "FormalParameter_Simple",
---  VariableArityParameter
-  "variableArity">: java "VariableArityParameter"]
-
-formalParameter_Simple :: Binding
-formalParameter_Simple = def "FormalParameter_Simple" $ T.record [
-  "modifiers">: T.list $ java "VariableModifier",
-  "type">: java "UnannType",
-  "id">: java "VariableDeclaratorId"]
-
---VariableArityParameter:
---  {VariableModifier} UnannType {Annotation} ... Identifier
-variableArityParameter :: Binding
-variableArityParameter = def "VariableArityParameter" $ T.record [
-  "modifiers">: java "VariableModifier",
-  "type">: java "UnannType",
-  "annotations">: T.list $ java "Annotation",
-  "identifier">: java "Identifier"]
-
---VariableModifier:
-variableModifier :: Binding
-variableModifier = def "VariableModifier" $ T.union [
---  Annotation
-  "annotation">: java "Annotation",
---  final
-  "final">: T.unit]
-
---Throws:
---  throws ExceptionTypeList
-throws :: Binding
-throws = def "Throws" $ T.wrap $ nonemptyList $ java "ExceptionType"
-
---ExceptionTypeList:
---  ExceptionType {, ExceptionType}
---ExceptionType:
-exceptionType :: Binding
-exceptionType = def "ExceptionType" $ T.union [
---  ClassType
-  "class">: java "ClassType",
---  TypeVariable
-  "variable">: java "TypeVariable"]
-
---MethodBody:
-methodBody :: Binding
-methodBody = def "MethodBody" $ T.union [
---  Block
-  "block">: java "Block",
---  ;
-  "none">: T.unit]
-
---InstanceInitializer:
---  Block
-instanceInitializer :: Binding
-instanceInitializer = def "InstanceInitializer" $ T.wrap $ java "Block"
-
---StaticInitializer:
---  static Block
-staticInitializer :: Binding
-staticInitializer = def "StaticInitializer" $ T.wrap $ java "Block"
-
---ConstructorDeclaration:
---  {ConstructorModifier} ConstructorDeclarator [Throws] ConstructorBody
-constructorDeclaration :: Binding
-constructorDeclaration = def "ConstructorDeclaration" $ T.record [
-  "modifiers">: T.list $ java "ConstructorModifier",
-  "constructor">: java "ConstructorDeclarator",
-  "throws">: T.maybe $ java "Throws",
-  "body">: java "ConstructorBody"]
-
---ConstructorModifier:
---  (one of)
-constructorModifier :: Binding
-constructorModifier = def "ConstructorModifier" $ T.union [
---  Annotation public protected private
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "protected">: T.unit,
-  "private">: T.unit]
-
---ConstructorDeclarator:
---  [TypeParameters] SimpleTypeName ( [ReceiverParameter ,] [FormalParameterList] )
-constructorDeclarator :: Binding
-constructorDeclarator = def "ConstructorDeclarator" $ T.record [
-  "parameters">: T.list $ java "TypeParameter",
-  "name">: java "SimpleTypeName",
-  "receiverParameter">: T.maybe $ java "ReceiverParameter",
-  "formalParameters">: nonemptyList $ java "FormalParameter"]
-
---SimpleTypeName:
---  TypeIdentifier
-simpleTypeName :: Binding
-simpleTypeName = def "SimpleTypeName" $ T.wrap $ java "TypeIdentifier"
-
---ConstructorBody:
---  { [ExplicitConstructorInvocation] [BlockStatements] }
-constructorBody :: Binding
-constructorBody = def "ConstructorBody" $ T.record [
-  "invocation">: T.maybe $ java "ExplicitConstructorInvocation",
-  "statements">: T.list $ java "BlockStatement"]
-
---ExplicitConstructorInvocation:
-explicitConstructorInvocation :: Binding
-explicitConstructorInvocation = def "ExplicitConstructorInvocation" $ T.record [
-  "typeArguments">: T.list $ java "TypeArgument",
-  "arguments">: T.list $ java "Expression",
-  "variant">: java "ExplicitConstructorInvocation_Variant"]
-
-explicitConstructorInvocation_Variant :: Binding
-explicitConstructorInvocation_Variant = def "ExplicitConstructorInvocation_Variant" $ T.union [
---  [TypeArguments] this ( [ArgumentList] ) ;
-  "this">: T.unit,
---  [TypeArguments] super ( [ArgumentList] ) ;
---  ExpressionName . [TypeArguments] super ( [ArgumentList] ) ;
-  "super">: T.maybe $ java "ExpressionName",
---  Primary . [TypeArguments] super ( [ArgumentList] ) ;
-  "primary">: java "Primary"]
-
---EnumDeclaration:
---  {ClassModifier} enum TypeIdentifier [Superinterfaces] EnumBody
-enumDeclaration :: Binding
-enumDeclaration = def "EnumDeclaration" $ T.record [
-  "modifiers">: T.list $ java "ClassModifier",
-  "identifier">: java "TypeIdentifier",
-  "implements">: T.list $ java "InterfaceType",
-  "body">: java "EnumBody"]
-
---EnumBody:
---  { [EnumConstantList] [,] [EnumBodyDeclarations] }
-enumBody :: Binding
-enumBody = def "EnumBody" $ T.wrap $ T.list $ java "EnumBody_Element"
-
-enumBody_Element :: Binding
-enumBody_Element = def "EnumBody_Element" $ T.record [
-  "constants">: T.list $ java "EnumConstant",
-  "bodyDeclarations">: T.list $ java "ClassBodyDeclaration"]
-
---EnumConstantList:
---  EnumConstant {, EnumConstant}
---EnumConstant:
---  {EnumConstantModifier} Identifier [( [ArgumentList] )] [ClassBody]
-enumConstant :: Binding
-enumConstant = def "EnumConstant" $ T.record [
-  "modifiers">: T.list $ java "EnumConstantModifier",
-  "identifier">: java "Identifier",
-  "arguments">: T.list $ T.list $ java "Expression",
-  "body">: T.maybe $ java "ClassBody"]
-
---EnumConstantModifier:
---  Annotation
-enumConstantModifier :: Binding
-enumConstantModifier = def "EnumConstantModifier" $ T.wrap $ java "Annotation"
-
---EnumBodyDeclarations:
---  ; {ClassBodyDeclaration}
-
---Productions from §9 (Interfaces)
-
---InterfaceDeclaration:
-interfaceDeclaration :: Binding
-interfaceDeclaration = def "InterfaceDeclaration" $ T.union [
---  NormalInterfaceDeclaration
-  "normalInterface">: java "NormalInterfaceDeclaration",
---  AnnotationTypeDeclaration
-  "annotationType">: java "AnnotationTypeDeclaration"]
-
---NormalInterfaceDeclaration:
---  {InterfaceModifier} interface TypeIdentifier [TypeParameters] [ExtendsInterfaces] InterfaceBody
-normalInterfaceDeclaration :: Binding
-normalInterfaceDeclaration = def "NormalInterfaceDeclaration" $ T.record [
-  "modifiers">: T.list $ java "InterfaceModifier",
-  "identifier">: java "TypeIdentifier",
-  "parameters">: T.list $ java "TypeParameter",
-  "extends">: T.list $ java "InterfaceType",
-  "body">: java "InterfaceBody"]
-
---InterfaceModifier:
---  (one of)
-interfaceModifier :: Binding
-interfaceModifier = def "InterfaceModifier" $ T.union [
---  Annotation public protected private
---  abstract static strictfp
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "protected">: T.unit,
-  "private">: T.unit,
-  "abstract">: T.unit,
-  "static">: T.unit,
-  "strictfb">: T.unit]
-
---ExtendsInterfaces:
---  extends InterfaceTypeList
-
---InterfaceBody:
---  { {InterfaceMemberDeclaration} }
-interfaceBody :: Binding
-interfaceBody = def "InterfaceBody" $ T.wrap $ T.list $ java "InterfaceMemberDeclaration"
-
---InterfaceMemberDeclaration:
-interfaceMemberDeclaration :: Binding
-interfaceMemberDeclaration = def "InterfaceMemberDeclaration" $ T.union [
---  ConstantDeclaration
-  "constant">: java "ConstantDeclaration",
---  InterfaceMethodDeclaration
-  "interfaceMethod">: java "InterfaceMethodDeclaration",
---  ClassDeclaration
-  "class">: java "ClassDeclaration",
---  InterfaceDeclaration
-  "interface">: java "InterfaceDeclaration"]
---  ;
-
---ConstantDeclaration:
---  {ConstantModifier} UnannType VariableDeclaratorList ;
-constantDeclaration :: Binding
-constantDeclaration = def "ConstantDeclaration" $ T.record [
-  "modifiers">: T.list $ java "ConstantModifier",
-  "type">: java "UnannType",
-  "variables">: nonemptyList $ java "VariableDeclarator"]
-
---ConstantModifier:
---  (one of)
-constantModifier :: Binding
-constantModifier = def "ConstantModifier" $ T.union [
---  Annotation public
---  static final
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "static">: T.unit,
-  "final">: T.unit]
-
---InterfaceMethodDeclaration:
---  {InterfaceMethodModifier} MethodHeader MethodBody
-interfaceMethodDeclaration :: Binding
-interfaceMethodDeclaration = def "InterfaceMethodDeclaration" $ T.record [
-  "modifiers">: T.list $ java "InterfaceMethodModifier",
-  "header">: java "MethodHeader",
-  "body">: java "MethodBody"]
-
---InterfaceMethodModifier:
---  (one of)
-interfaceMethodModifier :: Binding
-interfaceMethodModifier = def "InterfaceMethodModifier" $ T.union [
---  Annotation public private
---  abstract default static strictfp
-  "annotation">: java "Annotation",
-  "public">: T.unit,
-  "private">: T.unit,
-  "abstract">: T.unit,
-  "default">: T.unit,
-  "static">: T.unit,
-  "strictfp">: T.unit]
-
---AnnotationTypeDeclaration:
---  {InterfaceModifier} @ interface TypeIdentifier AnnotationTypeBody
-annotationTypeDeclaration :: Binding
-annotationTypeDeclaration = def "AnnotationTypeDeclaration" $ T.record [
-  "modifiers">: T.list $ java "InterfaceModifier",
-  "identifier">: java "TypeIdentifier",
-  "body">: java "AnnotationTypeBody"]
-
---AnnotationTypeBody:
---  { {AnnotationTypeMemberDeclaration} }
-annotationTypeBody :: Binding
-annotationTypeBody = def "AnnotationTypeBody" $ T.wrap $ T.list $ T.list $ java "AnnotationTypeMemberDeclaration"
-
---AnnotationTypeMemberDeclaration:
-annotationTypeMemberDeclaration :: Binding
-annotationTypeMemberDeclaration = def "AnnotationTypeMemberDeclaration" $ T.union [
---  AnnotationTypeElementDeclaration
-  "annotationType">: java "AnnotationTypeElementDeclaration",
---  ConstantDeclaration
-  "constant">: java "ConstantDeclaration",
---  ClassDeclaration
-  "class">: java "ClassDeclaration",
---  InterfaceDeclaration
-  "interface">: java "InterfaceDeclaration"]
---  ;
-
---AnnotationTypeElementDeclaration:
---  {AnnotationTypeElementModifier} UnannType Identifier ( ) [Dims] [DefaultValue] ;
-annotationTypeElementDeclaration :: Binding
-annotationTypeElementDeclaration = def "AnnotationTypeElementDeclaration" $ T.record [
-  "modifiers">: T.list $ java "AnnotationTypeElementModifier",
-  "type">: java "UnannType",
-  "identifier">: java "Identifier",
-  "dims">: T.maybe $ java "Dims",
-  "default">: T.maybe $ java "DefaultValue"]
-
---AnnotationTypeElementModifier:
---  (one of)
-annotationTypeElementModifier :: Binding
-annotationTypeElementModifier = def "AnnotationTypeElementModifier" $ T.union [
---  Annotation public
-  "public">: java "Annotation",
---  abstract
-  "abstract">: T.unit]
-
---DefaultValue:
---  default ElementValue
-defaultValue :: Binding
-defaultValue = def "DefaultValue" $ T.wrap $ java "ElementValue"
-
---Annotation:
-annotation :: Binding
-annotation = def "Annotation" $ T.union [
---  NormalAnnotation
-  "normal">: java "NormalAnnotation",
---  MarkerAnnotation
-  "marker">: java "MarkerAnnotation",
---  SingleElementAnnotation
-  "singleElement">: java "SingleElementAnnotation"]
-
---NormalAnnotation:
---  @ TypeName ( [ElementValuePairList] )
-normalAnnotation :: Binding
-normalAnnotation = def "NormalAnnotation" $ T.record [
-  "typeName">: java "TypeName",
-  "pairs">: T.list $ java "ElementValuePair"]
-
---ElementValuePairList:
---  ElementValuePair {, ElementValuePair}
---ElementValuePair:
---  Identifier = ElementValue
-elementValuePair :: Binding
-elementValuePair = def "ElementValuePair" $ T.record [
-  "key">: java "Identifier",
-  "value">: java "ElementValue"]
-
---ElementValue:
-elementValue :: Binding
-elementValue = def "ElementValue" $ T.union [
---  ConditionalExpression
-  "conditionalExpression">: java "ConditionalExpression",
---  ElementValueArrayInitializer
-  "elementValueArrayInitializer">: java "ElementValueArrayInitializer",
---  Annotation
-  "annotation">: java "Annotation"]
-
---ElementValueArrayInitializer:
---  { [ElementValueList] [,] }
-elementValueArrayInitializer :: Binding
-elementValueArrayInitializer = def "ElementValueArrayInitializer" $ T.wrap $ T.list $ java "ElementValue"
-
---ElementValueList:
---  ElementValue {, ElementValue}
-
---MarkerAnnotation:
---  @ TypeName
-markerAnnotation :: Binding
-markerAnnotation = def "MarkerAnnotation" $ T.wrap $ java "TypeName"
-
---SingleElementAnnotation:
-singleElementAnnotation :: Binding
-singleElementAnnotation = def "SingleElementAnnotation" $ T.record [
---  @ TypeName ( ElementValue )
-  "name">: java "TypeName",
-  "value">: T.maybe $ java "ElementValue"]
-
---  Productions from §10 (Arrays)
-
---ArrayInitializer:
---  { [VariableInitializerList] [,] }
-arrayInitializer :: Binding
-arrayInitializer = def "ArrayInitializer" $ T.wrap $ T.list $ T.list $ java "VariableInitializer"
-
---VariableInitializerList:
---  VariableInitializer {, VariableInitializer}
-
---Productions from §14 (Blocks and Statements)
-
---Block:
---  { [BlockStatements] }
-block :: Binding
-block = def "Block" $ T.wrap $ T.list $ java "BlockStatement"
-
---BlockStatements:
---  BlockStatement {BlockStatement}
---BlockStatement:
-blockStatement :: Binding
-blockStatement = def "BlockStatement" $ T.union [
---  LocalVariableDeclarationStatement
-  "localVariableDeclaration">: java "LocalVariableDeclarationStatement",
---  ClassDeclaration
-  "class">: java "ClassDeclaration",
---  Statement
-  "statement">: java "Statement"]
-
---LocalVariableDeclarationStatement:
---  LocalVariableDeclaration ;
-localVariableDeclarationStatement :: Binding
-localVariableDeclarationStatement = def "LocalVariableDeclarationStatement" $ T.wrap $ java "LocalVariableDeclaration"
-
---LocalVariableDeclaration:
---  {VariableModifier} LocalVariableType VariableDeclaratorList
-localVariableDeclaration :: Binding
-localVariableDeclaration = def "LocalVariableDeclaration" $ T.record [
-  "modifiers">: T.list $ java "VariableModifier",
-  "type">: java "LocalVariableType",
-  "declarators">: nonemptyList $ java "VariableDeclarator"]
-
---LocalVariableType:
-localVariableType :: Binding
-localVariableType = def "LocalVariableType" $ T.union [
---  UnannType
-  "type">: java "UnannType",
---  var
-  "var">: T.unit]
-
---Statement:
-statement :: Binding
-statement = def "Statement" $ T.union [
---  StatementWithoutTrailingSubstatement
-  "withoutTrailing">: java "StatementWithoutTrailingSubstatement",
---  LabeledStatement
-  "labeled">: java "LabeledStatement",
---  IfThenStatement
-  "ifThen">: java "IfThenStatement",
---  IfThenElseStatement
-  "ifThenElse">: java "IfThenElseStatement",
---  WhileStatement
-  "while">: java "WhileStatement",
---  ForStatement
-  "for">: java "ForStatement"]
-
---StatementNoShortIf:
-statementNoShortIf :: Binding
-statementNoShortIf = def "StatementNoShortIf" $ T.union [
---  StatementWithoutTrailingSubstatement
-  "withoutTrailing">: java "StatementWithoutTrailingSubstatement",
---  LabeledStatementNoShortIf
-  "labeled">: java "LabeledStatementNoShortIf",
---  IfThenElseStatementNoShortIf
-  "ifThenElse">: java "IfThenElseStatementNoShortIf",
---  WhileStatementNoShortIf
-  "while">: java "WhileStatementNoShortIf",
---  ForStatementNoShortIf
-  "for">: java "ForStatementNoShortIf"]
-
---StatementWithoutTrailingSubstatement:
-statementWithoutTrailingSubstatement :: Binding
-statementWithoutTrailingSubstatement = def "StatementWithoutTrailingSubstatement" $ T.union [
---  Block
-  "block">: java "Block",
---  EmptyStatement
-  "empty">: T.unit,
---  ExpressionStatement
-  "expression">: java "ExpressionStatement",
---  AssertStatement
-  "assert">: java "AssertStatement",
---  SwitchStatement
-  "switch">: java "SwitchStatement",
---  DoStatement
-  "do">: java "DoStatement",
---  BreakStatement
-  "break">: java "BreakStatement",
---  ContinueStatement
-  "continue">: java "ContinueStatement",
---  ReturnStatement
-  "return">: java "ReturnStatement",
---  SynchronizedStatement
-  "synchronized">: java "SynchronizedStatement",
---  ThrowStatement
-  "throw">: java "ThrowStatement",
---  TryStatement
-  "try">: java "TryStatement"]
-
---EmptyStatement:
---  ;
---LabeledStatement:
---  Identifier : Statement
-labeledStatement :: Binding
-labeledStatement = def "LabeledStatement" $ T.record [
-  "identifier">: java "Identifier",
-  "statement">: java "Statement"]
-
---LabeledStatementNoShortIf:
---  Identifier : StatementNoShortIf
-labeledStatementNoShortIf :: Binding
-labeledStatementNoShortIf = def "LabeledStatementNoShortIf" $ T.record [
-  "identifier">: java "Identifier",
-  "statement">: java "StatementNoShortIf"]
-
---ExpressionStatement:
---  StatementExpression ;
-expressionStatement :: Binding
-expressionStatement = def "ExpressionStatement" $ T.wrap $ java "StatementExpression"
-
---StatementExpression:
-statementExpression :: Binding
-statementExpression = def "StatementExpression" $ T.union [
---  Assignment
-  "assignment">: java "Assignment",
---  PreIncrementExpression
-  "preIncrement">: java "PreIncrementExpression",
---  PreDecrementExpression
-  "preDecrement">: java "PreDecrementExpression",
---  PostIncrementExpression
-  "postIncrement">: java "PostIncrementExpression",
---  PostDecrementExpression
-  "postDecrement">: java "PostDecrementExpression",
---  MethodInvocation
-  "methodInvocation">: java "MethodInvocation",
---  ClassInstanceCreationExpression
-  "classInstanceCreation">: java "ClassInstanceCreationExpression"]
-
---IfThenStatement:
---  if ( Expression ) Statement
-ifThenStatement :: Binding
-ifThenStatement = def "IfThenStatement" $ T.record [
-  "expression">: java "Expression",
-  "statement">: java "Statement"]
-
---IfThenElseStatement:
---  if ( Expression ) StatementNoShortIf else Statement
-ifThenElseStatement :: Binding
-ifThenElseStatement = def "IfThenElseStatement" $ T.record [
-  "cond">: T.maybe $ java "Expression",
-  "then">: java "StatementNoShortIf",
-  "else">: java "Statement"]
-
---IfThenElseStatementNoShortIf:
---  if ( Expression ) StatementNoShortIf else StatementNoShortIf
-ifThenElseStatementNoShortIf :: Binding
-ifThenElseStatementNoShortIf = def "IfThenElseStatementNoShortIf" $ T.record [
-  "cond">: T.maybe $ java "Expression",
-  "then">: java "StatementNoShortIf",
-  "else">: java "StatementNoShortIf"]
-
---AssertStatement:
-assertStatement :: Binding
-assertStatement = def "AssertStatement" $ T.union [
---  assert Expression ;
-  "single">: java "Expression",
---  assert Expression : Expression ;
-  "pair">: java "AssertStatement_Pair"]
-
-assertStatement_Pair :: Binding
-assertStatement_Pair = def "AssertStatement_Pair" $ T.record [
-  "first">: java "Expression",
-  "second">: java "Expression"]
-
---SwitchStatement:
---  switch ( Expression ) SwitchBlock
-switchStatement :: Binding
-switchStatement = def "SwitchStatement" $ T.record [
-  "cond">: java "Expression",
-  "block">: java "SwitchBlock"]
-
---SwitchBlock:
---  { {SwitchBlockStatementGroup} {SwitchLabel} }
-switchBlock :: Binding
-switchBlock = def "SwitchBlock" $ T.wrap $ T.list $ java "SwitchBlock_Pair"
-
-switchBlock_Pair :: Binding
-switchBlock_Pair = def "SwitchBlock_Pair" $ T.record [
-  "statements">: T.list $ java "SwitchBlockStatementGroup",
-  "labels">: T.list $ java "SwitchLabel"]
-
---SwitchBlockStatementGroup:
---  SwitchLabels BlockStatements
-switchBlockStatementGroup :: Binding
-switchBlockStatementGroup = def "SwitchBlockStatementGroup" $ T.record [
-  "labels">: nonemptyList $ java "SwitchLabel",
-  "statements">: nonemptyList $ java "BlockStatement"]
-
---SwitchLabels:
---  SwitchLabel {SwitchLabel}
---SwitchLabel:
-switchLabel :: Binding
-switchLabel = def "SwitchLabel" $ T.union [
---  case ConstantExpression :
-  "constant">: java "ConstantExpression",
---  case EnumConstantName :
-  "enumConstant">: java "EnumConstantName",
---  default :
-  "default">: T.unit]
-
---EnumConstantName:
---  Identifier
-enumConstantName :: Binding
-enumConstantName = def "EnumConstantName" $ T.wrap $ java "Identifier"
-
---WhileStatement:
---  while ( Expression ) Statement
-whileStatement :: Binding
-whileStatement = def "WhileStatement" $ T.record [
-  "cond">: T.maybe $ java "Expression",
-  "body">: java "Statement"]
-
---WhileStatementNoShortIf:
---  while ( Expression ) StatementNoShortIf
-whileStatementNoShortIf :: Binding
-whileStatementNoShortIf = def "WhileStatementNoShortIf" $ T.record [
-  "cond">: T.maybe $ java "Expression",
-  "body">: java "StatementNoShortIf"]
-
---DoStatement:
---  do Statement while ( Expression ) ;
-doStatement :: Binding
-doStatement = def "DoStatement" $ T.record [
-  "body">: java "Statement",
-  "conde">: T.maybe $ java "Expression"]
-
---ForStatement:
-forStatement :: Binding
-forStatement = def "ForStatement" $ T.union [
---  BasicForStatement
-  "basic">: java "BasicForStatement",
---  EnhancedForStatement
-  "enhanced">: java "EnhancedForStatement"]
-
---ForStatementNoShortIf:
-forStatementNoShortIf :: Binding
-forStatementNoShortIf = def "ForStatementNoShortIf" $ T.union [
---  BasicForStatementNoShortIf
-  "basic">: java "BasicForStatementNoShortIf",
---  EnhancedForStatementNoShortIf
-  "enhanced">: java "EnhancedForStatementNoShortIf"]
-
---BasicForStatement:
---  for ( [ForInit] ; [Expression] ; [ForUpdate] ) Statement
-basicForStatement :: Binding
-basicForStatement = def "BasicForStatement" $ T.record [
-  "cond">: java "ForCond",
-  "body">: java "Statement"]
-
-forCond :: Binding
-forCond = def "ForCond" $ T.record [
-  "init">: T.maybe $ java "ForInit",
-  "cond">: T.maybe $ java "Expression",
-  "update">: T.maybe $ java "ForUpdate"]
-
---BasicForStatementNoShortIf:
---  for ( [ForInit] ; [Expression] ; [ForUpdate] ) StatementNoShortIf
-basicForStatementNoShortIf :: Binding
-basicForStatementNoShortIf = def "BasicForStatementNoShortIf" $ T.record [
-  "cond">: java "ForCond",
-  "body">: java "StatementNoShortIf"]
-
---ForInit:
-forInit :: Binding
-forInit = def "ForInit" $ T.union [
---  StatementExpressionList
-  "statements">: nonemptyList $ java "StatementExpression",
---  LocalVariableDeclaration
-  "localVariable">: java "LocalVariableDeclaration"]
-
---ForUpdate:
---  StatementExpressionList
-forUpdate :: Binding
-forUpdate = def "ForUpdate" $ T.wrap $ nonemptyList $ java "StatementExpression"
-
---  StatementExpressionList:
---  StatementExpression {, StatementExpression}
-
---EnhancedForStatement:
-enhancedForStatement :: Binding
-enhancedForStatement = def "EnhancedForStatement" $ T.record [
---  for ( {VariableModifier} LocalVariableType VariableDeclaratorId : Expression ) Statement
-  "cond">: java "EnhancedForCond",
-  "body">: java "Statement"]
-
-enhancedForCond :: Binding
-enhancedForCond = def "EnhancedForCond" $ T.record [
-  "modifiers">: T.list $ java "VariableModifier",
-  "type">: java "LocalVariableType",
-  "id">: java "VariableDeclaratorId",
-  "expression">: java "Expression"]
-
---EnhancedForStatementNoShortIf:
---  for ( {VariableModifier} LocalVariableType VariableDeclaratorId : Expression ) StatementNoShortIf
-enhancedForStatementNoShortIf :: Binding
-enhancedForStatementNoShortIf = def "EnhancedForStatementNoShortIf" $ T.record [
-  "cond">: java "EnhancedForCond",
-  "body">: java "StatementNoShortIf"]
-
---BreakStatement:
---  break [Identifier] ;
-breakStatement :: Binding
-breakStatement = def "BreakStatement" $ T.wrap $ T.maybe $ java "Identifier"
-
---ContinueStatement:
---  continue [Identifier] ;
-continueStatement :: Binding
-continueStatement = def "ContinueStatement" $ T.wrap $ T.maybe $ java "Identifier"
-
---ReturnStatement:
---  return [Expression] ;
-returnStatement :: Binding
-returnStatement = def "ReturnStatement" $ T.wrap $ T.maybe $ java "Expression"
-
---ThrowStatement:
---  throw Expression ;
-throwStatement :: Binding
-throwStatement = def "ThrowStatement" $ T.wrap $ java "Expression"
-
---SynchronizedStatement:
---  synchronized ( Expression ) Block
-synchronizedStatement :: Binding
-synchronizedStatement = def "SynchronizedStatement" $ T.record [
-  "expression">: java "Expression",
-  "block">: java "Block"]
-
---TryStatement:
-tryStatement :: Binding
-tryStatement = def "TryStatement" $ T.union [
---  try Block Catches
-  "simple">: java "TryStatement_Simple",
---  try Block [Catches] Finally
-  "withFinally">: java "TryStatement_WithFinally",
---  TryWithResourcesStatement
-  "withResources">: java "TryWithResourcesStatement"]
-
-tryStatement_Simple :: Binding
-tryStatement_Simple = def "TryStatement_Simple" $ T.record [
-  "block">: java "Block",
-  "catches">: java "Catches"]
-
-tryStatement_WithFinally :: Binding
-tryStatement_WithFinally = def "TryStatement_WithFinally" $ T.record [
-  "block">: java "Block",
-  "catches">: T.maybe $ java "Catches",
-  "finally">: java "Finally"]
-
---Catches:
---  CatchClause {CatchClause}
-catches :: Binding
-catches = def "Catches" $ T.wrap $ T.list $ java "CatchClause"
-
---CatchClause:
---  catch ( CatchFormalParameter ) Block
-catchClause :: Binding
-catchClause = def "CatchClause" $ T.record [
-  "parameter">: T.maybe $ java "CatchFormalParameter",
-  "block">: java "Block"]
-
---CatchFormalParameter:
---  {VariableModifier} CatchType VariableDeclaratorId
-catchFormalParameter :: Binding
-catchFormalParameter = def "CatchFormalParameter" $ T.record [
-  "modifiers">: T.list $ java "VariableModifier",
-  "type">: java "CatchType",
-  "id">: java "VariableDeclaratorId"]
-
---CatchType:
---  UnannClassType {| ClassType}
-catchType :: Binding
-catchType = def "CatchType" $ T.record [
-  "type">: java "UnannClassType",
-  "types">: T.list $ java "ClassType"]
-
---Finally:
---  finally Block
-finally_ :: Binding
-finally_ = def "Finally" $ T.wrap $ java "Block"
-
---TryWithResourcesStatement:
---  try ResourceSpecification Block [Catches] [Finally]
-tryWithResourcesStatement :: Binding
-tryWithResourcesStatement = def "TryWithResourcesStatement" $ T.record [
-  "resourceSpecification">: java "ResourceSpecification",
-  "block">: java "Block",
-  "catches">: T.maybe $ java "Catches",
-  "finally">: T.maybe $ java "Finally"]
-
---ResourceSpecification:
---  ( ResourceList [;] )
-resourceSpecification :: Binding
-resourceSpecification = def "ResourceSpecification" $ T.wrap $ T.list $ java "Resource"
-
---ResourceList:
---  Resource {; Resource}
---Resource:
-resource :: Binding
-resource = def "Resource" $ T.union [
---  {VariableModifier} LocalVariableType Identifier = Expression
-  "local">: java "Resource_Local",
---  VariableAccess
-  "variable">: java "VariableAccess"]
-
-resource_Local :: Binding
-resource_Local = def "Resource_Local" $ T.record [
-  "modifiers">: T.list $ java "VariableModifier",
-  "type">: java "LocalVariableType",
-  "identifier">: java "Identifier",
-  "expression">: java "Expression"]
-
---VariableAccess:
-variableAccess :: Binding
-variableAccess = def "VariableAccess" $ T.union [
---  ExpressionName
-  "expressionName">: java "ExpressionName",
---  FieldAccess
-  "fieldAccess">: java "FieldAccess"]
-
---Productions from §15 (Expressions)
-
---Primary:
-primary :: Binding
-primary = def "Primary" $ T.union [
---  PrimaryNoNewArray
-  "noNewArray">: java "PrimaryNoNewArrayExpression",
---  ArrayCreationExpression
-  "arrayCreation">: java "ArrayCreationExpression"]
-
---PrimaryNoNewArrayExpression:
-primaryNoNewArrayExpression :: Binding
-primaryNoNewArrayExpression = def "PrimaryNoNewArrayExpression" $ T.union [
---  Literal
-  "literal">: java "Literal",
---  ClassLiteral
-  "classLiteral">: java "ClassLiteral",
---  this
-  "this">: T.unit,
---  TypeName . this
-  "dotThis">: java "TypeName",
---  ( Expression )
-  "parens">: java "Expression",
---  ClassInstanceCreationExpression
-  "classInstance">: java "ClassInstanceCreationExpression",
---  FieldAccess
-  "fieldAccess">: java "FieldAccess",
---  ArrayAccess
-  "arrayAccess">: java "ArrayAccess",
---  MethodInvocation
-  "methodInvocation">: java "MethodInvocation",
---  MethodReference
-  "methodReference">: java "MethodReference"]
-
---ClassLiteral:
-classLiteral :: Binding
-classLiteral = def "ClassLiteral" $ T.union [
---  TypeName {[ ]} . class
-  "type">: java "TypeNameArray",
---  NumericType {[ ]} . class
-  "numericType">: java "NumericTypeArray",
---  boolean {[ ]} . class
-  "boolean">: java "BooleanArray",
---  void . class
-  "void">: T.unit]
-
-typeNameArray :: Binding
-typeNameArray = def "TypeNameArray" $ T.union [
-  "simple">: java "TypeName",
-  "array">: java "TypeNameArray"]
-
-numericTypeArray :: Binding
-numericTypeArray = def "NumericTypeArray" $ T.union [
-  "simple">: java "NumericType",
-  "array">: java "NumericTypeArray"]
-
-booleanArray :: Binding
-booleanArray = def "BooleanArray" $ T.union [
-  "simple">: T.unit,
-  "array">: java "BooleanArray"]
-
---ClassInstanceCreationExpression:
---  UnqualifiedClassInstanceCreationExpression
---  ExpressionName . UnqualifiedClassInstanceCreationExpression
---  Primary . UnqualifiedClassInstanceCreationExpression
-classInstanceCreationExpression :: Binding
-classInstanceCreationExpression = def "ClassInstanceCreationExpression" $ T.record [
-  "qualifier">: T.maybe $ java "ClassInstanceCreationExpression_Qualifier",
-  "expression">: java "UnqualifiedClassInstanceCreationExpression"]
-
-classInstanceCreationExpression_Qualifier :: Binding
-classInstanceCreationExpression_Qualifier = def "ClassInstanceCreationExpression_Qualifier" $ T.union [
-  "expression">: java "ExpressionName",
-  "primary">: java "Primary"]
-
---UnqualifiedClassInstanceCreationExpression:
---  new [TypeArguments] ClassOrInterfaceTypeToInstantiate ( [ArgumentList] ) [ClassBody]
-unqualifiedClassInstanceCreationExpression :: Binding
-unqualifiedClassInstanceCreationExpression = def "UnqualifiedClassInstanceCreationExpression" $ T.record [
-  "typeArguments">: T.list $ java "TypeArgument",
-  "classOrInterface">: java "ClassOrInterfaceTypeToInstantiate",
-  "arguments">: T.list $ java "Expression",
-  "body">: T.maybe $ java "ClassBody"]
-
---ClassOrInterfaceTypeToInstantiate:
---  {Annotation} Identifier {. {Annotation} Identifier} [TypeArgumentsOrDiamond]
-classOrInterfaceTypeToInstantiate :: Binding
-classOrInterfaceTypeToInstantiate = def "ClassOrInterfaceTypeToInstantiate" $ T.record [
-  "identifiers">: nonemptyList $ java "AnnotatedIdentifier",
-  "typeArguments">: T.maybe $ java "TypeArgumentsOrDiamond"]
-
-annotatedIdentifier :: Binding
-annotatedIdentifier = def "AnnotatedIdentifier" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "identifier">: java "Identifier"]
-
---TypeArgumentsOrDiamond:
-typeArgumentsOrDiamond :: Binding
-typeArgumentsOrDiamond = def "TypeArgumentsOrDiamond" $ T.union [
---  TypeArguments
-  "arguments">: nonemptyList $ java "TypeArgument",
---  <>
-  "diamond">: T.unit]
-
---FieldAccess:
-fieldAccess :: Binding
-fieldAccess = def "FieldAccess" $ T.record [
-  "qualifier">: java "FieldAccess_Qualifier",
-  "identifier">: java "Identifier"]
-
-fieldAccess_Qualifier :: Binding
-fieldAccess_Qualifier = def "FieldAccess_Qualifier" $ T.union [
---  Primary . Identifier
-  "primary">: java "Primary",
---  super . Identifier
-  "super">: T.unit,
---  TypeName . super . Identifier
-  "typed">: java "TypeName"]
-
---ArrayAccess:
-arrayAccess :: Binding
-arrayAccess = def "ArrayAccess" $ T.record [
-  "expression">: T.maybe $ java "Expression",
-  "variant">: java "ArrayAccess_Variant"]
-
-arrayAccess_Variant :: Binding
-arrayAccess_Variant = def "ArrayAccess_Variant" $ T.union [
---  ExpressionName [ Expression ]
-  "name">: java "ExpressionName",
---  PrimaryNoNewArray [ Expression ]
-  "primary">: java "PrimaryNoNewArrayExpression"]
-
---MethodInvocation:
-methodInvocation :: Binding
-methodInvocation = def "MethodInvocation" $ T.record [
-  "header">: java "MethodInvocation_Header",
-  "arguments">: T.list $ java "Expression"]
-
-methodInvocation_Header :: Binding
-methodInvocation_Header = def "MethodInvocation_Header" $ T.union [
---  MethodName ( [ArgumentList] )
-  "simple">: java "MethodName",
-  "complex">: java "MethodInvocation_Complex"]
-
-methodInvocation_Complex :: Binding
-methodInvocation_Complex = def "MethodInvocation_Complex" $ T.record [
-  "variant">: java "MethodInvocation_Variant",
-  "typeArguments">: T.list $ java "TypeArgument",
-  "identifier">: java "Identifier"]
-
-methodInvocation_Variant :: Binding
-methodInvocation_Variant = def "MethodInvocation_Variant" $ T.union [
---  TypeName . [TypeArguments] Identifier ( [ArgumentList] )
-  "type">: java "TypeName",
---  ExpressionName . [TypeArguments] Identifier ( [ArgumentList] )
-  "expression">: java "ExpressionName",
---  Primary . [TypeArguments] Identifier ( [ArgumentList] )
-  "primary">: java "Primary",
---  super . [TypeArguments] Identifier ( [ArgumentList] )
-  "super">: T.unit,
---  TypeName . super . [TypeArguments] Identifier ( [ArgumentList] )
-  "typeSuper">: java "TypeName"]
-
---ArgumentList:
---  Expression {, Expression}
-
---MethodReference:
-methodReference :: Binding
-methodReference = def "MethodReference" $ T.union [
---  ExpressionName :: [TypeArguments] Identifier
-  "expression">: java "MethodReference_Expression",
---  Primary :: [TypeArguments] Identifier
-  "primary">: java "MethodReference_Primary",
---  ReferenceType :: [TypeArguments] Identifier
-  "referenceType">: java"MethodReference_ReferenceType",
---  super :: [TypeArguments] Identifier
---  TypeName . super :: [TypeArguments] Identifier
-  "super">: java "MethodReference_Super",
---  ClassType :: [TypeArguments] new
-  "new">: java "MethodReference_New",
---  ArrayType :: new
-  "array">: java "MethodReference_Array"]
-
-methodReference_Expression :: Binding
-methodReference_Expression = def "MethodReference_Expression" $ T.record [
-  "name">: java "ExpressionName",
-  "typeArguments">: T.list $ java "TypeArgument",
-  "identifier">: java "Identifier"]
-
-methodReference_Primary :: Binding
-methodReference_Primary = def "MethodReference_Primary" $ T.record [
-  "primary">: java "Primary",
-  "typeArguments">: T.list $ java "TypeArgument",
-  "identifier">: java "Identifier"]
-
-methodReference_ReferenceType :: Binding
-methodReference_ReferenceType = def "MethodReference_ReferenceType" $ T.record [
-  "referenceType">: java "ReferenceType",
-  "typeArguments">: T.list $ java "TypeArgument",
-  "identifier">: java "Identifier"]
-
-methodReference_Super :: Binding
-methodReference_Super = def "MethodReference_Super" $ T.record [
-  "typeArguments">: T.list $ java "TypeArgument",
-  "identifier">: java "Identifier",
-  "super">: T.boolean]
-
-methodReference_New :: Binding
-methodReference_New = def "MethodReference_New" $ T.record [
-  "classType">: java "ClassType",
-  "typeArguments">: T.list $ java "TypeArgument"]
-
-methodReference_Array :: Binding
-methodReference_Array = def "MethodReference_Array" $ T.wrap $ java "ArrayType"
-
---ArrayCreationExpression:
-arrayCreationExpression :: Binding
-arrayCreationExpression = def "ArrayCreationExpression" $ T.union [
---  new PrimitiveType DimExprs [Dims]
-  "primitive">: java "ArrayCreationExpression_Primitive",
---  new ClassOrInterfaceType DimExprs [Dims]
-  "classOrInterface">: java "ArrayCreationExpression_ClassOrInterface",
---  new PrimitiveType Dims ArrayInitializer
-  "primitiveArray">: java "ArrayCreationExpression_PrimitiveArray",
---  new ClassOrInterfaceType Dims ArrayInitializer
-  "classOrInterfaceArray">: java "ArrayCreationExpression_ClassOrInterfaceArray"]
-
-arrayCreationExpression_Primitive :: Binding
-arrayCreationExpression_Primitive = def "ArrayCreationExpression_Primitive" $ T.record [
-  "type">: java "PrimitiveTypeWithAnnotations",
-  "dimExprs">: nonemptyList $ java "DimExpr",
-  "dims">: T.maybe $ java "Dims"]
-
-arrayCreationExpression_ClassOrInterface :: Binding
-arrayCreationExpression_ClassOrInterface = def "ArrayCreationExpression_ClassOrInterface" $ T.record [
-  "type">: java "ClassOrInterfaceType",
-  "dimExprs">: nonemptyList $ java "DimExpr",
-  "dims">: T.maybe $ java "Dims"]
-
-arrayCreationExpression_PrimitiveArray :: Binding
-arrayCreationExpression_PrimitiveArray = def "ArrayCreationExpression_PrimitiveArray" $ T.record [
-  "type">: java "PrimitiveTypeWithAnnotations",
-  "dims">: nonemptyList $ java "Dims",
-  "array">: java "ArrayInitializer"]
-
-arrayCreationExpression_ClassOrInterfaceArray :: Binding
-arrayCreationExpression_ClassOrInterfaceArray = def "ArrayCreationExpression_ClassOrInterfaceArray" $ T.record [
-  "type">: java "ClassOrInterfaceType",
-  "dims">: nonemptyList $ java "Dims",
-  "array">: java "ArrayInitializer"]
-
---DimExprs:
---  DimExpr {DimExpr}
---DimExpr:
---  {Annotation} [ Expression ]
-dimExpr :: Binding
-dimExpr = def "DimExpr" $ T.record [
-  "annotations">: T.list $ java "Annotation",
-  "expression">: T.maybe $ java "Expression"]
-
---Expression:
-expression :: Binding
-expression = def "Expression" $ T.union [
---  LambdaExpression
-  "lambda">: java "LambdaExpression",
---  AssignmentExpression
-  "assignment">: java "AssignmentExpression"]
-
---LambdaExpression:
---  LambdaParameters -> LambdaBody
-lambdaExpression :: Binding
-lambdaExpression = def "LambdaExpression" $ T.record [
-  "parameters">: java "LambdaParameters",
-  "body">: java "LambdaBody"]
-
---LambdaParameters:
---  ( [LambdaParameterList] )
---  Identifier
-lambdaParameters :: Binding
-lambdaParameters = def "LambdaParameters" $ T.union [
-  "tuple">: T.list $ java "LambdaParameters",
-  "single">: java "Identifier"]
-
---LambdaParameterList:
---  LambdaParameter {, LambdaParameter}
---  Identifier {, Identifier}
---LambdaParameter:
-lambdaParameter_ :: Binding
-lambdaParameter_ = def "LambdaParameter" $ T.union [
---  {VariableModifier} LambdaParameterType VariableDeclaratorId
-  "normal">: java "LambdaParameter_Normal",
---  VariableArityParameter
-  "variableArity">: java "VariableArityParameter"]
-
-lambdaParameter_Normal :: Binding
-lambdaParameter_Normal = def "LambdaParameter_Normal" $ T.record [
-  "modifiers">: T.list $ java "VariableModifier",
-  "type">: java "LambdaParameterType",
-  "id">: java "VariableDeclaratorId"]
-
---LambdaParameterType:
-lambdaParameterType :: Binding
-lambdaParameterType = def "LambdaParameterType" $ T.union [
---  UnannType
-  "type">: java "UnannType",
---  var
-  "var">: T.unit]
-
---LambdaBody:
-lambdaBody_ :: Binding
-lambdaBody_ = def "LambdaBody" $ T.union [
---  Expression
-  "expression">: java "Expression",
---  Block
-  "block">: java "Block"]
-
---AssignmentExpression:
-assignmentExpression :: Binding
-assignmentExpression = def "AssignmentExpression" $ T.union [
---  ConditionalExpression
-  "conditional">: java "ConditionalExpression",
---  Assignment
-  "assignment">: java "Assignment"]
-
---Assignment:
---  LeftHandSide AssignmentOperator Expression
-assignment :: Binding
-assignment = def "Assignment" $ T.record [
-  "lhs">: java "LeftHandSide",
-  "op">: java "AssignmentOperator",
-  "expression">: java "Expression"]
-
---LeftHandSide:
-leftHandSide :: Binding
-leftHandSide = def "LeftHandSide" $ T.union [
---  ExpressionName
-  "expressionName">: java "ExpressionName",
---  FieldAccess
-  "fieldAccess">: java "FieldAccess",
---  ArrayAccess
-  "arrayAccess">: java "ArrayAccess"]
-
---AssignmentOperator:
---  (one of)
-assignmentOperator :: Binding
-assignmentOperator = def "AssignmentOperator" $ T.enum [
---  =  *=  /=  %=  +=  -=  <<~  >>=  >>>=  &=  ^=  |=
-  "simple", "times", "div", "mod", "plus", "minus",
-  "shiftLeft", "shiftRight", "shiftRightZeroFill", "and", "xor", "or"]
-
---ConditionalExpression:
-conditionalExpression :: Binding
-conditionalExpression = def "ConditionalExpression" $ T.union [
---  ConditionalOrExpression
-  "simple">: java "ConditionalOrExpression",
---  ConditionalOrExpression ? Expression : ConditionalExpression
-  "ternaryCond">: java "ConditionalExpression_TernaryCond",
---  ConditionalOrExpression ? Expression : LambdaExpression
-  "ternaryLambda">: java "ConditionalExpression_TernaryLambda"]
-
-conditionalExpression_TernaryCond :: Binding
-conditionalExpression_TernaryCond = def "ConditionalExpression_TernaryCond" $ T.record [
-  "cond">: java "ConditionalOrExpression",
-  "ifTrue">: java "Expression",
-  "ifFalse">: java "ConditionalExpression"]
-
-conditionalExpression_TernaryLambda :: Binding
-conditionalExpression_TernaryLambda = def "ConditionalExpression_TernaryLambda" $ T.record [
-  "cond">: java "ConditionalOrExpression",
-  "ifTrue">: java "Expression",
-  "ifFalse">: java "LambdaExpression"]
-
---ConditionalOrExpression:
---  ConditionalAndExpression
---  ConditionalOrExpression || ConditionalAndExpression
-conditionalOrExpression :: Binding
-conditionalOrExpression = def "ConditionalOrExpression" $ T.wrap $ nonemptyList $ java "ConditionalAndExpression"
-
---ConditionalAndExpression:
---  InclusiveOrExpression
---  ConditionalAndExpression && InclusiveOrExpression
-conditionalAndExpression :: Binding
-conditionalAndExpression = def "ConditionalAndExpression" $ T.wrap $ nonemptyList $ java "InclusiveOrExpression"
-
---InclusiveOrExpression:
---  ExclusiveOrExpression
---  InclusiveOrExpression | ExclusiveOrExpression
-inclusiveOrExpression :: Binding
-inclusiveOrExpression = def "InclusiveOrExpression" $ T.wrap $ nonemptyList $ java "ExclusiveOrExpression"
-
---ExclusiveOrExpression:
---  AndExpression
---  ExclusiveOrExpression ^ AndExpression
-exclusiveOrExpression :: Binding
-exclusiveOrExpression = def "ExclusiveOrExpression" $ T.wrap $ nonemptyList $ java "AndExpression"
-
---AndExpression:
---  EqualityExpression
---  AndExpression & EqualityExpression
-andExpression :: Binding
-andExpression = def "AndExpression" $ T.wrap $ nonemptyList $ java "EqualityExpression"
-
---EqualityExpression:
-equalityExpression :: Binding
-equalityExpression = def "EqualityExpression" $ T.union [
---  RelationalExpression
-  "unary">: java "RelationalExpression",
---  EqualityExpression == RelationalExpression
-  "equal">: java "EqualityExpression_Binary",
---  EqualityExpression != RelationalExpression
-  "notEqual">: java "EqualityExpression_Binary"]
-
-equalityExpression_Binary :: Binding
-equalityExpression_Binary = def "EqualityExpression_Binary" $ T.record [
-  "lhs">: java "EqualityExpression",
-  "rhs">: java "RelationalExpression"]
-
---RelationalExpression:
-relationalExpression :: Binding
-relationalExpression = def "RelationalExpression" $ T.union [
---  ShiftExpression
-  "simple">: java "ShiftExpression",
---  RelationalExpression < ShiftExpression
-  "lessThan">: java "RelationalExpression_LessThan",
---  RelationalExpression > ShiftExpression
-  "greaterThan">: java "RelationalExpression_GreaterThan",
---  RelationalExpression <= ShiftExpression
-  "lessThanEqual">: java "RelationalExpression_LessThanEqual",
---  RelationalExpression >= ShiftExpression
-  "greaterThanEqual">: java "RelationalExpression_GreaterThanEqual",
---  RelationalExpression instanceof ReferenceType
-  "instanceof">: java "RelationalExpression_InstanceOf"]
-
-relationalExpression_LessThan :: Binding
-relationalExpression_LessThan = def "RelationalExpression_LessThan" $ T.record [
-  "lhs">: java "RelationalExpression",
-  "rhs">: java "ShiftExpression"]
-
-relationalExpression_GreaterThan :: Binding
-relationalExpression_GreaterThan = def "RelationalExpression_GreaterThan" $ T.record [
-  "lhs">: java "RelationalExpression",
-  "rhs">: java "ShiftExpression"]
-
-relationalExpression_LessThanEqual :: Binding
-relationalExpression_LessThanEqual = def "RelationalExpression_LessThanEqual" $ T.record [
-  "lhs">: java "RelationalExpression",
-  "rhs">: java "ShiftExpression"]
-
-relationalExpression_GreaterThanEqual :: Binding
-relationalExpression_GreaterThanEqual = def "RelationalExpression_GreaterThanEqual" $ T.record [
-  "lhs">: java "RelationalExpression",
-  "rhs">: java "ShiftExpression"]
-
-relationalExpression_InstanceOf :: Binding
-relationalExpression_InstanceOf = def "RelationalExpression_InstanceOf" $ T.record [
-  "lhs">: java "RelationalExpression",
-  "rhs">: java "ReferenceType"]
-
---ShiftExpression:
-shiftExpression :: Binding
-shiftExpression = def "ShiftExpression" $ T.union [
---  AdditiveExpression
-  "unary">: java "AdditiveExpression",
---  ShiftExpression << AdditiveExpression
-  "shiftLeft">: java "ShiftExpression_Binary",
---  ShiftExpression >> AdditiveExpression
-  "shiftRight">: java "ShiftExpression_Binary",
---  ShiftExpression >>> AdditiveExpression
-  "shiftRightZeroFill">: java "ShiftExpression_Binary"]
-
-shiftExpression_Binary :: Binding
-shiftExpression_Binary = def "ShiftExpression_Binary" $ T.record [
-  "lhs">: java "ShiftExpression",
-  "rhs">: java "AdditiveExpression"]
-
---AdditiveExpression:
-additiveExpression :: Binding
-additiveExpression = def "AdditiveExpression" $ T.union [
---  MultiplicativeExpression
-  "unary">: java "MultiplicativeExpression",
---  AdditiveExpression + MultiplicativeExpression
-  "plus">: java "AdditiveExpression_Binary",
---  AdditiveExpression - MultiplicativeExpression
-  "minus">: java "AdditiveExpression_Binary"]
-
-additiveExpression_Binary :: Binding
-additiveExpression_Binary = def "AdditiveExpression_Binary" $ T.record [
-  "lhs">: java "AdditiveExpression",
-  "rhs">: java "MultiplicativeExpression"]
-
---MultiplicativeExpression:
-multiplicativeExpression :: Binding
-multiplicativeExpression = def "MultiplicativeExpression" $ T.union [
---  UnaryExpression
-  "unary">: java "UnaryExpression",
---  MultiplicativeExpression * UnaryExpression
-  "times">: java "MultiplicativeExpression_Binary",
---  MultiplicativeExpression / UnaryExpression
-  "divide">: java "MultiplicativeExpression_Binary",
---  MultiplicativeExpression % UnaryExpression
-  "mod">: java "MultiplicativeExpression_Binary"]
-
-multiplicativeExpression_Binary :: Binding
-multiplicativeExpression_Binary = def "MultiplicativeExpression_Binary" $ T.record [
-  "lhs">: java "MultiplicativeExpression",
-  "rhs">: java "UnaryExpression"]
-
---UnaryExpression:
-unaryExpression :: Binding
-unaryExpression = def "UnaryExpression" $ T.union [
---  PreIncrementExpression
-  "preIncrement">: java "PreIncrementExpression",
---  PreDecrementExpression
-  "preDecrement">: java "PreDecrementExpression",
---  + UnaryExpression
-  "plus">: java "UnaryExpression",
---  - UnaryExpression
-  "minus">: java "UnaryExpression",
---  UnaryExpressionNotPlusMinus
-  "other">: java "UnaryExpressionNotPlusMinus"]
-
---PreIncrementExpression:
---  ++ UnaryExpression
-preIncrementExpression :: Binding
-preIncrementExpression = def "PreIncrementExpression" $ T.wrap $ java "UnaryExpression"
-
---PreDecrementExpression:
---  -- UnaryExpression
-preDecrementExpression :: Binding
-preDecrementExpression = def "PreDecrementExpression" $ T.wrap $ java "UnaryExpression"
-
---UnaryExpressionNotPlusMinus:
-unaryExpressionNotPlusMinus :: Binding
-unaryExpressionNotPlusMinus = def "UnaryExpressionNotPlusMinus" $ T.union [
---  PostfixExpression
-  "postfix">: java "PostfixExpression",
---  ~ UnaryExpression
-  "tilde">: java "UnaryExpression",
---  ! UnaryExpression
-  "not">: java "UnaryExpression",
---  CastExpression
-  "cast">: java "CastExpression"]
-
---PostfixExpression:
-postfixExpression :: Binding
-postfixExpression = def "PostfixExpression" $ T.union [
---  Primary
-  "primary">: java "Primary",
---  ExpressionName
-  "name">: java "ExpressionName",
---  PostIncrementExpression
-  "postIncrement">: java "PostIncrementExpression",
---  PostDecrementExpression
-  "postDecrement">: java "PostDecrementExpression"]
-
---PostIncrementExpression:
---  PostfixExpression ++
-postIncrementExpression :: Binding
-postIncrementExpression = def "PostIncrementExpression" $ T.wrap $ java "PostfixExpression"
-
---PostDecrementExpression:
---  PostfixExpression --
-postDecrementExpression :: Binding
-postDecrementExpression = def "PostDecrementExpression" $ T.wrap $ java "PostfixExpression"
-
---CastExpression:
-castExpression :: Binding
-castExpression = def "CastExpression" $ T.union [
---  ( PrimitiveType ) UnaryExpression
-  "primitive">: java "CastExpression_Primitive",
---  ( ReferenceType {AdditionalBound} ) UnaryExpressionNotPlusMinus
-  "notPlusMinus">: java "CastExpression_NotPlusMinus",
---  ( ReferenceType {AdditionalBound} ) LambdaExpression
-  "lambda">: java "CastExpression_Lambda"]
-
-castExpression_Primitive :: Binding
-castExpression_Primitive = def "CastExpression_Primitive" $ T.record [
-  "type">: java "PrimitiveTypeWithAnnotations",
-  "expression">: java "UnaryExpression"]
-
-castExpression_NotPlusMinus :: Binding
-castExpression_NotPlusMinus = def "CastExpression_NotPlusMinus" $ T.record [
-  "refAndBounds">: java "CastExpression_RefAndBounds",
-  "expression">: java "UnaryExpression"]
-
-castExpression_Lambda :: Binding
-castExpression_Lambda = def "CastExpression_Lambda" $ T.record [
-  "refAndBounds">: java "CastExpression_RefAndBounds",
-  "expression">: java "LambdaExpression"]
-
-castExpression_RefAndBounds :: Binding
-castExpression_RefAndBounds = def "CastExpression_RefAndBounds" $ T.record [
-  "type">: java "ReferenceType",
-  "bounds">: T.list $ java "AdditionalBound"]
-
---ConstantExpression:
---  Expression
-constantExpression :: Binding
-constantExpression = def "ConstantExpression" $ T.wrap $ java "Expression"
diff --git a/src/main/haskell/Hydra/Sources/Java/Testing.hs b/src/main/haskell/Hydra/Sources/Java/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Testing.hs
+++ /dev/null
@@ -1,272 +0,0 @@
--- | Java test code generation codec in Hydra DSL.
--- This module provides DSL versions of Java test codec functions for JUnit-based generation tests.
-
-module Hydra.Sources.Java.Testing where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors     as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Java.Syntax as Java
-import qualified Hydra.Java.Environment as JavaHelpers
-import qualified Hydra.Sources.Java.Syntax as JavaSyntax
-import qualified Hydra.Sources.Java.Environment as JavaEnvironmentSource
-import qualified Hydra.Sources.Java.Coder as JavaCoderSource
-import qualified Hydra.Sources.Java.Serde as JavaSerdeSource
-import qualified Hydra.Sources.Test.Utils as TestUtils
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-
-ns :: Namespace
-ns = Namespace "hydra.java.testing"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [SerializationSource.ns, TestUtils.ns, Formatting.ns, Names.ns, Constants.ns],
-            moduleTypeDependencies = (JavaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Java test code generation codec for JUnit-based generation tests"}
-  where
-    definitions = [
-      toDefinition buildJavaTestModule,
-      toDefinition findJavaImports,
-      toDefinition formatJavaTestName,
-      toDefinition generateJavaTestCase,
-      toDefinition generateJavaTestFile,
-      toDefinition generateJavaTestGroupHierarchy,
-      toDefinition generateTestFileWithJavaCodec,
-      toDefinition namespaceToJavaClassName]
-
-
--- | Build complete Java test module
-buildJavaTestModule :: TTermDefinition (Module -> TestGroup -> String -> String)
-buildJavaTestModule = define "buildJavaTestModule" $
-  doc "Build the complete Java test module content" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "testBody" $ lets [
-    "ns_">: Packaging.moduleNamespace (var "testModule"),
-    "parts">: Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_"),
-    "packageName">: Strings.intercalate (string ".") (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts"))),
-    "className_">: Strings.cat2 (Formatting.capitalize @@ (Maybes.fromMaybe (string "") (Lists.maybeLast (var "parts")))) (string "Test"),
-    "groupName_">: project _TestGroup _TestGroup_name @@ var "testGroup",
-    "standardImports">: list [
-      string "import org.junit.jupiter.api.Test;",
-      string "import static org.junit.jupiter.api.Assertions.*;",
-      string "import java.util.*;",
-      string "import hydra.util.*;"],
-    "header">: Strings.cat (list [
-      Strings.cat2 (string "// ") (asTerm Constants.warningAutoGeneratedFile),
-      string "\n",
-      Strings.cat2 (string "// ") (var "groupName_"),
-      string "\n\n",
-      Strings.cat (list [string "package ", var "packageName", string ";\n\n"]),
-      Strings.intercalate (string "\n") (var "standardImports"),
-      string "\n\n",
-      Strings.cat (list [string "public class ", var "className_", string " {\n\n"])])] $
-    Strings.cat (list [var "header", var "testBody", string "\n}\n"])
-
-
--- | Find necessary imports for Java test files
-findJavaImports :: TTermDefinition [String]
-findJavaImports = define "findJavaImports" $
-  doc "Standard imports for Java JUnit test files" $
-  list [
-    string "import org.junit.jupiter.api.Test;",
-    string "import static org.junit.jupiter.api.Assertions.*;",
-    string "import java.util.*;"]
-
-
--- | Format a test name for Java (camelCase method name)
-formatJavaTestName :: TTermDefinition (String -> String)
-formatJavaTestName = define "formatJavaTestName" $
-  doc "Format a test name for Java (PascalCase method name with 'test' prefix)" $
-  lambda "name" $ lets [
-    "replaced">: replaceChar (string "-") (string " Neg")
-      (replaceChar (string ".") (string "Dot")
-        (replaceChar (string "+") (string " Plus")
-          (replaceChar (string "/") (string " Div")
-            (replaceChar (string "*") (string " Mul")
-              (replaceChar (string "#") (string " Num") (var "name")))))),
-    "sanitized">: Formatting.nonAlnumToUnderscores @@ var "replaced",
-    "pascal_">: Formatting.convertCase @@ Util.caseConventionLowerSnake @@ Util.caseConventionPascal @@ var "sanitized"] $
-    Strings.cat2 (string "test") (var "pascal_")
-  where
-    replaceChar old new s = Strings.intercalate new (Strings.splitOn old s)
-
-
--- | Generate a single test case for Java/JUnit
-generateJavaTestCase :: TTermDefinition ([String] -> TestCaseWithMetadata -> Either String [String])
-generateJavaTestCase = define "generateJavaTestCase" $
-  doc "Generate a single JUnit test case from a test case with metadata" $
-  lambda "groupPath" $ lambda "tcm" $ lets [
-    "name_">: project _TestCaseWithMetadata _TestCaseWithMetadata_name @@ var "tcm",
-    "tcase">: project _TestCaseWithMetadata _TestCaseWithMetadata_case @@ var "tcm"] $
-    cases _TestCase (var "tcase") Nothing [
-      _TestCase_universal>>: lambda "ucase" $ lets [
-        "actual_">: project _UniversalTestCase _UniversalTestCase_actual @@ var "ucase",
-        "expected_">: project _UniversalTestCase _UniversalTestCase_expected @@ var "ucase",
-        "fullName">: Logic.ifElse (Lists.null (var "groupPath"))
-          (var "name_")
-          (Strings.intercalate (string "_") (Lists.concat2 (var "groupPath") (list [var "name_"]))),
-        "formattedName">: asTerm formatJavaTestName @@ var "fullName"] $
-        right (list [
-          string "    @Test",
-          Strings.cat (list [string "    public void ", var "formattedName", string "() {"]),
-          string "        assertEquals(",
-          Strings.cat (list [string "            ", var "expected_", string ","]),
-          Strings.cat (list [string "            ", var "actual_", string ");"]),
-          string "    }"])]
-
-
--- | Generate Java test file for a test group
-generateJavaTestFile :: TTermDefinition (Module -> TestGroup -> Graph -> Either String (String, String))
-generateJavaTestFile = define "generateJavaTestFile" $
-  doc "Generate a Java test file for a test group" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "_g" $
-    generateTestFileWithJavaCodec @@ var "testModule" @@ var "testGroup"
-
-
--- | Generate Java test group hierarchy
-generateJavaTestGroupHierarchy :: TTermDefinition ([String] -> TestGroup -> Either String String)
-generateJavaTestGroupHierarchy = define "generateJavaTestGroupHierarchy" $
-  doc "Generate test hierarchy for Java with nested subgroups" $
-  lambda "groupPath" $ lambda "testGroup" $ lets [
-    "cases_">: project _TestGroup _TestGroup_cases @@ var "testGroup",
-    "subgroups">: project _TestGroup _TestGroup_subgroups @@ var "testGroup"] $
-    Eithers.bind
-      (Eithers.map
-        (lambda "lines_" $ Strings.intercalate (string "\n\n") (Lists.concat (var "lines_")))
-        (Eithers.mapList
-          (lambda "tc" $ generateJavaTestCase @@ var "groupPath" @@ var "tc")
-          (var "cases_")))
-      (lambda "testCasesStr" $
-        Eithers.map
-          (lambda "subgroupsStr" $
-            Strings.cat (list [
-              var "testCasesStr",
-              Logic.ifElse (Logic.or (Equality.equal (var "testCasesStr") (string ""))
-                                      (Equality.equal (var "subgroupsStr") (string "")))
-                (string "")
-                (string "\n\n"),
-              var "subgroupsStr"]))
-          (Eithers.map
-            (lambda "blocks" $ Strings.intercalate (string "\n\n") (var "blocks"))
-            (Eithers.mapList
-              (lambda "subgroup" $ lets [
-                "groupName">: project _TestGroup _TestGroup_name @@ var "subgroup",
-                "header">: Strings.cat2 (string "    // ") (var "groupName")] $
-                Eithers.map
-                  (lambda "content" $ Strings.cat (list [var "header", string "\n\n", var "content"]))
-                  (generateJavaTestGroupHierarchy
-                    @@ (Lists.concat2 (var "groupPath") (list [var "groupName"]))
-                    @@ var "subgroup"))
-              (var "subgroups"))))
-
-
--- | Generate test file using Java codec
-generateTestFileWithJavaCodec :: TTermDefinition (Module -> TestGroup -> Either String (String, String))
-generateTestFileWithJavaCodec = define "generateTestFileWithJavaCodec" $
-  doc "Generate a complete test file for Java" $
-  lambda "testModule" $ lambda "testGroup" $
-    Eithers.map
-      (lambda "testBody" $ lets [
-        "testModuleContent">: buildJavaTestModule @@ var "testModule" @@ var "testGroup" @@ var "testBody",
-        "ns_">: Packaging.moduleNamespace (var "testModule"),
-        "parts">: Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_"),
-        "dirParts">: Lists.drop (int32 1) (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts"))),
-        "className_">: Strings.cat2 (Formatting.capitalize @@ (Maybes.fromMaybe (string "") (Lists.maybeLast (var "parts")))) (string "Test"),
-        "fileName">: Strings.cat2 (var "className_") (string ".java"),
-        "filePath">: Strings.cat (list [Strings.intercalate (string "/") (var "dirParts"), string "/", var "fileName"])] $
-        Phantoms.pair (var "filePath") (var "testModuleContent"))
-      (generateJavaTestGroupHierarchy @@ list ([] :: [TTerm String]) @@ var "testGroup")
-
-
--- | Convert namespace to Java class name
-namespaceToJavaClassName :: TTermDefinition (Namespace -> String)
-namespaceToJavaClassName = define "namespaceToJavaClassName" $
-  doc "Convert namespace to Java class name" $
-  lambda "ns_" $
-    Strings.intercalate (string ".")
-      (Lists.map Formatting.capitalize
-        (Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_")))
diff --git a/src/main/haskell/Hydra/Sources/Java/Utils.hs b/src/main/haskell/Hydra/Sources/Java/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Java/Utils.hs
+++ /dev/null
@@ -1,1287 +0,0 @@
--- | Java utilities for constructing Java syntax trees.
--- Provides functions for building common Java AST patterns.
-
-module Hydra.Sources.Java.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-
-import qualified Data.Map as M
-import qualified Data.Set as S
-
--- Additional imports
-import qualified Hydra.Java.Syntax as Java
-import qualified Hydra.Java.Environment as JavaHelpers
-import qualified Hydra.Dsl.Java.Helpers as JavaDsl
-import qualified Hydra.Sources.Java.Syntax as JavaSyntax
-import qualified Hydra.Sources.Java.Environment as JavaEnvironmentSource
-import qualified Hydra.Sources.Java.Language as JavaLanguageSource
-import qualified Hydra.Sources.Java.Names as JavaNamesSource
-import qualified Hydra.Sources.Java.Serde as JavaSerdeSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.java.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [moduleNamespace JavaLanguageSource.module_, JavaNamesSource.ns, JavaSerdeSource.ns, Formatting.ns, Names.ns, Serialization.ns],
-            moduleTypeDependencies = (JavaEnvironmentSource.ns:JavaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Java utilities for constructing Java syntax trees"}
-  where
-    definitions = [
-      toDefinition addExpressions,
-      toDefinition addInScopeVar,
-      toDefinition addInScopeVars,
-      toDefinition addJavaTypeParameter,
-      toDefinition addVarRename,
-      toDefinition fieldExpression,
-      toDefinition fieldNameToJavaExpression,
-      toDefinition fieldNameToJavaIdentifier,
-      toDefinition fieldNameToJavaVariableDeclarator,
-      toDefinition fieldNameToJavaVariableDeclaratorId,
-      toDefinition finalVarDeclarationStatement,
-      toDefinition importAliasesForModule,
-      toDefinition interfaceMethodDeclaration,
-      toDefinition isEscaped,
-      toDefinition javaAdditiveExpressionToJavaExpression,
-      toDefinition javaArrayCreation,
-      toDefinition javaArrayInitializer,
-      toDefinition javaAssignmentStatement,
-      toDefinition javaBoolean,
-      toDefinition javaBooleanExpression,
-      toDefinition javaBooleanType,
-      toDefinition javaBytePrimitiveType,
-      toDefinition javaCastExpression,
-      toDefinition javaCastExpressionToJavaExpression,
-      toDefinition javaCastPrimitive,
-      toDefinition javaClassDeclaration,
-      toDefinition javaClassType,
-      toDefinition javaClassTypeToJavaType,
-      toDefinition javaConditionalAndExpressionToJavaExpression,
-      toDefinition javaConstructorCall,
-      toDefinition javaConstructorName,
-      toDefinition javaDeclName,
-      toDefinition javaDoubleCastExpression,
-      toDefinition javaDoubleCastExpressionToJavaExpression,
-      toDefinition javaEmptyStatement,
-      toDefinition javaEqualityExpressionToJavaExpression,
-      toDefinition javaEqualityExpressionToJavaInclusiveOrExpression,
-      toDefinition javaEquals,
-      toDefinition javaEqualsNull,
-      toDefinition javaExpressionNameToJavaExpression,
-      toDefinition javaExpressionToJavaPrimary,
-      toDefinition javaExpressionToJavaUnaryExpression,
-      toDefinition javaFieldAccessToJavaExpression,
-      toDefinition javaIdentifier,
-      toDefinition javaIdentifierToJavaExpression,
-      toDefinition javaIdentifierToJavaExpressionName,
-      toDefinition javaIdentifierToJavaRelationalExpression,
-      toDefinition javaIdentifierToJavaUnaryExpression,
-      toDefinition javaInstanceOf,
-      toDefinition javaInt,
-      toDefinition javaIntExpression,
-      toDefinition javaIntType,
-      toDefinition javaInterfaceDeclarationToJavaClassBodyDeclaration,
-      toDefinition javaLambda,
-      toDefinition javaLambdaFromBlock,
-      toDefinition javaLiteralToJavaExpression,
-      toDefinition javaLiteralToJavaMultiplicativeExpression,
-      toDefinition javaLiteralToJavaPrimary,
-      toDefinition javaLiteralToJavaRelationalExpression,
-      toDefinition javaMemberField,
-      toDefinition javaMethodBody,
-      toDefinition javaMethodDeclarationToJavaClassBodyDeclaration,
-      toDefinition javaMethodHeader,
-      toDefinition javaMethodInvocationToJavaExpression,
-      toDefinition javaMethodInvocationToJavaPostfixExpression,
-      toDefinition javaMethodInvocationToJavaPrimary,
-      toDefinition javaMethodInvocationToJavaStatement,
-      toDefinition javaMultiplicativeExpressionToJavaRelationalExpression,
-      toDefinition javaPackageDeclaration,
-      toDefinition javaPostfixExpressionToJavaEqualityExpression,
-      toDefinition javaPostfixExpressionToJavaExpression,
-      toDefinition javaPostfixExpressionToJavaInclusiveOrExpression,
-      toDefinition javaPostfixExpressionToJavaRelationalExpression,
-      toDefinition javaPostfixExpressionToJavaUnaryExpression,
-      toDefinition javaPrimaryToJavaExpression,
-      toDefinition javaPrimaryToJavaUnaryExpression,
-      toDefinition javaPrimitiveTypeToJavaType,
-      toDefinition javaRefType,
-      toDefinition javaReferenceTypeToRawType,
-      toDefinition javaRelationalExpressionToJavaEqualityExpression,
-      toDefinition javaRelationalExpressionToJavaExpression,
-      toDefinition javaRelationalExpressionToJavaUnaryExpression,
-      toDefinition javaReturnStatement,
-      toDefinition javaStatementsToBlock,
-      toDefinition javaString,
-      toDefinition javaStringMultiplicativeExpression,
-      toDefinition javaThis,
-      toDefinition javaThrowIllegalArgumentException,
-      toDefinition javaThrowIllegalStateException,
-      toDefinition javaThrowStatement,
-      toDefinition javaTypeFromTypeName,
-      toDefinition javaTypeIdentifier,
-      toDefinition javaTypeIdentifierToJavaTypeArgument,
-      toDefinition javaTypeName,
-      toDefinition javaTypeParameter,
-      toDefinition javaTypeToJavaFormalParameter,
-      toDefinition javaTypeToJavaReferenceType,
-      toDefinition javaTypeToJavaResult,
-      toDefinition javaTypeToJavaTypeArgument,
-      toDefinition javaTypeVariable,
-      toDefinition javaTypeVariableToType,
-      toDefinition javaUnaryExpressionToJavaExpression,
-      toDefinition javaUnaryExpressionToJavaRelationalExpression,
-      toDefinition javaVariableDeclarator,
-      toDefinition javaVariableDeclaratorId,
-      toDefinition javaVariableName,
-      toDefinition lookupJavaVarName,
-      toDefinition makeConstructor,
-      toDefinition methodDeclaration,
-      toDefinition methodInvocation,
-      toDefinition methodInvocationStatic,
-      toDefinition methodInvocationStaticWithTypeArgs,
-      toDefinition nameToJavaClassType,
-      toDefinition nameToJavaName,
-      toDefinition nameToJavaReferenceType,
-      toDefinition nameToJavaTypeIdentifier,
-      toDefinition nameToQualifiedJavaName,
-      toDefinition overrideAnnotation,
-      toDefinition referenceTypeToResult,
-      toDefinition sanitizeJavaName,
-      toDefinition suppressWarningsUncheckedAnnotation,
-      toDefinition toAcceptMethod,
-      toDefinition toAssignStmt,
-      toDefinition toJavaArrayType,
-      toDefinition typeParameterToReferenceType,
-      toDefinition typeParameterToTypeArgument,
-      toDefinition unTypeParameter,
-      toDefinition unescape,
-      toDefinition uniqueVarName,
-      toDefinition uniqueVarName_go,
-      toDefinition varDeclarationStatement,
-      toDefinition variableDeclarationStatement,
-      toDefinition variableToJavaIdentifier,
-      toDefinition variantClassName,
-      toDefinition visitorTypeVariable]
-
-
-addExpressions :: TTermDefinition ([Java.MultiplicativeExpression] -> Java.AdditiveExpression)
-addExpressions = def "addExpressions" $
-  lambda "exprs" $ lets [
-    "dummyMult">: JavaDsl.literalToMultiplicativeExpression (JavaDsl.literalInteger (JavaDsl.integerLiteral (bigint 0)))] $
-    Lists.foldl
-      (lambda "ae" $ lambda "me" $
-        JavaDsl.additiveExpressionPlus (JavaDsl.additiveExpressionBinary (var "ae") (var "me")))
-      (JavaDsl.additiveExpressionUnary (Maybes.fromMaybe (var "dummyMult") (Lists.maybeHead (var "exprs"))))
-      (Lists.drop (int32 1) (var "exprs"))
-
--- | Add a variable to the in-scope set and return updated aliases
-addInScopeVar :: TTermDefinition (Name -> JavaHelpers.Aliases -> JavaHelpers.Aliases)
-addInScopeVar = def "addInScopeVar" $
-  lambda "name" $ lambda "aliases" $
-    record JavaHelpers._Aliases [
-      JavaHelpers._Aliases_currentNamespace>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases",
-      JavaHelpers._Aliases_packages>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases",
-      JavaHelpers._Aliases_branchVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases",
-      JavaHelpers._Aliases_recursiveVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases",
-      JavaHelpers._Aliases_inScopeTypeParams>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases",
-      JavaHelpers._Aliases_polymorphicLocals>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases",
-      JavaHelpers._Aliases_inScopeJavaVars>>:
-        Sets.insert (var "name") (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases"),
-      JavaHelpers._Aliases_varRenames>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases",
-      JavaHelpers._Aliases_lambdaVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases",
-      JavaHelpers._Aliases_typeVarSubst>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases",
-      JavaHelpers._Aliases_trustedTypeVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases",
-      JavaHelpers._Aliases_methodCodomain>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_methodCodomain @@ var "aliases",
-      JavaHelpers._Aliases_thunkedVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases"]
-
--- | Add multiple variables to the in-scope set
-addInScopeVars :: TTermDefinition ([Name] -> JavaHelpers.Aliases -> JavaHelpers.Aliases)
-addInScopeVars = def "addInScopeVars" $
-  lambda "names" $ lambda "aliases" $
-    Lists.foldl (lambda "a" $ lambda "n" $ addInScopeVar @@ var "n" @@ var "a")
-      (var "aliases") (var "names")
-
--- | Add a reference type as a type argument to an existing Java type
-addJavaTypeParameter :: TTermDefinition (Java.ReferenceType -> Java.Type -> Context -> Either Error Java.Type)
-addJavaTypeParameter = def "addJavaTypeParameter" $
-  lambda "rt" $ lambda "t" $ "cx" ~>
-  cases Java._Type (var "t") Nothing [
-    Java._Type_reference>>: lambda "rt1" $
-      cases Java._ReferenceType (var "rt1") Nothing [
-        Java._ReferenceType_classOrInterface>>: lambda "cit" $
-          cases Java._ClassOrInterfaceType (var "cit") Nothing [
-            Java._ClassOrInterfaceType_class>>: lambda "ct" $ lets [
-              "anns">: project Java._ClassType Java._ClassType_annotations @@ var "ct",
-              "qual">: project Java._ClassType Java._ClassType_qualifier @@ var "ct",
-              "id">: project Java._ClassType Java._ClassType_identifier @@ var "ct",
-              "args">: project Java._ClassType Java._ClassType_arguments @@ var "ct"] $
-              right (JavaDsl.typeReference
-                (JavaDsl.referenceTypeClassOrInterface
-                  (JavaDsl.classOrInterfaceTypeClass
-                    (JavaDsl.classType (var "anns") (var "qual") (var "id")
-                      (Lists.concat2 (var "args") (list [JavaDsl.typeArgumentReference (var "rt")])))))),
-            Java._ClassOrInterfaceType_interface>>: constant $
-              Ctx.failInContext (Error.errorOther $ Error.otherError $ string "expected a Java class type") (var "cx")],
-        Java._ReferenceType_variable>>: lambda "tv" $
-          right (javaTypeVariableToType @@ var "tv"),
-        Java._ReferenceType_array>>: constant $
-          Ctx.failInContext (Error.errorOther $ Error.otherError $ string "expected a Java class or interface type, or a variable") (var "cx")],
-    Java._Type_primitive>>: constant $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "expected a reference type") (var "cx")]
-
--- | Register a variable rename
-addVarRename :: TTermDefinition (Name -> Name -> JavaHelpers.Aliases -> JavaHelpers.Aliases)
-addVarRename = def "addVarRename" $
-  lambda "original" $ lambda "renamed" $ lambda "aliases" $
-    record JavaHelpers._Aliases [
-      JavaHelpers._Aliases_currentNamespace>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_currentNamespace @@ var "aliases",
-      JavaHelpers._Aliases_packages>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases",
-      JavaHelpers._Aliases_branchVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_branchVars @@ var "aliases",
-      JavaHelpers._Aliases_recursiveVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_recursiveVars @@ var "aliases",
-      JavaHelpers._Aliases_inScopeTypeParams>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeTypeParams @@ var "aliases",
-      JavaHelpers._Aliases_polymorphicLocals>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_polymorphicLocals @@ var "aliases",
-      JavaHelpers._Aliases_inScopeJavaVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases",
-      JavaHelpers._Aliases_varRenames>>:
-        Maps.insert (var "original") (var "renamed")
-          (project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases"),
-      JavaHelpers._Aliases_lambdaVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_lambdaVars @@ var "aliases",
-      JavaHelpers._Aliases_typeVarSubst>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_typeVarSubst @@ var "aliases",
-      JavaHelpers._Aliases_trustedTypeVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_trustedTypeVars @@ var "aliases",
-      JavaHelpers._Aliases_methodCodomain>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_methodCodomain @@ var "aliases",
-      JavaHelpers._Aliases_thunkedVars>>:
-        project JavaHelpers._Aliases JavaHelpers._Aliases_thunkedVars @@ var "aliases"]
-
-fieldExpression :: TTermDefinition (Java.Identifier -> Java.Identifier -> Java.ExpressionName)
-fieldExpression = def "fieldExpression" $
-  lambda "varId" $ lambda "fieldId" $
-    JavaDsl.expressionName (just (JavaDsl.ambiguousName (list [var "varId"]))) (var "fieldId")
-
-fieldNameToJavaExpression :: TTermDefinition (Name -> Java.Expression)
-fieldNameToJavaExpression = def "fieldNameToJavaExpression" $
-  lambda "fname" $ JavaDsl.postfixToExpression
-    (JavaDsl.postfixExpressionName
-      (javaIdentifierToJavaExpressionName @@ (fieldNameToJavaIdentifier @@ var "fname")))
-
-fieldNameToJavaIdentifier :: TTermDefinition (Name -> Java.Identifier)
-fieldNameToJavaIdentifier = def "fieldNameToJavaIdentifier" $
-  lambda "fname" $ javaIdentifier @@ (Core.unName $ var "fname")
-
-fieldNameToJavaVariableDeclarator :: TTermDefinition (Name -> Java.VariableDeclarator)
-fieldNameToJavaVariableDeclarator = def "fieldNameToJavaVariableDeclarator" $
-  lambda "fname" $ javaVariableDeclarator @@ (javaIdentifier @@ (Core.unName $ var "fname")) @@ nothing
-
-fieldNameToJavaVariableDeclaratorId :: TTermDefinition (Name -> Java.VariableDeclaratorId)
-fieldNameToJavaVariableDeclaratorId = def "fieldNameToJavaVariableDeclaratorId" $
-  lambda "fname" $ javaVariableDeclaratorId @@ (javaIdentifier @@ (Core.unName $ var "fname"))
-
--- | Like varDeclarationStatement, but with 'final' modifier.
---   Used in TCO while loops to create effectively-final snapshots of loop variables.
-finalVarDeclarationStatement :: TTermDefinition (Java.Identifier -> Java.Expression -> Java.BlockStatement)
-finalVarDeclarationStatement = def "finalVarDeclarationStatement" $
-  lambda "id" $ lambda "rhs" $
-    JavaDsl.blockStatementLocalVariableDeclaration
-      (JavaDsl.localVariableDeclarationStatement
-        (JavaDsl.localVariableDeclaration
-          (list [inject Java._VariableModifier Java._VariableModifier_final unit])
-          JavaDsl.localVariableTypeVar
-          (list [javaVariableDeclarator @@ var "id" @@
-            (just $ JavaDsl.variableInitializerExpression (var "rhs"))])))
-
--- | Create an initial Aliases for a module with all fields set to empty/default
-importAliasesForModule :: TTermDefinition (Module -> JavaHelpers.Aliases)
-importAliasesForModule = def "importAliasesForModule" $
-  lambda "mod" $
-    record JavaHelpers._Aliases [
-      JavaHelpers._Aliases_currentNamespace>>: Packaging.moduleNamespace (var "mod"),
-      JavaHelpers._Aliases_packages>>: (Maps.empty :: TTerm (M.Map Namespace Java.PackageName)),
-      JavaHelpers._Aliases_branchVars>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_recursiveVars>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_inScopeTypeParams>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_polymorphicLocals>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_inScopeJavaVars>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_varRenames>>: (Maps.empty :: TTerm (M.Map Name Name)),
-      JavaHelpers._Aliases_lambdaVars>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_typeVarSubst>>: (Maps.empty :: TTerm (M.Map Name Name)),
-      JavaHelpers._Aliases_trustedTypeVars>>: (Sets.empty :: TTerm (S.Set Name)),
-      JavaHelpers._Aliases_methodCodomain>>: (nothing :: TTerm (Maybe Type)),
-      JavaHelpers._Aliases_thunkedVars>>: (Sets.empty :: TTerm (S.Set Name))]
-
-interfaceMethodDeclaration :: TTermDefinition ([Java.InterfaceMethodModifier] -> [Java.TypeParameter] -> String
-  -> [Java.FormalParameter] -> Java.Result -> Maybe [Java.BlockStatement] -> Java.InterfaceMemberDeclaration)
-interfaceMethodDeclaration = def "interfaceMethodDeclaration" $
-  lambda "mods" $ lambda "tparams" $ lambda "methodName" $ lambda "params" $ lambda "result" $ lambda "stmts" $
-    JavaDsl.interfaceMemberDeclInterfaceMethod
-      (JavaDsl.interfaceMethodDeclaration_ (var "mods")
-        (javaMethodHeader @@ var "tparams" @@ var "methodName" @@ var "params" @@ var "result")
-        (javaMethodBody @@ var "stmts"))
-
-isEscaped :: TTermDefinition (String -> Bool)
-isEscaped = def "isEscaped" $
-  lambda "s" $ Equality.equal (Maybes.fromMaybe (int32 0) (Strings.maybeCharAt (int32 0) (var "s"))) (int32 36)
-
-javaAdditiveExpressionToJavaExpression :: TTermDefinition (Java.AdditiveExpression -> Java.Expression)
-javaAdditiveExpressionToJavaExpression = def "javaAdditiveExpressionToJavaExpression" $
-  lambda "ae" $ JavaDsl.additiveToExpression (var "ae")
-
--- | Create an array creation expression for primitive byte arrays with an initializer
-javaArrayCreation :: TTermDefinition (Java.PrimitiveTypeWithAnnotations -> Maybe Java.ArrayInitializer -> Java.Expression)
-javaArrayCreation = def "javaArrayCreation" $
-  lambda "primType" $ lambda "minit" $ lets [
-    "init_">: Maybes.cases (var "minit")
-      (JavaDsl.arrayInitializer (list ([] :: [TTerm Java.VariableInitializer])))
-      (lambda "i" $ var "i")] $
-    javaPrimaryToJavaExpression @@
-      (JavaDsl.primaryArrayCreation
-        (JavaDsl.arrayCreationExpressionPrimitiveArray
-          (record Java._ArrayCreationExpression_PrimitiveArray [
-            Java._ArrayCreationExpression_PrimitiveArray_type>>: var "primType",
-            Java._ArrayCreationExpression_PrimitiveArray_dims>>:
-              list ([] :: [TTerm Java.Dims]),
-            Java._ArrayCreationExpression_PrimitiveArray_array>>: var "init_"])))
-
--- | Create an array initializer from a list of expressions
-javaArrayInitializer :: TTermDefinition ([Java.Expression] -> Java.ArrayInitializer)
-javaArrayInitializer = def "javaArrayInitializer" $
-  lambda "exprs" $ wrap Java._ArrayInitializer
-    (list [Lists.map (lambda "e" $ JavaDsl.variableInitializerExpression (var "e")) (var "exprs")])
-
-javaAssignmentStatement :: TTermDefinition (Java.LeftHandSide -> Java.Expression -> Java.Statement)
-javaAssignmentStatement = def "javaAssignmentStatement" $
-  lambda "lhs" $ lambda "rhs" $
-    JavaDsl.statementWithoutTrailing
-      (JavaDsl.stmtExpression
-        (JavaDsl.expressionStatement
-          (JavaDsl.stmtExprAssignment
-            (JavaDsl.assignment (var "lhs") JavaDsl.assignmentOperatorSimple (var "rhs")))))
-
-javaBoolean :: TTermDefinition (Bool -> Java.Literal)
-javaBoolean = def "javaBoolean" $
-  lambda "b" $ JavaDsl.literalBoolean (var "b")
-
-javaBooleanExpression :: TTermDefinition (Bool -> Java.Expression)
-javaBooleanExpression = def "javaBooleanExpression" $
-  lambda "b" $ javaPrimaryToJavaExpression @@ (javaLiteralToJavaPrimary @@ (javaBoolean @@ var "b"))
-
-javaBooleanType :: TTermDefinition Java.Type
-javaBooleanType = def "javaBooleanType" $
-  javaPrimitiveTypeToJavaType @@ JavaDsl.primitiveTypeBoolean
-
--- | Java byte primitive type
-javaBytePrimitiveType :: TTermDefinition Java.PrimitiveTypeWithAnnotations
-javaBytePrimitiveType = def "javaBytePrimitiveType" $
-  JavaDsl.primitiveTypeWithAnnotations
-    (JavaDsl.primitiveTypeNumeric (JavaDsl.numericTypeIntegral JavaDsl.integralTypeByte))
-    (list ([] :: [TTerm Java.Annotation]))
-
-javaCastExpression :: TTermDefinition (Java.ReferenceType -> Java.UnaryExpression -> Java.CastExpression)
-javaCastExpression = def "javaCastExpression" $
-  lambda "rt" $ lambda "expr" $
-    JavaDsl.castExpressionNotPlusMinus
-      (JavaDsl.castExpressionNotPlusMinus_
-        (JavaDsl.castExpressionRefAndBounds (var "rt") (list ([] :: [TTerm Java.AdditionalBound])))
-        (var "expr"))
-
-javaCastExpressionToJavaExpression :: TTermDefinition (Java.CastExpression -> Java.Expression)
-javaCastExpressionToJavaExpression = def "javaCastExpressionToJavaExpression" $
-  lambda "ce" $ JavaDsl.castExpressionToExpression (var "ce")
-
-javaCastPrimitive :: TTermDefinition (Java.PrimitiveType -> Java.UnaryExpression -> Java.CastExpression)
-javaCastPrimitive = def "javaCastPrimitive" $
-  lambda "pt" $ lambda "expr" $
-    JavaDsl.castExpressionPrimitive
-      (JavaDsl.castExpressionPrimitive_
-        (JavaDsl.primitiveTypeWithAnnotations (var "pt") (list ([] :: [TTerm Java.Annotation])))
-        (var "expr"))
-
--- | Build a Java class declaration with optional superclass
-javaClassDeclaration :: TTermDefinition (JavaHelpers.Aliases -> [Java.TypeParameter] -> Name -> [Java.ClassModifier]
-  -> Maybe Name -> [Java.InterfaceType] -> [Java.ClassBodyDeclarationWithComments] -> Java.ClassDeclaration)
-javaClassDeclaration = def "javaClassDeclaration" $
-  lambda "aliases" $ lambda "tparams" $ lambda "elName" $ lambda "mods" $
-    lambda "supname" $ lambda "impls" $ lambda "bodyDecls" $ lets [
-    "extends_">: Maybes.map
-      (lambda "n" $ nameToJavaClassType @@ var "aliases" @@ boolean True @@ list ([] :: [TTerm Java.TypeArgument]) @@ var "n" @@ nothing)
-      (var "supname")] $
-    inject Java._ClassDeclaration Java._ClassDeclaration_normal
-      (record Java._NormalClassDeclaration [
-        Java._NormalClassDeclaration_modifiers>>: var "mods",
-        Java._NormalClassDeclaration_identifier>>: javaDeclName @@ var "elName",
-        Java._NormalClassDeclaration_parameters>>: var "tparams",
-        Java._NormalClassDeclaration_extends>>: var "extends_",
-        Java._NormalClassDeclaration_implements>>: var "impls",
-        Java._NormalClassDeclaration_body>>: JavaDsl.classBody (var "bodyDecls")])
-
-javaClassType :: TTermDefinition ([Java.ReferenceType] -> Maybe Java.PackageName -> String -> Java.ClassType)
-javaClassType = def "javaClassType" $
-  lambda "args" $ lambda "pkg" $ lambda "id" $ lets [
-    "qual">: Maybes.cases (var "pkg")
-      JavaDsl.classTypeQualifierNone
-      (lambda "p" $ JavaDsl.classTypeQualifierPackage (var "p")),
-    "targs">: Lists.map
-      (lambda "rt" $ JavaDsl.typeArgumentReference (var "rt"))
-      (var "args")] $
-    JavaDsl.classType (list ([] :: [TTerm Java.Annotation])) (var "qual")
-      (javaTypeIdentifier @@ var "id") (var "targs")
-
-javaClassTypeToJavaType :: TTermDefinition (Java.ClassType -> Java.Type)
-javaClassTypeToJavaType = def "javaClassTypeToJavaType" $
-  lambda "ct" $ JavaDsl.typeReference
-    (JavaDsl.referenceTypeClassOrInterface
-      (JavaDsl.classOrInterfaceTypeClass (var "ct")))
-
-javaConditionalAndExpressionToJavaExpression :: TTermDefinition (Java.ConditionalAndExpression -> Java.Expression)
-javaConditionalAndExpressionToJavaExpression = def "javaConditionalAndExpressionToJavaExpression" $
-  lambda "cae" $ JavaDsl.conditionalAndToExpression (var "cae")
-
-javaConstructorCall :: TTermDefinition (Java.ClassOrInterfaceTypeToInstantiate -> [Java.Expression] -> Maybe Java.ClassBody -> Java.Expression)
-javaConstructorCall = def "javaConstructorCall" $
-  lambda "ci" $ lambda "args" $ lambda "mbody" $
-    JavaDsl.primaryToExpression
-      (JavaDsl.primaryNoNewArray
-        (JavaDsl.primaryClassInstance
-          (JavaDsl.classInstanceCreationExpression nothing
-            (JavaDsl.unqualifiedClassInstanceCreationExpression
-              (list ([] :: [TTerm Java.TypeArgument])) (var "ci") (var "args") (var "mbody")))))
-
-javaConstructorName :: TTermDefinition (Java.Identifier -> Maybe Java.TypeArgumentsOrDiamond -> Java.ClassOrInterfaceTypeToInstantiate)
-javaConstructorName = def "javaConstructorName" $
-  lambda "id" $ lambda "targs" $
-    JavaDsl.classOrInterfaceTypeToInstantiate
-      (list [JavaDsl.annotatedIdentifier (list ([] :: [TTerm Java.Annotation])) (var "id")])
-      (var "targs")
-
-javaDeclName :: TTermDefinition (Name -> Java.TypeIdentifier)
-javaDeclName = def "javaDeclName" $
-  lambda "name" $ JavaDsl.typeIdentifier (javaVariableName @@ var "name")
-
--- | Create a double cast expression: first cast to raw type, then to target type
-javaDoubleCastExpression :: TTermDefinition (Java.ReferenceType -> Java.ReferenceType -> Java.UnaryExpression -> Java.CastExpression)
-javaDoubleCastExpression = def "javaDoubleCastExpression" $
-  lambda "rawRt" $ lambda "targetRt" $ lambda "expr" $ lets [
-    "firstCast">: javaCastExpressionToJavaExpression @@ (javaCastExpression @@ var "rawRt" @@ var "expr")] $
-    javaCastExpression @@ var "targetRt" @@ (javaExpressionToJavaUnaryExpression @@ var "firstCast")
-
--- | Create a double cast expression and convert to Java expression
-javaDoubleCastExpressionToJavaExpression :: TTermDefinition (Java.ReferenceType -> Java.ReferenceType -> Java.UnaryExpression -> Java.Expression)
-javaDoubleCastExpressionToJavaExpression = def "javaDoubleCastExpressionToJavaExpression" $
-  lambda "rawRt" $ lambda "targetRt" $ lambda "expr" $
-    javaCastExpressionToJavaExpression @@ (javaDoubleCastExpression @@ var "rawRt" @@ var "targetRt" @@ var "expr")
-
-javaEmptyStatement :: TTermDefinition Java.Statement
-javaEmptyStatement = def "javaEmptyStatement" $
-  JavaDsl.statementWithoutTrailing JavaDsl.stmtEmpty
-
-javaEqualityExpressionToJavaExpression :: TTermDefinition (Java.EqualityExpression -> Java.Expression)
-javaEqualityExpressionToJavaExpression = def "javaEqualityExpressionToJavaExpression" $
-  lambda "ee" $ JavaDsl.equalityToExpression (var "ee")
-
-javaEqualityExpressionToJavaInclusiveOrExpression :: TTermDefinition (Java.EqualityExpression -> Java.InclusiveOrExpression)
-javaEqualityExpressionToJavaInclusiveOrExpression = def "javaEqualityExpressionToJavaInclusiveOrExpression" $
-  lambda "ee" $ JavaDsl.equalityToInclusiveOr (var "ee")
-
-javaEquals :: TTermDefinition (Java.EqualityExpression -> Java.RelationalExpression -> Java.EqualityExpression)
-javaEquals = def "javaEquals" $
-  lambda "lhs" $ lambda "rhs" $
-    JavaDsl.equalityExpressionEqual
-      (JavaDsl.equalityExpressionBinary (var "lhs") (var "rhs"))
-
-javaEqualsNull :: TTermDefinition (Java.EqualityExpression -> Java.EqualityExpression)
-javaEqualsNull = def "javaEqualsNull" $
-  lambda "lhs" $ javaEquals @@ var "lhs" @@
-    (javaLiteralToJavaRelationalExpression @@ JavaDsl.literalNull)
-
-javaExpressionNameToJavaExpression :: TTermDefinition (Java.ExpressionName -> Java.Expression)
-javaExpressionNameToJavaExpression = def "javaExpressionNameToJavaExpression" $
-  lambda "en" $ JavaDsl.expressionNameToExpression (var "en")
-
-javaExpressionToJavaPrimary :: TTermDefinition (Java.Expression -> Java.Primary)
-javaExpressionToJavaPrimary = def "javaExpressionToJavaPrimary" $
-  doc "Convert an Expression to a Primary, avoiding unnecessary parentheses when the expression is already a simple primary chain" $
-  lambda "e" $
-    -- Try to unwrap Expression -> AssignmentExpression(conditional) -> ConditionalExpression(simple) -> ...
-    -- If the expression is just a wrapped Primary, extract it; otherwise wrap in parens
-    "fallback" <~ JavaDsl.expressionToPrimary (var "e") $
-    cases Java._Expression (var "e") (Just $ var "fallback") [
-      Java._Expression_assignment>>: "ae" ~>
-        cases Java._AssignmentExpression (var "ae") (Just $ var "fallback") [
-          Java._AssignmentExpression_conditional>>: "ce" ~>
-            cases Java._ConditionalExpression (var "ce") (Just $ var "fallback") [
-              Java._ConditionalExpression_simple>>: "cor" ~>
-                "cands" <~ unwrap Java._ConditionalOrExpression @@ var "cor" $
-                -- Walk down the operator precedence chain, requiring each level
-                -- to have a single element and unwrapping through to a bare Primary.
-                -- We keep the expression intact (original form) if any step fails.
-                Maybes.fromMaybe (var "fallback") $
-                  Maybes.bind (Lists.maybeHead $ var "cands") $ lambda "candHead" $
-                  "iors" <~ unwrap Java._ConditionalAndExpression @@ var "candHead" $
-                  Maybes.bind (Lists.maybeHead $ var "iors") $ lambda "iorHead" $
-                  "xors" <~ unwrap Java._InclusiveOrExpression @@ var "iorHead" $
-                  Maybes.bind (Lists.maybeHead $ var "xors") $ lambda "xorHead" $
-                  "ands" <~ unwrap Java._ExclusiveOrExpression @@ var "xorHead" $
-                  Maybes.bind (Lists.maybeHead $ var "ands") $ lambda "andHead" $
-                  "eqs" <~ unwrap Java._AndExpression @@ var "andHead" $
-                  Maybes.bind (Lists.maybeHead $ var "eqs") $ lambda "eqHead" $
-                  just $ cases Java._EqualityExpression (var "eqHead") (Just $ var "fallback") [
-                    Java._EqualityExpression_unary>>: "rel" ~>
-                      cases Java._RelationalExpression (var "rel") (Just $ var "fallback") [
-                        Java._RelationalExpression_simple>>: "shift" ~>
-                          cases Java._ShiftExpression (var "shift") (Just $ var "fallback") [
-                            Java._ShiftExpression_unary>>: "add" ~>
-                              cases Java._AdditiveExpression (var "add") (Just $ var "fallback") [
-                                Java._AdditiveExpression_unary>>: "mul" ~>
-                                  cases Java._MultiplicativeExpression (var "mul") (Just $ var "fallback") [
-                                    Java._MultiplicativeExpression_unary>>: "unary" ~>
-                                      cases Java._UnaryExpression (var "unary") (Just $ var "fallback") [
-                                        Java._UnaryExpression_other>>: "npm" ~>
-                                          cases Java._UnaryExpressionNotPlusMinus (var "npm") (Just $ var "fallback") [
-                                            Java._UnaryExpressionNotPlusMinus_postfix>>: "pf" ~>
-                                              cases Java._PostfixExpression (var "pf") (Just $ var "fallback") [
-                                                Java._PostfixExpression_primary>>: "p" ~> var "p"]]]]]]]]]]]
-
-javaExpressionToJavaUnaryExpression :: TTermDefinition (Java.Expression -> Java.UnaryExpression)
-javaExpressionToJavaUnaryExpression = def "javaExpressionToJavaUnaryExpression" $
-  lambda "e" $ JavaDsl.expressionToUnary (var "e")
-
-javaFieldAccessToJavaExpression :: TTermDefinition (Java.FieldAccess -> Java.Expression)
-javaFieldAccessToJavaExpression = def "javaFieldAccessToJavaExpression" $
-  lambda "fa" $ JavaDsl.fieldAccessToExpression (var "fa")
-
-javaIdentifier :: TTermDefinition (String -> Java.Identifier)
-javaIdentifier = def "javaIdentifier" $
-  lambda "s" $ JavaDsl.identifier (sanitizeJavaName @@ var "s")
-
-javaIdentifierToJavaExpression :: TTermDefinition (Java.Identifier -> Java.Expression)
-javaIdentifierToJavaExpression = def "javaIdentifierToJavaExpression" $
-  lambda "id" $ JavaDsl.identifierToExpression (var "id")
-
-javaIdentifierToJavaExpressionName :: TTermDefinition (Java.Identifier -> Java.ExpressionName)
-javaIdentifierToJavaExpressionName = def "javaIdentifierToJavaExpressionName" $
-  lambda "id" $ JavaDsl.expressionName nothing (var "id")
-
-javaIdentifierToJavaRelationalExpression :: TTermDefinition (Java.Identifier -> Java.RelationalExpression)
-javaIdentifierToJavaRelationalExpression = def "javaIdentifierToJavaRelationalExpression" $
-  lambda "id" $ JavaDsl.identifierToRelationalExpression (var "id")
-
-javaIdentifierToJavaUnaryExpression :: TTermDefinition (Java.Identifier -> Java.UnaryExpression)
-javaIdentifierToJavaUnaryExpression = def "javaIdentifierToJavaUnaryExpression" $
-  lambda "id" $ JavaDsl.identifierToUnary (var "id")
-
-javaInstanceOf :: TTermDefinition (Java.RelationalExpression -> Java.ReferenceType -> Java.RelationalExpression)
-javaInstanceOf = def "javaInstanceOf" $
-  lambda "lhs" $ lambda "rhs" $
-    JavaDsl.relationalExpressionInstanceOf
-      (JavaDsl.relationalExpressionInstanceOf_ (var "lhs") (var "rhs"))
-
-javaInt :: TTermDefinition (Int -> Java.Literal)
-javaInt = def "javaInt" $
-  lambda "i" $ JavaDsl.literalInteger (JavaDsl.integerLiteral (var "i"))
-
-javaIntExpression :: TTermDefinition (Int -> Java.Expression)
-javaIntExpression = def "javaIntExpression" $
-  lambda "i" $ javaPrimaryToJavaExpression @@ (javaLiteralToJavaPrimary @@ (javaInt @@ var "i"))
-
-javaIntType :: TTermDefinition Java.Type
-javaIntType = def "javaIntType" $
-  javaPrimitiveTypeToJavaType @@
-    JavaDsl.primitiveTypeNumeric (JavaDsl.numericTypeIntegral JavaDsl.integralTypeInt)
-
-javaInterfaceDeclarationToJavaClassBodyDeclaration :: TTermDefinition (Java.NormalInterfaceDeclaration -> Java.ClassBodyDeclaration)
-javaInterfaceDeclarationToJavaClassBodyDeclaration = def "javaInterfaceDeclarationToJavaClassBodyDeclaration" $
-  lambda "nid" $ JavaDsl.classBodyDeclClassMember
-    (JavaDsl.classMemberDeclInterface
-      (JavaDsl.interfaceDeclarationNormalInterface (var "nid")))
-
-javaLambda :: TTermDefinition (Name -> Java.Expression -> Java.Expression)
-javaLambda = def "javaLambda" $
-  lambda "v" $ lambda "body" $
-    JavaDsl.expressionLambda
-      (JavaDsl.lambdaExpression
-        (JavaDsl.lambdaParametersSingle (variableToJavaIdentifier @@ var "v"))
-        (JavaDsl.lambdaBodyExpression (var "body")))
-
-javaLambdaFromBlock :: TTermDefinition (Name -> Java.Block -> Java.Expression)
-javaLambdaFromBlock = def "javaLambdaFromBlock" $
-  lambda "v" $ lambda "block" $
-    JavaDsl.expressionLambda
-      (JavaDsl.lambdaExpression
-        (JavaDsl.lambdaParametersSingle (variableToJavaIdentifier @@ var "v"))
-        (JavaDsl.lambdaBodyBlock (var "block")))
-
-javaLiteralToJavaExpression :: TTermDefinition (Java.Literal -> Java.Expression)
-javaLiteralToJavaExpression = def "javaLiteralToJavaExpression" $
-  lambda "lit" $ JavaDsl.literalToExpression (var "lit")
-
-javaLiteralToJavaMultiplicativeExpression :: TTermDefinition (Java.Literal -> Java.MultiplicativeExpression)
-javaLiteralToJavaMultiplicativeExpression = def "javaLiteralToJavaMultiplicativeExpression" $
-  lambda "lit" $ JavaDsl.literalToMultiplicativeExpression (var "lit")
-
-javaLiteralToJavaPrimary :: TTermDefinition (Java.Literal -> Java.Primary)
-javaLiteralToJavaPrimary = def "javaLiteralToJavaPrimary" $
-  lambda "lit" $ JavaDsl.literalToPrimary (var "lit")
-
-javaLiteralToJavaRelationalExpression :: TTermDefinition (Java.Literal -> Java.RelationalExpression)
-javaLiteralToJavaRelationalExpression = def "javaLiteralToJavaRelationalExpression" $
-  lambda "lit" $ JavaDsl.literalToRelationalExpression (var "lit")
-
-javaMemberField :: TTermDefinition ([Java.FieldModifier] -> Java.Type -> Java.VariableDeclarator -> Java.ClassBodyDeclaration)
-javaMemberField = def "javaMemberField" $
-  lambda "mods" $ lambda "jt" $ lambda "v" $
-    JavaDsl.classBodyDeclClassMember
-      (JavaDsl.classMemberDeclField
-        (JavaDsl.fieldDeclaration (var "mods") (JavaDsl.unannType (var "jt")) (list [var "v"])))
-
-javaMethodBody :: TTermDefinition (Maybe [Java.BlockStatement] -> Java.MethodBody)
-javaMethodBody = def "javaMethodBody" $
-  lambda "mstmts" $ Maybes.cases (var "mstmts")
-    JavaDsl.methodBodyNone
-    (lambda "stmts" $ JavaDsl.methodBodyBlock (JavaDsl.block (var "stmts")))
-
-javaMethodDeclarationToJavaClassBodyDeclaration :: TTermDefinition (Java.MethodDeclaration -> Java.ClassBodyDeclaration)
-javaMethodDeclarationToJavaClassBodyDeclaration = def "javaMethodDeclarationToJavaClassBodyDeclaration" $
-  lambda "md" $ JavaDsl.classBodyDeclClassMember (JavaDsl.classMemberDeclMethod (var "md"))
-
-javaMethodHeader :: TTermDefinition ([Java.TypeParameter] -> String -> [Java.FormalParameter] -> Java.Result -> Java.MethodHeader)
-javaMethodHeader = def "javaMethodHeader" $
-  lambda "tparams" $ lambda "methodName" $ lambda "params" $ lambda "result" $
-    JavaDsl.methodHeader (var "tparams") (var "result")
-      (JavaDsl.methodDeclarator (JavaDsl.identifier (var "methodName")) nothing (var "params"))
-      nothing
-
-javaMethodInvocationToJavaExpression :: TTermDefinition (Java.MethodInvocation -> Java.Expression)
-javaMethodInvocationToJavaExpression = def "javaMethodInvocationToJavaExpression" $
-  lambda "mi" $ JavaDsl.methodInvocationToExpression (var "mi")
-
-javaMethodInvocationToJavaPostfixExpression :: TTermDefinition (Java.MethodInvocation -> Java.PostfixExpression)
-javaMethodInvocationToJavaPostfixExpression = def "javaMethodInvocationToJavaPostfixExpression" $
-  lambda "mi" $ JavaDsl.methodInvocationToPostfix (var "mi")
-
-javaMethodInvocationToJavaPrimary :: TTermDefinition (Java.MethodInvocation -> Java.Primary)
-javaMethodInvocationToJavaPrimary = def "javaMethodInvocationToJavaPrimary" $
-  lambda "mi" $ JavaDsl.methodInvocationToPrimary (var "mi")
-
-javaMethodInvocationToJavaStatement :: TTermDefinition (Java.MethodInvocation -> Java.Statement)
-javaMethodInvocationToJavaStatement = def "javaMethodInvocationToJavaStatement" $
-  lambda "mi" $ JavaDsl.methodInvocationToStatement (var "mi")
-
-javaMultiplicativeExpressionToJavaRelationalExpression :: TTermDefinition (Java.MultiplicativeExpression -> Java.RelationalExpression)
-javaMultiplicativeExpressionToJavaRelationalExpression = def "javaMultiplicativeExpressionToJavaRelationalExpression" $
-  lambda "me" $ JavaDsl.relationalExpressionSimple
-    (JavaDsl.shiftExpressionUnary
-      (JavaDsl.additiveExpressionUnary (var "me")))
-
-javaPackageDeclaration :: TTermDefinition (Namespace -> Java.PackageDeclaration)
-javaPackageDeclaration = def "javaPackageDeclaration" $
-  lambda "ns" $ JavaDsl.packageDeclaration
-    (list ([] :: [TTerm Java.PackageModifier]))
-    (Lists.map (lambda "s" $ JavaDsl.identifier (var "s")) (Strings.splitOn (string ".") (Packaging.unNamespace $ var "ns")))
-
-javaPostfixExpressionToJavaEqualityExpression :: TTermDefinition (Java.PostfixExpression -> Java.EqualityExpression)
-javaPostfixExpressionToJavaEqualityExpression = def "javaPostfixExpressionToJavaEqualityExpression" $
-  lambda "pe" $ JavaDsl.equalityExpressionUnary
-    (JavaDsl.postfixToRelationalExpression (var "pe"))
-
-javaPostfixExpressionToJavaExpression :: TTermDefinition (Java.PostfixExpression -> Java.Expression)
-javaPostfixExpressionToJavaExpression = def "javaPostfixExpressionToJavaExpression" $
-  lambda "pe" $ JavaDsl.postfixToExpression (var "pe")
-
-javaPostfixExpressionToJavaInclusiveOrExpression :: TTermDefinition (Java.PostfixExpression -> Java.InclusiveOrExpression)
-javaPostfixExpressionToJavaInclusiveOrExpression = def "javaPostfixExpressionToJavaInclusiveOrExpression" $
-  lambda "pe" $ JavaDsl.postfixToInclusiveOr (var "pe")
-
-javaPostfixExpressionToJavaRelationalExpression :: TTermDefinition (Java.PostfixExpression -> Java.RelationalExpression)
-javaPostfixExpressionToJavaRelationalExpression = def "javaPostfixExpressionToJavaRelationalExpression" $
-  lambda "pe" $ JavaDsl.postfixToRelationalExpression (var "pe")
-
-javaPostfixExpressionToJavaUnaryExpression :: TTermDefinition (Java.PostfixExpression -> Java.UnaryExpression)
-javaPostfixExpressionToJavaUnaryExpression = def "javaPostfixExpressionToJavaUnaryExpression" $
-  lambda "pe" $ JavaDsl.unaryExpressionOther
-    (JavaDsl.unaryExpressionNotPlusMinusPostfix (var "pe"))
-
-javaPrimaryToJavaExpression :: TTermDefinition (Java.Primary -> Java.Expression)
-javaPrimaryToJavaExpression = def "javaPrimaryToJavaExpression" $
-  lambda "p" $ JavaDsl.primaryToExpression (var "p")
-
-javaPrimaryToJavaUnaryExpression :: TTermDefinition (Java.Primary -> Java.UnaryExpression)
-javaPrimaryToJavaUnaryExpression = def "javaPrimaryToJavaUnaryExpression" $
-  lambda "p" $ JavaDsl.unaryExpressionOther
-    (JavaDsl.unaryExpressionNotPlusMinusPostfix
-      (JavaDsl.postfixExpressionPrimary (var "p")))
-
-javaPrimitiveTypeToJavaType :: TTermDefinition (Java.PrimitiveType -> Java.Type)
-javaPrimitiveTypeToJavaType = def "javaPrimitiveTypeToJavaType" $
-  lambda "pt" $ JavaDsl.typePrimitive
-    (JavaDsl.primitiveTypeWithAnnotations (var "pt") (list ([] :: [TTerm Java.Annotation])))
-
-javaRefType :: TTermDefinition ([Java.ReferenceType] -> Maybe Java.PackageName -> String -> Java.Type)
-javaRefType = def "javaRefType" $
-  lambda "args" $ lambda "pkg" $ lambda "id" $
-    JavaDsl.typeReference
-      (JavaDsl.referenceTypeClassOrInterface
-        (JavaDsl.classOrInterfaceTypeClass
-          (javaClassType @@ var "args" @@ var "pkg" @@ var "id")))
-
--- | Extract the raw type (without type arguments) from a reference type
-javaReferenceTypeToRawType :: TTermDefinition (Java.ReferenceType -> Java.ReferenceType)
-javaReferenceTypeToRawType = def "javaReferenceTypeToRawType" $
-  lambda "rt" $ cases Java._ReferenceType (var "rt")
-    (Just $ var "rt") [
-    Java._ReferenceType_classOrInterface>>: lambda "cit" $
-      cases Java._ClassOrInterfaceType (var "cit") Nothing [
-        Java._ClassOrInterfaceType_class>>: lambda "ct" $ lets [
-          "anns">: project Java._ClassType Java._ClassType_annotations @@ var "ct",
-          "qual">: project Java._ClassType Java._ClassType_qualifier @@ var "ct",
-          "id">: project Java._ClassType Java._ClassType_identifier @@ var "ct"] $
-          JavaDsl.referenceTypeClassOrInterface
-            (JavaDsl.classOrInterfaceTypeClass
-              (JavaDsl.classType (var "anns") (var "qual") (var "id")
-                (list ([] :: [TTerm Java.TypeArgument])))),
-        Java._ClassOrInterfaceType_interface>>: lambda "it" $ lets [
-          "ct">: unwrap Java._InterfaceType @@ var "it",
-          "anns">: project Java._ClassType Java._ClassType_annotations @@ var "ct",
-          "qual">: project Java._ClassType Java._ClassType_qualifier @@ var "ct",
-          "id">: project Java._ClassType Java._ClassType_identifier @@ var "ct"] $
-          JavaDsl.referenceTypeClassOrInterface
-            (inject Java._ClassOrInterfaceType Java._ClassOrInterfaceType_interface
-              (JavaDsl.interfaceType
-                (JavaDsl.classType (var "anns") (var "qual") (var "id")
-                  (list ([] :: [TTerm Java.TypeArgument])))))]]
-
-javaRelationalExpressionToJavaEqualityExpression :: TTermDefinition (Java.RelationalExpression -> Java.EqualityExpression)
-javaRelationalExpressionToJavaEqualityExpression = def "javaRelationalExpressionToJavaEqualityExpression" $
-  lambda "re" $ JavaDsl.equalityExpressionUnary (var "re")
-
-javaRelationalExpressionToJavaExpression :: TTermDefinition (Java.RelationalExpression -> Java.Expression)
-javaRelationalExpressionToJavaExpression = def "javaRelationalExpressionToJavaExpression" $
-  lambda "re" $ javaEqualityExpressionToJavaExpression @@
-    (JavaDsl.equalityExpressionUnary (var "re"))
-
-javaRelationalExpressionToJavaUnaryExpression :: TTermDefinition (Java.RelationalExpression -> Java.UnaryExpression)
-javaRelationalExpressionToJavaUnaryExpression = def "javaRelationalExpressionToJavaUnaryExpression" $
-  lambda "re" $ JavaDsl.relationalToUnary (var "re")
-
-javaReturnStatement :: TTermDefinition (Maybe Java.Expression -> Java.Statement)
-javaReturnStatement = def "javaReturnStatement" $
-  lambda "mex" $ JavaDsl.statementWithoutTrailing
-    (JavaDsl.stmtReturn (JavaDsl.returnStatement (var "mex")))
-
-javaStatementsToBlock :: TTermDefinition ([Java.Statement] -> Java.Block)
-javaStatementsToBlock = def "javaStatementsToBlock" $
-  lambda "stmts" $ JavaDsl.block
-    (Lists.map (lambda "s" $ JavaDsl.blockStatementStatement (var "s")) (var "stmts"))
-
-javaString :: TTermDefinition (String -> Java.Literal)
-javaString = def "javaString" $
-  lambda "s" $ JavaDsl.literalString (JavaDsl.stringLiteral (var "s"))
-
--- | Convert a string to a multiplicative expression (for string concatenation)
-javaStringMultiplicativeExpression :: TTermDefinition (String -> Java.MultiplicativeExpression)
-javaStringMultiplicativeExpression = def "javaStringMultiplicativeExpression" $
-  lambda "s" $ javaLiteralToJavaMultiplicativeExpression @@ (javaString @@ var "s")
-
-javaThis :: TTermDefinition Java.Expression
-javaThis = def "javaThis" $
-  JavaDsl.primaryToExpression
-    (JavaDsl.primaryNoNewArray JavaDsl.primaryThis)
-
-javaThrowIllegalArgumentException :: TTermDefinition ([Java.Expression] -> Java.Statement)
-javaThrowIllegalArgumentException = def "javaThrowIllegalArgumentException" $
-  lambda "args" $ javaThrowStatement @@
-    (javaConstructorCall @@
-      (javaConstructorName @@ JavaDsl.identifier (string "IllegalArgumentException") @@ nothing) @@
-      var "args" @@ nothing)
-
-javaThrowIllegalStateException :: TTermDefinition ([Java.Expression] -> Java.Statement)
-javaThrowIllegalStateException = def "javaThrowIllegalStateException" $
-  lambda "args" $ javaThrowStatement @@
-    (javaConstructorCall @@
-      (javaConstructorName @@ JavaDsl.identifier (string "IllegalStateException") @@ nothing) @@
-      var "args" @@ nothing)
-
-javaThrowStatement :: TTermDefinition (Java.Expression -> Java.Statement)
-javaThrowStatement = def "javaThrowStatement" $
-  lambda "e" $ JavaDsl.statementWithoutTrailing
-    (JavaDsl.stmtThrow (JavaDsl.throwStatement (var "e")))
-
--- | Build a Java Type from a type name (for use as formal parameter types)
-javaTypeFromTypeName :: TTermDefinition (JavaHelpers.Aliases -> Name -> Java.Type)
-javaTypeFromTypeName = def "javaTypeFromTypeName" $
-  lambda "aliases" $ lambda "elName" $
-    javaTypeVariableToType @@
-      (JavaDsl.typeVariable
-        (list ([] :: [TTerm Java.Annotation]))
-        (nameToJavaTypeIdentifier @@ var "aliases" @@ boolean False @@ var "elName"))
-
-javaTypeIdentifier :: TTermDefinition (String -> Java.TypeIdentifier)
-javaTypeIdentifier = def "javaTypeIdentifier" $
-  lambda "s" $ JavaDsl.typeIdentifier (JavaDsl.identifier (var "s"))
-
-javaTypeIdentifierToJavaTypeArgument :: TTermDefinition (Java.TypeIdentifier -> Java.TypeArgument)
-javaTypeIdentifierToJavaTypeArgument = def "javaTypeIdentifierToJavaTypeArgument" $
-  lambda "id" $ JavaDsl.typeArgumentReference
-    (JavaDsl.referenceTypeVariable
-      (JavaDsl.typeVariable (list ([] :: [TTerm Java.Annotation])) (var "id")))
-
-javaTypeName :: TTermDefinition (Java.Identifier -> Java.TypeName)
-javaTypeName = def "javaTypeName" $
-  lambda "id" $ JavaDsl.typeName (JavaDsl.typeIdentifier (var "id")) nothing
-
-javaTypeParameter :: TTermDefinition (String -> Java.TypeParameter)
-javaTypeParameter = def "javaTypeParameter" $
-  lambda "v" $ JavaDsl.typeParameter
-    (list ([] :: [TTerm Java.TypeParameterModifier]))
-    (javaTypeIdentifier @@ var "v")
-    nothing
-
-javaTypeToJavaFormalParameter :: TTermDefinition (Java.Type -> Name -> Java.FormalParameter)
-javaTypeToJavaFormalParameter = def "javaTypeToJavaFormalParameter" $
-  lambda "jt" $ lambda "fname" $
-    JavaDsl.formalParameterSimple
-      (JavaDsl.formalParameterSimple_ (list ([] :: [TTerm Java.VariableModifier]))
-        (JavaDsl.unannType (var "jt"))
-        (fieldNameToJavaVariableDeclaratorId @@ var "fname"))
-
--- | Extract the reference type from a Java type, failing if it's a primitive type
-javaTypeToJavaReferenceType :: TTermDefinition (Java.Type -> Context -> Either Error Java.ReferenceType)
-javaTypeToJavaReferenceType = def "javaTypeToJavaReferenceType" $
-  lambda "t" $ "cx" ~>
-  cases Java._Type (var "t") Nothing [
-    Java._Type_reference>>: lambda "rt" $ right (var "rt"),
-    Java._Type_primitive>>: constant $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "expected a Java reference type") (var "cx")]
-
-javaTypeToJavaResult :: TTermDefinition (Java.Type -> Java.Result)
-javaTypeToJavaResult = def "javaTypeToJavaResult" $
-  lambda "jt" $ JavaDsl.resultType (JavaDsl.unannType (var "jt"))
-
-javaTypeToJavaTypeArgument :: TTermDefinition (Java.Type -> Java.TypeArgument)
-javaTypeToJavaTypeArgument = def "javaTypeToJavaTypeArgument" $
-  lambda "t" $ cases Java._Type (var "t") Nothing [
-    Java._Type_reference>>: lambda "rt" $ JavaDsl.typeArgumentReference (var "rt"),
-    Java._Type_primitive>>: constant $
-      JavaDsl.typeArgumentWildcard
-        (JavaDsl.wildcard (list ([] :: [TTerm Java.Annotation])) nothing)]
-
-javaTypeVariable :: TTermDefinition (String -> Java.ReferenceType)
-javaTypeVariable = def "javaTypeVariable" $
-  lambda "v" $ JavaDsl.referenceTypeVariable
-    (JavaDsl.typeVariable (list ([] :: [TTerm Java.Annotation]))
-      (javaTypeIdentifier @@ (Formatting.capitalize @@ var "v")))
-
-javaTypeVariableToType :: TTermDefinition (Java.TypeVariable -> Java.Type)
-javaTypeVariableToType = def "javaTypeVariableToType" $
-  lambda "tv" $ JavaDsl.typeReference (JavaDsl.referenceTypeVariable (var "tv"))
-
-javaUnaryExpressionToJavaExpression :: TTermDefinition (Java.UnaryExpression -> Java.Expression)
-javaUnaryExpressionToJavaExpression = def "javaUnaryExpressionToJavaExpression" $
-  lambda "ue" $ JavaDsl.unaryToExpression (var "ue")
-
-javaUnaryExpressionToJavaRelationalExpression :: TTermDefinition (Java.UnaryExpression -> Java.RelationalExpression)
-javaUnaryExpressionToJavaRelationalExpression = def "javaUnaryExpressionToJavaRelationalExpression" $
-  lambda "ue" $ JavaDsl.relationalExpressionSimple
-    (JavaDsl.shiftExpressionUnary
-      (JavaDsl.additiveExpressionUnary
-        (JavaDsl.multiplicativeExpressionUnary (var "ue"))))
-
-javaVariableDeclarator :: TTermDefinition (Java.Identifier -> Maybe Java.VariableInitializer -> Java.VariableDeclarator)
-javaVariableDeclarator = def "javaVariableDeclarator" $
-  lambda "id" $ lambda "minit" $ JavaDsl.variableDeclarator (javaVariableDeclaratorId @@ var "id") (var "minit")
-
-javaVariableDeclaratorId :: TTermDefinition (Java.Identifier -> Java.VariableDeclaratorId)
-javaVariableDeclaratorId = def "javaVariableDeclaratorId" $
-  lambda "id" $ JavaDsl.variableDeclaratorId (var "id") nothing
-
-javaVariableName :: TTermDefinition (Name -> Java.Identifier)
-javaVariableName = def "javaVariableName" $
-  lambda "name" $ javaIdentifier @@ (Names.localNameOf @@ var "name")
-
--- | Look up the Java variable name for a Hydra variable, applying any renames
-lookupJavaVarName :: TTermDefinition (JavaHelpers.Aliases -> Name -> Name)
-lookupJavaVarName = def "lookupJavaVarName" $
-  lambda "aliases" $ lambda "name" $
-    Maybes.cases
-      (Maps.lookup (var "name")
-        (project JavaHelpers._Aliases JavaHelpers._Aliases_varRenames @@ var "aliases"))
-      (var "name")
-      (lambda "renamed" $ var "renamed")
-
--- | Build a Java constructor declaration
-makeConstructor :: TTermDefinition (JavaHelpers.Aliases -> Name -> Bool -> [Java.FormalParameter]
-  -> [Java.BlockStatement] -> Java.ClassBodyDeclaration)
-makeConstructor = def "makeConstructor" $
-  lambda "aliases" $ lambda "elName" $ lambda "private" $ lambda "params" $ lambda "stmts" $ lets [
-    "nm">: JavaDsl.simpleTypeName (nameToJavaTypeIdentifier @@ var "aliases" @@ boolean False @@ var "elName"),
-    "cons">: JavaDsl.constructorDeclarator (list ([] :: [TTerm Java.TypeParameter])) (var "nm") nothing (var "params"),
-    "mods">: list [Logic.ifElse (var "private")
-      (inject Java._ConstructorModifier Java._ConstructorModifier_private unit)
-      (inject Java._ConstructorModifier Java._ConstructorModifier_public unit)],
-    "body">: JavaDsl.constructorBody nothing (var "stmts")] $
-    inject Java._ClassBodyDeclaration Java._ClassBodyDeclaration_constructorDeclaration
-      (JavaDsl.constructorDeclaration (var "mods") (var "cons") nothing (var "body"))
-
-methodDeclaration :: TTermDefinition ([Java.MethodModifier] -> [Java.TypeParameter] -> [Java.Annotation]
-  -> String -> [Java.FormalParameter] -> Java.Result -> Maybe [Java.BlockStatement] -> Java.ClassBodyDeclaration)
-methodDeclaration = def "methodDeclaration" $
-  lambda "mods" $ lambda "tparams" $ lambda "anns" $ lambda "methodName" $ lambda "params" $ lambda "result" $ lambda "stmts" $
-    javaMethodDeclarationToJavaClassBodyDeclaration @@
-      (JavaDsl.methodDeclaration_ (var "anns") (var "mods")
-        (javaMethodHeader @@ var "tparams" @@ var "methodName" @@ var "params" @@ var "result")
-        (javaMethodBody @@ var "stmts"))
-
-methodInvocation :: TTermDefinition (Maybe (Either Java.ExpressionName Java.Primary) -> Java.Identifier -> [Java.Expression] -> Java.MethodInvocation)
-methodInvocation = def "methodInvocation" $
-  lambda "lhs" $ lambda "methodName" $ lambda "args" $ lets [
-    "header">: Maybes.cases (var "lhs")
-      (JavaDsl.methodInvocationHeaderSimple (JavaDsl.methodName (var "methodName")))
-      (lambda "either" $ JavaDsl.methodInvocationHeaderComplex
-        (JavaDsl.methodInvocationComplex
-          (Eithers.either_
-            (lambda "en" $ JavaDsl.methodInvocationVariantExpression (var "en"))
-            (lambda "p" $ JavaDsl.methodInvocationVariantPrimary (var "p"))
-            (var "either"))
-          (list ([] :: [TTerm Java.TypeArgument]))
-          (var "methodName")))] $
-    JavaDsl.methodInvocation_ (var "header") (var "args")
-
-methodInvocationStatic :: TTermDefinition (Java.Identifier -> Java.Identifier -> [Java.Expression] -> Java.MethodInvocation)
-methodInvocationStatic = def "methodInvocationStatic" $
-  lambda "self" $ lambda "methodName" $ lambda "args" $
-    methodInvocation @@
-      (just $ left (javaIdentifierToJavaExpressionName @@ var "self")) @@
-      var "methodName" @@
-      var "args"
-
--- | Create a static method invocation with explicit type arguments
-methodInvocationStaticWithTypeArgs :: TTermDefinition (Java.Identifier -> Java.Identifier -> [Java.TypeArgument] -> [Java.Expression] -> Java.MethodInvocation)
-methodInvocationStaticWithTypeArgs = def "methodInvocationStaticWithTypeArgs" $
-  lambda "self" $ lambda "methodName" $ lambda "targs" $ lambda "args" $ lets [
-    "header">: JavaDsl.methodInvocationHeaderComplex
-      (JavaDsl.methodInvocationComplex
-        (JavaDsl.methodInvocationVariantExpression
-          (javaIdentifierToJavaExpressionName @@ var "self"))
-        (var "targs")
-        (var "methodName"))] $
-    JavaDsl.methodInvocation_ (var "header") (var "args")
-
--- | Build a Java ClassType from a Hydra name, with type arguments and optional inner class suffix
-nameToJavaClassType :: TTermDefinition (JavaHelpers.Aliases -> Bool -> [Java.TypeArgument] -> Name -> Maybe String -> Java.ClassType)
-nameToJavaClassType = def "nameToJavaClassType" $
-  lambda "aliases" $ lambda "qualify" $ lambda "args" $ lambda "name" $ lambda "mlocal" $ lets [
-    "result">: nameToQualifiedJavaName @@ var "aliases" @@ var "qualify" @@ var "name" @@ var "mlocal",
-    "id">: Pairs.first (var "result"),
-    "pkg">: Pairs.second (var "result")] $
-    JavaDsl.classType (list ([] :: [TTerm Java.Annotation])) (var "pkg") (var "id") (var "args")
-
--- | Build a Java Identifier from a Hydra name, using the Aliases for package resolution
-nameToJavaName :: TTermDefinition (JavaHelpers.Aliases -> Name -> Java.Identifier)
-nameToJavaName = def "nameToJavaName" $
-  lambda "aliases" $ lambda "name" $ lets [
-    "qn">: Names.qualifyName @@ var "name",
-    "ns_">: Packaging.qualifiedNameNamespace (var "qn"),
-    "local">: Packaging.qualifiedNameLocal (var "qn")] $
-    Logic.ifElse (isEscaped @@ (Core.unName $ var "name"))
-      (JavaDsl.identifier (sanitizeJavaName @@ var "local"))
-      (Maybes.cases (var "ns_")
-        (JavaDsl.identifier (var "local"))
-        (lambda "gname" $ lets [
-          "parts">: Maybes.cases
-            (Maps.lookup (var "gname")
-              (project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases"))
-            (Strings.splitOn (string ".") (unwrap _Namespace @@ var "gname"))
-            (lambda "pkgName" $
-              Lists.map (lambda "i" $ unwrap Java._Identifier @@ var "i")
-                (unwrap Java._PackageName @@ var "pkgName")),
-          "allParts">: Lists.concat2 (var "parts") (list [sanitizeJavaName @@ var "local"])] $
-          JavaDsl.identifier (Strings.intercalate (string ".") (var "allParts"))))
-
--- | Build a Java ReferenceType from a Hydra name
-nameToJavaReferenceType :: TTermDefinition (JavaHelpers.Aliases -> Bool -> [Java.TypeArgument] -> Name -> Maybe String -> Java.ReferenceType)
-nameToJavaReferenceType = def "nameToJavaReferenceType" $
-  lambda "aliases" $ lambda "qualify" $ lambda "args" $ lambda "name" $ lambda "mlocal" $
-    JavaDsl.referenceTypeClassOrInterface
-      (JavaDsl.classOrInterfaceTypeClass
-        (nameToJavaClassType @@ var "aliases" @@ var "qualify" @@ var "args" @@ var "name" @@ var "mlocal"))
-
--- | Get the Java TypeIdentifier for a Hydra name
-nameToJavaTypeIdentifier :: TTermDefinition (JavaHelpers.Aliases -> Bool -> Name -> Java.TypeIdentifier)
-nameToJavaTypeIdentifier = def "nameToJavaTypeIdentifier" $
-  lambda "aliases" $ lambda "qualify" $ lambda "name" $
-    Pairs.first (nameToQualifiedJavaName @@ var "aliases" @@ var "qualify" @@ var "name" @@ nothing)
-
--- | Compute the qualified Java name (TypeIdentifier, ClassTypeQualifier) for a Hydra name.
---   If qualify is True, the namespace is converted to a package qualifier.
---   mlocal is an optional local suffix (for inner class names).
-nameToQualifiedJavaName :: TTermDefinition (JavaHelpers.Aliases -> Bool -> Name -> Maybe String
-  -> (Java.TypeIdentifier, Java.ClassTypeQualifier))
-nameToQualifiedJavaName = def "nameToQualifiedJavaName" $
-  lambda "aliases" $ lambda "qualify" $ lambda "name" $ lambda "mlocal" $ lets [
-    "qn">: Names.qualifyName @@ var "name",
-    "ns_">: Packaging.qualifiedNameNamespace (var "qn"),
-    "local">: Packaging.qualifiedNameLocal (var "qn"),
-    -- Build the alias: if ns is Just, look up in packages map; if not found, create from namespace
-    "alias">: Maybes.cases (var "ns_")
-      nothing
-      (lambda "n" $
-        just (Maybes.cases
-          (Maps.lookup (var "n")
-            (project JavaHelpers._Aliases JavaHelpers._Aliases_packages @@ var "aliases"))
-          (JavaNamesSource.javaPackageName @@ (Strings.splitOn (string ".") (unwrap _Namespace @@ var "n")))
-          (lambda "id" $ var "id"))),
-    -- Build the package qualifier
-    "pkg">: Logic.ifElse (var "qualify")
-      (Maybes.cases (var "alias") JavaDsl.classTypeQualifierNone
-        (lambda "p" $ JavaDsl.classTypeQualifierPackage (var "p")))
-      JavaDsl.classTypeQualifierNone,
-    -- Build the type identifier
-    "jid">: javaTypeIdentifier @@ (Maybes.cases (var "mlocal")
-      (sanitizeJavaName @@ var "local")
-      (lambda "l" $ (sanitizeJavaName @@ var "local") ++ string "." ++ (sanitizeJavaName @@ var "l")))] $
-    pair (var "jid") (var "pkg")
-
-overrideAnnotation :: TTermDefinition Java.Annotation
-overrideAnnotation = def "overrideAnnotation" $
-  JavaDsl.annotationMarker
-    (JavaDsl.markerAnnotation (javaTypeName @@ JavaDsl.identifier (string "Override")))
-
-referenceTypeToResult :: TTermDefinition (Java.ReferenceType -> Java.Result)
-referenceTypeToResult = def "referenceTypeToResult" $
-  lambda "rt" $ javaTypeToJavaResult @@ JavaDsl.typeReference (var "rt")
-
-sanitizeJavaName :: TTermDefinition (String -> String)
-sanitizeJavaName = def "sanitizeJavaName" $
-  lambda "name" $
-    Logic.ifElse (isEscaped @@ var "name")
-      (unescape @@ var "name")
-      (Logic.ifElse (Equality.equal (var "name") (string "_"))
-        (string "ignored")
-        (Formatting.sanitizeWithUnderscores @@ JavaLanguageSource.reservedWords @@ var "name"))
-
--- | The @SuppressWarnings("unchecked") annotation
-suppressWarningsUncheckedAnnotation :: TTermDefinition Java.Annotation
-suppressWarningsUncheckedAnnotation = def "suppressWarningsUncheckedAnnotation" $
-  inject Java._Annotation Java._Annotation_singleElement
-    (record Java._SingleElementAnnotation [
-      Java._SingleElementAnnotation_name>>: javaTypeName @@ JavaDsl.identifier (string "SuppressWarnings"),
-      Java._SingleElementAnnotation_value>>:
-        just (JavaDsl.elementValueConditional
-          (JavaDsl.conditionalExpressionSimple
-            (JavaDsl.conditionalOrExpression
-              (list [wrap Java._ConditionalAndExpression
-                (list [javaPostfixExpressionToJavaInclusiveOrExpression @@
-                  (JavaDsl.postfixExpressionPrimary
-                    (javaLiteralToJavaPrimary @@ (javaString @@ string "unchecked")))])]))))])
-
--- | Build the accept method for the visitor pattern
-toAcceptMethod :: TTermDefinition (Bool -> [Java.TypeParameter] -> Java.ClassBodyDeclaration)
-toAcceptMethod = def "toAcceptMethod" $
-  lambda "abstract" $ lambda "vtparams" $ lets [
-    "mods">: Logic.ifElse (var "abstract")
-      (list [inject Java._MethodModifier Java._MethodModifier_public unit,
-             inject Java._MethodModifier Java._MethodModifier_abstract unit])
-      (list [inject Java._MethodModifier Java._MethodModifier_public unit]),
-    "tparams">: list [javaTypeParameter @@ asTerm JavaNamesSource.visitorReturnParameter],
-    "anns">: Logic.ifElse (var "abstract")
-      (list ([] :: [TTerm Java.Annotation]))
-      (list [asTerm overrideAnnotation]),
-    "typeArgs">: Lists.map
-      (lambda "tp" $ JavaDsl.typeArgumentReference (typeParameterToReferenceType @@ var "tp"))
-      (var "vtparams"),
-    "ref">: javaClassTypeToJavaType @@
-      (JavaDsl.classType
-        (list ([] :: [TTerm Java.Annotation]))
-        JavaDsl.classTypeQualifierNone
-        (javaTypeIdentifier @@ asTerm JavaNamesSource.visitorName)
-        (Lists.concat2 (var "typeArgs") (list [JavaDsl.typeArgumentReference (asTerm visitorTypeVariable)]))),
-    "param">: javaTypeToJavaFormalParameter @@ var "ref" @@ wrap _Name (string "visitor"),
-    "result">: javaTypeToJavaResult @@ JavaDsl.typeReference (asTerm visitorTypeVariable),
-    "returnExpr">: javaMethodInvocationToJavaExpression @@
-      (methodInvocationStatic @@ JavaDsl.identifier (string "visitor") @@ JavaDsl.identifier (asTerm JavaNamesSource.visitMethodName)
-        @@ list [asTerm javaThis]),
-    "body">: Logic.ifElse (var "abstract")
-      (nothing :: TTerm (Maybe [Java.BlockStatement]))
-      (just (list [JavaDsl.blockStatementStatement (javaReturnStatement @@ just (var "returnExpr"))]))] $
-    methodDeclaration @@ var "mods" @@ var "tparams" @@ var "anns"
-      @@ asTerm JavaNamesSource.acceptMethodName @@ list [var "param"] @@ var "result" @@ var "body"
-
--- | Create an assignment statement that assigns a field name to 'this.fieldName'
-toAssignStmt :: TTermDefinition (Name -> Java.Statement)
-toAssignStmt = def "toAssignStmt" $
-  lambda "fname" $ lets [
-    "id">: fieldNameToJavaIdentifier @@ var "fname",
-    "lhs">: inject Java._LeftHandSide Java._LeftHandSide_fieldAccess
-      (JavaDsl.fieldAccess
-        (JavaDsl.fieldAccessQualifierPrimary
-          (JavaDsl.primaryNoNewArray JavaDsl.primaryThis))
-        (var "id")),
-    "rhs">: fieldNameToJavaExpression @@ var "fname"] $
-    javaAssignmentStatement @@ var "lhs" @@ var "rhs"
-
--- | Convert a Java Type to an array type
-toJavaArrayType :: TTermDefinition (Java.Type -> Context -> Either Error Java.Type)
-toJavaArrayType = def "toJavaArrayType" $
-  lambda "t" $ "cx" ~>
-  cases Java._Type (var "t") Nothing [
-    Java._Type_reference>>: lambda "rt" $
-      cases Java._ReferenceType (var "rt") Nothing [
-        Java._ReferenceType_classOrInterface>>: lambda "cit" $
-          right (JavaDsl.typeReference (JavaDsl.referenceTypeArray
-            (JavaDsl.arrayType
-              (JavaDsl.dims (list [list ([] :: [TTerm Java.Annotation])]))
-              (inject Java._ArrayType_Variant Java._ArrayType_Variant_classOrInterface (var "cit"))))),
-        Java._ReferenceType_array>>: lambda "at" $ lets [
-          "oldDims">: unwrap Java._Dims @@ (project Java._ArrayType Java._ArrayType_dims @@ var "at"),
-          "newDims">: JavaDsl.dims (Lists.concat2 (var "oldDims") (list [list ([] :: [TTerm Java.Annotation])])),
-          "variant">: project Java._ArrayType Java._ArrayType_variant @@ var "at"] $
-          right (JavaDsl.typeReference (JavaDsl.referenceTypeArray
-            (JavaDsl.arrayType (var "newDims") (var "variant")))),
-        Java._ReferenceType_variable>>: constant $
-          Ctx.failInContext (Error.errorOther $ Error.otherError $ string "don't know how to make Java reference type into array type") (var "cx")],
-    Java._Type_primitive>>: constant $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "don't know how to make Java type into array type") (var "cx")]
-
-typeParameterToReferenceType :: TTermDefinition (Java.TypeParameter -> Java.ReferenceType)
-typeParameterToReferenceType = def "typeParameterToReferenceType" $
-  lambda "tp" $ javaTypeVariable @@
-    (JavaDsl.unIdentifier
-      (JavaDsl.unTypeIdentifier
-        (JavaDsl.typeParameterIdentifier (var "tp"))))
-
-typeParameterToTypeArgument :: TTermDefinition (Java.TypeParameter -> Java.TypeArgument)
-typeParameterToTypeArgument = def "typeParameterToTypeArgument" $
-  lambda "tp" $ javaTypeIdentifierToJavaTypeArgument @@
-    (JavaDsl.typeParameterIdentifier (var "tp"))
-
--- | Extract the string name from a TypeParameter
-unTypeParameter :: TTermDefinition (Java.TypeParameter -> String)
-unTypeParameter = def "unTypeParameter" $
-  lambda "tp" $
-    JavaDsl.unIdentifier (JavaDsl.unTypeIdentifier (JavaDsl.typeParameterIdentifier (var "tp")))
-
-unescape :: TTermDefinition (String -> String)
-unescape = def "unescape" $
-  lambda "s" $ Strings.fromList (Lists.drop (int32 1) (Strings.toList (var "s")))
-
--- | Generate a unique variable name that doesn't conflict with in-scope names
-uniqueVarName :: TTermDefinition (JavaHelpers.Aliases -> Name -> Name)
-uniqueVarName = def "uniqueVarName" $
-  lambda "aliases" $ lambda "name" $
-    Logic.ifElse
-      (Sets.member (var "name")
-        (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases"))
-      (uniqueVarName_go @@ var "aliases" @@ Core.unName (var "name") @@ int32 2)
-      (var "name")
-
--- | Helper for uniqueVarName
-uniqueVarName_go :: TTermDefinition (JavaHelpers.Aliases -> String -> Int -> Name)
-uniqueVarName_go = def "uniqueVarName_go" $
-  lambda "aliases" $ lambda "base" $ lambda "n" $ lets [
-    "candidate">: wrap _Name (Strings.cat2 (var "base") (Literals.showInt32 (var "n")))] $
-    Logic.ifElse
-      (Sets.member (var "candidate")
-        (project JavaHelpers._Aliases JavaHelpers._Aliases_inScopeJavaVars @@ var "aliases"))
-      (uniqueVarName_go @@ var "aliases" @@ var "base" @@ Math.add (var "n") (int32 1))
-      (var "candidate")
-
-varDeclarationStatement :: TTermDefinition (Java.Identifier -> Java.Expression -> Java.BlockStatement)
-varDeclarationStatement = def "varDeclarationStatement" $
-  lambda "id" $ lambda "rhs" $
-    JavaDsl.blockStatementLocalVariableDeclaration
-      (JavaDsl.localVariableDeclarationStatement
-        (JavaDsl.localVariableDeclaration
-          (list ([] :: [TTerm Java.VariableModifier]))
-          JavaDsl.localVariableTypeVar
-          (list [javaVariableDeclarator @@ var "id" @@
-            (just $ JavaDsl.variableInitializerExpression (var "rhs"))])))
-
--- | Create a variable declaration statement with an explicit type
-variableDeclarationStatement :: TTermDefinition (JavaHelpers.Aliases -> Java.Type -> Java.Identifier -> Java.Expression -> Java.BlockStatement)
-variableDeclarationStatement = def "variableDeclarationStatement" $
-  lambda "aliases" $ lambda "jtype" $ lambda "id" $ lambda "rhs" $ lets [
-    "init_">: JavaDsl.variableInitializerExpression (var "rhs"),
-    "vdec">: javaVariableDeclarator @@ var "id" @@ just (var "init_")] $
-    JavaDsl.blockStatementLocalVariableDeclaration
-      (JavaDsl.localVariableDeclarationStatement
-        (JavaDsl.localVariableDeclaration
-          (list ([] :: [TTerm Java.VariableModifier]))
-          (JavaDsl.localVariableTypeType (JavaDsl.unannType (var "jtype")))
-          (list [var "vdec"])))
-
-variableToJavaIdentifier :: TTermDefinition (Name -> Java.Identifier)
-variableToJavaIdentifier = def "variableToJavaIdentifier" $
-  lambda "name" $ lets [
-    "v">: Core.unName $ var "name"] $
-    Logic.ifElse (Equality.equal (var "v") (string "_"))
-      (JavaDsl.identifier (string "ignored"))
-      (JavaDsl.identifier (sanitizeJavaName @@ var "v"))
-
--- | Compute the class name for a union variant
-variantClassName :: TTermDefinition (Bool -> Name -> Name -> Name)
-variantClassName = def "variantClassName" $
-  lambda "qualify" $ lambda "elName" $ lambda "fname" $ lets [
-    "qn">: Names.qualifyName @@ var "elName",
-    "ns_">: Packaging.qualifiedNameNamespace (var "qn"),
-    "local">: Packaging.qualifiedNameLocal (var "qn"),
-    "flocal">: Formatting.capitalize @@ (Core.unName $ var "fname"),
-    "local1">: Logic.ifElse (var "qualify")
-      (Strings.cat2 (Strings.cat2 (var "local") (string ".")) (var "flocal"))
-      (Logic.ifElse (Equality.equal (var "flocal") (var "local"))
-        (Strings.cat2 (var "flocal") (string "_"))
-        (var "flocal"))] $
-    Names.unqualifyName @@ Packaging.qualifiedName (var "ns_") (var "local1")
-
--- | The reference type for the visitor return type variable "r"
-visitorTypeVariable :: TTermDefinition Java.ReferenceType
-visitorTypeVariable = def "visitorTypeVariable" $
-  javaTypeVariable @@ string "r"
diff --git a/src/main/haskell/Hydra/Sources/JavaScript/Language.hs b/src/main/haskell/Hydra/Sources/JavaScript/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/JavaScript/Language.hs
+++ /dev/null
@@ -1,227 +0,0 @@
--- | Language constraints and reserved words for JavaScript/ECMAScript
-
-module Hydra.Sources.JavaScript.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.javaScript.language"),
-            moduleDefinitions = [toDefinition javaScriptLanguage, toDefinition javaScriptReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for JavaScript (ECMAScript 2024)"}
-javaScriptLanguage :: TTermDefinition Language
-javaScriptLanguage = define "javaScriptLanguage" $
-    doc "Language constraints for JavaScript (ECMAScript 2024)" $ lets [
-    "eliminationVariants">: Sets.fromList $ list [
-      Variants.eliminationVariantRecord,
-      Variants.eliminationVariantUnion,
-      Variants.eliminationVariantWrap],
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBinary, -- Uint8Array
-      Variants.literalVariantBoolean, -- boolean
-      Variants.literalVariantFloat, -- number (see float types)
-      Variants.literalVariantInteger, -- number/BigInt (see integer types)
-      Variants.literalVariantString], -- string
-    "floatTypes">: Sets.fromList $ list [
-      -- JavaScript's number is IEEE 754 double precision (float64)
-      Core.floatTypeFloat64],
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination,
-      Variants.functionVariantLambda],
-    "integerTypes">: Sets.fromList $ list [
-      -- JavaScript number can safely represent integers up to 2^53-1
-      -- For larger integers, BigInt must be used
-      Core.integerTypeInt32, -- Most integer operations use 32-bit
-      Core.integerTypeBigint], -- BigInt for arbitrary precision
-    "termVariants">: Sets.fromList $ list [
-      Variants.termVariantAnnotated,
-      Variants.termVariantApplication,
-      Variants.termVariantEither,
-
-      Variants.termVariantCases,
-
-      Variants.termVariantLambda,
-
-      Variants.termVariantProject,
-
-      Variants.termVariantUnwrap,
-      Variants.termVariantLet,
-      Variants.termVariantList,
-      Variants.termVariantLiteral,
-      Variants.termVariantMap,
-      Variants.termVariantMaybe,
-      Variants.termVariantPair,
-      Variants.termVariantRecord,
-      Variants.termVariantSet,
-      Variants.termVariantTypeApplication,
-      Variants.termVariantTypeLambda,
-      Variants.termVariantInject,
-      Variants.termVariantUnit,
-      Variants.termVariantVariable,
-      Variants.termVariantWrap],
-    "typeVariants">: Sets.fromList $ list [
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication,
-      Variants.typeVariantEither,
-      Variants.typeVariantFunction,
-      Variants.typeVariantForall,
-      Variants.typeVariantList,
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap,
-      Variants.typeVariantMaybe,
-      Variants.typeVariantPair,
-      Variants.typeVariantRecord,
-      Variants.typeVariantSet,
-      Variants.typeVariantUnion,
-      Variants.typeVariantUnit,
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap],
-    "typePredicate">: constant true] $ -- All types supported via runtime representation
-    Coders.language
-      (Coders.languageName_ $ string "hydra.javaScript")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
-javaScriptReservedWords :: TTermDefinition (S.Set String)
-javaScriptReservedWords = define "javaScriptReservedWords" $
-  doc "A set of reserved words in JavaScript" $
-  lets [
-    "keywords">:
-      doc "JavaScript keywords per ECMAScript 2024 specification" $
-      list $ string <$> [
-        -- Keywords
-        "await", "break", "case", "catch", "class", "const", "continue",
-        "debugger", "default", "delete", "do", "else", "enum", "export",
-        "extends", "false", "finally", "for", "function", "if", "import",
-        "in", "instanceof", "let", "new", "null", "return", "super",
-        "switch", "this", "throw", "true", "try", "typeof", "undefined",
-        "var", "void", "while", "with", "yield"],
-    "futureReserved">:
-      doc "Future reserved words (strict mode)" $
-      list $ string <$> [
-        "implements", "interface", "package", "private", "protected", "public"],
-    "strictModeReserved">:
-      doc "Additional words reserved in strict mode" $
-      list $ string <$> [
-        "arguments", "eval"],
-    "builtIns">:
-      doc "Common built-in identifiers we should avoid" $
-      list $ string <$> [
-        -- Global objects
-        "Array", "ArrayBuffer", "BigInt", "Boolean", "DataView", "Date",
-        "Error", "Float32Array", "Float64Array", "Function", "Int8Array",
-        "Int16Array", "Int32Array", "JSON", "Map", "Math", "Number",
-        "Object", "Promise", "Proxy", "Reflect", "RegExp", "Set", "String",
-        "Symbol", "Uint8Array", "Uint8ClampedArray", "Uint16Array",
-        "Uint32Array", "WeakMap", "WeakSet",
-        -- Global functions
-        "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent",
-        "eval", "isFinite", "isNaN", "parseFloat", "parseInt",
-        -- Common identifiers in Node.js and browsers
-        "console", "document", "global", "globalThis", "module", "process",
-        "require", "window"],
-    "hydraJavaScriptKeywords">:
-      doc "Reserved words specific to Hydra-JavaScript" $
-      list $ string <$> [
-        -- Core utilities
-        "Name", "FrozenMap",
-        -- Tag constants
-        "TERM_ANNOTATED", "TERM_APPLICATION", "TERM_EITHER", "TERM_FUNCTION",
-        "TERM_LET", "TERM_LIST", "TERM_LITERAL", "TERM_MAP", "TERM_MAYBE",
-        "TERM_PAIR", "TERM_RECORD", "TERM_SET", "TERM_TYPE_APPLICATION",
-        "TERM_TYPE_LAMBDA", "TERM_UNION", "TERM_UNIT", "TERM_VARIABLE", "TERM_WRAP"]] $
-    Sets.fromList $ Lists.concat $ list [
-      var "keywords",
-      var "futureReserved",
-      var "strictModeReserved",
-      var "builtIns",
-      var "hydraJavaScriptKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/JavaScript/Manifest.hs b/src/main/haskell/Hydra/Sources/JavaScript/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/JavaScript/Manifest.hs
+++ /dev/null
@@ -1,29 +0,0 @@
--- | Package manifest for hydra-javascript.
---
--- Owns the JavaScript coder DSL sources. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
---
--- Note: TypeScript DSL sources physically live in packages/hydra-ext/ today
--- and are declared by hydra-ext's manifest.
-
-module Hydra.Sources.JavaScript.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.JavaScript.Language as JavaScriptLanguage
-import qualified Hydra.Sources.JavaScript.Operators as JavaScriptOperators
-import qualified Hydra.Sources.JavaScript.Serde as JavaScriptSerde
-import qualified Hydra.Sources.JavaScript.Syntax as JavaScriptSyntax
-
-mainModules :: [Module]
-mainModules = [
-  JavaScriptLanguage.module_,
-  JavaScriptOperators.module_,
-  JavaScriptSerde.module_,
-  JavaScriptSyntax.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/JavaScript/Operators.hs b/src/main/haskell/Hydra/Sources/JavaScript/Operators.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/JavaScript/Operators.hs
+++ /dev/null
@@ -1,348 +0,0 @@
--- | AST operators for JavaScript, defining precedence and associativity.
---
--- Operator precedence is based on:
--- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence
-
-module Hydra.Sources.JavaScript.Operators where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.javaScript.operators"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "AST operators for JavaScript with precedence and associativity"}
-  where
-    definitions = [
-      -- Function application
-      toDefinition appOp,
-
-      -- Member access
-      toDefinition memberOp,
-      toDefinition optionalChainOp,
-
-      -- Arithmetic operators
-      toDefinition exponentiateOp,
-      toDefinition multiplyOp,
-      toDefinition divideOp,
-      toDefinition moduloOp,
-      toDefinition addOp,
-      toDefinition subtractOp,
-
-      -- Comparison operators
-      toDefinition lessThanOp,
-      toDefinition lessThanOrEqualOp,
-      toDefinition greaterThanOp,
-      toDefinition greaterThanOrEqualOp,
-      toDefinition inOp,
-      toDefinition instanceOfOp,
-      toDefinition equalOp,
-      toDefinition notEqualOp,
-      toDefinition strictEqualOp,
-      toDefinition strictNotEqualOp,
-
-      -- Bitwise operators
-      toDefinition bitwiseAndOp,
-      toDefinition bitwiseXorOp,
-      toDefinition bitwiseOrOp,
-      toDefinition leftShiftOp,
-      toDefinition rightShiftOp,
-      toDefinition unsignedRightShiftOp,
-
-      -- Logical operators
-      toDefinition logicalAndOp,
-      toDefinition logicalOrOp,
-      toDefinition nullishCoalescingOp,
-
-      -- Assignment operators
-      toDefinition assignOp,
-
-      -- Arrow function
-      toDefinition arrowOp,
-
-      -- Ternary
-      toDefinition ternaryOp,
-
-      -- Comma
-      toDefinition commaOp,
-
-      -- Definition (for const x = ...)
-      toDefinition defineOp,
-
-      -- Type annotation (for JSDoc/TypeScript)
-      toDefinition colonOp]
-
--- Note: JavaScript precedence levels (MDN):
--- 1 = comma, 2 = assignment, 3 = conditional, 4 = nullish coalescing,
--- 5 = logical or, 6 = logical and, 7-10 = bitwise, 11 = equality,
--- 12 = relational, 13 = shift, 14 = additive, 15 = multiplicative,
--- 16 = exponentiation, 17 = unary, 18 = update, 19 = new, 20 = member access
-
-appOp :: TTermDefinition Op
-appOp = define "appOp" $
-  doc "Function application (whitespace)" $
-  Ast.op
-    (Ast.symbol $ string "")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 20)
-    Ast.associativityLeft
-
-memberOp :: TTermDefinition Op
-memberOp = define "memberOp" $
-  doc "Member access operator (.)" $
-  Ast.op
-    (Ast.symbol $ string ".")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 20)
-    Ast.associativityLeft
-
-optionalChainOp :: TTermDefinition Op
-optionalChainOp = define "optionalChainOp" $
-  doc "Optional chaining operator (?.)" $
-  Ast.op
-    (Ast.symbol $ string "?.")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 20)
-    Ast.associativityLeft
-
-exponentiateOp :: TTermDefinition Op
-exponentiateOp = define "exponentiateOp" $
-  doc "Exponentiation operator (**)" $
-  Serialization.op @@ string "**" @@ int32 16 @@ Ast.associativityRight
-
-multiplyOp :: TTermDefinition Op
-multiplyOp = define "multiplyOp" $
-  doc "Multiplication operator (*)" $
-  Serialization.op @@ string "*" @@ int32 15 @@ Ast.associativityLeft
-
-divideOp :: TTermDefinition Op
-divideOp = define "divideOp" $
-  doc "Division operator (/)" $
-  Serialization.op @@ string "/" @@ int32 15 @@ Ast.associativityLeft
-
-moduloOp :: TTermDefinition Op
-moduloOp = define "moduloOp" $
-  doc "Modulo operator (%)" $
-  Serialization.op @@ string "%" @@ int32 15 @@ Ast.associativityLeft
-
-addOp :: TTermDefinition Op
-addOp = define "addOp" $
-  doc "Addition operator (+)" $
-  Serialization.op @@ string "+" @@ int32 14 @@ Ast.associativityLeft
-
-subtractOp :: TTermDefinition Op
-subtractOp = define "subtractOp" $
-  doc "Subtraction operator (-)" $
-  Serialization.op @@ string "-" @@ int32 14 @@ Ast.associativityLeft
-
-leftShiftOp :: TTermDefinition Op
-leftShiftOp = define "leftShiftOp" $
-  doc "Left shift operator (<<)" $
-  Serialization.op @@ string "<<" @@ int32 13 @@ Ast.associativityLeft
-
-rightShiftOp :: TTermDefinition Op
-rightShiftOp = define "rightShiftOp" $
-  doc "Right shift operator (>>)" $
-  Serialization.op @@ string ">>" @@ int32 13 @@ Ast.associativityLeft
-
-unsignedRightShiftOp :: TTermDefinition Op
-unsignedRightShiftOp = define "unsignedRightShiftOp" $
-  doc "Unsigned right shift operator (>>>)" $
-  Serialization.op @@ string ">>>" @@ int32 13 @@ Ast.associativityLeft
-
-lessThanOp :: TTermDefinition Op
-lessThanOp = define "lessThanOp" $
-  doc "Less than operator (<)" $
-  Serialization.op @@ string "<" @@ int32 12 @@ Ast.associativityLeft
-
-lessThanOrEqualOp :: TTermDefinition Op
-lessThanOrEqualOp = define "lessThanOrEqualOp" $
-  doc "Less than or equal operator (<=)" $
-  Serialization.op @@ string "<=" @@ int32 12 @@ Ast.associativityLeft
-
-greaterThanOp :: TTermDefinition Op
-greaterThanOp = define "greaterThanOp" $
-  doc "Greater than operator (>)" $
-  Serialization.op @@ string ">" @@ int32 12 @@ Ast.associativityLeft
-
-greaterThanOrEqualOp :: TTermDefinition Op
-greaterThanOrEqualOp = define "greaterThanOrEqualOp" $
-  doc "Greater than or equal operator (>=)" $
-  Serialization.op @@ string ">=" @@ int32 12 @@ Ast.associativityLeft
-
-inOp :: TTermDefinition Op
-inOp = define "inOp" $
-  doc "In operator (in)" $
-  Serialization.op @@ string "in" @@ int32 12 @@ Ast.associativityLeft
-
-instanceOfOp :: TTermDefinition Op
-instanceOfOp = define "instanceOfOp" $
-  doc "Instance of operator (instanceof)" $
-  Serialization.op @@ string "instanceof" @@ int32 12 @@ Ast.associativityLeft
-
-equalOp :: TTermDefinition Op
-equalOp = define "equalOp" $
-  doc "Equality operator (==)" $
-  Serialization.op @@ string "==" @@ int32 11 @@ Ast.associativityLeft
-
-notEqualOp :: TTermDefinition Op
-notEqualOp = define "notEqualOp" $
-  doc "Inequality operator (!=)" $
-  Serialization.op @@ string "!=" @@ int32 11 @@ Ast.associativityLeft
-
-strictEqualOp :: TTermDefinition Op
-strictEqualOp = define "strictEqualOp" $
-  doc "Strict equality operator (===)" $
-  Serialization.op @@ string "===" @@ int32 11 @@ Ast.associativityLeft
-
-strictNotEqualOp :: TTermDefinition Op
-strictNotEqualOp = define "strictNotEqualOp" $
-  doc "Strict inequality operator (!==)" $
-  Serialization.op @@ string "!==" @@ int32 11 @@ Ast.associativityLeft
-
-bitwiseAndOp :: TTermDefinition Op
-bitwiseAndOp = define "bitwiseAndOp" $
-  doc "Bitwise AND operator (&)" $
-  Serialization.op @@ string "&" @@ int32 10 @@ Ast.associativityLeft
-
-bitwiseXorOp :: TTermDefinition Op
-bitwiseXorOp = define "bitwiseXorOp" $
-  doc "Bitwise XOR operator (^)" $
-  Serialization.op @@ string "^" @@ int32 9 @@ Ast.associativityLeft
-
-bitwiseOrOp :: TTermDefinition Op
-bitwiseOrOp = define "bitwiseOrOp" $
-  doc "Bitwise OR operator (|)" $
-  Serialization.op @@ string "|" @@ int32 8 @@ Ast.associativityLeft
-
-logicalAndOp :: TTermDefinition Op
-logicalAndOp = define "logicalAndOp" $
-  doc "Logical AND operator (&&)" $
-  Serialization.op @@ string "&&" @@ int32 6 @@ Ast.associativityLeft
-
-logicalOrOp :: TTermDefinition Op
-logicalOrOp = define "logicalOrOp" $
-  doc "Logical OR operator (||)" $
-  Serialization.op @@ string "||" @@ int32 5 @@ Ast.associativityLeft
-
-nullishCoalescingOp :: TTermDefinition Op
-nullishCoalescingOp = define "nullishCoalescingOp" $
-  doc "Nullish coalescing operator (??)" $
-  Serialization.op @@ string "??" @@ int32 4 @@ Ast.associativityLeft
-
-ternaryOp :: TTermDefinition Op
-ternaryOp = define "ternaryOp" $
-  doc "Ternary operator (?:) - represents the ? part" $
-  Serialization.op @@ string "?" @@ int32 3 @@ Ast.associativityRight
-
-assignOp :: TTermDefinition Op
-assignOp = define "assignOp" $
-  doc "Assignment operator (=)" $
-  Serialization.op @@ string "=" @@ int32 2 @@ Ast.associativityRight
-
-arrowOp :: TTermDefinition Op
-arrowOp = define "arrowOp" $
-  doc "Arrow function operator (=>)" $
-  Serialization.op @@ string "=>" @@ int32 2 @@ Ast.associativityRight
-
-commaOp :: TTermDefinition Op
-commaOp = define "commaOp" $
-  doc "Comma operator (,)" $
-  Serialization.op @@ string "," @@ int32 1 @@ Ast.associativityLeft
-
-defineOp :: TTermDefinition Op
-defineOp = define "defineOp" $
-  doc "Definition operator (= in const x = ...)" $
-  Serialization.op @@ string "=" @@ int32 0 @@ Ast.associativityNone
-
-colonOp :: TTermDefinition Op
-colonOp = define "colonOp" $
-  doc "Type annotation colon (:)" $
-  Serialization.op @@ string ":" @@ int32 0 @@ Ast.associativityNone
diff --git a/src/main/haskell/Hydra/Sources/JavaScript/Serde.hs b/src/main/haskell/Hydra/Sources/JavaScript/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/JavaScript/Serde.hs
+++ /dev/null
@@ -1,1231 +0,0 @@
--- | Serialization functions for JavaScript AST to abstract syntax expressions.
---
--- This module provides functions to convert JavaScript AST types to Hydra's
--- abstract Expr type, which can then be rendered to concrete syntax.
-
-module Hydra.Sources.JavaScript.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.JavaScript.Syntax as JS
-import qualified Hydra.Sources.JavaScript.Syntax as JavaScriptSyntax
-import qualified Hydra.Sources.JavaScript.Operators as JavaScriptOperators
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.javaScript.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Serialization.ns, JavaScriptOperators.ns],
-            moduleTypeDependencies = (JavaScriptSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting JavaScript AST to abstract expressions"}
-  where
-    definitions = [
-      -- Core conversions
-      toDefinition identifierToExpr,
-      toDefinition literalToExpr,
-      toDefinition stringLiteralToExpr,
-      toDefinition escapeString,
-      toDefinition templateLiteralToExpr,
-      toDefinition numericLiteralToExpr,
-
-      -- Expression conversions
-      toDefinition expressionToExpr,
-      toDefinition arrayExpressionToExpr,
-      toDefinition arrayElementToExpr,
-      toDefinition objectExpressionToExpr,
-      toDefinition propertyToExpr,
-      toDefinition functionExpressionToExpr,
-      toDefinition arrowFunctionExpressionToExpr,
-      toDefinition callExpressionToExpr,
-      toDefinition memberExpressionToExpr,
-      toDefinition conditionalExpressionToExpr,
-      toDefinition binaryExpressionToExpr,
-      toDefinition unaryExpressionToExpr,
-      toDefinition assignmentExpressionToExpr,
-
-      -- Pattern conversions
-      toDefinition patternToExpr,
-      toDefinition objectPatternToExpr,
-      toDefinition objectPatternPropertyToExpr,
-      toDefinition arrayPatternToExpr,
-      toDefinition assignmentPatternToExpr,
-
-      -- Statement conversions
-      toDefinition statementToExpr,
-      toDefinition blockStatementToExpr,
-      toDefinition variableDeclarationToExpr,
-      toDefinition variableDeclaratorToExpr,
-      toDefinition variableKindToExpr,
-      toDefinition ifStatementToExpr,
-      toDefinition switchStatementToExpr,
-      toDefinition switchCaseToExpr,
-      toDefinition returnStatementToExpr,
-      toDefinition throwStatementToExpr,
-      toDefinition tryStatementToExpr,
-      toDefinition catchClauseToExpr,
-      toDefinition breakStatementToExpr,
-      toDefinition continueStatementToExpr,
-      toDefinition whileStatementToExpr,
-      toDefinition doWhileStatementToExpr,
-      toDefinition forStatementToExpr,
-      toDefinition forInStatementToExpr,
-      toDefinition forOfStatementToExpr,
-      toDefinition labeledStatementToExpr,
-
-      -- Declaration conversions
-      toDefinition functionDeclarationToExpr,
-      toDefinition classDeclarationToExpr,
-      toDefinition methodDefinitionToExpr,
-
-      -- Module conversions
-      toDefinition programToExpr,
-      toDefinition moduleItemToExpr,
-      toDefinition importDeclarationToExpr,
-      toDefinition importSpecifierToExpr,
-      toDefinition formatImportSpecifiers,
-      toDefinition exportDeclarationToExpr,
-      toDefinition namedExportToExpr,
-      toDefinition exportSpecifierToExpr,
-      toDefinition exportAllToExpr,
-
-      -- Operators
-      toDefinition binaryOperatorToExpr,
-      toDefinition unaryOperatorToString,
-      toDefinition assignmentOperatorToString,
-
-      -- Comments
-      toDefinition documentationCommentToExpr,
-      toDefinition toJavaScriptComments,
-      toDefinition documentationTagToLine,
-      toDefinition typeExpressionToString,
-      toDefinition toLineComment,
-
-      -- With comments variants
-      toDefinition moduleItemWithCommentsToExpr,
-      toDefinition functionDeclarationWithCommentsToExpr,
-      toDefinition classDeclarationWithCommentsToExpr]
-
-
--- ============================================================================
--- Core Conversions
--- ============================================================================
-
-identifierToExpr :: TTermDefinition (JS.Identifier -> Expr)
-identifierToExpr = define "identifierToExpr" $
-  doc "Convert an identifier to an AST expression" $
-  lambda "id" $ Serialization.cst @@ (unwrap JS._Identifier @@ var "id")
-
-literalToExpr :: TTermDefinition (JS.Literal -> Expr)
-literalToExpr = define "literalToExpr" $
-  doc "Convert a literal to an AST expression" $
-  lambda "lit" $
-    cases JS._Literal (var "lit") Nothing [
-      JS._Literal_string>>: lambda "s" $ stringLiteralToExpr @@ var "s",
-      JS._Literal_number>>: lambda "n" $ numericLiteralToExpr @@ var "n",
-      JS._Literal_boolean>>: lambda "b" $
-        Serialization.cst @@ (Logic.ifElse (var "b") (string "true") (string "false")),
-      JS._Literal_null>>: constant $ Serialization.cst @@ string "null",
-      JS._Literal_undefined>>: constant $ Serialization.cst @@ string "undefined",
-      JS._Literal_bigInt>>: lambda "n" $
-        Serialization.cst @@ (Strings.cat2 (Literals.showBigint $ var "n") (string "n")),
-      JS._Literal_template>>: lambda "t" $ templateLiteralToExpr @@ var "t"]
-
-stringLiteralToExpr :: TTermDefinition (JS.StringLiteral -> Expr)
-stringLiteralToExpr = define "stringLiteralToExpr" $
-  doc "Convert a string literal to an AST expression" $
-  lambda "s" $ lets [
-    "value">: project JS._StringLiteral JS._StringLiteral_value @@ var "s",
-    "singleQuote">: project JS._StringLiteral JS._StringLiteral_singleQuote @@ var "s",
-    "quote">: Logic.ifElse (var "singleQuote") (string "'") (string "\""),
-    "escaped">: escapeString @@ var "value" @@ var "singleQuote"] $
-    Serialization.cst @@ (Strings.cat $ list [var "quote", var "escaped", var "quote"])
-
-escapeString :: TTermDefinition (String -> Bool -> String)
-escapeString = define "escapeString" $
-  doc "Escape special characters in a string for JavaScript" $
-  lambda "s" $ lambda "singleQuote" $
-    -- Simple implementation: escape backslashes, quotes, and newlines
-    -- A full implementation would handle more escape sequences
-    var "s"  -- TODO: implement proper escaping
-
-templateLiteralToExpr :: TTermDefinition (JS.TemplateLiteral -> Expr)
-templateLiteralToExpr = define "templateLiteralToExpr" $
-  doc "Convert a template literal to an AST expression" $
-  lambda "t" $ lets [
-    "quasis">: project JS._TemplateLiteral JS._TemplateLiteral_quasis @@ var "t",
-    "exprs">: project JS._TemplateLiteral JS._TemplateLiteral_expressions @@ var "t"] $
-    -- For now, just output the first quasi if no expressions
-    -- Full implementation would interleave quasis and expressions
-    Serialization.cst @@ (Strings.cat $ list [
-      string "`",
-      Strings.intercalate (string "") (Lists.map (lambda "q" $
-        project JS._TemplateElement JS._TemplateElement_value @@ var "q") (var "quasis")),
-      string "`"])
-
-numericLiteralToExpr :: TTermDefinition (JS.NumericLiteral -> Expr)
-numericLiteralToExpr = define "numericLiteralToExpr" $
-  doc "Convert a numeric literal to an AST expression" $
-  lambda "n" $
-    cases JS._NumericLiteral (var "n") Nothing [
-      JS._NumericLiteral_integer>>: lambda "i" $
-        Serialization.cst @@ (Literals.showInt64 $ var "i"),
-      JS._NumericLiteral_float>>: lambda "f" $
-        Serialization.cst @@ (Literals.showFloat64 $ var "f")]
-
-
--- ============================================================================
--- Expression Conversions
--- ============================================================================
-
-expressionToExpr :: TTermDefinition (JS.Expression -> Expr)
-expressionToExpr = define "expressionToExpr" $
-  doc "Convert a JavaScript expression to an AST expression" $
-  lambda "expr" $
-    cases JS._Expression (var "expr") Nothing [
-      JS._Expression_identifier>>: lambda "id" $ identifierToExpr @@ var "id",
-      JS._Expression_literal>>: lambda "lit" $ literalToExpr @@ var "lit",
-      JS._Expression_array>>: lambda "arr" $ arrayExpressionToExpr @@ var "arr",
-      JS._Expression_object>>: lambda "obj" $ objectExpressionToExpr @@ var "obj",
-      JS._Expression_function>>: lambda "fn" $ functionExpressionToExpr @@ var "fn",
-      JS._Expression_arrow>>: lambda "arrow" $ arrowFunctionExpressionToExpr @@ var "arrow",
-      JS._Expression_call>>: lambda "call" $ callExpressionToExpr @@ var "call",
-      JS._Expression_member>>: lambda "mem" $ memberExpressionToExpr @@ var "mem",
-      JS._Expression_conditional>>: lambda "cond" $ conditionalExpressionToExpr @@ var "cond",
-      JS._Expression_binary>>: lambda "bin" $ binaryExpressionToExpr @@ var "bin",
-      JS._Expression_unary>>: lambda "un" $ unaryExpressionToExpr @@ var "un",
-      JS._Expression_assignment>>: lambda "assign" $ assignmentExpressionToExpr @@ var "assign",
-      JS._Expression_sequence>>: lambda "exprs" $
-        Serialization.parenList @@ false @@ (Lists.map (expressionToExpr) (var "exprs")),
-      JS._Expression_this>>: constant $ Serialization.cst @@ string "this",
-      JS._Expression_new>>: lambda "call" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "new",
-          callExpressionToExpr @@ var "call"],
-      JS._Expression_yield>>: lambda "maybeExpr" $
-        Maybes.maybe
-          (Serialization.cst @@ string "yield")
-          (lambda "e" $ Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "yield",
-            expressionToExpr @@ var "e"])
-          (var "maybeExpr"),
-      JS._Expression_await>>: lambda "e" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "await",
-          expressionToExpr @@ var "e"],
-      JS._Expression_spread>>: lambda "spread" $
-        Serialization.prefix @@ string "..." @@ (expressionToExpr @@ (unwrap JS._SpreadElement @@ var "spread")),
-      JS._Expression_parenthesized>>: lambda "e" $
-        Serialization.parenthesize @@ (expressionToExpr @@ var "e")]
-
-arrayExpressionToExpr :: TTermDefinition (JS.ArrayExpression -> Expr)
-arrayExpressionToExpr = define "arrayExpressionToExpr" $
-  doc "Convert an array expression to an AST expression" $
-  lambda "arr" $
-    Serialization.bracketList @@ Serialization.inlineStyle @@
-      (Lists.map (arrayElementToExpr) (var "arr"))
-
-arrayElementToExpr :: TTermDefinition (JS.ArrayElement -> Expr)
-arrayElementToExpr = define "arrayElementToExpr" $
-  doc "Convert an array element to an AST expression" $
-  lambda "elem" $
-    cases JS._ArrayElement (var "elem") Nothing [
-      JS._ArrayElement_expression>>: lambda "e" $ expressionToExpr @@ var "e",
-      JS._ArrayElement_spread>>: lambda "s" $
-        Serialization.prefix @@ string "..." @@ (expressionToExpr @@ (unwrap JS._SpreadElement @@ var "s")),
-      JS._ArrayElement_hole>>: constant $ Serialization.cst @@ string ""]
-
-objectExpressionToExpr :: TTermDefinition (JS.ObjectExpression -> Expr)
-objectExpressionToExpr = define "objectExpressionToExpr" $
-  doc "Convert an object expression to an AST expression" $
-  lambda "obj" $
-    Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-      (Lists.map (propertyToExpr) (var "obj"))
-
-propertyToExpr :: TTermDefinition (JS.Property -> Expr)
-propertyToExpr = define "propertyToExpr" $
-  doc "Convert an object property to an AST expression" $
-  lambda "prop" $ lets [
-    "key">: project JS._Property JS._Property_key @@ var "prop",
-    "value">: project JS._Property JS._Property_value @@ var "prop",
-    "shorthand">: project JS._Property JS._Property_shorthand @@ var "prop",
-    "computed">: project JS._Property JS._Property_computed @@ var "prop",
-    "keyExpr">: Logic.ifElse (var "computed")
-      (Serialization.brackets @@ Serialization.squareBrackets @@ Serialization.inlineStyle @@ (expressionToExpr @@ var "key"))
-      (expressionToExpr @@ var "key")] $
-    Logic.ifElse (var "shorthand")
-      (var "keyExpr")
-      (Serialization.ifx @@ JavaScriptOperators.colonOp @@ var "keyExpr" @@ (expressionToExpr @@ var "value"))
-
-functionExpressionToExpr :: TTermDefinition (JS.FunctionExpression -> Expr)
-functionExpressionToExpr = define "functionExpressionToExpr" $
-  doc "Convert a function expression to an AST expression" $
-  lambda "fn" $ lets [
-    "mid">: project JS._FunctionExpression JS._FunctionExpression_id @@ var "fn",
-    "params">: project JS._FunctionExpression JS._FunctionExpression_params @@ var "fn",
-    "body">: project JS._FunctionExpression JS._FunctionExpression_body @@ var "fn",
-    "async">: project JS._FunctionExpression JS._FunctionExpression_async @@ var "fn",
-    "generator">: project JS._FunctionExpression JS._FunctionExpression_generator @@ var "fn",
-    "asyncKw">: Logic.ifElse (var "async") (list [Serialization.cst @@ string "async"]) (list ([] :: [TTerm Expr])),
-    "funcKw">: Logic.ifElse (var "generator")
-      (Serialization.cst @@ string "function*")
-      (Serialization.cst @@ string "function"),
-    "nameExpr">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "id" $ list [identifierToExpr @@ var "id"])
-      (var "mid"),
-    "paramsExpr">: Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "params"))] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      var "asyncKw",
-      list [var "funcKw"],
-      var "nameExpr",
-      list [var "paramsExpr", blockStatementToExpr @@ var "body"]])
-
-arrowFunctionExpressionToExpr :: TTermDefinition (JS.ArrowFunctionExpression -> Expr)
-arrowFunctionExpressionToExpr = define "arrowFunctionExpressionToExpr" $
-  doc "Convert an arrow function expression to an AST expression" $
-  lambda "arrow" $ lets [
-    "params">: project JS._ArrowFunctionExpression JS._ArrowFunctionExpression_params @@ var "arrow",
-    "body">: project JS._ArrowFunctionExpression JS._ArrowFunctionExpression_body @@ var "arrow",
-    "async">: project JS._ArrowFunctionExpression JS._ArrowFunctionExpression_async @@ var "arrow",
-    "asyncKw">: Logic.ifElse (var "async")
-      (list [Serialization.cst @@ string "async"])
-      (list ([] :: [TTerm Expr])),
-    "paramsExpr">: Logic.ifElse (Equality.equal (Lists.length $ var "params") (int32 1))
-      (Maybes.fromMaybe (Serialization.cst @@ string "") (Maybes.map patternToExpr (Lists.maybeHead $ var "params")))
-      (Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "params"))),
-    "bodyExpr">: cases JS._ArrowFunctionBody (var "body") Nothing [
-      JS._ArrowFunctionBody_expression>>: lambda "e" $ expressionToExpr @@ var "e",
-      JS._ArrowFunctionBody_block>>: lambda "b" $ blockStatementToExpr @@ var "b"]] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      var "asyncKw",
-      list [Serialization.ifx @@ JavaScriptOperators.arrowOp @@ var "paramsExpr" @@ var "bodyExpr"]])
-
-callExpressionToExpr :: TTermDefinition (JS.CallExpression -> Expr)
-callExpressionToExpr = define "callExpressionToExpr" $
-  doc "Convert a call expression to an AST expression" $
-  lambda "call" $ lets [
-    "callee">: project JS._CallExpression JS._CallExpression_callee @@ var "call",
-    "args">: project JS._CallExpression JS._CallExpression_arguments @@ var "call",
-    "optional">: project JS._CallExpression JS._CallExpression_optional @@ var "call",
-    "calleeExpr">: expressionToExpr @@ var "callee",
-    "argsExpr">: Serialization.parenList @@ false @@ (Lists.map (expressionToExpr) (var "args")),
-    "optionalDot">: Logic.ifElse (var "optional") (string "?.") (string "")] $
-    Serialization.spaceSep @@ list [
-      var "calleeExpr",
-      Serialization.cst @@ var "optionalDot",
-      var "argsExpr"]
-
-memberExpressionToExpr :: TTermDefinition (JS.MemberExpression -> Expr)
-memberExpressionToExpr = define "memberExpressionToExpr" $
-  doc "Convert a member expression to an AST expression" $
-  lambda "mem" $ lets [
-    "obj">: project JS._MemberExpression JS._MemberExpression_object @@ var "mem",
-    "prop">: project JS._MemberExpression JS._MemberExpression_property @@ var "mem",
-    "computed">: project JS._MemberExpression JS._MemberExpression_computed @@ var "mem",
-    "optional">: project JS._MemberExpression JS._MemberExpression_optional @@ var "mem",
-    "objExpr">: expressionToExpr @@ var "obj",
-    "propExpr">: expressionToExpr @@ var "prop"] $
-    Logic.ifElse (var "computed")
-      -- obj[prop] or obj?.[prop]
-      (Serialization.spaceSep @@ list [
-        var "objExpr",
-        Logic.ifElse (var "optional") (Serialization.cst @@ string "?.") (Serialization.cst @@ string ""),
-        Serialization.brackets @@ Serialization.squareBrackets @@ Serialization.inlineStyle @@ var "propExpr"])
-      -- obj.prop or obj?.prop
-      (Serialization.ifx @@
-        (Logic.ifElse (var "optional") JavaScriptOperators.optionalChainOp JavaScriptOperators.memberOp) @@
-        var "objExpr" @@ var "propExpr")
-
-conditionalExpressionToExpr :: TTermDefinition (JS.ConditionalExpression -> Expr)
-conditionalExpressionToExpr = define "conditionalExpressionToExpr" $
-  doc "Convert a conditional expression to an AST expression" $
-  lambda "cond" $ lets [
-    "test">: project JS._ConditionalExpression JS._ConditionalExpression_test @@ var "cond",
-    "consequent">: project JS._ConditionalExpression JS._ConditionalExpression_consequent @@ var "cond",
-    "alternate">: project JS._ConditionalExpression JS._ConditionalExpression_alternate @@ var "cond"] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "test",
-      Serialization.cst @@ string "?",
-      expressionToExpr @@ var "consequent",
-      Serialization.cst @@ string ":",
-      expressionToExpr @@ var "alternate"]
-
-binaryExpressionToExpr :: TTermDefinition (JS.BinaryExpression -> Expr)
-binaryExpressionToExpr = define "binaryExpressionToExpr" $
-  doc "Convert a binary expression to an AST expression" $
-  lambda "bin" $ lets [
-    "op">: project JS._BinaryExpression JS._BinaryExpression_operator @@ var "bin",
-    "left">: project JS._BinaryExpression JS._BinaryExpression_left @@ var "bin",
-    "right">: project JS._BinaryExpression JS._BinaryExpression_right @@ var "bin"] $
-    Serialization.ifx @@
-      (binaryOperatorToExpr @@ var "op") @@
-      (expressionToExpr @@ var "left") @@
-      (expressionToExpr @@ var "right")
-
-unaryExpressionToExpr :: TTermDefinition (JS.UnaryExpression -> Expr)
-unaryExpressionToExpr = define "unaryExpressionToExpr" $
-  doc "Convert a unary expression to an AST expression" $
-  lambda "un" $ lets [
-    "op">: project JS._UnaryExpression JS._UnaryExpression_operator @@ var "un",
-    "arg">: project JS._UnaryExpression JS._UnaryExpression_argument @@ var "un",
-    "prefix">: project JS._UnaryExpression JS._UnaryExpression_prefix @@ var "un",
-    "opStr">: unaryOperatorToString @@ var "op",
-    "argExpr">: expressionToExpr @@ var "arg"] $
-    Logic.ifElse (var "prefix")
-      (Serialization.prefix @@ var "opStr" @@ var "argExpr")
-      (Serialization.suffix @@ var "opStr" @@ var "argExpr")
-
-assignmentExpressionToExpr :: TTermDefinition (JS.AssignmentExpression -> Expr)
-assignmentExpressionToExpr = define "assignmentExpressionToExpr" $
-  doc "Convert an assignment expression to an AST expression" $
-  lambda "assign" $ lets [
-    "op">: project JS._AssignmentExpression JS._AssignmentExpression_operator @@ var "assign",
-    "left">: project JS._AssignmentExpression JS._AssignmentExpression_left @@ var "assign",
-    "right">: project JS._AssignmentExpression JS._AssignmentExpression_right @@ var "assign",
-    "opStr">: assignmentOperatorToString @@ var "op"] $
-    Serialization.spaceSep @@ list [
-      patternToExpr @@ var "left",
-      Serialization.cst @@ var "opStr",
-      expressionToExpr @@ var "right"]
-
-
--- ============================================================================
--- Pattern Conversions
--- ============================================================================
-
-patternToExpr :: TTermDefinition (JS.Pattern -> Expr)
-patternToExpr = define "patternToExpr" $
-  doc "Convert a pattern to an AST expression" $
-  lambda "pat" $
-    cases JS._Pattern (var "pat") Nothing [
-      JS._Pattern_identifier>>: lambda "id" $ identifierToExpr @@ var "id",
-      JS._Pattern_object>>: lambda "obj" $ objectPatternToExpr @@ var "obj",
-      JS._Pattern_array>>: lambda "arr" $ arrayPatternToExpr @@ var "arr",
-      JS._Pattern_assignment>>: lambda "assign" $ assignmentPatternToExpr @@ var "assign",
-      JS._Pattern_rest>>: lambda "rest" $
-        Serialization.prefix @@ string "..." @@ (patternToExpr @@ (unwrap JS._RestElement @@ var "rest"))]
-
-objectPatternToExpr :: TTermDefinition (JS.ObjectPattern -> Expr)
-objectPatternToExpr = define "objectPatternToExpr" $
-  doc "Convert an object pattern to an AST expression" $
-  lambda "obj" $ lets [
-    "props">: project JS._ObjectPattern JS._ObjectPattern_properties @@ var "obj"] $
-    Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@
-      (Lists.map (objectPatternPropertyToExpr) (var "props"))
-
-objectPatternPropertyToExpr :: TTermDefinition (JS.ObjectPatternProperty -> Expr)
-objectPatternPropertyToExpr = define "objectPatternPropertyToExpr" $
-  doc "Convert an object pattern property to an AST expression" $
-  lambda "prop" $
-    cases JS._ObjectPatternProperty (var "prop") Nothing [
-      JS._ObjectPatternProperty_property>>: lambda "p" $ propertyToExpr @@ var "p",
-      JS._ObjectPatternProperty_rest>>: lambda "r" $
-        Serialization.prefix @@ string "..." @@ (patternToExpr @@ (unwrap JS._RestElement @@ var "r"))]
-
-arrayPatternToExpr :: TTermDefinition (JS.ArrayPattern -> Expr)
-arrayPatternToExpr = define "arrayPatternToExpr" $
-  doc "Convert an array pattern to an AST expression" $
-  lambda "arr" $
-    Serialization.bracketList @@ Serialization.inlineStyle @@
-      (Lists.map
-        (lambda "maybeP" $ Maybes.maybe (Serialization.cst @@ string "") (patternToExpr) (var "maybeP"))
-        (var "arr"))
-
-assignmentPatternToExpr :: TTermDefinition (JS.AssignmentPattern -> Expr)
-assignmentPatternToExpr = define "assignmentPatternToExpr" $
-  doc "Convert an assignment pattern to an AST expression" $
-  lambda "assign" $ lets [
-    "left">: project JS._AssignmentPattern JS._AssignmentPattern_left @@ var "assign",
-    "right">: project JS._AssignmentPattern JS._AssignmentPattern_right @@ var "assign"] $
-    Serialization.ifx @@ JavaScriptOperators.defineOp @@
-      (patternToExpr @@ var "left") @@
-      (expressionToExpr @@ var "right")
-
-
--- ============================================================================
--- Statement Conversions
--- ============================================================================
-
-statementToExpr :: TTermDefinition (JS.Statement -> Expr)
-statementToExpr = define "statementToExpr" $
-  doc "Convert a statement to an AST expression" $
-  lambda "stmt" $
-    cases JS._Statement (var "stmt") Nothing [
-      JS._Statement_expression>>: lambda "e" $
-        Serialization.suffix @@ string ";" @@ (expressionToExpr @@ var "e"),
-      JS._Statement_block>>: lambda "b" $ blockStatementToExpr @@ var "b",
-      JS._Statement_empty>>: constant $ Serialization.cst @@ string ";",
-      JS._Statement_debugger>>: constant $ Serialization.cst @@ string "debugger;",
-      JS._Statement_return>>: lambda "r" $ returnStatementToExpr @@ var "r",
-      JS._Statement_break>>: lambda "b" $ breakStatementToExpr @@ var "b",
-      JS._Statement_continue>>: lambda "c" $ continueStatementToExpr @@ var "c",
-      JS._Statement_if>>: lambda "i" $ ifStatementToExpr @@ var "i",
-      JS._Statement_switch>>: lambda "s" $ switchStatementToExpr @@ var "s",
-      JS._Statement_throw>>: lambda "t" $ throwStatementToExpr @@ var "t",
-      JS._Statement_try>>: lambda "t" $ tryStatementToExpr @@ var "t",
-      JS._Statement_while>>: lambda "w" $ whileStatementToExpr @@ var "w",
-      JS._Statement_doWhile>>: lambda "d" $ doWhileStatementToExpr @@ var "d",
-      JS._Statement_for>>: lambda "f" $ forStatementToExpr @@ var "f",
-      JS._Statement_forIn>>: lambda "f" $ forInStatementToExpr @@ var "f",
-      JS._Statement_forOf>>: lambda "f" $ forOfStatementToExpr @@ var "f",
-      JS._Statement_variableDeclaration>>: lambda "v" $ variableDeclarationToExpr @@ var "v",
-      JS._Statement_functionDeclaration>>: lambda "f" $ functionDeclarationToExpr @@ var "f",
-      JS._Statement_classDeclaration>>: lambda "c" $ classDeclarationToExpr @@ var "c",
-      JS._Statement_labeled>>: lambda "l" $ labeledStatementToExpr @@ var "l"]
-
-blockStatementToExpr :: TTermDefinition (JS.BlockStatement -> Expr)
-blockStatementToExpr = define "blockStatementToExpr" $
-  doc "Convert a block statement to an AST expression" $
-  lambda "block" $
-    Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@
-      (Lists.map (statementToExpr) (var "block"))
-
-variableDeclarationToExpr :: TTermDefinition (JS.VariableDeclaration -> Expr)
-variableDeclarationToExpr = define "variableDeclarationToExpr" $
-  doc "Convert a variable declaration to an AST expression" $
-  lambda "decl" $ lets [
-    "kind">: project JS._VariableDeclaration JS._VariableDeclaration_kind @@ var "decl",
-    "declarations">: project JS._VariableDeclaration JS._VariableDeclaration_declarations @@ var "decl"] $
-    Serialization.suffix @@ string ";" @@
-      (Serialization.spaceSep @@ list [
-        variableKindToExpr @@ var "kind",
-        Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map (variableDeclaratorToExpr) (var "declarations"))])
-
-variableDeclaratorToExpr :: TTermDefinition (JS.VariableDeclarator -> Expr)
-variableDeclaratorToExpr = define "variableDeclaratorToExpr" $
-  doc "Convert a variable declarator to an AST expression" $
-  lambda "decl" $ lets [
-    "id">: project JS._VariableDeclarator JS._VariableDeclarator_id @@ var "decl",
-    "init">: project JS._VariableDeclarator JS._VariableDeclarator_init @@ var "decl"] $
-    Maybes.maybe
-      (patternToExpr @@ var "id")
-      (lambda "e" $ Serialization.ifx @@ JavaScriptOperators.defineOp @@
-        (patternToExpr @@ var "id") @@
-        (expressionToExpr @@ var "e"))
-      (var "init")
-
-variableKindToExpr :: TTermDefinition (JS.VariableKind -> Expr)
-variableKindToExpr = define "variableKindToExpr" $
-  doc "Convert a variable kind to an AST expression" $
-  lambda "kind" $
-    cases JS._VariableKind (var "kind") Nothing [
-      JS._VariableKind_var>>: constant $ Serialization.cst @@ string "var",
-      JS._VariableKind_let>>: constant $ Serialization.cst @@ string "let",
-      JS._VariableKind_const>>: constant $ Serialization.cst @@ string "const"]
-
-ifStatementToExpr :: TTermDefinition (JS.IfStatement -> Expr)
-ifStatementToExpr = define "ifStatementToExpr" $
-  doc "Convert an if statement to an AST expression" $
-  lambda "ifStmt" $ lets [
-    "test">: project JS._IfStatement JS._IfStatement_test @@ var "ifStmt",
-    "consequent">: project JS._IfStatement JS._IfStatement_consequent @@ var "ifStmt",
-    "alternate">: project JS._IfStatement JS._IfStatement_alternate @@ var "ifStmt",
-    "ifPart">: Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "if",
-      Serialization.parenthesize @@ (expressionToExpr @@ var "test"),
-      statementToExpr @@ var "consequent"]] $
-    Maybes.maybe
-      (var "ifPart")
-      (lambda "alt" $ Serialization.spaceSep @@ list [
-        var "ifPart",
-        Serialization.cst @@ string "else",
-        statementToExpr @@ var "alt"])
-      (var "alternate")
-
-switchStatementToExpr :: TTermDefinition (JS.SwitchStatement -> Expr)
-switchStatementToExpr = define "switchStatementToExpr" $
-  doc "Convert a switch statement to an AST expression" $
-  lambda "switchStmt" $ lets [
-    "discriminant">: project JS._SwitchStatement JS._SwitchStatement_discriminant @@ var "switchStmt",
-    "cases">: project JS._SwitchStatement JS._SwitchStatement_cases @@ var "switchStmt"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "switch",
-      Serialization.parenthesize @@ (expressionToExpr @@ var "discriminant"),
-      Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@
-        (Lists.map (switchCaseToExpr) (var "cases"))]
-
-switchCaseToExpr :: TTermDefinition (JS.SwitchCase -> Expr)
-switchCaseToExpr = define "switchCaseToExpr" $
-  doc "Convert a switch case to an AST expression" $
-  lambda "c" $ lets [
-    "test">: project JS._SwitchCase JS._SwitchCase_test @@ var "c",
-    "consequent">: project JS._SwitchCase JS._SwitchCase_consequent @@ var "c",
-    "caseLabel">: Maybes.maybe
-      (Serialization.cst @@ string "default:")
-      (lambda "t" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "case",
-        expressionToExpr @@ var "t",
-        Serialization.cst @@ string ":"])
-      (var "test")] $
-    Serialization.newlineSep @@ (Lists.cons (var "caseLabel") (Lists.map (statementToExpr) (var "consequent")))
-
-returnStatementToExpr :: TTermDefinition (JS.ReturnStatement -> Expr)
-returnStatementToExpr = define "returnStatementToExpr" $
-  doc "Convert a return statement to an AST expression" $
-  lambda "r" $
-    Maybes.maybe
-      (Serialization.cst @@ string "return;")
-      (lambda "e" $ Serialization.suffix @@ string ";" @@
-        (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "return",
-          expressionToExpr @@ var "e"]))
-      (var "r")
-
-throwStatementToExpr :: TTermDefinition (JS.ThrowStatement -> Expr)
-throwStatementToExpr = define "throwStatementToExpr" $
-  doc "Convert a throw statement to an AST expression" $
-  lambda "t" $
-    Serialization.suffix @@ string ";" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "throw",
-        expressionToExpr @@ (unwrap JS._ThrowStatement @@ var "t")])
-
-tryStatementToExpr :: TTermDefinition (JS.TryStatement -> Expr)
-tryStatementToExpr = define "tryStatementToExpr" $
-  doc "Convert a try statement to an AST expression" $
-  lambda "t" $ lets [
-    "block">: project JS._TryStatement JS._TryStatement_block @@ var "t",
-    "handler">: project JS._TryStatement JS._TryStatement_handler @@ var "t",
-    "finalizer">: project JS._TryStatement JS._TryStatement_finalizer @@ var "t",
-    "tryPart">: Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "try",
-      blockStatementToExpr @@ var "block"],
-    "catchPart">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "c" $ list [catchClauseToExpr @@ var "c"])
-      (var "handler"),
-    "finallyPart">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "f" $ list [Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "finally",
-        blockStatementToExpr @@ var "f"]])
-      (var "finalizer")] $
-    Serialization.spaceSep @@ (Lists.concat $ list [list [var "tryPart"], var "catchPart", var "finallyPart"])
-
-catchClauseToExpr :: TTermDefinition (JS.CatchClause -> Expr)
-catchClauseToExpr = define "catchClauseToExpr" $
-  doc "Convert a catch clause to an AST expression" $
-  lambda "c" $ lets [
-    "param">: project JS._CatchClause JS._CatchClause_param @@ var "c",
-    "body">: project JS._CatchClause JS._CatchClause_body @@ var "c",
-    "catchKw">: Maybes.maybe
-      (Serialization.cst @@ string "catch")
-      (lambda "p" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "catch",
-        Serialization.parenthesize @@ (patternToExpr @@ var "p")])
-      (var "param")] $
-    Serialization.spaceSep @@ list [var "catchKw", blockStatementToExpr @@ var "body"]
-
-breakStatementToExpr :: TTermDefinition (JS.BreakStatement -> Expr)
-breakStatementToExpr = define "breakStatementToExpr" $
-  doc "Convert a break statement to an AST expression" $
-  lambda "b" $
-    Maybes.maybe
-      (Serialization.cst @@ string "break;")
-      (lambda "label" $ Serialization.suffix @@ string ";" @@
-        (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "break",
-          identifierToExpr @@ var "label"]))
-      (var "b")
-
-continueStatementToExpr :: TTermDefinition (JS.ContinueStatement -> Expr)
-continueStatementToExpr = define "continueStatementToExpr" $
-  doc "Convert a continue statement to an AST expression" $
-  lambda "c" $
-    Maybes.maybe
-      (Serialization.cst @@ string "continue;")
-      (lambda "label" $ Serialization.suffix @@ string ";" @@
-        (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "continue",
-          identifierToExpr @@ var "label"]))
-      (var "c")
-
-whileStatementToExpr :: TTermDefinition (JS.WhileStatement -> Expr)
-whileStatementToExpr = define "whileStatementToExpr" $
-  doc "Convert a while statement to an AST expression" $
-  lambda "w" $ lets [
-    "test">: project JS._WhileStatement JS._WhileStatement_test @@ var "w",
-    "body">: project JS._WhileStatement JS._WhileStatement_body @@ var "w"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "while",
-      Serialization.parenthesize @@ (expressionToExpr @@ var "test"),
-      statementToExpr @@ var "body"]
-
-doWhileStatementToExpr :: TTermDefinition (JS.DoWhileStatement -> Expr)
-doWhileStatementToExpr = define "doWhileStatementToExpr" $
-  doc "Convert a do-while statement to an AST expression" $
-  lambda "d" $ lets [
-    "body">: project JS._DoWhileStatement JS._DoWhileStatement_body @@ var "d",
-    "test">: project JS._DoWhileStatement JS._DoWhileStatement_test @@ var "d"] $
-    Serialization.suffix @@ string ";" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "do",
-        statementToExpr @@ var "body",
-        Serialization.cst @@ string "while",
-        Serialization.parenthesize @@ (expressionToExpr @@ var "test")])
-
-forStatementToExpr :: TTermDefinition (JS.ForStatement -> Expr)
-forStatementToExpr = define "forStatementToExpr" $
-  doc "Convert a for statement to an AST expression" $
-  lambda "f" $ lets [
-    "init">: project JS._ForStatement JS._ForStatement_init @@ var "f",
-    "test">: project JS._ForStatement JS._ForStatement_test @@ var "f",
-    "update">: project JS._ForStatement JS._ForStatement_update @@ var "f",
-    "body">: project JS._ForStatement JS._ForStatement_body @@ var "f",
-    "initExpr">: Maybes.maybe (Serialization.cst @@ string "")
-      (lambda "i" $ cases JS._ForInit (var "i") Nothing [
-        JS._ForInit_variable>>: lambda "v" $ variableDeclarationToExpr @@ var "v",
-        JS._ForInit_expression>>: lambda "e" $ expressionToExpr @@ var "e"])
-      (var "init"),
-    "testExpr">: Maybes.maybe (Serialization.cst @@ string "") (expressionToExpr) (var "test"),
-    "updateExpr">: Maybes.maybe (Serialization.cst @@ string "") (expressionToExpr) (var "update")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "for",
-      Serialization.parenList @@ false @@ list [var "initExpr", var "testExpr", var "updateExpr"],
-      statementToExpr @@ var "body"]
-
-forInStatementToExpr :: TTermDefinition (JS.ForInStatement -> Expr)
-forInStatementToExpr = define "forInStatementToExpr" $
-  doc "Convert a for-in statement to an AST expression" $
-  lambda "f" $ lets [
-    "left">: project JS._ForInStatement JS._ForInStatement_left @@ var "f",
-    "right">: project JS._ForInStatement JS._ForInStatement_right @@ var "f",
-    "body">: project JS._ForInStatement JS._ForInStatement_body @@ var "f",
-    "leftExpr">: cases JS._ForInLeft (var "left") Nothing [
-      JS._ForInLeft_variable>>: lambda "v" $ variableDeclarationToExpr @@ var "v",
-      JS._ForInLeft_pattern>>: lambda "p" $ patternToExpr @@ var "p"]] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "for",
-      Serialization.parenthesize @@ (Serialization.spaceSep @@ list [
-        var "leftExpr",
-        Serialization.cst @@ string "in",
-        expressionToExpr @@ var "right"]),
-      statementToExpr @@ var "body"]
-
-forOfStatementToExpr :: TTermDefinition (JS.ForOfStatement -> Expr)
-forOfStatementToExpr = define "forOfStatementToExpr" $
-  doc "Convert a for-of statement to an AST expression" $
-  lambda "f" $ lets [
-    "await">: project JS._ForOfStatement JS._ForOfStatement_await @@ var "f",
-    "left">: project JS._ForOfStatement JS._ForOfStatement_left @@ var "f",
-    "right">: project JS._ForOfStatement JS._ForOfStatement_right @@ var "f",
-    "body">: project JS._ForOfStatement JS._ForOfStatement_body @@ var "f",
-    "forKw">: Logic.ifElse (var "await")
-      (Serialization.cst @@ string "for await")
-      (Serialization.cst @@ string "for"),
-    "leftExpr">: cases JS._ForInLeft (var "left") Nothing [
-      JS._ForInLeft_variable>>: lambda "v" $ variableDeclarationToExpr @@ var "v",
-      JS._ForInLeft_pattern>>: lambda "p" $ patternToExpr @@ var "p"]] $
-    Serialization.spaceSep @@ list [
-      var "forKw",
-      Serialization.parenthesize @@ (Serialization.spaceSep @@ list [
-        var "leftExpr",
-        Serialization.cst @@ string "of",
-        expressionToExpr @@ var "right"]),
-      statementToExpr @@ var "body"]
-
-labeledStatementToExpr :: TTermDefinition (JS.LabeledStatement -> Expr)
-labeledStatementToExpr = define "labeledStatementToExpr" $
-  doc "Convert a labeled statement to an AST expression" $
-  lambda "l" $ lets [
-    "label">: project JS._LabeledStatement JS._LabeledStatement_label @@ var "l",
-    "body">: project JS._LabeledStatement JS._LabeledStatement_body @@ var "l"] $
-    Serialization.spaceSep @@ list [
-      Serialization.suffix @@ string ":" @@ (identifierToExpr @@ var "label"),
-      statementToExpr @@ var "body"]
-
-
--- ============================================================================
--- Declaration Conversions
--- ============================================================================
-
-functionDeclarationToExpr :: TTermDefinition (JS.FunctionDeclaration -> Expr)
-functionDeclarationToExpr = define "functionDeclarationToExpr" $
-  doc "Convert a function declaration to an AST expression" $
-  lambda "fn" $ lets [
-    "id">: project JS._FunctionDeclaration JS._FunctionDeclaration_id @@ var "fn",
-    "params">: project JS._FunctionDeclaration JS._FunctionDeclaration_params @@ var "fn",
-    "body">: project JS._FunctionDeclaration JS._FunctionDeclaration_body @@ var "fn",
-    "async">: project JS._FunctionDeclaration JS._FunctionDeclaration_async @@ var "fn",
-    "generator">: project JS._FunctionDeclaration JS._FunctionDeclaration_generator @@ var "fn",
-    "asyncKw">: Logic.ifElse (var "async") (list [Serialization.cst @@ string "async"]) (list ([] :: [TTerm Expr])),
-    "funcKw">: Logic.ifElse (var "generator")
-      (Serialization.cst @@ string "function*")
-      (Serialization.cst @@ string "function"),
-    "paramsExpr">: Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "params"))] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      var "asyncKw",
-      list [var "funcKw", identifierToExpr @@ var "id", var "paramsExpr", blockStatementToExpr @@ var "body"]])
-
-classDeclarationToExpr :: TTermDefinition (JS.ClassDeclaration -> Expr)
-classDeclarationToExpr = define "classDeclarationToExpr" $
-  doc "Convert a class declaration to an AST expression" $
-  lambda "cls" $ lets [
-    "id">: project JS._ClassDeclaration JS._ClassDeclaration_id @@ var "cls",
-    "superClass">: project JS._ClassDeclaration JS._ClassDeclaration_superClass @@ var "cls",
-    "body">: project JS._ClassDeclaration JS._ClassDeclaration_body @@ var "cls",
-    "extendsClause">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "s" $ list [Serialization.cst @@ string "extends", expressionToExpr @@ var "s"])
-      (var "superClass"),
-    "bodyExpr">: Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@
-      (Lists.map (methodDefinitionToExpr) (var "body"))] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      list [Serialization.cst @@ string "class", identifierToExpr @@ var "id"],
-      var "extendsClause",
-      list [var "bodyExpr"]])
-
-methodDefinitionToExpr :: TTermDefinition (JS.MethodDefinition -> Expr)
-methodDefinitionToExpr = define "methodDefinitionToExpr" $
-  doc "Convert a method definition to an AST expression" $
-  lambda "method" $ lets [
-    "key">: project JS._MethodDefinition JS._MethodDefinition_key @@ var "method",
-    "value">: project JS._MethodDefinition JS._MethodDefinition_value @@ var "method",
-    "kind">: project JS._MethodDefinition JS._MethodDefinition_kind @@ var "method",
-    "computed">: project JS._MethodDefinition JS._MethodDefinition_computed @@ var "method",
-    "static">: project JS._MethodDefinition JS._MethodDefinition_static @@ var "method",
-    "staticKw">: Logic.ifElse (var "static") (list [Serialization.cst @@ string "static"]) (list ([] :: [TTerm Expr])),
-    "kindKw">: cases JS._MethodKind (var "kind") Nothing [
-      JS._MethodKind_constructor>>: constant $ list ([] :: [TTerm Expr]),
-      JS._MethodKind_method>>: constant $ list ([] :: [TTerm Expr]),
-      JS._MethodKind_get>>: constant $ list [Serialization.cst @@ string "get"],
-      JS._MethodKind_set>>: constant $ list [Serialization.cst @@ string "set"]],
-    "keyExpr">: Logic.ifElse (var "computed")
-      (Serialization.brackets @@ Serialization.squareBrackets @@ Serialization.inlineStyle @@ (expressionToExpr @@ var "key"))
-      (expressionToExpr @@ var "key"),
-    "params">: project JS._FunctionExpression JS._FunctionExpression_params @@ var "value",
-    "body">: project JS._FunctionExpression JS._FunctionExpression_body @@ var "value",
-    "paramsExpr">: Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "params"))] $
-    Serialization.spaceSep @@ (Lists.concat $ list [
-      var "staticKw",
-      var "kindKw",
-      list [var "keyExpr", var "paramsExpr", blockStatementToExpr @@ var "body"]])
-
-
--- ============================================================================
--- Module Conversions
--- ============================================================================
-
-programToExpr :: TTermDefinition (JS.Program -> Expr)
-programToExpr = define "programToExpr" $
-  doc "Convert a JavaScript program to an AST expression" $
-  lambda "prog" $ lets [
-    "body">: project JS._Program JS._Program_body @@ var "prog",
-    "warning">: list [Serialization.cst @@ (toLineComment @@ Constants.warningAutoGeneratedFile)],
-    "items">: Lists.map (moduleItemToExpr) (var "body")] $
-    Serialization.doubleNewlineSep @@ (Lists.concat $ list [var "warning", var "items"])
-
-moduleItemToExpr :: TTermDefinition (JS.ModuleItem -> Expr)
-moduleItemToExpr = define "moduleItemToExpr" $
-  doc "Convert a module item to an AST expression" $
-  lambda "item" $
-    cases JS._ModuleItem (var "item") Nothing [
-      JS._ModuleItem_statement>>: lambda "s" $ statementToExpr @@ var "s",
-      JS._ModuleItem_import>>: lambda "i" $ importDeclarationToExpr @@ var "i",
-      JS._ModuleItem_export>>: lambda "e" $ exportDeclarationToExpr @@ var "e"]
-
-importDeclarationToExpr :: TTermDefinition (JS.ImportDeclaration -> Expr)
-importDeclarationToExpr = define "importDeclarationToExpr" $
-  doc "Convert an import declaration to an AST expression" $
-  lambda "imp" $ lets [
-    "specifiers">: project JS._ImportDeclaration JS._ImportDeclaration_specifiers @@ var "imp",
-    "source">: project JS._ImportDeclaration JS._ImportDeclaration_source @@ var "imp",
-    "sourceExpr">: stringLiteralToExpr @@ var "source",
-    "specExprs">: Lists.map (importSpecifierToExpr) (var "specifiers")] $
-    Logic.ifElse (Lists.null $ var "specifiers")
-      -- import "module"
-      (Serialization.suffix @@ string ";" @@
-        (Serialization.spaceSep @@ list [Serialization.cst @@ string "import", var "sourceExpr"]))
-      -- import { x, y } from "module"
-      (Serialization.suffix @@ string ";" @@
-        (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "import",
-          formatImportSpecifiers @@ var "specExprs",
-          Serialization.cst @@ string "from",
-          var "sourceExpr"]))
-
-importSpecifierToExpr :: TTermDefinition (JS.ImportClause -> Expr)
-importSpecifierToExpr = define "importSpecifierToExpr" $
-  doc "Convert an import specifier to an AST expression" $
-  lambda "spec" $
-    cases JS._ImportClause (var "spec") Nothing [
-      JS._ImportClause_named>>: lambda "n" $ lets [
-        "imported">: project JS._ImportSpecifier JS._ImportSpecifier_imported @@ var "n",
-        "local">: project JS._ImportSpecifier JS._ImportSpecifier_local @@ var "n"] $
-        Logic.ifElse (Equality.equal (unwrap JS._Identifier @@ var "imported") (unwrap JS._Identifier @@ var "local"))
-          (identifierToExpr @@ var "local")
-          (Serialization.spaceSep @@ list [
-            identifierToExpr @@ var "imported",
-            Serialization.cst @@ string "as",
-            identifierToExpr @@ var "local"]),
-      JS._ImportClause_default>>: lambda "d" $ identifierToExpr @@ (unwrap JS._ImportDefaultSpecifier @@ var "d"),
-      JS._ImportClause_namespace>>: lambda "n" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "*",
-          Serialization.cst @@ string "as",
-          identifierToExpr @@ (unwrap JS._ImportNamespaceSpecifier @@ var "n")]]
-
-formatImportSpecifiers :: TTermDefinition ([Expr] -> Expr)
-formatImportSpecifiers = define "formatImportSpecifiers" $
-  doc "Format import specifiers, handling default vs named imports" $
-  lambda "specs" $
-    -- Simplified: just wrap named imports in braces
-    Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ var "specs"
-
-exportDeclarationToExpr :: TTermDefinition (JS.ExportDeclaration -> Expr)
-exportDeclarationToExpr = define "exportDeclarationToExpr" $
-  doc "Convert an export declaration to an AST expression" $
-  lambda "exp" $
-    cases JS._ExportDeclaration (var "exp") Nothing [
-      JS._ExportDeclaration_named>>: lambda "n" $ namedExportToExpr @@ var "n",
-      JS._ExportDeclaration_default>>: lambda "e" $
-        Serialization.suffix @@ string ";" @@
-          (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "export",
-            Serialization.cst @@ string "default",
-            expressionToExpr @@ var "e"]),
-      JS._ExportDeclaration_declaration>>: lambda "d" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "export",
-          statementToExpr @@ var "d"],
-      JS._ExportDeclaration_all>>: lambda "a" $ exportAllToExpr @@ var "a"]
-
-namedExportToExpr :: TTermDefinition (JS.NamedExport -> Expr)
-namedExportToExpr = define "namedExportToExpr" $
-  doc "Convert a named export to an AST expression" $
-  lambda "n" $ lets [
-    "specifiers">: project JS._NamedExport JS._NamedExport_specifiers @@ var "n",
-    "source">: project JS._NamedExport JS._NamedExport_source @@ var "n",
-    "specExprs">: Lists.map (exportSpecifierToExpr) (var "specifiers"),
-    "fromClause">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "s" $ list [Serialization.cst @@ string "from", stringLiteralToExpr @@ var "s"])
-      (var "source")] $
-    Serialization.suffix @@ string ";" @@
-      (Serialization.spaceSep @@ (Lists.concat $ list [
-        list [Serialization.cst @@ string "export"],
-        list [Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@ var "specExprs"],
-        var "fromClause"]))
-
-exportSpecifierToExpr :: TTermDefinition (JS.ExportSpecifier -> Expr)
-exportSpecifierToExpr = define "exportSpecifierToExpr" $
-  doc "Convert an export specifier to an AST expression" $
-  lambda "spec" $ lets [
-    "local">: project JS._ExportSpecifier JS._ExportSpecifier_local @@ var "spec",
-    "exported">: project JS._ExportSpecifier JS._ExportSpecifier_exported @@ var "spec"] $
-    Logic.ifElse (Equality.equal (unwrap JS._Identifier @@ var "local") (unwrap JS._Identifier @@ var "exported"))
-      (identifierToExpr @@ var "local")
-      (Serialization.spaceSep @@ list [
-        identifierToExpr @@ var "local",
-        Serialization.cst @@ string "as",
-        identifierToExpr @@ var "exported"])
-
-exportAllToExpr :: TTermDefinition (JS.ExportAllDeclaration -> Expr)
-exportAllToExpr = define "exportAllToExpr" $
-  doc "Convert an export all declaration to an AST expression" $
-  lambda "a" $ lets [
-    "exported">: project JS._ExportAllDeclaration JS._ExportAllDeclaration_exported @@ var "a",
-    "source">: project JS._ExportAllDeclaration JS._ExportAllDeclaration_source @@ var "a",
-    "exportedClause">: Maybes.maybe
-      (Serialization.cst @@ string "*")
-      (lambda "e" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "*",
-        Serialization.cst @@ string "as",
-        identifierToExpr @@ var "e"])
-      (var "exported")] $
-    Serialization.suffix @@ string ";" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "export",
-        var "exportedClause",
-        Serialization.cst @@ string "from",
-        stringLiteralToExpr @@ var "source"])
-
-
--- ============================================================================
--- Operators
--- ============================================================================
-
-binaryOperatorToExpr :: TTermDefinition (JS.BinaryOperator -> Op)
-binaryOperatorToExpr = define "binaryOperatorToExpr" $
-  doc "Convert a binary operator to an Op" $
-  lambda "op" $
-    cases JS._BinaryOperator (var "op") Nothing [
-      JS._BinaryOperator_add>>: constant JavaScriptOperators.addOp,
-      JS._BinaryOperator_subtract>>: constant JavaScriptOperators.subtractOp,
-      JS._BinaryOperator_multiply>>: constant JavaScriptOperators.multiplyOp,
-      JS._BinaryOperator_divide>>: constant JavaScriptOperators.divideOp,
-      JS._BinaryOperator_modulo>>: constant JavaScriptOperators.moduloOp,
-      JS._BinaryOperator_exponentiate>>: constant JavaScriptOperators.exponentiateOp,
-      JS._BinaryOperator_equal>>: constant JavaScriptOperators.equalOp,
-      JS._BinaryOperator_notEqual>>: constant JavaScriptOperators.notEqualOp,
-      JS._BinaryOperator_strictEqual>>: constant JavaScriptOperators.strictEqualOp,
-      JS._BinaryOperator_strictNotEqual>>: constant JavaScriptOperators.strictNotEqualOp,
-      JS._BinaryOperator_lessThan>>: constant JavaScriptOperators.lessThanOp,
-      JS._BinaryOperator_lessThanOrEqual>>: constant JavaScriptOperators.lessThanOrEqualOp,
-      JS._BinaryOperator_greaterThan>>: constant JavaScriptOperators.greaterThanOp,
-      JS._BinaryOperator_greaterThanOrEqual>>: constant JavaScriptOperators.greaterThanOrEqualOp,
-      JS._BinaryOperator_and>>: constant JavaScriptOperators.logicalAndOp,
-      JS._BinaryOperator_or>>: constant JavaScriptOperators.logicalOrOp,
-      JS._BinaryOperator_nullishCoalescing>>: constant JavaScriptOperators.nullishCoalescingOp,
-      JS._BinaryOperator_bitwiseAnd>>: constant JavaScriptOperators.bitwiseAndOp,
-      JS._BinaryOperator_bitwiseOr>>: constant JavaScriptOperators.bitwiseOrOp,
-      JS._BinaryOperator_bitwiseXor>>: constant JavaScriptOperators.bitwiseXorOp,
-      JS._BinaryOperator_leftShift>>: constant JavaScriptOperators.leftShiftOp,
-      JS._BinaryOperator_rightShift>>: constant JavaScriptOperators.rightShiftOp,
-      JS._BinaryOperator_unsignedRightShift>>: constant JavaScriptOperators.unsignedRightShiftOp,
-      JS._BinaryOperator_in>>: constant JavaScriptOperators.inOp,
-      JS._BinaryOperator_instanceof>>: constant JavaScriptOperators.instanceOfOp]
-
-unaryOperatorToString :: TTermDefinition (JS.UnaryOperator -> String)
-unaryOperatorToString = define "unaryOperatorToString" $
-  doc "Convert a unary operator to a string" $
-  lambda "op" $
-    cases JS._UnaryOperator (var "op") Nothing [
-      JS._UnaryOperator_negate>>: constant $ string "-",
-      JS._UnaryOperator_plus>>: constant $ string "+",
-      JS._UnaryOperator_not>>: constant $ string "!",
-      JS._UnaryOperator_bitwiseNot>>: constant $ string "~",
-      JS._UnaryOperator_typeof>>: constant $ string "typeof ",
-      JS._UnaryOperator_void>>: constant $ string "void ",
-      JS._UnaryOperator_delete>>: constant $ string "delete ",
-      JS._UnaryOperator_increment>>: constant $ string "++",
-      JS._UnaryOperator_decrement>>: constant $ string "--"]
-
-assignmentOperatorToString :: TTermDefinition (JS.AssignmentOperator -> String)
-assignmentOperatorToString = define "assignmentOperatorToString" $
-  doc "Convert an assignment operator to a string" $
-  lambda "op" $
-    cases JS._AssignmentOperator (var "op") Nothing [
-      JS._AssignmentOperator_assign>>: constant $ string "=",
-      JS._AssignmentOperator_addAssign>>: constant $ string "+=",
-      JS._AssignmentOperator_subtractAssign>>: constant $ string "-=",
-      JS._AssignmentOperator_multiplyAssign>>: constant $ string "*=",
-      JS._AssignmentOperator_divideAssign>>: constant $ string "/=",
-      JS._AssignmentOperator_moduloAssign>>: constant $ string "%=",
-      JS._AssignmentOperator_exponentiateAssign>>: constant $ string "**=",
-      JS._AssignmentOperator_leftShiftAssign>>: constant $ string "<<=",
-      JS._AssignmentOperator_rightShiftAssign>>: constant $ string ">>=",
-      JS._AssignmentOperator_unsignedRightShiftAssign>>: constant $ string ">>>=",
-      JS._AssignmentOperator_bitwiseAndAssign>>: constant $ string "&=",
-      JS._AssignmentOperator_bitwiseOrAssign>>: constant $ string "|=",
-      JS._AssignmentOperator_bitwiseXorAssign>>: constant $ string "^=",
-      JS._AssignmentOperator_andAssign>>: constant $ string "&&=",
-      JS._AssignmentOperator_orAssign>>: constant $ string "||=",
-      JS._AssignmentOperator_nullishAssign>>: constant $ string "??="]
-
-
--- ============================================================================
--- Comments
--- ============================================================================
-
-documentationCommentToExpr :: TTermDefinition (JS.DocumentationComment -> Expr)
-documentationCommentToExpr = define "documentationCommentToExpr" $
-  doc "Convert a documentation comment to an AST expression" $
-  lambda "doc" $ lets [
-    "description">: project JS._DocumentationComment JS._DocumentationComment_description @@ var "doc",
-    "tags">: project JS._DocumentationComment JS._DocumentationComment_tags @@ var "doc"] $
-    Serialization.cst @@ (toJavaScriptComments @@ var "description" @@ var "tags")
-
-toJavaScriptComments :: TTermDefinition (String -> [JS.DocumentationTag] -> String)
-toJavaScriptComments = define "toJavaScriptComments" $
-  doc ("Format a description and tags as a JSDoc comment. Empty doc lines"
-    <> " emit ` *` (no trailing space) so blank lines don't carry trailing whitespace.") $
-  lambda "desc" $ lambda "tags" $ lets [
-    "descLines">: Logic.ifElse (Equality.equal (var "desc") (string ""))
-      (list ([] :: [TTerm String]))
-      (Lists.map (lambda "line" $ Logic.ifElse (Equality.equal (var "line") (string ""))
-          (string " *")
-          (Strings.cat2 (string " * ") (var "line")))
-        (Strings.lines $ var "desc")),
-    "tagLines">: Lists.map (documentationTagToLine) (var "tags"),
-    "allLines">: Lists.concat $ list [var "descLines", var "tagLines"]] $
-    Logic.ifElse (Lists.null $ var "allLines")
-      (string "")
-      (Strings.intercalate (string "\n") $
-        Lists.concat $ list [
-          list [string "/**"],
-          var "allLines",
-          list [string " */"]])
-
-documentationTagToLine :: TTermDefinition (JS.DocumentationTag -> String)
-documentationTagToLine = define "documentationTagToLine" $
-  doc ("Convert a documentation tag to a JSDoc line. Built by joining"
-    <> " non-empty parts with spaces so that absent type/param/description"
-    <> " components don't introduce trailing whitespace.") $
-  lambda "tag" $ lets [
-    "name">: project JS._DocumentationTag JS._DocumentationTag_name @@ var "tag",
-    "mtype">: project JS._DocumentationTag JS._DocumentationTag_type @@ var "tag",
-    "mparamName">: project JS._DocumentationTag JS._DocumentationTag_paramName @@ var "tag",
-    "description">: project JS._DocumentationTag JS._DocumentationTag_description @@ var "tag",
-    "typePart">: Maybes.maybe (string "") (lambda "t" $ Strings.cat $ list [string "{", typeExpressionToString @@ var "t", string "}"]) (var "mtype"),
-    "paramPart">: Maybes.maybe (string "") (lambda "p" $ unwrap JS._Identifier @@ var "p") (var "mparamName"),
-    "parts">: list [
-      Strings.cat2 (string "@") (var "name"),
-      var "typePart",
-      var "paramPart",
-      var "description"],
-    "nonEmpty">: Lists.filter (lambda "p" $ Logic.not $ Equality.equal (var "p") (string "")) (var "parts")] $
-    Strings.cat2 (string " * ") (Strings.intercalate (string " ") (var "nonEmpty"))
-
-typeExpressionToString :: TTermDefinition (JS.TypeExpression -> String)
-typeExpressionToString = define "typeExpressionToString" $
-  doc "Convert a type expression to a string for JSDoc" $
-  lambda "typ" $
-    cases JS._TypeExpression (var "typ") Nothing [
-      JS._TypeExpression_identifier>>: lambda "id" $ unwrap JS._Identifier @@ var "id",
-      JS._TypeExpression_any>>: constant $ string "*",
-      JS._TypeExpression_void>>: constant $ string "void",
-      JS._TypeExpression_never>>: constant $ string "never",
-      -- Simplified handling for other cases
-      JS._TypeExpression_literal>>: lambda "l" $ string "literal",
-      JS._TypeExpression_array>>: lambda "a" $ Strings.cat2 (typeExpressionToString @@ (unwrap JS._ArrayTypeExpression @@ var "a")) (string "[]"),
-      JS._TypeExpression_function>>: constant $ string "Function",
-      JS._TypeExpression_object>>: constant $ string "Object",
-      JS._TypeExpression_union>>: lambda "u" $ Strings.intercalate (string "|") (Lists.map (typeExpressionToString) (var "u")),
-      JS._TypeExpression_parameterized>>: lambda "p" $ lets [
-        "base">: project JS._ParameterizedTypeExpression JS._ParameterizedTypeExpression_base @@ var "p",
-        "args">: project JS._ParameterizedTypeExpression JS._ParameterizedTypeExpression_arguments @@ var "p"] $
-        Strings.cat $ list [
-          typeExpressionToString @@ var "base",
-          string "<",
-          Strings.intercalate (string ", ") (Lists.map (typeExpressionToString) (var "args")),
-          string ">"],
-      JS._TypeExpression_optional>>: lambda "o" $ Strings.cat2 (string "?") (typeExpressionToString @@ var "o")]
-
-toLineComment :: TTermDefinition (String -> String)
-toLineComment = define "toLineComment" $
-  doc ("Convert a string to a JavaScript line comment. Empty source lines"
-    <> " emit `//` (no trailing space).") $
-  lambda "s" $ Strings.intercalate (string "\n") $ Lists.map
-    (lambda "line" $ Logic.ifElse (Equality.equal (var "line") (string ""))
-      (string "//")
-      (Strings.cat2 (string "// ") (var "line")))
-    (Strings.lines $ var "s")
-
-
--- ============================================================================
--- With Comments Variants
--- ============================================================================
-
-moduleItemWithCommentsToExpr :: TTermDefinition (JS.ModuleItemWithComments -> Expr)
-moduleItemWithCommentsToExpr = define "moduleItemWithCommentsToExpr" $
-  doc "Convert a module item with comments to an AST expression" $
-  lambda "miwc" $ lets [
-    "body">: project JS._ModuleItemWithComments JS._ModuleItemWithComments_body @@ var "miwc",
-    "mc">: project JS._ModuleItemWithComments JS._ModuleItemWithComments_comments @@ var "miwc"] $
-    Maybes.maybe
-      (moduleItemToExpr @@ var "body")
-      (lambda "c" $ Serialization.newlineSep @@ list [
-        documentationCommentToExpr @@ var "c",
-        moduleItemToExpr @@ var "body"])
-      (var "mc")
-
-functionDeclarationWithCommentsToExpr :: TTermDefinition (JS.FunctionDeclarationWithComments -> Expr)
-functionDeclarationWithCommentsToExpr = define "functionDeclarationWithCommentsToExpr" $
-  doc "Convert a function declaration with comments to an AST expression" $
-  lambda "fdwc" $ lets [
-    "body">: project JS._FunctionDeclarationWithComments JS._FunctionDeclarationWithComments_body @@ var "fdwc",
-    "mc">: project JS._FunctionDeclarationWithComments JS._FunctionDeclarationWithComments_comments @@ var "fdwc"] $
-    Maybes.maybe
-      (functionDeclarationToExpr @@ var "body")
-      (lambda "c" $ Serialization.newlineSep @@ list [
-        documentationCommentToExpr @@ var "c",
-        functionDeclarationToExpr @@ var "body"])
-      (var "mc")
-
-classDeclarationWithCommentsToExpr :: TTermDefinition (JS.ClassDeclarationWithComments -> Expr)
-classDeclarationWithCommentsToExpr = define "classDeclarationWithCommentsToExpr" $
-  doc "Convert a class declaration with comments to an AST expression" $
-  lambda "cdwc" $ lets [
-    "body">: project JS._ClassDeclarationWithComments JS._ClassDeclarationWithComments_body @@ var "cdwc",
-    "mc">: project JS._ClassDeclarationWithComments JS._ClassDeclarationWithComments_comments @@ var "cdwc"] $
-    Maybes.maybe
-      (classDeclarationToExpr @@ var "body")
-      (lambda "c" $ Serialization.newlineSep @@ list [
-        documentationCommentToExpr @@ var "c",
-        classDeclarationToExpr @@ var "body"])
-      (var "mc")
diff --git a/src/main/haskell/Hydra/Sources/JavaScript/Syntax.hs b/src/main/haskell/Hydra/Sources/JavaScript/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/JavaScript/Syntax.hs
+++ /dev/null
@@ -1,1214 +0,0 @@
--- | A JavaScript/ECMAScript syntax model for code generation.
---
--- This model is based on the ECMAScript 2024 specification and is designed
--- to support Hydra's code generation needs. It focuses on the subset of
--- JavaScript syntax needed for generating functional, type-annotated code.
-
-module Hydra.Sources.JavaScript.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.javaScript.syntax"
-
-define :: String -> Type -> Binding
-define = datatype ns
-
-js :: String -> Type
-js = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A JavaScript/ECMAScript syntax model for code generation"}
-  where
-    definitions = [
-      -- Identifiers and names
-      identifier,
-      qualifiedName,
-
-      -- Literals
-      literal,
-      stringLiteral,
-      templateLiteral,
-      templateElement,
-      numericLiteral,
-
-      -- Types (for JSDoc/TypeScript-style annotations)
-      typeAnnotation,
-      typeExpression,
-      functionTypeExpression,
-      arrayTypeExpression,
-      unionTypeExpression,
-      parameterizedTypeExpression,
-      objectTypeExpression,
-      propertySignature,
-      typeParameter,
-
-      -- Expressions
-      expression,
-      arrayExpression,
-      objectExpression,
-      functionExpression,
-      arrowFunctionExpression,
-      arrowFunctionBody,
-      callExpression,
-      memberExpression,
-      conditionalExpression,
-      binaryExpression,
-      unaryExpression,
-      assignmentExpression,
-      spreadElement,
-
-      -- Object and array components
-      property,
-      propertyKind,
-      arrayElement,
-
-      -- Patterns (for destructuring)
-      pattern_,
-      objectPattern,
-      objectPatternProperty,
-      arrayPattern,
-      assignmentPattern,
-      restElement,
-
-      -- Statements
-      statement,
-      labeledStatement,
-      blockStatement,
-      variableDeclaration,
-      variableDeclarator,
-      variableKind,
-      ifStatement,
-      switchStatement,
-      switchCase,
-      forStatement,
-      forInit,
-      forInStatement,
-      forInLeft,
-      forOfStatement,
-      whileStatement,
-      doWhileStatement,
-      tryStatement,
-      catchClause,
-      throwStatement,
-      returnStatement,
-      breakStatement,
-      continueStatement,
-
-      -- Declarations
-      functionDeclaration,
-      classDeclaration,
-      classBody,
-      methodDefinition,
-      methodKind,
-
-      -- Modules
-      program,
-      sourceType,
-      moduleItem,
-      importDeclaration,
-      importClause,
-      importSpecifier,
-      importDefaultSpecifier,
-      importNamespaceSpecifier,
-      exportDeclaration,
-      namedExport,
-      exportAllDeclaration,
-      exportSpecifier,
-
-      -- Operators
-      binaryOperator,
-      unaryOperator,
-      assignmentOperator,
-
-      -- Comments (including documentation comments)
-      comment,
-      documentationComment,
-      documentationTag,
-
-      -- Declarations with comments (for attaching JSDoc)
-      moduleItemWithComments,
-      statementWithComments,
-      functionDeclarationWithComments,
-      classDeclarationWithComments]
-
--- ============================================================================
--- Identifiers and Names
--- ============================================================================
-
-identifier :: Binding
-identifier = define "Identifier" $
-  doc "A JavaScript identifier (variable, function, class name, etc.)" $
-  T.wrap T.string
-
-qualifiedName :: Binding
-qualifiedName = define "QualifiedName" $
-  doc "A qualified name like 'module.submodule.name'" $
-  T.list $ js "Identifier"
-
--- ============================================================================
--- Literals
--- ============================================================================
-
-literal :: Binding
-literal = define "Literal" $
-  doc "A literal value" $
-  T.union [
-    "string">:
-      doc "A string literal" $
-      js "StringLiteral",
-    "number">:
-      doc "A numeric literal" $
-      js "NumericLiteral",
-    "boolean">:
-      doc "A boolean literal (true or false)"
-      T.boolean,
-    "null">:
-      doc "The null literal"
-      T.unit,
-    "undefined">:
-      doc "The undefined literal"
-      T.unit,
-    "bigInt">:
-      doc "A BigInt literal (e.g., 123n)"
-      T.bigint,
-    "template">:
-      doc "A template literal" $
-      js "TemplateLiteral"]
-
-stringLiteral :: Binding
-stringLiteral = define "StringLiteral" $
-  doc "A string literal with quote style" $
-  T.record [
-    "value">:
-      doc "The string value"
-      T.string,
-    "singleQuote">:
-      doc "Whether to use single quotes (true) or double quotes (false)"
-      T.boolean]
-
-templateLiteral :: Binding
-templateLiteral = define "TemplateLiteral" $
-  doc "A template literal (backtick string with interpolations)" $
-  T.record [
-    "quasis">:
-      doc "The static string parts" $
-      T.list $ js "TemplateElement",
-    "expressions">:
-      doc "The interpolated expressions" $
-      T.list $ js "Expression"]
-
-templateElement :: Binding
-templateElement = define "TemplateElement" $
-  doc "A static part of a template literal" $
-  T.record [
-    "value">:
-      doc "The raw string value"
-      T.string,
-    "tail">:
-      doc "Whether this is the last element"
-      T.boolean]
-
-numericLiteral :: Binding
-numericLiteral = define "NumericLiteral" $
-  doc "A numeric literal (integer or floating-point)" $
-  T.union [
-    "integer">:
-      doc "An integer literal"
-      T.int64,
-    "float">:
-      doc "A floating-point literal"
-      T.float64]
-
--- ============================================================================
--- Type Annotations (JSDoc / TypeScript-compatible)
--- ============================================================================
-
-typeAnnotation :: Binding
-typeAnnotation = define "TypeAnnotation" $
-  doc "A type annotation (for JSDoc comments or TypeScript)" $
-  T.wrap $ js "TypeExpression"
-
-typeExpression :: Binding
-typeExpression = define "TypeExpression" $
-  doc "A type expression" $
-  T.union [
-    "identifier">:
-      doc "A named type (e.g., 'string', 'number', 'MyClass')" $
-      js "Identifier",
-    "literal">:
-      doc "A literal type (e.g., 'hello', 42)" $
-      js "Literal",
-    "array">:
-      doc "An array type" $
-      js "ArrayTypeExpression",
-    "function">:
-      doc "A function type" $
-      js "FunctionTypeExpression",
-    "object">:
-      doc "An object type" $
-      js "ObjectTypeExpression",
-    "union">:
-      doc "A union type (A | B)" $
-      js "UnionTypeExpression",
-    "parameterized">:
-      doc "A parameterized type (e.g., Array<T>, Map<K, V>)" $
-      js "ParameterizedTypeExpression",
-    "optional">:
-      doc "An optional type (?T)" $
-      js "TypeExpression",
-    "any">:
-      doc "The 'any' type"
-      T.unit,
-    "void">:
-      doc "The 'void' type"
-      T.unit,
-    "never">:
-      doc "The 'never' type"
-      T.unit]
-
-functionTypeExpression :: Binding
-functionTypeExpression = define "FunctionTypeExpression" $
-  doc "A function type expression" $
-  T.record [
-    "typeParameters">:
-      doc "Type parameters (generics)" $
-      T.list $ js "TypeParameter",
-    "parameters">:
-      doc "Parameter types" $
-      T.list $ js "TypeExpression",
-    "returnType">:
-      doc "Return type" $
-      js "TypeExpression"]
-
-arrayTypeExpression :: Binding
-arrayTypeExpression = define "ArrayTypeExpression" $
-  doc "An array type (T[])" $
-  T.wrap $ js "TypeExpression"
-
-unionTypeExpression :: Binding
-unionTypeExpression = define "UnionTypeExpression" $
-  doc "A union type (A | B | C)" $
-  T.list $ js "TypeExpression"
-
-parameterizedTypeExpression :: Binding
-parameterizedTypeExpression = define "ParameterizedTypeExpression" $
-  doc "A parameterized type (e.g., Array<T>, Map<K, V>)" $
-  T.record [
-    "base">: js "TypeExpression",
-    "arguments">: T.list $ js "TypeExpression"]
-
-objectTypeExpression :: Binding
-objectTypeExpression = define "ObjectTypeExpression" $
-  doc "An object type with property signatures" $
-  T.list $ js "PropertySignature"
-
-propertySignature :: Binding
-propertySignature = define "PropertySignature" $
-  doc "A property signature in an object type" $
-  T.record [
-    "name">:
-      doc "Property name" $
-      js "Identifier",
-    "type">:
-      doc "Property type" $
-      js "TypeExpression",
-    "optional">:
-      doc "Whether the property is optional"
-      T.boolean,
-    "readonly">:
-      doc "Whether the property is readonly"
-      T.boolean]
-
-typeParameter :: Binding
-typeParameter = define "TypeParameter" $
-  doc "A type parameter (generic)" $
-  T.record [
-    "name">:
-      doc "Parameter name" $
-      js "Identifier",
-    "constraint">:
-      doc "Optional constraint (extends clause)" $
-      T.optional $ js "TypeExpression",
-    "default">:
-      doc "Optional default type" $
-      T.optional $ js "TypeExpression"]
-
--- ============================================================================
--- Expressions
--- ============================================================================
-
-expression :: Binding
-expression = define "Expression" $
-  doc "A JavaScript expression" $
-  T.union [
-    "identifier">:
-      doc "A simple identifier" $
-      js "Identifier",
-    "literal">:
-      doc "A literal value" $
-      js "Literal",
-    "array">:
-      doc "An array expression [a, b, c]" $
-      js "ArrayExpression",
-    "object">:
-      doc "An object expression {a: 1, b: 2}" $
-      js "ObjectExpression",
-    "function">:
-      doc "A function expression" $
-      js "FunctionExpression",
-    "arrow">:
-      doc "An arrow function expression" $
-      js "ArrowFunctionExpression",
-    "call">:
-      doc "A function call expression" $
-      js "CallExpression",
-    "member">:
-      doc "A member access expression (obj.prop or obj[prop])" $
-      js "MemberExpression",
-    "conditional">:
-      doc "A conditional (ternary) expression" $
-      js "ConditionalExpression",
-    "binary">:
-      doc "A binary operation expression" $
-      js "BinaryExpression",
-    "unary">:
-      doc "A unary operation expression" $
-      js "UnaryExpression",
-    "assignment">:
-      doc "An assignment expression" $
-      js "AssignmentExpression",
-    "sequence">:
-      doc "A sequence expression (a, b, c)" $
-      T.list $ js "Expression",
-    "this">:
-      doc "The 'this' keyword"
-      T.unit,
-    "new">:
-      doc "A 'new' expression" $
-      js "CallExpression",
-    "yield">:
-      doc "A yield expression" $
-      T.optional $ js "Expression",
-    "await">:
-      doc "An await expression" $
-      js "Expression",
-    "spread">:
-      doc "A spread expression (...x)" $
-      js "SpreadElement",
-    "parenthesized">:
-      doc "A parenthesized expression" $
-      js "Expression"]
-
-arrayExpression :: Binding
-arrayExpression = define "ArrayExpression" $
-  doc "An array expression [a, b, c]" $
-  T.list $ js "ArrayElement"
-
-arrayElement :: Binding
-arrayElement = define "ArrayElement" $
-  doc "An element in an array expression" $
-  T.union [
-    "expression">:
-      doc "A regular expression element" $
-      js "Expression",
-    "spread">:
-      doc "A spread element ...x" $
-      js "SpreadElement",
-    "hole">:
-      doc "An empty slot (elision)"
-      T.unit]
-
-objectExpression :: Binding
-objectExpression = define "ObjectExpression" $
-  doc "An object expression {a: 1, b: 2}" $
-  T.list $ js "Property"
-
-property :: Binding
-property = define "Property" $
-  doc "A property in an object expression" $
-  T.record [
-    "key">:
-      doc "Property key (identifier, literal, or computed)" $
-      js "Expression",
-    "value">:
-      doc "Property value" $
-      js "Expression",
-    "kind">:
-      doc "Property kind (init, get, set)" $
-      js "PropertyKind",
-    "computed">:
-      doc "Whether the key is computed [expr]"
-      T.boolean,
-    "shorthand">:
-      doc "Whether using shorthand syntax {x} for {x: x}"
-      T.boolean]
-
-propertyKind :: Binding
-propertyKind = define "PropertyKind" $
-  doc "The kind of an object property" $
-  T.union [
-    "init">:
-      doc "A normal property initialization"
-      T.unit,
-    "get">:
-      doc "A getter"
-      T.unit,
-    "set">:
-      doc "A setter"
-      T.unit]
-
-functionExpression :: Binding
-functionExpression = define "FunctionExpression" $
-  doc "A function expression" $
-  T.record [
-    "id">:
-      doc "Optional function name" $
-      T.optional $ js "Identifier",
-    "params">:
-      doc "Function parameters" $
-      T.list $ js "Pattern",
-    "body">:
-      doc "Function body" $
-      js "BlockStatement",
-    "async">:
-      doc "Whether the function is async"
-      T.boolean,
-    "generator">:
-      doc "Whether the function is a generator"
-      T.boolean]
-
-arrowFunctionExpression :: Binding
-arrowFunctionExpression = define "ArrowFunctionExpression" $
-  doc "An arrow function expression" $
-  T.record [
-    "params">:
-      doc "Function parameters" $
-      T.list $ js "Pattern",
-    "body">:
-      doc "Function body (expression or block)" $
-      js "ArrowFunctionBody",
-    "async">:
-      doc "Whether the function is async"
-      T.boolean]
-
-arrowFunctionBody :: Binding
-arrowFunctionBody = define "ArrowFunctionBody" $
-  doc "The body of an arrow function (expression or block)" $
-  T.union [
-    "expression">: js "Expression",
-    "block">: js "BlockStatement"]
-
-callExpression :: Binding
-callExpression = define "CallExpression" $
-  doc "A function call expression" $
-  T.record [
-    "callee">:
-      doc "The function being called" $
-      js "Expression",
-    "arguments">:
-      doc "The arguments" $
-      T.list $ js "Expression",
-    "optional">:
-      doc "Whether using optional chaining (?.)"
-      T.boolean]
-
-memberExpression :: Binding
-memberExpression = define "MemberExpression" $
-  doc "A member access expression" $
-  T.record [
-    "object">:
-      doc "The object" $
-      js "Expression",
-    "property">:
-      doc "The property" $
-      js "Expression",
-    "computed">:
-      doc "Whether using bracket notation (obj[prop])"
-      T.boolean,
-    "optional">:
-      doc "Whether using optional chaining (?.)"
-      T.boolean]
-
-conditionalExpression :: Binding
-conditionalExpression = define "ConditionalExpression" $
-  doc "A conditional (ternary) expression: test ? consequent : alternate" $
-  T.record [
-    "test">: js "Expression",
-    "consequent">: js "Expression",
-    "alternate">: js "Expression"]
-
-binaryExpression :: Binding
-binaryExpression = define "BinaryExpression" $
-  doc "A binary operation expression" $
-  T.record [
-    "operator">: js "BinaryOperator",
-    "left">: js "Expression",
-    "right">: js "Expression"]
-
-unaryExpression :: Binding
-unaryExpression = define "UnaryExpression" $
-  doc "A unary operation expression" $
-  T.record [
-    "operator">: js "UnaryOperator",
-    "argument">: js "Expression",
-    "prefix">:
-      doc "Whether the operator is prefix (true) or postfix (false)"
-      T.boolean]
-
-assignmentExpression :: Binding
-assignmentExpression = define "AssignmentExpression" $
-  doc "An assignment expression" $
-  T.record [
-    "operator">: js "AssignmentOperator",
-    "left">: js "Pattern",
-    "right">: js "Expression"]
-
-spreadElement :: Binding
-spreadElement = define "SpreadElement" $
-  doc "A spread element (...x)" $
-  T.wrap $ js "Expression"
-
--- ============================================================================
--- Patterns (Destructuring)
--- ============================================================================
-
-pattern_ :: Binding
-pattern_ = define "Pattern" $
-  doc "A binding pattern (for destructuring)" $
-  T.union [
-    "identifier">:
-      doc "A simple identifier binding" $
-      js "Identifier",
-    "object">:
-      doc "An object destructuring pattern" $
-      js "ObjectPattern",
-    "array">:
-      doc "An array destructuring pattern" $
-      js "ArrayPattern",
-    "assignment">:
-      doc "A pattern with default value" $
-      js "AssignmentPattern",
-    "rest">:
-      doc "A rest element (...x)" $
-      js "RestElement"]
-
-objectPattern :: Binding
-objectPattern = define "ObjectPattern" $
-  doc "An object destructuring pattern {a, b: c}" $
-  T.record [
-    "properties">:
-      doc "The property patterns" $
-      T.list $ js "ObjectPatternProperty"]
-
-objectPatternProperty :: Binding
-objectPatternProperty = define "ObjectPatternProperty" $
-  doc "A property in an object pattern" $
-  T.union [
-    "property">: js "Property",
-    "rest">: js "RestElement"]
-
-arrayPattern :: Binding
-arrayPattern = define "ArrayPattern" $
-  doc "An array destructuring pattern [a, b, c]" $
-  T.list $ T.optional $ js "Pattern"
-
-assignmentPattern :: Binding
-assignmentPattern = define "AssignmentPattern" $
-  doc "A pattern with default value (param = default)" $
-  T.record [
-    "left">: js "Pattern",
-    "right">: js "Expression"]
-
-restElement :: Binding
-restElement = define "RestElement" $
-  doc "A rest element pattern (...x)" $
-  T.wrap $ js "Pattern"
-
--- ============================================================================
--- Statements
--- ============================================================================
-
-statement :: Binding
-statement = define "Statement" $
-  doc "A JavaScript statement" $
-  T.union [
-    "expression">:
-      doc "An expression statement" $
-      js "Expression",
-    "block">:
-      doc "A block statement" $
-      js "BlockStatement",
-    "empty">:
-      doc "An empty statement (;)"
-      T.unit,
-    "debugger">:
-      doc "A debugger statement"
-      T.unit,
-    "return">:
-      doc "A return statement" $
-      js "ReturnStatement",
-    "break">:
-      doc "A break statement" $
-      js "BreakStatement",
-    "continue">:
-      doc "A continue statement" $
-      js "ContinueStatement",
-    "if">:
-      doc "An if statement" $
-      js "IfStatement",
-    "switch">:
-      doc "A switch statement" $
-      js "SwitchStatement",
-    "throw">:
-      doc "A throw statement" $
-      js "ThrowStatement",
-    "try">:
-      doc "A try statement" $
-      js "TryStatement",
-    "while">:
-      doc "A while statement" $
-      js "WhileStatement",
-    "doWhile">:
-      doc "A do-while statement" $
-      js "DoWhileStatement",
-    "for">:
-      doc "A for statement" $
-      js "ForStatement",
-    "forIn">:
-      doc "A for-in statement" $
-      js "ForInStatement",
-    "forOf">:
-      doc "A for-of statement" $
-      js "ForOfStatement",
-    "variableDeclaration">:
-      doc "A variable declaration" $
-      js "VariableDeclaration",
-    "functionDeclaration">:
-      doc "A function declaration" $
-      js "FunctionDeclaration",
-    "classDeclaration">:
-      doc "A class declaration" $
-      js "ClassDeclaration",
-    "labeled">:
-      doc "A labeled statement" $
-      js "LabeledStatement"]
-
-labeledStatement :: Binding
-labeledStatement = define "LabeledStatement" $
-  doc "A labeled statement" $
-  T.record [
-    "label">: js "Identifier",
-    "body">: js "Statement"]
-
-blockStatement :: Binding
-blockStatement = define "BlockStatement" $
-  doc "A block statement { ... }" $
-  T.list $ js "Statement"
-
-variableDeclaration :: Binding
-variableDeclaration = define "VariableDeclaration" $
-  doc "A variable declaration (var, let, const)" $
-  T.record [
-    "kind">: js "VariableKind",
-    "declarations">: T.list $ js "VariableDeclarator"]
-
-variableDeclarator :: Binding
-variableDeclarator = define "VariableDeclarator" $
-  doc "A variable declarator (id = init)" $
-  T.record [
-    "id">: js "Pattern",
-    "init">: T.optional $ js "Expression"]
-
-variableKind :: Binding
-variableKind = define "VariableKind" $
-  doc "The kind of variable declaration" $
-  T.union [
-    "var">: T.unit,
-    "let">: T.unit,
-    "const">: T.unit]
-
-ifStatement :: Binding
-ifStatement = define "IfStatement" $
-  doc "An if statement" $
-  T.record [
-    "test">: js "Expression",
-    "consequent">: js "Statement",
-    "alternate">: T.optional $ js "Statement"]
-
-switchStatement :: Binding
-switchStatement = define "SwitchStatement" $
-  doc "A switch statement" $
-  T.record [
-    "discriminant">: js "Expression",
-    "cases">: T.list $ js "SwitchCase"]
-
-switchCase :: Binding
-switchCase = define "SwitchCase" $
-  doc "A case clause in a switch statement" $
-  T.record [
-    "test">:
-      doc "The test expression (Nothing for default)" $
-      T.optional $ js "Expression",
-    "consequent">:
-      doc "The statements to execute" $
-      T.list $ js "Statement"]
-
-forStatement :: Binding
-forStatement = define "ForStatement" $
-  doc "A for statement" $
-  T.record [
-    "init">:
-      doc "Initialization" $
-      T.optional $ js "ForInit",
-    "test">:
-      doc "Test condition" $
-      T.optional $ js "Expression",
-    "update">:
-      doc "Update expression" $
-      T.optional $ js "Expression",
-    "body">: js "Statement"]
-
-forInit :: Binding
-forInit = define "ForInit" $
-  doc "Initialization clause of a for statement" $
-  T.union [
-    "variable">: js "VariableDeclaration",
-    "expression">: js "Expression"]
-
-forInStatement :: Binding
-forInStatement = define "ForInStatement" $
-  doc "A for-in statement" $
-  T.record [
-    "left">: js "ForInLeft",
-    "right">: js "Expression",
-    "body">: js "Statement"]
-
-forInLeft :: Binding
-forInLeft = define "ForInLeft" $
-  doc "Left-hand side of a for-in or for-of statement" $
-  T.union [
-    "variable">: js "VariableDeclaration",
-    "pattern">: js "Pattern"]
-
-forOfStatement :: Binding
-forOfStatement = define "ForOfStatement" $
-  doc "A for-of statement" $
-  T.record [
-    "await">:
-      doc "Whether this is a for-await-of"
-      T.boolean,
-    "left">: js "ForInLeft",
-    "right">: js "Expression",
-    "body">: js "Statement"]
-
-whileStatement :: Binding
-whileStatement = define "WhileStatement" $
-  doc "A while statement" $
-  T.record [
-    "test">: js "Expression",
-    "body">: js "Statement"]
-
-doWhileStatement :: Binding
-doWhileStatement = define "DoWhileStatement" $
-  doc "A do-while statement" $
-  T.record [
-    "body">: js "Statement",
-    "test">: js "Expression"]
-
-tryStatement :: Binding
-tryStatement = define "TryStatement" $
-  doc "A try statement" $
-  T.record [
-    "block">: js "BlockStatement",
-    "handler">: T.optional $ js "CatchClause",
-    "finalizer">: T.optional $ js "BlockStatement"]
-
-catchClause :: Binding
-catchClause = define "CatchClause" $
-  doc "A catch clause" $
-  T.record [
-    "param">:
-      doc "The catch parameter (can be omitted in ES2019+)" $
-      T.optional $ js "Pattern",
-    "body">: js "BlockStatement"]
-
-throwStatement :: Binding
-throwStatement = define "ThrowStatement" $
-  doc "A throw statement" $
-  T.wrap $ js "Expression"
-
-returnStatement :: Binding
-returnStatement = define "ReturnStatement" $
-  doc "A return statement" $
-  T.optional $ js "Expression"
-
-breakStatement :: Binding
-breakStatement = define "BreakStatement" $
-  doc "A break statement" $
-  T.optional $ js "Identifier"
-
-continueStatement :: Binding
-continueStatement = define "ContinueStatement" $
-  doc "A continue statement" $
-  T.optional $ js "Identifier"
-
--- ============================================================================
--- Declarations
--- ============================================================================
-
-functionDeclaration :: Binding
-functionDeclaration = define "FunctionDeclaration" $
-  doc "A function declaration" $
-  T.record [
-    "id">:
-      doc "Function name" $
-      js "Identifier",
-    "params">:
-      doc "Function parameters" $
-      T.list $ js "Pattern",
-    "body">:
-      doc "Function body" $
-      js "BlockStatement",
-    "async">:
-      doc "Whether the function is async"
-      T.boolean,
-    "generator">:
-      doc "Whether the function is a generator"
-      T.boolean]
-
-classDeclaration :: Binding
-classDeclaration = define "ClassDeclaration" $
-  doc "A class declaration" $
-  T.record [
-    "id">:
-      doc "Class name" $
-      js "Identifier",
-    "superClass">:
-      doc "Optional superclass" $
-      T.optional $ js "Expression",
-    "body">:
-      doc "Class body" $
-      js "ClassBody"]
-
-classBody :: Binding
-classBody = define "ClassBody" $
-  doc "A class body" $
-  T.list $ js "MethodDefinition"
-
-methodDefinition :: Binding
-methodDefinition = define "MethodDefinition" $
-  doc "A method definition in a class" $
-  T.record [
-    "key">:
-      doc "Method name" $
-      js "Expression",
-    "value">:
-      doc "Method function" $
-      js "FunctionExpression",
-    "kind">:
-      doc "Method kind" $
-      js "MethodKind",
-    "computed">:
-      doc "Whether the key is computed"
-      T.boolean,
-    "static">:
-      doc "Whether the method is static"
-      T.boolean]
-
-methodKind :: Binding
-methodKind = define "MethodKind" $
-  doc "The kind of a class method" $
-  T.union [
-    "constructor">: T.unit,
-    "method">: T.unit,
-    "get">: T.unit,
-    "set">: T.unit]
-
--- ============================================================================
--- Modules
--- ============================================================================
-
-program :: Binding
-program = define "Program" $
-  doc "A JavaScript program (module)" $
-  T.record [
-    "body">:
-      doc "The module items" $
-      T.list $ js "ModuleItem",
-    "sourceType">:
-      doc "Whether this is a module or script" $
-      js "SourceType"]
-
-sourceType :: Binding
-sourceType = define "SourceType" $
-  doc "Whether the program is a module or script" $
-  T.union [
-    "module">: T.unit,
-    "script">: T.unit]
-
-moduleItem :: Binding
-moduleItem = define "ModuleItem" $
-  doc "A top-level item in a module" $
-  T.union [
-    "statement">: js "Statement",
-    "import">: js "ImportDeclaration",
-    "export">: js "ExportDeclaration"]
-
-importDeclaration :: Binding
-importDeclaration = define "ImportDeclaration" $
-  doc "An import declaration" $
-  T.record [
-    "specifiers">:
-      doc "What to import" $
-      T.list $ js "ImportClause",
-    "source">:
-      doc "The module to import from" $
-      js "StringLiteral"]
-
-importClause :: Binding
-importClause = define "ImportClause" $
-  doc "An import clause (named, default, or namespace import)" $
-  T.union [
-    "named">: js "ImportSpecifier",
-    "default">: js "ImportDefaultSpecifier",
-    "namespace">: js "ImportNamespaceSpecifier"]
-
-importSpecifier :: Binding
-importSpecifier = define "ImportSpecifier" $
-  doc "A named import specifier (import {x as y} from ...)" $
-  T.record [
-    "imported">: js "Identifier",
-    "local">: js "Identifier"]
-
-importDefaultSpecifier :: Binding
-importDefaultSpecifier = define "ImportDefaultSpecifier" $
-  doc "A default import specifier (import x from ...)" $
-  T.wrap $ js "Identifier"
-
-importNamespaceSpecifier :: Binding
-importNamespaceSpecifier = define "ImportNamespaceSpecifier" $
-  doc "A namespace import specifier (import * as x from ...)" $
-  T.wrap $ js "Identifier"
-
-exportDeclaration :: Binding
-exportDeclaration = define "ExportDeclaration" $
-  doc "An export declaration" $
-  T.union [
-    "named">:
-      doc "Named exports (export {x, y as z})" $
-      js "NamedExport",
-    "default">:
-      doc "Default export (export default ...)" $
-      js "Expression",
-    "declaration">:
-      doc "Export a declaration (export const x = ...)" $
-      js "Statement",
-    "all">:
-      doc "Export all (export * from ...)" $
-      js "ExportAllDeclaration"]
-
-namedExport :: Binding
-namedExport = define "NamedExport" $
-  doc "Named exports (export {x, y as z})" $
-  T.record [
-    "specifiers">: T.list $ js "ExportSpecifier",
-    "source">: T.optional $ js "StringLiteral"]
-
-exportAllDeclaration :: Binding
-exportAllDeclaration = define "ExportAllDeclaration" $
-  doc "Export all declaration (export * from ...)" $
-  T.record [
-    "exported">: T.optional $ js "Identifier",
-    "source">: js "StringLiteral"]
-
-exportSpecifier :: Binding
-exportSpecifier = define "ExportSpecifier" $
-  doc "An export specifier (x as y)" $
-  T.record [
-    "local">: js "Identifier",
-    "exported">: js "Identifier"]
-
--- ============================================================================
--- Operators
--- ============================================================================
-
-binaryOperator :: Binding
-binaryOperator = define "BinaryOperator" $
-  doc "A binary operator" $
-  T.union [
-    -- Arithmetic
-    "add">: doc "+" T.unit,
-    "subtract">: doc "-" T.unit,
-    "multiply">: doc "*" T.unit,
-    "divide">: doc "/" T.unit,
-    "modulo">: doc "%" T.unit,
-    "exponentiate">: doc "**" T.unit,
-    -- Comparison
-    "equal">: doc "==" T.unit,
-    "notEqual">: doc "!=" T.unit,
-    "strictEqual">: doc "===" T.unit,
-    "strictNotEqual">: doc "!==" T.unit,
-    "lessThan">: doc "<" T.unit,
-    "lessThanOrEqual">: doc "<=" T.unit,
-    "greaterThan">: doc ">" T.unit,
-    "greaterThanOrEqual">: doc ">=" T.unit,
-    -- Logical
-    "and">: doc "&&" T.unit,
-    "or">: doc "||" T.unit,
-    "nullishCoalescing">: doc "??" T.unit,
-    -- Bitwise
-    "bitwiseAnd">: doc "&" T.unit,
-    "bitwiseOr">: doc "|" T.unit,
-    "bitwiseXor">: doc "^" T.unit,
-    "leftShift">: doc "<<" T.unit,
-    "rightShift">: doc ">>" T.unit,
-    "unsignedRightShift">: doc ">>>" T.unit,
-    -- Other
-    "in">: doc "in" T.unit,
-    "instanceof">: doc "instanceof" T.unit]
-
-unaryOperator :: Binding
-unaryOperator = define "UnaryOperator" $
-  doc "A unary operator" $
-  T.union [
-    "negate">: doc "-" T.unit,
-    "plus">: doc "+" T.unit,
-    "not">: doc "!" T.unit,
-    "bitwiseNot">: doc "~" T.unit,
-    "typeof">: doc "typeof" T.unit,
-    "void">: doc "void" T.unit,
-    "delete">: doc "delete" T.unit,
-    "increment">: doc "++" T.unit,
-    "decrement">: doc "--" T.unit]
-
-assignmentOperator :: Binding
-assignmentOperator = define "AssignmentOperator" $
-  doc "An assignment operator" $
-  T.union [
-    "assign">: doc "=" T.unit,
-    "addAssign">: doc "+=" T.unit,
-    "subtractAssign">: doc "-=" T.unit,
-    "multiplyAssign">: doc "*=" T.unit,
-    "divideAssign">: doc "/=" T.unit,
-    "moduloAssign">: doc "%=" T.unit,
-    "exponentiateAssign">: doc "**=" T.unit,
-    "leftShiftAssign">: doc "<<=" T.unit,
-    "rightShiftAssign">: doc ">>=" T.unit,
-    "unsignedRightShiftAssign">: doc ">>>=" T.unit,
-    "bitwiseAndAssign">: doc "&=" T.unit,
-    "bitwiseOrAssign">: doc "|=" T.unit,
-    "bitwiseXorAssign">: doc "^=" T.unit,
-    "andAssign">: doc "&&=" T.unit,
-    "orAssign">: doc "||=" T.unit,
-    "nullishAssign">: doc "??=" T.unit]
-
--- ============================================================================
--- Comments (for JSDoc)
--- ============================================================================
-
-comment :: Binding
-comment = define "Comment" $
-  doc "A JavaScript comment" $
-  T.union [
-    "line">:
-      doc "A single-line comment (// ...)"
-      T.string,
-    "block">:
-      doc "A block comment (/* ... */)"
-      T.string,
-    "documentation">:
-      doc "A documentation comment (/** ... */, i.e. JSDoc)" $
-      js "DocumentationComment"]
-
-documentationComment :: Binding
-documentationComment = define "DocumentationComment" $
-  doc "A documentation comment (JSDoc) with structured tags" $
-  T.record [
-    "description">:
-      doc "The main description"
-      T.string,
-    "tags">:
-      doc "Documentation tags (@param, @returns, etc.)" $
-      T.list $ js "DocumentationTag"]
-
-documentationTag :: Binding
-documentationTag = define "DocumentationTag" $
-  doc "A documentation tag (@param, @returns, @type, etc.)" $
-  T.record [
-    "name">:
-      doc "Tag name (param, returns, type, etc.)"
-      T.string,
-    "type">:
-      doc "Optional type expression" $
-      T.optional $ js "TypeExpression",
-    "paramName">:
-      doc "Optional parameter name (for @param)" $
-      T.optional $ js "Identifier",
-    "description">:
-      doc "Tag description"
-      T.string]
-
--- ============================================================================
--- Declarations with Comments (for JSDoc support)
--- ============================================================================
-
-moduleItemWithComments :: Binding
-moduleItemWithComments = define "ModuleItemWithComments" $
-  doc "A module item with optional documentation" $
-  T.record [
-    "body">:
-      doc "The module item" $
-      js "ModuleItem",
-    "comments">:
-      doc "Optional documentation comment" $
-      T.optional $ js "DocumentationComment"]
-
-statementWithComments :: Binding
-statementWithComments = define "StatementWithComments" $
-  doc "A statement with optional documentation" $
-  T.record [
-    "body">:
-      doc "The statement" $
-      js "Statement",
-    "comments">:
-      doc "Optional documentation comment" $
-      T.optional $ js "DocumentationComment"]
-
-functionDeclarationWithComments :: Binding
-functionDeclarationWithComments = define "FunctionDeclarationWithComments" $
-  doc "A function declaration with optional JSDoc" $
-  T.record [
-    "body">:
-      doc "The function declaration" $
-      js "FunctionDeclaration",
-    "comments">:
-      doc "Optional JSDoc comment" $
-      T.optional $ js "DocumentationComment"]
-
-classDeclarationWithComments :: Binding
-classDeclarationWithComments = define "ClassDeclarationWithComments" $
-  doc "A class declaration with optional JSDoc" $
-  T.record [
-    "body">:
-      doc "The class declaration" $
-      js "ClassDeclaration",
-    "comments">:
-      doc "Optional JSDoc comment" $
-      T.optional $ js "DocumentationComment"]
diff --git a/src/main/haskell/Hydra/Sources/Json/Bootstrap.hs b/src/main/haskell/Hydra/Sources/Json/Bootstrap.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Bootstrap.hs
+++ /dev/null
@@ -1,66 +0,0 @@
--- | A module which provides a minimal typing environment for decoding other Modules from JSON.
---
--- This module contains a single binding, typesByName, which maps type Names to Types
--- for all types defined in the kernel modules needed to decode the Module type
--- and to provide schema types for inference tests:
--- hydra.coders, hydra.context, hydra.core, hydra.error, hydra.graph, hydra.packaging, and hydra.util.
---
--- By consolidating these types into a single map, we avoid the need to generate
--- individual Source modules for each kernel type module (which can exceed the JVM's
--- 64KB method size limit for large modules like hydra.core).
-
-module Hydra.Sources.Json.Bootstrap where
-
--- Note: non-standard imports; this module is constructed dynamically from other modules.
-import Hydra.Kernel
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Sources.Kernel.Types.Coders as Coders
-import qualified Hydra.Sources.Kernel.Types.Context as Context
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Errors as Error
-import qualified Hydra.Sources.Kernel.Types.Graph as Graph
-import qualified Hydra.Sources.Kernel.Types.Packaging as Packaging
-import qualified Hydra.Sources.Kernel.Types.Util as Util
-
-import qualified Data.Map as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.bootstrap"
-
--- | The kernel type modules whose types are needed to decode Module from JSON
--- and to provide schema types for inference tests.
-bootstrapTypeModules :: [Module]
-bootstrapTypeModules = [
-  Coders.module_,
-  Context.module_,
-  Core.module_,
-  Error.module_,
-  Graph.module_,
-  Packaging.module_,
-  Util.module_]
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = [bindingToDefinition typesByNameBinding],
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Namespace "hydra.core"],
-            moduleDescription = Just ("A module which provides a minimal typing environment for decoding other modules from JSON."
-      ++ " This avoids certain problems with generating entire source modules into target languages like Java,"
-      ++ " which is subject to method size limits for large modules like hydra.core.")}
-typesByNameBinding :: Binding
-typesByNameBinding = Binding {
-    bindingName = Name "hydra.json.bootstrap.typesByName",
-    bindingTerm = typesByNameTerm,
-    bindingTypeScheme = Nothing}
-
--- | Build a Term-level map from Name to Type, by extracting all bindings
--- from the bootstrap type modules. Each binding in a kernel type module
--- is a type definition whose bindingTerm is the type encoded as a Term.
-typesByNameTerm :: Term
-typesByNameTerm = TermMap $ M.fromList entries
-  where
-    entries = concatMap moduleEntries bootstrapTypeModules
-    moduleEntries mod = fmap bindingEntry (moduleBindings mod)
-    bindingEntry b = (EncodeCore.name (bindingName b), bindingTerm b)
diff --git a/src/main/haskell/Hydra/Sources/Json/Decode.hs b/src/main/haskell/Hydra/Sources/Json/Decode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Decode.hs
+++ /dev/null
@@ -1,564 +0,0 @@
-
-module Hydra.Sources.Json.Decode where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
---import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++), decodeFloat)
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Scientific                           as Sci
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Json.Model
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.decode"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Strip.ns, moduleNamespace Literals.module_, moduleNamespace ExtractCore.module_],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "JSON decoding for Hydra terms. Converts JSON Values to Terms using Either for error handling."}
-  where
-    definitions = [
-      toDefinition fromJson,
-      toDefinition decodeLiteral,
-      toDefinition decodeFloat,
-      toDefinition decodeInteger,
-      toDefinition parseSpecialFloat,
-      toDefinition parseSpecialFloat32,
-      toDefinition expectString,
-      toDefinition expectArray,
-      toDefinition expectObject,
-      toDefinition expectNumber]
-
--- | Decode a JSON Value to a Term given a Type and type lookup table.
--- Returns Left with an error message for type mismatches or invalid JSON.
-fromJson :: TTermDefinition (M.Map Name Type -> Name -> Type -> Value -> Either String Term)
-fromJson = define "fromJson" $
-  doc "Decode a JSON value to a Hydra term given a type and type name. Returns Left for type mismatches." $
-  "types" ~> "tname" ~> "typ" ~> "value" ~>
-  "stripped" <~ (Strip.deannotateType @@ var "typ") $
-  cases _Type (var "stripped")
-    (Just $ left $ Strings.cat $ list [
-      string "unsupported type for JSON decoding: ",
-      ShowCore.type_ @@ var "typ"]) [
-
-    -- Literals
-    _Type_literal>>: "lt" ~> decodeLiteral @@ var "lt" @@ var "value",
-
-    -- Lists
-    _Type_list>>: "elemType" ~>
-      "decodeElem" <~ ("v" ~> fromJson @@ var "types" @@ var "tname" @@ var "elemType" @@ var "v") $
-      "arrResult" <~ (expectArray @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("arr" ~>
-          "decoded" <~ (Eithers.mapList (var "decodeElem") (var "arr")) $
-          Eithers.map ("ts" ~> Core.termList $ var "ts") (var "decoded"))
-        (var "arrResult"),
-
-    -- Sets
-    _Type_set>>: "elemType" ~>
-      "decodeElem" <~ ("v" ~> fromJson @@ var "types" @@ var "tname" @@ var "elemType" @@ var "v") $
-      "arrResult" <~ (expectArray @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("arr" ~>
-          "decoded" <~ (Eithers.mapList (var "decodeElem") (var "arr")) $
-          Eithers.map ("elems" ~> Core.termSet $ Sets.fromList $ var "elems") (var "decoded"))
-        (var "arrResult"),
-
-    -- Maybe: decoding depends on whether the inner type is itself Maybe
-    --   Simple Maybe(T): null -> Nothing, any other value -> Just (decoded as T)
-    --   Nested Maybe(Maybe(T)): null -> Nothing, [v] -> Just v (array-wrapped)
-    _Type_maybe>>: "innerType" ~>
-      "innerStripped" <~ (Strip.deannotateType @@ var "innerType") $
-      "isNestedMaybe" <~ (cases _Type (var "innerStripped") (Just false) [
-        _Type_maybe>>: constant true]) $
-      Logic.ifElse (var "isNestedMaybe")
-        -- Nested Maybe: use array-wrapped encoding (null -> Nothing, [v] -> Just v)
-        ("decodeJust" <~ ("arr" ~>
-          Maybes.maybe
-            (left $ string "expected single-element array for Just")
-            ("firstVal" ~>
-              Eithers.map ("v" ~> Core.termMaybe $ just $ var "v")
-                (fromJson @@ var "types" @@ var "tname" @@ var "innerType" @@ var "firstVal"))
-            (Lists.maybeHead $ var "arr")) $
-        "decodeMaybeArray" <~ ("arr" ~>
-          "len" <~ (Lists.length $ var "arr") $
-          Logic.ifElse (Equality.equal (var "len") (int32 0))
-            (right $ Core.termMaybe nothing)
-            (Logic.ifElse (Equality.equal (var "len") (int32 1))
-              (var "decodeJust" @@ var "arr")
-              (left $ string "expected single-element array for Just"))) $
-        cases _Value (var "value")
-          (Just $ left $ string "expected null or single-element array for nested Maybe") [
-          _Value_null>>: constant $ right $ Core.termMaybe nothing,
-          _Value_array>>: "arr" ~> var "decodeMaybeArray" @@ var "arr"])
-        -- Simple Maybe: idiomatic encoding (null -> Nothing, value -> Just)
-        (cases _Value (var "value")
-          (Just $
-            Eithers.map ("v" ~> Core.termMaybe $ just $ var "v")
-              (fromJson @@ var "types" @@ var "tname" @@ var "innerType" @@ var "value")) [
-          _Value_null>>: constant $ right $ Core.termMaybe nothing]),
-
-    -- Records
-    _Type_record>>: "rt" ~>
-      "objResult" <~ (expectObject @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("obj" ~>
-          "decodeField" <~ ("ft" ~>
-            "fname" <~ (Core.fieldTypeName $ var "ft") $
-            "ftype" <~ (Core.fieldTypeType $ var "ft") $
-            "mval" <~ (Maps.lookup (Core.unName $ var "fname") (var "obj")) $
-            -- Use empty object as default for missing optional fields
-            "defaultVal" <~ Json.valueNull $
-            "jsonVal" <~ (Maybes.fromMaybe (var "defaultVal") (var "mval")) $
-            "decoded" <~ (fromJson @@ var "types" @@ var "tname" @@ var "ftype" @@ var "jsonVal") $
-            Eithers.map ("v" ~> Core.field (var "fname") (var "v")) (var "decoded")) $
-          "decodedFields" <~ (Eithers.mapList (var "decodeField") (var "rt")) $
-          Eithers.map
-            ("fs" ~> Core.termRecord $ Core.record (var "tname") (var "fs"))
-            (var "decodedFields"))
-        (var "objResult"),
-
-    -- Unions (single-key object)
-    _Type_union>>: "rt" ~>
-      -- Helper to decode a field once found
-      "decodeVariant" <~ ("key" ~> "val" ~> "ftype" ~>
-        "jsonVal" <~ (Maybes.fromMaybe Json.valueNull (var "val")) $
-        "decoded" <~ (fromJson @@ var "types" @@ var "tname" @@ var "ftype" @@ var "jsonVal") $
-        Eithers.map
-          ("v" ~> Core.termInject $ Core.injection
-            (var "tname")
-            (Core.field (Core.name $ var "key") (var "v")))
-          (var "decoded")) $
-      -- Find matching field and decode (finds the field whose name matches `key`,
-      -- then decodes its value; returns an error if no matching variant is present).
-      "findAndDecode" <~ ("key" ~> "val" ~> "fts" ~>
-        Maybes.maybe
-          (left $ Strings.cat $ list [string "unknown variant: ", var "key"])
-          ("ft" ~> var "decodeVariant" @@ var "key" @@ var "val" @@ (Core.fieldTypeType $ var "ft"))
-          (Lists.find
-            ("ft" ~> Equality.equal (Core.unName $ Core.fieldTypeName $ var "ft") (var "key"))
-            (var "fts"))) $
-      -- Helper to decode a single-key object
-      "decodeSingleKey" <~ ("obj" ~>
-        Maybes.maybe
-          (left $ string "expected single-key object for union")
-          ("k" ~> var "findAndDecode"
-            @@ var "k"
-            @@ (Maps.lookup (var "k") (var "obj"))
-            @@ var "rt")
-          (Lists.maybeHead $ Maps.keys $ var "obj")) $
-      -- Process the union object
-      "processUnion" <~ ("obj" ~>
-        Logic.ifElse (Equality.equal (Lists.length $ Maps.keys $ var "obj") (int32 1))
-          (var "decodeSingleKey" @@ var "obj")
-          (left $ string "expected single-key object for union")) $
-      "objResult" <~ (expectObject @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("obj" ~> var "processUnion" @@ var "obj")
-        (var "objResult"),
-
-    -- Unit (empty object)
-    _Type_unit>>: constant $
-      "objResult" <~ (expectObject @@ var "value") $
-      Eithers.map (constant Core.termUnit) (var "objResult"),
-
-    -- Wrapped types (look up in type table and extract inner type if needed)
-    _Type_wrap>>: "wn" ~>
-      -- TypeWrap now directly holds the inner Type; decode with it and wrap the result
-      "decoded" <~ (fromJson @@ var "types" @@ var "tname" @@ var "wn" @@ var "value") $
-      Eithers.map
-        ("v" ~> Core.termWrap $ Core.wrappedTerm (var "tname") (var "v"))
-        (var "decoded"),
-
-    -- Map -> array of {key, value}
-    _Type_map>>: "mt" ~>
-      "keyType" <~ (Core.mapTypeKeys $ var "mt") $
-      "valType" <~ (Core.mapTypeValues $ var "mt") $
-      "arrResult" <~ (expectArray @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("arr" ~>
-          "decodeEntry" <~ ("entryJson" ~>
-            "objResult" <~ (expectObject @@ var "entryJson") $
-            Eithers.either_
-              ("err" ~> left $ var "err")
-              ("entryObj" ~>
-                "keyJson" <~ (Maps.lookup (string "key") (var "entryObj")) $
-                "valJson" <~ (Maps.lookup (string "value") (var "entryObj")) $
-                Maybes.maybe
-                  (left $ string "missing key in map entry")
-                  ("kj" ~> Maybes.maybe
-                    (left $ string "missing value in map entry")
-                    ("vj" ~>
-                      "decodedKey" <~ (fromJson @@ var "types" @@ var "tname" @@ var "keyType" @@ var "kj") $
-                      "decodedVal" <~ (fromJson @@ var "types" @@ var "tname" @@ var "valType" @@ var "vj") $
-                      Eithers.either_
-                        ("err" ~> left $ var "err")
-                        ("k" ~> Eithers.map ("v" ~> pair (var "k") (var "v")) (var "decodedVal"))
-                        (var "decodedKey"))
-                    (var "valJson"))
-                  (var "keyJson"))
-              (var "objResult")) $
-          "entries" <~ (Eithers.mapList (var "decodeEntry") (var "arr")) $
-          Eithers.map ("es" ~> Core.termMap $ Maps.fromList $ var "es") (var "entries"))
-        (var "arrResult"),
-
-    -- Pair -> {first, second}
-    _Type_pair>>: "pt" ~>
-      "firstType" <~ (Core.pairTypeFirst $ var "pt") $
-      "secondType" <~ (Core.pairTypeSecond $ var "pt") $
-      "objResult" <~ (expectObject @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("obj" ~>
-          "firstJson" <~ (Maps.lookup (string "first") (var "obj")) $
-          "secondJson" <~ (Maps.lookup (string "second") (var "obj")) $
-          Maybes.maybe
-            (left $ string "missing first in pair")
-            ("fj" ~> Maybes.maybe
-              (left $ string "missing second in pair")
-              ("sj" ~>
-                "decodedFirst" <~ (fromJson @@ var "types" @@ var "tname" @@ var "firstType" @@ var "fj") $
-                "decodedSecond" <~ (fromJson @@ var "types" @@ var "tname" @@ var "secondType" @@ var "sj") $
-                Eithers.either_
-                  ("err" ~> left $ var "err")
-                  ("f" ~> Eithers.map ("s" ~> Core.termPair $ pair (var "f") (var "s")) (var "decodedSecond"))
-                  (var "decodedFirst"))
-              (var "secondJson"))
-            (var "firstJson"))
-        (var "objResult"),
-
-    -- Either -> {left} or {right}
-    _Type_either>>: "et" ~>
-      "leftType" <~ (Core.eitherTypeLeft $ var "et") $
-      "rightType" <~ (Core.eitherTypeRight $ var "et") $
-      "objResult" <~ (expectObject @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("obj" ~>
-          "leftJson" <~ (Maps.lookup (string "left") (var "obj")) $
-          "rightJson" <~ (Maps.lookup (string "right") (var "obj")) $
-          Maybes.maybe
-            (Maybes.maybe
-              (left $ string "expected left or right in Either")
-              ("rj" ~>
-                "decoded" <~ (fromJson @@ var "types" @@ var "tname" @@ var "rightType" @@ var "rj") $
-                Eithers.map ("v" ~> Core.termEither $ right $ var "v") (var "decoded"))
-              (var "rightJson"))
-            ("lj" ~>
-              "decoded" <~ (fromJson @@ var "types" @@ var "tname" @@ var "leftType" @@ var "lj") $
-              Eithers.map ("v" ~> Core.termEither $ left $ var "v") (var "decoded"))
-            (var "leftJson"))
-        (var "objResult"),
-
-    -- Type variables (look up in type table and recurse)
-    _Type_variable>>: "name" ~>
-      "lookedUp" <~ (Maps.lookup (var "name") (var "types")) $
-      Maybes.maybe
-        (left $ Strings.cat $ list [
-          string "unknown type variable: ",
-          Core.unName $ var "name"])
-        ("resolvedType" ~> fromJson @@ var "types" @@ var "name" @@ var "resolvedType" @@ var "value")
-        (var "lookedUp")]
-
--- | Decode a JSON value to a literal term given a literal type
-decodeLiteral :: TTermDefinition (LiteralType -> Value -> Either String Term)
-decodeLiteral = define "decodeLiteral" $
-  doc "Decode a JSON value to a literal term" $
-  "lt" ~> "value" ~>
-  cases _LiteralType (var "lt") Nothing [
-    _LiteralType_binary>>: constant $
-      "strResult" <~ (expectString @@ var "value") $
-      Eithers.map ("s" ~> Core.termLiteral $ Core.literalBinary $ Literals.stringToBinary $ var "s") (var "strResult"),
-
-    _LiteralType_boolean>>: constant $
-      cases _Value (var "value")
-        (Just $ left $ string "expected boolean") [
-        _Value_boolean>>: "b" ~> right $ Core.termLiteral $ Core.literalBoolean $ var "b"],
-
-    _LiteralType_decimal>>: constant $
-      cases _Value (var "value")
-        (Just $ left $ string "expected number for decimal") [
-        _Value_number>>: "n" ~> right $ Core.termLiteral $ Core.literalDecimal $ var "n"],
-
-    _LiteralType_float>>: "ft" ~> decodeFloat @@ var "ft" @@ var "value",
-
-    _LiteralType_integer>>: "it" ~> decodeInteger @@ var "it" @@ var "value",
-
-    _LiteralType_string>>: constant $
-      "strResult" <~ (expectString @@ var "value") $
-      Eithers.map ("s" ~> Core.termLiteral $ Core.literalString $ var "s") (var "strResult")]
-
--- | Decode a JSON value to a float term
--- Float32, Float64, and Bigfloat all accept finite values as JSON numbers
--- Special values (NaN, Infinity, -Infinity, -0.0) are accepted as JSON string sentinels for all float types
-decodeFloat :: TTermDefinition (FloatType -> Value -> Either String Term)
-decodeFloat = define "decodeFloat" $
-  doc "Decode a JSON value to a float term. Finite values arrive as JSON numbers; NaN/Inf/-0.0 arrive as JSON string sentinels. Float32 and Float64 are symmetric." $
-  "ft" ~> "value" ~>
-  cases _FloatType (var "ft") Nothing [
-    -- Bigfloat: JSON number (Scientific) -> decimal -> float64 -> bigfloat. NaN/Inf are not
-    -- representable in JSON's grammar, so they can only arrive via the string sentinel path below.
-    _FloatType_bigfloat>>: constant $
-      cases _Value (var "value")
-        (Just $ left $ string "expected number or special float string for bigfloat") [
-        _Value_number>>: "n" ~> right $ Core.termLiteral $ Core.literalFloat $ Core.floatValueBigfloat $
-          Literals.float64ToBigfloat $ Literals.decimalToFloat64 $ var "n",
-        _Value_string>>: "s" ~>
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid bigfloat sentinel: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalFloat $ Core.floatValueBigfloat $
-              Literals.float64ToBigfloat $ var "v")
-            (parseSpecialFloat @@ var "s")],
-    -- Float32: JSON number (Scientific) -> float32, or special sentinel string
-    _FloatType_float32>>: constant $
-      cases _Value (var "value")
-        (Just $ left $ string "expected number or special float string for float32") [
-        _Value_number>>: "n" ~> right $ Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat32 $ Literals.decimalToFloat32 $ var "n",
-        _Value_string>>: "s" ~>
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid float32 sentinel: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat32 $ var "v")
-            (parseSpecialFloat32 @@ var "s")],
-    -- Float64: JSON number (Scientific) -> float64, or special sentinel string
-    _FloatType_float64>>: constant $
-      cases _Value (var "value")
-        (Just $ left $ string "expected number or special float string for float64") [
-        _Value_number>>: "n" ~> right $ Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat64 $ Literals.decimalToFloat64 $ var "n",
-        _Value_string>>: "s" ~>
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid float64 sentinel: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat64 $ var "v")
-            (parseSpecialFloat @@ var "s")]]
-
--- | Parse a string as an IEEE sentinel float that the JSON number grammar cannot express:
--- "NaN", "Infinity", "-Infinity", or "-0.0". Returns Nothing for unrecognized strings.
--- The -0.0 case is here so that IEEE negative zero survives a round trip through JSON via
--- the encoder's string-escape path; Scientific-backed number decoding would normalize it to 0.
-parseSpecialFloat :: TTermDefinition (String -> Maybe Double)
-parseSpecialFloat = define "parseSpecialFloat" $
-  doc "Parse an IEEE sentinel string (NaN, Infinity, -Infinity, -0.0) to a float64. Returns Nothing for unrecognized strings." $
-  "s" ~>
-    Logic.ifElse
-      (Logic.or (Equality.equal (var "s") (string "NaN")) $
-       Logic.or (Equality.equal (var "s") (string "Infinity")) $
-       Logic.or (Equality.equal (var "s") (string "-Infinity"))
-                (Equality.equal (var "s") (string "-0.0")))
-      (Literals.readFloat64 $ var "s")
-      Phantoms.nothing
-
--- | Parse a string as an IEEE sentinel float32. Same accepted strings as 'parseSpecialFloat',
--- but returns a float32 value.
-parseSpecialFloat32 :: TTermDefinition (String -> Maybe Float)
-parseSpecialFloat32 = define "parseSpecialFloat32" $
-  doc "Parse an IEEE sentinel string (NaN, Infinity, -Infinity, -0.0) to a float32. Returns Nothing for unrecognized strings." $
-  "s" ~>
-    Logic.ifElse
-      (Logic.or (Equality.equal (var "s") (string "NaN")) $
-       Logic.or (Equality.equal (var "s") (string "Infinity")) $
-       Logic.or (Equality.equal (var "s") (string "-Infinity"))
-                (Equality.equal (var "s") (string "-0.0")))
-      (Literals.readFloat32 $ var "s")
-      Phantoms.nothing
-
--- | Decode a JSON value to an integer term
--- Small integers (int8, int16, int32, uint8, uint16) are decoded from JSON numbers
--- Large integers (int64, uint32, uint64, bigint) are decoded from JSON strings
-decodeInteger :: TTermDefinition (IntegerType -> Value -> Either String Term)
-decodeInteger = define "decodeInteger" $
-  doc "Decode a JSON value to an integer term. Small ints from numbers; large ints from strings." $
-  "it" ~> "value" ~>
-  cases _IntegerType (var "it") Nothing [
-    -- Large integers: decode from JSON string
-    _IntegerType_bigint>>: constant $
-      "strResult" <~ (expectString @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("s" ~>
-          "parsed" <~ (Literals.readBigint $ var "s") $
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid bigint: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalInteger $ Core.integerValueBigint $ var "v")
-            (var "parsed"))
-        (var "strResult"),
-    _IntegerType_int64>>: constant $
-      "strResult" <~ (expectString @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("s" ~>
-          "parsed" <~ (Literals.readInt64 $ var "s") $
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid int64: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalInteger $ Core.integerValueInt64 $ var "v")
-            (var "parsed"))
-        (var "strResult"),
-    _IntegerType_uint32>>: constant $
-      "strResult" <~ (expectString @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("s" ~>
-          "parsed" <~ (Literals.readUint32 $ var "s") $
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid uint32: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalInteger $ Core.integerValueUint32 $ var "v")
-            (var "parsed"))
-        (var "strResult"),
-    _IntegerType_uint64>>: constant $
-      "strResult" <~ (expectString @@ var "value") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("s" ~>
-          "parsed" <~ (Literals.readUint64 $ var "s") $
-          Maybes.maybe
-            (left $ Strings.cat $ list [string "invalid uint64: ", var "s"])
-            ("v" ~> right $ Core.termLiteral $ Core.literalInteger $ Core.integerValueUint64 $ var "v")
-            (var "parsed"))
-        (var "strResult"),
-    -- Small integers: decode from JSON number
-    _IntegerType_int8>>: constant $
-      "numResult" <~ (expectNumber @@ var "value") $
-      Eithers.map
-        ("n" ~> Core.termLiteral $ Core.literalInteger $ Core.integerValueInt8 $
-          Literals.bigintToInt8 $ Literals.decimalToBigint $ var "n")
-        (var "numResult"),
-    _IntegerType_int16>>: constant $
-      "numResult" <~ (expectNumber @@ var "value") $
-      Eithers.map
-        ("n" ~> Core.termLiteral $ Core.literalInteger $ Core.integerValueInt16 $
-          Literals.bigintToInt16 $ Literals.decimalToBigint $ var "n")
-        (var "numResult"),
-    _IntegerType_int32>>: constant $
-      "numResult" <~ (expectNumber @@ var "value") $
-      Eithers.map
-        ("n" ~> Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $
-          Literals.bigintToInt32 $ Literals.decimalToBigint $ var "n")
-        (var "numResult"),
-    _IntegerType_uint8>>: constant $
-      "numResult" <~ (expectNumber @@ var "value") $
-      Eithers.map
-        ("n" ~> Core.termLiteral $ Core.literalInteger $ Core.integerValueUint8 $
-          Literals.bigintToUint8 $ Literals.decimalToBigint $ var "n")
-        (var "numResult"),
-    _IntegerType_uint16>>: constant $
-      "numResult" <~ (expectNumber @@ var "value") $
-      Eithers.map
-        ("n" ~> Core.termLiteral $ Core.literalInteger $ Core.integerValueUint16 $
-          Literals.bigintToUint16 $ Literals.decimalToBigint $ var "n")
-        (var "numResult")]
-
--- | Extract a string from a JSON value
-expectString :: TTermDefinition (Value -> Either String String)
-expectString = define "expectString" $
-  doc "Extract a string from a JSON value" $
-  "value" ~> cases _Value (var "value")
-    (Just $ left $ string "expected string") [
-    _Value_string>>: "s" ~> right $ var "s"]
-
--- | Extract an array from a JSON value
-expectArray :: TTermDefinition (Value -> Either String [Value])
-expectArray = define "expectArray" $
-  doc "Extract an array from a JSON value" $
-  "value" ~> cases _Value (var "value")
-    (Just $ left $ string "expected array") [
-    _Value_array>>: "arr" ~> right $ var "arr"]
-
--- | Extract an object from a JSON value
-expectObject :: TTermDefinition (Value -> Either String (M.Map String Value))
-expectObject = define "expectObject" $
-  doc "Extract an object from a JSON value" $
-  "value" ~> cases _Value (var "value")
-    (Just $ left $ string "expected object") [
-    _Value_object>>: "obj" ~> right $ var "obj"]
-
--- | Extract a number from a JSON value
-expectNumber :: TTermDefinition (Value -> Either String Sci.Scientific)
-expectNumber = define "expectNumber" $
-  doc "Extract a number from a JSON value" $
-  "value" ~> cases _Value (var "value")
-    (Just $ left $ string "expected number") [
-    _Value_number>>: "n" ~> right $ var "n"]
diff --git a/src/main/haskell/Hydra/Sources/Json/Decoding.hs b/src/main/haskell/Hydra/Sources/Json/Decoding.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Decoding.hs
+++ /dev/null
@@ -1,158 +0,0 @@
-
-module Hydra.Sources.Json.Decoding where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Scientific                           as Sci
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Json.Model
-import qualified Hydra.Sources.Json.Model as JsonModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.decoding"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Decoding functions for JSON data"}
-  where
-   definitions = [
-     Phantoms.toDefinition decodeArray,
-     Phantoms.toDefinition decodeBoolean,
-     Phantoms.toDefinition decodeField,
---     Phantoms.toDefinition decodeNumber, TODO: restore
-     Phantoms.toDefinition decodeObject,
-     Phantoms.toDefinition decodeOptionalField,
-     Phantoms.toDefinition decodeString]
-
-define :: String -> TTerm a -> TTermDefinition a
-define label = definitionInModule module_ ("decode" <> label)
-
-decodeArray :: TTermDefinition ((Value -> Either String a) -> Value -> Either String [a])
-decodeArray  = define "Array" $
-  doc "Decode a JSON array using a decoder for elements" $
-  lambda "decodeElem" $ match _Value (Just $ left (string "expected an array")) [
-    _Value_array>>: lambda "a" $ Eithers.mapList (var "decodeElem") $ var "a"]
-
-decodeBoolean :: TTermDefinition (Value -> Either String Bool)
-decodeBoolean  = define "Boolean" $
-  doc "Decode a JSON boolean value" $
-  match _Value (Just $ left (string "expected a boolean")) [
-    _Value_boolean>>: lambda "b" $ right $ var "b"]
-
-decodeField :: TTermDefinition ((Value -> Either String a) -> String -> (M.Map String Value) -> Either String a)
-decodeField  = define "Field" $
-  doc "Decode a required field from a JSON object" $
-  lambda "decodeValue" $ lambda "name" $ lambda "m" $
-    Eithers.bind
-      (decodeOptionalField @@ var "decodeValue" @@ var "name" @@ var "m")
-      (primitive _maybes_maybe
-        @@ (left $ Strings.cat2 (string "missing field: ") (var "name"))
-        @@ (lambda "f" $ right $ var "f"))
-
-decodeNumber :: TTermDefinition (Value -> Either String Sci.Scientific)
-decodeNumber  = define "Number" $
-  doc "Decode a JSON number value" $
-  match _Value (Just $ left (string "expected a number")) [
-    _Value_number>>: lambda "n" $ right $ var "n"]
-
-decodeObject :: TTermDefinition (Value -> Either String (M.Map String Value))
-decodeObject  = define "Object" $
-  doc "Decode a JSON object value" $
-  match _Value (Just $ left (string "expected an object")) [
-    _Value_object>>: lambda "o" $ right $ var "o"]
-
-decodeOptionalField :: TTermDefinition ((Value -> Either String a) -> String -> (M.Map String Value) -> Either String (Maybe a))
-decodeOptionalField  = define "OptionalField" $
-  doc "Decode an optional field from a JSON object" $
-  lambda "decodeValue" $ lambda "name" $ lambda "m" $
-    (primitive _maybes_maybe
-        @@ (right nothing)
-        @@ (lambda "v" (Eithers.map (lambda "x" (just $ var "x")) (var "decodeValue" @@ var "v"))))
-      @@ (Maps.lookup (var "name") (var "m"))
-
-decodeString :: TTermDefinition (Value -> Either String String)
-decodeString  = define "String" $
-  doc "Decode a JSON string value" $
-  match _Value (Just $ left (string "expected a string")) [
-    _Value_string>>: lambda "s" $ right $ var "s"]
diff --git a/src/main/haskell/Hydra/Sources/Json/Encode.hs b/src/main/haskell/Hydra/Sources/Json/Encode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Encode.hs
+++ /dev/null
@@ -1,490 +0,0 @@
-
-module Hydra.Sources.Json.Encode where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++), encodeFloat)
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Json.Model
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.encode"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Strip.ns, moduleNamespace Literals.module_, moduleNamespace ExtractCore.module_],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "JSON encoding for Hydra terms. Converts Terms to JSON Values using Either for error handling."}
-  where
-    definitions = [
-      toDefinition toJson,
-      toDefinition toJsonUntyped,
-      toDefinition encodeLiteral,
-      toDefinition encodeFloat,
-      toDefinition encodeInteger,
-      toDefinition requiresJsonStringSentinel]
-
--- | Encode a Term to a JSON Value, given a type and type lookup table.
--- Returns Left with an error message for unsupported term constructs.
--- The type is used to determine idiomatic encoding for optional (Maybe) fields:
---   Maybe(T) where T is not Maybe: Nothing -> null, Just v -> v (plain value)
---   Maybe(Maybe(T)): Nothing -> null, Just v -> [v] (array-wrapped, for round-trip fidelity)
--- In record context, Nothing fields of simple Maybe type are omitted entirely.
-toJson :: TTermDefinition (M.Map Name Type -> Name -> Type -> Term -> Either String Value)
-toJson = define "toJson" $
-  doc "Encode a Hydra term to a JSON value given a type and type name. Returns Left for unsupported constructs." $
-  "types" ~> "tname" ~> "typ" ~> "term" ~>
-  "stripped" <~ (Strip.deannotateType @@ var "typ") $
-  "strippedTerm" <~ (Strip.deannotateTerm @@ var "term") $
-  cases _Type (var "stripped")
-    (Just $ left $ Strings.cat $ list [
-      string "unsupported type for JSON encoding: ",
-      ShowCore.type_ @@ var "typ"]) [
-
-    -- Literals
-    _Type_literal>>: constant $
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected literal term") [
-        _Term_literal>>: "lit" ~> encodeLiteral @@ var "lit"],
-
-    -- Lists
-    _Type_list>>: "elemType" ~>
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected list term") [
-        _Term_list>>: "terms" ~>
-          "results" <~ (Eithers.mapList ("t" ~> toJson @@ var "types" @@ var "tname" @@ var "elemType" @@ var "t") (var "terms")) $
-          Eithers.map ("vs" ~> Json.valueArray $ var "vs") (var "results")],
-
-    -- Sets (encode as arrays)
-    _Type_set>>: "elemType" ~>
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected set term") [
-        _Term_set>>: "vals" ~>
-          "terms" <~ (Sets.toList $ var "vals") $
-          "results" <~ (Eithers.mapList ("t" ~> toJson @@ var "types" @@ var "tname" @@ var "elemType" @@ var "t") (var "terms")) $
-          Eithers.map ("vs" ~> Json.valueArray $ var "vs") (var "results")],
-
-    -- Maybe: encoding depends on whether the inner type is itself Maybe
-    _Type_maybe>>: "innerType" ~>
-      "innerStripped" <~ (Strip.deannotateType @@ var "innerType") $
-      "isNestedMaybe" <~ (cases _Type (var "innerStripped") (Just false) [
-        _Type_maybe>>: constant true]) $
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected maybe term") [
-        _Term_maybe>>: "opt" ~> optCases (var "opt")
-          -- Nothing: always null
-          (right Json.valueNull)
-          -- Just v: plain value for simple Maybe, array-wrapped for nested Maybe
-          ("v" ~>
-            "encoded" <~ (toJson @@ var "types" @@ var "tname" @@ var "innerType" @@ var "v") $
-            Logic.ifElse (var "isNestedMaybe")
-              (Eithers.map ("ev" ~> Json.valueArray $ list [var "ev"]) (var "encoded"))
-              (var "encoded"))],
-
-    -- Records
-    _Type_record>>: "rt" ~>
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected record term") [
-        _Term_record>>: "r" ~>
-          -- Helper to check if a field type is simple Maybe (i.e. Maybe(T) where T is not Maybe)
-          "isSimpleMaybe" <~ ("ftype" ~>
-            cases _Type (Strip.deannotateType @@ var "ftype") (Just false) [
-              _Type_maybe>>: "innerT" ~>
-                cases _Type (Strip.deannotateType @@ var "innerT") (Just true) [
-                  _Type_maybe>>: constant false]]) $
-          -- Encode a (fieldType, field) pair. For simple Maybe fields, omit Nothing and encode Just as plain value.
-          "encodeFieldWithType" <~ ("ft" ~> "f" ~>
-            "fname" <~ (Core.unName $ Core.fieldName $ var "f") $
-            "fterm" <~ (Core.fieldTerm $ var "f") $
-            "ftype" <~ (Core.fieldTypeType $ var "ft") $
-            Logic.ifElse (var "isSimpleMaybe" @@ var "ftype")
-              -- Simple Maybe field: omit Nothing, encode Just as plain value
-              (cases _Term (Strip.deannotateTerm @@ var "fterm")
-                (Just $ left $ string "expected maybe term for optional field") [
-                _Term_maybe>>: "opt" ~> optCases (var "opt")
-                  (right nothing)  -- Nothing -> omit field (signal with Nothing)
-                  ("v" ~>
-                    "innerType" <~ (cases _Type (Strip.deannotateType @@ var "ftype") (Just $ var "ftype") [
-                      _Type_maybe>>: "it" ~> var "it"]) $
-                    "encoded" <~ (toJson @@ var "types" @@ var "tname" @@ var "innerType" @@ var "v") $
-                    Eithers.map ("ev" ~> just $ pair (var "fname") (var "ev")) (var "encoded"))])
-              -- Non-optional field: encode normally
-              ("encoded" <~ (toJson @@ var "types" @@ var "tname" @@ var "ftype" @@ var "fterm") $
-                Eithers.map ("ev" ~> just $ pair (var "fname") (var "ev")) (var "encoded"))) $
-          -- Zip field types with field terms and encode
-          "fieldTypes" <~ (var "rt") $
-          "fields" <~ (Core.recordFields $ var "r") $
-          "encodedPairs" <~ (Eithers.mapList
-            ("ftf" ~> var "encodeFieldWithType" @@ (Pairs.first $ var "ftf") @@ (Pairs.second $ var "ftf"))
-            (Lists.zip (var "fieldTypes") (var "fields"))) $
-          -- Filter out Nothing entries (omitted optional fields) and build object
-          Eithers.map ("pairs" ~>
-            Json.valueObject $ Maps.fromList $ Maybes.cat $ var "pairs")
-            (var "encodedPairs")],
-
-    -- Unions (single-key object)
-    _Type_union>>: "rt" ~>
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected union term") [
-        _Term_inject>>: "inj" ~>
-          "field" <~ (Core.injectionField $ var "inj") $
-          "fname" <~ (Core.unName $ Core.fieldName $ var "field") $
-          "fterm" <~ (Core.fieldTerm $ var "field") $
-          -- Find the field type that matches this variant
-          "ftypeResult" <~ (
-            Maybes.maybe
-              (left $ Strings.cat $ list [string "unknown variant: ", var "fname"])
-              ("ft" ~> right $ Core.fieldTypeType $ var "ft")
-              (Lists.find
-                ("ft" ~> Equality.equal (Core.unName $ Core.fieldTypeName $ var "ft") (var "fname"))
-                (var "rt"))) $
-          Eithers.either_
-            ("err" ~> left $ var "err")
-            ("ftype" ~>
-              "encodedUnion" <~ (toJson @@ var "types" @@ var "tname" @@ var "ftype" @@ var "fterm") $
-              Eithers.map
-                ("v" ~> Json.valueObject $ Maps.fromList $ list [pair (var "fname") (var "v")])
-                (var "encodedUnion"))
-            (var "ftypeResult")],
-
-    -- Unit (empty object)
-    _Type_unit>>: constant $
-      right $ Json.valueObject $ Maps.empty,
-
-    -- Wrapped types (look up inner type and recurse)
-    _Type_wrap>>: "wn" ~>
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected wrapped term") [
-        _Term_wrap>>: "wt" ~>
-          toJson @@ var "types" @@ var "tname" @@ var "wn" @@ (Core.wrappedTermBody $ var "wt")],
-
-    -- Maps -> array of {\"key\": k, \"value\": v}
-    _Type_map>>: "mt" ~>
-      "keyType" <~ (Core.mapTypeKeys $ var "mt") $
-      "valType" <~ (Core.mapTypeValues $ var "mt") $
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected map term") [
-        _Term_map>>: "m" ~>
-          "encodeEntry" <~ ("kv" ~>
-            "k" <~ (Pairs.first $ var "kv") $
-            "v" <~ (Pairs.second $ var "kv") $
-            "encodedK" <~ (toJson @@ var "types" @@ var "tname" @@ var "keyType" @@ var "k") $
-            "encodedV" <~ (toJson @@ var "types" @@ var "tname" @@ var "valType" @@ var "v") $
-            Eithers.either_
-              ("err" ~> left $ var "err")
-              ("ek" ~> Eithers.map
-                ("ev" ~> Json.valueObject $ Maps.fromList $ list [
-                  pair (string "key") (var "ek"),
-                  pair (string "value") (var "ev")])
-                (var "encodedV"))
-              (var "encodedK")) $
-          "entries" <~ (Eithers.mapList (var "encodeEntry") (Maps.toList $ var "m")) $
-          Eithers.map ("es" ~> Json.valueArray $ var "es") (var "entries")],
-
-    -- Pairs -> {\"first\": ..., \"second\": ...}
-    _Type_pair>>: "pt" ~>
-      "firstType" <~ (Core.pairTypeFirst $ var "pt") $
-      "secondType" <~ (Core.pairTypeSecond $ var "pt") $
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected pair term") [
-        _Term_pair>>: "p" ~>
-          "first" <~ (Pairs.first $ var "p") $
-          "second" <~ (Pairs.second $ var "p") $
-          "encodedFirst" <~ (toJson @@ var "types" @@ var "tname" @@ var "firstType" @@ var "first") $
-          "encodedSecond" <~ (toJson @@ var "types" @@ var "tname" @@ var "secondType" @@ var "second") $
-          Eithers.either_
-            ("err" ~> left $ var "err")
-            ("ef" ~> Eithers.map
-              ("es" ~> Json.valueObject $ Maps.fromList $ list [
-                pair (string "first") (var "ef"),
-                pair (string "second") (var "es")])
-              (var "encodedSecond"))
-            (var "encodedFirst")],
-
-    -- Either -> {\"left\": ...} or {\"right\": ...}
-    _Type_either>>: "et" ~>
-      "leftType" <~ (Core.eitherTypeLeft $ var "et") $
-      "rightType" <~ (Core.eitherTypeRight $ var "et") $
-      cases _Term (var "strippedTerm")
-        (Just $ left $ string "expected either term") [
-        _Term_either>>: "e" ~>
-          Eithers.either_
-            ("l" ~>
-              "encodedL" <~ (toJson @@ var "types" @@ var "tname" @@ var "leftType" @@ var "l") $
-              Eithers.map
-                ("v" ~> Json.valueObject $ Maps.fromList $ list [pair (string "left") (var "v")])
-                (var "encodedL"))
-            ("r" ~>
-              "encodedR" <~ (toJson @@ var "types" @@ var "tname" @@ var "rightType" @@ var "r") $
-              Eithers.map
-                ("v" ~> Json.valueObject $ Maps.fromList $ list [pair (string "right") (var "v")])
-                (var "encodedR"))
-            (var "e")],
-
-    -- Type variables (look up in type table and recurse; fall back to untyped encoding)
-    _Type_variable>>: "name" ~>
-      "lookedUp" <~ (Maps.lookup (var "name") (var "types")) $
-      Maybes.maybe
-        (toJsonUntyped @@ var "term")
-        ("resolvedType" ~> toJson @@ var "types" @@ var "name" @@ var "resolvedType" @@ var "term")
-        (var "lookedUp")]
-
--- | Encode a Term to a JSON Value without type information.
--- This is a structural fallback used when type information is unavailable (e.g. unresolved
--- type variables). It encodes terms based on their structure alone, using the legacy encoding
--- for Maybe (null/[value]) since without type info we cannot determine if idiomatic encoding
--- is safe.
-toJsonUntyped :: TTermDefinition (Term -> Either String Value)
-toJsonUntyped = define "toJsonUntyped" $
-  doc "Encode a Hydra term to a JSON value without type information. Falls back to array-wrapped Maybe encoding." $
-  "term" ~>
-  "stripped" <~ (Strip.deannotateTerm @@ var "term") $
-  cases _Term (var "stripped")
-    (Just $ left $ Strings.cat $ list [
-      string "unsupported term variant for JSON encoding: ",
-      ShowCore.term @@ var "term"]) [
-    -- Literals
-    _Term_literal>>: "lit" ~> encodeLiteral @@ var "lit",
-
-    -- Lists
-    _Term_list>>: "terms" ~>
-      "results" <~ (Eithers.mapList ("t" ~> toJsonUntyped @@ var "t") (var "terms")) $
-      Eithers.map ("vs" ~> Json.valueArray $ var "vs") (var "results"),
-
-    -- Sets (encode as arrays)
-    _Term_set>>: "vals" ~>
-      "terms" <~ (Sets.toList $ var "vals") $
-      "results" <~ (Eithers.mapList ("t" ~> toJsonUntyped @@ var "t") (var "terms")) $
-      Eithers.map ("vs" ~> Json.valueArray $ var "vs") (var "results"),
-
-    -- Maybe (legacy encoding: null/[value], since we don't know if it's nested)
-    _Term_maybe>>: "opt" ~> optCases (var "opt")
-      (right Json.valueNull)
-      ("v" ~>
-        "encodedMaybe" <~ (toJsonUntyped @@ var "v") $
-        Eithers.map ("encoded" ~> Json.valueArray $ list [var "encoded"]) (var "encodedMaybe")),
-
-    -- Records
-    _Term_record>>: "r" ~>
-      "encodeField" <~ ("f" ~>
-        "fname" <~ (Core.unName $ Core.fieldName $ var "f") $
-        "fterm" <~ (Core.fieldTerm $ var "f") $
-        "encodedField" <~ (toJsonUntyped @@ var "fterm") $
-        Eithers.map ("v" ~> pair (var "fname") (var "v")) (var "encodedField")) $
-      "fields" <~ (Core.recordFields $ var "r") $
-      "encodedFields" <~ (Eithers.mapList (var "encodeField") (var "fields")) $
-      Eithers.map ("fs" ~> Json.valueObject $ Maps.fromList $ var "fs") (var "encodedFields"),
-
-    -- Unions (single-key object)
-    _Term_inject>>: "inj" ~>
-      "field" <~ (Core.injectionField $ var "inj") $
-      "fname" <~ (Core.unName $ Core.fieldName $ var "field") $
-      "fterm" <~ (Core.fieldTerm $ var "field") $
-      "encodedUnion" <~ (toJsonUntyped @@ var "fterm") $
-      Eithers.map
-        ("v" ~> Json.valueObject $ Maps.fromList $ list [pair (var "fname") (var "v")])
-        (var "encodedUnion"),
-
-    -- Unit
-    _Term_unit>>: constant $ right $ Json.valueObject $ Maps.empty,
-
-    -- Wrapped terms (transparent)
-    _Term_wrap>>: "wt" ~> toJsonUntyped @@ (Core.wrappedTermBody $ var "wt"),
-
-    -- Maps -> array of {\"key\": k, \"value\": v}
-    _Term_map>>: "m" ~>
-      "encodeEntry" <~ ("kv" ~>
-        "k" <~ (Pairs.first $ var "kv") $
-        "v" <~ (Pairs.second $ var "kv") $
-        "encodedK" <~ (toJsonUntyped @@ var "k") $
-        "encodedV" <~ (toJsonUntyped @@ var "v") $
-        Eithers.either_
-          ("err" ~> left $ var "err")
-          ("ek" ~> Eithers.map
-            ("ev" ~> Json.valueObject $ Maps.fromList $ list [
-              pair (string "key") (var "ek"),
-              pair (string "value") (var "ev")])
-            (var "encodedV"))
-          (var "encodedK")) $
-      "entries" <~ (Eithers.mapList (var "encodeEntry") (Maps.toList $ var "m")) $
-      Eithers.map ("es" ~> Json.valueArray $ var "es") (var "entries"),
-
-    -- Pairs -> {\"first\": ..., \"second\": ...}
-    _Term_pair>>: "p" ~>
-      "first" <~ (Pairs.first $ var "p") $
-      "second" <~ (Pairs.second $ var "p") $
-      "encodedFirst" <~ (toJsonUntyped @@ var "first") $
-      "encodedSecond" <~ (toJsonUntyped @@ var "second") $
-      Eithers.either_
-        ("err" ~> left $ var "err")
-        ("ef" ~> Eithers.map
-          ("es" ~> Json.valueObject $ Maps.fromList $ list [
-            pair (string "first") (var "ef"),
-            pair (string "second") (var "es")])
-          (var "encodedSecond"))
-        (var "encodedFirst"),
-
-    -- Either -> {\"left\": ...} or {\"right\": ...}
-    _Term_either>>: "e" ~>
-      Eithers.either_
-        ("l" ~>
-          "encodedL" <~ (toJsonUntyped @@ var "l") $
-          Eithers.map
-            ("v" ~> Json.valueObject $ Maps.fromList $ list [pair (string "left") (var "v")])
-            (var "encodedL"))
-        ("r" ~>
-          "encodedR" <~ (toJsonUntyped @@ var "r") $
-          Eithers.map
-            ("v" ~> Json.valueObject $ Maps.fromList $ list [pair (string "right") (var "v")])
-            (var "encodedR"))
-        (var "e")]
-
--- | Encode a literal value to JSON
-encodeLiteral :: TTermDefinition (Literal -> Either String Value)
-encodeLiteral = define "encodeLiteral" $
-  doc "Encode a Hydra literal to a JSON value" $
-  "lit" ~> cases _Literal (var "lit") Nothing [
-    _Literal_binary>>: "b" ~> right $ Json.valueString $ Literals.binaryToString $ var "b",
-    _Literal_boolean>>: "b" ~> right $ Json.valueBoolean $ var "b",
-    _Literal_decimal>>: "d" ~> right $ Json.valueNumber $ var "d",
-    _Literal_float>>: "f" ~> encodeFloat @@ var "f",
-    _Literal_integer>>: "i" ~> encodeInteger @@ var "i",
-    _Literal_string>>: "s" ~> right $ Json.valueString $ var "s"]
-
--- | Encode a float value to JSON.
--- Bigfloat uses native JSON numbers (lossless for finite values via Scientific). Bigfloat
--- rejects every IEEE value that cannot be represented by its target types (Java BigDecimal,
--- Python Decimal cannot hold NaN, ±Infinity, or -0.0 at all), so those produce an error.
--- Float32 always uses a JSON string to preserve exact source precision. Float64 encodes via
--- a JSON number for finite, non-negative-zero values and via a JSON string for the values
--- that the JSON grammar cannot express (NaN, ±Infinity, -0.0) — keeping those IEEE values
--- round-trippable through JSON.
-encodeFloat :: TTermDefinition (FloatValue -> Either String Value)
-encodeFloat = define "encodeFloat" $
-  doc "Encode a float value to JSON. Finite values become JSON numbers (shortest round-trip); IEEE specials (NaN/Inf/-0.0) become JSON strings. Float32 and Float64 are symmetric; the schema disambiguates precision on decode. Bigfloat rejects anything the decimal space can't hold." $
-  "fv" ~> cases _FloatValue (var "fv") Nothing [
-    _FloatValue_bigfloat>>: "bf" ~>
-      "s" <~ (Literals.showBigfloat $ var "bf") $
-      Logic.ifElse (requiresJsonStringSentinel @@ var "s")
-        (left $ Strings.cat $ list [string "JSON cannot represent bigfloat value: ", var "s"])
-        (right $ Json.valueNumber $ Literals.float64ToDecimal $ Literals.bigfloatToFloat64 $ var "bf"),
-    _FloatValue_float32>>: "f" ~>
-      "s" <~ (Literals.showFloat32 $ var "f") $
-      Logic.ifElse (requiresJsonStringSentinel @@ var "s")
-        (right $ Json.valueString $ var "s")
-        (right $ Json.valueNumber $ Literals.float32ToDecimal $ var "f"),
-    _FloatValue_float64>>: "f" ~>
-      "s" <~ (Literals.showFloat64 $ var "f") $
-      Logic.ifElse (requiresJsonStringSentinel @@ var "s")
-        (right $ Json.valueString $ var "s")
-        (right $ Json.valueNumber $ Literals.float64ToDecimal $ var "f")]
-
--- | Check whether a float's string form is an IEEE value that the JSON number grammar or
--- Scientific-backed decoding cannot round-trip: NaN, Infinity, -Infinity, or -0.0.
-requiresJsonStringSentinel :: TTermDefinition (String -> Bool)
-requiresJsonStringSentinel = define "requiresJsonStringSentinel" $
-  doc "True for IEEE sentinel strings that JSON must escape as a string to preserve." $
-  "s" ~> Logic.or (Equality.equal (var "s") (string "NaN")) $
-         Logic.or (Equality.equal (var "s") (string "Infinity")) $
-         Logic.or (Equality.equal (var "s") (string "-Infinity"))
-                  (Equality.equal (var "s") (string "-0.0"))
-
--- | Encode an integer value to JSON
--- Small integers (int8, int16, int32, uint8, uint16) use native JSON numbers
--- Large integers (int64, uint32, uint64, bigint) use strings to preserve precision
-encodeInteger :: TTermDefinition (IntegerValue -> Either String Value)
-encodeInteger = define "encodeInteger" $
-  doc "Encode an integer value to JSON. Small ints use native numbers; large ints use strings." $
-  "iv" ~> cases _IntegerValue (var "iv") Nothing [
-    -- Large integers: use strings to preserve precision
-    _IntegerValue_bigint>>: "bi" ~> right $ Json.valueString $ Literals.showBigint $ var "bi",
-    _IntegerValue_int64>>: "i" ~> right $ Json.valueString $ Literals.showInt64 $ var "i",
-    _IntegerValue_uint32>>: "i" ~> right $ Json.valueString $ Literals.showUint32 $ var "i",
-    _IntegerValue_uint64>>: "i" ~> right $ Json.valueString $ Literals.showUint64 $ var "i",
-    -- Small integers: use native JSON numbers (convert to decimal for JSON)
-    _IntegerValue_int8>>: "i" ~> right $ Json.valueNumber $ Literals.bigintToDecimal $ Literals.int8ToBigint $ var "i",
-    _IntegerValue_int16>>: "i" ~> right $ Json.valueNumber $ Literals.bigintToDecimal $ Literals.int16ToBigint $ var "i",
-    _IntegerValue_int32>>: "i" ~> right $ Json.valueNumber $ Literals.bigintToDecimal $ Literals.int32ToBigint $ var "i",
-    _IntegerValue_uint8>>: "i" ~> right $ Json.valueNumber $ Literals.bigintToDecimal $ Literals.uint8ToBigint $ var "i",
-    _IntegerValue_uint16>>: "i" ~> right $ Json.valueNumber $ Literals.bigintToDecimal $ Literals.uint16ToBigint $ var "i"]
diff --git a/src/main/haskell/Hydra/Sources/Json/Extract.hs b/src/main/haskell/Hydra/Sources/Json/Extract.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Extract.hs
+++ /dev/null
@@ -1,200 +0,0 @@
-
-module Hydra.Sources.Json.Extract where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms hiding (opt)
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Scientific                           as Sci
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Json.Model
-
-
-ns :: Namespace
-ns = Namespace "hydra.extract.json"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Utilities for extracting values from JSON objects"}
-  where
-    definitions = [
-      toDefinition expectArray,
-      toDefinition expectNumber,
-      toDefinition expectObject,
-      toDefinition expectString,
-      toDefinition opt,
-      toDefinition optArray,
-      toDefinition optString,
-      toDefinition require,
-      toDefinition requireArray,
-      toDefinition requireNumber,
-      toDefinition requireString,
-      toDefinition showValue]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-expectArray :: TTermDefinition (Value -> Either String [Value])
-expectArray = define "expectArray" $
-  doc "Extract an array from a JSON value, failing if the value is not an array" $
-  lambda "value" $ cases _Value (var "value")
-    (Just $ left $ Strings.cat2 (Strings.cat2 (string "expected ") (string "JSON array")) (Strings.cat2 (string " but found ") (showValue @@ var "value"))) [
-    _Value_array>>: lambda "els" $ right $ var "els"]
-
-expectNumber :: TTermDefinition (Value -> Either String Sci.Scientific)
-expectNumber = define "expectNumber" $
-  doc "Extract a number from a JSON value, failing if the value is not a number" $
-  lambda "value" $ cases _Value (var "value")
-    (Just $ left $ Strings.cat2 (Strings.cat2 (string "expected ") (string "JSON number")) (Strings.cat2 (string " but found ") (showValue @@ var "value"))) [
-    _Value_number>>: lambda "d" $ right $ var "d"]
-
-expectObject :: TTermDefinition (Value -> Either String (M.Map String Value))
-expectObject = define "expectObject" $
-  doc "Extract an object from a JSON value, failing if the value is not an object" $
-  lambda "value" $ cases _Value (var "value")
-    (Just $ left $ Strings.cat2 (Strings.cat2 (string "expected ") (string "JSON object")) (Strings.cat2 (string " but found ") (showValue @@ var "value"))) [
-    _Value_object>>: lambda "m" $ right $ var "m"]
-
-expectString :: TTermDefinition (Value -> Either String String)
-expectString = define "expectString" $
-  doc "Extract a string from a JSON value, failing if the value is not a string" $
-  lambda "value" $ cases _Value (var "value")
-    (Just $ left $ Strings.cat2 (Strings.cat2 (string "expected ") (string "JSON string")) (Strings.cat2 (string " but found ") (showValue @@ var "value"))) [
-    _Value_string>>: lambda "s" $ right $ var "s"]
-
-opt :: TTermDefinition (String -> M.Map String Value -> Maybe Value)
-opt = define "opt" $
-  doc "Look up an optional field in a JSON object" $
-  lambdas ["fname", "m"] $ Maps.lookup (var "fname") (var "m")
-
-optArray :: TTermDefinition (String -> M.Map String Value -> Either String (Maybe [Value]))
-optArray = define "optArray" $
-  doc "Look up an optional array field in a JSON object" $
-  lambdas ["fname", "m"] $ Maybes.maybe
-    (right nothing)
-    (lambda "a" $ Eithers.map (lambda "x" (just $ var "x")) $ expectArray @@ var "a")
-    (opt @@ var "fname" @@ var "m")
-
-optString :: TTermDefinition (String -> M.Map String Value -> Either String (Maybe String))
-optString = define "optString" $
-  doc "Look up an optional string field in a JSON object" $
-  lambdas ["fname", "m"] $ Maybes.maybe
-    (right nothing)
-    (lambda "s" $ Eithers.map (lambda "x" (just $ var "x")) $ expectString @@ var "s")
-    (opt @@ var "fname" @@ var "m")
-
-require :: TTermDefinition (String -> M.Map String Value -> Either String Value)
-require = define "require" $
-  doc "Look up a required field in a JSON object, failing if not found" $
-  lambdas ["fname", "m"] $ Maybes.maybe
-    (left $ Strings.cat $ list [
-      string "required attribute ",
-      showValue @@ var "fname",
-      string " not found"])
-    (lambda "value" $ right $ var "value")
-    (Maps.lookup (var "fname") (var "m"))
-
-requireArray :: TTermDefinition (String -> M.Map String Value -> Either String [Value])
-requireArray = define "requireArray" $
-  doc "Look up a required array field in a JSON object" $
-  lambdas ["fname", "m"] $ Eithers.bind
-    (require @@ var "fname" @@ var "m")
-    (asTerm expectArray)
-
-requireNumber :: TTermDefinition (String -> M.Map String Value -> Either String Sci.Scientific)
-requireNumber = define "requireNumber" $
-  doc "Look up a required number field in a JSON object" $
-  lambdas ["fname", "m"] $ Eithers.bind
-    (require @@ var "fname" @@ var "m")
-    (asTerm expectNumber)
-
-requireString :: TTermDefinition (String -> M.Map String Value -> Either String String)
-requireString = define "requireString" $
-  doc "Look up a required string field in a JSON object" $
-  lambdas ["fname", "m"] $ Eithers.bind
-    (require @@ var "fname" @@ var "m")
-    (asTerm expectString)
-
--- TODO: implement this function, and deduplicate with hydra.json.coder.showValue
-showValue :: TTermDefinition (Value -> String)
-showValue = define "showValue" $
-  doc "Show a JSON value as a string (placeholder implementation)" $
-  lambda "value" $ string "TODO: implement showValue"
diff --git a/src/main/haskell/Hydra/Sources/Json/Model.hs b/src/main/haskell/Hydra/Sources/Json/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Model.hs
+++ /dev/null
@@ -1,52 +0,0 @@
--- | A simple JSON model. This model is part of the Hydra kernel, despite JSON being an external language; JSON support is built in to Hydra
-
-module Hydra.Sources.Json.Model where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.model"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A JSON syntax model. See the BNF at https://www.json.org"}
-  where
-    definitions = [
-      value]
-
-value :: Binding
-value = define "Value" $
-  doc "A JSON value" $
-  T.union [
-    "array">:
-      doc "A JSON array" $
-      T.list value,
-    "boolean">:
-      doc "A boolean value" $
-      T.boolean,
-    "null">:
-      doc "JSON's null value" $
-      T.unit,
-    "number">:
-      doc "A numeric value" $
-      T.decimal,
-    "object">:
-      doc "A JSON object as a set of key/value pairs" $
-      T.map T.string value,
-    "string">:
-      doc "A string value" $
-      T.string]
diff --git a/src/main/haskell/Hydra/Sources/Json/Parser.hs b/src/main/haskell/Hydra/Sources/Json/Parser.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Parser.hs
+++ /dev/null
@@ -1,383 +0,0 @@
-
-module Hydra.Sources.Json.Parser where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Dsl.Parsing                    as Parsing
-import qualified Hydra.Sources.Kernel.Terms.Parsers        as Parsers
-import qualified Hydra.Json.Model as J
-
-
-jsonParserDefinition :: String -> TTerm a -> TTermDefinition a
-jsonParserDefinition = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Parsers.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "JSON parser using Hydra parser combinators"}
-  where
-    ns = Namespace "hydra.json.parser"
-    definitions = [
-      toDefinition whitespace,
-      toDefinition token,
-      toDefinition jsonNull,
-      toDefinition jsonBool,
-      toDefinition digit,
-      toDefinition digits,
-      toDefinition jsonIntegerPart,
-      toDefinition jsonFractionPart,
-      toDefinition jsonExponentPart,
-      toDefinition jsonNumber,
-      toDefinition jsonEscapeChar,
-      toDefinition jsonStringChar,
-      toDefinition jsonString,
-      toDefinition jsonArray,
-      toDefinition jsonKeyValue,
-      toDefinition jsonObject,
-      toDefinition jsonValue,
-      toDefinition parseJson]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | ASCII code points for common characters
-spaceCode, tabCode, newlineCode, returnCode :: TTerm Int
-spaceCode = int32 32      -- ' '
-tabCode = int32 9         -- '\t'
-newlineCode = int32 10    -- '\n'
-returnCode = int32 13     -- '\r'
-
-quoteCode, backslashCode, colonCode, commaCode :: TTerm Int
-quoteCode = int32 34      -- '"'
-backslashCode = int32 92  -- '\\'
-colonCode = int32 58      -- ':'
-commaCode = int32 44      -- ','
-
-bracketOpenCode, bracketCloseCode, braceOpenCode, braceCloseCode :: TTerm Int
-bracketOpenCode = int32 91   -- '['
-bracketCloseCode = int32 93  -- ']'
-braceOpenCode = int32 123    -- '{'
-braceCloseCode = int32 125   -- '}'
-
-zeroCode, nineCode, minusCode, plusCode, dotCode :: TTerm Int
-zeroCode = int32 48       -- '0'
-nineCode = int32 57       -- '9'
-minusCode = int32 45      -- '-'
-plusCode = int32 43       -- '+'
-dotCode = int32 46        -- '.'
-
-letterELower, letterEUpper :: TTerm Int
-letterELower = int32 101  -- 'e'
-letterEUpper = int32 69   -- 'E'
-
-letterNCode, letterUCode, letterLCode :: TTerm Int
-letterNCode = int32 110   -- 'n'
-letterUCode = int32 117   -- 'u'
-letterLCode = int32 108   -- 'l'
-
-letterTCode, letterRCode, letterFCode, letterACode, letterSCode :: TTerm Int
-letterTCode = int32 116   -- 't'
-letterRCode = int32 114   -- 'r'
-letterFCode = int32 102   -- 'f'
-letterACode = int32 97    -- 'a'
-letterSCode = int32 115   -- 's'
-
-letterBCode :: TTerm Int
-letterBCode = int32 98    -- 'b'
-
--- | Parse zero or more whitespace characters
-whitespace :: TTermDefinition (Parser ())
-whitespace = define "whitespace" $
-  doc "Parse zero or more JSON whitespace characters (space, tab, newline, carriage return)" $
-  Parsers.map @@ (constant unit) @@
-    (Parsers.many @@
-      (Parsers.satisfy @@ ("c" ~>
-        Logic.ors (list [
-          Equality.equal (var "c") spaceCode,
-          Equality.equal (var "c") tabCode,
-          Equality.equal (var "c") newlineCode,
-          Equality.equal (var "c") returnCode]))))
-
--- | Parse a token followed by optional whitespace
-token :: TTermDefinition (Parser a -> Parser a)
-token = define "token" $
-  doc "Parse a token followed by optional whitespace" $
-  "p" ~>
-    Parsers.bind @@ var "p" @@ ("x" ~>
-      Parsers.bind @@ whitespace @@ (constant $
-        Parsers.pure @@ var "x"))
-
--- | Parse JSON null
-jsonNull :: TTermDefinition (Parser J.Value)
-jsonNull = define "jsonNull" $
-  doc "Parse JSON null value" $
-  Parsers.map @@ (constant Json.valueNull) @@
-    (token @@ (Parsers.string_ @@ string "null"))
-
--- | Parse JSON boolean
-jsonBool :: TTermDefinition (Parser J.Value)
-jsonBool = define "jsonBool" $
-  doc "Parse JSON boolean (true or false)" $
-  Parsers.alt
-    @@ (Parsers.map @@ (constant $ Json.valueBoolean true) @@
-        (token @@ (Parsers.string_ @@ string "true")))
-    @@ (Parsers.map @@ (constant $ Json.valueBoolean false) @@
-        (token @@ (Parsers.string_ @@ string "false")))
-
--- | Parse a single digit (0-9)
-digit :: TTermDefinition (Parser Int)
-digit = define "digit" $
-  doc "Parse a single digit (0-9)" $
-  Parsers.satisfy @@ ("c" ~>
-    Logic.and
-      (Equality.gte (var "c") zeroCode)
-      (Equality.lte (var "c") nineCode))
-
--- | Parse one or more digits and convert to string
-digits :: TTermDefinition (Parser String)
-digits = define "digits" $
-  doc "Parse one or more digits as a string" $
-  Parsers.map @@ (unaryFunction Strings.fromList) @@
-    (Parsers.some @@ digit)
-
--- | Parse the integer part of a JSON number
-jsonIntegerPart :: TTermDefinition (Parser String)
-jsonIntegerPart = define "jsonIntegerPart" $
-  doc "Parse the integer part of a JSON number (optional minus, then digits)" $
-  Parsers.bind @@
-    (Parsers.optional @@ (Parsers.char @@ minusCode)) @@
-    ("sign" ~>
-      Parsers.bind @@ digits @@ ("digits" ~>
-        Parsers.pure @@
-          (Maybes.maybe
-            (var "digits")
-            (constant $ string "-" ++ var "digits")
-            (var "sign"))))
-
--- | Parse the fractional part of a JSON number
-jsonFractionPart :: TTermDefinition (Parser (Maybe String))
-jsonFractionPart = define "jsonFractionPart" $
-  doc "Parse the optional fractional part of a JSON number" $
-  Parsers.optional @@
-    (Parsers.bind @@ (Parsers.char @@ dotCode) @@ (constant $
-      Parsers.map @@ ("d" ~> string "." ++ var "d") @@ digits))
-
--- | Parse the exponent part of a JSON number
-jsonExponentPart :: TTermDefinition (Parser (Maybe String))
-jsonExponentPart = define "jsonExponentPart" $
-  doc "Parse the optional exponent part of a JSON number" $
-  Parsers.optional @@
-    (Parsers.bind @@
-      (Parsers.satisfy @@ ("c" ~>
-        Logic.or (Equality.equal (var "c") letterELower)
-                 (Equality.equal (var "c") letterEUpper))) @@
-      (constant $
-        Parsers.bind @@
-          (Parsers.optional @@
-            (Parsers.satisfy @@ ("c" ~>
-              Logic.or (Equality.equal (var "c") plusCode)
-                       (Equality.equal (var "c") minusCode)))) @@
-          ("sign" ~>
-            Parsers.map @@
-              ("digits" ~>
-                string "e" ++
-                Maybes.maybe (string "") (unaryFunction Strings.fromList <.> unaryFunction Lists.pure) (var "sign") ++
-                var "digits") @@
-              digits)))
-
--- | Parse a JSON number
-jsonNumber :: TTermDefinition (Parser J.Value)
-jsonNumber = define "jsonNumber" $
-  doc "Parse a JSON number (integer, decimal, or scientific notation)" $
-  token @@
-    (Parsers.bind @@ jsonIntegerPart @@ ("intPart" ~>
-      Parsers.bind @@ jsonFractionPart @@ ("fracPart" ~>
-        Parsers.bind @@ jsonExponentPart @@ ("expPart" ~>
-          "numStr" <~
-            (var "intPart" ++
-             Maybes.maybe (string "") (unaryFunction Equality.identity) (var "fracPart") ++
-             Maybes.maybe (string "") (unaryFunction Equality.identity) (var "expPart")) $
-          Parsers.pure @@
-            (Json.valueNumber (Maybes.maybe (decimal 0) (unaryFunction Equality.identity) (Literals.readDecimal (var "numStr"))))))))
-
--- | Parse a JSON escape character
-jsonEscapeChar :: TTermDefinition (Parser Int)
-jsonEscapeChar = define "jsonEscapeChar" $
-  doc "Parse a JSON escape sequence after the backslash" $
-  Parsers.choice @@ list [
-    Parsers.map @@ (constant quoteCode) @@ (Parsers.char @@ quoteCode),
-    Parsers.map @@ (constant backslashCode) @@ (Parsers.char @@ backslashCode),
-    Parsers.map @@ (constant $ int32 47) @@ (Parsers.char @@ int32 47),  -- '/'
-    Parsers.map @@ (constant $ int32 8) @@ (Parsers.char @@ letterBCode),   -- '\b'
-    Parsers.map @@ (constant $ int32 12) @@ (Parsers.char @@ letterFCode),  -- '\f'
-    Parsers.map @@ (constant newlineCode) @@ (Parsers.char @@ letterNCode), -- '\n'
-    Parsers.map @@ (constant returnCode) @@ (Parsers.char @@ letterRCode),  -- '\r'
-    Parsers.map @@ (constant tabCode) @@ (Parsers.char @@ letterTCode)]     -- '\t'
-    -- Note: \uXXXX unicode escapes not yet implemented
-
--- | Parse a single JSON string character
-jsonStringChar :: TTermDefinition (Parser Int)
-jsonStringChar = define "jsonStringChar" $
-  doc "Parse a single character in a JSON string (handling escapes)" $
-  Parsers.alt @@
-    -- Escape sequence
-    (Parsers.bind @@ (Parsers.char @@ backslashCode) @@ (constant $
-      jsonEscapeChar)) @@
-    -- Regular character (not quote or backslash)
-    (Parsers.satisfy @@ ("c" ~>
-      Logic.and
-        (Logic.not $ Equality.equal (var "c") quoteCode)
-        (Logic.not $ Equality.equal (var "c") backslashCode)))
-
--- | Parse a JSON string
-jsonString :: TTermDefinition (Parser J.Value)
-jsonString = define "jsonString" $
-  doc "Parse a JSON string value" $
-  token @@
-    (Parsers.bind @@ (Parsers.char @@ quoteCode) @@ (constant $
-      Parsers.bind @@ (Parsers.many @@ jsonStringChar) @@ ("chars" ~>
-        Parsers.bind @@ (Parsers.char @@ quoteCode) @@ (constant $
-          Parsers.pure @@ (Json.valueString (Strings.fromList (var "chars")))))))
-
--- | Parse a JSON array
-jsonArray :: TTermDefinition (Parser J.Value)
-jsonArray = define "jsonArray" $
-  doc "Parse a JSON array" $
-  Parsers.map @@ (unaryFunction Json.valueArray) @@
-    (Parsers.between
-      @@ (token @@ (Parsers.char @@ bracketOpenCode))
-      @@ (token @@ (Parsers.char @@ bracketCloseCode))
-      @@ (Parsers.sepBy
-          @@ (Parsers.lazy @@ constant jsonValue)
-          @@ (token @@ (Parsers.char @@ commaCode))))
-
--- | Parse a JSON key-value pair
-jsonKeyValue :: TTermDefinition (Parser (String, J.Value))
-jsonKeyValue = define "jsonKeyValue" $
-  doc "Parse a JSON object key-value pair" $
-  Parsers.bind @@
-    (token @@
-      (Parsers.bind @@ (Parsers.char @@ quoteCode) @@ (constant $
-        Parsers.bind @@ (Parsers.many @@ jsonStringChar) @@ ("chars" ~>
-          Parsers.bind @@ (Parsers.char @@ quoteCode) @@ (constant $
-            Parsers.pure @@ (Strings.fromList (var "chars"))))))) @@
-    ("key" ~>
-      Parsers.bind @@ (token @@ (Parsers.char @@ colonCode)) @@ (constant $
-        Parsers.map @@ ("v" ~> pair (var "key") (var "v")) @@ (Parsers.lazy @@ constant jsonValue)))
-
--- | Parse a JSON object
-jsonObject :: TTermDefinition (Parser J.Value)
-jsonObject = define "jsonObject" $
-  doc "Parse a JSON object" $
-  Parsers.map @@ (unaryFunction Json.valueObject <.> unaryFunction Maps.fromList) @@
-    (Parsers.between
-      @@ (token @@ (Parsers.char @@ braceOpenCode))
-      @@ (token @@ (Parsers.char @@ braceCloseCode))
-      @@ (Parsers.sepBy
-          @@ jsonKeyValue
-          @@ (token @@ (Parsers.char @@ commaCode))))
-
--- | Parse any JSON value
-jsonValue :: TTermDefinition (Parser J.Value)
-jsonValue = define "jsonValue" $
-  doc "Parse any JSON value" $
-  Parsers.choice @@ list [
-    jsonNull,
-    jsonBool,
-    jsonNumber,
-    jsonString,
-    jsonArray,
-    jsonObject]
-
--- | Parse a JSON document (value with optional surrounding whitespace)
-parseJson :: TTermDefinition (String -> ParseResult J.Value)
-parseJson = define "parseJson" $
-  doc "Parse a JSON document from a string" $
-  "input" ~>
-    unwrap _Parser @@
-      (Parsers.bind @@ whitespace @@ (constant $
-        Parsers.bind @@ jsonValue @@ ("v" ~>
-          Parsers.bind @@ whitespace @@ (constant $
-            Parsers.bind @@ Parsers.eof @@ (constant $
-              Parsers.pure @@ var "v"))))) @@
-      (var "input")
diff --git a/src/main/haskell/Hydra/Sources/Json/Schema.hs b/src/main/haskell/Hydra/Sources/Json/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Schema.hs
+++ /dev/null
@@ -1,230 +0,0 @@
-module Hydra.Sources.Json.Schema where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Json.Model        as JsonModel
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [JsonModel.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model for JSON Schema. Based on https://cswr.github.io/JsonSchema/spec/grammar")}
-  where
-    ns = Namespace "hydra.json.schema"
-    def = datatype ns
-    js = typeref ns
-    json = typeref $ JsonModel.ns
-
-    keywordSchemaMap = T.map (js "Keyword") (js "Schema")
-    keywordSchemaOrArrayMap = T.map (js "Keyword") (js "SchemaOrArray")
-    regexSchemaMap = T.map (js "RegularExpression") (js "Schema")
-
-    definitions = [
--- Json Documents and Schemas
--- Let JDOC be an arbitrary JSON Schema Document. We can define its syntax using the following grammar:
---
--- JSDoc := { ( id, )? ( defs, )? JSch }
-
-      def "Document" $ T.record [
-        "id">: T.maybe T.string,
-        "definitions">: T.maybe keywordSchemaMap,
-        "root">: js "Schema"],
-
--- id := "id": "uri"
--- defs := "definitions": { kSch (, kSch)*}
--- kSch := kword: { JSch }
-
-      def "Keyword" $
-        T.wrap T.string,
-
--- JSch := ( res (, res)*)
-      def "Schema" $
-        T.wrap $ nonemptyList $ js "Restriction",
-
--- res := type | strRes | numRes | arrRes | objRes | multRes | refSch | title | description
-
-      def "Restriction" $
-        T.union [
-          "type">: js "Type",
-          "string">: js "StringRestriction",
-          "number">: js "NumericRestriction",
-          "array">: js "ArrayRestriction",
-          "object">: js "ObjectRestriction",
-          "multiple">: js "MultipleRestriction",
-          "reference">: js "SchemaReference",
-          "title">: T.string,
-          "description">: T.string],
-
--- type := "type" : ([typename (, typename)*] | typename)
-
-      def "Type" $
-        T.union [
-          "single">: js "TypeName",
-          "multiple">: nonemptyList $ js "TypeName"],
-
--- typename := "string" | "integer" | "number" | "boolean" | "null" | "array" | "object"
-
-      def "TypeName" $
-        T.enum ["string", "integer", "number", "boolean", "null", "array", "object"],
-
--- title := "title":  string
--- description := "description":  string
-
--- Here each res and typename must be different from each other(otherwise they would be superfluous).
--- We must also note that each kword is representing a keyword that must be unique in the nest level that is occurs.
--- Besides, string is any string to describe either the title or de description of the nested schema.
--- Finally, a uri is any possible uri as defined in the standard. Next we specify the remaining restrictions:
--- strRes, numRes, arrRes, objRes and multRes, as well as referred schemas refSch.
---
--- String Restrictions
--- strRes :=  minLen | maxLen | pattern
-
-      def "StringRestriction" $
-        T.union [
-          "minLength">: T.int32,
-          "maxLength">: T.int32,
-          "pattern">: js "RegularExpression"],
-
--- minLen := "minLength": n
--- maxLen := "maxLength": n
--- pattern := "pattern": "regExp"
-
-      def "RegularExpression" $
-        T.wrap T.string,
-
--- Here n is a natural number and r is a regular expression.
---
--- Numeric Restrictions
--- numRes := min | max | multiple
-
-      def "NumericRestriction" $
-        T.union [
-          "minimum">: js "Limit",
-          "maximum">: js "Limit",
-          "multipleOf">: T.nonNegativeInt32],
-
-     def "Limit" $
-       T.record [
-         "value">: T.int32,
-         "exclusive">: T.boolean],
-
--- min := "minimum": r (,exMin)?
--- exMin := "exclusiveMinimum": bool
--- max := "maximum": r (,exMax)?
--- exMax := "exclusiveMaximum": bool
--- multiple := "multipleOf": r   (r >= 0)
--- Here r is a decimal number and bool is either true or false.
---
--- Array Restrictions
---  arrRes := items | additems | minitems | maxitems  | unique
-
-      def "ArrayRestriction" $
-        T.union [
-          "items">: js "Items",
-          "additionalItems">: js "AdditionalItems",
-          "minItems">: T.nonNegativeInt32,
-          "maxItems">: T.nonNegativeInt32,
-          "uniqueItems">: T.boolean],
-
---  items := ( sameitems |  varitems )
-
-      def "Items" $
-        T.union [
-          "sameItems">: js "Schema",
-          "varItems">: nonemptyList $ js "Schema"],
-
---  sameitems := "items": { JSch }
---  varitems := "items": [{ JSch }(,{ JSch })*]
---  additems :=  "additionalItems": (bool | { JSch })
-
-      def "AdditionalItems" $
-        T.union [
-          "any">: T.boolean,
-          "schema">: js "Schema"],
-
---  minitems := "minItems": n
---  maxitems := "maxItems": n
---  unique := "uniqueItems": bool
--- Here n is a natural number and bool is either true or false.
---
--- Object Restrictions
--- objRes := prop | addprop | req | minprop | maxprop | dep | pattprop
-
-      def "ObjectRestriction" $
-        T.union [
-          "properties">: keywordSchemaMap,
-          "additionalProperties">: js "AdditionalItems",
-          "required">: nonemptyList $ js "Keyword",
-          "minProperties">: T.nonNegativeInt32,
-          "maxProperties">: T.nonNegativeInt32,
-          "dependencies">: keywordSchemaOrArrayMap,
-          "patternProperties">: regexSchemaMap],
-
--- prop := "properties": { kSch (, kSch)*}
--- kSch := kword: { JSch }
--- addprop := "additionalProperties": (bool | { JSch })
--- req := "required": [ kword (, kword)*]
--- minprop := "minProperties": n
--- maxprop := "maxProperties": n
--- dep := "dependencies": { kDep (, kDep)*}
--- kDep := (kArr | kSch)
-
-      def "SchemaOrArray" $
-        T.union [
-          "schema">: js "Schema",
-          "array">: T.list $ js "Keyword"],
-
--- kArr := kword: [ kword (, kword)*]
--- pattprop := "patternProperties": { patSch (, patSch)*}
--- patSch := "regExp": { JSch }
--- Here n is a natural number, bool is either true or false and regExp is a regular expression. As above, each kword is representing a keyword that must be unique in the nest level that is occurs.
---
--- Multiple Restrictions
--- multRes := allOf | anyOf| oneOf | not | enum
-
-      def "MultipleRestriction" $
-        T.union [
-          "allOf">: nonemptyList $ js "Schema",
-          "anyOf">: nonemptyList $ js "Schema",
-          "oneOf">: nonemptyList $ js "Schema",
-          "not">: js "Schema",
-          "enum">: nonemptyList $ json "Value"],
-
--- anyOf := "anyOf": [ { JSch } (, { JSch }) * ]
--- allOf := "allOf": [ { JSch } (, { JSch }) * ]
--- oneOf := "oneOf": [ { JSch } (, { JSch }) * ]
--- not := "not": { JSch }
--- enum := "enum": [Jval (, Jval)*]
--- Here Jval is either a string, number, array, object, bool or a null value. Moreover each Jval must be different from each other(otherwise they would be superfluous).
-
--- Referred Schemas
--- Note that uriRef below is the same grammar we defined earlier for URIs.
---
--- refSch := "$ref": "uriRef"
-
-         def "SchemaReference" $
-            T.wrap T.string]
-
--- uriRef := ( address )? ( # / JPointer )?
--- JPointer := ( / path )
--- path := ( unescaped | escaped )
--- escaped := ~0 | ~1
--- Where unescaped can be any character except for / and ~. Also, address corresponds to any URI that does not use the # symbol, or more precisely to any URI-reference constructed using the following grammar, as defined in the official standard:
---
--- address = (scheme : )? hier-part (? query )
-
-
diff --git a/src/main/haskell/Hydra/Sources/Json/Schema/Coder.hs b/src/main/haskell/Hydra/Sources/Json/Schema/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Schema/Coder.hs
+++ /dev/null
@@ -1,183 +0,0 @@
-module Hydra.Sources.Json.Schema.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Json.Schema as JS
-import qualified Hydra.Json.Model as JM
-import qualified Hydra.Sources.Json.Schema as JsonSchema
-import qualified Hydra.Sources.Json.Schema.Serde as JsonSchemaSerde
-
--- Phantom type for JsonSchemaOptions (was previously in Staging module)
-data JsonSchemaOptions
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-jsonSchemaPhantomNs :: Namespace
-jsonSchemaPhantomNs = Namespace "hydra.json.schema"
-
-jsonModelNs :: Namespace
-jsonModelNs = Namespace "hydra.json.model"
-
-ns :: Namespace
-ns = Namespace "hydra.json.schema.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Names.ns, Strip.ns, Annotations.ns, Constants.ns, Reflect.ns, JsonSchemaSerde.ns],
-            moduleTypeDependencies = (moduleNamespace JsonSchema.module_:jsonModelNs:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "JSON Schema code generator: converts Hydra modules to JSON Schema documents"}
-  where
-    definitions = [
-      toDefinition constructModule,
-      toDefinition encodeField,
-      toDefinition encodeName,
-      toDefinition encodeNamedType,
-      toDefinition encodeType,
-      toDefinition isRequiredField,
-      toDefinition moduleToJsonSchema,
-      toDefinition referenceRestriction]
-
-
--- | Result type alias
-type Result a = Either Error a
-
-
-constructModule :: TTermDefinition (Context -> Graph -> JsonSchemaOptions -> Module -> [TypeDefinition] -> Result (M.Map FilePath JS.Document))
-constructModule = define "constructModule" $
-  doc "Construct JSON Schema documents from type definitions" $
-  lambda "cx" $ lambda "g" $ lambda "opts" $ lambda "mod" $ lambda "typeDefs" $
-    var "hydra.json.schema.coder.constructModule" @@ var "cx" @@ var "g" @@ var "opts" @@ var "mod" @@ var "typeDefs"
-
-encodeField :: TTermDefinition (Context -> Graph -> FieldType -> Result (JS.Keyword, JS.Schema))
-encodeField = define "encodeField" $
-  doc "Encode a field type as a JSON Schema keyword-schema pair" $
-  lambda "cx" $ lambda "g" $ lambda "ft" $ lets [
-    "name">: project _FieldType _FieldType_name @@ var "ft",
-    "typ">: project _FieldType _FieldType_type @@ var "ft"] $
-    Eithers.map
-      (lambda "res" $ pair (wrap JS._Keyword (Core.unName $ var "name")) (wrap JS._Schema (var "res")))
-      (encodeType @@ var "cx" @@ var "g" @@ false @@ var "typ")
-
-encodeName :: TTermDefinition (Name -> String)
-encodeName = define "encodeName" $
-  doc "Encode a Hydra name as a safe identifier string, replacing non-alphanumeric characters with underscores" $
-  lambda "name" $
-    Formatting.nonAlnumToUnderscores @@ Core.unName (var "name")
-
-encodeNamedType :: TTermDefinition (Context -> Graph -> Name -> Type -> Result [JS.Restriction])
-encodeNamedType = define "encodeNamedType" $
-  doc "Encode a named type as a list of JSON Schema restrictions with a title" $
-  lambda "cx" $ lambda "g" $ lambda "name" $ lambda "typ" $
-    Eithers.map
-      (lambda "res" $ Lists.concat $ list [
-        list [inject JS._Restriction JS._Restriction_title (Core.unName $ var "name")],
-        var "res"])
-      (encodeType @@ var "cx" @@ var "g" @@ false @@ (Strip.deannotateType @@ var "typ"))
-
-encodeType :: TTermDefinition (Context -> Graph -> Bool -> Type -> Result [JS.Restriction])
-encodeType = define "encodeType" $
-  doc "Encode a Hydra type as a list of JSON Schema restrictions" $
-  lambda "cx" $ lambda "g" $ lambda "optional" $ lambda "typ" $
-    var "hydra.json.schema.coder.encodeType" @@ var "cx" @@ var "g" @@ var "optional" @@ var "typ"
-
-isRequiredField :: TTermDefinition (FieldType -> Bool)
-isRequiredField = define "isRequiredField" $
-  doc "Determine whether a field is required (i.e., not optional/Maybe)" $
-  lambda "ft" $ lets [
-    "typ">: project _FieldType _FieldType_type @@ var "ft"] $
-    cases _Type (Strip.deannotateType @@ var "typ") (Just true) [
-      _Type_maybe>>: constant false]
-
-moduleToJsonSchema :: TTermDefinition (JsonSchemaOptions -> Module -> [Definition] -> Context -> Graph -> Result (M.Map FilePath String))
-moduleToJsonSchema = define "moduleToJsonSchema" $
-  doc "Convert a Hydra module to a map of JSON Schema documents" $
-  lambda "opts" $ lambda "mod" $ lambda "defs" $ lambda "cx" $ lambda "g" $
-    var "hydra.json.schema.coder.moduleToJsonSchema" @@ var "opts" @@ var "mod" @@ var "defs" @@ var "cx" @@ var "g"
-
-referenceRestriction :: TTermDefinition (Name -> JS.Restriction)
-referenceRestriction = define "referenceRestriction" $
-  doc "Create a JSON Schema reference restriction for a named type" $
-  lambda "name" $
-    inject JS._Restriction JS._Restriction_reference
-      (wrap JS._SchemaReference (Strings.cat $ list [string "#/$defs/", encodeName @@ var "name"]))
diff --git a/src/main/haskell/Hydra/Sources/Json/Schema/Language.hs b/src/main/haskell/Hydra/Sources/Json/Schema/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Schema/Language.hs
+++ /dev/null
@@ -1,128 +0,0 @@
-module Hydra.Sources.Json.Schema.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.json.schema.language"),
-            moduleDefinitions = [toDefinition jsonSchemaLanguage],
-            moduleTermDependencies = [Reflect.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for JSON Schema"}
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-jsonSchemaLanguage :: TTermDefinition Language
-jsonSchemaLanguage = define "jsonSchemaLanguage" $
-  doc "Language constraints for JSON Schema" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [Core.floatTypeBigfloat],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [Core.integerTypeBigint],
-  "termVariants">: Sets.fromList Reflect.termVariants,
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantEither,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantPair,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion,
-    Variants.typeVariantVariable,
-    Variants.typeVariantWrap],
-  "typePredicate">: constant true] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.json.schema")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
diff --git a/src/main/haskell/Hydra/Sources/Json/Schema/Serde.hs b/src/main/haskell/Hydra/Sources/Json/Schema/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Schema/Serde.hs
+++ /dev/null
@@ -1,558 +0,0 @@
-module Hydra.Sources.Json.Schema.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Json.Schema as JS
-import qualified Hydra.Json.Model as J
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-jsonSchemaSyntaxNs :: Namespace
-jsonSchemaSyntaxNs = Namespace "hydra.json.schema"
-
-jsonWriterNs :: Namespace
-jsonWriterNs = Namespace "hydra.json.writer"
-
-ns :: Namespace
-ns = Namespace "hydra.json.schema.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [jsonWriterNs],
-            moduleTypeDependencies = (jsonSchemaSyntaxNs:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting JSON Schema documents to JSON values"}
-  where
-    definitions = [
-      toDefinition encodeAdditionalItems,
-      toDefinition encodeArrayRestriction,
-      toDefinition encodeInteger,
-      toDefinition encodeItems,
-      toDefinition encodeKeyword,
-      toDefinition encodeKeywordSchemaOrArray,
-      toDefinition encodeMultipleRestriction,
-      toDefinition encodeNumericRestriction,
-      toDefinition encodeObjectRestriction,
-      toDefinition encodePatternProperty,
-      toDefinition encodeProperty,
-      toDefinition encodeRestriction,
-      toDefinition encodeSchema,
-      toDefinition encodeSchemaOrArray,
-      toDefinition encodeSchemaReference,
-      toDefinition encodeStringRestriction,
-      toDefinition encodeType,
-      toDefinition encodeTypeName,
-      toDefinition fromObject,
-      toDefinition jsonSchemaDocumentToJsonValue,
-      toDefinition jsonSchemaDocumentToString,
-      toDefinition key_additionalItems,
-      toDefinition key_additionalProperties,
-      toDefinition key_allOf,
-      toDefinition key_anyOf,
-      toDefinition key_definitions,
-      toDefinition key_dependencies,
-      toDefinition key_description_,
-      toDefinition key_enum,
-      toDefinition key_exclusiveMaximum,
-      toDefinition key_exclusiveMinimum,
-      toDefinition key_id,
-      toDefinition key_items,
-      toDefinition key_label,
-      toDefinition key_maxItems,
-      toDefinition key_maxLength_,
-      toDefinition key_maxProperties,
-      toDefinition key_maximum,
-      toDefinition key_minItems,
-      toDefinition key_minLength_,
-      toDefinition key_minProperties,
-      toDefinition key_minimum,
-      toDefinition key_multipleOf,
-      toDefinition key_not,
-      toDefinition key_oneOf,
-      toDefinition key_pattern,
-      toDefinition key_patternProperties,
-      toDefinition key_properties,
-      toDefinition key_ref,
-      toDefinition key_required,
-      toDefinition key_schema,
-      toDefinition key_title,
-      toDefinition key_type_,
-      toDefinition key_uniqueItems,
-      toDefinition toObject]
-
-
--- String constant keys
-
-encodeAdditionalItems :: TTermDefinition (JS.AdditionalItems -> J.Value)
-encodeAdditionalItems = define "encodeAdditionalItems" $
-  doc "Encode additional items as a JSON value" $
-  lambda "ai" $
-    cases JS._AdditionalItems (var "ai") Nothing [
-      JS._AdditionalItems_any>>: lambda "b" $ Json.valueBoolean (var "b"),
-      JS._AdditionalItems_schema>>: lambda "schema" $ encodeSchema @@ var "schema"]
-
-encodeArrayRestriction :: TTermDefinition (JS.ArrayRestriction -> (String, J.Value))
-encodeArrayRestriction = define "encodeArrayRestriction" $
-  doc "Encode an array restriction as a key-value pair" $
-  lambda "r" $
-    cases JS._ArrayRestriction (var "r") Nothing [
-      JS._ArrayRestriction_items>>: lambda "items" $ encodeItems @@ var "items",
-      JS._ArrayRestriction_additionalItems>>: lambda "ai" $
-        pair key_additionalItems (encodeAdditionalItems @@ var "ai"),
-      JS._ArrayRestriction_minItems>>: lambda "n" $
-        pair key_minItems (encodeInteger @@ var "n"),
-      JS._ArrayRestriction_maxItems>>: lambda "n" $
-        pair key_maxItems (encodeInteger @@ var "n"),
-      JS._ArrayRestriction_uniqueItems>>: lambda "b" $
-        pair key_uniqueItems (Json.valueBoolean (var "b"))]
-
-encodeInteger :: TTermDefinition (Int -> J.Value)
-encodeInteger = define "encodeInteger" $
-  doc "Encode an integer as a JSON number value" $
-  lambda "n" $
-    Json.valueNumber (Literals.bigintToDecimal (Literals.int32ToBigint (var "n")))
-
-encodeItems :: TTermDefinition (JS.Items -> (String, J.Value))
-encodeItems = define "encodeItems" $
-  doc "Encode items as a key-value pair" $
-  lambda "items" $
-    pair key_items
-      (cases JS._Items (var "items") Nothing [
-        JS._Items_sameItems>>: lambda "schema" $ encodeSchema @@ var "schema",
-        JS._Items_varItems>>: lambda "schemas" $
-          Json.valueArray (Lists.map encodeSchema (var "schemas"))])
-
-encodeKeyword :: TTermDefinition (JS.Keyword -> J.Value)
-encodeKeyword = define "encodeKeyword" $
-  doc "Encode a keyword as a JSON string value" $
-  lambda "k" $
-    Json.valueString (unwrap JS._Keyword @@ var "k")
-
-encodeKeywordSchemaOrArray :: TTermDefinition ((JS.Keyword, JS.SchemaOrArray) -> (String, J.Value))
-encodeKeywordSchemaOrArray = define "encodeKeywordSchemaOrArray" $
-  doc "Encode a keyword-schema-or-array pair as a key-value pair" $
-  lambda "p" $ lets [
-    "k">: Pairs.first (var "p"),
-    "s">: Pairs.second (var "p")] $
-    pair (unwrap JS._Keyword @@ var "k") (encodeSchemaOrArray @@ var "s")
-
-encodeMultipleRestriction :: TTermDefinition (JS.MultipleRestriction -> (String, J.Value))
-encodeMultipleRestriction = define "encodeMultipleRestriction" $
-  doc "Encode a multiple restriction as a key-value pair" $
-  lambda "r" $
-    cases JS._MultipleRestriction (var "r") Nothing [
-      JS._MultipleRestriction_allOf>>: lambda "schemas" $
-        pair key_allOf (Json.valueArray (Lists.map encodeSchema (var "schemas"))),
-      JS._MultipleRestriction_anyOf>>: lambda "schemas" $
-        pair key_anyOf (Json.valueArray (Lists.map encodeSchema (var "schemas"))),
-      JS._MultipleRestriction_oneOf>>: lambda "schemas" $
-        pair key_oneOf (Json.valueArray (Lists.map encodeSchema (var "schemas"))),
-      JS._MultipleRestriction_not>>: lambda "schema" $
-        pair key_not (encodeSchema @@ var "schema"),
-      JS._MultipleRestriction_enum>>: lambda "values" $
-        pair key_enum (Json.valueArray (var "values"))]
-
-encodeNumericRestriction :: TTermDefinition (JS.NumericRestriction -> [(String, J.Value)])
-encodeNumericRestriction = define "encodeNumericRestriction" $
-  doc "Encode a numeric restriction as a list of key-value pairs" $
-  lambda "r" $
-    cases JS._NumericRestriction (var "r") Nothing [
-      JS._NumericRestriction_minimum>>: lambda "lim" $ lets [
-        "value">: project JS._Limit JS._Limit_value @@ var "lim",
-        "excl">: project JS._Limit JS._Limit_exclusive @@ var "lim"] $
-        Lists.concat $ list [
-          list [pair key_minimum (encodeInteger @@ var "value")],
-          Logic.ifElse (var "excl")
-            (list [pair key_exclusiveMinimum (Json.valueBoolean true)])
-            (list ([] :: [TTerm (String, J.Value)]))],
-      JS._NumericRestriction_maximum>>: lambda "lim" $ lets [
-        "value">: project JS._Limit JS._Limit_value @@ var "lim",
-        "excl">: project JS._Limit JS._Limit_exclusive @@ var "lim"] $
-        Lists.concat $ list [
-          list [pair key_maximum (encodeInteger @@ var "value")],
-          Logic.ifElse (var "excl")
-            (list [pair key_exclusiveMaximum (Json.valueBoolean true)])
-            (list ([] :: [TTerm (String, J.Value)]))],
-      JS._NumericRestriction_multipleOf>>: lambda "n" $
-        list [pair key_multipleOf (encodeInteger @@ var "n")]]
-
-encodeObjectRestriction :: TTermDefinition (JS.ObjectRestriction -> (String, J.Value))
-encodeObjectRestriction = define "encodeObjectRestriction" $
-  doc "Encode an object restriction as a key-value pair" $
-  lambda "r" $
-    cases JS._ObjectRestriction (var "r") Nothing [
-      JS._ObjectRestriction_properties>>: lambda "props" $
-        pair key_properties
-          (Json.valueObject (Maps.fromList (Lists.map encodeProperty (Maps.toList (var "props"))))),
-      JS._ObjectRestriction_additionalProperties>>: lambda "ai" $
-        pair key_additionalProperties (encodeAdditionalItems @@ var "ai"),
-      JS._ObjectRestriction_required>>: lambda "keys" $
-        pair key_required (Json.valueArray (Lists.map encodeKeyword (var "keys"))),
-      JS._ObjectRestriction_minProperties>>: lambda "n" $
-        pair key_minProperties (encodeInteger @@ var "n"),
-      JS._ObjectRestriction_maxProperties>>: lambda "n" $
-        pair key_maxProperties (encodeInteger @@ var "n"),
-      JS._ObjectRestriction_dependencies>>: lambda "deps" $
-        pair key_dependencies
-          (Json.valueObject (Maps.fromList (Lists.map encodeKeywordSchemaOrArray (Maps.toList (var "deps"))))),
-      JS._ObjectRestriction_patternProperties>>: lambda "props" $
-        pair key_patternProperties
-          (Json.valueObject (Maps.fromList (Lists.map encodePatternProperty (Maps.toList (var "props")))))]
-
-encodePatternProperty :: TTermDefinition ((JS.RegularExpression, JS.Schema) -> (String, J.Value))
-encodePatternProperty = define "encodePatternProperty" $
-  doc "Encode a pattern property pair as a key-value pair" $
-  lambda "p" $ lets [
-    "pat">: Pairs.first (var "p"),
-    "s">: Pairs.second (var "p")] $
-    pair (unwrap JS._RegularExpression @@ var "pat") (encodeSchema @@ var "s")
-
-encodeProperty :: TTermDefinition ((JS.Keyword, JS.Schema) -> (String, J.Value))
-encodeProperty = define "encodeProperty" $
-  doc "Encode a property pair as a key-value pair" $
-  lambda "p" $ lets [
-    "k">: Pairs.first (var "p"),
-    "s">: Pairs.second (var "p")] $
-    pair (unwrap JS._Keyword @@ var "k") (encodeSchema @@ var "s")
-
-encodeRestriction :: TTermDefinition (JS.Restriction -> [(String, J.Value)])
-encodeRestriction = define "encodeRestriction" $
-  doc "Encode a restriction as a list of key-value pairs" $
-  lambda "r" $
-    cases JS._Restriction (var "r") Nothing [
-      JS._Restriction_type>>: lambda "t" $
-        list [pair key_type_ (encodeType @@ var "t")],
-      JS._Restriction_string>>: lambda "sr" $
-        list [encodeStringRestriction @@ var "sr"],
-      JS._Restriction_number>>: lambda "nr" $
-        encodeNumericRestriction @@ var "nr",
-      JS._Restriction_array>>: lambda "ar" $
-        list [encodeArrayRestriction @@ var "ar"],
-      JS._Restriction_object>>: lambda "or" $
-        list [encodeObjectRestriction @@ var "or"],
-      JS._Restriction_multiple>>: lambda "mr" $
-        list [encodeMultipleRestriction @@ var "mr"],
-      JS._Restriction_reference>>: lambda "sr" $
-        list [pair key_ref (encodeSchemaReference @@ var "sr")],
-      JS._Restriction_title>>: lambda "s" $
-        list [pair key_title (Json.valueString (var "s"))],
-      JS._Restriction_description>>: lambda "s" $
-        list [pair key_description_ (Json.valueString (var "s"))]]
-
-encodeSchema :: TTermDefinition (JS.Schema -> J.Value)
-encodeSchema = define "encodeSchema" $
-  doc "Encode a schema as a JSON object value" $
-  lambda "s" $
-    Json.valueObject (Maps.fromList (Lists.concat (Lists.map encodeRestriction (unwrap JS._Schema @@ var "s"))))
-
-encodeSchemaOrArray :: TTermDefinition (JS.SchemaOrArray -> J.Value)
-encodeSchemaOrArray = define "encodeSchemaOrArray" $
-  doc "Encode a schema or array as a JSON value" $
-  lambda "soa" $
-    cases JS._SchemaOrArray (var "soa") Nothing [
-      JS._SchemaOrArray_schema>>: lambda "s" $ encodeSchema @@ var "s",
-      JS._SchemaOrArray_array>>: lambda "keys" $
-        Json.valueArray (Lists.map encodeKeyword (var "keys"))]
-
-encodeSchemaReference :: TTermDefinition (JS.SchemaReference -> J.Value)
-encodeSchemaReference = define "encodeSchemaReference" $
-  doc "Encode a schema reference as a JSON string value" $
-  lambda "sr" $
-    Json.valueString (unwrap JS._SchemaReference @@ var "sr")
-
-encodeStringRestriction :: TTermDefinition (JS.StringRestriction -> (String, J.Value))
-encodeStringRestriction = define "encodeStringRestriction" $
-  doc "Encode a string restriction as a key-value pair" $
-  lambda "r" $
-    cases JS._StringRestriction (var "r") Nothing [
-      JS._StringRestriction_maxLength>>: lambda "n" $
-        pair key_maxLength_ (Json.valueNumber (Literals.bigintToDecimal (Literals.int32ToBigint (var "n")))),
-      JS._StringRestriction_minLength>>: lambda "n" $
-        pair key_minLength_ (Json.valueNumber (Literals.bigintToDecimal (Literals.int32ToBigint (var "n")))),
-      JS._StringRestriction_pattern>>: lambda "re" $
-        pair key_pattern (Json.valueString (unwrap JS._RegularExpression @@ var "re"))]
-
-encodeType :: TTermDefinition (JS.Type -> J.Value)
-encodeType = define "encodeType" $
-  doc "Encode a type as a JSON value" $
-  lambda "t" $
-    cases JS._Type (var "t") Nothing [
-      JS._Type_single>>: lambda "name" $ encodeTypeName @@ var "name",
-      JS._Type_multiple>>: lambda "names" $
-        Json.valueArray (Lists.map encodeTypeName (var "names"))]
-
-encodeTypeName :: TTermDefinition (JS.TypeName -> J.Value)
-encodeTypeName = define "encodeTypeName" $
-  doc "Encode a type name as a JSON string value" $
-  lambda "t" $
-    cases JS._TypeName (var "t") Nothing [
-      JS._TypeName_string>>: constant $ Json.valueString (string "string"),
-      JS._TypeName_integer>>: constant $ Json.valueString (string "integer"),
-      JS._TypeName_number>>: constant $ Json.valueString (string "number"),
-      JS._TypeName_boolean>>: constant $ Json.valueString (string "boolean"),
-      JS._TypeName_null>>: constant $ Json.valueString (string "null"),
-      JS._TypeName_array>>: constant $ Json.valueString (string "array"),
-      JS._TypeName_object>>: constant $ Json.valueString (string "object")]
-
-fromObject :: TTermDefinition (J.Value -> M.Map String J.Value)
-fromObject = define "fromObject" $
-  doc "Extract the map from a JSON object value" $
-  lambda "v" $
-    cases J._Value (var "v") Nothing [
-      J._Value_object>>: lambda "mp" $ var "mp"]
-
-jsonSchemaDocumentToJsonValue :: TTermDefinition (JS.Document -> J.Value)
-jsonSchemaDocumentToJsonValue = define "jsonSchemaDocumentToJsonValue" $
-  doc "Convert a JSON Schema document to a JSON value" $
-  lambda "doc" $ lets [
-    "mid">: project JS._Document JS._Document_id @@ var "doc",
-    "mdefs">: project JS._Document JS._Document_definitions @@ var "doc",
-    "root">: project JS._Document JS._Document_root @@ var "doc",
-    "schemaMap">: fromObject @@ (encodeSchema @@ var "root"),
-    "restMap">: fromObject @@ (toObject @@ list [
-      pair key_id (Maybes.map (lambda "i" $ Json.valueString (var "i")) (var "mid")),
-      pair key_schema (Maybes.pure (Json.valueString (string "http://json-schema.org/2020-12/schema"))),
-      pair key_definitions (Maybes.map
-        (lambda "mp" $ Json.valueObject (Maps.fromList
-          (Lists.map
-            (lambda "p" $ lets [
-              "k">: Pairs.first (var "p"),
-              "schema">: Pairs.second (var "p")] $
-              pair (unwrap JS._Keyword @@ var "k") (encodeSchema @@ var "schema"))
-            (Maps.toList (var "mp")))))
-        (var "mdefs"))])] $
-    Json.valueObject (Maps.union (var "schemaMap") (var "restMap"))
-
-jsonSchemaDocumentToString :: TTermDefinition (JS.Document -> String)
-jsonSchemaDocumentToString = define "jsonSchemaDocumentToString" $
-  doc "Convert a JSON Schema document to a JSON string" $
-  lambda "doc" $
-    var "hydra.json.writer.printJson" @@ (jsonSchemaDocumentToJsonValue @@ var "doc")
-
-key_additionalItems :: TTermDefinition String
-key_additionalItems = define "key_additionalItems" $
-  string "additionalItems"
-
-key_additionalProperties :: TTermDefinition String
-key_additionalProperties = define "key_additionalProperties" $
-  string "additionalProperties"
-
-key_allOf :: TTermDefinition String
-key_allOf = define "key_allOf" $
-  string "allOf"
-
-key_anyOf :: TTermDefinition String
-key_anyOf = define "key_anyOf" $
-  string "anyOf"
-
-key_definitions :: TTermDefinition String
-key_definitions = define "key_definitions" $
-  string "$defs"
-
-key_dependencies :: TTermDefinition String
-key_dependencies = define "key_dependencies" $
-  string "dependencies"
-
-key_description_ :: TTermDefinition String
-key_description_ = define "key_description" $
-  string "description"
-
-key_enum :: TTermDefinition String
-key_enum = define "key_enum" $
-  string "enum"
-
-key_exclusiveMaximum :: TTermDefinition String
-key_exclusiveMaximum = define "key_exclusiveMaximum" $
-  string "exclusiveMaximum"
-
-key_exclusiveMinimum :: TTermDefinition String
-key_exclusiveMinimum = define "key_exclusiveMinimum" $
-  string "exclusiveMinimum"
-
-key_id :: TTermDefinition String
-key_id = define "key_id" $
-  string "$id"
-
-key_items :: TTermDefinition String
-key_items = define "key_items" $
-  string "items"
-
-key_label :: TTermDefinition String
-key_label = define "key_label" $
-  string "label"
-
-key_maxItems :: TTermDefinition String
-key_maxItems = define "key_maxItems" $
-  string "maxItems"
-
-key_maxLength_ :: TTermDefinition String
-key_maxLength_ = define "key_maxLength" $
-  string "maxLength"
-
-key_maxProperties :: TTermDefinition String
-key_maxProperties = define "key_maxProperties" $
-  string "maxProperties"
-
-key_maximum :: TTermDefinition String
-key_maximum = define "key_maximum" $
-  string "maximum"
-
-key_minItems :: TTermDefinition String
-key_minItems = define "key_minItems" $
-  string "minItems"
-
-key_minLength_ :: TTermDefinition String
-key_minLength_ = define "key_minLength" $
-  string "minLength"
-
-key_minProperties :: TTermDefinition String
-key_minProperties = define "key_minProperties" $
-  string "minProperties"
-
-key_minimum :: TTermDefinition String
-key_minimum = define "key_minimum" $
-  string "minimum"
-
-key_multipleOf :: TTermDefinition String
-key_multipleOf = define "key_multipleOf" $
-  string "multipleOf"
-
-key_not :: TTermDefinition String
-key_not = define "key_not" $
-  string "not"
-
-key_oneOf :: TTermDefinition String
-key_oneOf = define "key_oneOf" $
-  string "oneOf"
-
-key_pattern :: TTermDefinition String
-key_pattern = define "key_pattern" $
-  string "pattern"
-
-key_patternProperties :: TTermDefinition String
-key_patternProperties = define "key_patternProperties" $
-  string "patternProperties"
-
-key_properties :: TTermDefinition String
-key_properties = define "key_properties" $
-  string "properties"
-
-key_ref :: TTermDefinition String
-key_ref = define "key_ref" $
-  string "$ref"
-
-key_required :: TTermDefinition String
-key_required = define "key_required" $
-  string "required"
-
-key_schema :: TTermDefinition String
-key_schema = define "key_schema" $
-  string "$schema"
-
-key_title :: TTermDefinition String
-key_title = define "key_title" $
-  string "title"
-
-key_type_ :: TTermDefinition String
-key_type_ = define "key_type" $
-  string "type"
-
-key_uniqueItems :: TTermDefinition String
-key_uniqueItems = define "key_uniqueItems" $
-  string "uniqueItems"
-
-
--- Encoding functions
-
-toObject :: TTermDefinition ([(String, Maybe J.Value)] -> J.Value)
-toObject = define "toObject" $
-  doc "Construct a JSON object from a list of optional key-value pairs, filtering out Nothing values" $
-  lambda "pairs" $
-    Json.valueObject (Maps.fromList
-      (Maybes.cat (Lists.map
-        (lambda "p" $ lets [
-          "k">: Pairs.first (var "p"),
-          "mv">: Pairs.second (var "p")] $
-          Maybes.map
-            (lambda "v" $ pair (var "k") (var "v"))
-            (var "mv"))
-        (var "pairs"))))
diff --git a/src/main/haskell/Hydra/Sources/Json/Writer.hs b/src/main/haskell/Hydra/Sources/Json/Writer.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Writer.hs
+++ /dev/null
@@ -1,217 +0,0 @@
-
-module Hydra.Sources.Json.Writer where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Json.Model as J
-
-
-jsonSerdeDefinition :: String -> TTerm a -> TTermDefinition a
-jsonSerdeDefinition = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "JSON serialization functions using the Hydra AST"}
-  where
-    ns = Namespace "hydra.json.writer"
-    definitions = [
-      toDefinition colonOp,
-      toDefinition hexByte,
-      toDefinition jsonString,
-      toDefinition keyValueToExpr,
-      toDefinition printJson,
-      toDefinition valueToExpr]
-
-colonOp :: TTermDefinition Op
-colonOp = jsonSerdeDefinition "colonOp" $
-  doc "The colon operator used to separate keys and values in JSON objects" $
-  Ast.op
-    (Ast.symbol $ string ":")
-    (Ast.padding Ast.wsNone Ast.wsSpace)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone
-
--- | ASCII codepoints for characters that need escaping
-quoteCode, backslashCode, backspaceCode, formfeedCode, newlineCode, returnCode, tabCode :: TTerm Int
-quoteCode = int32 34      -- '"'
-backslashCode = int32 92  -- '\\'
-backspaceCode = int32 8   -- '\b'
-formfeedCode = int32 12   -- '\f'
-newlineCode = int32 10    -- '\n'
-returnCode = int32 13     -- '\r'
-tabCode = int32 9         -- '\t'
-
-hexDigits :: TTerm String
-hexDigits = string "0123456789abcdef"
-
--- | Encode a byte value (0..255) as a two-character lowercase hex string.
--- For out-of-range inputs (unreachable for a real byte), substitutes "?" for
--- each invalid nibble so output remains a valid 2-character string.
-hexByte :: TTermDefinition (Int -> String)
-hexByte = jsonSerdeDefinition "hexByte" $
-  doc "Encode a byte (0..255) as a two-character lowercase hex string. Non-byte inputs yield placeholder '?' characters." $
-  "c" ~>
-  "nibble" <~ ("i" ~> Maybes.fromMaybe (string "?") (Maybes.map
-    ("ch" ~> Strings.fromList (Lists.pure $ var "ch"))
-    (Strings.maybeCharAt (var "i") hexDigits))) $
-  "hi" <~ (var "nibble" @@ Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "c") (int32 16))) $
-  "lo" <~ (var "nibble" @@ Maybes.fromMaybe (int32 0) (Math.maybeMod (var "c") (int32 16))) $
-  var "hi" ++ var "lo"
-
-jsonString :: TTermDefinition (String -> String)
-jsonString = jsonSerdeDefinition "jsonString" $
-  doc "Escape and quote a string for JSON output" $
-  "s" ~>
-  -- hexEscape: encode a byte as \\u00XX using the total hexByte helper.
-  "hexEscape" <~ ("c" ~> string "\\u00" ++ (hexByte @@ var "c")) $
-  -- escape function takes a codepoint (Int) and returns a String
-  "escape" <~ ("c" ~>
-    Logic.ifElse (Equality.equal (var "c") quoteCode)
-      (string "\\\"")
-      (Logic.ifElse (Equality.equal (var "c") backslashCode)
-        (string "\\\\")
-        (Logic.ifElse (Equality.equal (var "c") backspaceCode)
-          (string "\\b")
-          (Logic.ifElse (Equality.equal (var "c") formfeedCode)
-            (string "\\f")
-            (Logic.ifElse (Equality.equal (var "c") newlineCode)
-              (string "\\n")
-              (Logic.ifElse (Equality.equal (var "c") returnCode)
-                (string "\\r")
-                (Logic.ifElse (Equality.equal (var "c") tabCode)
-                  (string "\\t")
-                  -- Escape any other control character (< 0x20) as \u00XX
-                  (Logic.ifElse (Equality.lt (var "c") (int32 32))
-                    (var "hexEscape" @@ var "c")
-                    -- Non-control character: pass through as-is
-                    (Strings.fromList (Lists.pure (var "c"))))))))))) $
-  "escaped" <~ Strings.cat (Lists.map (var "escape") (Strings.toList $ var "s")) $
-  string "\"" ++ var "escaped" ++ string "\""
-
-keyValueToExpr :: TTermDefinition ((String, J.Value) -> Expr)
-keyValueToExpr = jsonSerdeDefinition "keyValueToExpr" $
-  doc "Convert a key-value pair to an AST expression" $
-  "pair" ~>
-  "key" <~ Pairs.first (var "pair") $
-  "value" <~ Pairs.second (var "pair") $
-  Serialization.ifx @@ colonOp
-    @@ (Serialization.cst @@ (jsonString @@ var "key"))
-    @@ (valueToExpr @@ var "value")
-
-valueToExpr :: TTermDefinition (J.Value -> Expr)
-valueToExpr = jsonSerdeDefinition "valueToExpr" $
-  doc "Convert a JSON value to an AST expression for serialization" $
-  "value" ~>
-  cases J._Value (var "value") Nothing [
-    J._Value_array>>: "arr" ~>
-      Serialization.bracketListAdaptive @@ (Lists.map (valueToExpr) (var "arr")),
-    J._Value_boolean>>: "b" ~>
-      Serialization.cst @@ (Logic.ifElse (var "b") (string "true") (string "false")),
-    J._Value_null>>: constant $
-      Serialization.cst @@ string "null",
-    J._Value_number>>: "n" ~>
-      -- Two candidate lexical forms:
-      --   plain      : showBigint(round(n)), only valid when n is whole-valued
-      --   scientific : showDecimal(n), always valid
-      -- Pick whichever is shorter. This keeps 42 → "42" (plain) and 1e20 → "1.0e20"
-      -- (scientific), avoiding both the trailing-".0" noise and the 21-digit integer.
-      "rounded" <~ Literals.decimalToBigint (var "n") $
-      "shown" <~ (Literals.showDecimal $ var "n") $
-      "isWhole" <~ (Equality.equal (var "n") (Literals.bigintToDecimal $ var "rounded")) $
-      "plain" <~ (Literals.showBigint $ var "rounded") $
-      Serialization.cst @@ (Logic.ifElse
-        (Logic.and (var "isWhole")
-          (Equality.lte (Strings.length $ var "plain") (Strings.length $ var "shown")))
-        (var "plain")
-        (var "shown")),
-    J._Value_object>>: "obj" ~>
-      Serialization.bracesListAdaptive @@ (Lists.map (keyValueToExpr) (Maps.toList $ var "obj")),
-    J._Value_string>>: "s" ~>
-      Serialization.cst @@ (jsonString @@ var "s")]
-
-printJson :: TTermDefinition (J.Value -> String)
-printJson = jsonSerdeDefinition "printJson" $
-  doc "Serialize a JSON value to a string" $
-  "value" ~> Serialization.printExpr @@ (valueToExpr @@ var "value")
diff --git a/src/main/haskell/Hydra/Sources/Json/Yaml/Decode.hs b/src/main/haskell/Hydra/Sources/Json/Yaml/Decode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Yaml/Decode.hs
+++ /dev/null
@@ -1,160 +0,0 @@
-
-module Hydra.Sources.Json.Yaml.Decode where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
---import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Json.Model
-import qualified Hydra.Yaml.Model as YM
-import qualified Hydra.Sources.Json.Decode as JsonDecode
-import qualified Hydra.Sources.Yaml.Model as YamlModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.yaml.decode"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [JsonDecode.ns, YamlModel.ns],
-            moduleTypeDependencies = (YamlModel.ns : KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "YAML-to-JSON decoding. Converts YAML Nodes to JSON Values (may fail for non-JSON YAML), and YAML Nodes to Hydra Terms via JSON."}
-  where
-    definitions = [
-      toDefinition yamlToJson,
-      toDefinition fromYaml]
-
--- | Convert a YAML Node to a JSON Value. Fails if the YAML uses non-JSON features
--- (e.g. non-string mapping keys, integer scalars without a JSON number equivalent).
-yamlToJson :: TTermDefinition (YM.Node -> Either String Value)
-yamlToJson = define "yamlToJson" $
-  doc "Convert a YAML node to a JSON value. Fails for non-JSON YAML features (e.g. non-string mapping keys)." $
-  "node" ~>
-  cases YM._Node (var "node")
-    Nothing [
-
-    YM._Node_mapping>>: "m" ~>
-      -- Convert each key-value pair; keys must be string scalars
-      "convertEntry" <~ ("kv" ~>
-        "keyNode" <~ (Pairs.first $ var "kv") $
-        "valNode" <~ (Pairs.second $ var "kv") $
-        -- Extract string key from the key node
-        "keyResult" <~ (cases YM._Node (var "keyNode")
-          (Just $ left $ string "non-scalar YAML mapping key") [
-          YM._Node_scalar>>: "s" ~>
-            cases YM._Scalar (var "s")
-              (Just $ left $ string "non-string YAML mapping key") [
-              YM._Scalar_str>>: "str" ~> right $ var "str"]]) $
-        Eithers.either_
-          ("err" ~> left $ var "err")
-          ("key" ~>
-            "valResult" <~ (yamlToJson @@ var "valNode") $
-            Eithers.map ("v" ~> pair (var "key") (var "v")) (var "valResult"))
-          (var "keyResult")) $
-      "entries" <~ (Eithers.mapList (var "convertEntry") (Maps.toList $ var "m")) $
-      Eithers.map ("es" ~> Json.valueObject $ Maps.fromList $ var "es") (var "entries"),
-
-    YM._Node_scalar>>: "s" ~>
-      cases YM._Scalar (var "s")
-        Nothing [
-        YM._Scalar_bool>>: "b" ~> right $ Json.valueBoolean $ var "b",
-        YM._Scalar_decimal>>: "d" ~> right $ Json.valueNumber $ var "d",
-        YM._Scalar_float>>: "f" ~> right $ Json.valueNumber $ Literals.float64ToDecimal $ Literals.bigfloatToFloat64 $ var "f",
-        YM._Scalar_int>>: "i" ~> right $ Json.valueNumber $ Literals.bigintToDecimal $ var "i",
-        YM._Scalar_null>>: constant $ right Json.valueNull,
-        YM._Scalar_str>>: "str" ~> right $ Json.valueString $ var "str"],
-
-    YM._Node_sequence>>: "nodes" ~>
-      "results" <~ (Eithers.mapList ("n" ~> yamlToJson @@ var "n") (var "nodes")) $
-      Eithers.map ("vs" ~> Json.valueArray $ var "vs") (var "results")]
-
--- | Decode a YAML Node to a Hydra Term via JSON.
-fromYaml :: TTermDefinition (M.Map Name Type -> Name -> Type -> YM.Node -> Either String Term)
-fromYaml = define "fromYaml" $
-  doc "Decode a YAML node to a Hydra term via JSON decoding." $
-  "types" ~> "tname" ~> "typ" ~> "node" ~>
-  "jsonResult" <~ (yamlToJson @@ var "node") $
-  Eithers.either_
-    ("err" ~> left $ var "err")
-    ("json" ~> JsonDecode.fromJson @@ var "types" @@ var "tname" @@ var "typ" @@ var "json")
-    (var "jsonResult")
diff --git a/src/main/haskell/Hydra/Sources/Json/Yaml/Encode.hs b/src/main/haskell/Hydra/Sources/Json/Yaml/Encode.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Json/Yaml/Encode.hs
+++ /dev/null
@@ -1,143 +0,0 @@
-
-module Hydra.Sources.Json.Yaml.Encode where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Yaml.Model                       as Yaml
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Json.Model
-import qualified Hydra.Yaml.Model as YM
-import qualified Hydra.Sources.Json.Encode as JsonEncode
-import qualified Hydra.Sources.Yaml.Model as YamlModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.json.yaml.encode"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [JsonEncode.ns, YamlModel.ns],
-            moduleTypeDependencies = (YamlModel.ns : KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "JSON-to-YAML encoding. Converts JSON Values to YAML Nodes (always succeeds), and Hydra Terms to YAML Nodes via JSON."}
-  where
-    definitions = [
-      toDefinition jsonToYaml,
-      toDefinition toYaml]
-
--- | Convert a JSON Value to a YAML Node. This always succeeds since YAML is a superset of JSON.
-jsonToYaml :: TTermDefinition (Value -> YM.Node)
-jsonToYaml = define "jsonToYaml" $
-  doc "Convert a JSON value to a YAML node. Always succeeds since YAML is a superset of JSON." $
-  "value" ~>
-  cases _Value (var "value")
-    Nothing [
-    _Value_array>>: "arr" ~>
-      Yaml.nodeSequence $ Lists.map ("v" ~> jsonToYaml @@ var "v") (var "arr"),
-
-    _Value_boolean>>: "b" ~>
-      Yaml.nodeScalar $ Yaml.scalarBool $ var "b",
-
-    _Value_null>>: constant $
-      Yaml.nodeScalar Yaml.scalarNull,
-
-    _Value_number>>: "n" ~>
-      Yaml.nodeScalar $ Yaml.scalarDecimal $ var "n",
-
-    _Value_object>>: "obj" ~>
-      Yaml.nodeMapping $ Maps.fromList $
-        Lists.map
-          ("kv" ~> pair
-            (Yaml.nodeScalar $ Yaml.scalarStr $ Pairs.first $ var "kv")
-            (jsonToYaml @@ (Pairs.second $ var "kv")))
-          (Maps.toList $ var "obj"),
-
-    _Value_string>>: "s" ~>
-      Yaml.nodeScalar $ Yaml.scalarStr $ var "s"]
-
--- | Encode a Hydra Term to a YAML Node via JSON.
-toYaml :: TTermDefinition (M.Map Name Type -> Name -> Type -> Term -> Either String YM.Node)
-toYaml = define "toYaml" $
-  doc "Encode a Hydra term to a YAML node via JSON encoding." $
-  "types" ~> "tname" ~> "typ" ~> "term" ~>
-  Eithers.map ("v" ~> jsonToYaml @@ var "v") (JsonEncode.toJson @@ var "types" @@ var "tname" @@ var "typ" @@ var "term")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Lib/Names.hs b/src/main/haskell/Hydra/Sources/Kernel/Lib/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Lib/Names.hs
+++ /dev/null
@@ -1,667 +0,0 @@
--- | Namespaces and primitive names for the Hydra standard library
-
-module Hydra.Sources.Kernel.Lib.Names where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (qname)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-
-
-ns :: Namespace
-ns = Namespace "hydra.lib.names"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Namespaces and primitive names for the Hydra standard library"}
-  where
-    definitions = [
-      -- Namespace constants
-      toDefinition chars,
-      toDefinition eithers,
-      toDefinition equality,
-      toDefinition lists,
-      toDefinition literals,
-      toDefinition logic,
-      toDefinition maps,
-      toDefinition math,
-      toDefinition maybes,
-      toDefinition pairs,
-      toDefinition regex,
-      toDefinition sets,
-      toDefinition strings,
-      toDefinition typeclass,
-
-      -- chars primitives
-      toDefinition charsIsAlphaNum,
-      toDefinition charsIsLower,
-      toDefinition charsIsSpace,
-      toDefinition charsIsUpper,
-      toDefinition charsToLower,
-      toDefinition charsToUpper,
-
-      -- eithers primitives
-      toDefinition eithersBind,
-      toDefinition eithersBimap,
-      toDefinition eithersEither,
-      toDefinition eithersFoldl,
-      toDefinition eithersFromLeft,
-      toDefinition eithersFromRight,
-      toDefinition eithersIsLeft,
-      toDefinition eithersIsRight,
-      toDefinition eithersLefts,
-      toDefinition eithersMap,
-      toDefinition eithersMapList,
-      toDefinition eithersMapMaybe,
-      toDefinition eithersMapSet,
-      toDefinition eithersPartitionEithers,
-      toDefinition eithersRights,
-
-      -- equality primitives
-      toDefinition equalityCompare,
-      toDefinition equalityEqual,
-      toDefinition equalityGt,
-      toDefinition equalityGte,
-      toDefinition equalityIdentity,
-      toDefinition equalityLt,
-      toDefinition equalityLte,
-      toDefinition equalityMax,
-      toDefinition equalityMin,
-
-      -- lists primitives
-      toDefinition listsApply,
-      toDefinition listsBind,
-      toDefinition listsConcat,
-      toDefinition listsConcat2,
-      toDefinition listsCons,
-      toDefinition listsDrop,
-      toDefinition listsDropWhile,
-      toDefinition listsElem,
-      toDefinition listsFilter,
-      toDefinition listsFind,
-      toDefinition listsFoldl,
-      toDefinition listsFoldr,
-      toDefinition listsGroup,
-      toDefinition listsIntercalate,
-      toDefinition listsIntersperse,
-      toDefinition listsLength,
-      toDefinition listsMap,
-      toDefinition listsMaybeAt,
-      toDefinition listsMaybeHead,
-      toDefinition listsMaybeInit,
-      toDefinition listsMaybeLast,
-      toDefinition listsMaybeTail,
-      toDefinition listsNub,
-
-      toDefinition listsNull,
-      toDefinition listsPartition,
-      toDefinition listsPure,
-      toDefinition listsReplicate,
-      toDefinition listsReverse,
-      toDefinition listsSingleton,
-      toDefinition listsSort,
-      toDefinition listsSortOn,
-      toDefinition listsSpan,
-      toDefinition listsTake,
-      toDefinition listsTranspose,
-      toDefinition listsUncons,
-      toDefinition listsZip,
-      toDefinition listsZipWith,
-
-      -- literals primitives
-      toDefinition literalsBigfloatToBigint,
-      toDefinition literalsBigfloatToFloat32,
-      toDefinition literalsBigfloatToFloat64,
-      toDefinition literalsBigintToBigfloat,
-      toDefinition literalsBigintToDecimal,
-      toDefinition literalsBigintToInt8,
-      toDefinition literalsBigintToInt16,
-      toDefinition literalsBigintToInt32,
-      toDefinition literalsBigintToInt64,
-      toDefinition literalsBigintToUint8,
-      toDefinition literalsBigintToUint16,
-      toDefinition literalsBigintToUint32,
-      toDefinition literalsBigintToUint64,
-      toDefinition literalsBinaryToBytes,
-      toDefinition literalsBinaryToString,
-      toDefinition literalsDecimalToBigint,
-      toDefinition literalsDecimalToFloat32,
-      toDefinition literalsDecimalToFloat64,
-      toDefinition literalsFloat32ToBigfloat,
-      toDefinition literalsFloat32ToDecimal,
-      toDefinition literalsFloat64ToBigfloat,
-      toDefinition literalsFloat64ToDecimal,
-      toDefinition literalsInt8ToBigint,
-      toDefinition literalsInt16ToBigint,
-      toDefinition literalsInt32ToBigint,
-      toDefinition literalsInt64ToBigint,
-      toDefinition literalsReadBigfloat,
-      toDefinition literalsReadBigint,
-      toDefinition literalsReadBoolean,
-      toDefinition literalsReadDecimal,
-      toDefinition literalsReadFloat32,
-      toDefinition literalsReadFloat64,
-      toDefinition literalsReadInt8,
-      toDefinition literalsReadInt16,
-      toDefinition literalsReadInt32,
-      toDefinition literalsReadInt64,
-      toDefinition literalsReadString,
-      toDefinition literalsReadUint8,
-      toDefinition literalsReadUint16,
-      toDefinition literalsReadUint32,
-      toDefinition literalsReadUint64,
-      toDefinition literalsShowBigfloat,
-      toDefinition literalsShowBigint,
-      toDefinition literalsShowBoolean,
-      toDefinition literalsShowDecimal,
-      toDefinition literalsShowFloat32,
-      toDefinition literalsShowFloat64,
-      toDefinition literalsShowInt8,
-      toDefinition literalsShowInt16,
-      toDefinition literalsShowInt32,
-      toDefinition literalsShowInt64,
-      toDefinition literalsShowUint8,
-      toDefinition literalsShowUint16,
-      toDefinition literalsShowUint32,
-      toDefinition literalsShowUint64,
-      toDefinition literalsShowString,
-      toDefinition literalsStringToBinary,
-      toDefinition literalsUint8ToBigint,
-      toDefinition literalsUint16ToBigint,
-      toDefinition literalsUint32ToBigint,
-      toDefinition literalsUint64ToBigint,
-
-      -- logic primitives
-      toDefinition logicAnd,
-      toDefinition logicIfElse,
-      toDefinition logicNot,
-      toDefinition logicOr,
-
-      -- maps primitives
-      toDefinition mapsAlter,
-      toDefinition mapsBimap,
-      toDefinition mapsDelete,
-      toDefinition mapsElems,
-      toDefinition mapsEmpty,
-      toDefinition mapsFilter,
-      toDefinition mapsFilterWithKey,
-      toDefinition mapsFindWithDefault,
-      toDefinition mapsFromList,
-      toDefinition mapsInsert,
-      toDefinition mapsKeys,
-      toDefinition mapsLookup,
-      toDefinition mapsMap,
-      toDefinition mapsMapKeys,
-      toDefinition mapsMember,
-      toDefinition mapsNull,
-      toDefinition mapsSingleton,
-      toDefinition mapsSize,
-      toDefinition mapsToList,
-      toDefinition mapsUnion,
-
-      -- math primitives
-      toDefinition mathAbs,
-      toDefinition mathAcos,
-      toDefinition mathAcosh,
-      toDefinition mathAdd,
-      toDefinition mathAddFloat64,
-      toDefinition mathAsin,
-      toDefinition mathAsinh,
-      toDefinition mathAtan,
-      toDefinition mathAtan2,
-      toDefinition mathAtanh,
-      toDefinition mathCeiling,
-      toDefinition mathCos,
-      toDefinition mathCosh,
-      toDefinition mathE,
-      toDefinition mathEven,
-      toDefinition mathExp,
-      toDefinition mathFloor,
-      toDefinition mathLog,
-      toDefinition mathLogBase,
-      toDefinition mathMax,
-      toDefinition mathMaybeDiv,
-      toDefinition mathMaybeMod,
-      toDefinition mathMaybePred,
-      toDefinition mathMaybeRem,
-      toDefinition mathMaybeSucc,
-      toDefinition mathMin,
-      toDefinition mathMul,
-      toDefinition mathMulFloat64,
-      toDefinition mathNegate,
-      toDefinition mathNegateFloat64,
-      toDefinition mathOdd,
-      toDefinition mathPi,
-      toDefinition mathPow,
-      toDefinition mathRange,
-      toDefinition mathRound,
-      toDefinition mathRoundBigfloat,
-      toDefinition mathRoundFloat32,
-      toDefinition mathRoundFloat64,
-      toDefinition mathSignum,
-      toDefinition mathSin,
-      toDefinition mathSinh,
-      toDefinition mathSqrt,
-      toDefinition mathSub,
-      toDefinition mathSubFloat64,
-      toDefinition mathTan,
-      toDefinition mathTanh,
-      toDefinition mathTruncate,
-
-      -- maybes primitives
-      toDefinition maybesApply,
-      toDefinition maybesBind,
-      toDefinition maybesCases,
-      toDefinition maybesCat,
-      toDefinition maybesCompose,
-      toDefinition maybesFromMaybe,
-      toDefinition maybesIsJust,
-      toDefinition maybesIsNothing,
-      toDefinition maybesMap,
-      toDefinition maybesMapMaybe,
-      toDefinition maybesMaybe,
-      toDefinition maybesPure,
-      toDefinition maybesToList,
-
-      -- pairs primitives
-      toDefinition pairsBimap,
-      toDefinition pairsFirst,
-      toDefinition pairsSecond,
-
-      -- sets primitives
-      toDefinition setsDelete,
-      toDefinition setsDifference,
-      toDefinition setsEmpty,
-      toDefinition setsFromList,
-      toDefinition setsInsert,
-      toDefinition setsIntersection,
-      toDefinition setsMap,
-      toDefinition setsMember,
-      toDefinition setsNull,
-      toDefinition setsSingleton,
-      toDefinition setsSize,
-      toDefinition setsToList,
-      toDefinition setsUnion,
-      toDefinition setsUnions,
-
-      -- regex primitives
-      toDefinition regexFind,
-      toDefinition regexFindAll,
-      toDefinition regexMatches,
-      toDefinition regexReplace,
-      toDefinition regexReplaceAll,
-      toDefinition regexSplit,
-
-      -- strings primitives
-      toDefinition stringsCat,
-      toDefinition stringsCat2,
-      toDefinition stringsFromList,
-      toDefinition stringsIntercalate,
-      toDefinition stringsNull,
-      toDefinition stringsLength,
-      toDefinition stringsLines,
-      toDefinition stringsMaybeCharAt,
-      toDefinition stringsSplitOn,
-      toDefinition stringsToList,
-      toDefinition stringsToLower,
-      toDefinition stringsToUpper,
-      toDefinition stringsUnlines,
-
-      -- typeclass names
-      toDefinition typeclassEq,
-      toDefinition typeclassOrd]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Helper: define a namespace constant
-defineNs :: String -> String -> TTermDefinition Namespace
-defineNs name nsStr = define name $
-  wrap _Namespace $ string nsStr
-
--- | Helper: define a primitive name constant as a simple Name data constructor
-defineName :: String -> String -> String -> TTermDefinition Name
-defineName name nsStr localName = define name $
-  wrap _Name $ string (nsStr <> "." <> localName)
-
--- Namespace constants
-
-chars :: TTermDefinition Namespace
-chars = defineNs "chars" "hydra.lib.chars"
-
-eithers :: TTermDefinition Namespace
-eithers = defineNs "eithers" "hydra.lib.eithers"
-
-equality :: TTermDefinition Namespace
-equality = defineNs "equality" "hydra.lib.equality"
-
-lists :: TTermDefinition Namespace
-lists = defineNs "lists" "hydra.lib.lists"
-
-literals :: TTermDefinition Namespace
-literals = defineNs "literals" "hydra.lib.literals"
-
-logic :: TTermDefinition Namespace
-logic = defineNs "logic" "hydra.lib.logic"
-
-maps :: TTermDefinition Namespace
-maps = defineNs "maps" "hydra.lib.maps"
-
-math :: TTermDefinition Namespace
-math = defineNs "math" "hydra.lib.math"
-
-maybes :: TTermDefinition Namespace
-maybes = defineNs "maybes" "hydra.lib.maybes"
-
-pairs :: TTermDefinition Namespace
-pairs = defineNs "pairs" "hydra.lib.pairs"
-
-regex :: TTermDefinition Namespace
-regex = defineNs "regex" "hydra.lib.regex"
-
-sets :: TTermDefinition Namespace
-sets = defineNs "sets" "hydra.lib.sets"
-
-strings :: TTermDefinition Namespace
-strings = defineNs "strings" "hydra.lib.strings"
-
-typeclass :: TTermDefinition Namespace
-typeclass = defineNs "typeclass" "hydra.typeclass"
-
--- Chars primitives
-
-charsIsAlphaNum = defineName "charsIsAlphaNum" "hydra.lib.chars" "isAlphaNum"
-charsIsLower    = defineName "charsIsLower" "hydra.lib.chars" "isLower"
-charsIsSpace    = defineName "charsIsSpace" "hydra.lib.chars" "isSpace"
-charsIsUpper    = defineName "charsIsUpper" "hydra.lib.chars" "isUpper"
-charsToLower    = defineName "charsToLower" "hydra.lib.chars" "toLower"
-charsToUpper    = defineName "charsToUpper" "hydra.lib.chars" "toUpper"
-
--- Eithers primitives
-
-eithersBind             = defineName "eithersBind" "hydra.lib.eithers" "bind"
-eithersBimap            = defineName "eithersBimap" "hydra.lib.eithers" "bimap"
-eithersEither           = defineName "eithersEither" "hydra.lib.eithers" "either"
-eithersFoldl            = defineName "eithersFoldl" "hydra.lib.eithers" "foldl"
-eithersFromLeft         = defineName "eithersFromLeft" "hydra.lib.eithers" "fromLeft"
-eithersFromRight        = defineName "eithersFromRight" "hydra.lib.eithers" "fromRight"
-eithersIsLeft           = defineName "eithersIsLeft" "hydra.lib.eithers" "isLeft"
-eithersIsRight          = defineName "eithersIsRight" "hydra.lib.eithers" "isRight"
-eithersLefts            = defineName "eithersLefts" "hydra.lib.eithers" "lefts"
-eithersMap              = defineName "eithersMap" "hydra.lib.eithers" "map"
-eithersMapList          = defineName "eithersMapList" "hydra.lib.eithers" "mapList"
-eithersMapMaybe         = defineName "eithersMapMaybe" "hydra.lib.eithers" "mapMaybe"
-eithersMapSet           = defineName "eithersMapSet" "hydra.lib.eithers" "mapSet"
-eithersPartitionEithers = defineName "eithersPartitionEithers" "hydra.lib.eithers" "partitionEithers"
-eithersRights           = defineName "eithersRights" "hydra.lib.eithers" "rights"
-
--- Equality primitives
-
-equalityCompare  = defineName "equalityCompare" "hydra.lib.equality" "compare"
-equalityEqual    = defineName "equalityEqual" "hydra.lib.equality" "equal"
-equalityGt       = defineName "equalityGt" "hydra.lib.equality" "gt"
-equalityGte      = defineName "equalityGte" "hydra.lib.equality" "gte"
-equalityIdentity = defineName "equalityIdentity" "hydra.lib.equality" "identity"
-equalityLt       = defineName "equalityLt" "hydra.lib.equality" "lt"
-equalityLte      = defineName "equalityLte" "hydra.lib.equality" "lte"
-equalityMax      = defineName "equalityMax" "hydra.lib.equality" "max"
-equalityMin      = defineName "equalityMin" "hydra.lib.equality" "min"
-
--- Lists primitives
-
-listsApply       = defineName "listsApply" "hydra.lib.lists" "apply"
-listsBind        = defineName "listsBind" "hydra.lib.lists" "bind"
-listsConcat      = defineName "listsConcat" "hydra.lib.lists" "concat"
-listsConcat2     = defineName "listsConcat2" "hydra.lib.lists" "concat2"
-listsCons        = defineName "listsCons" "hydra.lib.lists" "cons"
-listsDrop        = defineName "listsDrop" "hydra.lib.lists" "drop"
-listsDropWhile   = defineName "listsDropWhile" "hydra.lib.lists" "dropWhile"
-listsElem        = defineName "listsElem" "hydra.lib.lists" "elem"
-listsFilter      = defineName "listsFilter" "hydra.lib.lists" "filter"
-listsFind        = defineName "listsFind" "hydra.lib.lists" "find"
-listsFoldl       = defineName "listsFoldl" "hydra.lib.lists" "foldl"
-listsFoldr       = defineName "listsFoldr" "hydra.lib.lists" "foldr"
-listsGroup       = defineName "listsGroup" "hydra.lib.lists" "group"
-listsIntercalate = defineName "listsIntercalate" "hydra.lib.lists" "intercalate"
-listsIntersperse = defineName "listsIntersperse" "hydra.lib.lists" "intersperse"
-listsLength      = defineName "listsLength" "hydra.lib.lists" "length"
-listsMap         = defineName "listsMap" "hydra.lib.lists" "map"
-listsMaybeAt     = defineName "listsMaybeAt" "hydra.lib.lists" "maybeAt"
-listsMaybeHead   = defineName "listsMaybeHead" "hydra.lib.lists" "maybeHead"
-listsMaybeInit   = defineName "listsMaybeInit" "hydra.lib.lists" "maybeInit"
-listsMaybeLast   = defineName "listsMaybeLast" "hydra.lib.lists" "maybeLast"
-listsMaybeTail   = defineName "listsMaybeTail" "hydra.lib.lists" "maybeTail"
-listsNub         = defineName "listsNub" "hydra.lib.lists" "nub"
-listsNull        = defineName "listsNull" "hydra.lib.lists" "null"
-listsPartition   = defineName "listsPartition" "hydra.lib.lists" "partition"
-listsPure        = defineName "listsPure" "hydra.lib.lists" "pure"
-listsReplicate   = defineName "listsReplicate" "hydra.lib.lists" "replicate"
-listsReverse     = defineName "listsReverse" "hydra.lib.lists" "reverse"
-listsSingleton   = defineName "listsSingleton" "hydra.lib.lists" "singleton"
-listsSort        = defineName "listsSort" "hydra.lib.lists" "sort"
-listsSortOn      = defineName "listsSortOn" "hydra.lib.lists" "sortOn"
-listsSpan        = defineName "listsSpan" "hydra.lib.lists" "span"
-listsTake        = defineName "listsTake" "hydra.lib.lists" "take"
-listsTranspose   = defineName "listsTranspose" "hydra.lib.lists" "transpose"
-listsUncons      = defineName "listsUncons" "hydra.lib.lists" "uncons"
-listsZip         = defineName "listsZip" "hydra.lib.lists" "zip"
-listsZipWith     = defineName "listsZipWith" "hydra.lib.lists" "zipWith"
-
--- Literals primitives
-
-literalsBigfloatToBigint  = defineName "literalsBigfloatToBigint" "hydra.lib.literals" "bigfloatToBigint"
-literalsBigfloatToFloat32 = defineName "literalsBigfloatToFloat32" "hydra.lib.literals" "bigfloatToFloat32"
-literalsBigfloatToFloat64 = defineName "literalsBigfloatToFloat64" "hydra.lib.literals" "bigfloatToFloat64"
-literalsBigintToBigfloat  = defineName "literalsBigintToBigfloat" "hydra.lib.literals" "bigintToBigfloat"
-literalsBigintToDecimal   = defineName "literalsBigintToDecimal" "hydra.lib.literals" "bigintToDecimal"
-literalsBigintToInt8      = defineName "literalsBigintToInt8" "hydra.lib.literals" "bigintToInt8"
-literalsBigintToInt16     = defineName "literalsBigintToInt16" "hydra.lib.literals" "bigintToInt16"
-literalsBigintToInt32     = defineName "literalsBigintToInt32" "hydra.lib.literals" "bigintToInt32"
-literalsBigintToInt64     = defineName "literalsBigintToInt64" "hydra.lib.literals" "bigintToInt64"
-literalsBigintToUint8     = defineName "literalsBigintToUint8" "hydra.lib.literals" "bigintToUint8"
-literalsBigintToUint16    = defineName "literalsBigintToUint16" "hydra.lib.literals" "bigintToUint16"
-literalsBigintToUint32    = defineName "literalsBigintToUint32" "hydra.lib.literals" "bigintToUint32"
-literalsBigintToUint64    = defineName "literalsBigintToUint64" "hydra.lib.literals" "bigintToUint64"
-literalsBinaryToBytes     = defineName "literalsBinaryToBytes" "hydra.lib.literals" "binaryToBytes"
-literalsBinaryToString    = defineName "literalsBinaryToString" "hydra.lib.literals" "binaryToString"
-literalsDecimalToBigint   = defineName "literalsDecimalToBigint" "hydra.lib.literals" "decimalToBigint"
-literalsDecimalToFloat32  = defineName "literalsDecimalToFloat32" "hydra.lib.literals" "decimalToFloat32"
-literalsDecimalToFloat64  = defineName "literalsDecimalToFloat64" "hydra.lib.literals" "decimalToFloat64"
-literalsFloat32ToBigfloat = defineName "literalsFloat32ToBigfloat" "hydra.lib.literals" "float32ToBigfloat"
-literalsFloat32ToDecimal  = defineName "literalsFloat32ToDecimal" "hydra.lib.literals" "float32ToDecimal"
-literalsFloat64ToBigfloat = defineName "literalsFloat64ToBigfloat" "hydra.lib.literals" "float64ToBigfloat"
-literalsFloat64ToDecimal  = defineName "literalsFloat64ToDecimal" "hydra.lib.literals" "float64ToDecimal"
-literalsInt8ToBigint      = defineName "literalsInt8ToBigint" "hydra.lib.literals" "int8ToBigint"
-literalsInt16ToBigint     = defineName "literalsInt16ToBigint" "hydra.lib.literals" "int16ToBigint"
-literalsInt32ToBigint     = defineName "literalsInt32ToBigint" "hydra.lib.literals" "int32ToBigint"
-literalsInt64ToBigint     = defineName "literalsInt64ToBigint" "hydra.lib.literals" "int64ToBigint"
-literalsReadBigfloat      = defineName "literalsReadBigfloat" "hydra.lib.literals" "readBigfloat"
-literalsReadBigint        = defineName "literalsReadBigint" "hydra.lib.literals" "readBigint"
-literalsReadBoolean       = defineName "literalsReadBoolean" "hydra.lib.literals" "readBoolean"
-literalsReadDecimal       = defineName "literalsReadDecimal" "hydra.lib.literals" "readDecimal"
-literalsReadFloat32       = defineName "literalsReadFloat32" "hydra.lib.literals" "readFloat32"
-literalsReadFloat64       = defineName "literalsReadFloat64" "hydra.lib.literals" "readFloat64"
-literalsReadInt8          = defineName "literalsReadInt8" "hydra.lib.literals" "readInt8"
-literalsReadInt16         = defineName "literalsReadInt16" "hydra.lib.literals" "readInt16"
-literalsReadInt32         = defineName "literalsReadInt32" "hydra.lib.literals" "readInt32"
-literalsReadInt64         = defineName "literalsReadInt64" "hydra.lib.literals" "readInt64"
-literalsReadString        = defineName "literalsReadString" "hydra.lib.literals" "readString"
-literalsReadUint8         = defineName "literalsReadUint8" "hydra.lib.literals" "readUint8"
-literalsReadUint16        = defineName "literalsReadUint16" "hydra.lib.literals" "readUint16"
-literalsReadUint32        = defineName "literalsReadUint32" "hydra.lib.literals" "readUint32"
-literalsReadUint64        = defineName "literalsReadUint64" "hydra.lib.literals" "readUint64"
-literalsShowBigfloat      = defineName "literalsShowBigfloat" "hydra.lib.literals" "showBigfloat"
-literalsShowBigint        = defineName "literalsShowBigint" "hydra.lib.literals" "showBigint"
-literalsShowBoolean       = defineName "literalsShowBoolean" "hydra.lib.literals" "showBoolean"
-literalsShowDecimal       = defineName "literalsShowDecimal" "hydra.lib.literals" "showDecimal"
-literalsShowFloat32       = defineName "literalsShowFloat32" "hydra.lib.literals" "showFloat32"
-literalsShowFloat64       = defineName "literalsShowFloat64" "hydra.lib.literals" "showFloat64"
-literalsShowInt8          = defineName "literalsShowInt8" "hydra.lib.literals" "showInt8"
-literalsShowInt16         = defineName "literalsShowInt16" "hydra.lib.literals" "showInt16"
-literalsShowInt32         = defineName "literalsShowInt32" "hydra.lib.literals" "showInt32"
-literalsShowInt64         = defineName "literalsShowInt64" "hydra.lib.literals" "showInt64"
-literalsShowUint8         = defineName "literalsShowUint8" "hydra.lib.literals" "showUint8"
-literalsShowUint16        = defineName "literalsShowUint16" "hydra.lib.literals" "showUint16"
-literalsShowUint32        = defineName "literalsShowUint32" "hydra.lib.literals" "showUint32"
-literalsShowUint64        = defineName "literalsShowUint64" "hydra.lib.literals" "showUint64"
-literalsShowString        = defineName "literalsShowString" "hydra.lib.literals" "showString"
-literalsStringToBinary    = defineName "literalsStringToBinary" "hydra.lib.literals" "stringToBinary"
-literalsUint8ToBigint     = defineName "literalsUint8ToBigint" "hydra.lib.literals" "uint8ToBigint"
-literalsUint16ToBigint    = defineName "literalsUint16ToBigint" "hydra.lib.literals" "uint16ToBigint"
-literalsUint32ToBigint    = defineName "literalsUint32ToBigint" "hydra.lib.literals" "uint32ToBigint"
-literalsUint64ToBigint    = defineName "literalsUint64ToBigint" "hydra.lib.literals" "uint64ToBigint"
-
--- Logic primitives
-
-logicAnd    = defineName "logicAnd" "hydra.lib.logic" "and"
-logicIfElse = defineName "logicIfElse" "hydra.lib.logic" "ifElse"
-logicNot    = defineName "logicNot" "hydra.lib.logic" "not"
-logicOr     = defineName "logicOr" "hydra.lib.logic" "or"
-
--- Maps primitives
-
-mapsAlter           = defineName "mapsAlter" "hydra.lib.maps" "alter"
-mapsBimap           = defineName "mapsBimap" "hydra.lib.maps" "bimap"
-mapsDelete          = defineName "mapsDelete" "hydra.lib.maps" "delete"
-mapsElems           = defineName "mapsElems" "hydra.lib.maps" "elems"
-mapsEmpty           = defineName "mapsEmpty" "hydra.lib.maps" "empty"
-mapsFilter          = defineName "mapsFilter" "hydra.lib.maps" "filter"
-mapsFilterWithKey   = defineName "mapsFilterWithKey" "hydra.lib.maps" "filterWithKey"
-mapsFindWithDefault = defineName "mapsFindWithDefault" "hydra.lib.maps" "findWithDefault"
-mapsFromList        = defineName "mapsFromList" "hydra.lib.maps" "fromList"
-mapsInsert          = defineName "mapsInsert" "hydra.lib.maps" "insert"
-mapsKeys            = defineName "mapsKeys" "hydra.lib.maps" "keys"
-mapsLookup          = defineName "mapsLookup" "hydra.lib.maps" "lookup"
-mapsMap             = defineName "mapsMap" "hydra.lib.maps" "map"
-mapsMapKeys         = defineName "mapsMapKeys" "hydra.lib.maps" "mapKeys"
-mapsMember          = defineName "mapsMember" "hydra.lib.maps" "member"
-mapsNull            = defineName "mapsNull" "hydra.lib.maps" "null"
-mapsSingleton       = defineName "mapsSingleton" "hydra.lib.maps" "singleton"
-mapsSize            = defineName "mapsSize" "hydra.lib.maps" "size"
-mapsToList          = defineName "mapsToList" "hydra.lib.maps" "toList"
-mapsUnion           = defineName "mapsUnion" "hydra.lib.maps" "union"
-
--- Math primitives
-
-mathAbs      = defineName "mathAbs" "hydra.lib.math" "abs"
-mathAcos     = defineName "mathAcos" "hydra.lib.math" "acos"
-mathAcosh    = defineName "mathAcosh" "hydra.lib.math" "acosh"
-mathAdd      = defineName "mathAdd" "hydra.lib.math" "add"
-mathAddFloat64 = defineName "mathAddFloat64" "hydra.lib.math" "addFloat64"
-mathAsin     = defineName "mathAsin" "hydra.lib.math" "asin"
-mathAsinh    = defineName "mathAsinh" "hydra.lib.math" "asinh"
-mathAtan     = defineName "mathAtan" "hydra.lib.math" "atan"
-mathAtan2    = defineName "mathAtan2" "hydra.lib.math" "atan2"
-mathAtanh    = defineName "mathAtanh" "hydra.lib.math" "atanh"
-mathCeiling  = defineName "mathCeiling" "hydra.lib.math" "ceiling"
-mathCos      = defineName "mathCos" "hydra.lib.math" "cos"
-mathCosh     = defineName "mathCosh" "hydra.lib.math" "cosh"
-mathE        = defineName "mathE" "hydra.lib.math" "e"
-mathEven     = defineName "mathEven" "hydra.lib.math" "even"
-mathExp      = defineName "mathExp" "hydra.lib.math" "exp"
-mathFloor    = defineName "mathFloor" "hydra.lib.math" "floor"
-mathLog      = defineName "mathLog" "hydra.lib.math" "log"
-mathLogBase  = defineName "mathLogBase" "hydra.lib.math" "logBase"
-mathMax      = defineName "mathMax" "hydra.lib.math" "max"
-mathMaybeDiv = defineName "mathMaybeDiv" "hydra.lib.math" "maybeDiv"
-mathMin      = defineName "mathMin" "hydra.lib.math" "min"
-mathMaybeMod = defineName "mathMaybeMod" "hydra.lib.math" "maybeMod"
-mathMul      = defineName "mathMul" "hydra.lib.math" "mul"
-mathMulFloat64 = defineName "mathMulFloat64" "hydra.lib.math" "mulFloat64"
-mathNegate   = defineName "mathNegate" "hydra.lib.math" "negate"
-mathNegateFloat64 = defineName "mathNegateFloat64" "hydra.lib.math" "negateFloat64"
-mathOdd      = defineName "mathOdd" "hydra.lib.math" "odd"
-mathPi       = defineName "mathPi" "hydra.lib.math" "pi"
-mathPow      = defineName "mathPow" "hydra.lib.math" "pow"
-mathMaybePred = defineName "mathMaybePred" "hydra.lib.math" "maybePred"
-mathRange    = defineName "mathRange" "hydra.lib.math" "range"
-mathMaybeRem = defineName "mathMaybeRem" "hydra.lib.math" "maybeRem"
-mathRound        = defineName "mathRound" "hydra.lib.math" "round"
-mathRoundBigfloat = defineName "mathRoundBigfloat" "hydra.lib.math" "roundBigfloat"
-mathRoundFloat32 = defineName "mathRoundFloat32" "hydra.lib.math" "roundFloat32"
-mathRoundFloat64 = defineName "mathRoundFloat64" "hydra.lib.math" "roundFloat64"
-mathSignum       = defineName "mathSignum" "hydra.lib.math" "signum"
-mathSin      = defineName "mathSin" "hydra.lib.math" "sin"
-mathSinh     = defineName "mathSinh" "hydra.lib.math" "sinh"
-mathSqrt     = defineName "mathSqrt" "hydra.lib.math" "sqrt"
-mathSub      = defineName "mathSub" "hydra.lib.math" "sub"
-mathSubFloat64 = defineName "mathSubFloat64" "hydra.lib.math" "subFloat64"
-mathMaybeSucc = defineName "mathMaybeSucc" "hydra.lib.math" "maybeSucc"
-mathTan      = defineName "mathTan" "hydra.lib.math" "tan"
-mathTanh     = defineName "mathTanh" "hydra.lib.math" "tanh"
-mathTruncate = defineName "mathTruncate" "hydra.lib.math" "truncate"
-
--- Maybes primitives
-
-maybesApply     = defineName "maybesApply" "hydra.lib.maybes" "apply"
-maybesBind      = defineName "maybesBind" "hydra.lib.maybes" "bind"
-maybesCases     = defineName "maybesCases" "hydra.lib.maybes" "cases"
-maybesCat       = defineName "maybesCat" "hydra.lib.maybes" "cat"
-maybesCompose   = defineName "maybesCompose" "hydra.lib.maybes" "compose"
-maybesFromMaybe = defineName "maybesFromMaybe" "hydra.lib.maybes" "fromMaybe"
-maybesIsJust    = defineName "maybesIsJust" "hydra.lib.maybes" "isJust"
-maybesIsNothing = defineName "maybesIsNothing" "hydra.lib.maybes" "isNothing"
-maybesMap       = defineName "maybesMap" "hydra.lib.maybes" "map"
-maybesMapMaybe  = defineName "maybesMapMaybe" "hydra.lib.maybes" "mapMaybe"
-maybesMaybe     = defineName "maybesMaybe" "hydra.lib.maybes" "maybe"
-maybesPure      = defineName "maybesPure" "hydra.lib.maybes" "pure"
-maybesToList    = defineName "maybesToList" "hydra.lib.maybes" "toList"
-
--- Pairs primitives
-
-pairsBimap  = defineName "pairsBimap" "hydra.lib.pairs" "bimap"
-pairsFirst  = defineName "pairsFirst" "hydra.lib.pairs" "first"
-pairsSecond = defineName "pairsSecond" "hydra.lib.pairs" "second"
-
--- Sets primitives
-
-setsDelete       = defineName "setsDelete" "hydra.lib.sets" "delete"
-setsDifference   = defineName "setsDifference" "hydra.lib.sets" "difference"
-setsEmpty        = defineName "setsEmpty" "hydra.lib.sets" "empty"
-setsFromList     = defineName "setsFromList" "hydra.lib.sets" "fromList"
-setsInsert       = defineName "setsInsert" "hydra.lib.sets" "insert"
-setsIntersection = defineName "setsIntersection" "hydra.lib.sets" "intersection"
-setsMap          = defineName "setsMap" "hydra.lib.sets" "map"
-setsMember       = defineName "setsMember" "hydra.lib.sets" "member"
-setsNull         = defineName "setsNull" "hydra.lib.sets" "null"
-setsSingleton    = defineName "setsSingleton" "hydra.lib.sets" "singleton"
-setsSize         = defineName "setsSize" "hydra.lib.sets" "size"
-setsToList       = defineName "setsToList" "hydra.lib.sets" "toList"
-setsUnion        = defineName "setsUnion" "hydra.lib.sets" "union"
-setsUnions       = defineName "setsUnions" "hydra.lib.sets" "unions"
-
--- Regex primitives
-
-regexFind       = defineName "regexFind" "hydra.lib.regex" "find"
-regexFindAll    = defineName "regexFindAll" "hydra.lib.regex" "findAll"
-regexMatches    = defineName "regexMatches" "hydra.lib.regex" "matches"
-regexReplace    = defineName "regexReplace" "hydra.lib.regex" "replace"
-regexReplaceAll = defineName "regexReplaceAll" "hydra.lib.regex" "replaceAll"
-regexSplit      = defineName "regexSplit" "hydra.lib.regex" "split"
-
--- Strings primitives
-
-stringsCat         = defineName "stringsCat" "hydra.lib.strings" "cat"
-stringsCat2        = defineName "stringsCat2" "hydra.lib.strings" "cat2"
-stringsFromList    = defineName "stringsFromList" "hydra.lib.strings" "fromList"
-stringsIntercalate = defineName "stringsIntercalate" "hydra.lib.strings" "intercalate"
-stringsNull        = defineName "stringsNull" "hydra.lib.strings" "null"
-stringsLength      = defineName "stringsLength" "hydra.lib.strings" "length"
-stringsLines       = defineName "stringsLines" "hydra.lib.strings" "lines"
-stringsMaybeCharAt = defineName "stringsMaybeCharAt" "hydra.lib.strings" "maybeCharAt"
-stringsSplitOn     = defineName "stringsSplitOn" "hydra.lib.strings" "splitOn"
-stringsToList      = defineName "stringsToList" "hydra.lib.strings" "toList"
-stringsToLower     = defineName "stringsToLower" "hydra.lib.strings" "toLower"
-stringsToUpper     = defineName "stringsToUpper" "hydra.lib.strings" "toUpper"
-stringsUnlines     = defineName "stringsUnlines" "hydra.lib.strings" "unlines"
-
--- Type class names
-
-typeclassEq  = defineName "typeclassEq" "hydra.typeclass" "Eq"
-typeclassOrd = defineName "typeclassOrd" "hydra.typeclass" "Ord"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Manifest.hs b/src/main/haskell/Hydra/Sources/Kernel/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Manifest.hs
+++ /dev/null
@@ -1,64 +0,0 @@
--- | Package manifest for hydra-kernel.
---
--- Each Hydra package exposes its module set through a Manifest module so that
--- the sync system and execs can consume a uniform interface instead of
--- hardcoding per-package module lists. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
---
--- The kernel additionally exposes two sublists of mainModules:
---
---   * jsonModules — the JSON runtime modules (hydra.json.*)
---   * otherModules — yaml support, test transform helpers, json/yaml bridges
---
--- These sublists exist because existing execs consume them separately; future
--- cleanup may fold them into mainModules-as-a-whole.
-
-module Hydra.Sources.Kernel.Manifest (
-  mainModules,
-  testModules,
-  jsonModules,
-  otherModules,
-) where
-
-import Hydra.Kernel
-import Hydra.Sources.Kernel.Types.All (kernelTypesModules)
-import Hydra.Sources.Kernel.Terms.All (kernelTermsModules)
-
-import qualified Hydra.Sources.Json.Bootstrap as JsonBootstrap
-import qualified Hydra.Sources.Json.Decode as JsonDecode
-import qualified Hydra.Sources.Json.Decoding as JsonDecoding
-import qualified Hydra.Sources.Json.Encode as JsonEncode
-import qualified Hydra.Sources.Json.Extract as JsonExtract
-import qualified Hydra.Sources.Json.Parser as JsonParser
-import qualified Hydra.Sources.Json.Writer as JsonWriter
-import qualified Hydra.Sources.Json.Yaml.Decode as JsonYamlDecode
-import qualified Hydra.Sources.Json.Yaml.Encode as JsonYamlEncode
-import qualified Hydra.Sources.Test.Transform as TestTransform
-import qualified Hydra.Sources.Test.Utils as TestUtils
-import qualified Hydra.Sources.Yaml.Model as YamlModel
-
-import qualified Hydra.Sources.Test.All as Test
-
-jsonModules :: [Module]
-jsonModules = [
-  JsonBootstrap.module_,
-  JsonDecode.module_,
-  JsonDecoding.module_,
-  JsonEncode.module_,
-  JsonExtract.module_,
-  JsonParser.module_,
-  JsonWriter.module_]
-
-otherModules :: [Module]
-otherModules = [
-  TestTransform.module_,
-  TestUtils.module_,
-  YamlModel.module_,
-  JsonYamlDecode.module_,
-  JsonYamlEncode.module_]
-
-mainModules :: [Module]
-mainModules = kernelTypesModules ++ kernelTermsModules ++ jsonModules ++ otherModules
-
-testModules :: [Module]
-testModules = Test.testModules
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Adapt.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Adapt.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Adapt.hs
+++ /dev/null
@@ -1,967 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Adapt where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  adaptFloatType, adaptDataGraph, adaptGraphSchema, adaptIntegerType, adaptLambdaDomains, adaptLiteral,
-  adaptLiteralType, adaptLiteralTypesMap, adaptLiteralValue, adaptNestedTypes, adaptPrimitive,
-  adaptTerm, adaptTermForLanguage, adaptType, adaptTypeForLanguage, adaptTypeScheme,
-  composeCoders, dataGraphToDefinitions, literalTypeSupported,
-  prepareFloatType, prepareIntegerType, prepareLiteralType, prepareType, prepareSame,
-  pushTypeAppsInward, schemaGraphToDefinitions,
-  simpleLanguageAdapter, termAlternatives, typeAlternatives)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Hoisting    as Hoisting
-import qualified Hydra.Sources.Kernel.Terms.Inference   as Inference
-import qualified Hydra.Sources.Kernel.Terms.Literals    as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names       as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction   as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect     as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-
-import qualified Hydra.Sources.Kernel.Terms.Dependencies as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Rewriting   as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Environment  as Environment
-import qualified Hydra.Sources.Kernel.Terms.Resolution   as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Scoping     as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Strip       as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables   as Variables
-import qualified Hydra.Sources.Kernel.Terms.Show.Core   as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph  as ShowGraph
-
-
-ns :: Namespace
-ns = Namespace "hydra.adapt"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Dependencies.ns, Hoisting.ns, Inference.ns, Lexical.ns, Literals.ns, Names.ns, Reduction.ns, Reflect.ns, Rewriting.ns,
-      Scoping.ns, Environment.ns, Resolution.ns, ShowCore.ns, ShowError.ns, ShowGraph.ns, Strip.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Simple, one-way adapters for types and terms"}
-  where
-    definitions = [
-      toDefinition adaptFloatType,
-      toDefinition adaptDataGraph,
-      toDefinition adaptGraphSchema,
-      toDefinition adaptIntegerType,
-      toDefinition adaptLambdaDomains,
-      toDefinition adaptLiteral,
-      toDefinition adaptLiteralType,
-      toDefinition adaptLiteralTypesMap,
-      toDefinition adaptLiteralValue,
-      toDefinition adaptNestedTypes,
-      toDefinition adaptPrimitive,
-      toDefinition adaptTerm,
-      toDefinition adaptTermForLanguage,
-      toDefinition adaptType,
-      toDefinition adaptTypeForLanguage,
-      toDefinition adaptTypeScheme,
-      toDefinition composeCoders,
-      toDefinition dataGraphToDefinitions,
-      toDefinition literalTypeSupported,
-      -- TODO: the prepare* functions below duplicate logic already in adaptFloatType, adaptIntegerType,
-      -- adaptLiteralType, etc. They should be simplified or eliminated in favor of those functions.
-      -- They were moved here from hydra.scala.prepare as part of the coder standardization effort.
-      toDefinition prepareFloatType,
-      toDefinition prepareIntegerType,
-      toDefinition prepareLiteralType,
-      toDefinition prepareType,
-      toDefinition prepareSame,
-      toDefinition pushTypeAppsInward,
-      toDefinition schemaGraphToDefinitions,
-      toDefinition simpleLanguageAdapter,
-      toDefinition termAlternatives,
-      toDefinition typeAlternatives]
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
-formatDecodingError :: TTerm (DecodingError -> Error)
-formatDecodingError = "e" ~> Error.errorDecoding $ var "e"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-adaptFloatType :: TTermDefinition (LanguageConstraints -> FloatType -> Maybe FloatType)
-adaptFloatType = define "adaptFloatType" $
-  doc "Attempt to adapt a floating-point type using the given language constraints" $
-  "constraints" ~> "ft" ~>
-  "supported" <~ Sets.member (var "ft") (Coders.languageConstraintsFloatTypes $ var "constraints") $
-  "alt" <~ (adaptFloatType @@ var "constraints") $
-  "forUnsupported" <~ ("ft" ~> cases _FloatType (var "ft")
-    Nothing [
---    _FloatType_bigfloat>>: constant nothing,
-    _FloatType_bigfloat>>: constant $ var "alt" @@ Core.floatTypeFloat64, -- TODO: temporary; the only non-lossy alternative for bigfloat is string, but some migration is needed
-    _FloatType_float32>>: constant $ var "alt" @@ Core.floatTypeFloat64,
-    _FloatType_float64>>: constant $ var "alt" @@ Core.floatTypeBigfloat]) $
-  Logic.ifElse (var "supported")
-    (just $ var "ft")
-    (var "forUnsupported" @@ var "ft")
-
-adaptDataGraph :: TTermDefinition (LanguageConstraints -> Bool -> [Binding] -> Context -> Graph -> Prelude.Either Error (Graph, [Binding]))
-adaptDataGraph = define "adaptDataGraph" $
-  doc ("Adapt a graph and its schema to the given language constraints."
-    <> " The doExpand flag controls eta expansion of partial applications."
-    <> " Adaptation is type-preserving: binding-level TypeSchemes are adapted (not stripped)."
-    <> " Note: case statement hoisting is done separately, prior to adaptation."
-    <> " The els0 parameter provides the original ordered bindings."
-    <> " Returns both the adapted graph and the ordered adapted bindings.") $
-  "constraints" ~> "doExpand" ~> "els0" ~> "cx" ~> "graph0" ~>
-  -- Transform a single term: push type apps, eta expand, lift lambdas.
-  -- Applied per-binding to avoid O(n²) behavior when processing all bindings as one let.
-  "transformTerm" <~ ("g" ~> "term" ~>
-    "tx" <~ var "g" $
-    "t1" <~ Variables.unshadowVariables @@ (pushTypeAppsInward @@ var "term") $
-    "t2" <~ Variables.unshadowVariables @@ (Logic.ifElse (var "doExpand")
-      (pushTypeAppsInward @@ (Reduction.etaExpandTerm @@ var "tx" @@ var "t1"))
-      (var "t1")) $
-    Dependencies.liftLambdaAboveLet @@ var "t2") $
-  -- Transform each binding's term individually, preserving name and type
-  "transformBinding" <~ ("g" ~> "el" ~>
-    Core.binding
-      (Core.bindingName $ var "el")
-      (var "transformTerm" @@ var "g" @@ (Core.bindingTerm $ var "el"))
-      (Core.bindingTypeScheme $ var "el")) $
-  "litmap" <~ adaptLiteralTypesMap @@ var "constraints" $
-  "prims0" <~ Graph.graphPrimitives (var "graph0") $
-  "schemaTypes0" <~ Graph.graphSchemaTypes (var "graph0") $
-  -- Adapt schema types
-  "schemaBindings" <~ Environment.typesToDefinitions @@ Maps.map ("ts" ~> Scoping.typeSchemeToFType @@ var "ts") (var "schemaTypes0") $
-  "schemaResult" <<~ Logic.ifElse (Maps.null (var "schemaTypes0"))
-    (right (Maps.empty :: TTerm (M.Map Name TypeScheme)))
-    ("tmap0" <<~ Eithers.bimap formatDecodingError ("x" ~> var "x") (Environment.graphAsTypes @@ var "graph0" @@ var "schemaBindings") $
-      "tmap1" <<~ adaptGraphSchema @@ var "constraints" @@ var "litmap" @@ var "tmap0" $
-      right $ Maps.map ("t" ~> Resolution.typeToTypeScheme @@ var "t") (var "tmap1")) $
-  "adaptedSchemaTypes" <~ var "schemaResult" $
-  -- Process each binding individually: transform, wrap in single-binding let,
-  -- adapt, rewrite lambda domains, then extract. This avoids building one giant
-  -- let with all bindings, which causes bytecode stack overflow in EL.
-  "adaptBinding" <~ ("el" ~>
-    "transformed" <~ var "transformBinding" @@ var "graph0" @@ var "el" $
-    "wrapped" <~ Core.termLet (Core.let_ (Lists.pure (var "transformed")) Core.termUnit) $
-    "adapted" <<~ adaptTerm @@ var "constraints" @@ var "litmap" @@ var "cx" @@ var "graph0" @@ var "wrapped" $
-    Rewriting.rewriteTermM @@ (adaptLambdaDomains @@ var "constraints" @@ var "litmap") @@ var "adapted") $
-  "adaptedTerms" <<~ Eithers.mapList (var "adaptBinding") (var "els0") $
-  "els1Raw" <~ Lists.concat (Lists.map Environment.termAsBindings (var "adaptedTerms")) $
-
-  -- Adapt nested let binding TypeSchemes within each top-level binding's term.
-  -- These TypeSchemes may carry stale types from JSON modules (e.g. bigfloat→float64).
-  -- Applied per-binding AFTER termAsBindings so that top-level binding TypeSchemes
-  -- (which carry type-class constraints like Ord) are preserved.
-  -- Process each binding: adapt nested let TypeSchemes AND adapt top-level TypeSchemes.
-  -- Adapting (rather than stripping) TypeSchemes converts stale types like bigfloat→float64
-  -- while preserving type-class constraints like Ord needed by decodeSet.
-  "processBinding" <~ ("el" ~>
-    "newTerm" <<~ Rewriting.rewriteTermM @@ (adaptNestedTypes @@ var "constraints" @@ var "litmap") @@ (Core.bindingTerm $ var "el") $
-    "adaptedType" <<~ optCases (Core.bindingTypeScheme $ var "el")
-      (right nothing)
-      ("ts" ~>
-        "ts1" <<~ adaptTypeScheme @@ var "constraints" @@ var "litmap" @@ var "ts" $
-        right $ just $ var "ts1") $
-    right $ Core.binding
-      (Core.bindingName $ var "el")
-      (var "newTerm")
-      (var "adaptedType")) $
-  "els1" <<~ Eithers.mapList (var "processBinding") (var "els1Raw") $
-  "primPairs" <<~ Eithers.mapList ("kv" ~>
-    "prim1" <<~ adaptPrimitive @@ var "constraints" @@ var "litmap" @@ (Pairs.second $ var "kv") $
-    right $ pair (Pairs.first $ var "kv") (var "prim1")) (Maps.toList (var "prims0")) $
-  "prims1" <~ Maps.fromList (var "primPairs") $
-  "adaptedGraphRaw" <~ (Lexical.buildGraph @@ var "els1" @@ Maps.empty @@ var "prims1") $
-  "adaptedGraph" <~ Graph.graphWithSchemaTypes (var "adaptedGraphRaw") (var "adaptedSchemaTypes") $
-  right $ pair (var "adaptedGraph") (var "els1")
-
--- | Rewrite callback for adapting lambda domains in a term.
--- Dispatches on Term variants: for TermLambda, adapts the lambda domain type;
--- for all other variants, returns the term unchanged.
--- This is a top-level function (not inline) so the Python code generator can emit match statements.
-adaptLambdaDomains :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> (Term -> Prelude.Either Error Term) -> Term -> Prelude.Either Error Term)
-adaptLambdaDomains = define "adaptLambdaDomains" $
-  doc "Rewrite callback for adapting lambda domain types in a term" $
-  "constraints" ~> "litmap" ~> "recurse" ~> "term" ~>
-  "rewritten" <<~ var "recurse" @@ var "term" $
-  cases _Term (var "rewritten")
-    (Just $ right $ var "rewritten") [
-    _Term_lambda>>: "l" ~>
-      "adaptedDomain" <<~ optCases (Core.lambdaDomain $ var "l")
-        (right nothing)
-        ("dom" ~>
-          "dom1" <<~ adaptType @@ var "constraints" @@ var "litmap" @@ var "dom" $
-          right $ just $ var "dom1") $
-      right $ Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        (var "adaptedDomain")
-        (Core.lambdaBody $ var "l")]
-
--- | Rewrite callback for adapting nested let binding TypeSchemes in a term.
--- Dispatches on Term variants: for TermLet, adapts the binding TypeSchemes;
--- for all other variants, returns the term unchanged.
--- This is a top-level function (not inline) so the Python code generator can emit match statements.
-adaptNestedTypes :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> (Term -> Prelude.Either Error Term) -> Term -> Prelude.Either Error Term)
-adaptNestedTypes = define "adaptNestedTypes" $
-  doc "Rewrite callback for adapting nested let binding TypeSchemes in a term" $
-  "constraints" ~> "litmap" ~> "recurse" ~> "term" ~>
-  "rewritten" <<~ var "recurse" @@ var "term" $
-  cases _Term (var "rewritten")
-    (Just $ right $ var "rewritten") [
-    _Term_let>>: "lt" ~>
-      "adaptB" <~ ("b" ~>
-        "adaptedBType" <<~ optCases (Core.bindingTypeScheme $ var "b")
-          (right nothing)
-          ("ts" ~>
-            "ts1" <<~ adaptTypeScheme @@ var "constraints" @@ var "litmap" @@ var "ts" $
-            right $ just $ var "ts1") $
-        right $ Core.binding
-          (Core.bindingName $ var "b")
-          (Core.bindingTerm $ var "b")
-          (var "adaptedBType")) $
-      "adaptedBindings" <<~ Eithers.mapList (var "adaptB") (Core.letBindings $ var "lt") $
-      right $ Core.termLet $ Core.let_
-        (var "adaptedBindings")
-        (Core.letBody $ var "lt")]
-
-adaptGraphSchema :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> M.Map Name Type -> Prelude.Either Error (M.Map Name Type))
-adaptGraphSchema = define "adaptGraphSchema" $
-  doc "Adapt a schema graph to the given language constraints" $
-  "constraints" ~> "litmap" ~> "types0" ~>
-  "mapPair" <~ ("pair" ~>
-    "name" <~ Pairs.first (var "pair") $
-    "typ" <~ Pairs.second (var "pair") $
-    "typ1" <<~ adaptType @@ var "constraints" @@ var "litmap" @@ var "typ" $
-    right $ pair (var "name") (var "typ1")) $
-  "pairs" <<~ Eithers.mapList (var "mapPair") (Maps.toList $ var "types0") $
-  right $ Maps.fromList (var "pairs")
-
-adaptIntegerType :: TTermDefinition (LanguageConstraints -> IntegerType -> Maybe IntegerType)
-adaptIntegerType = define "adaptIntegerType" $
-  doc "Attempt to adapt an integer type using the given language constraints" $
-  "constraints" ~> "it" ~>
-  "supported" <~ Sets.member (var "it") (Coders.languageConstraintsIntegerTypes $ var "constraints") $
-  "alt" <~ (adaptIntegerType @@ var "constraints") $
-  "forUnsupported" <~ ("it" ~> cases _IntegerType (var "it")
-    Nothing [
-    _IntegerType_bigint>>: constant nothing,
-    _IntegerType_int8>>: constant $ var "alt" @@ Core.integerTypeUint16,
-    _IntegerType_int16>>: constant $ var "alt" @@ Core.integerTypeUint32,
-    _IntegerType_int32>>: constant $ var "alt" @@ Core.integerTypeUint64,
-    _IntegerType_int64>>: constant $ var "alt" @@ Core.integerTypeBigint,
-    _IntegerType_uint8>>: constant $ var "alt" @@ Core.integerTypeInt16,
-    _IntegerType_uint16>>: constant $ var "alt" @@ Core.integerTypeInt32,
-    _IntegerType_uint32>>: constant $ var "alt" @@ Core.integerTypeInt64,
-    _IntegerType_uint64>>: constant $ var "alt" @@ Core.integerTypeBigint]) $
-  Logic.ifElse (var "supported")
-    (just $ var "it")
-    (var "forUnsupported" @@ var "it")
-
-adaptLiteral :: TTermDefinition (LiteralType -> Literal -> Literal)
-adaptLiteral = define "adaptLiteral" $
-  doc "Convert a literal to a different type" $
-  "lt" ~> "l" ~>
-  cases _Literal (var "l")
-    Nothing [
-    _Literal_binary>>: "b" ~> cases _LiteralType (var "lt")
-      Nothing [
-      _LiteralType_string>>: constant $ Core.literalString $ Literals.binaryToString $ var "b"],
-    _Literal_boolean>>: "b" ~> cases _LiteralType (var "lt")
-      Nothing [
-      _LiteralType_integer>>: "it" ~> Core.literalInteger $
-        Literals.bigintToIntegerValue @@ var "it" @@ Logic.ifElse (var "b") (bigint 1) (bigint 0)],
-    _Literal_decimal>>: "d" ~> cases _LiteralType (var "lt")
-      Nothing [
-      _LiteralType_float>>: constant $ Core.literalFloat $
-        inject _FloatValue _FloatValue_float64 (Literals.decimalToFloat64 (var "d")),
-      _LiteralType_string>>: constant $ Core.literalString $ Literals.showDecimal (var "d")],
-    _Literal_float>>: "f" ~> cases _LiteralType (var "lt")
-      Nothing [
-      _LiteralType_float>>: "ft" ~> Core.literalFloat $
-        Literals.bigfloatToFloatValue @@ var "ft" @@ (Literals.floatValueToBigfloat @@ var "f")],
-    _Literal_integer>>: "i" ~> cases _LiteralType (var "lt")
-      Nothing [
-      _LiteralType_integer>>: "it" ~> Core.literalInteger $
-        Literals.bigintToIntegerValue @@ var "it" @@ (Literals.integerValueToBigint @@ var "i")]]
-
-adaptLiteralType :: TTermDefinition (LanguageConstraints -> LiteralType -> Maybe LiteralType)
-adaptLiteralType = define "adaptLiteralType" $
-  doc "Attempt to adapt a literal type using the given language constraints" $
-  "constraints" ~> "lt" ~>
-  "forUnsupported" <~ ("lt" ~> cases _LiteralType (var "lt")
-    (Just nothing) [
-    _LiteralType_binary>>: constant $ just Core.literalTypeString,
-    _LiteralType_boolean>>: constant $ Maybes.map (unaryFunction Core.literalTypeInteger) $
-      adaptIntegerType @@ var "constraints" @@ Core.integerTypeInt8,
-    _LiteralType_decimal>>: constant $ just $ Core.literalTypeFloat Core.floatTypeFloat64,
-    _LiteralType_float>>: "ft" ~> Maybes.map (unaryFunction Core.literalTypeFloat) $
-      adaptFloatType @@ var "constraints" @@ var "ft",
-    _LiteralType_integer>>: "it" ~> Maybes.map (unaryFunction Core.literalTypeInteger) $
-      adaptIntegerType @@ var "constraints" @@ var "it"]) $
-  Logic.ifElse (literalTypeSupported @@ var "constraints" @@ var "lt")
-    nothing
-    (var "forUnsupported" @@ var "lt")
-
-adaptLiteralTypesMap :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType)
-adaptLiteralTypesMap = define "adaptLiteralTypesMap" $
-  doc "Derive a map of adapted literal types for the given language constraints" $
-  "constraints" ~>
-  "tryType" <~ ("lt" ~> optCases (adaptLiteralType @@ var "constraints" @@ var "lt")
-    nothing
-    ("lt2" ~> just $ pair (var "lt") (var "lt2"))) $
-  Maps.fromList $ Maybes.cat $ Lists.map (var "tryType") (Reflect.literalTypes)
-
-adaptLiteralValue :: TTermDefinition (M.Map LiteralType LiteralType -> LiteralType -> Literal -> Literal)
-adaptLiteralValue = define "adaptLiteralValue" $
-  doc "Adapt a literal value using the given language constraints" $
-  "litmap" ~> "lt" ~> "l" ~> optCases (Maps.lookup (var "lt") (var "litmap"))
-    (Core.literalString $ ShowCore.literal @@ var "l")
-    ("lt2" ~> adaptLiteral @@ var "lt2" @@ var "l")
-
-adaptPrimitive :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> Primitive -> Prelude.Either Error Primitive)
-adaptPrimitive = define "adaptPrimitive" $
-  doc "Adapt a primitive to the given language constraints, prior to inference" $
-  "constraints" ~> "litmap" ~> "prim0" ~>
-  "ts0" <~ Graph.primitiveTypeScheme (var "prim0") $
-  "ts1" <<~ adaptTypeScheme @@ var "constraints" @@ var "litmap" @@ var "ts0" $
-  right $ Graph.primitiveWithTypeScheme (var "prim0") (var "ts1")
-
--- Note: this function could be made more efficient through precomputation of alternatives,
---       similar to what is done for literals.
-adaptTerm :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> Context -> Graph -> Term -> Prelude.Either Error Term)
-adaptTerm = define "adaptTerm" $
-  doc "Adapt a term using the given language constraints" $
-  "constraints" ~> "litmap" ~> "cx" ~> "graph" ~> "term0" ~>
-  "rewrite" <~ ("recurse" ~> "term0" ~> lets [
-    "forSupported">: ("term" ~> cases _Term (var "term")
-      (Just $ right $ just $ var "term") [
-      _Term_literal>>: "l" ~>
-        "lt" <~ Reflect.literalType @@ var "l" $
-        right $ just $ Logic.ifElse (literalTypeSupported @@ var "constraints" @@ var "lt")
-          (var "term")
-          (Core.termLiteral $ adaptLiteralValue @@ var "litmap" @@ var "lt" @@ var "l")]),
-    "forUnsupported">: ("term" ~> lets [
-      "tryAlts">: ("alts" ~>
-        Maybes.maybe
-          (right nothing)
-          ("uc" ~>
-            "mterm" <<~ var "tryTerm" @@ (Pairs.first $ var "uc") $
-            optCases (var "mterm")
-              (var "tryAlts" @@ (Pairs.second $ var "uc"))
-              ("t" ~> right $ just $ var "t"))
-          (Lists.uncons $ var "alts"))] $
-      "alts0" <<~ termAlternatives @@ var "cx" @@ var "graph" @@ var "term" $
-      var "tryAlts" @@ var "alts0"),
-    "tryTerm">: ("term" ~>
-      "supportedVariant" <~ Sets.member
-        (Reflect.termVariant @@ var "term")
-        (Coders.languageConstraintsTermVariants $ var "constraints") $
-      Logic.ifElse (var "supportedVariant")
-        (var "forSupported" @@ var "term")
-        (var "forUnsupported" @@ var "term"))] $
-    "term1" <<~ var "recurse" @@ var "term0" $
-    -- Type application/lambda wrappers pass through unconditionally.
-    -- fsub already recursed into their bodies; we must not strip the wrappers
-    -- because they carry type information needed by typeOf in the coders.
-    cases _Term (var "term1")
-      (Just $
-        "mterm" <<~ var "tryTerm" @@ var "term1" $
-        optCases (var "mterm")
-          (left $ Error.errorOther $ Error.otherError $ (string "no alternatives for term: ") ++ (ShowCore.term @@ var "term1"))
-          ("term2" ~> right $ var "term2"))
-      [_Term_typeApplication>>: "ta" ~>
-         "atyp" <<~ adaptType @@ var "constraints" @@ var "litmap" @@ (Core.typeApplicationTermType $ var "ta") $
-         right $ Core.termTypeApplication $ Core.typeApplicationTerm
-           (Core.typeApplicationTermBody $ var "ta")
-           (var "atyp"),
-       _Term_typeLambda>>:      "_" ~> right $ var "term1"]) $
-  Rewriting.rewriteTermM @@ var "rewrite" @@ var "term0"
-
-adaptType :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> Type -> Prelude.Either Error Type)
-adaptType = define "adaptType" $
-  doc "Adapt a type using the given language constraints" $
-  "constraints" ~> "litmap" ~> "type0" ~>
-  lets [
-  "forSupported">: ("typ" ~> cases _Type (var "typ")
-    (Just $ just $ var "typ") [
-    _Type_literal>>: "lt" ~> Logic.ifElse (literalTypeSupported @@ var "constraints" @@ var "lt")
-      (just $ var "typ")
-      (optCases (Maps.lookup (var "lt") (var "litmap"))
-        (just $ Core.typeLiteral Core.literalTypeString)
-        ("lt2" ~> just $ Core.typeLiteral $ var "lt2"))]),
-  "forUnsupported">: ("typ" ~>
-    "tryAlts" <~ ("alts" ~>
-      Maybes.bind (Lists.uncons $ var "alts") $
-        "uc" ~> optCases (var "tryType" @@ (Pairs.first $ var "uc"))
-          (var "tryAlts" @@ (Pairs.second $ var "uc"))
-          ("t" ~> just $ var "t")) $
-    "alts0" <~ typeAlternatives @@ var "typ" $
-    var "tryAlts" @@ var "alts0"),
-  "tryType">: ("typ" ~>
-    "supportedVariant" <~ Sets.member
-      (Reflect.typeVariant @@ var "typ")
-      (Coders.languageConstraintsTypeVariants $ var "constraints") $
-    Logic.ifElse (var "supportedVariant")
-      (var "forSupported" @@ var "typ")
-      (var "forUnsupported" @@ var "typ"))] $
-  "rewrite" <~ ("recurse" ~> "typ" ~>
-    "type1" <<~ var "recurse" @@ var "typ" $
-    optCases (var "tryType" @@ var "type1")
-      (left $ Error.errorOther $ Error.otherError $ (string "no alternatives for type: ") ++ (ShowCore.type_ @@ var "typ"))
-      ("type2" ~> right $ var "type2")) $
-  Rewriting.rewriteTypeM @@ var "rewrite" @@ var "type0"
-
-adaptTypeScheme :: TTermDefinition (LanguageConstraints -> M.Map LiteralType LiteralType -> TypeScheme -> Prelude.Either Error TypeScheme)
-adaptTypeScheme = define "adaptTypeScheme" $
-  doc "Adapt a type scheme to the given language constraints, prior to inference" $
-  "constraints" ~> "litmap" ~> "ts0" ~>
-  "vars0" <~ Core.typeSchemeVariables (var "ts0") $
-  "t0" <~ Core.typeSchemeBody (var "ts0") $
-  "t1" <<~ adaptType @@ var "constraints" @@ var "litmap" @@ var "t0" $
-  right $ Core.typeScheme (var "vars0") (var "t1") (Core.typeSchemeConstraints (var "ts0"))
-
-pushTypeAppsInward :: TTermDefinition (Term -> Term)
-pushTypeAppsInward = define "pushTypeAppsInward" $
-  doc ("Normalize a term by pushing TermTypeApplication inward past TermApplication and"
-    <> " TermLambda. This corrects structures produced by poly-let hoisting and"
-    <> " eta expansion, where type applications from inference end up wrapping term"
-    <> " applications or lambda abstractions instead of being directly on the polymorphic variable.") $
-  "term" ~>
-  lets [
-  "push">: ("body" ~> "typ" ~> cases _Term (var "body")
-    -- Default: keep TypeApp as-is
-    (Just $ Core.termTypeApplication $ Core.typeApplicationTerm (var "body") (var "typ")) [
-    -- TypeApp(App(f, arg), τ) → go(App(TypeApp(f, τ), arg))
-    _Term_application>>: "a" ~> var "go" @@
-      (Core.termApplication $ Core.application
-        (Core.termTypeApplication $ Core.typeApplicationTerm
-          (Core.applicationFunction $ var "a")
-          (var "typ"))
-        (Core.applicationArgument $ var "a")),
-    -- TypeApp(Lambda(v, d, body), τ) → go(Lambda(v, d, TypeApp(body, τ)))
-    _Term_lambda>>: "l" ~> var "go" @@
-      (Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        (Core.lambdaDomain $ var "l")
-        (Core.termTypeApplication $ Core.typeApplicationTerm
-          (Core.lambdaBody $ var "l")
-          (var "typ"))),
-    -- TypeApp(Let(bindings, body), τ) → go(Let(bindings, TypeApp(body, τ)))
-    _Term_let>>: "lt" ~> var "go" @@
-      (Core.termLet $ Core.let_
-        (Core.letBindings $ var "lt")
-        (Core.termTypeApplication $ Core.typeApplicationTerm
-          (Core.letBody $ var "lt")
-          (var "typ")))]),
-  "go">: ("t" ~>
-    "forField" <~ ("fld" ~> Core.fieldWithTerm (var "fld") (var "go" @@ (Core.fieldTerm $ var "fld"))) $
-    "forLet" <~ ("lt" ~>
-      "mapBinding" <~ ("b" ~> Core.binding
-        (Core.bindingName $ var "b")
-        (var "go" @@ (Core.bindingTerm $ var "b"))
-        (Core.bindingTypeScheme $ var "b")) $
-      Core.let_
-        (Lists.map (var "mapBinding") (Core.letBindings $ var "lt"))
-        (var "go" @@ (Core.letBody $ var "lt"))) $
-    "forMap" <~ ("m" ~>
-      "forPair" <~ ("p" ~> pair (var "go" @@ (Pairs.first $ var "p")) (var "go" @@ (Pairs.second $ var "p"))) $
-      Maps.fromList $ Lists.map (var "forPair") $ Maps.toList $ var "m") $
-    cases _Term (var "t") Nothing [
-      _Term_annotated>>: "at" ~> Core.termAnnotated $ Core.annotatedTerm
-        (var "go" @@ (Core.annotatedTermBody $ var "at"))
-        (Core.annotatedTermAnnotation $ var "at"),
-      _Term_application>>: "a" ~> Core.termApplication $ Core.application
-        (var "go" @@ (Core.applicationFunction $ var "a"))
-        (var "go" @@ (Core.applicationArgument $ var "a")),
-      _Term_cases>>: "cs" ~> Core.termCases $ Core.caseStatement
-        (Core.caseStatementTypeName $ var "cs")
-        (Maybes.map (var "go") (Core.caseStatementDefault $ var "cs"))
-        (Lists.map (var "forField") (Core.caseStatementCases $ var "cs")),
-      _Term_either>>: "e" ~> Core.termEither $ Eithers.either_
-        ("l" ~> left $ var "go" @@ var "l")
-        ("r" ~> right $ var "go" @@ var "r")
-        (var "e"),
-      _Term_lambda>>: "l" ~> Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        (Core.lambdaDomain $ var "l")
-        (var "go" @@ (Core.lambdaBody $ var "l")),
-      _Term_let>>: "lt" ~> Core.termLet $ var "forLet" @@ var "lt",
-      _Term_list>>: "els" ~> Core.termList $ Lists.map (var "go") (var "els"),
-      _Term_literal>>: "v" ~> Core.termLiteral $ var "v",
-      _Term_map>>: "m" ~> Core.termMap $ var "forMap" @@ var "m",
-      _Term_maybe>>: "m" ~> Core.termMaybe $ Maybes.map (var "go") (var "m"),
-      _Term_pair>>: "p" ~> Core.termPair $ pair
-        (var "go" @@ (Pairs.first $ var "p"))
-        (var "go" @@ (Pairs.second $ var "p")),
-      _Term_project>>: "p" ~> Core.termProject $ var "p",
-      _Term_record>>: "r" ~> Core.termRecord $ Core.record
-        (Core.recordTypeName $ var "r")
-        (Lists.map (var "forField") (Core.recordFields $ var "r")),
-      _Term_set>>: "s" ~> Core.termSet $ Sets.fromList $ Lists.map (var "go") $ Sets.toList (var "s"),
-      _Term_typeApplication>>: "tt" ~>
-        "body1" <~ var "go" @@ (Core.typeApplicationTermBody $ var "tt") $
-        var "push" @@ var "body1" @@ (Core.typeApplicationTermType $ var "tt"),
-      _Term_typeLambda>>: "ta" ~> Core.termTypeLambda $ Core.typeLambda
-        (Core.typeLambdaParameter $ var "ta")
-        (var "go" @@ (Core.typeLambdaBody $ var "ta")),
-      _Term_inject>>: "i" ~> Core.termInject $ Core.injection
-        (Core.injectionTypeName $ var "i")
-        (var "forField" @@ (Core.injectionField $ var "i")),
-      _Term_unit>>: constant Core.termUnit,
-      _Term_unwrap>>: "n" ~> Core.termUnwrap $ var "n",
-      _Term_variable>>: "v" ~> Core.termVariable $ var "v",
-      _Term_wrap>>: "wt" ~> Core.termWrap $ Core.wrappedTerm
-        (Core.wrappedTermTypeName $ var "wt")
-        (var "go" @@ (Core.wrappedTermBody $ var "wt"))])] $
-  var "go" @@ var "term"
-
-dataGraphToDefinitions :: TTermDefinition (LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> [Binding] -> Graph -> [Namespace] -> Context -> Prelude.Either Error (Graph, [[TermDefinition]]))
-dataGraphToDefinitions = define "dataGraphToDefinitions" $
-  doc ("Given a data graph along with language constraints, original ordered bindings, and a designated list of namespaces,"
-    <> " adapt the graph to the language constraints,"
-    <> " then return the processed graph along with term definitions grouped by namespace (in the order of the input namespaces)."
-    <> " Inference is performed before adaptation if bindings lack type annotations."
-    <> " Hoisting must preserve type schemes; if any binding loses its type scheme after hoisting, the pipeline fails."
-    <> " Adaptation preserves type application/lambda wrappers and adapts embedded types."
-    <> " Post-adaptation inference is performed to ensure binding TypeSchemes are fully consistent."
-    <> " The doExpand flag controls eta expansion."
-    <> " The doHoistCaseStatements flag controls case statement hoisting (needed for Python)."
-    <> " The doHoistPolymorphicLetBindings flag controls polymorphic let binding hoisting (needed for Java)."
-    <> " The originalBindings parameter provides the original ordered bindings (from module elements).") $
-  "constraints" ~>
-  "doInfer" ~> "doExpand" ~> "doHoistCaseStatements" ~> "doHoistPolymorphicLetBindings" ~>
-  "originalBindings" ~> "graph0" ~> "namespaces" ~> "cx" ~>
-
-  "namespacesSet" <~ Sets.fromList (var "namespaces") $
-
-  "isParentBinding" <~ ("b" ~> optCases (Names.namespaceOf @@ (Core.bindingName $ var "b"))
-    false
-    ("ns" ~> Sets.member (var "ns") (var "namespacesSet"))) $
-
-  -- Steps 0a-2: Case statement hoisting pipeline (only for Python target, currently).
-  -- 0a: Strip type lambdas so case expressions are visible to the hoister
-  --     (the hoister does not traverse into type lambdas).
-  -- 0b: Unshadow variables to prevent capture issues after hoisting.
-  -- 1:  Hoist case statements before inference.
-  -- 2:  Unshadow again after hoisting (hoisting introduces new lambda wrappers).
-  "hoistCases" <~ ("bindings" ~>
-    -- 0a: Strip type lambdas from bindings
-    "stripped" <~ Lists.map ("b" ~>
-        Core.binding (Core.bindingName $ var "b")
-          (Strip.stripTypeLambdas @@ (Core.bindingTerm $ var "b"))
-          (Core.bindingTypeScheme $ var "b"))
-        (var "bindings") $
-    -- 0b: Unshadow variables
-    "term0" <~ Core.termLet (Core.let_ (var "stripped") Core.termUnit) $
-    "unshadowed0" <~ Environment.termAsBindings @@ (Variables.unshadowVariables @@ var "term0") $
-    -- 1: Hoist case statements
-    "hoisted" <~ Hoisting.hoistCaseStatementsInGraph @@ var "unshadowed0" $
-    -- 2: Unshadow again after hoisting
-    "term1" <~ Core.termLet (Core.let_ (var "hoisted") Core.termUnit) $
-    Environment.termAsBindings @@ (Variables.unshadowVariables @@ var "term1")) $
-
-  "hoistPoly" <~ ("bindings" ~>
-    "letBefore" <~ Core.let_ (var "bindings") Core.termUnit $
-    "letAfter" <~ Hoisting.hoistPolymorphicLetBindings @@ var "isParentBinding" @@ var "letBefore" $
-    Core.letBindings $ var "letAfter") $
-
-  -- Note: this is a rough test of typedness, as it only checks that the top-level bindings are typed.
-  "checkBindingsTyped" <~ ("debugLabel" ~> "bindings" ~>
-    "untypedBindings" <~ Lists.map ("b" ~> Core.unName (Core.bindingName $ var "b"))
-      (Lists.filter ("b" ~> Logic.not $ Maybes.isJust (Core.bindingTypeScheme $ var "b")) (var "bindings")) $
-    Logic.ifElse (Lists.null $ var "untypedBindings")
-      (right $ var "bindings")
-      (left $ Error.errorOther $ Error.otherError $ Strings.concat [
-        string "Found untyped bindings (", var "debugLabel", string "): ",
-        Strings.intercalate (string ", ") (var "untypedBindings")])) $
-
-  -- Normalize: push type applications inward past applications and lambdas.
-  -- This corrects structures where TypeApp wraps App/Lambda after adaptation and eta expansion.
-  "normalizeBindings" <~ ("bindings" ~>
-    Lists.map ("b" ~> Core.binding
-      (Core.bindingName $ var "b")
-      (pushTypeAppsInward @@ (Core.bindingTerm $ var "b"))
-      (Core.bindingTypeScheme $ var "b"))
-    (var "bindings")) $
-
-  -- Helper to rebuild a Graph from bindings, reusing graph0's context
-  "rebuildGraph" <~ ("bindings" ~>
-    "g" <~ (Lexical.buildGraph @@ var "bindings" @@ Maps.empty @@ Graph.graphPrimitives (var "graph0")) $
-    Graph.graphWithSchemaTypes (var "g") (Graph.graphSchemaTypes (var "graph0"))) $
-
-  -- Step 1: hoist case statements if needed (currently, for the Python target)
-  -- Use original ordered bindings instead of graphToBindings (which loses order)
-  "bins0" <~ var "originalBindings" $
-  "bins1" <~ Logic.ifElse (var "doHoistCaseStatements")
-    (var "hoistCases" @@ var "bins0")
-    (var "bins0") $
-
-  -- Step 2: infer types if necessary
-  -- inferGraphTypes now takes ordered bindings and returns (Graph, [Binding])
-  "bins2" <<~ Logic.ifElse (var "doInfer")
-     (Eithers.map ("result" ~> Pairs.second (Pairs.first (var "result")))
-         (Inference.inferGraphTypes @@ var "cx" @@ var "bins1" @@ (var "rebuildGraph" @@ var "bins1")))
-     (var "checkBindingsTyped" @@ string "after case hoisting" @@ var "bins1") $
-
-  -- Step 3: hoist let bindings if necessary (currently, for the Java target)
-  "bins3" <<~ Logic.ifElse (var "doHoistPolymorphicLetBindings")
-    (var "checkBindingsTyped" @@ string "after let hoisting"
-      @@ (var "hoistPoly" @@ var "bins2"))
-    (right $ var "bins2") $
-
-  -- Step 4: adapt the graph (includes eta expansion if enabled).
-  -- Adaptation preserves type application/lambda wrappers and adapts embedded types
-  -- (literal types, lambda domains, TypeSchemes).
-  -- Pass ordered bins3 to adaptDataGraph so it uses them instead of graphToBindings.
-  -- adaptDataGraph returns (Graph, [Binding]) preserving binding order.
-  "adaptResult" <<~ adaptDataGraph @@ var "constraints" @@ var "doExpand" @@ var "bins3" @@ var "cx" @@ (var "rebuildGraph" @@ var "bins3") $
-  "adapted" <~ Pairs.first (var "adaptResult") $
-  "adaptedBindings" <~ Pairs.second (var "adaptResult") $
-  "bins4" <<~ var "checkBindingsTyped" @@ (string "after adaptation") @@ var "adaptedBindings" $
-
-  -- Step 5: normalize bindings
-  "bins5" <~ var "normalizeBindings" @@ var "bins4" $
-
-  -- Construct term definitions grouped by namespace
-  "toDef" <~ ("el" ~>
-    Maybes.map
-      ("ts" ~> Packaging.termDefinition
-        (Core.bindingName $ var "el")
-        (Core.bindingTerm $ var "el")
-        (just $ var "ts"))
-      (Core.bindingTypeScheme $ var "el")) $
-  -- Filter to elements in the requested namespaces
-  "selectedElements" <~ Lists.filter
-    ("el" ~> optCases (Names.namespaceOf @@ (Core.bindingName $ var "el"))
-      false
-      ("ns" ~> Sets.member (var "ns") (var "namespacesSet")))
-    (var "bins5") $
-  -- Group elements by namespace
-  "elementsByNamespace" <~ Lists.foldl
-    ("acc" ~> "el" ~>
-      optCases (Names.namespaceOf @@ (Core.bindingName $ var "el"))
-        (var "acc")
-        ("ns" ~>
-          "existing" <~ Maybes.maybe (list ([] :: [TTerm Binding])) (unaryFunction Equality.identity) (Maps.lookup (var "ns") (var "acc")) $
-          Maps.insert (var "ns") (Lists.concat2 (var "existing") (list [var "el"])) (var "acc")))
-    Maps.empty
-    (var "selectedElements") $
-  -- Produce definitions in the order of the input namespaces
-  "defsGrouped" <~ Lists.map
-    ("ns" ~>
-      "elsForNs" <~ Maybes.maybe (list ([] :: [TTerm Binding])) (unaryFunction Equality.identity) (Maps.lookup (var "ns") (var "elementsByNamespace")) $
-      Maybes.cat (Lists.map (var "toDef") (var "elsForNs")))
-    (var "namespaces") $
-
-  "g" <~ (Lexical.buildGraph @@ var "bins5" @@ Maps.empty @@ Graph.graphPrimitives (var "adapted")) $
-  right $ pair
-    (Graph.graphWithSchemaTypes (var "g") (Graph.graphSchemaTypes (var "adapted")))
-    (var "defsGrouped")
-
-literalTypeSupported :: TTermDefinition (LanguageConstraints -> LiteralType -> Bool)
-literalTypeSupported = define "literalTypeSupported" $
-  doc "Check if a literal type is supported by the given language constraints" $
-  "constraints" ~> "lt" ~>
-  "forType" <~ ("lt" ~> cases _LiteralType (var "lt")
-    (Just true) [
-      _LiteralType_float>>: "ft" ~> Sets.member (var "ft") (Coders.languageConstraintsFloatTypes $ var "constraints"),
-      _LiteralType_integer>>: "it" ~> Sets.member (var "it") (Coders.languageConstraintsIntegerTypes $ var "constraints")]) $
-  Logic.ifElse
-    (Sets.member
-      (Reflect.literalTypeVariant @@ var "lt")
-      (Coders.languageConstraintsLiteralVariants $ var "constraints"))
-    (var "forType" @@ var "lt")
-    false
-
-schemaGraphToDefinitions :: TTermDefinition (LanguageConstraints -> Graph -> [[Name]] -> Context -> Prelude.Either Error (M.Map Name Type, [[TypeDefinition]]))
-schemaGraphToDefinitions = define "schemaGraphToDefinitions" $
-  doc ("Given a schema graph along with language constraints and a designated list of element names,"
-    <> " adapt the graph to the language constraints,"
-    <> " then return a corresponding type definition for each element name.") $
-  "constraints" ~> "graph" ~> "nameLists" ~> "cx" ~>
-  "litmap" <~ adaptLiteralTypesMap @@ var "constraints" $
-  "tmap0" <<~ Eithers.bimap formatDecodingError ("x" ~> var "x") (Environment.graphAsTypes @@ var "graph" @@ (Lexical.graphToBindings @@ var "graph")) $
-  "tmap1" <<~ adaptGraphSchema @@ var "constraints" @@ var "litmap" @@ var "tmap0" $
-  "toDef" <~ ("pair" ~> Packaging.typeDefinition (Pairs.first $ var "pair") (Core.typeScheme (list ([] :: [TTerm Name])) (Pairs.second $ var "pair") nothing)) $
-  right $ pair
-    (var "tmap1")
-    (Lists.map
-      ("names" ~> Lists.map (var "toDef") $
-        -- Drop names that aren't present in tmap1. The caller is expected to
-        -- pass only names that exist in the schema graph, so the filter is
-        -- a no-op in practice.
-        Maybes.mapMaybe
-          ("n" ~> Maybes.map ("t" ~> pair (var "n") (var "t")) (Maps.lookup (var "n") (var "tmap1")))
-          (var "names"))
-      (var "nameLists"))
-
-termAlternatives :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error [Term])
-termAlternatives = define "termAlternatives" $
-  doc "Find a list of alternatives for a given term, if any" $
-  "cx" ~> "graph" ~> "term" ~> cases _Term (var "term")
-    (Just $ right $ list ([] :: [TTerm Term])) [
-    _Term_annotated>>: "at" ~>
-      "term2" <~ Core.annotatedTermBody (var "at") $
-      right $ list [
-        var "term2"], -- TODO: lossy
-    _Term_maybe>>: "ot" ~> right $ list [
-      Core.termList $ optCases (var "ot")
-        (list ([] :: [TTerm Term]))
-        ("term2" ~> list [var "term2"])],
-    _Term_typeLambda>>: "abs" ~>
-      "term2" <~ Core.typeLambdaBody (var "abs") $
-      right $ list [var "term2"],
-    _Term_typeApplication>>: "ta" ~>
-      "term2" <~ Core.typeApplicationTermBody (var "ta") $
-      right $ list [var "term2"],
-    _Term_inject>>: "inj" ~>
-      "tname" <~ Core.injectionTypeName (var "inj") $
-      "field" <~ Core.injectionField (var "inj") $
-      "fname" <~ Core.fieldName (var "field") $
-      "fterm" <~ Core.fieldTerm (var "field") $
-      "forFieldType" <~ ("ft" ~>
-        "ftname" <~ Core.fieldTypeName (var "ft") $
-        Core.field (var "fname") $ Core.termMaybe $ Logic.ifElse (Equality.equal (var "ftname") (var "fname"))
-          (just $ var "fterm")
-          (nothing)) $
-      "rt" <<~ Resolution.requireUnionType @@ var "cx" @@ var "graph" @@ var "tname" $
-      right $ list [
-        Core.termRecord $ Core.record (var "tname") (Lists.map (var "forFieldType") (var "rt"))],
-    _Term_unit>>: constant $ right $ list [
-      Core.termLiteral $ Core.literalBoolean true],
-    _Term_wrap>>: "wt" ~>
-      "term2" <~ Core.wrappedTermBody (var "wt") $
-      right $ list [
-         var "term2"]]
-
-typeAlternatives :: TTermDefinition (Type -> [Type])
-typeAlternatives = define "typeAlternatives" $
-  doc "Find a list of alternatives for a given type, if any" $
-  "type" ~> cases _Type (var "type")
-    (Just $ list ([] :: [TTerm Type])) [
-    _Type_annotated>>: "at" ~>
-      "type2" <~ Core.annotatedTypeBody (var "at") $
-       list [var "type2"], -- TODO: lossy
-    _Type_maybe>>: "ot" ~> list [
-      Core.typeList $ var "ot"],
-    _Type_union>>: "rt" ~>
-      "toOptField" <~ ("f" ~> Core.fieldType (Core.fieldTypeName $ var "f") (MetaTypes.optional $ Core.fieldTypeType $ var "f")) $
-      "optFields" <~ Lists.map (var "toOptField") (var "rt") $
-      list [
-        Core.typeRecord (var "optFields")],
-    _Type_unit>>: constant $ list [
-      Core.typeLiteral $ Core.literalTypeBoolean],
-    _Type_void>>: constant $ list [
-      Core.typeUnit]]
-
-adaptTypeForLanguage :: TTermDefinition (Language -> Type -> Prelude.Either Error Type)
-adaptTypeForLanguage = define "adaptTypeForLanguage" $
-  doc "Adapt a type using the constraints of a given language" $
-  "lang" ~> "typ" ~>
-  "constraints" <~ Coders.languageConstraints (var "lang") $
-  "litmap" <~ adaptLiteralTypesMap @@ var "constraints" $
-  adaptType @@ var "constraints" @@ var "litmap" @@ var "typ"
-
-adaptTermForLanguage :: TTermDefinition (Language -> Context -> Graph -> Term -> Prelude.Either Error Term)
-adaptTermForLanguage = define "adaptTermForLanguage" $
-  doc "Adapt a term using the constraints of a given language" $
-  "lang" ~> "cx" ~> "g" ~> "term" ~>
-  "constraints" <~ Coders.languageConstraints (var "lang") $
-  "litmap" <~ adaptLiteralTypesMap @@ var "constraints" $
-  adaptTerm @@ var "constraints" @@ var "litmap" @@ var "cx" @@ var "g" @@ var "term"
-
-composeCoders :: TTermDefinition (Coder a b -> Coder b c -> Coder a c)
-composeCoders = define "composeCoders" $
-  doc "Compose two coders into a single coder" $
-  "c1" ~> "c2" ~>
-  Coders.coder
-    ("cx" ~> "a" ~>
-      "b1" <<~ Coders.coderEncode (var "c1") @@ var "cx" @@ var "a" $
-      Coders.coderEncode (var "c2") @@ var "cx" @@ var "b1")
-    ("cx" ~> "c" ~>
-      "b2" <<~ Coders.coderDecode (var "c2") @@ var "cx" @@ var "c" $
-      Coders.coderDecode (var "c1") @@ var "cx" @@ var "b2")
-
-simpleLanguageAdapter :: TTermDefinition (Language -> Context -> Graph -> Type -> Prelude.Either Error (Adapter Type Type Term Term))
-simpleLanguageAdapter = define "simpleLanguageAdapter" $
-  doc "Given a target language and a source type, produce an adapter which rewrites the type and its terms according to the language's constraints. The encode direction adapts terms; the decode direction is identity." $
-  "lang" ~> "cx" ~> "g" ~> "typ" ~>
-  "constraints" <~ Coders.languageConstraints (var "lang") $
-  "litmap" <~ adaptLiteralTypesMap @@ var "constraints" $
-  "adaptedType" <<~ adaptType @@ var "constraints" @@ var "litmap" @@ var "typ" $
-  right $ Coders.adapter
-    false
-    (var "typ")
-    (var "adaptedType")
-    (Coders.coder
-      ("cx" ~> "term" ~>
-          adaptTerm @@ var "constraints" @@ var "litmap" @@ var "cx" @@ var "g" @@ var "term")
-      ("cx" ~> "term" ~> right $ var "term"))
-
-
---------------------------------------------------------------------------------
--- Type preparation functions
--- TODO: these functions duplicate logic already in adaptFloatType, adaptIntegerType,
--- adaptLiteralType, etc. above. They differ in that they return a triple of
--- (adapted type, term transformer, diagnostic messages) rather than just the adapted type.
--- They should be simplified or eliminated in a future refactoring pass.
---------------------------------------------------------------------------------
-
--- | Prepare a literal type, substituting unsupported types.
--- Returns (adapted literal type, literal value transformer, diagnostic messages).
-prepareLiteralType :: TTermDefinition (LiteralType -> (LiteralType, Literal -> Literal, S.Set String))
-prepareLiteralType = define "prepareLiteralType" $
-  doc "Prepare a literal type, substituting unsupported types" $
-  lambda "at" $
-    (cases _LiteralType (var "at") (Just (prepareSame @@ var "at")) [
-      _LiteralType_binary>>: (constant $
-        triple
-          (Core.literalTypeString)
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_binary>>: ("b" ~> inject _Literal _Literal_string (Literals.binaryToString (var "b")))])
-          (Sets.fromList $ list [string "replace binary strings with character strings"])),
-      _LiteralType_decimal>>: (constant $
-        triple
-          (Core.literalTypeFloat Core.floatTypeFloat64)
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_decimal>>: ("d" ~> inject _Literal _Literal_float (inject _FloatValue _FloatValue_float64 (Literals.decimalToFloat64 (var "d"))))])
-          (Sets.fromList $ list [string "replace arbitrary-precision decimal numbers with 64-bit floating-point numbers (doubles)"])),
-      _LiteralType_float>>: ("ft" ~> lets [
-        "result">: prepareFloatType @@ var "ft",
-        "rtyp">: Pairs.first (var "result"),
-        "rep">: Pairs.first (Pairs.second (var "result")),
-        "msgs">: Pairs.second (Pairs.second (var "result"))] $
-        triple
-          (Core.literalTypeFloat (var "rtyp"))
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_float>>: ("fv" ~> inject _Literal _Literal_float (var "rep" @@ var "fv"))])
-          (var "msgs")),
-      _LiteralType_integer>>: ("it" ~> lets [
-        "result">: prepareIntegerType @@ var "it",
-        "rtyp">: Pairs.first (var "result"),
-        "rep">: Pairs.first (Pairs.second (var "result")),
-        "msgs">: Pairs.second (Pairs.second (var "result"))] $
-        triple
-          (Core.literalTypeInteger (var "rtyp"))
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_integer>>: ("iv" ~> inject _Literal _Literal_integer (var "rep" @@ var "iv"))])
-          (var "msgs"))])
-
--- | Prepare a float type, substituting unsupported types.
-prepareFloatType :: TTermDefinition (FloatType -> (FloatType, FloatValue -> FloatValue, S.Set String))
-prepareFloatType = define "prepareFloatType" $
-  doc "Prepare a float type, substituting unsupported types" $
-  lambda "ft" $
-    (cases _FloatType (var "ft") (Just (prepareSame @@ var "ft")) [
-      _FloatType_bigfloat>>: (constant $
-        triple
-          Core.floatTypeFloat64
-          ("v" ~> cases _FloatValue (var "v") (Just (var "v")) [
-            _FloatValue_bigfloat>>: ("d" ~> inject _FloatValue _FloatValue_float64 (Literals.bigfloatToFloat64 (var "d")))])
-          (Sets.fromList $ list [string "replace arbitrary-precision floating-point numbers with 64-bit floating-point numbers (doubles)"]))])
-
--- | Prepare an integer type, substituting unsupported types.
-prepareIntegerType :: TTermDefinition (IntegerType -> (IntegerType, IntegerValue -> IntegerValue, S.Set String))
-prepareIntegerType = define "prepareIntegerType" $
-  doc "Prepare an integer type, substituting unsupported types" $
-  lambda "it" $
-    (cases _IntegerType (var "it") (Just (prepareSame @@ var "it")) [
-      _IntegerType_bigint>>: (constant $
-        triple
-          Core.integerTypeInt64
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_bigint>>: ("i" ~> inject _IntegerValue _IntegerValue_int64 (Literals.bigintToInt64 (var "i")))])
-          (Sets.fromList $ list [string "replace arbitrary-precision integers with 64-bit integers"])),
-      _IntegerType_uint8>>: (constant $
-        triple
-          Core.integerTypeInt8
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_uint8>>: ("i" ~> inject _IntegerValue _IntegerValue_int8 (Literals.bigintToInt8 (Literals.uint8ToBigint (var "i"))))])
-          (Sets.fromList $ list [string "replace unsigned 8-bit integers with signed 8-bit integers"])),
-      _IntegerType_uint32>>: (constant $
-        triple
-          Core.integerTypeInt32
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_uint32>>: ("i" ~> inject _IntegerValue _IntegerValue_int32 (Literals.bigintToInt32 (Literals.uint32ToBigint (var "i"))))])
-          (Sets.fromList $ list [string "replace unsigned 32-bit integers with signed 32-bit integers"])),
-      _IntegerType_uint64>>: (constant $
-        triple
-          Core.integerTypeInt64
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_uint64>>: ("i" ~> inject _IntegerValue _IntegerValue_int64 (Literals.bigintToInt64 (Literals.uint64ToBigint (var "i"))))])
-          (Sets.fromList $ list [string "replace unsigned 64-bit integers with signed 64-bit integers"]))])
-
--- | Prepare a type, substituting unsupported literal types.
-prepareType :: TTermDefinition (Graph -> Type -> (Type, Term -> Term, S.Set String))
-prepareType = define "prepareType" $
-  doc "Prepare a type, substituting unsupported literal types" $
-  lambda "cx" $ lambda "typ" $
-    (cases _Type (Strip.deannotateType @@ var "typ") (Just (prepareSame @@ var "typ")) [
-      _Type_literal>>: ("at" ~> lets [
-        "result">: prepareLiteralType @@ var "at",
-        "rtyp">: Pairs.first (var "result"),
-        "rep">: Pairs.first (Pairs.second (var "result")),
-        "msgs">: Pairs.second (Pairs.second (var "result"))] $
-        triple
-          (MetaTypes.literal (var "rtyp"))
-          ("v" ~> cases _Term (var "v") (Just (var "v")) [
-            _Term_literal>>: ("av" ~> inject _Term _Term_literal (var "rep" @@ var "av"))])
-          (var "msgs"))])
-
--- | Return a value unchanged with identity transform and no messages.
-prepareSame :: TTermDefinition (a -> (a, b -> b, S.Set c))
-prepareSame = define "prepareSame" $
-  doc "Return a value unchanged with identity transform and no messages" $
-  lambda "x" $
-    triple (var "x") ("y" ~> var "y") (Sets.empty)
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/All.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/All.hs
+++ /dev/null
@@ -1,202 +0,0 @@
--- | All of Hydra's term-level kernel modules
-module Hydra.Sources.Kernel.Terms.All where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.Analysis        as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Annotations     as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity           as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking        as Checking
-import qualified Hydra.Sources.Kernel.Terms.Generation      as Generation
-import qualified Hydra.Sources.Kernel.Terms.Constants       as Constants
-import qualified Hydra.Sources.Kernel.Terms.Decoding        as Decoding
-import qualified Hydra.Sources.Kernel.Terms.Dependencies    as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Differentiation as Differentiation
-import qualified Hydra.Sources.Kernel.Terms.Dsls            as Dsls
-import qualified Hydra.Sources.Kernel.Terms.Encoding        as Encoding
-import qualified Hydra.Sources.Kernel.Terms.Environment     as Environment
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core    as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util    as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting      as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Hoisting        as Hoisting
-import qualified Hydra.Sources.Kernel.Terms.Inference       as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages       as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical         as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals        as Literals
-
-import qualified Hydra.Sources.Kernel.Lib.Names             as LibNames
-import qualified Hydra.Sources.Kernel.Terms.Names           as Names
-import qualified Hydra.Sources.Kernel.Terms.Parsers         as Parsers
-import qualified Hydra.Sources.Kernel.Terms.Predicates     as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Reduction       as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect         as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Resolution     as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Rewriting       as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Scoping         as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Serialization   as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Strip           as Strip
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths      as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core       as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors      as ShowErrors
-import qualified Hydra.Sources.Kernel.Terms.Show.Error.Core as ShowErrorCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph      as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants       as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing     as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Show.Util       as ShowUtil
-import qualified Hydra.Sources.Kernel.Terms.Sorting         as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution    as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates       as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification     as Unification
-import qualified Hydra.Sources.Kernel.Terms.Validate.Core  as ValidateCore
-import qualified Hydra.Sources.Kernel.Terms.Variables       as Variables
-import qualified Hydra.Sources.Kernel.Terms.Validate.Packaging as ValidatePackaging
-
--- Secondary, generated decoding modules
-import qualified Hydra.Sources.Decode.Paths          as DecodePaths
-import qualified Hydra.Sources.Decode.Ast           as DecodeAst
-import qualified Hydra.Sources.Decode.Classes       as DecodeClasses
-import qualified Hydra.Sources.Decode.Coders        as DecodeCoders
-import qualified Hydra.Sources.Decode.Context       as DecodeContext
-import qualified Hydra.Sources.Decode.Core          as DecodeCore
-import qualified Hydra.Sources.Decode.Errors         as DecodeErrors
-import qualified Hydra.Sources.Decode.Error.Checking as DecodeErrorChecking
-import qualified Hydra.Sources.Decode.Error.Core   as DecodeErrorCore
-import qualified Hydra.Sources.Decode.Json.Model    as DecodeJson
-import qualified Hydra.Sources.Decode.Packaging      as DecodeModule
-import qualified Hydra.Sources.Decode.Parsing       as DecodeParsing
-import qualified Hydra.Sources.Decode.Phantoms      as DecodePhantoms
-import qualified Hydra.Sources.Decode.Query         as DecodeQuery
-import qualified Hydra.Sources.Decode.Relational    as DecodeRelational
-import qualified Hydra.Sources.Decode.Tabular       as DecodeTabular
-import qualified Hydra.Sources.Decode.Testing       as DecodeTesting
-import qualified Hydra.Sources.Decode.Topology      as DecodeTopology
-import qualified Hydra.Sources.Decode.Typing        as DecodeTyping
-import qualified Hydra.Sources.Decode.Util          as DecodeUtil
-import qualified Hydra.Sources.Decode.Variants      as DecodeVariants
-
--- Secondary, generated encoding modules
-import qualified Hydra.Sources.Encode.Paths          as EncodePaths
-import qualified Hydra.Sources.Encode.Ast           as EncodeAst
-import qualified Hydra.Sources.Encode.Classes       as EncodeClasses
-import qualified Hydra.Sources.Encode.Coders        as EncodeCoders
-import qualified Hydra.Sources.Encode.Context       as EncodeContext
-import qualified Hydra.Sources.Encode.Core          as EncodeCore
-import qualified Hydra.Sources.Encode.Errors         as EncodeErrors
-import qualified Hydra.Sources.Encode.Error.Checking as EncodeErrorChecking
-import qualified Hydra.Sources.Encode.Error.Core   as EncodeErrorCore
-import qualified Hydra.Sources.Encode.Json.Model    as EncodeJson
-import qualified Hydra.Sources.Encode.Packaging      as EncodeModule
-import qualified Hydra.Sources.Encode.Parsing       as EncodeParsing
-import qualified Hydra.Sources.Encode.Phantoms      as EncodePhantoms
-import qualified Hydra.Sources.Encode.Query         as EncodeQuery
-import qualified Hydra.Sources.Encode.Relational    as EncodeRelational
-import qualified Hydra.Sources.Encode.Tabular       as EncodeTabular
-import qualified Hydra.Sources.Encode.Testing       as EncodeTesting
-import qualified Hydra.Sources.Encode.Topology      as EncodeTopology
-import qualified Hydra.Sources.Encode.Typing        as EncodeTyping
-import qualified Hydra.Sources.Encode.Util          as EncodeUtil
-import qualified Hydra.Sources.Encode.Variants      as EncodeVariants
-
-
-kernelTermsModules :: [Module]
-kernelTermsModules = kernelPrimaryTermsModules ++ kernelDecodingModules ++ kernelEncodingModules
-
-kernelPrimaryTermsModules :: [Module]
-kernelPrimaryTermsModules = [
-  Adapt.module_,
-  Analysis.module_,
-  Annotations.module_,
-  Arity.module_,
-  Checking.module_,
-  Generation.module_,
-  Constants.module_,
-  Decoding.module_,
-  Dependencies.module_,
-  Differentiation.module_,
---  Dsls.module_,
-  Encoding.module_,
-  Environment.module_,
-  ExtractCore.module_,
-  ExtractUtil.module_,
-  Formatting.module_,
-  Hoisting.module_,
-  Inference.module_,
-  Languages.module_,
-  Lexical.module_,
-  LibNames.module_,
-  Literals.module_,
-
-  Names.module_,
-  Parsers.module_,
-  Predicates.module_,
-  Reduction.module_,
-  Reflect.module_,
-  Resolution.module_,
-  Rewriting.module_,
-  Scoping.module_,
-  Serialization.module_,
-  Strip.module_,
-  ShowPaths.module_,
-  ShowCore.module_,
-  ShowErrors.module_,
-  ShowErrorCore.module_,
-  ShowGraph.module_,
-  ShowVariants.module_,
-  ShowTyping.module_,
-  ShowUtil.module_,
-  Sorting.module_,
-  Substitution.module_,
-  Templates.module_,
-  Unification.module_,
-  ValidateCore.module_,
-  ValidatePackaging.module_,
-  Variables.module_]
-
-kernelDecodingModules :: [Module]
-kernelDecodingModules = [
-  DecodePaths.module_,
-  DecodeAst.module_,
-  DecodeClasses.module_,
-  DecodeCoders.module_,
-  DecodeContext.module_,
-  DecodeCore.module_,
-  DecodeErrors.module_,
-  DecodeErrorChecking.module_,
-  DecodeErrorCore.module_,
-  DecodeJson.module_,
-  DecodeModule.module_,
-  DecodeParsing.module_,
-  DecodePhantoms.module_,
-  DecodeQuery.module_,
-  DecodeRelational.module_,
-  DecodeTabular.module_,
-    DecodeTesting.module_,
-  DecodeTopology.module_,
-  DecodeTyping.module_,
-  DecodeUtil.module_,
-  DecodeVariants.module_]
-
-kernelEncodingModules :: [Module]
-kernelEncodingModules = [
-  EncodePaths.module_,
-  EncodeAst.module_,
-  EncodeClasses.module_,
-  EncodeCoders.module_,
-  EncodeContext.module_,
-  EncodeCore.module_,
-  EncodeErrors.module_,
-  EncodeErrorChecking.module_,
-  EncodeErrorCore.module_,
-  EncodeJson.module_,
-  EncodeModule.module_,
-  EncodeParsing.module_,
-  EncodePhantoms.module_,
-  EncodeQuery.module_,
-  EncodeRelational.module_,
-  EncodeTabular.module_,
-    EncodeTesting.module_,
-  EncodeTopology.module_,
-  EncodeTyping.module_,
-  EncodeUtil.module_,
-  EncodeVariants.module_]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Analysis.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Analysis.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Analysis.hs
+++ /dev/null
@@ -1,523 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Analysis where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  addNamesToNamespaces,
-  analyzeFunctionTerm,
-  analyzeFunctionTermWith,
-  analyzeFunctionTermWith_finish,
-  analyzeFunctionTermWith_gather,
-  definitionDependencyNamespaces,
-  dependencyNamespaces,
-  gatherApplications,
-  gatherArgs,
-  gatherArgsWithTypeApps,
-  isSimpleAssignment,
-  isSelfTailRecursive,
-  isTailRecursiveInTailPosition,
-  moduleContainsBinaryLiterals,
-  moduleContainsDecimalLiterals,
-  moduleDependencyNamespaces,
-  namespacesForDefinitions)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Annotations  as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity        as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking     as Checking
-import qualified Hydra.Sources.Kernel.Terms.Dependencies  as Dependencies
-import qualified Hydra.Sources.Decode.Core  as DecodeCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Names        as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting    as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Scoping      as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Strip        as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables    as Variables
-
-import qualified Hydra.Sources.Kernel.Terms.Predicates   as Predicates
-
-
-ns :: Namespace
-ns = Namespace "hydra.analysis"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, Arity.ns, Checking.ns, Dependencies.ns, moduleNamespace DecodeCore.module_, Lexical.ns, Names.ns, Predicates.ns, Rewriting.ns, Scoping.ns, Strip.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Module dependency namespace analysis")}
-  where
-    definitions = [
-      toDefinition addNamesToNamespaces,
-      toDefinition analyzeFunctionTerm,
-      toDefinition analyzeFunctionTermWith,
-      toDefinition analyzeFunctionTermWith_finish,
-      toDefinition analyzeFunctionTermWith_gather,
-      toDefinition definitionDependencyNamespaces,
-      toDefinition dependencyNamespaces,
-      toDefinition gatherApplications,
-      toDefinition gatherArgs,
-      toDefinition gatherArgsWithTypeApps,
-      toDefinition isSimpleAssignment,
-      toDefinition isSelfTailRecursive,
-      toDefinition isTailRecursiveInTailPosition,
-      toDefinition moduleContainsBinaryLiterals,
-      toDefinition moduleContainsDecimalLiterals,
-      toDefinition moduleDependencyNamespaces,
-      toDefinition namespacesForDefinitions]
-
-addNamesToNamespaces :: TTermDefinition ((Namespace -> a) -> S.Set Name -> Namespaces a -> Namespaces a)
-addNamesToNamespaces = define "addNamesToNamespaces" $
-  doc "Add names to existing namespaces mapping" $
-  "encodeNamespace" ~> "names" ~> "ns0" ~>
---  "nss" <~ Sets.empty $
-  "nss" <~ Sets.fromList (Maybes.cat $ Lists.map (Names.namespaceOf) $ Sets.toList $ var "names") $
-  "toPair" <~ ("ns" ~> pair (var "ns") (var "encodeNamespace" @@ var "ns")) $
-  Packaging.namespacesWithMapping (var "ns0") $ Maps.union
-    (Packaging.namespacesMapping $ var "ns0")
-    (Maps.fromList $ Lists.map (var "toPair") $ Sets.toList $ var "nss")
-
-analyzeFunctionTerm :: TTermDefinition (
-  Context ->
-  (env -> Graph) ->
-  (Graph -> env -> env) ->
-  env ->
-  Term ->
-  Either Error (FunctionStructure env))
-analyzeFunctionTerm = define "analyzeFunctionTerm" $
-  doc "Analyze a function term, collecting lambdas, type lambdas, lets, and type applications" $
-  "cx" ~> "getTC" ~> "setTC" ~> "env" ~> "term" ~>
-  analyzeFunctionTermWith @@ var "cx"
-    @@ ("g" ~> "b" ~> Logic.ifElse (Predicates.isComplexBinding @@ var "g" @@ var "b") (just MetaTerms.true) nothing)
-    @@ var "getTC" @@ var "setTC" @@ var "env" @@ var "term"
-
-analyzeFunctionTermWith :: TTermDefinition (
-  Context ->
-  (Graph -> Binding -> Maybe Term) ->
-  (env -> Graph) ->
-  (Graph -> env -> env) ->
-  env ->
-  Term ->
-  Either Error (FunctionStructure env))
-analyzeFunctionTermWith = define "analyzeFunctionTermWith" $
-  doc "Analyze a function term with configurable binding metadata" $
-  "cx" ~> "forBinding" ~> "getTC" ~> "setTC" ~> "env" ~> "term" ~>
-  analyzeFunctionTermWith_gather @@ var "cx" @@ var "forBinding" @@ var "getTC" @@ var "setTC"
-    @@ boolean True @@ var "env"
-    @@ list ([] :: [TTerm Name])
-    @@ list ([] :: [TTerm Name])
-    @@ list ([] :: [TTerm Binding])
-    @@ list ([] :: [TTerm Type])
-    @@ list ([] :: [TTerm Type])
-    @@ var "term"
-
-analyzeFunctionTermWith_finish :: TTermDefinition (
-  Context ->
-  (env -> Graph) ->
-  env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term ->
-  Either Error (FunctionStructure env))
-analyzeFunctionTermWith_finish = define "analyzeFunctionTermWith_finish" $
-  "cx" ~> "getTC" ~> "fEnv" ~> "tparams" ~> "args" ~> "bindings" ~> "doms" ~> "tapps" ~> "body" ~>
-  "bodyWithTapps" <~ Lists.foldl
-    ("trm" ~> "typ" ~> Core.termTypeApplication (Core.typeApplicationTerm (var "trm") (var "typ")))
-    (var "body")
-    (var "tapps") $
-  -- Use typeOfTerm but fall back to Nothing if type inference fails (e.g. for untyped hoisted bindings)
-  "mcod" <~ Eithers.either_ (constant nothing) ("c" ~> just (var "c"))
-    (Checking.typeOfTerm @@ var "cx" @@ (var "getTC" @@ var "fEnv") @@ var "bodyWithTapps") $
-  right $ record _FunctionStructure [
-    _FunctionStructure_typeParams>>: Lists.reverse (var "tparams"),
-    _FunctionStructure_params>>: Lists.reverse (var "args"),
-    _FunctionStructure_bindings>>: var "bindings",
-    _FunctionStructure_body>>: var "bodyWithTapps",
-    _FunctionStructure_domains>>: Lists.reverse (var "doms"),
-    _FunctionStructure_codomain>>: var "mcod",
-    _FunctionStructure_environment>>: var "fEnv"]
-
-analyzeFunctionTermWith_gather :: TTermDefinition (
-  Context ->
-  (Graph -> Binding -> Maybe Term) ->
-  (env -> Graph) ->
-  (Graph -> env -> env) ->
-  Bool -> env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term ->
-  Either Error (FunctionStructure env))
-analyzeFunctionTermWith_gather = define "analyzeFunctionTermWith_gather" $
-  "cx" ~> "forBinding" ~> "getTC" ~> "setTC" ~>
-  "argMode" ~> "gEnv" ~> "tparams" ~> "args" ~> "bindings" ~> "doms" ~> "tapps" ~> "t" ~>
-  cases _Term (Strip.deannotateTerm @@ var "t")
-    (Just $ analyzeFunctionTermWith_finish @@ var "cx" @@ var "getTC" @@ var "gEnv" @@ var "tparams" @@ var "args" @@ var "bindings" @@ var "doms" @@ var "tapps" @@ var "t") [
-    _Term_lambda>>: "lam" ~>
-      Logic.ifElse (var "argMode")
-        ("v" <~ Core.lambdaParameter (var "lam") $
-         "dom" <~ Maybes.maybe (Core.typeVariable (Core.name (string "_"))) identity (Core.lambdaDomain (var "lam")) $
-         "body" <~ Core.lambdaBody (var "lam") $
-         "newEnv" <~ (var "setTC" @@ (Scoping.extendGraphForLambda @@ (var "getTC" @@ var "gEnv") @@ var "lam") @@ var "gEnv") $
-         analyzeFunctionTermWith_gather @@ var "cx" @@ var "forBinding" @@ var "getTC" @@ var "setTC"
-           @@ var "argMode" @@ var "newEnv"
-           @@ var "tparams"
-           @@ (Lists.cons (var "v") (var "args"))
-           @@ var "bindings"
-           @@ (Lists.cons (var "dom") (var "doms"))
-           @@ var "tapps"
-           @@ var "body")
-        (analyzeFunctionTermWith_finish @@ var "cx" @@ var "getTC" @@ var "gEnv" @@ var "tparams" @@ var "args" @@ var "bindings" @@ var "doms" @@ var "tapps" @@ var "t"),
-    _Term_let>>: "lt" ~>
-      "newBindings" <~ Core.letBindings (var "lt") $
-      "body" <~ Core.letBody (var "lt") $
-      "newEnv" <~ (var "setTC" @@ (Scoping.extendGraphForLet @@ var "forBinding" @@ (var "getTC" @@ var "gEnv") @@ var "lt") @@ var "gEnv") $
-      analyzeFunctionTermWith_gather @@ var "cx" @@ var "forBinding" @@ var "getTC" @@ var "setTC"
-        @@ boolean False @@ var "newEnv"
-        @@ var "tparams"
-        @@ var "args"
-        @@ (Lists.concat2 (var "bindings") (var "newBindings"))
-        @@ var "doms"
-        @@ var "tapps"
-        @@ var "body",
-    _Term_typeApplication>>: "ta" ~>
-      "taBody" <~ Core.typeApplicationTermBody (var "ta") $
-      "typ" <~ Core.typeApplicationTermType (var "ta") $
-      analyzeFunctionTermWith_gather @@ var "cx" @@ var "forBinding" @@ var "getTC" @@ var "setTC"
-        @@ var "argMode" @@ var "gEnv"
-        @@ var "tparams"
-        @@ var "args"
-        @@ var "bindings"
-        @@ var "doms"
-        @@ (Lists.cons (var "typ") (var "tapps"))
-        @@ var "taBody",
-    _Term_typeLambda>>: "tl" ~>
-      "tvar" <~ Core.typeLambdaParameter (var "tl") $
-      "tlBody" <~ Core.typeLambdaBody (var "tl") $
-      "newEnv" <~ (var "setTC" @@ (Scoping.extendGraphForTypeLambda @@ (var "getTC" @@ var "gEnv") @@ var "tl") @@ var "gEnv") $
-      analyzeFunctionTermWith_gather @@ var "cx" @@ var "forBinding" @@ var "getTC" @@ var "setTC"
-        @@ var "argMode" @@ var "newEnv"
-        @@ (Lists.cons (var "tvar") (var "tparams"))
-        @@ var "args"
-        @@ var "bindings"
-        @@ var "doms"
-        @@ var "tapps"
-        @@ var "tlBody"]
-
-definitionDependencyNamespaces :: TTermDefinition ([Definition] -> S.Set Namespace)
-definitionDependencyNamespaces = define "definitionDependencyNamespaces" $
-  doc "Get dependency namespaces from definitions" $
-  "defs" ~>
-  "defNames" <~ ("def" ~> cases _Definition (var "def")
-    Nothing [
-    _Definition_type>>: "typeDef" ~>
-      Dependencies.typeDependencyNames @@ true @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "typeDef")),
-    _Definition_term>>: "termDef" ~>
-      Dependencies.termDependencyNames @@ true @@ true @@ true @@ Packaging.termDefinitionTerm (var "termDef")]) $
-  "allNames" <~ Sets.unions (Lists.map (var "defNames") (var "defs")) $
-  Sets.fromList (Maybes.cat (Lists.map (Names.namespaceOf) (Sets.toList (var "allNames"))))
-
-dependencyNamespaces :: TTermDefinition (Context -> Graph -> Bool -> Bool -> Bool -> Bool -> [Binding] -> Either Error (S.Set Namespace))
-dependencyNamespaces = define "dependencyNamespaces" $
-  doc "Find dependency namespaces in all of a set of terms (Either version)" $
-  "cx" ~> "graph" ~> "binds" ~> "withPrims" ~> "withNoms" ~> "withSchema" ~> "els" ~>
-  "depNames" <~ ("el" ~>
-    "term" <~ Core.bindingTerm (var "el") $
-    "deannotatedTerm" <~ Strip.deannotateTerm @@ var "term" $
-    "dataNames" <~ Dependencies.termDependencyNames @@ var "binds" @@ var "withPrims" @@ var "withNoms" @@ var "term" $
-    "schemaNames" <~ Logic.ifElse (var "withSchema")
-      (Maybes.maybe Sets.empty
-        ("ts" ~> Dependencies.typeDependencyNames @@ true @@ Core.typeSchemeBody (var "ts"))
-        (Core.bindingTypeScheme (var "el")))
-      Sets.empty $
-    -- Handle encoded types: decode as Type and extract type dependency names
-    Logic.ifElse (Predicates.isEncodedType @@ var "deannotatedTerm")
-      (Eithers.map ("typ" ~> Sets.unions (list [
-          var "dataNames", var "schemaNames",
-          Dependencies.typeDependencyNames @@ true @@ var "typ"]))
-        (Eithers.bimap ("_e" ~> Error.errorDecoding $ var "_e") ("_a" ~> var "_a")
-            (decoderFor _Type @@ var "graph" @@ var "term")))
-      -- Handle encoded terms: decode as Term and extract term dependency names
-      (Logic.ifElse (Predicates.isEncodedTerm @@ var "deannotatedTerm")
-        (Eithers.map ("decodedTerm" ~> Sets.unions (list [
-            var "dataNames", var "schemaNames",
-            Dependencies.termDependencyNames @@ var "binds" @@ var "withPrims" @@ var "withNoms" @@ var "decodedTerm"]))
-          (Eithers.bimap ("_e" ~> Error.errorDecoding $ var "_e") ("_a" ~> var "_a")
-              (decoderFor _Term @@ var "graph" @@ var "term")))
-        (right (Sets.unions (list [var "dataNames", var "schemaNames"]))))) $
-  Eithers.map ("namesList" ~> Sets.fromList (Maybes.cat (Lists.map (Names.namespaceOf) (
-      Sets.toList (Sets.unions (var "namesList"))))))
-    (Eithers.mapList (var "depNames") (var "els"))
-
-gatherApplications :: TTermDefinition (Term -> ([Term], Term))
-gatherApplications = define "gatherApplications" $
-  doc "Gather applications from a term, returning (args, baseTerm)" $
-  "term" ~>
-  -- Use a local recursive helper with an accumulator
-  "go" <~ ("args" ~> "t" ~>
-    cases _Term (Strip.deannotateTerm @@ var "t")
-      (Just $ pair (var "args") (var "t")) [
-      _Term_application>>: "app" ~>
-        "lhs" <~ Core.applicationFunction (var "app") $
-        "rhs" <~ Core.applicationArgument (var "app") $
-        var "go" @@ (Lists.cons (var "rhs") (var "args")) @@ var "lhs"]) $
-  var "go" @@ (list ([] :: [TTerm Term])) @@ var "term"
-
-gatherArgs :: TTermDefinition (Term -> [Term] -> (Term, [Term]))
-gatherArgs = define "gatherArgs" $
-  doc "Gather term arguments, stripping type-level constructs" $
-  "term" ~> "args" ~>
-  cases _Term (Strip.deannotateTerm @@ var "term")
-    (Just $ pair (var "term") (var "args")) [
-    _Term_application>>: "app" ~>
-      "lhs" <~ Core.applicationFunction (var "app") $
-      "rhs" <~ Core.applicationArgument (var "app") $
-      gatherArgs @@ var "lhs" @@ (Lists.cons (var "rhs") (var "args")),
-    _Term_typeLambda>>: "tl" ~>
-      "body" <~ Core.typeLambdaBody (var "tl") $
-      gatherArgs @@ var "body" @@ var "args",
-    _Term_typeApplication>>: "ta" ~>
-      "body" <~ Core.typeApplicationTermBody (var "ta") $
-      gatherArgs @@ var "body" @@ var "args"]
-
-gatherArgsWithTypeApps :: TTermDefinition (Term -> [Term] -> [Type] -> (Term, [Term], [Type]))
-gatherArgsWithTypeApps = define "gatherArgsWithTypeApps" $
-  doc "Gather term and type arguments from a term" $
-  "term" ~> "args" ~> "tyArgs" ~>
-  cases _Term (Strip.deannotateTerm @@ var "term")
-    (Just $ triple (var "term") (var "args") (var "tyArgs")) [
-    _Term_application>>: "app" ~>
-      "lhs" <~ Core.applicationFunction (var "app") $
-      "rhs" <~ Core.applicationArgument (var "app") $
-      gatherArgsWithTypeApps @@ var "lhs" @@ (Lists.cons (var "rhs") (var "args")) @@ var "tyArgs",
-    _Term_typeLambda>>: "tl" ~>
-      "body" <~ Core.typeLambdaBody (var "tl") $
-      gatherArgsWithTypeApps @@ var "body" @@ var "args" @@ var "tyArgs",
-    _Term_typeApplication>>: "ta" ~>
-      "body" <~ Core.typeApplicationTermBody (var "ta") $
-      "typ" <~ Core.typeApplicationTermType (var "ta") $
-      gatherArgsWithTypeApps @@ var "body" @@ var "args" @@ (Lists.cons (var "typ") (var "tyArgs"))]
-
-isSelfTailRecursive :: TTermDefinition (Name -> Term -> Bool)
-isSelfTailRecursive = define "isSelfTailRecursive" $
-  doc "Check if a term body is self-tail-recursive with respect to a function name" $
-  "funcName" ~> "body" ~>
-    -- isFreeVariableInTerm returns True when v is NOT free (not present).
-    -- So Logic.not means: the name IS present as a free variable.
-    "callsSelf" <~ Logic.not (Variables.isFreeVariableInTerm @@ var "funcName" @@ var "body") $
-    Logic.ifElse (var "callsSelf")
-      (isTailRecursiveInTailPosition @@ var "funcName" @@ var "body")
-      false
-
-isSimpleAssignment :: TTermDefinition (Term -> Bool)
-isSimpleAssignment = define "isSimpleAssignment" $
-  doc "Check if a term can be encoded as a simple assignment" $
-  "term" ~>
-  cases _Term (var "term")
-    (Just $
-      -- Check if the base term (after gathering args) is a union elimination
-      "baseTerm" <~ Pairs.first (gatherArgs @@ var "term" @@ list ([] :: [TTerm Term])) $
-      cases _Term (var "baseTerm")
-        (Just $ boolean True) [
-        _Term_cases>>: constant (boolean False)]) [
-    _Term_annotated>>: "at" ~>
-      isSimpleAssignment @@ (Core.annotatedTermBody $ var "at"),
-    _Term_lambda>>: constant (boolean False),
-    _Term_let>>: constant (boolean False),
-    _Term_typeLambda>>: constant (boolean False),
-    _Term_typeApplication>>: "ta" ~>
-      isSimpleAssignment @@ (Core.typeApplicationTermBody $ var "ta")]
-
-isTailRecursiveInTailPosition :: TTermDefinition (Name -> Term -> Bool)
-isTailRecursiveInTailPosition = define "isTailRecursiveInTailPosition" $
-  doc "Check that all self-references are in tail position" $
-  "funcName" ~> "term" ~>
-    "stripped" <~ (Strip.deannotateAndDetypeTerm @@ var "term") $
-    cases _Term (var "stripped") (Just $
-      -- Default: funcName must NOT appear free in this term (not a recognized tail position)
-      Variables.isFreeVariableInTerm @@ var "funcName" @@ var "term") [
-      -- Application: check if it's a self-tail-call or a case statement application
-      _Term_application>>: "app" ~>
-        "gathered" <~ (gatherApplications @@ var "stripped") $
-        "gatherArgs" <~ (Pairs.first $ var "gathered") $
-        "gatherFun" <~ (Pairs.second $ var "gathered") $
-        "strippedFun" <~ (Strip.deannotateAndDetypeTerm @@ var "gatherFun") $
-        cases _Term (var "strippedFun") (Just $
-          -- Unknown function form: funcName must not appear anywhere
-          Variables.isFreeVariableInTerm @@ var "funcName" @@ var "term") [
-          -- Variable: check if self-call
-          _Term_variable>>: "vname" ~>
-            Logic.ifElse (Equality.equal (var "vname") (var "funcName"))
-              -- Self-call in tail position: args must not contain funcName
-              -- and must not contain lambdas (closures over parameters break TCO
-              -- because Python closures capture by reference, not by value)
-              ("argsNoFunc" <~ (Lists.foldl
-                ("ok" ~> "arg" ~>
-                  Logic.and (var "ok")
-                    (Variables.isFreeVariableInTerm @@ var "funcName" @@ var "arg"))
-                true
-                (var "gatherArgs")) $
-               "argsNoLambda" <~ (Lists.foldl
-                ("ok" ~> "arg" ~>
-                  Logic.and (var "ok")
-                    (Logic.not $ Rewriting.foldOverTerm @@ Coders.traversalOrderPre
-                      @@ ("found" ~> "t" ~>
-                        Logic.or (var "found")
-                          (cases _Term (var "t") (Just false) [
-                            _Term_lambda>>: "lam" ~>
-                              -- Any lambda in an argument disqualifies from TCO
-                              "ignore" <~ (Core.lambdaBody $ var "lam") $
-                              true]))
-                      @@ false
-                      @@ var "arg"))
-                true
-                (var "gatherArgs")) $
-               Logic.and (var "argsNoFunc") (var "argsNoLambda"))
-              -- Not a self-call: funcName must not appear anywhere in the term
-              (Variables.isFreeVariableInTerm @@ var "funcName" @@ var "term"),
-          -- Cases: case statement (union elimination)
-          _Term_cases>>: "cs" ~>
-            "cases_" <~ (Core.caseStatementCases $ var "cs") $
-            "dflt" <~ (Core.caseStatementDefault $ var "cs") $
-            -- All case branches must have funcName only in tail position
-            "branchesOk" <~ (Lists.foldl
-              ("ok" ~> "field" ~>
-                Logic.and (var "ok")
-                  (isTailRecursiveInTailPosition @@ var "funcName" @@ Core.fieldTerm (var "field")))
-              true
-              (var "cases_")) $
-            -- Default branch (if present) must also be tail-recursive
-            "dfltOk" <~ (Maybes.maybe true
-              ("d" ~> isTailRecursiveInTailPosition @@ var "funcName" @@ var "d")
-              (var "dflt")) $
-            -- Arguments to the case statement must NOT contain funcName
-            "argsOk" <~ (Lists.foldl
-              ("ok" ~> "arg" ~>
-                Logic.and (var "ok")
-                  (Variables.isFreeVariableInTerm @@ var "funcName" @@ var "arg"))
-              true
-              (var "gatherArgs")) $
-            Logic.and (Logic.and (var "branchesOk") (var "dfltOk")) (var "argsOk")],
-      -- Lambda: tail position is the body
-      _Term_lambda>>: "lam" ~>
-        isTailRecursiveInTailPosition @@ var "funcName" @@ (Core.lambdaBody $ var "lam"),
-      -- Let: tail position is the body; bindings must not contain funcName
-      _Term_let>>: "lt" ~>
-        "bindingsOk" <~ (Lists.foldl
-          ("ok" ~> "b" ~>
-            Logic.and (var "ok")
-              (Variables.isFreeVariableInTerm @@ var "funcName" @@ Core.bindingTerm (var "b")))
-          true
-          (Core.letBindings $ var "lt")) $
-        Logic.and (var "bindingsOk")
-          (isTailRecursiveInTailPosition @@ var "funcName" @@ (Core.letBody $ var "lt"))]
-
-moduleContainsBinaryLiterals :: TTermDefinition (Module -> Bool)
-moduleContainsBinaryLiterals = define "moduleContainsBinaryLiterals" $
-  doc "Check whether a module contains any binary literal values" $
-  "mod" ~>
-  "checkTerm" <~ ("found" ~> "term" ~> Logic.or (var "found") $
-    cases _Term (var "term") (Just false) [
-      _Term_literal>>: "lit" ~>
-        cases _Literal (var "lit") (Just false) [
-          _Literal_binary>>: constant true]]) $
-  "termContainsBinary" <~ ("term" ~>
-    Rewriting.foldOverTerm @@ Coders.traversalOrderPre @@ var "checkTerm" @@ false @@ var "term") $
-  "defTerms" <~ Maybes.cat (Lists.map
-    ("d" ~> cases _Definition (var "d") (Just nothing) [
-      _Definition_term>>: "td" ~> just (Packaging.termDefinitionTerm $ var "td")])
-    (Packaging.moduleDefinitions (var "mod"))) $
-  Lists.foldl
-    ("acc" ~> "t" ~> Logic.or (var "acc") (var "termContainsBinary" @@ var "t"))
-    false
-    (var "defTerms")
-
-moduleContainsDecimalLiterals :: TTermDefinition (Module -> Bool)
-moduleContainsDecimalLiterals = define "moduleContainsDecimalLiterals" $
-  doc "Check whether a module contains any decimal literal values" $
-  "mod" ~>
-  "checkTerm" <~ ("found" ~> "term" ~> Logic.or (var "found") $
-    cases _Term (var "term") (Just false) [
-      _Term_literal>>: "lit" ~>
-        cases _Literal (var "lit") (Just false) [
-          _Literal_decimal>>: constant true]]) $
-  "termContainsDecimal" <~ ("term" ~>
-    Rewriting.foldOverTerm @@ Coders.traversalOrderPre @@ var "checkTerm" @@ false @@ var "term") $
-  "defTerms" <~ Maybes.cat (Lists.map
-    ("d" ~> cases _Definition (var "d") (Just nothing) [
-      _Definition_term>>: "td" ~> just (Packaging.termDefinitionTerm $ var "td")])
-    (Packaging.moduleDefinitions (var "mod"))) $
-  Lists.foldl
-    ("acc" ~> "t" ~> Logic.or (var "acc") (var "termContainsDecimal" @@ var "t"))
-    false
-    (var "defTerms")
-
-moduleDependencyNamespaces :: TTermDefinition (Context -> Graph -> Bool -> Bool -> Bool -> Bool -> Module -> Either Error (S.Set Namespace))
-moduleDependencyNamespaces = define "moduleDependencyNamespaces" $
-  doc "Find dependency namespaces in all elements of a module, excluding the module's own namespace (Either version)" $
-  "cx" ~> "graph" ~> "binds" ~> "withPrims" ~> "withNoms" ~> "withSchema" ~> "mod" ~>
-  "allBindings" <~ Maybes.cat (Lists.map
-    ("d" ~> cases _Definition (var "d") (Just nothing) [
-      _Definition_type>>: "td" ~>
-        just (Annotations.typeBinding @@ (Packaging.typeDefinitionName $ var "td") @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td")),
-      _Definition_term>>: "td" ~>
-        just (Core.binding (Packaging.termDefinitionName $ var "td") (Packaging.termDefinitionTerm $ var "td")
-          (Packaging.termDefinitionTypeScheme $ var "td"))])
-    (Packaging.moduleDefinitions (var "mod"))) $
-  Eithers.map
-    ("deps" ~> Sets.delete (Packaging.moduleNamespace (var "mod")) (var "deps"))
-    (dependencyNamespaces @@ var "cx" @@ var "graph" @@ var "binds" @@ var "withPrims" @@ var "withNoms" @@ var "withSchema" @@
-      (var "allBindings"))
-
-namespacesForDefinitions :: TTermDefinition ((Namespace -> a) -> Namespace -> [Definition] -> Namespaces a)
-namespacesForDefinitions = define "namespacesForDefinitions" $
-  doc "Create namespaces mapping for definitions" $
-  "encodeNamespace" ~> "focusNs" ~> "defs" ~>
-  "nss" <~ Sets.delete (var "focusNs") (definitionDependencyNamespaces @@ var "defs") $
-  "toPair" <~ ("ns" ~> pair (var "ns") (var "encodeNamespace" @@ var "ns")) $
-  Packaging.namespaces (var "toPair" @@ var "focusNs") (Maps.fromList (Lists.map (var "toPair") (Sets.toList (var "nss"))))
-
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Annotations.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Annotations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Annotations.hs
+++ /dev/null
@@ -1,466 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Annotations where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  aggregateAnnotations, commentsFromBinding, commentsFromFieldType,
-  debugIf, failOnFlag, getDebugId,
-  getAttr, getAttrWithDefault, getCount,
-  getDescription, getTermAnnotation, getTermDescription,
-  getType, getTypeAnnotation, getTypeClasses,
-  getTypeDescription, isNativeType, hasDescription, hasFlag,
-  hasTypeDescription, nextCount,
-  normalizeTermAnnotations, normalizeTypeAnnotations, putAttr, putCount,
-  resetCount, setAnnotation,
-  setDescription, setTermAnnotation, setTermDescription, setType, setTypeAnnotation, setTypeClasses,
-  setTypeDescription, termAnnotationInternal, typeAnnotationInternal, whenFlag)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Constants    as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Show.Core    as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Strip        as Strip
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors  as ShowError
-import qualified Hydra.Sources.Decode.Core            as DecodeCore
-import qualified Hydra.Sources.Encode.Core            as EncodeCore
-import Hydra.Encoding (encodeBindingName)
-
-
-ns :: Namespace
-ns = Namespace "hydra.annotations"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, moduleNamespace DecodeCore.module_, moduleNamespace EncodeCore.module_, ExtractCore.ns, Lexical.ns,
-      Strip.ns, ShowCore.ns, ShowError.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Utilities for reading and writing type and term annotations"}
-  where
-   definitions = [
-     toDefinition aggregateAnnotations,
-     toDefinition commentsFromBinding,
-     toDefinition commentsFromFieldType,
-     toDefinition debugIf,
-     toDefinition failOnFlag,
-     toDefinition getAttr,
-     toDefinition getAttrWithDefault,
-     toDefinition getCount,
-     toDefinition getDebugId,
-     toDefinition getDescription,
-     toDefinition getTermAnnotation,
-     toDefinition getTermDescription,
-     toDefinition getType,
-     toDefinition getTypeAnnotation,
-     toDefinition getTypeClasses,
-     toDefinition getTypeDescription,
-     toDefinition hasDescription,
-     toDefinition hasFlag,
-     toDefinition hasTypeDescription,
-     toDefinition isNativeType,
-     toDefinition nextCount,
-     toDefinition normalizeTermAnnotations,
-     toDefinition normalizeTypeAnnotations,
-     toDefinition putAttr,
-     toDefinition putCount,
-     toDefinition resetCount,
-     toDefinition setAnnotation,
-     toDefinition setDescription,
-     toDefinition setTermAnnotation,
-     toDefinition setTermDescription,
-     toDefinition setType,
-     toDefinition setTypeAnnotation,
-     toDefinition setTypeClasses,
-     toDefinition setTypeDescription,
-     toDefinition termAnnotationInternal,
-     toDefinition typeAnnotationInternal,
-     toDefinition whenFlag]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
-aggregateAnnotations :: TTermDefinition ((x -> Maybe y) -> (y -> x) -> (y -> M.Map Name Term) -> x -> M.Map Name Term)
-aggregateAnnotations = define "aggregateAnnotations" $
-  doc "Aggregate annotations from nested structures" $
-  "getValue" ~> "getX" ~> "getAnns" ~> "t" ~>
-  "toPairs" <~ ("rest" ~> "t" ~> Maybes.maybe (var "rest")
-    (lambda "yy" (var "toPairs"
-      @@ Lists.cons (Maps.toList (var "getAnns" @@ var "yy")) (var "rest")
-      @@ (var "getX" @@ var "yy")))
-    (var "getValue" @@ var "t")) $
-  Maps.fromList (Lists.concat (var "toPairs" @@ list ([] :: [TTerm [(Name, Term)]]) @@ var "t"))
-
-commentsFromBinding :: TTermDefinition (Context -> Graph -> Binding -> Either Error (Maybe String))
-commentsFromBinding = define "commentsFromBinding" $
-  doc "Extract comments/description from a Binding" $
-  "cx" ~> "g" ~> "b" ~>
-  getTermDescription @@ var "cx" @@ var "g" @@ (Core.bindingTerm $ var "b")
-
-commentsFromFieldType :: TTermDefinition (Context -> Graph -> FieldType -> Either Error (Maybe String))
-commentsFromFieldType = define "commentsFromFieldType" $
-  doc "Extract comments/description from a FieldType" $
-  "cx" ~> "g" ~> "ft" ~>
-  getTypeDescription @@ var "cx" @@ var "g" @@ (Core.fieldTypeType $ var "ft")
-
-debugIf :: TTermDefinition (Context -> String -> String -> Prelude.Either Error ())
-debugIf = define "debugIf" $
-  doc "Debug if the debug ID matches (Either version)" $
-  "cx" ~> "debugId" ~> "message" ~>
-  "mid" <<~ getDebugId @@ var "cx" $
-  Logic.ifElse (Equality.equal (var "mid") (just $ var "debugId"))
-    (Ctx.failInContext (Error.errorOther $ Error.otherError (var "message")) (var "cx"))
-    (right unit)
-
-failOnFlag :: TTermDefinition (Context -> Name -> String -> Prelude.Either Error ())
-failOnFlag = define "failOnFlag" $
-  doc "Fail if the given flag is set (Either version)" $
-  "cx" ~> "flag" ~> "msg" ~>
-  "val" <<~ hasFlag @@ var "cx" @@ var "flag" $
-  Logic.ifElse (var "val")
-    (Ctx.failInContext (Error.errorOther $ Error.otherError (var "msg")) (var "cx"))
-    (right unit)
-
-getAttr :: TTermDefinition (Name -> Context -> Maybe Term)
-getAttr = define "getAttr" $
-  doc "Get an attribute from a context (pure version)" $
-  "key" ~> "cx" ~>
-  Maps.lookup (var "key") (Ctx.contextOther (var "cx"))
-
-getAttrWithDefault :: TTermDefinition (Name -> Term -> Context -> Term)
-getAttrWithDefault = define "getAttrWithDefault" $
-  doc "Get an attribute with a default value from context (pure version)" $
-  "key" ~> "def" ~> "cx" ~>
-  Maybes.fromMaybe (var "def") (getAttr @@ var "key" @@ var "cx")
-
-getCount :: TTermDefinition (Name -> Context -> Int)
-getCount = define "getCount" $
-  doc "Get a counter value from context (pure version)" $
-  "key" ~> "cx" ~>
-  Maybes.maybe
-    (int32 0)
-    ("term" ~> cases _Term (var "term") (Just (int32 0)) [
-      _Term_literal>>: "lit" ~> cases _Literal (var "lit") (Just (int32 0)) [
-        _Literal_integer>>: "iv" ~> cases _IntegerValue (var "iv") (Just (int32 0)) [
-          _IntegerValue_int32>>: "i" ~> var "i"]]])
-    (Maps.lookup (var "key") (Ctx.contextOther (var "cx")))
-
-getDebugId :: TTermDefinition (Context -> Prelude.Either Error (Maybe String))
-getDebugId = define "getDebugId" $
-  doc "Get the debug ID from context (Either version)" $
-  "cx" ~>
-  Maybes.maybe
-    (right nothing)
-    ("term" ~> Eithers.map (unaryFunction just) (ExtractCore.string @@ Graph.emptyGraph @@ var "term"))
-    (getAttr @@ Constants.key_debugId @@ var "cx")
-
-getDescription :: TTermDefinition (Context -> Graph -> M.Map Name Term -> Prelude.Either Error (Maybe String))
-getDescription = define "getDescription" $
-  doc "Get description from annotations map (Either version)" $
-  "cx" ~> "graph" ~> "anns" ~>
-  Maybes.maybe
-    (right nothing)
-    ("term" ~> Eithers.map (unaryFunction just) (ExtractCore.string @@ var "graph" @@ var "term"))
-    (Maps.lookup (Core.nameLift key_description) (var "anns"))
-
-getTermAnnotation :: TTermDefinition (Name -> Term -> Maybe Term)
-getTermAnnotation = define "getTermAnnotation" $
-  doc "Get a term annotation" $
-  "key" ~> "term" ~> Maps.lookup (var "key") (termAnnotationInternal @@ var "term")
-
-getTermDescription :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error (Maybe String))
-getTermDescription = define "getTermDescription" $
-  doc "Get term description (Either version)" $
-  "cx" ~> "graph" ~> "term" ~>
-  "peel" <~ ("t" ~> cases _Term (var "t")
-    (Just $ var "t") [
-    _Term_typeLambda>>: "tl" ~> var "peel" @@ Core.typeLambdaBody (var "tl"),
-    _Term_typeApplication>>: "ta" ~> var "peel" @@ Core.typeApplicationTermBody (var "ta")]) $
-  getDescription @@ var "cx" @@ var "graph" @@ (termAnnotationInternal @@ (var "peel" @@ var "term"))
-
-getType :: TTermDefinition (Graph -> M.Map Name Term -> Prelude.Either DecodingError (Maybe Type))
-getType = define "getType" $
-  doc "Get type from annotations" $
-  "graph" ~> "anns" ~>
-  Maybes.maybe
-    (right nothing)
-    ("dat" ~> Eithers.map (unaryFunction just) (decoderFor _Type @@ var "graph" @@ var "dat"))
-    (Maps.lookup (Constants.key_type) (var "anns"))
-
-getTypeAnnotation :: TTermDefinition (Name -> Type -> Maybe Term)
-getTypeAnnotation = define "getTypeAnnotation" $
-  doc "Get a type annotation" $
-  "key" ~> "typ" ~> Maps.lookup (var "key") (typeAnnotationInternal @@ var "typ")
-
-getTypeClasses :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error (M.Map Name (S.Set TypeClass)))
-getTypeClasses = define "getTypeClasses" $
-  doc "Get type classes from term" $
-  "cx" ~> "graph" ~> "term" ~>
-  "decodeClass" <~ ("term" ~>
-    "byName" <~ Maps.fromList (list [
-      pair (Core.nameLift _TypeClass_equality) Graph.typeClassEquality,
-      pair (Core.nameLift _TypeClass_ordering) Graph.typeClassOrdering]) $
-    "fn" <<~ ExtractCore.unitVariant @@ Core.nameLift _TypeClass @@ var "graph" @@ var "term" $
-    Maybes.maybe
-      (Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "type class") (ShowCore.term @@ var "term")) (var "cx"))
-      (unaryFunction right)
-      (Maps.lookup (var "fn") (var "byName"))) $
-  Maybes.maybe
-    (right Maps.empty)
-    ("term" ~>
-      ExtractCore.map
-        @@ ("t" ~> Eithers.bimap
-          ("de" ~> Error.errorDecoding $ var "de")
-          ("x" ~> var "x")
-          (decoderFor _Name @@ var "graph" @@ var "t"))
-        @@ (ExtractCore.setOf @@ var "decodeClass" @@ var "graph")
-        @@ var "graph"
-        @@ (var "term"))
-    (getTermAnnotation @@ Constants.key_classes @@ var "term")
-
-getTypeDescription :: TTermDefinition (Context -> Graph -> Type -> Prelude.Either Error (Maybe String))
-getTypeDescription = define "getTypeDescription" $
-  doc "Get type description (Either version)" $
-  "cx" ~> "graph" ~> "typ" ~>
-  getDescription @@ var "cx" @@ var "graph" @@ (typeAnnotationInternal @@ var "typ")
-
-hasDescription :: TTermDefinition (M.Map Name Term -> Bool)
-hasDescription = define "hasDescription" $
-  doc "Check if annotations contain description" $
-  "anns" ~> Maybes.isJust (Maps.lookup (Constants.key_description) (var "anns"))
-
-hasFlag :: TTermDefinition (Context -> Name -> Prelude.Either Error Bool)
-hasFlag = define "hasFlag" $
-  doc "Check if flag is set (Either version)" $
-  "cx" ~> "flag" ~>
-  "term" <~ getAttrWithDefault @@ var "flag" @@ Core.false @@ var "cx" $
-  ExtractCore.boolean @@ Graph.emptyGraph @@ var "term"
-
-hasTypeDescription :: TTermDefinition (Type -> Bool)
-hasTypeDescription = define "hasTypeDescription" $
-  doc "Check if type has description" $
-  "typ" ~> hasDescription @@ (typeAnnotationInternal @@ var "typ")
-
-isNativeType :: TTermDefinition (Binding -> Bool)
-isNativeType = define "isNativeType" $
-  doc ("For a typed term, decide whether a coder should encode it as a native type expression,"
-    <> " or as a Hydra type expression.") $
-  "el" ~>
-  "isFlaggedAsFirstClassType" <~ Maybes.fromMaybe false (
-    Maybes.map
-      (constant true)
-      (getTermAnnotation @@ Constants.key_firstClassType @@ (Core.bindingTerm (var "el")))) $
-  Maybes.maybe false
-    ("ts" ~> Logic.and
-      (Equality.equal (var "ts") (Core.typeScheme (list ([] :: [TTerm Name])) (Core.typeVariable (Core.nameLift _Type)) Phantoms.nothing))
-      (Logic.not (var "isFlaggedAsFirstClassType")))
-    (Core.bindingTypeScheme (var "el"))
-
-nextCount :: TTermDefinition (Name -> Context -> (Int, Context))
-nextCount = define "nextCount" $
-  doc "Return a zero-indexed counter for the given key and updated context (pure version)" $
-  "key" ~> "cx" ~>
-  "count" <~ getCount @@ var "key" @@ var "cx" $
-  pair (var "count") (putCount @@ var "key" @@ Math.add (var "count") (int32 1) @@ var "cx")
-
-normalizeTermAnnotations :: TTermDefinition (Term -> Term)
-normalizeTermAnnotations = define "normalizeTermAnnotations" $
-  doc "Normalize term annotations" $
-  "term" ~>
-  "anns" <~ termAnnotationInternal @@ var "term" $
-  "stripped" <~ Strip.deannotateTerm @@ var "term" $
-  Logic.ifElse (Maps.null (var "anns"))
-    (var "stripped")
-    (Core.termAnnotated (Core.annotatedTerm (var "stripped") (var "anns")))
-
-normalizeTypeAnnotations :: TTermDefinition (Type -> Type)
-normalizeTypeAnnotations = define "normalizeTypeAnnotations" $
-  doc "Normalize type annotations" $
-  "typ" ~>
-  "anns" <~ typeAnnotationInternal @@ var "typ" $
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Logic.ifElse (Maps.null (var "anns"))
-    (var "stripped")
-    (Core.typeAnnotated (Core.annotatedType (var "stripped") (var "anns")))
-
-putAttr :: TTermDefinition (Name -> Term -> Context -> Context)
-putAttr = define "putAttr" $
-  doc "Set an attribute in a context" $
-  "key" ~> "val" ~> "cx" ~>
-  Ctx.contextWithOther (var "cx") (Maps.insert (var "key") (var "val") (Ctx.contextOther (var "cx")))
-
-putCount :: TTermDefinition (Name -> Int -> Context -> Context)
-putCount = define "putCount" $
-  doc "Set counter value in context" $
-  "key" ~> "count" ~> "cx" ~>
-  putAttr @@ var "key" @@ (Core.termLiteral (Core.literalInteger (Core.integerValueInt32 (var "count")))) @@ var "cx"
-
-resetCount :: TTermDefinition (Name -> Context -> Context)
-resetCount = define "resetCount" $
-  doc "Reset counter to zero in context" $
-  "key" ~> "cx" ~> putAttr @@ var "key" @@ MetaTerms.int32 0 @@ var "cx"
-
-setAnnotation :: TTermDefinition (Name -> Maybe Term -> M.Map Name Term -> M.Map Name Term)
-setAnnotation = define "setAnnotation" $
-  doc "Set annotation in map" $
-  "key" ~> "val" ~> "m" ~> Maps.alter (constant (var "val")) (var "key") (var "m")
-
-setDescription :: TTermDefinition (Maybe String -> M.Map Name Term -> M.Map Name Term)
-setDescription = define "setDescription" $
-  doc "Set description in annotations" $
-  "d" ~> setAnnotation
-    @@ Constants.key_description
-    @@ Maybes.map (unaryFunction Core.termLiteral <.> unaryFunction Core.literalString) (var "d")
-
-setTermAnnotation :: TTermDefinition (Name -> Maybe Term -> Term -> Term)
-setTermAnnotation = define "setTermAnnotation" $
-  doc "Set term annotation" $
-  "key" ~> "val" ~> "term" ~>
-  "term'" <~ Strip.deannotateTerm @@ var "term" $
-  "anns" <~ setAnnotation @@ var "key" @@ var "val" @@ (termAnnotationInternal @@ var "term") $
-  Logic.ifElse (Maps.null (var "anns"))
-    (var "term'")
-    (Core.termAnnotated (Core.annotatedTerm (var "term'") (var "anns")))
-
-setTermDescription :: TTermDefinition (Maybe String -> Term -> Term)
-setTermDescription = define "setTermDescription" $
-  doc "Set term description" $
-  "d" ~> setTermAnnotation
-    @@ Constants.key_description
-    @@ Maybes.map ("s" ~> Core.termLiteral (Core.literalString (var "s"))) (var "d")
-
-setType :: TTermDefinition (Maybe Type -> M.Map Name Term -> M.Map Name Term)
-setType = define "setType" $
-  doc "Set type in annotations" $
-  "mt" ~> setAnnotation @@ Constants.key_type @@ Maybes.map (encoderFor _Type) (var "mt")
-
-setTypeAnnotation :: TTermDefinition (Name -> Maybe Term -> Type -> Type)
-setTypeAnnotation = define "setTypeAnnotation" $
-  doc "Set type annotation" $
-  "key" ~> "val" ~> "typ" ~>
-  "typ'" <~ Strip.deannotateType @@ var "typ" $
-  "anns" <~ setAnnotation @@ var "key" @@ var "val" @@ (typeAnnotationInternal @@ var "typ") $
-  Logic.ifElse (Maps.null (var "anns"))
-    (var "typ'")
-    (Core.typeAnnotated (Core.annotatedType (var "typ'") (var "anns")))
-
-setTypeClasses :: TTermDefinition (M.Map Name (S.Set TypeClass) -> Term -> Term)
-setTypeClasses = define "setTypeClasses" $
-  doc "Set type classes on term" $
-  "m" ~> "term" ~>
-  "encodeClass" <~ ("tc" ~> cases _TypeClass (var "tc")
-    Nothing [
-    _TypeClass_equality>>: constant (MetaTerms.injectUnitPhantom _TypeClass _TypeClass_equality),
-    _TypeClass_ordering>>: constant (MetaTerms.injectUnitPhantom _TypeClass _TypeClass_ordering)]) $
-  "encodePair" <~ ("nameClasses" ~>
-    "name" <~ Pairs.first (var "nameClasses") $
-    "classes" <~ Pairs.second (var "nameClasses") $
-    pair
-      (encoderFor _Name @@ var "name")
-      (Core.termSet (Sets.fromList (Lists.map (var "encodeClass") (Sets.toList (var "classes")))))) $
-  "encoded" <~ Logic.ifElse (Maps.null (var "m"))
-    nothing
-    (just (Core.termMap (Maps.fromList (Lists.map (var "encodePair") (Maps.toList (var "m")))))) $
-  setTermAnnotation @@ Constants.key_classes @@ var "encoded" @@ var "term"
-
-setTypeDescription :: TTermDefinition (Maybe String -> Type -> Type)
-setTypeDescription = define "setTypeDescription" $
-  doc "Set type description" $
-  "d" ~> setTypeAnnotation
-    @@ Constants.key_description
-    @@ Maybes.map (unaryFunction Core.termLiteral <.> unaryFunction Core.literalString) (var "d")
-
-termAnnotationInternal :: TTermDefinition (Term -> M.Map Name Term)
-termAnnotationInternal = define "termAnnotationInternal" $
-  doc "Get internal term annotations" $
-  "term" ~>
-  "getAnn" <~ ("t" ~> cases _Term (var "t")
-    (Just nothing) [
-    _Term_annotated>>: "a" ~> just $ var "a"]) $
-  aggregateAnnotations
-    @@ var "getAnn"
-    @@ ("at" ~> Core.annotatedTermBody $ var "at")
-    @@ ("at" ~> Core.annotatedTermAnnotation $ var "at")
-    @@ var "term"
-
-typeAnnotationInternal :: TTermDefinition (Type -> M.Map Name Term)
-typeAnnotationInternal = define "typeAnnotationInternal" $
-  doc "Get internal type annotations" $
-  "typ" ~>
-  "getAnn" <~ lambda "t" (cases _Type (var "t")
-    (Just nothing) [
-    _Type_annotated>>: lambda "a" (just $ var "a")]) $
-  aggregateAnnotations
-    @@ var "getAnn"
-    @@ ("at" ~> Core.annotatedTypeBody $ var "at")
-    @@ ("at" ~> Core.annotatedTypeAnnotation $ var "at")
-    @@ var "typ"
-
-whenFlag :: TTermDefinition (Context -> Name -> Prelude.Either Error a -> Prelude.Either Error a -> Prelude.Either Error a)
-whenFlag = define "whenFlag" $
-  doc "Execute different branches based on flag (Either version)" $
-  "cx" ~> "flag" ~> "ethen" ~> "eelse" ~>
-  "b" <<~ hasFlag @@ var "cx" @@ var "flag" $
-  Logic.ifElse (var "b") (var "ethen") (var "eelse")
-
--- | Helper (not a registered definition) for creating a type binding from a name and type.
--- This was previously the deprecated "typeElement" definition.
-typeBinding :: TTerm (Name -> Type -> Binding)
-typeBinding =
-  "name" ~> "typ" ~>
-  "schemaTerm" <~ Core.termVariable (Core.nameLift _Type) $
-  "dataTerm" <~ normalizeTermAnnotations @@ (Core.termAnnotated (Core.annotatedTerm
-    (encoderFor _Type @@ var "typ")
-    (Maps.fromList (list [pair (Constants.key_type) (var "schemaTerm")])))) $
-  Core.binding (var "name") (var "dataTerm") (just (Core.typeScheme (list ([] :: [TTerm Name])) (Core.typeVariable $ Core.nameLift _Type) Phantoms.nothing))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Arity.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Arity.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Arity.hs
+++ /dev/null
@@ -1,115 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Arity where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (functionArity, primitiveArity, termArity, typeArity, typeSchemeArity, uncurryType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.arity"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Functions dealing with arguments and arity."}
-  where
-    definitions = [
-      toDefinition primitiveArity,
-      toDefinition termArity,
-      toDefinition typeArity,
-      toDefinition typeSchemeArity,
-      toDefinition uncurryType]
-
-primitiveArity :: TTermDefinition (Primitive -> Int)
-primitiveArity = define "primitiveArity" $
-  doc "Find the arity (expected number of arguments) of a primitive constant or function" $
-  (typeArity <.> unaryFunction Core.typeSchemeBody <.> unaryFunction Graph.primitiveTypeScheme)
-
-termArity :: TTermDefinition (Term -> Int)
-termArity = define "termArity" $
-  doc "Find the arity (expected number of arguments) of a term" $
-  match _Term (Just $ int32 0) [
-    _Term_application>>: (lambda "xapp" $ Math.sub (var "xapp") (int32 1)) <.> termArity <.> unaryFunction Core.applicationFunction,
-    _Term_cases>>: constant (int32 1),
-    _Term_lambda>>: (lambda "i" $ Math.add (int32 1) (var "i")) <.> (termArity <.> unaryFunction Core.lambdaBody),
-    _Term_project>>: constant (int32 1),
-    _Term_unwrap>>: constant (int32 1)]
-    -- Note: ignoring variables which might resolve to functions
-
-typeArity :: TTermDefinition (Type -> Int)
-typeArity = define "typeArity" $
-  doc "Find the arity (expected number of arguments) of a type" $
-  match _Type (Just $ int32 0) [
-    _Type_annotated>>: typeArity <.> unaryFunction Core.annotatedTypeBody,
-    _Type_application>>: typeArity <.> unaryFunction Core.applicationTypeFunction,
-    _Type_forall>>: typeArity <.> unaryFunction Core.forallTypeBody,
-    _Type_function>>: lambda "f" $
-      Math.add (int32 1) (typeArity <.> unaryFunction Core.functionTypeCodomain @@ var "f")]
-
-typeSchemeArity :: TTermDefinition (TypeScheme -> Int)
-typeSchemeArity = define "typeSchemeArity" $
-  doc "Find the arity (expected number of arguments) of a type scheme" $
-  typeArity <.> unaryFunction Core.typeSchemeBody
-
-uncurryType :: TTermDefinition (Type -> [Type])
-uncurryType = define "uncurryType" $
-  doc "Uncurry a type expression into a list of types, turning a function type a -> b into cons a (uncurryType b)" $
-  lambda "t" ((match _Type (Just $ list [var "t"]) [
-    _Type_annotated>>: uncurryType <.> unaryFunction Core.annotatedTypeBody,
-    _Type_application>>: uncurryType <.> unaryFunction Core.applicationTypeFunction,
-    _Type_forall>>: uncurryType <.> unaryFunction Core.forallTypeBody,
-    _Type_function>>: lambda "ft" $ Lists.cons
-      (Core.functionTypeDomain $ var "ft")
-      (uncurryType <.> unaryFunction Core.functionTypeCodomain @@ var "ft")]) @@ var "t")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Checking.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Checking.hs
+++ /dev/null
@@ -1,924 +0,0 @@
-
-{-
-TODO:
-* Double-check the use of checkTypeVariables for consistency across rules
-* In nominal rules (record/union/wrap intro and elim), double-check that we are checking provided data against the schema
-* Use the inference debug flag to enable / disable code which is purely for checking and not for reconstruction.
-* When the debug flag is set, call checkType from hydra.inference rules
--}
-
-module Hydra.Sources.Kernel.Terms.Checking where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  allEqual, applyTypeArgumentsToType,
-  checkForUnboundTypeVariables, checkForUnboundTypeVariablesE,
-  checkNominalApplication, checkNominalApplicationE,
-  checkSameType, checkType, checkTypeSubst, checkTypeVariables, containsInScopeTypeVars, normalizeTypeFreeVars, toFContext,
-  typeListsEffectivelyEqual, typeOf, typeOfE, typeOfTerm, typesAllEffectivelyEqual, typesEffectivelyEqual,
-  typeOfAnnotatedTerm, typeOfAnnotatedTermE,
-  typeOfApplication, typeOfApplicationE,
-  typeOfCaseStatement, typeOfCaseStatementE,
-  typeOfEither, typeOfEitherE,
-  typeOfInjection, typeOfInjectionE,
-  typeOfLambda, typeOfLambdaE,
-  typeOfLet, typeOfLetE,
-  typeOfList, typeOfListE,
-  typeOfLiteral, typeOfLiteralE,
-  typeOfMap, typeOfMapE,
-  typeOfMaybe, typeOfMaybeE,
-  typeOfPair, typeOfPairE,
-  typeOfPrimitive, typeOfPrimitiveE,
-  typeOfProjection, typeOfProjectionE,
-  typeOfRecord, typeOfRecordE,
-  typeOfSet, typeOfSetE,
-  typeOfTypeApplication, typeOfTypeApplicationE,
-  typeOfTypeLambda, typeOfTypeLambdaE,
-  typeOfUnit, typeOfUnitE,
-  typeOfUnwrap, typeOfUnwrapE,
-  typeOfVariable, typeOfVariableE,
-  typeOfWrappedTerm, typeOfWrappedTermE)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import qualified Hydra.Dsl.Paths         as Paths
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors            as Error
-import qualified Hydra.Dsl.Error.Checking   as ErrorsChecking
-import qualified Hydra.Dsl.Error.Core       as ErrorsCore
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Constants    as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Formatting   as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Reflect      as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Dependencies  as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Rewriting    as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Scoping      as Scoping
-
-import qualified Hydra.Sources.Kernel.Terms.Names        as Names
-import qualified Hydra.Sources.Kernel.Terms.Resolution   as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Strip        as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables    as Variables
-import qualified Hydra.Sources.Kernel.Terms.Show.Core    as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors  as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants    as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Substitution as Substitution
-
-
-ns :: Namespace
-ns = Namespace "hydra.checking"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Dependencies.ns, ExtractCore.ns, Formatting.ns, Lexical.ns, Reflect.ns, Rewriting.ns,
-      Scoping.ns, Names.ns, Resolution.ns, ShowCore.ns, ShowError.ns, ShowVariants.ns, Strip.ns, Substitution.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Type checking and type reconstruction (type-of) for the results of Hydra unification and inference"}
-  where
-    definitions = [
-      toDefinition allEqual,
-      toDefinition applyTypeArgumentsToType,
-      toDefinition checkForUnboundTypeVariables,
-      toDefinition checkNominalApplication,
-      toDefinition checkSameType,
-      toDefinition checkType,
-      toDefinition checkTypeSubst,
-      toDefinition checkTypeVariables,
-      toDefinition containsInScopeTypeVars,
-      toDefinition normalizeTypeFreeVars,
-      toDefinition toFContext,
-      toDefinition typeListsEffectivelyEqual,
-      toDefinition typeOf,
-      toDefinition typeOfAnnotatedTerm,
-      toDefinition typeOfApplication,
-      toDefinition typeOfCaseStatement,
-      toDefinition typeOfEither,
-      toDefinition typeOfInjection,
-      toDefinition typeOfLambda,
-      toDefinition typeOfLet,
-      toDefinition typeOfList,
-      toDefinition typeOfLiteral,
-      toDefinition typeOfMap,
-      toDefinition typeOfMaybe,
-      toDefinition typeOfPair,
-      toDefinition typeOfPrimitive,
-      toDefinition typeOfProjection,
-      toDefinition typeOfRecord,
-      toDefinition typeOfSet,
-      toDefinition typeOfTypeApplication,
-      toDefinition typeOfTypeLambda,
-      toDefinition typeOfUnit,
-      toDefinition typeOfUnwrap,
-      toDefinition typeOfVariable,
-      toDefinition typeOfWrappedTerm,
-      toDefinition typeOfTerm,
-      toDefinition typesAllEffectivelyEqual,
-      toDefinition typesEffectivelyEqual]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-noTypeArgs :: TTerm [Type]
-noTypeArgs = list ([] :: [TTerm Type])
-
---
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
-allEqual :: TTermDefinition ([a] -> Bool)
-allEqual = define "allEqual" $
-  "els" ~>
-  Maybes.maybe
-    true
-    ("uc" ~>
-      "h" <~ Pairs.first (var "uc") $
-      "t" <~ Pairs.second (var "uc") $
-      Lists.foldl
-        ("b" ~> "x" ~> Logic.and (var "b") (Equality.equal (var "x") (var "h")))
-        true
-        (var "t"))
-    (Lists.uncons $ var "els")
-
-applyTypeArgumentsToType :: TTermDefinition (Context -> Graph -> [Type] -> Type -> Prelude.Either Error Type)
-applyTypeArgumentsToType = define "applyTypeArgumentsToType" $
-  doc "Apply type arguments to a type, substituting forall-bound variables" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "t" ~>
-  -- uncons typeArgs: Nothing means no args to apply (base case).
-  Maybes.maybe
-    (right $ var "t")
-    ("uc" ~>
-      "ah" <~ Pairs.first (var "uc") $
-      "at" <~ Pairs.second (var "uc") $
-      cases _Type (var "t")
-        (Just $ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "forall type") (Strings.cat $ list [
-          ShowCore.type_ @@ var "t",
-          string ". Trying to apply ",
-          Literals.showInt32 (Lists.length $ var "typeArgs"),
-          string " type args: ",
-          Formatting.showList @@ ShowCore.type_ @@ var "typeArgs",
-          string ". Context has vars: {",
-          Strings.intercalate (string ", ") (Lists.map (unaryFunction $ Core.unName) $ Maps.keys $ Graph.graphBoundTypes $ var "tx"),
-          string "}"])) (var "cx")) [
-        _Type_forall>>: "ft" ~>
-          "v" <~ Core.forallTypeParameter (var "ft") $
-          "tbody" <~ Core.forallTypeBody (var "ft") $
-          applyTypeArgumentsToType
-            @@ var "cx"
-            @@ var "tx"
-            @@ (var "at")
-            @@ (Substitution.substInType
-              @@ (Typing.typeSubst $ Maps.singleton (var "v") (var "ah"))
-              @@ (var "tbody"))])
-    (Lists.uncons $ var "typeArgs")
-
-checkForUnboundTypeVariables :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error ())
-checkForUnboundTypeVariables = define "checkForUnboundTypeVariables" $
-  doc "Check that a term has no unbound type variables (Either version)" $
-  "cx" ~> "tx" ~> "term0" ~>
-  "svars" <~ Sets.fromList (Maps.keys $ Graph.graphSchemaTypes $ var "tx") $
-  "checkRecursive" <~ ("vars" ~> "trace" ~> "lbinding" ~> "term" ~>
-    "recurse" <~ var "checkRecursive" @@ var "vars" @@ var "trace" @@ var "lbinding" $
-    "dflt" <~ (
-      Eithers.bind (Eithers.mapList (var "recurse") (Rewriting.subterms @@ var "term"))
-        ("_" ~> right unit)) $
-    "check" <~ ("typ" ~>
-      "freevars" <~ Variables.freeVariablesInType @@ var "typ" $
-      "badvars" <~ Sets.difference (Sets.difference (var "freevars") (var "vars")) (var "svars") $
-      Logic.ifElse (Sets.null $ var "badvars")
-        (right unit)
-        (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorUnboundTypeVariables $ ErrorsChecking.unboundTypeVariablesError (var "badvars") (var "typ")) (var "cx"))) $
-    "checkOptional" <~ ("m" ~>
-      Eithers.bind (Eithers.mapMaybe (var "check") (var "m"))
-        ("_" ~> right unit)) $
-    cases _Term (var "term")
-      (Just $ var "dflt") [
-      _Term_lambda>>: "l" ~>
-        Eithers.bind (var "checkOptional" @@ (Core.lambdaDomain $ var "l"))
-          ("_" ~> var "recurse" @@ (Core.lambdaBody $ var "l")),
-      _Term_let>>: "l" ~>
-        "forBinding" <~ ("b" ~>
-          "bterm" <~ Core.bindingTerm (var "b") $
-          "newVars" <~ optCases (Core.bindingTypeScheme $ var "b")
-             (var "vars")
-             ("ts" ~> Sets.union (var "vars") (Sets.fromList $ Core.typeSchemeVariables $ var "ts")) $
-          "newTrace" <~ Lists.cons (Core.unName $ Core.bindingName $ var "b") (var "trace") $
-          var "checkRecursive" @@ var "newVars" @@ var "newTrace" @@ (just $ var "b") @@ var "bterm") $
-        Eithers.bind (Eithers.mapList (var "forBinding") $ Core.letBindings $ var "l")
-          ("_" ~> var "recurse" @@ (Core.letBody $ var "l")),
-      _Term_typeApplication>>: "tt" ~>
-        Eithers.bind (var "check" @@ (Core.typeApplicationTermType $ var "tt"))
-          ("_" ~> var "recurse" @@ (Core.typeApplicationTermBody $ var "tt")),
-      _Term_typeLambda>>: "tl" ~>
-        Eithers.bind (var "check" @@ (Core.typeVariable $ Core.typeLambdaParameter $ var "tl"))
-          ("_" ~> var "recurse" @@ (Core.typeLambdaBody $ var "tl"))]) $
-  var "checkRecursive" @@ Sets.empty @@ list [string "top level"] @@ nothing @@ var "term0"
-
-checkNominalApplication :: TTermDefinition (Context -> Graph -> Name -> [Type] -> Prelude.Either Error ((), Context))
-checkNominalApplication = define "checkNominalApplication" $
-  doc "Check that a nominal type is applied to the correct number of type arguments (Either version)" $
-  "cx" ~> "tx" ~> "tname" ~> "typeArgs" ~>
-  "result" <<~ Resolution.requireSchemaType @@ var "cx" @@ (Graph.graphSchemaTypes $ var "tx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "result") $
-  "cx2" <~ Pairs.second (var "result") $
-  "vars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "varslen" <~ Lists.length (var "vars") $
-  "argslen" <~ Lists.length (var "typeArgs") $
-  Logic.ifElse (Equality.equal (var "varslen") (var "argslen"))
-    (right $ pair unit (var "cx2"))
-    (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typeVariable (var "tname")) (var "varslen") (var "argslen") (var "typeArgs")) (var "cx2"))
-
-checkSameType :: TTermDefinition (Context -> Graph -> String -> [Type] -> Prelude.Either Error Type)
-checkSameType = define "checkSameType" $
-  doc "Ensure all types in a list are equal and return the common type" $
-  "cx" ~> "tx" ~> "desc" ~> "types" ~>
-  "unequalErr" <~ (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorUnequalTypes $ ErrorsChecking.unequalTypesError (var "types") (var "desc")) (var "cx")) $
-  Logic.ifElse (typesAllEffectivelyEqual @@ var "tx" @@ var "types")
-    (Maybes.maybe (var "unequalErr") ("t" ~> right $ var "t") (Lists.maybeHead $ var "types"))
-    (var "unequalErr")
-
--- TODO: unused
-checkType :: TTermDefinition (Context -> Graph -> Term -> Type -> Prelude.Either Error ())
-checkType = define "checkType" $
-  doc "Check that a term has the expected type" $
-  "cx" ~> "tx" ~> "term" ~> "typ" ~>
-  "vars" <~ Graph.graphTypeVariables (var "tx") $
-  Logic.ifElse (Constants.debugInference)
-    ("t0" <<~ (Eithers.map ("_p" ~> Pairs.first (var "_p")) (typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "term")) $
-      Logic.ifElse (typesEffectivelyEqual @@ var "tx" @@ var "t0" @@ var "typ")
-        (right unit)
-        (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeMismatch $ ErrorsChecking.typeMismatchError (var "typ") (var "t0")) (var "cx")))
-    (right unit)
-
-checkTypeSubst :: TTermDefinition (Context -> Graph -> TypeSubst -> Prelude.Either Error TypeSubst)
-checkTypeSubst = define "checkTypeSubst" $
-  doc ("Sanity-check a type substitution arising from unification. Specifically, check that schema types have not been"
-    <> " inappropriately unified with type variables inferred from terms.") $
-  "cx" ~> "tx" ~> "subst" ~>
-  "s" <~ Typing.unTypeSubst (var "subst") $
-  "vars" <~ Sets.fromList (Maps.keys $ var "s") $
-  "suspectVars" <~ Sets.intersection (var "vars") (Sets.fromList $ Maps.keys $ Graph.graphSchemaTypes $ var "tx") $
-  "isNominal" <~ ("ts" ~> cases _Type (Strip.deannotateType @@ (Core.typeSchemeBody $ var "ts"))
-    (Just false) [
-    _Type_record>>: constant true,
-    _Type_union>>: constant true,
-    _Type_wrap>>: constant true]) $
-  "badVars" <~ Sets.fromList (Lists.filter
-    ("v" ~> Maybes.maybe false (var "isNominal") $
-      Lexical.dereferenceSchemaType @@ var "v" @@ (Graph.graphSchemaTypes $ var "tx"))
-    (Sets.toList $ var "suspectVars")) $
-  "badPairs" <~ Lists.filter ("p" ~> Sets.member (Pairs.first $ var "p") (var "badVars")) (Maps.toList $ var "s") $
-  "printPair" <~ ("p" ~> (Core.unName $ Pairs.first $ var "p") ++ (string " --> ") ++ (ShowCore.type_ @@ Pairs.second (var "p"))) $
-  Logic.ifElse (Sets.null $ var "badVars")
-    (right $ var "subst")
-    (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorIncorrectUnification $ ErrorsChecking.incorrectUnificationError (var "subst")) (var "cx"))
-
-checkTypeVariables :: TTermDefinition (Graph -> Type -> ())
-checkTypeVariables = define "checkTypeVariables" $
-  doc "Check that all type variables in a type are bound. NOTE: This check is currently disabled to allow phantom type variables from polymorphic instantiation to pass through. The proper fix is to ensure `typeOf` doesn't create fresh variables for post-inference code." $
-  "_tx" ~> "_typ" ~>
-  -- Disabled: phantom type variables from polymorphic instantiation cause false positives.
-  -- The inference pass has already validated type variables via checkForUnboundTypeVariables.
-  unit
-
--- Note: with Graph, this converts TypeSchemes back to System F types
-toFContext :: TTermDefinition (Graph -> M.Map Name Type)
-toFContext = define "toFContext" $
-  doc "Get the bound types from a graph as a type environment" $
-  "cx" ~> Maps.map (Scoping.typeSchemeToFType) $ Graph.graphBoundTypes $ var "cx"
-
-typeListsEffectivelyEqual :: TTermDefinition (Graph -> [Type] -> [Type] -> Bool)
-typeListsEffectivelyEqual = define "typeListsEffectivelyEqual" $
-  doc "Check whether two lists of types are effectively equal, disregarding type aliases" $
-  "tx" ~> "tlist1" ~> "tlist2" ~>
-  Logic.ifElse (Equality.equal (Lists.length (var "tlist1")) (Lists.length (var "tlist2")))
-    (Lists.foldl (binaryFunction Logic.and) true $
-      Lists.zipWith (typesEffectivelyEqual @@ var "tx") (var "tlist1") (var "tlist2"))
-    false
-
--- Old typeOf* variant functions removed; typeOf now uses Either-based typeOfE
-
-normalizeTypeFreeVars :: TTermDefinition (Type -> Type)
-normalizeTypeFreeVars = define "normalizeTypeFreeVars" $
-  doc "Normalize free type variables in a type to canonical names based on order of first occurrence. This allows comparing types that differ only in the naming of free type variables." $
-  "typ" ~>
-  "collectVars" <~ ("acc" ~> "t" ~>
-    cases _Type (var "t")
-      (Just $ var "acc") [
-      _Type_variable>>: "v" ~>
-        Logic.ifElse (Maps.member (var "v") (var "acc"))
-          (var "acc")
-          (Maps.insert (var "v") (Core.name $ Strings.cat2 (string "_tv") (Literals.showInt32 $ Maps.size $ var "acc")) (var "acc"))]) $
-  "subst" <~ Rewriting.foldOverType @@ Coders.traversalOrderPre @@ var "collectVars" @@ Maps.empty @@ var "typ" $
-  Variables.substituteTypeVariables @@ var "subst" @@ var "typ"
-
-typesAllEffectivelyEqual :: TTermDefinition (Graph -> [Type] -> Bool)
-typesAllEffectivelyEqual = define "typesAllEffectivelyEqual" $
-  doc ("Check whether a list of types are effectively equal, disregarding type aliases and free type variable naming."
-    <> " Also treats free type variables (not in schema) as wildcards, since inference has already verified consistency.") $
-  "tx" ~> "tlist" ~>
-  "types" <~ (Graph.graphSchemaTypes $ var "tx") $
-  "containsFreeVar" <~ ("t" ~>
-    "allVars" <~ Variables.freeVariablesInTypeSimple @@ var "t" $
-    "schemaNames" <~ Sets.fromList (Maps.keys $ var "types") $
-    Logic.not $ Sets.null $ Sets.difference (var "allVars") (var "schemaNames")) $
-  "anyContainsFreeVar" <~ Lists.foldl ("acc" ~> "t" ~> Logic.or (var "acc") (var "containsFreeVar" @@ var "t")) false (var "tlist") $
-  Logic.ifElse (var "anyContainsFreeVar")
-    true
-    (Logic.ifElse (allEqual @@ (Lists.map ("t" ~> normalizeTypeFreeVars @@ var "t") (var "tlist")))
-      true
-      (allEqual @@ (Lists.map ("t" ~> normalizeTypeFreeVars @@ (Strip.deannotateTypeRecursive @@ (Dependencies.replaceTypedefs @@ var "types" @@ var "t"))) (var "tlist"))))
-
--- | Check if a type contains any type variable that's in scope (from graphTypeVariables)
-containsInScopeTypeVars :: TTermDefinition (Graph -> Type -> Bool)
-containsInScopeTypeVars = define "containsInScopeTypeVars" $
-  doc "Check if a type contains any type variable from the current scope" $
-  "tx" ~> "t" ~>
-  "vars" <~ Graph.graphTypeVariables (var "tx") $
-  "freeVars" <~ Variables.freeVariablesInTypeSimple @@ var "t" $
-  Logic.not $ Sets.null $ Sets.intersection (var "vars") (var "freeVars")
-
-typesEffectivelyEqual :: TTermDefinition (Graph -> Type -> Type -> Bool)
-typesEffectivelyEqual = define "typesEffectivelyEqual" $
-  doc "Check whether two types are effectively equal, disregarding type aliases, forall quantifiers, and treating in-scope type variables as wildcards" $
-  "tx" ~> "t1" ~> "t2" ~>
-  -- If either type contains in-scope type variables, treat them as matching
-  -- This handles the case where fresh type variables from instantiation haven't been substituted
-  Logic.or (containsInScopeTypeVars @@ var "tx" @@ var "t1") $
-  Logic.or (containsInScopeTypeVars @@ var "tx" @@ var "t2") $
-  typesAllEffectivelyEqual @@ var "tx" @@ list [
-    Resolution.fullyStripAndNormalizeType @@ var "t1",
-    Resolution.fullyStripAndNormalizeType @@ var "t2"]
-
--- ============================================================================
--- Either/Context-threading versions of typeOf* functions
--- ============================================================================
--- These functions thread a Context through to support pure fresh-name generation.
--- The return type is (Type, Context) to propagate
--- the updated counter.
-
-typeOf :: TTermDefinition (Context -> Graph -> [Type] -> Term -> Prelude.Either Error (Type, Context))
-typeOf = define "typeOf" $
-  doc "Given a type context, reconstruct the type of a System F term" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "term" ~>
-  "cx1" <~ Ctx.pushTrace (string "typeOf") (var "cx") $
-  cases _Term (var "term")
-    (Just $ Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorUnsupportedTermVariant $ ErrorsChecking.unsupportedTermVariantError (Reflect.termVariant @@ var "term")) (var "cx1")) [
-    _Term_annotated>>: typeOfAnnotatedTerm @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_application>>: typeOfApplication @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_cases>>: typeOfCaseStatement @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_either>>: typeOfEither @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_lambda>>: typeOfLambda @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_let>>: typeOfLet @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_list>>: typeOfList @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_literal>>: typeOfLiteral @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_map>>: typeOfMap @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_maybe>>: typeOfMaybe @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_pair>>: typeOfPair @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_project>>: typeOfProjection @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_record>>: typeOfRecord @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_set>>: typeOfSet @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_typeApplication>>: typeOfTypeApplication @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_typeLambda>>: typeOfTypeLambda @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_inject>>: typeOfInjection @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_unit>>: constant $ typeOfUnit @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_unwrap>>: typeOfUnwrap @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_variable>>: typeOfVariable @@ var "cx1" @@ var "tx" @@ var "typeArgs",
-    _Term_wrap>>: typeOfWrappedTerm @@ var "cx1" @@ var "tx" @@ var "typeArgs"]
-
-typeOfAnnotatedTerm :: TTermDefinition (Context -> Graph -> [Type] -> AnnotatedTerm -> Prelude.Either Error (Type, Context))
-typeOfAnnotatedTerm = define "typeOfAnnotatedTerm" $
-  doc "Reconstruct the type of an annotated term (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "at" ~>
-  typeOf @@ var "cx" @@ var "tx" @@ var "typeArgs" @@ Core.annotatedTermBody (var "at")
-
-typeOfApplication :: TTermDefinition (Context -> Graph -> [Type] -> Application -> Prelude.Either Error (Type, Context))
-typeOfApplication = define "typeOfApplication" $
-  doc "Reconstruct the type of an application term (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "app" ~>
-  "fun" <~ Core.applicationFunction (var "app") $
-  "arg" <~ Core.applicationArgument (var "app") $
-  "tryType" <~ ("cx0" ~> "tfun" ~> "targ" ~> cases _Type (var "tfun")
-    (Just $ Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorNotAFunctionType $ ErrorsChecking.notAFunctionTypeError (var "tfun")) (var "cx0")) [
-    _Type_forall>>: "ft" ~> var "tryType" @@ var "cx0" @@ (Core.forallTypeBody (var "ft")) @@ var "targ",
-    _Type_function>>: "ft" ~>
-      "dom" <~ Core.functionTypeDomain (var "ft") $
-      "cod" <~ Core.functionTypeCodomain (var "ft") $
-      Logic.ifElse (typesEffectivelyEqual @@ var "tx" @@ var "dom" @@ var "targ")
-        (right $ pair (var "cod") (var "cx0"))
-        (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeMismatch $ ErrorsChecking.typeMismatchError (var "dom") (var "targ")) (var "cx0")),
-    _Type_variable>>: "v" ~>
-      "nameResult" <~ Names.freshName @@ var "cx0" $
-      "freshN" <~ Pairs.first (var "nameResult") $
-      "cx1" <~ Pairs.second (var "nameResult") $
-      right $ pair (Core.typeVariable $ var "freshN") (var "cx1")]) $
-  "result1" <<~ typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "fun" $
-  "tfun" <~ Pairs.first (var "result1") $
-  "cx2" <~ Pairs.second (var "result1") $
-  "result2" <<~ typeOf @@ var "cx2" @@ var "tx" @@ noTypeArgs @@ var "arg" $
-  "targ" <~ Pairs.first (var "result2") $
-  "cx3" <~ Pairs.second (var "result2") $
-  "result3" <<~ var "tryType" @@ var "cx3" @@ var "tfun" @@ var "targ" $
-  "t" <~ Pairs.first (var "result3") $
-  "cx4" <~ Pairs.second (var "result3") $
-  "applied" <<~ applyTypeArgumentsToType @@ var "cx4" @@ var "tx" @@ var "typeArgs" @@ var "t" $
-  right $ pair (var "applied") (var "cx4")
-
-typeOfCaseStatement :: TTermDefinition (Context -> Graph -> [Type] -> CaseStatement -> Prelude.Either Error (Type, Context))
-typeOfCaseStatement = define "typeOfCaseStatement" $
-  doc "Reconstruct the type of a case statement (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "cs" ~>
-  "tname" <~ Core.caseStatementTypeName (var "cs") $
-  "dflt" <~ Core.caseStatementDefault (var "cs") $
-  "cases" <~ Core.caseStatementCases (var "cs") $
-  "cterms" <~ Lists.map (unaryFunction Core.fieldTerm) (var "cases") $
-  -- Type the default case if present
-  "dfltResult" <<~ Eithers.mapMaybe ("e" ~> typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "e") (var "dflt") $
-  -- dfltResult :: Maybe (Type, Context)
-  "tdflt" <~ Maybes.map (unaryFunction Pairs.first) (var "dfltResult") $
-  "cx2" <~ Maybes.maybe (var "cx") (unaryFunction Pairs.second) (var "dfltResult") $
-  -- Type all case terms, threading context through the list
-  "foldResult" <~ Lists.foldl
-    ("acc" ~> "term" ~>
-      -- acc is Either Error ([Type], Context)
-      "accR" <<~ var "acc" $
-      "types" <~ Pairs.first (var "accR") $
-      "cxA" <~ Pairs.second (var "accR") $
-      "tResult" <<~ typeOf @@ var "cxA" @@ var "tx" @@ noTypeArgs @@ var "term" $
-      "t" <~ Pairs.first (var "tResult") $
-      "cxB" <~ Pairs.second (var "tResult") $
-      right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "t")) (var "cxB"))
-    (right $ pair (list ([] :: [TTerm Type])) (var "cx2"))
-    (var "cterms") $
-  "foldR" <<~ var "foldResult" $
-  "tcterms" <~ Pairs.first (var "foldR") $
-  "cx3" <~ Pairs.second (var "foldR") $
-  -- Extract function codomains
-  "fcodsResult" <~ Lists.foldl
-    ("acc" ~> "t" ~>
-      "accR" <<~ var "acc" $
-      "cods" <~ Pairs.first (var "accR") $
-      "ft" <<~ ExtractCore.functionType @@ var "t" $
-      right $ pair (Lists.concat2 (var "cods") (Lists.pure $ Core.functionTypeCodomain $ var "ft")) (var "cx3"))
-    (right $ pair (list ([] :: [TTerm Type])) (var "cx3"))
-    (var "tcterms") $
-  "fcodsR" <<~ var "fcodsResult" $
-  "fcods" <~ Pairs.first (var "fcodsR") $
-  "cods" <~ Maybes.cat (Lists.cons (var "tdflt") $ Lists.map (unaryFunction Maybes.pure) (var "fcods")) $
-  "cod" <<~ checkSameType @@ var "cx3" @@ var "tx" @@ (string "case branches") @@ var "cods" $
-  right $ pair (Core.typeFunction $ Core.functionType
-    (Resolution.nominalApplication @@ var "tname" @@ var "typeArgs")
-    (var "cod")) (var "cx3")
-
-typeOfEither :: TTermDefinition (Context -> Graph -> [Type] -> Prelude.Either Term Term -> Prelude.Either Error (Type, Context))
-typeOfEither = define "typeOfEither" $
-  doc "Reconstruct the type of an either value (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "et" ~>
-  "n" <~ Lists.length (var "typeArgs") $
-  "arityErr" <~ (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typeEither $ Core.eitherType Core.typeUnit Core.typeUnit) (int32 2) (var "n") (var "typeArgs")) (var "cx")) $
-  Maybes.maybe (var "arityErr")
-    ("uc0" ~>
-      "ta0" <~ Pairs.first (var "uc0") $
-      Maybes.maybe (var "arityErr")
-        ("uc1" ~>
-          "ta1" <~ Pairs.first (var "uc1") $
-          Logic.ifElse (Equality.equal (var "n") (int32 2))
-            (Eithers.either_
-              ("leftTerm" ~>
-                "result" <<~ typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "leftTerm" $
-                "leftType" <~ Pairs.first (var "result") $
-                "cx2" <~ Pairs.second (var "result") $
-                right $ pair (Core.typeEither $ Core.eitherType (var "leftType") (var "ta1")) (var "cx2"))
-              ("rightTerm" ~>
-                "result" <<~ typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "rightTerm" $
-                "rightType" <~ Pairs.first (var "result") $
-                "cx2" <~ Pairs.second (var "result") $
-                right $ pair (Core.typeEither $ Core.eitherType (var "ta0") (var "rightType")) (var "cx2"))
-              (var "et"))
-            (var "arityErr"))
-        (Lists.uncons (Pairs.second (var "uc0"))))
-    (Lists.uncons $ var "typeArgs")
-
-typeOfInjection :: TTermDefinition (Context -> Graph -> [Type] -> Injection -> Prelude.Either Error (Type, Context))
-typeOfInjection = define "typeOfInjection" $
-  doc "Reconstruct the type of a union injection (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "injection" ~>
-  "tname" <~ Core.injectionTypeName (var "injection") $
-  "field" <~ Core.injectionField (var "injection") $
-  "fname" <~ Core.fieldName (var "field") $
-  "fterm" <~ Core.fieldTerm (var "field") $
-  "schemaResult" <<~ Resolution.requireSchemaType @@ var "cx" @@ (Graph.graphSchemaTypes $ var "tx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "schemaResult") $
-  "cx2" <~ Pairs.second (var "schemaResult") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "sbody" <~ Core.typeSchemeBody (var "schemaType") $
-  "sfields" <<~ ExtractCore.unionType @@ var "tname" @@ var "sbody" $
-  "ftyp" <<~ Resolution.findFieldType @@ var "cx2" @@ var "fname" @@ var "sfields" $
-  right $ pair (Resolution.nominalApplication @@ var "tname" @@ var "typeArgs") (var "cx2")
-
-typeOfLambda :: TTermDefinition (Context -> Graph -> [Type] -> Lambda -> Prelude.Either Error (Type, Context))
-typeOfLambda = define "typeOfLambda" $
-  doc "Reconstruct the type of a lambda function (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "l" ~>
-  "v" <~ Core.lambdaParameter (var "l") $
-  "mdom" <~ Core.lambdaDomain (var "l") $
-  "body" <~ Core.lambdaBody (var "l") $
-  "tbodyResult" <<~ optCases (var "mdom")
-    (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorUntypedLambda ErrorsChecking.untypedLambdaError) (var "cx"))
-    ("dom" ~>
-      "types2" <~ Maps.insert (var "v") (Scoping.fTypeToTypeScheme @@ var "dom") (Graph.graphBoundTypes $ var "tx") $
-      "codResult" <<~ typeOf @@ var "cx" @@ (Graph.graphWithBoundTypes (var "tx") $ var "types2") @@ noTypeArgs @@ var "body" $
-      "cod" <~ Pairs.first (var "codResult") $
-      "cx2" <~ Pairs.second (var "codResult") $
-      right $ pair (Core.typeFunction $ Core.functionType (var "dom") (var "cod")) (var "cx2")) $
-  "tbody" <~ Pairs.first (var "tbodyResult") $
-  "cx3" <~ Pairs.second (var "tbodyResult") $
-  "applied" <<~ applyTypeArgumentsToType @@ var "cx3" @@ var "tx" @@ var "typeArgs" @@ var "tbody" $
-  right $ pair (var "applied") (var "cx3")
-
-typeOfLet :: TTermDefinition (Context -> Graph -> [Type] -> Let -> Prelude.Either Error (Type, Context))
-typeOfLet = define "typeOfLet" $
-  doc "Reconstruct the type of a let binding (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "letTerm" ~>
-  "bs" <~ Core.letBindings (var "letTerm") $
-  "body" <~ Core.letBody (var "letTerm") $
-  "bnames" <~ Lists.map (unaryFunction Core.bindingName) (var "bs") $
-  "bindingType" <~ ("b" ~>
-    Maybes.maybe
-      (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorUntypedLetBinding $ ErrorsChecking.untypedLetBindingError (var "b")) (var "cx"))
-      ("ts" ~> right $ Scoping.typeSchemeToFType @@ var "ts")
-      (Core.bindingTypeScheme $ var "b")) $
-  -- Get binding types, threading errors through the fold
-  "btypesResult" <~ Lists.foldl
-    ("acc" ~> "b" ~>
-      "accR" <<~ var "acc" $
-      "types" <~ Pairs.first (var "accR") $
-      "btype" <<~ var "bindingType" @@ var "b" $
-      right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "btype")) unit)
-    (right $ pair (list ([] :: [TTerm Type])) unit)
-    (var "bs") $
-  "btypesR" <<~ var "btypesResult" $
-  "btypes" <~ Pairs.first (var "btypesR") $
-  -- Extended type context
-  "tx2" <~ (Graph.graphWithBoundTypes (var "tx")
-    (Maps.union
-      (Maps.fromList $ Lists.zip (var "bnames") (Lists.map (Scoping.fTypeToTypeScheme) $ var "btypes"))
-      (Graph.graphBoundTypes $ var "tx"))) $
-  "tResult" <<~ typeOf @@ var "cx" @@ var "tx2" @@ noTypeArgs @@ var "body" $
-  "t" <~ Pairs.first (var "tResult") $
-  "cx2" <~ Pairs.second (var "tResult") $
-  "applied" <<~ applyTypeArgumentsToType @@ var "cx2" @@ var "tx" @@ var "typeArgs" @@ var "t" $
-  right $ pair (var "applied") (var "cx2")
-
-typeOfList :: TTermDefinition (Context -> Graph -> [Type] -> [Term] -> Prelude.Either Error (Type, Context))
-typeOfList = define "typeOfList" $
-  doc "Reconstruct the type of a list (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "els" ~>
-  "listArityErr" <~ (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typeList Core.typeUnit) (int32 1) (Lists.length $ var "typeArgs") (var "typeArgs")) (var "cx")) $
-  Logic.ifElse (Lists.null $ var "els")
-    (Logic.ifElse (Equality.equal (Lists.length $ var "typeArgs") (int32 1))
-      (Maybes.maybe (var "listArityErr")
-        ("ta0" ~> right $ pair (Core.typeList $ var "ta0") (var "cx"))
-        (Lists.maybeHead $ var "typeArgs"))
-      (var "listArityErr"))
-    -- Nonempty list: type all elements, threading context
-    ("foldResult" <~ Lists.foldl
-      ("acc" ~> "term" ~>
-        "accR" <<~ var "acc" $
-        "types" <~ Pairs.first (var "accR") $
-        "cxA" <~ Pairs.second (var "accR") $
-        "tResult" <<~ typeOf @@ var "cxA" @@ var "tx" @@ noTypeArgs @@ var "term" $
-        "t" <~ Pairs.first (var "tResult") $
-        "cxB" <~ Pairs.second (var "tResult") $
-        right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "t")) (var "cxB"))
-      (right $ pair (list ([] :: [TTerm Type])) (var "cx"))
-      (var "els") $
-    "foldR" <<~ var "foldResult" $
-    "eltypes" <~ Pairs.first (var "foldR") $
-    "cx2" <~ Pairs.second (var "foldR") $
-    "unifiedType" <<~ checkSameType @@ var "cx2" @@ var "tx" @@ (string "list elements") @@ var "eltypes" $
-    right $ pair (Core.typeList $ var "unifiedType") (var "cx2"))
-
-typeOfLiteral :: TTermDefinition (Context -> Graph -> [Type] -> Literal -> Prelude.Either Error (Type, Context))
-typeOfLiteral = define "typeOfLiteral" $
-  doc "Reconstruct the type of a literal (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "lit" ~>
-  "t" <~ Core.typeLiteral (Reflect.literalType @@ var "lit") $
-  "applied" <<~ applyTypeArgumentsToType @@ var "cx" @@ var "tx" @@ var "typeArgs" @@ var "t" $
-  right $ pair (var "applied") (var "cx")
-
-typeOfMap :: TTermDefinition (Context -> Graph -> [Type] -> M.Map Term Term -> Prelude.Either Error (Type, Context))
-typeOfMap = define "typeOfMap" $
-  doc "Reconstruct the type of a map (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "m" ~>
-  "mapArityErr" <~ (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typeMap $ Core.mapType Core.typeUnit Core.typeUnit) (int32 2) (Lists.length $ var "typeArgs") (var "typeArgs")) (var "cx")) $
-  Logic.ifElse (Maps.null $ var "m")
-    (Logic.ifElse (Equality.equal (Lists.length $ var "typeArgs") (int32 2))
-      (Maybes.maybe (var "mapArityErr")
-        ("uc0" ~>
-          "ta0" <~ Pairs.first (var "uc0") $
-          Maybes.maybe (var "mapArityErr")
-            ("uc1" ~>
-              "ta1" <~ Pairs.first (var "uc1") $
-              right $ pair (Core.typeMap $ Core.mapType (var "ta0") (var "ta1")) (var "cx"))
-            (Lists.uncons (Pairs.second (var "uc0"))))
-        (Lists.uncons $ var "typeArgs"))
-      (var "mapArityErr"))
-    -- Nonempty map: type keys and values
-    ("pairs" <~ Maps.toList (var "m") $
-    -- Fold over keys
-    "keyFoldResult" <~ Lists.foldl
-      ("acc" ~> "p" ~>
-        "accR" <<~ var "acc" $
-        "types" <~ Pairs.first (var "accR") $
-        "cxA" <~ Pairs.second (var "accR") $
-        "tResult" <<~ typeOf @@ var "cxA" @@ var "tx" @@ noTypeArgs @@ (Pairs.first $ var "p") $
-        "t" <~ Pairs.first (var "tResult") $
-        "cxB" <~ Pairs.second (var "tResult") $
-        right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "t")) (var "cxB"))
-      (right $ pair (list ([] :: [TTerm Type])) (var "cx"))
-      (var "pairs") $
-    "keyFoldR" <<~ var "keyFoldResult" $
-    "keyTypes" <~ Pairs.first (var "keyFoldR") $
-    "cx2" <~ Pairs.second (var "keyFoldR") $
-    "kt" <<~ checkSameType @@ var "cx2" @@ var "tx" @@ (string "map keys") @@ var "keyTypes" $
-    -- Fold over values
-    "valFoldResult" <~ Lists.foldl
-      ("acc" ~> "p" ~>
-        "accR" <<~ var "acc" $
-        "types" <~ Pairs.first (var "accR") $
-        "cxA" <~ Pairs.second (var "accR") $
-        "tResult" <<~ typeOf @@ var "cxA" @@ var "tx" @@ noTypeArgs @@ (Pairs.second $ var "p") $
-        "t" <~ Pairs.first (var "tResult") $
-        "cxB" <~ Pairs.second (var "tResult") $
-        right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "t")) (var "cxB"))
-      (right $ pair (list ([] :: [TTerm Type])) (var "cx2"))
-      (var "pairs") $
-    "valFoldR" <<~ var "valFoldResult" $
-    "valTypes" <~ Pairs.first (var "valFoldR") $
-    "cx3" <~ Pairs.second (var "valFoldR") $
-    "vt" <<~ checkSameType @@ var "cx3" @@ var "tx" @@ (string "map values") @@ var "valTypes" $
-    "applied" <<~ applyTypeArgumentsToType @@ var "cx3" @@ var "tx" @@ var "typeArgs"
-      @@ (Core.typeMap $ Core.mapType (var "kt") (var "vt")) $
-    right $ pair (var "applied") (var "cx3"))
-
-typeOfMaybe :: TTermDefinition (Context -> Graph -> [Type] -> Maybe Term -> Prelude.Either Error (Type, Context))
-typeOfMaybe = define "typeOfMaybe" $
-  doc "Reconstruct the type of an optional value (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "mt" ~>
-  "forNothing" <~ (
-    "n" <~ Lists.length (var "typeArgs") $
-    "maybeArityErr" <~ (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typeMaybe Core.typeUnit) (int32 1) (var "n") (var "typeArgs")) (var "cx")) $
-    Logic.ifElse (Equality.equal (var "n") (int32 1))
-      (Maybes.maybe (var "maybeArityErr")
-        ("ta0" ~> right $ pair (Core.typeMaybe $ var "ta0") (var "cx"))
-        (Lists.maybeHead $ var "typeArgs"))
-      (var "maybeArityErr")) $
-  "forJust" <~ ("term" ~>
-    "tResult" <<~ typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "term" $
-    "termType" <~ Pairs.first (var "tResult") $
-    "cx2" <~ Pairs.second (var "tResult") $
-    "t" <~ Core.typeMaybe (var "termType") $
-    "applied" <<~ applyTypeArgumentsToType @@ var "cx2" @@ var "tx" @@ var "typeArgs" @@ var "t" $
-    right $ pair (var "applied") (var "cx2")) $
-  optCases (var "mt") (var "forNothing") (var "forJust")
-
-typeOfPair :: TTermDefinition (Context -> Graph -> [Type] -> (Term, Term) -> Prelude.Either Error (Type, Context))
-typeOfPair = define "typeOfPair" $
-  doc "Reconstruct the type of a pair (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "p" ~>
-  "n" <~ Lists.length (var "typeArgs") $
-  Logic.ifElse (Equality.equal (var "n") (int32 2))
-    ("pairFst" <~ Pairs.first (var "p") $
-    "pairSnd" <~ Pairs.second (var "p") $
-    "result1" <<~ typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "pairFst" $
-    "firstType" <~ Pairs.first (var "result1") $
-    "cx2" <~ Pairs.second (var "result1") $
-    "result2" <<~ typeOf @@ var "cx2" @@ var "tx" @@ noTypeArgs @@ var "pairSnd" $
-    "secondType" <~ Pairs.first (var "result2") $
-    "cx3" <~ Pairs.second (var "result2") $
-    right $ pair (Core.typePair $ Core.pairType (var "firstType") (var "secondType")) (var "cx3"))
-    (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typePair $ Core.pairType Core.typeUnit Core.typeUnit) (int32 2) (var "n") (var "typeArgs")) (var "cx"))
-
-typeOfPrimitive :: TTermDefinition (Context -> Graph -> [Type] -> Name -> Prelude.Either Error (Type, Context))
-typeOfPrimitive = define "typeOfPrimitive" $
-  doc "Reconstruct the type of a primitive function (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "name" ~>
-  -- Look up the primitive directly in the graph's primitives map and extract its type.
-  -- This avoids reconstructing a Map Name TypeScheme on every call (O(p) per call).
-  "rawTs" <~ Maybes.map ("_p" ~> Graph.primitiveTypeScheme (var "_p"))
-    (Maps.lookup (var "name") (Graph.graphPrimitives $ var "tx")) $
-  Maybes.maybe
-    (Ctx.failInContext (Error.errorUndefinedTermVariable $ ErrorsCore.undefinedTermVariableError (Paths.subtermPath $ list ([] :: [TTerm SubtermStep])) (var "name")) (var "cx"))
-    ("tsRaw" ~>
-      "instResult" <~ Resolution.instantiateTypeScheme @@ var "cx" @@ var "tsRaw" $
-      "ts" <~ Pairs.first (var "instResult") $
-      "cx2" <~ Pairs.second (var "instResult") $
-      "t" <~ Scoping.typeSchemeToFType @@ var "ts" $
-      "applied" <<~ applyTypeArgumentsToType @@ var "cx2" @@ var "tx" @@ var "typeArgs" @@ var "t" $
-      right $ pair (var "applied") (var "cx2"))
-    (var "rawTs")
-
-typeOfProjection :: TTermDefinition (Context -> Graph -> [Type] -> Projection -> Prelude.Either Error (Type, Context))
-typeOfProjection = define "typeOfProjection" $
-  doc "Reconstruct the type of a record projection (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "p" ~>
-  "tname" <~ Core.projectionTypeName (var "p") $
-  "fname" <~ Core.projectionField (var "p") $
-  "schemaResult" <<~ Resolution.requireSchemaType @@ var "cx" @@ (Graph.graphSchemaTypes $ var "tx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "schemaResult") $
-  "cx2" <~ Pairs.second (var "schemaResult") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "sbody" <~ Core.typeSchemeBody (var "schemaType") $
-  "sfields" <<~ ExtractCore.recordType @@ var "tname" @@ var "sbody" $
-  "ftyp" <<~ Resolution.findFieldType @@ var "cx2" @@ var "fname" @@ var "sfields" $
-  "subst" <~ Typing.typeSubst (Maps.fromList $ Lists.zip (var "svars") (var "typeArgs")) $
-  "sftyp" <~ Substitution.substInType @@ var "subst" @@ var "ftyp" $
-  right $ pair (Core.typeFunction $ Core.functionType
-    (Resolution.nominalApplication @@ var "tname" @@ var "typeArgs")
-    (var "sftyp")) (var "cx2")
-
-typeOfRecord :: TTermDefinition (Context -> Graph -> [Type] -> Record -> Prelude.Either Error (Type, Context))
-typeOfRecord = define "typeOfRecord" $
-  doc "Reconstruct the type of a record (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "record" ~>
-  "tname" <~ Core.recordTypeName (var "record") $
-  "fields" <~ Core.recordFields (var "record") $
-  -- Type all field terms, threading context (for checking only)
-  "foldResult" <~ Lists.foldl
-    ("acc" ~> "term" ~>
-      "accR" <<~ var "acc" $
-      "types" <~ Pairs.first (var "accR") $
-      "cxA" <~ Pairs.second (var "accR") $
-      "tResult" <<~ typeOf @@ var "cxA" @@ var "tx" @@ noTypeArgs @@ var "term" $
-      "t" <~ Pairs.first (var "tResult") $
-      "cxB" <~ Pairs.second (var "tResult") $
-      right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "t")) (var "cxB"))
-    (right $ pair (list ([] :: [TTerm Type])) (var "cx"))
-    (Lists.map (unaryFunction Core.fieldTerm) (var "fields")) $
-  "foldR" <<~ var "foldResult" $
-  "cx2" <~ Pairs.second (var "foldR") $
-  right $ pair (Resolution.nominalApplication @@ var "tname" @@ var "typeArgs") (var "cx2")
-
-typeOfSet :: TTermDefinition (Context -> Graph -> [Type] -> S.Set Term -> Prelude.Either Error (Type, Context))
-typeOfSet = define "typeOfSet" $
-  doc "Reconstruct the type of a set (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "els" ~>
-  "setArityErr" <~ (Ctx.failInContext (Error.errorChecking $ ErrorsChecking.checkingErrorTypeArityMismatch $ ErrorsChecking.typeArityMismatchError (Core.typeSet Core.typeUnit) (int32 1) (Lists.length $ var "typeArgs") (var "typeArgs")) (var "cx")) $
-  Logic.ifElse (Sets.null $ var "els")
-    (Logic.ifElse (Equality.equal (Lists.length $ var "typeArgs") (int32 1))
-      (Maybes.maybe (var "setArityErr")
-        ("ta0" ~> right $ pair (Core.typeSet $ var "ta0") (var "cx"))
-        (Lists.maybeHead $ var "typeArgs"))
-      (var "setArityErr"))
-    -- Nonempty set: type all elements, threading context
-    ("foldResult" <~ Lists.foldl
-      ("acc" ~> "term" ~>
-        "accR" <<~ var "acc" $
-        "types" <~ Pairs.first (var "accR") $
-        "cxA" <~ Pairs.second (var "accR") $
-        "tResult" <<~ typeOf @@ var "cxA" @@ var "tx" @@ noTypeArgs @@ var "term" $
-        "t" <~ Pairs.first (var "tResult") $
-        "cxB" <~ Pairs.second (var "tResult") $
-        right $ pair (Lists.concat2 (var "types") (Lists.pure $ var "t")) (var "cxB"))
-      (right $ pair (list ([] :: [TTerm Type])) (var "cx"))
-      (Sets.toList $ var "els") $
-    "foldR" <<~ var "foldResult" $
-    "eltypes" <~ Pairs.first (var "foldR") $
-    "cx2" <~ Pairs.second (var "foldR") $
-    "unifiedType" <<~ checkSameType @@ var "cx2" @@ var "tx" @@ (string "set elements") @@ var "eltypes" $
-    right $ pair (Core.typeSet $ var "unifiedType") (var "cx2"))
-
-typeOfTerm :: TTermDefinition (Context -> Graph -> Term -> Either Error Type)
-typeOfTerm = define "typeOfTerm" $
-  doc "Check the type of a term" $
-  "cx" ~> "g" ~> "term" ~>
-  Eithers.map (primitive _pairs_first)
-    (typeOf @@ var "cx" @@ var "g" @@ list ([] :: [TTerm Type]) @@ var "term")
-
-typeOfTypeApplication :: TTermDefinition (Context -> Graph -> [Type] -> TypeApplicationTerm -> Prelude.Either Error (Type, Context))
-typeOfTypeApplication = define "typeOfTypeApplication" $
-  doc "Reconstruct the type of a type application term (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "tyapp" ~>
-  "body" <~ Core.typeApplicationTermBody (var "tyapp") $
-  "t" <~ Core.typeApplicationTermType (var "tyapp") $
-  typeOf @@ var "cx" @@ var "tx" @@ Lists.cons (var "t") (var "typeArgs") @@ var "body"
-
-typeOfTypeLambda :: TTermDefinition (Context -> Graph -> [Type] -> TypeLambda -> Prelude.Either Error (Type, Context))
-typeOfTypeLambda = define "typeOfTypeLambda" $
-  doc "Reconstruct the type of a type lambda (type abstraction) term (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "tl" ~>
-  "v" <~ Core.typeLambdaParameter (var "tl") $
-  "body" <~ Core.typeLambdaBody (var "tl") $
-  "vars" <~ Graph.graphTypeVariables (var "tx") $
-  "tx2" <~ Graph.graphWithTypeVariables (var "tx") (Sets.insert (var "v") (var "vars")) $
-  "result1" <<~ typeOf @@ var "cx" @@ var "tx2" @@ noTypeArgs @@ var "body" $
-  "t1" <~ Pairs.first (var "result1") $
-  "cx2" <~ Pairs.second (var "result1") $
-  "applied" <<~ applyTypeArgumentsToType @@ var "cx2" @@ var "tx" @@ var "typeArgs"
-    @@ (Core.typeForall $ Core.forallType (var "v") (var "t1")) $
-  right $ pair (var "applied") (var "cx2")
-
-typeOfUnit :: TTermDefinition (Context -> Graph -> [Type] -> Prelude.Either Error (Type, Context))
-typeOfUnit = define "typeOfUnit" $
-  doc "Reconstruct the type of the unit term (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~>
-  "applied" <<~ applyTypeArgumentsToType @@ var "cx" @@ var "tx" @@ var "typeArgs" @@ Core.typeUnit $
-  right $ pair (var "applied") (var "cx")
-
-typeOfUnwrap :: TTermDefinition (Context -> Graph -> [Type] -> Name -> Prelude.Either Error (Type, Context))
-typeOfUnwrap = define "typeOfUnwrap" $
-  doc "Reconstruct the type of an unwrap operation (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "tname" ~>
-  "schemaResult" <<~ Resolution.requireSchemaType @@ var "cx" @@ (Graph.graphSchemaTypes $ var "tx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "schemaResult") $
-  "cx2" <~ Pairs.second (var "schemaResult") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "sbody" <~ Core.typeSchemeBody (var "schemaType") $
-  "wrapped" <<~ ExtractCore.wrappedType @@ var "tname" @@ var "sbody" $
-  "subst" <~ Typing.typeSubst (Maps.fromList $ Lists.zip (var "svars") (var "typeArgs")) $
-  "swrapped" <~ Substitution.substInType @@ var "subst" @@ var "wrapped" $
-  right $ pair (MetaTypes.function
-    (Resolution.nominalApplication @@ var "tname" @@ var "typeArgs")
-    (var "swrapped")) (var "cx2")
-
-typeOfVariable :: TTermDefinition (Context -> Graph -> [Type] -> Name -> Prelude.Either Error (Type, Context))
-typeOfVariable = define "typeOfVariable" $
-  doc "Reconstruct the type of a variable (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "name" ~>
-  "rawTypeScheme" <~ Maps.lookup (var "name") (Graph.graphBoundTypes $ var "tx") $
-  "forScheme" <~ ("ts" ~>
-      "tResult" <~ Logic.ifElse (Lists.null $ var "typeArgs")
-        (Resolution.instantiateType @@ var "cx" @@ (Scoping.typeSchemeToFType @@ var "ts"))
-        (pair (Scoping.typeSchemeToFType @@ var "ts") (var "cx")) $
-      "t" <~ Pairs.first (var "tResult") $
-      "cx2" <~ Pairs.second (var "tResult") $
-      "applied" <<~ applyTypeArgumentsToType @@ var "cx2" @@ var "tx" @@ var "typeArgs" @@ var "t" $
-      right $ pair (var "applied") (var "cx2")) $
-  Maybes.maybe
-    -- Not found in graphBoundTypes: fall through to graphPrimitives
-    (Maybes.maybe
-      (Ctx.failInContext (Error.errorUntypedTermVariable $ ErrorsCore.untypedTermVariableError (Paths.subtermPath $ list ([] :: [TTerm SubtermStep])) (var "name")) (var "cx"))
-      (var "forScheme")
-      (Maybes.map ("_p" ~> Graph.primitiveTypeScheme (var "_p"))
-        (Maps.lookup (var "name") (Graph.graphPrimitives $ var "tx"))))
-    (var "forScheme")
-    (var "rawTypeScheme")
-
-typeOfWrappedTerm :: TTermDefinition (Context -> Graph -> [Type] -> WrappedTerm -> Prelude.Either Error (Type, Context))
-typeOfWrappedTerm = define "typeOfWrappedTerm" $
-  doc "Reconstruct the type of a wrapped term (Either/Context version)" $
-  "cx" ~> "tx" ~> "typeArgs" ~> "wt" ~>
-  "tname" <~ Core.wrappedTermTypeName (var "wt") $
-  "body" <~ Core.wrappedTermBody (var "wt") $
-  -- Type the body for checking purposes
-  "result" <<~ typeOf @@ var "cx" @@ var "tx" @@ noTypeArgs @@ var "body" $
-  "cx2" <~ Pairs.second (var "result") $
-  right $ pair (Resolution.nominalApplication @@ var "tname" @@ var "typeArgs") (var "cx2")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Constants.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Constants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Constants.hs
+++ /dev/null
@@ -1,135 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Constants where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  debugInference, ignoredVariable, key_classes, key_debugId, key_deprecated, key_description,
-  key_exclude, key_firstClassType, key_maxLength, key_minLength, key_preserveFieldName,
-  key_type, key_freshTypeVariableCount, maxInt32, maxTraceDepth,
-  warningAutoGeneratedFile)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.constants"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("A module for tier-0 constants.")}
-  where
-   definitions = [
-     toDefinition debugInference,
-     toDefinition ignoredVariable,
-     toDefinition key_classes,
-     toDefinition key_debugId,
-     toDefinition key_deprecated,
-     toDefinition key_description,
-     toDefinition key_exclude,
-     toDefinition key_firstClassType,
-     toDefinition key_maxLength,
-     toDefinition key_minLength,
-     toDefinition key_preserveFieldName,
-     toDefinition key_type,
-     toDefinition key_freshTypeVariableCount,
-     toDefinition maxInt32,
-     toDefinition maxTraceDepth,
-     toDefinition warningAutoGeneratedFile]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-defineAnnotationKey :: String -> Maybe String -> TTermDefinition Name
-defineAnnotationKey name mdesc = define ("key_" <> name) $ case mdesc of
-    Nothing -> def
-    Just comment -> doc comment def
-  where
-    def = wrap _Name $ string name
-
-debugInference :: TTermDefinition Bool
-debugInference = define "debugInference" $
-  doc "Disable type checking by default, for better performance" $
-  true
-  
-ignoredVariable :: TTermDefinition String
-ignoredVariable = define "ignoredVariable" $
-  doc "The name used for ignored variables" $
-  string "_"
-
-key_classes = defineAnnotationKey "classes" $ Just "Annotation key for type classes"
-key_debugId = defineAnnotationKey "debugId" $ Just "Annotation key for debug identifiers"
-key_deprecated = defineAnnotationKey "deprecated" $ Just "Annotation key for deprecated markers"
-key_description = defineAnnotationKey "description" $ Just "Annotation key for descriptions"
-key_exclude = defineAnnotationKey "exclude" $ Just "Annotation key for exclusions"
-key_firstClassType = defineAnnotationKey "firstClassType" $
-  Just "A flag which tells the language coders to encode a given encoded type as a term rather than a native type"
-key_maxLength = defineAnnotationKey "maxLength" $ Just "Annotation key for maximum length constraints"
-key_minLength = defineAnnotationKey "minLength" $ Just "Annotation key for minimum length constraints"
-key_preserveFieldName = defineAnnotationKey "preserveFieldName" $ Just "Annotation key for preserving field names during code generation"
-key_type = defineAnnotationKey "type" $ Just "Annotation key for type information"
-key_freshTypeVariableCount = defineAnnotationKey "freshTypeVariableCount" $
-  Just "A counter for generating fresh type variable names"
-
-maxInt32 :: TTermDefinition Int
-maxInt32 = define "maxInt32" $
-  doc "The maximum value of a 32-bit integer" $
-  int32 2147483647 -- 2^31 - 1
-
-maxTraceDepth :: TTermDefinition Int
-maxTraceDepth = define "maxTraceDepth" $
-  doc ("A maximum depth for nested computations."
-    <> " Currently, this is set very high because deep recursion is common in type inference over the Hydra kernel.") $
-  int32 5000
-
-warningAutoGeneratedFile :: TTermDefinition String
-warningAutoGeneratedFile = define "warningAutoGeneratedFile" $
-  doc "A standard warning message for auto-generated files" $
-  string "Note: this is an automatically generated file. Do not edit."
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Decoding.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Decoding.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Decoding.hs
+++ /dev/null
@@ -1,931 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Kernel.Terms.Decoding where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (literalType, matchRecord, matchUnion)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import qualified Hydra.Dsl.Meta.Phantoms     as Phantoms
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  elimination, field, fieldType, floatType, floatValue, function, injection, integerType, integerValue, literal,
-  literalType, record, term, type_, typeScheme)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Kernel.Terms.Annotations as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-
-import qualified Hydra.Sources.Kernel.Terms.Names as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Constants as Constants
-import qualified Hydra.Sources.Kernel.Terms.Predicates as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Dsl.Meta.DeepCore as DC
-import           Hydra.Dsl.Meta.DeepCore ((@@@))
-
-
-ns :: Namespace
-ns = Namespace "hydra.decoding"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, ExtractCore.ns, Formatting.ns, Lexical.ns, Names.ns, Predicates.ns, Rewriting.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Functions for generating term decoders from type modules"}
-  where
-    definitions = [
-      toDefinition collectForallVariables,
-      toDefinition collectOrdConstrainedVariables,
-      toDefinition collectTypeVariables,
-      toDefinition collectTypeVariablesFromType,
-      toDefinition decodeBinding,
-      toDefinition decodeBindingName,
-      toDefinition decodeEitherType,
-      toDefinition decodeForallType,
-      toDefinition decodeListType,
-      toDefinition decodeLiteralType,
-      toDefinition decodeMapType,
-      toDefinition decodeMaybeType,
-      toDefinition decodeModule,
-      toDefinition decodeNamespace,
-      toDefinition decodePairType,
-      toDefinition decodeRecordType,
-      toDefinition decodeRecordTypeImpl,
-      toDefinition decodeRecordTypeNamed,
-      toDefinition decodeSetType,
-      toDefinition decodeType,
-      toDefinition decodeTypeNamed,
-      toDefinition decodeUnitType,
-      toDefinition decodeUnionType,
-      toDefinition decodeUnionTypeNamed,
-      toDefinition decodeWrappedType,
-      toDefinition decodeWrappedTypeNamed,
-      toDefinition decoderFullResultType,
-      toDefinition decoderFullResultTypeNamed,
-      toDefinition decoderResultType,
-      toDefinition decoderType,
-      toDefinition decoderTypeNamed,
-      toDefinition decoderTypeScheme,
-      toDefinition decoderTypeSchemeNamed,
-      toDefinition filterTypeBindings,
-      toDefinition isDecodableBinding,
-      toDefinition prependForallDecoders]
-
-define :: String -> TTerm x -> TTermDefinition x
-define = definitionInModule module_
-
--- | Bridge helper: format InContext DecodingError as a string
-formatDecodingError :: TTerm (DecodingError -> String)
-formatDecodingError = "e" ~> unwrap _DecodingError @@ var "e"
-
---------------------------------------------------------------------------------
--- Helper functions
---------------------------------------------------------------------------------
-
--- | Build a decoder term that takes cx and raw, strips annotations/dereferences variables, and matches on it
--- The result is: \cx -> \raw -> either (\err -> Left (DecodingError err)) (\stripped -> case stripped of ...) (stripAndDereferenceTermEither cx raw)
--- Note: We use the original inline style - the Python coder should handle this pattern by recognizing
--- when a lambda body is a case application and generating a proper function with match statement.
-deannotateAndMatch :: TTerm (Maybe Term) -> [TTerm Field] -> TTerm Term
-deannotateAndMatch dflt cses = DC.lambda "cx" $ DC.lambda "raw" $
-  DC.primitive _eithers_either
-    -- If Left (decoding error), propagate it
-    @@@ (DC.lambda "err" $ DC.left $ DC.var "err")
-    -- If Right (stripped term), do the case match
-    @@@ (DC.lambda "stripped" $ DC.cases _Term (DC.var "stripped") dflt cses)
-    -- Call stripWithDecodingError cx raw (returns Either DecodingError Term)
-    @@@ (DC.ref ExtractCore.stripWithDecodingError @@@ DC.var "cx" @@@ DC.var "raw")
-
--- | Helper to create a decoding error term from a message (object-level)
--- Returns: Term.wrap (WrappedTerm "hydra.util.DecodingError" (Term.literal (Literal.string msg)))
-decodingErrorTerm :: TTerm String -> TTerm Term
-decodingErrorTerm msg = DC.wrap _DecodingError $ DC.string msg
-
--- | Helper to create a Left (error) result term
--- Returns: Term.either (Left (decodingErrorTerm msg))
-leftError :: TTerm String -> TTerm Term
-leftError msg = DC.left $ decodingErrorTerm msg
-
--- | Helper to strip and dereference with DecodingError — delegates to the module-level definition
-stripWithDecodingError :: TTerm Graph -> TTerm Term -> TTerm (Either DecodingError Term)
-stripWithDecodingError g term = ExtractCore.stripWithDecodingError @@ g @@ term
-
---------------------------------------------------------------------------------
--- Main decoder functions
---------------------------------------------------------------------------------
-
--- | Compute the result type for a decoder based on the input type
--- Returns the domain type name for the decoded value
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-decoderResultType :: TTermDefinition (Type -> Name)
-decoderResultType = define "decoderResultType" $
-  doc "Compute the result type name for a decoder" $
-  "typ" ~>
-  cases _Type (var "typ") (Just (Core.nameLift _Term)) [
-    _Type_annotated>>: "at" ~>
-      decoderResultType @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      -- For type applications like ColumnSchema<t>, get result type from function part
-      decoderResultType @@ (Core.applicationTypeFunction (var "appType")),
-    _Type_forall>>: "ft" ~>
-      decoderResultType @@ (Core.forallTypeBody (var "ft")),
-    _Type_literal>>: "_" ~>
-      Core.nameLift _Literal,
-    _Type_record>>: constant (Core.nameLift _Term),
-    _Type_union>>: constant (Core.nameLift _Term),
-    _Type_wrap>>: constant (Core.nameLift _Term)]
-
--- | Build a decoder type scheme: Term -> Either DecodingError ResultType
--- For polymorphic types, adds extra arguments for the decoders of type parameters
--- Includes Ord constraints for type variables that appear in Set element positions
-decoderTypeScheme :: TTermDefinition (Type -> TypeScheme)
-decoderTypeScheme = define "decoderTypeScheme" $
-  doc "Build type scheme for a decoder function" $
-  "typ" ~>
-    "typeVars" <~ collectTypeVariables @@ var "typ" $
-    "allOrdVars" <~ collectOrdConstrainedVariables @@ var "typ" $
-    -- Filter to only include actual forall-bound type variables
-    -- (collectOrdConstrainedVariables may return nominal type references like "hydra.relational.ColumnName")
-    "ordVars" <~ Lists.filter
-      ("v" ~> Lists.elem (var "v" :: TTerm Name) (var "typeVars" :: TTerm [Name]))
-      (var "allOrdVars") $
-    -- Build constraints: for each ordVar, add Ord constraint (uses original var names, normalization renames them)
-    "constraints" <~ (
-      Logic.ifElse (Lists.null (var "ordVars"))
-        Phantoms.nothing
-        (just $ Maps.fromList $ Lists.map
-          ("v" ~> pair (var "v") (Core.typeVariableMetadata $ Sets.singleton $ Core.nameLift _TypeClass_ordering))
-          (var "ordVars"))) $
-    Core.typeScheme
-      (var "typeVars")
-      (decoderType @@ var "typ")
-      (var "constraints")
-
--- | Build a decoder type scheme with element name for nominal types
-decoderTypeSchemeNamed :: TTermDefinition (Name -> Type -> TypeScheme)
-decoderTypeSchemeNamed = define "decoderTypeSchemeNamed" $
-  doc "Build type scheme for a decoder function with element name" $
-  "ename" ~> "typ" ~>
-    "typeVars" <~ collectTypeVariables @@ var "typ" $
-    "allOrdVars" <~ collectOrdConstrainedVariables @@ var "typ" $
-    "ordVars" <~ Lists.filter
-      ("v" ~> Lists.elem (var "v" :: TTerm Name) (var "typeVars" :: TTerm [Name]))
-      (var "allOrdVars") $
-    "constraints" <~ (
-      Logic.ifElse (Lists.null (var "ordVars"))
-        Phantoms.nothing
-        (just $ Maps.fromList $ Lists.map
-          ("v" ~> pair (var "v") (Core.typeVariableMetadata $ Sets.singleton $ Core.nameLift _TypeClass_ordering))
-          (var "ordVars"))) $
-    Core.typeScheme
-      (var "typeVars")
-      (decoderTypeNamed @@ var "ename" @@ var "typ")
-      (var "constraints")
-
--- | Build decoder function type with element name
-decoderTypeNamed :: TTermDefinition (Name -> Type -> Type)
-decoderTypeNamed = define "decoderTypeNamed" $
-  doc "Build decoder function type with element name" $
-  "ename" ~> "typ" ~>
-    "resultType" <~ (decoderFullResultTypeNamed @@ var "ename" @@ var "typ") $
-    "baseType" <~ Core.typeFunction (Core.functionType
-      (Core.typeVariable (Core.nameLift _Graph))
-      (Core.typeFunction (Core.functionType
-        (Core.typeVariable (Core.nameLift _Term))
-        (Core.typeEither (Core.eitherType
-          (Core.typeVariable (Core.nameLift _DecodingError))
-          (var "resultType")))))) $
-    prependForallDecoders @@ var "baseType" @@ var "typ"
-
--- | Get full result type for decoder with element name
-decoderFullResultTypeNamed :: TTermDefinition (Name -> Type -> Type)
-decoderFullResultTypeNamed = define "decoderFullResultTypeNamed" $
-  doc "Get full result type for decoder with element name" $
-  "ename" ~> "typ" ~>
-  cases _Type (var "typ") (Just $ Core.typeVariable (Core.nameLift _Term)) [
-    _Type_annotated>>: "at" ~>
-      decoderFullResultTypeNamed @@ var "ename" @@ (Core.annotatedTypeBody (var "at")),
-    _Type_forall>>: "ft" ~>
-      Core.typeApplication $ Core.applicationType
-        (decoderFullResultTypeNamed @@ var "ename" @@ Core.forallTypeBody (var "ft"))
-        (Core.typeVariable (Core.forallTypeParameter (var "ft"))),
-    _Type_record>>: constant (Core.typeVariable (var "ename")),
-    _Type_union>>: constant (Core.typeVariable (var "ename")),
-    _Type_wrap>>: constant (Core.typeVariable (var "ename")),
-    _Type_application>>: "appType" ~>
-      Core.typeApplication $ Core.applicationType
-        (decoderFullResultType @@ Core.applicationTypeFunction (var "appType"))
-        (Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      Core.typeEither $ Core.eitherType
-        (decoderFullResultType @@ Core.eitherTypeLeft (var "et"))
-        (decoderFullResultType @@ Core.eitherTypeRight (var "et")),
-    _Type_list>>: "elemType" ~>
-      Core.typeList (decoderFullResultType @@ var "elemType"),
-    _Type_literal>>: "_" ~>
-      Core.typeVariable (Core.nameLift _Literal),
-    _Type_map>>: "mt" ~>
-      Core.typeMap $ Core.mapType
-        (decoderFullResultType @@ Core.mapTypeKeys (var "mt"))
-        (decoderFullResultType @@ Core.mapTypeValues (var "mt")),
-    _Type_maybe>>: "elemType" ~>
-      Core.typeMaybe (decoderFullResultType @@ var "elemType"),
-    _Type_pair>>: "pt" ~>
-      Core.typePair $ Core.pairType
-        (decoderFullResultType @@ Core.pairTypeFirst (var "pt"))
-        (decoderFullResultType @@ Core.pairTypeSecond (var "pt")),
-    _Type_set>>: "elemType" ~>
-      Core.typeSet (decoderFullResultType @@ var "elemType"),
-    _Type_unit>>: constant Core.typeUnit,
-    _Type_variable>>: "name" ~>
-      Core.typeVariable (var "name"),
-    _Type_void>>: constant Core.typeVoid]
-
--- | Collect type variables from forall types
--- Note: Graph is NOT included as a type variable - it's a concrete type
-collectTypeVariables :: TTermDefinition (Type -> [Name])
-collectTypeVariables = define "collectTypeVariables" $
-  doc "Collect type variable names from a type (forall parameters only)" $
-  "typ" ~> collectForallVariables @@ var "typ"
-
--- | Collect just the forall type variables from a type
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-collectForallVariables :: TTermDefinition (Type -> [Name])
-collectForallVariables = define "collectForallVariables" $
-  doc "Collect forall type variable names from a type" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      collectForallVariables @@ (Core.annotatedTypeBody (var "at")),
-    _Type_forall>>: "ft" ~>
-      Lists.cons (Core.forallTypeParameter (var "ft"))
-        (collectForallVariables @@ Core.forallTypeBody (var "ft"))]
-
--- | Collect type variables that need Ord constraints (from Map key or Set element positions).
--- This is a pure function that traverses the type structure without dereferencing type names.
--- The collected variables use their original names; normalization will rename them later.
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-collectOrdConstrainedVariables :: TTermDefinition (Type -> [Name])
-collectOrdConstrainedVariables = define "collectOrdConstrainedVariables" $
-  doc "Collect type variables needing Ord constraints (from Map key and Set element types)" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      collectOrdConstrainedVariables @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      Lists.concat2
-        (collectOrdConstrainedVariables @@ Core.applicationTypeFunction (var "appType"))
-        (collectOrdConstrainedVariables @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      Lists.concat2
-        (collectOrdConstrainedVariables @@ Core.eitherTypeLeft (var "et"))
-        (collectOrdConstrainedVariables @@ Core.eitherTypeRight (var "et")),
-    _Type_forall>>: "ft" ~>
-      collectOrdConstrainedVariables @@ Core.forallTypeBody (var "ft"),
-    _Type_list>>: "elemType" ~>
-      collectOrdConstrainedVariables @@ var "elemType",
-    -- For Map<K, V>, collect all type variables from K (they need Ord)
-    -- plus recurse into both K and V for nested Maps/Sets
-    _Type_map>>: "mt" ~>
-      Lists.concat (list [
-        collectTypeVariablesFromType @@ Core.mapTypeKeys (var "mt"),
-        collectOrdConstrainedVariables @@ Core.mapTypeKeys (var "mt"),
-        collectOrdConstrainedVariables @@ Core.mapTypeValues (var "mt")]),
-    _Type_maybe>>: "elemType" ~>
-      collectOrdConstrainedVariables @@ var "elemType",
-    _Type_pair>>: "pt" ~>
-      Lists.concat2
-        (collectOrdConstrainedVariables @@ Core.pairTypeFirst (var "pt"))
-        (collectOrdConstrainedVariables @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> collectOrdConstrainedVariables @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    -- For Set<T>, collect all type variables from T (they all need Ord)
-    -- plus recurse into T for nested Sets
-    _Type_set>>: "elemType" ~>
-      Lists.concat2
-        (collectTypeVariablesFromType @@ var "elemType")
-        (collectOrdConstrainedVariables @@ var "elemType"),
-    _Type_union>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> collectOrdConstrainedVariables @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    _Type_wrap>>: "wt" ~>
-      collectOrdConstrainedVariables @@ var "wt"]
-
--- | Collect all type variables from a type expression (for use in Set element types)
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-collectTypeVariablesFromType :: TTermDefinition (Type -> [Name])
-collectTypeVariablesFromType = define "collectTypeVariablesFromType" $
-  doc "Collect all type variable names from a type expression" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      collectTypeVariablesFromType @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      Lists.concat2
-        (collectTypeVariablesFromType @@ Core.applicationTypeFunction (var "appType"))
-        (collectTypeVariablesFromType @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      Lists.concat2
-        (collectTypeVariablesFromType @@ Core.eitherTypeLeft (var "et"))
-        (collectTypeVariablesFromType @@ Core.eitherTypeRight (var "et")),
-    _Type_forall>>: "ft" ~>
-      collectTypeVariablesFromType @@ Core.forallTypeBody (var "ft"),
-    _Type_list>>: "elemType" ~>
-      collectTypeVariablesFromType @@ var "elemType",
-    _Type_map>>: "mt" ~>
-      Lists.concat2
-        (collectTypeVariablesFromType @@ Core.mapTypeKeys (var "mt"))
-        (collectTypeVariablesFromType @@ Core.mapTypeValues (var "mt")),
-    _Type_maybe>>: "elemType" ~>
-      collectTypeVariablesFromType @@ var "elemType",
-    _Type_pair>>: "pt" ~>
-      Lists.concat2
-        (collectTypeVariablesFromType @@ Core.pairTypeFirst (var "pt"))
-        (collectTypeVariablesFromType @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> collectTypeVariablesFromType @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    _Type_set>>: "elemType" ~>
-      collectTypeVariablesFromType @@ var "elemType",
-    _Type_union>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> collectTypeVariablesFromType @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    _Type_variable>>: "name" ~>
-      list [var "name"],
-    _Type_wrap>>: "wt" ~>
-      collectTypeVariablesFromType @@ var "wt"]
-
--- | Build the decoder function type for a given type
--- For monomorphic types: Graph -> Term -> Either DecodingError ResultType
--- For polymorphic types: (Graph -> Term -> Either DecodingError a) -> ... -> Graph -> Term -> Either DecodingError ResultType<a>
--- The 'Graph' parameter is used for dereferencing term variables
-decoderType :: TTermDefinition (Type -> Type)
-decoderType = define "decoderType" $
-  doc "Build decoder function type" $
-  "typ" ~>
-  -- Get the result type (the full type, preserving type applications)
-  "resultType" <~ (decoderFullResultType @@ var "typ") $
-  -- Build the base decoder type: Graph -> Term -> Either DecodingError ResultType
-  -- Graph is a concrete type (hydra.graph.Graph), not a type variable
-  "baseType" <~ (Core.typeFunction $ Core.functionType
-    (Core.typeVariable (Core.nameLift _Graph))
-    (Core.typeFunction $ Core.functionType
-      (Core.typeVariable (Core.nameLift _Term))
-      (Core.typeEither $ Core.eitherType
-        (Core.typeVariable (Core.nameLift _DecodingError))
-        (var "resultType")))) $
-  -- Prepend decoder types for each forall parameter
-  prependForallDecoders @@ var "baseType" @@ var "typ"
-
--- | Helper to prepend decoder types for forall parameters
--- For forall a. forall b. T: prepends (Graph -> Term -> E a) -> (Graph -> Term -> E b) -> to the base type
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-prependForallDecoders :: TTermDefinition (Type -> Type -> Type)
-prependForallDecoders = define "prependForallDecoders" $
-  doc "Prepend decoder types for forall parameters to base type" $
-  "baseType" ~> "typ" ~> cases _Type (var "typ") (Just $ var "baseType") [
-    _Type_annotated>>: "at" ~>
-      prependForallDecoders @@ var "baseType" @@ Core.annotatedTypeBody (var "at"),
-    _Type_forall>>: "ft" ~>
-      -- For forall a. T: build (Graph -> Term -> Either E a) -> prependForallDecoders(baseType, T)
-      Core.typeFunction $ Core.functionType
-        (Core.typeFunction $ Core.functionType
-          (Core.typeVariable (Core.nameLift _Graph))
-          (Core.typeFunction $ Core.functionType
-            (Core.typeVariable (Core.nameLift _Term))
-            (Core.typeEither $ Core.eitherType
-              (Core.typeVariable (Core.nameLift _DecodingError))
-              (Core.typeVariable (Core.forallTypeParameter (var "ft"))))))
-        (prependForallDecoders @@ var "baseType" @@ Core.forallTypeBody (var "ft"))]
-
--- | Get the full result type for a decoder, preserving type applications
--- For forall t. ColumnSchema<t>, returns ColumnSchema<t> (as a Type, not just a Name)
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-decoderFullResultType :: TTermDefinition (Type -> Type)
-decoderFullResultType = define "decoderFullResultType" $
-  doc "Get full result type for decoder" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ Core.typeVariable (Core.nameLift _Term)) [
-    _Type_annotated>>: "at" ~>
-      decoderFullResultType @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      -- Preserve the full application: e.g., ColumnSchema<t> stays as Type.application
-      Core.typeApplication $ Core.applicationType
-        (decoderFullResultType @@ Core.applicationTypeFunction (var "appType"))
-        (Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      -- Either L R -> Either (decoded L) (decoded R)
-      Core.typeEither $ Core.eitherType
-        (decoderFullResultType @@ Core.eitherTypeLeft (var "et"))
-        (decoderFullResultType @@ Core.eitherTypeRight (var "et")),
-    _Type_forall>>: "ft" ~>
-      -- For forall t. Body, we need to apply the type parameter to the body's result type
-      -- e.g., forall t. RecordType{name=ColumnSchema} -> ColumnSchema t
-      Core.typeApplication $ Core.applicationType
-        (decoderFullResultType @@ Core.forallTypeBody (var "ft"))
-        (Core.typeVariable (Core.forallTypeParameter (var "ft"))),
-    _Type_list>>: "elemType" ~>
-      -- [a] -> [decoded a]
-      Core.typeList (decoderFullResultType @@ var "elemType"),
-    _Type_literal>>: "_" ~>
-      Core.typeVariable (Core.nameLift _Literal),
-    _Type_map>>: "mt" ~>
-      -- Map k v -> Map (decoded k) (decoded v)
-      Core.typeMap $ Core.mapType
-        (decoderFullResultType @@ Core.mapTypeKeys (var "mt"))
-        (decoderFullResultType @@ Core.mapTypeValues (var "mt")),
-    _Type_maybe>>: "elemType" ~>
-      -- Maybe a -> Maybe (decoded a)
-      Core.typeMaybe (decoderFullResultType @@ var "elemType"),
-    _Type_pair>>: "pt" ~>
-      -- (a, b) -> (decoded a, decoded b)
-      Core.typePair $ Core.pairType
-        (decoderFullResultType @@ Core.pairTypeFirst (var "pt"))
-        (decoderFullResultType @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: constant (Core.typeVariable (Core.nameLift _Term)),
-    _Type_set>>: "elemType" ~>
-      -- Set a -> Set (decoded a)
-      Core.typeSet (decoderFullResultType @@ var "elemType"),
-    _Type_union>>: constant (Core.typeVariable (Core.nameLift _Term)),
-    _Type_unit>>: constant Core.typeUnit,
-    _Type_variable>>: "name" ~>
-      Core.typeVariable (var "name"),
-    _Type_void>>: constant Core.typeVoid,
-    _Type_wrap>>: constant (Core.typeVariable (Core.nameLift _Term))]
-
--- | Decode a single type binding into a decoder binding
--- Decodes the Type from the binding's term, then generates decoder
-decodeBinding :: TTermDefinition (Context -> Graph -> Binding -> Either DecodingError Binding)
-decodeBinding = define "decodeBinding" $
-  doc "Transform a type binding into a decoder binding" $
-  "cx" ~> "graph" ~> "b" ~>
-    Eithers.bind (decoderFor _Type @@ var "graph" @@ (Core.bindingTerm (var "b"))) (
-      "typ" ~>
-      right (Core.binding
-        (decodeBindingName @@ (Core.bindingName (var "b")))
-        (decodeTypeNamed @@ (Core.bindingName (var "b")) @@ (var "typ"))
-        (just (decoderTypeSchemeNamed @@ (Core.bindingName (var "b")) @@ var "typ"))))
-
--- | Generate a fully qualified binding name for a decoder function from a type name
--- For example, "hydra.util.CaseConvention" -> "hydra.decode.util.caseConvention"
-decodeBindingName :: TTermDefinition (Name -> Name)
-decodeBindingName = define "decodeBindingName" $
-  doc "Generate a binding name for a decoder function from a type name" $
-  "n" ~>
-  "parts" <~ (Strings.splitOn (string ".") (Core.unName (var "n"))) $
-  "localPart" <~ (Formatting.decapitalize @@ (Names.localNameOf @@ (var "n"))) $
-  "localResult" <~ (Core.name (var "localPart")) $
-  Maybes.maybe
-    (var "localResult")
-    ("nsParts" ~>
-      Maybes.maybe
-        (var "localResult")
-        ("nsUc" ~>
-          "tail" <~ Pairs.second (var "nsUc") $
-          Core.name (Strings.intercalate (string ".") (Lists.concat2
-            (list [string "hydra", string "decode"])
-            (Lists.concat2
-              (var "tail")
-              (list [var "localPart"])))))
-        (Lists.uncons $ var "nsParts"))
-    (Lists.maybeInit $ var "parts")
-
--- | Generate a decoder for a literal type
--- Match on the LiteralType to generate type-specific decoders
--- Note: Uses 'cases' instead of 'match' to avoid variable shadowing from eta expansion
-decodeLiteralType :: TTermDefinition (LiteralType -> Term)
-decodeLiteralType = define "decodeLiteralType" $
-  doc "Generate a decoder for a literal type" $
-  "lt" ~>
-  cases _LiteralType (var "lt") Nothing [
-    _LiteralType_binary>>: constant decodeBinary,
-    _LiteralType_boolean>>: constant decodeBoolean,
-    _LiteralType_decimal>>: constant decodeDecimal,
-    _LiteralType_float>>: "ft" ~> decodeFloat (var "ft"),
-    _LiteralType_integer>>: "it" ~> decodeInteger (var "it"),
-    _LiteralType_string>>: constant decodeString]
-  where
-    -- Helper to wrap a Literal handler with Term.literal matching
-    decodeLiteral handleLiteral = deannotateAndMatch
-      (just $ leftError (string "expected literal")) [
-      DC.field _Term_literal $ DC.lambda "v" $ handleLiteral @@@ DC.var "v"]
-
-    -- Decode binary: Term -> Either DecodingError Binary
-    decodeBinary = decodeLiteral $ DC.match _Literal
-      (just $ leftError (string "expected binary literal")) [
-      DC.field _Literal_binary $ DC.lambda "b" $ DC.right $ DC.var "b"]
-
-    -- Decode boolean: Term -> Either DecodingError Bool
-    decodeBoolean = decodeLiteral $ DC.match _Literal
-      (just $ leftError (string "expected boolean literal")) [
-      DC.field _Literal_boolean $ DC.lambda "b" $ DC.right $ DC.var "b"]
-
-    -- Decode decimal: Term -> Either DecodingError Scientific
-    decodeDecimal = decodeLiteral $ DC.match _Literal
-      (just $ leftError (string "expected decimal literal")) [
-      DC.field _Literal_decimal $ DC.lambda "d" $ DC.right $ DC.var "d"]
-
-    -- Decode float: Term -> Either DecodingError <specific float type>
-    decodeFloat ft = cases _FloatType ft Nothing [
-        _FloatType_bigfloat>>: constant $ decodeFloatVariant _FloatValue_bigfloat (string "bigfloat"),
-        _FloatType_float32>>: constant $ decodeFloatVariant _FloatValue_float32 (string "float32"),
-        _FloatType_float64>>: constant $ decodeFloatVariant _FloatValue_float64 (string "float64")]
-
-    -- Helper to decode a specific float variant
-    decodeFloatVariant floatVariant floatName = decodeLiteral $ DC.match _Literal
-      (just $ leftError (Strings.cat $ list [string "expected ", floatName, string " literal"])) [
-      DC.field _Literal_float $ DC.match _FloatValue
-        (just $ leftError (Strings.cat $ list [string "expected ", floatName, string " value"])) [
-        DC.field floatVariant $ DC.lambda "f" $ DC.right $ DC.var "f"]]
-
-    -- Decode integer: Term -> Either DecodingError <specific integer type>
-    decodeInteger it = cases _IntegerType it Nothing [
-        _IntegerType_bigint>>: constant $ decodeIntegerVariant _IntegerValue_bigint (string "bigint"),
-        _IntegerType_int8>>: constant $ decodeIntegerVariant _IntegerValue_int8 (string "int8"),
-        _IntegerType_int16>>: constant $ decodeIntegerVariant _IntegerValue_int16 (string "int16"),
-        _IntegerType_int32>>: constant $ decodeIntegerVariant _IntegerValue_int32 (string "int32"),
-        _IntegerType_int64>>: constant $ decodeIntegerVariant _IntegerValue_int64 (string "int64"),
-        _IntegerType_uint8>>: constant $ decodeIntegerVariant _IntegerValue_uint8 (string "uint8"),
-        _IntegerType_uint16>>: constant $ decodeIntegerVariant _IntegerValue_uint16 (string "uint16"),
-        _IntegerType_uint32>>: constant $ decodeIntegerVariant _IntegerValue_uint32 (string "uint32"),
-        _IntegerType_uint64>>: constant $ decodeIntegerVariant _IntegerValue_uint64 (string "uint64")]
-
-    -- Helper to decode a specific integer variant
-    decodeIntegerVariant intVariant intName = decodeLiteral $ DC.match _Literal
-      (just $ leftError (Strings.cat $ list [string "expected ", intName, string " literal"])) [
-      DC.field _Literal_integer $ DC.match _IntegerValue
-        (just $ leftError (Strings.cat $ list [string "expected ", intName, string " value"])) [
-        DC.field intVariant $ DC.lambda "i" $ DC.right $ DC.var "i"]]
-
-    -- Decode string: Term -> Either DecodingError String
-    decodeString = decodeLiteral $ DC.match _Literal
-      (just $ leftError (string "expected string literal")) [
-      DC.field _Literal_string $ DC.lambda "s" $ DC.right $ DC.var "s"]
-
--- | Transform a type module into a decoder module
--- Returns Nothing if the module has no decodable type definitions
-decodeModule :: TTermDefinition (Context -> Graph -> Module -> Prelude.Either Error (Maybe Module))
-decodeModule = define "decodeModule" $
-  doc "Transform a type module into a decoder module" $
-  "cx" ~> "graph" ~> "mod" ~>
-    "typeBindings" <<~ (filterTypeBindings @@ var "cx" @@ var "graph" @@
-      (Maybes.cat $ Lists.map
-        ("d" ~> cases _Definition (var "d") (Just nothing) [
-          _Definition_type>>: "td" ~>
-            just (Annotations.typeBinding @@ (Packaging.typeDefinitionName $ var "td") @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td"))])
-        (Packaging.moduleDefinitions (var "mod")))) $
-    Logic.ifElse (Lists.null (var "typeBindings"))
-      (right nothing)
-      ("decodedBindings" <<~ Eithers.mapList ("b" ~>
-        Eithers.bimap
-          ("_e" ~> Error.errorDecoding $ var "_e")
-          ("x" ~> var "x")
-          (decodeBinding @@ var "cx" @@ var "graph" @@ var "b")) (var "typeBindings") $
-        -- Decoder modules need:
-        -- 1. hydra.lexical (for strip_and_dereference_term_either)
-        -- 2. hydra.rewriting (for rewriting utilities)
-        -- 3. Decoded versions of type dependencies (e.g., hydra.core -> hydra.decode.core)
-        -- 4. Decoded versions of term dependencies (e.g., hydra.query -> hydra.decode.query)
-        --    This is needed because if type A references type B, the decoder for A needs
-        --    to call the decoder for B, which is in the decode module for B's source module.
-        "decodedTypeDeps" <~ (Lists.map decodeNamespace (Packaging.moduleTypeDependencies (var "mod"))) $
-        "decodedTermDeps" <~ (Lists.map decodeNamespace (Packaging.moduleTermDependencies (var "mod"))) $
-        -- Use nub to remove duplicates (a module may appear in both type and term dependencies)
-        "allDecodedDeps" <~ (primitive _lists_nub @@ Lists.concat2 (var "decodedTypeDeps") (var "decodedTermDeps")) $
-        right (just (Packaging.module_
-          (just (Strings.cat $ list [
-            string "Term decoders for ",
-            Packaging.unNamespace (Packaging.moduleNamespace (var "mod"))]))
-          (decodeNamespace @@ (Packaging.moduleNamespace (var "mod")))
-          (Lists.concat2
-            (list [
-              (Packaging.namespace $ string "hydra.extract.core"),
-              (Packaging.namespace $ string "hydra.lexical"),
-              (Packaging.namespace $ string "hydra.rewriting")])
-            (var "allDecodedDeps"))
-          (list [
-            Packaging.moduleNamespace (var "mod"),
-            Packaging.namespace $ string "hydra.util"])
-          (Lists.map ("b" ~> Packaging.definitionTerm (Packaging.termDefinition
-            (Core.bindingName $ var "b") (Core.bindingTerm $ var "b")
-            (Core.bindingTypeScheme $ var "b")))
-            (var "decodedBindings")))))
-
--- | Generate a decoder module namespace from a source module namespace
--- For example, "hydra.util" -> "hydra.decode.util"
-decodeNamespace :: TTermDefinition (Namespace -> Namespace)
-decodeNamespace = define "decodeNamespace" $
-  doc "Generate a decoder module namespace from a source module namespace" $
-  "ns" ~>
-  "parts" <~ Strings.splitOn (string ".") (Packaging.unNamespace (var "ns")) $
-  "fallback" <~ Packaging.namespace (Packaging.unNamespace (var "ns")) $
-  Maybes.maybe
-    (var "fallback")
-    ("uc" ~>
-      Packaging.namespace (
-        Strings.cat $ list [
-          string "hydra.decode.",
-          Strings.intercalate (string ".") (Pairs.second $ var "uc")]))
-    (Lists.uncons $ var "parts")
-
--- | Generate a decoder for a record type with element name
-decodeRecordTypeNamed :: TTermDefinition (Name -> [FieldType] -> Term)
-decodeRecordTypeNamed = define "decodeRecordTypeNamed" $
-  doc "Generate a decoder for a record type with element name" $
-  "ename" ~> "rt" ~> decodeRecordTypeImpl @@ var "ename" @@ var "rt"
-
--- | Generate a decoder for a record type (no element name)
-decodeRecordType :: TTermDefinition ([FieldType] -> Term)
-decodeRecordType = define "decodeRecordType" $
-  doc "Generate a decoder for a record type" $
-  "rt" ~> decodeRecordTypeImpl @@ Core.name (string "unknown") @@ var "rt"
-
--- | Generate a decoder for a record type (implementation with name parameter)
-decodeRecordTypeImpl :: TTermDefinition (Name -> [FieldType] -> Term)
-decodeRecordTypeImpl = define "decodeRecordTypeImpl" $
-  doc "Generate a decoder for a record type with a type name" $
-  "tname" ~> "rt" ~>
-  -- For each field, build a term that decodes it from fieldMap using requireField helper
-  -- Returns: Either DecodingError fieldValue
-  "decodeFieldTerm" <~ ("ft" ~>
-    DC.ref ExtractCore.requireField
-      @@@ (DC.string $ Core.unName $ Core.fieldTypeName $ var "ft")
-      @@@ (decodeType @@ (Core.fieldTypeType $ var "ft"))
-      @@@ DC.var "fieldMap"
-      @@@ DC.var "cx") $
-  -- Build the body: a nested chain of eithers.bind calls that decode each field and build the record
-  -- We need: d1 >>= \v1 -> d2 >>= \v2 -> d3 >>= \v3 -> Right Record{...}
-  -- Using foldl on reversed list to build from inside out
-  -- The lambda for each field uses the field name with a prefix to avoid shadowing decoder functions
-  "localVarName" <~ ("ft" ~> Core.name $ Strings.cat $ list [string "field_", Core.unName $ Core.fieldTypeName $ var "ft"]) $
-  "toFieldLambda" <~ ("ft" ~> "body" ~>
-    Core.termLambda $ Core.lambda (var "localVarName" @@ var "ft") nothing $ var "body") $
-  "decodeBody" <~ (
-    Lists.foldl
-      ("acc" ~> "ft" ~>
-        DC.primitive _eithers_bind
-          @@@ (var "decodeFieldTerm" @@ var "ft")
-          @@@ (var "toFieldLambda" @@ var "ft" @@ var "acc"))
-      -- Base case: Right with the decoded record value
-      (DC.right $ Core.termRecord $ Core.record (var "tname") $
-        Lists.map ("ft" ~> Core.field (Core.fieldTypeName $ var "ft") $ Core.termVariable $ var "localVarName" @@ var "ft")
-          (var "rt"))
-      (Lists.reverse $ var "rt")) $
-  deannotateAndMatch
-    (just $ leftError (string "expected record")) [
-    DC.field _Term_record $ DC.lambda "record" $
-      DC.lets [
-        -- Build Map Name Term from the record's fields using toFieldMap helper
-        ("fieldMap", DC.ref ExtractCore.toFieldMap @@@ DC.var "record")] $
-        var "decodeBody"]
-
--- | Generate a decoder for a polymorphic (forall) type
--- For a type like `forall a. T[a]`, generates a lambda that takes a decoder for `a`
--- and returns a decoder for the body type `T[a]`
-decodeForallType :: TTermDefinition (ForallType -> Term)
-decodeForallType = define "decodeForallType" $
-  doc "Generate a decoder for a polymorphic (forall) type" $
-  "ft" ~>
-    -- Generate a lambda that takes a decoder for the type parameter
-    Core.termLambda $ Core.lambda
-        (decodeBindingName @@ Core.forallTypeParameter (var "ft"))
-        nothing
-        (decodeType @@ Core.forallTypeBody (var "ft"))
-
--- | Generate a decoder for an Either type
-decodeEitherType :: TTermDefinition (EitherType -> Term)
-decodeEitherType = define "decodeEitherType" $
-  doc "Generate a decoder for an Either type" $
-  "et" ~>
-  "leftDecoder" <~ decodeType @@ Core.eitherTypeLeft (var "et") $
-  "rightDecoder" <~ decodeType @@ Core.eitherTypeRight (var "et") $
-  DC.ref ExtractCore.decodeEither @@@ var "leftDecoder" @@@ var "rightDecoder"
-
--- | Generate a decoder for a list type
-decodeListType :: TTermDefinition (Type -> Term)
-decodeListType = define "decodeListType" $
-  doc "Generate a decoder for a list type" $
-  "elemType" ~>
-  "elemDecoder" <~ decodeType @@ var "elemType" $
-  DC.ref ExtractCore.decodeList @@@ var "elemDecoder"
-
--- | Generate a decoder for a map type
-decodeMapType :: TTermDefinition (MapType -> Term)
-decodeMapType = define "decodeMapType" $
-  doc "Generate a decoder for a map type" $
-  "mt" ~>
-  "keyDecoder" <~ decodeType @@ Core.mapTypeKeys (var "mt") $
-  "valDecoder" <~ decodeType @@ Core.mapTypeValues (var "mt") $
-  DC.ref ExtractCore.decodeMap @@@ var "keyDecoder" @@@ var "valDecoder"
-
--- | Generate a decoder for an optional/maybe type
-decodeMaybeType :: TTermDefinition (Type -> Term)
-decodeMaybeType = define "decodeMaybeType" $
-  doc "Generate a decoder for an optional type" $
-  "elemType" ~>
-  "elemDecoder" <~ decodeType @@ var "elemType" $
-  DC.ref ExtractCore.decodeMaybe @@@ var "elemDecoder"
-
--- | Generate a decoder for a pair type
-decodePairType :: TTermDefinition (PairType -> Term)
-decodePairType = define "decodePairType" $
-  doc "Generate a decoder for a pair type" $
-  "pt" ~>
-  "firstDecoder" <~ decodeType @@ Core.pairTypeFirst (var "pt") $
-  "secondDecoder" <~ decodeType @@ Core.pairTypeSecond (var "pt") $
-  DC.ref ExtractCore.decodePair @@@ var "firstDecoder" @@@ var "secondDecoder"
-
--- | Generate a decoder for a set type
-decodeSetType :: TTermDefinition (Type -> Term)
-decodeSetType = define "decodeSetType" $
-  doc "Generate a decoder for a set type" $
-  "elemType" ~>
-  "elemDecoder" <~ decodeType @@ var "elemType" $
-  DC.ref ExtractCore.decodeSet @@@ var "elemDecoder"
-
--- | Generate a decoder term for a given Type with element name context
-decodeTypeNamed :: TTermDefinition (Name -> Type -> Term)
-decodeTypeNamed = define "decodeTypeNamed" $
-  doc "Generate a decoder term for a Type, with element name for nominal types" $
-  "ename" ~> "typ" ~>
-  cases _Type (var "typ")
-    (Just $ DC.lambda "cx" $ DC.lambda "t" $ leftError $ string "unsupported type variant") [
-    _Type_annotated>>: "at" ~> decodeTypeNamed @@ var "ename" @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      (decodeType @@ Core.applicationTypeFunction (var "appType"))
-        @@@ (decodeType @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~> decodeEitherType @@ var "et",
-    _Type_forall>>: "ft" ~>
-      Core.termLambda $ Core.lambda (decodeBindingName @@ Core.forallTypeParameter (var "ft")) nothing
-          (decodeTypeNamed @@ var "ename" @@ Core.forallTypeBody (var "ft")),
-    _Type_list>>: "elemType" ~> decodeListType @@ var "elemType",
-    _Type_literal>>: "lt" ~> decodeLiteralType @@ var "lt",
-    _Type_map>>: "mt" ~> decodeMapType @@ var "mt",
-    _Type_maybe>>: "elemType" ~> decodeMaybeType @@ var "elemType",
-    _Type_pair>>: "pt" ~> decodePairType @@ var "pt",
-    _Type_record>>: "rt" ~> decodeRecordTypeNamed @@ var "ename" @@ var "rt",
-    _Type_set>>: "elemType" ~> decodeSetType @@ var "elemType",
-    _Type_union>>: "rt" ~> decodeUnionTypeNamed @@ var "ename" @@ var "rt",
-    _Type_unit>>: constant decodeUnitType,
-    _Type_void>>: constant decodeUnitType,
-    _Type_wrap>>: "wt" ~> decodeWrappedTypeNamed @@ var "ename" @@ var "wt",
-    _Type_variable>>: "typeName" ~> Core.termVariable (decodeBindingName @@ var "typeName")]
-
--- | Generate a decoder term for a given Type (without element name context)
-decodeType :: TTermDefinition (Type -> Term)
-decodeType = define "decodeType" $
-  doc "Generate a decoder term for a Type" $
-  "typ" ~>
-  cases _Type (var "typ")
-    (Just $ DC.lambda "cx" $ DC.lambda "t" $ leftError $ string "unsupported type variant") [
-    _Type_annotated>>: "at" ~> decodeType @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      (decodeType @@ Core.applicationTypeFunction (var "appType"))
-        @@@ (decodeType @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~> decodeEitherType @@ var "et",
-    _Type_forall>>: "ft" ~> decodeForallType @@ var "ft",
-    _Type_list>>: "elemType" ~> decodeListType @@ var "elemType",
-    _Type_literal>>: "lt" ~> decodeLiteralType @@ var "lt",
-    _Type_map>>: "mt" ~> decodeMapType @@ var "mt",
-    _Type_maybe>>: "elemType" ~> decodeMaybeType @@ var "elemType",
-    _Type_pair>>: "pt" ~> decodePairType @@ var "pt",
-    _Type_record>>: "rt" ~> decodeRecordType @@ var "rt",
-    _Type_set>>: "elemType" ~> decodeSetType @@ var "elemType",
-    _Type_union>>: "rt" ~> decodeUnionType @@ var "rt",
-    _Type_unit>>: constant decodeUnitType,
-    _Type_void>>: constant decodeUnitType,
-    _Type_wrap>>: "wt" ~> decodeWrappedType @@ var "wt",
-    _Type_variable>>: "typeName" ~> Core.termVariable (decodeBindingName @@ var "typeName")]
-
--- | Generate a decoder for the unit type
-decodeUnitType :: TTermDefinition Term
-decodeUnitType = define "decodeUnitType" $
-  doc "Generate a decoder for the unit type" $
-  DC.lambda "cx" $ DC.lambda "t" $ DC.ref ExtractCore.decodeUnit @@@ DC.var "cx" @@@ DC.var "t"
-
--- | Generate a decoder for a union type with element name
-decodeUnionTypeNamed :: TTermDefinition (Name -> [FieldType] -> Term)
-decodeUnionTypeNamed = define "decodeUnionTypeNamed" $
-  doc "Generate a decoder for a union type with the given element name" $
-  "ename" ~> "rt" ~>
-  "toVariantPair" <~ ("ft" ~>
-    DC.pair
-      (DC.wrap _Name $ DC.string $ Core.unName $ Core.fieldTypeName $ var "ft")
-      (DC.lambda "input" $ DC.primitive _eithers_map
-        @@@ (DC.lambda "t" $ Core.termInject $ Core.injection (var "ename") $ Core.field (Core.fieldTypeName $ var "ft") $ DC.var "t")
-        @@@ ((decodeType @@ (Core.fieldTypeType $ var "ft")) @@@ DC.var "cx" @@@ DC.var "input"))) $
-  deannotateAndMatch
-    (just $ leftError $ string "expected union") [
-    DC.field _Term_inject $ DC.lambda "inj" $ DC.lets [
-      ("field", DC.project _Injection _Injection_field @@@ DC.var "inj"),
-      ("fname", DC.project _Field _Field_name @@@ DC.var "field"),
-      ("fterm", DC.project _Field _Field_term @@@ DC.var "field"),
-      ("variantMap", DC.primitive _maps_fromList
-        @@@ (DC.list $ Lists.map (var "toVariantPair") $ var "rt"))] $
-      DC.primitive _maybes_maybe
-        @@@ (DC.left $ DC.wrap _DecodingError $ DC.primitive _strings_cat
-          @@@ (DC.list $ list [
-            DC.string $ string "no such field ",
-            DC.unwrap _Name @@@ DC.var "fname",
-            DC.string $ string " in union"]))
-        @@@ (DC.lambda "f" $ DC.var "f" @@@ DC.var "fterm")
-        @@@ (DC.primitive _maps_lookup
-          @@@ DC.var "fname"
-          @@@ DC.var "variantMap")]
-
--- | Generate a decoder for a union type (without element name)
-decodeUnionType :: TTermDefinition ([FieldType] -> Term)
-decodeUnionType = define "decodeUnionType" $
-  doc "Generate a decoder for a union type" $
-  "rt" ~> decodeUnionTypeNamed @@ Core.name (string "unknown") @@ var "rt"
-
--- | Generate a decoder for a wrapped type with element name
-decodeWrappedTypeNamed :: TTermDefinition (Name -> Type -> Term)
-decodeWrappedTypeNamed = define "decodeWrappedTypeNamed" $
-  doc "Generate a decoder for a wrapped type with the given element name" $
-  "ename" ~> "wt" ~>
-  "bodyDecoder" <~ decodeType @@ var "wt" $
-  deannotateAndMatch
-    (just $ leftError (string "expected wrapped type")) [
-    DC.field _Term_wrap $ DC.lambda "wrappedTerm" $
-      DC.primitive _eithers_map
-        @@@ (DC.lambda "b" $ DC.wrapDynamic (var "ename") (DC.var "b"))
-        @@@ (var "bodyDecoder" @@@ DC.var "cx"
-          @@@ (DC.project _WrappedTerm _WrappedTerm_body @@@ DC.var "wrappedTerm"))]
-
--- | Generate a decoder for a wrapped type (without element name)
-decodeWrappedType :: TTermDefinition (Type -> Term)
-decodeWrappedType = define "decodeWrappedType" $
-  doc "Generate a decoder for a wrapped type" $
-  "wt" ~> decodeWrappedTypeNamed @@ Core.name (string "unknown") @@ var "wt"
-
--- | Filter bindings to only decodable type definitions
-filterTypeBindings :: TTermDefinition (Context -> Graph -> [Binding] -> Prelude.Either Error [Binding])
-filterTypeBindings = define "filterTypeBindings" $
-  doc "Filter bindings to only decodable type definitions" $
-  "cx" ~> "graph" ~> "bindings" ~>
-  Eithers.map (primitive _maybes_cat) $
-    Eithers.mapList (isDecodableBinding @@ var "cx" @@ var "graph") $
-      primitive _lists_filter @@ Annotations.isNativeType @@ var "bindings"
-
--- | Check if a binding is decodable and return Just binding if so, Nothing otherwise
-isDecodableBinding :: TTermDefinition (Context -> Graph -> Binding -> Prelude.Either Error (Maybe Binding))
-isDecodableBinding = define "isDecodableBinding" $
-  doc "Check if a binding is decodable (serializable type)" $
-  "cx" ~> "graph" ~> "b" ~>
-    "serializable" <<~ Predicates.isSerializableByName @@ var "cx" @@ var "graph" @@ (Core.bindingName (var "b")) $
-    right (Logic.ifElse (var "serializable") (just (var "b")) nothing)
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Dependencies.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Dependencies.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Dependencies.hs
+++ /dev/null
@@ -1,425 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Dependencies where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  definitionsWithDependencies,
-  flattenLetTerms,
-  inlineType,
-  isLambda,
-  liftLambdaAboveLet,
-  pruneLet,
-  replaceTypedefs,
-  simplifyTerm,
-  termDependencyNames,
-  toShortNames,
-  topologicalSortBindingMap,
-  topologicalSortBindings,
-  topologicalSortTypeDefinitions,
-  typeDependencyNames,
-  typeNamesInType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths        as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Names as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Sorting as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-
-
-ns :: Namespace
-ns = Namespace "hydra.dependencies"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Lexical.ns, Names.ns, Rewriting.ns, Sorting.ns, Strip.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Dependency extraction, binding sort, and let normalization")}
-  where
-   definitions = [
-     toDefinition definitionsWithDependencies,
-     toDefinition flattenLetTerms,
-     toDefinition inlineType,
-     toDefinition isLambda,
-     toDefinition liftLambdaAboveLet,
-     toDefinition pruneLet,
-     toDefinition replaceTypedefs,
-     toDefinition simplifyTerm,
-     toDefinition termDependencyNames,
-     toDefinition toShortNames,
-     toDefinition topologicalSortBindingMap,
-     toDefinition topologicalSortBindings,
-     toDefinition topologicalSortTypeDefinitions,
-     toDefinition typeDependencyNames,
-     toDefinition typeNamesInType]
-
-flattenLetTerms :: TTermDefinition (Term -> Term)
-flattenLetTerms = define "flattenLetTerms" $
-  doc "Flatten nested let expressions" $
-  "term" ~>
-  "rewriteBinding" <~ ("binding" ~>
-    "key0" <~ Core.bindingName (var "binding") $
-    "val0" <~ Core.bindingTerm (var "binding") $
-    "t" <~ Core.bindingTypeScheme (var "binding") $
-    cases _Term (var "val0")
-      (Just $ pair (Core.binding (var "key0") (var "val0") (var "t")) (list ([] :: [TTerm Binding]))) [
-      _Term_annotated>>: "at" ~>
-        "val1" <~ Core.annotatedTermBody (var "at") $
-        "ann" <~ Core.annotatedTermAnnotation (var "at") $
-        "recursive" <~ var "rewriteBinding" @@ (Core.binding (var "key0") (var "val1") (var "t")) $
-        "innerBinding" <~ Pairs.first (var "recursive") $
-        "deps" <~ Pairs.second (var "recursive") $
-        "val2" <~ Core.bindingTerm (var "innerBinding") $
-        pair
-          (Core.binding (var "key0") (Core.termAnnotated $ Core.annotatedTerm (var "val2") (var "ann")) (var "t"))
-          (var "deps"),
-      _Term_let>>: "innerLet" ~>
-        "bindings1" <~ Core.letBindings (var "innerLet") $
-        "body1" <~ Core.letBody (var "innerLet") $
-        "prefix" <~ Strings.cat2 (unwrap _Name @@ var "key0") (string "_") $
-        "qualify" <~ ("n" ~> Core.name $ Strings.cat2 (var "prefix") (unwrap _Name @@ var "n")) $
-        "toSubstPair" <~ ("b" ~> pair (Core.bindingName $ var "b") (var "qualify" @@ (Core.bindingName $ var "b"))) $
-        "subst" <~ Maps.fromList (Lists.map (var "toSubstPair") (var "bindings1")) $
-        "replaceVars" <~ Variables.substituteVariables @@ var "subst" $
-        "newBody" <~ var "replaceVars" @@ var "body1" $
-        "newBinding" <~ ("b" ~> Core.binding
-          (var "qualify" @@ (Core.bindingName $ var "b"))
-          (var "replaceVars" @@ (Core.bindingTerm $ var "b"))
-          (Core.bindingTypeScheme $ var "b")) $
-        pair
-          (Core.binding (var "key0") (var "newBody") (var "t"))
-          (Lists.map (var "newBinding") (var "bindings1"))]) $
-  -- flattenBodyLet: if body is a let, merge its bindings into the outer let
-  -- Note: The default case uses concat2 with empty list to force bindings to have type [Binding]
-  -- This ensures proper type inference and prevents incorrect generalization
-  "flattenBodyLet" <~ ("bindings" ~> "body" ~>
-    cases _Term (var "body") (Just $ pair (Lists.concat2 (list ([] :: [TTerm Binding])) (var "bindings")) (var "body")) [
-      _Term_let>>: "innerLt" ~>
-        "innerBindings" <~ Core.letBindings (var "innerLt") $
-        "innerBody" <~ Core.letBody (var "innerLt") $
-        var "flattenBodyLet" @@ Lists.concat2 (var "bindings") (var "innerBindings") @@ var "innerBody"]) $
-  "flatten" <~ ("recurse" ~> "term" ~>
-    "rewritten" <~ var "recurse" @@ var "term" $
-    cases _Term (var "rewritten")
-      (Just $ var "rewritten") [
-      _Term_let>>: "lt" ~>
-        "bindings" <~ Core.letBindings (var "lt") $
-        "body" <~ Core.letBody (var "lt") $
-        -- Put dependencies BEFORE the binding that depends on them
-        -- This is important for hoisting: dependencies need to be hoisted first
-        -- so that transitive capture works correctly
-        "forResult" <~ ("hr" ~> Lists.concat2 (Pairs.second $ var "hr") (Lists.pure (Pairs.first $ var "hr"))) $
-        "flattenedBindings" <~ Lists.concat (Lists.map (var "forResult" <.> var "rewriteBinding") (var "bindings")) $
-        -- Now check if body is also a let and merge those bindings too
-        "merged" <~ var "flattenBodyLet" @@ var "flattenedBindings" @@ var "body" $
-        "newBindings" <~ Pairs.first (var "merged") $
-        "newBody" <~ Pairs.second (var "merged") $
-        Core.termLet $ Core.let_ (var "newBindings") (var "newBody")]) $
-  Rewriting.rewriteTerm @@ var "flatten" @@ var "term"
-
-inlineType :: TTermDefinition (M.Map Name Type -> Type -> Prelude.Either Error Type)
-inlineType = define "inlineType" $
-  doc "Inline all type variables in a type using the provided schema (Either version). Note: this function is only appropriate for nonrecursive type definitions" $
-  "schema" ~> "typ" ~>
-  "f" <~ ("recurse" ~> "typ" ~>
-    "afterRecurse" <~ ("tr" ~> cases _Type (var "tr")
-      (Just $ right $ var "tr") [
-      _Type_variable>>: "v" ~>
-        Maybes.maybe
-          (left $ Error.errorOther $ Error.otherError $ Strings.cat2 (string "No such type in schema: ") (unwrap _Name @@ var "v"))
-          (inlineType @@ var "schema")
-          (Maps.lookup (var "v") (var "schema"))]) $
-    "tr" <<~ var "recurse" @@ var "typ" $
-    var "afterRecurse" @@ var "tr") $
-  Rewriting.rewriteTypeM @@ var "f" @@ var "typ"
-
-isLambda :: TTermDefinition (Term -> Bool)
-isLambda = define "isLambda" $
-  doc "Check whether a term is a lambda, possibly nested within let and/or annotation terms" $
-  "term" ~> cases _Term (Strip.deannotateTerm @@ var "term")
-    (Just false) [
-    _Term_lambda>>: constant true,
-    _Term_let>>: "lt" ~> isLambda @@ (project _Let _Let_body @@ var "lt")]
-
--- TODO: account for shadowing among let- and lambda-bound variables
-liftLambdaAboveLet :: TTermDefinition (Term -> Term)
-liftLambdaAboveLet = define "liftLambdaAboveLet" $
-  doc ("Rewrite terms like `let foo = bar in λx.baz` to `λx.let foo = bar in baz`, lifting lambda-bound variables"
-    <> " above let-bound variables, recursively. This is helpful for targets such as Python.") $
-  "term0" ~>
-  "rewrite" <~ ("recurse" ~> "term" ~>
-    "rewriteBinding" <~ ("b" ~> Core.bindingWithTerm (var "b") $ var "rewrite" @@ var "recurse" @@ Core.bindingTerm (var "b")) $
-    "rewriteBindings" <~ ("bs" ~> Lists.map (var "rewriteBinding") (var "bs")) $
-    "digForLambdas" <~ ("original" ~> "cons" ~> "term" ~> cases _Term (var"term")
-      (Just $ var "recurse" @@ var "original") [
-      _Term_annotated>>: "at" ~> var "digForLambdas"
-        @@ var "original"
-        @@ ("t" ~> Core.termAnnotated $ Core.annotatedTermWithBody (var "at") (var "cons" @@ var "t"))
-        @@ (Core.annotatedTermBody $ var "at"),
-      _Term_lambda>>: "l" ~> Core.termLambda $ Core.lambdaWithBody (var "l") $
-        var "digForLambdas"
-          @@ (var "cons" @@ (Core.lambdaBody $ var "l"))
-          @@ ("t" ~> var "cons" @@ var "t")
-          @@ (Core.lambdaBody $ var "l"),
-      _Term_let>>: "l" ~> var "digForLambdas"
-        @@ var "original"
-        @@ ("t" ~> var "cons" @@ (Core.termLet $ Core.let_ (var "rewriteBindings" @@ (Core.letBindings $ var "l")) (var "t")))
-        @@ Core.letBody (var "l")]) $
-    -- Note: we match *before* recursing for the sake of efficiency.
-    cases _Term (var "term")
-      (Just $ var "recurse" @@ var "term") [
-      _Term_let>>: "l" ~> var "digForLambdas"
-        @@ var "term"
-        @@ ("t" ~> Core.termLet $ Core.let_ (var "rewriteBindings" @@ (Core.letBindings $ var "l")) (var "t"))
-        @@ Core.letBody (var "l")]) $
-  Rewriting.rewriteTerm @@ var "rewrite" @@ var "term0"
-
-pruneLet :: TTermDefinition (Let -> Let)
-pruneLet = define "pruneLet" $
-  doc ("Given a let expression, remove any unused bindings. The resulting expression is still a let,"
-    <> " even if has no remaining bindings") $
-  "l" ~>
-  "bindingMap" <~ Maps.fromList (Lists.map
-    ("b" ~> pair (Core.bindingName $ var "b") (Core.bindingTerm $ var "b")) $ Core.letBindings $ var "l") $
-  "rootName" <~ Core.name (string "[[[root]]]") $
-  -- Look up n in bindingMap; a missing name is unreachable here since the
-  -- caller only calls adj on names present in the map. Fall back to Unit.
-  "adj" <~ ("n" ~> Sets.intersection (Sets.fromList $ Maps.keys $ var "bindingMap")
-      (Variables.freeVariablesInTerm @@ (Logic.ifElse (Equality.equal (var "n") (var "rootName"))
-        (Core.letBody $ var "l")
-        (Maybes.fromMaybe Core.termUnit (Maps.lookup (var "n") (var "bindingMap")))))) $
-  "reachable" <~ Sorting.findReachableNodes @@ var "adj" @@ var "rootName" $
-  "prunedBindings" <~ Lists.filter
-    ("b" ~> Sets.member (Core.bindingName $ var "b") (var "reachable"))
-    (Core.letBindings $ var "l") $
-  Core.let_
-    (var "prunedBindings")
-    (Core.letBody $ var "l")
-
-replaceTypedefs :: TTermDefinition (M.Map Name TypeScheme -> Type -> Type)
-replaceTypedefs = define "replaceTypedefs" $
-  doc "Replace all occurrences of simple typedefs (type aliases) with the aliased types, recursively" $
-  "types" ~> "typ0" ~>
-  "rewrite" <~ ("recurse" ~> "typ" ~>
-    -- Note: dflt (recurse @@ typ) is NOT bound as a let here, because in strict languages (Java, Python)
-    -- this would eagerly recurse into Record/Union/Wrap fields, causing infinite recursion on recursive types.
-    -- Instead, we inline (recurse @@ typ) only where needed.
-    cases _Type (var "typ")
-      (Just $ var "recurse" @@ var "typ") [
---      _Type_forall>>: "ft" ~> ... -- TODO: shadowing via forall-bound variables
-      _Type_annotated>>: "at" ~> Core.typeAnnotated $ Core.annotatedType
-        (var "rewrite" @@ var "recurse" @@ (Core.annotatedTypeBody $ var "at"))
-        (Core.annotatedTypeAnnotation $ var "at"),
-      _Type_record>>: constant $ var "typ",
-      _Type_union>>: constant $ var "typ",
-      _Type_variable>>: "v" ~>
-        "forMono" <~ ("t" ~> cases _Type (var "t")
-          (Just $ var "rewrite" @@ var "recurse" @@ var "t") [
-          _Type_record>>: constant $ var "typ",
-          _Type_union>>: constant $ var "typ",
-          _Type_wrap>>: constant $ var "typ"]) $
-        "forTypeScheme" <~ ("ts" ~>
-          "t" <~ Core.typeSchemeBody (var "ts") $
-          Logic.ifElse (Lists.null $ Core.typeSchemeVariables $ var "ts")
-            (var "forMono" @@ var "t")
-            (var "typ")) $ -- TODO: this may be too simple
-        optCases (Maps.lookup (var "v") (var "types"))
-        (var "typ")
-        ("ts" ~> var "forTypeScheme" @@ var "ts"),
-      _Type_wrap>>: constant $ var "typ"]) $
-  Rewriting.rewriteType @@ var "rewrite" @@ var "typ0"
-
-simplifyTerm :: TTermDefinition (Term -> Term)
-simplifyTerm = define "simplifyTerm" $
-  doc "Simplify terms by applying beta reduction where possible" $
-  "term" ~>
-  "simplify" <~ ("recurse" ~> "term" ~>
-    "forRhs" <~ ("rhs" ~> "var" ~> "body" ~> cases _Term (Strip.deannotateTerm @@ var "rhs")
-      (Just $ var "term") [
-      _Term_variable>>: "v" ~>
-        simplifyTerm @@ (Variables.substituteVariable @@ var "var" @@ var "v" @@ var "body")]) $
-    "forLhs" <~ ("lhs" ~> "rhs" ~>
-      cases _Term (Strip.deannotateTerm @@ var "lhs")
-        (Just $ var "term") [
-        _Term_lambda>>: "l" ~>
-          "var" <~ Core.lambdaParameter (var "l") $
-          "body" <~ Core.lambdaBody (var "l") $
-          Logic.ifElse (Sets.member (var "var") (Variables.freeVariablesInTerm @@ var "body"))
-            (var "forRhs" @@ var "rhs" @@ var "var" @@ var "body")
-            (simplifyTerm @@ var "body")]) $
-    "forTerm" <~ ("stripped" ~> cases _Term (var "stripped")
-      (Just $ var "term") [
-      _Term_application>>: "app" ~>
-        "lhs" <~ Core.applicationFunction (var "app") $
-        "rhs" <~ Core.applicationArgument (var "app") $
-        var "forLhs" @@ var "lhs" @@ var "rhs"]) $
-    "stripped" <~ Strip.deannotateTerm @@ var "term" $
-    var "recurse" @@ (var "forTerm" @@ var "stripped")) $
-  Rewriting.rewriteTerm @@ var "simplify" @@ var "term"
-
-termDependencyNames :: TTermDefinition (Bool -> Bool -> Bool -> Term -> S.Set Name)
-termDependencyNames = define "termDependencyNames" $
-  doc "Note: does not distinguish between bound and free variables; use freeVariablesInTerm for that" $
-  "binds" ~> "withPrims" ~> "withNoms" ~> "term0" ~>
-  "addNames" <~ ("names" ~> "term" ~>
-    "nominal" <~ ("name" ~> Logic.ifElse (var "withNoms")
-      (Sets.insert (var "name") (var "names"))
-      (var "names")) $
-    "prim" <~ ("name" ~> Logic.ifElse (var "withPrims")
-      (Sets.insert (var "name") (var "names"))
-      (var "names")) $
-    "var" <~ ("name" ~> Logic.ifElse (var "binds")
-      (Sets.insert (var "name") (var "names"))
-      (var "names")) $
-    cases _Term (var "term")
-      (Just $ var "names") [
-      _Term_cases>>: "caseStmt" ~> var "nominal" @@ (Core.caseStatementTypeName $ var "caseStmt"),
-      _Term_project>>: "proj" ~> var "nominal" @@ (Core.projectionTypeName $ var "proj"),
-      _Term_unwrap>>: "name" ~> var "nominal" @@ var "name",
-      _Term_record>>: "record" ~> var "nominal" @@ (Core.recordTypeName $ var "record"),
-      _Term_inject>>: "injection" ~> var "nominal" @@ (Core.injectionTypeName $ var "injection"),
-      _Term_variable>>: "name" ~> var "var" @@ var "name",
-      _Term_wrap>>: "wrappedTerm" ~> var "nominal" @@ (Core.wrappedTermTypeName $ var "wrappedTerm")]) $
-  Rewriting.foldOverTerm @@ Coders.traversalOrderPre @@ var "addNames" @@ Sets.empty @@ var "term0"
-
-toShortNames :: TTermDefinition ([Name] -> M.Map Name Name)
-toShortNames = define "toShortNames" $
-  doc "Generate short names from a list of fully qualified names" $
-  "original" ~>
-  "addName" <~ ("acc" ~> "name" ~>
-    "local" <~ Names.localNameOf @@ var "name" $
-    "group" <~ Maybes.fromMaybe Sets.empty (Maps.lookup (var "local") (var "acc")) $
-    Maps.insert (var "local") (Sets.insert (var "name") (var "group")) (var "acc")) $
-  "groupNamesByLocal" <~ ("names" ~> Lists.foldl (var "addName") Maps.empty (var "names")) $
-  "groups" <~ var "groupNamesByLocal" @@ var "original" $
-  "renameGroup" <~ ("localNames" ~>
-    "local" <~ Pairs.first (var "localNames") $
-    "names" <~ Pairs.second (var "localNames") $
-    "rangeFrom" <~ ("start" ~> Lists.cons (var "start") (var "rangeFrom" @@ (Math.add (var "start") (int32 1)))) $
-    "rename" <~ ("name" ~> "i" ~> pair (var "name") $ Core.name $
-      Logic.ifElse (Equality.gt (var "i") (int32 1))
-        (Strings.cat2 (var "local") (Literals.showInt32 $ var "i"))
-        (var "local")) $
-    Lists.zipWith (var "rename") (Sets.toList $ var "names") (var "rangeFrom" @@ int32 1)) $
-  Maps.fromList $ Lists.concat $ Lists.map (var "renameGroup") $ Maps.toList $ var "groups"
-
-topologicalSortBindingMap :: TTermDefinition (M.Map Name Term -> [[(Name, Term)]])
-topologicalSortBindingMap = define "topologicalSortBindingMap" $
-  doc "Topological sort of connected components, in terms of dependencies between variable/term binding pairs" $
-  "bindingMap" ~>
-  "bindings" <~ Maps.toList (var "bindingMap") $
-  "keys" <~ Sets.fromList (Lists.map (unaryFunction Pairs.first) (var "bindings")) $
-  -- TODO: this function currently serves no purpose; it always yields false
-  "hasTypeAnnotation" <~ ("term" ~>
-    cases _Term (var "term")
-      (Just false) [
-      _Term_annotated>>: "at" ~> var "hasTypeAnnotation" @@ (Core.annotatedTermBody $ var "at")]) $
-  "depsOf" <~ ("nameAndTerm" ~>
-    "name" <~ Pairs.first (var "nameAndTerm") $
-    "term" <~ Pairs.second (var "nameAndTerm") $
-    pair (var "name") $ Logic.ifElse (var "hasTypeAnnotation" @@ var "term")
-      (list ([] :: [TTerm Name]))
-      (Sets.toList $ Sets.intersection (var "keys") $ Variables.freeVariablesInTerm @@ var "term")) $
-  "toPair" <~ ("name" ~> pair (var "name") $ Maybes.fromMaybe
-    (Core.termLiteral $ Core.literalString $ string "Impossible!")
-    (Maps.lookup (var "name") (var "bindingMap"))) $
-  Lists.map (unaryFunction $ Lists.map $ var "toPair") (Sorting.topologicalSortComponents @@ Lists.map (var "depsOf") (var "bindings"))
-
-topologicalSortBindings :: TTermDefinition ([Binding] -> Either [[Name]] [Name])
-topologicalSortBindings = define "topologicalSortBindings" $
-  doc "Topological sort of elements based on their dependencies" $
-  "els" ~>
-  "adjlist" <~ ("e" ~> pair
-    (Core.bindingName $ var "e")
-    (Sets.toList $ termDependencyNames @@ false @@ true @@ true @@ (Core.bindingTerm $ var "e"))) $
-  Sorting.topologicalSort @@ Lists.map (var "adjlist") (var "els")
-
-typeDependencyNames :: TTermDefinition (Bool -> Type -> S.Set Name)
-typeDependencyNames = define "typeDependencyNames" $
-  "withSchema" ~> "typ" ~> Logic.ifElse (var "withSchema")
-    (Sets.union
-      (Variables.freeVariablesInType @@ var "typ")
-      (typeNamesInType @@ var "typ"))
-    (Variables.freeVariablesInType @@ var "typ")
-
-typeNamesInType :: TTermDefinition (Type -> S.Set Name)
-typeNamesInType = define "typeNamesInType" $
-  "typ0" ~>
-  "addNames" <~ ("names" ~> "typ" ~> var "names") $
-  Rewriting.foldOverType @@ Coders.traversalOrderPre @@ var "addNames" @@ Sets.empty @@ var "typ0"
-
-definitionsWithDependencies :: TTermDefinition (Context -> Graph -> [Binding] -> Either Error [Binding])
-definitionsWithDependencies = define "definitionsWithDependencies" $
-  doc "Get definitions with their dependencies" $
-  "cx" ~> "graph" ~> "original" ~>
-  "depNames" <~ ("el" ~> Sets.toList (termDependencyNames @@ true @@ false @@ false @@ (Core.bindingTerm (var "el")))) $
-  "allDepNames" <~ Lists.nub (Lists.concat2
-    (Lists.map (unaryFunction Core.bindingName) (var "original"))
-    (Lists.concat (Lists.map (var "depNames") (var "original")))) $
-  Eithers.mapList ("name" ~> Lexical.requireBinding @@ var "graph" @@ var "name") (var "allDepNames")
-
-topologicalSortTypeDefinitions :: TTermDefinition ([TypeDefinition] -> [[TypeDefinition]])
-topologicalSortTypeDefinitions = define "topologicalSortTypeDefinitions" $
-  doc "Topologically sort type definitions by dependencies" $
-  "defs" ~>
-  "toPair" <~ ("def" ~> pair
-    (Packaging.typeDefinitionName (var "def"))
-    (Sets.toList (typeDependencyNames @@ false @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "def"))))) $
-  "nameToDef" <~ Maps.fromList (Lists.map
-    ("d" ~> pair (Packaging.typeDefinitionName (var "d")) (var "d"))
-    (var "defs")) $
-  "sorted" <~ Sorting.topologicalSortComponents @@ Lists.map (var "toPair") (var "defs") $
-  Lists.map ("names" ~> Maybes.cat (Lists.map ("n" ~> Maps.lookup (var "n") (var "nameToDef")) (var "names"))) (
-    var "sorted")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Differentiation.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Differentiation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Differentiation.hs
+++ /dev/null
@@ -1,415 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Differentiation where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
--- Deep (program-constructing) DSLs
-import qualified Hydra.Dsl.Deep.Lib.Math     as DeepMath
-import qualified Hydra.Dsl.Meta.DeepCore     as DeepCore
-
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-
-
-ns :: Namespace
-ns = Namespace "hydra.differentiation"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Strip.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Source-to-source automatic differentiation for Float64 terms."}
-  where
-    definitions = [
-      toDefinition differentiateBinary,
-      toDefinition differentiateFunction,
-      toDefinition differentiateTerm,
-      toDefinition gradient,
-      toDefinition primitiveDerivative]
-
--- Helper: construct a float64 literal term from a Haskell Double
-f64 :: Double -> TTerm Term
-f64 = MetaTerms.float64
-
-
--- | Differentiate a function term (Float64 -> Float64) with respect to its parameter.
---   Given a lambda \x -> body, returns a lambda \x -> d(body)/dx.
-differentiateFunction :: TTermDefinition (Term -> Term)
-differentiateFunction = define "differentiateFunction" $
-  doc "Differentiate a function term (Float64 -> Float64) with respect to its parameter" $
-  "term" ~>
-  cases _Term (var "term")
-    (Just $ var "term") [  -- Non-function terms pass through unchanged
-    _Term_annotated>>: "at" ~>
-      differentiateFunction @@ Core.annotatedTermBody (var "at"),
-    _Term_lambda>>: "l" ~>
-      "paramName" <~ Core.lambdaParameter (var "l") $
-      "body" <~ Core.lambdaBody (var "l") $
-      DeepCore.lambdaTyped
-        (var "paramName")
-        (Core.lambdaDomain $ var "l")
-        (differentiateTerm @@ var "paramName" @@ var "body")]
-
--- | Differentiate a term with respect to a named variable.
---   Implements the standard rules of differential calculus as a source-to-source
---   transformation on Hydra terms.
-differentiateTerm :: TTermDefinition (Name -> Term -> Term)
-differentiateTerm = define "differentiateTerm" $
-  doc "Differentiate a term with respect to a named variable" $
-  "dx" ~> "term" ~>
-  cases _Term (var "term") Nothing [
-    -- Variable: d/dx(x) = 1.0, d/dx(y) = 0.0
-    _Term_variable>>: "v" ~>
-      Logic.ifElse (Equality.equal (var "v") (var "dx"))
-        (f64 1.0)
-        (f64 0.0),
-
-    -- Literal: d/dx(c) = 0.0
-    _Term_literal>>: constant $ f64 0.0,
-
-    -- Application: handle primitive functions and general chain rule
-    _Term_application>>: "app" ~>
-      "func" <~ Core.applicationFunction (var "app") $
-      "arg" <~ Core.applicationArgument (var "app") $
-      -- Check if the function is a variable (potentially a primitive)
-      cases _Term (var "func") (Just $
-        -- General case: f(g) => f'(g) * g'
-        DeepMath.mulFloat64
-          (differentiateTerm @@ var "dx" @@ Core.termApplication (Core.application (var "func") (var "arg")))
-          (differentiateTerm @@ var "dx" @@ var "arg")) [
-        _Term_variable>>: "fname" ~>
-          -- Check if this is a known unary primitive
-          optCases (primitiveDerivative @@ var "fname")
-            -- Not a known primitive: general application derivative
-            (differentiateTerm @@ var "dx" @@ Core.termApplication (Core.application (var "func") (var "arg")))
-            -- Known unary primitive: chain rule f(g(x))' = f'(g(x)) * g'(x)
-            ("derivTerm" ~>
-              DeepMath.mulFloat64
-                (Core.termApplication $ Core.application (var "derivTerm") (var "arg"))
-                (differentiateTerm @@ var "dx" @@ var "arg")),
-        -- Partially applied binary primitive: f a b => handle add, mul, sub, pow, etc.
-        _Term_application>>: "innerApp" ~>
-          "innerFunc" <~ Core.applicationFunction (var "innerApp") $
-          "innerArg" <~ Core.applicationArgument (var "innerApp") $
-          cases _Term (var "innerFunc")
-            (Just $
-              -- Not a variable: fall back to general differentiation
-              DeepMath.mulFloat64
-                (differentiateTerm @@ var "dx" @@ Core.termApplication (Core.application (var "func") (var "arg")))
-                (differentiateTerm @@ var "dx" @@ var "arg")) [
-            _Term_variable>>: "bfname" ~>
-              -- Binary primitive detected: innerFunc innerArg arg = bfname(innerArg, arg)
-              differentiateBinary @@ var "bfname"
-                @@ var "innerArg"
-                @@ var "arg"
-                @@ (differentiateTerm @@ var "dx" @@ var "innerArg")
-                @@ (differentiateTerm @@ var "dx" @@ var "arg")]],
-
-    -- Function (lambda): d/dx(\y -> body) = \y -> d/dx(body)
-    -- (The bound variable y is different from x, so we differentiate the body)
-    _Term_lambda>>: "l" ~>
-      Logic.ifElse (Equality.equal (Core.lambdaParameter $ var "l") (var "dx"))
-        -- Lambda binds the differentiation variable: derivative is zero function
-        (DeepCore.lambdaTyped
-          (Core.lambdaParameter $ var "l")
-          (Core.lambdaDomain $ var "l")
-          (f64 0.0))
-        -- Lambda binds a different variable: differentiate the body
-        (DeepCore.lambdaTyped
-          (Core.lambdaParameter $ var "l")
-          (Core.lambdaDomain $ var "l")
-          (differentiateTerm @@ var "dx" @@ Core.lambdaBody (var "l"))),
-    _Term_cases>>: constant $ f64 0.0,
-    _Term_project>>: constant $ f64 0.0,
-    _Term_unwrap>>: constant $ f64 0.0,
-
-    -- Let: differentiate bindings and body
-    _Term_let>>: "l" ~>
-      Core.termLet $ Core.let_
-        (Lists.map ("b" ~>
-          Core.binding
-            (Core.bindingName $ var "b")
-            (differentiateTerm @@ var "dx" @@ Core.bindingTerm (var "b"))
-            nothing)
-          (Core.letBindings $ var "l"))
-        (differentiateTerm @@ var "dx" @@ Core.letBody (var "l")),
-
-    -- Annotated: strip annotation and differentiate
-    _Term_annotated>>: "at" ~>
-      differentiateTerm @@ var "dx" @@ Core.annotatedTermBody (var "at"),
-
-    -- List: element-wise differentiation
-    _Term_list>>: "elems" ~>
-      Core.termList $ Lists.map (differentiateTerm @@ var "dx") (var "elems"),
-
-    -- Pair: component-wise differentiation
-    _Term_pair>>: "p" ~>
-      Core.termPair $ pair
-        (differentiateTerm @@ var "dx" @@ Pairs.first (var "p"))
-        (differentiateTerm @@ var "dx" @@ Pairs.second (var "p")),
-
-    -- Record: differentiate each field
-    _Term_record>>: "r" ~>
-      Core.termRecord $ Core.record
-        (Core.recordTypeName $ var "r")
-        (Lists.map ("fld" ~>
-          Core.field
-            (Core.fieldName $ var "fld")
-            (differentiateTerm @@ var "dx" @@ Core.fieldTerm (var "fld")))
-          (Core.recordFields $ var "r")),
-
-    -- TypeApplication: pass through
-    _Term_typeApplication>>: "ta" ~>
-      differentiateTerm @@ var "dx" @@ Core.typeApplicationTermBody (var "ta"),
-
-    -- TypeLambda: pass through
-    _Term_typeLambda>>: "tl" ~>
-      differentiateTerm @@ var "dx" @@ Core.typeLambdaBody (var "tl"),
-
-    -- Unit, Set, Map, Either, Maybe, Union, Wrap: derivative is zero / unsupported
-    _Term_unit>>: constant $ f64 0.0,
-    _Term_set>>: constant $ f64 0.0,
-    _Term_map>>: constant $ f64 0.0,
-    _Term_either>>: constant $ f64 0.0,
-    _Term_maybe>>: constant $ f64 0.0,
-    _Term_inject>>: constant $ f64 0.0,
-    _Term_wrap>>: constant $ f64 0.0]
-
--- | Differentiate a binary primitive application.
---   bfname is the primitive name, a and b are the two arguments,
---   da and db are their derivatives with respect to x.
---   Returns d/dx(bfname(a, b)).
-differentiateBinary :: TTermDefinition (Name -> Term -> Term -> Term -> Term -> Term)
-differentiateBinary = define "differentiateBinary" $
-  doc "Differentiate a binary primitive application given both arguments and their derivatives" $
-  "bfname" ~> "a" ~> "b" ~> "da" ~> "db" ~>
-    -- d/dx(a + b) = da + db (both Int32 and Float64 names)
-    Logic.ifElse (Logic.or (Equality.equal (var "bfname") (encodedName _math_add))
-                           (Equality.equal (var "bfname") (encodedName _math_addFloat64)))
-        (DeepMath.addFloat64 (var "da") (var "db")) $
-      -- d/dx(a - b) = da - db
-      Logic.ifElse (Logic.or (Equality.equal (var "bfname") (encodedName _math_sub))
-                             (Equality.equal (var "bfname") (encodedName _math_subFloat64)))
-        (DeepMath.subFloat64 (var "da") (var "db")) $
-      -- d/dx(a * b) = a*db + b*da  (product rule)
-      Logic.ifElse (Logic.or (Equality.equal (var "bfname") (encodedName _math_mul))
-                             (Equality.equal (var "bfname") (encodedName _math_mulFloat64)))
-        (DeepMath.addFloat64
-          (DeepMath.mulFloat64 (var "a") (var "db"))
-          (DeepMath.mulFloat64 (var "b") (var "da"))) $
-      -- d/dx(a ^ b) = a^b * (b*da/a + db*ln(a))  (general power rule)
-      Logic.ifElse (Equality.equal (var "bfname") (encodedName _math_pow))
-        (DeepMath.mulFloat64
-          (DeepMath.pow (var "a") (var "b"))
-          (DeepMath.addFloat64
-            (DeepMath.mulFloat64 (var "db") (DeepMath.log (var "a")))
-            (DeepMath.mulFloat64
-              (DeepMath.mulFloat64 (var "b") (var "da"))
-              (DeepMath.pow (var "a") (f64 (-1.0)))))) $
-      -- d/dx(atan2(a, b)) = (b*da - a*db) / (a^2 + b^2)
-      Logic.ifElse (Equality.equal (var "bfname") (encodedName _math_atan2))
-        (DeepMath.mulFloat64
-          (DeepMath.subFloat64
-            (DeepMath.mulFloat64 (var "b") (var "da"))
-            (DeepMath.mulFloat64 (var "a") (var "db")))
-          (DeepMath.pow
-            (DeepMath.addFloat64
-              (DeepMath.mulFloat64 (var "a") (var "a"))
-              (DeepMath.mulFloat64 (var "b") (var "b")))
-            (f64 (-1.0)))) $
-      -- d/dx(logBase(a, b)) = d/dx(ln(b)/ln(a))
-      -- = (da*ln(b) is wrong)... use: logBase(a,b) = ln(b)/ln(a)
-      -- d/dx = (ln(a)*db/b - ln(b)*da/a) / (ln(a))^2
-      Logic.ifElse (Equality.equal (var "bfname") (encodedName _math_logBase))
-        (DeepMath.mulFloat64
-          (DeepMath.subFloat64
-            (DeepMath.mulFloat64
-              (DeepMath.log (var "a"))
-              (DeepMath.mulFloat64 (var "db") (DeepMath.pow (var "b") (f64 (-1.0)))))
-            (DeepMath.mulFloat64
-              (DeepMath.log (var "b"))
-              (DeepMath.mulFloat64 (var "da") (DeepMath.pow (var "a") (f64 (-1.0))))))
-          (DeepMath.pow
-            (DeepMath.mulFloat64 (DeepMath.log (var "a")) (DeepMath.log (var "a")))
-            (f64 (-1.0)))) $
-      -- Unknown binary primitive: return 0
-      f64 0.0
-
--- | Compute the gradient of a term with respect to a list of named variables.
---   Returns a record term where each field is the partial derivative of the term
---   with respect to the corresponding variable.
-gradient :: TTermDefinition (Name -> [Name] -> Term -> Term)
-gradient = define "gradient" $
-  doc "Compute the gradient of a term as a record of partial derivatives" $
-  "typeName" ~> "vars" ~> "term" ~>
-  Core.termRecord $ Core.record
-    (var "typeName")
-    (Lists.map ("v" ~>
-      Core.field
-        (var "v")
-        (differentiateTerm @@ var "v" @@ var "term"))
-      (var "vars"))
-
--- | Look up the derivative of a unary Float64 primitive by name.
---   Returns Just a term representing the derivative function (a lambda),
---   or Nothing if the primitive is not differentiable.
-primitiveDerivative :: TTermDefinition (Name -> Maybe Term)
-primitiveDerivative = define "primitiveDerivative" $
-  doc "Look up the derivative of a unary Float64 primitive" $
-  "name" ~>
-  -- d/dx(sin(x)) = cos(x)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_sin))
-    (just $ DeepMath.ref _math_cos) $
-  -- d/dx(cos(x)) = -sin(x)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_cos))
-    (just $ DeepCore.lambda "_x" (DeepMath.negateFloat64 (DeepMath.sin (DeepCore.var "_x")))) $
-  -- d/dx(tan(x)) = 1/cos(x)^2
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_tan))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow (DeepMath.cos (DeepCore.var "_x")) (f64 (-2.0)))) $
-  -- d/dx(exp(x)) = exp(x)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_exp))
-    (just $ DeepMath.ref _math_exp) $
-  -- d/dx(log(x)) = 1/x
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_log))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow (DeepCore.var "_x") (f64 (-1.0)))) $
-  -- d/dx(sqrt(x)) = 1/(2*sqrt(x))
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_sqrt))
-    (just $ DeepCore.lambda "_x" (DeepMath.mulFloat64 (f64 0.5)
-        (DeepMath.pow (DeepMath.sqrt (DeepCore.var "_x")) (f64 (-1.0))))) $
-  -- d/dx(asin(x)) = 1/sqrt(1 - x^2)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_asin))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow
-        (DeepMath.sqrt
-          (DeepMath.subFloat64 (f64 1.0) (DeepMath.mulFloat64
-            (DeepCore.var "_x")
-            (DeepCore.var "_x"))))
-        (f64 (-1.0)))) $
-  -- d/dx(acos(x)) = -1/sqrt(1 - x^2)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_acos))
-    (just $ DeepCore.lambda "_x" (DeepMath.negateFloat64 $ DeepMath.pow
-        (DeepMath.sqrt
-          (DeepMath.subFloat64 (f64 1.0) (DeepMath.mulFloat64
-            (DeepCore.var "_x")
-            (DeepCore.var "_x"))))
-        (f64 (-1.0)))) $
-  -- d/dx(atan(x)) = 1/(1 + x^2)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_atan))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow
-        (DeepMath.addFloat64 (f64 1.0) (DeepMath.mulFloat64
-          (DeepCore.var "_x")
-          (DeepCore.var "_x")))
-        (f64 (-1.0)))) $
-  -- d/dx(sinh(x)) = cosh(x)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_sinh))
-    (just $ DeepMath.ref _math_cosh) $
-  -- d/dx(cosh(x)) = sinh(x)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_cosh))
-    (just $ DeepMath.ref _math_sinh) $
-  -- d/dx(tanh(x)) = 1 - tanh(x)^2
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_tanh))
-    (just $ DeepCore.lambda "_x" (DeepMath.subFloat64 (f64 1.0)
-        (DeepMath.mulFloat64
-          (DeepMath.tanh (DeepCore.var "_x"))
-          (DeepMath.tanh (DeepCore.var "_x"))))) $
-  -- d/dx(asinh(x)) = 1/sqrt(x^2 + 1)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_asinh))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow
-        (DeepMath.sqrt
-          (DeepMath.addFloat64
-            (DeepMath.mulFloat64
-              (DeepCore.var "_x")
-              (DeepCore.var "_x"))
-            (f64 1.0)))
-        (f64 (-1.0)))) $
-  -- d/dx(acosh(x)) = 1/sqrt(x^2 - 1)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_acosh))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow
-        (DeepMath.sqrt
-          (DeepMath.subFloat64
-            (DeepMath.mulFloat64
-              (DeepCore.var "_x")
-              (DeepCore.var "_x"))
-            (f64 1.0)))
-        (f64 (-1.0)))) $
-  -- d/dx(atanh(x)) = 1/(1 - x^2)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_atanh))
-    (just $ DeepCore.lambda "_x" (DeepMath.pow
-        (DeepMath.subFloat64 (f64 1.0) (DeepMath.mulFloat64
-          (DeepCore.var "_x")
-          (DeepCore.var "_x")))
-        (f64 (-1.0)))) $
-  -- d/dx(negate(x)) = -1
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_negate))
-    (just $ DeepCore.lambda "_x" (f64 (-1.0))) $
-  -- d/dx(abs(x)) = signum(x)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_abs))
-    (just $ DeepMath.ref _math_signum) $
-  -- d/dx(ceiling(x)) = 0  (piecewise constant)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_ceiling))
-    (just $ DeepCore.lambda "_x" (f64 0.0)) $
-  -- d/dx(floor(x)) = 0
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_floor))
-    (just $ DeepCore.lambda "_x" (f64 0.0)) $
-  -- d/dx(round(x)) = 0
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_round))
-    (just $ DeepCore.lambda "_x" (f64 0.0)) $
-  -- d/dx(truncate(x)) = 0
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_truncate))
-    (just $ DeepCore.lambda "_x" (f64 0.0)) $
-  -- d/dx(signum(x)) = 0  (piecewise constant)
-  Logic.ifElse (Equality.equal (var "name") (encodedName _math_signum))
-    (just $ DeepCore.lambda "_x" (f64 0.0)) $
-  -- Unknown primitive
-  nothing
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Dsls.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Dsls.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Dsls.hs
+++ /dev/null
@@ -1,591 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Kernel.Terms.Dsls where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Meta.Phantoms     as Phantoms
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  elimination, field, fieldType, floatType, floatValue, function, injection, integerType, integerValue, lambda, literal,
-  literalType, record, term, type_, typeScheme, wrap)
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Kernel.Terms.Annotations as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names as Names
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Dsl.Meta.DeepCore as DC
-import           Hydra.Dsl.Meta.DeepCore ((@@@))
-import           Prelude hiding ((++))
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-
-
-ns :: Namespace
-ns = Namespace "hydra.dsls"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, Formatting.ns, Names.ns, Strip.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Functions for generating domain-specific DSL modules from type modules"}
-  where
-    definitions = [
-      toDefinition dslBindingName,
-      toDefinition dslDefinitionName,
-      toDefinition dslModule,
-      toDefinition dslNamespace,
-      toDefinition filterTypeBindings,
-      toDefinition generateBindingsForType,
-      toDefinition generateRecordAccessor,
-      toDefinition generateRecordConstructor,
-      toDefinition generateRecordWithUpdater,
-      toDefinition generateUnionInjector,
-      toDefinition generateWrappedTypeAccessors,
-      toDefinition deduplicateBindings,
-      toDefinition findUniqueName,
-      toDefinition isDslEligibleBinding,
-      toDefinition dslTypeScheme,
-      toDefinition collectForallVars,
-      toDefinition nominalResultType]
-
-define :: String -> TTerm x -> TTermDefinition x
-define = definitionInModule module_
-
--- | Wrap a type in TTerm: TypeApplication (TypeVariable "hydra.phantoms.TTerm") innerType
-wrapInTTerm :: TTerm Type -> TTerm Type
-wrapInTTerm t = Core.typeApplication $ Core.applicationType (Core.typeVariable (Core.nameLift _TTerm)) t
-
--- | Build a TypeScheme from a list of parameter types and a result type.
--- All types are wrapped in TTerm. Forall variables are collected from the original type.
-dslTypeScheme :: TTermDefinition (Type -> [Type] -> Type -> TypeScheme)
-dslTypeScheme = define "dslTypeScheme" $
-  doc "Build a TypeScheme with TTerm-wrapped parameter and result types" $
-  "origType" ~> "paramTypes" ~> "resultType" ~>
-  "typeVars" <~ (collectForallVars @@ var "origType") $
-  "wrappedResult" <~ (wrapInTTerm (var "resultType")) $
-  "funType" <~ (Lists.foldr
-    ("paramType" ~> "acc" ~> Core.typeFunction $ Core.functionType (wrapInTTerm (var "paramType")) (var "acc"))
-    (var "wrappedResult")
-    (var "paramTypes")) $
-  Core.typeScheme (var "typeVars") (var "funType") nothing
-
--- | Collect forall type variables from a type (stripping annotations)
-collectForallVars :: TTermDefinition (Type -> [Name])
-collectForallVars = define "collectForallVars" $
-  doc "Collect forall type variable names from a type" $
-  "typ" ~> cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      collectForallVars @@ Core.annotatedTypeBody (var "at"),
-    _Type_forall>>: "ft" ~>
-      Lists.cons (Core.forallTypeParameter (var "ft"))
-        (collectForallVars @@ Core.forallTypeBody (var "ft"))]
-
--- | Build the nominal result type for a type definition.
--- For non-polymorphic types: TypeVariable typeName
--- For polymorphic types like (forall n. Namespaces n): TypeApplication (TypeVariable typeName) (TypeVariable n)
-nominalResultType :: TTermDefinition (Name -> Type -> Type)
-nominalResultType = define "nominalResultType" $
-  doc "Build the nominal result type with type applications for forall variables" $
-  "typeName" ~> "origType" ~>
-  "vars" <~ (collectForallVars @@ var "origType") $
-  Lists.foldl
-    ("acc" ~> "v" ~> Core.typeApplication $ Core.applicationType (var "acc") (Core.typeVariable (var "v")))
-    (Core.typeVariable (var "typeName"))
-    (var "vars")
-
--- | Inject a Record-typed term into the Term.record variant
--- Produces TermInject(Injection _Term (Field _Term_record innerRecord))
-injectTermRecord :: TTerm Term -> TTerm Term
-injectTermRecord t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_record) t)
-
--- | Inject a term into the Term.application variant
-injectTermApplication :: TTerm Term -> TTerm Term
-injectTermApplication t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_application) t)
-
--- | Inject a term into the Term.cases variant
-injectTermCases :: TTerm Term -> TTerm Term
-injectTermCases t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_cases) t)
-
--- | Inject a term into the Term.project variant
-injectTermProject :: TTerm Term -> TTerm Term
-injectTermProject t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_project) t)
-
--- | Inject a term into the Term.union variant
-injectTermUnion :: TTerm Term -> TTerm Term
-injectTermUnion t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_inject) t)
-
--- | Inject a term into the Term.unwrap variant
-injectTermUnwrap :: TTerm Term -> TTerm Term
-injectTermUnwrap t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_unwrap) t)
-
--- | Inject a term into the Term.wrap variant
-injectTermWrap :: TTerm Term -> TTerm Term
-injectTermWrap t = Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_wrap) t)
-
--- | Build a deep Name: TermWrap(_Name, TermLiteral(LiteralString(s)))
-deepName :: TTerm String -> TTerm Term
-deepName s = Core.termWrap $ Core.wrappedTerm (Core.nameLift _Name) (Core.termLiteral $ Core.literalString s)
-
--- | Build a deep Projection as a Term value
-deepProjection :: TTerm Name -> TTerm Name -> TTerm Term
-deepProjection typeName fieldName =
-  injectTermProject $
-    Core.termRecord $ Core.record (Core.nameLift _Projection) (list [
-      Core.field (Core.nameLift _Projection_typeName) (deepName (Core.unName typeName)),
-      Core.field (Core.nameLift _Projection_field) (deepName (Core.unName fieldName))])
-
--- | Build a deep Application as a Term value
-deepApplication :: TTerm Term -> TTerm Term -> TTerm Term
-deepApplication fun arg =
-  injectTermApplication $
-    Core.termRecord $ Core.record (Core.nameLift _Application) (list [
-      Core.field (Core.nameLift _Application_function) fun,
-      Core.field (Core.nameLift _Application_argument) arg])
-
--- | Build a deep Field record
-deepField :: TTerm Name -> TTerm Term -> TTerm Term
-deepField name term =
-  Core.termRecord $ Core.record (Core.nameLift _Field) (list [
-    Core.field (Core.nameLift _Field_name) (deepName (Core.unName name)),
-    Core.field (Core.nameLift _Field_term) term])
-
--- | Build a deep Record as a Term value (injected into Term.record)
-deepRecord :: TTerm Name -> TTerm [Term] -> TTerm Term
-deepRecord typeName fields =
-  injectTermRecord $
-    Core.termRecord $ Core.record (Core.nameLift _Record) (list [
-      Core.field (Core.nameLift _Record_typeName) (deepName (Core.unName typeName)),
-      Core.field (Core.nameLift _Record_fields) (Core.termList fields)])
-
--- | Build a deep Injection as a Term value (injected into Term.union)
-deepInjection :: TTerm Name -> TTerm Term -> TTerm Term
-deepInjection typeName fieldTerm =
-  injectTermUnion $
-    Core.termRecord $ Core.record (Core.nameLift _Injection) (list [
-      Core.field (Core.nameLift _Injection_typeName) (deepName (Core.unName typeName)),
-      Core.field (Core.nameLift _Injection_field) fieldTerm])
-
--- | Build a deep WrappedTerm as a Term value (injected into Term.wrap)
-deepWrap :: TTerm Name -> TTerm Term -> TTerm Term
-deepWrap typeName body =
-  injectTermWrap $
-    Core.termRecord $ Core.record (Core.nameLift _WrappedTerm) (list [
-      Core.field (Core.nameLift _WrappedTerm_typeName) (deepName (Core.unName typeName)),
-      Core.field (Core.nameLift _WrappedTerm_body) body])
-
--- | Build a deep TermUnwrap value
-deepUnwrap :: TTerm Name -> TTerm Term
-deepUnwrap typeName =
-  injectTermUnwrap $
-    deepName (Core.unName typeName)
-
--- | Unwrap a TTerm argument: apply (TermUnwrap _TTerm) to the variable
-unwrapTTerm :: TTerm Term -> TTerm Term
-unwrapTTerm v = Core.termApplication $ Core.application
-  (Core.termUnwrap (Core.nameLift _TTerm))
-  v
-
--- | Wrap a term in TTerm: WrappedTerm _TTerm term
-wrapTermInTTerm :: TTerm Term -> TTerm Term
-wrapTermInTTerm t = Core.termWrap $ Core.wrappedTerm (Core.nameLift _TTerm) t
-
-
-
--- | Generate a DSL module namespace from a source module namespace
--- For example, "hydra.core" -> "hydra.dsl.core"
-dslNamespace :: TTermDefinition (Namespace -> Namespace)
-dslNamespace = define "dslNamespace" $
-  doc "Generate a DSL module namespace from a source module namespace" $
-  "ns" ~>
-  "parts" <~ (Strings.splitOn (string ".") (Packaging.unNamespace (var "ns"))) $
-  "prefixFull" <~ (Packaging.namespace (Strings.cat $ list [
-    string "hydra.dsl.",
-    Packaging.unNamespace (var "ns")])) $
-  -- For hydra.* namespaces: hydra.foo -> hydra.dsl.foo
-  -- For other namespaces: foo.bar -> hydra.dsl.foo.bar (preserve full path)
-  -- An empty parts list is unreachable for a well-formed namespace; fall back
-  -- to the full-prefix form.
-  Maybes.maybe
-    (var "prefixFull")
-    ("ht" ~>
-      Logic.ifElse (Equality.equal (Pairs.first (var "ht")) (string "hydra"))
-        (Packaging.namespace (Strings.cat $ list [
-          string "hydra.dsl.",
-          Strings.intercalate (string ".") (Pairs.second (var "ht"))]))
-        (var "prefixFull"))
-    (Lists.uncons (var "parts"))
-
--- | Generate a fully qualified binding name for a DSL function from a type name
--- For example, "hydra.core.AnnotatedTerm" -> "hydra.dsl.core.annotatedTerm"
--- For local types (no namespace), returns just the decapitalized local name
-dslBindingName :: TTermDefinition (Name -> Name)
-dslBindingName = define "dslBindingName" $
-  doc "Generate a binding name for a DSL function from a type name" $
-  "n" ~>
-  "parts" <~ (Strings.splitOn (string ".") (Core.unName (var "n"))) $
-  "localPart" <~ (Formatting.decapitalize @@ (Names.localNameOf @@ (var "n"))) $
-  "localResult" <~ (Core.name (var "localPart")) $
-  -- nsParts = parts minus the last element (the namespace components).
-  -- Nothing means parts was empty (unreachable for a valid name);
-  -- Just [] means the name has no namespace (local type).
-  Maybes.maybe
-    (var "localResult")
-    ("nsParts" ~>
-      Maybes.maybe
-        -- single-element parts: local type, no namespace
-        (var "localResult")
-        ("nsHeadTail" ~>
-          "dslNsParts" <~ (Logic.ifElse
-            (Equality.equal (Pairs.first (var "nsHeadTail")) (string "hydra"))
-            -- hydra.core.Foo -> [hydra, dsl] ++ tail nsParts
-            (Lists.concat2 (list [string "hydra", string "dsl"]) (Pairs.second (var "nsHeadTail")))
-            -- openGql.grammar.Foo -> [hydra, dsl] ++ nsParts
-            (Lists.concat2 (list [string "hydra", string "dsl"]) (var "nsParts"))) $
-          Core.name (Strings.intercalate (string ".")
-            (Lists.concat2 (var "dslNsParts") (list [var "localPart"]))))
-        (Lists.uncons (var "nsParts")))
-    (Lists.maybeInit (var "parts"))
-
--- | Generate a DSL element name from a type name and a local element name.
--- For example, ("hydra.core.AnnotatedTerm", "annotatedTermBody") -> "hydra.dsl.core.annotatedTermBody"
--- This extracts the namespace from the type name, transforms it to the DSL namespace,
--- and appends the local element name.
-dslDefinitionName :: TTermDefinition (Name -> String -> Name)
-dslDefinitionName = define "dslDefinitionName" $
-  doc "Generate a qualified DSL element name from a type name and local element name" $
-  "typeName" ~> "localName" ~>
-  "parts" <~ (Strings.splitOn (string ".") (Core.unName (var "typeName"))) $
-  -- Extract namespace parts (all but last); fall back to the bare local name
-  -- when the type name has no namespace (unreachable for well-formed inputs).
-  Maybes.maybe
-    (Core.name (var "localName"))
-    ("nsParts" ~>
-      "dslNsParts" <~ (Maybes.maybe
-        -- nsParts empty: just prepend hydra.dsl
-        (list [string "hydra", string "dsl"])
-        ("nsHeadTail" ~> Logic.ifElse
-          (Equality.equal (Pairs.first (var "nsHeadTail")) (string "hydra"))
-          -- hydra.core -> hydra.dsl.core (drop the leading "hydra", keep the rest)
-          (Lists.concat2 (list [string "hydra", string "dsl"]) (Pairs.second (var "nsHeadTail")))
-          -- openGql.grammar -> hydra.dsl.openGql.grammar
-          (Lists.concat2 (list [string "hydra", string "dsl"]) (var "nsParts")))
-        (Lists.uncons (var "nsParts"))) $
-      Core.name (Strings.intercalate (string ".")
-        (Lists.concat2 (var "dslNsParts") (list [var "localName"]))))
-    (Lists.maybeInit (var "parts"))
-
--- | Generate a record constructor function.
--- For a record type like {body: Term, annotation: Map(Name, Term)},
--- produces a deep (meta) term:
---   \body -> \annotation -> TermRecord (Record "hydra.core.AnnotatedTerm" [Field "body" body, ...])
--- When code-generated into Haskell, this becomes:
---   annotatedTerm body annotation = Core.TermRecord (Core.Record { ... })
-generateRecordConstructor :: TTermDefinition (Type -> Name -> [FieldType] -> [Binding])
-generateRecordConstructor = define "generateRecordConstructor" $
-  doc "Generate a record constructor function" $
-  "origType" ~> "typeName" ~> "fieldTypes" ~>
-  -- Build deep fields and record using helpers
-  "dFields" <~ (Lists.map
-    ("ft" ~> deepField (Core.fieldTypeName (var "ft"))
-      (unwrapTTerm (Core.termVariable (Core.name (Formatting.decapitalize @@ (Names.localNameOf @@ Core.fieldTypeName (var "ft")))))))
-    (var "fieldTypes")) $
-  "recordTerm" <~ (wrapTermInTTerm (deepRecord (var "typeName") (var "dFields"))) $
-  -- Build (paramName, TTerm<fieldType>) pairs for lambda construction
-  "paramPairs" <~ (Lists.map
-    ("ft" ~> pair
-      (Formatting.decapitalize @@ (Names.localNameOf @@ Core.fieldTypeName (var "ft")))
-      (wrapInTTerm (Core.fieldTypeType (var "ft"))))
-    (var "fieldTypes")) $
-  -- Wrap in typed lambdas for each parameter (right to left)
-  "body" <~ (Lists.foldl
-    ("acc" ~> "pp" ~>
-      Core.termLambda $ Core.lambda (Core.name (Pairs.first (var "pp"))) (just (Pairs.second (var "pp"))) (var "acc"))
-    (var "recordTerm")
-    (Lists.reverse (var "paramPairs"))) $
-  -- Type: TTerm<FieldType1> -> TTerm<FieldType2> -> ... -> TTerm<RecordType>
-  "paramTypes" <~ (Lists.map ("ft" ~> Core.fieldTypeType (var "ft")) (var "fieldTypes")) $
-  "resultType" <~ (nominalResultType @@ var "typeName" @@ var "origType") $
-  "ts" <~ (dslTypeScheme @@ var "origType" @@ var "paramTypes" @@ var "resultType") $
-  -- Return as a single-element list with the constructor binding
-  list [Core.binding
-    (dslBindingName @@ var "typeName")
-    (var "body")
-    (just (var "ts"))]
-
--- | Generate a record field accessor function.
--- For a field "name" in record type "Binding", produces:
---   bindingName :: Binding -> Name
---   bindingName x = x.name
-generateRecordAccessor :: TTermDefinition (Type -> Name -> FieldType -> Binding)
-generateRecordAccessor = define "generateRecordAccessor" $
-  doc "Generate a record field accessor function" $
-  "origType" ~> "typeName" ~> "ft" ~>
-  "fieldName" <~ (Core.fieldTypeName (var "ft")) $
-  "accessorLocalName" <~ (Strings.cat $ list [
-    Formatting.decapitalize @@ (Names.localNameOf @@ var "typeName"),
-    Strings.intercalate (string "") (Lists.map ("s" ~> Formatting.capitalize @@ var "s") (Strings.splitOn (string ".") (Core.unName (var "fieldName"))))]) $
-  "accessorName" <~ (dslDefinitionName @@ var "typeName" @@ var "accessorLocalName") $
-  -- Body: projection as a simple elimination
-  "paramDomain" <~ (wrapInTTerm (nominalResultType @@ var "typeName" @@ var "origType")) $
-  "body" <~ (Core.termLambda $ Core.lambda (Core.name (string "x")) (just (var "paramDomain")) $
-      wrapTermInTTerm (deepApplication
-        (deepProjection (var "typeName") (var "fieldName"))
-        (unwrapTTerm (Core.termVariable (Core.name (string "x")))))) $
-  "ts" <~ (dslTypeScheme @@ var "origType"
-    @@ list [nominalResultType @@ var "typeName" @@ var "origType"]
-    @@ Core.fieldTypeType (var "ft")) $
-  Core.binding
-    (var "accessorName")
-    (var "body")
-    (just (var "ts"))
-
--- | Generate a "withXxx" record field updater function.
--- For a field "name" in record type "Binding" (with fields name, term, type), produces:
---   bindingWithName :: Binding -> Name -> Binding
---   bindingWithName b newName = Binding newName (bindingTerm b) (bindingType b)
--- This constructs a new record with the specified field replaced and all others projected.
-generateRecordWithUpdater :: TTermDefinition (Type -> Name -> [FieldType] -> FieldType -> Binding)
-generateRecordWithUpdater = define "generateRecordWithUpdater" $
-  doc "Generate a withXxx record field updater function" $
-  "origType" ~> "typeName" ~> "allFields" ~> "targetField" ~>
-  "targetFieldName" <~ (Core.fieldTypeName (var "targetField")) $
-  -- Build the updater name: e.g., "bindingWithName"
-  "updaterLocalName" <~ (Strings.cat $ list [
-    Formatting.decapitalize @@ (Names.localNameOf @@ var "typeName"),
-    string "With",
-    Strings.intercalate (string "") (Lists.map ("s" ~> Formatting.capitalize @@ var "s") (Strings.splitOn (string ".") (Core.unName (var "targetFieldName"))))]) $
-  "updaterName" <~ (dslDefinitionName @@ var "typeName" @@ var "updaterLocalName") $
-  -- Build deep fields: project from unwrapped original, except target uses unwrapped newVal
-  "dFields" <~ (Lists.map
-    ("ft" ~> deepField (Core.fieldTypeName (var "ft"))
-      (Logic.ifElse (Equality.equal
-        (Core.unName (Core.fieldTypeName (var "ft")))
-        (Core.unName (var "targetFieldName")))
-        (unwrapTTerm (Core.termVariable (Core.name (string "newVal"))))
-        (deepApplication
-          (deepProjection (var "typeName") (Core.fieldTypeName (var "ft")))
-          (unwrapTTerm (Core.termVariable (Core.name (string "original")))))))
-    (var "allFields")) $
-  "recDomain" <~ (wrapInTTerm (nominalResultType @@ var "typeName" @@ var "origType")) $
-  "fieldDomain" <~ (wrapInTTerm (Core.fieldTypeType (var "targetField"))) $
-  "body" <~ (
-    Core.termLambda $ Core.lambda (Core.name (string "original")) (just (var "recDomain")) $
-    Core.termLambda $ Core.lambda (Core.name (string "newVal")) (just (var "fieldDomain")) $
-    wrapTermInTTerm (deepRecord (var "typeName") (var "dFields"))) $
-  "recType" <~ (nominalResultType @@ var "typeName" @@ var "origType") $
-  "ts" <~ (dslTypeScheme @@ var "origType"
-    @@ list [var "recType", Core.fieldTypeType (var "targetField")]
-    @@ var "recType") $
-  Core.binding
-    (var "updaterName")
-    (var "body")
-    (just (var "ts"))
-
--- | Generate a union injection helper.
--- For a variant "lambda" in union type "Function", produces:
---   functionLambda :: Lambda -> Function
---   functionLambda x = Function.lambda x
--- For unit variants (field type is unit), produces:
---   comparisonLessThan :: Comparison
---   comparisonLessThan = Comparison.lessThan ()
-generateUnionInjector :: TTermDefinition (Type -> Name -> FieldType -> Binding)
-generateUnionInjector = define "generateUnionInjector" $
-  doc "Generate a union injection helper" $
-  "origType" ~> "typeName" ~> "ft" ~>
-  "fieldName" <~ (Core.fieldTypeName (var "ft")) $
-  "fieldType" <~ (Core.fieldTypeType (var "ft")) $
-  -- Build the injector name: e.g., "functionLambda" or "comparisonLessThan"
-  "injectorLocalName" <~ (Strings.cat $ list [
-    Formatting.decapitalize @@ (Names.localNameOf @@ var "typeName"),
-    Strings.intercalate (string "") (Lists.map ("s" ~> Formatting.capitalize @@ var "s") (Strings.splitOn (string ".") (Core.unName (var "fieldName"))))]) $
-  "injectorName" <~ (dslDefinitionName @@ var "typeName" @@ var "injectorLocalName") $
-  -- Check if field type is unit (for unit variants like enum members)
-  "isUnit" <~ (isUnitType_ @@ var "fieldType") $
-  -- Build simple injection
-  -- Build deep injection: deepField for the variant, then deepInjection into the union type
-  "dFieldValue" <~ (Logic.ifElse (var "isUnit")
-    (Core.termInject $ Core.injection (Core.nameLift _Term) (Core.field (Core.nameLift _Term_unit) Core.termUnit))
-    (unwrapTTerm (Core.termVariable (Core.name (string "x"))))) $
-  "injectionTerm" <~ (wrapTermInTTerm (deepInjection (var "typeName") (deepField (var "fieldName") (var "dFieldValue")))) $
-  -- For non-unit variants, wrap in a typed lambda; for unit, it's a constant TTerm
-  "variantDomain" <~ (wrapInTTerm (Core.fieldTypeType (var "ft"))) $
-  "body" <~ (Logic.ifElse (var "isUnit")
-    (var "injectionTerm")
-    (Core.termLambda $ Core.lambda (Core.name (string "x")) (just (var "variantDomain")) (var "injectionTerm"))) $
-  "unionType" <~ (nominalResultType @@ var "typeName" @@ var "origType") $
-  "ts" <~ (Logic.ifElse (var "isUnit")
-    (dslTypeScheme @@ var "origType" @@ list ([] :: [TTerm Type]) @@ var "unionType")
-    (dslTypeScheme @@ var "origType" @@ list [Core.fieldTypeType (var "ft")] @@ var "unionType")) $
-  Core.binding
-    (var "injectorName")
-    (var "body")
-    (just (var "ts"))
-
--- | Check if a type is the unit type (stripping annotations first)
--- Note: uses stripAnnotations to avoid recursive Haskell-level DSL terms,
--- which would cause infinite recursion during code generation.
-isUnitType_ :: TTerm (Type -> Bool)
-isUnitType_ = "t" ~> cases _Type (Strip.deannotateType @@ var "t") (Just Phantoms.false) [
-  _Type_unit>>: constant Phantoms.true]
-
--- | Generate wrap/unwrap accessors for a wrapped type.
--- For a wrapped type like "Name" wrapping String, produces:
---   name :: String -> Name      (constructor/wrap)
---   unName :: Name -> String    (unwrap)
-generateWrappedTypeAccessors :: TTermDefinition (Type -> Name -> Type -> [Binding])
-generateWrappedTypeAccessors = define "generateWrappedTypeAccessors" $
-  doc "Generate wrap/unwrap accessors for a wrapped type" $
-  "origType" ~> "typeName" ~> "innerType" ~>
-  "localName" <~ (Names.localNameOf @@ var "typeName") $
-  -- Wrap function: decapitalized type name
-  "wrapName" <~ (dslDefinitionName @@ var "typeName" @@ (Formatting.decapitalize @@ var "localName")) $
-  -- Unwrap function: "un" + type local name
-  "unwrapLocalName" <~ (Strings.cat $ list [string "un", var "localName"]) $
-  "unwrapName" <~ (dslDefinitionName @@ var "typeName" @@ var "unwrapLocalName") $
-  "wrapperType" <~ (nominalResultType @@ var "typeName" @@ var "origType") $
-  -- Wrap: \(x :: TTerm<InnerType>) -> WrappedTerm typeName x
-  "wrapDomain" <~ (wrapInTTerm (var "innerType")) $
-  "wrapBody" <~ (
-    Core.termLambda $ Core.lambda (Core.name (string "x")) (just (var "wrapDomain")) $
-        wrapTermInTTerm (deepWrap (var "typeName")
-          (unwrapTTerm (Core.termVariable (Core.name (string "x")))))) $
-  -- Unwrap: \(x :: TTerm<WrapperType>) -> TTerm(apply (unwrap typeName) (unTTerm x))
-  "unwrapDomain" <~ (wrapInTTerm (var "wrapperType")) $
-  "unwrapBody" <~ (
-    Core.termLambda $ Core.lambda (Core.name (string "x")) (just (var "unwrapDomain")) $
-        wrapTermInTTerm (deepApplication
-          (deepUnwrap (var "typeName"))
-          (unwrapTTerm (Core.termVariable (Core.name (string "x")))))) $
-  "wrapTs" <~ (dslTypeScheme @@ var "origType" @@ list [var "innerType"] @@ var "wrapperType") $
-  "unwrapTs" <~ (dslTypeScheme @@ var "origType" @@ list [var "wrapperType"] @@ var "innerType") $
-  list [
-    Core.binding (var "wrapName") (var "wrapBody") (just (var "wrapTs")),
-    Core.binding (var "unwrapName") (var "unwrapBody") (just (var "unwrapTs"))]
-
--- | Generate all DSL bindings for a single type binding.
--- Inspects the type definition and generates appropriate helpers:
--- - Records: constructor + accessors + withXxx updaters
--- - Unions: injection helpers
--- - Wrapped types: wrap + unwrap
-generateBindingsForType :: TTermDefinition (Context -> Graph -> Binding -> Either DecodingError [Binding])
-generateBindingsForType = define "generateBindingsForType" $
-  doc "Generate all DSL bindings for a type binding" $
-  "cx" ~> "graph" ~> "b" ~>
-  "typeName" <~ (Core.bindingName (var "b")) $
-  Eithers.bind (decoderFor _Type @@ var "graph" @@ (Core.bindingTerm (var "b"))) (
-    "rawType" ~>
-    "typ" <~ (Strip.deannotateTypeParameters @@ (Strip.deannotateType @@ var "rawType")) $
-    right (cases _Type (var "typ") (Just $ list ([] :: [TTerm Binding])) [
-      _Type_record>>: "fts" ~>
-        Lists.concat $ list [
-          generateRecordConstructor @@ var "rawType" @@ var "typeName" @@ var "fts",
-          Lists.map (generateRecordAccessor @@ var "rawType" @@ var "typeName") (var "fts"),
-          Lists.map (generateRecordWithUpdater @@ var "rawType" @@ var "typeName" @@ var "fts")
-            (var "fts")],
-      _Type_union>>: "fts" ~>
-        Lists.map (generateUnionInjector @@ var "rawType" @@ var "typeName") (var "fts"),
-      _Type_wrap>>: "innerType" ~>
-        generateWrappedTypeAccessors @@ var "rawType" @@ var "typeName" @@ var "innerType"]))
-
--- | Deduplicate bindings by appending "_" suffixes to duplicate names.
--- Later bindings get suffixes; earlier ones keep their name.
--- Multiple duplicates get increasing suffixes: name_, name__, name___, etc.
-deduplicateBindings :: TTermDefinition ([Binding] -> [Binding])
-deduplicateBindings = define "deduplicateBindings" $
-  doc "Deduplicate bindings by appending underscore suffixes to duplicate names" $
-  "bindings" ~>
-  Lists.foldl
-    ("acc" ~> "b" ~>
-      "n" <~ (Core.unName (Core.bindingName (var "b"))) $
-      "usedNames" <~ (Lists.map ("a" ~> Core.unName (Core.bindingName (var "a"))) (var "acc")) $
-      "uniqueName" <~ (findUniqueName @@ var "n" @@ var "usedNames") $
-      Lists.concat2 (var "acc") (list [
-        Core.binding
-          (Core.name (var "uniqueName"))
-          (Core.bindingTerm (var "b"))
-          (Core.bindingTypeScheme (var "b"))]))
-    (list ([] :: [TTerm Binding]))
-    (var "bindings")
-
--- | Find a unique name by appending "_" suffixes until not in the used list
-findUniqueName :: TTermDefinition (String -> [String] -> String)
-findUniqueName = define "findUniqueName" $
-  doc "Find a unique name by appending underscores" $
-  "candidate" ~> "usedNames" ~>
-  Logic.ifElse (Lists.null (Lists.filter (unaryFunction (Equality.equal (var "candidate"))) (var "usedNames")))
-    (var "candidate")
-    (findUniqueName @@ (Strings.cat $ list [var "candidate", string "_"]) @@ var "usedNames")
-
--- | Filter bindings to only DSL-eligible type definitions
-filterTypeBindings :: TTermDefinition (Context -> Graph -> [Binding] -> Either Error [Binding])
-filterTypeBindings = define "filterTypeBindings" $
-  doc "Filter bindings to only DSL-eligible type definitions" $
-  "cx" ~> "graph" ~> "bindings" ~>
-    Eithers.map (primitive _maybes_cat) $
-      Eithers.mapList (isDslEligibleBinding @@ var "cx" @@ var "graph") $
-        primitive _lists_filter @@ Annotations.isNativeType @@ var "bindings"
-
--- | Check if a binding is eligible for DSL generation.
--- Excludes phantom types (TTerm, TBinding) since they are meta-infrastructure.
-isDslEligibleBinding :: TTermDefinition (Context -> Graph -> Binding -> Either Error (Maybe Binding))
-isDslEligibleBinding = define "isDslEligibleBinding" $
-  doc "Check if a binding is eligible for DSL generation" $
-  "cx" ~> "graph" ~> "b" ~>
-  "ns" <~ (Names.namespaceOf @@ Core.bindingName (var "b")) $
-  Logic.ifElse (Equality.equal (Maybes.maybe (string "") (unaryFunction Packaging.unNamespace) (var "ns")) (string "hydra.phantoms"))
-    (right nothing)
-    (right (just (var "b")))
-
--- | Transform a type module into a DSL module.
--- Returns Nothing if the module has no eligible type definitions.
-dslModule :: TTermDefinition (Context -> Graph -> Module -> Either Error (Maybe Module))
-dslModule = define "dslModule" $
-  doc "Transform a type module into a DSL module" $
-  "cx" ~> "graph" ~> "mod" ~>
-    "typeBindings" <<~ (filterTypeBindings @@ var "cx" @@ var "graph" @@
-      (Maybes.cat $ Lists.map
-        ("d" ~> cases _Definition (var "d") (Just nothing) [
-          _Definition_type>>: "td" ~>
-            just (Annotations.typeBinding @@ (Packaging.typeDefinitionName $ var "td") @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td"))])
-        (Packaging.moduleDefinitions (var "mod")))) $
-    Logic.ifElse (Lists.null (var "typeBindings"))
-      (right nothing)
-      ("dslBindings" <<~ Eithers.mapList ("b" ~>
-        Eithers.bimap
-          ("_e" ~> Error.errorDecoding $ var "_e")
-          ("x" ~> var "x")
-          (generateBindingsForType @@ var "cx" @@ var "graph" @@ var "b")) (var "typeBindings") $
-        right (just (Packaging.module_
-          (just (Strings.cat $ list [
-            string "DSL functions for ",
-            Packaging.unNamespace (Packaging.moduleNamespace (var "mod"))]))
-          (dslNamespace @@ (Packaging.moduleNamespace (var "mod")))
-          -- DSL modules depend on DSL modules for type dependencies (to reference other types' DSL functions)
-          (Lists.nub (primitive _lists_map @@ dslNamespace @@ (Packaging.moduleTypeDependencies (var "mod"))))
-          -- Type dependencies: the original module + its type deps + hydra.phantoms (for TTerm)
-          (Lists.nub (Lists.concat2
-            (list [Packaging.moduleNamespace (var "mod"), Packaging.namespace (string "hydra.phantoms")])
-            (Packaging.moduleTypeDependencies (var "mod"))))
-          (Lists.map ("b" ~> Packaging.definitionTerm (Packaging.termDefinition
-            (Core.bindingName $ var "b") (Core.bindingTerm $ var "b")
-            (Core.bindingTypeScheme $ var "b")))
-            (deduplicateBindings @@ Lists.concat (var "dslBindings"))))))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Encoding.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Encoding.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Encoding.hs
+++ /dev/null
@@ -1,864 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Kernel.Terms.Encoding where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (literalType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import qualified Hydra.Dsl.Meta.Phantoms     as Phantoms
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  elimination, field, fieldType, floatType, floatValue, function, injection, integerType, integerValue, lambda, literal,
-  literalType, record, term, type_, typeScheme, wrap)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Kernel.Terms.Annotations as Annotations
-import qualified Hydra.Sources.Decode.Core as DecodeCore
-
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Predicates as Predicates
-import qualified Hydra.Dsl.Meta.DeepCore as DC
-import           Hydra.Dsl.Meta.DeepCore ((@@@))
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.encoding"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, moduleNamespace DecodeCore.module_, Formatting.ns, Names.ns, Predicates.ns, Rewriting.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Functions for generating term encoders from type modules"}
-  where
-    definitions = [
-      toDefinition encodeBinding,
-      toDefinition encodeBindingName,
-      toDefinition encoderCollectForallVariables,
-      toDefinition encoderCollectOrdVars,
-      toDefinition encoderCollectTypeVarsFromType,
-      toDefinition encoderFullResultType,
-      toDefinition encoderFullResultTypeNamed,
-      toDefinition encoderType,
-      toDefinition encoderTypeNamed,
-      toDefinition encoderTypeScheme,
-      toDefinition encoderTypeSchemeNamed,
-      toDefinition prependForallEncoders,
-      toDefinition encodeFieldValue,
-      toDefinition encodeFloatValue,
-      toDefinition encodeInjection,
-      toDefinition encodeIntegerValue,
-      toDefinition encodeListType,
-      toDefinition encodeLiteralType,
-      toDefinition encodeEitherType,
-      toDefinition encodeForallType,
-      toDefinition encodeMapType,
-      toDefinition encodeOptionalType,
-      toDefinition encodePairType,
-      toDefinition encodeModule,
-      toDefinition encodeName,
-      toDefinition encodeNamespace,
-      toDefinition encodeRecordType,
-      toDefinition encodeRecordTypeNamed,
-      toDefinition encodeSetType,
-      toDefinition encodeType,
-      toDefinition encodeTypeNamed,
-      toDefinition encodeUnionType,
-      toDefinition encodeUnionTypeNamed,
-      toDefinition encodeWrappedType,
-      toDefinition encodeWrappedTypeNamed,
-      toDefinition filterTypeBindings,
-      toDefinition isEncodableBinding,
-      toDefinition isUnitType_]
-
-define :: String -> TTerm x -> TTermDefinition x
-define = definitionInModule module_
-
--- | Bridge helper: format InContext DecodingError as a string
-formatDecodingError :: TTerm (DecodingError -> String)
-formatDecodingError = "e" ~> unwrap _DecodingError @@ var "e"
-
--- | Encode a single type binding into an encoder binding
--- This decodes the term to a Type, then generates an encoder function.
--- Type variables that appear as Map keys or Set elements get Ord constraints
--- via the encoder type scheme.
-encodeBinding :: TTermDefinition (Context -> Graph -> Binding -> Either DecodingError Binding)
-encodeBinding = define "encodeBinding" $
-  doc "Transform a type binding into an encoder binding" $
-  "cx" ~> "graph" ~> "b" ~>
-    Eithers.bind (decoderFor _Type @@ var "graph" @@ (Core.bindingTerm (var "b"))) (
-      "typ" ~>
-      right (Core.binding
-        (encodeBindingName @@ (Core.bindingName (var "b")))
-        (encodeTypeNamed @@ (Core.bindingName (var "b")) @@ (var "typ"))
-        (just (encoderTypeSchemeNamed @@ (Core.bindingName (var "b")) @@ var "typ"))))
-
--- | Construct a TypeScheme for an encoder function from a source type definition.
--- For a type like @forall v. Graph v@ (where Graph has Map v (Vertex v)),
--- produces the scheme @forall v. (v -> Term) -> Graph v -> Term@ with Ord constraint on v.
---
--- The type scheme uses the same variable names as the original type definition.
--- Variable normalization (to t0, t1, etc.) happens later in the pipeline and
--- handles renaming both variables and constraint keys consistently.
-encoderTypeSchemeNamed :: TTermDefinition (Name -> Type -> TypeScheme)
-encoderTypeSchemeNamed = define "encoderTypeSchemeNamed" $
-  doc "Construct a TypeScheme for an encoder function, with element name for nominal types" $
-  "ename" ~> "typ" ~> lets [
-    "typeVars">: encoderCollectForallVariables @@ var "typ",
-    "encoderFunType">: encoderTypeNamed @@ var "ename" @@ var "typ",
-    "allOrdVars">: encoderCollectOrdVars @@ var "typ",
-    "ordVars">: Lists.filter
-      ("v" ~> Lists.elem (var "v" :: TTerm Name) (var "typeVars" :: TTerm [Name]))
-      (var "allOrdVars"),
-    "constraints">:
-      Logic.ifElse (Lists.null (var "ordVars"))
-        nothing
-        (just $ Maps.fromList $ Lists.map
-          ("v" ~> pair (var "v") (Core.typeVariableMetadata $ Sets.singleton $ Core.nameLift _TypeClass_ordering))
-          (var "ordVars"))] $
-  Core.typeScheme (var "typeVars") (var "encoderFunType") (var "constraints")
-
-encoderTypeScheme :: TTermDefinition (Type -> TypeScheme)
-encoderTypeScheme = define "encoderTypeScheme" $
-  doc "Construct a TypeScheme for an encoder function from a source type" $
-  "typ" ~> lets [
-    -- Collect forall variables
-    "typeVars">: encoderCollectForallVariables @@ var "typ",
-
-    -- Build the encoder function type
-    "encoderFunType">: encoderType @@ var "typ",
-
-    -- Find Ord-constrained variables (those used as Map keys or Set elements)
-    "allOrdVars">: encoderCollectOrdVars @@ var "typ",
-    -- Filter to only actual forall-bound variables
-    "ordVars">: Lists.filter
-      ("v" ~> Lists.elem (var "v" :: TTerm Name) (var "typeVars" :: TTerm [Name]))
-      (var "allOrdVars"),
-
-    -- Build constraints map: {varName -> TypeVariableMetadata {classes = {ordering}}}
-    "constraints">:
-      Logic.ifElse (Lists.null (var "ordVars"))
-        nothing
-        (just $ Maps.fromList $ Lists.map
-          ("v" ~> pair (var "v") (Core.typeVariableMetadata $ Sets.singleton $ Core.nameLift _TypeClass_ordering))
-          (var "ordVars"))] $
-  Core.typeScheme (var "typeVars") (var "encoderFunType") (var "constraints")
-
--- | Collect forall type variables from a type
-encoderCollectForallVariables :: TTermDefinition (Type -> [Name])
-encoderCollectForallVariables = define "encoderCollectForallVariables" $
-  doc "Collect forall type variable names from a type" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      encoderCollectForallVariables @@ (Core.annotatedTypeBody (var "at")),
-    _Type_forall>>: "ft" ~>
-      Lists.cons (Core.forallTypeParameter (var "ft"))
-        (encoderCollectForallVariables @@ Core.forallTypeBody (var "ft"))]
-
--- | Collect type variables that need Ord constraints (from Map key and Set element positions)
-encoderCollectOrdVars :: TTermDefinition (Type -> [Name])
-encoderCollectOrdVars = define "encoderCollectOrdVars" $
-  doc "Collect type variables needing Ord constraints" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      encoderCollectOrdVars @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      Lists.concat2
-        (encoderCollectOrdVars @@ Core.applicationTypeFunction (var "appType"))
-        (encoderCollectOrdVars @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      Lists.concat2
-        (encoderCollectOrdVars @@ Core.eitherTypeLeft (var "et"))
-        (encoderCollectOrdVars @@ Core.eitherTypeRight (var "et")),
-    _Type_forall>>: "ft" ~>
-      encoderCollectOrdVars @@ Core.forallTypeBody (var "ft"),
-    _Type_list>>: "elemType" ~>
-      encoderCollectOrdVars @@ var "elemType",
-    -- For Map<K, V>, collect all type variables from K (they need Ord)
-    _Type_map>>: "mt" ~>
-      Lists.concat (list [
-        encoderCollectTypeVarsFromType @@ Core.mapTypeKeys (var "mt"),
-        encoderCollectOrdVars @@ Core.mapTypeKeys (var "mt"),
-        encoderCollectOrdVars @@ Core.mapTypeValues (var "mt")]),
-    _Type_maybe>>: "elemType" ~>
-      encoderCollectOrdVars @@ var "elemType",
-    _Type_pair>>: "pt" ~>
-      Lists.concat2
-        (encoderCollectOrdVars @@ Core.pairTypeFirst (var "pt"))
-        (encoderCollectOrdVars @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> encoderCollectOrdVars @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    -- For Set<T>, collect all type variables from T (they all need Ord)
-    _Type_set>>: "elemType" ~>
-      Lists.concat2
-        (encoderCollectTypeVarsFromType @@ var "elemType")
-        (encoderCollectOrdVars @@ var "elemType"),
-    _Type_union>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> encoderCollectOrdVars @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    _Type_wrap>>: "wt" ~>
-      encoderCollectOrdVars @@ var "wt"]
-
--- | Collect all type variables from a type expression
-encoderCollectTypeVarsFromType :: TTermDefinition (Type -> [Name])
-encoderCollectTypeVarsFromType = define "encoderCollectTypeVarsFromType" $
-  doc "Collect all type variable names from a type expression" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ list ([] :: [TTerm Name])) [
-    _Type_annotated>>: "at" ~>
-      encoderCollectTypeVarsFromType @@ Core.annotatedTypeBody (var "at"),
-    _Type_application>>: "appType" ~>
-      Lists.concat2
-        (encoderCollectTypeVarsFromType @@ Core.applicationTypeFunction (var "appType"))
-        (encoderCollectTypeVarsFromType @@ Core.applicationTypeArgument (var "appType")),
-    _Type_forall>>: "ft" ~>
-      encoderCollectTypeVarsFromType @@ Core.forallTypeBody (var "ft"),
-    _Type_list>>: "elemType" ~>
-      encoderCollectTypeVarsFromType @@ var "elemType",
-    _Type_map>>: "mt" ~>
-      Lists.concat2
-        (encoderCollectTypeVarsFromType @@ Core.mapTypeKeys (var "mt"))
-        (encoderCollectTypeVarsFromType @@ Core.mapTypeValues (var "mt")),
-    _Type_maybe>>: "elemType" ~>
-      encoderCollectTypeVarsFromType @@ var "elemType",
-    _Type_pair>>: "pt" ~>
-      Lists.concat2
-        (encoderCollectTypeVarsFromType @@ Core.pairTypeFirst (var "pt"))
-        (encoderCollectTypeVarsFromType @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> encoderCollectTypeVarsFromType @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    _Type_set>>: "elemType" ~>
-      encoderCollectTypeVarsFromType @@ var "elemType",
-    _Type_union>>: "rt" ~>
-      Lists.concat $ Lists.map
-        ("ft" ~> encoderCollectTypeVarsFromType @@ Core.fieldTypeType (var "ft"))
-        (var "rt"),
-    _Type_variable>>: "name" ~>
-      list [var "name"],
-    _Type_wrap>>: "wt" ~>
-      encoderCollectTypeVarsFromType @@ var "wt"]
-
--- | Get the full result type for an encoder (the input type of the encoder function)
--- Maps structural types to their nominal names, preserving type applications.
-encoderFullResultType :: TTermDefinition (Type -> Type)
-encoderFullResultType = define "encoderFullResultType" $
-  doc "Get full result type for encoder input" $
-  "typ" ~>
-  cases _Type (var "typ") (Just $ Core.typeVariable (Core.nameLift _Term)) [
-    _Type_annotated>>: "at" ~>
-      encoderFullResultType @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      Core.typeApplication $ Core.applicationType
-        (encoderFullResultType @@ Core.applicationTypeFunction (var "appType"))
-        (Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      Core.typeEither $ Core.eitherType
-        (encoderFullResultType @@ Core.eitherTypeLeft (var "et"))
-        (encoderFullResultType @@ Core.eitherTypeRight (var "et")),
-    _Type_forall>>: "ft" ~>
-      Core.typeApplication $ Core.applicationType
-        (encoderFullResultType @@ Core.forallTypeBody (var "ft"))
-        (Core.typeVariable (Core.forallTypeParameter (var "ft"))),
-    _Type_list>>: "elemType" ~>
-      Core.typeList (encoderFullResultType @@ var "elemType"),
-    _Type_literal>>: "_" ~>
-      Core.typeVariable (Core.nameLift _Literal),
-    _Type_map>>: "mt" ~>
-      Core.typeMap $ Core.mapType
-        (encoderFullResultType @@ Core.mapTypeKeys (var "mt"))
-        (encoderFullResultType @@ Core.mapTypeValues (var "mt")),
-    _Type_maybe>>: "elemType" ~>
-      Core.typeMaybe (encoderFullResultType @@ var "elemType"),
-    _Type_pair>>: "pt" ~>
-      Core.typePair $ Core.pairType
-        (encoderFullResultType @@ Core.pairTypeFirst (var "pt"))
-        (encoderFullResultType @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: constant (Core.typeVariable (Core.nameLift _Term)),
-    _Type_set>>: "elemType" ~>
-      Core.typeSet (encoderFullResultType @@ var "elemType"),
-    _Type_union>>: constant (Core.typeVariable (Core.nameLift _Term)),
-    _Type_unit>>: constant Core.typeUnit,
-    _Type_variable>>: "name" ~>
-      Core.typeVariable (var "name"),
-    _Type_void>>: constant Core.typeVoid,
-    _Type_wrap>>: constant (Core.typeVariable (Core.nameLift _Term))]
-
--- | Get full result type for encoder input, with element name for nominal types
-encoderFullResultTypeNamed :: TTermDefinition (Name -> Type -> Type)
-encoderFullResultTypeNamed = define "encoderFullResultTypeNamed" $
-  doc "Get full result type for encoder input, using element name for nominal types" $
-  "ename" ~> "typ" ~>
-  cases _Type (var "typ") (Just $ Core.typeVariable (Core.nameLift _Term)) [
-    _Type_annotated>>: "at" ~>
-      encoderFullResultTypeNamed @@ var "ename" @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: "appType" ~>
-      Core.typeApplication $ Core.applicationType
-        (encoderFullResultType @@ Core.applicationTypeFunction (var "appType"))
-        (Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      Core.typeEither $ Core.eitherType
-        (encoderFullResultType @@ Core.eitherTypeLeft (var "et"))
-        (encoderFullResultType @@ Core.eitherTypeRight (var "et")),
-    _Type_forall>>: "ft" ~>
-      Core.typeApplication $ Core.applicationType
-        (encoderFullResultTypeNamed @@ var "ename" @@ Core.forallTypeBody (var "ft"))
-        (Core.typeVariable (Core.forallTypeParameter (var "ft"))),
-    _Type_list>>: "elemType" ~>
-      Core.typeList (encoderFullResultType @@ var "elemType"),
-    _Type_literal>>: "_" ~>
-      Core.typeVariable (Core.nameLift _Literal),
-    _Type_map>>: "mt" ~>
-      Core.typeMap $ Core.mapType
-        (encoderFullResultType @@ Core.mapTypeKeys (var "mt"))
-        (encoderFullResultType @@ Core.mapTypeValues (var "mt")),
-    _Type_maybe>>: "elemType" ~>
-      Core.typeMaybe (encoderFullResultType @@ var "elemType"),
-    _Type_pair>>: "pt" ~>
-      Core.typePair $ Core.pairType
-        (encoderFullResultType @@ Core.pairTypeFirst (var "pt"))
-        (encoderFullResultType @@ Core.pairTypeSecond (var "pt")),
-    _Type_record>>: constant (Core.typeVariable (var "ename")),
-    _Type_set>>: "elemType" ~>
-      Core.typeSet (encoderFullResultType @@ var "elemType"),
-    _Type_union>>: constant (Core.typeVariable (var "ename")),
-    _Type_unit>>: constant Core.typeUnit,
-    _Type_variable>>: "name" ~>
-      Core.typeVariable (var "name"),
-    _Type_void>>: constant Core.typeVoid,
-    _Type_wrap>>: constant (Core.typeVariable (var "ename"))]
-
--- | Build the encoder function type for a given type
--- For monomorphic types: InputType -> Term
--- For polymorphic types: (a -> Term) -> ... -> InputType<a,...> -> Term
-encoderTypeNamed :: TTermDefinition (Name -> Type -> Type)
-encoderTypeNamed = define "encoderTypeNamed" $
-  doc "Build encoder function type with element name for nominal types" $
-  "ename" ~> "typ" ~>
-  "resultType" <~ (encoderFullResultTypeNamed @@ var "ename" @@ var "typ") $
-  "baseType" <~ (Core.typeFunction $ Core.functionType
-    (var "resultType")
-    (Core.typeVariable (Core.nameLift _Term))) $
-  prependForallEncoders @@ var "baseType" @@ var "typ"
-
-encoderType :: TTermDefinition (Type -> Type)
-encoderType = define "encoderType" $
-  doc "Build encoder function type" $
-  "typ" ~>
-  "resultType" <~ (encoderFullResultType @@ var "typ") $
-  "baseType" <~ (Core.typeFunction $ Core.functionType
-    (var "resultType")
-    (Core.typeVariable (Core.nameLift _Term))) $
-  prependForallEncoders @@ var "baseType" @@ var "typ"
-
--- | Prepend encoder types for forall parameters
--- For forall a. T: prepends (a -> Term) -> to the base type
-prependForallEncoders :: TTermDefinition (Type -> Type -> Type)
-prependForallEncoders = define "prependForallEncoders" $
-  doc "Prepend encoder types for forall parameters to base type" $
-  "baseType" ~> "typ" ~> cases _Type (var "typ") (Just $ var "baseType") [
-    _Type_annotated>>: "at" ~>
-      prependForallEncoders @@ var "baseType" @@ Core.annotatedTypeBody (var "at"),
-    _Type_forall>>: "ft" ~>
-      Core.typeFunction $ Core.functionType
-        (Core.typeFunction $ Core.functionType
-          (Core.typeVariable (Core.forallTypeParameter (var "ft")))
-          (Core.typeVariable (Core.nameLift _Term)))
-        (prependForallEncoders @@ var "baseType" @@ Core.forallTypeBody (var "ft"))]
-
--- | Generate a fully qualified binding name for an encoder function from a type name
--- For example, "hydra.core.Name" -> "hydra.encode.core.name"
--- For local types (no namespace), returns just the decapitalized local name
-encodeBindingName :: TTermDefinition (Name -> Name)
-encodeBindingName = define "encodeBindingName" $
-  doc "Generate a binding name for an encoder function from a type name" $
-  "n" ~>
-  "parts" <~ (Strings.splitOn (string ".") (Core.unName (var "n"))) $
-  "localPart" <~ (Formatting.decapitalize @@ (Names.localNameOf @@ (var "n"))) $
-  "localResult" <~ (Core.name (var "localPart")) $
-  -- Extract namespace parts (all but the last); if the name has no namespace,
-  -- fall back to the bare decapitalized local name.
-  Maybes.maybe
-    (var "localResult")
-    ("nsParts" ~>
-      Maybes.maybe
-        (var "localResult")  -- unreachable: nsParts empty means no namespace
-        ("nsUc" ~>
-          "tail" <~ Pairs.second (var "nsUc") $
-          Core.name (Strings.intercalate (string ".") (Lists.concat2
-            (list [string "hydra", string "encode"])
-            (Lists.concat2
-              (var "tail")
-              (list [var "localPart"])))))
-        (Lists.uncons $ var "nsParts"))
-    (Lists.maybeInit $ var "parts")
-
--- | Generate the encoder term for a field value
--- Creates a lambda that encodes the field value and wraps in an encoded union/injection
-encodeFieldValue :: TTermDefinition (Name -> Name -> Type -> Term)
-encodeFieldValue = define "encodeFieldValue" $
-  doc "Generate the encoder for a field's value" $
-  "typeName" ~> "fieldName" ~> "fieldType" ~>
-    -- Create a lambda that encodes the value and wraps in Term.union with injection
-    -- Note: use "y" instead of "v" to avoid shadowing type variable parameters named "v"
-    DC.lambda "y" $
-      -- Build Term.union containing an encoded Injection with the encoded value
-      DC.injection _Term (DC.field _Term_inject
-        (encodeInjection @@ var "typeName" @@ var "fieldName"
-          @@ ((encodeType @@ var "fieldType") @@@ DC.var "y")))
-
--- | Encode an Injection as a Term (produces a Record of type hydra.core.Injection)
-encodeInjection :: TTermDefinition (Name -> Name -> Term -> Term)
-encodeInjection = define "encodeInjection" $
-  doc "Encode an Injection as a term" $
-  "typeName" ~> "fieldName" ~> "fieldTerm" ~> DC.record _Injection [
-    DC.field _Injection_typeName (encodeName @@ var "typeName"),
-    DC.field _Injection_field (encodeField @@ var "fieldName" @@ var "fieldTerm")]
-  where
-    -- Encode a Field as a Term (produces a Record of type hydra.core.Field)
-    encodeField :: TTerm (Name -> Term -> Term)
-    encodeField = "fname" ~> "fterm" ~> DC.record _Field [
-      DC.field _Field_name (encodeName @@ var "fname"),
-      DC.field _Field_term (var "fterm")]
-
--- | Generate an encoder for a literal type
--- For literals, the input is a native Haskell value (e.g., String, Int32).
--- We need to wrap it in encoded TermLiteral with the appropriate Literal constructor.
-encodeLiteralType :: TTermDefinition (LiteralType -> Term)
-encodeLiteralType = define "encodeLiteralType" $
-  doc "Generate an encoder for a literal type" $
-  match _LiteralType (Just identityEncoder) [
-    _LiteralType_binary>>: constant $
-      DC.lambda "x" $ termLiteral $ DC.injection _Literal (DC.field _Literal_binary (DC.var "x")),
-    _LiteralType_boolean>>: constant $
-      DC.lambda "x" $ termLiteral $ DC.injection _Literal (DC.field _Literal_boolean (DC.var "x")),
-    _LiteralType_decimal>>: constant $
-      DC.lambda "x" $ termLiteral $ DC.injection _Literal (DC.field _Literal_decimal (DC.var "x")),
-    _LiteralType_string>>: constant $
-      DC.lambda "x" $ termLiteral $ DC.injection _Literal (DC.field _Literal_string (DC.var "x")),
-    -- For integer types, wrap in Term.literal.integer with the specific integer variant
-    _LiteralType_integer>>: "intType" ~>
-      DC.lambda "x" $ termLiteral $ DC.injection _Literal
-        (DC.field _Literal_integer (encodeIntegerValue @@ var "intType" @@ DC.var "x")),
-    -- For float types, wrap in Term.literal.float with the specific float variant
-    _LiteralType_float>>: "floatType" ~>
-      DC.lambda "x" $ termLiteral $ DC.injection _Literal
-        (DC.field _Literal_float (encodeFloatValue @@ var "floatType" @@ DC.var "x"))]
-  where
-    -- Helper to wrap a Literal value in Term.literal
-    termLiteral lit = DC.injection _Term (DC.field _Term_literal lit)
-    -- Default: identity (should not be reached for well-formed types)
-    identityEncoder = DC.lambda "x" $ DC.var "x"
-
--- | Transform a type module into an encoder module
--- Returns Nothing if the module has no encodable type definitions
-encodeModule :: TTermDefinition (Context -> Graph -> Module -> Prelude.Either Error (Maybe Module))
-encodeModule = define "encodeModule" $
-  doc "Transform a type module into an encoder module" $
-  "cx" ~> "graph" ~> "mod" ~>
-    "typeBindings" <<~ (filterTypeBindings @@ var "cx" @@ var "graph" @@
-      (Maybes.cat $ Lists.map
-        ("d" ~> cases _Definition (var "d") (Just nothing) [
-          _Definition_type>>: "td" ~>
-            just (Annotations.typeBinding @@ (Packaging.typeDefinitionName $ var "td") @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td"))])
-        (Packaging.moduleDefinitions (var "mod")))) $
-    Logic.ifElse (Lists.null (var "typeBindings"))
-      (right nothing)
-      ("encodedBindings" <<~ Eithers.mapList ("b" ~>
-        Eithers.bimap
-          ("_e" ~> Error.errorDecoding $ var "_e")
-          ("x" ~> var "x")
-          (encodeBinding @@ var "cx" @@ var "graph" @@ var "b")) (var "typeBindings") $
-        -- The encoder module depends on encoder modules for both the type and term dependencies
-        -- E.g., hydra.encode.constraints depends on hydra.encode.core (type dep) and hydra.encode.query (term dep)
-        right (just (Packaging.module_
-          (just (Strings.cat $ list [
-            string "Term encoders for ",
-            Packaging.unNamespace (Packaging.moduleNamespace (var "mod"))]))
-          (encodeNamespace @@ (Packaging.moduleNamespace (var "mod")))
-          -- Transform both type and term dependency namespaces to their encoder namespaces
-          (Lists.nub (Lists.concat2
-            (primitive _lists_map @@ encodeNamespace @@ (Packaging.moduleTypeDependencies (var "mod")))
-            (primitive _lists_map @@ encodeNamespace @@ (Packaging.moduleTermDependencies (var "mod")))))
-          -- The encoder module depends on the original type module
-          (list [Packaging.moduleNamespace (var "mod")])
-          (Lists.map ("b" ~> Packaging.definitionTerm (Packaging.termDefinition
-            (Core.bindingName $ var "b") (Core.bindingTerm $ var "b")
-            (Core.bindingTypeScheme $ var "b")))
-            (var "encodedBindings")))))
-
--- | Encode a Name as a Term (produces a wrapped term of type hydra.core.Name)
-encodeName :: TTermDefinition (Name -> Term)
-encodeName = define "encodeName" $
-  doc "Encode a Name as a term" $
-  "n" ~> DC.wrap _Name (DC.string (Core.unName (var "n")))
-
--- | Generate an encoder module namespace from a source module namespace
--- For example, "hydra.util" -> "hydra.encode.util"
-encodeNamespace :: TTermDefinition (Namespace -> Namespace)
-encodeNamespace = define "encodeNamespace" $
-  doc "Generate an encoder module namespace from a source module namespace" $
-  "ns" ~>
-  "parts" <~ Strings.splitOn (string ".") (Packaging.unNamespace (var "ns")) $
-  "fallback" <~ Packaging.namespace (Packaging.unNamespace (var "ns")) $
-  -- Drop the first segment (e.g. "hydra") and prepend "hydra.encode".
-  Maybes.maybe
-    (var "fallback")
-    ("uc" ~>
-      Packaging.namespace (
-        Strings.cat $ list [
-          string "hydra.encode.",
-          Strings.intercalate (string ".") (Pairs.second $ var "uc")]))
-    (Lists.uncons $ var "parts")
-
--- | Generate an encoder for a record type
--- For records, project each field, encode it, and build an encoded record
-encodeRecordTypeNamed :: TTermDefinition (Name -> [FieldType] -> Term)
-encodeRecordTypeNamed = define "encodeRecordTypeNamed" $
-  doc "Generate an encoder for a record type with the given element name" $
-  "ename" ~> "rt" ~>
-    DC.lambda "x" $
-      DC.injection _Term (DC.field _Term_record
-        (DC.record _Record [
-          DC.field _Record_typeName (encodeName @@ var "ename"),
-          DC.field _Record_fields
-            (DC.list (primitive _lists_map @@ (encodeRecordFieldNamed @@ var "ename" @@ var "rt") @@ var "rt"))]))
-  where
-    encodeRecordFieldNamed :: TTerm (Name -> [FieldType] -> FieldType -> Term)
-    encodeRecordFieldNamed =
-      "tname" ~> "recType" ~> "ft" ~>
-        DC.record _Field [
-          DC.field _Field_name (encodeName @@ Core.fieldTypeName (var "ft")),
-          DC.field _Field_term
-            ((encodeType @@ Core.fieldTypeType (var "ft"))
-              @@@ (projectField (var "tname") (Core.fieldTypeName (var "ft"))
-                    @@@ DC.var "x"))]
-
-    projectField typeName fieldName =
-      Core.termProject $ Core.projection typeName fieldName
-
-encodeRecordType :: TTermDefinition ([FieldType] -> Term)
-encodeRecordType = define "encodeRecordType" $
-  doc "Generate an encoder for a record type (unnamed — should not be called directly)" $
-  "rt" ~> encodeRecordTypeNamed @@ Core.name (string "unknown") @@ var "rt"
-
--- | Generate an encoder term for a given Type, using the element name for record/union/wrap
-encodeTypeNamed :: TTermDefinition (Name -> Type -> Term)
-encodeTypeNamed = define "encodeTypeNamed" $
-  doc "Generate an encoder term for a Type, with the element name for nominal types" $
-  "ename" ~> "typ" ~>
-  cases _Type (var "typ") (Just identityEncoder) [
-    _Type_annotated>>: "at" ~>
-      encodeTypeNamed @@ var "ename" @@ Core.annotatedTypeBody (var "at"),
-    _Type_application>>: "appType" ~>
-      (encodeType @@ Core.applicationTypeFunction (var "appType"))
-        @@@ (encodeType @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      encodeEitherType @@ var "et",
-    _Type_forall>>: "ft" ~>
-      Core.termLambda $ Core.lambda (encodeBindingName @@ Core.forallTypeParameter (var "ft")) nothing
-          (encodeTypeNamed @@ var "ename" @@ Core.forallTypeBody (var "ft")),
-    _Type_function>>: constant identityEncoder,
-    _Type_list>>: "elemType" ~>
-      encodeListType @@ var "elemType",
-    _Type_literal>>: "lt" ~>
-      encodeLiteralType @@ var "lt",
-    _Type_map>>: "mt" ~>
-      encodeMapType @@ var "mt",
-    _Type_maybe>>: "elemType" ~>
-      encodeOptionalType @@ var "elemType",
-    _Type_pair>>: "pt" ~>
-      encodePairType @@ var "pt",
-    _Type_record>>: "rt" ~>
-      encodeRecordTypeNamed @@ var "ename" @@ var "rt",
-    _Type_set>>: "elemType" ~>
-      encodeSetType @@ var "elemType",
-    _Type_union>>: "rt" ~>
-      encodeUnionTypeNamed @@ var "ename" @@ var "rt",
-    _Type_wrap>>: "wt" ~>
-      encodeWrappedTypeNamed @@ var "ename" @@ var "wt",
-    _Type_unit>>: constant $
-      DC.lambda "_" $ DC.injection _Term (DC.field _Term_unit DC.unit),
-    _Type_void>>: constant $
-      DC.lambda "_" $ DC.injection _Term (DC.field _Term_unit DC.unit),
-    _Type_variable>>: "typeName" ~>
-      Core.termVariable (encodeBindingName @@ var "typeName")]
-  where
-    identityEncoder = DC.lambda "x" $ DC.var "x"
-
--- | Generate an encoder term for a given Type (without element name context)
-encodeType :: TTermDefinition (Type -> Term)
-encodeType = define "encodeType" $
-  doc "Generate an encoder term for a Type" $
-  match _Type (Just identityEncoder) [
-    _Type_annotated>>: "at" ~>
-      encodeType @@ Core.annotatedTypeBody (var "at"),
-    _Type_application>>: "appType" ~>
-      (encodeType @@ Core.applicationTypeFunction (var "appType"))
-        @@@ (encodeType @@ Core.applicationTypeArgument (var "appType")),
-    _Type_either>>: "et" ~>
-      encodeEitherType @@ var "et",
-    _Type_forall>>: "ft" ~>
-      encodeForallType @@ var "ft",
-    _Type_function>>: constant identityEncoder,
-    _Type_list>>: "elemType" ~>
-      encodeListType @@ var "elemType",
-    _Type_literal>>: "lt" ~>
-      encodeLiteralType @@ var "lt",
-    _Type_map>>: "mt" ~>
-      encodeMapType @@ var "mt",
-    _Type_maybe>>: "elemType" ~>
-      encodeOptionalType @@ var "elemType",
-    _Type_pair>>: "pt" ~>
-      encodePairType @@ var "pt",
-    _Type_record>>: "rt" ~>
-      encodeRecordType @@ var "rt",
-    _Type_set>>: "elemType" ~>
-      encodeSetType @@ var "elemType",
-    _Type_union>>: "rt" ~>
-      encodeUnionType @@ var "rt",
-    _Type_wrap>>: "wt" ~>
-      encodeWrappedType @@ var "wt",
-    _Type_unit>>: constant $
-      DC.lambda "_" $ DC.injection _Term (DC.field _Term_unit DC.unit),
-    _Type_void>>: constant $
-      DC.lambda "_" $ DC.injection _Term (DC.field _Term_unit DC.unit),
-    _Type_variable>>: "typeName" ~>
-      Core.termVariable (encodeBindingName @@ var "typeName")]
-  where
-    identityEncoder = DC.lambda "x" $ DC.var "x"
-
--- | Generate an encoder for a union type with a given element name
-encodeUnionTypeNamed :: TTermDefinition (Name -> [FieldType] -> Term)
-encodeUnionTypeNamed = define "encodeUnionTypeNamed" $
-  doc "Generate an encoder for a union type with the given element name" $
-  "ename" ~> "rt" ~>
-    Core.termCases $ Core.caseStatement
-        (var "ename")
-        nothing
-        (primitive _lists_map @@
-          ("ft" ~> Core.field
-            (Core.fieldTypeName (var "ft"))
-            (encodeFieldValue
-              @@ var "ename"
-              @@ Core.fieldTypeName (var "ft")
-              @@ Core.fieldTypeType (var "ft")))
-          @@ var "rt")
-
--- | Generate an encoder for a union type (placeholder name)
-encodeUnionType :: TTermDefinition ([FieldType] -> Term)
-encodeUnionType = define "encodeUnionType" $
-  doc "Generate an encoder for a union type (placeholder name)" $
-  "rt" ~> encodeUnionTypeNamed @@ Core.name (string "unknown") @@ var "rt"
-
--- | Generate an encoder for a wrapped type with a given element name
-encodeWrappedTypeNamed :: TTermDefinition (Name -> Type -> Term)
-encodeWrappedTypeNamed = define "encodeWrappedTypeNamed" $
-  doc "Generate an encoder for a wrapped type with the given element name" $
-  "ename" ~> "wt" ~>
-    DC.lambda "x" $
-      DC.injection _Term (DC.field _Term_wrap
-        (DC.record _WrappedTerm [
-          DC.field _WrappedTerm_typeName (encodeName @@ var "ename"),
-          DC.field _WrappedTerm_body
-            ((encodeType @@ var "wt")
-              @@@ (DC.unwrapDynamic (var "ename") @@@ DC.var "x"))]))
-
--- | Generate an encoder for a wrapped type (placeholder name)
-encodeWrappedType :: TTermDefinition (Type -> Term)
-encodeWrappedType = define "encodeWrappedType" $
-  doc "Generate an encoder for a wrapped type (placeholder name)" $
-  "wt" ~> encodeWrappedTypeNamed @@ Core.name (string "unknown") @@ var "wt"
-
--- | Filter bindings to only encodable type definitions
--- A binding is encodable if it is a native type AND is serializable (no function types in dependencies)
-filterTypeBindings :: TTermDefinition (Context -> Graph -> [Binding] -> Prelude.Either Error [Binding])
-filterTypeBindings = define "filterTypeBindings" $
-  doc "Filter bindings to only encodable type definitions" $
-  "cx" ~> "graph" ~> "bindings" ~>
-    -- First filter to native types, then check serializability for each
-    Eithers.map (primitive _maybes_cat) $
-      Eithers.mapList (isEncodableBinding @@ var "cx" @@ var "graph") $
-        primitive _lists_filter @@ Annotations.isNativeType @@ var "bindings"
-
--- | Check if a binding is encodable and return Just binding if so, Nothing otherwise
-isEncodableBinding :: TTermDefinition (Context -> Graph -> Binding -> Prelude.Either Error (Maybe Binding))
-isEncodableBinding = define "isEncodableBinding" $
-  doc "Check if a binding is encodable (serializable type)" $
-  "cx" ~> "graph" ~> "b" ~>
-    "serializable" <<~ Predicates.isSerializableByName @@ var "cx" @@ var "graph" @@ (Core.bindingName (var "b")) $
-    right (Logic.ifElse (var "serializable") (just (var "b")) nothing)
-
--- | Check whether a type is the unit type
-isUnitType_ :: TTermDefinition (Type -> Bool)
-isUnitType_ = define "isUnitType" $
-  doc "Check whether a type is the unit type" $
-  match _Type (Just $ false) [
-    _Type_unit>>: constant true]
-
--- | Encode an integer value based on its integer type
--- Wraps the value in the appropriate IntegerValue variant as an injection
-encodeIntegerValue :: TTermDefinition (IntegerType -> Term -> Term)
-encodeIntegerValue = define "encodeIntegerValue" $
-  doc "Encode an integer value based on its integer type" $
-  "intType" ~> "valTerm" ~>
-    Core.termInject $ Core.injection
-      (Core.nameLift _IntegerValue)
-      (Core.field (intTypeToFieldName @@ var "intType") (var "valTerm"))
-  where
-    intTypeToFieldName :: TTerm (IntegerType -> Name)
-    intTypeToFieldName = match _IntegerType Nothing [
-      _IntegerType_bigint>>: constant $ Core.nameLift _IntegerValue_bigint,
-      _IntegerType_int8>>:   constant $ Core.nameLift _IntegerValue_int8,
-      _IntegerType_int16>>:  constant $ Core.nameLift _IntegerValue_int16,
-      _IntegerType_int32>>:  constant $ Core.nameLift _IntegerValue_int32,
-      _IntegerType_int64>>:  constant $ Core.nameLift _IntegerValue_int64,
-      _IntegerType_uint8>>:  constant $ Core.nameLift _IntegerValue_uint8,
-      _IntegerType_uint16>>: constant $ Core.nameLift _IntegerValue_uint16,
-      _IntegerType_uint32>>: constant $ Core.nameLift _IntegerValue_uint32,
-      _IntegerType_uint64>>: constant $ Core.nameLift _IntegerValue_uint64]
-
--- | Encode a float value based on its float type
--- Wraps the value in the appropriate FloatValue variant as an injection
-encodeFloatValue :: TTermDefinition (FloatType -> Term -> Term)
-encodeFloatValue = define "encodeFloatValue" $
-  doc "Encode a float value based on its float type" $
-  "floatType" ~> "valTerm" ~>
-    Core.termInject $ Core.injection
-      (Core.nameLift _FloatValue)
-      (Core.field (floatTypeToFieldName @@ var "floatType") (var "valTerm"))
-  where
-    floatTypeToFieldName :: TTerm (FloatType -> Name)
-    floatTypeToFieldName = match _FloatType Nothing [
-      _FloatType_bigfloat>>: constant $ Core.nameLift _FloatValue_bigfloat,
-      _FloatType_float32>>:  constant $ Core.nameLift _FloatValue_float32,
-      _FloatType_float64>>:  constant $ Core.nameLift _FloatValue_float64]
-
--- | Generate an encoder for a list type
--- Maps the element encoder over the list and wraps in Term.list
-encodeListType :: TTermDefinition (Type -> Term)
-encodeListType = define "encodeListType" $
-  doc "Generate an encoder for a list type" $
-  "elemType" ~>
-    DC.lambda "xs" $
-      DC.injection _Term (DC.field _Term_list
-        (DC.primitiveEncoded _lists_map @@@ (encodeType @@ var "elemType") @@@ DC.var "xs"))
-
--- | Generate an encoder for a map type
--- Encodes each key/value pair and wraps in Term.map
-encodeMapType :: TTermDefinition (MapType -> Term)
-encodeMapType = define "encodeMapType" $
-  doc "Generate an encoder for a map type" $
-  "mt" ~>
-    DC.lambda "m" $
-      DC.injection _Term (DC.field _Term_map
-        (DC.primitiveEncoded _maps_bimap
-          @@@ (encodeType @@ Core.mapTypeKeys (var "mt"))
-          @@@ (encodeType @@ Core.mapTypeValues (var "mt"))
-          @@@ DC.var "m"))
-
--- | Generate an encoder for an Either type
--- Generates a case match over Left/Right variants
-encodeEitherType :: TTermDefinition (EitherType -> Term)
-encodeEitherType = define "encodeEitherType" $
-  doc "Generate an encoder for an Either type" $
-  "et" ~>
-    DC.lambda "e" $
-      DC.injection _Term (DC.field _Term_either
-        (DC.primitiveEncoded _eithers_bimap
-          @@@ (encodeType @@ Core.eitherTypeLeft (var "et"))
-          @@@ (encodeType @@ Core.eitherTypeRight (var "et"))
-          @@@ DC.var "e"))
-
--- | Generate an encoder for a polymorphic (forall) type
--- For a type like `forall a. T[a]`, generates a lambda that takes an encoder for `a`
--- and returns an encoder for the body type `T[a]`
-encodeForallType :: TTermDefinition (ForallType -> Term)
-encodeForallType = define "encodeForallType" $
-  doc "Generate an encoder for a polymorphic (forall) type" $
-  "ft" ~>
-    -- Generate a lambda that takes an encoder for the type parameter
-    Core.termLambda $ Core.lambda
-        (encodeBindingName @@ Core.forallTypeParameter (var "ft"))
-        nothing
-        (encodeType @@ Core.forallTypeBody (var "ft"))
-
--- | Generate an encoder for a Maybe type
--- Encodes the inner value if present and wraps in Term.maybe
-encodeOptionalType :: TTermDefinition (Type -> Term)
-encodeOptionalType = define "encodeOptionalType" $
-  doc "Generate an encoder for a Maybe type" $
-  "elemType" ~> DC.lambda "opt" $
-    DC.injection _Term (DC.field _Term_maybe
-      (DC.primitiveEncoded _maybes_map @@@ (encodeType @@ var "elemType") @@@ DC.var "opt"))
-
--- | Generate an encoder for a pair type
--- Encodes both elements and wraps in Term.pair
-encodePairType :: TTermDefinition (PairType -> Term)
-encodePairType = define "encodePairType" $
-  doc "Generate an encoder for a pair type" $
-  "pt" ~> DC.lambda "p" $ DC.injection _Term $ DC.field _Term_pair $ DC.primitiveEncoded _pairs_bimap
-    @@@ (encodeType @@ Core.pairTypeFirst (var "pt"))
-    @@@ (encodeType @@ Core.pairTypeSecond (var "pt"))
-    @@@ DC.var "p"
-
--- | Generate an encoder for a set type
--- Encodes each element and wraps in Term.set
-encodeSetType :: TTermDefinition (Type -> Term)
-encodeSetType = define "encodeSetType" $
-  doc "Generate an encoder for a set type" $
-  "elemType" ~> DC.lambda "s" $
-    DC.injection _Term (DC.field _Term_set
-      (DC.primitiveEncoded _sets_map @@@ (encodeType @@ var "elemType") @@@ DC.var "s"))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Environment.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Environment.hs
+++ /dev/null
@@ -1,263 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Environment where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  definitionAsTypeApplicationTerm,
-  graphAsLet,
-  graphAsTerm,
-  graphAsTypes,
-  partitionDefinitions,
-  reorderDefs,
-  schemaGraphToTypingEnvironment,
-  termAsBindings,
-  typesToDefinitions,
-  withLambdaContext,
-  withLetContext,
-  withTypeLambdaContext)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Scoping      as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Sorting      as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Strip        as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables    as Variables
-
-import qualified Hydra.Sources.Decode.Core  as DecodeCore
-import qualified Hydra.Sources.Encode.Core  as EncodeCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.environment"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Lexical.ns, moduleNamespace DecodeCore.module_, moduleNamespace EncodeCore.module_, Scoping.ns, Sorting.ns, Strip.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Graph to type environment conversions")}
-  where
-    definitions = [
-      toDefinition definitionAsTypeApplicationTerm,
-      toDefinition graphAsLet,
-      toDefinition graphAsTerm,
-      toDefinition graphAsTypes,
-      toDefinition partitionDefinitions,
-      toDefinition reorderDefs,
-      toDefinition schemaGraphToTypingEnvironment,
-      toDefinition termAsBindings,
-      toDefinition typesToDefinitions,
-      toDefinition withLambdaContext,
-      toDefinition withLetContext,
-      toDefinition withTypeLambdaContext]
-
-definitionAsTypeApplicationTerm :: TTermDefinition (Binding -> Either Error TypeApplicationTerm)
-definitionAsTypeApplicationTerm = define "definitionAsTypeApplicationTerm" $
-  doc "Convert a definition to a typed term" $
-  "el" ~>
-  Maybes.maybe (Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "typed binding") (string "untyped binding")) (var "cx"))
-    ("ts" ~> right (Core.typeApplicationTerm (Core.bindingTerm (var "el")) (Core.typeSchemeBody (var "ts"))))
-    (Core.bindingTypeScheme (var "el"))
-
-graphAsLet :: TTermDefinition ([Binding] -> Term -> Let)
-graphAsLet = define "graphAsLet" $
-  doc "Convert bindings and a body to a let expression" $
-  "bindings" ~> "body" ~>
-  Core.let_
-    (var "bindings")
-    (var "body")
-
-graphAsTerm :: TTermDefinition ([Binding] -> Term -> Term)
-graphAsTerm = define "graphAsTerm" $
-  doc "Convert bindings and a body to a term, using let-term duality" $
-  "bindings" ~> "body" ~> Core.termLet (graphAsLet @@ var "bindings" @@ var "body")
-
-graphAsTypes :: TTermDefinition (Graph -> [Binding] -> Either DecodingError (M.Map Name Type))
-graphAsTypes = define "graphAsTypes" $
-  doc "Decode a list of type-encoding bindings into a map of named types" $
-  "graph" ~> "els" ~>
-  "toPair" <~ ("el" ~>
-    Eithers.map
-      ("typ" ~> pair (Core.bindingName $ var "el") (var "typ"))
-      (decoderFor _Type @@ var "graph" @@ (Core.bindingTerm $ var "el"))) $
-  Eithers.map (unaryFunction Maps.fromList) (Eithers.mapList (var "toPair") (var "els"))
-
-partitionDefinitions :: TTermDefinition ([Definition] -> ([TypeDefinition], [TermDefinition]))
-partitionDefinitions = define "partitionDefinitions" $
-  doc "Partition a list of definitions into type definitions and term definitions" $
-  "defs" ~>
-  "getType" <~ ("def" ~> cases _Definition (var "def") Nothing [
-    _Definition_type>>: "td" ~> just (var "td"),
-    _Definition_term>>: "_" ~> nothing]) $
-  "getTerm" <~ ("def" ~> cases _Definition (var "def") Nothing [
-    _Definition_type>>: "_" ~> nothing,
-    _Definition_term>>: "td" ~> just (var "td")]) $
-  pair
-    (Maybes.cat $ Lists.map (var "getType") (var "defs"))
-    (Maybes.cat $ Lists.map (var "getTerm") (var "defs"))
-
-reorderDefs :: TTermDefinition ([Definition] -> [Definition])
-reorderDefs = define "reorderDefs" $
-  doc "Reorder definitions: types first (with hydra.core.Name first among types), then topologically sorted terms" $
-  "defs" ~>
-    "partitioned" <~ (partitionDefinitions @@ var "defs") $
-    "typeDefsRaw" <~ Pairs.first (var "partitioned") $
-    -- Sort type defs: Name type first (it is referenced by almost everything else)
-    "nameFirst" <~ Lists.filter
-      ("td" ~> Equality.equal
-        (project _TypeDefinition _TypeDefinition_name @@ var "td")
-        (wrap _Name $ string "hydra.core.Name"))
-      (var "typeDefsRaw") $
-    "nameRest" <~ Lists.filter
-      ("td" ~> Logic.not $ Equality.equal
-        (project _TypeDefinition _TypeDefinition_name @@ var "td")
-        (wrap _Name $ string "hydra.core.Name"))
-      (var "typeDefsRaw") $
-    "typeDefs" <~ Lists.concat (list [
-      Lists.map ("td" ~> inject _Definition _Definition_type (var "td")) (var "nameFirst"),
-      Lists.map ("td" ~> inject _Definition _Definition_type (var "td")) (var "nameRest")]) $
-    "termDefsWrapped" <~ Lists.map ("td" ~> inject _Definition _Definition_term (var "td"))
-      (Pairs.second (var "partitioned")) $
-    -- Topologically sort term definitions by free variable dependencies
-    "sortedTermDefs" <~ (Lists.concat $ Sorting.topologicalSortNodes @@
-      ("d" ~> cases _Definition (var "d") Nothing [
-        _Definition_term>>: "td" ~> project _TermDefinition _TermDefinition_name @@ var "td"])
-      @@
-      ("d" ~> cases _Definition (var "d") (Just (list ([] :: [TTerm Name]))) [
-        _Definition_term>>: "td" ~>
-          Sets.toList $ Variables.freeVariablesInTerm @@ (project _TermDefinition _TermDefinition_term @@ var "td")])
-      @@ var "termDefsWrapped") $
-    Lists.concat (list [var "typeDefs", var "sortedTermDefs"])
-
-schemaGraphToTypingEnvironment :: TTermDefinition (Graph -> Either Error (M.Map Name TypeScheme))
-schemaGraphToTypingEnvironment = define "schemaGraphToTypingEnvironment" $
-  doc "Convert a schema graph to a typing environment (Either version)" $
-  "g" ~>
-  "toTypeScheme" <~ ("vars" ~> "typ" ~> cases _Type (Strip.deannotateType @@ var "typ")
-    (Just (Core.typeScheme (Lists.reverse (var "vars")) (var "typ") Phantoms.nothing)) [
-    _Type_forall>>: "ft" ~> var "toTypeScheme"
-      @@ Lists.cons (Core.forallTypeParameter (var "ft")) (var "vars")
-      @@ Core.forallTypeBody (var "ft")]) $
-  "decodeType" <~ ("term" ~>
-    Eithers.bimap ("_e" ~> Error.errorDecoding $ var "_e") ("_a" ~> var "_a")
-        (decoderFor _Type @@ var "g" @@ var "term")) $
-  "decodeTypeScheme" <~ ("term" ~>
-    Eithers.bimap ("_e" ~> Error.errorDecoding $ var "_e") ("_a" ~> var "_a")
-        (decoderFor _TypeScheme @@ var "g" @@ var "term")) $
-  "toPair" <~ ("el" ~>
-    "forTerm" <~ ("term" ~> cases _Term (var "term") (Just (right nothing)) [
-      _Term_record>>: "r" ~>
-        Logic.ifElse
-          (Equality.equal (Core.recordTypeName (var "r")) (Core.nameLift _TypeScheme))
-          (Eithers.map (unaryFunction just) (var "decodeTypeScheme" @@ Core.bindingTerm (var "el")))
-          (right nothing),
-      _Term_inject>>: "i" ~>
-        Logic.ifElse (Equality.equal (Core.injectionTypeName (var "i")) (Core.nameLift _Type))
-          (Eithers.map
-            ("decoded" ~> just (var "toTypeScheme" @@ list ([] :: [TTerm Name]) @@ var "decoded"))
-            (var "decodeType" @@ Core.bindingTerm (var "el")))
-          (right nothing)]) $
-    "mts" <<~  optCases (Core.bindingTypeScheme (var "el"))
-      (Eithers.map ("typ" ~> just $ Scoping.fTypeToTypeScheme @@ var "typ") $ var "decodeType" @@ (Core.bindingTerm (var "el")))
-      ("ts" ~> Logic.ifElse
-        (Equality.equal (var "ts") (Core.typeScheme (list ([] :: [TTerm Name])) (Core.typeVariable (Core.nameLift _TypeScheme)) Phantoms.nothing))
-        (Eithers.map (unaryFunction just) (var "decodeTypeScheme" @@ Core.bindingTerm (var "el")))
-        (Logic.ifElse
-          (Equality.equal (var "ts") (Core.typeScheme (list ([] :: [TTerm Name])) (Core.typeVariable (Core.nameLift _Type)) Phantoms.nothing))
-          (Eithers.map ("decoded" ~> just (var "toTypeScheme" @@ list ([] :: [TTerm Name]) @@ var "decoded")) (var "decodeType" @@ Core.bindingTerm (var "el")))
-          (var "forTerm" @@ (Strip.deannotateTerm @@ (Core.bindingTerm (var "el")))))) $
-    right $ Maybes.map ("ts" ~> pair (Core.bindingName (var "el")) (var "ts")) (var "mts")) $
-  Eithers.map ("mpairs" ~> Maps.fromList (Maybes.cat (var "mpairs")))
-    (Eithers.mapList (var "toPair") (Lexical.graphToBindings @@ var "g"))
-
--- Note: this is lossy, as it throws away the term body
-termAsBindings :: TTermDefinition (Term -> [Binding])
-termAsBindings = define "termAsBindings" $
-  doc "Extract the bindings from a let term, or return an empty list for other terms" $
-  "term" ~> cases _Term (Strip.deannotateTerm @@ var "term")
-    (Just (list ([] :: [TTerm Binding]))) [
-    _Term_let>>: "lt" ~> Core.letBindings (var "lt")]
-
-typesToDefinitions :: TTermDefinition (M.Map Name Type -> [Binding])
-typesToDefinitions = define "typesToDefinitions" $
-  doc "Encode a map of named types to a list of bindings" $
-  "typeMap" ~>
-  "toElement" <~ ("pair" ~>
-    "name" <~ Pairs.first (var "pair") $
-    Core.binding
-      (var "name")
-      (encoderFor _Type @@ (Pairs.second $ var "pair"))
-      nothing) $
-  Lists.map (var "toElement") $ Maps.toList $ var "typeMap"
-
-withLambdaContext :: TTermDefinition ((e -> Graph) -> (Graph -> e -> f) -> e -> Lambda -> (f -> a) -> a)
-withLambdaContext = define "withLambdaContext" $
-  doc "Execute a computation in the context of a lambda body, extending the type context with the lambda parameter" $
-  "getContext" ~> "setContext" ~> "env" ~> "lam" ~> "body" ~>
-  "newContext" <~ Scoping.extendGraphForLambda @@ (var "getContext" @@ var "env") @@ var "lam" $
-  var "body" @@ (var "setContext" @@ var "newContext" @@ var "env")
-
-withLetContext :: TTermDefinition ((e -> Graph) -> (Graph -> e -> f) -> (Graph -> Binding -> Maybe Term) -> e -> Let -> (f -> a) -> a)
-withLetContext = define "withLetContext" $
-  doc "Execute a computation in the context of a let body, extending the type context with the let bindings" $
-  "getContext" ~> "setContext" ~> "forBinding" ~> "env" ~> "letrec" ~> "body" ~>
-  "newContext" <~ Scoping.extendGraphForLet @@ var "forBinding" @@ (var "getContext" @@ var "env") @@ var "letrec" $
-  var "body" @@ (var "setContext" @@ var "newContext" @@ var "env")
-
-withTypeLambdaContext :: TTermDefinition ((e -> Graph) -> (Graph -> e -> f) -> e -> TypeLambda -> (f -> a) -> a)
-withTypeLambdaContext = define "withTypeLambdaContext" $
-  doc "Execute a computation in the context of a type lambda body, extending the type context with the type parameter" $
-  "getContext" ~> "setContext" ~> "env" ~> "tlam" ~> "body" ~>
-  "newContext" <~ Scoping.extendGraphForTypeLambda @@ (var "getContext" @@ var "env") @@ var "tlam" $
-  var "body" @@ (var "setContext" @@ var "newContext" @@ var "env")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Extract/Core.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Extract/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Extract/Core.hs
+++ /dev/null
@@ -1,947 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Kernel.Terms.Extract.Core where
-
--- Standard imports for kernel terms modules (slightly modified for conflict avoidance)
-import Hydra.Kernel hiding (lambdaBody, map, setType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms hiding (
-  bigfloat, bigint, binary, boolean, cases, decimal, field, float32, float64, floatValue, injection, int8, int16, int32, int64,
-  integerValue, lambda, list, literal, map, pair, set, record, string, unit, wrap, uint8, uint16, uint32, uint64)
-import qualified Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), map)
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Scientific             as Sci
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-
-import qualified Hydra.Dsl.Meta.DeepCore as DC
-import           Hydra.Dsl.Meta.DeepCore ((@@@))
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
-
--- Helper for Either-based unexpected errors
--- Uses ExtractionError.UnexpectedShape wrapped in Error.Extraction
-unexpected :: TTerm String -> TTerm String -> TTerm (Prelude.Either Error a)
-unexpected expected actual = left
-  (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError expected actual)
-
-ns :: Namespace
-ns = Namespace "hydra.extract.core"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Lexical.ns, Strip.ns, ShowCore.ns, ShowError.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Extraction and validation for hydra.core types")}
-  where
-   definitions = [
-     toDefinition bigfloat,
-     toDefinition bigfloatValue,
-     toDefinition bigint,
-     toDefinition bigintValue,
-     toDefinition binary,
-     toDefinition binaryLiteral,
-     toDefinition boolean,
-     toDefinition booleanLiteral,
-     toDefinition caseField,
-     toDefinition cases,
-     toDefinition decimal,
-     toDefinition decimalLiteral,
-     toDefinition decodeEither,
-     toDefinition decodeList,
-     toDefinition decodeMap,
-     toDefinition decodeMaybe,
-     toDefinition decodePair,
-     toDefinition decodeSet,
-     toDefinition decodeUnit,
-     toDefinition decodeWrapped,
-     toDefinition stripWithDecodingError,
-     toDefinition field,
-     toDefinition float32,
-     toDefinition float32Value,
-     toDefinition float64,
-     toDefinition float64Value,
-     toDefinition floatLiteral,
-     toDefinition floatValue,
-     toDefinition eitherTerm,
-     toDefinition eitherType,
-     toDefinition functionType,
-     toDefinition injection,
-     toDefinition int16,
-     toDefinition int16Value,
-     toDefinition int32,
-     toDefinition int32Value,
-     toDefinition int64,
-     toDefinition int64Value,
-     toDefinition int8,
-     toDefinition int8Value,
-     toDefinition integerLiteral,
-     toDefinition integerValue,
-     toDefinition lambdaBody,
-     toDefinition lambda,
-     toDefinition letBinding,
-     toDefinition let_,
-     toDefinition list,
-     toDefinition listHead,
-     toDefinition listOf,
-     toDefinition listType,
-     toDefinition literal,
-     toDefinition map,
-     toDefinition mapType,
-     toDefinition nArgs,
-     toDefinition maybeTerm,
-     toDefinition maybeType,
-     toDefinition pair,
-     toDefinition record,
-     toDefinition recordType,
-     toDefinition requireField,
-     toDefinition set,
-     toDefinition setOf,
-     toDefinition setType,
-     toDefinition string,
-     toDefinition stringLiteral,
-     toDefinition termRecord,
-     toDefinition toFieldMap,
-     toDefinition uint16,
-     toDefinition uint16Value,
-     toDefinition uint32,
-     toDefinition uint32Value,
-     toDefinition uint64,
-     toDefinition uint64Value,
-     toDefinition uint8,
-     toDefinition uint8Value,
-     toDefinition unionType,
-     toDefinition unit,
-     toDefinition unitVariant,
-     toDefinition wrap,
-     toDefinition wrappedType]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-bigfloat :: TTermDefinition (Graph -> Term -> Prelude.Either Error Double)
-bigfloat = define "bigfloat" $
-  doc "Extract an arbitrary-precision floating-point value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "f" <<~ floatLiteral @@ var "l" $
-  bigfloatValue @@ var "f"
-
-bigfloatValue :: TTermDefinition (FloatValue -> Prelude.Either Error Double)
-bigfloatValue = define "bigfloatValue" $
-  doc "Extract a bigfloat value from a FloatValue" $
-  "v" ~> Phantoms.cases _FloatValue (var "v")
-    (Just (unexpected(Phantoms.string "bigfloat") (ShowCore.floatValue @@ var "v"))) [
-    _FloatValue_bigfloat>>: "f" ~> right (var "f")]
-
-bigint :: TTermDefinition (Graph -> Term -> Prelude.Either Error Integer)
-bigint = define "bigint" $
-  doc "Extract an arbitrary-precision integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  bigintValue @@ var "i"
-
-bigintValue :: TTermDefinition (IntegerValue -> Prelude.Either Error Integer)
-bigintValue = define "bigintValue" $
-  doc "Extract a bigint value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "bigint") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_bigint>>: "i" ~> right (var "i")]
-
-binary :: TTermDefinition (Graph -> Term -> Prelude.Either Error String)
-binary = define "binary" $
-  doc "Extract a binary data value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  binaryLiteral @@ var "l"
-
-binaryLiteral :: TTermDefinition (Literal -> Prelude.Either Error String)
-binaryLiteral = define "binaryLiteral" $
-  doc "Extract a binary literal from a Literal value" $
-  "v" ~> Phantoms.cases _Literal (var "v")
-    (Just (unexpected(Phantoms.string "binary") (ShowCore.literal @@ var "v"))) [
-    _Literal_binary>>: "b" ~> right (var "b")]
-
-boolean :: TTermDefinition (Graph -> Term -> Prelude.Either Error Bool)
-boolean = define "boolean" $
-  doc "Extract a boolean value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  booleanLiteral @@ var "l"
-
-booleanLiteral :: TTermDefinition (Literal -> Prelude.Either Error Bool)
-booleanLiteral = define "booleanLiteral" $
-  doc "Extract a boolean literal from a Literal value" $
-  "v" ~> Phantoms.cases _Literal (var "v")
-    (Just (unexpected(Phantoms.string "boolean") (ShowCore.literal @@ var "v"))) [
-    _Literal_boolean>>: "b" ~> right (var "b")]
-
-decimal :: TTermDefinition (Graph -> Term -> Prelude.Either Error Sci.Scientific)
-decimal = define "decimal" $
-  doc "Extract an arbitrary-precision decimal value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  decimalLiteral @@ var "l"
-
-decimalLiteral :: TTermDefinition (Literal -> Prelude.Either Error Sci.Scientific)
-decimalLiteral = define "decimalLiteral" $
-  doc "Extract a decimal literal from a Literal value" $
-  "v" ~> Phantoms.cases _Literal (var "v")
-    (Just (unexpected(Phantoms.string "decimal") (ShowCore.literal @@ var "v"))) [
-    _Literal_decimal>>: "d" ~> right (var "d")]
-
--- TODO: nonstandard; move me
-caseField :: TTermDefinition (Name -> String -> Graph -> Term -> Prelude.Either Error Field)
-caseField = define "caseField" $
-  doc "Extract a specific case handler from a case statement term" $
-  "name" ~> "n" ~> "graph" ~> "term" ~>
-  "fieldName" <~ Core.name (var "n") $
-  "cs" <<~ cases @@ var "name" @@ var "graph" @@ var "term" $
-  "matching" <~ (Lists.find
-    ("f" ~> Core.equalName_ (Core.fieldName (var "f")) (var "fieldName"))
-    (Core.caseStatementCases (var "cs"))) $
-  Maybes.maybe
-    (left (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (Phantoms.string "matching case") (Phantoms.string "no matching case")))
-    ("mf" ~> right $ var "mf")
-    (var "matching")
-
--- TODO: nonstandard; move me
-cases :: TTermDefinition (Name -> Graph -> Term -> Prelude.Either Error CaseStatement)
-cases = define "cases" $
-  doc "Extract case statement from a term" $
-  "name" ~> "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "case statement") (ShowCore.term @@ var "term"))) [
-    _Term_cases>>: "cs" ~>
-      Logic.ifElse (Core.equalName_ (Core.caseStatementTypeName (var "cs")) (var "name"))
-        (right (var "cs"))
-        (unexpected
-          (Phantoms.string "case statement for type " ++ (Core.unName (var "name")))
-          (ShowCore.term @@ var "term"))]
-
--- TODO: nonstandard; move me
-field :: TTermDefinition (Name -> (Term -> Prelude.Either Error x) -> Graph -> [Field] -> Prelude.Either Error x)
-field = define "field" $
-  doc "Extract a field value from a list of fields" $
-  "fname" ~> "mapping" ~> "graph" ~> "fields" ~>
-  "matchingFields" <~ Lists.filter
-    ("f" ~> Core.equalName_ (Core.fieldName (var "f")) (var "fname"))
-    (var "fields") $
-  "noMatchErr" <~ (unexpected(Phantoms.string "field " ++ (Core.unName (var "fname"))) (Phantoms.string "no matching field")) $
-  Logic.ifElse (Lists.null (var "matchingFields"))
-    (var "noMatchErr")
-    (Logic.ifElse (Equality.equal (Lists.length (var "matchingFields")) $ Phantoms.int32 1)
-      (Maybes.maybe
-        (var "noMatchErr")
-        ("mf" ~>
-          "stripped" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ (Core.fieldTerm $ var "mf") $
-          var "mapping" @@ var "stripped")
-        (Lists.maybeHead $ var "matchingFields"))
-      (unexpected(Phantoms.string "single field") (Phantoms.string "multiple fields named " ++ (Core.unName (var "fname")))))
-
-float32 :: TTermDefinition (Graph -> Term -> Prelude.Either Error Float)
-float32 = define "float32" $
-  doc "Extract a 32-bit floating-point value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "f" <<~ floatLiteral @@ var "l" $
-  float32Value @@ var "f"
-
-float32Value :: TTermDefinition (FloatValue -> Prelude.Either Error Float)
-float32Value = define "float32Value" $
-  doc "Extract a float32 value from a FloatValue" $
-  "v" ~> Phantoms.cases _FloatValue (var "v")
-    (Just (unexpected(Phantoms.string "float32") (ShowCore.floatValue @@ var "v"))) [
-    _FloatValue_float32>>: "f" ~> right (var "f")]
-
-float64 :: TTermDefinition (Graph -> Term -> Prelude.Either Error Double)
-float64 = define "float64" $
-  doc "Extract a 64-bit floating-point value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "f" <<~ floatLiteral @@ var "l" $
-  float64Value @@ var "f"
-
-float64Value :: TTermDefinition (FloatValue -> Prelude.Either Error Double)
-float64Value = define "float64Value" $
-  doc "Extract a float64 value from a FloatValue" $
-  "v" ~> Phantoms.cases _FloatValue (var "v")
-    (Just (unexpected(Phantoms.string "float64") (ShowCore.floatValue @@ var "v"))) [
-    _FloatValue_float64>>: "f" ~> right (var "f")]
-
-floatLiteral :: TTermDefinition (Literal -> Prelude.Either Error FloatValue)
-floatLiteral = define "floatLiteral" $
-  doc "Extract a floating-point literal from a Literal value" $
-  "lit" ~> Phantoms.cases _Literal (var "lit")
-    (Just (unexpected(Phantoms.string "floating-point value") (ShowCore.literal @@ var "lit"))) [
-    _Literal_float>>: "v" ~> right (var "v")]
-
-floatValue :: TTermDefinition (Graph -> Term -> Prelude.Either Error FloatValue)
-floatValue = define "floatValue" $
-  doc "Extract a float value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  floatLiteral @@ var "l"
-
-eitherTerm :: TTermDefinition ((Term -> Prelude.Either Error x) -> (Term -> Prelude.Either Error y) -> Graph -> Term -> Prelude.Either Error (Either x y))
-eitherTerm = define "eitherTerm" $
-  doc "Extract an either value from a term, applying functions to the left and right values" $
-  "leftFun" ~> "rightFun" ~> "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected
-      (Phantoms.string "either value")
-      (ShowCore.term @@ var "term"))) [
-    _Term_either>>: "et" ~> Eithers.either_
-      ("l" ~> Eithers.map (unaryFunction left) (var "leftFun" @@ var "l"))
-      ("r" ~> Eithers.map (unaryFunction right) (var "rightFun" @@ var "r"))
-      (var "et")]
-
-eitherType :: TTermDefinition (Type -> Prelude.Either Error EitherType)
-eitherType = define "eitherType" $
-  doc "Extract the left and right types from an either type" $
-  "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "either type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_either>>: "et" ~> right (var "et")]
-
-functionType :: TTermDefinition (Type -> Prelude.Either Error FunctionType)
-functionType = define "functionType" $
-  doc "Extract a function type from a type" $
-  "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "function type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_function>>: "ft" ~> right (var "ft")]
-
--- TODO: nonstandard; move me
-injection :: TTermDefinition (Name -> Graph -> Term -> Prelude.Either Error Field)
-injection = define "injection" $
-  doc "Extract a field from a union term" $
-  "expected" ~> "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "injection") (ShowCore.term @@ var "term"))) [
-    _Term_inject>>: "injection" ~>
-      Logic.ifElse (Core.equalName_ (Core.injectionTypeName (var "injection")) (var "expected"))
-        (right (Core.injectionField (var "injection")))
-        (unexpected
-          (Phantoms.string "injection of type " ++ (Core.unName (var "expected")))
-          (Core.unName (Core.injectionTypeName (var "injection"))))]
-
-int16 :: TTermDefinition (Graph -> Term -> Prelude.Either Error I.Int16)
-int16 = define "int16" $
-  doc "Extract a 16-bit signed integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  int16Value @@ var "i"
-
-int16Value :: TTermDefinition (IntegerValue -> Prelude.Either Error I.Int16)
-int16Value = define "int16Value" $
-  doc "Extract an int16 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "int16") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_int16>>: "i" ~> right (var "i")]
-
-int32 :: TTermDefinition (Graph -> Term -> Prelude.Either Error Int)
-int32 = define "int32" $
-  doc "Extract a 32-bit signed integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  int32Value @@ var "i"
-
-int32Value :: TTermDefinition (IntegerValue -> Prelude.Either Error Int)
-int32Value = define "int32Value" $
-  doc "Extract an int32 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "int32") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_int32>>: "i" ~> right (var "i")]
-
-int64 :: TTermDefinition (Graph -> Term -> Prelude.Either Error I.Int64)
-int64 = define "int64" $
-  doc "Extract a 64-bit signed integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  int64Value @@ var "i"
-
-int64Value :: TTermDefinition (IntegerValue -> Prelude.Either Error I.Int64)
-int64Value = define "int64Value" $
-  doc "Extract an int64 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "int64") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_int64>>: "i" ~> right (var "i")]
-
-int8 :: TTermDefinition (Graph -> Term -> Prelude.Either Error I.Int8)
-int8 = define "int8" $
-  doc "Extract an 8-bit signed integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  int8Value @@ var "i"
-
-int8Value :: TTermDefinition (IntegerValue -> Prelude.Either Error I.Int8)
-int8Value = define "int8Value" $
-  doc "Extract an int8 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "int8") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_int8>>: "i" ~> right (var "i")]
-
-integerLiteral :: TTermDefinition (Literal -> Prelude.Either Error IntegerValue)
-integerLiteral = define "integerLiteral" $
-  doc "Extract an integer literal from a Literal value" $
-  "lit" ~> Phantoms.cases _Literal (var "lit")
-    (Just (unexpected(Phantoms.string "integer value") (ShowCore.literal @@ var "lit"))) [
-    _Literal_integer>>: "v" ~> right (var "v")]
-
-integerValue :: TTermDefinition (Graph -> Term -> Prelude.Either Error IntegerValue)
-integerValue = define "integerValue" $
-  doc "Extract an integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  integerLiteral @@ var "l"
-
-lambdaBody :: TTermDefinition (Graph -> Term -> Prelude.Either Error Term)
-lambdaBody = define "lambdaBody" $
-  doc "Extract the body of a lambda term" $
-  "graph" ~> "term" ~> Eithers.map (unaryFunction Core.lambdaBody) (lambda @@ var "graph" @@ var "term")
-
-lambda :: TTermDefinition (Graph -> Term -> Prelude.Either Error Lambda)
-lambda = define "lambda" $
-  doc "Extract a lambda from a term" $
-  "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "lambda") (ShowCore.term @@ var "term"))) [
-    _Term_lambda>>: "l" ~> right (var "l")]
-
--- TODO: nonstandard; move me
-letBinding :: TTermDefinition (String -> Graph -> Term -> Prelude.Either Error Term)
-letBinding = define "letBinding" $
-  doc "Extract a binding with the given name from a let term" $
-  "n" ~> "graph" ~> "term" ~>
-  "name" <~ Core.name (var "n") $
-  "letExpr" <<~ let_ @@ var "graph" @@ var "term" $
-  "matchingBindings" <~ Lists.filter
-    ("b" ~> Core.equalName_ (Core.bindingName (var "b")) (var "name"))
-    (Core.letBindings (var "letExpr")) $
-  "noBindingErr" <~ (left (Error.errorExtraction $ Error.extractionErrorNoSuchBinding $ Error.noSuchBindingError (var "name"))) $
-  Logic.ifElse (Lists.null (var "matchingBindings"))
-    (var "noBindingErr")
-    (Logic.ifElse (Equality.equal (Lists.length (var "matchingBindings")) $ Phantoms.int32 1)
-      (Maybes.maybe
-        (var "noBindingErr")
-        ("b" ~> right (Core.bindingTerm $ var "b"))
-        (Lists.maybeHead $ var "matchingBindings"))
-      (left (Error.errorExtraction $ Error.extractionErrorMultipleBindings $ Error.multipleBindingsError (var "name"))))
-
-let_ :: TTermDefinition (Graph -> Term -> Prelude.Either Error Let)
-let_ = define "let" $
-  doc "Extract a let expression from a term" $
-  "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "let term") (ShowCore.term @@ var "term"))) [
-    _Term_let>>: "lt" ~> right (var "lt")]
-
-list :: TTermDefinition (Graph -> Term -> Prelude.Either Error [Term])
-list = define "list" $
-  doc "Extract a list of terms from a term" $
-  "graph" ~> "term" ~>
-  "stripped" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term" $
-  Phantoms.cases _Term (var "stripped")
-    (Just (unexpected(Phantoms.string "list") (ShowCore.term @@ var "stripped"))) [
-    _Term_list>>: "l" ~> right (var "l")]
-
-listHead :: TTermDefinition (Graph -> Term -> Prelude.Either Error Term)
-listHead = define "listHead" $
-  doc "Extract the first element of a list term" $
-  "graph" ~> "term" ~>
-  "l" <<~ list @@ var "graph" @@ var "term" $
-  Maybes.maybe
-    (left (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (Phantoms.string "non-empty list") (Phantoms.string "empty list")))
-    ("h" ~> right $ var "h")
-    (Lists.maybeHead $ var "l")
-
-listOf :: TTermDefinition ((Term -> Prelude.Either Error x) -> Graph -> Term -> Prelude.Either Error [x])
-listOf = define "listOf" $
-  doc "Extract a list of values from a term, mapping a function over each element" $
-  "f" ~> "graph" ~> "term" ~>
-  "els" <<~ list @@ var "graph" @@ var "term" $
-  Eithers.mapList (var "f") (var "els")
-
-listType :: TTermDefinition (Type -> Prelude.Either Error Type)
-listType = define "listType" $
-  doc "Extract the element type from a list type" $
-  "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "list type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_list>>: "t" ~> right (var "t")]
-
-literal :: TTermDefinition (Graph -> Term -> Prelude.Either Error Literal)
-literal = define "literal" $
-  doc "Extract a literal value from a term" $
-  "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "literal") (ShowCore.term @@ var "term"))) [
-    _Term_literal>>: "lit" ~> right (var "lit")]
-
-map :: TTermDefinition ((Term -> Prelude.Either Error k) -> (Term -> Prelude.Either Error v) -> Graph -> Term -> Prelude.Either Error (M.Map k v))
-map = define "map" $
-  doc "Extract a map of key-value pairs from a term, mapping functions over each key and value" $
-  "fk" ~> "fv" ~> "graph" ~> "term0" ~>
-  "pair" <~ ("kvPair" ~>
-    "kterm" <~ Pairs.first (var "kvPair") $
-    "vterm" <~ Pairs.second (var "kvPair") $
-    "kval" <<~ var "fk" @@ var "kterm" $
-    "vval" <<~ var "fv" @@ var "vterm" $
-    right (Phantoms.pair (var "kval") (var "vval"))) $
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected
-      (Phantoms.string "map")
-      (ShowCore.term @@ var "term"))) [
-    _Term_map>>: "m" ~> Eithers.map (unaryFunction Maps.fromList) (Eithers.mapList (var "pair") (Maps.toList (var "m")))]
-
-mapType :: TTermDefinition (Type -> Prelude.Either Error MapType)
-mapType = define "mapType" $
-  doc "Extract the key and value types from a map type" $
-  "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "map type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_map>>: "mt" ~> right (var "mt")]
-
--- TODO: nonstandard; move me
-nArgs :: TTermDefinition (Name -> Int -> [a] -> Prelude.Either Error ())
-nArgs = define "nArgs" $
-  doc "Ensure a function has the expected number of arguments" $
-  "name" ~> "n" ~> "args" ~>
-  Logic.ifElse (Equality.equal (Lists.length (var "args")) (var "n"))
-    (right Phantoms.unit)
-    (unexpected(Strings.concat [
-      Literals.showInt32 (var "n"),
-      Phantoms.string " arguments to primitive ",
-      Literals.showString (Core.unName (var "name"))]) (Literals.showInt32 (Lists.length (var "args"))))
-
-maybeTerm :: TTermDefinition ((Term -> Prelude.Either Error x) -> Graph -> Term -> Prelude.Either Error (Maybe x))
-maybeTerm = define "maybeTerm" $
-  doc "Extract an optional value from a term, applying a function to the value if present" $
-  "f" ~> "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected
-      (Phantoms.string "maybe value")
-      (ShowCore.term @@ var "term"))) [
-    _Term_maybe>>: "mt" ~> Maybes.maybe
-      (right nothing)
-      ("t" ~> Eithers.map (unaryFunction just) (var "f" @@ var "t"))
-      (var "mt")]
-
-maybeType :: TTermDefinition (Type -> Prelude.Either Error Type)
-maybeType = define "maybeType" $
-  doc "Extract the base type from an optional type" $
-  "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "maybe type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_maybe>>: "t" ~> right (var "t")]
-
-pair :: TTermDefinition ((Term -> Prelude.Either Error k) -> (Term -> Prelude.Either Error v) -> Graph -> Term -> Prelude.Either Error (k, v))
-pair = define "pair" $
-  doc "Extract a pair of values from a term, applying functions to each component" $
-  "kf" ~> "vf" ~> "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected
-      (Phantoms.string "pair")
-      (ShowCore.term @@ var "term"))) [
-    _Term_pair>>: "p" ~>
-      "kVal" <<~ var "kf" @@ (Pairs.first $ var "p") $
-      "vVal" <<~ var "vf" @@ (Pairs.second $ var "p") $
-      right (Phantoms.pair (var "kVal") (var "vVal"))]
-
--- TODO: nonstandard; move me
-record :: TTermDefinition (Name -> Graph -> Term -> Prelude.Either Error [Field])
-record = define "record" $
-  doc "Extract a record's fields from a term" $
-  "expected" ~> "graph" ~> "term0" ~>
-  "record" <<~ termRecord @@ var "graph" @@ var "term0" $
-  Logic.ifElse (Equality.equal (Core.recordTypeName (var "record")) (var "expected"))
-    (right (Core.recordFields (var "record")))
-    (unexpected
-      (Phantoms.string "record of type " ++ (Core.unName (var "expected")))
-      (Core.unName (Core.recordTypeName (var "record"))))
-
--- TODO: nonstandard; move me
-recordType :: TTermDefinition (Name -> Type -> Prelude.Either Error [FieldType])
-recordType = define "recordType" $
-  doc "Extract the field types from a record type" $
-  "ename" ~> "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "record type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_record>>: "fields" ~> right (var "fields")]
-
-set :: TTermDefinition (Graph -> Term -> Prelude.Either Error (S.Set Term))
-set = define "set" $
-  doc "Extract a set of terms from a term" $
-  "graph" ~> "term" ~>
-  "stripped" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term" $
-  Phantoms.cases _Term (var "stripped")
-    (Just (unexpected(Phantoms.string "set") (ShowCore.term @@ var "stripped"))) [
-    _Term_set>>: "s" ~> right (var "s")]
-
-setOf :: TTermDefinition ((Term -> Prelude.Either Error x) -> Graph -> Term -> Prelude.Either Error (S.Set x))
-setOf = define "setOf" $
-  doc "Extract a set of values from a term, mapping a function over each element" $
-  "f" ~> "graph" ~> "term" ~>
-  "els" <<~ set @@ var "graph" @@ var "term" $
-  Eithers.mapSet (var "f") (var "els")
-
-setType :: TTermDefinition (Type -> Prelude.Either Error Type)
-setType = define "setType" $
-  doc "Extract the element type from a set type" $
-  "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "set type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_set>>: "t" ~> right (var "t")]
-
-string :: TTermDefinition (Graph -> Term -> Prelude.Either Error String)
-string = define "string" $
-  doc "Extract a string value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  stringLiteral @@ var "l"
-
-stringLiteral :: TTermDefinition (Literal -> Prelude.Either Error String)
-stringLiteral = define "stringLiteral" $
-  doc "Extract a string literal from a Literal value" $
-  "v" ~> Phantoms.cases _Literal (var "v")
-    (Just (unexpected(Phantoms.string "string") (ShowCore.literal @@ var "v"))) [
-    _Literal_string>>: "s" ~> right (var "s")]
-
-termRecord :: TTermDefinition (Graph -> Term -> Prelude.Either Error Record)
-termRecord = define "termRecord" $
-  doc "Extract a record from a term" $
-  "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "record") (ShowCore.term @@ var "term"))) [
-    _Term_record>>: "record" ~> right (var "record")]
-
-uint16 :: TTermDefinition (Graph -> Term -> Prelude.Either Error Int)
-uint16 = define "uint16" $
-  doc "Extract a 16-bit unsigned integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  uint16Value @@ var "i"
-
-uint16Value :: TTermDefinition (IntegerValue -> Prelude.Either Error Int)
-uint16Value = define "uint16Value" $
-  doc "Extract a uint16 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "uint16") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_uint16>>: "i" ~> right (var "i")]
-
-uint32 :: TTermDefinition (Graph -> Term -> Prelude.Either Error I.Int64)
-uint32 = define "uint32" $
-  doc "Extract a 32-bit unsigned integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  uint32Value @@ var "i"
-
-uint32Value :: TTermDefinition (IntegerValue -> Prelude.Either Error I.Int64)
-uint32Value = define "uint32Value" $
-  doc "Extract a uint32 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "uint32") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_uint32>>: "i" ~> right (var "i")]
-
-uint64 :: TTermDefinition (Graph -> Term -> Prelude.Either Error Integer)
-uint64 = define "uint64" $
-  doc "Extract a 64-bit unsigned integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  uint64Value @@ var "i"
-
-uint64Value :: TTermDefinition (IntegerValue -> Prelude.Either Error Integer)
-uint64Value = define "uint64Value" $
-  doc "Extract a uint64 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "uint64") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_uint64>>: "i" ~> right (var "i")]
-
-uint8 :: TTermDefinition (Graph -> Term -> Prelude.Either Error I.Int16)
-uint8 = define "uint8" $
-  doc "Extract an 8-bit unsigned integer value from a term" $
-  "graph" ~> "t" ~>
-  "l" <<~ literal @@ var "graph" @@ var "t" $
-  "i" <<~ integerLiteral @@ var "l" $
-  uint8Value @@ var "i"
-
-uint8Value :: TTermDefinition (IntegerValue -> Prelude.Either Error I.Int16)
-uint8Value = define "uint8Value" $
-  doc "Extract a uint8 value from an IntegerValue" $
-  "v" ~> Phantoms.cases _IntegerValue (var "v")
-    (Just (unexpected(Phantoms.string "uint8") (ShowCore.integerValue @@ var "v"))) [
-    _IntegerValue_uint8>>: "i" ~> right (var "i")]
-
--- TODO: nonstandard; move me
-unionType :: TTermDefinition (Name -> Type -> Prelude.Either Error [FieldType])
-unionType = define "unionType" $
-  doc "Extract the field types from a union type" $
-  "ename" ~> "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "union type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_union>>: "fields" ~> right (var "fields")]
-
-unit :: TTermDefinition (Term -> Prelude.Either Error ())
-unit = define "unit" $
-  doc "Extract a unit value from a term" $
-  "term" ~> Phantoms.cases _Term (var "term")
-    (Just (unexpected(Phantoms.string "unit") (ShowCore.term @@ var "term"))) [
-    _Term_unit>>: constant (right Phantoms.unit)]
-
-unitVariant :: TTermDefinition (Name -> Graph -> Term -> Prelude.Either Error Name)
-unitVariant = define "unitVariant" $
-  doc "Extract a unit variant (a variant with an empty record value) from a union term" $
-  "tname" ~> "graph" ~> "term" ~>
-  "field" <<~ injection @@ var "tname" @@ var "graph" @@ var "term" $
-  "ignored" <<~ unit @@ (Core.fieldTerm (var "field")) $
-  right (Core.fieldName (var "field"))
-
--- TODO: nonstandard; move me
-wrap :: TTermDefinition (Name -> Graph -> Term -> Prelude.Either Error Term)
-wrap = define "wrap" $
-  doc "Extract the wrapped value from a wrapped term" $
-  "expected" ~> "graph" ~> "term0" ~>
-  "term" <<~ Lexical.stripAndDereferenceTerm @@ var "graph" @@ var "term0" $
-  Phantoms.cases _Term (var "term")
-    (Just (unexpected
-      (Phantoms.string "wrap(" ++ (Core.unName (var "expected")) ++ Phantoms.string ")")
-      (ShowCore.term @@ var "term"))) [
-    _Term_wrap>>: "wrappedTerm" ~>
-      Logic.ifElse (Core.equalName_ (Core.wrappedTermTypeName (var "wrappedTerm")) (var "expected"))
-        (right (Core.wrappedTermBody (var "wrappedTerm")))
-        (unexpected
-          (Phantoms.string "wrapper of type " ++ (Core.unName (var "expected")))
-          (Core.unName (Core.wrappedTermTypeName (var "wrappedTerm"))))]
-
--- TODO: nonstandard; move me
-wrappedType :: TTermDefinition (Name -> Type -> Prelude.Either Error Type)
-wrappedType = define "wrappedType" $
-  doc "Extract the wrapped type from a wrapper type" $
-  "ename" ~> "typ" ~>
-  "stripped" <~ Strip.deannotateType @@ var "typ" $
-  Phantoms.cases _Type (var "stripped")
-    (Just (unexpected(Phantoms.string "wrapped type") (ShowCore.type_ @@ var "typ"))) [
-    _Type_wrap>>: "innerType" ~> right (var "innerType")]
-
---------------------------------------------------------------------------------
--- Helper functions (merged from hydra.extract.helpers)
---------------------------------------------------------------------------------
-
--- | Strip annotations and dereference, converting Error to DecodingError
--- This is a module-level definition so decoders can reference it at the term level
-stripWithDecodingError :: TTermDefinition (Graph -> Term -> Either DecodingError Term)
-stripWithDecodingError = define "stripWithDecodingError" $
-  doc "Strip annotations and dereference variables, returning Either DecodingError Term" $
-  "g" ~> "term" ~>
-  Eithers.bimap
-    ("_e" ~> Error.decodingError (ShowError.error_ @@ var "_e"))
-    ("x" ~> var "x")
-    (Lexical.stripAndDereferenceTermEither @@ var "g" @@ var "term")
-
--- | Decode an Either value using the provided left and right decoders
-decodeEither :: TTermDefinition ((Graph -> Term -> Either DecodingError a) -> (Graph -> Term -> Either DecodingError b) -> Graph -> Term -> Either DecodingError (Either a b))
-decodeEither = define "decodeEither" $
-  doc "Decode an Either value using the provided left and right decoders" $
-  "leftDecoder" ~> "rightDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected either value") [
-      _Term_either>>: "e" ~>
-        Eithers.either_
-          -- Left case: decode the left value, then wrap result in Left
-          ("lv" ~> Eithers.map ("x" ~> left (var "x")) (var "leftDecoder" @@ var "g" @@ var "lv"))
-          -- Right case: decode the right value, then wrap result in Right
-          ("rv" ~> Eithers.map ("x" ~> right (var "x")) (var "rightDecoder" @@ var "g" @@ var "rv"))
-          (var "e")])
-
--- | Decode a list of elements using the provided element decoder
-decodeList :: TTermDefinition ((Graph -> Term -> Either DecodingError a) -> Graph -> Term -> Either DecodingError [a])
-decodeList = define "decodeList" $
-  doc "Decode a list of elements using the provided element decoder" $
-  "elemDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected list") [
-      _Term_list>>: "els" ~> Eithers.mapList (var "elemDecoder" @@ var "g") $ var "els"])
-
--- | Decode a Map using the provided key and value decoders
-decodeMap :: TTermDefinition ((Graph -> Term -> Either DecodingError k) -> (Graph -> Term -> Either DecodingError v) -> Graph -> Term -> Either DecodingError (M.Map k v))
-decodeMap = define "decodeMap" $
-  doc "Decode a Map using the provided key and value decoders" $
-  "keyDecoder" ~> "valDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected map") [
-      _Term_map>>: "m" ~>
-        Eithers.map (unaryFunction Maps.fromList)
-          (Eithers.mapList
-            ("kv" ~>
-              Eithers.bind (var "keyDecoder" @@ var "g" @@ (Pairs.first $ var "kv"))
-                ("k" ~> Eithers.map ("v" ~> Phantoms.pair (var "k") (var "v"))
-                  (var "valDecoder" @@ var "g" @@ (Pairs.second $ var "kv"))))
-            (Maps.toList $ var "m"))])
-
--- | Decode a Maybe value using the provided element decoder
-decodeMaybe :: TTermDefinition ((Graph -> Term -> Either DecodingError a) -> Graph -> Term -> Either DecodingError (Maybe a))
-decodeMaybe = define "decodeMaybe" $
-  doc "Decode a Maybe value using the provided element decoder" $
-  "elemDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected optional value") [
-      _Term_maybe>>: "opt" ~> Eithers.mapMaybe (var "elemDecoder" @@ var "g") $ var "opt"])
-
--- | Decode a Pair using the provided first and second decoders
-decodePair :: TTermDefinition ((Graph -> Term -> Either DecodingError a) -> (Graph -> Term -> Either DecodingError b) -> Graph -> Term -> Either DecodingError (a, b))
-decodePair = define "decodePair" $
-  doc "Decode a Pair using the provided first and second decoders" $
-  "firstDecoder" ~> "secondDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected pair") [
-      _Term_pair>>: "p" ~>
-        Eithers.bind (var "firstDecoder" @@ var "g" @@ (Pairs.first $ var "p"))
-          ("f" ~> Eithers.map ("s" ~> Phantoms.pair (var "f") (var "s"))
-            (var "secondDecoder" @@ var "g" @@ (Pairs.second $ var "p")))])
-
--- | Decode a Set using the provided element decoder
-decodeSet :: TTermDefinition ((Graph -> Term -> Either DecodingError a) -> Graph -> Term -> Either DecodingError (S.Set a))
-decodeSet = define "decodeSet" $
-  doc "Decode a Set using the provided element decoder" $
-  "elemDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected set") [
-      _Term_set>>: "s" ~>
-        Eithers.map (unaryFunction Sets.fromList)
-          (Eithers.mapList (var "elemDecoder" @@ var "g") (Sets.toList $ var "s"))])
-
--- | Decode a unit value
-decodeUnit :: TTermDefinition (Graph -> Term -> Either DecodingError ())
-decodeUnit = define "decodeUnit" $
-  doc "Decode a unit value" $
-  "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected a unit value") [
-      _Term_unit>>: constant $ right Phantoms.unit])
-
--- | Decode a wrapped value using the provided body decoder
-decodeWrapped :: TTermDefinition ((Graph -> Term -> Either DecodingError a) -> Graph -> Term -> Either DecodingError a)
-decodeWrapped = define "decodeWrapped" $
-  doc "Decode a wrapped value using the provided body decoder" $
-  "bodyDecoder" ~> "g" ~> "term" ~>
-  Eithers.bind
-    (stripWithDecodingError @@ var "g" @@ var "term")
-    ("stripped" ~> Phantoms.cases _Term (var "stripped")
-      (Just $ left $ Error.decodingError $ Phantoms.string "expected wrapped value") [
-      _Term_wrap>>: "wt" ~>
-        var "bodyDecoder" @@ var "g" @@ (Core.wrappedTermBody (var "wt"))])
-
--- | Require a field from a field map and decode it using the provided decoder
--- Returns Left with a "missing field" error if the field is not present
-requireField :: TTermDefinition (String -> (Graph -> Term -> Either DecodingError a) -> M.Map Name Term -> Graph -> Either DecodingError a)
-requireField = define "requireField" $
-  doc "Require a field from a record's field map and decode it" $
-  "fieldName" ~> "decoder" ~> "fieldMap" ~> "g" ~>
-  Maybes.maybe
-    (left $ Error.decodingError $ Strings.cat $ Phantoms.list [Phantoms.string "missing field ", var "fieldName", Phantoms.string " in record"])
-    ("fieldTerm" ~> var "decoder" @@ var "g" @@ var "fieldTerm")
-    (Maps.lookup (Phantoms.wrap _Name $ var "fieldName") $ var "fieldMap")
-
--- | Convert a Record to a Map from field Name to Term
-toFieldMap :: TTermDefinition (Record -> M.Map Name Term)
-toFieldMap = define "toFieldMap" $
-  doc "Convert a Record's fields to a Map from Name to Term" $
-  "record" ~>
-  Maps.fromList $
-    Lists.map
-      ("f" ~> Phantoms.pair (Core.fieldName $ var "f") (Core.fieldTerm $ var "f"))
-      (Core.recordFields $ var "record")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Extract/Util.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Extract/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Extract/Util.hs
+++ /dev/null
@@ -1,91 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Extract.Util where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-
-
-ns :: Namespace
-ns = Namespace "hydra.extract.util"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, ShowError.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Extraction and validation for hydra.util types")}
-  where
-   definitions = [
-     toDefinition comparison]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
-comparison :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error Comparison)
-comparison = define "comparison" $
-  doc "Extract a comparison from a term" $
-  "cx" ~> "graph" ~> "term" ~>
-    "fname" <<~ ExtractCore.unitVariant @@ Core.nameLift _Comparison @@ var "graph" @@ var "term" $
-        Logic.ifElse (Equality.equal (Core.unName $ var "fname") (string $ unName _Comparison_equalTo))
-          (right Graph.comparisonEqualTo)
-          (Logic.ifElse (Equality.equal (Core.unName $ var "fname") (string $ unName _Comparison_lessThan))
-            (right Graph.comparisonLessThan)
-            (Logic.ifElse (Equality.equal (Core.unName $ var "fname") (string $ unName _Comparison_greaterThan))
-              (right Graph.comparisonGreaterThan)
-              (Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "comparison") (Core.unName (var "fname"))) (var "cx"))))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Formatting.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Formatting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Formatting.hs
+++ /dev/null
@@ -1,316 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Formatting where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  capitalize, convertCase, convertCaseCamelOrUnderscoreToLowerSnake, convertCaseCamelToLowerSnake, convertCaseCamelToUpperSnake,
-  convertCasePascalToUpperSnake, decapitalize, escapeWithUnderscore, indentLines,
-  javaStyleComment, mapFirstLetter, nonAlnumToUnderscores, normalizeComment, sanitizeWithUnderscores,
-  showList, stripLeadingAndTrailingWhitespace, withCharacterAliases, wrapLine)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), showList)
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.formatting"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String formatting types and functions."}
-  where
-    definitions = [
-      toDefinition capitalize,
-      toDefinition convertCase,
-      toDefinition convertCaseCamelOrUnderscoreToLowerSnake,
-      toDefinition convertCaseCamelToLowerSnake,
-      toDefinition convertCaseCamelToUpperSnake,
-      toDefinition convertCasePascalToUpperSnake,
-      toDefinition decapitalize,
-      toDefinition escapeWithUnderscore,
-      toDefinition indentLines,
-      toDefinition javaStyleComment,
-      toDefinition mapFirstLetter,
-      toDefinition normalizeComment,
-      toDefinition nonAlnumToUnderscores,
-      toDefinition sanitizeWithUnderscores,
-      toDefinition showList,
-      toDefinition stripLeadingAndTrailingWhitespace,
-      toDefinition withCharacterAliases,
-      toDefinition wrapLine]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-capitalize :: TTermDefinition (String -> String)
-capitalize = define "capitalize" $
-  doc "Capitalize the first letter of a string" $
-  mapFirstLetter @@ primitive _strings_toUpper
-
-convertCase :: TTermDefinition (CaseConvention -> CaseConvention -> String -> String)
-convertCase = define "convertCase" $
-  doc "Convert a string from one case convention to another" $
-  lambdas ["from", "to", "original"] $ lets [
-    "parts">: lets [
-      "byCaps">: lets [
-        "splitOnUppercase">: lambda "acc" $ lambda "c" $ Lists.concat2
-          (Logic.ifElse (Chars.isUpper $ var "c") emptyParts (list ([] :: [TTerm [Char]])))
-          (Maybes.fromMaybe (var "acc") $
-            Maybes.map ("uc" ~>
-              Lists.cons (Lists.cons (var "c") (Pairs.first $ var "uc"))
-                (Pairs.second $ var "uc"))
-              (Lists.uncons $ var "acc"))]
-        $ Lists.map (primitive _strings_fromList) $ Lists.foldl (var "splitOnUppercase") emptyParts
-          $ Lists.reverse $ Strings.toList (decapitalize @@ var "original"),
-      "byUnderscores">: Strings.splitOn (string "_") $ var "original"]
-      $ (match _CaseConvention Nothing [
-        _CaseConvention_camel>>: constant $ var "byCaps",
-        _CaseConvention_pascal>>: constant $ var "byCaps",
-        _CaseConvention_lowerSnake>>: constant $ var "byUnderscores",
-        _CaseConvention_upperSnake>>: constant $ var "byUnderscores"]) @@ var "from"]
-    $ (match _CaseConvention Nothing [
-      _CaseConvention_camel>>: constant $ decapitalize @@ (Strings.cat (Lists.map (capitalize <.> primitive _strings_toLower) $ var "parts")),
-      _CaseConvention_pascal>>: constant $ Strings.cat (Lists.map (capitalize <.> primitive _strings_toLower) $ var "parts"),
-      _CaseConvention_lowerSnake>>: constant $ Strings.intercalate (string "_") (Lists.map (primitive _strings_toLower) $ var "parts"),
-      _CaseConvention_upperSnake>>: constant $ Strings.intercalate (string "_") (Lists.map (primitive _strings_toUpper) $ var "parts")
-      ]) @@ var "to"
-  where
-    emptyParts = list [list ([] :: [TTerm Char])]
-
-convertCaseCamelToLowerSnake :: TTermDefinition (String -> String)
-convertCaseCamelToLowerSnake = define "convertCaseCamelToLowerSnake" $
-  doc "Convert a string from camel case to lower snake case" $
-  convertCase @@ Util.caseConventionCamel @@ Util.caseConventionLowerSnake
-
-convertCaseCamelOrUnderscoreToLowerSnake :: TTermDefinition (String -> String)
-convertCaseCamelOrUnderscoreToLowerSnake = define "convertCaseCamelOrUnderscoreToLowerSnake" $
-  doc "Convert a string from camel case (possibly with underscores) to lower snake case. Splits on underscores first, then converts each part from camel case." $
-  lambda "s" $
-    "parts" <~ Strings.splitOn (string "_") (var "s") $
-    "snakeParts" <~ Lists.map (lambda "p" $ convertCaseCamelToLowerSnake @@ var "p") (var "parts") $
-    Strings.intercalate (string "_") (var "snakeParts")
-
-convertCaseCamelToUpperSnake :: TTermDefinition (String -> String)
-convertCaseCamelToUpperSnake = define "convertCaseCamelToUpperSnake" $
-  doc "Convert a string from camel case to upper snake case" $
-  convertCase @@ Util.caseConventionCamel @@ Util.caseConventionUpperSnake
-
-convertCasePascalToUpperSnake :: TTermDefinition (String -> String)
-convertCasePascalToUpperSnake = define "convertCasePascalToUpperSnake" $
-  doc "Convert a string from pascal case to upper snake case" $
-  convertCase @@ Util.caseConventionPascal @@ Util.caseConventionUpperSnake
-
-decapitalize :: TTermDefinition (String -> String)
-decapitalize = define "decapitalize" $
-  doc "Decapitalize the first letter of a string" $
-  mapFirstLetter @@ primitive _strings_toLower
-
-escapeWithUnderscore :: TTermDefinition (S.Set String -> String -> String)
-escapeWithUnderscore = define "escapeWithUnderscore" $
-  doc "Escape reserved words by appending an underscore" $
-  lambdas ["reserved", "s"] $
-    Logic.ifElse (Sets.member (var "s") (var "reserved"))
-      (var "s" ++ string "_")
-      (var "s")
-
-indentLines :: TTermDefinition (String -> String)
-indentLines = define "indentLines" $
-  doc "Indent each line of a string with four spaces" $
-  lambda "s" $ lets [
-    "indent">: lambda "l" $ string "    " ++ var "l"]
-    $ Strings.unlines $ Lists.map (var "indent") $ Strings.lines $ var "s"
-
-javaStyleComment :: TTermDefinition (String -> String)
-javaStyleComment = define "javaStyleComment" $
-  doc "Format a string as a Java-style block comment" $
-  lambda "s" $ string "/**\n" ++ string " * " ++ var "s" ++ string "\n */"
-
--- TODO: simplify this helper
-mapFirstLetter :: TTermDefinition ((String -> String) -> String -> String)
-mapFirstLetter = define "mapFirstLetter" $
-  doc "A helper which maps the first letter of a string to another string" $
-  "mapping" ~> "s" ~>
-  Logic.ifElse
-    (Strings.null $ var "s")
-    (var "s")
-    ("list" <~ Strings.toList (var "s") $
-     Maybes.fromMaybe (var "s") $
-       Maybes.map ("uc" ~>
-         "firstLetter" <~ (var "mapping" @@ Strings.fromList (Lists.pure (Pairs.first $ var "uc"))) $
-         Strings.cat2 (var "firstLetter") (Strings.fromList (Pairs.second $ var "uc")))
-         (Lists.uncons $ var "list"))
-
-normalizeComment :: TTermDefinition (String -> String)
-normalizeComment = define "normalizeComment" $
-  doc "Normalize a comment string for consistent output across coders" $
-  "s" ~>
-  "stripped" <~ stripLeadingAndTrailingWhitespace @@ var "s" $
-  Logic.ifElse
-    (Strings.null (var "stripped"))
-    (string "")
-    -- Get the last character by using maybeCharAt with (length - 1).
-    -- Code point 46 is '.'. Nothing is unreachable here: stripped is non-empty
-    -- by the null check above, so lastIdx is a valid index.
-    ("lastIdx" <~ Math.sub (Strings.length (var "stripped")) (int32 1) $
-     "appended" <~ Strings.cat2 (var "stripped") (string ".") $
-     Maybes.maybe
-       (var "appended")
-       ("lastChar" ~> Logic.ifElse
-         (Equality.equal (var "lastChar") (int32 46))
-         (var "stripped")
-         (var "appended"))
-       (Strings.maybeCharAt (var "lastIdx") (var "stripped")))
-
-nonAlnumToUnderscores :: TTermDefinition (String -> String)
-nonAlnumToUnderscores = define "nonAlnumToUnderscores" $
-  doc "Replace sequences of non-alphanumeric characters with single underscores" $
-  "input" ~>
-  "isAlnum" <~ ("c" ~> Logic.or
-    (Logic.and (Equality.gte (var "c") (char 'A')) (Equality.lte (var "c") (char 'Z')))
-    (Logic.or
-      (Logic.and (Equality.gte (var "c") (char 'a')) (Equality.lte (var "c") (char 'z')))
-      (Logic.and (Equality.gte (var "c") (char '0')) (Equality.lte (var "c") (char '9'))))) $
-  "replace" <~ ("p" ~> "c" ~>
-    "s" <~ Pairs.first (var "p") $
-    "b" <~ Pairs.second (var "p") $
-    Logic.ifElse (var "isAlnum" @@ var "c")
-      (pair (Lists.cons (var "c") (var "s")) (boolean False))
-      (Logic.ifElse (var "b")
-        (pair (var "s") (boolean True))
-        (pair (Lists.cons (char '_') (var "s")) (boolean True)))) $
-  "result" <~ Lists.foldl (var "replace") (pair (list ([] :: [TTerm Char])) (boolean False)) (Strings.toList $ var "input") $
-  Strings.fromList $ Lists.reverse $ Pairs.first $ var "result"
-
-sanitizeWithUnderscores :: TTermDefinition (S.Set String -> String -> String)
-sanitizeWithUnderscores = define "sanitizeWithUnderscores" $
-  doc "Sanitize a string by replacing non-alphanumeric characters and escaping reserved words" $
-  "reserved" ~> "s" ~> escapeWithUnderscore @@ var "reserved" @@ (nonAlnumToUnderscores @@ var "s")
-
-showList :: TTermDefinition ((a -> String) -> [a] -> String)
-showList = define "showList" $
-  doc "Format a list of elements as a bracketed, comma-separated string" $
-  "f" ~> "els" ~> Strings.cat $ list [
-    string "[",
-    Strings.intercalate (string ", ") $ Lists.map (var "f") $ var "els",
-    string "]"]
-
-stripLeadingAndTrailingWhitespace :: TTermDefinition (String -> String)
-stripLeadingAndTrailingWhitespace = define "stripLeadingAndTrailingWhitespace" $
-  doc "Remove leading and trailing whitespace from a string" $
-  "s" ~> Strings.fromList $ Lists.dropWhile (unaryFunction Chars.isSpace) $ Lists.reverse $
-    Lists.dropWhile (unaryFunction Chars.isSpace) $ Lists.reverse $ Strings.toList $ var "s"
-
-withCharacterAliases :: TTermDefinition (String -> String)
-withCharacterAliases = define "withCharacterAliases" $
-  doc "Replace special characters with their alphanumeric aliases" $
-  lambda "original" $ lets [
-    -- Taken from: https://cs.stanford.edu/people/miles/iso8859.html
-    "aliases">: Maps.fromList $ list [
-      pair (int32 32) (string "sp"),
-      pair (int32 33) (string "excl"),
-      pair (int32 34) (string "quot"),
-      pair (int32 35) (string "num"),
-      pair (int32 36) (string "dollar"),
-      pair (int32 37) (string "percnt"),
-      pair (int32 38) (string "amp"),
-      pair (int32 39) (string "apos"),
-      pair (int32 40) (string "lpar"),
-      pair (int32 41) (string "rpar"),
-      pair (int32 42) (string "ast"),
-      pair (int32 43) (string "plus"),
-      pair (int32 44) (string "comma"),
-      pair (int32 45) (string "minus"),
-      pair (int32 46) (string "period"),
-      pair (int32 47) (string "sol"),
-      pair (int32 58) (string "colon"),
-      pair (int32 59) (string "semi"),
-      pair (int32 60) (string "lt"),
-      pair (int32 61) (string "equals"),
-      pair (int32 62) (string "gt"),
-      pair (int32 63) (string "quest"),
-      pair (int32 64) (string "commat"),
-      pair (int32 91) (string "lsqb"),
-      pair (int32 92) (string "bsol"),
-      pair (int32 93) (string "rsqb"),
-      pair (int32 94) (string "circ"),
-      pair (int32 95) (string "lowbar"),
-      pair (int32 96) (string "grave"),
-      pair (int32 123) (string "lcub"),
-      pair (int32 124) (string "verbar"),
-      pair (int32 125) (string "rcub"),
-      pair (int32 126) (string "tilde")],
-    "alias">: lambda "c" $ Maybes.fromMaybe
-      (Lists.pure $ var "c")
-      (Maybes.map (unaryFunction Strings.toList) $ Maps.lookup (var "c") (var "aliases"))]
-    $ Strings.fromList $ Lists.filter (unaryFunction Chars.isAlphaNum) $ Lists.concat $
-      Lists.map (var "alias") $ Strings.toList $ var "original"
-
-wrapLine :: TTermDefinition (Int -> String -> String)
-wrapLine = define "wrapLine" $
-  doc "A simple soft line wrap which is suitable for code comments" $
-  lambdas ["maxlen", "input"] $ lets [
-    "helper">: lambdas ["prev", "rem"] $ lets [
-      "trunc">: Lists.take (var "maxlen") (var "rem"),
-      "spanResult">: Lists.span
-        (lambda "c" $ Logic.and (Logic.not $ Equality.equal (var "c") (char ' ')) (Logic.not $ Equality.equal (var "c") (char '\t')))
-        (Lists.reverse $ var "trunc"),
-      "prefix">: Lists.reverse $ Pairs.second $ var "spanResult",
-      "suffix">: Lists.reverse $ Pairs.first $ var "spanResult"]
-      $ Logic.ifElse (Equality.lte (Lists.length $ var "rem") (var "maxlen"))
-        (Lists.reverse $ Lists.cons (var "rem") (var "prev"))
-        (Logic.ifElse (Lists.null $ var "prefix")
-          (var "helper" @@ (Lists.cons (var "trunc") (var "prev")) @@ (Lists.drop (var "maxlen") (var "rem")))
-          -- prefix is non-empty here (guarded above), so maybeInit is always Just.
-          (Maybes.fromMaybe
-            (var "helper" @@ (Lists.cons (var "trunc") (var "prev")) @@ (Lists.drop (var "maxlen") (var "rem")))
-            (Maybes.map
-              ("pfxInit" ~> var "helper" @@ (Lists.cons (var "pfxInit") (var "prev")) @@ (Lists.concat2 (var "suffix") ((Lists.drop (var "maxlen") (var "rem")))))
-              (Lists.maybeInit $ var "prefix"))))]
-    $ Strings.fromList $ Lists.intercalate (list [char '\n']) $ var "helper" @@ (list ([] :: [TTerm Char])) @@ (Strings.toList $ var "input")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Generation.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Generation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Generation.hs
+++ /dev/null
@@ -1,664 +0,0 @@
--- | DSL source module for the pure code generation pipeline.
--- Promotes the pure core of Hydra.Generation into a kernel module
--- that gets generated to all target languages (Haskell, Java, Python).
--- Issue #225: Minimize Generation.hs
-
-module Hydra.Sources.Kernel.Terms.Generation where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  buildSchemaMap, decodeModuleFromJson,
-  escapeControlCharsInJson, formatPrimitive, formatTermBinding, formatTypeBinding,
-  generateCoderModules, generateLexicon, generateSourceFiles,
-  inferAndGenerateLexicon, inferModules,
-  moduleToJson, moduleToSourceModule, modulesToGraph,
-  moduleTermDepsTransitive, moduleTypeDepsTransitive,
-  namespaceToPath, transitiveDeps)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Json.Model                as JsonModel
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
--- Dependencies on other term modules
-import qualified Hydra.Sources.Json.Decode                  as JsonDecode
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.Annotations     as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Inference       as Inference
-import qualified Hydra.Sources.Kernel.Terms.Lexical         as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Names           as Names
-
-import qualified Hydra.Sources.Kernel.Terms.Environment     as Environment
-import qualified Hydra.Sources.Kernel.Terms.Strip           as Strip
-import qualified Hydra.Sources.Kernel.Terms.Show.Core       as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors     as ShowError
-
--- Dependencies on secondary generated modules (decode/encode)
-import qualified Hydra.Sources.Decode.Core                  as DecodeCore
-import qualified Hydra.Sources.Decode.Packaging              as DecodeModule
-import qualified Hydra.Sources.Encode.Packaging              as EncodeModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.codegen"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Adapt.ns, Annotations.ns, Inference.ns, JsonDecode.ns, Lexical.ns, Names.ns,
-     Environment.ns, ShowCore.ns, ShowError.ns, Strip.ns,
-     Namespace "hydra.decoding", Namespace "hydra.encoding",
-     Namespace "hydra.json.decode", Namespace "hydra.json.encode", Namespace "hydra.json.writer",
-     moduleNamespace DecodeCore.module_, moduleNamespace DecodeModule.module_, moduleNamespace EncodeModule.module_],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Pure code generation pipeline for bootstrapping Hydra across languages."}
-  where
-    definitions = [
-      toDefinition namespaceToPath,
-      toDefinition transitiveDeps,
-      toDefinition moduleTermDepsTransitive,
-      toDefinition moduleTypeDepsTransitive,
-      toDefinition modulesToGraph,
-      toDefinition generateSourceFiles,
-      toDefinition formatTermBinding,
-      toDefinition formatPrimitive,
-      toDefinition formatTypeBinding,
-      toDefinition buildSchemaMap,
-      toDefinition moduleToSourceModule,
-      toDefinition generateLexicon,
-      toDefinition moduleToJson,
-      toDefinition refreshModule,
-      toDefinition inferModules,
-      toDefinition inferModulesGiven,
-      toDefinition generateCoderModules,
-      toDefinition inferAndGenerateLexicon,
-      toDefinition escapeControlCharsInJson,
-      toDefinition decodeModuleFromJson]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Extract type definitions from a module as Bindings (for elementsToGraph compatibility).
--- Each TypeDefinition is converted to a Binding by encoding the type as a term.
-moduleTypeBindings :: TTerm Module -> TTerm [Binding]
-moduleTypeBindings m = Maybes.cat $ Lists.map
-  ("d" ~> cases _Definition (var "d") (Just nothing) [
-    _Definition_type>>: "td" ~>
-      just (Annotations.typeBinding @@ (Packaging.typeDefinitionName $ var "td") @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td"))])
-  (Packaging.moduleDefinitions m)
-
--- | Extract term definitions from a module as Bindings (for elementsToGraph compatibility).
-moduleTermBindings :: TTerm Module -> TTerm [Binding]
-moduleTermBindings m = Maybes.cat $ Lists.map
-  ("d" ~> cases _Definition (var "d") (Just nothing) [
-    _Definition_term>>: "td" ~>
-      just (Core.binding
-        (Packaging.termDefinitionName $ var "td")
-        (Packaging.termDefinitionTerm $ var "td")
-        (Packaging.termDefinitionTypeScheme $ var "td"))])
-  (Packaging.moduleDefinitions m)
-
--- | Extract all definitions from a module as Bindings.
-moduleAllBindings :: TTerm Module -> TTerm [Binding]
-moduleAllBindings m = Lists.concat2 (moduleTypeBindings m) (moduleTermBindings m)
-
--- | Check whether a module has any type definitions.
-hasTypeDefinitions :: TTerm Module -> TTerm Bool
-hasTypeDefinitions m = Logic.not $ Lists.null $ moduleTypeBindings m
-
--- | Check whether a module has any term definitions.
-hasTermDefinitions :: TTerm Module -> TTerm Bool
-hasTermDefinitions m = Logic.not $ Lists.null $ moduleTermBindings m
-
--- | Extract type definition names from a module.
-moduleTypeNames :: TTerm Module -> TTerm [Name]
-moduleTypeNames m = Maybes.cat $ Lists.map
-  ("d" ~> cases _Definition (var "d") (Just nothing) [
-    _Definition_type>>: "td" ~> just (Packaging.typeDefinitionName $ var "td")])
-  (Packaging.moduleDefinitions m)
-
--- | Convert a namespace to a file path (e.g., "hydra.core" -> "hydra/core").
-namespaceToPath :: TTermDefinition (Namespace -> String)
-namespaceToPath = define "namespaceToPath" $
-  doc "Convert a namespace to a file path (e.g., hydra.core -> hydra/core)" $
-  "ns" ~>
-  Strings.intercalate (string "/") (Strings.splitOn (string ".") (Packaging.unNamespace $ var "ns"))
-
--- | Compute transitive closure of dependencies.
--- Given a function that extracts dependency namespaces from a module,
--- a namespace-to-module map, and starting modules, returns the transitive closure
--- of all reachable namespaces (excluding self-references from start modules).
-transitiveDeps :: TTermDefinition ((Module -> [Namespace]) -> M.Map Namespace Module -> [Module] -> S.Set Namespace)
-transitiveDeps = define "transitiveDeps" $
-  doc "Compute transitive closure of module dependencies" $
-  "getDeps" ~> "nsMap" ~> "startMods" ~>
-  -- Start with dependencies of start modules, excluding self-references
-  "initialDeps" <~ Sets.fromList (Lists.concat (Lists.map
-    ("m" ~> Lists.filter
-      ("dep" ~> Logic.not $ Equality.equal (var "dep") (Packaging.moduleNamespace $ var "m"))
-      (var "getDeps" @@ var "m"))
-    (var "startMods"))) $
-  -- Iterative closure: go pending visited
-  "go" <~ ("pending" ~> "visited" ~>
-    Logic.ifElse (Sets.null $ var "pending")
-      (var "visited")
-      ("newVisited" <~ Sets.union (var "visited") (var "pending") $
-       "nextDeps" <~ Sets.fromList (Lists.concat (Lists.map
-         ("nsv" ~> optCases (Maps.lookup (var "nsv") (var "nsMap"))
-           (TTerm (Terms.list []) :: TTerm [Namespace])
-           ("depMod" ~> var "getDeps" @@ var "depMod"))
-         (Sets.toList $ var "pending"))) $
-       "newPending" <~ Sets.difference (var "nextDeps") (var "newVisited") $
-       var "go" @@ var "newPending" @@ var "newVisited")) $
-  var "go" @@ var "initialDeps" @@ (Sets.empty :: TTerm (S.Set Namespace))
-
--- | Compute the transitive closure of term dependencies for a set of modules.
--- Returns the modules that are transitively depended upon (including the input modules).
-moduleTermDepsTransitive :: TTermDefinition (M.Map Namespace Module -> [Module] -> [Module])
-moduleTermDepsTransitive = define "moduleTermDepsTransitive" $
-  doc "Compute transitive closure of term dependencies for a set of modules" $
-  "nsMap" ~> "modules" ~>
-  "closure" <~ Sets.union
-    (transitiveDeps @@ ("m" ~> Packaging.moduleTermDependencies (var "m")) @@ var "nsMap" @@ var "modules")
-    (Sets.fromList $ Lists.map ("m" ~> Packaging.moduleNamespace (var "m")) (var "modules")) $
-  Maybes.cat $ Lists.map
-    ("n" ~> Maps.lookup (var "n") (var "nsMap"))
-    (Sets.toList $ var "closure")
-
--- | Compute the transitive closure of type dependencies for a set of modules.
--- First computes transitive term deps, then type deps from those.
-moduleTypeDepsTransitive :: TTermDefinition (M.Map Namespace Module -> [Module] -> [Module])
-moduleTypeDepsTransitive = define "moduleTypeDepsTransitive" $
-  doc "Compute transitive closure of type dependencies for a set of modules" $
-  "nsMap" ~> "modules" ~>
-  "termMods" <~ moduleTermDepsTransitive @@ var "nsMap" @@ var "modules" $
-  "typeNamespaces" <~ Sets.toList (transitiveDeps @@ ("m" ~> Packaging.moduleTypeDependencies (var "m")) @@ var "nsMap" @@ var "termMods") $
-  Maybes.cat $ Lists.map
-    ("n" ~> Maps.lookup (var "n") (var "nsMap"))
-    (var "typeNamespaces")
-
--- | Build a graph from a list of modules, using an explicit bootstrap graph.
--- Type definitions become schema elements and term definitions become data elements.
--- Any type schemes already present on universe term bindings (e.g. from a prior
--- inference run) are installed as the graph's boundTypes so incremental inference
--- can use them as a read-only lookup.
-modulesToGraph :: TTermDefinition (Graph -> [Module] -> [Module] -> Graph)
-modulesToGraph = define "modulesToGraph" $
-  doc "Build a graph from universe modules and working modules, using an explicit bootstrap graph" $
-  "bsGraph" ~> "universeModules" ~> "modules" ~>
-  "universe" <~ Maps.fromList (Lists.map
-    ("m" ~> pair (Packaging.moduleNamespace $ var "m") (var "m"))
-    (Lists.concat2 (var "universeModules") (var "modules"))) $
-  "schemaModules" <~ moduleTypeDepsTransitive @@ var "universe" @@ var "modules" $
-  "dataModules" <~ moduleTermDepsTransitive @@ var "universe" @@ var "modules" $
-  -- Include type elements from both transitive type dependencies AND the input modules themselves
-  "schemaElements" <~ Lists.concat (Lists.map ("m" ~> moduleTypeBindings (var "m"))
-      (Lists.concat2 (var "schemaModules") (var "modules"))) $
-  "dataElements" <~ Lists.concat (Lists.map ("m" ~> moduleTermBindings (var "m")) (var "dataModules")) $
-  "schemaGraph" <~ Lexical.elementsToGraph @@ var "bsGraph" @@ Maps.empty @@ var "schemaElements" $
-  -- Decode the schema graph to a Map Name TypeScheme (interim solution until schema graphs are eliminated)
-  "schemaTypes" <~ Eithers.either_
-    (constant (Maps.empty :: TTerm (M.Map Name TypeScheme)))
-    ("_r" ~> var "_r")
-    (Environment.schemaGraphToTypingEnvironment @@ var "schemaGraph") $
-  "baseGraph" <~ Lexical.elementsToGraph @@ var "bsGraph" @@ var "schemaTypes" @@ var "dataElements" $
-  -- Collect pre-existing type schemes from universe term bindings and install them as boundTypes.
-  -- Inference coins fresh type variables for any binding it is actively solving, so stale schemes
-  -- for target bindings are transparently overridden; schemes for non-target bindings act as a
-  -- read-only lookup that lets incremental inference skip re-solving known definitions.
-  "universeDataElements" <~ Lists.concat (Lists.map
-      ("m" ~> moduleTermBindings (var "m")) (var "universeModules")) $
-  "universeBoundTypes" <~ Maps.fromList (Maybes.cat (Lists.map ("b" ~>
-    Maybes.map ("ts" ~> pair (Core.bindingName (var "b")) (var "ts"))
-      (Core.bindingTypeScheme (var "b"))) (var "universeDataElements"))) $
-  Graph.graphWithBoundTypes (var "baseGraph") (var "universeBoundTypes")
-
--- | Pure core of code generation: given a coder, language, flags, bootstrap graph, universe,
--- and modules to generate, produce a list of (filePath, content) pairs.
--- This function contains no I/O and can be generated to other languages.
-generateSourceFiles
-  :: TTermDefinition ((Module -> [Definition] -> Context -> Graph -> Prelude.Either Error (M.Map String String))
-    -> Language
-    -> Bool -> Bool -> Bool -> Bool
-    -> Graph -> [Module] -> [Module]
-    -> Context -> Prelude.Either Error [(String, String)])
-generateSourceFiles = define "generateSourceFiles" $
-  doc ("Pure core of code generation: given a coder, language, flags, bootstrap graph, universe,"
-    <> " and modules to generate, produce a list of (filePath, content) pairs.") $
-  "printDefinitions" ~> "lang" ~>
-  "doInfer" ~> "doExpand" ~> "doHoistCaseStatements" ~> "doHoistPolymorphicLetBindings" ~>
-  "bsGraph" ~> "universeModules" ~> "modsToGenerate" ~> "cx" ~>
-
-  "namespaceMap" <~ Maps.fromList (Lists.map
-    ("m" ~> pair (Packaging.moduleNamespace $ var "m") (var "m"))
-    (Lists.concat2 (var "universeModules") (var "modsToGenerate"))) $
-
-  "constraints" <~ Coders.languageConstraints (var "lang") $
-
-  -- Filter modules into type and term categories (a module can appear in both)
-  "typeModulesToGenerate" <~ Lists.filter ("mod" ~> hasTypeDefinitions (var "mod")) (var "modsToGenerate") $
-  "termModulesToGenerate" <~ Lists.filter ("mod" ~> hasTermDefinitions (var "mod")) (var "modsToGenerate") $
-
-  -- Compute transitive deps and build graphs
-  "schemaMods" <~ moduleTypeDepsTransitive @@ var "namespaceMap" @@ var "modsToGenerate" $
-  "schemaElements" <~ Lists.concat (Lists.map ("m" ~> moduleTypeBindings (var "m"))
-      (Lists.concat2 (var "schemaMods") (var "typeModulesToGenerate"))) $
-  "dataMods" <~ moduleTermDepsTransitive @@ var "namespaceMap" @@ var "modsToGenerate" $
-  "dataElements" <~ Lists.concat (Lists.map ("m" ~> moduleTermBindings (var "m")) (var "dataMods")) $
-  "schemaGraph" <~ Lexical.elementsToGraph @@ var "bsGraph" @@ Maps.empty @@ var "schemaElements" $
-  "schemaTypes2" <~ Eithers.either_
-    (constant (Maps.empty :: TTerm (M.Map Name TypeScheme)))
-    ("_r" ~> var "_r")
-    (Environment.schemaGraphToTypingEnvironment @@ var "schemaGraph") $
-  "dataGraph" <~ Lexical.elementsToGraph @@ var "bsGraph" @@ var "schemaTypes2" @@ var "dataElements" $
-
-  -- Generate type modules
-  "schemaFiles" <<~ Logic.ifElse (Lists.null $ var "typeModulesToGenerate")
-    (right (TTerm (Terms.list []) :: TTerm [(String, String)]))
-    ("nameLists" <~ Lists.map ("m" ~> moduleTypeNames (var "m"))
-        (var "typeModulesToGenerate") $
-      "schemaResult" <<~ Adapt.schemaGraphToDefinitions @@ var "constraints" @@ var "schemaGraph" @@ var "nameLists" @@ var "cx" $
-      "defLists" <~ Pairs.second (var "schemaResult") $
-      "schemaGraphWithTypes" <~ Graph.graphWithSchemaTypes (var "schemaGraph") (var "schemaTypes2") $
-      Eithers.map ("xs" ~> Lists.concat (var "xs")) $
-        Eithers.mapList ("p" ~>
-          "mod" <~ Pairs.first (var "p") $
-          "defs" <~ Pairs.second (var "p") $
-          Eithers.map ("m" ~> Maps.toList (var "m")) $
-            var "printDefinitions" @@ var "mod" @@ Lists.map ("d" ~> Packaging.definitionType (var "d")) (var "defs") @@ var "cx" @@ var "schemaGraphWithTypes")
-        (Lists.zip (var "typeModulesToGenerate") (var "defLists"))) $
-
-  -- Generate term modules
-  "termFiles" <<~ Logic.ifElse (Lists.null $ var "termModulesToGenerate")
-    (right (TTerm (Terms.list []) :: TTerm [(String, String)]))
-    ("namespaces" <~ Lists.map ("m" ~> Packaging.moduleNamespace (var "m")) (var "termModulesToGenerate") $
-      "dataResult" <<~ Adapt.dataGraphToDefinitions
-          @@ var "constraints"
-          @@ var "doInfer" @@ var "doExpand" @@ var "doHoistCaseStatements" @@ var "doHoistPolymorphicLetBindings"
-          @@ var "dataElements" @@ var "dataGraph" @@ var "namespaces" @@ var "cx" $
-      "g1" <~ Pairs.first (var "dataResult") $
-      "defLists" <~ Pairs.second (var "dataResult") $
-      -- Refresh modules with elements from the inferred graph
-      "defName" <~ ("d" ~> cases _Definition (var "d") Nothing [
-        _Definition_term>>: "td" ~> Packaging.termDefinitionName (var "td"),
-        _Definition_type>>: "td" ~> Packaging.typeDefinitionName (var "td")]) $
-      "refreshModule" <~ ("els" ~> "m" ~>
-        Packaging.module_
-          (Packaging.moduleDescription $ var "m")
-          (Packaging.moduleNamespace $ var "m")
-          (Packaging.moduleTermDependencies $ var "m")
-          (Packaging.moduleTypeDependencies $ var "m")
-          (Maybes.cat $ Lists.map
-            ("d" ~> cases _Definition (var "d") Nothing [
-              _Definition_type>>: "td" ~> just (Packaging.definitionType (var "td")),
-              _Definition_term>>: "td" ~> Maybes.map
-                ("b" ~> Packaging.definitionTerm (Packaging.termDefinition
-                  (Core.bindingName $ var "b")
-                  (Core.bindingTerm $ var "b")
-                  (Core.bindingTypeScheme $ var "b")))
-                (Lists.find ("b" ~> Equality.equal (Core.bindingName $ var "b") (Packaging.termDefinitionName $ var "td")) (var "els"))])
-            (Packaging.moduleDefinitions $ var "m"))) $
-      "allBindings" <~ Lexical.graphToBindings @@ var "g1" $
-      "refreshedMods" <~ Lists.map ("m" ~> var "refreshModule" @@ var "allBindings" @@ var "m") (var "termModulesToGenerate") $
-      -- Deduplicate definitions by name to avoid duplicate functions in generated code
-      "dedupDefs" <~ ("defs" ~> Maps.elems (Maps.fromList (Lists.map ("d" ~> pair (Packaging.termDefinitionName (var "d")) (var "d")) (var "defs")))) $
-      "dedupedDefLists" <~ Lists.map (var "dedupDefs") (var "defLists") $
-      Eithers.map ("xs" ~> Lists.concat (var "xs")) $
-        Eithers.mapList ("p" ~>
-          "mod" <~ Pairs.first (var "p") $
-          "defs" <~ Pairs.second (var "p") $
-          Eithers.map ("m" ~> Maps.toList (var "m")) $
-            var "printDefinitions" @@ var "mod" @@ Lists.map ("d" ~> Packaging.definitionTerm (var "d")) (var "defs") @@ var "cx" @@ var "g1")
-        (Lists.zip (var "refreshedMods") (var "dedupedDefLists"))) $
-
-  -- Combine results
-  right $ Lists.concat2 (var "schemaFiles") (var "termFiles")
-
--- | Format a term binding for the lexicon: "  name : typeScheme"
-formatTermBinding :: TTermDefinition (Binding -> String)
-formatTermBinding = define "formatTermBinding" $
-  doc "Format a term binding for the lexicon" $
-  "binding" ~>
-  "name" <~ Core.unName (Core.bindingName $ var "binding") $
-  "typeStr" <~ optCases (Core.bindingTypeScheme $ var "binding")
-    (string "?")
-    ("scheme" ~> ShowCore.typeScheme @@ var "scheme") $
-  (string "  ") ++ var "name" ++ (string " : ") ++ var "typeStr"
-
--- | Format a primitive for the lexicon: "  name : typeScheme"
-formatPrimitive :: TTermDefinition (Primitive -> String)
-formatPrimitive = define "formatPrimitive" $
-  doc "Format a primitive for the lexicon" $
-  "prim" ~>
-  "name" <~ Core.unName (Graph.primitiveName $ var "prim") $
-  "typeStr" <~ ShowCore.typeScheme @@ (Graph.primitiveTypeScheme $ var "prim") $
-  (string "  ") ++ var "name" ++ (string " : ") ++ var "typeStr"
-
--- | Format a type binding for the lexicon: "  name = type"
-formatTypeBinding :: TTermDefinition (Graph -> Binding -> Prelude.Either Error String)
-formatTypeBinding = define "formatTypeBinding" $
-  doc "Format a type binding for the lexicon" $
-  "graph" ~> "binding" ~>
-  "typ" <<~ Eithers.bimap ("_e" ~> Error.errorDecoding $ var "_e") ("_a" ~> var "_a") (decoderFor _Type @@ var "graph" @@ (Core.bindingTerm $ var "binding")) $
-  right $
-    (string "  ") ++ Core.unName (Core.bindingName $ var "binding") ++ (string " = ") ++ (ShowCore.type_ @@ var "typ")
-
--- | Build a schema map (Name -> Type) from a graph's schema types.
--- Used by the JSON decoder to resolve type variables.
-buildSchemaMap :: TTermDefinition (Graph -> M.Map Name Type)
-buildSchemaMap = define "buildSchemaMap" $
-  doc "Build a schema map (Name -> Type) from a graph's schema types" $
-  "g" ~>
-  Maps.map ("ts" ~> Strip.deannotateType @@ (Core.typeSchemeBody $ var "ts"))
-    (Graph.graphSchemaTypes $ var "g")
-
--- | Convert a generated Module into a Source module.
--- The Source module contains a single binding `module_` which holds the Module encoded as a Term.
--- The namespace transforms e.g. "hydra.encode.util" to "hydra.sources.encode.util"
-moduleToSourceModule :: TTermDefinition (Module -> Module)
-moduleToSourceModule = define "moduleToSourceModule" $
-  doc "Convert a generated Module into a Source module" $
-  "m" ~>
-  -- Transform namespace: hydra.encode.util -> hydra.sources.encode.util
-  "sourceNs" <~ wrap _Namespace (
-    (string "hydra.sources.") ++ Strings.intercalate (string ".")
-      (Lists.drop (int32 1) (Strings.splitOn (string ".") (Packaging.unNamespace $ Packaging.moduleNamespace $ var "m")))) $
-  -- The module type namespace
-  "modTypeNs" <~ (wrap _Namespace (string "hydra.packaging") :: TTerm Namespace) $
-  -- Create binding: module_ = <encoded Module term>
-  "moduleDef" <~ Packaging.definitionTerm (Packaging.termDefinition
-    (wrap _Name (Packaging.unNamespace (var "sourceNs") ++ (string ".module_")))
-    (encoderFor _Module @@ var "m")
-    nothing) $
-  Packaging.module_
-    (just $ (string "Source module for ") ++ Packaging.unNamespace (Packaging.moduleNamespace $ var "m"))
-    (var "sourceNs")
-    (list [var "modTypeNs"])
-    (list [var "modTypeNs"])
-    (list [var "moduleDef"])
-
--- | Generate the lexicon content from a graph.
--- Lists all primitives, types, and terms with their types.
-generateLexicon :: TTermDefinition (Graph -> Prelude.Either Error String)
-generateLexicon = define "generateLexicon" $
-  doc "Generate the lexicon content from a graph" $
-  "graph" ~>
-  "bindings" <~ Lexical.graphToBindings @@ var "graph" $
-  "primitives" <~ Maps.elems (Graph.graphPrimitives $ var "graph") $
-  "partitioned" <~ Lists.partition ("b" ~> Annotations.isNativeType @@ var "b") (var "bindings") $ -- TODO: refactor lexicon to use Definition directly
-  "typeBindings" <~ Pairs.first (var "partitioned") $
-  "termBindings" <~ Pairs.second (var "partitioned") $
-  "sortedPrimitives" <~ Lists.sortOn ("p" ~> Graph.primitiveName (var "p")) (var "primitives") $
-  "sortedTypes" <~ Lists.sortOn ("b" ~> Core.bindingName (var "b")) (var "typeBindings") $
-  "sortedTerms" <~ Lists.sortOn ("b" ~> Core.bindingName (var "b")) (var "termBindings") $
-  "typeLines" <<~ Eithers.mapList ("b" ~> formatTypeBinding @@ var "graph" @@ var "b") (var "sortedTypes") $
-  "termLines" <~ Lists.map ("b" ~> formatTermBinding @@ var "b") (var "sortedTerms") $
-  "primitiveLines" <~ Lists.map ("p" ~> formatPrimitive @@ var "p") (var "sortedPrimitives") $
-  right $
-    (string "Primitives:\n") ++ Strings.unlines (var "primitiveLines")
-    ++ (string "\nTypes:\n") ++ Strings.unlines (var "typeLines")
-    ++ (string "\nTerms:\n") ++ Strings.unlines (var "termLines")
-
--- | Convert a Module to a JSON string.
--- Encodes the Module as a Term, converts to JSON, then serializes to a string.
--- The schema map is used to resolve type variables during type-directed encoding.
-moduleToJson :: TTermDefinition (M.Map Name Type -> Module -> Either Error String)
-moduleToJson = define "moduleToJson" $
-  doc "Convert a Module to a JSON string" $
-  "schemaMap" ~> "m" ~>
-  "term" <~ encoderFor _Module @@ var "m" $
-  "modType" <~ Core.typeVariable (wrap _Name (string "hydra.packaging.Module")) $
-  Eithers.map ("json" ~> var "hydra.json.writer.printJson" @@ var "json")
-    (Eithers.bimap ("_e" ~> Error.errorOther $ Error.otherError $ var "_e") ("_a" ~> var "_a")
-      (var "hydra.json.encode.toJson" @@ var "schemaMap" @@ Core.nameLift _Module @@ var "modType" @@ var "term"))
-
--- | Rebuild a module's term definitions using freshly inferred bindings.
--- Type-only modules (containing only native type definitions) are returned unchanged.
--- Term definitions that are not present in the inferred-bindings list are dropped.
-refreshModule :: TTermDefinition ([Binding] -> Module -> Module)
-refreshModule = define "refreshModule" $
-  doc "Rebuild a module's term definitions using freshly inferred bindings" $
-  "inferredElements" ~> "m" ~>
-  Logic.ifElse (Logic.not $ hasTermDefinitions (var "m"))
-    (var "m")
-    (Packaging.module_
-      (Packaging.moduleDescription $ var "m")
-      (Packaging.moduleNamespace $ var "m")
-      (Packaging.moduleTermDependencies $ var "m")
-      (Packaging.moduleTypeDependencies $ var "m")
-      (Maybes.cat $ Lists.map
-        ("d" ~> cases _Definition (var "d") Nothing [
-          _Definition_type>>: "td" ~> just (Packaging.definitionType (var "td")),
-          _Definition_term>>: "td" ~> Maybes.map
-            ("b" ~> Packaging.definitionTerm (Packaging.termDefinition
-              (Core.bindingName $ var "b")
-              (Core.bindingTerm $ var "b")
-              (Core.bindingTypeScheme $ var "b")))
-            (Lists.find ("b" ~> Equality.equal (Core.bindingName $ var "b") (Packaging.termDefinitionName $ var "td"))
-              (var "inferredElements"))])
-        (Packaging.moduleDefinitions $ var "m")))
-
--- | Perform type inference on a set of modules and reconstruct the target modules
--- with inferred types. Type-only modules (containing only native type definitions)
--- are passed through unchanged.
-inferModules :: TTermDefinition (Context -> Graph -> [Module] -> [Module] -> Prelude.Either Error [Module])
-inferModules = define "inferModules" $
-  doc "Perform type inference on modules and reconstruct with inferred types" $
-  "cx" ~> "bsGraph" ~> "universeMods" ~> "targetMods" ~>
-  "g0" <~ modulesToGraph @@ var "bsGraph" @@ var "universeMods" @@ var "universeMods" $
-  "dataElements" <~ Lists.concat (Lists.map ("m" ~> moduleTermBindings (var "m")) (var "universeMods")) $
-  "inferResultWithCx" <<~ Inference.inferGraphTypes @@ var "cx" @@ var "dataElements" @@ var "g0" $
-  "inferResult" <~ Pairs.first (var "inferResultWithCx") $
-  "inferredElements" <~ Pairs.second (var "inferResult") $
-  right $ Lists.map (refreshModule @@ var "inferredElements") (var "targetMods")
-
--- | Incrementally infer types for target modules, using the universe as a seeded inference context.
---
--- Computes the transitive term-dependency closure of 'targetMods' (self-inclusive). Any binding in
--- that closure is a candidate for inference; any binding OUTSIDE the closure is kept as-is. The
--- candidate set is further partitioned:
---
--- 1. Bindings in the closure whose owning module is in 'targetMods', OR bindings without a
---    pre-attached scheme, are fed to 'inferGraphTypes'. The first case is the caller's explicit
---    request; the second covers transitive dependencies that haven't been inferred yet and would
---    otherwise appear untyped to the inference pass.
--- 2. Bindings in the closure that are already typed (have a 'TypeScheme' from a prior inference
---    run) and whose module is NOT a target are kept verbatim. Their schemes flow into
---    'graphBoundTypes' via 'modulesToGraph', so references from group (1) resolve through
---    'inferTypeOfVariable's boundTypes branch — which already emits correctly-sized
---    'TypeApplication' wrappers matching each cached scheme's quantifier count.
--- 3. Bindings outside the closure are irrelevant to target inference and are returned unchanged.
---
--- The target modules are refreshed from the union of newly-inferred bindings (group 1) and
--- the untouched typed closure bindings (group 2).
---
--- When 'targetMods' equals 'universeMods' and no non-target bindings are typed, this reduces to
--- identical behavior to 'inferModules'. When a caching layer pre-populates schemes on clean
--- modules, only the target set plus any transitively-reachable untyped binding is actually
--- re-solved — the point of issue #247.
-inferModulesGiven :: TTermDefinition (Context -> Graph -> [Module] -> [Module] -> Prelude.Either Error [Module])
-inferModulesGiven = define "inferModulesGiven" $
-  doc "Infer types for target modules in the context of a typed universe" $
-  "cx" ~> "bsGraph" ~> "universeMods" ~> "targetMods" ~>
-  "g0" <~ modulesToGraph @@ var "bsGraph" @@ var "universeMods" @@ var "universeMods" $
-  -- Namespace index over the full universe, used to resolve module dep edges.
-  "nsMap" <~ Maps.fromList (Lists.map
-    ("m" ~> pair (Packaging.moduleNamespace $ var "m") (var "m"))
-    (var "universeMods")) $
-  -- Transitive closure of term-deps for the target set (self-inclusive).
-  "closureMods" <~ moduleTermDepsTransitive @@ var "nsMap" @@ var "targetMods" $
-  "targetNamespaces" <~ Sets.fromList (Lists.map (unaryFunction Packaging.moduleNamespace) (var "targetMods")) $
-  -- Walk each closure module, deciding per-module whether to re-infer all its bindings
-  -- (if it's a target) or only its untyped bindings (if it's a transitive dep). Bindings of
-  -- non-target closure modules that already carry a scheme are kept verbatim; their schemes
-  -- are in graphBoundTypes via modulesToGraph so references from re-inferred bindings resolve
-  -- through inferTypeOfVariable with correctly-sized TypeApplication wrappers.
-  "bindingsToInfer" <~ Lists.concat (Lists.map
-    ("m" ~>
-      "isTarget" <~ Sets.member (Packaging.moduleNamespace (var "m")) (var "targetNamespaces") $
-      "bs" <~ moduleTermBindings (var "m") $
-      Logic.ifElse (var "isTarget")
-        (var "bs")
-        (Lists.filter ("b" ~> Maybes.isNothing (Core.bindingTypeScheme (var "b"))) (var "bs")))
-    (var "closureMods")) $
-  "untouchedTypedBindings" <~ Lists.concat (Lists.map
-    ("m" ~>
-      "isTarget" <~ Sets.member (Packaging.moduleNamespace (var "m")) (var "targetNamespaces") $
-      "bs" <~ moduleTermBindings (var "m") $
-      Logic.ifElse (var "isTarget")
-        (TTerm (Terms.list []) :: TTerm [Binding])
-        (Lists.filter ("b" ~> Maybes.isJust (Core.bindingTypeScheme (var "b"))) (var "bs")))
-    (var "closureMods")) $
-  "inferResultWithCx" <<~ Inference.inferGraphTypes @@ var "cx" @@ var "bindingsToInfer" @@ var "g0" $
-  "inferResult" <~ Pairs.first (var "inferResultWithCx") $
-  "newlyInferredBindings" <~ Pairs.second (var "inferResult") $
-  "allInferredBindings" <~ Lists.concat2 (var "newlyInferredBindings") (var "untouchedTypedBindings") $
-  right $ Lists.map (refreshModule @@ var "allInferredBindings") (var "targetMods")
-
--- | Generate encoder or decoder modules for a list of type modules.
--- Takes a codec function, bootstrap graph, universe modules, and type modules.
--- Returns the generated coder modules (Nothing results are filtered out).
-generateCoderModules
-  :: TTermDefinition ((Context -> Graph -> Module -> Prelude.Either Error (Maybe Module)) -> Graph -> [Module] -> [Module]
-    -> Context -> Prelude.Either Error [Module])
-generateCoderModules = define "generateCoderModules" $
-  doc "Generate encoder or decoder modules for a list of type modules" $
-  "codec" ~> "bsGraph" ~> "universeModules" ~> "typeModules" ~> "cx" ~>
-  -- Build a graph that includes both schema and data elements, since codecs need to dereference type elements
-  "universe" <~ Maps.fromList (Lists.map
-    ("m" ~> pair (Packaging.moduleNamespace $ var "m") (var "m"))
-    (Lists.concat2 (var "universeModules") (var "universeModules"))) $
-  "schemaModules" <~ moduleTypeDepsTransitive @@ var "universe" @@ var "universeModules" $
-  "dataModules" <~ moduleTermDepsTransitive @@ var "universe" @@ var "universeModules" $
-  "schemaElements" <~ Lists.concat (Lists.map ("m" ~> moduleTypeBindings (var "m"))
-      (Lists.concat2 (var "schemaModules") (var "universeModules"))) $
-  "dataElements" <~ Lists.concat (Lists.map ("m" ~> moduleTermBindings (var "m")) (var "dataModules")) $
-  "schemaGraph" <~ Lexical.elementsToGraph @@ var "bsGraph" @@ Maps.empty @@ var "schemaElements" $
-  "schemaTypes" <~ Eithers.either_
-    (constant (Maps.empty :: TTerm (M.Map Name TypeScheme)))
-    ("_r" ~> var "_r")
-    (Environment.schemaGraphToTypingEnvironment @@ var "schemaGraph") $
-  "allElements" <~ Lists.concat2 (var "schemaElements") (var "dataElements") $
-  "graph" <~ Lexical.elementsToGraph @@ var "bsGraph" @@ var "schemaTypes" @@ var "allElements" $
-  Eithers.map ("results" ~> Maybes.cat (var "results")) $
-    Eithers.mapList ("m" ~> var "codec" @@ var "cx" @@ var "graph" @@ var "m") (var "typeModules")
-
--- | Perform type inference on a graph and generate its lexicon.
--- Composes inferGraphTypes and generateLexicon into a single computation.
-inferAndGenerateLexicon :: TTermDefinition (Context -> Graph -> [Module] -> Prelude.Either Error String)
-inferAndGenerateLexicon = define "inferAndGenerateLexicon" $
-  doc "Perform type inference and generate the lexicon for a set of modules" $
-  "cx" ~> "bsGraph" ~> "kernelModules" ~>
-  "g0" <~ modulesToGraph @@ var "bsGraph" @@ var "kernelModules" @@ var "kernelModules" $
-  "dataElements" <~ Lists.concat (Lists.map ("m" ~> moduleTermBindings (var "m")) (var "kernelModules")) $
-  "inferResultWithCx" <<~ Inference.inferGraphTypes @@ var "cx" @@ var "dataElements" @@ var "g0" $
-  "g1" <~ Pairs.first (Pairs.first $ var "inferResultWithCx") $
-  generateLexicon @@ var "g1"
-
--- | Escape unescaped control characters (< 0x20) inside JSON string literals.
--- Operates on a list of int32 character codes (bytes).
--- Walks through the list tracking whether we're inside a string and
--- replaces raw control chars with \\uXXXX escape sequences.
-escapeControlCharsInJson :: TTermDefinition ([Int] -> [Int])
-escapeControlCharsInJson = define "escapeControlCharsInJson" $
-  doc "Escape unescaped control characters inside JSON string literals" $
-  "input" ~>
-  "hexDigit" <~ ("n" ~>
-    Logic.ifElse (Equality.lt (var "n") (int32 10))
-      (Math.add (int32 0x30) (var "n"))       -- '0' + n
-      (Math.add (int32 0x61) (Math.sub (var "n") (int32 10)))) $ -- 'a' + (n - 10)
-  -- Divisor is a literal 16 (non-zero), so maybeDiv/maybeMod always succeed;
-  -- the 0 fallback is unreachable.
-  "escapeToUnicode" <~ ("b" ~>
-    list [int32 0x5C, int32 0x75, int32 0x30, int32 0x30,
-          var "hexDigit" @@ (Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "b") (int32 16))),
-          var "hexDigit" @@ (Maybes.fromMaybe (int32 0) (Math.maybeMod (var "b") (int32 16)))]) $
-  -- go :: Bool -> Bool -> [Int32] -> [Int32]
-  "go" <~ ("inStr" ~> "esc" ~> "bytes" ~>
-    Maybes.maybe
-      (TTerm (Terms.list []) :: TTerm [Int])
-      ("uc" ~>
-       "b" <~ Pairs.first (var "uc") $
-       "bs" <~ Pairs.second (var "uc") $
-       Logic.ifElse (var "esc")
-         -- after backslash, pass through next byte
-         (Lists.cons (var "b") (var "go" @@ var "inStr" @@ boolean False @@ var "bs"))
-         (Logic.ifElse (Logic.and (Equality.equal (var "b") (int32 0x5C)) (var "inStr"))
-           -- backslash inside string
-           (Lists.cons (var "b") (var "go" @@ var "inStr" @@ boolean True @@ var "bs"))
-           (Logic.ifElse (Equality.equal (var "b") (int32 0x22))
-             -- quote toggles string mode
-             (Lists.cons (var "b") (var "go" @@ (Logic.not $ var "inStr") @@ boolean False @@ var "bs"))
-             (Logic.ifElse (Logic.and (var "inStr") (Equality.lt (var "b") (int32 0x20)))
-               -- control char: replace with \uXXXX
-               (Lists.concat2 (var "escapeToUnicode" @@ var "b") (var "go" @@ var "inStr" @@ boolean False @@ var "bs"))
-               -- normal byte
-               (Lists.cons (var "b") (var "go" @@ var "inStr" @@ boolean False @@ var "bs"))))))
-      (Lists.uncons $ var "bytes")) $
-  var "go" @@ boolean False @@ boolean False @@ var "input"
-
--- | Decode a single module from a JSON value.
--- Given a bootstrap graph, universe modules, and a JSON value, decodes it to a Packaging.
--- This is the pure core of the JSON module loading pipeline.
-decodeModuleFromJson :: TTermDefinition (Graph -> [Module] -> JsonModel.Value -> Either Error Module)
-decodeModuleFromJson = define "decodeModuleFromJson" $
-  doc "Decode a single module from a JSON value" $
-  "bsGraph" ~> "universeModules" ~> "jsonVal" ~>
-  "graph" <~ modulesToGraph @@ var "bsGraph" @@ var "universeModules" @@ var "universeModules" $
-  "schemaMap" <~ buildSchemaMap @@ var "graph" $
-  "modType" <~ Core.typeVariable (Core.nameLift _Module) $
-  -- Step 1: JSON -> Term
-  Eithers.either_
-    ("err" ~> left (Error.errorOther $ Error.otherError $ var "err"))
-    ("term" ~>
-      -- Step 2: Term -> Module (via decoderFor _Module)
-      Eithers.either_
-        ("decErr" ~> left (Error.errorDecoding $ var "decErr"))
-        ("mod" ~> right (var "mod"))
-        (decoderFor _Module @@ var "graph" @@ var "term"))
-    (JsonDecode.fromJson @@ var "schemaMap" @@ Core.nameLift _Module @@ var "modType" @@ var "jsonVal")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Hoisting.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Hoisting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Hoisting.hs
+++ /dev/null
@@ -1,882 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Hoisting where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  augmentBindingsWithNewFreeVars,
-  bindingIsPolymorphic, bindingUsesContextTypeVars,
-  countVarOccurrences,
-  hoistAllLetBindings, hoistCaseStatements, hoistCaseStatementsInGraph, hoistLetBindingsWithContext, hoistLetBindingsWithPredicate, hoistPolymorphicLetBindings, hoistSubterms,
-  isApplicationFunction, isLambdaBody, isUnionElimination, isUnionEliminationApplication,
-  normalizePathForHoisting,
-  shouldHoistAll, shouldHoistCaseStatement, shouldHoistPolymorphic, updateHoistState)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Environment as Environment
-import qualified Hydra.Sources.Kernel.Terms.Resolution as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Scoping as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Sorting as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Substitution as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-
-
-ns :: Namespace
-ns = Namespace "hydra.hoisting"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Lexical.ns, Rewriting.ns, Environment.ns, Resolution.ns, Scoping.ns, Sorting.ns, Strip.ns, Substitution.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Functions for deep term rewriting operations involving hoisting subterms or bindings into enclosing let terms."}
-  where
-   definitions = [
-     toDefinition augmentBindingsWithNewFreeVars,
-     toDefinition bindingIsPolymorphic,
-     toDefinition bindingUsesContextTypeVars,
-     toDefinition countVarOccurrences,
-     toDefinition hoistAllLetBindings,
-     toDefinition hoistCaseStatements,
-     toDefinition hoistCaseStatementsInGraph,
-     toDefinition hoistLetBindingsWithContext,
-     toDefinition hoistLetBindingsWithPredicate,
-     toDefinition hoistPolymorphicLetBindings,
-     toDefinition hoistSubterms,
-     toDefinition isApplicationFunction,
-     toDefinition isLambdaBody,
-     toDefinition isUnionElimination,
-     toDefinition isUnionEliminationApplication,
-     toDefinition normalizePathForHoisting,
-     toDefinition shouldHoistAll,
-     toDefinition shouldHoistCaseStatement,
-     toDefinition shouldHoistPolymorphic,
-     toDefinition updateHoistState]
-
--- | Check if a binding has a polymorphic type (non-empty list of type scheme variables)
-bindingIsPolymorphic :: TTermDefinition (Binding -> Bool)
-bindingIsPolymorphic = define "bindingIsPolymorphic" $
-  doc "Check if a binding has a polymorphic type (non-empty list of type scheme variables)" $
-  "binding" ~>
-  optCases (Core.bindingTypeScheme $ var "binding")
-    false  -- No type scheme means monomorphic (or untyped)
-    ("ts" ~> Logic.not $ Lists.null $ Core.typeSchemeVariables $ var "ts")
-
--- | Check if a binding's type uses any type variables from the given Graph.
--- This checks if the free type variables in the binding's type intersect with
--- the type variables in scope (graphTypeVariables).
-bindingUsesContextTypeVars :: TTermDefinition (Graph -> Binding -> Bool)
-bindingUsesContextTypeVars = define "bindingUsesContextTypeVars" $
-  doc ("Check if a binding's type uses any type variables from the given Graph."
-    <> " Returns True if the free type variables in the binding's type intersect with"
-    <> " the type variables in scope (graphTypeVariables).") $
-  "cx" ~> "binding" ~>
-  optCases (Core.bindingTypeScheme $ var "binding")
-    false  -- No type scheme means no type variables used
-    ("ts" ~>
-      "freeInType" <~ Variables.freeVariablesInType @@ Core.typeSchemeBody (var "ts") $
-      "contextTypeVars" <~ Graph.graphTypeVariables (var "cx") $
-      Logic.not $ Sets.null $ Sets.intersection (var "freeInType") (var "contextTypeVars"))
-
--- | Count the number of occurrences of a variable name in a term. Assumes no variable shadowing.
-countVarOccurrences :: TTermDefinition (Name -> Term -> Int)
-countVarOccurrences = define "countVarOccurrences" $
-  doc "Count the number of occurrences of a variable name in a term. Assumes no variable shadowing." $
-  "name" ~> "term" ~>
-  "childCount" <~ Lists.foldl
-    ("acc" ~> "t" ~> Math.add (var "acc") (countVarOccurrences @@ var "name" @@ var "t"))
-    (int32 0)
-    (Rewriting.subterms @@ var "term") $
-  cases _Term (var "term")
-    (Just $ var "childCount") [
-    _Term_variable>>: "v" ~>
-      Logic.ifElse (Equality.equal (var "v") (var "name"))
-        (Math.add (int32 1) (var "childCount"))
-        (var "childCount")]
-
--- | Augment bindings with new free variables introduced by substitution, wrapping with lambdas after any type lambdas.
-augmentBindingsWithNewFreeVars :: TTermDefinition (Graph -> S.Set Name -> [Binding] -> ([Binding], TermSubst))
-augmentBindingsWithNewFreeVars = define "augmentBindingsWithNewFreeVars" $
-  doc "Augment bindings with new free variables introduced by substitution, wrapping with lambdas after any type lambdas." $
-  "cx" ~> "boundVars" ~> "bindings" ~>
-  "types" <~ Maps.map (Scoping.typeSchemeToFType) (Graph.graphBoundTypes (var "cx")) $
-  "wrapAfterTypeLambdas" <~ ("vars" ~> "term" ~>
-    cases _Term (var "term")
-      -- Default: wrap with lambdas (for any non-type-lambda term)
-      (Just $ Lists.foldl
-        ("t" ~> "p" ~> Core.termLambda $ Core.lambda (Pairs.first $ var "p") (Pairs.second $ var "p") (var "t"))
-        (var "term") (Lists.reverse $ var "vars")) [
-      -- Recurse through type lambdas
-      _Term_typeLambda>>: "tl" ~>
-        Core.termTypeLambda $ Core.typeLambda
-          (Core.typeLambdaParameter $ var "tl")
-          (var "wrapAfterTypeLambdas" @@ var "vars" @@ (Core.typeLambdaBody $ var "tl"))]) $
-  "augment" <~ ("b" ~>
-    "freeVars" <~ Sets.toList (Sets.intersection (var "boundVars") (Variables.freeVariablesInTerm @@ (Core.bindingTerm $ var "b"))) $
-    "varTypePairs" <~ Lists.map ("v" ~> pair (var "v") (Maps.lookup (var "v") (var "types"))) (var "freeVars") $
-    "varTypes" <~ Maybes.cat (Lists.map (unaryFunction Pairs.second) (var "varTypePairs")) $
-    Logic.ifElse (Logic.or (Lists.null $ var "freeVars")
-                           (Logic.not $ Equality.equal (Lists.length $ var "varTypes") (Lists.length $ var "varTypePairs")))
-      (pair (var "b") nothing)
-      (pair
-        (Core.binding
-          (Core.bindingName $ var "b")
-          (var "wrapAfterTypeLambdas" @@ var "varTypePairs" @@ (Core.bindingTerm $ var "b"))
-          (Maybes.map ("ts" ~> Core.typeScheme
-            (Core.typeSchemeVariables $ var "ts")
-            (Lists.foldl
-              ("acc" ~> "t" ~> Core.typeFunction $ Core.functionType (var "t") (var "acc"))
-              (Core.typeSchemeBody $ var "ts")
-              (Lists.reverse $ var "varTypes"))
-            (Core.typeSchemeConstraints $ var "ts")) (Core.bindingTypeScheme $ var "b")))
-        (just $ pair
-          (Core.bindingName $ var "b")
-          (Lists.foldl
-            ("t" ~> "v" ~> Core.termApplication $ Core.application (var "t") (Core.termVariable $ var "v"))
-            (Core.termVariable $ Core.bindingName $ var "b")
-            (var "freeVars"))))) $
-  "results" <~ Lists.map (var "augment") (var "bindings") $
-  pair
-    (Lists.map (unaryFunction Pairs.first) (var "results"))
-    (Typing.termSubst $ Maps.fromList $ Maybes.cat $ Lists.map (unaryFunction Pairs.second) (var "results"))
-
--- | Predicate for hoisting polymorphic bindings.
--- A binding should be hoisted if it is polymorphic or uses outer type variables.
-shouldHoistPolymorphic :: TTermDefinition (Graph -> Binding -> Bool)
-shouldHoistPolymorphic = define "shouldHoistPolymorphic" $
-  doc ("Predicate for hoisting polymorphic bindings."
-    <> " Returns True if the binding is polymorphic (has type scheme variables)"
-    <> " or if its type uses any type variables from the Graph.") $
-  "cx" ~> "binding" ~>
-  Logic.or (bindingIsPolymorphic @@ var "binding") (bindingUsesContextTypeVars @@ var "cx" @@ var "binding")
-
--- | Predicate for hoisting all bindings unconditionally.
-shouldHoistAll :: TTermDefinition (Graph -> Binding -> Bool)
-shouldHoistAll = define "shouldHoistAll" $
-  doc "Predicate that always returns True, for hoisting all bindings unconditionally." $
-  constant (constant true)
-
-hoistLetBindingsWithPredicate :: TTermDefinition ((Binding -> Bool) -> (Graph -> Binding -> Bool) -> Graph -> Let -> Let)
-hoistLetBindingsWithPredicate = define "hoistLetBindingsWithPredicate" $
-  doc ("Transform a let-term by pulling let bindings to the top level."
-    <> " The isParentBinding predicate applies to top-level bindings and determines whether their subterm bindings are"
-    <> " eligible for hoisting."
-    <> " The shouldHoistBinding predicate takes the Graph and a subterm binding,"
-    <> " and returns True if the binding should be hoisted."
-    <> " This is useful for targets like Java that cannot have polymorphic definitions in arbitrary positions."
-    <> " The Graph provides information about type variables and lambda variables in scope."
-    <> " If a hoisted binding captures let-bound or lambda-bound variables from an enclosing scope,"
-    <> " the binding is wrapped in lambdas for those variables, and references are replaced"
-    <> " with applications."
-    <> " If a hoisted binding captures type variables from an enclosing type lambda scope,"
-    <> " those type variables are added to the binding's type scheme, and references are replaced"
-    <> " with type applications."
-    <> " Note: we assume that there is no variable shadowing; use hydra.rewriting.unshadowVariables first.") $
-  "isParentBinding" ~> "shouldHoistBinding" ~> "cx0" ~> "let0" ~>
-  "hoistOne" <~ ("prefix" ~> "cx" ~> "pair" ~> "bindingWithCapturedVars" ~>
-    "bindingAndReplacementPairs" <~ Pairs.first (var "pair") $
-    "alreadyUsedNames" <~ Pairs.second (var "pair") $
-    "b" <~ Pairs.first (var "bindingWithCapturedVars") $
-    "capturedTermVars" <~ Pairs.second (var "bindingWithCapturedVars") $
-    "types" <~ Maps.map (Scoping.typeSchemeToFType) (Graph.graphBoundTypes (var "cx")) $
-    "capturedTermVarTypePairs" <~ Lists.map
-      ("v" ~> pair (var "v") (Maps.lookup (var "v") (var "types")))
-      (var "capturedTermVars") $
-    -- We can only construct a new type scheme if all of the captured term variables have types
-    -- If there are any captured term variables, we create a function type
-    "capturedTermVarTypes" <~ Lists.map ("typ" ~> Strip.deannotateTypeParameters @@ var "typ") (Maybes.cat (Lists.map (unaryFunction Pairs.second) (var "capturedTermVarTypePairs"))) $
-    -- Captured type vars include those free in the binding's type AND those free in captured term var types.
-    -- The latter is needed because wrapping with lambdas for captured term vars introduces their types
-    -- into the hoisted binding's type.
-    "freeInBindingType" <~ optCases (Core.bindingTypeScheme $ var "b")
-      Sets.empty
-      ("ts" ~> Variables.freeVariablesInType @@ (Core.typeSchemeBody $ var "ts")) $
-    "freeInCapturedVarTypes" <~ Sets.unions (Lists.map ("t" ~> Variables.freeVariablesInType @@ var "t") (var "capturedTermVarTypes")) $
-    "capturedTypeVars" <~ Sets.toList (Sets.intersection
-      (Graph.graphTypeVariables $ var "cx")
-      (Sets.union (var "freeInBindingType") (var "freeInCapturedVarTypes"))) $
-    "globalBindingName" <~ Lexical.chooseUniqueName
-      @@ var "alreadyUsedNames"
-      @@ (Core.name (Strings.cat2 (var "prefix") (Core.unName $ Core.bindingName $ var "b"))) $
-    "newUsedNames" <~ Sets.insert (var "globalBindingName") (var "alreadyUsedNames") $
-    "newTypeScheme" <~ Logic.ifElse
-      (Equality.equal (Lists.length $ var "capturedTermVarTypes") (Lists.length $ var "capturedTermVarTypePairs"))
-      (Maybes.map
-        ("ts" ~> Core.typeScheme
-          (Lists.nub $ Lists.concat2 (var "capturedTypeVars") (Core.typeSchemeVariables $ var "ts"))
-          (Lists.foldl
-            ("t" ~> "a" ~> Core.typeFunction $ Core.functionType (var "a") (var "t"))
-            (Core.typeSchemeBody $ var "ts")
-            (Lists.reverse $ var "capturedTermVarTypes"))
-          (Core.typeSchemeConstraints $ var "ts"))
-       (Core.bindingTypeScheme $ var "b"))
-      nothing $
-
-    -- Strip only outer type lambda wrappers from the original term (preserving type application wrappers).
-    -- Then re-add all type scheme variables as type lambdas.
-    "strippedTerm" <~ Strip.stripTypeLambdas @@ (Core.bindingTerm $ var "b") $
-    "termWithLambdas" <~ Lists.foldl
-      ("t" ~> "p" ~> Core.termLambda $ Core.lambda (Pairs.first $ var "p") (Maybes.map ("dom" ~> Strip.deannotateTypeParameters @@ var "dom") (Pairs.second $ var "p")) (var "t"))
-      (var "strippedTerm")
-      (Lists.reverse $ var "capturedTermVarTypePairs") $
-    -- Add type lambdas for all new type scheme variables (captured + original scheme vars)
-    "termWithTypeLambdas" <~ Lists.foldl
-      ("t" ~> "v" ~> Core.termTypeLambda $ Core.typeLambda (var "v") (var "t"))
-      (var "termWithLambdas")
-      (Lists.reverse $ Maybes.maybe (list ([] :: [TTerm Name])) (unaryFunction Core.typeSchemeVariables) $ var "newTypeScheme") $
-
-    -- Build the replacement: first apply type variables for captured type vars,
-    -- then apply term variables for captured term vars.
-    -- E.g. if capturedTypeVars=[a,b] and capturedTermVars=[x], replacement is: f_q⟨a⟩⟨b⟩ x
-    "withTypeApps" <~ Lists.foldl
-      ("t" ~> "v" ~> Core.termTypeApplication $ Core.typeApplicationTerm (var "t") (Core.typeVariable $ var "v"))
-      (Core.termVariable $ var "globalBindingName")
-      (var "capturedTypeVars") $
-    "replacement" <~ Lists.foldl
-      ("t" ~> "v" ~> Core.termApplication $ Core.application (var "t") (Core.termVariable $ var "v"))
-      (var "withTypeApps")
-      (var "capturedTermVars") $
-
-    "newBindingAndReplacement" <~ pair
-      (Core.binding (var "globalBindingName") (var "termWithTypeLambdas") (var "newTypeScheme"))
-      (var "replacement") $
-
-    -- Note: using cons for efficiency; will reverse later so that original bindings come first
-    "newPairs" <~ Lists.cons (var "newBindingAndReplacement") (var "bindingAndReplacementPairs") $
-    pair (var "newPairs") (var "newUsedNames")) $
-
-  -- Rewriting function for subterms of existing bindings which also produces hoisted bindings
-  "rewrite" <~ ("prefix" ~> "recurse" ~> "cx" ~> "bindingsAndNames" ~> "term" ~>
-    -- Save previously finished bindings before we recurse; we don't want to apply the same substitutions to these
-    "previouslyFinishedBindings" <~ Pairs.first (var "bindingsAndNames") $
-    "emptyBindingsAndNames" <~ pair
-      (list ([] :: [TBinding Binding]))
-      (Pairs.second $ var "bindingsAndNames") $
-    -- Recurse to hoist bindings from further subterms. After this, we only need to check for let at the current level.
-    "result" <~ var "recurse" @@ var "emptyBindingsAndNames" @@ var "term" $
-    "newBindingsAndNames" <~ Pairs.first (var "result") $
-    "bindingsSoFar" <~ Pairs.first (var "newBindingsAndNames") $
-    "alreadyUsedNames" <~ Pairs.second (var "newBindingsAndNames") $
-    "newTerm" <~ Pairs.second (var "result") $
-    cases _Term (var "newTerm")
-      -- Not a let; we are done with this subterm
-      (Just $ pair
-        (pair (Lists.concat2 (var "previouslyFinishedBindings") (var "bindingsSoFar")) (var "alreadyUsedNames"))
-        (var "newTerm")) [
-      -- For a let term, we must process its bindings, hoist any or all of them as needed,
-      -- and then we must replace any references to the hoisted bindings
-      _Term_let>>: "l" ~>
-        "body" <~ Core.letBody (var "l") $
-
-        -- Separate bindings to be hoisted from those to be left in place
-        "partitionPair" <~ Lists.partition (var "shouldHoistBinding" @@ var "cx") (Core.letBindings $ var "l") $
-        "hoistUs" <~ Pairs.first (var "partitionPair") $
-        "keepUs" <~ Pairs.second (var "partitionPair") $
-
-        -- Find all of the term-level variables which are captured by each binding to be hoisted.
-        -- Because of dependencies between sibling bindings, this must be done all at once, rather than
-        -- individually per binding.
-        "hoistedBindingNames" <~ Lists.map (unaryFunction $ Core.bindingName) (var "hoistUs") $
-
-        -- Polymorphic let-bound variables, which are hoisted themselves.
-        -- We need to include them for argument propagation, but exclude them from the final list of arguments
-        -- for each hoisted binding.
-        "polyLetVariables" <~ (Sets.fromList $ Lists.filter
-          ("v" ~> optCases (Maybes.map (Scoping.typeSchemeToFType) $ Maps.lookup (var "v") (Graph.graphBoundTypes $ var "cx"))
-            false -- This function should not be applied to untyped terms, but we make a hopeful guess if it is
-            Resolution.fTypeIsPolymorphic)
-          (Sets.toList $ Sets.difference (Sets.fromList $ Maps.keys $ Graph.graphBoundTerms $ var "cx") (Graph.graphLambdaVariables $ var "cx"))) $
-
-        "boundTermVariables" <~ Sets.union
-          (Graph.graphLambdaVariables $ var "cx")
-          (Sets.difference (Sets.fromList $ Maps.keys $ Graph.graphBoundTerms $ var "cx") (Graph.graphLambdaVariables $ var "cx")) $
-        "freeVariablesInEachBinding" <~ Lists.map
-          ("b" ~> Sets.toList $ Sets.intersection
-            (var "boundTermVariables")
-            (Variables.freeVariablesInTerm @@ (Core.bindingTerm $ var "b")))
-          (var "hoistUs") $
-        "bindingDependencies" <~ Lists.map
-          ("vars" ~> Lists.partition
-            ("v" ~> Sets.member (var "v") (Sets.fromList $ var "hoistedBindingNames"))
-            (var "vars"))
-          (var "freeVariablesInEachBinding") $
-        "bindingEdges" <~ Lists.zip
-          (var "hoistedBindingNames")
-          (Lists.map (unaryFunction Pairs.first) (var "bindingDependencies")) $
-        "bindingImmediateCapturedVars" <~ Lists.zip
-          (var "hoistedBindingNames")
-          (Lists.map (unaryFunction Pairs.second) (var "bindingDependencies")) $
-        "capturedVarsMap" <~ Maps.fromList (Sorting.propagateTags @@ var "bindingEdges" @@ var "bindingImmediateCapturedVars") $
-        "bindingsWithCapturedVars" <~ Lists.map
-          ("b" ~> pair (var "b") $ optCases (Maps.lookup (Core.bindingName $ var "b") (var "capturedVarsMap"))
-            (list ([] :: [TTerm Name]))
-            ("vars" ~> Sets.toList $ Sets.difference (var "vars") (var "polyLetVariables")))
-          (var "hoistUs") $
-
-        -- Now hoist each binding, keeping track of the names used so far. We get back a list of
-        -- top-level bindings along with replacement terms for each bound name.
-        "hoistPairsAndNames" <~ Lists.foldl
-          (var "hoistOne" @@ var "prefix" @@ var "cx")
-          (pair (list ([] :: [TTerm (Binding, Term)])) (var "alreadyUsedNames"))
-          (var "bindingsWithCapturedVars") $
-        "hoistPairs" <~ Lists.reverse (Pairs.first $ var "hoistPairsAndNames") $
-        "hoistedBindings" <~ Lists.map (unaryFunction Pairs.first) (var "hoistPairs") $
-        "replacements" <~ Lists.map (unaryFunction Pairs.second) (var "hoistPairs") $
-        "finalUsedNames" <~ Pairs.second (var "hoistPairsAndNames") $
-
-        -- Pair each hoisted name with its replacement
-        "hoistNameReplacementPairs" <~ Lists.zip
-          (Lists.map (unaryFunction Core.bindingName) (var "hoistUs"))
-          (var "replacements") $
-
-        -- Map from binding name to original binding (for checking polymorphism)
-        "hoistBindingMap" <~ Maps.fromList (Lists.map
-          ("b" ~> pair (Core.bindingName $ var "b") (var "b"))
-          (var "hoistUs")) $
-
-        -- A binding is cacheable if: (1) referenced >1 time in body, AND (2) not polymorphic.
-        -- Polymorphic bindings (with non-empty typeSchemeVariables) can't be local Java variables.
-        -- Non-polymorphic bindings (hoisted only because they use context type vars) are safe to cache.
-        "isCacheable" <~ ("name" ~>
-          "multiRef" <~ Equality.gte (countVarOccurrences @@ var "name" @@ var "body") (int32 2) $
-          "isPoly" <~ optCases (Maps.lookup (var "name") (var "hoistBindingMap"))
-            false
-            ("b" ~> bindingIsPolymorphic @@ var "b") $
-          Logic.and (var "multiRef") (Logic.not $ var "isPoly")) $
-
-        -- Split into single-ref/polymorphic (substitute directly) and cacheable (keep as local let)
-        "singleRefPairs" <~ Lists.filter
-          ("p" ~> Logic.not $ var "isCacheable" @@ Pairs.first (var "p"))
-          (var "hoistNameReplacementPairs") $
-        "multiRefPairs" <~ Lists.filter
-          ("p" ~> var "isCacheable" @@ Pairs.first (var "p"))
-          (var "hoistNameReplacementPairs") $
-
-        -- Full substitution for all hoisted names (used for hoisted bindings, kept bindings, etc.)
-        "fullSubst" <~ (Typing.termSubst $ Maps.fromList $ var "hoistNameReplacementPairs") $
-        -- Partial substitution for single-ref names only (used for the body)
-        "bodyOnlySubst" <~ (Typing.termSubst $ Maps.fromList $ var "singleRefPairs") $
-
-        -- Substitute only single-ref names in the body; multi-ref names stay as variable refs
-        "bodySubst" <~ Substitution.substituteInTerm @@ var "bodyOnlySubst" @@ var "body" $
-
-        -- Create local let bindings for multi-ref hoisted names.
-        -- These bind the original name to the replacement expression (which calls the hoisted function once).
-        -- Carry over the original binding's TypeScheme so that downstream code can use typeOf without inference.
-        "cacheBindings" <~ Lists.map
-          ("p" ~>
-            "origType" <~ optCases (Maps.lookup (Pairs.first $ var "p") (var "hoistBindingMap"))
-              nothing
-              ("b" ~> Core.bindingTypeScheme $ var "b") $
-            Core.binding (Pairs.first $ var "p") (Pairs.second $ var "p") (var "origType"))
-          (var "multiRefPairs") $
-
-        -- Wrap the body in a let with the cache bindings if there are any
-        "bodyWithCache" <~ Logic.ifElse (Lists.null $ var "cacheBindings")
-          (var "bodySubst")
-          (Core.termLet $ Core.let_ (var "cacheBindings") (var "bodySubst")) $
-
-        -- Use full substitution for everything except the body
-        "keepUsSubst" <~ Lists.map (Substitution.substituteInBinding @@ var "fullSubst") (var "keepUs") $
-        "hoistedBindingsSubst" <~ Lists.map (Substitution.substituteInBinding @@ var "fullSubst") (var "hoistedBindings") $
-        "bindingsSoFarSubst" <~ Lists.map (Substitution.substituteInBinding @@ var "fullSubst") (var "bindingsSoFar") $
-
-        -- Augment bindings from inner lets with any new free variables introduced by substitution
-        "augmentResult" <~ augmentBindingsWithNewFreeVars @@ var "cx" @@ (Sets.difference (var "boundTermVariables") (var "polyLetVariables")) @@ var "bindingsSoFarSubst" $
-        "bindingsSoFarAugmented" <~ Pairs.first (var "augmentResult") $
-        "augmentSubst" <~ Pairs.second (var "augmentResult") $
-
-        -- Apply the augment substitution to update references in other bindings and body
-        "hoistedBindingsFinal" <~ Lists.map (Substitution.substituteInBinding @@ var "augmentSubst") (var "hoistedBindingsSubst") $
-        "bindingsSoFarFinal" <~ Lists.map (Substitution.substituteInBinding @@ var "augmentSubst") (var "bindingsSoFarAugmented") $
-        "bodyFinal" <~ Substitution.substituteInTerm @@ var "augmentSubst" @@ var "bodyWithCache" $
-        "keepUsFinal" <~ Lists.map (Substitution.substituteInBinding @@ var "augmentSubst") (var "keepUsSubst") $
-
-        "finalTerm" <~ Logic.ifElse (Lists.null (var "keepUsFinal"))
-          (var "bodyFinal")
-          (Core.termLet $ Core.let_ (var "keepUsFinal") (var "bodyFinal")) $
-
-        pair
-          (pair
-            (Lists.concat $ list [var "previouslyFinishedBindings", var "hoistedBindingsFinal", var "bindingsSoFarFinal"])
-            (var "finalUsedNames"))
-          (var "finalTerm")]) $
-  "cx1" <~ Scoping.extendGraphForLet @@ ("c" ~> "b" ~> nothing) @@ var "cx0" @@ var "let0" $
-  -- Each binding becomes a list of bindings: the original one with substitutions in its body,
-  -- as well as hoisted bindings from any level. The hoisted bindings share the original binding's namespace.
-  -- Since each top-level binding has exclusive access to its hoisted bindings, it can be processed individually.
-  "forActiveBinding" <~ ("b" ~>
-    -- Note: no possibility of name collisions between groups of hoisted bindings, because the names of the parent
-    -- bindings are unique.
-    "prefix" <~ (Strings.cat2 (Core.unName (Core.bindingName $ var "b")) (string "_")) $
-    "init" <~ pair (list ([] :: [TTerm Binding])) (Sets.singleton $ Core.bindingName $ var "b") $
-    "resultPair" <~ Rewriting.rewriteAndFoldTermWithGraph
-      @@ (var "rewrite" @@ var "prefix") @@ var "cx1" @@ var "init" @@ (Core.bindingTerm $ var "b") $
-    "resultBindings" <~ Pairs.first (Pairs.first (var "resultPair")) $
-    "resultTerm" <~ Pairs.second (var "resultPair") $
-    Lists.cons (Core.bindingWithTerm (var "b") (var "resultTerm")) (var "resultBindings")) $
-  "forBinding" <~ ("b" ~> Logic.ifElse (var "isParentBinding" @@ var "b")
-    (var "forActiveBinding" @@ var "b")
-    (list [var "b"])) $
-  Core.let_
-    (Lists.concat $ Lists.map (var "forBinding") $ Core.letBindings $ var "let0")
-    -- Original let body; hoisting more deeply nested bindings does not introduce additional variables into the body,
-    -- and we do not hoist bindings from the body itself.
-    -- This function is primarily intended for module-level transformations into targets like Java,
-    -- in which we only care about the bindings of a whole-graph let term, while discarding the trivial let body.
-    (Core.letBody $ var "let0")
-
--- | Transform a let-term by pulling all polymorphic let bindings to the top level
-hoistPolymorphicLetBindings :: TTermDefinition ((Binding -> Bool) -> Let -> Let)
-hoistPolymorphicLetBindings = define "hoistPolymorphicLetBindings" $
-  doc ("Transform a let-term by pulling all polymorphic let bindings to the top level."
-    <> " This is useful to ensure that polymorphic bindings are not nested within other terms,"
-    <> " which is unsupported by certain targets such as Java."
-    <> " Polymorphic bindings are those with a non-empty list of type scheme variables."
-    <> " If a hoisted binding captures lambda-bound variables from an enclosing scope,"
-    <> " the binding is wrapped in lambdas for those variables, and references are replaced"
-    <> " with applications."
-    <> " Note: Assumes no variable shadowing; use hydra.rewriting.unshadowVariables first.") $
-  "isParentBinding" ~> "let0" ~>
-  "emptyCx" <~ Graph.emptyGraph $
-  hoistLetBindingsWithPredicate @@ var "isParentBinding" @@ shouldHoistPolymorphic @@ var "emptyCx" @@ var "let0"
-
-hoistLetBindingsWithContext :: TTermDefinition ((Binding -> Bool) -> Graph -> Let -> Let)
-hoistLetBindingsWithContext = define "hoistLetBindingsWithContext" $
-  doc ("Transform a let-term by pulling polymorphic let bindings to the top level, using Graph."
-    <> " A binding is hoisted if:"
-    <> " (1) It is polymorphic (has non-empty typeSchemeVariables), OR"
-    <> " (2) Its type uses type variables from the Graph (i.e., from enclosing type lambdas)."
-    <> " Bindings which are already at the top level are not hoisted."
-    <> " If a hoisted binding captures lambda-bound or let-bound variables from an enclosing scope,"
-    <> " the binding is wrapped in lambdas for those variables, and references are replaced"
-    <> " with applications."
-    <> " If a hoisted binding uses type variables from the context, those type variables are"
-    <> " added to the binding's type scheme."
-    <> " Note: we assume that there is no variable shadowing; use hydra.rewriting.unshadowVariables first.") $
-  "isParentBinding" ~> "cx" ~> "let0" ~>
-  hoistLetBindingsWithPredicate @@ var "isParentBinding" @@ shouldHoistPolymorphic @@ var "cx" @@ var "let0"
-
-hoistAllLetBindings :: TTermDefinition (Let -> Let)
-hoistAllLetBindings = define "hoistAllLetBindings" $
-  doc ("Transform a let-term by pulling ALL let bindings to the top level."
-    <> " This is useful for targets like Java that don't support nested let expressions at all."
-    <> " If a hoisted binding captures lambda-bound variables from an enclosing scope,"
-    <> " the binding is wrapped in lambdas for those variables, and references are replaced"
-    <> " with applications."
-    <> " Note: Assumes no variable shadowing; use hydra.rewriting.unshadowVariables first.") $
-  "let0" ~>
-  "emptyCx" <~ Graph.emptyGraph $
-  hoistLetBindingsWithPredicate @@ constant true @@ shouldHoistAll @@ var "emptyCx" @@ var "let0"
-
-hoistCaseStatements :: TTermDefinition (Graph -> Term -> Term)
-hoistCaseStatements = define "hoistCaseStatements" $
-  doc ("Hoist case statements into local let bindings."
-    <> " This is useful for targets such as Python which only support case statements (match) at the top level."
-    <> " Case statements are hoisted only when they appear at non-top-level positions."
-    <> " Top level = root, or reachable through annotations, let body/binding, lambda bodies, or ONE application LHS."
-    <> " Once through an application LHS, lambda bodies no longer count as pass-through.") $
-  hoistSubterms @@ shouldHoistCaseStatement
-
-hoistCaseStatementsInGraph :: TTermDefinition ([Binding] -> [Binding])
-hoistCaseStatementsInGraph = define "hoistCaseStatementsInGraph" $
-  doc ("Hoist case statements into local let bindings for a list of bindings."
-    <> " This version operates prior to inference and uses an empty type context."
-    <> " It hoists case statements and their applied arguments into let bindings.") $
-  "bindings" ~>
-  -- Create an empty graph (no lambda variables to track since we're pre-inference)
-  "emptyTx" <~ Graph.emptyGraph $
-  -- Convert bindings to a let term, apply hoisting, extract bindings back
-  "term0" <~ Core.termLet (Core.let_ (var "bindings") Core.termUnit) $
-  "term1" <~ hoistCaseStatements @@ var "emptyTx" @@ var "term0" $
-  Environment.termAsBindings @@ var "term1"
-
--- | Check if a term is a union elimination (case statement)
-isUnionElimination :: TTermDefinition (Term -> Bool)
-isUnionElimination = define "isUnionElimination" $
-  doc "Check if a term is a union elimination (case statement)" $
-  "term" ~> cases _Term (var "term")
-    (Just false) [
-    _Term_cases>>: constant true]
-
--- | Check if a term is a case statement applied to an argument (i.e. Application where the function is a union elimination).
--- This is used for hoisting: we want to hoist the entire application, not just the bare case function.
-isUnionEliminationApplication :: TTermDefinition (Term -> Bool)
-isUnionEliminationApplication = define "isUnionEliminationApplication" $
-  doc "Check if a term is an application of a union elimination (case statement applied to an argument)" $
-  "term" ~> cases _Term (var "term")
-    (Just false) [
-    _Term_application>>: "app" ~>
-      isUnionElimination @@ (Strip.deannotateAndDetypeTerm @@ (Core.applicationFunction $ var "app"))]
-
--- | Wrap a list of bindings in a let term, pushing the let inside any leading lambdas.
--- This ensures that hoisted bindings don't break function analysis, which expects
--- lambdas before lets (not the other way around).
--- e.g., instead of Let([h=...], Lambda(p, body)), this produces Lambda(p, Let([h=...], body))
-wrapLetInsideLambdas :: TTermDefinition ([Binding] -> Term -> Term)
-wrapLetInsideLambdas = define "wrapLetInsideLambdas" $
-  doc "Wrap bindings in a let term, pushing the let inside leading lambdas" $
-  "bindings" ~> "term" ~>
-  cases _Term (var "term") (Just $ Core.termLet $ Core.let_ (var "bindings") (var "term")) [
-    _Term_lambda>>: "lam" ~>
-      Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "lam")
-        (Core.lambdaDomain $ var "lam")
-        (wrapLetInsideLambdas @@ var "bindings" @@ Core.lambdaBody (var "lam")),
-    _Term_annotated>>: "ann" ~>
-      Core.termAnnotated $ Core.annotatedTerm
-        (wrapLetInsideLambdas @@ var "bindings" @@ Core.annotatedTermBody (var "ann"))
-        (Core.annotatedTermAnnotation $ var "ann")]
-
--- | Update state when traversing an accessor in the path for hoisting logic.
--- State is (stillAtTopLevel, haveUsedAppLHS).
--- Returns updated state after processing one accessor.
-updateHoistState :: TTermDefinition (SubtermStep -> (Bool, Bool) -> (Bool, Bool))
-updateHoistState = define "updateHoistState" $
-  doc ("Update hoisting state when traversing an accessor."
-    <> " State is (atTopLevel, usedAppLHS). Returns updated state.") $
-  "accessor" ~> "state" ~>
-  "atTop" <~ Pairs.first (var "state") $
-  "usedApp" <~ Pairs.second (var "state") $
-  -- If already not at top level, stay that way
-  Logic.ifElse (Logic.not $ var "atTop")
-    (pair false (var "usedApp"))
-    -- Check this accessor
-    (cases _SubtermStep (var "accessor")
-      -- Default: any other accessor takes us out of top level
-      (Just $ pair false (var "usedApp")) [
-      -- Annotations are transparent
-      _SubtermStep_annotatedBody>>: constant $ pair true (var "usedApp"),
-      -- Let body and binding are pass-through
-      _SubtermStep_letBody>>: constant $ pair true (var "usedApp"),
-      _SubtermStep_letBinding>>: constant $ pair true (var "usedApp"),
-      -- Lambda body: pass-through if we haven't used app LHS yet
-      _SubtermStep_lambdaBody>>: constant $
-        Logic.ifElse (var "usedApp")
-          (pair false true)   -- After app LHS, lambda body is not pass-through
-          (pair true false),  -- Before app LHS, lambda body is pass-through
-      -- Case branches: same rules as lambda body
-      _SubtermStep_unionCasesBranch>>: constant $
-        Logic.ifElse (var "usedApp")
-          (pair false true)
-          (pair true false),
-      _SubtermStep_unionCasesDefault>>: constant $
-        Logic.ifElse (var "usedApp")
-          (pair false true)
-          (pair true false),
-      -- Application function (LHS): mark usedApp=true
-      _SubtermStep_applicationFunction>>: constant $
-        Logic.ifElse (var "usedApp")
-          (pair false true)  -- Already used app, not at top level
-          (pair true true),  -- First app, still at top level but mark usedApp
-      -- Application argument: takes us out of top level
-      _SubtermStep_applicationArgument>>: constant $ pair false (var "usedApp")])
-
--- | Normalize a path by handling immediately-applied lambdas.
--- The pattern [applicationFunction, lambdaBody, ...] represents (\x -> ...) arg
--- which is semantically equivalent to let x = arg in ...
--- We replace applicationFunction followed by lambdaBody with just letBody,
--- which allows the case inside to remain at "top level".
-normalizePathForHoisting :: TTermDefinition ([SubtermStep] -> [SubtermStep])
-normalizePathForHoisting = define "normalizePathForHoisting" $
-  doc ("Normalize a path for hoisting by treating immediately-applied lambdas as let bindings."
-    <> " Replaces [applicationFunction, lambdaBody, ...] with [letBody, ...].") $
-  "path" ~>
-  -- Helper: process pairs of adjacent accessors
-  "go" <~ ("remaining" ~>
-    Maybes.maybe
-      (var "remaining")
-      ("uc1" ~>
-        "first" <~ Pairs.first (var "uc1") $
-        "afterFirst" <~ Pairs.second (var "uc1") $
-        Maybes.maybe
-          -- Only one element: return as-is (no pair to inspect)
-          (var "remaining")
-          ("uc2" ~>
-            "second" <~ Pairs.first (var "uc2") $
-            "rest" <~ Pairs.second (var "uc2") $
-            Logic.ifElse (Logic.and (isApplicationFunction @@ var "first")
-                                    (isLambdaBody @@ var "second"))
-              -- Replace with letBody and continue
-              (Lists.cons (inject _SubtermStep _SubtermStep_letBody unit)
-                          (var "go" @@ var "rest"))
-              -- Keep first element and continue
-              (Lists.cons (var "first") (var "go" @@ var "afterFirst")))
-          (Lists.uncons $ var "afterFirst"))
-      (Lists.uncons $ var "remaining")) $
-  var "go" @@ var "path"
-
--- | Check if an accessor is applicationFunction
-isApplicationFunction :: TTermDefinition (SubtermStep -> Bool)
-isApplicationFunction = define "isApplicationFunction" $
-  "acc" ~> cases _SubtermStep (var "acc")
-    (Just false) [
-    _SubtermStep_applicationFunction>>: constant true]
-
--- | Check if an accessor is lambdaBody
-isLambdaBody :: TTermDefinition (SubtermStep -> Bool)
-isLambdaBody = define "isLambdaBody" $
-  "acc" ~> cases _SubtermStep (var "acc")
-    (Just false) [
-    _SubtermStep_lambdaBody>>: constant true]
-
--- | Predicate for hoisting case statement applications (union elimination applied to an argument).
--- Returns True if the term is a case statement application AND it is NOT at "top level".
---
--- Top level means: reachable from root through ONLY these accessor types:
---   - Annotations (transparent, always pass through)
---   - Let body or let binding (equivalent to lambda body for Python defs)
---   - Lambda body (more arguments to the def, as long as not after app LHS)
---   - ONE application function position (the single argument to match)
---
--- Once we've gone through an application function position, we can no longer
--- pass through lambda bodies (we've consumed the one allowed argument slot).
---
--- The path is traversed from the END (deepest/most recent accessor) toward
--- the beginning (root), tracking state:
---   - "atRoot": can pass through annotations, let body/binding, lambda body, or ONE app LHS
---   - "afterAppLHS": have used the one app LHS, can only pass through annotations
---   - Any other accessor: not at top level, should hoist if it's a case
-shouldHoistCaseStatement :: TTermDefinition (([SubtermStep], Term) -> Bool)
-shouldHoistCaseStatement = define "shouldHoistCaseStatement" $
-  doc ("Predicate for case statement hoisting."
-    <> " Returns True if term is a union elimination (bare case function) or a case statement application"
-    <> " (union elimination applied to an argument) AND not at top level."
-    <> " Top level = reachable through annotations, let body/binding, lambda bodies, or ONE app LHS."
-    <> " Once through an app LHS, lambda bodies no longer pass through.") $
-  "pathAndTerm" ~>
-  "path" <~ Pairs.first (var "pathAndTerm") $
-  "term" <~ Pairs.second (var "pathAndTerm") $
-  -- If not a union elimination or case statement application, don't hoist
-  Logic.ifElse (Logic.not $ Logic.or (isUnionElimination @@ var "term") (isUnionEliminationApplication @@ var "term"))
-    false
-    -- Walk the path from root to deepest, tracking whether we're still at top level
-    -- State is (stillAtTopLevel, haveUsedAppLHS)
-    -- Initial state: at top level, haven't used app LHS
-    ("finalState" <~ Lists.foldl
-      ("st" ~> "acc" ~> updateHoistState @@ var "acc" @@ var "st")
-      (pair true false)
-      (var "path") $
-    -- If still at top level, don't hoist. If not at top level, hoist.
-    Logic.not $ Pairs.first $ var "finalState")
-
-hoistSubterms :: TTermDefinition ((([SubtermStep], Term) -> Bool) -> Graph -> Term -> Term)
-hoistSubterms = define "hoistSubterms" $
-  doc ("Hoist subterms into local let bindings based on a path-aware predicate."
-    <> " The predicate receives a pair of (path, term) where path is the list of SubtermSteps"
-    <> " from the root to the current term, and returns True if the term should be hoisted."
-    <> " For each let term found, the immediate subterms (binding values and body) are processed:"
-    <> " matching subterms within each immediate subterm are collected and hoisted into a local let"
-    <> " that wraps that immediate subterm."
-    <> " If a hoisted term contains free variables that are lambda-bound at an enclosing scope,"
-    <> " the hoisted binding is wrapped in lambdas for those variables, and the reference"
-    <> " is replaced with an application of those variables.") $
-  "shouldHoist" ~> "cx0" ~> "term0" ~>
-
-  -- Process a single immediate subterm: find all hoistable subterms, extract them, wrap in local let
-  -- Returns (newCounter, transformedSubterm)
-  -- Uses Rewriting.rewriteAndFoldTermWithGraphAndPath to track paths and graph context
-  -- The accumulator is (counter, [Binding])
-  -- The namePrefix parameter is used to create stable hoisted binding names (e.g., the parent binding's name)
-  -- The pathPrefix parameter provides the path context from enclosing scopes, allowing
-  -- shouldHoist to correctly determine whether a term is at top-level or not.
-  -- For top-level lets this is empty []; for lets inside case branches of applied cases
-  -- it includes the enclosing path, so inner cases are correctly identified for hoisting.
-  "processImmediateSubterm" <~ ("cx" ~> "counter" ~> "namePrefix" ~> "pathPrefix" ~> "subterm" ~>
-    -- Lambda variables that exist at the level of the let (before processing this subterm)
-    -- These don't need to be captured since they're in scope at the hoisting site
-    "baselineLambdaVars" <~ Graph.graphLambdaVariables (var "cx") $
-    -- Collect all hoistable subterms and their replacements using a fold
-    -- The accumulator is (counter, [Binding])
-    -- Important: We stop at let and type lambda boundaries - nested lets are handled by the outer rewrite loop,
-    -- and type lambdas introduce type variables that can't be properly captured for hoisting
-    --
-    -- The user function receives:
-    --   recurse :: a -> Term -> (a, Term) - framework handles subterm iteration
-    --   path :: [SubtermStep]
-    --   cx :: Graph
-    --   acc :: (counter, [Binding])
-    --   term :: Term
-    "collectAndReplace" <~ ("recurse" ~> "path" ~> "cxInner" ~> "acc" ~> "term" ~>
-      "currentCounter" <~ Pairs.first (var "acc") $
-      "collectedBindings" <~ Pairs.second (var "acc") $
-      -- Check if this is a let term or type lambda - if so, don't recurse into it
-      cases _Term (var "term")
-        (Just $
-          -- Default case: let the framework recurse into subterms, then maybe hoist this term
-          "result" <~ var "recurse" @@ var "acc" @@ var "term" $
-          "newAcc" <~ Pairs.first (var "result") $
-          "processedTerm" <~ Pairs.second (var "result") $
-          "newCounter" <~ Pairs.first (var "newAcc") $
-          "newBindings" <~ Pairs.second (var "newAcc") $
-          -- Check if this term should be hoisted, passing the full path (prefix + local)
-          "fullPath" <~ Lists.concat2 (var "pathPrefix") (var "path") $
-          Logic.ifElse (var "shouldHoist" @@ pair (var "fullPath") (var "processedTerm"))
-            -- Hoist: add to collected bindings, return reference
-            -- Use the namePrefix to create stable names: _hoist_<prefix>_<counter>
-            -- Use chooseUniqueName to avoid collisions with names in the enclosing scope
-            ("proposedName" <~ Core.name (Strings.cat (list [string "_hoist_", var "namePrefix", string "_", Literals.showInt32 (var "newCounter")])) $
-             "existingNames" <~ Sets.fromList (Lists.map (lambda "b" $ Core.bindingName (var "b")) (var "newBindings")) $
-             "freeVarsInSubterm" <~ Variables.freeVariablesInTerm @@ var "subterm" $
-             "allReserved" <~ Sets.union (var "existingNames") (var "freeVarsInSubterm") $
-             "bindingName" <~ Lexical.chooseUniqueName @@ var "allReserved" @@ var "proposedName" $
-             -- Find lambda-bound variables that need to be captured
-             -- Only capture variables that were added INSIDE this subterm (not at the let level)
-             "allLambdaVars" <~ Graph.graphLambdaVariables (var "cxInner") $
-             -- Get names that are new lambda vars (in current scope but not baseline)
-             "newLambdaVars" <~ Sets.difference (var "allLambdaVars") (var "baselineLambdaVars") $
-             "freeVars" <~ Variables.freeVariablesInTerm @@ var "processedTerm" $
-             "capturedVars" <~ Sets.toList (Sets.intersection (var "newLambdaVars") (var "freeVars")) $
-             -- Wrap the term in lambdas for each captured variable, looking up their types from the context
-             "typeMap" <~ Maps.map (Scoping.typeSchemeToFType) (Graph.graphBoundTypes (var "cxInner")) $
-             "wrappedTerm" <~ Lists.foldl
-               ("body" ~> "varName" ~>
-                 Core.termLambda $ Core.lambda (var "varName")
-                   (Maps.lookup (var "varName") (var "typeMap"))
-                   (var "body"))
-               (var "processedTerm")
-               (Lists.reverse $ var "capturedVars") $
-             -- Create the reference: apply the binding to all captured variables
-             "reference" <~ Lists.foldl
-               ("fn" ~> "varName" ~>
-                 Core.termApplication $ Core.application (var "fn") (Core.termVariable $ var "varName"))
-               (Core.termVariable $ var "bindingName")
-               (var "capturedVars") $
-             -- Add binding to collected list and return reference as the replacement
-             "newBinding" <~ Core.binding (var "bindingName") (var "wrappedTerm") nothing $
-             -- Return with updated state
-             pair (pair (Math.add (var "newCounter") (int32 1))
-                        (Lists.cons (var "newBinding") (var "newBindings")))
-                  (var "reference"))
-            -- Don't hoist: return (acc, processedTerm) unchanged
-            (pair (var "newAcc") (var "processedTerm")))
-        -- TermLet: stop here; nested lets are handled by the outer rewrite loop
-        -- TermTypeLambda: type lambdas introduce type variables that can't be properly captured
-        [_Term_let>>: constant $ pair (var "acc") (var "term"),
-         _Term_typeLambda>>: constant $ pair (var "acc") (var "term")]) $
-    -- Run the collection/replacement pass using the path-aware rewriter
-    -- Initial acc is (counter, []) - counter and empty list of bindings
-    "result" <~ Rewriting.rewriteAndFoldTermWithGraphAndPath
-      @@ var "collectAndReplace"
-      @@ var "cx"
-      @@ pair (var "counter") (list ([] :: [TTerm Binding]))
-      @@ var "subterm" $
-    -- result is (finalAcc, transformedSubterm)
-    "finalAcc" <~ Pairs.first (var "result") $
-    "transformedSubterm" <~ Pairs.second (var "result") $
-    "finalCounter" <~ Pairs.first (var "finalAcc") $
-    "bindings" <~ Pairs.second (var "finalAcc") $
-    -- If any bindings were collected, wrap in a local let
-    Logic.ifElse (Lists.null (var "bindings"))
-      (pair (var "finalCounter") (var "transformedSubterm"))
-      ("localLet" <~ Core.termLet (Core.let_ (Lists.reverse (var "bindings")) (var "transformedSubterm")) $
-       pair (var "finalCounter") (var "localLet"))) $
-
-  -- Process a let term: apply hoisting to each immediate subterm
-  -- Each binding uses its own name as the prefix for hoisted bindings, providing stable naming.
-  -- The prefix ensures uniqueness across siblings, so changes to one binding won't affect
-  -- the hoisted names in other bindings.
-  -- Each sibling uses the same starting counter (1), and the prefix prevents collisions.
-  "processLetTerm" <~ ("cx" ~> "counter" ~> "path" ~> "lt" ~>
-    "bindings" <~ Core.letBindings (var "lt") $
-    "body" <~ Core.letBody (var "lt") $
-    -- Process each binding value using its name as the prefix
-    -- Each binding starts with counter 1 (reset for each sibling) for stable naming
-    -- The prefix ensures uniqueness across siblings
-    -- The path from the outer rewrite is passed as pathPrefix so that inner collectAndReplace
-    -- knows the full context (e.g., that we're inside a case branch of an applied case)
-    "processBinding" <~ ("acc" ~> "binding" ~>
-      -- Use the binding name as the prefix for hoisted binding names
-      -- Replace dots with underscores to avoid creating module-like names
-      "namePrefix" <~ Strings.intercalate (string "_") (Strings.splitOn (string ".") (Core.unName (Core.bindingName (var "binding")))) $
-      -- Build the pathPrefix for this binding: outer path + letBinding accessor
-      "bindingPathPrefix" <~ Lists.concat2 (var "path") (list [inject _SubtermStep _SubtermStep_letBinding (Core.bindingName $ var "binding")]) $
-      -- Each sibling starts fresh with counter 1 - prefix makes names unique
-      "result" <~ var "processImmediateSubterm" @@ var "cx" @@ int32 1 @@ var "namePrefix" @@ var "bindingPathPrefix" @@ (Core.bindingTerm (var "binding")) $
-      "newValue" <~ Pairs.second (var "result") $
-      "newBinding" <~ Core.binding (Core.bindingName (var "binding")) (var "newValue") (Core.bindingTypeScheme (var "binding")) $
-      Lists.cons (var "newBinding") (var "acc")) $
-    -- Fold over bindings, starting with empty list
-    "newBindingsReversed" <~ Lists.foldl (var "processBinding") (list ([] :: [TTerm Binding])) (var "bindings") $
-    "newBindings" <~ Lists.reverse (var "newBindingsReversed") $
-    -- Process the body with a unique prefix, also starting with counter 1
-    -- Build the pathPrefix for the body: outer path + letBody accessor
-    "bodyPathPrefix" <~ Lists.concat2 (var "path") (list [inject _SubtermStep _SubtermStep_letBody unit]) $
-    -- Use the first binding's name to disambiguate the body prefix across nesting levels
-    "firstBindingName" <~ Maybes.maybe (string "body") (lambda "b" $ Strings.intercalate (string "_") (Strings.splitOn (string ".") (Core.unName (Core.bindingName (var "b"))))) (Lists.maybeHead (var "bindings")) $
-    "bodyPrefix" <~ Strings.cat2 (var "firstBindingName") (string "_body") $
-    "bodyResult" <~ var "processImmediateSubterm" @@ var "cx" @@ int32 1 @@ var "bodyPrefix" @@ var "bodyPathPrefix" @@ var "body" $
-    "newBody" <~ Pairs.second (var "bodyResult") $
-    -- Return the original counter (siblings are independent, so counter doesn't propagate)
-    pair (var "counter") (Core.termLet (Core.let_ (var "newBindings") (var "newBody")))) $
-
-  -- Main rewrite: find let terms and process them
-  -- Uses Rewriting.rewriteAndFoldTermWithGraphAndPath so we have the path context.
-  -- The path is passed to processLetTerm, which forwards it as pathPrefix to
-  -- processImmediateSubterm, so inner collectAndReplace knows the full context
-  -- (e.g., that it's inside a case branch of an applied case).
-  "rewrite" <~ ("recurse" ~> "path" ~> "cx" ~> "counter" ~> "term" ~>
-    cases _Term (var "term")
-      (Just $ var "recurse" @@ var "counter" @@ var "term") [
-      _Term_let>>: "lt" ~>
-        -- Recurse first (bottom-up), then process the let
-        "recursed" <~ var "recurse" @@ var "counter" @@ var "term" $
-        "newCounter" <~ Pairs.first (var "recursed") $
-        "recursedTerm" <~ Pairs.second (var "recursed") $
-        cases _Term (var "recursedTerm")
-          (Just $ pair (var "newCounter") (var "recursedTerm")) [
-          _Term_let>>: "lt2" ~> var "processLetTerm" @@ var "cx" @@ var "newCounter" @@ var "path" @@ var "lt2"]]) $
-
-  Pairs.second $ Rewriting.rewriteAndFoldTermWithGraphAndPath @@ var "rewrite" @@ var "cx0" @@ int32 1 @@ var "term0"
-
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Inference.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Inference.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Inference.hs
+++ /dev/null
@@ -1,1385 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Inference where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  atOrFail,
-  bindConstraints, bindUnboundTypeVariables, buildTypeApplicationTerm,
-  extendContext, finalizeInferredTerm,
-  forInferredTerm, freeVariablesInContext, freshVariableType,
-  generalize, headOrFail, inferGraphTypes, inferInGraphContext, inferMany,
-  inferTypeOf, inferTypeOfAnnotatedTerm, inferTypeOfApplication,
-  inferTypeOfCaseStatement, inferTypeOfCollection,
-  inferTypeOfEither, inferTypeOfInjection,
-  inferTypeOfLambda, inferTypeOfLet, inferTypeOfLetNormalized,
-  inferTypeOfList, inferTypeOfLiteral,
-  inferTypeOfMap, inferTypeOfOptional,
-  inferTypeOfPair, inferTypeOfPrimitive,
-  inferTypeOfProjection, inferTypeOfRecord,
-  inferTypeOfSet, inferTypeOfTerm,
-  inferTypeOfTypeLambda, inferTypeOfTypeApplication,
-  inferTypeOfUnit, inferTypeOfUnwrap, inferTypeOfVariable,
-  inferTypeOfWrappedTerm, inferTypesOfTemporaryBindings,
-  isUnbound, mapConstraints, mergeClassConstraints, showInferenceResult, yield, yieldChecked,
-  yieldCheckedWithConstraints, yieldDebug, yieldWithConstraints)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Dsl.Error.Core       as ErrorsCore
-import qualified Hydra.Sources.Kernel.Terms.Annotations  as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Checking     as Checking
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Reflect      as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting    as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Names        as Names
-import qualified Hydra.Sources.Kernel.Terms.Resolution   as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Variables    as Variables
-import qualified Hydra.Sources.Kernel.Terms.Show.Core    as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors  as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing  as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting      as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Unification  as Unification
-
-
-ns :: Namespace
-ns = Namespace "hydra.inference"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, Checking.ns, ExtractCore.ns, Lexical.ns, Reflect.ns,
-      Rewriting.ns, Names.ns, Resolution.ns, ShowCore.ns, ShowError.ns, ShowTyping.ns, Sorting.ns, Substitution.ns, Variables.ns,
-      Unification.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Type inference following Algorithm W, extended for nominal terms and types"}
-  where
-    definitions = [
-      toDefinition atOrFail,
-      toDefinition bindConstraints,
-      toDefinition bindUnboundTypeVariables,
-      toDefinition buildTypeApplicationTerm,
-      toDefinition extendContext,
-      toDefinition finalizeInferredTerm,
-      toDefinition forInferredTerm,
-      toDefinition freeVariablesInContext,
-      toDefinition freshVariableType,
-      toDefinition generalize,
-      toDefinition headOrFail,
-      toDefinition inferGraphTypes,
-      toDefinition inferInGraphContext,
-      toDefinition inferMany,
-      toDefinition inferTypeOf,
-      toDefinition inferTypeOfAnnotatedTerm,
-      toDefinition inferTypeOfApplication,
-      toDefinition inferTypeOfCaseStatement,
-      toDefinition inferTypeOfCollection,
-      toDefinition inferTypeOfEither,
-      toDefinition inferTypeOfInjection,
-      toDefinition inferTypeOfLambda,
-      toDefinition inferTypeOfLet,
-      toDefinition inferTypeOfLetNormalized,
-      toDefinition inferTypeOfList,
-      toDefinition inferTypeOfLiteral,
-      toDefinition inferTypeOfMap,
-      toDefinition inferTypeOfOptional,
-      toDefinition inferTypeOfPair,
-      toDefinition inferTypeOfPrimitive,
-      toDefinition inferTypeOfProjection,
-      toDefinition inferTypeOfRecord,
-      toDefinition inferTypeOfSet,
-      toDefinition inferTypeOfTerm,
-      toDefinition inferTypeOfTypeLambda,
-      toDefinition inferTypeOfTypeApplication,
-      toDefinition inferTypeOfUnit,
-      toDefinition inferTypeOfUnwrap,
-      toDefinition inferTypeOfVariable,
-      toDefinition inferTypeOfWrappedTerm,
-      toDefinition inferTypesOfTemporaryBindings,
-      toDefinition isUnbound,
-      toDefinition mapConstraints,
-      toDefinition mergeClassConstraints,
-      toDefinition showInferenceResult,
-      toDefinition yield,
-      toDefinition yieldChecked,
-      toDefinition yieldCheckedWithConstraints,
-      toDefinition yieldDebug,
-      toDefinition yieldWithConstraints]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Bridge helper: format InContext UnificationError as a string
-formatUnifError :: TTerm (UnificationError -> String)
-formatUnifError = "e" ~> Error.unificationErrorMessage (var "e")
-
--- | Bridge helper: format InContext Error as a string
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
---
-
--- | Return the element at the given index, or Left(Other) with the given
--- description if the index is out of range. Used to destructure lists of
--- statically known length in Either-returning contexts.
-atOrFail :: TTermDefinition (Int -> String -> [a] -> Prelude.Either Error a)
-atOrFail = define "atOrFail" $
-  doc "Return the element at the given index, or Left(Other) with the given description if out of range" $
-  "i" ~> "desc" ~> "xs" ~>
-  Maybes.maybe
-    (left $ Error.errorOther $ Error.otherError $ (string "atOrFail: ") ++ var "desc")
-    (unaryFunction right)
-    (Lists.maybeAt (var "i") (var "xs"))
-
-bindConstraints :: TTermDefinition (Context -> Graph -> [TypeConstraint] -> Either Error TypeSubst)
-bindConstraints = define "bindConstraints" $
-  doc "Unify type constraints and check the substitution" $
-  "flowCx" ~> "cx" ~> "constraints" ~>
-  "s" <<~ Eithers.bimap
-    ("_e" ~> Error.errorUnification (var "_e"))
-    ("_a" ~> var "_a")
-    (Unification.unifyTypeConstraints @@ var "flowCx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "constraints") $
-  Eithers.bind (Checking.checkTypeSubst @@ var "flowCx" @@ var "cx" @@ var "s") (
-    "_" ~> right (var "s"))
-
-bindUnboundTypeVariables :: TTermDefinition (Graph -> Term -> Term)
-bindUnboundTypeVariables = define "bindUnboundTypeVariables" $
-  doc ("Handle unbound type variables under a typed let binding."
-    <> " Variables appearing free in the binding's declared type (but not in schema types or the scheme's own"
-    <> " quantified variables) are added to the scheme and the term is wrapped in matching TypeLambdas."
-    <> " Variables appearing only in the term body (at type-application or lambda-domain positions)"
-    <> " are phantom — they have no external effect on the binding's type — and are substituted with"
-    <> " hydra.core.Unit in the body rather than generalized. This keeps downstream stages from seeing"
-    <> " vacuous foralls that target languages with non-polymorphic value bindings (e.g. Scala val) cannot express.") $
-  "cx" ~> "term0" ~>
-  "svars" <~ Sets.fromList (Maps.keys $ Graph.graphSchemaTypes $ var "cx") $
-  "rewrite" <~ ("recurse" ~> "term" ~> cases _Term (var "term")
-    (Just $ var "recurse" @@ var "term") [
-    _Term_let>>: "l" ~>
-      "forBinding" <~ ("b" ~>
-        "bname" <~ (Core.bindingName $ var "b") $
-        "bterm" <~ (Core.bindingTerm $ var "b") $
-        optCases (Core.bindingTypeScheme $ var "b")
-          (Core.binding (var "bname") (bindUnboundTypeVariables @@ var "cx" @@ var "bterm") nothing)
-          ("ts" ~>
-            "bvars" <~ Sets.fromList (Core.typeSchemeVariables $ var "ts") $
-            "excluded" <~ Sets.union (var "svars") (var "bvars") $
-            "inType" <~ Sets.difference
-              (Variables.freeVariablesInType @@ (Core.typeSchemeBody $ var "ts"))
-              (var "excluded") $
-            "phantoms" <~ Sets.difference
-              (Variables.freeTypeVariablesInTerm @@ var "bterm")
-              (Sets.union (var "excluded") (var "inType")) $
-            -- Phantom variables appear only in the term body (e.g. at type-application
-            -- positions left behind by inference for unconstrained slots) and have no
-            -- external effect on the binding's type. Substitute them with Unit in the
-            -- body so downstream stages see a closed monomorphic term.
-            "phantomSubst" <~ Typing.typeSubst (Maps.fromList
-              (Lists.map ("v" ~> pair (var "v") Core.typeUnit) (Sets.toList (var "phantoms")))) $
-            "bterm1" <~ Substitution.substTypesInTerm @@ var "phantomSubst" @@ var "bterm" $
-            -- Generalize only over variables that appear in the declared type.
-            "unbound" <~ Sets.toList (var "inType") $
-            "ts2" <~ Core.typeScheme
-              (Lists.concat2
-                (Core.typeSchemeVariables $ var "ts")
-                (var "unbound"))
-              (Core.typeSchemeBody $ var "ts")
-              (Core.typeSchemeConstraints $ var "ts") $
-            "bterm2" <~ Lists.foldl
-              ("t" ~> "v" ~> Core.termTypeLambda
-                (Core.typeLambda (var "v") (var "t")))
-              (var "bterm1")
-              (var "unbound") $
-            Core.binding (var "bname") (var "bterm2") (just $ var "ts2"))) $
-      Core.termLet $ Core.let_
-        (Lists.map (var "forBinding") (Core.letBindings $ var "l"))
-        (bindUnboundTypeVariables @@ var "cx" @@ (Core.letBody $ var "l"))]) $
-  Rewriting.rewriteTerm @@ var "rewrite" @@ var "term0"
-
-buildTypeApplicationTerm :: TTermDefinition ([Name] -> Term -> Term)
-buildTypeApplicationTerm = define "buildTypeApplicationTerm" $
-  doc "Fold a list of type variables over a term to build a type application term" $
-  "tvars" ~> "body" ~> Lists.foldl
-    ("t" ~> "v" ~> Core.termTypeApplication $ Core.typeApplicationTerm (var "t") (Core.typeVariable (var "v")))
-    (var "body")
-    (var "tvars")
-
-extendContext :: TTermDefinition ([(Name, TypeScheme)] -> Graph -> Graph)
-extendContext = define "extendContext" $
-  doc "Add (term variable, type scheme) pairs to the graph's bound types" $
-  "pairs" ~> "cx" ~>
-  Graph.graphWithBoundTypes (var "cx") $ Maps.union
-    (Maps.fromList $ var "pairs")
-    (Graph.graphBoundTypes $ var "cx")
-
-finalizeInferredTerm :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error Term)
-finalizeInferredTerm = define "finalizeInferredTerm" $
-  doc "Finalize an inferred term by checking for unbound type variables, then normalizing type variables" $
-  "flowCx" ~> "cx" ~> "term" ~>
-  "term2" <~ bindUnboundTypeVariables @@ var "cx" @@ var "term" $
-  "_" <<~ Checking.checkForUnboundTypeVariables @@ var "flowCx" @@ var "cx" @@ var "term2" $
-  right (Variables.normalizeTypeVariablesInTerm @@ var "term2")
-
-forInferredTerm :: TTermDefinition (Context -> Graph -> Term -> String -> (InferenceResult -> a) -> Prelude.Either Error (a, Context))
-forInferredTerm = define "forInferredTerm" $
-  doc "Infer a term's type and map over the result" $
-  "fcx" ~> "cx" ~> "term" ~> "desc" ~> "f" ~>
-  "rp" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "term" @@ var "desc" $
-  right $ pair (var "f" @@ var "rp") (Typing.inferenceResultContext (var "rp"))
-
-freeVariablesInContext :: TTermDefinition (Graph -> S.Set Name)
-freeVariablesInContext = define "freeVariablesInContext" $
-  doc "Get all free variables in a graph's bound types" $
-  "cx" ~>
-    Lists.foldl (binaryFunction Sets.union) Sets.empty $
-      Lists.map (Variables.freeVariablesInTypeSchemeSimple) $
-        Maps.elems $ Graph.graphBoundTypes $ var "cx"
-
-freshVariableType :: TTermDefinition (Context -> (Type, Context))
-freshVariableType = define "freshVariableType" $
-  doc "Generate a fresh type variable" $
-  "cx" ~>
-  "result" <~ Names.freshName @@ var "cx" $
-  "name" <~ Pairs.first (var "result") $
-  "cx2" <~ Pairs.second (var "result") $
-  pair (Core.typeVariable (var "name")) (var "cx2")
-
-mergeClassConstraints :: TTermDefinition (M.Map Name TypeVariableMetadata -> M.Map Name TypeVariableMetadata -> M.Map Name TypeVariableMetadata)
-mergeClassConstraints = define "mergeClassConstraints" $
-  doc "Merge two maps of class constraints. When both maps have constraints for the same variable, union the class sets." $
-  "m1" ~> "m2" ~>
-  Lists.foldl
-    ("acc" ~> "pair" ~>
-      "k" <~ Pairs.first (var "pair") $
-      "v" <~ Pairs.second (var "pair") $
-      Maybes.maybe
-        (Maps.insert (var "k") (var "v") (var "acc"))
-        ("existing" ~>
-          "merged" <~ Core.typeVariableMetadata (Sets.union (Core.typeVariableMetadataClasses $ var "existing") (Core.typeVariableMetadataClasses $ var "v")) $
-          Maps.insert (var "k") (var "merged") (var "acc"))
-        (Maps.lookup (var "k") (var "acc")))
-    (var "m1")
-    (Maps.toList $ var "m2")
-
-generalize :: TTermDefinition (Graph -> Type -> TypeScheme)
-generalize = define "generalize" $
-  doc "Generalize a type to a type scheme" $
-  "cx" ~> "typ" ~>
-  -- IMPORTANT: freeVariablesInTypeOrdered returns ALL names from Type_variable positions,
-  -- including qualified type names (like hydra.core.Lambda) which are NOT actual type variables.
-  -- We must filter these out to avoid quantifying over type names.
-  "isTypeVarName" <~ ("name" ~>
-    "parts" <~ Strings.splitOn (string ".") (Core.unName $ var "name") $
-    Equality.lte (Lists.length $ var "parts") (int32 1)) $
-  "vars" <~ Lists.nub (Lists.filter ("v" ~> Logic.and (isUnbound @@ var "cx" @@ var "v") (var "isTypeVarName" @@ var "v")) $
-     Variables.freeVariablesInTypeOrdered @@ var "typ") $
-  -- Extract constraints for the generalized variables from the context
-  "allConstraints" <~ Graph.graphClassConstraints (var "cx") $
-  "relevantConstraints" <~ Maps.fromList (Maybes.cat $ Lists.map
-    ("v" ~> Maybes.map ("meta" ~> pair (var "v") (var "meta")) $ Maps.lookup (var "v") (var "allConstraints"))
-    (var "vars")) $
-  -- Only include constraints if there are any
-  "constraintsMaybe" <~ Logic.ifElse (Maps.null $ var "relevantConstraints") Phantoms.nothing (just $ var "relevantConstraints") $
-  Core.typeScheme (var "vars") (var "typ") (var "constraintsMaybe")
-
--- | Extract the first element of a list, or fail with a descriptive error if
--- the list is empty. Used to destructure lists whose non-emptiness is
--- structurally guaranteed by the caller but not expressible in the type.
-headOrFail :: TTermDefinition (String -> [a] -> Prelude.Either Error a)
-headOrFail = define "headOrFail" $
-  doc "Return the first element of a list, or Left(Other) with the given description if the list is empty" $
-  "desc" ~> "xs" ~>
-  Maybes.maybe
-    (left $ Error.errorOther $ Error.otherError $ (string "headOrFail: ") ++ var "desc")
-    (unaryFunction right)
-    (Lists.maybeHead $ var "xs")
-
-inferGraphTypes :: TTermDefinition (Context -> [Binding] -> Graph -> Prelude.Either Error ((Graph, [Binding]), Context))
-inferGraphTypes = define "inferGraphTypes" $
-  doc ("Infer types for all elements in a graph, using the provided ordered bindings."
-    <> " Returns both the inferred graph and the ordered inferred bindings.") $
-  "fcx0" ~> "bindings0" ~> "g0" ~>
-  "fcx" <~ Ctx.pushTrace (string "graph inference") (var "fcx0") $
-  "let0" <~ Core.let_ (var "bindings0") Core.termUnit $
-  -- Reconstruct a (Graph, [Binding]) from an inferred Let term, preserving binding order
-  "fromLetTerm" <~ ("l" ~>
-    "bindings" <~ Core.letBindings (var "l") $
-    "prims" <~ Graph.graphPrimitives (var "g0") $
-    "schemaTypes" <~ Graph.graphSchemaTypes (var "g0") $
-    "rawG" <~ (Lexical.buildGraph @@ var "bindings" @@ Maps.empty @@ var "prims") $
-    "g" <~ Graph.graphWithSchemaTypes (var "rawG") (var "schemaTypes") $
-    pair (var "g") (var "bindings")) $
-  "result" <<~ inferTypeOfTerm @@ var "fcx" @@ var "g0" @@ (Core.termLet $ var "let0") @@ (string "graph term") $
-  "fcx2" <~ Typing.inferenceResultContext (var "result") $
-  "term" <~ Typing.inferenceResultTerm (var "result") $
-  "finalized" <<~ finalizeInferredTerm @@ var "fcx2" @@ var "g0" @@ var "term" $
-  cases _Term (var "finalized")
-    Nothing [
-    _Term_let>>: "l" ~> right $ pair (var "fromLetTerm" @@ var "l") (var "fcx2"),
-    _Term_variable>>: constant $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "Expected inferred graph as let term")) (var "fcx2")]
-
-inferInGraphContext :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error InferenceResult)
-inferInGraphContext = define "inferInGraphContext" $
-  doc "Infer the type of a term in a given inference context" $
-  "fcx" ~> "cx" ~> "term" ~>
-  inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "term" @@ (string "single term")
-
-
-inferTypeOf :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error ((Term, TypeScheme), Context))
-inferTypeOf = define "inferTypeOf" $
-  doc "Map a possibly untyped term to a fully typed term and its type" $
-  "fcx" ~> "cx" ~> "term" ~>
-  -- Top-level let term which allows us to easily extract an inferred type scheme
-  "letTerm" <~ Core.termLet (Core.let_
-    (list [Core.binding (Core.name $ (string "ignoredVariableName")) (var "term") nothing])
-    (MetaTerms.string "ignoredBody")) $
-  "result" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "letTerm" @@ (string "infer type of term") $
-  "fcx2" <~ Typing.inferenceResultContext (var "result") $
-  "finalized" <<~ finalizeInferredTerm @@ var "fcx2" @@ var "cx" @@ Typing.inferenceResultTerm (var "result") $
-  "letResult" <<~ ExtractCore.let_ @@ var "cx" @@ var "finalized" $
-  "bindings" <~ Core.letBindings (var "letResult") $
-  Logic.ifElse (Equality.equal (int32 1) (Lists.length $ var "bindings"))
-    ("binding" <<~ headOrFail @@ string "inferTypeOf: single binding expected" @@ var "bindings" $
-     "term1" <~ Core.bindingTerm (var "binding") $
-     "mts" <~ Core.bindingTypeScheme (var "binding") $
-     Maybes.maybe
-       (Ctx.failInContext (Error.errorOther $ Error.otherError (string "Expected a type scheme")) (var "fcx2"))
-       ("ts" ~> right $ pair (pair (var "term1") (var "ts")) (var "fcx2"))
-       (var "mts"))
-    (Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [
-      (string "Expected a single binding with a type scheme, but got: "),
-      Literals.showInt32 $ Lists.length $ var "bindings",
-      (string " bindings")])) (var "fcx2"))
-
-
-inferTypeOfLiteral :: TTermDefinition (Context -> Literal -> InferenceResult)
-inferTypeOfLiteral = define "inferTypeOfLiteral" $
-  doc "Infer the type of a literal" $
-  "fcx" ~> "lit" ~>
-  Typing.inferenceResult
-    (Core.termLiteral $ var "lit")
-    (Core.typeLiteral $ Reflect.literalType @@ var "lit")
-    (asTerm Substitution.idTypeSubst)
-    Maps.empty
-    (var "fcx")
-
-
-inferTypeOfUnit :: TTermDefinition (Context -> InferenceResult)
-inferTypeOfUnit = define "inferTypeOfUnit" $
-  doc "The trivial inference rule for the unit term" $
-  "fcx" ~>
-  Typing.inferenceResult
-    (Core.termUnit)
-    (Core.typeUnit)
-    (asTerm Substitution.idTypeSubst)
-    Maps.empty
-    (var "fcx")
-
-isUnbound :: TTermDefinition (Graph -> Name -> Bool)
-isUnbound = define "isUnbound" $
-  doc "Check if a variable is unbound in context" $
-  "cx" ~> "v" ~>
-  Logic.and
-    (Logic.not $ Sets.member (var "v") $ freeVariablesInContext @@ var "cx")
-    (Logic.not $ Maps.member (var "v") $ Graph.graphSchemaTypes $ var "cx")
-
-mapConstraints :: TTermDefinition (Context -> Graph -> (TypeSubst -> a) -> [TypeConstraint] -> Either Error a)
-mapConstraints = define "mapConstraints" $
-  doc "Map over type constraints after unification" $
-  "flowCx" ~> "cx" ~> "f" ~> "constraints" ~>
-  "s" <<~ Eithers.bimap
-    ("_e" ~> Error.errorUnification (var "_e"))
-    ("_a" ~> var "_a")
-    (Unification.unifyTypeConstraints @@ var "flowCx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "constraints") $
-  Eithers.bind (Checking.checkTypeSubst @@ var "flowCx" @@ var "cx" @@ var "s") (
-    "_" ~> right (var "f" @@ var "s"))
-
-showInferenceResult :: TTermDefinition (InferenceResult -> String)
-showInferenceResult = define "showInferenceResult" $
-  doc "Show an inference result for debugging" $
-  "result" ~>
-  "term" <~ Typing.inferenceResultTerm (var "result") $
-  "typ" <~ Typing.inferenceResultType (var "result") $
-  "subst" <~ Typing.inferenceResultSubst (var "result") $
-  Strings.cat $ list [
-    (string "{term="),
-    ShowCore.term @@ var "term",
-    (string ", type="),
-    ShowCore.type_ @@ var "typ",
-    (string ", subst="),
-    ShowTyping.typeSubst @@ var "subst",
-    (string "}")]
-
-yield :: TTermDefinition (Context -> Term -> Type -> TypeSubst -> InferenceResult)
-yield = define "yield" $
-  doc "Create an inference result with no class constraints" $
-  "fcx" ~> "term" ~> "typ" ~> "subst" ~>
-  Typing.inferenceResult
-    (Substitution.substTypesInTerm @@ var "subst" @@ var "term")
-    (Substitution.substInType @@ var "subst" @@ var "typ")
-    (var "subst")
-    Maps.empty
-    (var "fcx")
-
-yieldWithConstraints :: TTermDefinition (Context -> Term -> Type -> TypeSubst -> M.Map Name TypeVariableMetadata -> InferenceResult)
-yieldWithConstraints = define "yieldWithConstraints" $
-  doc "Create an inference result with class constraints" $
-  "fcx" ~> "term" ~> "typ" ~> "subst" ~> "constraints" ~>
-  Typing.inferenceResult
-    (Substitution.substTypesInTerm @@ var "subst" @@ var "term")
-    (Substitution.substInType @@ var "subst" @@ var "typ")
-    (var "subst")
-    (var "constraints")
-    (var "fcx")
-
--- TODO: pass context and variables, and actually check types
-yieldChecked :: TTermDefinition (Context -> Term -> Type -> TypeSubst -> InferenceResult)
-yieldChecked = define "yieldChecked" $
-  doc "Create a checked inference result" $
-  "fcx" ~> "term" ~> "typ" ~> "subst" ~>
-  "iterm" <~ Substitution.substTypesInTerm @@ var "subst" @@ var "term" $
-  "itype" <~ Substitution.substInType @@ var "subst" @@ var "typ" $
-  Typing.inferenceResult (var "iterm") (var "itype") (var "subst") Maps.empty (var "fcx")
-
-yieldCheckedWithConstraints :: TTermDefinition (Context -> Term -> Type -> TypeSubst -> M.Map Name TypeVariableMetadata -> InferenceResult)
-yieldCheckedWithConstraints = define "yieldCheckedWithConstraints" $
-  doc "Create a checked inference result with class constraints" $
-  "fcx" ~> "term" ~> "typ" ~> "subst" ~> "constraints" ~>
-  "iterm" <~ Substitution.substTypesInTerm @@ var "subst" @@ var "term" $
-  "itype" <~ Substitution.substInType @@ var "subst" @@ var "typ" $
-  -- Apply the substitution to constraint keys as well, so they track the final variable names
-  "iconstraints" <~ Substitution.substInClassConstraints @@ var "subst" @@ var "constraints" $
-  Typing.inferenceResult (var "iterm") (var "itype") (var "subst") (var "iconstraints") (var "fcx")
-
--- ============================================================================
--- Inference functions: Either Error InferenceResult
--- All take "fcx" (Context for errors/tracing) and "cx" (Graph for type context)
--- and return InferenceResult (which now contains the updated Context).
--- ============================================================================
-
-inferTypeOfAnnotatedTerm :: TTermDefinition (Context -> Graph -> AnnotatedTerm -> Prelude.Either Error InferenceResult)
-inferTypeOfAnnotatedTerm = define "inferTypeOfAnnotatedTerm" $
-  doc "Infer the type of an annotated term (Either version)" $
-  "fcx" ~> "cx" ~> "at" ~>
-  "term" <~ Core.annotatedTermBody (var "at") $
-  "ann" <~ Core.annotatedTermAnnotation (var "at") $
-  "result" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "term" @@ (string "annotated term") $
-  "fcx2" <~ Typing.inferenceResultContext (var "result") $
-  "iterm" <~ Typing.inferenceResultTerm (var "result") $
-  "itype" <~ Typing.inferenceResultType (var "result") $
-  "isubst" <~ Typing.inferenceResultSubst (var "result") $
-  "iconstraints" <~ Typing.inferenceResultClassConstraints (var "result") $
-  right $ Typing.inferenceResult
-    (Core.termAnnotated $ Core.annotatedTerm (var "iterm") (var "ann"))
-    (var "itype")
-    (var "isubst")
-    (var "iconstraints")
-    (var "fcx2")
-
-inferTypeOfApplication :: TTermDefinition (Context -> Graph -> Application -> Prelude.Either Error InferenceResult)
-inferTypeOfApplication = define "inferTypeOfApplication" $
-  doc "Infer the type of a function application (Either version)" $
-  "fcx0" ~> "cx" ~> "app" ~>
-  "fcx" <~ Ctx.pushTrace (string "application") (var "fcx0") $
-  "e0" <~ Core.applicationFunction (var "app") $
-  "e1" <~ Core.applicationArgument (var "app") $
-  "lhsResult" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "e0" @@ (string "lhs") $
-  "fcx2" <~ Typing.inferenceResultContext (var "lhsResult") $
-  "a" <~ Typing.inferenceResultTerm (var "lhsResult") $
-  "t0" <~ Typing.inferenceResultType (var "lhsResult") $
-  "s0" <~ Typing.inferenceResultSubst (var "lhsResult") $
-  "c0" <~ Typing.inferenceResultClassConstraints (var "lhsResult") $
-  "rhsResult" <<~ inferTypeOfTerm @@ var "fcx2"
-    @@ (Substitution.substInContext @@ var "s0" @@ var "cx")
-    @@ var "e1"
-    @@ (string "rhs") $
-  "fcx3" <~ Typing.inferenceResultContext (var "rhsResult") $
-  "b" <~ Typing.inferenceResultTerm (var "rhsResult") $
-  "t1" <~ Typing.inferenceResultType (var "rhsResult") $
-  "s1" <~ Typing.inferenceResultSubst (var "rhsResult") $
-  "c1" <~ Typing.inferenceResultClassConstraints (var "rhsResult") $
-  "vResult" <~ Names.freshName @@ var "fcx3" $
-  "v" <~ Pairs.first (var "vResult") $
-  "fcx4" <~ Pairs.second (var "vResult") $
-  "s2" <<~ Eithers.bimap
-    ("_e" ~> Error.errorUnification (var "_e"))
-    ("_a" ~> var "_a")
-    (Unification.unifyTypes
-    @@ var "fcx4"
-    @@ (Graph.graphSchemaTypes $ var "cx")
-    @@ (Substitution.substInType @@ var "s1" @@ var "t0")
-    @@ (Core.typeFunction $ Core.functionType (var "t1") (Core.typeVariable $ var "v"))
-    @@ (string "application lhs")) $
-  "_" <<~ Checking.checkTypeSubst @@ var "fcx4" @@ var "cx" @@ var "s2" $
-  "rExpr" <~ Core.termApplication (Core.application
-    (Substitution.substTypesInTerm @@ (Substitution.composeTypeSubst @@ var "s1" @@ var "s2") @@ var "a")
-    (Substitution.substTypesInTerm @@ var "s2" @@ var "b")) $
-  "rType" <~ Substitution.substInType @@ var "s2" @@ Core.typeVariable (var "v") $
-  "rSubst" <~ Substitution.composeTypeSubstList @@ list [var "s0", var "s1", var "s2"] $
-  "c0Subst" <~ Substitution.substInClassConstraints @@ var "s2" @@ (Substitution.substInClassConstraints @@ var "s1" @@ var "c0") $
-  "c1Subst" <~ Substitution.substInClassConstraints @@ var "s2" @@ var "c1" $
-  "rConstraints" <~ mergeClassConstraints @@ var "c0Subst" @@ var "c1Subst" $
-  right $ Typing.inferenceResult (var "rExpr") (var "rType") (var "rSubst") (var "rConstraints") (var "fcx4")
-
-inferTypeOfCaseStatement :: TTermDefinition (Context -> Graph -> CaseStatement -> Prelude.Either Error InferenceResult)
-inferTypeOfCaseStatement = define "inferTypeOfCaseStatement" $
-  doc "Infer the type of a case statement (Either version)" $
-  "fcx" ~> "cx" ~> "caseStmt" ~>
-  "tname" <~ Core.caseStatementTypeName (var "caseStmt") $
-  "dflt" <~ Core.caseStatementDefault (var "caseStmt") $
-  "cases" <~ Core.caseStatementCases (var "caseStmt") $
-  "fnames" <~ Lists.map (unaryFunction Core.fieldName) (var "cases") $
-  "stRp" <<~ Resolution.requireSchemaType @@ var "fcx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "stRp") $
-  "fcx2" <~ Pairs.second (var "stRp") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "stype" <~ Core.typeSchemeBody (var "schemaType") $
-  "sfields" <<~ ExtractCore.unionType @@ var "tname" @@ var "stype" $
-  "dfltRp" <<~ Eithers.mapMaybe ("t" ~> inferTypeOfTerm @@ var "fcx2" @@ var "cx" @@ var "t" @@
-    (Strings.cat $ list [(string "case "), Core.unName $ var "tname", (string ".<default>")])) (var "dflt") $
-  -- dfltRp :: Maybe InferenceResult (context is inside the result)
-  "dfltResult" <~ var "dfltRp" $
-  "fcx3" <~ Maybes.fromMaybe (var "fcx2") (Maybes.map (unaryFunction Typing.inferenceResultContext) (var "dfltRp")) $
-  "caseRp" <<~ inferMany @@ var "fcx3" @@ var "cx" @@ Lists.map
-    ("f" ~> pair (Core.fieldTerm $ var "f")
-      (Strings.cat $ list [(string "case "), Core.unName $ var "tname", (string "."), Core.unName $ Core.fieldName $ var "f"]))
-    (var "cases") $
-  "caseResults" <~ Pairs.first (var "caseRp") $
-  "fcx4" <~ Pairs.second (var "caseRp") $
-  "iterms" <~ Pairs.first (var "caseResults") $
-  "itypes" <~ Pairs.first (Pairs.second $ var "caseResults") $
-  "isubst" <~ Pairs.first (Pairs.second $ Pairs.second $ var "caseResults") $
-  "caseElemConstraints" <~ Pairs.second (Pairs.second $ Pairs.second $ var "caseResults") $
-  "codvResult" <~ Names.freshName @@ var "fcx4" $
-  "codv" <~ Pairs.first (var "codvResult") $
-  "fcx5" <~ Pairs.second (var "codvResult") $
-  "cod" <~ Core.typeVariable (var "codv") $
-  "caseMap" <~ Maps.fromList (Lists.map
-    ("ft" ~> pair (Core.fieldTypeName $ var "ft") (Core.fieldTypeType $ var "ft"))
-    (var "sfields")) $
-  "dfltConstraints" <~ Maybes.toList (Maybes.map
-    ("r" ~> Typing.typeConstraint (var "cod")
-      (Substitution.substInType @@ var "isubst" @@ (Typing.inferenceResultType $ var "r"))
-      (string "match default"))
-    (var "dfltResult")) $
-  "caseConstraints" <~ Maybes.cat (Lists.zipWith
-    ("fname" ~> "itype" ~> Maybes.map
-      ("ftype" ~> Typing.typeConstraint
-        (var "itype")
-        (Core.typeFunction $ Core.functionType (var "ftype") (var "cod"))
-        (string "case type"))
-      (Maps.lookup (var "fname") (var "caseMap")))
-    (var "fnames") (var "itypes")) $
-  "dfltClassConstraints" <~ Maybes.fromMaybe Maps.empty (Maybes.map (unaryFunction Typing.inferenceResultClassConstraints) (var "dfltResult")) $
-  "allElemConstraints" <~ mergeClassConstraints @@ var "caseElemConstraints" @@ var "dfltClassConstraints" $
-  "mcResult" <<~ mapConstraints @@ var "fcx5" @@ var "cx"
-    @@ ("subst" ~> yieldWithConstraints
-      @@ var "fcx5"
-      @@ (buildTypeApplicationTerm @@ var "svars"
-          @@ (Core.termCases $ Core.caseStatement (var "tname") (Maybes.map (unaryFunction Typing.inferenceResultTerm) $ var "dfltResult") $
-            Lists.zipWith ("n" ~> "t" ~> Core.field (var "n") (var "t")) (var "fnames") (var "iterms")))
-      @@ (Core.typeFunction $ Core.functionType
-          (Resolution.nominalApplication @@ var "tname" @@ Lists.map (unaryFunction Core.typeVariable) (var "svars"))
-          (var "cod"))
-      @@ (Substitution.composeTypeSubstList
-        @@ (Lists.concat $ list [
-          Maybes.toList (Maybes.map (unaryFunction Typing.inferenceResultSubst) (var "dfltResult")),
-          list [var "isubst", var "subst"]]))
-      @@ (Substitution.substInClassConstraints @@ var "subst" @@ var "allElemConstraints"))
-    @@ (Lists.concat $ list [var "dfltConstraints", var "caseConstraints"]) $
-  right (var "mcResult")
-
-inferTypeOfCollection :: TTermDefinition (Context -> Graph -> (Type -> Type) -> ([Term] -> Term) -> String -> S.Set Name -> [Term] -> Prelude.Either Error InferenceResult)
-inferTypeOfCollection = define "inferTypeOfCollection" $
-  doc "Infer the type of a collection. The classNames parameter specifies type classes (e.g. ordering) that the element type variable must satisfy." $
-  "fcx" ~> "cx" ~> "typCons" ~> "trmCons" ~> "desc" ~> "classNames" ~> "els" ~>
-  "varResult" <~ Names.freshName @@ var "fcx" $
-  "var" <~ Pairs.first (var "varResult") $
-  "fcx2" <~ Pairs.second (var "varResult") $
-  "classConstraints" <~ Logic.ifElse (Sets.null $ var "classNames")
-    Maps.empty
-    (Maps.singleton (var "var") (Core.typeVariableMetadata $ var "classNames")) $
-  Logic.ifElse (Lists.null $ var "els")
-    (right (yieldWithConstraints
-      @@ var "fcx2"
-      @@ (buildTypeApplicationTerm
-        @@ list [var "var"]
-        @@ (var "trmCons" @@ list ([] :: [TTerm Term])))
-      @@ (var "typCons" @@ (Core.typeVariable $ var "var"))
-      @@ (Substitution.idTypeSubst)
-      @@ var "classConstraints"))
-    ("resultsRp" <<~ inferMany @@ var "fcx2" @@ var "cx" @@
-      (Lists.zip (var "els") $ Lists.map ("i" ~> Strings.cat $ list [(string "#"), Literals.showInt32 $ var "i"]) $
-        Math.range (int32 1) (Math.add (Lists.length $ var "els") (int32 1))) $
-    "results" <~ Pairs.first (var "resultsRp") $
-    "fcx3" <~ Pairs.second (var "resultsRp") $
-    "terms" <~ Pairs.first (var "results") $
-    "types" <~ Pairs.first (Pairs.second $ var "results") $
-    "subst1" <~ Pairs.first (Pairs.second $ Pairs.second $ var "results") $
-    "elemConstraints" <~ Pairs.second (Pairs.second $ Pairs.second $ var "results") $
-    "constraints" <~ Lists.map ("t" ~> Typing.typeConstraint (Core.typeVariable $ var "var") (var "t") (var "desc")) (var "types") $
-    "allConstraints" <~ mergeClassConstraints @@ var "classConstraints" @@ var "elemConstraints" $
-    "mcResult" <<~ mapConstraints @@ var "fcx3" @@ var "cx" @@
-      ("subst2" ~>
-        "iterm" <~ var "trmCons" @@ var "terms" $
-        "itype" <~ var "typCons" @@ (Core.typeVariable $ var "var") $
-        "isubst" <~ Substitution.composeTypeSubst @@ var "subst1" @@ var "subst2" $
-        yieldWithConstraints @@ var "fcx3" @@ var "iterm" @@ var "itype" @@ var "isubst" @@ (Substitution.substInClassConstraints @@ var "subst2" @@ var "allConstraints")) @@
-      var "constraints" $
-    right (var "mcResult"))
-
-inferTypeOfEither :: TTermDefinition (Context -> Graph -> Prelude.Either Term Term -> Prelude.Either Error InferenceResult)
-inferTypeOfEither = define "inferTypeOfEither" $
-  doc "Infer the type of an either value (Either version)" $
-  "fcx" ~> "cx" ~> "e" ~>
-  Eithers.either_
-    ("l" ~>
-      "r1" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "l" @@ (string "either left value") $
-      "fcx2" <~ Typing.inferenceResultContext (var "r1") $
-      "iterm" <~ Typing.inferenceResultTerm (var "r1") $
-      "leftType" <~ Typing.inferenceResultType (var "r1") $
-      "subst" <~ Typing.inferenceResultSubst (var "r1") $
-      "fvResult" <~ freshVariableType @@ var "fcx2" $
-      "rightType" <~ Pairs.first (var "fvResult") $
-      "fcx3" <~ Pairs.second (var "fvResult") $
-      "eitherTerm" <~ (Core.termEither $ left $ var "iterm") $
-      "termWithLeftType" <~ (Core.termTypeApplication $ Core.typeApplicationTerm (var "eitherTerm") (var "leftType")) $
-      "termWithBothTypes" <~ (Core.termTypeApplication $ Core.typeApplicationTerm (var "termWithLeftType") (var "rightType")) $
-      "eitherType" <~ (Core.typeEither $ Core.eitherType (var "leftType") (var "rightType")) $
-      right (yieldChecked @@ var "fcx3" @@ var "termWithBothTypes" @@ var "eitherType" @@ var "subst"))
-    ("r" ~>
-      "r1" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "r" @@ (string "either right value") $
-      "fcx2" <~ Typing.inferenceResultContext (var "r1") $
-      "iterm" <~ Typing.inferenceResultTerm (var "r1") $
-      "rightType" <~ Typing.inferenceResultType (var "r1") $
-      "subst" <~ Typing.inferenceResultSubst (var "r1") $
-      "fvResult" <~ freshVariableType @@ var "fcx2" $
-      "leftType" <~ Pairs.first (var "fvResult") $
-      "fcx3" <~ Pairs.second (var "fvResult") $
-      "eitherTerm" <~ (Core.termEither $ right $ var "iterm") $
-      "termWithLeftType" <~ (Core.termTypeApplication $ Core.typeApplicationTerm (var "eitherTerm") (var "leftType")) $
-      "termWithBothTypes" <~ (Core.termTypeApplication $ Core.typeApplicationTerm (var "termWithLeftType") (var "rightType")) $
-      "eitherType" <~ (Core.typeEither $ Core.eitherType (var "leftType") (var "rightType")) $
-      right (yieldChecked @@ var "fcx3" @@ var "termWithBothTypes" @@ var "eitherType" @@ var "subst"))
-    (var "e")
-
-inferTypeOfInjection :: TTermDefinition (Context -> Graph -> Injection -> Prelude.Either Error InferenceResult)
-inferTypeOfInjection = define "inferTypeOfInjection" $
-  doc "Infer the type of a union injection (Either version)" $
-  "fcx" ~> "cx" ~> "injection" ~>
-  "tname" <~ Core.injectionTypeName (var "injection") $
-  "field" <~ Core.injectionField (var "injection") $
-  "fname" <~ Core.fieldName (var "field") $
-  "term" <~ Core.fieldTerm (var "field") $
-  "result" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "term" @@ (string "injected term") $
-  "fcx2" <~ Typing.inferenceResultContext (var "result") $
-  "stRp" <<~ Resolution.requireSchemaType @@ var "fcx2" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "stRp") $
-  "fcx3" <~ Pairs.second (var "stRp") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "stype" <~ Core.typeSchemeBody (var "schemaType") $
-  "iterm" <~ Typing.inferenceResultTerm (var "result") $
-  "ityp" <~ Typing.inferenceResultType (var "result") $
-  "isubst" <~ Typing.inferenceResultSubst (var "result") $
-  "sfields" <<~ ExtractCore.unionType @@ var "tname" @@ var "stype" $
-  "ftyp" <<~ Resolution.findFieldType @@ var "fcx3" @@ var "fname" @@ var "sfields" $
-  "mcResult" <<~ mapConstraints @@ var "fcx3" @@ var "cx" @@
-    ("subst" ~> yield
-      @@ var "fcx3"
-      @@ (buildTypeApplicationTerm @@ var "svars"
-        @@ (Core.termInject $ Core.injection (var "tname") $ Core.field (var "fname") (var "iterm")))
-      @@ (Resolution.nominalApplication @@ var "tname" @@ Lists.map (unaryFunction Core.typeVariable) (var "svars"))
-      @@ (Substitution.composeTypeSubst @@ var "isubst" @@ var "subst")) @@
-    list [Typing.typeConstraint (var "ftyp") (var "ityp") (string "schema type of injected field")] $
-  right (var "mcResult")
-
-inferTypeOfLambda :: TTermDefinition (Context -> Graph -> Lambda -> Prelude.Either Error InferenceResult)
-inferTypeOfLambda = define "inferTypeOfLambda" $
-  doc "Infer the type of a lambda function (Either version)" $
-  "fcx" ~> "cx" ~> "lambda" ~>
-  "var" <~ Core.lambdaParameter (var "lambda") $
-  "body" <~ Core.lambdaBody (var "lambda") $
-  "vdomResult" <~ Names.freshName @@ var "fcx" $
-  "vdom" <~ Pairs.first (var "vdomResult") $
-  "fcx2" <~ Pairs.second (var "vdomResult") $
-  "dom" <~ Core.typeVariable (var "vdom") $
-  "cx2" <~ (extendContext @@ list [pair (var "var") (Core.typeScheme (list ([] :: [TTerm Name])) (var "dom") Phantoms.nothing)] @@ var "cx") $
-  "result" <<~ inferTypeOfTerm @@ var "fcx2" @@ var "cx2" @@ var "body" @@ (string "lambda body") $
-  "fcx3" <~ Typing.inferenceResultContext (var "result") $
-  "iterm" <~ Typing.inferenceResultTerm (var "result") $
-  "icod" <~ Typing.inferenceResultType (var "result") $
-  "isubst" <~ Typing.inferenceResultSubst (var "result") $
-  "rdom" <~ Substitution.substInType @@ var "isubst" @@ var "dom" $
-  "rterm" <~ Core.termLambda (Core.lambda (var "var") (just $ var "rdom") (var "iterm")) $
-  "rtype" <~ Core.typeFunction (Core.functionType (var "rdom") (var "icod")) $
-  "vars" <~ (Sets.unions $ list [
-    Variables.freeVariablesInType @@ var "rdom",
-    Variables.freeVariablesInType @@ var "icod",
-    freeVariablesInContext @@ (Substitution.substInContext @@ var "isubst" @@ var "cx2")]) $
-  "cx3" <~ Substitution.substInContext @@ var "isubst" @@ var "cx" $
-  "iconstraints" <~ Substitution.substInClassConstraints @@ var "isubst" @@ (Typing.inferenceResultClassConstraints $ var "result") $
-  right (Typing.inferenceResult (var "rterm") (var "rtype") (var "isubst") (var "iconstraints") (var "fcx3"))
-
-inferTypeOfList :: TTermDefinition (Context -> Graph -> [Term] -> Prelude.Either Error InferenceResult)
-inferTypeOfList = define "inferTypeOfList" $
-  doc "Infer the type of a list (Either version)" $
-  "fcx" ~> "cx" ~> inferTypeOfCollection
-    @@ var "fcx"
-    @@ var "cx"
-    @@ (unaryFunction Core.typeList)
-    @@ (unaryFunction Core.termList)
-    @@ (string "list element")
-    @@ (Sets.empty :: TTerm (S.Set Name))
-
-inferTypeOfMap :: TTermDefinition (Context -> Graph -> M.Map Term Term -> Prelude.Either Error InferenceResult)
-inferTypeOfMap = define "inferTypeOfMap" $
-  doc "Infer the type of a map (Either version)" $
-  "fcx" ~> "cx" ~> "m" ~>
-  "kvarResult" <~ Names.freshName @@ var "fcx" $
-  "kvar" <~ Pairs.first (var "kvarResult") $
-  "fcx2" <~ Pairs.second (var "kvarResult") $
-  "vvarResult" <~ Names.freshName @@ var "fcx2" $
-  "vvar" <~ Pairs.first (var "vvarResult") $
-  "fcx3" <~ Pairs.second (var "vvarResult") $
-  "keyConstraints" <~ Maps.singleton (var "kvar") (Core.typeVariableMetadata $ Sets.singleton $ Core.nameLift _TypeClass_ordering) $
-  Logic.ifElse (Maps.null $ var "m")
-    (right (yieldWithConstraints
-      @@ var "fcx3"
-      @@ (buildTypeApplicationTerm
-        @@ list [var "kvar", var "vvar"]
-        @@ (Core.termMap Maps.empty))
-      @@ (Core.typeMap $ Core.mapType (Core.typeVariable $ var "kvar") (Core.typeVariable $ var "vvar"))
-      @@ Substitution.idTypeSubst
-      @@ var "keyConstraints"))
-    ("kRp" <<~ inferMany @@ var "fcx3" @@ var "cx" @@
-      (Lists.map ("k" ~> pair (var "k") (string "map key")) $ Maps.keys $ var "m") $
-    "kResults" <~ Pairs.first (var "kRp") $
-    "fcx4" <~ Pairs.second (var "kRp") $
-    "kterms" <~ Pairs.first (var "kResults") $
-    "ktypes" <~ Pairs.first (Pairs.second $ var "kResults") $
-    "ksubst" <~ Pairs.first (Pairs.second $ Pairs.second $ var "kResults") $
-    "kElemConstraints" <~ Pairs.second (Pairs.second $ Pairs.second $ var "kResults") $
-    "vRp" <<~ inferMany @@ var "fcx4" @@ (Substitution.substInContext @@ var "ksubst" @@ var "cx") @@
-      (Lists.map ("v" ~> pair (var "v") (string "map value")) $ Maps.elems $ var "m") $
-    "vResults" <~ Pairs.first (var "vRp") $
-    "fcx5" <~ Pairs.second (var "vRp") $
-    "vterms" <~ Pairs.first (var "vResults") $
-    "vtypes" <~ Pairs.first (Pairs.second $ var "vResults") $
-    "vsubst" <~ Pairs.first (Pairs.second $ Pairs.second $ var "vResults") $
-    "vElemConstraints" <~ Pairs.second (Pairs.second $ Pairs.second $ var "vResults") $
-    "kcons" <~ Lists.map ("t" ~> Typing.typeConstraint (Core.typeVariable $ var "kvar") (var "t") (string "map key")) (var "ktypes") $
-    "vcons" <~ Lists.map ("t" ~> Typing.typeConstraint (Core.typeVariable $ var "vvar") (var "t") (string "map value")) (var "vtypes") $
-    "allMapConstraints" <~ mergeClassConstraints @@ var "keyConstraints" @@ (mergeClassConstraints @@ var "kElemConstraints" @@ var "vElemConstraints") $
-    "mcResult" <<~ mapConstraints @@ var "fcx5" @@ var "cx" @@
-      ("subst" ~> yieldWithConstraints
-        @@ var "fcx5"
-        @@ (Core.termMap $ Maps.fromList $ Lists.zip (var "kterms") (var "vterms"))
-        @@ (Core.typeMap $ Core.mapType (Core.typeVariable $ var "kvar") (Core.typeVariable $ var "vvar"))
-        @@ (Substitution.composeTypeSubstList @@ list [var "ksubst", var "vsubst", var "subst"])
-        @@ (Substitution.substInClassConstraints @@ var "subst" @@ var "allMapConstraints")) @@
-      (Lists.concat $ list [var "kcons", var "vcons"]) $
-    right (var "mcResult"))
-
-inferTypeOfOptional :: TTermDefinition (Context -> Graph -> Maybe Term -> Prelude.Either Error InferenceResult)
-inferTypeOfOptional = define "inferTypeOfOptional" $
-  doc "Infer the type of a Maybe value" $
-  "fcx" ~> "cx" ~> "m" ~>
-  "trmCons" <~ ("terms" ~> Core.termMaybe (Lists.maybeHead $ var "terms")) $
-  inferTypeOfCollection
-    @@ var "fcx"
-    @@ var "cx"
-    @@ (unaryFunction Core.typeMaybe)
-    @@ var "trmCons"
-    @@ (string "optional element")
-    @@ (Sets.empty :: TTerm (S.Set Name))
-    @@ (Maybes.maybe (list ([] :: [TTerm Term])) (unaryFunction Lists.singleton) $ var "m")
-
-inferTypeOfPair :: TTermDefinition (Context -> Graph -> (Term, Term) -> Prelude.Either Error InferenceResult)
-inferTypeOfPair = define "inferTypeOfPair" $
-  doc "Infer the type of a pair (Either version)" $
-  "fcx" ~> "cx" ~> "p" ~>
-  "rp" <<~ inferMany @@ var "fcx" @@ var "cx" @@ list [
-    pair (Pairs.first $ var "p") (string "pair first element"),
-    pair (Pairs.second $ var "p") (string "pair second element")] $
-  "results" <~ Pairs.first (var "rp") $
-  "fcx2" <~ Pairs.second (var "rp") $
-  "iterms" <~ Pairs.first (var "results") $
-  "itypes" <~ Pairs.first (Pairs.second $ var "results") $
-  "isubst" <~ Pairs.first (Pairs.second $ Pairs.second $ var "results") $
-  "pairElemConstraints" <~ Pairs.second (Pairs.second $ Pairs.second $ var "results") $
-  -- inferMany with two inputs returns exactly two elements in iterms/itypes.
-  "ifst"  <<~ atOrFail @@ int32 0 @@ string "inferTypeOfPair ifst"  @@ var "iterms" $
-  "isnd"  <<~ atOrFail @@ int32 1 @@ string "inferTypeOfPair isnd"  @@ var "iterms" $
-  "tyFst" <<~ atOrFail @@ int32 0 @@ string "inferTypeOfPair tyFst" @@ var "itypes" $
-  "tySnd" <<~ atOrFail @@ int32 1 @@ string "inferTypeOfPair tySnd" @@ var "itypes" $
-  "pairTerm" <~ (Core.termPair $ pair (var "ifst") (var "isnd")) $
-  "termWithTypes" <~ (Core.termTypeApplication $ Core.typeApplicationTerm
-    (Core.termTypeApplication $ Core.typeApplicationTerm (var "pairTerm") (var "tyFst"))
-    (var "tySnd")) $
-  right (yieldWithConstraints
-    @@ var "fcx2"
-    @@ var "termWithTypes"
-    @@ (Core.typePair $ Core.pairType (var "tyFst") (var "tySnd"))
-    @@ var "isubst"
-    @@ var "pairElemConstraints")
-
-inferTypeOfPrimitive :: TTermDefinition (Context -> Graph -> Name -> Prelude.Either Error InferenceResult)
-inferTypeOfPrimitive = define "inferTypeOfPrimitive" $
-  doc "Infer the type of a primitive function (Either version)" $
-  "fcx" ~> "cx" ~> "name" ~>
-  Maybes.maybe
-    (Ctx.failInContext
-      (Error.errorResolution $ Error.resolutionErrorNoSuchPrimitive $ Error.noSuchPrimitiveError (var "name"))
-      (var "fcx"))
-    ("scheme" ~>
-      "tsResult" <~ Resolution.instantiateTypeScheme @@ var "fcx" @@ var "scheme" $
-      "ts" <~ Pairs.first (var "tsResult") $
-      "fcx2" <~ Pairs.second (var "tsResult") $
-      "constraints" <~ Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints $ var "ts") $
-      right (yieldCheckedWithConstraints
-        @@ var "fcx2"
-        @@ (buildTypeApplicationTerm
-          @@ Core.typeSchemeVariables (var "ts")
-          @@ Core.termVariable (var "name"))
-        @@ Core.typeSchemeBody (var "ts")
-        @@ Substitution.idTypeSubst
-        @@ var "constraints"))
-    (Maybes.map (unaryFunction Graph.primitiveTypeScheme) $ Maps.lookup (var "name") (Graph.graphPrimitives $ var "cx"))
-
-inferTypeOfProjection :: TTermDefinition (Context -> Graph -> Projection -> Prelude.Either Error InferenceResult)
-inferTypeOfProjection = define "inferTypeOfProjection" $
-  doc "Infer the type of a record projection (Either version)" $
-  "fcx" ~> "cx" ~> "proj" ~>
-  "tname" <~ Core.projectionTypeName (var "proj") $
-  "fname" <~ Core.projectionField (var "proj") $
-  "stRp" <<~ Resolution.requireSchemaType @@ var "fcx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "stRp") $
-  "fcx2" <~ Pairs.second (var "stRp") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "stype" <~ Core.typeSchemeBody (var "schemaType") $
-  "sfields" <<~ ExtractCore.recordType @@ var "tname" @@ var "stype" $
-  "ftyp" <<~ Resolution.findFieldType @@ var "fcx2" @@ var "fname" @@ var "sfields" $
-  right (yield
-    @@ var "fcx2"
-    @@ (buildTypeApplicationTerm @@ var "svars"
-      @@ (Core.termProject $ Core.projection (var "tname") (var "fname")))
-    @@ (Core.typeFunction $ Core.functionType
-      (Resolution.nominalApplication @@ var "tname" @@ Lists.map (unaryFunction Core.typeVariable) (var "svars"))
-      (var "ftyp"))
-    @@ Substitution.idTypeSubst)
-
-inferTypeOfRecord :: TTermDefinition (Context -> Graph -> Record -> Prelude.Either Error InferenceResult)
-inferTypeOfRecord = define "inferTypeOfRecord" $
-  doc "Infer the type of a record (Either version)" $
-  "fcx" ~> "cx" ~> "record" ~>
-  "tname" <~ Core.recordTypeName (var "record") $
-  "fields" <~ Core.recordFields (var "record") $
-  "fnames" <~ Lists.map (unaryFunction Core.fieldName) (var "fields") $
-  "stRp" <<~ Resolution.requireSchemaType @@ var "fcx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "stRp") $
-  "fcx2" <~ Pairs.second (var "stRp") $
-  "rp" <<~ inferMany @@ var "fcx2" @@ var "cx" @@ Lists.map
-    ("f" ~> pair
-      (Core.fieldTerm $ var "f")
-      (Strings.cat2 (string "field ") (Core.unName $ Core.fieldName $ var "f")))
-    (var "fields") $
-  "results" <~ Pairs.first (var "rp") $
-  "fcx3" <~ Pairs.second (var "rp") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "stype" <~ Core.typeSchemeBody (var "schemaType") $
-  "iterms" <~ Pairs.first (var "results") $
-  "itypes" <~ Pairs.first (Pairs.second $ var "results") $
-  "isubst" <~ Pairs.first (Pairs.second $ Pairs.second $ var "results") $
-  "recElemConstraints" <~ Pairs.second (Pairs.second $ Pairs.second $ var "results") $
-  "ityp" <~ Core.typeRecord (
-      Lists.zipWith ("n" ~> "t" ~> Core.fieldType (var "n") (var "t")) (var "fnames") (var "itypes")) $
-  "mcResult" <<~ mapConstraints @@ var "fcx3" @@ var "cx" @@
-    ("subst" ~> yieldWithConstraints
-      @@ var "fcx3"
-      @@ (buildTypeApplicationTerm @@ var "svars" @@
-        (Core.termRecord $ Core.record (var "tname") $ Lists.zipWith
-          ("n" ~> "t" ~> Core.field (var "n") (var "t"))
-          (var "fnames")
-          (var "iterms")))
-      @@ (Resolution.nominalApplication @@ var "tname" @@ Lists.map (unaryFunction Core.typeVariable) (var "svars"))
-      @@ (Substitution.composeTypeSubst @@ var "isubst" @@ var "subst")
-      @@ (Substitution.substInClassConstraints @@ var "subst" @@ var "recElemConstraints")) @@
-    list [Typing.typeConstraint (var "stype") (var "ityp") (string "schema type of record")] $
-  right (var "mcResult")
-
-inferTypeOfSet :: TTermDefinition (Context -> Graph -> S.Set Term -> Prelude.Either Error InferenceResult)
-inferTypeOfSet = define "inferTypeOfSet" $
-  doc "Infer the type of a set (Either version)" $
-  "fcx" ~> "cx" ~>
-  "s" ~>
-  inferTypeOfCollection
-    @@ var "fcx"
-    @@ var "cx"
-    @@ (unaryFunction Core.typeSet)
-    @@ ("terms" ~> Core.termSet $ Sets.fromList $ var "terms")
-    @@ (string "set element")
-    @@ (Sets.singleton $ Core.nameLift _TypeClass_ordering)
-    @@ (Sets.toList $ var "s")
-
-inferTypeOfTerm :: TTermDefinition (Context -> Graph -> Term -> String -> Prelude.Either Error InferenceResult)
-inferTypeOfTerm = define "inferTypeOfTerm" $
-  doc "Infer the type of a given term (Either version)" $
-  "fcx" ~> "cx" ~> "term" ~> "desc" ~>
-  "fcx2" <~ Ctx.pushTrace (var "desc") (var "fcx") $
-  cases _Term (var "term") Nothing [
-    _Term_annotated>>: "a" ~> inferTypeOfAnnotatedTerm @@ var "fcx2" @@ var "cx" @@ var "a",
-    _Term_application>>: "a" ~> inferTypeOfApplication @@ var "fcx2" @@ var "cx" @@ var "a",
-    _Term_cases>>: "c" ~> inferTypeOfCaseStatement @@ var "fcx2" @@ var "cx" @@ var "c",
-    _Term_either>>: "e" ~> inferTypeOfEither @@ var "fcx2" @@ var "cx" @@ var "e",
-    _Term_lambda>>: "l" ~> inferTypeOfLambda @@ var "fcx2" @@ var "cx" @@ var "l",
-    _Term_let>>: "l" ~> inferTypeOfLet @@ var "fcx2" @@ var "cx" @@ var "l",
-    _Term_list>>: "els" ~> inferTypeOfList @@ var "fcx2" @@ var "cx" @@ var "els",
-    _Term_literal>>: "l" ~> right (inferTypeOfLiteral @@ var "fcx2" @@ var "l"),
-    _Term_map>>: "m" ~> inferTypeOfMap @@ var "fcx2" @@ var "cx" @@ var "m",
-    _Term_maybe>>: "m" ~> inferTypeOfOptional @@ var "fcx2" @@ var "cx" @@ var "m",
-    _Term_pair>>: "p" ~> inferTypeOfPair @@ var "fcx2" @@ var "cx" @@ var "p",
-    _Term_project>>: "p" ~> inferTypeOfProjection @@ var "fcx2" @@ var "cx" @@ var "p",
-    _Term_record>>: "r" ~> inferTypeOfRecord @@ var "fcx2" @@ var "cx" @@ var "r",
-    _Term_set>>: "s" ~> inferTypeOfSet @@ var "fcx2" @@ var "cx" @@ var "s",
-    _Term_typeApplication>>: "tt" ~> inferTypeOfTypeApplication @@ var "fcx2" @@ var "cx" @@ var "tt",
-    _Term_typeLambda>>: "ta" ~> inferTypeOfTypeLambda @@ var "fcx2" @@ var "cx" @@ var "ta",
-    _Term_inject>>: "i" ~> inferTypeOfInjection @@ var "fcx2" @@ var "cx" @@ var "i",
-    _Term_unit>>: constant $ right (inferTypeOfUnit @@ var "fcx2"),
-    _Term_unwrap>>: "tname" ~> inferTypeOfUnwrap @@ var "fcx2" @@ var "cx" @@ var "tname",
-    _Term_variable>>: "name" ~> inferTypeOfVariable @@ var "fcx2" @@ var "cx" @@ var "name",
-    _Term_wrap>>: "w" ~> inferTypeOfWrappedTerm @@ var "fcx2" @@ var "cx" @@ var "w"]
-
-inferTypeOfTypeLambda :: TTermDefinition (Context -> Graph -> TypeLambda -> Prelude.Either Error InferenceResult)
-inferTypeOfTypeLambda = define "inferTypeOfTypeLambda" $
-  doc "Infer the type of a type abstraction (Either version)" $
-  "fcx" ~> "cx" ~> "ta" ~>
-  inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ (Core.typeLambdaBody $ var "ta") @@ (string "type abstraction")
-
-inferTypeOfTypeApplication :: TTermDefinition (Context -> Graph -> TypeApplicationTerm -> Prelude.Either Error InferenceResult)
-inferTypeOfTypeApplication = define "inferTypeOfTypeApplication" $
-  doc "Infer the type of a type application (Either version)" $
-  "fcx" ~> "cx" ~> "tt" ~>
-  inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ (Core.typeApplicationTermBody $ var "tt") @@ (string "type application term")
-
-inferTypeOfUnwrap :: TTermDefinition (Context -> Graph -> Name -> Prelude.Either Error InferenceResult)
-inferTypeOfUnwrap = define "inferTypeOfUnwrap" $
-  doc "Infer the type of an unwrap operation (Either version)" $
-  "fcx" ~> "cx" ~> "tname" ~>
-  "stRp" <<~ Resolution.requireSchemaType @@ var "fcx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "stRp") $
-  "fcx2" <~ Pairs.second (var "stRp") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "stype" <~ Core.typeSchemeBody (var "schemaType") $
-  "wtyp" <<~ ExtractCore.wrappedType @@ var "tname" @@ var "stype" $
-  right (yield
-    @@ var "fcx2"
-    @@ (buildTypeApplicationTerm @@ var "svars"
-      @@ (Core.termUnwrap $ var "tname"))
-    @@ (Core.typeFunction $ Core.functionType
-      (Resolution.nominalApplication @@ var "tname" @@ Lists.map (unaryFunction Core.typeVariable) (var "svars"))
-      (var "wtyp"))
-    @@ Substitution.idTypeSubst)
-
-inferTypeOfVariable :: TTermDefinition (Context -> Graph -> Name -> Prelude.Either Error InferenceResult)
-inferTypeOfVariable = define "inferTypeOfVariable" $
-  doc "Infer the type of a variable (Either version)" $
-  "fcx" ~> "cx" ~> "name" ~>
-  Maybes.maybe
-    -- Not found in graphBoundTypes: fall through to graphPrimitives
-    (Maybes.maybe
-      (Ctx.failInContext
-        (Error.errorResolution $ Error.resolutionErrorNoSuchBinding $ Error.noSuchBindingError (var "name"))
-        (var "fcx"))
-      ("scheme" ~>
-        "tsResult" <~ Resolution.instantiateTypeScheme @@ var "fcx" @@ var "scheme" $
-        "ts" <~ Pairs.first (var "tsResult") $
-        "fcx2" <~ Pairs.second (var "tsResult") $
-        "constraints" <~ Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints $ var "ts") $
-        right (yieldCheckedWithConstraints
-          @@ var "fcx2"
-          @@ (buildTypeApplicationTerm
-            @@ Core.typeSchemeVariables (var "ts")
-            @@ Core.termVariable (var "name"))
-          @@ Core.typeSchemeBody (var "ts")
-          @@ Substitution.idTypeSubst
-          @@ var "constraints"))
-      (Maybes.map (unaryFunction Graph.primitiveTypeScheme) $ Maps.lookup (var "name") (Graph.graphPrimitives $ var "cx")))
-    -- Found in graphBoundTypes: use the type scheme directly
-    ("scheme" ~>
-      "tsResult" <~ Resolution.instantiateTypeScheme @@ var "fcx" @@ var "scheme" $
-      "ts" <~ Pairs.first (var "tsResult") $
-      "fcx2" <~ Pairs.second (var "tsResult") $
-      "constraints" <~ Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints $ var "ts") $
-      right (Typing.inferenceResult
-        (buildTypeApplicationTerm
-          @@ Core.typeSchemeVariables (var "ts")
-          @@ Core.termVariable (var "name"))
-        (Core.typeSchemeBody $ var "ts")
-        (asTerm Substitution.idTypeSubst)
-        (var "constraints")
-        (var "fcx2")))
-    (Maps.lookup (var "name") (Graph.graphBoundTypes $ var "cx"))
-
-inferTypeOfWrappedTerm :: TTermDefinition (Context -> Graph -> WrappedTerm -> Prelude.Either Error InferenceResult)
-inferTypeOfWrappedTerm = define "inferTypeOfWrappedTerm" $
-  doc "Infer the type of a wrapped term (Either version)" $
-  "fcx" ~> "cx" ~> "wt" ~>
-  "tname" <~ Core.wrappedTermTypeName (var "wt") $
-  "term" <~ Core.wrappedTermBody (var "wt") $
-  "stRp" <<~ Resolution.requireSchemaType @@ var "fcx" @@ (Graph.graphSchemaTypes $ var "cx") @@ var "tname" $
-  "schemaType" <~ Pairs.first (var "stRp") $
-  "fcx2" <~ Pairs.second (var "stRp") $
-  "result" <<~ inferTypeOfTerm @@ var "fcx2" @@ var "cx" @@ var "term" @@ (string "wrapped term") $
-  "fcx3" <~ Typing.inferenceResultContext (var "result") $
-  "svars" <~ Core.typeSchemeVariables (var "schemaType") $
-  "stype" <~ Core.typeSchemeBody (var "schemaType") $
-  "iterm" <~ Typing.inferenceResultTerm (var "result") $
-  "itype" <~ Typing.inferenceResultType (var "result") $
-  "isubst" <~ Typing.inferenceResultSubst (var "result") $
-  "ityp" <~ Core.typeWrap (var "itype") $
-  "mcResult" <<~ mapConstraints @@ var "fcx3" @@ var "cx"
-    @@ ("subst" ~> yield
-      @@ var "fcx3"
-      @@ (buildTypeApplicationTerm @@ var "svars" @@ (Core.termWrap $ Core.wrappedTerm (var "tname") (var "iterm")))
-      @@ (Resolution.nominalApplication @@ var "tname" @@ Lists.map (unaryFunction Core.typeVariable) (var "svars"))
-      @@ (Substitution.composeTypeSubst @@ var "isubst" @@ var "subst"))
-    @@ list [Typing.typeConstraint (var "stype") (var "ityp") (string "schema type of wrapper")] $
-  right (var "mcResult")
-
-inferTypeOfLet :: TTermDefinition (Context -> Graph -> Let -> Prelude.Either Error InferenceResult)
-inferTypeOfLet = define "inferTypeOfLet" $
-  doc "Normalize a let term before inferring its type (Either version)" $
-  "fcx0" ~> "cx" ~> "let0" ~>
-  "fcx" <~ Ctx.pushTrace (string "let") (var "fcx0") $
-  "bindings0" <~ Core.letBindings (var "let0") $
-  "body0" <~ Core.letBody (var "let0") $
-  "names" <~ Lists.map (unaryFunction Core.bindingName) (var "bindings0") $
-  "nameSet" <~ Sets.fromList (var "names") $
-  "toPair" <~ ("binding" ~>
-    "name" <~ Core.bindingName (var "binding") $
-    "term" <~ Core.bindingTerm (var "binding") $
-    pair (var "name") $ Lists.filter ("n" ~> Sets.member (var "n") (var "nameSet")) $
-      Sets.toList $ Variables.freeVariablesInTerm @@ var "term") $
-  "adjList" <~ Lists.map (var "toPair") (var "bindings0") $
-  "groups" <~ Sorting.topologicalSortComponents @@ var "adjList" $
-  "bindingMap" <~ Maps.fromList (Lists.zip (var "names") (var "bindings0")) $
-  "createLet" <~ ("e" ~> "group" ~> Core.termLet $ Core.let_
-    (Maybes.cat $ Lists.map ("n" ~> Maps.lookup (var "n") (var "bindingMap")) (var "group"))
-    (var "e")) $
-  "rewrittenLet" <~ Lists.foldl (var "createLet") (var "body0") (Lists.reverse $ var "groups") $
-  "restoreLet" <~ ("iterm" ~>
-    "helper" <~ ("level" ~> "bins" ~> "term" ~>
-      "nonzero" <~ ("term" ~> cases _Term (var "term") Nothing [
-        _Term_let>>: "l" ~>
-          "bs" <~ Core.letBindings (var "l") $
-          "letBody" <~ Core.letBody (var "l") $
-          var "helper" @@
-            (Math.sub (var "level") (int32 1)) @@
-            (Lists.concat $ list [var "bs", var "bins"]) @@
-            (var "letBody")]) $
-      Logic.ifElse (Equality.equal (var "level") (int32 0))
-        (pair (var "bins") (var "term"))
-        (var "nonzero" @@ var "term")) $
-    "result" <~ var "helper" @@ (Lists.length $ var "groups") @@ list ([] :: [TTerm Binding]) @@ var "iterm" $
-    "bindingList" <~ Pairs.first (var "result") $
-    "e" <~ Pairs.second (var "result") $
-    "bindingMap2" <~ Maps.fromList (Lists.map ("b" ~> pair (Core.bindingName $ var "b") (var "b")) (var "bindingList")) $
-    Core.termLet $ Core.let_
-      (Maybes.cat $ Lists.map ("n" ~> Maps.lookup (var "n") (var "bindingMap2")) (var "names"))
-      (var "e")) $
-  "rewriteResult" <~ ("iresult" ~>
-    "fcxR" <~ Typing.inferenceResultContext (var "iresult") $
-    "iterm" <~ Typing.inferenceResultTerm (var "iresult") $
-    "itype" <~ Typing.inferenceResultType (var "iresult") $
-    "isubst" <~ Typing.inferenceResultSubst (var "iresult") $
-    "iconstraints" <~ Typing.inferenceResultClassConstraints (var "iresult") $
-    Typing.inferenceResult (var "restoreLet" @@ var "iterm") (var "itype") (var "isubst") (var "iconstraints") (var "fcxR")) $
-  "res" <~ (cases _Term (var "rewrittenLet")
-     (Just $ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "rewrittenLet" @@ (string "empty let term")) [
-     _Term_let>>: "l" ~> inferTypeOfLetNormalized @@ var "fcx" @@ var "cx" @@ var "l"]) $
-  Eithers.map (var "rewriteResult") (var "res")
-
-inferTypeOfLetNormalized :: TTermDefinition (Context -> Graph -> Let -> Prelude.Either Error InferenceResult)
-inferTypeOfLetNormalized = define "inferTypeOfLetNormalized" $
-  doc "Infer the type of a let (letrec) term which is already in a normal form (Either version)" $
-  "fcx0" ~> "cx0" ~> "letTerm" ~>
-  "fcx" <~ Ctx.pushTrace (string "let-normalized") (var "fcx0") $
-  "bins0" <~ Core.letBindings (var "letTerm") $
-  "body0" <~ Core.letBody (var "letTerm") $
-  "bnames" <~ Lists.map (unaryFunction Core.bindingName) (var "bins0") $
-
-  -- Phase 1: Create fresh temporary type variables
-  "bvarsResult" <~ Names.freshNames @@ (Lists.length $ var "bins0") @@ var "fcx" $
-  "bvars" <~ Pairs.first (var "bvarsResult") $
-  "fcx2" <~ Pairs.second (var "bvarsResult") $
-  "tbins0" <~ Lists.map (unaryFunction Core.typeVariable) (var "bvars") $
-
-  "cx1" <~ (extendContext
-    @@ (Lists.zip (var "bnames") $ Lists.map ("t" ~> Core.typeScheme (list ([] :: [TTerm Name])) (var "t") Phantoms.nothing) (var "tbins0"))
-    @@ (var "cx0")) $
-
-  -- Phase 2: Infer actual types
-  "irRp" <<~ inferTypesOfTemporaryBindings @@ var "fcx2" @@ var "cx1" @@ var "bins0" $
-  "inferredResult" <~ Pairs.first (var "irRp") $
-  "fcx3" <~ Pairs.second (var "irRp") $
-  "bterms1" <~ Pairs.first (var "inferredResult") $
-  "tbins1" <~ Pairs.first (Pairs.second $ var "inferredResult") $
-  "substAndConstraints" <~ Pairs.second (Pairs.second $ var "inferredResult") $
-  "s1" <~ Pairs.first (var "substAndConstraints") $
-  "inferredConstraints" <~ Pairs.second (var "substAndConstraints") $
-
-  -- Phase 3: Unify temporary types with actual inferred types
-  "s2" <<~ Eithers.bimap
-    ("_e" ~> Error.errorUnification (var "_e"))
-    ("_a" ~> var "_a")
-    (Unification.unifyTypeLists
-    @@ var "fcx3"
-    @@ (Graph.graphSchemaTypes $ var "cx0")
-    @@ (Lists.map (Substitution.substInType @@ var "s1") (var "tbins0"))
-    @@ (var "tbins1")
-    @@ (string "temporary type bindings")) $
-  "_" <<~ Checking.checkTypeSubst @@ var "fcx3" @@ var "cx0" @@ var "s2" $
-
-  "g2base" <~ (Substitution.substInContext @@
-    (Substitution.composeTypeSubst @@ var "s1" @@ var "s2") @@
-    (var "cx0")) $
-  "constraintsWithS2" <~ Substitution.substInClassConstraints @@ var "s2" @@ var "inferredConstraints" $
-
-  "composedSubst" <~ Substitution.composeTypeSubst @@ var "s1" @@ var "s2" $
-  "originalBindingConstraints" <~ Lists.foldl
-    ("acc" ~> "b" ~>
-      Maybes.maybe
-        (var "acc")
-        ("ts" ~> Maybes.maybe
-          (var "acc")
-          ("c" ~> mergeClassConstraints @@ var "acc" @@ var "c")
-          (Core.typeSchemeConstraints $ var "ts"))
-        (Core.bindingTypeScheme $ var "b"))
-    Maps.empty
-    (var "bins0") $
-  "originalConstraintsSubst" <~ Substitution.substInClassConstraints @@ var "composedSubst" @@ var "originalBindingConstraints" $
-
-  "allInferredConstraints" <~ mergeClassConstraints @@ var "constraintsWithS2" @@ var "originalConstraintsSubst" $
-  "mergedConstraints" <~ mergeClassConstraints @@ (Graph.graphClassConstraints $ var "g2base") @@ var "allInferredConstraints" $
-  "g2" <~ Graph.graphWithClassConstraints (var "g2base") (var "mergedConstraints") $
-
-  "bterms1Subst" <~ Lists.map (Substitution.substTypesInTerm @@ var "s2") (var "bterms1") $
-
-  -- Phase 4: Generalize
-  "tsbins1" <~ (Lists.zip (var "bnames") $
-    Lists.map ("t" ~> generalize @@ var "g2" @@
-      (Substitution.substInType @@ var "s2" @@ var "t")) (var "tbins1")) $
-
-  -- Phase 5: Infer body type
-  "bodyResult" <<~ inferTypeOfTerm @@ var "fcx3" @@
-    (extendContext @@ var "tsbins1" @@ var "g2") @@
-    (var "body0") @@
-    (string "let body") $
-  "fcx4" <~ Typing.inferenceResultContext (var "bodyResult") $
-  "body1" <~ Typing.inferenceResultTerm (var "bodyResult") $
-  "tbody" <~ Typing.inferenceResultType (var "bodyResult") $
-  "sbody" <~ Typing.inferenceResultSubst (var "bodyResult") $
-
-  -- Phase 6: Create term substitution for polymorphic instantiation
-  "st1" <~ (Typing.termSubst (Maps.fromList $
-    Lists.map
-      ("pair" ~>
-        "name" <~ Pairs.first (var "pair") $
-        "ts" <~ Pairs.second (var "pair") $
-        pair
-          (var "name") $
-          (buildTypeApplicationTerm
-            @@ (Core.typeSchemeVariables $ var "ts")
-            @@ (Core.termVariable $ var "name")))
-      (var "tsbins1"))) $
-
-  -- Phase 7: Create final bindings with type lambdas
-  "createBinding" <~ ("bindingPair" ~>
-    "nameTsPair" <~ Pairs.first (var "bindingPair") $
-    "term" <~ Pairs.second (var "bindingPair") $
-    "name" <~ Pairs.first (var "nameTsPair") $
-    "ts" <~ Pairs.second (var "nameTsPair") $
-    "finalTs" <~ Substitution.substInTypeScheme @@ var "sbody" @@ var "ts" $
-    "typeLambdaTerm" <~ Lists.foldl
-      ("b" ~> "v" ~> Core.termTypeLambda $ Core.typeLambda (var "v") (var "b"))
-      (Substitution.substituteInTerm @@ var "st1" @@ var "term")
-      (Lists.reverse $ Core.typeSchemeVariables $ var "finalTs") $
-    Core.binding (var "name")
-      (Substitution.substTypesInTerm @@
-        (Substitution.composeTypeSubst @@ var "sbody" @@ var "s2") @@
-        (var "typeLambdaTerm"))
-      (just $ var "finalTs")) $
-
-  "bins1" <~ (Lists.map (var "createBinding") $
-    Lists.zip (var "tsbins1") (var "bterms1Subst")) $
-
-  "bodyConstraints" <~ Substitution.substInClassConstraints @@ var "sbody" @@ (Typing.inferenceResultClassConstraints $ var "bodyResult") $
-  "bindingConstraintsSubst" <~ Substitution.substInClassConstraints @@ var "sbody" @@ var "constraintsWithS2" $
-  "allConstraints" <~ mergeClassConstraints @@ var "bindingConstraintsSubst" @@ var "bodyConstraints" $
-
-  right (Typing.inferenceResult
-    (Core.termLet $ Core.let_ (var "bins1") (var "body1"))
-    (var "tbody")
-    (Substitution.composeTypeSubstList @@ list [var "s1", var "s2", var "sbody"])
-    (var "allConstraints")
-    (var "fcx4"))
-
-inferTypesOfTemporaryBindings :: TTermDefinition (Context -> Graph -> [Binding] -> Prelude.Either Error (([Term], ([Type], (TypeSubst, M.Map Name TypeVariableMetadata))), Context))
-inferTypesOfTemporaryBindings = define "inferTypesOfTemporaryBindings" $
-  doc "Infer types for temporary let bindings (Either version)" $
-  "fcx" ~> "cx" ~> "bins" ~>
-  "emptyResult" <~ (right $ pair (pair (list ([] :: [TTerm Term])) (pair (list ([] :: [TTerm Type])) (pair (Substitution.idTypeSubst) Maps.empty))) (var "fcx")) $
-  Maybes.maybe (var "emptyResult")
-    ("binsUc" ~>
-    "binding" <~ Pairs.first (var "binsUc") $
-    "tl" <~ Pairs.second (var "binsUc") $
-    "k" <~ Core.bindingName (var "binding") $
-    "v" <~ Core.bindingTerm (var "binding") $
-    "result1" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "v" @@
-      (Strings.cat $ list [
-        (string "temporary let binding '"),
-        Core.unName $ var "k",
-        (string "'")]) $
-    "fcx2" <~ Typing.inferenceResultContext (var "result1") $
-    "j" <~ Typing.inferenceResultTerm (var "result1") $
-    "u_prime" <~ Typing.inferenceResultType (var "result1") $
-    "u" <~ Typing.inferenceResultSubst (var "result1") $
-    "c1Inferred" <~ Typing.inferenceResultClassConstraints (var "result1") $
-
-    -- Extract constraints from the original binding's TypeScheme
-    "originalBindingConstraints" <<~ Maybes.maybe
-      (right Maps.empty)
-      ("ts" ~>
-        "tsResult" <~ Resolution.instantiateTypeScheme @@ var "fcx2" @@ var "ts" $
-        "instantiatedTs" <~ Pairs.first (var "tsResult") $
-        "freshConstraints" <~ Maybes.fromMaybe Maps.empty (Core.typeSchemeConstraints $ var "instantiatedTs") $
-        -- Unify the instantiated type with the inferred type to map fresh variables
-        "unifySubst" <<~ Eithers.bimap
-          ("_e" ~> Error.errorUnification (var "_e"))
-          ("_a" ~> var "_a")
-          (Unification.unifyTypes
-            @@ var "fcx2"
-            @@ (Graph.graphSchemaTypes $ var "cx")
-            @@ (Core.typeSchemeBody $ var "instantiatedTs")
-            @@ var "u_prime"
-            @@ string "original binding type") $
-        right (Substitution.substInClassConstraints @@ var "unifySubst" @@ var "freshConstraints"))
-      (Core.bindingTypeScheme $ var "binding") $
-
-    "c1" <~ mergeClassConstraints @@ var "c1Inferred" @@ var "originalBindingConstraints" $
-
-    "rp2" <<~ inferTypesOfTemporaryBindings @@ var "fcx2" @@
-      (Substitution.substInContext @@ var "u" @@ var "cx") @@
-      var "tl" $
-    "result2" <~ Pairs.first (var "rp2") $
-    "fcx3" <~ Pairs.second (var "rp2") $
-    "h" <~ Pairs.first (var "result2") $
-    "r_prime" <~ Pairs.first (Pairs.second $ var "result2") $
-    "restPair" <~ Pairs.second (Pairs.second $ var "result2") $
-    "r" <~ Pairs.first (var "restPair") $
-    "c2" <~ Pairs.second (var "restPair") $
-    "c1Subst" <~ Substitution.substInClassConstraints @@ var "r" @@ var "c1" $
-    "mergedConstraints" <~ mergeClassConstraints @@ var "c1Subst" @@ var "c2" $
-    right $ pair (pair
-      (Lists.cons (Substitution.substTypesInTerm @@ var "r" @@ var "j") (var "h"))
-      (pair
-        (Lists.cons (Substitution.substInType @@ var "r" @@ var "u_prime") (var "r_prime"))
-        (pair (Substitution.composeTypeSubst @@ var "u" @@ var "r") (var "mergedConstraints")))) (var "fcx3"))
-    (Lists.uncons (var "bins"))
-
-inferMany :: TTermDefinition (Context -> Graph -> [(Term, String)] -> Prelude.Either Error (([Term], ([Type], (TypeSubst, M.Map Name TypeVariableMetadata))), Context))
-inferMany = define "inferMany" $
-  doc "Infer types for multiple terms, propagating class constraints from sub-expressions" $
-  "fcx" ~> "cx" ~> "pairs" ~>
-  "emptyResult" <~ (right $ pair (pair (list ([] :: [TTerm Term])) $ pair (list ([] :: [TTerm Type])) (pair Substitution.idTypeSubst Maps.empty)) (var "fcx")) $
-  Maybes.maybe (var "emptyResult")
-    ("pairsUc" ~>
-    "headPair" <~ Pairs.first (var "pairsUc") $
-    "tl" <~ Pairs.second (var "pairsUc") $
-    "e" <~ Pairs.first (var "headPair") $
-    "desc" <~ Pairs.second (var "headPair") $
-    "result1" <<~ inferTypeOfTerm @@ var "fcx" @@ var "cx" @@ var "e" @@ var "desc" $
-    "fcx2" <~ Typing.inferenceResultContext (var "result1") $
-    "e1" <~ Typing.inferenceResultTerm (var "result1") $
-    "t1" <~ Typing.inferenceResultType (var "result1") $
-    "s1" <~ Typing.inferenceResultSubst (var "result1") $
-    "c1" <~ Typing.inferenceResultClassConstraints (var "result1") $
-    "rp2" <<~ inferMany @@ var "fcx2" @@ (Substitution.substInContext @@ var "s1" @@ var "cx") @@ var "tl" $
-    "result2" <~ Pairs.first (var "rp2") $
-    "fcx3" <~ Pairs.second (var "rp2") $
-    "e2" <~ Pairs.first (var "result2") $
-    "t2" <~ Pairs.first (Pairs.second $ var "result2") $
-    "s2" <~ Pairs.first (Pairs.second $ Pairs.second $ var "result2") $
-    "c2" <~ Pairs.second (Pairs.second $ Pairs.second $ var "result2") $
-    "c1Subst" <~ Substitution.substInClassConstraints @@ var "s2" @@ var "c1" $
-    "mergedConstraints" <~ mergeClassConstraints @@ var "c1Subst" @@ var "c2" $
-    right $ pair (pair
-      (Lists.cons (Substitution.substTypesInTerm @@ var "s2" @@ var "e1") (var "e2"))
-      (pair
-        (Lists.cons (Substitution.substInType @@ var "s2" @@ var "t1") (var "t2"))
-        (pair (Substitution.composeTypeSubst @@ var "s1" @@ var "s2") (var "mergedConstraints")))) (var "fcx3"))
-    (Lists.uncons (var "pairs"))
-
-yieldDebug :: TTermDefinition (Context -> Graph -> String -> Term -> Type -> TypeSubst -> Prelude.Either Error InferenceResult)
-yieldDebug = define "yieldDebug" $
-  doc "Create an inference result with debug output" $
-  "fcx" ~> "cx" ~> "debugId" ~> "term" ~> "typ" ~> "subst" ~>
-  "rterm" <~ Substitution.substTypesInTerm @@ var "subst" @@ var "term" $
-  "rtyp" <~ Substitution.substInType @@ var "subst" @@ var "typ" $
-  "result" <<~ Annotations.debugIf @@ var "fcx" @@ var "debugId" @@
-    (Strings.cat $ list [
-      (string "\n\tterm: "),  ShowCore.term @@ var "term",
-      (string "\n\ttyp: "),   ShowCore.type_ @@ var "typ",
-      (string "\n\tsubst: "), ShowTyping.typeSubst @@ var "subst",
-      (string "\n\trterm: "), ShowCore.term @@ var "rterm",
-      (string "\n\trtyp: "),  ShowCore.type_ @@ var "rtyp"]) $
-  right (Typing.inferenceResult (var "rterm") (var "rtyp") (var "subst") Maps.empty (var "fcx"))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Languages.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Languages.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Languages.hs
+++ /dev/null
@@ -1,88 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Languages where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (hydraLanguage)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Reflect as Reflect
-
-
-ns :: Namespace
-ns = Namespace "hydra.languages"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = [toDefinition hydraLanguage],
-            moduleTermDependencies = [Reflect.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for Hydra Core"}
-hydraLanguage :: TTermDefinition Language
-hydraLanguage = definitionInModule module_ "hydraLanguage" $
-  doc "Language constraints for Hydra Core, i.e. no constraints." $ lets [
-  "eliminationVariants">: Sets.fromList Reflect.eliminationVariants,
-  "literalVariants">: Sets.fromList Reflect.literalVariants,
-  "floatTypes">: Sets.fromList Reflect.floatTypes,
-  "functionVariants">: Sets.fromList Reflect.functionVariants,
-  "integerTypes">: Sets.fromList Reflect.integerTypes,
-  "termVariants">: Sets.fromList Reflect.termVariants,
-  "typeVariants">: Sets.fromList Reflect.typeVariants,
-  "types">: "t" ~> cases _Type (var "t") (Just true) []] $
-  Coders.language
-    (Coders.languageName_ (string "hydra.core"))
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "types"))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Lexical.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Lexical.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Lexical.hs
+++ /dev/null
@@ -1,391 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Lexical where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (buildGraph, chooseUniqueName, dereferenceSchemaType, dereferenceVariable, elementsToGraph, emptyContext, emptyGraph, fieldsOf, getField, graphToBindings, graphWithPrimitives, lookupBinding, lookupPrimitive, lookupTerm, matchEnum, matchRecord, matchUnion, matchUnitField, requireBinding, requirePrimitive, requirePrimitiveType, requireTerm, resolveTerm, stripAndDereferenceTerm, stripAndDereferenceTermEither)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-
-
-ns :: Namespace
-ns = Namespace "hydra.lexical"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Strip.ns, ShowCore.ns, ShowError.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("A module for lexical operations over graphs.")}
-  where
-    definitions = [
-      toDefinition buildGraph,
-      toDefinition chooseUniqueName,
-      toDefinition dereferenceSchemaType,
-      toDefinition dereferenceVariable,
-      toDefinition elementsToGraph,
-      toDefinition emptyContext,
-      toDefinition emptyGraph,
-      toDefinition graphToBindings,
-      toDefinition fieldsOf,
-      toDefinition getField,
-      toDefinition graphWithPrimitives,
-      toDefinition lookupBinding,
-      toDefinition lookupPrimitive,
-      toDefinition lookupTerm,
-      toDefinition matchEnum,
-      toDefinition matchRecord,
-      toDefinition matchUnion,
-      toDefinition matchUnitField,
-      toDefinition requireBinding,
-      toDefinition requirePrimitive,
-      toDefinition requirePrimitiveType,
-      toDefinition requireTerm,
-      toDefinition resolveTerm,
-      toDefinition stripAndDereferenceTerm,
-      toDefinition stripAndDereferenceTermEither]
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
--- | Build a Graph from element bindings, environment, and primitives.
--- Construction-time shadowing: any bound term or type whose name matches a primitive is removed,
--- so primitives always take priority by construction.
-buildGraph :: TTermDefinition ([Binding] -> M.Map Name (Maybe Term) -> M.Map Name Primitive -> Graph)
-buildGraph = define "buildGraph" $
-  doc "Build a Graph from element bindings, environment, and primitives" $
-  "elements" ~> "environment" ~> "primitives" ~>
-  -- boundTerms: element bindings (name -> term) merged with let-bound vars from environment (Just term)
-  "elementTerms" <~ Maps.fromList (Lists.map ("b" ~>
-    pair (Core.bindingName (var "b")) (Core.bindingTerm (var "b"))) (var "elements")) $
-  -- Keep only entries whose value is Just, and strip the Just wrapper.
-  "letTerms" <~ Maps.fromList (Maybes.mapMaybe
-    ("kv" ~> Maybes.map ("t" ~> pair (Pairs.first $ var "kv") (var "t")) (Pairs.second $ var "kv"))
-    (Maps.toList $ var "environment")) $
-  "mergedTerms" <~ Maps.union (var "elementTerms") (var "letTerms") $
-  -- Construction-time shadowing: remove any binding whose name matches a primitive
-  "filteredTerms" <~ Maps.filterWithKey ("k" ~> "_v" ~>
-    Logic.not (Maps.member (var "k") (var "primitives"))) (var "mergedTerms") $
-  -- boundTypes: extract bindingType from each element (preserving TypeScheme with constraints)
-  "elementTypes" <~ Maps.fromList (Maybes.cat (Lists.map ("b" ~>
-    Maybes.map ("ts" ~> pair (Core.bindingName (var "b")) (var "ts"))
-      (Core.bindingTypeScheme (var "b"))) (var "elements"))) $
-  "filteredTypes" <~ Maps.filterWithKey ("k" ~> "_v" ~>
-    Logic.not (Maps.member (var "k") (var "primitives"))) (var "elementTypes") $
-  Graph.graph
-    (var "filteredTerms")
-    (var "filteredTypes")
-    Maps.empty
-    (Sets.fromList (Maps.keys (Maps.filter ("mt" ~> Maybes.isNothing (var "mt")) (var "environment"))))
-    Maps.empty
-    (var "primitives")
-    Maps.empty
-    Sets.empty
-
-chooseUniqueName :: TTermDefinition (S.Set Name -> Name -> Name)
-chooseUniqueName = define "chooseUniqueName" $
-  "reserved" ~> "name" ~>
-  "tryName" <~ ("index" ~>
-    "candidate" <~ Logic.ifElse (Equality.equal (var "index") (int32 1))
-      (var "name")
-      (Core.name $ (Core.unName (var "name") ++ Literals.showInt32 (var "index"))) $
-    Logic.ifElse (Sets.member (var "candidate") (var "reserved"))
-      (var "tryName" @@ (Math.add (var "index") (int32 1)))
-      (var "candidate")) $
-  var "tryName" @@ (int32 1)
-
-dereferenceSchemaType :: TTermDefinition (Name -> M.Map Name TypeScheme -> Maybe TypeScheme)
-dereferenceSchemaType = define "dereferenceSchemaType" $
-  doc "Resolve a schema type through a chain of zero or more typedefs" $
-  "name" ~> "types" ~>
-  "forType" <~ ("t" ~> cases _Type (var "t")
-    (Just (just (Core.typeScheme (list ([] :: [TTerm Name])) (var "t") Phantoms.nothing))) [
-    _Type_annotated>>: "at" ~> var "forType" @@ (Core.annotatedTypeBody (var "at")),
-    _Type_forall>>: "ft" ~> Maybes.map
-      ("ts" ~> Core.typeScheme
-        -- Note: no alpha-renaming of type variables
-        (Lists.cons (Core.forallTypeParameter (var "ft")) (Core.typeSchemeVariables (var "ts")))
-        (Core.typeSchemeBody (var "ts"))
-        (Core.typeSchemeConstraints (var "ts")))
-      (var "forType" @@ (Core.forallTypeBody (var "ft"))),
-    _Type_variable>>: "v" ~> dereferenceSchemaType @@ var "v" @@ var "types"]) $
-  Maybes.bind
-    (Maps.lookup (var "name") (var "types"))
-    ("ts" ~> Maybes.map
-      ("ts2" ~> Core.typeScheme
-        -- Note: no alpha-renaming of type variables
-        (Lists.concat2 (Core.typeSchemeVariables (var "ts")) (Core.typeSchemeVariables (var "ts2")))
-        (Core.typeSchemeBody (var "ts2"))
-        (Core.typeSchemeConstraints (var "ts2")))
-      (var "forType" @@ (Core.typeSchemeBody (var "ts"))))
-
-dereferenceVariable :: TTermDefinition (Graph -> Name -> Either Error Binding)
-dereferenceVariable = define "dereferenceVariable" $
-  doc "Look up a binding by name in a graph, returning Either an error or the binding" $
-  "graph" ~> "name" ~>
-  Maybes.maybe
-    (left (Error.errorResolution $ Error.resolutionErrorNoSuchBinding $ Error.noSuchBindingError (var "name")))
-    right_
-    (lookupBinding @@ var "graph" @@ var "name")
-
-elementsToGraph :: TTermDefinition (Graph -> M.Map Name TypeScheme -> [Binding] -> Graph)
-elementsToGraph = define "elementsToGraph" $
-  doc "Create a graph from a parent graph, schema types, and list of element bindings" $
-  "parent" ~> "schemaTypes" ~> "elements" ~>
-  "prims" <~ Graph.graphPrimitives (var "parent") $
-  "g" <~ (buildGraph @@ var "elements" @@ Maps.empty @@ var "prims") $
-  Graph.graphWithSchemaTypes (var "g") (var "schemaTypes")
-
-emptyContext :: TTermDefinition Context
-emptyContext = define "emptyContext" $
-  doc "An empty context; no trace, no messages, no other data." $
-  record _Context [
-    _Context_trace>>: list ([] :: [TTerm String]),
-    _Context_messages>>: list ([] :: [TTerm String]),
-    _Context_other>>: Maps.empty]
-
-emptyGraph :: TTermDefinition Graph
-emptyGraph = define "emptyGraph" $
-  doc "An empty graph; no elements, no primitives, no schema." $
-  Graph.emptyGraph
-
-graphToBindings :: TTermDefinition (Graph -> [Binding])
-graphToBindings = define "graphToBindings" $
-  doc "Reconstruct a list of Bindings from a Graph's boundTerms and boundTypes" $
-  "g" ~>
-  Lists.map ("p" ~>
-    "name" <~ Pairs.first (var "p") $
-    "term" <~ Pairs.second (var "p") $
-    Core.binding (var "name") (var "term")
-      (Maps.lookup (var "name") (Graph.graphBoundTypes (var "g"))))
-    (Maps.toList (Graph.graphBoundTerms (var "g")))
-
-fieldsOf :: TTermDefinition (Type -> [FieldType])
-fieldsOf = define "fieldsOf" $
-  doc "Extract the fields of a record or union type" $
-  "t" ~>
-  "stripped" <~ Strip.deannotateType @@ var "t" $
-  cases _Type (var "stripped")
-    (Just (list ([] :: [TTerm FieldType]))) [
-    _Type_forall>>: "forallType" ~> fieldsOf @@ (Core.forallTypeBody (var "forallType")),
-    _Type_record>>: "rt" ~> var "rt",
-    _Type_union>>: "rt" ~> var "rt"]
-
-getField :: TTermDefinition (M.Map Name Term -> Name -> (Term -> Either Error b) -> Either Error b)
-getField = define "getField" $
-  "m" ~> "fname" ~> "decode" ~>
-  Maybes.maybe
-    (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (var "fname")) (var "cx"))
-    (var "decode")
-    (Maps.lookup (var "fname") (var "m"))
-
-graphWithPrimitives :: TTermDefinition ([Primitive] -> [Primitive] -> Graph)
-graphWithPrimitives = define "graphWithPrimitives" $
-  doc "Build a graph with primitives assembled from built-in and user-provided lists. User-provided primitives shadow built-in ones." $
-  "builtIn" ~> "userProvided" ~>
-  "toMap" <~ ("ps" ~> Maps.fromList (Lists.map ("p" ~>
-    pair (Graph.primitiveName (var "p")) (var "p")) (var "ps"))) $
-  "prims" <~ Maps.union (var "toMap" @@ var "userProvided") (var "toMap" @@ var "builtIn") $
-  buildGraph @@ list ([] :: [TTerm Binding]) @@ Maps.empty @@ var "prims"
-
-lookupBinding :: TTermDefinition (Graph -> Name -> Maybe Binding)
-lookupBinding = define "lookupBinding" $
-  doc "Look up a binding in a graph by name" $
-  "graph" ~> "name" ~>
-  Maybes.map
-    ("term" ~> Core.binding (var "name") (var "term")
-      (Maps.lookup (var "name") (Graph.graphBoundTypes (var "graph"))))
-    (Maps.lookup (var "name") (Graph.graphBoundTerms (var "graph")))
-
-lookupPrimitive :: TTermDefinition (Graph -> Name -> Maybe Primitive)
-lookupPrimitive = define "lookupPrimitive" $
-  doc "Look up a primitive function in a graph by name" $
-  "graph" ~> "name" ~>
-  Maps.lookup (var "name") (Graph.graphPrimitives (var "graph"))
-
-lookupTerm :: TTermDefinition (Graph -> Name -> Maybe Term)
-lookupTerm = define "lookupTerm" $
-  doc "Look up a term by name in a graph" $
-  "graph" ~> "name" ~>
-  Maps.lookup (var "name") (Graph.graphBoundTerms (var "graph"))
-
-matchEnum :: TTermDefinition (Graph -> Name -> [(Name, b)] -> Term -> Either Error b)
-matchEnum = define "matchEnum" $
-  "graph" ~> "tname" ~> "pairs" ~>
-  matchUnion @@ var "graph" @@ var "tname" @@ (Lists.map ("pair" ~>
-    matchUnitField @@ (Pairs.first (var "pair")) @@ (Pairs.second (var "pair"))) (var "pairs"))
-
-matchRecord :: TTermDefinition (Graph -> (M.Map Name Term -> Either Error b) -> Term -> Either Error b)
-matchRecord = define "matchRecord" $
-  "graph" ~> "decode" ~> "term" ~>
-  "stripped" <~ Strip.deannotateAndDetypeTerm @@ var "term" $
-  cases _Term (var "stripped")
-    (Just (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError (string "record") (ShowCore.term @@ var "term")) (var "cx"))) [
-    _Term_record>>: "record" ~> var "decode" @@
-      (Maps.fromList (Lists.map
-        ("field" ~> pair (Core.fieldName (var "field")) (Core.fieldTerm (var "field")))
-        (Core.recordFields (var "record"))))]
-
-matchUnion :: TTermDefinition (Graph -> Name -> [(Name, Term -> Either Error b)] -> Term -> Either Error b)
-matchUnion = define "matchUnion" $
-  "graph" ~> "tname" ~> "pairs" ~> "term" ~>
-  "stripped" <~ Strip.deannotateAndDetypeTerm @@ var "term" $
-  "mapping" <~ Maps.fromList (var "pairs") $
-  cases _Term (var "stripped")
-    (Just (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError (Strings.cat2 (string "injection for type ") (Core.unName (var "tname"))) (ShowCore.term @@ var "stripped")) (var "cx"))) [
-    _Term_variable>>: "name" ~>
-      "el" <<~ requireBinding @@ var "graph" @@ var "name" $
-      matchUnion @@ var "graph" @@ var "tname" @@ var "pairs" @@ (Core.bindingTerm (var "el")),
-    _Term_inject>>: "injection" ~>
-      "exp" <~ (
-        "fname" <~ Core.fieldName (Core.injectionField (var "injection")) $
-        "val" <~ Core.fieldTerm (Core.injectionField (var "injection")) $
-        Maybes.maybe
-          (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (var "fname")) (var "cx"))
-          ("f" ~> var "f" @@ var "val")
-          (Maps.lookup (var "fname") (var "mapping"))) $
-      Logic.ifElse (Core.equalName_ (Core.injectionTypeName (var "injection")) (var "tname"))
-        (var "exp")
-        (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError (Strings.cat2 (string "injection for type ") (Core.unName (var "tname"))) (ShowCore.term @@ var "term")) (var "cx"))]
-
-matchUnitField :: TTermDefinition (Name -> y -> (Name, x -> Either Error y))
-matchUnitField = define "matchUnitField" $
-  "fname" ~> "x" ~> pair (var "fname") ("ignored" ~> right (var "x"))
-
-requireBinding :: TTermDefinition (Graph -> Name -> Either Error Binding)
-requireBinding = define "requireBinding" $
-  "graph" ~> "name" ~>
-  "showAll" <~ false $
-  "ellipsis" <~ ("strings" ~>
-    Logic.ifElse (Logic.and (Equality.gt (Lists.length (var "strings")) (int32 3)) (Logic.not (var "showAll")))
-      (Lists.concat2 (Lists.take (int32 3) (var "strings")) (list [string "..."]))
-      (var "strings")) $
-  "errMsg" <~ (
-    (string "no such element: ") ++ (Core.unName (var "name")) ++
-    (string ". Available elements: {") ++
-    (Strings.intercalate (string ", ") (var "ellipsis" @@ (Lists.map (unaryFunction Core.unName) (Maps.keys (Graph.graphBoundTerms (var "graph")))))) ++
-    (string "}")) $
-  Maybes.maybe
-    (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorOther $ Error.otherResolutionError (var "errMsg")) (var "cx"))
-    (unaryFunction right)
-    (lookupBinding @@ var "graph" @@ var "name")
-
-requirePrimitive :: TTermDefinition (Graph -> Name -> Either Error Primitive)
-requirePrimitive = define "requirePrimitive" $
-  "graph" ~> "name" ~>
-  Maybes.maybe
-    (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoSuchPrimitive $ Error.noSuchPrimitiveError (var "name")) (var "cx"))
-    (unaryFunction right)
-    (lookupPrimitive @@ var "graph" @@ var "name")
-
-requirePrimitiveType :: TTermDefinition (Graph -> Name -> Either Error TypeScheme)
-requirePrimitiveType = define "requirePrimitiveType" $
-  "tx" ~> "name" ~>
-  -- Look up the primitive directly and extract its type, avoiding O(p) map reconstruction.
-  "mts" <~ Maybes.map ("_p" ~> Graph.primitiveTypeScheme (var "_p"))
-    (Maps.lookup (var "name") (Graph.graphPrimitives $ var "tx")) $
-  optCases (var "mts")
-    (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoSuchPrimitive $ Error.noSuchPrimitiveError (var "name")) (var "cx"))
-    ("ts" ~> right $ var "ts")
-
-requireTerm :: TTermDefinition (Graph -> Name -> Either Error Term)
-requireTerm = define "requireTerm" $
-  "graph" ~> "name" ~>
-  Maybes.maybe
-    (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoSuchBinding $ Error.noSuchBindingError (var "name")) (var "cx"))
-    (unaryFunction right)
-    (resolveTerm @@ var "graph" @@ var "name")
-
-resolveTerm :: TTermDefinition (Graph -> Name -> Maybe Term)
-resolveTerm = define "resolveTerm" $
-  doc "TODO: distinguish between lambda-bound and let-bound variables" $
-  "graph" ~> "name" ~>
-  "recurse" <~ ("term" ~>
-    "stripped" <~ Strip.deannotateTerm @@ var "term" $
-    cases _Term (var "stripped")
-      (Just (just (var "term"))) [
-      _Term_variable>>: "name'" ~> resolveTerm @@ var "graph" @@ var "name'"]) $
-  Maybes.maybe
-    nothing
-    (var "recurse")
-    (lookupTerm @@ var "graph" @@ var "name")
-
-stripAndDereferenceTerm :: TTermDefinition (Graph -> Term -> Either Error Term)
-stripAndDereferenceTerm = define "stripAndDereferenceTerm" $
-  "graph" ~> "term" ~>
-  "stripped" <~ Strip.deannotateAndDetypeTerm @@ var "term" $
-  cases _Term (var "stripped")
-    (Just (right (var "stripped"))) [
-    _Term_variable>>: "v" ~>
-      Eithers.bind (requireTerm @@ var "graph" @@ var "v") (
-        "t" ~> stripAndDereferenceTerm @@ var "graph" @@ var "t")]
-
-stripAndDereferenceTermEither :: TTermDefinition (Graph -> Term -> Either Error Term)
-stripAndDereferenceTermEither = define "stripAndDereferenceTermEither" $
-  doc "Strip annotations and dereference variables, returning Either an error or the resolved term" $
-  "graph" ~> "term" ~>
-  "stripped" <~ Strip.deannotateAndDetypeTerm @@ var "term" $
-  cases _Term (var "stripped")
-    (Just (right (var "stripped"))) [
-    _Term_variable>>: "v" ~>
-      Eithers.either_
-        left_  -- propagate error
-        ("binding" ~> stripAndDereferenceTermEither @@ var "graph" @@ (Core.bindingTerm (var "binding")))
-        (dereferenceVariable @@ var "graph" @@ var "v")]
-
-
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Literals.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Literals.hs
+++ /dev/null
@@ -1,121 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Literals where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  bigfloatToFloatValue, bigintToIntegerValue, floatValueToBigfloat, integerValueToBigint)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.literals"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Conversion functions for literal values."}
-  where
-   definitions = [
-     toDefinition bigfloatToFloatValue,
-     toDefinition bigintToIntegerValue,
-     toDefinition floatValueToBigfloat,
-     toDefinition integerValueToBigint]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-bigfloatToFloatValue :: TTermDefinition (FloatType -> Bigfloat -> FloatValue)
-bigfloatToFloatValue = define "bigfloatToFloatValue" $
-  doc "Convert a bigfloat to a floating-point value of a given type (note: lossy)" $
-  "ft" ~> "bf" ~> cases _FloatType (var "ft")
-    Nothing [
-    _FloatType_bigfloat>>: constant $ Core.floatValueBigfloat $ var "bf",
-    _FloatType_float32>>: constant $ Core.floatValueFloat32 $ Literals.bigfloatToFloat32 $ var "bf",
-    _FloatType_float64>>: constant $ Core.floatValueFloat64 $ Literals.bigfloatToFloat64 $ var "bf"]
-
-bigintToIntegerValue :: TTermDefinition (IntegerType -> Integer -> IntegerValue)
-bigintToIntegerValue = define "bigintToIntegerValue" $
-  doc "Convert a bigint to an integer value of a given type (note: lossy)" $
-  "it" ~> "bi" ~> cases _IntegerType (var "it")
-    Nothing [
-    _IntegerType_bigint>>: constant $ Core.integerValueBigint $ var "bi",
-    _IntegerType_int8>>: constant $ Core.integerValueInt8 $ Literals.bigintToInt8 $ var "bi",
-    _IntegerType_int16>>: constant $ Core.integerValueInt16 $ Literals.bigintToInt16 $ var "bi",
-    _IntegerType_int32>>: constant $ Core.integerValueInt32 $ Literals.bigintToInt32 $ var "bi",
-    _IntegerType_int64>>: constant $ Core.integerValueInt64 $ Literals.bigintToInt64 $ var "bi",
-    _IntegerType_uint8>>: constant $ Core.integerValueUint8 $ Literals.bigintToUint8 $ var "bi",
-    _IntegerType_uint16>>: constant $ Core.integerValueUint16 $ Literals.bigintToUint16 $ var "bi",
-    _IntegerType_uint32>>: constant $ Core.integerValueUint32 $ Literals.bigintToUint32 $ var "bi",
-    _IntegerType_uint64>>: constant $ Core.integerValueUint64 $ Literals.bigintToUint64 $ var "bi"]
-
-floatValueToBigfloat :: TTermDefinition (FloatValue -> Bigfloat)
-floatValueToBigfloat = define "floatValueToBigfloat" $
-  doc "Convert a floating-point value of any precision to a bigfloat" $
-  match _FloatValue
-    Nothing [
-    _FloatValue_bigfloat>>: "bf" ~> var "bf",
-    _FloatValue_float32>>: "f32" ~> Literals.float32ToBigfloat $ var "f32",
-    _FloatValue_float64>>: "f64" ~> Literals.float64ToBigfloat $ var "f64"]
-
-integerValueToBigint :: TTermDefinition (IntegerValue -> Integer)
-integerValueToBigint = define "integerValueToBigint" $
-  doc "Convert an integer value of any precision to a bigint" $
-  match _IntegerValue
-    Nothing [
-    _IntegerValue_bigint>>: "bi" ~> var "bi",
-    _IntegerValue_int8>>: "i8" ~> Literals.int8ToBigint $ var "i8",
-    _IntegerValue_int16>>: "i16" ~> Literals.int16ToBigint $ var "i16",
-    _IntegerValue_int32>>: "i32" ~> Literals.int32ToBigint $ var "i32",
-    _IntegerValue_int64>>: "i64" ~> Literals.int64ToBigint $ var "i64",
-    _IntegerValue_uint8>>: "ui8" ~> Literals.uint8ToBigint $ var "ui8",
-    _IntegerValue_uint16>>: "ui16" ~> Literals.uint16ToBigint $ var "ui16",
-    _IntegerValue_uint32>>: "ui32" ~> Literals.uint32ToBigint $ var "ui32",
-    _IntegerValue_uint64>>: "ui64" ~> Literals.uint64ToBigint $ var "ui64"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Names.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Names.hs
+++ /dev/null
@@ -1,214 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Names where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  compactName, freshName, freshNames, localNameOf, nameToFilePath, namespaceOf, namespaceToFilePath,
-  normalTypeVariable, qname, qualifyName,
-  uniqueLabel, unqualifyName)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Annotations as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Constants  as Constants
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-
-
-ns :: Namespace
-ns = Namespace "hydra.names"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, Constants.ns, Formatting.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Functions for working with qualified names.")}
-  where
-   definitions = [
-     toDefinition compactName,
-     toDefinition freshName,
-     toDefinition freshNames,
-     toDefinition localNameOf,
-     toDefinition nameToFilePath,
-     toDefinition namespaceOf,
-     toDefinition namespaceToFilePath,
-     toDefinition normalTypeVariable,
-     toDefinition qname,
-     toDefinition qualifyName,
-     toDefinition uniqueLabel,
-     toDefinition unqualifyName]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-compactName :: TTermDefinition (M.Map Namespace String -> Name -> String)
-compactName = define "compactName" $
-  doc "Given a mapping of namespaces to prefixes, convert a name to a compact string representation" $
-  lambda "namespaces" $ lambda "name" $ lets [
-    "qualName">: qualifyName @@ var "name",
-    "mns">: Packaging.qualifiedNameNamespace $ var "qualName",
-    "local">: Packaging.qualifiedNameLocal $ var "qualName"]
-    $ Maybes.maybe
-        (Core.unName $ var "name")
-        (lambda "ns" $
-          Maybes.maybe (var "local")
-            (lambda "pre" $ Strings.cat $ list [var "pre", string ":", var "local"])
-            (Maps.lookup (var "ns") (var "namespaces")))
-        (var "mns")
-
-localNameOf :: TTermDefinition (Name -> String)
-localNameOf = define "localNameOf" $
-  doc "Extract the local part of a name" $
-  unaryFunction Packaging.qualifiedNameLocal <.> qualifyName
-
-nameToFilePath :: TTermDefinition (CaseConvention -> CaseConvention -> FileExtension -> Name -> FilePath)
-nameToFilePath = define "nameToFilePath" $
-  doc "Convert a name to file path, given case conventions for namespaces and local names, and assuming '/' as the file path separator" $
-  "nsConv" ~> "localConv" ~> "ext" ~> "name" ~>
-  "qualName" <~ qualifyName @@ var "name" $
-  "ns" <~ Packaging.qualifiedNameNamespace (var "qualName") $
-  "local" <~ Packaging.qualifiedNameLocal (var "qualName") $
-  "nsToFilePath" <~ ("ns" ~>
-    Strings.intercalate (string "/") (Lists.map
-      ("part" ~> Formatting.convertCase @@ Util.caseConventionCamel @@ var "nsConv" @@ var "part")
-      (Strings.splitOn (string ".") (Packaging.unNamespace (var "ns"))))) $
-  "prefix" <~ Maybes.maybe (string "")
-    ("n" ~> Strings.cat2 (var "nsToFilePath" @@ var "n") (string "/"))
-    (var "ns") $
-  "suffix" <~ Formatting.convertCase @@ Util.caseConventionPascal @@ var "localConv" @@ var "local" $
-  Strings.cat (list [var "prefix", var "suffix", string ".", Packaging.unFileExtension (var "ext")])
-
-namespaceOf :: TTermDefinition (Name -> Maybe Namespace)
-namespaceOf = define "namespaceOf" $
-  doc "Extract the namespace of a name, if any" $
-  unaryFunction Packaging.qualifiedNameNamespace <.> qualifyName
-
-namespaceToFilePath :: TTermDefinition (CaseConvention -> FileExtension -> Namespace -> String)
-namespaceToFilePath = define "namespaceToFilePath" $
-  doc "Convert a namespace to a file path with the given case convention and file extension" $
-  lambda "caseConv" $ lambda "ext" $ lambda "ns" $ lets [
-    "parts">: Lists.map
-      (Formatting.convertCase @@ Util.caseConventionCamel @@ var "caseConv")
-      (Strings.splitOn (string ".") (Packaging.unNamespace $ var "ns"))]
-    $ (Strings.intercalate (string "/") $ var "parts") ++ string "." ++ (Packaging.unFileExtension $ var "ext")
-
-qname :: TTermDefinition (Namespace -> String -> Name)
-qname = define "qname" $
-  doc "Construct a qualified (dot-separated) name" $
-  lambda "ns" $ lambda "name" $
-    wrap _Name $
-      Strings.cat $
-        list [apply (unwrap _Namespace) (var "ns"), string ".", var "name"]
-
-qualifyName :: TTermDefinition (Name -> QualifiedName)
-qualifyName = define "qualifyName" $
-  doc "Split a dot-separated name into a namespace and local name" $
-  lambda "name" $ lets [
-    "parts">: Lists.reverse (Strings.splitOn (string ".") (Core.unName $ var "name"))]
-    -- Use uncons to destructure (last, rest) from the reversed parts list.
-    -- Empty parts is unreachable (splitOn on a string produces >= 1 element);
-    -- in that case fall back to an unqualified name.
-    $ Maybes.maybe
-      (Packaging.qualifiedName nothing (Core.unName $ var "name"))
-      ("uc" ~>
-        "localName" <~ Pairs.first (var "uc") $
-        "restReversed" <~ Pairs.second (var "uc") $
-        Logic.ifElse
-          (Lists.null $ var "restReversed")
-          (Packaging.qualifiedName nothing (Core.unName $ var "name"))
-          (Packaging.qualifiedName
-            (just $ wrap _Namespace (Strings.intercalate (string ".") (Lists.reverse (var "restReversed"))))
-            (var "localName")))
-      (Lists.uncons $ var "parts")
-
-uniqueLabel :: TTermDefinition (S.Set String -> String -> String)
-uniqueLabel = define "uniqueLabel" $
-  doc "Generate a unique label by appending a suffix if the label is already in use" $
-  lambda "visited" $ lambda "l" $
-  Logic.ifElse (Sets.member (var "l") (var "visited"))
-    (uniqueLabel @@ var "visited" @@ Strings.cat2 (var "l") (string "'"))
-    (var "l")
-
-unqualifyName :: TTermDefinition (QualifiedName -> Name)
-unqualifyName = define "unqualifyName" $
-  doc "Convert a qualified name to a dot-separated name" $
-  lambda "qname" $ lets [
-    "prefix">: Maybes.maybe
-      (string "")
-      (lambda "n" $ (unwrap _Namespace @@ var "n") ++ string ".")
-      (project _QualifiedName _QualifiedName_namespace @@ var "qname")]
-    $ wrap _Name $ var "prefix" ++ (project _QualifiedName _QualifiedName_local @@ var "qname")
-
-freshName :: TTermDefinition (Context -> (Name, Context))
-freshName = define "freshName" $
-  doc "Generate a fresh type variable name, threading Context" $
-  "cx" ~>
-  "count" <~ Annotations.getCount @@ Constants.key_freshTypeVariableCount @@ var "cx" $
-  pair
-    (normalTypeVariable @@ var "count")
-    (Annotations.putCount @@ Constants.key_freshTypeVariableCount @@ Math.add (var "count") (int32 1) @@ var "cx")
-
-freshNames :: TTermDefinition (Int -> Context -> ([Name], Context))
-freshNames = define "freshNames" $
-  doc "Generate multiple fresh type variable names, threading Context" $
-  "n" ~> "cx" ~>
-  -- Fold over n units, accumulating names and threading context
-  "go" <~ ("acc" ~> "_" ~>
-    "names" <~ Pairs.first (var "acc") $
-    "cx0" <~ Pairs.second (var "acc") $
-    "result" <~ freshName @@ var "cx0" $
-    "name" <~ Pairs.first (var "result") $
-    "cx1" <~ Pairs.second (var "result") $
-    pair (Lists.concat2 (var "names") (Lists.pure (var "name"))) (var "cx1")) $
-  Lists.foldl (var "go") (pair (list ([] :: [TTerm Name])) (var "cx")) (Lists.replicate (var "n") unit)
-
-normalTypeVariable :: TTermDefinition (Int -> Name)
-normalTypeVariable = define "normalTypeVariable" $
-  doc "Type variable naming convention follows Haskell: t0, t1, etc." $
-  "i" ~> Core.name (Strings.cat2 (string "t") (Literals.showInt32 $ var "i"))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Parsers.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Parsers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Parsers.hs
+++ /dev/null
@@ -1,298 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Parsers where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (map)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (apply, bind, char, map)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++), pure, fail, map)
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.parsers"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "General-purpose parser combinators"}
-  where
-   definitions = [
-     toDefinition alt,
-     toDefinition anyChar,
-     toDefinition apply,
-     toDefinition between,
-     toDefinition bind,
-     toDefinition char,
-     toDefinition choice,
-     toDefinition eof,
-     toDefinition fail,
-     toDefinition lazy,
-     toDefinition many,
-     toDefinition map,
-     toDefinition optional,
-     toDefinition pure,
-     toDefinition runParser,
-     toDefinition satisfy,
-     toDefinition sepBy,
-     toDefinition sepBy1,
-     toDefinition some,
-     toDefinition string_]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Try the first parser, if it fails try the second
-alt :: TTermDefinition (Parser a -> Parser a -> Parser a)
-alt = define "alt" $
-  doc "Try the first parser; if it fails without consuming input, try the second" $
-  "p1" ~> "p2" ~>
-  "parse" <~ ("input" ~> cases _ParseResult (unwrap _Parser @@ (var "p1") @@ (var "input")) Nothing [
-    _ParseResult_success>>: "s" ~>
-      Parsing.parseResultSuccess (var "s"),
-    _ParseResult_failure>>: "e" ~>
-      -- Only try alternative if no input was consumed
-      Logic.ifElse (Equality.equal (Parsing.parseErrorRemainder $ var "e") (var "input"))
-        (unwrap _Parser @@ (var "p2") @@ (var "input"))
-        (Parsing.parseResultFailure (var "e"))]) $
-  Parsing.parser (var "parse")
-
--- | Parse any single character (as codepoint)
-anyChar :: TTermDefinition (Parser Int)
-anyChar = define "anyChar" $
-  doc "Parse any single character (codepoint)" $
-  satisfy @@ (constant true)
-
--- | Applicative apply for parsers
-apply :: TTermDefinition (Parser (a -> b) -> Parser a -> Parser b)
-apply = define "apply" $
-  doc "Apply a parser containing a function to a parser containing a value" $
-  "pf" ~> "pa" ~>
-  "parse" <~ ("input" ~> cases _ParseResult (unwrap _Parser @@ (var "pf") @@ (var "input")) Nothing [
-    _ParseResult_success>>: "sf" ~>
-      cases _ParseResult (unwrap _Parser @@ (var "pa") @@ (Parsing.parseSuccessRemainder $ var "sf")) Nothing [
-        _ParseResult_success>>: "sa" ~>
-          Parsing.parseResultSuccess (Parsing.parseSuccess
-            ((Parsing.parseSuccessValue $ var "sf") @@ (Parsing.parseSuccessValue $ var "sa"))
-            (Parsing.parseSuccessRemainder $ var "sa")),
-        _ParseResult_failure>>: "e" ~>
-          Parsing.parseResultFailure (var "e")],
-    _ParseResult_failure>>: "e" ~>
-      Parsing.parseResultFailure (var "e")]) $
-  Parsing.parser (var "parse")
-
--- | Parse something between two other parsers
-between :: TTermDefinition (Parser open -> Parser close -> Parser a -> Parser a)
-between = define "between" $
-  doc "Parse something between an opening and closing parser" $
-  "open" ~> "close" ~> "p" ~>
-    bind @@ var "open" @@ (constant $
-      bind @@ var "p" @@ ("x" ~>
-        bind @@ var "close" @@ (constant $
-          pure @@ var "x")))
-
--- | Monadic bind for parsers
-bind :: TTermDefinition (Parser a -> (a -> Parser b) -> Parser b)
-bind = define "bind" $
-  doc "Sequence two parsers, passing the result of the first to a function that produces the second" $
-  "pa" ~> "f" ~>
-  "parse" <~ ("input" ~> cases _ParseResult (unwrap _Parser @@ (var "pa") @@ (var "input")) Nothing [
-    _ParseResult_success>>: "s" ~>
-      unwrap _Parser @@
-        (var "f" @@ (Parsing.parseSuccessValue $ var "s")) @@
-        (Parsing.parseSuccessRemainder $ var "s"),
-    _ParseResult_failure>>: "e" ~>
-      Parsing.parseResultFailure (var "e")]) $
-  Parsing.parser (var "parse")
-
--- | Parse a specific character (as codepoint)
-char :: TTermDefinition (Int -> Parser Int)
-char = define "char" $
-  doc "Parse a specific character (codepoint)" $
-  "c" ~>
-    satisfy @@ ("x" ~> Equality.equal (var "x") (var "c"))
-
--- | Try parsers in order until one succeeds
-choice :: TTermDefinition ([Parser a] -> Parser a)
-choice = define "choice" $
-  doc "Try each parser in the list until one succeeds" $
-  "ps" ~>
-    Lists.foldl alt (fail @@ string "no choice matched") (var "ps")
-
--- | Parse end of input
-eof :: TTermDefinition (Parser ())
-eof = define "eof" $
-  doc "A parser that succeeds only at the end of input" $
-  Parsing.parser ("input" ~>
-    Logic.ifElse (Equality.equal (var "input") (string ""))
-      (Parsing.parseResultSuccess (Parsing.parseSuccess unit (string "")))
-      (Parsing.parseResultFailure (Parsing.parseError (string "expected end of input") (var "input"))))
-
--- | A parser that always fails with the given message
-fail :: TTermDefinition (String -> Parser a)
-fail = define "fail" $
-  doc "A parser that always fails with the given error message" $
-  "msg" ~>
-    Parsing.parser ("input" ~>
-      Parsing.parseResultFailure (Parsing.parseError (var "msg") (var "input")))
-
--- | Create a parser that defers construction of another parser until parsing time.
--- This is essential for breaking recursive parser definitions.
-lazy :: TTermDefinition ((() -> Parser a) -> Parser a)
-lazy = define "lazy" $
-  doc ("Create a parser that defers construction of another parser until parsing time."
-    <> " This is essential for breaking recursive parser definitions.") $
-  "f" ~>
-  Parsing.parser ("input" ~>
-    unwrap _Parser @@ (var "f" @@ unit) @@ (var "input"))
-
--- | Parse zero or more occurrences
-many :: TTermDefinition (Parser a -> Parser [a])
-many = define "many" $
-  doc "Parse zero or more occurrences of the given parser" $
-  "p" ~>
-    alt @@ (some @@ var "p") @@ (pure @@ list ([] :: [TTerm a]))
-
--- | Map a function over the result of a parser
-map :: TTermDefinition ((a -> b) -> Parser a -> Parser b)
-map = define "map" $
-  doc "Apply a function to the result of a parser" $
-  "f" ~> "pa" ~>
-  "parse" <~ ("input" ~> cases _ParseResult (unwrap _Parser @@ (var "pa") @@ (var "input")) Nothing [
-    _ParseResult_success>>: "s" ~>
-      Parsing.parseResultSuccess (Parsing.parseSuccess
-        (var "f" @@ (Parsing.parseSuccessValue $ var "s"))
-        (Parsing.parseSuccessRemainder $ var "s")),
-    _ParseResult_failure>>: "e" ~>
-      Parsing.parseResultFailure (var "e")]) $
-  Parsing.parser (var "parse")
-
--- | Optionally parse something
-optional :: TTermDefinition (Parser a -> Parser (Maybe a))
-optional = define "optional" $
-  doc "Optionally parse something, returning Nothing if it fails" $
-  "p" ~>
-    alt
-      @@ (map @@ (unaryFunction just) @@ var "p")
-      @@ (pure @@ nothing)
-
--- | A parser that always succeeds with the given value
-pure :: TTermDefinition (a -> Parser a)
-pure = define "pure" $
-  doc "A parser that always succeeds with the given value without consuming input" $
-  "a" ~>
-    Parsing.parser ("input" ~>
-      Parsing.parseResultSuccess (Parsing.parseSuccess (var "a") (var "input")))
-
--- | Run a parser on input and return the result
-runParser :: TTermDefinition (Parser a -> String -> ParseResult a)
-runParser = define "runParser" $
-  doc "Run a parser on the given input string" $
-  "p" ~> "input" ~>
-    unwrap _Parser @@ (var "p") @@ (var "input")
-
--- | Parse a character that satisfies a predicate (characters represented as codepoints)
-satisfy :: TTermDefinition ((Int -> Bool) -> Parser Int)
-satisfy = define "satisfy" $
-  doc "Parse a character (codepoint) that satisfies the given predicate" $
-  "pred" ~>
-  "parse" <~ ("input" ~>
-    "codes" <~ Strings.toList (var "input") $
-    Maybes.maybe
-      (Parsing.parseResultFailure (Parsing.parseError (string "unexpected end of input") (var "input")))
-      ("c" ~>
-       "rest" <~ Strings.fromList (Lists.drop (int32 1) (var "codes")) $
-       Logic.ifElse (var "pred" @@ var "c")
-         (Parsing.parseResultSuccess (Parsing.parseSuccess (var "c") (var "rest")))
-         (Parsing.parseResultFailure (Parsing.parseError (string "character did not satisfy predicate") (var "input"))))
-      (Lists.maybeHead $ var "codes")) $
-  Parsing.parser (var "parse")
-
--- | Parse zero or more occurrences separated by a separator
-sepBy :: TTermDefinition (Parser a -> Parser sep -> Parser [a])
-sepBy = define "sepBy" $
-  doc "Parse zero or more occurrences separated by a separator" $
-  "p" ~> "sep" ~>
-    alt @@ (sepBy1 @@ var "p" @@ var "sep") @@ (pure @@ list ([] :: [TTerm a]))
-
--- | Parse one or more occurrences separated by a separator
-sepBy1 :: TTermDefinition (Parser a -> Parser sep -> Parser [a])
-sepBy1 = define "sepBy1" $
-  doc "Parse one or more occurrences separated by a separator" $
-  "p" ~> "sep" ~>
-    bind @@ var "p" @@ ("x" ~>
-      bind @@ (many @@ (bind @@ var "sep" @@ (constant $ var "p"))) @@ ("xs" ~>
-        pure @@ (Lists.cons (var "x") (var "xs"))))
-
--- | Parse one or more occurrences
-some :: TTermDefinition (Parser a -> Parser [a])
-some = define "some" $
-  doc "Parse one or more occurrences of the given parser" $
-  "p" ~>
-    bind @@ var "p" @@ ("x" ~>
-      bind @@ (many @@ var "p") @@ ("xs" ~>
-        pure @@ (Lists.cons (var "x") (var "xs"))))
-
--- | Parse a specific string
-string_ :: TTermDefinition (String -> Parser String)
-string_ = define "string" $
-  doc "Parse a specific string" $
-  "str" ~>
-    Parsing.parser ("input" ~>
-      "strCodes" <~ Strings.toList (var "str") $
-      "inputCodes" <~ Strings.toList (var "input") $
-      "strLen" <~ Lists.length (var "strCodes") $
-      "inputPrefix" <~ Lists.take (var "strLen") (var "inputCodes") $
-      Logic.ifElse (Equality.equal (var "strCodes") (var "inputPrefix"))
-        (Parsing.parseResultSuccess (Parsing.parseSuccess
-          (var "str")
-          (Strings.fromList (Lists.drop (var "strLen") (var "inputCodes")))))
-        (Parsing.parseResultFailure (Parsing.parseError
-          (string "expected: " ++ var "str")
-          (var "input"))))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Predicates.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Predicates.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Predicates.hs
+++ /dev/null
@@ -1,341 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Predicates where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  isComplexBinding,
-  isComplexTerm,
-  isComplexVariable,
-  isEncodedTerm,
-  isEncodedType,
-  isEnumRowType,
-  isEnumType,
-  isNominalType,
-  isSerializable,
-  isSerializableByName,
-  isSerializableType,
-  isTrivialTerm,
-  isType,
-  isUnitTerm,
-  isUnitType,
-  typeDependencies)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Arity        as Arity
-import qualified Hydra.Sources.Kernel.Terms.Reflect      as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting    as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Strip        as Strip
-
-import qualified Hydra.Sources.Kernel.Terms.Dependencies as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Lexical     as Lexical
-import qualified Hydra.Sources.Decode.Core              as DecodeCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.predicates"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Arity.ns, Dependencies.ns, moduleNamespace DecodeCore.module_, Lexical.ns, Reflect.ns, Rewriting.ns, Strip.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Type and term classification predicates")}
-  where
-    definitions = [
-      toDefinition isComplexBinding,
-      toDefinition isComplexTerm,
-      toDefinition isComplexVariable,
-      toDefinition isEncodedTerm,
-      toDefinition isEncodedType,
-      toDefinition isEnumRowType,
-      toDefinition isEnumType,
-      toDefinition isNominalType,
-      toDefinition isSerializable,
-      toDefinition isSerializableByName,
-      toDefinition isSerializableType,
-      toDefinition isTrivialTerm,
-      toDefinition isType,
-      toDefinition isUnitTerm,
-      toDefinition isUnitType,
-      toDefinition typeDependencies]
-
-isComplexBinding :: TTermDefinition (Graph -> Binding -> Bool)
-isComplexBinding = define "isComplexBinding" $
-  doc "Check if a binding needs to be treated as a function" $
-  "tc" ~> "b" ~>
-  "term" <~ Core.bindingTerm (var "b") $
-  "mts" <~ Core.bindingTypeScheme (var "b") $
-  -- Bindings without type schemes are complex (e.g., lifted case expressions)
-  Maybes.cases (var "mts")
-    (isComplexTerm @@ var "tc" @@ var "term") $
-    "ts" ~>
-      -- Check if polymorphic
-      "isPolymorphic" <~ Logic.not (Lists.null (Core.typeSchemeVariables $ var "ts")) $
-      -- Check if non-nullary
-      "isNonNullary" <~ Equality.gt (Arity.typeArity @@ (Core.typeSchemeBody $ var "ts")) (int32 0) $
-      -- Check if complex term
-      "isComplex" <~ isComplexTerm @@ var "tc" @@ var "term" $
-      Logic.or (Logic.or (var "isPolymorphic") (var "isNonNullary")) (var "isComplex")
-
-isComplexTerm :: TTermDefinition (Graph -> Term -> Bool)
-isComplexTerm = define "isComplexTerm" $
-  doc "Check if a term needs to be treated as a function rather than a simple value" $
-  "tc" ~> "t" ~>
-  cases _Term (var "t")
-    (Just $
-      -- Default: check if any subterm is complex
-      Lists.foldl
-        ("b" ~> "sub" ~> Logic.or (var "b") (isComplexTerm @@ var "tc" @@ var "sub"))
-        (boolean False)
-        (Rewriting.subterms @@ var "t")) [
-    _Term_let>>: constant (boolean True),
-    _Term_typeApplication>>: constant (boolean True),
-    _Term_typeLambda>>: constant (boolean True),
-    _Term_variable>>: "name" ~> isComplexVariable @@ var "tc" @@ var "name"]
-
-isComplexVariable :: TTermDefinition (Graph -> Name -> Bool)
-isComplexVariable = define "isComplexVariable" $
-  doc "Check if a variable is bound to a complex term" $
-  "tc" ~> "name" ~>
-  -- Check if there's metadata for this variable (indicates complexity)
-  "metaLookup" <~ Maps.lookup (var "name") (Graph.graphMetadata $ var "tc") $
-  Logic.ifElse
-    (Maybes.isJust (var "metaLookup"))
-    (boolean True)
-    -- Lambda-bound variables are complex because they might be thunked
-    (Logic.ifElse
-      (Sets.member (var "name") (Graph.graphLambdaVariables $ var "tc"))
-      (boolean True)
-      -- Check if the variable is in the graph's bound types
-      ("typeLookup" <~ Maps.lookup (var "name") (Graph.graphBoundTypes $ var "tc") $
-       Maybes.maybe
-         -- Not in graphBoundTypes: fall through to graphPrimitives
-         ("primLookup" <~ Maps.lookup (var "name") (Graph.graphPrimitives $ var "tc") $
-          Maybes.maybe
-            -- If not in graph at all, assume mutual recursion (complex)
-            (boolean True)
-            -- If a primitive, non-nullary iff type arity > 0
-            ("prim" ~> Equality.gt (Arity.typeSchemeArity @@ Graph.primitiveTypeScheme (var "prim")) (int32 0))
-            (var "primLookup"))
-         -- If in graph, check if the binding itself is non-nullary (a function).
-         -- Non-nullary bindings are always complex (they take parameters).
-         -- Nullary bindings are assumed non-complex from this check;
-         -- their actual complexity will be determined by isComplexBinding
-         -- at the reference site.
-         ("ts" ~> Equality.gt (Arity.typeSchemeArity @@ var "ts") (int32 0))
-         (var "typeLookup")))
-
-isEncodedTerm :: TTermDefinition (Term -> Bool)
-isEncodedTerm = define "isEncodedTerm" $
-  doc "Determines whether a given term is an encoded term (meta-level term)" $
-  "t" ~> cases _Term (Strip.deannotateTerm @@ var "t") (Just false) [
-    _Term_application>>: "a" ~>
-      isEncodedTerm @@ (Core.applicationFunction (var "a")),
-    _Term_inject>>: "i" ~>
-      Equality.equal (string (unName _Term)) (Core.unName (Core.injectionTypeName (var "i")))]
-
-isEncodedType :: TTermDefinition (Term -> Bool)
-isEncodedType = define "isEncodedType" $
-  doc "Determines whether a given term is an encoded type" $
-  "t" ~> cases _Term (Strip.deannotateTerm @@ var "t") (Just false) [
-    _Term_application>>: "a" ~>
-      isEncodedType @@ (Core.applicationFunction (var "a")),
-    _Term_inject>>: "i" ~>
-      Equality.equal (string (unName _Type)) (Core.unName (Core.injectionTypeName (var "i")))]
-
-isEnumRowType :: TTermDefinition ([FieldType] -> Bool)
-isEnumRowType = define "isEnumRowType" $
-  doc "Check if a row type represents an enum (all fields are unit-typed)" $
-  "rt" ~> Lists.foldl (binaryFunction Logic.and) true $
-    Lists.map ("f" ~> isUnitType @@ (Strip.deannotateType @@ (Core.fieldTypeType (var "f")))) $
-      var "rt"
-
-isEnumType :: TTermDefinition (Type -> Bool)
-isEnumType = define "isEnumType" $
-  doc "Check if a type is an enum type" $
-  "typ" ~>
-  match _Type (Just false) [
-    _Type_union>>: "rt" ~> isEnumRowType @@ var "rt"]
-  @@ (Strip.deannotateType @@ var "typ")
-
--- | Check whether a type is a nominal type definition (record, union, wrap, or forall wrapping one).
---   Type aliases (applications, functions, literal types, etc.) return false.
-isNominalType :: TTermDefinition (Type -> Bool)
-isNominalType = define "isNominalType" $
-  lambda "typ" $
-    cases _Type (Strip.deannotateType @@ var "typ")
-      (Just false) [
-      _Type_record>>: lambda "rt" $ true,
-      _Type_union>>: lambda "rt" $ true,
-      _Type_wrap>>: lambda "wt" $ true,
-      _Type_forall>>: lambda "fa" $
-        isNominalType @@ Core.forallTypeBody (var "fa")]
-
-isSerializable :: TTermDefinition (Context -> Graph -> Binding -> Either Error Bool)
-isSerializable = define "isSerializable" $
-  doc "Check if an element is serializable (no function types in dependencies) (Either version)" $
-  "cx" ~> "graph" ~> "el" ~>
-  "variants" <~ ("typ" ~>
-    Lists.map (Reflect.typeVariant) (Rewriting.foldOverType @@ Coders.traversalOrderPre @@
-      ("m" ~> "t" ~> Lists.cons (var "t") (var "m")) @@ list ([] :: [TTerm Type]) @@ var "typ")) $
-  Eithers.map
-    ("deps" ~>
-      "allVariants" <~ Sets.fromList (Lists.concat (Lists.map (var "variants") (Maps.elems (var "deps")))) $
-      Logic.not (Sets.member Variants.typeVariantFunction (var "allVariants")))
-    (typeDependencies @@ var "cx" @@ var "graph" @@ false @@ (unaryFunction Equality.identity) @@ Core.bindingName (var "el"))
-
-isSerializableType :: TTermDefinition (Type -> Bool)
-isSerializableType = define "isSerializableType" $
-  doc "Check if a type is serializable (no function types in the type itself)" $
-  "typ" ~>
-  "allVariants" <~ Sets.fromList (Lists.map (Reflect.typeVariant)
-    (Rewriting.foldOverType @@ Coders.traversalOrderPre @@
-      ("m" ~> "t" ~> Lists.cons (var "t") (var "m")) @@ list ([] :: [TTerm Type]) @@ var "typ")) $
-  Logic.not (Sets.member Variants.typeVariantFunction (var "allVariants"))
-
-isSerializableByName :: TTermDefinition (Context -> Graph -> Name -> Either Error Bool)
-isSerializableByName = define "isSerializableByName" $
-  doc "Check if a type (by name) is serializable, resolving all type dependencies (Either version)" $
-  "cx" ~> "graph" ~> "name" ~>
-  "variants" <~ ("typ" ~>
-    Lists.map (Reflect.typeVariant) (Rewriting.foldOverType @@ Coders.traversalOrderPre @@
-      ("m" ~> "t" ~> Lists.cons (var "t") (var "m")) @@ list ([] :: [TTerm Type]) @@ var "typ")) $
-  Eithers.map
-    ("deps" ~>
-      "allVariants" <~ Sets.fromList (Lists.concat (Lists.map (var "variants") (Maps.elems (var "deps")))) $
-      Logic.not (Sets.member Variants.typeVariantFunction (var "allVariants")))
-    (typeDependencies @@ var "cx" @@ var "graph" @@ false @@ (unaryFunction Equality.identity) @@ var "name")
-
-isType :: TTermDefinition (Type -> Bool)
-isType = define "isType" $
-  doc "Check whether a type is a type (always true for non-encoded types)" $
-  "t" ~> cases _Type (Strip.deannotateType @@ var "t") (Just false) [
-    _Type_application>>: "a" ~>
-      isType @@ (Core.applicationTypeFunction (var "a")),
-    _Type_forall>>: "l" ~>
-      isType @@ (Core.forallTypeBody (var "l")),
-    _Type_union>>: "rt" ~> false,
-    _Type_variable>>: "v" ~> Equality.equal (var "v") (Core.nameLift _Type)]
-
-isTrivialTerm :: TTermDefinition (Term -> Bool)
-isTrivialTerm = define "isTrivialTerm" $
-  doc "Check if a term is trivially cheap (no thunking needed)" $
-  "t" ~>
-  cases _Term (Strip.deannotateTerm @@ var "t")
-    (Just $ boolean False) [
-    -- Literals are always trivial
-    _Term_literal>>: constant (boolean True),
-    -- Plain lambda-bound variables are trivial, but qualified names (element/primitive references
-    -- like "hydra.lib.maps.empty") are calls, not just references, and are not trivial.
-    _Term_variable>>: "nm" ~>
-      Equality.equal (Lists.length (Strings.splitOn (string ".") (Core.unName (var "nm")))) (int32 1),
-    -- Unit is trivial
-    _Term_unit>>: constant (boolean True),
-    -- Field projection on a trivial subterm is trivial (e.g. app.function)
-    _Term_application>>: "app" ~>
-      "fun" <~ Core.applicationFunction (var "app") $
-      "arg" <~ Core.applicationArgument (var "app") $
-      cases _Term (var "fun") (Just $ boolean False) [
-        -- record projection: trivial if the subject is trivial
-        _Term_project>>: constant (isTrivialTerm @@ var "arg"),
-        -- newtype unwrap: trivial if the subject is trivial
-        _Term_unwrap>>: constant (isTrivialTerm @@ var "arg")],
-    -- Maybe term (just x) where x is trivial; nothing is also trivial
-    _Term_maybe>>: "opt" ~>
-      Maybes.maybe (boolean True) ("inner" ~> isTrivialTerm @@ var "inner") (var "opt"),
-    -- Record construction is trivial if all field terms are trivial
-    _Term_record>>: "rec" ~>
-      Lists.foldl ("acc" ~> "fld" ~> Logic.and (var "acc") (isTrivialTerm @@ (Core.fieldTerm $ var "fld")))
-        (boolean True) (Core.recordFields $ var "rec"),
-    -- Wrap (newtype construction) is trivial if the inner term is trivial
-    _Term_wrap>>: "wt" ~> isTrivialTerm @@ (Core.wrappedTermBody $ var "wt"),
-    -- Type applications/lambdas: check the inner term
-    _Term_typeApplication>>: "ta" ~> isTrivialTerm @@ (Core.typeApplicationTermBody $ var "ta"),
-    _Term_typeLambda>>: "tl" ~> isTrivialTerm @@ (Core.typeLambdaBody $ var "tl")]
-
-isUnitTerm :: TTermDefinition (Term -> Bool)
-isUnitTerm = define "isUnitTerm" $
-  doc "Check whether a term is the unit term" $
-  match _Term (Just false) [_Term_unit>>: constant true]
-
-isUnitType :: TTermDefinition (Type -> Bool)
-isUnitType = define "isUnitType" $
-  doc "Check whether a type is the unit type" $
-  match _Type (Just false) [_Type_unit>>: constant true]
-
-typeDependencies :: TTermDefinition (Context -> Graph -> Bool -> (Type -> Type) -> Name -> Either Error (M.Map Name Type))
-typeDependencies = define "typeDependencies" $
-  doc "Get all type dependencies for a given type name (Either version)" $
-  "cx" ~> "graph" ~> "withSchema" ~> "transform" ~> "name" ~>
-  "requireType" <~ ("name" ~>
-    "cx1" <~ Ctx.pushTrace (Strings.cat2 (string "type dependencies of ") (Core.unName (var "name"))) (var "cx") $
-    Eithers.bind (Lexical.requireBinding @@ var "graph" @@ var "name") (
-      "el" ~> Eithers.bimap ("_e" ~> Error.errorDecoding $ var "_e") ("_a" ~> var "_a")
-          (decoderFor _Type @@ var "graph" @@ Core.bindingTerm (var "el")))) $
-  "toPair" <~ ("name" ~>
-    Eithers.map ("typ" ~> pair (var "name") (var "transform" @@ var "typ"))
-      (var "requireType" @@ var "name")) $
-  "deps" <~ ("seeds" ~> "names" ~>
-    Logic.ifElse (Sets.null (var "seeds"))
-      (right (var "names"))
-      (Eithers.bind (Eithers.mapList (var "toPair") (Sets.toList (var "seeds"))) (
-        "pairs" ~>
-        "newNames" <~ Maps.union (var "names") (Maps.fromList (var "pairs")) $
-        "refs" <~ Lists.foldl (binaryFunction Sets.union) Sets.empty (Lists.map
-          ("pair" ~> Dependencies.typeDependencyNames @@ var "withSchema" @@ Pairs.second (var "pair"))
-          (var "pairs")) $
-        "visited" <~ Sets.fromList (Maps.keys (var "names")) $
-        "newSeeds" <~ Sets.difference (var "refs") (var "visited") $
-        var "deps" @@ var "newSeeds" @@ var "newNames"))) $
-  var "deps" @@ Sets.singleton (var "name") @@ Maps.empty
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Reduction.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Reduction.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Reduction.hs
+++ /dev/null
@@ -1,919 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Reduction where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  alphaConvert, betaReduceType, contractTerm, countPrimitiveInvocations, etaReduceTerm, etaExpandTerm, etaExpansionArity, etaExpandTypedTerm,
-  reduceTerm, termIsClosed, termIsValue)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Arity as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking as Checking
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Hoisting as Hoisting
-import qualified Hydra.Sources.Kernel.Terms.Inference as Inference
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Resolution as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Scoping as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Annotations as Annotations
-
-
-ns :: Namespace
-ns = Namespace "hydra.reduction"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Arity.ns, Checking.ns, ExtractCore.ns, Hoisting.ns, Inference.ns, Lexical.ns,
-      Rewriting.ns, Scoping.ns,
-      Resolution.ns, ShowCore.ns, ShowError.ns, Strip.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Functions for reducing terms and types, i.e. performing computations."}
-  where
-   definitions = [
-     toDefinition alphaConvert,
-     toDefinition betaReduceType,
-     toDefinition contractTerm,
-     toDefinition countPrimitiveInvocations,
-     toDefinition etaExpandTerm,
-     toDefinition etaExpandTypedTerm,
-     toDefinition etaExpansionArity,
-     toDefinition etaReduceTerm,
-     toDefinition reduceTerm,
-     toDefinition termIsClosed,
-     toDefinition termIsValue]
-
-formatError :: TTerm (Error -> String)
-formatError = "e" ~> ShowError.error_ @@ var "e"
-
-alphaConvert :: TTermDefinition (Name -> Name -> Term -> Term)
-alphaConvert = define "alphaConvert" $
-  doc "Alpha convert a variable in a term" $
-  "vold" ~> "vnew" ~> "term" ~>
-    Variables.replaceFreeTermVariable @@ var "vold" @@ (Core.termVariable $ var "vnew") @@ var "term"
-
--- Note: this is eager beta reduction, in that we always descend into subtypes,
---       and always reduce the right-hand side of an application prior to substitution
-betaReduceType :: TTermDefinition (Context -> Graph -> Type -> Prelude.Either Error Type)
-betaReduceType = define "betaReduceType" $
-  doc "Eagerly beta-reduce a type by substituting type arguments into type lambdas" $
-  "cx" ~> "graph" ~> "typ" ~>
-  "reduceApp" <~ ("app" ~>
-    "lhs" <~ Core.applicationTypeFunction (var "app") $
-    "rhs" <~ Core.applicationTypeArgument (var "app") $
-    cases _Type (var "lhs") Nothing [
-      _Type_annotated>>: "at" ~>
-        "a" <<~ var "reduceApp" @@ (Core.applicationType
-          (Core.annotatedTypeBody $ var "at")
-          (var "rhs")) $
-        right $ Core.typeAnnotated $ Core.annotatedType (var "a") (Core.annotatedTypeAnnotation $ var "at"),
-      _Type_forall>>: "ft" ~>
-        betaReduceType @@ var "cx" @@ var "graph" @@ (Variables.replaceFreeTypeVariable
-          @@ (Core.forallTypeParameter $ var "ft")
-          @@ var "rhs"
-          @@ (Core.forallTypeBody $ var "ft")),
-      _Type_variable>>: "name" ~>
-        "t'" <<~ Resolution.requireType @@ var "cx" @@ var "graph" @@ var "name" $
-        betaReduceType @@ var "cx" @@ var "graph" @@ (Core.typeApplication $ Core.applicationType (var "t'") (var "rhs"))]) $
-  "mapExpr" <~ ("recurse" ~> "t" ~>
-    "findApp" <~ ("r" ~> cases _Type (var "r")
-      (Just $ right $ var "r") [
-      _Type_application>>: "a" ~> var "reduceApp" @@ var "a"]) $
-    "r" <<~ var "recurse" @@ var "t" $
-    var "findApp" @@ var "r") $
-  Rewriting.rewriteTypeM @@ var "mapExpr" @@ var "typ"
-
-contractTerm :: TTermDefinition (Term -> Term)
-contractTerm = define "contractTerm" $
-  doc ("Apply the special rules:\n"
-    <> "    ((\\x.e1) e2) == e1, where x does not appear free in e1\n"
-    <> "  and\n"
-    <> "     ((\\x.e1) e2) = e1[x/e2]\n"
-    <> "These are both limited forms of beta reduction which help to \"clean up\" a term without fully evaluating it.") $
-  "term" ~>
-  "rewrite" <~ ("recurse" ~> "t" ~>
-    "rec" <~ var "recurse" @@ var "t" $
-    cases _Term (var "rec")
-      (Just $ var "rec") [
-      _Term_application>>: "app" ~>
-        "lhs" <~ Core.applicationFunction (var "app") $
-        "rhs" <~ Core.applicationArgument (var "app") $
-        cases _Term (Strip.deannotateTerm @@ var "lhs")
-          (Just $ var "rec") [
-          _Term_lambda>>: "l" ~>
-            "v" <~ Core.lambdaParameter (var "l") $
-            "body" <~ Core.lambdaBody (var "l") $
-            Logic.ifElse (Variables.isFreeVariableInTerm @@ var "v" @@ var "body")
-              (var "body")
-              (Variables.replaceFreeTermVariable @@ var "v" @@ var "rhs" @@ var "body")]]) $
-  Rewriting.rewriteTerm @@ var "rewrite" @@ var "term"
-
--- For demo purposes. This should be generalized to enable additional side effects of interest.
-countPrimitiveInvocations :: TTermDefinition Bool
-countPrimitiveInvocations = define "countPrimitiveInvocations" true
-
--- | Eta-expand a term using Graph for type lookups. This is a pure function that does not
--- require type inference, instead relying on the Graph being properly populated with types
--- for all in-scope variables.
---
--- The key differences from etaExpandTypedTerm:
--- 1. Pure because we look up types directly from the context
--- 2. Manually tracks Graph when entering lambdas, lets, and type lambdas
--- 3. Preserves existing type annotations where possible
-etaExpandTerm :: TTermDefinition (Graph -> Term -> Term)
-etaExpandTerm = define "etaExpandTerm" $
-  doc ("Recursively transform terms to eliminate partial application, e.g. 'add 42' becomes '\\x.add 42 x'."
-    <> " Uses the Graph to look up types for arity calculation."
-    <> " Bare primitives and variables are NOT expanded; eliminations and partial applications are."
-    <> " This version properly tracks the Graph through nested scopes.") $
-  "tx0" ~> "term0" ~>
-
-  -- Pre-compute primitive types map once (primitives don't change during recursion)
-  "primTypes" <~ (Graph.graphPrimitiveTypes $ var "tx0") $
-
-  -- termArityWithContext: compute arity of a term using Graph for lookups
-  "termArityWithContext" <~ ("tx" ~> "term" ~>
-    cases _Term (var "term")
-      (Just $ int32 0) [
-      _Term_annotated>>: "at" ~>
-        var "termArityWithContext" @@ var "tx" @@ Core.annotatedTermBody (var "at"),
-      _Term_application>>: "app" ~>
-        Math.sub (var "termArityWithContext" @@ var "tx" @@ Core.applicationFunction (var "app")) (int32 1),
-      _Term_cases>>: constant $ int32 1,
-      _Term_lambda>>: constant $ int32 0,
-      _Term_project>>: constant $ int32 1,
-      _Term_unwrap>>: constant $ int32 1,
-      _Term_let>>: "l" ~>
-        var "termArityWithContext"
-          @@ (Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "tx" @@ var "l")
-          @@ Core.letBody (var "l"),
-      _Term_typeLambda>>: "tl" ~>
-        var "termArityWithContext"
-          @@ (Scoping.extendGraphForTypeLambda @@ var "tx" @@ var "tl")
-          @@ Core.typeLambdaBody (var "tl"),
-      _Term_typeApplication>>: "tat" ~>
-        var "termArityWithContext" @@ var "tx" @@ Core.typeApplicationTermBody (var "tat"),
-      _Term_variable>>: "name" ~>
-        optCases (Maybes.map (Scoping.typeSchemeToFType) $ Maps.lookup (var "name") (Graph.graphBoundTypes $ var "tx"))
-          -- Not found in graphBoundTypes: fall through to graphPrimitives
-          (optCases (Maps.lookup (var "name") (var "primTypes"))
-            (int32 0) Arity.typeSchemeArity)
-          Arity.typeArity]) $
-
-  -- domainTypes: extract domain types from a function type, returning a list of Maybe Type
-  -- For a type A -> B -> C with n=2, returns [Just A, Just B]
-  "domainTypes" <~ ("n" ~> "mt" ~>
-    Logic.ifElse (Equality.lte (var "n") (int32 0))
-      (list ([] :: [TTerm (Maybe Type)]))
-      (optCases (var "mt")
-        -- No type available: return n copies of Nothing
-        (Lists.map (constant nothing) (Math.range (int32 1) (var "n")))
-        ("typ" ~>
-          cases _Type (var "typ")
-            (Just $ Lists.map (constant nothing) (Math.range (int32 1) (var "n"))) [
-            _Type_function>>: "ftyp" ~>
-              Lists.cons (just $ Core.functionTypeDomain $ var "ftyp")
-                (var "domainTypes" @@ Math.sub (var "n") (int32 1) @@ just (Core.functionTypeCodomain $ var "ftyp")),
-            _Type_annotated>>: "at" ~>
-              var "domainTypes" @@ var "n" @@ just (Core.annotatedTypeBody $ var "at"),
-            _Type_application>>: "atyp" ~>
-              var "domainTypes" @@ var "n" @@ just (Core.applicationTypeFunction $ var "atyp"),
-            -- For forall types, we cannot use the body's domain types directly because the
-            -- forall-bound variable would become free in the lambda domain. Return Nothing
-            -- for all remaining positions, letting downstream code infer the types.
-            _Type_forall>>: constant $
-              Lists.map (constant nothing) (Math.range (int32 1) (var "n"))]))) $
-
-  -- peelFunctionDomains: given a Maybe Type and a count, peel n function type domains.
-  -- Returns the remaining type after stripping n arrow domains.
-  -- For Just (A -> B -> C) with n=1, returns Just (B -> C).
-  "peelFunctionDomains" <~ ("mtyp" ~> "n" ~>
-    Logic.ifElse (Equality.lte (var "n") (int32 0))
-      (var "mtyp")
-      (optCases (var "mtyp")
-        nothing
-        ("typ" ~>
-          cases _Type (var "typ")
-            (Just nothing) [
-            _Type_function>>: "ftyp" ~>
-              var "peelFunctionDomains" @@ just (Core.functionTypeCodomain $ var "ftyp") @@ Math.sub (var "n") (int32 1),
-            _Type_annotated>>: "at" ~>
-              var "peelFunctionDomains" @@ just (Core.annotatedTypeBody $ var "at") @@ var "n",
-            _Type_application>>: "atyp" ~>
-              var "peelFunctionDomains" @@ just (Core.applicationTypeFunction $ var "atyp") @@ var "n",
-            -- For forall types, we cannot safely peel through the body because forall-bound
-            -- variables would become free in the result. Return Nothing.
-            _Type_forall>>: constant nothing]))) $
-
-  -- expand: apply args to head and pad with lambdas if needed
-  -- alwaysPad: if true, pad even when args is empty (for eliminations)
-  -- headTyp: Maybe Type of the head term (before args are applied)
-  "expand" <~ ("alwaysPad" ~> "args" ~> "arity" ~> "headTyp" ~> "head" ~>
-    "applied" <~ Lists.foldl
-      ("lhs" ~> "arg" ~> Core.termApplication (Core.application (var "lhs") (var "arg")))
-      (var "head") (var "args") $
-    "numArgs" <~ Lists.length (var "args") $
-    "needed" <~ Math.sub (var "arity") (var "numArgs") $
-    -- Pad if: (needed > 0) AND (alwaysPad OR numArgs > 0)
-    Logic.ifElse (Logic.and (Equality.gt (var "needed") (int32 0))
-                            (Logic.or (var "alwaysPad") (Equality.gt (var "numArgs") (int32 0))))
-      -- Pad with lambdas: first build fully applied term, then wrap with lambdas
-      ("indices" <~ Math.range (int32 1) (var "needed") $
-       -- Compute domain types for the wrapper lambdas from the head's type after applying numArgs
-       "remainingType" <~ var "peelFunctionDomains" @@ var "headTyp" @@ var "numArgs" $
-       "domains" <~ var "domainTypes" @@ var "needed" @@ var "remainingType" $
-       -- Step 1: Build fully applied term: applied v1 v2 ... vn
-       -- Also compute the codomain type (type of fullyApplied) for annotation
-       "codomainType" <~ var "peelFunctionDomains" @@ var "remainingType" @@ var "needed" $
-       "fullyAppliedRaw" <~ Lists.foldl
-         ("body" ~> "i" ~>
-           "vn" <~ Core.name (Strings.cat2 (string "v") (Literals.showInt32 $ var "i")) $
-           Core.termApplication $ Core.application (var "body") (Core.termVariable $ var "vn"))
-         (var "applied") (var "indices") $
-       -- Annotate fullyApplied with its codomain type so downstream coders can determine the return type
-       "fullyApplied" <~ Maybes.maybe (var "fullyAppliedRaw")
-         ("ct" ~> Core.termAnnotated $ Core.annotatedTerm (var "fullyAppliedRaw")
-           (Maps.singleton (Core.name (string "type")) (Phantoms.encoderFor _Type @@ var "ct")))
-         (var "codomainType") $
-       -- Step 2: Wrap with lambdas from inside out by reversing indices: \v1 -> \v2 -> ... -> fullyApplied
-       -- Using foldl with reversed indices+domains gives us: for [2,1], wrap v2 first (innermost), then v1 (outermost)
-       -- Zip indices with domains to pair each lambda with its domain type
-       "indexedDomains" <~ Lists.zip (var "indices") (var "domains") $
-       Lists.foldl
-         ("body" ~> "idPair" ~>
-           "i" <~ Pairs.first (var "idPair") $
-           "dom" <~ Pairs.second (var "idPair") $
-           "vn" <~ Core.name (Strings.cat2 (string "v") (Literals.showInt32 $ var "i")) $
-           Core.termLambda $ Core.lambda (var "vn") (var "dom") (var "body"))
-         (var "fullyApplied") (Lists.reverse (var "indexedDomains")))
-      (var "applied")) $
-
-  -- rewriteWithArgs: tracks accumulated args as we descend into application spines
-  -- This is a recursive let binding that calls itself directly
-  "rewriteWithArgs" <~ ("args" ~> "tx" ~> "term" ~>
-    -- recurse is shorthand for calling rewriteWithArgs with empty args
-    "recurse" <~ ("tx1" ~> "term1" ~> var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx1" @@ var "term1") $
-
-    -- termHeadType: extract the type of a term's "head" (the variable/primitive at its core)
-    -- by following annotations, lets, type applications, and type lambdas.
-    -- Returns Nothing for terms whose head type can't be determined from the context.
-    "termHeadType" <~ ("tx2" ~> "trm2" ~>
-      cases _Term (var "trm2")
-        (Just nothing) [
-        _Term_annotated>>: "at2" ~>
-          var "termHeadType" @@ var "tx2" @@ Core.annotatedTermBody (var "at2"),
-        _Term_lambda>>: constant nothing,
-        _Term_cases>>: constant nothing,
-        _Term_project>>: constant nothing,
-        _Term_unwrap>>: constant nothing,
-        _Term_let>>: "l2" ~>
-          var "termHeadType"
-            @@ (Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "tx2" @@ var "l2")
-            @@ Core.letBody (var "l2"),
-        _Term_typeLambda>>: "tl2" ~>
-          var "termHeadType"
-            @@ (Scoping.extendGraphForTypeLambda @@ var "tx2" @@ var "tl2")
-            @@ Core.typeLambdaBody (var "tl2"),
-        _Term_typeApplication>>: "tat2" ~>
-          -- Get the head type of the body, then substitute forall parameter with the type argument
-          Maybes.bind (var "termHeadType" @@ var "tx2" @@ Core.typeApplicationTermBody (var "tat2"))
-            ("htyp2" ~> cases _Type (var "htyp2") (Just $ just $ var "htyp2") [
-              _Type_forall>>: "ft2" ~>
-                just $ Variables.replaceFreeTypeVariable
-                  @@ Core.forallTypeParameter (var "ft2")
-                  @@ Core.typeApplicationTermType (var "tat2")
-                  @@ Core.forallTypeBody (var "ft2")]),
-        _Term_variable>>: "vn2" ~>
-          Maybes.map (Scoping.typeSchemeToFType) $ Maps.lookup (var "vn2") (Graph.graphBoundTypes $ var "tx2")]) $
-
-    -- afterRecursion: apply expansion logic after subterms have been processed
-    "afterRecursion" <~ ("trm" ~>
-      "arity" <~ var "termArityWithContext" @@ var "tx" @@ var "trm" $
-      "hType" <~ var "termHeadType" @@ var "tx" @@ var "trm" $
-      var "expand" @@ false @@ var "args" @@ var "arity" @@ var "hType" @@ var "trm") $
-
-    -- Helper for processing fields (used in records, unions, but NOT case statement branches)
-    "forField" <~ ("f" ~> Core.fieldWithTerm (var "f") (var "recurse" @@ var "tx" @@ Core.fieldTerm (var "f"))) $
-
-    -- Helper for case statement branches - forces expansion of the branch body
-    -- This is needed because case branches represent partial function values that need full expansion
-    "forCaseBranch" <~ ("f" ~>
-      "branchBody" <~ var "recurse" @@ var "tx" @@ Core.fieldTerm (var "f") $
-      "arty" <~ var "termArityWithContext" @@ var "tx" @@ var "branchBody" $
-      "branchHType" <~ var "termHeadType" @@ var "tx" @@ var "branchBody" $
-      Core.fieldWithTerm (var "f") (var "expand" @@ true @@ list ([] :: [TTerm Term]) @@ var "arty" @@ var "branchHType" @@ var "branchBody")) $
-
-    -- Helper for maps
-    "forMap" <~ ("mp" ~>
-      "forPair" <~ ("pr" ~> pair (var "recurse" @@ var "tx" @@ Pairs.first (var "pr"))
-                                 (var "recurse" @@ var "tx" @@ Pairs.second (var "pr"))) $
-      Maps.fromList $ Lists.map (var "forPair") $ Maps.toList $ var "mp") $
-
-    cases _Term (var "term") Nothing [
-      -- Annotated: recurse into body, preserve annotation
-      _Term_annotated>>: "at" ~> var "afterRecursion" @@ Core.termAnnotated (Core.annotatedTerm
-        (var "recurse" @@ var "tx" @@ Core.annotatedTermBody (var "at"))
-        (Core.annotatedTermAnnotation $ var "at")),
-
-      -- Application: process RHS with empty args, then descend into LHS with RHS added to args
-      _Term_application>>: "app" ~>
-        "rhs" <~ var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx" @@ Core.applicationArgument (var "app") $
-        var "rewriteWithArgs" @@ Lists.cons (var "rhs") (var "args") @@ var "tx" @@ Core.applicationFunction (var "app"),
-
-      -- Either: recurse into left or right
-      _Term_either>>: "e" ~> var "afterRecursion" @@ Core.termEither (Eithers.either_
-        ("l" ~> left $ var "recurse" @@ var "tx" @@ var "l")
-        ("r" ~> right $ var "recurse" @@ var "tx" @@ var "r")
-        (var "e")),
-
-      -- Cases (union elimination): pad with lambdas; only union eliminations are padded
-      _Term_cases>>: "cs" ~>
-        "newCs" <~ Core.caseStatement
-          (Core.caseStatementTypeName $ var "cs")
-          (Maybes.map ("t1" ~> var "recurse" @@ var "tx" @@ var "t1") (Core.caseStatementDefault $ var "cs"))
-          (Lists.map (var "forCaseBranch") (Core.caseStatementCases $ var "cs")) $
-        "elimTerm" <~ Core.termCases (var "newCs") $
-        "elimHeadType" <~ just (Core.typeFunction $ Core.functionType
-          (Core.typeVariable $ Core.caseStatementTypeName $ var "cs")
-          Core.typeUnit) $
-        var "expand" @@ true @@ var "args" @@ (int32 1) @@ var "elimHeadType" @@ var "elimTerm",
-      -- Project: pass through; expansion handled by language coder
-      _Term_project>>: "p" ~>
-        var "expand" @@ false @@ var "args" @@ (int32 1) @@ nothing @@ (Core.termProject $ var "p"),
-      -- Unwrap: pass through; expansion handled by language coder
-      _Term_unwrap>>: "nm" ~>
-        var "expand" @@ false @@ var "args" @@ (int32 1) @@ nothing @@ (Core.termUnwrap $ var "nm"),
-      -- Lambda: extend context for body
-      _Term_lambda>>: "lm" ~>
-        "tx1" <~ Scoping.extendGraphForLambda @@ var "tx" @@ var "lm" $
-        "body" <~ var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx1" @@ Core.lambdaBody (var "lm") $
-        "result" <~ Core.termLambda (Core.lambda (Core.lambdaParameter $ var "lm") (Core.lambdaDomain $ var "lm") (var "body")) $
-        "arty" <~ var "termArityWithContext" @@ var "tx" @@ var "result" $
-        -- Lambda type is not in the context; pass Nothing (lambdas have arity 0 so expand is a no-op anyway)
-        var "expand" @@ false @@ var "args" @@ var "arty" @@ nothing @@ var "result",
-
-      -- Let: extend context for bindings and body
-      _Term_let>>: "lt" ~>
-        "tx1" <~ Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "tx" @@ var "lt" $
-        "mapBinding" <~ ("b" ~> Core.binding
-          (Core.bindingName $ var "b")
-          (var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx1" @@ Core.bindingTerm (var "b"))
-          (Core.bindingTypeScheme $ var "b")) $
-        "result" <~ Core.termLet (Core.let_
-          (Lists.map (var "mapBinding") (Core.letBindings $ var "lt"))
-          (var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx1" @@ Core.letBody (var "lt"))) $
-        var "afterRecursion" @@ var "result",
-
-      -- List: recurse into elements
-      _Term_list>>: "els" ~> var "afterRecursion" @@
-        (Core.termList $ Lists.map ("el" ~> var "recurse" @@ var "tx" @@ var "el") (var "els")),
-
-      -- Literal: no recursion needed
-      _Term_literal>>: "v" ~> Core.termLiteral $ var "v",
-
-      -- Map: recurse into keys and values
-      _Term_map>>: "mp" ~> var "afterRecursion" @@ (Core.termMap $ var "forMap" @@ var "mp"),
-
-      -- Maybe: recurse into value if present
-      _Term_maybe>>: "mb" ~> var "afterRecursion" @@
-        (Core.termMaybe $ Maybes.map ("v" ~> var "recurse" @@ var "tx" @@ var "v") (var "mb")),
-
-      -- Pair: recurse into both elements
-      _Term_pair>>: "pr" ~> var "afterRecursion" @@ (Core.termPair $ pair
-        (var "recurse" @@ var "tx" @@ Pairs.first (var "pr"))
-        (var "recurse" @@ var "tx" @@ Pairs.second (var "pr"))),
-
-      -- Record: recurse into fields
-      _Term_record>>: "rc" ~> var "afterRecursion" @@ (Core.termRecord $ Core.record
-        (Core.recordTypeName $ var "rc")
-        (Lists.map (var "forField") (Core.recordFields $ var "rc"))),
-
-      -- Set: recurse into elements
-      _Term_set>>: "st" ~> var "afterRecursion" @@
-        (Core.termSet $ Sets.fromList $ Lists.map ("el" ~> var "recurse" @@ var "tx" @@ var "el") $ Sets.toList (var "st")),
-
-      -- TypeApplication: recurse into body
-      _Term_typeApplication>>: "tt" ~> var "afterRecursion" @@ (Core.termTypeApplication $ Core.typeApplicationTerm
-        (var "recurse" @@ var "tx" @@ Core.typeApplicationTermBody (var "tt"))
-        (Core.typeApplicationTermType $ var "tt")),
-
-      -- TypeLambda: extend context for body
-      _Term_typeLambda>>: "tl" ~>
-        "tx1" <~ Scoping.extendGraphForTypeLambda @@ var "tx" @@ var "tl" $
-        "result" <~ Core.termTypeLambda (Core.typeLambda
-          (Core.typeLambdaParameter $ var "tl")
-          (var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx1" @@ Core.typeLambdaBody (var "tl"))) $
-        var "afterRecursion" @@ var "result",
-
-      -- Union: recurse into injection field
-      _Term_inject>>: "inj" ~> var "afterRecursion" @@ (Core.termInject $ Core.injection
-        (Core.injectionTypeName $ var "inj")
-        (var "forField" @@ Core.injectionField (var "inj"))),
-
-      -- Unit: no recursion needed
-      _Term_unit>>: constant Core.termUnit,
-
-      -- Variable: don't expand if bare; look up type for lambda domain annotations
-      _Term_variable>>: "vn" ~>
-        "arty" <~ var "termArityWithContext" @@ var "tx" @@ var "term" $
-        "varType" <~ Maybes.map (Scoping.typeSchemeToFType) (Maps.lookup (var "vn") (Graph.graphBoundTypes $ var "tx")) $
-        var "expand" @@ false @@ var "args" @@ var "arty" @@ var "varType" @@ var "term",
-
-      -- Wrap: recurse into body
-      _Term_wrap>>: "wt" ~> var "afterRecursion" @@ (Core.termWrap $ Core.wrappedTerm
-        (Core.wrappedTermTypeName $ var "wt")
-        (var "recurse" @@ var "tx" @@ Core.wrappedTermBody (var "wt")))]) $
-
-  contractTerm @@ (var "rewriteWithArgs" @@ list ([] :: [TTerm Term]) @@ var "tx0" @@ var "term0")
-
--- TODO: add lambda domains as part of the rewriting process, so inference does not need to be performed again.
-etaExpandTypedTerm :: TTermDefinition (Context -> Graph -> Term -> Prelude.Either Error Term)
-etaExpandTypedTerm = define "etaExpandTypedTerm" $
-  doc ("Recursively transform arbitrary terms like 'add 42' into terms like '\\x.add 42 x',"
-    <> " eliminating partial application. Variable references are not expanded."
-    <> " This is useful for targets like Python with weaker support for currying than Hydra or Haskell."
-    <> " Note: this is a \"trusty\" function which assumes the graph is well-formed, i.e. no dangling references."
-    <> " It also assumes that type inference has already been performed."
-    <> " After eta expansion, type inference needs to be performed again, as new, untyped lambdas may have been added."
-    ) $
-  "cx" ~> "tx0" ~> "term0" ~>
-  "rewrite" <~ ("topLevel" ~> "forced" ~> "typeArgs" ~> "recurse" ~> "tx" ~> "term" ~>
-    "rewriteSpine" <~ ("term" ~> cases _Term (var "term")
-      (Just $ var "rewrite" @@ false @@ false @@ list ([] :: [TTerm Type]) @@ var "recurse" @@ var "tx" @@ var "term") [
-      _Term_annotated>>: "at" ~>
-        "body" <<~ var "rewriteSpine" @@ Core.annotatedTermBody (var "at") $
-        "ann" <~ Core.annotatedTermAnnotation (var "at") $
-        right (Core.termAnnotated $ Core.annotatedTerm (var "body") (var "ann")),
-      _Term_application>>: "a" ~>
-        "l" <~ Logic.ifElse false (list [Core.typeLiteral Core.literalTypeString]) (list ([] :: [TTerm Type])) $ -- TODO: hack for type checking
-        "lhs" <<~ var "rewriteSpine" @@ Core.applicationFunction (var "a") $
-        "rhs" <<~ var "rewrite" @@ true @@ false @@ var "l" @@ var "recurse" @@ var "tx" @@ Core.applicationArgument (var "a") $
-        right (Core.termApplication $ Core.application (var "lhs") (var "rhs")),
-      _Term_typeApplication>>: "tat" ~>
-        "body" <<~ var "rewriteSpine" @@ Core.typeApplicationTermBody (var "tat") $
-        "typ" <~ Core.typeApplicationTermType (var "tat") $
-        right (Core.termTypeApplication $ Core.typeApplicationTerm (var "body") (var "typ"))]) $
-
-    -- Arity as provided by type checking, but with exceptions which give us the desired behavior for
-    -- targets including Python. Remove the special cases and see which regression tests fail.
-    -- TODO: this function is moving toward "syntactic" arity which does not require type checking; only
-    --       type lookups.
-    "arityOf" <~ ("tx" ~> "term" ~>
-      "dflt" <~ (Eithers.map ("_tc" ~> Arity.typeArity @@ Pairs.first (var "_tc"))
-          (Checking.typeOf @@ var "cx" @@ var "tx" @@ list ([] :: [TTerm Type]) @@ var "term")) $
-      cases _Term (var "term")
-        (Just $ var "dflt") [
-        _Term_annotated>>: "at" ~> var "arityOf" @@ var "tx" @@ Core.annotatedTermBody (var "at"),
-        -- Note: No _Term_application case - the dflt fallback using typeOf is correct.
-        -- We can't use arityOf(f) - 1 because that doesn't account for higher-order functions
-        -- like identity where (id x) has the same arity as x.
-        _Term_cases>>: constant $ right $ int32 1,
-        _Term_project>>: constant $ right $ int32 1,
-        _Term_unwrap>>: constant $ right $ int32 1,
-        _Term_lambda>>: "l" ~>
-          "txl" <~ Scoping.extendGraphForLambda @@ var "tx" @@ var "l" $
-          var "arityOf" @@ var "txl" @@ Core.lambdaBody (var "l"),
-        _Term_let>>: "l" ~>
-          "txl" <~ Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "tx" @@ var "l" $
-          var "arityOf" @@ var "txl" @@ Core.letBody (var "l"),
-        _Term_typeApplication>>: "tat" ~> var "arityOf" @@ var "tx" @@ Core.typeApplicationTermBody (var "tat"),
-        _Term_typeLambda>>: "tl" ~>
-          "txt" <~ Scoping.extendGraphForTypeLambda @@ var "tx" @@ var "tl" $
-          var "arityOf" @@ var "txt" @@ Core.typeLambdaBody (var "tl"),
-        _Term_variable>>: "name" ~> optCases (Maybes.map (Scoping.typeSchemeToFType) $ Maps.lookup (var "name") (Graph.graphBoundTypes $ var "tx"))
-          -- Variable not in graphBoundTypes; use typeOf with CURRENT context and variable term as fallback
-          -- This can happen with local let bindings that aren't yet in scope during eta expansion
-          (Eithers.map ("_tc" ~> Arity.typeArity @@ Pairs.first (var "_tc"))
-            (Checking.typeOf @@ var "cx" @@ var "tx" @@ list ([] :: [TTerm Type]) @@ Core.termVariable (var "name")))
-          ("t" ~> right $ Arity.typeArity @@ var "t")]) $
-
-
-    "extraVariables" <~ ("n" ~> Lists.map ("i" ~> Core.name $ Strings.cat2 (string "v") (Literals.showInt32 $ var "i")) $
-      Math.range (int32 1) (var "n")) $
-    "pad" <~ ("vars" ~> "body" ~>
-      Maybes.maybe
-        (var "body")
-        ("uc" ~>
-          "v0" <~ Pairs.first (var "uc") $
-          "vrest" <~ Pairs.second (var "uc") $
-          Core.termLambda $ Core.lambda (var "v0") nothing $ var "pad"
-            @@ var "vrest"
-            @@ (Core.termApplication $ Core.application (var "body") $ Core.termVariable $ var "v0"))
-        (Lists.uncons $ var "vars")) $
-    "padn" <~ ("n" ~> "body" ~> var "pad" @@ (var "extraVariables" @@ var "n") @@ var "body") $
-
-    "unwind" <~ ("term" ~> Lists.foldl
-      ("e" ~> "t" ~> Core.termTypeApplication (Core.typeApplicationTerm (var "e") (var "t")))
-      (var "term") (var "typeArgs")) $
-
-    "forceExpansion" <~ ("t" ~>
-      "typCx" <<~ Checking.typeOf @@ var "cx" @@ var "tx" @@ list ([] :: [TTerm Type]) @@ var "t" $
-      "arity" <~ Arity.typeArity @@ Pairs.first (var "typCx") $
-      right $ var "padn" @@ var "arity" @@ (var "unwind" @@ var "t")) $
-
-    "recurseOrForce" <~ ("term" ~> Logic.ifElse (var "forced")
-      (var "forceExpansion" @@ var "term")
-      (var "recurse" @@ var "tx" @@ (var "unwind" @@ var "term"))) $
-
-    "forCase" <~ ("f" ~>
-      "r" <<~ var "rewrite" @@ false @@ true @@ list ([] :: [TTerm Type]) @@ var "recurse" @@ var "tx" @@ Core.fieldTerm (var "f") $
-      right $ Core.fieldWithTerm (var "f") (var "r")) $
-
-    -- Forcing case statement branches is intended for Python, where we cannot accept a branch which is simply
-    -- a variable or a primitive reference; we need to expand these to lambdas.
-    -- TODO: make this behavior configurable
-    "forCaseStatement" <~ ("cs" ~>
-      "tname" <~ Core.caseStatementTypeName (var "cs") $
-      "dflt" <~ Core.caseStatementDefault (var "cs") $
-      "csCases" <~ Core.caseStatementCases (var "cs") $
-      "rdflt" <<~ Eithers.mapMaybe (var "rewrite" @@ false @@ false @@ list ([] :: [TTerm Type]) @@ var "recurse" @@ var "tx") (var "dflt") $
-      "rcases" <<~ Eithers.mapList (var "forCase") (var "csCases") $
-      right $ Core.termCases $
-        Core.caseStatement (var "tname") (var "rdflt") (var "rcases")) $
-
-    "forCases" <~ ("cs" ~>
-      "base" <<~ Eithers.map (var "unwind") (var "forCaseStatement" @@ var "cs") $
-      right $ Logic.ifElse (Logic.or (var "topLevel") (var "forced"))
-        (var "padn" @@ int32 1 @@ var "base")
-        (var "base")) $
-
-    "forNullaryElim" <~ ("elimTerm" ~>
-      "base" <~ var "unwind" @@ var "elimTerm" $
-      Logic.ifElse (Logic.or (var "topLevel") (var "forced"))
-        (var "padn" @@ int32 1 @@ var "base")
-        (var "base")) $
-
-    cases _Term (var "term")
-      (Just $ var "recurseOrForce" @@ var "term") [
-      _Term_application>>: "a" ~>
-        "lhs" <~ Core.applicationFunction (var "a") $
-        "rhs" <~ Core.applicationArgument (var "a") $
-        "rhs2" <<~ var "rewrite" @@ true @@ false @@ list ([] :: [TTerm Type]) @@ var "recurse" @@ var "tx" @@ var "rhs" $
-        "lhsarity" <<~ var "arityOf" @@ var "tx" @@ var "lhs" $
-        "lhs2" <<~ var "rewriteSpine" @@ var "lhs" $
-        "a2" <~ Core.termApplication (Core.application (var "lhs2") (var "rhs2")) $
-        right $ Logic.ifElse (Equality.gt (var "lhsarity") (int32 1))
-          (var "padn" @@ (Math.sub (var "lhsarity") (int32 1)) @@ var "a2")
-          (var "a2"),
-      _Term_cases>>: "cs" ~> var "forCases" @@ var "cs",
-      _Term_project>>: "p" ~> right $ var "forNullaryElim" @@ Core.termProject (var "p"),
-      _Term_unwrap>>: "n" ~> right $ var "forNullaryElim" @@ Core.termUnwrap (var "n"),
-      _Term_lambda>>: "l" ~>
-        "txl" <~ Scoping.extendGraphForLambda @@ var "tx" @@ var "l" $
-         Eithers.map (var "unwind") (var "recurse" @@ var "txl" @@ var "term"),
-      _Term_let>>: "l" ~>
-        "txlt" <~ Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "tx" @@ var "l" $
-        var "recurse" @@ var "txlt" @@ var "term",
-      _Term_typeApplication>>: "tat" ~> var "rewrite" @@ var "topLevel" @@ var "forced"
-        @@ (Lists.cons (Core.typeApplicationTermType $ var "tat") (var "typeArgs"))
-        @@ var "recurse" @@ var "tx"
-        @@ Core.typeApplicationTermBody (var "tat"),
-      _Term_typeLambda>>: "tl" ~>
-        "txt" <~ Scoping.extendGraphForTypeLambda @@ var "tx" @@ var "tl" $
-        var "recurse" @@ var "txt" @@ var "term"]) $
-  Rewriting.rewriteTermWithContextM @@ (var "rewrite" @@ true @@ false @@ list ([] :: [TTerm Type])) @@ var "tx0" @@ var "term0"
-
--- TODO: this function probably needs to be replaced with a function which takes not only a Graph, but an extended Graph.
---       etaExpansionArity won't give the correct answer unless it has access to the full lexical environment
---       of each subterm in which it is applied, including lambda-bound variables as well as nested let-bound variables.
---       The new function need not be monadic, because we don't need to call typeOf; it just needs accurate type lookups.
-etaExpansionArity :: TTermDefinition (Graph -> Term -> Int)
-etaExpansionArity = define "etaExpansionArity" $
-  doc ("Calculate the arity for eta expansion"
-    <> " Note: this is a \"trusty\" function which assumes the graph is well-formed, i.e. no dangling references.") $
-  "graph" ~> "term" ~> cases _Term (var "term")
-    (Just $ int32 0) [
-    _Term_annotated>>: "at" ~>
-      etaExpansionArity @@ var "graph" @@ Core.annotatedTermBody (var "at"),
-    _Term_application>>: "app" ~> Math.sub
-      (etaExpansionArity @@ var "graph" @@ Core.applicationFunction (var "app"))
-      (int32 1),
-    _Term_cases>>: constant $ int32 1,
-    _Term_lambda>>: constant $ int32 0,
-    _Term_project>>: constant $ int32 1,
-    _Term_unwrap>>: constant $ int32 1,
-    _Term_typeLambda>>: "ta" ~> etaExpansionArity @@ var "graph" @@ Core.typeLambdaBody (var "ta"),
-    _Term_typeApplication>>: "tt" ~> etaExpansionArity @@ var "graph" @@ Core.typeApplicationTermBody (var "tt"),
-    _Term_variable>>: "name" ~>
-      -- Note: we assume that the graph is fully typed.
-      Maybes.maybe (int32 0)
-        ("ts" ~> Arity.typeArity @@ (Core.typeSchemeBody $ var "ts"))
-        (Maybes.bind
-          (Lexical.lookupBinding @@ var "graph" @@ var "name")
-          ("b" ~> Core.bindingTypeScheme $ var "b"))]
-
-etaReduceTerm :: TTermDefinition (Term -> Term)
-etaReduceTerm = define "etaReduceTerm" $
-  doc "Eta-reduce a term by removing redundant lambda abstractions" $
-  "term" ~>
-  "noChange" <~ var "term" $
-  "reduceLambda" <~ ("l" ~>
-    "v" <~ Core.lambdaParameter (var "l") $
-    "d" <~ Core.lambdaDomain (var "l") $
-    "body" <~ Core.lambdaBody (var "l") $
-    cases _Term (etaReduceTerm @@ var "body")
-      (Just $ var "noChange") [
-      _Term_annotated>>: "at" ~>
-        var "reduceLambda" @@ (Core.lambda (var "v") (var "d") (Core.annotatedTermBody $ var "at")),
-      _Term_application>>: "app" ~>
-        "lhs" <~ Core.applicationFunction (var "app") $
-        "rhs" <~ Core.applicationArgument (var "app") $
-        cases _Term (etaReduceTerm @@ var "rhs")
-          (Just $ var "noChange") [
-          _Term_annotated>>: "at" ~>
-            var "reduceLambda" @@ (Core.lambda (var "v") (var "d") $
-              Core.termApplication $ Core.application (var "lhs") (Core.annotatedTermBody $ var "at")),
-          _Term_variable>>: "v1" ~>
-            Logic.ifElse
-              (Logic.and
-                (Equality.equal (Core.unName $ var "v") (Core.unName $ var "v1"))
-                (Logic.not $ Variables.isFreeVariableInTerm @@ var "v" @@ var "lhs"))
-              (etaReduceTerm @@ var "lhs")
-              (var "noChange")]]) $
-  cases _Term (var "term")
-    (Just $ var "noChange") [
-    _Term_annotated>>: "at" ~>
-      Core.termAnnotated $ Core.annotatedTerm
-        (etaReduceTerm @@ (Core.annotatedTermBody $ var "at"))
-        (Core.annotatedTermAnnotation $ var "at"),
-    _Term_lambda>>: "l" ~> var "reduceLambda" @@ var "l"]
-
-reduceTerm :: TTermDefinition (Context -> Graph -> Bool -> Term -> Prelude.Either Error Term)
-reduceTerm = define "reduceTerm" $
-  doc "A term evaluation function which is alternatively lazy or eager" $
-  "cx" ~> "graph" ~> "eager" ~> "term" ~>
-  "reduce" <~ ("eager" ~> reduceTerm @@ var "cx" @@ var "graph" @@ var "eager") $
-  "doRecurse" <~ ("eager" ~> "term" ~>
-    "isNonLambdaTerm" <~ cases _Term (var "term")
-      (Just true) [
-      _Term_lambda>>: constant false,
-      -- Don't recurse into let; handle in applyIfNullary
-      _Term_let>>: constant false] $
-    Logic.and (var "eager") (var "isNonLambdaTerm")) $
-  "reduceArg" <~ ("eager" ~> "arg" ~>
-    Logic.ifElse (var "eager")
-      (right $ var "arg")
-      (var "reduce" @@ false @@ var "arg")) $
-  "applyToArguments" <~ ("fun" ~> "args" ~>
-    Maybes.maybe
-      (var "fun")
-      ("uc" ~>
-        var "applyToArguments" @@
-          (Core.termApplication $ Core.application (var "fun") (Pairs.first $ var "uc")) @@
-          (Pairs.second $ var "uc"))
-      (Lists.uncons $ var "args")) $
-  "mapErrorToString" <~ ("e" ~>
-    Error.errorOther $ Error.otherError (ShowError.error_ @@ var "e")) $
-  "applyProjection" <~ ("proj" ~> "reducedArg" ~>
-    "fields" <<~ ExtractCore.record @@ (Core.projectionTypeName $ var "proj") @@ var "graph" @@ (Strip.deannotateTerm @@ var "reducedArg") $
-    "matching" <~ (Lists.find
-      ("f" ~> Equality.equal (Core.fieldName $ var "f") (Core.projectionField $ var "proj"))
-      (var "fields")) $
-    Maybes.maybe
-      (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (Core.projectionField $ var "proj")) (var "cx"))
-      ("mf" ~> right $ Core.fieldTerm $ var "mf")
-      (var "matching")) $
-  "applyCases" <~ ("cs" ~> "reducedArg" ~>
-    "field" <<~ ExtractCore.injection @@ (Core.caseStatementTypeName $ var "cs") @@ var "graph" @@ var "reducedArg" $
-    "matching" <~ (Lists.find
-      ("f" ~> Equality.equal (Core.fieldName $ var "f") (Core.fieldName $ var "field"))
-      (Core.caseStatementCases $ var "cs")) $
-    Maybes.maybe
-      (Maybes.maybe
-        (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (Core.fieldName $ var "field")) (var "cx"))
-        (unaryFunction right)
-        (Core.caseStatementDefault $ var "cs"))
-      ("mf" ~> right $ Core.termApplication $ Core.application
-        (Core.fieldTerm $ var "mf")
-        (Core.fieldTerm $ var "field"))
-      (var "matching")) $
-  "applyIfNullary" <~ ("eager" ~> "original" ~> "args" ~>
-    "stripped" <~ Strip.deannotateTerm @@ var "original" $
-    "forProjection" <~ ("proj" ~> "args" ~>
-      Maybes.maybe
-        (right $ var "original")
-        ("uc" ~>
-          "arg" <~ Pairs.first (var "uc") $
-          "remainingArgs" <~ Pairs.second (var "uc") $
-          "reducedArg" <<~ var "reduceArg" @@ var "eager" @@ (Strip.deannotateTerm @@ var "arg") $
-          "reducedResult" <<~ Eithers.bind (var "applyProjection" @@ var "proj" @@ var "reducedArg") (var "reduce" @@ var "eager") $
-          var "applyIfNullary" @@ var "eager" @@ var "reducedResult" @@ var "remainingArgs")
-        (Lists.uncons $ var "args")) $
-    "forCases" <~ ("cs" ~> "args" ~>
-      Maybes.maybe
-        (right $ var "original")
-        ("uc" ~>
-          "arg" <~ Pairs.first (var "uc") $
-          "remainingArgs" <~ Pairs.second (var "uc") $
-          "reducedArg" <<~ var "reduceArg" @@ var "eager" @@ (Strip.deannotateTerm @@ var "arg") $
-          "reducedResult" <<~ Eithers.bind (var "applyCases" @@ var "cs" @@ var "reducedArg") (var "reduce" @@ var "eager") $
-          var "applyIfNullary" @@ var "eager" @@ var "reducedResult" @@ var "remainingArgs")
-        (Lists.uncons $ var "args")) $
-    "forUnwrap" <~ ("name" ~> "args" ~>
-      Maybes.maybe
-        (right $ var "original")
-        ("uc" ~>
-          "arg" <~ Pairs.first (var "uc") $
-          "remainingArgs" <~ Pairs.second (var "uc") $
-          "reducedArg" <<~ var "reduceArg" @@ var "eager" @@ (Strip.deannotateTerm @@ var "arg") $
-          "reducedResult" <<~ Eithers.bind (ExtractCore.wrap @@ var "name" @@ var "graph" @@ var "reducedArg") (var "reduce" @@ var "eager") $
-          var "applyIfNullary" @@ var "eager" @@ var "reducedResult" @@ var "remainingArgs")
-        (Lists.uncons $ var "args")) $
-    "forLambda" <~ ("l" ~> "args" ~>
-      "param" <~ Core.lambdaParameter (var "l") $
-      "body" <~ Core.lambdaBody (var "l") $
-      Maybes.maybe
-        (right $ var "original")
-        ("uc" ~>
-          "arg" <~ Pairs.first (var "uc") $
-          "remainingArgs" <~ Pairs.second (var "uc") $
-          "reducedArg" <<~ var "reduce" @@ var "eager" @@ (Strip.deannotateTerm @@ var "arg") $
-          "reducedResult" <<~ var "reduce" @@ var "eager"
-            @@ (Variables.replaceFreeTermVariable @@ var "param" @@ var "reducedArg" @@ var "body") $
-          var "applyIfNullary" @@ var "eager" @@ var "reducedResult" @@ var "remainingArgs")
-        (Lists.uncons $ var "args")) $
-    "forPrimitive" <~ ("prim" ~> "arity" ~> "args" ~>
-      "argList" <~ Lists.take (var "arity") (var "args") $
-      "remainingArgs" <~ Lists.drop (var "arity") (var "args") $
-      "reducedArgs" <<~ Eithers.mapList (var "reduceArg" @@ var "eager") (var "argList") $
-      -- Strip annotations from reduced args so primitives can extract values properly
-      "strippedArgs" <~ Lists.map Strip.deannotateTerm (var "reducedArgs") $
-      "primResult" <<~ Eithers.bimap (var "mapErrorToString") ("x" ~> var "x") (Graph.primitiveImplementation (var "prim") @@ var "cx" @@ var "graph" @@ var "strippedArgs") $
-      "reducedResult" <<~ var "reduce" @@ var "eager" @@ var "primResult" $
-      var "applyIfNullary" @@ var "eager" @@ var "reducedResult" @@ var "remainingArgs") $
-    cases _Term (var "stripped")
-      (Just $ right $ var "applyToArguments" @@ var "original" @@ var "args") [
-      _Term_application>>: "app" ~> var "applyIfNullary" @@ var "eager" @@
-        (Core.applicationFunction $ var "app") @@
-        (Lists.cons (Core.applicationArgument $ var "app") (var "args")),
-      _Term_cases>>: "cs" ~>
-        Logic.ifElse (Lists.null $ var "args")
-          (right $ var "original")
-          (var "forCases" @@ var "cs" @@ var "args"),
-      _Term_project>>: "p" ~>
-        Logic.ifElse (Lists.null $ var "args")
-          (right $ var "original")
-          (var "forProjection" @@ var "p" @@ var "args"),
-      _Term_unwrap>>: "n" ~>
-        Logic.ifElse (Lists.null $ var "args")
-          (right $ var "original")
-          (var "forUnwrap" @@ var "n" @@ var "args"),
-      _Term_lambda>>: "l" ~>
-        Logic.ifElse (Lists.null $ var "args")
-          (right $ var "original")
-          (var "forLambda" @@ var "l" @@ var "args"),
-      _Term_variable>>: "v" ~>
-        -- Look up the variable in the graph; if found, reduce its definition
-        "mBinding" <~ Lexical.lookupBinding @@ var "graph" @@ var "v" $
-        Maybes.maybe
-          -- Not found in graphBoundTerms: fall through to graphPrimitives
-          ("mPrim" <~ Lexical.lookupPrimitive @@ var "graph" @@ var "v" $
-           Maybes.maybe
-             -- Not found in either: lambda-bound variable, return with args applied
-             (right $ var "applyToArguments" @@ var "original" @@ var "args")
-             -- Found primitive: apply with arity-based argument collection
-             ("prim" ~>
-               "arity" <~ Arity.primitiveArity @@ var "prim" $
-               Logic.ifElse (Equality.gt (var "arity") (Lists.length $ var "args"))
-                 (right $ var "applyToArguments" @@ var "original" @@ var "args")
-                 (var "forPrimitive" @@ var "prim" @@ var "arity" @@ var "args"))
-             (var "mPrim"))
-          -- Found: reduce the element's term with the accumulated args
-          ("binding" ~> var "applyIfNullary" @@ var "eager" @@ (Core.bindingTerm $ var "binding") @@ var "args")
-          (var "mBinding"),
-      _Term_let>>: "lt" ~>
-        -- For recursive let bindings, wrap self-references with `let f = <value> in f`
-        -- This allows recursive functions to be properly evaluated
-        "bindings" <~ Core.letBindings (var "lt") $
-        "body" <~ Core.letBody (var "lt") $
-        -- Create a let expression that wraps a binding: let b = <value> in b
-        "letExpr" <~ ("b" ~>
-          Core.termLet $ Core.let_
-            (list [var "b"])
-            (Core.termVariable (Core.bindingName $ var "b"))) $
-        -- Expand a binding by replacing self-references with the let wrapper
-        "expandBinding" <~ ("b" ~>
-          Core.binding
-            (Core.bindingName $ var "b")
-            (Variables.replaceFreeTermVariable
-              @@ (Core.bindingName $ var "b")
-              @@ (var "letExpr" @@ var "b")
-              @@ (Core.bindingTerm $ var "b"))
-            (Core.bindingTypeScheme $ var "b")) $
-        "expandedBindings" <~ Lists.map (var "expandBinding") (var "bindings") $
-        -- Substitute each binding into the term (foldl takes acc -> elem -> acc)
-        "substituteBinding" <~ ("term" ~> "b" ~>
-          Variables.replaceFreeTermVariable
-            @@ (Core.bindingName $ var "b")
-            @@ (Core.bindingTerm $ var "b")
-            @@ var "term") $
-        "substituteAll" <~ ("bs" ~> "term" ~>
-          Lists.foldl (var "substituteBinding") (var "term") (var "bs")) $
-        "expandedBody" <~ var "substituteAll" @@ var "expandedBindings" @@ var "body" $
-        "reducedBody" <<~ var "reduce" @@ var "eager" @@ var "expandedBody" $
-        var "applyIfNullary" @@ var "eager" @@ var "reducedBody" @@ var "args"]) $
-  "mapping" <~ ("recurse" ~> "mid" ~>
-    "inner" <<~ Logic.ifElse (var "doRecurse" @@ var "eager" @@ var "mid")
-      (var "recurse" @@ var "mid")
-      (right $ var "mid") $
-    var "applyIfNullary" @@ var "eager" @@ var "inner" @@ (list ([] :: [TTerm Term]))) $
-  Rewriting.rewriteTermM @@ var "mapping" @@ var "term"
-
-termIsClosed :: TTermDefinition (Term -> Bool)
-termIsClosed = define "termIsClosed" $
-  doc "Whether a term is closed, i.e. represents a complete program" $
-  "term" ~> Sets.null $ Variables.freeVariablesInTerm @@ var "term"
-
-termIsValue :: TTermDefinition (Term -> Bool)
-termIsValue = define "termIsValue" $
-  doc "Whether a term has been fully reduced to a value" $
-  "term" ~>
-  "forList" <~ ("els" ~> Lists.foldl ("b" ~> "t" ~> Logic.and (var "b") (termIsValue @@ var "t")) true (var "els")) $
-  "checkField" <~ ("f" ~> termIsValue @@ Core.fieldTerm (var "f")) $
-  "checkFields" <~ ("fields" ~> Lists.foldl ("b" ~> "f" ~> Logic.and (var "b") (var "checkField" @@ var "f")) true (var "fields")) $
-  cases _Term (Strip.deannotateTerm @@ var "term")
-    (Just false) [
-    _Term_application>>: constant false,
-    _Term_cases>>: "cs" ~>
-      Logic.and (var "checkFields" @@ Core.caseStatementCases (var "cs"))
-        (Maybes.maybe true termIsValue (Core.caseStatementDefault $ var "cs")),
-    _Term_either>>: "e" ~>
-      Eithers.either_
-        ("l" ~> termIsValue @@ var "l")
-        ("r" ~> termIsValue @@ var "r")
-        (var "e"),
-    _Term_lambda>>: "l" ~> termIsValue @@ Core.lambdaBody (var "l"),
-    _Term_literal>>: constant true,
-    _Term_project>>: constant true,
-    _Term_unwrap>>: constant true,
-    _Term_list>>: "els" ~> var "forList" @@ var "els",
-    _Term_map>>: "m" ~>
-      Lists.foldl ("b" ~> "kv" ~>
-        Logic.and (var "b") $ Logic.and
-          (termIsValue @@ Pairs.first (var "kv"))
-          (termIsValue @@ Pairs.second (var "kv")))
-        true $ Maps.toList (var "m"),
-    _Term_maybe>>: "m" ~>
-      Maybes.maybe true termIsValue (var "m"),
-    _Term_record>>: "r" ~> var "checkFields" @@ Core.recordFields (var "r"),
-    _Term_set>>: "s" ~> var "forList" @@ Sets.toList (var "s"),
-    _Term_inject>>: "i" ~> var "checkField" @@ Core.injectionField (var "i"),
-    _Term_unit>>: constant true,
-    _Term_variable>>: constant false]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Reflect.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Reflect.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Reflect.hs
+++ /dev/null
@@ -1,337 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Reflect where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  eliminationVariants, functionVariants,
-  floatTypePrecision, floatTypes, floatValueType,
-  integerTypeIsSigned, integerTypePrecision, integerTypes,
-  integerValueType, literalType, literalTypeVariant, literalTypes, literalVariant, literalVariants,
-  termVariant, termVariants, typeVariant, typeVariants)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.reflect"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Reflection functions for working with term, type, and literal type variants, as well as numeric precision.")}
-  where
-    definitions = [
-      toDefinition eliminationVariants,
-      toDefinition floatTypePrecision,
-      toDefinition floatTypes,
-      toDefinition floatValueType,
-      toDefinition functionVariants,
-      toDefinition integerTypeIsSigned,
-      toDefinition integerTypePrecision,
-      toDefinition integerTypes,
-      toDefinition integerValueType,
-      toDefinition literalType,
-      toDefinition literalTypeVariant,
-      toDefinition literalTypes,
-      toDefinition literalVariant,
-      toDefinition literalVariants,
-      toDefinition termVariant,
-      toDefinition termVariants,
-      toDefinition typeVariant,
-      toDefinition typeVariants]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Note: kept for backward compatibility with the Hydra.Coders LanguageConstraints schema,
--- even though hydra.core.Function and hydra.core.Elimination no longer exist as of #332.
-eliminationVariants :: TTermDefinition [EliminationVariant]
-eliminationVariants = define "eliminationVariants" $
-  doc "All elimination variants (constructors), in a canonical order (legacy)" $
-  list $ injectUnit _EliminationVariant <$> [
-    _EliminationVariant_record,
-    _EliminationVariant_union,
-    _EliminationVariant_wrap]
-
--- Note: kept for backward compatibility with the Hydra.Coders LanguageConstraints schema.
-functionVariants :: TTermDefinition [FunctionVariant]
-functionVariants = define "functionVariants" $
-  doc "All function variants (constructors), in a canonical order (legacy)" $
-  list $ injectUnit _FunctionVariant <$> [
-    _FunctionVariant_elimination,
-    _FunctionVariant_lambda]
-
-floatTypePrecision :: TTermDefinition (FloatType -> Precision)
-floatTypePrecision = define "floatTypePrecision" $
-  doc "Find the precision of a given floating-point type" $
-  match _FloatType Nothing [
-    _FloatType_bigfloat>>: constant Util.precisionArbitrary,
-    _FloatType_float32>>: constant $ Util.precisionBits $ int32 32,
-    _FloatType_float64>>: constant $ Util.precisionBits $ int32 64]
-
-floatTypes :: TTermDefinition [FloatType]
-floatTypes = define "floatTypes" $
-  doc "All floating-point types in a canonical order" $
-  list $ injectUnit _FloatType <$> [
-    _FloatType_bigfloat,
-    _FloatType_float32,
-    _FloatType_float64]
-
-floatValueType :: TTermDefinition (FloatValue -> FloatType)
-floatValueType = define "floatValueType" $
-  doc "Find the float type for a given floating-point value" $
-  match _FloatValue Nothing [
-    _FloatValue_bigfloat>>: constant Core.floatTypeBigfloat,
-    _FloatValue_float32>>: constant Core.floatTypeFloat32,
-    _FloatValue_float64>>: constant Core.floatTypeFloat64]
-
-integerTypeIsSigned :: TTermDefinition (IntegerType -> Bool)
-integerTypeIsSigned = define "integerTypeIsSigned" $
-  doc "Find whether a given integer type is signed (true) or unsigned (false)" $
-  match _IntegerType Nothing [
-    _IntegerType_bigint>>: constant true,
-    _IntegerType_int8>>:   constant true,
-    _IntegerType_int16>>:  constant true,
-    _IntegerType_int32>>:  constant true,
-    _IntegerType_int64>>:  constant true,
-    _IntegerType_uint8>>:  constant false,
-    _IntegerType_uint16>>: constant false,
-    _IntegerType_uint32>>: constant false,
-    _IntegerType_uint64>>: constant false]
-
-integerTypePrecision :: TTermDefinition (IntegerType -> Precision)
-integerTypePrecision = define "integerTypePrecision" $
-  doc "Find the precision of a given integer type" $
-  match _IntegerType Nothing [
-    _IntegerType_bigint>>: constant Util.precisionArbitrary,
-    _IntegerType_int8>>: constant $ Util.precisionBits $ int32 8,
-    _IntegerType_int16>>: constant $ Util.precisionBits $ int32 16,
-    _IntegerType_int32>>: constant $ Util.precisionBits $ int32 32,
-    _IntegerType_int64>>: constant $ Util.precisionBits $ int32 64,
-    _IntegerType_uint8>>: constant $ Util.precisionBits $ int32 8,
-    _IntegerType_uint16>>: constant $ Util.precisionBits $ int32 16,
-    _IntegerType_uint32>>: constant $ Util.precisionBits $ int32 32,
-    _IntegerType_uint64>>: constant $ Util.precisionBits $ int32 64]
-
-integerTypes :: TTermDefinition [IntegerType]
-integerTypes = define "integerTypes" $
-  doc "All integer types, in a canonical order" $
-  list $ injectUnit _IntegerType <$> [
-    _IntegerType_bigint,
-    _IntegerType_int8,
-    _IntegerType_int16,
-    _IntegerType_int32,
-    _IntegerType_int64,
-    _IntegerType_uint8,
-    _IntegerType_uint16,
-    _IntegerType_uint32,
-    _IntegerType_uint64]
-
-integerValueType :: TTermDefinition (IntegerValue -> IntegerType)
-integerValueType = define "integerValueType" $
-  doc "Find the integer type for a given integer value" $
-  match _IntegerValue Nothing [
-    _IntegerValue_bigint>>: constant Core.integerTypeBigint,
-    _IntegerValue_int8>>: constant Core.integerTypeInt8,
-    _IntegerValue_int16>>: constant Core.integerTypeInt16,
-    _IntegerValue_int32>>: constant Core.integerTypeInt32,
-    _IntegerValue_int64>>: constant Core.integerTypeInt64,
-    _IntegerValue_uint8>>: constant Core.integerTypeUint8,
-    _IntegerValue_uint16>>: constant Core.integerTypeUint16,
-    _IntegerValue_uint32>>: constant Core.integerTypeUint32,
-    _IntegerValue_uint64>>: constant Core.integerTypeUint64]
-
-literalType :: TTermDefinition (Literal -> LiteralType)
-literalType = define "literalType" $
-  doc "Find the literal type for a given literal value" $
-  match _Literal Nothing [
-    _Literal_binary>>: constant $ inject _LiteralType _LiteralType_binary unit,
-    _Literal_boolean>>: constant $ inject _LiteralType _LiteralType_boolean unit,
-    _Literal_decimal>>: constant $ inject _LiteralType _LiteralType_decimal unit,
-    _Literal_float>>: injectLambda _LiteralType _LiteralType_float <.> floatValueType,
-    _Literal_integer>>: injectLambda _LiteralType _LiteralType_integer <.> integerValueType,
-    _Literal_string>>: constant $ inject _LiteralType _LiteralType_string unit]
-
-literalTypeVariant :: TTermDefinition (LiteralType -> LiteralVariant)
-literalTypeVariant = define "literalTypeVariant" $
-  doc "Find the literal type inject (constructor) for a given literal value" $
-  match _LiteralType Nothing [
-    _LiteralType_binary>>:  constant $ Variants.literalVariantBinary,
-    _LiteralType_boolean>>: constant $ Variants.literalVariantBoolean,
-    _LiteralType_decimal>>: constant $ Variants.literalVariantDecimal,
-    _LiteralType_float>>:   constant $ Variants.literalVariantFloat,
-    _LiteralType_integer>>: constant $ Variants.literalVariantInteger,
-    _LiteralType_string>>:  constant $ Variants.literalVariantString]
-
-literalTypes :: TTermDefinition [LiteralType]
-literalTypes = define "literalTypes" $
-  doc "All literal types, in a canonical order" $
-  Lists.concat $ list [
-    list [
-      Core.literalTypeBinary,
-      Core.literalTypeBoolean,
-      Core.literalTypeDecimal],
-    Lists.map (unaryFunction Core.literalTypeFloat) (floatTypes),
-    Lists.map (unaryFunction Core.literalTypeInteger) (integerTypes),
-    list [
-      Core.literalTypeString]]
-
-literalVariant :: TTermDefinition (Literal -> LiteralVariant)
-literalVariant = define "literalVariant" $
-  doc "Find the literal inject (constructor) for a given literal value" $
-  literalTypeVariant <.> literalType
-
-literalVariants :: TTermDefinition [LiteralVariant]
-literalVariants = define "literalVariants" $
-  doc "All literal variants, in a canonical order" $
-  list $ injectUnit _LiteralVariant <$> [
-    _LiteralVariant_binary,
-    _LiteralVariant_boolean,
-    _LiteralVariant_decimal,
-    _LiteralVariant_float,
-    _LiteralVariant_integer,
-    _LiteralVariant_string]
-
-termVariant :: TTermDefinition (Term -> TermVariant)
-termVariant = define "termVariant" $
-  doc "Find the term inject (constructor) for a given term" $
-  match _Term Nothing [
-    _Term_annotated>>: constant Variants.termVariantAnnotated,
-    _Term_application>>: constant Variants.termVariantApplication,
-    _Term_cases>>: constant Variants.termVariantCases,
-    _Term_either>>: constant Variants.termVariantEither,
-    _Term_lambda>>: constant Variants.termVariantLambda,
-    _Term_let>>: constant Variants.termVariantLet,
-    _Term_list>>: constant Variants.termVariantList,
-    _Term_literal>>: constant Variants.termVariantLiteral,
-    _Term_map>>: constant Variants.termVariantMap,
-    _Term_maybe>>: constant Variants.termVariantMaybe,
-    _Term_pair>>: constant Variants.termVariantPair,
-    _Term_project>>: constant Variants.termVariantProject,
-    _Term_record>>: constant Variants.termVariantRecord,
-    _Term_set>>: constant Variants.termVariantSet,
-    _Term_typeApplication>>: constant Variants.termVariantTypeApplication,
-    _Term_typeLambda>>: constant Variants.termVariantTypeLambda,
-    _Term_inject>>: constant Variants.termVariantInject,
-    _Term_unit>>: constant Variants.termVariantUnit,
-    _Term_unwrap>>: constant Variants.termVariantUnwrap,
-    _Term_variable>>: constant Variants.termVariantVariable,
-    _Term_wrap>>: constant Variants.termVariantWrap]
-
-termVariants :: TTermDefinition [TermVariant]
-termVariants = define "termVariants" $
-  doc "All term (expression) variants, in a canonical order" $
-  list $ injectUnit _TermVariant <$> [
-    _TermVariant_annotated,
-    _TermVariant_application,
-    _TermVariant_cases,
-    _TermVariant_either,
-    _TermVariant_lambda,
-    _TermVariant_let,
-    _TermVariant_list,
-    _TermVariant_literal,
-    _TermVariant_map,
-    _TermVariant_maybe,
-    _TermVariant_pair,
-    _TermVariant_project,
-    _TermVariant_record,
-    _TermVariant_set,
-    _TermVariant_typeLambda,
-    _TermVariant_typeApplication,
-    _TermVariant_inject,
-    _TermVariant_unit,
-    _TermVariant_unwrap,
-    _TermVariant_variable,
-    _TermVariant_wrap]
-
-typeVariant :: TTermDefinition (Type -> TypeVariant)
-typeVariant = define "typeVariant" $
-  doc "Find the type inject (constructor) for a given type" $
-  match _Type Nothing [
-    _Type_annotated>>: constant Variants.typeVariantAnnotated,
-    _Type_application>>: constant Variants.typeVariantApplication,
-    _Type_either>>: constant Variants.typeVariantEither,
-    _Type_function>>: constant Variants.typeVariantFunction,
-    _Type_forall>>: constant Variants.typeVariantForall,
-    _Type_list>>: constant Variants.typeVariantList,
-    _Type_literal>>: constant Variants.typeVariantLiteral,
-    _Type_map>>: constant Variants.typeVariantMap,
-    _Type_maybe>>: constant Variants.typeVariantMaybe,
-    _Type_pair>>: constant Variants.typeVariantPair,
-    _Type_record>>: constant Variants.typeVariantRecord,
-    _Type_set>>: constant Variants.typeVariantSet,
-    _Type_union>>: constant Variants.typeVariantUnion,
-    _Type_unit>>: constant Variants.typeVariantUnit,
-    _Type_variable>>: constant Variants.typeVariantVariable,
-    _Type_void>>: constant Variants.typeVariantVoid,
-    _Type_wrap>>: constant Variants.typeVariantWrap]
-
-typeVariants :: TTermDefinition [TypeVariant]
-typeVariants = define "typeVariants" $
-  doc "All type variants, in a canonical order" $
-  list $ injectUnit _TypeVariant <$> [
-    _TypeVariant_annotated,
-    _TypeVariant_application,
-    _TypeVariant_either,
-    _TypeVariant_function,
-    _TypeVariant_forall,
-    _TypeVariant_list,
-    _TypeVariant_literal,
-    _TypeVariant_map,
-    _TypeVariant_wrap,
-    _TypeVariant_maybe,
-    _TypeVariant_pair,
-    _TypeVariant_record,
-    _TypeVariant_set,
-    _TypeVariant_union,
-    _TypeVariant_unit,
-    _TypeVariant_variable,
-    _TypeVariant_void]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Resolution.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Resolution.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Resolution.hs
+++ /dev/null
@@ -1,348 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Resolution where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  dereferenceType,
-  fTypeIsPolymorphic,
-  fieldMap,
-  fieldTypeMap,
-  fieldTypes,
-  findFieldType,
-  fullyStripAndNormalizeType,
-  fullyStripType,
-  instantiateType,
-  instantiateTypeScheme,
-  nominalApplication,
-  requireRecordType,
-  requireRowType,
-  requireSchemaType,
-  requireType,
-  requireUnionField_,
-  requireUnionType,
-  resolveType,
-  typeToTypeScheme)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Lexical      as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Scoping      as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Strip        as Strip
-import qualified Hydra.Sources.Kernel.Terms.Substitution as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Variables    as Variables
-import qualified Hydra.Sources.Kernel.Terms.Names        as Names
-import qualified Hydra.Sources.Kernel.Terms.Show.Core    as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.resolution"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Lexical.ns, Names.ns, Scoping.ns, ShowCore.ns, Strip.ns, Substitution.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Type dereference, lookup, requirements, and instantiation")}
-  where
-    definitions = [
-      toDefinition dereferenceType,
-      toDefinition fTypeIsPolymorphic,
-      toDefinition fieldMap,
-      toDefinition fieldTypeMap,
-      toDefinition fieldTypes,
-      toDefinition findFieldType,
-      toDefinition fullyStripAndNormalizeType,
-      toDefinition fullyStripType,
-      toDefinition instantiateType,
-      toDefinition instantiateTypeScheme,
-      toDefinition nominalApplication,
-      toDefinition requireRecordType,
-      toDefinition requireRowType,
-      toDefinition requireSchemaType,
-      toDefinition requireType,
-      toDefinition requireUnionField_,
-      toDefinition requireUnionType,
-      toDefinition resolveType,
-      toDefinition typeToTypeScheme]
-
-dereferenceType :: TTermDefinition (Context -> Graph -> Name -> Either Error (Maybe Type))
-dereferenceType = define "dereferenceType" $
-  doc "Dereference a type name to get the actual type (Either version)" $
-  "cx" ~> "graph" ~> "name" ~>
-  "mel" <~ Lexical.lookupBinding @@ var "graph" @@ var "name" $
-  optCases (var "mel")
-    (right nothing)
-    ("el" ~> Eithers.map (unaryFunction just)
-      (Eithers.bimap ("_e" ~> Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError (string "type") (unwrap _DecodingError @@ var "_e")) ("_a" ~> var "_a")
-          (decoderFor _Type @@ var "graph" @@ Core.bindingTerm (var "el"))))
-
-fieldMap :: TTermDefinition ([Field] -> M.Map Name Term)
-fieldMap = define "fieldMap" $
-  "fields" ~>
-  "toPair" <~ ("f" ~> pair (Core.fieldName $ var "f") (Core.fieldTerm $ var "f")) $
-  Maps.fromList $ Lists.map (var "toPair") (var "fields")
-
-fieldTypeMap :: TTermDefinition ([FieldType] -> M.Map Name Type)
-fieldTypeMap = define "fieldTypeMap" $
-  "fields" ~>
-  "toPair" <~ ("f" ~> pair (Core.fieldTypeName $ var "f") (Core.fieldTypeType $ var "f")) $
-  Maps.fromList $ Lists.map (var "toPair") (var "fields")
-
-fieldTypes :: TTermDefinition (Context -> Graph -> Type -> Either Error (M.Map Name Type))
-fieldTypes = define "fieldTypes" $
-  doc "Get field types from a record or union type (Either version)" $
-  "cx" ~> "graph" ~> "t" ~>
-  "toMap" <~ ("fields" ~> Maps.fromList (Lists.map
-    ("ft" ~> pair (Core.fieldTypeName (var "ft")) (Core.fieldTypeType (var "ft")))
-    (var "fields"))) $
-  match _Type (Just (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorUnexpectedShape $
-    Error.unexpectedShapeError (string "record or union type") (ShowCore.type_ @@ var "t")) (var "cx"))) [
-    _Type_forall>>: "ft" ~> fieldTypes @@ var "cx" @@ var "graph" @@ Core.forallTypeBody (var "ft"),
-    _Type_record>>: "rt" ~> right (var "toMap" @@ var "rt"),
-    _Type_union>>: "rt" ~> right (var "toMap" @@ var "rt"),
-    _Type_variable>>: "name" ~>
-      -- Try graphSchemaTypes first (type definitions), then fall back to graphBoundTerms (legacy)
-      Maybes.maybe
-        (Eithers.bind (Lexical.requireBinding @@ var "graph" @@ var "name") (
-          "el" ~>
-          Eithers.bind (Eithers.bimap ("_e" ~> Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError (string "type") (unwrap _DecodingError @@ var "_e")) ("_a" ~> var "_a")
-              (decoderFor _Type @@ var "graph" @@ Core.bindingTerm (var "el"))) (
-            "decodedType" ~> fieldTypes @@ var "cx" @@ var "graph" @@ var "decodedType")))
-        ("ts" ~> fieldTypes @@ var "cx" @@ var "graph" @@ Core.typeSchemeBody (var "ts"))
-        (Maps.lookup (var "name") (Graph.graphSchemaTypes $ var "graph"))]
-  @@ (Strip.deannotateType @@ var "t")
-
-findFieldType :: TTermDefinition (Context -> Name -> [FieldType] -> Either Error Type)
-findFieldType = define "findFieldType" $
-  doc "Find a field type by name in a list of field types" $
-  "cx" ~> "fname" ~> "fields" ~>
-  "matchingFields" <~ Lists.filter
-    ("ft" ~> Equality.equal (Core.unName (Core.fieldTypeName (var "ft"))) (Core.unName (var "fname")))
-    (var "fields") $
-  "noMatch" <~ (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (var "fname")) (var "cx")) $
-  Logic.ifElse (Lists.null (var "matchingFields"))
-    (var "noMatch")
-    (Logic.ifElse (Equality.equal (Lists.length (var "matchingFields")) (int32 1))
-      (Maybes.maybe (var "noMatch") ("ft" ~> right (Core.fieldTypeType $ var "ft")) (Lists.maybeHead $ var "matchingFields"))
-      (Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorMultipleFields $ Error.multipleFieldsError (var "fname")) (var "cx")))
-
-fTypeIsPolymorphic :: TTermDefinition (Type -> Bool)
-fTypeIsPolymorphic = define "fTypeIsPolymorphic" $
-  doc "Test whether a given System F type is polymorphic (i.e., a forall type)" $
-  "typ" ~> cases _Type (var "typ")
-    (Just false) [
-    _Type_annotated>>: "at" ~> fTypeIsPolymorphic @@ Core.annotatedTypeBody (var "at"),
-    _Type_forall>>: "ft" ~> true]
-
-fullyStripAndNormalizeType :: TTermDefinition (Type -> Type)
-fullyStripAndNormalizeType = define "fullyStripAndNormalizeType" $
-  doc "Fully strip a type of forall quantifiers, normalizing bound variable names for alpha-equivalence comparison" $
-  "typ" ~>
-  -- Collect forall-bound variables and the body in one pass
-  "go" <~ ("depth" ~> "subst" ~> "t" ~> cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ pair (var "subst") (var "t")) [
-      _Type_forall>>: "ft" ~>
-        "oldVar" <~ Core.forallTypeParameter (var "ft") $
-        "newVar" <~ Core.name (Strings.cat2 (string "_") (Literals.showInt32 $ var "depth")) $
-        var "go"
-          @@ (Math.add (var "depth") (int32 1))
-          @@ (Maps.insert (var "oldVar") (var "newVar") (var "subst"))
-          @@ (Core.forallTypeBody (var "ft"))]) $
-  "result" <~ var "go" @@ int32 0 @@ Maps.empty @@ var "typ" $
-  "subst" <~ Pairs.first (var "result") $
-  "body" <~ Pairs.second (var "result") $
-  -- Apply the renaming substitution
-  Variables.substituteTypeVariables @@ var "subst" @@ var "body"
-
-fullyStripType :: TTermDefinition (Type -> Type)
-fullyStripType = define "fullyStripType" $
-  doc "Fully strip a type of forall quantifiers" $
-  "typ" ~>
-  match _Type (Just (var "typ")) [
-    _Type_forall>>: "ft" ~> fullyStripType @@ Core.forallTypeBody (var "ft")]
-  @@ (Strip.deannotateType @@ var "typ")
-
-instantiateType :: TTermDefinition (Context -> Type -> (Type, Context))
-instantiateType = define "instantiateType" $
-  doc "Instantiate a type by replacing all forall-bound type variables with fresh variables, threading Context" $
-  "cx" ~> "typ" ~>
-  "result" <~ instantiateTypeScheme @@ var "cx" @@ (typeToTypeScheme @@ var "typ") $
-  pair (Scoping.typeSchemeToFType @@ Pairs.first (var "result")) (Pairs.second (var "result"))
-
-instantiateTypeScheme :: TTermDefinition (Context -> TypeScheme -> (TypeScheme, Context))
-instantiateTypeScheme = define "instantiateTypeScheme" $
-  doc "Instantiate a type scheme with fresh variables, threading Context" $
-  "cx" ~> "scheme" ~>
-  "oldVars" <~ Core.typeSchemeVariables (var "scheme") $
-  "result" <~ Names.freshNames @@ Lists.length (var "oldVars") @@ var "cx" $
-  "newVars" <~ Pairs.first (var "result") $
-  "cx2" <~ Pairs.second (var "result") $
-  "subst" <~ Typing.typeSubst (Maps.fromList $ Lists.zip (var "oldVars") (Lists.map (unaryFunction Core.typeVariable) $ var "newVars")) $
-  -- Build a name-to-name substitution for renaming constraint keys
-  "nameSubst" <~ Maps.fromList (Lists.zip (var "oldVars") (var "newVars")) $
-  -- Rename the keys in the constraints map using the name substitution
-  "renamedConstraints" <~ Maybes.map
-    ("oldConstraints" ~> Maps.fromList (Lists.map
-      ("kv" ~> pair
-        (Maybes.fromMaybe (Pairs.first $ var "kv") (Maps.lookup (Pairs.first $ var "kv") (var "nameSubst")))
-        (Pairs.second $ var "kv"))
-      (Maps.toList $ var "oldConstraints")))
-    (Core.typeSchemeConstraints (var "scheme")) $
-  pair
-    (Core.typeScheme (var "newVars")
-      (Substitution.substInType @@ var "subst" @@ Core.typeSchemeBody (var "scheme"))
-      (var "renamedConstraints"))
-    (var "cx2")
-
-nominalApplication :: TTermDefinition (Name -> [Type] -> Type)
-nominalApplication = define "nominalApplication" $
-  doc "Apply type arguments to a nominal type" $
-  "tname" ~> "args" ~>
-  Lists.foldl
-    ("t" ~> "a" ~> Core.typeApplication $ Core.applicationType (var "t") (var "a"))
-    (Core.typeVariable $ var "tname")
-    (var "args")
-
-requireRecordType :: TTermDefinition (Context -> Graph -> Name -> Either Error [FieldType])
-requireRecordType = define "requireRecordType" $
-  doc "Require a name to resolve to a record type" $
-  "cx" ~> "graph" ~> "name" ~>
-  "toRecord" <~ ("t" ~> cases _Type (var "t") (Just nothing) [
-    _Type_record>>: "rt" ~> just (var "rt")]) $
-  requireRowType @@ var "cx" @@ string "record type" @@ var "toRecord" @@ var "graph" @@ var "name"
-
-requireRowType :: TTermDefinition (Context -> String -> (Type -> Maybe [FieldType]) -> Graph -> Name -> Either Error [FieldType])
-requireRowType = define "requireRowType" $
-  doc "Require a name to resolve to a row type" $
-  "cx" ~> "label" ~> "getter" ~> "graph" ~> "name" ~>
-  "rawType" <~ ("t" ~> cases _Type (var "t") (Just (var "t")) [
-    _Type_annotated>>: "at" ~> var "rawType" @@ Core.annotatedTypeBody (var "at"),
-    _Type_forall>>: "ft" ~> var "rawType" @@ Core.forallTypeBody (var "ft")]) $
-  Eithers.bind (requireType @@ var "cx" @@ var "graph" @@ var "name") (
-    "t" ~>
-    Maybes.maybe
-      (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError
-        (Strings.cat2 (var "label") (string " type"))
-        (Strings.cat2 (Core.unName (var "name")) (Strings.cat2 (string ": ") (ShowCore.type_ @@ var "t")))) (var "cx"))
-      (unaryFunction right)
-      (var "getter" @@ (var "rawType" @@ var "t")))
-
-requireSchemaType :: TTermDefinition (Context -> M.Map Name TypeScheme -> Name -> Either Error (TypeScheme, Context))
-requireSchemaType = define "requireSchemaType" $
-  doc "Look up a schema type and instantiate it, threading Context" $
-  "cx" ~> "types" ~> "tname" ~>
-  Maybes.maybe
-    (left $
-      Error.errorResolution $ Error.resolutionErrorNoSuchBinding $ Error.noSuchBindingError (var "tname"))
-    ("ts" ~> right $ instantiateTypeScheme @@ var "cx" @@ (Strip.deannotateTypeSchemeRecursive @@ var "ts"))
-    (Maps.lookup (var "tname") (var "types"))
-
-requireType :: TTermDefinition (Context -> Graph -> Name -> Either Error Type)
-requireType = define "requireType" $
-  doc "Require a type by name" $
-  "cx" ~> "graph" ~> "name" ~>
-  -- Look up in schema types first, then fall back to bound types
-  Maybes.maybe
-    (Maybes.maybe
-      (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoSuchBinding $ Error.noSuchBindingError (var "name")) (var "cx"))
-      ("ts" ~> right (Scoping.typeSchemeToFType @@ var "ts"))
-      (Maps.lookup (var "name") (Graph.graphBoundTypes (var "graph"))))
-    ("ts" ~> right (Scoping.typeSchemeToFType @@ var "ts"))
-    (Maps.lookup (var "name") (Graph.graphSchemaTypes (var "graph")))
-
-requireUnionField_ :: TTermDefinition (Context -> Graph -> Name -> Name -> Either Error Type)
-requireUnionField_ = define "requireUnionField" $
-  doc "Require a field type from a union type" $
-  "cx" ~> "graph" ~> "tname" ~> "fname" ~>
-  "withRowType" <~ ("rt" ~>
-    "noMatchErr" <~ (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorNoMatchingField $ Error.noMatchingFieldError (var "fname")) (var "cx")) $
-    Maybes.maybe
-      (var "noMatchErr")
-      ("ft" ~> right $ Core.fieldTypeType $ var "ft")
-      (Lists.find
-        ("ft" ~> Equality.equal (Core.fieldTypeName $ var "ft") (var "fname"))
-        (var "rt"))) $
-  Eithers.bind (requireUnionType @@ var "cx" @@ var "graph" @@ var "tname") (var "withRowType")
-
-requireUnionType :: TTermDefinition (Context -> Graph -> Name -> Either Error [FieldType])
-requireUnionType = define "requireUnionType" $
-  doc "Require a name to resolve to a union type" $
-  "cx" ~> "graph" ~> "name" ~>
-  "toUnion" <~ ("t" ~> cases _Type (var "t")
-    (Just nothing) [
-    _Type_union>>: "rt" ~> just (var "rt")]) $
-  requireRowType @@ var "cx" @@ string "union" @@ var "toUnion" @@ var "graph" @@ var "name"
-
-resolveType :: TTermDefinition (Graph -> Type -> Maybe Type)
-resolveType = define "resolveType" $
-  doc "Resolve a type, dereferencing type variables" $
-  "graph" ~> "typ" ~>
-  match _Type (Just (just (var "typ"))) [
-    _Type_variable>>: "name" ~>
-      -- Look up in schema types first, then fall back to bound types
-      Maybes.maybe
-        (Maybes.map ("ts" ~> Scoping.typeSchemeToFType @@ var "ts") (Maps.lookup (var "name") (Graph.graphBoundTypes (var "graph"))))
-        ("ts" ~> just (Scoping.typeSchemeToFType @@ var "ts"))
-        (Maps.lookup (var "name") (Graph.graphSchemaTypes (var "graph")))]
-  @@ (Strip.deannotateType @@ var "typ")
-
-typeToTypeScheme :: TTermDefinition (Type -> TypeScheme)
-typeToTypeScheme = define "typeToTypeScheme" $
-  doc "Convert a (System F -style) type to a type scheme" $
-  "t0" ~>
-  "helper" <~ ("vars" ~> "t" ~> cases _Type (Strip.deannotateType @@ var "t")
-    (Just $ Core.typeScheme (Lists.reverse $ var "vars") (var "t") Phantoms.nothing) [
-    _Type_forall>>: "ft" ~> var "helper"
-      @@ (Lists.cons (Core.forallTypeParameter $ var "ft") $ var "vars")
-      @@ (Core.forallTypeBody $ var "ft")]) $
-  var "helper" @@ list ([] :: [TTerm Name]) @@ var "t0"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Rewriting.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Rewriting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Rewriting.hs
+++ /dev/null
@@ -1,1222 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Rewriting where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  applyInsideTypeLambdasAndAnnotations,
-  foldOverTerm,
-  foldOverType,
-  foldTermWithGraphAndPath,
-  mapBeneathTypeAnnotations,
-  rewriteAndFoldTerm,
-  rewriteAndFoldTermWithGraph,
-  rewriteAndFoldTermWithGraphAndPath,
-  rewriteAndFoldTermWithPath,
-  rewriteTerm,
-  rewriteTermM,
-  rewriteTermWithContext,
-  rewriteTermWithContextM,
-  rewriteTermWithGraph,
-  rewriteType,
-  rewriteTypeM,
-  subterms,
-  subtermsWithSteps,
-  subtypes)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths        as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Scoping as Scoping
-
-
-ns :: Namespace
-ns = Namespace "hydra.rewriting"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Scoping.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Core rewrite and fold combinators for terms and types"}
-  where
-   definitions = [
-     toDefinition applyInsideTypeLambdasAndAnnotations,
-     toDefinition foldOverTerm,
-     toDefinition foldOverType,
-     toDefinition foldTermWithGraphAndPath,
-     toDefinition mapBeneathTypeAnnotations,
-     toDefinition rewriteAndFoldTerm,
-     toDefinition rewriteAndFoldTermWithGraph,
-     toDefinition rewriteAndFoldTermWithGraphAndPath,
-     toDefinition rewriteAndFoldTermWithPath,
-     toDefinition rewriteTerm,
-     toDefinition rewriteTermM,
-     toDefinition rewriteTermWithContext,
-     toDefinition rewriteTermWithContextM,
-     toDefinition rewriteTermWithGraph,
-     toDefinition rewriteType,
-     toDefinition rewriteTypeM,
-     toDefinition subterms,
-     toDefinition subtermsWithSteps,
-     toDefinition subtypes]
-
-applyInsideTypeLambdasAndAnnotations :: TTermDefinition ((Term -> Term) -> Term -> Term)
-applyInsideTypeLambdasAndAnnotations = define "applyInsideTypeLambdasAndAnnotations" $
-  doc "Apply a term-level function inside any leading type lambdas" $
-  "f" ~> "term0" ~> cases _Term (var "term0")
-    (Just $ var "f" @@ var "term0") [
-    _Term_annotated>>: "at" ~> Core.termAnnotated $ Core.annotatedTermWithBody (var "at")
-      (applyInsideTypeLambdasAndAnnotations @@ var "f" @@ (Core.annotatedTermBody $ var "at")),
-    _Term_typeLambda>>: "tl" ~> Core.termTypeLambda $ Core.typeLambdaWithBody (var "tl")
-      (applyInsideTypeLambdasAndAnnotations @@ var "f" @@ (Core.typeLambdaBody $ var "tl"))]
-
-foldOverTerm :: TTermDefinition (TraversalOrder -> (x -> Term -> x) -> x -> Term -> x)
-foldOverTerm = define "foldOverTerm" $
-  doc "Fold over a term, traversing its subterms in the specified order" $
-  "order" ~> "fld" ~> "b0" ~> "term" ~> cases _TraversalOrder (var "order") Nothing [
-    _TraversalOrder_pre>>: constant (Phantoms.fold (foldOverTerm @@ var "order" @@ var "fld")
-      @@ (var "fld" @@ var "b0" @@ var "term")
-      @@ (subterms @@ var "term")),
-    _TraversalOrder_post>>: constant (var "fld"
-      @@ (Phantoms.fold (foldOverTerm @@ var "order" @@ var "fld")
-        @@ (var "b0")
-        @@ (subterms @@ var "term"))
-      @@ var "term")]
-
-foldOverType :: TTermDefinition (TraversalOrder -> (x -> Type -> x) -> x -> Type -> x)
-foldOverType = define "foldOverType" $
-  doc "Fold over a type, traversing its subtypes in the specified order" $
-  "order" ~> "fld" ~> "b0" ~> "typ" ~> cases _TraversalOrder (var "order") Nothing [
-    _TraversalOrder_pre>>: constant (Phantoms.fold (foldOverType @@ var "order" @@ var "fld")
-      @@ (var "fld" @@ var "b0" @@ var "typ")
-      @@ (subtypes @@ var "typ")),
-    _TraversalOrder_post>>: constant (var "fld"
-      @@ (Phantoms.fold (foldOverType @@ var "order" @@ var "fld")
-        @@ (var "b0")
-        @@ (subtypes @@ var "typ"))
-      @@ var "typ")]
-
-
-mapBeneathTypeAnnotations :: TTermDefinition ((Type -> Type) -> Type -> Type)
-mapBeneathTypeAnnotations = define "mapBeneathTypeAnnotations" $
-  doc "Apply a transformation to the first type beneath a chain of annotations" $
-  "f" ~> "t" ~> cases _Type (var "t")
-    (Just $ var "f" @@ var "t") [
-    _Type_annotated>>: "at" ~> Core.typeAnnotated $ Core.annotatedType
-      (mapBeneathTypeAnnotations @@ var "f" @@ (Core.annotatedTypeBody $ var "at"))
-      (Core.annotatedTypeAnnotation $ var "at")]
-
-rewriteAndFoldTerm :: TTermDefinition (((a -> Term -> (a, Term)) -> a -> Term -> (a, Term)) -> a -> Term -> (a, Term))
-rewriteAndFoldTerm = define "rewriteAndFoldTerm" $
-  doc "Rewrite a term, and at the same time, fold a function over it, accumulating a value" $
-  "f" ~> "term0" ~>
-  "fsub" <~ ("recurse" ~> "val0" ~> "term0" ~>
-    "forSingle" <~ ("rec" ~> "cons" ~> "val" ~> "term" ~>
-      "r" <~ var "rec" @@ var "val" @@ var "term" $
-      pair (Pairs.first $ var "r") (var "cons" @@ (Pairs.second $ var "r"))) $
-    "forMany" <~ ("rec" ~> "cons" ~> "val" ~> "els" ~>
-      "rr" <~ Lists.foldl
-        ("r" ~> "el" ~>
-          "r2" <~ var "rec" @@ (Pairs.first $ var "r") @@ var "el" $
-          pair (Pairs.first $ var "r2") (Lists.cons (Pairs.second $ var "r2") (Pairs.second $ var "r")))
-        (pair (var "val") (list ([] :: [TTerm Term])))
-        (var "els") $
-      pair (Pairs.first $ var "rr") (var "cons" @@ (Lists.reverse $ Pairs.second $ var "rr"))) $
-    "forField" <~ ("val" ~> "field" ~>
-      "r" <~ var "recurse" @@ var "val" @@ Core.fieldTerm (var "field") $
-      pair (Pairs.first $ var "r") (Core.field (Core.fieldName $ var "field") (Pairs.second $ var "r"))) $
-    "forFields" <~ var "forMany" @@ var "forField" @@ ("x" ~> var "x") $
-    "forPair" <~ ("val" ~> "kv" ~>
-      "rk" <~ var "recurse" @@ var "val" @@ (Pairs.first $ var "kv") $
-      "rv" <~ var "recurse" @@ (Pairs.first $ var "rk") @@ (Pairs.second $ var "kv") $
-      pair
-        (Pairs.first $ var "rv")
-        (pair (Pairs.second $ var "rk") (Pairs.second $ var "rv"))) $
-    "forBinding" <~ ("val" ~> "binding" ~>
-      "r" <~ var "recurse" @@ var "val" @@ Core.bindingTerm (var "binding") $
-      pair
-        (Pairs.first $ var "r")
-        (Core.binding
-          (Core.bindingName $ var "binding")
-          (Pairs.second $ var "r")
-          (Core.bindingTypeScheme $ var "binding"))) $
-    "dflt" <~ pair (var "val0") (var "term0") $
-    cases _Term (var "term0")
-      (Just $ var "dflt") [
-      _Term_annotated>>: "at" ~> var "forSingle"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termAnnotated $ Core.annotatedTerm (var "t") (Core.annotatedTermAnnotation $ var "at"))
-        @@ var "val0"
-        @@ (Core.annotatedTermBody $ var "at"),
-      _Term_application>>: "a" ~>
-        "rlhs" <~ var "recurse" @@ var "val0" @@ (Core.applicationFunction $ var "a") $
-        "rrhs" <~ var "recurse" @@ (Pairs.first $ var "rlhs") @@ (Core.applicationArgument $ var "a") $
-        pair
-          (Pairs.first $ var "rrhs")
-          (Core.termApplication $ Core.application
-            (Pairs.second $ var "rlhs")
-            (Pairs.second $ var "rrhs")),
-      _Term_cases>>: "cs" ~>
-        "rmd" <~ Maybes.map (var "recurse" @@ var "val0") (Core.caseStatementDefault $ var "cs") $
-        "val1" <~ optCases (var "rmd")
-          (var "val0")
-          (unaryFunction Pairs.first) $
-        "rcases" <~ var "forFields" @@ var "val1" @@ (Core.caseStatementCases $ var "cs") $
-        pair
-          (Pairs.first $ var "rcases")
-          (Core.termCases $ Core.caseStatement
-            (Core.caseStatementTypeName $ var "cs")
-            (Maybes.map (unaryFunction Pairs.second) (var "rmd"))
-            (Pairs.second $ var "rcases")),
-      _Term_either>>: "e" ~> Eithers.either_
-        ("l" ~>
-          "rl" <~ var "recurse" @@ var "val0" @@ var "l" $
-          pair (Pairs.first $ var "rl") (Core.termEither $ left $ Pairs.second $ var "rl"))
-        ("r" ~>
-          "rr" <~ var "recurse" @@ var "val0" @@ var "r" $
-          pair (Pairs.first $ var "rr") (Core.termEither $ right $ Pairs.second $ var "rr"))
-        (var "e"),
-      _Term_lambda>>: "l" ~>
-        "rl" <~ var "recurse" @@ var "val0" @@ (Core.lambdaBody $ var "l") $
-        pair
-          (Pairs.first $ var "rl")
-          (Core.termLambda $ Core.lambda
-            (Core.lambdaParameter $ var "l")
-            (Core.lambdaDomain $ var "l")
-            (Pairs.second $ var "rl")),
-      _Term_let>>: "l" ~>
-        "renv" <~ var "recurse" @@ var "val0" @@ (Core.letBody $ var "l") $
-        var "forMany" @@ var "forBinding"
-          @@ ("bins" ~> Core.termLet $ Core.let_ (var "bins") (Pairs.second $ var "renv"))
-          @@ Pairs.first (var "renv") @@ (Core.letBindings $ var "l"),
-      _Term_list>>: "els" ~> var "forMany" @@ var "recurse" @@ (unaryFunction Core.termList) @@ var "val0" @@ var "els",
-      _Term_map>>: "m" ~> var "forMany" @@ var "forPair"
-        @@ ("pairs" ~> Core.termMap $ Maps.fromList $ var "pairs") @@ var "val0" @@ Maps.toList (var "m"),
-      _Term_maybe>>: "mt" ~> optCases (var "mt")
-        (var "dflt")
-        ("t" ~> var "forSingle"
-          @@ var "recurse"
-          @@ ("t1" ~> Core.termMaybe $ just $ var "t1")
-          @@ var "val0"
-          @@ var "t"),
-      _Term_pair>>: "p" ~>
-        "rf" <~ var "recurse" @@ var "val0" @@ (Pairs.first $ var "p") $
-        "rs" <~ var "recurse" @@ (Pairs.first $ var "rf") @@ (Pairs.second $ var "p") $
-        pair (Pairs.first $ var "rs") (Core.termPair $ pair (Pairs.second $ var "rf") (Pairs.second $ var "rs")),
-      _Term_project>>: "p" ~> pair (var "val0") (Core.termProject $ var "p"),
-      _Term_record>>: "r" ~> var "forMany"
-        @@ var "forField"
-        @@ ("fields" ~> Core.termRecord $ Core.record (Core.recordTypeName $ var "r") (var "fields"))
-        @@ var "val0"
-        @@ Core.recordFields (var "r" ),
-      _Term_set>>: "els" ~> var "forMany"
-        @@ var "recurse"
-        @@ ("e" ~> Core.termSet $ Sets.fromList $ var "e")
-        @@ var "val0"
-        @@ (Sets.toList $ var "els"),
-      _Term_typeApplication>>: "ta" ~> var "forSingle"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termTypeApplication $ Core.typeApplicationTerm (var "t") (Core.typeApplicationTermType $ var "ta"))
-        @@ var "val0"
-        @@ (Core.typeApplicationTermBody $ var "ta"),
-      _Term_typeLambda>>: "tl" ~> var "forSingle"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termTypeLambda $ Core.typeLambda (Core.typeLambdaParameter $ var "tl") (var "t"))
-        @@ var "val0"
-        @@ (Core.typeLambdaBody $ var "tl"),
-      _Term_inject>>: "inj" ~> var "forSingle"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termInject $ Core.injection
-          (Core.injectionTypeName $ var "inj")
-          (Core.field (Core.fieldName $ Core.injectionField $ var "inj") (var "t")))
-        @@ var "val0"
-        @@ (Core.fieldTerm $ Core.injectionField $ var "inj"),
-      _Term_unwrap>>: "n" ~> pair (var "val0") (Core.termUnwrap $ var "n"),
-      _Term_wrap>>: "wt" ~> var "forSingle"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termWrap $ Core.wrappedTerm (Core.wrappedTermTypeName $ var "wt") (var "t"))
-        @@ var "val0"
-        @@ (Core.wrappedTermBody $ var "wt")]) $
---  rewrite @@ var "fsub" @@ var "f" -- TODO: restore global rewrite/fix instead of the local definition
-  "recurse" <~ var "f" @@ (var "fsub" @@ var "recurse") $
-  var "recurse" @@ var "term0"
-
--- | Rewrite a term with path tracking, and fold a function over it.
--- The path is the list of accessors from the root to the current term.
--- The function f receives: (recurse path acc term -> (acc', term')) -> path -> acc -> term -> (acc', term')
-rewriteAndFoldTermWithPath :: TTermDefinition ((([SubtermStep] -> a -> Term -> (a, Term)) -> [SubtermStep] -> a -> Term -> (a, Term)) -> a -> Term -> (a, Term))
-rewriteAndFoldTermWithPath = define "rewriteAndFoldTermWithPath" $
-  doc "Rewrite a term with path tracking, and fold a function over it, accumulating a value. The path is a list of SubtermSteps from root to current position." $
-  "f" ~> "term0" ~>
-  "fsub" <~ ("recurse" ~> "path" ~> "val0" ~> "term0" ~>
-    -- Helper to recurse into a single subterm with a given accessor
-    "forSingleWithAccessor" <~ ("rec" ~> "cons" ~> "accessor" ~> "val" ~> "term" ~>
-      "r" <~ var "rec" @@ Lists.concat2 (var "path") (list [var "accessor"]) @@ var "val" @@ var "term" $
-      pair (Pairs.first $ var "r") (var "cons" @@ (Pairs.second $ var "r"))) $
-    -- Helper to recurse into multiple subterms, each with its own accessor
-    "forManyWithAccessors" <~ ("rec" ~> "cons" ~> "val" ~> "accessorTermPairs" ~>
-      "rr" <~ Lists.foldl
-        ("r" ~> "atp" ~>
-          "r2" <~ var "rec"
-            @@ Lists.concat2 (var "path") (list [Pairs.first $ var "atp"])
-            @@ (Pairs.first $ var "r")
-            @@ (Pairs.second $ var "atp") $
-          pair (Pairs.first $ var "r2") (Lists.cons (Pairs.second $ var "r2") (Pairs.second $ var "r")))
-        (pair (var "val") (list ([] :: [TTerm Term])))
-        (var "accessorTermPairs") $
-      pair (Pairs.first $ var "rr") (var "cons" @@ (Lists.reverse $ Pairs.second $ var "rr"))) $
-    -- Helper for record/case fields with accessors
-    "forFieldWithAccessor" <~ ("mkAccessor" ~> "val" ~> "field" ~>
-      "r" <~ var "recurse"
-        @@ Lists.concat2 (var "path") (list [var "mkAccessor" @@ (Core.fieldName $ var "field")])
-        @@ var "val"
-        @@ Core.fieldTerm (var "field") $
-      pair (Pairs.first $ var "r") (Core.field (Core.fieldName $ var "field") (Pairs.second $ var "r"))) $
-    "forFieldsWithAccessor" <~ ("mkAccessor" ~> var "forManyWithAccessors" @@
-      ("path1" ~> "val1" ~> "field1" ~> var "forFieldWithAccessor" @@ var "mkAccessor" @@ var "val1" @@ var "field1")
-      @@ ("x" ~> var "x")) $
-    -- Helper for map key/value pairs
-    "forPairWithAccessors" <~ ("keyAccessor" ~> "valAccessor" ~> "val" ~> "kv" ~>
-      "rk" <~ var "recurse"
-        @@ Lists.concat2 (var "path") (list [var "keyAccessor"])
-        @@ var "val"
-        @@ (Pairs.first $ var "kv") $
-      "rv" <~ var "recurse"
-        @@ Lists.concat2 (var "path") (list [var "valAccessor"])
-        @@ (Pairs.first $ var "rk")
-        @@ (Pairs.second $ var "kv") $
-      pair
-        (Pairs.first $ var "rv")
-        (pair (Pairs.second $ var "rk") (Pairs.second $ var "rv"))) $
-    -- Helper for let bindings
-    "forBindingWithAccessor" <~ ("val" ~> "binding" ~>
-      "r" <~ var "recurse"
-        @@ Lists.concat2 (var "path") (list [Paths.subtermStepLetBinding $ Core.bindingName $ var "binding"])
-        @@ var "val"
-        @@ Core.bindingTerm (var "binding") $
-      pair
-        (Pairs.first $ var "r")
-        (Core.binding
-          (Core.bindingName $ var "binding")
-          (Pairs.second $ var "r")
-          (Core.bindingTypeScheme $ var "binding"))) $
-    "dflt" <~ pair (var "val0") (var "term0") $
-    cases _Term (var "term0")
-      (Just $ var "dflt") [
-      _Term_annotated>>: "at" ~> var "forSingleWithAccessor"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termAnnotated $ Core.annotatedTerm (var "t") (Core.annotatedTermAnnotation $ var "at"))
-        @@ Paths.subtermStepAnnotatedBody
-        @@ var "val0"
-        @@ (Core.annotatedTermBody $ var "at"),
-      _Term_application>>: "a" ~>
-        "rlhs" <~ var "recurse"
-          @@ Lists.concat2 (var "path") (list [Paths.subtermStepApplicationFunction])
-          @@ var "val0"
-          @@ (Core.applicationFunction $ var "a") $
-        "rrhs" <~ var "recurse"
-          @@ Lists.concat2 (var "path") (list [Paths.subtermStepApplicationArgument])
-          @@ (Pairs.first $ var "rlhs")
-          @@ (Core.applicationArgument $ var "a") $
-        pair
-          (Pairs.first $ var "rrhs")
-          (Core.termApplication $ Core.application
-            (Pairs.second $ var "rlhs")
-            (Pairs.second $ var "rrhs")),
-      _Term_cases>>: "cs" ~>
-        "rmd" <~ Maybes.map
-          ("def" ~> var "recurse"
-            @@ Lists.concat2 (var "path") (list [Paths.subtermStepUnionCasesDefault])
-            @@ var "val0"
-            @@ var "def")
-          (Core.caseStatementDefault $ var "cs") $
-        "val1" <~ optCases (var "rmd")
-          (var "val0")
-          (unaryFunction Pairs.first) $
-        "rcases" <~ var "forManyWithAccessors"
-          @@ var "recurse"
-          @@ ("x" ~> var "x")
-          @@ var "val1"
-          @@ Lists.map
-            ("f" ~> pair
-              (Paths.subtermStepUnionCasesBranch $ Core.fieldName $ var "f")
-              (Core.fieldTerm $ var "f"))
-            (Core.caseStatementCases $ var "cs") $
-        pair
-          (Pairs.first $ var "rcases")
-          (Core.termCases $ Core.caseStatement
-            (Core.caseStatementTypeName $ var "cs")
-            (Maybes.map (unaryFunction Pairs.second) (var "rmd"))
-            (Lists.map
-              ("ft" ~> Core.field
-                (Pairs.first $ var "ft")
-                (Pairs.second $ var "ft"))
-              (Lists.zip
-                (Lists.map (unaryFunction Core.fieldName) (Core.caseStatementCases $ var "cs"))
-                (Pairs.second $ var "rcases")))),
-      _Term_either>>: "e" ~> Eithers.either_
-        ("l" ~>
-          "rl" <~ var "recurse"
-            @@ Lists.concat2 (var "path") (list [Paths.subtermStepSumTerm])
-            @@ var "val0"
-            @@ var "l" $
-          pair (Pairs.first $ var "rl") (Core.termEither $ left $ Pairs.second $ var "rl"))
-        ("r" ~>
-          "rr" <~ var "recurse"
-            @@ Lists.concat2 (var "path") (list [Paths.subtermStepSumTerm])
-            @@ var "val0"
-            @@ var "r" $
-          pair (Pairs.first $ var "rr") (Core.termEither $ right $ Pairs.second $ var "rr"))
-        (var "e"),
-      _Term_lambda>>: "l" ~>
-        "rl" <~ var "recurse"
-          @@ Lists.concat2 (var "path") (list [Paths.subtermStepLambdaBody])
-          @@ var "val0"
-          @@ (Core.lambdaBody $ var "l") $
-        pair
-          (Pairs.first $ var "rl")
-          (Core.termLambda $ Core.lambda
-            (Core.lambdaParameter $ var "l")
-            (Core.lambdaDomain $ var "l")
-            (Pairs.second $ var "rl")),
-      _Term_let>>: "l" ~>
-        "renv" <~ var "recurse"
-          @@ Lists.concat2 (var "path") (list [Paths.subtermStepLetBody])
-          @@ var "val0"
-          @@ (Core.letBody $ var "l") $
-        "rbindings" <~ Lists.foldl
-          ("r" ~> "binding" ~>
-            "rb" <~ var "forBindingWithAccessor" @@ (Pairs.first $ var "r") @@ var "binding" $
-            pair (Pairs.first $ var "rb") (Lists.cons (Pairs.second $ var "rb") (Pairs.second $ var "r")))
-          (pair (Pairs.first $ var "renv") (list ([] :: [TTerm Binding])))
-          (Core.letBindings $ var "l") $
-        pair
-          (Pairs.first $ var "rbindings")
-          (Core.termLet $ Core.let_ (Lists.reverse $ Pairs.second $ var "rbindings") (Pairs.second $ var "renv")),
-      _Term_list>>: "els" ~>
-        "idx" <~ int32 0 $
-        "rr" <~ Lists.foldl
-          ("r" ~> "el" ~>
-            "r2" <~ var "recurse"
-              @@ Lists.concat2 (var "path") (list [Paths.subtermStepListElement $ Pairs.first $ var "r"])
-              @@ (Pairs.first $ Pairs.second $ var "r")
-              @@ var "el" $
-            pair
-              (Math.add (Pairs.first $ var "r") (int32 1))
-              (pair (Pairs.first $ var "r2") (Lists.cons (Pairs.second $ var "r2") (Pairs.second $ Pairs.second $ var "r"))))
-          (pair (var "idx") (pair (var "val0") (list ([] :: [TTerm Term]))))
-          (var "els") $
-        pair (Pairs.first $ Pairs.second $ var "rr") (Core.termList $ Lists.reverse $ Pairs.second $ Pairs.second $ var "rr"),
-      _Term_map>>: "m" ~>
-        "idx" <~ int32 0 $
-        "rr" <~ Lists.foldl
-          ("r" ~> "kv" ~>
-            "rk" <~ var "recurse"
-              @@ Lists.concat2 (var "path") (list [Paths.subtermStepMapKey $ Pairs.first $ var "r"])
-              @@ (Pairs.first $ Pairs.second $ var "r")
-              @@ (Pairs.first $ var "kv") $
-            "rv" <~ var "recurse"
-              @@ Lists.concat2 (var "path") (list [Paths.subtermStepMapValue $ Pairs.first $ var "r"])
-              @@ (Pairs.first $ var "rk")
-              @@ (Pairs.second $ var "kv") $
-            pair
-              (Math.add (Pairs.first $ var "r") (int32 1))
-              (pair
-                (Pairs.first $ var "rv")
-                (Lists.cons (pair (Pairs.second $ var "rk") (Pairs.second $ var "rv")) (Pairs.second $ Pairs.second $ var "r"))))
-          (pair (var "idx") (pair (var "val0") (list ([] :: [TTerm (Term, Term)]))))
-          (Maps.toList $ var "m") $
-        pair (Pairs.first $ Pairs.second $ var "rr") (Core.termMap $ Maps.fromList $ Lists.reverse $ Pairs.second $ Pairs.second $ var "rr"),
-      _Term_maybe>>: "mt" ~> optCases (var "mt")
-        (var "dflt")
-        ("t" ~> var "forSingleWithAccessor"
-          @@ var "recurse"
-          @@ ("t1" ~> Core.termMaybe $ just $ var "t1")
-          @@ Paths.subtermStepMaybeTerm
-          @@ var "val0"
-          @@ var "t"),
-      _Term_pair>>: "p" ~>
-        "rf" <~ var "recurse"
-          @@ Lists.concat2 (var "path") (list [Paths.subtermStepProductTerm $ int32 0])
-          @@ var "val0"
-          @@ (Pairs.first $ var "p") $
-        "rs" <~ var "recurse"
-          @@ Lists.concat2 (var "path") (list [Paths.subtermStepProductTerm $ int32 1])
-          @@ (Pairs.first $ var "rf")
-          @@ (Pairs.second $ var "p") $
-        pair (Pairs.first $ var "rs") (Core.termPair $ pair (Pairs.second $ var "rf") (Pairs.second $ var "rs")),
-      _Term_project>>: "p" ~> pair (var "val0") (Core.termProject $ var "p"),
-      _Term_record>>: "r" ~>
-        "rfields" <~ var "forManyWithAccessors"
-          @@ var "recurse"
-          @@ ("x" ~> var "x")
-          @@ var "val0"
-          @@ Lists.map
-            ("f" ~> pair
-              (Paths.subtermStepRecordField $ Core.fieldName $ var "f")
-              (Core.fieldTerm $ var "f"))
-            (Core.recordFields $ var "r") $
-        pair
-          (Pairs.first $ var "rfields")
-          (Core.termRecord $ Core.record
-            (Core.recordTypeName $ var "r")
-            (Lists.map
-              ("ft" ~> Core.field (Pairs.first $ var "ft") (Pairs.second $ var "ft"))
-              (Lists.zip
-                (Lists.map (unaryFunction Core.fieldName) (Core.recordFields $ var "r"))
-                (Pairs.second $ var "rfields")))),
-      _Term_set>>: "els" ~>
-        "idx" <~ int32 0 $
-        "rr" <~ Lists.foldl
-          ("r" ~> "el" ~>
-            "r2" <~ var "recurse"
-              @@ Lists.concat2 (var "path") (list [Paths.subtermStepSetElement $ Pairs.first $ var "r"])
-              @@ (Pairs.first $ Pairs.second $ var "r")
-              @@ var "el" $
-            pair
-              (Math.add (Pairs.first $ var "r") (int32 1))
-              (pair (Pairs.first $ var "r2") (Lists.cons (Pairs.second $ var "r2") (Pairs.second $ Pairs.second $ var "r"))))
-          (pair (var "idx") (pair (var "val0") (list ([] :: [TTerm Term]))))
-          (Sets.toList $ var "els") $
-        pair (Pairs.first $ Pairs.second $ var "rr") (Core.termSet $ Sets.fromList $ Lists.reverse $ Pairs.second $ Pairs.second $ var "rr"),
-      _Term_typeApplication>>: "ta" ~> var "forSingleWithAccessor"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termTypeApplication $ Core.typeApplicationTerm (var "t") (Core.typeApplicationTermType $ var "ta"))
-        @@ Paths.subtermStepTypeApplicationTerm
-        @@ var "val0"
-        @@ (Core.typeApplicationTermBody $ var "ta"),
-      _Term_typeLambda>>: "tl" ~> var "forSingleWithAccessor"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termTypeLambda $ Core.typeLambda (Core.typeLambdaParameter $ var "tl") (var "t"))
-        @@ Paths.subtermStepTypeLambdaBody
-        @@ var "val0"
-        @@ (Core.typeLambdaBody $ var "tl"),
-      _Term_inject>>: "inj" ~> var "forSingleWithAccessor"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termInject $ Core.injection
-          (Core.injectionTypeName $ var "inj")
-          (Core.field (Core.fieldName $ Core.injectionField $ var "inj") (var "t")))
-        @@ Paths.subtermStepInjectionTerm
-        @@ var "val0"
-        @@ (Core.fieldTerm $ Core.injectionField $ var "inj"),
-      _Term_unwrap>>: "n" ~> pair (var "val0") (Core.termUnwrap $ var "n"),
-      _Term_wrap>>: "wt" ~> var "forSingleWithAccessor"
-        @@ var "recurse"
-        @@ ("t" ~> Core.termWrap $ Core.wrappedTerm (Core.wrappedTermTypeName $ var "wt") (var "t"))
-        @@ Paths.subtermStepWrappedTerm
-        @@ var "val0"
-        @@ (Core.wrappedTermBody $ var "wt")]) $
-  "recurse" <~ var "f" @@ (var "fsub" @@ var "recurse") $
-  var "recurse" @@ list ([] :: [TTerm SubtermStep]) @@ var "term0"
-
-rewriteTerm :: TTermDefinition (((Term -> Term) -> Term -> Term) -> Term -> Term)
-rewriteTerm = define "rewriteTerm" $ "f" ~> "term0" ~>
-  "fsub" <~ ("recurse" ~> "term" ~>
-    "forField" <~ ("f" ~> Core.fieldWithTerm (var "f") (var "recurse" @@ (Core.fieldTerm $ var "f"))) $
-    "forLet" <~ ("lt" ~>
-      "mapBinding" <~ ("b" ~> Core.binding
-        (Core.bindingName $ var "b")
-        (var "recurse" @@ (Core.bindingTerm $ var "b"))
-        (Core.bindingTypeScheme $ var "b")) $
-      Core.let_
-        (Lists.map (var "mapBinding") (Core.letBindings $ var "lt"))
-        (var "recurse" @@ (Core.letBody $ var "lt"))) $
-    "forMap" <~ ("m" ~>
-      "forPair" <~ ("p" ~> pair (var "recurse" @@ (Pairs.first $ var "p")) (var "recurse" @@ (Pairs.second $ var "p"))) $
-      Maps.fromList $ Lists.map (var "forPair") $ Maps.toList $ var "m") $
-    cases _Term (var "term") Nothing [
-      _Term_annotated>>: "at" ~> Core.termAnnotated $ Core.annotatedTerm
-        (var "recurse" @@ (Core.annotatedTermBody $ var "at"))
-        (Core.annotatedTermAnnotation $ var "at"),
-      _Term_application>>: "a" ~> Core.termApplication $ Core.application
-        (var "recurse" @@ (Core.applicationFunction $ var "a"))
-        (var "recurse" @@ (Core.applicationArgument $ var "a")),
-      _Term_cases>>: "cs" ~> Core.termCases $ Core.caseStatement
-        (Core.caseStatementTypeName $ var "cs")
-        (Maybes.map (var "recurse") (Core.caseStatementDefault $ var "cs"))
-        (Lists.map (var "forField") (Core.caseStatementCases $ var "cs")),
-      _Term_either>>: "e" ~> Core.termEither $ Eithers.either_
-        ("l" ~> left $ var "recurse" @@ var "l")
-        ("r" ~> right $ var "recurse" @@ var "r")
-        (var "e"),
-      _Term_lambda>>: "l" ~> Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        (Core.lambdaDomain $ var "l")
-        (var "recurse" @@ (Core.lambdaBody $ var "l")),
-      _Term_let>>: "lt" ~> Core.termLet $ var "forLet" @@ var "lt",
-      _Term_list>>: "els" ~> Core.termList $ Lists.map (var "recurse") (var "els"),
-      _Term_literal>>: "v" ~> Core.termLiteral $ var "v",
-      _Term_map>>: "m" ~> Core.termMap $ var "forMap" @@ var "m",
-      _Term_maybe>>: "m" ~> Core.termMaybe $ Maybes.map (var "recurse") (var "m"),
-      _Term_pair>>: "p" ~> Core.termPair $ pair
-        (var "recurse" @@ (Pairs.first $ var "p"))
-        (var "recurse" @@ (Pairs.second $ var "p")),
-      _Term_project>>: "p" ~> Core.termProject $ var "p",
-      _Term_record>>: "r" ~> Core.termRecord $ Core.record
-        (Core.recordTypeName $ var "r")
-        (Lists.map (var "forField") (Core.recordFields $ var "r")),
-      _Term_set>>: "s" ~> Core.termSet $ Sets.fromList $ Lists.map (var "recurse") $ Sets.toList (var "s"),
-      _Term_typeApplication>>: "tt" ~> Core.termTypeApplication $ Core.typeApplicationTerm
-        (var "recurse" @@ (Core.typeApplicationTermBody $ var "tt"))
-        (Core.typeApplicationTermType $ var "tt"),
-      _Term_typeLambda>>: "ta" ~> Core.termTypeLambda $ Core.typeLambda
-        (Core.typeLambdaParameter $ var "ta")
-        (var "recurse" @@ (Core.typeLambdaBody $ var "ta")),
-      _Term_inject>>: "i" ~> Core.termInject $ Core.injection
-        (Core.injectionTypeName $ var "i")
-        (var "forField" @@ (Core.injectionField $ var "i")),
-      _Term_unit>>: constant Core.termUnit,
-      _Term_unwrap>>: "n" ~> Core.termUnwrap $ var "n",
-      _Term_variable>>: "v" ~> Core.termVariable $ var "v",
-      _Term_wrap>>: "wt" ~> Core.termWrap $ Core.wrappedTerm
-        (Core.wrappedTermTypeName $ var "wt")
-        (var "recurse" @@ (Core.wrappedTermBody $ var "wt"))]) $
---  rewrite @@ var "fsub" @@ var "f" -- TODO: restore global rewrite/fix instead of the local definition
-  "recurse" <~ var "f" @@ (var "fsub" @@ var "recurse") $
-  var "recurse" @@ var "term0"
-
-rewriteTermM :: TTermDefinition (((Term -> Prelude.Either e Term) -> Term -> Prelude.Either e Term) -> Term -> Prelude.Either e Term)
-rewriteTermM = define "rewriteTermM" $
-  doc "Either-based term rewriting with custom transformation function" $
-  "f" ~> "term0" ~>
-  "fsub" <~ ("recurse" ~> "term" ~>
-    "forField" <~ ("field" ~>
-      "t" <<~ var "recurse" @@ Core.fieldTerm (var "field") $
-      right $ Core.fieldWithTerm (var "field") (var "t")) $
-    "forPair" <~ ("kv" ~>
-      "k" <<~ var "recurse" @@ (Pairs.first $ var "kv") $
-      "v" <<~ var "recurse" @@ (Pairs.second $ var "kv") $
-      right $ pair (var "k") (var "v")) $
-    "mapBinding" <~ ("b" ~>
-      "v" <<~ var "recurse" @@ (Core.bindingTerm $ var "b") $
-      right $ Core.binding (Core.bindingName $ var "b") (var "v") (Core.bindingTypeScheme $ var "b")) $
-    cases _Term (var "term") Nothing [
-      _Term_annotated>>: "at" ~>
-        "ex" <<~ var "recurse" @@ Core.annotatedTermBody (var "at") $
-        right $ Core.termAnnotated $ Core.annotatedTerm (var "ex") (Core.annotatedTermAnnotation $ var "at"),
-      _Term_application>>: "app" ~>
-        "lhs" <<~ var "recurse" @@ Core.applicationFunction (var "app") $
-        "rhs" <<~ var "recurse" @@ Core.applicationArgument (var "app") $
-        right $ Core.termApplication $ Core.application (var "lhs") (var "rhs"),
-      _Term_cases>>: "cs" ~>
-        "n" <~ Core.caseStatementTypeName (var "cs") $
-        "def" <~ Core.caseStatementDefault (var "cs") $
-        "csCases" <~ Core.caseStatementCases (var "cs") $
-        "rdef" <<~ Maybes.maybe (right nothing)
-          ("t" ~> Eithers.map (unaryFunction just) $ var "recurse" @@ var "t")
-          (var "def") $
-        Eithers.map
-          ("rcases" ~> Core.termCases $
-            Core.caseStatement (var "n") (var "rdef") (var "rcases"))
-          (Eithers.mapList (var "forField") (var "csCases")),
-      _Term_either>>: "e" ~>
-        "re" <<~ Eithers.either_
-          ("l" ~> Eithers.map (unaryFunction left) $ var "recurse" @@ var "l")
-          ("r" ~> Eithers.map (unaryFunction right) $ var "recurse" @@ var "r")
-          (var "e") $
-        right $ Core.termEither $ var "re",
-      _Term_lambda>>: "l" ~>
-        "v" <~ Core.lambdaParameter (var "l") $
-        "d" <~ Core.lambdaDomain (var "l") $
-        "body" <~ Core.lambdaBody (var "l") $
-        "rbody" <<~ var "recurse" @@ var "body" $
-        right $ Core.termLambda $ Core.lambda (var "v") (var "d") (var "rbody"),
-      _Term_let>>: "lt" ~>
-        "bindings" <~ Core.letBindings (var "lt") $
-        "env" <~ Core.letBody (var "lt") $
-        "rbindings" <<~ Eithers.mapList (var "mapBinding") (var "bindings") $
-        "renv" <<~ var "recurse" @@ var "env" $
-        right $ Core.termLet $ Core.let_ (var "rbindings") (var "renv"),
-      _Term_list>>: "els" ~>
-        "rels" <<~ Eithers.mapList (var "recurse") (var "els") $
-        right $ Core.termList $ var "rels",
-      _Term_literal>>: "v" ~> right $ Core.termLiteral $ var "v",
-      _Term_map>>: "m" ~>
-        "pairs" <<~ Eithers.mapList (var "forPair") (Maps.toList $ var "m") $
-        right $ Core.termMap $ Maps.fromList $ var "pairs",
-      _Term_maybe>>: "m" ~>
-        "rm" <<~ Eithers.mapMaybe (var "recurse") (var "m") $
-        right $ Core.termMaybe $ var "rm",
-      _Term_pair>>: "p" ~>
-        "rf" <<~ var "recurse" @@ (Pairs.first $ var "p") $
-        "rs" <<~ var "recurse" @@ (Pairs.second $ var "p") $
-        right $ Core.termPair $ pair (var "rf") (var "rs"),
-      _Term_project>>: "p" ~> right $ Core.termProject $ var "p",
-      _Term_record>>: "r" ~>
-        "n" <~ Core.recordTypeName (var "r") $
-        "fields" <~ Core.recordFields (var "r") $
-        Eithers.map
-          ("rfields" ~> Core.termRecord $ Core.record (var "n") (var "rfields"))
-          (Eithers.mapList (var "forField") (var "fields")),
-      _Term_set>>: "s" ~>
-        "rlist" <<~ Eithers.mapList (var "recurse") (Sets.toList $ var "s") $
-        right $ Core.termSet $ Sets.fromList $ var "rlist",
-      _Term_typeApplication>>: "tt" ~>
-        "t" <<~ var "recurse" @@ Core.typeApplicationTermBody (var "tt") $
-        right $ Core.termTypeApplication $ Core.typeApplicationTerm (var "t") (Core.typeApplicationTermType (var "tt")),
-      _Term_typeLambda>>: "tl" ~>
-        "v" <~ Core.typeLambdaParameter (var "tl") $
-        "body" <~ Core.typeLambdaBody (var "tl") $
-        "rbody" <<~ var "recurse" @@ var "body" $
-        right $ Core.termTypeLambda $ Core.typeLambda (var "v") (var "rbody"),
-      _Term_inject>>: "i" ~>
-        "n" <~ Core.injectionTypeName (var "i") $
-        "field" <~ Core.injectionField (var "i") $
-        Eithers.map
-          ("rfield" ~> Core.termInject $ Core.injection (var "n") (var "rfield"))
-          (var "forField" @@ var "field"),
-      _Term_unit>>: constant $ right $ Core.termUnit,
-      _Term_unwrap>>: "n" ~> right $ Core.termUnwrap $ var "n",
-      _Term_variable>>: "v" ~> right $ Core.termVariable $ var "v",
-      _Term_wrap>>: "wt" ~>
-        "name" <~ Core.wrappedTermTypeName (var "wt") $
-        "t" <~ Core.wrappedTermBody (var "wt") $
-        "rt" <<~ var "recurse" @@ var "t" $
-        right $ Core.termWrap $ Core.wrappedTerm (var "name") (var "rt")]) $
-  "recurse" <~ var "f" @@ (var "fsub" @@ var "recurse") $
-  var "recurse" @@ var "term0"
-
-rewriteTermWithContext :: TTermDefinition (((a -> Term -> Term) -> a -> Term -> Term) -> a -> Term -> Term)
-rewriteTermWithContext = define "rewriteTermWithContext" $
-  doc ("A variant of rewriteTerm which allows a context (e.g. a TypeContext)"
-    <> " to be passed down to all subterms during rewriting") $
-  "f" ~> "cx0" ~> "term0" ~>
-  "forSubterms" <~ ("recurse0" ~> "cx" ~> "term" ~>
-    "recurse" <~ var "recurse0" @@ var "cx" $
-    "forField" <~ ("field" ~> Core.fieldWithTerm (var "field") (var "recurse" @@ (Core.fieldTerm $ var "field"))) $
-    "forLet" <~ ("lt" ~>
-      "mapBinding" <~ ("b" ~> Core.binding
-        (Core.bindingName $ var "b")
-        (var "recurse" @@ (Core.bindingTerm $ var "b"))
-        (Core.bindingTypeScheme $ var "b")) $
-      Core.let_
-        (Lists.map (var "mapBinding") (Core.letBindings $ var "lt"))
-        (var "recurse" @@ (Core.letBody $ var "lt"))) $
-    "forMap" <~ ("m" ~>
-      "forPair" <~ ("p" ~> pair (var "recurse" @@ (Pairs.first $ var "p")) (var "recurse" @@ (Pairs.second $ var "p"))) $
-      Maps.fromList $ Lists.map (var "forPair") $ Maps.toList $ var "m") $
-    cases _Term (var "term") Nothing [
-      _Term_annotated>>: "at" ~> Core.termAnnotated $ Core.annotatedTerm
-        (var "recurse" @@ (Core.annotatedTermBody $ var "at"))
-        (Core.annotatedTermAnnotation $ var "at"),
-      _Term_application>>: "a" ~> Core.termApplication $ Core.application
-        (var "recurse" @@ (Core.applicationFunction $ var "a"))
-        (var "recurse" @@ (Core.applicationArgument $ var "a")),
-      _Term_cases>>: "cs" ~> Core.termCases $ Core.caseStatement
-        (Core.caseStatementTypeName $ var "cs")
-        (Maybes.map (var "recurse") (Core.caseStatementDefault $ var "cs"))
-        (Lists.map (var "forField") (Core.caseStatementCases $ var "cs")),
-      _Term_either>>: "e" ~> Core.termEither $ Eithers.either_
-        ("l" ~> left $ var "recurse" @@ var "l")
-        ("r" ~> right $ var "recurse" @@ var "r")
-        (var "e"),
-      _Term_lambda>>: "l" ~> Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        (Core.lambdaDomain $ var "l")
-        (var "recurse" @@ (Core.lambdaBody $ var "l")),
-      _Term_let>>: "lt" ~> Core.termLet $ var "forLet" @@ var "lt",
-      _Term_list>>: "els" ~> Core.termList $ Lists.map (var "recurse") (var "els"),
-      _Term_literal>>: "v" ~> Core.termLiteral $ var "v",
-      _Term_map>>: "m" ~> Core.termMap $ var "forMap" @@ var "m",
-      _Term_maybe>>: "m" ~> Core.termMaybe $ Maybes.map (var "recurse") (var "m"),
-      _Term_pair>>: "p" ~> Core.termPair $ pair
-        (var "recurse" @@ (Pairs.first $ var "p"))
-        (var "recurse" @@ (Pairs.second $ var "p")),
-      _Term_project>>: "p" ~> Core.termProject $ var "p",
-      _Term_record>>: "r" ~> Core.termRecord $ Core.record
-        (Core.recordTypeName $ var "r")
-        (Lists.map (var "forField") (Core.recordFields $ var "r")),
-      _Term_set>>: "s" ~> Core.termSet $ Sets.fromList $ Lists.map (var "recurse") $ Sets.toList (var "s"),
-      _Term_typeApplication>>: "tt" ~> Core.termTypeApplication $ Core.typeApplicationTerm
-        (var "recurse" @@ (Core.typeApplicationTermBody $ var "tt"))
-        (Core.typeApplicationTermType $ var "tt"),
-      _Term_typeLambda>>: "ta" ~> Core.termTypeLambda $ Core.typeLambda
-        (Core.typeLambdaParameter $ var "ta")
-        (var "recurse" @@ (Core.typeLambdaBody $ var "ta")),
-      _Term_inject>>: "i" ~> Core.termInject $ Core.injection
-        (Core.injectionTypeName $ var "i")
-        (var "forField" @@ (Core.injectionField $ var "i")),
-      _Term_unit>>: constant Core.termUnit,
-      _Term_unwrap>>: "n" ~> Core.termUnwrap $ var "n",
-      _Term_variable>>: "v" ~> Core.termVariable $ var "v",
-      _Term_wrap>>: "wt" ~> Core.termWrap $ Core.wrappedTerm
-        (Core.wrappedTermTypeName $ var "wt")
-        (var "recurse" @@ (Core.wrappedTermBody $ var "wt"))]) $
-  "rewrite" <~ ("cx" ~> "term" ~> var "f" @@ (var "forSubterms" @@ var "rewrite") @@ var "cx" @@ var "term") $
-  var "rewrite" @@ var "cx0" @@ var "term0"
-
-rewriteTermWithContextM :: TTermDefinition (((a -> Term -> Prelude.Either e Term) -> a -> Term -> Prelude.Either e Term) -> a -> Term -> Prelude.Either e Term)
-rewriteTermWithContextM = define "rewriteTermWithContextM" $
-  doc ("Either-based variant of rewriteTermWithContextM which allows a context (e.g. a TypeContext)"
-    <> " to be passed down to all subterms during rewriting") $
-  "f" ~> "cx0" ~> "term0" ~>
-  "forSubterms" <~ ("recurse0" ~> "cx" ~> "term" ~>
-    "recurse" <~ var "recurse0" @@ var "cx" $
-    "forField" <~ ("field" ~>
-      "t" <<~ var "recurse" @@ Core.fieldTerm (var "field") $
-      right $ Core.fieldWithTerm (var "field") (var "t")) $
-    "forPair" <~ ("kv" ~>
-      "k" <<~ var "recurse" @@ (Pairs.first $ var "kv") $
-      "v" <<~ var "recurse" @@ (Pairs.second $ var "kv") $
-      right $ pair (var "k") (var "v")) $
-    "mapBinding" <~ ("b" ~>
-      "v" <<~ var "recurse" @@ (Core.bindingTerm $ var "b") $
-      right $ Core.binding (Core.bindingName $ var "b") (var "v") (Core.bindingTypeScheme $ var "b")) $
-    cases _Term (var "term") Nothing [
-      _Term_annotated>>: "at" ~>
-        "ex" <<~ var "recurse" @@ Core.annotatedTermBody (var "at") $
-        right $ Core.termAnnotated $ Core.annotatedTerm (var "ex") (Core.annotatedTermAnnotation $ var "at"),
-      _Term_application>>: "app" ~>
-        "lhs" <<~ var "recurse" @@ Core.applicationFunction (var "app") $
-        "rhs" <<~ var "recurse" @@ Core.applicationArgument (var "app") $
-        right $ Core.termApplication $ Core.application (var "lhs") (var "rhs"),
-      _Term_cases>>: "cs" ~>
-        "n" <~ Core.caseStatementTypeName (var "cs") $
-        "def" <~ Core.caseStatementDefault (var "cs") $
-        "csCases" <~ Core.caseStatementCases (var "cs") $
-        "rdef" <<~ Maybes.maybe (right nothing)
-          ("t" ~> Eithers.map (unaryFunction just) $ var "recurse" @@ var "t")
-          (var "def") $
-        Eithers.map
-          ("rcases" ~> Core.termCases $
-            Core.caseStatement (var "n") (var "rdef") (var "rcases"))
-          (Eithers.mapList (var "forField") (var "csCases")),
-      _Term_either>>: "e" ~>
-        "re" <<~ Eithers.either_
-          ("l" ~> Eithers.map (unaryFunction left) $ var "recurse" @@ var "l")
-          ("r" ~> Eithers.map (unaryFunction right) $ var "recurse" @@ var "r")
-          (var "e") $
-        right $ Core.termEither $ var "re",
-      _Term_lambda>>: "l" ~>
-        "v" <~ Core.lambdaParameter (var "l") $
-        "d" <~ Core.lambdaDomain (var "l") $
-        "body" <~ Core.lambdaBody (var "l") $
-        "rbody" <<~ var "recurse" @@ var "body" $
-        right $ Core.termLambda $ Core.lambda (var "v") (var "d") (var "rbody"),
-      _Term_let>>: "lt" ~>
-        "bindings" <~ Core.letBindings (var "lt") $
-        "body" <~ Core.letBody (var "lt") $
-        "rbindings" <<~ Eithers.mapList (var "mapBinding") (var "bindings") $
-        "rbody" <<~ var "recurse" @@ var "body" $
-        right $ Core.termLet $ Core.let_ (var "rbindings") (var "rbody"),
-      _Term_list>>: "els" ~>
-        "rels" <<~ Eithers.mapList (var "recurse") (var "els") $
-        right $ Core.termList $ var "rels",
-      _Term_literal>>: "v" ~> right $ Core.termLiteral $ var "v",
-      _Term_map>>: "m" ~>
-        "pairs" <<~ Eithers.mapList (var "forPair") (Maps.toList $ var "m") $
-        right $ Core.termMap $ Maps.fromList $ var "pairs",
-      _Term_maybe>>: "m" ~>
-        "rm" <<~ Eithers.mapMaybe (var "recurse") (var "m") $
-        right $ Core.termMaybe $ var "rm",
-      _Term_pair>>: "p" ~>
-        "rfirst" <<~ var "recurse" @@ Pairs.first (var "p") $
-        "rsecond" <<~ var "recurse" @@ Pairs.second (var "p") $
-        right $ Core.termPair $ pair (var "rfirst") (var "rsecond"),
-      _Term_project>>: "p" ~> right $ Core.termProject $ var "p",
-      _Term_record>>: "r" ~>
-        "n" <~ Core.recordTypeName (var "r") $
-        "fields" <~ Core.recordFields (var "r") $
-        Eithers.map
-          ("rfields" ~> Core.termRecord $ Core.record (var "n") (var "rfields"))
-          (Eithers.mapList (var "forField") (var "fields")),
-      _Term_set>>: "s" ~>
-        "rlist" <<~ Eithers.mapList (var "recurse") (Sets.toList $ var "s") $
-        right $ Core.termSet $ Sets.fromList $ var "rlist",
-      _Term_typeApplication>>: "tt" ~>
-        "t" <<~ var "recurse" @@ Core.typeApplicationTermBody (var "tt") $
-        right $ Core.termTypeApplication $ Core.typeApplicationTerm (var "t") (Core.typeApplicationTermType (var "tt")),
-      _Term_typeLambda>>: "tl" ~>
-        "v" <~ Core.typeLambdaParameter (var "tl") $
-        "body" <~ Core.typeLambdaBody (var "tl") $
-        "rbody" <<~ var "recurse" @@ var "body" $
-        right $ Core.termTypeLambda $ Core.typeLambda (var "v") (var "rbody"),
-      _Term_inject>>: "i" ~>
-        "n" <~ Core.injectionTypeName (var "i") $
-        "field" <~ Core.injectionField (var "i") $
-        Eithers.map
-          ("rfield" ~> Core.termInject $ Core.injection (var "n") (var "rfield"))
-          (var "forField" @@ var "field"),
-      _Term_unit>>: constant $ right Core.termUnit,
-      _Term_unwrap>>: "n" ~> right $ Core.termUnwrap $ var "n",
-      _Term_variable>>: "v" ~> right $ Core.termVariable $ var "v",
-      _Term_wrap>>: "wt" ~>
-        "name" <~ Core.wrappedTermTypeName (var "wt") $
-        "t" <~ Core.wrappedTermBody (var "wt") $
-        "rt" <<~ var "recurse" @@ var "t" $
-        right $ Core.termWrap $ Core.wrappedTerm (var "name") (var "rt")]) $
-
-  "rewrite" <~ ("cx" ~> "term" ~> var "f" @@ (var "forSubterms" @@ var "rewrite") @@ var "cx" @@ var "term") $
-  var "rewrite" @@ var "cx0" @@ var "term0"
-
-rewriteType :: TTermDefinition (((Type -> Type) -> Type -> Type) -> Type -> Type)
-rewriteType = define "rewriteType" $ "f" ~> "typ0" ~>
-  "fsub" <~ ("recurse" ~> "typ" ~>
-    "forField" <~ ("field" ~> Core.fieldTypeWithType (var "field") (var "recurse" @@ (Core.fieldTypeType $ var "field"))) $
-    cases _Type (var "typ") Nothing [
-      _Type_annotated>>: "at" ~> Core.typeAnnotated $ Core.annotatedType
-        (var "recurse" @@ (Core.annotatedTypeBody $ var "at"))
-        (Core.annotatedTypeAnnotation $ var "at"),
-      _Type_application>>: "app" ~> Core.typeApplication $ Core.applicationType
-        (var "recurse" @@ (Core.applicationTypeFunction $ var "app"))
-        (var "recurse" @@ (Core.applicationTypeArgument $ var "app")),
-      _Type_either>>: "et" ~> Core.typeEither $ Core.eitherType
-        (var "recurse" @@ (Core.eitherTypeLeft $ var "et"))
-        (var "recurse" @@ (Core.eitherTypeRight $ var "et")),
-      _Type_pair>>: "pt" ~> Core.typePair $ Core.pairType
-        (var "recurse" @@ (Core.pairTypeFirst $ var "pt"))
-        (var "recurse" @@ (Core.pairTypeSecond $ var "pt")),
-      _Type_function>>: "fun" ~> Core.typeFunction $ Core.functionType
-        (var "recurse" @@ (Core.functionTypeDomain $ var "fun"))
-        (var "recurse" @@ (Core.functionTypeCodomain $ var "fun")),
-      _Type_forall>>: "lt" ~> Core.typeForall $ Core.forallType
-        (Core.forallTypeParameter $ var "lt")
-        (var "recurse" @@ (Core.forallTypeBody $ var "lt")),
-      _Type_list>>: "t" ~> Core.typeList $ var "recurse" @@ var "t",
-      _Type_literal>>: "lt" ~> Core.typeLiteral $ var "lt",
-      _Type_map>>: "mt" ~> Core.typeMap $ Core.mapType
-        (var "recurse" @@ (Core.mapTypeKeys $ var "mt"))
-        (var "recurse" @@ (Core.mapTypeValues $ var "mt")),
-      _Type_maybe>>: "t" ~> Core.typeMaybe $ var "recurse" @@ var "t",
-      _Type_record>>: "rt" ~> Core.typeRecord $
-        Lists.map (var "forField") (var "rt"),
-      _Type_set>>: "t" ~> Core.typeSet $ var "recurse" @@ var "t",
-      _Type_union>>: "rt" ~> Core.typeUnion $
-        Lists.map (var "forField") (var "rt"),
-      _Type_unit>>: constant Core.typeUnit,
-      _Type_variable>>: "v" ~> Core.typeVariable $ var "v",
-      _Type_void>>: constant Core.typeVoid,
-      _Type_wrap>>: "wt" ~> Core.typeWrap $
-        var "recurse" @@ var "wt"]) $
---  rewrite @@ var "fsub" @@ var "f" -- TODO: restore global rewrite/fix instead of the local definition
-  "recurse" <~ var "f" @@ (var "fsub" @@ var "recurse") $
-  var "recurse" @@ var "typ0"
-
-rewriteTypeM :: TTermDefinition (((Type -> Prelude.Either e Type) -> Type -> Prelude.Either e Type) -> Type -> Prelude.Either e Type)
-rewriteTypeM = define "rewriteTypeM" $
-  doc "Either-based type rewriting" $
-  "f" ~> "typ0" ~>
-  "fsub" <~ ("recurse" ~> "typ" ~> cases _Type (var "typ") Nothing [
-    _Type_annotated>>: "at" ~>
-      "t" <<~ var "recurse" @@ (Core.annotatedTypeBody $ var "at") $
-      right $ Core.typeAnnotated $ Core.annotatedType (var "t") (Core.annotatedTypeAnnotation $ var "at"),
-    _Type_application>>: "at" ~>
-      "lhs" <<~ var "recurse" @@ (Core.applicationTypeFunction $ var "at") $
-      "rhs" <<~ var "recurse" @@ (Core.applicationTypeArgument $ var "at") $
-      right $ Core.typeApplication $ Core.applicationType (var "lhs") (var "rhs"),
-    _Type_either>>: "et" ~>
-      "left" <<~ var "recurse" @@ (Core.eitherTypeLeft $ var "et") $
-      "right" <<~ var "recurse" @@ (Core.eitherTypeRight $ var "et") $
-      right $ Core.typeEither $ Core.eitherType (var "left") (var "right"),
-    _Type_pair>>: "pt" ~>
-      "pairFirst" <<~ var "recurse" @@ (Core.pairTypeFirst $ var "pt") $
-      "pairSecond" <<~ var "recurse" @@ (Core.pairTypeSecond $ var "pt") $
-      right $ Core.typePair $ Core.pairType (var "pairFirst") (var "pairSecond"),
-    _Type_function>>: "ft" ~>
-      "dom" <<~ var "recurse" @@ (Core.functionTypeDomain $ var "ft") $
-      "cod" <<~ var "recurse" @@ (Core.functionTypeCodomain $ var "ft") $
-      right $ Core.typeFunction $ Core.functionType (var "dom") (var "cod"),
-    _Type_forall>>: "ft" ~>
-      "b" <<~ var "recurse" @@ (Core.forallTypeBody $ var "ft") $
-      right $ Core.typeForall $ Core.forallType (Core.forallTypeParameter $ var "ft") (var "b"),
-    _Type_list>>: "t" ~>
-      "rt" <<~ var "recurse" @@ var "t" $
-      right $ Core.typeList $ var "rt",
-    _Type_literal>>: "lt" ~> right $ Core.typeLiteral $ var "lt",
-    _Type_map>>: "mt" ~>
-      "kt" <<~ var "recurse" @@ (Core.mapTypeKeys $ var "mt") $
-      "vt" <<~ var "recurse" @@ (Core.mapTypeValues $ var "mt") $
-      right $ Core.typeMap $ Core.mapType (var "kt") (var "vt"),
-    _Type_maybe>>: "t" ~>
-      "rt" <<~ var "recurse" @@ var "t" $
-      right $ Core.typeMaybe $ var "rt",
-    _Type_record>>: "rt" ~>
-      "forField" <~ ("f" ~>
-        "t" <<~ var "recurse" @@ (Core.fieldTypeType $ var "f") $
-        right $ Core.fieldTypeWithType (var "f") (var "t")) $
-      "rfields" <<~ Eithers.mapList (var "forField") (var "rt") $
-      right $ Core.typeRecord $ var "rfields",
-    _Type_set>>: "t" ~>
-      "rt" <<~ var "recurse" @@ var "t" $
-      right $ Core.typeSet $ var "rt",
-    _Type_union>>: "rt" ~>
-      "forField" <~ ("f" ~>
-        "t" <<~ var "recurse" @@ (Core.fieldTypeType $ var "f") $
-        right $ Core.fieldTypeWithType (var "f") (var "t")) $
-      "rfields" <<~ Eithers.mapList (var "forField") (var "rt") $
-      right $ Core.typeUnion $ var "rfields",
-    _Type_unit>>: constant $ right $ Core.typeUnit,
-    _Type_variable>>: "v" ~> right $ Core.typeVariable $ var "v",
-    _Type_void>>: constant $ right $ Core.typeVoid,
-    _Type_wrap>>: "wt" ~>
-      "t" <<~ var "recurse" @@ var "wt" $
-      right $ Core.typeWrap $ var "t"]) $
-  "recurse" <~ var "f" @@ (var "fsub" @@ var "recurse") $
-  var "recurse" @@ var "typ0"
-
-subterms :: TTermDefinition (Term -> [Term])
-subterms = define "subterms" $
-  doc "Find the children of a given term" $
-  match _Term Nothing [
-    _Term_annotated>>: "at" ~> list [Core.annotatedTermBody $ var "at"],
-    _Term_application>>: "p" ~> list [
-      Core.applicationFunction $ var "p",
-      Core.applicationArgument $ var "p"],
-    _Term_cases>>: "cs" ~> Lists.concat2
-      (Maybes.maybe (list ([] :: [TTerm Term])) ("t" ~> list [var "t"]) (Core.caseStatementDefault $ var "cs"))
-      (Lists.map (unaryFunction Core.fieldTerm) (Core.caseStatementCases $ var "cs")),
-    _Term_either>>: "e" ~> Eithers.either_
-      ("l" ~> list [var "l"])
-      ("r" ~> list [var "r"])
-      (var "e"),
-    _Term_lambda>>: "l" ~> list [Core.lambdaBody $ var "l"],
-    _Term_let>>: "lt" ~> Lists.cons
-      (Core.letBody $ var "lt")
-      (Lists.map (unaryFunction Core.bindingTerm) (Core.letBindings $ var "lt")),
-    _Term_list>>: "l" ~> var "l",
-    _Term_literal>>: constant $ list ([] :: [TTerm Term]),
-    _Term_map>>: "m" ~> Lists.concat $ Lists.map
-      ("p" ~> list [Pairs.first $ var "p", Pairs.second $ var "p"])
-      (Maps.toList $ var "m"),
-    _Term_maybe>>: "m" ~> Maybes.maybe (list ([] :: [TTerm Term])) ("t" ~> list [var "t"]) (var "m"),
-    _Term_pair>>: "p" ~> list [Pairs.first $ var "p", Pairs.second $ var "p"],
-    _Term_project>>: constant $ list ([] :: [TTerm Term]),
-    _Term_record>>: "rt" ~> Lists.map (unaryFunction Core.fieldTerm) (Core.recordFields $ var "rt"),
-    _Term_set>>: "l" ~> Sets.toList $ var "l",
-    _Term_typeApplication>>: "ta" ~> list [Core.typeApplicationTermBody $ var "ta"],
-    _Term_typeLambda>>: "ta" ~> list [Core.typeLambdaBody $ var "ta"],
-    _Term_inject>>: "ut" ~> list [Core.fieldTerm $ (Core.injectionField $ var "ut")],
-    _Term_unit>>: constant $ list ([] :: [TTerm Term]),
-    _Term_unwrap>>: constant $ list ([] :: [TTerm Term]),
-    _Term_variable>>: constant $ list ([] :: [TTerm Term]),
-    _Term_wrap>>: "n" ~> list [Core.wrappedTermBody $ var "n"]]
-
-subtermsWithSteps :: TTermDefinition (Term -> [(SubtermStep, Term)])
-subtermsWithSteps = define "subtermsWithSteps" $
-  doc "Find the children of a given term" $
-  match _Term Nothing [
-    _Term_annotated>>: "at" ~> single Paths.subtermStepAnnotatedBody $ Core.annotatedTermBody $ var "at",
-    _Term_application>>: "p" ~> list [
-      result Paths.subtermStepApplicationFunction $ Core.applicationFunction $ var "p",
-      result Paths.subtermStepApplicationArgument $ Core.applicationArgument $ var "p"],
-    _Term_cases>>: "cs" ~> Lists.concat2
-      (Maybes.maybe none
-        ("t" ~> single Paths.subtermStepUnionCasesDefault $ var "t")
-        (Core.caseStatementDefault $ var "cs"))
-      (Lists.map
-        ("f" ~> result (Paths.subtermStepUnionCasesBranch $ Core.fieldName $ var "f") $ Core.fieldTerm $ var "f")
-        (Core.caseStatementCases $ var "cs")),
-    _Term_either>>: "e" ~> none, -- TODO: add steps when SubtermStep type is updated
-    _Term_lambda>>: "l" ~> single Paths.subtermStepLambdaBody $ Core.lambdaBody $ var "l",
-    _Term_let>>: "lt" ~> Lists.cons
-      (result Paths.subtermStepLetBody $ Core.letBody $ var "lt")
-      (Lists.map
-        ("b" ~> result (Paths.subtermStepLetBinding $ Core.bindingName $ var "b") $ Core.bindingTerm $ var "b")
-        (Core.letBindings $ var "lt")),
-    _Term_list>>: "l" ~> Lists.map
-      -- TODO: use a range of indexes from 0 to len(l)-1, rather than just 0
-      ("e" ~> result (Paths.subtermStepListElement $ int32 0) $ var "e")
-      (var "l"),
-    _Term_literal>>: constant none,
-    _Term_map>>: "m" ~> Lists.concat
-      (Lists.map
-        ("p" ~> list [
-          -- TODO: use a range of indexes from 0 to len(l)-1, rather than just 0
-          result (Paths.subtermStepMapKey $ int32 0) $ Pairs.first $ var "p",
-          result (Paths.subtermStepMapValue $ int32 0) $ Pairs.second $ var "p"])
-        (Maps.toList $ var "m")),
-    _Term_maybe>>: "m" ~> Maybes.maybe none
-      ("t" ~> single Paths.subtermStepMaybeTerm $ var "t")
-      (var "m"),
-    _Term_pair>>: "p" ~> none, -- TODO: add steps when SubtermStep type is updated
-    _Term_project>>: constant none,
-    _Term_record>>: "rt" ~> Lists.map
-      ("f" ~> result (Paths.subtermStepRecordField $ Core.fieldName $ var "f") $ Core.fieldTerm $ var "f")
-      (Core.recordFields $ var "rt"),
-    _Term_set>>: "s" ~> Lists.map
-      -- TODO: use a range of indexes from 0 to len(l)-1, rather than just 0
-      ("e" ~> result (Paths.subtermStepListElement $ int32 0) $ var "e")
-      (Sets.toList $ var "s"),
-    _Term_typeApplication>>: "ta" ~>
-      single Paths.subtermStepTypeApplicationTerm $
-      Core.typeApplicationTermBody $ var "ta",
-    _Term_typeLambda>>: "ta" ~>
-      single Paths.subtermStepTypeLambdaBody $
-      Core.typeLambdaBody $ var "ta",
-    _Term_inject>>: "ut" ~>
-      single Paths.subtermStepInjectionTerm $
-      Core.fieldTerm $ (Core.injectionField $ var "ut"),
-    _Term_unit>>: constant none,
-    _Term_unwrap>>: constant none,
-    _Term_variable>>: constant none,
-    _Term_wrap>>: "n" ~> single Paths.subtermStepWrappedTerm $ Core.wrappedTermBody $ var "n"]
-  where
-    none = list ([] :: [TTerm (SubtermStep, Term)])
-    single step term = list [result step term]
-    result step term = pair step term
-
-subtypes :: TTermDefinition (Type -> [Type])
-subtypes = define "subtypes" $
-  doc "Find the children of a given type expression" $
-  match _Type Nothing [
-    _Type_annotated>>: "at" ~> list [Core.annotatedTypeBody $ var "at"],
-    _Type_application>>: "at" ~> list [
-      Core.applicationTypeFunction $ var "at",
-      Core.applicationTypeArgument $ var "at"],
-    _Type_either>>: "et" ~> list [
-      Core.eitherTypeLeft $ var "et",
-      Core.eitherTypeRight $ var "et"],
-    _Type_pair>>: "pt" ~> list [
-      Core.pairTypeFirst $ var "pt",
-      Core.pairTypeSecond $ var "pt"],
-    _Type_function>>: "ft" ~> list [
-      Core.functionTypeDomain $ var "ft",
-      Core.functionTypeCodomain $ var "ft"],
-    _Type_forall>>: "lt" ~> list [Core.forallTypeBody $ var "lt"],
-    _Type_list>>: "lt" ~> list [var "lt"],
-    _Type_literal>>: constant $ list ([] :: [TTerm Type]),
-    _Type_map>>: "mt" ~> list [
-      Core.mapTypeKeys $ var "mt",
-      Core.mapTypeValues $ var "mt"],
-    _Type_maybe>>: "ot" ~> list [var "ot"],
-    _Type_record>>: "rt" ~> Lists.map (unaryFunction Core.fieldTypeType) (var "rt"),
-    _Type_set>>: "st" ~> list [var "st"],
-    _Type_union>>: "rt" ~> Lists.map (unaryFunction Core.fieldTypeType) (var "rt"),
-    _Type_unit>>: constant $ list ([] :: [TTerm Type]),
-    _Type_variable>>: constant $ list ([] :: [TTerm Type]),
-    _Type_void>>: constant $ list ([] :: [TTerm Type]),
-    _Type_wrap>>: "nt" ~> list [var "nt"]]
-
-rewriteAndFoldTermWithGraph :: TTermDefinition (((a -> Term -> (a, Term)) -> Graph -> a -> Term -> (a, Term)) -> Graph -> a -> Term -> (a, Term))
-rewriteAndFoldTermWithGraph = define "rewriteAndFoldTermWithGraph" $
-  doc ("Rewrite a term while folding to produce a value, with Graph updated as we descend into subterms."
-    <> " Combines the features of rewriteAndFoldTerm and rewriteTermWithGraph."
-    <> " The user function f receives a recurse function that handles subterm traversal and Graph management.") $
-  "f" ~> "cx0" ~> "val0" ~> "term0" ~>
-  "wrapper" <~ ("lowLevelRecurse" ~> "valAndCx" ~> "term" ~>
-    "val" <~ Pairs.first (var "valAndCx") $
-    "cx" <~ Pairs.second (var "valAndCx") $
-    "cx1" <~ (cases _Term (var "term")
-      (Just $ var "cx") [
-      _Term_lambda>>: "l" ~> Scoping.extendGraphForLambda @@ var "cx" @@ var "l",
-      _Term_let>>: "l" ~> Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "cx" @@ var "l",
-      _Term_typeLambda>>: "tl" ~> Scoping.extendGraphForTypeLambda @@ var "cx" @@ var "tl"]) $
-    "recurseForUser" <~ ("newVal" ~> "subterm" ~>
-      "result" <~ var "lowLevelRecurse" @@ pair (var "newVal") (var "cx1") @@ var "subterm" $
-      pair (Pairs.first $ Pairs.first $ var "result") (Pairs.second $ var "result")) $
-    "fResult" <~ var "f" @@ var "recurseForUser" @@ var "cx1" @@ var "val" @@ var "term" $
-    pair (pair (Pairs.first $ var "fResult") (var "cx")) (Pairs.second $ var "fResult")) $
-  "result" <~ rewriteAndFoldTerm @@ var "wrapper" @@ pair (var "val0") (var "cx0") @@ var "term0" $
-  pair (Pairs.first $ Pairs.first $ var "result") (Pairs.second $ var "result")
-
-rewriteAndFoldTermWithGraphAndPath :: TTermDefinition (
-  ((a -> Term -> (a, Term)) -> [SubtermStep] -> Graph -> a -> Term -> (a, Term))
-  -> Graph -> a -> Term -> (a, Term))
-rewriteAndFoldTermWithGraphAndPath = define "rewriteAndFoldTermWithGraphAndPath" $
-  doc ("Rewrite a term while folding to produce a value, with both Graph and accessor path tracked."
-    <> " The path is a list of SubtermSteps representing the position from the root to the current term."
-    <> " Combines the features of rewriteAndFoldTermWithPath and Graph tracking."
-    <> " The Graph is automatically updated when descending into lambdas, lets, and type lambdas.") $
-  "f" ~> "cx0" ~> "val0" ~> "term0" ~>
-  "wrapper" <~ ("recurse" ~> "path" ~> "cxAndVal" ~> "term" ~>
-    "cx" <~ Pairs.first (var "cxAndVal") $
-    "val" <~ Pairs.second (var "cxAndVal") $
-    "cx1" <~ (cases _Term (var "term")
-      (Just $ var "cx") [
-      _Term_lambda>>: "l" ~> Scoping.extendGraphForLambda @@ var "cx" @@ var "l",
-      _Term_let>>: "l" ~> Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "cx" @@ var "l",
-      _Term_typeLambda>>: "tl" ~> Scoping.extendGraphForTypeLambda @@ var "cx" @@ var "tl"]) $
-    "recurseForUser" <~ ("valIn" ~> "termIn" ~>
-      "result" <~ var "recurse" @@ var "path" @@ pair (var "cx1") (var "valIn") @@ var "termIn" $
-      pair (Pairs.second $ Pairs.first $ var "result") (Pairs.second $ var "result")) $
-    "fResult" <~ var "f" @@ var "recurseForUser" @@ var "path" @@ var "cx1" @@ var "val" @@ var "term" $
-    pair (pair (var "cx") (Pairs.first $ var "fResult")) (Pairs.second $ var "fResult")) $
-  "result" <~ rewriteAndFoldTermWithPath @@ var "wrapper" @@ pair (var "cx0") (var "val0") @@ var "term0" $
-  pair (Pairs.second $ Pairs.first $ var "result") (Pairs.second $ var "result")
-
-rewriteTermWithGraph :: TTermDefinition (((Term -> Term) -> Graph -> Term -> Term) -> Graph -> Term -> Term)
-rewriteTermWithGraph = define "rewriteTermWithGraph" $
-  doc "Rewrite a term with the help of a Graph which is updated as we descend into subterms" $
-  "f" ~> "cx0" ~> "term0" ~>
-  "f2" <~ ("recurse" ~> "cx" ~> "term" ~>
-    "recurse1" <~ ("term" ~> var "recurse" @@ var "cx" @@ var "term") $
-    cases _Term (var "term") (Just $ var "f" @@ var "recurse1" @@ var "cx" @@ var "term") [
-      _Term_lambda>>: "l" ~>
-        "cx1" <~ Scoping.extendGraphForLambda @@ var "cx" @@ var "l" $
-        "recurse2" <~ ("term" ~> var "recurse" @@ var "cx1" @@ var "term") $
-        var "f" @@ var "recurse2" @@ var "cx1" @@ var "term",
-      _Term_let>>: "l" ~>
-        "cx1" <~ Scoping.extendGraphForLet @@ constant (constant nothing) @@ var "cx" @@ var "l" $
-        "recurse2" <~ ("term" ~> var "recurse" @@ var "cx1" @@ var "term") $
-        var "f" @@ var "recurse2" @@ var "cx1" @@ var "term",
-      _Term_typeLambda>>: "tl" ~>
-        "cx1" <~ Scoping.extendGraphForTypeLambda @@ var "cx" @@ var "tl" $
-        "recurse2" <~ ("term" ~> var "recurse" @@ var "cx1" @@ var "term") $
-        var "f" @@ var "recurse2" @@ var "cx1" @@ var "term"]) $
-  "rewrite" <~ ("cx" ~> "term" ~> var "f2" @@ (var "rewrite") @@ var "cx" @@ var "term") $
-  var "rewrite" @@ var "cx0" @@ var "term0"
-
-foldTermWithGraphAndPath :: TTermDefinition (
-  ((a -> Term -> a) -> [SubtermStep] -> Graph -> a -> Term -> a)
-  -> Graph -> a -> Term -> a)
-foldTermWithGraphAndPath = define "foldTermWithGraphAndPath" $
-  doc ("Fold over a term to produce a value, with both Graph and accessor path tracked."
-    <> " Like rewriteAndFoldTermWithGraphAndPath, but only folds without rewriting."
-    <> " The Graph is automatically updated when descending into lambdas, lets, and type lambdas.") $
-  "f" ~> "cx0" ~> "val0" ~> "term0" ~>
-  -- Wrap the user's fold function to also return the original term unchanged
-  "wrapper" <~ ("recurse" ~> "path" ~> "cx" ~> "val" ~> "term" ~>
-    "recurseForUser" <~ ("valIn" ~> "subterm" ~>
-      "r" <~ var "recurse" @@ var "valIn" @@ var "subterm" $
-      Pairs.first $ var "r") $
-    pair (var "f" @@ var "recurseForUser" @@ var "path" @@ var "cx" @@ var "val" @@ var "term") (var "term")) $
-  "result" <~ rewriteAndFoldTermWithGraphAndPath @@ var "wrapper" @@ var "cx0" @@ var "val0" @@ var "term0" $
-  Pairs.first $ var "result"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Scoping.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Scoping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Scoping.hs
+++ /dev/null
@@ -1,206 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Scoping where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  extendGraphForLambda,
-  extendGraphForLet,
-  extendGraphForTypeLambda,
-  extendGraphWithBindings,
-  fTypeToTypeScheme,
-  typeSchemeToFType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths        as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Sorting as Sorting
-
-
-ns :: Namespace
-ns = Namespace "hydra.scoping"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Graph context extension and type scheme conversion")}
-  where
-   definitions = [
-     toDefinition extendGraphForLambda,
-     toDefinition extendGraphForLet,
-     toDefinition extendGraphForTypeLambda,
-     toDefinition extendGraphWithBindings,
-     toDefinition fTypeToTypeScheme,
-     toDefinition typeSchemeToFType]
-
-fTypeToTypeScheme :: TTermDefinition (Type -> TypeScheme)
-fTypeToTypeScheme = define "fTypeToTypeScheme" $
-  doc "Convert a forall type to a type scheme" $
-  "typ" ~>
-  "stripAnnotations" <~ ("t" ~> cases _Type (var "t")
-    (Just $ var "t") [
-    _Type_annotated>>: "at" ~> var "stripAnnotations" @@ (Core.annotatedTypeBody $ var "at")]) $
-  "gatherForall" <~ ("vars" ~> "typ" ~> cases _Type (var "stripAnnotations" @@ var "typ")
-     (Just $ Core.typeScheme (Lists.reverse $ var "vars") (var "typ") Phantoms.nothing) [
-     _Type_forall>>: "ft" ~> var "gatherForall" @@
-       (Lists.cons (Core.forallTypeParameter $ var "ft") (var "vars")) @@
-       (Core.forallTypeBody $ var "ft")]) $
-  var "gatherForall" @@ list ([] :: [TTerm Name]) @@ var "typ"
-
-typeSchemeToFType :: TTermDefinition (TypeScheme -> Type)
-typeSchemeToFType = define "typeSchemeToFType" $
-  doc "Convert a type scheme to a forall type" $
-  "ts" ~>
-  "vars" <~ Core.typeSchemeVariables (var "ts") $
-  "body" <~ Core.typeSchemeBody (var "ts") $
-  Lists.foldl
-    ("t" ~> "v" ~> Core.typeForall $ Core.forallType (var "v") (var "t"))
-    (var "body")
-    (Lists.reverse $ var "vars")
-
-extendGraphForLambda :: TTermDefinition (Graph -> Lambda -> Graph)
-extendGraphForLambda = define "extendGraphForLambda" $
-  doc "Extend a graph by descending into a lambda body" $
-  "g" ~> "lam" ~>
-  "var" <~ Core.lambdaParameter (var "lam") $
-  Graph.graph
-    (Graph.graphBoundTerms $ var "g")
-    (optCases (Core.lambdaDomain $ var "lam")
-      (Graph.graphBoundTypes $ var "g")
-      ("dom" ~> Maps.insert (var "var") (fTypeToTypeScheme @@ var "dom") $ Graph.graphBoundTypes $ var "g"))
-    (Graph.graphClassConstraints $ var "g")
-    (Sets.insert (var "var") $ Graph.graphLambdaVariables $ var "g")
-    (Maps.delete (var "var") $ Graph.graphMetadata $ var "g")
-    (Graph.graphPrimitives $ var "g")
-    (Graph.graphSchemaTypes $ var "g")
-    (Graph.graphTypeVariables $ var "g")
-
-extendGraphForLet :: TTermDefinition ((Graph -> Binding -> Maybe Term) -> Graph -> Let -> Graph)
-extendGraphForLet = define "extendGraphForLet" $
-  doc "Extend a graph by descending into a let body" $
-  "forBinding" ~> "g" ~> "letrec" ~>
-  "bindings" <~ Core.letBindings (var "letrec") $
-  -- Pre-extend graph with sibling bindings so forBinding can resolve them
-  "g2" <~ (extendGraphWithBindings @@ var "bindings" @@ var "g") $
-  Graph.graph
-    -- Add all binding terms
-    (Maps.union
-      (Maps.fromList $ Lists.map ("b" ~> pair (Core.bindingName $ var "b") (Core.bindingTerm $ var "b")) (var "bindings"))
-      (Graph.graphBoundTerms $ var "g"))
-    -- Add typed binding type schemes; untyped bindings are not added, so outer types are shadowed by union precedence
-    (Maps.union
-      (Maps.fromList $ Maybes.cat $ Lists.map
-        ("b" ~> Maybes.map ("ts" ~> pair (Core.bindingName $ var "b") (var "ts"))
-          (Core.bindingTypeScheme $ var "b"))
-        (var "bindings"))
-      (Graph.graphBoundTypes $ var "g"))
-    (Graph.graphClassConstraints $ var "g")
-    -- Remove all binding names from lambda variables; they are shadowed
-    (Lists.foldl ("s" ~> "b" ~> Sets.delete (Core.bindingName $ var "b") (var "s"))
-      (Graph.graphLambdaVariables $ var "g")
-      (var "bindings"))
-    -- Update metadata per binding, accumulating a full graph so each binding sees earlier siblings' metadata
-    (Graph.graphMetadata $ Lists.foldl
-      ("gAcc" ~> "b" ~>
-        "m" <~ (Graph.graphMetadata $ var "gAcc") $
-        "newMeta" <~ (optCases (var "forBinding" @@ var "gAcc" @@ var "b")
-          (Maps.delete (Core.bindingName $ var "b") (var "m"))
-          ("t" ~> Maps.insert (Core.bindingName $ var "b") (var "t") (var "m"))) $
-        Graph.graph
-          (Graph.graphBoundTerms $ var "gAcc")
-          (Graph.graphBoundTypes $ var "gAcc")
-          (Graph.graphClassConstraints $ var "gAcc")
-          (Graph.graphLambdaVariables $ var "gAcc")
-          (var "newMeta")
-          (Graph.graphPrimitives $ var "gAcc")
-          (Graph.graphSchemaTypes $ var "gAcc")
-          (Graph.graphTypeVariables $ var "gAcc"))
-      (var "g2")
-      (var "bindings"))
-    (Graph.graphPrimitives $ var "g")
-    (Graph.graphSchemaTypes $ var "g")
-    (Graph.graphTypeVariables $ var "g")
-
-extendGraphForTypeLambda :: TTermDefinition (Graph -> TypeLambda -> Graph)
-extendGraphForTypeLambda = define "extendGraphForTypeLambda" $
-  doc "Extend a graph by descending into a type lambda body" $
-  "g" ~> "tlam" ~>
-  "name" <~ Core.typeLambdaParameter (var "tlam") $
-  Graph.graph
-    (Graph.graphBoundTerms $ var "g")
-    (Graph.graphBoundTypes $ var "g")
-    (Graph.graphClassConstraints $ var "g")
-    (Graph.graphLambdaVariables $ var "g")
-    (Graph.graphMetadata $ var "g")
-    (Graph.graphPrimitives $ var "g")
-    (Graph.graphSchemaTypes $ var "g")
-    (Sets.insert (var "name") $ Graph.graphTypeVariables $ var "g")
-
-extendGraphWithBindings :: TTermDefinition ([Binding] -> Graph -> Graph)
-extendGraphWithBindings = define "extendGraphWithBindings" $
-  doc "Add bindings to an existing graph" $
-  "bindings" ~> "g" ~>
-  -- Merge new binding terms/types into existing graph
-  "newTerms" <~ Maps.fromList (Lists.map ("b" ~>
-    pair (Core.bindingName (var "b")) (Core.bindingTerm (var "b"))) (var "bindings")) $
-  "newTypes" <~ Maps.fromList (Maybes.cat (Lists.map ("b" ~>
-    Maybes.map ("ts" ~> pair (Core.bindingName (var "b")) (var "ts"))
-      (Core.bindingTypeScheme (var "b"))) (var "bindings"))) $
-  Graph.graph
-    (Maps.union (var "newTerms") (Graph.graphBoundTerms (var "g")))
-    (Maps.union (var "newTypes") (Graph.graphBoundTypes (var "g")))
-    (Graph.graphClassConstraints (var "g"))
-    (Graph.graphLambdaVariables (var "g"))
-    (Graph.graphMetadata (var "g"))
-    (Graph.graphPrimitives (var "g"))
-    (Graph.graphSchemaTypes (var "g"))
-    (Graph.graphTypeVariables (var "g"))
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Serialization.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Serialization.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Serialization.hs
+++ /dev/null
@@ -1,741 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Serialization where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  angleBraces, angleBracesList, braces, bracesList, brackets, bracketsList, bracesListAdaptive,
-  bracketList, bracketListAdaptive, cat, commaSep, cst, curlyBlock, curlyBraces, curlyBracesList,
-  customIndent, customIndentBlock, dotSep, doubleNewlineSep, doubleQuoted, doubleSpace,
-  expressionLength, fullBlockStyle, fullName, halfBlockStyle, halfIndent, ifx, indent, indentBlock,
-  indentLines, indentSubsequentLines, infixWs, infixWsList, inlineStyle, newline, newlineSep, noSep,
-  noPad, noPadding, num, op, orOp, orSep, parenList, parens, parensList, parentheses, parenthesize,
-  prefix, printExpr, printGraph, semicolonSep, sep, singleQuoted, space, spaceSep, squareBrackets,
-  structuralSep, structuralSpaceSep,
-  suffix, sym, symbolSep, tabIndent, tabIndentDoubleSpace, tabIndentSingleSpace, unsupportedType,
-  unsupportedVariant, withComma, withSemi)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import Hydra.Ast
-
-
-ns :: Namespace
-ns = Namespace "hydra.serialization"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Utilities for constructing generic program code ASTs, used for the serialization phase of source code generation.")}
-  where
-   definitions = [
-     toDefinition angleBraces,
-     toDefinition angleBracesList,
-     toDefinition bracesListAdaptive,
-     toDefinition bracketList,
-     toDefinition bracketListAdaptive,
-     toDefinition brackets,
-     toDefinition commaSep,
-     toDefinition curlyBlock,
-     toDefinition curlyBraces,
-     toDefinition curlyBracesList,
-     toDefinition cst,
-     toDefinition customIndent,
-     toDefinition customIndentBlock,
-     toDefinition dotSep,
-     toDefinition doubleNewlineSep,
-     toDefinition doubleSpace,
-     toDefinition expressionLength,
-     toDefinition fullBlockStyle,
-     toDefinition halfBlockStyle,
-     toDefinition ifx,
-     toDefinition indent,
-     toDefinition indentBlock,
-     toDefinition indentSubsequentLines,
-     toDefinition infixWs,
-     toDefinition infixWsList,
-     toDefinition inlineStyle,
-     toDefinition newlineSep,
-     toDefinition noPadding,
-     toDefinition noSep,
-     toDefinition num,
-     toDefinition op,
-     toDefinition orOp,
-     toDefinition orSep,
-     toDefinition parenList,
-     toDefinition parens,
-     toDefinition parentheses,
-     toDefinition parenthesize,
-     toDefinition prefix,
-     toDefinition printExpr,
-     toDefinition semicolonSep,
-     toDefinition sep,
-     toDefinition spaceSep,
-     toDefinition structuralSep,
-     toDefinition structuralSpaceSep,
-     toDefinition squareBrackets,
-     toDefinition suffix,
-     toDefinition sym,
-     toDefinition symbolSep,
-     toDefinition tabIndent,
-     toDefinition tabIndentDoubleSpace,
-     toDefinition tabIndentSingleSpace,
-     toDefinition unsupportedType,
-     toDefinition unsupportedVariant,
-     toDefinition withComma,
-     toDefinition withSemi]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-angleBraces :: TTermDefinition Brackets
-angleBraces = define "angleBraces" $
-  Ast.brackets (Ast.symbol (string "<")) (Ast.symbol (string ">"))
-
-angleBracesList :: TTermDefinition (BlockStyle -> [Expr] -> Expr)
-angleBracesList = define "angleBracesList" $
-  "style" ~> "els" ~>
-    Logic.ifElse (Lists.null $ var "els")
-      (cst @@ string "<>")
-      (brackets @@ angleBraces @@ var "style" @@ (commaSep @@ var "style" @@ var "els"))
-
-bracesListAdaptive :: TTermDefinition ([Expr] -> Expr)
-bracesListAdaptive = define "bracesListAdaptive" $
-  doc "Produce a bracketed list which separates elements by spaces or newlines depending on the estimated width of the expression." $
-  "els" ~>
-  "inlineList" <~ curlyBracesList @@ nothing @@ inlineStyle @@ var "els" $
-  Logic.ifElse (Equality.gt (expressionLength @@ var "inlineList") (int32 70))
-    (curlyBracesList @@ nothing @@ halfBlockStyle @@ var "els")
-    (var "inlineList")
-
-bracketListAdaptive :: TTermDefinition ([Expr] -> Expr)
-bracketListAdaptive = define "bracketListAdaptive" $
-  doc "Produce a bracketed list which separates elements by spaces or newlines depending on the estimated width of the expression." $
-  "els" ~>
-  "inlineList" <~ bracketList @@ inlineStyle @@ var "els" $
-  Logic.ifElse (Equality.gt (expressionLength @@ var "inlineList") (int32 70))
-    (bracketList @@ halfBlockStyle @@ var "els")
-    (var "inlineList")
-
-bracketList :: TTermDefinition (BlockStyle -> [Expr] -> Expr)
-bracketList = define "bracketList" $
-  "style" ~> "els" ~>
-    Logic.ifElse (Lists.null $ var "els")
-      (cst @@ string "[]")
-      (brackets @@ squareBrackets @@ var "style" @@ (commaSep @@ var "style" @@ var "els"))
-
-brackets :: TTermDefinition (Brackets -> BlockStyle -> Expr -> Expr)
-brackets = define "brackets" $
-  "br" ~> "style" ~> "e" ~>
-    Ast.exprBrackets $ Ast.bracketExpr (var "br") (var "e") (var "style")
-
-commaSep :: TTermDefinition (BlockStyle -> [Expr] -> Expr)
-commaSep = define "commaSep" $
-  symbolSep @@ string ","
-
-cst :: TTermDefinition (String -> Expr)
-cst = define "cst" $
-  "s" ~> Ast.exprConst $ sym @@ var "s"
-
-curlyBlock :: TTermDefinition (BlockStyle -> Expr -> Expr)
-curlyBlock = define "curlyBlock" $
-  "style" ~> "e" ~>
-    curlyBracesList @@ nothing @@ var "style" @@ (list [var "e"])
-
-curlyBraces :: TTermDefinition Brackets
-curlyBraces = define "curlyBraces" $
-  Ast.brackets (Ast.symbol (string "{")) (Ast.symbol (string "}"))
-
-curlyBracesList :: TTermDefinition (Maybe String -> BlockStyle -> [Expr] -> Expr)
-curlyBracesList = define "curlyBracesList" $
-  "msymb" ~> "style" ~> "els" ~>
-    Logic.ifElse (Lists.null $ var "els")
-      (cst @@ string "{}")
-      (brackets @@ curlyBraces @@ var "style" @@
-        (symbolSep @@ (Maybes.fromMaybe (string ",") (var "msymb")) @@ var "style" @@ var "els"))
-
-customIndentBlock :: TTermDefinition (String -> [Expr] -> Expr)
-customIndentBlock = define "customIndentBlock" $
-  "idt" ~> "els" ~>
-    "idtOp" <~ (Ast.op
-      (sym @@ string "")
-      (Ast.padding Ast.wsSpace (Ast.wsBreakAndIndent $ var "idt"))
-      (Ast.precedence $ int32 0)
-      Ast.associativityNone) $
-    Maybes.maybe (cst @@ string "")
-      ("head" ~> Logic.ifElse (Equality.equal (Lists.length $ var "els") (int32 1))
-        (var "head")
-        (ifx @@ var "idtOp" @@ var "head" @@ (newlineSep @@ Lists.drop (int32 1) (var "els"))))
-      (Lists.maybeHead $ var "els")
-
-customIndent :: TTermDefinition (String -> String -> String)
-customIndent = define "customIndent" $
-  doc ("Indent every non-empty line of `s` by `idt`. Empty lines stay empty"
-    <> " (no trailing whitespace) so downstream byte-identity checks don't"
-    <> " care about indent depth.") $
-  "idt" ~> "s" ~> Strings.cat $
-    Lists.intersperse (string "\n") $
-      Lists.map ("line" ~>
-        Logic.ifElse (Equality.equal (var "line") (string "")) (var "line") (var "idt" ++ var "line")) $
-      Strings.lines $ var "s"
-
-dotSep :: TTermDefinition ([Expr] -> Expr)
-dotSep = define "dotSep" $
-  sep @@ (Ast.op
-    (sym @@ string ".")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone)
-
-doubleNewlineSep :: TTermDefinition ([Expr] -> Expr)
-doubleNewlineSep = define "doubleNewlineSep" $
-  sep @@ (Ast.op
-    (sym @@ string "")
-    (Ast.padding Ast.wsBreak Ast.wsBreak)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone)
-
-doubleSpace :: TTermDefinition String
-doubleSpace = define "doubleSpace" $
-  string "  "
-
-expressionLength :: TTermDefinition (Expr -> Int)
-expressionLength = define "expressionLength" $
-  doc "Find the approximate length (number of characters, including spaces and newlines) of an expression without actually printing it." $
-  "e" ~>
-  "symbolLength" <~ ("s" ~> Strings.length $ Ast.unSymbol $ var "s") $
-  "wsLength" <~ ("ws" ~> cases _Ws (var "ws") Nothing [
-    _Ws_none>>: constant $ int32 0,
-    _Ws_space>>: constant $ int32 1,
-    _Ws_break>>: constant $ int32 10000,
-    _Ws_breakAndIndent>>: "s" ~> int32 10000,
-    _Ws_doubleBreak>>: constant $ int32 10000]) $
-  "blockStyleLength" <~ ("style" ~>
-    "mindentLen" <~ Maybes.maybe (int32 0) (unaryFunction Strings.length) (Ast.blockStyleIndent $ var "style") $
-    "nlBeforeLen" <~ Logic.ifElse (Ast.blockStyleNewlineBeforeContent $ var "style") (int32 1) (int32 0) $
-    "nlAfterLen" <~ Logic.ifElse (Ast.blockStyleNewlineAfterContent $ var "style") (int32 1) (int32 0) $
-    Math.add (var "mindentLen") $ Math.add (var "nlBeforeLen") (var "nlAfterLen")) $
-  "bracketsLength" <~ ("brackets" ~>
-    Math.add
-      (var "symbolLength" @@ (Ast.bracketsOpen $ var "brackets"))
-      (var "symbolLength" @@ (Ast.bracketsClose $ var "brackets"))) $
-  "bracketExprLength" <~ ("be" ~>
-    Math.add
-      (var "bracketsLength" @@ (Ast.bracketExprBrackets $ var "be"))
-      (Math.add
-        (expressionLength @@ (Ast.bracketExprEnclosed $ var "be"))
-        (var "blockStyleLength" @@ (Ast.bracketExprStyle $ var "be")))) $
-  "indentedExpressionLength" <~ ("ie" ~>
-    "baseLen" <~ expressionLength @@ (Ast.indentedExpressionExpr $ var "ie") $
-    "indentLen" <~ cases _IndentStyle (Ast.indentedExpressionStyle $ var "ie") Nothing [
-      _IndentStyle_allLines>>: "s" ~> Strings.length $ var "s",
-      _IndentStyle_subsequentLines>>: "s" ~> Strings.length $ var "s"] $
-    Math.add (var "baseLen") (var "indentLen")) $
-  "opLength" <~ ("op" ~>
-    "symLen" <~ var "symbolLength" @@ (Ast.opSymbol $ var "op") $
-    "padding" <~ Ast.opPadding (var "op") $
-    "leftLen" <~ var "wsLength" @@ (Ast.paddingLeft $ var "padding") $
-    "rightLen" <~ var "wsLength" @@ (Ast.paddingRight $ var "padding") $
-    Math.add (var "symLen") $ Math.add (var "leftLen") (var "rightLen")) $
-  "opExprLength" <~ ("oe" ~>
-    "opLen" <~ var "opLength" @@ (Ast.opExprOp $ var "oe") $
-    "leftLen" <~ expressionLength @@ (Ast.opExprLhs $ var "oe") $
-    "rightLen" <~ expressionLength @@ (Ast.opExprRhs $ var "oe") $
-    Math.add (var "opLen") $ Math.add (var "leftLen") (var "rightLen")) $
-  "seqExprLength" <~ ("se" ~>
-    "sopLen" <~ var "opLength" @@ (Ast.seqExprOp $ var "se") $
-    "elementLens" <~ Lists.map (expressionLength) (Ast.seqExprElements $ var "se") $
-    "totalElLen" <~ Lists.foldl (binaryFunction Math.add) (int32 0) (var "elementLens") $
-    "numSeps" <~ Math.sub (Lists.length $ Ast.seqExprElements $ var "se") (int32 1) $
-    Math.add (var "totalElLen") (Math.mul (var "sopLen") (Logic.ifElse (Equality.gt (var "numSeps") (int32 0)) (var "numSeps") (int32 0)))) $
-  cases _Expr (var "e") Nothing [
-    _Expr_const>>: "s" ~> var "symbolLength" @@ var "s",
-    _Expr_indent>>: "ie" ~> var "indentedExpressionLength" @@ var "ie",
-    _Expr_op>>: "oe" ~> var "opExprLength" @@ var "oe",
-    _Expr_brackets>>: "be" ~> var "bracketExprLength" @@ var "be",
-    _Expr_seq>>: "se" ~> var "seqExprLength" @@ var "se"]
-
-fullBlockStyle :: TTermDefinition BlockStyle
-fullBlockStyle = define "fullBlockStyle" $
-  Ast.blockStyle (just doubleSpace) true true
-
-halfBlockStyle :: TTermDefinition BlockStyle
-halfBlockStyle = define "halfBlockStyle" $
-  Ast.blockStyle (just doubleSpace) true false
-
-ifx :: TTermDefinition (Op -> Expr -> Expr -> Expr)
-ifx = define "ifx" $
-  "op" ~> "lhs" ~> "rhs" ~>
-    Ast.exprOp $ Ast.opExpr (var "op") (var "lhs") (var "rhs")
-
-indentBlock :: TTermDefinition ([Expr] -> Expr)
-indentBlock = define "indentBlock" $
-  customIndentBlock @@ doubleSpace
-
-indent :: TTermDefinition (String -> String)
-indent = define "indent" $
-  customIndent @@ doubleSpace
-
-indentSubsequentLines :: TTermDefinition (String -> Expr -> Expr)
-indentSubsequentLines = define "indentSubsequentLines" $
-  "idt" ~> "e" ~>
-    Ast.exprIndent $ Ast.indentedExpression (Ast.indentStyleSubsequentLines $ var "idt") (var "e")
-
-infixWs :: TTermDefinition (String -> Expr -> Expr -> Expr)
-infixWs = define "infixWs" $
-  "op" ~> "l" ~> "r" ~>
-    spaceSep @@ list [var "l", cst @@ var "op", var "r"]
-
-infixWsList :: TTermDefinition (String -> [Expr] -> Expr)
-infixWsList = define "infixWsList" $
-  "op" ~> "opers" ~>
-  "opExpr" <~ cst @@ var "op" $
-  "foldFun" <~ ("e" ~> "r" ~>
-    Logic.ifElse (Lists.null $ var "e")
-      (list [var "r"])
-      (Lists.cons (var "r") $ Lists.cons (var "opExpr") (var "e"))) $
-  spaceSep @@ (Lists.foldl (var "foldFun") (list ([] :: [TTerm Expr])) $ Lists.reverse $ var "opers")
-
-inlineStyle :: TTermDefinition BlockStyle
-inlineStyle = define "inlineStyle" $
-  Ast.blockStyle nothing false false
-
-newlineSep :: TTermDefinition ([Expr] -> Expr)
-newlineSep = define "newlineSep" $
-  sep @@ (Ast.op
-    (sym @@ string "")
-    (Ast.padding Ast.wsNone Ast.wsBreak)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone)
-
-noPadding :: TTermDefinition Padding
-noPadding = define "noPadding" $
-  Ast.padding Ast.wsNone Ast.wsNone
-
-noSep :: TTermDefinition ([Expr] -> Expr)
-noSep = define "noSep" $
-  sep @@ (Ast.op
-    (sym @@ string "")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone)
-
-num :: TTermDefinition (Int -> Expr)
-num = define "num" $
-  "i" ~> cst @@ (Literals.showInt32 $ var "i")
-
-op :: TTermDefinition (String -> Int -> Associativity -> Op)
-op = define "op" $
-  "s" ~> "p" ~> "assoc" ~>
-    Ast.op
-      (sym @@ var "s")
-      (Ast.padding Ast.wsSpace Ast.wsSpace)
-      (Ast.precedence $ var "p")
-      (var "assoc")
-
-orOp :: TTermDefinition (Bool -> Op)
-orOp = define "orOp" $
-  "newlines" ~> Ast.op
-    (sym @@ string "|")
-    (Ast.padding Ast.wsSpace (Logic.ifElse (var "newlines") Ast.wsBreak Ast.wsSpace))
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone
-
-orSep :: TTermDefinition (BlockStyle -> [Expr] -> Expr)
-orSep = define "orSep" $
-  "style" ~> "l" ~>
-    "newlines" <~ Ast.blockStyleNewlineBeforeContent (var "style") $
-    Maybes.maybe (cst @@ string "")
-      ("h" ~> Lists.foldl ("acc" ~> "el" ~> ifx @@ (orOp @@ var "newlines") @@ var "acc" @@ var "el") (var "h") (Lists.drop (int32 1) (var "l")))
-      (Lists.maybeHead $ var "l")
-
-parenList :: TTermDefinition (Bool -> [Expr] -> Expr)
-parenList = define "parenList" $
-  "newlines" ~> "els" ~>
-    "style" <~ (Logic.ifElse (Logic.and (var "newlines") (Equality.gt (Lists.length $ var "els") (int32 1)))
-      (halfBlockStyle)
-      (inlineStyle)) $
-    Logic.ifElse (Lists.null $ var "els")
-      (cst @@ string "()")
-      (brackets @@ parentheses @@ var "style" @@ (commaSep @@ var "style" @@ var "els"))
-
-parens :: TTermDefinition (Expr -> Expr)
-parens = define "parens" $
-  brackets @@ parentheses @@ inlineStyle
-
-parentheses :: TTermDefinition Brackets
-parentheses = define "parentheses" $
-  Ast.brackets (Ast.symbol (string "(")) (Ast.symbol (string ")"))
-
-parenthesize :: TTermDefinition (Expr -> Expr)
-parenthesize = define "parenthesize" $
-  "exp" ~>
-    "assocLeft" <~ ("a" ~> cases _Associativity (var "a")
-      (Just true) [
-      _Associativity_right>>: constant false]) $
-    "assocRight" <~ ("a" ~> cases _Associativity (var "a")
-      (Just true) [
-      _Associativity_left>>: constant false]) $
-    cases _Expr (var "exp") Nothing [
-      _Expr_brackets>>: "bracketExpr" ~>
-        Ast.exprBrackets $ Ast.bracketExpr
-          (Ast.bracketExprBrackets $ var "bracketExpr")
-          (parenthesize @@ (Ast.bracketExprEnclosed $ var "bracketExpr"))
-          (Ast.bracketExprStyle $ var "bracketExpr"),
-      _Expr_const>>: "ignored" ~> var "exp",
-      _Expr_indent>>: "indentExpr" ~>
-        Ast.exprIndent $ Ast.indentedExpression
-          (Ast.indentedExpressionStyle $ var "indentExpr")
-          (parenthesize @@ (Ast.indentedExpressionExpr $ var "indentExpr")),
-      _Expr_seq>>: "seqExpr" ~>
-        Ast.exprSeq $ Ast.seqExpr
-          (Ast.seqExprOp $ var "seqExpr")
-          (Lists.map (parenthesize) (Ast.seqExprElements $ var "seqExpr")),
-      _Expr_op>>: "opExpr" ~>
-        "op" <~ Ast.opExprOp (var "opExpr") $
-        "prec" <~ Ast.unPrecedence (Ast.opPrecedence $ var "op") $
-        "assoc" <~ Ast.opAssociativity (var "op") $
-        "lhs" <~ Ast.opExprLhs (var "opExpr") $
-        "rhs" <~ Ast.opExprRhs (var "opExpr") $
-        "lhs'" <~ parenthesize @@ var "lhs" $
-        "rhs'" <~ parenthesize @@ var "rhs" $
-        "lhs2" <~ cases _Expr (var "lhs'")
-          (Just $ var "lhs'") [
-          _Expr_op>>: "lopExpr" ~>
-            "lop" <~ Ast.opExprOp (var "lopExpr") $
-            "lprec" <~ Ast.unPrecedence (Ast.opPrecedence $ var "lop") $
-            "lassoc" <~ Ast.opAssociativity (var "lop") $
-            "comparison" <~ Equality.compare (var "prec") (var "lprec") $
-            cases _Comparison (var "comparison") Nothing [
-              _Comparison_lessThan>>: constant $ var "lhs'",
-              _Comparison_greaterThan>>: constant (parens @@ var "lhs'"),
-              _Comparison_equalTo>>: constant $ Logic.ifElse
-                (Logic.and (var "assocLeft" @@ var "assoc") (var "assocLeft" @@ var "lassoc"))
-                (var "lhs'")
-                (parens @@ var "lhs'")]] $
-        "rhs2" <~ cases _Expr (var "rhs'") (Just $ var "rhs'") [
-          _Expr_op>>: "ropExpr" ~>
-            "rop" <~ Ast.opExprOp (var "ropExpr") $
-            "rprec" <~ Ast.unPrecedence (Ast.opPrecedence $ var "rop") $
-            "rassoc" <~ Ast.opAssociativity (var "rop") $
-            "comparison" <~ Equality.compare (var "prec") (var "rprec") $
-            cases _Comparison (var "comparison") Nothing [
-              _Comparison_lessThan>>: constant $ var "rhs'",
-              _Comparison_greaterThan>>: constant (parens @@ var "rhs'"),
-              _Comparison_equalTo>>: constant $ Logic.ifElse
-                (Logic.and (var "assocRight" @@ var "assoc") (var "assocRight" @@ var "rassoc"))
-                (var "rhs'")
-                (parens @@ var "rhs'")]] $
-        Ast.exprOp $ Ast.opExpr (var "op") (var "lhs2") (var "rhs2")]
-
-prefix :: TTermDefinition (String -> Expr -> Expr)
-prefix = define "prefix" $
-  "p" ~> "expr" ~>
-  "preOp" <~ Ast.op
-    (sym @@ var "p")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone $
-  ifx @@ var "preOp" @@ (cst @@ string "") @@ var "expr"
-
-printExpr :: TTermDefinition (Expr -> String)
-printExpr = define "printExpr" $
-  "e" ~>
-  "pad" <~ ("ws" ~> cases _Ws (var "ws") Nothing [
-    _Ws_none>>: constant $ string "",
-    _Ws_space>>: constant $ string " ",
-    _Ws_break>>: constant $ string "\n",
-    _Ws_breakAndIndent>>: "ignored" ~> string "\n",
-    _Ws_doubleBreak>>: constant $ string "\n\n"]) $
-  "idt" <~ ("ws" ~> "s" ~> cases _Ws (var "ws") (Just $ var "s") [
-    _Ws_breakAndIndent>>: "indentStr" ~> customIndent @@ var "indentStr" @@ var "s"]) $
-  cases _Expr (var "e") Nothing [
-    _Expr_const>>: "symbol" ~> Ast.unSymbol $ var "symbol",
-    _Expr_indent>>: "indentExpr" ~>
-      "style" <~ Ast.indentedExpressionStyle (var "indentExpr") $
-      "expr" <~ Ast.indentedExpressionExpr (var "indentExpr") $
-      "lns" <~ Strings.lines (printExpr @@ var "expr") $
-      -- Indent prefix is applied only to non-empty lines; otherwise
-      -- empty lines pick up trailing whitespace and downstream tools
-      -- (host writers, byte-identity comparisons in the bootstrap
-      -- demo) have to strip it post-hoc.
-      "indentLine" <~ ("idt" ~> "line" ~>
-        Logic.ifElse (Equality.equal (var "line") (string "")) (var "line") (var "idt" ++ var "line")) $
-      "ilns" <~ cases _IndentStyle (var "style") Nothing [
-        _IndentStyle_allLines>>: "idt" ~> Lists.map (var "indentLine" @@ var "idt") (var "lns"),
-        _IndentStyle_subsequentLines>>: "idt" ~>
-          Logic.ifElse (Equality.equal (Lists.length $ var "lns") (int32 1))
-            (var "lns")
-            (Maybes.fromMaybe (var "lns") $
-              Maybes.map
-                ("uc" ~> Lists.cons (Pairs.first $ var "uc") $
-                  Lists.map (var "indentLine" @@ var "idt") (Pairs.second $ var "uc"))
-                (Lists.uncons $ var "lns"))] $
-      Strings.intercalate (string "\n") (var "ilns"),
-    _Expr_seq>>: "seqExpr" ~>
-      "sop" <~ Ast.seqExprOp (var "seqExpr") $
-      "ssym" <~ Ast.unSymbol (Ast.opSymbol $ var "sop") $
-      "spadding" <~ Ast.opPadding (var "sop") $
-      "spadl" <~ Ast.paddingLeft (var "spadding") $
-      "spadr" <~ Ast.paddingRight (var "spadding") $
-      "selements" <~ Ast.seqExprElements (var "seqExpr") $
-      "printedElements" <~ Lists.map ("el" ~> var "idt" @@ var "spadr" @@ (printExpr @@ var "el")) (var "selements") $
-      -- Trailing-whitespace defense: when stitching elements with the
-      -- separator `pad(spadl) ++ ssym ++ pad(spadr)`, whitespace in
-      -- the separator can dangle before/after a newline if an element
-      -- starts with `\n`. Result: "prev \nel" or "prev<sym> \nel".
-      --
-      -- Fix: build the joined string element-by-element. For each
-      -- element after the head, if it starts with `\n` then suppress
-      -- the whitespace parts of the separator (only the symbol stays).
-      "isNewlineWs" <~ ("ws" ~> cases _Ws (var "ws") (Just $ boolean False) [
-        _Ws_break>>: constant true,
-        _Ws_breakAndIndent>>: constant true,
-        _Ws_doubleBreak>>: constant true]) $
-      "spadlIsNewline" <~ var "isNewlineWs" @@ var "spadl" $
-      "spadrIsNewline" <~ var "isNewlineWs" @@ var "spadr" $
-      "joinElements" <~ ("acc" ~> "el" ~>
-        "elStartsWithNewline" <~ Maybes.maybe
-          (boolean False)
-          ("c" ~> Equality.equal (var "c") (int32 10))
-          (Strings.maybeCharAt (int32 0) (var "el")) $
-        "elIsEmpty" <~ Equality.equal (var "el") (string "") $
-        -- Suppress whitespace padding when the next element either
-        -- starts with `\n` (whitespace would dangle on previous line)
-        -- or is empty (whitespace would be at end of output unattached
-        -- to anything). Symbol stays in either case.
-        "padlEff" <~ Logic.ifElse
-          (Logic.or
-            (Logic.and (var "elStartsWithNewline") (Logic.not $ var "spadlIsNewline"))
-            (Logic.and (var "elIsEmpty") (Equality.equal (var "ssym") (string ""))))
-          (string "")
-          (var "pad" @@ var "spadl") $
-        "padrEff" <~ Logic.ifElse
-          (Logic.or
-            (Logic.and (var "elStartsWithNewline") (Logic.not $ var "spadrIsNewline"))
-            (Logic.and (var "elIsEmpty") (Equality.equal (var "ssym") (string ""))))
-          (string "")
-          (var "pad" @@ var "spadr") $
-        Strings.cat $ list [var "acc", var "padlEff", var "ssym", var "padrEff", var "el"]) $
-      Maybes.maybe
-        (string "")
-        ("h" ~> Lists.foldl (var "joinElements") (var "h") (Lists.drop (int32 1) (var "printedElements")))
-        (Lists.maybeHead $ var "printedElements"),
-    _Expr_op>>: "opExpr" ~>
-      "op" <~ Ast.opExprOp (var "opExpr") $
-      "sym" <~ Ast.unSymbol (Ast.opSymbol $ var "op") $
-      "padding" <~ Ast.opPadding (var "op") $
-      "padl" <~ Ast.paddingLeft (var "padding") $
-      "padr" <~ Ast.paddingRight (var "padding") $
-      "l" <~ Ast.opExprLhs (var "opExpr") $
-      "r" <~ Ast.opExprRhs (var "opExpr") $
-      "lhs" <~ var "idt" @@ var "padl" @@ (printExpr @@ var "l") $
-      "rhs" <~ var "idt" @@ var "padr" @@ (printExpr @@ var "r") $
-      -- Two trailing-whitespace defenses around the inner separator:
-      --
-      -- 1. When sym is empty AND padr is one of the newline-emitting Ws
-      --    values, padl whitespace would land at the end of a line
-      --    (lhs + " " + "" + "\n" + rhs → "code \nrhs"). Suppress padl.
-      --
-      -- 2. When padr's pad string would land before a leading newline in
-      --    rhs (rhs starts with \n because the inner expression breaks),
-      --    drop padr's pad. Without this, "lhs sym <space>\nrhs" emits
-      --    a trailing space on the sym's line.
-      --
-      -- Newline-emitting Ws values are WsBreak, WsBreakAndIndent, and
-      -- WsDoubleBreak.
-      "padrIsNewline" <~ cases _Ws (var "padr") (Just $ boolean False) [
-        _Ws_break>>: constant true,
-        _Ws_breakAndIndent>>: constant true,
-        _Ws_doubleBreak>>: constant true] $
-      -- Suppress padl whitespace when:
-      --  (a) sym is empty AND padr is a newline (lhs's trailing space
-      --      would land at end of previous line), OR
-      --  (b) sym is empty AND rhs is empty (the entire trailing
-      --      separator is just whitespace with nothing after).
-      "padlEffective" <~ Logic.ifElse
-        (Logic.and (Equality.equal (var "sym") (string ""))
-                   (Logic.or (var "padrIsNewline")
-                             (Equality.equal (var "rhs") (string ""))))
-        (string "")
-        (var "pad" @@ var "padl") $
-      "padrPad" <~ (var "pad" @@ var "padr") $
-      "rhsStartsWithNewline" <~ Maybes.maybe
-        (boolean False)
-        ("c" ~> Equality.equal (var "c") (int32 10))
-        (Strings.maybeCharAt (int32 0) (var "rhs")) $
-      "padrEffective" <~ Logic.ifElse
-        (Logic.and (var "rhsStartsWithNewline")
-                   (Logic.not $ var "padrIsNewline"))
-        (string "")
-        (var "padrPad") $
-      var "lhs" ++ var "padlEffective" ++ var "sym" ++ var "padrEffective" ++ var "rhs",
-    _Expr_brackets>>: "bracketExpr" ~>
-      "brs" <~ Ast.bracketExprBrackets (var "bracketExpr") $
-      "l" <~ Ast.unSymbol (Ast.bracketsOpen $ var "brs") $
-      "r" <~ Ast.unSymbol (Ast.bracketsClose $ var "brs") $
-      "e" <~ Ast.bracketExprEnclosed (var "bracketExpr") $
-      "style" <~ Ast.bracketExprStyle (var "bracketExpr") $
-      "body" <~ printExpr @@ var "e" $
-      "doIndent" <~ Ast.blockStyleIndent (var "style") $
-      "nlBefore" <~ Ast.blockStyleNewlineBeforeContent (var "style") $
-      "nlAfter" <~ Ast.blockStyleNewlineAfterContent (var "style") $
-      "ibody" <~ Maybes.maybe (var "body") ("idt" ~> customIndent @@ var "idt" @@ var "body") (var "doIndent") $
-      "pre" <~ Logic.ifElse (var "nlBefore") (string "\n") (string "") $
-      "suf" <~ Logic.ifElse (var "nlAfter") (string "\n") (string "") $
-      var "l" ++ var "pre" ++ var "ibody" ++ var "suf" ++ var "r"]
-
-semicolonSep :: TTermDefinition ([Expr] -> Expr)
-semicolonSep = define "semicolonSep" $
-  symbolSep @@ string ";" @@ inlineStyle
-
-sep :: TTermDefinition (Op -> [Expr] -> Expr)
-sep = define "sep" $
-  "op" ~> "els" ~>
-    Maybes.maybe (cst @@ string "")
-      ("h" ~> Lists.foldl ("acc" ~> "el" ~> ifx @@ var "op" @@ var "acc" @@ var "el") (var "h") (Lists.drop (int32 1) (var "els")))
-      (Lists.maybeHead $ var "els")
-
-spaceSep :: TTermDefinition ([Expr] -> Expr)
-spaceSep = define "spaceSep" $
-  sep @@ (Ast.op
-    (sym @@ string "")
-    (Ast.padding Ast.wsSpace Ast.wsNone)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone)
-
-structuralSep :: TTermDefinition (Op -> [Expr] -> Expr)
-structuralSep = define "structuralSep" $
-  doc "Like sep, but produces a SeqExpr instead of an OpExpr chain. SeqExpr is treated as structural layout and is not subject to parenthesization." $
-  "op" ~> "els" ~>
-    Logic.ifElse (Lists.null $ var "els")
-      (cst @@ string "")
-      (Logic.ifElse (Equality.equal (Lists.length $ var "els") (int32 1))
-        (Maybes.fromMaybe (cst @@ string "") (Lists.maybeHead $ var "els"))
-        (Ast.exprSeq $ Ast.seqExpr (var "op") (var "els")))
-
-structuralSpaceSep :: TTermDefinition ([Expr] -> Expr)
-structuralSpaceSep = define "structuralSpaceSep" $
-  doc "Like spaceSep, but produces a SeqExpr. Use for structural layout that should not trigger parenthesization of children." $
-  structuralSep @@ (Ast.op
-    (sym @@ string "")
-    (Ast.padding Ast.wsSpace Ast.wsNone)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone)
-
-squareBrackets :: TTermDefinition Brackets
-squareBrackets = define "squareBrackets" $
-  Ast.brackets (Ast.symbol (string "[")) (Ast.symbol (string "]"))
-
-suffix :: TTermDefinition (String -> Expr -> Expr)
-suffix = define "suffix" $
-  doc "Append a suffix string to an expression" $
-  "s" ~> "expr" ~>
-  "sufOp" <~ Ast.op
-    (sym @@ var "s")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 0)
-    Ast.associativityNone $
-  ifx @@ var "sufOp" @@ var "expr" @@ (cst @@ string "")
-
-sym :: TTermDefinition (String -> Symbol)
-sym = define "sym" $
-  "s" ~> Ast.symbol (var "s")
-
-symbolSep :: TTermDefinition (String -> BlockStyle -> [Expr] -> Expr)
-symbolSep = define "symbolSep" $
-  "symb" ~> "style" ~> "l" ~>
-    "breakCount" <~ (Lists.length $ Lists.filter identity $ list [
-      Ast.blockStyleNewlineBeforeContent $ var "style",
-      Ast.blockStyleNewlineAfterContent $ var "style"]) $
-    "break" <~ (Logic.ifElse (Equality.equal (var "breakCount") (int32 0))
-      Ast.wsSpace
-      (Logic.ifElse (Equality.equal (var "breakCount") (int32 1))
-        Ast.wsBreak
-        Ast.wsDoubleBreak)) $
-    "commaOp" <~ (Ast.op
-      (sym @@ var "symb")
-      (Ast.padding Ast.wsNone (var "break"))
-      (Ast.precedence $ int32 0)
-      Ast.associativityNone) $
-    Maybes.maybe (cst @@ string "")
-      ("h" ~> Lists.foldl ("acc" ~> "el" ~> ifx @@ var "commaOp" @@ var "acc" @@ var "el") (var "h") (Lists.drop (int32 1) (var "l")))
-      (Lists.maybeHead $ var "l")
-
-tabIndent :: TTermDefinition (Expr -> Expr)
-tabIndent = define "tabIndent" $
-  "e" ~> Ast.exprIndent $ Ast.indentedExpression
-    (Ast.indentStyleAllLines $ string "    ")
-    (var "e")
-
-tabIndentDoubleSpace :: TTermDefinition ([Expr] -> Expr)
-tabIndentDoubleSpace = define "tabIndentDoubleSpace" $
-  "exprs" ~> tabIndent @@ (doubleNewlineSep @@ var "exprs")
-
-tabIndentSingleSpace :: TTermDefinition ([Expr] -> Expr)
-tabIndentSingleSpace = define "tabIndentSingleSpace" $
-  "exprs" ~> tabIndent @@ (newlineSep @@ var "exprs")
-
-unsupportedType :: TTermDefinition (String -> Expr)
-unsupportedType = define "unsupportedType" $
-  "label" ~> cst @@ (string "[" ++ var "label" ++ string "]")
-
-unsupportedVariant :: TTermDefinition (String -> a -> Expr)
-unsupportedVariant = define "unsupportedVariant" $
-  "label" ~> "obj" ~>
-    cst @@ (string "[unsupported " ++ var "label" ++ string ": " ++ (Literals.showString $ var "obj") ++ string "]")
-
-withComma :: TTermDefinition (Expr -> Expr)
-withComma = define "withComma" $
-  "e" ~> noSep @@ list [var "e", cst @@ string ","]
-
-withSemi :: TTermDefinition (Expr -> Expr)
-withSemi = define "withSemi" $
-  "e" ~> noSep @@ list [var "e", cst @@ string ";"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Core.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Core.hs
+++ /dev/null
@@ -1,582 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Show.Core where
-
--- Standard imports for kernel terms modules (slightly modified for conflict avoidance)
-import Hydra.Kernel hiding (literalType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  binding, field, fields, fieldType, floatType, floatValue, injection, integerType,
-  integerValue, lambda, literal, literalType, project, term, type_, typeScheme)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.core"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.core types"}
-  where
-   definitions = [
-     toDefinition readTerm, -- TODO: move this to hydra.read.core
-     toDefinition binding,
-     toDefinition caseStatement,
-     toDefinition field,
-     toDefinition fieldType,
-     toDefinition fields,
-     toDefinition floatValue,
-     toDefinition floatType,
-     toDefinition injection,
-     toDefinition integerValue,
-     toDefinition integerType,
-     toDefinition lambda,
-     toDefinition let_,
-     toDefinition list_,
-     toDefinition maybe_,
-     toDefinition pair_,
-     toDefinition either_,
-     toDefinition map_,
-     toDefinition set_,
-     toDefinition literal,
-     toDefinition literalType,
-     toDefinition projection,
-     toDefinition term,
-     toDefinition type_,
-     toDefinition typeScheme]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-readTerm :: TTermDefinition (String -> Maybe Term)
-readTerm = define "readTerm" $
-  doc "A placeholder for reading terms from their serialized form. Not implemented." $
-  "s" ~> just $ Core.termLiteral $ Core.literalString $ var "s"
-
-binding :: TTermDefinition (Binding -> String)
-binding = define "binding" $
-  doc "Show a binding as a string" $
-  "el" ~>
-  "name" <~ unwrap _Name @@ (Core.bindingName $ var "el") $
-  "t" <~ Core.bindingTerm (var "el") $
-  "typeStr" <~ Maybes.maybe
-    (string "")
-    ("ts" ~> Strings.concat [string ":(", typeScheme @@ var "ts", string ")"])
-    (Core.bindingTypeScheme $ var "el") $
-  Strings.cat $ list [
-    var "name",
-    var "typeStr",
-    string " = ",
-    term @@ var "t"]
-      
-caseStatement :: TTermDefinition (CaseStatement -> String)
-caseStatement = define "caseStatement" $
-  doc "Show a case statement as a string" $
-  "cs" ~>
-  "tname" <~ unwrap _Name @@ (Core.caseStatementTypeName $ var "cs") $
-  "mdef" <~ Core.caseStatementDefault (var "cs") $
-  "csCases" <~ Core.caseStatementCases (var "cs") $
-  "defaultField" <~ Maybes.maybe
-    (list ([] :: [TTerm Field]))
-    ("d" ~> list [Core.field (Core.name $ string "[default]") (var "d")])
-    (var "mdef") $
-  "allFields" <~ Lists.concat (list [var "csCases", var "defaultField"]) $
-  Strings.cat $ list [
-    string "case(",
-    var "tname",
-    string ")",
-    fields @@ var "allFields"]
-
-projection :: TTermDefinition (Projection -> String)
-projection = define "projection" $
-  doc "Show a projection as a string" $
-  "proj" ~>
-  "tname" <~ unwrap _Name @@ (Core.projectionTypeName $ var "proj") $
-  "fname" <~ unwrap _Name @@ (Core.projectionField $ var "proj") $
-  Strings.cat $ list [
-    string "project(",
-    var "tname",
-    string "){",
-    var "fname",
-    string "}"]
-
-field :: TTermDefinition (Field -> String)
-field = define "field" $
-  "field" ~>
-  "fname" <~ unwrap _Name @@ (Core.fieldName $ var "field") $
-  "fterm" <~ Core.fieldTerm (var "field") $
-  Strings.cat $ list [var "fname", string "=", term @@ var "fterm"]
-
-fieldType :: TTermDefinition (FieldType -> String)
-fieldType = define "fieldType" $
-  "ft" ~>
-  "fname" <~ unwrap _Name @@ (Core.fieldTypeName $ var "ft") $
-  "ftyp" <~ Core.fieldTypeType (var "ft") $
-  Strings.cat $ list [
-    var "fname",
-    string ":",
-    type_ @@ var "ftyp"]
-
-fields :: TTermDefinition ([Field] -> String)
-fields = define "fields" $
-  doc "Show a list of fields as a string" $
-  "flds" ~>
-  "fieldStrs" <~ Lists.map field (var "flds") $
-  Strings.cat $ list [
-    string "{",
-    Strings.intercalate (string ", ") (var "fieldStrs"),
-    string "}"]
-
-floatValue :: TTermDefinition (FloatValue -> String)
-floatValue = define "float" $
-  doc "Show a float value as a string" $
-  "fv" ~> cases _FloatValue (var "fv") Nothing [
-    _FloatValue_bigfloat>>: "v" ~> Literals.showBigfloat (var "v") ++ (string ":bigfloat"),
-    _FloatValue_float32>>: "v" ~> Literals.showFloat32 (var "v") ++ (string ":float32"),
-    _FloatValue_float64>>: "v" ~> Literals.showFloat64 (var "v") ++ (string ":float64")]
-
-floatType :: TTermDefinition (FloatType -> String)
-floatType = define "floatType" $
-  doc "Show a float type as a string" $
-  "ft" ~> cases _FloatType (var "ft") Nothing [
-    _FloatType_bigfloat>>: constant $ string "bigfloat",
-    _FloatType_float32>>: constant $ string "float32",
-    _FloatType_float64>>: constant $ string "float64"]
-
-injection :: TTermDefinition (Injection -> String)
-injection = define "injection" $
-  doc "Show an injection as a string" $
-  "inj" ~>
-  "tname" <~ Core.injectionTypeName (var "inj") $
-  "f" <~ Core.injectionField (var "inj") $
-  Strings.cat $ list [
-    string "inject(",
-    unwrap _Name @@ var "tname",
-    string ")",
-    fields @@ (list [var "f"])]
-
-integerValue :: TTermDefinition (IntegerValue -> String)
-integerValue = define "integer" $
-  doc "Show an integer value as a string" $
-  "iv" ~> cases _IntegerValue (var "iv") Nothing [
-    _IntegerValue_bigint>>: "v" ~> Literals.showBigint (var "v") ++ (string ":bigint"),
-    _IntegerValue_int8>>: "v" ~> Literals.showInt8 (var "v") ++ (string ":int8"),
-    _IntegerValue_int16>>: "v" ~> Literals.showInt16 (var "v") ++ (string ":int16"),
-    _IntegerValue_int32>>: "v" ~> Literals.showInt32 (var "v") ++ (string ":int32"),
-    _IntegerValue_int64>>: "v" ~> Literals.showInt64 (var "v") ++ (string ":int64"),
-    _IntegerValue_uint8>>: "v" ~> Literals.showUint8 (var "v") ++ (string ":uint8"),
-    _IntegerValue_uint16>>: "v" ~> Literals.showUint16 (var "v") ++ (string ":uint16"),
-    _IntegerValue_uint32>>: "v" ~> Literals.showUint32 (var "v") ++ (string ":uint32"),
-    _IntegerValue_uint64>>: "v" ~> Literals.showUint64 (var "v") ++ (string ":uint64")]
-
-integerType :: TTermDefinition (IntegerType -> String)
-integerType = define "integerType" $
-  doc "Show an integer type as a string" $
-  "it" ~> cases _IntegerType (var "it") Nothing [
-    _IntegerType_bigint>>: constant $ string "bigint",
-    _IntegerType_int8>>: constant $ string "int8",
-    _IntegerType_int16>>: constant $ string "int16",
-    _IntegerType_int32>>: constant $ string "int32",
-    _IntegerType_int64>>: constant $ string "int64",
-    _IntegerType_uint8>>: constant $ string "uint8",
-    _IntegerType_uint16>>: constant $ string "uint16",
-    _IntegerType_uint32>>: constant $ string "uint32",
-    _IntegerType_uint64>>: constant $ string "uint64"]
-
-lambda :: TTermDefinition (Lambda -> String)
-lambda = define "lambda" $
-  doc "Show a lambda as a string" $
-  "l" ~>
-  "v" <~ unwrap _Name @@ (Core.lambdaParameter $ var "l") $
-  "mt" <~ Core.lambdaDomain (var "l") $
-  "body" <~ Core.lambdaBody (var "l") $
-  "typeStr" <~ Maybes.maybe
-    (string "")
-    ("t" ~> Strings.cat2 (string ":") (type_ @@ var "t"))
-    (var "mt") $
-  Strings.cat $ list [
-    string "λ",
-    var "v",
-    var "typeStr",
-    string ".",
-    term @@ var "body"]
-
-let_ :: TTermDefinition (Let -> String)
-let_ = define "let" $
-  doc "Show a let expression as a string" $
-  "l" ~>
-  "bindings" <~ Core.letBindings (var "l") $
-  "env" <~ Core.letBody (var "l") $
-  "bindingStrs" <~ Lists.map binding (var "bindings") $
-  Strings.cat $ list [
-    string "let ",
-    Strings.intercalate (string ", ") (var "bindingStrs"),
-    string " in ",
-    term @@ var "env"]
-
-list_ :: TTermDefinition ((a -> String) -> [a] -> String)
-list_ = define "list" $
-  doc "Show a list using a given function to show each element" $
-  "f" ~> "xs" ~>
-  "elementStrs" <~ Lists.map (var "f") (var "xs") $
-  Strings.cat $ list [
-    string "[",
-    Strings.intercalate (string ", ") (var "elementStrs"),
-    string "]"]
-
-pair_ :: TTermDefinition ((a -> String) -> (b -> String) -> (a, b) -> String)
-pair_ = define "pair" $
-  doc "Show a pair using given functions to show each element" $
-  "showA" ~> "showB" ~> "p" ~>
-  Strings.cat $ list [
-    string "(",
-    var "showA" @@ (Pairs.first $ var "p"),
-    string ", ",
-    var "showB" @@ (Pairs.second $ var "p"),
-    string ")"]
-
-either_ :: TTermDefinition ((a -> String) -> (b -> String) -> Prelude.Either a b -> String)
-either_ = define "either" $
-  doc "Show an Either value using given functions for left and right" $
-  "showA" ~> "showB" ~> "e" ~>
-  Eithers.either_
-    ("a" ~> Strings.cat2 (string "left(") (Strings.cat2 (var "showA" @@ var "a") (string ")")))
-    ("b" ~> Strings.cat2 (string "right(") (Strings.cat2 (var "showB" @@ var "b") (string ")")))
-    (var "e")
-
-maybe_ :: TTermDefinition ((a -> String) -> Maybe a -> String)
-maybe_ = define "maybe" $
-  doc "Show a Maybe value using a given function to show the element" $
-  "f" ~> "mx" ~>
-  Maybes.maybe (string "nothing") ("x" ~> Strings.cat2 (string "just(") (Strings.cat2 (var "f" @@ var "x") (string ")"))) (var "mx")
-
-map_ :: TTermDefinition ((k -> String) -> (v -> String) -> M.Map k v -> String)
-map_ = define "map" $
-  doc "Show a map using given functions to show keys and values" $
-  "showK" ~> "showV" ~> "m" ~>
-  "pairStrs" <~ Lists.map ("p" ~> Strings.cat $ list [
-    var "showK" @@ (Pairs.first $ var "p"),
-    string ": ",
-    var "showV" @@ (Pairs.second $ var "p")]) (Maps.toList $ var "m") $
-  Strings.cat $ list [
-    string "{",
-    Strings.intercalate (string ", ") (var "pairStrs"),
-    string "}"]
-
-set_ :: TTermDefinition ((a -> String) -> S.Set a -> String)
-set_ = define "set" $
-  doc "Show a set using a given function to show each element" $
-  "f" ~> "xs" ~>
-  "elementStrs" <~ Lists.map (var "f") (Sets.toList $ var "xs") $
-  Strings.cat $ list [
-    string "{",
-    Strings.intercalate (string ", ") (var "elementStrs"),
-    string "}"]
-
-literal :: TTermDefinition (Literal -> String)
-literal = define "literal" $
-  doc "Show a literal as a string" $
-  "l" ~> cases _Literal (var "l") Nothing [
-    _Literal_binary>>: constant $ string "[binary]",
-    _Literal_boolean>>: "b" ~> Logic.ifElse (var "b") (string "true") (string "false"),
-    _Literal_decimal>>: "d" ~> Literals.showDecimal $ var "d",
-    _Literal_float>>: "fv" ~> floatValue @@ var "fv",
-    _Literal_integer>>: "iv" ~> integerValue @@ var "iv",
-    _Literal_string>>: "s" ~> Literals.showString $ var "s"]
-
-literalType :: TTermDefinition (LiteralType -> String)
-literalType = define "literalType" $
-  doc "Show a literal type as a string" $
-  "lt" ~> cases _LiteralType (var "lt") Nothing [
-    _LiteralType_binary>>: constant $ string "binary",
-    _LiteralType_boolean>>: constant $ string "boolean",
-    _LiteralType_decimal>>: constant $ string "decimal",
-    _LiteralType_float>>: "ft" ~> floatType @@ var "ft",
-    _LiteralType_integer>>: "it" ~> integerType @@ var "it",
-    _LiteralType_string>>: constant $ string "string"]
-
-term :: TTermDefinition (Term -> String)
-term = define "term" $
-  doc "Show a term as a string" $
-  "t" ~>
-  "gatherTerms" <~ ("prev" ~> "app" ~>
-    "lhs" <~ Core.applicationFunction (var "app") $
-    "rhs" <~ Core.applicationArgument (var "app") $
-    cases _Term (var "lhs")
-      (Just $ Lists.cons (var "lhs") (Lists.cons (var "rhs") (var "prev"))) [
-      _Term_application>>: "app2" ~> var "gatherTerms" @@ (Lists.cons (var "rhs") (var "prev")) @@ var "app2"]) $
-  cases _Term (var "t") Nothing [
-    _Term_annotated>>: "at" ~> term @@ (Core.annotatedTermBody $ var "at"),
-    _Term_application>>: "app" ~>
-      "terms" <~ var "gatherTerms" @@ (list ([] :: [TTerm Term])) @@ var "app" $
-      "termStrs" <~ Lists.map term (var "terms") $
-      Strings.cat $ list [
-        string "(",
-        Strings.intercalate (string " @ ") (var "termStrs"),
-        string ")"],
-    _Term_cases>>: caseStatement,
-    _Term_either>>: "e" ~> Eithers.either_
-      ("l" ~> Strings.cat $ list [
-        string "left(",
-        term @@ var "l",
-        string ")"])
-      ("r" ~> Strings.cat $ list [
-        string "right(",
-        term @@ var "r",
-        string ")"])
-      (var "e"),
-    _Term_lambda>>: lambda,
-    _Term_let>>: "l" ~> let_ @@ var "l",
-    _Term_list>>: "els" ~>
-      "termStrs" <~ Lists.map term (var "els") $
-      Strings.cat $ list [
-        string "[",
-        Strings.intercalate (string ", ") (var "termStrs"),
-        string "]"],
-    _Term_literal>>: "lit" ~> literal @@ var "lit",
-    _Term_map>>: "m" ~>
-      "entry" <~ ("p" ~> Strings.cat $ list [
-        term @@ (Pairs.first $ var "p"),
-        string "=",
-        term @@ (Pairs.second $ var "p")]) $
-      Strings.cat $ list [
-        string "{",
-        Strings.intercalate (string ", ") $ Lists.map (var "entry") $ Maps.toList $ var "m",
-        string "}"],
-    _Term_maybe>>: "mt" ~> Maybes.maybe
-      (string "nothing")
-      ("t" ~> Strings.cat $ list [
-        string "just(",
-        term @@ var "t",
-        string ")"])
-      (var "mt"),
-    _Term_pair>>: "p" ~> Strings.cat $ list [
-      string "(",
-      term @@ (Pairs.first $ var "p"),
-      string ", ",
-      term @@ (Pairs.second $ var "p"),
-      string ")"],
-    _Term_project>>: projection,
-    _Term_record>>: "rec" ~>
-      "tname" <~ unwrap _Name @@ (Core.recordTypeName $ var "rec") $
-      "flds" <~ Core.recordFields (var "rec") $
-      Strings.cat $ list [
-        string "record(",
-        var "tname",
-        string ")",
-        fields @@ var "flds"],
-    _Term_set>>: "s" ~>
-      Strings.cat $ list [
-        string "{",
-        Strings.intercalate (string ", ") (Lists.map term $ Sets.toList $ var "s"),
-        string "}"],
-    _Term_typeLambda>>: "ta" ~>
-      "param" <~ unwrap _Name @@ (Core.typeLambdaParameter $ var "ta") $
-      "body" <~ Core.typeLambdaBody (var "ta") $
-      Strings.cat $ list [
-        string "Λ",
-        var "param",
-        string ".",
-        term @@ var "body"],
-    _Term_typeApplication>>: "tt" ~>
-      "t2" <~ Core.typeApplicationTermBody (var "tt") $
-      "typ" <~ Core.typeApplicationTermType (var "tt") $
-      Strings.cat $ list [
-        term @@ var "t2",
-        string "⟨",
-        type_ @@ var "typ",
-        string "⟩"],
-    _Term_inject>>: injection,
-    _Term_unit>>: constant $ string "unit",
-    _Term_unwrap>>: "tname" ~> Strings.cat $ list [
-      string "unwrap(",
-      unwrap _Name @@ var "tname",
-      string ")"],
-    _Term_variable>>: "name" ~> unwrap _Name @@ var "name",
-    _Term_wrap>>: "wt" ~>
-      "tname" <~ unwrap _Name @@ (Core.wrappedTermTypeName $ var "wt") $
-      "term1" <~ Core.wrappedTermBody (var "wt") $
-      Strings.cat $ list [
-        string "wrap(",
-        var "tname",
-        string "){",
-        term @@ var "term1",
-        string "}"]]
-
-type_ :: TTermDefinition (Type -> String)
-type_ = define "type" $
-  doc "Show a type as a string" $
-  "typ" ~>
-  "showRowType" <~ ("flds" ~>
-    "fieldStrs" <~ Lists.map fieldType (var "flds") $
-    Strings.cat $ list [
-      string "{",
-      Strings.intercalate (string ", ") (var "fieldStrs"),
-      string "}"]) $
-  "gatherTypes" <~ ("prev" ~> "app" ~>
-    "lhs" <~ Core.applicationTypeFunction (var "app") $
-    "rhs" <~ Core.applicationTypeArgument (var "app") $
-    cases _Type (var "lhs")
-      (Just $ Lists.cons (var "lhs") (Lists.cons (var "rhs") (var "prev"))) [
-      _Type_application>>: "app2" ~> var "gatherTypes" @@ (Lists.cons (var "rhs") (var "prev")) @@ var "app2"]) $
-  "gatherFunctionTypes" <~ ("prev" ~> "t" ~>
-    cases _Type (var "t")
-      (Just $ Lists.reverse $ Lists.cons (var "t") (var "prev")) [
-        _Type_function>>: "ft" ~>
-          "dom" <~ Core.functionTypeDomain (var "ft") $
-          "cod" <~ Core.functionTypeCodomain (var "ft") $
-          var "gatherFunctionTypes" @@ (Lists.cons (var "dom") (var "prev")) @@ var "cod"]) $
-  cases _Type (var "typ") Nothing [
-    _Type_annotated>>: "at" ~> type_ @@ (Core.annotatedTypeBody $ var "at"),
-    _Type_application>>: "app" ~>
-      "types" <~ var "gatherTypes" @@ (list ([] :: [TTerm Type])) @@ var "app" $
-      "typeStrs" <~ Lists.map type_ (var "types") $
-      Strings.cat $ list [
-        string "(",
-        Strings.intercalate (string " @ ") (var "typeStrs"),
-        string ")"],
-    _Type_either>>: "et" ~>
-      "leftTyp" <~ Core.eitherTypeLeft (var "et") $
-      "rightTyp" <~ Core.eitherTypeRight (var "et") $
-      Strings.cat $ list [
-        string "either<",
-        type_ @@ var "leftTyp",
-        string ", ",
-        type_ @@ var "rightTyp",
-        string ">"],
-    _Type_forall>>: "ft" ~>
-      "var" <~ unwrap _Name @@ (Core.forallTypeParameter $ var "ft") $
-      "body" <~ Core.forallTypeBody (var "ft") $
-      Strings.cat $ list [
-        string "(∀",
-        var "var",
-        string ".",
-        type_ @@ var "body",
-        string ")"],
-    _Type_function>>: "ft" ~>
-      "types" <~ var "gatherFunctionTypes" @@ (list ([] :: [TTerm Type])) @@ var "typ" $
-      "typeStrs" <~ Lists.map type_ (var "types") $
-      Strings.cat $ list [
-        string "(",
-        Strings.intercalate (string " → ") (var "typeStrs"),
-        string ")"],
-    _Type_list>>: "etyp" ~> Strings.cat $ list [
-      string "list<",
-      type_ @@ var "etyp",
-      string ">"],
-    _Type_literal>>: "lt" ~> literalType @@ var "lt",
-    _Type_map>>: "mt" ~>
-      "keyTyp" <~ Core.mapTypeKeys (var "mt") $
-      "valTyp" <~ Core.mapTypeValues (var "mt") $
-      Strings.cat $ list [
-        string "map<",
-        type_ @@ var "keyTyp",
-        string ", ",
-        type_ @@ var "valTyp",
-        string ">"],
-    _Type_maybe>>: "etyp" ~> Strings.cat $ list [
-      string "maybe<",
-      type_ @@ var "etyp",
-      string ">"],
-    _Type_pair>>: "pt" ~>
-      "firstTyp" <~ Core.pairTypeFirst (var "pt") $
-      "secondTyp" <~ Core.pairTypeSecond (var "pt") $
-      Strings.cat $ list [
-        string "(",
-        type_ @@ var "firstTyp",
-        string ", ",
-        type_ @@ var "secondTyp",
-        string ")"],
-    _Type_record>>: "rt" ~> Strings.cat2 (string "record") (var "showRowType" @@ var "rt"),
-    _Type_set>>: "etyp" ~> Strings.cat $ list [
-      string "set<",
-      type_ @@ var "etyp",
-      string ">"],
-    _Type_union>>: "rt" ~> Strings.cat2 (string "union") (var "showRowType" @@ var "rt"),
-    _Type_unit>>: constant $ string "unit",
-    _Type_variable>>: "name" ~> unwrap _Name @@ var "name",
-    _Type_void>>: constant $ string "void",
-    _Type_wrap>>: "wt" ~>
-      Strings.cat $ list [string "wrap(", type_ @@ var "wt", string ")"]]
-
-typeScheme :: TTermDefinition (TypeScheme -> String)
-typeScheme = define "typeScheme" $
-  doc "Show a type scheme as a string" $
-  "ts" ~>
-  "vars" <~ Core.typeSchemeVariables (var "ts") $
-  "body" <~ Core.typeSchemeBody (var "ts") $
-  "varNames" <~ Lists.map (unwrap _Name) (var "vars") $
-  "fa" <~ Logic.ifElse (Lists.null $ var "vars")
-    (string "")
-    (Strings.cat $ list [
-      string "forall ",
-      Strings.intercalate (string ",") (var "varNames"),
-      string ". "]) $
-  "toConstraintPair" <~ ("v" ~> "c" ~> Strings.cat $ list [
-    Core.unName (var "c"),
-    string " ",
-    Core.unName (var "v")]) $
-  "toConstraintPairs" <~ ("p" ~> Lists.map
-    (var "toConstraintPair" @@ (Pairs.first $ var "p")) $
-    Sets.toList $ Core.typeVariableMetadataClasses $ Pairs.second $ var "p") $
-  "tc" <~ optCases (Core.typeSchemeConstraints (var "ts"))
-    (list ([] :: [TTerm String]))
-    ("m" ~> Lists.concat $ Lists.map (var "toConstraintPairs") $ Maps.toList $ var "m") $
-  Strings.cat $ list [
-    string "(",
-    var "fa",
-    Logic.ifElse (Lists.null $ var "tc")
-      (string "")
-      (Strings.cat $ list [
-        string "(",
-        Strings.intercalate (string ", ") (var "tc"),
-        string ") => "]),
-    type_ @@ var "body",
-    string ")"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Error/Core.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Error/Core.hs
+++ /dev/null
@@ -1,444 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Show.Error.Core where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  binding, elimination, field, fields, fieldType, floatType, floatValue, function, injection, integerType,
-  integerValue, lambda, literal, literalType, term, type_, typeScheme)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants as ShowVariants
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.error.core"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, ShowVariants.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.error.core types"}
-  where
-   definitions = [
-     toDefinition constantConditionError,
-     toDefinition duplicateBindingError,
-     toDefinition duplicateFieldError,
-     toDefinition duplicateRecordTypeFieldNamesError,
-     toDefinition duplicateUnionTypeFieldNamesError,
-     toDefinition emptyCaseStatementError,
-     toDefinition emptyLetBindingsError,
-     toDefinition emptyRecordTypeError,
-     toDefinition emptyTermAnnotationError,
-     toDefinition emptyTypeAnnotationError,
-     toDefinition emptyTypeNameInTermError,
-     toDefinition emptyUnionTypeError,
-     toDefinition invalidForallParameterNameError,
-     toDefinition invalidLambdaParameterNameError,
-     toDefinition invalidLetBindingNameError,
-     toDefinition invalidTermError,
-     toDefinition invalidTypeError,
-     toDefinition invalidTypeLambdaParameterNameError,
-     toDefinition invalidTypeSchemeVariableNameError,
-     toDefinition nestedTermAnnotationError,
-     toDefinition nestedTypeAnnotationError,
-     toDefinition nonComparableMapKeyTypeError,
-     toDefinition nonComparableSetElementTypeError,
-     toDefinition redundantWrapUnwrapError,
-     toDefinition selfApplicationError,
-     toDefinition singleVariantUnionError,
-     toDefinition termVariableShadowingError,
-     toDefinition typeVariableShadowingInForallError,
-     toDefinition typeVariableShadowingInTypeLambdaError,
-     toDefinition undefinedFieldError,
-     toDefinition undefinedTermVariableError,
-     toDefinition undefinedTypeVariableError,
-     toDefinition undefinedTypeVariableInBindingTypeError,
-     toDefinition undefinedTypeVariableInLambdaDomainError,
-     toDefinition undefinedTypeVariableInTypeApplicationError,
-     toDefinition unexpectedTermVariantError,
-     toDefinition unexpectedTypeVariantError,
-     toDefinition unknownPrimitiveNameError,
-     toDefinition unnecessaryIdentityApplicationError,
-     toDefinition untypedTermVariableError,
-     toDefinition voidInNonBottomPositionError]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- ============================================================================
--- Existing error types
--- ============================================================================
-
-duplicateBindingError :: TTermDefinition (DuplicateBindingError -> String)
-duplicateBindingError = define "duplicateBindingError" $
-  doc "Show a duplicate binding error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "duplicate binding: ",
-    Core.unName $ project _DuplicateBindingError _DuplicateBindingError_name @@ var "e"]
-
-duplicateFieldError :: TTermDefinition (DuplicateFieldError -> String)
-duplicateFieldError = define "duplicateFieldError" $
-  doc "Show a duplicate field error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "duplicate field: ",
-    Core.unName $ project _DuplicateFieldError _DuplicateFieldError_name @@ var "e"]
-
-undefinedFieldError :: TTermDefinition (UndefinedFieldError -> String)
-undefinedFieldError = define "undefinedFieldError" $
-  doc "Show an undefined field error as a string" $
-  "e" ~>
-  "fname" <~ project _UndefinedFieldError _UndefinedFieldError_fieldName @@ var "e" $
-  "tname" <~ project _UndefinedFieldError _UndefinedFieldError_typeName @@ var "e" $
-  Strings.cat $ list [
-    string "no such field \"",
-    Core.unName $ var "fname",
-    string "\" in type \"",
-    Core.unName $ var "tname",
-    string "\""]
-
-unexpectedTermVariantError :: TTermDefinition (UnexpectedTermVariantError -> String)
-unexpectedTermVariantError = define "unexpectedTermVariantError" $
-  doc "Show an unexpected term variant error as a string" $
-  "e" ~>
-  "expected" <~ project _UnexpectedTermVariantError _UnexpectedTermVariantError_expectedVariant @@ var "e" $
-  "actual" <~ project _UnexpectedTermVariantError _UnexpectedTermVariantError_actualTerm @@ var "e" $
-  Strings.cat $ list [
-    string "expected ",
-    ShowVariants.termVariant @@ var "expected",
-    string " term but found ",
-    ShowCore.term @@ var "actual"]
-
-unexpectedTypeVariantError :: TTermDefinition (UnexpectedTypeVariantError -> String)
-unexpectedTypeVariantError = define "unexpectedTypeVariantError" $
-  doc "Show an unexpected type variant error as a string" $
-  "e" ~>
-  "expected" <~ project _UnexpectedTypeVariantError _UnexpectedTypeVariantError_expectedVariant @@ var "e" $
-  "actual" <~ project _UnexpectedTypeVariantError _UnexpectedTypeVariantError_actualType @@ var "e" $
-  Strings.cat $ list [
-    string "expected ",
-    ShowVariants.typeVariant @@ var "expected",
-    string " type but found ",
-    ShowCore.type_ @@ var "actual"]
-
--- ============================================================================
--- Term validation error show functions
--- ============================================================================
-
-constantConditionError :: TTermDefinition (ConstantConditionError -> String)
-constantConditionError = define "constantConditionError" $
-  doc "Show a constant condition error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "constant condition: ifElse with literal ",
-    Literals.showBoolean $ project _ConstantConditionError _ConstantConditionError_value @@ var "e"]
-
-emptyCaseStatementError :: TTermDefinition (EmptyCaseStatementError -> String)
-emptyCaseStatementError = define "emptyCaseStatementError" $
-  doc "Show an empty case statement error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "empty case statement for type: ",
-    Core.unName $ project _EmptyCaseStatementError _EmptyCaseStatementError_typeName @@ var "e"]
-
-emptyLetBindingsError :: TTermDefinition (EmptyLetBindingsError -> String)
-emptyLetBindingsError = define "emptyLetBindingsError" $
-  doc "Show an empty let bindings error as a string" $
-  "e" ~> string "let expression with no bindings"
-
-emptyTermAnnotationError :: TTermDefinition (EmptyTermAnnotationError -> String)
-emptyTermAnnotationError = define "emptyTermAnnotationError" $
-  doc "Show an empty term annotation error as a string" $
-  "e" ~> string "term annotation with empty annotation map"
-
-emptyTypeNameInTermError :: TTermDefinition (EmptyTypeNameInTermError -> String)
-emptyTypeNameInTermError = define "emptyTypeNameInTermError" $
-  doc "Show an empty type name in term error as a string" $
-  "e" ~> string "term with empty type name"
-
-invalidLambdaParameterNameError :: TTermDefinition (InvalidLambdaParameterNameError -> String)
-invalidLambdaParameterNameError = define "invalidLambdaParameterNameError" $
-  doc "Show an invalid lambda parameter name error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "invalid lambda parameter name: ",
-    Core.unName $ project _InvalidLambdaParameterNameError _InvalidLambdaParameterNameError_name @@ var "e"]
-
-invalidLetBindingNameError :: TTermDefinition (InvalidLetBindingNameError -> String)
-invalidLetBindingNameError = define "invalidLetBindingNameError" $
-  doc "Show an invalid let binding name error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "invalid let binding name: ",
-    Core.unName $ project _InvalidLetBindingNameError _InvalidLetBindingNameError_name @@ var "e"]
-
-invalidTypeLambdaParameterNameError :: TTermDefinition (InvalidTypeLambdaParameterNameError -> String)
-invalidTypeLambdaParameterNameError = define "invalidTypeLambdaParameterNameError" $
-  doc "Show an invalid type lambda parameter name error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "invalid type lambda parameter name: ",
-    Core.unName $ project _InvalidTypeLambdaParameterNameError _InvalidTypeLambdaParameterNameError_name @@ var "e"]
-
-nestedTermAnnotationError :: TTermDefinition (NestedTermAnnotationError -> String)
-nestedTermAnnotationError = define "nestedTermAnnotationError" $
-  doc "Show a nested term annotation error as a string" $
-  "e" ~> string "nested term annotations should be merged"
-
-redundantWrapUnwrapError :: TTermDefinition (RedundantWrapUnwrapError -> String)
-redundantWrapUnwrapError = define "redundantWrapUnwrapError" $
-  doc "Show a redundant wrap/unwrap error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "redundant wrap/unwrap for type: ",
-    Core.unName $ project _RedundantWrapUnwrapError _RedundantWrapUnwrapError_typeName @@ var "e"]
-
-selfApplicationError :: TTermDefinition (SelfApplicationError -> String)
-selfApplicationError = define "selfApplicationError" $
-  doc "Show a self-application error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "self-application of variable: ",
-    Core.unName $ project _SelfApplicationError _SelfApplicationError_name @@ var "e"]
-
-termVariableShadowingError :: TTermDefinition (TermVariableShadowingError -> String)
-termVariableShadowingError = define "termVariableShadowingError" $
-  doc "Show a term variable shadowing error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "variable shadowing: ",
-    Core.unName $ project _TermVariableShadowingError _TermVariableShadowingError_name @@ var "e"]
-
-typeVariableShadowingInTypeLambdaError :: TTermDefinition (TypeVariableShadowingInTypeLambdaError -> String)
-typeVariableShadowingInTypeLambdaError = define "typeVariableShadowingInTypeLambdaError" $
-  doc "Show a type variable shadowing in type lambda error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "type variable shadowing in type lambda: ",
-    Core.unName $ project _TypeVariableShadowingInTypeLambdaError _TypeVariableShadowingInTypeLambdaError_name @@ var "e"]
-
-undefinedTermVariableError :: TTermDefinition (UndefinedTermVariableError -> String)
-undefinedTermVariableError = define "undefinedTermVariableError" $
-  doc "Show an undefined term variable error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "undefined term variable: ",
-    Core.unName $ project _UndefinedTermVariableError _UndefinedTermVariableError_name @@ var "e"]
-
-undefinedTypeVariableInLambdaDomainError :: TTermDefinition (UndefinedTypeVariableInLambdaDomainError -> String)
-undefinedTypeVariableInLambdaDomainError = define "undefinedTypeVariableInLambdaDomainError" $
-  doc "Show an undefined type variable in lambda domain error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "undefined type variable in lambda domain: ",
-    Core.unName $ project _UndefinedTypeVariableInLambdaDomainError _UndefinedTypeVariableInLambdaDomainError_name @@ var "e"]
-
-undefinedTypeVariableInTypeApplicationError :: TTermDefinition (UndefinedTypeVariableInTypeApplicationError -> String)
-undefinedTypeVariableInTypeApplicationError = define "undefinedTypeVariableInTypeApplicationError" $
-  doc "Show an undefined type variable in type application error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "undefined type variable in type application: ",
-    Core.unName $ project _UndefinedTypeVariableInTypeApplicationError _UndefinedTypeVariableInTypeApplicationError_name @@ var "e"]
-
-undefinedTypeVariableInBindingTypeError :: TTermDefinition (UndefinedTypeVariableInBindingTypeError -> String)
-undefinedTypeVariableInBindingTypeError = define "undefinedTypeVariableInBindingTypeError" $
-  doc "Show an undefined type variable in binding type error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "undefined type variable in binding type: ",
-    Core.unName $ project _UndefinedTypeVariableInBindingTypeError _UndefinedTypeVariableInBindingTypeError_name @@ var "e"]
-
-unknownPrimitiveNameError :: TTermDefinition (UnknownPrimitiveNameError -> String)
-unknownPrimitiveNameError = define "unknownPrimitiveNameError" $
-  doc "Show an unknown primitive name error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "unknown primitive: ",
-    Core.unName $ project _UnknownPrimitiveNameError _UnknownPrimitiveNameError_name @@ var "e"]
-
-unnecessaryIdentityApplicationError :: TTermDefinition (UnnecessaryIdentityApplicationError -> String)
-unnecessaryIdentityApplicationError = define "unnecessaryIdentityApplicationError" $
-  doc "Show an unnecessary identity application error as a string" $
-  "e" ~> string "unnecessary application of identity lambda"
-
-untypedTermVariableError :: TTermDefinition (UntypedTermVariableError -> String)
-untypedTermVariableError = define "untypedTermVariableError" $
-  doc "Show an untyped term variable error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "untyped term variable: ",
-    Core.unName $ project _UntypedTermVariableError _UntypedTermVariableError_name @@ var "e"]
-
-invalidTermError :: TTermDefinition (InvalidTermError -> String)
-invalidTermError = define "invalidTermError" $
-  doc "Show an invalid term error as a string" $
-  "e" ~> Strings.cat2 (string "invalid term: ") $
-    cases _InvalidTermError (var "e") Nothing [
-      _InvalidTermError_constantCondition>>: constantConditionError,
-      _InvalidTermError_duplicateBinding>>: duplicateBindingError,
-      _InvalidTermError_duplicateField>>: duplicateFieldError,
-      _InvalidTermError_emptyCaseStatement>>: emptyCaseStatementError,
-      _InvalidTermError_emptyLetBindings>>: emptyLetBindingsError,
-      _InvalidTermError_emptyTermAnnotation>>: emptyTermAnnotationError,
-      _InvalidTermError_emptyTypeNameInTerm>>: emptyTypeNameInTermError,
-      _InvalidTermError_invalidLambdaParameterName>>: invalidLambdaParameterNameError,
-      _InvalidTermError_invalidLetBindingName>>: invalidLetBindingNameError,
-      _InvalidTermError_invalidTypeLambdaParameterName>>: invalidTypeLambdaParameterNameError,
-      _InvalidTermError_nestedTermAnnotation>>: nestedTermAnnotationError,
-      _InvalidTermError_redundantWrapUnwrap>>: redundantWrapUnwrapError,
-      _InvalidTermError_selfApplication>>: selfApplicationError,
-      _InvalidTermError_termVariableShadowing>>: termVariableShadowingError,
-      _InvalidTermError_typeVariableShadowingInTypeLambda>>: typeVariableShadowingInTypeLambdaError,
-      _InvalidTermError_undefinedTermVariable>>: undefinedTermVariableError,
-      _InvalidTermError_undefinedTypeVariableInBindingType>>: undefinedTypeVariableInBindingTypeError,
-      _InvalidTermError_undefinedTypeVariableInLambdaDomain>>: undefinedTypeVariableInLambdaDomainError,
-      _InvalidTermError_undefinedTypeVariableInTypeApplication>>: undefinedTypeVariableInTypeApplicationError,
-      _InvalidTermError_unknownPrimitiveName>>: unknownPrimitiveNameError,
-      _InvalidTermError_unnecessaryIdentityApplication>>: unnecessaryIdentityApplicationError,
-      _InvalidTermError_untypedTermVariable>>: untypedTermVariableError]
-
--- ============================================================================
--- Type validation error show functions
--- ============================================================================
-
-duplicateRecordTypeFieldNamesError :: TTermDefinition (DuplicateRecordTypeFieldNamesError -> String)
-duplicateRecordTypeFieldNamesError = define "duplicateRecordTypeFieldNamesError" $
-  doc "Show a duplicate record type field names error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "duplicate field in record type: ",
-    Core.unName $ project _DuplicateRecordTypeFieldNamesError _DuplicateRecordTypeFieldNamesError_name @@ var "e"]
-
-duplicateUnionTypeFieldNamesError :: TTermDefinition (DuplicateUnionTypeFieldNamesError -> String)
-duplicateUnionTypeFieldNamesError = define "duplicateUnionTypeFieldNamesError" $
-  doc "Show a duplicate union type field names error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "duplicate field in union type: ",
-    Core.unName $ project _DuplicateUnionTypeFieldNamesError _DuplicateUnionTypeFieldNamesError_name @@ var "e"]
-
-emptyRecordTypeError :: TTermDefinition (EmptyRecordTypeError -> String)
-emptyRecordTypeError = define "emptyRecordTypeError" $
-  doc "Show an empty record type error as a string" $
-  "e" ~> string "record type with no fields (use TypeUnit instead)"
-
-emptyTypeAnnotationError :: TTermDefinition (EmptyTypeAnnotationError -> String)
-emptyTypeAnnotationError = define "emptyTypeAnnotationError" $
-  doc "Show an empty type annotation error as a string" $
-  "e" ~> string "type annotation with empty annotation map"
-
-emptyUnionTypeError :: TTermDefinition (EmptyUnionTypeError -> String)
-emptyUnionTypeError = define "emptyUnionTypeError" $
-  doc "Show an empty union type error as a string" $
-  "e" ~> string "union type with no alternatives (use TypeVoid instead)"
-
-invalidForallParameterNameError :: TTermDefinition (InvalidForallParameterNameError -> String)
-invalidForallParameterNameError = define "invalidForallParameterNameError" $
-  doc "Show an invalid forall parameter name error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "invalid forall parameter name: ",
-    Core.unName $ project _InvalidForallParameterNameError _InvalidForallParameterNameError_name @@ var "e"]
-
-invalidTypeSchemeVariableNameError :: TTermDefinition (InvalidTypeSchemeVariableNameError -> String)
-invalidTypeSchemeVariableNameError = define "invalidTypeSchemeVariableNameError" $
-  doc "Show an invalid type scheme variable name error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "invalid type scheme variable name: ",
-    Core.unName $ project _InvalidTypeSchemeVariableNameError _InvalidTypeSchemeVariableNameError_name @@ var "e"]
-
-nestedTypeAnnotationError :: TTermDefinition (NestedTypeAnnotationError -> String)
-nestedTypeAnnotationError = define "nestedTypeAnnotationError" $
-  doc "Show a nested type annotation error as a string" $
-  "e" ~> string "nested type annotations should be merged"
-
-nonComparableMapKeyTypeError :: TTermDefinition (NonComparableMapKeyTypeError -> String)
-nonComparableMapKeyTypeError = define "nonComparableMapKeyTypeError" $
-  doc "Show a non-comparable map key type error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "map key type contains a function type: ",
-    ShowCore.type_ @@ (project _NonComparableMapKeyTypeError _NonComparableMapKeyTypeError_keyType @@ var "e")]
-
-nonComparableSetElementTypeError :: TTermDefinition (NonComparableSetElementTypeError -> String)
-nonComparableSetElementTypeError = define "nonComparableSetElementTypeError" $
-  doc "Show a non-comparable set element type error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "set element type contains a function type: ",
-    ShowCore.type_ @@ (project _NonComparableSetElementTypeError _NonComparableSetElementTypeError_elementType @@ var "e")]
-
-singleVariantUnionError :: TTermDefinition (SingleVariantUnionError -> String)
-singleVariantUnionError = define "singleVariantUnionError" $
-  doc "Show a single variant union error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "union type with single variant: ",
-    Core.unName $ project _SingleVariantUnionError _SingleVariantUnionError_fieldName @@ var "e"]
-
-typeVariableShadowingInForallError :: TTermDefinition (TypeVariableShadowingInForallError -> String)
-typeVariableShadowingInForallError = define "typeVariableShadowingInForallError" $
-  doc "Show a type variable shadowing in forall error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "type variable shadowing in forall: ",
-    Core.unName $ project _TypeVariableShadowingInForallError _TypeVariableShadowingInForallError_name @@ var "e"]
-
-undefinedTypeVariableError :: TTermDefinition (UndefinedTypeVariableError -> String)
-undefinedTypeVariableError = define "undefinedTypeVariableError" $
-  doc "Show an undefined type variable error as a string" $
-  "e" ~> Strings.cat $ list [
-    string "undefined type variable: ",
-    Core.unName $ project _UndefinedTypeVariableError _UndefinedTypeVariableError_name @@ var "e"]
-
-voidInNonBottomPositionError :: TTermDefinition (VoidInNonBottomPositionError -> String)
-voidInNonBottomPositionError = define "voidInNonBottomPositionError" $
-  doc "Show a void in non-bottom position error as a string" $
-  "e" ~> string "TypeVoid in a position where no value can be constructed"
-
-invalidTypeError :: TTermDefinition (InvalidTypeError -> String)
-invalidTypeError = define "invalidTypeError" $
-  doc "Show an invalid type error as a string" $
-  "e" ~> Strings.cat2 (string "invalid type: ") $
-    cases _InvalidTypeError (var "e") Nothing [
-      _InvalidTypeError_duplicateRecordTypeFieldNames>>: duplicateRecordTypeFieldNamesError,
-      _InvalidTypeError_duplicateUnionTypeFieldNames>>: duplicateUnionTypeFieldNamesError,
-      _InvalidTypeError_emptyRecordType>>: emptyRecordTypeError,
-      _InvalidTypeError_emptyTypeAnnotation>>: emptyTypeAnnotationError,
-      _InvalidTypeError_emptyUnionType>>: emptyUnionTypeError,
-      _InvalidTypeError_invalidForallParameterName>>: invalidForallParameterNameError,
-      _InvalidTypeError_invalidTypeSchemeVariableName>>: invalidTypeSchemeVariableNameError,
-      _InvalidTypeError_nestedTypeAnnotation>>: nestedTypeAnnotationError,
-      _InvalidTypeError_nonComparableMapKeyType>>: nonComparableMapKeyTypeError,
-      _InvalidTypeError_nonComparableSetElementType>>: nonComparableSetElementTypeError,
-      _InvalidTypeError_singleVariantUnion>>: singleVariantUnionError,
-      _InvalidTypeError_typeVariableShadowingInForall>>: typeVariableShadowingInForallError,
-      _InvalidTypeError_undefinedTypeVariable>>: undefinedTypeVariableError,
-      _InvalidTypeError_voidInNonBottomPosition>>: voidInNonBottomPositionError]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Errors.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Errors.hs
+++ /dev/null
@@ -1,276 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Show.Errors where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  binding, elimination, field, fields, fieldType, floatType, floatValue, function, injection, integerType,
-  integerValue, lambda, literal, literalType, term, type_, typeScheme)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Error.Core as ShowErrorCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.errors"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, ShowErrorCore.ns, ShowVariants.ns, ShowTyping.ns, Formatting.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.error types"}
-  where
-   definitions = [
-     toDefinition checkingError,
-     toDefinition decodingError,
-     toDefinition error_,
-     toDefinition incorrectUnificationError,
-     toDefinition notAForallTypeError,
-     toDefinition notAFunctionTypeError,
-     toDefinition otherError,
-     toDefinition resolutionError,
-     toDefinition typeArityMismatchError,
-     toDefinition typeMismatchError,
-     toDefinition unboundTypeVariablesError,
-     toDefinition unequalTypesError,
-     toDefinition unificationError,
-     toDefinition unsupportedTermVariantError,
-     toDefinition untypedLambdaError,
-     toDefinition untypedLetBindingError]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-checkingError :: TTermDefinition (CheckingError -> String)
-checkingError = define "checkingError" $
-  doc "Show a checking error as a string" $
-  "ce" ~> cases _CheckingError (var "ce") Nothing [
-    _CheckingError_incorrectUnification>>: incorrectUnificationError,
-    _CheckingError_notAForallType>>: notAForallTypeError,
-    _CheckingError_notAFunctionType>>: notAFunctionTypeError,
-    _CheckingError_typeArityMismatch>>: typeArityMismatchError,
-    _CheckingError_typeMismatch>>: typeMismatchError,
-    _CheckingError_unboundTypeVariables>>: unboundTypeVariablesError,
-    _CheckingError_unequalTypes>>: unequalTypesError,
-    _CheckingError_unsupportedTermVariant>>: unsupportedTermVariantError,
-    _CheckingError_untypedLambda>>: untypedLambdaError,
-    _CheckingError_untypedLetBinding>>: untypedLetBindingError]
-
-decodingError :: TTermDefinition (DecodingError -> String)
-decodingError = define "decodingError" $
-  doc "Show a decoding error as a string" $
-  "de" ~> Strings.cat2 (string "decoding error: ") (unwrap _DecodingError @@ var "de")
-
-error_ :: TTermDefinition (Error -> String)
-error_ = define "error" $
-  doc "Show an error as a string" $
-  "e" ~> cases _Error (var "e") Nothing [
-    _Error_checking>>: checkingError,
-    _Error_decoding>>: decodingError,
-    _Error_duplicateBinding>>: ShowErrorCore.duplicateBindingError,
-    _Error_duplicateField>>: ShowErrorCore.duplicateFieldError,
-    _Error_extraction>>: constant $ string "extraction error",
-    _Error_inference>>: constant $ string "inference error",
-    _Error_other>>: otherError,
-    _Error_resolution>>: resolutionError,
-    _Error_undefinedField>>: ShowErrorCore.undefinedFieldError,
-    _Error_undefinedTermVariable>>: ShowErrorCore.undefinedTermVariableError,
-    _Error_untypedTermVariable>>: ShowErrorCore.untypedTermVariableError,
-    _Error_unexpectedTermVariant>>: ShowErrorCore.unexpectedTermVariantError,
-    _Error_unexpectedTypeVariant>>: ShowErrorCore.unexpectedTypeVariantError,
-    _Error_unification>>: unificationError]
-
-incorrectUnificationError :: TTermDefinition (IncorrectUnificationError -> String)
-incorrectUnificationError = define "incorrectUnificationError" $
-  doc "Show an incorrect unification error as a string" $
-  "e" ~>
-  "subst" <~ project _IncorrectUnificationError _IncorrectUnificationError_substitution @@ var "e" $
-  Strings.cat2 (string "incorrect unification: ") (ShowTyping.typeSubst @@ var "subst")
-
-notAForallTypeError :: TTermDefinition (NotAForallTypeError -> String)
-notAForallTypeError = define "notAForallTypeError" $
-  doc "Show a not-a-forall-type error as a string" $
-  "e" ~>
-  "typ" <~ project _NotAForallTypeError _NotAForallTypeError_type @@ var "e" $
-  "args" <~ project _NotAForallTypeError _NotAForallTypeError_typeArguments @@ var "e" $
-  Strings.cat $ list [
-    string "not a forall type: ",
-    ShowCore.type_ @@ var "typ",
-    string ". Trying to apply ",
-    Literals.showInt32 (Lists.length $ var "args"),
-    string " type argument(s): ",
-    Formatting.showList @@ ShowCore.type_ @@ var "args"]
-
-notAFunctionTypeError :: TTermDefinition (NotAFunctionTypeError -> String)
-notAFunctionTypeError = define "notAFunctionTypeError" $
-  doc "Show a not-a-function-type error as a string" $
-  "e" ~>
-  "typ" <~ project _NotAFunctionTypeError _NotAFunctionTypeError_type @@ var "e" $
-  Strings.cat2 (string "not a function type: ") (ShowCore.type_ @@ var "typ")
-
-otherError :: TTermDefinition (OtherError -> String)
-otherError = define "otherError" $
-  doc "Show an other error as a string" $
-  "oe" ~> unwrap _OtherError @@ var "oe"
-
-resolutionError :: TTermDefinition (ResolutionError -> String)
-resolutionError = define "resolutionError" $
-  doc "Show a resolution error as a string, including the offending name or shape" $
-  "re" ~> cases _ResolutionError (var "re") Nothing [
-    _ResolutionError_noSuchBinding>>: "e" ~>
-      Strings.cat2 (string "no such binding: ")
-        (Core.unName $ project _NoSuchBindingError _NoSuchBindingError_name @@ var "e"),
-    _ResolutionError_noSuchPrimitive>>: "e" ~>
-      Strings.cat2 (string "no such primitive: ")
-        (Core.unName $ project _NoSuchPrimitiveError _NoSuchPrimitiveError_name @@ var "e"),
-    _ResolutionError_noMatchingField>>: "e" ~>
-      Strings.cat2 (string "no matching field: ")
-        (Core.unName $ project _NoMatchingFieldError _NoMatchingFieldError_fieldName @@ var "e"),
-    _ResolutionError_other>>: "e" ~>
-      Strings.cat2 (string "resolution error: ") (unwrap _OtherResolutionError @@ var "e"),
-    _ResolutionError_unexpectedShape>>: "e" ~>
-      Strings.cat $ list [
-        string "unexpected shape: expected ",
-        project _UnexpectedShapeError _UnexpectedShapeError_expected @@ var "e",
-        string " but got ",
-        project _UnexpectedShapeError _UnexpectedShapeError_actual @@ var "e"]]
-
-typeArityMismatchError :: TTermDefinition (TypeArityMismatchError -> String)
-typeArityMismatchError = define "typeArityMismatchError" $
-  doc "Show a type arity mismatch error as a string" $
-  "e" ~>
-  "typ" <~ project _TypeArityMismatchError _TypeArityMismatchError_type @@ var "e" $
-  "expected" <~ project _TypeArityMismatchError _TypeArityMismatchError_expectedArity @@ var "e" $
-  "actual" <~ project _TypeArityMismatchError _TypeArityMismatchError_actualArity @@ var "e" $
-  "args" <~ project _TypeArityMismatchError _TypeArityMismatchError_typeArguments @@ var "e" $
-  Strings.cat $ list [
-    string "type ",
-    ShowCore.type_ @@ var "typ",
-    string " applied to the wrong number of type arguments (expected ",
-    Literals.showInt32 (var "expected"),
-    string ", got ",
-    Literals.showInt32 (var "actual"),
-    string "): ",
-    Formatting.showList @@ ShowCore.type_ @@ var "args"]
-
-typeMismatchError :: TTermDefinition (TypeMismatchError -> String)
-typeMismatchError = define "typeMismatchError" $
-  doc "Show a type mismatch error as a string" $
-  "e" ~>
-  "expected" <~ project _TypeMismatchError _TypeMismatchError_expectedType @@ var "e" $
-  "actual" <~ project _TypeMismatchError _TypeMismatchError_actualType @@ var "e" $
-  Strings.cat $ list [
-    string "type mismatch: expected ",
-    ShowCore.type_ @@ var "expected",
-    string " but found ",
-    ShowCore.type_ @@ var "actual"]
-
-unboundTypeVariablesError :: TTermDefinition (UnboundTypeVariablesError -> String)
-unboundTypeVariablesError = define "unboundTypeVariablesError" $
-  doc "Show an unbound type variables error as a string" $
-  "e" ~>
-  "vars" <~ project _UnboundTypeVariablesError _UnboundTypeVariablesError_variables @@ var "e" $
-  "typ" <~ project _UnboundTypeVariablesError _UnboundTypeVariablesError_type @@ var "e" $
-  Strings.cat $ list [
-    string "unbound type variables: {",
-    Strings.intercalate (string ", ") (Lists.map (unaryFunction Core.unName) $ Sets.toList $ var "vars"),
-    string "} in type ",
-    ShowCore.type_ @@ var "typ"]
-
-unequalTypesError :: TTermDefinition (UnequalTypesError -> String)
-unequalTypesError = define "unequalTypesError" $
-  doc "Show an unequal types error as a string" $
-  "e" ~>
-  "types" <~ project _UnequalTypesError _UnequalTypesError_types @@ var "e" $
-  "desc" <~ project _UnequalTypesError _UnequalTypesError_description @@ var "e" $
-  Strings.cat $ list [
-    string "unequal types ",
-    Formatting.showList @@ ShowCore.type_ @@ var "types",
-    string " in ",
-    var "desc"]
-
-unificationError :: TTermDefinition (UnificationError -> String)
-unificationError = define "unificationError" $
-  doc "Show a unification error as a string" $
-  "e" ~>
-  "lt" <~ project _UnificationError _UnificationError_leftType @@ var "e" $
-  "rt" <~ project _UnificationError _UnificationError_rightType @@ var "e" $
-  "msg" <~ project _UnificationError _UnificationError_message @@ var "e" $
-  Strings.cat $ list [
-    string "unification error: cannot unify ",
-    ShowCore.type_ @@ var "lt",
-    string " with ",
-    ShowCore.type_ @@ var "rt",
-    string ": ",
-    var "msg"]
-
-unsupportedTermVariantError :: TTermDefinition (UnsupportedTermVariantError -> String)
-unsupportedTermVariantError = define "unsupportedTermVariantError" $
-  doc "Show an unsupported term variant error as a string" $
-  "e" ~>
-  Strings.cat2
-    (string "unsupported term variant: ")
-    (ShowVariants.termVariant @@ (project _UnsupportedTermVariantError _UnsupportedTermVariantError_termVariant @@ var "e"))
-
-untypedLambdaError :: TTermDefinition (UntypedLambdaError -> String)
-untypedLambdaError = define "untypedLambdaError" $
-  doc "Show an untyped lambda error as a string" $
-  constant $ string "untyped lambda"
-
-untypedLetBindingError :: TTermDefinition (UntypedLetBindingError -> String)
-untypedLetBindingError = define "untypedLetBindingError" $
-  doc "Show an untyped let binding error as a string" $
-  "e" ~>
-  "b" <~ project _UntypedLetBindingError _UntypedLetBindingError_binding @@ var "e" $
-  Strings.cat2 (string "untyped let binding: ") (ShowCore.binding @@ var "b")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Graph.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Graph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Graph.hs
+++ /dev/null
@@ -1,81 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Show.Graph where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.graph"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.graph types"}
-  where
-   definitions = [
-     toDefinition graph]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-graph :: TTermDefinition ([Binding] -> String)
-graph = define "graph" $
-  doc "Show a list of bindings as a string" $
-  lambda "elements" $ lets [
-    "elementStrs">: Lists.map ShowCore.binding (var "elements")] $
-    Strings.cat $ list [
-      string "{",
-      Strings.intercalate (string ", ") (var "elementStrs"),
-      string "}"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Paths.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Paths.hs
+++ /dev/null
@@ -1,179 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Show.Paths where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths       as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Names as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.paths"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Names.ns, Rewriting.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Utilities for working with subterm steps and paths.")}
-  where
-   definitions = [
-     toDefinition subtermStep,
-     toDefinition termToSubtermGraph]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-subtermStep :: TTermDefinition (SubtermStep -> Maybe String)
-subtermStep = define "subtermStep" $
-  doc "Convert a subterm step to a string representation" $
-  "step" ~>
-  "idx" <~ ("i" ~> nothing) $  -- TODO: restore index functionality
-  "idxSuff" <~ ("suffix" ~> "i" ~>
-    Maybes.map ("s" ~> Strings.cat2 (var "s") (var "suffix")) (var "idx" @@ var "i")) $
-  cases _SubtermStep (var "step")
-    Nothing [
-    _SubtermStep_annotatedBody>>: constant nothing,
-    _SubtermStep_applicationFunction>>: constant (just (string "fun")),
-    _SubtermStep_applicationArgument>>: constant (just (string "arg")),
-    _SubtermStep_lambdaBody>>: constant (just (string "body")),
-    _SubtermStep_unionCasesDefault>>: constant (just (string "default")),
-    _SubtermStep_unionCasesBranch>>: "name" ~> just (Strings.cat2 (string ".") (Core.unName (var "name"))),
-    _SubtermStep_letBody>>: constant (just (string "in")),
-    _SubtermStep_letBinding>>: "name" ~> just (Strings.cat2 (Core.unName (var "name")) (string "=")),
-    _SubtermStep_listElement>>: "i" ~> var "idx" @@ var "i",
-    _SubtermStep_mapKey>>: "i" ~> var "idxSuff" @@ (string ".key") @@ var "i",
-    _SubtermStep_mapValue>>: "i" ~> var "idxSuff" @@ (string ".value") @@ var "i",
-    _SubtermStep_maybeTerm>>: constant (just (string "just")),
-    _SubtermStep_productTerm>>: "i" ~> var "idx" @@ var "i",
-    _SubtermStep_recordField>>: "name" ~> just (Strings.cat2 (string ".") (Core.unName (var "name"))),
-    _SubtermStep_setElement>>: "i" ~> var "idx" @@ var "i",
-    _SubtermStep_sumTerm>>: constant nothing,
-    _SubtermStep_typeLambdaBody>>: constant nothing,
-    _SubtermStep_typeApplicationTerm>>: constant nothing,
-    _SubtermStep_injectionTerm>>: constant nothing,
-    _SubtermStep_wrappedTerm>>: constant nothing]
-
-termToSubtermGraph :: TTermDefinition (M.Map Namespace String -> Term -> SubtermGraph)
-termToSubtermGraph = define "termToSubtermGraph" $
-  doc "Build a subterm graph from a term" $
-  lambda "namespaces" $ lambda "term" $ lets [
-    "dontCareStep">: Paths.subtermStepAnnotatedBody,
-    "helper">: lambdas ["ids", "mroot", "path", "state", "stepTerm"] $ lets [
-      "step">: Pairs.first $ var "stepTerm",
-      "currentTerm">: Pairs.second $ var "stepTerm",
-      "nodesEdges">: Pairs.first $ var "state",
-      "visited">: Pairs.second $ var "state",
-      "nodes">: Pairs.first $ var "nodesEdges",
-      "edges">: Pairs.second $ var "nodesEdges",
-      "nextPath">: Lists.cons (var "step") (var "path")]
-      $ match _Term (Just $
-          Lists.foldl
-            (var "helper" @@ var "ids" @@ var "mroot" @@ var "nextPath")
-            (var "state")
-            (Rewriting.subtermsWithSteps @@ var "currentTerm")) [
-        _Term_let>>: lambda "letExpr" $ lets [
-          "bindings">: Core.letBindings $ var "letExpr",
-          "env">: Core.letBody $ var "letExpr",
-          "bindingNames">: Lists.map (unaryFunction Core.bindingName) (var "bindings"),
-          -- First fold: build nodes and update ids for each binding name
-          "addBindingName">: lambdas ["nodesVisitedIds", "name"] $ lets [
-            "currentNodesVisited">: Pairs.first $ var "nodesVisitedIds",
-            "currentIds">: Pairs.second $ var "nodesVisitedIds",
-            "currentNodes">: Pairs.first $ var "currentNodesVisited",
-            "currentVisited">: Pairs.second $ var "currentNodesVisited",
-            "rawLabel">: Names.compactName @@ var "namespaces" @@ var "name",
-            "uniqueLabel">: Names.uniqueLabel @@ var "currentVisited" @@ var "rawLabel",
-            "node">: Paths.subtermNode (var "name") (var "rawLabel") (var "uniqueLabel"),
-            "newVisited">: Sets.insert (var "uniqueLabel") (var "currentVisited"),
-            "newNodes">: Lists.cons (var "node") (var "currentNodes"),
-            "newIds">: Maps.insert (var "name") (var "node") (var "currentIds")]
-            $ pair (pair (var "newNodes") (var "newVisited")) (var "newIds"),
-          "nodesVisitedIds1">: Lists.foldl
-            (var "addBindingName")
-            (pair (pair (list ([] :: [TTerm SubtermNode])) (var "visited")) (var "ids"))
-            (var "bindingNames"),
-          "nodes1">: Pairs.first $ Pairs.first $ var "nodesVisitedIds1",
-          "visited1">: Pairs.second $ Pairs.first $ var "nodesVisitedIds1",
-          "ids1">: Pairs.second $ var "nodesVisitedIds1",
-          -- Second fold: process each binding term
-          "addBindingTerm">: lambdas ["currentState", "nodeBinding"] $ lets [
-            "root">: Pairs.first $ var "nodeBinding",
-            "binding">: Pairs.second $ var "nodeBinding",
-            "term1">: Core.bindingTerm $ var "binding"]
-            $ var "helper" @@ var "ids1" @@ just (var "root") @@ list ([] :: [TTerm SubtermStep]) @@ var "currentState" @@
-              pair (var "dontCareStep") (var "term1"),
-          "nodeBindingPairs">: Lists.zip (var "nodes1") (var "bindings"),
-          "stateAfterBindings">: Lists.foldl
-            (var "addBindingTerm")
-            (pair (pair (Lists.concat2 (var "nodes1") (var "nodes")) (var "edges")) (var "visited1"))
-            (var "nodeBindingPairs")]
-          $ var "helper" @@ var "ids1" @@ var "mroot" @@ var "nextPath" @@ var "stateAfterBindings" @@
-            pair Paths.subtermStepLetBody (var "env"),
-        _Term_variable>>: lambda "name" $
-          Maybes.maybe (var "state")
-            (lambda "root" $
-              Maybes.maybe (var "state")
-                (lambda "node" $ lets [
-                  "edge">: Paths.subtermEdge (var "root")
-                    (Paths.subtermPath $ Lists.reverse $ var "nextPath") (var "node"),
-                  "newEdges">: Lists.cons (var "edge") (var "edges")]
-                  $ pair (pair (var "nodes") (var "newEdges")) (var "visited"))
-                (Maps.lookup (var "name") (var "ids")))
-            (var "mroot")]
-      @@ var "currentTerm",
-    "initialState">: pair (pair (list ([] :: [TTerm SubtermNode])) (list ([] :: [TTerm SubtermEdge]))) Sets.empty,
-    "result">: var "helper" @@ Maps.empty @@ nothing @@ list ([] :: [TTerm SubtermStep]) @@ var "initialState" @@
-      pair (var "dontCareStep") (var "term"),
-    "finalNodesEdges">: Pairs.first $ var "result",
-    "finalNodes">: Pairs.first $ var "finalNodesEdges",
-    "finalEdges">: Pairs.second $ var "finalNodesEdges"] $
-    Paths.subtermGraph (var "finalNodes") (var "finalEdges")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Typing.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Typing.hs
+++ /dev/null
@@ -1,103 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Show.Typing where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.typing"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.typing types"}
-  where
-   definitions = [
-     toDefinition typeConstraint,
-     toDefinition typeSubst]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-typeConstraint :: TTermDefinition (TypeConstraint -> String)
-typeConstraint = define "typeConstraint" $
-  doc "Show a type constraint as a string" $
-  lambda "tc" $ lets [
-    "ltyp">: Typing.typeConstraintLeft $ var "tc",
-    "rtyp">: Typing.typeConstraintRight $ var "tc"] $
-    Strings.cat $ list [
-      ShowCore.type_ @@ var "ltyp",
-      string "≡",
-      ShowCore.type_ @@ var "rtyp"]
-
-typeSubst :: TTermDefinition (TypeSubst -> String)
-typeSubst = define "typeSubst" $
-  doc "Show a type substitution as a string" $
-  lambda "ts" $ lets [
-    "subst">: Typing.unTypeSubst $ var "ts",
-    "pairs">: Maps.toList $ var "subst",
-    "showPair">: lambda "pair" $ lets [
-      "name">: unwrap _Name @@ (Pairs.first $ var "pair"),
-      "typ">: Pairs.second $ var "pair"] $
-      Strings.cat $ list [
-        var "name",
-        string "↦",
-        ShowCore.type_ @@ var "typ"],
-    "pairStrs">: Lists.map (var "showPair") (var "pairs")] $
-    Strings.cat $ list [
-      string "{",
-      Strings.intercalate (string ",") (var "pairStrs"),
-      string "}"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Util.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Util.hs
+++ /dev/null
@@ -1,88 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Show.Util where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.util"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.util types"}
-  where
-   definitions = [
-     toDefinition caseConvention,
-     toDefinition comparison]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-caseConvention :: TTermDefinition (CaseConvention -> String)
-caseConvention = define "caseConvention" $
-  doc "Show a case convention as a string" $
-  "c" ~> cases _CaseConvention (var "c") Nothing [
-    _CaseConvention_lowerSnake>>: constant (string "lower_snake_case"),
-    _CaseConvention_upperSnake>>: constant (string "UPPER_SNAKE_CASE"),
-    _CaseConvention_camel>>: constant (string "camelCase"),
-    _CaseConvention_pascal>>: constant (string "PascalCase")]
-
-comparison :: TTermDefinition (Comparison -> String)
-comparison = define "comparison" $
-  doc "Show a comparison result as a string" $
-  "c" ~> cases _Comparison (var "c") Nothing [
-    _Comparison_lessThan>>: constant (string "lessThan"),
-    _Comparison_equalTo>>: constant (string "equalTo"),
-    _Comparison_greaterThan>>: constant (string "greaterThan")]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Variants.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Show/Variants.hs
+++ /dev/null
@@ -1,119 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Show.Variants where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (termVariant, typeVariant)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.show.variants"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "String representations of hydra.variants types"}
-  where
-   definitions = [
-     toDefinition termVariant,
-     toDefinition typeVariant]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-termVariant :: TTermDefinition (TermVariant -> String)
-termVariant = define "termVariant" $
-  doc "Show a term variant as a string" $
-  match _TermVariant Nothing [
-    _TermVariant_annotated>>: constant $ string "annotated",
-    _TermVariant_application>>: constant $ string "application",
-    _TermVariant_cases>>: constant $ string "cases",
-    _TermVariant_either>>: constant $ string "either",
-    _TermVariant_lambda>>: constant $ string "lambda",
-    _TermVariant_let>>: constant $ string "let",
-    _TermVariant_list>>: constant $ string "list",
-    _TermVariant_literal>>: constant $ string "literal",
-    _TermVariant_map>>: constant $ string "map",
-    _TermVariant_maybe>>: constant $ string "maybe",
-    _TermVariant_pair>>: constant $ string "pair",
-    _TermVariant_project>>: constant $ string "project",
-    _TermVariant_record>>: constant $ string "record",
-    _TermVariant_set>>: constant $ string "set",
-    _TermVariant_typeLambda>>: constant $ string "typeLambda",
-    _TermVariant_typeApplication>>: constant $ string "typeApplication",
-    _TermVariant_inject>>: constant $ string "inject",
-    _TermVariant_unit>>: constant $ string "unit",
-    _TermVariant_unwrap>>: constant $ string "unwrap",
-    _TermVariant_variable>>: constant $ string "variable",
-    _TermVariant_wrap>>: constant $ string "wrap"]
-
-typeVariant :: TTermDefinition (TypeVariant -> String)
-typeVariant = define "typeVariant" $
-  doc "Show a type variant as a string" $
-  match _TypeVariant Nothing [
-    _TypeVariant_annotated>>: constant $ string "annotated",
-    _TypeVariant_application>>: constant $ string "application",
-    _TypeVariant_either>>: constant $ string "either",
-    _TypeVariant_forall>>: constant $ string "forall",
-    _TypeVariant_function>>: constant $ string "function",
-    _TypeVariant_list>>: constant $ string "list",
-    _TypeVariant_literal>>: constant $ string "literal",
-    _TypeVariant_map>>: constant $ string "map",
-    _TypeVariant_maybe>>: constant $ string "maybe",
-    _TypeVariant_pair>>: constant $ string "pair",
-    _TypeVariant_record>>: constant $ string "record",
-    _TypeVariant_set>>: constant $ string "set",
-    _TypeVariant_union>>: constant $ string "union",
-    _TypeVariant_unit>>: constant $ string "unit",
-    _TypeVariant_variable>>: constant $ string "variable",
-    _TypeVariant_void>>: constant $ string "void",
-    _TypeVariant_wrap>>: constant $ string "wrap"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Sorting.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Sorting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Sorting.hs
+++ /dev/null
@@ -1,299 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Sorting where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  adjacencyListToMap, adjacencyListsToGraph, createOrderingIsomorphism, findReachableNodes,
-  initialState, popStackUntil, propagateTags, strongConnect, stronglyConnectedComponents,
-  topologicalSort, topologicalSortComponents, topologicalSortNodes)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Constants as Constants
-
-import qualified Hydra.Topology as Topo
-
-
-ns :: Namespace
-ns = Namespace "hydra.sorting"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Utilities for sorting."
-      <> " This module includes an implementation of Tarjan's algorithm,"
-      <> " originally based on GraphSCC by Iavor S. Diatchki:"
-      <> " https://hackage.haskell.org/package/GraphSCC.")}
-  where
-   definitions = [
-     toDefinition adjacencyListToMap,
-     toDefinition adjacencyListsToGraph,
-     toDefinition createOrderingIsomorphism,
-     toDefinition findReachableNodes,
-     toDefinition initialState,
-     toDefinition popStackUntil,
-     toDefinition propagateTags,
-     toDefinition strongConnect,
-     toDefinition stronglyConnectedComponents,
-     toDefinition topologicalSort,
-     toDefinition topologicalSortComponents,
-     toDefinition topologicalSortNodes]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-adjacencyListsToGraph :: TTermDefinition ([(key, [key])] -> (Topo.Graph, Topo.Vertex -> Maybe key))
-adjacencyListsToGraph = define "adjacencyListsToGraph" $
-  doc ("Given a list of adjacency lists represented as (key, [key]) pairs,"
-    <> " construct a graph along with a function mapping each vertex (an Int)"
-    <> " back to its original key (Nothing for unknown vertices).") $
-  "edges0" ~>
-  "sortedEdges" <~ Lists.sortOn (unaryFunction Pairs.first) (var "edges0") $
-  "indexedEdges" <~ Lists.zip (Math.range (int32 0) (Lists.length (var "sortedEdges"))) (var "sortedEdges") $
-  "keyToVertex" <~ Maps.fromList (Lists.map
-    ("vkNeighbors" ~>
-      "v" <~ Pairs.first (var "vkNeighbors") $
-      "kNeighbors" <~ Pairs.second (var "vkNeighbors") $
-      "k" <~ Pairs.first (var "kNeighbors") $
-      pair (var "k") (var "v"))
-    (var "indexedEdges")) $
-  "vertexMap" <~ Maps.fromList (Lists.map
-    ("vkNeighbors" ~>
-      "v" <~ Pairs.first (var "vkNeighbors") $
-      "kNeighbors" <~ Pairs.second (var "vkNeighbors") $
-      "k" <~ Pairs.first (var "kNeighbors") $
-      pair (var "v") (var "k"))
-    (var "indexedEdges")) $
-  "graph" <~ Maps.fromList (Lists.map
-    ("vkNeighbors" ~>
-      "v" <~ Pairs.first (var "vkNeighbors") $
-      "kNeighbors" <~ Pairs.second (var "vkNeighbors") $
-      "neighbors" <~ Pairs.second (var "kNeighbors") $
-      pair (var "v") (Maybes.mapMaybe ("k" ~> Maps.lookup (var "k") (var "keyToVertex")) (var "neighbors")))
-    (var "indexedEdges")) $
-  "vertexToKey" <~ ("v" ~> Maps.lookup (var "v") (var "vertexMap")) $
-  pair (var "graph") (var "vertexToKey")
-
-adjacencyListToMap :: TTermDefinition ([(a, [b])] -> M.Map a [b])
-adjacencyListToMap = define "adjacencyListToMap" $
-  doc "Convert an adjacency list to a map, concatenating values for duplicate keys" $
-  "pairs" ~>
-  Lists.foldl
-    ("mp" ~> "p" ~>
-      "k" <~ Pairs.first (var "p") $
-      "vs" <~ Pairs.second (var "p") $
-      "existing" <~ Maybes.maybe (list ([] :: [TTerm a])) (unaryFunction Equality.identity) (Maps.lookup (var "k") (var "mp")) $
-      Maps.insert (var "k") (Lists.concat2 (var "existing") (var "vs")) (var "mp"))
-    Maps.empty
-    (var "pairs")
-
-createOrderingIsomorphism :: TTermDefinition ([a] -> [a] -> Topo.OrderingIsomorphism b)
-createOrderingIsomorphism = define "createOrderingIsomorphism" $
-  "sourceOrd" ~> "targetOrd" ~>
-  "sourceToTargetMapping" <~ ("els" ~>
-    "mp" <~ Maps.fromList (Lists.zip (var "sourceOrd") (var "els")) $
-    Maybes.cat $ Lists.map ("n" ~> Maps.lookup (var "n") (var "mp")) (var "targetOrd")) $
-  "targetToSourceMapping" <~ ("els" ~>
-    "mp" <~ Maps.fromList (Lists.zip (var "targetOrd") (var "els")) $
-    Maybes.cat $ Lists.map ("n" ~> Maps.lookup (var "n") (var "mp")) (var "sourceOrd")) $
-  Topology.orderingIsomorphism (var "sourceToTargetMapping") (var "targetToSourceMapping")
-
-findReachableNodes :: TTermDefinition ((a -> S.Set a) -> a -> S.Set a)
-findReachableNodes = define "findReachableNodes" $
-  doc "Given an adjacency function and a distinguished root node, find all reachable nodes (including the root node)" $
-  "adj" ~> "root" ~>
-  "visit" <~ ("visited" ~> "node" ~>
-    "toVisit" <~ Sets.difference (var "adj" @@ var "node") (var "visited") $
-    Logic.ifElse (Sets.null $ var "toVisit")
-      (var "visited")
-      (Lists.foldl
-        ("v" ~> "n" ~> var "visit" @@ Sets.insert (var "n") (var "v") @@ var "n")
-        (var "visited")
-        (Sets.toList $ var "toVisit"))) $
-  var "visit" @@ Sets.singleton (var "root") @@ var "root"
-
-initialState :: TTermDefinition Topo.TarjanState
-initialState = define "initialState" $
-  doc "Initial state for Tarjan's algorithm" $
-  Topology.tarjanState (int32 0) Maps.empty Maps.empty (list ([] :: [TTerm Topo.Vertex])) Sets.empty (list ([] :: [TTerm [Topo.Vertex]]))
-
-popStackUntil :: TTermDefinition (Topo.Vertex -> Topo.TarjanState -> ([Topo.Vertex], Topo.TarjanState))
-popStackUntil = define "popStackUntil" $
-  doc "Pop vertices off the stack until the given vertex is reached, collecting the current strongly connected component" $
-  "v" ~> "st0" ~>
-  "go" <~ ("acc" ~> "st" ~>
-    -- Empty stack: return whatever we've collected (unreachable when Tarjan's
-    -- state invariants hold, since v is always on the stack when this is called).
-    Maybes.maybe
-      (pair (Lists.reverse (var "acc")) (var "st"))
-      ("uc" ~>
-        "x" <~ Pairs.first (var "uc") $
-        "xs" <~ Pairs.second (var "uc") $
-        "newSt" <~ Topology.tarjanStateWithStack (var "st") (var "xs") $
-        "newSt2" <~ Topology.tarjanStateWithOnStack (var "newSt") (Sets.delete (var "x") (Topology.tarjanStateOnStack (var "st"))) $
-        "acc'" <~ Lists.cons (var "x") (var "acc") $
-        Logic.ifElse (Equality.equal (var "x") (var "v"))
-          (pair (Lists.reverse (var "acc'")) (var "newSt2"))
-          (var "go" @@ var "acc'" @@ var "newSt2"))
-      (Lists.uncons $ Topology.tarjanStateStack (var "st"))) $
-  var "go" @@ list ([] :: [TTerm Topo.Vertex]) @@ var "st0"
-
-propagateTags :: TTermDefinition ([(a, [a])] -> [(a, [t])] -> [(a, S.Set t)])
-propagateTags = define "propagateTags" $
-  doc ("Given a graph as an adjacency list of edges and a list of explicit tags per node,"
-    <> " compute the full set of tags for each node by propagating tags through edges."
-    <> " If there is an edge from n1 to n2 and n2 has tag t, then n1 also has tag t."
-    <> " Note: pairs in the output are not ordered.") $
-  "edges" ~> "nodeTags" ~>
-  -- Build adjacency map
-  "adjMap" <~ adjacencyListToMap @@ var "edges" $
-  -- Build initial tag map: convert each [t] to Set t
-  "tagMap" <~ Maps.map (unaryFunction Sets.fromList) (adjacencyListToMap @@ var "nodeTags") $
-  -- Collect all nodes
-  "allNodes" <~ Sets.toList (Sets.fromList $ Lists.concat2
-    (Lists.map (unaryFunction Pairs.first) (var "edges"))
-    (Lists.map (unaryFunction Pairs.first) (var "nodeTags"))) $
-  -- For each node, find all reachable nodes and collect their tags
-  "getTagsForNode" <~ ("node" ~>
-    "reachable" <~ findReachableNodes
-      @@ ("n" ~> Sets.fromList $ Maybes.maybe (list ([] :: [TTerm a])) (unaryFunction Equality.identity) (Maps.lookup (var "n") (var "adjMap")))
-      @@ var "node" $
-    Sets.unions $ Lists.map
-      ("n" ~> Maybes.maybe Sets.empty (unaryFunction Equality.identity) (Maps.lookup (var "n") (var "tagMap")))
-      (Sets.toList $ var "reachable")) $
-  Lists.map ("n" ~> pair (var "n") (var "getTagsForNode" @@ var "n")) (var "allNodes")
-
-strongConnect :: TTermDefinition (Topo.Graph -> Topo.Vertex -> Topo.TarjanState -> Topo.TarjanState)
-strongConnect = define "strongConnect" $
-  doc "Visit a vertex and recursively explore its successors" $
-  "graph" ~> "v" ~> "st" ~>
-  "i" <~ Topology.tarjanStateCounter (var "st") $
-  "newSt" <~ Topology.tarjanState
-    (Math.add (var "i") (int32 1))
-    (Maps.insert (var "v") (var "i") (Topology.tarjanStateIndices (var "st")))
-    (Maps.insert (var "v") (var "i") (Topology.tarjanStateLowLinks (var "st")))
-    (Lists.cons (var "v") (Topology.tarjanStateStack (var "st")))
-    (Sets.insert (var "v") (Topology.tarjanStateOnStack (var "st")))
-    (Topology.tarjanStateSccs (var "st")) $
-  "neighbors" <~ Maps.findWithDefault (list ([] :: [TTerm Topo.Vertex])) (var "v") (var "graph") $
-  "processNeighbor" <~ ("st_" ~> "w" ~>
-    "lowLink" <~ ("s" ~>
-      "lowV1" <~ Maps.findWithDefault Constants.maxInt32 (var "v") (Topology.tarjanStateLowLinks (var "s")) $
-      "idx_w" <~ Maps.findWithDefault Constants.maxInt32 (var "w") (Topology.tarjanStateIndices (var "s")) $
-      Topology.tarjanStateWithLowLinks (var "s")
-        (Maps.insert (var "v") (Equality.min (var "lowV1") (var "idx_w")) (Topology.tarjanStateLowLinks (var "s")))) $
-    Logic.ifElse (Logic.not (Maps.member (var "w") (Topology.tarjanStateIndices (var "st_"))))
-      ("stAfter" <~ strongConnect @@ var "graph" @@ var "w" @@ var "st_" $
-       "lowV2" <~ Maps.findWithDefault Constants.maxInt32 (var "v") (Topology.tarjanStateLowLinks (var "stAfter")) $
-       "low_w" <~ Maps.findWithDefault Constants.maxInt32 (var "w") (Topology.tarjanStateLowLinks (var "stAfter")) $
-       Topology.tarjanStateWithLowLinks (var "stAfter")
-         (Maps.insert (var "v") (Equality.min (var "lowV2") (var "low_w")) (Topology.tarjanStateLowLinks (var "stAfter"))))
-      (Logic.ifElse (Sets.member (var "w") (Topology.tarjanStateOnStack (var "st_")))
-        (var "lowLink" @@ var "st_")
-        (var "st_"))) $
-  "stAfterNeighbors" <~ Lists.foldl (var "processNeighbor") (var "newSt") (var "neighbors") $
-  "low_v" <~ Maps.findWithDefault Constants.maxInt32 (var "v") (Topology.tarjanStateLowLinks (var "stAfterNeighbors")) $
-  "idx_v" <~ Maps.findWithDefault Constants.maxInt32 (var "v") (Topology.tarjanStateIndices (var "stAfterNeighbors")) $
-  Logic.ifElse (Equality.equal (var "low_v") (var "idx_v"))
-    ("compResult" <~ popStackUntil @@ var "v" @@ var "stAfterNeighbors" $
-     "comp" <~ Pairs.first (var "compResult") $
-     "stPopped" <~ Pairs.second (var "compResult") $
-     Topology.tarjanStateWithSccs (var "stPopped") (Lists.cons (var "comp") (Topology.tarjanStateSccs (var "stPopped"))))
-    (var "stAfterNeighbors")
-
-stronglyConnectedComponents :: TTermDefinition (Topo.Graph -> [[Topo.Vertex]])
-stronglyConnectedComponents = define "stronglyConnectedComponents" $
-  doc "Compute the strongly connected components of the given graph. The components are returned in reverse topological order" $
-  "graph" ~>
-  "verts" <~ Maps.keys (var "graph") $
-  "finalState" <~ Lists.foldl
-    ("st" ~> "v" ~> Logic.ifElse (Maps.member (var "v") (Topology.tarjanStateIndices (var "st")))
-      (var "st")
-      (strongConnect @@ var "graph" @@ var "v" @@ var "st"))
-    (asTerm initialState)
-    (var "verts") $
-  Lists.reverse (Lists.map (unaryFunction Lists.sort) (Topology.tarjanStateSccs (var "finalState")))
-
-topologicalSort :: TTermDefinition ([(a, [a])] -> Either [[a]] [a])
-topologicalSort = define "topologicalSort" $
-  doc ("Sort a directed acyclic graph (DAG) based on an adjacency list."
-    <> " Yields a list of nontrivial strongly connected components if the graph has cycles, otherwise a simple list.") $
-  "pairs" ~>
-  "sccs" <~ topologicalSortComponents @@ var "pairs" $
-  -- A component is a cycle iff it has more than one element.
-  "isCycle" <~ ("scc" ~> Equality.gt (Lists.length $ var "scc") (int32 1)) $
-  "withCycles" <~ Lists.filter (var "isCycle") (var "sccs") $
-  Logic.ifElse (Lists.null $ var "withCycles")
-    (right $ Lists.concat $ var "sccs")
-    (left $ var "withCycles")
-
-topologicalSortComponents :: TTermDefinition ([(a, [a])] -> [[a]])
-topologicalSortComponents = define "topologicalSortComponents" $
-  doc ("Find the strongly connected components (including cycles and isolated vertices) of a graph,"
-    <> " in (reverse) topological order, i.e. dependencies before dependents") $
-  "pairs" ~>
-  "graphResult" <~ adjacencyListsToGraph @@ var "pairs" $
-  "g" <~ Pairs.first (var "graphResult") $
-  -- vertexToKey returns Maybe key; filter out Nothing (unreachable for
-  -- vertices produced by stronglyConnectedComponents of the same graph).
-  Lists.map ("comp" ~> Maybes.mapMaybe (Pairs.second $ var "graphResult") (var "comp")) $
-    stronglyConnectedComponents @@ var "g"
-
-topologicalSortNodes :: TTermDefinition ((x -> a) -> (x -> [a]) -> [x] -> [[x]])
-topologicalSortNodes = define "topologicalSortNodes" $
-  doc ("Sort a directed acyclic graph (DAG) of nodes using two helper functions:"
-    <> " one for node keys, and one for the adjacency list of connected node keys."
-    <> " The result is a list of strongly-connected components (cycles), in which singleton lists represent acyclic nodes.") $
-  "getKey" ~> "getAdj" ~> "nodes" ~>
-  "nodesByKey" <~ Maps.fromList (Lists.map ("n" ~> pair (var "getKey" @@ var "n") (var "n")) (var "nodes")) $
-  "pairs" <~ Lists.map ("n" ~> pair (var "getKey" @@ var "n") (var "getAdj" @@ var "n")) (var "nodes") $
-  "comps" <~ topologicalSortComponents @@ var "pairs" $
-  Lists.map ("c" ~> Maybes.cat $ Lists.map ("k" ~> Maps.lookup (var "k") (var "nodesByKey")) (var "c")) (var "comps")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Strip.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Strip.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Strip.hs
+++ /dev/null
@@ -1,233 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Strip where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  deannotateAndDetypeTerm,
-  deannotateTerm,
-  deannotateType,
-  deannotateTypeParameters,
-  deannotateTypeRecursive,
-  deannotateTypeSchemeRecursive,
-  detypeTerm,
-  removeTermAnnotations,
-  removeTypeAnnotations,
-  removeTypeAnnotationsFromTerm,
-  removeTypesFromTerm,
-  stripTypeLambdas)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths        as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Sorting as Sorting
-
-
-ns :: Namespace
-ns = Namespace "hydra.strip"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Rewriting.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Annotation and type stripping and normalization")}
-  where
-   definitions = [
-     toDefinition deannotateAndDetypeTerm,
-     toDefinition deannotateTerm,
-     toDefinition deannotateType,
-     toDefinition deannotateTypeParameters,
-     toDefinition deannotateTypeRecursive,
-     toDefinition deannotateTypeSchemeRecursive,
-     toDefinition detypeTerm,
-     toDefinition removeTermAnnotations,
-     toDefinition removeTypeAnnotations,
-     toDefinition removeTypeAnnotationsFromTerm,
-     toDefinition removeTypesFromTerm,
-     toDefinition stripTypeLambdas]
-
-deannotateAndDetypeTerm :: TTermDefinition (Term -> Term)
-deannotateAndDetypeTerm = define "deannotateAndDetypeTerm" $
-  doc "Strip type annotations from the top levels of a term" $
-  "t" ~> cases _Term (var "t")
-    (Just $ var "t") [
-    _Term_annotated>>: "at" ~> deannotateAndDetypeTerm @@ (Core.annotatedTermBody $ var "at"),
-    _Term_typeApplication>>: "tt" ~> deannotateAndDetypeTerm @@ (Core.typeApplicationTermBody $ var "tt"),
-    _Term_typeLambda>>: "ta" ~> deannotateAndDetypeTerm @@ (Core.typeLambdaBody $ var "ta")]
-
-deannotateTerm :: TTermDefinition (Term -> Term)
-deannotateTerm = define "deannotateTerm" $
-  doc "Strip all annotations (including System F type annotations) from the top levels of a term" $
-  "t" ~> cases _Term (var "t")
-    (Just $ var "t") [
-    _Term_annotated>>: "at" ~> deannotateTerm @@ (Core.annotatedTermBody $ var "at")]
-
-deannotateType :: TTermDefinition (Type -> Type)
-deannotateType = define "deannotateType" $
-  doc "Strip all annotations from a term" $
-  "t" ~> cases _Type (var "t")
-    (Just $ var "t") [
-    _Type_annotated>>: deannotateType <.> (project _AnnotatedType _AnnotatedType_body)]
-
-deannotateTypeParameters :: TTermDefinition (Type -> Type)
-deannotateTypeParameters = define "deannotateTypeParameters" $
-  doc "Strip any top-level type lambdas from a type, extracting the (possibly nested) type body" $
-  "t" ~> cases _Type (deannotateType @@ var "t")
-    (Just $ var "t") [
-    _Type_forall>>: "lt" ~> deannotateTypeParameters @@ (project _ForallType _ForallType_body @@ var "lt")]
-
-deannotateTypeRecursive :: TTermDefinition (Type -> Type)
-deannotateTypeRecursive = define "deannotateTypeRecursive" $
-  doc "Recursively strip all annotations from a type" $
-  "typ" ~>
-  "strip" <~ ("recurse" ~> "typ" ~>
-    "rewritten" <~ var "recurse" @@ var "typ" $
-    cases _Type (var "rewritten")
-      (Just $ var "rewritten") [
-      _Type_annotated>>: "at" ~> Core.annotatedTypeBody $ var "at"]) $
-  Rewriting.rewriteType @@ var "strip" @@ var "typ"
-
-deannotateTypeSchemeRecursive :: TTermDefinition (TypeScheme -> TypeScheme)
-deannotateTypeSchemeRecursive = define "deannotateTypeSchemeRecursive" $
-  doc "Recursively strip all annotations from a type scheme" $
-  "ts" ~>
-  "vars" <~ Core.typeSchemeVariables (var "ts") $
-  "typ" <~ Core.typeSchemeBody (var "ts") $
-  "constraints" <~ Core.typeSchemeConstraints (var "ts") $
-  Core.typeScheme (var "vars") (deannotateTypeRecursive @@ var "typ") (var "constraints")
-
-detypeTerm :: TTermDefinition (Term -> Term)
-detypeTerm = define "detypeTerm" $
-  doc "Strip System F type annotations from the top levels of a term, but leave application-specific annotations intact" $
-  "t" ~> cases _Term (var "t")
-    (Just $ var "t") [
-    _Term_annotated>>: "at" ~>
-       "subj" <~ Core.annotatedTermBody (var "at") $
-       "ann" <~ Core.annotatedTermAnnotation (var "at") $
-       Core.termAnnotated $ Core.annotatedTerm (detypeTerm @@ var "subj") (var "ann"),
-    _Term_typeApplication>>: "tt" ~> deannotateAndDetypeTerm @@ (Core.typeApplicationTermBody $ var "tt"),
-    _Term_typeLambda>>: "ta" ~> deannotateAndDetypeTerm @@ (Core.typeLambdaBody $ var "ta")]
-
-stripTypeLambdas :: TTermDefinition (Term -> Term)
-stripTypeLambdas = define "stripTypeLambdas" $
-  doc "Strip outer type lambda wrappers from a term, preserving type application wrappers and annotations" $
-  "t" ~> cases _Term (var "t")
-    (Just $ var "t") [
-    _Term_annotated>>: "at" ~>
-       "subj" <~ Core.annotatedTermBody (var "at") $
-       "ann" <~ Core.annotatedTermAnnotation (var "at") $
-       Core.termAnnotated $ Core.annotatedTerm (stripTypeLambdas @@ var "subj") (var "ann"),
-    _Term_typeLambda>>: "ta" ~> stripTypeLambdas @@ (Core.typeLambdaBody $ var "ta")]
-
-removeTermAnnotations :: TTermDefinition (Term -> Term)
-removeTermAnnotations = define "removeTermAnnotations" $
-  doc "Recursively remove term annotations, including within subterms" $
-  "term" ~>
-  "remove" <~ ("recurse" ~> "term" ~>
-    "rewritten" <~ var "recurse" @@ var "term" $
-    cases _Term (var "term")
-      (Just $ var "rewritten") [
-      _Term_annotated>>: "at" ~> Core.annotatedTermBody $ var "at"]) $
-  Rewriting.rewriteTerm @@ var "remove" @@ var "term"
-
-removeTypeAnnotations :: TTermDefinition (Type -> Type)
-removeTypeAnnotations = define "removeTypeAnnotations" $
-  doc "Recursively remove type annotations, including within subtypes" $
-  "typ" ~>
-  "remove" <~ ("recurse" ~> "typ" ~>
-    "rewritten" <~ var "recurse" @@ var "typ" $
-    cases _Type (var "rewritten")
-      (Just $ var "rewritten") [
-      _Type_annotated>>: "at" ~> Core.annotatedTypeBody $ var "at"]) $
-  Rewriting.rewriteType @@ var "remove" @@ var "typ"
-
-removeTypesFromTerm :: TTermDefinition (Term -> Term)
-removeTypesFromTerm = define "removeTypesFromTerm" $
-  doc "Strip type annotations from terms while preserving other annotations" $
-  "term" ~>
-  "strip" <~ ("recurse" ~> "term" ~>
-    "rewritten" <~ var "recurse" @@ var "term" $
-    "stripBinding" <~ ("b" ~> Core.binding
-      (Core.bindingName $ var "b")
-      (Core.bindingTerm $ var "b")
-      nothing) $
-    cases _Term (var "rewritten")
-      (Just $ var "rewritten") [
-      _Term_lambda>>: "l" ~> Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        nothing
-        (Core.lambdaBody $ var "l"),
-      _Term_let>>: "lt" ~> Core.termLet $ Core.let_
-        (Lists.map (var "stripBinding") (Core.letBindings $ var "lt"))
-        (Core.letBody $ var "lt"),
-      _Term_typeApplication>>: "tt" ~> Core.typeApplicationTermBody $ var "tt",
-      _Term_typeLambda>>: "ta" ~> Core.typeLambdaBody $ var "ta"]) $
-  Rewriting.rewriteTerm @@ var "strip" @@ var "term"
-
-removeTypeAnnotationsFromTerm :: TTermDefinition (Term -> Term)
-removeTypeAnnotationsFromTerm = define "removeTypeAnnotationsFromTerm" $
-  doc "Strip type annotations (TypeLambda, TypeApplication, binding type schemes) from terms while preserving lambda domain types and other annotations" $
-  "term" ~>
-  "strip" <~ ("recurse" ~> "term" ~>
-    "rewritten" <~ var "recurse" @@ var "term" $
-    "stripBinding" <~ ("b" ~> Core.binding
-      (Core.bindingName $ var "b")
-      (Core.bindingTerm $ var "b")
-      nothing) $
-    cases _Term (var "rewritten")
-      (Just $ var "rewritten") [
-      _Term_let>>: "lt" ~> Core.termLet $ Core.let_
-        (Lists.map (var "stripBinding") (Core.letBindings $ var "lt"))
-        (Core.letBody $ var "lt"),
-      _Term_typeApplication>>: "tt" ~> Core.typeApplicationTermBody $ var "tt",
-      _Term_typeLambda>>: "ta" ~> Core.typeLambdaBody $ var "ta"]) $
-  Rewriting.rewriteTerm @@ var "strip" @@ var "term"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Substitution.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Substitution.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Substitution.hs
+++ /dev/null
@@ -1,311 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Substitution where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  composeTypeSubst, composeTypeSubstNonEmpty, composeTypeSubstList, idTypeSubst, singletonTypeSubst, substituteInBinding,
-  substituteInConstraint, substituteInConstraints, substInClassConstraints, substInContext, substituteInTerm,
-  substInType, substInTypeNonEmpty, substInTypeScheme, substTypesInTerm)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-
-
-ns :: Namespace
-ns = Namespace "hydra.substitution"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Rewriting.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Variable substitution in type and term expressions.")}
-  where
-   definitions = [
-     toDefinition composeTypeSubst,
-     toDefinition composeTypeSubstNonEmpty,
-     toDefinition composeTypeSubstList,
-     toDefinition idTypeSubst,
-     toDefinition singletonTypeSubst,
-     toDefinition substituteInBinding,
-     toDefinition substituteInConstraint,
-     toDefinition substituteInConstraints,
-     toDefinition substInClassConstraints,
-     toDefinition substInContext,
-     toDefinition substituteInTerm,
-     toDefinition substInType,
-     toDefinition substInTypeNonEmpty,
-     toDefinition substInTypeScheme,
-     toDefinition substTypesInTerm]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-composeTypeSubst :: TTermDefinition (TypeSubst -> TypeSubst -> TypeSubst)
-composeTypeSubst = define "composeTypeSubst" $
-  doc "Compose two type substitutions" $
-  lambdas ["s1", "s2"] $
-    -- Short-circuit: if s1 is empty, return s2
-    Logic.ifElse (Maps.null $ Typing.unTypeSubst $ var "s1")
-      (var "s2") $
-    -- Short-circuit: if s2 is empty, return s1
-    Logic.ifElse (Maps.null $ Typing.unTypeSubst $ var "s2")
-      (var "s1") $
-    -- Otherwise, compose normally
-    composeTypeSubstNonEmpty @@ var "s1" @@ var "s2"
-
--- | Helper for composeTypeSubst when both substitutions are non-empty
-composeTypeSubstNonEmpty :: TTermDefinition (TypeSubst -> TypeSubst -> TypeSubst)
-composeTypeSubstNonEmpty = define "composeTypeSubstNonEmpty" $
-  doc "Compose two non-empty type substitutions (internal helper)" $
-  lambdas ["s1", "s2"] $ lets [
-    "isExtra">: lambdas ["k", "v"] $ Maybes.isNothing (Maps.lookup (var "k") (Typing.unTypeSubst $ var "s1")),
-    "withExtra">: Maps.filterWithKey (var "isExtra") (Typing.unTypeSubst $ var "s2")] $
-    Typing.typeSubst $ Maps.union (var "withExtra") $ Maps.map (substInType @@ var "s2") $ Typing.unTypeSubst $ var "s1"
-
-composeTypeSubstList :: TTermDefinition ([TypeSubst] -> TypeSubst)
-composeTypeSubstList = define "composeTypeSubstList" $
-  doc "Compose a list of type substitutions" $
-  Phantoms.fold (composeTypeSubst) @@ idTypeSubst
-
-idTypeSubst :: TTermDefinition TypeSubst
-idTypeSubst = define "idTypeSubst" $
-  doc "The identity type substitution" $
-  Typing.typeSubst Maps.empty
-
-singletonTypeSubst :: TTermDefinition (Name -> Type -> TypeSubst)
-singletonTypeSubst = define "singletonTypeSubst" $
-  doc "Create a type substitution with a single variable mapping" $
-  lambdas ["v", "t"] $ Typing.typeSubst $ Maps.singleton (var "v") (var "t")
-
-substituteInBinding :: TTermDefinition (TermSubst -> Binding -> Binding)
-substituteInBinding = define "substituteInBinding" $
-  doc "Apply a term substitution to a binding" $
-  "subst" ~> "b" ~> Core.bindingWithTerm (var "b") (substituteInTerm @@ var "subst" @@ (Core.bindingTerm $ var "b"))
-
-substituteInConstraint :: TTermDefinition (TypeSubst -> TypeConstraint -> TypeConstraint)
-substituteInConstraint = define "substituteInConstraint" $
-  doc "Apply a type substitution to a type constraint" $
-  lambdas ["subst", "c"] $ Typing.typeConstraint
-    (substInType @@ var "subst" @@ (Typing.typeConstraintLeft $ var "c"))
-    (substInType @@ var "subst" @@ (Typing.typeConstraintRight $ var "c"))
-    (Typing.typeConstraintComment $ var "c")
-
-substituteInConstraints :: TTermDefinition (TypeSubst -> [TypeConstraint] -> [TypeConstraint])
-substituteInConstraints = define "substituteInConstraints" $
-  doc "Apply a type substitution to a list of type constraints" $
-  lambdas ["subst", "cs"] $ Lists.map (substituteInConstraint @@ var "subst") (var "cs")
-
--- | Apply a type substitution to a map of class constraints.
--- When a type variable is mapped to another type variable, the constraint is transferred to the new variable.
--- When a type variable is mapped to a complex type, the constraint is propagated to all free variables in that type.
-substInClassConstraints :: TTermDefinition (TypeSubst -> M.Map Name TypeVariableMetadata -> M.Map Name TypeVariableMetadata)
-substInClassConstraints = define "substInClassConstraints" $
-  doc "Apply a type substitution to class constraints, propagating to free variables" $
-  "subst" ~> "constraints" ~>
-  "substMap" <~ Typing.unTypeSubst (var "subst") $
-  -- Helper to insert a constraint, merging with existing if present
-  "insertOrMerge" <~ ("varName" ~> "metadata" ~> "acc" ~>
-    Maybes.maybe
-      (Maps.insert (var "varName") (var "metadata") (var "acc"))
-      ("existing" ~>
-        "merged" <~ Core.typeVariableMetadata (Sets.union (Core.typeVariableMetadataClasses $ var "existing") (Core.typeVariableMetadataClasses $ var "metadata")) $
-        Maps.insert (var "varName") (var "merged") (var "acc"))
-      (Maps.lookup (var "varName") (var "acc"))) $
-  -- For each (varName, metadata) in constraints:
-  -- 1. Look up varName in the substitution
-  -- 2. If not found, keep (varName, metadata) in result
-  -- 3. If found, propagate constraint to all free variables in the target type
-  Lists.foldl
-    ("acc" ~> "pair" ~>
-      "varName" <~ Pairs.first (var "pair") $
-      "metadata" <~ Pairs.second (var "pair") $
-      Maybes.maybe
-        -- Not in substitution: keep original
-        (var "insertOrMerge" @@ var "varName" @@ var "metadata" @@ var "acc")
-        -- In substitution: propagate constraint to all free variables in the target type
-        ("targetType" ~>
-          "freeVars" <~ Sets.toList (Variables.freeVariablesInType @@ var "targetType") $
-          Lists.foldl
-            ("acc2" ~> "freeVar" ~> var "insertOrMerge" @@ var "freeVar" @@ var "metadata" @@ var "acc2")
-            (var "acc")
-            (var "freeVars"))
-        (Maps.lookup (var "varName") (var "substMap")))
-    Maps.empty
-    (Maps.toList $ var "constraints")
-
-substInContext :: TTermDefinition (TypeSubst -> Graph -> Graph)
-substInContext = define "substInContext" $
-  doc "Apply a type substitution to a graph's bound types and class constraints" $
-  lambdas ["subst", "cx"] $
-    "newBoundTypes" <~ Maps.map (substInTypeScheme @@ var "subst") (Graph.graphBoundTypes $ var "cx") $
-    "newClassConstraints" <~ substInClassConstraints @@ var "subst" @@ (Graph.graphClassConstraints $ var "cx") $
-    "cx2" <~ Graph.graphWithBoundTypes (var "cx") (var "newBoundTypes") $
-    Graph.graphWithClassConstraints (var "cx2") (var "newClassConstraints")
-
-substituteInTerm :: TTermDefinition (TermSubst -> Term -> Term)
-substituteInTerm = define "substituteInTerm" $
-  doc "Apply a term substitution to a term" $
-  "subst" ~> "term0" ~> lets [
-    "s">: Typing.unTermSubst $ var "subst",
-    "rewrite">: lambdas ["recurse", "term"] $ lets [
-      "withLambda">: lambda "l" $ lets [
-        "v">: Core.lambdaParameter $ var "l",
-        "subst2">: Typing.termSubst $ Maps.delete (var "v") (var "s")] $
-        Core.termLambda $
-          Core.lambda (var "v") (Core.lambdaDomain $ var "l") (substituteInTerm @@ var "subst2" @@ (Core.lambdaBody $ var "l")),
-      "withLet">: lambda "lt" $ lets [
-        "bindings">: Core.letBindings $ var "lt",
-        "names">: Sets.fromList $ Lists.map (unaryFunction Core.bindingName) (var "bindings"),
-        "subst2">: Typing.termSubst $ Maps.filterWithKey (lambdas ["k", "v"] $ Logic.not $ Sets.member (var "k") (var "names")) (var "s"),
-        "rewriteBinding">: lambda "b" $ Core.binding
-          (Core.bindingName $ var "b")
-          (substituteInTerm @@ var "subst2" @@ (Core.bindingTerm $ var "b"))
-          (Core.bindingTypeScheme $ var "b")] $
-        Core.termLet $ Core.let_
-          (Lists.map (var "rewriteBinding") (var "bindings"))
-          (substituteInTerm @@ var "subst2" @@ (Core.letBody $ var "lt"))] $
-      cases _Term (var "term")
-        (Just $ var "recurse" @@ var "term") [
-        _Term_lambda>>: "l" ~> var "withLambda" @@ var "l",
-        _Term_let>>: "l" ~> var "withLet" @@ var "l",
-        _Term_variable>>: lambda "name" $ Maybes.maybe
-          (var "recurse" @@ var "term")
-          (lambda "sterm" $ var "sterm")
-          (Maps.lookup (var "name") (var "s"))]] $
-    Rewriting.rewriteTerm @@ var "rewrite" @@ var "term0"
-
--- W: subst'
-substInType :: TTermDefinition (TypeSubst -> Type -> Type)
-substInType = define "substInType" $
-  doc "Apply a type substitution to a type" $
-  "subst" ~> "typ0" ~>
-    -- Short-circuit: if substitution is empty, return type unchanged
-    Logic.ifElse (Maps.null $ Typing.unTypeSubst $ var "subst")
-      (var "typ0") $
-    -- Otherwise, apply the substitution
-    substInTypeNonEmpty @@ var "subst" @@ var "typ0"
-
--- | Helper for substInType when substitution is non-empty
-substInTypeNonEmpty :: TTermDefinition (TypeSubst -> Type -> Type)
-substInTypeNonEmpty = define "substInTypeNonEmpty" $
-  doc "Apply a non-empty type substitution to a type (internal helper)" $
-  "subst" ~> "typ0" ~>
-    lets [
-      "rewrite">: lambdas ["recurse", "typ"] $ cases _Type (var "typ") (Just $ var "recurse" @@ var "typ") [
-        _Type_forall>>: lambda "lt" $ Maybes.maybe
-          (var "recurse" @@ var "typ")
-          (lambda "styp" $ Core.typeForall $ Core.forallType
-            (Core.forallTypeParameter $ var "lt")
-            (substInType
-              @@ (var "removeVar" @@ (Core.forallTypeParameter $ var "lt"))
-              @@ (Core.forallTypeBody $ var "lt")))
-          (Maps.lookup (Core.forallTypeParameter $ var "lt") (Typing.unTypeSubst $ var "subst")),
-        _Type_variable>>: lambda "v" $ Maybes.maybe
-          (var "typ")
-          (lambda "styp" $ var "styp")
-          (Maps.lookup (var "v") (Typing.unTypeSubst $ var "subst"))],
-      "removeVar">: lambdas ["v"] $ Typing.typeSubst $ Maps.delete (var "v") (Typing.unTypeSubst $ var "subst")] $
-      (Rewriting.rewriteType) @@ var "rewrite" @@ var "typ0"
-
-substInTypeScheme :: TTermDefinition (TypeSubst -> TypeScheme -> TypeScheme)
-substInTypeScheme = define "substInTypeScheme" $
-  doc ("Apply a type substitution to a type scheme. The scheme's quantifier"
-    <> " variables shadow the substitution: any name in typeSchemeVariables is"
-    <> " removed from subst before substituting into the body and constraints."
-    <> " Without this, a substitution like {t0 -> Foo} applied to"
-    <> " `forall [t0]. t0 -> t0` would incorrectly replace the bound t0.") $
-  lambdas ["subst", "ts"] $ lets [
-    "scopedSubst">: Typing.typeSubst $ Lists.foldl
-      (lambdas ["m", "v"] $ Maps.delete (var "v") (var "m"))
-      (Typing.unTypeSubst $ var "subst")
-      (Core.typeSchemeVariables $ var "ts")] $
-    Core.typeScheme
-      (Core.typeSchemeVariables $ var "ts")
-      (substInType @@ var "scopedSubst" @@ (Core.typeSchemeBody $ var "ts"))
-      -- Also apply the substitution to the constraints
-      (Maybes.map (substInClassConstraints @@ var "scopedSubst") (Core.typeSchemeConstraints $ var "ts"))
-
-substTypesInTerm :: TTermDefinition (TypeSubst -> Term -> Term)
-substTypesInTerm = define "substTypesInTerm" $
-  doc "Apply a type substitution to the type annotations within a term" $
-  "subst" ~> "term0" ~> lets [
-    "rewrite">: lambdas ["recurse", "term"] $ lets [
-      "dflt">: var "recurse" @@ var "term",
-      "forLambda">: lambda "l" $ Core.termLambda $ Core.lambda
-        (Core.lambdaParameter $ var "l")
-        (Maybes.map (substInType @@ var "subst") $ Core.lambdaDomain $ var "l")
-        (substTypesInTerm @@ var "subst" @@ (Core.lambdaBody $ var "l")),
-      "forLet">: lambda "l" $ lets [
-        "rewriteBinding">: lambda "b" $ Core.binding
-          (Core.bindingName $ var "b")
-          (substTypesInTerm @@ var "subst" @@ (Core.bindingTerm $ var "b"))
-          (Maybes.map (substInTypeScheme @@ var "subst") (Core.bindingTypeScheme $ var "b"))] $
-        Core.termLet $ Core.let_
-          (Lists.map (var "rewriteBinding") (Core.letBindings $ var "l"))
-          (substTypesInTerm @@ var "subst" @@ (Core.letBody $ var "l")),
-      "forTypeApplication">: lambda "tt" $
-         Core.termTypeApplication $ Core.typeApplicationTerm
-           (substTypesInTerm @@ var "subst" @@ (Core.typeApplicationTermBody $ var "tt"))
-           (substInType @@ var "subst" @@ (Core.typeApplicationTermType $ var "tt")),
-      "forTypeLambda">: lambda "ta" $ lets [
-        "param">: Core.typeLambdaParameter $ var "ta",
-        "subst2">: Typing.typeSubst $ Maps.delete (var "param") (Typing.unTypeSubst $ var "subst")] $
-        Core.termTypeLambda $ Core.typeLambda
-          (var "param")
-          (substTypesInTerm @@ var "subst2" @@ (Core.typeLambdaBody $ var "ta"))] $
-      cases _Term (var "term")
-        (Just $ var "dflt") [
-        _Term_lambda>>: "l" ~> var "forLambda" @@ var "l",
-        _Term_let>>: "l" ~> var "forLet" @@ var "l",
-        _Term_typeApplication>>: "ta" ~> var "forTypeApplication" @@ var "ta",
-        _Term_typeLambda>>: "tl" ~> var "forTypeLambda" @@ var "tl"]] $
-    Rewriting.rewriteTerm @@ var "rewrite" @@ var "term0"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Templates.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Templates.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Templates.hs
+++ /dev/null
@@ -1,164 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Templates where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (graphToSchema, instantiateTemplate)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Decode.Core as DecodeCore
-import qualified Hydra.Sources.Kernel.Terms.Constants as Constants
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.templates"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, moduleNamespace DecodeCore.module_, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "A utility which instantiates a nonrecursive type with default values"}
-  where
-   definitions = [
-     toDefinition graphToSchema,
-     toDefinition instantiateTemplate]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-graphToSchema :: TTermDefinition (Context -> Graph -> [Binding] -> Either DecodingError (M.Map Name Type))
-graphToSchema = define "graphToSchema" $
-  doc "Decode a list of type-encoding bindings into a map of named types" $
-  "cx" ~> "graph" ~> "els" ~>
-  "toPair" <~ ("el" ~>
-    "name" <~ Core.bindingName (var "el") $
-    Eithers.bind (decoderFor _Type @@ var "graph" @@ (Core.bindingTerm (var "el"))) (
-      "t" ~> right (pair (var "name") (var "t")))) $
-  Eithers.bind (Eithers.mapList (var "toPair") (var "els")) (
-    "pairs" ~> right (Maps.fromList (var "pairs")))
-
-instantiateTemplate :: TTermDefinition (Context -> Bool -> M.Map Name Type -> Name -> Type -> Either Error Term)
-instantiateTemplate = define "instantiateTemplate" $
-  doc ("Given a graph schema and a nonrecursive type, instantiate it with default values."
-    <> " If the minimal flag is set, the smallest possible term is produced; otherwise, exactly one subterm"
-    <> " is produced for constructors which do not otherwise require one, e.g. in lists and optionals."
-    <> " The name parameter provides the element name for nominal type construction.") $
-  "cx" ~> "minimal" ~> "schema" ~> "tname" ~> "t" ~>
-  "inst" <~ ("tn" ~> instantiateTemplate @@ var "cx" @@ var "minimal" @@ var "schema" @@ var "tn") $
-  "noPoly" <~ Ctx.failInContext (Error.errorExtraction $ Error.extractionErrorUnexpectedShape $ Error.unexpectedShapeError (string "non-polymorphic type") (string "polymorphic or function type")) (var "cx") $
-  "forFloat" <~ ("ft" ~> cases _FloatType (var "ft")
-    Nothing [
-    _FloatType_bigfloat>>: constant (Core.floatValueBigfloat (bigfloat 0.0)),
-    _FloatType_float32>>: constant (Core.floatValueFloat32 (float32 0.0)),
-    _FloatType_float64>>: constant (Core.floatValueFloat64 (float64 0.0))]) $
-  "forInteger" <~ ("it" ~> cases _IntegerType (var "it")
-    Nothing [
-    _IntegerType_bigint>>: constant (Core.integerValueBigint (bigint 0)),
-    _IntegerType_int8>>: constant (Core.integerValueInt8 (int8 0)),
-    _IntegerType_int16>>: constant (Core.integerValueInt16 (int16 0)),
-    _IntegerType_int32>>: constant (Core.integerValueInt32 (int32 0)),
-    _IntegerType_int64>>: constant (Core.integerValueInt64 (int64 0)),
-    _IntegerType_uint8>>: constant (Core.integerValueUint8 (uint8 0)),
-    _IntegerType_uint16>>: constant (Core.integerValueUint16 (uint16 0)),
-    _IntegerType_uint32>>: constant (Core.integerValueUint32 (uint32 0)),
-    _IntegerType_uint64>>: constant (Core.integerValueUint64 (uint64 0))]) $
-  "forLiteral" <~ ("lt" ~> cases _LiteralType (var "lt")
-    Nothing [
-    _LiteralType_binary>>: constant (Core.literalString (string "")),
-    _LiteralType_boolean>>: constant (Core.literalBoolean false),
-    _LiteralType_decimal>>: constant (Core.literalDecimal (decimal 0)),
-    _LiteralType_integer>>: "it" ~> Core.literalInteger (var "forInteger" @@ var "it"),
-    _LiteralType_float>>: "ft" ~> Core.literalFloat (var "forFloat" @@ var "ft"),
-    _LiteralType_string>>: constant (Core.literalString (string ""))]) $
-  cases _Type (var "t")
-    Nothing [
-    _Type_annotated>>: "at" ~> var "inst" @@ var "tname" @@ (Core.annotatedTypeBody (var "at")),
-    _Type_application>>: constant (var "noPoly"),
-    _Type_function>>: constant (var "noPoly"),
-    _Type_forall>>: constant (var "noPoly"),
-    _Type_list>>: "et" ~> Logic.ifElse (var "minimal")
-      (right (Core.termList (list ([] :: [TTerm Term]))))
-      (Eithers.bind (var "inst" @@ var "tname" @@ var "et") (
-        "e" ~> right (Core.termList (list [var "e"])))),
-    _Type_literal>>: "lt" ~> right (Core.termLiteral (var "forLiteral" @@ var "lt")),
-    _Type_map>>: "mt" ~>
-      "kt" <~ Core.mapTypeKeys (var "mt") $
-      "vt" <~ Core.mapTypeValues (var "mt") $
-      Logic.ifElse (var "minimal")
-        (right (Core.termMap Maps.empty))
-        (Eithers.bind (var "inst" @@ var "tname" @@ var "kt") (
-          "ke" ~>
-          Eithers.bind (var "inst" @@ var "tname" @@ var "vt") (
-            "ve" ~> right (Core.termMap (Maps.singleton (var "ke") (var "ve")))))),
-    _Type_maybe>>: "ot" ~> Logic.ifElse (var "minimal")
-      (right (Core.termMaybe nothing))
-      (Eithers.bind (var "inst" @@ var "tname" @@ var "ot") (
-        "e" ~> right (Core.termMaybe (just (var "e"))))),
-    _Type_record>>: "rt" ~>
-      "toField" <~ ("ft" ~>
-        Eithers.bind (var "inst" @@ var "tname" @@ (Core.fieldTypeType (var "ft"))) (
-          "e" ~> right (Core.field (Core.fieldTypeName (var "ft")) (var "e")))) $
-      Eithers.bind (Eithers.mapList (var "toField") (var "rt")) (
-        "dfields" ~> right (Core.termRecord (Core.record (var "tname") (var "dfields")))),
-    _Type_set>>: "et" ~> Logic.ifElse (var "minimal")
-      (right (Core.termSet Sets.empty))
-      (Eithers.bind (var "inst" @@ var "tname" @@ var "et") (
-        "e" ~> right (Core.termSet (Sets.fromList (list [var "e"]))))),
-    _Type_variable>>: "vname" ~>
-      Maybes.maybe
-        (Ctx.failInContext (Error.errorResolution $ Error.resolutionErrorUnexpectedShape $ Error.unexpectedShapeError (string "bound type variable") (Strings.cat2 (string "unbound variable ") (Core.unName (var "vname")))) (var "cx"))
-        (var "inst" @@ var "vname")
-        (Maps.lookup (var "vname") (var "schema")),
-    _Type_wrap>>: "wt" ~>
-      Eithers.bind (var "inst" @@ var "tname" @@ var "wt") (
-        "e" ~> right (Core.termWrap (Core.wrappedTerm (var "tname") (var "e"))))]
-
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Unification.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Unification.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Unification.hs
+++ /dev/null
@@ -1,223 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Unification where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (joinTypes, unifyTypeConstraints, unifyTypeLists, unifyTypes, variableOccursInType)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Context      as Ctx
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Errors       as Error
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Strip as Strip
-import qualified Hydra.Sources.Kernel.Terms.Substitution as Substitution
-
-
-ns :: Namespace
-ns = Namespace "hydra.unification"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Rewriting.ns, ShowCore.ns, Strip.ns, Substitution.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Utilities for type unification.")}
-  where
-   definitions = [
-     toDefinition joinTypes,
-     toDefinition unifyTypeConstraints,
-     toDefinition unifyTypeLists,
-     toDefinition unifyTypes,
-     toDefinition variableOccursInType]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-joinTypes :: TTermDefinition (Context -> Type -> Type -> String -> Either UnificationError [TypeConstraint])
-joinTypes = define "joinTypes" $
-  doc ("Join two types, producing a list of type constraints."
-    <> "The comment is used to provide context for the constraints.") $
-  "cx" ~> "left" ~> "right" ~> "comment" ~>
-  "sleft" <~ Strip.deannotateType @@ var "left" $
-  "sright" <~ Strip.deannotateType @@ var "right" $
-  "joinOne" <~ ("l" ~> "r" ~> Typing.typeConstraint (var "l") (var "r") ((string "join types; ") ++ var "comment")) $
-  "cannotUnify" <~ Ctx.failInContext
-    (Error.unificationError (var "sleft") (var "sright")
-      ((string "cannot unify ") ++ (ShowCore.type_ @@ var "sleft") ++ (string " with ") ++ (ShowCore.type_ @@ var "sright")))
-    (var "cx") $
-  "assertEqual" <~ Logic.ifElse
-    (Equality.equal (var "sleft") (var "sright"))
-    (right (list ([] :: [TTerm TypeConstraint])))
-    (var "cannotUnify") $
-  "joinList" <~ ("lefts" ~> "rights" ~> Logic.ifElse
-    (Equality.equal (Lists.length (var "lefts")) (Lists.length (var "rights")))
-    (right (Lists.zipWith (var "joinOne") (var "lefts") (var "rights")))
-    (var "cannotUnify")) $
-  "joinRowTypes" <~ ("left" ~> "right" ~> Logic.ifElse
-    (Core.equalNameList_
-      (Lists.map (unaryFunction Core.fieldTypeName) (var "left"))
-      (Lists.map (unaryFunction Core.fieldTypeName) (var "right")))
-    (var "joinList"
-      @@ (Lists.map (unaryFunction Core.fieldTypeType) (var "left"))
-      @@ (Lists.map (unaryFunction Core.fieldTypeType) (var "right")))
-    (var "cannotUnify")) $
-  cases _Type (var "sleft") (Just (var "cannotUnify")) [
-    _Type_application>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_application>>: "r" ~> right (list [
-        var "joinOne" @@ (Core.applicationTypeFunction (var "l")) @@ (Core.applicationTypeFunction (var "r")),
-        var "joinOne" @@ (Core.applicationTypeArgument (var "l")) @@ (Core.applicationTypeArgument (var "r"))])],
-    _Type_either>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_either>>: "r" ~> right (list [
-        var "joinOne" @@ (Core.eitherTypeLeft (var "l")) @@ (Core.eitherTypeLeft (var "r")),
-        var "joinOne" @@ (Core.eitherTypeRight (var "l")) @@ (Core.eitherTypeRight (var "r"))])],
-    _Type_function>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_function>>: "r" ~> right (list [
-        var "joinOne" @@ (Core.functionTypeDomain (var "l")) @@ (Core.functionTypeDomain (var "r")),
-        var "joinOne" @@ (Core.functionTypeCodomain (var "l")) @@ (Core.functionTypeCodomain (var "r"))])],
-    _Type_list>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_list>>: "r" ~> right (list [
-        var "joinOne" @@ (var "l") @@ (var "r")])],
-    _Type_literal>>: constant (var "assertEqual"),
-    _Type_map>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_map>>: "r" ~> right (list [
-        var "joinOne" @@ (Core.mapTypeKeys (var "l")) @@ (Core.mapTypeKeys (var "r")),
-        var "joinOne" @@ (Core.mapTypeValues (var "l")) @@ (Core.mapTypeValues (var "r"))])],
-    _Type_maybe>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_maybe>>: "r" ~> right (list [
-        var "joinOne" @@ (var "l") @@ (var "r")])],
-    _Type_pair>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_pair>>: "r" ~> right (list [
-        var "joinOne" @@ (Core.pairTypeFirst (var "l")) @@ (Core.pairTypeFirst (var "r")),
-        var "joinOne" @@ (Core.pairTypeSecond (var "l")) @@ (Core.pairTypeSecond (var "r"))])],
-    _Type_record>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_record>>: "r" ~> var "joinRowTypes" @@ (var "l") @@ (var "r")],
-    _Type_set>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_set>>: "r" ~> right (list [
-        var "joinOne" @@ (var "l") @@ (var "r")])],
-    _Type_union>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_union>>: "r" ~> var "joinRowTypes" @@ (var "l") @@ (var "r")],
-    _Type_unit>>: constant (cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_unit>>: constant (right (list ([] :: [TTerm TypeConstraint])))]),
-    _Type_void>>: constant (cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_void>>: constant (right (list ([] :: [TTerm TypeConstraint])))]),
-    _Type_wrap>>: "l" ~> cases _Type (var "sright") (Just (var "cannotUnify")) [
-      _Type_wrap>>: "r" ~> right (list [
-        var "joinOne" @@ (var "l") @@ (var "r")])]]
-
-unifyTypeConstraints :: TTermDefinition (Context -> M.Map Name TypeScheme -> [TypeConstraint] -> Either UnificationError TypeSubst)
-unifyTypeConstraints = define "unifyTypeConstraints" $
-  doc (""
-    <> "Robinson's algorithm, following https://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec23.pdf\n"
-    <> "Specifically this is an implementation of the following rules:\n"
-    <> "  * Unify({(x, t)} ∪ E) = {t/x} Unify(E{t/x}) if x ∉ FV(t)\n"
-    <> "  * Unify(∅) = I (the identity substitution x ↦ x)\n"
-    <> "  * Unify({(x, x)} ∪ E) = Unify(E)\n"
-    <> "  * Unify({(f(s1, ..., sn), f(t1, ..., tn))} ∪ E) = Unify({(s1, t1), ..., (sn, tn)} ∪ E))") $
-  "cx" ~> "schemaTypes" ~> "constraints" ~>
-  "withConstraint" <~ ("c" ~> "rest" ~>
-    "sleft" <~ Strip.deannotateType @@ (Typing.typeConstraintLeft (var "c")) $
-    "sright" <~ Strip.deannotateType @@ (Typing.typeConstraintRight (var "c")) $
-    "comment" <~ Typing.typeConstraintComment (var "c") $
-    "bind" <~ ("v" ~> "t" ~>
-      "subst" <~ Substitution.singletonTypeSubst @@ var "v" @@ var "t" $
-      "withResult" <~ ("s" ~> Substitution.composeTypeSubst @@ var "subst" @@ var "s") $
-      Eithers.map (var "withResult") (unifyTypeConstraints @@ var "cx" @@ var "schemaTypes" @@ (Substitution.substituteInConstraints @@ var "subst" @@ var "rest"))) $
-    "tryBinding" <~ ("v" ~> "t" ~> Logic.ifElse (variableOccursInType @@ var "v" @@ var "t")
-      (Ctx.failInContext
-        (Error.unificationError (var "sleft") (var "sright")
-          ((string "Variable ") ++ (Core.unName (var "v")) ++ (string " appears free in type ") ++ (ShowCore.type_ @@ var "t")
-            ++ (string " (") ++ var "comment" ++ (string ")")))
-        (var "cx"))
-      (var "bind" @@ var "v" @@ var "t")) $
-    "noVars" <~ (
-      "withConstraints" <~ ("constraints2" ~> unifyTypeConstraints @@ var "cx" @@ var "schemaTypes" @@ (Lists.concat2 (var "constraints2") (var "rest"))) $
-      Eithers.bind (joinTypes @@ var "cx" @@ var "sleft" @@ var "sright" @@ var "comment") (var "withConstraints")) $
-    "dflt" <~ cases _Type (var "sright")
-      (Just (var "noVars")) [
-      _Type_variable>>: "name" ~> var "tryBinding" @@ var "name" @@ var "sleft"] $
-    cases _Type (var "sleft")
-      (Just $ var "dflt") [
-      _Type_variable>>: "name" ~> cases _Type (var "sright")
-        (Just (var "tryBinding" @@ var "name" @@ var "sright")) [
-        _Type_variable>>: "name2" ~> Logic.ifElse (Core.equalName_ (var "name") (var "name2"))
-          (unifyTypeConstraints @@ var "cx" @@ var "schemaTypes" @@ var "rest")
-          (Logic.ifElse (Maybes.isJust (Maps.lookup (var "name") (var "schemaTypes")))
-            (Logic.ifElse (Maybes.isJust (Maps.lookup (var "name2") (var "schemaTypes")))
-              (Ctx.failInContext
-                (Error.unificationError (var "sleft") (var "sright")
-                  ((string "Attempted to unify schema names ") ++ (Core.unName (var "name")) ++ (string " and ") ++ (Core.unName (var "name2"))
-                    ++ (string " (") ++ var "comment" ++ (string ")")))
-                (var "cx"))
-              (var "bind" @@ var "name2" @@ var "sleft"))
-            (var "bind" @@ var "name" @@ var "sright"))]]) $
-  Maybes.maybe
-    (right (asTerm Substitution.idTypeSubst))
-    ("uc" ~> var "withConstraint" @@ (Pairs.first $ var "uc") @@ (Pairs.second $ var "uc"))
-    (Lists.uncons $ var "constraints")
-
-unifyTypeLists :: TTermDefinition (Context -> M.Map Name TypeScheme -> [Type] -> [Type] -> String -> Either UnificationError TypeSubst)
-unifyTypeLists = define "unifyTypeLists" $
-  "cx" ~> "schemaTypes" ~> "l" ~> "r" ~> "comment" ~>
-  "toConstraint" <~ ("l" ~> "r" ~> Typing.typeConstraint (var "l") (var "r") (var "comment")) $
-  unifyTypeConstraints @@ var "cx" @@ var "schemaTypes" @@ (Lists.zipWith (var "toConstraint") (var "l") (var "r"))
-
-unifyTypes :: TTermDefinition (Context -> M.Map Name TypeScheme -> Type -> Type -> String -> Either UnificationError TypeSubst)
-unifyTypes = define "unifyTypes" $
-  "cx" ~> "schemaTypes" ~> "l" ~> "r" ~> "comment" ~>
-  unifyTypeConstraints @@ var "cx" @@ var "schemaTypes" @@ list [Typing.typeConstraint (var "l") (var "r") (var "comment")]
-
-variableOccursInType :: TTermDefinition (Name -> Type -> Bool)
-variableOccursInType = define "variableOccursInType" $
-  doc ("Determine whether a type variable appears within a type expression."
-    <> "No distinction is made between free and bound type variables.") $
-  "var" ~> "typ0" ~>
-  "tryType" <~ ("b" ~> "typ" ~> match _Type (Just (var "b")) [
-    _Type_variable>>: "v" ~> Logic.or (var "b") (Core.equalName_ (var "v") (var "var"))]
-    @@ var "typ") $
-  Rewriting.foldOverType @@ Coders.traversalOrderPre @@ var "tryType" @@ false @@ var "typ0"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Validate/Core.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Validate/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Validate/Core.hs
+++ /dev/null
@@ -1,780 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Validate.Core where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths    as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms hiding (
-  binding, elimination, field, fields, fieldType, floatType, floatValue, function, injection, integerType,
-  integerValue, lambda, literal, literalType, term, type_, typeScheme)
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import qualified Hydra.Dsl.Errors            as Error
-import qualified Hydra.Dsl.Error.Core       as ErrorsCore
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-
-
-ns :: Namespace
-ns = Namespace "hydra.validate.core"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Rewriting.ns, Variables.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Validation functions for core terms and types"}
-  where
-   definitions = [
-     toDefinition checkDuplicateBindings,
-     toDefinition checkDuplicateFields,
-     toDefinition checkDuplicateFieldTypes,
-     toDefinition checkShadowing,
-     toDefinition checkTerm,
-     toDefinition validateTypeNode,
-     toDefinition checkUndefinedTypeVariablesInType,
-     toDefinition checkUndefinedTypeVariablesInTypeScheme,
-     toDefinition checkVoid,
-     toDefinition findDuplicate,
-     toDefinition findDuplicateFieldType,
-     toDefinition firstError,
-     toDefinition firstTypeError,
-     toDefinition isValidName,
-     toDefinition term,
-     toDefinition type_]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | A Nothing of type Maybe InvalidTermError
-noError :: TTerm (Maybe InvalidTermError)
-noError = TTerm $ TermMaybe Nothing
-
--- | A Just of type InvalidTermError -> Maybe InvalidTermError
-justError :: TTerm InvalidTermError -> TTerm (Maybe InvalidTermError)
-justError (TTerm t) = TTerm $ TermMaybe $ Just t
-
--- | Helper to make a just from a TTerm
-mkJust :: TTerm InvalidTermError -> TTerm (Maybe InvalidTermError)
-mkJust = just
-
--- | Return the first Just from a list of Maybe values, or Nothing
-firstError :: TTermDefinition ([Maybe InvalidTermError] -> Maybe InvalidTermError)
-firstError = define "firstError" $
-  doc "Return the first error from a list of optional errors, or nothing if all are valid" $
-  "checks" ~>
-  Lists.foldl
-    ("acc" ~> "check" ~>
-      Maybes.cases (var "acc")
-        (var "check")
-        (constant $ var "acc"))
-    noError
-    (var "checks")
-
-term :: TTermDefinition (Bool -> Graph -> Term -> Maybe InvalidTermError)
-term = define "term" $
-  doc "Validate a term, returning the first error found or nothing if valid. The 'typed' parameter indicates whether to expect System F (typed) terms; when true, type variable binding checks and UntypedTermVariableError are active." $
-  "typed" ~> "g" ~> "t" ~>
-  Rewriting.foldTermWithGraphAndPath
-    @@ ("recurse" ~> "path" ~> "cx" ~> "acc" ~> "trm" ~>
-      -- If we already found an error, short-circuit
-      Maybes.cases (var "acc")
-        -- No error yet: check the current term, then recurse into subterms
-        ("checkResult" <~ (checkTerm @@ var "typed" @@ (wrap _SubtermPath $ var "path") @@ var "cx" @@ var "trm") $
-          Maybes.cases (var "checkResult")
-            -- No error at this term: let the framework recurse into subterms
-            (var "recurse" @@ noError @@ var "trm")
-            -- Found an error: return it
-            ("err" ~> justError (var "err")))
-        -- Already have an error: propagate it
-        ("_" ~> var "acc"))
-    @@ var "g"
-    @@ noError
-    @@ var "t"
-
--- | Check a single term node for validation errors (without recursing into subterms).
--- The Graph provides bound variable information; the typed flag controls System F checks.
-checkTerm :: TTermDefinition (Bool -> SubtermPath -> Graph -> Term -> Maybe InvalidTermError)
-checkTerm = define "checkTerm" $
-  doc "Check a single term node for validation errors" $
-  "typed" ~> "path" ~> "cx" ~> "term" ~>
-  cases _Term (var "term") (Just noError) [
-
-    -- T16/T20/T21: TermAnnotated — check for nested or empty annotations
-    _Term_annotated>>: "ann" ~>
-      "body" <~ Core.annotatedTermBody (var "ann") $
-      "annMap" <~ Core.annotatedTermAnnotation (var "ann") $
-      firstError @@ list [
-        -- T21. EmptyTermAnnotationError
-        Logic.ifElse (Maps.null $ var "annMap")
-          (mkJust $ inject _InvalidTermError _InvalidTermError_emptyTermAnnotation $
-            record _EmptyTermAnnotationError [
-              _EmptyTermAnnotationError_location>>: var "path"])
-          noError,
-        -- T20. NestedTermAnnotationError
-        cases _Term (var "body") (Just noError) [
-          _Term_annotated>>: constant $
-            mkJust $ inject _InvalidTermError _InvalidTermError_nestedTermAnnotation $
-              record _NestedTermAnnotationError [
-                _NestedTermAnnotationError_location>>: var "path"]]],
-
-    -- TermApplication — check for constant conditions, self-application,
-    -- identity application, redundant wrap/unwrap
-    _Term_application>>: "app" ~>
-      "fun" <~ Core.applicationFunction (var "app") $
-      "arg" <~ Core.applicationArgument (var "app") $
-      firstError @@ list [
-        -- T13. ConstantConditionError: ifElse applied to a literal boolean
-        cases _Term (var "fun") (Just noError) [
-          _Term_variable>>: "primName" ~>
-            Logic.ifElse (Equality.equal (Core.unName $ var "primName") (string "hydra.lib.logic.ifElse"))
-              (cases _Term (var "arg") (Just noError) [
-                _Term_literal>>: "lit" ~>
-                  cases _Literal (var "lit") (Just noError) [
-                    _Literal_boolean>>: "boolVal" ~>
-                      mkJust $ inject _InvalidTermError _InvalidTermError_constantCondition $
-                        record _ConstantConditionError [
-                          _ConstantConditionError_location>>: var "path",
-                          _ConstantConditionError_value>>: var "boolVal"]]])
-              noError],
-        -- T15. SelfApplicationError: (TermVariable x) applied to (TermVariable x)
-        cases _Term (var "fun") (Just noError) [
-          _Term_variable>>: "funName" ~>
-            cases _Term (var "arg") (Just noError) [
-              _Term_variable>>: "argName" ~>
-                Logic.ifElse (Equality.equal (var "funName") (var "argName"))
-                  (mkJust $ inject _InvalidTermError _InvalidTermError_selfApplication $
-                    record _SelfApplicationError [
-                      _SelfApplicationError_location>>: var "path",
-                      _SelfApplicationError_name>>: var "funName"])
-                  noError]],
-        -- T16. UnnecessaryIdentityApplicationError: (\x -> x) applied to arg
-        cases _Term (var "fun") (Just noError) [
-          _Term_lambda>>: "lam" ~>
-            "param" <~ Core.lambdaParameter (var "lam") $
-            "body" <~ Core.lambdaBody (var "lam") $
-            cases _Term (var "body") (Just noError) [
-              _Term_variable>>: "bodyVar" ~>
-                Logic.ifElse (Equality.equal (var "param") (var "bodyVar"))
-                  (mkJust $ inject _InvalidTermError _InvalidTermError_unnecessaryIdentityApplication $
-                    record _UnnecessaryIdentityApplicationError [
-                      _UnnecessaryIdentityApplicationError_location>>: var "path"])
-                  noError]],
-        -- T14. RedundantWrapUnwrapError: unwrap(n) applied to wrap(n, _)
-        cases _Term (var "fun") (Just noError) [
-          _Term_unwrap>>: "unwrapName" ~>
-            cases _Term (var "arg") (Just noError) [
-              _Term_wrap>>: "wt" ~>
-                "wrapName" <~ Core.wrappedTermTypeName (var "wt") $
-                Logic.ifElse (Equality.equal (var "unwrapName") (var "wrapName"))
-                  (mkJust $ inject _InvalidTermError _InvalidTermError_redundantWrapUnwrap $
-                    record _RedundantWrapUnwrapError [
-                      _RedundantWrapUnwrapError_location>>: var "path",
-                      _RedundantWrapUnwrapError_typeName>>: var "unwrapName"])
-                  noError]]],
-
-    -- T5: TermRecord — check for empty type name, duplicate fields
-    _Term_record>>: "rec" ~>
-      "tname" <~ Core.recordTypeName (var "rec") $
-      "flds" <~ Core.recordFields (var "rec") $
-      firstError @@ list [
-        -- T5. EmptyTypeNameInTermError
-        Logic.ifElse (Equality.equal (Core.unName $ var "tname") (string ""))
-          (mkJust $ inject _InvalidTermError _InvalidTermError_emptyTypeNameInTerm $
-            record _EmptyTypeNameInTermError [
-              _EmptyTypeNameInTermError_location>>: var "path"])
-          noError,
-        -- T3. DuplicateRecordFieldNamesError (via DuplicateFieldError)
-        checkDuplicateFields @@ var "path" @@ (Lists.map
-          (unaryFunction Core.fieldName)
-          (var "flds"))],
-
-    -- T1/T2/T10/T11/T18: TermLet — empty bindings, duplicates, shadowing, naming, type var checks
-    _Term_let>>: "lt" ~>
-      "bindings" <~ Core.letBindings (var "lt") $
-      "names" <~ Lists.map (unaryFunction Core.bindingName) (var "bindings") $
-      firstError @@ list [
-        -- T1. EmptyLetBindingsError
-        Logic.ifElse (Lists.null $ var "bindings")
-          (mkJust $ inject _InvalidTermError _InvalidTermError_emptyLetBindings $
-            record _EmptyLetBindingsError [
-              _EmptyLetBindingsError_location>>: var "path"])
-          noError,
-        -- T2. DuplicateLetBindingNamesError (via DuplicateBindingError)
-        checkDuplicateBindings @@ var "path" @@ var "bindings",
-        -- T11. TermVariableShadowingError — deferred for let bindings.
-        -- The fold framework extends the graph BEFORE calling checkTerm, so we cannot
-        -- reliably detect shadowing without a pre-extension graph. Needs a new rewriting
-        -- helper that passes both pre- and post-extension graphs.
-        noError,
-        -- T18. InvalidLetBindingNameError — check each binding name
-        firstError @@ (Lists.map
-          ("bname" ~> Logic.ifElse (isValidName @@ var "bname")
-            noError
-            (mkJust $ inject _InvalidTermError _InvalidTermError_invalidLetBindingName $
-              record _InvalidLetBindingNameError [
-                _InvalidLetBindingNameError_location>>: var "path",
-                _InvalidLetBindingNameError_name>>: var "bname"]))
-          (var "names")),
-        -- T10. UndefinedTypeVariableInBindingTypeError (typed mode only)
-        Logic.ifElse (var "typed")
-          (firstError @@ (Lists.map
-            ("b" ~> Maybes.cases (Core.bindingTypeScheme $ var "b")
-              noError
-              ("ts" ~> checkUndefinedTypeVariablesInTypeScheme
-                @@ var "path" @@ var "cx" @@ var "ts"
-                @@ ("uvName" ~>
-                  mkJust $ inject _InvalidTermError _InvalidTermError_undefinedTypeVariableInBindingType $
-                    record _UndefinedTypeVariableInBindingTypeError [
-                      _UndefinedTypeVariableInBindingTypeError_location>>: var "path",
-                      _UndefinedTypeVariableInBindingTypeError_name>>: var "uvName"])))
-            (var "bindings")))
-          noError],
-
-    -- T5: TermInject (injection) — check for empty type name
-    _Term_inject>>: "inj" ~>
-      "tname" <~ Core.injectionTypeName (var "inj") $
-      Logic.ifElse (Equality.equal (Core.unName $ var "tname") (string ""))
-        (mkJust $ inject _InvalidTermError _InvalidTermError_emptyTypeNameInTerm $
-          record _EmptyTypeNameInTermError [
-            _EmptyTypeNameInTermError_location>>: var "path"])
-        noError,
-
-    -- T11/T17/T8: Lambda — shadowing, naming, undefined type vars in domain
-    _Term_lambda>>: "lam" ~>
-      "paramName" <~ Core.lambdaParameter (var "lam") $
-      firstError @@ list [
-        -- T11. TermVariableShadowingError
-        -- Note: the graph has already been extended with this lambda's parameter.
-        -- We check graphBoundTerms (not modified by lambdas) to detect let-to-lambda shadowing.
-        -- Lambda-to-lambda shadowing is not detected here due to the pre-extension.
-        Logic.ifElse
-          (Maybes.isJust $ Maps.lookup (var "paramName") (Graph.graphBoundTerms $ var "cx"))
-          (mkJust $ inject _InvalidTermError _InvalidTermError_termVariableShadowing $
-            record _TermVariableShadowingError [
-              _TermVariableShadowingError_location>>: var "path",
-              _TermVariableShadowingError_name>>: var "paramName"])
-          noError,
-        -- T17. InvalidLambdaParameterNameError
-        Logic.ifElse (isValidName @@ var "paramName")
-          noError
-          (mkJust $ inject _InvalidTermError _InvalidTermError_invalidLambdaParameterName $
-            record _InvalidLambdaParameterNameError [
-              _InvalidLambdaParameterNameError_location>>: var "path",
-              _InvalidLambdaParameterNameError_name>>: var "paramName"]),
-        -- T8. UndefinedTypeVariableInLambdaDomainError (typed mode only)
-        Logic.ifElse (var "typed")
-          (Maybes.cases (Core.lambdaDomain $ var "lam")
-            noError
-            ("dom" ~> checkUndefinedTypeVariablesInType
-              @@ var "path" @@ var "cx" @@ var "dom"
-              @@ ("uvName" ~>
-                mkJust $ inject _InvalidTermError _InvalidTermError_undefinedTypeVariableInLambdaDomain $
-                  record _UndefinedTypeVariableInLambdaDomainError [
-                    _UndefinedTypeVariableInLambdaDomainError_location>>: var "path",
-                    _UndefinedTypeVariableInLambdaDomainError_name>>: var "uvName"])))
-          noError],
-    -- T5: Projection — check empty type name
-    _Term_project>>: "proj" ~>
-      "tname" <~ Core.projectionTypeName (var "proj") $
-      Logic.ifElse (Equality.equal (Core.unName $ var "tname") (string ""))
-        (mkJust $ inject _InvalidTermError _InvalidTermError_emptyTypeNameInTerm $
-          record _EmptyTypeNameInTermError [
-            _EmptyTypeNameInTermError_location>>: var "path"])
-        noError,
-    -- T4/T5/T6: CaseStatement — check empty type name, empty cases, duplicate case fields
-    _Term_cases>>: "cs" ~>
-      "tname" <~ Core.caseStatementTypeName (var "cs") $
-      "csDefault" <~ Core.caseStatementDefault (var "cs") $
-      "csCases" <~ Core.caseStatementCases (var "cs") $
-      firstError @@ list [
-        -- T5. EmptyTypeNameInTermError
-        Logic.ifElse (Equality.equal (Core.unName $ var "tname") (string ""))
-          (mkJust $ inject _InvalidTermError _InvalidTermError_emptyTypeNameInTerm $
-            record _EmptyTypeNameInTermError [
-              _EmptyTypeNameInTermError_location>>: var "path"])
-          noError,
-        -- T6. EmptyCaseStatementError
-        Logic.ifElse
-          (Logic.and (Lists.null $ var "csCases") (Maybes.isNothing $ var "csDefault"))
-          (mkJust $ inject _InvalidTermError _InvalidTermError_emptyCaseStatement $
-            record _EmptyCaseStatementError [
-              _EmptyCaseStatementError_location>>: var "path",
-              _EmptyCaseStatementError_typeName>>: var "tname"])
-          noError,
-        -- T4. DuplicateCaseStatementFieldNamesError (via DuplicateFieldError)
-        checkDuplicateFields @@ var "path" @@ (Lists.map
-          (unaryFunction Core.fieldName)
-          (var "csCases"))],
-
-    -- T9. UndefinedTypeVariableInTypeApplicationError (typed mode only)
-    _Term_typeApplication>>: "ta" ~>
-      Logic.ifElse (var "typed")
-        (checkUndefinedTypeVariablesInType
-          @@ var "path" @@ var "cx" @@ (Core.typeApplicationTermType $ var "ta")
-          @@ ("uvName" ~>
-            mkJust $ inject _InvalidTermError _InvalidTermError_undefinedTypeVariableInTypeApplication $
-              record _UndefinedTypeVariableInTypeApplicationError [
-                _UndefinedTypeVariableInTypeApplicationError_location>>: var "path",
-                _UndefinedTypeVariableInTypeApplicationError_name>>: var "uvName"]))
-        noError,
-
-    -- T12/T19: TypeLambda — type variable shadowing and naming
-    _Term_typeLambda>>: "tl" ~>
-      "tvName" <~ Core.typeLambdaParameter (var "tl") $
-      firstError @@ list [
-        -- T12. TypeVariableShadowingInTypeLambdaError
-        -- Note: the graph has already been extended with this type lambda's parameter.
-        Logic.ifElse
-          (Sets.member (var "tvName") (Sets.delete (var "tvName") (Graph.graphTypeVariables $ var "cx")))
-          (mkJust $ inject _InvalidTermError _InvalidTermError_typeVariableShadowingInTypeLambda $
-            record _TypeVariableShadowingInTypeLambdaError [
-              _TypeVariableShadowingInTypeLambdaError_location>>: var "path",
-              _TypeVariableShadowingInTypeLambdaError_name>>: var "tvName"])
-          noError,
-        -- T19. InvalidTypeLambdaParameterNameError
-        Logic.ifElse (isValidName @@ var "tvName")
-          noError
-          (mkJust $ inject _InvalidTermError _InvalidTermError_invalidTypeLambdaParameterName $
-            record _InvalidTypeLambdaParameterNameError [
-              _InvalidTypeLambdaParameterNameError_location>>: var "path",
-              _InvalidTypeLambdaParameterNameError_name>>: var "tvName"])],
-
-    -- T7. UndefinedTermVariableError — check boundTerms, lambdaVariables, and primitives
-    _Term_variable>>: "varName" ~>
-      Logic.ifElse
-        (Logic.or
-          (Maybes.isJust $ Maps.lookup (var "varName") (Graph.graphBoundTerms $ var "cx"))
-          (Logic.or
-            (Sets.member (var "varName") (Graph.graphLambdaVariables $ var "cx"))
-            (Maybes.isJust $ Maps.lookup (var "varName") (Graph.graphPrimitives $ var "cx"))))
-        noError
-        (mkJust $ inject _InvalidTermError _InvalidTermError_undefinedTermVariable $
-          record _UndefinedTermVariableError [
-            _UndefinedTermVariableError_location>>: var "path",
-            _UndefinedTermVariableError_name>>: var "varName"]),
-
-    -- T5: TermWrap — check for empty type name
-    _Term_wrap>>: "wt" ~>
-      "tname" <~ Core.wrappedTermTypeName (var "wt") $
-      Logic.ifElse (Equality.equal (Core.unName $ var "tname") (string ""))
-        (mkJust $ inject _InvalidTermError _InvalidTermError_emptyTypeNameInTerm $
-          record _EmptyTypeNameInTermError [
-            _EmptyTypeNameInTermError_location>>: var "path"])
-        noError]
-
--- | Check a list of names for shadowing against the current graph scope
-checkShadowing :: TTermDefinition (SubtermPath -> Graph -> [Name] -> Maybe InvalidTermError)
-checkShadowing = define "checkShadowing" $
-  doc "Check if any name in a list shadows a variable already in scope" $
-  "path" ~> "cx" ~> "names" ~>
-  -- Find the first name that is already bound
-  "result" <~ Lists.foldl
-    ("acc" ~> "name" ~>
-      Maybes.cases (var "acc")
-        (Logic.ifElse
-          (Logic.or
-            (Maybes.isJust $ Maps.lookup (var "name") (Graph.graphBoundTerms $ var "cx"))
-            (Sets.member (var "name") (Graph.graphLambdaVariables $ var "cx")))
-          (mkJust $ inject _InvalidTermError _InvalidTermError_termVariableShadowing $
-            record _TermVariableShadowingError [
-              _TermVariableShadowingError_location>>: var "path",
-              _TermVariableShadowingError_name>>: var "name"])
-          noError)
-        (constant $ var "acc"))
-    noError
-    (var "names") $
-  var "result"
-
--- | Check a list of bindings for duplicate names
-checkDuplicateBindings :: TTermDefinition (SubtermPath -> [Binding] -> Maybe InvalidTermError)
-checkDuplicateBindings = define "checkDuplicateBindings" $
-  doc "Check for duplicate binding names in a list of bindings" $
-  "path" ~> "bindings" ~>
-  "names" <~ Lists.map (unaryFunction Core.bindingName) (var "bindings") $
-  "dup" <~ findDuplicate @@ var "names" $
-  Maybes.map ("name" ~>
-    inject _InvalidTermError _InvalidTermError_duplicateBinding $
-      record _DuplicateBindingError [
-        _DuplicateBindingError_location>>: var "path",
-        _DuplicateBindingError_name>>: var "name"])
-    (var "dup")
-
--- | Check a list of field names for duplicates
-checkDuplicateFields :: TTermDefinition (SubtermPath -> [Name] -> Maybe InvalidTermError)
-checkDuplicateFields = define "checkDuplicateFields" $
-  doc "Check for duplicate field names in a list of fields" $
-  "path" ~> "names" ~>
-  "dup" <~ findDuplicate @@ var "names" $
-  Maybes.map ("name" ~>
-    inject _InvalidTermError _InvalidTermError_duplicateField $
-      record _DuplicateFieldError [
-        _DuplicateFieldError_location>>: var "path",
-        _DuplicateFieldError_name>>: var "name"])
-    (var "dup")
-
--- | Find the first duplicate in a list, if any
-findDuplicate :: TTermDefinition ([Name] -> Maybe Name)
-findDuplicate = define "findDuplicate" $
-  doc "Find the first duplicate name in a list" $
-  "names" ~>
-  -- Fold through names, tracking seen names in a set.
-  -- Accumulator is (Set Name, Maybe Name): seen set and first duplicate found.
-  "result" <~ Lists.foldl
-    ("acc" ~> "name" ~>
-      "seen" <~ Pairs.first (var "acc") $
-      "dup" <~ Pairs.second (var "acc") $
-      Maybes.cases (var "dup")
-        (Logic.ifElse (Sets.member (var "name") (var "seen"))
-          (pair (var "seen") (just $ var "name"))
-          (pair (Sets.insert (var "name") (var "seen")) nothing))
-        (constant $ var "acc"))
-    (pair Sets.empty nothing)
-    (var "names") $
-  Pairs.second (var "result")
-
--- | Validate a name at an introduction site.
--- Currently only rejects empty strings; may be extended with additional naming conventions.
-isValidName :: TTermDefinition (Name -> Bool)
-isValidName = define "isValidName" $
-  doc "Check whether a name is valid at an introduction site. Currently rejects empty strings." $
-  "name" ~>
-  Logic.not $ Equality.equal (Core.unName $ var "name") (string "")
-
--- | Check a type for undefined type variables against the current graph scope.
--- Takes a path, graph, type, and a handler function that receives the first undefined variable name
--- and returns an error. Returns Nothing if all type variables are defined.
-checkUndefinedTypeVariablesInType :: TTermDefinition (SubtermPath -> Graph -> Type -> (Name -> Maybe InvalidTermError) -> Maybe InvalidTermError)
-checkUndefinedTypeVariablesInType = define "checkUndefinedTypeVariablesInType" $
-  doc "Check a type for type variables not bound in the current scope" $
-  "path" ~> "cx" ~> "typ" ~> "mkError" ~>
-  "freeVars" <~ Variables.freeVariablesInType @@ var "typ" $
-  "undefined" <~ Sets.difference (var "freeVars") (Graph.graphTypeVariables $ var "cx") $
-  Maybes.maybe
-    noError
-    ("firstUndefined" ~> var "mkError" @@ var "firstUndefined")
-    (Lists.maybeHead $ Sets.toList $ var "undefined")
-
--- | Check a type scheme for undefined type variables against the current graph scope.
--- The scheme's own bound variables are excluded before checking.
-checkUndefinedTypeVariablesInTypeScheme :: TTermDefinition (SubtermPath -> Graph -> TypeScheme -> (Name -> Maybe InvalidTermError) -> Maybe InvalidTermError)
-checkUndefinedTypeVariablesInTypeScheme = define "checkUndefinedTypeVariablesInTypeScheme" $
-  doc "Check a type scheme for type variables not bound by the scheme or the current scope" $
-  "path" ~> "cx" ~> "ts" ~> "mkError" ~>
-  "freeVars" <~ Variables.freeVariablesInTypeScheme @@ var "ts" $
-  "undefined" <~ Sets.difference (var "freeVars") (Graph.graphTypeVariables $ var "cx") $
-  Maybes.maybe
-    noError
-    ("firstUndefined" ~> var "mkError" @@ var "firstUndefined")
-    (Lists.maybeHead $ Sets.toList $ var "undefined")
-
--- ============================================================================
--- Type validation
--- ============================================================================
-
--- | A Nothing of type Maybe InvalidTypeError
-noTypeError :: TTerm (Maybe InvalidTypeError)
-noTypeError = TTerm $ TermMaybe Nothing
-
--- | A Just of type InvalidTypeError -> Maybe InvalidTypeError
-mkJustType :: TTerm InvalidTypeError -> TTerm (Maybe InvalidTypeError)
-mkJustType = just
-
--- | Return the first Just from a list of Maybe InvalidTypeError values
-firstTypeError :: TTermDefinition ([Maybe InvalidTypeError] -> Maybe InvalidTypeError)
-firstTypeError = define "firstTypeError" $
-  doc "Return the first type error from a list of optional errors, or nothing if all are valid" $
-  "checks" ~>
-  Lists.foldl
-    ("acc" ~> "check" ~>
-      Maybes.cases (var "acc")
-        (var "check")
-        (constant $ var "acc"))
-    noTypeError
-    (var "checks")
-
--- | Validate a type, returning the first error found or nothing if valid.
--- Recursively traverses the type, tracking bound type variables through forall binders.
-type_ :: TTermDefinition (S.Set Name -> Type -> Maybe InvalidTypeError)
-type_ = define "type" $
-  doc "Validate a type, returning the first error found or nothing if valid. The first argument is the set of type variables already in scope." $
-  "boundVars" ~> "typ" ~>
-  -- Check the current node first
-  "checkResult" <~ validateTypeNode @@ var "boundVars" @@ var "typ" $
-  Maybes.cases (var "checkResult")
-    -- No error at this node: recurse into subtypes with updated scope
-    (cases _Type (var "typ") (Just noTypeError) [
-      -- For forall, extend bound vars before recursing into the body
-      _Type_forall>>: "ft" ~>
-        "newBound" <~ Sets.insert (Core.forallTypeParameter $ var "ft") (var "boundVars") $
-        type_ @@ var "newBound" @@ (Core.forallTypeBody $ var "ft"),
-      -- For all other types, recurse into subtypes with the same bound vars
-      _Type_annotated>>: "ann" ~> type_ @@ var "boundVars" @@ (Core.annotatedTypeBody $ var "ann"),
-      _Type_application>>: "at" ~>
-        firstTypeError @@ list [
-          type_ @@ var "boundVars" @@ (Core.applicationTypeFunction $ var "at"),
-          type_ @@ var "boundVars" @@ (Core.applicationTypeArgument $ var "at")],
-      _Type_either>>: "et" ~>
-        firstTypeError @@ list [
-          type_ @@ var "boundVars" @@ (Core.eitherTypeLeft $ var "et"),
-          type_ @@ var "boundVars" @@ (Core.eitherTypeRight $ var "et")],
-      _Type_function>>: "ft" ~>
-        firstTypeError @@ list [
-          type_ @@ var "boundVars" @@ (Core.functionTypeDomain $ var "ft"),
-          type_ @@ var "boundVars" @@ (Core.functionTypeCodomain $ var "ft")],
-      _Type_list>>: "lt" ~> type_ @@ var "boundVars" @@ var "lt",
-      _Type_map>>: "mt" ~>
-        firstTypeError @@ list [
-          type_ @@ var "boundVars" @@ (Core.mapTypeKeys $ var "mt"),
-          type_ @@ var "boundVars" @@ (Core.mapTypeValues $ var "mt")],
-      _Type_maybe>>: "mt" ~> type_ @@ var "boundVars" @@ var "mt",
-      _Type_pair>>: "pt" ~>
-        firstTypeError @@ list [
-          type_ @@ var "boundVars" @@ (Core.pairTypeFirst $ var "pt"),
-          type_ @@ var "boundVars" @@ (Core.pairTypeSecond $ var "pt")],
-      _Type_record>>: "fields" ~>
-        firstTypeError @@ (Lists.map
-          ("f" ~> type_ @@ var "boundVars" @@ (Core.fieldTypeType $ var "f"))
-          (var "fields")),
-      _Type_set>>: "st" ~> type_ @@ var "boundVars" @@ var "st",
-      _Type_union>>: "fields" ~>
-        firstTypeError @@ (Lists.map
-          ("f" ~> type_ @@ var "boundVars" @@ (Core.fieldTypeType $ var "f"))
-          (var "fields")),
-      _Type_wrap>>: "wt" ~> type_ @@ var "boundVars" @@ var "wt"])
-    -- Found an error: return it immediately
-    ("err" ~> mkJustType (var "err"))
-
--- | Check if a type is TypeVoid and return a VoidInNonBottomPositionError if so
-checkVoid :: TTermDefinition (Type -> Maybe InvalidTypeError)
-checkVoid = define "checkVoid" $
-  doc "Return an error if the given type is TypeVoid" $
-  "typ" ~>
-  cases _Type (var "typ") (Just noTypeError) [
-    _Type_void>>: constant $
-      mkJustType $ inject _InvalidTypeError _InvalidTypeError_voidInNonBottomPosition $
-        record _VoidInNonBottomPositionError [
-          _VoidInNonBottomPositionError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep]))]]
-
--- | Check a single type node for validation errors (without recursing into subtypes).
-validateTypeNode :: TTermDefinition (S.Set Name -> Type -> Maybe InvalidTypeError)
-validateTypeNode = define "validateTypeNode" $
-  doc "Check a single type node for validation errors" $
-  "boundVars" ~> "typ" ~>
-  cases _Type (var "typ") (Just noTypeError) [
-
-    -- Y8/Y9: TypeAnnotated — nested or empty annotations
-    _Type_annotated>>: "ann" ~>
-      "body" <~ Core.annotatedTypeBody (var "ann") $
-      "annMap" <~ Core.annotatedTypeAnnotation (var "ann") $
-      firstTypeError @@ list [
-        -- Y9. EmptyTypeAnnotationError
-        Logic.ifElse (Maps.null $ var "annMap")
-          (mkJustType $ inject _InvalidTypeError _InvalidTypeError_emptyTypeAnnotation $
-            record _EmptyTypeAnnotationError [
-              _EmptyTypeAnnotationError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep]))])
-          noTypeError,
-        -- Y8. NestedTypeAnnotationError
-        cases _Type (var "body") (Just noTypeError) [
-          _Type_annotated>>: constant $
-            mkJustType $ inject _InvalidTypeError _InvalidTypeError_nestedTypeAnnotation $
-              record _NestedTypeAnnotationError [
-                _NestedTypeAnnotationError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep]))]]],
-
-    -- Y10: TypeEither — void in either components
-    _Type_either>>: "et" ~>
-      firstTypeError @@ list [
-        checkVoid @@ (Core.eitherTypeLeft $ var "et"),
-        checkVoid @@ (Core.eitherTypeRight $ var "et")],
-
-    -- Y7/Y13: TypeForall — type variable shadowing and naming
-    _Type_forall>>: "ft" ~>
-      "paramName" <~ Core.forallTypeParameter (var "ft") $
-      firstTypeError @@ list [
-        -- Y7. TypeVariableShadowingInForallError
-        Logic.ifElse (Sets.member (var "paramName") (var "boundVars"))
-          (mkJustType $ inject _InvalidTypeError _InvalidTypeError_typeVariableShadowingInForall $
-            record _TypeVariableShadowingInForallError [
-              _TypeVariableShadowingInForallError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-              _TypeVariableShadowingInForallError_name>>: var "paramName"])
-          noTypeError,
-        -- Y13. InvalidForallParameterNameError
-        Logic.ifElse (isValidName @@ var "paramName")
-          noTypeError
-          (mkJustType $ inject _InvalidTypeError _InvalidTypeError_invalidForallParameterName $
-            record _InvalidForallParameterNameError [
-              _InvalidForallParameterNameError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-              _InvalidForallParameterNameError_name>>: var "paramName"])],
-
-    -- Y10: TypeFunction — void in codomain
-    _Type_function>>: "ft" ~>
-      checkVoid @@ (Core.functionTypeCodomain $ var "ft"),
-
-    -- Y10: TypeList — void element type
-    _Type_list>>: "lt" ~> checkVoid @@ var "lt",
-
-    -- Y11/Y10: TypeMap — non-comparable key type, void in key/value
-    _Type_map>>: "mt" ~>
-      "keyType" <~ Core.mapTypeKeys (var "mt") $
-      firstTypeError @@ list [
-        cases _Type (var "keyType") (Just noTypeError) [
-          _Type_function>>: constant $
-            mkJustType $ inject _InvalidTypeError _InvalidTypeError_nonComparableMapKeyType $
-              record _NonComparableMapKeyTypeError [
-                _NonComparableMapKeyTypeError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-                _NonComparableMapKeyTypeError_keyType>>: var "keyType"]],
-        checkVoid @@ var "keyType",
-        checkVoid @@ (Core.mapTypeValues $ var "mt")],
-
-    -- Y10: TypePair — void in pair components
-    _Type_pair>>: "pt" ~>
-      firstTypeError @@ list [
-        checkVoid @@ (Core.pairTypeFirst $ var "pt"),
-        checkVoid @@ (Core.pairTypeSecond $ var "pt")],
-
-    -- Y1/Y4/Y10: TypeRecord — empty, duplicate field names, void in fields
-    _Type_record>>: "fields" ~>
-      firstTypeError @@ list [
-        -- Y1. EmptyRecordTypeError
-        Logic.ifElse (Lists.null $ var "fields")
-          (mkJustType $ inject _InvalidTypeError _InvalidTypeError_emptyRecordType $
-            record _EmptyRecordTypeError [
-              _EmptyRecordTypeError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep]))])
-          noTypeError,
-        -- Y4. DuplicateRecordTypeFieldNamesError
-        checkDuplicateFieldTypes @@ (var "fields")
-          @@ ("dupName" ~>
-            mkJustType $ inject _InvalidTypeError _InvalidTypeError_duplicateRecordTypeFieldNames $
-              record _DuplicateRecordTypeFieldNamesError [
-                _DuplicateRecordTypeFieldNamesError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-                _DuplicateRecordTypeFieldNamesError_name>>: var "dupName"]),
-        -- Y10. VoidInNonBottomPositionError — check field types
-        firstTypeError @@ (Lists.map
-          ("f" ~> checkVoid @@ (Core.fieldTypeType $ var "f"))
-          (var "fields"))],
-
-    -- Y12/Y10: TypeSet — non-comparable element type, void element
-    _Type_set>>: "elemType" ~>
-      firstTypeError @@ list [
-        cases _Type (var "elemType") (Just noTypeError) [
-          _Type_function>>: constant $
-            mkJustType $ inject _InvalidTypeError _InvalidTypeError_nonComparableSetElementType $
-              record _NonComparableSetElementTypeError [
-                _NonComparableSetElementTypeError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-                _NonComparableSetElementTypeError_elementType>>: var "elemType"]],
-        checkVoid @@ var "elemType"],
-
-    -- Y2/Y3/Y5/Y10: TypeUnion — empty, single-variant, duplicate field names, void in fields
-    _Type_union>>: "fields" ~>
-      firstTypeError @@ list [
-        -- Y2. EmptyUnionTypeError
-        Logic.ifElse (Lists.null $ var "fields")
-          (mkJustType $ inject _InvalidTypeError _InvalidTypeError_emptyUnionType $
-            record _EmptyUnionTypeError [
-              _EmptyUnionTypeError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep]))])
-          noTypeError,
-        -- Y3. SingleVariantUnionError
-        Logic.ifElse (Equality.equal (Lists.length $ var "fields") (int32 1))
-          (Maybes.maybe
-            noTypeError
-            ("singleField" ~>
-              mkJustType $ inject _InvalidTypeError _InvalidTypeError_singleVariantUnion $
-                record _SingleVariantUnionError [
-                  _SingleVariantUnionError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-                  _SingleVariantUnionError_fieldName>>: Core.fieldTypeName (var "singleField")])
-            (Lists.maybeHead $ var "fields"))
-          noTypeError,
-        -- Y5. DuplicateUnionTypeFieldNamesError
-        checkDuplicateFieldTypes @@ (var "fields")
-          @@ ("dupName" ~>
-            mkJustType $ inject _InvalidTypeError _InvalidTypeError_duplicateUnionTypeFieldNames $
-              record _DuplicateUnionTypeFieldNamesError [
-                _DuplicateUnionTypeFieldNamesError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-                _DuplicateUnionTypeFieldNamesError_name>>: var "dupName"]),
-        -- Y10. VoidInNonBottomPositionError — check field types
-        firstTypeError @@ (Lists.map
-          ("f" ~> checkVoid @@ (Core.fieldTypeType $ var "f"))
-          (var "fields"))],
-
-    -- Y6. UndefinedTypeVariableError
-    _Type_variable>>: "varName" ~>
-      Logic.ifElse (Sets.member (var "varName") (var "boundVars"))
-        noTypeError
-        (mkJustType $ inject _InvalidTypeError _InvalidTypeError_undefinedTypeVariable $
-          record _UndefinedTypeVariableError [
-            _UndefinedTypeVariableError_location>>: wrap _SubtermPath (list ([] :: [TTerm SubtermStep])),
-            _UndefinedTypeVariableError_name>>: var "varName"])]
-
--- | Check a list of FieldType for duplicate names, calling a handler on the first duplicate found
-checkDuplicateFieldTypes :: TTermDefinition ([FieldType] -> (Name -> Maybe InvalidTypeError) -> Maybe InvalidTypeError)
-checkDuplicateFieldTypes = define "checkDuplicateFieldTypes" $
-  doc "Check for duplicate field names in a list of field types" $
-  "fields" ~> "mkError" ~>
-  "names" <~ Lists.map (unaryFunction Core.fieldTypeName) (var "fields") $
-  "dup" <~ findDuplicateFieldType @@ var "names" $
-  Maybes.cases (var "dup")
-    noTypeError
-    ("name" ~> var "mkError" @@ var "name")
-
--- | Find the first duplicate in a list of names (for field types)
-findDuplicateFieldType :: TTermDefinition ([Name] -> Maybe Name)
-findDuplicateFieldType = define "findDuplicateFieldType" $
-  doc "Find the first duplicate name in a list (for field type validation)" $
-  "names" ~>
-  "result" <~ Lists.foldl
-    ("acc" ~> "name" ~>
-      "seen" <~ Pairs.first (var "acc") $
-      "dup" <~ Pairs.second (var "acc") $
-      Maybes.cases (var "dup")
-        (Logic.ifElse (Sets.member (var "name") (var "seen"))
-          (pair (var "seen") (just $ var "name"))
-          (pair (Sets.insert (var "name") (var "seen")) nothing))
-        (constant $ var "acc"))
-    (pair Sets.empty nothing)
-    (var "names") $
-  Pairs.second (var "result")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Validate/Packaging.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Validate/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Validate/Packaging.hs
+++ /dev/null
@@ -1,256 +0,0 @@
-module Hydra.Sources.Kernel.Terms.Validate.Packaging where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel
-import Hydra.Error.Packaging (InvalidModuleError, InvalidPackageError)
-import Hydra.Packaging (Package)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Error.Packaging       as ErrorPackaging
-import qualified Hydra.Dsl.Meta.Core             as Core
-import qualified Hydra.Dsl.Meta.Lib.Equality     as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists        as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic        as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps         as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes       as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs        as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets         as Sets
-import qualified Hydra.Dsl.Meta.Lib.Strings      as Strings
-import qualified Hydra.Dsl.Packaging                as Packaging
-import qualified Hydra.Dsl.Packaging             as Packaging
-import           Hydra.Dsl.Meta.Phantoms         as Phantoms
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Kernel.Terms.Formatting as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names      as Names
-import           Prelude hiding ((++))
-import qualified Data.Set                        as S
-
-
-ns :: Namespace
-ns = Namespace "hydra.validate.packaging"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Names.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Validation functions for modules and packages"}
-  where
-    definitions = [
-      toDefinition checkConflictingModuleNamespaces,
-      toDefinition checkConflictingVariantNames,
-      toDefinition checkDefinitionNamespaces,
-      toDefinition checkDuplicateDefinitionNames,
-      toDefinition checkDuplicateModuleNamespaces,
-      toDefinition definitionName,
-      toDefinition module',
-      toDefinition package]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Extract the name from a Definition (term or type)
-definitionName :: TTermDefinition (Definition -> Name)
-definitionName = define "definitionName" $
-  doc "Extract the name from a definition" $
-  "def" ~>
-  cases _Definition (var "def") Nothing [
-    _Definition_term>>: "td" ~> Packaging.termDefinitionName (var "td"),
-    _Definition_type>>: "td" ~> Packaging.typeDefinitionName (var "td")]
-
--- | Check for module namespaces that would conflict when mapped to a target language's
--- directory structure. Two namespaces conflict if they are identical when lowercased,
--- e.g. hydra.fooBar and hydra.foobar, or hydra.Foo.Bar and hydra.foo.bar.
--- Fails on the first conflict found.
-checkConflictingModuleNamespaces :: TTermDefinition (Package -> Maybe InvalidPackageError)
-checkConflictingModuleNamespaces = define "checkConflictingModuleNamespaces" $
-  doc "Check for module namespaces that conflict when mapped to target language paths" $
-  "pkg" ~>
-  -- Build a map from lowercased namespace strings to original namespaces.
-  -- If a lowercased version is already in the map, that's a conflict.
-  "result" <~ Lists.foldl
-    ("acc" ~> "mod" ~>
-      "seen" <~ Pairs.first (var "acc") $
-      "err" <~ Pairs.second (var "acc") $
-      Maybes.cases (var "err")
-        ("ns" <~ Packaging.moduleNamespace (var "mod") $
-          "key" <~ Strings.toLower (Packaging.unNamespace $ var "ns") $
-          "existing" <~ Maps.lookup (var "key") (var "seen") $
-          Maybes.cases (var "existing")
-            -- No conflict: add to map
-            (pair (Maps.insert (var "key") (var "ns") (var "seen")) nothing)
-            -- Conflict found
-            ("first" ~>
-              pair (var "seen") (just $
-                ErrorPackaging.invalidPackageErrorConflictingModuleNamespace $
-                  ErrorPackaging.conflictingModuleNamespaceError (var "first") (var "ns"))))
-        (constant $ var "acc"))
-    (pair Maps.empty nothing)
-    (Packaging.packageModules $ var "pkg") $
-  Pairs.second (var "result")
-
--- | Check for union variant names that conflict with type definition names.
--- For each union type, the capitalized type local name concatenated with
--- the capitalized variant field name must not collide with any other type
--- definition's local name in the same module.
-checkConflictingVariantNames :: TTermDefinition (Module -> Maybe InvalidModuleError)
-checkConflictingVariantNames = define "checkConflictingVariantNames" $
-  doc "Check for union variant names that, when mapped to constructor names, conflict with other type definitions" $
-  "mod" ~>
-  "ns" <~ Packaging.moduleNamespace (var "mod") $
-  "defs" <~ Packaging.moduleDefinitions (var "mod") $
-  -- Collect all definition local names into a set
-  "defNames" <~ Lists.foldl
-    ("acc" ~> "def" ~>
-      Sets.insert (Names.localNameOf @@ (definitionName @@ var "def")) (var "acc"))
-    Sets.empty
-    (var "defs") $
-  -- For each type definition that is a union, check each field
-  Lists.foldl
-    ("acc" ~> "def" ~>
-      Maybes.cases (var "acc")
-        (cases _Definition (var "def") (Just nothing) [
-          _Definition_type>>: "td" ~>
-            "typeName" <~ Packaging.typeDefinitionName (var "td") $
-            "localTypeName" <~ (Names.localNameOf @@ var "typeName") $
-            "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "td")) $
-            cases _Type (var "typ") (Just nothing) [
-              _Type_union>>: "fields" ~>
-                -- Check each field of the union
-                Lists.foldl
-                  ("innerAcc" ~> "field" ~>
-                    Maybes.cases (var "innerAcc")
-                      ("fieldName" <~ Core.fieldTypeName (var "field") $
-                        "localFieldName" <~ (Names.localNameOf @@ var "fieldName") $
-                        "constructorName" <~ Strings.cat2
-                          (Formatting.capitalize @@ var "localTypeName")
-                          (Formatting.capitalize @@ var "localFieldName") $
-                        Logic.ifElse (Sets.member (var "constructorName") (var "defNames"))
-                          (just $ ErrorPackaging.invalidModuleErrorConflictingVariantName $
-                            ErrorPackaging.conflictingVariantNameError
-                              (var "ns")
-                              (var "typeName")
-                              (var "fieldName")
-                              (Core.name $ var "constructorName"))
-                          nothing)
-                      (constant $ var "innerAcc"))
-                  nothing
-                  (var "fields")]])
-        (constant $ var "acc"))
-    nothing
-    (var "defs")
-
--- | Check that all definition names in a module have the module's namespace as a prefix.
--- For a module with namespace foo.bar, every definition name must have the form foo.bar.xyz.
--- Fails on the first definition that violates this constraint.
-checkDefinitionNamespaces :: TTermDefinition (Module -> Maybe InvalidModuleError)
-checkDefinitionNamespaces = define "checkDefinitionNamespaces" $
-  doc "Check that all definition names in a module have the module's namespace as a prefix" $
-  "mod" ~>
-  "ns" <~ Packaging.moduleNamespace (var "mod") $
-  "prefix" <~ (Strings.cat2 (Packaging.unNamespace $ var "ns") (string ".")) $
-  "prefixLen" <~ Strings.length (var "prefix") $
-  Lists.foldl
-    ("acc" ~> "def" ~>
-      Maybes.cases (var "acc")
-        -- No error yet: check this definition
-        ("name" <~ (definitionName @@ var "def") $
-          "nameStr" <~ Core.unName (var "name") $
-          "namePrefix" <~ Lists.take (var "prefixLen") (Strings.toList $ var "nameStr") $
-          Logic.ifElse (Equality.equal (Strings.fromList $ var "namePrefix") (var "prefix"))
-            nothing
-            (just $ ErrorPackaging.invalidModuleErrorDefinitionNotInModuleNamespace $
-              ErrorPackaging.definitionNotInModuleNamespaceError (var "ns") (var "name")))
-        -- Already have an error: stop
-        (constant $ var "acc"))
-    nothing
-    (Packaging.moduleDefinitions $ var "mod")
-
--- | Check for duplicate definition names in a module.
--- Fails on the first duplicate found.
-checkDuplicateDefinitionNames :: TTermDefinition (Module -> Maybe InvalidModuleError)
-checkDuplicateDefinitionNames = define "checkDuplicateDefinitionNames" $
-  doc "Check for duplicate definition names in a module" $
-  "mod" ~>
-  "ns" <~ Packaging.moduleNamespace (var "mod") $
-  -- Fold through definitions tracking seen names in a set.
-  -- Accumulator is (Set Name, Maybe InvalidModuleError).
-  "result" <~ Lists.foldl
-    ("acc" ~> "def" ~>
-      "seen" <~ Pairs.first (var "acc") $
-      "err" <~ Pairs.second (var "acc") $
-      Maybes.cases (var "err")
-        -- No error yet: check this definition
-        ("name" <~ (definitionName @@ var "def") $
-          Logic.ifElse (Sets.member (var "name") (var "seen"))
-            (pair (var "seen") (just $
-              ErrorPackaging.invalidModuleErrorDuplicateDefinitionName $
-                ErrorPackaging.duplicateDefinitionNameError (var "ns") (var "name")))
-            (pair (Sets.insert (var "name") (var "seen")) nothing))
-        -- Already have an error: stop
-        (constant $ var "acc"))
-    (pair Sets.empty nothing)
-    (Packaging.moduleDefinitions $ var "mod") $
-  Pairs.second (var "result")
-
--- | Check for duplicate module namespaces in a package.
--- Fails on the first duplicate found.
-checkDuplicateModuleNamespaces :: TTermDefinition (Package -> Maybe InvalidPackageError)
-checkDuplicateModuleNamespaces = define "checkDuplicateModuleNamespaces" $
-  doc "Check for duplicate module namespaces in a package" $
-  "pkg" ~>
-  "result" <~ Lists.foldl
-    ("acc" ~> "mod" ~>
-      "seen" <~ Pairs.first (var "acc") $
-      "err" <~ Pairs.second (var "acc") $
-      Maybes.cases (var "err")
-        ("ns" <~ Packaging.moduleNamespace (var "mod") $
-          Logic.ifElse (Sets.member (var "ns") (var "seen"))
-            (pair (var "seen") (just $
-              ErrorPackaging.invalidPackageErrorDuplicateModuleNamespace $
-                ErrorPackaging.duplicateModuleNamespaceError (var "ns")))
-            (pair (Sets.insert (var "ns") (var "seen")) nothing))
-        (constant $ var "acc"))
-    (pair Sets.empty nothing)
-    (Packaging.packageModules $ var "pkg") $
-  Pairs.second (var "result")
-
--- | Validate a module, returning the first error found or nothing if valid.
--- Checks are run in order; stops at the first failure.
-module' :: TTermDefinition (Module -> Maybe InvalidModuleError)
-module' = define "module" $
-  doc "Validate a module, returning the first error found or nothing if valid" $
-  "mod" ~>
-  "r1" <~ (checkDefinitionNamespaces @@ var "mod") $
-  Maybes.cases (var "r1")
-    ("r2" <~ (checkDuplicateDefinitionNames @@ var "mod") $
-      Maybes.cases (var "r2")
-        (checkConflictingVariantNames @@ var "mod")
-        (constant $ var "r2"))
-    (constant $ var "r1")
-
--- | Validate a package, returning the first error found or nothing if valid.
--- Package-level checks run first, then each module is validated in order.
--- Stops at the first failure.
-package :: TTermDefinition (Package -> Maybe InvalidPackageError)
-package = define "package" $
-  doc "Validate a package, returning the first error found or nothing if valid" $
-  "pkg" ~>
-  "r1" <~ (checkDuplicateModuleNamespaces @@ var "pkg") $
-  Maybes.cases (var "r1")
-    ("r2" <~ (checkConflictingModuleNamespaces @@ var "pkg") $
-      Maybes.cases (var "r2")
-        -- No package-level errors: validate each module
-        (Lists.foldl
-      ("acc" ~> "mod" ~>
-        Maybes.cases (var "acc")
-          (Maybes.map
-            ("err" ~> ErrorPackaging.invalidPackageErrorInvalidModule (var "err"))
-            (module' @@ var "mod"))
-          (constant $ var "acc"))
-          nothing
-          (Packaging.packageModules $ var "pkg"))
-        -- Conflicting namespace error found: stop
-        (constant $ var "r2"))
-    -- Duplicate namespace error found: stop
-    (constant $ var "r1")
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Terms/Variables.hs b/src/main/haskell/Hydra/Sources/Kernel/Terms/Variables.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Terms/Variables.hs
+++ /dev/null
@@ -1,446 +0,0 @@
-
-module Hydra.Sources.Kernel.Terms.Variables where
-
--- Standard imports for kernel terms modules
-import Hydra.Kernel hiding (
-  freeTypeVariablesInTerm,
-  freeVariablesInTerm,
-  freeVariablesInType,
-  freeVariablesInTypeOrdered,
-  freeVariablesInTypeSimple,
-  freeVariablesInTypeScheme,
-  freeVariablesInTypeSchemeSimple,
-  isFreeVariableInTerm,
-  normalizeTypeVariablesInTerm,
-  replaceFreeTermVariable,
-  replaceFreeTypeVariable,
-  substituteTypeVariables,
-  substituteVariable,
-  substituteVariables,
-  unshadowVariables)
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Paths        as Paths
-import qualified Hydra.Dsl.Annotations       as Annotations
-import qualified Hydra.Dsl.Ast          as Ast
-import qualified Hydra.Dsl.Bootstrap         as Bootstrap
-import qualified Hydra.Dsl.Coders       as Coders
-import qualified Hydra.Dsl.Util      as Util
-import qualified Hydra.Dsl.Meta.Core         as Core
-import qualified Hydra.Dsl.Meta.Graph        as Graph
-import qualified Hydra.Dsl.Json.Model         as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars    as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic    as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps     as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math     as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes   as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs    as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets     as Sets
-import           Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Literals          as Literals
-import qualified Hydra.Dsl.LiteralTypes      as LiteralTypes
-import qualified Hydra.Dsl.Meta.Base         as MetaBase
-import qualified Hydra.Dsl.Meta.Terms        as MetaTerms
-import qualified Hydra.Dsl.Meta.Types        as MetaTypes
-import qualified Hydra.Dsl.Packaging       as Packaging
-import qualified Hydra.Dsl.Parsing      as Parsing
-import           Hydra.Dsl.Meta.Phantoms     as Phantoms
-import qualified Hydra.Dsl.Prims             as Prims
-import qualified Hydra.Dsl.Meta.Tabular           as Tabular
-import qualified Hydra.Dsl.Meta.Testing      as Testing
-import qualified Hydra.Dsl.Terms             as Terms
-import qualified Hydra.Dsl.Tests             as Tests
-import qualified Hydra.Dsl.Topology     as Topology
-import qualified Hydra.Dsl.Types             as Types
-import qualified Hydra.Dsl.Typing       as Typing
-import qualified Hydra.Dsl.Util         as Util
-import qualified Hydra.Dsl.Meta.Variants     as Variants
-import           Hydra.Sources.Kernel.Types.All
-import           Prelude hiding ((++))
-import qualified Data.Int                    as I
-import qualified Data.List                   as L
-import qualified Data.Map                    as M
-import qualified Data.Set                    as S
-import qualified Data.Maybe                  as Y
-
-import qualified Hydra.Sources.Kernel.Terms.Names as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Sorting as Sorting
-
-
-ns :: Namespace
-ns = Namespace "hydra.variables"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Names.ns, Rewriting.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Free variable analysis, term-level substitution, and unshadowing")}
-  where
-   definitions = [
-     toDefinition freeTypeVariablesInTerm,
-     toDefinition freeVariablesInTerm,
-     toDefinition freeVariablesInType,
-     toDefinition freeVariablesInTypeOrdered,
-     toDefinition freeVariablesInTypeScheme,
-     toDefinition freeVariablesInTypeSchemeSimple,
-     toDefinition freeVariablesInTypeSimple,
-     toDefinition isFreeVariableInTerm,
-     toDefinition normalizeTypeVariablesInTerm,
-     toDefinition replaceFreeTermVariable,
-     toDefinition replaceFreeTypeVariable,
-     toDefinition substituteTypeVariables,
-     toDefinition substituteVariable,
-     toDefinition substituteVariables,
-     toDefinition unshadowVariables]
-
-freeTypeVariablesInTerm :: TTermDefinition (Term -> S.Set Name)
-freeTypeVariablesInTerm = define "freeTypeVariablesInTerm" $
-  doc ("Get the set of free type variables in a term (including schema names, where they appear in type annotations)."
-    <> " In this context, only the type schemes of let bindings can bind type variables; type lambdas do not.") $
-  "term0" ~>
-  "allOf" <~ ("sets" ~> Lists.foldl (binaryFunction Sets.union) Sets.empty $ var "sets") $
-  "tryType" <~ ("tvars" ~> "typ" ~> Sets.difference (freeVariablesInType @@ var "typ") (var "tvars")) $
-  "getAll" <~ ("vars" ~> "term" ~>
-    "recurse" <~ var "getAll" @@ var "vars" $
-    "dflt" <~ (var "allOf" @@ Lists.map (var "recurse") (Rewriting.subterms @@ var "term")) $
-    cases _Term (var "term")
-      (Just $ var "dflt") [
-      _Term_lambda>>: "l" ~>
-        "domt" <~ optCases (Core.lambdaDomain $ var "l") (Sets.empty) (var "tryType" @@ var "vars") $
-        Sets.union (var "domt") (var "recurse" @@ (Core.lambdaBody $ var "l")),
-      _Term_let>>: "l" ~>
-        "forBinding" <~ ("b" ~>
-          "newVars" <~ optCases (Core.bindingTypeScheme $ var "b")
-             (var "vars")
-             ("ts" ~> Sets.union (var "vars") (Sets.fromList $ Core.typeSchemeVariables $ var "ts")) $
-          Sets.union
-            (var "getAll" @@ var "newVars" @@ (Core.bindingTerm $ var "b"))
-            (optCases (Core.bindingTypeScheme $ var "b")
-              Sets.empty
-              ("ts" ~> var "tryType" @@ var "newVars" @@ (Core.typeSchemeBody $ var "ts")))) $
-        Sets.union
-          (var "allOf" @@ Lists.map (var "forBinding") (Core.letBindings $ var "l"))
-          (var "recurse" @@ (Core.letBody $ var "l")),
-      _Term_typeApplication>>: "tt" ~>
-        Sets.union
-          (var "tryType" @@ var "vars" @@ (Core.typeApplicationTermType $ var "tt"))
-          (var "recurse" @@ (Core.typeApplicationTermBody $ var "tt")),
-      _Term_typeLambda>>: "tl" ~>
-        Sets.union
-          -- The type variable introduced by a type lambda is considered unbound unless it is also introduced in an
-          -- enclosing let binding, as all type lambda terms are in Hydra.
-          (var "tryType" @@ var "vars" @@ (Core.typeVariable $ Core.typeLambdaParameter $ var "tl"))
-          (var "recurse" @@ (Core.typeLambdaBody $ var "tl"))]) $
-  var "getAll" @@ Sets.empty @@ var "term0"
-
-freeVariablesInTerm :: TTermDefinition (Term -> S.Set Name)
-freeVariablesInTerm = define "freeVariablesInTerm" $
-  doc "Find the free variables (i.e. variables not bound by a lambda or let) in a term" $
-  "term" ~>
-  -- Note: the subterm fold is wrapped in a lambda (dfltVars) rather than precomputed in a let binding,
-  -- because in eager languages a let-bound default would be evaluated unconditionally, even for
-  -- Variable/Lambda/Let cases where it is not needed. This avoids redundant traversal.
-  "dfltVars" <~ ("_" ~> Lists.foldl ("s" ~> "t" ~> Sets.union (var "s") (freeVariablesInTerm @@ var "t"))
-    Sets.empty
-    (Rewriting.subterms @@ var "term")) $
-  cases _Term (var "term")
-    (Just $ var "dfltVars" @@ unit) [
-    _Term_lambda>>: "l" ~> Sets.delete
-      (Core.lambdaParameter $ var "l")
-      (freeVariablesInTerm @@ (Core.lambdaBody $ var "l")),
-    _Term_let>>: "l" ~> Sets.difference
-      (var "dfltVars" @@ unit)
-      (Sets.fromList (Lists.map (unaryFunction Core.bindingName) (Core.letBindings $ var "l"))),
-    _Term_variable>>: "v" ~> Sets.singleton $ var "v"]
-
-freeVariablesInType :: TTermDefinition (Type -> S.Set Name)
-freeVariablesInType = define "freeVariablesInType" $
-  doc "Find the free variables (i.e. variables not bound by a lambda or let) in a type" $
-  "typ" ~>
-  "dfltVars" <~ Phantoms.fold ("s" ~> "t" ~> Sets.union (var "s") (recurse @@ var "t"))
-    @@ Sets.empty
-    @@ (Rewriting.subtypes @@ var "typ") $
-  cases _Type (var "typ")
-    (Just $ var "dfltVars") [
-    _Type_forall>>: "lt" ~> Sets.delete
-        (Core.forallTypeParameter $ var "lt")
-        (recurse @@ (Core.forallTypeBody $ var "lt")),
-    -- TODO: let-types
-    _Type_variable>>: "v" ~> Sets.singleton $ var "v"]
-  where
-    recurse = freeVariablesInType
-
-freeVariablesInTypeOrdered :: TTermDefinition (Type -> [Name])
-freeVariablesInTypeOrdered = define "freeVariablesInTypeOrdered" $
-  doc "Find the free variables in a type in deterministic left-to-right order" $
-  "typ" ~>
-  "collectVars" <~ ("boundVars" ~> "t" ~>
-    cases _Type (var "t")
-      (Just $ Lists.concat $ Lists.map (var "collectVars" @@ var "boundVars") $
-              Rewriting.subtypes @@ var "t") [
-      _Type_variable>>: "v" ~>
-        Logic.ifElse (Sets.member (var "v") (var "boundVars"))
-          (list ([] :: [TTerm Name]))
-          (list [var "v"]),
-      _Type_forall>>: "ft" ~>
-        var "collectVars" @@
-          (Sets.insert (Core.forallTypeParameter $ var "ft") (var "boundVars")) @@
-          (Core.forallTypeBody $ var "ft")]) $
-  (Lists.nub :: TTerm [Name] -> TTerm [Name]) $ var "collectVars" @@ Sets.empty @@ var "typ"
-
-freeVariablesInTypeSimple :: TTermDefinition (Type -> S.Set Name)
-freeVariablesInTypeSimple = define "freeVariablesInTypeSimple" $
-  doc "Same as freeVariablesInType, but ignores the binding action of lambda types" $
-  "typ" ~>
-  "helper" <~ ("types" ~> "typ" ~> cases _Type (var "typ")
-    (Just $ var "types") [
-    _Type_variable>>: "v" ~> Sets.insert (var "v") (var "types")]) $
-  Rewriting.foldOverType @@ Coders.traversalOrderPre @@ var "helper" @@ Sets.empty @@ var "typ"
-
-freeVariablesInTypeScheme :: TTermDefinition (TypeScheme -> S.Set Name)
-freeVariablesInTypeScheme = define "freeVariablesInTypeScheme" $
-  doc "Find free variables in a type scheme" $
-  "ts" ~>
-  "vars" <~ Core.typeSchemeVariables (var "ts") $
-  "t" <~ Core.typeSchemeBody (var "ts") $
-  Sets.difference (freeVariablesInType @@ var "t") (Sets.fromList $ var "vars")
-
-freeVariablesInTypeSchemeSimple :: TTermDefinition (TypeScheme -> S.Set Name)
-freeVariablesInTypeSchemeSimple = define "freeVariablesInTypeSchemeSimple" $
-  doc "Find free variables in a type scheme (simple version)" $
-  "ts" ~>
-  "vars" <~ Core.typeSchemeVariables (var "ts") $
-  "t" <~ Core.typeSchemeBody (var "ts") $
-  Sets.difference (freeVariablesInTypeSimple @@ var "t") (Sets.fromList $ var "vars")
-
-isFreeVariableInTerm :: TTermDefinition (Name -> Term -> Bool)
-isFreeVariableInTerm = define "isFreeVariableInTerm" $
- doc "Check whether a variable is free (not bound) in a term" $
- "v" ~> "term" ~>
-   Logic.not $ Sets.member (var "v") (freeVariablesInTerm @@ var "term")
-
-normalizeTypeVariablesInTerm :: TTermDefinition (Term -> Term)
-normalizeTypeVariablesInTerm = define "normalizeTypeVariablesInTerm" $
-  doc "Recursively replace the type variables of let bindings with the systematic type variables t0, t1, t2, ..." $
-  "term" ~>
-  "replaceName" <~ ("subst" ~> "v" ~> Maybes.fromMaybe (var "v") $ Maps.lookup (var "v") (var "subst")) $
-  "substType" <~ ("subst" ~> "typ" ~>
-    "rewrite" <~ ("recurse" ~> "typ" ~> cases _Type (var "typ")
-      (Just $ var "recurse" @@ var "typ") [
-      _Type_variable>>: "v" ~> Core.typeVariable $ var "replaceName" @@ var "subst" @@ var "v"]) $
-    Rewriting.rewriteType @@ var "rewrite" @@ var "typ") $
-  -- Thread a triple: ((subst, boundVars), next)
-  "rewriteWithSubst" <~ ("state" ~> "term0" ~>
-    "sb"   <~ Pairs.first  (var "state") $
-    "next" <~ Pairs.second (var "state") $
-    "subst"     <~ Pairs.first  (var "sb") $
-    "boundVars" <~ Pairs.second (var "sb") $
-    "rewrite" <~ ("recurse" ~> "term" ~> cases _Term (var "term")
-      (Just $ var "recurse" @@ var "term") [
-      -- Lambdas have a "domain" type which needs to be rewritten
-      _Term_lambda>>: "l" ~>
-        "domain" <~ Core.lambdaDomain (var "l") $
-        Core.termLambda $ Core.lambda
-          (Core.lambdaParameter $ var "l")
-          (Maybes.map (var "substType" @@ var "subst") (var "domain"))
-          (var "rewriteWithSubst" @@ (pair (pair (var "subst") (var "boundVars")) (var "next")) @@ (Core.lambdaBody $ var "l")),
-      -- Let bindings each have a type which needs to be rewritten
-      _Term_let>>: "lt" ~>
-        "bindings0" <~ Core.letBindings (var "lt") $
-        "body0"     <~ Core.letBody (var "lt") $
-        -- Sequentially rewrite bindings without advancing 'next' across siblings
-        "step" <~ ("acc" ~> "bs" ~>
-          Maybes.maybe
-            (Lists.reverse (var "acc"))
-            ("uc" ~>
-          "b"  <~ Pairs.first (var "uc") $
-          "tl" <~ Pairs.second (var "uc") $
-          "noType" <~ (
-            "newVal" <~ var "rewriteWithSubst" @@ (pair (pair (var "subst") (var "boundVars")) (var "next")) @@ (Core.bindingTerm $ var "b") $
-            "b1"     <~ Core.binding (Core.bindingName $ var "b") (var "newVal") nothing $
-            var "step" @@ (Lists.cons (var "b1") (var "acc")) @@ var "tl") $
-          "withType" <~ ("ts" ~>
-            "vars" <~ Core.typeSchemeVariables (var "ts") $
-            "typ"  <~ Core.typeSchemeBody (var "ts") $
-            "k"    <~ Lists.length (var "vars") $
-            -- Build exactly k fresh names t{next}, t{next+1}, ...
-            "gen"  <~ ("i" ~> "rem" ~> "acc2" ~>
-              "ti" <~ Core.name (Strings.cat2 (string "t") (Literals.showInt32 (Math.add (var "next") (var "i")))) $
-              Logic.ifElse (Equality.equal (var "rem") (int32 0))
-                (Lists.reverse (var "acc2"))
-                (var "gen"
-                  @@ (Math.add (var "i") (int32 1))
-                  @@ (Math.sub (var "rem") (int32 1))
-                  @@ (Lists.cons (var "ti") (var "acc2")))) $
-            "newVars"  <~ var "gen" @@ (int32 0) @@ (var "k") @@ (list ([] :: [TTerm Name])) $
-            "newSubst" <~ Maps.union (Maps.fromList $ Lists.zip (var "vars") (var "newVars")) (var "subst") $
-            "newBound" <~ Sets.union (var "boundVars") (Sets.fromList (var "newVars")) $
-            "newVal"   <~ var "rewriteWithSubst" @@ (pair (pair (var "newSubst") (var "newBound")) (Math.add (var "next") (var "k"))) @@ (Core.bindingTerm $ var "b") $
-            -- Rename constraint keys using newSubst (a Map Name Name)
-            -- For each (varName, metadata), if varName is in newSubst, use the new name
-            "renameConstraintKeys" <~ ("constraintMap" ~>
-              Maps.fromList $ Lists.map
-                ("p" ~>
-                  "oldName" <~ Pairs.first (var "p") $
-                  "meta" <~ Pairs.second (var "p") $
-                  "newName" <~ Maybes.fromMaybe (var "oldName") (Maps.lookup (var "oldName") (var "newSubst")) $
-                  pair (var "newName") (var "meta"))
-                (Maps.toList $ var "constraintMap")) $
-            "oldConstraints" <~ Core.typeSchemeConstraints (var "ts") $
-            "newConstraints" <~ Maybes.map (var "renameConstraintKeys") (var "oldConstraints") $
-            "b1"       <~ Core.binding
-              (Core.bindingName $ var "b")
-              (var "newVal")
-              (just $ Core.typeScheme (var "newVars") (var "substType" @@ var "newSubst" @@ var "typ") (var "newConstraints")) $
-            -- Note: do not advance 'next' for the next sibling; keep current 'next'
-            var "step" @@ (Lists.cons (var "b1") (var "acc")) @@ var "tl") $
-          optCases (Core.bindingTypeScheme $ var "b")
-               -- Untyped binding: rewrite its term with current state; 'next' unchanged for siblings
-               (var "noType")
-               -- Typed binding: allocate |vars| fresh t{next+i}; bump 'next' only for the binding's TERM
-               ("ts" ~> var "withType" @@ var "ts"))
-          (Lists.uncons $ var "bs")) $
-        "bindings1" <~ var "step" @@ (list ([] :: [TTerm Binding])) @@ (var "bindings0") $
-        Core.termLet $ Core.let_
-          (var "bindings1")
-          -- Body sees the original 'next' (binding lambdas don't bind in the body)
-          (var "rewriteWithSubst" @@ (pair (pair (var "subst") (var "boundVars")) (var "next")) @@ var "body0"),
-      -- Type application terms have a type which needs to be rewritten, and we also recurse into the body term.
-      _Term_typeApplication>>: "tt" ~> Core.termTypeApplication $ Core.typeApplicationTerm
-        (var "rewriteWithSubst" @@ (pair (pair (var "subst") (var "boundVars")) (var "next")) @@ (Core.typeApplicationTermBody $ var "tt"))
-        (var "substType" @@ var "subst" @@ (Core.typeApplicationTermType $ var "tt")),
-      -- Type lambdas introduce a type variable which needs to be replaced, and we also recurse into the body term.
-      -- Note: in Hydra currently, type lambdas are exclusively created during type inference in combination with
-      -- polymorphic let bindings, so the type variable should already be present in the substitution.
-      -- If "free-standing" type lambdas are ever supported in the future, we will have to create a fresh type variable here.
-      _Term_typeLambda>>: "ta" ~> Core.termTypeLambda $ Core.typeLambda
-        (var "replaceName" @@ var "subst" @@ (Core.typeLambdaParameter $ var "ta"))
-        (var "rewriteWithSubst" @@ (pair (pair (var "subst") (var "boundVars")) (var "next")) @@ (Core.typeLambdaBody $ var "ta"))]) $
-    Rewriting.rewriteTerm @@ var "rewrite" @@ var "term0") $
-  -- initial state: ((emptySubst, emptyBound), next=0)
-  var "rewriteWithSubst" @@ (pair (pair Maps.empty Sets.empty) (int32 0)) @@ var "term"
-
-replaceFreeTermVariable :: TTermDefinition (Name -> Term -> Term -> Term)
-replaceFreeTermVariable = define "replaceFreeTermVariable" $
-  doc "Replace a free variable in a term" $
-  "vold" ~> "tnew" ~> "term" ~>
-  "rewrite" <~ ("recurse" ~> "t" ~> cases _Term (var "t")
-    (Just $ var "recurse" @@ var "t") [
-    _Term_lambda>>: "l" ~>
-      "v" <~ Core.lambdaParameter (var "l") $
-      Logic.ifElse (Equality.equal (var "v") (var "vold"))
-        (var "t")
-        (var "recurse" @@ var "t"),
-    _Term_variable>>: "v" ~>
-      Logic.ifElse (Equality.equal (var "v") (var "vold"))
-        (var "tnew")
-        (Core.termVariable $ var "v")]) $
-  Rewriting.rewriteTerm @@ var "rewrite" @@ var "term"
-
-replaceFreeTypeVariable :: TTermDefinition (Name -> Type -> Type -> Type)
-replaceFreeTypeVariable = define "replaceFreeTypeVariable" $
-  doc "Replace free occurrences of a name in a type" $
-  "v" ~> "rep" ~> "typ" ~>
-  "mapExpr" <~ ("recurse" ~> "t" ~> cases _Type (var "t")
-    (Just $ var "recurse" @@ var "t") [
-    _Type_forall>>: "ft" ~> Logic.ifElse
-      (Equality.equal (var "v") (Core.forallTypeParameter $ var "ft"))
-      (var "t")
-      (Core.typeForall $ Core.forallType
-        (Core.forallTypeParameter $ var "ft")
-        (var "recurse" @@ (Core.forallTypeBody $ var "ft"))),
-    _Type_variable>>: "v'" ~> Logic.ifElse
-      (Equality.equal (var "v") (var "v'"))
-      (var "rep")
-      (var "t")]) $
-  Rewriting.rewriteType @@ var "mapExpr" @@ var "typ"
-
-substituteTypeVariables :: TTermDefinition (M.Map Name Name -> Type -> Type)
-substituteTypeVariables = define "substituteTypeVariables" $
-  doc "Substitute type variables in a type" $
-  "subst" ~> "typ" ~>
-  "replace" <~ ("recurse" ~> "typ" ~> cases _Type (var "typ")
-    (Just $ var "recurse" @@ var "typ") [
-    _Type_variable>>: "n" ~>
-      Core.typeVariable $ Maybes.fromMaybe (var "n") $ Maps.lookup (var "n") (var "subst")]) $
-  Rewriting.rewriteType @@ var "replace" @@ var "typ"
-
-substituteVariable :: TTermDefinition (Name -> Name -> Term -> Term)
-substituteVariable = define "substituteVariable" $
-  doc "Substitute one variable for another in a term" $
-  "from" ~> "to" ~> "term" ~>
-  "replace" <~ ("recurse" ~> "term" ~>
-    cases _Term (var "term")
-      (Just $ var "recurse" @@ var "term") [
-      _Term_variable>>: "x" ~>
-        Core.termVariable $ Logic.ifElse (Equality.equal (var "x") (var "from")) (var "to") (var "x"),
-      _Term_lambda>>: "l" ~> Logic.ifElse
-        (Equality.equal (Core.lambdaParameter $ var "l") (var "from"))
-        (var "term")
-        (var "recurse" @@ var "term")]) $
-  Rewriting.rewriteTerm @@ var "replace" @@ var "term"
-
-substituteVariables :: TTermDefinition (M.Map Name Name -> Term -> Term)
-substituteVariables = define "substituteVariables" $
-  doc "Substitute multiple variables in a term" $
-  "subst" ~> "term" ~>
-  "replace" <~ ("recurse" ~> "term" ~>
-    cases _Term (var "term")
-      (Just $ var "recurse" @@ var "term") [
-      _Term_variable>>: "n" ~>
-        Core.termVariable $ Maybes.fromMaybe (var "n") $ Maps.lookup (var "n") (var "subst"),
-      _Term_lambda>>: "l" ~>
-        Maybes.maybe
-          (var "recurse" @@ var "term")
-          (constant $ var "term")
-          (Maps.lookup (Core.lambdaParameter $ var "l") (var "subst"))]) $
-  Rewriting.rewriteTerm @@ var "replace" @@ var "term"
-
-unshadowVariables :: TTermDefinition (Term -> Term)
-unshadowVariables = define "unshadowVariables" $
-  doc ("Rename all shadowed variables (both lambda parameters and let-bound variables"
-    <> " that shadow lambda parameters) in a term.") $
-  "term0" ~>
-  -- Find a fresh name not in the key set of the map, trying base2, base3, etc.
-  "freshName" <~ ("base" ~> "i" ~> "m" ~>
-    "candidate" <~ Core.name (Strings.cat2 (Core.unName $ var "base") (Literals.showInt32 $ var "i")) $
-    Logic.ifElse (Maps.member (var "candidate") (var "m"))
-      (var "freshName" @@ var "base" @@ Math.add (var "i") (int32 1) @@ var "m")
-      (var "candidate")) $
-  "f" <~ ("recurse" ~> "m" ~> "term" ~>
-    cases _Term (var "term") (Just $ var "recurse" @@ var "m" @@ var "term") [
-    _Term_lambda>>: "l" ~>
-      "v" <~ Core.lambdaParameter (var "l") $
-      "domain" <~ Core.lambdaDomain (var "l") $
-      "body" <~ Core.lambdaBody (var "l") $
-      Logic.ifElse (Maps.member (var "v") (var "m"))
-        -- Shadowed: find a fresh name, add v -> fresh to map, recurse into body
-        ("v2" <~ var "freshName" @@ var "v" @@ int32 2 @@ var "m" $
-          "m2" <~ Maps.insert (var "v") (var "v2") (Maps.insert (var "v2") (var "v2") (var "m")) $
-          Core.termLambda $ Core.lambda (var "v2") (var "domain")
-            (var "f" @@ var "recurse" @@ var "m2" @@ var "body"))
-        -- First occurrence: register v -> v (identity), recurse into body
-        (Core.termLambda $ Core.lambda (var "v") (var "domain")
-          (var "f" @@ var "recurse" @@ Maps.insert (var "v") (var "v") (var "m") @@ var "body")),
-    _Term_let>>: "lt" ~>
-      -- Register all let-bound names as in-scope (identity mapping) so inner lambdas know about them
-      "m2" <~ Lists.foldl ("acc" ~> "b" ~>
-        "bname" <~ Core.bindingName (var "b") $
-        Logic.ifElse (Maps.member (var "bname") (var "acc"))
-          (var "acc")
-          (Maps.insert (var "bname") (var "bname") (var "acc")))
-        (var "m") (Core.letBindings $ var "lt") $
-      var "recurse" @@ var "m2" @@ var "term",
-    _Term_variable>>: "v" ~> Core.termVariable $ optCases (Maps.lookup (var "v") (var "m"))
-      (var "v")
-      ("renamed" ~> var "renamed")]) $
-  Rewriting.rewriteTermWithContext @@ var "f" @@ Maps.empty @@ var "term0"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/All.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/All.hs
+++ /dev/null
@@ -1,59 +0,0 @@
--- | All of Hydra's type-level kernel modules
-module Hydra.Sources.Kernel.Types.All where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Kernel.Types.Paths        as Paths
-import qualified Hydra.Sources.Kernel.Types.Ast         as Ast
-import qualified Hydra.Sources.Kernel.Types.Classes     as Classes
-import qualified Hydra.Sources.Kernel.Types.Coders      as Coders
-import qualified Hydra.Sources.Kernel.Types.Context     as Context
-import qualified Hydra.Sources.Kernel.Types.Core        as Core
-import qualified Hydra.Sources.Kernel.Types.Error.Checking as ErrorChecking
-import qualified Hydra.Sources.Kernel.Types.Error.Core     as ErrorCore
-import qualified Hydra.Sources.Kernel.Types.Error.Packaging as ErrorPackaging
-import qualified Hydra.Sources.Kernel.Types.Errors      as Errors
-import qualified Hydra.Sources.Kernel.Types.Graph       as Graph
-import qualified Hydra.Sources.Json.Model               as JsonModel
-import qualified Hydra.Sources.Kernel.Types.Variants    as Variants
-import qualified Hydra.Sources.Kernel.Types.Packaging   as Packaging
-import qualified Hydra.Sources.Kernel.Types.Parsing     as Parsing
-import qualified Hydra.Sources.Kernel.Types.Phantoms    as Phantoms
-import qualified Hydra.Sources.Kernel.Types.Query       as Query
-import qualified Hydra.Sources.Kernel.Types.Relational  as Relational
-import qualified Hydra.Sources.Kernel.Types.Tabular     as Tabular
-import qualified Hydra.Sources.Kernel.Types.Testing     as Testing
-import qualified Hydra.Sources.Kernel.Types.Topology    as Topology
-import qualified Hydra.Sources.Kernel.Types.Typing      as Typing
-import qualified Hydra.Sources.Kernel.Types.Util        as Util
-
-
-kernelTypesModules :: [Module]
-kernelTypesModules = [
-  Paths.module_,
-  Ast.module_,
-  Classes.module_,
-  Coders.module_,
-  Context.module_,
-  Core.module_,
-  ErrorChecking.module_,
-  ErrorCore.module_,
-  ErrorPackaging.module_,
-  Errors.module_,
-  Graph.module_,
-  JsonModel.module_,
-  Packaging.module_,
-  Parsing.module_,
-  Phantoms.module_,
-  Query.module_,
-  Relational.module_,
-  Tabular.module_,
-  Testing.module_,
-  Topology.module_,
-  Typing.module_,
-  Util.module_,
-  Variants.module_]
-
--- | Namespaces of all kernel type modules
-kernelTypesNamespaces :: [Namespace]
-kernelTypesNamespaces = fmap moduleNamespace kernelTypesModules
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Ast.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Ast.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Ast.hs
+++ /dev/null
@@ -1,209 +0,0 @@
-module Hydra.Sources.Kernel.Types.Ast where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel hiding (op, brackets)
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.ast"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model which provides a common syntax tree for Hydra serializers"}
-  where
-    definitions = [
-      associativity,
-      blockStyle,
-      bracketExpr,
-      brackets,
-      expr,
-      indentedExpression,
-      indentStyle,
-      op,
-      opExpr,
-      padding,
-      precedence,
-      seqExpr,
-      symbol,
-      ws]
-
-associativity :: Binding
-associativity = define "Associativity" $
-  doc "Operator associativity" $
-  T.enum ["none", "left", "right", "both"]
-
-blockStyle :: Binding
-blockStyle = define "BlockStyle" $
-  doc "Formatting option for code blocks" $
-  T.record [
-    "indent">:
-      doc "An optional indentation string" $
-      T.maybe T.string,
-    "newlineBeforeContent">:
-      doc "Whether to place a newline before the content" $
-      T.boolean,
-    "newlineAfterContent">:
-      doc "Whether to place a newline after the content" $
-      T.boolean]
-
-bracketExpr :: Binding
-bracketExpr = define "BracketExpr" $
-  doc "An expression enclosed by brackets" $
-  T.record [
-    "brackets">:
-      doc "The bracket pair enclosing the expression"
-      brackets,
-    "enclosed">:
-      doc "The expression within the brackets"
-      expr,
-    "style">:
-      doc "The formatting style for the bracketed block"
-      blockStyle]
-
-brackets :: Binding
-brackets = define "Brackets" $
-  doc "Matching open and close bracket symbols" $
-  T.record [
-    "open">:
-      doc "The opening bracket symbol"
-      symbol,
-    "close">:
-      doc "The closing bracket symbol"
-      symbol]
-
-expr :: Binding
-expr = define "Expr" $
-  doc "An abstract expression" $
-  T.union [
-    "const">:
-      doc "A constant symbol"
-      symbol,
-    "indent">:
-      doc "An indented expression"
-      indentedExpression,
-    "op">:
-      doc "An operator expression"
-      opExpr,
-    "brackets">:
-      doc "A bracketed expression"
-      bracketExpr,
-    "seq">:
-      doc "A sequence of expressions joined by a separator, treated as structural layout (not subject to parenthesization)"
-      seqExpr]
-
-seqExpr :: Binding
-seqExpr = define "SeqExpr" $
-  doc "A sequence of expressions joined by a separator operator. Unlike OpExpr, parenthesize ignores SeqExpr boundaries." $
-  T.record [
-    "op">:
-      doc "The separator operator"
-      op,
-    "elements">:
-      doc "The expressions to join" $
-      T.list expr]
-
-indentedExpression :: Binding
-indentedExpression = define "IndentedExpression" $
-  doc "An expression indented in a certain style" $
-  T.record [
-    "style">:
-      doc "The indentation style"
-      indentStyle,
-    "expr">:
-      doc "The expression to be indented"
-      expr]
-
-indentStyle :: Binding
-indentStyle = define "IndentStyle" $
-  doc "Any of several indentation styles" $
-  T.union [
-    "allLines">:
-      doc "Indent all lines with the given string" $
-      T.string,
-    "subsequentLines">:
-      doc "Indent only lines after the first with the given string" $
-      T.string]
-
-op :: Binding
-op = define "Op" $
-  doc "An operator symbol" $
-  T.record [
-    "symbol">:
-      doc "The operator symbol"
-      symbol,
-    "padding">:
-      doc "The padding around the operator"
-      padding,
-    "precedence">:
-      doc "The precedence of the operator"
-      precedence,
-    "associativity">:
-      doc "The associativity of the operator"
-      associativity]
-
-opExpr :: Binding
-opExpr = define "OpExpr" $
-  doc "An operator expression" $
-  T.record [
-    "op">:
-      doc "The operator"
-      op,
-    "lhs">:
-      doc "The left-hand side operand"
-      expr,
-    "rhs">:
-      doc "The right-hand side operand"
-      expr]
-
-padding :: Binding
-padding = define "Padding" $
-  doc "Left and right padding for an operator" $
-  T.record [
-    "left">:
-      doc "Padding to the left of the operator"
-      ws,
-    "right">:
-      doc "Padding to the right of the operator"
-      ws]
-
-precedence :: Binding
-precedence = define "Precedence" $
-  doc "Operator precedence" $
-  T.wrap T.int32
-
-symbol :: Binding
-symbol = define "Symbol" $
-  doc "Any symbol" $
-  T.wrap T.string
-
-ws :: Binding
-ws = define "Ws" $
-  doc "One of several classes of whitespace" $
-  T.union [
-    "none">:
-      doc "No whitespace" $
-      T.unit,
-    "space">:
-      doc "A single space" $
-      T.unit,
-    "break">:
-      doc "A line break" $
-      T.unit,
-    "breakAndIndent">:
-      doc "A line break followed by indentation" $
-      T.string,
-    "doubleBreak">:
-      doc "Two line breaks" $
-      T.unit]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Classes.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Classes.hs
+++ /dev/null
@@ -1,34 +0,0 @@
-module Hydra.Sources.Kernel.Types.Classes where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.classes"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Type classes"}
-  where
-    definitions = [
-      typeClass]
-
-typeClass :: Binding
-typeClass = define "TypeClass" $
-  doc "Any of a small number of built-in type classes" $
-  T.enum [
-    "equality",
-    "ordering"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Coders.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Coders.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Coders.hs
+++ /dev/null
@@ -1,166 +0,0 @@
-module Hydra.Sources.Kernel.Types.Coders where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel hiding (language, languageName, languageConstraints)
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Context as Context
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Errors as Error
-import qualified Hydra.Sources.Kernel.Types.Graph as Graph
-import qualified Hydra.Sources.Kernel.Types.Variants as Variants
-
-
-ns :: Namespace
-ns = Namespace "hydra.coders"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Context.ns, Error.ns, Graph.ns, Variants.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Abstractions for paired transformations between languages"}
-  where
-    definitions = [
-      adapter,
-      adapterContext,
-      bicoder,
-      coder,
-      coderDirection,
-      language,
-      languageConstraints,
-      languageName,
-      symmetricAdapter,
-      traversalOrder,
-      typeAdapter]
-
-adapter :: Binding
-adapter = define "Adapter" $
-  doc "A two-level bidirectional encoder which adapts types to types and terms to terms" $
-  T.forAlls ["t1", "t2", "v1", "v2"] $ T.record [
-    "isLossy">:
-      doc "Whether information may be lost in the course of this adaptation"
-      T.boolean,
-    "source">:
-      doc "The source type"
-      "t1",
-    "target">:
-      doc "The target type"
-      "t2",
-    "coder">:
-      doc "The coder for transforming instances of the source type to instances of the target type" $
-      coder @@ "v1" @@ "v2"]
-
-adapterContext :: Binding
-adapterContext = define "AdapterContext" $
-  doc "An evaluation context together with a source language and a target language" $
-  T.record [
-    "graph">:
-      doc "The underlying graph of elements and primitives"
-      Graph.graph,
-    "language">:
-      doc "The language being encoded or decoded"
-      language,
-    "adapters">:
-      doc "A map of type names to adapters for those types" $
-      T.map Core.name (adapter
-        @@ Core.type_ @@ Core.type_
-        @@ Core.term @@ Core.term)]
-
-bicoder :: Binding
-bicoder = define "Bicoder" $
-  doc "A two-level encoder and decoder, operating both at a type level and an instance (data) level" $
-  T.forAlls ["t1", "t2", "v1", "v2"] $ T.record [
-    "encode">:
-      doc "A function from source types to adapters" $
-      "t1" ~> adapter @@ "t1" @@ "t2" @@ "v1" @@ "v2",
-    "decode">:
-      doc "A function from target types to adapters" $
-      "t2" ~> adapter @@ "t2" @@ "t1" @@ "v2" @@ "v1"]
-
-coder :: Binding
-coder = define "Coder" $
-  doc "An encoder and decoder; a bidirectional transformation between two types" $
-  T.forAlls ["v1", "v2"] $ T.record [
-    "encode">:
-      doc "A function which encodes source values as target values in a given context" $
-      Context.context ~> "v1" ~> T.either_ Error.error_ "v2",
-    "decode">:
-      doc "A function which decodes target values as source values in a given context" $
-      Context.context ~> "v2" ~> T.either_ Error.error_ "v1"]
-
-coderDirection :: Binding
-coderDirection = define "CoderDirection" $
-  doc "Indicates either the 'out' or the 'in' direction of a coder" $
-  T.enum [
-    "encode",
-    "decode"]
-
-language :: Binding
-language = define "Language" $
-  doc "A named language together with language-specific constraints" $
-  T.record [
-    "name">:
-      doc "The unique name of the language"
-      languageName,
-    "constraints">:
-      doc "The constraints which characterize the language"
-      languageConstraints]
-
-languageConstraints :: Binding
-languageConstraints = define "LanguageConstraints" $
-  doc "A set of constraints on valid type and term expressions, characterizing a language" $
-  T.record [
-    "eliminationVariants">:
-      doc "All supported elimination variants" $
-      T.set Variants.eliminationVariant,
-    "literalVariants">:
-      doc "All supported literal variants" $
-      T.set Variants.literalVariant,
-    "floatTypes">:
-      doc "All supported float types" $
-      T.set Core.floatType,
-    "functionVariants">:
-      doc "All supported function variants" $
-      T.set Variants.functionVariant,
-    "integerTypes">:
-      doc "All supported integer types" $
-      T.set Core.integerType,
-    "termVariants">:
-      doc "All supported term variants" $
-      T.set Variants.termVariant,
-    "typeVariants">:
-      doc "All supported type variants" $
-      T.set Variants.typeVariant,
-    "types">:
-      doc "A logical set of types, as a predicate which tests a type for inclusion" $
-      Core.type_ ~> T.boolean]
-
-languageName :: Binding
-languageName = define "LanguageName" $
-  doc "The unique name of a language" $
-  T.wrap T.string
-
-symmetricAdapter :: Binding
-symmetricAdapter = define "SymmetricAdapter" $
-  doc "A bidirectional encoder which maps between the same type and term languages on either side" $
-  T.forAlls ["t", "v"] $ adapter @@ "t" @@ "t" @@ "v" @@ "v"
-
-traversalOrder :: Binding
-traversalOrder = define "TraversalOrder" $
-  doc "Specifies either a pre-order or post-order traversal" $
-  T.union [
-    "pre">: doc "Pre-order traversal" T.unit,
-    "post">: doc "Post-order traversal" T.unit]
-
-typeAdapter :: Binding
-typeAdapter = define "TypeAdapter" $
-  doc "A function which maps a Hydra type to a symmetric adapter between types and terms" $
-  adapterContext ~> Core.type_ ~> T.either_ T.string
-    (symmetricAdapter @@ Core.type_ @@ Core.term)
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Context.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Context.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Context.hs
+++ /dev/null
@@ -1,52 +0,0 @@
-module Hydra.Sources.Kernel.Types.Context where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.context"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Execution context for tracing and diagnostics"}
-  where
-    definitions = [
-      context,
-      inContext]
-
-context :: Binding
-context = define "Context" $
-  doc "An execution context for tracing and diagnostics, threaded through function calls" $
-  T.record [
-    "trace">:
-      doc "A stack of context labels describing the current execution path" $
-      T.list T.string,
-    "messages">:
-      doc "A log of warnings and/or info messages" $
-      T.list T.string,
-    "other">:
-      doc "A map of string keys to arbitrary terms as values, for application-specific use" $
-      T.map Core.name Core.term]
-
-inContext :: Binding
-inContext = define "InContext" $
-  doc "A particular domain object (such as an error) together with an execution context" $
-  T.forAll "e" $ T.record [
-    "object">:
-      doc "A domain object; typically an error" $
-      T.var "e",
-    "context">:
-      doc "The execution context at the point of capture" $
-      context]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Core.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Core.hs
+++ /dev/null
@@ -1,572 +0,0 @@
-module Hydra.Sources.Kernel.Types.Core where
-
--- Special "bootstrapping" imports for hydra.core
-import Hydra.Kernel hiding (literalType)
-import Hydra.Dsl.Annotations (doc)
-import Hydra.Dsl.Bootstrap
-import Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-
-import qualified Data.Map as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.core"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-hydraCoreGraph :: Graph
-hydraCoreGraph = elementsToGraph bootstrapGraph M.empty (moduleBindings module_)
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [ns],
-            moduleDescription = Just "Hydra's core data model, consisting of the fundamental hydra.core.Term type and all of its dependencies."}
-  where
-    definitions = [
-      annotatedTerm,
-      annotatedType,
-      application,
-      applicationType,
-      binding,
-      caseStatement,
-      eitherType,
-      pairType,
-      field,
-      fieldType,
-      floatType,
-      floatValue,
-      forallType,
-      functionType,
-      injection,
-      integerType,
-      integerValue,
-      lambda,
-      let_,
-      literal,
-      literalType,
-      mapType,
-      name,
-      projection,
-      record,
-      term,
-      type_,
-      typeApplicationTerm,
-      typeLambda,
-      typeScheme,
-      typeVariableMetadata,
-      wrappedTerm]
-
-annotatedTerm :: Binding
-annotatedTerm = define "AnnotatedTerm" $
-  doc "A term together with an annotation" $
-  T.record [
-    "body">:
-      doc "The term being annotated"
-      term,
-    "annotation">:
-      doc "The annotation as a map from keys to values" $
-      T.map name term]
-
-annotatedType :: Binding
-annotatedType = define "AnnotatedType" $
-  doc "A type together with an annotation" $
-  T.record [
-    "body">:
-      doc "The type being annotated"
-      type_,
-    "annotation">:
-      doc "The annotation as a map from keys to values" $
-      T.map name term]
-
-application :: Binding
-application = define "Application" $
-  doc "A term which applies a function to an argument" $
-  T.record [
-    "function">:
-      doc "The left-hand side of the application"
-      term,
-    "argument">:
-      doc "The right-hand side of the application"
-      term]
-
-applicationType :: Binding
-applicationType = define "ApplicationType" $
-  doc "The type-level analog of an application term" $
-  T.record [
-    "function">:
-      doc "The left-hand side of the application"
-      type_,
-    "argument">:
-      doc "The right-hand side of the application"
-      type_]
-
-binding :: Binding
-binding = define "Binding" $
-  doc "A field with an optional type scheme, used to bind variables to terms in a 'let' expression" $
-  T.record [
-    "name">:
-      doc "The name of the bound variable"
-      name,
-    "term">:
-      doc "The term to which the variable is bound"
-      term,
-    "typeScheme">:
-      doc "The optional type scheme of the bound term" $
-      T.maybe typeScheme]
-
-caseStatement :: Binding
-caseStatement = define "CaseStatement" $
-  doc "A union elimination; a case statement" $
-  T.record [
-    "typeName">:
-      doc "The name of the union type"
-      name,
-    "default">:
-      doc "An optional default case, used if none of the explicit cases match" $
-      T.maybe term,
-    "cases">:
-      doc "A list of case alternatives, one per union field" $
-      T.list field]
-
-eitherType :: Binding
-eitherType = define "EitherType" $
-  doc "A type which provides a choice between a 'left' type and a 'right' type" $
-  T.record [
-    "left">:
-      doc "The 'left' alternative"
-      type_,
-    "right">:
-      doc "The 'right' alternative"
-      type_]
-
-pairType :: Binding
-pairType = define "PairType" $
-  doc "A type which pairs a 'first' type and a 'second' type" $
-  T.record [
-    "first">:
-      doc "The first component of the pair"
-      type_,
-    "second">:
-      doc "The second component of the pair"
-      type_]
-
-field :: Binding
-field = define "Field" $
-  doc "A name/term pair" $
-  T.record [
-    "name">:
-      doc "The name of the field"
-      name,
-    "term">:
-      doc "The term value of the field"
-      term]
-
-fieldType :: Binding
-fieldType = define "FieldType" $
-  doc "A name/type pair" $
-  T.record [
-    "name">:
-      doc "The name of the field"
-      name,
-    "type">:
-      doc "The type of the field"
-      type_]
-
-floatType :: Binding
-floatType = define "FloatType" $
-  doc "A floating-point type" $
-  T.union [
-    "bigfloat">:
-      doc "An arbitrary-precision floating-point type" $
-      T.unit,
-    "float32">:
-      doc "A 32-bit floating-point type" $
-      T.unit,
-    "float64">:
-      doc "A 64-bit floating-point type" $
-      T.unit]
-
-floatValue :: Binding
-floatValue = define "FloatValue" $
-  doc "A floating-point literal value" $
-  T.union [
-    "bigfloat">:
-      doc "An arbitrary-precision floating-point value" T.bigfloat,
-    "float32">:
-      doc "A 32-bit floating-point value" T.float32,
-    "float64">:
-      doc "A 64-bit floating-point value" T.float64]
-
-forallType :: Binding
-forallType = define "ForallType" $
-  doc "A universally quantified type; the System F equivalent of a type scheme, and the type-level equivalent of a lambda term." $
-  T.record [
-    "parameter">:
-      doc "The variable which is bound by the lambda"
-      name,
-    "body">:
-      doc "The body of the lambda"
-      type_]
-
-functionType :: Binding
-functionType = define "FunctionType" $
-  doc "A function type, also known as an arrow type" $
-  T.record [
-    "domain">:
-      doc "The domain (input) type of the function"
-      type_,
-    "codomain">:
-      doc "The codomain (output) type of the function"
-      type_]
-
-injection :: Binding
-injection = define "Injection" $
-  doc "An instance of a union type; i.e. a string-indexed generalization of inl() or inr()" $
-  T.record [
-    "typeName">:
-      doc "The name of the union type"
-      name,
-    "field">:
-      doc "The field being injected, including its name and value"
-      field]
-
-integerType :: Binding
-integerType = define "IntegerType" $
-  doc "An integer type" $
-  T.union [
-    "bigint">:
-      doc "An arbitrary-precision integer type" $
-      T.unit,
-    "int8">:
-      doc "An 8-bit signed integer type" $
-      T.unit,
-    "int16">:
-      doc "A 16-bit signed integer type" $
-      T.unit,
-    "int32">:
-      doc "A 32-bit signed integer type" $
-      T.unit,
-    "int64">:
-      doc "A 64-bit signed integer type" $
-      T.unit,
-    "uint8">:
-      doc "An 8-bit unsigned integer type" $
-      T.unit,
-    "uint16">:
-      doc "A 16-bit unsigned integer type" $
-      T.unit,
-    "uint32">:
-      doc "A 32-bit unsigned integer type" $
-      T.unit,
-    "uint64">:
-      doc "A 64-bit unsigned integer type" $
-      T.unit]
-
-integerValue :: Binding
-integerValue = define "IntegerValue" $
-  doc "An integer literal value" $
-  T.union [
-    "bigint">:
-      doc "An arbitrary-precision integer value" T.bigint,
-    "int8">:
-      doc "An 8-bit signed integer value" T.int8,
-    "int16">:
-      doc "A 16-bit signed integer value (short value)" T.int16,
-    "int32">:
-      doc "A 32-bit signed integer value (int value)" T.int32,
-    "int64">:
-      doc "A 64-bit signed integer value (long value)" T.int64,
-    "uint8">:
-      doc "An 8-bit unsigned integer value (byte)" T.uint8,
-    "uint16">:
-      doc "A 16-bit unsigned integer value" T.uint16,
-    "uint32">:
-      doc "A 32-bit unsigned integer value (unsigned int)" T.uint32,
-    "uint64">:
-      doc "A 64-bit unsigned integer value (unsigned long)" T.uint64]
-
-lambda :: Binding
-lambda = define "Lambda" $
-  doc "A function abstraction (lambda)" $
-  T.record [
-    "parameter">:
-      doc "The parameter of the lambda"
-      name,
-    "domain">:
-      doc "An optional domain type for the lambda" $
-      T.maybe type_,
-    "body">:
-      doc "The body of the lambda"
-      term]
-
-let_ :: Binding
-let_ = define "Let" $
-  doc "A set of (possibly recursive) 'let' bindings together with a body in which they are bound" $
-  T.record [
-    "bindings">:
-      doc "The list of variable bindings" $
-      T.list binding,
-    "body">:
-      doc "The body term in which the variables are bound"
-      term]
-
-literal :: Binding
-literal = define "Literal" $
-  doc "A term constant; an instance of a literal type" $
-  T.union [
-    "binary">:
-      doc "A binary literal" T.binary,
-    "boolean">:
-      doc "A boolean literal" T.boolean,
-    "decimal">:
-      doc "An arbitrary-precision decimal literal" T.decimal,
-    "float">:
-      doc "A floating-point literal"
-      floatValue,
-    "integer">:
-      doc "An integer literal"
-      integerValue,
-    "string">:
-      doc "A string literal" T.string]
-
-literalType :: Binding
-literalType = define "LiteralType" $
-  doc "Any of a fixed set of literal types, also called atomic types, base types, primitive types, or type constants" $
-  T.union [
-    "binary">:
-       doc "The type of a binary (byte string) value" T.unit,
-    "boolean">:
-      doc "The type of a boolean (true/false) value" T.unit,
-    "decimal">:
-      doc "The type of an arbitrary-precision decimal value" T.unit,
-    "float">:
-      doc "The type of a floating-point value"
-      floatType,
-    "integer">:
-      doc "The type of an integer value"
-      integerType,
-    "string">:
-      doc "The type of a string value" T.unit]
-
-mapType :: Binding
-mapType = define "MapType" $
-  doc "A map type" $
-  T.record [
-    "keys">:
-      doc "The type of keys in the map"
-      type_,
-    "values">:
-      doc "The type of values in the map"
-      type_]
-
-name :: Binding
-name = define "Name" $
-  doc "A unique identifier in some context; a string-valued key" $
-  T.wrap T.string
-
-projection :: Binding
-projection = define "Projection" $
-  doc "A record elimination; a projection" $
-  T.record [
-    "typeName">:
-      doc "The name of the record type"
-      name,
-    "field">:
-      doc "The name of the projected field"
-      name]
-
-record :: Binding
-record = define "Record" $
-  doc "A record, or labeled tuple; a map of field names to terms" $
-  T.record [
-    "typeName">:
-      doc "The name of the record type"
-      name,
-    "fields">:
-      doc "The fields of the record, as a list of name/term pairs" $
-      T.list field]
-
-term :: Binding
-term = define "Term" $
-  doc "A data term" $
-  T.union [
-    "annotated">:
-      doc "A term annotated with metadata"
-      annotatedTerm,
-    "application">:
-      doc "A function application"
-      application,
-    "cases">:
-      doc "A union elimination; a case statement"
-      caseStatement,
-    "either">:
-      doc "An either value" $
-      T.either_ term term,
-    "inject">:
-      doc "An injection; an instance of a union type"
-      injection,
-    "lambda">:
-      doc "A function abstraction (lambda)"
-      lambda,
-    "let">:
-      doc "A 'let' term, which binds variables to terms"
-      let_,
-    "list">:
-      doc "A list" $
-      T.list term,
-    "literal">:
-      doc "A literal value"
-      literal,
-    "map">:
-      doc "A map of keys to values" $
-      T.map term term,
-    "maybe">:
-      doc "An optional value" $
-      T.maybe term,
-    "pair">:
-      doc "A pair (2-tuple)" $
-      T.pair term term,
-    "project">:
-      doc "A record elimination; a projection"
-      projection,
-    "record">:
-      doc "A record term"
-      record,
-    "set">:
-      doc "A set of values" $
-      T.set term,
-    "typeApplication">:
-      doc "A System F type application term"
-      typeApplicationTerm,
-    "typeLambda">:
-      doc "A System F type abstraction term"
-      typeLambda,
-    "unit">:
-      doc "A unit value; a term with no value" $
-      T.unit,
-    "unwrap">:
-      doc "An unwrap elimination; the inverse of a wrap"
-      name,
-    "variable">:
-      doc "A variable reference"
-      name,
-    "wrap">:
-      doc "A wrapped term; an instance of a wrapper type (newtype)"
-      wrappedTerm]
-
-type_ :: Binding
-type_ = define "Type" $
-  doc "A data type" $
-  T.union [
-    "annotated">:
-      doc "An annotated type"
-      annotatedType,
-    "application">:
-      doc "A type application"
-      applicationType,
-    "either">:
-      doc "An either (sum) type"
-      eitherType,
-    "forall">:
-      doc "A universally quantified (polymorphic) type"
-      forallType,
-    "function">:
-      doc "A function type"
-      functionType,
-    "list">:
-      doc "A list type"
-      type_,
-    "literal">:
-      doc "A literal type"
-      literalType,
-    "map">:
-      doc "A map type"
-      mapType,
-    "maybe">:
-      doc "An optional type"
-      type_,
-    "pair">:
-      doc "A pair (2-tuple) type"
-      pairType,
-    "record">:
-      doc "A record type" $
-      T.list fieldType,
-    "set">:
-      doc "A set type"
-      type_,
-    "union">:
-      doc "A union type with field names" $
-      T.list fieldType,
-    "unit">:
-      doc "The unit type" $
-      T.unit,
-    "variable">:
-      doc "A type variable"
-      name,
-    "void">:
-      doc "The void (uninhabited, or bottom) type" $
-      T.unit,
-    "wrap">:
-      doc "A wrapped type (newtype)"
-      type_]
-
-typeApplicationTerm :: Binding
-typeApplicationTerm = define "TypeApplicationTerm" $
-  doc "A term applied to a type; a type application" $
-  T.record [
-    "body">:
-      doc "The term being applied to a type"
-      term,
-    "type">:
-      doc "The type argument"
-      type_]
-
-typeLambda :: Binding
-typeLambda = define "TypeLambda" $
-  doc "A System F type abstraction term" $
-  T.record [
-    "parameter">:
-      doc "The type variable introduced by the abstraction"
-      name,
-    "body">:
-      doc "The body of the abstraction"
-      term]
-
-typeScheme :: Binding
-typeScheme = define "TypeScheme" $
-  doc "A type expression together with free type variables occurring in the expression" $
-  T.record [
-    "variables">:
-      doc "The free type variables" $
-      T.list name,
-    "body">:
-      doc "The type expression"
-      type_,
-    "constraints">:
-      doc "Optional metadata for type variables, including typeclass constraints. The map keys are type variable names." $
-      T.maybe $ T.map name typeVariableMetadata]
-
-typeVariableMetadata :: Binding
-typeVariableMetadata = define "TypeVariableMetadata" $
-  doc "Metadata associated with a type variable, including typeclass constraints" $
-  T.record [
-    "classes">:
-      doc "The set of typeclass constraints on this type variable" $
-      T.set name]
-
-wrappedTerm :: Binding
-wrappedTerm = define "WrappedTerm" $
-  doc "A term wrapped in a type name" $
-  T.record [
-    "typeName">:
-      doc "The name of the wrapper type"
-      name,
-    "body">:
-      doc "The wrapped term"
-      term]
-
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Checking.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Checking.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Checking.hs
+++ /dev/null
@@ -1,217 +0,0 @@
-module Hydra.Sources.Kernel.Types.Error.Checking where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Paths as Paths
-import qualified Hydra.Sources.Kernel.Types.Typing as Typing
-import qualified Hydra.Sources.Kernel.Types.Variants as Variants
-
-
-ns :: Namespace
-ns = Namespace "hydra.error.checking"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns, Paths.ns, Typing.ns, Variants.ns],
-            moduleTypeDependencies = [Core.ns, Paths.ns, Typing.ns, Variants.ns],
-            moduleDescription = Just "Error types for type checking"}
-  where
-    definitions = [
-      checkingError,
-      incorrectUnificationError,
-      notAForallTypeError,
-      notAFunctionTypeError,
-      otherCheckingError,
-      typeArityMismatchError,
-      typeMismatchError,
-      unboundTypeVariablesError,
-      undefinedTermVariableCheckingError,
-      unequalTypesError,
-      unsupportedTermVariantError,
-      untypedLambdaError,
-      untypedLetBindingError,
-      untypedTermVariableCheckingError]
-
-checkingError :: Binding
-checkingError = define "CheckingError" $
-  doc "An error that occurred during type checking" $
-  T.union [
-    "incorrectUnification">:
-      doc "A post-unification consistency check failure" $
-      incorrectUnificationError,
-    "notAForallType">:
-      doc "A type that is not a forall type when one was expected" $
-      notAForallTypeError,
-    "notAFunctionType">:
-      doc "A type that is not a function type when one was expected" $
-      notAFunctionTypeError,
-    "other">:
-      doc "A generic checking error" $
-      otherCheckingError,
-    "typeArityMismatch">:
-      doc "A type constructor applied to the wrong number of arguments" $
-      typeArityMismatchError,
-    "typeMismatch">:
-      doc "A type mismatch between expected and actual types" $
-      typeMismatchError,
-    "unboundTypeVariables">:
-      doc "Type variables that are not bound in scope" $
-      unboundTypeVariablesError,
-    "undefinedTermVariable">:
-      doc "A reference to a term variable that is not bound in scope, encountered during checking" $
-      undefinedTermVariableCheckingError,
-    "unequalTypes">:
-      doc "Multiple types that should be equal but are not" $
-      unequalTypesError,
-    "unsupportedTermVariant">:
-      doc "A term variant that the type checker does not support" $
-      unsupportedTermVariantError,
-    "untypedLambda">:
-      doc "A lambda expression without a type annotation on its parameter" $
-      untypedLambdaError,
-    "untypedLetBinding">:
-      doc "A let binding without a type annotation" $
-      untypedLetBindingError,
-    "untypedTermVariable">:
-      doc "A reference to a term variable whose type is not known, encountered during checking" $
-      untypedTermVariableCheckingError]
-
-incorrectUnificationError :: Binding
-incorrectUnificationError = define "IncorrectUnificationError" $
-  doc "A post-unification consistency check failure" $
-  T.record [
-    "substitution">:
-      doc "The substitution that failed the consistency check" $
-      Typing.typeSubst]
-
-notAForallTypeError :: Binding
-notAForallTypeError = define "NotAForallTypeError" $
-  doc "A type that is not a forall type when type arguments are being applied" $
-  T.record [
-    "type">:
-      doc "The actual type encountered" $
-      Core.type_,
-    "typeArguments">:
-      doc "The type arguments that were being applied" $
-      T.list Core.type_]
-
-notAFunctionTypeError :: Binding
-notAFunctionTypeError = define "NotAFunctionTypeError" $
-  doc "A type that is not a function type when one was expected in an application" $
-  T.record [
-    "type">:
-      doc "The actual type encountered" $
-      Core.type_]
-
-typeArityMismatchError :: Binding
-typeArityMismatchError = define "TypeArityMismatchError" $
-  doc "A type constructor applied to the wrong number of type arguments" $
-  T.record [
-    "type">:
-      doc "The type being checked" $
-      Core.type_,
-    "expectedArity">:
-      doc "The expected number of type arguments" $
-      T.int32,
-    "actualArity">:
-      doc "The actual number of type arguments provided" $
-      T.int32,
-    "typeArguments">:
-      doc "The type arguments that were provided" $
-      T.list Core.type_]
-
-typeMismatchError :: Binding
-typeMismatchError = define "TypeMismatchError" $
-  doc "A type mismatch between expected and actual types" $
-  T.record [
-    "expectedType">:
-      doc "The expected type" $
-      Core.type_,
-    "actualType">:
-      doc "The actual type encountered" $
-      Core.type_]
-
-unboundTypeVariablesError :: Binding
-unboundTypeVariablesError = define "UnboundTypeVariablesError" $
-  doc "Type variables that appear free in a type but are not bound in scope" $
-  T.record [
-    "variables">:
-      doc "The set of unbound type variable names" $
-      T.set Core.name,
-    "type">:
-      doc "The type containing the unbound variables" $
-      Core.type_]
-
-unequalTypesError :: Binding
-unequalTypesError = define "UnequalTypesError" $
-  doc "Multiple types that should all be equal but are not" $
-  T.record [
-    "types">:
-      doc "The list of types that are not all equal" $
-      T.list Core.type_,
-    "description">:
-      doc "A description of the context in which the types were expected to be equal" $
-      T.string]
-
-unsupportedTermVariantError :: Binding
-unsupportedTermVariantError = define "UnsupportedTermVariantError" $
-  doc "A term variant that the type checker does not support" $
-  T.record [
-    "termVariant">:
-      doc "The unsupported term variant" $
-      Variants.termVariant]
-
-untypedLambdaError :: Binding
-untypedLambdaError = define "UntypedLambdaError" $
-  doc "A lambda expression without a type annotation on its parameter" $
-  T.record []
-
-untypedLetBindingError :: Binding
-untypedLetBindingError = define "UntypedLetBindingError" $
-  doc "A let binding without a type annotation" $
-  T.record [
-    "binding">:
-      doc "The untyped binding" $
-      Core.binding]
-
-otherCheckingError :: Binding
-otherCheckingError = define "OtherCheckingError" $
-  doc "A generic checking error: message + subterm path" $
-  T.record [
-    "path">:
-      doc "The subterm path at which the error was observed" $
-      Paths.subtermPath,
-    "message">:
-      doc "A human-readable error message" $
-      T.string]
-
-undefinedTermVariableCheckingError :: Binding
-undefinedTermVariableCheckingError = define "UndefinedTermVariableCheckingError" $
-  doc "A reference to a term variable that is not bound in scope, encountered during checking" $
-  T.record [
-    "path">:
-      doc "The subterm path at which the variable was referenced" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the undefined variable" $
-      Core.name]
-
-untypedTermVariableCheckingError :: Binding
-untypedTermVariableCheckingError = define "UntypedTermVariableCheckingError" $
-  doc "A reference to a term variable whose type is not known, encountered during checking" $
-  T.record [
-    "path">:
-      doc "The subterm path at which the variable was referenced" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the untyped variable" $
-      Core.name]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Core.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Core.hs
+++ /dev/null
@@ -1,673 +0,0 @@
-module Hydra.Sources.Kernel.Types.Error.Core where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Paths as Paths
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Variants as Variants
-
-
-ns :: Namespace
-ns = Namespace "hydra.error.core"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Paths.ns, Core.ns, Variants.ns],
-            moduleTypeDependencies = [Paths.ns, Core.ns, Variants.ns],
-            moduleDescription = Just "Error types for core type and term validation"}
-  where
-    definitions = [
-      -- Existing error types (pre-linter)
-      duplicateBindingError,
-      duplicateFieldError,
-      undefinedFieldError,
-      unexpectedTermVariantError,
-      unexpectedTypeVariantError,
-
-      -- Term validation errors
-      constantConditionError,
-      emptyCaseStatementError,
-      emptyLetBindingsError,
-      emptyTermAnnotationError,
-      emptyTypeNameInTermError,
-      invalidLambdaParameterNameError,
-      invalidLetBindingNameError,
-      invalidTypeLambdaParameterNameError,
-      nestedTermAnnotationError,
-      redundantWrapUnwrapError,
-      selfApplicationError,
-      termVariableShadowingError,
-      typeVariableShadowingInTypeLambdaError,
-      undefinedTermVariableError,
-      undefinedTypeVariableInBindingTypeError,
-      undefinedTypeVariableInLambdaDomainError,
-      undefinedTypeVariableInTypeApplicationError,
-      unknownPrimitiveNameError,
-      unnecessaryIdentityApplicationError,
-      untypedTermVariableError,
-      invalidTermError,
-
-      -- Type validation errors
-      duplicateRecordTypeFieldNamesError,
-      duplicateUnionTypeFieldNamesError,
-      emptyRecordTypeError,
-      emptyTypeAnnotationError,
-      emptyUnionTypeError,
-      invalidForallParameterNameError,
-      invalidTypeSchemeVariableNameError,
-      nestedTypeAnnotationError,
-      nonComparableMapKeyTypeError,
-      nonComparableSetElementTypeError,
-      singleVariantUnionError,
-      typeVariableShadowingInForallError,
-      undefinedTypeVariableError,
-      voidInNonBottomPositionError,
-      invalidTypeError]
-
--- ============================================================================
--- Existing error types (pre-linter)
--- ============================================================================
-
-duplicateBindingError :: Binding
-duplicateBindingError = define "DuplicateBindingError" $
-  doc "A duplicate binding name in a let expression" $
-  T.record [
-    "location">:
-      doc "The path to the duplicate binding within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The duplicated binding name" $
-      Core.name]
-
-duplicateFieldError :: Binding
-duplicateFieldError = define "DuplicateFieldError" $
-  doc "A duplicate field name in a record or union type" $
-  T.record [
-    "location">:
-      doc "The path to the duplicate field within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The duplicated field name" $
-      Core.name]
-
-undefinedFieldError :: Binding
-undefinedFieldError = define "UndefinedFieldError" $
-  doc "A reference to a field that does not exist in the given type" $
-  T.record [
-    "fieldName">:
-      doc "The name of the undefined field" $
-      Core.name,
-    "typeName">:
-      doc "The name of the type in which the field was expected" $
-      Core.name]
-
-unexpectedTermVariantError :: Binding
-unexpectedTermVariantError = define "UnexpectedTermVariantError" $
-  doc "An unexpected term variant was encountered" $
-  T.record [
-    "expectedVariant">:
-      doc "The expected term variant" $
-      Variants.termVariant,
-    "actualTerm">:
-      doc "The actual term that was encountered" $
-      Core.term]
-
-unexpectedTypeVariantError :: Binding
-unexpectedTypeVariantError = define "UnexpectedTypeVariantError" $
-  doc "An unexpected type variant was encountered" $
-  T.record [
-    "expectedVariant">:
-      doc "The expected type variant" $
-      Variants.typeVariant,
-    "actualType">:
-      doc "The actual type that was encountered" $
-      Core.type_]
-
--- ============================================================================
--- Term validation errors
--- ============================================================================
-
--- T1. EmptyLetBindingsError (optional)
-emptyLetBindingsError :: Binding
-emptyLetBindingsError = define "EmptyLetBindingsError" $
-  doc "A let expression with an empty list of bindings (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the empty let expression within the term" $
-      Paths.subtermPath]
-
--- T2. DuplicateLetBindingNamesError — covered by existing DuplicateBindingError
-
--- T3. DuplicateRecordFieldNamesError — covered by existing DuplicateFieldError (for terms)
-
--- T4. DuplicateCaseStatementFieldNamesError — covered by existing DuplicateFieldError (for terms)
-
--- T5. EmptyTypeNameInTermError (optional)
-emptyTypeNameInTermError :: Binding
-emptyTypeNameInTermError = define "EmptyTypeNameInTermError" $
-  doc "A record, injection, projection, or case statement with an empty type name (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the term with the empty type name" $
-      Paths.subtermPath]
-
--- T6. EmptyCaseStatementError (optional)
-emptyCaseStatementError :: Binding
-emptyCaseStatementError = define "EmptyCaseStatementError" $
-  doc "A case statement with no cases and no default (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the empty case statement within the term" $
-      Paths.subtermPath,
-    "typeName">:
-      doc "The name of the union type being matched" $
-      Core.name]
-
--- T7. UndefinedTermVariableError (replaces UndefinedTermError)
-undefinedTermVariableError :: Binding
-undefinedTermVariableError = define "UndefinedTermVariableError" $
-  doc "A variable reference to a term name that is not bound in scope" $
-  T.record [
-    "location">:
-      doc "The path to the undefined variable within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the undefined variable" $
-      Core.name]
-
--- T8. UndefinedTypeVariableInLambdaDomainError
-undefinedTypeVariableInLambdaDomainError :: Binding
-undefinedTypeVariableInLambdaDomainError = define "UndefinedTypeVariableInLambdaDomainError" $
-  doc "A type variable in a lambda domain annotation that is not bound in scope" $
-  T.record [
-    "location">:
-      doc "The path to the lambda within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the undefined type variable" $
-      Core.name]
-
--- T9. UndefinedTypeVariableInTypeApplicationError
-undefinedTypeVariableInTypeApplicationError :: Binding
-undefinedTypeVariableInTypeApplicationError = define "UndefinedTypeVariableInTypeApplicationError" $
-  doc "A type variable in a type application term that is not bound in scope" $
-  T.record [
-    "location">:
-      doc "The path to the type application within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the undefined type variable" $
-      Core.name]
-
--- T10. UndefinedTypeVariableInBindingTypeError
-undefinedTypeVariableInBindingTypeError :: Binding
-undefinedTypeVariableInBindingTypeError = define "UndefinedTypeVariableInBindingTypeError" $
-  doc "A type variable in a let binding's type scheme that is not bound by the scheme or enclosing scope" $
-  T.record [
-    "location">:
-      doc "The path to the binding within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the undefined type variable" $
-      Core.name]
-
--- T11. TermVariableShadowingError (optional)
-termVariableShadowingError :: Binding
-termVariableShadowingError = define "TermVariableShadowingError" $
-  doc "A lambda parameter or let binding name that shadows a variable already in scope (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the shadowing binding within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the shadowed variable" $
-      Core.name]
-
--- T12. TypeVariableShadowingInTypeLambdaError (optional)
-typeVariableShadowingInTypeLambdaError :: Binding
-typeVariableShadowingInTypeLambdaError = define "TypeVariableShadowingInTypeLambdaError" $
-  doc "A type lambda parameter that shadows a type variable already in scope (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the type lambda within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the shadowed type variable" $
-      Core.name]
-
--- T13. ConstantConditionError (optional)
-constantConditionError :: Binding
-constantConditionError = define "ConstantConditionError" $
-  doc "An application of ifElse where the condition is a literal boolean, creating a dead branch (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the constant condition within the term" $
-      Paths.subtermPath,
-    "value">:
-      doc "The constant boolean value of the condition" $
-      T.boolean]
-
--- T14. RedundantWrapUnwrapError (optional)
-redundantWrapUnwrapError :: Binding
-redundantWrapUnwrapError = define "RedundantWrapUnwrapError" $
-  doc "An unwrap elimination applied to a wrap term of the same type, forming a no-op round-trip (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the redundant wrap/unwrap within the term" $
-      Paths.subtermPath,
-    "typeName">:
-      doc "The type name of the wrapper" $
-      Core.name]
-
--- T15. SelfApplicationError (optional)
-selfApplicationError :: Binding
-selfApplicationError = define "SelfApplicationError" $
-  doc "A variable applied to itself, which is almost always a mistake in Hydra's type system (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the self-application within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the variable applied to itself" $
-      Core.name]
-
--- T16. UnnecessaryIdentityApplicationError (optional)
-unnecessaryIdentityApplicationError :: Binding
-unnecessaryIdentityApplicationError = define "UnnecessaryIdentityApplicationError" $
-  doc "An application of an identity lambda to an argument, which simplifies to the argument (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the identity application within the term" $
-      Paths.subtermPath]
-
--- T17. InvalidLambdaParameterNameError (optional)
-invalidLambdaParameterNameError :: Binding
-invalidLambdaParameterNameError = define "InvalidLambdaParameterNameError" $
-  doc "A lambda parameter name that violates naming conventions (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the lambda within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The invalid parameter name" $
-      Core.name]
-
--- T18. InvalidLetBindingNameError (optional)
-invalidLetBindingNameError :: Binding
-invalidLetBindingNameError = define "InvalidLetBindingNameError" $
-  doc "A let binding name that violates naming conventions (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the binding within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The invalid binding name" $
-      Core.name]
-
--- T19. InvalidTypeLambdaParameterNameError (optional)
-invalidTypeLambdaParameterNameError :: Binding
-invalidTypeLambdaParameterNameError = define "InvalidTypeLambdaParameterNameError" $
-  doc "A type lambda parameter name that violates naming conventions (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the type lambda within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The invalid type lambda parameter name" $
-      Core.name]
-
--- T20. NestedTermAnnotationError (optional)
-nestedTermAnnotationError :: Binding
-nestedTermAnnotationError = define "NestedTermAnnotationError" $
-  doc "A term annotation directly wrapping another term annotation; annotations should be merged (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the outer annotation within the term" $
-      Paths.subtermPath]
-
--- T21. EmptyTermAnnotationError (optional)
-emptyTermAnnotationError :: Binding
-emptyTermAnnotationError = define "EmptyTermAnnotationError" $
-  doc "A term annotation with an empty annotation map (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the empty annotation within the term" $
-      Paths.subtermPath]
-
--- T22. UnknownPrimitiveNameError
-unknownPrimitiveNameError :: Binding
-unknownPrimitiveNameError = define "UnknownPrimitiveNameError" $
-  doc "A primitive function reference to a name not in the known primitive registry" $
-  T.record [
-    "location">:
-      doc "The path to the primitive reference within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The unknown primitive name" $
-      Core.name]
-
--- UntypedTermVariableError (replaces UndefinedTypeError)
-untypedTermVariableError :: Binding
-untypedTermVariableError = define "UntypedTermVariableError" $
-  doc "A term variable whose type is not known in the current scope" $
-  T.record [
-    "location">:
-      doc "The path to the untyped variable within the term" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the untyped variable" $
-      Core.name]
-
--- InvalidTermError: the union of all term validation errors
-invalidTermError :: Binding
-invalidTermError = define "InvalidTermError" $
-  doc "An error indicating that a term is invalid" $
-  T.union [
-    "constantCondition">:
-      doc "An ifElse with a literal boolean condition (optional)" $
-      constantConditionError,
-    "duplicateBinding">:
-      doc "A duplicate binding name in a let expression" $
-      duplicateBindingError,
-    "duplicateField">:
-      doc "A duplicate field name in a record or case statement" $
-      duplicateFieldError,
-    "emptyCaseStatement">:
-      doc "A case statement with no cases and no default (optional)" $
-      emptyCaseStatementError,
-    "emptyLetBindings">:
-      doc "A let expression with no bindings (optional)" $
-      emptyLetBindingsError,
-    "emptyTermAnnotation">:
-      doc "A term annotation with an empty annotation map (optional)" $
-      emptyTermAnnotationError,
-    "emptyTypeNameInTerm">:
-      doc "A term with an empty type name (optional)" $
-      emptyTypeNameInTermError,
-    "invalidLambdaParameterName">:
-      doc "A lambda parameter name violating naming conventions (optional)" $
-      invalidLambdaParameterNameError,
-    "invalidLetBindingName">:
-      doc "A let binding name violating naming conventions (optional)" $
-      invalidLetBindingNameError,
-    "invalidTypeLambdaParameterName">:
-      doc "A type lambda parameter name violating naming conventions (optional)" $
-      invalidTypeLambdaParameterNameError,
-    "nestedTermAnnotation">:
-      doc "Nested term annotations that should be merged (optional)" $
-      nestedTermAnnotationError,
-    "redundantWrapUnwrap">:
-      doc "A no-op unwrap-of-wrap round-trip (optional)" $
-      redundantWrapUnwrapError,
-    "selfApplication">:
-      doc "A variable applied to itself (optional)" $
-      selfApplicationError,
-    "termVariableShadowing">:
-      doc "A binding that shadows a variable already in scope (optional)" $
-      termVariableShadowingError,
-    "typeVariableShadowingInTypeLambda">:
-      doc "A type lambda parameter that shadows a type variable in scope (optional)" $
-      typeVariableShadowingInTypeLambdaError,
-    "undefinedTermVariable">:
-      doc "A variable reference to an unbound term name" $
-      undefinedTermVariableError,
-    "undefinedTypeVariableInBindingType">:
-      doc "An unbound type variable in a let binding's type scheme" $
-      undefinedTypeVariableInBindingTypeError,
-    "undefinedTypeVariableInLambdaDomain">:
-      doc "An unbound type variable in a lambda domain annotation" $
-      undefinedTypeVariableInLambdaDomainError,
-    "undefinedTypeVariableInTypeApplication">:
-      doc "An unbound type variable in a type application term" $
-      undefinedTypeVariableInTypeApplicationError,
-    "unknownPrimitiveName">:
-      doc "A reference to an unknown primitive function" $
-      unknownPrimitiveNameError,
-    "unnecessaryIdentityApplication">:
-      doc "An identity lambda applied to an argument (optional)" $
-      unnecessaryIdentityApplicationError,
-    "untypedTermVariable">:
-      doc "A term variable whose type is not known" $
-      untypedTermVariableError]
-
--- ============================================================================
--- Type validation errors
--- ============================================================================
-
--- Y1. EmptyRecordTypeError (optional)
-emptyRecordTypeError :: Binding
-emptyRecordTypeError = define "EmptyRecordTypeError" $
-  doc "A record type with no fields; TypeUnit is preferred for the unit-like case (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the empty record type" $
-      Paths.subtermPath]
-
--- Y2. EmptyUnionTypeError (optional)
-emptyUnionTypeError :: Binding
-emptyUnionTypeError = define "EmptyUnionTypeError" $
-  doc "A union type with no alternatives; TypeVoid is preferred (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the empty union type" $
-      Paths.subtermPath]
-
--- Y3. SingleVariantUnionError (optional)
-singleVariantUnionError :: Binding
-singleVariantUnionError = define "SingleVariantUnionError" $
-  doc "A union type with exactly one field; could be a wrapped type or record instead (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the single-variant union type" $
-      Paths.subtermPath,
-    "fieldName">:
-      doc "The name of the single field" $
-      Core.name]
-
--- Y4. DuplicateRecordTypeFieldNamesError
-duplicateRecordTypeFieldNamesError :: Binding
-duplicateRecordTypeFieldNamesError = define "DuplicateRecordTypeFieldNamesError" $
-  doc "A record type with duplicate field names" $
-  T.record [
-    "location">:
-      doc "The path to the record type with duplicate fields" $
-      Paths.subtermPath,
-    "name">:
-      doc "The duplicated field name" $
-      Core.name]
-
--- Y5. DuplicateUnionTypeFieldNamesError
-duplicateUnionTypeFieldNamesError :: Binding
-duplicateUnionTypeFieldNamesError = define "DuplicateUnionTypeFieldNamesError" $
-  doc "A union type with duplicate field names" $
-  T.record [
-    "location">:
-      doc "The path to the union type with duplicate fields" $
-      Paths.subtermPath,
-    "name">:
-      doc "The duplicated field name" $
-      Core.name]
-
--- Y6. UndefinedTypeVariableError
-undefinedTypeVariableError :: Binding
-undefinedTypeVariableError = define "UndefinedTypeVariableError" $
-  doc "A type variable reference to a name that is not bound in scope" $
-  T.record [
-    "location">:
-      doc "The path to the undefined type variable" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the undefined type variable" $
-      Core.name]
-
--- Y7. TypeVariableShadowingInForallError (optional)
-typeVariableShadowingInForallError :: Binding
-typeVariableShadowingInForallError = define "TypeVariableShadowingInForallError" $
-  doc "A forall type parameter that shadows a type variable already in scope (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the shadowing forall type" $
-      Paths.subtermPath,
-    "name">:
-      doc "The name of the shadowed type variable" $
-      Core.name]
-
--- Y8. NestedTypeAnnotationError (optional)
-nestedTypeAnnotationError :: Binding
-nestedTypeAnnotationError = define "NestedTypeAnnotationError" $
-  doc "A type annotation directly wrapping another type annotation; annotations should be merged (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the outer annotation" $
-      Paths.subtermPath]
-
--- Y9. EmptyTypeAnnotationError (optional)
-emptyTypeAnnotationError :: Binding
-emptyTypeAnnotationError = define "EmptyTypeAnnotationError" $
-  doc "A type annotation with an empty annotation map (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the empty annotation" $
-      Paths.subtermPath]
-
--- Y10. VoidInNonBottomPositionError (optional)
-voidInNonBottomPositionError :: Binding
-voidInNonBottomPositionError = define "VoidInNonBottomPositionError" $
-  doc "TypeVoid appearing in a position where no value can be constructed, such as a record field, list element, map key/value, set element, pair component, or function codomain (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the void type in a non-bottom position" $
-      Paths.subtermPath]
-
--- Y11. NonComparableMapKeyTypeError
-nonComparableMapKeyTypeError :: Binding
-nonComparableMapKeyTypeError = define "NonComparableMapKeyTypeError" $
-  doc "A map type whose key type is or directly contains a function type, which cannot be compared for equality" $
-  T.record [
-    "location">:
-      doc "The path to the map type" $
-      Paths.subtermPath,
-    "keyType">:
-      doc "The non-comparable key type" $
-      Core.type_]
-
--- Y12. NonComparableSetElementTypeError
-nonComparableSetElementTypeError :: Binding
-nonComparableSetElementTypeError = define "NonComparableSetElementTypeError" $
-  doc "A set type whose element type is or directly contains a function type, which cannot be compared for equality" $
-  T.record [
-    "location">:
-      doc "The path to the set type" $
-      Paths.subtermPath,
-    "elementType">:
-      doc "The non-comparable element type" $
-      Core.type_]
-
--- Y13. InvalidForallParameterNameError (optional)
-invalidForallParameterNameError :: Binding
-invalidForallParameterNameError = define "InvalidForallParameterNameError" $
-  doc "A forall type parameter name that violates type variable naming conventions (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the forall type" $
-      Paths.subtermPath,
-    "name">:
-      doc "The invalid parameter name" $
-      Core.name]
-
--- Y14. InvalidTypeSchemeVariableNameError (optional)
-invalidTypeSchemeVariableNameError :: Binding
-invalidTypeSchemeVariableNameError = define "InvalidTypeSchemeVariableNameError" $
-  doc "A type scheme variable name that violates type variable naming conventions (optional)" $
-  T.record [
-    "location">:
-      doc "The path to the type scheme" $
-      Paths.subtermPath,
-    "name">:
-      doc "The invalid variable name" $
-      Core.name]
-
--- InvalidTypeError: the union of all type validation errors
-invalidTypeError :: Binding
-invalidTypeError = define "InvalidTypeError" $
-  doc "An error indicating that a type is invalid" $
-  T.union [
-    "duplicateRecordTypeFieldNames">:
-      doc "A record type with duplicate field names" $
-      duplicateRecordTypeFieldNamesError,
-    "duplicateUnionTypeFieldNames">:
-      doc "A union type with duplicate field names" $
-      duplicateUnionTypeFieldNamesError,
-    "emptyRecordType">:
-      doc "A record type with no fields (optional)" $
-      emptyRecordTypeError,
-    "emptyTypeAnnotation">:
-      doc "A type annotation with an empty annotation map (optional)" $
-      emptyTypeAnnotationError,
-    "emptyUnionType">:
-      doc "A union type with no alternatives (optional)" $
-      emptyUnionTypeError,
-    "invalidForallParameterName">:
-      doc "A forall parameter name violating naming conventions (optional)" $
-      invalidForallParameterNameError,
-    "invalidTypeSchemeVariableName">:
-      doc "A type scheme variable name violating naming conventions (optional)" $
-      invalidTypeSchemeVariableNameError,
-    "nestedTypeAnnotation">:
-      doc "Nested type annotations that should be merged (optional)" $
-      nestedTypeAnnotationError,
-    "nonComparableMapKeyType">:
-      doc "A map with a non-comparable key type" $
-      nonComparableMapKeyTypeError,
-    "nonComparableSetElementType">:
-      doc "A set with a non-comparable element type" $
-      nonComparableSetElementTypeError,
-    "singleVariantUnion">:
-      doc "A union type with only one variant (optional)" $
-      singleVariantUnionError,
-    "typeVariableShadowingInForall">:
-      doc "A forall parameter that shadows a type variable in scope (optional)" $
-      typeVariableShadowingInForallError,
-    "undefinedTypeVariable">:
-      doc "A type variable reference to an unbound name" $
-      undefinedTypeVariableError,
-    "voidInNonBottomPosition">:
-      doc "TypeVoid in a position where no value can be constructed (optional)" $
-      voidInNonBottomPositionError]
-
--- ============================================================================
--- Deferred term checks (require more than O(1) analysis)
--- ============================================================================
-
--- T-D1. UnusedLetBindingError (optional)
---   Requires free-variable computation over the let body and sibling bindings.
-
--- T-D2. EmptyCollectionFoldError (optional)
---   Requires recognizing primitive fold application patterns across the
---   application spine (variable number of curried arguments).
-
--- T-D3. DeeplyNestedApplicationError (optional)
---   Requires depth tracking across chains of application terms.
-
--- ============================================================================
--- Deferred type checks (require more than O(1) analysis)
--- ============================================================================
-
--- Y-D1. UnusedForallTypeVariableError (optional)
---   Requires free type variable computation over the forall body.
-
--- Y-D2. NonCanonicalTypeFormError (optional)
---   Requires recognizing beta-reducible type applications (type-level lambda
---   applied to an argument).
-
--- Y-D3. ExcessiveTypeNestingError (optional)
---   Requires depth tracking across chains of function, application, or
---   forall types.
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Packaging.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Error/Packaging.hs
+++ /dev/null
@@ -1,119 +0,0 @@
-module Hydra.Sources.Kernel.Types.Error.Packaging where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Packaging as Packaging
-
-
-ns :: Namespace
-ns = Namespace "hydra.error.packaging"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns, Packaging.ns],
-            moduleTypeDependencies = [Core.ns, Packaging.ns],
-            moduleDescription = Just "Error types for module and package validation"}
-  where
-    definitions = [
-      conflictingModuleNamespaceError,
-      conflictingVariantNameError,
-      definitionNotInModuleNamespaceError,
-      duplicateDefinitionNameError,
-      duplicateModuleNamespaceError,
-      invalidModuleError,
-      invalidPackageError]
-
-conflictingModuleNamespaceError :: Binding
-conflictingModuleNamespaceError = define "ConflictingModuleNamespaceError" $
-  doc "A module namespace which, when mapped to a target language's directory or package structure, conflicts with another module's mapped namespace. For example, hydra.foo.bar and hydra.fooBar might both map to the same directory in a case-insensitive filesystem." $
-  T.record [
-    "first">:
-      doc "The first module namespace" $
-      Packaging.namespace,
-    "second">:
-      doc "The second module namespace that conflicts with the first" $
-      Packaging.namespace]
-
-conflictingVariantNameError :: Binding
-conflictingVariantNameError = define "ConflictingVariantNameError" $
-  doc "A union type variant name which, when capitalized and concatenated with its type name, conflicts with another type definition name. For example, a union type Foo with a variant bar produces FooBar, which conflicts with an existing type definition FooBar. This is currently a problem only for the Haskell target." $
-  T.record [
-    "namespace">:
-      doc "The namespace of the module containing the conflict" $
-      Packaging.namespace,
-    "typeName">:
-      doc "The name of the union type" $
-      Core.name,
-    "variantName">:
-      doc "The name of the variant field causing the conflict" $
-      Core.name,
-    "conflictingName">:
-      doc "The name of the other type definition that conflicts with the generated constructor name" $
-      Core.name]
-
-definitionNotInModuleNamespaceError :: Binding
-definitionNotInModuleNamespaceError = define "DefinitionNotInModuleNamespaceError" $
-  doc "A definition whose name does not have the module's namespace as a prefix. If the module namespace is foo.bar, all definition names must have the form foo.bar.quux." $
-  T.record [
-    "namespace">:
-      doc "The namespace of the module" $
-      Packaging.namespace,
-    "name">:
-      doc "The definition name that does not match the module namespace" $
-      Core.name]
-
-duplicateDefinitionNameError :: Binding
-duplicateDefinitionNameError = define "DuplicateDefinitionNameError" $
-  doc "Two or more definitions in the same module share the same name" $
-  T.record [
-    "namespace">:
-      doc "The namespace of the module containing the duplicates" $
-      Packaging.namespace,
-    "name">:
-      doc "The duplicated definition name" $
-      Core.name]
-
-duplicateModuleNamespaceError :: Binding
-duplicateModuleNamespaceError = define "DuplicateModuleNamespaceError" $
-  doc "Two or more modules in the same package share the same namespace" $
-  T.record [
-    "namespace">:
-      doc "The duplicated module namespace" $
-      Packaging.namespace]
-
-invalidModuleError :: Binding
-invalidModuleError = define "InvalidModuleError" $
-  doc "An error indicating that a module is invalid" $
-  T.union [
-    "conflictingVariantName">:
-      doc "A union variant name that conflicts with another type definition when mapped to a target language" $
-      conflictingVariantNameError,
-    "definitionNotInModuleNamespace">:
-      doc "A definition whose name does not have the module's namespace as a prefix" $
-      definitionNotInModuleNamespaceError,
-    "duplicateDefinitionName">:
-      doc "Two or more definitions in the same module share the same name" $
-      duplicateDefinitionNameError]
-
-invalidPackageError :: Binding
-invalidPackageError = define "InvalidPackageError" $
-  doc "An error indicating that a package is invalid" $
-  T.union [
-    "conflictingModuleNamespace">:
-      doc "Two module namespaces that conflict when mapped to a target language" $
-      conflictingModuleNamespaceError,
-    "duplicateModuleNamespace">:
-      doc "Two or more modules in the same package share the same namespace" $
-      duplicateModuleNamespaceError,
-    "invalidModule">:
-      doc "A module within the package is invalid" $
-      invalidModuleError]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Errors.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Errors.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Errors.hs
+++ /dev/null
@@ -1,269 +0,0 @@
-module Hydra.Sources.Kernel.Types.Errors where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Context as Context
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Error.Checking as ErrorsChecking
-import qualified Hydra.Sources.Kernel.Types.Error.Core as ErrorsCore
-import qualified Hydra.Sources.Kernel.Types.Paths as Paths
-import qualified Hydra.Sources.Kernel.Types.Typing as Typing
-import qualified Hydra.Sources.Kernel.Types.Variants as Variants
-
-
-ns :: Namespace
-ns = Namespace "hydra.errors"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Context.ns, Core.ns, ErrorsChecking.ns, ErrorsCore.ns, Paths.ns, Typing.ns, Variants.ns],
-            moduleTypeDependencies = [Context.ns, Core.ns, ErrorsChecking.ns, ErrorsCore.ns, Paths.ns, Typing.ns, Variants.ns],
-            moduleDescription = Just "Top-level error types for the Hydra kernel"}
-  where
-    definitions = [
-      decodingError,
-      emptyListError,
-      error_,
-      extractionError,
-      inferenceError,
-      multipleBindingsError,
-      multipleFieldsError,
-      noMatchingFieldError,
-      noSuchBindingError,
-      noSuchPrimitiveError,
-      notEnoughCasesError,
-      otherError,
-      otherInferenceError,
-      otherResolutionError,
-      resolutionError,
-      unexpectedShapeError,
-      unificationError,
-      unificationInferenceError]
-
-error_ :: Binding
-error_ = define "Error" $
-  doc "An error of any kind, with kernel errors particularly differentiated" $
-  T.union [
-    "checking">:
-      doc "A type checking error" $
-      ErrorsChecking.checkingError,
-    "decoding">:
-      doc "An error that occurred during decoding of a term" $
-      decodingError,
-    "duplicateBinding">:
-      doc "A duplicate binding name error" $
-      ErrorsCore.duplicateBindingError,
-    "duplicateField">:
-      doc "A duplicate field name error" $
-      ErrorsCore.duplicateFieldError,
-    "extraction">:
-      doc "An error that occurred while extracting a value from a term" $
-      extractionError,
-    "inference">:
-      doc "A type inference error" $
-      inferenceError,
-    "other">:
-      doc "Any other error" $
-      otherError,
-    "resolution">:
-      doc "A name-resolution error" $
-      resolutionError,
-    "undefinedField">:
-      doc "A reference to an undefined field" $
-      ErrorsCore.undefinedFieldError,
-    "undefinedTermVariable">:
-      doc "A reference to an undefined term variable" $
-      ErrorsCore.undefinedTermVariableError,
-    "untypedTermVariable">:
-      doc "A term variable whose type is not known" $
-      ErrorsCore.untypedTermVariableError,
-    "unexpectedTermVariant">:
-      doc "An unexpected term variant" $
-      ErrorsCore.unexpectedTermVariantError,
-    "unexpectedTypeVariant">:
-      doc "An unexpected type variant" $
-      ErrorsCore.unexpectedTypeVariantError,
-    "unification">:
-      doc "A type unification error" $
-      unificationError]
-
-decodingError :: Binding
-decodingError = define "DecodingError" $
-  doc "An error that occurred during decoding of a term" $
-  T.wrap T.string
-
-otherError :: Binding
-otherError = define "OtherError" $
-  doc "Any other error" $
-  T.wrap T.string
-
-resolutionError :: Binding
-resolutionError = define "ResolutionError" $
-  doc "An error that occurred while resolving a name, primitive, or record/union shape in a graph" $
-  T.union [
-    "noSuchBinding">:
-      doc "No binding with the expected name was found in the graph" $
-      noSuchBindingError,
-    "noSuchPrimitive">:
-      doc "No primitive function with the expected name was found in the graph" $
-      noSuchPrimitiveError,
-    "noMatchingField">:
-      doc "No field with the expected name was present in a record or case statement" $
-      noMatchingFieldError,
-    "other">:
-      doc "A generic resolution error carrying a message" $
-      otherResolutionError,
-    "unexpectedShape">:
-      doc "A term had a shape other than the one expected (e.g. a record, an injection)" $
-      unexpectedShapeError]
-
-otherResolutionError :: Binding
-otherResolutionError = define "OtherResolutionError" $
-  doc "A generic resolution error: message" $
-  T.wrap T.string
-
-unificationError :: Binding
-unificationError = define "UnificationError" $
-  doc "An error that occurred during type unification" $
-  T.record [
-    "leftType">:
-      doc "The left-hand type in the unification" $
-      Core.type_,
-    "rightType">:
-      doc "The right-hand type in the unification" $
-      Core.type_,
-    "message">:
-      doc "A human-readable error message" $
-      T.string]
-
-unificationInferenceError :: Binding
-unificationInferenceError = define "UnificationInferenceError" $
-  doc "A unification failure at a specific subterm locus during inference" $
-  T.record [
-    "path">:
-      doc "The subterm path at which the unification failure was observed" $
-      Paths.subtermPath,
-    "cause">:
-      doc "The underlying unification error" $
-      unificationError]
-
-extractionError :: Binding
-extractionError = define "ExtractionError" $
-  doc "An error that occurred while extracting a typed value from a term" $
-  T.union [
-    "emptyList">:
-      doc "An empty list was encountered where a non-empty list was required" $
-      emptyListError,
-    "multipleBindings">:
-      doc "Multiple let bindings were found with the same name" $
-      multipleBindingsError,
-    "multipleFields">:
-      doc "Multiple record fields were found with the same field name" $
-      multipleFieldsError,
-    "noMatchingField">:
-      doc "No field with the expected name was found in a record" $
-      noMatchingFieldError,
-    "noSuchBinding">:
-      doc "No let binding with the expected name was found" $
-      noSuchBindingError,
-    "notEnoughCases">:
-      doc "A case statement did not contain enough cases to match the target" $
-      notEnoughCasesError,
-    "unexpectedShape">:
-      doc "A term, type, literal, or other value had an unexpected shape" $
-      unexpectedShapeError]
-
-inferenceError :: Binding
-inferenceError = define "InferenceError" $
-  doc "An error that occurred during type inference" $
-  T.union [
-    "checking">:
-      doc "A type checking error encountered during inference" $
-      ErrorsChecking.checkingError,
-    "other">:
-      doc ("A generic inference error carrying a message and a subterm path."
-        <> " Placeholder arm; sites should migrate to typed variants.") $
-      otherInferenceError,
-    "unification">:
-      doc "A unification failure encountered while inferring types" $
-      unificationInferenceError]
-
-otherInferenceError :: Binding
-otherInferenceError = define "OtherInferenceError" $
-  doc "A generic inference error: message + subterm path" $
-  T.record [
-    "path">:
-      doc "The subterm path at which the error was observed" $
-      Paths.subtermPath,
-    "message">:
-      doc "A human-readable error message" $
-      T.string]
-
-emptyListError :: Binding
-emptyListError = define "EmptyListError" $
-  doc "An empty list was encountered where a non-empty list was required" $
-  T.unit
-
-multipleBindingsError :: Binding
-multipleBindingsError = define "MultipleBindingsError" $
-  doc "Multiple let bindings with the same name were found" $
-  T.record [
-    "name">:
-      doc "The binding name which was duplicated" $
-      Core.name]
-
-multipleFieldsError :: Binding
-multipleFieldsError = define "MultipleFieldsError" $
-  doc "Multiple fields with the same name were found in a record" $
-  T.record [
-    "fieldName">:
-      doc "The field name which appeared more than once" $
-      Core.name]
-
-noMatchingFieldError :: Binding
-noMatchingFieldError = define "NoMatchingFieldError" $
-  doc "No field with the expected name was present" $
-  T.record [
-    "fieldName">:
-      doc "The field name which was not found" $
-      Core.name]
-
-noSuchBindingError :: Binding
-noSuchBindingError = define "NoSuchBindingError" $
-  doc "No let binding with the expected name was present" $
-  T.record [
-    "name">:
-      doc "The binding name which was not found" $
-      Core.name]
-
-noSuchPrimitiveError :: Binding
-noSuchPrimitiveError = define "NoSuchPrimitiveError" $
-  doc "No primitive function with the expected name was registered in the graph" $
-  T.record [
-    "name">:
-      doc "The primitive name which was not found" $
-      Core.name]
-
-notEnoughCasesError :: Binding
-notEnoughCasesError = define "NotEnoughCasesError" $
-  doc "A case statement was missing a case for the requested variant" $
-  T.unit
-
-unexpectedShapeError :: Binding
-unexpectedShapeError = define "UnexpectedShapeError" $
-  doc "A term, type, literal, or related value had a shape other than the one expected" $
-  T.record [
-    "expected">:
-      doc "A description of the expected shape" $
-      T.string,
-    "actual">:
-      doc "A description of the shape actually encountered" $
-      T.string]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Graph.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Graph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Graph.hs
+++ /dev/null
@@ -1,93 +0,0 @@
-module Hydra.Sources.Kernel.Types.Graph where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Context as Context
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Errors as Error
-
-
-ns :: Namespace
-ns = Namespace "hydra.graph"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Context.ns, Core.ns, Error.ns],
-            moduleTypeDependencies = [Context.ns, Core.ns, Error.ns],
-            moduleDescription = Just "The extension to graphs of Hydra's core type system (hydra.core)"}
-  where
-    definitions = [
-      graph,
-      primitive,
-      termCoder]
-
-graph :: Binding
-graph = define "Graph" $
-  doc "A graph, or lexical environment which binds names to terms, types, primitives, and metadata" $
-  T.record [
-    "boundTerms">:
-      doc "The terms bound by all term variables in scope" $
-      T.map Core.name Core.term,
-    "boundTypes">:
-      doc "The type schemes of all term variables in scope" $
-      T.map Core.name Core.typeScheme,
-    "classConstraints">:
-      doc ("A mutable map from type variable names to their accumulated class constraints."
-        ++ " This is populated during type inference when operations requiring Eq or Ord are encountered.") $
-      T.map Core.name Core.typeVariableMetadata,
-    "lambdaVariables">:
-      doc "The set of term variables introduced by specifically by lambdas" $
-      T.set Core.name,
-    "metadata">:
-      doc "Any additional metadata bound to term variables in scope" $
-      T.map Core.name Core.term,
-    "primitives">:
-      doc "All primitive functions and constants by name" $
-      T.map Core.name primitive,
-    "schemaTypes">:
-      doc "All schema types (type schemes) in scope" $
-      T.map Core.name Core.typeScheme,
-    "typeVariables">:
-      doc "The set of type variables introduced specifically by type lambdas" $
-      T.set Core.name]
-
-primitive :: Binding
-primitive = define "Primitive" $
-  doc "A built-in function or constant" $
-  T.record [
-    "name">:
-      doc "The unique name of the primitive function"
-      Core.name,
-    "typeScheme">:
-      doc "The type scheme of the primitive function"
-      Core.typeScheme,
-    "implementation">:
-      doc ("A concrete implementation of the primitive function."
-        ++ " The Context and Graph parameters are needed by higher-order primitives"
-        ++ " (e.g. lists.map, lists.foldl, eithers.bind) which must evaluate function arguments"
-        ++ " via term reduction; the Graph provides variable and primitive bindings,"
-        ++ " while the Context supports tracing and error reporting.") $
-      Context.context ~> graph ~> T.list Core.term ~> T.either_ Error.error_ Core.term]
-
-termCoder :: Binding
-termCoder = define "TermCoder" $
-  doc "A type together with a coder for mapping terms into arguments for primitive functions, and mapping computed results into terms." $
-  T.forAll "a" $ T.record [
-    "type">:
-      doc "The Hydra type of encoded terms"
-      Core.type_,
-    "encode">:
-      doc "An encode function from terms to native values" $
-      Context.context ~> graph ~> Core.term ~> T.either_ Error.error_ "a",
-    "decode">:
-      doc "A decode function from native values to terms" $
-      Context.context ~> "a" ~> T.either_ Error.error_ Core.term]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Packaging.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Packaging.hs
+++ /dev/null
@@ -1,162 +0,0 @@
-module Hydra.Sources.Kernel.Types.Packaging where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel hiding (packageName, packageModules, packageDependencies, packageDescription)
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Graph as Graph
-
-
-ns :: Namespace
-ns = Namespace "hydra.packaging"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Graph.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for Hydra namespaces, modules, and packages"}
-  where
-    definitions = [
-      definition,
-      fileExtension,
-      library,
-      module',
-      namespace,
-      namespaces,
-      package,
-      packageName,
-      qualifiedName,
-      termDefinition,
-      typeDefinition]
-
-definition :: Binding
-definition = define "Definition" $
-  doc "A definition, which may be either a term or type definition" $
-  T.union [
-    "term">:
-      doc "A term definition"
-      termDefinition,
-    "type">:
-      doc "A type definition"
-      typeDefinition]
-
-fileExtension :: Binding
-fileExtension = define "FileExtension" $
-  doc "A file extension (without the dot), e.g. \"json\" or \"py\"" $
-  T.wrap T.string
-
-library :: Binding
-library = define "Library" $
-  doc "A library of primitive functions" $
-  T.record [
-    "namespace">:
-      doc "A common prefix for all primitive function names in the library"
-      namespace,
-    "prefix">:
-      doc "A preferred namespace prefix for function names in the library"
-      T.string,
-    "primitives">:
-      doc "The primitives defined in this library" $
-      T.list Graph.primitive]
-
-module' :: Binding
-module' = define "Module" $
-  doc "A logical collection of elements in the same namespace, having dependencies on zero or more other modules" $
-  T.record [
-    "description">:
-      doc "An optional human-readable description of the module" $
-      T.maybe T.string,
-    "namespace">:
-      doc "A common prefix for all element names in the module"
-      namespace,
-    "termDependencies">:
-      doc "Any modules which the term expressions of this module directly depend upon" $
-      T.list namespace,
-    "typeDependencies">:
-      doc "Any modules which the type expressions of this module directly depend upon" $
-      T.list namespace,
-    "definitions">:
-      doc "The definitions in this module" $
-      T.list definition]
-
-namespace :: Binding
-namespace = define "Namespace" $
-  doc "A prefix for element names" $
-  T.wrap T.string
-
-namespaces :: Binding
-namespaces = define "Namespaces" $
-  doc "A mapping from namespaces to values of type n, with a focus on one namespace" $
-  T.forAll "n" $ T.record [
-    "focus">:
-      doc "The namespace in focus, together with its associated value" $
-      T.pair namespace "n",
-    "mapping">:
-      doc "A mapping of namespaces to values" $
-      T.map namespace "n"]
-
-package :: Binding
-package = define "Package" $
-  doc "A package, which is a named collection of modules with metadata and dependencies" $
-  T.record [
-    "name">:
-      doc "The name of the package"
-      packageName,
-    "modules">:
-      doc "The modules in this package" $
-      T.list module',
-    "dependencies">:
-      doc "The packages which this package depends on" $
-      T.list packageName,
-    "description">:
-      doc "An optional human-readable description of the package" $
-      T.maybe T.string]
-
-packageName :: Binding
-packageName = define "PackageName" $
-  doc "The unique name of a package, e.g. \"hydra-kernel\" or \"hydra-python\"" $
-  T.wrap T.string
-
-qualifiedName :: Binding
-qualifiedName = define "QualifiedName" $
-  doc "A qualified name consisting of an optional namespace together with a mandatory local name" $
-  T.record [
-    "namespace">:
-      doc "The optional namespace" $
-      T.maybe namespace,
-    "local">:
-      doc "The local name"
-      T.string]
-
-termDefinition :: Binding
-termDefinition = define "TermDefinition" $
-  doc "A term-level definition, including a name, a term, and the type scheme of the term" $
-  T.record [
-    "name">:
-      doc "The name of the term"
-      Core.name,
-    "term">:
-      doc "The term being defined"
-      Core.term,
-    "typeScheme">:
-      doc "The type scheme of the term, including any class constraints" $
-      T.maybe Core.typeScheme]
-
-typeDefinition :: Binding
-typeDefinition = define "TypeDefinition" $
-  doc "A type-level definition, including a name and the type scheme" $
-  T.record [
-    "name">:
-      doc "The name of the type"
-      Core.name,
-    "typeScheme">:
-      doc "The type scheme being defined"
-      Core.typeScheme]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Parsing.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Parsing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Parsing.hs
+++ /dev/null
@@ -1,69 +0,0 @@
-module Hydra.Sources.Kernel.Types.Parsing where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.parsing"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Parser combinator types for text parsing"}
-  where
-    definitions = [
-      parseError,
-      parseResult,
-      parseSuccess,
-      parser]
-
-parseError :: Binding
-parseError = define "ParseError" $
-  doc "An error which occurred while parsing" $
-  T.record [
-    "message">:
-      doc "An error message" $
-      T.string,
-    "remainder">:
-      doc "The remaining input at the point of failure" $
-      T.string]
-
-parseResult :: Binding
-parseResult = define "ParseResult" $
-  doc "The result of a parse operation" $
-  T.forAll "a" $ T.union [
-    "success">:
-      doc "A successful parse, with a value and the remaining unparsed input" $
-      parseSuccess @@ "a",
-    "failure">:
-      doc "A failed parse, with an error message and the remaining input"
-      parseError]
-
-parseSuccess :: Binding
-parseSuccess = define "ParseSuccess" $
-  doc "A successful parse result" $
-  T.forAll "a" $ T.record [
-    "value">:
-      doc "The parsed value"
-      "a",
-    "remainder">:
-      doc "The remaining unparsed input" $
-      T.string]
-
-parser :: Binding
-parser = define "Parser" $
-  doc "A parser which consumes characters from a string and produces a value" $
-  T.forAll "a" $ T.wrap $
-    T.string ~> parseResult @@ "a"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Paths.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Paths.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Paths.hs
+++ /dev/null
@@ -1,252 +0,0 @@
-module Hydra.Sources.Kernel.Types.Paths where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.paths"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for subterm and subtype access patterns"}
-  where
-    definitions = [
-      subtermEdge,
-      subtermGraph,
-      subtermNode,
-      subtermPath,
-      subtermStep,
-      subtypeEdge,
-      subtypeGraph,
-      subtypeNode,
-      subtypePath,
-      subtypeStep]
-
--- Subterm types
-
-subtermEdge :: Binding
-subtermEdge = define "SubtermEdge" $
-  doc "An edge in a subterm graph, connecting two nodes via a path" $
-  T.record [
-    "source">:
-      doc "The source node of the edge"
-      subtermNode,
-    "path">:
-      doc "The subterm path connecting source to target"
-      subtermPath,
-    "target">:
-      doc "The target node of the edge"
-      subtermNode]
-
-subtermGraph :: Binding
-subtermGraph = define "SubtermGraph" $
-  doc "A graph of subterm nodes and edges, representing term access patterns" $
-  T.record [
-    "nodes">:
-      doc "All nodes in the graph" $
-      T.list subtermNode,
-    "edges">:
-      doc "All edges in the graph" $
-      T.list subtermEdge]
-
-subtermNode :: Binding
-subtermNode = define "SubtermNode" $
-  doc "A node in a subterm graph, representing a term or subterm" $
-  T.record [
-    "name">:
-      doc "The qualified name of the term"
-      Core.name,
-    "label">:
-      doc "A human-readable label for the node"
-      T.string,
-    "id" >:
-      doc "A unique identifier for the node"
-      T.string]
-
-subtermPath :: Binding
-subtermPath = define "SubtermPath" $
-  doc "A sequence of subterm steps forming a path through a term" $
-  T.wrap $ T.list subtermStep
-
-subtermStep :: Binding
-subtermStep = define "SubtermStep" $
-  doc "A function which maps from a term to a particular immediate subterm" $
-  T.union [
-    "annotatedBody">:
-      doc "Access the body of an annotated term"
-      T.unit,
-    "applicationFunction">:
-      doc "Access the function of an application term"
-      T.unit,
-    "applicationArgument">:
-      doc "Access the argument of an application term"
-      T.unit,
-    "lambdaBody">:
-      doc "Access the body of a lambda term"
-      T.unit,
-    "unionCasesDefault">:
-      doc "Access the default case of a union elimination"
-      T.unit,
-    "unionCasesBranch">:
-      doc "Access a specific branch of a union elimination by field name"
-      Core.name,
-    "letBody">:
-      doc "Access the body of a let term"
-      T.unit,
-    "letBinding">:
-      doc "Access a specific binding in a let term by variable name"
-      Core.name,
-    "listElement">:
-      doc "Access an element of a list by index"
-      T.int32,
-    "mapKey">:
-      doc "Access a key in a map by index"
-      T.int32,
-    "mapValue">:
-      doc "Access a value in a map by index"
-      T.int32,
-    "maybeTerm">:
-      doc "Access the term inside a Just value"
-      T.unit,
-    "productTerm">:
-      doc "Access an element of a product (tuple) by index"
-      T.int32,
-    "recordField">:
-      doc "Access a field of a record by field name"
-      Core.name,
-    "setElement">:
-      doc "Access an element of a set by index"
-      T.int32,
-    "sumTerm">:
-      doc "Access the term inside a sum variant"
-      T.unit,
-    "typeLambdaBody">:
-      doc "Access the body of a type lambda term"
-      T.unit,
-    "typeApplicationTerm">:
-      doc "Access the term being applied to a type"
-      T.unit,
-    "injectionTerm">:
-      doc "Access the term inside a union injection"
-      T.unit,
-    "wrappedTerm">:
-      doc "Access the term inside a wrapped term"
-      T.unit]
-
--- Subtype types
-
-subtypeEdge :: Binding
-subtypeEdge = define "SubtypeEdge" $
-  doc "An edge in a subtype graph, connecting two nodes via a path" $
-  T.record [
-    "source">:
-      doc "The source node of the edge"
-      subtypeNode,
-    "path">:
-      doc "The subtype path connecting source to target"
-      subtypePath,
-    "target">:
-      doc "The target node of the edge"
-      subtypeNode]
-
-subtypeGraph :: Binding
-subtypeGraph = define "SubtypeGraph" $
-  doc "A graph of subtype nodes and edges, representing type access patterns" $
-  T.record [
-    "nodes">:
-      doc "All nodes in the graph" $
-      T.list subtypeNode,
-    "edges">:
-      doc "All edges in the graph" $
-      T.list subtypeEdge]
-
-subtypeNode :: Binding
-subtypeNode = define "SubtypeNode" $
-  doc "A node in a subtype graph, representing a type or subtype" $
-  T.record [
-    "name">:
-      doc "The qualified name of the type"
-      Core.name,
-    "label">:
-      doc "A human-readable label for the node"
-      T.string,
-    "id" >:
-      doc "A unique identifier for the node"
-      T.string]
-
-subtypePath :: Binding
-subtypePath = define "SubtypePath" $
-  doc "A sequence of subtype steps forming a path through a type" $
-  T.wrap $ T.list subtypeStep
-
-subtypeStep :: Binding
-subtypeStep = define "SubtypeStep" $
-  doc "A function which maps from a type to a particular immediate subtype" $
-  T.union [
-    "annotatedBody">:
-      doc "Access the body of an annotated type"
-      T.unit,
-    "applicationFunction">:
-      doc "Access the function of an application type"
-      T.unit,
-    "applicationArgument">:
-      doc "Access the argument of an application type"
-      T.unit,
-    "eitherLeft">:
-      doc "Access the left type of an either type"
-      T.unit,
-    "eitherRight">:
-      doc "Access the right type of an either type"
-      T.unit,
-    "forallBody">:
-      doc "Access the body of a universally quantified type"
-      T.unit,
-    "functionDomain">:
-      doc "Access the domain type of a function type"
-      T.unit,
-    "functionCodomain">:
-      doc "Access the codomain type of a function type"
-      T.unit,
-    "listElement">:
-      doc "Access the element type of a list type"
-      T.unit,
-    "mapKeys">:
-      doc "Access the key type of a map type"
-      T.unit,
-    "mapValues">:
-      doc "Access the value type of a map type"
-      T.unit,
-    "maybeElement">:
-      doc "Access the element type of an optional type"
-      T.unit,
-    "pairFirst">:
-      doc "Access the first type of a pair type"
-      T.unit,
-    "pairSecond">:
-      doc "Access the second type of a pair type"
-      T.unit,
-    "recordField">:
-      doc "Access a field type of a record type by field name"
-      Core.name,
-    "setElement">:
-      doc "Access the element type of a set type"
-      T.unit,
-    "unionField">:
-      doc "Access a field type of a union type by field name"
-      Core.name,
-    "wrappedType">:
-      doc "Access the type inside a wrapped type"
-      T.unit]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Phantoms.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Phantoms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Phantoms.hs
+++ /dev/null
@@ -1,56 +0,0 @@
-module Hydra.Sources.Kernel.Types.Phantoms where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.phantoms"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Phantom types for use with Hydra DSLs"}
-  where
-    definitions = [
-      tBinding,
-      tTerm,
-      tTermDefinition]
-
-tBinding :: Binding
-tBinding = define "TBinding" $
-  doc "An association of a named term (element) with a phantom type" $
-  T.forAll "a" $ T.record [
-    "name">:
-      doc "The name of the term"
-      Core.name,
-    "term">:
-      doc "The term with its phantom type" $
-      tTerm @@ "a"]
-
-tTerm :: Binding
-tTerm = define "TTerm" $
-  doc "An association of a term with a phantom type" $
-  T.forAll "a" $ T.wrap Core.term
-
-tTermDefinition :: Binding
-tTermDefinition = define "TTermDefinition" $
-  doc "An association of a term definition with a phantom type" $
-  T.forAll "a" $ T.record [
-    "name">:
-      doc "The name of the term"
-      Core.name,
-    "term">:
-      doc "The term with its phantom type" $
-      tTerm @@ "a"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Query.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Query.hs
+++ /dev/null
@@ -1,218 +0,0 @@
-module Hydra.Sources.Kernel.Types.Query where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.query"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for language-agnostic graph pattern queries"}
-  where
-    definitions = [
-      comparisonConstraint,
-      edge,
-      graphPattern,
-      node,
-      path,
-      pathEquation,
-      pattern,
-      patternImplication,
-      query,
-      range,
-      regexQuantifier,
-      regexSequence,
-      step,
-      triplePattern,
-      variable]
-
-comparisonConstraint :: Binding
-comparisonConstraint = define "ComparisonConstraint" $
-  doc "One of several comparison operators" $
-  T.enum ["equal", "notEqual", "lessThan", "greaterThan", "lessThanOrEqual", "greaterThanOrEqual"]
-
-edge :: Binding
-edge = define "Edge" $
-  doc "An abstract edge based on a record type" $
-  T.record [
-    "type">:
-      doc "The name of a record type, for which the edge also specifies an out- and an in- projection"
-      Core.name,
-    "out">:
-      doc "The field representing the out-projection of the edge. Defaults to 'out'." $
-      T.maybe Core.name,
-    "in">:
-      doc "The field representing the in-projection of the edge. Defaults to 'in'." $
-      T.maybe Core.name]
-
-graphPattern :: Binding
-graphPattern = define "GraphPattern" $
-  doc "A query pattern which matches within a designated component subgraph" $
-  T.record [
-    "graph">:
-      doc "The name of the component graph"
-      Core.name,
-    "patterns">:
-      doc "The patterns to match within the subgraph" $
-      T.list pattern]
-
-node :: Binding
-node = define "Node" $
-  doc "A node in a query expression; it may be a term, a variable, or a wildcard" $
-  T.union [
-    "term">:
-      doc "A graph term; an expression which is valid in the graph being matched"
-      Core.term,
-    "variable">:
-      doc "A query variable, not to be confused with a variable term"
-      variable,
-    "wildcard">:
-      doc "An anonymous variable which we do not care to join across patterns" T.unit]
-
-path :: Binding
-path = define "Path" $
-  doc "A query path" $
-  T.union [
-    "step">:
-      doc "A path given by a single step"
-      step,
-    "regex">:
-      doc "A path given by a regular expression quantifier applied to another path"
-      regexSequence,
-    "inverse">:
-      doc "A path given by the inverse of another path"
-      path]
-
-pathEquation :: Binding
-pathEquation = define "PathEquation" $
-  doc "A declared equivalence between two abstract paths in a graph" $
-  T.record [
-    "left">:
-      doc "The left-hand side of the equation"
-      path,
-    "right">:
-      doc "The right-hand side of the equation"
-      path]
-
-patternImplication :: Binding
-patternImplication = define "PatternImplication" $
-  doc "A pattern which, if it matches in a given graph, implies that another pattern must also match. Query variables are shared between the two patterns." $
-  T.record [
-    "antecedent">:
-      doc "The pattern which, if it matches, triggers the constraint"
-      pattern,
-    "consequent">:
-      doc "The pattern which must also match when the antecedent matches"
-      pattern]
-
-pattern :: Binding
-pattern = define "Pattern" $
-  doc "A query pattern" $
-  T.union [
-    "triple">:
-      doc "A subject/predicate/object pattern"
-      triplePattern,
-    "negation">:
-      doc "The negation of another pattern"
-      pattern,
-    "conjunction">:
-      doc "The conjunction ('and') of several other patterns" $
-      T.list pattern,
-    "disjunction">:
-      doc "The disjunction (inclusive 'or') of several other patterns" $
-      T.list pattern,
-    "graph">:
-      doc "A pattern which matches within a named subgraph"
-      graphPattern]
-
-query :: Binding
-query = define "Query" $
-  doc "A SELECT-style graph pattern matching query" $
-  T.record [
-    "variables">:
-      doc "The variables selected by the query" $
-      T.list variable,
-    "patterns">:
-      doc "The patterns to be matched" $
-      T.list pattern]
-
-range :: Binding
-range = define "Range" $
-  doc "A range from min to max, inclusive" $
-  T.record [
-    "min">:
-      doc "The minimum value (inclusive)" $
-      T.int32,
-    "max">:
-      doc "The maximum value (inclusive)" $
-      T.int32]
-
-regexQuantifier :: Binding
-regexQuantifier = define "RegexQuantifier" $
-  doc "A regular expression quantifier" $
-  T.union [
-    "one">: doc "No quantifier; matches a single occurrence" T.unit,
-    "zeroOrOne">: doc "The ? quanifier; matches zero or one occurrence" T.unit,
-    "zeroOrMore">: doc "The * quantifier; matches any number of occurrences" T.unit,
-    "oneOrMore">: doc "The + quantifier; matches one or more occurrences" T.unit,
-    "exactly">: doc "The {n} quantifier; matches exactly n occurrences" T.int32,
-    "atLeast">: doc "The {n,} quantifier; matches at least n occurrences" T.int32,
-    "range">: doc "The {n, m} quantifier; matches between n and m (inclusive) occurrences" range]
-
-regexSequence :: Binding
-regexSequence = define "RegexSequence" $
-  doc "A path with a regex quantifier" $
-  T.record [
-    "path">:
-      doc "The path to which the quantifier applies"
-      path,
-    "quantifier">:
-      doc "The quantifier"
-      regexQuantifier]
-
-step :: Binding
-step = define "Step" $
-  doc "An atomic function as part of a query. When applied to a graph, steps are typed by function types." $
-  T.union [
-    "edge">:
-      doc "An out-to-in traversal of an abstract edge"
-      edge,
-    "project">:
-      doc "A projection from a record through one of its fields"
-      Core.projection,
-    "compare">:
-      doc "A comparison of two terms"
-      comparisonConstraint]
-
-triplePattern :: Binding
-triplePattern = define "TriplePattern" $
-  doc "A subject/predicate/object pattern" $
-  T.record [
-    "subject">:
-      doc "The subject of the pattern"
-      node,
-    "predicate">:
-      doc "The predicate (property) of the pattern"
-      path,
-    "object">:
-      doc "The object of the pattern"
-      node]
-
-variable :: Binding
-variable = define "Variable" $
-  doc "A query variable" $
-  T.wrap T.string
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Relational.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Relational.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Relational.hs
+++ /dev/null
@@ -1,110 +0,0 @@
-module Hydra.Sources.Kernel.Types.Relational where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Annotations as Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.relational"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("An interpretation of Codd's Relational Model, " ++
-      "as described in 'A Relational Model of Data for Large Shared Data Banks' (1970). " ++
-      "Types ('domains') and values are parameterized so as to allow for application-specific implementations. " ++
-      "No special support is provided for 'nonsimple' domains; i.e. relations are assumed to be normalized.")}
-  where
-    definitions = [
-      columnName,
-      columnSchema,
-      foreignKey,
-      primaryKey,
-      relation,
-      relationName,
-      relationSchema,
-      relationship,
-      row]
-
-columnName :: Binding
-columnName = define "ColumnName" $
-  doc ("A name for a domain which serves to identify the role played by that domain in the given relation;"
-    ++ " a 'role name' in Codd") $
-  T.wrap T.string
-
-columnSchema :: Binding
-columnSchema = define "ColumnSchema" $
-  doc "An abstract specification of the domain represented by a column in a relation; a role" $
-  T.forAll "t" $ T.record [
-    "name">:
-      doc "A unique name for the column"
-      columnName,
-    "domain">:
-      doc "The domain (type) of the column"
-      "t"]
-
-foreignKey :: Binding
-foreignKey = define "ForeignKey" $
-  doc "A mapping from certain columns of a source relation to primary key columns of a target relation" $
-  T.record [
-    "foreignRelation">:
-      doc "The name of the target relation"
-      relationName,
-    "keys">:
-      doc ("The mapping of source column names to target column names."
-         ++ " The target column names must together make up the primary key of the target relation.") $
-      nonemptyMap columnName columnName]
-
-primaryKey :: Binding
-primaryKey = define "PrimaryKey" $
-  doc "A primary key of a relation, specified either as a single column, or as a list of columns" $
-  T.wrap $ nonemptyList columnName
-
-relation :: Binding
-relation = define "Relation" $
-  doc "A set of distinct n-tuples; a table" $
-  T.forAll "v" $ T.wrap $ T.list (row @@ "v")
-
-relationName :: Binding
-relationName = define "RelationName" $
-  doc "A unique relation (table) name" $
-  T.wrap T.string
-
-relationSchema :: Binding
-relationSchema = define "RelationSchema" $
-  doc "An abstract relation; the name and columns of a relation without its actual data" $
-  T.forAll "t" $ T.record [
-    "name">:
-      doc "A unique name for the relation"
-      relationName,
-    "columns">:
-      doc "A list of column specifications" $
-      nonemptyList $ columnSchema @@ "t",
-    "primaryKeys">:
-      doc "Any number of primary keys for the relation, each of which must be valid for this relation" $
-      T.list primaryKey,
-    "foreignKeys">:
-      doc "Any number of foreign keys, each of which must be valid for both this relation and the target relation" $
-      T.list foreignKey]
-
-relationship :: Binding
-relationship = define "Relationship" $
-  doc "A domain-unordered (string-indexed, rather than position-indexed) relation" $
-  T.forAll "v" $ T.wrap $ T.set $ T.map columnName "v"
-
-row :: Binding
-row = define "Row" $
-  doc "An n-tuple which is an element of a given relation" $
-  T.forAll "v" $ T.wrap $ nonemptyList "v"
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Tabular.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Tabular.hs
+++ /dev/null
@@ -1,67 +0,0 @@
-module Hydra.Sources.Kernel.Types.Tabular where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Relational as Relational
-
-
-ns :: Namespace
-ns = Namespace "hydra.tabular"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns, Relational.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A simple, untyped tabular data model, suitable for CSVs and TSVs"}
-  where
-    definitions = [
-      columnType,
-      dataRow,
-      headerRow,
-      table,
-      tableType]
-
-columnType :: Binding
-columnType = define "ColumnType" $
- doc "A column type, consisting of a name and a value type" $
-  T.record [
-    "name">: Relational.columnName,
-    "type">: Core.type_]
-
-dataRow :: Binding
-dataRow = define "DataRow" $
-  doc "A data row, containing optional-valued cells; one per column" $
-  T.forAll "v" $ T.wrap $ T.list $ T.maybe "v"
-
-headerRow :: Binding
-headerRow = define "HeaderRow" $
-  doc "A header row, containing column names (but no types or data)" $
-  T.wrap $ T.list T.string
-
-table :: Binding
-table = define "Table" $
-  doc "A simple table as in a CSV file, having an optional header row and any number of data rows" $
-  T.forAll "v" $ T.record [
-    "header">:
-      doc "The optional header row of the table. If present, the header must have the same number of cells as each data row." $
-      T.maybe headerRow,
-    "data">:
-      doc "The data rows of the table. Each row must have the same number of cells." $
-      T.list (dataRow @@ "v")]
-
-tableType :: Binding
-tableType = define "TableType" $
-  doc "A type definition for a table, including column names and types" $
-  T.record [
-    "name">: Relational.relationName,
-    "columns">: T.list columnType]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Testing.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Testing.hs
+++ /dev/null
@@ -1,89 +0,0 @@
-module Hydra.Sources.Kernel.Types.Testing where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.testing"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for unit testing"}
-  where
-    definitions = [
-      tag,
-      testCase,
-      testCaseWithMetadata,
-      testGroup,
-      universalTestCase]
-
-tag :: Binding
-tag = define "Tag" $
-  doc "A tag for test cases" $
-  T.wrap T.string
-
-testCase :: Binding
-testCase = define "TestCase" $
-  doc "A test case with an actual and expected string for comparison" $
-  T.union [
-    "universal">:
-      doc "A universal test case (string comparison)"
-      universalTestCase]
-
-universalTestCase :: Binding
-universalTestCase = define "UniversalTestCase" $
-  doc "A universal test case: the actual and expected values are both strings" $
-  T.record [
-    "actual">:
-      doc "The actual result (a string produced by evaluating and showing the test expression)" $
-      T.string,
-    "expected">:
-      doc "The expected result (a string produced by showing the expected value)" $
-      T.string]
-
-testCaseWithMetadata :: Binding
-testCaseWithMetadata = define "TestCaseWithMetadata" $
-  doc "A test case together with metadata" $
-  T.record [
-    "name">:
-      doc "A short name for the test case" $
-      T.string,
-    "case">:
-      doc "The test case itself"
-      testCase,
-    "description">:
-      doc "An optional longer description of the test case" $
-      T.optional T.string,
-    "tags">:
-      doc "Zero or more tags for the test case" $
-      T.list tag]
-
-testGroup :: Binding
-testGroup = define "TestGroup" $
-  doc "A collection of test cases with a name and optional description" $
-  T.record [
-    "name">:
-      doc "A short name for the test group" $
-      T.string,
-    "description">:
-      doc "An optional longer description of the test group" $
-      T.optional T.string,
-    "subgroups">:
-      doc "Zero or more subgroups" $
-      T.list testGroup,
-    "cases">:
-      doc "Zero or more test cases" $
-      T.list testCaseWithMetadata]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Topology.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Topology.hs
+++ /dev/null
@@ -1,72 +0,0 @@
-module Hydra.Sources.Kernel.Types.Topology where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.topology"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for simple graphs as adjacency lists"}
-  where
-    definitions = [
-      graph,
-      orderingIsomorphism,
-      tarjanState,
-      vertex]
-
-graph :: Binding
-graph = define "Graph" $
-  doc "A directed graph represented as an adjacency list mapping vertices to their outgoing neighbors" $
-  T.map vertex (T.list vertex)
-
-orderingIsomorphism :: Binding
-orderingIsomorphism = define "OrderingIsomorphism" $
-  T.forAll "a" $ T.record [
-    "encode">:
-      doc "Mapping from source ordering to target ordering" $
-      T.list "a" ~> T.list "a",
-    "decode">:
-      doc "Mapping from target ordering to source ordering" $
-      T.list "a" ~> T.list "a"]
-
-tarjanState :: Binding
-tarjanState = define "TarjanState" $
-  T.record [
-    "counter">:
-      doc "Next available index for vertices in the DFS traversal"
-      T.int32,
-    "indices">:
-      doc "Mapping from vertices to their indices in the DFS traversal" $
-      T.map vertex T.int32,
-    "lowLinks">:
-      doc "Mapping from vertices to their lowest reachable index in the DFS traversal" $
-      T.map vertex T.int32,
-    "stack">:
-      doc "Current DFS stack, with vertices in reverse order" $
-      T.list vertex,
-    "onStack">:
-      doc "Set of vertices currently on the stack, for quick lookup" $
-      T.set vertex,
-    "sccs">:
-      doc "Accumulated strongly connected components, each a list of vertices" $
-      T.list $ T.list vertex]
-
-vertex :: Binding
-vertex = define "Vertex" $
-  doc "A graph vertex, represented as a 32-bit integer identifier" $
-  T.int32
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Typing.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Typing.hs
+++ /dev/null
@@ -1,105 +0,0 @@
-module Hydra.Sources.Kernel.Types.Typing where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Context as Context
-
-
-ns :: Namespace
-ns = Namespace "hydra.typing"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns, Context.ns],
-            moduleTypeDependencies = [Core.ns, Context.ns],
-            moduleDescription = Just "Types supporting type inference and type reconstruction."}
-  where
-    definitions = [
-      functionStructure,
-      inferenceResult,
-      termSubst,
-      typeConstraint,
-      typeSubst]
-
-inferenceResult :: Binding
-inferenceResult = define "InferenceResult" $
-  doc "The result of applying inference rules to a term." $
-  T.record [
-    "term">:
-      doc "The term which was inferred"
-      Core.term,
-    "type">:
-      doc "The inferred type of the term"
-      Core.type_,
-    "subst">:
-      doc "The type substitution resulting from unification"
-      typeSubst,
-    "classConstraints">:
-      doc "Class constraints discovered during inference (e.g., Ord constraints from Map.lookup)" $
-      T.map Core.name Core.typeVariableMetadata,
-    "context">:
-      doc "The updated context after inference (carries fresh variable state)" $
-      Context.context]
-
-termSubst :: Binding
-termSubst = define "TermSubst" $
-  doc "A substitution of term variables for terms" $
-  T.wrap $ T.map Core.name Core.term
-
-typeConstraint :: Binding
-typeConstraint = define "TypeConstraint" $
-  doc "An assertion that two types can be unified into a single type" $
-  T.record [
-    "left">:
-      doc "The left-hand side of the constraint"
-      Core.type_,
-    "right">:
-      doc "The right-hand side of the constraint"
-      Core.type_,
-    "comment">:
-      doc "A description of the type constraint which may be used for tracing or debugging"
-      T.string]
-
-typeSubst :: Binding
-typeSubst = define "TypeSubst" $
-  doc "A substitution of type variables for types" $
-  T.wrap $ T.map Core.name Core.type_
-
-functionStructure :: Binding
-functionStructure = define "FunctionStructure" $
-  doc ("A structured representation of a function term's components, replacing ad-hoc tuples."
-    ++ " This captures all the information extracted from peeling lambdas, type lambdas, lets, and"
-    ++ " type applications from a term.") $
-  T.forAll "env" $
-  T.record [
-    "typeParams">:
-      doc "Type parameters (from type lambdas)" $
-      T.list Core.name,
-    "params">:
-      doc "Value parameters (from lambdas)" $
-      T.list Core.name,
-    "bindings">:
-      doc "Let bindings accumulated from the term" $
-      T.list Core.binding,
-    "body">:
-      doc "The body term after removing all lambdas, lets, etc."
-      Core.term,
-    "domains">:
-      doc "Domain types of the value parameters" $
-      T.list Core.type_,
-    "codomain">:
-      doc "The return type of the function (if type inference succeeded)" $
-      T.optional Core.type_,
-    "environment">:
-      doc "Updated environment after processing all bindings" $
-      T.variable "env"]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Util.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Util.hs
+++ /dev/null
@@ -1,79 +0,0 @@
-module Hydra.Sources.Kernel.Types.Util where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.util"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "General-purpose utility types used across Hydra."}
-  where
-    -- Note: either_ and pair are NOT included here because they correspond to built-in
-    -- type constructors (TypeEither, TypePair) which are handled natively by all target languages.
-    -- Including them would cause conflicts with Haskell's Prelude.Either.
-    -- Note: adapter, bicoder, and coder have been moved to hydra.coders.
-    definitions = [
-      caseConvention,
-      comparison,
-      precision]
-
-caseConvention :: Binding
-caseConvention = define "CaseConvention" $
-  doc "A naming convention for symbols, such as camelCase or snake_case" $
-  T.enum ["camel", "pascal", "lowerSnake", "upperSnake"]
-
-comparison :: Binding
-comparison = define "Comparison" $
-  doc "An equality judgement: less than, equal to, or greater than" $
-  T.enum [
-    "lessThan",
-    "equalTo",
-    "greaterThan"]
-
-either_ :: Binding
-either_ = define "Either" $
-  doc "A named union type equivalent to the built-in Either type constructor, for use in languages that lack anonymous sum types" $
-  T.forAlls ["a", "b"] $ T.union [
-    "left">:
-      doc "The left alternative"
-      (T.var "a"),
-    "right">:
-      doc "The right alternative"
-      (T.var "b")]
-
-pair :: Binding
-pair = define "Pair" $
-  doc "A named record type equivalent to the built-in Pair type constructor, for use in languages that lack anonymous product types" $
-  T.forAlls ["a", "b"] $ T.record [
-    "first">:
-      doc "The first component"
-      (T.var "a"),
-    "second">:
-      doc "The second component"
-      (T.var "b")]
-
-precision :: Binding
-precision = define "Precision" $
-  doc "Numeric precision: arbitrary precision, or precision to a specified number of bits" $
-  T.union [
-    "arbitrary">:
-      doc "Arbitrary precision" $
-      T.unit,
-    "bits">:
-      doc "Precision to a specified number of bits" $
-      T.int32]
diff --git a/src/main/haskell/Hydra/Sources/Kernel/Types/Variants.hs b/src/main/haskell/Hydra/Sources/Kernel/Types/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kernel/Types/Variants.hs
+++ /dev/null
@@ -1,108 +0,0 @@
-module Hydra.Sources.Kernel.Types.Variants where
-
--- Standard type-level kernel imports
-import           Hydra.Kernel hiding (eliminationVariant, functionVariant, literalVariant, termVariant, typeVariant)
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.variants"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Variant types which describe the structure of Hydra core types and terms."}
-  where
-    definitions = [
-      eliminationVariant,
-      functionVariant,
-      literalVariant,
-      termVariant,
-      typeVariant]
-
--- Note: kept around for backward compatibility with the Hydra.Coders LanguageConstraints schema,
--- even though hydra.core.Function and hydra.core.Elimination no longer exist as #332 of 2026-04.
-eliminationVariant :: Binding
-eliminationVariant = define "EliminationVariant" $
-  doc "The identifier of an elimination constructor (legacy)" $
-  T.enum [
-    "record",
-    "union",
-    "wrap"]
-
--- Note: kept around for backward compatibility with the Hydra.Coders LanguageConstraints schema.
-functionVariant :: Binding
-functionVariant = define "FunctionVariant" $
-  doc "The identifier of a function constructor (legacy)" $
-  T.enum [
-    "elimination",
-    "lambda"]
-
-literalVariant :: Binding
-literalVariant = define "LiteralVariant" $
-  doc "The identifier of a literal constructor" $
-  T.enum [
-    "binary",
-    "boolean",
-    "decimal",
-    "float",
-    "integer",
-    "string"]
-
-termVariant :: Binding
-termVariant = define "TermVariant" $
-  doc "The identifier of a term expression constructor" $
-  T.enum [
-    "annotated",
-    "application",
-    "cases",
-    "either",
-    "inject",
-    "lambda",
-    "let",
-    "list",
-    "literal",
-    "map",
-    "maybe",
-    "pair",
-    "project",
-    "record",
-    "set",
-    "typeApplication",
-    "typeLambda",
-    "unit",
-    "unwrap",
-    "variable",
-    "wrap"]
-
-typeVariant :: Binding
-typeVariant = define "TypeVariant" $
-  doc "The identifier of a type constructor" $
-  T.enum [
-    "annotated",
-    "application",
-    "either",
-    "forall",
-    "function",
-    "list",
-    "literal",
-    "map",
-    "maybe",
-    "pair",
-    "record",
-    "set",
-    "union",
-    "unit",
-    "variable",
-    "void",
-    "wrap"]
diff --git a/src/main/haskell/Hydra/Sources/Kusto/Kql.hs b/src/main/haskell/Hydra/Sources/Kusto/Kql.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Kusto/Kql.hs
+++ /dev/null
@@ -1,371 +0,0 @@
-module Hydra.Sources.Kusto.Kql where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.kusto.kql"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-kql :: String -> Type
-kql = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A partial KQL (Kusto Query Language) model, based on examples from the documentation. Not normative.")}
-  where
-    definitions = [
-      betweenExpression,
-      binaryExpression,
-      binaryOperator,
-      builtInFunction,
-      columnAlias,
-      columnAssignment,
-      columnName,
-      columns,
-      command,
-      datetime,
-      duration,
-      durationUnit,
-      expression,
-      function_,
-      functionExpression,
-      functionName,
-      indexExpression,
-      joinCommand,
-      joinKind,
-      keyValuePair,
-      letBinding,
-      letExpression,
-      literal_,
-      order,
-      parameter,
-      parseCommand,
-      pipelineExpression,
-      printCommand,
-      projection,
-      propertyExpression,
-      query,
-      searchCommand,
-      summarizeCommand,
-      tableName,
-      topCommand,
-      sortBy,
-      tabularExpression,
-      unaryExpression,
-      unaryOperator,
-      unionCommand,
-      unionKind]
-
-betweenExpression :: Binding
-betweenExpression = define "BetweenExpression" $
-  T.record [
-    "not">: T.boolean,
-    "expression">: kql "Expression",
-    "lowerBound">: kql "Expression",
-    "upperBound">: kql "Expression"]
-
-binaryExpression :: Binding
-binaryExpression = define "BinaryExpression" $
-  T.record [
-    "left">: kql "Expression",
-    "operator">: kql "BinaryOperator",
-    "right">: kql "Expression"]
-
-binaryOperator :: Binding
-binaryOperator = define "BinaryOperator" $
-  T.enum [
-    "caseInsensitiveEqual",
-    "contains",
-    "divide",
-    "endsWith",
-    "equal",
-    "greater",
-    "greaterOrEqual",
-    "has",
-    "hasPrefix",
-    "hasSuffix",
-    "less",
-    "lessOrEqual",
-    "matchesRegex",
-    "minus",
-    "notEqual",
-    "plus",
-    "startsWith",
-    "times"]
-
-builtInFunction :: Binding
-builtInFunction = define "BuiltInFunction" $
-  T.enum [
-    "ago",
-    "bin",
-    "count",
-    "dcount",
-    "endofday",
-    "extract",
-    "format_datetime",
-    "materialize",
-    "now",
-    "range",
-    "startofday",
-    "strcat",
-    "todynamic"]
-
-columnAlias :: Binding
-columnAlias = define "ColumnAlias" $
-  T.record [
-    "column">: kql "ColumnName",
-    "alias">: kql "ColumnName"]
-
-columnAssignment :: Binding
-columnAssignment = define "ColumnAssignment" $
-  T.record [
-    "column">: kql "ColumnName",
-    "expression">: kql "Expression"]
-
-columnName :: Binding
-columnName = define "ColumnName" $ T.wrap T.string
-
-columns :: Binding
-columns = define "Columns" $
-  T.union [
-    "all">: T.unit,
-    "single">: kql "ColumnName"]
-
-command :: Binding
-command = define "Command" $
-  T.union [
-    "count">: T.unit,
-    "distinct">:
-      doc "See https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/distinct-operator" $
-      nonemptyList $ kql "ColumnName",
-    "extend">: nonemptyList $ kql "ColumnAssignment",
-    "join">: kql "JoinCommand",
-    "limit">: T.int32,
-    "mvexpand">: kql "ColumnName",
-    "orderBy">: nonemptyList $ kql "SortBy",
-    "parse">: kql "ParseCommand",
-    "print">: kql "PrintCommand",
-    "project">: nonemptyList $ kql "Projection",
-    "projectAway">: nonemptyList $ kql "ColumnName",
-    "projectRename">: nonemptyList $ kql "ColumnAlias",
-    "render">: T.string,
-    "search">: kql "SearchCommand",
-    "sortBy">: nonemptyList $ kql "SortBy",
-    "summarize">: kql "SummarizeCommand",
-    "take">:
-      doc "Limit a search to a specified number of results"
-      T.int32,
-    "top">: kql "TopCommand",
-    "union">: kql "UnionCommand",
-    "where">: kql "Expression"]
-
-datetime :: Binding
-datetime = define "Datetime" $ T.wrap T.string
-
-duration :: Binding
-duration = define "Duration" $
-  T.record [
-    "value">: T.int32,
-    "unit">: kql "DurationUnit"]
-
-durationUnit :: Binding
-durationUnit = define "DurationUnit" $
-  T.enum ["second", "minute", "hour"]
-
-expression :: Binding
-expression = define "Expression" $
-  T.union [
-    "and">: nonemptyList $ kql "Expression",
-    "any">: T.unit,
-    "between">: kql "BetweenExpression",
-    "binary">: kql "BinaryExpression",
-    "braces">: kql "Expression", -- TODO: what do braces represent? E.g. "let timeRange = {TimeRange}"
-    "column">: kql "ColumnName",
-    "dataset">: kql "TableName",
-    "index">: kql "IndexExpression",
-    "list">: T.list $ kql "Expression",
-    "literal">: kql "Literal",
-    "or">: nonemptyList $ kql "Expression",
-    "parentheses">: kql "Expression",
-    "property">: kql "PropertyExpression",
-    "unary">: kql "UnaryExpression"]
-
-function_ :: Binding
-function_ = define "Function" $
-  T.union [
-    "builtIn">: kql "BuiltInFunction",
-    "custom">: kql "FunctionName"]
-
-functionExpression :: Binding
-functionExpression = define "FunctionExpression" $
-  T.record [
-    "function">: kql "Function",
-    "arguments">: T.list $ kql "Expression"]
-
-functionName :: Binding
-functionName = define "FunctionName" $ T.wrap T.string
-
-indexExpression :: Binding
-indexExpression = define "IndexExpression" $
-  T.record [
-    "expression">: kql "Expression",
-    "index">: T.string]
-
-joinCommand :: Binding
-joinCommand = define "JoinCommand" $
-  T.record [
-    "kind">: kql "JoinKind",
-    "expression">: kql "TableName",
-    "on">: kql "Expression"]
-
-joinKind :: Binding
-joinKind = define "JoinKind" $
-  T.enum ["leftouter", "leftsemi", "leftanti", "fullouter", "inner", "innerunique", "rightouter", "rightsemi", "rightanti"]
-
-keyValuePair :: Binding
-keyValuePair = define "KeyValuePair" $
-  T.record [
-    "key">: T.string,
-    "value">: kql "Expression"]
-
-letBinding :: Binding
-letBinding = define "LetBinding" $
-  T.record [
-    "name">: kql "ColumnName",
-    "expression">: kql "Expression"]
-
-letExpression :: Binding
-letExpression = define "LetExpression" $
-  T.record [
-    "bindings">: nonemptyList $ kql "LetBinding",
-    "expression">: kql "TabularExpression"]
-
-literal_ :: Binding
-literal_ = define "Literal" $
-  T.union [
-    "duration">: kql "Duration",
-    "datetime">: kql "Datetime",
-    "string">: T.string,
-    -- TODO: unverified
-    "int">: T.int32,
-    "long">: T.int64,
-    "double">: T.float64,
-    "boolean">: T.boolean]
-
-order :: Binding
-order = define "Order" $
-  T.enum ["ascending", "descending"]
-
-parameter :: Binding
-parameter = define "Parameter" $
-  T.record [
-    "key">: T.string,
-    "value">: kql "Literal"]
-
-parseCommand :: Binding
-parseCommand = define "ParseCommand" $
-  T.record [
-    "column">: kql "ColumnName",
-    "pairs">: nonemptyList $ kql "KeyValuePair"]
-
--- TODO: what are these expressions actually called in KQL?
-pipelineExpression :: Binding
-pipelineExpression = define "PipelineExpression" $
-  T.wrap $ nonemptyList $ kql "TabularExpression"
-
-printCommand :: Binding
-printCommand = define "PrintCommand" $
-  T.record [
-    "column">: T.maybe $ kql "ColumnName",
-    "expression">: kql "Expression"]
-
-projection :: Binding
-projection = define "Projection" $
-  T.record [
-    "expression">: kql "Expression",
-    "alias">: T.maybe $ kql "ColumnName"]
-
-propertyExpression :: Binding
-propertyExpression = define "PropertyExpression" $
-  T.record [
-    "expression">: kql "Expression",
-    "property">: T.string]
-
-query :: Binding
-query = define "Query" $ T.wrap $ kql "TabularExpression"
-
-searchCommand :: Binding
-searchCommand = define "SearchCommand" $
-  doc "Search across all datasets and columns or, if provided, specific datasets and/or columns" $
-  T.record [
-    "datasets">: T.list $ kql "TableName",
-    "pattern">: kql "Expression"]
-
-summarizeCommand :: Binding
-summarizeCommand = define "SummarizeCommand" $
-  T.record [
-     "columns">: nonemptyList $ kql "ColumnAssignment",
-     "by">: T.list $ kql "ColumnName"]
-
-tableName :: Binding
-tableName = define "TableName" $ T.wrap T.string
-
-topCommand :: Binding
-topCommand = define "TopCommand" $
-  T.record [
-    "count">: T.int32,
-    "sort">: T.list $ kql "SortBy"]
-
-sortBy :: Binding
-sortBy = define "SortBy" $
-  T.record [
-    "column">: kql "ColumnName",
-    "order">: T.maybe $ kql "Order"]
-
-tabularExpression :: Binding
-tabularExpression = define "TabularExpression" $
-  T.union [
-    "command">: kql "Command",
-    "pipeline">: kql "PipelineExpression",
-    "let">: kql "LetExpression",
-    "table">: kql "TableName"]
-
-unaryExpression :: Binding
-unaryExpression = define "UnaryExpression" $
-  T.record [
-    "operator">: kql "UnaryOperator",
-    "expression">: kql "Expression"]
-
-unaryOperator :: Binding
-unaryOperator = define "UnaryOperator" $
-  T.enum ["not"]
-
-unionCommand :: Binding
-unionCommand = define "UnionCommand" $
-  T.record [
-    "parameters">: T.list $ kql "Parameter",
-    "kind">: T.maybe $ kql "UnionKind",
-    "withSource">: T.maybe $ kql "ColumnName",
-    "isFuzzy">: T.maybe T.boolean,
-    "tables">: nonemptyList $ kql "TableName"]
-
-unionKind :: Binding
-unionKind = define "UnionKind" $
-  T.enum ["inner", "outer"]
diff --git a/src/main/haskell/Hydra/Sources/Libraries.hs b/src/main/haskell/Hydra/Sources/Libraries.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Libraries.hs
+++ /dev/null
@@ -1,696 +0,0 @@
-
--- | Implementations of the Hydra standard libraries in Haskell
-module Hydra.Sources.Libraries (
-  module Hydra.Sources.Libraries,
-) where
-
-import Hydra.Kernel
-import qualified Hydra.Lib.Names as LibNames
-import Hydra.Dsl.Prims as Prims
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Types as Types
-
-import qualified Hydra.Lib.Chars as Chars
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Regex as Regex
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-
-import qualified Data.List as L
-
-
--- Compatibility aliases for legacy _* names (from the old Staging.Lib.Names module).
--- These map old names to the new generated Hydra.Lib.Names constants.
-
--- Namespace aliases
-_hydra_lib_chars    = LibNames.chars
-_hydra_lib_eithers  = LibNames.eithers
-_hydra_lib_equality = LibNames.equality
-_hydra_lib_lists    = LibNames.lists
-_hydra_lib_literals = LibNames.literals
-_hydra_lib_logic    = LibNames.logic
-_hydra_lib_maps     = LibNames.maps
-_hydra_lib_math     = LibNames.math
-_hydra_lib_maybes   = LibNames.maybes
-_hydra_lib_pairs    = LibNames.pairs
-_hydra_lib_regex    = LibNames.regex
-_hydra_lib_sets     = LibNames.sets
-_hydra_lib_strings  = LibNames.strings
-_hydra_typeclass    = LibNames.typeclass
-
--- Chars
-_chars_isAlphaNum = LibNames.charsIsAlphaNum
-_chars_isLower    = LibNames.charsIsLower
-_chars_isSpace    = LibNames.charsIsSpace
-_chars_isUpper    = LibNames.charsIsUpper
-_chars_toLower    = LibNames.charsToLower
-_chars_toUpper    = LibNames.charsToUpper
-
--- Eithers
-_eithers_bimap            = LibNames.eithersBimap
-_eithers_bind             = LibNames.eithersBind
-_eithers_either           = LibNames.eithersEither
-_eithers_foldl            = LibNames.eithersFoldl
-_eithers_fromLeft         = LibNames.eithersFromLeft
-_eithers_fromRight        = LibNames.eithersFromRight
-_eithers_isLeft           = LibNames.eithersIsLeft
-_eithers_isRight          = LibNames.eithersIsRight
-_eithers_lefts            = LibNames.eithersLefts
-_eithers_map              = LibNames.eithersMap
-_eithers_mapList          = LibNames.eithersMapList
-_eithers_mapMaybe         = LibNames.eithersMapMaybe
-_eithers_mapSet           = LibNames.eithersMapSet
-_eithers_partitionEithers = LibNames.eithersPartitionEithers
-_eithers_rights           = LibNames.eithersRights
-
--- Equality
-_equality_compare  = LibNames.equalityCompare
-_equality_equal    = LibNames.equalityEqual
-_equality_gt       = LibNames.equalityGt
-_equality_gte      = LibNames.equalityGte
-_equality_identity = LibNames.equalityIdentity
-_equality_lt       = LibNames.equalityLt
-_equality_lte      = LibNames.equalityLte
-_equality_max      = LibNames.equalityMax
-_equality_min      = LibNames.equalityMin
-
--- Lists
-_lists_apply       = LibNames.listsApply
-_lists_bind        = LibNames.listsBind
-_lists_concat      = LibNames.listsConcat
-_lists_concat2     = LibNames.listsConcat2
-_lists_cons        = LibNames.listsCons
-_lists_drop        = LibNames.listsDrop
-_lists_dropWhile   = LibNames.listsDropWhile
-_lists_elem        = LibNames.listsElem
-_lists_filter      = LibNames.listsFilter
-_lists_find        = LibNames.listsFind
-_lists_foldl       = LibNames.listsFoldl
-_lists_foldr       = LibNames.listsFoldr
-_lists_group       = LibNames.listsGroup
-_lists_intercalate = LibNames.listsIntercalate
-_lists_intersperse = LibNames.listsIntersperse
-_lists_length      = LibNames.listsLength
-_lists_map         = LibNames.listsMap
-_lists_maybeAt     = LibNames.listsMaybeAt
-_lists_maybeHead   = LibNames.listsMaybeHead
-_lists_maybeInit   = LibNames.listsMaybeInit
-_lists_maybeLast   = LibNames.listsMaybeLast
-_lists_maybeTail   = LibNames.listsMaybeTail
-_lists_nub         = LibNames.listsNub
-_lists_null        = LibNames.listsNull
-_lists_partition   = LibNames.listsPartition
-_lists_pure        = LibNames.listsPure
-_lists_replicate   = LibNames.listsReplicate
-_lists_reverse     = LibNames.listsReverse
-_lists_singleton   = LibNames.listsSingleton
-_lists_sort        = LibNames.listsSort
-_lists_sortOn      = LibNames.listsSortOn
-_lists_span        = LibNames.listsSpan
-_lists_take        = LibNames.listsTake
-_lists_transpose   = LibNames.listsTranspose
-_lists_uncons      = LibNames.listsUncons
-_lists_zip         = LibNames.listsZip
-_lists_zipWith     = LibNames.listsZipWith
-
--- Literals
-_literals_bigfloatToBigint  = LibNames.literalsBigfloatToBigint
-_literals_bigfloatToFloat32 = LibNames.literalsBigfloatToFloat32
-_literals_bigfloatToFloat64 = LibNames.literalsBigfloatToFloat64
-_literals_bigintToBigfloat  = LibNames.literalsBigintToBigfloat
-_literals_bigintToDecimal   = LibNames.literalsBigintToDecimal
-_literals_bigintToInt8      = LibNames.literalsBigintToInt8
-_literals_bigintToInt16     = LibNames.literalsBigintToInt16
-_literals_bigintToInt32     = LibNames.literalsBigintToInt32
-_literals_bigintToInt64     = LibNames.literalsBigintToInt64
-_literals_bigintToUint8     = LibNames.literalsBigintToUint8
-_literals_bigintToUint16    = LibNames.literalsBigintToUint16
-_literals_bigintToUint32    = LibNames.literalsBigintToUint32
-_literals_bigintToUint64    = LibNames.literalsBigintToUint64
-_literals_binaryToBytes     = LibNames.literalsBinaryToBytes
-_literals_binaryToString    = LibNames.literalsBinaryToString
-_literals_decimalToBigint   = LibNames.literalsDecimalToBigint
-_literals_decimalToFloat32  = LibNames.literalsDecimalToFloat32
-_literals_decimalToFloat64  = LibNames.literalsDecimalToFloat64
-_literals_float32ToBigfloat = LibNames.literalsFloat32ToBigfloat
-_literals_float32ToDecimal  = LibNames.literalsFloat32ToDecimal
-_literals_float64ToBigfloat = LibNames.literalsFloat64ToBigfloat
-_literals_float64ToDecimal  = LibNames.literalsFloat64ToDecimal
-_literals_int8ToBigint      = LibNames.literalsInt8ToBigint
-_literals_int16ToBigint     = LibNames.literalsInt16ToBigint
-_literals_int32ToBigint     = LibNames.literalsInt32ToBigint
-_literals_int64ToBigint     = LibNames.literalsInt64ToBigint
-_literals_readBigfloat      = LibNames.literalsReadBigfloat
-_literals_readBigint        = LibNames.literalsReadBigint
-_literals_readBoolean       = LibNames.literalsReadBoolean
-_literals_readDecimal       = LibNames.literalsReadDecimal
-_literals_readFloat32       = LibNames.literalsReadFloat32
-_literals_readFloat64       = LibNames.literalsReadFloat64
-_literals_readInt8          = LibNames.literalsReadInt8
-_literals_readInt16         = LibNames.literalsReadInt16
-_literals_readInt32         = LibNames.literalsReadInt32
-_literals_readInt64         = LibNames.literalsReadInt64
-_literals_readString        = LibNames.literalsReadString
-_literals_readUint8         = LibNames.literalsReadUint8
-_literals_readUint16        = LibNames.literalsReadUint16
-_literals_readUint32        = LibNames.literalsReadUint32
-_literals_readUint64        = LibNames.literalsReadUint64
-_literals_showBigfloat      = LibNames.literalsShowBigfloat
-_literals_showBigint        = LibNames.literalsShowBigint
-_literals_showBoolean       = LibNames.literalsShowBoolean
-_literals_showDecimal       = LibNames.literalsShowDecimal
-_literals_showFloat32       = LibNames.literalsShowFloat32
-_literals_showFloat64       = LibNames.literalsShowFloat64
-_literals_showInt8          = LibNames.literalsShowInt8
-_literals_showInt16         = LibNames.literalsShowInt16
-_literals_showInt32         = LibNames.literalsShowInt32
-_literals_showInt64         = LibNames.literalsShowInt64
-_literals_showString        = LibNames.literalsShowString
-_literals_showUint8         = LibNames.literalsShowUint8
-_literals_showUint16        = LibNames.literalsShowUint16
-_literals_showUint32        = LibNames.literalsShowUint32
-_literals_showUint64        = LibNames.literalsShowUint64
-_literals_stringToBinary    = LibNames.literalsStringToBinary
-_literals_uint8ToBigint     = LibNames.literalsUint8ToBigint
-_literals_uint16ToBigint    = LibNames.literalsUint16ToBigint
-_literals_uint32ToBigint    = LibNames.literalsUint32ToBigint
-_literals_uint64ToBigint    = LibNames.literalsUint64ToBigint
-
--- Logic
-_logic_and    = LibNames.logicAnd
-_logic_ifElse = LibNames.logicIfElse
-_logic_not    = LibNames.logicNot
-_logic_or     = LibNames.logicOr
-
--- Maps
-_maps_alter           = LibNames.mapsAlter
-_maps_bimap           = LibNames.mapsBimap
-_maps_delete          = LibNames.mapsDelete
-_maps_elems           = LibNames.mapsElems
-_maps_empty           = LibNames.mapsEmpty
-_maps_filter          = LibNames.mapsFilter
-_maps_filterWithKey   = LibNames.mapsFilterWithKey
-_maps_findWithDefault = LibNames.mapsFindWithDefault
-_maps_fromList        = LibNames.mapsFromList
-_maps_insert          = LibNames.mapsInsert
-_maps_keys            = LibNames.mapsKeys
-_maps_lookup          = LibNames.mapsLookup
-_maps_map             = LibNames.mapsMap
-_maps_mapKeys         = LibNames.mapsMapKeys
-_maps_member          = LibNames.mapsMember
-_maps_null            = LibNames.mapsNull
-_maps_singleton       = LibNames.mapsSingleton
-_maps_size            = LibNames.mapsSize
-_maps_toList          = LibNames.mapsToList
-_maps_union           = LibNames.mapsUnion
-
--- Math
-_math_abs      = LibNames.mathAbs
-_math_acos     = LibNames.mathAcos
-_math_acosh    = LibNames.mathAcosh
-_math_add      = LibNames.mathAdd
-_math_addFloat64 = LibNames.mathAddFloat64
-_math_asin     = LibNames.mathAsin
-_math_asinh    = LibNames.mathAsinh
-_math_atan     = LibNames.mathAtan
-_math_atan2    = LibNames.mathAtan2
-_math_atanh    = LibNames.mathAtanh
-_math_ceiling  = LibNames.mathCeiling
-_math_cos      = LibNames.mathCos
-_math_cosh     = LibNames.mathCosh
-_math_e        = LibNames.mathE
-_math_even     = LibNames.mathEven
-_math_exp      = LibNames.mathExp
-_math_floor    = LibNames.mathFloor
-_math_log      = LibNames.mathLog
-_math_logBase  = LibNames.mathLogBase
-_math_max      = LibNames.mathMax
-_math_maybeDiv = LibNames.mathMaybeDiv
-_math_min      = LibNames.mathMin
-_math_maybeMod = LibNames.mathMaybeMod
-_math_mul      = LibNames.mathMul
-_math_mulFloat64 = LibNames.mathMulFloat64
-_math_negate   = LibNames.mathNegate
-_math_negateFloat64 = LibNames.mathNegateFloat64
-_math_odd      = LibNames.mathOdd
-_math_pi       = LibNames.mathPi
-_math_pow      = LibNames.mathPow
-_math_maybePred = LibNames.mathMaybePred
-_math_range    = LibNames.mathRange
-_math_maybeRem = LibNames.mathMaybeRem
-_math_round         = LibNames.mathRound
-_math_roundBigfloat = LibNames.mathRoundBigfloat
-_math_roundFloat32  = LibNames.mathRoundFloat32
-_math_roundFloat64  = LibNames.mathRoundFloat64
-_math_signum        = LibNames.mathSignum
-_math_sin      = LibNames.mathSin
-_math_sinh     = LibNames.mathSinh
-_math_sqrt     = LibNames.mathSqrt
-_math_sub      = LibNames.mathSub
-_math_subFloat64 = LibNames.mathSubFloat64
-_math_maybeSucc = LibNames.mathMaybeSucc
-_math_tan      = LibNames.mathTan
-_math_tanh     = LibNames.mathTanh
-_math_truncate = LibNames.mathTruncate
-
--- Maybes
-_maybes_apply     = LibNames.maybesApply
-_maybes_bind      = LibNames.maybesBind
-_maybes_cases     = LibNames.maybesCases
-_maybes_cat       = LibNames.maybesCat
-_maybes_compose   = LibNames.maybesCompose
-_maybes_fromMaybe = LibNames.maybesFromMaybe
-_maybes_isJust    = LibNames.maybesIsJust
-_maybes_isNothing = LibNames.maybesIsNothing
-_maybes_map       = LibNames.maybesMap
-_maybes_mapMaybe  = LibNames.maybesMapMaybe
-_maybes_maybe     = LibNames.maybesMaybe
-_maybes_pure      = LibNames.maybesPure
-_maybes_toList    = LibNames.maybesToList
-
--- Pairs
-_pairs_bimap  = LibNames.pairsBimap
-_pairs_first  = LibNames.pairsFirst
-_pairs_second = LibNames.pairsSecond
-
--- Sets
-_sets_delete       = LibNames.setsDelete
-_sets_difference   = LibNames.setsDifference
-_sets_empty        = LibNames.setsEmpty
-_sets_fromList     = LibNames.setsFromList
-_sets_insert       = LibNames.setsInsert
-_sets_intersection = LibNames.setsIntersection
-_sets_map          = LibNames.setsMap
-_sets_member       = LibNames.setsMember
-_sets_null         = LibNames.setsNull
-_sets_singleton    = LibNames.setsSingleton
-_sets_size         = LibNames.setsSize
-_sets_toList       = LibNames.setsToList
-_sets_union        = LibNames.setsUnion
-_sets_unions       = LibNames.setsUnions
-
--- Regex
-_regex_find       = LibNames.regexFind
-_regex_findAll    = LibNames.regexFindAll
-_regex_matches    = LibNames.regexMatches
-_regex_replace    = LibNames.regexReplace
-_regex_replaceAll = LibNames.regexReplaceAll
-_regex_split      = LibNames.regexSplit
-
--- Strings
-_strings_cat         = LibNames.stringsCat
-_strings_cat2        = LibNames.stringsCat2
-_strings_fromList    = LibNames.stringsFromList
-_strings_intercalate = LibNames.stringsIntercalate
-_strings_length      = LibNames.stringsLength
-_strings_lines       = LibNames.stringsLines
-_strings_maybeCharAt = LibNames.stringsMaybeCharAt
-_strings_null        = LibNames.stringsNull
-_strings_splitOn     = LibNames.stringsSplitOn
-_strings_toList      = LibNames.stringsToList
-_strings_toLower     = LibNames.stringsToLower
-_strings_toUpper     = LibNames.stringsToUpper
-_strings_unlines     = LibNames.stringsUnlines
-
--- Type classes
-_typeclass_Eq  = LibNames.typeclassEq
-_typeclass_Ord = LibNames.typeclassOrd
-
-
--- Type variables (TypeVar) for primitive type schemes
--- Unconstrained
-_a, _b, _c, _d, _k, _k1, _k2, _s, _v, _v1, _v2, _w, _x, _y, _z :: TypeVar
-_a = v "a"
-_b = v "b"
-_c = v "c"
-_d = v "d"
-_k = v "k"
-_k1 = v "k1"
-_k2 = v "k2"
-_s = v "s"
-_v = v "v"
-_v1 = v "v1"
-_v2 = v "v2"
-_w = v "w"
-_x = v "x"
-_y = v "y"
-_z = v "z"
-
--- Ord-constrained
-_kOrd, _k1Ord, _k2Ord, _xOrd, _yOrd :: TypeVar
-_kOrd = vOrd "k"
-_k1Ord = vOrd "k1"
-_k2Ord = vOrd "k2"
-_xOrd = vOrd "x"
-_yOrd = vOrd "y"
-
--- Eq-constrained
-_xEq :: TypeVar
-_xEq = vEq "x"
-
--- Term coders for type variables (used in primitive implementations)
-a_, b_, c_, d_, k_, k1_, k2_, s_, v_, v1_, v2_, w_, x_, y_, z_ :: TermCoder Term
-a_ = variable "a"
-b_ = variable "b"
-c_ = variable "c"
-d_ = variable "d"
-k_ = variable "k"
-k1_ = variable "k1"
-k2_ = variable "k2"
-s_ = variable "s"
-v_ = variable "v"
-v1_ = variable "v1"
-v2_ = variable "v2"
-w_ = variable "w"
-x_ = variable "x"
-y_ = variable "y"
-z_ = variable "z"
-
-standardLibraries :: [Library]
-standardLibraries = [
-  hydraLibChars,
-  hydraLibEithers,
-  hydraLibEquality,
-  hydraLibLists,
-  hydraLibLiterals,
-  hydraLibLogic,
-  hydraLibMaps,
-  hydraLibMathFloat64,
-  hydraLibMathInt32,
-  hydraLibMaybes,
-  hydraLibPairs,
-  hydraLibRegex,
-  hydraLibSets,
-  hydraLibStrings]
-
-standardLibrary :: Namespace -> [Primitive] -> Library
-standardLibrary ns prims = Library {
-  libraryNamespace = ns,
-  libraryPrefix = L.drop (L.length ("hydra.lib." :: String)) $ unNamespace ns,
-  libraryPrimitives = prims}
-
--- | A TermCoder for function types which uses beta reduction to bridge term-level
---   functions to native functions. This allows higher-order primitives like map,
---   filter, foldl, etc. to use native implementations rather than eval-level ones.
-fun :: TermCoder x -> TermCoder y -> TermCoder (x -> y)
-fun = Prims.functionWithReduce (\cx g t -> reduceTerm cx g True t)
-
-hydraLibChars :: Library
-hydraLibChars = standardLibrary _hydra_lib_chars [
-  prim1 _chars_isAlphaNum Chars.isAlphaNum [] int32 boolean,
-  prim1 _chars_isLower    Chars.isLower    [] int32 boolean,
-  prim1 _chars_isSpace    Chars.isSpace    [] int32 boolean,
-  prim1 _chars_isUpper    Chars.isUpper    [] int32 boolean,
-  prim1 _chars_toLower    Chars.toLower    [] int32 int32,
-  prim1 _chars_toUpper    Chars.toUpper    [] int32 int32]
-
-hydraLibEithers :: Library
-hydraLibEithers = standardLibrary _hydra_lib_eithers [
-    prim3       _eithers_bimap            Eithers.bimap            [_x, _y, _z, _w] (fun x_ z_) (fun y_ w_) (Prims.either_ x_ y_) (Prims.either_ z_ w_),
-    prim2       _eithers_bind             Eithers.bind             [_x, _y, _z]     (Prims.either_ x_ y_) (fun y_ (Prims.either_ x_ z_)) (Prims.either_ x_ z_),
-    prim3       _eithers_either           Eithers.either           [_x, _y, _z]     (fun x_ z_) (fun y_ z_) (Prims.either_ x_ y_) z_,
-    prim3       _eithers_foldl            Eithers.foldl            [_x, _y, _z]     (fun x_ (fun y_ (Prims.either_ z_ x_))) x_ (list y_) (Prims.either_ z_ x_),
-    prim2       _eithers_fromLeft         Eithers.fromLeft         [_x, _y]         x_ (Prims.either_ x_ y_) x_,
-    prim2       _eithers_fromRight        Eithers.fromRight        [_x, _y]         y_ (Prims.either_ x_ y_) y_,
-    prim1       _eithers_isLeft           Eithers.isLeft           [_x, _y]         (Prims.either_ x_ y_) boolean,
-    prim1       _eithers_isRight          Eithers.isRight          [_x, _y]         (Prims.either_ x_ y_) boolean,
-    prim1       _eithers_lefts            Eithers.lefts            [_x, _y]         (list $ Prims.either_ x_ y_) (list x_),
-    prim2       _eithers_map              Eithers.map              [_x, _y, _z]     (fun x_ y_) (Prims.either_ z_ x_) (Prims.either_ z_ y_),
-    prim2       _eithers_mapList          Eithers.mapList          [_x, _y, _z]     (fun x_ (Prims.either_ z_ y_)) (list x_) (Prims.either_ z_ (list y_)),
-    prim2       _eithers_mapMaybe         Eithers.mapMaybe         [_x, _y, _z]     (fun x_ (Prims.either_ z_ y_)) (optional x_) (Prims.either_ z_ (optional y_)),
-    prim2       _eithers_mapSet           Eithers.mapSet           [_x, _y, _z]     (fun x_ (Prims.either_ z_ y_)) (set x_) (Prims.either_ z_ (set y_)),
-    prim1       _eithers_partitionEithers Eithers.partitionEithers [_x, _y]         (list $ Prims.either_ x_ y_) (pair (list x_) (list y_)),
-    prim1       _eithers_rights           Eithers.rights           [_x, _y]         (list $ Prims.either_ x_ y_) (list y_)]
-
-hydraLibEquality :: Library
-hydraLibEquality = standardLibrary _hydra_lib_equality [
-    prim2 _equality_compare  Equality.compare  [_xOrd] x_ x_ comparison,
-    prim2 _equality_equal    Equality.equal    [_xEq]  x_ x_ boolean,
-    prim2 _equality_gt       Equality.gt       [_xOrd] x_ x_ boolean,
-    prim2 _equality_gte      Equality.gte      [_xOrd] x_ x_ boolean,
-    prim1 _equality_identity Equality.identity [_x]    x_ x_,
-    prim2 _equality_lt       Equality.lt       [_xOrd] x_ x_ boolean,
-    prim2 _equality_lte      Equality.lte      [_xOrd] x_ x_ boolean,
-    prim2 _equality_max      Equality.max      [_xOrd] x_ x_ x_,
-    prim2 _equality_min      Equality.min      [_xOrd] x_ x_ x_]
-
-hydraLibLists :: Library
-hydraLibLists = standardLibrary _hydra_lib_lists [
-    prim2     _lists_apply        Lists.apply         [_x, _y]     (list $ fun x_ y_) (list x_) (list y_),
-    prim2     _lists_bind        Lists.bind          [_x, _y]     (list x_) (fun x_ (list y_)) (list y_),
-    prim1     _lists_concat      Lists.concat        [_x]         (list (list x_)) (list x_),
-    prim2     _lists_concat2     Lists.concat2       [_x]         (list x_) (list x_) (list x_),
-    prim2     _lists_cons        Lists.cons          [_x]         x_ (list x_) (list x_),
-    prim2     _lists_drop        Lists.drop          [_x]         int32 (list x_) (list x_),
-    prim2     _lists_dropWhile   Lists.dropWhile     [_x]         (fun x_ boolean) (list x_) (list x_),
-    prim2     _lists_elem        Lists.elem          [_xEq]       x_ (list x_) boolean,
-    prim2     _lists_filter      Lists.filter        [_x]         (fun x_ boolean) (list x_) (list x_),
-    prim2     _lists_find        Lists.find          [_x]         (fun x_ boolean) (list x_) (optional x_),
-    prim3     _lists_foldl       Lists.foldl         [_y, _x]     (fun y_ (fun x_ y_)) y_ (list x_) y_,
-    prim3     _lists_foldr       Lists.foldr         [_x, _y]     (fun x_ (fun y_ y_)) y_ (list x_) y_,
-    prim1     _lists_group       Lists.group         [_xEq]       (list x_) (list (list x_)),
-    prim2     _lists_intercalate Lists.intercalate   [_x]         (list x_) (list (list x_)) (list x_),
-    prim2     _lists_intersperse Lists.intersperse   [_x]         x_ (list x_) (list x_),
-    prim1     _lists_length      Lists.length        [_x]         (list x_) int32,
-    prim2     _lists_map         Lists.map           [_x, _y]     (fun x_ y_) (list x_) (list y_),
-    prim2     _lists_maybeAt     Lists.maybeAt       [_x]         int32 (list x_) (optional x_),
-    prim1     _lists_maybeHead   Lists.maybeHead     [_x]         (list x_) (optional x_),
-    prim1     _lists_maybeInit   Lists.maybeInit     [_x]         (list x_) (optional (list x_)),
-    prim1     _lists_maybeLast   Lists.maybeLast     [_x]         (list x_) (optional x_),
-    prim1     _lists_maybeTail   Lists.maybeTail     [_x]         (list x_) (optional (list x_)),
-    prim1     _lists_nub         Lists.nub           [_xEq]       (list x_) (list x_),
-    prim1     _lists_null        Lists.null          [_x]         (list x_) boolean,
-    prim2     _lists_partition   Lists.partition     [_x]         (fun x_ boolean) (list x_) (pair (list x_) (list x_)),
-    prim1     _lists_pure        Lists.pure          [_x]         x_ (list x_),
-    prim2     _lists_replicate   Lists.replicate     [_x]         int32 x_ (list x_),
-    prim1     _lists_reverse     Lists.reverse       [_x]         (list x_) (list x_),
-    prim1     _lists_singleton   Lists.singleton     [_x]         x_ (list x_),
-    prim1     _lists_sort        Lists.sort          [_xOrd]      (list x_) (list x_),
-    prim2     _lists_sortOn      Lists.sortOn        [_x, _yOrd]  (fun x_ y_) (list x_) (list x_),
-    prim2     _lists_span        Lists.span          [_x]         (fun x_ boolean) (list x_) (pair (list x_) (list x_)),
-    prim2     _lists_take        Lists.take          [_x]         int32 (list x_) (list x_),
-    prim1     _lists_transpose   Lists.transpose     [_x]         (list (list x_)) (list (list x_)),
-    prim1     _lists_uncons      Lists.uncons        [_x]         (list x_) (optional (pair x_ (list x_))),
-    prim2     _lists_zip         Lists.zip           [_x, _y]     (list x_) (list y_) (list (pair x_ y_)),
-    prim3     _lists_zipWith     Lists.zipWith       [_x, _y, _z] (fun x_ $ fun y_ z_) (list x_) (list y_) (list z_)]
-
-hydraLibLiterals :: Library
-hydraLibLiterals = standardLibrary _hydra_lib_literals [
-  prim1 _literals_bigfloatToBigint  Literals.bigfloatToBigint  [] bigfloat bigint,
-  prim1 _literals_bigfloatToFloat32 Literals.bigfloatToFloat32 [] bigfloat float32,
-  prim1 _literals_bigfloatToFloat64 Literals.bigfloatToFloat64 [] bigfloat float64,
-  prim1 _literals_bigintToBigfloat  Literals.bigintToBigfloat  [] bigint bigfloat,
-  prim1 _literals_bigintToDecimal   Literals.bigintToDecimal   [] bigint decimal,
-  prim1 _literals_bigintToInt8      Literals.bigintToInt8      [] bigint int8,
-  prim1 _literals_bigintToInt16     Literals.bigintToInt16     [] bigint int16,
-  prim1 _literals_bigintToInt32     Literals.bigintToInt32     [] bigint int32,
-  prim1 _literals_bigintToInt64     Literals.bigintToInt64     [] bigint int64,
-  prim1 _literals_bigintToUint8     Literals.bigintToUint8     [] bigint uint8,
-  prim1 _literals_bigintToUint16    Literals.bigintToUint16    [] bigint uint16,
-  prim1 _literals_bigintToUint32    Literals.bigintToUint32    [] bigint uint32,
-  prim1 _literals_bigintToUint64    Literals.bigintToUint64    [] bigint uint64,
-  prim1 _literals_binaryToBytes     Literals.binaryToBytes     [] binary (list int32),
-  prim1 _literals_binaryToString    Literals.binaryToString    [] binary string,
-  prim1 _literals_decimalToBigint   Literals.decimalToBigint   [] decimal bigint,
-  prim1 _literals_decimalToFloat32  Literals.decimalToFloat32  [] decimal float32,
-  prim1 _literals_decimalToFloat64  Literals.decimalToFloat64  [] decimal float64,
-  prim1 _literals_float32ToBigfloat Literals.float32ToBigfloat [] float32 bigfloat,
-  prim1 _literals_float32ToDecimal  Literals.float32ToDecimal  [] float32 decimal,
-  prim1 _literals_float64ToBigfloat Literals.float64ToBigfloat [] float64 bigfloat,
-  prim1 _literals_float64ToDecimal  Literals.float64ToDecimal  [] float64 decimal,
-  prim1 _literals_int8ToBigint      Literals.int8ToBigint      [] int8 bigint,
-  prim1 _literals_int16ToBigint     Literals.int16ToBigint     [] int16 bigint,
-  prim1 _literals_int32ToBigint     Literals.int32ToBigint     [] int32 bigint,
-  prim1 _literals_int64ToBigint     Literals.int64ToBigint     [] int64 bigint,
-  prim1 _literals_readBigfloat      Literals.readBigfloat      [] string (optional bigfloat),
-  prim1 _literals_readBigint        Literals.readBigint        [] string (optional bigint),
-  prim1 _literals_readBoolean       Literals.readBoolean       [] string (optional boolean),
-  prim1 _literals_readDecimal       Literals.readDecimal       [] string (optional decimal),
-  prim1 _literals_readFloat32       Literals.readFloat32       [] string (optional float32),
-  prim1 _literals_readFloat64       Literals.readFloat64       [] string (optional float64),
-  prim1 _literals_readInt8          Literals.readInt8          [] string (optional int8),
-  prim1 _literals_readInt16         Literals.readInt16         [] string (optional int16),
-  prim1 _literals_readInt32         Literals.readInt32         [] string (optional int32),
-  prim1 _literals_readInt64         Literals.readInt64         [] string (optional int64),
-  prim1 _literals_readString        Literals.readString        [] string (optional string),
-  prim1 _literals_readUint8         Literals.readUint8         [] string (optional uint8),
-  prim1 _literals_readUint16        Literals.readUint16        [] string (optional uint16),
-  prim1 _literals_readUint32        Literals.readUint32        [] string (optional uint32),
-  prim1 _literals_readUint64        Literals.readUint64        [] string (optional uint64),
-  prim1 _literals_showBigfloat      Literals.showBigfloat      [] bigfloat string,
-  prim1 _literals_showBigint        Literals.showBigint        [] bigint string,
-  prim1 _literals_showBoolean       Literals.showBoolean       [] boolean string,
-  prim1 _literals_showDecimal       Literals.showDecimal       [] decimal string,
-  prim1 _literals_showFloat32       Literals.showFloat32       [] float32 string,
-  prim1 _literals_showFloat64       Literals.showFloat64       [] float64 string,
-  prim1 _literals_showInt8          Literals.showInt8          [] int8 string,
-  prim1 _literals_showInt16         Literals.showInt16         [] int16 string,
-  prim1 _literals_showInt32         Literals.showInt32         [] int32 string,
-  prim1 _literals_showInt64         Literals.showInt64         [] int64 string,
-  prim1 _literals_showString        Literals.showString        [] string string,
-  prim1 _literals_showUint8         Literals.showUint8         [] uint8 string,
-  prim1 _literals_showUint16        Literals.showUint16        [] uint16 string,
-  prim1 _literals_showUint32        Literals.showUint32        [] uint32 string,
-  prim1 _literals_showUint64        Literals.showUint64        [] uint64 string,
-  prim1 _literals_stringToBinary    Literals.stringToBinary    [] string binary,
-  prim1 _literals_uint8ToBigint     Literals.uint8ToBigint     [] uint8 bigint,
-  prim1 _literals_uint16ToBigint    Literals.uint16ToBigint    [] uint16 bigint,
-  prim1 _literals_uint32ToBigint    Literals.uint32ToBigint    [] uint32 bigint,
-  prim1 _literals_uint64ToBigint    Literals.uint64ToBigint    [] uint64 bigint]
-
-hydraLibLogic :: Library
-hydraLibLogic = standardLibrary _hydra_lib_logic [
-    prim2 _logic_and    Logic.and    []   boolean boolean boolean,
-    prim3 _logic_ifElse Logic.ifElse [_x] boolean x_ x_ x_,
-    prim1 _logic_not    Logic.not    []   boolean boolean,
-    prim2 _logic_or     Logic.or     []   boolean boolean boolean]
-
-hydraLibMaps :: Library
-hydraLibMaps = standardLibrary _hydra_lib_maps [
-    prim3     _maps_alter           Maps.alter             [_v, _kOrd]                  (fun (optional v_) (optional v_)) k_ mapKv mapKv,
-    prim3     _maps_bimap           Maps.bimap             [_k1Ord, _k2Ord, _v1, _v2]   (fun k1_ k2_) (fun v1_ v2_) (Prims.map k1_ v1_) (Prims.map k2_ v2_),
-    prim2     _maps_delete          Maps.delete            [_kOrd, _v]                  k_ mapKv mapKv,
-    prim1     _maps_elems           Maps.elems             [_kOrd, _v]                  mapKv (list v_),
-    prim0     _maps_empty           Maps.empty             [_kOrd, _v]                  mapKv,
-    prim2     _maps_filter          Maps.filter            [_v, _kOrd]                  (fun v_ boolean) mapKv mapKv,
-    prim2     _maps_filterWithKey   Maps.filterWithKey     [_kOrd, _v]                  (fun k_ (fun v_ boolean)) mapKv mapKv,
-    prim3     _maps_findWithDefault Maps.findWithDefault   [_v, _kOrd]                  v_ k_ mapKv v_,
-    prim1     _maps_fromList        Maps.fromList          [_kOrd, _v]                  (list $ pair k_ v_) mapKv,
-    prim3     _maps_insert          Maps.insert            [_kOrd, _v]                  k_ v_ mapKv mapKv,
-    prim1     _maps_keys            Maps.keys              [_kOrd, _v]                  mapKv (list k_),
-    prim2     _maps_lookup          Maps.lookup            [_kOrd, _v]                  k_ mapKv (optional v_),
-    prim2     _maps_map             Maps.map               [_v1, _v2, _kOrd]            (fun v1_ v2_) (Prims.map k_ v1_) (Prims.map k_ v2_),
-    prim2     _maps_mapKeys         Maps.mapKeys           [_k1Ord, _k2Ord, _v]         (fun k1_ k2_) (Prims.map k1_ v_) (Prims.map k2_ v_),
-    prim2     _maps_member          Maps.member            [_kOrd, _v]                  k_ mapKv boolean,
-    prim1     _maps_null            Maps.null              [_kOrd, _v]                  mapKv boolean,
-    prim2     _maps_singleton       Maps.singleton         [_kOrd, _v]                  k_ v_ mapKv,
-    prim1     _maps_size            Maps.size              [_kOrd, _v]                  mapKv int32,
-    prim1     _maps_toList          Maps.toList            [_kOrd, _v]                  mapKv (list $ pair k_ v_),
-    prim2     _maps_union           Maps.union             [_kOrd, _v]                  mapKv mapKv mapKv]
-  where
-    mapKv = Prims.map k_ v_
-
-hydraLibMathFloat64 :: Library
-hydraLibMathFloat64 = standardLibrary _hydra_lib_math [
-  prim1 _math_acos     Math.acos     [] float64 float64,
-  prim1 _math_acosh    Math.acosh    [] float64 float64,
-  prim2 _math_addFloat64 Math.addFloat64 [] float64 float64 float64,
-  prim1 _math_asin     Math.asin     [] float64 float64,
-  prim1 _math_asinh    Math.asinh    [] float64 float64,
-  prim1 _math_atan     Math.atan     [] float64 float64,
-  prim2 _math_atan2    Math.atan2    [] float64 float64 float64,
-  prim1 _math_atanh    Math.atanh    [] float64 float64,
-  prim1 _math_ceiling  Math.ceiling  [] float64 float64,
-  prim1 _math_cos      Math.cos      [] float64 float64,
-  prim1 _math_cosh     Math.cosh     [] float64 float64,
-  prim0 _math_e        Math.e        [] float64,
-  prim1 _math_exp      Math.exp      [] float64 float64,
-  prim1 _math_floor    Math.floor    [] float64 float64,
-  prim1 _math_log      Math.log      [] float64 float64,
-  prim2 _math_logBase  Math.logBase  [] float64 float64 float64,
-  prim2 _math_mulFloat64 Math.mulFloat64 [] float64 float64 float64,
-  prim1 _math_negateFloat64 Math.negateFloat64 [] float64 float64,
-  prim0 _math_pi       Math.pi       [] float64,
-  prim2 _math_pow      Math.pow      [] float64 float64 float64,
-  prim1 _math_round         Math.round         [] float64 float64,
-  prim2 _math_roundBigfloat Math.roundBigfloat [] int32 bigfloat bigfloat,
-  prim2 _math_roundFloat32  Math.roundFloat32  [] int32 float32 float32,
-  prim2 _math_roundFloat64  Math.roundFloat64  [] int32 float64 float64,
-  prim1 _math_sin            Math.sin           [] float64 float64,
-  prim1 _math_sinh     Math.sinh     [] float64 float64,
-  prim1 _math_sqrt     Math.sqrt     [] float64 float64,
-  prim2 _math_subFloat64 Math.subFloat64 [] float64 float64 float64,
-  prim1 _math_tan      Math.tan      [] float64 float64,
-  prim1 _math_tanh     Math.tanh     [] float64 float64,
-  prim1 _math_truncate Math.truncate [] float64 float64]
-
-hydraLibMathInt32 :: Library
-hydraLibMathInt32 = standardLibrary _hydra_lib_math [
-  prim1 _math_abs    Math.abs    [] int32 int32,
-  prim2 _math_add    Math.add    [] int32 int32 int32,
-  prim1 _math_even   Math.even   [] int32 boolean,
-  prim2 _math_max    Math.max    [] int32 int32 int32,
-  prim2 _math_maybeDiv Math.maybeDiv [] int32 int32 (optional int32),
-  prim2 _math_min    Math.min    [] int32 int32 int32,
-  prim2 _math_maybeMod Math.maybeMod [] int32 int32 (optional int32),
-  prim2 _math_mul    Math.mul    [] int32 int32 int32,
-  prim1 _math_negate Math.negate [] int32 int32,
-  prim1 _math_odd    Math.odd    [] int32 boolean,
-  prim1 _math_maybePred Math.maybePred [] int32 (optional int32),
-  prim2 _math_range  Math.range  [] int32 int32 (list int32),
-  prim2 _math_maybeRem Math.maybeRem [] int32 int32 (optional int32),
-  prim1 _math_signum Math.signum [] int32 int32,
-  prim2 _math_sub    Math.sub    [] int32 int32 int32,
-  prim1 _math_maybeSucc Math.maybeSucc [] int32 (optional int32)]
-
-hydraLibMaybes :: Library
-hydraLibMaybes = standardLibrary _hydra_lib_maybes [
-    prim2     _maybes_apply     Maybes.apply        [_x, _y]     (optional $ fun x_ y_) (optional x_) (optional y_),
-    prim2     _maybes_bind      Maybes.bind         [_x, _y]     (optional x_) (fun x_ (optional y_)) (optional y_),
-    prim3     _maybes_cases     Maybes.cases        [_x, _y]     (optional x_) y_ (fun x_ y_) y_,
-    prim1     _maybes_cat       Maybes.cat          [_x]         (list $ optional x_) (list x_),
-    prim3     _maybes_compose   Maybes.compose      [_x, _y, _z] (fun x_ $ optional y_) (fun y_ $ optional z_) x_ (optional z_),
-    prim2     _maybes_fromMaybe Maybes.fromMaybe    [_x]         x_ (optional x_) x_,
-    prim1     _maybes_isJust    Maybes.isJust       [_x]         (optional x_) boolean,
-    prim1     _maybes_isNothing Maybes.isNothing    [_x]         (optional x_) boolean,
-    prim2     _maybes_map       Maybes.map          [_x, _y]     (fun x_ y_) (optional x_) (optional y_),
-    prim2     _maybes_mapMaybe  Maybes.mapMaybe     [_x, _y]     (fun x_ $ optional y_) (list x_) (list y_),
-    prim3     _maybes_maybe     Maybes.maybe        [_y, _x]     y_ (fun x_ y_) (optional x_) y_,
-    prim1     _maybes_pure      Maybes.pure         [_x]         x_ (optional x_),
-    prim1     _maybes_toList    Maybes.toList       [_x]         (optional x_) (list x_)]
-
-hydraLibPairs :: Library
-hydraLibPairs = standardLibrary _hydra_lib_pairs [
-    prim3     _pairs_bimap  Pairs.bimap      [_a, _b, _c, _d] (fun a_ c_) (fun b_ d_) (pair a_ b_) (pair c_ d_),
-    prim1     _pairs_first  Pairs.first      [_a, _b]         (pair a_ b_) a_,
-    prim1     _pairs_second Pairs.second     [_a, _b]         (pair a_ b_) b_]
-
-hydraLibSets :: Library
-hydraLibSets = standardLibrary _hydra_lib_sets [
-    prim2     _sets_delete       Sets.delete       [_xOrd]        x_ (set x_) (set x_),
-    prim2     _sets_difference   Sets.difference   [_xOrd]        (set x_) (set x_) (set x_),
-    prim0     _sets_empty        Sets.empty        [_xOrd]        (set x_),
-    prim1     _sets_fromList     Sets.fromList     [_xOrd]        (list x_) (set x_),
-    prim2     _sets_insert       Sets.insert       [_xOrd]        x_ (set x_) (set x_),
-    prim2     _sets_intersection Sets.intersection [_xOrd]        (set x_) (set x_) (set x_),
-    prim2     _sets_map          Sets.map          [_xOrd, _yOrd] (fun x_ y_) (set x_) (set y_),
-    prim2     _sets_member       Sets.member       [_xOrd]        x_ (set x_) boolean,
-    prim1     _sets_null         Sets.null         [_xOrd]        (set x_) boolean,
-    prim1     _sets_singleton    Sets.singleton    [_xOrd]        x_ (set x_),
-    prim1     _sets_size         Sets.size         [_xOrd]        (set x_) int32,
-    prim1     _sets_toList       Sets.toList       [_xOrd]        (set x_) (list x_),
-    prim2     _sets_union        Sets.union        [_xOrd]        (set x_) (set x_) (set x_),
-    prim1     _sets_unions       Sets.unions       [_xOrd]        (list $ set x_) (set x_)]
-
-hydraLibRegex :: Library
-hydraLibRegex = standardLibrary _hydra_lib_regex [
-  prim2 _regex_find       Regex.find       [] string string (optional string),
-  prim2 _regex_findAll    Regex.findAll    [] string string (list string),
-  prim2 _regex_matches    Regex.matches    [] string string boolean,
-  prim3 _regex_replace    Regex.replace    [] string string string string,
-  prim3 _regex_replaceAll Regex.replaceAll [] string string string string,
-  prim2 _regex_split      Regex.split      [] string string (list string)]
-
-hydraLibStrings :: Library
-hydraLibStrings = standardLibrary _hydra_lib_strings [
-  prim1 _strings_cat         Strings.cat         [] (list string) string,
-  prim2 _strings_cat2        Strings.cat2        [] string string string,
-  prim1 _strings_fromList    Strings.fromList    [] (list int32) string,
-  prim2 _strings_intercalate Strings.intercalate [] string (list string) string,
-  prim1 _strings_length      Strings.length      [] string int32,
-  prim1 _strings_lines       Strings.lines       [] string (list string),
-  prim2 _strings_maybeCharAt Strings.maybeCharAt [] int32 string (optional int32),
-  prim1 _strings_null        Strings.null        [] string boolean,
-  prim2 _strings_splitOn     Strings.splitOn     [] string string (list string),
-  prim1 _strings_toList      Strings.toList      [] string (list int32),
-  prim1 _strings_toLower     Strings.toLower     [] string string,
-  prim1 _strings_toUpper     Strings.toUpper     [] string string,
-  prim1 _strings_unlines     Strings.unlines     [] (list string) string]
diff --git a/src/main/haskell/Hydra/Sources/Lisp/Coder.hs b/src/main/haskell/Hydra/Sources/Lisp/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Lisp/Coder.hs
+++ /dev/null
@@ -1,1075 +0,0 @@
--- | Lisp code generator in Hydra DSL.
--- This module provides DSL versions of Lisp code generation functions.
--- Type definitions are mapped to record/struct definitions and tagged unions;
--- term definitions are mapped to function definitions and variable bindings.
--- The coder produces a dialect-neutral Lisp AST; per-dialect serializers render
--- the concrete syntax for Clojure, Emacs Lisp, Common Lisp, or Scheme.
-
-module Hydra.Sources.Lisp.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Coders                          as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                           as Error
-import qualified Hydra.Dsl.Packaging                          as Packaging
-import qualified Hydra.Dsl.Util                            as Util
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Analysis      as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports for Lisp AST
-import qualified Hydra.Lisp.Syntax as L
-import qualified Hydra.Sources.Lisp.Syntax as LispSyntax
-import qualified Hydra.Sources.Lisp.Language as LispLanguageSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.lisp.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [moduleNamespace LispLanguageSource.module_,
-      Formatting.ns, Names.ns, Strip.ns, Variables.ns, Analysis.ns, Environment.ns, Predicates.ns, Sorting.ns, Lexical.ns],
-            moduleTypeDependencies = (LispSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Lisp code generator: converts Hydra type and term modules to Lisp AST"}
-  where
-    definitions = [
-      toDefinition Environment.reorderDefs,
-      toDefinition dialectCadr,
-      toDefinition dialectCar,
-      toDefinition dialectConstructorPrefix,
-      toDefinition dialectEqual,
-      toDefinition dialectSupportsLetrec,
-      toDefinition encodeApplication,
-      toDefinition encodeFieldDef,
-      toDefinition encodeLambdaTerm,
-      toDefinition encodeLetAsLambdaApp,
-      toDefinition encodeLetAsNative,
-      toDefinition encodeLiteral,
-      toDefinition encodeProjectionElim,
-      toDefinition encodeTerm,
-      toDefinition encodeTermDefinition,
-      toDefinition encodeType,
-      toDefinition encodeTypeBody,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeUnionElim,
-      toDefinition encodeUnwrapElim,
-      toDefinition isCasesPrimitive,
-      toDefinition isLazy2ArgPrimitive,
-      toDefinition isLazy3ArgPrimitive,
-      toDefinition isPrimitiveRef,
-      toDefinition lispApp,
-      toDefinition lispKeyword,
-      toDefinition lispLambdaExpr,
-      toDefinition lispListExpr,
-      toDefinition lispLitExpr,
-      toDefinition lispNamedLambdaExpr,
-      toDefinition lispNilExpr,
-      toDefinition lispSymbol,
-      toDefinition lispTopForm,
-      toDefinition lispTopFormWithComments,
-      toDefinition lispVar,
-      toDefinition moduleExports,
-      toDefinition moduleImports,
-      toDefinition moduleToLisp,
-      toDefinition qualifiedSnakeName,
-      toDefinition qualifiedTypeName,
-      toDefinition wrapInThunk]
-
-
--- | Dialect-aware name for "cadr" (second element of a list)
--- Clojure: "second", others: "cadr"
-dialectCadr :: TTermDefinition (L.Dialect -> String)
-dialectCadr = def "dialectCadr" $
-  lambda "d" $ cases L._Dialect (var "d") (Just $ string "cadr") [
-    L._Dialect_clojure>>: constant $ string "second"]
-
--- | Dialect-aware name for "car" (first element of a list)
--- Clojure: "first", others: "car"
-dialectCar :: TTermDefinition (L.Dialect -> String)
-dialectCar = def "dialectCar" $
-  lambda "d" $ cases L._Dialect (var "d") (Just $ string "car") [
-    L._Dialect_clojure>>: constant $ string "first"]
-
--- | Dialect-aware constructor prefix for record types
--- Clojure: "->", others: "make-"
-dialectConstructorPrefix :: TTermDefinition (L.Dialect -> String)
-dialectConstructorPrefix = def "dialectConstructorPrefix" $
-  lambda "d" $ cases L._Dialect (var "d") (Just $ string "make-") [
-    L._Dialect_clojure>>: constant $ string "->"]
-
--- | Dialect-aware name for "equal?" (equality test)
--- Clojure: "=", Common Lisp/Emacs Lisp: "equal", Scheme: "equal?"
-dialectEqual :: TTermDefinition (L.Dialect -> String)
-dialectEqual = def "dialectEqual" $
-  lambda "d" $ cases L._Dialect (var "d") (Just $ string "equal?") [
-    L._Dialect_clojure>>: constant $ string "=",
-    L._Dialect_commonLisp>>: constant $ string "equal",
-    L._Dialect_emacsLisp>>: constant $ string "equal"]
-
--- | Whether a dialect provides a native letrec (mutually recursive let).
--- Clojure has only sequential let, requiring the coder to topologically sort
--- bindings and emit letfn for cyclic groups.
-dialectSupportsLetrec :: TTermDefinition (L.Dialect -> Bool)
-dialectSupportsLetrec = def "dialectSupportsLetrec" $
-  lambda "d" $ cases L._Dialect (var "d") (Just $ boolean True) [
-    L._Dialect_clojure>>: constant $ boolean False]
-
--- | Encode a function application, detecting ifElse and other lazy primitives.
--- Transforms (((hydra.lib.logic.ifElse C) T) E) into native (if C T E).
--- For other lazy primitives, wraps the appropriate argument in a thunk.
-encodeApplication :: TTermDefinition (L.Dialect -> Context -> Graph -> Term -> Term -> Either Error L.Expression)
-encodeApplication = def "encodeApplication" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "rawFun" $ lambda "rawArg" $
-    "dFun" <~ (Strip.deannotateTerm @@ var "rawFun") $
-    -- Helper: encode a normal (non-special) application
-    "normal" <~
-      ("fun" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "rawFun") $
-      "arg" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "rawArg") $
-        right (lispApp @@ var "fun" @@ list [var "arg"])) $
-    -- Helper: encode a term
-    "enc" <~ (lambda "t" $ encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "t") $
-    cases _Term (var "dFun") (Just $ var "normal")
-    [_Term_application>>: lambda "app2" $
-       "midFun" <~ Core.applicationFunction (var "app2") $
-       "midArg" <~ Core.applicationArgument (var "app2") $
-       "dMidFun" <~ (Strip.deannotateTerm @@ var "midFun") $
-       -- 2-deep: dFun = App(midFun, midArg), applied to rawArg
-       -- Check if midFun is a 2-arg lazy primitive
-       "isLazy2" <~ Logic.or (isPrimitiveRef @@ string "hydra.lib.eithers.fromLeft" @@ var "dMidFun")
-                      (Logic.or (isPrimitiveRef @@ string "hydra.lib.eithers.fromRight" @@ var "dMidFun")
-                                (isPrimitiveRef @@ string "hydra.lib.maybes.fromMaybe" @@ var "dMidFun")) $
-       Logic.ifElse (var "isLazy2")
-         -- 2-arg lazy primitive: ((prim defVal) arg2) — wrap defVal in thunk
-         ("ePrim" <<~ (var "enc" @@ var "midFun") $
-         "eDef" <<~ (var "enc" @@ var "midArg") $
-         "eArg" <<~ (var "enc" @@ var "rawArg") $
-           right (lispApp @@ (lispApp @@ var "ePrim" @@ list [wrapInThunk @@ var "eDef"])
-                          @@ list [var "eArg"]))
-         -- Not a 2-arg lazy primitive — check for 3-deep patterns
-         (cases _Term (var "dMidFun") (Just $ var "normal")
-         [_Term_application>>: lambda "app3" $
-            "innerFun" <~ Core.applicationFunction (var "app3") $
-            "innerArg" <~ Core.applicationArgument (var "app3") $
-            "dInnerFun" <~ (Strip.deannotateTerm @@ var "innerFun") $
-            -- 3-deep: ifElse, maybe, or cases
-            Logic.ifElse (isPrimitiveRef @@ string "hydra.lib.logic.ifElse" @@ var "dInnerFun")
-              -- ifElse: (((ifElse C) T) E) -> native (if C T E)
-              ("eC" <<~ (var "enc" @@ var "innerArg") $
-              "eT" <<~ (var "enc" @@ var "midArg") $
-              "eE" <<~ (var "enc" @@ var "rawArg") $
-                right (inject L._Expression L._Expression_if $
-                  record L._IfExpression [
-                    L._IfExpression_condition>>: var "eC",
-                    L._IfExpression_then>>: var "eT",
-                    L._IfExpression_else>>: just (var "eE")]))
-              (Logic.ifElse (isPrimitiveRef @@ string "hydra.lib.maybes.maybe" @@ var "dInnerFun")
-                -- maybe: (((maybe defVal) f) m) — wrap defVal in thunk
-                ("eP" <<~ (var "enc" @@ var "innerFun") $
-                "eDef" <<~ (var "enc" @@ var "innerArg") $
-                "eF" <<~ (var "enc" @@ var "midArg") $
-                "eM" <<~ (var "enc" @@ var "rawArg") $
-                  right (lispApp @@ (lispApp @@ (lispApp @@ var "eP" @@ list [wrapInThunk @@ var "eDef"])
-                                             @@ list [var "eF"])
-                                 @@ list [var "eM"]))
-                (Logic.ifElse (isPrimitiveRef @@ string "hydra.lib.maybes.cases" @@ var "dInnerFun")
-                  -- cases: (((cases m) nothingVal) justFn) — wrap nothingVal in thunk
-                  ("eP" <<~ (var "enc" @@ var "innerFun") $
-                  "eM" <<~ (var "enc" @@ var "innerArg") $
-                  "eN" <<~ (var "enc" @@ var "midArg") $
-                  "eJ" <<~ (var "enc" @@ var "rawArg") $
-                    right (lispApp @@ (lispApp @@ (lispApp @@ var "eP" @@ list [var "eM"])
-                                               @@ list [wrapInThunk @@ var "eN"])
-                                   @@ list [var "eJ"]))
-                  -- Not a special primitive — encode normally
-                  (var "normal")))])]
-
--- | Encode a Hydra field type as a Lisp field definition
-encodeFieldDef :: TTermDefinition (FieldType -> L.FieldDefinition)
-encodeFieldDef = def "encodeFieldDef" $
-  lambda "ft" $
-    "fname" <~ Core.unName (Core.fieldTypeName (var "ft")) $
-      record L._FieldDefinition [
-        L._FieldDefinition_name>>: wrap L._Symbol (Formatting.convertCaseCamelToLowerSnake @@ var "fname"),
-        L._FieldDefinition_defaultValue>>: nothing]
-
--- | Encode a Hydra lambda as a Lisp expression
-encodeLambdaTerm :: TTermDefinition (L.Dialect -> Context -> Graph -> Lambda -> Either Error L.Expression)
-encodeLambdaTerm = def "encodeLambdaTerm" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "lam" $
-    "param" <~ (Formatting.convertCaseCamelOrUnderscoreToLowerSnake @@ (Formatting.sanitizeWithUnderscores @@ LispLanguageSource.lispReservedWords @@ Core.unName (Core.lambdaParameter (var "lam")))) $
-    "body" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.lambdaBody (var "lam")) $
-      right (lispLambdaExpr @@ list [var "param"] @@ var "body")
-
--- | Encode let bindings as nested ((lambda (x) body) init) applications.
--- Used for self-referential non-lambda bindings (Y-combinator fixpoint pattern)
--- so that the loader's fix-letrec can transform them into proper letrec with thunking.
-encodeLetAsLambdaApp :: TTermDefinition (L.Dialect -> Context -> Graph -> [Binding] -> Term -> Either Error L.Expression)
-encodeLetAsLambdaApp = def "encodeLetAsLambdaApp" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "bindings" $ lambda "body" $
-    "bodyExpr" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "body") $
-    Eithers.foldl
-      (lambda "acc" $ lambda "b" $
-        "bname" <~ (Formatting.convertCaseCamelOrUnderscoreToLowerSnake @@ (Formatting.sanitizeWithUnderscores @@ LispLanguageSource.lispReservedWords @@ Core.unName (Core.bindingName (var "b")))) $
-        "bval" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.bindingTerm (var "b")) $
-          right (lispApp @@ (lispLambdaExpr @@ list [var "bname"] @@ var "acc") @@ list [var "bval"]))
-      (var "bodyExpr")
-      (Lists.reverse (var "bindings"))
-
--- | Encode let bindings as native let/let*/letrec expressions.
--- Self-referential bindings -> letrec (with eta-expansion for non-lambda self-refs)
--- Single non-self-ref binding -> let
--- Multiple non-self-ref bindings -> let* (sequential)
-encodeLetAsNative :: TTermDefinition (L.Dialect -> Context -> Graph -> [Binding] -> Term -> Either Error L.Expression)
-encodeLetAsNative = def "encodeLetAsNative" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "bindings" $ lambda "body" $
-    "bodyExpr" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "body") $
-    -- Topologically sort bindings into strongly-connected components. Singleton
-    -- SCCs flow through in dependency order (so non-cyclic forward references
-    -- become valid sequential bindings), and any cycle (SCC of size > 1) marks
-    -- the let as recursive: Clojure emits letfn, the other dialects emit letrec
-    -- (which the loader transforms into the dialect's native rec form).
-    "supportsLetrec" <~ (dialectSupportsLetrec @@ var "dialect") $
-    "allNames" <~ Sets.fromList (Lists.map (lambda "b" $ Core.bindingName (var "b")) (var "bindings")) $
-    "adjList" <~ Lists.map (lambda "b" $
-      pair (Core.bindingName (var "b"))
-        (Sets.toList (Sets.intersection (var "allNames")
-          (Variables.freeVariablesInTerm @@ Core.bindingTerm (var "b")))))
-      (var "bindings") $
-    "sccs" <~ (Sorting.topologicalSortComponents @@ var "adjList") $
-    "nameToBinding" <~ Maps.fromList
-      (Lists.map (lambda "b" $ pair (Core.bindingName (var "b")) (var "b")) (var "bindings")) $
-    "sortedBindings" <~ Maybes.cat (Lists.map (lambda "name" $ Maps.lookup (var "name") (var "nameToBinding"))
-      (Lists.concat (var "sccs"))) $
-    -- A cycle is any SCC of size greater than one.
-    "hasCycle" <~ (Lists.foldl (lambda "acc" $ lambda "scc" $
-      Logic.or (var "acc") (Equality.gt (Lists.length (var "scc")) (int32 1)))
-      (boolean False)
-      (var "sccs")) $
-    -- Encode each binding, eta-expanding self-referential non-lambda bindings
-    -- so that letrec doesn't evaluate the self-reference during initialization.
-    -- E.g., `recurse = f(fsub(recurse))` becomes `recurse = (lambda (_arg) ((f (fsub recurse)) _arg))`
-    "encodedBindings" <<~ (Eithers.mapList
-      (lambda "b" $
-        "bname" <~ (Formatting.convertCaseCamelOrUnderscoreToLowerSnake @@ (Formatting.sanitizeWithUnderscores @@ LispLanguageSource.lispReservedWords @@ Core.unName (Core.bindingName (var "b")))) $
-        "isSelfRef" <~ (Sets.member (Core.bindingName (var "b"))
-          (Variables.freeVariablesInTerm @@ Core.bindingTerm (var "b"))) $
-        "isLambda" <~ (cases _Term (Strip.deannotateTerm @@ Core.bindingTerm (var "b"))
-          (Just $ boolean False)
-          [_Term_lambda>>: constant (boolean True)]) $
-        "bval" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.bindingTerm (var "b")) $
-        -- Handle self-referential bindings:
-        -- For Clojure: use named fn for self-reference (both lambda and eta-expanded)
-        -- For others: use letrec (eta-expand non-lambda self-refs for letrec compat)
-        "isClojure" <~ (Logic.not (var "supportsLetrec")) $
-        "wrappedVal" <~ (Logic.ifElse (var "isClojure")
-          -- Clojure path: use named fn for all self-referential bindings
-          (Logic.ifElse (var "isSelfRef")
-            (Logic.ifElse (var "isLambda")
-              -- Lambda: add name to the lambda for (fn name [...] ...)
-              (cases L._Expression (var "bval") (Just $ var "bval") [
-                L._Expression_lambda>>: lambda "lam" $
-                  inject L._Expression L._Expression_lambda $
-                    record L._Lambda [
-                      L._Lambda_name>>: just (wrap L._Symbol (var "bname")),
-                      L._Lambda_params>>: project L._Lambda L._Lambda_params @@ var "lam",
-                      L._Lambda_restParam>>: project L._Lambda L._Lambda_restParam @@ var "lam",
-                      L._Lambda_body>>: project L._Lambda L._Lambda_body @@ var "lam"]])
-              -- Non-lambda self-ref: eta-expand with named fn
-              (lispNamedLambdaExpr @@ var "bname" @@ list [string "_arg"] @@
-                (lispApp @@ var "bval" @@ list [lispVar @@ string "_arg"])))
-            (var "bval"))
-          -- Non-Clojure path: eta-expand non-lambda self-refs for letrec
-          (Logic.ifElse (Logic.and (var "isSelfRef") (Logic.not (var "isLambda")))
-            (lispLambdaExpr @@ list [string "_arg"] @@
-              (lispApp @@ var "bval" @@ list [lispVar @@ string "_arg"]))
-            (var "bval"))) $
-          right (pair (var "bname") (var "wrappedVal")))
-      (var "sortedBindings")) $
-    -- A self-referential singleton SCC has size 1 (with a self-loop) and is
-    -- not caught by hasCycle, so detect self-references separately. The let
-    -- is recursive whenever any binding self-references or any SCC is a cycle.
-    "hasSelfRef" <~ (Lists.foldl
-      (lambda "acc" $ lambda "b" $
-        Logic.or (var "acc")
-          (Sets.member (Core.bindingName (var "b"))
-            (Variables.freeVariablesInTerm @@ Core.bindingTerm (var "b"))))
-      (boolean False)
-      (var "bindings")) $
-    "isRecursive" <~ (Logic.or (var "hasSelfRef") (var "hasCycle")) $
-    "letKind" <~ (Logic.ifElse (var "isRecursive")
-      (inject L._LetKind L._LetKind_recursive unit)
-      (Logic.ifElse (Equality.lte (Lists.length (var "bindings")) (int32 1))
-        (inject L._LetKind L._LetKind_parallel unit)
-        (inject L._LetKind L._LetKind_sequential unit))) $
-    "lispBindings" <~ (Lists.map
-      (lambda "eb" $
-        inject L._LetBinding L._LetBinding_simple $
-          record L._SimpleBinding [
-            L._SimpleBinding_name>>: wrap L._Symbol (Pairs.first (var "eb")),
-            L._SimpleBinding_value>>: Pairs.second (var "eb")])
-      (var "encodedBindings")) $
-      right (inject L._Expression L._Expression_let $
-        record L._LetExpression [
-          L._LetExpression_kind>>: var "letKind",
-          L._LetExpression_bindings>>: var "lispBindings",
-          L._LetExpression_body>>: list [var "bodyExpr"]])
-
--- | Encode a Hydra literal as a Lisp expression
-encodeLiteral :: TTermDefinition (Literal -> L.Expression)
-encodeLiteral = def "encodeLiteral" $
-  lambda "lit" $ cases _Literal (var "lit") Nothing [
-    _Literal_boolean>>: lambda "b" $
-      inject L._Expression L._Expression_literal $
-        inject L._Literal L._Literal_boolean (var "b"),
-    _Literal_decimal>>: lambda "d" $
-      -- Lisp dialects have no native decimal; this case is only hit if adaptation
-      -- is skipped. Fall back to emitting the decimal as a float literal.
-      inject L._Expression L._Expression_literal $
-        inject L._Literal L._Literal_float $
-          record L._FloatLiteral [
-            L._FloatLiteral_value>>: Literals.float64ToBigfloat (Literals.decimalToFloat64 (var "d")),
-            L._FloatLiteral_precision>>: nothing],
-    _Literal_string>>: lambda "s" $
-      inject L._Expression L._Expression_literal $
-        inject L._Literal L._Literal_string (var "s"),
-    _Literal_float>>: lambda "fv" $
-      cases _FloatValue (var "fv") Nothing [
-        _FloatValue_float32>>: lambda "f" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_float $
-              record L._FloatLiteral [
-                L._FloatLiteral_value>>: Literals.float32ToBigfloat (var "f"),
-                L._FloatLiteral_precision>>: nothing],
-        _FloatValue_float64>>: lambda "f" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_float $
-              record L._FloatLiteral [
-                L._FloatLiteral_value>>: Literals.float64ToBigfloat (var "f"),
-                L._FloatLiteral_precision>>: nothing],
-        _FloatValue_bigfloat>>: lambda "f" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_float $
-              record L._FloatLiteral [
-                L._FloatLiteral_value>>: var "f",
-                L._FloatLiteral_precision>>: nothing]],
-    _Literal_integer>>: lambda "iv" $
-      cases _IntegerValue (var "iv") Nothing [
-        _IntegerValue_int8>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.int8ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_int16>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.int16ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_int32>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.int32ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_int64>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.int64ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_uint8>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.uint8ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_uint16>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.uint16ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_uint32>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.uint32ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_uint64>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: Literals.uint64ToBigint (var "i"),
-                L._IntegerLiteral_bigint>>: boolean False],
-        _IntegerValue_bigint>>: lambda "i" $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_integer $
-              record L._IntegerLiteral [
-                L._IntegerLiteral_value>>: var "i",
-                L._IntegerLiteral_bigint>>: boolean True]],
-    _Literal_binary>>: lambda "b" $
-      -- Encode binary as a vector of byte values
-      "byteValues" <~ Literals.binaryToBytes (var "b") $
-      inject L._Expression L._Expression_vector $
-        record L._VectorLiteral [
-          L._VectorLiteral_elements>>:
-            Lists.map (lambda "bv" $
-              inject L._Expression L._Expression_literal $
-                inject L._Literal L._Literal_integer $
-                  record L._IntegerLiteral [
-                    L._IntegerLiteral_value>>: Literals.int32ToBigint (var "bv"),
-                    L._IntegerLiteral_bigint>>: boolean False])
-              (var "byteValues")]]
-
--- | Encode a Hydra record projection as a Lisp expression.
--- Takes an optional argument for applied projections.
-encodeProjectionElim :: TTermDefinition (L.Dialect -> Context -> Graph -> Projection -> Maybe Term -> Either Error L.Expression)
-encodeProjectionElim = def "encodeProjectionElim" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "proj" $ lambda "marg" $
-      -- Record projection: (:field record) or (record-type-field record)
-        "fname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.projectionField (var "proj"))) $
-        "tname" <~ (qualifiedSnakeName @@ Core.projectionTypeName (var "proj")) $
-        Maybes.cases (var "marg")
-          -- Unapplied: (lambda (v) (record-type-field v))
-          (right (lispLambdaExpr @@ list [string "v"] @@
-            (inject L._Expression L._Expression_fieldAccess $
-              record L._FieldAccess [
-                L._FieldAccess_recordType>>: wrap L._Symbol (var "tname"),
-                L._FieldAccess_field>>: wrap L._Symbol (var "fname"),
-                L._FieldAccess_target>>: lispVar @@ string "v"])))
-          (lambda "arg" $
-            "sarg" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "arg") $
-              right (inject L._Expression L._Expression_fieldAccess $
-                record L._FieldAccess [
-                  L._FieldAccess_recordType>>: wrap L._Symbol (var "tname"),
-                  L._FieldAccess_field>>: wrap L._Symbol (var "fname"),
-                  L._FieldAccess_target>>: var "sarg"]))
-
--- | Encode a Hydra term as a Lisp expression
-encodeTerm :: TTermDefinition (L.Dialect -> Context -> Graph -> Term -> Either Error L.Expression)
-encodeTerm = def "encodeTerm" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "term" $
-    cases _Term (var "term") Nothing
-    [_Term_annotated>>: lambda "at" $
-       encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.annotatedTermBody (var "at"),
-
-     _Term_application>>: lambda "app" $
-       -- Check if this is a fully-applied ifElse: (((ifElse C) T) E) -> (if C T E)
-       "rawFun" <~ Core.applicationFunction (var "app") $
-       "rawArg" <~ Core.applicationArgument (var "app") $
-       encodeApplication @@ var "dialect" @@ var "cx" @@ var "g" @@ var "rawFun" @@ var "rawArg",
-
-     _Term_either>>: lambda "e" $
-       Eithers.either_
-         (lambda "l" $
-           "sl" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "l") $
-             -- Left v -> (list :left v)
-             right (lispApp @@ (lispVar @@ string "list") @@ list [
-               lispKeyword @@ string "left",
-               var "sl"]))
-         (lambda "r" $
-           "sr" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "r") $
-             -- Right v -> (list :right v)
-             right (lispApp @@ (lispVar @@ string "list") @@ list [
-               lispKeyword @@ string "right",
-               var "sr"]))
-         (var "e"),
-
-     _Term_lambda>>: lambda "lam" $
-       encodeLambdaTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "lam",
-     _Term_project>>: lambda "proj" $
-       encodeProjectionElim @@ var "dialect" @@ var "cx" @@ var "g" @@ var "proj" @@ nothing,
-     _Term_cases>>: lambda "cs" $
-       encodeUnionElim @@ var "dialect" @@ var "cx" @@ var "g" @@ var "cs" @@ nothing,
-     _Term_unwrap>>: lambda "name" $
-       encodeUnwrapElim @@ var "dialect" @@ var "cx" @@ var "g" @@ var "name" @@ nothing,
-
-     _Term_let>>: lambda "lt" $
-       "bindings" <~ Core.letBindings (var "lt") $
-       "body" <~ Core.letBody (var "lt") $
-       encodeLetAsNative @@ var "dialect" @@ var "cx" @@ var "g" @@ var "bindings" @@ var "body",
-
-     _Term_list>>: lambda "els" $
-       "sels" <<~ (Eithers.mapList (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g") (var "els")) $
-         right (lispListExpr @@ var "sels"),
-
-     _Term_literal>>: lambda "lit" $
-       right (encodeLiteral @@ var "lit"),
-
-     _Term_map>>: lambda "m" $
-       "pairs" <<~ (Eithers.mapList
-         (lambda "entry" $
-           "k" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Pairs.first (var "entry")) $
-           "v" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Pairs.second (var "entry")) $
-             right (record L._MapEntry [
-               L._MapEntry_key>>: var "k",
-               L._MapEntry_value>>: var "v"]))
-         (Maps.toList (var "m"))) $
-         right (inject L._Expression L._Expression_map $
-           record L._MapLiteral [
-             L._MapLiteral_entries>>: var "pairs"]),
-
-     _Term_maybe>>: lambda "mt" $
-       Maybes.cases (var "mt")
-         -- Nothing -> (list :nothing)
-         (right (lispApp @@ (lispVar @@ string "list") @@ list [
-           lispKeyword @@ string "nothing"]))
-         -- Just val -> (list :just encodedVal)
-         (lambda "val" $
-           "sval" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "val") $
-             right (lispApp @@ (lispVar @@ string "list") @@ list [
-               lispKeyword @@ string "just",
-               var "sval"])),
-
-     _Term_pair>>: lambda "p" $
-       "f" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Pairs.first (var "p")) $
-       "s" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Pairs.second (var "p")) $
-         right (lispListExpr @@ list [var "f", var "s"]),
-
-     _Term_record>>: lambda "rec" $
-       "rname" <~ Core.recordTypeName (var "rec") $
-       "fields" <~ Core.recordFields (var "rec") $
-       "sfields" <<~ (Eithers.mapList
-         (lambda "f" $
-           encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.fieldTerm (var "f"))
-         (var "fields")) $
-       -- Dialect-aware constructor: (make-TypeName ...) or (->TypeName ...)
-       "constructorName" <~ Strings.cat2 (dialectConstructorPrefix @@ var "dialect") (qualifiedSnakeName @@ var "rname") $
-         right (lispApp @@ (lispVar @@ var "constructorName") @@ var "sfields"),
-
-     _Term_set>>: lambda "s" $
-       "sels" <<~ (Eithers.mapList (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g") (Sets.toList (var "s"))) $
-         right (inject L._Expression L._Expression_set $
-           record L._SetLiteral [
-             L._SetLiteral_elements>>: var "sels"]),
-
-     _Term_inject>>: lambda "inj" $
-       "tname" <~ (Names.localNameOf @@ Core.injectionTypeName (var "inj")) $
-       "field" <~ Core.injectionField (var "inj") $
-       "fname" <~ Core.unName (Core.fieldName (var "field")) $
-       "fterm" <~ Core.fieldTerm (var "field") $
-       "dterm" <~ (Strip.deannotateTerm @@ var "fterm") $
-       "isUnit" <~ (cases _Term (var "dterm") (Just $ boolean False) [
-         _Term_unit>>: constant $ boolean True,
-         _Term_record>>: lambda "rt" $ Lists.null (Core.recordFields (var "rt"))]) $
-       Logic.ifElse (var "isUnit")
-         -- Unit variant: (list :variantName '())
-         (right (lispApp @@ (lispVar @@ string "list") @@ list [
-           lispKeyword @@ (Formatting.convertCaseCamelToLowerSnake @@ var "fname"),
-           asTerm lispNilExpr]))
-         -- Non-unit variant: (list :variantName value)
-         ("sval" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "fterm") $
-           right (lispApp @@ (lispVar @@ string "list") @@ list [
-             lispKeyword @@ (Formatting.convertCaseCamelToLowerSnake @@ var "fname"),
-             var "sval"])),
-
-     _Term_unit>>: constant $
-       right (asTerm lispNilExpr),
-
-     _Term_variable>>: lambda "name" $
-       right (lispVar @@ (Formatting.convertCaseCamelOrUnderscoreToLowerSnake @@ (Formatting.sanitizeWithUnderscores @@ LispLanguageSource.lispReservedWords @@ Core.unName (var "name")))),
-
-     _Term_typeApplication>>: lambda "ta" $
-       encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.typeApplicationTermBody (var "ta"),
-
-     _Term_typeLambda>>: lambda "tl" $
-       encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.typeLambdaBody (var "tl"),
-
-     _Term_wrap>>: lambda "wt" $
-       encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ Core.wrappedTermBody (var "wt")]
-
--- | Encode a Hydra term definition as a Lisp top-level form
-encodeTermDefinition :: TTermDefinition (L.Dialect -> Context -> Graph -> TermDefinition -> Either Error L.TopLevelFormWithComments)
-encodeTermDefinition = def "encodeTermDefinition" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "tdef" $
-    "name" <~ Packaging.termDefinitionName (var "tdef") $
-    "term" <~ Packaging.termDefinitionTerm (var "tdef") $
-    "lname" <~ (qualifiedSnakeName @@ var "name") $
-    "dterm" <~ (Strip.deannotateTerm @@ var "term") $
-    -- Check if the term is a lambda (function) or a value
-    cases _Term (var "dterm") (Just $
-      -- Non-function: encode as a variable definition
-      "sterm" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "term") $
-        right (lispTopForm @@ (inject L._TopLevelForm L._TopLevelForm_variable $
-          record L._VariableDefinition [
-            L._VariableDefinition_name>>: wrap L._Symbol (var "lname"),
-            L._VariableDefinition_value>>: var "sterm",
-            L._VariableDefinition_doc>>: nothing])))
-    [_Term_lambda>>: lambda "lam" $
-       -- Encode as (def name (fn [param] body)) to avoid Clojure compile-time
-       -- symbol resolution issues with Y-combinator patterns in recursive bindings
-       "sterm" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "term") $
-         right (lispTopForm @@ (inject L._TopLevelForm L._TopLevelForm_variable $
-           record L._VariableDefinition [
-             L._VariableDefinition_name>>: wrap L._Symbol (var "lname"),
-             L._VariableDefinition_value>>: var "sterm",
-             L._VariableDefinition_doc>>: nothing]))]
-
--- | Encode a Hydra type as a Lisp type specifier (used for type annotations)
-encodeType :: TTermDefinition (Context -> Graph -> Type -> Either Error L.TypeSpecifier)
-encodeType = def "encodeType" $
-  "cx" ~> "g" ~> lambda "t" $
-    "typ" <~ (Strip.deannotateType @@ var "t") $
-    cases _Type (var "typ") (Just $
-      -- Default: named type referencing the Hydra type name
-      right (inject L._TypeSpecifier L._TypeSpecifier_named $
-        wrap L._Symbol (string "Any")))
-    [_Type_annotated>>: lambda "at" $
-       encodeType @@ var "cx" @@ var "g" @@ Core.annotatedTypeBody (var "at"),
-     _Type_application>>: lambda "at" $
-       encodeType @@ var "cx" @@ var "g" @@ Core.applicationTypeFunction (var "at"),
-     _Type_unit>>: constant $
-       right (inject L._TypeSpecifier L._TypeSpecifier_unit unit),
-     _Type_literal>>: lambda "lt" $
-       right (cases _LiteralType (var "lt") Nothing [
-         _LiteralType_binary>>: constant $
-           inject L._TypeSpecifier L._TypeSpecifier_named $ wrap L._Symbol (string "ByteArray"),
-         _LiteralType_boolean>>: constant $
-           inject L._TypeSpecifier L._TypeSpecifier_named $ wrap L._Symbol (string "Boolean"),
-         _LiteralType_decimal>>: constant $
-           inject L._TypeSpecifier L._TypeSpecifier_named $ wrap L._Symbol (string "Decimal"),
-         _LiteralType_float>>: constant $
-           inject L._TypeSpecifier L._TypeSpecifier_named $ wrap L._Symbol (string "Float"),
-         _LiteralType_integer>>: constant $
-           inject L._TypeSpecifier L._TypeSpecifier_named $ wrap L._Symbol (string "Integer"),
-         _LiteralType_string>>: constant $
-           inject L._TypeSpecifier L._TypeSpecifier_named $ wrap L._Symbol (string "String")]),
-     _Type_list>>: lambda "inner" $
-       Eithers.map (lambda "enc" $
-         inject L._TypeSpecifier L._TypeSpecifier_list (var "enc"))
-         (encodeType @@ var "cx" @@ var "g" @@ var "inner"),
-     _Type_set>>: lambda "inner" $
-       Eithers.map (lambda "enc" $
-         inject L._TypeSpecifier L._TypeSpecifier_set (var "enc"))
-         (encodeType @@ var "cx" @@ var "g" @@ var "inner"),
-     _Type_map>>: lambda "mt" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Map")),
-     _Type_maybe>>: lambda "inner" $
-       Eithers.map (lambda "enc" $
-         inject L._TypeSpecifier L._TypeSpecifier_maybe (var "enc"))
-         (encodeType @@ var "cx" @@ var "g" @@ var "inner"),
-     _Type_either>>: lambda "et" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Either")),
-     _Type_pair>>: lambda "pt" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Pair")),
-     _Type_function>>: lambda "ft" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Function")),
-     _Type_record>>: lambda "_" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Record")),
-     _Type_union>>: lambda "_" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Union")),
-     _Type_wrap>>: lambda "_" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (string "Wrapper")),
-     _Type_variable>>: lambda "name" $
-       right (inject L._TypeSpecifier L._TypeSpecifier_named $
-         wrap L._Symbol (Core.unName (var "name"))),
-     _Type_forall>>: lambda "fa" $
-       encodeType @@ var "cx" @@ var "g" @@ Core.forallTypeBody (var "fa")]
-
--- | Encode a type body (after stripping annotations and foralls) as a Lisp top-level form.
---   Recurses through forall to reach the underlying record/union/wrap.
-encodeTypeBody :: TTermDefinition (String -> Type -> Type -> Either Error L.TopLevelFormWithComments)
-encodeTypeBody = def "encodeTypeBody" $
-  lambda "lname" $ lambda "origTyp" $ lambda "typ" $
-    cases _Type (var "typ") (Just $
-      -- Default: emit a comment for types we can't yet represent
-      right (record L._TopLevelFormWithComments [
-        L._TopLevelFormWithComments_doc>>: nothing,
-        L._TopLevelFormWithComments_comment>>: just (record L._Comment [
-          L._Comment_style>>: inject L._CommentStyle L._CommentStyle_line unit,
-          L._Comment_text>>: Strings.cat2 (Strings.cat2 (var "lname") (string " = ")) (ShowCore.type_ @@ var "origTyp")]),
-        L._TopLevelFormWithComments_form>>: inject L._TopLevelForm L._TopLevelForm_expression $
-          inject L._Expression L._Expression_literal $
-            inject L._Literal L._Literal_nil unit]))
-    [_Type_forall>>: lambda "ft" $
-       -- Strip forall and recurse on the body
-       encodeTypeBody @@ var "lname" @@ var "origTyp" @@ Core.forallTypeBody (var "ft"),
-     _Type_record>>: lambda "rt" $
-       "fields" <~ (Lists.map encodeFieldDef (var "rt")) $
-         right (lispTopForm @@ (inject L._TopLevelForm L._TopLevelForm_recordType $
-           record L._RecordTypeDefinition [
-             L._RecordTypeDefinition_name>>: wrap L._Symbol (var "lname"),
-             L._RecordTypeDefinition_fields>>: var "fields",
-             L._RecordTypeDefinition_doc>>: nothing])),
-     _Type_union>>: lambda "rt" $
-       -- Unions become a comment + constructor functions
-       -- For now, generate a variable holding the list of variant names
-       "variantNames" <~ (Lists.map
-         (lambda "f" $
-           inject L._Expression L._Expression_literal $
-             inject L._Literal L._Literal_keyword $
-               record L._Keyword [
-                 L._Keyword_name>>: Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.fieldTypeName (var "f")),
-                 L._Keyword_namespace>>: nothing])
-         (var "rt")) $
-         right (lispTopForm @@ (inject L._TopLevelForm L._TopLevelForm_variable $
-           record L._VariableDefinition [
-             L._VariableDefinition_name>>: wrap L._Symbol (Strings.cat2 (var "lname") (string "-variants")),
-             L._VariableDefinition_value>>: lispListExpr @@ var "variantNames",
-             L._VariableDefinition_doc>>: just (wrap L._Docstring (Strings.cat2 (string "Variants of the ") (var "lname")))])),
-     _Type_wrap>>: lambda "wt" $
-       -- Newtypes become single-field records
-       right (lispTopForm @@ (inject L._TopLevelForm L._TopLevelForm_recordType $
-         record L._RecordTypeDefinition [
-           L._RecordTypeDefinition_name>>: wrap L._Symbol (var "lname"),
-           L._RecordTypeDefinition_fields>>: list [
-             record L._FieldDefinition [
-               L._FieldDefinition_name>>: wrap L._Symbol (string "value"),
-               L._FieldDefinition_defaultValue>>: nothing]],
-           L._RecordTypeDefinition_doc>>: nothing]))]
-
--- | Encode a Hydra type definition as a Lisp top-level form
-encodeTypeDefinition :: TTermDefinition (Context -> Graph -> TypeDefinition -> Either Error L.TopLevelFormWithComments)
-encodeTypeDefinition = def "encodeTypeDefinition" $
-  "cx" ~> "g" ~> lambda "tdef" $
-    "name" <~ Packaging.typeDefinitionName (var "tdef") $
-    "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "tdef")) $
-    "lname" <~ (qualifiedSnakeName @@ var "name") $
-    "dtyp" <~ (Strip.deannotateType @@ var "typ") $
-    encodeTypeBody @@ var "lname" @@ var "typ" @@ var "dtyp"
-
--- | Encode a Hydra case statement (union elimination) as a Lisp expression.
--- Takes an optional argument for applied case statements.
-encodeUnionElim :: TTermDefinition (L.Dialect -> Context -> Graph -> CaseStatement -> Maybe Term -> Either Error L.Expression)
-encodeUnionElim = def "encodeUnionElim" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "cs" $ lambda "marg" $
-      -- Union elimination: cond dispatch on tagged values
-        "tname" <~ (Names.localNameOf @@ Core.caseStatementTypeName (var "cs")) $
-        "caseFields" <~ Core.caseStatementCases (var "cs") $
-        "defCase" <~ Core.caseStatementDefault (var "cs") $
-        -- Build cond clauses from each case field
-        "clauses" <<~ (Eithers.mapList
-          (lambda "cf" $
-            "cfname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.fieldName (var "cf"))) $
-            "cfterm" <~ Core.fieldTerm (var "cf") $
-            -- Each case applies the handler to the value: ((handler) v)
-            -- Condition: (equal? (car __m) :variantName) or (= (first __m) :variantName)
-            "condExpr" <~ (lispApp @@ (lispVar @@ (dialectEqual @@ var "dialect")) @@ list [
-              lispApp @@ (lispVar @@ (dialectCar @@ var "dialect")) @@ list [lispVar @@ string "match_target"],
-              lispKeyword @@ var "cfname"]) $
-            -- Body: apply handler to (cadr __m)
-            "bodyExpr" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ (Core.termApplication (Core.application (var "cfterm") (Core.termVariable (wrap _Name (string "match_value")))))) $
-              right (record L._CondClause [
-                L._CondClause_condition>>: var "condExpr",
-                L._CondClause_body>>: var "bodyExpr"]))
-          (var "caseFields")) $
-        -- Default clause
-        -- Default is a direct result value, NOT a handler function.
-        -- The reducer returns the default as-is without applying it to the payload.
-        "defExpr" <<~ (Maybes.cases (var "defCase")
-          (right nothing)
-          (lambda "dt" $
-            "defBody" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "dt") $
-              right (just (var "defBody"))))  $
-        -- Build the cond expression wrapped in a lambda taking "v"
-        "condExpr" <~ (inject L._Expression L._Expression_cond $
-          record L._CondExpression [
-            L._CondExpression_clauses>>: var "clauses",
-            L._CondExpression_default>>: var "defExpr"]) $
-        -- Wrap in ((lambda (__mv) (cond ...)) (cadr __m)) or (second __m) for Clojure
-        "innerExpr" <~ (lispApp @@
-          (lispLambdaExpr @@ list [string "match_value"] @@ var "condExpr") @@
-          list [lispApp @@ (lispVar @@ (dialectCadr @@ var "dialect")) @@ list [lispVar @@ string "match_target"]]) $
-        Maybes.cases (var "marg")
-          -- Unapplied: (lambda (__m) ((lambda (__mv) (cond ...)) (second __m)))
-          (right (lispLambdaExpr @@ list [string "match_target"] @@ var "innerExpr"))
-          (lambda "arg" $
-            "sarg" <<~ (encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "arg") $
-              -- Applied: ((lambda (__m) ((lambda (__mv) (cond ...)) (second __m))) sarg)
-              right (lispApp @@ (lispLambdaExpr @@ list [string "match_target"] @@ var "innerExpr") @@ list [var "sarg"]))
-
--- | Encode a Hydra wrap elimination (unwrap) as a Lisp expression.
--- Takes an optional argument for applied unwraps.
-encodeUnwrapElim :: TTermDefinition (L.Dialect -> Context -> Graph -> Name -> Maybe Term -> Either Error L.Expression)
-encodeUnwrapElim = def "encodeUnwrapElim" $
-  "dialect" ~> "cx" ~> "g" ~> lambda "name" $ lambda "marg" $
-      -- Wrap elimination: transparent unwrap
-        Maybes.cases (var "marg")
-          -- Unapplied: identity function
-          (right (lispLambdaExpr @@ list [string "v"] @@ (lispVar @@ string "v")))
-          (lambda "arg" $
-            encodeTerm @@ var "dialect" @@ var "cx" @@ var "g" @@ var "arg")
-
--- | Check if a name is maybes.cases (3 args, arg 2 is lazy).
-isCasesPrimitive :: TTermDefinition (Name -> Bool)
-isCasesPrimitive = def "isCasesPrimitive" $
-  "name" ~>
-    Equality.equal (var "name") (Core.name $ string "hydra.lib.maybes.cases")
-
--- | Check if a name is a 2-arg lazy primitive (default value is arg 1, i.e. the first applied arg).
--- These primitives take a default value that should only be evaluated when needed.
-isLazy2ArgPrimitive :: TTermDefinition (Name -> Bool)
-isLazy2ArgPrimitive = def "isLazy2ArgPrimitive" $
-  "name" ~>
-    Logic.or
-      (Equality.equal (var "name") (Core.name $ string "hydra.lib.eithers.fromLeft"))
-      (Logic.or
-        (Equality.equal (var "name") (Core.name $ string "hydra.lib.eithers.fromRight"))
-        (Equality.equal (var "name") (Core.name $ string "hydra.lib.maybes.fromMaybe")))
-
--- | Check if a name is a 3-arg lazy primitive where arg 1 (the first applied arg) should be thunked.
-isLazy3ArgPrimitive :: TTermDefinition (Name -> Bool)
-isLazy3ArgPrimitive = def "isLazy3ArgPrimitive" $
-  "name" ~>
-    Equality.equal (var "name") (Core.name $ string "hydra.lib.maybes.maybe")
-
--- | Check if a term is a reference to a specific primitive, stripping type
--- applications, type lambdas, and annotations to find the underlying primitive.
-isPrimitiveRef :: TTermDefinition (String -> Term -> Bool)
-isPrimitiveRef = def "isPrimitiveRef" $
-  lambda "primName" $ lambda "term" $
-    cases _Term (var "term") (Just $ boolean False) [
-      _Term_variable>>: lambda "name" $
-        Equality.equal (Core.unName (var "name")) (var "primName"),
-      _Term_annotated>>: lambda "at" $
-        isPrimitiveRef @@ var "primName" @@ Core.annotatedTermBody (var "at"),
-      _Term_typeApplication>>: lambda "ta" $
-        isPrimitiveRef @@ var "primName" @@ Core.typeApplicationTermBody (var "ta"),
-      _Term_typeLambda>>: lambda "tl" $
-        isPrimitiveRef @@ var "primName" @@ Core.typeLambdaBody (var "tl")]
-
--- | Function application expression
-lispApp :: TTermDefinition (L.Expression -> [L.Expression] -> L.Expression)
-lispApp = def "lispApp" $
-  lambda "fun" $ lambda "args" $
-    inject L._Expression L._Expression_application $
-      record L._Application [
-        L._Application_function>>: var "fun",
-        L._Application_arguments>>: var "args"]
-
--- | Construct a Lisp keyword from a string
-lispKeyword :: TTermDefinition (String -> L.Expression)
-lispKeyword = def "lispKeyword" $
-  lambda "name" $
-    inject L._Expression L._Expression_literal $
-      inject L._Literal L._Literal_keyword $
-        record L._Keyword [
-          L._Keyword_name>>: var "name",
-          L._Keyword_namespace>>: nothing]
-
--- | Lambda expression (unnamed)
-lispLambdaExpr :: TTermDefinition ([String] -> L.Expression -> L.Expression)
-lispLambdaExpr = def "lispLambdaExpr" $
-  lambda "params" $ lambda "body" $
-    inject L._Expression L._Expression_lambda $
-      record L._Lambda [
-        L._Lambda_name>>: nothing,
-        L._Lambda_params>>: Lists.map (lambda "p" $ wrap L._Symbol (var "p")) (var "params"),
-        L._Lambda_restParam>>: nothing,
-        L._Lambda_body>>: list [var "body"]]
-
--- | Construct a Lisp list expression
-lispListExpr :: TTermDefinition ([L.Expression] -> L.Expression)
-lispListExpr = def "lispListExpr" $
-  lambda "elements" $
-    inject L._Expression L._Expression_list $
-      record L._ListLiteral [
-        L._ListLiteral_elements>>: var "elements",
-        L._ListLiteral_quoted>>: boolean False]
-
--- | Wrap a literal as an expression
-lispLitExpr :: TTermDefinition (L.Literal -> L.Expression)
-lispLitExpr = def "lispLitExpr" $
-  lambda "lit" $
-    inject L._Expression L._Expression_literal (var "lit")
-
--- | Named lambda expression (for Clojure self-referential fn)
-lispNamedLambdaExpr :: TTermDefinition (String -> [String] -> L.Expression -> L.Expression)
-lispNamedLambdaExpr = def "lispNamedLambdaExpr" $
-  lambda "name" $ lambda "params" $ lambda "body" $
-    inject L._Expression L._Expression_lambda $
-      record L._Lambda [
-        L._Lambda_name>>: just (wrap L._Symbol (var "name")),
-        L._Lambda_params>>: Lists.map (lambda "p" $ wrap L._Symbol (var "p")) (var "params"),
-        L._Lambda_restParam>>: nothing,
-        L._Lambda_body>>: list [var "body"]]
-
--- | Nil expression
-lispNilExpr :: TTermDefinition L.Expression
-lispNilExpr = def "lispNilExpr" $
-  inject L._Expression L._Expression_literal $
-    inject L._Literal L._Literal_nil unit
-
--- | Construct a Lisp symbol from a string
-lispSymbol :: TTermDefinition (String -> L.Symbol)
-lispSymbol = def "lispSymbol" $
-  lambda "name" $
-    wrap L._Symbol (var "name")
-
--- | Wrap a top-level form (no doc, no comment)
-lispTopForm :: TTermDefinition (L.TopLevelForm -> L.TopLevelFormWithComments)
-lispTopForm = def "lispTopForm" $
-  lambda "form" $
-    record L._TopLevelFormWithComments [
-      L._TopLevelFormWithComments_doc>>: nothing,
-      L._TopLevelFormWithComments_comment>>: nothing,
-      L._TopLevelFormWithComments_form>>: var "form"]
-
--- | Wrap a top-level form with an optional docstring
-lispTopFormWithComments :: TTermDefinition (Maybe String -> L.TopLevelForm -> L.TopLevelFormWithComments)
-lispTopFormWithComments = def "lispTopFormWithComments" $
-  lambda "mdoc" $ lambda "form" $
-    record L._TopLevelFormWithComments [
-      L._TopLevelFormWithComments_doc>>: Maybes.map (lambda "d" $ wrap L._Docstring (var "d")) (var "mdoc"),
-      L._TopLevelFormWithComments_comment>>: nothing,
-      L._TopLevelFormWithComments_form>>: var "form"]
-
--- | Variable reference expression (Lisp-1 style, function namespace = false)
-lispVar :: TTermDefinition (String -> L.Expression)
-lispVar = def "lispVar" $
-  lambda "name" $
-    inject L._Expression L._Expression_variable $
-      record L._VariableReference [
-        L._VariableReference_name>>: wrap L._Symbol (var "name"),
-        L._VariableReference_functionNamespace>>: boolean False]
-
--- | Generate export declarations for all symbols defined in a module.
---   For record type definitions: the type name, constructor (make-X), predicate (X?), and field accessors.
---   For variable definitions: the variable name.
-moduleExports :: TTermDefinition ([L.TopLevelFormWithComments] -> [L.ExportDeclaration])
-moduleExports = def "moduleExports" $
-  "forms" ~>
-    "symbols" <~ Lists.concat (Lists.map ("fwc" ~>
-      "form" <~ (project L._TopLevelFormWithComments L._TopLevelFormWithComments_form @@ var "fwc") $
-      cases L._TopLevelForm (var "form") (Just (list ([] :: [TTerm L.Symbol]))) [
-        L._TopLevelForm_variable>>: "vd" ~>
-          list [project L._VariableDefinition L._VariableDefinition_name @@ var "vd"],
-        L._TopLevelForm_recordType>>: "rdef" ~>
-          "rname" <~ (unwrap L._Symbol @@ (project L._RecordTypeDefinition L._RecordTypeDefinition_name @@ var "rdef")) $
-          "fields" <~ (project L._RecordTypeDefinition L._RecordTypeDefinition_fields @@ var "rdef") $
-          "fieldSyms" <~ Lists.map ("f" ~>
-            "fn" <~ (unwrap L._Symbol @@ (project L._FieldDefinition L._FieldDefinition_name @@ var "f")) $
-            wrap L._Symbol (Strings.cat (list [var "rname", string "-", var "fn"])))
-            (var "fields") $
-          Lists.concat (list [
-            list [
-              wrap L._Symbol (Strings.cat2 (string "make-") (var "rname")),
-              wrap L._Symbol (Strings.cat2 (var "rname") (string "?"))],
-            var "fieldSyms"])])
-      (var "forms")) $
-    Logic.ifElse (Lists.null (var "symbols"))
-      (list ([] :: [TTerm L.ExportDeclaration]))
-      (list [record L._ExportDeclaration [
-        L._ExportDeclaration_symbols>>: var "symbols"]])
-
--- | Reorder definitions: type definitions first, then term definitions in topological order.
---   This ensures that all forward references are resolved, making the generated code
-
--- | Generate import declarations from the dependency namespaces of a module's definitions.
-moduleImports :: TTermDefinition (Namespace -> [Definition] -> [L.ImportDeclaration])
-moduleImports = def "moduleImports" $
-  "focusNs" ~> "defs" ~>
-    "depNss" <~ Sets.toList (Sets.delete (var "focusNs")
-      (Analysis.definitionDependencyNamespaces @@ var "defs")) $
-    Lists.map ("ns" ~>
-      record L._ImportDeclaration [
-        L._ImportDeclaration_module>>: wrap L._NamespaceName (Packaging.unNamespace (var "ns")),
-        L._ImportDeclaration_spec>>: inject L._ImportSpec L._ImportSpec_all unit])
-      (var "depNss")
-
--- | Convert a Hydra module to a Lisp program.
-moduleToLisp :: TTermDefinition (L.Dialect -> Module -> [Definition] -> Context -> Graph -> Either Error L.Program)
-moduleToLisp = def "moduleToLisp" $
-  "dialect" ~> "mod" ~> "defs0" ~> "cx" ~> "g" ~>
-    -- Reorder definitions: types first, then topologically sorted terms
-    "defs" <~ (Environment.reorderDefs @@ var "defs0") $
-    "partitioned" <~ (Environment.partitionDefinitions @@ var "defs") $
-    "allTypeDefs" <~ Pairs.first (var "partitioned") $
-    "termDefs" <~ Pairs.second (var "partitioned") $
-    -- Filter out type aliases (non-nominal types)
-    "typeDefs" <~ Lists.filter (lambda "td" $
-      Predicates.isNominalType @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "td")))
-      (var "allTypeDefs") $
-    "typeItems" <<~ (Eithers.mapList (encodeTypeDefinition @@ var "cx" @@ var "g") (var "typeDefs")) $
-    "termItems" <<~ (Eithers.mapList (encodeTermDefinition @@ var "dialect" @@ var "cx" @@ var "g") (var "termDefs")) $
-    "allItems" <~ Lists.concat2 (var "typeItems") (var "termItems") $
-    "nsName" <~ Packaging.unNamespace (Packaging.moduleNamespace (var "mod")) $
-    "focusNs" <~ Packaging.moduleNamespace (var "mod") $
-    -- Generate imports from cross-module dependencies
-    "imports" <~ (moduleImports @@ var "focusNs" @@ var "defs") $
-    -- Generate exports from all forms
-    "exports" <~ (moduleExports @@ var "allItems") $
-      right (record L._Program [
-        L._Program_dialect>>: var "dialect",
-        L._Program_module>>: just (record L._ModuleDeclaration [
-          L._ModuleDeclaration_name>>: wrap L._NamespaceName (var "nsName"),
-          L._ModuleDeclaration_doc>>: nothing]),
-        L._Program_imports>>: var "imports",
-        L._Program_exports>>: var "exports",
-        L._Program_forms>>: var "allItems"])
-
--- | Convert a fully-qualified Hydra Name to a snake_case identifier string.
--- E.g. Name "hydra.reduction.alphaConvert" -> "hydra_reduction_alpha_convert"
--- E.g. Name "hydra.core.AnnotatedTerm" -> "hydra_core_annotated_term"
--- Splits on dots, converts each part to snake_case, joins with underscore.
--- Reserved words get a trailing underscore.
-qualifiedSnakeName :: TTermDefinition (Name -> String)
-qualifiedSnakeName = def "qualifiedSnakeName" $
-  lambda "name" $
-    "raw" <~ Core.unName (var "name") $
-    "parts" <~ Strings.splitOn (string ".") (var "raw") $
-    "snakeParts" <~ Lists.map (lambda "p" $ Formatting.convertCaseCamelOrUnderscoreToLowerSnake @@ var "p") (var "parts") $
-    "joined" <~ Strings.intercalate (string "_") (var "snakeParts") $
-    Formatting.sanitizeWithUnderscores @@ LispLanguageSource.lispReservedWords @@ var "joined"
-
--- | Convert a fully-qualified Hydra Name to a PascalCase type identifier string.
--- E.g. Name "hydra.core.AnnotatedTerm" -> "AnnotatedTerm"
--- Type names keep PascalCase for the local part, since they are used with define-record-type.
-qualifiedTypeName :: TTermDefinition (Name -> String)
-qualifiedTypeName = def "qualifiedTypeName" $
-  lambda "name" $
-    Formatting.capitalize @@ (Names.localNameOf @@ var "name")
-
--- | Wrap an expression in a zero-argument lambda for lazy evaluation.
--- Produces (fn [] expr) in Clojure, (lambda () expr) in Scheme, etc.
-wrapInThunk :: TTermDefinition (L.Expression -> L.Expression)
-wrapInThunk = def "wrapInThunk" $
-  "expr" ~>
-    inject L._Expression L._Expression_lambda $
-      record L._Lambda [
-        L._Lambda_name>>: nothing,
-        L._Lambda_params>>: list ([] :: [TTerm L.Symbol]),
-        L._Lambda_restParam>>: nothing,
-        L._Lambda_body>>: list [var "expr"]]
diff --git a/src/main/haskell/Hydra/Sources/Lisp/Language.hs b/src/main/haskell/Hydra/Sources/Lisp/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Lisp/Language.hs
+++ /dev/null
@@ -1,287 +0,0 @@
-module Hydra.Sources.Lisp.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                          as Paths
-import qualified Hydra.Dsl.Ast                             as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                          as Coders
-import qualified Hydra.Dsl.Util                            as Compute
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                      as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                          as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                        as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                          as Typing
-import qualified Hydra.Dsl.Util                            as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                    as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.lisp.language"),
-            moduleDefinitions = [toDefinition lispLanguage, toDefinition lispReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Lisp (covering Clojure, Emacs Lisp, Common Lisp, and Scheme)"}
--- | Language constraints for Lisp.
---
--- Lisp is dynamically typed, so all Hydra types must be represented at the term level
--- (as runtime data structures) rather than through a static type system.
---
--- Type mapping strategy:
---   Hydra Type          -> Lisp representation
---   -----------------------------------------------
---   Record              -> defrecord (Clojure), defstruct (CL/Elisp), define-record-type (Scheme)
---   Union               -> Tagged data: keyword + value, dispatched with cond/case
---   List                -> Native list (cons cells or persistent list)
---   Map                 -> Hash map literal (Clojure), alist or hash-table (CL/Elisp/Scheme)
---   Set                 -> Hash set literal (Clojure), list-as-set (others)
---   Maybe               -> nil for Nothing, value for Just (with nil-punning caveats in Scheme)
---   Either              -> Tagged pair: (:left value) or (:right value)
---   Pair                -> Two-element list or vector
---   Wrap (newtype)      -> Transparent wrapper; unwrap at construction/access
---   Literal             -> Native literal (integer, float, string, boolean, character)
---   Function (A -> B)   -> Lambda / defun
---   Unit                -> nil or '()
---
--- Term mapping strategy:
---   Hydra Term          -> Lisp expression
---   -----------------------------------------------
---   Application          -> (f arg1 arg2 ...)
---   Lambda               -> (fn [params] body) / (lambda (params) body)
---   Variable             -> Symbol reference
---   Let                  -> (let [bindings] body) / (let ((bindings)) body)
---   Literal              -> Native literal
---   List                 -> '(elements) or (list elements)
---   Record construction  -> (make-RecordName field1 field2 ...) or (->RecordName field1 field2 ...)
---   Union injection      -> '(:variant value) or (list :variant value)
---   Elimination (record) -> (record-field instance) or (:field instance)
---   Elimination (union)  -> (cond (eq? tag :v1) ... (eq? tag :v2) ...) or case dispatch
---   Map construction     -> {:k1 v1 :k2 v2} (Clojure) or alist (others)
---   Set construction     -> #{elements} (Clojure) or list-to-set (others)
---   Maybe (Just v)       -> v
---   Maybe (Nothing)      -> nil / '()
---   Either (Left v)      -> '(:left v)
---   Either (Right v)     -> '(:right v)
---   Pair (a, b)          -> (list a b) or [a b]
---   Wrap                 -> value (transparent)
---   Unit                 -> nil / '()
-
-lispLanguage :: TTermDefinition Language
-lispLanguage = define "lispLanguage" $
-    doc "Language constraints for Lisp" $ lets [
-    "eliminationVariants">: Sets.fromList $ list [
-      Variants.eliminationVariantRecord, -- field access: (:field record) or (record-field instance)
-      Variants.eliminationVariantUnion, -- case dispatch on tagged unions
-      Variants.eliminationVariantWrap], -- newtype unwrapping (transparent)
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBinary, -- byte arrays / byte strings
-      Variants.literalVariantBoolean, -- true/false, t/nil, #t/#f
-      Variants.literalVariantFloat, -- floating-point numbers
-      Variants.literalVariantInteger, -- integers (all dialects have arbitrary-precision)
-      Variants.literalVariantString], -- strings
-    "floatTypes">: Sets.fromList $ list [
-      Core.floatTypeBigfloat, -- all dialects support arbitrary-precision floats via libraries
-      Core.floatTypeFloat64], -- double-precision float (native in all dialects)
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination, -- case/cond dispatch, field projection
-      Variants.functionVariantLambda], -- fn/lambda
-    "integerTypes">: Sets.fromList $ list [
-      Core.integerTypeBigint], -- all four dialects have arbitrary-precision integers
-    "termVariants">: Sets.fromList $ list [
-      Variants.termVariantAnnotated,
-      Variants.termVariantApplication,
-      Variants.termVariantEither,
-
-      Variants.termVariantCases,
-
-      Variants.termVariantLambda,
-
-      Variants.termVariantProject,
-
-      Variants.termVariantUnwrap,
-
-      Variants.termVariantTypeApplication,
-
-      Variants.termVariantTypeLambda,
-      Variants.termVariantLet,
-      Variants.termVariantList,
-      Variants.termVariantLiteral,
-      Variants.termVariantMap,
-      Variants.termVariantMaybe,
-      Variants.termVariantPair,
-      Variants.termVariantRecord,
-      Variants.termVariantSet,
-      Variants.termVariantInject,
-      Variants.termVariantUnit,
-      Variants.termVariantVariable,
-      Variants.termVariantWrap],
-    "typeVariants">: Sets.fromList $ list [
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication,
-      Variants.typeVariantEither,
-      Variants.typeVariantFunction,
-      Variants.typeVariantForall,
-      Variants.typeVariantList,
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap,
-      Variants.typeVariantMaybe,
-      Variants.typeVariantPair,
-      Variants.typeVariantRecord,
-      Variants.typeVariantSet,
-      Variants.typeVariantUnion,
-      Variants.typeVariantUnit,
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap],
-    "typePredicate">: constant true] $
-    Coders.language
-      (Coders.languageName_ $ string "hydra.lisp")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
-lispReservedWords :: TTermDefinition (S.Set String)
-lispReservedWords = define "lispReservedWords" $
-  doc "A set of reserved words across all four Lisp dialects" $
-  lets [
-    -- Clojure keywords
-    "clojureKeywords">:
-      doc "Clojure special forms and reserved symbols" $
-      list $ string <$> [
-        "def", "defn", "defn-", "defmacro", "defrecord", "deftype", "defprotocol", "defmulti",
-        "defmethod", "fn", "let", "loop", "recur", "if", "do", "cond", "case", "when", "when-not",
-        "when-let", "if-let", "and", "or", "not", "nil", "true", "false", "throw", "try", "catch",
-        "finally", "quote", "var", "ns", "require", "import", "use", "in-ns", "refer",
-        "new", "set!", "monitor-enter", "monitor-exit"],
-
-    -- Emacs Lisp keywords
-    "emacsLispKeywords">:
-      doc "Emacs Lisp special forms and reserved symbols" $
-      list $ string <$> [
-        "defun", "defvar", "defconst", "defmacro", "defsubst", "defadvice", "defcustom", "defgroup",
-        "lambda", "let", "let*", "if", "cond", "progn", "prog1", "prog2", "while", "dolist",
-        "dotimes", "and", "or", "not", "nil", "t", "quote", "function", "setq", "setq-default",
-        "require", "provide", "condition-case", "unwind-protect", "save-excursion",
-        "save-restriction", "catch", "throw", "interactive", "cl-defstruct",
-        "cl-case", "cl-loop", "cl-labels", "cl-flet", "pcase", "pcase-let", "seq-let"],
-
-    -- Common Lisp keywords
-    "commonLispKeywords">:
-      doc "Common Lisp special operators, macros, and reserved symbols" $
-      list $ string <$> [
-        "defun", "defvar", "defparameter", "defconstant", "defmacro", "defgeneric", "defmethod",
-        "defclass", "defstruct", "deftype", "defpackage", "defsetf",
-        "lambda", "let", "let*", "flet", "labels", "macrolet", "symbol-macrolet",
-        "if", "cond", "case", "typecase", "etypecase", "ecase",
-        "progn", "prog1", "prog2", "block", "return-from", "tagbody", "go",
-        "and", "or", "not", "nil", "t",
-        "quote", "function", "setq", "setf",
-        "do", "do*", "dolist", "dotimes", "loop",
-        "values", "multiple-value-bind", "multiple-value-list",
-        "the", "declare", "declaim", "proclaim",
-        "in-package", "use-package", "export", "import", "intern",
-        "handler-case", "handler-bind", "restart-case", "condition",
-        "unwind-protect", "catch", "throw",
-        "eval-when", "load-time-value", "locally", "the",
-        "pi"],
-
-    -- Scheme R7RS keywords
-    "schemeKeywords">:
-      doc "Scheme R7RS keywords and special forms" $
-      list $ string <$> [
-        "define", "define-syntax", "define-record-type", "define-library", "define-values",
-        "lambda", "let", "let*", "letrec", "letrec*", "let-values", "let*-values",
-        "if", "cond", "case", "when", "unless",
-        "and", "or", "not",
-        "begin", "do",
-        "quote", "quasiquote", "unquote", "unquote-splicing",
-        "set!", "import", "export", "include", "include-ci",
-        "syntax-rules", "syntax-case", "with-syntax",
-        "call-with-current-continuation", "call/cc",
-        "call-with-values", "values", "dynamic-wind",
-        "guard", "parameterize",
-        "else"],
-
-    -- Words reserved by Hydra across all dialects
-    "hydraLispKeywords">:
-      doc "Reserved words specific to Hydra-Lisp code generation" $
-      list $ string <$> ["Node"]] $
-
-    Sets.fromList $ Lists.concat $ list [
-      var "clojureKeywords",
-      var "emacsLispKeywords",
-      var "commonLispKeywords",
-      var "schemeKeywords",
-      var "hydraLispKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Lisp/Manifest.hs b/src/main/haskell/Hydra/Sources/Lisp/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Lisp/Manifest.hs
+++ /dev/null
@@ -1,27 +0,0 @@
--- | Package manifest for hydra-lisp.
---
--- Owns the Lisp coder DSL sources, shared by all Lisp dialects (Clojure,
--- Scheme, Common Lisp, Emacs Lisp). See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
-
-module Hydra.Sources.Lisp.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Lisp.Coder as LispCoder
-import qualified Hydra.Sources.Lisp.Language as LispLanguage
-import qualified Hydra.Sources.Lisp.Serde as LispSerde
-import qualified Hydra.Sources.Lisp.Syntax as LispSyntax
-
-mainModules :: [Module]
-mainModules = [
-  LispCoder.module_,
-  LispLanguage.module_,
-  LispSerde.module_,
-  LispSyntax.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Lisp/Serde.hs b/src/main/haskell/Hydra/Sources/Lisp/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Lisp/Serde.hs
+++ /dev/null
@@ -1,1231 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Lisp serializer: converts the Lisp syntax AST to concrete syntax (source code).
--- A single serde handles all four dialects (Clojure, Emacs Lisp, Common Lisp, Scheme),
--- dispatching on the Dialect enum where concrete syntax diverges.
-
-module Hydra.Sources.Lisp.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Constants       as Constants
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Lisp.Syntax             as LispSyntax
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as DL
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports for Lisp AST
-import Hydra.Ast
-import qualified Hydra.Lisp.Syntax as L
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.lisp.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Formatting.ns, Serialization.ns],
-            moduleTypeDependencies = (LispSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Lisp serializer: converts Lisp AST to concrete syntax for Clojure, Emacs Lisp, Common Lisp, or Scheme"}
-  where
-    definitions = [
-      toDefinition andExpressionToExpr,
-      toDefinition applicationToExpr,
-      toDefinition caseExpressionToExpr,
-      toDefinition commentToExpr,
-      toDefinition condExpressionToExpr,
-      toDefinition constantDefinitionToExpr,
-      toDefinition defKeyword,
-      toDefinition defconstKeyword,
-      toDefinition defnKeyword,
-      toDefinition defrecordKeyword,
-      toDefinition doExpressionToExpr,
-      toDefinition docstringToExpr,
-      toDefinition exportDeclarationToExpr,
-      toDefinition expressionToExpr,
-      toDefinition falseExpr,
-      toDefinition fieldAccessToExpr,
-      toDefinition formatLispFloat,
-      toDefinition functionDefinitionToExpr,
-      toDefinition ifExpressionToExpr,
-      toDefinition importDeclarationToExpr,
-      toDefinition keywordToExpr,
-      toDefinition lambdaKeyword,
-      toDefinition lambdaToExpr,
-      toDefinition letExpressionToExpr,
-      toDefinition listKeyword,
-      toDefinition listLiteralToExpr,
-      toDefinition literalToExpr,
-      toDefinition macroDefinitionToExpr,
-      toDefinition mapLiteralToExpr,
-      toDefinition moduleDeclarationToExpr,
-      toDefinition nilExpr,
-      toDefinition notExpressionToExpr,
-      toDefinition orExpressionToExpr,
-      toDefinition programToExpr,
-      toDefinition recordTypeDefinitionToExpr,
-      toDefinition sExpressionToExpr,
-      toDefinition setLiteralToExpr,
-      toDefinition symbolToExpr,
-      toDefinition topLevelFormToExpr,
-      toDefinition topLevelFormWithCommentsToExpr,
-      toDefinition trueExpr,
-      toDefinition variableDefinitionToExpr,
-      toDefinition variableReferenceToExpr,
-      toDefinition vectorLiteralToExpr]
-
--- | Square brackets: [expr1 expr2 ...]
-sqBrackets :: TTerm [Expr] -> TTerm Expr
-sqBrackets exprs = Serialization.brackets @@ (asTerm Serialization.squareBrackets) @@ (asTerm Serialization.inlineStyle) @@
-  (Serialization.spaceSep @@ exprs)
-
--- | Parenthesized space-separated list: (expr1 expr2 ...)
-parenList :: TTerm [Expr] -> TTerm Expr
-parenList exprs = Serialization.parens @@ (Serialization.spaceSep @@ exprs)
-
--- | Serialize an and expression: (and expr1 expr2 ...)
-andExpressionToExpr :: TTermDefinition (L.Dialect -> L.AndExpression -> Expr)
-andExpressionToExpr = define "andExpressionToExpr" $
-  lambda "d" $ lambda "andExpr" $
-    Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-      (list [Serialization.cst @@ string "and"])
-      (Lists.map (expressionToExpr @@ var "d") (project L._AndExpression L._AndExpression_expressions @@ var "andExpr")))
-
--- | Serialize a function application: (f arg1 arg2 ...)
---   For Emacs Lisp: (funcall f arg1 arg2 ...) when f is not a simple variable
-applicationToExpr :: TTermDefinition (L.Dialect -> L.Application -> Expr)
-applicationToExpr = define "applicationToExpr" $
-  lambda "d" $ lambda "app" $ lets [
-    "funExpr">: project L._Application L._Application_function @@ var "app",
-    "fun">: expressionToExpr @@ var "d" @@ var "funExpr",
-    "args">: Lists.map (expressionToExpr @@ var "d") (project L._Application L._Application_arguments @@ var "app"),
-    "needsFuncall">: cases L._Dialect (var "d") (Just $ boolean False)
-      [L._Dialect_emacsLisp>>: lambda "u" $
-        -- In Emacs Lisp, funcall is needed when the function is not a simple variable
-        cases L._Expression (var "funExpr") (Just $ boolean True)
-          [L._Expression_variable>>: lambda "s" $ boolean False]],
-    "allParts">: Logic.ifElse (var "needsFuncall")
-      (Lists.concat2 (list [Serialization.cst @@ string "funcall", var "fun"]) (var "args"))
-      (Lists.concat2 (list [var "fun"]) (var "args"))] $
-    Serialization.parens @@ (Serialization.spaceSep @@ var "allParts")
-
--- | Serialize a case expression
-caseExpressionToExpr :: TTermDefinition (L.Dialect -> L.CaseExpression -> Expr)
-caseExpressionToExpr = define "caseExpressionToExpr" $
-  lambda "d" $ lambda "caseExpr" $ lets [
-    "scrutinee">: expressionToExpr @@ var "d" @@ (project L._CaseExpression L._CaseExpression_scrutinee @@ var "caseExpr"),
-    "clauses">: project L._CaseExpression L._CaseExpression_clauses @@ var "caseExpr",
-    "dflt">: project L._CaseExpression L._CaseExpression_default @@ var "caseExpr",
-    "clauseExprs">: Lists.map (lambda "c" $
-      Serialization.parens @@ (Serialization.spaceSep @@ list [
-        Serialization.parens @@ (Serialization.spaceSep @@
-          Lists.map (expressionToExpr @@ var "d") (project L._CaseClause L._CaseClause_keys @@ var "c")),
-        expressionToExpr @@ var "d" @@ (project L._CaseClause L._CaseClause_body @@ var "c")]))
-      (var "clauses"),
-    "defaultPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-      (lambda "e" $ list [Serialization.parens @@ (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "else",
-        expressionToExpr @@ var "d" @@ var "e"])])
-      (var "dflt")] $
-    Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-      list [Serialization.cst @@ string "case", var "scrutinee"],
-      var "clauseExprs",
-      var "defaultPart"])))
-
--- | Serialize a comment. Empty text emits `;` (no trailing space) so
---   blank comment lines don't carry trailing whitespace.
-commentToExpr :: TTermDefinition (L.Comment -> Expr)
-commentToExpr = define "commentToExpr" $
-  lambda "c" $ lets [
-    "text">: project L._Comment L._Comment_text @@ var "c"] $
-    Serialization.cst @@ Logic.ifElse (Equality.equal (var "text") (string ""))
-      (string ";")
-      (Strings.cat2 (string "; ") (var "text"))
-
--- | Serialize a cond expression
-condExpressionToExpr :: TTermDefinition (L.Dialect -> L.CondExpression -> Expr)
-condExpressionToExpr = define "condExpressionToExpr" $
-  lambda "d" $ lambda "condExpr" $ lets [
-    "clauses">: project L._CondExpression L._CondExpression_clauses @@ var "condExpr",
-    "dflt">: project L._CondExpression L._CondExpression_default @@ var "condExpr"] $
-    cases L._Dialect (var "d") Nothing [
-      -- Clojure: (cond test1 expr1 test2 expr2 :else default)
-      L._Dialect_clojure>>: constant $ lets [
-        "clauseExprs">: Lists.concat (Lists.map (lambda "c" $ list [
-          expressionToExpr @@ var "d" @@ (project L._CondClause L._CondClause_condition @@ var "c"),
-          expressionToExpr @@ var "d" @@ (project L._CondClause L._CondClause_body @@ var "c")])
-          (var "clauses")),
-        "defaultPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-          (lambda "e" $ list [Serialization.cst @@ string ":else", expressionToExpr @@ var "d" @@ var "e"])
-          (var "dflt")] $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "cond"],
-          var "clauseExprs",
-          var "defaultPart"]))),
-      -- Others: (cond (test1 expr1) (test2 expr2) (t/else default))
-      L._Dialect_emacsLisp>>: constant $ condOther (var "d") (var "clauses") (var "dflt") (string "t"),
-      L._Dialect_commonLisp>>: constant $ condOther (var "d") (var "clauses") (var "dflt") (string "t"),
-      L._Dialect_scheme>>: constant $ condOther (var "d") (var "clauses") (var "dflt") (string "else")]
-  where
-    condOther :: TTerm L.Dialect -> TTerm [L.CondClause] -> TTerm (Maybe L.Expression) -> TTerm String -> TTerm Expr
-    condOther d clauses dflt defaultKeyword = lets [
-      "clauseExprs">: Lists.map (lambda "c" $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          expressionToExpr @@ d @@ (project L._CondClause L._CondClause_condition @@ var "c"),
-          expressionToExpr @@ d @@ (project L._CondClause L._CondClause_body @@ var "c")]))
-        clauses,
-      "defaultPart">: Maybes.maybe (list ([] :: [TTerm Expr]))
-        (lambda "e" $ list [Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ defaultKeyword,
-          expressionToExpr @@ d @@ var "e"])])
-        dflt] $
-      Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-        list [Serialization.cst @@ string "cond"],
-        var "clauseExprs",
-        var "defaultPart"])))
-
--- | Serialize a constant definition
-constantDefinitionToExpr :: TTermDefinition (L.Dialect -> L.ConstantDefinition -> Expr)
-constantDefinitionToExpr = define "constantDefinitionToExpr" $
-  lambda "d" $ lambda "cdef" $ lets [
-    "name">: symbolToExpr @@ (project L._ConstantDefinition L._ConstantDefinition_name @@ var "cdef"),
-    "value">: expressionToExpr @@ var "d" @@ (project L._ConstantDefinition L._ConstantDefinition_value @@ var "cdef")] $
-    Serialization.parens @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ (defconstKeyword @@ var "d"),
-      var "name",
-      var "value"])
-
--- | The keyword for variable definitions
-defKeyword :: TTermDefinition (L.Dialect -> String)
-defKeyword = define "defKeyword" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ string "def",
-    L._Dialect_emacsLisp>>: constant $ string "defvar",
-    L._Dialect_commonLisp>>: constant $ string "cl:defvar",
-    L._Dialect_scheme>>: constant $ string "define"]
-
--- | The keyword for constant definitions
-defconstKeyword :: TTermDefinition (L.Dialect -> String)
-defconstKeyword = define "defconstKeyword" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ string "def",
-    L._Dialect_emacsLisp>>: constant $ string "defconst",
-    L._Dialect_commonLisp>>: constant $ string "cl:defconstant",
-    L._Dialect_scheme>>: constant $ string "define"]
-
--- | The keyword for named function definitions
-defnKeyword :: TTermDefinition (L.Dialect -> String)
-defnKeyword = define "defnKeyword" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ string "defn",
-    L._Dialect_emacsLisp>>: constant $ string "defun",
-    L._Dialect_commonLisp>>: constant $ string "cl:defun",
-    L._Dialect_scheme>>: constant $ string "define"]
-
--- | The keyword for record/struct definitions
-defrecordKeyword :: TTermDefinition (L.Dialect -> String)
-defrecordKeyword = define "defrecordKeyword" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ string "defrecord",
-    L._Dialect_emacsLisp>>: constant $ string "cl-defstruct",
-    L._Dialect_commonLisp>>: constant $ string "cl:defstruct",
-    L._Dialect_scheme>>: constant $ string "define-record-type"]
-
--- | Serialize a do/progn/begin expression
-doExpressionToExpr :: TTermDefinition (L.Dialect -> L.DoExpression -> Expr)
-doExpressionToExpr = define "doExpressionToExpr" $
-  lambda "d" $ lambda "doExpr" $ lets [
-    "kw">: cases L._Dialect (var "d") Nothing [
-      L._Dialect_clojure>>: constant $ string "do",
-      L._Dialect_emacsLisp>>: constant $ string "progn",
-      L._Dialect_commonLisp>>: constant $ string "progn",
-      L._Dialect_scheme>>: constant $ string "begin"]] $
-    Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-      (list [Serialization.cst @@ var "kw"])
-      (Lists.map (expressionToExpr @@ var "d") (project L._DoExpression L._DoExpression_expressions @@ var "doExpr")))
-
--- | Serialize a docstring as a comment. Empty text emits `;;` (no
---   trailing space) so blank docstring lines don't carry trailing whitespace.
-docstringToExpr :: TTermDefinition (L.Docstring -> Expr)
-docstringToExpr = define "docstringToExpr" $
-  lambda "ds" $ lets [
-    "text">: unwrap L._Docstring @@ var "ds"] $
-    Serialization.cst @@ Logic.ifElse (Equality.equal (var "text") (string ""))
-      (string ";;")
-      (Strings.cat (list [string ";; ", var "text"]))
-
--- | Serialize an export declaration
-exportDeclarationToExpr :: TTermDefinition (L.Dialect -> L.ExportDeclaration -> Expr)
-exportDeclarationToExpr = define "exportDeclarationToExpr" $
-  lambda "d" $ lambda "edecl" $ lets [
-    "syms">: Lists.map symbolToExpr (project L._ExportDeclaration L._ExportDeclaration_symbols @@ var "edecl")] $
-    cases L._Dialect (var "d") Nothing [
-      -- Clojure: public by default, no export form
-      L._Dialect_clojure>>: constant $ Serialization.cst @@ string "",
-      -- (provide 'name)
-      L._Dialect_emacsLisp>>: constant $
-        Serialization.newlineSep @@ Lists.map (lambda "s" $
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "provide",
-            Serialization.noSep @@ list [Serialization.cst @@ string "'", var "s"]]))
-          (var "syms"),
-      -- (:export :sym1 :sym2)
-      L._Dialect_commonLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-          (list [Serialization.cst @@ string ":export"])
-          (Lists.map (lambda "s" $ Serialization.noSep @@ list [Serialization.cst @@ string ":", var "s"]) (var "syms"))),
-      -- (export sym1 sym2)
-      L._Dialect_scheme>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-          (list [Serialization.cst @@ string "export"])
-          (var "syms"))]
-
--- | Serialize a Lisp expression
-expressionToExpr :: TTermDefinition (L.Dialect -> L.Expression -> Expr)
-expressionToExpr = define "expressionToExpr" $
-  lambda "d" $ lambda "expr" $
-    cases L._Expression (var "expr") Nothing [
-      L._Expression_application>>: lambda "a" $ applicationToExpr @@ var "d" @@ var "a",
-      L._Expression_lambda>>: lambda "l" $ lambdaToExpr @@ var "d" @@ var "l",
-      L._Expression_let>>: lambda "l" $ letExpressionToExpr @@ var "d" @@ var "l",
-      L._Expression_if>>: lambda "i" $ ifExpressionToExpr @@ var "d" @@ var "i",
-      L._Expression_cond>>: lambda "c" $ condExpressionToExpr @@ var "d" @@ var "c",
-      L._Expression_case>>: lambda "c" $ caseExpressionToExpr @@ var "d" @@ var "c",
-      L._Expression_and>>: lambda "a" $ andExpressionToExpr @@ var "d" @@ var "a",
-      L._Expression_or>>: lambda "o" $ orExpressionToExpr @@ var "d" @@ var "o",
-      L._Expression_not>>: lambda "n" $ notExpressionToExpr @@ var "d" @@ var "n",
-      L._Expression_do>>: lambda "e" $ doExpressionToExpr @@ var "d" @@ var "e",
-      L._Expression_begin>>: lambda "e" $
-        Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-          (list [Serialization.cst @@ string "begin"])
-          (Lists.map (expressionToExpr @@ var "d") (project L._BeginExpression L._BeginExpression_expressions @@ var "e"))),
-      L._Expression_variable>>: lambda "v" $ variableReferenceToExpr @@ var "d" @@ var "v",
-      L._Expression_literal>>: lambda "l" $ literalToExpr @@ var "d" @@ var "l",
-      L._Expression_list>>: lambda "l" $ listLiteralToExpr @@ var "d" @@ var "l",
-      L._Expression_vector>>: lambda "v" $ vectorLiteralToExpr @@ var "d" @@ var "v",
-      L._Expression_map>>: lambda "m" $ mapLiteralToExpr @@ var "d" @@ var "m",
-      L._Expression_set>>: lambda "s" $ setLiteralToExpr @@ var "d" @@ var "s",
-      L._Expression_cons>>: lambda "c" $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "cons",
-          expressionToExpr @@ var "d" @@ (project L._ConsExpression L._ConsExpression_head @@ var "c"),
-          expressionToExpr @@ var "d" @@ (project L._ConsExpression L._ConsExpression_tail @@ var "c")]),
-      L._Expression_dottedPair>>: lambda "p" $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          expressionToExpr @@ var "d" @@ (project L._DottedPair L._DottedPair_car @@ var "p"),
-          Serialization.cst @@ string ".",
-          expressionToExpr @@ var "d" @@ (project L._DottedPair L._DottedPair_cdr @@ var "p")]),
-      L._Expression_fieldAccess>>: lambda "fa" $ fieldAccessToExpr @@ var "d" @@ var "fa",
-      L._Expression_typeAnnotation>>: lambda "ta" $
-        expressionToExpr @@ var "d" @@ (project L._TypeAnnotation L._TypeAnnotation_expression @@ var "ta"),
-      L._Expression_quote>>: lambda "q" $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "'",
-          expressionToExpr @@ var "d" @@ (project L._QuoteExpression L._QuoteExpression_body @@ var "q")],
-      L._Expression_quasiquote>>: lambda "q" $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "`",
-          expressionToExpr @@ var "d" @@ (project L._QuasiquoteExpression L._QuasiquoteExpression_body @@ var "q")],
-      L._Expression_unquote>>: lambda "u" $
-        unquoteToExpr (var "d") (var "u"),
-      L._Expression_splicingUnquote>>: lambda "su" $
-        splicingUnquoteToExpr (var "d") (var "su"),
-      L._Expression_sExpression>>: lambda "s" $ sExpressionToExpr @@ var "s"]
-  where
-    unquoteToExpr :: TTerm L.Dialect -> TTerm a -> TTerm Expr
-    unquoteToExpr d u =
-      cases L._Dialect d Nothing [
-        L._Dialect_clojure>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string "~",
-            expressionToExpr @@ d @@ (project L._UnquoteExpression L._UnquoteExpression_body @@ u)],
-        L._Dialect_emacsLisp>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string ",",
-            expressionToExpr @@ d @@ (project L._UnquoteExpression L._UnquoteExpression_body @@ u)],
-        L._Dialect_commonLisp>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string ",",
-            expressionToExpr @@ d @@ (project L._UnquoteExpression L._UnquoteExpression_body @@ u)],
-        L._Dialect_scheme>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string ",",
-            expressionToExpr @@ d @@ (project L._UnquoteExpression L._UnquoteExpression_body @@ u)]]
-    splicingUnquoteToExpr :: TTerm L.Dialect -> TTerm a -> TTerm Expr
-    splicingUnquoteToExpr d su =
-      cases L._Dialect d Nothing [
-        L._Dialect_clojure>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string "~@",
-            expressionToExpr @@ d @@ (project L._SplicingUnquoteExpression L._SplicingUnquoteExpression_body @@ su)],
-        L._Dialect_emacsLisp>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string ",@",
-            expressionToExpr @@ d @@ (project L._SplicingUnquoteExpression L._SplicingUnquoteExpression_body @@ su)],
-        L._Dialect_commonLisp>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string ",@",
-            expressionToExpr @@ d @@ (project L._SplicingUnquoteExpression L._SplicingUnquoteExpression_body @@ su)],
-        L._Dialect_scheme>>: constant $
-          Serialization.noSep @@ list [
-            Serialization.cst @@ string ",@",
-            expressionToExpr @@ d @@ (project L._SplicingUnquoteExpression L._SplicingUnquoteExpression_body @@ su)]]
-
--- | Boolean false expression
-falseExpr :: TTermDefinition (L.Dialect -> Expr)
-falseExpr = define "falseExpr" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ Serialization.cst @@ string "false",
-    L._Dialect_emacsLisp>>: constant $ Serialization.cst @@ string "nil",
-    L._Dialect_commonLisp>>: constant $ Serialization.cst @@ string "cl:nil",
-    L._Dialect_scheme>>: constant $ Serialization.cst @@ string "#f"]
-
--- | Serialize a field access expression
-fieldAccessToExpr :: TTermDefinition (L.Dialect -> L.FieldAccess -> Expr)
-fieldAccessToExpr = define "fieldAccessToExpr" $
-  lambda "d" $ lambda "fa" $ lets [
-    "rtype">: symbolToExpr @@ (project L._FieldAccess L._FieldAccess_recordType @@ var "fa"),
-    "field">: symbolToExpr @@ (project L._FieldAccess L._FieldAccess_field @@ var "fa"),
-    "target">: expressionToExpr @@ var "d" @@ (project L._FieldAccess L._FieldAccess_target @@ var "fa")] $
-    cases L._Dialect (var "d") Nothing [
-      -- (:field target) in Clojure
-      L._Dialect_clojure>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.noSep @@ list [Serialization.cst @@ string ":", var "field"],
-          var "target"]),
-      -- (record-type-field target) in others
-      L._Dialect_emacsLisp>>: constant $ fieldAccessOther (var "rtype") (var "field") (var "target"),
-      L._Dialect_commonLisp>>: constant $ fieldAccessOther (var "rtype") (var "field") (var "target"),
-      L._Dialect_scheme>>: constant $ fieldAccessOther (var "rtype") (var "field") (var "target")]
-  where
-    fieldAccessOther :: TTerm Expr -> TTerm Expr -> TTerm Expr -> TTerm Expr
-    fieldAccessOther rtype field target =
-      Serialization.parens @@ (Serialization.spaceSep @@ list [
-        Serialization.noSep @@ list [rtype, Serialization.cst @@ string "-", field],
-        target])
-
--- | Serialize a function definition.
--- Clojure: (defn name [params] body)
--- Elisp/CL: (defun name (params) body)
--- Scheme: (define (name params) body)
-functionDefinitionToExpr :: TTermDefinition (L.Dialect -> L.FunctionDefinition -> Expr)
-functionDefinitionToExpr = define "functionDefinitionToExpr" $
-  lambda "d" $ lambda "fdef" $ lets [
-    "name">: symbolToExpr @@ (project L._FunctionDefinition L._FunctionDefinition_name @@ var "fdef"),
-    "params">: Lists.map symbolToExpr (project L._FunctionDefinition L._FunctionDefinition_params @@ var "fdef"),
-    "body">: Lists.map (expressionToExpr @@ var "d") (project L._FunctionDefinition L._FunctionDefinition_body @@ var "fdef")] $
-    cases L._Dialect (var "d") Nothing [
-      -- (defn name [params] body...)
-      L._Dialect_clojure>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "defn", var "name"],
-          list [sqBrackets (var "params")],
-          var "body"]))),
-      -- (defun name (params) body...)
-      L._Dialect_emacsLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "defun", var "name"],
-          list [Serialization.parens @@ (Serialization.spaceSep @@ var "params")],
-          var "body"]))),
-      -- (defun name (params) body...)
-      L._Dialect_commonLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "defun", var "name"],
-          list [Serialization.parens @@ (Serialization.spaceSep @@ var "params")],
-          var "body"]))),
-      -- (define (name params...) body...)
-      L._Dialect_scheme>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "define"],
-          list [Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2 (list [var "name"]) (var "params"))],
-          var "body"])))]
-
--- | Serialize an if expression: (if test then else)
-ifExpressionToExpr :: TTermDefinition (L.Dialect -> L.IfExpression -> Expr)
-ifExpressionToExpr = define "ifExpressionToExpr" $
-  lambda "d" $ lambda "ifExpr" $ lets [
-    "cond">: expressionToExpr @@ var "d" @@ (project L._IfExpression L._IfExpression_condition @@ var "ifExpr"),
-    "then">: expressionToExpr @@ var "d" @@ (project L._IfExpression L._IfExpression_then @@ var "ifExpr"),
-    "else">: project L._IfExpression L._IfExpression_else @@ var "ifExpr",
-    "elsePart">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "e" $ list [expressionToExpr @@ var "d" @@ var "e"])
-      (var "else")] $
-    Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-      list [Serialization.cst @@ string "if", var "cond", var "then"],
-      var "elsePart"]))
-
--- | Serialize an import declaration
-importDeclarationToExpr :: TTermDefinition (L.Dialect -> L.ImportDeclaration -> Expr)
-importDeclarationToExpr = define "importDeclarationToExpr" $
-  lambda "d" $ lambda "idecl" $ lets [
-    "modName">: unwrap L._NamespaceName @@ (project L._ImportDeclaration L._ImportDeclaration_module @@ var "idecl")] $
-    cases L._Dialect (var "d") Nothing [
-      -- (:require [name])
-      L._Dialect_clojure>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string ":require",
-          sqBrackets (list [Serialization.cst @@ var "modName"])]),
-      -- (require 'name)
-      L._Dialect_emacsLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "require",
-          Serialization.noSep @@ list [Serialization.cst @@ string "'", Serialization.cst @@ var "modName"]]),
-      -- (:use :name)
-      L._Dialect_commonLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string ":use",
-          Serialization.cst @@ Strings.cat2 (string ":") (var "modName")]),
-      -- (import (name))
-      L._Dialect_scheme>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "import",
-          Serialization.parens @@ (Serialization.cst @@ var "modName")])]
-
--- | Serialize a keyword: :name (or 'name in Scheme)
-keywordToExpr :: TTermDefinition (L.Dialect -> L.Keyword -> Expr)
-keywordToExpr = define "keywordToExpr" $
-  lambda "d" $ lambda "k" $ lets [
-    "name">: project L._Keyword L._Keyword_name @@ var "k",
-    "ns">: project L._Keyword L._Keyword_namespace @@ var "k"] $
-    cases L._Dialect (var "d") (Just $
-      -- Default: :name or ns/:name
-      Serialization.cst @@ Maybes.maybe
-        (Strings.cat2 (string ":") (var "name"))
-        (lambda "n" $ Strings.cat (list [var "n", string "/:", var "name"]))
-        (var "ns")) [
-      -- Scheme: 'name (quoted symbol, since Scheme has no keywords)
-      L._Dialect_scheme>>: constant $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "'",
-          Serialization.cst @@ var "name"]]
-
--- | The keyword for anonymous functions
-lambdaKeyword :: TTermDefinition (L.Dialect -> String)
-lambdaKeyword = define "lambdaKeyword" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ string "fn",
-    L._Dialect_emacsLisp>>: constant $ string "lambda",
-    L._Dialect_commonLisp>>: constant $ string "cl:lambda",
-    L._Dialect_scheme>>: constant $ string "lambda"]
-
--- | Serialize a lambda expression
-lambdaToExpr :: TTermDefinition (L.Dialect -> L.Lambda -> Expr)
-lambdaToExpr = define "lambdaToExpr" $
-  lambda "d" $ lambda "lam" $ lets [
-    "params">: Lists.map symbolToExpr (project L._Lambda L._Lambda_params @@ var "lam"),
-    "body">: Lists.map (expressionToExpr @@ var "d") (project L._Lambda L._Lambda_body @@ var "lam"),
-    "mname">: project L._Lambda L._Lambda_name @@ var "lam",
-    "kw">: lambdaKeyword @@ var "d"] $
-    cases L._Dialect (var "d") Nothing [
-      -- (fn [params] body...) or (fn name [params] body...) if named
-      L._Dialect_clojure>>: constant $
-        Maybes.maybe
-          -- Unnamed: (fn [params] body...)
-          (Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-            list [Serialization.cst @@ var "kw"],
-            list [sqBrackets (var "params")],
-            var "body"]))))
-          -- Named: (fn name [params] body...)
-          (lambda "sym" $
-            Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-              list [Serialization.cst @@ var "kw", symbolToExpr @@ var "sym"],
-              list [sqBrackets (var "params")],
-              var "body"]))))
-          (var "mname"),
-      -- (lambda (params) body...)
-      L._Dialect_emacsLisp>>: constant $ lambdaOther (var "kw") (var "params") (var "body"),
-      L._Dialect_commonLisp>>: constant $ lambdaOther (var "kw") (var "params") (var "body"),
-      L._Dialect_scheme>>: constant $ lambdaOther (var "kw") (var "params") (var "body")]
-  where
-    lambdaOther :: TTerm String -> TTerm [Expr] -> TTerm [Expr] -> TTerm Expr
-    lambdaOther kw params body =
-      Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-        list [Serialization.cst @@ kw],
-        list [Serialization.parens @@ (Serialization.spaceSep @@ params)],
-        body])))
-
--- | Serialize a let expression
--- Scheme/CL/Elisp: (let ((name val) ...) body...) or (let*/letrec ...)
--- Clojure: (let [name val ...] body...)
-letExpressionToExpr :: TTermDefinition (L.Dialect -> L.LetExpression -> Expr)
-letExpressionToExpr = define "letExpressionToExpr" $
-  lambda "d" $ lambda "letExpr" $ lets [
-    "kind">: project L._LetExpression L._LetExpression_kind @@ var "letExpr",
-    "bindings">: project L._LetExpression L._LetExpression_bindings @@ var "letExpr",
-    "body">: Lists.map (expressionToExpr @@ var "d") (project L._LetExpression L._LetExpression_body @@ var "letExpr"),
-    -- Extract name and value from each binding (all are simple bindings)
-    "bindingPairs">: Lists.map (lambda "b" $
-      cases L._LetBinding (var "b") Nothing [
-        L._LetBinding_simple>>: lambda "sb" $ pair
-          (symbolToExpr @@ (project L._SimpleBinding L._SimpleBinding_name @@ var "sb"))
-          (expressionToExpr @@ var "d" @@ (project L._SimpleBinding L._SimpleBinding_value @@ var "sb")),
-        L._LetBinding_destructuring>>: constant $ pair
-          (Serialization.cst @@ string "<destructuring>")
-          (Serialization.cst @@ string "<destructuring>")])
-      (var "bindings")] $
-    cases L._Dialect (var "d") Nothing [
-      -- Clojure: (let [name val ...] body...) or (letfn [(name [params] body) ...] body...) for recursive
-      L._Dialect_clojure>>: constant $
-        cases L._LetKind (var "kind") Nothing [
-          -- Recursive: emit letfn (Clojure's mutually recursive form for fn bindings).
-          -- The coder marks let recursive only when an SCC cycle exists, and in
-          -- the cycles produced by the kernel all bindings are lambdas, so letfn
-          -- is well-formed. Non-lambda bindings would need thunking, not handled here.
-          L._LetKind_recursive>>: constant $
-            clojureLetfn (var "d") (var "bindings") (var "body"),
-          -- Non-recursive: (let [name val ...] body...)
-          L._LetKind_parallel>>: constant $ clojureLet (var "bindingPairs") (var "body"),
-          L._LetKind_sequential>>: constant $ clojureLet (var "bindingPairs") (var "body")],
-      -- Others: (let/let*/letrec ((name val) ...) body...)
-      L._Dialect_emacsLisp>>: constant $ letOther (var "kind") (var "bindingPairs") (var "body"),
-      -- Common Lisp: emit letrec (the loader transforms it to labels or mutable cells)
-      L._Dialect_commonLisp>>: constant $ letOther (var "kind") (var "bindingPairs") (var "body"),
-      L._Dialect_scheme>>: constant $ letOther (var "kind") (var "bindingPairs") (var "body")]
-  where
-    clojureLet :: TTerm [(Expr, Expr)] -> TTerm [Expr] -> TTerm Expr
-    clojureLet bindingPairs body =
-      Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-        list [Serialization.cst @@ string "let"],
-        list [sqBrackets (Lists.concat (Lists.map (lambda "p" $
-          list [Pairs.first (var "p"), Pairs.second (var "p")]) bindingPairs))],
-        body]))
-    -- (letfn [(name [params] body) (name2 [params2] body2) ...] body)
-    -- Each binding's value must be an Expression_lambda; otherwise it cannot
-    -- legally appear inside letfn and we fall back to the underlying lambda
-    -- serialization, producing invalid Clojure that will fail loudly at load.
-    clojureLetfn :: TTerm L.Dialect -> TTerm [L.LetBinding] -> TTerm [Expr] -> TTerm Expr
-    clojureLetfn d bindings body = lets [
-      "fnSpecs">: Lists.map (lambda "b" $
-        cases L._LetBinding (var "b") Nothing [
-          L._LetBinding_simple>>: lambda "sb" $ lets [
-            "name">: symbolToExpr @@ (project L._SimpleBinding L._SimpleBinding_name @@ var "sb"),
-            "val">: project L._SimpleBinding L._SimpleBinding_value @@ var "sb"] $
-            cases L._Expression (var "val") (Just $
-              Serialization.parens @@ (Serialization.spaceSep @@ list [
-                var "name", expressionToExpr @@ d @@ var "val"])) [
-              L._Expression_lambda>>: lambda "lam" $ lets [
-                "params">: Lists.map symbolToExpr (project L._Lambda L._Lambda_params @@ var "lam"),
-                "lbody">: Lists.map (expressionToExpr @@ d) (project L._Lambda L._Lambda_body @@ var "lam")] $
-                Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-                  list [var "name"],
-                  list [sqBrackets (var "params")],
-                  var "lbody"]))],
-          L._LetBinding_destructuring>>: constant $
-            Serialization.cst @@ string "<destructuring>"])
-        bindings] $
-      Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-        list [Serialization.cst @@ string "letfn"],
-        list [sqBrackets (var "fnSpecs")],
-        body]))
-    letOther :: TTerm L.LetKind -> TTerm [(Expr, Expr)] -> TTerm [Expr] -> TTerm Expr
-    letOther kind bindingPairs body = lets [
-      "kw">: cases L._LetKind kind Nothing [
-        L._LetKind_parallel>>: constant $ string "let",
-        L._LetKind_sequential>>: constant $ string "let*",
-        L._LetKind_recursive>>: constant $ string "letrec"],
-      "bindingExprs">: Lists.map (lambda "p" $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Pairs.first (var "p"), Pairs.second (var "p")]))
-        bindingPairs] $
-      Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-        list [Serialization.cst @@ var "kw"],
-        list [Serialization.parens @@ (Serialization.spaceSep @@ var "bindingExprs")],
-        body]))
-
--- | The keyword for list construction
-listKeyword :: TTermDefinition (L.Dialect -> String)
-listKeyword = define "listKeyword" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ string "list",
-    L._Dialect_emacsLisp>>: constant $ string "list",
-    L._Dialect_commonLisp>>: constant $ string "cl:list",
-    L._Dialect_scheme>>: constant $ string "list"]
-
--- | Serialize a list literal
-listLiteralToExpr :: TTermDefinition (L.Dialect -> L.ListLiteral -> Expr)
-listLiteralToExpr = define "listLiteralToExpr" $
-  lambda "d" $ lambda "ll" $ lets [
-    "elems">: Lists.map (expressionToExpr @@ var "d") (project L._ListLiteral L._ListLiteral_elements @@ var "ll"),
-    "quoted">: project L._ListLiteral L._ListLiteral_quoted @@ var "ll"] $
-    Logic.ifElse (var "quoted")
-      -- '(a b c)
-      (Serialization.noSep @@ list [
-        Serialization.cst @@ string "'",
-        Serialization.parens @@ (Serialization.spaceSep @@ var "elems")])
-      -- (list a b c) or (cl:list a b c)
-      (Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-        (list [Serialization.cst @@ (listKeyword @@ var "d")])
-        (var "elems")))
-
--- | Format a bigfloat value as a dialect-specific literal string.
--- Special values (NaN, ±Infinity) use dialect-specific syntax.
-formatLispFloat :: TTermDefinition (L.Dialect -> Double -> String)
-formatLispFloat = define "formatLispFloat" $
-  lambda "d" $ lambda "v" $
-    "s" <~ Literals.showBigfloat (var "v") $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (cases L._Dialect (var "d") Nothing [
-        L._Dialect_clojure>>: constant $ string "Double/NaN",
-        L._Dialect_scheme>>: constant $ string "+nan.0",
-        L._Dialect_commonLisp>>: constant $ string "+hydra-nan+",
-        L._Dialect_emacsLisp>>: constant $ string "0.0e+NaN"]) $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (cases L._Dialect (var "d") Nothing [
-        L._Dialect_clojure>>: constant $ string "Double/POSITIVE_INFINITY",
-        L._Dialect_scheme>>: constant $ string "+inf.0",
-        L._Dialect_commonLisp>>: constant $ string "+hydra-pos-inf+",
-        L._Dialect_emacsLisp>>: constant $ string "1.0e+INF"]) $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (cases L._Dialect (var "d") Nothing [
-        L._Dialect_clojure>>: constant $ string "Double/NEGATIVE_INFINITY",
-        L._Dialect_scheme>>: constant $ string "-inf.0",
-        L._Dialect_commonLisp>>: constant $ string "+hydra-neg-inf+",
-        L._Dialect_emacsLisp>>: constant $ string "-1.0e+INF"])
-      (var "s")
-
--- | Serialize a literal value
-literalToExpr :: TTermDefinition (L.Dialect -> L.Literal -> Expr)
-literalToExpr = define "literalToExpr" $
-  lambda "d" $ lambda "lit" $
-    cases L._Literal (var "lit") Nothing [
-      L._Literal_integer>>: lambda "i" $
-        Serialization.cst @@ (Literals.showBigint (project L._IntegerLiteral L._IntegerLiteral_value @@ var "i")),
-      L._Literal_float>>: lambda "f" $
-        Serialization.cst @@ (formatLispFloat @@ var "d" @@ (project L._FloatLiteral L._FloatLiteral_value @@ var "f")),
-      L._Literal_string>>: lambda "s" $
-        -- Escape backslashes first, then control characters and double-quotes.
-        -- Common Lisp does not support \n, \t, \r escape sequences in strings,
-        -- so for CL we embed the literal characters directly (multi-line strings are valid).
-        "e1" <~ Strings.intercalate (string "\\\\") (Strings.splitOn (string "\\") (var "s")) $
-        cases L._Dialect (var "d") Nothing [
-          L._Dialect_commonLisp>>: constant $
-            -- CL only: escape double-quotes; leave control characters as literal bytes
-            "escaped" <~ Strings.intercalate (string "\\\"") (Strings.splitOn (string "\"") (var "e1")) $
-            Serialization.cst @@ (Strings.cat (list [string "\"", var "escaped", string "\""])),
-          L._Dialect_clojure>>: constant $
-            "e2" <~ Strings.intercalate (string "\\n") (Strings.splitOn (Strings.fromList (list [int32 10])) (var "e1")) $
-            "e3" <~ Strings.intercalate (string "\\r") (Strings.splitOn (Strings.fromList (list [int32 13])) (var "e2")) $
-            "e4" <~ Strings.intercalate (string "\\t") (Strings.splitOn (Strings.fromList (list [int32 9])) (var "e3")) $
-            "escaped" <~ Strings.intercalate (string "\\\"") (Strings.splitOn (string "\"") (var "e4")) $
-            Serialization.cst @@ (Strings.cat (list [string "\"", var "escaped", string "\""])),
-          L._Dialect_emacsLisp>>: constant $
-            "e2" <~ Strings.intercalate (string "\\n") (Strings.splitOn (Strings.fromList (list [int32 10])) (var "e1")) $
-            "e3" <~ Strings.intercalate (string "\\r") (Strings.splitOn (Strings.fromList (list [int32 13])) (var "e2")) $
-            "e4" <~ Strings.intercalate (string "\\t") (Strings.splitOn (Strings.fromList (list [int32 9])) (var "e3")) $
-            "escaped" <~ Strings.intercalate (string "\\\"") (Strings.splitOn (string "\"") (var "e4")) $
-            Serialization.cst @@ (Strings.cat (list [string "\"", var "escaped", string "\""])),
-          L._Dialect_scheme>>: constant $
-            "e2" <~ Strings.intercalate (string "\\n") (Strings.splitOn (Strings.fromList (list [int32 10])) (var "e1")) $
-            "e3" <~ Strings.intercalate (string "\\r") (Strings.splitOn (Strings.fromList (list [int32 13])) (var "e2")) $
-            "e4" <~ Strings.intercalate (string "\\t") (Strings.splitOn (Strings.fromList (list [int32 9])) (var "e3")) $
-            "escaped" <~ Strings.intercalate (string "\\\"") (Strings.splitOn (string "\"") (var "e4")) $
-            Serialization.cst @@ (Strings.cat (list [string "\"", var "escaped", string "\""]))],
-      L._Literal_character>>: lambda "c" $ lets [
-        "ch">: project L._CharacterLiteral L._CharacterLiteral_value @@ var "c"] $
-        cases L._Dialect (var "d") Nothing [
-          L._Dialect_clojure>>: constant $ Serialization.cst @@ Strings.cat2 (string "\\") (var "ch"),
-          L._Dialect_emacsLisp>>: constant $ Serialization.cst @@ Strings.cat2 (string "?") (var "ch"),
-          L._Dialect_commonLisp>>: constant $ Serialization.cst @@ Strings.cat2 (string "#\\") (var "ch"),
-          L._Dialect_scheme>>: constant $ Serialization.cst @@ Strings.cat2 (string "#\\") (var "ch")],
-      L._Literal_boolean>>: lambda "b" $
-        Logic.ifElse (var "b") (trueExpr @@ var "d") (falseExpr @@ var "d"),
-      L._Literal_nil>>: constant $ nilExpr @@ var "d",
-      L._Literal_keyword>>: lambda "k" $ keywordToExpr @@ var "d" @@ var "k",
-      L._Literal_symbol>>: lambda "s" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "'", symbolToExpr @@ var "s"]]
-
--- | Serialize a macro definition
-macroDefinitionToExpr :: TTermDefinition (L.Dialect -> L.MacroDefinition -> Expr)
-macroDefinitionToExpr = define "macroDefinitionToExpr" $
-  lambda "d" $ lambda "mdef" $ lets [
-    "name">: symbolToExpr @@ (project L._MacroDefinition L._MacroDefinition_name @@ var "mdef"),
-    "params">: Lists.map symbolToExpr (project L._MacroDefinition L._MacroDefinition_params @@ var "mdef"),
-    "body">: Lists.map (expressionToExpr @@ var "d") (project L._MacroDefinition L._MacroDefinition_body @@ var "mdef")] $
-    cases L._Dialect (var "d") Nothing [
-      -- (defmacro name [params] body)
-      L._Dialect_clojure>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "defmacro", var "name"],
-          list [sqBrackets (var "params")],
-          var "body"]))),
-      -- (defmacro name (params) body)
-      L._Dialect_emacsLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "defmacro", var "name"],
-          list [Serialization.parens @@ (Serialization.spaceSep @@ var "params")],
-          var "body"]))),
-      -- (defmacro name (params) body)
-      L._Dialect_commonLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "defmacro", var "name"],
-          list [Serialization.parens @@ (Serialization.spaceSep @@ var "params")],
-          var "body"]))),
-      -- (define-syntax name ...)
-      L._Dialect_scheme>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "define-syntax", var "name"],
-          var "body"])))]
-
--- | Serialize a map literal
-mapLiteralToExpr :: TTermDefinition (L.Dialect -> L.MapLiteral -> Expr)
-mapLiteralToExpr = define "mapLiteralToExpr" $
-  lambda "d" $ lambda "ml" $ lets [
-    "entries">: project L._MapLiteral L._MapLiteral_entries @@ var "ml"] $
-    cases L._Dialect (var "d") Nothing [
-      -- {:key1 val1 :key2 val2} in Clojure
-      L._Dialect_clojure>>: constant $
-        Serialization.brackets @@ (asTerm Serialization.curlyBraces) @@ (asTerm Serialization.inlineStyle) @@
-          (Serialization.spaceSep @@ (Lists.concat (Lists.map (lambda "e" $ list [
-            expressionToExpr @@ var "d" @@ (project L._MapEntry L._MapEntry_key @@ var "e"),
-            expressionToExpr @@ var "d" @@ (project L._MapEntry L._MapEntry_value @@ var "e")])
-            (var "entries")))),
-      -- alist: '((key1 . val1) (key2 . val2)) in CL/EL — quoted because CL defstruct
-      -- constructors take keyword args, and the bootstrap data uses positional calls
-      L._Dialect_emacsLisp>>: constant $ mapAsAlist (var "d") (var "entries"),
-      L._Dialect_commonLisp>>: constant $ mapAsAlist (var "d") (var "entries"),
-      -- (list (cons key1 val1) (cons key2 val2) ...) in Scheme — evaluated, not quoted
-      L._Dialect_scheme>>: constant $ mapAsConsExpressions (var "d") (var "entries")]
-  where
-    mapAsAlist :: TTerm L.Dialect -> TTerm [L.MapEntry] -> TTerm Expr
-    mapAsAlist d entries =
-      Serialization.noSep @@ list [
-        Serialization.cst @@ string "'",
-        Serialization.parens @@ (Serialization.spaceSep @@
-          Lists.map (lambda "e" $
-            Serialization.parens @@ (Serialization.spaceSep @@ list [
-              expressionToExpr @@ d @@ (project L._MapEntry L._MapEntry_key @@ var "e"),
-              Serialization.cst @@ string ".",
-              expressionToExpr @@ d @@ (project L._MapEntry L._MapEntry_value @@ var "e")]))
-            entries)]
-    mapAsConsExpressions :: TTerm L.Dialect -> TTerm [L.MapEntry] -> TTerm Expr
-    mapAsConsExpressions d entries =
-      Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-        (list [Serialization.cst @@ string "list"])
-        (Lists.map (lambda "e" $
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "cons",
-            expressionToExpr @@ d @@ (project L._MapEntry L._MapEntry_key @@ var "e"),
-            expressionToExpr @@ d @@ (project L._MapEntry L._MapEntry_value @@ var "e")]))
-          entries))
-
--- | Serialize a module declaration
-moduleDeclarationToExpr :: TTermDefinition (L.Dialect -> L.ModuleDeclaration -> Expr)
-moduleDeclarationToExpr = define "moduleDeclarationToExpr" $
-  lambda "d" $ lambda "mdecl" $ lets [
-    "name">: unwrap L._NamespaceName @@ (project L._ModuleDeclaration L._ModuleDeclaration_name @@ var "mdecl")] $
-    cases L._Dialect (var "d") Nothing [
-      -- (ns name)
-      L._Dialect_clojure>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "ns",
-          Serialization.cst @@ var "name"]),
-      -- (require 'cl-lib) (provide 'name)
-      L._Dialect_emacsLisp>>: constant $
-        Serialization.newlineSep @@ list [
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "require",
-            Serialization.noSep @@ list [Serialization.cst @@ string "'", Serialization.cst @@ string "cl-lib"]]),
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "provide",
-            Serialization.noSep @@ list [Serialization.cst @@ string "'", Serialization.cst @@ var "name"]])],
-      -- (defpackage :name) (in-package :name)
-      L._Dialect_commonLisp>>: constant $
-        Serialization.newlineSep @@ list [
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "defpackage",
-            Serialization.cst @@ Strings.cat2 (string ":") (var "name")]),
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "in-package",
-            Serialization.cst @@ Strings.cat2 (string ":") (var "name")])],
-      -- (define-library (name))
-      L._Dialect_scheme>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "define-library",
-          Serialization.parens @@ (Serialization.cst @@ var "name")])]
-
--- | Nil expression
-nilExpr :: TTermDefinition (L.Dialect -> Expr)
-nilExpr = define "nilExpr" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ Serialization.cst @@ string "nil",
-    L._Dialect_emacsLisp>>: constant $ Serialization.cst @@ string "nil",
-    L._Dialect_commonLisp>>: constant $ Serialization.cst @@ string "cl:nil",
-    L._Dialect_scheme>>: constant $ Serialization.cst @@ string "'()"]
-
--- | Serialize a not expression: (not expr)
-notExpressionToExpr :: TTermDefinition (L.Dialect -> L.NotExpression -> Expr)
-notExpressionToExpr = define "notExpressionToExpr" $
-  lambda "d" $ lambda "notExpr" $
-    Serialization.parens @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "not",
-      expressionToExpr @@ var "d" @@ (project L._NotExpression L._NotExpression_expression @@ var "notExpr")])
-
--- | Serialize an or expression: (or expr1 expr2 ...)
-orExpressionToExpr :: TTermDefinition (L.Dialect -> L.OrExpression -> Expr)
-orExpressionToExpr = define "orExpressionToExpr" $
-  lambda "d" $ lambda "orExpr" $
-    Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-      (list [Serialization.cst @@ string "or"])
-      (Lists.map (expressionToExpr @@ var "d") (project L._OrExpression L._OrExpression_expressions @@ var "orExpr")))
-
--- | Serialize a full Lisp program
-programToExpr :: TTermDefinition (L.Program -> Expr)
-programToExpr = define "programToExpr" $
-  lambda "prog" $ lets [
-    "d">: project L._Program L._Program_dialect @@ var "prog",
-    "modDecl">: project L._Program L._Program_module @@ var "prog",
-    "imports">: project L._Program L._Program_imports @@ var "prog",
-    "exports">: project L._Program L._Program_exports @@ var "prog",
-    "forms">: project L._Program L._Program_forms @@ var "prog",
-    "formPart">: Lists.map (topLevelFormWithCommentsToExpr @@ var "d") (var "forms"),
-    -- Helper: get import module names as strings
-    "importNames">: Lists.map (lambda "idecl" $
-      unwrap L._NamespaceName @@ (project L._ImportDeclaration L._ImportDeclaration_module @@ var "idecl"))
-      (var "imports"),
-    -- Helper: get all export symbols as expr strings
-    "exportSyms">: Lists.concat (Lists.map (lambda "edecl" $
-      Lists.map symbolToExpr (project L._ExportDeclaration L._ExportDeclaration_symbols @@ var "edecl"))
-      (var "exports"))] $
-    cases L._Dialect (var "d") Nothing [
-      -- Clojure: (ns name (:require [dep1 :refer :all] [dep2 :refer :all] ...)) then forms
-      L._Dialect_clojure>>: constant $
-        Maybes.maybe
-          (Serialization.doubleNewlineSep @@ var "formPart")
-          (lambda "m" $ lets [
-            "nameStr">: unwrap L._NamespaceName @@ (project L._ModuleDeclaration L._ModuleDeclaration_name @@ var "m"),
-            "requireClauses">: Lists.map (lambda "imp" $
-              sqBrackets (list [
-                Serialization.cst @@ var "imp",
-                Serialization.cst @@ string ":refer",
-                Serialization.cst @@ string ":all"]))
-              (var "importNames"),
-            "nsForm">: Logic.ifElse (Lists.null (var "requireClauses"))
-              (Serialization.parens @@ (Serialization.spaceSep @@ list [
-                Serialization.cst @@ string "ns",
-                Serialization.cst @@ var "nameStr"]))
-              (Serialization.parens @@ (Serialization.newlineSep @@ list [
-                Serialization.spaceSep @@ list [
-                  Serialization.cst @@ string "ns",
-                  Serialization.cst @@ var "nameStr"],
-                Serialization.spaceSep @@ Lists.concat2
-                  (list [Serialization.cst @@ string "  (:require"])
-                  (var "requireClauses"),
-                Serialization.cst @@ string ")"]))] $
-            -- Extract variable definition names for forward declaration
-            "varNames" <~ Lists.concat (Lists.map (lambda "fwc" $
-              lets ["form">: project L._TopLevelFormWithComments L._TopLevelFormWithComments_form @@ var "fwc"] $
-              cases L._TopLevelForm (var "form") (Just (list ([] :: [TTerm Expr]))) [
-                L._TopLevelForm_variable>>: lambda "vd" $
-                  list [symbolToExpr @@ (project L._VariableDefinition L._VariableDefinition_name @@ var "vd")],
-                L._TopLevelForm_function>>: lambda "fd" $
-                  list [symbolToExpr @@ (project L._FunctionDefinition L._FunctionDefinition_name @@ var "fd")]])
-              (var "forms")) $
-            -- (declare name1 name2 ...) for forward references
-            "declareForm" <~ Logic.ifElse (Lists.null (var "varNames"))
-              (list ([] :: [TTerm Expr]))
-              (list [Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-                (list [Serialization.cst @@ string "declare"])
-                (var "varNames"))]) $
-            Serialization.doubleNewlineSep @@ Lists.concat (list [
-              list [var "nsForm"],
-              var "declareForm",
-              var "formPart"]))
-          (var "modDecl"),
-      -- Emacs Lisp: (require 'cl-lib) (require 'dep1) ... forms... (provide 'name)
-      L._Dialect_emacsLisp>>: constant $
-        Maybes.maybe
-          (Serialization.doubleNewlineSep @@ var "formPart")
-          (lambda "m" $ lets [
-            "nameStr">: unwrap L._NamespaceName @@ (project L._ModuleDeclaration L._ModuleDeclaration_name @@ var "m"),
-            "requireClLib">: Serialization.parens @@ (Serialization.spaceSep @@ list [
-              Serialization.cst @@ string "require",
-              Serialization.noSep @@ list [Serialization.cst @@ string "'", Serialization.cst @@ string "cl-lib"]]),
-            "requireImports">: Lists.map (lambda "imp" $
-              Serialization.parens @@ (Serialization.spaceSep @@ list [
-                Serialization.cst @@ string "require",
-                Serialization.noSep @@ list [Serialization.cst @@ string "'", Serialization.cst @@ var "imp"]]))
-              (var "importNames"),
-            "provideForm">: Serialization.parens @@ (Serialization.spaceSep @@ list [
-              Serialization.cst @@ string "provide",
-              Serialization.noSep @@ list [Serialization.cst @@ string "'", Serialization.cst @@ var "nameStr"]])] $
-            Serialization.doubleNewlineSep @@ Lists.concat (list [
-              list [var "requireClLib"],
-              var "requireImports",
-              var "formPart",
-              list [var "provideForm"]]))
-          (var "modDecl"),
-      -- Common Lisp: (defpackage :name (:use :cl :dep1 :dep2 ...) (:export :sym1 :sym2 ...)) (in-package :name) forms...
-      L._Dialect_commonLisp>>: constant $
-        Maybes.maybe
-          (Serialization.doubleNewlineSep @@ var "formPart")
-          (lambda "m" $ lets [
-            "nameStr">: unwrap L._NamespaceName @@ (project L._ModuleDeclaration L._ModuleDeclaration_name @@ var "m"),
-            "colonName">: Strings.cat2 (string ":") (var "nameStr"),
-            -- (:use :cl :dep1 :dep2 ...)
-            "useClause">: Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-              (list [Serialization.cst @@ string ":use", Serialization.cst @@ string ":cl"])
-              (Lists.map (lambda "imp" $ Serialization.cst @@ Strings.cat2 (string ":") (var "imp"))
-                (var "importNames"))),
-            -- (:export :sym1 :sym2 ...)
-            "exportClause">: Logic.ifElse (Lists.null (var "exportSyms"))
-              (list ([] :: [TTerm Expr]))
-              (list [Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-                (list [Serialization.cst @@ string ":export"])
-                (Lists.map (lambda "s" $ Serialization.noSep @@ list [Serialization.cst @@ string ":", var "s"]) (var "exportSyms")))]),
-            -- (defpackage :name (:use ...) (:export ...))
-            "defpkgForm">: Serialization.parens @@ (Serialization.newlineSep @@ Lists.concat (list [
-              list [Serialization.spaceSep @@ list [
-                Serialization.cst @@ string "defpackage",
-                Serialization.cst @@ var "colonName"]],
-              list [var "useClause"],
-              var "exportClause"])),
-            "inpkgForm">: Serialization.parens @@ (Serialization.spaceSep @@ list [
-              Serialization.cst @@ string "in-package",
-              Serialization.cst @@ var "colonName"])] $
-            Serialization.doubleNewlineSep @@ Lists.concat (list [
-              list [var "defpkgForm", var "inpkgForm"],
-              var "formPart"]))
-          (var "modDecl"),
-      -- Scheme: wrap everything in (define-library (name ...) (export ...) (import ...) (begin ...))
-      L._Dialect_scheme>>: constant $
-        Maybes.maybe
-          (Serialization.doubleNewlineSep @@ var "formPart")
-          (lambda "m" $ lets [
-            "nameStr">: unwrap L._NamespaceName @@ (project L._ModuleDeclaration L._ModuleDeclaration_name @@ var "m"),
-            "nameParts">: Lists.map (lambda "p" $ Formatting.convertCaseCamelToLowerSnake @@ var "p")
-              (Strings.splitOn (string ".") (var "nameStr")),
-            "nameExpr">: Serialization.parens @@ (Serialization.spaceSep @@
-              Lists.map (lambda "p" $ Serialization.cst @@ var "p") (var "nameParts")),
-            -- Build import library names: split each namespace on dots for R7RS (import (hydra core) ...)
-            "domainImportExprs">: Lists.map (lambda "idecl" $ lets [
-              "nsName">: unwrap L._NamespaceName @@ (project L._ImportDeclaration L._ImportDeclaration_module @@ var "idecl"),
-              "nsParts">: Lists.map (lambda "p" $ Formatting.convertCaseCamelToLowerSnake @@ var "p")
-                (Strings.splitOn (string ".") (var "nsName"))] $
-              Serialization.parens @@ (Serialization.spaceSep @@
-                Lists.map (lambda "p" $ Serialization.cst @@ var "p") (var "nsParts")))
-              (var "imports"),
-            -- Combine (scheme base) + domain imports into a single (import ...) clause
-            "schemeBaseExpr">: Serialization.parens @@ (Serialization.spaceSep @@ list [
-              Serialization.cst @@ string "scheme",
-              Serialization.cst @@ string "base"]),
-            "allImportExprs">: Lists.concat2
-              (list [var "schemeBaseExpr"])
-              (var "domainImportExprs"),
-            "importClause">: Serialization.parens @@ (Serialization.spaceSep @@
-              Lists.concat2 (list [Serialization.cst @@ string "import"]) (var "allImportExprs")),
-            -- Export clause (only if there are exports)
-            "exportClauses">: Lists.map (lambda "edecl" $ exportDeclarationToExpr @@ var "d" @@ var "edecl") (var "exports"),
-            "beginClause">: Serialization.parens @@ (Serialization.newlineSep @@
-              Lists.concat2
-                (list [Serialization.cst @@ string "begin"])
-                (var "formPart"))] $
-            Serialization.parens @@ (Serialization.newlineSep @@
-              Lists.concat (list [
-                list [Serialization.spaceSep @@ list [
-                  Serialization.cst @@ string "define-library",
-                  var "nameExpr"]],
-                var "exportClauses",
-                list [var "importClause"],
-                list [var "beginClause"]])))
-          (var "modDecl")]
-
--- | Serialize a record type definition
-recordTypeDefinitionToExpr :: TTermDefinition (L.Dialect -> L.RecordTypeDefinition -> Expr)
-recordTypeDefinitionToExpr = define "recordTypeDefinitionToExpr" $
-  lambda "d" $ lambda "rdef" $ lets [
-    "name">: symbolToExpr @@ (project L._RecordTypeDefinition L._RecordTypeDefinition_name @@ var "rdef"),
-    "fields">: Lists.map (lambda "f" $ symbolToExpr @@ (project L._FieldDefinition L._FieldDefinition_name @@ var "f"))
-      (project L._RecordTypeDefinition L._RecordTypeDefinition_fields @@ var "rdef")] $
-    cases L._Dialect (var "d") Nothing [
-      -- (defrecord Name [field1 field2])
-      -- Also emit (defn make-Name [field1 field2] (->Name field1 field2)) for uniform constructor calls
-      L._Dialect_clojure>>: constant $ lets [
-        "nameStr">: unwrap L._Symbol @@ (project L._RecordTypeDefinition L._RecordTypeDefinition_name @@ var "rdef"),
-        "fieldNames">: Lists.map (lambda "f" $ unwrap L._Symbol @@ (project L._FieldDefinition L._FieldDefinition_name @@ var "f"))
-          (project L._RecordTypeDefinition L._RecordTypeDefinition_fields @@ var "rdef"),
-        "defrecordForm">: Serialization.parens @@ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "defrecord",
-          var "name",
-          sqBrackets (var "fields")]),
-        "makeAlias">: Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-          list [Serialization.cst @@ string "defn",
-            Serialization.cst @@ Strings.cat2 (string "make-") (var "nameStr")],
-          list [sqBrackets (var "fields")],
-          list [Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-            (list [Serialization.cst @@ Strings.cat2 (string "->") (var "nameStr")])
-            (Lists.map (lambda "fn" $ Serialization.cst @@ var "fn") (var "fieldNames")))]]))] $
-        Serialization.newlineSep @@ list [var "defrecordForm", var "makeAlias"],
-      -- (cl-defstruct name field1 field2)
-      L._Dialect_emacsLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "cl-defstruct", var "name"],
-          var "fields"]))),
-      -- (cl:defstruct name field1 field2)
-      L._Dialect_commonLisp>>: constant $
-        Serialization.parens @@ (Serialization.spaceSep @@ (Lists.concat (list [
-          list [Serialization.cst @@ string "cl:defstruct", var "name"],
-          var "fields"]))),
-      -- R7RS/SRFI-9: (define-record-type name (make-name f1 f2) name? (f1 name-f1) (f2 name-f2))
-      -- The Coder passes snake_case names directly, so no case conversion is needed here.
-      L._Dialect_scheme>>: constant $ lets [
-        "nameStr">: unwrap L._Symbol @@ (project L._RecordTypeDefinition L._RecordTypeDefinition_name @@ var "rdef"),
-        "fieldNames">: Lists.map (lambda "f" $ unwrap L._Symbol @@ (project L._FieldDefinition L._FieldDefinition_name @@ var "f"))
-          (project L._RecordTypeDefinition L._RecordTypeDefinition_fields @@ var "rdef"),
-        "constructor">: Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-          (list [Serialization.cst @@ Strings.cat2 (string "make-") (var "nameStr")])
-          (Lists.map (lambda "fn" $ Serialization.cst @@ var "fn") (var "fieldNames"))),
-        "predicate">: Serialization.cst @@ Strings.cat2 (var "nameStr") (string "?"),
-        "accessors">: Lists.map (lambda "fn" $
-          Serialization.parens @@ (Serialization.spaceSep @@ list [
-            Serialization.cst @@ var "fn",
-            Serialization.cst @@ Strings.cat (list [var "nameStr", string "-", var "fn"])]))
-          (var "fieldNames")] $
-        Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat (list [
-          list [Serialization.cst @@ string "define-record-type", var "name", var "constructor", var "predicate"],
-          var "accessors"]))]
-
--- | Serialize an S-expression (escape hatch)
-sExpressionToExpr :: TTermDefinition (L.SExpression -> Expr)
-sExpressionToExpr = define "sExpressionToExpr" $
-  lambda "sexpr" $
-    cases L._SExpression (var "sexpr") Nothing [
-      L._SExpression_atom>>: lambda "a" $ Serialization.cst @@ var "a",
-      L._SExpression_list>>: lambda "elems" $
-        Serialization.parens @@ (Serialization.spaceSep @@ Lists.map sExpressionToExpr (var "elems"))]
-
--- | Serialize a set literal
-setLiteralToExpr :: TTermDefinition (L.Dialect -> L.SetLiteral -> Expr)
-setLiteralToExpr = define "setLiteralToExpr" $
-  lambda "d" $ lambda "sl" $ lets [
-    "elems">: Lists.map (expressionToExpr @@ var "d") (project L._SetLiteral L._SetLiteral_elements @@ var "sl")] $
-    cases L._Dialect (var "d") Nothing [
-      -- #{1 2 3} in Clojure
-      L._Dialect_clojure>>: constant $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "#",
-          Serialization.brackets @@ (asTerm Serialization.curlyBraces) @@ (asTerm Serialization.inlineStyle) @@
-            (Serialization.spaceSep @@ var "elems")],
-      -- (list->set (list 1 2 3)) as a fallback in others
-      L._Dialect_emacsLisp>>: constant $ setAsList (string "list") (var "elems"),
-      L._Dialect_commonLisp>>: constant $ setAsList (string "cl:list") (var "elems"),
-      L._Dialect_scheme>>: constant $ setAsList (string "list") (var "elems")]
-  where
-    setAsList :: TTerm String -> TTerm [Expr] -> TTerm Expr
-    setAsList kw elems =
-      Serialization.parens @@ (Serialization.spaceSep @@ Lists.concat2
-        (list [Serialization.cst @@ kw])
-        elems)
-
--- | Serialize a symbol
-symbolToExpr :: TTermDefinition (L.Symbol -> Expr)
-symbolToExpr = define "symbolToExpr" $
-  lambda "s" $ Serialization.cst @@ (unwrap L._Symbol @@ var "s")
-
--- | Serialize a top-level form
-topLevelFormToExpr :: TTermDefinition (L.Dialect -> L.TopLevelForm -> Expr)
-topLevelFormToExpr = define "topLevelFormToExpr" $
-  lambda "d" $ lambda "form" $
-    cases L._TopLevelForm (var "form") Nothing [
-      L._TopLevelForm_function>>: lambda "f" $ functionDefinitionToExpr @@ var "d" @@ var "f",
-      L._TopLevelForm_variable>>: lambda "v" $ variableDefinitionToExpr @@ var "d" @@ var "v",
-      L._TopLevelForm_constant>>: lambda "c" $ constantDefinitionToExpr @@ var "d" @@ var "c",
-      L._TopLevelForm_recordType>>: lambda "r" $ recordTypeDefinitionToExpr @@ var "d" @@ var "r",
-      L._TopLevelForm_macro>>: lambda "m" $ macroDefinitionToExpr @@ var "d" @@ var "m",
-      L._TopLevelForm_expression>>: lambda "e" $ expressionToExpr @@ var "d" @@ var "e"]
-
--- | Serialize a top-level form with comments
-topLevelFormWithCommentsToExpr :: TTermDefinition (L.Dialect -> L.TopLevelFormWithComments -> Expr)
-topLevelFormWithCommentsToExpr = define "topLevelFormWithCommentsToExpr" $
-  lambda "d" $ lambda "fwc" $ lets [
-    "mdoc">: project L._TopLevelFormWithComments L._TopLevelFormWithComments_doc @@ var "fwc",
-    "mcomment">: project L._TopLevelFormWithComments L._TopLevelFormWithComments_comment @@ var "fwc",
-    "form">: project L._TopLevelFormWithComments L._TopLevelFormWithComments_form @@ var "fwc",
-    "docPart">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "ds" $ list [docstringToExpr @@ var "ds"])
-      (var "mdoc"),
-    "commentPart">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "c" $ list [commentToExpr @@ var "c"])
-      (var "mcomment"),
-    "formExpr">: topLevelFormToExpr @@ var "d" @@ var "form"] $
-    Serialization.newlineSep @@ (Lists.concat (list [
-      var "commentPart", var "docPart", list [var "formExpr"]]))
-
--- | Boolean true expression
-trueExpr :: TTermDefinition (L.Dialect -> Expr)
-trueExpr = define "trueExpr" $
-  lambda "d" $ cases L._Dialect (var "d") Nothing [
-    L._Dialect_clojure>>: constant $ Serialization.cst @@ string "true",
-    L._Dialect_emacsLisp>>: constant $ Serialization.cst @@ string "t",
-    L._Dialect_commonLisp>>: constant $ Serialization.cst @@ string "cl:t",
-    L._Dialect_scheme>>: constant $ Serialization.cst @@ string "#t"]
-
--- | Serialize a variable definition
-variableDefinitionToExpr :: TTermDefinition (L.Dialect -> L.VariableDefinition -> Expr)
-variableDefinitionToExpr = define "variableDefinitionToExpr" $
-  lambda "d" $ lambda "vdef" $ lets [
-    "name">: symbolToExpr @@ (project L._VariableDefinition L._VariableDefinition_name @@ var "vdef"),
-    "value">: expressionToExpr @@ var "d" @@ (project L._VariableDefinition L._VariableDefinition_value @@ var "vdef")] $
-    Serialization.parens @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ (defKeyword @@ var "d"),
-      var "name",
-      var "value"])
-
--- | Serialize a variable reference
-variableReferenceToExpr :: TTermDefinition (L.Dialect -> L.VariableReference -> Expr)
-variableReferenceToExpr = define "variableReferenceToExpr" $
-  lambda "d" $ lambda "vref" $ lets [
-    "name">: symbolToExpr @@ (project L._VariableReference L._VariableReference_name @@ var "vref"),
-    "isFnNs">: project L._VariableReference L._VariableReference_functionNamespace @@ var "vref"] $
-    Logic.ifElse (var "isFnNs")
-      (cases L._Dialect (var "d") Nothing [
-        L._Dialect_commonLisp>>: constant $
-          Serialization.noSep @@ list [Serialization.cst @@ string "#'", var "name"],
-        L._Dialect_clojure>>: constant $ var "name",
-        L._Dialect_emacsLisp>>: constant $ var "name",
-        L._Dialect_scheme>>: constant $ var "name"])
-      (var "name")
-
--- | Serialize a vector literal
-vectorLiteralToExpr :: TTermDefinition (L.Dialect -> L.VectorLiteral -> Expr)
-vectorLiteralToExpr = define "vectorLiteralToExpr" $
-  lambda "d" $ lambda "vl" $ lets [
-    "elems">: Lists.map (expressionToExpr @@ var "d") (project L._VectorLiteral L._VectorLiteral_elements @@ var "vl")] $
-    cases L._Dialect (var "d") Nothing [
-      -- [1 2 3] in Clojure and Emacs Lisp
-      L._Dialect_clojure>>: constant $ sqBrackets (var "elems"),
-      L._Dialect_emacsLisp>>: constant $ sqBrackets (var "elems"),
-      -- #(1 2 3) in Common Lisp and Scheme
-      L._Dialect_commonLisp>>: constant $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "#",
-          Serialization.parens @@ (Serialization.spaceSep @@ var "elems")],
-      L._Dialect_scheme>>: constant $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "#",
-          Serialization.parens @@ (Serialization.spaceSep @@ var "elems")]]
diff --git a/src/main/haskell/Hydra/Sources/Lisp/Syntax.hs b/src/main/haskell/Hydra/Sources/Lisp/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Lisp/Syntax.hs
+++ /dev/null
@@ -1,1095 +0,0 @@
--- | A unified Lisp syntax model covering features common to Clojure, Emacs Lisp, Common Lisp,
--- | and Scheme (R7RS). The model captures the full S-expression structure and special forms
--- | needed for code generation across dialects. Dialect-specific serialization is left to
--- | per-dialect serializers.
-
-module Hydra.Sources.Lisp.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.lisp.syntax"
-
-define :: String -> Type -> Binding
-define = datatype ns
-
-lisp :: String -> Type
-lisp = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A unified Lisp syntax model covering Clojure, Emacs Lisp, Common Lisp, and Scheme (R7RS)."
-      ++ " Designed for code generation from Hydra types and terms.")}
-  where
-    definitions = toplevel ++ defnTypes ++ expressions ++ specialForms ++ bindings
-      ++ patterns ++ literals ++ names ++ collections ++ types ++ modules ++ misc
-
-    -- Top-level constructs
-    toplevel = [
-      program,
-      topLevelForm,
-      topLevelFormWithComments]
-
-    -- Definitions
-    defnTypes = [
-      functionDefinition,
-      variableDefinition,
-      constantDefinition,
-      recordTypeDefinition,
-      fieldDefinition,
-      macroDefinition]
-
-    -- Expressions
-    expressions = [
-      expression,
-      application,
-      lambda,
-      variableReference,
-      fieldAccess,
-      typeAnnotation]
-
-    -- Special forms
-    specialForms = [
-      ifExpression,
-      condExpression,
-      condClause,
-      caseExpression,
-      caseClause,
-      andExpression,
-      orExpression,
-      notExpression,
-      doExpression,
-      beginExpression,
-      quoteExpression,
-      quasiquoteExpression,
-      unquoteExpression,
-      splicingUnquoteExpression]
-
-    -- Let bindings
-    bindings = [
-      letExpression,
-      letKind,
-      letBinding,
-      simpleBinding,
-      destructuringBinding,
-      destructuringPattern]
-
-    -- Patterns (for case/match)
-    patterns = [
-      pattern,
-      constructorPattern,
-      literalPattern,
-      wildcardPattern]
-
-    -- Literals
-    literals = [
-      literal,
-      integerLiteral,
-      floatLiteral,
-      characterLiteral,
-      booleanStyle,
-      nilStyle]
-
-    -- Names and symbols
-    names = [
-      symbol,
-      keyword,
-      qualifiedSymbol,
-      namespaceName]
-
-    -- Collection literals
-    collections = [
-      listLiteral,
-      vectorLiteral,
-      mapLiteral,
-      mapEntry,
-      setLiteral,
-      consExpression,
-      dottedPair]
-
-    -- Type-related (for dialects with type hints)
-    types = [
-      typeHint,
-      typeSpecifier]
-
-    -- Module system
-    modules = [
-      moduleDeclaration,
-      importDeclaration,
-      importSpec,
-      exportDeclaration]
-
-    -- Miscellaneous
-    misc = [
-      comment,
-      commentStyle,
-      docstring,
-      dialect,
-      sExpression]
-
-
--- ================================================================================================
--- Top-level constructs
--- ================================================================================================
-
-program :: Binding
-program = define "Program" $
-  doc "A Lisp program, consisting of a sequence of top-level forms" $
-  T.record [
-    "dialect">:
-      doc "The target Lisp dialect" $
-      lisp "Dialect",
-    "module">:
-      doc "Optional module/namespace declaration" $
-      T.maybe (lisp "ModuleDeclaration"),
-    "imports">:
-      doc "Import/require declarations" $
-      T.list (lisp "ImportDeclaration"),
-    "exports">:
-      doc "Export/provide declarations" $
-      T.list (lisp "ExportDeclaration"),
-    "forms">:
-      doc "The top-level forms in the program" $
-      T.list (lisp "TopLevelFormWithComments")]
-
-topLevelForm :: Binding
-topLevelForm = define "TopLevelForm" $
-  doc "A top-level form in a Lisp program" $
-  T.union [
-    "function">:
-      doc "A named function definition" $
-      lisp "FunctionDefinition",
-    "variable">:
-      doc "A global variable definition" $
-      lisp "VariableDefinition",
-    "constant">:
-      doc "A constant definition" $
-      lisp "ConstantDefinition",
-    "recordType">:
-      doc "A record/struct type definition" $
-      lisp "RecordTypeDefinition",
-    "macro">:
-      doc "A macro definition" $
-      lisp "MacroDefinition",
-    "expression">:
-      doc "A bare expression at the top level" $
-      lisp "Expression"]
-
-topLevelFormWithComments :: Binding
-topLevelFormWithComments = define "TopLevelFormWithComments" $
-  doc "A top-level form together with optional documentation" $
-  T.record [
-    "doc">:
-      doc "Optional documentation string" $
-      T.maybe (lisp "Docstring"),
-    "comment">:
-      doc "Optional comment" $
-      T.maybe (lisp "Comment"),
-    "form">:
-      doc "The form itself" $
-      lisp "TopLevelForm"]
-
-
--- ================================================================================================
--- Definitions
--- ================================================================================================
-
-functionDefinition :: Binding
-functionDefinition = define "FunctionDefinition" $
-  doc ("A named function definition."
-    ++ " Serializes as (defn name [params] body) in Clojure,"
-    ++ " (defun name (params) body) in Emacs Lisp and Common Lisp,"
-    ++ " (define (name params) body) in Scheme") $
-  T.record [
-    "name">:
-      doc "The function name" $
-      lisp "Symbol",
-    "params">:
-      doc "The parameter list" $
-      T.list (lisp "Symbol"),
-    "restParam">:
-      doc "Optional rest/variadic parameter" $
-      T.maybe (lisp "Symbol"),
-    "doc">:
-      doc "Optional docstring" $
-      T.maybe (lisp "Docstring"),
-    "typeHints">:
-      doc "Optional type hints for parameters and return type" $
-      T.list (lisp "TypeHint"),
-    "body">:
-      doc "The function body (one or more expressions)" $
-      T.list (lisp "Expression")]
-
-variableDefinition :: Binding
-variableDefinition = define "VariableDefinition" $
-  doc ("A global variable definition."
-    ++ " Serializes as (def name value) in Clojure,"
-    ++ " (defvar name value) in Emacs Lisp and Common Lisp,"
-    ++ " (define name value) in Scheme") $
-  T.record [
-    "name">:
-      doc "The variable name" $
-      lisp "Symbol",
-    "value">:
-      doc "The initial value" $
-      lisp "Expression",
-    "doc">:
-      doc "Optional docstring" $
-      T.maybe (lisp "Docstring")]
-
-constantDefinition :: Binding
-constantDefinition = define "ConstantDefinition" $
-  doc ("A constant definition."
-    ++ " Serializes as (def ^:const name value) in Clojure,"
-    ++ " (defconst name value) in Emacs Lisp,"
-    ++ " (defconstant name value) in Common Lisp."
-    ++ " Scheme has no dedicated constant form; uses define.") $
-  T.record [
-    "name">:
-      doc "The constant name" $
-      lisp "Symbol",
-    "value">:
-      doc "The constant value" $
-      lisp "Expression",
-    "doc">:
-      doc "Optional docstring" $
-      T.maybe (lisp "Docstring")]
-
-recordTypeDefinition :: Binding
-recordTypeDefinition = define "RecordTypeDefinition" $
-  doc ("A record/struct type definition."
-    ++ " Serializes as (defrecord Name [fields]) in Clojure,"
-    ++ " (cl-defstruct name fields) in Emacs Lisp,"
-    ++ " (defstruct name fields) in Common Lisp,"
-    ++ " (define-record-type <Name> ...) in Scheme") $
-  T.record [
-    "name">:
-      doc "The record type name" $
-      lisp "Symbol",
-    "fields">:
-      doc "The field definitions" $
-      T.list (lisp "FieldDefinition"),
-    "doc">:
-      doc "Optional docstring" $
-      T.maybe (lisp "Docstring")]
-
-fieldDefinition :: Binding
-fieldDefinition = define "FieldDefinition" $
-  doc "A field in a record type definition" $
-  T.record [
-    "name">:
-      doc "The field name" $
-      lisp "Symbol",
-    "defaultValue">:
-      doc "Optional default value" $
-      T.maybe (lisp "Expression")]
-
-macroDefinition :: Binding
-macroDefinition = define "MacroDefinition" $
-  doc ("A macro definition."
-    ++ " Serializes as (defmacro name [params] body) in Clojure,"
-    ++ " (defmacro name (params) body) in Emacs Lisp and Common Lisp,"
-    ++ " (define-syntax name ...) in Scheme") $
-  T.record [
-    "name">:
-      doc "The macro name" $
-      lisp "Symbol",
-    "params">:
-      doc "The parameter list" $
-      T.list (lisp "Symbol"),
-    "restParam">:
-      doc "Optional rest parameter" $
-      T.maybe (lisp "Symbol"),
-    "body">:
-      doc "The macro body" $
-      T.list (lisp "Expression")]
-
-
--- ================================================================================================
--- Expressions
--- ================================================================================================
-
-expression :: Binding
-expression = define "Expression" $
-  doc "A Lisp expression" $
-  T.union [
-    "application">:
-      doc "Function application: (f arg1 arg2 ...)" $
-      lisp "Application",
-    "lambda">:
-      doc "Anonymous function" $
-      lisp "Lambda",
-    "let">:
-      doc "Local variable binding" $
-      lisp "LetExpression",
-    "if">:
-      doc "Conditional expression" $
-      lisp "IfExpression",
-    "cond">:
-      doc "Multi-branch conditional" $
-      lisp "CondExpression",
-    "case">:
-      doc "Case/match dispatch" $
-      lisp "CaseExpression",
-    "and">:
-      doc "Logical and (short-circuiting)" $
-      lisp "AndExpression",
-    "or">:
-      doc "Logical or (short-circuiting)" $
-      lisp "OrExpression",
-    "not">:
-      doc "Logical negation" $
-      lisp "NotExpression",
-    "do">:
-      doc "Sequential evaluation (progn/do/begin)" $
-      lisp "DoExpression",
-    "begin">:
-      doc "Sequential evaluation (explicit begin block)" $
-      lisp "BeginExpression",
-    "variable">:
-      doc "Variable reference" $
-      lisp "VariableReference",
-    "literal">:
-      doc "A literal value" $
-      lisp "Literal",
-    "list">:
-      doc "A list literal" $
-      lisp "ListLiteral",
-    "vector">:
-      doc "A vector literal" $
-      lisp "VectorLiteral",
-    "map">:
-      doc "A map/association literal" $
-      lisp "MapLiteral",
-    "set">:
-      doc "A set literal" $
-      lisp "SetLiteral",
-    "cons">:
-      doc "A cons expression" $
-      lisp "ConsExpression",
-    "dottedPair">:
-      doc "A dotted pair literal" $
-      lisp "DottedPair",
-    "fieldAccess">:
-      doc "Field access on a record/struct" $
-      lisp "FieldAccess",
-    "typeAnnotation">:
-      doc "A type-annotated expression" $
-      lisp "TypeAnnotation",
-    "quote">:
-      doc "A quoted expression" $
-      lisp "QuoteExpression",
-    "quasiquote">:
-      doc "A quasiquoted expression" $
-      lisp "QuasiquoteExpression",
-    "unquote">:
-      doc "An unquoted expression within a quasiquote" $
-      lisp "UnquoteExpression",
-    "splicingUnquote">:
-      doc "A splicing unquote within a quasiquote" $
-      lisp "SplicingUnquoteExpression",
-    "sExpression">:
-      doc "An arbitrary S-expression (escape hatch for dialect-specific forms)" $
-      lisp "SExpression"]
-
-application :: Binding
-application = define "Application" $
-  doc "Function application: (function arg1 arg2 ...)" $
-  T.record [
-    "function">:
-      doc "The function being applied" $
-      lisp "Expression",
-    "arguments">:
-      doc "The arguments" $
-      T.list (lisp "Expression")]
-
-lambda :: Binding
-lambda = define "Lambda" $
-  doc ("An anonymous function."
-    ++ " Serializes as (fn [params] body) in Clojure,"
-    ++ " (lambda (params) body) in Emacs Lisp, Common Lisp, and Scheme."
-    ++ " If name is provided, emits (fn name [params] body) in Clojure for self-reference.") $
-  T.record [
-    "name">:
-      doc "Optional name for self-referential lambdas (Clojure named fn)" $
-      T.maybe (lisp "Symbol"),
-    "params">:
-      doc "The parameter list" $
-      T.list (lisp "Symbol"),
-    "restParam">:
-      doc "Optional rest parameter" $
-      T.maybe (lisp "Symbol"),
-    "body">:
-      doc "The lambda body" $
-      T.list (lisp "Expression")]
-
-variableReference :: Binding
-variableReference = define "VariableReference" $
-  doc "A reference to a variable by name" $
-  T.record [
-    "name">:
-      doc "The variable name" $
-      lisp "Symbol",
-    "functionNamespace">:
-      doc ("Whether to reference from the function namespace."
-        ++ " In Lisp-2 dialects (Common Lisp), this emits #'name."
-        ++ " In Lisp-1 dialects, this has no effect.") $
-      T.boolean]
-
-fieldAccess :: Binding
-fieldAccess = define "FieldAccess" $
-  doc ("Field access on a record/struct."
-    ++ " Serializes as (:field record) in Clojure,"
-    ++ " (struct-field record) in Emacs Lisp and Common Lisp,"
-    ++ " (record-field record) in Scheme") $
-  T.record [
-    "recordType">:
-      doc "The record type name (used to form accessor name)" $
-      lisp "Symbol",
-    "field">:
-      doc "The field name" $
-      lisp "Symbol",
-    "target">:
-      doc "The expression being accessed" $
-      lisp "Expression"]
-
-typeAnnotation :: Binding
-typeAnnotation = define "TypeAnnotation" $
-  doc "An expression with a type annotation" $
-  T.record [
-    "expression">:
-      doc "The annotated expression" $
-      lisp "Expression",
-    "type">:
-      doc "The type specifier" $
-      lisp "TypeSpecifier"]
-
-
--- ================================================================================================
--- Special forms
--- ================================================================================================
-
-ifExpression :: Binding
-ifExpression = define "IfExpression" $
-  doc "Conditional: (if test then else)" $
-  T.record [
-    "condition">:
-      doc "The test expression" $
-      lisp "Expression",
-    "then">:
-      doc "The then branch" $
-      lisp "Expression",
-    "else">:
-      doc "Optional else branch" $
-      T.maybe (lisp "Expression")]
-
-condExpression :: Binding
-condExpression = define "CondExpression" $
-  doc ("Multi-branch conditional."
-    ++ " Serializes as (cond test1 expr1 test2 expr2 :else default) in Clojure,"
-    ++ " (cond (test1 expr1) (test2 expr2) (t default)) in Emacs Lisp and Common Lisp,"
-    ++ " (cond (test1 expr1) (test2 expr2) (else default)) in Scheme") $
-  T.record [
-    "clauses">:
-      doc "The condition-expression pairs" $
-      T.list (lisp "CondClause"),
-    "default">:
-      doc "Optional default expression" $
-      T.maybe (lisp "Expression")]
-
-condClause :: Binding
-condClause = define "CondClause" $
-  doc "A clause in a cond expression" $
-  T.record [
-    "condition">:
-      doc "The test condition" $
-      lisp "Expression",
-    "body">:
-      doc "The result expression" $
-      lisp "Expression"]
-
-caseExpression :: Binding
-caseExpression = define "CaseExpression" $
-  doc ("Case dispatch on a value."
-    ++ " Serializes as (case x key1 expr1 key2 expr2 default) in Clojure,"
-    ++ " (case x (key1 expr1) (key2 expr2) (otherwise default)) in Common Lisp,"
-    ++ " (case x ((key1) expr1) ((key2) expr2) (else default)) in Scheme") $
-  T.record [
-    "scrutinee">:
-      doc "The expression being dispatched on" $
-      lisp "Expression",
-    "clauses">:
-      doc "The case clauses" $
-      T.list (lisp "CaseClause"),
-    "default">:
-      doc "Optional default clause" $
-      T.maybe (lisp "Expression")]
-
-caseClause :: Binding
-caseClause = define "CaseClause" $
-  doc "A clause in a case expression" $
-  T.record [
-    "keys">:
-      doc "The matching keys (one or more datum values)" $
-      T.list (lisp "Expression"),
-    "body">:
-      doc "The result expression" $
-      lisp "Expression"]
-
-andExpression :: Binding
-andExpression = define "AndExpression" $
-  doc "Logical and: (and expr1 expr2 ...)" $
-  T.record [
-    "expressions">:
-      doc "The operand expressions" $
-      T.list (lisp "Expression")]
-
-orExpression :: Binding
-orExpression = define "OrExpression" $
-  doc "Logical or: (or expr1 expr2 ...)" $
-  T.record [
-    "expressions">:
-      doc "The operand expressions" $
-      T.list (lisp "Expression")]
-
-notExpression :: Binding
-notExpression = define "NotExpression" $
-  doc "Logical negation: (not expr)" $
-  T.record [
-    "expression">:
-      doc "The operand expression" $
-      lisp "Expression"]
-
-doExpression :: Binding
-doExpression = define "DoExpression" $
-  doc ("Sequential evaluation of expressions, returning the last."
-    ++ " Serializes as (do expr1 expr2 ...) in Clojure,"
-    ++ " (progn expr1 expr2 ...) in Emacs Lisp and Common Lisp,"
-    ++ " (begin expr1 expr2 ...) in Scheme") $
-  T.record [
-    "expressions">:
-      doc "The expressions to evaluate in sequence" $
-      T.list (lisp "Expression")]
-
-beginExpression :: Binding
-beginExpression = define "BeginExpression" $
-  doc "An explicit begin block (distinct from do for Scheme compatibility)" $
-  T.record [
-    "expressions">:
-      doc "The expressions to evaluate in sequence" $
-      T.list (lisp "Expression")]
-
-quoteExpression :: Binding
-quoteExpression = define "QuoteExpression" $
-  doc "A quoted form: 'expr or (quote expr)" $
-  T.record [
-    "body">:
-      doc "The quoted form" $
-      lisp "Expression"]
-
-quasiquoteExpression :: Binding
-quasiquoteExpression = define "QuasiquoteExpression" $
-  doc "A quasiquoted form: `expr" $
-  T.record [
-    "body">:
-      doc "The quasiquoted form" $
-      lisp "Expression"]
-
-unquoteExpression :: Binding
-unquoteExpression = define "UnquoteExpression" $
-  doc "An unquoted form within a quasiquote: ~expr or ,expr" $
-  T.record [
-    "body">:
-      doc "The unquoted form" $
-      lisp "Expression"]
-
-splicingUnquoteExpression :: Binding
-splicingUnquoteExpression = define "SplicingUnquoteExpression" $
-  doc "A splicing unquote within a quasiquote: ~@expr or ,@expr" $
-  T.record [
-    "body">:
-      doc "The spliced form" $
-      lisp "Expression"]
-
-
--- ================================================================================================
--- Let bindings
--- ================================================================================================
-
-letExpression :: Binding
-letExpression = define "LetExpression" $
-  doc ("Local variable bindings."
-    ++ " Serializes as (let [x 1 y 2] body) in Clojure (always sequential),"
-    ++ " (let ((x 1) (y 2)) body) or (let* ...) in other dialects") $
-  T.record [
-    "kind">:
-      doc "The kind of let (parallel or sequential)" $
-      lisp "LetKind",
-    "bindings">:
-      doc "The variable bindings" $
-      T.list (lisp "LetBinding"),
-    "body">:
-      doc "The body expressions" $
-      T.list (lisp "Expression")]
-
-letKind :: Binding
-letKind = define "LetKind" $
-  doc "The kind of let binding" $
-  T.enum ["parallel", "sequential", "recursive"]
-
-letBinding :: Binding
-letBinding = define "LetBinding" $
-  doc "A single binding in a let expression" $
-  T.union [
-    "simple">:
-      doc "A simple name-value binding" $
-      lisp "SimpleBinding",
-    "destructuring">:
-      doc "A destructuring binding" $
-      lisp "DestructuringBinding"]
-
-simpleBinding :: Binding
-simpleBinding = define "SimpleBinding" $
-  doc "A simple name-value binding in a let expression" $
-  T.record [
-    "name">:
-      doc "The bound variable" $
-      lisp "Symbol",
-    "value">:
-      doc "The value expression" $
-      lisp "Expression"]
-
-destructuringBinding :: Binding
-destructuringBinding = define "DestructuringBinding" $
-  doc "A destructuring binding in a let expression" $
-  T.record [
-    "pattern">:
-      doc "The destructuring pattern" $
-      lisp "DestructuringPattern",
-    "value">:
-      doc "The value to destructure" $
-      lisp "Expression"]
-
-destructuringPattern :: Binding
-destructuringPattern = define "DestructuringPattern" $
-  doc "A destructuring pattern" $
-  T.union [
-    "sequential">:
-      doc "Sequential destructuring: [a b c] in Clojure, (a b c) in others" $
-      T.list (lisp "Symbol"),
-    "associative">:
-      doc "Associative/map destructuring: {:keys [a b]} in Clojure" $
-      T.list (lisp "Symbol"),
-    "rest">:
-      doc "Destructuring with a rest element: [a b & rest] (leading symbols + rest symbol)" $
-      T.list (lisp "Symbol")]
-
-
--- ================================================================================================
--- Patterns (for case/match)
--- ================================================================================================
-
-pattern :: Binding
-pattern = define "Pattern" $
-  doc "A pattern for use in case expressions or match forms" $
-  T.union [
-    "constructor">:
-      doc "A constructor pattern (for union/sum type matching)" $
-      lisp "ConstructorPattern",
-    "literal">:
-      doc "A literal pattern" $
-      lisp "LiteralPattern",
-    "wildcard">:
-      doc "A wildcard pattern matching anything" $
-      lisp "WildcardPattern",
-    "variable">:
-      doc "A variable pattern that binds the matched value" $
-      lisp "Symbol"]
-
-constructorPattern :: Binding
-constructorPattern = define "ConstructorPattern" $
-  doc "A constructor pattern matching a tagged value" $
-  T.record [
-    "constructor">:
-      doc "The constructor/tag name" $
-      lisp "Symbol",
-    "arguments">:
-      doc "The sub-patterns for constructor arguments" $
-      T.list (lisp "Pattern")]
-
-literalPattern :: Binding
-literalPattern = define "LiteralPattern" $
-  doc "A pattern matching a literal value" $
-  T.record [
-    "value">:
-      doc "The literal to match" $
-      lisp "Literal"]
-
-wildcardPattern :: Binding
-wildcardPattern = define "WildcardPattern" $
-  doc "A wildcard pattern that matches any value" $
-  T.record []
-
-
--- ================================================================================================
--- Literals
--- ================================================================================================
-
-literal :: Binding
-literal = define "Literal" $
-  doc "A Lisp literal value" $
-  T.union [
-    "integer">:
-      doc "An integer literal" $
-      lisp "IntegerLiteral",
-    "float">:
-      doc "A floating-point literal" $
-      lisp "FloatLiteral",
-    "string">:
-      doc "A string literal" $
-      T.string,
-    "character">:
-      doc "A character literal" $
-      lisp "CharacterLiteral",
-    "boolean">:
-      doc "A boolean literal (dialect-specific rendering)" $
-      T.boolean,
-    "nil">:
-      doc "Nil/null/empty list (dialect-specific rendering)" $
-      T.unit,
-    "keyword">:
-      doc "A keyword literal" $
-      lisp "Keyword",
-    "symbol">:
-      doc "A quoted symbol literal" $
-      lisp "Symbol"]
-
-integerLiteral :: Binding
-integerLiteral = define "IntegerLiteral" $
-  doc "An integer literal" $
-  T.record [
-    "value">:
-      doc "The integer value" $
-      T.bigint,
-    "bigint">:
-      doc "Whether this is explicitly a big integer (e.g. 42N in Clojure)" $
-      T.boolean]
-
-floatLiteral :: Binding
-floatLiteral = define "FloatLiteral" $
-  doc "A floating-point literal" $
-  T.record [
-    "value">:
-      doc "The float value" $
-      T.bigfloat,
-    "precision">:
-      doc "Optional precision hint (e.g. 3.14d0 vs 3.14f0 in Common Lisp)" $
-      T.maybe T.string]
-
-characterLiteral :: Binding
-characterLiteral = define "CharacterLiteral" $
-  doc ("A character literal."
-    ++ " Concrete syntax varies: \\a (Clojure), ?a (Emacs Lisp), #\\a (Common Lisp, Scheme)") $
-  T.record [
-    "value">:
-      doc "The character value" $
-      T.string]
-
-booleanStyle :: Binding
-booleanStyle = define "BooleanStyle" $
-  doc "The style of boolean literals in a dialect" $
-  T.enum ["trueFalse", "tNil", "hashTF"]
-
-nilStyle :: Binding
-nilStyle = define "NilStyle" $
-  doc "The style of nil/null in a dialect" $
-  T.enum ["nil", "emptyList"]
-
-
--- ================================================================================================
--- Names and symbols
--- ================================================================================================
-
-symbol :: Binding
-symbol = define "Symbol" $
-  doc "A Lisp symbol (identifier)" $
-  T.wrap T.string
-
-keyword :: Binding
-keyword = define "Keyword" $
-  doc "A keyword (self-evaluating symbol). Serializes as :name in Clojure, Emacs Lisp, and Common Lisp" $
-  T.record [
-    "name">:
-      doc "The keyword name (without the leading colon)" $
-      T.string,
-    "namespace">:
-      doc "Optional namespace (e.g. my.ns/foo in Clojure)" $
-      T.maybe T.string]
-
-qualifiedSymbol :: Binding
-qualifiedSymbol = define "QualifiedSymbol" $
-  doc ("A namespace-qualified symbol."
-    ++ " Serializes as ns/name in Clojure, pkg:name or pkg::name in Common Lisp") $
-  T.record [
-    "namespace">:
-      doc "The namespace or package" $
-      T.string,
-    "name">:
-      doc "The local name" $
-      T.string]
-
-namespaceName :: Binding
-namespaceName = define "NamespaceName" $
-  doc "A namespace or package name" $
-  T.wrap T.string
-
-
--- ================================================================================================
--- Collection literals
--- ================================================================================================
-
-listLiteral :: Binding
-listLiteral = define "ListLiteral" $
-  doc "A list literal: '(1 2 3) or (list 1 2 3)" $
-  T.record [
-    "elements">:
-      doc "The list elements" $
-      T.list (lisp "Expression"),
-    "quoted">:
-      doc "Whether to use quote syntax vs constructor syntax" $
-      T.boolean]
-
-vectorLiteral :: Binding
-vectorLiteral = define "VectorLiteral" $
-  doc ("A vector literal."
-    ++ " Serializes as [1 2 3] in Clojure and Emacs Lisp,"
-    ++ " #(1 2 3) in Common Lisp and Scheme") $
-  T.record [
-    "elements">:
-      doc "The vector elements" $
-      T.list (lisp "Expression")]
-
-mapLiteral :: Binding
-mapLiteral = define "MapLiteral" $
-  doc ("A map/dictionary literal."
-    ++ " Serializes as {:a 1 :b 2} in Clojure,"
-    ++ " as an alist '((a . 1) (b . 2)) in other dialects") $
-  T.record [
-    "entries">:
-      doc "The key-value pairs" $
-      T.list (lisp "MapEntry")]
-
-mapEntry :: Binding
-mapEntry = define "MapEntry" $
-  doc "A key-value pair in a map literal" $
-  T.record [
-    "key">:
-      doc "The key expression" $
-      lisp "Expression",
-    "value">:
-      doc "The value expression" $
-      lisp "Expression"]
-
-setLiteral :: Binding
-setLiteral = define "SetLiteral" $
-  doc ("A set literal."
-    ++ " Serializes as #{1 2 3} in Clojure."
-    ++ " Other dialects use a list-based construction.") $
-  T.record [
-    "elements">:
-      doc "The set elements" $
-      T.list (lisp "Expression")]
-
-consExpression :: Binding
-consExpression = define "ConsExpression" $
-  doc "A cons expression: (cons head tail)" $
-  T.record [
-    "head">:
-      doc "The head element" $
-      lisp "Expression",
-    "tail">:
-      doc "The tail (typically a list or another cons)" $
-      lisp "Expression"]
-
-dottedPair :: Binding
-dottedPair = define "DottedPair" $
-  doc "A dotted pair literal: '(a . b). Not available in Clojure." $
-  T.record [
-    "car">:
-      doc "The first element" $
-      lisp "Expression",
-    "cdr">:
-      doc "The second element" $
-      lisp "Expression"]
-
-
--- ================================================================================================
--- Type-related
--- ================================================================================================
-
-typeHint :: Binding
-typeHint = define "TypeHint" $
-  doc ("A type hint or annotation."
-    ++ " In Clojure: ^Type name. In Common Lisp: (declare (type Type name))."
-    ++ " In Scheme and Emacs Lisp: typically unused.") $
-  T.record [
-    "name">:
-      doc "The annotated symbol" $
-      lisp "Symbol",
-    "type">:
-      doc "The type specifier" $
-      lisp "TypeSpecifier"]
-
-typeSpecifier :: Binding
-typeSpecifier = define "TypeSpecifier" $
-  doc "A type specifier" $
-  T.union [
-    "named">:
-      doc "A named type reference" $
-      lisp "Symbol",
-    "list">:
-      doc "A list type" $
-      lisp "TypeSpecifier",
-    "function">:
-      doc "A function type (params and return)" $
-      T.list (lisp "TypeSpecifier"),
-    "maybe">:
-      doc "An optional type" $
-      lisp "TypeSpecifier",
-    "map">:
-      doc "A map type (key and value type specifiers)" $
-      T.list (lisp "TypeSpecifier"),
-    "set">:
-      doc "A set type" $
-      lisp "TypeSpecifier",
-    "pair">:
-      doc "A pair/tuple type (two type specifiers)" $
-      T.list (lisp "TypeSpecifier"),
-    "either">:
-      doc "An either/union type (two type specifiers)" $
-      T.list (lisp "TypeSpecifier"),
-    "unit">:
-      doc "The unit type" $
-      T.unit]
-
-
--- ================================================================================================
--- Module system
--- ================================================================================================
-
-moduleDeclaration :: Binding
-moduleDeclaration = define "ModuleDeclaration" $
-  doc ("A module/namespace declaration."
-    ++ " Serializes as (ns name ...) in Clojure,"
-    ++ " (provide 'name) in Emacs Lisp,"
-    ++ " (defpackage :name ... ) (in-package :name) in Common Lisp,"
-    ++ " (define-library (name) ...) in Scheme") $
-  T.record [
-    "name">:
-      doc "The module/namespace name" $
-      lisp "NamespaceName",
-    "doc">:
-      doc "Optional module documentation" $
-      T.maybe (lisp "Docstring")]
-
-importDeclaration :: Binding
-importDeclaration = define "ImportDeclaration" $
-  doc ("An import/require declaration."
-    ++ " Serializes as (:require [name ...]) in Clojure,"
-    ++ " (require 'name) in Emacs Lisp,"
-    ++ " (:use :name) or (:import-from :name ...) in Common Lisp,"
-    ++ " (import (name)) in Scheme") $
-  T.record [
-    "module">:
-      doc "The module being imported" $
-      lisp "NamespaceName",
-    "spec">:
-      doc "Import specification" $
-      lisp "ImportSpec"]
-
-importSpec :: Binding
-importSpec = define "ImportSpec" $
-  doc "An import specification describing how to import symbols" $
-  T.union [
-    "all">:
-      doc "Import everything" $
-      T.unit,
-    "alias">:
-      doc "Import with an alias: (:require [name :as alias]) in Clojure" $
-      lisp "Symbol",
-    "only">:
-      doc "Import specific symbols: (:require [name :refer [sym1 sym2]]) in Clojure" $
-      T.list (lisp "Symbol"),
-    "rename">:
-      doc "Import with renaming: list of (from, to) symbol pairs" $
-      T.list (T.list (lisp "Symbol"))]
-
-exportDeclaration :: Binding
-exportDeclaration = define "ExportDeclaration" $
-  doc ("An export/provide declaration."
-    ++ " Serializes as (provide 'name) in Emacs Lisp,"
-    ++ " (:export :sym1 :sym2) in Common Lisp,"
-    ++ " (export sym1 sym2) in Scheme."
-    ++ " In Clojure, symbols are public by default.") $
-  T.record [
-    "symbols">:
-      doc "The symbols to export" $
-      T.list (lisp "Symbol")]
-
-
--- ================================================================================================
--- Miscellaneous
--- ================================================================================================
-
-comment :: Binding
-comment = define "Comment" $
-  doc "A comment" $
-  T.record [
-    "style">:
-      doc "The comment style" $
-      lisp "CommentStyle",
-    "text">:
-      doc "The comment text" $
-      T.string]
-
-commentStyle :: Binding
-commentStyle = define "CommentStyle" $
-  doc "The style of a comment" $
-  T.enum ["line", "block", "datum"]
-
-docstring :: Binding
-docstring = define "Docstring" $
-  doc "A documentation string" $
-  T.wrap T.string
-
-dialect :: Binding
-dialect = define "Dialect" $
-  doc "A Lisp dialect" $
-  T.enum ["clojure", "emacsLisp", "commonLisp", "scheme"]
-
-sExpression :: Binding
-sExpression = define "SExpression" $
-  doc ("A raw S-expression. This is an escape hatch for expressing arbitrary Lisp forms"
-    ++ " that do not fit into the structured AST above.") $
-  T.union [
-    "atom">:
-      doc "An atomic value" $
-      T.string,
-    "list">:
-      doc "A list of S-expressions" $
-      T.list (lisp "SExpression")]
diff --git a/src/main/haskell/Hydra/Sources/Other/Atlas.hs b/src/main/haskell/Hydra/Sources/Other/Atlas.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/Atlas.hs
+++ /dev/null
@@ -1,142 +0,0 @@
-module Hydra.Sources.Other.Atlas where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Xml.Schema    as XmlSchema
-
-
-ns :: Namespace
-ns = Namespace "hydra.atlas"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-atlas :: String -> Type
-atlas = typeref ns
-
-xsd :: String -> Type
-xsd = typeref (XmlSchema.ns)
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [XmlSchema.ns],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("The Apache Atlas meta-model\n" ++
-      "Based on the the org.apache.atlas.model package in the master branch as of 2022-06-01\n" ++
-      "  https://github.com/apache/atlas/tree/master/intg/src/main/java/org/apache/atlas/model")}
-  where
-    definitions = [
-      atlasAttribute,
-      atlasAttributeDef_Cardinality,
-      atlasAttributeDef_IndexType,
-      atlasBaseType,
-      atlasConstraint,
-      atlasEntity,
-      atlasRelationshipAttribute,
-      atlasStruct,
-      typeCategory]
-
-atlasAttribute :: Binding
-atlasAttribute = define "AtlasAttributeDef" $
-  doc "class that captures details of a struct-attribute." $
-  T.record [
-    "name">: T.maybe T.string,
-    "typeName">: T.maybe T.string,
-    "isOptional">: T.boolean,
-    "cardinality">: T.maybe $ atlas "AtlasAttributeDef_Cardinality",
-    "valuesMinCount">: T.int32,
-    "valuesMaxCount">: T.int32,
-    "isUnique">: T.boolean,
-    "isIndexable">: T.boolean,
-    "includeInNotification">: T.boolean,
-    "defaultValue">: T.maybe T.string,
-    "description">: T.maybe T.string,
-    "searchWeight">: T.int32,
-    "indexType">: T.maybe $ atlas "AtlasAttributeDef_IndexType",
-    "constraints">: T.list $ atlas "AtlasConstraintDef",
-    "options">: T.map T.string T.string,
-    "displayName">: T.maybe T.string]
-
-atlasAttributeDef_Cardinality :: Binding
-atlasAttributeDef_Cardinality = define "AtlasAttributeDef_Cardinality" $ T.enum ["single", "list", "set"]
-
-atlasAttributeDef_IndexType :: Binding
-atlasAttributeDef_IndexType = define "AtlasAttributeDef_IndexType" $ T.enum ["default", "string"]
-
-atlasBaseType :: Binding
-atlasBaseType = define "AtlasBaseTypeDef" $
-  doc "Base class that captures common-attributes for all Atlas types." $
-  T.record [
-    "category">: T.maybe $ atlas "TypeCategory",
-    "guid">: T.maybe T.string,
-    "createdBy">: T.maybe T.string,
-    "updatedBy">: T.maybe T.string,
-    "createTime">: T.maybe $ xsd "DateTime",
-    "updateTime">: T.maybe $ xsd "DateTime",
-    "version">: T.maybe T.int64,
-    "name">: T.maybe T.string,
-    "description">: T.maybe T.string,
-    "typeVersion">: T.maybe T.string,
-    "serviceType">: T.maybe T.string,
-    "options">: T.map T.string T.string]
-
-atlasConstraint :: Binding
-atlasConstraint = define "AtlasConstraintDef" $
-  doc "class that captures details of a constraint." $
-  T.record [
-    "type">: T.maybe T.string,
-    "params">: T.map T.string T.string] -- Map<String, Object>
-
-atlasEntity :: Binding
-atlasEntity = define "AtlasEntityDef" $
-  doc "class that captures details of a entity-type." $
-  T.record [
-    "asAtlasStruct">: atlas "AtlasStructDef",
-
-    "superTypes">:
-      T.set T.string,
-
-    "subTypes">:
-      doc "the value of this field is derived from 'superTypes' specified in all AtlasEntityDef" $
-      T.set T.string,
-
-    "relationshipAttributeDefs">:
-      doc "the value of this field is derived from all the relationshipDefs this entityType is referenced in" $
-      T.list $ atlas "AtlasRelationshipAttributeDef",
-
-    "businessAttributeDefs">:
-      doc "the value of this field is derived from all the businessMetadataDefs this entityType is referenced in" $
-      T.map T.string (T.list $ atlas "AtlasAttributeDef")]
-
-atlasRelationshipAttribute :: Binding
-atlasRelationshipAttribute = define "AtlasRelationshipAttributeDef" $
-  doc "class that captures details of a struct-attribute." $
-  T.record [
-    "asAtlasAttribute">: atlas "AtlasAttributeDef",
-    "relationshipTypeName">: T.maybe T.string,
-    "isLegacyAttribute">: T.boolean]
-
-atlasStruct :: Binding
-atlasStruct = define "AtlasStructDef" $
-  doc "class that captures details of a struct-type." $
-  T.record [
-    "asAtlasBaseType">: atlas "AtlasBaseTypeDef",
-
-    "attributeDefs">: T.list $ atlas "AtlasAttributeDef"]
-
-typeCategory :: Binding
-typeCategory = define "TypeCategory" $ T.enum [
-  "primitive", "objectIdType", "enum", "struct", "classification", "entity", "array", "map", "relationship", "businessMetadata"]
diff --git a/src/main/haskell/Hydra/Sources/Other/AzureDtld.hs b/src/main/haskell/Hydra/Sources/Other/AzureDtld.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/AzureDtld.hs
+++ /dev/null
@@ -1,479 +0,0 @@
-module Hydra.Sources.Other.AzureDtld where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.azure.dtld"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-dtld :: String -> Type
-dtld = typeref ns
-
--- Helper types for bounded values
-dtmi128 :: Type
-dtmi128 = bounded Nothing (Just 128) $ dtld "Dtmi"
-
-dtmi2048 :: Type
-dtmi2048 = bounded Nothing (Just 2048) $ dtld "Dtmi"
-
-nonemptyString64 :: Type
-nonemptyString64 = boundedString (Just 1) (Just 64)
-
-nonemptyString512 :: Type
-nonemptyString512 = boundedString (Just 1) (Just 512)
-
-string128 :: Type
-string128 = boundedString Nothing (Just 128)
-
--- Helper field constructors
-idField :: Bool -> Int -> String -> FieldType
-idField req maxlen desc = "id">: doc desc $ if req then t else T.maybe t
-  where
-    t = bounded Nothing (Just maxlen) $ dtld "Dtmi"
-
-idOptionalField :: [Char] -> FieldType
-idOptionalField cat = idField False 2048 $
-  "The ID of the " ++ cat ++ ". If no @id is provided, the digital twin interface processor will assign one."
-
-commentField :: FieldType
-commentField = "comment">: doc "A comment for model authors" $ T.maybe nonemptyString512
-
-descriptionField :: FieldType
-descriptionField = "description">: doc "A localizable description for display" $ T.maybe nonemptyString512
-
-displayNameField :: FieldType
-displayNameField = "displayName">: doc "A localizable name for display" $ T.maybe nonemptyString64
-
-nameField :: String -> String -> FieldType
-nameField cat regex = "name">: doc (
-  "The 'programming' name of the " ++ cat ++ ". The name may only contain the characters " ++
-  "a-z, A-Z, 0-9, and underscore, and must match this regular expression " ++ regex ++ ".")
-  nonemptyString64
-
-schemaField :: String -> FieldType
-schemaField cat = "schema">: doc ("The data type of the " ++ cat) $ dtld "Schema"
-
-schemaInterfaceField :: String -> FieldType
-schemaInterfaceField cat = "schema">: doc ("The data type of the " ++ cat) $ dtld "Interface"
-
-typeField :: String -> FieldType
-typeField desc = "type">: doc desc $ dtld "Iri"
-
-unitField :: String -> FieldType
-unitField cat = "unit">:
-  doc ("The unit type of the " ++ cat ++ ". A semantic type is required for the unit property to be available.") $
-  T.maybe $ dtld "Unit"
-
-writableField :: String -> FieldType
-writableField cat = "writable">:
-  doc (
-    "A boolean value that indicates whether the " ++ cat ++ " is writable by an external source, " ++
-    "such as an application, or not. The default value is false (read-only).") $
-  T.maybe T.boolean
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("An Azure Digital Twin Definition Language (DTLD) model. Based on:\n" ++
-      "  https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twins-definition-language\n" ++
-      "DTLD features which are not currently included in this model:\n" ++
-      "  * geospatial schemas (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#geospatial-schemas)\n" ++
-      "  * semantic types and units (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#semantic-types)\n" ++
-      "  * model versioning (https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#model-versioning)")}
-  where
-    definitions = [
-      command,
-      commandPayload,
-      commandType,
-      component,
-      dtmi,
-      enumValue,
-      field,
-      integerOrString,
-      interface_,
-      interface_Contents,
-      iri,
-      mapKey,
-      mapValue,
-      property_,
-      relationship,
-      schema,
-      schema_Array,
-      schema_Complex,
-      schema_Enum,
-      schema_Interface,
-      schema_Interface_Type,
-      schema_Map,
-      schema_Object,
-      schema_Primitive,
-      telemetry,
-      unit_]
-
-command :: Binding
-command = define "Command" $
-  doc "A Command describes a function or operation that can be performed on any digital twin." $
-  T.record [
-    typeField "This must be 'Command'",
-    nameField "command" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    idOptionalField "command",
-    commentField,
-    descriptionField,
-    displayNameField,
-    "commandType">:
-      doc (
-        "This property is deprecated. Either value, synchronous or asynchronous, has the same meaning: " ++
-        "a command that starts execution within a configurable time and that completes execution " ++
-        "within a configurable time.") $
-      T.maybe $ dtld "CommandType",
-    "request">:
-      doc "A description of the input to the Command" $
-      T.maybe $ dtld "CommandPayload",
-    "response">:
-      doc "A description of the output of the Command" $
-      T.maybe $ dtld "CommandPayload"]
-
-commandPayload :: Binding
-commandPayload = define "CommandPayload" $
-  doc "A CommandPayload describes the inputs to or the outputs from a Command." $
-  T.record [
-    nameField "payload" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    schemaField "payload",
-    idOptionalField "payload",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-commandType :: Binding
-commandType = define "CommandType" $
-  doc (
-    "CommandType is deprecated. Either value, synchronous or asynchronous, has the same meaning: " ++
-    "a command that starts execution within a configurable time and that completes execution " ++
-    "within a configurable time.") $
-  T.enum [
-    "synchronous",
-    "asynchronous"]
-
-component :: Binding
-component = define "Component" $
-  doc (
-    "Components enable interfaces to be composed of other interfaces. Components are different from " ++
-    "relationships because they describe contents that are directly part of the interface. " ++
-    "(A relationship describes a link between two interfaces.)") $
-  T.record [
-    typeField "This must be 'Component'",
-    nameField "component" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    schemaInterfaceField "component", -- Note: "maximum depth of 1; no cycles"
-    idOptionalField "component",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-dtmi :: Binding
-dtmi = define "Dtmi" $
-  doc "A digital twin model identifier" $ T.wrap T.string
-
-enumValue :: Binding
-enumValue = define "EnumValue" $
-  doc "An EnumValue describes an element of an Enum." $
-  T.record [
-    nameField "enum value" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    "enumValue">:
-      doc (
-        "The on-the-wire value that maps to the EnumValue. EnumValue may be either an integer or a string " ++
-        "and must be unique for all enum values in this enum.") $
-      dtld "IntegerOrString",
-    idOptionalField "enum value",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-field :: Binding
-field = define "Field" $
-  doc "A Field describes a field in an Object." $
-  T.record [
-    nameField "field" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    schemaField "field",
-    idOptionalField "field",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-integerOrString :: Binding
-integerOrString = define "IntegerOrString" $ T.union [
-  "integer">: T.int32,
-  "string">: T.string]
-
-interface_ :: Binding
-interface_ = define "Interface" $ T.record [
-  idField True 128 "A digital twin model identifier for the interface",
-  typeField "This must be 'Interface'",
-  "context">:
-    doc (
-      "The context to use when processing this interface. " ++
-      "For this version, it must be set to 'dtmi:dtdl:context;2'") $
-    dtld "Iri",
-  commentField,
-  "contents">:
-    doc (
-      "A set of objects that define the contents (Telemetry, Properties, Commands, Relationships, " ++
-      "and/or Components) of this interface") $
-    T.maybe $ boundedSet Nothing (Just 300) $ dtld "Interface_Contents",
-  descriptionField,
-  displayNameField,
-  "extends">: -- Note: there is a maximum depth of 10 levels, not captured here
-    doc (
-      "A set of DTMIs that refer to interfaces this interface inherits from. " ++
-      "Interfaces can inherit from multiple interfaces.") $
-    T.maybe $ boundedSet Nothing (Just 2) $ dtld "Interface",
-  "schemas">:
-    doc "A set of IRIs or objects that refer to the reusable schemas within this interface." $
-    T.maybe $ T.set $ dtld "Schema_Interface"]
-
-interface_Contents :: Binding
-interface_Contents = define "Interface_Contents" $ T.union [
-  "command">: dtld "Command",
-  "component">: dtld "Component",
-  "property">: dtld "Property",
-  "relationship">: dtld "Relationship",
-  "telemetry">: dtld "Telemetry"]
-
-iri :: Binding
-iri = define "Iri" $ T.wrap T.string
-
-mapKey :: Binding
-mapKey = define "MapKey" $
-  doc "A MapKey describes the key in a Map. The schema of a MapKey must be string." $
-  T.record [
-    nameField "map's key" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    schemaField "map's key", -- Note: "must be string"
-    idOptionalField "map key",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-mapValue :: Binding
-mapValue = define "MapValue" $
-  doc "A MapValue describes the values in a Map." $
-  T.record [
-    nameField "map's value" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    schemaField "map's values",
-    idOptionalField "map value",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-property_ :: Binding
-property_ = define "Property" $
-  doc (
-    "A Property describes the read-only and read/write state of any digital twin. " ++
-    "For example, a device serial number may be a read-only property, the desired temperature " ++
-    "on a thermostat may be a read-write property; and the name of a room may be a read-write property.") $
-  T.record [
-    typeField "This must at least be 'Property'. It can also include a semantic type.",
-    nameField "property" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.",
-    -- Note: "may not be Array nor any complex schema that contains Array"
-    schemaField "Property",
-    idOptionalField "property",
-    commentField,
-    descriptionField,
-    displayNameField,
-    unitField "property",
-    writableField "property"]
-
-relationship :: Binding
-relationship = define "Relationship" $
-  doc (
-    "A Relationship describes a link to another digital twin and enables graphs of digital twins " ++
-    "to be created. Relationships are different from Components because they describe a link " ++
-    "to a separate digital twin.") $
-  T.record [
-    typeField "This must be 'Relationship'",
-    nameField "relationship" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$",
-    idOptionalField "relationship description",
-    commentField,
-    descriptionField,
-    displayNameField,
-    "maxMultiplicity">:
-      -- Note: "must be >= 1 and >= minMultiplicity"
-      doc (
-        "The maximum multiplicity for the target of the relationship. The default value is infinite " ++
-        "(there may be an unlimited number of relationship instances for this relationship).") $
-      T.maybe $ bounded (Just 1) Nothing T.int32,
-    "minMultiplicity">:
-      -- Note: "must be <= maxMultiplicity"
-      doc (
-        "The minimum multiplicity for the target of the relationship. The default value is 0 " ++
-        "(this relationship is permitted to have no instances). In DTDL v2, minMultiplicity must always be 0.") $
-      T.maybe $ bounded (Just 0) Nothing T.int32,
-    "properties">:
-      doc "A set of Properties that define relationship-specific state" $
-      T.maybe $ bounded Nothing (Just 300) $ T.set $ dtld "Property",
-    "target">:
-      doc "An interface ID. The default value (when target is not specified) is that the target may be any interface." $
-      T.maybe $ dtld "Interface",
-      writableField "relationship"]
-
-schema :: Binding
-schema = define "Schema" $
-  doc (
-    "Schemas are used to describe the on-the-wire or serialized format of the data in a digital twin interface. " ++
-    "A full set of primitive data types are provided, along with support for a variety of complex schemas " ++
-    "in the forms of Arrays, Enums, Maps, and Objects. Schemas described through digital twin's schema " ++
-    "definition language are compatible with popular serialization formats, including JSON, Avro, and Protobuf.") $
-  T.union [
-    "primitive">: dtld "Schema_Primitive",
-    "complex">: dtld "Schema_Complex"]
-
-schema_Array :: Binding
-schema_Array = define "Schema_Array" $
-  doc (
-    "An Array describes an indexable data type where each element is of the same schema. " ++
-    "An Array elements' schema can itself be a primitive or complex schema.") $
-  T.record [
-    typeField "This must be 'Array'",
-    "elementSchema">:
-      doc "The data type of the array elements" $
-      dtld "Schema",
-    idOptionalField "array",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-schema_Complex :: Binding
-schema_Complex = define "Schema_Complex" $
-  doc ("Complex schemas are designed for supporting complex data types made up of primitive data types. " ++
-       "Currently the following complex schemas are provided: Array, Enum, Map, and Object. " ++
-       "A complex schema can be specified directly as the value in a schema statement or " ++
-       "described in the interface schemas set and referenced in the schema statement.") $
-  T.union [
-    -- Note: interface schemas are currently special, and are not included in this union
-    "array">: dtld "Schema_Array",
-    "enum">: dtld "Schema_Enum",
-    "map">: dtld "Schema_Map",
-    "object">: dtld "Schema_Object"]
-
-schema_Enum :: Binding
-schema_Enum = define "Schema_Enum" $
-  doc (
-    "An Enum describes a data type with a set of named labels that map to values. The values in an Enum " ++
-    "can be either integers or strings, but the labels are always strings.") $
-  T.record [
-    typeField "Enum",
-    "enumValues">:
-      doc "A set of enum value and label mappings" $
-      T.list $ dtld "EnumValue", -- Note: the spec seems to be wrong here; it specifies a lone "EnumValue" instead of a set
-    "valueSchema">:
-      doc "The data type for the enum values. All enum values must be of the same type." $
-      dtld "IntegerOrString",
-    idOptionalField "enum",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-schema_Interface :: Binding
-schema_Interface = define "Schema_Interface" $
-  doc (
-    "Within an interface definition, complex schemas may be defined for reusability across " ++
-    "Telemetry, Properties, and Commands. This is designed to promote readability and improved " ++
-    "maintenance because schemas that are reused can be defined once (per interface). Interface schemas " ++
-    "are defined in the schemas property of an interface.") $
-  T.record [
-    idField True 2048 "The globally unique identifier for the schema",
-    "type">:
-      doc "The type of complex schema. This must refer to one of the complex schema classes (Array, Enum, Map, or Object)." $
-      dtld "Schema_Interface_Type",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-schema_Interface_Type :: Binding
-schema_Interface_Type = define "Schema_Interface_Type" $ T.union [
-  "array">: dtld "Schema_Array",
-  "enum">: dtld "Schema_Enum",
-  "map">: dtld "Schema_Map",
-  "object">: dtld "Schema_Object"]
-
-schema_Map :: Binding
-schema_Map = define "Schema_Map" $
-  doc ("A Map describes a data type of key-value pairs where the values share the same schema. " ++
-       "The key in a Map must be a string. The values in a Map can be any schema.") $
-  T.record [
-    typeField "Map",
-    "mapKey">:
-      doc "A description of the keys in the map" $
-      dtld "MapKey",
-    "mapValue">:
-      doc "A description of the values in the map" $
-      dtld "MapValue",
-    idOptionalField "map",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-schema_Object :: Binding
-schema_Object = define "Schema_Object" $
-  doc (
-    "An Object describes a data type made up of named fields (like a struct in C). " ++
-    "The fields in an Object map can be primitive or complex schemas.") $
-  T.record [
-    typeField "Object",
-    "fields">:
-      doc "A set of field descriptions, one for each field in the Object" $
-      bounded Nothing (Just 30) $ T.set $ dtld "Field", -- Note: "max depth 5 levels"
-    idOptionalField "object",
-    commentField,
-    descriptionField,
-    displayNameField]
-
-schema_Primitive :: Binding
-schema_Primitive = define "Schema_Primitive" $
-  doc (
-    "A full set of primitive data types are provided and can be specified directly as the value " ++
-    "in a schema statement in a digital twin interface.") $
-  T.union [
-    "boolean">: doc "A boolean value" T.unit,
-    "date">: doc "A full-date as defined in section 5.6 of RFC 3339" T.unit,
-    "dateTime">: doc "A date-time as defined in RFC 3339" T.unit,
-    "double">: doc "An IEEE 8-byte floating point" T.unit,
-    "duration">: doc "A duration in ISO 8601 format" T.unit,
-    "float">: doc "An IEEE 4-byte floating point" T.unit,
-    "integer">: doc "A signed 4-byte integer" T.unit,
-    "long">: doc "A signed 8-byte integer" T.unit,
-    "string">: doc "A UTF8 string" T.unit,
-    "time">: doc "A full-time as defined in section 5.6 of RFC 3339" T.unit]
-
-telemetry :: Binding
-telemetry = define "Telemetry" $
-  doc (
-    "Telemetry describes the data emitted by any digital twin, whether the data is a regular stream " ++
-    "of sensor readings or a computed stream of data, such as occupancy, " ++
-    "or an occasional error or information message.") $
-  T.record [
-    typeField "This must be at least 'Telemetry'. It can also include a semantic type",
-    nameField "telemetry" "^[a-zA-Z](?:[a-zA-Z0-9_]*[a-zA-Z0-9])?$.",
-    schemaField "Telemetry",
-    idField False 2048
-      "The ID of the telemetry. If no @id is provided, the digital twin interface processor will assign one.",
-    commentField,
-    descriptionField,
-    displayNameField,
-    unitField "Telemetry"]
-
-unit_ :: Binding
-unit_ = define "Unit" $ T.wrap T.unit
diff --git a/src/main/haskell/Hydra/Sources/Other/Datalog.hs b/src/main/haskell/Hydra/Sources/Other/Datalog.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/Datalog.hs
+++ /dev/null
@@ -1,121 +0,0 @@
-module Hydra.Sources.Other.Datalog where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-
-
-ns :: Namespace
-ns = Namespace "hydra.datalog.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-dl :: String -> Type
-dl = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "A basic Datalog model"}
-  where
-    definitions = [
-      constant,
-      relation,
-      variable,
-      program,
-      program_Elmt,
-      fact,
-      rule_,
-      atom,
-      atomList,
-      atomList_Multiple,
-      term,
-      termList,
-      termList_Multiple,
-      constantList,
-      constantList_Multiple]
-
-constant :: Binding
-constant = define "Constant" $ T.wrap T.string
-
-relation :: Binding
-relation = define "Relation" $ T.wrap T.string
-
-variable :: Binding
-variable = define "Variable" $ T.wrap T.string
-
-program :: Binding
-program = define "Program" $ T.wrap $ T.list $ dl "Program_Elmt"
-
-program_Elmt :: Binding
-program_Elmt = define "Program_Elmt" $
-  T.union [
-    "Fact">: dl "Fact",
-    "Rule">: dl "Rule"]
-
-fact :: Binding
-fact = define "Fact" $
-  T.record [
-    "Relation">: dl "Relation",
-    "ConstantList">: dl "ConstantList"]
-
-rule_ :: Binding
-rule_ = define "Rule" $
-  T.record [
-    "Atom">: dl "Atom",
-    "AtomList">: dl "AtomList"]
-
-atom :: Binding
-atom = define "Atom" $
-  T.record [
-    "Relation">: dl "Relation",
-    "TermList">: dl "TermList"]
-
-atomList :: Binding
-atomList = define "AtomList" $
-  T.union [
-    "single">: dl "Atom",
-    "multiple">: dl "AtomList_Multiple"]
-
-atomList_Multiple :: Binding
-atomList_Multiple = define "AtomList_Multiple" $
-  T.record [
-    "Atom">: dl "Atom",
-    "AtomList">: dl "AtomList"]
-
-term :: Binding
-term = define "Term" $
-  T.union [
-    "Constant">: dl "Constant",
-    "Variable">: dl "Variable"]
-
-termList :: Binding
-termList = define "TermList" $
-  T.union [
-    "single">: dl "Term",
-    "multiple">: dl "TermList_Multiple"]
-
-termList_Multiple :: Binding
-termList_Multiple = define "TermList_Multiple" $
-  T.record [
-    "Term">: dl "Term",
-    "TermList">: dl "TermList"]
-
-constantList :: Binding
-constantList = define "ConstantList" $
-  T.union [
-    "single">: dl "Constant",
-    "multiple">: dl "ConstantList_Multiple"]
-
-constantList_Multiple :: Binding
-constantList_Multiple = define "ConstantList_Multiple" $
-  T.record [
-    "Constant">: dl "Constant",
-    "ConstantList">: dl "ConstantList"]
diff --git a/src/main/haskell/Hydra/Sources/Other/GeoJson.hs b/src/main/haskell/Hydra/Sources/Other/GeoJson.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/GeoJson.hs
+++ /dev/null
@@ -1,212 +0,0 @@
-module Hydra.Sources.Other.GeoJson where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Json.Model        as JsonModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.geojson.model"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-geoj :: String -> Type
-geoj = typeref ns
-
-json :: String -> Type
-json = typeref $ JsonModel.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [JsonModel.ns],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("A GeoJSON model based on the specification at https://www.rfc-editor.org/rfc/rfc7946. " ++
-          "This model provides some additional structure beyond the JSON encoding described in the specification; " ++
-          "For example, it provides MultiPoint not as an object with an array of coordinates which encode points, " ++
-          "but as an array of Points. A BoundingBox is not simply an list of numbers, but a list of CoordinateRanges.")}
-  where
-    definitions = [
-      boundingBox,
-      coordinateRange,
-      feature,
-      featureCollection,
-      geometryCollection,
-      geometry,
-      id_,
-      lineString,
-      multiLineString,
-      multiPoint,
-      multiPolygon,
-      object_,
-      point,
-      polygon,
-      position]
-
-boundingBox :: Binding
-boundingBox = define "BoundingBox" $
-  doc ("A GeoJSON object MAY have a member named \"bbox\" to include " ++
-       "information on the coordinate range for its Geometries, Features, or " ++
-       "FeatureCollections.  The value of the bbox member MUST be an array of " ++
-       "length 2*n where n is the number of dimensions represented in the " ++
-       "contained geometries, with all axes of the most southwesterly point " ++
-       "followed by all axes of the more northeasterly point.  The axes order " ++
-       "of a bbox follows the axes order of geometries.") $
-  T.wrap $ T.list $ geoj "CoordinateRange"
-
-coordinateRange :: Binding
-coordinateRange = define "CoordinateRange" $
-  T.record [
-    "min">: T.bigfloat,
-    "max">: T.bigfloat]
-
-feature :: Binding
-feature = define "Feature" $
- doc ("A Feature object represents a spatially bounded thing.  Every Feature " ++
-      "object is a GeoJSON object no matter where it occurs in a GeoJSON " ++
-      "text.") $
- T.record [
-  "geometry">:
-    doc ("A Feature object has a member with the name \"geometry\".  The value " ++
-         "of the geometry member SHALL be either a Geometry object as " ++
-         "defined above or, in the case that the Feature is unlocated, a " ++
-         "JSON null value.") $
-    T.maybe $ geoj "Geometry",
-  "properties">:
-    doc ("A Feature object has a member with the name \"properties\".  The " ++
-         "value of the properties member is an object (any JSON object or a " ++
-         "JSON null value).") $
-    T.maybe $ T.map T.string (json "Value"),
-  "id">:
-    doc ("If a Feature has a commonly used identifier, that identifier " ++
-         "SHOULD be included as a member of the Feature object with the name " ++
-         "\"id\", and the value of this member is either a JSON string or " ++
-         "number.") $
-    T.maybe $ geoj "Id",
-  "bbox">: T.maybe $ geoj "BoundingBox"]
-
-featureCollection :: Binding
-featureCollection = define "FeatureCollection" $
-  doc ("A GeoJSON object with the type \"FeatureCollection\" is a " ++
-       "FeatureCollection object.  A FeatureCollection object has a member " ++
-       "with the name \"features\".  The value of \"features\" is a JSON array. " ++
-       "Each element of the array is a Feature object as defined above.  It " ++
-       "is possible for this array to be empty.") $
-  T.record [
-    "features">: T.list $ geoj "Feature",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-geometryCollection :: Binding
-geometryCollection = define "GeometryCollection" $
-  doc ("A GeoJSON object with type \"GeometryCollection\" is a Geometry object. " ++
-       "A GeometryCollection has a member with the name \"geometries\".  The " ++
-       "value of \"geometries\" is an array.  Each element of this array is a " ++
-       "GeoJSON Geometry object.  It is possible for this array to be empty.") $
-  T.record [
-    "geometries">: T.list $ geoj "Geometry",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-geometry :: Binding
-geometry = define "Geometry" $
-  doc ("A Geometry object represents points, curves, and surfaces in " ++
-       "coordinate space.  Every Geometry object is a GeoJSON object no " ++
-       "matter where it occurs in a GeoJSON text.") $
-  T.union [
-    "point">: geoj "Point",
-    "multiPoint">: geoj "MultiPoint",
-    "lineString">: geoj "LineString",
-    "multiLineString">: geoj "MultiLineString",
-    "polygon">: geoj "Polygon",
-    "multiPolygon">: geoj "MultiPolygon",
-    "geometryCollection">: geoj "GeometryCollection"]
-
-id_ :: Binding
-id_ = define "Id" $
-  T.union [
-    "number">: T.bigfloat,
-    "string">: T.string]
-
-lineString :: Binding
-lineString = define "LineString" $
-  doc ("For type \"LineString\", the \"coordinates\" member is an array of two or " ++
-       "more positions.") $
-  T.record [
-    "coordinates">: T.list $ geoj "Position",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-multiLineString :: Binding
-multiLineString = define "MultiLineString" $
-  doc ("For type \"MultiLineString\", the \"coordinates\" member is an array of " ++
-       "LineString coordinate arrays.") $
-  T.record [
-    "coordinates">: T.list $ geoj "LineString",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-multiPoint :: Binding
-multiPoint = define "MultiPoint" $
-  doc ("For type \"MultiPoint\", the \"coordinates\" member is an array of " ++
-       "positions.") $
-  T.record [
-    "coordinates">: T.list $ geoj "Point",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-multiPolygon :: Binding
-multiPolygon = define "MultiPolygon" $
-  doc ("For type \"MultiPolygon\", the \"coordinates\" member is an array of " ++
-       "Polygon coordinate arrays.") $
-  T.record [
-    "coordinates">: T.list $ geoj "Polygon",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-object_ :: Binding
-object_ = define "Object" $
-  doc ("A GeoJSON object represents a Geometry, Feature, or collection of " ++
-       "Features.") $
-  T.union [
-    "geometry">: geoj "Geometry",
-    "feature">: geoj "Feature",
-    "featureCollection">: geoj "FeatureCollection"]
-
-point :: Binding
-point = define "Point" $
-  doc ("For type \"Point\", the \"coordinates\" member is a single position.") $
-  T.record [
-    "coordinates">: geoj "Position",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-polygon :: Binding
-polygon = define "Polygon" $
-  doc ("For type \"Polygon\", the \"coordinates\" member MUST be an array of " ++
-       "linear ring coordinate arrays.\n" ++
-       "For Polygons with more than one of these rings, the first MUST be " ++
-       "the exterior ring, and any others MUST be interior rings.  The " ++
-       "exterior ring bounds the surface, and the interior rings (if " ++
-       "present) bound holes within the surface.") $
-  T.record [
-    "coordinates">: T.list $ geoj "Position",
-    "bbox">: T.maybe $ geoj "BoundingBox"]
-
-position :: Binding
-position = define "Position" $
-  doc ("A position is an array of numbers.  There MUST be two or more " ++
-       "elements.  The first two elements are longitude and latitude, or " ++
-       "easting and northing, precisely in that order and using decimal " ++
-       "numbers.  Altitude or elevation MAY be included as an optional third " ++
-       "element.") $
-  T.record [
-    "latitude">: T.bigfloat,
-    "longitude">: T.bigfloat,
-    "altitude">: T.maybe T.bigfloat]
diff --git a/src/main/haskell/Hydra/Sources/Other/IanaRelations.hs b/src/main/haskell/Hydra/Sources/Other/IanaRelations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/IanaRelations.hs
+++ /dev/null
@@ -1,279 +0,0 @@
-module Hydra.Sources.Other.IanaRelations where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.iana.linkrelations"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("All IANA Link Relation Types, as of 2022-10-11. " ++
-          "See https://www.iana.org/assignments/link-relations/link-relations.xhtml")}
-  where
-    definitions = [
-      linkRelationType]
-
-linkRelationType :: Binding
-linkRelationType = define "LinkRelationType" $
-  doc "An IANA link relation type" $
-  T.union [
-    "about">:
-      doc ("Refers to a resource that is the subject of the link's context. [RFC6903], section 2") T.unit,
-    "acl">:
-      doc ("Asserts that the link target provides an access control resource for the link context. [https://solidproject.org/TR/wac#acl-link-relation]") T.unit,
-    "alternate">:
-      doc ("Refers to a substitute for this context [HTML]") T.unit,
-    "amphtml">:
-      doc ("Used to reference alternative content that uses the AMP profile of the HTML format. [AMP HTML]") T.unit,
-    "appendix">:
-      doc ("Refers to an appendix. [HTML 4.01 Specification]") T.unit,
-    "apple-touch-icon">:
-      doc ("Refers to an icon for the context. Synonym for icon. [Configuring Web Applications]") T.unit,
-    "apple-touch-startup-image">:
-      doc ("Refers to a launch screen for the context. [Configuring Web Applications]") T.unit,
-    "archives">:
-      doc ("Refers to a collection of records, documents, or other materials of historical interest. [HTML5]") T.unit,
-    "author">:
-      doc ("Refers to the context's author. [HTML]") T.unit,
-    "blocked-by">:
-      doc ("Identifies the entity that blocks access to a resource following receipt of a legal demand. [RFC7725]") T.unit,
-    "bookmark">:
-      doc ("Gives a permanent link to use for bookmarking purposes. [HTML]") T.unit,
-    "canonical">:
-      doc ("Designates the preferred version of a resource (the IRI and its contents). [RFC6596]") T.unit,
-    "chapter">:
-      doc ("Refers to a chapter in a collection of resources. [HTML 4.01 Specification]") T.unit,
-    "cite-as">:
-      doc ("Indicates that the link target is preferred over the link context for the purpose of permanent citation. [RFC8574]") T.unit,
-    "collection">:
-      doc ("The target IRI points to a resource which represents the collection resource for the context IRI. [RFC6573]") T.unit,
-    "contents">:
-      doc ("Refers to a table of contents. [HTML 4.01 Specification]") T.unit,
-    "convertedfrom">:
-      doc ("The document linked to was later converted to the document that contains this link relation. For example, an RFC can have a link to the Internet-Draft that became the RFC; in that case, the link relation would be \"convertedFrom\". [RFC7991] This relation is different than \"predecessor-version\" in that \"predecessor-version\" is for items in a version control system. It is also different than \"previous\" in that this relation is used for converted resources, not those that are part of a sequence of resources.") T.unit,
-    "copyright">:
-      doc ("Refers to a copyright statement that applies to the link's context. [HTML 4.01 Specification]") T.unit,
-    "create-form">:
-      doc ("The target IRI points to a resource where a submission form can be obtained. [RFC6861]") T.unit,
-    "current">:
-      doc ("Refers to a resource containing the most recent item(s) in a collection of resources. [RFC5005]") T.unit,
-    "describedby">:
-      doc ("Refers to a resource providing information about the link's context. [Protocol for Web Description Resources (POWDER)]") T.unit,
-    "describes">:
-      doc ("The relationship A 'describes' B asserts that resource A provides a description of resource B. There are no constraints on the format or representation of either A or B, neither are there any further constraints on either resource. [RFC6892] This link relation type is the inverse of the 'describedby' relation type. While 'describedby' establishes a relation from the described resource back to the resource that describes it, 'describes' established a relation from the describing resource to the resource it describes. If B is 'describedby' A, then A 'describes' B.") T.unit,
-    "disclosure">:
-      doc ("Refers to a list of patent disclosures made with respect to material for which 'disclosure' relation is specified. [RFC6579]") T.unit,
-    "dns-prefetch">:
-      doc ("Used to indicate an origin that will be used to fetch required resources for the link context, and that the user agent ought to resolve as early as possible. [Resource Hints]") T.unit,
-    "duplicate">:
-      doc ("Refers to a resource whose available representations are byte-for-byte identical with the corresponding representations of the context IRI. [RFC6249] This relation is for static resources. That is, an HTTP GET request on any duplicate will return the same representation. It does not make sense for dynamic or POSTable resources and should not be used for them.") T.unit,
-    "edit">:
-      doc ("Refers to a resource that can be used to edit the link's context. [RFC5023]") T.unit,
-    "edit-form">:
-      doc ("The target IRI points to a resource where a submission form for editing associated resource can be obtained. [RFC6861]") T.unit,
-    "edit-media">:
-      doc ("Refers to a resource that can be used to edit media associated with the link's context. [RFC5023]") T.unit,
-    "enclosure">:
-      doc ("Identifies a related resource that is potentially large and might require special handling. [RFC4287]") T.unit,
-    "external">:
-      doc ("Refers to a resource that is not part of the same site as the current context. [HTML]") T.unit,
-    "first">:
-      doc ("An IRI that refers to the furthest preceding resource in a series of resources. [RFC8288] This relation type registration did not indicate a reference. Originally requested by Mark Nottingham in December 2004.") T.unit,
-    "glossary">:
-      doc ("Refers to a glossary of terms. [HTML 4.01 Specification]") T.unit,
-    "help">:
-      doc ("Refers to context-sensitive help. [HTML]") T.unit,
-    "hosts">:
-      doc ("Refers to a resource hosted by the server indicated by the link context. [RFC6690] This relation is used in CoRE where links are retrieved as a \"/.well-known/core\" resource representation, and is the default relation type in the CoRE Link Format.") T.unit,
-    "hub">:
-      doc ("Refers to a hub that enables registration for notification of updates to the context. [WebSub] This relation type was requested by Brett Slatkin.") T.unit,
-    "icon">:
-      doc ("Refers to an icon representing the link's context. [HTML]") T.unit,
-    "index">:
-      doc ("Refers to an index. [HTML 4.01 Specification]") T.unit,
-    "intervalafter">:
-      doc ("refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.21") T.unit,
-    "intervalbefore">:
-      doc ("refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.22") T.unit,
-    "intervalcontains">:
-      doc ("refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.23") T.unit,
-    "intervaldisjoint">:
-      doc ("refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.24") T.unit,
-    "intervalduring">:
-      doc ("refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.25") T.unit,
-    "intervalequals">:
-      doc ("refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.26") T.unit,
-    "intervalfinishedby">:
-      doc ("refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.27") T.unit,
-    "intervalfinishes">:
-      doc ("refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.28") T.unit,
-    "intervalin">:
-      doc ("refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.29") T.unit,
-    "intervalmeets">:
-      doc ("refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.30") T.unit,
-    "intervalmetby">:
-      doc ("refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.31") T.unit,
-    "intervaloverlappedby">:
-      doc ("refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.32") T.unit,
-    "intervaloverlaps">:
-      doc ("refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.33") T.unit,
-    "intervalstartedby">:
-      doc ("refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.34") T.unit,
-    "intervalstarts">:
-      doc ("refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource [Time Ontology in OWL] section 4.2.35") T.unit,
-    "item">:
-      doc ("The target IRI points to a resource that is a member of the collection represented by the context IRI. [RFC6573]") T.unit,
-    "last">:
-      doc ("An IRI that refers to the furthest following resource in a series of resources. [RFC8288] This relation type registration did not indicate a reference. Originally requested by Mark Nottingham in December 2004.") T.unit,
-    "latest-version">:
-      doc ("Points to a resource containing the latest (e.g., current) version of the context. [RFC5829]") T.unit,
-    "license">:
-      doc ("Refers to a license associated with this context. [RFC4946] For implications of use in HTML, see: http://www.w3.org/TR/html5/links.html#link-type-license") T.unit,
-    "linkset">:
-      doc ("The link target of a link with the \"linkset\" relation type provides a set of links, including links in which the link context of the link participates. [RFC9264]") T.unit,
-    "lrdd">:
-      doc ("Refers to further information about the link's context, expressed as a LRDD (\"Link-based Resource Descriptor Document\") resource. See [RFC6415] for information about processing this relation type in host-meta documents. When used elsewhere, it refers to additional links and other metadata. Multiple instances indicate additional LRDD resources. LRDD resources MUST have an \"application/xrd+xml\" representation, and MAY have others. [RFC6415]") T.unit,
-    "manifest">:
-      doc ("Links to a manifest file for the context. [Web App Manifest]") T.unit,
-    "mask-icon">:
-      doc ("Refers to a mask that can be applied to the icon for the context. [Creating Pinned Tab Icons]") T.unit,
-    "media-feed">:
-      doc ("Refers to a feed of personalised media recommendations relevant to the link context. [https://wicg.github.io/media-feeds/#discovery-of-media-feeds]") T.unit,
-    "memento">:
-      doc ("The Target IRI points to a Memento, a fixed resource that will not change state anymore. [RFC7089] A Memento for an Original Resource is a resource that encapsulates a prior state of the Original Resource.") T.unit,
-    "micropub">:
-      doc ("Links to the context's Micropub endpoint. [Micropub]") T.unit,
-    "modulepreload">:
-      doc ("Refers to a module that the user agent is to preemptively fetch and store for use in the current context. [HTML]") T.unit,
-    "monitor">:
-      doc ("Refers to a resource that can be used to monitor changes in an HTTP resource. [RFC5989]") T.unit,
-    "monitor-group">:
-      doc ("Refers to a resource that can be used to monitor changes in a specified group of HTTP resources. [RFC5989]") T.unit,
-    "next">:
-      doc ("Indicates that the link's context is a part of a series, and that the next in the series is the link target. [HTML]") T.unit,
-    "next-archive">:
-      doc ("Refers to the immediately following archive resource. [RFC5005]") T.unit,
-    "nofollow">:
-      doc ("Indicates that the context's original author or publisher does not endorse the link target. [HTML]") T.unit,
-    "noopener">:
-      doc ("Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context. [HTML]") T.unit,
-    "noreferrer">:
-      doc ("Indicates that no referrer information is to be leaked when following the link. [HTML]") T.unit,
-    "opener">:
-      doc ("Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context. [HTML]") T.unit,
-    "openid2.local_id">:
-      doc ("Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier. [OpenID Authentication 2.0 - Final]") T.unit,
-    "openid2.provider">:
-      doc ("Refers to a resource which accepts OpenID Authentication protocol messages for the context. [OpenID Authentication 2.0 - Final]") T.unit,
-    "original">:
-      doc ("The Target IRI points to an Original Resource. [RFC7089] An Original Resource is a resource that exists or used to exist, and for which access to one of its prior states may be required.") T.unit,
-    "p3pv1">:
-      doc ("Refers to a P3P privacy policy for the context. [The Platform for Privacy Preferences 1.0 (P3P1.0) Specification]") T.unit,
-    "payment">:
-      doc ("Indicates a resource where payment is accepted. [RFC8288] This relation type registration did not indicate a reference. Requested by Joshua Kinberg and Robert Sayre. It is meant as a general way to facilitate acts of payment, and thus this specification makes no assumptions on the type of payment or transaction protocol. Examples may include a web page where donations are accepted or where goods and services are available for purchase. rel=\"payment\" is not intended to initiate an automated transaction. In Atom documents, a link element with a rel=\"payment\" attribute may exist at the feed/channel level and/or the entry/item level. For example, a rel=\"payment\" link at the feed/channel level may point to a \"tip jar\" URI, whereas an entry/ item containing a book review may include a rel=\"payment\" link that points to the location where the book may be purchased through an online retailer.") T.unit,
-    "pingback">:
-      doc ("Gives the address of the pingback resource for the link context. [Pingback 1.0]") T.unit,
-    "preconnect">:
-      doc ("Used to indicate an origin that will be used to fetch required resources for the link context. Initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, allows the user agent to mask the high latency costs of establishing a connection. [Resource Hints]") T.unit,
-    "predecessor-version">:
-      doc ("Points to a resource containing the predecessor version in the version history. [RFC5829]") T.unit,
-    "prefetch">:
-      doc ("The prefetch link relation type is used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch, such that the user agent can deliver a faster response once the resource is requested in the future. [Resource Hints]") T.unit,
-    "preload">:
-      doc ("Refers to a resource that should be loaded early in the processing of the link's context, without blocking rendering. [Preload] Additional target attributes establish the detailed fetch properties of the link.") T.unit,
-    "prerender">:
-      doc ("Used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch and execute, such that the user agent can deliver a faster response once the resource is requested in the future. [Resource Hints]") T.unit,
-    "prev">:
-      doc ("Indicates that the link's context is a part of a series, and that the previous in the series is the link target. [HTML]") T.unit,
-    "preview">:
-      doc ("Refers to a resource that provides a preview of the link's context. [RFC6903], section 3") T.unit,
-    "previous">:
-      doc ("Refers to the previous resource in an ordered series of resources. Synonym for \"prev\". [HTML 4.01 Specification]") T.unit,
-    "prev-archive">:
-      doc ("Refers to the immediately preceding archive resource. [RFC5005]") T.unit,
-    "privacy-policy">:
-      doc ("Refers to a privacy policy associated with the link's context. [RFC6903], section 4") T.unit,
-    "profile">:
-      doc ("Identifying that a resource representation conforms to a certain profile, without affecting the non-profile semantics of the resource representation. [RFC6906] Profile URIs are primarily intended to be used as identifiers, and thus clients SHOULD NOT indiscriminately access profile URIs.") T.unit,
-    "publication">:
-      doc ("Links to a publication manifest. A manifest represents structured information about a publication, such as informative metadata, a list of resources, and a default reading order. [Publication Manifest]") T.unit,
-    "related">:
-      doc ("Identifies a related resource. [RFC4287]") T.unit,
-    "restconf">:
-      doc ("Identifies the root of RESTCONF API as configured on this HTTP server. The \"restconf\" relation defines the root of the API defined in RFC8040. Subsequent revisions of RESTCONF will use alternate relation values to support protocol versioning. [RFC8040]") T.unit,
-    "replies">:
-      doc ("Identifies a resource that is a reply to the context of the link. [RFC4685]") T.unit,
-    "ruleinput">:
-      doc ("The resource identified by the link target provides an input value to an instance of a rule, where the resource which represents the rule instance is identified by the link context. [OCF Core Optional 2.2.0]") T.unit,
-    "search">:
-      doc ("Refers to a resource that can be used to search through the link's context and related resources. [OpenSearch]") T.unit,
-    "section">:
-      doc ("Refers to a section in a collection of resources. [HTML 4.01 Specification]") T.unit,
-    "self">:
-      doc ("Conveys an identifier for the link's context. [RFC4287]") T.unit,
-    "service">:
-      doc ("Indicates a URI that can be used to retrieve a service document. [RFC5023] When used in an Atom document, this relation type specifies Atom Publishing Protocol service documents by default. Requested by James Snell.") T.unit,
-    "service-desc">:
-      doc ("Identifies service description for the context that is primarily intended for consumption by machines. [RFC8631]") T.unit,
-    "service-doc">:
-      doc ("Identifies service documentation for the context that is primarily intended for human consumption. [RFC8631]") T.unit,
-    "service-meta">:
-      doc ("Identifies general metadata for the context that is primarily intended for consumption by machines. [RFC8631]") T.unit,
-    "siptrunkingcapability">:
-      doc ("refers to a capability document that defines parameters or configuration requirements for automated peering and communication channel negotiation of the Session Initiation Protocol (SIP). [draft-engi-siptrunkingcapability-link]") T.unit,
-    "sponsored">:
-      doc ("Refers to a resource that is within a context that is sponsored (such as advertising or another compensation agreement). [Google Blog post 09-2019]") T.unit,
-    "start">:
-      doc ("Refers to the first resource in a collection of resources. [HTML 4.01 Specification]") T.unit,
-    "status">:
-      doc ("Identifies a resource that represents the context's status. [RFC8631]") T.unit,
-    "stylesheet">:
-      doc ("Refers to a stylesheet. [HTML]") T.unit,
-    "subsection">:
-      doc ("Refers to a resource serving as a subsection in a collection of resources. [HTML 4.01 Specification]") T.unit,
-    "successor-version">:
-      doc ("Points to a resource containing the successor version in the version history. [RFC5829]") T.unit,
-    "sunset">:
-      doc ("Identifies a resource that provides information about the context's retirement policy. [RFC8594]") T.unit,
-    "tag">:
-      doc ("Gives a tag (identified by the given address) that applies to the current document. [HTML]") T.unit,
-    "terms-of-service">:
-      doc ("Refers to the terms of service associated with the link's context. [RFC6903], section 5") T.unit,
-    "timegate">:
-      doc ("The Target IRI points to a TimeGate for an Original Resource. [RFC7089] A TimeGate for an Original Resource is a resource that is capable of datetime negotiation to support access to prior states of the Original Resource.") T.unit,
-    "timemap">:
-      doc ("The Target IRI points to a TimeMap for an Original Resource. [RFC7089] A TimeMap for an Original Resource is a resource from which a list of URIs of Mementos of the Original Resource is available.") T.unit,
-    "type">:
-      doc ("Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance. [RFC6903], section 6") T.unit,
-    "ugc">:
-      doc ("Refers to a resource that is within a context that is User Generated Content. [Google Blog post 09-2019]") T.unit,
-    "up">:
-      doc ("Refers to a parent document in a hierarchy of documents. [RFC8288] This relation type registration did not indicate a reference. Requested by Noah Slater.") T.unit,
-    "version-history">:
-      doc ("Points to a resource containing the version history for the context. [RFC5829]") T.unit,
-    "via">:
-      doc ("Identifies a resource that is the source of the information in the link's context. [RFC4287]") T.unit,
-    "webmention">:
-      doc ("Identifies a target URI that supports the Webmention protocol. This allows clients that mention a resource in some form of publishing process to contact that endpoint and inform it that this resource has been mentioned. [Webmention] This is a similar \"Linkback\" mechanism to the ones of Refback, Trackback, and Pingback. It uses a different protocol, though, and thus should be discoverable through its own link relation type.") T.unit,
-    "working-copy">:
-      doc ("Points to a working copy for this resource. [RFC5829]") T.unit,
-    "working-copy-of">:
-      doc ("Points to the versioned resource from which this working copy was obtained. [RFC5829]") T.unit]
diff --git a/src/main/haskell/Hydra/Sources/Other/Osv.hs b/src/main/haskell/Hydra/Sources/Other/Osv.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/Osv.hs
+++ /dev/null
@@ -1,184 +0,0 @@
-module Hydra.Sources.Other.Osv where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.osv.schema"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-osv :: String -> Type
-osv = typeref ns
-
--- Note: database_specific and ecosystem_specific fields are ignored, though they must be tolerated when reading entry JSON
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "See https://ossf.github.io/osv-schema"}
-  where
-    definitions = [
-      credited,
-      ecosystem,
-      entry,
-      event,
-      id_,
-      markdown,
-      osvVersion,
-      package_,
-      packageVersions,
-      reference,
-      referenceType,
-      severity,
-      severityScore,
-      severityType,
-      timestamp,
-      url,
-      version,
-      versionOrStar,
-      versionOrZero,
-      versionRange,
-      versionType]
-
-credited :: Binding
-credited = define "Credited" $
-  T.record [
-    "name">: T.string,
-    "contact">: T.maybe $ T.list $ osv "Url"]
-
-ecosystem :: Binding
-ecosystem = define "Ecosystem" $
-  doc ("One of a limited set of defined ecosystems, currently "
-    ++ "Go, npm, OSS-Fuzz, PyPI, RubyGems, crates.io, Packagist, Maven, NuGet, Linux, Debian, Hex, Android, GitHub Actions, or Pub") $
-  T.wrap T.string
-
-entry :: Binding
-entry = define "Entry" $
-  T.record [
-    "schemaVersion">:
-      doc "The default value is '1.0.0', matching version 1.0 of the OSV Schema" $
-      T.maybe $ osv "OsvVersion",
-    "id">: osv "Id",
-    "modified">: osv "Timestamp",
-    "published">: T.maybe $ osv "Timestamp",
-    "withdrawn">: T.maybe $ osv "Timestamp",
-    "aliases">: T.maybe $ T.list $ osv "Id",
-    "related">: T.maybe $ T.list $ osv "Id",
-    "summary">: T.maybe T.string,
-    "details">: T.maybe $ osv "Markdown",
-    "severity">: T.maybe $ T.list $ osv "Severity",
-    "affected">: T.maybe  $ T.list $ osv "PackageVersions",
-    "references">: T.maybe $ T.list $ osv "Reference",
-    "credits">: T.maybe $ T.list $ osv "Credited"]
-
-event :: Binding
-event = define "Event" $
-  T.union [
-    "introduced">: osv "VersionOrZero",
-    "fixed">: osv "Version",
-    "lastAffected">: osv "Version",
-    "limit">: osv "VersionOrStar"]
-
-id_ :: Binding
-id_ = define "Id" $
-  doc ("A string of the format <DB>-<ENTRYID>, where DB names the database and ENTRYID is in the format used "
-    ++ "by the database. For example: OSV-2020-111, CVE-2021-3114, or GHSA-vp9c-fpxx-744v") $
-  T.wrap T.string
-
-markdown :: Binding
-markdown = define "Markdown" $
-  doc "CommonMark markdown text" $
-  T.wrap T.string
-
-osvVersion :: Binding
-osvVersion = define "OsvVersion" $
-  doc "A string which follows the SemVer 2.0.0 format, with no leading 'v' prefix" $
-  T.wrap T.string
-
-package_ :: Binding
-package_ = define "Package" $
-  T.record [
-    "ecosystem">: osv "Ecosystem",
-    "name">: T.string,
-    "purl">: T.maybe $ osv "Url"]
-
-packageVersions :: Binding
-packageVersions = define "PackageVersions" $
-  T.record [
-    "package">: osv "Package",
-    "ranges">: T.maybe $ T.list $ osv "VersionRange",
-    "versions">: T.maybe $ T.list $ osv "Version"]
-
-reference :: Binding
-reference = define "Reference" $
-  T.record [
-    "type">: osv "ReferenceType",
-    "url">: osv "Url"]
-
-referenceType :: Binding
-referenceType = define "ReferenceType" $
-  doc "One of ADVISORY, ARTICLE, REPORT, FIX, GIT, PACKAGE, EVIDENCE, or WEB" $
-  T.wrap T.string
-
-severity :: Binding
-severity = define "Severity" $
-  T.record [
-    "type">: osv "SeverityType",
-    "score">: osv "SeverityScore"]
-
-severityScore :: Binding
-severityScore = define "SeverityScore" $ T.wrap T.string
-
-severityType :: Binding
-severityType = define "SeverityType" $
-  doc "The value CVSS_V3, or future supported types" $
-  T.wrap T.string
-
-timestamp :: Binding
-timestamp = define "Timestamp" $
-  doc "An RFC3339-formatted timestamp in UTC (ending in 'Z')" $
-  T.wrap T.string
-
-url :: Binding
-url = define "Url" $ T.wrap T.string
-
-version :: Binding
-version = define "Version" $
-  doc "A version number in an ecosystem-specific format" $
-  T.wrap T.string
-
-versionOrStar :: Binding
-versionOrStar = define "VersionOrStar" $
-  doc "An ecosystem-specific version number, or the string '*' representing infinity" $
-  T.wrap T.string
-
-versionOrZero :: Binding
-versionOrZero = define "VersionOrZero" $
-  doc "An ecosystem-specific version number, or the string '0' representing a version that sorts before any other version" $
-  T.wrap T.string
-
-versionRange :: Binding
-versionRange = define "VersionRange" $
-  T.record [
-    "type">: osv "VersionType",
-    "repo">: T.maybe $ osv "Url",
-    "events">: T.list $ osv "Event"]
-
-versionType :: Binding
-versionType = define "VersionType" $
-  doc "One of the values 'SEMVER', 'ECOSYSTEM', or 'GIT" $
-  T.wrap T.string
diff --git a/src/main/haskell/Hydra/Sources/Other/StacItems.hs b/src/main/haskell/Hydra/Sources/Other/StacItems.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Other/StacItems.hs
+++ /dev/null
@@ -1,193 +0,0 @@
-module Hydra.Sources.Other.StacItems where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Other.GeoJson       as GeoJson
-import qualified Hydra.Sources.Other.IanaRelations as IanaRelations
-
-
-ns :: Namespace
-ns = Namespace "hydra.stac.items"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-geoj :: String -> Type
-geoj = typeref $ GeoJson.ns
-
-ianarel :: String -> Type
-ianarel = typeref $ IanaRelations.ns
-
-stac :: String -> Type
-stac = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [GeoJson.ns, IanaRelations.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model for SpatioTemporal Asset Catalog (STAC) Items. " ++
-          "See https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md")}
-  where
-    definitions = [
-      asset,
-      item,
-      link,
-      mediaType,
-      relationType,
-      role,
-      stacRelationType,
-      stacVersion,
-      uri,
-      url_]
-
-asset :: Binding
-asset = define "Asset" $
-  doc ("An Asset is an object that contains a URI to data associated with the Item that can be downloaded " ++
-       "or streamed. It is allowed to add additional fields.") $
-  T.record [
-    "href">:
-      doc "URI to the asset object. Relative and absolute URI are both allowed." $
-      stac "Uri",
-    "title">:
-      doc "The displayed title for clients and users." $
-      T.maybe T.string,
-    "description">:
-      doc ("A description of the Asset providing additional details, such as how it was processed or " ++
-           "created. CommonMark 0.29 syntax MAY be used for rich text representation.") $
-      T.maybe T.string,
-    "type">:
-      doc ("Media type of the asset. See the common media types in the best practice doc for commonly " ++
-           "used asset types.") $
-      T.maybe $ stac "MediaType",
-    "roles">:
-      doc "The semantic roles of the asset, similar to the use of rel in links." $
-      T.list $ stac "Role"]
-
-item :: Binding
-item = define "Item" $
-  doc ("This object describes a STAC Item. The fields id, type, bbox, geometry and properties are inherited " ++
-       "from GeoJSON.") $
-  T.record [
-    "feature">:
-      geoj "Feature",
-    "stacVersion">:
-      doc "The STAC version the Item implements" $
-      stac "StacVersion",
-    "stacExtensions">:
-      doc "A list of extensions the Item implements" $
-      T.list $ stac "Url",
-    "links">:
-      doc ("List of link objects to resources and related URLs. A link with the rel set to self is strongly " ++
-           "recommended.") $
-      T.list $ stac "Link",
-    "assets">:
-      doc "Dictionary of asset objects that can be downloaded, each with a unique key." $
-      T.map T.string (stac "Asset"),
-    "collection">:
-      doc ("The id of the STAC Collection this Item references to (see collection relation type). This field " ++
-           "is required if such a relation type is present and is not allowed otherwise. This field provides " ++
-           "an easy way for a user to search for any Items that belong in a specified Collection. Must be a " ++
-           "non-empty string.") $
-      T.maybe $ geoj "Id"]
-
-link :: Binding
-link = define "Link" $
-  doc ("This object describes a relationship with another entity. Data providers are advised to be liberal " ++
-       "with the links section, to describe things like the Catalog an Item is in, related Items, parent or " ++
-       "child Items (modeled in different ways, like an 'acquisition' or derived data). It is allowed to add " ++
-       "additional fields such as a title and type.") $
-  T.record [
-    "href">:
-      doc "The actual link in the format of an URL. Relative and absolute links are both allowed." $
-      stac "Url",
-    "rel">:
-      doc ("Relationship between the current document and the linked document. See chapter \"Relation types\" " ++
-           "for more information.") $
-      stac "RelationType",
-    "type">:
-      doc "Media type of the referenced entity." $
-      T.maybe $ stac "MediaType",
-    "title">:
-      doc "A human readable title to be used in rendered displays of the link." $
-      T.maybe T.string]
-
-mediaType :: Binding
-mediaType = define "MediaType" $ T.wrap T.string
-
-relationType :: Binding
-relationType = define "RelationType" $
-  doc ("STAC Items use a variety of rel types in the link object, to describe the exact nature of the link " ++
-       "between this Item and the entity it is linking to. It is recommended to use the official IANA Link " ++
-       "Relation Types where possible. The following table explains places where STAC use custom rel types " ++
-       "are used with Items. This happens where there is not a clear official option, or where STAC uses an " ++
-       "official type but adds additional meaning for the STAC context.") $
-  T.union [
-    "iana">: ianarel "LinkRelationType",
-    "stac">: stac "StacRelationType",
-    "other">: T.string]
-
-role :: Binding
-role = define "Role" $
-  doc ("The roles field is used to describe the purpose of each asset. It is recommended to include one for " ++
-       "every asset, to give users a sense of why they might want to make use of the asset. There are some " ++
-       "emerging standards that enable clients to take particular action when they encounter particular " ++
-       "roles, listed below. But implementors are encouraged to come up with their own terms to describe the " ++
-       "role.") $
-  T.union [
-    "thumbnail">:
-      doc ("An asset that represents a thumbnail of the Item, typically a true color image (for Items with " ++
-           "assets in the visible wavelengths), lower-resolution (typically smaller 600x600 pixels), and " ++
-           "typically a JPEG or PNG (suitable for display in a web browser). Multiple assets may have this " ++
-           "purpose, but it recommended that the type and roles be unique tuples. For example, Sentinel-2 L2A " ++
-           "provides thumbnail images in both JPEG and JPEG2000 formats, and would be distinguished by their " ++
-           "media types.") T.unit,
-    "overview">:
-      doc ("An asset that represents a possibly larger view than the thumbnail of the Item, for example, a " ++
-           "true color composite of multi-band data.") T.unit,
-    "data">:
-      doc ("The data itself. This is a suggestion for a common role for data files to be used in case data " ++
-           "providers don't come up with their own names and semantics.") T.unit,
-    "metadata">:
-      doc "A metadata sidecar file describing the data in this Item, for example the Landsat-8 MTL file." T.unit,
-    "other">:
-      T.string]
-
-stacRelationType :: Binding
-stacRelationType = define "StacRelationType" $
-  T.union [
-    "self">:
-      doc ("STRONGLY RECOMMENDED. Absolute URL to the Item if it is available at a public URL. This is " ++
-           "particularly useful when in a download package that includes metadata, so that the downstream " ++
-           "user can know where the data has come from.") T.unit,
-    "root">:
-      doc "URL to the root STAC entity (Catalog or Collection)." T.unit,
-    "parent">:
-      doc ("URL to the parent STAC entity (Catalog or Collection).") T.unit,
-    "collection">:
-      doc ("STRONGLY RECOMMENDED. URL to a Collection. Absolute URLs should be used whenever possible. " ++
-           "The referenced Collection is STRONGLY RECOMMENDED to implement the same STAC version as the Item. " ++
-           "A link with this rel type is required if the collection field in properties is present.") T.unit,
-    "derivedFrom">:
-      doc ("URL to a STAC Item that was used as input data in the creation of this Item.") T.unit]
-
-stacVersion :: Binding
-stacVersion = define "StacVersion" $ T.wrap T.string
-
-uri :: Binding
-uri = define "Uri" $ T.wrap T.string
-
-url_ :: Binding
-url_ = define "Url" $ T.wrap T.string
diff --git a/src/main/haskell/Hydra/Sources/Owl/Syntax.hs b/src/main/haskell/Hydra/Sources/Owl/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Owl/Syntax.hs
+++ /dev/null
@@ -1,791 +0,0 @@
-module Hydra.Sources.Owl.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Dsl.Terms              as Terms
-import qualified Hydra.Sources.Rdf.Syntax as RdfSyntax
-import qualified Hydra.Sources.Xml.Schema as XmlSchema
-
-
-ns :: Namespace
-ns = Namespace "hydra.owl.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-owl :: String -> Type
-owl = typeref ns
-
-rdf :: String -> Type
-rdf = typeref $ RdfSyntax.ns
-
-xsd :: String -> Type
-xsd = typeref $ XmlSchema.ns
-
-key_iri :: Name
-key_iri = Name "iri"
-
-withIri :: String -> Type -> Type
-withIri iriStr = annotateType key_iri (Just $ Terms.string iriStr)
-
-nonNegativeInteger :: Type
-nonNegativeInteger = T.bigint
-
-owlIri :: [Char] -> Type -> Type
-owlIri local = withIri $ "http://www.w3.org/2002/07/owl#" ++ local
-
-objectPropertyConstraint :: String -> Binding
-objectPropertyConstraint lname = define lname $ T.record [
-  "annotations">: T.list $ owl "Annotation",
-  "property">: owl "ObjectPropertyExpression"]
-
-simpleUnion :: [String] -> Type
-simpleUnion names = T.union $ (\n -> FieldType (Name $ decapitalize n) $ owl n) <$> names
-
-withAnns :: [FieldType] -> Type
-withAnns fields = T.record $
-  ("annotations">: T.list (owl "Annotation")):fields
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns, RdfSyntax.ns, XmlSchema.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "An OWL 2 syntax model. See https://www.w3.org/TR/owl2-syntax"}
-  where
-    definitions = generalDefinitions ++ owl2Definitions
-
-    generalDefinitions = [
-      ontology,
-      declaration,
-      entity,
-      annotationSubject,
-      annotationValue,
-      annotation,
-      annotationAxiom,
-      annotationAssertion,
-      subAnnotationPropertyOf,
-      annotationPropertyDomain,
-      annotationPropertyRange]
-
-    owl2Definitions = [
-      class_,
-      datatype_,
-      objectProperty,
-      dataProperty,
-      annotationProperty,
-      individual,
-      namedIndividual,
-      anonymousIndividual,
-      objectPropertyExpression,
-      inverseObjectProperty,
-      dataPropertyExpression,
-      dataRange,
-      dataIntersectionOf,
-      dataUnionOf,
-      dataComplementOf,
-      dataOneOf,
-      datatypeRestriction,
-      datatypeRestriction_Constraint,
-      datatypeRestriction_ConstrainingFacet,
-      classExpression,
-      objectIntersectionOf,
-      objectUnionOf,
-      objectComplementOf,
-      objectOneOf,
-      objectSomeValuesFrom,
-      objectAllValuesFrom,
-      objectHasValue,
-      objectHasSelf,
-      objectMinCardinality,
-      objectMaxCardinality,
-      objectExactCardinality,
-      dataSomeValuesFrom,
-      dataAllValuesFrom,
-      dataHasValue,
-      dataMinCardinality,
-      dataMaxCardinality,
-      dataExactCardinality,
-      axiom,
-      classAxiom,
-      subClassOf,
-      equivalentClasses,
-      disjointClasses,
-      disjointUnion,
-      objectPropertyAxiom,
-      subObjectPropertyOf,
-      equivalentObjectProperties,
-      disjointObjectProperties,
-      objectPropertyDomain,
-      objectPropertyRange,
-      inverseObjectProperties,
-      functionalObjectProperty,
-      inverseFunctionalObjectProperty,
-      reflexiveObjectProperty,
-      irreflexiveObjectProperty,
-      symmetricObjectProperty,
-      asymmetricObjectProperty,
-      transitiveObjectProperty,
-      dataPropertyAxiom,
-      subDataPropertyOf,
-      equivalentDataProperties,
-      disjointDataProperties,
-      dataPropertyDomain,
-      dataPropertyRange,
-      functionalDataProperty,
-      datatypeDefinition,
-      hasKey,
-      assertion,
-      sameIndividual,
-      differentIndividuals,
-      classAssertion,
-      objectPropertyAssertion,
-      negativeObjectPropertyAssertion,
-      dataPropertyAssertion,
-      negativeDataPropertyAssertion]
-
--- nonNegativeInteger := a nonempty finite sequence of digits between 0 and 9
--- quotedString := a finite sequence of characters in which " (U+22) and \ (U+5C) occur only in pairs of the form \" (U+5C, U+22) and \\ (U+5C, U+5C), enclosed in a pair of " (U+22) characters
--- languageTag := @ (U+40) followed a nonempty sequence of characters matching the langtag production from [BCP 47]
--- nodeID := a finite sequence of characters matching the BLANK_NODE_LABEL production of [SPARQL]
--- fullIRI := an IRI as defined in [RFC3987], enclosed in a pair of < (U+3C) and > (U+3E) characters
--- prefixName := a finite sequence of characters matching the as PNAME_NS production of [SPARQL]
--- abbreviatedIRI := a finite sequence of characters matching the PNAME_LN production of [SPARQL]
--- IRI := fullIRI | abbreviatedIRI
--- ontologyDocument := { prefixDeclaration } Ontology
--- prefixDeclaration := 'Prefix' '(' prefixName '=' fullIRI ')'
-
--- Ontology :=
---     'Ontology' '(' [ ontologyIRI [ versionIRI ] ]
---        directlyImportsDocuments
---        ontologyAnnotations
---        axioms
---     ')'
-ontology :: Binding
-ontology = define "Ontology" $ T.record [ -- note: omitting IRI and version
-  "directImports">: T.list $ owl "Ontology",
-  "annotations">: T.list $ owl "Annotation",
-  "axioms">: T.list $ owl "Axiom"]
-
--- ontologyIRI := IRI
--- versionIRI := IRI
--- directlyImportsDocuments := { 'Import' '(' IRI ')' }
--- ontologyAnnotations := { Annotation }
--- axioms := { Axiom }
-
--- Declaration := 'Declaration' '(' axiomAnnotations Entity ')'
-declaration :: Binding
-declaration = define "Declaration" $ withAnns [
-  "entity">: owl "Entity"]
-
--- Entity :=
---     'Class' '(' Class ')' |
---     'Datatype' '(' Datatype ')' |
---     'ObjectProperty' '(' ObjectProperty ')' |
---     'DataProperty' '(' DataProperty ')' |
---     'AnnotationProperty' '(' AnnotationProperty ')' |
---     'NamedIndividual' '(' NamedIndividual ')'
-entity :: Binding
-entity = define "Entity" $ simpleUnion [
-  "AnnotationProperty",
-  "Class",
-  "DataProperty",
-  "Datatype",
-  "NamedIndividual",
-  "ObjectProperty"]
-
--- AnnotationSubject := IRI | AnonymousIndividual
-annotationSubject :: Binding
-annotationSubject = define "AnnotationSubject" $ T.union [
-  "iri">: rdf "Iri",
-  "anonymousIndividual">: owl "AnonymousIndividual"]
-
--- AnnotationValue := AnonymousIndividual | IRI | Literal
-annotationValue :: Binding
-annotationValue = define "AnnotationValue" $ T.union [
-  "anonymousIndividual">: owl "AnonymousIndividual",
-  "iri">: rdf "Iri",
-  "literal">: rdf "Literal"]
-
--- axiomAnnotations := { Annotation }
-
--- Annotation := 'Annotation' '(' annotationAnnotations AnnotationProperty AnnotationValue ')'
-annotation :: Binding
-annotation = define "Annotation" $ withAnns [
-  "property">: owl "AnnotationProperty",
-  "value">: owl "AnnotationValue"]
-
--- annotationAnnotations  := { Annotation }
-
--- AnnotationAxiom := AnnotationAssertion | SubAnnotationPropertyOf | AnnotationPropertyDomain | AnnotationPropertyRange
-annotationAxiom :: Binding
-annotationAxiom = define "AnnotationAxiom" $ simpleUnion [
-  "AnnotationAssertion",
-  "AnnotationPropertyDomain",
-  "AnnotationPropertyRange",
-  "SubAnnotationPropertyOf"]
-
--- AnnotationAssertion := 'AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')'
-annotationAssertion :: Binding
-annotationAssertion = define "AnnotationAssertion" $ withAnns [
-  "property">: owl "AnnotationProperty",
-  "subject">: owl "AnnotationSubject",
-  "value">: owl "AnnotationValue"]
-
--- SubAnnotationPropertyOf := 'SubAnnotationPropertyOf' '(' axiomAnnotations subAnnotationProperty superAnnotationProperty ')'
-subAnnotationPropertyOf :: Binding
-subAnnotationPropertyOf = define "SubAnnotationPropertyOf" $ withAnns [
-  "subProperty">: owl "AnnotationProperty",
-  "superProperty">: owl "AnnotationProperty"]
-
--- subAnnotationProperty := AnnotationProperty
--- superAnnotationProperty := AnnotationProperty
-
--- AnnotationPropertyDomain := 'AnnotationPropertyDomain' '(' axiomAnnotations AnnotationProperty IRI ')'
-annotationPropertyDomain :: Binding
-annotationPropertyDomain = define "AnnotationPropertyDomain" $ withAnns [
-  "property">: owl "AnnotationProperty",
-  "iri">: rdf "Iri"]
-
--- AnnotationPropertyRange := 'AnnotationPropertyRange' '(' axiomAnnotations AnnotationProperty IRI ')'
-annotationPropertyRange :: Binding
-annotationPropertyRange = define "AnnotationPropertyRange" $ withAnns [
-  "property">: owl "AnnotationProperty",
-  "iri">: rdf "Iri"]
-
--- Class := IRI
-class_ :: Binding
-class_ = define "Class" $
-  see "https://www.w3.org/TR/owl2-syntax/#Classes" $ T.wrap T.unit
-
--- Datatype := IRI
-datatype_ :: Binding
-datatype_ = define "Datatype" $
-  see "https://www.w3.org/TR/owl2-syntax/#Datatypes" $
-  T.union [
-    "xmlSchema">:
-      note ("XML Schema datatypes are treated as a special case in this model " ++
-            "(not in the OWL 2 specification itself) because they are particularly common") $
-      xsd "Datatype",
-    "other">: rdf "Iri"]
-
--- ObjectProperty := IRI
-objectProperty :: Binding
-objectProperty = define "ObjectProperty" $
-  see "https://www.w3.org/TR/owl2-syntax/#Object_Properties" $ T.wrap T.unit
-
--- DataProperty := IRI
-dataProperty :: Binding
-dataProperty = define "DataProperty" $ T.wrap T.unit
-
--- AnnotationProperty := IRI
-annotationProperty :: Binding
-annotationProperty = define "AnnotationProperty" $ T.wrap T.unit
-
--- Individual := NamedIndividual | AnonymousIndividual
-individual :: Binding
-individual = define "Individual" $ T.union [
-  "named">: owl "NamedIndividual",
-  "anonymous">: owl "AnonymousIndividual"]
-
--- NamedIndividual := IRI
-namedIndividual :: Binding
-namedIndividual = define "NamedIndividual" $ T.wrap T.unit
-
--- AnonymousIndividual := nodeID
-anonymousIndividual :: Binding
-anonymousIndividual = define "AnonymousIndividual" $ T.wrap T.unit
-
--- Literal := typedLiteral | stringLiteralNoLanguage | stringLiteralWithLanguage
--- typedLiteral := lexicalForm '^^' Datatype
--- lexicalForm := quotedString
--- stringLiteralNoLanguage := quotedString
--- stringLiteralWithLanguage := quotedString languageTag
-
--- ObjectPropertyExpression := ObjectProperty | InverseObjectProperty
-objectPropertyExpression :: Binding
-objectPropertyExpression = define "ObjectPropertyExpression" $ T.union [
-  "object">: owl "ObjectProperty",
-  "inverseObject">: owl "InverseObjectProperty"]
-
--- InverseObjectProperty := 'ObjectInverseOf' '(' ObjectProperty ')'
-inverseObjectProperty :: Binding
-inverseObjectProperty = define "InverseObjectProperty" $ T.wrap $ owl "ObjectProperty"
-
--- DataPropertyExpression := DataProperty
-dataPropertyExpression :: Binding
-dataPropertyExpression = define "DataPropertyExpression" $ T.wrap $ owl "DataProperty"
-
--- DataRange :=
---     Datatype |
---     DataIntersectionOf |
---     DataUnionOf |
---     DataComplementOf |
---     DataOneOf |
---     DatatypeRestriction
-dataRange :: Binding
-dataRange = define "DataRange" $
-  see "https://www.w3.org/TR/owl2-syntax/#Data_Ranges" $
-  simpleUnion [
-    "DataComplementOf",
-    "DataIntersectionOf",
-    "DataOneOf",
-    "DataUnionOf",
-    "Datatype",
-    "DatatypeRestriction"]
-
--- DataIntersectionOf := 'DataIntersectionOf' '(' DataRange DataRange { DataRange } ')'
-dataIntersectionOf :: Binding
-dataIntersectionOf = define "DataIntersectionOf" $
-  see "https://www.w3.org/TR/owl2-syntax/#Intersection_of_Data_Ranges" $
-  T.wrap $ twoOrMoreList $ owl "DataRange"
-
--- DataUnionOf := 'DataUnionOf' '(' DataRange DataRange { DataRange } ')'
-dataUnionOf :: Binding
-dataUnionOf = define "DataUnionOf" $
-  see "https://www.w3.org/TR/owl2-syntax/#Union_of_Data_Ranges" $
-  T.wrap $ twoOrMoreList $ owl "DataRange"
-
--- DataComplementOf := 'DataComplementOf' '(' DataRange ')'
-dataComplementOf :: Binding
-dataComplementOf = define "DataComplementOf" $
-  see "https://www.w3.org/TR/owl2-syntax/#Complement_of_Data_Ranges" $
-  T.wrap $ owl "DataRange"
-
--- DataOneOf := 'DataOneOf' '(' Literal { Literal } ')'
-dataOneOf :: Binding
-dataOneOf = define "DataOneOf" $
-  see "https://www.w3.org/TR/owl2-syntax/#Enumeration_of_Literals" $
-  T.wrap $ nonemptyList $ rdf "Literal"
-
--- DatatypeRestriction := 'DatatypeRestriction' '(' Datatype constrainingFacet restrictionValue { constrainingFacet restrictionValue } ')'
--- constrainingFacet := IRI
--- restrictionValue := Literal
-datatypeRestriction :: Binding
-datatypeRestriction = define "DatatypeRestriction" $
-  see "https://www.w3.org/TR/owl2-syntax/#Datatype_Restrictions" $
-  T.record [
-    "datatype">: owl "Datatype",
-    "constraints">: nonemptyList $ owl "DatatypeRestriction_Constraint"]
-
-datatypeRestriction_Constraint :: Binding
-datatypeRestriction_Constraint = define "DatatypeRestriction_Constraint" $ T.record [
-  "constrainingFacet">: owl "DatatypeRestriction_ConstrainingFacet",
-  "restrictionValue">: rdf "Literal"]
-
-datatypeRestriction_ConstrainingFacet :: Binding
-datatypeRestriction_ConstrainingFacet = define "DatatypeRestriction_ConstrainingFacet" $
-  T.union [
-    "xmlSchema">:
-      note ("XML Schema constraining facets are treated as a special case in this model " ++
-            "(not in the OWL 2 specification itself) because they are particularly common") $
-      xsd "ConstrainingFacet",
-    "other">: rdf "Iri"]
-
--- ClassExpression :=
---     Class |
---     ObjectIntersectionOf | ObjectUnionOf | ObjectComplementOf | ObjectOneOf |
---     ObjectSomeValuesFrom | ObjectAllValuesFrom | ObjectHasValue | ObjectHasSelf |
---     ObjectMinCardinality | ObjectMaxCardinality | ObjectExactCardinality |
---     DataSomeValuesFrom | DataAllValuesFrom | DataHasValue |
---     DataMinCardinality | DataMaxCardinality | DataExactCardinality
-classExpression :: Binding
-classExpression = define "ClassExpression" $ simpleUnion [
-  "Class",
-  "DataSomeValuesFrom",
-  "DataAllValuesFrom",
-  "DataHasValue",
-  "DataMinCardinality",
-  "DataMaxCardinality",
-  "DataExactCardinality",
-  "ObjectAllValuesFrom",
-  "ObjectExactCardinality",
-  "ObjectHasSelf",
-  "ObjectHasValue",
-  "ObjectIntersectionOf",
-  "ObjectMaxCardinality",
-  "ObjectMinCardinality",
-  "ObjectOneOf",
-  "ObjectSomeValuesFrom",
-  "ObjectUnionOf"]
-
--- ObjectIntersectionOf := 'ObjectIntersectionOf' '(' ClassExpression ClassExpression { ClassExpression } ')'
-objectIntersectionOf :: Binding
-objectIntersectionOf = define "ObjectIntersectionOf" $ T.wrap $ twoOrMoreList $ owl "ClassExpression"
-
--- ObjectUnionOf := 'ObjectUnionOf' '(' ClassExpression ClassExpression { ClassExpression } ')'
-objectUnionOf :: Binding
-objectUnionOf = define "ObjectUnionOf" $ T.wrap $ twoOrMoreList $ owl "ClassExpression"
-
--- ObjectComplementOf := 'ObjectComplementOf' '(' ClassExpression ')'
-objectComplementOf :: Binding
-objectComplementOf = define "ObjectComplementOf" $ T.wrap $ owl "ClassExpression"
-
--- ObjectOneOf := 'ObjectOneOf' '(' Individual { Individual }')'
-objectOneOf :: Binding
-objectOneOf = define "ObjectOneOf" $ T.wrap $ nonemptyList $ owl "Individual"
-
--- ObjectSomeValuesFrom := 'ObjectSomeValuesFrom' '(' ObjectPropertyExpression ClassExpression ')'
-objectSomeValuesFrom :: Binding
-objectSomeValuesFrom = define "ObjectSomeValuesFrom" $ T.record [
-  "property">: owl "ObjectPropertyExpression",
-  "class">: owl "ClassExpression"]
-
--- ObjectAllValuesFrom := 'ObjectAllValuesFrom' '(' ObjectPropertyExpression ClassExpression ')'
-objectAllValuesFrom :: Binding
-objectAllValuesFrom = define "ObjectAllValuesFrom" $ T.record [
-  "property">: owl "ObjectPropertyExpression",
-  "class">: owl "ClassExpression"]
-
--- ObjectHasValue := 'ObjectHasValue' '(' ObjectPropertyExpression Individual ')'
-objectHasValue :: Binding
-objectHasValue = define "ObjectHasValue" $ T.record [
-  "property">: owl "ObjectPropertyExpression",
-  "individual">: owl "Individual"]
-
--- ObjectHasSelf := 'ObjectHasSelf' '(' ObjectPropertyExpression ')'
-objectHasSelf :: Binding
-objectHasSelf = define "ObjectHasSelf" $ T.wrap $ owl "ObjectPropertyExpression"
-
--- ObjectMinCardinality := 'ObjectMinCardinality' '(' nonNegativeInteger ObjectPropertyExpression [ ClassExpression ] ')'
-objectMinCardinality :: Binding
-objectMinCardinality = define "ObjectMinCardinality" $
-  see "https://www.w3.org/TR/owl2-syntax/#Minimum_Cardinality" $
-  T.record [
-    "bound">: nonNegativeInteger,
-    "property">: owl "ObjectPropertyExpression",
-    "class">: T.list $ owl "ClassExpression"]
-
--- ObjectMaxCardinality := 'ObjectMaxCardinality' '(' nonNegativeInteger ObjectPropertyExpression [ ClassExpression ] ')'
-objectMaxCardinality :: Binding
-objectMaxCardinality = define "ObjectMaxCardinality" $
-  see "https://www.w3.org/TR/owl2-syntax/#Maximum_Cardinality" $
-  T.record [
-    "bound">: nonNegativeInteger,
-    "property">: owl "ObjectPropertyExpression",
-    "class">: T.list $ owl "ClassExpression"]
-
--- ObjectExactCardinality := 'ObjectExactCardinality' '(' nonNegativeInteger ObjectPropertyExpression [ ClassExpression ] ')'
-objectExactCardinality :: Binding
-objectExactCardinality = define "ObjectExactCardinality" $
-  see "https://www.w3.org/TR/owl2-syntax/#Exact_Cardinality" $
-  T.record [
-    "bound">: nonNegativeInteger,
-    "property">: owl "ObjectPropertyExpression",
-    "class">: T.list $ owl "ClassExpression"]
-
--- DataSomeValuesFrom := 'DataSomeValuesFrom' '(' DataPropertyExpression { DataPropertyExpression } DataRange ')'
-dataSomeValuesFrom :: Binding
-dataSomeValuesFrom = define "DataSomeValuesFrom" $ T.record [
-  "property">: nonemptyList $ owl "DataPropertyExpression",
-  "range">: owl "DataRange"]
-
--- DataAllValuesFrom := 'DataAllValuesFrom' '(' DataPropertyExpression { DataPropertyExpression } DataRange ')'
-dataAllValuesFrom :: Binding
-dataAllValuesFrom = define "DataAllValuesFrom" $ T.record [
-  "property">: nonemptyList $ owl "DataPropertyExpression",
-  "range">: owl "DataRange"]
-
--- DataHasValue := 'DataHasValue' '(' DataPropertyExpression Literal ')'
-dataHasValue :: Binding
-dataHasValue = define "DataHasValue" $ T.record [
-  "property">: owl "DataPropertyExpression",
-  "value">: rdf "Literal"]
-
--- DataMinCardinality := 'DataMinCardinality' '(' nonNegativeInteger DataPropertyExpression [ DataRange ] ')'
-dataMinCardinality :: Binding
-dataMinCardinality = define "DataMinCardinality" $ T.record [
-  "bound">: nonNegativeInteger,
-  "property">: owl "DataPropertyExpression",
-  "range">: T.list $ owl "DataRange"]
-
--- DataMaxCardinality := 'DataMaxCardinality' '(' nonNegativeInteger DataPropertyExpression [ DataRange ] ')'
-dataMaxCardinality :: Binding
-dataMaxCardinality = define "DataMaxCardinality" $ T.record [
-  "bound">: nonNegativeInteger,
-  "property">: owl "DataPropertyExpression",
-  "range">: T.list $ owl "DataRange"]
-
--- DataExactCardinality := 'DataExactCardinality' '(' nonNegativeInteger DataPropertyExpression [ DataRange ] ')'
-dataExactCardinality :: Binding
-dataExactCardinality = define "DataExactCardinality" $ T.record [
-  "bound">: nonNegativeInteger,
-  "property">: owl "DataPropertyExpression",
-  "range">: T.list $ owl "DataRange"]
-
--- Axiom := Declaration | ClassAxiom | ObjectPropertyAxiom | DataPropertyAxiom | DatatypeDefinition | HasKey | Assertion | AnnotationAxiom
-axiom :: Binding
-axiom = define "Axiom" $
-  see "https://www.w3.org/TR/owl2-syntax/#Axioms" $
-  simpleUnion [
-    "AnnotationAxiom",
-    "Assertion",
-    "ClassAxiom",
-    "DataPropertyAxiom",
-    "DatatypeDefinition",
-    "Declaration",
-    "HasKey",
-    "ObjectPropertyAxiom"]
-
--- ClassAxiom := SubClassOf | EquivalentClasses | DisjointClasses | DisjointUnion
-classAxiom :: Binding
-classAxiom = define "ClassAxiom" $ simpleUnion [
-  "DisjointClasses",
-  "DisjointUnion",
-  "EquivalentClasses",
-  "SubClassOf"]
-
--- SubClassOf := 'SubClassOf' '(' axiomAnnotations subClassExpression superClassExpression ')'
--- subClassExpression := ClassExpression
--- superClassExpression := ClassExpression
-subClassOf :: Binding
-subClassOf = define "SubClassOf" $ withAnns [
-  "subClass">: owl "ClassExpression",
-  "superClass">: owl "ClassExpression"]
-
--- EquivalentClasses := 'EquivalentClasses' '(' axiomAnnotations ClassExpression ClassExpression { ClassExpression } ')'
-equivalentClasses :: Binding
-equivalentClasses = define "EquivalentClasses" $ withAnns [
-  "classes">: twoOrMoreList $ owl "ClassExpression"]
-
--- DisjointClasses := 'DisjointClasses' '(' axiomAnnotations ClassExpression ClassExpression { ClassExpression } ')'
-disjointClasses :: Binding
-disjointClasses = define "DisjointClasses" $ withAnns [
-  "classes">: twoOrMoreList $ owl "ClassExpression"]
-
--- DisjointUnion := 'DisjointUnion' '(' axiomAnnotations Class disjointClassExpressions ')'
--- disjointClassExpressions := ClassExpression ClassExpression { ClassExpression }
-disjointUnion :: Binding
-disjointUnion = define "DisjointUnion" $
-  see "https://www.w3.org/TR/owl2-syntax/#Disjoint_Union_of_Class_Expressions" $
-  withAnns [
-    "class">: owl "Class",
-    "classes">: twoOrMoreList $ owl "ClassExpression"]
-
--- ObjectPropertyAxiom :=
---     SubObjectPropertyOf | EquivalentObjectProperties |
---     DisjointObjectProperties | InverseObjectProperties |
---     ObjectPropertyDomain | ObjectPropertyRange |
---     FunctionalObjectProperty | InverseFunctionalObjectProperty |
---     ReflexiveObjectProperty | IrreflexiveObjectProperty |
---     SymmetricObjectProperty | AsymmetricObjectProperty |
---     TransitiveObjectProperty
-objectPropertyAxiom :: Binding
-objectPropertyAxiom = define "ObjectPropertyAxiom" $ simpleUnion [
-  "AsymmetricObjectProperty",
-  "DisjointObjectProperties",
-  "EquivalentObjectProperties",
-  "FunctionalObjectProperty",
-  "InverseFunctionalObjectProperty",
-  "InverseObjectProperties",
-  "IrreflexiveObjectProperty",
-  "ObjectPropertyDomain",
-  "ObjectPropertyRange",
-  "ReflexiveObjectProperty",
-  "SubObjectPropertyOf",
-  "SymmetricObjectProperty",
-  "TransitiveObjectProperty"]
-
--- SubObjectPropertyOf := 'SubObjectPropertyOf' '(' axiomAnnotations subObjectPropertyExpression superObjectPropertyExpression ')'
-subObjectPropertyOf :: Binding
-subObjectPropertyOf = define "SubObjectPropertyOf" $ withAnns [
-  "subProperty">: nonemptyList $ owl "ObjectPropertyExpression",
-  "superProperty">: owl "ObjectPropertyExpression"]
--- subObjectPropertyExpression := ObjectPropertyExpression | propertyExpressionChain
--- propertyExpressionChain := 'ObjectPropertyChain' '(' ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'
--- superObjectPropertyExpression := ObjectPropertyExpression
-
--- EquivalentObjectProperties := 'EquivalentObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'
-equivalentObjectProperties :: Binding
-equivalentObjectProperties = define "EquivalentObjectProperties" $ withAnns [
-  "properties">: twoOrMoreList $ owl "ObjectPropertyExpression"]
-
--- DisjointObjectProperties := 'DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'
-disjointObjectProperties :: Binding
-disjointObjectProperties = define "DisjointObjectProperties" $ withAnns [
-  "properties">: twoOrMoreList $ owl "ObjectPropertyExpression"]
-
--- ObjectPropertyDomain := 'ObjectPropertyDomain' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')'
-objectPropertyDomain :: Binding
-objectPropertyDomain = define "ObjectPropertyDomain" $
-  see "https://www.w3.org/TR/owl2-syntax/#Object_Property_Domain" $
-  withAnns [
-    "property">: owl "ObjectPropertyExpression",
-    "domain">: owl "ClassExpression"]
-
--- ObjectPropertyRange := 'ObjectPropertyRange' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')'
-objectPropertyRange :: Binding
-objectPropertyRange = define "ObjectPropertyRange" $
-  see "https://www.w3.org/TR/owl2-syntax/#Object_Property_Range" $
-  withAnns [
-    "property">: owl "ObjectPropertyExpression",
-    "range">: owl "ClassExpression"]
-
--- InverseObjectProperties := 'InverseObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpression ')'
-inverseObjectProperties :: Binding
-inverseObjectProperties = define "InverseObjectProperties" $ withAnns [
-  "property1">: owl "ObjectPropertyExpression",
-  "property2">: owl "ObjectPropertyExpression"]
-
--- FunctionalObjectProperty := 'FunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-functionalObjectProperty :: Binding
-functionalObjectProperty = objectPropertyConstraint "FunctionalObjectProperty"
-
--- InverseFunctionalObjectProperty := 'InverseFunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-inverseFunctionalObjectProperty :: Binding
-inverseFunctionalObjectProperty = objectPropertyConstraint "InverseFunctionalObjectProperty"
-
--- ReflexiveObjectProperty := 'ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-reflexiveObjectProperty :: Binding
-reflexiveObjectProperty = objectPropertyConstraint "ReflexiveObjectProperty"
-
--- IrreflexiveObjectProperty := 'IrreflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-irreflexiveObjectProperty :: Binding
-irreflexiveObjectProperty = objectPropertyConstraint "IrreflexiveObjectProperty"
-
--- SymmetricObjectProperty := 'SymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-symmetricObjectProperty :: Binding
-symmetricObjectProperty = objectPropertyConstraint "SymmetricObjectProperty"
-
--- AsymmetricObjectProperty := 'AsymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-asymmetricObjectProperty :: Binding
-asymmetricObjectProperty = objectPropertyConstraint "AsymmetricObjectProperty"
-
--- TransitiveObjectProperty := 'TransitiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')'
-transitiveObjectProperty :: Binding
-transitiveObjectProperty = objectPropertyConstraint "TransitiveObjectProperty"
-
--- DataPropertyAxiom :=
---     SubDataPropertyOf | EquivalentDataProperties | DisjointDataProperties |
---     DataPropertyDomain | DataPropertyRange | FunctionalDataProperty
-dataPropertyAxiom :: Binding
-dataPropertyAxiom = define "DataPropertyAxiom" $ simpleUnion [
-  "DataPropertyAxiom",
-  "DataPropertyRange",
-  "DisjointDataProperties",
-  "EquivalentDataProperties",
-  "FunctionalDataProperty",
-  "SubDataPropertyOf"]
-
--- SubDataPropertyOf := 'SubDataPropertyOf' '(' axiomAnnotations subDataPropertyExpression superDataPropertyExpression ')'
-subDataPropertyOf :: Binding
-subDataPropertyOf = define "SubDataPropertyOf" $ withAnns [
-  "subProperty">: owl "DataPropertyExpression",
-  "superProperty">: owl "DataPropertyExpression"]
--- subDataPropertyExpression := DataPropertyExpression
--- superDataPropertyExpression := DataPropertyExpression
-
--- EquivalentDataProperties := 'EquivalentDataProperties' '(' axiomAnnotations DataPropertyExpression DataPropertyExpression { DataPropertyExpression } ')'
-equivalentDataProperties :: Binding
-equivalentDataProperties = define "EquivalentDataProperties" $ withAnns [
-  "properties">: twoOrMoreList $ owl "DataPropertyExpression"]
-
--- DisjointDataProperties := 'DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression DataPropertyExpression { DataPropertyExpression } ')'
-disjointDataProperties :: Binding
-disjointDataProperties = define "DisjointDataProperties" $ withAnns [
-  "properties">: twoOrMoreList $ owl "DataPropertyExpression"]
-
--- DataPropertyDomain := 'DataPropertyDomain' '(' axiomAnnotations DataPropertyExpression ClassExpression ')'
-dataPropertyDomain :: Binding
-dataPropertyDomain = define "DataPropertyDomain" $ withAnns [
-  "property">: owl "DataPropertyExpression",
-  "domain">: owl "ClassExpression"]
-
--- DataPropertyRange := 'DataPropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')'
-dataPropertyRange :: Binding
-dataPropertyRange = define "DataPropertyRange" $ withAnns [
-  "property">: owl "DataPropertyExpression",
-  "range">: owl "ClassExpression"]
-
--- FunctionalDataProperty := 'FunctionalDataProperty' '(' axiomAnnotations DataPropertyExpression ')'
-functionalDataProperty :: Binding
-functionalDataProperty = define "FunctionalDataProperty" $ withAnns [
-  "property">: owl "DataPropertyExpression"]
-
--- DatatypeDefinition := 'DatatypeDefinition' '(' axiomAnnotations Datatype DataRange ')'
-datatypeDefinition :: Binding
-datatypeDefinition = define "DatatypeDefinition" $ withAnns [
-  "datatype">: owl "Datatype",
-  "range">: owl "DataRange"]
-
--- HasKey := 'HasKey' '(' axiomAnnotations ClassExpression '(' { ObjectPropertyExpression } ')' '(' { DataPropertyExpression } ')' ')'
-hasKey :: Binding
-hasKey = define "HasKey" $
-  see "https://www.w3.org/TR/owl2-syntax/#Keys" $
-  withAnns [
-    "class">: owl "ClassExpression",
-    "objectProperties">: T.list $ owl "ObjectPropertyExpression",
-    "dataProperties">: T.list $ owl "DataPropertyExpression"]
-
--- Assertion :=
---     SameIndividual | DifferentIndividuals | ClassAssertion |
---     ObjectPropertyAssertion | NegativeObjectPropertyAssertion |
---     DataPropertyAssertion | NegativeDataPropertyAssertion
-assertion :: Binding
-assertion = define "Assertion" $ simpleUnion [
-  "ClassAssertion",
-  "DataPropertyAssertion",
-  "DifferentIndividuals",
-  "ObjectPropertyAssertion",
-  "NegativeDataPropertyAssertion",
-  "NegativeObjectPropertyAssertion",
-  "SameIndividual"]
-
--- sourceIndividual := Individual
--- targetIndividual := Individual
--- targetValue := Literal
--- SameIndividual := 'SameIndividual' '(' axiomAnnotations Individual Individual { Individual } ')'
-sameIndividual :: Binding
-sameIndividual = define "SameIndividual" $ withAnns [
-  "individuals">: twoOrMoreList $ owl "Individual"]
-
--- DifferentIndividuals := 'DifferentIndividuals' '(' axiomAnnotations Individual Individual { Individual } ')'
-differentIndividuals :: Binding
-differentIndividuals = define "DifferentIndividuals" $ withAnns [
-  "individuals">: twoOrMoreList $ owl "Individual"]
-
--- ClassAssertion := 'ClassAssertion' '(' axiomAnnotations ClassExpression Individual ')'
-classAssertion :: Binding
-classAssertion = define "ClassAssertion" $ withAnns [
-  "class">: owl "ClassExpression",
-  "individual">: owl "Individual"]
-
--- ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')'
-objectPropertyAssertion :: Binding
-objectPropertyAssertion = define "ObjectPropertyAssertion" $ withAnns [
-  "property">: owl "ObjectPropertyExpression",
-  "source">: owl "Individual",
-  "target">: owl "Individual"]
-
--- NegativeObjectPropertyAssertion := 'NegativeObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')'
-negativeObjectPropertyAssertion :: Binding
-negativeObjectPropertyAssertion = define "NegativeObjectPropertyAssertion" $ withAnns [
-  "property">: owl "ObjectPropertyExpression",
-  "source">: owl "Individual",
-  "target">: owl "Individual"]
-
--- DataPropertyAssertion := 'DataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')'
-dataPropertyAssertion :: Binding
-dataPropertyAssertion = define "DataPropertyAssertion" $ withAnns [
-  "property">: owl "DataPropertyExpression",
-  "source">: owl "Individual",
-  "target">: owl "Individual"]
-
--- NegativeDataPropertyAssertion := 'NegativeDataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')'
-negativeDataPropertyAssertion :: Binding
-negativeDataPropertyAssertion = define "NegativeDataPropertyAssertion" $ withAnns [
-  "property">: owl "DataPropertyExpression",
-  "source">: owl "Individual",
-  "target">: owl "Individual"]
diff --git a/src/main/haskell/Hydra/Sources/Parquet/Format.hs b/src/main/haskell/Hydra/Sources/Parquet/Format.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Parquet/Format.hs
+++ /dev/null
@@ -1,846 +0,0 @@
-module Hydra.Sources.Parquet.Format where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.parquet.format"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-parquet :: String -> Type
-parquet = typeref ns
-
--- Note: deprecated and trivial/empty type definitions are excluded from this model
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model for the Parquet format. Based on the Thrift-based specification at:\n" ++
-      "  https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift")}
-  where
-    definitions = [
-      type_,
-      fieldRepetitionType,
-      statistics,
-      decimalType,
-      timeUnit,
-      timestampType,
-      timeType,
-      intType,
-      logicalType,
-      schemaElement,
-      encoding,
-      compressionCodec,
-      pageType,
-      boundaryOrder,
-      dataPageHeader,
-      indexPageHeader,
-      dictionaryPageHeader,
-      dataPageHeaderV2,
-      bloomFilterAlgorithm,
-      bloomFilterHash,
-      bloomFilterCompression,
-      bloomFilterHeader,
-      pageHeader,
-      keyValue,
-      sortingColumn,
-      pageEncodingStats,
-      columnMetaData,
-      encryptionWithFooterKey,
-      encryptionWithColumnKey,
-      columnCryptoMetaData,
-      columnChunk,
-      rowGroup,
-      columnOrder,
-      pageLocation,
-      offsetIndex,
-      columnIndex,
-      aesGcmV1,
-      aesGcmCtrV1,
-      encryptionAlgorithm,
-      fileMetaData,
-      fileCryptoMetaData]
-
-type_ :: Binding
-type_ = define "Type" $
-  doc ("Types supported by Parquet.  These types are intended to be used in combination " ++
-       "with the encodings to control the on disk storage format. " ++
-       "For example INT16 is not included as a type since a good encoding of INT32 " ++
-       "would handle this.") $
-  T.enum [
-    "boolean",
-    "int32",
-    "int64",
-    "float",
-    "double",
-    "byteArray",
-    "fixedLenByteArray"]
-
-fieldRepetitionType :: Binding
-fieldRepetitionType = define "FieldRepetitionType" $
-  doc "Representation of Schemas" $
-  T.union [
-    "required">: doc "This field is required (can not be null) and each record has exactly 1 value." T.unit,
-    "optional">: doc "The field is optional (can be null) and each record has 0 or 1 values." T.unit,
-    "repeated">: doc "The field is repeated and can contain 0 or more values" T.unit]
-
-statistics :: Binding
-statistics = define "Statistics" $
-  doc "Statistics per row group and per page. All fields are optional." $
-  T.record [
-    "nullCount">: T.maybe T.uint64,
-    "distinctCount">: T.maybe T.uint64,
-    "maxValue">:
-      doc ("Max value for the column, determined by its ColumnOrder. " ++
-           "Values are encoded using PLAIN encoding, except that variable-length byte " ++
-           "arrays do not include a length prefix.") $
-      T.maybe T.binary,
-    "minValue">:
-      doc ("Max value for the column, determined by its ColumnOrder. " ++
-           "Values are encoded using PLAIN encoding, except that variable-length byte " ++
-           "arrays do not include a length prefix.") $
-      T.maybe T.binary]
-
-decimalType :: Binding
-decimalType = define "DecimalType" $
-  doc ("Decimal logical type annotation. " ++
-       "To maintain forward-compatibility in v1, implementations using this logical " ++
-       "type must also set scale and precision on the annotated SchemaElement. " ++
-       "Allowed for physical types: INT32, INT64, FIXED, and BINARY") $
-  T.record [
-    "scale">: T.int32,
-    "precision">: T.int32]
-
-timeUnit :: Binding
-timeUnit = define "TimeUnit" $
-  T.enum [
-    "millis",
-    "micros",
-    "nanos"]
-
-timestampType :: Binding
-timestampType = define "TimestampType" $
-  doc ("Timestamp logical type annotation. " ++
-       "Allowed for physical types: INT64") $
-  T.record [
-    "isAdjustedToUtc">: T.boolean,
-    "unit">: parquet "TimeUnit"]
-
-timeType :: Binding
-timeType = define "TimeType" $
-  doc ("Time logical type annotation. " ++
-       "Allowed for physical types: INT32 (millis), INT64 (micros, nanos)") $
-  T.record [
-    "isAdjustedToUtc">: T.boolean,
-    "unit">: parquet "TimeUnit"]
-
-intType :: Binding
-intType = define "IntType" $
-  doc ("Integer logical type annotation. " ++
-      "bitWidth must be 8, 16, 32, or 64. " ++
-      "Allowed for physical types: INT32, INT64") $
-  T.record [
-    "bitWidth">: T.uint8,
-    "isSigned">: T.boolean]
-
-logicalType :: Binding
-logicalType = define "LogicalType" $
-  doc ("LogicalType annotations to replace ConvertedType. " ++
-       "To maintain compatibility, implementations using LogicalType for a " ++
-       "SchemaElement aust also set the corresponding ConvertedType (if any) " ++
-       "from the following table.") $
-  T.union [
-    "string">: doc "use ConvertedType UTF8" T.unit,
-    "map">: doc "use ConvertedType MAP" T.unit,
-    "list">: doc "use ConvertedType LIST" T.unit,
-    "enum">: doc "use ConvertedType ENUM" T.unit,
-    "decimal">:
-      doc "use ConvertedType DECIMAL + SchemaElement.{scale, precision}" $
-      parquet "DecimalType",
-    "date">: doc "use ConvertedType DATE" T.unit,
-    "time">:
-      doc ("use ConvertedType TIME_MICROS for TIME(isAdjustedToUTC = *, unit = MICROS). " ++
-           "use ConvertedType TIME_MILLIS for TIME(isAdjustedToUTC = *, unit = MILLIS)") $
-      parquet "TimeType",
-    "timestamp">:
-      doc ("use ConvertedType TIMESTAMP_MICROS for TIMESTAMP(isAdjustedToUTC = *, unit = MICROS). " ++
-           "use ConvertedType TIMESTAMP_MILLIS for TIMESTAMP(isAdjustedToUTC = *, unit = MILLIS)") $
-      parquet "TimestampType",
-    "integer">:
-      doc "use ConvertedType INT_* or UINT_*" $
-      parquet "IntType",
-    "unknown">:
-      doc "no compatible ConvertedType" T.unit,
-    "json">: doc "use ConvertedType JSON" T.unit,
-    "bson">: doc "use ConvertedType BSON" T.unit,
-    "uuid">: doc "no compatible ConvertedType" T.unit]
-
-schemaElement :: Binding
-schemaElement = define "SchemaElement" $
-  doc ("Represents a element inside a schema definition.\n" ++
-       "- if it is a group (inner node) then type is undefined and num_children is defined\n" ++
-       "- if it is a primitive type (leaf) then type is defined and num_children is undefined\n" ++
-       "the nodes are listed in depth first traversal order.") $
-  T.record [
-    "type">:
-      doc "Data type for this field. Not set if the current element is a non-leaf node" $
-      T.maybe $ parquet "Type",
-    "typeLength">:
-      doc ("If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values. " ++
-           "Otherwise, if specified, this is the maximum bit length to store any of the values. " ++
-           "(e.g. a low cardinality INT col could have this set to 3).  Note that this is " ++
-           "in the schema, and therefore fixed for the entire file.") $
-      T.maybe T.int32,
-    "repetitionType">:
-      doc ("repetition of the field. The root of the schema does not have a repetition_type. " ++
-           "All other nodes must have one") $
-      T.maybe $ parquet "FieldRepetitionType",
-    "name">:
-      doc "Name of the field in the schema"
-      T.string,
-    "numChildren">:
-      doc ("Nested fields.  Since thrift does not support nested fields, " ++
-           "the nesting is flattened to a single list by a depth-first traversal. " ++
-           "The children count is used to construct the nested relationship. " ++
-           "This field is not set when the element is a primitive type") $
-      T.maybe T.int32,
-    "fieldId">:
-      doc ("When the original schema supports field ids, this will save the " ++
-           "original field id in the parquet schema") $
-      T.maybe T.int32,
-    "logicalType">:
-      doc ("The logical type of this SchemaElement. " ++
-           "LogicalType replaces ConvertedType, but ConvertedType is still required " ++
-           "for some logical types to ensure forward-compatibility in format v1.") $
-      T.maybe $ parquet "LogicalType"]
-
-encoding :: Binding
-encoding = define "Encoding" $
-  doc ("Encodings supported by Parquet.  Not all encodings are valid for all types.  These " ++
-       "enums are also used to specify the encoding of definition and repetition levels. " ++
-       "See the accompanying doc for the details of the more complicated encodings.") $
-  T.union [
-    "plain">:
-      doc ("Default encoding.\n" ++
-           "BOOLEAN - 1 bit per value. 0 is false; 1 is true.\n" ++
-           "INT32 - 4 bytes per value.  Stored as little-endian.\n" ++
-           "INT64 - 8 bytes per value.  Stored as little-endian.\n" ++
-           "FLOAT - 4 bytes per value.  IEEE. Stored as little-endian.\n" ++
-           "DOUBLE - 8 bytes per value.  IEEE. Stored as little-endian.\n" ++
-           "BYTE_ARRAY - 4 byte length stored as little endian, followed by bytes.\n" ++
-           "FIXED_LEN_BYTE_ARRAY - Just the bytes.") $
-      T.unit,
-    "rle">:
-      doc ("Group packed run length encoding. Usable for definition/repetition levels " ++
-           "encoding and Booleans (on one bit: 0 is false; 1 is true.)") T.unit,
-    "bitPacked">:
-      doc ("Bit packed encoding.  This can only be used if the data has a known max " ++
-           "width.  Usable for definition/repetition levels encoding.") T.unit,
-    "deltaBinaryPacked">:
-      doc ("Delta encoding for integers. This can be used for int columns and works best " ++
-           "on sorted data") T.unit,
-    "deltaLengthByteArray">:
-      doc ("Encoding for byte arrays to separate the length values and the data. The lengths " ++
-           "are encoded using DELTA_BINARY_PACKED") T.unit,
-    "deltaByteArray">:
-      doc ("Incremental-encoded byte array. Prefix lengths are encoded using DELTA_BINARY_PACKED. " ++
-           "Suffixes are stored as delta length byte arrays.") T.unit,
-    "rleDictionary">:
-      doc ("Dictionary encoding: the ids are encoded using the RLE encoding") T.unit,
-    "byteStreamSplit">:
-      doc ("Encoding for floating-point data. " ++
-           "K byte-streams are created where K is the size in bytes of the data type. " ++
-           "The individual bytes of an FP value are scattered to the corresponding stream and " ++
-           "the streams are concatenated. " ++
-           "This itself does not reduce the size of the data but can lead to better compression " ++
-           "afterwards.") T.unit]
-
-compressionCodec :: Binding
-compressionCodec = define "CompressionCodec" $
-  doc ("Supported compression algorithms. " ++
-       "Codecs added in format version X.Y can be read by readers based on X.Y and later. " ++
-       "Codec support may vary between readers based on the format version and " ++
-       "libraries available at runtime. " ++
-       "See Compression.md for a detailed specification of these algorithms.") $
-  T.union [
-    "uncompressed">: T.unit,
-    "snappy">: T.unit,
-    "gzip">: T.unit,
-    "lzo">: T.unit,
-    "brotli">:
-      doc "Added in 2.4" T.unit,
-    "zstd">:
-      doc "Added in 2.4" T.unit,
-    "lz4Raw">:
-      doc "Added in 2.9" T.unit]
-
-pageType :: Binding
-pageType = define "PageType" $
-  T.enum [
-    "dataPage",
-    "indexPage",
-    "dictionaryPage",
-    "dataPageV2"]
-
-boundaryOrder :: Binding
-boundaryOrder = define "BoundaryOrder" $
-  doc ("Enum to annotate whether lists of min/max elements inside ColumnIndex " ++
-       "are ordered and if so, in which direction.") $
-  T.enum [
-    "unordered",
-    "ascending",
-    "descending"]
-
-dataPageHeader :: Binding
-dataPageHeader = define "DataPageHeader" $
-  doc "Data page header" $
-  T.record [
-    "numValues">:
-      doc "Number of values, including NULLs, in this data page."
-      T.int32,
-    "encoding">:
-      doc "Encoding used for this data page" $
-      parquet "Encoding",
-    "definitionLevelEncoding">:
-      doc "Encoding used for definition levels" $
-      parquet "Encoding",
-    "repetitionLevelEncoding">:
-      doc "Encoding used for repetition levels" $
-      parquet "Encoding",
-    "statistics">:
-      doc "Optional statistics for the data in this page" $
-      T.maybe $ parquet "Statistics"]
-
-indexPageHeader :: Binding
-indexPageHeader = define "IndexPageHeader" $ T.record []
-
-dictionaryPageHeader :: Binding
-dictionaryPageHeader = define "DictionaryPageHeader" $
-  doc ("The dictionary page must be placed at the first position of the column chunk " ++
-       "if it is partly or completely dictionary encoded. At most one dictionary page " ++
-       "can be placed in a column chunk.") $
-  T.record [
-    "numValues">:
-      doc "Number of values in the dictionary" $
-      T.int32,
-    "encoding">:
-      doc "Encoding using this dictionary page" $
-      parquet "Encoding",
-    "isSorted">:
-      doc "If true, the entries in the dictionary are sorted in ascending order" $
-      T.maybe T.boolean]
-
-dataPageHeaderV2 :: Binding
-dataPageHeaderV2 = define "DataPageHeaderV2" $
-  doc ("New page format allowing reading levels without decompressing the data " ++
-       "Repetition and definition levels are uncompressed " ++
-       "The remaining section containing the data is compressed if is_compressed is true") $
-  T.record [
-    "numValues">:
-      doc "Number of values, including NULLs, in this data page." $
-      T.int32,
-    "numNulls">:
-      doc ("Number of NULL values, in this data page. " ++
-           "Number of non-null = num_values - num_nulls which is also the number of values in the data section") $
-      T.int32,
-    "numRows">:
-      doc "Number of rows in this data page. which means pages change on record boundaries (r = 0)" $
-      T.int32,
-    "encoding">:
-      doc "Encoding used for data in this page" $
-      parquet "Encoding",
-    "definitionLevelsByteLength">:
-      doc "length of the definition levels" $
-      T.int32,
-    "repetitionLevelsByteLength">:
-      doc "length of the repetition levels" $
-      T.int32,
-    "isCompressed">:
-      doc ("whether the values are compressed. " ++
-           "Which means the section of the page between " ++
-           "definition_levels_byte_length + repetition_levels_byte_length + 1 and compressed_page_size (included) " ++
-           "is compressed with the compression_codec. " ++
-           "If missing it is considered compressed") $
-      T.maybe T.boolean,
-    "statistics">:
-      doc "optional statistics for the data in this page" $
-      T.maybe $ parquet "Statistics"]
-
-bloomFilterAlgorithm :: Binding
-bloomFilterAlgorithm = define "BloomFilterAlgorithm" $
-  doc "The algorithm used in Bloom filter." $
-  T.union [
-    "block">:
-      doc "Block-based Bloom filter." T.unit]
-
-bloomFilterHash :: Binding
-bloomFilterHash = define "BloomFilterHash" $
-  doc ("The hash function used in Bloom filter. This function takes the hash of a column value " ++
-       "using plain encoding.") $
-  T.union [
-    "xxhash">:
-      doc "xxHash Strategy." T.unit]
-
-bloomFilterCompression :: Binding
-bloomFilterCompression = define "BloomFilterCompression" $
-  doc "The compression used in the Bloom filter." $
-  T.enum [
-    "uncompressed"]
-
-bloomFilterHeader :: Binding
-bloomFilterHeader = define "BloomFilterHeader" $
-  doc ("Bloom filter header is stored at beginning of Bloom filter data of each column " ++
-       "and followed by its bitset.") $
-  T.record [
-    "numBytes">:
-      doc "The size of bitset in bytes" $
-      T.int32,
-    "algorithm">:
-      doc "The algorithm for setting bits." $
-      parquet "BloomFilterAlgorithm",
-    "hash">:
-      doc "The hash function used for Bloom filter." $
-      parquet "BloomFilterHash",
-    "compression">:
-      doc "The compression used in the Bloom filter" $
-      parquet "BloomFilterCompression"]
-
-pageHeader :: Binding
-pageHeader = define "PageHeader" $
-  T.record [
-    "type">:
-      doc "the type of the page: indicates which of the *_header fields is set" $
-      parquet "PageType",
-    "uncompressedPageSize">:
-      doc "Uncompressed page size in bytes (not including this header)" $
-     T.int32,
-    "compressedPageSize">:
-      doc "Compressed (and potentially encrypted) page size in bytes, not including this header" $
-      T.int32,
-    "crc">:
-      doc ("The 32bit CRC for the page, to be be calculated as follows:\n" ++
-           "- Using the standard CRC32 algorithm\n" ++
-           "- On the data only, i.e. this header should not be included. 'Data'\n" ++
-           "  hereby refers to the concatenation of the repetition levels, the\n" ++
-           "  definition levels and the column value, in this exact order.\n" ++
-           "- On the encoded versions of the repetition levels, definition levels and\n" ++
-           "  column values\n" ++
-           "- On the compressed versions of the repetition levels, definition levels\n" ++
-           "  and column values where possible;\n" ++
-           "  - For v1 data pages, the repetition levels, definition levels and column\n" ++
-           "    values are always compressed together. If a compression scheme is\n" ++
-           "    specified, the CRC shall be calculated on the compressed version of\n" ++
-           "    this concatenation. If no compression scheme is specified, the CRC\n" ++
-           "    shall be calculated on the uncompressed version of this concatenation.\n" ++
-           "  - For v2 data pages, the repetition levels and definition levels are\n" ++
-           "    handled separately from the data and are never compressed (only\n" ++
-           "    encoded). If a compression scheme is specified, the CRC shall be\n" ++
-           "    calculated on the concatenation of the uncompressed repetition levels,\n" ++
-           "    uncompressed definition levels and the compressed column values.\n" ++
-           "    If no compression scheme is specified, the CRC shall be calculated on\n" ++
-           "    the uncompressed concatenation.\n" ++
-           "- In encrypted columns, CRC is calculated after page encryption; the\n" ++
-           "  encryption itself is performed after page compression (if compressed)\n" ++
-           "If enabled, this allows for disabling checksumming in HDFS if only a few " ++
-           "pages need to be read. ") $
-      T.maybe T.int32,
-    "dataPageHeader">:
-      T.maybe $ parquet "DataPageHeader",
-    "indexPageHeader">:
-      T.maybe $ parquet "IndexPageHeader",
-    "dictionaryPageHeader">:
-      T.maybe $ parquet "DictionaryPageHeader",
-    "dataPageHeaderV2">:
-      T.maybe $ parquet "DataPageHeaderV2"]
-
-keyValue :: Binding
-keyValue = define "KeyValue" $
-  doc "Wrapper struct to store key values" $
-  T.record [
-    "key">: T.string,
-    "value">: T.maybe T.string]
-
-sortingColumn :: Binding
-sortingColumn = define "SortingColumn" $
-  doc "Wrapper struct to specify sort order" $
-  T.record [
-    "columnIdx">:
-      doc "The column index (in this row group)"
-      T.int32,
-    "descending">:
-      doc "If true, indicates this column is sorted in descending order."
-      T.boolean,
-    "nullsFirst">:
-      doc ("If true, nulls will come before non-null values, otherwise, " ++
-           "nulls go at the end.")
-      T.boolean]
-
-pageEncodingStats :: Binding
-pageEncodingStats = define "PageEncodingStats" $
-  doc "statistics of a given page type and encoding" $
-  T.record [
-    "pageType">:
-      doc "the page type (data/dic/...)" $
-      parquet "PageType",
-    "encoding">:
-      doc "encoding of the page" $
-      parquet "Encoding",
-    "count">:
-      doc "number of pages of this type with this encoding"
-      T.int32]
-
-columnMetaData :: Binding
-columnMetaData = define "ColumnMetaData" $
-  doc "Description for column metadata" $
-  T.record [
-    "type">:
-      doc "Type of this column" $
-      parquet "Type",
-    "encodings">:
-      doc ("Set of all encodings used for this column. The purpose is to validate " ++
-           "whether we can decode those pages.") $
-      T.list $ parquet "Encoding",
-    "pathInSchema">:
-      doc "Path in schema" $
-      T.list T.string,
-    "codec">:
-      doc "Compression codec" $
-      parquet "CompressionCodec",
-    "numValues">:
-      doc "Number of values in this column"
-      T.int64,
-    "totalUncompressedSize">:
-      doc "total byte size of all uncompressed pages in this column chunk (including the headers)"
-      T.int64,
-    "totalCompressedSize">:
-      doc ("total byte size of all compressed, and potentially encrypted, pages " ++
-           "in this column chunk (including the headers)")
-      T.int64,
-    "keyValueMetadata">:
-      doc "Optional key/value metadata" $
-      T.maybe $ T.list $ parquet "KeyValue",
-    "dataPageOffset">:
-      doc "Byte offset from beginning of file to first data page"
-      T.int64,
-    "indexPageOffset">:
-      doc "Byte offset from beginning of file to root index page" $
-      T.maybe T.int64,
-    "dictionaryPageOffset">:
-      doc "Byte offset from the beginning of file to first (only) dictionary page" $
-      T.maybe T.int64,
-    "statistics">:
-      doc "optional statistics for this column chunk" $
-      T.maybe $ parquet "Statistics",
-    "encodingStats">:
-      doc ("Set of all encodings used for pages in this column chunk. " ++
-           "This information can be used to determine if all data pages are " ++
-           "dictionary encoded for example") $
-      T.maybe $ T.list $ parquet "PageEncodingStats",
-    "bloomFilterOffset">:
-      doc "Byte offset from beginning of file to Bloom filter data." $
-      T.maybe T.int64]
-
-encryptionWithFooterKey :: Binding
-encryptionWithFooterKey = define "EncryptionWithFooterKey" $ T.record []
-
-encryptionWithColumnKey :: Binding
-encryptionWithColumnKey = define "EncryptionWithColumnKey" $
-  T.record [
-    "pathInSchema">:
-      doc "Column path in schema" $
-      T.list T.string,
-    "keyMetadata">:
-      doc "Retrieval metadata of column encryption key" $
-      T.maybe T.binary]
-
-columnCryptoMetaData :: Binding
-columnCryptoMetaData = define "ColumnCryptoMetaData" $
-  T.union [
-    "encryptionWithFooterKey">: parquet "EncryptionWithFooterKey",
-    "encryptionWithColumnKey">: parquet "EncryptionWithColumnKey"]
-
-columnChunk :: Binding
-columnChunk = define "ColumnChunk" $
-  T.record [
-    "filePath">:
-      doc ("File where column data is stored.  If not set, assumed to be same file as " ++
-           "metadata.  This path is relative to the current file.") $
-      T.maybe T.string,
-    "fileOffset">:
-      doc "Byte offset in file_path to the ColumnMetaData"
-      T.int64,
-    "metaData">:
-      doc ("Column metadata for this chunk. This is the same content as what is at " ++
-           "file_path/file_offset.  Having it here has it replicated in the file " ++
-           "metadata.") $
-      T.maybe $ parquet "ColumnMetaData",
-    "offsetIndexOffset">:
-      doc "File offset of ColumnChunk's OffsetIndex" $
-      T.maybe T.int64,
-    "offsetIndexLength">:
-      doc "Size of ColumnChunk's OffsetIndex, in bytes" $
-      T.maybe T.int32,
-    "columnIndexOffset">:
-      doc "File offset of ColumnChunk's ColumnIndex" $
-      T.maybe T.int64,
-    "columnIndexLength">:
-      doc "Size of ColumnChunk's ColumnIndex, in bytes" $
-      T.maybe T.int32,
-    "cryptoMetadata">:
-      doc "Crypto metadata of encrypted columns" $
-      T.maybe $ parquet "ColumnCryptoMetaData",
-    "encryptedColumnMetadata">:
-      doc "Encrypted column metadata for this chunk" $
-      T.maybe T.binary]
-
-rowGroup :: Binding
-rowGroup = define "RowGroup" $
-  T.record [
-    "columns">:
-      doc ("Metadata for each column chunk in this row group. " ++
-           "This list must have the same order as the SchemaElement list in FileMetaData.") $
-      T.list $ parquet "ColumnChunk",
-    "totalByteSize">:
-      doc "Total byte size of all the uncompressed column data in this row group"
-      T.int64,
-    "numRows">:
-      doc "Number of rows in this row group"
-      T.int64,
-    "sortingColumns">:
-      doc ("If set, specifies a sort ordering of the rows in this RowGroup. " ++
-           "The sorting columns can be a subset of all the columns.") $
-      T.maybe $ T.list $ parquet "SortingColumn",
-    "fileOffset">:
-      doc ("Byte offset from beginning of file to first page (data or dictionary) " ++
-           "in this row group") $
-      T.maybe T.int64,
-    "totalCompressedSize">:
-      doc ("Total byte size of all compressed (and potentially encrypted) column data " ++
-           "in this row group") $
-      T.maybe T.int64,
-    "ordinal">:
-      doc "Row group ordinal in the file" $
-      T.maybe T.int16]
-
-columnOrder :: Binding
-columnOrder = define "ColumnOrder" $
-  doc ("Union to specify the order used for the min_value and max_value fields for a " ++
-       "column. This union takes the role of an enhanced enum that allows rich " ++
-       "elements (which will be needed for a collation-based ordering in the future). " ++
-       "Possible values are:\n" ++
-       "* TypeDefinedOrder - the column uses the order defined by its logical or " ++
-       "physical type (if there is no logical type).\n" ++
-       "If the reader does not support the value of this union, min and max stats " ++
-       "for this column should be ignored. ") $
-  T.union [
-    "typeOrder">:
-      doc ("The sort orders for logical types are:\n" ++
-           "  UTF8 - unsigned byte-wise comparison\n" ++
-           "  INT8 - signed comparison\n" ++
-           "  INT16 - signed comparison\n" ++
-           "  INT32 - signed comparison\n" ++
-           "  INT64 - signed comparison\n" ++
-           "  UINT8 - unsigned comparison\n" ++
-           "  UINT16 - unsigned comparison\n" ++
-           "  UINT32 - unsigned comparison\n" ++
-           "  UINT64 - unsigned comparison\n" ++
-           "  DECIMAL - signed comparison of the represented value\n" ++
-           "  DATE - signed comparison\n" ++
-           "  TIME_MILLIS - signed comparison\n" ++
-           "  TIME_MICROS - signed comparison\n" ++
-           "  TIMESTAMP_MILLIS - signed comparison\n" ++
-           "  TIMESTAMP_MICROS - signed comparison\n" ++
-           "  INTERVAL - unsigned comparison\n" ++
-           "  JSON - unsigned byte-wise comparison\n" ++
-           "  BSON - unsigned byte-wise comparison\n" ++
-           "  ENUM - unsigned byte-wise comparison\n" ++
-           "  LIST - undefined\n" ++
-           "  MAP - undefined\n" ++
-           "In the absence of logical types, the sort order is determined by the physical type:\n" ++
-           "  BOOLEAN - false, true\n" ++
-           "  INT32 - signed comparison\n" ++
-           "  INT64 - signed comparison\n" ++
-           "  INT96 (only used for legacy timestamps) - undefined\n" ++
-           "  FLOAT - signed comparison of the represented value (*)\n" ++
-           "  DOUBLE - signed comparison of the represented value (*)\n" ++
-           "  BYTE_ARRAY - unsigned byte-wise comparison\n" ++
-           "  FIXED_LEN_BYTE_ARRAY - unsigned byte-wise comparison\n" ++
-           "(*) Because the sorting order is not specified properly for floating\n" ++
-           "    point values (relations vs. total ordering) the following\n" ++
-           "    compatibility rules should be applied when reading statistics:\n" ++
-           "    - If the min is a NaN, it should be ignored.\n" ++
-           "    - If the max is a NaN, it should be ignored.\n" ++
-           "    - If the min is +0, the row group may contain -0 values as well.\n" ++
-           "    - If the max is -0, the row group may contain +0 values as well.\n" ++
-           "    - When looking for NaN values, min and max should be ignored.") T.unit]
-
-pageLocation :: Binding
-pageLocation = define "PageLocation" $
-  T.record [
-    "offset">:
-      doc "Offset of the page in the file"
-      T.int64,
-    "compressedPageSize">:
-      doc ("Size of the page, including header. Sum of compressed_page_size and header " ++
-           "length")
-      T.int32,
-    "firstRowIndex">:
-      doc ("Index within the RowGroup of the first row of the page; this means pages " ++
-           "change on record boundaries (r = 0).")
-      T.int64]
-
-offsetIndex :: Binding
-offsetIndex = define "OffsetIndex" $
-  T.record [
-    "pageLocations">:
-      doc ("PageLocations, ordered by increasing PageLocation.offset. It is required " ++
-           "that page_locations[i].first_row_index < page_locations[i+1].first_row_index.") $
-      T.list $ parquet "PageLocation"]
-
-columnIndex :: Binding
-columnIndex = define "ColumnIndex" $
-  doc ("Description for ColumnIndex. " ++
-       "Each <array-field>[i] refers to the page at OffsetIndex.page_locations[i]") $
-  T.record [
-    "nullPages">:
-      doc ("A list of Boolean values to determine the validity of the corresponding " ++
-           "min and max values. If true, a page contains only null values, and writers " ++
-           "have to set the corresponding entries in min_values and max_values to " ++
-           "byte[0], so that all lists have the same length. If false, the " ++
-           "corresponding entries in min_values and max_values must be valid.") $
-      T.list T.boolean,
-    "minValues">:
-      doc ("minValues and maxValues are lists containing lower and upper bounds for the values of each page " ++
-           "determined by the ColumnOrder of the column. These may be the actual " ++
-           "minimum and maximum values found on a page, but can also be (more compact) " ++
-           "values that do not exist on a page. For example, instead of storing \"Blart " ++
-           "Versenwald III\", a writer may set min_values[i]=\"B\", max_values[i]=\"C\". " ++
-           "Such more compact values must still be valid values within the column's " ++
-           "logical type. Readers must make sure that list entries are populated before " ++
-           "using them by inspecting null_pages.") $
-      T.list T.binary,
-    "maxValues">: T.list T.binary,
-    "boundaryOrder">:
-      doc ("Stores whether both min_values and max_values are orderd and if so, in " ++
-           "which direction. This allows readers to perform binary searches in both " ++
-           "lists. Readers cannot assume that max_values[i] <= min_values[i+1], even " ++
-           "if the lists are ordered.") $
-      parquet "BoundaryOrder",
-    "nullCounts">:
-      doc "A list containing the number of null values for each page" $
-      T.maybe $ T.list T.int64]
-
-aesGcmV1 :: Binding
-aesGcmV1 = define "AesGcmV1" $
-  T.record [
-    "aadPrefix">:
-      doc "AAD prefix" $
-      T.maybe T.binary,
-    "aadFileUnique">:
-      doc "Unique file identifier part of AAD suffix" $
-      T.maybe T.binary,
-    "supplyAadPrefix">:
-      doc ("In files encrypted with AAD prefix without storing it, " ++
-           "readers must supply the prefix") $
-      T.maybe T.boolean]
-
-aesGcmCtrV1 :: Binding
-aesGcmCtrV1 = define "AesGcmCtrV1" $
-  T.record [
-    "aadPrefix">:
-      doc "AAD prefix" $
-      T.maybe T.binary,
-    "aadFileUnique">:
-      doc "Unique file identifier part of AAD suffix" $
-      T.maybe T.binary,
-    "supplyAadPrefix">:
-      doc ("In files encrypted with AAD prefix without storing it, " ++
-           "readers must supply the prefix") $
-      T.maybe T.boolean]
-
-encryptionAlgorithm :: Binding
-encryptionAlgorithm = define "EncryptionAlgorithm" $
-  T.union [
-    "aesGcmV1">: parquet "AesGcmV1",
-    "aesGcmCtrV1">: parquet "AesGcmCtrV1"]
-
-fileMetaData :: Binding
-fileMetaData = define "FileMetaData" $
-  doc "Description for file metadata" $
-  T.record [
-    "version">:
-      doc "Version of this file"
-      T.int32,
-    "schema">:
-      doc ("Parquet schema for this file.  This schema contains metadata for all the columns. " ++
-           "The schema is represented as a tree with a single root.  The nodes of the tree " ++
-           "are flattened to a list by doing a depth-first traversal. " ++
-           "The column metadata contains the path in the schema for that column which can be " ++
-           "used to map columns to nodes in the schema. " ++
-           "The first element is the root") $
-      T.list $ parquet "SchemaElement",
-    "numRows">:
-      doc "Number of rows in this file"
-      T.int64,
-    "rowGroups">:
-      doc "Row groups in this file" $
-      T.list $ parquet "RowGroup",
-    "keyValueMetadata">:
-      doc "Optional key/value metadata" $
-      T.maybe $ T.list $ parquet "KeyValue",
-    "createdBy">:
-      doc ("String for application that wrote this file.  This should be in the format " ++
-           "<Application> version <App Version> (build <App Build Hash>). " ++
-           "e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)") $
-      T.maybe T.string,
-    "columnOrders">:
-      doc ("Sort order used for the min_value and max_value fields in the Statistics " ++
-           "objects and the min_values and max_values fields in the ColumnIndex " ++
-           "objects of each column in this file. Sort orders are listed in the order " ++
-           "matching the columns in the schema. The indexes are not necessary the same " ++
-           "though, because only leaf nodes of the schema are represented in the list " ++
-           "of sort orders.\n" ++
-           "Without column_orders, the meaning of the min_value and max_value fields " ++
-           "in the Statistics object and the ColumnIndex object is undefined. To ensure " ++
-           "well-defined behaviour, if these fields are written to a Parquet file, " ++
-           "column_orders must be written as well.\n" ++
-           "The obsolete min and max fields in the Statistics object are always sorted " ++
-           "by signed comparison regardless of column_orders.") $
-      T.maybe $ T.list $ parquet "ColumnOrder",
-    "encryptionAlgorithm">:
-      doc ("Encryption algorithm. This field is set only in encrypted files " ++
-           "with plaintext footer. Files with encrypted footer store algorithm id " ++
-           "in FileCryptoMetaData structure.") $
-      T.maybe $ parquet "EncryptionAlgorithm",
-    "footerSigningKeyMetadata">:
-      doc ("Retrieval metadata of key used for signing the footer. " ++
-           "Used only in encrypted files with plaintext footer.") $
-      T.maybe T.binary]
-
-fileCryptoMetaData :: Binding
-fileCryptoMetaData = define "FileCryptoMetaData" $
-  doc "Crypto metadata for files with encrypted footer" $
-  T.record [
-    "encryptionAlgorithm">:
-      doc ("Encryption algorithm. This field is only used for files " ++
-           "with encrypted footer. Files with plaintext footer store algorithm id " ++
-           "inside footer (FileMetaData structure).") $
-      parquet "EncryptionAlgorithm",
-    "keyMetadata">:
-      doc ("Retrieval metadata of key used for encryption of footer, " ++
-           "and (possibly) columns") $
-      T.maybe T.binary]
diff --git a/src/main/haskell/Hydra/Sources/Pegasus/Coder.hs b/src/main/haskell/Hydra/Sources/Pegasus/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pegasus/Coder.hs
+++ /dev/null
@@ -1,468 +0,0 @@
-module Hydra.Sources.Pegasus.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Analysis      as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Pegasus.Pdl as PDL
-import qualified Hydra.Sources.Pegasus.Pdl as PdlSyntax
-import qualified Hydra.Sources.Pegasus.Language as PegasusLanguageSource
-import qualified Hydra.Sources.Pegasus.Serde as PegasusSerdeSource
-import qualified Hydra.Sources.Kernel.Terms.Dependencies as Dependencies
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-
-ns :: Namespace
-ns = Namespace "hydra.pegasus.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [PegasusSerdeSource.ns, moduleNamespace PegasusLanguageSource.module_, Formatting.ns, Names.ns, Analysis.ns, Environment.ns, Sorting.ns, Strip.ns, Annotations.ns, Serialization.ns, ShowCore.ns],
-            moduleTypeDependencies = (PdlSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Pegasus PDL code generator: converts Hydra modules to PDL schema files"}
-  where
-    definitions = [
-      toDefinition constructModule,
-      toDefinition doc_,
-      toDefinition encode,
-      toDefinition encodeEnumField,
-      toDefinition encodePossiblyOptionalType,
-      toDefinition encodeRecordField,
-      toDefinition encodeType_,
-      toDefinition encodeUnionField,
-      toDefinition getAnns,
-      toDefinition importAliasesForModule,
-      toDefinition moduleToPdl,
-      toDefinition moduleToPegasusSchemas,
-      toDefinition noAnnotations_,
-      toDefinition pdlNameForElement,
-      toDefinition pdlNameForModule,
-      toDefinition simpleUnionMember,
-      toDefinition slashesToDots,
-      toDefinition toPair,
-      toDefinition typeToSchema]
-
-
--- | err cx msg = Left (InContext (ErrorOther (OtherError msg)) cx)
-err :: TTerm Context -> TTerm String -> TTerm (Either Error a)
-err cx msg = Ctx.failInContext (Error.errorOther $ Error.otherError msg) cx
-
--- | unexpectedE cx expected found = err cx $ "Expected " ++ expected ++ ", found: " ++ found
-unexpectedE :: TTerm Context -> TTerm String -> TTerm String -> TTerm (Either Error a)
-unexpectedE cx expected found = err cx (Strings.cat2 (string "Expected ") (Strings.cat2 expected (Strings.cat2 (string ", found: ") found)))
-
-
-constructModule :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Module -> [TypeDefinition] -> Either Error (M.Map FilePath PDL.SchemaFile))
-constructModule = def "constructModule" $
-  doc "Construct PDL schema files from type definitions, with topological sorting and cycle detection" $
-  "cx" ~> "g" ~> "aliases" ~> "mod" ~> "typeDefs" ~>
-    "groups" <~ (Dependencies.topologicalSortTypeDefinitions @@ var "typeDefs") $
-    -- Check for cycles: if any group has more than one element, it's a cycle
-    Maybes.cases (Lists.find (lambda "grp" $ Equality.gt (Lists.length (var "grp")) (int32 1)) (var "groups"))
-      -- No cycle found: flatten and process
-      ("sortedDefs" <~ Lists.concat (var "groups") $
-       "schemas" <<~ (Eithers.mapList (lambda "typeDef" $ typeToSchema @@ var "cx" @@ var "g" @@ var "aliases" @@ var "mod" @@ var "typeDef") (var "sortedDefs")) $
-       right (Maps.fromList (Lists.map (toPair @@ var "mod" @@ var "aliases") (var "schemas"))))
-      -- Cycle found
-      (lambda "cycle" $
-        err (var "cx") (Strings.cat2 (string "types form a cycle (unsupported in PDL): [") (Strings.cat2 (Strings.intercalate (string ", ") (Lists.map (lambda "td" $ Core.unName (Packaging.typeDefinitionName (var "td"))) (var "cycle"))) (string "]"))))
-
-doc_ :: TTermDefinition (Maybe String -> PDL.Annotations)
-doc_ = def "doc" $
-  doc "Create PDL annotations from an optional doc string" $
-  "s" ~> record PDL._Annotations [
-    PDL._Annotations_doc>>: var "s",
-    PDL._Annotations_deprecated>>: false]
-
-encode :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Type -> Either Error PDL.Schema)
-encode = def "encode" $
-      "cx" ~> "g" ~> "aliases" ~> "t" ~>
-        cases _Type (Strip.deannotateType @@ var "t")
-          (Just $
-            "res" <<~ (encodeType_ @@ var "cx" @@ var "g" @@ var "aliases" @@ var "t") $
-            Eithers.either_
-              (lambda "schema" $ right (var "schema"))
-              (lambda "_" $ err (var "cx") (Strings.cat2 (string "type resolved to an unsupported nested named schema: ") (ShowCore.type_ @@ var "t")))
-              (var "res")) [
-          -- special case for the unit type
-          _Type_record>>: lambda "rt" $
-            Logic.ifElse (Lists.null (var "rt"))
-              (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ MetaTypes.int32)
-              ("res" <<~ (encodeType_ @@ var "cx" @@ var "g" @@ var "aliases" @@ var "t") $
-               Eithers.either_
-                 (lambda "schema" $ right (var "schema"))
-                 (lambda "_" $ err (var "cx") (Strings.cat2 (string "type resolved to an unsupported nested named schema: ") (ShowCore.type_ @@ var "t")))
-                 (var "res"))]
-
-encodeEnumField :: TTermDefinition (Context -> Graph -> FieldType -> Either Error PDL.EnumField)
-encodeEnumField = def "encodeEnumField" $
-  "cx" ~> "g" ~> "ft" ~>
-    "name" <~ Core.fieldTypeName (var "ft") $
-    "typ" <~ Core.fieldTypeType (var "ft") $
-    "anns" <<~ (getAnns @@ var "cx" @@ var "g" @@ var "typ") $
-    right (record PDL._EnumField [
-      PDL._EnumField_name>>: wrap PDL._EnumFieldName (Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionUpperSnake @@ Core.unName (var "name")),
-      PDL._EnumField_annotations>>: var "anns"])
-
-encodePossiblyOptionalType :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Type -> Either Error (PDL.Schema, Bool))
-encodePossiblyOptionalType = def "encodePossiblyOptionalType" $
-  "cx" ~> "g" ~> "aliases" ~> "typ" ~>
-    cases _Type (Strip.deannotateType @@ var "typ") Nothing [
-      _Type_maybe>>: lambda "ot" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "ot") $
-        right (pair (var "t") true),
-      _Type_record>>: lambda "rt" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_union>>: lambda "ut" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_literal>>: lambda "lt" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_list>>: lambda "lt" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_map>>: lambda "mt" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_set>>: lambda "st" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_variable>>: lambda "name" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_wrap>>: lambda "wt" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_either>>: lambda "et" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_pair>>: lambda "pt" $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_void>>: constant $
-        "t" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-        right (pair (var "t") false),
-      _Type_annotated>>: lambda "at" $
-        encodePossiblyOptionalType @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.annotatedTypeBody (var "at")]
-
-encodeRecordField :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> FieldType -> Either Error PDL.RecordField)
-encodeRecordField = def "encodeRecordField" $
-  "cx" ~> "g" ~> "aliases" ~> "ft" ~>
-    "name" <~ Core.fieldTypeName (var "ft") $
-    "typ" <~ Core.fieldTypeType (var "ft") $
-    "anns" <<~ (getAnns @@ var "cx" @@ var "g" @@ var "typ") $
-    "optResult" <<~ (encodePossiblyOptionalType @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-    "schema" <~ Pairs.first (var "optResult") $
-    "optional" <~ Pairs.second (var "optResult") $
-    right (record PDL._RecordField [
-      PDL._RecordField_name>>: wrap PDL._FieldName (Core.unName (var "name")),
-      PDL._RecordField_value>>: var "schema",
-      PDL._RecordField_optional>>: var "optional",
-      PDL._RecordField_default>>: nothing,
-      PDL._RecordField_annotations>>: var "anns"])
-
-encodeType_ :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Type -> Either Error (Either PDL.Schema PDL.NamedSchemaType))
-encodeType_ = def "encodeType" $
-  doc "Encode a Hydra type as either a PDL Schema (Left) or a PDL NamedSchemaType (Right)" $
-  "cx" ~> "g" ~> "aliases" ~> "typ" ~>
-    cases _Type (var "typ")
-      (Just $ unexpectedE (var "cx") (string "PDL-supported type") (ShowCore.type_ @@ var "typ")) [
-      _Type_annotated>>: lambda "at" $
-        encodeType_ @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.annotatedTypeBody (var "at"),
-      _Type_either>>: lambda "et" $
-        "leftSchema" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.eitherTypeLeft (var "et")) $
-        "rightSchema" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.eitherTypeRight (var "et")) $
-        "leftMember" <~ record PDL._UnionMember [
-          PDL._UnionMember_alias>>: just (wrap PDL._FieldName (string "left")),
-          PDL._UnionMember_value>>: var "leftSchema",
-          PDL._UnionMember_annotations>>: noAnnotations_] $
-        "rightMember" <~ record PDL._UnionMember [
-          PDL._UnionMember_alias>>: just (wrap PDL._FieldName (string "right")),
-          PDL._UnionMember_value>>: var "rightSchema",
-          PDL._UnionMember_annotations>>: noAnnotations_] $
-        right (left (inject PDL._Schema PDL._Schema_union (wrap PDL._UnionSchema (list [var "leftMember", var "rightMember"])))),
-      _Type_list>>: lambda "lt" $
-        "inner" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "lt") $
-        right (left (inject PDL._Schema PDL._Schema_array (var "inner"))),
-      _Type_literal>>: lambda "lt" $
-        cases _LiteralType (var "lt")
-          (Just $ unexpectedE (var "cx") (string "PDL-supported literal type") (ShowCore.type_ @@ var "typ")) [
-          _LiteralType_binary>>: constant $
-            right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_bytes (unit)))),
-          _LiteralType_boolean>>: constant $
-            right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_boolean (unit)))),
-          _LiteralType_float>>: lambda "ft" $
-            cases _FloatType (var "ft")
-              (Just $ unexpectedE (var "cx") (string "float32 or float64") (ShowCore.type_ @@ var "typ")) [
-              _FloatType_float32>>: constant $
-                right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_float (unit)))),
-              _FloatType_float64>>: constant $
-                right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_double (unit))))],
-          _LiteralType_integer>>: lambda "it" $
-            cases _IntegerType (var "it")
-              (Just $ unexpectedE (var "cx") (string "int32 or int64") (ShowCore.type_ @@ var "typ")) [
-              _IntegerType_int32>>: constant $
-                right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_int (unit)))),
-              _IntegerType_int64>>: constant $
-                right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_long (unit))))],
-          _LiteralType_string>>: constant $
-            right (left (inject PDL._Schema PDL._Schema_primitive (inject PDL._PrimitiveType PDL._PrimitiveType_string (unit))))],
-      _Type_map>>: lambda "mt" $
-        -- note: we simply assume string as a key type
-        "inner" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.mapTypeValues (var "mt")) $
-        right (left (inject PDL._Schema PDL._Schema_map (var "inner"))),
-      _Type_pair>>: lambda "pt" $
-        "firstSchema" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.pairTypeFirst (var "pt")) $
-        "secondSchema" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ Core.pairTypeSecond (var "pt")) $
-        "firstField" <~ record PDL._RecordField [
-          PDL._RecordField_name>>: wrap PDL._FieldName (string "first"),
-          PDL._RecordField_value>>: var "firstSchema",
-          PDL._RecordField_optional>>: false,
-          PDL._RecordField_default>>: nothing,
-          PDL._RecordField_annotations>>: noAnnotations_] $
-        "secondField" <~ record PDL._RecordField [
-          PDL._RecordField_name>>: wrap PDL._FieldName (string "second"),
-          PDL._RecordField_value>>: var "secondSchema",
-          PDL._RecordField_optional>>: false,
-          PDL._RecordField_default>>: nothing,
-          PDL._RecordField_annotations>>: noAnnotations_] $
-        right (right (inject PDL._NamedSchemaType PDL._NamedSchemaType_record (record PDL._RecordSchema [
-          PDL._RecordSchema_fields>>: list [var "firstField", var "secondField"],
-          PDL._RecordSchema_includes>>: list ([] :: [TTerm PDL.NamedSchema])]))),
-      _Type_set>>: lambda "st" $
-        -- Encode Set as array (PDL has no native set type)
-        "inner" <<~ (encode @@ var "cx" @@ var "g" @@ var "aliases" @@ var "st") $
-        right (left (inject PDL._Schema PDL._Schema_array (var "inner"))),
-      _Type_variable>>: lambda "name" $
-        right (left (inject PDL._Schema PDL._Schema_named (pdlNameForElement @@ var "aliases" @@ true @@ var "name"))),
-      _Type_wrap>>: lambda "wt" $
-        -- Unwrap to inner type
-        encodeType_ @@ var "cx" @@ var "g" @@ var "aliases" @@ var "wt",
-      _Type_maybe>>: lambda "ot" $
-        err (var "cx") (string "optionals unexpected at top level"),
-      _Type_record>>: lambda "rt" $
-        "rfields" <<~ (Eithers.mapList (encodeRecordField @@ var "cx" @@ var "g" @@ var "aliases") (var "rt")) $
-        right (right (inject PDL._NamedSchemaType PDL._NamedSchemaType_record (record PDL._RecordSchema [
-          PDL._RecordSchema_fields>>: var "rfields",
-          PDL._RecordSchema_includes>>: list ([] :: [TTerm PDL.NamedSchema])]))),
-      _Type_union>>: lambda "rt" $
-        Logic.ifElse (Lists.foldl (lambda "b" $ lambda "t" $
-            Logic.and (var "b") (Equality.equal (Strip.deannotateType @@ var "t") (MetaTypes.unit)))
-          true (Lists.map (lambda "f" $ Core.fieldTypeType (var "f")) (var "rt")))
-          -- Enum case
-          ("fs" <<~ (Eithers.mapList (encodeEnumField @@ var "cx" @@ var "g") (var "rt")) $
-           right (right (inject PDL._NamedSchemaType PDL._NamedSchemaType_enum (record PDL._EnumSchema [
-             PDL._EnumSchema_fields>>: var "fs"]))))
-          -- Union case
-          ("members" <<~ (Eithers.mapList (encodeUnionField @@ var "cx" @@ var "g" @@ var "aliases") (var "rt")) $
-           right (left (inject PDL._Schema PDL._Schema_union (wrap PDL._UnionSchema (var "members")))))]
-
-encodeUnionField :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> FieldType -> Either Error PDL.UnionMember)
-encodeUnionField = def "encodeUnionField" $
-  "cx" ~> "g" ~> "aliases" ~> "ft" ~>
-    "name" <~ Core.fieldTypeName (var "ft") $
-    "typ" <~ Core.fieldTypeType (var "ft") $
-    "anns" <<~ (getAnns @@ var "cx" @@ var "g" @@ var "typ") $
-    "optResult" <<~ (encodePossiblyOptionalType @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-    "s" <~ Pairs.first (var "optResult") $
-    "optional" <~ Pairs.second (var "optResult") $
-    "schema" <~ Logic.ifElse (var "optional")
-      (inject PDL._Schema PDL._Schema_union (wrap PDL._UnionSchema (Lists.map (lambda "ms" $ simpleUnionMember @@ var "ms") (list [inject PDL._Schema PDL._Schema_null (unit), var "s"]))))
-      (var "s") $
-    right (record PDL._UnionMember [
-      PDL._UnionMember_alias>>: just (wrap PDL._FieldName (Core.unName (var "name"))),
-      PDL._UnionMember_value>>: var "schema",
-      PDL._UnionMember_annotations>>: var "anns"])
-
-getAnns :: TTermDefinition (Context -> Graph -> Type -> Either Error PDL.Annotations)
-getAnns = def "getAnns" $
-  "cx" ~> "g" ~> "typ" ~>
-    "r" <<~ (Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "typ") $
-    right (doc_ @@ var "r")
-
-importAliasesForModule :: TTermDefinition (Context -> Graph -> Module -> Either Error (M.Map Namespace String))
-importAliasesForModule = def "importAliasesForModule" $
-  doc "Compute import aliases for a module's dependencies" $
-  "cx" ~> "g" ~> "mod" ~>
-    "nss" <<~ (Analysis.moduleDependencyNamespaces @@ var "cx" @@ var "g" @@ false @@ true @@ true @@ false @@ var "mod") $
-    right (Maps.fromList (Lists.map
-      (lambda "ns_" $ pair (var "ns_") (slashesToDots @@ (unwrap _Namespace @@ var "ns_")))
-      (Sets.toList (var "nss"))))
-
-moduleToPdl :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToPdl = def "moduleToPdl" $
-  doc "Convert a Hydra module to a map of file paths to PDL schema strings" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~>
-    "files" <<~ (moduleToPegasusSchemas @@ var "cx" @@ var "g" @@ var "mod" @@ var "defs") $
-    right (Maps.fromList (Lists.map
-      (lambda "pair" $
-        pair
-          (Pairs.first (var "pair"))
-          (Serialization.printExpr @@ (Serialization.parenthesize @@ (PegasusSerdeSource.exprSchemaFile @@ Pairs.second (var "pair")))))
-      (Maps.toList (var "files"))))
-
-moduleToPegasusSchemas :: TTermDefinition (Context -> Graph -> Module -> [Definition] -> Either Error (M.Map FilePath PDL.SchemaFile))
-moduleToPegasusSchemas = def "moduleToPegasusSchemas" $
-  doc "Convert a Hydra module and its definitions to PDL schema files" $
-  "cx" ~> "g" ~> "mod" ~> "defs" ~>
-    "partitioned" <~ (Environment.partitionDefinitions @@ var "defs") $
-    "typeDefs" <~ Pairs.first (var "partitioned") $
-    "aliases" <<~ (importAliasesForModule @@ var "cx" @@ var "g" @@ var "mod") $
-    constructModule @@ var "cx" @@ var "g" @@ var "aliases" @@ var "mod" @@ var "typeDefs"
-
-noAnnotations_ :: TTermDefinition (PDL.Annotations)
-noAnnotations_ = def "noAnnotations" $
-  doc "Empty PDL annotations" $
-  record PDL._Annotations [
-    PDL._Annotations_doc>>: nothing,
-    PDL._Annotations_deprecated>>: false]
-
-pdlNameForElement :: TTermDefinition (M.Map Namespace String -> Bool -> Name -> PDL.QualifiedName)
-pdlNameForElement = def "pdlNameForElement" $
-  doc "Convert a Hydra element name to a PDL qualified name" $
-  "aliases" ~> "withNs" ~> "name" ~>
-    "qn" <~ (Names.qualifyName @@ var "name") $
-    "ns_" <~ project _QualifiedName _QualifiedName_namespace @@ var "qn" $
-    "local" <~ project _QualifiedName _QualifiedName_local @@ var "qn" $
-    "alias" <~ Maybes.bind (var "ns_") (lambda "n" $ Maps.lookup (var "n") (var "aliases")) $
-    record PDL._QualifiedName [
-      PDL._QualifiedName_name>>: wrap PDL._Name (var "local"),
-      PDL._QualifiedName_namespace>>: Logic.ifElse (var "withNs")
-        (Maybes.map (lambda "a" $ wrap PDL._Namespace (var "a")) (var "alias"))
-        nothing]
-
-pdlNameForModule :: TTermDefinition (Module -> PDL.Namespace)
-pdlNameForModule = def "pdlNameForModule" $
-  doc "Convert a module's namespace to a PDL namespace" $
-  "mod" ~> wrap PDL._Namespace (slashesToDots @@ (unwrap _Namespace @@ Packaging.moduleNamespace (var "mod")))
-
-simpleUnionMember :: TTermDefinition (PDL.Schema -> PDL.UnionMember)
-simpleUnionMember = def "simpleUnionMember" $
-  doc "Create a simple union member without an alias" $
-  "schema" ~> record PDL._UnionMember [
-    PDL._UnionMember_alias>>: nothing,
-    PDL._UnionMember_value>>: var "schema",
-    PDL._UnionMember_annotations>>: noAnnotations_]
-
-slashesToDots :: TTermDefinition (String -> String)
-slashesToDots = def "slashesToDots" $
-  doc "Replace all forward slashes with dots in a string" $
-  "s" ~> Strings.intercalate (string ".") (Strings.splitOn (string "/") (var "s"))
-
-toPair :: TTermDefinition (Module -> M.Map Namespace String -> (PDL.NamedSchema, [PDL.QualifiedName]) -> (FilePath, PDL.SchemaFile))
-toPair = def "toPair" $
-  "mod" ~> "aliases" ~> "schemaPair" ~>
-    "schema" <~ Pairs.first (var "schemaPair") $
-    "imports" <~ Pairs.second (var "schemaPair") $
-    "ns_" <~ (pdlNameForModule @@ var "mod") $
-    "local" <~ (unwrap PDL._Name @@ (project PDL._QualifiedName PDL._QualifiedName_name @@ (project PDL._NamedSchema PDL._NamedSchema_qualifiedName @@ var "schema"))) $
-    "path" <~ (Names.namespaceToFilePath @@ Util.caseConventionCamel @@ wrap _FileExtension (string "pdl") @@ (wrap _Namespace (Strings.cat2 (unwrap _Namespace @@ Packaging.moduleNamespace (var "mod")) (Strings.cat2 (string "/") (var "local"))))) $
-    pair (var "path") (record PDL._SchemaFile [
-      PDL._SchemaFile_namespace>>: var "ns_",
-      PDL._SchemaFile_package>>: nothing,
-      PDL._SchemaFile_imports>>: var "imports",
-      PDL._SchemaFile_schemas>>: list [var "schema"]])
-
-typeToSchema :: TTermDefinition (Context -> Graph -> M.Map Namespace String -> Module -> TypeDefinition -> Either Error (PDL.NamedSchema, [PDL.QualifiedName]))
-typeToSchema = def "typeToSchema" $
-  "cx" ~> "g" ~> "aliases" ~> "mod" ~> "typeDef" ~>
-    "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "typeDef")) $
-    "res" <<~ (encodeType_ @@ var "cx" @@ var "g" @@ var "aliases" @@ var "typ") $
-    "ptype" <~ (Eithers.either_
-      (lambda "schema" $ inject PDL._NamedSchemaType PDL._NamedSchemaType_typeref (var "schema"))
-      (lambda "t" $ var "t")
-      (var "res")) $
-    "descr" <<~ (Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "typ") $
-    "anns" <~ (doc_ @@ var "descr") $
-    "qname" <~ (pdlNameForElement @@ var "aliases" @@ false @@ Packaging.typeDefinitionName (var "typeDef")) $
-    right (pair (record PDL._NamedSchema [
-      PDL._NamedSchema_qualifiedName>>: var "qname",
-      PDL._NamedSchema_type>>: var "ptype",
-      PDL._NamedSchema_annotations>>: var "anns"])
-      (list ([] :: [TTerm PDL.QualifiedName])))
diff --git a/src/main/haskell/Hydra/Sources/Pegasus/Language.hs b/src/main/haskell/Hydra/Sources/Pegasus/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pegasus/Language.hs
+++ /dev/null
@@ -1,143 +0,0 @@
-module Hydra.Sources.Pegasus.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.pegasus.language"),
-            moduleDefinitions = [toDefinition pdlLanguage],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for LinkedIn Pegasus (PDL)"}
-pdlLanguage :: TTermDefinition Language
-pdlLanguage = define "pdlLanguage" $
-  doc "Language constraints for LinkedIn Pegasus (PDL)" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary,
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat32,
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeInt32,
-    Core.integerTypeInt64],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantEither,
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantPair,
-    Variants.termVariantSet,
-    Variants.termVariantWrap,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord,
-    Variants.termVariantInject],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantEither,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantPair,
-    Variants.typeVariantSet,
-    Variants.typeVariantWrap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord,
-    Variants.typeVariantUnion,
-    Variants.typeVariantVariable],
-  "typePredicate">: constant true] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.pegasus.pdl")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
diff --git a/src/main/haskell/Hydra/Sources/Pegasus/Pdl.hs b/src/main/haskell/Hydra/Sources/Pegasus/Pdl.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pegasus/Pdl.hs
+++ /dev/null
@@ -1,189 +0,0 @@
-module Hydra.Sources.Pegasus.Pdl where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Json.Model        as JsonModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.pegasus.pdl"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pdl :: String -> Type
-pdl = typeref ns
-
-json :: String -> Type
-json = typeref $ JsonModel.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [JsonModel.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model for PDL (Pegasus Data Language) schemas. Based on the specification at:\n" ++
-      "  https://linkedin.github.io/rest.li/pdl_schema")}
-  where
-    definitions = [
-      annotations,
-      enumField,
-      enumFieldName,
-      enumSchema,
-      fieldName_,
-      namedSchema,
-      namedSchemaType,
-      name_,
-      namespace_,
-      package_,
-      primitiveType_,
-      propertyKey,
-      property_,
-      qualifiedName,
-      recordField,
-      recordSchema,
-      schema,
-      schemaFile,
-      unionMember,
-      unionSchema]
-
-annotations :: Binding
-annotations = define "Annotations" $
-  doc "Annotations which can be applied to record fields, aliased union members, enum symbols, or named schemas" $
-  T.record [
-    "doc">: T.maybe T.string,
-    "deprecated">: T.boolean]
-
-enumField :: Binding
-enumField = define "EnumField" $
-  T.record [
-    "name">: pdl "EnumFieldName",
-    "annotations">: pdl "Annotations"]
-
-enumFieldName :: Binding
-enumFieldName = define "EnumFieldName" $
-  T.wrap T.string
-
-enumSchema :: Binding
-enumSchema = define "EnumSchema" $
-  T.record [
-    "fields">: T.list $ pdl "EnumField"]
-
-fieldName_ :: Binding
-fieldName_ = define "FieldName" $
-  T.wrap T.string
-
-namedSchema :: Binding
-namedSchema = define "NamedSchema" $
-  T.record [
-    "qualifiedName">: pdl "QualifiedName",
-    "type">: pdl "NamedSchemaType",
-    "annotations">: pdl "Annotations"]
-
-namedSchemaType :: Binding
-namedSchemaType = define "NamedSchemaType" $
-  T.union [
-    "record">: pdl "RecordSchema",
-    "enum">: pdl "EnumSchema",
-    "typeref">: pdl "Schema"]
-
-name_ :: Binding
-name_ = define "Name" $
-  T.wrap T.string
-
-namespace_ :: Binding
-namespace_ = define "Namespace" $
-  T.wrap T.string
-
-package_ :: Binding
-package_ = define "Package" $
-  T.wrap T.string
-
-primitiveType_ :: Binding
-primitiveType_ = define "PrimitiveType" $
-  T.enum [
-    "boolean",
-    "bytes",
-    "double",
-    "float",
-    "int",
-    "long",
-    "string"]
-
-propertyKey :: Binding
-propertyKey = define "PropertyKey" $
-  T.wrap T.string
-
-property_ :: Binding
-property_ = define "Property" $
-  T.record [
-    "key">: pdl "PropertyKey",
-    "value">: T.maybe $ json "Value"]
-
-qualifiedName :: Binding
-qualifiedName = define "QualifiedName" $
-  T.record [
-    "name">: pdl "Name",
-    "namespace">: T.maybe $ pdl "Namespace"]
-
-recordField :: Binding
-recordField = define "RecordField" $
-  doc "Note: the default value for an enum-valued must be one of the enumerated string symbols" $
-  T.record [
-    "name">: pdl "FieldName",
-    "value">: pdl "Schema",
-    "optional">: T.boolean,
-    "default">: T.maybe $ json "Value",
-    "annotations">: pdl "Annotations"]
-
-recordSchema :: Binding
-recordSchema = define "RecordSchema" $
-  doc "Note: all included schemas must be record schemas" $
-  T.record [
-    "fields">: T.list $ pdl "RecordField",
-    "includes">: T.list $ pdl "NamedSchema"]
-
-schema :: Binding
-schema = define "Schema" $
-  T.union [
-    "array">: pdl "Schema",
-    "fixed">: T.int32,
-    "inline">: pdl "NamedSchema",
-    "map">: pdl "Schema",
-    "named">: pdl "QualifiedName",
-    "null">: T.unit,
-    "primitive">: pdl "PrimitiveType",
-    "union">: pdl "UnionSchema"]
-
-schemaFile :: Binding
-schemaFile = define "SchemaFile" $
-  T.record [
-    "namespace">: pdl "Namespace",
-    "package">: T.maybe $ pdl "Package",
-    "imports">: T.list $ pdl "QualifiedName",
-    "schemas">: T.list $ pdl "NamedSchema"]
-
-unionMember :: Binding
-unionMember = define "UnionMember" $
-  doc "Note: annotations are only available for aliased members" $
-  T.record [
-    "alias">: T.maybe $ pdl "FieldName",
-    "value">: pdl "Schema",
-    "annotations">: pdl "Annotations"]
-
-unionSchema :: Binding
-unionSchema = define "UnionSchema" $
-  doc "Note: unions are not allowed as member types of other unions" $
-  T.wrap $ T.list $ pdl "UnionMember"
diff --git a/src/main/haskell/Hydra/Sources/Pegasus/Serde.hs b/src/main/haskell/Hydra/Sources/Pegasus/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pegasus/Serde.hs
+++ /dev/null
@@ -1,273 +0,0 @@
-module Hydra.Sources.Pegasus.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Pegasus.Pdl as PDL
-import qualified Hydra.Sources.Pegasus.Pdl as PdlSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.pegasus.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Serialization.ns],
-            moduleTypeDependencies = (PdlSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting Pegasus PDL AST to abstract expressions"}
-  where
-    definitions = [
-      toDefinition exprAnnotations,
-      toDefinition exprEnumField,
-      toDefinition exprImport,
-      toDefinition exprNamedSchema,
-      toDefinition exprPrimitiveType,
-      toDefinition exprQualifiedName,
-      toDefinition exprRecordField,
-      toDefinition exprSchema,
-      toDefinition exprSchemaFile,
-      toDefinition exprUnionMember,
-      toDefinition withAnnotations]
-
-
-exprAnnotations :: TTermDefinition (PDL.Annotations -> Maybe Expr)
-exprAnnotations = define "exprAnnotations" $
-  doc "Convert PDL annotations to an optional expression (doc comment)" $
-  lambda "anns" $ lets [
-    "d">: project PDL._Annotations PDL._Annotations_doc @@ var "anns"] $
-    Maybes.map (lambda "s" $ Serialization.cst @@ (Formatting.javaStyleComment @@ var "s")) (var "d")
-
-exprEnumField :: TTermDefinition (PDL.EnumField -> Expr)
-exprEnumField = define "exprEnumField" $
-  doc "Convert a PDL enum field to an expression" $
-  lambda "ef" $ lets [
-    "name">: unwrap PDL._EnumFieldName @@ (project PDL._EnumField PDL._EnumField_name @@ var "ef"),
-    "anns">: project PDL._EnumField PDL._EnumField_annotations @@ var "ef"] $
-    withAnnotations @@ var "anns" @@ (Serialization.cst @@ var "name")
-
-exprImport :: TTermDefinition (PDL.QualifiedName -> Expr)
-exprImport = define "exprImport" $
-  doc "Convert a qualified name to an import expression" $
-  lambda "qn" $ Serialization.spaceSep @@ list [
-    Serialization.cst @@ string "import",
-    exprQualifiedName @@ var "qn"]
-
-exprNamedSchema :: TTermDefinition (PDL.NamedSchema -> Expr)
-exprNamedSchema = define "exprNamedSchema" $
-  doc "Convert a named schema to an expression" $
-  lambda "ns" $ lets [
-    "qn">: project PDL._NamedSchema PDL._NamedSchema_qualifiedName @@ var "ns",
-    "t">: project PDL._NamedSchema PDL._NamedSchema_type @@ var "ns",
-    "anns">: project PDL._NamedSchema PDL._NamedSchema_annotations @@ var "ns"] $
-    withAnnotations @@ var "anns" @@
-      (cases PDL._NamedSchemaType (var "t") Nothing [
-        PDL._NamedSchemaType_record>>: lambda "rs" $ lets [
-          "fields">: project PDL._RecordSchema PDL._RecordSchema_fields @@ var "rs"] $
-          Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "record",
-            exprQualifiedName @@ var "qn",
-            Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@
-              (Lists.map exprRecordField (var "fields"))],
-        PDL._NamedSchemaType_enum>>: lambda "es" $ lets [
-          "fields">: project PDL._EnumSchema PDL._EnumSchema_fields @@ var "es"] $
-          Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "enum",
-            exprQualifiedName @@ var "qn",
-            Serialization.curlyBracesList @@ nothing @@ Serialization.fullBlockStyle @@
-              (Lists.map exprEnumField (var "fields"))],
-        PDL._NamedSchemaType_typeref>>: lambda "schema" $
-          Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "typeref",
-            exprQualifiedName @@ var "qn",
-            Serialization.cst @@ string "=",
-            exprSchema @@ var "schema"]])
-
-exprPrimitiveType :: TTermDefinition (PDL.PrimitiveType -> Expr)
-exprPrimitiveType = define "exprPrimitiveType" $
-  doc "Convert a primitive type to an expression" $
-  lambda "pt" $ Serialization.cst @@
-    (cases PDL._PrimitiveType (var "pt") Nothing [
-      PDL._PrimitiveType_boolean>>: constant $ string "boolean",
-      PDL._PrimitiveType_bytes>>: constant $ string "bytes",
-      PDL._PrimitiveType_double>>: constant $ string "double",
-      PDL._PrimitiveType_float>>: constant $ string "float",
-      PDL._PrimitiveType_int>>: constant $ string "int",
-      PDL._PrimitiveType_long>>: constant $ string "long",
-      PDL._PrimitiveType_string>>: constant $ string "string"])
-
-exprQualifiedName :: TTermDefinition (PDL.QualifiedName -> Expr)
-exprQualifiedName = define "exprQualifiedName" $
-  doc "Convert a qualified name to an expression" $
-  lambda "qn" $ lets [
-    "name">: unwrap PDL._Name @@ (project PDL._QualifiedName PDL._QualifiedName_name @@ var "qn"),
-    "ns">: project PDL._QualifiedName PDL._QualifiedName_namespace @@ var "qn",
-    "parts">: Maybes.cat $ list [
-      Maybes.map (lambda "n" $ unwrap PDL._Namespace @@ var "n") (var "ns"),
-      Maybes.pure (var "name")]] $
-    Serialization.cst @@ (Strings.intercalate (string ".") (var "parts"))
-
-exprRecordField :: TTermDefinition (PDL.RecordField -> Expr)
-exprRecordField = define "exprRecordField" $
-  doc "Convert a record field to an expression" $
-  lambda "rf" $ lets [
-    "name">: unwrap PDL._FieldName @@ (project PDL._RecordField PDL._RecordField_name @@ var "rf"),
-    "schema">: project PDL._RecordField PDL._RecordField_value @@ var "rf",
-    "optional">: project PDL._RecordField PDL._RecordField_optional @@ var "rf",
-    "anns">: project PDL._RecordField PDL._RecordField_annotations @@ var "rf"] $
-    withAnnotations @@ var "anns" @@
-      (Serialization.spaceSep @@ (Maybes.cat $ list [
-        Maybes.pure (Serialization.cst @@ (Strings.cat2 (var "name") (string ":"))),
-        Logic.ifElse (var "optional")
-          (Maybes.pure (Serialization.cst @@ string "optional"))
-          nothing,
-        Maybes.pure (exprSchema @@ var "schema")]))
-
-exprSchema :: TTermDefinition (PDL.Schema -> Expr)
-exprSchema = define "exprSchema" $
-  doc "Convert a schema to an expression" $
-  lambda "schema" $
-    cases PDL._Schema (var "schema") Nothing [
-      PDL._Schema_array>>: lambda "s" $ Serialization.noSep @@ list [
-        Serialization.cst @@ string "array",
-        Serialization.bracketList @@ Serialization.inlineStyle @@ list [exprSchema @@ var "s"]],
-      PDL._Schema_map>>: lambda "s" $ Serialization.noSep @@ list [
-        Serialization.cst @@ string "map",
-        Serialization.bracketList @@ Serialization.inlineStyle @@ list [
-          Serialization.cst @@ string "string",
-          exprSchema @@ var "s"]],
-      PDL._Schema_named>>: lambda "qn" $ exprQualifiedName @@ var "qn",
-      PDL._Schema_null>>: constant $ Serialization.cst @@ string "null",
-      PDL._Schema_primitive>>: lambda "pt" $ exprPrimitiveType @@ var "pt",
-      PDL._Schema_union>>: lambda "us" $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "union",
-          Serialization.bracketList @@ Serialization.fullBlockStyle @@
-            (Lists.map exprUnionMember (unwrap PDL._UnionSchema @@ var "us"))]]
-
-exprSchemaFile :: TTermDefinition (PDL.SchemaFile -> Expr)
-exprSchemaFile = define "exprSchemaFile" $
-  doc "Convert a schema file to an expression" $
-  lambda "sf" $ lets [
-    "ns">: unwrap PDL._Namespace @@ (project PDL._SchemaFile PDL._SchemaFile_namespace @@ var "sf"),
-    "pkg">: project PDL._SchemaFile PDL._SchemaFile_package @@ var "sf",
-    "imports">: project PDL._SchemaFile PDL._SchemaFile_imports @@ var "sf",
-    "schemas">: project PDL._SchemaFile PDL._SchemaFile_schemas @@ var "sf",
-    "namespaceSec">: Maybes.pure (Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "namespace",
-      Serialization.cst @@ var "ns"]),
-    "packageSec">: Maybes.map
-      (lambda "p" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "package",
-        Serialization.cst @@ (unwrap PDL._Package @@ var "p")])
-      (var "pkg"),
-    "importsSec">: Logic.ifElse (Lists.null (var "imports"))
-      nothing
-      (Maybes.pure (Serialization.newlineSep @@ (Lists.map exprImport (var "imports")))),
-    "schemaSecs">: Lists.map (lambda "s" $ Maybes.pure (exprNamedSchema @@ var "s")) (var "schemas")] $
-    Serialization.doubleNewlineSep @@ (Maybes.cat $
-      Lists.concat $ list [
-        list [var "namespaceSec", var "packageSec", var "importsSec"],
-        var "schemaSecs"])
-
-exprUnionMember :: TTermDefinition (PDL.UnionMember -> Expr)
-exprUnionMember = define "exprUnionMember" $
-  doc "Convert a union member to an expression" $
-  lambda "um" $ lets [
-    "alias">: project PDL._UnionMember PDL._UnionMember_alias @@ var "um",
-    "schema">: project PDL._UnionMember PDL._UnionMember_value @@ var "um",
-    "anns">: project PDL._UnionMember PDL._UnionMember_annotations @@ var "um"] $
-    withAnnotations @@ var "anns" @@
-      (Serialization.spaceSep @@ (Maybes.cat $ list [
-        Maybes.map (lambda "fn" $
-          Serialization.cst @@ (Strings.cat2 (unwrap PDL._FieldName @@ var "fn") (string ":")))
-          (var "alias"),
-        Maybes.pure (exprSchema @@ var "schema")]))
-
-withAnnotations :: TTermDefinition (PDL.Annotations -> Expr -> Expr)
-withAnnotations = define "withAnnotations" $
-  doc "Prepend annotations (doc comment) to an expression" $
-  lambda "anns" $ lambda "expr" $
-    Serialization.newlineSep @@ (Maybes.cat $ list [
-      exprAnnotations @@ var "anns",
-      Maybes.pure (var "expr")])
diff --git a/src/main/haskell/Hydra/Sources/Pg/Coder.hs b/src/main/haskell/Hydra/Sources/Pg/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Coder.hs
+++ /dev/null
@@ -1,793 +0,0 @@
-module Hydra.Sources.Pg.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  check, checkRecordName, constructEdgeCoder, constructVertexCoder,
-  edgeCoder, edgeIdAdapter, elementCoder, elementTreeEdge, elementTreeVertex,
-  elementTypeTreeEdge, elementTypeTreeVertex, encodeProperties, encodeProperty,
-  extractString, findAdjacenEdgeAdapters, findIdProjectionSpec,
-  findIncidentVertexAdapter, findLabelString, findProjectionSpec,
-  findPropertySpecs, findSingleFieldWithAnnotationKey, hasVertexAdapters,
-  projectionAdapter, propertyAdapter, propertyTypes, selectEdgeId,
-  selectVertexId, traverseToSingleTerm, vertexCoder, vertexIdAdapter)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Encode.Core                         as EncodeCore
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Resolution    as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Pg.Model as PG
-import qualified Hydra.Pg.Mapping as PGM
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Pg.Mapping as PgMapping
-import qualified Hydra.Sources.Pg.TermsToElements as TermsToElements
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.pg.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, ExtractCore.ns, Resolution.ns, TermsToElements.ns],
-            moduleTypeDependencies = (PgModel.ns:PgMapping.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Property graph element coders for mapping Hydra terms to property graph elements"}
-  where
-    definitions = [
-      toDefinition check,
-      toDefinition checkRecordName,
-      toDefinition constructEdgeCoder,
-      toDefinition constructVertexCoder,
-      toDefinition edgeCoder,
-      toDefinition edgeIdAdapter,
-      toDefinition elementCoder,
-      toDefinition elementTreeEdge,
-      toDefinition elementTreeVertex,
-      toDefinition elementTypeTreeEdge,
-      toDefinition elementTypeTreeVertex,
-      toDefinition encodeProperties,
-      toDefinition encodeProperty,
-      toDefinition extractString,
-      toDefinition findAdjacenEdgeAdapters,
-      toDefinition findIdProjectionSpec,
-      toDefinition findIncidentVertexAdapter,
-      toDefinition findLabelString,
-      toDefinition findProjectionSpec,
-      toDefinition findPropertySpecs,
-      toDefinition findSingleFieldWithAnnotationKey,
-      toDefinition hasVertexAdapters,
-      toDefinition projectionAdapter,
-      toDefinition propertyAdapter,
-      toDefinition propertyTypes,
-      toDefinition selectEdgeId,
-      toDefinition selectVertexId,
-      toDefinition traverseToSingleTerm,
-      toDefinition vertexCoder,
-      toDefinition vertexIdAdapter]
-
--- Helper for error results
-err :: TTerm Context -> TTerm String -> TTerm (Either Error a)
-err cx msg = left $ Error.errorOther $ Error.otherError msg
-
-unexpectedE :: TTerm Context -> TTerm String -> TTerm String -> TTerm (Either Error a)
-unexpectedE cx expected found = err cx (string "Expected " ++ expected ++ string ", found: " ++ found)
-
--- | Check a condition, returning an error if false
-check :: TTermDefinition (Context -> Bool -> Either Error () -> Either Error ())
-check = define "check" $
-  doc "Check a condition, returning an error if false" $
-  "_cx" ~> "b" ~> "e" ~>
-    Logic.ifElse (var "b") (right unit) (var "e")
-
--- | Check that a record name matches the expected name.
---   Skips the check when the expected name is a placeholder (used when the type has no intrinsic name).
-checkRecordName :: TTermDefinition (Context -> Name -> Name -> Either Error ())
-checkRecordName = define "checkRecordName" $
-  doc "Check that a record name matches the expected name" $
-  "cx" ~> "expected" ~> "actual" ~>
-    check @@ var "cx"
-      @@ (Logic.or
-        (Equality.equal (Core.unName $ var "expected") (string "placeholder"))
-        (Equality.equal (Core.unName $ var "actual") (Core.unName $ var "expected")))
-      @@ (err (var "cx") (string "Expected record of type " ++ (Core.unName $ var "expected") ++ string ", found record of type " ++ (Core.unName $ var "actual")))
-
--- | Construct an edge coder from components
-constructEdgeCoder :: TTermDefinition (Context -> Graph -> PG.VertexLabel -> PGM.Schema Graph t v -> Type -> t -> t -> PG.Direction -> Name -> [FieldType]
-  -> [Adapter FieldType (PG.PropertyType t) Field (PG.Property v)]
-  -> Y.Maybe (FieldType, PGM.ValueSpec, Y.Maybe String)
-  -> Y.Maybe (FieldType, PGM.ValueSpec, Y.Maybe String)
-  -> Either Error (Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v)))
-constructEdgeCoder = define "constructEdgeCoder" $
-  doc "Construct an edge coder from components" $
-  "cx" ~> "g" ~> "parentLabel" ~> "schema" ~> "source" ~> "vidType" ~> "eidType" ~> "dir" ~> "name" ~> "fields" ~>
-  "propAdapters" ~> "mOutSpec" ~> "mInSpec" ~>
-    Eithers.bind (findLabelString @@ var "cx" @@ var "g" @@ var "source" @@ var "name" @@ (Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_edgeLabel @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema")))
-      ("labelStr" ~> lets [
-        "label">: wrap PG._EdgeLabel $ var "labelStr",
-        "vertexIdsSchema">: project PGM._Schema PGM._Schema_vertexIds @@ var "schema"] $
-        Eithers.bind (edgeIdAdapter @@ var "cx" @@ var "g" @@ var "schema" @@ var "eidType" @@ var "name"
-          @@ (Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_edgeId @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"))
-          @@ var "fields")
-          ("idAdapter" ~>
-            -- Compute out/in id adapters from projection specs
-            Eithers.bind (Maybes.maybe (right nothing)
-              ("s" ~> Eithers.map (lambda "x" $ just (var "x")) (projectionAdapter @@ var "cx" @@ var "g" @@ var "vidType" @@ var "vertexIdsSchema" @@ var "s" @@ string "out"))
-              (var "mOutSpec"))
-              ("outIdAdapter" ~> Eithers.bind (Maybes.maybe (right nothing)
-                ("s" ~> Eithers.map (lambda "x" $ just (var "x")) (projectionAdapter @@ var "cx" @@ var "g" @@ var "vidType" @@ var "vertexIdsSchema" @@ var "s" @@ string "in"))
-                (var "mInSpec"))
-                ("inIdAdapter" ~>
-                  -- Compute out/in vertex adapters from projection specs
-                  Eithers.bind (Maybes.maybe (right nothing)
-                    ("s" ~> Eithers.map (lambda "x" $ just (var "x")) (findIncidentVertexAdapter @@ var "cx" @@ var "g" @@ var "schema" @@ var "vidType" @@ var "eidType" @@ var "s"))
-                    (var "mOutSpec"))
-                    ("outVertexAdapter" ~> Eithers.bind (Maybes.maybe (right nothing)
-                      ("s" ~> Eithers.map (lambda "x" $ just (var "x")) (findIncidentVertexAdapter @@ var "cx" @@ var "g" @@ var "schema" @@ var "vidType" @@ var "eidType" @@ var "s"))
-                      (var "mInSpec"))
-                      ("inVertexAdapter" ~> lets [
-                        "vertexAdapters">: Maybes.cat (list [var "outVertexAdapter", var "inVertexAdapter"])] $
-                        -- Compute out/in vertex labels from spec aliases or fall back to parentLabel
-                        Eithers.bind (Maybes.maybe (right $ var "parentLabel")
-                          ("spec" ~> Maybes.maybe
-                            (left $ Error.errorOther $ Error.otherError $ string "no out-vertex label")
-                            (lambda "a" $ right $ wrap PG._VertexLabel (var "a"))
-                            (Pairs.second $ Pairs.second $ var "spec"))
-                          (var "mOutSpec"))
-                          ("outLabel" ~> Eithers.bind (Maybes.maybe (right $ var "parentLabel")
-                            ("spec" ~> Maybes.maybe
-                              (left $ Error.errorOther $ Error.otherError $ string "no in-vertex label")
-                              (lambda "a" $ right $ wrap PG._VertexLabel (var "a"))
-                              (Pairs.second $ Pairs.second $ var "spec"))
-                            (var "mInSpec"))
-                            ("inLabel" ~>
-                              right (edgeCoder @@ var "g" @@ var "dir" @@ var "schema" @@ var "source" @@ var "eidType" @@ var "name" @@ var "label"
-                                @@ var "outLabel" @@ var "inLabel" @@ var "idAdapter" @@ var "outIdAdapter" @@ var "inIdAdapter" @@ var "propAdapters" @@ var "vertexAdapters")))))))))
-
--- | Construct a vertex coder from components
-constructVertexCoder :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> Type -> t -> t -> Name -> [FieldType]
-  -> [Adapter FieldType (PG.PropertyType t) Field (PG.Property v)]
-  -> Either Error (Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v)))
-constructVertexCoder = define "constructVertexCoder" $
-  doc "Construct a vertex coder from components" $
-  "cx" ~> "g" ~> "schema" ~> "source" ~> "vidType" ~> "eidType" ~> "name" ~> "fields" ~> "propAdapters" ~>
-    Eithers.bind (findLabelString @@ var "cx" @@ var "g" @@ var "source" @@ var "name" @@ (Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_vertexLabel @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema")))
-      ("labelStr" ~> lets [
-        "label">: wrap PG._VertexLabel $ var "labelStr"] $
-        Eithers.bind (vertexIdAdapter @@ var "cx" @@ var "g" @@ var "schema" @@ var "vidType" @@ var "name"
-          @@ (Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_vertexId @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"))
-          @@ var "fields")
-          ("idAdapter" ~>
-            Eithers.bind (findAdjacenEdgeAdapters @@ var "cx" @@ var "g" @@ var "schema" @@ var "vidType" @@ var "eidType" @@ var "label" @@ (inject PG._Direction PG._Direction_out unit) @@ var "fields")
-              ("outEdgeAdapters" ~> Eithers.bind (findAdjacenEdgeAdapters @@ var "cx" @@ var "g" @@ var "schema" @@ var "vidType" @@ var "eidType" @@ var "label" @@ (inject PG._Direction PG._Direction_in unit) @@ var "fields")
-                ("inEdgeAdapters" ~>
-                  right (vertexCoder @@ var "g" @@ var "schema" @@ var "source" @@ var "vidType" @@ var "name" @@ var "label"
-                    @@ var "idAdapter" @@ var "propAdapters" @@ (Lists.concat2 (var "outEdgeAdapters") (var "inEdgeAdapters")))))))
-
--- | Create an edge coder given all components
-edgeCoder :: TTermDefinition (Graph -> PG.Direction -> PGM.Schema Graph t v -> Type -> t -> Name
-  -> PG.EdgeLabel -> PG.VertexLabel -> PG.VertexLabel
-  -> Y.Maybe (Name, Adapter Type t Term v) -> Y.Maybe (Name, Adapter Type t Term v) -> Y.Maybe (Name, Adapter Type t Term v)
-  -> [Adapter FieldType (PG.PropertyType t) Field (PG.Property v)]
-  -> [(Name, Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v))]
-  -> Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v))
-edgeCoder = define "edgeCoder" $
-  doc "Create an edge coder given all components" $
-  "g" ~> "dir" ~> "schema" ~> "source" ~> "eidType" ~> "tname" ~> "label" ~> "outLabel" ~> "inLabel" ~>
-  "mIdAdapter" ~> "outAdapter" ~> "inAdapter" ~> "propAdapters" ~> "vertexAdapters" ~> lets [
-    "et">: record PG._EdgeType [
-      PG._EdgeType_label>>: var "label",
-      PG._EdgeType_id>>: var "eidType",
-      PG._EdgeType_out>>: var "outLabel",
-      PG._EdgeType_in>>: var "inLabel",
-      PG._EdgeType_properties>>: propertyTypes @@ var "propAdapters"]] $
-    Coders.adapter true (var "source")
-      (elementTypeTreeEdge @@ var "et" @@ TTerm (Terms.list []))
-      (Coders.coder
-        ("cx" ~> "term" ~>
-          lets ["deannot">: Strip.deannotateTerm @@ var "term",
-                "unwrapped">: cases _Term (var "deannot") (Just $ var "deannot") [
-                  _Term_maybe>>: "mt" ~> Maybes.fromMaybe (var "deannot") (var "mt")],
-                "rec">: cases _Term (var "unwrapped") Nothing [
-                  _Term_record>>: lambda "r" $ var "r"]] $
-          Eithers.bind (checkRecordName @@ var "cx" @@ var "tname" @@ (Core.recordTypeName $ var "rec"))
-            ("_chk" ~> lets [
-              "fieldsm">: Resolution.fieldMap @@ (Core.recordFields $ var "rec")] $
-              Eithers.bind (Maybes.maybe
-                (right $ project PGM._Schema PGM._Schema_defaultEdgeId @@ var "schema")
-                (selectEdgeId @@ var "cx" @@ var "fieldsm")
-                (var "mIdAdapter"))
-                ("edgeId" ~> Eithers.bind (encodeProperties @@ var "cx" @@ var "fieldsm" @@ var "propAdapters")
-                  ("props" ~> lets [
-                    "getVertexId">: "dirCheck" ~> "adapter" ~>
-                      Maybes.maybe
-                        (right $ project PGM._Schema PGM._Schema_defaultVertexId @@ var "schema")
-                        (selectVertexId @@ var "cx" @@ var "fieldsm")
-                        (Logic.ifElse (Equality.equal (var "dir") (var "dirCheck"))
-                          nothing
-                          (var "adapter"))] $
-                    Eithers.bind (var "getVertexId" @@ (inject PG._Direction PG._Direction_out unit) @@ var "outAdapter")
-                      ("outId" ~> Eithers.bind (var "getVertexId" @@ (inject PG._Direction PG._Direction_in unit) @@ var "inAdapter")
-                        ("inId" ~>
-                          -- Find dependencies from vertex adapters
-                          Eithers.bind (Eithers.map (lambda "xs" $ Maybes.cat (var "xs"))
-                            (Eithers.mapList
-                              ("va" ~> lets [
-                                "fname">: Pairs.first $ var "va",
-                                "ad">: Pairs.second $ var "va"] $
-                                Maybes.maybe
-                                  (right nothing)
-                                  ("fterm" ~> Eithers.map (lambda "x" $ just (var "x"))
-                                    (Coders.coderEncode (Coders.adapterCoder $ var "ad") @@ var "cx" @@ var "fterm"))
-                                  (Maps.lookup (var "fname") (var "fieldsm")))
-                              (var "vertexAdapters")))
-                            ("deps" ~>
-                              right (elementTreeEdge
-                                @@ (record PG._Edge [
-                                  PG._Edge_label>>: var "label",
-                                  PG._Edge_id>>: var "edgeId",
-                                  PG._Edge_out>>: var "outId",
-                                  PG._Edge_in>>: var "inId",
-                                  PG._Edge_properties>>: var "props"])
-                                @@ var "deps"))))))))
-        ("cx" ~> "_" ~> left (Error.errorOther $ Error.otherError $ string "edge decoding is not yet supported")))
-
--- | Create an edge id adapter
-edgeIdAdapter :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> t -> Name -> Name -> [FieldType]
-  -> Either Error (Y.Maybe (Name, Adapter Type t Term v)))
-edgeIdAdapter = define "edgeIdAdapter" $
-  doc "Create an edge id adapter" $
-  "cx" ~> "g" ~> "schema" ~> "eidType" ~> "name" ~> "idKey" ~> "fields" ~>
-    Eithers.bind (findIdProjectionSpec @@ var "cx" @@ false @@ var "name" @@ var "idKey" @@ var "fields")
-      ("mIdSpec" ~> Maybes.maybe
-        (right nothing)
-        ("idSpec" ~> Eithers.map (lambda "x" $ just (var "x")) (projectionAdapter @@ var "cx" @@ var "g" @@ var "eidType" @@ (project PGM._Schema PGM._Schema_edgeIds @@ var "schema") @@ var "idSpec" @@ string "id"))
-        (var "mIdSpec"))
-
--- | Construct an element adapter for a given type
-elementCoder :: TTermDefinition (Y.Maybe (PG.Direction, PG.VertexLabel) -> PGM.Schema Graph t v -> Type -> t -> t -> Context -> Graph
-  -> Either Error (Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v)))
-elementCoder = define "elementCoder" $
-  doc "Construct an element adapter for a given type, interpreting it either as a vertex specification or an edge specification" $
-  "mparent" ~> "schema" ~> "source" ~> "vidType" ~> "eidType" ~> "cx" ~> "g" ~> lets [
-    "dir">: Maybes.maybe (inject PG._Direction PG._Direction_both unit) (lambda "p" $ Pairs.first (var "p")) (var "mparent"),
-    "parentLabel">: Maybes.maybe (wrap PG._VertexLabel $ string "NOLABEL") (lambda "p" $ Pairs.second (var "p")) (var "mparent")] $
-    cases _Type (Strip.deannotateType @@ var "source")
-      (Just $ unexpectedE (var "cx") (string "record type") (string "other type")) [
-      _Type_maybe>>: "ot" ~>
-        elementCoder @@ var "mparent" @@ var "schema" @@ var "ot" @@ var "vidType" @@ var "eidType" @@ var "cx" @@ var "g",
-      _Type_record>>: "fields" ~> lets [
-        "name">: Core.name (string "placeholder"),
-        "outVertexKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_outVertex @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"),
-        "outVertexLabelKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_outVertexLabel @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"),
-        "inVertexKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_inVertex @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"),
-        "inVertexLabelKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_inVertexLabel @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema")] $
-        Eithers.bind (findProjectionSpec @@ var "cx" @@ var "g" @@ var "name" @@ var "outVertexKey" @@ var "outVertexLabelKey" @@ var "fields")
-          ("mOutSpec" ~> Eithers.bind (findProjectionSpec @@ var "cx" @@ var "g" @@ var "name" @@ var "inVertexKey" @@ var "inVertexLabelKey" @@ var "fields")
-            ("mInSpec" ~> lets [
-              "kind">: Logic.ifElse (hasVertexAdapters @@ var "dir" @@ var "mOutSpec" @@ var "mInSpec")
-                (inject PG._ElementKind PG._ElementKind_edge unit)
-                (inject PG._ElementKind PG._ElementKind_vertex unit)] $
-              Eithers.bind (findPropertySpecs @@ var "cx" @@ var "g" @@ var "schema" @@ var "kind" @@ var "fields")
-                ("propSpecs" ~> Eithers.bind (Eithers.mapList (propertyAdapter @@ var "cx" @@ var "g" @@ var "schema") (var "propSpecs"))
-                  ("propAdapters" ~>
-                    match PG._ElementKind Nothing [
-                      PG._ElementKind_vertex>>: constant $
-                        constructVertexCoder @@ var "cx" @@ var "g" @@ var "schema" @@ var "source" @@ var "vidType" @@ var "eidType" @@ var "name" @@ var "fields" @@ var "propAdapters",
-                      PG._ElementKind_edge>>: constant $
-                        constructEdgeCoder @@ var "cx" @@ var "g" @@ var "parentLabel" @@ var "schema" @@ var "source" @@ var "vidType" @@ var "eidType" @@ var "dir" @@ var "name" @@ var "fields" @@ var "propAdapters" @@ var "mOutSpec" @@ var "mInSpec"]
-                    @@ var "kind"))))]
-
--- | Create an element tree for an edge
-elementTreeEdge :: TTermDefinition (PG.Edge v -> [PG.ElementTree v] -> PG.ElementTree v)
-elementTreeEdge = define "elementTreeEdge" $
-  doc "Create an element tree for an edge" $
-  "edge" ~> "deps" ~>
-    record PG._ElementTree [
-      PG._ElementTree_self>>: inject PG._Element PG._Element_edge (var "edge"),
-      PG._ElementTree_dependencies>>: var "deps"]
-
--- | Create an element tree for a vertex
-elementTreeVertex :: TTermDefinition (PG.Vertex v -> [PG.ElementTree v] -> PG.ElementTree v)
-elementTreeVertex = define "elementTreeVertex" $
-  doc "Create an element tree for a vertex" $
-  "vertex" ~> "deps" ~>
-    record PG._ElementTree [
-      PG._ElementTree_self>>: inject PG._Element PG._Element_vertex (var "vertex"),
-      PG._ElementTree_dependencies>>: var "deps"]
-
--- | Create an element type tree for an edge type
-elementTypeTreeEdge :: TTermDefinition (PG.EdgeType t -> [PG.ElementTypeTree t] -> PG.ElementTypeTree t)
-elementTypeTreeEdge = define "elementTypeTreeEdge" $
-  doc "Create an element type tree for an edge type" $
-  "etype" ~> "deps" ~>
-    record PG._ElementTypeTree [
-      PG._ElementTypeTree_self>>: inject PG._ElementType PG._ElementType_edge (var "etype"),
-      PG._ElementTypeTree_dependencies>>: var "deps"]
-
--- | Create an element type tree for a vertex type
-elementTypeTreeVertex :: TTermDefinition (PG.VertexType t -> [PG.ElementTypeTree t] -> PG.ElementTypeTree t)
-elementTypeTreeVertex = define "elementTypeTreeVertex" $
-  doc "Create an element type tree for a vertex type" $
-  "vtype" ~> "deps" ~>
-    record PG._ElementTypeTree [
-      PG._ElementTypeTree_self>>: inject PG._ElementType PG._ElementType_vertex (var "vtype"),
-      PG._ElementTypeTree_dependencies>>: var "deps"]
-
--- | Encode all properties from a field map using property adapters
-encodeProperties :: TTermDefinition (Context -> M.Map Name Term -> [Adapter FieldType (PG.PropertyType t) Field (PG.Property v)]
-  -> Either Error (M.Map PG.PropertyKey v))
-encodeProperties = define "encodeProperties" $
-  doc "Encode all properties from a field map using property adapters" $
-  "cx" ~> "fields" ~> "adapters" ~>
-    Eithers.map
-      ("props" ~> Maps.fromList (Lists.map
-        ("prop" ~> pair (project PG._Property PG._Property_key @@ var "prop") (project PG._Property PG._Property_value @@ var "prop"))
-        (var "props")))
-      (Eithers.map (lambda "xs" $ Maybes.cat (var "xs")) (Eithers.mapList (encodeProperty @@ var "cx" @@ var "fields") (var "adapters")))
-
--- | Encode a single property from a field map using a property adapter
-encodeProperty :: TTermDefinition (Context -> M.Map Name Term -> Adapter FieldType (PG.PropertyType t) Field (PG.Property v)
-  -> Either Error (Y.Maybe (PG.Property v)))
-encodeProperty = define "encodeProperty" $
-  doc "Encode a single property from a field map using a property adapter" $
-  "cx" ~> "fields" ~> "adapter" ~> lets [
-    "fname">: Core.fieldTypeName $ (Coders.adapterSource $ var "adapter"),
-    "ftyp">: Strip.deannotateType @@ (Core.fieldTypeType $ Coders.adapterSource $ var "adapter"),
-    "isMaybe">: cases _Type (var "ftyp") (Just false) [
-      _Type_maybe>>: constant true],
-    "encodeValue">: "v" ~> Eithers.map (lambda "x" $ just (var "x"))
-      (Coders.coderEncode (Coders.adapterCoder $ var "adapter") @@ var "cx" @@ (Core.field (var "fname") (var "v")))] $
-    Maybes.maybe
-      -- Field not found in record
-      (Logic.ifElse (var "isMaybe")
-        (right nothing)
-        (err (var "cx") (string "expected field not found in record: " ++ (Core.unName $ var "fname"))))
-      -- Field found in record
-      ("value" ~>
-        Logic.ifElse (var "isMaybe")
-          -- Optional field: unwrap TermMaybe
-          (cases _Term (Strip.deannotateTerm @@ var "value") (Just $ var "encodeValue" @@ var "value") [
-            _Term_maybe>>: "ov" ~>
-              Maybes.maybe (right nothing) (var "encodeValue") (var "ov")])
-          -- Required field: encode directly
-          (var "encodeValue" @@ var "value"))
-      (Maps.lookup (var "fname") (var "fields"))
-
--- | Bridge an ExtractCore function into Result
-extractString :: TTermDefinition (Context -> Graph -> Term -> Either Error String)
-extractString = define "extractString" $
-  doc "Extract a string from a term" $
-  "cx" ~> "g" ~> "t" ~>
-    ExtractCore.string @@ var "g" @@ var "t"
-
--- | Find adjacent edge adapters for a given direction
-findAdjacenEdgeAdapters :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> t -> t -> PG.VertexLabel -> PG.Direction -> [FieldType]
-  -> Either Error [(PG.Direction, FieldType, PG.EdgeLabel, Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v))])
-findAdjacenEdgeAdapters = define "findAdjacenEdgeAdapters" $
-  doc "Find adjacent edge adapters for a given direction" $
-  "cx" ~> "g" ~> "schema" ~> "vidType" ~> "eidType" ~> "parentLabel" ~> "dir" ~> "fields" ~>
-    Eithers.map (lambda "xs" $ Maybes.cat (var "xs")) (Eithers.mapList
-      ("field" ~> lets [
-        "key">: Core.name $ match PG._Direction Nothing [
-          PG._Direction_out>>: constant $ project PGM._AnnotationSchema PGM._AnnotationSchema_outEdgeLabel @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"),
-          PG._Direction_in>>: constant $ project PGM._AnnotationSchema PGM._AnnotationSchema_inEdgeLabel @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema")]
-          @@ var "dir"] $
-        Maybes.maybe
-          (right nothing)
-          ("a" ~> Eithers.bind (extractString @@ var "cx" @@ var "g" @@ var "a")
-            ("labelStr" ~> Eithers.bind (elementCoder @@ (just (pair (var "dir") (var "parentLabel"))) @@ var "schema" @@ (Core.fieldTypeType $ var "field") @@ var "vidType" @@ var "eidType" @@ var "cx" @@ var "g")
-              ("elad" ~> right (just (tuple4 (var "dir") (var "field") (wrap PG._EdgeLabel $ var "labelStr") (var "elad"))))))
-          (Annotations.getTypeAnnotation @@ var "key" @@ (Core.fieldTypeType $ var "field")))
-      (var "fields"))
-
--- | Find an id projection spec for a field
-findIdProjectionSpec :: TTermDefinition (Context -> Bool -> Name -> Name -> [FieldType]
-  -> Either Error (Y.Maybe (FieldType, PGM.ValueSpec, Y.Maybe String)))
-findIdProjectionSpec = define "findIdProjectionSpec" $
-  doc "Find an id projection spec for a field" $
-  "cx" ~> "required" ~> "tname" ~> "idKey" ~> "fields" ~>
-    Eithers.bind (findSingleFieldWithAnnotationKey @@ var "cx" @@ var "tname" @@ var "idKey" @@ var "fields")
-      ("mid" ~> Maybes.maybe
-        (Logic.ifElse (var "required")
-          (err (var "cx") (string "no " ++ (Core.unName $ var "idKey") ++ string " field"))
-          (right nothing))
-        ("mi" ~> Eithers.map
-          ("spec" ~> just (pair (var "mi") (pair (var "spec")
-            (Maybes.map ("s" ~> Strings.toUpper (var "s")) nothing))))
-          (Maybes.maybe
-            (right (inject PGM._ValueSpec PGM._ValueSpec_value unit))
-            (TermsToElements.decodeValueSpec @@ var "cx" @@ Graph.emptyGraph)
-            (Annotations.getTypeAnnotation @@ var "idKey" @@ (Core.fieldTypeType $ var "mi"))))
-        (var "mid"))
-
--- | Find an incident vertex adapter for a projection spec
-findIncidentVertexAdapter :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> t -> t -> (FieldType, PGM.ValueSpec, Y.Maybe String)
-  -> Either Error (Name, Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v)))
-findIncidentVertexAdapter = define "findIncidentVertexAdapter" $
-  doc "Find an incident vertex adapter for a projection spec" $
-  "cx" ~> "g" ~> "schema" ~> "vidType" ~> "eidType" ~> "spec" ~> lets [
-    "field">: Pairs.first $ var "spec"] $
-    Eithers.bind (elementCoder @@ nothing @@ var "schema" @@ (Core.fieldTypeType $ var "field") @@ var "vidType" @@ var "eidType" @@ var "cx" @@ var "g")
-      ("adapter" ~> right (pair (Core.fieldTypeName $ var "field") (var "adapter")))
-
--- | Find a label string from annotations or the type name
-findLabelString :: TTermDefinition (Context -> Graph -> Type -> Name -> Name -> Either Error String)
-findLabelString = define "findLabelString" $
-  doc "Find a label string from annotations or the type name" $
-  "cx" ~> "g" ~> "source" ~> "tname" ~> "labelKey" ~>
-    Maybes.maybe
-      (right $ Core.unName $ var "tname")
-      (extractString @@ var "cx" @@ var "g")
-      (Annotations.getTypeAnnotation @@ var "labelKey" @@ var "source")
-
--- | Find a projection spec for a field
-findProjectionSpec :: TTermDefinition (Context -> Graph -> Name -> Name -> Name -> [FieldType]
-  -> Either Error (Y.Maybe (FieldType, PGM.ValueSpec, Y.Maybe String)))
-findProjectionSpec = define "findProjectionSpec" $
-  doc "Find a projection spec for a field" $
-  "cx" ~> "g" ~> "tname" ~> "key" ~> "aliasKey" ~> "fields" ~>
-    Eithers.bind (findSingleFieldWithAnnotationKey @@ var "cx" @@ var "tname" @@ var "key" @@ var "fields")
-      ("mfield" ~> Maybes.maybe
-        (right nothing)
-        ("field" ~>
-          Maybes.maybe
-            (left $ Error.errorOther $ Error.otherError $ string "findProjectionSpec: missing type annotation for key")
-            ("annot" ~>
-              Eithers.bind (TermsToElements.decodeValueSpec @@ var "cx" @@ var "g" @@ var "annot")
-                ("spec" ~>
-                  Eithers.bind (Maybes.maybe (right nothing) ("t" ~> Eithers.map (lambda "x" $ just (var "x")) (extractString @@ var "cx" @@ var "g" @@ var "t"))
-                    (Annotations.getTypeAnnotation @@ var "aliasKey" @@ (Core.fieldTypeType $ var "field")))
-                    ("alias" ~> right (just (pair (var "field") (pair (var "spec") (var "alias")))))))
-            (Annotations.getTypeAnnotation @@ var "key" @@ (Core.fieldTypeType $ var "field")))
-        (var "mfield"))
-
--- | Find property specs for element fields
-findPropertySpecs :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> PG.ElementKind -> [FieldType]
-  -> Either Error [(FieldType, PGM.ValueSpec, Y.Maybe String)])
-findPropertySpecs = define "findPropertySpecs" $
-  doc "Find property specs for element fields" $
-  "cx" ~> "g" ~> "schema" ~> "kind" ~> "fields" ~>
-    Eithers.mapList
-      ("field" ~> lets [
-        "propKeyKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_propertyKey @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema"),
-        "propValueKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_propertyValue @@ (project PGM._Schema PGM._Schema_annotations @@ var "schema")] $
-        Eithers.bind (Maybes.maybe (right nothing) ("a" ~> Eithers.map (lambda "x" $ just (var "x")) (extractString @@ var "cx" @@ var "g" @@ var "a"))
-          (Annotations.getTypeAnnotation @@ var "propKeyKey" @@ (Core.fieldTypeType $ var "field")))
-          ("alias" ~> Eithers.bind (Maybes.maybe (right (inject PGM._ValueSpec PGM._ValueSpec_value unit)) (TermsToElements.decodeValueSpec @@ var "cx" @@ var "g")
-            (Annotations.getTypeAnnotation @@ var "propValueKey" @@ (Core.fieldTypeType $ var "field")))
-            ("values" ~> right (pair (var "field") (pair (var "values") (var "alias"))))))
-      (Lists.filter
-        ("field" ~> lets [
-          "annots">: project PGM._Schema PGM._Schema_annotations @@ var "schema",
-          "ignoreKey">: Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_ignore @@ var "annots",
-          "specialKeys">: match PG._ElementKind Nothing [
-            PG._ElementKind_vertex>>: constant $ list [
-              Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_vertexId @@ var "annots",
-              Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_outEdgeLabel @@ var "annots",
-              Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_inEdgeLabel @@ var "annots"],
-            PG._ElementKind_edge>>: constant $ list [
-              Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_edgeId @@ var "annots",
-              Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_outVertex @@ var "annots",
-              Core.name $ project PGM._AnnotationSchema PGM._AnnotationSchema_inVertex @@ var "annots"]]
-            @@ var "kind",
-          "allKeys">: Lists.concat $ list [list [var "ignoreKey"], var "specialKeys"],
-          "hasSpecialAnnotation">: Lists.foldl
-            ("b" ~> "k" ~> Logic.or (var "b") (Maybes.isJust (Annotations.getTypeAnnotation @@ var "k" @@ (Core.fieldTypeType $ var "field"))))
-            false
-            (var "allKeys"),
-          "hasSpecialFieldName">: Lists.foldl
-            ("b" ~> "k" ~> Logic.or (var "b") (Equality.equal (Core.fieldTypeName $ var "field") (var "k")))
-            false
-            (var "specialKeys")] $
-          Logic.not (Logic.or (var "hasSpecialAnnotation") (var "hasSpecialFieldName")))
-        (var "fields"))
-
--- | Find a single field with a given annotation key
-findSingleFieldWithAnnotationKey :: TTermDefinition (Context -> Name -> Name -> [FieldType]
-  -> Either Error (Y.Maybe FieldType))
-findSingleFieldWithAnnotationKey = define "findSingleFieldWithAnnotationKey" $
-  doc "Find a single field with a given annotation key" $
-  "cx" ~> "tname" ~> "key" ~> "fields" ~> lets [
-    "matches">: Lists.filter
-      ("f" ~> Maybes.isJust (Annotations.getTypeAnnotation @@ var "key" @@ (Core.fieldTypeType $ var "f")))
-      (var "fields")] $
-    Logic.ifElse (Equality.gt (Lists.length $ var "matches") (int32 1))
-      (err (var "cx") (string "Multiple fields marked as '" ++ (Core.unName $ var "key") ++ string "' in record type " ++ (Core.unName $ var "tname")))
-      (right (Lists.maybeHead $ var "matches"))
-
--- | Determine whether the spec has vertex adapters based on direction and out/in specs
-hasVertexAdapters :: TTermDefinition (PG.Direction -> Y.Maybe a -> Y.Maybe b -> Bool)
-hasVertexAdapters = define "hasVertexAdapters" $
-  doc "Determine whether the spec has vertex adapters based on direction and out/in specs" $
-  "dir" ~> "mOutSpec" ~> "mInSpec" ~>
-    match PG._Direction Nothing [
-      PG._Direction_out>>: constant $ Maybes.isJust (var "mInSpec"),
-      PG._Direction_in>>: constant $ Maybes.isJust (var "mOutSpec"),
-      PG._Direction_both>>: constant $ Logic.and (Maybes.isJust (var "mOutSpec")) (Maybes.isJust (var "mInSpec"))]
-    @@ var "dir"
-
--- | Create a projection adapter from a projection spec
-projectionAdapter :: TTermDefinition (Context -> Graph -> t -> Coder Term v -> (FieldType, PGM.ValueSpec, Y.Maybe String) -> String
-  -> Either Error (Name, Adapter Type t Term v))
-projectionAdapter = define "projectionAdapter" $
-  doc "Create a projection adapter from a projection spec" $
-  "cx" ~> "g" ~> "idtype" ~> "coder" ~> "spec" ~> "key" ~> lets [
-    "field">: Pairs.first $ var "spec",
-    "values">: Pairs.first $ Pairs.second $ var "spec"] $
-    Eithers.bind (TermsToElements.parseValueSpec @@ var "cx" @@ var "g" @@ var "values")
-      ("traversal" ~> right (pair
-        (Core.fieldTypeName $ var "field")
-        (Coders.adapter true (Core.fieldTypeType $ var "field") (var "idtype")
-          (Coders.coder
-            ("cx'" ~> "typ" ~>
-              Eithers.bind (traverseToSingleTerm @@ var "cx'" @@ (var "key" ++ string "-projection") @@ (var "traversal" @@ var "cx'") @@ var "typ")
-                ("t" ~> Coders.coderEncode (var "coder") @@ var "cx'" @@ var "t"))
-            ("cx'" ~> "_" ~> left (Error.errorOther $ Error.otherError $ string "edge '" ++ var "key" ++ string "' decoding is not yet supported"))))))
-
--- | Create a property adapter from a property spec
-propertyAdapter :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> (FieldType, PGM.ValueSpec, Y.Maybe String)
-  -> Either Error (Adapter FieldType (PG.PropertyType t) Field (PG.Property v)))
-propertyAdapter = define "propertyAdapter" $
-  doc "Create a property adapter from a property spec" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~> lets [
-    "tfield">: Pairs.first $ var "spec",
-    "values">: Pairs.first $ Pairs.second $ var "spec",
-    "alias">: Pairs.second $ Pairs.second $ var "spec",
-    "key">: wrap PG._PropertyKey $ (Maybes.fromMaybe (Core.unName $ (Core.fieldTypeName $ var "tfield")) (var "alias"))] $
-    Eithers.bind (Coders.coderEncode (project PGM._Schema PGM._Schema_propertyTypes @@ var "schema") @@ var "cx" @@ (Core.fieldTypeType $ var "tfield"))
-      ("pt" ~> Eithers.bind (TermsToElements.parseValueSpec @@ var "cx" @@ var "g" @@ var "values")
-        ("traversal" ~> right
-          (Coders.adapter true (var "tfield")
-            (record PG._PropertyType [
-              PG._PropertyType_key>>: var "key",
-              PG._PropertyType_value>>: var "pt",
-              PG._PropertyType_required>>: true])
-            (Coders.coder
-              ("cx'" ~> "dfield" ~>
-                Eithers.bind (traverseToSingleTerm @@ var "cx'" @@ string "property traversal" @@ (var "traversal" @@ var "cx'") @@ (Core.fieldTerm $ var "dfield"))
-                  ("result" ~> Eithers.bind (Coders.coderEncode (project PGM._Schema PGM._Schema_propertyValues @@ var "schema") @@ var "cx'" @@ var "result")
-                    ("value" ~> right (record PG._Property [
-                      PG._Property_key>>: var "key",
-                      PG._Property_value>>: var "value"]))))
-              ("cx'" ~> "_" ~> left (Error.errorOther $ Error.otherError $ string "property decoding is not yet supported"))))))
-
--- | Extract property types from property adapters
-propertyTypes :: TTermDefinition ([Adapter FieldType (PG.PropertyType t) Field (PG.Property v)] -> [PG.PropertyType t])
-propertyTypes = define "propertyTypes" $
-  doc "Extract property types from property adapters" $
-  "propAdapters" ~>
-    Lists.map
-      ("a" ~> record PG._PropertyType [
-        PG._PropertyType_key>>: project PG._PropertyType PG._PropertyType_key @@ (Coders.adapterTarget $ var "a"),
-        PG._PropertyType_value>>: project PG._PropertyType PG._PropertyType_value @@ (Coders.adapterTarget $ var "a"),
-        PG._PropertyType_required>>: true])
-      (var "propAdapters")
-
--- | Select an edge id from record fields using an id adapter
-selectEdgeId :: TTermDefinition (Context -> M.Map Name Term -> (Name, Adapter Type t Term v) -> Either Error v)
-selectEdgeId = define "selectEdgeId" $
-  doc "Select an edge id from record fields using an id adapter" $
-  "cx" ~> "fields" ~> "ad" ~> lets [
-    "fname">: Pairs.first $ var "ad",
-    "adapter">: Pairs.second $ var "ad"] $
-    Maybes.maybe
-      (err (var "cx") (string "no " ++ (Core.unName $ var "fname") ++ string " in record"))
-      ("t" ~> Coders.coderEncode (Coders.adapterCoder $ var "adapter") @@ var "cx" @@ var "t")
-      (Maps.lookup (var "fname") (var "fields"))
-
--- | Select a vertex id from record fields using an id adapter
-selectVertexId :: TTermDefinition (Context -> M.Map Name Term -> (Name, Adapter Type t Term v) -> Either Error v)
-selectVertexId = define "selectVertexId" $
-  doc "Select a vertex id from record fields using an id adapter" $
-  "cx" ~> "fields" ~> "ad" ~> lets [
-    "fname">: Pairs.first $ var "ad",
-    "adapter">: Pairs.second $ var "ad"] $
-    Maybes.maybe
-      (err (var "cx") (string "no " ++ (Core.unName $ var "fname") ++ string " in record"))
-      ("t" ~> Coders.coderEncode (Coders.adapterCoder $ var "adapter") @@ var "cx" @@ var "t")
-      (Maps.lookup (var "fname") (var "fields"))
-
--- | Traverse to a single term, failing if zero or multiple terms are found
-traverseToSingleTerm :: TTermDefinition (Context -> String -> (Term -> Either Error [Term]) -> Term -> Either Error Term)
-traverseToSingleTerm = define "traverseToSingleTerm" $
-  doc "Traverse to a single term, failing if zero or multiple terms are found" $
-  "cx" ~> "desc" ~> "traversal" ~> "term" ~>
-    Eithers.bind (var "traversal" @@ var "term")
-      ("terms" ~>
-        Logic.ifElse (Lists.null $ var "terms")
-          (err (var "cx") (var "desc" ++ string " did not resolve to a term"))
-          (Logic.ifElse (Equality.equal (Lists.length $ var "terms") (int32 1))
-            (Maybes.maybe
-              (err (var "cx") (var "desc" ++ string " resolved to multiple terms"))
-              (unaryFunction right)
-              (Lists.maybeHead $ var "terms"))
-            (err (var "cx") (var "desc" ++ string " resolved to multiple terms"))))
-
--- | Create a vertex coder given all components
-vertexCoder :: TTermDefinition (Graph -> PGM.Schema Graph t v -> Type -> t -> Name -> PG.VertexLabel
-  -> (Name, Adapter Type t Term v)
-  -> [Adapter FieldType (PG.PropertyType t) Field (PG.Property v)]
-  -> [(PG.Direction, FieldType, PG.EdgeLabel, Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v))]
-  -> Adapter Type (PG.ElementTypeTree t) Term (PG.ElementTree v))
-vertexCoder = define "vertexCoder" $
-  doc "Create a vertex coder given all components" $
-  "g" ~> "schema" ~> "source" ~> "vidType" ~> "tname" ~> "vlabel" ~>
-  "idAdapter" ~> "propAdapters" ~> "edgeAdapters" ~> lets [
-    "vtype">: record PG._VertexType [
-      PG._VertexType_label>>: var "vlabel",
-      PG._VertexType_id>>: var "vidType",
-      PG._VertexType_properties>>: propertyTypes @@ var "propAdapters"],
-    "depTypes">: Lists.map
-      ("ea" ~> Coders.adapterTarget $ (Pairs.second $ Pairs.second $ Pairs.second $ var "ea"))
-      (var "edgeAdapters"),
-    "target">: elementTypeTreeVertex @@ var "vtype" @@ var "depTypes"] $
-    Coders.adapter true (var "source") (var "target")
-      (Coders.coder
-        ("cx" ~> "term" ~>
-          lets ["deannot">: Strip.deannotateTerm @@ var "term",
-                -- Unwrap TermMaybe if present
-                "unwrapped">: cases _Term (var "deannot") (Just $ var "deannot") [
-                  _Term_maybe>>: "mt" ~> Maybes.fromMaybe (var "deannot") (var "mt")],
-                "rec">: cases _Term (var "unwrapped") Nothing [
-                  _Term_record>>: lambda "r" $ var "r"],
-                "fmap">: Resolution.fieldMap @@ (Core.recordFields $ var "rec")] $
-          Eithers.bind (selectVertexId @@ var "cx" @@ var "fmap" @@ var "idAdapter")
-            ("vid" ~> Eithers.bind (encodeProperties @@ var "cx" @@ var "fmap" @@ var "propAdapters")
-              ("props" ~>
-                -- Find dependencies from edge adapters
-                Eithers.bind (Eithers.map (lambda "xs" $ Lists.concat (var "xs"))
-                  (Eithers.mapList
-                    ("ea" ~> lets [
-                      "eaDir">: Pairs.first $ var "ea",
-                      "eaField">: Pairs.first $ Pairs.second $ var "ea",
-                      "eaLabel">: Pairs.first $ Pairs.second $ Pairs.second $ var "ea",
-                      "eaAdapter">: Pairs.second $ Pairs.second $ Pairs.second $ var "ea"] $
-                      Maybes.maybe
-                        (right (list ([] :: [TTerm (PG.ElementTree v)])))
-                        ("fterm" ~> Eithers.map
-                          ("tree" ~>
-                            -- fixTree: inspect element tree self
-                            match PG._Element Nothing [
-                              PG._Element_vertex>>: "vtx" ~> lets [
-                                -- Child is a vertex: create an edge connecting parent to child
-                                "otherid">: project PG._Vertex PG._Vertex_id @@ var "vtx",
-                                "edgeid">: project PGM._Schema PGM._Schema_defaultEdgeId @@ var "schema",
-                                "outId">: match PG._Direction Nothing [
-                                  PG._Direction_out>>: constant $ var "vid",
-                                  PG._Direction_in>>: constant $ var "otherid"]
-                                  @@ var "eaDir",
-                                "inId">: match PG._Direction Nothing [
-                                  PG._Direction_out>>: constant $ var "otherid",
-                                  PG._Direction_in>>: constant $ var "vid"]
-                                  @@ var "eaDir",
-                                "edge">: inject PG._Element PG._Element_edge (record PG._Edge [
-                                  PG._Edge_label>>: var "eaLabel",
-                                  PG._Edge_id>>: var "edgeid",
-                                  PG._Edge_out>>: var "outId",
-                                  PG._Edge_in>>: var "inId",
-                                  PG._Edge_properties>>: Maps.empty])] $
-                                list [record PG._ElementTree [
-                                  PG._ElementTree_self>>: var "edge",
-                                  PG._ElementTree_dependencies>>: list [var "tree"]]],
-                              PG._Element_edge>>: "edg" ~> lets [
-                                -- Child is an edge: fix its out/in vertex id
-                                "fixedEdge">: match PG._Direction Nothing [
-                                  PG._Direction_out>>: constant $ record PG._Edge [
-                                    PG._Edge_label>>: project PG._Edge PG._Edge_label @@ var "edg",
-                                    PG._Edge_id>>: project PG._Edge PG._Edge_id @@ var "edg",
-                                    PG._Edge_out>>: var "vid",
-                                    PG._Edge_in>>: project PG._Edge PG._Edge_in @@ var "edg",
-                                    PG._Edge_properties>>: project PG._Edge PG._Edge_properties @@ var "edg"],
-                                  PG._Direction_in>>: constant $ record PG._Edge [
-                                    PG._Edge_label>>: project PG._Edge PG._Edge_label @@ var "edg",
-                                    PG._Edge_id>>: project PG._Edge PG._Edge_id @@ var "edg",
-                                    PG._Edge_out>>: project PG._Edge PG._Edge_out @@ var "edg",
-                                    PG._Edge_in>>: var "vid",
-                                    PG._Edge_properties>>: project PG._Edge PG._Edge_properties @@ var "edg"]]
-                                  @@ var "eaDir"] $
-                                list [record PG._ElementTree [
-                                  PG._ElementTree_self>>: inject PG._Element PG._Element_edge (var "fixedEdge"),
-                                  PG._ElementTree_dependencies>>: project PG._ElementTree PG._ElementTree_dependencies @@ var "tree"]]]
-                            @@ (project PG._ElementTree PG._ElementTree_self @@ var "tree"))
-                          (Coders.coderEncode (Coders.adapterCoder $ var "eaAdapter") @@ var "cx" @@ var "fterm"))
-                        (Maps.lookup (Core.fieldTypeName $ var "eaField") (var "fmap")))
-                    (var "edgeAdapters")))
-                  ("deps" ~>
-                    right (elementTreeVertex
-                      @@ (record PG._Vertex [
-                        PG._Vertex_label>>: var "vlabel",
-                        PG._Vertex_id>>: var "vid",
-                        PG._Vertex_properties>>: var "props"])
-                      @@ var "deps")))))
-        ("cx" ~> "_" ~> left (Error.errorOther $ Error.otherError $ string "vertex decoding is not yet supported")))
-
--- | Create a vertex id adapter
-vertexIdAdapter :: TTermDefinition (Context -> Graph -> PGM.Schema Graph t v -> t -> Name -> Name -> [FieldType]
-  -> Either Error (Name, Adapter Type t Term v))
-vertexIdAdapter = define "vertexIdAdapter" $
-  doc "Create a vertex id adapter" $
-  "cx" ~> "g" ~> "schema" ~> "vidType" ~> "name" ~> "idKey" ~> "fields" ~>
-    Eithers.bind (findIdProjectionSpec @@ var "cx" @@ true @@ var "name" @@ var "idKey" @@ var "fields")
-      ("mIdSpec" ~> Maybes.maybe
-        (left $ Error.errorOther $ Error.otherError $ string "vertexIdAdapter: no id projection spec")
-        ("idSpec" ~> projectionAdapter @@ var "cx" @@ var "g" @@ var "vidType" @@ (project PGM._Schema PGM._Schema_vertexIds @@ var "schema") @@ var "idSpec" @@ string "id")
-        (var "mIdSpec"))
diff --git a/src/main/haskell/Hydra/Sources/Pg/Graphson/Coder.hs b/src/main/haskell/Hydra/Sources/Pg/Graphson/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Graphson/Coder.hs
+++ /dev/null
@@ -1,300 +0,0 @@
-module Hydra.Sources.Pg.Graphson.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  adjacentEdgeToJson, doubleValueToJson, edgeMapToJson, edgePropertyMapToJson,
-  floatValueToJson, mapToJson, toJsonObject, typedValueToJson, valueToJson,
-  vertexPropertyMapToJson, vertexPropertyValueToJson, vertexToJson)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Pg.Graphson.Syntax as GraphsonSyntax
-import qualified Hydra.Sources.Json.Model as JsonModel
-import qualified Hydra.Pg.Graphson.Syntax as G  -- Generated phantom types
-import qualified Hydra.Json.Model as JM         -- Generated JSON types
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.graphson.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = (kernelTypesNamespaces L.++ [GraphsonSyntax.ns, JsonModel.ns]),
-            moduleDescription = Just "Encoding functions for converting GraphSON syntax to JSON."}
-  where
-    definitions = [
-      toDefinition adjacentEdgeToJson,
-      toDefinition doubleValueToJson,
-      toDefinition edgeMapToJson,
-      toDefinition edgePropertyMapToJson,
-      toDefinition floatValueToJson,
-      toDefinition mapToJson,
-      toDefinition toJsonObject,
-      toDefinition typedValueToJson,
-      toDefinition valueToJson,
-      toDefinition vertexPropertyMapToJson,
-      toDefinition vertexPropertyValueToJson,
-      toDefinition vertexToJson]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Type references
-gson :: String -> Type
-gson = Bootstrap.typeref GraphsonSyntax.ns
-
-jsonValue :: Type
-jsonValue = Bootstrap.typeref JsonModel.ns "Value"
-
--- | Convert a DoubleValue to JSON
-doubleValueToJson :: TTermDefinition (G.DoubleValue -> JM.Value)
-doubleValueToJson = define "doubleValueToJson" $
-  doc "Convert a GraphSON DoubleValue to a JSON Value" $
-  match G._DoubleValue Nothing [
-    G._DoubleValue_finite>>: "d" ~> Json.valueNumber (Literals.float64ToDecimal $ var "d"),
-    G._DoubleValue_infinity>>: constant $ Json.valueString (string "Infinity"),
-    G._DoubleValue_negativeInfinity>>: constant $ Json.valueString (string "-Infinity"),
-    G._DoubleValue_notANumber>>: constant $ Json.valueString (string "NaN")]
-
--- | Convert a FloatValue to JSON
-floatValueToJson :: TTermDefinition (G.FloatValue -> JM.Value)
-floatValueToJson = define "floatValueToJson" $
-  doc "Convert a GraphSON FloatValue to a JSON Value" $
-  match G._FloatValue Nothing [
-    G._FloatValue_finite>>: "f" ~> Json.valueNumber (Literals.float32ToDecimal $ var "f"),
-    G._FloatValue_infinity>>: constant $ Json.valueString (string "Infinity"),
-    G._FloatValue_negativeInfinity>>: constant $ Json.valueString (string "-Infinity"),
-    G._FloatValue_notANumber>>: constant $ Json.valueString (string "NaN")]
-
--- | Create a typed JSON object with @type and @value fields
-typedValueToJson :: TTermDefinition (String -> JM.Value -> JM.Value)
-typedValueToJson = define "typedValueToJson" $
-  doc "Create a typed JSON object with @type and @value fields" $
-  "typeName" ~> "valueJson" ~>
-    toJsonObject @@ list [
-      pair (string "@type") (just $ Json.valueString $ var "typeName"),
-      pair (string "@value") (just $ var "valueJson")]
-
--- | Create a JSON object from a list of key-value pairs, filtering out Nothing values
-toJsonObject :: TTermDefinition ([(String, Maybe JM.Value)] -> JM.Value)
-toJsonObject = define "toJsonObject" $
-  doc "Create a JSON object from a list of key-value pairs, filtering out Nothing values" $
-  "pairs" ~>
-    Json.valueObject $ Maps.fromList $ Maybes.cat $ Lists.map
-      ("p" ~> Maybes.map
-        ("v" ~> pair (Pairs.first $ var "p") (var "v"))
-        (Pairs.second $ var "p"))
-      (var "pairs")
-
--- | Convert a GraphSON Map to JSON
-mapToJson :: TTermDefinition (G.Map -> JM.Value)
-mapToJson = define "mapToJson" $
-  doc "Convert a GraphSON Map to a JSON array of alternating keys and values" $
-  "m" ~>
-    Json.valueArray $ Lists.concat $ Lists.map
-      ("vp" ~> list [
-        valueToJson @@ (project G._ValuePair G._ValuePair_first @@ var "vp"),
-        valueToJson @@ (project G._ValuePair G._ValuePair_second @@ var "vp")])
-      (unwrap G._Map @@ var "m")
-
--- | Convert a GraphSON Value to JSON
-valueToJson :: TTermDefinition (G.Value -> JM.Value)
-valueToJson = define "valueToJson" $
-  doc "Convert a GraphSON Value to a JSON Value" $
-  match G._Value Nothing [
-    G._Value_bigDecimal>>: "bd" ~>
-      typedValueToJson @@ string "g:BigDecimal" @@ (Json.valueString $ unwrap G._BigDecimalValue @@ var "bd"),
-    G._Value_bigInteger>>: "i" ~>
-      typedValueToJson @@ string "g:BigInteger" @@ (Json.valueNumber $ Literals.bigintToDecimal $ var "i"),
-    -- Note: binary is represented as base64-encoded string in GraphSON
-    G._Value_binary>>: "b" ~>
-      typedValueToJson @@ string "g:Binary" @@ (Json.valueString $ var "b"),
-    G._Value_boolean>>: "b" ~> Json.valueBoolean (var "b"),
-    G._Value_byte>>: "b" ~>
-      typedValueToJson @@ string "g:Byte" @@ (Json.valueNumber $ Literals.bigintToDecimal $ Literals.uint8ToBigint $ var "b"),
-    G._Value_char>>: "c" ~>
-      typedValueToJson @@ string "g:Char" @@ (Json.valueString $ Strings.fromList $ Lists.pure $ Literals.bigintToInt32 $ Literals.uint32ToBigint $ var "c"),
-    G._Value_composite>>: "ctv" ~>
-      typedValueToJson
-        @@ (unwrap G._TypeName @@ (project G._CompositeTypedValue G._CompositeTypedValue_type @@ var "ctv"))
-        @@ (mapToJson @@ (project G._CompositeTypedValue G._CompositeTypedValue_fields @@ var "ctv")),
-    G._Value_dateTime>>: "dt" ~>
-      typedValueToJson @@ string "g:DateTime" @@ (Json.valueString $ unwrap G._DateTime @@ var "dt"),
-    G._Value_double>>: "dv" ~>
-      typedValueToJson @@ string "g:Double" @@ (doubleValueToJson @@ var "dv"),
-    G._Value_duration>>: "dur" ~>
-      typedValueToJson @@ string "g:Duration" @@ (Json.valueString $ unwrap G._Duration @@ var "dur"),
-    G._Value_float>>: "fv" ~>
-      typedValueToJson @@ string "g:Float" @@ (floatValueToJson @@ var "fv"),
-    G._Value_integer>>: "i" ~>
-      typedValueToJson @@ string "g:Int32" @@ (Json.valueNumber $ Literals.bigintToDecimal $ Literals.int32ToBigint $ var "i"),
-    G._Value_list>>: "vals" ~>
-      typedValueToJson @@ string "g:List" @@ (Json.valueArray $ Lists.map valueToJson $ var "vals"),
-    G._Value_long>>: "l" ~>
-      typedValueToJson @@ string "g:Long" @@ (Json.valueNumber $ Literals.bigintToDecimal $ Literals.int64ToBigint $ var "l"),
-    G._Value_map>>: "m" ~>
-      typedValueToJson @@ string "g:Map" @@ (mapToJson @@ var "m"),
-    G._Value_null>>: constant Json.valueNull,
-    G._Value_primitive>>: "ptv" ~>
-      typedValueToJson @@ string "g:PrimitivePdt" @@ (Json.valueString $ project G._PrimitiveTypedValue G._PrimitiveTypedValue_value @@ var "ptv"),
-    G._Value_set>>: "vals" ~>
-      typedValueToJson @@ string "g:Set" @@ (Json.valueArray $ Lists.map valueToJson $ var "vals"),
-    G._Value_short>>: "i" ~>
-      typedValueToJson @@ string "g:Int16" @@ (Json.valueNumber $ Literals.bigintToDecimal $ Literals.int16ToBigint $ var "i"),
-    G._Value_string>>: "s" ~> Json.valueString (var "s"),
-    G._Value_uuid>>: "u" ~>
-      typedValueToJson @@ string "g:UUID" @@ (Json.valueString $ unwrap G._Uuid @@ var "u")]
-
--- | Convert a VertexPropertyValue to JSON
-vertexPropertyValueToJson :: TTermDefinition (G.VertexPropertyValue -> JM.Value)
-vertexPropertyValueToJson = define "vertexPropertyValueToJson" $
-  doc "Convert a GraphSON VertexPropertyValue to a JSON Value" $
-  "vpv" ~>
-    toJsonObject @@ list [
-      pair (string "id") (Maybes.map valueToJson $ project G._VertexPropertyValue G._VertexPropertyValue_id @@ var "vpv"),
-      pair (string "value") (just $ valueToJson @@ (project G._VertexPropertyValue G._VertexPropertyValue_value @@ var "vpv"))]
-
--- | Convert an AdjacentEdge to JSON
-adjacentEdgeToJson :: TTermDefinition (Bool -> G.AdjacentEdge -> JM.Value)
-adjacentEdgeToJson = define "adjacentEdgeToJson" $
-  doc "Convert a GraphSON AdjacentEdge to a JSON Value. The Bool indicates whether this is an outgoing edge." $
-  "out" ~> "ae" ~>
-    toJsonObject @@ list [
-      pair (string "id") (just $ valueToJson @@ (project G._AdjacentEdge G._AdjacentEdge_id @@ var "ae")),
-      pair (string "inV") (Logic.ifElse (var "out")
-        (just $ valueToJson @@ (project G._AdjacentEdge G._AdjacentEdge_vertexId @@ var "ae"))
-        nothing),
-      pair (string "outV") (Logic.ifElse (var "out")
-        nothing
-        (just $ valueToJson @@ (project G._AdjacentEdge G._AdjacentEdge_vertexId @@ var "ae"))),
-      pair (string "properties") (edgePropertyMapToJson @@ (project G._AdjacentEdge G._AdjacentEdge_properties @@ var "ae"))]
-
--- | Convert edge properties map to JSON
-edgePropertyMapToJson :: TTermDefinition (M.Map G.PropertyKey G.Value -> Maybe JM.Value)
-edgePropertyMapToJson = define "edgePropertyMapToJson" $
-  doc "Convert a map of edge properties to an optional JSON Value" $
-  "m" ~>
-    Logic.ifElse (Maps.null $ var "m")
-      nothing
-      (just $ Json.valueObject $ Maps.fromList $ Lists.map
-        ("p" ~> pair
-          (unwrap G._PropertyKey @@ (Pairs.first $ var "p"))
-          (valueToJson @@ (Pairs.second $ var "p")))
-        (Maps.toList $ var "m"))
-
--- | Convert edge map to JSON
-edgeMapToJson :: TTermDefinition (Bool -> M.Map G.EdgeLabel [G.AdjacentEdge] -> Maybe JM.Value)
-edgeMapToJson = define "edgeMapToJson" $
-  doc "Convert a map of edges by label to an optional JSON Value" $
-  "out" ~> "m" ~>
-    Logic.ifElse (Maps.null $ var "m")
-      nothing
-      (just $ Json.valueObject $ Maps.fromList $ Lists.map
-        ("p" ~> pair
-          (unwrap G._EdgeLabel @@ (Pairs.first $ var "p"))
-          (Json.valueArray $ Lists.map (adjacentEdgeToJson @@ var "out") (Pairs.second $ var "p")))
-        (Maps.toList $ var "m"))
-
--- | Convert vertex properties map to JSON
-vertexPropertyMapToJson :: TTermDefinition (M.Map G.PropertyKey [G.VertexPropertyValue] -> Maybe JM.Value)
-vertexPropertyMapToJson = define "vertexPropertyMapToJson" $
-  doc "Convert a map of vertex properties to an optional JSON Value" $
-  "m" ~>
-    Logic.ifElse (Maps.null $ var "m")
-      nothing
-      (just $ Json.valueObject $ Maps.fromList $ Lists.map
-        ("p" ~> pair
-          (unwrap G._PropertyKey @@ (Pairs.first $ var "p"))
-          (Json.valueArray $ Lists.map vertexPropertyValueToJson (Pairs.second $ var "p")))
-        (Maps.toList $ var "m"))
-
--- | Convert a GraphSON Vertex to JSON
-vertexToJson :: TTermDefinition (G.Vertex -> JM.Value)
-vertexToJson = define "vertexToJson" $
-  doc "Convert a GraphSON Vertex to a JSON Value" $
-  "v" ~>
-    toJsonObject @@ list [
-      pair (string "id") (just $ valueToJson @@ (project G._Vertex G._Vertex_id @@ var "v")),
-      pair (string "label") (Maybes.map
-        ("lbl" ~> Json.valueString $ unwrap G._VertexLabel @@ var "lbl")
-        (project G._Vertex G._Vertex_label @@ var "v")),
-      pair (string "inE") (edgeMapToJson @@ boolean False @@ (project G._Vertex G._Vertex_inEdges @@ var "v")),
-      pair (string "outE") (edgeMapToJson @@ boolean True @@ (project G._Vertex G._Vertex_outEdges @@ var "v")),
-      pair (string "properties") (vertexPropertyMapToJson @@ (project G._Vertex G._Vertex_properties @@ var "v"))]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Graphson/Construct.hs b/src/main/haskell/Hydra/Sources/Pg/Graphson/Construct.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Graphson/Construct.hs
+++ /dev/null
@@ -1,248 +0,0 @@
-module Hydra.Sources.Pg.Graphson.Construct where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  aggregateMap, adjacentEdgeToGraphson, edgePropertyToGraphson,
-  graphsonVertexToJsonCoder, pgVertexWithAdjacentEdgesToGraphsonVertex,
-  pgVertexWithAdjacentEdgesToJson, vertexPropertyToGraphson)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Pg.Graphson.Syntax as GraphsonSyntax
-import qualified Hydra.Sources.Pg.Graphson.Coder as GraphsonCoder
-import qualified Hydra.Sources.Pg.Graphson.Coder as Coder (vertexToJson)
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Json.Model as JsonModel
-import qualified Hydra.Pg.Graphson.Syntax as G  -- Generated phantom types
-import qualified Hydra.Pg.Model as PG            -- Generated PG model types
-import qualified Hydra.Json.Model as JM          -- Generated JSON types
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.graphson.construct"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [GraphsonCoder.ns],
-            moduleTypeDependencies = (kernelTypesNamespaces L.++ [GraphsonSyntax.ns, PgModel.ns, JsonModel.ns]),
-            moduleDescription = Just "Functions for constructing GraphSON vertices from property graph vertices."}
-  where
-    definitions = [
-      toDefinition adjacentEdgeToGraphson,
-      toDefinition aggregateMap,
-      toDefinition edgePropertyToGraphson,
-      toDefinition graphsonVertexToJsonCoder,
-      toDefinition pgVertexWithAdjacentEdgesToGraphsonVertex,
-      toDefinition pgVertexWithAdjacentEdgesToJson,
-      toDefinition vertexPropertyToGraphson]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Type references
-gson :: String -> Type
-gson = Bootstrap.typeref GraphsonSyntax.ns
-
-pg :: String -> Type
-pg = Bootstrap.typeref PgModel.ns
-
-jsonValue :: Type
-jsonValue = Bootstrap.typeref JsonModel.ns "Value"
-
--- | Convert a PG adjacent edge to GraphSON format
-adjacentEdgeToGraphson :: TTermDefinition ((v -> Either Error G.Value) -> PG.AdjacentEdge v -> Either Error (G.EdgeLabel, G.AdjacentEdge))
-adjacentEdgeToGraphson = define "adjacentEdgeToGraphson" $
-  doc "Convert a property graph adjacent edge to a GraphSON adjacent edge" $
-  "encodeValue" ~> "edge" ~>
-    "label" <~ (project PG._AdjacentEdge PG._AdjacentEdge_label @@ var "edge") $
-    "edgeId" <~ (project PG._AdjacentEdge PG._AdjacentEdge_id @@ var "edge") $
-    "vertexId" <~ (project PG._AdjacentEdge PG._AdjacentEdge_vertex @@ var "edge") $
-    "props" <~ (project PG._AdjacentEdge PG._AdjacentEdge_properties @@ var "edge") $
-    Eithers.bind
-      (var "encodeValue" @@ var "edgeId")
-      ("gid" ~>
-        Eithers.bind
-          (var "encodeValue" @@ var "vertexId")
-          ("gv" ~>
-            Eithers.bind
-              (Eithers.mapList (edgePropertyToGraphson @@ var "encodeValue") (Maps.toList $ var "props"))
-              ("propPairs" ~>
-                right $
-                  pair
-                    (wrap G._EdgeLabel (unwrap PG._EdgeLabel @@ var "label"))
-                    (record G._AdjacentEdge [
-                      G._AdjacentEdge_id>>: var "gid",
-                      G._AdjacentEdge_vertexId>>: var "gv",
-                      G._AdjacentEdge_properties>>: Maps.fromList (var "propPairs")]))))
-
--- | Aggregate a list of key-value pairs into a map of lists
-aggregateMap :: TTermDefinition ([(k, v)] -> M.Map k [v])
-aggregateMap = define "aggregateMap" $
-  doc "Aggregate a list of key-value pairs into a map where each key maps to a list of values" $
-  "pairs" ~>
-    Lists.foldl
-      ("m" ~> "p" ~>
-        "k" <~ (Pairs.first $ var "p") $
-        "v" <~ (Pairs.second $ var "p") $
-        "existing" <~ (Maps.lookup (var "k") (var "m")) $
-        Maps.insert (var "k")
-          (Maybes.maybe
-            (Lists.pure $ var "v")
-            ("vs" ~> Lists.cons (var "v") (var "vs"))
-            (var "existing"))
-          (var "m"))
-      Maps.empty
-      (var "pairs")
-
--- | Convert a PG edge property to GraphSON format
-edgePropertyToGraphson :: TTermDefinition ((v -> Either Error G.Value) -> (PG.PropertyKey, v) -> Either Error (G.PropertyKey, G.Value))
-edgePropertyToGraphson = define "edgePropertyToGraphson" $
-  doc "Convert a property graph edge property to a GraphSON property" $
-  "encodeValue" ~> "prop" ~>
-    Eithers.map
-      ("gv" ~>
-        pair
-          (wrap G._PropertyKey (unwrap PG._PropertyKey @@ (Pairs.first $ var "prop")))
-          (var "gv"))
-      (var "encodeValue" @@ (Pairs.second $ var "prop"))
-
--- | A coder that converts GraphSON vertices to JSON
-graphsonVertexToJsonCoder :: TTermDefinition (Coder G.Vertex JM.Value)
-graphsonVertexToJsonCoder = define "graphsonVertexToJsonCoder" $
-  doc "A coder that converts GraphSON vertices to JSON. Decoding is not supported." $
-  Coders.coder
-    ("_cx" ~> "v" ~> right (Coder.vertexToJson @@ var "v"))
-    ("_cx" ~> "_" ~> Ctx.failInContext (Error.errorOther $ Error.otherError $ string "decoding GraphSON JSON is currently unsupported") (var "_cx"))
-
--- | Convert a PG vertex with adjacent edges to a GraphSON vertex
-pgVertexWithAdjacentEdgesToGraphsonVertex :: TTermDefinition ((v -> Either Error G.Value) -> PG.VertexWithAdjacentEdges v -> Either Error G.Vertex)
-pgVertexWithAdjacentEdgesToGraphsonVertex = define "pgVertexWithAdjacentEdgesToGraphsonVertex" $
-  doc "Convert a property graph vertex with adjacent edges to a GraphSON vertex" $
-  "encodeValue" ~> "vae" ~>
-    "vertex" <~ (project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_vertex @@ var "vae") $
-    "ins" <~ (project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_ins @@ var "vae") $
-    "outs" <~ (project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_outs @@ var "vae") $
-    "label" <~ (project PG._Vertex PG._Vertex_label @@ var "vertex") $
-    "vertexId" <~ (project PG._Vertex PG._Vertex_id @@ var "vertex") $
-    "props" <~ (project PG._Vertex PG._Vertex_properties @@ var "vertex") $
-    Eithers.bind
-      (var "encodeValue" @@ var "vertexId")
-      ("gid" ~>
-        Eithers.bind
-          (Eithers.mapList (vertexPropertyToGraphson @@ var "encodeValue") (Maps.toList $ var "props"))
-          ("propPairs" ~>
-            Eithers.bind
-              (Eithers.mapList (adjacentEdgeToGraphson @@ var "encodeValue") (var "ins"))
-              ("inPairs" ~>
-                Eithers.bind
-                  (Eithers.mapList (adjacentEdgeToGraphson @@ var "encodeValue") (var "outs"))
-                  ("outPairs" ~>
-                    right $
-                      record G._Vertex [
-                        G._Vertex_id>>: var "gid",
-                        G._Vertex_label>>: just (wrap G._VertexLabel (unwrap PG._VertexLabel @@ var "label")),
-                        G._Vertex_inEdges>>: aggregateMap @@ var "inPairs",
-                        G._Vertex_outEdges>>: aggregateMap @@ var "outPairs",
-                        G._Vertex_properties>>: aggregateMap @@ var "propPairs"]))))
-
--- | Convert a PG vertex with adjacent edges directly to JSON
-pgVertexWithAdjacentEdgesToJson :: TTermDefinition ((v -> Either Error G.Value) -> PG.VertexWithAdjacentEdges v -> Either Error JM.Value)
-pgVertexWithAdjacentEdgesToJson = define "pgVertexWithAdjacentEdgesToJson" $
-  doc "Convert a property graph vertex with adjacent edges to JSON" $
-  "encodeValue" ~> "vertex" ~>
-    Eithers.bind
-      (pgVertexWithAdjacentEdgesToGraphsonVertex @@ var "encodeValue" @@ var "vertex")
-      ("gVertex" ~>
-        right $ Coder.vertexToJson @@ var "gVertex")
-
--- | Convert a PG vertex property to GraphSON format
-vertexPropertyToGraphson :: TTermDefinition ((v -> Either Error G.Value) -> (PG.PropertyKey, v) -> Either Error (G.PropertyKey, G.VertexPropertyValue))
-vertexPropertyToGraphson = define "vertexPropertyToGraphson" $
-  doc "Convert a property graph vertex property to a GraphSON vertex property" $
-  "encodeValue" ~> "prop" ~>
-    Eithers.map
-      ("gv" ~>
-        pair
-          (wrap G._PropertyKey (unwrap PG._PropertyKey @@ (Pairs.first $ var "prop")))
-          (record G._VertexPropertyValue [
-            G._VertexPropertyValue_id>>: nothing,
-            G._VertexPropertyValue_value>>: var "gv"]))
-      (var "encodeValue" @@ (Pairs.second $ var "prop"))
diff --git a/src/main/haskell/Hydra/Sources/Pg/Graphson/Syntax.hs b/src/main/haskell/Hydra/Sources/Pg/Graphson/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Graphson/Syntax.hs
+++ /dev/null
@@ -1,184 +0,0 @@
-module Hydra.Sources.Pg.Graphson.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.graphson.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-gson :: String -> Type
-gson = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("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.")}
-  where
-    definitions = [
-      bigDecimalValue,
-      compositeTypedValue,
-      dateTime,
-      doubleValue,
-      duration,
-      edgeLabel,
-      floatValue,
-      map_,
-      adjacentEdge,
-      primitiveTypedValue,
-      propertyKey,
-      typeName_,
-      uuid_,
-      value_,
-      valuePair,
-      vertex,
-      vertexLabel,
-      vertexPropertyValue]
-
-bigDecimalValue :: Binding
-bigDecimalValue = define "BigDecimalValue" $
-  T.wrap T.string
-
-compositeTypedValue :: Binding
-compositeTypedValue = define "CompositeTypedValue" $
-  T.record [
-    "type">: gson "TypeName",
-    "fields">: gson "Map"]
-
-dateTime :: Binding
-dateTime = define "DateTime" $
-  T.wrap T.string
-
-doubleValue :: Binding
-doubleValue = define "DoubleValue" $
-  T.union [
-    "finite">: T.float64,
-    "infinity">: T.unit,
-    "negativeInfinity">: T.unit,
-    "notANumber">: T.unit]
-
-duration :: Binding
-duration = define "Duration" $
-  T.wrap T.string
-
-edgeLabel :: Binding
-edgeLabel = define "EdgeLabel" $
-  T.wrap T.string
-
-floatValue :: Binding
-floatValue = define "FloatValue" $
-  T.union [
-    "finite">: T.float32,
-    "infinity">: T.unit,
-    "negativeInfinity">: T.unit,
-    "notANumber">: T.unit]
-
-map_ :: Binding
-map_ = define "Map" $
-  T.wrap $ T.list $ gson "ValuePair"
-
-adjacentEdge :: Binding
-adjacentEdge = define "AdjacentEdge" $
-  T.record [
-    "id">: gson "Value",
-    "vertexId">: gson "Value",
-    "properties">: T.map (gson "PropertyKey") (gson "Value")]
-
-primitiveTypedValue :: Binding
-primitiveTypedValue = define "PrimitiveTypedValue" $
-  T.record [
-    "type">: gson "TypeName",
-    "value">: T.string]
-
-propertyKey :: Binding
-propertyKey = define "PropertyKey" $
-  T.wrap T.string
-
-typeName_ :: Binding
-typeName_ = define "TypeName" $
-  T.wrap T.string
-
-uuid_ :: Binding
-uuid_ = define "Uuid" $
-  T.wrap T.string
-
--- Note: the following are currently unsupported as values:
---   * BulkSet
---   * Direction
---   * Edge
---   * Error Result
---   * Graph
---   * Path
---   * Property
---   * Standard Request
---   * Standard Result
---   * T (enum value)
---   * Tree
---   * Vertex
---   * VertexProperty
-value_ :: Binding
-value_ = define "Value" $
-  T.union [
-    "bigDecimal">: gson "BigDecimalValue",
-    "bigInteger">: T.bigint,
-    "binary">: T.string,  -- Binary data is base64-encoded as a string in GraphSON
-    "boolean">: T.boolean,
-    "byte">: T.uint8,
-    "char">: T.uint32,
-    "composite">: gson "CompositeTypedValue",
-    "dateTime">: gson "DateTime",
-    "double">: gson "DoubleValue",
-    "duration">: gson "Duration",
-    "float">: gson "FloatValue",
-    "integer">: T.int32,
-    "list">: T.list $ gson "Value",
-    "long">: T.int64,
-    "map">: gson "Map",
-    "null">: T.unit,
-    "primitive">: gson "PrimitiveTypedValue",
-    "set">: T.list $ gson "Value",
-    "short">: T.int16,
-    "string">: T.string,
-    "uuid">: gson "Uuid"]
-
-valuePair :: Binding
-valuePair = define "ValuePair" $
-  T.record [
-    "first">: gson "Value",
-    "second">: gson "Value"]
-
-vertex :: Binding
-vertex = define "Vertex" $
-  T.record [
-    "id">: gson "Value",
-    "label">: T.optional $ gson "VertexLabel",
-    "inEdges">: T.map (gson "EdgeLabel") (nonemptyList $ gson "AdjacentEdge"),
-    "outEdges">: T.map (gson "EdgeLabel") (nonemptyList $ gson "AdjacentEdge"),
-    "properties">: T.map (gson "PropertyKey") (nonemptyList $ gson "VertexPropertyValue")]
-
-vertexLabel :: Binding
-vertexLabel = define "VertexLabel" $
-  T.wrap T.string
-
-vertexPropertyValue :: Binding
-vertexPropertyValue = define "VertexPropertyValue" $
-  T.record [
-    "id">: T.optional $ gson "Value",
-    "value">: gson "Value"]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Graphson/Utils.hs b/src/main/haskell/Hydra/Sources/Pg/Graphson/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Graphson/Utils.hs
+++ /dev/null
@@ -1,259 +0,0 @@
-module Hydra.Sources.Pg.Graphson.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  elementsToVerticesWithAdjacentEdges, encodeStringValue, encodeTermValue,
-  pgElementsToGraphson)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Pg.Graphson.Syntax as GraphsonSyntax
-import qualified Hydra.Sources.Pg.Graphson.Construct as GraphsonConstruct
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Json.Model as JsonModel
-import qualified Hydra.Pg.Graphson.Syntax as G  -- Generated phantom types
-import qualified Hydra.Pg.Model as PG            -- Generated PG model types
-import qualified Hydra.Json.Model as JM          -- Generated JSON types
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.graphson.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [GraphsonConstruct.ns, Strip.ns],
-            moduleTypeDependencies = (kernelTypesNamespaces L.++ [GraphsonSyntax.ns, PgModel.ns, JsonModel.ns]),
-            moduleDescription = Just "Utility functions for GraphSON encoding and property graph conversion."}
-  where
-    definitions = [
-      toDefinition elementsToVerticesWithAdjacentEdges,
-      toDefinition encodeStringValue,
-      toDefinition encodeTermValue,
-      toDefinition pgElementsToGraphson]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Type references
-gson :: String -> Type
-gson = Bootstrap.typeref GraphsonSyntax.ns
-
-pg :: String -> Type
-pg = Bootstrap.typeref PgModel.ns
-
-jsonValue :: Type
-jsonValue = Bootstrap.typeref JsonModel.ns "Value"
-
--- | Encode a String value to GraphSON
-encodeStringValue :: TTermDefinition (String -> Either Error G.Value)
-encodeStringValue = define "encodeStringValue" $
-  doc "Encode a String value as a GraphSON Value" $
-  "s" ~>
-    right $ inject G._Value G._Value_string (var "s")
-
--- | Encode a Term value to GraphSON
-encodeTermValue :: TTermDefinition (Term -> Either Error G.Value)
-encodeTermValue = define "encodeTermValue" $
-  doc "Encode a Hydra Term as a GraphSON Value. Supports literals and unit values." $
-  "term" ~>
-    match _Term (Just $ left (Error.errorOther $ Error.otherError (string "unsupported term variant for GraphSON encoding"))) [
-      _Term_literal>>: "lit" ~>
-        match _Literal (Just $ left (Error.errorOther $ Error.otherError (string "unsupported literal type for GraphSON encoding"))) [
-          _Literal_binary>>: "b" ~>
-            right $ inject G._Value G._Value_binary (Literals.binaryToString $ var "b"),
-          _Literal_boolean>>: "b" ~>
-            right $ inject G._Value G._Value_boolean (var "b"),
-          _Literal_float>>: "fv" ~>
-            match _FloatValue (Just $ left (Error.errorOther $ Error.otherError (string "unsupported float type"))) [
-              _FloatValue_bigfloat>>: "f" ~>
-                right $ inject G._Value G._Value_bigDecimal
-                  (wrap G._BigDecimalValue $ Literals.showBigfloat $ var "f"),
-              _FloatValue_float32>>: "f" ~>
-                right $ inject G._Value G._Value_float
-                  (inject G._FloatValue G._FloatValue_finite (var "f")),
-              _FloatValue_float64>>: "f" ~>
-                right $ inject G._Value G._Value_double
-                  (inject G._DoubleValue G._DoubleValue_finite (var "f"))]
-            @@ var "fv",
-          _Literal_integer>>: "iv" ~>
-            match _IntegerValue (Just $ left (Error.errorOther $ Error.otherError (string "unsupported integer type"))) [
-              _IntegerValue_bigint>>: "i" ~>
-                right $ inject G._Value G._Value_bigInteger (var "i"),
-              _IntegerValue_int32>>: "i" ~>
-                right $ inject G._Value G._Value_integer (var "i"),
-              _IntegerValue_int64>>: "i" ~>
-                right $ inject G._Value G._Value_long (var "i")]
-            @@ var "iv",
-          _Literal_string>>: "s" ~>
-            right $ inject G._Value G._Value_string (var "s")]
-        @@ var "lit",
-      _Term_unit>>: constant $
-        right $ injectUnit G._Value G._Value_null]
-    @@ (Strip.deannotateTerm @@ var "term")
-
--- | Convert a list of PG elements to vertices with adjacent edges
-elementsToVerticesWithAdjacentEdges :: TTermDefinition ([PG.Element v] -> [PG.VertexWithAdjacentEdges v])
-elementsToVerticesWithAdjacentEdges = define "elementsToVerticesWithAdjacentEdges" $
-  doc "Convert a list of property graph elements to a list of vertices with their adjacent edges" $
-  "els" ~>
-    -- Partition elements into vertices and edges
-    "partitioned" <~ (Lists.foldl
-      ("acc" ~> "el" ~>
-        match PG._Element Nothing [
-          PG._Element_vertex>>: "v" ~>
-            pair
-              (Lists.cons (var "v") (Pairs.first $ var "acc"))
-              (Pairs.second $ var "acc"),
-          PG._Element_edge>>: "e" ~>
-            pair
-              (Pairs.first $ var "acc")
-              (Lists.cons (var "e") (Pairs.second $ var "acc"))]
-        @@ var "el")
-      (pair (list ([] :: [TTerm (PG.Vertex v)])) (list ([] :: [TTerm (PG.Edge v)])))
-      (var "els")) $
-    -- Note: foldl with cons reverses the list, so we reverse back to preserve input order
-    "vertices" <~ (Lists.reverse $ Pairs.first $ var "partitioned") $
-    "edges" <~ (Lists.reverse $ Pairs.second $ var "partitioned") $
-    -- Build initial vertex map (vertex id -> VertexWithAdjacentEdges with empty edge lists)
-    "vertexMap0" <~ (Maps.fromList $ Lists.map
-      ("v" ~>
-        pair
-          (project PG._Vertex PG._Vertex_id @@ var "v")
-          (record PG._VertexWithAdjacentEdges [
-            PG._VertexWithAdjacentEdges_vertex>>: var "v",
-            PG._VertexWithAdjacentEdges_ins>>: list ([] :: [TTerm (PG.AdjacentEdge v)]),
-            PG._VertexWithAdjacentEdges_outs>>: list ([] :: [TTerm (PG.AdjacentEdge v)])]))
-      (var "vertices")) $
-    -- Add edges to the vertex map
-    "vertexMap1" <~ (Lists.foldl
-      ("vmap" ~> "edge" ~>
-        "label" <~ (project PG._Edge PG._Edge_label @@ var "edge") $
-        "edgeId" <~ (project PG._Edge PG._Edge_id @@ var "edge") $
-        "outV" <~ (project PG._Edge PG._Edge_out @@ var "edge") $
-        "inV" <~ (project PG._Edge PG._Edge_in @@ var "edge") $
-        "props" <~ (project PG._Edge PG._Edge_properties @@ var "edge") $
-        -- Create adjacent edge for out-vertex (points to in-vertex)
-        "adjEdgeOut" <~ (record PG._AdjacentEdge [
-          PG._AdjacentEdge_label>>: var "label",
-          PG._AdjacentEdge_id>>: var "edgeId",
-          PG._AdjacentEdge_vertex>>: var "inV",
-          PG._AdjacentEdge_properties>>: var "props"]) $
-        -- Create adjacent edge for in-vertex (points to out-vertex)
-        "adjEdgeIn" <~ (record PG._AdjacentEdge [
-          PG._AdjacentEdge_label>>: var "label",
-          PG._AdjacentEdge_id>>: var "edgeId",
-          PG._AdjacentEdge_vertex>>: var "outV",
-          PG._AdjacentEdge_properties>>: var "props"]) $
-        -- Add to out-vertex's outs list
-        "vmap1" <~ (Maybes.maybe
-          (var "vmap")
-          ("vae" ~>
-            Maps.insert (var "outV")
-              (record PG._VertexWithAdjacentEdges [
-                PG._VertexWithAdjacentEdges_vertex>>: project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_vertex @@ var "vae",
-                PG._VertexWithAdjacentEdges_ins>>: project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_ins @@ var "vae",
-                PG._VertexWithAdjacentEdges_outs>>: Lists.cons (var "adjEdgeOut") (project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_outs @@ var "vae")])
-              (var "vmap"))
-          (Maps.lookup (var "outV") (var "vmap"))) $
-        -- Add to in-vertex's ins list
-        Maybes.maybe
-          (var "vmap1")
-          ("vae" ~>
-            Maps.insert (var "inV")
-              (record PG._VertexWithAdjacentEdges [
-                PG._VertexWithAdjacentEdges_vertex>>: project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_vertex @@ var "vae",
-                PG._VertexWithAdjacentEdges_ins>>: Lists.cons (var "adjEdgeIn") (project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_ins @@ var "vae"),
-                PG._VertexWithAdjacentEdges_outs>>: project PG._VertexWithAdjacentEdges PG._VertexWithAdjacentEdges_outs @@ var "vae"])
-              (var "vmap1"))
-          (Maps.lookup (var "inV") (var "vmap1")))
-      (var "vertexMap0")
-      (var "edges")) $
-    Maps.elems (var "vertexMap1")
-
--- | Convert PG elements to GraphSON JSON values
-pgElementsToGraphson :: TTermDefinition ((v -> Either Error G.Value) -> [PG.Element v] -> Either Error [JM.Value])
-pgElementsToGraphson = define "pgElementsToGraphson" $
-  doc "Convert property graph elements to a list of GraphSON JSON values" $
-  "encodeValue" ~> "els" ~>
-    Eithers.mapList
-      (GraphsonConstruct.pgVertexWithAdjacentEdgesToJson @@ var "encodeValue")
-      (elementsToVerticesWithAdjacentEdges @@ var "els")
diff --git a/src/main/haskell/Hydra/Sources/Pg/Manifest.hs b/src/main/haskell/Hydra/Sources/Pg/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Manifest.hs
+++ /dev/null
@@ -1,77 +0,0 @@
--- | Package manifest for hydra-pg.
---
--- Owns the property graph DSL sources: the PG model, PG coder, GraphSON,
--- Cypher, GQL, TinkerPop, and Graphviz support. See
--- feature_290_packaging-plan.md, "Sync system redesign / Package manifests".
---
--- Note: Decode/Encode meta-sources under dist/haskell/hydra-pg/ are NOT
--- included here. They are second-generation DSL sources produced by
--- running code generation against hydra-pg's type modules; they are
--- currently imported directly by heads/haskell/Sources/Ext.hs for onward
--- processing.
-
-module Hydra.Sources.Pg.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Cypher.Features as CypherFeatures
-import qualified Hydra.Sources.Cypher.OpenCypher as OpenCypher
-import qualified Hydra.Sources.Error.Pg as ErrorPg
-import qualified Hydra.Sources.Gql.OpenGql as OpenGql
-import qualified Hydra.Sources.Gql.PathAlgebra.Expressions as PathAlgebraExpressions
-import qualified Hydra.Sources.Gql.PathAlgebra.Syntax as PathAlgebraSyntax
-import qualified Hydra.Sources.Graphviz.Coder as GraphvizCoder
-import qualified Hydra.Sources.Graphviz.Dot as GraphvizDot
-import qualified Hydra.Sources.Graphviz.Serde as GraphvizSerde
-import qualified Hydra.Sources.Pg.Coder as PgCoder
-import qualified Hydra.Sources.Pg.Graphson.Coder as GraphsonCoder
-import qualified Hydra.Sources.Pg.Graphson.Construct as GraphsonConstruct
-import qualified Hydra.Sources.Pg.Graphson.Syntax as GraphsonSyntax
-import qualified Hydra.Sources.Pg.Graphson.Utils as GraphsonUtils
-import qualified Hydra.Sources.Pg.Mapping as PgMapping
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Pg.Printing as PgPrinting
-import qualified Hydra.Sources.Pg.Query as PgQuery
-import qualified Hydra.Sources.Pg.Rdf.Environment as PgRdfEnvironment
-import qualified Hydra.Sources.Pg.Rdf.Mappings as PgRdfMappings
-import qualified Hydra.Sources.Pg.TermsToElements as PgTermsToElements
-import qualified Hydra.Sources.Pg.Utils as PgUtils
-import qualified Hydra.Sources.Tinkerpop.Features as TinkerpopFeatures
-import qualified Hydra.Sources.Tinkerpop.Gremlin as Gremlin
-import qualified Hydra.Sources.Tinkerpop.Language as TinkerpopLanguage
-import qualified Hydra.Sources.Validate.Pg as ValidatePg
-
-mainModules :: [Module]
-mainModules = [
-  CypherFeatures.module_,
-  ErrorPg.module_,
-  GraphsonCoder.module_,
-  GraphsonConstruct.module_,
-  GraphsonSyntax.module_,
-  GraphsonUtils.module_,
-  GraphvizCoder.module_,
-  GraphvizDot.module_,
-  GraphvizSerde.module_,
-  Gremlin.module_,
-  OpenCypher.module_,
-  OpenGql.module_,
-  PathAlgebraExpressions.module_,
-  PathAlgebraSyntax.module_,
-  PgCoder.module_,
-  PgMapping.module_,
-  PgModel.module_,
-  PgPrinting.module_,
-  PgQuery.module_,
-  PgRdfEnvironment.module_,
-  PgRdfMappings.module_,
-  PgTermsToElements.module_,
-  PgUtils.module_,
-  TinkerpopFeatures.module_,
-  TinkerpopLanguage.module_,
-  ValidatePg.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Pg/Mapping.hs b/src/main/haskell/Hydra/Sources/Pg/Mapping.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Mapping.hs
+++ /dev/null
@@ -1,152 +0,0 @@
-module Hydra.Sources.Pg.Mapping where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                    ((>:), (@@))
-import qualified Hydra.Dsl.Types                    as T
-import qualified Hydra.Sources.Kernel.Types.Core    as Core
-import qualified Data.List                          as L
-import qualified Data.Map                           as M
-import qualified Data.Set                           as S
-import qualified Data.Maybe                         as Y
-
--- Additional imports
-import qualified Hydra.Sources.Kernel.Types.Coders as Coders
-import qualified Hydra.Sources.Kernel.Types.Util as Util
-import qualified Hydra.Sources.Pg.Model         as PgModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.mapping"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-mappings :: String -> Type
-mappings = typeref ns
-
-compute :: String -> Type
-compute = typeref $ Coders.ns
-
-core :: String -> Type
-core = typeref $ Core.ns
-
-v3 :: String -> Type
-v3 = typeref $ PgModel.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [PgModel.ns, Coders.ns, Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for property graph mapping specifications. See https://github.com/CategoricalData/hydra/wiki/Property-graphs"}
-  where
-    definitions = [
-      annotationSchema,
-      edgeSpec,
-      elementSpec,
-      propertySpec,
-      schema,
-      valueSpec,
-      vertexSpec]
-
-annotationSchema :: Binding
-annotationSchema = define "AnnotationSchema" $
-  doc "Configurable annotation keys for property graph mapping specifications" $
-  T.record [
-    "vertexLabel">: T.string,
-    "edgeLabel">: T.string,
-    "vertexId">: T.string,
-    "edgeId">: T.string,
-    "propertyKey">: T.string,
-    "propertyValue">: T.string,
-    "outVertex">: T.string,
-    "outVertexLabel">: T.string,
-    "inVertex">: T.string,
-    "inVertexLabel">: T.string,
-    "outEdge">: T.string,
-    "outEdgeLabel">: T.string,
-    "inEdge">: T.string,
-    "inEdgeLabel">: T.string,
-    "ignore">: T.string]
-
-edgeSpec :: Binding
-edgeSpec = define "EdgeSpec" $
-  doc "A mapping specification producing edges of a specified label." $
-  T.record [
-    "label">:
-      doc "The label of the target edges, which must conform to the edge type associated with that label." $
-      v3 "EdgeLabel",
-    "id">:
-      doc "A specification of the id of each target edge" $
-      mappings "ValueSpec",
-    "out">:
-      doc "A specification of the out-vertex reference of each target edge" $
-      mappings "ValueSpec",
-    "in">:
-      doc "A specification of the in-vertex reference of each target edge" $
-      mappings "ValueSpec",
-    "properties">:
-      doc "Zero or more property specifications for each target edge" $
-      T.list $ mappings "PropertySpec"]
-
-elementSpec :: Binding
-elementSpec = define "ElementSpec" $
-  doc "Either a vertex specification or an edge specification" $
-  T.union [
-    "vertex">: mappings "VertexSpec",
-    "edge">: mappings "EdgeSpec"]
-
-propertySpec :: Binding
-propertySpec = define "PropertySpec" $
-  doc "A mapping specification producing properties of a specified key, and values of the appropriate type." $
-  T.record [
-    "key">:
-      doc "The key of the target properties" $
-      v3 "PropertyKey",
-    "value">:
-      doc "A specification of the value of each target property, which must conform to the type associated with the property key" $
-      mappings "ValueSpec"]
-
-schema :: Binding
-schema = define "Schema" $
-  doc "A set of mappings which translates between Hydra terms and annotations, and application-specific property graph types" $
-  T.forAlls ["s", "t", "v"] $
-    T.record [
-      "vertexIdTypes">: compute "Coder" @@ core "Type" @@ "t",
-      "vertexIds">: compute "Coder" @@ core "Term" @@ "v",
-      "edgeIdTypes">: compute "Coder" @@ core "Type" @@ "t",
-      "edgeIds">: compute "Coder" @@ core "Term" @@ "v",
-      "propertyTypes">: compute "Coder" @@ core "Type" @@ "t",
-      "propertyValues">: compute "Coder" @@ core "Term" @@ "v",
-      "annotations">: mappings "AnnotationSchema",
-      "defaultVertexId">: "v",
-      "defaultEdgeId">: "v"]
-
-valueSpec :: Binding
-valueSpec = define "ValueSpec" $
-  doc "A mapping specification producing values (usually literal values) whose type is understood in context" $
-  T.union [
-    "value">:
-      doc "A trivial no-op specification which passes the entire value"
-      T.unit,
-    "pattern">:
-      doc "A compact path representing the function, e.g. engine-${engineInfo/model/name}"
-      T.string]
-
-vertexSpec :: Binding
-vertexSpec = define "VertexSpec" $
-  doc "A mapping specification producing vertices of a specified label" $
-  T.record [
-    "label">:
-      doc "The label of the target vertices, which must conform to the vertex type associated with that label." $
-      v3 "VertexLabel",
-    "id">:
-      doc "A specification of the id of each target vertex" $
-      mappings "ValueSpec",
-    "properties">:
-      doc "Zero or more property specifications for each target vertex" $
-      T.list $ mappings "PropertySpec"]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Model.hs b/src/main/haskell/Hydra/Sources/Pg/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Model.hs
+++ /dev/null
@@ -1,266 +0,0 @@
-module Hydra.Sources.Pg.Model where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel                    hiding (edgeType, graphSchema)
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:), (@@))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.model"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pg :: String -> Type
-pg = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("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")}
-  where
-    definitions = [
-      adjacentEdge,
-      direction,
-      edge,
-      edgeLabel,
-      edgeType,
-      element,
-      elementKind,
-      elementTree,
-      elementType,
-      elementTypeTree,
-      graph,
-      graphSchema,
-      label,
-      lazyGraph,
-      property_,
-      propertyKey,
-      propertyType,
-      vertex,
-      vertexLabel,
-      vertexType,
-      vertexWithAdjacentEdges]
-
-adjacentEdge :: Binding
-adjacentEdge = define "AdjacentEdge" $
-  doc "An edge which is adjacent to a given vertex. Only the other endpoint of the edge is provided." $
-  T.forAll "v" $ T.record [
-    "label">:
-      doc "The label of the edge" $
-      pg "EdgeLabel",
-    "id">:
-      doc "The unique identifier of the edge"
-      "v",
-    "vertex">:
-      doc "The id of the other vertex adjacent to the edge"
-      "v",
-    "properties">:
-      doc "A key/value map of edge properties" $
-      T.map (pg "PropertyKey") "v"]
-
-direction :: Binding
-direction = define "Direction" $
-  doc "The direction of an edge or edge pattern" $
-    T.enum ["out", "in", "both", "undirected"]
-
-edge :: Binding
-edge = define "Edge" $
-  doc "An edge" $
-  T.forAll "v" $ T.record [
-    "label">:
-      doc "The label of the edge" $
-      pg "EdgeLabel",
-    "id">:
-      doc "The unique identifier of the edge"
-      "v",
-    "out">:
-      doc "The id of the out-vertex (tail) of the edge"
-      "v",
-    "in">:
-      doc "The id of the in-vertex (head) of the edge"
-      "v",
-    "properties">:
-      doc "A key/value map of edge properties" $
-      T.map (pg "PropertyKey") "v"]
-
-edgeLabel :: Binding
-edgeLabel = define "EdgeLabel" $
-  doc "The label of an edge" $
-  T.wrap T.string
-
-edgeType :: Binding
-edgeType = define "EdgeType" $
-  doc "The type of an edge" $
-  T.forAll "t" $ T.record [
-    "label">:
-      doc "The label of any edge of this edge type" $
-      pg "EdgeLabel",
-    "id">:
-      doc "The type of the id of any edge of this edge type"
-      "t",
-    "out">:
-      doc "The label of the out-vertex (tail) of any edge of this edge type" $
-      pg "VertexLabel",
-    "in">:
-      doc "The label of the in-vertex (head) of any edge of this edge type" $
-      pg "VertexLabel",
-    "properties">:
-      doc "A list of property types. The types are ordered for the sake of applications in which property order is significant." $
-      T.list (pg "PropertyType" @@ "t")]
-
-element :: Binding
-element = define "Element" $
-  doc "Either a vertex or an edge" $
-  T.forAll "v" $ T.union [
-    "vertex">: pg "Vertex" @@ "v",
-    "edge">: pg "Edge" @@ "v"]
-
-elementKind :: Binding
-elementKind = define "ElementKind" $
-  doc "The kind of an element: vertex or edge" $
-  T.enum ["vertex", "edge"]
-
-elementTree :: Binding
-elementTree = define "ElementTree" $
-  doc "An element together with its dependencies in some context" $
-  T.forAll "v" $ T.record [
-    "self">: pg "Element" @@ "v",
-    "dependencies">: T.list $ pg "ElementTree" @@ "v"]
-
-elementType :: Binding
-elementType = define "ElementType" $
-  doc "The type of a vertex or edge" $
-  T.forAll "t" $ T.union [
-    "vertex">: pg "VertexType" @@ "t",
-    "edge">: pg "EdgeType" @@ "t"]
-
-elementTypeTree :: Binding
-elementTypeTree = define "ElementTypeTree" $
-  doc "An element type together with its dependencies in some context" $
-  T.forAll "t" $ T.record [
-    "self">: pg "ElementType" @@ "t",
-    "dependencies">: T.list $ pg "ElementTypeTree" @@ "t"]
-
-graph :: Binding
-graph = define "Graph" $
-  doc "A graph; a self-contained collection of vertices and edges" $
-  T.forAll "v" $ T.record [
-    "vertices">: T.map "v" $ pg "Vertex" @@ "v",
-    "edges">: T.map "v" $ pg "Edge" @@ "v"]
-
-graphSchema :: Binding
-graphSchema = define "GraphSchema" $
-  doc "A graph schema; a vertex and edge types for the vertices and edges of a graph conforming to the schema" $
-  T.forAll "t" $ T.record [
-    "vertices">:
-      doc "A unique vertex type for each vertex label which may occur in a graph" $
-      T.map (pg "VertexLabel") (pg "VertexType" @@ "t"),
-    "edges">:
-      doc "A unique edge type for each edge label which may occur in a graph" $
-      T.map (pg "EdgeLabel") (pg "EdgeType" @@ "t")]
-
-label :: Binding
-label = define "Label" $
-  doc "Either a vertex or edge label" $
-  T.union [
-    "vertex">: pg "VertexLabel",
-    "edge">: pg "EdgeLabel"]
-
-lazyGraph :: Binding
-lazyGraph = define "LazyGraph" $
-  doc ("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.") $
-  T.forAll "v" $ T.record [
-    "vertices">: T.list $ pg "Vertex" @@ "v",
-    "edges">: T.list $ pg "Edge" @@ "v"]
-
-property_ :: Binding
-property_ = define "Property" $
-  doc "A key/value property" $
-  T.forAll "v" $ T.record [
-    "key">:
-      doc "They key of the property" $
-      pg "PropertyKey",
-    "value">:
-      doc "The value of the property"
-      "v"]
-
-propertyKey :: Binding
-propertyKey = define "PropertyKey" $
-  doc "A property key" $
-  T.wrap T.string
-
-propertyType :: Binding
-propertyType = define "PropertyType" $
-  doc "The type of a property" $
-  T.forAll "t" $ T.record [
-    "key">:
-      doc "A property's key" $
-      pg "PropertyKey",
-    "value">:
-      doc "The type of a property's value"
-      "t",
-    "required">:
-      doc "Whether the property is required; values may be omitted from a property map otherwise"
-      T.boolean]
-
-vertex :: Binding
-vertex = define "Vertex" $
-  doc "A vertex" $
-  T.forAll "v" $ T.record [
-    "label">:
-      doc "The label of the vertex" $
-      pg "VertexLabel",
-    "id">:
-      doc "The unique identifier of the vertex"
-      "v",
-    "properties">:
-      doc "A key/value map of vertex properties" $
-      T.map (pg "PropertyKey") "v"]
-
-vertexLabel :: Binding
-vertexLabel = define "VertexLabel" $
-  doc "The label of a vertex. The default (null) vertex is represented by the empty string" $
-  T.wrap $ T.string
-
-vertexType :: Binding
-vertexType = define "VertexType" $
-  doc "The type of a vertex" $
-  T.forAll "t" $ T.record [
-    "label">:
-      doc "The label of any vertex of this vertex type" $
-      pg "VertexLabel",
-    "id">:
-      doc "The type of the id of any vertex of this vertex type"
-      "t",
-    "properties">:
-      doc "A list of property types. The types are ordered for the sake of applications in which property order is significant." $
-      T.list (pg "PropertyType" @@ "t")]
-
-vertexWithAdjacentEdges :: Binding
-vertexWithAdjacentEdges = define "VertexWithAdjacentEdges" $
-  doc "A vertex together with any outgoing and/or incoming edges; a vertex object" $
-  T.forAll "v" $ T.record [
-    "vertex">:
-      doc "The focus vertex" $
-      pg "Vertex" @@ "v",
-    "ins">:
-      doc "An adjacency list of edges in which the focus vertex is the head (in-vertex) of the edge" $
-      T.list (pg "AdjacentEdge" @@ "v"),
-    "outs">:
-      doc "An adjacency list of edges in which the focus vertex is the tail (out-vertex) of the edge" $
-      T.list (pg "AdjacentEdge" @@ "v")]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Printing.hs b/src/main/haskell/Hydra/Sources/Pg/Printing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Printing.hs
+++ /dev/null
@@ -1,173 +0,0 @@
-module Hydra.Sources.Pg.Printing where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  printEdge, printGraph, printLazyGraph, printProperty, printVertex)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Pg.Model as PG
-import qualified Hydra.Sources.Pg.Model as PgModel
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.pg.printing"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = (PgModel.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Printing functions for property graph elements"}
-  where
-    definitions = [
-      toDefinition printEdge,
-      toDefinition printGraph,
-      toDefinition printLazyGraph,
-      toDefinition printProperty,
-      toDefinition printVertex]
-
--- | Print an edge using the provided printer functions
-printEdge :: TTermDefinition ((v -> String) -> PG.Edge v -> String)
-printEdge = define "printEdge" $
-  doc "Print an edge using the provided value printer" $
-  "printValue" ~> "edge" ~> lets [
-    "label">: unwrap PG._EdgeLabel @@ (project PG._Edge PG._Edge_label @@ var "edge"),
-    "id">: var "printValue" @@ (project PG._Edge PG._Edge_id @@ var "edge"),
-    "outId">: var "printValue" @@ (project PG._Edge PG._Edge_out @@ var "edge"),
-    "inId">: var "printValue" @@ (project PG._Edge PG._Edge_in @@ var "edge"),
-    "props">: Strings.intercalate (string ", ") (Lists.map
-      ("p" ~> printProperty @@ var "printValue" @@ (Pairs.first $ var "p") @@ (Pairs.second $ var "p"))
-      (Maps.toList $ project PG._Edge PG._Edge_properties @@ var "edge"))] $
-    Strings.cat $ list [
-      var "id", string ": ",
-      string "(", var "outId", string ")-[:",
-      var "label", string " {",
-      var "props",
-      string "}]->(",
-      var "inId", string ")"]
-
--- | Print a graph using the provided printer functions
-printGraph :: TTermDefinition ((v -> String) -> PG.Graph v -> String)
-printGraph = define "printGraph" $
-  doc "Print a graph using the provided value printer" $
-  "printValue" ~> "graph" ~>
-    printLazyGraph @@ var "printValue" @@
-      (record PG._LazyGraph [
-        PG._LazyGraph_vertices>>: Maps.elems (project PG._Graph PG._Graph_vertices @@ var "graph"),
-        PG._LazyGraph_edges>>: Maps.elems (project PG._Graph PG._Graph_edges @@ var "graph")])
-
--- | Print a lazy graph using the provided printer functions
-printLazyGraph :: TTermDefinition ((v -> String) -> PG.LazyGraph v -> String)
-printLazyGraph = define "printLazyGraph" $
-  doc "Print a lazy graph using the provided value printer" $
-  "printValue" ~> "lg" ~> lets [
-    "vertices">: project PG._LazyGraph PG._LazyGraph_vertices @@ var "lg",
-    "edges">: project PG._LazyGraph PG._LazyGraph_edges @@ var "lg"] $
-    Strings.cat $ list [
-      string "vertices:",
-      Strings.cat (Lists.map ("v" ~> Strings.cat (list [string "\n\t", printVertex @@ var "printValue" @@ var "v"])) (var "vertices")),
-      string "\nedges:",
-      Strings.cat (Lists.map ("e" ~> Strings.cat (list [string "\n\t", printEdge @@ var "printValue" @@ var "e"])) (var "edges"))]
-
--- | Print a property using the provided printer functions
-printProperty :: TTermDefinition ((v -> String) -> PG.PropertyKey -> v -> String)
-printProperty = define "printProperty" $
-  doc "Print a property using the provided value printer" $
-  "printValue" ~> "key" ~> "value" ~>
-    Strings.cat $ list [
-      unwrap PG._PropertyKey @@ var "key",
-      string ": ",
-      var "printValue" @@ var "value"]
-
--- | Print a vertex using the provided printer functions
-printVertex :: TTermDefinition ((v -> String) -> PG.Vertex v -> String)
-printVertex = define "printVertex" $
-  doc "Print a vertex using the provided value printer" $
-  "printValue" ~> "vertex" ~> lets [
-    "label">: unwrap PG._VertexLabel @@ (project PG._Vertex PG._Vertex_label @@ var "vertex"),
-    "id">: var "printValue" @@ (project PG._Vertex PG._Vertex_id @@ var "vertex"),
-    "props">: Strings.intercalate (string ", ") (Lists.map
-      ("p" ~> printProperty @@ var "printValue" @@ (Pairs.first $ var "p") @@ (Pairs.second $ var "p"))
-      (Maps.toList $ project PG._Vertex PG._Vertex_properties @@ var "vertex"))] $
-    Strings.cat $ list [
-      var "id", string ": (", var "label", string ": {",
-      var "props",
-      string "})"]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Query.hs b/src/main/haskell/Hydra/Sources/Pg/Query.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Query.hs
+++ /dev/null
@@ -1,208 +0,0 @@
-module Hydra.Sources.Pg.Query where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Pg.Model      as PgModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.query"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pg :: String -> Type
-pg = typeref $ PgModel.ns
-
-q :: String -> Type
-q = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [PgModel.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A common model for pattern-matching queries over property graphs")}
-  where
-    definitions = [
-      aggregationQuery,
-      applicationQuery,
-      associativeExpression,
-      binaryExpression,
-      binaryBooleanOperator,
-      binaryOperator,
-      binding,
-      comparisonOperator,
-      edgeProjectionPattern,
-      expression,
-      letQuery,
-      matchQuery,
-      projection,
-      projections,
-      propertyPattern,
-      propertyProjection,
-      propertyValue,
-      propertyValuePattern,
-      query,
-      selectQuery,
-      unaryExpression,
-      unaryOperator,
-      variable,
-      vertexPattern]
-
-aggregationQuery :: Binding
-aggregationQuery = define "AggregationQuery" $
-  T.union [
-    "count">: T.unit]
-
-applicationQuery :: Binding
-applicationQuery = define "ApplicationQuery" $
-  T.wrap $ nonemptyList $ q "Query"
-
-associativeExpression :: Binding
-associativeExpression = define "AssociativeExpression" $
-  T.record [
-    "operator">: q "BinaryOperator",
-    "operands">: nonemptyList $ q "Expression"]
-
-binaryExpression :: Binding
-binaryExpression = define "BinaryExpression" $
-  T.record [
-    "left">: q "Expression",
-    "operator">: q "BinaryOperator",
-    "right">: q "Expression"]
-
-binaryBooleanOperator :: Binding
-binaryBooleanOperator = define "BinaryBooleanOperator" $
-  T.enum ["and", "or", "xor"]
-
-binaryOperator :: Binding
-binaryOperator = define "BinaryOperator" $
-  T.union [
-    "boolean">: q "BinaryBooleanOperator",
-    "comparison">: q "ComparisonOperator",
-    "power">: T.unit]
-
-binding :: Binding
-binding = define "Binding" $
-  T.record [
-    "key">: q "Variable",
-    "value">: q "Query"]
-
-comparisonOperator :: Binding
-comparisonOperator = define "ComparisonOperator" $
-  T.enum ["eq", "neq", "lt", "lte", "gt", "gte"]
-
-edgeProjectionPattern :: Binding
-edgeProjectionPattern = define "EdgeProjectionPattern" $
-  T.record [
-    "direction">: pg "Direction",
-    "label">: T.maybe $ pg "EdgeLabel",
-    "properties">: T.list $ q "PropertyPattern",
-    "vertex">: T.maybe $ q "VertexPattern"]
-
-expression :: Binding
-expression = define "Expression" $
-  T.union [
-    "associative">: q "AssociativeExpression",
-    "binary">: q "BinaryExpression",
-    "property">: q "PropertyProjection",
-    "unary">: q "UnaryExpression",
-    "variable">: q "Variable",
-    "vertex">: q "VertexPattern"]
-
-letQuery :: Binding
-letQuery = define "LetQuery" $
-  T.record [
-    "bindings">: T.list $ q "Binding",
-    "environment">: q "Query"]
-
-matchQuery :: Binding
-matchQuery = define "MatchQuery" $
-  T.record [
-    "optional">: T.boolean,
-    "pattern">: T.list $ q "Projection",
-    "where">: T.maybe $ q "Expression"]
-
-projection :: Binding
-projection = define "Projection" $
-  T.record [
-    "value">: q "Expression",
-    "as">: T.maybe $ q "Variable"]
-
-projections :: Binding
-projections = define "Projections" $
-  T.record [
-    "all">: T.boolean,
-    "explicit">: T.list $ q "Projection"]
-
-propertyPattern :: Binding
-propertyPattern = define "PropertyPattern" $
-  T.record [
-    "key">: pg "PropertyKey",
-    "value">: q "PropertyValuePattern"]
-
-propertyProjection :: Binding
-propertyProjection = define "PropertyProjection" $
-  T.record [
-    "base">: q "Expression",
-    "key">: pg "PropertyKey"]
-
--- TODO: temporary
-propertyValue :: Binding
-propertyValue = define "PropertyValue" $ T.wrap T.string
-
-propertyValuePattern :: Binding
-propertyValuePattern = define "PropertyValuePattern" $
-  T.union [
-    "variable">: pg "PropertyKey",
-    "value">: T.string] -- TODO: re-use pg property value parameter
-
-query :: Binding
-query = define "Query" $
-  T.union [
-    "application">: q "ApplicationQuery",
-    "aggregate">: q "AggregationQuery",
-    "LetQuery">: q "LetQuery",
-    "match">: q "MatchQuery",
-    "select">: q "SelectQuery",
-    "value">: T.string]
-
-selectQuery :: Binding
-selectQuery = define "SelectQuery" $
-  T.record [
-    "distinct">: T.boolean,
-    "projection">: q "Projections"]
-
-unaryExpression :: Binding
-unaryExpression = define "UnaryExpression" $
-  T.record [
-    "operator">: q "UnaryOperator",
-    "operand">: q "Expression"]
-
-unaryOperator :: Binding
-unaryOperator = define "UnaryOperator" $
-  T.enum ["negate"]
-
-variable :: Binding
-variable = define "Variable" $ T.wrap T.string
-
-vertexPattern :: Binding
-vertexPattern = define "VertexPattern" $
-  T.record [
-    "variable">: T.maybe $ q "Variable",
-    "label">: T.maybe $ pg "VertexLabel",
-    "properties">: T.list $ q "PropertyPattern",
-    "edges">: T.list $ q "EdgeProjectionPattern"]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Rdf/Environment.hs b/src/main/haskell/Hydra/Sources/Pg/Rdf/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Rdf/Environment.hs
+++ /dev/null
@@ -1,74 +0,0 @@
--- | Environment types for property graph to RDF mapping.
-
-module Hydra.Sources.Pg.Rdf.Environment where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Rdf.Syntax    as RdfSyntax
-import qualified Hydra.Sources.Pg.Model      as PgModel
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.rdf.environment"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-env :: String -> Type
-env = typeref ns
-
-rdf :: String -> Type
-rdf = typeref RdfSyntax.ns
-
-pg :: String -> Type
-pg = typeref PgModel.ns
-
-core :: String -> Type
-core = typeref Core.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [RdfSyntax.ns, PgModel.ns, Core.ns],
-            moduleDescription = Just "Environment types for property graph to RDF mapping"}
-  where
-    definitions = [
-      pgRdfEnvironment]
-
--- | The environment for property graph to RDF mapping, providing configurable
--- functions for encoding property graph labels, keys, ids, and values as RDF terms.
-pgRdfEnvironment :: Binding
-pgRdfEnvironment = define "PgRdfEnvironment" $
-  doc "The environment for property graph to RDF mapping" $
-  T.forAlls ["v"] $ T.record [
-    "encodeVertexId">:
-      doc "A function which encodes a vertex id as an RDF IRI" $
-      T.function "v" (rdf "Iri"),
-    "encodeVertexLabel">:
-      doc "A function which encodes a vertex label as an RDF IRI" $
-      T.function (pg "VertexLabel") (rdf "Iri"),
-    "encodeEdgeId">:
-      doc "A function which encodes an edge id as an RDF IRI" $
-      T.function "v" (rdf "Iri"),
-    "encodeEdgeLabel">:
-      doc "A function which encodes an edge label as an RDF IRI" $
-      T.function (pg "EdgeLabel") (rdf "Iri"),
-    "encodePropertyKey">:
-      doc "A function which encodes a property key as an RDF IRI" $
-      T.function (pg "PropertyKey") (rdf "Iri"),
-    "encodePropertyValue">:
-      doc "A function which encodes a property value as an RDF literal" $
-      T.function "v" (rdf "Literal")]
diff --git a/src/main/haskell/Hydra/Sources/Pg/Rdf/Mappings.hs b/src/main/haskell/Hydra/Sources/Pg/Rdf/Mappings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Rdf/Mappings.hs
+++ /dev/null
@@ -1,352 +0,0 @@
--- | Term-level definitions for property graph to RDF/SHACL mapping.
--- Includes both instance-level (PG data → RDF triples) and schema-level
--- (GraphSchema → SHACL ShapesGraph) mappings.
-
-module Hydra.Sources.Pg.Rdf.Mappings where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import           Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Sources.Pg.Model                as PgModel
-import qualified Hydra.Sources.Pg.Rdf.Environment      as PgRdfEnvironment
-import qualified Hydra.Sources.Rdf.Syntax              as RdfSyntax
-import qualified Hydra.Sources.Rdf.Utils               as RdfUtils
-import qualified Hydra.Sources.Shacl.Model             as ShaclModel
-import qualified Hydra.Pg.Model                            as PG       -- Generated PG types
-import qualified Hydra.Rdf.Syntax               as Rdf      -- Generated RDF types
-import qualified Hydra.Shacl.Model              as Shacl    -- Generated SHACL types
-import qualified Hydra.Dsl.Pg.Model                        as PgDsl    -- Generated PG DSL
-import qualified Hydra.Dsl.Shacl.Model         as ShaclDsl -- Generated SHACL DSL
-import qualified Hydra.Dsl.Rdf.Syntax          as RdfDsl   -- Generated RDF DSL
-
-
-ns :: Namespace
-ns = Namespace "hydra.pg.rdf.mappings"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [RdfUtils.ns],
-            moduleTypeDependencies = (kernelTypesNamespaces L.++ [PgModel.ns, PgRdfEnvironment.ns, RdfSyntax.ns, ShaclModel.ns]),
-            moduleDescription = Just "Mappings from property graph schemas to SHACL shapes graphs, and from property graph data to RDF graphs"}
-  where
-    definitions = [
-      toDefinition edgeTypesToPropertyShapes,
-      toDefinition encodeEdge,
-      toDefinition encodeLazyGraph,
-      toDefinition encodeVertex,
-      toDefinition graphSchemaToShapesGraph,
-      toDefinition propertyTypeToPropertyShape,
-      toDefinition vertexTypeToNodeShape]
-
-
--- PgRdfEnvironment field accessors (not yet code-generated)
-_PgRdfEnvironment :: Name
-_PgRdfEnvironment = Name "hydra.pg.rdf.environment.PgRdfEnvironment"
-
-envEncodeVertexId :: TTerm a -> TTerm b
-envEncodeVertexId env = project _PgRdfEnvironment (Name "encodeVertexId") @@ env
-
-envEncodeVertexLabel :: TTerm a -> TTerm b
-envEncodeVertexLabel env = project _PgRdfEnvironment (Name "encodeVertexLabel") @@ env
-
-envEncodeEdgeLabel :: TTerm a -> TTerm b
-envEncodeEdgeLabel env = project _PgRdfEnvironment (Name "encodeEdgeLabel") @@ env
-
-envEncodePropertyKey :: TTerm a -> TTerm b
-envEncodePropertyKey env = project _PgRdfEnvironment (Name "encodePropertyKey") @@ env
-
-envEncodePropertyValue :: TTerm a -> TTerm b
-envEncodePropertyValue env = project _PgRdfEnvironment (Name "encodePropertyValue") @@ env
-
-
--- | Convert a list of edge types into property shape constraints for a given vertex type.
--- For each edge type whose out-vertex label matches the vertex label, produces a
--- CommonConstraint.property entry with sh:path set to the edge label IRI and
--- sh:class set to the in-vertex's class IRI.
-edgeTypesToPropertyShapes
-  :: TTermDefinition ((PG.VertexLabel -> Rdf.Iri) -> (PG.EdgeLabel -> Rdf.Iri) -> PG.VertexLabel
-    -> [PG.EdgeType t] -> [Shacl.CommonConstraint])
-edgeTypesToPropertyShapes = define "edgeTypesToPropertyShapes" $
-  doc "Convert edge types into property shape constraints for a given vertex label" $
-  lambda "encodeVertexLabel" $ lambda "encodeEdgeLabel" $ lambda "vertexLabel" $ lambda "edgeTypes" $
-    Lists.concat (Lists.map
-      (lambda "et" $
-        lets [
-          "outLabel">: PgDsl.edgeTypeOut (var "et"),
-          "matchesVertex">: Equality.equal
-            (unwrap PG._VertexLabel @@ var "outLabel")
-            (unwrap PG._VertexLabel @@ var "vertexLabel")
-        ] $
-        lets [
-          "edgeShape">: ShaclDsl.commonConstraintProperty (Sets.singleton
-            (ShaclDsl.referenceAnonymous (simplePropertyShape
-              (emptyCommonWith
-                (Sets.singleton (ShaclDsl.commonConstraintClass
-                  (Sets.singleton (RdfDsl.rdfsClass unit))))
-                Sets.empty)
-              Sets.empty
-              (var "encodeEdgeLabel" @@ PgDsl.edgeTypeLabel (var "et")))))
-        ] $
-        Logic.ifElse (var "matchesVertex")
-          (list [var "edgeShape"])
-          (TTerm (TermList []) :: TTerm [Shacl.CommonConstraint]))
-      (var "edgeTypes"))
-
--- | Encode a property graph edge as an RDF description.
--- The out-vertex becomes the subject, the edge label becomes the predicate,
--- and the in-vertex becomes the object. Edge id and properties are discarded.
-encodeEdge :: TTermDefinition (env -> PG.Edge v -> Rdf.Description)
-encodeEdge = define "encodeEdge" $
-  doc "Encode a property graph edge as an RDF description" $
-  lambda "env" $ lambda "edge" $
-    lets [
-      "elab">: PgDsl.edgeLabel (var "edge"),
-      "eout">: PgDsl.edgeOut (var "edge"),
-      "ein">: PgDsl.edgeIn (var "edge"),
-      "subj">: RdfDsl.resourceIri (envEncodeVertexId (var "env") @@ var "eout"),
-      "obj">: RdfDsl.nodeIri (envEncodeVertexId (var "env") @@ var "ein"),
-      "pred">: envEncodeEdgeLabel (var "env") @@ var "elab"
-    ] $
-    RdfDsl.description
-      (asTerm RdfUtils.resourceToNode @@ var "subj")
-      (RdfDsl.graph (Sets.singleton (RdfDsl.triple (var "subj") (var "pred") (var "obj"))))
-
--- | Encode an entire lazy property graph as an RDF graph.
--- Encodes all vertices and edges as descriptions, then merges them into a single graph.
-encodeLazyGraph :: TTermDefinition (env -> PG.LazyGraph v -> Rdf.Graph)
-encodeLazyGraph = define "encodeLazyGraph" $
-  doc "Encode a lazy property graph as an RDF graph" $
-  lambda "env" $ lambda "lg" $
-    lets [
-      "vertexDescs">: Lists.map (encodeVertex @@ var "env") (PgDsl.lazyGraphVertices (var "lg")),
-      "edgeDescs">: Lists.map (encodeEdge @@ var "env") (PgDsl.lazyGraphEdges (var "lg")),
-      "allDescs">: Lists.concat (list [var "vertexDescs", var "edgeDescs"])
-    ] $
-    asTerm RdfUtils.descriptionsToGraph @@ var "allDescs"
-
--- | Encode a property graph vertex as an RDF description.
--- The vertex id becomes the subject IRI, the vertex label becomes an rdf:type triple,
--- and each property becomes a triple with the property key as predicate and value as object.
-encodeVertex :: TTermDefinition (env -> PG.Vertex v -> Rdf.Description)
-encodeVertex = define "encodeVertex" $
-  doc "Encode a property graph vertex as an RDF description" $
-  lambda "env" $ lambda "vertex" $
-    lets [
-      "vlab">: PgDsl.vertexLabel (var "vertex"),
-      "vid">: PgDsl.vertexId (var "vertex"),
-      "vprops">: PgDsl.vertexProperties (var "vertex"),
-      "subj">: RdfDsl.resourceIri (envEncodeVertexId (var "env") @@ var "vid"),
-      "rtype">: RdfDsl.nodeIri (envEncodeVertexLabel (var "env") @@ var "vlab"),
-      "typeTriple">: RdfDsl.triple (var "subj") (asTerm RdfUtils.rdfIri @@ string "type") (var "rtype"),
-      "propTriples">: Lists.map
-        (lambda "kv" $
-          lets [
-            "key">: Pairs.first (var "kv"),
-            "val">: Pairs.second (var "kv"),
-            "pred">: envEncodePropertyKey (var "env") @@ var "key",
-            "obj">: RdfDsl.nodeLiteral (envEncodePropertyValue (var "env") @@ var "val")
-          ] $
-          RdfDsl.triple (var "subj") (var "pred") (var "obj"))
-        (Maps.toList (var "vprops")),
-      "allTriples">: Lists.cons (var "typeTriple") (var "propTriples")
-    ] $
-    RdfDsl.description
-      (asTerm RdfUtils.resourceToNode @@ var "subj")
-      (RdfDsl.graph (Sets.fromList (var "allTriples")))
-
--- | Convert a GraphSchema to a SHACL ShapesGraph.
--- Each VertexType becomes a NodeShape definition with property shapes from
--- both the vertex's property types and outgoing edge types.
-graphSchemaToShapesGraph
-  :: TTermDefinition ((t -> Rdf.Iri) -> (PG.VertexLabel -> Rdf.Iri) -> (PG.EdgeLabel -> Rdf.Iri)
-    -> (PG.PropertyKey -> Rdf.Iri) -> PG.GraphSchema t -> Shacl.ShapesGraph)
-graphSchemaToShapesGraph = define "graphSchemaToShapesGraph" $
-  doc "Convert a property graph schema to a SHACL shapes graph" $
-  lambda "encodeType" $ lambda "encodeVertexLabel" $ lambda "encodeEdgeLabel"
-    $ lambda "encodeKey" $ lambda "schema" $
-    lets [
-      "vertexTypes">: Maps.elems (PgDsl.graphSchemaVertices (var "schema")),
-      "edgeTypes">: Maps.elems (PgDsl.graphSchemaEdges (var "schema")),
-      "defs">: Lists.map
-        (lambda "vt" $
-          lets [
-            "baseDef">: vertexTypeToNodeShape
-              @@ var "encodeType" @@ var "encodeVertexLabel" @@ var "encodeKey" @@ var "vt",
-            "edgeShapes">: edgeTypesToPropertyShapes
-              @@ var "encodeVertexLabel" @@ var "encodeEdgeLabel"
-              @@ PgDsl.vertexTypeLabel (var "vt") @@ var "edgeTypes",
-            "baseShape">: ShaclDsl.definitionTarget (var "baseDef"),
-            "baseNode">:
-              cases Shacl._Shape (var "baseShape") Nothing [
-                Shacl._Shape_node>>: lambda "ns" $ var "ns",
-                Shacl._Shape_property>>: lambda "_" $
-                  ShaclDsl.nodeShape (emptyCommonWith Sets.empty Sets.empty)],
-            "baseCommon">: ShaclDsl.nodeShapeCommon (var "baseNode"),
-            "mergedConstraints">: Sets.union
-              (ShaclDsl.commonPropertiesConstraints (var "baseCommon"))
-              (Sets.fromList (var "edgeShapes")),
-            "updatedCommon">: ShaclDsl.commonPropertiesWithConstraints
-              (var "baseCommon") (var "mergedConstraints"),
-            "updatedShape">: ShaclDsl.shapeNode (ShaclDsl.nodeShape (var "updatedCommon"))
-          ] $
-          ShaclDsl.definitionWithTarget (var "baseDef") (var "updatedShape"))
-        (var "vertexTypes")
-    ] $
-    ShaclDsl.shapesGraph (Sets.fromList (var "defs"))
-
--- | A helper for creating empty SHACL common properties with only constraints specified.
-emptyCommonWith :: TTerm (S.Set Shacl.CommonConstraint) -> TTerm (S.Set Rdf.RdfsClass) -> TTerm Shacl.CommonProperties
-emptyCommonWith constraints targetClasses = ShaclDsl.commonProperties
-  constraints                               -- constraints
-  nothing                                   -- deactivated
-  (asTerm RdfUtils.emptyLangStrings)        -- message
-  ShaclDsl.severityViolation                -- severity
-  targetClasses                             -- targetClass
-  Sets.empty                                -- targetNode
-  Sets.empty                                -- targetObjectsOf
-  Sets.empty                                -- targetSubjectsOf
-
--- | A helper for creating a SHACL property shape with minimal fields.
-simplePropertyShape :: TTerm Shacl.CommonProperties -> TTerm (S.Set Shacl.PropertyShapeConstraint)
-  -> TTerm Rdf.Iri -> TTerm Shacl.PropertyShape
-simplePropertyShape common constraints path = ShaclDsl.propertyShape
-  common                                    -- common
-  constraints                               -- constraints
-  nothing                                   -- defaultValue
-  (asTerm RdfUtils.emptyLangStrings)        -- description
-  (asTerm RdfUtils.emptyLangStrings)        -- name
-  nothing                                   -- order
-  path                                      -- path
-
--- | Convert a PropertyType to a SHACL PropertyShape.
--- The property key becomes the sh:path, and the type becomes a sh:datatype constraint.
--- If the property is required, sh:minCount is set to 1.
-propertyTypeToPropertyShape
-  :: TTermDefinition ((t -> Rdf.Iri) -> (PG.PropertyKey -> Rdf.Iri) -> PG.PropertyType t -> Shacl.PropertyShape)
-propertyTypeToPropertyShape = define "propertyTypeToPropertyShape" $
-  doc "Convert a property type to a SHACL property shape" $
-  lambda "encodeType" $ lambda "encodeKey" $ lambda "pt" $
-    lets [
-      "key">: PgDsl.propertyTypeKey (var "pt"),
-      "path">: var "encodeKey" @@ var "key",
-      "required_">: PgDsl.propertyTypeRequired (var "pt"),
-      "dtIri">: var "encodeType" @@ PgDsl.propertyTypeValue (var "pt"),
-      "constraints">: Sets.singleton (ShaclDsl.commonConstraintDatatype (var "dtIri")),
-      "propConstraints">:
-        Logic.ifElse (var "required_")
-          (Sets.singleton (ShaclDsl.propertyShapeConstraintMinCount (bigint 1)))
-          Sets.empty
-    ] $
-    simplePropertyShape
-      (emptyCommonWith (var "constraints") Sets.empty)
-      (var "propConstraints")
-      (var "path")
-
--- | Convert a VertexType to a SHACL Definition<Shape>, producing a NodeShape
--- with sh:targetClass set to the vertex label IRI, and property shapes for
--- each property type in the vertex type.
-vertexTypeToNodeShape
-  :: TTermDefinition ((t -> Rdf.Iri) -> (PG.VertexLabel -> Rdf.Iri) -> (PG.PropertyKey -> Rdf.Iri)
-    -> PG.VertexType t -> Shacl.Definition Shacl.Shape)
-vertexTypeToNodeShape = define "vertexTypeToNodeShape" $
-  doc "Convert a vertex type to a SHACL node shape definition" $
-  lambda "encodeType" $ lambda "encodeLabel" $ lambda "encodeKey" $ lambda "vt" $
-    lets [
-      "label">: PgDsl.vertexTypeLabel (var "vt"),
-      "labelIri">: var "encodeLabel" @@ var "label",
-      "propTypes">: PgDsl.vertexTypeProperties (var "vt"),
-      "propShapes">: Lists.map
-        (lambda "pt" $
-          ShaclDsl.commonConstraintProperty (Sets.singleton
-            (ShaclDsl.referenceAnonymous
-              (propertyTypeToPropertyShape
-                @@ var "encodeType" @@ var "encodeKey" @@ var "pt"))))
-        (var "propTypes"),
-      "common">: emptyCommonWith
-        (Sets.fromList (var "propShapes"))
-        (Sets.singleton (RdfDsl.rdfsClass unit))
-    ] $
-    ShaclDsl.definition
-      (var "labelIri")
-      (ShaclDsl.shapeNode (ShaclDsl.nodeShape (var "common")))
diff --git a/src/main/haskell/Hydra/Sources/Pg/TermsToElements.hs b/src/main/haskell/Hydra/Sources/Pg/TermsToElements.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/TermsToElements.hs
+++ /dev/null
@@ -1,556 +0,0 @@
-module Hydra.Sources.Pg.TermsToElements where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  applyPattern, decodeEdgeLabel, decodeEdgeSpec, decodeElementSpec,
-  decodePropertyKey, decodePropertySpec, decodeValueSpec, decodeVertexLabel,
-  decodeVertexSpec, evalPath, evalStep, expectList, parseEdgeIdPattern,
-  parseEdgeSpec, parseElementSpec, parsePattern, parsePropertySpec,
-  parseValueSpec, parseVertexIdPattern, parseVertexSpec, readField,
-  readInjection, readRecord, requireUnique, termToElementsAdapter,
-  termToString)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Resolution    as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Pg.Model as PG
-import qualified Hydra.Pg.Mapping as PGM
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Pg.Mapping as PgMapping
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.pg.termsToElements"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, ExtractCore.ns, Strip.ns, Resolution.ns, ShowCore.ns],
-            moduleTypeDependencies = (PgModel.ns:PgMapping.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Functions for mapping Hydra terms to property graph elements using mapping specifications"}
-  where
-    definitions = [
-      toDefinition applyPattern,
-      toDefinition decodeEdgeLabel,
-      toDefinition decodeEdgeSpec,
-      toDefinition decodeElementSpec,
-      toDefinition decodePropertyKey,
-      toDefinition decodePropertySpec,
-      toDefinition decodeValueSpec,
-      toDefinition decodeVertexLabel,
-      toDefinition decodeVertexSpec,
-      toDefinition evalPath,
-      toDefinition evalStep,
-      toDefinition expectList,
-      toDefinition parseEdgeIdPattern,
-      toDefinition parseEdgeSpec,
-      toDefinition parseElementSpec,
-      toDefinition parsePattern,
-      toDefinition parsePropertySpec,
-      toDefinition parseValueSpec,
-      toDefinition parseVertexIdPattern,
-      toDefinition parseVertexSpec,
-      toDefinition readField,
-      toDefinition readInjection,
-      toDefinition readRecord,
-      toDefinition requireUnique,
-      toDefinition termToElementsAdapter,
-      toDefinition termToString]
-
--- | Decode an edge label from a term
-decodeEdgeLabel :: TTermDefinition (Context -> Graph -> Term -> Either Error PG.EdgeLabel)
-decodeEdgeLabel = define "decodeEdgeLabel" $
-  doc "Decode an edge label from a term" $
-  "cx" ~> "g" ~> "t" ~>
-    Eithers.map ("_x" ~> wrap PG._EdgeLabel (var "_x")) (ExtractCore.string @@ var "g" @@ var "t")
-
--- | Decode an edge specification from a term
-decodeEdgeSpec :: TTermDefinition (Context -> Graph -> Term -> Either Error PGM.EdgeSpec)
-decodeEdgeSpec = define "decodeEdgeSpec" $
-  doc "Decode an edge specification from a term" $
-  "cx" ~> "g" ~> "term" ~>
-    (readRecord @@ var "cx" @@ var "g"
-      @@ ("fields" ~>
-        Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "label") @@ (decodeEdgeLabel @@ var "cx" @@ var "g"))
-          ("_a" ~> Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "id") @@ (decodeValueSpec @@ var "cx" @@ var "g"))
-            ("_b" ~> Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "out") @@ (decodeValueSpec @@ var "cx" @@ var "g"))
-              ("_c" ~> Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "in") @@ (decodeValueSpec @@ var "cx" @@ var "g"))
-                ("_d" ~> Eithers.map
-                  ("_e" ~> record PGM._EdgeSpec [
-                    PGM._EdgeSpec_label>>: var "_a",
-                    PGM._EdgeSpec_id>>: var "_b",
-                    PGM._EdgeSpec_out>>: var "_c",
-                    PGM._EdgeSpec_in>>: var "_d",
-                    PGM._EdgeSpec_properties>>: var "_e"])
-                  (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "properties")
-                    @@ (expectList @@ var "cx" @@ var "g" @@ decodePropertySpec)))))))
-      @@ var "term")
-
--- | Decode an element specification from a term
-decodeElementSpec :: TTermDefinition (Context -> Graph -> Term -> Either Error PGM.ElementSpec)
-decodeElementSpec = define "decodeElementSpec" $
-  doc "Decode an element specification from a term" $
-  "cx" ~> "g" ~> "term" ~>
-    readInjection @@ var "cx" @@ var "g"
-      @@ list [
-        pair (Core.name $ string "vertex") ("t" ~> Eithers.map ("_x" ~> inject PGM._ElementSpec PGM._ElementSpec_vertex (var "_x")) (decodeVertexSpec @@ var "cx" @@ var "g" @@ var "t")),
-        pair (Core.name $ string "edge") ("t" ~> Eithers.map ("_x" ~> inject PGM._ElementSpec PGM._ElementSpec_edge (var "_x")) (decodeEdgeSpec @@ var "cx" @@ var "g" @@ var "t"))]
-      @@ var "term"
-
--- | Decode a property key from a term
-decodePropertyKey :: TTermDefinition (Context -> Graph -> Term -> Either Error PG.PropertyKey)
-decodePropertyKey = define "decodePropertyKey" $
-  doc "Decode a property key from a term" $
-  "cx" ~> "g" ~> "t" ~>
-    Eithers.map ("_x" ~> wrap PG._PropertyKey (var "_x")) (ExtractCore.string @@ var "g" @@ var "t")
-
--- | Decode a property specification from a term
-decodePropertySpec :: TTermDefinition (Context -> Graph -> Term -> Either Error PGM.PropertySpec)
-decodePropertySpec = define "decodePropertySpec" $
-  doc "Decode a property specification from a term" $
-  "cx" ~> "g" ~> "term" ~>
-    readRecord @@ var "cx" @@ var "g"
-      @@ ("fields" ~>
-        Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "key") @@ (decodePropertyKey @@ var "cx" @@ var "g"))
-          ("_a" ~> Eithers.map
-            ("_b" ~> record PGM._PropertySpec [
-              PGM._PropertySpec_key>>: var "_a",
-              PGM._PropertySpec_value>>: var "_b"])
-            (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "value") @@ (decodeValueSpec @@ var "cx" @@ var "g"))))
-      @@ var "term"
-
--- | Decode a value specification from a term
-decodeValueSpec :: TTermDefinition (Context -> Graph -> Term -> Either Error PGM.ValueSpec)
-decodeValueSpec = define "decodeValueSpec" $
-  doc "Decode a value specification from a term" $
-  "cx" ~> "g" ~> "term" ~>
-    -- Allow an abbreviated specification consisting of only the pattern string
-    cases _Term (Strip.deannotateTerm @@ var "term") (Just $
-      readInjection @@ var "cx" @@ var "g"
-        @@ list [
-          pair (Core.name $ string "value") (constant $ right (inject PGM._ValueSpec PGM._ValueSpec_value $ unit)),
-          pair (Core.name $ string "pattern") ("t" ~> Eithers.map ("_x" ~> inject PGM._ValueSpec PGM._ValueSpec_pattern (var "_x")) (ExtractCore.string @@ var "g" @@ var "t"))]
-        @@ var "term") [
-      _Term_literal>>: "lit" ~>
-        cases _Literal (var "lit") (Just $
-          readInjection @@ var "cx" @@ var "g"
-            @@ list [
-              pair (Core.name $ string "value") (constant $ right (inject PGM._ValueSpec PGM._ValueSpec_value $ unit)),
-              pair (Core.name $ string "pattern") ("t" ~> Eithers.map ("_x" ~> inject PGM._ValueSpec PGM._ValueSpec_pattern (var "_x")) (ExtractCore.string @@ var "g" @@ var "t"))]
-            @@ var "term") [
-          _Literal_string>>: "s" ~>
-            right (inject PGM._ValueSpec PGM._ValueSpec_pattern (var "s"))]]
-
--- | Decode a vertex label from a term
-decodeVertexLabel :: TTermDefinition (Context -> Graph -> Term -> Either Error PG.VertexLabel)
-decodeVertexLabel = define "decodeVertexLabel" $
-  doc "Decode a vertex label from a term" $
-  "cx" ~> "g" ~> "t" ~>
-    Eithers.map ("_x" ~> wrap PG._VertexLabel (var "_x")) (ExtractCore.string @@ var "g" @@ var "t")
-
--- | Decode a vertex specification from a term
-decodeVertexSpec :: TTermDefinition (Context -> Graph -> Term -> Either Error PGM.VertexSpec)
-decodeVertexSpec = define "decodeVertexSpec" $
-  doc "Decode a vertex specification from a term" $
-  "cx" ~> "g" ~> "term" ~>
-    readRecord @@ var "cx" @@ var "g"
-      @@ ("fields" ~>
-        Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "label") @@ (decodeVertexLabel @@ var "cx" @@ var "g"))
-          ("_a" ~> Eithers.bind (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "id") @@ (decodeValueSpec @@ var "cx" @@ var "g"))
-            ("_b" ~> Eithers.map
-              ("_c" ~> record PGM._VertexSpec [
-                PGM._VertexSpec_label>>: var "_a",
-                PGM._VertexSpec_id>>: var "_b",
-                PGM._VertexSpec_properties>>: var "_c"])
-              (readField @@ var "cx" @@ var "fields" @@ (Core.name $ string "properties")
-                @@ (expectList @@ var "cx" @@ var "g" @@ decodePropertySpec)))))
-      @@ var "term"
-
--- | Extract a list from a term and apply a decoder to each element
-expectList :: TTermDefinition (Context -> Graph -> (Context -> Graph -> Term -> Either Error x) -> Term -> Either Error [x])
-expectList = define "expectList" $
-  doc "Extract a list from a term and apply a decoder to each element" $
-  "cx" ~> "g" ~> "f" ~> "term" ~>
-    Eithers.bind (ExtractCore.list @@ var "g" @@ var "term")
-      ("elems" ~> Eithers.mapList (var "f" @@ var "cx" @@ var "g") (var "elems"))
-
--- | Parse an edge id pattern from a value spec and schema
-parseEdgeIdPattern :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> PGM.ValueSpec -> Either Error (Context -> Term -> Either Error [v]))
-parseEdgeIdPattern = define "parseEdgeIdPattern" $
-  doc "Parse an edge id pattern from a value spec and schema" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~>
-    Eithers.bind (parseValueSpec @@ var "cx" @@ var "g" @@ var "spec")
-      ("fun" ~> right
-        ("cx'" ~> "term" ~>
-          Eithers.bind (var "fun" @@ var "cx'" @@ var "term")
-            ("terms" ~> Eithers.mapList (Coders.coderEncode (project PGM._Schema PGM._Schema_edgeIds @@ var "schema") @@ var "cx'") (var "terms"))))
-
--- | Parse an edge specification into a label and encoder function
-parseEdgeSpec :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> PGM.EdgeSpec
-  -> Either Error (PG.Label, Context -> Term -> Either Error [PG.Element v]))
-parseEdgeSpec = define "parseEdgeSpec" $
-  doc "Parse an edge specification into a label and encoder function" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~> lets [
-    "label">: project PGM._EdgeSpec PGM._EdgeSpec_label @@ var "spec",
-    "id">: project PGM._EdgeSpec PGM._EdgeSpec_id @@ var "spec",
-    "outV">: project PGM._EdgeSpec PGM._EdgeSpec_out @@ var "spec",
-    "inV">: project PGM._EdgeSpec PGM._EdgeSpec_in @@ var "spec",
-    "props">: project PGM._EdgeSpec PGM._EdgeSpec_properties @@ var "spec"] $
-    Eithers.bind (parseEdgeIdPattern @@ var "cx" @@ var "g" @@ var "schema" @@ var "id")
-      ("getId" ~> Eithers.bind (parseVertexIdPattern @@ var "cx" @@ var "g" @@ var "schema" @@ var "outV")
-        ("getOut" ~> Eithers.bind (parseVertexIdPattern @@ var "cx" @@ var "g" @@ var "schema" @@ var "inV")
-          ("getIn" ~> Eithers.bind (Eithers.mapList (parsePropertySpec @@ var "cx" @@ var "g" @@ var "schema") (var "props"))
-            ("getProps" ~> right (pair
-              (inject PG._Label PG._Label_edge $ var "label")
-              ("cx'" ~> "term" ~>
-                Eithers.bind (requireUnique @@ var "cx'" @@ string "edge id" @@ (var "getId" @@ var "cx'") @@ var "term")
-                  ("tid" ~> Eithers.bind (requireUnique @@ var "cx'" @@ string "vertex id" @@ (var "getOut" @@ var "cx'") @@ var "term")
-                    ("tout" ~> Eithers.bind (requireUnique @@ var "cx'" @@ string "edge id" @@ (var "getIn" @@ var "cx'") @@ var "term")
-                      ("tin" ~> Eithers.bind (Eithers.map ("_xs" ~> Maps.fromList (var "_xs")) (Eithers.mapList ("gf" ~> requireUnique @@ var "cx'" @@ string "property key" @@ (var "gf" @@ var "cx'") @@ var "term") (var "getProps")))
-                        ("tprops" ~> right (list [inject PG._Element PG._Element_edge
-                          (record PG._Edge [
-                            PG._Edge_label>>: var "label",
-                            PG._Edge_id>>: var "tid",
-                            PG._Edge_out>>: var "tout",
-                            PG._Edge_in>>: var "tin",
-                            PG._Edge_properties>>: var "tprops"])])))))))))))
-
--- | Parse an element specification into a label and encoder function
-parseElementSpec :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> PGM.ElementSpec
-  -> Either Error (PG.Label, Context -> Term -> Either Error [PG.Element v]))
-parseElementSpec = define "parseElementSpec" $
-  doc "Parse an element specification into a label and encoder function" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~>
-    match PGM._ElementSpec Nothing [
-      PGM._ElementSpec_vertex>>: "vspec" ~> parseVertexSpec @@ var "cx" @@ var "g" @@ var "schema" @@ var "vspec",
-      PGM._ElementSpec_edge>>: "espec" ~> parseEdgeSpec @@ var "cx" @@ var "g" @@ var "schema" @@ var "espec"]
-    @@ var "spec"
-
--- | Evaluate a single step of a path traversal on a term
-evalStep :: TTermDefinition (Context -> String -> Term -> Either Error [Term])
-evalStep = define "evalStep" $
-  doc "Evaluate a single step of a path traversal on a term" $
-  "cx" ~> "step" ~> "term" ~>
-    Logic.ifElse (Strings.null $ var "step")
-      (right (list [var "term"]))
-      (cases _Term (Strip.deannotateTerm @@ var "term")
-        (Just $ left (Error.errorOther $ Error.otherError $ string "Can't traverse through term for step " ++ var "step")) [
-        _Term_list>>: "terms" ~>
-          Eithers.map (lambda "xs" $ Lists.concat (var "xs")) (Eithers.mapList (evalStep @@ var "cx" @@ var "step") (var "terms")),
-        _Term_maybe>>: "mt" ~>
-          Maybes.maybe (right (list ([] :: [TTerm Term]))) ("t" ~> evalStep @@ var "cx" @@ var "step" @@ var "t") (var "mt"),
-        _Term_record>>: "rec" ~>
-          Maybes.maybe
-            (left $ Error.errorOther $ Error.otherError $ string "No such field " ++ var "step" ++ string " in record")
-            ("t" ~> right (list [var "t"]))
-            (Maps.lookup (Core.name $ var "step") (Resolution.fieldMap @@ (Core.recordFields $ var "rec"))),
-        _Term_inject>>: "inj" ~>
-          Logic.ifElse (Equality.equal (Core.unName $ Core.fieldName $ Core.injectionField $ var "inj") (var "step"))
-            (evalStep @@ var "cx" @@ var "step" @@ (Core.fieldTerm $ Core.injectionField $ var "inj"))
-            (right (list ([] :: [TTerm Term]))),
-        _Term_wrap>>: "wt" ~>
-          evalStep @@ var "cx" @@ var "step" @@ (Core.wrappedTermBody $ var "wt")])
-
--- | Evaluate a path (list of steps) on a term, returning all resulting terms
-evalPath :: TTermDefinition (Context -> [String] -> Term -> Either Error [Term])
-evalPath = define "evalPath" $
-  doc "Evaluate a path (list of steps) on a term, returning all resulting terms" $
-  "cx" ~> "path" ~> "term" ~>
-    Maybes.maybe
-      (right (list [var "term"]))
-      (lambda "p" $
-        Eithers.bind (evalStep @@ var "cx" @@ Pairs.first (var "p") @@ var "term")
-          ("results" ~> Eithers.map (lambda "xs" $ Lists.concat (var "xs"))
-            (Eithers.mapList (evalPath @@ var "cx" @@ Pairs.second (var "p")) (var "results"))))
-      (Lists.uncons $ var "path")
-
--- | Convert a term to its string representation
-termToString :: TTermDefinition (Term -> String)
-termToString = define "termToString" $
-  doc "Convert a term to its string representation" $
-  "term" ~>
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just $ ShowCore.term @@ var "term") [
-      _Term_literal>>: "lit" ~>
-        cases _Literal (var "lit") (Just $ ShowCore.term @@ var "term") [
-          _Literal_string>>: lambda "s" $ var "s",
-          _Literal_boolean>>: "b" ~> Logic.ifElse (var "b") (string "true") (string "false"),
-          _Literal_integer>>: "i" ~>
-            cases _IntegerValue (var "i") (Just $ ShowCore.term @@ var "term") [
-              _IntegerValue_int32>>: "n" ~> Literals.showInt32 (var "n")],
-          _Literal_float>>: "f" ~>
-            cases _FloatValue (var "f") (Just $ ShowCore.term @@ var "term") [
-              _FloatValue_float64>>: "n" ~> Literals.showFloat64 (var "n")]],
-      _Term_maybe>>: "mt" ~>
-        Maybes.maybe (string "nothing") ("t" ~> termToString @@ var "t") (var "mt")]
-
--- | Apply a parsed pattern (list of literal/path pairs) to a term, producing string term results.
---   The pattern is represented as: (firstLiteral, [(pathSteps, trailingLiteral), ...])
---   We build result strings by starting with firstLit, then for each pair, evaluating the path
---   on the term to get strings, and appending pathResult ++ trailingLiteral.
-applyPattern :: TTermDefinition (Context -> String -> [([String], String)] -> Term -> Either Error [Term])
-applyPattern = define "applyPattern" $
-  doc "Apply a parsed pattern to a term, producing string terms" $
-  "cx" ~> "firstLit" ~> "pairs" ~> "term" ~>
-    Logic.ifElse (Lists.null $ var "pairs")
-      -- No path expressions: just return the literal as a string term
-      (right (list [inject _Term _Term_literal (inject _Literal _Literal_string (var "firstLit"))]))
-      -- Evaluate all paths, then combine
-      (Eithers.bind (Eithers.mapList
-        ("pp" ~> Eithers.map
-          ("terms" ~> pair (Lists.map ("t" ~> termToString @@ var "t") (var "terms")) (Pairs.second $ var "pp"))
-          (evalPath @@ var "cx" @@ (Pairs.first $ var "pp") @@ var "term"))
-        (var "pairs"))
-        ("evaluated" ~>
-          -- Fold over evaluated pairs, building up accumulator strings
-          right (Lists.map
-            ("s" ~> inject _Term _Term_literal (inject _Literal _Literal_string (var "s")))
-            (Lists.foldl
-              ("accum" ~> "ep" ~> lets [
-                "pStrs">: Pairs.first $ var "ep",
-                "litP">: Pairs.second $ var "ep"] $
-                Lists.concat (Lists.map
-                  ("pStr" ~> Lists.map ("a" ~> var "a" ++ var "pStr" ++ var "litP") (var "accum"))
-                  (var "pStrs")))
-              (list [var "firstLit"])
-              (var "evaluated")))))
-
--- | Parse a string pattern into a function that traverses terms.
---   Patterns can contain ${path/to/field} expressions that are evaluated against terms.
-parsePattern :: TTermDefinition (Context -> Graph -> String -> Either Error (Context -> Term -> Either Error [Term]))
-parsePattern = define "parsePattern" $
-  doc "Parse a string pattern into a function that traverses terms" $
-  "cx" ~> "_g" ~> "pat" ~> lets [
-    -- Split on "${" to get segments. First segment is a literal prefix.
-    -- Remaining segments each start with a path (up to "}") followed by a literal.
-    "segments">: Strings.splitOn (string "${") (var "pat"),
-    "firstLit">: Maybes.fromMaybe (var "pat") (Lists.maybeHead $ var "segments"),
-    "rest">: Lists.drop (int32 1) (var "segments"),
-    -- Parse each remaining segment into (pathSteps, trailingLiteral) pairs
-    "parsed">: Lists.map
-      ("seg" ~> lets [
-        "parts">: Strings.splitOn (string "}") (var "seg"),
-        "pathStr">: Maybes.fromMaybe (string "") (Lists.maybeHead $ var "parts"),
-        "litPart">: Strings.intercalate (string "}") (Lists.drop (int32 1) (var "parts")),
-        "pathSteps">: Strings.splitOn (string "/") (var "pathStr")] $
-        pair (var "pathSteps") (var "litPart"))
-      (var "rest")] $
-    right ("cx'" ~> "term" ~>
-      applyPattern @@ var "cx'" @@ var "firstLit" @@ var "parsed" @@ var "term")
-
--- | Parse a property specification into an encoder function
-parsePropertySpec :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> PGM.PropertySpec
-  -> Either Error (Context -> Term -> Either Error [(PG.PropertyKey, v)]))
-parsePropertySpec = define "parsePropertySpec" $
-  doc "Parse a property specification into an encoder function" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~> lets [
-    "key">: project PGM._PropertySpec PGM._PropertySpec_key @@ var "spec",
-    "value">: project PGM._PropertySpec PGM._PropertySpec_value @@ var "spec"] $
-    Eithers.bind (parseValueSpec @@ var "cx" @@ var "g" @@ var "value")
-      ("fun" ~> right
-        ("cx'" ~> "term" ~>
-          Eithers.bind (var "fun" @@ var "cx'" @@ var "term")
-            ("results" ~> Eithers.bind (Eithers.mapList (Coders.coderEncode (project PGM._Schema PGM._Schema_propertyValues @@ var "schema") @@ var "cx'") (var "results"))
-              ("values" ~> right (Lists.map ("v" ~> pair (var "key") (var "v")) (var "values"))))))
-
--- | Parse a value specification into a function that processes terms
-parseValueSpec :: TTermDefinition (Context -> Graph -> PGM.ValueSpec -> Either Error (Context -> Term -> Either Error [Term]))
-parseValueSpec = define "parseValueSpec" $
-  doc "Parse a value specification into a function that processes terms" $
-  "cx" ~> "g" ~> "spec" ~>
-    match PGM._ValueSpec Nothing [
-      PGM._ValueSpec_value>>: constant $ right ("_cx" ~> "term" ~> right (list [var "term"])),
-      PGM._ValueSpec_pattern>>: "pat" ~> parsePattern @@ var "cx" @@ var "g" @@ var "pat"]
-    @@ var "spec"
-
--- | Parse a vertex id pattern from a value spec and schema
-parseVertexIdPattern :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> PGM.ValueSpec -> Either Error (Context -> Term -> Either Error [v]))
-parseVertexIdPattern = define "parseVertexIdPattern" $
-  doc "Parse a vertex id pattern from a value spec and schema" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~>
-    Eithers.bind (parseValueSpec @@ var "cx" @@ var "g" @@ var "spec")
-      ("fun" ~> right
-        ("cx'" ~> "term" ~>
-          Eithers.bind (var "fun" @@ var "cx'" @@ var "term")
-            ("terms" ~> Eithers.mapList (Coders.coderEncode (project PGM._Schema PGM._Schema_vertexIds @@ var "schema") @@ var "cx'") (var "terms"))))
-
--- | Parse a vertex specification into a label and encoder function
-parseVertexSpec :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> PGM.VertexSpec
-  -> Either Error (PG.Label, Context -> Term -> Either Error [PG.Element v]))
-parseVertexSpec = define "parseVertexSpec" $
-  doc "Parse a vertex specification into a label and encoder function" $
-  "cx" ~> "g" ~> "schema" ~> "spec" ~> lets [
-    "label">: project PGM._VertexSpec PGM._VertexSpec_label @@ var "spec",
-    "id">: project PGM._VertexSpec PGM._VertexSpec_id @@ var "spec",
-    "props">: project PGM._VertexSpec PGM._VertexSpec_properties @@ var "spec"] $
-    Eithers.bind (parseVertexIdPattern @@ var "cx" @@ var "g" @@ var "schema" @@ var "id")
-      ("getId" ~> Eithers.bind (Eithers.mapList (parsePropertySpec @@ var "cx" @@ var "g" @@ var "schema") (var "props"))
-        ("getProps" ~> right (pair
-          (inject PG._Label PG._Label_vertex $ var "label")
-          ("cx'" ~> "term" ~>
-            Eithers.bind (requireUnique @@ var "cx'" @@ string "vertex id" @@ (var "getId" @@ var "cx'") @@ var "term")
-              ("tid" ~> Eithers.bind (Eithers.map ("_xs" ~> Maps.fromList (var "_xs")) (Eithers.mapList ("gf" ~> requireUnique @@ var "cx'" @@ string "property key" @@ (var "gf" @@ var "cx'") @@ var "term") (var "getProps")))
-                ("tprops" ~> right (list [inject PG._Element PG._Element_vertex
-                  (record PG._Vertex [
-                    PG._Vertex_label>>: var "label",
-                    PG._Vertex_id>>: var "tid",
-                    PG._Vertex_properties>>: var "tprops"])])))))))
-
--- | Read a field from a map of fields by name
-readField :: TTermDefinition (Context -> M.Map Name Term -> Name -> (Term -> Either Error a) -> Either Error a)
-readField = define "readField" $
-  doc "Read a field from a map of fields by name" $
-  "cx" ~> "fields" ~> "fname" ~> "fun" ~>
-    Maybes.maybe
-      (left $ Error.errorOther $ Error.otherError (string "no such field: " ++ (Core.unName $ var "fname")))
-      (var "fun")
-      (Maps.lookup (var "fname") (var "fields"))
-
--- | Read an injection (union value) from a term
-readInjection :: TTermDefinition (Context -> Graph -> [(Name, Term -> Either Error x)] -> Term -> Either Error x)
-readInjection = define "readInjection" $
-  doc "Read an injection (union value) from a term" $
-  "cx" ~> "g" ~> "cases" ~> "encoded" ~>
-    Eithers.bind (ExtractCore.map @@ ("k" ~> Eithers.map ("_n" ~> Core.name (var "_n")) (ExtractCore.string @@ var "g" @@ var "k")) @@ ("_v" ~> right (var "_v")) @@ var "g" @@ var "encoded")
-      ("mp" ~> lets [
-        "entries">: Maps.toList $ var "mp"] $
-        Maybes.maybe
-          (left $ Error.errorOther $ Error.otherError $ string "empty injection")
-          (lambda "f" $ lets [
-            "key">: Pairs.first $ var "f",
-            "val">: Pairs.second $ var "f",
-            "matching">: Lists.filter ("c" ~> Equality.equal (Pairs.first $ var "c") (var "key")) (var "cases")] $
-            Maybes.maybe
-              (left $ Error.errorOther $ Error.otherError $ string "unexpected field: " ++ (Core.unName $ var "key"))
-              (lambda "m" $ (Pairs.second $ var "m") @@ var "val")
-              (Lists.maybeHead $ var "matching"))
-          (Lists.maybeHead $ var "entries"))
-
--- | Read a record from a term as a map of field names to values
-readRecord :: TTermDefinition (Context -> Graph -> (M.Map Name Term -> Either Error x) -> Term -> Either Error x)
-readRecord = define "readRecord" $
-  doc "Read a record from a term as a map of field names to values" $
-  "cx" ~> "g" ~> "cons" ~> "term" ~>
-    Eithers.bind (ExtractCore.map @@ ("k" ~> Eithers.map ("_n" ~> Core.name (var "_n")) (ExtractCore.string @@ var "g" @@ var "k")) @@ ("_v" ~> right (var "_v")) @@ var "g" @@ var "term")
-      (var "cons")
-
--- | Require exactly one result from a list-producing function
-requireUnique :: TTermDefinition (Context -> String -> (Term -> Either Error [x]) -> Term -> Either Error x)
-requireUnique = define "requireUnique" $
-  doc "Require exactly one result from a list-producing function" $
-  "cx" ~> "context" ~> "fun" ~> "term" ~>
-    Eithers.bind (var "fun" @@ var "term")
-      ("results" ~>
-        Logic.ifElse (Lists.null $ var "results")
-          (left $ Error.errorOther $ Error.otherError $ string "No value found: " ++ var "context")
-          (Logic.ifElse (Equality.equal (Lists.length $ var "results") (int32 1))
-            (Maybes.maybe
-              (left $ Error.errorOther $ Error.otherError $ string "Multiple values found: " ++ var "context")
-              (unaryFunction right)
-              (Lists.maybeHead $ var "results"))
-            (left $ Error.errorOther $ Error.otherError $ string "Multiple values found: " ++ var "context")))
-
--- | Create an adapter that maps terms to property graph elements using a mapping specification
-termToElementsAdapter :: TTermDefinition (Context -> Graph -> PGM.Schema s t v -> Type
-  -> Either Error (Adapter Type [PG.Label] Term [PG.Element v]))
-termToElementsAdapter = define "termToElementsAdapter" $
-  doc "Create an adapter that maps terms to property graph elements using a mapping specification" $
-  "cx" ~> "g" ~> "schema" ~> "typ" ~> lets [
-    "key_elements">: Core.name (string "elements")] $
-    Maybes.maybe
-      (right $ Coders.adapter false (var "typ") (list ([] :: [TTerm PG.Label]))
-        (Coders.coder
-          ("_cx" ~> "_t" ~> right (list ([] :: [TTerm (PG.Element ())])))
-          ("cx'" ~> "_els" ~> left (Error.errorOther $ Error.otherError $ string "no corresponding element type"))))
-      ("term" ~>
-        Eithers.bind (expectList @@ var "cx" @@ var "g" @@ decodeElementSpec @@ var "term")
-          ("specTerms" ~> Eithers.bind (Eithers.mapList (parseElementSpec @@ var "cx" @@ var "g" @@ var "schema") (var "specTerms"))
-            ("specs" ~> lets [
-              "labels">: (Lists.nub :: TTerm [PG.Label] -> TTerm [PG.Label]) (Lists.map ("_p" ~> Pairs.first (var "_p")) (var "specs")),
-              "encoders">: Lists.map ("_p" ~> Pairs.second (var "_p")) (var "specs")] $
-              right (Coders.adapter false (var "typ") (var "labels")
-                (Coders.coder
-                  ("cx'" ~> "t" ~>
-                    Eithers.map ("_xs" ~> Lists.concat (var "_xs")) (Eithers.mapList ("e" ~> var "e" @@ var "cx'" @@ var "t") (var "encoders")))
-                  ("cx'" ~> "_els" ~> left (Error.errorOther $ Error.otherError $ string "element decoding is not yet supported")))))))
-      (Annotations.getTypeAnnotation @@ var "key_elements" @@ var "typ")
diff --git a/src/main/haskell/Hydra/Sources/Pg/Utils.hs b/src/main/haskell/Hydra/Sources/Pg/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Pg/Utils.hs
+++ /dev/null
@@ -1,252 +0,0 @@
-module Hydra.Sources.Pg.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (
-  defaultTinkerpopAnnotations, examplePgSchema, expString,
-  lazyGraphToElements, pgElementToJson, pgElementsToJson,
-  propertyGraphElements, typeApplicationTermToPropertyGraph)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Pg.Model as PG
-import qualified Hydra.Pg.Mapping as PGM
-import qualified Hydra.Json.Model as JM
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Pg.Mapping as PgMapping
-import qualified Hydra.Sources.Pg.Coder as PgCoder
-import qualified Hydra.Sources.Json.Model as JsonModel
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.pg.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ExtractCore.ns, PgCoder.ns],
-            moduleTypeDependencies = (PgModel.ns:PgMapping.ns:JsonModel.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Utility functions for property graph operations"}
-  where
-    definitions = [
-      toDefinition defaultTinkerpopAnnotations,
-      toDefinition examplePgSchema,
-      toDefinition expString,
-      toDefinition lazyGraphToElements,
-      toDefinition pgElementToJson,
-      toDefinition pgElementsToJson,
-      toDefinition propertyGraphElements,
-      toDefinition typeApplicationTermToPropertyGraph]
-
--- | Default Tinkerpop annotation schema
-defaultTinkerpopAnnotations :: TTermDefinition PGM.AnnotationSchema
-defaultTinkerpopAnnotations = define "defaultTinkerpopAnnotations" $
-  doc "Default Tinkerpop annotation schema" $
-  record PGM._AnnotationSchema [
-    PGM._AnnotationSchema_vertexLabel>>: string "vertexLabel",
-    PGM._AnnotationSchema_edgeLabel>>: string "edgeLabel",
-    PGM._AnnotationSchema_vertexId>>: string "vertexId",
-    PGM._AnnotationSchema_edgeId>>: string "edgeId",
-    PGM._AnnotationSchema_propertyKey>>: string "key",
-    PGM._AnnotationSchema_propertyValue>>: string "value",
-    PGM._AnnotationSchema_outVertex>>: string "outVertex",
-    PGM._AnnotationSchema_outVertexLabel>>: string "outVertexLabel",
-    PGM._AnnotationSchema_inVertex>>: string "inVertex",
-    PGM._AnnotationSchema_inVertexLabel>>: string "inVertexLabel",
-    PGM._AnnotationSchema_outEdge>>: string "outEdge",
-    PGM._AnnotationSchema_outEdgeLabel>>: string "outEdgeLabel",
-    PGM._AnnotationSchema_inEdge>>: string "inEdge",
-    PGM._AnnotationSchema_inEdgeLabel>>: string "inEdgeLabel",
-    PGM._AnnotationSchema_ignore>>: string "ignore"]
-
--- | Example property graph schema with string values
-examplePgSchema :: TTermDefinition (PGM.Schema Graph () String)
-examplePgSchema = define "examplePgSchema" $
-  doc "Example property graph schema with string values" $
-  record PGM._Schema [
-    PGM._Schema_vertexIdTypes>>: Coders.coder (constant $ constant $ right unit) (constant $ constant $ right MetaTypes.unit),
-    PGM._Schema_vertexIds>>: Coders.coder ("cx" ~> "t" ~> expString @@ var "cx" @@ var "t") ("_cx" ~> "s" ~> right (Core.termLiteral $ Core.literalString $ var "s")),
-    PGM._Schema_edgeIdTypes>>: Coders.coder (constant $ constant $ right unit) (constant $ constant $ right MetaTypes.unit),
-    PGM._Schema_edgeIds>>: Coders.coder ("cx" ~> "t" ~> expString @@ var "cx" @@ var "t") ("_cx" ~> "s" ~> right (Core.termLiteral $ Core.literalString $ var "s")),
-    PGM._Schema_propertyTypes>>: Coders.coder (constant $ constant $ right unit) (constant $ constant $ right MetaTypes.unit),
-    PGM._Schema_propertyValues>>: Coders.coder ("cx" ~> "t" ~> expString @@ var "cx" @@ var "t") ("_cx" ~> "s" ~> right (Core.termLiteral $ Core.literalString $ var "s")),
-    PGM._Schema_annotations>>: defaultTinkerpopAnnotations,
-    PGM._Schema_defaultVertexId>>: string "defaultVertexId",
-    PGM._Schema_defaultEdgeId>>: string "defaultEdgeId"]
-
--- | Extract a string from a term using the empty graph
-expString :: TTermDefinition (Context -> Term -> Either Error String)
-expString = define "expString" $
-  doc "Extract a string from a term using the empty graph" $
-  "cx" ~> "term" ~>
-    ExtractCore.string @@ Graph.emptyGraph @@ var "term"
-
--- | Get all elements from a property graph
-propertyGraphElements :: TTermDefinition (PG.Graph v -> [PG.Element v])
-propertyGraphElements = define "propertyGraphElements" $
-  doc "Get all elements from a property graph" $
-  "g" ~>
-    Lists.concat2
-      (Lists.map ("x" ~> inject PG._Element PG._Element_vertex (var "x")) (Maps.elems $ project PG._Graph PG._Graph_vertices @@ var "g"))
-      (Lists.map ("x" ~> inject PG._Element PG._Element_edge (var "x")) (Maps.elems $ project PG._Graph PG._Graph_edges @@ var "g"))
-
--- | Convert a type-annotated term to property graph elements
-typeApplicationTermToPropertyGraph :: TTermDefinition (PGM.Schema Graph t v -> Type -> t -> t -> Context -> Graph
-  -> Either Error (Term -> Context -> Either Error [PG.Element v]))
-typeApplicationTermToPropertyGraph = define "typeApplicationTermToPropertyGraph" $
-  doc "Convert a type-annotated term to property graph elements" $
-  "schema" ~> "typ" ~> "vidType" ~> "eidType" ~> "cx" ~> "g" ~>
-    Eithers.bind (PgCoder.elementCoder @@ nothing @@ var "schema" @@ var "typ" @@ var "vidType" @@ var "eidType" @@ var "cx" @@ var "g")
-      ("adapter" ~> right
-        ("term" ~> "cx'" ~>
-          Eithers.map
-            ("tree" ~> lets [
-              "flattenTree">: "t" ~>
-                Lists.cons
-                  (project PG._ElementTree PG._ElementTree_self @@ var "t")
-                  (Lists.concat (Lists.map (var "flattenTree") (project PG._ElementTree PG._ElementTree_dependencies @@ var "t")))]
-              $ var "flattenTree" @@ var "tree")
-            (Coders.coderEncode (Coders.adapterCoder $ var "adapter") @@ var "cx'" @@ var "term")))
-
--- | Get all elements from a lazy graph
-lazyGraphToElements :: TTermDefinition (PG.LazyGraph v -> [PG.Element v])
-lazyGraphToElements = define "lazyGraphToElements" $
-  doc "Get all elements from a lazy graph" $
-  "lg" ~>
-    Lists.concat2
-      (Lists.map ("x" ~> inject PG._Element PG._Element_vertex (var "x")) (project PG._LazyGraph PG._LazyGraph_vertices @@ var "lg"))
-      (Lists.map ("x" ~> inject PG._Element PG._Element_edge (var "x")) (project PG._LazyGraph PG._LazyGraph_edges @@ var "lg"))
-
--- | Convert a property graph element to JSON
-pgElementToJson :: TTermDefinition (PGM.Schema Graph t v -> PG.Element v -> Context -> Either Error JM.Value)
-pgElementToJson = define "pgElementToJson" $
-  doc "Convert a property graph element to JSON" $
-  "schema" ~> "el" ~> "cx" ~>
-    match PG._Element Nothing [
-      PG._Element_vertex>>: "vertex" ~>
-        Eithers.bind (Coders.coderDecode (project PGM._Schema PGM._Schema_vertexIds @@ var "schema") @@ var "cx" @@ (project PG._Vertex PG._Vertex_id @@ var "vertex"))
-          ("term" ~> lets [
-            "labelJson">: Json.valueString (unwrap PG._VertexLabel @@ (project PG._Vertex PG._Vertex_label @@ var "vertex"))] $
-            Eithers.map
-              ("propsJson" ~>
-                Json.valueObject (Maps.fromList $ Maybes.cat $ list [
-                  just (pair (string "label") (var "labelJson")),
-                  just (pair (string "id") (Json.valueString $ ShowCore.term @@ var "term")),
-                  var "propsJson"]))
-              (propsToJson @@ var "schema" @@ var "cx" @@ (project PG._Vertex PG._Vertex_properties @@ var "vertex"))),
-      PG._Element_edge>>: "edge" ~>
-        Eithers.bind (Coders.coderDecode (project PGM._Schema PGM._Schema_edgeIds @@ var "schema") @@ var "cx" @@ (project PG._Edge PG._Edge_id @@ var "edge"))
-          ("term" ~> Eithers.bind (Coders.coderDecode (project PGM._Schema PGM._Schema_vertexIds @@ var "schema") @@ var "cx" @@ (project PG._Edge PG._Edge_out @@ var "edge"))
-            ("termOut" ~> Eithers.bind (Coders.coderDecode (project PGM._Schema PGM._Schema_vertexIds @@ var "schema") @@ var "cx" @@ (project PG._Edge PG._Edge_in @@ var "edge"))
-              ("termIn" ~> lets [
-                "labelJson">: Json.valueString (unwrap PG._EdgeLabel @@ (project PG._Edge PG._Edge_label @@ var "edge"))] $
-                Eithers.map
-                  ("propsJson" ~>
-                    Json.valueObject (Maps.fromList $ Maybes.cat $ list [
-                      just (pair (string "label") (var "labelJson")),
-                      just (pair (string "id") (Json.valueString $ ShowCore.term @@ var "term")),
-                      just (pair (string "out") (Json.valueString $ ShowCore.term @@ var "termOut")),
-                      just (pair (string "in") (Json.valueString $ ShowCore.term @@ var "termIn")),
-                      var "propsJson"]))
-                  (propsToJson @@ var "schema" @@ var "cx" @@ (project PG._Edge PG._Edge_properties @@ var "edge")))))]
-    @@ var "el"
-
--- | Convert a list of property graph elements to JSON
-pgElementsToJson :: TTermDefinition (PGM.Schema Graph t v -> [PG.Element v] -> Context -> Either Error JM.Value)
-pgElementsToJson = define "pgElementsToJson" $
-  doc "Convert a list of property graph elements to JSON" $
-  "schema" ~> "els" ~> "cx" ~>
-    Eithers.map ("els'" ~> Json.valueArray (var "els'")) (Eithers.mapList ("el" ~> pgElementToJson @@ var "schema" @@ var "el" @@ var "cx") (var "els"))
-
--- Internal helper (not exported as a binding)
-propsToJson :: TTerm (PGM.Schema Graph t v -> Context -> M.Map PG.PropertyKey v -> Either Error (Y.Maybe (String, JM.Value)))
-propsToJson = "schema" ~> "cx" ~> "pairs" ~>
-  Logic.ifElse (Maps.null $ var "pairs")
-    (right nothing)
-    (Eithers.map
-      ("p" ~> just (pair (string "properties") (Json.valueObject $ Maps.fromList $ var "p")))
-      (Eithers.mapList
-        ("pair" ~> lets [
-          "key">: Pairs.first $ var "pair",
-          "v">: Pairs.second $ var "pair"] $
-          Eithers.bind (Coders.coderDecode (project PGM._Schema PGM._Schema_propertyValues @@ var "schema") @@ var "cx" @@ var "v")
-            ("term" ~> right (pair (unwrap PG._PropertyKey @@ var "key") (Json.valueString $ ShowCore.term @@ var "term"))))
-        (Maps.toList $ var "pairs")))
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/Any.hs b/src/main/haskell/Hydra/Sources/Protobuf/Any.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/Any.hs
+++ /dev/null
@@ -1,46 +0,0 @@
-module Hydra.Sources.Protobuf.Any where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.protobuf.any"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pbAny :: String -> Type
-pbAny = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto"}
-  where
-    definitions = [any_]
-
-any_ :: Binding
-any_ = define "Any" $
-  doc ("`Any` contains an arbitrary serialized protocol buffer message along with a " ++
-       "URL that describes the type of the serialized message.") $
-  T.record [
-    "typeUrl">:
-      doc ("A URL/resource name that uniquely identifies the type of the serialized " ++
-           "protocol buffer message.")
-      T.string,
-    "value">:
-      doc "Must be a valid serialized protocol buffer of the above specified type."
-      T.binary]
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/Coder.hs b/src/main/haskell/Hydra/Sources/Protobuf/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/Coder.hs
+++ /dev/null
@@ -1,800 +0,0 @@
--- | Protobuf code generator in Hydra DSL.
--- This module provides DSL versions of Protobuf code generation functions.
--- Hydra type definitions are mapped to Protocol Buffers v3 message and enum types.
-
-module Hydra.Sources.Protobuf.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Analysis      as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors     as ShowError
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Protobuf.Proto3 as P3
-import qualified Hydra.Sources.Protobuf.Proto3 as Proto3Syntax
-import qualified Hydra.Sources.Protobuf.Language as ProtobufLanguageSource
-import qualified Hydra.Sources.Protobuf.Environment as ProtobufEnvironment
-import qualified Hydra.Sources.Protobuf.Serde as ProtobufSerdeSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
--- | Name for the StructuralTypeRef union type (either | pair)
-_StructuralTypeRef :: Name
-_StructuralTypeRef = Name "hydra.protobuf.environment.StructuralTypeRef"
-
--- | An empty list term, avoiding ambiguous type variable issues with 'list []'
-emptyList :: TTerm [a]
-emptyList = TTerm $ TermList []
-
--- | Reference to the hydra.decode.core.type function (Graph -> Term -> Either DecodingError Type)
-decodeType :: TTerm (Graph -> Term -> Either DecodingError Type)
-decodeType = TTerm $ TermVariable $ Name "hydra.decode.core.type"
-
-ns :: Namespace
-ns = Namespace "hydra.protobuf.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [moduleNamespace ProtobufSerdeSource.module_, moduleNamespace ProtobufLanguageSource.module_,
-      Formatting.ns, Names.ns, Rewriting.ns, Strip.ns, Variables.ns, Analysis.ns, Environment.ns, Predicates.ns, Lexical.ns, Serialization.ns,
-      Annotations.ns, Constants.ns, ExtractCore.ns, Adapt.ns, ShowCore.ns, ShowError.ns,
-      moduleNamespace DecodeCore.module_],
-            moduleTypeDependencies = (ProtobufEnvironment.ns:Proto3Syntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Protobuf code generator: converts Hydra modules to Protocol Buffers v3 definitions"}
-  where
-    definitions = [
-      toDefinition collectStructuralTypes,
-      toDefinition collectStructuralTypes_collectFromType,
-      toDefinition constructModule,
-      toDefinition encodeDefinition,
-      toDefinition encodeEnumDefinition,
-      toDefinition encodeEnumValueName,
-      toDefinition encodeFieldName,
-      toDefinition encodeFieldType,
-      toDefinition encodeRecordType,
-      toDefinition encodeScalarType,
-      toDefinition encodeScalarTypeWrapped,
-      toDefinition encodeSimpleTypeForHelper,
-      toDefinition encodeTypeName,
-      toDefinition encodeTypeReference,
-      toDefinition err,
-      toDefinition findOptions,
-      toDefinition flattenType,
-      toDefinition fromEitherString,
-      toDefinition generateStructuralTypeMessage,
-      toDefinition isEnumDefinition,
-      toDefinition isEnumFields,
-      toDefinition javaMultipleFilesOptionName,
-      toDefinition javaPackageOptionName,
-      toDefinition key_proto_field_index,
-      toDefinition mapAccumResult,
-      toDefinition moduleToProtobuf,
-      toDefinition namespaceToFileReference,
-      toDefinition namespaceToPackageName,
-      toDefinition readBooleanAnnotation,
-      toDefinition simplifyType,
-      toDefinition structuralTypeName,
-      toDefinition unexpectedE]
-
-
--- =============================================================================
--- Constants
--- =============================================================================
-
--- | Collect all structural type references (Either, Pair) from a list of types
-collectStructuralTypes :: TTermDefinition ([Type] -> S.Set Term)
-collectStructuralTypes = def "collectStructuralTypes" $
-  doc "Collect all structural type references (Either, Pair) from a list of types" $
-  "types" ~>
-    Lists.foldl
-      ("acc" ~> "t" ~> Sets.union (var "acc") (asTerm collectStructuralTypes_collectFromType @@ var "t"))
-      Sets.empty
-      (var "types")
-
-collectStructuralTypes_collectFromType :: TTermDefinition (Type -> S.Set Term)
-collectStructuralTypes_collectFromType = def "collectStructuralTypes_collectFromType" $
-  doc "Collect structural type references from a single type" $
-  "typ" ~>
-    Rewriting.foldOverType @@ Coders.traversalOrderPre @@
-      ("acc" ~> "t" ~> lets [
-        "st">: asTerm simplifyType @@ var "t"] $
-        cases _Type (var "st")
-          (Just $ var "acc") [
-          _Type_either>>: "et" ~>
-            Sets.insert
-              (inject _StructuralTypeRef (Name "either") (pair (Core.eitherTypeLeft (var "et")) (Core.eitherTypeRight (var "et"))))
-              (var "acc"),
-          _Type_pair>>: "pt" ~>
-            Sets.insert
-              (inject _StructuralTypeRef (Name "pair") (pair (Core.pairTypeFirst (var "pt")) (Core.pairTypeSecond (var "pt"))))
-              (var "acc")]) @@
-      Sets.empty @@
-      (var "typ")
-
--- =============================================================================
--- Module-level entry point
--- =============================================================================
-
-constructModule :: TTermDefinition (Context -> Graph -> Module -> [TypeDefinition] -> Either Error P3.ProtoFile)
-constructModule = def "constructModule" $
-  doc "Construct a Protobuf file from a Hydra module and its type definitions" $
-  "cx" ~> "g" ~> "mod" ~> "typeDefs" ~> lets [
-    "ns_">: Packaging.moduleNamespace (var "mod"),
-    "desc">: Packaging.moduleDescription (var "mod"),
-    "toDef">: "td" ~> lets [
-      "name">: Packaging.typeDefinitionName (var "td"),
-      "typ">: Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "td"),
-      "encodeDefEither">: "n" ~> "t" ~> asTerm encodeDefinition @@ var "cx" @@ var "g" @@ var "ns_" @@ var "n" @@ var "t",
-      "flatTyp">: asTerm flattenType @@ var "typ",
-      "enc">: var "encodeDefEither" @@ var "name"] $
-      (cases _Type (Strip.deannotateType @@ var "flatTyp")
-          (Just ("adaptedType" <<~ Adapt.adaptTypeForLanguage @@ ProtobufLanguageSource.protobufLanguage @@ var "flatTyp" $
-            var "enc" @@ var "adaptedType")) [
-          _Type_variable>>: constant (var "enc" @@ var "flatTyp")]),
-    "types">: Lists.map ("td" ~> Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme (var "td"))) (var "typeDefs"),
-    "structRefs">: asTerm collectStructuralTypes @@ var "types",
-    "javaOptions">: list [
-      record P3._Option [
-        P3._Option_name>>: asTerm javaMultipleFilesOptionName,
-        P3._Option_value>>: inject P3._Value P3._Value_boolean true],
-      record P3._Option [
-        P3._Option_name>>: asTerm javaPackageOptionName,
-        P3._Option_value>>: inject P3._Value P3._Value_string (unwrap P3._PackageName @@ (asTerm namespaceToPackageName @@ var "ns_"))]],
-    "descOption">: record P3._Option [
-      P3._Option_name>>: ProtobufSerdeSource.descriptionOptionName,
-      P3._Option_value>>: inject P3._Value P3._Value_string $
-        Strings.cat2
-          (Maybes.maybe (string "") ("d" ~> Strings.cat2 (var "d") (string "\n\n")) (var "desc"))
-          (asTerm Constants.warningAutoGeneratedFile)],
-    "checkFieldType_wrapper">: "typ" ~> cases _Type (Strip.deannotateType @@ var "typ")
-      (Just false) [
-      _Type_maybe>>: "ot" ~> cases _Type (Strip.deannotateType @@ var "ot")
-        (Just false) [
-        _Type_literal>>: constant true]],
-    "checkFieldType_empty">: "typ" ~> Predicates.isUnitType @@ var "typ",
-    "checkFields">: "checkType" ~> "checkFieldType" ~> "ts" ~>
-      Lists.foldl ("b" ~> "t" ~> Logic.or (var "b")
-        (Rewriting.foldOverType @@ Coders.traversalOrderPre @@
-          ("b2" ~> "t2" ~> Logic.or (var "b2") (lets [
-            "checkResult">: var "checkType" @@ var "t2"] $
-            Maybes.maybe
-              (cases _Type (var "t2")
-                (Just false) [
-                _Type_record>>: "fts" ~> Lists.foldl ("b3" ~> "f" ~> Logic.or (var "b3") (var "checkFieldType" @@ (Strip.deannotateType @@ Core.fieldTypeType (var "f")))) false (var "fts"),
-                _Type_union>>: "fts" ~> Lists.foldl ("b3" ~> "f" ~> Logic.or (var "b3") (var "checkFieldType" @@ (Strip.deannotateType @@ Core.fieldTypeType (var "f")))) false (var "fts")])
-              ("b3" ~> var "b3")
-              (var "checkResult"))) @@
-          false @@ var "t")) false (var "ts"),
-    "wrapperImport">: Logic.ifElse
-      (var "checkFields" @@ (constant nothing) @@ var "checkFieldType_wrapper" @@ var "types")
-      (list [wrap P3._FileReference (string "google/protobuf/wrappers.proto")])
-      emptyList,
-    "emptyCheckType">: "typ" ~> Logic.ifElse (asTerm isEnumDefinition @@ var "typ") (just false) nothing,
-    "emptyImport">: Logic.ifElse
-      (var "checkFields" @@ var "emptyCheckType" @@ var "checkFieldType_empty" @@ var "types")
-      (list [wrap P3._FileReference (string "google/protobuf/empty.proto")])
-      emptyList] $
-    "schemaImports" <<~ (Analysis.moduleDependencyNamespaces @@ var "cx" @@ var "g" @@ true @@ false @@ false @@ false @@ var "mod") $
-    "definitions" <<~ (Eithers.mapList (var "toDef") (var "typeDefs")) $ lets [
-      "schemaImportList">: Lists.map (lambda "n" $ asTerm namespaceToFileReference @@ var "n") (Sets.toList (var "schemaImports"))] $
-      "helperResult" <<~ (asTerm mapAccumResult @@
-        ("cx0" ~> "ref" ~> asTerm generateStructuralTypeMessage @@ var "cx0" @@ var "g" @@ var "ns_" @@ var "ref") @@
-        var "cx" @@
-        (Sets.toList (var "structRefs"))) $ lets [
-        "helperDefs">: Pairs.first (var "helperResult")] $
-        right $ record P3._ProtoFile [
-          P3._ProtoFile_package>>: asTerm namespaceToPackageName @@ var "ns_",
-          P3._ProtoFile_imports>>: Lists.concat (list [var "schemaImportList", var "wrapperImport", var "emptyImport"]),
-          P3._ProtoFile_types>>: Lists.concat (list [var "helperDefs", var "definitions"]),
-          P3._ProtoFile_options>>: Lists.cons (var "descOption") (var "javaOptions")]
-
--- =============================================================================
--- Accumulator helper
--- =============================================================================
-
-encodeDefinition :: TTermDefinition (Context -> Graph -> Namespace -> Name -> Type -> Either Error P3.Definition)
-encodeDefinition = def "encodeDefinition" $
-  doc "Encode a Hydra type as a Protobuf definition" $
-  "cx" ~> "g" ~> "localNs" ~> "name" ~> "typ" ~> lets [
-    "cx1">: Annotations.resetCount @@ asTerm key_proto_field_index @@ var "cx",
-    "cx2">: Pairs.second (Annotations.nextCount @@ asTerm key_proto_field_index @@ var "cx1"),
-    "wrapAsRecordType">: "t" ~>
-      inject _Type _Type_record (list [Core.fieldType (Core.name (string "value")) (var "t")]),
-    "toEitherString">: "result" ~> var "result",
-    "encode">: "cx0" ~> "options" ~> "t" ~>
-      cases _Type (asTerm simplifyType @@ var "t")
-        (Just $ var "encode" @@ var "cx0" @@ var "options" @@ (var "wrapAsRecordType" @@ var "t")) [
-        _Type_record>>: "fts" ~>
-          Eithers.map
-            ("md" ~> inject P3._Definition P3._Definition_message (var "md"))
-            (var "toEitherString" @@ (asTerm encodeRecordType @@ var "cx0" @@ var "g" @@ var "localNs" @@ var "options" @@ var "name" @@ var "fts")),
-        _Type_union>>: "fts" ~> Logic.ifElse (asTerm isEnumDefinition @@ var "t")
-          (Eithers.map
-            ("ed" ~> inject P3._Definition P3._Definition_enum (var "ed"))
-            (var "toEitherString" @@ (asTerm encodeEnumDefinition @@ var "cx0" @@ var "g" @@ var "options" @@ var "name" @@ var "fts")))
-          (var "encode" @@ var "cx0" @@ var "options" @@ (var "wrapAsRecordType" @@ (inject _Type _Type_union (var "fts"))))]] $
-    "options" <<~ (var "toEitherString" @@ (asTerm findOptions @@ var "cx" @@ var "g" @@ var "typ")) $
-    var "encode" @@ var "cx2" @@ var "options" @@ var "typ"
-
--- =============================================================================
--- Enum encoding
--- =============================================================================
-
-encodeEnumDefinition :: TTermDefinition (Context -> Graph -> [P3.Option] -> Name -> [FieldType] -> Either Error P3.EnumDefinition)
-encodeEnumDefinition = def "encodeEnumDefinition" $
-  doc "Encode a Hydra union type as a Protobuf enum definition" $
-  "cx" ~> "g" ~> "options" ~> "tname" ~> "fts" ~> lets [
-    "unspecifiedField">: record P3._EnumValue [
-      P3._EnumValue_name>>: asTerm encodeEnumValueName @@ var "tname" @@ (Core.name (string "unspecified")),
-      P3._EnumValue_number>>: int32 0,
-      P3._EnumValue_options>>: emptyList],
-    "encodeEnumField">: "field" ~> "idx" ~> lets [
-      "fname">: Core.fieldTypeName (var "field"),
-      "ftype">: Core.fieldTypeType (var "field")] $
-      "opts" <<~ (asTerm findOptions @@ var "cx" @@ var "g" @@ var "ftype") $
-      right $ record P3._EnumValue [
-        P3._EnumValue_name>>: asTerm encodeEnumValueName @@ var "tname" @@ var "fname",
-        P3._EnumValue_number>>: var "idx",
-        P3._EnumValue_options>>: var "opts"],
-    "indices">: Math.range (int32 1) (Lists.length (var "fts"))] $
-    "values" <<~ (Eithers.mapList
-      ("p" ~> var "encodeEnumField" @@ (Pairs.first (var "p")) @@ (Pairs.second (var "p")))
-      (Lists.zip (var "fts") (var "indices"))) $
-    right $ record P3._EnumDefinition [
-      P3._EnumDefinition_name>>: asTerm encodeTypeName @@ var "tname",
-      P3._EnumDefinition_values>>: Lists.cons (var "unspecifiedField") (var "values"),
-      P3._EnumDefinition_options>>: var "options"]
-
-encodeEnumValueName :: TTermDefinition (Name -> Name -> P3.EnumValueName)
-encodeEnumValueName = def "encodeEnumValueName" $
-  doc "Encode an enum value name from type name and field name" $
-  "tname" ~> "fname" ~> lets [
-    "prefix">: Formatting.nonAlnumToUnderscores @@ (Formatting.convertCaseCamelToUpperSnake @@ (Names.localNameOf @@ var "tname")),
-    "suffix">: Formatting.nonAlnumToUnderscores @@ (Formatting.convertCaseCamelToUpperSnake @@ (unwrap _Name @@ var "fname"))] $
-    wrap P3._EnumValueName (Strings.cat (list [var "prefix", string "_", var "suffix"]))
-
--- =============================================================================
--- Field encoding
--- =============================================================================
-
-encodeFieldName :: TTermDefinition (Bool -> Name -> P3.FieldName)
-encodeFieldName = def "encodeFieldName" $
-  doc "Encode a field name, optionally preserving the original case" $
-  "preserve" ~> "name" ~>
-    wrap P3._FieldName $
-      Logic.ifElse (var "preserve")
-        (unwrap _Name @@ var "name")
-        (Formatting.convertCaseCamelToLowerSnake @@ (unwrap _Name @@ var "name"))
-
--- | Returns the field and updated context (for counter threading)
-encodeFieldType :: TTermDefinition (Context -> Graph -> Namespace -> FieldType -> Either Error (P3.Field, Context))
-encodeFieldType = def "encodeFieldType" $
-  doc "Encode a Hydra field type as a Protobuf field" $
-  "cx" ~> "g" ~> "localNs" ~> "ft" ~> lets [
-    "fname">: Core.fieldTypeName (var "ft"),
-    "ftype">: Core.fieldTypeType (var "ft"),
-    "encodeType_">: "cx0" ~> "g0" ~> "ns0" ~> "typ" ~>
-      cases _Type (asTerm simplifyType @@ var "typ")
-        (Just $ Eithers.map
-          ("st" ~> inject P3._FieldType P3._FieldType_simple (var "st"))
-          (var "encodeSimpleType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ true @@ var "typ")) [
-        _Type_either>>: "et" ~> lets [
-          "ref">: inject _StructuralTypeRef (Name "either") (pair (Core.eitherTypeLeft (var "et")) (Core.eitherTypeRight (var "et")))] $
-          right $ inject P3._FieldType P3._FieldType_simple
-            (inject P3._SimpleType P3._SimpleType_reference (asTerm structuralTypeName @@ var "ns0" @@ var "ref")),
-        _Type_pair>>: "pt" ~> lets [
-          "ref">: inject _StructuralTypeRef (Name "pair") (pair (Core.pairTypeFirst (var "pt")) (Core.pairTypeSecond (var "pt")))] $
-          right $ inject P3._FieldType P3._FieldType_simple
-            (inject P3._SimpleType P3._SimpleType_reference (asTerm structuralTypeName @@ var "ns0" @@ var "ref")),
-        _Type_list>>: "lt" ~>
-          Eithers.map
-            ("st" ~> inject P3._FieldType P3._FieldType_repeated (var "st"))
-            (var "encodeSimpleType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ true @@ var "lt"),
-        _Type_set>>: "setType" ~>
-          Eithers.map
-            ("st" ~> inject P3._FieldType P3._FieldType_repeated (var "st"))
-            (var "encodeSimpleType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ true @@ var "setType"),
-        _Type_map>>: "mt" ~>
-          "kt" <<~ (var "encodeSimpleType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ false @@ (Core.mapTypeKeys (var "mt"))) $
-          "vt" <<~ (var "encodeSimpleType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ true @@ (Core.mapTypeValues (var "mt"))) $
-          right $ inject P3._FieldType P3._FieldType_map
-            (record P3._MapType [
-              P3._MapType_keys>>: var "kt",
-              P3._MapType_values>>: var "vt"]),
-        _Type_maybe>>: "ot" ~> cases _Type (Strip.deannotateType @@ var "ot")
-          (Just $ var "encodeType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ var "ot") [
-          _Type_literal>>: "lt" ~>
-            Eithers.map
-              ("st" ~> inject P3._FieldType P3._FieldType_simple (var "st"))
-              (asTerm encodeScalarTypeWrapped @@ var "cx0" @@ var "lt")],
-        _Type_union>>: "fts" ~>
-          "pfields" <<~ (asTerm mapAccumResult @@
-            ("cx_" ~> "f" ~> asTerm encodeFieldType @@ var "cx_" @@ var "g0" @@ var "ns0" @@ var "f") @@
-            var "cx0" @@
-            (var "fts")) $ lets [
-            "fields_">: Pairs.first (var "pfields")] $
-            right $ inject P3._FieldType P3._FieldType_oneof (var "fields_")],
-    "encodeSimpleType_">: "cx0" ~> "g0" ~> "ns0" ~> "noms" ~> "typ" ~> lets [
-      "forNominal">: "name" ~> right (inject P3._SimpleType P3._SimpleType_reference (asTerm encodeTypeReference @@ var "ns0" @@ var "name"))] $
-      cases _Type (asTerm simplifyType @@ var "typ")
-        (Just $ asTerm unexpectedE @@ var "cx0" @@ string "simple type" @@ (ShowCore.type_ @@ (Strip.removeTypeAnnotations @@ var "typ"))) [
-        _Type_literal>>: "lt" ~>
-          Eithers.map
-            ("st" ~> inject P3._SimpleType P3._SimpleType_scalar (var "st"))
-            (asTerm encodeScalarType @@ var "cx0" @@ var "lt"),
-        _Type_record>>: constant $ asTerm unexpectedE @@ var "cx0" @@ string "named type reference" @@ string "anonymous record type",
-        _Type_union>>: constant $ asTerm unexpectedE @@ var "cx0" @@ string "named type reference" @@ string "anonymous union type",
-        _Type_unit>>: constant $ right (inject P3._SimpleType P3._SimpleType_reference (wrap P3._TypeName (string "google.protobuf.Empty"))),
-        _Type_variable>>: "name" ~> Logic.ifElse (var "noms")
-          (var "forNominal" @@ var "name")
-          ("el" <<~ (Lexical.requireBinding @@ var "g0" @@ var "name") $ lets [
-            "term">: Core.bindingTerm (var "el")] $
-            Eithers.bind
-              (Eithers.bimap
-                ("de" ~> Error.errorOther (Error.otherError ((unwrap _DecodingError) @@ var "de")))
-                ("t" ~> var "t")
-                (decodeType @@ var "g0" @@ var "term"))
-              ("resolvedTyp" ~> var "encodeSimpleType_" @@ var "cx0" @@ var "g0" @@ var "ns0" @@ var "noms" @@ var "resolvedTyp"))]] $
-    "options" <<~ (asTerm findOptions @@ var "cx" @@ var "g" @@ var "ftype") $
-    "ft_" <<~ (var "encodeType_" @@ var "cx" @@ var "g" @@ var "localNs" @@ var "ftype") $ lets [
-      "idxPair">: Annotations.nextCount @@ asTerm key_proto_field_index @@ var "cx",
-      "idx">: Pairs.first (var "idxPair"),
-      "cx1">: Pairs.second (var "idxPair")] $
-    "preserve" <<~ (asTerm readBooleanAnnotation @@ var "cx" @@ var "g" @@ Constants.key_preserveFieldName @@ var "ftype") $
-    right $ pair
-      (record P3._Field [
-        P3._Field_name>>: asTerm encodeFieldName @@ var "preserve" @@ var "fname",
-        P3._Field_jsonName>>: nothing,
-        P3._Field_type>>: var "ft_",
-        P3._Field_number>>: var "idx",
-        P3._Field_options>>: var "options"])
-      (var "cx1")
-
--- =============================================================================
--- Record encoding
--- =============================================================================
-
--- | Returns the message definition; counter is threaded via context
-encodeRecordType :: TTermDefinition (Context -> Graph -> Namespace -> [P3.Option] -> Name -> [FieldType] -> Either Error P3.MessageDefinition)
-encodeRecordType = def "encodeRecordType" $
-  doc "Encode a Hydra record type as a Protobuf message definition" $
-  "cx" ~> "g" ~> "localNs" ~> "options" ~> "tname" ~> "fts" ~>
-    "result" <<~ (asTerm mapAccumResult @@
-      ("cx_" ~> "f" ~> asTerm encodeFieldType @@ var "cx_" @@ var "g" @@ var "localNs" @@ var "f") @@
-      var "cx" @@
-      var "fts") $ lets [
-      "pfields">: Pairs.first (var "result")] $
-      right $ record P3._MessageDefinition [
-        P3._MessageDefinition_name>>: asTerm encodeTypeName @@ var "tname",
-        P3._MessageDefinition_fields>>: var "pfields",
-        P3._MessageDefinition_options>>: var "options"]
-
--- =============================================================================
--- Scalar type encoding
--- =============================================================================
-
-encodeScalarType :: TTermDefinition (Context -> LiteralType -> Either Error P3.ScalarType)
-encodeScalarType = def "encodeScalarType" $
-  doc "Encode a Hydra literal type as a Protobuf scalar type" $
-  "cx" ~> "lt" ~>
-    cases _LiteralType (var "lt")
-      (Just $ asTerm unexpectedE @@ var "cx" @@ string "supported literal type" @@ (ShowCore.literalType @@ var "lt")) [
-      _LiteralType_binary>>: constant $ right (inject P3._ScalarType P3._ScalarType_bytes unit),
-      _LiteralType_boolean>>: constant $ right (inject P3._ScalarType P3._ScalarType_bool unit),
-      _LiteralType_float>>: "ft" ~>
-        cases _FloatType (var "ft")
-          (Just $ asTerm unexpectedE @@ var "cx" @@ string "32-bit or 64-bit floating-point type" @@ (ShowCore.floatType @@ var "ft")) [
-          _FloatType_float32>>: constant $ right (inject P3._ScalarType P3._ScalarType_float unit),
-          _FloatType_float64>>: constant $ right (inject P3._ScalarType P3._ScalarType_double unit)],
-      _LiteralType_integer>>: "it" ~>
-        cases _IntegerType (var "it")
-          (Just $ asTerm unexpectedE @@ var "cx" @@ string "32-bit or 64-bit integer type" @@ (ShowCore.integerType @@ var "it")) [
-          _IntegerType_int32>>: constant $ right (inject P3._ScalarType P3._ScalarType_int32 unit),
-          _IntegerType_int64>>: constant $ right (inject P3._ScalarType P3._ScalarType_int64 unit),
-          _IntegerType_uint32>>: constant $ right (inject P3._ScalarType P3._ScalarType_uint32 unit),
-          _IntegerType_uint64>>: constant $ right (inject P3._ScalarType P3._ScalarType_uint64 unit)],
-      _LiteralType_string>>: constant $ right (inject P3._ScalarType P3._ScalarType_string unit)]
-
-encodeScalarTypeWrapped :: TTermDefinition (Context -> LiteralType -> Either Error P3.SimpleType)
-encodeScalarTypeWrapped = def "encodeScalarTypeWrapped" $
-  doc "Encode a Hydra literal type as a wrapped Protobuf type (for optional scalars)" $
-  "cx" ~> "lt" ~> lets [
-    "toType">: "label" ~> right $
-      inject P3._SimpleType P3._SimpleType_reference (wrap P3._TypeName (Strings.cat (list [string "google.protobuf.", var "label", string "Value"])))] $
-    cases _LiteralType (var "lt")
-      (Just $ asTerm unexpectedE @@ var "cx" @@ string "supported literal type" @@ (ShowCore.literalType @@ var "lt")) [
-      _LiteralType_binary>>: constant $ var "toType" @@ string "Bytes",
-      _LiteralType_boolean>>: constant $ var "toType" @@ string "Bool",
-      _LiteralType_float>>: "ft" ~>
-        cases _FloatType (var "ft")
-          (Just $ asTerm unexpectedE @@ var "cx" @@ string "32-bit or 64-bit floating-point type" @@ (ShowCore.floatType @@ var "ft")) [
-          _FloatType_float32>>: constant $ var "toType" @@ string "Float",
-          _FloatType_float64>>: constant $ var "toType" @@ string "Double"],
-      _LiteralType_integer>>: "it" ~>
-        cases _IntegerType (var "it")
-          (Just $ asTerm unexpectedE @@ var "cx" @@ string "32-bit or 64-bit integer type" @@ (ShowCore.integerType @@ var "it")) [
-          _IntegerType_int32>>: constant $ var "toType" @@ string "Int32",
-          _IntegerType_int64>>: constant $ var "toType" @@ string "Int64",
-          _IntegerType_uint32>>: constant $ var "toType" @@ string "UInt32",
-          _IntegerType_uint64>>: constant $ var "toType" @@ string "UInt64"],
-      _LiteralType_string>>: constant $ var "toType" @@ string "String"]
-
--- =============================================================================
--- Type name encoding
--- =============================================================================
-
--- | Encode a simple type for helper message fields
-encodeSimpleTypeForHelper :: TTermDefinition (Context -> Namespace -> Type -> Either Error P3.SimpleType)
-encodeSimpleTypeForHelper = def "encodeSimpleTypeForHelper" $
-  doc "Encode a simple type for helper message fields" $
-  "cx" ~> "localNs" ~> "typ" ~> lets [
-    "forNominal">: "name" ~> right (inject P3._SimpleType P3._SimpleType_reference (asTerm encodeTypeReference @@ var "localNs" @@ var "name"))] $
-    cases _Type (asTerm simplifyType @@ var "typ")
-      (Just $ asTerm unexpectedE @@ var "cx" @@ string "simple type in structural type helper" @@ (ShowCore.type_ @@ (Strip.removeTypeAnnotations @@ var "typ"))) [
-      _Type_literal>>: "lt" ~>
-        Eithers.map
-          ("st" ~> inject P3._SimpleType P3._SimpleType_scalar (var "st"))
-          (asTerm encodeScalarType @@ var "cx" @@ var "lt"),
-      _Type_record>>: constant $ asTerm unexpectedE @@ var "cx" @@ string "named type reference" @@ string "anonymous record type",
-      _Type_union>>: constant $ asTerm unexpectedE @@ var "cx" @@ string "named type reference" @@ string "anonymous union type",
-      _Type_unit>>: constant $ right (inject P3._SimpleType P3._SimpleType_reference (wrap P3._TypeName (string "google.protobuf.Empty"))),
-      _Type_variable>>: "name" ~> var "forNominal" @@ var "name"]
-
-encodeTypeName :: TTermDefinition (Name -> P3.TypeName)
-encodeTypeName = def "encodeTypeName" $
-  doc "Encode a Hydra type name as a Protobuf type name" $
-  "name" ~> wrap P3._TypeName (Names.localNameOf @@ var "name")
-
-encodeTypeReference :: TTermDefinition (Namespace -> Name -> P3.TypeName)
-encodeTypeReference = def "encodeTypeReference" $
-  doc "Encode a Hydra name as a Protobuf type reference" $
-  "localNs" ~> "name" ~> lets [
-    "qn">: Names.qualifyName @@ var "name",
-    "local">: Packaging.qualifiedNameLocal (var "qn"),
-    "ns_">: Packaging.qualifiedNameNamespace (var "qn"),
-    "localNsParts">: Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (Strings.splitOn (string ".") (unwrap _Namespace @@ var "localNs")))] $
-    wrap P3._TypeName $
-      Maybes.maybe
-        (var "local")
-        ("nsVal" ~> lets [
-          "nsParts">: Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (Strings.splitOn (string ".") (unwrap _Namespace @@ var "nsVal")))] $
-          Logic.ifElse (Equality.equal (var "nsParts") (var "localNsParts"))
-            (var "local")
-            (Strings.intercalate (string ".") (Lists.concat (list [var "nsParts", list [var "local"]]))))
-        (var "ns_")
-
--- =============================================================================
--- Type flattening
--- =============================================================================
-
-err :: TTermDefinition (Context -> String -> Either Error a)
-err = def "err" $
-  "cx" ~> "msg" ~>
-  Ctx.failInContext (Error.errorOther $ Error.otherError (var "msg")) (var "cx")
-
-findOptions :: TTermDefinition (Context -> Graph -> Type -> Either Error [P3.Option])
-findOptions = def "findOptions" $
-  doc "Find Protobuf options for a type (description and deprecated)" $
-  "cx" ~> "g" ~> "typ" ~>
-    "mdesc" <<~ (Annotations.getTypeDescription @@ var "cx" @@ var "g" @@ var "typ") $
-    "bdep" <<~ (asTerm readBooleanAnnotation @@ var "cx" @@ var "g" @@ Constants.key_deprecated @@ var "typ") $ lets [
-      "mdescAnn">: Maybes.map
-        ("desc_" ~> record P3._Option [
-          P3._Option_name>>: ProtobufSerdeSource.descriptionOptionName,
-          P3._Option_value>>: inject P3._Value P3._Value_string (var "desc_")])
-        (var "mdesc"),
-      "mdepAnn">: Logic.ifElse (var "bdep")
-        (just $ record P3._Option [
-          P3._Option_name>>: string "deprecated",
-          P3._Option_value>>: inject P3._Value P3._Value_boolean true])
-        nothing] $
-      right $ Maybes.cat (list [var "mdescAnn", var "mdepAnn"])
-
--- =============================================================================
--- Enum detection
--- =============================================================================
-
--- | Eliminate type lambdas and type applications, simply replacing type variables with the string type
-flattenType :: TTermDefinition (Type -> Type)
-flattenType = def "flattenType" $
-  doc "Eliminate type lambdas and type applications, replacing type variables with the string type" $
-  "typ" ~>
-    Rewriting.rewriteType @@
-      ("recurse" ~> "t" ~>
-        cases _Type (var "t")
-          (Just $ var "recurse" @@ var "t") [
-          _Type_forall>>: "ft" ~> var "recurse" @@ (Variables.replaceFreeTypeVariable @@ (Core.forallTypeParameter (var "ft")) @@ (inject _Type _Type_literal (inject _LiteralType _LiteralType_string unit)) @@ (Core.forallTypeBody (var "ft"))),
-          _Type_application>>: "at" ~> var "recurse" @@ (Core.applicationTypeFunction (var "at"))]) @@
-      var "typ"
-
--- =============================================================================
--- Options
--- =============================================================================
-
-fromEitherString :: TTermDefinition (Context -> Either String a -> Either Error a)
-fromEitherString = def "fromEitherString" $
-  "cx" ~> "e" ~>
-  Eithers.bimap
-    ("msg" ~> Error.errorOther (Error.otherError (var "msg")))
-    ("a" ~> var "a")
-    (var "e")
-
--- =============================================================================
--- StructuralTypeRef helpers
--- =============================================================================
-
--- | Generate a helper message definition for a structural type.
--- Returns the definition and the updated context (counter state).
-generateStructuralTypeMessage :: TTermDefinition (Context -> Graph -> Namespace -> Term -> Either Error (P3.Definition, Context))
-generateStructuralTypeMessage = def "generateStructuralTypeMessage" $
-  doc "Generate a helper message definition for a structural type" $
-  "cx" ~> "g" ~> "localNs" ~> "ref" ~> lets [
-    "cx1">: Annotations.resetCount @@ asTerm key_proto_field_index @@ var "cx",
-    "cx2">: Pairs.second (Annotations.nextCount @@ asTerm key_proto_field_index @@ var "cx1"),
-    "makeField">: "cx0" ~> "fname" ~> "ftyp" ~>
-      "ft" <<~ (asTerm encodeSimpleTypeForHelper @@ var "cx0" @@ var "localNs" @@ var "ftyp") $ lets [
-        "idxPair">: Annotations.nextCount @@ asTerm key_proto_field_index @@ var "cx0",
-        "idx">: Pairs.first (var "idxPair"),
-        "cx1_">: Pairs.second (var "idxPair")] $
-        right $ pair
-          (record P3._Field [
-            P3._Field_name>>: wrap P3._FieldName (var "fname"),
-            P3._Field_jsonName>>: nothing,
-            P3._Field_type>>: inject P3._FieldType P3._FieldType_simple (var "ft"),
-            P3._Field_number>>: var "idx",
-            P3._Field_options>>: emptyList])
-          (var "cx1_")] $
-    match _StructuralTypeRef Nothing [
-      (Name "either")>>: "p" ~> lets [
-        "lt">: Pairs.first (var "p"),
-        "rt">: Pairs.second (var "p")] $
-        "leftResult" <<~ (var "makeField" @@ var "cx2" @@ string "left" @@ var "lt") $
-        "leftField" <~ Pairs.first (var "leftResult") $
-        "cx3" <~ Pairs.second (var "leftResult") $
-        "rightResult" <<~ (var "makeField" @@ var "cx3" @@ string "right" @@ var "rt") $
-        "rightField" <~ Pairs.first (var "rightResult") $
-        "cx4" <~ Pairs.second (var "rightResult") $
-        right $ pair
-          (inject P3._Definition P3._Definition_message $
-            record P3._MessageDefinition [
-              P3._MessageDefinition_name>>: asTerm structuralTypeName @@ var "localNs" @@ var "ref",
-              P3._MessageDefinition_fields>>: list [var "leftField", var "rightField"],
-              P3._MessageDefinition_options>>: emptyList])
-          (var "cx4"),
-      (Name "pair")>>: "p" ~> lets [
-        "ft">: Pairs.first (var "p"),
-        "st">: Pairs.second (var "p")] $
-        "firstResult" <<~ (var "makeField" @@ var "cx2" @@ string "first" @@ var "ft") $
-        "firstField" <~ Pairs.first (var "firstResult") $
-        "cx3" <~ Pairs.second (var "firstResult") $
-        "secondResult" <<~ (var "makeField" @@ var "cx3" @@ string "second" @@ var "st") $
-        "secondField" <~ Pairs.first (var "secondResult") $
-        "cx4" <~ Pairs.second (var "secondResult") $
-        right $ pair
-          (inject P3._Definition P3._Definition_message $
-            record P3._MessageDefinition [
-              P3._MessageDefinition_name>>: asTerm structuralTypeName @@ var "localNs" @@ var "ref",
-              P3._MessageDefinition_fields>>: list [var "firstField", var "secondField"],
-              P3._MessageDefinition_options>>: emptyList])
-          (var "cx4")] @@ var "ref"
-
-isEnumDefinition :: TTermDefinition (Type -> Bool)
-isEnumDefinition = def "isEnumDefinition" $
-  doc "Check if a type is an enum definition" $
-  "typ" ~>
-    cases _Type (asTerm simplifyType @@ var "typ")
-      (Just false) [
-      _Type_union>>: "fts" ~> asTerm isEnumFields @@ (var "fts")]
-
--- =============================================================================
--- Namespace conversion
--- =============================================================================
-
-isEnumFields :: TTermDefinition ([FieldType] -> Bool)
-isEnumFields = def "isEnumFields" $
-  doc "Check if all fields are unit types (i.e., this is an enum)" $
-  "fts" ~>
-    Lists.foldl
-      ("b" ~> "f" ~> Logic.and (var "b") (Predicates.isUnitType @@ (asTerm simplifyType @@ Core.fieldTypeType (var "f"))))
-      true
-      (var "fts")
-
-javaMultipleFilesOptionName :: TTermDefinition String
-javaMultipleFilesOptionName = def "javaMultipleFilesOptionName" $
-  string "java_multiple_files"
-
-javaPackageOptionName :: TTermDefinition String
-javaPackageOptionName = def "javaPackageOptionName" $
-  string "java_package"
-
--- =============================================================================
--- Module construction
--- =============================================================================
-
-key_proto_field_index :: TTermDefinition Name
-key_proto_field_index = def "key_proto_field_index" $
-  Core.name (string "proto_field_index")
-
--- =============================================================================
--- Error helpers
--- =============================================================================
-
--- | Helper to thread context through a list, accumulating results
-mapAccumResult :: TTermDefinition ((Context -> a -> Either Error (b, Context)) -> Context -> [a] -> Either Error ([b], Context))
-mapAccumResult = def "mapAccumResult" $
-  doc "Thread context through a list, accumulating results" $
-  "f" ~> "cx0" ~> "xs" ~>
-    Lists.foldl
-      ("accE" ~> "x" ~>
-        Eithers.bind (var "accE") ("accPair" ~> lets [
-          "bs">: Pairs.first (var "accPair"),
-          "cxN">: Pairs.second (var "accPair")] $
-          Eithers.map
-            ("resultPair" ~> pair
-              (Lists.concat (list [var "bs", list [Pairs.first (var "resultPair")]]))
-              (Pairs.second (var "resultPair")))
-            (var "f" @@ var "cxN" @@ var "x")))
-      (right $ pair emptyList (var "cx0"))
-      (var "xs")
-
--- =============================================================================
--- Definition encoding
--- =============================================================================
-
--- | Note: follows the Protobuf Style Guide (https://protobuf.dev/programming-guides/style)
-moduleToProtobuf :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToProtobuf = def "moduleToProtobuf" $
-  doc "Convert a Hydra module to Protocol Buffers v3 source files" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~> lets [
-    "ns_">: Packaging.moduleNamespace (var "mod"),
-    "partitioned">: Environment.partitionDefinitions @@ var "defs",
-    "typeDefs">: Pairs.first (var "partitioned")] $
-    "pfile" <<~ (asTerm constructModule @@ var "cx" @@ var "g" @@ var "mod" @@ var "typeDefs") $ lets [
-      "content">: Serialization.printExpr @@ (Serialization.parenthesize @@ (ProtobufSerdeSource.writeProtoFile @@ var "pfile")),
-      "path">: unwrap P3._FileReference @@ (asTerm namespaceToFileReference @@ var "ns_")] $
-      right $ Maps.singleton (var "path") (var "content")
-
--- =============================================================================
--- Option name constants
--- =============================================================================
-
-namespaceToFileReference :: TTermDefinition (Namespace -> P3.FileReference)
-namespaceToFileReference = def "namespaceToFileReference" $
-  doc "Convert a Hydra namespace to a Protobuf file reference" $
-  "ns_" ~> lets [
-    "pns">: Strings.intercalate (string "/")
-      (Lists.map (lambda "s" $ Formatting.convertCaseCamelToLowerSnake @@ var "s") (Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_")))] $
-    wrap P3._FileReference (Strings.cat2 (var "pns") (string ".proto"))
-
-namespaceToPackageName :: TTermDefinition (Namespace -> P3.PackageName)
-namespaceToPackageName = def "namespaceToPackageName" $
-  doc "Convert a Hydra namespace to a Protobuf package name" $
-  "ns_" ~>
-    wrap P3._PackageName $
-      Strings.intercalate (string ".")
-        (Lists.map
-          (lambda "s" $ Formatting.convertCaseCamelToLowerSnake @@ var "s")
-          (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_")))))
-
--- =============================================================================
--- Boolean annotation reading
--- =============================================================================
-
-readBooleanAnnotation :: TTermDefinition (Context -> Graph -> Name -> Type -> Either Error Bool)
-readBooleanAnnotation = def "readBooleanAnnotation" $
-  doc "Read a boolean annotation from a type" $
-  "cx" ~> "g" ~> "key" ~> "typ" ~>
-    Maybes.maybe
-      (right false)
-      ("term" ~> ExtractCore.boolean @@ var "g" @@ var "term")
-      (Maps.lookup (var "key") (Annotations.typeAnnotationInternal @@ var "typ"))
-
--- =============================================================================
--- Type simplification
--- =============================================================================
-
--- | Note: this should probably be done in the term adapters
-simplifyType :: TTermDefinition (Type -> Type)
-simplifyType = def "simplifyType" $
-  doc "Simplify a type by removing annotations and unwrapping newtypes" $
-  "typ" ~>
-    cases _Type (Strip.deannotateType @@ var "typ")
-      (Just $ Strip.deannotateType @@ var "typ") [
-      _Type_wrap>>: "wt" ~> asTerm simplifyType @@ (var "wt")]
-
--- | Generate a message name for a structural type reference.
--- The StructuralTypeRef is represented as a tagged union with "either" and "pair" variants,
--- where each variant holds a pair of types (left/right or first/second).
-structuralTypeName :: TTermDefinition (Namespace -> Term -> P3.TypeName)
-structuralTypeName = def "structuralTypeName" $
-  doc "Generate a message name for a structural type reference" $
-  "localNs" ~> "ref" ~> lets [
-    "typeSuffix">: "typ" ~> lets [
-      "st">: asTerm simplifyType @@ var "typ"] $
-      cases _Type (var "st")
-        (Just $ string "value") [
-        _Type_literal>>: "lt" ~>
-          cases _LiteralType (var "lt") (Just $ string "value") [
-            _LiteralType_binary>>: constant $ string "bytes",
-            _LiteralType_boolean>>: constant $ string "bool",
-            _LiteralType_float>>: "ft" ~>
-              cases _FloatType (var "ft") (Just $ string "float") [
-                _FloatType_float32>>: constant $ string "float",
-                _FloatType_float64>>: constant $ string "double"],
-            _LiteralType_integer>>: "it" ~>
-              cases _IntegerType (var "it") (Just $ string "int64") [
-                _IntegerType_int32>>: constant $ string "int32",
-                _IntegerType_int64>>: constant $ string "int64",
-                _IntegerType_uint32>>: constant $ string "uint32",
-                _IntegerType_uint64>>: constant $ string "uint64"],
-            _LiteralType_string>>: constant $ string "string"],
-        _Type_record>>: constant $ string "record",
-        _Type_union>>: constant $ string "union",
-        _Type_variable>>: "name" ~> Names.localNameOf @@ var "name",
-        _Type_unit>>: constant $ string "unit",
-        _Type_list>>: constant $ string "list",
-        _Type_set>>: constant $ string "set",
-        _Type_map>>: constant $ string "map",
-        _Type_maybe>>: constant $ string "maybe"]] $
-    wrap P3._TypeName $
-      match _StructuralTypeRef Nothing [
-        (Name "either")>>: "p" ~>
-          Strings.cat (list [string "Either_",
-            var "typeSuffix" @@ (Pairs.first (var "p")),
-            string "_",
-            var "typeSuffix" @@ (Pairs.second (var "p"))]),
-        (Name "pair")>>: "p" ~>
-          Strings.cat (list [string "Pair_",
-            var "typeSuffix" @@ (Pairs.first (var "p")),
-            string "_",
-            var "typeSuffix" @@ (Pairs.second (var "p"))])] @@ var "ref"
-
-unexpectedE :: TTermDefinition (Context -> String -> String -> Either Error a)
-unexpectedE = def "unexpectedE" $
-  "cx" ~> "expected" ~> "found" ~>
-  asTerm err @@ var "cx" @@ (Strings.cat (list [string "Expected ", var "expected", string ", found: ", var "found"]))
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/Environment.hs b/src/main/haskell/Hydra/Sources/Protobuf/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/Environment.hs
+++ /dev/null
@@ -1,42 +0,0 @@
--- | Type definitions for the Protobuf code generation environment.
-
-module Hydra.Sources.Protobuf.Environment where
-
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as CoreTypes
-
-ns :: Namespace
-ns = Namespace "hydra.protobuf.environment"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-coreType :: String -> Type
-coreType = typeref CoreTypes.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [CoreTypes.ns],
-            moduleDescription = Just "Type definitions for the Protobuf code generation environment"}
-  where
-    definitions = [
-      structuralTypeRefType]
-
--- | A reference to a structural type (Either or Pair) with its component types
-structuralTypeRefType :: Binding
-structuralTypeRefType = define "StructuralTypeRef" $
-  doc "A reference to a structural type (Either or Pair) with its component types" $
-  T.union [
-    "either" >:
-      doc "An Either type with left and right component types" $
-      T.pair (coreType "Type") (coreType "Type"),
-    "pair" >:
-      doc "A Pair type with first and second component types" $
-      T.pair (coreType "Type") (coreType "Type")]
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/Language.hs b/src/main/haskell/Hydra/Sources/Protobuf/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/Language.hs
+++ /dev/null
@@ -1,166 +0,0 @@
-module Hydra.Sources.Protobuf.Language (module_, protobufLanguage) where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-definition_ :: String -> TTerm a -> TTermDefinition a
-definition_ = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.protobuf.language"),
-            moduleDefinitions = [toDefinition protobufLanguage, toDefinition protobufReservedWords],
-            moduleTermDependencies = [Lexical.ns, Strip.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for Protobuf v3"}
-protobufLanguage :: TTermDefinition Language
-protobufLanguage = definition_ "protobufLanguage" $
-  doc "Language constraints for Protocol Buffers v3" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBinary,
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat32,
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeInt32,
-    Core.integerTypeInt64,
-    Core.integerTypeUint32,
-    Core.integerTypeUint64],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantEither,
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantPair,
-    Variants.termVariantRecord,
-    Variants.termVariantSet,
-    Variants.termVariantInject,
-    Variants.termVariantUnit,
-    Variants.termVariantWrap],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantEither,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantPair,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion,
-    Variants.typeVariantUnit,
-    Variants.typeVariantVariable,
-    Variants.typeVariantVoid,
-    Variants.typeVariantWrap],
-  "typePredicate">: "typ" ~> cases _Type (var "typ")
-    (Just true) [
-    _Type_map>>: "mt" ~> lets [
-      "valuesType">: Core.mapTypeValues $ var "mt",
-      "stripped">: Strip.deannotateType @@ var "valuesType"] $
-      cases _Type (var "stripped")
-        (Just true) [
-        _Type_maybe>>: constant false]]] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.protobuf")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-protobufReservedWords :: TTermDefinition (S.Set String)
-protobufReservedWords = definition_ "protobufReservedWords" $
-  doc "A set of reserved words in Protobuf" $ lets [
-  "fieldNames">:
-    doc "See: http://google.github.io/proto-lens/reserved-names.html" $
-    list $ string <$> [
-      "case", "class", "data", "default", "deriving", "do", "else", "foreign", "if", "import", "in", "infix", "infixl",
-      "infixr", "instance", "let", "mdo", "module", "newtype", "of", "pattern", "proc", "rec", "then", "type", "where"]] $
-  Sets.fromList $ Lists.concat $ list [var "fieldNames"]
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/Proto3.hs b/src/main/haskell/Hydra/Sources/Protobuf/Proto3.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/Proto3.hs
+++ /dev/null
@@ -1,222 +0,0 @@
-module Hydra.Sources.Protobuf.Proto3 where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel hiding (packageName)
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.protobuf.proto3"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-proto3 :: String -> Type
-proto3 = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model for Protocol Buffers v3 enum and message types, designed as a target for transformations."
-      ++ "This model is loosely based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/type.proto,"
-      ++ " as well as the proto3 reference documentation")}
-  where
-    definitions = [
-      definition,
-      enumDefinition,
-      enumValue,
-      enumValueName,
-      field,
-      fieldName_,
-      fieldType,
-      fileReference,
-      mapType,
-      messageDefinition,
-      option,
-      packageName,
-      protoFile,
-      scalarType,
-      simpleType,
-      typeName,
-      typeReference,
-      value]
-
-definition :: Binding
-definition = define "Definition" $
-  T.union [
-    "enum">: proto3 "EnumDefinition",
-    "message">: proto3 "MessageDefinition"]
-
-enumDefinition :: Binding
-enumDefinition = define "EnumDefinition" $
-  doc "Enum type definition" $
-  T.record [
-    "name">:
-      doc "Enum type name" $
-      proto3 "TypeName",
-    "values">:
-      doc "Enum value definitions" $
-      T.list $ proto3 "EnumValue",
-    "options">:
-      doc "Protocol buffer options" $
-      T.list $ proto3 "Option"]
-
-enumValue :: Binding
-enumValue = define "EnumValue" $
-  doc "Enum value definition" $
-  T.record [
-    "name">:
-      doc "Enum value name" $
-      proto3 "EnumValueName",
-    "number">:
-      doc "Enum value number"
-      T.int32,
-    "options">:
-      doc "Protocol buffer options" $
-      T.list $ proto3 "Option"]
-
-enumValueName :: Binding
-enumValueName = define "EnumValueName" $
-  T.wrap T.string
-
-field :: Binding
-field = define "Field" $
-  doc "A single field of a message type" $
-  T.record [
-    "name">:
-      doc "The field name" $
-      proto3 "FieldName",
-    "jsonName">:
-      doc "The field JSON name" $
-      T.optional T.string,
-    "type">:
-      doc "The datatype of the field" $
-      proto3 "FieldType",
-    "number">:
-      doc "The field number"
-      T.int32,
-    "options">:
-      doc "The protocol buffer options" $
-      T.list $ proto3 "Option"]
-
-fieldName_ :: Binding
-fieldName_ = define "FieldName" $
-  doc "The name of a field" $
-  T.wrap T.string
-
-fieldType :: Binding
-fieldType = define "FieldType" $
-  T.union [
-    "map">: proto3 "MapType",
-    "oneof">: T.list $ proto3 "Field",
-    "repeated">: proto3 "SimpleType",
-    "simple">: proto3 "SimpleType"]
-
-fileReference :: Binding
-fileReference = define "FileReference" $
-  T.wrap T.string
-
-mapType :: Binding
-mapType = define "MapType" $
-  T.record [
-    "keys">: proto3 "SimpleType",
-    "values">: proto3 "SimpleType"]
-
-messageDefinition :: Binding
-messageDefinition = define "MessageDefinition" $
-  doc "A protocol buffer message type" $
-  T.record [
-    "name">:
-      doc "The fully qualified message name" $
-      proto3 "TypeName",
-    "fields">:
-      doc "The list of fields" $
-      T.list $ proto3 "Field",
-    "options">:
-      doc "The protocol buffer options" $
-      T.list $ proto3 "Option"]
-
-option :: Binding
-option = define "Option" $
-  doc ("A protocol buffer option, which can be attached to a message, field, " ++
-       "enumeration, etc") $
-  T.record [
-    "name">:
-      doc ("The option's name. For protobuf built-in options (options defined in " ++
-           "descriptor.proto), this is the short name. For example, `\"map_entry\"`. " ++
-           "For custom options, it should be the fully-qualified name. For example, " ++
-           "`\"google.api.http\"`.")
-      T.string,
-    "value">:
-      doc ("The option's value") $
-      proto3 "Value"]
-
-packageName :: Binding
-packageName = define "PackageName" $
-  T.wrap T.string
-
-protoFile :: Binding
-protoFile = define "ProtoFile" $
-  doc "A .proto file, usually containing one or more enum or message type definitions" $
-  T.record [
-    "package">: proto3 "PackageName",
-    "imports">: T.list $ proto3 "FileReference",
-    "types">: T.list $ proto3 "Definition",
-    "options">: T.list $ proto3 "Option"]
-
-scalarType :: Binding
-scalarType = define "ScalarType" $
-  doc "One of several Proto3 scalar types" $
-  T.enum [
-    "bool",
-    "bytes",
-    "double",
-    "fixed32",
-    "fixed64",
-    "float",
-    "int32",
-    "int64",
-    "sfixed32",
-    "sfixed64",
-    "sint32",
-    "sint64",
-    "string",
-    "uint32",
-    "uint64"]
-
-simpleType :: Binding
-simpleType = define "SimpleType" $
-  doc "A scalar type or a reference to an enum type or message type" $
-  T.union [
-    "reference">: proto3 "TypeName",
-    "scalar">: proto3 "ScalarType"]
-
-typeName :: Binding
-typeName = define "TypeName" $
-  doc "The local name of an enum type or message type" $
-  T.wrap T.string
-
-typeReference :: Binding
-typeReference = define "TypeReference" $
-  doc "A reference to an enum type or message type" $
-  T.wrap T.string
-
-value :: Binding
-value = define "Value" $
-  doc "A scalar value" $
-  T.union [
-    "boolean">: T.boolean,
-    "string">: T.string
-    -- Add other scalar value types as needed
-  ]
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/Serde.hs b/src/main/haskell/Hydra/Sources/Protobuf/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/Serde.hs
+++ /dev/null
@@ -1,403 +0,0 @@
-module Hydra.Sources.Protobuf.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Protobuf.Proto3 as P3
-import qualified Hydra.Sources.Protobuf.Proto3 as Proto3Syntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.protobuf.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Serialization.ns],
-            moduleTypeDependencies = (Proto3Syntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting Protocol Buffers v3 AST to abstract expressions"}
-  where
-    definitions = [
-      toDefinition deprecatedOptionName,
-      toDefinition descriptionOptionName,
-      toDefinition excludeInternalOptions,
-      toDefinition optDesc,
-      toDefinition protoBlock,
-      toDefinition semi,
-      toDefinition writeDefinition,
-      toDefinition writeEnumDefinition,
-      toDefinition writeEnumValue,
-      toDefinition writeField,
-      toDefinition writeFieldOption,
-      toDefinition writeFieldOptions,
-      toDefinition writeFieldType,
-      toDefinition writeFileOption,
-      toDefinition writeFileOptions,
-      toDefinition writeImport,
-      toDefinition writeMessageDefinition,
-      toDefinition writeProtoFile,
-      toDefinition writeScalarType,
-      toDefinition writeSimpleType,
-      toDefinition writeValue]
-
-
-deprecatedOptionName :: TTermDefinition String
-deprecatedOptionName = define "deprecatedOptionName" $
-  doc "The name of the deprecated option" $
-  string "deprecated"
-
-descriptionOptionName :: TTermDefinition String
-descriptionOptionName = define "descriptionOptionName" $
-  doc "A special Protobuf option name for descriptions (documentation)" $
-  string "_description"
-
-excludeInternalOptions :: TTermDefinition ([P3.Option] -> [P3.Option])
-excludeInternalOptions = define "excludeInternalOptions" $
-  doc "Filter out internal options (those whose names start with underscore)" $
-  lambda "opts" $
-    Lists.filter
-      (lambda "opt" $ Logic.not $
-        Equality.equal
-          (Maybes.fromMaybe (int32 0) (Strings.maybeCharAt (int32 0) (project P3._Option P3._Option_name @@ var "opt")))
-          (int32 95))  -- 95 = '_'
-      (var "opts")
-
-optDesc :: TTermDefinition (Bool -> [P3.Option] -> Expr -> Expr)
-optDesc = define "optDesc" $
-  doc "Prepend an optional description comment to an expression" $
-  lambda "doubleNewline" $ lambda "opts" $ lambda "expr" $ lets [
-    "descs">: Lists.filter
-      (lambda "opt" $ Equality.equal (project P3._Option P3._Option_name @@ var "opt") (string "_description"))
-      (var "opts")] $
-    Maybes.maybe
-      (var "expr")
-      (lambda "firstDesc" $ lets [
-        "descValue">: project P3._Option P3._Option_value @@ var "firstDesc",
-        "descStr">: cases P3._Value (var "descValue") Nothing [
-          P3._Value_boolean>>: lambda "b" $ Logic.ifElse (var "b") (string "true") (string "false"),
-          P3._Value_string>>: lambda "s" $ var "s"],
-        "commentLines">: Lists.map
-          (lambda "line" $ Logic.ifElse (Equality.equal (var "line") (string ""))
-            (string "//")
-            (Strings.cat2 (string "// ") (var "line")))
-          (Strings.lines (var "descStr")),
-        "comment">: Serialization.cst @@ (Strings.intercalate (string "\n") (var "commentLines")),
-        "sep">: Logic.ifElse (var "doubleNewline")
-          (Serialization.doubleNewlineSep @@ list [var "comment", var "expr"])
-          (Serialization.newlineSep @@ list [var "comment", var "expr"])] $
-        var "sep")
-      (Lists.maybeHead (var "descs"))
-
-protoBlock :: TTermDefinition ([Expr] -> Expr)
-protoBlock = define "protoBlock" $
-  doc "Wrap expressions in a curly-braced block with double-newline separation" $
-  lambda "exprs" $
-    Serialization.brackets @@ Serialization.curlyBraces @@ Serialization.fullBlockStyle @@
-      (Serialization.doubleNewlineSep @@ var "exprs")
-
-semi :: TTermDefinition (Expr -> Expr)
-semi = define "semi" $
-  doc "Append a semicolon to an expression" $
-  lambda "e" $ Serialization.noSep @@ list [var "e", Serialization.cst @@ string ";"]
-
-writeDefinition :: TTermDefinition (P3.Definition -> Expr)
-writeDefinition = define "writeDefinition" $
-  doc "Convert a definition to an expression" $
-  lambda "def" $
-    cases P3._Definition (var "def") Nothing [
-      P3._Definition_enum>>: lambda "e" $ writeEnumDefinition @@ var "e",
-      P3._Definition_message>>: lambda "m" $ writeMessageDefinition @@ var "m"]
-
-writeEnumDefinition :: TTermDefinition (P3.EnumDefinition -> Expr)
-writeEnumDefinition = define "writeEnumDefinition" $
-  doc "Convert an enum definition to an expression" $
-  lambda "ed" $ lets [
-    "name">: project P3._EnumDefinition P3._EnumDefinition_name @@ var "ed",
-    "values">: project P3._EnumDefinition P3._EnumDefinition_values @@ var "ed",
-    "options">: project P3._EnumDefinition P3._EnumDefinition_options @@ var "ed"] $
-    optDesc @@ false @@ var "options" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "enum",
-        Serialization.cst @@ (unwrap P3._TypeName @@ var "name"),
-        protoBlock @@ (Lists.map writeEnumValue (var "values"))])
-
-writeEnumValue :: TTermDefinition (P3.EnumValue -> Expr)
-writeEnumValue = define "writeEnumValue" $
-  doc "Convert an enum value to an expression" $
-  lambda "ev" $ lets [
-    "name">: project P3._EnumValue P3._EnumValue_name @@ var "ev",
-    "number">: project P3._EnumValue P3._EnumValue_number @@ var "ev",
-    "options">: project P3._EnumValue P3._EnumValue_options @@ var "ev"] $
-    optDesc @@ false @@ var "options" @@
-      (semi @@ (Serialization.spaceSep @@ list [
-        Serialization.cst @@ (unwrap P3._EnumValueName @@ var "name"),
-        Serialization.cst @@ string "=",
-        Serialization.cst @@ (Literals.showInt32 (var "number"))]))
-
-writeField :: TTermDefinition (P3.Field -> Expr)
-writeField = define "writeField" $
-  doc "Convert a field to an expression" $
-  lambda "f" $ lets [
-    "name">: project P3._Field P3._Field_name @@ var "f",
-    "typ">: project P3._Field P3._Field_type @@ var "f",
-    "num">: project P3._Field P3._Field_number @@ var "f",
-    "options">: project P3._Field P3._Field_options @@ var "f"] $
-    optDesc @@ false @@ var "options" @@
-      (cases P3._FieldType (var "typ") Nothing [
-        P3._FieldType_oneof>>: lambda "fields" $
-          Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "oneof",
-            Serialization.cst @@ (unwrap P3._FieldName @@ var "name"),
-            protoBlock @@ (Lists.map writeField (var "fields"))],
-        P3._FieldType_map>>: lambda "mt" $ lets [
-          "kt">: project P3._MapType P3._MapType_keys @@ var "mt",
-          "vt">: project P3._MapType P3._MapType_values @@ var "mt"] $
-          semi @@ (Serialization.spaceSep @@ (Maybes.cat $ list [
-            Maybes.pure (writeFieldType @@ var "typ"),
-            Maybes.pure (Serialization.cst @@ (unwrap P3._FieldName @@ var "name")),
-            Maybes.pure (Serialization.cst @@ string "="),
-            Maybes.pure (Serialization.cst @@ (Literals.showInt32 (var "num"))),
-            writeFieldOptions @@ var "options"])),
-        P3._FieldType_repeated>>: lambda "st" $
-          semi @@ (Serialization.spaceSep @@ (Maybes.cat $ list [
-            Maybes.pure (writeFieldType @@ var "typ"),
-            Maybes.pure (Serialization.cst @@ (unwrap P3._FieldName @@ var "name")),
-            Maybes.pure (Serialization.cst @@ string "="),
-            Maybes.pure (Serialization.cst @@ (Literals.showInt32 (var "num"))),
-            writeFieldOptions @@ var "options"])),
-        P3._FieldType_simple>>: lambda "st" $
-          semi @@ (Serialization.spaceSep @@ (Maybes.cat $ list [
-            Maybes.pure (writeFieldType @@ var "typ"),
-            Maybes.pure (Serialization.cst @@ (unwrap P3._FieldName @@ var "name")),
-            Maybes.pure (Serialization.cst @@ string "="),
-            Maybes.pure (Serialization.cst @@ (Literals.showInt32 (var "num"))),
-            writeFieldOptions @@ var "options"]))])
-
-writeFieldOption :: TTermDefinition (P3.Option -> Expr)
-writeFieldOption = define "writeFieldOption" $
-  doc "Convert a field option to an expression" $
-  lambda "opt" $ lets [
-    "name">: project P3._Option P3._Option_name @@ var "opt",
-    "value">: project P3._Option P3._Option_value @@ var "opt"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ var "name",
-      Serialization.cst @@ string "=",
-      writeValue @@ var "value"]
-
-writeFieldOptions :: TTermDefinition ([P3.Option] -> Maybe Expr)
-writeFieldOptions = define "writeFieldOptions" $
-  doc "Convert field options to an optional bracket-enclosed expression" $
-  lambda "opts0" $ lets [
-    "opts">: excludeInternalOptions @@ var "opts0"] $
-    Logic.ifElse (Lists.null (var "opts"))
-      nothing
-      (Maybes.pure (Serialization.bracketList @@ Serialization.inlineStyle @@
-        (Lists.map writeFieldOption (var "opts"))))
-
-writeFieldType :: TTermDefinition (P3.FieldType -> Expr)
-writeFieldType = define "writeFieldType" $
-  doc "Convert a field type to an expression" $
-  lambda "ftyp" $
-    cases P3._FieldType (var "ftyp") Nothing [
-      P3._FieldType_map>>: lambda "mt" $ lets [
-        "kt">: project P3._MapType P3._MapType_keys @@ var "mt",
-        "vt">: project P3._MapType P3._MapType_values @@ var "mt"] $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "map",
-          Serialization.angleBracesList @@ Serialization.inlineStyle @@ list [
-            writeSimpleType @@ var "kt",
-            writeSimpleType @@ var "vt"]],
-      P3._FieldType_repeated>>: lambda "st" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "repeated",
-          writeSimpleType @@ var "st"],
-      P3._FieldType_simple>>: lambda "st" $ writeSimpleType @@ var "st",
-      P3._FieldType_oneof>>: lambda "fields" $
-        Serialization.cst @@ string "oneof"]
-
-writeFileOption :: TTermDefinition (P3.Option -> Expr)
-writeFileOption = define "writeFileOption" $
-  doc "Convert a file-level option to an expression" $
-  lambda "opt" $ lets [
-    "name">: project P3._Option P3._Option_name @@ var "opt",
-    "value">: project P3._Option P3._Option_value @@ var "opt"] $
-    semi @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "option",
-      Serialization.cst @@ var "name",
-      Serialization.cst @@ string "=",
-      writeValue @@ var "value"])
-
-writeFileOptions :: TTermDefinition ([P3.Option] -> Maybe Expr)
-writeFileOptions = define "writeFileOptions" $
-  doc "Convert file-level options to an optional newline-separated expression" $
-  lambda "opts0" $ lets [
-    "opts">: excludeInternalOptions @@ var "opts0"] $
-    Logic.ifElse (Lists.null (var "opts"))
-      nothing
-      (Maybes.pure (Serialization.newlineSep @@ (Lists.map writeFileOption (var "opts"))))
-
-writeImport :: TTermDefinition (P3.FileReference -> Expr)
-writeImport = define "writeImport" $
-  doc "Convert a file reference to an import expression" $
-  lambda "ref" $
-    semi @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "import",
-      Serialization.cst @@ (Literals.showString (unwrap P3._FileReference @@ var "ref"))])
-
-writeMessageDefinition :: TTermDefinition (P3.MessageDefinition -> Expr)
-writeMessageDefinition = define "writeMessageDefinition" $
-  doc "Convert a message definition to an expression" $
-  lambda "md" $ lets [
-    "name">: project P3._MessageDefinition P3._MessageDefinition_name @@ var "md",
-    "fields">: project P3._MessageDefinition P3._MessageDefinition_fields @@ var "md",
-    "options">: project P3._MessageDefinition P3._MessageDefinition_options @@ var "md"] $
-    optDesc @@ false @@ var "options" @@
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "message",
-        Serialization.cst @@ (unwrap P3._TypeName @@ var "name"),
-        protoBlock @@ (Lists.map writeField (var "fields"))])
-
-writeProtoFile :: TTermDefinition (P3.ProtoFile -> Expr)
-writeProtoFile = define "writeProtoFile" $
-  doc "Convert a proto file to an expression" $
-  lambda "pf" $ lets [
-    "pkg">: project P3._ProtoFile P3._ProtoFile_package @@ var "pf",
-    "imports">: project P3._ProtoFile P3._ProtoFile_imports @@ var "pf",
-    "defs">: project P3._ProtoFile P3._ProtoFile_types @@ var "pf",
-    "options">: project P3._ProtoFile P3._ProtoFile_options @@ var "pf",
-    "headerSec">: Maybes.pure (Serialization.newlineSep @@ list [
-      semi @@ (Serialization.cst @@ string "syntax = \"proto3\""),
-      semi @@ (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "package",
-        Serialization.cst @@ (unwrap P3._PackageName @@ var "pkg")])]),
-    "importsSec">: Logic.ifElse (Lists.null (var "imports"))
-      nothing
-      (Maybes.pure (Serialization.newlineSep @@ (Lists.map writeImport (var "imports")))),
-    "options1">: Lists.filter
-      (lambda "opt" $ Logic.not $ Equality.equal (project P3._Option P3._Option_name @@ var "opt") (string "_description"))
-      (var "options"),
-    "optionsSec">: writeFileOptions @@ var "options1",
-    "defsSec">: Logic.ifElse (Lists.null (var "defs"))
-      nothing
-      (Maybes.pure (Serialization.doubleNewlineSep @@ (Lists.map writeDefinition (var "defs"))))] $
-    optDesc @@ true @@ var "options" @@
-      (Serialization.doubleNewlineSep @@ (Maybes.cat $ list [
-        var "headerSec", var "importsSec", var "optionsSec", var "defsSec"]))
-
-writeScalarType :: TTermDefinition (P3.ScalarType -> Expr)
-writeScalarType = define "writeScalarType" $
-  doc "Convert a scalar type to an expression" $
-  lambda "sct" $ Serialization.cst @@
-    (cases P3._ScalarType (var "sct") Nothing [
-      P3._ScalarType_bool>>: constant $ string "bool",
-      P3._ScalarType_bytes>>: constant $ string "bytes",
-      P3._ScalarType_double>>: constant $ string "double",
-      P3._ScalarType_fixed32>>: constant $ string "fixed32",
-      P3._ScalarType_fixed64>>: constant $ string "fixed64",
-      P3._ScalarType_float>>: constant $ string "float",
-      P3._ScalarType_int32>>: constant $ string "int32",
-      P3._ScalarType_int64>>: constant $ string "int64",
-      P3._ScalarType_sfixed32>>: constant $ string "sfixed32",
-      P3._ScalarType_sfixed64>>: constant $ string "sfixed64",
-      P3._ScalarType_sint32>>: constant $ string "sint32",
-      P3._ScalarType_sint64>>: constant $ string "sint64",
-      P3._ScalarType_string>>: constant $ string "string",
-      P3._ScalarType_uint32>>: constant $ string "uint32",
-      P3._ScalarType_uint64>>: constant $ string "uint64"])
-
-writeSimpleType :: TTermDefinition (P3.SimpleType -> Expr)
-writeSimpleType = define "writeSimpleType" $
-  doc "Convert a simple type to an expression" $
-  lambda "st" $
-    cases P3._SimpleType (var "st") Nothing [
-      P3._SimpleType_reference>>: lambda "name" $
-        Serialization.cst @@ (unwrap P3._TypeName @@ var "name"),
-      P3._SimpleType_scalar>>: lambda "sct" $ writeScalarType @@ var "sct"]
-
-writeValue :: TTermDefinition (P3.Value -> Expr)
-writeValue = define "writeValue" $
-  doc "Convert a value to an expression" $
-  lambda "v" $ Serialization.cst @@
-    (cases P3._Value (var "v") Nothing [
-      P3._Value_boolean>>: lambda "b" $ Logic.ifElse (var "b") (string "true") (string "false"),
-      P3._Value_string>>: lambda "s" $ Literals.showString (var "s")])
diff --git a/src/main/haskell/Hydra/Sources/Protobuf/SourceContext.hs b/src/main/haskell/Hydra/Sources/Protobuf/SourceContext.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Protobuf/SourceContext.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-module Hydra.Sources.Protobuf.SourceContext where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.protobuf.sourceContext"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-pbSourceContext :: String -> Type
-pbSourceContext = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "Based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/source_context.proto"}
-  where
-    definitions = [sourceContext]
-
-sourceContext :: Binding
-sourceContext = define "SourceContext" $
-  doc ("`SourceContext` represents information about the source of a " ++
-       "protobuf element, like the file in which it is defined.") $
-  T.record [
-    "fileName">:
-      doc ("The path-qualified name of the .proto file that contained the associated " ++
-           "protobuf element.  For example: `\"google/protobuf/source_context.proto\"`.")
-      T.string]
diff --git a/src/main/haskell/Hydra/Sources/Python/Coder.hs b/src/main/haskell/Hydra/Sources/Python/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Coder.hs
+++ /dev/null
@@ -1,4184 +0,0 @@
--- | Python code generator in Hydra DSL.
--- This module provides DSL versions of all Python code generation functions,
--- including the main entry points (moduleToPython, encodePythonModule).
-
-module Hydra.Sources.Python.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Dependencies   as Dependencies
-import qualified Hydra.Sources.Kernel.Terms.Scoping        as Scoping
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Resolution    as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Analysis      as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Python.Syntax as Py
-import qualified Hydra.Python.Environment as PyHelpers
-import qualified Hydra.Sources.Python.Syntax as PySyntax
-import qualified Hydra.Sources.Python.Environment as PyEnvironmentSource
-import qualified Hydra.Sources.Python.Serde as PySerde
-import qualified Hydra.Sources.Python.Names as PyNames
-import qualified Hydra.Sources.Python.Utils as PyUtils
-import qualified Hydra.Dsl.Python.Helpers as PyDsl
-import qualified Hydra.Typing as HydraTyping
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.python.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [PyUtils.ns, PyNames.ns, PySerde.ns, Serialization.ns, Analysis.ns, Environment.ns, Formatting.ns, Names.ns, Predicates.ns, Resolution.ns, Rewriting.ns, Dependencies.ns, Scoping.ns, Strip.ns, Variables.ns, ShowCore.ns, Reduction.ns, Sorting.ns, Inference.ns],
-            moduleTypeDependencies = (PyEnvironmentSource.ns:PySyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Python code generator: converts Hydra modules to Python source code"}
-  where
-    definitions = [
-      toDefinition Environment.reorderDefs,
-      toDefinition analyzePythonFunction,
-      toDefinition classVariantPatternUnit,
-      toDefinition classVariantPatternWithCapture,
-      toDefinition collectTypeVariables,
-      toDefinition condImportSymbol,
-      toDefinition dataclassDecorator,
-      toDefinition deconflictVariantName,
-      toDefinition deduplicateCaseVariables,
-      toDefinition digForWrap,
-      toDefinition eliminateUnitVar,
-      toDefinition emptyMetadata,
-      toDefinition encodeApplication,
-      toDefinition encodeApplicationInner,
-      toDefinition encodeApplicationType,
-      toDefinition encodeBindingAs,
-      toDefinition encodeBindingAsAssignment,
-      toDefinition encodeBindingsAsDefs,
-      toDefinition encodeCaseBlock,
-      toDefinition encodeDefaultCaseBlock,
-      toDefinition encodeDefinition,
-      toDefinition encodeEnumValueAssignment,
-      toDefinition encodeField,
-      toDefinition encodeFieldType,
-      toDefinition encodeFloatValue,
-      toDefinition encodeFloatValue_encodeFloat32,
-      toDefinition encodeFloatValue_encodeFloat64,
-      toDefinition encodeFloatValue_pySpecialFloat,
-      toDefinition encodeForallType,
-      toDefinition encodeFunctionDefinition,
-      toDefinition encodeFunctionType,
-      toDefinition encodeIntegerValue,
-      toDefinition encodeLiteral,
-      toDefinition encodeLiteralType,
-      toDefinition encodeNameConstants,
-      toDefinition encodePythonModule,
-      toDefinition encodeRecordType,
-      toDefinition encodeTermAssignment,
-      toDefinition encodeTermInline,
-      toDefinition encodeTermMultiline,
-      toDefinition encodeTermMultilineTCO,
-      toDefinition encodeType,
-      toDefinition encodeTypeAssignment,
-      toDefinition encodeTypeAssignmentInner,
-      toDefinition encodeTypeDefSingle,
-      toDefinition encodeTypeQuoted,
-      toDefinition encodeUnionEliminationInline,
-      toDefinition encodeUnionField,
-      toDefinition encodeUnionFieldAlt,
-      toDefinition encodeUnionType,
-      toDefinition encodeVariable,
-      toDefinition encodeWrappedType,
-      toDefinition enumVariantPattern,
-      toDefinition environmentTypeParameters,
-      toDefinition extendEnvWithLambdaParams,
-      toDefinition extendEnvWithTypeVar,
-      toDefinition extendMetaForTerm,
-      toDefinition extendMetaForType,
-      toDefinition extendMetaForTypes,
-      toDefinition extractCaseElimination,
-      toDefinition findTypeParams,
-      toDefinition gatherLambdas,
-      toDefinition gatherMetadata,
-      toDefinition genericArg,
-      toDefinition initialEnvironment,
-      toDefinition initialMetadata,
-      toDefinition isCaseStatementApplication,
-      toDefinition isCasesFull,
-      toDefinition isTypeModuleCheck,
-      toDefinition isTypeVariableName,
-      toDefinition isVariantUnitType,
-      toDefinition lruCacheDecorator,
-      toDefinition makeCurriedLambda,
-      toDefinition makePyGraph,
-      toDefinition makeSimpleLambda,
-      toDefinition makeThunk,
-      toDefinition makeUncurriedLambda,
-      toDefinition moduleDomainImports,
-      toDefinition moduleImports,
-      toDefinition moduleStandardImports,
-      toDefinition moduleToPython,
-      toDefinition pyGraphGraph,
-      toDefinition pyGraphMetadata,
-      toDefinition pyInt,
-      toDefinition pythonBindingMetadata,
-      toDefinition pythonEnvironmentGetGraph,
-      toDefinition pythonEnvironmentSetGraph,
-      toDefinition setMetaNamespaces,
-      toDefinition setMetaTypeVariables,
-      toDefinition setMetaUsesAnnotated,
-      toDefinition setMetaUsesCallable,
-      toDefinition setMetaUsesCast,
-      toDefinition setMetaUsesDataclass,
-      toDefinition setMetaUsesDecimal,
-      toDefinition setMetaUsesEither,
-      toDefinition setMetaUsesEnum,
-      toDefinition setMetaUsesFrozenDict,
-      toDefinition setMetaUsesFrozenList,
-      toDefinition setMetaUsesGeneric,
-      toDefinition setMetaUsesJust,
-      toDefinition setMetaUsesLeft,
-      toDefinition setMetaUsesLruCache,
-      toDefinition setMetaUsesMaybe,
-      toDefinition setMetaUsesName,
-      toDefinition setMetaUsesNode,
-      toDefinition setMetaUsesNothing,
-      toDefinition setMetaUsesRight,
-      toDefinition setMetaUsesTypeAlias,
-      toDefinition setMetaUsesTypeVar,
-      toDefinition shouldThunkBinding,
-      toDefinition standardImportStatement,
-      toDefinition targetPythonVersion,
-      toDefinition termArityWithPrimitives,
-      toDefinition tvarStatement,
-      toDefinition typeAliasStatementFor,
-      toDefinition unionTypeStatementsFor,
-      toDefinition unsupportedExpression,
-      toDefinition useInlineTypeParams,
-      toDefinition useInlineTypeParamsFor,
-      toDefinition variantArgs,
-      toDefinition variantClosedPattern,
-      toDefinition wildcardCaseBlock,
-      toDefinition withDefinitions,
-      toDefinition withLambda,
-      toDefinition withLet,
-      toDefinition withLetInline,
-      toDefinition withTypeLambda,
-      toDefinition wrapInNullaryLambda,
-      toDefinition wrapLazyArguments]
-
--- | Analyze a function term with Python-specific Graph management.
---   This is a wrapper around Analysis.analyzeFunctionTermWith that provides the Python-specific
---   Graph getteranalyzePythonFunction/setter and Python-specific binding metadata (which skips trivial bindings).
-analyzePythonFunction :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Term -> Either Error (FunctionStructure PyHelpers.PythonEnvironment))
-analyzePythonFunction = def "analyzePythonFunction" $
-  doc "Analyze a function term with Python-specific Graph management" $
-  lambda "cx" $ lambda "env" $ lambda "term" $
-    Analysis.analyzeFunctionTermWith @@ var "cx" @@
-      pythonBindingMetadata @@
-      pythonEnvironmentGetGraph @@
-      pythonEnvironmentSetGraph @@
-      var "env" @@ var "term"
-
--- | Create a CaseBlock pattern for a class variant with no capture (unit variant).
-classVariantPatternUnit :: TTermDefinition (Py.Name -> Py.ClosedPattern)
-classVariantPatternUnit = def "classVariantPatternUnit" $
-  doc "Create a class pattern for a unit variant (no value captured)" $
-  "pyVariantName" ~>
-    PyDsl.closedPatternClass $
-      PyDsl.classPatternSimple
-        (PyDsl.nameOrAttribute $ list [var "pyVariantName"])
-
--- | Create a CaseBlock pattern for a class variant with value capture.
-classVariantPatternWithCapture :: TTermDefinition (PyHelpers.PythonEnvironment -> Py.Name -> Name -> Py.ClosedPattern)
-classVariantPatternWithCapture = def "classVariantPatternWithCapture" $
-  doc "Create a class pattern for a variant with captured value" $
-  "env" ~> "pyVariantName" ~> "varName" ~>
-    "pyVarNameAttr" <~ (PyDsl.nameOrAttribute $ list [var "pyVariantName"]) $
-    "capturePattern" <~ (PyDsl.closedPatternCapture $ PyDsl.capturePattern $
-      PyDsl.patternCaptureTarget (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "varName")) $
-    "keywordPattern" <~ (PyDsl.keywordPattern (PyDsl.name $ string "value") $
-      PyDsl.patternOr $ PyDsl.orPattern $ list [var "capturePattern"]) $
-    PyDsl.closedPatternClass $
-      PyDsl.classPatternWithKeywords
-        (var "pyVarNameAttr")
-        (PyDsl.keywordPatterns $ list [var "keywordPattern"])
-
--- | Collect type variables from a type.
---   Collects both explicitly quantified variables (from forall) AND free type variables.
---   Filters out qualified names (those containing '.') since those are nominal types.
-collectTypeVariables :: TTermDefinition (S.Set Name -> Type -> S.Set Name)
-collectTypeVariables = def "collectTypeVariables" $
-  doc "Collect type variables from a type" $
-  "initial" ~> "typ" ~>
-    cases _Type (Strip.deannotateType @@ var "typ") (Just $
-      -- Default: union initial with filtered free variables
-      -- Filter free variables to only include unqualified names (type variables)
-      "freeVars" <~ (Variables.freeVariablesInType @@ var "typ") $
-      "isTypeVar" <~ ("n" ~> isTypeVariableName @@ var "n") $
-      "filteredList" <~ Lists.filter (var "isTypeVar") (Sets.toList $ var "freeVars") $
-      Sets.union (var "initial") (Sets.fromList $ var "filteredList")) [
-      _Type_forall>>: "ft" ~>
-        "v" <~ Core.forallTypeParameter (var "ft") $
-        "body" <~ Core.forallTypeBody (var "ft") $
-        collectTypeVariables @@ (Sets.insert (var "v") (var "initial")) @@ var "body"]
-
--- | Conditionally include a symbol name based on a boolean flag
-condImportSymbol :: TTermDefinition (String -> Bool -> Maybe String)
-condImportSymbol = def "condImportSymbol" $
-  doc "Conditionally include a symbol name based on a boolean flag" $
-  "name" ~> "flag" ~>
-    Logic.ifElse (var "flag") (just $ var "name") nothing
-
--- | Create a @dataclass(frozen=True) decorator
-dataclassDecorator :: TTermDefinition Py.NamedExpression
-dataclassDecorator = def "dataclassDecorator" $
-  doc "Create a @dataclass(frozen=True) decorator" $
-  PyDsl.namedExpressionSimple $
-    PyUtils.pyPrimaryToPyExpression @@
-      (PyUtils.primaryWithRhs @@
-        (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "dataclass") @@
-        (PyDsl.primaryRhsCall $ PyDsl.args
-          (Phantoms.list ([] :: [TTerm Py.PosArg]))
-          (Phantoms.list [PyDsl.kwargOrStarredKwarg $ PyDsl.kwarg (PyDsl.name $ string "frozen") (PyUtils.pyAtomToPyExpression @@ PyDsl.atomTrue)])
-          (Phantoms.list ([] :: [TTerm Py.KwargOrDoubleStarred]))))
-
--- | Deconflict a variant name by appending '_' if the corresponding Hydra name
---   exists as an element in the graph. This prevents name collisions between
---   variant wrapper classes and union type metaclasses in generated Python.
-deconflictVariantName :: TTermDefinition (Bool -> PyHelpers.PythonEnvironment -> Name -> Name -> Graph -> Py.Name)
-deconflictVariantName = def "deconflictVariantName" $
-  doc "Deconflict a variant name to avoid collisions with type names" $
-  "isQualified" ~> "env" ~> "unionName" ~> "fname" ~> "g" ~>
-    -- Compute the Hydra Name that the variant would correspond to
-    "candidateHydraName" <~ (wrap _Name $ Strings.cat2 (Core.unName $ var "unionName") (Formatting.capitalize @@ (Core.unName $ var "fname"))) $
-    -- Check if this name exists as a term binding or a schema type in the graph
-    "termCollision" <~ (Maps.member (var "candidateHydraName") (Graph.graphBoundTerms (var "g"))) $
-    "typeCollision" <~ (Maps.member (var "candidateHydraName") (Graph.graphSchemaTypes (var "g"))) $
-    "collision" <~ (Logic.or (var "termCollision") (var "typeCollision")) $
-    Logic.ifElse (var "collision")
-      -- Collision: append '_' to the Python name
-      (PyDsl.name $ Strings.cat2 (PyDsl.unName $ PyNames.variantName @@ var "isQualified" @@ var "env" @@ var "unionName" @@ var "fname") (string "_"))
-      -- No collision: use the normal variant name
-      (PyNames.variantName @@ var "isQualified" @@ var "env" @@ var "unionName" @@ var "fname")
-
--- | Rewrite case statements in which the top-level lambda variables are re-used.
---   Such case statements are legal in Hydra, but may lead to variable name collision in Python.
---   For example: cases _Type Nothing [_Type_list>>: "t" ~> ..., _Type_set>>: "t" ~> ...]
---   In Python, both branches would bind "t", so we rename them to "t1", "t2", etc.
-deduplicateCaseVariables :: TTermDefinition ([Field] -> [Field])
-deduplicateCaseVariables = def "deduplicateCaseVariables" $
-  doc "Rewrite case statements to avoid variable name collisions" $
-  "cases_" ~>
-    -- rewriteCase: (countByName, done) -> field -> (updatedCount, updatedDone)
-    "rewriteCase" <~ (
-      "state" ~> "field" ~>
-        "countByName" <~ Pairs.first (var "state") $
-        "done" <~ Pairs.second (var "state") $
-        "fname" <~ Core.fieldName (var "field") $
-        "fterm" <~ Core.fieldTerm (var "field") $
-        -- Check if term is a lambda (strip annotations and type wrappers)
-        cases _Term (Strip.deannotateAndDetypeTerm @@ var "fterm") (Just $ pair (var "countByName") (Lists.cons (var "field") (var "done"))) [
-          _Term_lambda>>: "lam" ~>
-            "v" <~ Core.lambdaParameter (var "lam") $
-            "mdom" <~ Core.lambdaDomain (var "lam") $
-            "body" <~ Core.lambdaBody (var "lam") $
-            -- Check if variable name already seen - use optCases for pattern matching
-            optCases (Maps.lookup (var "v") (var "countByName"))
-              -- First occurrence: insert with count 1
-              (pair (Maps.insert (var "v") (int32 1) (var "countByName"))
-                    (Lists.cons (var "field") (var "done")))
-              -- Already seen: rename variable
-              ("count" ~>
-                "count2" <~ (Math.add (var "count") (int32 1)) $
-                "v2" <~ (Core.name $ Strings.cat2 (Core.unName $ var "v") (Literals.showInt32 $ var "count2")) $
-                "newBody" <~ (Reduction.alphaConvert @@ var "v" @@ var "v2" @@ var "body") $
-                "newLam" <~ (Core.lambda (var "v2") (var "mdom") (var "newBody")) $
-                "newTerm" <~ (inject _Term _Term_lambda $ var "newLam") $
-                "newField" <~ (Core.field (var "fname") (var "newTerm")) $
-                pair (Maps.insert (var "v") (var "count2") (var "countByName"))
-                     (Lists.cons (var "newField") (var "done")))]) $
-    -- fold with initial state (empty map, empty list)
-    "result" <~ Lists.foldl (var "rewriteCase")
-                  (pair (Maps.empty :: TTerm (M.Map Name I.Int32)) (list ([] :: [TTerm Field])))
-                  (var "cases_") $
-    Lists.reverse (Pairs.second $ var "result")
-
--- | Recursively dig through forall types to find wrap types.
---   This is used to detect when we need to import Node for wrapped types
---   that are nested inside forall types (e.g., forall s. forall v. Wrap(...)).
-digForWrap :: TTermDefinition (Bool -> PyHelpers.PythonModuleMetadata -> Type -> PyHelpers.PythonModuleMetadata)
-digForWrap = def "digForWrap" $
-  doc "Recursively dig through forall types to find wrap types" $
-  "isTermAnnot" ~> "meta" ~> "typ" ~>
-    cases _Type (Strip.deannotateType @@ var "typ") (Just $ var "meta") [
-      _Type_forall>>: "ft" ~>
-        digForWrap @@ var "isTermAnnot" @@ var "meta" @@ Core.forallTypeBody (var "ft"),
-      _Type_wrap>>: constant $
-        Logic.ifElse (var "isTermAnnot")
-          (var "meta")
-          (setMetaUsesNode @@ var "meta" @@ true)]
-
--- | For unit variants, the case body may contain references to the lambda
---   parameter `v` in applications like `(lambda _ -> innerBody) v`. Since
---   we don't capture `v` in the pattern (unit variants have no value), we
---   need to eliminate all references to `v`. We do this by substituting
---   `v` with `unit` throughout the body, since `v` is only used as an
---   argument to lambdas that ignore their parameter.
-eliminateUnitVar :: TTermDefinition (Name -> Term -> Term)
-eliminateUnitVar = def "eliminateUnitVar" $
-  doc "Substitute unit for a variable in a term (for unit variant case handling)" $
-  "v" ~> "term0" ~>
-    -- Helper functions that use rewrite
-    "rewriteField" <~ ("rewrite" ~> "fld" ~>
-      Core.field (Core.fieldName $ var "fld")
-                 (var "rewrite" @@ Core.fieldTerm (var "fld"))) $
-    "rewriteBinding" <~ ("rewrite" ~> "bnd" ~>
-      Core.binding (Core.bindingName $ var "bnd")
-                   (var "rewrite" @@ Core.bindingTerm (var "bnd"))
-                   (Core.bindingTypeScheme $ var "bnd")) $
-    -- Main rewrite function as Y combinator style
-    "rewrite" <~ ("recurse" ~> "term" ~>
-      cases _Term (Strip.deannotateAndDetypeTerm @@ var "term") (Just $ var "term") [
-        -- Replace the variable with unit
-        _Term_variable>>: "n" ~>
-          Logic.ifElse (Equality.equal (var "n") (var "v"))
-            Core.termUnit
-            (var "term"),
-        -- Recursively rewrite subterms
-        _Term_annotated>>: "at" ~>
-          Core.termAnnotated $ Core.annotatedTerm
-            (var "recurse" @@ Core.annotatedTermBody (var "at"))
-            (Core.annotatedTermAnnotation $ var "at"),
-        _Term_application>>: "app" ~>
-          Core.termApplication $ Core.application
-            (var "recurse" @@ Core.applicationFunction (var "app"))
-            (var "recurse" @@ Core.applicationArgument (var "app")),
-        _Term_lambda>>: "lam" ~>
-          -- Don't descend if the lambda shadows our variable
-          Logic.ifElse (Equality.equal (Core.lambdaParameter $ var "lam") (var "v"))
-            (var "term")
-            (Core.termLambda $ Core.lambda
-              (Core.lambdaParameter $ var "lam")
-              (Core.lambdaDomain $ var "lam")
-              (var "recurse" @@ Core.lambdaBody (var "lam"))),
-        _Term_cases>>: "cs" ~>
-          Core.termCases $
-            Core.caseStatement
-              (Core.caseStatementTypeName $ var "cs")
-              (Maybes.map (var "recurse") (Core.caseStatementDefault $ var "cs"))
-              (Lists.map (var "rewriteField" @@ var "recurse") (Core.caseStatementCases $ var "cs")),
-        _Term_let>>: "lt" ~>
-          Core.termLet $ Core.let_
-            (Lists.map (var "rewriteBinding" @@ var "recurse") (Core.letBindings $ var "lt"))
-            (var "recurse" @@ Core.letBody (var "lt")),
-        _Term_list>>: "ts" ~>
-          Core.termList $ Lists.map (var "recurse") (var "ts"),
-        _Term_map>>: "m" ~>
-          Core.termMap $ Maps.fromList $ Lists.map
-            ("kv" ~> pair (var "recurse" @@ Pairs.first (var "kv"))
-                         (var "recurse" @@ Pairs.second (var "kv")))
-            (Maps.toList $ var "m"),
-        _Term_record>>: "rec" ~>
-          Core.termRecord $ Core.record
-            (Core.recordTypeName $ var "rec")
-            (Lists.map (var "rewriteField" @@ var "recurse") (Core.recordFields $ var "rec")),
-        _Term_set>>: "s" ~>
-          Core.termSet $ Sets.map (var "recurse") (var "s"),
-        _Term_inject>>: "inj" ~>
-          Core.termInject $ Core.injection
-            (Core.injectionTypeName $ var "inj")
-            (var "rewriteField" @@ var "recurse" @@ Core.injectionField (var "inj")),
-        _Term_maybe>>: "mt" ~>
-          Core.termMaybe $ Maybes.map (var "recurse") (var "mt"),
-        _Term_pair>>: "p" ~>
-          Core.termPair $ pair
-            (var "recurse" @@ Pairs.first (var "p"))
-            (var "recurse" @@ Pairs.second (var "p")),
-        _Term_wrap>>: "wt" ~>
-          Core.termWrap $ Core.wrappedTerm
-            (Core.wrappedTermTypeName $ var "wt")
-            (var "recurse" @@ Core.wrappedTermBody (var "wt")),
-        _Term_either>>: "e" ~>
-          Core.termEither $ Eithers.bimap (var "recurse") (var "recurse") (var "e"),
-        _Term_typeApplication>>: "ta" ~>
-          Core.termTypeApplication $ Core.typeApplicationTerm
-            (var "recurse" @@ Core.typeApplicationTermBody (var "ta"))
-            (Core.typeApplicationTermType $ var "ta"),
-        _Term_typeLambda>>: "tl" ~>
-          Core.termTypeLambda $ Core.typeLambda
-            (Core.typeLambdaParameter $ var "tl")
-            (var "recurse" @@ Core.typeLambdaBody (var "tl"))]) $
-    -- Fixed point: apply rewrite to itself
-    "go" <~ ("term" ~> var "rewrite" @@ var "go" @@ var "term") $
-    var "go" @@ var "term0"
-
--- | Create an initial empty metadata record with given namespaces
-emptyMetadata :: TTermDefinition (Namespaces Py.DottedName -> PyHelpers.PythonModuleMetadata)
-emptyMetadata = def "emptyMetadata" $
-  doc "Create an initial empty metadata record with given namespaces" $
-  "ns" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>: var "ns",
-      PyHelpers._PythonModuleMetadata_typeVariables>>: Sets.empty,
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>: false,
-      PyHelpers._PythonModuleMetadata_usesCallable>>: false,
-      PyHelpers._PythonModuleMetadata_usesCast>>: false,
-      PyHelpers._PythonModuleMetadata_usesLruCache>>: false,
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>: false,
-      PyHelpers._PythonModuleMetadata_usesDataclass>>: false,
-      PyHelpers._PythonModuleMetadata_usesDecimal>>: false,
-      PyHelpers._PythonModuleMetadata_usesEither>>: false,
-      PyHelpers._PythonModuleMetadata_usesEnum>>: false,
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>: false,
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>: false,
-      PyHelpers._PythonModuleMetadata_usesGeneric>>: false,
-      PyHelpers._PythonModuleMetadata_usesJust>>: false,
-      PyHelpers._PythonModuleMetadata_usesLeft>>: false,
-      PyHelpers._PythonModuleMetadata_usesMaybe>>: false,
-      PyHelpers._PythonModuleMetadata_usesName>>: false,
-      PyHelpers._PythonModuleMetadata_usesNode>>: false,
-      PyHelpers._PythonModuleMetadata_usesNothing>>: false,
-      PyHelpers._PythonModuleMetadata_usesRight>>: false,
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>: false]
-
--- | Encode a function application to a Python expression.
---   This is a complex function that handles various application patterns:
---   - Record projection (field access)
---   - Union case elimination (match expressions - currently unsupported inline)
---   - Wrap elimination (unwrapping newtypes)
---   - Primitive applications
---   - Variable applications
-encodeApplication :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> Application
-  -> Either Error Py.Expression)
-encodeApplication = def "encodeApplication" $
-  doc "Encode a function application to a Python expression" $
-  "cx" ~> "env" ~> "app" ~>
-    "g" <~ (pythonEnvironmentGetGraph @@ var "env") $
-    "term" <~ (Core.termApplication $ var "app") $
-    "gathered" <~ (Analysis.gatherArgs @@ var "term" @@ list ([] :: [TTerm Term])) $
-    "fun" <~ (Pairs.first $ var "gathered") $
-    "args" <~ (Pairs.second $ var "gathered") $
-    -- Use term-based arity, but ensure it is at least the number of gathered args.
-    -- This prevents curried application when termArityWithPrimitives returns 0 for
-    -- local variables (lambda parameters) not found in the graph. Since the Python coder
-    -- generates uncurried lambdas, all applications must also be uncurried.
-    "knownArity" <~ (termArityWithPrimitives @@ var "g" @@ var "fun") $
-    "arity" <~ (Math.max (var "knownArity") (Lists.length (var "args"))) $
-    "pargs" <<~ (Eithers.mapList ("t" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "t") (var "args")) $
-    "hargs" <~ (Lists.take (var "arity") (var "pargs")) $
-    "rargs" <~ (Lists.drop (var "arity") (var "pargs")) $
-    -- Apply args based on function type
-    "result" <<~ (encodeApplicationInner @@ var "cx" @@ var "env" @@ var "fun" @@ var "hargs" @@ var "rargs") $
-    "lhs" <~ (Pairs.first $ var "result") $
-    "remainingRargs" <~ (Pairs.second $ var "result") $
-    -- Fold remaining args into function calls
-    "pyapp" <~ (Lists.foldl
-      ("t" ~> "a" ~> PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "t") @@ (list [var "a"]))
-      (var "lhs")
-      (var "remainingRargs")) $
-    right $ var "pyapp"
-
--- | Inner helper for encodeApplication that handles the different function types.
---   Returns (expression, remaining rargs).
-encodeApplicationInner :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> TTerm Term  -- fun
-  -> [Py.Expression]  -- hargs
-  -> [Py.Expression]  -- rargs
-  -> Either Error (Py.Expression, [Py.Expression]))
-encodeApplicationInner = def "encodeApplicationInner" $
-  doc "Inner helper for encodeApplication" $
-  "cx" ~> "env" ~> "fun" ~> "hargs" ~> "rargs" ~>
-    "firstArg" <~ (Maybes.fromMaybe (PyUtils.pyNameToPyExpression @@ (PyDsl.name $ string "")) (Lists.maybeHead $ var "hargs")) $
-    "restArgs" <~ (Lists.drop (int32 1) $ var "hargs") $
-    "withRest" <~ ("e" ~>
-      Logic.ifElse (Lists.null $ var "restArgs")
-        (var "e")
-        (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "e") @@ var "restArgs")) $
-    -- Default case: encode function and apply
-    "defaultCase" <~ ("pfun" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "fun") $
-      right $ pair (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "pfun") @@ var "hargs") (var "rargs")) $
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "fun") (Just $ var "defaultCase") [
-      -- Record projection: obj.field
-      _Term_project>>: "proj" ~>
-        "fname" <~ (project _Projection _Projection_field @@ var "proj") $
-        "fieldExpr" <~ (PyUtils.projectFromExpression @@ var "firstArg" @@ (PyNames.encodeFieldName @@ var "env" @@ var "fname")) $
-        right $ pair (var "withRest" @@ var "fieldExpr") (var "rargs"),
-      -- Union elimination: encode as inline conditional chain (isinstance-based ternary)
-      _Term_cases>>: "cs" ~>
-        "inlineExpr" <<~ (encodeUnionEliminationInline @@ var "cx" @@ var "env" @@ var "cs" @@ var "firstArg") $
-        right $ pair (var "withRest" @@ var "inlineExpr") (var "rargs"),
-      -- Wrap elimination: obj.value
-      _Term_unwrap>>: constant $
-        "valueExpr" <~ (PyUtils.projectFromExpression @@ var "firstArg" @@ (PyDsl.name $ string "value")) $
-        "allArgs" <~ (Lists.concat2 (var "restArgs") (var "rargs")) $
-        Logic.ifElse (Lists.null $ var "allArgs")
-          (right $ pair (var "valueExpr") (list ([] :: [TTerm Py.Expression])))
-          (right $ pair (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "valueExpr") @@ var "allArgs")
-                          (list ([] :: [TTerm Py.Expression]))),
-      -- Other functions: encode and apply
-      _Term_lambda>>: constant $
-        "pfun" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "fun") $
-        right $ pair (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "pfun") @@ var "hargs") (var "rargs"),
-      -- Variable: encode and apply. If variable resolves to a primitive, wrap lazy args.
-      _Term_variable>>: "name" ~>
-        "g" <~ (pythonEnvironmentGetGraph @@ var "env") $
-        "allArgs" <~ (Lists.concat2 (var "hargs") (var "rargs")) $
-        Maybes.cases (Maps.lookup (var "name") (Graph.graphPrimitives (var "g")))
-          -- Not a primitive: use original logic
-          (Maybes.maybe
-            -- Not in graph elements: use encodeVariable
-            ("expr" <<~ (encodeVariable @@ var "cx" @@ var "env" @@ var "name" @@ var "hargs") $
-              right $ pair (var "expr") (var "rargs"))
-            -- In graph elements: check arity
-            ("el" ~>
-              Maybes.maybe
-                -- No type: use encodeVariable
-                ("expr" <<~ (encodeVariable @@ var "cx" @@ var "env" @@ var "name" @@ var "hargs") $
-                  right $ pair (var "expr") (var "rargs"))
-                -- Has type: use arity
-                ("ts" ~>
-                  "elArity" <~ (Arity.typeSchemeArity @@ var "ts") $
-                  "consumeCount" <~ (Math.min (var "elArity") (Lists.length $ var "allArgs")) $
-                  "consumedArgs" <~ (Lists.take (var "consumeCount") (var "allArgs")) $
-                  "remainingArgs" <~ (Lists.drop (var "consumeCount") (var "allArgs")) $
-                  Logic.ifElse (Lists.null $ var "consumedArgs")
-                    ("expr" <<~ (encodeVariable @@ var "cx" @@ var "env" @@ var "name" @@ (list ([] :: [TTerm Py.Expression]))) $
-                      right $ pair (var "expr") (var "rargs"))
-                    (right $ pair
-                      (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionLowerSnake @@ var "env" @@ var "name")) @@ var "consumedArgs")
-                      (var "remainingArgs")))
-                (Core.bindingTypeScheme $ var "el"))
-            (Lexical.lookupBinding @@ var "g" @@ var "name"))
-          -- Is a primitive: wrap lazy arguments and encode
-          (lambda "_prim" $
-            "wrappedArgs" <~ (wrapLazyArguments @@ var "name" @@ var "hargs") $
-            "expr" <<~ (encodeVariable @@ var "cx" @@ var "env" @@ var "name" @@ var "wrappedArgs") $
-            right $ pair (var "expr") (var "rargs"))]
-
--- | Encode an application type to Python expression.
---   Gathers all type arguments and encodes as primary[args].
-encodeApplicationType :: TTermDefinition (PyHelpers.PythonEnvironment -> ApplicationType -> Either Error Py.Expression)
-encodeApplicationType = def "encodeApplicationType" $
-  doc "Encode an application type to Python expression" $
-  "env" ~> "at" ~>
-    -- gatherParams collects all arguments from nested applications
-    "gatherParams" <~ (
-      "t" ~> "ps" ~>
-        cases _Type (Strip.deannotateType @@ var "t") Nothing [
-          _Type_application>>: "appT" ~>
-            var "gatherParams"
-              @@ (project _ApplicationType _ApplicationType_function @@ var "appT")
-              @@ (Lists.cons (project _ApplicationType _ApplicationType_argument @@ var "appT") (var "ps")),
-          -- Default: return (t, ps)
-          _Type_annotated>>: constant $ pair (var "t") (var "ps"),
-          _Type_function>>: constant $ pair (var "t") (var "ps"),
-          _Type_forall>>: constant $ pair (var "t") (var "ps"),
-          _Type_list>>: constant $ pair (var "t") (var "ps"),
-          _Type_literal>>: constant $ pair (var "t") (var "ps"),
-          _Type_map>>: constant $ pair (var "t") (var "ps"),
-          _Type_maybe>>: constant $ pair (var "t") (var "ps"),
-          _Type_either>>: constant $ pair (var "t") (var "ps"),
-          _Type_pair>>: constant $ pair (var "t") (var "ps"),
-          _Type_record>>: constant $ pair (var "t") (var "ps"),
-          _Type_set>>: constant $ pair (var "t") (var "ps"),
-          _Type_union>>: constant $ pair (var "t") (var "ps"),
-          _Type_unit>>: constant $ pair (var "t") (var "ps"),
-          _Type_variable>>: constant $ pair (var "t") (var "ps"),
-          _Type_void>>: constant $ pair (var "t") (var "ps"),
-          _Type_wrap>>: constant $ pair (var "t") (var "ps")]) $
-    "bodyAndArgs" <~ (var "gatherParams" @@ (inject _Type _Type_application $ var "at") @@ list ([] :: [TTerm Type])) $
-    "body" <~ Pairs.first (var "bodyAndArgs") $
-    "args" <~ Pairs.second (var "bodyAndArgs") $
-    "pyBody" <<~ encodeType @@ var "env" @@ var "body" $
-    "pyArgs" <<~ Eithers.mapList (encodeType @@ var "env") (var "args") $
-    right $ PyUtils.primaryAndParams @@ (PyUtils.pyExpressionToPyPrimary @@ var "pyBody") @@ var "pyArgs"
-
--- | Encode a single binding as a Python statement
---   This handles:
---   1. Bindings with type schemes: use encodeTermAssignment
---   2. Hoisted bindings: lambdas wrapping a case statement application (from hoisting)
---   3. Case elimination functions: case statements as values
---   4. Other terms: falls back to encodeTermMultiline
-encodeBindingAs :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Binding -> Either Error Py.Statement)
-encodeBindingAs = def "encodeBindingAs" $
-  doc "Encode a binding as a Python statement (function definition or assignment)" $
-  "cx" ~> "env" ~> "binding" ~>
-    "name1" <~ Core.bindingName (var "binding") $
-    "term1" <~ Core.bindingTerm (var "binding") $
-    "mts" <~ Core.bindingTypeScheme (var "binding") $
-    "fname" <~ (PyNames.encodeName @@ true @@ Util.caseConventionLowerSnake @@ var "env" @@ var "name1") $
-    -- Check if binding has a type scheme - if so, use encodeTermAssignment
-    Maybes.maybe
-      -- No type scheme (e.g., lifted local functions) - check for special patterns
-      ("gathered" <~ (gatherLambdas @@ var "term1") $
-        "lambdaParams" <~ (Pairs.first $ var "gathered") $
-        "innerBody" <~ (Pairs.second $ var "gathered") $
-        -- Check for hoisted binding pattern: lambdas wrapping a case statement application
-        "mcsa" <~ (isCaseStatementApplication @@ var "innerBody") $
-        -- Try hoisted binding pattern first
-        Maybes.maybe
-          -- Not a hoisted binding, try simple case elimination
-          ("mcs" <~ (extractCaseElimination @@ var "term1") $
-            Maybes.maybe
-              -- Default case: not a case elimination, encode term normally and take first statement
-              (Eithers.bind (encodeTermMultiline @@ var "cx" @@ var "env" @@ var "term1")
-                ("stmts" ~> Maybes.maybe
-                  (left $ Error.errorOther $ Error.otherError $ string "encodeTermMultiline returned no statements")
-                  (unaryFunction right)
-                  (Lists.maybeHead (var "stmts"))))
-              -- Case elimination function - encode as function with match statement
-          ("cs" ~>
-            "tname" <~ (Core.caseStatementTypeName $ var "cs") $
-            "dflt" <~ (Core.caseStatementDefault $ var "cs") $
-            "cases_" <~ (Core.caseStatementCases $ var "cs") $
-            "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-            "isEnum" <~ (Predicates.isEnumRowType @@ var "rt") $
-            "isFull" <~ (isCasesFull @@ var "rt" @@ var "cases_") $
-            "innerParam" <~ (PyDsl.param (PyDsl.name $ string "x") nothing) $
-            "param" <~ (Phantoms.record Py._ParamNoDefault [
-              Phantoms.field Py._ParamNoDefault_param (var "innerParam"),
-              Phantoms.field Py._ParamNoDefault_typeComment nothing]) $
-            "params" <~ (PyDsl.parametersParamNoDefault $ Phantoms.record Py._ParamNoDefaultParameters [
-              Phantoms.field Py._ParamNoDefaultParameters_paramNoDefault (list [var "param"]),
-              Phantoms.field Py._ParamNoDefaultParameters_paramWithDefault (Phantoms.list ([] :: [TTerm Py.ParamWithDefault])),
-              Phantoms.field Py._ParamNoDefaultParameters_starEtc nothing]) $
-            "pyCases" <<~ (Eithers.mapList (encodeCaseBlock @@ var "cx" @@ var "env" @@ var "tname" @@ var "rt" @@ var "isEnum" @@ ("e" ~> "t" ~> encodeTermMultiline @@ var "cx" @@ var "e" @@ var "t")) (var "cases_")) $
-            "pyDflt" <<~ (encodeDefaultCaseBlock @@ ("t" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "t") @@ var "isFull" @@ var "dflt" @@ var "tname") $
-            "subj" <~ (PyDsl.subjectExpressionSimple $ PyDsl.namedExpressionSimple $ PyUtils.pyNameToPyExpression @@ (PyDsl.name $ string "x")) $
-            "allCases" <~ (Lists.concat2 (var "pyCases") (var "pyDflt")) $
-            "matchStmt" <~ (PyDsl.statementCompound $ PyDsl.compoundStatementMatch $ Phantoms.record Py._MatchStatement [
-              Phantoms.field Py._MatchStatement_subject (var "subj"),
-              Phantoms.field Py._MatchStatement_cases (var "allCases")]) $
-            "body" <~ (PyUtils.indentedBlock @@ nothing @@ list [list [var "matchStmt"]]) $
-            "funcDefRaw" <~ (Phantoms.record Py._FunctionDefRaw [
-              Phantoms.field Py._FunctionDefRaw_async false,
-              Phantoms.field Py._FunctionDefRaw_name (var "fname"),
-              Phantoms.field Py._FunctionDefRaw_typeParams (Phantoms.list ([] :: [TTerm Py.TypeParameter])),
-              Phantoms.field Py._FunctionDefRaw_params (just $ var "params"),
-              Phantoms.field Py._FunctionDefRaw_returnType nothing,
-              Phantoms.field Py._FunctionDefRaw_funcTypeComment nothing,
-              Phantoms.field Py._FunctionDefRaw_block (var "body")]) $
-            right $ PyDsl.statementCompound (PyDsl.compoundStatementFunction $ PyDsl.functionDefinition nothing (var "funcDefRaw")))
-          (var "mcs"))
-      -- Hoisted binding: lambdas wrapping a case statement application
-      -- Only handle if there are actual lambda parameters
-      ("csa" ~>
-        Logic.ifElse (Lists.null $ var "lambdaParams")
-          -- No lambda params, fall back to case elimination check
-          ("mcs" <~ (extractCaseElimination @@ var "term1") $
-            Maybes.maybe
-              (Eithers.bind (encodeTermMultiline @@ var "cx" @@ var "env" @@ var "term1")
-                ("stmts" ~> Maybes.maybe
-                  (left $ Error.errorOther $ Error.otherError $ string "encodeTermMultiline returned no statements")
-                  (unaryFunction right)
-                  (Lists.maybeHead (var "stmts"))))
-              ("cs" ~>
-                "tname" <~ (Core.caseStatementTypeName $ var "cs") $
-                "dflt" <~ (Core.caseStatementDefault $ var "cs") $
-                "cases_" <~ (Core.caseStatementCases $ var "cs") $
-                "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-                "isEnum" <~ (Predicates.isEnumRowType @@ var "rt") $
-                "isFull" <~ (isCasesFull @@ var "rt" @@ var "cases_") $
-                "innerParam" <~ (PyDsl.param (PyDsl.name $ string "x") nothing) $
-                "param" <~ (Phantoms.record Py._ParamNoDefault [
-                  Phantoms.field Py._ParamNoDefault_param (var "innerParam"),
-                  Phantoms.field Py._ParamNoDefault_typeComment nothing]) $
-                "params" <~ (PyDsl.parametersParamNoDefault $ Phantoms.record Py._ParamNoDefaultParameters [
-                  Phantoms.field Py._ParamNoDefaultParameters_paramNoDefault (list [var "param"]),
-                  Phantoms.field Py._ParamNoDefaultParameters_paramWithDefault (Phantoms.list ([] :: [TTerm Py.ParamWithDefault])),
-                  Phantoms.field Py._ParamNoDefaultParameters_starEtc nothing]) $
-                "pyCases" <<~ (Eithers.mapList (encodeCaseBlock @@ var "cx" @@ var "env" @@ var "tname" @@ var "rt" @@ var "isEnum" @@ ("e" ~> "t" ~> encodeTermMultiline @@ var "cx" @@ var "e" @@ var "t")) (var "cases_")) $
-                "pyDflt" <<~ (encodeDefaultCaseBlock @@ ("t" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "t") @@ var "isFull" @@ var "dflt" @@ var "tname") $
-                "subj" <~ (PyDsl.subjectExpressionSimple $ PyDsl.namedExpressionSimple $ PyUtils.pyNameToPyExpression @@ (PyDsl.name $ string "x")) $
-                "allCases" <~ (Lists.concat2 (var "pyCases") (var "pyDflt")) $
-                "matchStmt" <~ (PyDsl.statementCompound $ PyDsl.compoundStatementMatch $ Phantoms.record Py._MatchStatement [
-                  Phantoms.field Py._MatchStatement_subject (var "subj"),
-                  Phantoms.field Py._MatchStatement_cases (var "allCases")]) $
-                "body" <~ (PyUtils.indentedBlock @@ nothing @@ list [list [var "matchStmt"]]) $
-                "funcDefRaw" <~ (Phantoms.record Py._FunctionDefRaw [
-                  Phantoms.field Py._FunctionDefRaw_async false,
-                  Phantoms.field Py._FunctionDefRaw_name (var "fname"),
-                  Phantoms.field Py._FunctionDefRaw_typeParams (Phantoms.list ([] :: [TTerm Py.TypeParameter])),
-                  Phantoms.field Py._FunctionDefRaw_params (just $ var "params"),
-                  Phantoms.field Py._FunctionDefRaw_returnType nothing,
-                  Phantoms.field Py._FunctionDefRaw_funcTypeComment nothing,
-                  Phantoms.field Py._FunctionDefRaw_block (var "body")]) $
-                right $ PyDsl.statementCompound (PyDsl.compoundStatementFunction $ PyDsl.functionDefinition nothing (var "funcDefRaw")))
-              (var "mcs"))
-          -- Has lambda params: this is a hoisted binding
-          -- The last lambda param is the case expression's own parameter (match subject).
-          -- Any preceding lambda params are captured variables from outer scopes.
-          -- Encode as: def fname(capturedParams..., matchParam): match matchParam: ...
-          -- Extract components from the nested tuple: (tname, (dflt, (cases, arg)))
-          ("tname" <~ (Pairs.first $ var "csa") $
-            "rest1" <~ (Pairs.second $ var "csa") $
-            "dflt" <~ (Pairs.first $ var "rest1") $
-            "rest2" <~ (Pairs.second $ var "rest1") $
-            "cases_" <~ (Pairs.first $ var "rest2") $
-            "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-            "isEnum" <~ (Predicates.isEnumRowType @@ var "rt") $
-            "isFull" <~ (isCasesFull @@ var "rt" @@ var "cases_") $
-            -- Separate captured variables (all but last) from the match parameter (last).
-            -- The last lambda parameter is the case expression's own parameter.
-            "capturedVarNames" <~ (Maybes.fromMaybe (list ([] :: [TTerm Name])) (Lists.maybeInit $ var "lambdaParams")) $
-            "matchLambdaParam" <~ (Maybes.fromMaybe (wrap _Name $ string "") (Lists.maybeLast $ var "lambdaParams")) $
-            -- Create parameters for captured variables only
-            "capturedParams" <~ (Lists.map
-              ("n" ~> Phantoms.record Py._ParamNoDefault [
-                Phantoms.field Py._ParamNoDefault_param (PyDsl.param
-                  (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "n")
-                  nothing),
-                Phantoms.field Py._ParamNoDefault_typeComment nothing])
-              (var "capturedVarNames")) $
-            -- Create the match argument parameter using the case lambda's parameter name
-            "matchArgName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "matchLambdaParam") $
-            "matchParam" <~ (Phantoms.record Py._ParamNoDefault [
-              Phantoms.field Py._ParamNoDefault_param (PyDsl.param (var "matchArgName") nothing),
-              Phantoms.field Py._ParamNoDefault_typeComment nothing]) $
-            "allParams" <~ (Lists.concat2 (var "capturedParams") (list [var "matchParam"])) $
-            "params" <~ (PyDsl.parametersParamNoDefault $ Phantoms.record Py._ParamNoDefaultParameters [
-              Phantoms.field Py._ParamNoDefaultParameters_paramNoDefault (var "allParams"),
-              Phantoms.field Py._ParamNoDefaultParameters_paramWithDefault (Phantoms.list ([] :: [TTerm Py.ParamWithDefault])),
-              Phantoms.field Py._ParamNoDefaultParameters_starEtc nothing]) $
-            -- Extend environment with all gathered lambda parameters before encoding cases
-            "envWithParams" <~ (extendEnvWithLambdaParams @@ var "env" @@ var "term1") $
-            -- Encode the match statement using extended environment
-            "pyCases" <<~ (Eithers.mapList (encodeCaseBlock @@ var "cx" @@ var "envWithParams" @@ var "tname" @@ var "rt" @@ var "isEnum" @@ ("e" ~> "t" ~> encodeTermMultiline @@ var "cx" @@ var "e" @@ var "t")) (var "cases_")) $
-            "pyDflt" <<~ (encodeDefaultCaseBlock @@ ("t" ~> encodeTermInline @@ var "cx" @@ var "envWithParams" @@ false @@ var "t") @@ var "isFull" @@ var "dflt" @@ var "tname") $
-            "subj" <~ (PyDsl.subjectExpressionSimple $ PyDsl.namedExpressionSimple $ PyUtils.pyNameToPyExpression @@ var "matchArgName") $
-            "allCases" <~ (Lists.concat2 (var "pyCases") (var "pyDflt")) $
-            "matchStmt" <~ (PyDsl.statementCompound $ PyDsl.compoundStatementMatch $ Phantoms.record Py._MatchStatement [
-              Phantoms.field Py._MatchStatement_subject (var "subj"),
-              Phantoms.field Py._MatchStatement_cases (var "allCases")]) $
-            "body" <~ (PyUtils.indentedBlock @@ nothing @@ list [list [var "matchStmt"]]) $
-            "funcDefRaw" <~ (Phantoms.record Py._FunctionDefRaw [
-              Phantoms.field Py._FunctionDefRaw_async false,
-              Phantoms.field Py._FunctionDefRaw_name (var "fname"),
-              Phantoms.field Py._FunctionDefRaw_typeParams (Phantoms.list ([] :: [TTerm Py.TypeParameter])),
-              Phantoms.field Py._FunctionDefRaw_params (just $ var "params"),
-              Phantoms.field Py._FunctionDefRaw_returnType nothing,
-              Phantoms.field Py._FunctionDefRaw_funcTypeComment nothing,
-              Phantoms.field Py._FunctionDefRaw_block (var "body")]) $
-            right $ PyDsl.statementCompound (PyDsl.compoundStatementFunction $ PyDsl.functionDefinition nothing (var "funcDefRaw"))))
-          (var "mcsa"))
-      -- Binding with type scheme - use encodeTermAssignment
-      ("ts" ~>
-        "comment" <<~ (Annotations.getTermDescription @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "term1") $
-        "normComment" <~ (Maybes.map Formatting.normalizeComment (var "comment")) $
-        encodeTermAssignment @@ var "cx" @@ var "env" @@ var "name1" @@ var "term1" @@ var "ts" @@ var "normComment")
-      (var "mts")
-
--- | Encode a binding as a walrus operator assignment (for inline let expressions).
---   Takes: allowThunking flag, environment, binding
---   Returns: NamedExpression (assignment expression)
---   Note: This simplified version does not update metadata for lru_cache;
---   the Staging version handles that.
-encodeBindingAsAssignment :: TTermDefinition (Context -> Bool -> PyHelpers.PythonEnvironment
-  -> Binding
-  -> Either Error Py.NamedExpression)
-encodeBindingAsAssignment = def "encodeBindingAsAssignment" $
-  doc "Encode a binding as a walrus operator assignment" $
-  "cx" ~> "allowThunking" ~> "env" ~> "binding" ~>
-    "name" <~ Core.bindingName (var "binding") $
-    "term" <~ Core.bindingTerm (var "binding") $
-    "mts" <~ Core.bindingTypeScheme (var "binding") $
-    "pyName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "name") $
-    "pbody" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "term") $
-    "tc" <~ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env") $
-    "isComplexVar" <~ (Predicates.isComplexVariable @@ var "tc" @@ var "name") $
-    "termIsComplex" <~ (Predicates.isComplexTerm @@ var "tc" @@ var "term") $
-    "isTrivial" <~ (Predicates.isTrivialTerm @@ var "term") $
-    -- Check if needs thunking based on type scheme arity and complexity
-    -- Trivial terms (literals, variables, field projections) are never thunked
-    "needsThunk" <~ Logic.ifElse (var "isTrivial") (boolean False)
-      (optCases (var "mts")
-        -- No type scheme: thunk if complex
-        (Logic.and (var "allowThunking") (Logic.or (var "isComplexVar") (var "termIsComplex")))
-        -- Has type scheme: thunk if arity == 0 and complex
-        ("ts" ~> Logic.and (var "allowThunking")
-          (Logic.and (Equality.equal (Arity.typeSchemeArity @@ var "ts") (Phantoms.int 0))
-                     (Logic.or (var "isComplexVar") (var "termIsComplex"))))) $
-    "pterm" <~ (Logic.ifElse (var "needsThunk") (makeThunk @@ var "pbody") (var "pbody")) $
-    right $ PyDsl.namedExpressionAssignment $ PyDsl.assignmentExpression (var "pyName") (var "pterm")
-
--- | Encode bindings as function definitions
-encodeBindingsAsDefs :: TTermDefinition (PyHelpers.PythonEnvironment -> (PyHelpers.PythonEnvironment -> Binding -> Either Error Py.Statement) -> [Binding] -> Either Error [Py.Statement])
-encodeBindingsAsDefs = def "encodeBindingsAsDefs" $
-  doc "Encode bindings as function definitions" $
-  "env" ~> "encodeBinding" ~> "bindings" ~>
-    Eithers.mapList (var "encodeBinding" @@ var "env") (var "bindings")
-
--- | Encode a single case (Field) into a CaseBlock for a match statement.
---   This handles both enum variants and class-based variants with value capture.
---   The encodeBody function is passed in to allow different encoding strategies
---   (inline vs multiline).
---   Uses withLambda to extend Graph with the case binding variable.
-encodeCaseBlock :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> [FieldType] -> Bool -> (PyHelpers.PythonEnvironment -> Term -> Either Error [Py.Statement]) -> Field -> Either Error Py.CaseBlock)
-encodeCaseBlock = def "encodeCaseBlock" $
-  doc "Encode a single case (Field) into a CaseBlock for a match statement" $
-  "cx" ~> "env" ~> "tname" ~> "rowType" ~> "isEnum" ~> "encodeBody" ~> "field" ~>
-    "fname" <~ Core.fieldName (var "field") $
-    "fterm" <~ Core.fieldTerm (var "field") $
-    -- The field term should be a lambda; strip annotations and type wrappers to extract it.
-    -- After case-statement hoisting, field terms may be variable references to hoisted functions
-    -- instead of inline lambdas. The default case handles this by synthesizing a lambda wrapper.
-    "stripped" <~ (Strip.deannotateAndDetypeTerm @@ var "fterm") $
-    "effectiveLambda" <~ (cases _Term (var "stripped")
-      -- Default: fterm is not a lambda (e.g. hoisted variable reference).
-      -- Wrap it in a synthetic lambda: \v -> fterm(v)
-      (Just $ "syntheticVar" <~ Core.name (string "_matchValue") $
-        Core.lambda (var "syntheticVar") nothing
-          (Core.termApplication $ Core.application (var "stripped") (Core.termVariable $ var "syntheticVar"))) [
-      _Term_lambda>>: "lam" ~> var "lam"]) $
-    -- Now effectiveLambda is always a Lambda
-    "v" <~ Core.lambdaParameter (var "effectiveLambda") $
-    "rawBody" <~ Core.lambdaBody (var "effectiveLambda") $
-    -- Check if this variant has unit type
-    "isUnitVariant" <~ (isVariantUnitType @@ var "rowType" @@ var "fname") $
-    -- For unit variants, eliminate references to the lambda parameter
-    "effectiveBody" <~ (Logic.ifElse (var "isUnitVariant")
-      (eliminateUnitVar @@ var "v" @@ var "rawBody")
-      (var "rawBody")) $
-    -- Determine if we should capture the value
-    -- Don't capture if: unit variant, variable is free in body, or body is unit term
-    "shouldCapture" <~ (Logic.not $ Logic.or (var "isUnitVariant")
-      (Logic.or (Variables.isFreeVariableInTerm @@ var "v" @@ var "rawBody")
-                (Predicates.isUnitTerm @@ var "rawBody"))) $
-    -- Extend the Graph with the lambda parameter
-    -- to prevent the code generator from reducing it away
-    "env2" <~ (pythonEnvironmentSetGraph
-      @@ (Scoping.extendGraphForLambda @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "effectiveLambda")
-      @@ var "env") $
-    -- Deconflict the variant name in case it collides with a type name
-    "pyVariantName" <~ (deconflictVariantName @@ true @@ var "env2" @@ var "tname" @@ var "fname" @@ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env2")) $
-    -- Create the pattern using env2 (extended context)
-    "pattern" <~ (variantClosedPattern @@ var "env2" @@ var "tname" @@ var "fname" @@ var "pyVariantName"
-      @@ var "rowType" @@ var "isEnum" @@ var "v" @@ var "shouldCapture") $
-    -- Encode the body using the provided encoder with extended env
-    "stmts" <<~ (var "encodeBody" @@ var "env2" @@ var "effectiveBody") $
-    "pyBody" <~ (PyUtils.indentedBlock @@ nothing @@ list [var "stmts"]) $
-    right $ PyDsl.caseBlock
-      (PyUtils.pyClosedPatternToPyPatterns @@ var "pattern")
-      nothing
-      (var "pyBody")
-
--- | Encode the default (wildcard) case block for a match statement.
---   Takes: encoder function, isFull (whether all variants are covered), optional default term, type name
---   Returns: list of CaseBlocks (empty or containing the wildcard case)
---   The encoder function is passed in to allow calling from Staging code that provides encodeTermInline.
-encodeDefaultCaseBlock :: TTermDefinition ((Term -> Either Error Py.Expression) -> Bool -> Maybe Term -> Name -> Either Error [Py.CaseBlock])
-encodeDefaultCaseBlock = def "encodeDefaultCaseBlock" $
-  doc "Encode the default (wildcard) case block for a match statement" $
-  "encodeTerm" ~> "isFull" ~> "mdflt" ~> "tname" ~>
-    "stmt" <<~ optCases (var "mdflt")
-      -- No default provided
-      (right $ Logic.ifElse (var "isFull")
-        (PyUtils.raiseAssertionError @@ string "Unreachable: all variants handled")
-        (PyUtils.raiseTypeError @@ (Strings.cat2 (string "Unsupported ") (Names.localNameOf @@ var "tname"))))
-      -- Default term provided - encode it as a return statement
-      ("d" ~>
-        "pyexpr" <<~ (var "encodeTerm" @@ var "d") $
-        right $ PyUtils.returnSingle @@ var "pyexpr") $
-    "patterns" <~ (PyUtils.pyClosedPatternToPyPatterns @@ PyDsl.closedPatternWildcard) $
-    "body" <~ (PyUtils.indentedBlock @@ nothing @@ list [list [var "stmt"]]) $
-    right $ list [PyDsl.caseBlock (var "patterns") nothing (var "body")]
-
--- | Encode a definition (term or type) to Python statements
-encodeDefinition :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> Definition
-  -> Either Error [[Py.Statement]])
-encodeDefinition = def "encodeDefinition" $
-  doc "Encode a definition (term or type) to Python statements" $
-  "cx" ~> "env" ~> "def_" ~>
-    cases _Definition (var "def_") Nothing [
-      _Definition_term>>: "td" ~>
-        "name" <~ (project _TermDefinition _TermDefinition_name @@ var "td") $
-        "term" <~ (project _TermDefinition _TermDefinition_term @@ var "td") $
-        "typ" <~ Maybes.maybe
-          (Core.typeScheme (list ([] :: [TTerm Name])) (Core.typeVariable (wrap _Name (string "hydra.core.Unit"))) nothing)
-          ("x" ~> var "x")
-          (project _TermDefinition _TermDefinition_typeScheme @@ var "td") $
-        "comment" <<~ (Annotations.getTermDescription @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "term") $
-        "normComment" <~ (Maybes.map Formatting.normalizeComment (var "comment")) $
-        "stmt" <<~ (encodeTermAssignment @@ var "cx" @@ var "env" @@ var "name" @@ var "term" @@ var "typ" @@ var "normComment") $
-        right $ list [list [var "stmt"]],
-      _Definition_type>>: "td" ~>
-        "name" <~ (project _TypeDefinition _TypeDefinition_name @@ var "td") $
-        "typ" <~ (Core.typeSchemeBody $ project _TypeDefinition _TypeDefinition_typeScheme @@ var "td") $
-        "comment" <<~ (Annotations.getTypeDescription @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "typ") $
-        "normComment" <~ (Maybes.map Formatting.normalizeComment (var "comment")) $
-        encodeTypeAssignment @@ var "cx" @@ var "env" @@ var "name" @@ var "typ" @@ var "normComment"]
-
--- | Encode an enum value assignment: ENUM_VALUE = Name("enum_value")
-encodeEnumValueAssignment :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> FieldType -> Either Error [Py.Statement])
-encodeEnumValueAssignment = def "encodeEnumValueAssignment" $
-  doc "Encode an enum value assignment statement with optional comment" $
-  "cx" ~> "env" ~> "fieldType" ~>
-    "fname" <~ Core.fieldTypeName (var "fieldType") $
-    "ftype" <~ Core.fieldTypeType (var "fieldType") $
-    "mcomment" <<~ (Annotations.getTypeDescription @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "ftype") $
-    "pyName" <~ (PyNames.encodeEnumValue @@ var "env" @@ var "fname") $
-    "fnameStr" <~ (Core.unName $ var "fname") $
-    "pyValue" <~ (PyUtils.functionCall
-      @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ (Core.name $ string "hydra.core.Name")))
-      @@ list [PyUtils.doubleQuotedString @@ var "fnameStr"]) $
-    "assignStmt" <~ (PyUtils.assignmentStatement @@ var "pyName" @@ var "pyValue") $
-    right $ optCases (var "mcomment")
-      (list [var "assignStmt"])
-      ("c" ~> list [var "assignStmt", PyUtils.pyExpressionToPyStatement @@ (PyUtils.tripleQuotedString @@ var "c")])
-
--- | Encode a field (name-value pair) to a Python (Name, Expression) pair
-encodeField :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Field -> (TTerm Term -> Either Error Py.Expression) -> Either Error (Py.Name, Py.Expression))
-encodeField = def "encodeField" $
-  doc "Encode a field (name-value pair) to a Python (Name, Expression) pair" $
-  "cx" ~> "env" ~> "field" ~> "encodeTerm" ~>
-    "fname" <~ Core.fieldName (var "field") $
-    "fterm" <~ Core.fieldTerm (var "field") $
-    "pterm" <<~ (var "encodeTerm" @@ var "fterm") $
-    right $ pair (PyNames.encodeFieldName @@ var "env" @@ var "fname") (var "pterm")
-
--- | Encode a field type for record definitions (field: type annotation)
-encodeFieldType :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> FieldType -> Either Error Py.Statement)
-encodeFieldType = def "encodeFieldType" $
-  doc "Encode a field type for record definitions (field: type annotation)" $
-  "cx" ~> "env" ~> "fieldType" ~>
-    "fname" <~ Core.fieldTypeName (var "fieldType") $
-    "ftype" <~ Core.fieldTypeType (var "fieldType") $
-    "comment" <<~ (Annotations.getTypeDescription @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "ftype") $
-    "pyName" <~ (PyDsl.singleTargetName $ PyNames.encodeFieldName @@ var "env" @@ var "fname") $
-    "pyType" <<~ (encodeType @@ var "env" @@ var "ftype") $
-    "annotatedPyType" <~ (PyUtils.annotatedExpression @@ var "comment" @@ var "pyType") $
-    right $ PyUtils.pyAssignmentToPyStatement @@
-      (PyDsl.assignmentTyped $ PyDsl.typedAssignment (var "pyName") (var "annotatedPyType") nothing)
-
--- | Encode a float value to a Python expression
-encodeFloatValue :: TTermDefinition (FloatValue -> Either Error Py.Expression)
-encodeFloatValue = def "encodeFloatValue" $
-  doc "Encode a float value to a Python expression" $
-  "fv" ~>
-    cases _FloatValue (var "fv") Nothing [
-      _FloatValue_bigfloat>>: "f" ~>
-        right $ PyUtils.functionCall @@
-          (PyUtils.pyNameToPyPrimary @@ (PyDsl.name $ string "Decimal")) @@
-          list [PyUtils.singleQuotedString @@ (Literals.showBigfloat $ var "f")],
-      _FloatValue_float32>>: "f" ~>
-        encodeFloatValue_encodeFloat32 @@ var "f",
-      _FloatValue_float64>>: "f" ~>
-        encodeFloatValue_encodeFloat64 @@ var "f"]
-
--- | Encode a float32 value, handling NaN and Infinity specially since BigDecimal cannot represent them.
-encodeFloatValue_encodeFloat32 :: TTermDefinition (Float -> Either Error Py.Expression)
-encodeFloatValue_encodeFloat32 = def "encodeFloatValue_encodeFloat32" $
-  lambda "v" $ lets [
-    "s">: Literals.showFloat32 (var "v")] $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "nan") $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "inf") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "-inf") $
-    right $ PyUtils.pyAtomToPyExpression @@
-      (PyDsl.atomNumber $ PyDsl.numberFloat $ Literals.float32ToBigfloat $ var "v")
-
--- | Encode a float64 value, handling NaN and Infinity specially since BigDecimal cannot represent them.
-encodeFloatValue_encodeFloat64 :: TTermDefinition (Double -> Either Error Py.Expression)
-encodeFloatValue_encodeFloat64 = def "encodeFloatValue_encodeFloat64" $
-  lambda "v" $ lets [
-    "s">: Literals.showFloat64 (var "v")] $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "nan") $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "inf") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "-inf") $
-    -- Negative zero must be emitted via float('-0.0') because routing it through
-    -- Bigfloat (which on the Java host is BigDecimal) would strip the sign.
-    Logic.ifElse (Equality.equal (var "s") (string "-0.0"))
-      (right $ encodeFloatValue_pySpecialFloat @@ string "-0.0") $
-    right $ PyUtils.pyAtomToPyExpression @@
-      (PyDsl.atomNumber $ PyDsl.numberFloat $ Literals.float64ToBigfloat $ var "v")
-
--- | Emit a Python float('nan'), float('inf'), or float('-inf') expression.
-encodeFloatValue_pySpecialFloat :: TTermDefinition (String -> Py.Expression)
-encodeFloatValue_pySpecialFloat = def "encodeFloatValue_pySpecialFloat" $
-  lambda "value" $
-    PyUtils.functionCall @@
-      (PyUtils.pyNameToPyPrimary @@ (PyDsl.name $ string "float")) @@
-      list [PyUtils.singleQuotedString @@ var "value"]
-
--- | Encode a forall type to Python expression.
---   Gathers all type parameters and encodes the body with parameters.
-encodeForallType :: TTermDefinition (PyHelpers.PythonEnvironment -> ForallType -> Either Error Py.Expression)
-encodeForallType = def "encodeForallType" $
-  doc "Encode a forall type to Python expression" $
-  "env" ~> "lt" ~>
-    -- gatherParams collects all forall-bound type variables
-    "gatherParams" <~ (
-      "t" ~> "ps" ~>
-        cases _Type (Strip.deannotateType @@ var "t") Nothing [
-          _Type_forall>>: "forallT" ~>
-            var "gatherParams"
-              @@ (project _ForallType _ForallType_body @@ var "forallT")
-              @@ (Lists.cons (project _ForallType _ForallType_parameter @@ var "forallT") (var "ps")),
-          -- Default: return (t, reverse ps)
-          _Type_annotated>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_application>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_function>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_list>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_literal>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_map>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_maybe>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_either>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_pair>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_record>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_set>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_union>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_unit>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_variable>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_void>>: constant $ pair (var "t") (Lists.reverse (var "ps")),
-          _Type_wrap>>: constant $ pair (var "t") (Lists.reverse (var "ps"))]) $
-    "bodyAndParams" <~ (var "gatherParams" @@ (inject _Type _Type_forall $ var "lt") @@ list ([] :: [TTerm Name])) $
-    "body" <~ Pairs.first (var "bodyAndParams") $
-    "params" <~ Pairs.second (var "bodyAndParams") $
-    "pyBody" <<~ encodeType @@ var "env" @@ var "body" $
-    right $ PyUtils.primaryAndParams
-      @@ (PyUtils.pyExpressionToPyPrimary @@ var "pyBody")
-      @@ (Lists.map ("n" ~> PyDsl.pyNameToPyExpression $ PyDsl.name $ Core.unName (var "n")) (var "params"))
-
--- | Encode a function definition with parameters and body.
---   Takes: environment, name, type params, arg names, body term, domain types, optional codomain, comment, prefix statements
-encodeFunctionDefinition :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> Name -> [Name] -> [Name] -> TTerm Term -> [Type] -> Maybe Type -> Maybe String -> [Py.Statement]
-  -> Either Error Py.Statement)
-encodeFunctionDefinition = def "encodeFunctionDefinition" $
-  doc "Encode a function definition with parameters and body" $
-  "cx" ~> "env" ~> "name" ~> "tparams" ~> "args" ~> "body" ~> "doms" ~> "mcod" ~> "comment" ~> "prefixes" ~>
-    -- Create parameters by zipping arg names with domain types
-    "pyArgs" <<~ Eithers.mapList
-      ("pair" ~>
-        "argName" <~ Pairs.first (var "pair") $
-        "typ" <~ Pairs.second (var "pair") $
-        "pyTyp" <<~ (encodeType @@ var "env" @@ var "typ") $
-        right $ PyDsl.paramNoDefaultSimple $ PyDsl.param
-          (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "argName")
-          (just $ PyDsl.annotation $ var "pyTyp"))
-      (Lists.zip (var "args") (var "doms")) $
-    "pyParams" <~ (PyDsl.parametersParamNoDefault $ PyDsl.paramNoDefaultParameters (var "pyArgs") (Phantoms.list ([] :: [TTerm Py.ParamWithDefault])) nothing) $
-    -- Check for tail-call optimization opportunity
-    "isTCO" <~ (Logic.and
-      (Logic.not $ Lists.null (var "args"))
-      (Analysis.isSelfTailRecursive @@ var "name" @@ var "body")) $
-    "block" <<~ (Logic.ifElse (var "isTCO")
-      -- TCO path: wrap body in while True loop
-      -- Note: prefixes (let-binding statements) go INSIDE the while loop so they are
-      -- re-evaluated each iteration when parameters change via reassignment + continue.
-      ("tcoStmts" <<~ (encodeTermMultilineTCO @@ var "cx" @@ var "env" @@ var "name" @@ var "args" @@ var "body") $
-        "trueExpr" <~ (PyDsl.namedExpressionSimple $ PyUtils.pyAtomToPyExpression @@ PyDsl.atomTrue) $
-        "whileBody" <~ (PyUtils.indentedBlock @@ nothing @@ list [Lists.concat2 (var "prefixes") (var "tcoStmts")]) $
-        "whileStmt" <~ (PyDsl.statementCompound $ PyDsl.compoundStatementWhile $
-          PyDsl.whileStatement (var "trueExpr") (var "whileBody") nothing) $
-        right $ PyUtils.indentedBlock @@ var "comment" @@ list [list [var "whileStmt"]])
-      -- Normal path: encode body as statements with return
-      ("stmts" <<~ (encodeTermMultiline @@ var "cx" @@ var "env" @@ var "body") $
-        right $ PyUtils.indentedBlock @@ var "comment" @@ list [Lists.concat2 (var "prefixes") (var "stmts")])) $
-    -- Encode return type if present
-    "mreturnType" <<~ optCases (var "mcod")
-      (right (nothing :: TTerm (Maybe Py.Expression)))
-      ("cod" ~>
-        "pytyp" <<~ (encodeType @@ var "env" @@ var "cod") $
-        right $ just (var "pytyp")) $
-    -- Type parameters (only for Python 3.12+)
-    "pyTparams" <~ (Logic.ifElse useInlineTypeParams
-      (Lists.map (PyUtils.pyNameToPyTypeParameter <.> PyNames.encodeTypeVariable) (var "tparams"))
-      (Phantoms.list ([] :: [TTerm Py.TypeParameter]))) $
-    -- Check if this is a thunk (zero-argument function)
-    "isThunk" <~ (Lists.null $ var "args") $
-    "mDecorators" <~ (Logic.ifElse (var "isThunk")
-      (just $ wrap Py._Decorators $ list [lruCacheDecorator])
-      nothing) $
-    -- Metadata for lru_cache is now pre-computed in gatherMetadata
-    "pyName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "name") $
-    right $ PyDsl.statementCompound $ PyDsl.compoundStatementFunction $ PyDsl.functionDefinition (var "mDecorators") $
-      PyDsl.functionDefRaw false (var "pyName") (var "pyTparams") (just $ var "pyParams") (var "mreturnType") nothing (var "block")
-
--- | Encode a function type to Python Callable[..., return_type].
---   Gathers all domain types and the final codomain.
-encodeFunctionType :: TTermDefinition (PyHelpers.PythonEnvironment -> FunctionType -> Either Error Py.Expression)
-encodeFunctionType = def "encodeFunctionType" $
-  doc "Encode a function type to Python Callable expression" $
-  "env" ~> "ft" ~>
-    -- gatherParams collects all domain types and final codomain
-    "gatherParams" <~ (
-      "rdoms" ~> "ftype" ~>
-        "innerCod" <~ (project _FunctionType _FunctionType_codomain @@ var "ftype") $
-        "dom" <~ (project _FunctionType _FunctionType_domain @@ var "ftype") $
-        cases _Type (Strip.deannotateType @@ var "innerCod") Nothing [
-          _Type_function>>: "ft2" ~>
-            var "gatherParams" @@ (Lists.cons (var "dom") (var "rdoms")) @@ var "ft2",
-          -- Default: return (reverse (dom:rdoms), innerCod)
-          _Type_annotated>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_application>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_forall>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_list>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_literal>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_map>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_maybe>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_either>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_pair>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_record>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_set>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_union>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_unit>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_variable>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_void>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod"),
-          _Type_wrap>>: constant $ pair (Lists.reverse (Lists.cons (var "dom") (var "rdoms"))) (var "innerCod")]) $
-    "domsAndCod" <~ (var "gatherParams" @@ list ([] :: [TTerm Type]) @@ var "ft") $
-    "doms" <~ Pairs.first (var "domsAndCod") $
-    "cod" <~ Pairs.second (var "domsAndCod") $
-    "pydoms" <<~ Eithers.mapList (encodeType @@ var "env") (var "doms") $
-    "pycod" <<~ encodeType @@ var "env" @@ var "cod" $
-    right $ PyUtils.pyPrimaryToPyExpression @@
-      (PyUtils.primaryWithSlices
-        @@ (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "Callable")
-        @@ (PyUtils.pyPrimaryToPySlice @@
-            (PyDsl.primarySimple $ PyDsl.atomList $ PyUtils.pyList @@ var "pydoms"))
-        @@ list [PyDsl.sliceOrStarredExpressionSlice $ PyUtils.pyExpressionToPySlice @@ var "pycod"])
-
--- | Encode an integer value to a Python expression
-encodeIntegerValue :: TTermDefinition (IntegerValue -> Either Error Py.Expression)
-encodeIntegerValue = def "encodeIntegerValue" $
-  doc "Encode an integer value to a Python expression" $
-  "iv" ~>
-    -- All integer types map to Python int (arbitrary precision)
-    "toPyInt" <~ ("n" ~>
-      right $ PyUtils.pyAtomToPyExpression @@
-        (PyDsl.atomNumber $ PyDsl.numberInteger $ var "n")) $
-    cases _IntegerValue (var "iv") Nothing [
-      _IntegerValue_bigint>>: "i" ~> var "toPyInt" @@ var "i",
-      _IntegerValue_int8>>: "i" ~> var "toPyInt" @@ (Literals.int8ToBigint $ var "i"),
-      _IntegerValue_int16>>: "i" ~> var "toPyInt" @@ (Literals.int16ToBigint $ var "i"),
-      _IntegerValue_int32>>: "i" ~> var "toPyInt" @@ (Literals.int32ToBigint $ var "i"),
-      _IntegerValue_int64>>: "i" ~> var "toPyInt" @@ (Literals.int64ToBigint $ var "i"),
-      _IntegerValue_uint8>>: "i" ~> var "toPyInt" @@ (Literals.uint8ToBigint $ var "i"),
-      _IntegerValue_uint16>>: "i" ~> var "toPyInt" @@ (Literals.uint16ToBigint $ var "i"),
-      _IntegerValue_uint32>>: "i" ~> var "toPyInt" @@ (Literals.uint32ToBigint $ var "i"),
-      _IntegerValue_uint64>>: "i" ~> var "toPyInt" @@ (Literals.uint64ToBigint $ var "i")]
-
--- | Encode a literal value to a Python expression
-encodeLiteral :: TTermDefinition (Literal -> Either Error Py.Expression)
-encodeLiteral = def "encodeLiteral" $
-  doc "Encode a literal value to a Python expression" $
-  "lit" ~>
-    cases _Literal (var "lit") Nothing [
-      _Literal_binary>>: "bs" ~>
-        -- Convert binary to list of byte values (0-255) directly, without base64 encoding
-        "byteValues" <~ Literals.binaryToBytes (var "bs") $
-        right $ PyUtils.functionCall @@
-          (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "bytes") @@
-          list [PyUtils.pyAtomToPyExpression @@
-            (PyDsl.atomList $
-              PyUtils.pyList @@ (Lists.map
-                ("byteVal" ~>
-                  PyUtils.pyAtomToPyExpression @@
-                    (PyDsl.atomNumber $ PyDsl.numberInteger $ Literals.int32ToBigint $ var "byteVal"))
-                (var "byteValues")))],
-      _Literal_boolean>>: "b" ~>
-        right $ PyUtils.pyAtomToPyExpression @@
-          Logic.ifElse (var "b") PyDsl.atomTrue PyDsl.atomFalse,
-      _Literal_decimal>>: "d" ~>
-        right $ PyUtils.functionCall @@
-          (PyUtils.pyNameToPyPrimary @@ (PyDsl.name $ string "Decimal")) @@
-          list [PyUtils.singleQuotedString @@ (Literals.showDecimal $ var "d")],
-      _Literal_float>>: "f" ~> encodeFloatValue @@ var "f",
-      _Literal_integer>>: "i" ~> encodeIntegerValue @@ var "i",
-      _Literal_string>>: "s" ~>
-        right $ PyUtils.stringToPyExpression @@ PyDsl.quoteStyleDouble @@ var "s"]
-
--- | Encode a literal type to a Python type expression
-encodeLiteralType :: TTermDefinition (LiteralType -> Either Error Py.Expression)
-encodeLiteralType = def "encodeLiteralType" $
-  doc "Encode a literal type to a Python type expression" $
-  "lt" ~>
-    "findName" <~ (cases _LiteralType (var "lt") Nothing [
-      _LiteralType_binary>>: constant $ string "bytes",
-      _LiteralType_boolean>>: constant $ string "bool",
-      _LiteralType_decimal>>: constant $ string "Decimal",
-      _LiteralType_float>>: "ft" ~>
-        cases _FloatType (var "ft") Nothing [
-          _FloatType_bigfloat>>: constant $ string "Decimal",
-          _FloatType_float32>>: constant $ string "float",
-          _FloatType_float64>>: constant $ string "float"],
-      _LiteralType_integer>>: constant $ string "int",
-      _LiteralType_string>>: constant $ string "str"]) $
-    right $ PyDsl.pyNameToPyExpression $ PyDsl.name $ var "findName"
-
--- | Generate name constants for a type as class-level attributes.
---   Produces a TYPE_ constant for the type name, plus one constant per field.
-encodeNameConstants :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> [FieldType] -> [Py.Statement])
-encodeNameConstants = def "encodeNameConstants" $
-  doc "Generate name constants for a type as class-level attributes" $
-  "env" ~> "name" ~> "fields" ~>
-    -- Helper to create a statement from a (pyName, hname) pair
-    "toStmt" <~ ("pair" ~>
-      PyUtils.assignmentStatement
-        @@ (Pairs.first $ var "pair")
-        @@ (PyUtils.functionCall
-              @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ (Core.name $ string "hydra.core.Name")))
-              @@ list [PyUtils.doubleQuotedString @@ (Core.unName $ Pairs.second $ var "pair")])) $
-    -- The name constant for the type itself (TYPE_)
-    "namePair" <~ pair (PyNames.encodeConstantForTypeName @@ var "env" @@ var "name") (var "name") $
-    -- Create field constant pairs from field types
-    "fieldPairs" <~ Lists.map ("field" ~>
-      pair
-        (PyNames.encodeConstantForFieldName @@ var "env" @@ var "name" @@ (project _FieldType _FieldType_name @@ var "field"))
-        (project _FieldType _FieldType_name @@ var "field")) (var "fields") $
-    Lists.map (var "toStmt") (Lists.cons (var "namePair") (var "fieldPairs"))
-
--- | Encode a Hydra module to a Python module AST.
---   This is the main orchestration function that:
---   1. Reorders definitions (types first, then topologically sorted terms)
---   2. Gathers initial metadata
---   3. Sets up the environment
---   4. Encodes all definitions
---   5. Generates imports based on metadata
---   6. Assembles the final module
-encodePythonModule :: TTermDefinition (Context -> Graph -> Module -> [Definition] -> Either Error Py.Module)
-encodePythonModule = def "encodePythonModule" $
-  doc "Encode a Hydra module to a Python module AST" $
-  "cx" ~> "g" ~> "mod" ~> "defs0" ~>
-    "defs" <~ (Environment.reorderDefs @@ var "defs0") $
-    "meta0" <~ (gatherMetadata @@ (Packaging.moduleNamespace $ var "mod") @@ var "defs") $
-    "namespaces0" <~ (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "meta0") $
-    "env0" <~ (initialEnvironment @@ var "namespaces0" @@ var "g") $
-    "isTypeMod" <~ (isTypeModuleCheck @@ var "defs0") $
-    withDefinitions @@ var "env0" @@ var "defs" @@ ("env" ~>
-      "defStmts" <<~ (Eithers.map ("xs" ~> Lists.concat (var "xs")) (Eithers.mapList ("d" ~> encodeDefinition @@ var "cx" @@ var "env" @@ var "d") (var "defs"))) $
-      -- Adjust metadata: if not type module and useInlineTypeParams, clear usesTypeVar
-      "meta2" <~ Logic.ifElse (Logic.and (Logic.not $ var "isTypeMod") (asTerm useInlineTypeParams))
-        (setMetaUsesTypeVar @@ var "meta0" @@ false)
-        (var "meta0") $
-      -- Adjust metadata: if type module and Python 3.10, set usesTypeAlias
-      "meta" <~ Logic.ifElse (Logic.and (var "isTypeMod")
-        (Equality.equal (asTerm targetPythonVersion) (inject PyHelpers._PythonVersion PyHelpers._PythonVersion_python310 unit)))
-        (setMetaUsesTypeAlias @@ var "meta2" @@ true)
-        (var "meta2") $
-      "namespaces" <~ (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "meta0") $
-      -- Generate comment statements from module description
-      "commentStmts" <~ (Maybes.maybe
-        (list ([] :: [TTerm Py.Statement]))
-        ("c" ~> list [PyUtils.commentStatement @@ var "c"])
-        (Maybes.map Formatting.normalizeComment (Packaging.moduleDescription $ var "mod"))) $
-      -- Generate import statements
-      "importStmts" <~ (moduleImports @@ var "namespaces" @@ var "meta") $
-      -- Generate type variable statements
-      "tvars" <~ Logic.ifElse (Logic.or (var "isTypeMod") (Logic.not $ asTerm useInlineTypeParams))
-        (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "meta")
-        Sets.empty $
-      "tvarStmts" <~ Lists.map ("tv" ~> tvarStatement @@ (PyNames.encodeTypeVariable @@ var "tv")) (Sets.toList $ var "tvars") $
-      -- Assemble final module body: filter out empty groups
-      "body" <~ Lists.filter ("group" ~> Logic.not $ Lists.null $ var "group")
-        (Lists.concat (list [
-          list [var "commentStmts", var "importStmts", var "tvarStmts"],
-          var "defStmts"])) $
-      right $ PyDsl.module_ (var "body"))
-
--- | Encode a record type as a Python dataclass
-encodeRecordType :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> [FieldType] -> Maybe String -> Either Error Py.Statement)
-encodeRecordType = def "encodeRecordType" $
-  doc "Encode a record type as a Python dataclass" $
-  "cx" ~> "env" ~> "name" ~> "rowType" ~> "comment" ~>
-    "pyFields" <<~ (Eithers.mapList (encodeFieldType @@ var "cx" @@ var "env") (var "rowType")) $
-    -- Generate class-level name constants
-    "constStmts" <~ (encodeNameConstants @@ var "env" @@ var "name" @@ var "rowType") $
-    "body" <~ (PyUtils.indentedBlock @@ var "comment" @@ list [var "pyFields", var "constStmts"]) $
-    -- Get bound type variables for Generic args
-    "boundVars" <~ (Phantoms.project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env") $
-    "tparamList" <~ Pairs.first (var "boundVars") $
-    "mGenericArg" <~ (genericArg @@ var "tparamList") $
-    "args" <~ optCases (var "mGenericArg")
-      nothing
-      ("a" ~> just (PyUtils.pyExpressionsToPyArgs @@ list [var "a"])) $
-    "decs" <~ (just $ wrap Py._Decorators $ list [dataclassDecorator]) $
-    "pyName" <~ (PyNames.encodeName @@ Phantoms.false @@ Util.caseConventionPascal @@ var "env" @@ var "name") $
-    "noTypeParams" <~ (Phantoms.list ([] :: [TTerm Py.TypeParameter])) $
-    right $ PyUtils.pyClassDefinitionToPyStatement @@
-      Phantoms.record Py._ClassDefinition [
-        Phantoms.field Py._ClassDefinition_decorators (var "decs"),
-        Phantoms.field Py._ClassDefinition_name (var "pyName"),
-        Phantoms.field Py._ClassDefinition_typeParams (var "noTypeParams"),
-        Phantoms.field Py._ClassDefinition_arguments (var "args"),
-        Phantoms.field Py._ClassDefinition_body (var "body")]
-
--- | Encode a term assignment (top-level binding) to a Python statement.
---   This dispatches to either a simple assignment or a function definition depending on complexity.
-encodeTermAssignment :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> Name -> TTerm Term -> TypeScheme -> Maybe String
-  -> Either Error Py.Statement)
-encodeTermAssignment = def "encodeTermAssignment" $
-  doc "Encode a term assignment to a Python statement" $
-  "cx" ~> "env" ~> "name" ~> "term" ~> "ts" ~> "comment" ~>
-    "fs" <<~ (analyzePythonFunction @@ var "cx" @@ var "env" @@ var "term") $
-    "tparams" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_typeParams @@ var "fs") $
-    "params" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_params @@ var "fs") $
-    "bindings" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_bindings @@ var "fs") $
-    "body" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_body @@ var "fs") $
-    "doms" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_domains @@ var "fs") $
-    "mcod" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_codomain @@ var "fs") $
-    "env2" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_environment @@ var "fs") $
-    "tc" <~ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env2") $
-    "binding" <~ (Core.binding (var "name") (var "term") (just $ var "ts")) $
-    "isComplex" <~ (Predicates.isComplexBinding @@ var "tc" @@ var "binding") $
-    "isTrivial" <~ (Predicates.isTrivialTerm @@ var "term") $
-    Logic.ifElse (Logic.and (var "isComplex") (Logic.not (var "isTrivial")))
-      -- Complex binding (non-trivial): use function definition
-      ("bindingStmts" <<~ (Eithers.mapList (encodeBindingAs @@ var "cx" @@ var "env2") (var "bindings")) $
-        encodeFunctionDefinition @@ var "cx" @@ var "env2" @@ var "name" @@ var "tparams" @@ var "params" @@ var "body" @@ var "doms" @@ var "mcod" @@ var "comment" @@ var "bindingStmts")
-      -- Simple binding: use assignment
-      ("bodyExpr" <<~ (encodeTermInline @@ var "cx" @@ var "env2" @@ false @@ var "body") $
-        "pyName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env2" @@ var "name") $
-        right $ PyUtils.annotatedStatement @@ var "comment" @@ (PyUtils.assignmentStatement @@ var "pyName" @@ var "bodyExpr"))
-
--- | Encode a term to a Python expression (inline form).
---   This is the main term encoding function that handles all term variants.
---   Parameters: environment, noCast flag, term
-encodeTermInline :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> Bool
-  -> TTerm Term
-  -> Either Error Py.Expression)
-encodeTermInline = def "encodeTermInline" $
-  doc "Encode a term to a Python expression (inline form)" $
-  "cx" ~> "env" ~> "noCast" ~> "term" ~>
-    -- Helper for recursive encoding (self-reference)
-    "encode" <~ ("t" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "t") $
-    -- Helper to strip type applications and annotations
-    "stripTypeApps" <~
-      ("t" ~> cases _Term (var "t") (Just $ var "t") [
-        _Term_annotated>>: "ann" ~>
-          var "stripTypeApps" @@ Core.annotatedTermBody (var "ann"),
-        _Term_typeApplication>>: "ta" ~>
-          var "stripTypeApps" @@ Core.typeApplicationTermBody (var "ta")]) $
-    -- withCast helper: adds cast() around expression when type is available
-    -- If noCast is true or skipCasts is enabled, just return the expression
-    -- Otherwise try to infer the type and wrap in cast(type, expr)
-    "withCast" <~ ("pyexp" ~>
-      -- Check if we should skip casting
-      Logic.ifElse (Logic.or (var "noCast")
-                             (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_skipCasts @@ var "env"))
-        -- Skip casting: just return the expression
-        (right $ var "pyexp")
-        -- Try to get the type and wrap in cast if successful
-        ("tc" <~ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env") $
-         -- Use fromRight to handle type inference failures gracefully
-         "mtyp" <~ (Eithers.map ("_r" ~> Pairs.first (var "_r"))
-           (Checking.typeOf @@ var "cx" @@ var "tc" @@ list ([] :: [TTerm Type]) @@ var "term")) $
-         Eithers.either_
-           -- Type inference failed: return expression as-is
-           (constant $ right $ var "pyexp")
-           -- Type inference succeeded: try to encode the type and cast
-           ("typ" ~>
-             Eithers.either_
-               (constant $ right $ var "pyexp")
-               ("pytyp" ~> right $ PyUtils.castTo @@ var "pytyp" @@ var "pyexp")
-               (encodeType @@ var "env" @@ var "typ"))
-           (var "mtyp"))) $
-    -- Main case dispatch on term variant (strip annotations and type wrappers)
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "term") Nothing [
-      -- TermApplication
-      _Term_application>>: "app" ~>
-        encodeApplication @@ var "cx" @@ var "env" @@ var "app",
-
-      -- TermEither
-      _Term_either>>: "et" ~>
-        Eithers.either_
-          ("t1" ~>
-            "pyexp" <<~ (var "encode" @@ var "t1") $
-            var "withCast" @@ (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ PyDsl.name (string "Left")) @@ list [var "pyexp"]))
-          ("t1" ~>
-            "pyexp" <<~ (var "encode" @@ var "t1") $
-            var "withCast" @@ (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ PyDsl.name (string "Right")) @@ list [var "pyexp"]))
-          (var "et"),
-
-      -- TermLambda: encode as a Python lambda expression
-      _Term_lambda>>: "lam" ~>
-        "fs" <<~ (analyzePythonFunction @@ var "cx" @@ var "env" @@ (Core.termLambda $ var "lam")) $
-        "params" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_params @@ var "fs") $
-        "bindings" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_bindings @@ var "fs") $
-        "innerBody" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_body @@ var "fs") $
-        "innerEnv0" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_environment @@ var "fs") $
-        -- Add binding names to inlineVariables so they can be resolved during body encoding
-        "bindingNames" <~ (Lists.map ("b" ~> Core.bindingName (var "b")) (var "bindings")) $
-        "innerEnv" <~ (record PyHelpers._PythonEnvironment [
-          PyHelpers._PythonEnvironment_namespaces>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "innerEnv0",
-          PyHelpers._PythonEnvironment_boundTypeVariables>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "innerEnv0",
-          PyHelpers._PythonEnvironment_graph>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "innerEnv0",
-          PyHelpers._PythonEnvironment_nullaryBindings>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_nullaryBindings @@ var "innerEnv0",
-          PyHelpers._PythonEnvironment_version>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_version @@ var "innerEnv0",
-          PyHelpers._PythonEnvironment_skipCasts>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_skipCasts @@ var "innerEnv0",
-          PyHelpers._PythonEnvironment_inlineVariables>>: Sets.union (Sets.fromList (var "bindingNames"))
-            (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_inlineVariables @@ var "innerEnv0")]) $
-        "pbody" <<~ (encodeTermInline @@ var "cx" @@ var "innerEnv" @@ false @@ var "innerBody") $
-        "pparams" <~ (Lists.map (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "innerEnv") (var "params")) $
-        Logic.ifElse (Lists.null $ var "bindings")
-          (right $ makeUncurriedLambda @@ var "pparams" @@ var "pbody")
-          -- Has bindings: create walrus operator expressions
-          ("pbindingExprs" <<~ (Eithers.mapList (encodeBindingAsAssignment @@ var "cx" @@ false @@ var "innerEnv") (var "bindings")) $
-            "pbindingStarExprs" <~ (Lists.map ("ne" ~> PyDsl.starNamedExpressionSimple (var "ne")) (var "pbindingExprs")) $
-            "pbodyStarExpr" <~ (PyUtils.pyExpressionToPyStarNamedExpression @@ var "pbody") $
-            "tupleElements" <~ (Lists.concat2 (var "pbindingStarExprs") (list [var "pbodyStarExpr"])) $
-            "tupleExpr" <~ (PyUtils.pyAtomToPyExpression @@ (PyDsl.atomTuple $ PyDsl.tuple $ var "tupleElements")) $
-            "indexValue" <~ (PyUtils.pyAtomToPyExpression @@ (PyDsl.atomNumber $ PyDsl.numberInteger $ Literals.int32ToBigint (Lists.length (var "bindings")))) $
-            "indexedExpr" <~ (PyUtils.primaryWithExpressionSlices @@ (PyUtils.pyExpressionToPyPrimary @@ var "tupleExpr") @@ list [var "indexValue"]) $
-            right $ makeUncurriedLambda @@ var "pparams" @@ (PyUtils.pyPrimaryToPyExpression @@ var "indexedExpr")),
-
-      -- TermProject: record projection as lambda v1: v1.field
-      _Term_project>>: "proj" ~>
-        "fname" <~ (Phantoms.project _Projection _Projection_field @@ var "proj") $
-        right $ makeCurriedLambda @@ list [PyDsl.name $ string "v1"] @@
-          (PyUtils.projectFromExpression @@ (PyDsl.pyNameToPyExpression $ PyDsl.name $ string "v1") @@ (PyNames.encodeFieldName @@ var "env" @@ var "fname")),
-
-      -- TermUnwrap: wrap elimination as lambda v1: v1.value
-      _Term_unwrap>>: constant $
-        right $ makeCurriedLambda @@ list [PyDsl.name $ string "v1"] @@
-          (PyUtils.projectFromExpression @@ (PyDsl.pyNameToPyExpression $ PyDsl.name $ string "v1") @@ (PyDsl.name $ string "value")),
-
-      -- TermCases: union elimination (case) as value: not supported in Python
-      _Term_cases>>: constant $
-        right $ unsupportedExpression @@ string "case expressions as values are not yet supported",
-
-      -- TermLet - encode using walrus operators in a tuple
-      _Term_let>>: "lt" ~>
-        "bindings" <~ Core.letBindings (var "lt") $
-        "body" <~ Core.letBody (var "lt") $
-        Logic.ifElse (Lists.null $ var "bindings")
-          (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "body")
-          (withLetInline @@ var "env" @@ var "lt" @@
-            ("innerEnv" ~>
-              "pbindingExprs" <<~ (Eithers.mapList (encodeBindingAsAssignment @@ var "cx" @@ false @@ var "innerEnv") (var "bindings")) $
-              "pbody" <<~ (encodeTermInline @@ var "cx" @@ var "innerEnv" @@ false @@ var "body") $
-              "pbindingStarExprs" <~ (Lists.map ("ne" ~> PyDsl.starNamedExpressionSimple (var "ne")) (var "pbindingExprs")) $
-              "pbodyStarExpr" <~ (PyUtils.pyExpressionToPyStarNamedExpression @@ var "pbody") $
-              "tupleElements" <~ (Lists.concat2 (var "pbindingStarExprs") (list [var "pbodyStarExpr"])) $
-              "tupleExpr" <~ (PyUtils.pyAtomToPyExpression @@ PyDsl.atomTuple (PyDsl.tuple (var "tupleElements"))) $
-              "indexValue" <~ (PyUtils.pyAtomToPyExpression @@ PyDsl.atomNumber (PyDsl.numberInteger (Literals.int32ToBigint (Lists.length $ var "bindings")))) $
-              "indexedExpr" <~ (PyUtils.primaryWithExpressionSlices @@ (PyUtils.pyExpressionToPyPrimary @@ var "tupleExpr") @@ list [var "indexValue"]) $
-              right $ PyUtils.pyPrimaryToPyExpression @@ var "indexedExpr")),
-
-      -- TermList - encode as tuple
-      _Term_list>>: "terms" ~>
-        "pyExprs" <<~ (Eithers.mapList (var "encode") (var "terms")) $
-        right $ PyUtils.pyAtomToPyExpression @@ PyDsl.atomTuple (PyDsl.tuple (Lists.map PyUtils.pyExpressionToPyStarNamedExpression (var "pyExprs"))),
-
-      -- TermLiteral
-      _Term_literal>>: "lit" ~>
-        encodeLiteral @@ var "lit",
-
-      -- TermMap - encode as FrozenDict
-      _Term_map>>: "m" ~>
-        "pairs" <<~ (Eithers.mapList
-          ("kv" ~>
-            "k" <~ (Pairs.first $ var "kv") $
-            "v" <~ (Pairs.second $ var "kv") $
-            "pyK" <<~ (var "encode" @@ var "k") $
-            "pyV" <<~ (var "encode" @@ var "v") $
-            right $ PyDsl.doubleStarredKvpairPair (PyDsl.kvpair (var "pyK") (var "pyV")))
-          (Maps.toList $ var "m")) $
-        right $ PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ PyDsl.name (string "FrozenDict"))
-          @@ list [PyUtils.pyAtomToPyExpression @@ PyDsl.atomDict (PyDsl.dict (var "pairs"))],
-
-      -- TermMaybe - encode as Nothing() or Just(value)
-      _Term_maybe>>: "mt" ~>
-        Maybes.maybe
-          (right $ PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ PyDsl.name (string "Nothing")) @@ list ([] :: [TTerm Py.Expression]))
-          ("t1" ~>
-            "pyexp" <<~ (var "encode" @@ var "t1") $
-            var "withCast" @@ (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ PyDsl.name (string "Just")) @@ list [var "pyexp"]))
-          (var "mt"),
-
-      -- TermPair - encode as 2-tuple
-      _Term_pair>>: "p" ~>
-        "t1" <~ (Pairs.first $ var "p") $
-        "t2" <~ (Pairs.second $ var "p") $
-        "pyExpr1" <<~ (var "encode" @@ var "t1") $
-        "pyExpr2" <<~ (var "encode" @@ var "t2") $
-        right $ PyUtils.pyAtomToPyExpression @@ PyDsl.atomTuple (PyDsl.tuple
-          (list [PyUtils.pyExpressionToPyStarNamedExpression @@ var "pyExpr1", PyUtils.pyExpressionToPyStarNamedExpression @@ var "pyExpr2"])),
-
-      -- TermRecord
-      _Term_record>>: "r" ~>
-        "tname" <~ Core.recordTypeName (var "r") $
-        "fields" <~ Core.recordFields (var "r") $
-        "pargs" <<~ (Eithers.mapList ("fld" ~> var "encode" @@ Core.fieldTerm (var "fld")) (var "fields")) $
-        right $ PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeNameQualified @@ var "env" @@ var "tname")) @@ var "pargs",
-
-      -- TermSet - encode as frozenset
-      _Term_set>>: "s" ~>
-        "pyEls" <<~ (Eithers.mapList (var "encode") (Sets.toList $ var "s")) $
-        right $ PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ PyDsl.name (string "frozenset"))
-          @@ list [PyUtils.pyAtomToPyExpression @@ PyDsl.atomSet (PyDsl.set (Lists.map PyUtils.pyExpressionToPyStarNamedExpression (var "pyEls")))],
-
-      -- TermTypeApplication - strip type applications and potentially cast
-      _Term_typeApplication>>: "ta" ~>
-        "body" <~ Core.typeApplicationTermBody (var "ta") $
-        "pybase" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ true @@ (var "stripTypeApps" @@ var "body")) $
-        var "withCast" @@ var "pybase",
-
-      -- TermTypeLambda - descend into body with updated environment
-      _Term_typeLambda>>: "tl" ~>
-        "body" <~ Core.typeLambdaBody (var "tl") $
-        withTypeLambda @@ var "env" @@ var "tl" @@
-          ("env2" ~> encodeTermInline @@ var "cx" @@ var "env2" @@ var "noCast" @@ var "body"),
-
-      -- TermInject (Injection)
-      _Term_inject>>: "inj" ~>
-        "tname" <~ Core.injectionTypeName (var "inj") $
-        "field" <~ Core.injectionField (var "inj") $
-        "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-        Logic.ifElse (Predicates.isEnumRowType @@ var "rt")
-          -- Enum variant
-          (right $ PyUtils.projectFromExpression
-            @@ (PyUtils.pyNameToPyExpression @@ (PyNames.encodeNameQualified @@ var "env" @@ var "tname"))
-            @@ (PyNames.encodeEnumValue @@ var "env" @@ Core.fieldName (var "field")))
-          -- Class variant
-          ("fname" <~ Core.fieldName (var "field") $
-            -- Check if this is a unit variant
-            "isUnitVariant" <~ (Maybes.maybe
-              false
-              ("ft" ~> Predicates.isUnitType @@ (Strip.deannotateType @@ Core.fieldTypeType (var "ft")))
-              (Lists.find ("ft" ~> Core.equalName_ (Core.fieldTypeName (var "ft")) (var "fname")) (var "rt"))) $
-            "args" <<~ (Logic.ifElse (Logic.or (Predicates.isUnitTerm @@ Core.fieldTerm (var "field")) (var "isUnitVariant"))
-              (right (list ([] :: [TTerm Py.Expression])))
-              ("parg" <<~ (var "encode" @@ Core.fieldTerm (var "field")) $
-                right $ list [var "parg"])) $
-            -- Cast to union type - set usesCast flag
-            -- Metadata for usesCast is now pre-computed in gatherMetadata
-            "deconflictedName" <~ (deconflictVariantName @@ true @@ var "env" @@ var "tname" @@ var "fname" @@ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env")) $
-            right $
-              PyUtils.castTo
-                @@ (PyNames.typeVariableReference @@ var "env" @@ var "tname")
-                @@ (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ var "deconflictedName") @@ var "args")),
-
-      -- TermUnit
-      _Term_unit>>: constant $
-        right $ PyUtils.pyNameToPyExpression @@ PyUtils.pyNone,
-
-      -- TermVariable
-      _Term_variable>>: "name" ~>
-        encodeVariable @@ var "cx" @@ var "env" @@ var "name" @@ list ([] :: [TTerm Py.Expression]),
-
-      -- TermWrap
-      _Term_wrap>>: "wrapped" ~>
-        "tname" <~ Core.wrappedTermTypeName (var "wrapped") $
-        "inner" <~ Core.wrappedTermBody (var "wrapped") $
-        "parg" <<~ (var "encode" @@ var "inner") $
-        right $ PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeNameQualified @@ var "env" @@ var "tname")) @@ list [var "parg"]]
-
--- | Encode a term to a list of statements, with the last statement as the return value.
---   This handles case statements specially by generating match statements.
-encodeTermMultiline :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> TTerm Term
-  -> Either Error [Py.Statement])
-encodeTermMultiline = def "encodeTermMultiline" $
-  doc "Encode a term to a list of statements with return as final statement" $
-  "cx" ~> "env" ~> "term" ~>
-    -- Define the default/fallback logic that handles non-case-statement terms
-    "dfltLogic" <~
-      ("fs" <<~ (analyzePythonFunction @@ var "cx" @@ var "env" @@ var "term") $
-        "params" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_params @@ var "fs") $
-        "bindings" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_bindings @@ var "fs") $
-        "innerBody" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_body @@ var "fs") $
-        "env2" <~ (Phantoms.project HydraTyping._FunctionStructure HydraTyping._FunctionStructure_environment @@ var "fs") $
-        Logic.ifElse (Lists.null $ var "bindings")
-          -- No bindings: encode inline and wrap in return
-          ("expr" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "term") $
-            right $ list [PyUtils.returnSingle @@ var "expr"])
-          -- Has bindings: encode bindings as defs, then recurse on body
-          ("bindingStmts" <<~ (Eithers.mapList (encodeBindingAs @@ var "cx" @@ var "env2") (var "bindings")) $
-            "bodyStmts" <<~ (encodeTermMultiline @@ var "cx" @@ var "env2" @@ var "innerBody") $
-            right $ Lists.concat2 (var "bindingStmts") (var "bodyStmts"))) $
-    "gathered" <~ (Analysis.gatherApplications @@ var "term") $
-    "args" <~ Pairs.first (var "gathered") $
-    "body" <~ Pairs.second (var "gathered") $
-    -- Check if exactly one argument for potential case statement
-    Logic.ifElse (Equality.equal (Lists.length $ var "args") (int32 1))
-      -- Try to handle case statement specially
-      ("arg" <~ (Maybes.fromMaybe Core.termUnit (Lists.maybeHead $ var "args")) $
-        cases _Term (Strip.deannotateAndDetypeTerm @@ var "body") (Just $ var "dfltLogic") [
-          _Term_cases>>: "cs" ~>
-            "tname" <~ (Core.caseStatementTypeName $ var "cs") $
-            "dflt" <~ (Core.caseStatementDefault $ var "cs") $
-            "cases_" <~ (Core.caseStatementCases $ var "cs") $
-            "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-            "isEnum" <~ (Predicates.isEnumRowType @@ var "rt") $
-            "isFull" <~ (isCasesFull @@ var "rt" @@ var "cases_") $
-            "pyArg" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "arg") $
-            "pyCases" <<~ (Eithers.mapList (encodeCaseBlock @@ var "cx" @@ var "env" @@ var "tname" @@ var "rt" @@ var "isEnum" @@ ("e" ~> "t" ~> encodeTermMultiline @@ var "cx" @@ var "e" @@ var "t")) (deduplicateCaseVariables @@ var "cases_")) $
-            "pyDflt" <<~ (encodeDefaultCaseBlock @@ ("t" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "t") @@ var "isFull" @@ var "dflt" @@ var "tname") $
-            "subj" <~ (PyDsl.subjectExpressionSimple $ PyDsl.namedExpressionSimple $ var "pyArg") $
-            "matchStmt" <~ (PyDsl.statementCompound $ PyDsl.compoundStatementMatch $ Phantoms.record Py._MatchStatement [
-              Phantoms.field Py._MatchStatement_subject (var "subj"),
-              Phantoms.field Py._MatchStatement_cases (Lists.concat2 (var "pyCases") (var "pyDflt"))]) $
-            right $ list [var "matchStmt"]])
-      -- Default case: use the fallback logic
-      (var "dfltLogic")
-
--- | Encode a term body for TCO: tail self-calls become param reassignment + continue.
---   Non-recursive returns stay as normal return statements.
-encodeTermMultilineTCO :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> Name -> [Name] -> TTerm Term
-  -> Either Error [Py.Statement])
-encodeTermMultilineTCO = def "encodeTermMultilineTCO" $
-  doc "Encode a term body for TCO: tail self-calls become param reassignment + continue" $
-  "cx" ~> "env" ~> "funcName" ~> "paramNames" ~> "term" ~>
-    "stripped" <~ (Strip.deannotateAndDetypeTerm @@ var "term") $
-    -- Check if this term is a direct self-tail-call: funcName(args...)
-    "gathered" <~ (Analysis.gatherApplications @@ var "stripped") $
-    "gatherArgs" <~ (Pairs.first $ var "gathered") $
-    "gatherFun" <~ (Pairs.second $ var "gathered") $
-    "strippedFun" <~ (Strip.deannotateAndDetypeTerm @@ var "gatherFun") $
-    -- Check for self-call pattern: Variable(funcName)
-    "isSelfCall" <~ (cases _Term (var "strippedFun")
-      (Just false) [
-        _Term_variable>>: "n" ~> Equality.equal (var "n") (var "funcName")]) $
-    Logic.ifElse (Logic.and (var "isSelfCall")
-                            (Equality.equal (Lists.length $ var "gatherArgs") (Lists.length $ var "paramNames")))
-      -- TAIL CALL: emit param reassignment + continue
-      ("pyArgs" <<~ Eithers.mapList ("a" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "a") (var "gatherArgs") $
-        "assignments" <~ (Lists.map ("pair" ~>
-          "paramName" <~ (Pairs.first $ var "pair") $
-          "pyArg" <~ (Pairs.second $ var "pair") $
-          PyUtils.assignmentStatement
-            @@ (PyNames.encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "paramName")
-            @@ var "pyArg")
-          (Lists.zip (var "paramNames") (var "pyArgs"))) $
-        "continueStmt" <~ (PyDsl.statementSimple $ list [PyDsl.simpleStatementContinue]) $
-        right $ Lists.concat2 (var "assignments") (list [var "continueStmt"]))
-      -- NOT a self-call: check for case statement application
-      ("gathered2" <~ (Analysis.gatherApplications @@ var "term") $
-        "args2" <~ (Pairs.first $ var "gathered2") $
-        "body2" <~ (Pairs.second $ var "gathered2") $
-        Logic.ifElse (Equality.equal (Lists.length $ var "args2") (int32 1))
-          -- Single argument: try to match as case statement
-          ("arg" <~ (Maybes.fromMaybe Core.termUnit (Lists.maybeHead $ var "args2")) $
-            cases _Term (Strip.deannotateAndDetypeTerm @@ var "body2") (Just $
-              -- Default: not a case statement, encode as return
-              "expr" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "term") $
-              right $ list [PyUtils.returnSingle @@ var "expr"]) [
-              _Term_cases>>: "cs" ~>
-                -- Case statement: use encodeCaseBlock with TCO-aware body encoder
-                "tname" <~ (Core.caseStatementTypeName $ var "cs") $
-                "dflt" <~ (Core.caseStatementDefault $ var "cs") $
-                "cases_" <~ (Core.caseStatementCases $ var "cs") $
-                "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-                "isEnum" <~ (Predicates.isEnumRowType @@ var "rt") $
-                "isFull" <~ (isCasesFull @@ var "rt" @@ var "cases_") $
-                "pyArg" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "arg") $
-                -- Use TCO body encoder for each case branch
-                "pyCases" <<~ (Eithers.mapList
-                  (encodeCaseBlock @@ var "cx" @@ var "env" @@ var "tname" @@ var "rt" @@ var "isEnum"
-                    @@ ("e2" ~> "t2" ~> encodeTermMultilineTCO @@ var "cx" @@ var "e2" @@ var "funcName" @@ var "paramNames" @@ var "t2"))
-                  (deduplicateCaseVariables @@ var "cases_")) $
-                -- Default case: uses normal return encoding (base case is never a tail call)
-                "pyDflt" <<~ (encodeDefaultCaseBlock
-                  @@ ("t2" ~> encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "t2")
-                  @@ var "isFull" @@ var "dflt" @@ var "tname") $
-                "subj" <~ (PyDsl.subjectExpressionSimple $ PyDsl.namedExpressionSimple $ var "pyArg") $
-                "matchStmt" <~ (PyDsl.statementCompound $ PyDsl.compoundStatementMatch $
-                  Phantoms.record Py._MatchStatement [
-                    Phantoms.field Py._MatchStatement_subject (var "subj"),
-                    Phantoms.field Py._MatchStatement_cases (Lists.concat2 (var "pyCases") (var "pyDflt"))]) $
-                right $ list [var "matchStmt"]])
-          -- Not a single-arg application: fall back to normal return
-          ("expr" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "term") $
-            right $ list [PyUtils.returnSingle @@ var "expr"]))
-
--- | Encode a Hydra type to a Python type expression.
---   This is the main recursive type encoder.
-encodeType :: TTermDefinition (PyHelpers.PythonEnvironment -> Type -> Either Error Py.Expression)
-encodeType = def "encodeType" $
-  doc "Encode a Hydra type to a Python type expression" $
-  "env" ~> "typ" ~>
-    -- dflt produces a quoted string fallback for unsupported types
-    "dflt" <~ (right $ PyUtils.doubleQuotedString @@ (Strings.cat2 (string "type = ") (ShowCore.type_ @@ (Strip.deannotateType @@ var "typ")))) $
-    cases _Type (Strip.deannotateType @@ var "typ") Nothing [
-      _Type_application>>: "at" ~> encodeApplicationType @@ var "env" @@ var "at",
-      _Type_function>>: "ft" ~> encodeFunctionType @@ var "env" @@ var "ft",
-      _Type_forall>>: "lt" ~> encodeForallType @@ var "env" @@ var "lt",
-      _Type_list>>: "et" ~>
-        "pyet" <<~ encodeType @@ var "env" @@ var "et" $
-        right $ PyUtils.nameAndParams @@ (PyDsl.name $ string "frozenlist") @@ list [var "pyet"],
-      _Type_map>>: "mt" ~>
-        "pykt" <<~ encodeType @@ var "env" @@ (project _MapType _MapType_keys @@ var "mt") $
-        "pyvt" <<~ encodeType @@ var "env" @@ (project _MapType _MapType_values @@ var "mt") $
-        right $ PyUtils.nameAndParams @@ (PyDsl.name $ string "FrozenDict") @@ list [var "pykt", var "pyvt"],
-      _Type_literal>>: "lt" ~> encodeLiteralType @@ var "lt",
-      _Type_maybe>>: "et" ~>
-        "ptype" <<~ encodeType @@ var "env" @@ var "et" $
-        right $ PyUtils.pyPrimaryToPyExpression @@
-          (PyUtils.primaryWithExpressionSlices @@
-            (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "Maybe") @@
-            list [var "ptype"]),
-      _Type_either>>: "eitherT" ~>
-        "pyleft" <<~ encodeType @@ var "env" @@ (project _EitherType _EitherType_left @@ var "eitherT") $
-        "pyright" <<~ encodeType @@ var "env" @@ (project _EitherType _EitherType_right @@ var "eitherT") $
-        right $ PyUtils.pyPrimaryToPyExpression @@
-          (PyUtils.primaryWithExpressionSlices @@
-            (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "Either") @@
-            list [var "pyleft", var "pyright"]),
-      _Type_pair>>: "pairT" ~>
-        "pyFirst" <<~ encodeType @@ var "env" @@ (project _PairType _PairType_first @@ var "pairT") $
-        "pySecond" <<~ encodeType @@ var "env" @@ (project _PairType _PairType_second @@ var "pairT") $
-        right $ PyUtils.nameAndParams @@ (PyDsl.name $ string "tuple") @@ list [var "pyFirst", var "pySecond"],
-      _Type_record>>: constant $ var "dflt",
-      _Type_set>>: "et" ~>
-        "pyet" <<~ encodeType @@ var "env" @@ var "et" $
-        right $ PyUtils.nameAndParams @@ (PyDsl.name $ string "frozenset") @@ list [var "pyet"],
-      _Type_union>>: constant $ var "dflt",
-      _Type_unit>>: constant $ right $ PyUtils.pyNameToPyExpression @@ PyUtils.pyNone,
-      _Type_void>>: constant $ right $ PyUtils.pyNameToPyExpression @@ PyUtils.pyNone,
-      _Type_variable>>: "name" ~>
-        right $ PyNames.typeVariableReference @@ var "env" @@ var "name",
-      _Type_wrap>>: constant $ var "dflt",
-      -- Default case for annotated and any other types
-      _Type_annotated>>: constant $ var "dflt"]
-
--- | Encode a type assignment (dispatches to record, union, wrap, or simple typedef)
---   Name constants are now generated inside the class body by each type encoder.
-encodeTypeAssignment :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> Type -> Maybe String -> Either Error [[Py.Statement]])
-encodeTypeAssignment = def "encodeTypeAssignment" $
-  doc "Encode a type definition, dispatching based on type structure" $
-  "cx" ~> "env" ~> "name" ~> "typ" ~> "comment" ~>
-    "defStmts" <<~ (encodeTypeAssignmentInner @@ var "cx" @@ var "env" @@ var "name" @@ var "typ" @@ var "comment") $
-    right $ Lists.map ("s" ~> list [var "s"]) (var "defStmts")
-
--- | Inner type assignment encoding that handles forall unwrapping
-encodeTypeAssignmentInner :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> Type -> Maybe String -> Either Error [Py.Statement])
-encodeTypeAssignmentInner = def "encodeTypeAssignmentInner" $
-  doc "Encode the inner type definition, unwrapping forall types" $
-  "cx" ~> "env" ~> "name" ~> "typ" ~> "comment" ~>
-    "stripped" <~ (Strip.deannotateType @@ var "typ") $
-    -- Default: simple type alias
-    "dflt" <~ ("typeExpr" <<~ (encodeType @@ var "env" @@ var "typ") $
-       right $ encodeTypeDefSingle @@ var "env" @@ var "name" @@ var "comment" @@ var "typeExpr") $
-    cases _Type (var "stripped") (Just (var "dflt")) [
-      -- Forall: extend environment with type variable and recurse
-      _Type_forall>>: "ft" ~>
-        "tvar" <~ (Core.forallTypeParameter $ var "ft") $
-        "body" <~ (Core.forallTypeBody $ var "ft") $
-        "newEnv" <~ (extendEnvWithTypeVar @@ var "env" @@ var "tvar") $
-        encodeTypeAssignmentInner @@ var "cx" @@ var "newEnv" @@ var "name" @@ var "body" @@ var "comment",
-
-      -- Record type
-      _Type_record>>: "rt" ~>
-        Eithers.map ("s" ~> list [var "s"]) (encodeRecordType @@ var "cx" @@ var "env" @@ var "name" @@ var "rt" @@ var "comment"),
-
-      -- Union type
-      _Type_union>>: "rt" ~>
-        encodeUnionType @@ var "cx" @@ var "env" @@ var "name" @@ var "rt" @@ var "comment",
-
-      -- Wrapped type
-      _Type_wrap>>: "wt" ~>
-        encodeWrappedType @@ var "env" @@ var "name" @@ var "wt" @@ var "comment"]
-
--- | Encode a type definition with a single statement result
-encodeTypeDefSingle :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Maybe String -> Py.Expression -> [Py.Statement])
-encodeTypeDefSingle = def "encodeTypeDefSingle" $
-  doc "Encode a simple type alias definition" $
-  "env" ~> "name" ~> "comment" ~> "typeExpr" ~>
-    "pyName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionPascal @@ var "env" @@ var "name") $
-    "tparams" <~ (environmentTypeParameters @@ var "env") $
-    list [typeAliasStatementFor @@ var "env" @@ var "pyName" @@ var "tparams" @@ var "comment" @@ var "typeExpr"]
-
--- | Encode a type to a Python expression, quoting if the type has free variables.
---   Free variables indicate forward references that need to be quoted strings in Python.
-encodeTypeQuoted :: TTermDefinition (PyHelpers.PythonEnvironment -> Type -> Either Error Py.Expression)
-encodeTypeQuoted = def "encodeTypeQuoted" $
-  doc "Encode a type to a Python expression, quoting if the type has free variables" $
-  "env" ~> "typ" ~>
-    "pytype" <<~ encodeType @@ var "env" @@ var "typ" $
-    right $ Logic.ifElse (Sets.null (Variables.freeVariablesInType @@ var "typ"))
-      (var "pytype")
-      (PyUtils.doubleQuotedString @@ (Serialization.printExpr @@ (PySerde.encodeExpression @@ var "pytype")))
-
--- | Encode a union elimination (case expression) applied to an argument as an inline
---   conditional expression chain:
---     branch1_result if isinstance(arg, T1) else branch2_result if isinstance(arg, T2) else ...
---   This is used when a case application appears in an expression context where a match
---   statement cannot be emitted (e.g., inside a lambda or walrus assignment).
-encodeUnionEliminationInline :: TTermDefinition (Context -> PyHelpers.PythonEnvironment
-  -> CaseStatement -> Py.Expression
-  -> Either Error Py.Expression)
-encodeUnionEliminationInline = def "encodeUnionEliminationInline" $
-  doc "Encode a union elimination as an inline conditional chain (isinstance-based ternary)" $
-  "cx" ~> "env" ~> "cs" ~> "pyArg" ~>
-    "tname" <~ (Core.caseStatementTypeName $ var "cs") $
-    "mdefault" <~ (Core.caseStatementDefault $ var "cs") $
-    "cases_" <~ (Core.caseStatementCases $ var "cs") $
-    -- Get the row type for isEnum and isUnit checks
-    "rt" <<~ (Resolution.requireUnionType @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "tname") $
-    "isEnum" <~ (Predicates.isEnumRowType @@ var "rt") $
-    -- Project .value from the argument for non-enum types
-    "valueExpr" <~ (PyUtils.projectFromExpression @@ var "pyArg" @@ (PyDsl.name $ string "value")) $
-    -- Build the isinstance function reference
-    "isinstancePrimary" <~ (PyUtils.pyNameToPyPrimary @@ (PyDsl.name $ string "isinstance")) $
-    -- Encode the default expression (used as final else)
-    "pyDefault" <<~ (Maybes.maybe
-      -- No default: produce an unsupported expression as fallback
-      (right $ unsupportedExpression @@ string "no matching case in inline union elimination")
-      -- Has default: encode it inline (the default is a value, not a function to be applied)
-      ("dflt" ~>
-        encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "dflt")
-      (var "mdefault")) $
-    -- Encode each case branch into (isinstance_check_expression, result_expression) pairs
-    -- Then fold them into a chain of Conditional expressions from right to left
-    "encodeBranch" <~ (
-      "field" ~>
-        "fname" <~ Core.fieldName (var "field") $
-        "fterm" <~ Core.fieldTerm (var "field") $
-        -- Is this variant a unit type?
-        "isUnitVariant" <~ (isVariantUnitType @@ var "rt" @@ var "fname") $
-        -- Get the Python variant class name (deconflicted to avoid collisions)
-        "pyVariantName" <~ (deconflictVariantName @@ true @@ var "env" @@ var "tname" @@ var "fname" @@ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env")) $
-        -- Create the check expression:
-        --   Enum types: arg == EnumType.VARIANT (using comparison operator)
-        --   Non-enum types: isinstance(arg, VariantType) (using function call)
-        "isinstanceCheck" <~ (Logic.ifElse (var "isEnum")
-          -- Enum: arg == EnumType.VARIANT (e.g. AssignmentOperator.SIMPLE)
-          (PyDsl.pyComparisonToPyExpression $ PyDsl.comparison
-            (PyUtils.pyExpressionToBitwiseOr @@ var "pyArg")
-            (list [PyDsl.compPairEq
-              (PyUtils.pyExpressionToBitwiseOr @@ (PyUtils.pyNameToPyExpression @@ var "pyVariantName"))]))
-          -- Non-enum: isinstance(arg, VariantType)
-          (PyUtils.functionCall @@ var "isinstancePrimary"
-            @@ list [var "pyArg", PyUtils.pyNameToPyExpression @@ var "pyVariantName"])) $
-        -- Encode the branch term and apply it
-        "pyBranch" <<~ (encodeTermInline @@ var "cx" @@ var "env" @@ false @@ var "fterm") $
-        "pyResult" <~ (Logic.ifElse (var "isEnum")
-          -- Enum variant: the branch lambda expects nothing useful, just call with arg
-          (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "pyBranch") @@ list [var "pyArg"])
-          (Logic.ifElse (var "isUnitVariant")
-            -- Unit variant: no .value field, apply branch with the argument directly
-            (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "pyBranch") @@ list [var "pyArg"])
-            -- Normal variant: apply branch function to arg.value
-            (PyUtils.functionCall @@ (PyUtils.pyExpressionToPyPrimary @@ var "pyBranch") @@ list [var "valueExpr"]))) $
-        right $ pair (var "isinstanceCheck") (var "pyResult")) $
-    -- Encode all branches
-    "encodedBranches" <<~ (Eithers.mapList (var "encodeBranch") (var "cases_")) $
-    -- Fold branches into a conditional chain from right to left:
-    --   result_n if isinstance(arg, Tn) else ... else default
-    -- Use foldl on reversed branches: foldl (\acc branch -> cond(branch, acc)) default (reverse branches)
-    "buildChain" <~ (
-      "elseExpr" ~> "branchPair" ~>
-        "checkExpr" <~ Pairs.first (var "branchPair") $
-        "resultExpr" <~ Pairs.second (var "branchPair") $
-        PyDsl.expressionConditional $ PyDsl.conditional
-          (PyUtils.pyExpressionToDisjunction @@ var "resultExpr")
-          (PyUtils.pyExpressionToDisjunction @@ var "checkExpr")
-          (var "elseExpr")) $
-    right $ Lists.foldl (var "buildChain") (var "pyDefault") (Lists.reverse $ var "encodedBranches")
-
--- | Encode a term to a Python expression (inline form).
-
-encodeUnionField :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> FieldType -> Either Error Py.Statement)
-encodeUnionField = def "encodeUnionField" $
-  doc "Encode a union field as a variant class" $
-  "cx" ~> "env" ~> "unionName" ~> "fieldType" ~>
-    "fname" <~ Core.fieldTypeName (var "fieldType") $
-    "ftype" <~ Core.fieldTypeType (var "fieldType") $
-    "fcomment" <<~ (Annotations.getTypeDescription @@ var "cx" @@ (pythonEnvironmentGetGraph @@ var "env") @@ var "ftype") $
-    "isUnit" <~ (Equality.equal (Strip.deannotateType @@ var "ftype") (Core.typeUnit)) $
-    "varName" <~ (deconflictVariantName @@ false @@ var "env" @@ var "unionName" @@ var "fname" @@ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env")) $
-    "tparamNames" <~ (findTypeParams @@ var "env" @@ var "ftype") $
-    "tparamPyNames" <~ Lists.map PyNames.encodeTypeVariable (var "tparamNames") $
-    "fieldParams" <~ Lists.map PyUtils.pyNameToPyTypeParameter (var "tparamPyNames") $
-    -- For unit types, use unitVariantMethods for body; otherwise empty
-    "body" <~ Logic.ifElse (var "isUnit")
-      (PyUtils.indentedBlock @@ var "fcomment" @@ list [PyUtils.unitVariantMethods @@ var "varName"])
-      (PyUtils.indentedBlock @@ var "fcomment" @@ Phantoms.list ([] :: [TTerm [Py.Statement]])) $
-    -- For unit types, no args; otherwise variantArgs
-    "margs" <<~ Logic.ifElse (var "isUnit")
-      (right (nothing :: TTerm (Maybe Py.Args)))
-      ("quotedType" <<~ (encodeTypeQuoted @@ var "env" @@ var "ftype") $
-       right $ just (variantArgs @@ var "quotedType" @@ Phantoms.list ([] :: [TTerm Name]))) $
-    right $ PyUtils.pyClassDefinitionToPyStatement @@
-      PyDsl.classDefinition
-        nothing
-        (var "varName")
-        (var "fieldParams")
-        (var "margs")
-        (var "body")
-
--- | Encode a union field as an alternative expression for the union type alias
-encodeUnionFieldAlt :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> FieldType -> Py.Primary)
-encodeUnionFieldAlt = def "encodeUnionFieldAlt" $
-  doc "Encode a union field as a primary expression for | alternatives" $
-  "env" ~> "unionName" ~> "fieldType" ~>
-    "fname" <~ Core.fieldTypeName (var "fieldType") $
-    "ftype" <~ Core.fieldTypeType (var "fieldType") $
-    "tparamNames" <~ (findTypeParams @@ var "env" @@ var "ftype") $
-    "tparams" <~ Lists.map PyNames.encodeTypeVariable (var "tparamNames") $
-    "namePrim" <~ (PyUtils.pyNameToPyPrimary @@ (PyNames.variantName @@ false @@ var "env" @@ var "unionName" @@ var "fname")) $
-    Logic.ifElse (Lists.null (var "tparams"))
-      (var "namePrim")
-      ("tparamExprs" <~ Lists.map PyUtils.pyNameToPyExpression (var "tparams") $
-       PyUtils.primaryWithExpressionSlices @@ var "namePrim" @@ var "tparamExprs")
-
--- | Encode a union type as either an enum or a set of variant classes
-encodeUnionType :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> [FieldType] -> Maybe String -> Either Error [Py.Statement])
-encodeUnionType = def "encodeUnionType" $
-  doc "Encode a union type as an enum (for unit-only fields) or variant classes" $
-  "cx" ~> "env" ~> "name" ~> "rowType" ~> "comment" ~>
-    Logic.ifElse (Predicates.isEnumRowType @@ var "rowType")
-      -- Enum case: enum values are Name objects; TYPE_ assigned after class to avoid becoming a member
-      ("vals" <<~ (Eithers.mapList (encodeEnumValueAssignment @@ var "cx" @@ var "env") (var "rowType")) $
-       "body" <~ (PyUtils.indentedBlock @@ var "comment" @@ var "vals") $
-       "enumName" <~ PyDsl.name (string "Enum") $
-       "args" <~ (just $ PyUtils.pyExpressionsToPyArgs @@ list [PyUtils.pyNameToPyExpression @@ var "enumName"]) $
-       "pyName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionPascal @@ var "env" @@ var "name") $
-       -- Generate TYPE_ as a dotted assignment after the class: ClassName.TYPE_ = Name("...")
-       "typeConstStmt" <~ (PyUtils.dottedAssignmentStatement
-         @@ var "pyName"
-         @@ (PyNames.encodeConstantForTypeName @@ var "env" @@ var "name")
-         @@ (PyUtils.functionCall
-               @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ (Core.name $ string "hydra.core.Name")))
-               @@ list [PyUtils.doubleQuotedString @@ (Core.unName $ var "name")])) $
-       right $ list [PyUtils.pyClassDefinitionToPyStatement @@
-         PyDsl.classDefinition nothing (var "pyName") (Phantoms.list ([] :: [TTerm Py.TypeParameter])) (var "args") (var "body"),
-         var "typeConstStmt"])
-      -- Union case: pass constants to the union class body
-      ("constStmts" <~ (encodeNameConstants @@ var "env" @@ var "name" @@ var "rowType") $
-       "fieldStmts" <<~ (Eithers.mapList (encodeUnionField @@ var "cx" @@ var "env" @@ var "name") (var "rowType")) $
-       "tparams" <~ (environmentTypeParameters @@ var "env") $
-       "unionAlts" <~ Lists.map (encodeUnionFieldAlt @@ var "env" @@ var "name") (var "rowType") $
-       "unionStmts" <~ (unionTypeStatementsFor @@ var "env" @@
-         (PyNames.encodeName @@ false @@ Util.caseConventionPascal @@ var "env" @@ var "name") @@
-         (var "tparams") @@
-         (var "comment") @@
-         (PyUtils.orExpression @@ var "unionAlts") @@
-         (var "constStmts")) $
-       right $ Lists.concat2 (var "fieldStmts") (var "unionStmts"))
-
--- | Encode a variable reference to a Python expression.
---   This handles various cases: lambda variables, let-bound variables, primitives, and graph elements.
---   The complexity arises from needing to determine when a variable needs call syntax () vs plain reference.
-encodeVariable :: TTermDefinition (Context -> PyHelpers.PythonEnvironment -> Name -> [Py.Expression] -> Either Error Py.Expression)
-encodeVariable = def "encodeVariable" $
-  doc "Encode a variable reference to a Python expression" $
-  "cx" ~> "env" ~> "name" ~> "args" ~>
-    "g" <~ (pythonEnvironmentGetGraph @@ var "env") $
-    "tc" <~ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env") $
-    "tcTypes" <~ (Graph.graphBoundTypes $ var "tc") $
-    "tcLambdaVars" <~ (Graph.graphLambdaVariables $ var "tc") $
-    "tcMetadata" <~ (Graph.graphMetadata $ var "tc") $
-    "inlineVars" <~ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_inlineVariables @@ var "env") $
-    "mTypScheme" <~ (Maps.lookup (var "name") (var "tcTypes")) $
-    "mTyp" <~ (Maybes.map ("ts_" ~> Core.typeSchemeBody (var "ts_")) (var "mTypScheme")) $
-    "asVariable" <~ (PyNames.termVariableReference @@ var "env" @@ var "name") $
-    "asFunctionCall" <~ (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionLowerSnake @@ var "env" @@ var "name")) @@ var "args") $
-    Logic.ifElse (Logic.not $ Lists.null (var "args"))
-      -- Non-empty args: check for primitives first
-      (Maybes.maybe
-        -- No primitive found: use regular function call
-        (right $ var "asFunctionCall")
-        -- Primitive found: check if full or partial application
-        ("prim" ~>
-          "primArity" <~ (Arity.primitiveArity @@ var "prim") $
-          Logic.ifElse (Equality.equal (var "primArity") (Lists.length (var "args")))
-            -- Full application
-            (right $ var "asFunctionCall")
-            -- Partial application: create lambda for remaining args
-            ("numRemaining" <~ (Math.sub (var "primArity") (Lists.length (var "args"))) $
-              "remainingParams" <~ (Lists.map ("i" ~> PyDsl.name (Strings.cat2 (string "x") (Literals.showInt32 (var "i")))) (Math.range (int32 1) (var "numRemaining"))) $
-              "remainingExprs" <~ (Lists.map ("n" ~> PyDsl.pyNameToPyExpression (var "n")) (var "remainingParams")) $
-              "allArgs" <~ (Lists.concat2 (var "args") (var "remainingExprs")) $
-              "fullCall" <~ (PyUtils.functionCall @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionLowerSnake @@ var "env" @@ var "name")) @@ var "allArgs") $
-              right $ makeUncurriedLambda @@ var "remainingParams" @@ var "fullCall"))
-        (Lexical.lookupPrimitive @@ var "g" @@ var "name"))
-      -- Empty args: check various contexts
-      (Maybes.maybe
-        -- Name not in graphBoundTypes
-        (Logic.ifElse (Sets.member (var "name") (var "tcLambdaVars"))
-          -- Untyped lambda variable
-          (right $ var "asVariable")
-          -- Not a lambda var - check inline vars first
-          (Logic.ifElse (Sets.member (var "name") (var "inlineVars"))
-            -- Untyped inline variable (e.g. from hoisting with no type annotation)
-            (right $ var "asVariable")
-            -- Not inline - check primitives
-            (Maybes.maybe
-              -- Not a primitive - check graph elements
-              (Maybes.maybe
-                -- Not in graph elements - check metadata
-                (Maybes.maybe
-                  (left $ Error.errorOther $ Error.otherError $ Strings.cat2 (string "Unknown variable: ") (Core.unName (var "name")))
-                  (constant $ right $ var "asFunctionCall")  -- Lifted case expression
-                  (Maps.lookup (var "name") (var "tcMetadata")))
-              -- In graph elements
-              ("el" ~>
-                "elTrivial1" <~ (Predicates.isTrivialTerm @@ (Core.bindingTerm $ var "el")) $
-                Maybes.maybe
-                  (right $ var "asVariable")
-                  ("ts" ~>
-                    Logic.ifElse (Logic.and (Logic.and (Equality.equal (Arity.typeSchemeArity @@ var "ts") (int32 0))
-                                                       (Predicates.isComplexBinding @@ var "tc" @@ var "el"))
-                                            (Logic.not (var "elTrivial1")))
-                      (right $ var "asFunctionCall")
-                      ("asFunctionRef" <~ (Logic.ifElse (Logic.not $ Lists.null (Core.typeSchemeVariables $ var "ts"))
-                          (makeSimpleLambda @@ (Arity.typeArity @@ (Core.typeSchemeBody $ var "ts")) @@ var "asVariable")
-                          (var "asVariable")) $
-                        right $ var "asFunctionRef"))
-                  (Core.bindingTypeScheme $ var "el"))
-              (Lexical.lookupBinding @@ var "g" @@ var "name"))
-            -- Is a primitive with no args: check if nullary
-            ("prim" ~>
-              "primArity" <~ (Arity.primitiveArity @@ var "prim") $
-              Logic.ifElse (Equality.equal (var "primArity") (int32 0))
-                -- Nullary primitive: call with ()
-                (right $ var "asFunctionCall")
-                -- Non-nullary primitive: function reference
-                ("ts" <~ (Phantoms.project _Primitive _Primitive_typeScheme @@ var "prim") $
-                  "asFunctionRef" <~ (Logic.ifElse (Logic.not $ Lists.null (Core.typeSchemeVariables $ var "ts"))
-                      (makeSimpleLambda @@ (Arity.typeArity @@ (Core.typeSchemeBody $ var "ts")) @@ var "asVariable")
-                      (var "asVariable")) $
-                  right $ var "asFunctionRef"))
-            (Lexical.lookupPrimitive @@ var "g" @@ var "name"))))
-        -- Name is in graphBoundTypes
-        ("typ" ~>
-          Logic.ifElse (Sets.member (var "name") (var "tcLambdaVars"))
-            -- Lambda variable
-            (right $ var "asVariable")
-            -- Not a lambda variable
-            (Logic.ifElse (Sets.member (var "name") (var "inlineVars"))
-              -- Inline variable: function reference
-              ("asFunctionRef" <~ (Logic.ifElse (Logic.not $ Sets.null (Variables.freeVariablesInType @@ var "typ"))
-                  (makeSimpleLambda @@ (Arity.typeArity @@ var "typ") @@ var "asVariable")
-                  (var "asVariable")) $
-                right $ var "asFunctionRef")
-              -- Not inline variable
-              (Logic.ifElse (Logic.not $ Maps.member (var "name") (var "tcMetadata"))
-                -- Not in metadata - check graph elements
-                (Maybes.maybe
-                  -- Not in graph elements: inline let binding
-                  ("asFunctionRef" <~ (Logic.ifElse (Logic.not $ Sets.null (Variables.freeVariablesInType @@ var "typ"))
-                      (makeSimpleLambda @@ (Arity.typeArity @@ var "typ") @@ var "asVariable")
-                      (var "asVariable")) $
-                    right $ var "asFunctionRef")
-                  -- In graph elements
-                  ("el" ~>
-                    "elTrivial" <~ (Predicates.isTrivialTerm @@ (Core.bindingTerm $ var "el")) $
-                    Maybes.maybe
-                      (Logic.ifElse (Logic.and (Equality.equal (Arity.typeArity @@ var "typ") (int32 0))
-                                               (Logic.not (var "elTrivial")))
-                        (right $ var "asFunctionCall")
-                        ("asFunctionRef" <~ (Logic.ifElse (Logic.not $ Sets.null (Variables.freeVariablesInType @@ var "typ"))
-                            (makeSimpleLambda @@ (Arity.typeArity @@ var "typ") @@ var "asVariable")
-                            (var "asVariable")) $
-                          right $ var "asFunctionRef"))
-                      ("ts" ~>
-                        Logic.ifElse (Logic.and (Logic.and (Equality.equal (Arity.typeArity @@ var "typ") (int32 0))
-                                                           (Predicates.isComplexBinding @@ var "tc" @@ var "el"))
-                                                (Logic.not (var "elTrivial")))
-                          (right $ var "asFunctionCall")
-                          ("asFunctionRef" <~ (Logic.ifElse (Logic.not $ Sets.null (Variables.freeVariablesInType @@ var "typ"))
-                              (makeSimpleLambda @@ (Arity.typeArity @@ var "typ") @@ var "asVariable")
-                              (var "asVariable")) $
-                            right $ var "asFunctionRef"))
-                      (Core.bindingTypeScheme $ var "el"))
-                  (Lexical.lookupBinding @@ var "g" @@ var "name"))
-                -- Is in metadata: regular let binding
-                (Logic.ifElse (Logic.and (Equality.equal (Arity.typeArity @@ var "typ") (int32 0))
-                                          (Predicates.isComplexVariable @@ var "tc" @@ var "name"))
-                  (right $ var "asFunctionCall")
-                  ("asFunctionRef" <~ (Logic.ifElse (Logic.not $ Sets.null (Variables.freeVariablesInType @@ var "typ"))
-                      (makeSimpleLambda @@ (Arity.typeArity @@ var "typ") @@ var "asVariable")
-                      (var "asVariable")) $
-                    right $ var "asFunctionRef")))))
-        (var "mTyp"))
-
--- | Encode a wrapped type (newtype) to a Python class definition.
---   Creates a class that extends Node[inner_type] with optional Generic[T] for polymorphic types.
---   TYPE_ is assigned after the class to avoid self-reference issues (e.g., Name.TYPE_ = Name(...)).
-encodeWrappedType :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Type -> Maybe String -> Either Error [Py.Statement])
-encodeWrappedType = def "encodeWrappedType" $
-  doc "Encode a wrapped type (newtype) to a Python class definition" $
-  "env" ~> "name" ~> "typ" ~> "comment" ~>
-    "tparamList" <~ (Pairs.first $ project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env") $
-    "ptypeQuoted" <<~ encodeTypeQuoted @@ var "env" @@ var "typ" $
-    "pyName" <~ (PyNames.encodeName @@ false @@ Util.caseConventionPascal @@ var "env" @@ var "name") $
-    "body" <~ (PyUtils.indentedBlock @@ var "comment" @@ list ([] :: [TTerm [Py.Statement]])) $
-    -- Generate TYPE_ as a dotted assignment after the class: ClassName.TYPE_ = Name("...")
-    "typeConstStmt" <~ (PyUtils.dottedAssignmentStatement
-      @@ var "pyName"
-      @@ (PyNames.encodeConstantForTypeName @@ var "env" @@ var "name")
-      @@ (PyUtils.functionCall
-            @@ (PyUtils.pyNameToPyPrimary @@ (PyNames.encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ (Core.name $ string "hydra.core.Name")))
-            @@ list [PyUtils.doubleQuotedString @@ (Core.unName $ var "name")])) $
-    right $ list [
-      PyUtils.pyClassDefinitionToPyStatement @@
-        PyDsl.classDefinition
-          nothing
-          (var "pyName")
-          (Lists.map (PyUtils.pyNameToPyTypeParameter <.> PyNames.encodeTypeVariable) (findTypeParams @@ var "env" @@ var "typ"))
-          (just (variantArgs @@ var "ptypeQuoted" @@ var "tparamList"))
-          (var "body"),
-      var "typeConstStmt"]
-
--- | Create a CaseBlock pattern for an enum variant (value pattern).
-enumVariantPattern :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Name -> Py.ClosedPattern)
-enumVariantPattern = def "enumVariantPattern" $
-  doc "Create a value pattern for an enum variant" $
-  "env" ~> "typeName" ~> "fieldName" ~>
-    PyDsl.closedPatternValue $ PyDsl.valuePattern $ PyDsl.attribute $ list [
-      PyNames.encodeName @@ true @@ Util.caseConventionPascal @@ var "env" @@ var "typeName",
-      PyNames.encodeEnumValue @@ var "env" @@ var "fieldName"]
-
--- | Get type parameters from environment as Python TypeParameters
-environmentTypeParameters :: TTermDefinition (PyHelpers.PythonEnvironment -> [Py.TypeParameter])
-environmentTypeParameters = def "environmentTypeParameters" $
-  doc "Get type parameters from environment as Python TypeParameters" $
-  "env" ~>
-    Lists.map
-      (PyUtils.pyNameToPyTypeParameter <.> PyNames.encodeTypeVariable)
-      (Pairs.first (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env"))
-
--- | Extend PythonEnvironment's Graph by adding lambda parameters.
---   This is used when we've gathered lambdas from a term but need to manually extend the context.
-extendEnvWithLambdaParams :: TTermDefinition (PyHelpers.PythonEnvironment -> Term -> PyHelpers.PythonEnvironment)
-extendEnvWithLambdaParams = def "extendEnvWithLambdaParams" $
-  doc "Extend environment with lambda parameters from a term" $
-  "env" ~> "term" ~>
-    "go" <~ ("e" ~> "t" ~>
-      cases _Term (Strip.deannotateAndDetypeTerm @@ var "t") (Just $ var "e") [
-        _Term_lambda>>: "lam" ~>
-          "newTc" <~ (Scoping.extendGraphForLambda @@
-            (pythonEnvironmentGetGraph @@ var "e") @@ var "lam") $
-          "newEnv" <~ (pythonEnvironmentSetGraph @@ var "newTc" @@ var "e") $
-          var "go" @@ var "newEnv" @@ (Core.lambdaBody $ var "lam")]) $
-    var "go" @@ var "env" @@ var "term"
-
--- | Extend a PythonEnvironment with a new bound type variable.
---   This creates a new environment with the variable added to the type parameter list and map.
-extendEnvWithTypeVar :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> PyHelpers.PythonEnvironment)
-extendEnvWithTypeVar = def "extendEnvWithTypeVar" $
-  doc "Extend a PythonEnvironment with a new bound type variable" $
-  "env" ~> "var_" ~>
-    "oldBound" <~ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env") $
-    "tparamList" <~ (Pairs.first $ var "oldBound") $
-    "tparamMap" <~ (Pairs.second $ var "oldBound") $
-    "newList" <~ (Lists.concat2 (var "tparamList") (list [var "var_"])) $
-    "newMap" <~ (Maps.insert (var "var_") (PyNames.encodeTypeVariable @@ var "var_") (var "tparamMap")) $
-    record PyHelpers._PythonEnvironment [
-      PyHelpers._PythonEnvironment_namespaces>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "env",
-      PyHelpers._PythonEnvironment_boundTypeVariables>>: pair (var "newList") (var "newMap"),
-      PyHelpers._PythonEnvironment_graph>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env",
-      PyHelpers._PythonEnvironment_nullaryBindings>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_nullaryBindings @@ var "env",
-      PyHelpers._PythonEnvironment_version>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_version @@ var "env",
-      PyHelpers._PythonEnvironment_skipCasts>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_skipCasts @@ var "env",
-      PyHelpers._PythonEnvironment_inlineVariables>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_inlineVariables @@ var "env"]
-
--- | Extend metadata based on a term (used during module encoding).
---   Traverses a term and updates metadata flags based on what features are used.
---   The topLevel parameter affects whether we track function type annotations at this level.
-extendMetaForTerm :: TTermDefinition (Bool -> PyHelpers.PythonModuleMetadata -> Term -> PyHelpers.PythonModuleMetadata)
-extendMetaForTerm = def "extendMetaForTerm" $
-  doc "Extend metadata based on a term (used during module encoding)" $
-  "topLevel" ~> "meta0" ~> "term" ~>
-    "step" <~ ("meta" ~> "t" ~>
-      cases _Term (var "t") (Just $ var "meta") [
-        _Term_either>>: "e" ~>
-          -- Either terms need cast() in Python for proper typing
-          "metaWithCast" <~ (setMetaUsesCast @@ true @@ var "meta") $
-          Eithers.either_
-            (constant $ setMetaUsesLeft @@ var "metaWithCast" @@ true)
-            (constant $ setMetaUsesRight @@ var "metaWithCast" @@ true)
-            (var "e"),
-        _Term_lambda>>: "lam" ~>
-          Maybes.maybe
-            (var "meta")
-            ("dom" ~> Logic.ifElse (var "topLevel")
-              (extendMetaForType @@ true @@ false @@ var "dom" @@ var "meta")
-              (var "meta"))
-            (Core.lambdaDomain $ var "lam"),
-        _Term_let>>: "lt" ~>
-          "bindings" <~ Core.letBindings (var "lt") $
-          Lists.foldl ("forBinding" <~ ("m" ~> "b" ~>
-            Maybes.maybe
-              (var "m")
-              ("ts" ~>
-                "term1" <~ Core.bindingTerm (var "b") $
-                Logic.ifElse (Analysis.isSimpleAssignment @@ var "term1")
-                  (var "m")
-                  (extendMetaForType @@ true @@ true @@ (Core.typeSchemeBody $ var "ts") @@ var "m"))
-              (Core.bindingTypeScheme $ var "b")) $
-            var "forBinding") (var "meta") (var "bindings"),
-        _Term_literal>>: "l" ~>
-          cases _Literal (var "l") (Just $ var "meta") [
-            _Literal_decimal>>: constant $
-              setMetaUsesDecimal @@ var "meta" @@ true,
-            _Literal_float>>: "fv" ~>
-              cases _FloatValue (var "fv") (Just $ var "meta") [
-                _FloatValue_bigfloat>>: constant $
-                  setMetaUsesDecimal @@ var "meta" @@ true]],
-        _Term_map>>: constant $
-          setMetaUsesFrozenDict @@ var "meta" @@ true,
-        _Term_maybe>>: "m" ~>
-          Maybes.maybe
-            (setMetaUsesNothing @@ var "meta" @@ true)
-            (constant $ setMetaUsesJust @@ var "meta" @@ true)
-            (var "m"),
-        -- Union injections require cast() for proper typing
-        _Term_inject>>: constant $
-          setMetaUsesCast @@ true @@ var "meta"]) $
-    Rewriting.foldOverTerm @@ Coders.traversalOrderPre @@ var "step" @@ var "meta0" @@ var "term"
-
--- Helper functions to set individual metadata fields
-
--- | Extend metadata based on a type (used during module encoding).
---   topLevel: whether this is a top-level type annotation
---   isTermAnnot: whether this is a term's type annotation vs a type definition
-extendMetaForType :: TTermDefinition (Bool -> Bool -> Type -> PyHelpers.PythonModuleMetadata -> PyHelpers.PythonModuleMetadata)
-extendMetaForType = def "extendMetaForType" $
-  doc "Extend metadata based on a type (used during module encoding)" $
-  "topLevel" ~> "isTermAnnot" ~> "typ" ~> "meta" ~>
-    -- First, collect type variables from this type
-    "currentTvars" <~ (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "meta") $
-    "newTvars" <~ (collectTypeVariables @@ var "currentTvars" @@ var "typ") $
-    "metaWithTvars" <~ (setMetaTypeVariables @@ var "meta" @@ var "newTvars") $
-    -- Then, extend metadata for subtypes recursively
-    "metaWithSubtypes" <~ (Lists.foldl
-      ("m" ~> "t" ~> extendMetaForType @@ false @@ var "isTermAnnot" @@ var "t" @@ var "m")
-      (var "metaWithTvars")
-      (Rewriting.subtypes @@ var "typ")) $
-    -- Finally process this type for imports
-    cases _Type (Strip.deannotateType @@ var "typ") (Just $ var "metaWithSubtypes") [
-      -- Function type: may need Callable import
-      _Type_function>>: "ft" ~>
-        "cod" <~ Core.functionTypeCodomain (var "ft") $
-        "dom" <~ Core.functionTypeDomain (var "ft") $
-        "meta2" <~ (extendMetaForType @@ var "topLevel" @@ var "isTermAnnot" @@ var "cod" @@ var "metaWithSubtypes") $
-        "meta3" <~ (extendMetaForType @@ false @@ var "isTermAnnot" @@ var "dom" @@ var "meta2") $
-        Logic.ifElse (Logic.and (var "isTermAnnot") (var "topLevel"))
-          (var "meta3")  -- Top-level function type on term: no Callable needed (def syntax)
-          (setMetaUsesCallable @@ var "meta3" @@ true),  -- Otherwise need Callable
-      -- List type: need frozenlist import
-      _Type_list>>: constant $
-        setMetaUsesFrozenList @@ var "metaWithSubtypes" @@ true,
-      -- Map type: need FrozenDict import
-      _Type_map>>: constant $
-        setMetaUsesFrozenDict @@ var "metaWithSubtypes" @@ true,
-      -- Maybe type: need Maybe import
-      _Type_maybe>>: constant $
-        setMetaUsesMaybe @@ var "metaWithSubtypes" @@ true,
-      -- Either type: need Either import
-      _Type_either>>: constant $
-        setMetaUsesEither @@ var "metaWithSubtypes" @@ true,
-      -- Literal type: check for Decimal (both the decimal literal type and bigfloat,
-      -- which is represented as Python's Decimal in the Python host).
-      _Type_literal>>: "lt" ~>
-        cases _LiteralType (var "lt") (Just $ var "metaWithSubtypes") [
-          _LiteralType_decimal>>: constant $
-            setMetaUsesDecimal @@ var "metaWithSubtypes" @@ true,
-          _LiteralType_float>>: "ft" ~>
-            cases _FloatType (var "ft") (Just $ var "metaWithSubtypes") [
-              _FloatType_bigfloat>>: constant $
-                setMetaUsesDecimal @@ var "metaWithSubtypes" @@ true]],
-      -- Union type: need Enum or Node
-      _Type_union>>: "rt" ~>
-        Logic.ifElse (Predicates.isEnumRowType @@ var "rt")
-          (setMetaUsesEnum @@ var "metaWithSubtypes" @@ true)
-          (Logic.ifElse (Logic.not (Lists.null (var "rt")))
-            (setMetaUsesNode @@ var "metaWithSubtypes" @@ true)
-            (var "metaWithSubtypes")),
-      -- Forall type: may need Generic for records, Node for wraps
-      _Type_forall>>: "ft" ~>
-        "body" <~ Core.forallTypeBody (var "ft") $
-        -- Recursively check for wrap types (dig through nested foralls)
-        "metaForWrap" <~ (digForWrap @@ var "isTermAnnot" @@ var "metaWithSubtypes" @@ var "body") $
-        cases _Type (Strip.deannotateType @@ var "body") (Just $ var "metaForWrap") [
-          _Type_record>>: constant $
-            setMetaUsesGeneric @@ var "metaForWrap" @@ true],
-      -- Record type: need dataclass (if non-empty) and possibly Annotated
-      _Type_record>>: "rt" ~>
-        -- Check if any field has a type description (needs Annotated)
-        "hasAnnotated" <~ (Lists.foldl
-          ("b" ~> "ft" ~> Logic.or (var "b") (Annotations.hasTypeDescription @@ Core.fieldTypeType (var "ft")))
-          false
-          (var "rt")) $
-        -- Set usesDataclass if fields are non-empty
-        "meta1" <~ (Logic.ifElse (Lists.null $ var "rt")
-          (var "metaWithSubtypes")
-          (setMetaUsesDataclass @@ var "metaWithSubtypes" @@ true)) $
-        -- Set usesAnnotated if any field has description
-        Logic.ifElse (var "hasAnnotated")
-          (setMetaUsesAnnotated @@ var "meta1" @@ true)
-          (var "meta1"),
-      -- Wrap type: need Node import (unless it's a term annotation)
-      _Type_wrap>>: constant $
-        Logic.ifElse (var "isTermAnnot")
-          (var "metaWithSubtypes")
-          (setMetaUsesNode @@ var "metaWithSubtypes" @@ true)]
-
--- | Extend metadata for a list of types.
---   Collects dependency names and extends metadata for each type.
-extendMetaForTypes :: TTermDefinition ([Type] -> PyHelpers.PythonModuleMetadata -> PyHelpers.PythonModuleMetadata)
-extendMetaForTypes = def "extendMetaForTypes" $
-  doc "Extend metadata for a list of types" $
-  "types" ~> "meta" ~>
-    -- First compute names from all types
-    "names" <~ Sets.unions (Lists.map ("t" ~> Dependencies.typeDependencyNames @@ false @@ var "t") (var "types")) $
-    -- Update namespaces with the collected names
-    "currentNs" <~ (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "meta") $
-    "updatedNs" <~ (Analysis.addNamesToNamespaces @@ PyNames.encodeNamespace @@ var "names" @@ var "currentNs") $
-    -- Create meta1 with updated namespaces
-    "meta1" <~ (setMetaNamespaces @@ var "updatedNs" @@ var "meta") $
-    -- Now fold extendMetaForType over all types with isTypeDef=True, isTermAnnot=False
-    Lists.foldl ("m" ~> "t" ~> extendMetaForType @@ true @@ false @@ var "t" @@ var "m") (var "meta1") (var "types")
-
--- | Extract CaseStatement from a term if it's a case elimination function.
---   Returns Just the CaseStatement if the term is a case elimination, Nothing otherwise.
-extractCaseElimination :: TTermDefinition (Term -> Maybe CaseStatement)
-extractCaseElimination = def "extractCaseElimination" $
-  doc "Extract CaseStatement from a case elimination term" $
-  "term" ~>
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "term") (Just nothing) [
-      _Term_cases>>: "cs" ~> just (var "cs")]
-
--- | Find type parameters in a type that are bound in the environment.
---   Returns the free type variables that are also in the bound type variables map.
-findTypeParams :: TTermDefinition (PyHelpers.PythonEnvironment -> Type -> [Name])
-findTypeParams = def "findTypeParams" $
-  doc "Find type parameters in a type that are bound in the environment" $
-  "env" ~> "typ" ~>
-    "boundVars" <~ (Pairs.second $ project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env") $
-    "isBound" <~ ("v" ~> Maybes.isJust (Maps.lookup (var "v") (var "boundVars"))) $
-    Lists.filter (var "isBound") (Sets.toList (Variables.freeVariablesInType @@ var "typ"))
-
--- | Extract lambdas and their bodies from a term.
---   Returns the list of lambda parameters (in order from outermost to innermost) and the innermost body.
-gatherLambdas :: TTermDefinition (Term -> ([Name], Term))
-gatherLambdas = def "gatherLambdas" $
-  doc "Extract lambdas and their bodies from a term" $
-  "term" ~>
-  "go" <~ ("params" ~> "t" ~>
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "t")
-      (Just $ pair (var "params") (var "t")) [
-      _Term_lambda>>: "l" ~>
-        var "go" @@ Lists.concat2 (var "params") (list [Core.lambdaParameter $ var "l"])
-                 @@ Core.lambdaBody (var "l")]) $
-  var "go" @@ list ([] :: [TTerm Name]) @@ var "term"
-
--- | Gather metadata from a list of definitions.
---   This is the main entry point for collecting all import requirements.
-gatherMetadata :: TTermDefinition (Namespace -> [Definition] -> PyHelpers.PythonModuleMetadata)
-gatherMetadata = def "gatherMetadata" $
-  doc "Gather metadata from definitions" $
-  "focusNs" ~> "defs" ~>
-    -- Start with initial metadata containing namespaces
-    "start" <~ (emptyMetadata @@ (PyUtils.findNamespaces @@ var "focusNs" @@ var "defs")) $
-    -- Add function to extend metadata for each definition
-    "addDef" <~ ("meta" ~> "def" ~>
-      cases _Definition (var "def") Nothing [
-        _Definition_term>>: "termDef" ~>
-          "term" <~ Packaging.termDefinitionTerm (var "termDef") $
-          "typ" <~ Maybes.maybe
-            (Core.typeVariable (wrap _Name (string "hydra.core.Unit")))
-            (unaryFunction Core.typeSchemeBody)
-            (Packaging.termDefinitionTypeScheme (var "termDef")) $
-          -- First extend for the type annotation (isTypeDef=True, isTermAnnot=True)
-          "meta2" <~ (extendMetaForType @@ true @@ true @@ var "typ" @@ var "meta") $
-          -- Then extend for the term body (isTopLevel=True)
-          extendMetaForTerm @@ true @@ var "meta2" @@ var "term",
-        _Definition_type>>: "typeDef" ~>
-          "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "typeDef")) $
-          -- Set usesName=True for type definitions
-          "meta2" <~ (setMetaUsesName @@ var "meta" @@ true) $
-          -- Fold extendMetaForType over the type (isTypeDef=True, isTermAnnot=False)
-          Rewriting.foldOverType @@ Coders.traversalOrderPre @@
-            ("m" ~> "t" ~> extendMetaForType @@ true @@ false @@ var "t" @@ var "m") @@ var "meta2" @@ var "typ"]) $
-    -- Fold over all definitions
-    "result" <~ Lists.foldl (var "addDef") (var "start") (var "defs") $
-    -- Check if we have type variables and set usesTypeVar accordingly
-    "tvars" <~ (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "result") $
-    -- Set usesCast and usesLruCache unconditionally so encoding functions don't need to track metadata
-    "result2" <~ (setMetaUsesCast @@ true @@ (setMetaUsesLruCache @@ true @@ var "result")) $
-    setMetaUsesTypeVar @@ var "result2" @@ (Logic.not $ Sets.null $ var "tvars")
-
--- | Create Generic[...] argument expression for class definition
-genericArg :: TTermDefinition ([Name] -> Maybe Py.Expression)
-genericArg = def "genericArg" $
-  doc "Create Generic[...] argument expression for class definition" $
-  "tparamList" ~>
-    Logic.ifElse (Lists.null (var "tparamList"))
-      nothing
-      (just $
-        PyUtils.pyPrimaryToPyExpression @@
-          (PyUtils.primaryWithExpressionSlices @@
-            (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "Generic") @@
-            (Lists.map ("n" ~> PyDsl.pyNameToPyExpression (PyNames.encodeTypeVariable @@ var "n")) (var "tparamList"))))
-
--- | Create an initial Python environment for code generation
-initialEnvironment :: TTermDefinition (Namespaces Py.DottedName -> Graph -> PyHelpers.PythonEnvironment)
-initialEnvironment = def "initialEnvironment" $
-  doc "Create an initial Python environment for code generation" $
-  "namespaces" ~> "tcontext" ~>
-    record PyHelpers._PythonEnvironment [
-      PyHelpers._PythonEnvironment_namespaces>>: var "namespaces",
-      PyHelpers._PythonEnvironment_boundTypeVariables>>: pair (list ([] :: [TTerm Name])) Maps.empty,
-      PyHelpers._PythonEnvironment_graph>>: var "tcontext",
-      PyHelpers._PythonEnvironment_nullaryBindings>>: Sets.empty,
-      PyHelpers._PythonEnvironment_version>>: targetPythonVersion,
-      PyHelpers._PythonEnvironment_skipCasts>>: true,
-      PyHelpers._PythonEnvironment_inlineVariables>>: Sets.empty]
-
--- | Initial empty metadata for a Python module
-initialMetadata :: TTermDefinition (Namespace -> PyHelpers.PythonModuleMetadata)
-initialMetadata = def "initialMetadata" $
-  doc "Create initial empty metadata for a Python module" $
-  "ns" ~>
-    "dottedNs" <~ (PyNames.encodeNamespace @@ var "ns") $
-    "emptyNs" <~ (Packaging.namespaces (pair (var "ns") (var "dottedNs")) Maps.empty) $
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>: var "emptyNs",
-      PyHelpers._PythonModuleMetadata_typeVariables>>: Sets.empty,
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>: false,
-      PyHelpers._PythonModuleMetadata_usesCallable>>: false,
-      PyHelpers._PythonModuleMetadata_usesCast>>: false,
-      PyHelpers._PythonModuleMetadata_usesLruCache>>: false,
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>: false,
-      PyHelpers._PythonModuleMetadata_usesDataclass>>: false,
-      PyHelpers._PythonModuleMetadata_usesDecimal>>: false,
-      PyHelpers._PythonModuleMetadata_usesEither>>: false,
-      PyHelpers._PythonModuleMetadata_usesEnum>>: false,
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>: false,
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>: false,
-      PyHelpers._PythonModuleMetadata_usesGeneric>>: false,
-      PyHelpers._PythonModuleMetadata_usesJust>>: false,
-      PyHelpers._PythonModuleMetadata_usesLeft>>: false,
-      PyHelpers._PythonModuleMetadata_usesMaybe>>: false,
-      PyHelpers._PythonModuleMetadata_usesName>>: false,
-      PyHelpers._PythonModuleMetadata_usesNode>>: false,
-      PyHelpers._PythonModuleMetadata_usesNothing>>: false,
-      PyHelpers._PythonModuleMetadata_usesRight>>: false,
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>: false]
-
--- | Check if a term is a case statement applied to exactly one argument.
---   Returns Just (tname, dflt, cases, arg) if so, Nothing otherwise.
-isCaseStatementApplication :: TTermDefinition (Term -> Maybe (Name, Maybe Term, [Field], Term))
-isCaseStatementApplication = def "isCaseStatementApplication" $
-  doc "Check if a term is a case statement applied to exactly one argument" $
-  "term" ~>
-    "gathered" <~ (Analysis.gatherApplications @@ var "term") $
-    "args" <~ (Pairs.first $ var "gathered") $
-    "body" <~ (Pairs.second $ var "gathered") $
-    -- Check for exactly one argument
-    Logic.ifElse (Logic.not $ Equality.equal (Lists.length $ var "args") (int32 1))
-      nothing
-      ("arg" <~ (Maybes.fromMaybe Core.termUnit (Lists.maybeHead $ var "args")) $
-        cases _Term (Strip.deannotateAndDetypeTerm @@ var "body") (Just nothing) [
-          _Term_cases>>: "cs" ~>
-            just $ Phantoms.tuple4
-              (Core.caseStatementTypeName $ var "cs")
-              (Core.caseStatementDefault $ var "cs")
-              (Core.caseStatementCases $ var "cs")
-              (var "arg")])
-
--- | Determine whether a union type's cases are fully covered.
---   Returns true if the number of cases >= number of fields in the row type.
-isCasesFull :: TTermDefinition ([FieldType] -> [Field] -> Bool)
-isCasesFull = def "isCasesFull" $
-  doc "Check if union cases are fully covered" $
-  "rowType" ~> "cases_" ~>
-    "numCases" <~ (Lists.length $ var "cases_") $
-    "numFields" <~ (Lists.length $ var "rowType") $
-    -- numCases >= numFields is equivalent to NOT (numCases < numFields)
-    Logic.not $ Equality.lt (var "numCases") (var "numFields")
-
--- | Check whether a list of definitions contains any type definitions
-isTypeModuleCheck :: TTermDefinition ([Definition] -> Bool)
-isTypeModuleCheck = def "isTypeModuleCheck" $
-  doc "Check whether a list of definitions contains any type definitions" $
-  "defs" ~>
-    Logic.not $ Lists.null $ Lists.filter
-      ("d" ~> cases _Definition (var "d") (Just false) [
-        _Definition_type>>: constant true])
-      (var "defs")
-
--- | Check if a name is a type variable (unqualified - no dots)
-isTypeVariableName :: TTermDefinition (Name -> Bool)
-isTypeVariableName = def "isTypeVariableName" $
-  doc "Check if a name is a type variable (unqualified - no dots)" $
-  "name" ~>
-    -- Split on '.' and check if length is 1 (no dots means just one part)
-    Equality.equal (int32 1) (Lists.length (Strings.splitOn (string ".") (Core.unName (var "name"))))
-
--- | Check if a field type in a row type represents a unit-valued variant.
---   Used to determine if a variant has "no value" (unit type).
-isVariantUnitType :: TTermDefinition ([FieldType] -> Name -> Bool)
-isVariantUnitType = def "isVariantUnitType" $
-  doc "Check if a variant field has unit type" $
-  "rowType" ~> "fieldName" ~>
-    "mfield" <~ (Lists.find ("ft" ~> Equality.equal (Core.fieldTypeName $ var "ft") (var "fieldName")) (var "rowType")) $
-    Maybes.fromMaybe false $
-      Maybes.map
-        ("ft" ~> Predicates.isUnitType @@ (Strip.deannotateType @@ Core.fieldTypeType (var "ft")))
-        (var "mfield")
-
--- | Decorator for @lru_cache(1) to memoize zero-argument function results
-lruCacheDecorator :: TTermDefinition Py.NamedExpression
-lruCacheDecorator = def "lruCacheDecorator" $
-  doc "Decorator for @lru_cache(1) to memoize zero-argument function results" $
-  PyDsl.namedExpressionSimple $
-    PyUtils.functionCall @@
-      (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "lru_cache") @@
-      list [pyInt @@ bigint 1]
-
--- | Create a curried lambda chain from a list of parameter names and a body
-makeCurriedLambda :: TTermDefinition ([Py.Name] -> Py.Expression -> Py.Expression)
-makeCurriedLambda = def "makeCurriedLambda" $
-  doc "Create a curried lambda chain from a list of parameter names and a body" $
-  "params" ~> "body" ~>
-    Lists.foldl
-      ("acc" ~> "p" ~>
-        PyDsl.expressionLambda $ PyDsl.lambda_
-          (PyDsl.lambdaParametersSimple $ list [PyDsl.lambdaParamNoDefault $ var "p"])
-          (var "acc"))
-      (var "body")
-      (Lists.reverse (var "params"))
-
--- | Constructor for PyGraph record
-makePyGraph :: TTermDefinition (Graph -> PyHelpers.PythonModuleMetadata -> PyHelpers.PyGraph)
-makePyGraph = def "makePyGraph" $
-  doc "Constructor for PyGraph record" $
-  "g" ~> "m" ~>
-    Phantoms.record PyHelpers._PyGraph [
-      Phantoms.field PyHelpers._PyGraph_graph (var "g"),
-      Phantoms.field PyHelpers._PyGraph_metadata (var "m")]
-
--- | Wrap a bare reference to a polymorphic function in an uncurried lambda,
---   avoiding pyright errors due to confusion about type parameters.
---   Creates: lambda x1, x2, ...: f(x1, x2, ...)
-makeSimpleLambda :: TTermDefinition (Int -> Py.Expression -> Py.Expression)
-makeSimpleLambda = def "makeSimpleLambda" $
-  doc "Wrap a bare reference to a polymorphic function in an uncurried lambda" $
-  "arity" ~> "lhs" ~>
-    "args" <~ (Lists.map
-      ("i" ~> PyDsl.name (string "x" ++ Literals.showInt32 (var "i")))
-      (Math.range (int32 1) (var "arity"))) $
-    Logic.ifElse (Equality.equal (var "arity") (int32 0))
-      (var "lhs")
-      (PyDsl.expressionLambda $
-        PyDsl.lambda_
-          (PyDsl.lambdaParametersSimple $ Lists.map ("a" ~> PyDsl.lambdaParamNoDefault (var "a")) (var "args"))
-          (PyUtils.functionCall @@
-            (PyUtils.pyExpressionToPyPrimary @@ var "lhs") @@
-            (Lists.map ("a" ~> PyDsl.pyNameToPyExpression (var "a")) (var "args"))))
-
--- | Create a thunk (zero-argument lambda) wrapped with lru_cache(1) for memoization
-makeThunk :: TTermDefinition (Py.Expression -> Py.Expression)
-makeThunk = def "makeThunk" $
-  doc "Create a thunk (zero-argument lambda) wrapped with lru_cache(1) for memoization" $
-  "pbody" ~>
-    PyUtils.functionCall @@
-      (PyUtils.pyExpressionToPyPrimary @@
-        (PyUtils.functionCall @@
-          (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "lru_cache") @@
-          list [pyInt @@ bigint 1])) @@
-      list [wrapInNullaryLambda @@ var "pbody"]
-
--- | e.g., makeUncurriedLambda [p1, p2, p3] body => lambda p1, p2, p3: body
-makeUncurriedLambda :: TTermDefinition ([Py.Name] -> Py.Expression -> Py.Expression)
-makeUncurriedLambda = def "makeUncurriedLambda" $
-  doc "Create an uncurried lambda with multiple parameters" $
-  "params" ~> "body" ~>
-    PyDsl.expressionLambda $ PyDsl.lambda_
-      (PyDsl.lambdaParametersSimple $ Lists.map ("p" ~> PyDsl.lambdaParamNoDefault (var "p")) (var "params"))
-      (var "body")
-
--- | Generate domain import statements from namespace mappings
-moduleDomainImports :: TTermDefinition (Namespaces Py.DottedName -> [Py.ImportStatement])
-moduleDomainImports = def "moduleDomainImports" $
-  doc "Generate domain import statements from namespace mappings" $
-  "namespaces" ~>
-    "names" <~ (Lists.sort $ Maps.elems $ Packaging.namespacesMapping (var "namespaces")) $
-    Lists.map
-      ("ns" ~>
-        inject Py._ImportStatement Py._ImportStatement_name
-          (wrap Py._ImportName $ list [
-            record Py._DottedAsName [
-              Py._DottedAsName_name>>: var "ns",
-              Py._DottedAsName_as>>: nothing]]))
-      (var "names")
-
--- | Generate all import statements (standard + domain) for a Python module
-moduleImports :: TTermDefinition (Namespaces Py.DottedName -> PyHelpers.PythonModuleMetadata -> [Py.Statement])
-moduleImports = def "moduleImports" $
-  doc "Generate all import statements for a Python module" $
-  "namespaces" ~> "meta" ~>
-    Lists.map
-      ("imp" ~> PyUtils.pySimpleStatementToPyStatement @@
-        (PyDsl.simpleStatementImport $ var "imp"))
-      (Lists.concat (list [
-        moduleStandardImports @@ var "meta",
-        moduleDomainImports @@ var "namespaces"]))
-
--- | Generate standard import statements based on module metadata
-moduleStandardImports :: TTermDefinition (PyHelpers.PythonModuleMetadata -> [Py.ImportStatement])
-moduleStandardImports = def "moduleStandardImports" $
-  doc "Generate standard import statements based on module metadata" $
-  "meta" ~>
-    -- Build list of (moduleName, [Maybe symbol]) pairs, then filter to non-empty
-    "pairs" <~ list [
-      pair (string "__future__") (list [
-        condImportSymbol @@ string "annotations" @@ PyNames.useFutureAnnotations]),
-      pair (string "collections.abc") (list [
-        condImportSymbol @@ string "Callable" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "meta")]),
-      pair (string "dataclasses") (list [
-        condImportSymbol @@ string "dataclass" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "meta")]),
-      pair (string "decimal") (list [
-        condImportSymbol @@ string "Decimal" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "meta")]),
-      pair (string "enum") (list [
-        condImportSymbol @@ string "Enum" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "meta")]),
-      pair (string "functools") (list [
-        condImportSymbol @@ string "lru_cache" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "meta")]),
-      pair (string "hydra.dsl.python") (list [
-        condImportSymbol @@ string "Either" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "meta"),
-        condImportSymbol @@ string "FrozenDict" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "meta"),
-        condImportSymbol @@ string "Just" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "meta"),
-        condImportSymbol @@ string "Left" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "meta"),
-        condImportSymbol @@ string "Maybe" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "meta"),
-        condImportSymbol @@ string "Node" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "meta"),
-        condImportSymbol @@ string "Nothing" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "meta"),
-        condImportSymbol @@ string "Right" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "meta"),
-        condImportSymbol @@ string "frozenlist" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "meta")]),
-      pair (string "typing") (list [
-        condImportSymbol @@ string "Annotated" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "meta"),
-        condImportSymbol @@ string "Generic" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "meta"),
-        condImportSymbol @@ string "TypeAlias" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "meta"),
-        condImportSymbol @@ string "TypeVar" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "meta"),
-        condImportSymbol @@ string "cast" @@
-          (project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "meta")])] $
-    -- Filter each pair to remove Nothing symbols, then filter out pairs with no remaining symbols
-    "simplified" <~ Maybes.cat (Lists.map
-      ("p" ~>
-        "modName" <~ Pairs.first (var "p") $
-        "symbols" <~ Maybes.cat (Pairs.second (var "p")) $
-        Logic.ifElse (Lists.null $ var "symbols")
-          nothing
-          (just $ pair (var "modName") (var "symbols")))
-      (var "pairs")) $
-    Lists.map
-      ("p" ~> standardImportStatement @@ Pairs.first (var "p") @@ Pairs.second (var "p"))
-      (var "simplified")
-
--- | Main entry point: convert a Hydra module to Python source files.
-moduleToPython :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToPython = def "moduleToPython" $
-  doc "Convert a Hydra module to Python source files" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~>
-    "file" <<~ (encodePythonModule @@ var "cx" @@ var "g" @@ var "mod" @@ var "defs") $
-    "s" <~ (Serialization.printExpr @@ (Serialization.parenthesize @@ (PySerde.encodeModule @@ var "file"))) $
-    "path" <~ (Names.namespaceToFilePath @@ Util.caseConventionLowerSnake @@ (wrap _FileExtension $ string "py") @@ (Packaging.moduleNamespace $ var "mod")) $
-    right $ Maps.singleton (var "path") (var "s")
-
--- | Accessor for the graph field of PyGraph
-pyGraphGraph :: TTermDefinition (PyHelpers.PyGraph -> Graph)
-pyGraphGraph = def "pyGraphGraph" $
-  doc "Accessor for the graph field of PyGraph" $
-  lambda "pyg" $ project PyHelpers._PyGraph PyHelpers._PyGraph_graph @@ var "pyg"
-
--- | Accessor for the metadata field of PyGraph
-pyGraphMetadata :: TTermDefinition (PyHelpers.PyGraph -> PyHelpers.PythonModuleMetadata)
-pyGraphMetadata = def "pyGraphMetadata" $
-  doc "Accessor for the metadata field of PyGraph" $
-  lambda "pyg" $ project PyHelpers._PyGraph PyHelpers._PyGraph_metadata @@ var "pyg"
-
--- | Create integer literal expression
-pyInt :: TTermDefinition (Integer -> Py.Expression)
-pyInt = def "pyInt" $
-  doc "Create integer literal expression" $
-  "n" ~>
-    PyUtils.pyAtomToPyExpression @@
-      (PyDsl.atomNumber $ PyDsl.numberInteger $ var "n")
-
--- | Python-specific binding metadata function.
---   Stores metadata only for bindings that will actually be thunked by encodeTermAssignment
---   (isComplexBinding AND NOT isTrivial). This ensures encodeVariable adds () call syntax
---   only when the binding was actually emitted as @lru_cache(1) def.
-pythonBindingMetadata :: TTermDefinition (Graph -> Binding -> Maybe Term)
-pythonBindingMetadata = def "pythonBindingMetadata" $
-  doc "Like bindingMetadata, but only for bindings that will actually be thunked" $
-  "g" ~> "b" ~>
-  Logic.ifElse (shouldThunkBinding @@ var "g" @@ var "b")
-    (Logic.ifElse (Predicates.isComplexBinding @@ var "g" @@ var "b") (just MetaTerms.true) nothing)
-    nothing
-
--- | Get the Graph from a PythonEnvironment
-pythonEnvironmentGetGraph :: TTermDefinition (PyHelpers.PythonEnvironment -> Graph)
-pythonEnvironmentGetGraph = def "pythonEnvironmentGetGraph" $
-  doc "Get the Graph from a PythonEnvironment" $
-  lambda "env" $ project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "env"
-
--- | Set the Graph in a PythonEnvironment
-pythonEnvironmentSetGraph :: TTermDefinition (Graph -> PyHelpers.PythonEnvironment -> PyHelpers.PythonEnvironment)
-pythonEnvironmentSetGraph = def "pythonEnvironmentSetGraph" $
-  doc "Set the Graph in a PythonEnvironment" $
-  "tc" ~> "env" ~>
-    record PyHelpers._PythonEnvironment [
-      PyHelpers._PythonEnvironment_namespaces>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "env",
-      PyHelpers._PythonEnvironment_boundTypeVariables>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env",
-      PyHelpers._PythonEnvironment_graph>>: var "tc",
-      PyHelpers._PythonEnvironment_nullaryBindings>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_nullaryBindings @@ var "env",
-      PyHelpers._PythonEnvironment_version>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_version @@ var "env",
-      PyHelpers._PythonEnvironment_skipCasts>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_skipCasts @@ var "env",
-      PyHelpers._PythonEnvironment_inlineVariables>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_inlineVariables @@ var "env"]
-
--- | Set the namespaces in metadata
-setMetaNamespaces :: TTermDefinition (Namespaces Py.DottedName -> PyHelpers.PythonModuleMetadata -> PyHelpers.PythonModuleMetadata)
-setMetaNamespaces = def "setMetaNamespaces" $
-  "ns" ~> "m" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>: var "ns",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set the type variables in metadata
-setMetaTypeVariables :: TTermDefinition (PyHelpers.PythonModuleMetadata -> S.Set Name -> PyHelpers.PythonModuleMetadata)
-setMetaTypeVariables = def "setMetaTypeVariables" $
-  "m" ~> "tvars" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>: var "tvars",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Check if a name is a type variable (unqualified - no dots)
-
-setMetaUsesAnnotated :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesAnnotated = def "setMetaUsesAnnotated" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesCallable :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesCallable = def "setMetaUsesCallable" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set usesCast flag in metadata - used when generating cast() expressions for union types
-setMetaUsesCast :: TTermDefinition (Bool -> PyHelpers.PythonModuleMetadata -> PyHelpers.PythonModuleMetadata)
-setMetaUsesCast = def "setMetaUsesCast" $
-  "b" ~> "m" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set usesLruCache flag in metadata - used when generating @lru_cache(1) for thunks
-
-setMetaUsesDataclass :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesDataclass = def "setMetaUsesDataclass" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set the type variables in metadata
-
-setMetaUsesDecimal :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesDecimal = def "setMetaUsesDecimal" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesEither :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesEither = def "setMetaUsesEither" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesEnum :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesEnum = def "setMetaUsesEnum" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Recursively dig through forall types to find wrap types.
-
-setMetaUsesFrozenDict :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesFrozenDict = def "setMetaUsesFrozenDict" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesFrozenList :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesFrozenList = def "setMetaUsesFrozenList" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesGeneric :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesGeneric = def "setMetaUsesGeneric" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesJust :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesJust = def "setMetaUsesJust" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesLeft :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesLeft = def "setMetaUsesLeft" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set usesLruCache flag in metadata - used when generating @lru_cache(1) for thunks
-setMetaUsesLruCache :: TTermDefinition (Bool -> PyHelpers.PythonModuleMetadata -> PyHelpers.PythonModuleMetadata)
-setMetaUsesLruCache = def "setMetaUsesLruCache" $
-  "b" ~> "m" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesMaybe :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesMaybe = def "setMetaUsesMaybe" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set usesName in metadata
-setMetaUsesName :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesName = def "setMetaUsesName" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set usesTypeVar in metadata
-
-setMetaUsesNode :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesNode = def "setMetaUsesNode" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesNothing :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesNothing = def "setMetaUsesNothing" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
-setMetaUsesRight :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesRight = def "setMetaUsesRight" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set the usesTypeAlias flag in metadata
-setMetaUsesTypeAlias :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesTypeAlias = def "setMetaUsesTypeAlias" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>: var "b",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeVar @@ var "m"]
-
--- | Set usesTypeVar in metadata
-setMetaUsesTypeVar :: TTermDefinition (PyHelpers.PythonModuleMetadata -> Bool -> PyHelpers.PythonModuleMetadata)
-setMetaUsesTypeVar = def "setMetaUsesTypeVar" $
-  "m" ~> "b" ~>
-    record PyHelpers._PythonModuleMetadata [
-      PyHelpers._PythonModuleMetadata_namespaces>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_namespaces @@ var "m",
-      PyHelpers._PythonModuleMetadata_typeVariables>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_typeVariables @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesAnnotated>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesAnnotated @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCallable>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCallable @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesCast>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesCast @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLruCache>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLruCache @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeAlias>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesTypeAlias @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDataclass>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDataclass @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesDecimal>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesDecimal @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEither>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEither @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesEnum>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesEnum @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenDict>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenDict @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesFrozenList>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesFrozenList @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesGeneric>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesGeneric @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesJust>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesJust @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesLeft>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesLeft @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesMaybe>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesMaybe @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesName>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesName @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNode>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNode @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesNothing>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesNothing @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesRight>>:
-        project PyHelpers._PythonModuleMetadata PyHelpers._PythonModuleMetadata_usesRight @@ var "m",
-      PyHelpers._PythonModuleMetadata_usesTypeVar>>: var "b"]
-
--- | Create an initial empty metadata record with given namespaces
-
-shouldThunkBinding :: TTermDefinition (Graph -> Binding -> Bool)
-shouldThunkBinding = def "shouldThunkBinding" $
-  doc "Determine if a binding should be thunked based on its complexity and triviality" $
-  "g" ~> "b" ~>
-  Logic.and
-    (Predicates.isComplexBinding @@ var "g" @@ var "b")
-    (Logic.not (Predicates.isTrivialTerm @@ (Core.bindingTerm $ var "b")))
-
--- | Generate a single "from X import Y, Z" standard import statement
-standardImportStatement :: TTermDefinition (String -> [String] -> Py.ImportStatement)
-standardImportStatement = def "standardImportStatement" $
-  doc "Generate a single from-import statement" $
-  "modName" ~> "symbols" ~>
-    inject Py._ImportStatement Py._ImportStatement_from
-      (record Py._ImportFrom [
-        Py._ImportFrom_prefixes>>: list ([] :: [TTerm Py.RelativeImportPrefix]),
-        Py._ImportFrom_dottedName>>: just (wrap Py._DottedName $ list [PyDsl.name $ var "modName"]),
-        Py._ImportFrom_targets>>:
-          inject Py._ImportFromTargets Py._ImportFromTargets_simple
-            (Lists.map ("s" ~>
-              record Py._ImportFromAsName [
-                Py._ImportFromAsName_name>>: PyDsl.name $ var "s",
-                Py._ImportFromAsName_as>>: nothing])
-              (var "symbols"))])
-
--- | The target Python version for code generation (from Utils)
-targetPythonVersion :: TTermDefinition PyHelpers.PythonVersion
-targetPythonVersion = def "targetPythonVersion" $
-  doc "The target Python version for code generation" $
-  PyUtils.targetPythonVersion
-
--- | Calculate the arity of a term, with proper handling of primitives.
---   Unlike Arity.termArity, this looks up primitive arities from the graph
---   rather than returning a placeholder value.
-termArityWithPrimitives :: TTermDefinition (Graph -> Term -> Int)
-termArityWithPrimitives = def "termArityWithPrimitives" $
-  doc "Calculate term arity with proper primitive handling" $
-  "graph" ~> "term" ~>
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "term") (Just (Phantoms.int 0)) [
-      _Term_application>>: "app" ~>
-        Math.max (Phantoms.int 0) (Math.sub
-          (termArityWithPrimitives @@ var "graph" @@ (Core.applicationFunction $ var "app"))
-          (Phantoms.int 1)),
-      _Term_lambda>>: "lam" ~>
-        Math.add (Phantoms.int 1) (termArityWithPrimitives @@ var "graph" @@ (Core.lambdaBody $ var "lam")),
-      _Term_project>>: constant (Phantoms.int 1),
-      _Term_unwrap>>: constant (Phantoms.int 1),
-      _Term_cases>>: constant (Phantoms.int 1),
-      -- Look up variables in the graph to compute arity from the binding's type scheme or term.
-      -- This is important for hoisted case statement bindings which are local functions.
-      _Term_variable>>: "name" ~>
-        optCases (Lexical.lookupBinding @@ var "graph" @@ var "name")
-          (Phantoms.int 0)
-          ("el" ~> optCases (Core.bindingTypeScheme $ var "el")
-            -- No type scheme: compute arity from the binding's term structure.
-            -- Use Arity.termArity to avoid infinite recursion on self-referencing bindings.
-            (Arity.termArity @@ (Core.bindingTerm $ var "el"))
-            -- Has type scheme: use the type scheme's arity
-            ("ts" ~> Arity.typeSchemeArity @@ var "ts"))]
-
--- | Create a TypeVar assignment statement for a type variable name
-tvarStatement :: TTermDefinition (Py.Name -> Py.Statement)
-tvarStatement = def "tvarStatement" $
-  doc "Create a TypeVar assignment statement for a type variable name" $
-  "name" ~>
-    PyUtils.assignmentStatement @@ var "name" @@
-      (PyUtils.functionCall @@
-        (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "TypeVar") @@
-        list [PyUtils.doubleQuotedString @@ (unwrap Py._Name @@ var "name")])
-
--- | Version-aware type alias statement generation.
---   Uses PEP 695 syntax for Python 3.12+, or TypeAlias syntax for Python 3.10+.
-typeAliasStatementFor :: TTermDefinition (PyHelpers.PythonEnvironment -> Py.Name -> [Py.TypeParameter] -> Maybe String -> Py.Expression -> Py.Statement)
-typeAliasStatementFor = def "typeAliasStatementFor" $
-  doc "Version-aware type alias statement generation" $
-  "env" ~> "name" ~> "tparams" ~> "mcomment" ~> "tyexpr" ~>
-    Logic.ifElse (useInlineTypeParamsFor @@ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_version @@ var "env"))
-      (PyUtils.typeAliasStatement @@ var "name" @@ var "tparams" @@ var "mcomment" @@ var "tyexpr")
-      (PyUtils.typeAliasStatement310 @@ var "name" @@ var "tparams" @@ var "mcomment" @@ var "tyexpr")
-
--- | Version-aware union type statement generation.
---   Uses PEP 695 type alias syntax for Python 3.12+.
---   For Python 3.10, generates a metaclass-based class that is subscriptable at runtime.
-unionTypeStatementsFor :: TTermDefinition (PyHelpers.PythonEnvironment -> Py.Name -> [Py.TypeParameter] -> Maybe String -> Py.Expression -> [Py.Statement] -> [Py.Statement])
-unionTypeStatementsFor = def "unionTypeStatementsFor" $
-  doc "Version-aware union type statement generation" $
-  "env" ~> "name" ~> "tparams" ~> "mcomment" ~> "tyexpr" ~> "extraStmts" ~>
-    Logic.ifElse (useInlineTypeParamsFor @@ (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_version @@ var "env"))
-      -- For 3.12+, type alias has no class body; append constants as module-level statements
-      (Lists.concat2
-        (list [PyUtils.typeAliasStatement @@ var "name" @@ var "tparams" @@ var "mcomment" @@ var "tyexpr"])
-        (var "extraStmts"))
-      (PyUtils.unionTypeClassStatements310 @@ var "name" @@ var "mcomment" @@ var "tyexpr" @@ var "extraStmts")
-
--- | Create an expression that calls hydra.dsl.python.unsupported(message) at runtime.
--- This is used for features that cannot be directly translated to Python.
-unsupportedExpression :: TTermDefinition (String -> Py.Expression)
-unsupportedExpression = def "unsupportedExpression" $
-  doc "Create an expression that calls hydra.dsl.python.unsupported(message) at runtime" $
-  "msg" ~>
-    PyUtils.functionCall @@
-      (PyUtils.pyExpressionToPyPrimary @@
-        (PyUtils.projectFromExpression @@
-          (PyUtils.projectFromExpression @@
-            (PyUtils.projectFromExpression @@
-              (PyDsl.pyNameToPyExpression $ PyDsl.name $ string "hydra") @@
-              (PyDsl.name $ string "dsl")) @@
-            (PyDsl.name $ string "python")) @@
-          (PyDsl.name $ string "unsupported"))) @@
-      list [PyUtils.stringToPyExpression @@ PyDsl.quoteStyleDouble @@ var "msg"]
-
--- | Legacy constant for backward compatibility
-useInlineTypeParams :: TTermDefinition Bool
-useInlineTypeParams = def "useInlineTypeParams" $
-  doc "Legacy constant for backward compatibility; use useInlineTypeParamsFor in new code" $
-  useInlineTypeParamsFor @@ PyUtils.targetPythonVersion
-
--- | Version-aware inline type parameters.
---   Python 3.12+ supports `def foo[T]()` syntax.
---   Python 3.10 requires `T = TypeVar("T"); def foo()` at module level.
-useInlineTypeParamsFor :: TTermDefinition (PyHelpers.PythonVersion -> Bool)
-useInlineTypeParamsFor = def "useInlineTypeParamsFor" $
-  doc "Version-aware inline type parameters" $
-  "version" ~>
-    Equality.equal (var "version") (inject PyHelpers._PythonVersion PyHelpers._PythonVersion_python312 unit)
-
--- | Create args for variant (Node[type], Generic[tparams])
-variantArgs :: TTermDefinition (Py.Expression -> [Name] -> Py.Args)
-variantArgs = def "variantArgs" $
-  doc "Create args for variant (Node[type], Generic[tparams])" $
-  "ptype" ~> "tparams" ~>
-    PyUtils.pyExpressionsToPyArgs @@
-      (Maybes.cat (list [
-        just $ PyUtils.pyPrimaryToPyExpression @@
-          (PyUtils.primaryWithExpressionSlices @@
-            (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "Node") @@
-            list [var "ptype"]),
-        genericArg @@ var "tparams"]))
-
--- | Create a ClosedPattern for a variant, choosing the appropriate pattern type
---   based on whether the variant is an enum, unit type, or has a value.
-variantClosedPattern :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Name -> Py.Name -> [FieldType] -> Bool -> Name -> Bool -> Py.ClosedPattern)
-variantClosedPattern = def "variantClosedPattern" $
-  doc "Create a ClosedPattern for a variant based on its characteristics" $
-  "env" ~> "typeName" ~> "fieldName" ~> "pyVariantName" ~> "rowType" ~> "isEnum" ~> "varName" ~> "shouldCapture" ~>
-    Logic.ifElse (var "isEnum")
-      (enumVariantPattern @@ var "env" @@ var "typeName" @@ var "fieldName")
-      (Logic.ifElse (Logic.not $ var "shouldCapture")
-        (classVariantPatternUnit @@ var "pyVariantName")
-        (classVariantPatternWithCapture @@ var "env" @@ var "pyVariantName" @@ var "varName"))
-
--- | Create a wildcard case block with a given body statement.
---   This is used for default cases in match statements.
-wildcardCaseBlock :: TTermDefinition (Py.Statement -> Py.CaseBlock)
-wildcardCaseBlock = def "wildcardCaseBlock" $
-  doc "Create a wildcard case block with a given body statement" $
-  "stmt" ~>
-    PyDsl.caseBlock
-      (PyUtils.pyClosedPatternToPyPatterns @@ PyDsl.closedPatternWildcard)
-      nothing
-      (PyUtils.indentedBlock @@ nothing @@ list [list [var "stmt"]])
-
--- | Execute a computation with definitions in scope
-withDefinitions :: TTermDefinition (PyHelpers.PythonEnvironment -> [Definition] -> (PyHelpers.PythonEnvironment -> a) -> a)
-withDefinitions = def "withDefinitions" $
-  doc "Execute a computation with definitions in scope" $
-  "env" ~> "defs" ~> "body" ~>
-    -- Convert definitions to bindings for a dummy let
-    "bindings" <~ (Maybes.cat $ Lists.map
-      ("def_" ~>
-        cases _Definition (var "def_") (Just nothing) [
-          _Definition_term>>: "td" ~>
-            just $ Core.binding
-              (project _TermDefinition _TermDefinition_name @@ var "td")
-              (project _TermDefinition _TermDefinition_term @@ var "td")
-              (project _TermDefinition _TermDefinition_typeScheme @@ var "td"),
-          _Definition_type>>: constant nothing])
-      (var "defs")) $
-    "dummyLet" <~ (Core.let_ (var "bindings") (Core.termLiteral $ Core.literalString $ string "dummy")) $
-    withLet @@ var "env" @@ var "dummyLet" @@ var "body"
-
--- | Execute a computation with lambda context (adds lambda parameter to Graph)
-withLambda :: TTermDefinition (PyHelpers.PythonEnvironment -> Lambda -> (PyHelpers.PythonEnvironment -> a) -> a)
-withLambda = def "withLambda" $
-  doc "Execute a computation with lambda context (adds lambda parameter to Graph)" $
-  Environment.withLambdaContext @@
-    pythonEnvironmentGetGraph @@
-    pythonEnvironmentSetGraph
-
--- | Execute a computation with let context (adds let bindings to Graph with metadata)
-withLet :: TTermDefinition (PyHelpers.PythonEnvironment -> Let -> (PyHelpers.PythonEnvironment -> a) -> a)
-withLet = def "withLet" $
-  doc "Execute a computation with let context (adds let bindings to Graph)" $
-  Environment.withLetContext @@
-    pythonEnvironmentGetGraph @@
-    pythonEnvironmentSetGraph @@
-    pythonBindingMetadata
-
--- | Execute a computation with inline let context (no metadata, for walrus operators)
---   Also adds binding names to inlineVariables so encodeVariable knows not to add call syntax.
-withLetInline :: TTermDefinition (PyHelpers.PythonEnvironment -> Let -> (PyHelpers.PythonEnvironment -> a) -> a)
-withLetInline = def "withLetInline" $
-  doc "Execute a computation with inline let context (for walrus operators)" $
-  "env" ~> "lt" ~> "body" ~>
-    "bindingNames" <~ (Lists.map ("b" ~> Core.bindingName (var "b")) (Core.letBindings $ var "lt")) $
-    "inlineVars" <~ (Sets.fromList $ var "bindingNames") $
-    "noMetadata" <~ ("tc" ~> "b" ~> (nothing :: TTerm (Maybe Term))) $
-    Environment.withLetContext @@
-      pythonEnvironmentGetGraph @@
-      pythonEnvironmentSetGraph @@
-      var "noMetadata" @@
-      var "env" @@
-      var "lt" @@
-      ("innerEnv" ~>
-        "updatedEnv" <~ (record PyHelpers._PythonEnvironment [
-          PyHelpers._PythonEnvironment_namespaces>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "innerEnv",
-          PyHelpers._PythonEnvironment_boundTypeVariables>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "innerEnv",
-          PyHelpers._PythonEnvironment_graph>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_graph @@ var "innerEnv",
-          PyHelpers._PythonEnvironment_nullaryBindings>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_nullaryBindings @@ var "innerEnv",
-          PyHelpers._PythonEnvironment_version>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_version @@ var "innerEnv",
-          PyHelpers._PythonEnvironment_skipCasts>>: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_skipCasts @@ var "innerEnv",
-          PyHelpers._PythonEnvironment_inlineVariables>>: Sets.union (var "inlineVars")
-            (project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_inlineVariables @@ var "innerEnv")]) $
-        var "body" @@ var "updatedEnv")
-
--- | Execute a computation with type lambda context (adds type parameter to Graph)
-withTypeLambda :: TTermDefinition (PyHelpers.PythonEnvironment -> TypeLambda -> (PyHelpers.PythonEnvironment -> a) -> a)
-withTypeLambda = def "withTypeLambda" $
-  doc "Execute a computation with type lambda context" $
-  Environment.withTypeLambdaContext @@
-    pythonEnvironmentGetGraph @@
-    pythonEnvironmentSetGraph
-
--- | Wrap a Python expression in a nullary lambda (thunk) for lazy evaluation
-wrapInNullaryLambda :: TTermDefinition (Py.Expression -> Py.Expression)
-wrapInNullaryLambda = def "wrapInNullaryLambda" $
-  doc "Wrap a Python expression in a nullary lambda (thunk) for lazy evaluation" $
-  "expr" ~>
-    PyDsl.expressionLambda $ PyDsl.lambda_ PyDsl.lambdaParametersEmpty (var "expr")
-
--- | Wrap specific arguments in nullary lambdas for primitives that require lazy evaluation
-wrapLazyArguments :: TTermDefinition (Name -> [Py.Expression] -> [Py.Expression])
-wrapLazyArguments = def "wrapLazyArguments" $
-  doc "Wrap specific arguments in nullary lambdas for primitives that require lazy evaluation" $
-  "name" ~> "args" ~> lets [
-    "dummyExpr">: PyUtils.pyNameToPyExpression @@ (PyDsl.name $ string ""),
-    "argAt">: "i" ~> Maybes.fromMaybe (var "dummyExpr") (Lists.maybeAt (var "i") (var "args"))] $
-    Logic.ifElse
-      (Logic.and
-        (Equality.equal (var "name") (Core.name $ string "hydra.lib.logic.ifElse"))
-        (Equality.equal (Lists.length (var "args")) (int32 3)))
-      -- For if_else, wrap arguments 2 and 3 (the then/else branches)
-      (list [
-        var "argAt" @@ int32 0,
-        wrapInNullaryLambda @@ (var "argAt" @@ int32 1),
-        wrapInNullaryLambda @@ (var "argAt" @@ int32 2)])
-      (Logic.ifElse
-        (Logic.and
-          (Equality.equal (var "name") (Core.name $ string "hydra.lib.maybes.cases"))
-          (Equality.equal (Lists.length (var "args")) (int32 3)))
-        -- For cases, wrap argument 2 (the Nothing branch) for lazy evaluation
-        (list [
-          var "argAt" @@ int32 0,
-          wrapInNullaryLambda @@ (var "argAt" @@ int32 1),
-          var "argAt" @@ int32 2])
-        (Logic.ifElse
-          (Logic.and
-            (Logic.or
-              (Equality.equal (var "name") (Core.name $ string "hydra.lib.maybes.maybe"))
-              (Equality.equal (var "name") (Core.name $ string "hydra.lib.maybes.fromMaybe")))
-            (Equality.gte (Lists.length (var "args")) (int32 1)))
-          -- For maybe/fromMaybe, wrap argument 1 (the default value)
-          (Lists.cons (wrapInNullaryLambda @@ (var "argAt" @@ int32 0))
-                      (Lists.drop (int32 1) (var "args")))
-          (var "args")))
diff --git a/src/main/haskell/Hydra/Sources/Python/Environment.hs b/src/main/haskell/Hydra/Sources/Python/Environment.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Environment.hs
+++ /dev/null
@@ -1,136 +0,0 @@
--- | Environment types for Python code generation.
--- These types support the Python coder and are used to track code generation state.
-
-module Hydra.Sources.Python.Environment where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                           ((>:), (@@))
-import qualified Hydra.Dsl.Types                           as T
-import qualified Hydra.Sources.Kernel.Types.Core           as Core
--- Additional imports
-import qualified Hydra.Sources.Kernel.Types.Graph as Graph
-import qualified Hydra.Sources.Kernel.Types.Util as Util
-import qualified Hydra.Sources.Kernel.Types.Packaging as Module
-import qualified Hydra.Sources.Kernel.Types.Typing as Typing
-import qualified Hydra.Sources.Python.Syntax as Syntax
-
-
-ns :: Namespace
-ns = Namespace "hydra.python.environment"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-environment :: String -> Type
-environment = typeref ns
-
-syntax :: String -> Type
-syntax = typeref Syntax.ns
-
-core :: String -> Type
-core = typeref Core.ns
-
-graph :: String -> Type
-graph = typeref Graph.ns
-
-modul :: String -> Type
-modul = typeref Module.ns
-
-typing :: String -> Type
-typing = typeref Typing.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [Syntax.ns, Util.ns, Core.ns, Graph.ns, Module.ns, Typing.ns],
-            moduleDescription = Just "Environment types for Python code generation"}
-  where
-    definitions = [
-      pythonVersion,
-      pythonEnvironment,
-      pythonModuleMetadata,
-      pyGraph]
-
--- | Target Python version for code generation.
-pythonVersion :: Binding
-pythonVersion = def "PythonVersion" $
-  doc "Target Python version for code generation" $
-  T.enum [
-    "python310",  -- Python 3.10+ compatible (e.g., for PyPy)
-    "python312"]  -- Python 3.12+ with PEP 695 type alias syntax
-
--- | Environment for Python code generation.
-pythonEnvironment :: Binding
-pythonEnvironment = def "PythonEnvironment" $
-  doc "Environment for Python code generation" $
-  T.record [
-    "namespaces">:
-      doc "Namespace mapping for imports" $
-      modul "Namespaces" @@ syntax "DottedName",
-    "boundTypeVariables">:
-      doc "Type variables in scope, with their Python names" $
-      T.pair (T.list (core "Name")) (T.map (core "Name") (syntax "Name")),
-    "graph">:
-      doc "Graph context for type inference" $
-      graph "Graph",
-    "nullaryBindings">:
-      doc "Set of nullary bindings (need call syntax)" $
-      T.set (core "Name"),
-    "version">:
-      doc "Target Python version" $
-      environment "PythonVersion",
-    "skipCasts">:
-      doc "When True, skip generating cast() calls for reduced memory usage" $
-      T.boolean,
-    "inlineVariables">:
-      doc "Variables that are inline let bindings (walrus operators)" $
-      T.set (core "Name")]
-
--- | Metadata for Python module generation.
-pythonModuleMetadata :: Binding
-pythonModuleMetadata = def "PythonModuleMetadata" $
-  doc "Temporary metadata used to create the header section of a Python file" $
-  T.record [
-    "namespaces">:
-      doc "Namespace mapping for imports" $
-      modul "Namespaces" @@ syntax "DottedName",
-    "typeVariables">:
-      doc "Type variables used in the module" $
-      T.set (core "Name"),
-    "usesAnnotated">: T.boolean,
-    "usesCallable">: T.boolean,
-    "usesCast">: T.boolean,
-    "usesLruCache">: T.boolean,
-    "usesTypeAlias">: T.boolean,
-    "usesDataclass">: T.boolean,
-    "usesDecimal">: T.boolean,
-    "usesEither">: T.boolean,
-    "usesEnum">: T.boolean,
-    "usesFrozenDict">: T.boolean,
-    "usesFrozenList">: T.boolean,
-    "usesGeneric">: T.boolean,
-    "usesJust">: T.boolean,
-    "usesLeft">: T.boolean,
-    "usesMaybe">: T.boolean,
-    "usesName">: T.boolean,
-    "usesNode">: T.boolean,
-    "usesNothing">: T.boolean,
-    "usesRight">: T.boolean,
-    "usesTypeVar">: T.boolean]
-
--- | Combined graph and metadata state for Python code generation.
-pyGraph :: Binding
-pyGraph = def "PyGraph" $
-  doc "Combined graph and metadata state for Python code generation" $
-  T.record [
-    "graph">:
-      doc "The Hydra graph being processed" $
-      graph "Graph",
-    "metadata">:
-      doc "Accumulated module metadata" $
-      environment "PythonModuleMetadata"]
diff --git a/src/main/haskell/Hydra/Sources/Python/Language.hs b/src/main/haskell/Hydra/Sources/Python/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Language.hs
+++ /dev/null
@@ -1,186 +0,0 @@
-module Hydra.Sources.Python.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.python.language"),
-            moduleDefinitions = [toDefinition pythonLanguage, toDefinition pythonReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Python 3"}
-pythonLanguage :: TTermDefinition Language
-pythonLanguage = define "pythonLanguage" $
-    doc "Language constraints for Python 3" $ lets [
-    "eliminationVariants">: Sets.fromList $ list [ -- TODO: verify whether all are supported
-      Variants.eliminationVariantRecord,
-      Variants.eliminationVariantUnion,
-      Variants.eliminationVariantWrap],
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBinary, -- bytes
-      Variants.literalVariantBoolean, -- bool
-      Variants.literalVariantDecimal, -- decimal.Decimal
-      Variants.literalVariantFloat, -- (see float types)
-      Variants.literalVariantInteger, -- (see integer types)
-      Variants.literalVariantString], -- str
-    "floatTypes">: Sets.fromList $ list [
-      Core.floatTypeBigfloat, -- Decimal. mpmath's mpf type would be another option.
-      Core.floatTypeFloat64], -- float
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination,
-      Variants.functionVariantLambda],
-    "integerTypes">: Sets.fromList $ list [
-      Core.integerTypeBigint], -- Python has only one built-in integer type
-    "termVariants">: Sets.fromList $ list [ -- TODO: verify whether all are supported
-      Variants.termVariantAnnotated,
-      Variants.termVariantApplication,
-      Variants.termVariantEither,
-
-      Variants.termVariantCases,
-
-      Variants.termVariantLambda,
-
-      Variants.termVariantProject,
-
-      Variants.termVariantUnwrap,
-      Variants.termVariantLet,
-      Variants.termVariantList,
-      Variants.termVariantLiteral,
-      Variants.termVariantMap,
-      Variants.termVariantMaybe,
-      Variants.termVariantPair,
-      Variants.termVariantRecord,
-      Variants.termVariantSet,
-      Variants.termVariantTypeApplication,
-      Variants.termVariantTypeLambda,
-      Variants.termVariantInject,
-      Variants.termVariantUnit,
-      Variants.termVariantVariable,
-      Variants.termVariantWrap],
-    "typeVariants">: Sets.fromList $ list [ -- TODO: verify whether all are supported
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication,
-      Variants.typeVariantEither,
-      Variants.typeVariantFunction,
-      Variants.typeVariantForall,
-      Variants.typeVariantList,
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap,
-      Variants.typeVariantMaybe,
-      Variants.typeVariantPair,
-      Variants.typeVariantRecord,
-      Variants.typeVariantSet,
-      Variants.typeVariantUnion,
-      Variants.typeVariantUnit,
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap],
-    "typePredicate">: constant true] $ -- TODO: verify whether all are supported
-    Coders.language
-      (Coders.languageName_ $ string "hydra.python")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
-pythonReservedWords :: TTermDefinition (S.Set String)
-pythonReservedWords = define "pythonReservedWords" $
-  doc "A set of reserved words in Python" $
-  lets [
-    "pythonKeywords">:
-      doc "Python keywords, as enumerated at https://docs.python.org/3.13/reference/lexical_analysis.html#keywords" $
-      list $ string <$> [
-        "False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue", "def", "del",
-        "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "nonlocal",
-        "not", "or", "pass", "raise", "return", "try", "while", "with", "yield"],
-    "pythonBuiltInFunctions">:
-      doc "Some additional keywords we reserve in order to avoid collision with built-in functions" $
-      list $ string <$> ["range"],
-    "hydraPythonKeywords">:
-      doc "Reserved words which are specific to Hydra-Python" $
-      list $ string <$> ["Node", "FrozenDict"]] $
-    Sets.fromList $ Lists.concat $ list [var "pythonKeywords", var "pythonBuiltInFunctions", var "hydraPythonKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Python/Manifest.hs b/src/main/haskell/Hydra/Sources/Python/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Manifest.hs
+++ /dev/null
@@ -1,34 +0,0 @@
--- | Package manifest for hydra-python.
---
--- Owns the Python coder DSL sources. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
-
-module Hydra.Sources.Python.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Python.Coder as PythonCoder
-import qualified Hydra.Sources.Python.Environment as PythonEnvironment
-import qualified Hydra.Sources.Python.Language as PythonLanguage
-import qualified Hydra.Sources.Python.Names as PythonNames
-import qualified Hydra.Sources.Python.Serde as PythonSerde
-import qualified Hydra.Sources.Python.Syntax as PythonSyntax
-import qualified Hydra.Sources.Python.Testing as PythonTesting
-import qualified Hydra.Sources.Python.Utils as PythonUtils
-
-mainModules :: [Module]
-mainModules = [
-  PythonCoder.module_,
-  PythonEnvironment.module_,
-  PythonLanguage.module_,
-  PythonNames.module_,
-  PythonSerde.module_,
-  PythonSyntax.module_,
-  PythonTesting.module_,
-  PythonUtils.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Python/Names.hs b/src/main/haskell/Hydra/Sources/Python/Names.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Names.hs
+++ /dev/null
@@ -1,285 +0,0 @@
--- | Python naming utilities: encoding Hydra names as Python names.
--- Provides functions for converting Hydra names to Python naming conventions.
-
-module Hydra.Sources.Python.Names where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Python.Syntax as Py
-import qualified Hydra.Python.Environment as PyHelpers
-import qualified Hydra.Sources.Python.Syntax as PySyntax
-import qualified Hydra.Sources.Python.Environment as PyEnvironmentSource
-import qualified Hydra.Sources.Python.Serde as PySerde
-import qualified Hydra.Sources.Python.Language as PyLanguage
-import qualified Hydra.Dsl.Python.Helpers as PyDsl
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.python.names"
-
-pyLanguageNs :: Namespace
-pyLanguageNs = Namespace "hydra.python.language"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Names.ns, Formatting.ns, PySerde.ns, pyLanguageNs],
-            moduleTypeDependencies = (PyEnvironmentSource.ns:PySyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Python naming utilities: encoding Hydra names as Python names"}
-  where
-    definitions = [
-      toDefinition encodeConstantForFieldName,
-      toDefinition encodeConstantForTypeName,
-      toDefinition encodeEnumValue,
-      toDefinition encodeFieldName,
-      toDefinition encodeName,
-      toDefinition encodeNameQualified,
-      toDefinition encodeNamespace,
-      toDefinition encodeTypeVariable,
-      toDefinition sanitizePythonName,
-      toDefinition termVariableReference,
-      toDefinition typeVariableReference,
-      toDefinition useFutureAnnotations,
-      toDefinition variableReference,
-      toDefinition variantName]
-
--- | Encode a constant name for a field (e.g., FIELD_NAME as a class-level attribute).
-encodeConstantForFieldName :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Name -> Py.Name)
-encodeConstantForFieldName = def "encodeConstantForFieldName" $
-  doc "Generate a constant name for a field definition" $
-  lambdas ["env", "tname", "fname"] $ wrap Py._Name $
-    Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionUpperSnake @@ (Core.unName $ var "fname")
-
--- | Encode a constant name for a type (always TYPE_ as a class-level attribute).
-encodeConstantForTypeName :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Py.Name)
-encodeConstantForTypeName = def "encodeConstantForTypeName" $
-  doc "Generate a constant name for a type definition" $
-  lambdas ["env", "tname"] $ wrap Py._Name $ string "TYPE_"
-
--- | Encode an enum value name (UPPER_SNAKE case).
-encodeEnumValue :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Py.Name)
-encodeEnumValue = def "encodeEnumValue" $
-  doc "Encode a name as a Python enum value (UPPER_SNAKE case)" $
-  encodeName @@ false @@ Util.caseConventionUpperSnake
-
--- | Encode a field name (lower_snake case).
-encodeFieldName :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Py.Name)
-encodeFieldName = def "encodeFieldName" $
-  doc "Encode a name as a Python field name (lower_snake case)" $
-  lambdas ["env", "fname"] $ encodeName @@ false @@ Util.caseConventionLowerSnake @@ var "env" @@ var "fname"
-
--- | Encode a Hydra name as a Python name with the given case convention.
-encodeName :: TTermDefinition (Bool -> CaseConvention -> PyHelpers.PythonEnvironment -> Name -> Py.Name)
-encodeName = def "encodeName" $
-  doc "Encode a Hydra name as a Python name" $
-  lambdas ["isQualified", "conv", "env", "name"] $ lets [
-    -- Get the namespaces from the environment
-    "namespaces">: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "env",
-    -- Get the focus namespace (first element of the focus tuple)
-    "focusPair">: Packaging.namespacesFocus (var "namespaces"),
-    "focusNs">: Pairs.first $ var "focusPair",
-    -- Get the bound type variables map from the environment
-    "boundVars">: Pairs.second $ project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env",
-    -- Qualify the name
-    "qualName">: Names.qualifyName @@ var "name",
-    "mns">: Packaging.qualifiedNameNamespace $ var "qualName",
-    "local">: Packaging.qualifiedNameLocal $ var "qualName",
-    -- Convert local name with case convention and sanitize
-    "pyLocal">: sanitizePythonName @@ (Formatting.convertCase @@ Util.caseConventionCamel @@ var "conv" @@ var "local"),
-    -- Convert namespace to Python dotted path
-    "pyNs">: lambda "nsVal" $ Strings.intercalate (string ".") $
-      Lists.map (Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionLowerSnake)
-        (Strings.splitOn (string ".") (Packaging.unNamespace $ var "nsVal"))] $
-    -- If qualified, check bound vars first, then namespace
-    Logic.ifElse (var "isQualified")
-      -- Check if name is a bound type variable
-      (Maybes.maybe
-        -- Not a bound type variable - check namespace
-        (Logic.ifElse (Equality.equal (var "mns") (just $ var "focusNs"))
-          -- Same namespace - use local name (possibly escaped for future annotations)
-          (wrap Py._Name $ Logic.ifElse useFutureAnnotations (var "pyLocal") (PySerde.escapePythonString @@ true @@ var "pyLocal"))
-          -- Different namespace or no namespace
-          (Maybes.maybe
-            -- No namespace - just use local name
-            (wrap Py._Name $ var "pyLocal")
-            -- Has namespace - use dotted path
-            (lambda "nsVal" $ wrap Py._Name $ Strings.cat2 (var "pyNs" @@ var "nsVal") (Strings.cat2 (string ".") (var "pyLocal")))
-            (var "mns")))
-        -- Found in bound type variables - use the bound name
-        (lambda "n" $ var "n")
-        (Maps.lookup (var "name") (var "boundVars")))
-      -- Not qualified - just use local name
-      (wrap Py._Name $ var "pyLocal")
-
--- | Encode a qualified name for Python.
-encodeNameQualified :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Py.Name)
-encodeNameQualified = def "encodeNameQualified" $
-  doc "Encode a name as a fully qualified Python name" $
-  lambdas ["env", "name"] $ lets [
-    -- Get the namespaces from the environment
-    "namespaces">: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "env",
-    -- Get the focus namespace (first element of the focus tuple)
-    "focusPair">: Packaging.namespacesFocus (var "namespaces"),
-    "focusNs">: Pairs.first $ var "focusPair",
-    -- Get the bound type variables map from the environment
-    "boundVars">: Pairs.second $ project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_boundTypeVariables @@ var "env",
-    -- Qualify the name
-    "qualName">: Names.qualifyName @@ var "name",
-    "mns">: Packaging.qualifiedNameNamespace $ var "qualName",
-    "local">: Packaging.qualifiedNameLocal $ var "qualName"] $
-    -- Check if name is a bound type variable
-    Maybes.maybe
-      -- Not a bound type variable
-      (Logic.ifElse (Equality.equal (var "mns") (just $ var "focusNs"))
-        -- Same namespace - use local name (possibly escaped for future annotations)
-        (wrap Py._Name $ Logic.ifElse useFutureAnnotations (var "local") (PySerde.escapePythonString @@ true @@ var "local"))
-        -- Different namespace - use full dotted name with sanitization
-        (wrap Py._Name $ Strings.intercalate (string ".") $
-          Lists.map sanitizePythonName (Strings.splitOn (string ".") (Core.unName $ var "name"))))
-      -- Found in bound type variables - use the bound name
-      (lambda "n" $ var "n")
-      (Maps.lookup (var "name") (var "boundVars"))
-
--- | Encode a namespace as a Python dotted name.
-encodeNamespace :: TTermDefinition (Namespace -> Py.DottedName)
-encodeNamespace = def "encodeNamespace" $
-  doc "Encode a namespace as a Python dotted name" $
-  lambda "nsVal" $ wrap Py._DottedName $
-    Lists.map
-      (lambda "part" $ wrap Py._Name $ Formatting.convertCase @@ Util.caseConventionCamel @@ Util.caseConventionLowerSnake @@ var "part")
-      (Strings.splitOn (string ".") (Packaging.unNamespace $ var "nsVal"))
-
--- | Encode a type variable name (capitalized).
-encodeTypeVariable :: TTermDefinition (Name -> Py.Name)
-encodeTypeVariable = def "encodeTypeVariable" $
-  doc "Encode a type variable name (capitalized)" $
-  lambda "name" $ wrap Py._Name $ Formatting.capitalize @@ (Core.unName $ var "name")
-
--- | Sanitize a string to be a valid Python name.
-sanitizePythonName :: TTermDefinition (String -> String)
-sanitizePythonName = def "sanitizePythonName" $
-  doc "Sanitize a string to be a valid Python name" $
-  Formatting.sanitizeWithUnderscores @@ PyLanguage.pythonReservedWords
-
--- | Reference a term variable as a Python expression.
-termVariableReference :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Py.Expression)
-termVariableReference = def "termVariableReference" $
-  doc "Reference a term variable as a Python expression" $
-  variableReference @@ Util.caseConventionLowerSnake @@ false
-
--- | Reference a type variable as a Python expression.
-typeVariableReference :: TTermDefinition (PyHelpers.PythonEnvironment -> Name -> Py.Expression)
-typeVariableReference = def "typeVariableReference" $
-  doc "Reference a type variable as a Python expression" $
-  variableReference @@ Util.caseConventionPascal @@ false
-
--- | Temporary flag for Python code generation - use __future__ annotations.
-useFutureAnnotations :: TTermDefinition Bool
-useFutureAnnotations = def "useFutureAnnotations" $
-  doc "Whether to use __future__ annotations for forward references" $
-  true
-
--- | Reference a variable as a Python expression with optional quoting.
-variableReference :: TTermDefinition (CaseConvention -> Bool -> PyHelpers.PythonEnvironment -> Name -> Py.Expression)
-variableReference = def "variableReference" $
-  doc "Reference a variable as a Python expression" $
-  lambdas ["conv", "quoted", "env", "name"] $ lets [
-    "pyName">: encodeName @@ true @@ var "conv" @@ var "env" @@ var "name",
-    "unquoted">: PyDsl.pyNameToPyExpression (var "pyName"),
-    -- Check if name is in the same namespace (for quoting)
-    "namespaces">: project PyHelpers._PythonEnvironment PyHelpers._PythonEnvironment_namespaces @@ var "env",
-    "focusPair">: Packaging.namespacesFocus (var "namespaces"),
-    "focusNs">: Pairs.first $ var "focusPair",
-    "mns">: Names.namespaceOf @@ var "name",
-    "sameNamespace">: Maybes.maybe false (lambda "ns" $ Equality.equal (var "ns") (var "focusNs")) (var "mns")] $
-    Logic.ifElse (Logic.and (var "quoted") (var "sameNamespace"))
-      (PyDsl.pyStringToPyExpression $ PyDsl.doubleQuotedString (unwrap Py._Name @@ var "pyName"))
-      (var "unquoted")
-
--- | Generate a variant name by combining type name and field name.
-variantName :: TTermDefinition (Bool -> PyHelpers.PythonEnvironment -> Name -> Name -> Py.Name)
-variantName = def "variantName" $
-  doc "Generate a variant name from type name and field name" $
-  lambdas ["isQualified", "env", "tname", "fname"] $
-    encodeName @@ var "isQualified" @@ Util.caseConventionPascal @@ var "env" @@
-      (wrap _Name $ Strings.cat2 (Core.unName $ var "tname") (Formatting.capitalize @@ (Core.unName $ var "fname")))
diff --git a/src/main/haskell/Hydra/Sources/Python/Serde.hs b/src/main/haskell/Hydra/Sources/Python/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Serde.hs
+++ /dev/null
@@ -1,1309 +0,0 @@
--- | Python serializer: converts Python AST to concrete syntax (source code).
--- Serializes the Python syntax model (Hydra.Python.Syntax) into properly formatted Python source code.
-
-module Hydra.Sources.Python.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Python.Syntax as Py
-import qualified Hydra.Sources.Python.Syntax as PySyntax
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.python.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Serialization.ns],
-            moduleTypeDependencies = (PySyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Python serializer: converts Python AST to concrete syntax"}
-  where
-    definitions = [
-      toDefinition encodeAnnotatedRhs,
-      toDefinition encodeAnnotatedStatement,
-      toDefinition encodeAnnotation,
-      toDefinition encodeArgs,
-      toDefinition encodeAssignment,
-      toDefinition encodeAssignmentExpression,
-      toDefinition encodeAtom,
-      toDefinition encodeAttribute,
-      toDefinition encodeAwaitPrimary,
-      toDefinition encodeBitwiseAnd,
-      toDefinition encodeBitwiseOr,
-      toDefinition encodeBitwiseXor,
-      toDefinition encodeBlock,
-      toDefinition encodeCapturePattern,
-      toDefinition encodeCaseBlock,
-      toDefinition encodeClassDefinition,
-      toDefinition encodeClassPattern,
-      toDefinition encodeClosedPattern,
-      toDefinition encodeComparison,
-      toDefinition encodeCompoundStatement,
-      toDefinition encodeConditional,
-      toDefinition encodeConjunction,
-      toDefinition encodeDecorators,
-      toDefinition encodeDict,
-      toDefinition encodeDisjunction,
-      toDefinition encodeDottedAsName,
-      toDefinition encodeDottedName,
-      toDefinition encodeDoubleStarredKvpair,
-      toDefinition encodeExpression,
-      toDefinition encodeFactor,
-      toDefinition encodeFunctionDefRaw,
-      toDefinition encodeFunctionDefinition,
-      toDefinition encodeGroup,
-      toDefinition encodeGuard,
-      toDefinition encodeImportFrom,
-      toDefinition encodeImportFromAsName,
-      toDefinition encodeImportFromTargets,
-      toDefinition encodeImportName,
-      toDefinition encodeImportStatement,
-      toDefinition encodeInversion,
-      toDefinition encodeKeywordPattern,
-      toDefinition encodeKeywordPatterns,
-      toDefinition encodeKvpair,
-      toDefinition encodeKwarg,
-      toDefinition encodeKwargOrDoubleStarred,
-      toDefinition encodeKwargOrStarred,
-      toDefinition encodeLambda,
-      toDefinition encodeLambdaParamNoDefault,
-      toDefinition encodeLambdaParameters,
-      toDefinition encodeLambdaStarEtc,
-      toDefinition encodeList,
-      toDefinition encodeMatchStatement,
-      toDefinition encodeModule,
-      toDefinition encodeName,
-      toDefinition encodeNameOrAttribute,
-      toDefinition encodeNamedExpression,
-      toDefinition encodeNumber,
-      toDefinition encodeOrPattern,
-      toDefinition encodeParam,
-      toDefinition encodeParamNoDefault,
-      toDefinition encodeParamNoDefaultParameters,
-      toDefinition encodeParameters,
-      toDefinition encodePattern,
-      toDefinition encodePatternCaptureTarget,
-      toDefinition encodePatterns,
-      toDefinition encodePosArg,
-      toDefinition encodePositionalPatterns,
-      toDefinition encodePower,
-      toDefinition encodePrimary,
-      toDefinition encodePrimaryRhs,
-      toDefinition encodePrimaryWithRhs,
-      toDefinition encodeRaiseExpression,
-      toDefinition encodeRaiseStatement,
-      toDefinition encodeRelativeImportPrefix,
-      toDefinition encodeReturnStatement,
-      toDefinition encodeSet,
-      toDefinition encodeShiftExpression,
-      toDefinition encodeSimpleStatement,
-      toDefinition encodeSimpleTypeParameter,
-      toDefinition encodeSingleTarget,
-      toDefinition encodeSlice,
-      toDefinition encodeSliceOrStarredExpression,
-      toDefinition encodeSlices,
-      toDefinition encodeStarAtom,
-      toDefinition encodeStarExpression,
-      toDefinition encodeStarNamedExpression,
-      toDefinition encodeStarTarget,
-      toDefinition encodeStarredExpression,
-      toDefinition encodeStatement,
-      toDefinition encodeString,
-      toDefinition encodeSubjectExpression,
-      toDefinition encodeSum,
-      toDefinition encodeTPrimary,
-      toDefinition encodeTPrimaryAndName,
-      toDefinition encodeTargetWithStarAtom,
-      toDefinition encodeTerm_,
-      toDefinition encodeTuple,
-      toDefinition encodeTypeAlias,
-      toDefinition encodeTypeParameter,
-      toDefinition encodeTypedAssignment,
-      toDefinition encodeUntypedAssignment,
-      toDefinition encodeValuePattern,
-      toDefinition encodeWhileStatement,
-      toDefinition escapePythonString,
-      toDefinition pythonFloatLiteralText,
-      toDefinition toPythonComments]
-
-
-encodeAnnotatedRhs :: TTermDefinition (Py.AnnotatedRhs -> Expr)
-encodeAnnotatedRhs = def "encodeAnnotatedRhs" $
-  doc "Serialize an annotated RHS" $
-  lambda "arhs" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "=",
-      cases Py._AnnotatedRhs (var "arhs") Nothing [
-        Py._AnnotatedRhs_star>>: lambda "ses" $
-          Serialization.commaSep @@ Serialization.inlineStyle @@
-            Lists.map encodeStarExpression (var "ses"),
-        Py._AnnotatedRhs_yield>>: lambda "_" $ Serialization.cst @@ string "yield ..."]]
-
-encodeAnnotatedStatement :: TTermDefinition (Py.AnnotatedStatement -> Expr)
-encodeAnnotatedStatement = def "encodeAnnotatedStatement" $
-  doc "Serialize an annotated statement (with optional doc comment)" $
-  lambda "as_" $ lets [
-    "doc_">: project Py._AnnotatedStatement Py._AnnotatedStatement_comment @@ var "as_",
-    "stmt">: project Py._AnnotatedStatement Py._AnnotatedStatement_statement @@ var "as_"] $
-    Serialization.newlineSep @@ list [
-      Serialization.cst @@ (toPythonComments @@ var "doc_"),
-      encodeStatement @@ var "stmt"]
-
-encodeAnnotation :: TTermDefinition (Py.Annotation -> Expr)
-encodeAnnotation = def "encodeAnnotation" $
-  doc "Serialize a type annotation" $
-  lambda "ann" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string ":",
-      encodeExpression @@ (unwrap Py._Annotation @@ var "ann")]
-
-encodeArgs :: TTermDefinition (Py.Args -> Expr)
-encodeArgs = def "encodeArgs" $
-  doc "Serialize function arguments" $
-  lambda "args" $ lets [
-    "pos">: project Py._Args Py._Args_positional @@ var "args",
-    "ks">: project Py._Args Py._Args_kwargOrStarred @@ var "args",
-    "kss">: project Py._Args Py._Args_kwargOrDoubleStarred @@ var "args"] $
-    Serialization.commaSep @@ Serialization.inlineStyle @@ Lists.concat (list [
-      Lists.map encodePosArg (var "pos"),
-      Lists.map encodeKwargOrStarred (var "ks"),
-      Lists.map encodeKwargOrDoubleStarred (var "kss")])
-
-encodeAssignment :: TTermDefinition (Py.Assignment -> Expr)
-encodeAssignment = def "encodeAssignment" $
-  doc "Serialize an assignment" $
-  lambda "a" $
-    cases Py._Assignment (var "a") Nothing [
-      Py._Assignment_typed>>: lambda "t" $ encodeTypedAssignment @@ var "t",
-      Py._Assignment_untyped>>: lambda "u" $ encodeUntypedAssignment @@ var "u",
-      Py._Assignment_aug>>: lambda "_" $ Serialization.cst @@ string "... += ..."]
-
-encodeAssignmentExpression :: TTermDefinition (Py.AssignmentExpression -> Expr)
-encodeAssignmentExpression = def "encodeAssignmentExpression" $
-  doc "Serialize an assignment expression (walrus operator)" $
-  lambda "ae" $ lets [
-    "name">: project Py._AssignmentExpression Py._AssignmentExpression_name @@ var "ae",
-    "expr">: project Py._AssignmentExpression Py._AssignmentExpression_expression @@ var "ae"] $
-    Serialization.spaceSep @@ list [
-      encodeName @@ var "name",
-      Serialization.cst @@ string ":=",
-      encodeExpression @@ var "expr"]
-
-encodeAtom :: TTermDefinition (Py.Atom -> Expr)
-encodeAtom = def "encodeAtom" $
-  doc "Serialize a Python atom (literal or basic expression)" $
-  lambda "atom" $
-    cases Py._Atom (var "atom") Nothing [
-      Py._Atom_dict>>: lambda "d" $ encodeDict @@ var "d",
-      Py._Atom_dictcomp>>: lambda "_" $ Serialization.cst @@ string "{...}",
-      Py._Atom_ellipsis>>: constant $ Serialization.cst @@ string "...",
-      Py._Atom_false>>: constant $ Serialization.cst @@ string "False",
-      Py._Atom_genexp>>: lambda "_" $ Serialization.cst @@ string "(...)",
-      Py._Atom_group>>: lambda "g" $ encodeGroup @@ var "g",
-      Py._Atom_list>>: lambda "l" $ encodeList @@ var "l",
-      Py._Atom_listcomp>>: lambda "_" $ Serialization.cst @@ string "[...]",
-      Py._Atom_name>>: lambda "n" $ encodeName @@ var "n",
-      Py._Atom_none>>: constant $ Serialization.cst @@ string "None",
-      Py._Atom_number>>: lambda "n" $ encodeNumber @@ var "n",
-      Py._Atom_set>>: lambda "s" $ encodeSet @@ var "s",
-      Py._Atom_setcomp>>: lambda "_" $ Serialization.cst @@ string "{...}",
-      Py._Atom_string>>: lambda "s" $ encodeString @@ var "s",
-      Py._Atom_true>>: constant $ Serialization.cst @@ string "True",
-      Py._Atom_tuple>>: lambda "t" $ encodeTuple @@ var "t"]
-
-encodeAttribute :: TTermDefinition (Py.Attribute -> Expr)
-encodeAttribute = def "encodeAttribute" $
-  doc "Serialize an attribute access" $
-  lambda "attr" $
-    Serialization.dotSep @@ Lists.map encodeName (unwrap Py._Attribute @@ var "attr")
-
-encodeAwaitPrimary :: TTermDefinition (Py.AwaitPrimary -> Expr)
-encodeAwaitPrimary = def "encodeAwaitPrimary" $
-  doc "Serialize an await primary expression" $
-  lambda "ap" $ lets [
-    "await_">: project Py._AwaitPrimary Py._AwaitPrimary_await @@ var "ap",
-    "primary">: project Py._AwaitPrimary Py._AwaitPrimary_primary @@ var "ap"] $
-    Logic.ifElse (var "await_")
-      (Serialization.spaceSep @@ list [Serialization.cst @@ string "await", encodePrimary @@ var "primary"])
-      (encodePrimary @@ var "primary")
-
-encodeBitwiseAnd :: TTermDefinition (Py.BitwiseAnd -> Expr)
-encodeBitwiseAnd = def "encodeBitwiseAnd" $
-  doc "Serialize a bitwise AND expression" $
-  lambda "band" $ lets [
-    "lhs">: project Py._BitwiseAnd Py._BitwiseAnd_lhs @@ var "band",
-    "rhs">: project Py._BitwiseAnd Py._BitwiseAnd_rhs @@ var "band"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Maybes.map (lambda "l" $
-        Serialization.spaceSep @@ list [encodeBitwiseAnd @@ var "l", Serialization.cst @@ string "&"])
-        (var "lhs"),
-      just $ encodeShiftExpression @@ var "rhs"])
-
-encodeBitwiseOr :: TTermDefinition (Py.BitwiseOr -> Expr)
-encodeBitwiseOr = def "encodeBitwiseOr" $
-  doc "Serialize a bitwise OR expression" $
-  lambda "bor" $ lets [
-    "lhs">: project Py._BitwiseOr Py._BitwiseOr_lhs @@ var "bor",
-    "rhs">: project Py._BitwiseOr Py._BitwiseOr_rhs @@ var "bor"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Maybes.map (lambda "l" $
-        Serialization.spaceSep @@ list [encodeBitwiseOr @@ var "l", Serialization.cst @@ string "|"])
-        (var "lhs"),
-      just $ encodeBitwiseXor @@ var "rhs"])
-
-encodeBitwiseXor :: TTermDefinition (Py.BitwiseXor -> Expr)
-encodeBitwiseXor = def "encodeBitwiseXor" $
-  doc "Serialize a bitwise XOR expression" $
-  lambda "bxor" $ lets [
-    "lhs">: project Py._BitwiseXor Py._BitwiseXor_lhs @@ var "bxor",
-    "rhs">: project Py._BitwiseXor Py._BitwiseXor_rhs @@ var "bxor"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      Maybes.map (lambda "l" $
-        Serialization.spaceSep @@ list [encodeBitwiseXor @@ var "l", Serialization.cst @@ string "^"])
-        (var "lhs"),
-      just $ encodeBitwiseAnd @@ var "rhs"])
-
-encodeBlock :: TTermDefinition (Py.Block -> Expr)
-encodeBlock = def "encodeBlock" $
-  doc "Serialize a block" $
-  lambda "b" $
-    cases Py._Block (var "b") Nothing [
-      Py._Block_indented>>: lambda "groups" $
-        Serialization.tabIndentDoubleSpace @@ Lists.map
-          (lambda "stmts" $ Serialization.newlineSep @@ Lists.map encodeStatement (var "stmts"))
-          (var "groups"),
-      Py._Block_simple>>: lambda "ss" $
-        Serialization.semicolonSep @@ Lists.map encodeSimpleStatement (var "ss")]
-
-encodeCapturePattern :: TTermDefinition (Py.CapturePattern -> Expr)
-encodeCapturePattern = def "encodeCapturePattern" $
-  doc "Serialize a capture pattern" $
-  lambda "cp" $
-    encodePatternCaptureTarget @@ (unwrap Py._CapturePattern @@ var "cp")
-
-encodeCaseBlock :: TTermDefinition (Py.CaseBlock -> Expr)
-encodeCaseBlock = def "encodeCaseBlock" $
-  doc "Serialize a case block" $
-  lambda "cb" $ lets [
-    "patterns">: project Py._CaseBlock Py._CaseBlock_patterns @@ var "cb",
-    "guard">: project Py._CaseBlock Py._CaseBlock_guard @@ var "cb",
-    "body">: project Py._CaseBlock Py._CaseBlock_body @@ var "cb"] $
-    Serialization.newlineSep @@ list [
-      Serialization.noSep @@ list [
-        Serialization.spaceSep @@ Maybes.cat (list [
-          just $ Serialization.cst @@ string "case",
-          just $ encodePatterns @@ var "patterns",
-          Maybes.map encodeGuard (var "guard")]),
-        Serialization.cst @@ string ":"],
-      encodeBlock @@ var "body"]
-
-encodeClassDefinition :: TTermDefinition (Py.ClassDefinition -> Expr)
-encodeClassDefinition = def "encodeClassDefinition" $
-  doc "Serialize a class definition" $
-  lambda "cd" $ lets [
-    "decs">: project Py._ClassDefinition Py._ClassDefinition_decorators @@ var "cd",
-    "name">: project Py._ClassDefinition Py._ClassDefinition_name @@ var "cd",
-    "args">: project Py._ClassDefinition Py._ClassDefinition_arguments @@ var "cd",
-    "body">: project Py._ClassDefinition Py._ClassDefinition_body @@ var "cd",
-    "argPart">: Maybes.map (lambda "a" $ Serialization.noSep @@ list [
-      Serialization.cst @@ string "(",
-      encodeArgs @@ var "a",
-      Serialization.cst @@ string ")"]) (var "args")] $
-    Serialization.newlineSep @@ Maybes.cat (list [
-      Maybes.map encodeDecorators (var "decs"),
-      just $ Serialization.noSep @@ Maybes.cat (list [
-        just $ Serialization.spaceSep @@ list [Serialization.cst @@ string "class", encodeName @@ var "name"],
-        var "argPart",
-        just $ Serialization.cst @@ string ":"]),
-      just $ encodeBlock @@ var "body"])
-
-encodeClassPattern :: TTermDefinition (Py.ClassPattern -> Expr)
-encodeClassPattern = def "encodeClassPattern" $
-  doc "Serialize a class pattern" $
-  lambda "cp" $ lets [
-    "noa">: project Py._ClassPattern Py._ClassPattern_nameOrAttribute @@ var "cp",
-    "pos">: project Py._ClassPattern Py._ClassPattern_positionalPatterns @@ var "cp",
-    "kw">: project Py._ClassPattern Py._ClassPattern_keywordPatterns @@ var "cp"] $
-    Serialization.noSep @@ Maybes.cat (list [
-      just $ encodeNameOrAttribute @@ var "noa",
-      just $ Serialization.cst @@ string "(",
-      Maybes.map encodePositionalPatterns (var "pos"),
-      Maybes.map encodeKeywordPatterns (var "kw"),
-      just $ Serialization.cst @@ string ")"])
-
-encodeClosedPattern :: TTermDefinition (Py.ClosedPattern -> Expr)
-encodeClosedPattern = def "encodeClosedPattern" $
-  doc "Serialize a closed pattern" $
-  lambda "cp" $
-    cases Py._ClosedPattern (var "cp") Nothing [
-      Py._ClosedPattern_literal>>: lambda "_" $ Serialization.cst @@ string "...",
-      Py._ClosedPattern_capture>>: lambda "c" $ encodeCapturePattern @@ var "c",
-      Py._ClosedPattern_wildcard>>: constant $ Serialization.cst @@ string "_",
-      Py._ClosedPattern_value>>: lambda "v" $ encodeValuePattern @@ var "v",
-      Py._ClosedPattern_group>>: lambda "_" $ Serialization.cst @@ string "(...)",
-      Py._ClosedPattern_sequence>>: lambda "_" $ Serialization.cst @@ string "[...]",
-      Py._ClosedPattern_mapping>>: lambda "_" $ Serialization.cst @@ string "{...}",
-      Py._ClosedPattern_class>>: lambda "c" $ encodeClassPattern @@ var "c"]
-
-encodeComparison :: TTermDefinition (Py.Comparison -> Expr)
-encodeComparison = def "encodeComparison" $
-  doc "Serialize a comparison expression" $
-  lambda "cmp" $
-    -- For now, just encode the LHS bitwise or; comparison operators are rarely used in generated code
-    encodeBitwiseOr @@ (project Py._Comparison Py._Comparison_lhs @@ var "cmp")
-
-encodeCompoundStatement :: TTermDefinition (Py.CompoundStatement -> Expr)
-encodeCompoundStatement = def "encodeCompoundStatement" $
-  doc "Serialize a compound (multi-line) Python statement" $
-  lambda "cs" $
-    cases Py._CompoundStatement (var "cs") Nothing [
-      Py._CompoundStatement_function>>: lambda "f" $ encodeFunctionDefinition @@ var "f",
-      Py._CompoundStatement_if>>: lambda "_" $ Serialization.cst @@ string "if ...",
-      Py._CompoundStatement_classDef>>: lambda "c" $ encodeClassDefinition @@ var "c",
-      Py._CompoundStatement_with>>: lambda "_" $ Serialization.cst @@ string "with ...",
-      Py._CompoundStatement_for>>: lambda "_" $ Serialization.cst @@ string "for ...",
-      Py._CompoundStatement_try>>: lambda "_" $ Serialization.cst @@ string "try ...",
-      Py._CompoundStatement_while>>: lambda "w" $ encodeWhileStatement @@ var "w",
-      Py._CompoundStatement_match>>: lambda "m" $ encodeMatchStatement @@ var "m"]
-
--- | Serialize a conditional expression: body if condition else elseExpr
-encodeConditional :: TTermDefinition (Py.Conditional -> Expr)
-encodeConditional = def "encodeConditional" $
-  doc "Serialize a conditional expression (ternary)" $
-  lambda "c" $ lets [
-    "body">: project Py._Conditional Py._Conditional_body @@ var "c",
-    "cond">: project Py._Conditional Py._Conditional_if @@ var "c",
-    "elseExpr">: project Py._Conditional Py._Conditional_else @@ var "c"] $
-    Serialization.spaceSep @@ list [
-      encodeDisjunction @@ var "body",
-      Serialization.cst @@ string "if",
-      encodeDisjunction @@ var "cond",
-      Serialization.cst @@ string "else",
-      encodeExpression @@ var "elseExpr"]
-
-encodeConjunction :: TTermDefinition (Py.Conjunction -> Expr)
-encodeConjunction = def "encodeConjunction" $
-  doc "Serialize a conjunction (and expression)" $
-  lambda "c" $
-    Serialization.symbolSep @@ string "and" @@ Serialization.inlineStyle @@
-      Lists.map encodeInversion (unwrap Py._Conjunction @@ var "c")
-
-encodeDecorators :: TTermDefinition (Py.Decorators -> Expr)
-encodeDecorators = def "encodeDecorators" $
-  doc "Serialize decorators" $
-  lambda "decs" $
-    Serialization.newlineSep @@ Lists.map
-      (lambda "ne" $ Serialization.noSep @@ list [Serialization.cst @@ string "@", encodeNamedExpression @@ var "ne"])
-      (unwrap Py._Decorators @@ var "decs")
-
-encodeDict :: TTermDefinition (Py.Dict -> Expr)
-encodeDict = def "encodeDict" $
-  doc "Serialize a Python dictionary" $
-  lambda "d" $
-    Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-      Lists.map encodeDoubleStarredKvpair (unwrap Py._Dict @@ var "d")
-
-encodeDisjunction :: TTermDefinition (Py.Disjunction -> Expr)
-encodeDisjunction = def "encodeDisjunction" $
-  doc "Serialize a disjunction (or expression)" $
-  lambda "d" $
-    Serialization.symbolSep @@ string "or" @@ Serialization.inlineStyle @@
-      Lists.map encodeConjunction (unwrap Py._Disjunction @@ var "d")
-
-encodeDottedAsName :: TTermDefinition (Py.DottedAsName -> Expr)
-encodeDottedAsName = def "encodeDottedAsName" $
-  doc "Serialize a dotted as name" $
-  lambda "dan" $ lets [
-    "name">: project Py._DottedAsName Py._DottedAsName_name @@ var "dan",
-    "alias">: project Py._DottedAsName Py._DottedAsName_as @@ var "dan"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ encodeDottedName @@ var "name",
-      Maybes.map (lambda "a" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "as", encodeName @@ var "a"]) (var "alias")])
-
-encodeDottedName :: TTermDefinition (Py.DottedName -> Expr)
-encodeDottedName = def "encodeDottedName" $
-  doc "Serialize a dotted name (e.g., module.submodule)" $
-  lambda "dn" $
-    Serialization.cst @@ Strings.intercalate (string ".") (Lists.map (lambda "n" $ unwrap Py._Name @@ var "n") (unwrap Py._DottedName @@ var "dn"))
-
-encodeDoubleStarredKvpair :: TTermDefinition (Py.DoubleStarredKvpair -> Expr)
-encodeDoubleStarredKvpair = def "encodeDoubleStarredKvpair" $
-  doc "Serialize a double-starred key-value pair" $
-  lambda "dskv" $
-    cases Py._DoubleStarredKvpair (var "dskv") Nothing [
-      Py._DoubleStarredKvpair_pair>>: lambda "p" $ encodeKvpair @@ var "p",
-      Py._DoubleStarredKvpair_starred>>: lambda "e" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "**", encodeBitwiseOr @@ var "e"]]
-
-encodeExpression :: TTermDefinition (Py.Expression -> Expr)
-encodeExpression = def "encodeExpression" $
-  doc "Serialize a Python expression" $
-  lambda "expr" $
-    cases Py._Expression (var "expr") Nothing [
-      Py._Expression_simple>>: lambda "d" $ encodeDisjunction @@ var "d",
-      Py._Expression_conditional>>: lambda "c" $ encodeConditional @@ var "c",
-      Py._Expression_lambda>>: lambda "l" $ encodeLambda @@ var "l"]
-
-encodeFactor :: TTermDefinition (Py.Factor -> Expr)
-encodeFactor = def "encodeFactor" $
-  doc "Serialize a factor expression" $
-  lambda "f" $
-    cases Py._Factor (var "f") Nothing [
-      Py._Factor_positive>>: lambda "inner" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "+", encodeFactor @@ var "inner"],
-      Py._Factor_negative>>: lambda "inner" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "-", encodeFactor @@ var "inner"],
-      Py._Factor_complement>>: lambda "inner" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "~", encodeFactor @@ var "inner"],
-      Py._Factor_simple>>: lambda "p" $ encodePower @@ var "p"]
-
-encodeFunctionDefRaw :: TTermDefinition (Py.FunctionDefRaw -> Expr)
-encodeFunctionDefRaw = def "encodeFunctionDefRaw" $
-  doc "Serialize a raw function definition" $
-  lambda "fdr" $ lets [
-    "async_">: project Py._FunctionDefRaw Py._FunctionDefRaw_async @@ var "fdr",
-    "name">: project Py._FunctionDefRaw Py._FunctionDefRaw_name @@ var "fdr",
-    "tparams">: project Py._FunctionDefRaw Py._FunctionDefRaw_typeParams @@ var "fdr",
-    "params">: project Py._FunctionDefRaw Py._FunctionDefRaw_params @@ var "fdr",
-    "retType">: project Py._FunctionDefRaw Py._FunctionDefRaw_returnType @@ var "fdr",
-    "block">: project Py._FunctionDefRaw Py._FunctionDefRaw_block @@ var "fdr",
-    "asyncKw">: Logic.ifElse (var "async_") (just $ Serialization.cst @@ string "async") nothing,
-    "tparamPart">: Logic.ifElse (Lists.null (var "tparams"))
-      nothing
-      (just $ Serialization.bracketList @@ Serialization.inlineStyle @@ Lists.map encodeTypeParameter (var "tparams")),
-    "paramPart">: Maybes.map encodeParameters (var "params"),
-    "retPart">: Maybes.map (lambda "t" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "->", encodeExpression @@ var "t"]) (var "retType")] $
-    Serialization.newlineSep @@ list [
-      Serialization.noSep @@ list [
-        Serialization.spaceSep @@ Maybes.cat (list [
-          var "asyncKw",
-          just $ Serialization.cst @@ string "def",
-          just $ Serialization.noSep @@ Maybes.cat (list [
-            just $ encodeName @@ var "name",
-            var "tparamPart",
-            just $ Serialization.cst @@ string "(",
-            var "paramPart",
-            just $ Serialization.cst @@ string ")"]),
-          var "retPart"]),
-        Serialization.cst @@ string ":"],
-      encodeBlock @@ var "block"]
-
-encodeFunctionDefinition :: TTermDefinition (Py.FunctionDefinition -> Expr)
-encodeFunctionDefinition = def "encodeFunctionDefinition" $
-  doc "Serialize a function definition" $
-  lambda "fd" $ lets [
-    "decs">: project Py._FunctionDefinition Py._FunctionDefinition_decorators @@ var "fd",
-    "raw">: project Py._FunctionDefinition Py._FunctionDefinition_raw @@ var "fd"] $
-    Serialization.newlineSep @@ Maybes.cat (list [
-      Maybes.map encodeDecorators (var "decs"),
-      just $ encodeFunctionDefRaw @@ var "raw"])
-
-encodeGroup :: TTermDefinition (Py.Group -> Expr)
-encodeGroup = def "encodeGroup" $
-  doc "Serialize a parenthesized group" $
-  lambda "g" $
-    cases Py._Group (var "g") Nothing [
-      Py._Group_expression>>: lambda "ne" $ encodeNamedExpression @@ var "ne",
-      Py._Group_yield>>: lambda "_" $ Serialization.cst @@ string "(yield ...)"]
-
-encodeGuard :: TTermDefinition (Py.Guard -> Expr)
-encodeGuard = def "encodeGuard" $
-  doc "Serialize a guard clause" $
-  lambda "g" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "if",
-      encodeNamedExpression @@ (unwrap Py._Guard @@ var "g")]
-
-encodeImportFrom :: TTermDefinition (Py.ImportFrom -> Expr)
-encodeImportFrom = def "encodeImportFrom" $
-  doc "Serialize an import from statement" $
-  lambda "if_" $ lets [
-    "prefixes">: project Py._ImportFrom Py._ImportFrom_prefixes @@ var "if_",
-    "name">: project Py._ImportFrom Py._ImportFrom_dottedName @@ var "if_",
-    "targets">: project Py._ImportFrom Py._ImportFrom_targets @@ var "if_",
-    "lhs">: Serialization.noSep @@ Maybes.cat (
-      Lists.concat (list [
-        Lists.map (lambda "p" $ just $ encodeRelativeImportPrefix @@ var "p") (var "prefixes"),
-        list [Maybes.map encodeDottedName (var "name")]]))] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "from",
-      var "lhs",
-      Serialization.cst @@ string "import",
-      encodeImportFromTargets @@ var "targets"]
-
-encodeImportFromAsName :: TTermDefinition (Py.ImportFromAsName -> Expr)
-encodeImportFromAsName = def "encodeImportFromAsName" $
-  doc "Serialize an import from as name" $
-  lambda "ifan" $ lets [
-    "name">: project Py._ImportFromAsName Py._ImportFromAsName_name @@ var "ifan",
-    "alias">: project Py._ImportFromAsName Py._ImportFromAsName_as @@ var "ifan"] $
-    Maybes.maybe
-      (encodeName @@ var "name")
-      (lambda "a" $ Serialization.spaceSep @@ list [
-        encodeName @@ var "name",
-        Serialization.cst @@ string "as",
-        encodeName @@ var "a"])
-      (var "alias")
-
-encodeImportFromTargets :: TTermDefinition (Py.ImportFromTargets -> Expr)
-encodeImportFromTargets = def "encodeImportFromTargets" $
-  doc "Serialize import from targets" $
-  lambda "t" $
-    cases Py._ImportFromTargets (var "t") Nothing [
-      Py._ImportFromTargets_simple>>: lambda "names" $
-        Serialization.commaSep @@ Serialization.inlineStyle @@
-          Lists.map encodeImportFromAsName (var "names"),
-      Py._ImportFromTargets_parens>>: lambda "names" $
-        Serialization.noSep @@ list [
-          Serialization.cst @@ string "(",
-          Serialization.commaSep @@ Serialization.inlineStyle @@
-            Lists.map encodeImportFromAsName (var "names"),
-          Serialization.cst @@ string ")"],
-      Py._ImportFromTargets_star>>: constant $ Serialization.cst @@ string "*"]
-
-encodeImportName :: TTermDefinition (Py.ImportName -> Expr)
-encodeImportName = def "encodeImportName" $
-  doc "Serialize an import name" $
-  lambda "in_" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "import",
-      Serialization.commaSep @@ Serialization.inlineStyle @@
-        Lists.map encodeDottedAsName (unwrap Py._ImportName @@ var "in_")]
-
-encodeImportStatement :: TTermDefinition (Py.ImportStatement -> Expr)
-encodeImportStatement = def "encodeImportStatement" $
-  doc "Serialize an import statement" $
-  lambda "is_" $
-    cases Py._ImportStatement (var "is_") Nothing [
-      Py._ImportStatement_name>>: lambda "n" $ encodeImportName @@ var "n",
-      Py._ImportStatement_from>>: lambda "f" $ encodeImportFrom @@ var "f"]
-
-encodeInversion :: TTermDefinition (Py.Inversion -> Expr)
-encodeInversion = def "encodeInversion" $
-  doc "Serialize an inversion (not expression)" $
-  lambda "i" $
-    cases Py._Inversion (var "i") Nothing [
-      Py._Inversion_not>>: lambda "other" $
-        Serialization.spaceSep @@ list [Serialization.cst @@ string "not", encodeInversion @@ var "other"],
-      Py._Inversion_simple>>: lambda "c" $ encodeComparison @@ var "c"]
-
-encodeKeywordPattern :: TTermDefinition (Py.KeywordPattern -> Expr)
-encodeKeywordPattern = def "encodeKeywordPattern" $
-  doc "Serialize a keyword pattern" $
-  lambda "kp" $ lets [
-    "name">: project Py._KeywordPattern Py._KeywordPattern_name @@ var "kp",
-    "pat">: project Py._KeywordPattern Py._KeywordPattern_pattern @@ var "kp"] $
-    Serialization.noSep @@ list [
-      encodeName @@ var "name",
-      Serialization.cst @@ string "=",
-      encodePattern @@ var "pat"]
-
-encodeKeywordPatterns :: TTermDefinition (Py.KeywordPatterns -> Expr)
-encodeKeywordPatterns = def "encodeKeywordPatterns" $
-  doc "Serialize keyword patterns" $
-  lambda "kp" $
-    Serialization.commaSep @@ Serialization.inlineStyle @@
-      Lists.map encodeKeywordPattern (unwrap Py._KeywordPatterns @@ var "kp")
-
-encodeKvpair :: TTermDefinition (Py.Kvpair -> Expr)
-encodeKvpair = def "encodeKvpair" $
-  doc "Serialize a key-value pair" $
-  lambda "kv" $ lets [
-    "k">: project Py._Kvpair Py._Kvpair_key @@ var "kv",
-    "v">: project Py._Kvpair Py._Kvpair_value @@ var "kv"] $
-    Serialization.spaceSep @@ list [
-      Serialization.noSep @@ list [encodeExpression @@ var "k", Serialization.cst @@ string ":"],
-      encodeExpression @@ var "v"]
-
-encodeKwarg :: TTermDefinition (Py.Kwarg -> Expr)
-encodeKwarg = def "encodeKwarg" $
-  doc "Serialize a keyword argument" $
-  lambda "k" $ lets [
-    "name">: project Py._Kwarg Py._Kwarg_name @@ var "k",
-    "expr">: project Py._Kwarg Py._Kwarg_value @@ var "k"] $
-    Serialization.noSep @@ list [
-      encodeName @@ var "name",
-      Serialization.cst @@ string "=",
-      encodeExpression @@ var "expr"]
-
-encodeKwargOrDoubleStarred :: TTermDefinition (Py.KwargOrDoubleStarred -> Expr)
-encodeKwargOrDoubleStarred = def "encodeKwargOrDoubleStarred" $
-  doc "Serialize a kwarg or double starred" $
-  lambda "kds" $
-    cases Py._KwargOrDoubleStarred (var "kds") Nothing [
-      Py._KwargOrDoubleStarred_kwarg>>: lambda "k" $ encodeKwarg @@ var "k",
-      Py._KwargOrDoubleStarred_doubleStarred>>: lambda "e" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "**", encodeExpression @@ var "e"]]
-
-encodeKwargOrStarred :: TTermDefinition (Py.KwargOrStarred -> Expr)
-encodeKwargOrStarred = def "encodeKwargOrStarred" $
-  doc "Serialize a kwarg or starred" $
-  lambda "ks" $
-    cases Py._KwargOrStarred (var "ks") Nothing [
-      Py._KwargOrStarred_kwarg>>: lambda "k" $ encodeKwarg @@ var "k",
-      Py._KwargOrStarred_starred>>: lambda "se" $ encodeStarredExpression @@ var "se"]
-
-encodeLambda :: TTermDefinition (Py.Lambda -> Expr)
-encodeLambda = def "encodeLambda" $
-  doc "Serialize a lambda expression" $
-  lambda "l" $ lets [
-    "params">: project Py._Lambda Py._Lambda_params @@ var "l",
-    "body">: project Py._Lambda Py._Lambda_body @@ var "l"] $
-    Serialization.parens @@ (Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "lambda",
-      Serialization.noSep @@ list [encodeLambdaParameters @@ var "params", Serialization.cst @@ string ":"],
-      encodeExpression @@ var "body"])
-
-encodeLambdaParamNoDefault :: TTermDefinition (Py.LambdaParamNoDefault -> Expr)
-encodeLambdaParamNoDefault = def "encodeLambdaParamNoDefault" $
-  doc "Serialize a lambda parameter without default" $
-  lambda "p" $
-    encodeName @@ (unwrap Py._LambdaParamNoDefault @@ var "p")
-
-encodeLambdaParameters :: TTermDefinition (Py.LambdaParameters -> Expr)
-encodeLambdaParameters = def "encodeLambdaParameters" $
-  doc "Serialize lambda parameters" $
-  lambda "lp" $ lets [
-    "nodef">: project Py._LambdaParameters Py._LambdaParameters_paramNoDefault @@ var "lp"] $
-    Serialization.commaSep @@ Serialization.inlineStyle @@
-      Lists.map encodeLambdaParamNoDefault (var "nodef")
-
-encodeLambdaStarEtc :: TTermDefinition (Py.LambdaStarEtc -> Expr)
-encodeLambdaStarEtc = def "encodeLambdaStarEtc" $
-  doc "Serialize lambda star etc" $
-  lambda "lse" $
-    cases Py._LambdaStarEtc (var "lse") Nothing [
-      Py._LambdaStarEtc_paramNoDefault>>: lambda "p" $ encodeLambdaParamNoDefault @@ var "p",
-      Py._LambdaStarEtc_star>>: lambda "_" $ Serialization.cst @@ string "*...",
-      Py._LambdaStarEtc_paramMaybeDefault>>: lambda "_" $ Serialization.cst @@ string "...",
-      Py._LambdaStarEtc_kwds>>: lambda "_" $ Serialization.cst @@ string "**..."]
-
-encodeList :: TTermDefinition (Py.List -> Expr)
-encodeList = def "encodeList" $
-  doc "Serialize a Python list" $
-  lambda "l" $
-    Serialization.bracketListAdaptive @@ Lists.map encodeStarNamedExpression (unwrap Py._List @@ var "l")
-
-encodeMatchStatement :: TTermDefinition (Py.MatchStatement -> Expr)
-encodeMatchStatement = def "encodeMatchStatement" $
-  doc "Serialize a match statement" $
-  lambda "ms" $ lets [
-    "subj">: project Py._MatchStatement Py._MatchStatement_subject @@ var "ms",
-    "cases">: project Py._MatchStatement Py._MatchStatement_cases @@ var "ms"] $
-    Serialization.newlineSep @@ list [
-      Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "match",
-        Serialization.noSep @@ list [encodeSubjectExpression @@ var "subj", Serialization.cst @@ string ":"]],
-      Serialization.tabIndentDoubleSpace @@ Lists.map encodeCaseBlock (var "cases")]
-
-encodeModule :: TTermDefinition (Py.Module -> Expr)
-encodeModule = def "encodeModule" $
-  doc "Serialize a Python module to an AST expression" $
-  lambda "mod" $ lets [
-    "warning">: Serialization.cst @@ (toPythonComments @@ Constants.warningAutoGeneratedFile),
-    "groups">: Lists.map
-      (lambda "group" $ Serialization.newlineSep @@ Lists.map encodeStatement (var "group"))
-      (unwrap Py._Module @@ var "mod")] $
-    Serialization.doubleNewlineSep @@ Lists.cons (var "warning") (var "groups")
-
-encodeName :: TTermDefinition (Py.Name -> Expr)
-encodeName = def "encodeName" $
-  doc "Serialize a Python name/identifier" $
-  lambda "n" $
-    Serialization.cst @@ (unwrap Py._Name @@ var "n")
-
-encodeNameOrAttribute :: TTermDefinition (Py.NameOrAttribute -> Expr)
-encodeNameOrAttribute = def "encodeNameOrAttribute" $
-  doc "Serialize a name or attribute" $
-  lambda "noa" $
-    Serialization.dotSep @@ Lists.map encodeName (unwrap Py._NameOrAttribute @@ var "noa")
-
-encodeNamedExpression :: TTermDefinition (Py.NamedExpression -> Expr)
-encodeNamedExpression = def "encodeNamedExpression" $
-  doc "Serialize a named expression" $
-  lambda "ne" $
-    cases Py._NamedExpression (var "ne") Nothing [
-      Py._NamedExpression_simple>>: lambda "e" $ encodeExpression @@ var "e",
-      Py._NamedExpression_assignment>>: lambda "ae" $ encodeAssignmentExpression @@ var "ae"]
-
-encodeNumber :: TTermDefinition (Py.Number -> Expr)
-encodeNumber = def "encodeNumber" $
-  doc "Serialize a Python number literal" $
-  lambda "num" $
-    cases Py._Number (var "num") Nothing [
-      Py._Number_float>>: lambda "f" $
-        Serialization.cst @@ (pythonFloatLiteralText @@ Literals.showBigfloat (var "f")),
-      Py._Number_integer>>: lambda "i" $ Serialization.cst @@ Literals.showBigint (var "i")]
-
-encodeOrPattern :: TTermDefinition (Py.OrPattern -> Expr)
-encodeOrPattern = def "encodeOrPattern" $
-  doc "Serialize an or pattern" $
-  lambda "op" $
-    Serialization.symbolSep @@ string "|" @@ Serialization.inlineStyle @@
-      Lists.map encodeClosedPattern (unwrap Py._OrPattern @@ var "op")
-
-encodeParam :: TTermDefinition (Py.Param -> Expr)
-encodeParam = def "encodeParam" $
-  doc "Serialize a parameter" $
-  lambda "p" $ lets [
-    "name">: project Py._Param Py._Param_name @@ var "p",
-    "ann">: project Py._Param Py._Param_annotation @@ var "p"] $
-    Serialization.noSep @@ Maybes.cat (list [
-      just $ encodeName @@ var "name",
-      Maybes.map encodeAnnotation (var "ann")])
-
-encodeParamNoDefault :: TTermDefinition (Py.ParamNoDefault -> Expr)
-encodeParamNoDefault = def "encodeParamNoDefault" $
-  doc "Serialize a parameter without default" $
-  lambda "pnd" $
-    encodeParam @@ (project Py._ParamNoDefault Py._ParamNoDefault_param @@ var "pnd")
-
-encodeParamNoDefaultParameters :: TTermDefinition (Py.ParamNoDefaultParameters -> Expr)
-encodeParamNoDefaultParameters = def "encodeParamNoDefaultParameters" $
-  doc "Serialize parameters without defaults" $
-  lambda "pndp" $ lets [
-    "nodef">: project Py._ParamNoDefaultParameters Py._ParamNoDefaultParameters_paramNoDefault @@ var "pndp"] $
-    Serialization.commaSep @@ Serialization.inlineStyle @@
-      Lists.map encodeParamNoDefault (var "nodef")
-
-encodeParameters :: TTermDefinition (Py.Parameters -> Expr)
-encodeParameters = def "encodeParameters" $
-  doc "Serialize function parameters" $
-  lambda "p" $
-    cases Py._Parameters (var "p") Nothing [
-      Py._Parameters_paramNoDefault>>: lambda "pnd" $ encodeParamNoDefaultParameters @@ var "pnd",
-      Py._Parameters_slashNoDefault>>: lambda "_" $ Serialization.cst @@ string "...",
-      Py._Parameters_slashWithDefault>>: lambda "_" $ Serialization.cst @@ string "..."]
-
-encodePattern :: TTermDefinition (Py.Pattern -> Expr)
-encodePattern = def "encodePattern" $
-  doc "Serialize a pattern" $
-  lambda "p" $
-    cases Py._Pattern (var "p") Nothing [
-      Py._Pattern_or>>: lambda "op" $ encodeOrPattern @@ var "op",
-      Py._Pattern_as>>: lambda "_" $ Serialization.cst @@ string "... as ..."]
-
-encodePatternCaptureTarget :: TTermDefinition (Py.PatternCaptureTarget -> Expr)
-encodePatternCaptureTarget = def "encodePatternCaptureTarget" $
-  doc "Serialize a pattern capture target" $
-  lambda "pct" $
-    encodeName @@ (unwrap Py._PatternCaptureTarget @@ var "pct")
-
-encodePatterns :: TTermDefinition (Py.Patterns -> Expr)
-encodePatterns = def "encodePatterns" $
-  doc "Serialize patterns" $
-  lambda "ps" $
-    cases Py._Patterns (var "ps") Nothing [
-      Py._Patterns_pattern>>: lambda "p" $ encodePattern @@ var "p",
-      Py._Patterns_sequence>>: lambda "_" $ Serialization.cst @@ string "..."]
-
-encodePosArg :: TTermDefinition (Py.PosArg -> Expr)
-encodePosArg = def "encodePosArg" $
-  doc "Serialize a positional argument" $
-  lambda "pa" $
-    cases Py._PosArg (var "pa") Nothing [
-      Py._PosArg_starred>>: lambda "se" $ encodeStarredExpression @@ var "se",
-      Py._PosArg_assignment>>: lambda "ae" $ encodeAssignmentExpression @@ var "ae",
-      Py._PosArg_expression>>: lambda "e" $ encodeExpression @@ var "e"]
-
-encodePositionalPatterns :: TTermDefinition (Py.PositionalPatterns -> Expr)
-encodePositionalPatterns = def "encodePositionalPatterns" $
-  doc "Serialize positional patterns" $
-  lambda "pp" $
-    Serialization.commaSep @@ Serialization.inlineStyle @@
-      Lists.map encodePattern (unwrap Py._PositionalPatterns @@ var "pp")
-
-encodePower :: TTermDefinition (Py.Power -> Expr)
-encodePower = def "encodePower" $
-  doc "Serialize a power expression" $
-  lambda "p" $ lets [
-    "lhs">: project Py._Power Py._Power_lhs @@ var "p",
-    "rhs">: project Py._Power Py._Power_rhs @@ var "p"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ encodeAwaitPrimary @@ var "lhs",
-      Maybes.map (lambda "r" $
-        Serialization.spaceSep @@ list [Serialization.cst @@ string "**", encodeFactor @@ var "r"])
-        (var "rhs")])
-
-encodePrimary :: TTermDefinition (Py.Primary -> Expr)
-encodePrimary = def "encodePrimary" $
-  doc "Serialize a primary expression" $
-  lambda "p" $
-    cases Py._Primary (var "p") Nothing [
-      Py._Primary_simple>>: lambda "a" $ encodeAtom @@ var "a",
-      Py._Primary_compound>>: lambda "pwr" $ encodePrimaryWithRhs @@ var "pwr"]
-
-encodePrimaryRhs :: TTermDefinition (Py.PrimaryRhs -> Expr)
-encodePrimaryRhs = def "encodePrimaryRhs" $
-  doc "Serialize a primary RHS" $
-  lambda "rhs" $
-    cases Py._PrimaryRhs (var "rhs") Nothing [
-      Py._PrimaryRhs_call>>: lambda "args" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "(", encodeArgs @@ var "args", Serialization.cst @@ string ")"],
-      Py._PrimaryRhs_project>>: lambda "name" $
-        Serialization.noSep @@ list [Serialization.cst @@ string ".", encodeName @@ var "name"],
-      Py._PrimaryRhs_slices>>: lambda "slices" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "[", encodeSlices @@ var "slices", Serialization.cst @@ string "]"],
-      Py._PrimaryRhs_genexp>>: lambda "_" $ Serialization.cst @@ string "[...]"]
-
-encodePrimaryWithRhs :: TTermDefinition (Py.PrimaryWithRhs -> Expr)
-encodePrimaryWithRhs = def "encodePrimaryWithRhs" $
-  doc "Serialize a primary with RHS" $
-  lambda "pwr" $ lets [
-    "prim">: project Py._PrimaryWithRhs Py._PrimaryWithRhs_primary @@ var "pwr",
-    "rhs">: project Py._PrimaryWithRhs Py._PrimaryWithRhs_rhs @@ var "pwr"] $
-    Serialization.noSep @@ list [encodePrimary @@ var "prim", encodePrimaryRhs @@ var "rhs"]
-
-encodeRaiseExpression :: TTermDefinition (Py.RaiseExpression -> Expr)
-encodeRaiseExpression = def "encodeRaiseExpression" $
-  doc "Serialize a raise expression" $
-  lambda "re" $ lets [
-    "expr">: project Py._RaiseExpression Py._RaiseExpression_expression @@ var "re",
-    "from_">: project Py._RaiseExpression Py._RaiseExpression_from @@ var "re"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ encodeExpression @@ var "expr",
-      Maybes.map (lambda "f" $
-        Serialization.spaceSep @@ list [Serialization.cst @@ string "from", encodeExpression @@ var "f"])
-        (var "from_")])
-
-encodeRaiseStatement :: TTermDefinition (Py.RaiseStatement -> Expr)
-encodeRaiseStatement = def "encodeRaiseStatement" $
-  doc "Serialize a raise statement" $
-  lambda "rs" $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "raise",
-      Maybes.map encodeRaiseExpression (unwrap Py._RaiseStatement @@ var "rs")])
-
-encodeRelativeImportPrefix :: TTermDefinition (Py.RelativeImportPrefix -> Expr)
-encodeRelativeImportPrefix = def "encodeRelativeImportPrefix" $
-  doc "Serialize a relative import prefix" $
-  lambda "p" $
-    cases Py._RelativeImportPrefix (var "p") Nothing [
-      Py._RelativeImportPrefix_dot>>: constant $ Serialization.cst @@ string ".",
-      Py._RelativeImportPrefix_ellipsis>>: constant $ Serialization.cst @@ string "..."]
-
-encodeReturnStatement :: TTermDefinition (Py.ReturnStatement -> Expr)
-encodeReturnStatement = def "encodeReturnStatement" $
-  doc "Serialize a return statement" $
-  lambda "rs" $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "return",
-      Serialization.commaSep @@ Serialization.inlineStyle @@
-        Lists.map encodeStarExpression (unwrap Py._ReturnStatement @@ var "rs")]
-
-encodeSet :: TTermDefinition (Py.Set -> Expr)
-encodeSet = def "encodeSet" $
-  doc "Serialize a Python set" $
-  lambda "s" $
-    Serialization.bracesListAdaptive @@ Lists.map encodeStarNamedExpression (unwrap Py._Set @@ var "s")
-
-encodeShiftExpression :: TTermDefinition (Py.ShiftExpression -> Expr)
-encodeShiftExpression = def "encodeShiftExpression" $
-  doc "Serialize a shift expression" $
-  lambda "se" $
-    -- Shift operators are rarely used; just encode the sum
-    encodeSum @@ (project Py._ShiftExpression Py._ShiftExpression_rhs @@ var "se")
-
-encodeSimpleStatement :: TTermDefinition (Py.SimpleStatement -> Expr)
-encodeSimpleStatement = def "encodeSimpleStatement" $
-  doc "Serialize a simple (single-line) Python statement" $
-  lambda "ss" $
-    cases Py._SimpleStatement (var "ss") Nothing [
-      Py._SimpleStatement_assignment>>: lambda "a" $ encodeAssignment @@ var "a",
-      Py._SimpleStatement_starExpressions>>: lambda "es" $
-        Serialization.newlineSep @@ Lists.map encodeStarExpression (var "es"),
-      Py._SimpleStatement_return>>: lambda "r" $ encodeReturnStatement @@ var "r",
-      Py._SimpleStatement_raise>>: lambda "r" $ encodeRaiseStatement @@ var "r",
-      Py._SimpleStatement_pass>>: constant $ Serialization.cst @@ string "pass",
-      Py._SimpleStatement_break>>: constant $ Serialization.cst @@ string "break",
-      Py._SimpleStatement_continue>>: constant $ Serialization.cst @@ string "continue",
-      Py._SimpleStatement_import>>: lambda "i" $ encodeImportStatement @@ var "i",
-      Py._SimpleStatement_typeAlias>>: lambda "t" $ encodeTypeAlias @@ var "t",
-      Py._SimpleStatement_assert>>: lambda "_" $ Serialization.cst @@ string "assert ...",
-      Py._SimpleStatement_global>>: lambda "_" $ Serialization.cst @@ string "global ...",
-      Py._SimpleStatement_nonlocal>>: lambda "_" $ Serialization.cst @@ string "nonlocal ...",
-      Py._SimpleStatement_del>>: lambda "_" $ Serialization.cst @@ string "del ..."]
-
-encodeSimpleTypeParameter :: TTermDefinition (Py.SimpleTypeParameter -> Expr)
-encodeSimpleTypeParameter = def "encodeSimpleTypeParameter" $
-  doc "Serialize a simple type parameter" $
-  lambda "stp" $
-    encodeName @@ (project Py._SimpleTypeParameter Py._SimpleTypeParameter_name @@ var "stp")
-
-encodeSingleTarget :: TTermDefinition (Py.SingleTarget -> Expr)
-encodeSingleTarget = def "encodeSingleTarget" $
-  doc "Serialize a single target" $
-  lambda "st" $
-    cases Py._SingleTarget (var "st") Nothing [
-      Py._SingleTarget_name>>: lambda "n" $ encodeName @@ var "n",
-      Py._SingleTarget_parens>>: lambda "_" $ Serialization.cst @@ string "(...)",
-      Py._SingleTarget_subscriptAttributeTarget>>: lambda "_" $ Serialization.cst @@ string "..."]
-
-encodeSlice :: TTermDefinition (Py.Slice -> Expr)
-encodeSlice = def "encodeSlice" $
-  doc "Serialize a slice" $
-  lambda "s" $
-    cases Py._Slice (var "s") Nothing [
-      Py._Slice_named>>: lambda "ne" $ encodeNamedExpression @@ var "ne",
-      Py._Slice_slice_>>: lambda "_" $ Serialization.cst @@ string ":"]
-
-encodeSliceOrStarredExpression :: TTermDefinition (Py.SliceOrStarredExpression -> Expr)
-encodeSliceOrStarredExpression = def "encodeSliceOrStarredExpression" $
-  doc "Serialize a slice or starred expression" $
-  lambda "s" $
-    cases Py._SliceOrStarredExpression (var "s") Nothing [
-      Py._SliceOrStarredExpression_slice>>: lambda "sl" $ encodeSlice @@ var "sl",
-      Py._SliceOrStarredExpression_starred>>: lambda "se" $ encodeStarredExpression @@ var "se"]
-
-encodeSlices :: TTermDefinition (Py.Slices -> Expr)
-encodeSlices = def "encodeSlices" $
-  doc "Serialize slices" $
-  lambda "s" $ lets [
-    "hd">: project Py._Slices Py._Slices_head @@ var "s",
-    "tl">: project Py._Slices Py._Slices_tail @@ var "s"] $
-    Serialization.commaSep @@ Serialization.inlineStyle @@
-      Lists.cons (encodeSlice @@ var "hd") (Lists.map encodeSliceOrStarredExpression (var "tl"))
-
-encodeStarAtom :: TTermDefinition (Py.StarAtom -> Expr)
-encodeStarAtom = def "encodeStarAtom" $
-  doc "Serialize a star atom" $
-  lambda "sa" $
-    cases Py._StarAtom (var "sa") Nothing [
-      Py._StarAtom_name>>: lambda "n" $ encodeName @@ var "n",
-      Py._StarAtom_targetWithStarAtom>>: lambda "_" $ Serialization.cst @@ string "(...)",
-      Py._StarAtom_starTargetsTupleSeq>>: lambda "_" $ Serialization.cst @@ string "(...)",
-      Py._StarAtom_starTargetsListSeq>>: lambda "_" $ Serialization.cst @@ string "[...]"]
-
-encodeStarExpression :: TTermDefinition (Py.StarExpression -> Expr)
-encodeStarExpression = def "encodeStarExpression" $
-  doc "Serialize a star expression" $
-  lambda "se" $
-    cases Py._StarExpression (var "se") Nothing [
-      Py._StarExpression_star>>: lambda "bor" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "*", encodeBitwiseOr @@ var "bor"],
-      Py._StarExpression_simple>>: lambda "e" $ encodeExpression @@ var "e"]
-
-encodeStarNamedExpression :: TTermDefinition (Py.StarNamedExpression -> Expr)
-encodeStarNamedExpression = def "encodeStarNamedExpression" $
-  doc "Serialize a star named expression" $
-  lambda "sne" $
-    cases Py._StarNamedExpression (var "sne") Nothing [
-      Py._StarNamedExpression_star>>: lambda "bor" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "*", encodeBitwiseOr @@ var "bor"],
-      Py._StarNamedExpression_simple>>: lambda "ne" $ encodeNamedExpression @@ var "ne"]
-
-encodeStarTarget :: TTermDefinition (Py.StarTarget -> Expr)
-encodeStarTarget = def "encodeStarTarget" $
-  doc "Serialize a star target" $
-  lambda "st" $
-    cases Py._StarTarget (var "st") Nothing [
-      Py._StarTarget_unstarred>>: lambda "t" $ encodeTargetWithStarAtom @@ var "t",
-      Py._StarTarget_starred>>: lambda "inner" $
-        Serialization.noSep @@ list [Serialization.cst @@ string "*", encodeStarTarget @@ var "inner"]]
-
-encodeStarredExpression :: TTermDefinition (Py.StarredExpression -> Expr)
-encodeStarredExpression = def "encodeStarredExpression" $
-  doc "Serialize a starred expression" $
-  lambda "se" $
-    Serialization.noSep @@ list [
-      Serialization.cst @@ string "*",
-      encodeExpression @@ (unwrap Py._StarredExpression @@ var "se")]
-
-encodeStatement :: TTermDefinition (Py.Statement -> Expr)
-encodeStatement = def "encodeStatement" $
-  doc "Serialize a Python statement" $
-  lambda "stmt" $
-    cases Py._Statement (var "stmt") Nothing [
-      Py._Statement_annotated>>: lambda "a" $ encodeAnnotatedStatement @@ var "a",
-      Py._Statement_simple>>: lambda "ss" $
-        Serialization.newlineSep @@ Lists.map encodeSimpleStatement (var "ss"),
-      Py._Statement_compound>>: lambda "c" $ encodeCompoundStatement @@ var "c"]
-
-encodeString :: TTermDefinition (Py.String_ -> Expr)
-encodeString = def "encodeString" $
-  doc "Serialize a Python string literal" $
-  lambda "s" $ lets [
-    "content">: project Py._String Py._String_value @@ var "s",
-    "style">: project Py._String Py._String_quoteStyle @@ var "s"] $
-    cases Py._QuoteStyle (var "style") Nothing [
-      Py._QuoteStyle_single>>: constant $ Serialization.cst @@ (escapePythonString @@ false @@ var "content"),
-      Py._QuoteStyle_double>>: constant $ Serialization.cst @@ (escapePythonString @@ true @@ var "content"),
-      Py._QuoteStyle_triple>>: constant $ Serialization.noSep @@ list [
-        Serialization.cst @@ string "r\"\"\"",
-        Serialization.cst @@ var "content",
-        Serialization.cst @@ string "\"\"\""]]
-
-encodeSubjectExpression :: TTermDefinition (Py.SubjectExpression -> Expr)
-encodeSubjectExpression = def "encodeSubjectExpression" $
-  doc "Serialize a subject expression" $
-  lambda "se" $
-    cases Py._SubjectExpression (var "se") Nothing [
-      Py._SubjectExpression_simple>>: lambda "ne" $ encodeNamedExpression @@ var "ne",
-      Py._SubjectExpression_tuple>>: lambda "_" $ Serialization.cst @@ string "*..."]
-
-encodeSum :: TTermDefinition (Py.Sum -> Expr)
-encodeSum = def "encodeSum" $
-  doc "Serialize a sum expression" $
-  lambda "s" $
-    -- Just encode the term for now; sum operators (+/-) rarely used in generated code
-    encodeTerm_ @@ (project Py._Sum Py._Sum_rhs @@ var "s")
-
--- | Serialize a TPrimary (target-side primary expression)
-encodeTPrimary :: TTermDefinition (Py.TPrimary -> Expr)
-encodeTPrimary = def "encodeTPrimary" $
-  doc "Serialize a target-side primary expression" $
-  lambda "tp" $
-    cases Py._TPrimary (var "tp") Nothing [
-      Py._TPrimary_atom>>: lambda "a" $ encodeAtom @@ var "a",
-      Py._TPrimary_primaryAndName>>: lambda "pn" $ encodeTPrimaryAndName @@ var "pn",
-      Py._TPrimary_primaryAndSlices>>: lambda "_" $ Serialization.cst @@ string "...",
-      Py._TPrimary_primaryAndGenexp>>: lambda "_" $ Serialization.cst @@ string "...",
-      Py._TPrimary_primaryAndArguments>>: lambda "_" $ Serialization.cst @@ string "..."]
-
--- | Serialize a TPrimaryAndName (e.g., obj.attr)
-encodeTPrimaryAndName :: TTermDefinition (Py.TPrimaryAndName -> Expr)
-encodeTPrimaryAndName = def "encodeTPrimaryAndName" $
-  doc "Serialize a TPrimaryAndName as primary.name" $
-  lambda "pn" $ lets [
-    "prim">: project Py._TPrimaryAndName Py._TPrimaryAndName_primary @@ var "pn",
-    "name_">: project Py._TPrimaryAndName Py._TPrimaryAndName_name @@ var "pn"] $
-    Serialization.noSep @@ list [encodeTPrimary @@ var "prim", Serialization.cst @@ string ".", encodeName @@ var "name_"]
-
-encodeTargetWithStarAtom :: TTermDefinition (Py.TargetWithStarAtom -> Expr)
-encodeTargetWithStarAtom = def "encodeTargetWithStarAtom" $
-  doc "Serialize a target with star atom" $
-  lambda "t" $
-    cases Py._TargetWithStarAtom (var "t") Nothing [
-      Py._TargetWithStarAtom_atom>>: lambda "a" $ encodeStarAtom @@ var "a",
-      Py._TargetWithStarAtom_project>>: lambda "pn" $ encodeTPrimaryAndName @@ var "pn",
-      Py._TargetWithStarAtom_slices>>: lambda "_" $ Serialization.cst @@ string "..."]
-
-encodeTerm_ :: TTermDefinition (Py.Term -> Expr)
-encodeTerm_ = def "encodeTerm" $
-  doc "Serialize a term expression" $
-  lambda "t" $
-    -- Just encode the factor; multiplication rarely used in generated code
-    encodeFactor @@ (project Py._Term Py._Term_rhs @@ var "t")
-
-encodeTuple :: TTermDefinition (Py.Tuple -> Expr)
-encodeTuple = def "encodeTuple" $
-  doc "Serialize a Python tuple" $
-  lambda "t" $ lets [
-    "es">: unwrap Py._Tuple @@ var "t"] $
-    Maybes.fromMaybe
-      (Serialization.parenList @@ false @@ Lists.map encodeStarNamedExpression (var "es"))
-      (Maybes.map
-        (lambda "firstEs" $
-          Logic.ifElse (Equality.equal (Lists.length (var "es")) (int32 1))
-            (Serialization.parens @@ (Serialization.noSep @@ list [
-              encodeStarNamedExpression @@ var "firstEs",
-              Serialization.cst @@ string ","]))
-            (Serialization.parenList @@ false @@ Lists.map encodeStarNamedExpression (var "es")))
-        (Lists.maybeHead (var "es")))
-
-encodeTypeAlias :: TTermDefinition (Py.TypeAlias -> Expr)
-encodeTypeAlias = def "encodeTypeAlias" $
-  doc "Serialize a type alias" $
-  lambda "ta" $ lets [
-    "name">: project Py._TypeAlias Py._TypeAlias_name @@ var "ta",
-    "tparams">: project Py._TypeAlias Py._TypeAlias_typeParams @@ var "ta",
-    "expr">: project Py._TypeAlias Py._TypeAlias_expression @@ var "ta",
-    "alias">: Serialization.noSep @@ Maybes.cat (list [
-      just $ encodeName @@ var "name",
-      Logic.ifElse (Lists.null (var "tparams"))
-        nothing
-        (just $ Serialization.bracketList @@ Serialization.inlineStyle @@ Lists.map encodeTypeParameter (var "tparams"))])] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "type",
-      var "alias",
-      Serialization.cst @@ string "=",
-      encodeExpression @@ var "expr"]
-
-encodeTypeParameter :: TTermDefinition (Py.TypeParameter -> Expr)
-encodeTypeParameter = def "encodeTypeParameter" $
-  doc "Serialize a type parameter" $
-  lambda "tp" $
-    cases Py._TypeParameter (var "tp") Nothing [
-      Py._TypeParameter_simple>>: lambda "s" $ encodeSimpleTypeParameter @@ var "s",
-      Py._TypeParameter_star>>: lambda "_" $ Serialization.cst @@ string "*...",
-      Py._TypeParameter_doubleStar>>: lambda "_" $ Serialization.cst @@ string "**..."]
-
-encodeTypedAssignment :: TTermDefinition (Py.TypedAssignment -> Expr)
-encodeTypedAssignment = def "encodeTypedAssignment" $
-  doc "Serialize a typed assignment" $
-  lambda "ta" $ lets [
-    "lhs">: project Py._TypedAssignment Py._TypedAssignment_lhs @@ var "ta",
-    "typ">: project Py._TypedAssignment Py._TypedAssignment_type @@ var "ta",
-    "rhs">: project Py._TypedAssignment Py._TypedAssignment_rhs @@ var "ta"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.noSep @@ list [encodeSingleTarget @@ var "lhs", Serialization.cst @@ string ":"],
-      just $ encodeExpression @@ var "typ",
-      Maybes.map encodeAnnotatedRhs (var "rhs")])
-
-encodeUntypedAssignment :: TTermDefinition (Py.UntypedAssignment -> Expr)
-encodeUntypedAssignment = def "encodeUntypedAssignment" $
-  doc "Serialize an untyped assignment" $
-  lambda "ua" $ lets [
-    "targets">: project Py._UntypedAssignment Py._UntypedAssignment_targets @@ var "ua",
-    "rhs">: project Py._UntypedAssignment Py._UntypedAssignment_rhs @@ var "ua"] $
-    Serialization.spaceSep @@ Lists.concat (list [
-      Lists.map encodeStarTarget (var "targets"),
-      list [encodeAnnotatedRhs @@ var "rhs"]])
-
-encodeValuePattern :: TTermDefinition (Py.ValuePattern -> Expr)
-encodeValuePattern = def "encodeValuePattern" $
-  doc "Serialize a value pattern" $
-  lambda "vp" $
-    encodeAttribute @@ (unwrap Py._ValuePattern @@ var "vp")
-
-encodeWhileStatement :: TTermDefinition (Py.WhileStatement -> Expr)
-encodeWhileStatement = def "encodeWhileStatement" $
-  doc "Serialize a while statement" $
-  lambda "ws" $ lets [
-    "cond">: project Py._WhileStatement Py._WhileStatement_condition @@ var "ws",
-    "body">: project Py._WhileStatement Py._WhileStatement_body @@ var "ws",
-    "else_">: project Py._WhileStatement Py._WhileStatement_else @@ var "ws"] $
-    Serialization.newlineSep @@ Maybes.cat (list [
-      just $ Serialization.newlineSep @@ list [
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "while",
-          Serialization.noSep @@ list [
-            encodeNamedExpression @@ var "cond",
-            Serialization.cst @@ string ":"]],
-        encodeBlock @@ var "body"],
-      Maybes.map (lambda "eb" $
-        Serialization.newlineSep @@ list [
-          Serialization.cst @@ string "else:",
-          encodeBlock @@ var "eb"])
-        (var "else_")])
-
-escapePythonString :: TTermDefinition (Bool -> String -> String)
-escapePythonString = def "escapePythonString" $
-  doc "Escape special characters in a Python string and wrap in quotes" $
-  lambda "doubleQuoted" $ lambda "s" $ lets [
-    -- Helper to replace a substring
-    "replace">: lambda "old" $ lambda "new" $ lambda "str" $
-      Strings.intercalate (var "new") (Strings.splitOn (var "old") (var "str")),
-    -- Escape backslashes first (must be first!)
-    "s1">: var "replace" @@ string "\\" @@ string "\\\\" @@ var "s",
-    -- Escape null bytes
-    "s2">: var "replace" @@ string "\0" @@ string "\\x00" @@ var "s1",
-    -- Escape newlines
-    "s3">: var "replace" @@ string "\n" @@ string "\\n" @@ var "s2",
-    -- Escape tabs
-    "s4">: var "replace" @@ string "\t" @@ string "\\t" @@ var "s3",
-    -- Escape carriage returns
-    "s5">: var "replace" @@ string "\r" @@ string "\\r" @@ var "s4",
-    -- Escape quotes based on quote style
-    "escaped">: Logic.ifElse (var "doubleQuoted")
-      (var "replace" @@ string "\"" @@ string "\\\"" @@ var "s5")
-      (var "replace" @@ string "'" @@ string "\\'" @@ var "s5"),
-    -- Add surrounding quotes
-    "quote">: Logic.ifElse (var "doubleQuoted") (string "\"") (string "'")] $
-    Strings.cat2 (var "quote") (Strings.cat2 (var "escaped") (var "quote"))
-
--- | Convert a showBigfloat result into valid Python source syntax, mapping
--- NaN and ±Infinity to float() constructor calls.
-pythonFloatLiteralText :: TTermDefinition (String -> String)
-pythonFloatLiteralText = def "pythonFloatLiteralText" $
-  lambda "s" $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN")) (string "float('nan')") $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity")) (string "float('inf')") $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity")) (string "float('-inf')")
-      (var "s")
-
-toPythonComments :: TTermDefinition (String -> String)
-toPythonComments = def "toPythonComments" $
-  doc ("Convert a doc string to Python comment format. Empty source lines"
-    <> " emit `#` (no trailing space) so blank comment lines don't carry"
-    <> " trailing whitespace into the generated file.") $
-  lambda "doc_" $
-    Logic.ifElse (Equality.equal (var "doc_") (string ""))
-      (string "")
-      (Strings.intercalate (string "\n") (Lists.map (lambda "line" $
-          Logic.ifElse (Equality.equal (var "line") (string ""))
-            (string "#")
-            (Strings.cat2 (string "# ") (var "line")))
-        (Strings.lines (var "doc_"))))
diff --git a/src/main/haskell/Hydra/Sources/Python/Syntax.hs b/src/main/haskell/Hydra/Sources/Python/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Syntax.hs
+++ /dev/null
@@ -1,2173 +0,0 @@
-module Hydra.Sources.Python.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                           ((>:))
-import qualified Hydra.Dsl.Types                           as T
-import qualified Hydra.Sources.Kernel.Types.Core           as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.python.syntax"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-python :: String -> Type
-python = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A Python syntax model, based on the Python v3 PEG grammar retrieved on 2024-12-22"
-      ++ " from https://docs.python.org/3/reference/grammar.html")}
-  where
-    definitions = constructs ++ terminals ++ nonterminals
-
-    -- These definitions are not based on the grammar, but are convenient for working with Python sources in Hydra.
-    constructs = [
-      annotatedStatement,
-      pythonModule,
-      quoteStyle]
-
-    -- Terminals from the PEG grammar (see below)
-    terminals = [
-      name,
-      number,
-      string,
-      typeComment]
-
-    -- Nonterminal productions from the PEG grammar (inline).
-    -- Note: all significant deviations from the grammar are indicated with the word "Hydra" in comments.
-    nonterminals = [
-      file,
-      interactive,
-      eval,
-      funcType,
-      statement,
-      simpleStatement,
-      compoundStatement,
-      assignment,
-      typedAssignment,
-      untypedAssignment,
-      augAssignment,
-      annotatedRhs,
-      augAssign,
-      returnStatement,
-      raiseStatement,
-      raiseExpression,
-      delStatement,
-      yieldStatement,
-      assertStatement,
-      importStatement,
-      importName,
-      importFrom,
-      relativeImportPrefix,
-      importFromTargets,
-      importFromAsName,
-      dottedAsName,
-      dottedName,
-      block,
-      decorators,
-      classDefinition,
-      functionDefinition,
-      functionDefRaw,
-      parameters,
-      slashNoDefaultParameters,
-      slashWithDefaultParameters,
-      paramNoDefaultParameters,
-      paramWithDefaultParameters,
-      slashNoDefault,
-      slashWithDefault,
-      starEtc,
-      noDefaultStarEtc,
-      noDefaultStarAnnotationStarEtc,
-      commaStarEtc,
-      keywords,
-      paramNoDefault,
-      paramNoDefaultStarAnnotation,
-      paramWithDefault,
-      paramMaybeDefault,
-      param,
-      paramStarAnnotation,
-      annotation,
-      starAnnotation,
-      default_,
-      ifStatement,
-      ifTail,
-      whileStatement,
-      forStatement,
-      withStatement,
-      withItem,
-      tryStatement,
-      tryFinallyStatement,
-      tryExceptStatement,
-      tryExceptStarStatement,
-      exceptBlock,
-      exceptExpression,
-      exceptStarBlock,
-      matchStatement,
-      subjectExpression,
-      caseBlock,
-      guard,
-      patterns,
-      pattern_,
-      asPattern,
-      orPattern,
-      closedPattern,
-      literalExpression,
-      complexNumber,
-      plusOrMinus,
-      signedNumber,
-      signedRealNumber,
-      realNumber,
-      imaginaryNumber,
-      capturePattern,
-      patternCaptureTarget,
-      valuePattern,
-      attribute,
-      nameOrAttribute,
-      groupPattern,
-      sequencePattern,
-      openSequencePattern,
-      maybeSequencePattern,
-      maybeStarPattern,
-      starPattern,
-      mappingPattern,
-      itemsPattern,
-      keyValuePattern,
-      literalExpressionOrAttribute,
-      doubleStarPattern,
-      classPattern,
-      positionalPatterns,
-      keywordPatterns,
-      keywordPattern,
-      typeAlias,
-      typeParameter,
-      simpleTypeParameter,
-      starTypeParameter,
-      doubleStarTypeParameter,
-      expression,
-      conditional,
-      yieldExpression,
-      starExpression,
-      starNamedExpressions,
-      starNamedExpression,
-      assignmentExpression,
-      namedExpression,
-      disjunction,
-      conjunction,
-      inversion,
-      comparison,
-      compareOpBitwiseOrPair,
-      compareOp,
-      bitwiseOr,
-      bitwiseXor,
-      bitwiseAnd,
-      shiftExpression,
-      shiftLhs,
-      shiftOp,
-      sum_,
-      sumLhs,
-      sumOp,
-      term,
-      termLhs,
-      termOp,
-      factor,
-      power,
-      awaitPrimary,
-      primary,
-      primaryWithRhs,
-      primaryRhs,
-      slices,
-      sliceOrStarredExpression,
-      slice,
-      sliceExpression,
-      atom,
-      group,
-      lambda_,
-      lambdaParameters,
-      lambdaSlashNoDefault,
-      lambdaSlashWithDefault,
-      lambdaStarEtc,
-      lambdaKwds,
-      lambdaParamNoDefault,
-      lambdaParamWithDefault,
-      lambdaParamMaybeDefault,
-      list,
-      tuple,
-      set,
-      dict,
-      doubleStarredKvpair,
-      kvpair,
-      forIfClauses,
-      forIfClause,
-      listcomp,
-      setcomp,
-      genexp,
-      genexpHead,
-      dictcomp,
-      args,
-      posArg,
-      starredExpression,
-      kwargOrStarred,
-      kwarg,
-      kwargOrDoubleStarred,
-      starTargetsListSeq,
-      starTargetsTupleSeq,
-      starTarget,
-      targetWithStarAtom,
-      tPrimaryAndName,
-      tPrimaryAndSlices,
-      starAtom,
-      singleTarget,
-      singleSubscriptAttributeTarget,
-      tPrimary,
-      tPrimaryAndGenexp,
-      tPrimaryAndArguments,
-      delTargets,
-      delTarget,
-      delTAtom,
-      typeExpression,
-      funcTypeComment]
-
--- These definitions are not based on the grammar, but are convenient for working with Python sources in Hydra.
-
-annotatedStatement :: Binding
-annotatedStatement = def "AnnotatedStatement" $ T.record [ -- Note: added for Hydra-Python
-  "comment">: T.string,
-  "statement">: python "Statement"]
-
-pythonModule :: Binding
-pythonModule = def "Module" $
-  -- Groups of statements are separated by a double newline; see also the "Block" production.
-  T.wrap $ T.list $ nonemptyList $ python "Statement"
-
-quoteStyle :: Binding
-quoteStyle = def "QuoteStyle" $ T.enum ["single", "double", "triple"]
-
--- Terminals from the PEG grammar (see below)
-
-name :: Binding
-name = def "Name" $ T.wrap T.string -- NAME in the grammar
-
-number :: Binding
-number = def "Number" $ T.union [ -- NUMBER in the grammar
-  "integer">: T.bigint,
-  "float">: T.bigfloat]
-
-string :: Binding
-string = def "String" $ T.record [ -- STRING in the grammar
-  "value">: T.string,
-  "quoteStyle">: python "QuoteStyle"]
-
-typeComment :: Binding
-typeComment = def "TypeComment" $ T.wrap T.string -- TYPE_COMMENT in the grammar
-
--- Nonterminal productions from the PEG grammar (inline).
--- Note: all significant deviations from the grammar are indicated with the word "Hydra" in comments.
-
--- # General grammatical elements and rules:
--- #
--- # * Strings with double quotes (") denote SOFT KEYWORDS
--- # * Strings with single quotes (') denote KEYWORDS
--- # * Upper case names (NAME) denote tokens in the Grammar/Tokens file
--- # * Rule names starting with "invalid_" are used for specialized syntax errors
--- #     - These rules are NOT used in the first pass of the parser.
--- #     - Only if the first pass fails to parse, a second pass including the invalid
--- #       rules will be executed.
--- #     - If the parser fails in the second phase with a generic syntax error, the
--- #       location of the generic failure of the first pass will be used (this avoids
--- #       reporting incorrect locations due to the invalid rules).
--- #     - The order of the alternatives involving invalid rules matter
--- #       (like any rule in PEG).
--- #
--- # Grammar Syntax (see PEP 617 for more information):
--- #
--- # rule_name: expression
--- #   Optionally, a type can be included right after the rule name, which
--- #   specifies the return type of the C or Python function corresponding to the
--- #   rule:
--- # rule_name[return_type]: expression
--- #   If the return type is omitted, then a void * is returned in C and an Any in
--- #   Python.
--- # e1 e2
--- #   Match e1, then match e2.
--- # e1 | e2
--- #   Match e1 or e2.
--- #   The first alternative can also appear on the line after the rule name for
--- #   formatting purposes. In that case, a | must be used before the first
--- #   alternative, like so:
--- #       rule_name[return_type]:
--- #            | first_alt
--- #            | second_alt
--- # ( e )
--- #   Match e (allows also to use other operators in the group like '(e)*')
--- # [ e ] or e?
--- #   Optionally match e.
--- # e*
--- #   Match zero or more occurrences of e.
--- # e+
--- #   Match one or more occurrences of e.
--- # s.e+
--- #   Match one or more occurrences of e, separated by s. The generated parse tree
--- #   does not include the separator. This is otherwise identical to (e (s e)*).
--- # &e
--- #   Succeed if e can be parsed, without consuming any input.
--- # !e
--- #   Fail if e can be parsed, without consuming any input.
--- # ~
--- #   Commit to the current alternative, even if it fails to parse.
--- # &&e
--- #   Eager parse e. The parser will not backtrack and will immediately
--- #   fail with SyntaxError if e cannot be parsed.
--- #
---
--- # STARTING RULES
--- # ==============
---
--- file: [statements] ENDMARKER
-
-file :: Binding
-file = def "File" $ T.wrap $ T.list $ python "Statement"
-
--- interactive: statement_newline
-
-interactive :: Binding
-interactive = def "Interactive" $ T.wrap $ python "Statement"
-
--- eval: expressions NEWLINE* ENDMARKER
-
-eval :: Binding
-eval = def "Eval" $ T.wrap $ nonemptyList $ python "Expression"
-
--- func_type: '(' [type_expressions] ')' '->' expression NEWLINE* ENDMARKER
-
-funcType :: Binding
-funcType = def "FuncType" $ T.record [ -- TODO: func_type is defined in the official BNF grammar, but never used
-  "type">: T.list $ python "TypeExpression",
-  "body">: python "Expression"]
-
--- # GENERAL STATEMENTS
--- # ==================
---
--- statements: statement+
---
--- statement: compound_stmt  | simple_stmts
-
-statement :: Binding
-statement = def "Statement" $ T.union [
-  "compound">: python "CompoundStatement",
-  "simple">: nonemptyList $ python "SimpleStatement",
-  "annotated">: python "AnnotatedStatement"] -- Added for Hydra-Python
-
--- statement_newline:
---     | compound_stmt NEWLINE
---     | simple_stmts
---     | NEWLINE
---     | ENDMARKER
---
--- simple_stmts:
---     | simple_stmt !';' NEWLINE  # Not needed, there for speedup
---     | ';'.simple_stmt+ [';'] NEWLINE
---
--- # NOTE: assignment MUST precede expression, else parsing a simple assignment
--- # will throw a SyntaxError.
--- simple_stmt:
---     | assignment
---     | type_alias
---     | star_expressions
---     | return_stmt
---     | import_stmt
---     | raise_stmt
---     | 'pass'
---     | del_stmt
---     | yield_stmt
---     | assert_stmt
---     | 'break'
---     | 'continue'
---     | global_stmt
---     | nonlocal_stmt
-
-simpleStatement :: Binding
-simpleStatement = def "SimpleStatement" $ T.union [
-  "assignment">: python "Assignment",
-  "typeAlias">: python "TypeAlias",
-  "starExpressions">: nonemptyList $ python "StarExpression",
-  "return">: python "ReturnStatement",
-  "import">: python "ImportStatement",
-  "raise">: python "RaiseStatement",
-  "pass">: T.unit,
-  "del">: python "DelStatement",
-  "yield">: python "YieldStatement",
-  "assert">: python "AssertStatement",
-  "break">: T.unit,
-  "continue">: T.unit,
-  "global">: nonemptyList $ python "Name",
-  "nonlocal">: nonemptyList $ python "Name"]
-
--- compound_stmt:
---     | function_def
---     | if_stmt
---     | class_def
---     | with_stmt
---     | for_stmt
---     | try_stmt
---     | while_stmt
---     | match_stmt
-
-compoundStatement :: Binding
-compoundStatement = def "CompoundStatement" $ T.union [
-  "function">: python "FunctionDefinition",
-  "if">: python "IfStatement",
-  "classDef">: python "ClassDefinition",
-  "with">: python "WithStatement",
-  "for">: python "ForStatement",
-  "try">: python "TryStatement",
-  "while">: python "WhileStatement",
-  "match">: python "MatchStatement"]
-
--- # SIMPLE STATEMENTS
--- # =================
---
--- # NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield'
--- assignment:
---     | NAME ':' expression ['=' annotated_rhs ]
---     | ('(' single_target ')'
---          | single_subscript_attribute_target) ':' expression ['=' annotated_rhs ]
---     | (star_targets '=' )+ (yield_expr | star_expressions) !'=' [TYPE_COMMENT]
---     | single_target augassign ~ (yield_expr | star_expressions)
-
-assignment :: Binding
-assignment = def "Assignment" $ T.union [
-  "typed">: python "TypedAssignment",
-  "untyped">: python "UntypedAssignment",
-  "aug">: python "AugAssignment"]
-
-typedAssignment :: Binding
-typedAssignment = def "TypedAssignment" $ T.record [
-  "lhs">: python "SingleTarget",
-  "type">: python "Expression",
-  "rhs">: T.maybe $ python "AnnotatedRhs"]
-
-untypedAssignment :: Binding
-untypedAssignment = def "UntypedAssignment" $ T.record [
-  "targets">: nonemptyList $ python "StarTarget",
-  "rhs">: python "AnnotatedRhs",
-  "typeComment">: T.maybe $ python "TypeComment"]
-
-augAssignment :: Binding
-augAssignment = def "AugAssignment" $ T.record [
-  "lhs">: python "SingleTarget",
-  "augassign">: python "AugAssign",
-  "rhs">: python "AnnotatedRhs"]
-
--- annotated_rhs: yield_expr | star_expressions
-
-annotatedRhs :: Binding
-annotatedRhs = def "AnnotatedRhs" $ T.union [
-  "yield">: python "YieldExpression",
-  "star">: nonemptyList $ python "StarExpression"]
-
--- augassign:
---     | '+='
---     | '-='
---     | '*='
---     | '@='
---     | '/='
---     | '%='
---     | '&='
---     | '|='
---     | '^='
---     | '<<='
---     | '>>='
---     | '**='
---     | '//='
-
-augAssign :: Binding
-augAssign = def "AugAssign" $ T.enum [
-  "plusEqual",
-  "minusEqual",
-  "timesEqual",
-  "atEqual",
-  "slashEqual",
-  "percentEqual",
-  "ampersandEqual",
-  "barEqual",
-  "caretEqual",
-  "leftShiftEqual",
-  "rightShiftEqual",
-  "starStarEqual",
-  "doubleSlashEqual"]
-
--- return_stmt:
---     | 'return' [star_expressions]
-
-returnStatement :: Binding
-returnStatement = def "ReturnStatement" $ T.wrap $ T.list $ python "StarExpression"
-
--- raise_stmt:
---     | 'raise' expression ['from' expression ]
---     | 'raise'
-
-raiseStatement :: Binding
-raiseStatement = def "RaiseStatement" $ T.wrap $ T.maybe $ python "RaiseExpression"
-
-raiseExpression :: Binding
-raiseExpression = def "RaiseExpression" $ T.record [
-  "expression">: python "Expression",
-  "from">: T.maybe $ python "Expression"]
-
--- global_stmt: 'global' ','.NAME+
---
--- nonlocal_stmt: 'nonlocal' ','.NAME+
---
--- del_stmt:
---     | 'del' del_targets &(';' | NEWLINE)
-
-delStatement :: Binding
-delStatement = def "DelStatement" $ T.wrap $ python "DelTargets"
-
--- yield_stmt: yield_expr
-
-yieldStatement :: Binding
-yieldStatement = def "YieldStatement" $ T.wrap $ python "YieldExpression"
-
--- assert_stmt: 'assert' expression [',' expression ]
-
-assertStatement :: Binding
-assertStatement = def "AssertStatement" $ T.record [
-  "expression1">: python "Expression",
-  "expression2">: T.maybe $ python "Expression"]
-
--- import_stmt:
---     | import_name
---     | import_from
-
-importStatement :: Binding
-importStatement = def "ImportStatement" $ T.union [
-  "name">: python "ImportName",
-  "from">: python "ImportFrom"]
-
--- # Import statements
--- # -----------------
---
--- import_name: 'import' dotted_as_names
-
-importName :: Binding
-importName = def "ImportName" $ T.wrap $ nonemptyList $ python "DottedAsName"
-
--- # note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS
--- import_from:
---     | 'from' ('.' | '...')* dotted_name 'import' import_from_targets
---     | 'from' ('.' | '...')+ 'import' import_from_targets
-
-importFrom :: Binding
-importFrom = def "ImportFrom" $ T.record [
-  "prefixes">: T.list $ python "RelativeImportPrefix",
-  "dottedName">: T.maybe $ python "DottedName",
-  "targets">: python "ImportFromTargets"]
-
-relativeImportPrefix :: Binding
-relativeImportPrefix = def "RelativeImportPrefix" $ T.enum ["dot", "ellipsis"]
-
--- import_from_targets:
---     | '(' import_from_as_names [','] ')'
---     | import_from_as_names !','
---     | '*'
-
-importFromTargets :: Binding
-importFromTargets = def "ImportFromTargets" $ T.union [
-  "simple">: nonemptyList $ python "ImportFromAsName",
-  "parens">: nonemptyList $ python "ImportFromAsName",
-  "star">: T.unit]
-
--- import_from_as_names:
---     | ','.import_from_as_name+
---
--- import_from_as_name:
---     | NAME ['as' NAME ]
-
-importFromAsName :: Binding
-importFromAsName = def "ImportFromAsName" $ T.record [
-  "name">: python "Name",
-  "as">: T.maybe $ python "Name"]
-
--- dotted_as_names:
---     | ','.dotted_as_name+
---
--- dotted_as_name:
---     | dotted_name ['as' NAME ]
-
-dottedAsName :: Binding
-dottedAsName = def "DottedAsName" $ T.record [
-  "name">: python "DottedName",
-  "as">: T.maybe $ python "Name"]
-
--- dotted_name:
---     | dotted_name '.' NAME
---     | NAME
-
-dottedName :: Binding
-dottedName = def "DottedName" $ T.wrap $ nonemptyList $ python "Name"
-
---
--- # COMPOUND STATEMENTS
--- # ===================
---
--- # Common elements
--- # ---------------
---
--- block:
---     | NEWLINE INDENT statements DEDENT
---     | simple_stmts
-
-block :: Binding
-block = def "Block" $ T.union [
-  -- Statements in indented blocks are grouped in Hydra, so these groups can be separated by a double newline.
-  "indented">: nonemptyList $ nonemptyList $ python "Statement",
-  "simple">: nonemptyList $ python "SimpleStatement"]
-
--- decorators: ('@' named_expression NEWLINE )+
-
-decorators :: Binding
-decorators = def "Decorators" $ T.wrap $ nonemptyList $ python "NamedExpression"
-
--- # Class definitions
--- # -----------------
---
--- class_def:
---     | decorators class_def_raw
---     | class_def_raw
-
-classDefinition :: Binding
-classDefinition = def "ClassDefinition" $ T.record [
-  "decorators">: T.maybe $ python "Decorators",
-  "name">: python "Name",
-  "typeParams">: T.list $ python "TypeParameter",
-  "arguments">: T.maybe $ python "Args",
-  "body">: python "Block"]
-
--- class_def_raw:
---     | 'class' NAME [type_params] ['(' [arguments] ')' ] ':' block
---
--- # Function definitions
--- # --------------------
---
--- function_def:
---     | decorators function_def_raw
---     | function_def_raw
-
-functionDefinition :: Binding
-functionDefinition = def "FunctionDefinition" $ T.record [
-  "decorators">: T.maybe $ python "Decorators",
-  "raw">: python "FunctionDefRaw"]
-
--- function_def_raw:
---     | 'def' NAME [type_params] '(' [params] ')' ['->' expression ] ':' [func_type_comment] block
---     | 'async' 'def' NAME [type_params] '(' [params] ')' ['->' expression ] ':' [func_type_comment] block
-
-functionDefRaw :: Binding
-functionDefRaw = def "FunctionDefRaw" $ T.record [
-  "async">: T.boolean,
-  "name">: python "Name",
-  "typeParams">: T.list $ python "TypeParameter",
-  "params">: T.maybe $ python "Parameters",
-  "returnType">: T.maybe $ python "Expression",
-  "funcTypeComment">: T.maybe $ python "FuncTypeComment",
-  "block">: python "Block"]
-
--- # Function parameters
--- # -------------------
---
--- params:
---     | parameters
---
--- parameters:
---     | slash_no_default param_no_default* param_with_default* [star_etc]
---     | slash_with_default param_with_default* [star_etc]
---     | param_no_default+ param_with_default* [star_etc]
---     | param_with_default+ [star_etc]
---     | star_etc
-
-parameters :: Binding
-parameters = def "Parameters" $ T.union [
-  "slashNoDefault">: python "SlashNoDefaultParameters",
-  "slashWithDefault">: python "SlashWithDefaultParameters",
-  "paramNoDefault">: python "ParamNoDefaultParameters",
-  "paramWithDefault">: python "ParamWithDefaultParameters",
-  "starEtc">: python "StarEtc"]
-
-slashNoDefaultParameters :: Binding
-slashNoDefaultParameters = def "SlashNoDefaultParameters" $ T.record [
-  "slash">: python "SlashNoDefault",
-  "paramNoDefault">: T.list $ python "ParamNoDefault",
-  "paramWithDefault">: T.list $ python "ParamWithDefault",
-  "starEtc">: T.maybe $ python "StarEtc"]
-
-slashWithDefaultParameters :: Binding
-slashWithDefaultParameters = def "SlashWithDefaultParameters" $ T.record [
-  "paramNoDefault">: T.list $ python "ParamNoDefault",
-  "paramWithDefault">: T.list $ python "ParamWithDefault",
-  "starEtc">: T.maybe $ python "StarEtc"]
-
-paramNoDefaultParameters :: Binding
-paramNoDefaultParameters = def "ParamNoDefaultParameters" $ T.record [
-  "paramNoDefault">: nonemptyList $ python "ParamNoDefault",
-  "paramWithDefault">: T.list $ python "ParamWithDefault",
-  "starEtc">: T.maybe $ python "StarEtc"]
-
-paramWithDefaultParameters :: Binding
-paramWithDefaultParameters = def "ParamWithDefaultParameters" $ T.record [
-  "paramWithDefault">: nonemptyList $ python "ParamWithDefault",
-  "starEtc">: T.maybe $ python "StarEtc"]
-
--- # Some duplication here because we can't write (',' | &')'),
--- # which is because we don't support empty alternatives (yet).
---
--- slash_no_default:
---     | param_no_default+ '/' ','
---     | param_no_default+ '/' &')'
-
-slashNoDefault :: Binding
-slashNoDefault = def "SlashNoDefault" $ T.wrap $ nonemptyList $ python "ParamNoDefault"
-
--- slash_with_default:
---     | param_no_default* param_with_default+ '/' ','
---     | param_no_default* param_with_default+ '/' &')'
-
-slashWithDefault :: Binding
-slashWithDefault = def "SlashWithDefault" $ T.record [
-  "paramNoDefault">: T.list $ python "ParamNoDefault",
-  "paramWithDefault">: nonemptyList $ python "ParamWithDefault"]
-
--- star_etc:
---     | '*' param_no_default param_maybe_default* [kwds]
---     | '*' param_no_default_star_annotation param_maybe_default* [kwds]
---     | '*' ',' param_maybe_default+ [kwds]
---     | kwds
-
-starEtc :: Binding
-starEtc = def "StarEtc" $ T.union [
-  "starNoDefault">: python "NoDefaultStarEtc",
-  "starNoDefaultStarAnnotation">: python "NoDefaultStarAnnotationStarEtc",
-  "starComma">: python "CommaStarEtc",
-  "keywords">: python "Keywords"]
-
-noDefaultStarEtc :: Binding
-noDefaultStarEtc = def "NoDefaultStarEtc" $ T.record [
-  "paramNoDefault">: python "ParamNoDefault",
-  "paramMaybeDefault">: T.list $ python "ParamMaybeDefault",
-  "keywords">: T.maybe $ python "Keywords"]
-
-noDefaultStarAnnotationStarEtc :: Binding
-noDefaultStarAnnotationStarEtc = def "NoDefaultStarAnnotationStarEtc" $ T.record [
-  "paramNoDefaultStarAnnotation">: python "ParamNoDefaultStarAnnotation",
-  "paramMaybeDefault">: T.list $ python "ParamMaybeDefault",
-  "keywords">: T.maybe $ python "Keywords"]
-
-commaStarEtc :: Binding
-commaStarEtc = def "CommaStarEtc" $ T.record [
-  "paramMaybeDefault">: nonemptyList $ python "ParamMaybeDefault",
-  "keywords">: T.maybe $ python "Keywords"]
-
--- kwds:
---     | '**' param_no_default
-
-keywords :: Binding
-keywords = def "Keywords" $ T.wrap $ python "ParamNoDefault"
-
--- # One parameter.  This *includes* a following comma and type comment.
--- #
--- # There are three styles:
--- # - No default
--- # - With default
--- # - Maybe with default
--- #
--- # There are two alternative forms of each, to deal with type comments:
--- # - Ends in a comma followed by an optional type comment
--- # - No comma, optional type comment, must be followed by close paren
--- # The latter form is for a final parameter without trailing comma.
--- #
---
--- param_no_default:
---     | param ',' TYPE_COMMENT?
---     | param TYPE_COMMENT? &')'
-
-paramNoDefault :: Binding
-paramNoDefault = def "ParamNoDefault" $ T.record [
-  "param">: python "Param",
-  "typeComment">: T.maybe $ python "TypeComment"]
-
--- param_no_default_star_annotation:
---     | param_star_annotation ',' TYPE_COMMENT?
---     | param_star_annotation TYPE_COMMENT? &')'
-
-paramNoDefaultStarAnnotation :: Binding
-paramNoDefaultStarAnnotation = def "ParamNoDefaultStarAnnotation" $ T.record [
-  "paramStarAnnotation">: python "ParamStarAnnotation",
-  "typeComment">: T.maybe $ python "TypeComment"]
-
--- param_with_default:
---     | param default ',' TYPE_COMMENT?
---     | param default TYPE_COMMENT? &')'
-
-paramWithDefault :: Binding
-paramWithDefault = def "ParamWithDefault" $ T.record [
-  "param">: python "Param",
-  "default">: python "Default",
-  "typeComment">: T.maybe $ python "TypeComment"]
-
--- param_maybe_default:
---     | param default? ',' TYPE_COMMENT?
---     | param default? TYPE_COMMENT? &')'
-
-paramMaybeDefault :: Binding
-paramMaybeDefault = def "ParamMaybeDefault" $ T.record [
-  "param">: python "Param",
-  "default">: T.maybe $ python "Default",
-  "typeComment">: T.maybe $ python "TypeComment"]
-
--- param: NAME annotation?
-
-param :: Binding
-param = def "Param" $ T.record [
-  "name">: python "Name",
-  "annotation">: T.maybe $ python "Annotation"]
-
--- param_star_annotation: NAME star_annotation
-
-paramStarAnnotation :: Binding
-paramStarAnnotation = def "ParamStarAnnotation" $ T.record [
-  "name">: python "Name",
-  "annotation">: python "StarAnnotation"]
-
--- annotation: ':' expression
-
-annotation :: Binding
-annotation = def "Annotation" $ T.wrap $ python "Expression"
-
--- star_annotation: ':' star_expression
-
-starAnnotation :: Binding
-starAnnotation = def "StarAnnotation" $ T.wrap $ python "StarExpression"
-
--- default: '=' expression  | invalid_default
-
-default_ :: Binding
-default_ = def "Default" $ T.wrap $ python "Expression"
-
--- # If statement
--- # ------------
---
--- if_stmt:
---     | 'if' named_expression ':' block elif_stmt
---     | 'if' named_expression ':' block [else_block]
-
-ifStatement :: Binding
-ifStatement = def "IfStatement" $ T.record [
-  "condition">: python "NamedExpression",
-  "body">: python "Block",
-  "continuation">: T.maybe $ python "IfTail"]
-
-ifTail :: Binding
-ifTail = def "IfTail" $ T.union [
-  "elif">: python "IfStatement",
-  "else">: python "Block"]
-
--- elif_stmt:
---     | 'elif' named_expression ':' block elif_stmt
---     | 'elif' named_expression ':' block [else_block]
-
--- else_block:
---     | 'else' ':' block
---
--- # While statement
--- # ---------------
---
--- while_stmt:
---     | 'while' named_expression ':' block [else_block]
-
-whileStatement :: Binding
-whileStatement = def "WhileStatement" $ T.record [
-  "condition">: python "NamedExpression",
-  "body">: python "Block",
-  "else">: T.maybe $ python "Block"]
-
--- # For statement
--- # -------------
---
--- for_stmt:
---     | 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block]
---     | 'async' 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block]
-
-forStatement :: Binding
-forStatement = def "ForStatement" $ T.record [
-  "async">: T.boolean,
-  "targets">: nonemptyList $ python "StarTarget",
-  "expressions">: nonemptyList $ python "StarExpression",
-  "typeComment">: T.maybe $ python "TypeComment",
-  "body">: python "Block",
-  "else">: T.maybe $ python "Block"]
-
--- # With statement
--- # --------------
---
--- with_stmt:
---     |         'with' '(' ','.with_item+ ','? ')' ':' [TYPE_COMMENT] block
---     |         'with' ','.with_item+ ':' [TYPE_COMMENT] block
---     | 'async' 'with' '(' ','.with_item+ ','? ')' ':' block
---     | 'async' 'with' ','.with_item+ ':' [TYPE_COMMENT] block
-
-withStatement :: Binding
-withStatement = def "WithStatement" $ T.record [
-  "async">: T.boolean,
-  "items">: nonemptyList $ python "WithItem",
-  "typeComment">: T.maybe $ python "TypeComment",
-  "body">: python "Block"]
-
--- with_item:
---     | expression 'as' star_target &(',' | ')' | ':')
---     | expression
-
-withItem :: Binding
-withItem = def "WithItem" $ T.record [
-  "expression">: python "Expression",
-  "as">: T.maybe $ python "StarTarget"]
-
--- # Try statement
--- # -------------
---
--- try_stmt:
---     | 'try' ':' block finally_block
---     | 'try' ':' block except_block+ [else_block] [finally_block]
---     | 'try' ':' block except_star_block+ [else_block] [finally_block]
-
-tryStatement :: Binding
-tryStatement = def "TryStatement" $ T.union [
-  "finally">: python "TryFinallyStatement",
-  "except">: python "TryExceptStatement",
-  "exceptStar">: python "TryExceptStarStatement"]
-
-tryFinallyStatement :: Binding
-tryFinallyStatement = def "TryFinallyStatement" $ T.record [
-  "body">: python "Block",
-  "finally">: python "Block"]
-
-tryExceptStatement :: Binding
-tryExceptStatement = def "TryExceptStatement" $ T.record [
-  "body">: python "Block",
-  "excepts">: nonemptyList $ python "ExceptBlock",
-  "else">: T.maybe $ python "Block",
-  "finally">: T.maybe $ python "Block"]
-
-tryExceptStarStatement :: Binding
-tryExceptStarStatement = def "TryExceptStarStatement" $ T.record [
-  "body">: python "Block",
-  "excepts">: nonemptyList $ python "ExceptStarBlock",
-  "else">: T.maybe $ python "Block",
-  "finally">: T.maybe $ python "Block"]
-
--- # Except statement
--- # ----------------
---
--- except_block:
---     | 'except' expression ['as' NAME ] ':' block
---     | 'except' ':' block
-
-exceptBlock :: Binding
-exceptBlock = def "ExceptBlock" $ T.record [
-  "expression">: T.maybe $ python "ExceptExpression",
-  "body">: python "Block"]
-
-exceptExpression :: Binding
-exceptExpression = def "ExceptExpression" $ T.record [
-  "expression">: python "Expression",
-  "as">: T.maybe $ python "Name"]
-
--- except_star_block:
---     | 'except' '*' expression ['as' NAME ] ':' block
-
-exceptStarBlock :: Binding
-exceptStarBlock = def "ExceptStarBlock" $ T.record [
-  "expression">: python "Expression",
-  "as">: T.maybe $ python "Name",
-  "body">: python "Block"]
-
--- finally_block:
---     | 'finally' ':' block
---
--- # Match statement
--- # ---------------
---
--- match_stmt:
---     | "match" subject_expr ':' NEWLINE INDENT case_block+ DEDENT
-
-matchStatement :: Binding
-matchStatement = def "MatchStatement" $ T.record [
-  "subject">: python "SubjectExpression",
-  "cases">: nonemptyList $ python "CaseBlock"]
-
--- subject_expr:
---     | star_named_expression ',' star_named_expressions?
---     | named_expression
-
-subjectExpression :: Binding
-subjectExpression = def "SubjectExpression" $ T.union [
-  "tuple">: nonemptyList $ python "StarNamedExpression",
-  "simple">: python "NamedExpression"]
-
--- case_block:
---     | "case" patterns guard? ':' block
-
-caseBlock :: Binding
-caseBlock = def "CaseBlock" $ T.record [
-  "patterns">: python "Patterns",
-  "guard">: T.maybe $ python "Guard",
-  "body">: python "Block"]
-
--- guard: 'if' named_expression
-
-guard :: Binding
-guard = def "Guard" $ T.wrap $ python "NamedExpression"
-
--- patterns:
---     | open_sequence_pattern
---     | pattern
-
-patterns :: Binding
-patterns = def "Patterns" $ T.union [
-  "sequence">: python "OpenSequencePattern",
-  "pattern">: python "Pattern"]
-
--- pattern:
---     | as_pattern
---     | or_pattern
-
-pattern_ :: Binding
-pattern_ = def "Pattern" $ T.union [
-  "as">: python "AsPattern",
-  "or">: python "OrPattern"]
-
--- as_pattern:
---     | or_pattern 'as' pattern_capture_target
-
-asPattern :: Binding
-asPattern = def "AsPattern" $ T.record [
-  "pattern">: python "OrPattern",
-  "as">: python "PatternCaptureTarget"]
-
--- or_pattern:
---     | '|'.closed_pattern+
-
-orPattern :: Binding
-orPattern = def "OrPattern" $ T.wrap $ nonemptyList $ python "ClosedPattern"
-
--- closed_pattern:
---     | literal_pattern
---     | capture_pattern
---     | wildcard_pattern
---     | value_pattern
---     | group_pattern
---     | sequence_pattern
---     | mapping_pattern
---     | class_pattern
-
-closedPattern :: Binding
-closedPattern = def "ClosedPattern" $ T.union [
-  "literal">: python "LiteralExpression",
-  "capture">: python "CapturePattern",
-  "wildcard">: T.unit,
-  "value">: python "ValuePattern",
-  "group">: python "GroupPattern",
-  "sequence">: python "SequencePattern",
-  "mapping">: python "MappingPattern",
-  "class">: python "ClassPattern"]
-
--- # Literal patterns are used for equality and identity constraints
--- literal_pattern:
---     | signed_number !('+' | '-')
---     | complex_number
---     | strings
---     | 'None'
---     | 'True'
---     | 'False'
-
-  -- Note: identical to literal_expr
-
--- # Literal expressions are used to restrict permitted mapping pattern keys
--- literal_expr:
---     | signed_number !('+' | '-')
---     | complex_number
---     | strings
---     | 'None'
---     | 'True'
---     | 'False'
-
-literalExpression :: Binding
-literalExpression = def "LiteralExpression" $ T.union [
-  "number">: python "SignedNumber",
-  "complex">: python "ComplexNumber",
-  "string">: T.string,
-  "none">: T.unit,
-  "true">: T.unit,
-  "false">: T.unit]
-
--- complex_number:
---     | signed_real_number '+' imaginary_number
---     | signed_real_number '-' imaginary_number
-
-complexNumber :: Binding
-complexNumber = def "ComplexNumber" $ T.record [
-  "real">: python "SignedRealNumber",
-  "plusOrMinus">: python "PlusOrMinus",
-  "imaginary">: python "ImaginaryNumber"]
-
-plusOrMinus :: Binding
-plusOrMinus = def "PlusOrMinus" $ T.enum ["plus", "minus"]
-
--- signed_number:
---     | NUMBER
---     | '-' NUMBER
-
-signedNumber :: Binding
-signedNumber = def "SignedNumber" $ T.union [
-  "sign">: python "PlusOrMinus",
-  "number">: python "Number"]
-
--- signed_real_number:
---     | real_number
---     | '-' real_number
-
-signedRealNumber :: Binding
-signedRealNumber = def "SignedRealNumber" $ T.union [
-  "sign">: python "PlusOrMinus",
-  "number">: python "RealNumber"]
-
--- real_number:
---     | NUMBER
-
-realNumber :: Binding
-realNumber = def "RealNumber" $ T.wrap $ python "Number"
-
--- imaginary_number:
---     | NUMBER
-
-imaginaryNumber :: Binding
-imaginaryNumber = def "ImaginaryNumber" $ T.wrap $ python "Number"
-
--- capture_pattern:
---     | pattern_capture_target
-
-capturePattern :: Binding
-capturePattern = def "CapturePattern" $ T.wrap $ python "PatternCaptureTarget"
-
--- pattern_capture_target:
---     | !"_" NAME !('.' | '(' | '=')
-
-patternCaptureTarget :: Binding
-patternCaptureTarget = def "PatternCaptureTarget" $ T.wrap $ python "Name"
-
--- wildcard_pattern:
---     | "_"
---
--- value_pattern:
---     | attr !('.' | '(' | '=')
-
-valuePattern :: Binding
-valuePattern = def "ValuePattern" $ T.wrap $ python "Attribute"
-
--- attr:
---     | name_or_attr '.' NAME
-
-attribute :: Binding
-attribute = def "Attribute" $ T.wrap $ nonemptyList $ python "Name" -- Actually list with length >= 2
-
--- name_or_attr:
---     | attr
---     | NAME
-
-nameOrAttribute :: Binding
-nameOrAttribute = def "NameOrAttribute" $ T.wrap $ nonemptyList $ python "Name"
-
--- group_pattern:
---     | '(' pattern ')'
-
-groupPattern :: Binding
-groupPattern = def "GroupPattern" $ T.wrap $ python "Pattern"
-
--- sequence_pattern:
---     | '[' maybe_sequence_pattern? ']'
---     | '(' open_sequence_pattern? ')'
-
-sequencePattern :: Binding
-sequencePattern = def "SequencePattern" $ T.union [
-  "list">: T.maybe $ python "MaybeSequencePattern",
-  "tuple">: T.maybe $ python "OpenSequencePattern"]
-
--- open_sequence_pattern:
---     | maybe_star_pattern ',' maybe_sequence_pattern?
-
-openSequencePattern :: Binding
-openSequencePattern = def "OpenSequencePattern" $ T.record [
-  "head">: python "MaybeStarPattern",
-  "tail">: T.maybe $ python "MaybeSequencePattern"]
-
--- maybe_sequence_pattern:
---     | ','.maybe_star_pattern+ ','?
-
-maybeSequencePattern :: Binding
-maybeSequencePattern = def "MaybeSequencePattern" $ T.wrap $ nonemptyList $ python "MaybeStarPattern"
-
--- maybe_star_pattern:
---     | star_pattern
---     | pattern
-
-maybeStarPattern :: Binding
-maybeStarPattern = def "MaybeStarPattern" $ T.union [
-  "star">: python "StarPattern",
-  "pattern">: python "Pattern"]
-
--- star_pattern:
---     | '*' pattern_capture_target
---     | '*' wildcard_pattern
-
-starPattern :: Binding
-starPattern = def "StarPattern" $ T.union [
-  "capture">: python "PatternCaptureTarget",
-  "wildcard">: T.unit]
-
--- mapping_pattern:
---     | '{' '}'
---     | '{' double_star_pattern ','? '}'
---     | '{' items_pattern ',' double_star_pattern ','? '}'
---     | '{' items_pattern ','? '}'
-
-mappingPattern :: Binding
-mappingPattern = def "MappingPattern" $ T.record [
-  "items">: T.maybe $ python "ItemsPattern",
-  "doubleStar">: T.maybe $ python "DoubleStarPattern"]
-
--- items_pattern:
---     | ','.key_value_pattern+
-
-itemsPattern :: Binding
-itemsPattern = def "ItemsPattern" $ T.wrap $ nonemptyList $ python "KeyValuePattern"
-
--- key_value_pattern:
---     | (literal_expr | attr) ':' pattern
-
-keyValuePattern :: Binding
-keyValuePattern = def "KeyValuePattern" $ T.record [
-  "key">: python "LiteralExpressionOrAttribute",
-  "value">: python "Pattern"]
-
-literalExpressionOrAttribute :: Binding
-literalExpressionOrAttribute = def "LiteralExpressionOrAttribute" $ T.union [
-  "literal">: python "LiteralExpression",
-  "attribute">: python "Attribute"]
-
--- double_star_pattern:
---     | '**' pattern_capture_target
-
-doubleStarPattern :: Binding
-doubleStarPattern = def "DoubleStarPattern" $ T.wrap $ python "PatternCaptureTarget"
-
--- class_pattern:
---     | name_or_attr '(' ')'
---     | name_or_attr '(' positional_patterns ','? ')'
---     | name_or_attr '(' keyword_patterns ','? ')'
---     | name_or_attr '(' positional_patterns ',' keyword_patterns ','? ')'
-
-classPattern :: Binding
-classPattern = def "ClassPattern" $ T.record [
-  "nameOrAttribute">: python "NameOrAttribute",
-  "positionalPatterns">: T.maybe $ python "PositionalPatterns",
-  "keywordPatterns">: T.maybe $ python "KeywordPatterns"]
-
--- positional_patterns:
---     | ','.pattern+
-
-positionalPatterns :: Binding
-positionalPatterns = def "PositionalPatterns" $ T.wrap $ nonemptyList $ python "Pattern"
-
--- keyword_patterns:
---     | ','.keyword_pattern+
-
-keywordPatterns :: Binding
-keywordPatterns = def "KeywordPatterns" $ T.wrap $ nonemptyList $ python "KeywordPattern"
-
--- keyword_pattern:
---     | NAME '=' pattern
-
-keywordPattern :: Binding
-keywordPattern = def "KeywordPattern" $ T.record [
-  "name">: python "Name",
-  "pattern">: python "Pattern"]
-
--- # Type statement
--- # ---------------
---
--- type_alias:
---     | "type" NAME [type_params] '=' expression
-
-typeAlias :: Binding
-typeAlias = def "TypeAlias" $ T.record [
-  "name">: python "Name",
-  "typeParams">: T.list $ python "TypeParameter",
-  "expression">: python "Expression"]
-
--- # Type parameter declaration
--- # --------------------------
---
--- type_params:
---     | invalid_type_params
---     | '[' type_param_seq ']'
---
--- type_param_seq: ','.type_param+ [',']
---
--- type_param:
---     | NAME [type_param_bound] [type_param_default]
---     | '*' NAME [type_param_starred_default]
---     | '**' NAME [type_param_default]
-
-typeParameter :: Binding
-typeParameter = def "TypeParameter" $ T.union [
-  "simple">: python "SimpleTypeParameter",
-  "star">: python "StarTypeParameter",
-  "doubleStar">: python "DoubleStarTypeParameter"]
-
-simpleTypeParameter :: Binding
-simpleTypeParameter = def "SimpleTypeParameter" $ T.record [
-  "name">: python "Name",
-  "bound">: T.maybe $ python "Expression",
-  "default">: T.maybe $ python "Expression"]
-
-starTypeParameter :: Binding
-starTypeParameter = def "StarTypeParameter" $ T.record [
-  "name">: python "Name",
-  "default">: T.maybe $ python "StarExpression"]
-
-doubleStarTypeParameter :: Binding
-doubleStarTypeParameter = def "DoubleStarTypeParameter" $ T.record [
-  "name">: python "Name",
-  "default">: T.maybe $ python "Expression"]
-
--- type_param_bound: ':' expression
--- type_param_default: '=' expression
--- type_param_starred_default: '=' star_expression
---
--- # EXPRESSIONS
--- # -----------
---
--- expressions:
---     | expression (',' expression )+ [',']
---     | expression ','
---     | expression
---
--- expression:
---     | disjunction 'if' disjunction 'else' expression
---     | disjunction
---     | lambdef
-
-expression :: Binding
-expression = def "Expression" $ T.union [
-  "conditional">: python "Conditional",
-  "simple">: python "Disjunction",
-  "lambda">: python "Lambda"]
-
-conditional :: Binding
-conditional = def "Conditional" $ T.record [
-  "body">: python "Disjunction",
-  "if">: python "Disjunction",
-  "else">: python "Expression"]
-
--- yield_expr:
---     | 'yield' 'from' expression
---     | 'yield' [star_expressions]
-
-yieldExpression :: Binding
-yieldExpression = def "YieldExpression" $ T.union [
-  "from">: python "Expression",
-  "simple">: T.list $ python "StarExpression"]
-
--- star_expressions:
---     | star_expression (',' star_expression )+ [',']
---     | star_expression ','
---     | star_expression
---
--- star_expression:
---     | '*' bitwise_or
---     | expression
-
-starExpression :: Binding
-starExpression = def "StarExpression" $ T.union [
-  "star">: python "BitwiseOr",
-  "simple">: python "Expression"]
-
--- star_named_expressions: ','.star_named_expression+ [',']
-
-starNamedExpressions :: Binding
-starNamedExpressions = def "StarNamedExpressions" $ T.wrap $ nonemptyList $ python "StarNamedExpression"
-
--- star_named_expression:
---     | '*' bitwise_or
---     | named_expression
-
-starNamedExpression :: Binding
-starNamedExpression = def "StarNamedExpression" $ T.union [
-  "star">: python "BitwiseOr",
-  "simple">: python "NamedExpression"]
-
--- assignment_expression:
---     | NAME ':=' ~ expression
-
-assignmentExpression :: Binding
-assignmentExpression = def "AssignmentExpression" $ T.record [
-  "name">: python "Name",
-  "expression">: python "Expression"]
-
--- named_expression:
---     | assignment_expression
---     | expression !':='
-
-namedExpression :: Binding
-namedExpression = def "NamedExpression" $ T.union [
-  "assignment">: python "AssignmentExpression",
-  "simple">: python "Expression"]
-
--- disjunction:
---     | conjunction ('or' conjunction )+
---     | conjunction
-
-disjunction :: Binding
-disjunction = def "Disjunction" $ T.wrap $ nonemptyList $ python "Conjunction"
-
--- conjunction:
---     | inversion ('and' inversion )+
---     | inversion
-
-conjunction :: Binding
-conjunction = def "Conjunction" $ T.wrap $ nonemptyList $ python "Inversion"
-
--- inversion:
---     | 'not' inversion
---     | comparison
-
-inversion :: Binding
-inversion = def "Inversion" $ T.union [
-  "not">: python "Inversion",
-  "simple">: python "Comparison"]
-
--- # Comparison operators
--- # --------------------
---
--- comparison:
---     | bitwise_or compare_op_bitwise_or_pair+
---     | bitwise_or
-
-comparison :: Binding
-comparison = def "Comparison" $ T.record [
-  "lhs">: python "BitwiseOr",
-  "rhs">: T.list $ python "CompareOpBitwiseOrPair"]
-
--- compare_op_bitwise_or_pair:
---     | eq_bitwise_or
---     | noteq_bitwise_or
---     | lte_bitwise_or
---     | lt_bitwise_or
---     | gte_bitwise_or
---     | gt_bitwise_or
---     | notin_bitwise_or
---     | in_bitwise_or
---     | isnot_bitwise_or
---     | is_bitwise_or
-
-compareOpBitwiseOrPair :: Binding
-compareOpBitwiseOrPair = def "CompareOpBitwiseOrPair" $ T.record [
-  "operator">: python "CompareOp",
-  "rhs">: python "BitwiseOr"]
-
-compareOp :: Binding
-compareOp = def "CompareOp" $ T.enum [
-  "eq", "noteq", "lte", "lt", "gte", "gt", "notin", "in", "isnot", "is"]
-
--- eq_bitwise_or: '==' bitwise_or
--- noteq_bitwise_or:
---     | ('!=' ) bitwise_or
--- lte_bitwise_or: '<=' bitwise_or
--- lt_bitwise_or: '<' bitwise_or
--- gte_bitwise_or: '>=' bitwise_or
--- gt_bitwise_or: '>' bitwise_or
--- notin_bitwise_or: 'not' 'in' bitwise_or
--- in_bitwise_or: 'in' bitwise_or
--- isnot_bitwise_or: 'is' 'not' bitwise_or
--- is_bitwise_or: 'is' bitwise_or
---
--- # Bitwise operators
--- # -----------------
---
--- bitwise_or:
---     | bitwise_or '|' bitwise_xor
---     | bitwise_xor
-
-bitwiseOr :: Binding
-bitwiseOr = def "BitwiseOr" $ T.record [
-  "lhs">: T.maybe $ python "BitwiseOr",
-  "rhs">: python "BitwiseXor"]
-
--- bitwise_xor:
---     | bitwise_xor '^' bitwise_and
---     | bitwise_and
-
-bitwiseXor :: Binding
-bitwiseXor = def "BitwiseXor" $ T.record [
-  "lhs">: T.maybe $ python "BitwiseXor",
-  "rhs">: python "BitwiseAnd"]
-
--- bitwise_and:
---     | bitwise_and '&' shift_expr
---     | shift_expr
-
-bitwiseAnd :: Binding
-bitwiseAnd = def "BitwiseAnd" $ T.record [
-  "lhs">: T.maybe $ python "BitwiseAnd",
-  "rhs">: python "ShiftExpression"]
-
--- shift_expr:
---     | shift_expr '<<' sum
---     | shift_expr '>>' sum
---     | sum
-
-shiftExpression :: Binding
-shiftExpression = def "ShiftExpression" $ T.record [
-  "lhs">: T.maybe $ python "ShiftLhs",
-  "rhs">: python "Sum"]
-
-shiftLhs :: Binding
-shiftLhs = def "ShiftLhs" $ T.record [
-  "operand">: python "ShiftExpression",
-  "operator">: python "ShiftOp"]
-
-shiftOp :: Binding
-shiftOp = def "ShiftOp" $ T.enum [
-  "left", "right"]
-
--- # Arithmetic operators
--- # --------------------
---
--- sum:
---     | sum '+' term
---     | sum '-' term
---     | term
-
-sum_ :: Binding
-sum_ = def "Sum" $ T.record [
-  "lhs">: T.maybe $ python "SumLhs",
-  "rhs">: python "Term"]
-
-sumLhs :: Binding
-sumLhs = def "SumLhs" $ T.record [
-  "operand">: python "Sum",
-  "operator">: python "SumOp"]
-
-sumOp :: Binding
-sumOp = def "SumOp" $ T.enum [
-  "add", "sub"]
-
--- term:
---     | term '*' factor
---     | term '/' factor
---     | term '//' factor
---     | term '%' factor
---     | term '@' factor
---     | factor
-
-term :: Binding
-term = def "Term" $ T.record [
-  "lhs">: T.maybe $ python "TermLhs",
-  "rhs">: python "Factor"]
-
-termLhs :: Binding
-termLhs = def "TermLhs" $ T.record [
-  "operand">: python "Term",
-  "operator">: python "TermOp"]
-
-termOp :: Binding
-termOp = def "TermOp" $ T.enum [
-  "mul", "div", "floordiv", "mod", "matmul"]
-
--- factor:
---     | '+' factor
---     | '-' factor
---     | '~' factor
---     | power
-
-factor :: Binding
-factor = def "Factor" $ T.union [
-  "positive">: python "Factor",
-  "negative">: python "Factor",
-  "complement">: python "Factor",
-  "simple">: python "Power"]
-
--- power:
---     | await_primary '**' factor
---     | await_primary
-
-power :: Binding
-power = def "Power" $ T.record [
-  "lhs">: python "AwaitPrimary",
-  "rhs">: T.maybe $ python "Factor"]
-
--- # Primary elements
--- # ----------------
---
--- # Primary elements are things like "obj.something.something", "obj[something]", "obj(something)", "obj" ...
---
--- await_primary:
---     | 'await' primary
---     | primary
-
-awaitPrimary :: Binding
-awaitPrimary = def "AwaitPrimary" $ T.record [
-  "await">: T.boolean,
-  "primary">: python "Primary"]
-
--- primary:
---     | primary '.' NAME
---     | primary genexp
---     | primary '(' [arguments] ')'
---     | primary '[' slices ']'
---     | atom
-
-primary :: Binding
-primary = def "Primary" $ T.union [
-  "simple">: python "Atom",
-  "compound">: python "PrimaryWithRhs"]
-
-primaryWithRhs :: Binding
-primaryWithRhs = def "PrimaryWithRhs" $ T.record [
-  "primary">: python "Primary",
-  "rhs">: python "PrimaryRhs"]
-
-primaryRhs :: Binding
-primaryRhs = def "PrimaryRhs" $ T.union [
-  "project">: python "Name",
-  "genexp">: python "Genexp",
-  "call">: python "Args",
-  "slices">: python "Slices"]
-
--- slices:
---     | slice !','
---     | ','.(slice | starred_expression)+ [',']
-
-slices :: Binding
-slices = def "Slices" $ T.record [
-  "head">: python "Slice",
-  "tail">: T.list $ python "SliceOrStarredExpression"]
-
-sliceOrStarredExpression :: Binding
-sliceOrStarredExpression = def "SliceOrStarredExpression" $ T.union [
-  "slice">: python "Slice",
-  "starred">: python "StarredExpression"]
-
--- slice:
---     | [expression] ':' [expression] [':' [expression] ]
---     | named_expression
-
-slice :: Binding
-slice = def "Slice" $ T.union [
-  "named">: python "NamedExpression",
-  "slice_">: python "SliceExpression"]
-
-sliceExpression :: Binding
-sliceExpression = def "SliceExpression" $ T.record [
-  "start">: T.maybe $ python "Expression",
-  "stop">: T.maybe $ python "Expression",
-  "step">: T.maybe $ python "Expression"]
-
--- atom:
---     | NAME
---     | 'True'
---     | 'False'
---     | 'None'
---     | strings
---     | NUMBER
---     | (tuple | group | genexp)
---     | (list | listcomp)
---     | (dict | set | dictcomp | setcomp)
---     | '...'
-
-atom :: Binding
-atom = def "Atom" $ T.union [
-  "name">: python "Name",
-  "true">: T.unit,
-  "false">: T.unit,
-  "none">: T.unit,
-  "string">: python "String",
-  "number">: python "Number",
-  "tuple">: python "Tuple",
-  "group">: python "Group",
-  "genexp">: python "Genexp",
-  "list">: python "List",
-  "listcomp">: python "Listcomp",
-  "dict">: python "Dict",
-  "set">: python "Set",
-  "dictcomp">: python "Dictcomp",
-  "setcomp">: python "Setcomp",
-  "ellipsis">: T.unit]
-
--- group:
---     | '(' (yield_expr | named_expression) ')'
-
-group :: Binding
-group = def "Group" $ T.union [
-  "yield">: python "YieldExpression",
-  "expression">: python "NamedExpression"]
-
--- # Lambda functions
--- # ----------------
---
--- lambdef:
---     | 'lambda' [lambda_params] ':' expression
-
-lambda_ :: Binding
-lambda_ = def "Lambda" $ T.record [
-  "params">: python "LambdaParameters",
-  "body">: python "Expression"]
-
--- lambda_params:
---     | lambda_parameters
---
--- # lambda_parameters etc. duplicates parameters but without annotations
--- # or type comments, and if there's no comma after a parameter, we expect
--- # a colon, not a close parenthesis.  (For more, see parameters above.)
--- #
--- lambda_parameters:
---     | lambda_slash_no_default lambda_param_no_default* lambda_param_with_default* [lambda_star_etc]
---     | lambda_slash_with_default lambda_param_with_default* [lambda_star_etc]
---     | lambda_param_no_default+ lambda_param_with_default* [lambda_star_etc]
---     | lambda_param_with_default+ [lambda_star_etc]
---     | lambda_star_etc
-
-lambdaParameters :: Binding
-lambdaParameters = def "LambdaParameters" $ T.record [
-  "slashNoDefault">: T.maybe $ python "LambdaSlashNoDefault",
-  "paramNoDefault">: T.list $ python "LambdaParamNoDefault",
-  "paramWithDefault">: T.list $ python "LambdaParamWithDefault",
-  "starEtc">: T.maybe $ python "LambdaStarEtc"]
-
--- lambda_slash_no_default:
---     | lambda_param_no_default+ '/' ','
---     | lambda_param_no_default+ '/' &':'
-
-lambdaSlashNoDefault :: Binding
-lambdaSlashNoDefault = def "LambdaSlashNoDefault" $ T.record [
-  "parameters">: T.list $ python "LambdaParamNoDefault"]
-
--- lambda_slash_with_default:
---     | lambda_param_no_default* lambda_param_with_default+ '/' ','
---     | lambda_param_no_default* lambda_param_with_default+ '/' &':'
-
-lambdaSlashWithDefault :: Binding
-lambdaSlashWithDefault = def "LambdaSlashWithDefault" $ T.record [
-  "paramNoDefault">: T.list $ python "LambdaParamNoDefault",
-  "paramWithDefault">: nonemptyList $ python "LambdaParamWithDefault"]
-
--- lambda_star_etc:
---     | '*' lambda_param_no_default lambda_param_maybe_default* [lambda_kwds]
---     | '*' ',' lambda_param_maybe_default+ [lambda_kwds]
---     | lambda_kwds
-
-lambdaStarEtc :: Binding
-lambdaStarEtc = def "LambdaStarEtc" $ T.union [
-  "star">: T.boolean,
-  "paramNoDefault">: python "LambdaParamNoDefault",
-  "paramMaybeDefault">: T.list $ python "LambdaParamMaybeDefault",
-  "kwds">: python "LambdaKwds"]
-
--- lambda_kwds:
---     | '**' lambda_param_no_default
-
-lambdaKwds :: Binding
-lambdaKwds = def "LambdaKwds" $ T.wrap $ python "LambdaParamNoDefault"
-
--- lambda_param_no_default:
---     | lambda_param ','
---     | lambda_param &':'
-
-lambdaParamNoDefault :: Binding
-lambdaParamNoDefault = def "LambdaParamNoDefault" $ T.wrap $ python "Name"
-
--- lambda_param_with_default:
---     | lambda_param default ','
---     | lambda_param default &':'
-
-lambdaParamWithDefault :: Binding
-lambdaParamWithDefault = def "LambdaParamWithDefault" $ T.record [
-  "param">: python "Name",
-  "default">: T.maybe $ python "Default"]
-
--- lambda_param_maybe_default:
---     | lambda_param default? ','
---     | lambda_param default? &':'
-
-lambdaParamMaybeDefault :: Binding
-lambdaParamMaybeDefault = def "LambdaParamMaybeDefault" $ T.record [
-  "param">: python "Name",
-  "default">: T.maybe $ python "Default"]
-
--- lambda_param: NAME
---
--- # LITERALS
--- # ========
---
--- fstring_middle:
---     | fstring_replacement_field
---     | FSTRING_MIDDLE
--- fstring_replacement_field:
---     | '{' annotated_rhs '='? [fstring_conversion] [fstring_full_format_spec] '}'
--- fstring_conversion:
---     | "!" NAME
--- fstring_full_format_spec:
---     | ':' fstring_format_spec*
--- fstring_format_spec:
---     | FSTRING_MIDDLE
---     | fstring_replacement_field
--- fstring:
---     | FSTRING_START fstring_middle* FSTRING_END
---
--- string: STRING
--- strings: (fstring|string)+
---
--- list:
---     | '[' [star_named_expressions] ']'
-
-list :: Binding
-list = def "List" $ T.wrap $ T.list $ python "StarNamedExpression"
-
--- tuple:
---     | '(' [star_named_expression ',' [star_named_expressions]  ] ')'
-
-tuple :: Binding
-tuple = def "Tuple" $ T.wrap $ T.list $ python "StarNamedExpression"
-
--- set: '{' star_named_expressions '}'
-
-set :: Binding
-set = def "Set" $ T.wrap $ nonemptyList $ python "StarNamedExpression"
-
--- # Dicts
--- # -----
---
--- dict:
---     | '{' [double_starred_kvpairs] '}'
-
-dict :: Binding
-dict = def "Dict" $ T.wrap $ T.list $ python "DoubleStarredKvpair"
-
--- double_starred_kvpairs: ','.double_starred_kvpair+ [',']
---
--- double_starred_kvpair:
---     | '**' bitwise_or
---     | kvpair
-
-doubleStarredKvpair :: Binding
-doubleStarredKvpair = def "DoubleStarredKvpair" $ T.union [
-  "starred">: python "BitwiseOr",
-  "pair">: python "Kvpair"]
-
--- kvpair: expression ':' expression
-
-kvpair :: Binding
-kvpair = def "Kvpair" $ T.record [
-  "key">: python "Expression",
-  "value">: python "Expression"]
-
--- # Comprehensions & Generators
--- # ---------------------------
---
--- for_if_clauses:
---     | for_if_clause+
-
-forIfClauses :: Binding
-forIfClauses = def "ForIfClauses" $ T.wrap $ nonemptyList $ python "ForIfClause"
-
--- for_if_clause:
---     | 'async' 'for' star_targets 'in' ~ disjunction ('if' disjunction )*
---     | 'for' star_targets 'in' ~ disjunction ('if' disjunction )*
-
-forIfClause :: Binding
-forIfClause = def "ForIfClause" $ T.record [
-  "async">: T.boolean,
-  "targets">: nonemptyList $ python "StarTarget",
-  "in">: python "Disjunction",
-  "ifs">: T.list $ python "Disjunction"]
-
--- listcomp:
---     | '[' named_expression for_if_clauses ']'
-
-listcomp :: Binding
-listcomp = def "Listcomp" $ T.record [
-  "expression">: python "NamedExpression",
-  "forIfClauses">: python "ForIfClauses"]
-
--- setcomp:
---     | '{' named_expression for_if_clauses '}'
-
-setcomp :: Binding
-setcomp = def "Setcomp" $ T.record [
-  "expression">: python "NamedExpression",
-  "forIfClauses">: python "ForIfClauses"]
-
--- genexp:
---     | '(' ( assignment_expression | expression !':=') for_if_clauses ')'
-
-genexp :: Binding
-genexp = def "Genexp" $ T.record [
-  "head">: python "GenexpHead",
-  "tail">: python "ForIfClauses"]
-
-genexpHead :: Binding
-genexpHead = def "GenexpHead" $ T.union [
-  "assignment">: python "AssignmentExpression",
-  "expression">: python "Expression"]
-
--- dictcomp:
---     | '{' kvpair for_if_clauses '}'
-
-dictcomp :: Binding
-dictcomp = def "Dictcomp" $ T.record [
-  "kvpair">: python "Kvpair",
-  "forIfClauses">: python "ForIfClauses"]
-
--- # FUNCTION CALL ARGUMENTS
--- # =======================
---
--- arguments:
---     | args [','] &')'
---
--- args:
---     | ','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ [',' kwargs ]
---     | kwargs
-
-args :: Binding
-args = def "Args" $ T.record [
-  "positional">: T.list $ python "PosArg",
-  "kwargOrStarred">: T.list $ python "KwargOrStarred",
-  "kwargOrDoubleStarred">: T.list $ python "KwargOrDoubleStarred"]
-
-posArg :: Binding
-posArg = def "PosArg" $ T.union [
-  "starred">: python "StarredExpression",
-  "assignment">: python "AssignmentExpression",
-  "expression">: python "Expression"]
-
--- kwargs:
---     | ','.kwarg_or_starred+ ',' ','.kwarg_or_double_starred+
---     | ','.kwarg_or_starred+
---     | ','.kwarg_or_double_starred+
---
--- starred_expression:
---     | '*' expression
-
-starredExpression :: Binding
-starredExpression = def "StarredExpression" $ T.wrap $ python "Expression"
-
--- kwarg_or_starred:
---     | NAME '=' expression
---     | starred_expression
-
-kwargOrStarred :: Binding
-kwargOrStarred = def "KwargOrStarred" $ T.union [
-  "kwarg">: python "Kwarg",
-  "starred">: python "StarredExpression"]
-
-kwarg :: Binding
-kwarg = def "Kwarg" $ T.record [
-  "name">: python "Name",
-  "value">: python "Expression"]
-
--- kwarg_or_double_starred:
---     | NAME '=' expression
---     | '**' expression
-
-kwargOrDoubleStarred :: Binding
-kwargOrDoubleStarred = def "KwargOrDoubleStarred" $ T.union [
-  "kwarg">: python "Kwarg",
-  "doubleStarred">: python "Expression"]
-
--- # ASSIGNMENT TARGETS
--- # ==================
---
--- # Generic targets
--- # ---------------
---
--- # NOTE: star_targets may contain *bitwise_or, targets may not.
--- star_targets:
---     | star_target !','
---     | star_target (',' star_target )* [',']
---
--- star_targets_list_seq: ','.star_target+ [',']
-
-starTargetsListSeq :: Binding
-starTargetsListSeq = def "StarTargetsListSeq" $ T.wrap $ nonemptyList $ python "StarTarget"
-
--- star_targets_tuple_seq:
---     | star_target (',' star_target )+ [',']
---     | star_target ','
-
-starTargetsTupleSeq :: Binding
-starTargetsTupleSeq = def "StarTargetsTupleSeq" $ T.wrap $ nonemptyList $ python "StarTarget"
-
--- star_target:
---     | '*' (!'*' star_target)
---     | target_with_star_atom
-
-starTarget :: Binding
-starTarget = def "StarTarget" $ T.union [
-  "starred">: python "StarTarget",
-  "unstarred">: python "TargetWithStarAtom"]
-
--- target_with_star_atom:
---     | t_primary '.' NAME !t_lookahead
---     | t_primary '[' slices ']' !t_lookahead
---     | star_atom
-
-targetWithStarAtom :: Binding
-targetWithStarAtom = def "TargetWithStarAtom" $ T.union [
-  "project">: python "TPrimaryAndName",
-  "slices">: python "TPrimaryAndSlices",
-  "atom">: python "StarAtom"]
-
-tPrimaryAndName :: Binding
-tPrimaryAndName = def "TPrimaryAndName" $ T.record [
-  "primary">: python "TPrimary",
-  "name">: python "Name"]
-
-tPrimaryAndSlices :: Binding
-tPrimaryAndSlices = def "TPrimaryAndSlices" $ T.record [
-  "primary">: python "TPrimary",
-  "slices">: python "Slices"]
-
--- star_atom:
---     | NAME
---     | '(' target_with_star_atom ')'
---     | '(' [star_targets_tuple_seq] ')'
---     | '[' [star_targets_list_seq] ']'
-
-starAtom :: Binding
-starAtom = def "StarAtom" $ T.union [
-  "name">: python "Name",
-  "targetWithStarAtom">: python "TargetWithStarAtom",
-  "starTargetsTupleSeq">: T.maybe $ python "StarTargetsTupleSeq",
-  "starTargetsListSeq">: T.maybe $ python "StarTargetsListSeq"]
-
--- single_target:
---     | single_subscript_attribute_target
---     | NAME
---     | '(' single_target ')'
-
-singleTarget :: Binding
-singleTarget = def "SingleTarget" $ T.union [
-  "subscriptAttributeTarget">: python "SingleSubscriptAttributeTarget",
-  "name">: python "Name",
-  "parens">: python "SingleTarget"]
-
--- single_subscript_attribute_target:
---     | t_primary '.' NAME !t_lookahead
---     | t_primary '[' slices ']' !t_lookahead
-
-singleSubscriptAttributeTarget :: Binding
-singleSubscriptAttributeTarget = def "SingleSubscriptAttributeTarget" $ T.union [
-  "primaryAndName">: python "TPrimaryAndName",
-  "primaryAndSlices">: python "TPrimaryAndSlices"]
-
--- t_primary:
---     | t_primary '.' NAME &t_lookahead
---     | t_primary '[' slices ']' &t_lookahead
---     | t_primary genexp &t_lookahead
---     | t_primary '(' [arguments] ')' &t_lookahead
---     | atom &t_lookahead
-
-tPrimary :: Binding
-tPrimary = def "TPrimary" $ T.union [
-  "primaryAndName">: python "TPrimaryAndName",
-  "primaryAndSlices">: python "TPrimaryAndSlices",
-  "primaryAndGenexp">: python "TPrimaryAndGenexp",
-  "primaryAndArguments">: python "TPrimaryAndArguments",
-  "atom">: python "Atom"]
-
-tPrimaryAndGenexp :: Binding
-tPrimaryAndGenexp = def "TPrimaryAndGenexp" $ T.record [
-  "primary">: python "TPrimary",
-  "genexp">: python "Genexp"]
-
-tPrimaryAndArguments :: Binding
-tPrimaryAndArguments = def "TPrimaryAndArguments" $ T.record [
-  "primary">: python "TPrimary",
-  "arguments">: T.maybe $ python "Args"]
-
--- t_lookahead: '(' | '[' | '.'
---
--- # Targets for del statements
--- # --------------------------
---
--- del_targets: ','.del_target+ [',']
-
-delTargets :: Binding
-delTargets = def "DelTargets" $ T.wrap $ nonemptyList $ python "DelTarget"
-
--- del_target:
---     | t_primary '.' NAME !t_lookahead
---     | t_primary '[' slices ']' !t_lookahead
---     | del_t_atom
-
-delTarget :: Binding
-delTarget = def "DelTarget" $ T.union [
-  "primaryAndName">: python "TPrimaryAndName",
-  "primaryAndSlices">: python "TPrimaryAndSlices",
-  "delTAtom">: python "DelTAtom"]
-
--- del_t_atom:
---     | NAME
---     | '(' del_target ')'
---     | '(' [del_targets] ')'
---     | '[' [del_targets] ']'
-
-delTAtom :: Binding
-delTAtom = def "DelTAtom" $ T.union [
-  "name">: python "Name",
-  "target">: python "DelTarget",
-  "targets">: python "DelTargets"]
-
--- # TYPING ELEMENTS
--- # ---------------
---
--- # type_expressions allow */** but ignore them
--- type_expressions:
---     | ','.expression+ ',' '*' expression ',' '**' expression
---     | ','.expression+ ',' '*' expression
---     | ','.expression+ ',' '**' expression
---     | '*' expression ',' '**' expression
---     | '*' expression
---     | '**' expression
---     | ','.expression+
-
-typeExpression :: Binding
-typeExpression = def "TypeExpression" $ T.union [
-  "expression">: python "Expression",
-  "starredExpression">: python "Expression",
-  "doubleStarredExpression">: python "Expression"]
-
--- func_type_comment:
---     | NEWLINE TYPE_COMMENT &(NEWLINE INDENT)   # Must be followed by indented block
---     | TYPE_COMMENT
-
-funcTypeComment :: Binding
-funcTypeComment = def "FuncTypeComment" $ T.wrap $ python "TypeComment"
diff --git a/src/main/haskell/Hydra/Sources/Python/Testing.hs b/src/main/haskell/Hydra/Sources/Python/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Testing.hs
+++ /dev/null
@@ -1,226 +0,0 @@
--- | Python test code generation codec in Hydra DSL.
--- This module provides DSL versions of Python test codec functions for pytest-based generation tests.
-
-module Hydra.Sources.Python.Testing where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors     as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Python.Syntax as Py
-import qualified Hydra.Python.Environment as PyHelpers
-import qualified Hydra.Sources.Python.Syntax as PySyntax
-import qualified Hydra.Sources.Python.Environment as PyEnvironmentSource
-import qualified Hydra.Sources.Python.Coder as PyCoderSource
-import qualified Hydra.Sources.Python.Serde as PySerde
-import qualified Hydra.Sources.Python.Names as PyNames
-import qualified Hydra.Sources.Python.Utils as PyUtils
-import qualified Hydra.Sources.Test.Utils as TestUtils
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-
-ns :: Namespace
-ns = Namespace "hydra.python.testing"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [SerializationSource.ns, Formatting.ns, Names.ns, TestUtils.ns, Constants.ns],
-            moduleTypeDependencies = (PySyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Python test code generation codec for pytest-based generation tests"}
-  where
-    definitions = [
-      toDefinition buildPythonTestModule,
-      toDefinition formatPythonTestName,
-      toDefinition generatePythonTestCase,
-      toDefinition generatePythonTestFile,
-      toDefinition generatePythonTestGroupHierarchy,
-      toDefinition generateTestFileWithPythonCodec]
-
-
--- | Build complete Python test module
-buildPythonTestModule :: TTermDefinition (Module -> TestGroup -> String -> String)
-buildPythonTestModule = define "buildPythonTestModule" $
-  doc "Build the complete Python test module content" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "testBody" $ lets [
-    "groupName_">: project _TestGroup _TestGroup_name @@ var "testGroup",
-    "header">: Strings.cat (list [
-      Strings.cat2 (string "# ") (asTerm Constants.warningAutoGeneratedFile),
-      string "\n",
-      Strings.cat2 (string "# ") (var "groupName_"),
-      string "\n\n"])] $
-    Strings.cat (list [var "header", var "testBody", string "\n"])
-
-
--- | Format a test name for Python (snake_case, valid identifier)
-formatPythonTestName :: TTermDefinition (String -> String)
-formatPythonTestName = define "formatPythonTestName" $
-  doc "Format a test name for Python (snake_case with test_ prefix)" $
-  lambda "name" $
-    Strings.cat2 (string "test_")
-      (Strings.fromList (Lists.map
-        (lambda "c" $
-          Logic.ifElse (Chars.isAlphaNum (var "c"))
-            (Chars.toLower (var "c"))
-            (int32 95))  -- underscore
-        (Strings.toList (var "name"))))
-
-
--- | Generate a single test case for Python/pytest
-generatePythonTestCase :: TTermDefinition ([String] -> TestCaseWithMetadata -> Either String [String])
-generatePythonTestCase = define "generatePythonTestCase" $
-  doc "Generate a single pytest test case from a test case with metadata" $
-  lambda "groupPath" $ lambda "tcm" $ lets [
-    "name_">: project _TestCaseWithMetadata _TestCaseWithMetadata_name @@ var "tcm",
-    "tcase">: project _TestCaseWithMetadata _TestCaseWithMetadata_case @@ var "tcm"] $
-    cases _TestCase (var "tcase") Nothing [
-      _TestCase_universal>>: lambda "ucase" $ lets [
-        "actual_">: project _UniversalTestCase _UniversalTestCase_actual @@ var "ucase",
-        "expected_">: project _UniversalTestCase _UniversalTestCase_expected @@ var "ucase",
-        "fullName">: Logic.ifElse (Lists.null (var "groupPath"))
-          (var "name_")
-          (Strings.intercalate (string "__") (Lists.concat2 (var "groupPath") (list [var "name_"]))),
-        "formattedName">: asTerm formatPythonTestName @@ var "fullName"] $
-        right (list [
-              Strings.cat (list [string "def ", var "formattedName", string "():"]),
-              Strings.cat (list [string "    assert (", var "actual_", string ") == (", var "expected_", string ")"])])]
-
-
--- | Generate Python test file for a test group
-generatePythonTestFile :: TTermDefinition (Module -> TestGroup -> Graph -> Either String (String, String))
-generatePythonTestFile = define "generatePythonTestFile" $
-  doc "Generate a Python test file for a test group" $
-  lambda "testModule" $ lambda "testGroup" $ lambda "_g" $
-    generateTestFileWithPythonCodec
-      @@ var "testModule"
-      @@ var "testGroup"
-
-
--- | Generate Python test group hierarchy
-generatePythonTestGroupHierarchy :: TTermDefinition ([String] -> TestGroup -> Either String String)
-generatePythonTestGroupHierarchy = define "generatePythonTestGroupHierarchy" $
-  doc "Generate test hierarchy for Python with nested subgroups" $
-  lambda "groupPath" $ lambda "testGroup" $ lets [
-    "cases_">: project _TestGroup _TestGroup_cases @@ var "testGroup",
-    "subgroups">: project _TestGroup _TestGroup_subgroups @@ var "testGroup"] $
-    "testCaseLines" <<~ Eithers.mapList
-          (lambda "tc" $ generatePythonTestCase @@ var "groupPath" @@ var "tc")
-          (var "cases_") $
-      "subgroupBlocks" <<~ Eithers.mapList
-          (lambda "subgroup" $ lets [
-            "groupName">: project _TestGroup _TestGroup_name @@ var "subgroup",
-            "header">: Strings.cat2 (string "# ") (var "groupName")] $
-            Eithers.map
-              (lambda "content" $ Strings.cat (list [var "header", string "\n\n", var "content"]))
-              (generatePythonTestGroupHierarchy
-                @@ (Lists.concat2 (var "groupPath") (list [var "groupName"]))
-                @@ var "subgroup"))
-          (var "subgroups") $ lets [
-      "testCasesStr">: Strings.intercalate (string "\n\n") (Lists.concat (var "testCaseLines")),
-      "subgroupsStr">: Strings.intercalate (string "\n\n") (var "subgroupBlocks")] $
-      right (Strings.cat (list [
-          var "testCasesStr",
-          Logic.ifElse (Logic.or (Equality.equal (var "testCasesStr") (string ""))
-                                  (Equality.equal (var "subgroupsStr") (string "")))
-            (string "")
-            (string "\n\n"),
-          var "subgroupsStr"]))
-
-
--- | Generate test file using Python codec
-generateTestFileWithPythonCodec :: TTermDefinition (Module -> TestGroup -> Either String (String, String))
-generateTestFileWithPythonCodec = define "generateTestFileWithPythonCodec" $
-  doc "Generate a complete test file for Python" $
-  lambda "testModule" $ lambda "testGroup" $
-    Eithers.map
-      (lambda "testBody" $ lets [
-        "testModuleContent">: buildPythonTestModule @@ var "testModule" @@ var "testGroup" @@ var "testBody",
-        "ns_">: Packaging.moduleNamespace (var "testModule"),
-        "parts">: Strings.splitOn (string ".") (unwrap _Namespace @@ var "ns_"),
-        "dirParts">: Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeInit (var "parts")),
-        "fileName">: Strings.cat (list [string "test_", Maybes.fromMaybe (string "") (Lists.maybeLast (var "parts")), string ".py"]),
-        "filePath">: Strings.cat (list [Strings.intercalate (string "/") (var "dirParts"), string "/", var "fileName"])] $
-        Phantoms.pair (var "filePath") (var "testModuleContent"))
-      (generatePythonTestGroupHierarchy @@ list ([] :: [TTerm String]) @@ var "testGroup")
diff --git a/src/main/haskell/Hydra/Sources/Python/Utils.hs b/src/main/haskell/Hydra/Sources/Python/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Python/Utils.hs
+++ /dev/null
@@ -1,880 +0,0 @@
--- | Python utilities for constructing Python syntax trees.
--- Provides functions for building common Python AST patterns.
-
-module Hydra.Sources.Python.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Analysis      as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Python.Syntax as Py
-import qualified Hydra.Python.Environment as PyHelpers
-import qualified Hydra.Sources.Python.Syntax as PySyntax
-import qualified Hydra.Sources.Python.Environment as PyEnvironmentSource
-import qualified Hydra.Sources.Python.Serde as PySerde
-import qualified Hydra.Sources.Python.Names as PyNames
-import qualified Hydra.Dsl.Python.Helpers as PyDsl
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.python.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [PyNames.ns, PySerde.ns, Serialization.ns, Analysis.ns],
-            moduleTypeDependencies = (PyEnvironmentSource.ns:PySyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Python utilities for constructing Python syntax trees"}
-  where
-    definitions = [
-      toDefinition annotatedExpression,
-      toDefinition annotatedStatement,
-      toDefinition assignment,
-      toDefinition assignmentStatement,
-      toDefinition castTo,
-      toDefinition commentStatement,
-      toDefinition decodePyComparisonToPyAwaitPrimary,
-      toDefinition decodePyConjunctionToPyPrimary,
-      toDefinition decodePyExpressionToPyPrimary,
-      toDefinition decodePyInversionToPyPrimary,
-      toDefinition decodePyPowerToPyPrimary,
-      toDefinition dottedAssignmentStatement,
-      toDefinition doubleQuotedString,
-      toDefinition findNamespaces,
-      toDefinition functionCall,
-      toDefinition getItemParams,
-      toDefinition indentedBlock,
-      toDefinition nameAndParams,
-      toDefinition newtypeStatement,
-      toDefinition orExpression,
-      toDefinition primaryAndParams,
-      toDefinition primaryWithExpressionSlices,
-      toDefinition primaryWithRhs,
-      toDefinition primaryWithSlices,
-      toDefinition projectFromExpression,
-      toDefinition pyAssignmentToPyStatement,
-      toDefinition pyAtomToPyExpression,
-      toDefinition pyBitwiseOrToPyConjunction,
-      toDefinition pyBitwiseOrToPyExpression,
-      toDefinition pyClassDefinitionToPyStatement,
-      toDefinition pyClosedPatternToPyPatterns,
-      toDefinition pyConjunctionToPyExpression,
-      toDefinition pyExpressionToBitwiseOr,
-      toDefinition pyExpressionToDisjunction,
-      toDefinition pyExpressionToPyAnnotatedRhs,
-      toDefinition pyExpressionToPyPrimary,
-      toDefinition pyExpressionToPySimpleStatement,
-      toDefinition pyExpressionToPySlice,
-      toDefinition pyExpressionToPyStarNamedExpression,
-      toDefinition pyExpressionToPyStatement,
-      toDefinition pyExpressionsToPyArgs,
-      toDefinition pyList,
-      toDefinition pyNameToPyExpression,
-      toDefinition pyNameToPyNamedExpression,
-      toDefinition pyNameToPyPrimary,
-      toDefinition pyNameToPyStarTarget,
-      toDefinition pyNameToPyTypeParameter,
-      toDefinition pyNone,
-      toDefinition pyPrimaryToPyBitwiseOr,
-      toDefinition pyPrimaryToPyBitwiseXor,
-      toDefinition pyPrimaryToPyConjunction,
-      toDefinition pyPrimaryToPyExpression,
-      toDefinition pyPrimaryToPySlice,
-      toDefinition pySimpleStatementToPyStatement,
-      toDefinition raiseAssertionError,
-      toDefinition raiseTypeError,
-      toDefinition returnSingle,
-      toDefinition selfOnlyParams,
-      toDefinition selfOtherParams,
-      toDefinition singleQuotedString,
-      toDefinition stringToPyExpression,
-      toDefinition targetPythonVersion,
-      toDefinition tripleQuotedString,
-      toDefinition typeAliasStatement,
-      toDefinition typeAliasStatement310,
-      toDefinition unionTypeClassStatements310,
-      toDefinition unitVariantMethods]
-
--- | Annotate an expression with an optional comment using Annotated[]
-annotatedExpression :: TTermDefinition (Maybe String -> Py.Expression -> Py.Expression)
-annotatedExpression = def "annotatedExpression" $
-  doc "Annotate an expression with an optional comment using Annotated[]" $
-  "mcomment" ~> "expr" ~>
-    Maybes.maybe (var "expr")
-      ("c" ~>
-        pyPrimaryToPyExpression @@
-          (primaryWithExpressionSlices
-            @@ (pyNameToPyPrimary @@ (PyDsl.name $ string "Annotated"))
-            @@ list [var "expr", doubleQuotedString @@ var "c"]))
-      (var "mcomment")
-
--- | Annotate a statement with an optional comment
-annotatedStatement :: TTermDefinition (Maybe String -> Py.Statement -> Py.Statement)
-annotatedStatement = def "annotatedStatement" $
-  doc "Annotate a statement with an optional comment" $
-  lambdas ["mcomment", "stmt"] $
-    Maybes.maybe (var "stmt")
-      (lambda "c" $ PyDsl.statementAnnotated $ PyDsl.annotatedStatement (var "c") (var "stmt"))
-      (var "mcomment")
-
--- | Create an assignment statement from name and annotated rhs
-assignment :: TTermDefinition (Py.Name -> Py.AnnotatedRhs -> Py.Statement)
-assignment = def "assignment" $
-  doc "Create an assignment statement from name and annotated rhs" $
-  "name" ~> "rhs" ~>
-    pyAssignmentToPyStatement @@
-      (PyDsl.assignmentUntyped $
-        PyDsl.untypedAssignmentSimple
-          (list [pyNameToPyStarTarget @@ var "name"])
-          (var "rhs"))
-
--- | Create an assignment statement from name and expression
-assignmentStatement :: TTermDefinition (Py.Name -> Py.Expression -> Py.Statement)
-assignmentStatement = def "assignmentStatement" $
-  doc "Create an assignment statement from name and expression" $
-  lambdas ["name", "expr"] $
-    assignment @@ var "name" @@ (pyExpressionToPyAnnotatedRhs @@ var "expr")
-
--- | Create a cast expression
-castTo :: TTermDefinition (Py.Expression -> Py.Expression -> Py.Expression)
-castTo = def "castTo" $
-  doc "Create a cast expression: cast(type, expr)" $
-  "pytype" ~> "pyexpr" ~>
-    functionCall @@ (pyNameToPyPrimary @@ (PyDsl.name $ string "cast")) @@ list [var "pytype", var "pyexpr"]
-
--- | Create a comment statement (triple-quoted string)
-commentStatement :: TTermDefinition (String -> Py.Statement)
-commentStatement = def "commentStatement" $
-  doc "Create a comment statement (triple-quoted string)" $
-  lambda "s" $
-    pyExpressionToPyStatement @@ (tripleQuotedString @@ var "s")
-
--- | Decode a Comparison to a Primary if possible
-decodePyComparisonToPyAwaitPrimary :: TTermDefinition (Py.Comparison -> Maybe Py.Primary)
-decodePyComparisonToPyAwaitPrimary = def "decodePyComparisonToPyAwaitPrimary" $
-  doc "Decode a Comparison to a Primary if possible" $
-  lambda "c" $ lets [
-    "rhs">: PyDsl.comparisonRhs $ var "c",
-    "lhs">: PyDsl.comparisonLhs $ var "c",
-    "orLhs">: PyDsl.bitwiseOrLhs $ var "lhs",
-    "orRhs">: PyDsl.bitwiseOrRhs $ var "lhs",
-    "xorLhs">: PyDsl.bitwiseXorLhs $ var "orRhs",
-    "xorRhs">: PyDsl.bitwiseXorRhs $ var "orRhs",
-    "andLhs">: PyDsl.bitwiseAndLhs $ var "xorRhs",
-    "andRhs">: PyDsl.bitwiseAndRhs $ var "xorRhs",
-    "shiftLhs">: project Py._ShiftExpression Py._ShiftExpression_lhs @@ var "andRhs",
-    "shiftRhs">: PyDsl.shiftExpressionRhs $ var "andRhs",
-    "sumLhs">: project Py._Sum Py._Sum_lhs @@ var "shiftRhs",
-    "sumRhs">: PyDsl.sumRhs $ var "shiftRhs",
-    "termLhs">: project Py._Term Py._Term_lhs @@ var "sumRhs",
-    "termRhs">: PyDsl.termRhs $ var "sumRhs"] $
-    -- Check if any intermediate optional fields are set (which would indicate non-simple structure)
-    Logic.ifElse (Logic.not $ Lists.null $ var "rhs") nothing $
-    Logic.ifElse (Maybes.isJust $ var "orLhs") nothing $
-    Logic.ifElse (Maybes.isJust $ var "xorLhs") nothing $
-    Logic.ifElse (Maybes.isJust $ var "andLhs") nothing $
-    Logic.ifElse (Maybes.isJust $ var "shiftLhs") nothing $
-    Logic.ifElse (Maybes.isJust $ var "sumLhs") nothing $
-    Logic.ifElse (Maybes.isJust $ var "termLhs") nothing $
-    -- Now match on termRhs to see if it's a simple factor
-    (match Py._Factor (Just nothing) [
-      Py._Factor_simple>>: lambda "power" $ decodePyPowerToPyPrimary @@ var "power"]
-    @@ var "termRhs")
-
--- | Decode a Conjunction to a Primary if possible
-decodePyConjunctionToPyPrimary :: TTermDefinition (Py.Conjunction -> Maybe Py.Primary)
-decodePyConjunctionToPyPrimary = def "decodePyConjunctionToPyPrimary" $
-  doc "Decode a Conjunction to a Primary if possible" $
-  lambda "c" $ lets [
-    "inversions">: PyDsl.unConjunction $ var "c"] $
-    Logic.ifElse (Equality.equal (Lists.length $ var "inversions") (int32 1))
-      (Maybes.bind (Lists.maybeHead $ var "inversions") (lambda "i" $ decodePyInversionToPyPrimary @@ var "i"))
-      nothing
-
--- | Decode an Expression to a Primary if possible
-decodePyExpressionToPyPrimary :: TTermDefinition (Py.Expression -> Maybe Py.Primary)
-decodePyExpressionToPyPrimary = def "decodePyExpressionToPyPrimary" $
-  doc "Decode an Expression to a Primary if possible" $
-  lambda "e" $
-    (match Py._Expression (Just nothing) [
-      Py._Expression_simple>>: lambda "disj" $ lets [
-        "conjunctions">: PyDsl.unDisjunction $ var "disj"] $
-        Logic.ifElse (Equality.equal (Lists.length $ var "conjunctions") (int32 1))
-          (Maybes.bind (Lists.maybeHead $ var "conjunctions") (lambda "c2" $ decodePyConjunctionToPyPrimary @@ var "c2"))
-          nothing]
-    @@ var "e")
-
--- | Decode an Inversion to a Primary if possible
-decodePyInversionToPyPrimary :: TTermDefinition (Py.Inversion -> Maybe Py.Primary)
-decodePyInversionToPyPrimary = def "decodePyInversionToPyPrimary" $
-  doc "Decode an Inversion to a Primary if possible" $
-  lambda "i" $
-    (match Py._Inversion (Just nothing) [
-      Py._Inversion_simple>>: lambda "comparison" $
-        decodePyComparisonToPyAwaitPrimary @@ var "comparison"]
-    @@ var "i")
-
--- | Decode a Power to a Primary if possible
-decodePyPowerToPyPrimary :: TTermDefinition (Py.Power -> Maybe Py.Primary)
-decodePyPowerToPyPrimary = def "decodePyPowerToPyPrimary" $
-  doc "Decode a Power to a Primary if possible" $
-  lambda "p" $ lets [
-    "lhs">: PyDsl.powerLhs $ var "p",
-    "await">: PyDsl.awaitPrimaryAwait $ var "lhs",
-    "prim">: PyDsl.awaitPrimaryPrimary $ var "lhs"] $
-    Logic.ifElse (var "await")
-      nothing
-      (just $ var "prim")
-
--- | Create a dotted assignment statement: obj.attr = expr
-dottedAssignmentStatement :: TTermDefinition (Py.Name -> Py.Name -> Py.Expression -> Py.Statement)
-dottedAssignmentStatement = def "dottedAssignmentStatement" $
-  doc "Create a dotted assignment statement: obj.attr = expr" $
-  lambdas ["obj", "attr", "expr"] $
-    "target" <~ (PyDsl.starTargetUnstarred $
-      inject Py._TargetWithStarAtom Py._TargetWithStarAtom_project $
-        record Py._TPrimaryAndName [
-          Py._TPrimaryAndName_primary>>: inject Py._TPrimary Py._TPrimary_atom $
-            inject Py._Atom Py._Atom_name $ var "obj",
-          Py._TPrimaryAndName_name>>: var "attr"]) $
-    pyAssignmentToPyStatement @@
-      (PyDsl.assignmentUntyped $
-        PyDsl.untypedAssignmentSimple
-          (list [var "target"])
-          (pyExpressionToPyAnnotatedRhs @@ var "expr"))
-
--- | Create a double-quoted string expression
-doubleQuotedString :: TTermDefinition (String -> Py.Expression)
-doubleQuotedString = def "doubleQuotedString" $
-  doc "Create a double-quoted string expression" $
-  lambda "s" $
-    stringToPyExpression @@ PyDsl.quoteStyleDouble @@ var "s"
-
--- | Find all namespaces referenced by a list of definitions, plus the core namespace
-findNamespaces :: TTermDefinition (Namespace -> [Definition] -> Namespaces Py.DottedName)
-findNamespaces = def "findNamespaces" $
-  doc "Find all namespaces referenced by a list of definitions, plus the core namespace" $
-  lambdas ["focusNs", "defs"] $ lets [
-    "coreNs">: Packaging.namespace $ string "hydra.core",
-    "namespaces">: Analysis.namespacesForDefinitions @@ PyNames.encodeNamespace @@ var "focusNs" @@ var "defs"] $
-    Logic.ifElse (Equality.equal
-      (Packaging.unNamespace $ Pairs.first $ Packaging.namespacesFocus $ var "namespaces")
-      (Packaging.unNamespace $ var "coreNs"))
-      (var "namespaces")
-      (Packaging.namespaces
-        (Packaging.namespacesFocus $ var "namespaces")
-        (Maps.insert (var "coreNs")
-          (PyNames.encodeNamespace @@ var "coreNs")
-          (Packaging.namespacesMapping $ var "namespaces")))
-
--- | Create a function call expression
-functionCall :: TTermDefinition (Py.Primary -> [Py.Expression] -> Py.Expression)
-functionCall = def "functionCall" $
-  doc "Create a function call expression" $
-  lambdas ["func", "args"] $
-    pyPrimaryToPyExpression @@
-      (primaryWithRhs @@ var "func" @@
-        (PyDsl.primaryRhsCall $ pyExpressionsToPyArgs @@ var "args"))
-
--- | Generate __getitem__ method parameters for metaclass
-getItemParams :: TTermDefinition Py.Parameters
-getItemParams = def "getItemParams" $
-  PyDsl.parametersParamNoDefault $
-    PyDsl.paramNoDefaultParametersSimple $ list [
-      PyDsl.paramNoDefaultSimple $ PyDsl.paramSimple $ PyDsl.name $ string "cls",
-      PyDsl.paramNoDefaultSimple $ PyDsl.paramSimple $ PyDsl.name $ string "item"]
-
--- | Create an indented block with optional comment
-indentedBlock :: TTermDefinition (Maybe String -> [[Py.Statement]] -> Py.Block)
-indentedBlock = def "indentedBlock" $
-  doc "Create an indented block with optional comment" $
-  lambdas ["mcomment", "stmts"] $ lets [
-    "commentGroup">: Maybes.maybe
-      (list ([] :: [TTerm Py.Statement]))
-      (lambda "s" $ list [commentStatement @@ var "s"])
-      (var "mcomment"),
-    "groups">: Lists.filter (lambda "g" $ Logic.not $ Lists.null $ var "g")
-      (Lists.cons (var "commentGroup") (var "stmts"))] $
-    Logic.ifElse (Lists.null $ var "groups")
-      (PyDsl.blockIndented $ list [list [
-        PyDsl.statementSimple $ list [
-          pyExpressionToPySimpleStatement @@ (pyAtomToPyExpression @@ PyDsl.atomEllipsis)]]])
-      (PyDsl.blockIndented $ var "groups")
-
--- | Create a name with parameters
-nameAndParams :: TTermDefinition (Py.Name -> [Py.Expression] -> Py.Expression)
-nameAndParams = def "nameAndParams" $
-  doc "Create a name with parameters" $
-  lambdas ["pyName", "params"] $
-    primaryAndParams @@ (pyNameToPyPrimary @@ var "pyName") @@ var "params"
-
--- | Create a NewType statement
-newtypeStatement :: TTermDefinition (Py.Name -> Maybe String -> Py.Expression -> Py.Statement)
-newtypeStatement = def "newtypeStatement" $
-  doc "Create a NewType statement" $
-  lambdas ["name", "mcomment", "expr"] $
-    annotatedStatement @@ var "mcomment" @@
-      (assignmentStatement @@ var "name" @@
-        (functionCall @@ (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "NewType")
-          @@ list [doubleQuotedString @@ (PyDsl.unName $ var "name"), var "expr"]))
-
--- | Build an or-expression from multiple primaries
-orExpression :: TTermDefinition ([Py.Primary] -> Py.Expression)
-orExpression = def "orExpression" $
-  doc "Build an or-expression from multiple primaries" $
-  "prims" ~>
-    "build" <~ ("prev" ~> "ps" ~>
-      Maybes.maybe
-        -- Unreachable fallback: callers ensure 'ps' is non-empty on entry.
-        (PyDsl.bitwiseOr (var "prev") (pyPrimaryToPyBitwiseXor @@ (PyDsl.primarySimple $ PyDsl.atomEllipsis)))
-        (lambda "p" $
-          Logic.ifElse (Lists.null $ Pairs.second (var "p"))
-            (PyDsl.bitwiseOr (var "prev") (pyPrimaryToPyBitwiseXor @@ Pairs.first (var "p")))
-            (var "build"
-              @@ (just $ PyDsl.bitwiseOr (var "prev") (pyPrimaryToPyBitwiseXor @@ Pairs.first (var "p")))
-              @@ Pairs.second (var "p")))
-        (Lists.uncons $ var "ps")) $
-    pyBitwiseOrToPyExpression @@ (var "build" @@ nothing @@ var "prims")
-
--- | Create a primary with parameters (subscript)
-primaryAndParams :: TTermDefinition (Py.Primary -> [Py.Expression] -> Py.Expression)
-primaryAndParams = def "primaryAndParams" $
-  doc "Create a primary with parameters (subscript)" $
-  lambdas ["prim", "params"] $
-    pyPrimaryToPyExpression @@ (primaryWithExpressionSlices @@ var "prim" @@ var "params")
-
--- | Create a Primary with expression slices
-primaryWithExpressionSlices :: TTermDefinition (Py.Primary -> [Py.Expression] -> Py.Primary)
-primaryWithExpressionSlices = def "primaryWithExpressionSlices" $
-  doc "Create a Primary with expression slices" $
-  lambdas ["prim", "exprs"] $
-    Maybes.fromMaybe (var "prim") (Maybes.map
-      (lambda "p" $
-        primaryWithSlices @@ var "prim"
-          @@ (pyExpressionToPySlice @@ Pairs.first (var "p"))
-          @@ (Lists.map
-                (lambda "e" $ PyDsl.sliceOrStarredExpressionSlice $ pyExpressionToPySlice @@ var "e")
-                (Pairs.second (var "p"))))
-      (Lists.uncons $ var "exprs"))
-
--- | Combine a Primary with a PrimaryRhs
-primaryWithRhs :: TTermDefinition (Py.Primary -> Py.PrimaryRhs -> Py.Primary)
-primaryWithRhs = def "primaryWithRhs" $
-  doc "Combine a Primary with a PrimaryRhs" $
-  "prim" ~> "rhs" ~>
-    PyDsl.primaryCompound $ PyDsl.primaryWithRhs (var "prim") (var "rhs")
-
--- | Create a Primary with slices
-primaryWithSlices :: TTermDefinition (Py.Primary -> Py.Slice -> [Py.SliceOrStarredExpression] -> Py.Primary)
-primaryWithSlices = def "primaryWithSlices" $
-  doc "Create a Primary with slices" $
-  "prim" ~> "first" ~> "rest" ~>
-    primaryWithRhs @@ var "prim" @@
-      (PyDsl.primaryRhsSlices $
-        PyDsl.slices (var "first") (var "rest"))
-
--- | Project a field from an expression
-projectFromExpression :: TTermDefinition (Py.Expression -> Py.Name -> Py.Expression)
-projectFromExpression = def "projectFromExpression" $
-  doc "Project a field from an expression" $
-  "exp" ~> "name" ~>
-    "prim" <~ (PyDsl.primarySimple $ PyDsl.atomGroup $
-        PyDsl.groupExpression $ PyDsl.namedExpressionSimple $ var "exp") $
-    pyPrimaryToPyExpression @@
-      (PyDsl.primaryCompound $ PyDsl.primaryWithRhs (var "prim") (PyDsl.primaryRhsProject $ var "name"))
-
--- | Convert an Assignment to a Statement
-pyAssignmentToPyStatement :: TTermDefinition (Py.Assignment -> Py.Statement)
-pyAssignmentToPyStatement = def "pyAssignmentToPyStatement" $
-  doc "Convert an Assignment to a Statement" $
-  lambda "a" $
-    pySimpleStatementToPyStatement @@ (PyDsl.simpleStatementAssignment $ var "a")
-
--- | Convert an Atom to an Expression
-pyAtomToPyExpression :: TTermDefinition (Py.Atom -> Py.Expression)
-pyAtomToPyExpression = def "pyAtomToPyExpression" $
-  doc "Convert an Atom to an Expression" $
-  lambda "atom" $
-    pyPrimaryToPyExpression @@ (PyDsl.primarySimple $ var "atom")
-
--- | Convert a BitwiseOr to a Conjunction
-pyBitwiseOrToPyConjunction :: TTermDefinition (Py.BitwiseOr -> Py.Conjunction)
-pyBitwiseOrToPyConjunction = def "pyBitwiseOrToPyConjunction" $
-  doc "Convert a BitwiseOr to a Conjunction" $
-  lambda "bor" $
-    PyDsl.conjunction $ list [
-      PyDsl.inversionSimple $
-        PyDsl.comparison (var "bor") (list ([] :: [TTerm Py.CompareOpBitwiseOrPair]))]
-
--- | Convert a BitwiseOr to an Expression
-pyBitwiseOrToPyExpression :: TTermDefinition (Py.BitwiseOr -> Py.Expression)
-pyBitwiseOrToPyExpression = def "pyBitwiseOrToPyExpression" $
-  doc "Convert a BitwiseOr to an Expression" $
-  lambda "bor" $
-    pyConjunctionToPyExpression @@ (pyBitwiseOrToPyConjunction @@ var "bor")
-
--- | Convert a ClassDefinition to a Statement
-pyClassDefinitionToPyStatement :: TTermDefinition (Py.ClassDefinition -> Py.Statement)
-pyClassDefinitionToPyStatement = def "pyClassDefinitionToPyStatement" $
-  doc "Convert a ClassDefinition to a Statement" $
-  lambda "cd" $
-    PyDsl.statementCompound $ PyDsl.compoundStatementClassDef $ var "cd"
-
--- | Convert a ClosedPattern to Patterns
-pyClosedPatternToPyPatterns :: TTermDefinition (Py.ClosedPattern -> Py.Patterns)
-pyClosedPatternToPyPatterns = def "pyClosedPatternToPyPatterns" $
-  doc "Convert a ClosedPattern to Patterns" $
-  "p" ~>
-    PyDsl.patternsPattern $ PyDsl.patternOr $ PyDsl.orPattern $ list [var "p"]
-
--- | Convert a Conjunction to an Expression
-pyConjunctionToPyExpression :: TTermDefinition (Py.Conjunction -> Py.Expression)
-pyConjunctionToPyExpression = def "pyConjunctionToPyExpression" $
-  doc "Convert a Conjunction to an Expression" $
-  lambda "conj" $
-    PyDsl.expressionSimple $ PyDsl.disjunction $ list [var "conj"]
-
--- | Convert an Expression to a BitwiseOr, wrapping in parens if needed
-pyExpressionToBitwiseOr :: TTermDefinition (Py.Expression -> Py.BitwiseOr)
-pyExpressionToBitwiseOr = def "pyExpressionToBitwiseOr" $
-  doc "Convert an Expression to a BitwiseOr, wrapping in parens if needed" $
-  lambda "e" $
-    PyDsl.pyPrimaryToPyBitwiseOr
-      (PyDsl.primarySimple $ PyDsl.atomGroup $ PyDsl.groupExpression $
-        PyDsl.namedExpressionSimple $ var "e")
-
--- | Convert an Expression to a Disjunction.
---   For ExpressionSimple(disj), extracts the disjunction.
---   For other expressions (Conditional, Lambda), wraps in parentheses.
-pyExpressionToDisjunction :: TTermDefinition (Py.Expression -> Py.Disjunction)
-pyExpressionToDisjunction = def "pyExpressionToDisjunction" $
-  doc "Convert an Expression to a Disjunction, wrapping in parens if needed" $
-  lambda "e" $
-    cases Py._Expression (var "e")
-      -- Default for non-simple expressions: wrap in parens to get a primary, then to disjunction
-      (Just $ PyDsl.disjunction $ list [
-        pyPrimaryToPyConjunction @@
-          (PyDsl.primarySimple $ PyDsl.atomGroup $ PyDsl.groupExpression $
-            PyDsl.namedExpressionSimple $ var "e")]) [
-      -- Simple expressions already contain a disjunction
-      Py._Expression_simple>>: "disj" ~> var "disj"]
-
--- | Convert an Expression to an AnnotatedRhs
-pyExpressionToPyAnnotatedRhs :: TTermDefinition (Py.Expression -> Py.AnnotatedRhs)
-pyExpressionToPyAnnotatedRhs = def "pyExpressionToPyAnnotatedRhs" $
-  doc "Convert an Expression to an AnnotatedRhs" $
-  lambda "expr" $
-    PyDsl.annotatedRhsStar $ list [PyDsl.starExpressionSimple $ var "expr"]
-
--- | Extracts the primary from an expression, or wraps it in parentheses if the expression does not contain a primary
-pyExpressionToPyPrimary :: TTermDefinition (Py.Expression -> Py.Primary)
-pyExpressionToPyPrimary = def "pyExpressionToPyPrimary" $
-  doc "Extracts the primary from an expression, or wraps it in parentheses if the expression does not contain a primary" $
-  lambda "e" $
-    Maybes.maybe
-      (PyDsl.primarySimple $ PyDsl.atomGroup $ PyDsl.groupExpression $
-        PyDsl.namedExpressionSimple $ var "e")
-      (lambda "prim" $ var "prim")
-      (decodePyExpressionToPyPrimary @@ var "e")
-
--- | Convert an Expression to a SimpleStatement
-pyExpressionToPySimpleStatement :: TTermDefinition (Py.Expression -> Py.SimpleStatement)
-pyExpressionToPySimpleStatement = def "pyExpressionToPySimpleStatement" $
-  doc "Convert an Expression to a SimpleStatement (as star expressions)" $
-  lambda "expr" $
-    PyDsl.simpleStatementStarExpressions $ list [PyDsl.starExpressionSimple $ var "expr"]
-
--- | Convert an Expression to a Slice
-pyExpressionToPySlice :: TTermDefinition (Py.Expression -> Py.Slice)
-pyExpressionToPySlice = def "pyExpressionToPySlice" $
-  doc "Convert an Expression to a Slice" $
-  lambda "expr" $
-    PyDsl.sliceNamed $ PyDsl.namedExpressionSimple $ var "expr"
-
--- | Convert an Expression to a StarNamedExpression
-pyExpressionToPyStarNamedExpression :: TTermDefinition (Py.Expression -> Py.StarNamedExpression)
-pyExpressionToPyStarNamedExpression = def "pyExpressionToPyStarNamedExpression" $
-  doc "Convert an Expression to a StarNamedExpression" $
-  lambda "expr" $
-    PyDsl.starNamedExpressionSimple $ PyDsl.namedExpressionSimple $ var "expr"
-
--- | Convert an Expression to a Statement
-pyExpressionToPyStatement :: TTermDefinition (Py.Expression -> Py.Statement)
-pyExpressionToPyStatement = def "pyExpressionToPyStatement" $
-  doc "Convert an Expression to a Statement" $
-  lambda "expr" $
-    pySimpleStatementToPyStatement @@ (pyExpressionToPySimpleStatement @@ var "expr")
-
--- | Convert a list of Expressions to Args
-pyExpressionsToPyArgs :: TTermDefinition ([Py.Expression] -> Py.Args)
-pyExpressionsToPyArgs = def "pyExpressionsToPyArgs" $
-  doc "Convert a list of Expressions to Args" $
-  "exprs" ~>
-    PyDsl.argsPositionalOnly $
-      Lists.map ("e" ~> PyDsl.posArgExpression $ var "e") (var "exprs")
-
--- | Create a Python list from expressions
-pyList :: TTermDefinition ([Py.Expression] -> Py.List)
-pyList = def "pyList" $
-  doc "Create a Python list from expressions" $
-  "exprs" ~>
-    PyDsl.list_ $ Lists.map pyExpressionToPyStarNamedExpression (var "exprs")
-
--- | Convert a Name to an Expression
-pyNameToPyExpression :: TTermDefinition (Py.Name -> Py.Expression)
-pyNameToPyExpression = def "pyNameToPyExpression" $
-  doc "Convert a Name to an Expression" $
-  lambda "name" $
-    pyPrimaryToPyExpression @@ (pyNameToPyPrimary @@ var "name")
-
--- | Convert a Name to a NamedExpression
-pyNameToPyNamedExpression :: TTermDefinition (Py.Name -> Py.NamedExpression)
-pyNameToPyNamedExpression = def "pyNameToPyNamedExpression" $
-  doc "Convert a Name to a NamedExpression" $
-  lambda "name" $
-    PyDsl.namedExpressionSimple $ pyNameToPyExpression @@ var "name"
-
--- | Convert a Name to a Primary (simple atom)
-pyNameToPyPrimary :: TTermDefinition (Py.Name -> Py.Primary)
-pyNameToPyPrimary = def "pyNameToPyPrimary" $
-  doc "Convert a Name to a Primary (simple atom)" $
-  lambda "name" $ PyDsl.primarySimple $ PyDsl.atomName $ var "name"
-
--- | Convert a Name to a StarTarget
-pyNameToPyStarTarget :: TTermDefinition (Py.Name -> Py.StarTarget)
-pyNameToPyStarTarget = def "pyNameToPyStarTarget" $
-  doc "Convert a Name to a StarTarget" $
-  lambda "name" $
-    PyDsl.starTargetUnstarred $ PyDsl.targetWithStarAtomAtom $ PyDsl.starAtomName $ var "name"
-
--- | Convert a Name to a TypeParameter
-pyNameToPyTypeParameter :: TTermDefinition (Py.Name -> Py.TypeParameter)
-pyNameToPyTypeParameter = def "pyNameToPyTypeParameter" $
-  doc "Convert a Name to a TypeParameter" $
-  "name" ~>
-    PyDsl.typeParameterSimple $ PyDsl.simpleTypeParameterSimple $ var "name"
-
--- | The Python None value as a Name
-pyNone :: TTermDefinition Py.Name
-pyNone = def "pyNone" $
-  doc "The Python None value as a Name" $
-  PyDsl.name $ string "None"
-
--- | Convert a Primary to a BitwiseOr
-pyPrimaryToPyBitwiseOr :: TTermDefinition (Py.Primary -> Py.BitwiseOr)
-pyPrimaryToPyBitwiseOr = def "pyPrimaryToPyBitwiseOr" $
-  doc "Convert a Primary to a BitwiseOr" $
-  "prim" ~> PyDsl.pyPrimaryToPyBitwiseOr (var "prim")
-
--- | Convert a Primary to a BitwiseXor
-pyPrimaryToPyBitwiseXor :: TTermDefinition (Py.Primary -> Py.BitwiseXor)
-pyPrimaryToPyBitwiseXor = def "pyPrimaryToPyBitwiseXor" $
-  doc "Convert a Primary to a BitwiseXor" $
-  "prim" ~> PyDsl.pyPrimaryToPyBitwiseXor (var "prim")
-
--- | Convert a Primary to a Conjunction
-pyPrimaryToPyConjunction :: TTermDefinition (Py.Primary -> Py.Conjunction)
-pyPrimaryToPyConjunction = def "pyPrimaryToPyConjunction" $
-  doc "Convert a Primary to a Conjunction" $
-  lambda "prim" $
-    pyBitwiseOrToPyConjunction @@ (pyPrimaryToPyBitwiseOr @@ var "prim")
-
--- | Convert a Primary to an Expression
-pyPrimaryToPyExpression :: TTermDefinition (Py.Primary -> Py.Expression)
-pyPrimaryToPyExpression = def "pyPrimaryToPyExpression" $
-  doc "Convert a Primary to an Expression" $
-  lambda "prim" $
-    pyConjunctionToPyExpression @@ (pyPrimaryToPyConjunction @@ var "prim")
-
--- | Convert a Primary to a Slice
-pyPrimaryToPySlice :: TTermDefinition (Py.Primary -> Py.Slice)
-pyPrimaryToPySlice = def "pyPrimaryToPySlice" $
-  doc "Convert a Primary to a Slice" $
-  lambda "prim" $
-    pyExpressionToPySlice @@ (pyPrimaryToPyExpression @@ var "prim")
-
--- | Convert a SimpleStatement to a Statement
-pySimpleStatementToPyStatement :: TTermDefinition (Py.SimpleStatement -> Py.Statement)
-pySimpleStatementToPyStatement = def "pySimpleStatementToPyStatement" $
-  doc "Convert a SimpleStatement to a Statement" $
-  lambda "s" $
-    PyDsl.statementSimple $ list [var "s"]
-
--- | Create a raise AssertionError statement
-raiseAssertionError :: TTermDefinition (String -> Py.Statement)
-raiseAssertionError = def "raiseAssertionError" $
-  doc "Create a raise AssertionError statement" $
-  "msg" ~>
-    pySimpleStatementToPyStatement @@
-      (PyDsl.simpleStatementRaise $ PyDsl.raiseStatement $ just $
-        PyDsl.raiseExpression
-          (functionCall @@ (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "AssertionError")
-            @@ list [doubleQuotedString @@ var "msg"])
-          nothing)
-
--- | Create a raise TypeError statement
-raiseTypeError :: TTermDefinition (String -> Py.Statement)
-raiseTypeError = def "raiseTypeError" $
-  doc "Create a raise TypeError statement" $
-  "msg" ~>
-    pySimpleStatementToPyStatement @@
-      (PyDsl.simpleStatementRaise $ PyDsl.raiseStatement $ just $
-        PyDsl.raiseExpression
-          (functionCall @@ (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "TypeError")
-            @@ list [doubleQuotedString @@ var "msg"])
-          nothing)
-
--- | Create a return statement with a single expression
-returnSingle :: TTermDefinition (Py.Expression -> Py.Statement)
-returnSingle = def "returnSingle" $
-  doc "Create a return statement with a single expression" $
-  "expr" ~>
-    pySimpleStatementToPyStatement @@
-      (PyDsl.simpleStatementReturn $
-        PyDsl.returnStatement $ list [PyDsl.starExpressionSimple $ var "expr"])
-
--- | Generate __eq__ and __hash__ method parameters
-selfOnlyParams :: TTermDefinition Py.Parameters
-selfOnlyParams = def "selfOnlyParams" $
-  PyDsl.parametersParamNoDefault $
-    PyDsl.paramNoDefaultParametersSimple $ list [
-      PyDsl.paramNoDefaultSimple $ PyDsl.paramSimple $ PyDsl.name $ string "self"]
-
--- | Generate self and other parameters
-selfOtherParams :: TTermDefinition Py.Parameters
-selfOtherParams = def "selfOtherParams" $
-  PyDsl.parametersParamNoDefault $
-    PyDsl.paramNoDefaultParametersSimple $ list [
-      PyDsl.paramNoDefaultSimple $ PyDsl.paramSimple $ PyDsl.name $ string "self",
-      PyDsl.paramNoDefaultSimple $ PyDsl.paramSimple $ PyDsl.name $ string "other"]
-
--- | Create a single-quoted string expression
-singleQuotedString :: TTermDefinition (String -> Py.Expression)
-singleQuotedString = def "singleQuotedString" $
-  doc "Create a single-quoted string expression" $
-  lambda "s" $
-    stringToPyExpression @@ PyDsl.quoteStyleSingle @@ var "s"
-
--- | Create a string expression with a given quote style
-stringToPyExpression :: TTermDefinition (Py.QuoteStyle -> String -> Py.Expression)
-stringToPyExpression = def "stringToPyExpression" $
-  doc "Create a string expression with a given quote style" $
-  lambdas ["style", "s"] $
-    pyAtomToPyExpression @@ (PyDsl.atomString $ PyDsl.string_ (var "s") (var "style"))
-
--- | Current target Python version. Change this to Python310 for PyPy compatibility.
-targetPythonVersion :: TTermDefinition PyHelpers.PythonVersion
-targetPythonVersion = def "targetPythonVersion" $
-  doc "Current target Python version for code generation" $
-  injectUnit PyHelpers._PythonVersion PyHelpers._PythonVersion_python310
-
--- | Create a triple-quoted string expression
-tripleQuotedString :: TTermDefinition (String -> Py.Expression)
-tripleQuotedString = def "tripleQuotedString" $
-  doc "Create a triple-quoted string expression" $
-  lambda "s" $
-    stringToPyExpression @@ PyDsl.quoteStyleTriple @@ var "s"
-
--- | Generate a type alias statement using PEP 695 syntax (Python 3.12+)
-typeAliasStatement :: TTermDefinition (Py.Name -> [Py.TypeParameter] -> Maybe String -> Py.Expression -> Py.Statement)
-typeAliasStatement = def "typeAliasStatement" $
-  doc "Generate a type alias statement using PEP 695 syntax (Python 3.12+)" $
-  "name" ~> "tparams" ~> "mcomment" ~> "tyexpr" ~>
-    annotatedStatement @@ var "mcomment" @@
-      (pySimpleStatementToPyStatement @@
-        (PyDsl.simpleStatementTypeAlias $
-          PyDsl.typeAlias (var "name") (var "tparams") (var "tyexpr")))
-
--- | Generate a type alias statement using Python 3.10-compatible syntax
-typeAliasStatement310 :: TTermDefinition (Py.Name -> [Py.TypeParameter] -> Maybe String -> Py.Expression -> Py.Statement)
-typeAliasStatement310 = def "typeAliasStatement310" $
-  doc "Generate a type alias statement using Python 3.10-compatible syntax: Name: TypeAlias = \"TypeExpression\"" $
-  "name" ~> "_tparams" ~> "mcomment" ~> "tyexpr" ~>
-    "quotedExpr" <~ (doubleQuotedString @@ (Serialization.printExpr @@ (PySerde.encodeExpression @@ var "tyexpr"))) $
-    annotatedStatement @@ var "mcomment" @@
-      (pyAssignmentToPyStatement @@
-        (PyDsl.assignmentTyped $
-          PyDsl.typedAssignment
-            (PyDsl.singleTargetName $ var "name")
-            (PyDsl.pyNameToPyExpression $ PyDsl.name $ string "TypeAlias")
-            (just $ pyExpressionToPyAnnotatedRhs @@ var "quotedExpr")))
-
--- | Generate a subscriptable union class for Python 3.10
-unionTypeClassStatements310 :: TTermDefinition (Py.Name -> Maybe String -> Py.Expression -> [Py.Statement] -> [Py.Statement])
-unionTypeClassStatements310 = def "unionTypeClassStatements310" $
-  doc "Generate a subscriptable union class for Python 3.10" $
-  "name" ~> "mcomment" ~> "tyexpr" ~> "extraStmts" ~>
-    "nameStr" <~ (PyDsl.unName $ var "name") $
-    "metaName" <~ (PyDsl.name $ string "_" ++ var "nameStr" ++ string "Meta") $
-    "docString" <~ (Serialization.printExpr @@ (PySerde.encodeExpression @@ var "tyexpr")) $
-    -- return object statement
-    "returnObject" <~ (pySimpleStatementToPyStatement @@
-      (PyDsl.simpleStatementReturn $
-        PyDsl.returnStatement $ list [
-          PyDsl.starExpressionSimple $
-            PyDsl.pyNameToPyExpression $ PyDsl.name $ string "object"])) $
-    -- def __getitem__(cls, item): return object
-    "getItemMethod" <~ (PyDsl.statementCompound $
-      PyDsl.compoundStatementFunction $
-        PyDsl.functionDefinition nothing $
-          PyDsl.functionDefRaw false
-            (PyDsl.name $ string "__getitem__")
-            (list ([] :: [TTerm Py.TypeParameter]))
-            (just getItemParams)
-            nothing
-            nothing
-            (indentedBlock @@ nothing @@ list [list [var "returnObject"]])) $
-    -- class _NameMeta(type): ...
-    "metaClass" <~ (pyClassDefinitionToPyStatement @@
-      PyDsl.classDefinition nothing (var "metaName")
-        (list ([] :: [TTerm Py.TypeParameter]))
-        (just $ pyExpressionsToPyArgs @@ list [PyDsl.pyNameToPyExpression $ PyDsl.name $ string "type"])
-        (indentedBlock @@ nothing @@ list [list [var "getItemMethod"]])) $
-    -- docstring statement
-    "docStmt" <~ (pyExpressionToPyStatement @@ (tripleQuotedString @@ var "docString")) $
-    -- Build body groups: docstring, then extra statements (constants), then pass if no extras
-    "bodyGroups" <~ Logic.ifElse (Lists.null $ var "extraStmts")
-      ("passStmt" <~ (pySimpleStatementToPyStatement @@ PyDsl.simpleStatementPass) $
-       list [list [var "docStmt"], list [var "passStmt"]])
-      (list [list [var "docStmt"], var "extraStmts"]) $
-    -- metaclass kwarg
-    "metaclassArg" <~ (PyDsl.kwarg (PyDsl.name $ string "metaclass") (PyDsl.pyNameToPyExpression $ var "metaName")) $
-    -- class Name(metaclass=_NameMeta): ...
-    "unionClass" <~ (annotatedStatement @@ var "mcomment" @@
-      (pyClassDefinitionToPyStatement @@
-        PyDsl.classDefinition nothing (var "name")
-          (list ([] :: [TTerm Py.TypeParameter]))
-          (just $ PyDsl.args
-            (list ([] :: [TTerm Py.PosArg]))
-            (list [PyDsl.kwargOrStarredKwarg $ var "metaclassArg"])
-            (list ([] :: [TTerm Py.KwargOrDoubleStarred])))
-          (indentedBlock @@ nothing @@ var "bodyGroups"))) $
-    list [var "metaClass", var "unionClass"]
-
--- | Generate __slots__, __eq__, and __hash__ methods for unit-typed union variants
-unitVariantMethods :: TTermDefinition (Py.Name -> [Py.Statement])
-unitVariantMethods = def "unitVariantMethods" $
-  doc "Generate __slots__, __eq__, and __hash__ methods for unit-typed union variants" $
-  "className" ~>
-    "classNameStr" <~ (PyDsl.unName $ var "className") $
-    -- __slots__ = ()
-    "slotsStmt" <~ (assignmentStatement @@ (PyDsl.name $ string "__slots__") @@
-      (pyPrimaryToPyExpression @@ (PyDsl.primarySimple $
-        PyDsl.atomTuple $ PyDsl.tuple $ list ([] :: [TTerm Py.StarNamedExpression])))) $
-    -- return isinstance(other, ClassName)
-    "returnIsinstance" <~ (pySimpleStatementToPyStatement @@
-      (PyDsl.simpleStatementReturn $
-        PyDsl.returnStatement $ list [
-          PyDsl.starExpressionSimple $
-            functionCall @@ (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "isinstance")
-              @@ list [PyDsl.pyNameToPyExpression $ PyDsl.name $ string "other",
-                       PyDsl.pyNameToPyExpression $ var "className"]])) $
-    -- def __eq__(self, other): return isinstance(other, ClassName)
-    "eqMethod" <~ (PyDsl.statementCompound $
-      PyDsl.compoundStatementFunction $
-        PyDsl.functionDefinition nothing $
-          PyDsl.functionDefRaw false
-            (PyDsl.name $ string "__eq__")
-            (list ([] :: [TTerm Py.TypeParameter]))
-            (just selfOtherParams)
-            nothing
-            nothing
-            (indentedBlock @@ nothing @@ list [list [var "returnIsinstance"]])) $
-    -- return hash("ClassName")
-    "returnHash" <~ (pySimpleStatementToPyStatement @@
-      (PyDsl.simpleStatementReturn $
-        PyDsl.returnStatement $ list [
-          PyDsl.starExpressionSimple $
-            functionCall @@ (PyDsl.pyNameToPyPrimary $ PyDsl.name $ string "hash")
-              @@ list [doubleQuotedString @@ var "classNameStr"]])) $
-    -- def __hash__(self): return hash("ClassName")
-    "hashMethod" <~ (PyDsl.statementCompound $
-      PyDsl.compoundStatementFunction $
-        PyDsl.functionDefinition nothing $
-          PyDsl.functionDefRaw false
-            (PyDsl.name $ string "__hash__")
-            (list ([] :: [TTerm Py.TypeParameter]))
-            (just selfOnlyParams)
-            nothing
-            nothing
-            (indentedBlock @@ nothing @@ list [list [var "returnHash"]])) $
-    list [var "slotsStmt", var "eqMethod", var "hashMethod"]
diff --git a/src/main/haskell/Hydra/Sources/Rdf/Manifest.hs b/src/main/haskell/Hydra/Sources/Rdf/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rdf/Manifest.hs
+++ /dev/null
@@ -1,36 +0,0 @@
--- | Package manifest for hydra-rdf.
---
--- Owns the RDF/OWL/SHACL/ShEx/XML Schema DSL sources. See
--- feature_290_packaging-plan.md, "Sync system redesign / Package manifests".
-
-module Hydra.Sources.Rdf.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Owl.Syntax as OwlSyntax
-import qualified Hydra.Sources.Rdf.Serde as RdfSerde
-import qualified Hydra.Sources.Rdf.Syntax as RdfSyntax
-import qualified Hydra.Sources.Rdf.Utils as RdfUtils
-import qualified Hydra.Sources.Shacl.Coder as ShaclCoder
-import qualified Hydra.Sources.Shacl.Language as ShaclLanguage
-import qualified Hydra.Sources.Shacl.Model as ShaclModel
-import qualified Hydra.Sources.Shex.Syntax as ShexSyntax
-import qualified Hydra.Sources.Xml.Schema as XmlSchema
-
-mainModules :: [Module]
-mainModules = [
-  OwlSyntax.module_,
-  RdfSerde.module_,
-  RdfSyntax.module_,
-  RdfUtils.module_,
-  ShaclCoder.module_,
-  ShaclLanguage.module_,
-  ShaclModel.module_,
-  ShexSyntax.module_,
-  XmlSchema.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Rdf/Serde.hs b/src/main/haskell/Hydra/Sources/Rdf/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rdf/Serde.hs
+++ /dev/null
@@ -1,247 +0,0 @@
-module Hydra.Sources.Rdf.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Sources.Rdf.Syntax as RdfSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.rdf.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = (RdfSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting RDF graphs to N-Triples format expressions"}
-  where
-    definitions = [
-      toDefinition escapeIriChar,
-      toDefinition escapeIriStr,
-      toDefinition escapeLiteralChar,
-      toDefinition escapeLiteralString,
-      toDefinition rdfGraphToNtriples,
-      toDefinition writeBlankNode,
-      toDefinition writeGraph,
-      toDefinition writeIri,
-      toDefinition writeLanguageTag,
-      toDefinition writeLiteral,
-      toDefinition writeNode,
-      toDefinition writeResource,
-      toDefinition writeTriple]
-
-
--- | Escape a single IRI character (as char code). Characters outside printable ASCII or in the
---   set <>"{}|^`\ are replaced with "?"
-escapeIriChar :: TTermDefinition (Int -> String)
-escapeIriChar = define "escapeIriChar" $
-  doc "Escape a single IRI character code to a string" $
-  lambda "c" $
-    Logic.ifElse
-      (Logic.or (Equality.gte (var "c") (int32 128)) $
-        Logic.or (Equality.lte (var "c") (int32 32)) $
-          Logic.or (Equality.equal (var "c") (int32 60))   -- '<'
-          $ Logic.or (Equality.equal (var "c") (int32 62))   -- '>'
-          $ Logic.or (Equality.equal (var "c") (int32 34))   -- '"'
-          $ Logic.or (Equality.equal (var "c") (int32 123))  -- '{'
-          $ Logic.or (Equality.equal (var "c") (int32 125))  -- '}'
-          $ Logic.or (Equality.equal (var "c") (int32 124))  -- '|'
-          $ Logic.or (Equality.equal (var "c") (int32 94))   -- '^'
-          $ Logic.or (Equality.equal (var "c") (int32 96))   -- '`'
-          $ Equality.equal (var "c") (int32 92))             -- '\\'
-      (string "?")
-      (Strings.fromList $ list [var "c"])
-
-escapeIriStr :: TTermDefinition (String -> String)
-escapeIriStr = define "escapeIriStr" $
-  doc "Escape a string for use in an IRI. Non-printable and special characters are replaced with ?" $
-  lambda "s" $
-    Strings.cat (Lists.map escapeIriChar (Strings.toList (var "s")))
-
--- | Escape a single literal character. Handles \", \\, \n, \r, and non-ASCII
-escapeLiteralChar :: TTermDefinition (Int -> String)
-escapeLiteralChar = define "escapeLiteralChar" $
-  doc "Escape a single literal character code to a string" $
-  lambda "c" $
-    Logic.ifElse (Equality.gte (var "c") (int32 128))
-      (string "?")
-      (Logic.ifElse (Equality.equal (var "c") (int32 34))   -- '"'
-        (string "\\\"")
-        (Logic.ifElse (Equality.equal (var "c") (int32 92))  -- '\\'
-          (string "\\\\")
-          (Logic.ifElse (Equality.equal (var "c") (int32 10))  -- '\n'
-            (string "\\n")
-            (Logic.ifElse (Equality.equal (var "c") (int32 13))  -- '\r'
-              (string "\\r")
-              (Strings.fromList $ list [var "c"])))))
-
-escapeLiteralString :: TTermDefinition (String -> String)
-escapeLiteralString = define "escapeLiteralString" $
-  doc "Escape a string for use in an N-Triples literal" $
-  lambda "s" $
-    Strings.cat (Lists.map escapeLiteralChar (Strings.toList (var "s")))
-
--- | Convert an RDF graph to an N-Triples string
-rdfGraphToNtriples :: TTermDefinition (Rdf.Graph -> String)
-rdfGraphToNtriples = define "rdfGraphToNtriples" $
-  doc "Convert an RDF graph to an N-Triples string" $
-  lambda "g" $
-    Serialization.printExpr @@ (writeGraph @@ var "g")
-
-writeBlankNode :: TTermDefinition (Rdf.BlankNode -> Expr)
-writeBlankNode = define "writeBlankNode" $
-  doc "Convert a blank node to an expression" $
-  lambda "bnode" $
-    Serialization.noSep @@ list [
-      Serialization.cst @@ string "_:",
-      Serialization.cst @@ (unwrap Rdf._BlankNode @@ var "bnode")]
-
-writeGraph :: TTermDefinition (Rdf.Graph -> Expr)
-writeGraph = define "writeGraph" $
-  doc "Convert an RDF graph to an expression" $
-  lambda "g" $
-    Serialization.newlineSep @@ (Lists.map writeTriple (Sets.toList (unwrap Rdf._Graph @@ var "g")))
-
-writeIri :: TTermDefinition (Rdf.Iri -> Expr)
-writeIri = define "writeIri" $
-  doc "Convert an IRI to an expression" $
-  lambda "iri" $
-    Serialization.noSep @@ list [
-      Serialization.cst @@ string "<",
-      Serialization.cst @@ (escapeIriStr @@ (unwrap Rdf._Iri @@ var "iri")),
-      Serialization.cst @@ string ">"]
-
-writeLanguageTag :: TTermDefinition (Rdf.LanguageTag -> Expr)
-writeLanguageTag = define "writeLanguageTag" $
-  doc "Convert a language tag to an expression" $
-  lambda "lang" $
-    Serialization.noSep @@ list [
-      Serialization.cst @@ string "@",
-      Serialization.cst @@ (unwrap Rdf._LanguageTag @@ var "lang")]
-
-writeLiteral :: TTermDefinition (Rdf.Literal -> Expr)
-writeLiteral = define "writeLiteral" $
-  doc "Convert a literal to an expression" $
-  lambda "lit" $ lets [
-    "lex">: project Rdf._Literal Rdf._Literal_lexicalForm @@ var "lit",
-    "dt">: project Rdf._Literal Rdf._Literal_datatypeIri @@ var "lit",
-    "lang">: project Rdf._Literal Rdf._Literal_languageTag @@ var "lit",
-    "lexExpr">: Serialization.cst @@
-      (Strings.cat $ list [string "\"", escapeLiteralString @@ var "lex", string "\""]),
-    "suffix">: Maybes.maybe
-      (Serialization.noSep @@ list [Serialization.cst @@ string "^^", writeIri @@ var "dt"])
-      writeLanguageTag
-      (var "lang")] $
-    Serialization.noSep @@ list [var "lexExpr", var "suffix"]
-
-writeNode :: TTermDefinition (Rdf.Node -> Expr)
-writeNode = define "writeNode" $
-  doc "Convert a node to an expression" $
-  lambda "n" $
-    cases Rdf._Node (var "n") Nothing [
-      Rdf._Node_iri>>: lambda "iri" $ writeIri @@ var "iri",
-      Rdf._Node_bnode>>: lambda "bnode" $ writeBlankNode @@ var "bnode",
-      Rdf._Node_literal>>: lambda "lit" $ writeLiteral @@ var "lit"]
-
-writeResource :: TTermDefinition (Rdf.Resource -> Expr)
-writeResource = define "writeResource" $
-  doc "Convert a resource to an expression" $
-  lambda "r" $
-    cases Rdf._Resource (var "r") Nothing [
-      Rdf._Resource_iri>>: lambda "iri" $ writeIri @@ var "iri",
-      Rdf._Resource_bnode>>: lambda "bnode" $ writeBlankNode @@ var "bnode"]
-
-writeTriple :: TTermDefinition (Rdf.Triple -> Expr)
-writeTriple = define "writeTriple" $
-  doc "Convert a triple to an expression" $
-  lambda "t" $ lets [
-    "subj">: project Rdf._Triple Rdf._Triple_subject @@ var "t",
-    "pred">: project Rdf._Triple Rdf._Triple_predicate @@ var "t",
-    "obj">: project Rdf._Triple Rdf._Triple_object @@ var "t"] $
-    Serialization.spaceSep @@ list [
-      writeResource @@ var "subj",
-      writeIri @@ var "pred",
-      writeNode @@ var "obj",
-      Serialization.cst @@ string "."]
diff --git a/src/main/haskell/Hydra/Sources/Rdf/Syntax.hs b/src/main/haskell/Hydra/Sources/Rdf/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rdf/Syntax.hs
+++ /dev/null
@@ -1,148 +0,0 @@
-module Hydra.Sources.Rdf.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.rdf.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-rdf :: String -> Type
-rdf = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "An RDF 1.1 syntax model"}
-  where
-    definitions = [
-      blankNode,
-      rdfsClass,
-      dataset,
-      description,
-      graph_,
-      iri,
-      iriOrLiteral,
-      langStrings,
-      languageTag,
-      literal_,
-      node_,
-      property_,
-      quad,
-      resource_,
-      triple]
-
-blankNode :: Binding
-blankNode = define "BlankNode" $ T.wrap T.string
-
-rdfsClass :: Binding
-rdfsClass = define "RdfsClass" $
-  doc "Stand-in for rdfs:Class" $ T.wrap T.unit
-
-dataset :: Binding
-dataset = define "Dataset" $ T.wrap $ T.set $ rdf "Quad"
-
-description :: Binding
-description = define "Description" $
-  doc "A graph of RDF statements together with a distinguished subject and/or object node" $
-  T.record [
-    "subject">: rdf "Node",
-    "graph">: rdf "Graph"]
-
-graph_ :: Binding
-graph_ = define "Graph" $ T.wrap $ T.set $ rdf "Triple"
-
-iri :: Binding
-iri = define "Iri" $
-  doc "An Internationalized Resource Identifier" $
-  T.wrap T.string
-
-iriOrLiteral :: Binding
-iriOrLiteral = define "IriOrLiteral" $
-  doc ("An IRI or a literal; " ++
-       "this type is a convenience for downstream models like SHACL which may exclude blank nodes") $
-  T.union [
-    "iri">: rdf "Iri",
-    "literal">: rdf "Literal"]
-
-langStrings :: Binding
-langStrings = define "LangStrings" $
-  doc "A convenience type which provides at most one string value per language, and optionally a value without a language" $
-  T.wrap $ T.map (T.maybe $ rdf "LanguageTag") T.string
-
-languageTag :: Binding
-languageTag = define "LanguageTag" $
-  doc "A BCP47 language tag" $
-  T.wrap T.string
-
-literal_ :: Binding
-literal_ = define "Literal" $
-  doc "A value such as a string, number, or date" $
-  T.record [
-    "lexicalForm">:
-      doc "a Unicode string, which should be in Normal Form C"
-      T.string,
-    "datatypeIri">:
-      doc "an IRI identifying a datatype that determines how the lexical form maps to a literal value" $
-      rdf "Iri",
-    "languageTag">:
-      doc "An optional language tag, present if and only if the datatype IRI is http://www.w3.org/1999/02/22-rdf-syntax-ns#langString" $
-      T.maybe $ rdf "LanguageTag"]
-
-node_ :: Binding
-node_ = define "Node" $
-  T.union [
-    "iri">: rdf "Iri",
-    "bnode">: rdf "BlankNode",
-    "literal">: rdf "Literal"]
-
-property_ :: Binding
-property_ = define "Property" $
-  doc "A type representing an RDF property, and encapsulating its domain, range, and subclass relationships" $
-  T.record [
-    "domain">:
-      doc "State that any resource that has a given property is an instance of one or more classes" $
-      T.set $ rdf "RdfsClass",
-    "range">:
-      doc "States that the values of a property are instances of one or more classes" $
-      T.set $ rdf "RdfsClass",
-    "subPropertyOf">:
-      T.set $ rdf "Property"]
-
-quad :: Binding
-quad = define "Quad" $
-  doc "An RDF triple with an optional named graph component" $
-  T.record [
-    "subject">: rdf "Resource",
-    "predicate">: rdf "Iri",
-    "object">: rdf "Node",
-    "graph">: T.maybe $ rdf "Iri"]
-
-resource_ :: Binding
-resource_ = define "Resource" $
-  T.union [
-    "iri">: rdf "Iri",
-    "bnode">: rdf "BlankNode"]
-
-triple :: Binding
-triple = define "Triple" $
-  doc "An RDF triple defined by a subject, predicate, and object" $
-  T.record [
-    "subject">: rdf "Resource",
-    "predicate">: rdf "Iri",
-    "object">: rdf "Node"]
diff --git a/src/main/haskell/Hydra/Sources/Rdf/Utils.hs b/src/main/haskell/Hydra/Sources/Rdf/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rdf/Utils.hs
+++ /dev/null
@@ -1,347 +0,0 @@
-module Hydra.Sources.Rdf.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Sources.Rdf.Syntax as RdfSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.rdf.utils"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Names.ns, Annotations.ns],
-            moduleTypeDependencies = (RdfSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Utility functions for working with RDF graphs and descriptions"}
-  where
-    definitions = [
-      toDefinition descriptionsToGraph,
-      toDefinition emptyDescription,
-      toDefinition emptyLangStrings,
-      toDefinition emptyRdfGraph,
-      toDefinition encodeLiteral,
-      toDefinition forObjects,
-      toDefinition iri,
-      toDefinition keyIri,
-      toDefinition key_rdfBlankNodeCounter,
-      toDefinition mergeGraphs,
-      toDefinition nameToIri,
-      toDefinition nextBlankNode,
-      toDefinition propertyIri,
-      toDefinition rdfIri,
-      toDefinition resourceToNode,
-      toDefinition subjectsOf,
-      toDefinition triplesOf,
-      toDefinition xmlSchemaDatatypeIri]
-
-
--- | Convert a list of descriptions to an RDF graph
-descriptionsToGraph :: TTermDefinition ([Rdf.Description] -> Rdf.Graph)
-descriptionsToGraph = define "descriptionsToGraph" $
-  doc "Convert a list of descriptions to an RDF graph" $
-  lambda "ds" $
-    wrap Rdf._Graph (Sets.fromList (triplesOf @@ var "ds"))
-
--- | Create an empty description with the given node
-emptyDescription :: TTermDefinition (Rdf.Node -> Rdf.Description)
-emptyDescription = define "emptyDescription" $
-  doc "Create an empty description with a given node" $
-  lambda "node" $
-    record Rdf._Description [
-      Rdf._Description_subject>>: var "node",
-      Rdf._Description_graph>>: emptyRdfGraph]
-
--- | An empty LangStrings value
-emptyLangStrings :: TTermDefinition Rdf.LangStrings
-emptyLangStrings = define "emptyLangStrings" $
-  doc "An empty LangStrings value" $
-  wrap Rdf._LangStrings Maps.empty
-
--- | An empty RDF graph
-emptyRdfGraph :: TTermDefinition Rdf.Graph
-emptyRdfGraph = define "emptyRdfGraph" $
-  doc "An empty RDF graph" $
-  wrap Rdf._Graph Sets.empty
-
--- | Encode a Hydra literal as an RDF literal
-encodeLiteral :: TTermDefinition (Literal -> Rdf.Literal)
-encodeLiteral = define "encodeLiteral" $
-  doc "Encode a Hydra literal as an RDF literal" $
-  lambda "lit" $
-    cases _Literal (var "lit") Nothing [
-      _Literal_binary>>: lambda "s" $
-        record Rdf._Literal [
-          Rdf._Literal_lexicalForm>>: Literals.binaryToString (var "s"),
-          Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "base64Binary",
-          Rdf._Literal_languageTag>>: nothing],
-      _Literal_boolean>>: lambda "b" $
-        record Rdf._Literal [
-          Rdf._Literal_lexicalForm>>: Logic.ifElse (var "b") (string "true") (string "false"),
-          Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "boolean",
-          Rdf._Literal_languageTag>>: nothing],
-      _Literal_float>>: lambda "f" $
-        cases _FloatValue (var "f") Nothing [
-          _FloatValue_bigfloat>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showBigfloat (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "decimal",
-              Rdf._Literal_languageTag>>: nothing],
-          _FloatValue_float32>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showFloat32 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "float",
-              Rdf._Literal_languageTag>>: nothing],
-          _FloatValue_float64>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showFloat64 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "double",
-              Rdf._Literal_languageTag>>: nothing]],
-      _Literal_integer>>: lambda "i" $
-        cases _IntegerValue (var "i") Nothing [
-          _IntegerValue_bigint>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showBigint (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "integer",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_int8>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showInt8 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "byte",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_int16>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showInt16 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "short",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_int32>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showInt32 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "int",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_int64>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showInt64 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "long",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_uint8>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showUint8 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "unsignedByte",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_uint16>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showUint16 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "unsignedShort",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_uint32>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showUint32 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "unsignedInt",
-              Rdf._Literal_languageTag>>: nothing],
-          _IntegerValue_uint64>>: lambda "v" $
-            record Rdf._Literal [
-              Rdf._Literal_lexicalForm>>: Literals.showUint64 (var "v"),
-              Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "unsignedLong",
-              Rdf._Literal_languageTag>>: nothing]],
-      _Literal_string>>: lambda "s" $
-        record Rdf._Literal [
-          Rdf._Literal_lexicalForm>>: var "s",
-          Rdf._Literal_datatypeIri>>: xmlSchemaDatatypeIri @@ string "string",
-          Rdf._Literal_languageTag>>: nothing]]
-
--- | Create triples from a subject, predicate, and list of object nodes
-forObjects :: TTermDefinition (Rdf.Resource -> Rdf.Iri -> [Rdf.Node] -> [Rdf.Triple])
-forObjects = define "forObjects" $
-  doc "Create triples from a subject, predicate, and list of object nodes" $
-  lambda "subj" $ lambda "pred" $ lambda "objs" $
-    Lists.map
-      (lambda "obj" $ record Rdf._Triple [
-        Rdf._Triple_subject>>: var "subj",
-        Rdf._Triple_predicate>>: var "pred",
-        Rdf._Triple_object>>: var "obj"])
-      (var "objs")
-
--- | Construct an IRI from a namespace and local name
-iri :: TTermDefinition (String -> String -> Rdf.Iri)
-iri = define "iri" $
-  doc "Construct an IRI from a namespace and local name" $
-  lambda "ns" $ lambda "local" $
-    wrap Rdf._Iri (Strings.cat2 (var "ns") (var "local"))
-
--- | Construct a key IRI from a local name
-keyIri :: TTermDefinition (String -> Rdf.Iri)
-keyIri = define "keyIri" $
-  doc "Construct a key IRI from a local name" $
-  lambda "local" $
-    iri @@ string "urn:key:" @@ var "local"
-
--- | The key used for tracking blank node counters
-key_rdfBlankNodeCounter :: TTermDefinition Name
-key_rdfBlankNodeCounter = define "key_rdfBlankNodeCounter" $
-  doc "The key used for tracking blank node counters" $
-  wrap _Name $ string "rdfBlankNodeCounter"
-
--- | Merge a list of RDF graphs into a single graph
-mergeGraphs :: TTermDefinition ([Rdf.Graph] -> Rdf.Graph)
-mergeGraphs = define "mergeGraphs" $
-  doc "Merge a list of RDF graphs into a single graph" $
-  lambda "graphs" $
-    wrap Rdf._Graph
-      (Sets.unions (Lists.map (unwrap Rdf._Graph) (var "graphs")))
-
--- | Convert a Hydra name to an RDF IRI
-nameToIri :: TTermDefinition (Name -> Rdf.Iri)
-nameToIri = define "nameToIri" $
-  doc "Convert a Hydra name to an RDF IRI" $
-  lambda "name" $
-    wrap Rdf._Iri (Strings.cat2 (string "urn:") (Core.unName $ var "name"))
-
--- | Generate the next blank node and an updated context
-nextBlankNode :: TTermDefinition (Context -> (Rdf.Resource, Context))
-nextBlankNode = define "nextBlankNode" $
-  doc "Generate the next blank node and an updated context" $
-  lambda "cx" $ lets [
-    "result">: Annotations.nextCount @@ key_rdfBlankNodeCounter @@ var "cx",
-    "count">: Pairs.first (var "result"),
-    "cx'">: Pairs.second (var "result")] $
-    pair
-      (inject Rdf._Resource Rdf._Resource_bnode
-        (wrap Rdf._BlankNode (Strings.cat2 (string "b") (Literals.showInt32 (var "count")))))
-      (var "cx'")
-
--- | Construct a property IRI from a record name and field name
-propertyIri :: TTermDefinition (Name -> Name -> Rdf.Iri)
-propertyIri = define "propertyIri" $
-  doc "Construct a property IRI from a record name and field name" $
-  lambda "rname" $ lambda "fname" $ lets [
-    "qualName">: Names.qualifyName @@ var "rname",
-    "gname">: Packaging.qualifiedNameNamespace (var "qualName"),
-    "local_">: Packaging.qualifiedNameLocal (var "qualName")] $
-    wrap Rdf._Iri
-      (Strings.cat $ list [
-        string "urn:",
-        Maybes.maybe (string "") (unwrap _Namespace) (var "gname"),
-        string "#",
-        Formatting.decapitalize @@ var "local_",
-        Formatting.capitalize @@ (Core.unName $ var "fname")])
-
--- | Construct an RDF namespace IRI
-rdfIri :: TTermDefinition (String -> Rdf.Iri)
-rdfIri = define "rdfIri" $
-  doc "Construct an RDF namespace IRI" $
-  lambda "local" $
-    iri @@ string "http://www.w3.org/1999/02/22-rdf-syntax-ns#" @@ var "local"
-
--- | Convert a resource to a node
-resourceToNode :: TTermDefinition (Rdf.Resource -> Rdf.Node)
-resourceToNode = define "resourceToNode" $
-  doc "Convert a resource to a node" $
-  lambda "r" $
-    cases Rdf._Resource (var "r") Nothing [
-      Rdf._Resource_iri>>: lambda "i" $ inject Rdf._Node Rdf._Node_iri (var "i"),
-      Rdf._Resource_bnode>>: lambda "b" $ inject Rdf._Node Rdf._Node_bnode (var "b")]
-
--- | Extract subjects from a list of descriptions
-subjectsOf :: TTermDefinition ([Rdf.Description] -> [Rdf.Node])
-subjectsOf = define "subjectsOf" $
-  doc "Extract subjects from a list of descriptions" $
-  lambda "descs" $
-    Lists.map (project Rdf._Description Rdf._Description_subject) (var "descs")
-
--- | Extract all triples from a list of descriptions
-triplesOf :: TTermDefinition ([Rdf.Description] -> [Rdf.Triple])
-triplesOf = define "triplesOf" $
-  doc "Extract all triples from a list of descriptions" $
-  lambda "descs" $
-    Lists.concat (Lists.map
-      (lambda "d" $ Sets.toList (unwrap Rdf._Graph @@ (project Rdf._Description Rdf._Description_graph @@ var "d")))
-      (var "descs"))
-
--- | Construct an XML Schema datatype IRI
-xmlSchemaDatatypeIri :: TTermDefinition (String -> Rdf.Iri)
-xmlSchemaDatatypeIri = define "xmlSchemaDatatypeIri" $
-  doc "Construct an XML Schema datatype IRI" $
-  lambda "local" $
-    iri @@ string "http://www.w3.org/2001/XMLSchema#" @@ var "local"
diff --git a/src/main/haskell/Hydra/Sources/Rust/Coder.hs b/src/main/haskell/Hydra/Sources/Rust/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rust/Coder.hs
+++ /dev/null
@@ -1,826 +0,0 @@
--- | Rust code generator in Hydra DSL.
--- This module provides DSL versions of Rust code generation functions.
--- Type definitions are mapped to structs/enums/newtypes; term definitions are mapped to functions.
-
-module Hydra.Sources.Rust.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports for Rust AST
-import qualified Hydra.Rust.Syntax as R
-import qualified Hydra.Sources.Rust.Syntax as RustSyntax
-import qualified Hydra.Sources.Rust.Serde as RustSerdeSource
-import qualified Hydra.Sources.Rust.Language as RustLanguageSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.rust.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [moduleNamespace RustSerdeSource.module_, moduleNamespace RustLanguageSource.module_,
-      Formatting.ns, Names.ns, Strip.ns, Variables.ns, Environment.ns, Lexical.ns, SerializationSource.ns],
-            moduleTypeDependencies = (RustSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Rust code generator: converts Hydra type and term modules to Rust source code"}
-  where
-    definitions = [
-      toDefinition encodeEnumVariant,
-      toDefinition encodeLiteral,
-      toDefinition encodeLiteralType,
-      toDefinition encodeProjectionElim,
-      toDefinition encodeStructField,
-      toDefinition encodeTerm,
-      toDefinition encodeTermDefinition,
-      toDefinition encodeType,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeUnionElim,
-      toDefinition encodeUnwrapElim,
-      toDefinition moduleToRust,
-      toDefinition rustApply1,
-      toDefinition rustApply2,
-      toDefinition rustBlock,
-      toDefinition rustCall,
-      toDefinition rustClosure,
-      toDefinition rustExprPath,
-      toDefinition rustLetStmt,
-      toDefinition rustPath,
-      toDefinition rustPathSegmented,
-      toDefinition rustUnit,
-      toDefinition standardDerives]
-
--- =============================================================================
--- Standard derives
--- =============================================================================
-
--- | Encode a Hydra union field as a Rust enum variant
-encodeEnumVariant :: TTermDefinition (Context -> Graph -> FieldType -> Either Error R.EnumVariant)
-encodeEnumVariant = def "encodeEnumVariant" $
-  "cx" ~> "g" ~> lambda "ft" $
-    "fname" <~ Core.unName (Core.fieldTypeName (var "ft")) $
-    "ftyp" <~ Core.fieldTypeType (var "ft") $
-    "dtyp" <~ (Strip.deannotateType @@ var "ftyp") $
-    "isUnit" <~ (cases _Type (var "dtyp") (Just $ boolean False) [
-      _Type_unit>>: constant $ boolean True,
-      _Type_record>>: lambda "rt" $
-        Lists.null (var "rt")]) $
-    Logic.ifElse (var "isUnit")
-      -- Unit variant
-      (right (record R._EnumVariant [
-        R._EnumVariant_name>>: Formatting.capitalize @@ var "fname",
-        R._EnumVariant_body>>: inject R._EnumVariantBody R._EnumVariantBody_unit unit,
-        R._EnumVariant_doc>>: nothing]))
-      -- Non-unit variant: check if it's a record (struct variant) or other (tuple variant)
-      (cases _Type (var "dtyp") (Just $
-          -- Default: tuple variant with single element
-          "sftyp" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "ftyp") $
-            right (record R._EnumVariant [
-              R._EnumVariant_name>>: Formatting.capitalize @@ var "fname",
-              R._EnumVariant_body>>: inject R._EnumVariantBody R._EnumVariantBody_tuple $ list [var "sftyp"],
-              R._EnumVariant_doc>>: nothing]))
-        [_Type_record>>: lambda "rt" $
-          "sfields" <<~ (Eithers.mapList (encodeStructField @@ var "cx" @@ var "g") (var "rt")) $
-            right (record R._EnumVariant [
-              R._EnumVariant_name>>: Formatting.capitalize @@ var "fname",
-              R._EnumVariant_body>>: inject R._EnumVariantBody R._EnumVariantBody_struct (var "sfields"),
-              R._EnumVariant_doc>>: nothing])])
-
--- =============================================================================
--- Type definition encoding
--- =============================================================================
-
--- | Encode a Hydra literal value as a Rust expression
-encodeLiteral :: TTermDefinition (Literal -> R.Expression)
-encodeLiteral = def "encodeLiteral" $
-  lambda "lit" $ cases _Literal (var "lit") Nothing [
-    _Literal_boolean>>: lambda "b" $
-      inject R._Expression R._Expression_literal $
-        inject R._Literal R._Literal_bool (var "b"),
-    _Literal_string>>: lambda "s" $
-      inject R._Expression R._Expression_literal $
-        inject R._Literal R._Literal_string (var "s"),
-    _Literal_float>>: lambda "fv" $
-      cases _FloatValue (var "fv") Nothing [
-        _FloatValue_float32>>: lambda "f" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_float $
-              record R._FloatLiteral [
-                R._FloatLiteral_value>>: Literals.bigfloatToFloat64 (Literals.float32ToBigfloat (var "f")),
-                R._FloatLiteral_suffix>>: just (string "f32")],
-        _FloatValue_float64>>: lambda "f" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_float $
-              record R._FloatLiteral [
-                R._FloatLiteral_value>>: var "f",
-                R._FloatLiteral_suffix>>: nothing],
-        _FloatValue_bigfloat>>: lambda "f" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_float $
-              record R._FloatLiteral [
-                R._FloatLiteral_value>>: Literals.bigfloatToFloat64 (var "f"),
-                R._FloatLiteral_suffix>>: nothing]],
-    _Literal_integer>>: lambda "iv" $
-      cases _IntegerValue (var "iv") Nothing [
-        _IntegerValue_int8>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.int8ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "i8")],
-        _IntegerValue_int16>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.int16ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "i16")],
-        _IntegerValue_int32>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.int32ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "i32")],
-        _IntegerValue_int64>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.int64ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "i64")],
-        _IntegerValue_uint8>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.uint8ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "u8")],
-        _IntegerValue_uint16>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.uint16ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "u16")],
-        _IntegerValue_uint32>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.uint32ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "u32")],
-        _IntegerValue_uint64>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: Literals.uint64ToBigint (var "i"),
-                R._IntegerLiteral_suffix>>: just (string "u64")],
-        _IntegerValue_bigint>>: lambda "i" $
-          inject R._Expression R._Expression_literal $
-            inject R._Literal R._Literal_integer $
-              record R._IntegerLiteral [
-                R._IntegerLiteral_value>>: var "i",
-                R._IntegerLiteral_suffix>>: nothing]]]
-
--- =============================================================================
--- Type encoding
--- =============================================================================
-
--- | Encode a Hydra literal type as a Rust type
-encodeLiteralType :: TTermDefinition (LiteralType -> R.Type)
-encodeLiteralType = def "encodeLiteralType" $
-  lambda "lt" $ cases _LiteralType (var "lt") Nothing [
-    _LiteralType_binary>>: constant $
-      rustApply1 @@ string "Vec" @@ (rustPath @@ string "u8"),
-    _LiteralType_boolean>>: constant $
-      rustPath @@ string "bool",
-    _LiteralType_float>>: lambda "ft" $
-      cases _FloatType (var "ft") Nothing [
-        _FloatType_bigfloat>>: constant $ rustPath @@ string "f64",
-        _FloatType_float32>>: constant $ rustPath @@ string "f32",
-        _FloatType_float64>>: constant $ rustPath @@ string "f64"],
-    _LiteralType_integer>>: lambda "it" $
-      cases _IntegerType (var "it") Nothing [
-        _IntegerType_bigint>>: constant $ rustPathSegmented @@ list [string "num", string "BigInt"],
-        _IntegerType_int8>>: constant $ rustPath @@ string "i8",
-        _IntegerType_int16>>: constant $ rustPath @@ string "i16",
-        _IntegerType_int32>>: constant $ rustPath @@ string "i32",
-        _IntegerType_int64>>: constant $ rustPath @@ string "i64",
-        _IntegerType_uint8>>: constant $ rustPath @@ string "u8",
-        _IntegerType_uint16>>: constant $ rustPath @@ string "u16",
-        _IntegerType_uint32>>: constant $ rustPath @@ string "u32",
-        _IntegerType_uint64>>: constant $ rustPath @@ string "u64"],
-    _LiteralType_string>>: constant $
-      rustPath @@ string "String"]
-
--- =============================================================================
--- Literal value encoding
--- =============================================================================
-
--- | Encode a Hydra record projection as a Rust expression.
--- Takes an optional argument for applied projections.
-encodeProjectionElim :: TTermDefinition (Context -> Graph -> Projection -> Maybe Term -> Either Error R.Expression)
-encodeProjectionElim = def "encodeProjectionElim" $
-  "cx" ~> "g" ~> lambda "proj" $ lambda "marg" $
-        "fname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.projectionField (var "proj"))) $
-        Maybes.cases (var "marg")
-          -- Unapplied projection: |v| v.field
-          (right (rustClosure @@ list [string "v"] @@
-            (inject R._Expression R._Expression_fieldAccess $
-              record R._FieldAccessExpr [
-                R._FieldAccessExpr_object>>: rustExprPath @@ string "v",
-                R._FieldAccessExpr_field>>: var "fname"])))
-          (lambda "arg" $
-            "sarg" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "arg") $
-              right (inject R._Expression R._Expression_fieldAccess $
-                record R._FieldAccessExpr [
-                  R._FieldAccessExpr_object>>: var "sarg",
-                  R._FieldAccessExpr_field>>: var "fname"]))
-
--- | Encode a Hydra record field as a Rust struct field
-encodeStructField :: TTermDefinition (Context -> Graph -> FieldType -> Either Error R.StructField)
-encodeStructField = def "encodeStructField" $
-  "cx" ~> "g" ~> lambda "ft" $
-    "fname" <~ Core.unName (Core.fieldTypeName (var "ft")) $
-    "ftyp" <~ Core.fieldTypeType (var "ft") $
-    "sftyp" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "ftyp") $
-      right (record R._StructField [
-        R._StructField_name>>: Formatting.convertCaseCamelToLowerSnake @@ (Formatting.sanitizeWithUnderscores @@ RustLanguageSource.rustReservedWords @@ var "fname"),
-        R._StructField_type>>: var "sftyp",
-        R._StructField_public>>: boolean True,
-        R._StructField_doc>>: nothing])
-
--- =============================================================================
--- Enum variant encoding
--- =============================================================================
-
--- | Encode a Hydra term as a Rust expression
-encodeTerm :: TTermDefinition (Context -> Graph -> Term -> Either Error R.Expression)
-encodeTerm = def "encodeTerm" $
-  "cx" ~> "g" ~> lambda "term" $
-    cases _Term (var "term") (Just $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "unexpected term variant") (var "cx"))
-    [_Term_annotated>>: lambda "at" $
-       encodeTerm @@ var "cx" @@ var "g" @@ Core.annotatedTermBody (var "at"),
-     _Term_application>>: lambda "app" $
-       "fun" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Core.applicationFunction (var "app")) $
-       "arg" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Core.applicationArgument (var "app")) $
-         right (rustCall @@ var "fun" @@ list [var "arg"]),
-     _Term_either>>: lambda "e" $
-       Eithers.either_
-         (lambda "l" $
-           "sl" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "l") $
-             right (rustCall @@ (rustExprPath @@ string "Left") @@ list [var "sl"]))
-         (lambda "r" $
-           "sr" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "r") $
-             right (rustCall @@ (rustExprPath @@ string "Right") @@ list [var "sr"]))
-         (var "e"),
-     _Term_lambda>>: lambda "lam" $
-       "param" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.lambdaParameter (var "lam"))) $
-       "body" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Core.lambdaBody (var "lam")) $
-         right (rustClosure @@ list [var "param"] @@ var "body"),
-     _Term_project>>: lambda "proj" $
-       encodeProjectionElim @@ var "cx" @@ var "g" @@ var "proj" @@ nothing,
-     _Term_cases>>: lambda "cs" $
-       encodeUnionElim @@ var "cx" @@ var "g" @@ var "cs" @@ nothing,
-     _Term_unwrap>>: lambda "name" $
-       encodeUnwrapElim @@ var "cx" @@ var "g" @@ var "name" @@ nothing,
-     _Term_let>>: lambda "lt" $
-       "bindings" <~ Core.letBindings (var "lt") $
-       "body" <~ Core.letBody (var "lt") $
-       "stmts" <<~ (Eithers.mapList
-         (lambda "b" $
-           "bname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.bindingName (var "b"))) $
-           "bval" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Core.bindingTerm (var "b")) $
-             right (rustLetStmt @@ var "bname" @@ var "bval"))
-         (var "bindings")) $
-       "bodyExpr" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "body") $
-         right (rustBlock @@ var "stmts" @@ var "bodyExpr"),
-     _Term_list>>: lambda "els" $
-       "sels" <<~ (Eithers.mapList (encodeTerm @@ var "cx" @@ var "g") (var "els")) $
-         right (rustCall @@ (rustExprPath @@ string "Vec::from") @@
-           list [inject R._Expression R._Expression_array $
-             inject R._ArrayExpr R._ArrayExpr_elements (var "sels")]),
-     _Term_literal>>: lambda "lit" $
-       right (encodeLiteral @@ var "lit"),
-     _Term_map>>: lambda "m" $
-       "pairs" <<~ (Eithers.mapList
-         (lambda "entry" $
-           "k" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Pairs.first (var "entry")) $
-           "v" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Pairs.second (var "entry")) $
-             right (inject R._Expression R._Expression_tuple $ list [var "k", var "v"]))
-         (Maps.toList (var "m"))) $
-         right (rustCall @@ (rustExprPath @@ string "BTreeMap::from") @@
-           list [inject R._Expression R._Expression_array $
-             inject R._ArrayExpr R._ArrayExpr_elements (var "pairs")]),
-     _Term_maybe>>: lambda "mt" $
-       Maybes.cases (var "mt")
-         (right (rustExprPath @@ string "None"))
-         (lambda "val" $
-           "sval" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "val") $
-             right (rustCall @@ (rustExprPath @@ string "Some") @@ list [var "sval"])),
-     _Term_pair>>: lambda "p" $
-       "f" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Pairs.first (var "p")) $
-       "s" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Pairs.second (var "p")) $
-         right (inject R._Expression R._Expression_tuple $ list [var "f", var "s"]),
-     _Term_record>>: lambda "rec" $
-       "rname" <~ Core.recordTypeName (var "rec") $
-       "fields" <~ Core.recordFields (var "rec") $
-       "sfields" <<~ (Eithers.mapList
-         (lambda "f" $
-           "fname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.fieldName (var "f"))) $
-           "fval" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Core.fieldTerm (var "f")) $
-             right (record R._FieldValue [
-               R._FieldValue_name>>: var "fname",
-               R._FieldValue_value>>: just (var "fval")]))
-         (var "fields")) $
-         right (inject R._Expression R._Expression_struct $
-           record R._StructExpr [
-             R._StructExpr_path>>:
-               record R._ExprPath [
-                 R._ExprPath_global>>: boolean False,
-                 R._ExprPath_segments>>: list [
-                   record R._PathSegment [
-                     R._PathSegment_name>>: Formatting.capitalize @@ (Names.localNameOf @@ var "rname"),
-                     R._PathSegment_arguments>>: inject R._GenericArguments R._GenericArguments_none unit]]],
-             R._StructExpr_fields>>: var "sfields",
-             R._StructExpr_rest>>: nothing]),
-     _Term_set>>: lambda "s" $
-       "sels" <<~ (Eithers.mapList (encodeTerm @@ var "cx" @@ var "g") (Sets.toList (var "s"))) $
-         right (rustCall @@ (rustExprPath @@ string "BTreeSet::from") @@
-           list [inject R._Expression R._Expression_array $
-             inject R._ArrayExpr R._ArrayExpr_elements (var "sels")]),
-     _Term_inject>>: lambda "inj" $
-       "tname" <~ (Formatting.capitalize @@ (Names.localNameOf @@ Core.injectionTypeName (var "inj"))) $
-       "field" <~ Core.injectionField (var "inj") $
-       "fname" <~ (Formatting.capitalize @@ Core.unName (Core.fieldName (var "field"))) $
-       "fterm" <~ Core.fieldTerm (var "field") $
-       "dterm" <~ (Strip.deannotateTerm @@ var "fterm") $
-       "isUnit" <~ (cases _Term (var "dterm") (Just $ boolean False) [
-         _Term_unit>>: constant $ boolean True,
-         _Term_record>>: lambda "rt" $ Lists.null (Core.recordFields (var "rt"))]) $
-       Logic.ifElse (var "isUnit")
-         (right (rustExprPath @@ Strings.cat2 (Strings.cat2 (var "tname") (string "::")) (var "fname")))
-         ("sval" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "fterm") $
-           right (rustCall @@ (rustExprPath @@ Strings.cat2 (Strings.cat2 (var "tname") (string "::")) (var "fname")) @@ list [var "sval"])),
-     _Term_unit>>: constant $
-       right (inject R._Expression R._Expression_tuple $ list ([] :: [TTerm R.Expression])),
-     _Term_variable>>: lambda "name" $
-       right (rustExprPath @@ (Formatting.convertCaseCamelToLowerSnake @@ (Formatting.sanitizeWithUnderscores @@ RustLanguageSource.rustReservedWords @@ Core.unName (var "name")))),
-     _Term_wrap>>: lambda "wt" $
-       "tname" <~ (Formatting.capitalize @@ (Names.localNameOf @@ Core.wrappedTermTypeName (var "wt"))) $
-       "inner" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ Core.wrappedTermBody (var "wt")) $
-         right (rustCall @@ (rustExprPath @@ var "tname") @@ list [var "inner"])]
-
--- =============================================================================
--- Elimination encoding
--- =============================================================================
-
--- | Encode a Hydra term definition as a Rust function item
-encodeTermDefinition :: TTermDefinition (Context -> Graph -> TermDefinition -> Either Error R.ItemWithComments)
-encodeTermDefinition = def "encodeTermDefinition" $
-  "cx" ~> "g" ~> lambda "tdef" $
-    "name" <~ Packaging.termDefinitionName (var "tdef") $
-    "term" <~ Packaging.termDefinitionTerm (var "tdef") $
-    "lname" <~ (Formatting.convertCaseCamelToLowerSnake @@ (Names.localNameOf @@ var "name")) $
-    "typ" <~ Maybes.maybe
-      (Core.typeVariable (wrap _Name (string "hydra.core.Unit")))
-      (unaryFunction Core.typeSchemeBody)
-      (Packaging.termDefinitionTypeScheme (var "tdef")) $
-    "body" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "term") $
-    "retType" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "typ") $
-      right (record R._ItemWithComments [
-        R._ItemWithComments_doc>>: nothing,
-        R._ItemWithComments_visibility>>: inject R._Visibility R._Visibility_public unit,
-        R._ItemWithComments_item>>: inject R._Item R._Item_fn $
-          record R._FnDef [
-            R._FnDef_name>>: var "lname",
-            R._FnDef_generics>>: list ([] :: [TTerm R.GenericParam]),
-            R._FnDef_whereClause>>: nothing,
-            R._FnDef_params>>: list ([] :: [TTerm R.FnParam]),
-            R._FnDef_returnType>>: just (var "retType"),
-            R._FnDef_body>>: record R._Block [
-              R._Block_statements>>: list ([] :: [TTerm R.Statement]),
-              R._Block_expression>>: just (var "body")],
-            R._FnDef_public>>: boolean True,
-            R._FnDef_async>>: boolean False,
-            R._FnDef_const>>: boolean False,
-            R._FnDef_unsafe>>: boolean False,
-            R._FnDef_doc>>: nothing]])
-
--- =============================================================================
--- Module entry point
--- =============================================================================
-
--- | Encode a Hydra type as a Rust syntax type
-encodeType :: TTermDefinition (Context -> Graph -> Type -> Either Error R.Type)
-encodeType = def "encodeType" $
-  "cx" ~> "g" ~> lambda "t" $
-    "typ" <~ (Strip.deannotateType @@ var "t") $
-    cases _Type (var "typ") Nothing [
-      _Type_annotated>>: lambda "at" $
-        encodeType @@ var "cx" @@ var "g" @@ Core.annotatedTypeBody (var "at"),
-      _Type_application>>: lambda "at" $
-        encodeType @@ var "cx" @@ var "g" @@ Core.applicationTypeFunction (var "at"),
-      _Type_unit>>: constant $
-        right (asTerm rustUnit),
-      _Type_void>>: constant $
-        right (asTerm rustUnit),
-      _Type_literal>>: lambda "lt" $
-        right (encodeLiteralType @@ var "lt"),
-      _Type_list>>: lambda "inner" $
-        Eithers.map (lambda "enc" $ rustApply1 @@ string "Vec" @@ var "enc")
-          (encodeType @@ var "cx" @@ var "g" @@ var "inner"),
-      _Type_set>>: lambda "inner" $
-        Eithers.map (lambda "enc" $ rustApply1 @@ string "BTreeSet" @@ var "enc")
-          (encodeType @@ var "cx" @@ var "g" @@ var "inner"),
-      _Type_map>>: lambda "mt" $
-        "kt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.mapTypeKeys (var "mt")) $
-        "vt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.mapTypeValues (var "mt")) $
-          right (rustApply2 @@ string "BTreeMap" @@ var "kt" @@ var "vt"),
-      _Type_maybe>>: lambda "inner" $
-        Eithers.map (lambda "enc" $ rustApply1 @@ string "Option" @@ var "enc")
-          (encodeType @@ var "cx" @@ var "g" @@ var "inner"),
-      _Type_either>>: lambda "et" $
-        "lt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.eitherTypeLeft (var "et")) $
-        "rt" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.eitherTypeRight (var "et")) $
-          right (rustApply2 @@ string "Either" @@ var "lt" @@ var "rt"),
-      _Type_pair>>: lambda "pt" $
-        "ft" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.pairTypeFirst (var "pt")) $
-        "st" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.pairTypeSecond (var "pt")) $
-          right (inject R._Type R._Type_tuple $ list [var "ft", var "st"]),
-      _Type_function>>: lambda "ft" $
-        "dom" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.functionTypeDomain (var "ft")) $
-        "cod" <<~ (encodeType @@ var "cx" @@ var "g" @@ Core.functionTypeCodomain (var "ft")) $
-          right (rustApply1 @@ string "Box"
-            @@ (inject R._Type R._Type_dynTrait $ list [
-              inject R._TypeParamBound R._TypeParamBound_trait $
-                record R._TypePath [
-                  R._TypePath_global>>: boolean False,
-                  R._TypePath_segments>>: list [
-                    record R._PathSegment [
-                      R._PathSegment_name>>: string "Fn",
-                      R._PathSegment_arguments>>:
-                        inject R._GenericArguments R._GenericArguments_parenthesized $
-                          record R._ParenthesizedArgs [
-                            R._ParenthesizedArgs_inputs>>: list [var "dom"],
-                            R._ParenthesizedArgs_output>>: just (var "cod")]]]]])),
-      _Type_record>>: lambda "_" $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous record type")) (var "cx"),
-      _Type_union>>: lambda "_" $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous union type")) (var "cx"),
-      _Type_wrap>>: lambda "_" $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous wrap type")) (var "cx"),
-      _Type_variable>>: lambda "name" $
-        right (rustPath @@ (Formatting.capitalize @@ Core.unName (var "name"))),
-      _Type_forall>>: lambda "fa" $
-        encodeType @@ var "cx" @@ var "g" @@ Core.forallTypeBody (var "fa")]
-
--- =============================================================================
--- Term encoding
--- =============================================================================
-
--- | Encode a Hydra type definition as a Rust item
-encodeTypeDefinition :: TTermDefinition (Context -> Graph -> TypeDefinition -> Either Error R.ItemWithComments)
-encodeTypeDefinition = def "encodeTypeDefinition" $
-  "cx" ~> "g" ~> lambda "tdef" $
-    "name" <~ Packaging.typeDefinitionName (var "tdef") $
-    "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "tdef")) $
-    "lname" <~ (Formatting.capitalize @@ (Names.localNameOf @@ var "name")) $
-    -- Filter free type variables to unqualified names only (type parameters, not type references)
-    "freeVars" <~ (Lists.filter
-      (lambda "v" $ Equality.equal (Lists.length (Strings.splitOn (string ".") (Core.unName (var "v")))) (int32 1))
-      (Sets.toList (Variables.freeVariablesInType @@ var "typ"))) $
-    "generics" <~ (Lists.map (lambda "v" $
-      record R._GenericParam [
-        R._GenericParam_name>>: Formatting.capitalize @@ Core.unName (var "v"),
-        R._GenericParam_bounds>>: list ([] :: [TTerm R.TypeParamBound])])
-      (var "freeVars")) $
-    "dtyp" <~ (Strip.deannotateType @@ var "typ") $
-    "item" <<~ (cases _Type (var "dtyp") (Just $
-        -- Fallback: type alias
-        "styp" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "typ") $
-          right (inject R._Item R._Item_typeAlias $
-            record R._TypeAlias [
-              R._TypeAlias_name>>: var "lname",
-              R._TypeAlias_generics>>: var "generics",
-              R._TypeAlias_type>>: var "styp",
-              R._TypeAlias_public>>: boolean True,
-              R._TypeAlias_doc>>: nothing]))
-      [_Type_record>>: lambda "rt" $
-        "sfields" <<~ (Eithers.mapList (encodeStructField @@ var "cx" @@ var "g") (var "rt")) $
-          right (inject R._Item R._Item_struct $
-            record R._StructDef [
-              R._StructDef_name>>: var "lname",
-              R._StructDef_generics>>: var "generics",
-              R._StructDef_whereClause>>: nothing,
-              R._StructDef_body>>: inject R._StructBody R._StructBody_named (var "sfields"),
-              R._StructDef_derives>>: asTerm standardDerives,
-              R._StructDef_public>>: boolean True,
-              R._StructDef_doc>>: nothing]),
-      _Type_union>>: lambda "rt" $
-        "variants" <<~ (Eithers.mapList (encodeEnumVariant @@ var "cx" @@ var "g") (var "rt")) $
-          right (inject R._Item R._Item_enum $
-            record R._EnumDef [
-              R._EnumDef_name>>: var "lname",
-              R._EnumDef_generics>>: var "generics",
-              R._EnumDef_whereClause>>: nothing,
-              R._EnumDef_variants>>: var "variants",
-              R._EnumDef_derives>>: asTerm standardDerives,
-              R._EnumDef_public>>: boolean True,
-              R._EnumDef_doc>>: nothing]),
-      _Type_wrap>>: lambda "wt" $
-        "styp" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "wt") $
-          right (inject R._Item R._Item_struct $
-            record R._StructDef [
-              R._StructDef_name>>: var "lname",
-              R._StructDef_generics>>: var "generics",
-              R._StructDef_whereClause>>: nothing,
-              R._StructDef_body>>: inject R._StructBody R._StructBody_tuple $ list [
-                record R._TupleField [
-                  R._TupleField_type>>: var "styp",
-                  R._TupleField_public>>: boolean True]],
-              R._StructDef_derives>>: asTerm standardDerives,
-              R._StructDef_public>>: boolean True,
-              R._StructDef_doc>>: nothing])]) $
-    right (record R._ItemWithComments [
-      R._ItemWithComments_doc>>: nothing,
-      R._ItemWithComments_visibility>>: inject R._Visibility R._Visibility_public unit,
-      R._ItemWithComments_item>>: var "item"])
-
--- =============================================================================
--- Term definition encoding
--- =============================================================================
-
--- | Encode a Hydra case statement (union elimination) as a Rust expression.
--- Takes an optional argument for applied case statements.
-encodeUnionElim :: TTermDefinition (Context -> Graph -> CaseStatement -> Maybe Term -> Either Error R.Expression)
-encodeUnionElim = def "encodeUnionElim" $
-  "cx" ~> "g" ~> lambda "cs" $ lambda "marg" $
-        "tname" <~ (Formatting.capitalize @@ (Names.localNameOf @@ Core.caseStatementTypeName (var "cs"))) $
-        "caseFields" <~ Core.caseStatementCases (var "cs") $
-        "defCase" <~ Core.caseStatementDefault (var "cs") $
-        "arms" <<~ (Eithers.mapList
-          (lambda "cf" $
-            "cfname" <~ (Formatting.capitalize @@ Core.unName (Core.fieldName (var "cf"))) $
-            "cfterm" <~ Core.fieldTerm (var "cf") $
-            "armBody" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ (Core.termApplication (Core.application (var "cfterm") (Core.termVariable (wrap _Name (string "v")))))) $
-              right (record R._MatchArm [
-                R._MatchArm_pattern>>:
-                  inject R._Pattern R._Pattern_tupleStruct $
-                    record R._TupleStructPattern [
-                      R._TupleStructPattern_path>>:
-                        record R._ExprPath [
-                          R._ExprPath_global>>: boolean False,
-                          R._ExprPath_segments>>: list [
-                            record R._PathSegment [
-                              R._PathSegment_name>>: Strings.cat2 (Strings.cat2 (var "tname") (string "::")) (var "cfname"),
-                              R._PathSegment_arguments>>: inject R._GenericArguments R._GenericArguments_none unit]]],
-                      R._TupleStructPattern_elements>>: list [
-                        inject R._Pattern R._Pattern_identifier $
-                          record R._IdentifierPattern [
-                            R._IdentifierPattern_name>>: string "v",
-                            R._IdentifierPattern_mutable>>: boolean False,
-                            R._IdentifierPattern_atPattern>>: nothing]]],
-                R._MatchArm_guard>>: nothing,
-                R._MatchArm_body>>: var "armBody"]))
-          (var "caseFields")) $
-        -- Add default arm if present
-        "allArms" <<~ (Maybes.cases (var "defCase")
-          (right (var "arms"))
-          (lambda "dt" $
-            "defBody" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ (Core.termApplication (Core.application (var "dt") (Core.termVariable (wrap _Name (string "v")))))) $
-            right (Lists.concat2 (var "arms") (list [
-              record R._MatchArm [
-                R._MatchArm_pattern>>: inject R._Pattern R._Pattern_wildcard unit,
-                R._MatchArm_guard>>: nothing,
-                R._MatchArm_body>>: var "defBody"]])))) $
-        Maybes.cases (var "marg")
-          -- Unapplied: |v| match v { ... }
-          (right (rustClosure @@ list [string "v"] @@
-            (inject R._Expression R._Expression_match $
-              record R._MatchExpr [
-                R._MatchExpr_scrutinee>>: rustExprPath @@ string "v",
-                R._MatchExpr_arms>>: var "allArms"])))
-          (lambda "arg" $
-            "sarg" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "arg") $
-              right (inject R._Expression R._Expression_match $
-                record R._MatchExpr [
-                  R._MatchExpr_scrutinee>>: var "sarg",
-                  R._MatchExpr_arms>>: var "allArms"]))
-
--- | Encode a Hydra wrap elimination (unwrap) as a Rust expression.
--- Takes an optional argument for applied unwraps.
-encodeUnwrapElim :: TTermDefinition (Context -> Graph -> Name -> Maybe Term -> Either Error R.Expression)
-encodeUnwrapElim = def "encodeUnwrapElim" $
-  "cx" ~> "g" ~> lambda "name" $ lambda "marg" $
-        Maybes.cases (var "marg")
-          -- Unapplied: |v| v.0
-          (right (rustClosure @@ list [string "v"] @@
-            (inject R._Expression R._Expression_tupleIndex $
-              record R._TupleIndexExpr [
-                R._TupleIndexExpr_tuple>>: rustExprPath @@ string "v",
-                R._TupleIndexExpr_index>>: int32 0])))
-          (lambda "arg" $
-            "sarg" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "arg") $
-              right (inject R._Expression R._Expression_tupleIndex $
-                record R._TupleIndexExpr [
-                  R._TupleIndexExpr_tuple>>: var "sarg",
-                  R._TupleIndexExpr_index>>: int32 0]))
-
--- =============================================================================
--- Struct field encoding
--- =============================================================================
-
--- | Convert a Hydra module to a map of file paths to Rust source code strings.
-moduleToRust :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToRust = def "moduleToRust" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~>
-    "partitioned" <~ (Environment.partitionDefinitions @@ var "defs") $
-    "typeDefs" <~ Pairs.first (var "partitioned") $
-    "termDefs" <~ Pairs.second (var "partitioned") $
-    "typeItems" <<~ (Eithers.mapList (encodeTypeDefinition @@ var "cx" @@ var "g") (var "typeDefs")) $
-    "termItems" <<~ (Eithers.mapList (encodeTermDefinition @@ var "cx" @@ var "g") (var "termDefs")) $
-    "allItems" <~ Lists.concat2 (var "typeItems") (var "termItems") $
-    "crate" <~ (record R._Crate [R._Crate_items>>: var "allItems"]) $
-    "code" <~ (SerializationSource.printExpr @@ (SerializationSource.parenthesize @@ (RustSerdeSource.crateToExpr @@ var "crate"))) $
-    "filePath" <~ (Names.namespaceToFilePath @@ Util.caseConventionLowerSnake @@ wrap _FileExtension (string "rs") @@ (Packaging.moduleNamespace (var "mod"))) $
-      right (Maps.singleton (var "filePath") (var "code"))
-
--- | Apply a type constructor to one type argument (e.g., Vec<T>)
-rustApply1 :: TTermDefinition (String -> R.Type -> R.Type)
-rustApply1 = def "rustApply1" $
-  lambda "name" $ lambda "arg" $
-    inject R._Type R._Type_path $
-      record R._TypePath [
-        R._TypePath_global>>: boolean False,
-        R._TypePath_segments>>: list [
-          record R._PathSegment [
-            R._PathSegment_name>>: var "name",
-            R._PathSegment_arguments>>:
-              inject R._GenericArguments R._GenericArguments_angleBracketed $
-                record R._AngleBracketedArgs [
-                  R._AngleBracketedArgs_args>>: list [
-                    inject R._GenericArg R._GenericArg_type (var "arg")]]]]]
-
--- | Apply a type constructor to two type arguments (e.g., BTreeMap<K, V>)
-rustApply2 :: TTermDefinition (String -> R.Type -> R.Type -> R.Type)
-rustApply2 = def "rustApply2" $
-  lambda "name" $ lambda "arg1" $ lambda "arg2" $
-    inject R._Type R._Type_path $
-      record R._TypePath [
-        R._TypePath_global>>: boolean False,
-        R._TypePath_segments>>: list [
-          record R._PathSegment [
-            R._PathSegment_name>>: var "name",
-            R._PathSegment_arguments>>:
-              inject R._GenericArguments R._GenericArguments_angleBracketed $
-                record R._AngleBracketedArgs [
-                  R._AngleBracketedArgs_args>>: list [
-                    inject R._GenericArg R._GenericArg_type (var "arg1"),
-                    inject R._GenericArg R._GenericArg_type (var "arg2")]]]]]
-
--- | Block expression with statements and trailing expression
-rustBlock :: TTermDefinition ([R.Statement] -> R.Expression -> R.Expression)
-rustBlock = def "rustBlock" $
-  lambda "stmts" $ lambda "expr" $
-    inject R._Expression R._Expression_block $
-      record R._Block [
-        R._Block_statements>>: var "stmts",
-        R._Block_expression>>: just (var "expr")]
-
--- | Function call expression
-rustCall :: TTermDefinition (R.Expression -> [R.Expression] -> R.Expression)
-rustCall = def "rustCall" $
-  lambda "fun" $ lambda "args" $
-    inject R._Expression R._Expression_call $
-      record R._CallExpr [
-        R._CallExpr_function>>: var "fun",
-        R._CallExpr_args>>: var "args"]
-
--- | Closure expression: |params| body
-rustClosure :: TTermDefinition ([String] -> R.Expression -> R.Expression)
-rustClosure = def "rustClosure" $
-  lambda "params" $ lambda "body" $
-    inject R._Expression R._Expression_closure $
-      record R._ClosureExpr [
-        R._ClosureExpr_move>>: boolean False,
-        R._ClosureExpr_params>>:
-          Lists.map (lambda "p" $
-            record R._ClosureParam [
-              R._ClosureParam_pattern>>:
-                inject R._Pattern R._Pattern_identifier $
-                  record R._IdentifierPattern [
-                    R._IdentifierPattern_name>>: var "p",
-                    R._IdentifierPattern_mutable>>: boolean False,
-                    R._IdentifierPattern_atPattern>>: nothing],
-              R._ClosureParam_type>>: nothing])
-          (var "params"),
-        R._ClosureExpr_returnType>>: nothing,
-        R._ClosureExpr_body>>: var "body"]
-
--- =============================================================================
--- Literal type encoding
--- =============================================================================
-
--- | Variable reference as a path expression
-rustExprPath :: TTermDefinition (String -> R.Expression)
-rustExprPath = def "rustExprPath" $
-  lambda "name" $
-    inject R._Expression R._Expression_path $
-      record R._ExprPath [
-        R._ExprPath_global>>: boolean False,
-        R._ExprPath_segments>>: list [
-          record R._PathSegment [
-            R._PathSegment_name>>: var "name",
-            R._PathSegment_arguments>>: inject R._GenericArguments R._GenericArguments_none unit]]]
-
--- | Let statement: let name = expr;
-rustLetStmt :: TTermDefinition (String -> R.Expression -> R.Statement)
-rustLetStmt = def "rustLetStmt" $
-  lambda "name" $ lambda "expr" $
-    inject R._Statement R._Statement_let $
-      record R._LetStatement [
-        R._LetStatement_pattern>>:
-          inject R._Pattern R._Pattern_identifier $
-            record R._IdentifierPattern [
-              R._IdentifierPattern_name>>: var "name",
-              R._IdentifierPattern_mutable>>: boolean False,
-              R._IdentifierPattern_atPattern>>: nothing],
-        R._LetStatement_mutable>>: boolean False,
-        R._LetStatement_type>>: nothing,
-        R._LetStatement_init>>: just (var "expr")]
-
--- | Construct a simple Rust path type (e.g., "String" -> String)
-rustPath :: TTermDefinition (String -> R.Type)
-rustPath = def "rustPath" $
-  lambda "name" $
-    inject R._Type R._Type_path $
-      record R._TypePath [
-        R._TypePath_global>>: boolean False,
-        R._TypePath_segments>>: list [
-          record R._PathSegment [
-            R._PathSegment_name>>: var "name",
-            R._PathSegment_arguments>>: inject R._GenericArguments R._GenericArguments_none unit]]]
-
--- | Construct a Rust path type with multiple segments (e.g., ["num", "BigInt"] -> num::BigInt)
-rustPathSegmented :: TTermDefinition ([String] -> R.Type)
-rustPathSegmented = def "rustPathSegmented" $
-  lambda "segs" $
-    inject R._Type R._Type_path $
-      record R._TypePath [
-        R._TypePath_global>>: boolean False,
-        R._TypePath_segments>>:
-          Lists.map (lambda "s" $
-            record R._PathSegment [
-              R._PathSegment_name>>: var "s",
-              R._PathSegment_arguments>>: inject R._GenericArguments R._GenericArguments_none unit])
-          (var "segs")]
-
--- | The Rust unit type ()
-rustUnit :: TTermDefinition R.Type
-rustUnit = def "rustUnit" $
-  inject R._Type R._Type_unit unit
-
--- =============================================================================
--- Rust expression AST helpers
--- =============================================================================
-
-standardDerives :: TTermDefinition [String]
-standardDerives = def "standardDerives" $
-  list $ string <$> ["Clone", "Debug", "PartialEq", "Eq", "PartialOrd", "Ord"]
-
--- =============================================================================
--- Rust type AST helpers
--- =============================================================================
diff --git a/src/main/haskell/Hydra/Sources/Rust/Language.hs b/src/main/haskell/Hydra/Sources/Rust/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rust/Language.hs
+++ /dev/null
@@ -1,220 +0,0 @@
-module Hydra.Sources.Rust.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.rust.language"),
-            moduleDefinitions = [toDefinition rustLanguage, toDefinition rustReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Rust"}
-rustLanguage :: TTermDefinition Language
-rustLanguage = define "rustLanguage" $
-    doc "Language constraints for Rust" $ lets [
-    "eliminationVariants">: Sets.fromList $ list [
-      Variants.eliminationVariantRecord,
-      Variants.eliminationVariantUnion,
-      Variants.eliminationVariantWrap],
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBinary, -- &[u8], Vec<u8>
-      Variants.literalVariantBoolean, -- bool
-      Variants.literalVariantFloat, -- f32, f64
-      Variants.literalVariantInteger, -- i8, i16, i32, i64, i128, u8, u16, u32, u64, u128, isize, usize
-      Variants.literalVariantString], -- String, &str
-    "floatTypes">: Sets.fromList $ list [
-      Core.floatTypeFloat32, -- f32
-      Core.floatTypeFloat64], -- f64
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination,
-      Variants.functionVariantLambda],
-    "integerTypes">: Sets.fromList $ list [
-      Core.integerTypeInt8,   -- i8
-      Core.integerTypeInt16,  -- i16
-      Core.integerTypeInt32,  -- i32
-      Core.integerTypeInt64,  -- i64
-      Core.integerTypeUint8,  -- u8
-      Core.integerTypeUint16, -- u16
-      Core.integerTypeUint32, -- u32
-      Core.integerTypeUint64], -- u64
-      -- Note: Rust also has i128/u128 and isize/usize, but these are not in Hydra's core integer types
-    "termVariants">: Sets.fromList $ list [
-      Variants.termVariantAnnotated,
-      Variants.termVariantApplication,
-      Variants.termVariantEither,
-
-      Variants.termVariantCases,
-
-      Variants.termVariantLambda,
-
-      Variants.termVariantProject,
-
-      Variants.termVariantUnwrap,
-
-      Variants.termVariantTypeApplication,
-
-      Variants.termVariantTypeLambda,
-      Variants.termVariantLet,
-      Variants.termVariantList,
-      Variants.termVariantLiteral,
-      Variants.termVariantMap,
-      Variants.termVariantMaybe,
-      Variants.termVariantPair,
-      Variants.termVariantRecord,
-      Variants.termVariantSet,
-      Variants.termVariantInject,
-      Variants.termVariantUnit,
-      Variants.termVariantVariable,
-      Variants.termVariantWrap],
-    "typeVariants">: Sets.fromList $ list [
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication,
-      Variants.typeVariantEither,
-      Variants.typeVariantFunction,
-      Variants.typeVariantForall,
-      Variants.typeVariantList,
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap,
-      Variants.typeVariantMaybe,
-      Variants.typeVariantPair,
-      Variants.typeVariantRecord,
-      Variants.typeVariantSet,
-      Variants.typeVariantUnion,
-      Variants.typeVariantUnit,
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap],
-    "typePredicate">: constant true] $
-    Coders.language
-      (Coders.languageName_ $ string "hydra.rust")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
-rustReservedWords :: TTermDefinition (S.Set String)
-rustReservedWords = define "rustReservedWords" $
-  doc "A set of reserved words in Rust" $
-  lets [
-    "strictKeywords">:
-      doc "Rust strict keywords (cannot be used as identifiers). See https://doc.rust-lang.org/reference/keywords.html" $
-      list $ string <$> [
-        "as", "async", "await", "break", "const", "continue", "crate", "dyn", "else", "enum", "extern",
-        "false", "fn", "for", "if", "impl", "in", "let", "loop", "match", "mod", "move", "mut",
-        "pub", "ref", "return", "self", "Self", "static", "struct", "super", "trait", "true", "type",
-        "unsafe", "use", "where", "while"],
-    "reservedKeywords">:
-      doc "Rust reserved keywords (reserved for future use). See https://doc.rust-lang.org/reference/keywords.html" $
-      list $ string <$> [
-        "abstract", "become", "box", "do", "final", "macro", "override", "priv", "try", "typeof",
-        "unsized", "virtual", "yield"],
-    "weakKeywords">:
-      doc "Rust weak keywords (have special meaning in certain contexts). See https://doc.rust-lang.org/reference/keywords.html" $
-      list $ string <$> [
-        "macro_rules", "union", "'static"],
-    "primitiveTypes">:
-      doc "Rust primitive type names that we reserve to avoid confusion" $
-      list $ string <$> [
-        "bool", "char", "str", "u8", "u16", "u32", "u64", "u128", "usize",
-        "i8", "i16", "i32", "i64", "i128", "isize", "f32", "f64"],
-    "stdPreludeTypes">:
-      doc "Common types from std::prelude that we reserve to avoid shadowing" $
-      list $ string <$> [
-        "Option", "Some", "None", "Result", "Ok", "Err", "Box", "String", "Vec",
-        "Clone", "Copy", "Default", "Drop", "Eq", "PartialEq", "Ord", "PartialOrd",
-        "Hash", "Debug", "Display", "Iterator", "IntoIterator", "From", "Into",
-        "AsRef", "AsMut", "Send", "Sync", "Sized", "Unpin", "Fn", "FnMut", "FnOnce"],
-    "hydraRustKeywords">:
-      doc "Reserved words which are specific to Hydra-Rust code generation" $
-      list $ string <$> ["Node"]] $
-    Sets.fromList $ Lists.concat $ list [
-      var "strictKeywords",
-      var "reservedKeywords",
-      var "weakKeywords",
-      var "primitiveTypes",
-      var "stdPreludeTypes",
-      var "hydraRustKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Rust/Operators.hs b/src/main/haskell/Hydra/Sources/Rust/Operators.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rust/Operators.hs
+++ /dev/null
@@ -1,448 +0,0 @@
--- | AST operators for Rust serialization.
--- Defines operator precedence and associativity based on:
--- https://doc.rust-lang.org/reference/expressions.html#expression-precedence
-
-module Hydra.Sources.Rust.Operators where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (orOp)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.rust.operators"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "AST operators for Rust serialization"}
-  where
-    definitions = [
-      -- Assignment operators (lowest precedence)
-      toDefinition assignOp,
-      toDefinition addAssignOp,
-      toDefinition subAssignOp,
-      toDefinition mulAssignOp,
-      toDefinition divAssignOp,
-      toDefinition remAssignOp,
-      toDefinition bitAndAssignOp,
-      toDefinition bitOrAssignOp,
-      toDefinition bitXorAssignOp,
-      toDefinition shlAssignOp,
-      toDefinition shrAssignOp,
-      -- Range operators
-      toDefinition rangeOp,
-      toDefinition rangeInclusiveOp,
-      -- Logical operators
-      toDefinition orOp,
-      toDefinition andOp,
-      -- Comparison operators
-      toDefinition eqOp,
-      toDefinition neOp,
-      toDefinition ltOp,
-      toDefinition leOp,
-      toDefinition gtOp,
-      toDefinition geOp,
-      -- Bitwise operators
-      toDefinition bitOrOp,
-      toDefinition bitXorOp,
-      toDefinition bitAndOp,
-      -- Shift operators
-      toDefinition shlOp,
-      toDefinition shrOp,
-      -- Arithmetic operators
-      toDefinition addOp,
-      toDefinition subOp,
-      toDefinition mulOp,
-      toDefinition divOp,
-      toDefinition remOp,
-      -- Cast and type ascription
-      toDefinition asOp,
-      toDefinition colonOp,
-      -- Unary operators (highest precedence)
-      toDefinition negOp,
-      toDefinition notOp,
-      toDefinition derefOp,
-      toDefinition refOp,
-      -- Other operators
-      toDefinition appOp,
-      toDefinition fieldOp,
-      toDefinition methodOp,
-      toDefinition arrowOp,
-      toDefinition fatArrowOp,
-      toDefinition doubleColonOp,
-      toDefinition colonColonOp]
-
--- =============================================================================
--- Assignment operators (precedence 1, right associative)
--- =============================================================================
-
-assignOp :: TTermDefinition Op
-assignOp = define "assignOp" $
-  doc "Assignment operator (=)" $
-  Serialization.op @@ string "=" @@ int32 1 @@ Ast.associativityRight
-
-addAssignOp :: TTermDefinition Op
-addAssignOp = define "addAssignOp" $
-  doc "Add-assign operator (+=)" $
-  Serialization.op @@ string "+=" @@ int32 1 @@ Ast.associativityRight
-
-subAssignOp :: TTermDefinition Op
-subAssignOp = define "subAssignOp" $
-  doc "Sub-assign operator (-=)" $
-  Serialization.op @@ string "-=" @@ int32 1 @@ Ast.associativityRight
-
-mulAssignOp :: TTermDefinition Op
-mulAssignOp = define "mulAssignOp" $
-  doc "Mul-assign operator (*=)" $
-  Serialization.op @@ string "*=" @@ int32 1 @@ Ast.associativityRight
-
-divAssignOp :: TTermDefinition Op
-divAssignOp = define "divAssignOp" $
-  doc "Div-assign operator (/=)" $
-  Serialization.op @@ string "/=" @@ int32 1 @@ Ast.associativityRight
-
-remAssignOp :: TTermDefinition Op
-remAssignOp = define "remAssignOp" $
-  doc "Rem-assign operator (%=)" $
-  Serialization.op @@ string "%=" @@ int32 1 @@ Ast.associativityRight
-
-bitAndAssignOp :: TTermDefinition Op
-bitAndAssignOp = define "bitAndAssignOp" $
-  doc "Bitwise and-assign operator (&=)" $
-  Serialization.op @@ string "&=" @@ int32 1 @@ Ast.associativityRight
-
-bitOrAssignOp :: TTermDefinition Op
-bitOrAssignOp = define "bitOrAssignOp" $
-  doc "Bitwise or-assign operator (|=)" $
-  Serialization.op @@ string "|=" @@ int32 1 @@ Ast.associativityRight
-
-bitXorAssignOp :: TTermDefinition Op
-bitXorAssignOp = define "bitXorAssignOp" $
-  doc "Bitwise xor-assign operator (^=)" $
-  Serialization.op @@ string "^=" @@ int32 1 @@ Ast.associativityRight
-
-shlAssignOp :: TTermDefinition Op
-shlAssignOp = define "shlAssignOp" $
-  doc "Shift-left assign operator (<<=)" $
-  Serialization.op @@ string "<<=" @@ int32 1 @@ Ast.associativityRight
-
-shrAssignOp :: TTermDefinition Op
-shrAssignOp = define "shrAssignOp" $
-  doc "Shift-right assign operator (>>=)" $
-  Serialization.op @@ string ">>=" @@ int32 1 @@ Ast.associativityRight
-
--- =============================================================================
--- Range operators (precedence 2, neither associative)
--- =============================================================================
-
-rangeOp :: TTermDefinition Op
-rangeOp = define "rangeOp" $
-  doc "Range operator (..)" $
-  Serialization.op @@ string ".." @@ int32 2 @@ Ast.associativityNone
-
-rangeInclusiveOp :: TTermDefinition Op
-rangeInclusiveOp = define "rangeInclusiveOp" $
-  doc "Inclusive range operator (..=)" $
-  Serialization.op @@ string "..=" @@ int32 2 @@ Ast.associativityNone
-
--- =============================================================================
--- Logical operators
--- =============================================================================
-
-orOp :: TTermDefinition Op
-orOp = define "orOp" $
-  doc "Logical OR operator (||)" $
-  Serialization.op @@ string "||" @@ int32 3 @@ Ast.associativityLeft
-
-andOp :: TTermDefinition Op
-andOp = define "andOp" $
-  doc "Logical AND operator (&&)" $
-  Serialization.op @@ string "&&" @@ int32 4 @@ Ast.associativityLeft
-
--- =============================================================================
--- Comparison operators (precedence 5, require parentheses for chaining)
--- =============================================================================
-
-eqOp :: TTermDefinition Op
-eqOp = define "eqOp" $
-  doc "Equality operator (==)" $
-  Serialization.op @@ string "==" @@ int32 5 @@ Ast.associativityNone
-
-neOp :: TTermDefinition Op
-neOp = define "neOp" $
-  doc "Not-equal operator (!=)" $
-  Serialization.op @@ string "!=" @@ int32 5 @@ Ast.associativityNone
-
-ltOp :: TTermDefinition Op
-ltOp = define "ltOp" $
-  doc "Less-than operator (<)" $
-  Serialization.op @@ string "<" @@ int32 5 @@ Ast.associativityNone
-
-leOp :: TTermDefinition Op
-leOp = define "leOp" $
-  doc "Less-than-or-equal operator (<=)" $
-  Serialization.op @@ string "<=" @@ int32 5 @@ Ast.associativityNone
-
-gtOp :: TTermDefinition Op
-gtOp = define "gtOp" $
-  doc "Greater-than operator (>)" $
-  Serialization.op @@ string ">" @@ int32 5 @@ Ast.associativityNone
-
-geOp :: TTermDefinition Op
-geOp = define "geOp" $
-  doc "Greater-than-or-equal operator (>=)" $
-  Serialization.op @@ string ">=" @@ int32 5 @@ Ast.associativityNone
-
--- =============================================================================
--- Bitwise operators
--- =============================================================================
-
-bitOrOp :: TTermDefinition Op
-bitOrOp = define "bitOrOp" $
-  doc "Bitwise OR operator (|)" $
-  Serialization.op @@ string "|" @@ int32 6 @@ Ast.associativityLeft
-
-bitXorOp :: TTermDefinition Op
-bitXorOp = define "bitXorOp" $
-  doc "Bitwise XOR operator (^)" $
-  Serialization.op @@ string "^" @@ int32 7 @@ Ast.associativityLeft
-
-bitAndOp :: TTermDefinition Op
-bitAndOp = define "bitAndOp" $
-  doc "Bitwise AND operator (&)" $
-  Serialization.op @@ string "&" @@ int32 8 @@ Ast.associativityLeft
-
--- =============================================================================
--- Shift operators (precedence 9)
--- =============================================================================
-
-shlOp :: TTermDefinition Op
-shlOp = define "shlOp" $
-  doc "Shift-left operator (<<)" $
-  Serialization.op @@ string "<<" @@ int32 9 @@ Ast.associativityLeft
-
-shrOp :: TTermDefinition Op
-shrOp = define "shrOp" $
-  doc "Shift-right operator (>>)" $
-  Serialization.op @@ string ">>" @@ int32 9 @@ Ast.associativityLeft
-
--- =============================================================================
--- Arithmetic operators
--- =============================================================================
-
-addOp :: TTermDefinition Op
-addOp = define "addOp" $
-  doc "Addition operator (+)" $
-  Serialization.op @@ string "+" @@ int32 10 @@ Ast.associativityLeft
-
-subOp :: TTermDefinition Op
-subOp = define "subOp" $
-  doc "Subtraction operator (-)" $
-  Serialization.op @@ string "-" @@ int32 10 @@ Ast.associativityLeft
-
-mulOp :: TTermDefinition Op
-mulOp = define "mulOp" $
-  doc "Multiplication operator (*)" $
-  Serialization.op @@ string "*" @@ int32 11 @@ Ast.associativityLeft
-
-divOp :: TTermDefinition Op
-divOp = define "divOp" $
-  doc "Division operator (/)" $
-  Serialization.op @@ string "/" @@ int32 11 @@ Ast.associativityLeft
-
-remOp :: TTermDefinition Op
-remOp = define "remOp" $
-  doc "Remainder operator (%)" $
-  Serialization.op @@ string "%" @@ int32 11 @@ Ast.associativityLeft
-
--- =============================================================================
--- Type cast and ascription operators (precedence 12)
--- =============================================================================
-
-asOp :: TTermDefinition Op
-asOp = define "asOp" $
-  doc "Type cast operator (as)" $
-  Serialization.op @@ string "as" @@ int32 12 @@ Ast.associativityLeft
-
-colonOp :: TTermDefinition Op
-colonOp = define "colonOp" $
-  doc "Type ascription operator (:)" $
-  Serialization.op @@ string ":" @@ int32 12 @@ Ast.associativityLeft
-
--- =============================================================================
--- Unary operators (highest precedence 13)
--- =============================================================================
-
-negOp :: TTermDefinition Op
-negOp = define "negOp" $
-  doc "Unary negation operator (-)" $
-  Ast.op
-    (Ast.symbol $ string "-")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 13)
-    Ast.associativityNone
-
-notOp :: TTermDefinition Op
-notOp = define "notOp" $
-  doc "Unary logical not operator (!)" $
-  Ast.op
-    (Ast.symbol $ string "!")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 13)
-    Ast.associativityNone
-
-derefOp :: TTermDefinition Op
-derefOp = define "derefOp" $
-  doc "Dereference operator (*)" $
-  Ast.op
-    (Ast.symbol $ string "*")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 13)
-    Ast.associativityNone
-
-refOp :: TTermDefinition Op
-refOp = define "refOp" $
-  doc "Reference operator (&)" $
-  Ast.op
-    (Ast.symbol $ string "&")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 13)
-    Ast.associativityNone
-
--- =============================================================================
--- Other operators
--- =============================================================================
-
-appOp :: TTermDefinition Op
-appOp = define "appOp" $
-  doc "Function application operator (whitespace)" $
-  Ast.op
-    (Ast.symbol $ string "")
-    (Ast.padding Ast.wsNone Ast.wsSpace)
-    (Ast.precedence $ int32 0)
-    Ast.associativityLeft
-
-fieldOp :: TTermDefinition Op
-fieldOp = define "fieldOp" $
-  doc "Field access operator (.)" $
-  Ast.op
-    (Ast.symbol $ string ".")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 14)
-    Ast.associativityLeft
-
-methodOp :: TTermDefinition Op
-methodOp = define "methodOp" $
-  doc "Method call operator (.)" $
-  Ast.op
-    (Ast.symbol $ string ".")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 14)
-    Ast.associativityLeft
-
-arrowOp :: TTermDefinition Op
-arrowOp = define "arrowOp" $
-  doc "Return type arrow (->)" $
-  Serialization.op @@ string "->" @@ int32 0 @@ Ast.associativityRight
-
-fatArrowOp :: TTermDefinition Op
-fatArrowOp = define "fatArrowOp" $
-  doc "Match arm arrow (=>)" $
-  Serialization.op @@ string "=>" @@ int32 0 @@ Ast.associativityNone
-
-doubleColonOp :: TTermDefinition Op
-doubleColonOp = define "doubleColonOp" $
-  doc "Path separator (::)" $
-  Ast.op
-    (Ast.symbol $ string "::")
-    (Ast.padding Ast.wsNone Ast.wsNone)
-    (Ast.precedence $ int32 15)
-    Ast.associativityLeft
-
-colonColonOp :: TTermDefinition Op
-colonColonOp = define "colonColonOp" $
-  doc "Type annotation (::) for let statements" $
-  Serialization.op @@ string ":" @@ int32 0 @@ Ast.associativityNone
diff --git a/src/main/haskell/Hydra/Sources/Rust/Serde.hs b/src/main/haskell/Hydra/Sources/Rust/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rust/Serde.hs
+++ /dev/null
@@ -1,1597 +0,0 @@
--- | Rust serializer: converts Rust AST to concrete syntax (source code).
--- Serializes the Rust syntax model (Hydra.Rust.Syntax) into properly formatted Rust source code.
-
-module Hydra.Sources.Rust.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Rust.Syntax as R
-import qualified Hydra.Sources.Rust.Syntax as RustSyntax
-import qualified Hydra.Sources.Rust.Operators as RustOperators
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.rust.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Serialization.ns, RustOperators.ns],
-            moduleTypeDependencies = (RustSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Rust serializer: converts Rust AST to concrete syntax"}
-  where
-    definitions = [
-      -- Top-level serialization
-      toDefinition crateToExpr,
-      toDefinition itemToExpr,
-      toDefinition itemWithCommentsToExpr,
-      -- Use declarations
-      toDefinition useDeclarationToExpr,
-      toDefinition useTreeToExpr,
-      -- Struct definitions
-      toDefinition structDefToExpr,
-      toDefinition structBodyToExpr,
-      toDefinition structFieldToExpr,
-      -- Enum definitions
-      toDefinition enumDefToExpr,
-      toDefinition enumVariantToExpr,
-      toDefinition enumVariantBodyToExpr,
-      -- Function definitions
-      toDefinition fnDefToExpr,
-      toDefinition fnParamToExpr,
-      toDefinition methodParamToExpr,
-      -- Type aliases
-      toDefinition typeAliasToExpr,
-      -- Const, static, module
-      toDefinition constDefToExpr,
-      toDefinition staticDefToExpr,
-      toDefinition modDefToExpr,
-      -- Impl blocks
-      toDefinition implBlockToExpr,
-      toDefinition implItemToExpr,
-      toDefinition implMethodToExpr,
-      -- Trait definitions
-      toDefinition traitDefToExpr,
-      toDefinition traitItemToExpr,
-      toDefinition traitMethodToExpr,
-      toDefinition traitTypeToExpr,
-      toDefinition traitConstToExpr,
-      -- Generics and where clauses
-      toDefinition genericParamToExpr,
-      toDefinition genericParamsToExpr,
-      toDefinition typeParamBoundToExpr,
-      toDefinition whereClauseToExpr,
-      -- Types
-      toDefinition typeToExpr,
-      toDefinition typePathToExpr,
-      toDefinition pathSegmentToExpr,
-      toDefinition genericArgumentsToExpr,
-      toDefinition genericArgToExpr,
-      toDefinition referenceTypeToExpr,
-      -- Expressions
-      toDefinition expressionToExpr,
-      toDefinition exprPathToExpr,
-      toDefinition callExprToExpr,
-      toDefinition methodCallExprToExpr,
-      toDefinition fieldAccessExprToExpr,
-      toDefinition tupleIndexExprToExpr,
-      toDefinition closureExprToExpr,
-      toDefinition closureParamToStr,
-      toDefinition ifExprToExpr,
-      toDefinition matchExprToExpr,
-      toDefinition matchArmToExpr,
-      toDefinition loopExprToExpr,
-      toDefinition whileExprToExpr,
-      toDefinition forExprToExpr,
-      toDefinition binaryExprToExpr,
-      toDefinition binaryOpToExpr,
-      toDefinition unaryExprToExpr,
-      toDefinition refExprToExpr,
-      toDefinition structExprToExpr,
-      toDefinition fieldValueToExpr,
-      toDefinition arrayExprToExpr,
-      toDefinition indexExprToExpr,
-      toDefinition rangeExprToExpr,
-      toDefinition castExprToExpr,
-      toDefinition typeAscriptionExprToExpr,
-      toDefinition assignExprToExpr,
-      toDefinition compoundAssignExprToExpr,
-      toDefinition macroInvocationToExpr,
-      -- Statements
-      toDefinition statementToExpr,
-      toDefinition letStatementToExpr,
-      toDefinition blockToExpr,
-      -- Patterns
-      toDefinition patternToExpr,
-      toDefinition identifierPatternToExpr,
-      toDefinition refPatternToExpr,
-      toDefinition structPatternToExpr,
-      toDefinition fieldPatternToExpr,
-      toDefinition tupleStructPatternToExpr,
-      toDefinition rangePatternToExpr,
-      -- Literals
-      toDefinition literalToExpr,
-      toDefinition integerLiteralToExpr,
-      toDefinition floatLiteralToExpr,
-      -- Visibility and attributes
-      toDefinition visibilityToExpr,
-      toDefinition attributeToExpr,
-      toDefinition derivesToExpr,
-      -- Comments
-      toDefinition toRustDocComment,
-      toDefinition toRustComment]
-
--- =============================================================================
--- Top-level serialization
--- =============================================================================
-
-crateToExpr :: TTermDefinition (R.Crate -> Expr)
-crateToExpr = define "crateToExpr" $
-  doc "Serialize a Rust crate to an AST expression" $
-  lambda "crate" $
-    Serialization.doubleNewlineSep @@ (Lists.map (itemWithCommentsToExpr)
-      (project R._Crate R._Crate_items @@ var "crate"))
-
-itemWithCommentsToExpr :: TTermDefinition (R.ItemWithComments -> Expr)
-itemWithCommentsToExpr = define "itemWithCommentsToExpr" $
-  doc "Serialize an item with optional doc comments and visibility" $
-  lambda "iwc" $ lets [
-    "doc">: project R._ItemWithComments R._ItemWithComments_doc @@ var "iwc",
-    "vis">: project R._ItemWithComments R._ItemWithComments_visibility @@ var "iwc",
-    "item">: project R._ItemWithComments R._ItemWithComments_item @@ var "iwc",
-    "docPart">: Maybes.maybe
-      (list ([] :: [TTerm Expr]))
-      (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")])
-      (var "doc"),
-    "visPart">: visibilityToExpr @@ var "vis",
-    "itemPart">: itemToExpr @@ var "item"] $
-    Serialization.newlineSep @@ Lists.concat (list [var "docPart", list [
-      Serialization.spaceSep @@ Maybes.cat (list [var "visPart", just (var "itemPart")])]])
-
-itemToExpr :: TTermDefinition (R.Item -> Expr)
-itemToExpr = define "itemToExpr" $
-  doc "Serialize a Rust item to an AST expression" $
-  lambda "item" $
-    cases R._Item (var "item") Nothing [
-      R._Item_use>>: lambda "u" $ useDeclarationToExpr @@ var "u",
-      R._Item_struct>>: lambda "s" $ structDefToExpr @@ var "s",
-      R._Item_enum>>: lambda "e" $ enumDefToExpr @@ var "e",
-      R._Item_fn>>: lambda "f" $ fnDefToExpr @@ var "f",
-      R._Item_typeAlias>>: lambda "t" $ typeAliasToExpr @@ var "t",
-      R._Item_impl>>: lambda "i" $ implBlockToExpr @@ var "i",
-      R._Item_trait>>: lambda "t" $ traitDefToExpr @@ var "t",
-      R._Item_mod>>: lambda "m" $ modDefToExpr @@ var "m",
-      R._Item_const>>: lambda "c" $ constDefToExpr @@ var "c",
-      R._Item_static>>: lambda "s" $ staticDefToExpr @@ var "s",
-      R._Item_macro>>: lambda "m" $ macroInvocationToExpr @@ var "m"]
-
--- =============================================================================
--- Use declarations
--- =============================================================================
-
-useDeclarationToExpr :: TTermDefinition (R.UseDeclaration -> Expr)
-useDeclarationToExpr = define "useDeclarationToExpr" $
-  doc "Serialize a use declaration" $
-  lambda "use" $ lets [
-    "pub">: project R._UseDeclaration R._UseDeclaration_public @@ var "use",
-    "tree">: project R._UseDeclaration R._UseDeclaration_tree @@ var "use",
-    "pubKw">: Logic.ifElse (var "pub") (just $ Serialization.cst @@ string "pub") nothing] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      var "pubKw",
-      just $ Serialization.cst @@ string "use",
-      just $ useTreeToExpr @@ var "tree",
-      just $ Serialization.cst @@ string ";"])
-
-useTreeToExpr :: TTermDefinition (R.UseTree -> Expr)
-useTreeToExpr = define "useTreeToExpr" $
-  doc "Serialize a use tree" $
-  lambda "tree" $
-    cases R._UseTree (var "tree") Nothing [
-      R._UseTree_path>>: lambda "p" $
-        Serialization.cst @@ (Strings.intercalate (string "::") (project R._UsePath R._UsePath_segments @@ var "p")),
-      R._UseTree_rename>>: lambda "r" $ lets [
-        "path">: project R._UseRename R._UseRename_path @@ var "r",
-        "alias">: project R._UseRename R._UseRename_alias @@ var "r"] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ (Strings.intercalate (string "::") (var "path")),
-          Serialization.cst @@ string "as",
-          Serialization.cst @@ var "alias"],
-      R._UseTree_glob>>: lambda "segs" $
-        Serialization.cst @@ (Strings.cat2 (Strings.intercalate (string "::") (var "segs")) (string "::*")),
-      R._UseTree_group>>: lambda "g" $ lets [
-        "prefix">: project R._UseGroup R._UseGroup_prefix @@ var "g",
-        "trees">: project R._UseGroup R._UseGroup_trees @@ var "g",
-        "prefixStr">: Logic.ifElse (Lists.null $ var "prefix")
-          (string "")
-          (Strings.cat2 (Strings.intercalate (string "::") (var "prefix")) (string "::"))] $
-        Serialization.cst @@ (Strings.cat (list [
-          var "prefixStr",
-          string "{",
-          Strings.intercalate (string ", ") (Lists.map (lambda "t" $ Serialization.printExpr @@ (useTreeToExpr @@ var "t")) (var "trees")),
-          string "}"]))]
-
--- =============================================================================
--- Struct definitions
--- =============================================================================
-
-structDefToExpr :: TTermDefinition (R.StructDef -> Expr)
-structDefToExpr = define "structDefToExpr" $
-  doc "Serialize a struct definition" $
-  lambda "s" $ lets [
-    "name">: project R._StructDef R._StructDef_name @@ var "s",
-    "generics">: project R._StructDef R._StructDef_generics @@ var "s",
-    "whereC">: project R._StructDef R._StructDef_whereClause @@ var "s",
-    "body">: project R._StructDef R._StructDef_body @@ var "s",
-    "derives">: project R._StructDef R._StructDef_derives @@ var "s",
-    "docC">: project R._StructDef R._StructDef_doc @@ var "s",
-    "derivesAttr">: derivesToExpr @@ var "derives",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "struct",
-      just $ Serialization.cst @@ var "name",
-      genericParamsToExpr @@ var "generics"]),
-    "wherePart">: Maybes.maybe nothing (lambda "w" $ just $ whereClauseToExpr @@ var "w") (var "whereC")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [var "d"]) (var "derivesAttr"),
-      list [Serialization.spaceSep @@ Maybes.cat (list [
-        just $ var "header",
-        var "wherePart",
-        just $ structBodyToExpr @@ var "body"])]])
-
-structBodyToExpr :: TTermDefinition (R.StructBody -> Expr)
-structBodyToExpr = define "structBodyToExpr" $
-  doc "Serialize a struct body" $
-  lambda "body" $
-    cases R._StructBody (var "body") Nothing [
-      R._StructBody_named>>: lambda "fields" $
-        Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-          (Lists.map (structFieldToExpr) (var "fields")),
-      R._StructBody_tuple>>: lambda "fields" $
-        Serialization.spaceSep @@ list [
-          Serialization.parenList @@ false @@ (Lists.map (lambda "f" $ typeToExpr @@ (project R._TupleField R._TupleField_type @@ var "f")) (var "fields")),
-          Serialization.cst @@ string ";"],
-      R._StructBody_unit>>: constant $ Serialization.cst @@ string ";"]
-
-structFieldToExpr :: TTermDefinition (R.StructField -> Expr)
-structFieldToExpr = define "structFieldToExpr" $
-  doc "Serialize a struct field" $
-  lambda "field" $ lets [
-    "name">: project R._StructField R._StructField_name @@ var "field",
-    "typ">: project R._StructField R._StructField_type @@ var "field",
-    "pub">: project R._StructField R._StructField_public @@ var "field",
-    "docC">: project R._StructField R._StructField_doc @@ var "field",
-    "pubKw">: Logic.ifElse (var "pub") (just $ Serialization.cst @@ string "pub") nothing,
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      list [Serialization.spaceSep @@ Maybes.cat (list [
-        var "pubKw",
-        just $ Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-        just $ typeToExpr @@ var "typ"])]])
-
--- =============================================================================
--- Enum definitions
--- =============================================================================
-
-enumDefToExpr :: TTermDefinition (R.EnumDef -> Expr)
-enumDefToExpr = define "enumDefToExpr" $
-  doc "Serialize an enum definition" $
-  lambda "e" $ lets [
-    "name">: project R._EnumDef R._EnumDef_name @@ var "e",
-    "generics">: project R._EnumDef R._EnumDef_generics @@ var "e",
-    "whereC">: project R._EnumDef R._EnumDef_whereClause @@ var "e",
-    "variants">: project R._EnumDef R._EnumDef_variants @@ var "e",
-    "derives">: project R._EnumDef R._EnumDef_derives @@ var "e",
-    "docC">: project R._EnumDef R._EnumDef_doc @@ var "e",
-    "derivesAttr">: derivesToExpr @@ var "derives",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "enum",
-      just $ Serialization.cst @@ var "name",
-      genericParamsToExpr @@ var "generics"]),
-    "wherePart">: Maybes.maybe nothing (lambda "w" $ just $ whereClauseToExpr @@ var "w") (var "whereC"),
-    "body">: Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-      (Lists.map (enumVariantToExpr) (var "variants"))] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [var "d"]) (var "derivesAttr"),
-      list [Serialization.spaceSep @@ Maybes.cat (list [
-        just $ var "header",
-        var "wherePart",
-        just $ var "body"])]])
-
-enumVariantToExpr :: TTermDefinition (R.EnumVariant -> Expr)
-enumVariantToExpr = define "enumVariantToExpr" $
-  doc "Serialize an enum variant" $
-  lambda "v" $ lets [
-    "name">: project R._EnumVariant R._EnumVariant_name @@ var "v",
-    "body">: project R._EnumVariant R._EnumVariant_body @@ var "v",
-    "docC">: project R._EnumVariant R._EnumVariant_doc @@ var "v",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      list [Serialization.spaceSep @@ list [
-        Serialization.cst @@ var "name",
-        enumVariantBodyToExpr @@ var "body"]]])
-
-enumVariantBodyToExpr :: TTermDefinition (R.EnumVariantBody -> Expr)
-enumVariantBodyToExpr = define "enumVariantBodyToExpr" $
-  doc "Serialize an enum variant body" $
-  lambda "body" $
-    cases R._EnumVariantBody (var "body") Nothing [
-      R._EnumVariantBody_unit>>: constant $ Serialization.cst @@ string "",
-      R._EnumVariantBody_tuple>>: lambda "types" $
-        Serialization.parenList @@ false @@ (Lists.map (typeToExpr) (var "types")),
-      R._EnumVariantBody_struct>>: lambda "fields" $
-        Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-          (Lists.map (structFieldToExpr) (var "fields"))]
-
--- =============================================================================
--- Function definitions
--- =============================================================================
-
-fnDefToExpr :: TTermDefinition (R.FnDef -> Expr)
-fnDefToExpr = define "fnDefToExpr" $
-  doc "Serialize a function definition" $
-  lambda "f" $ lets [
-    "name">: project R._FnDef R._FnDef_name @@ var "f",
-    "generics">: project R._FnDef R._FnDef_generics @@ var "f",
-    "whereC">: project R._FnDef R._FnDef_whereClause @@ var "f",
-    "params">: project R._FnDef R._FnDef_params @@ var "f",
-    "retType">: project R._FnDef R._FnDef_returnType @@ var "f",
-    "body">: project R._FnDef R._FnDef_body @@ var "f",
-    "isAsync">: project R._FnDef R._FnDef_async @@ var "f",
-    "isConst">: project R._FnDef R._FnDef_const @@ var "f",
-    "isUnsafe">: project R._FnDef R._FnDef_unsafe @@ var "f",
-    "docC">: project R._FnDef R._FnDef_doc @@ var "f",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC"),
-    "asyncKw">: Logic.ifElse (var "isAsync") (just $ Serialization.cst @@ string "async") nothing,
-    "constKw">: Logic.ifElse (var "isConst") (just $ Serialization.cst @@ string "const") nothing,
-    "unsafeKw">: Logic.ifElse (var "isUnsafe") (just $ Serialization.cst @@ string "unsafe") nothing,
-    "fnKw">: Serialization.cst @@ string "fn",
-    "nameExpr">: Serialization.cst @@ var "name",
-    "genericsExpr">: genericParamsToExpr @@ var "generics",
-    "paramsExpr">: Serialization.parenList @@ false @@ (Lists.map (fnParamToExpr) (var "params")),
-    "retTypeExpr">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "->",
-      typeToExpr @@ var "t"]) (var "retType"),
-    "whereExpr">: Maybes.maybe nothing (lambda "w" $ just $ whereClauseToExpr @@ var "w") (var "whereC"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      var "asyncKw", var "constKw", var "unsafeKw",
-      just $ var "fnKw", just $ var "nameExpr", var "genericsExpr",
-      just $ var "paramsExpr", var "retTypeExpr", var "whereExpr"])] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      list [Serialization.spaceSep @@ list [var "header", blockToExpr @@ var "body"]]])
-
-fnParamToExpr :: TTermDefinition (R.FnParam -> Expr)
-fnParamToExpr = define "fnParamToExpr" $
-  doc "Serialize a function parameter" $
-  lambda "param" $ lets [
-    "pat">: project R._FnParam R._FnParam_pattern @@ var "param",
-    "typ">: project R._FnParam R._FnParam_type @@ var "param"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ (Strings.cat2 (Serialization.printExpr @@ (patternToExpr @@ var "pat")) (string ":")),
-      typeToExpr @@ var "typ"]
-
-methodParamToExpr :: TTermDefinition (R.MethodParam -> Expr)
-methodParamToExpr = define "methodParamToExpr" $
-  doc "Serialize a method parameter" $
-  lambda "param" $
-    cases R._MethodParam (var "param") Nothing [
-      R._MethodParam_self>>: lambda "sp" $
-        cases R._SelfParam (var "sp") Nothing [
-          R._SelfParam_owned>>: constant $ Serialization.cst @@ string "self",
-          R._SelfParam_ref>>: constant $ Serialization.cst @@ string "&self",
-          R._SelfParam_refMut>>: constant $ Serialization.cst @@ string "&mut self"],
-      R._MethodParam_regular>>: lambda "fp" $ fnParamToExpr @@ var "fp"]
-
--- =============================================================================
--- Type aliases
--- =============================================================================
-
-typeAliasToExpr :: TTermDefinition (R.TypeAlias -> Expr)
-typeAliasToExpr = define "typeAliasToExpr" $
-  doc "Serialize a type alias" $
-  lambda "ta" $ lets [
-    "name">: project R._TypeAlias R._TypeAlias_name @@ var "ta",
-    "generics">: project R._TypeAlias R._TypeAlias_generics @@ var "ta",
-    "typ">: project R._TypeAlias R._TypeAlias_type @@ var "ta",
-    "docC">: project R._TypeAlias R._TypeAlias_doc @@ var "ta",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      list [Serialization.spaceSep @@ Maybes.cat (list [
-        just $ Serialization.cst @@ string "type",
-        just $ Serialization.cst @@ var "name",
-        genericParamsToExpr @@ var "generics",
-        just $ Serialization.cst @@ string "=",
-        just $ typeToExpr @@ var "typ",
-        just $ Serialization.cst @@ string ";"])]])
-
--- =============================================================================
--- Const, static, module definitions
--- =============================================================================
-
-constDefToExpr :: TTermDefinition (R.ConstDef -> Expr)
-constDefToExpr = define "constDefToExpr" $
-  doc "Serialize a const definition" $
-  lambda "c" $ lets [
-    "name">: project R._ConstDef R._ConstDef_name @@ var "c",
-    "typ">: project R._ConstDef R._ConstDef_type @@ var "c",
-    "val">: project R._ConstDef R._ConstDef_value @@ var "c"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "const",
-      Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-      typeToExpr @@ var "typ",
-      Serialization.cst @@ string "=",
-      expressionToExpr @@ var "val",
-      Serialization.cst @@ string ";"]
-
-staticDefToExpr :: TTermDefinition (R.StaticDef -> Expr)
-staticDefToExpr = define "staticDefToExpr" $
-  doc "Serialize a static definition" $
-  lambda "s" $ lets [
-    "name">: project R._StaticDef R._StaticDef_name @@ var "s",
-    "typ">: project R._StaticDef R._StaticDef_type @@ var "s",
-    "val">: project R._StaticDef R._StaticDef_value @@ var "s",
-    "mut">: project R._StaticDef R._StaticDef_mutable @@ var "s",
-    "mutKw">: Logic.ifElse (var "mut") (just $ Serialization.cst @@ string "mut") nothing] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "static",
-      var "mutKw",
-      just $ Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-      just $ typeToExpr @@ var "typ",
-      just $ Serialization.cst @@ string "=",
-      just $ expressionToExpr @@ var "val",
-      just $ Serialization.cst @@ string ";"])
-
-modDefToExpr :: TTermDefinition (R.ModDef -> Expr)
-modDefToExpr = define "modDefToExpr" $
-  doc "Serialize a module definition" $
-  lambda "m" $ lets [
-    "name">: project R._ModDef R._ModDef_name @@ var "m",
-    "body">: project R._ModDef R._ModDef_body @@ var "m"] $
-    Maybes.maybe
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "mod",
-        Serialization.cst @@ var "name",
-        Serialization.cst @@ string ";"])
-      (lambda "items" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "mod",
-        Serialization.cst @@ var "name",
-        Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-          (Lists.map (itemToExpr) (var "items"))])
-      (var "body")
-
--- =============================================================================
--- Impl blocks
--- =============================================================================
-
-implBlockToExpr :: TTermDefinition (R.ImplBlock -> Expr)
-implBlockToExpr = define "implBlockToExpr" $
-  doc "Serialize an impl block" $
-  lambda "i" $ lets [
-    "generics">: project R._ImplBlock R._ImplBlock_generics @@ var "i",
-    "whereC">: project R._ImplBlock R._ImplBlock_whereClause @@ var "i",
-    "trait">: project R._ImplBlock R._ImplBlock_trait @@ var "i",
-    "selfType">: project R._ImplBlock R._ImplBlock_selfType @@ var "i",
-    "items">: project R._ImplBlock R._ImplBlock_items @@ var "i",
-    "genericsExpr">: genericParamsToExpr @@ var "generics",
-    "traitPart">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-      typePathToExpr @@ var "t",
-      Serialization.cst @@ string "for"]) (var "trait"),
-    "wherePart">: Maybes.maybe nothing (lambda "w" $ just $ whereClauseToExpr @@ var "w") (var "whereC"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "impl",
-      var "genericsExpr",
-      var "traitPart",
-      just $ typeToExpr @@ var "selfType",
-      var "wherePart"]),
-    "body">: Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-      (Lists.map (implItemToExpr) (var "items"))] $
-    Serialization.spaceSep @@ list [var "header", var "body"]
-
-implItemToExpr :: TTermDefinition (R.ImplItem -> Expr)
-implItemToExpr = define "implItemToExpr" $
-  doc "Serialize an impl item" $
-  lambda "item" $
-    cases R._ImplItem (var "item") Nothing [
-      R._ImplItem_method>>: lambda "m" $ implMethodToExpr @@ var "m",
-      R._ImplItem_type>>: lambda "t" $ typeAliasToExpr @@ var "t",
-      R._ImplItem_const>>: lambda "c" $ constDefToExpr @@ var "c"]
-
-implMethodToExpr :: TTermDefinition (R.ImplMethod -> Expr)
-implMethodToExpr = define "implMethodToExpr" $
-  doc "Serialize an impl method" $
-  lambda "m" $ lets [
-    "name">: project R._ImplMethod R._ImplMethod_name @@ var "m",
-    "generics">: project R._ImplMethod R._ImplMethod_generics @@ var "m",
-    "whereC">: project R._ImplMethod R._ImplMethod_whereClause @@ var "m",
-    "params">: project R._ImplMethod R._ImplMethod_params @@ var "m",
-    "retType">: project R._ImplMethod R._ImplMethod_returnType @@ var "m",
-    "body">: project R._ImplMethod R._ImplMethod_body @@ var "m",
-    "pub">: project R._ImplMethod R._ImplMethod_public @@ var "m",
-    "docC">: project R._ImplMethod R._ImplMethod_doc @@ var "m",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC"),
-    "pubKw">: Logic.ifElse (var "pub") (just $ Serialization.cst @@ string "pub") nothing,
-    "genericsExpr">: genericParamsToExpr @@ var "generics",
-    "paramsExpr">: Serialization.parenList @@ false @@ (Lists.map (methodParamToExpr) (var "params")),
-    "retTypeExpr">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "->",
-      typeToExpr @@ var "t"]) (var "retType"),
-    "whereExpr">: Maybes.maybe nothing (lambda "w" $ just $ whereClauseToExpr @@ var "w") (var "whereC"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      var "pubKw",
-      just $ Serialization.cst @@ string "fn",
-      just $ Serialization.cst @@ var "name",
-      var "genericsExpr",
-      just $ var "paramsExpr",
-      var "retTypeExpr",
-      var "whereExpr"])] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      list [Serialization.spaceSep @@ list [var "header", blockToExpr @@ var "body"]]])
-
--- =============================================================================
--- Trait definitions
--- =============================================================================
-
-traitDefToExpr :: TTermDefinition (R.TraitDef -> Expr)
-traitDefToExpr = define "traitDefToExpr" $
-  doc "Serialize a trait definition" $
-  lambda "t" $ lets [
-    "name">: project R._TraitDef R._TraitDef_name @@ var "t",
-    "generics">: project R._TraitDef R._TraitDef_generics @@ var "t",
-    "whereC">: project R._TraitDef R._TraitDef_whereClause @@ var "t",
-    "supers">: project R._TraitDef R._TraitDef_superTraits @@ var "t",
-    "items">: project R._TraitDef R._TraitDef_items @@ var "t",
-    "isUnsafe">: project R._TraitDef R._TraitDef_unsafe @@ var "t",
-    "docC">: project R._TraitDef R._TraitDef_doc @@ var "t",
-    "docPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "d" $ list [Serialization.cst @@ (toRustDocComment @@ var "d")]) (var "docC"),
-    "unsafeKw">: Logic.ifElse (var "isUnsafe") (just $ Serialization.cst @@ string "unsafe") nothing,
-    "genericsExpr">: genericParamsToExpr @@ var "generics",
-    "superPart">: Logic.ifElse (Lists.null $ var "supers") nothing
-      (just $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string ":",
-        Serialization.cst @@ (Strings.intercalate (string " + ") (Lists.map (lambda "b" $ Serialization.printExpr @@ (typeParamBoundToExpr @@ var "b")) (var "supers")))]),
-    "wherePart">: Maybes.maybe nothing (lambda "w" $ just $ whereClauseToExpr @@ var "w") (var "whereC"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      var "unsafeKw",
-      just $ Serialization.cst @@ string "trait",
-      just $ Serialization.cst @@ var "name",
-      var "genericsExpr",
-      var "superPart",
-      var "wherePart"]),
-    "body">: Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-      (Lists.map (traitItemToExpr) (var "items"))] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      var "docPart",
-      list [Serialization.spaceSep @@ list [var "header", var "body"]]])
-
-traitItemToExpr :: TTermDefinition (R.TraitItem -> Expr)
-traitItemToExpr = define "traitItemToExpr" $
-  doc "Serialize a trait item" $
-  lambda "item" $
-    cases R._TraitItem (var "item") Nothing [
-      R._TraitItem_method>>: lambda "m" $ traitMethodToExpr @@ var "m",
-      R._TraitItem_type>>: lambda "t" $ traitTypeToExpr @@ var "t",
-      R._TraitItem_const>>: lambda "c" $ traitConstToExpr @@ var "c"]
-
-traitMethodToExpr :: TTermDefinition (R.TraitMethod -> Expr)
-traitMethodToExpr = define "traitMethodToExpr" $
-  doc "Serialize a trait method" $
-  lambda "m" $ lets [
-    "name">: project R._TraitMethod R._TraitMethod_name @@ var "m",
-    "generics">: project R._TraitMethod R._TraitMethod_generics @@ var "m",
-    "params">: project R._TraitMethod R._TraitMethod_params @@ var "m",
-    "retType">: project R._TraitMethod R._TraitMethod_returnType @@ var "m",
-    "defBody">: project R._TraitMethod R._TraitMethod_defaultBody @@ var "m",
-    "genericsExpr">: genericParamsToExpr @@ var "generics",
-    "paramsExpr">: Serialization.parenList @@ false @@ (Lists.map (methodParamToExpr) (var "params")),
-    "retTypeExpr">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "->",
-      typeToExpr @@ var "t"]) (var "retType"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "fn",
-      just $ Serialization.cst @@ var "name",
-      var "genericsExpr",
-      just $ var "paramsExpr",
-      var "retTypeExpr"])] $
-    Maybes.maybe
-      (Serialization.spaceSep @@ list [var "header", Serialization.cst @@ string ";"])
-      (lambda "body" $ Serialization.spaceSep @@ list [var "header", blockToExpr @@ var "body"])
-      (var "defBody")
-
-traitTypeToExpr :: TTermDefinition (R.TraitType -> Expr)
-traitTypeToExpr = define "traitTypeToExpr" $
-  doc "Serialize a trait associated type" $
-  lambda "t" $ lets [
-    "name">: project R._TraitType R._TraitType_name @@ var "t",
-    "bounds">: project R._TraitType R._TraitType_bounds @@ var "t",
-    "def">: project R._TraitType R._TraitType_default @@ var "t",
-    "boundsPart">: Logic.ifElse (Lists.null $ var "bounds") nothing
-      (just $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ string ":",
-        Serialization.cst @@ (Strings.intercalate (string " + ") (Lists.map (lambda "b" $ Serialization.printExpr @@ (typeParamBoundToExpr @@ var "b")) (var "bounds")))]),
-    "defPart">: Maybes.maybe nothing (lambda "d" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "=",
-      typeToExpr @@ var "d"]) (var "def")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "type",
-      just $ Serialization.cst @@ var "name",
-      var "boundsPart",
-      var "defPart",
-      just $ Serialization.cst @@ string ";"])
-
-traitConstToExpr :: TTermDefinition (R.TraitConst -> Expr)
-traitConstToExpr = define "traitConstToExpr" $
-  doc "Serialize a trait associated constant" $
-  lambda "c" $ lets [
-    "name">: project R._TraitConst R._TraitConst_name @@ var "c",
-    "typ">: project R._TraitConst R._TraitConst_type @@ var "c",
-    "def">: project R._TraitConst R._TraitConst_default @@ var "c",
-    "defPart">: Maybes.maybe nothing (lambda "d" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "=",
-      expressionToExpr @@ var "d"]) (var "def")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "const",
-      just $ Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-      just $ typeToExpr @@ var "typ",
-      var "defPart",
-      just $ Serialization.cst @@ string ";"])
-
--- =============================================================================
--- Generics and where clauses
--- =============================================================================
-
-genericParamToExpr :: TTermDefinition (R.GenericParam -> Expr)
-genericParamToExpr = define "genericParamToExpr" $
-  doc "Serialize a generic parameter" $
-  lambda "gp" $ lets [
-    "name">: project R._GenericParam R._GenericParam_name @@ var "gp",
-    "bounds">: project R._GenericParam R._GenericParam_bounds @@ var "gp"] $
-    Logic.ifElse (Lists.null $ var "bounds")
-      (Serialization.cst @@ var "name")
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-        Serialization.cst @@ (Strings.intercalate (string " + ") (Lists.map (lambda "b" $ Serialization.printExpr @@ (typeParamBoundToExpr @@ var "b")) (var "bounds")))])
-
-genericParamsToExpr :: TTermDefinition ([R.GenericParam] -> Maybe Expr)
-genericParamsToExpr = define "genericParamsToExpr" $
-  doc "Serialize a list of generic parameters" $
-  lambda "gps" $
-    Logic.ifElse (Lists.null $ var "gps")
-      nothing
-      (just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ (Lists.map (genericParamToExpr) (var "gps")))
-
-typeParamBoundToExpr :: TTermDefinition (R.TypeParamBound -> Expr)
-typeParamBoundToExpr = define "typeParamBoundToExpr" $
-  doc "Serialize a type parameter bound" $
-  lambda "bound" $
-    cases R._TypeParamBound (var "bound") Nothing [
-      R._TypeParamBound_trait>>: lambda "tp" $ typePathToExpr @@ var "tp",
-      R._TypeParamBound_lifetime>>: lambda "lt" $
-        Serialization.cst @@ (Strings.cat2 (string "'") (project R._Lifetime R._Lifetime_name @@ var "lt"))]
-
-whereClauseToExpr :: TTermDefinition (R.WhereClause -> Expr)
-whereClauseToExpr = define "whereClauseToExpr" $
-  doc "Serialize a where clause" $
-  lambda "wc" $ lets [
-    "preds">: project R._WhereClause R._WhereClause_predicates @@ var "wc",
-    "predExprs">: Lists.map (lambda "p" $ lets [
-      "typ">: project R._WherePredicate R._WherePredicate_type @@ var "p",
-      "bounds">: project R._WherePredicate R._WherePredicate_bounds @@ var "p"] $
-      Serialization.spaceSep @@ list [
-        typeToExpr @@ var "typ",
-        Serialization.cst @@ string ":",
-        Serialization.cst @@ (Strings.intercalate (string " + ") (Lists.map (lambda "b" $ Serialization.printExpr @@ (typeParamBoundToExpr @@ var "b")) (var "bounds")))]) (var "preds")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "where",
-      Serialization.commaSep @@ Serialization.inlineStyle @@ var "predExprs"]
-
--- =============================================================================
--- Types
--- =============================================================================
-
-typeToExpr :: TTermDefinition (R.Type -> Expr)
-typeToExpr = define "typeToExpr" $
-  doc "Serialize a Rust type" $
-  lambda "typ" $
-    cases R._Type (var "typ") Nothing [
-      R._Type_path>>: lambda "tp" $ typePathToExpr @@ var "tp",
-      R._Type_reference>>: lambda "rt" $ referenceTypeToExpr @@ var "rt",
-      R._Type_slice>>: lambda "t" $ Serialization.bracketList @@ Serialization.inlineStyle @@ list [typeToExpr @@ var "t"],
-      R._Type_array>>: lambda "at" $ lets [
-        "elem">: project R._ArrayType R._ArrayType_element @@ var "at",
-        "len">: project R._ArrayType R._ArrayType_length @@ var "at"] $
-        Serialization.cst @@ (Strings.cat (list [
-          string "[",
-          Serialization.printExpr @@ (typeToExpr @@ var "elem"),
-          string "; ",
-          Serialization.printExpr @@ (expressionToExpr @@ var "len"),
-          string "]"])),
-      R._Type_tuple>>: lambda "ts" $ Serialization.parenList @@ false @@ (Lists.map (typeToExpr) (var "ts")),
-      R._Type_fnPointer>>: lambda "fp" $ lets [
-        "params">: project R._FnPointerType R._FnPointerType_params @@ var "fp",
-        "ret">: project R._FnPointerType R._FnPointerType_returnType @@ var "fp"] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "fn",
-          Serialization.parenList @@ false @@ (Lists.map (typeToExpr) (var "params")),
-          Serialization.cst @@ string "->",
-          typeToExpr @@ var "ret"],
-      R._Type_implTrait>>: lambda "bounds" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "impl",
-          Serialization.cst @@ (Strings.intercalate (string " + ") (Lists.map (lambda "b" $ Serialization.printExpr @@ (typeParamBoundToExpr @@ var "b")) (var "bounds")))],
-      R._Type_dynTrait>>: lambda "bounds" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "dyn",
-          Serialization.cst @@ (Strings.intercalate (string " + ") (Lists.map (lambda "b" $ Serialization.printExpr @@ (typeParamBoundToExpr @@ var "b")) (var "bounds")))],
-      R._Type_inferred>>: constant $ Serialization.cst @@ string "_",
-      R._Type_unit>>: constant $ Serialization.cst @@ string "()",
-      R._Type_never>>: constant $ Serialization.cst @@ string "!",
-      R._Type_rawPointer>>: lambda "rp" $ lets [
-        "mut">: project R._RawPointerType R._RawPointerType_mutable @@ var "rp",
-        "t">: project R._RawPointerType R._RawPointerType_type @@ var "rp",
-        "kw">: Logic.ifElse (var "mut") (string "*mut") (string "*const")] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ var "kw",
-          typeToExpr @@ var "t"],
-      R._Type_macro>>: lambda "m" $ macroInvocationToExpr @@ var "m"]
-
-typePathToExpr :: TTermDefinition (R.TypePath -> Expr)
-typePathToExpr = define "typePathToExpr" $
-  doc "Serialize a type path" $
-  lambda "tp" $ lets [
-    "global">: project R._TypePath R._TypePath_global @@ var "tp",
-    "segs">: project R._TypePath R._TypePath_segments @@ var "tp",
-    "prefix">: Logic.ifElse (var "global") (string "::") (string ""),
-    "segStrs">: Lists.map (lambda "s" $ Serialization.printExpr @@ (pathSegmentToExpr @@ var "s")) (var "segs")] $
-    Serialization.cst @@ (Strings.cat2 (var "prefix") (Strings.intercalate (string "::") (var "segStrs")))
-
-pathSegmentToExpr :: TTermDefinition (R.PathSegment -> Expr)
-pathSegmentToExpr = define "pathSegmentToExpr" $
-  doc "Serialize a path segment" $
-  lambda "seg" $ lets [
-    "name">: project R._PathSegment R._PathSegment_name @@ var "seg",
-    "args">: project R._PathSegment R._PathSegment_arguments @@ var "seg"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ var "name",
-      genericArgumentsToExpr @@ var "args"])
-
-genericArgumentsToExpr :: TTermDefinition (R.GenericArguments -> Maybe Expr)
-genericArgumentsToExpr = define "genericArgumentsToExpr" $
-  doc "Serialize generic arguments" $
-  lambda "args" $
-    cases R._GenericArguments (var "args") Nothing [
-      R._GenericArguments_none>>: constant nothing,
-      R._GenericArguments_angleBracketed>>: lambda "ab" $ lets [
-        "args">: project R._AngleBracketedArgs R._AngleBracketedArgs_args @@ var "ab"] $
-        just $ Serialization.angleBracesList @@ Serialization.inlineStyle @@ (Lists.map (genericArgToExpr) (var "args")),
-      R._GenericArguments_parenthesized>>: lambda "pa" $ lets [
-        "inputs">: project R._ParenthesizedArgs R._ParenthesizedArgs_inputs @@ var "pa",
-        "output">: project R._ParenthesizedArgs R._ParenthesizedArgs_output @@ var "pa",
-        "inputPart">: Serialization.parenList @@ false @@ (Lists.map (typeToExpr) (var "inputs")),
-        "outputPart">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "->",
-          typeToExpr @@ var "t"]) (var "output")] $
-        just $ Serialization.spaceSep @@ Maybes.cat (list [just $ var "inputPart", var "outputPart"])]
-
-genericArgToExpr :: TTermDefinition (R.GenericArg -> Expr)
-genericArgToExpr = define "genericArgToExpr" $
-  doc "Serialize a generic argument" $
-  lambda "arg" $
-    cases R._GenericArg (var "arg") Nothing [
-      R._GenericArg_type>>: lambda "t" $ typeToExpr @@ var "t",
-      R._GenericArg_lifetime>>: lambda "lt" $
-        Serialization.cst @@ (Strings.cat2 (string "'") (project R._Lifetime R._Lifetime_name @@ var "lt")),
-      R._GenericArg_const>>: lambda "e" $ expressionToExpr @@ var "e",
-      R._GenericArg_binding>>: lambda "tb" $ lets [
-        "name">: project R._TypeBinding R._TypeBinding_name @@ var "tb",
-        "typ">: project R._TypeBinding R._TypeBinding_type @@ var "tb"] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ var "name",
-          Serialization.cst @@ string "=",
-          typeToExpr @@ var "typ"]]
-
-referenceTypeToExpr :: TTermDefinition (R.ReferenceType -> Expr)
-referenceTypeToExpr = define "referenceTypeToExpr" $
-  doc "Serialize a reference type" $
-  lambda "rt" $ lets [
-    "lt">: project R._ReferenceType R._ReferenceType_lifetime @@ var "rt",
-    "mut">: project R._ReferenceType R._ReferenceType_mutable @@ var "rt",
-    "t">: project R._ReferenceType R._ReferenceType_type @@ var "rt",
-    "ltPart">: Maybes.maybe (string "") (lambda "l" $ Strings.cat2 (string "'") (Strings.cat2 (project R._Lifetime R._Lifetime_name @@ var "l") (string " "))) (var "lt"),
-    "mutPart">: Logic.ifElse (var "mut") (string "mut ") (string "")] $
-    Serialization.cst @@ (Strings.cat (list [
-      string "&",
-      var "ltPart",
-      var "mutPart",
-      Serialization.printExpr @@ (typeToExpr @@ var "t")]))
-
--- =============================================================================
--- Expressions
--- =============================================================================
-
-expressionToExpr :: TTermDefinition (R.Expression -> Expr)
-expressionToExpr = define "expressionToExpr" $
-  doc "Serialize a Rust expression" $
-  lambda "expr" $
-    cases R._Expression (var "expr") Nothing [
-      R._Expression_literal>>: lambda "l" $ literalToExpr @@ var "l",
-      R._Expression_path>>: lambda "p" $ exprPathToExpr @@ var "p",
-      R._Expression_block>>: lambda "b" $ blockToExpr @@ var "b",
-      R._Expression_call>>: lambda "c" $ callExprToExpr @@ var "c",
-      R._Expression_methodCall>>: lambda "m" $ methodCallExprToExpr @@ var "m",
-      R._Expression_fieldAccess>>: lambda "f" $ fieldAccessExprToExpr @@ var "f",
-      R._Expression_tupleIndex>>: lambda "t" $ tupleIndexExprToExpr @@ var "t",
-      R._Expression_closure>>: lambda "c" $ closureExprToExpr @@ var "c",
-      R._Expression_if>>: lambda "i" $ ifExprToExpr @@ var "i",
-      R._Expression_match>>: lambda "m" $ matchExprToExpr @@ var "m",
-      R._Expression_loop>>: lambda "l" $ loopExprToExpr @@ var "l",
-      R._Expression_while>>: lambda "w" $ whileExprToExpr @@ var "w",
-      R._Expression_for>>: lambda "f" $ forExprToExpr @@ var "f",
-      R._Expression_binary>>: lambda "b" $ binaryExprToExpr @@ var "b",
-      R._Expression_unary>>: lambda "u" $ unaryExprToExpr @@ var "u",
-      R._Expression_reference>>: lambda "r" $ refExprToExpr @@ var "r",
-      R._Expression_dereference>>: lambda "d" $ Serialization.prefix @@ (string "*") @@ (expressionToExpr @@ var "d"),
-      R._Expression_struct>>: lambda "s" $ structExprToExpr @@ var "s",
-      R._Expression_tuple>>: lambda "es" $ Serialization.parenList @@ false @@ (Lists.map (expressionToExpr) (var "es")),
-      R._Expression_array>>: lambda "a" $ arrayExprToExpr @@ var "a",
-      R._Expression_index>>: lambda "i" $ indexExprToExpr @@ var "i",
-      R._Expression_range>>: lambda "r" $ rangeExprToExpr @@ var "r",
-      R._Expression_return>>: lambda "mr" $ Maybes.maybe
-        (Serialization.cst @@ string "return")
-        (lambda "e" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "return", expressionToExpr @@ var "e"])
-        (var "mr"),
-      R._Expression_break>>: lambda "mb" $ Maybes.maybe
-        (Serialization.cst @@ string "break")
-        (lambda "e" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "break", expressionToExpr @@ var "e"])
-        (var "mb"),
-      R._Expression_continue>>: constant $ Serialization.cst @@ string "continue",
-      R._Expression_try>>: lambda "e" $ Serialization.cst @@ (Strings.cat2 (Serialization.printExpr @@ (expressionToExpr @@ var "e")) (string "?")),
-      R._Expression_cast>>: lambda "c" $ castExprToExpr @@ var "c",
-      R._Expression_typeAscription>>: lambda "t" $ typeAscriptionExprToExpr @@ var "t",
-      R._Expression_await>>: lambda "e" $ Serialization.cst @@ (Strings.cat2 (Serialization.printExpr @@ (expressionToExpr @@ var "e")) (string ".await")),
-      R._Expression_assign>>: lambda "a" $ assignExprToExpr @@ var "a",
-      R._Expression_compoundAssign>>: lambda "c" $ compoundAssignExprToExpr @@ var "c",
-      R._Expression_macro>>: lambda "m" $ macroInvocationToExpr @@ var "m",
-      R._Expression_paren>>: lambda "e" $ Serialization.parenthesize @@ (expressionToExpr @@ var "e")]
-
-exprPathToExpr :: TTermDefinition (R.ExprPath -> Expr)
-exprPathToExpr = define "exprPathToExpr" $
-  doc "Serialize an expression path" $
-  lambda "ep" $ lets [
-    "global">: project R._ExprPath R._ExprPath_global @@ var "ep",
-    "segs">: project R._ExprPath R._ExprPath_segments @@ var "ep",
-    "prefix">: Logic.ifElse (var "global") (string "::") (string ""),
-    "segStrs">: Lists.map (lambda "s" $ Serialization.printExpr @@ (pathSegmentToExpr @@ var "s")) (var "segs")] $
-    Serialization.cst @@ (Strings.cat2 (var "prefix") (Strings.intercalate (string "::") (var "segStrs")))
-
-callExprToExpr :: TTermDefinition (R.CallExpr -> Expr)
-callExprToExpr = define "callExprToExpr" $
-  doc "Serialize a function call expression" $
-  lambda "c" $ lets [
-    "func">: project R._CallExpr R._CallExpr_function @@ var "c",
-    "args">: project R._CallExpr R._CallExpr_args @@ var "c"] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "func",
-      Serialization.parenList @@ false @@ (Lists.map (expressionToExpr) (var "args"))]
-
-methodCallExprToExpr :: TTermDefinition (R.MethodCallExpr -> Expr)
-methodCallExprToExpr = define "methodCallExprToExpr" $
-  doc "Serialize a method call expression" $
-  lambda "m" $ lets [
-    "recv">: project R._MethodCallExpr R._MethodCallExpr_receiver @@ var "m",
-    "method">: project R._MethodCallExpr R._MethodCallExpr_method @@ var "m",
-    "turbo">: project R._MethodCallExpr R._MethodCallExpr_turbofish @@ var "m",
-    "args">: project R._MethodCallExpr R._MethodCallExpr_args @@ var "m",
-    "turboPart">: Logic.ifElse (Lists.null $ var "turbo")
-      (string "")
-      (Strings.cat (list [
-        string "::<",
-        Strings.intercalate (string ", ") (Lists.map (lambda "t" $ Serialization.printExpr @@ (typeToExpr @@ var "t")) (var "turbo")),
-        string ">"]))] $
-    Serialization.cst @@ (Strings.cat (list [
-      Serialization.printExpr @@ (expressionToExpr @@ var "recv"),
-      string ".",
-      var "method",
-      var "turboPart",
-      string "(",
-      Strings.intercalate (string ", ") (Lists.map (lambda "a" $ Serialization.printExpr @@ (expressionToExpr @@ var "a")) (var "args")),
-      string ")"]))
-
-fieldAccessExprToExpr :: TTermDefinition (R.FieldAccessExpr -> Expr)
-fieldAccessExprToExpr = define "fieldAccessExprToExpr" $
-  doc "Serialize a field access expression" $
-  lambda "f" $ lets [
-    "obj">: project R._FieldAccessExpr R._FieldAccessExpr_object @@ var "f",
-    "field">: project R._FieldAccessExpr R._FieldAccessExpr_field @@ var "f"] $
-    Serialization.cst @@ (Strings.cat (list [
-      Serialization.printExpr @@ (expressionToExpr @@ var "obj"),
-      string ".",
-      var "field"]))
-
-tupleIndexExprToExpr :: TTermDefinition (R.TupleIndexExpr -> Expr)
-tupleIndexExprToExpr = define "tupleIndexExprToExpr" $
-  doc "Serialize a tuple index expression" $
-  lambda "t" $ lets [
-    "tuple">: project R._TupleIndexExpr R._TupleIndexExpr_tuple @@ var "t",
-    "idx">: project R._TupleIndexExpr R._TupleIndexExpr_index @@ var "t"] $
-    Serialization.cst @@ (Strings.cat (list [
-      Serialization.printExpr @@ (expressionToExpr @@ var "tuple"),
-      string ".",
-      Literals.showInt32 $ var "idx"]))
-
-closureExprToExpr :: TTermDefinition (R.ClosureExpr -> Expr)
-closureExprToExpr = define "closureExprToExpr" $
-  doc "Serialize a closure expression" $
-  lambda "c" $ lets [
-    "move">: project R._ClosureExpr R._ClosureExpr_move @@ var "c",
-    "params">: project R._ClosureExpr R._ClosureExpr_params @@ var "c",
-    "retType">: project R._ClosureExpr R._ClosureExpr_returnType @@ var "c",
-    "body">: project R._ClosureExpr R._ClosureExpr_body @@ var "c",
-    "moveKw">: Logic.ifElse (var "move") (just $ Serialization.cst @@ string "move") nothing,
-    "paramsStr">: Strings.cat (list [
-      string "|",
-      Strings.intercalate (string ", ") (Lists.map (closureParamToStr) (var "params")),
-      string "|"]),
-    "retPart">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "->",
-      typeToExpr @@ var "t"]) (var "retType")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      var "moveKw",
-      just $ Serialization.cst @@ var "paramsStr",
-      var "retPart",
-      just $ expressionToExpr @@ var "body"])
-
-closureParamToStr :: TTermDefinition (R.ClosureParam -> String)
-closureParamToStr = define "closureParamToStr" $
-  doc "Serialize a closure parameter to string" $
-  lambda "cp" $ lets [
-    "pat">: project R._ClosureParam R._ClosureParam_pattern @@ var "cp",
-    "typ">: project R._ClosureParam R._ClosureParam_type @@ var "cp",
-    "patStr">: Serialization.printExpr @@ (patternToExpr @@ var "pat")] $
-    Maybes.maybe
-      (var "patStr")
-      (lambda "t" $ Strings.cat (list [var "patStr", string ": ", Serialization.printExpr @@ (typeToExpr @@ var "t")]))
-      (var "typ")
-
-ifExprToExpr :: TTermDefinition (R.IfExpr -> Expr)
-ifExprToExpr = define "ifExprToExpr" $
-  doc "Serialize an if expression" $
-  lambda "i" $ lets [
-    "cond">: project R._IfExpr R._IfExpr_condition @@ var "i",
-    "thenB">: project R._IfExpr R._IfExpr_thenBlock @@ var "i",
-    "elseB">: project R._IfExpr R._IfExpr_elseBranch @@ var "i",
-    "condExpr">: cases R._IfCondition (var "cond") Nothing [
-      R._IfCondition_bool>>: lambda "e" $ expressionToExpr @@ var "e",
-      R._IfCondition_let>>: lambda "lc" $ lets [
-        "pat">: project R._LetCondition R._LetCondition_pattern @@ var "lc",
-        "expr">: project R._LetCondition R._LetCondition_expr @@ var "lc"] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "let",
-          patternToExpr @@ var "pat",
-          Serialization.cst @@ string "=",
-          expressionToExpr @@ var "expr"]],
-    "elsePart">: Maybes.maybe nothing (lambda "e" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "else",
-      expressionToExpr @@ var "e"]) (var "elseB")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "if",
-      just $ var "condExpr",
-      just $ blockToExpr @@ var "thenB",
-      var "elsePart"])
-
-matchExprToExpr :: TTermDefinition (R.MatchExpr -> Expr)
-matchExprToExpr = define "matchExprToExpr" $
-  doc "Serialize a match expression" $
-  lambda "m" $ lets [
-    "scrut">: project R._MatchExpr R._MatchExpr_scrutinee @@ var "m",
-    "arms">: project R._MatchExpr R._MatchExpr_arms @@ var "m"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "match",
-      expressionToExpr @@ var "scrut",
-      Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@
-        (Lists.map (matchArmToExpr) (var "arms"))]
-
-matchArmToExpr :: TTermDefinition (R.MatchArm -> Expr)
-matchArmToExpr = define "matchArmToExpr" $
-  doc "Serialize a match arm" $
-  lambda "arm" $ lets [
-    "pat">: project R._MatchArm R._MatchArm_pattern @@ var "arm",
-    "guard">: project R._MatchArm R._MatchArm_guard @@ var "arm",
-    "body">: project R._MatchArm R._MatchArm_body @@ var "arm",
-    "guardPart">: Maybes.maybe nothing (lambda "g" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "if",
-      expressionToExpr @@ var "g"]) (var "guard")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ patternToExpr @@ var "pat",
-      var "guardPart",
-      just $ Serialization.cst @@ string "=>",
-      just $ expressionToExpr @@ var "body",
-      just $ Serialization.cst @@ string ","])
-
-loopExprToExpr :: TTermDefinition (R.LoopExpr -> Expr)
-loopExprToExpr = define "loopExprToExpr" $
-  doc "Serialize a loop expression" $
-  lambda "l" $ lets [
-    "label">: project R._LoopExpr R._LoopExpr_label @@ var "l",
-    "body">: project R._LoopExpr R._LoopExpr_body @@ var "l",
-    "labelPart">: Maybes.maybe nothing (lambda "lbl" $ just $ Serialization.cst @@ (Strings.cat2 (string "'") (Strings.cat2 (var "lbl") (string ":")))) (var "label")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      var "labelPart",
-      just $ Serialization.cst @@ string "loop",
-      just $ blockToExpr @@ var "body"])
-
-whileExprToExpr :: TTermDefinition (R.WhileExpr -> Expr)
-whileExprToExpr = define "whileExprToExpr" $
-  doc "Serialize a while expression" $
-  lambda "w" $ lets [
-    "label">: project R._WhileExpr R._WhileExpr_label @@ var "w",
-    "cond">: project R._WhileExpr R._WhileExpr_condition @@ var "w",
-    "body">: project R._WhileExpr R._WhileExpr_body @@ var "w",
-    "labelPart">: Maybes.maybe nothing (lambda "lbl" $ just $ Serialization.cst @@ (Strings.cat2 (string "'") (Strings.cat2 (var "lbl") (string ":")))) (var "label"),
-    "condExpr">: cases R._IfCondition (var "cond") Nothing [
-      R._IfCondition_bool>>: lambda "e" $ expressionToExpr @@ var "e",
-      R._IfCondition_let>>: lambda "lc" $ lets [
-        "pat">: project R._LetCondition R._LetCondition_pattern @@ var "lc",
-        "expr">: project R._LetCondition R._LetCondition_expr @@ var "lc"] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "let",
-          patternToExpr @@ var "pat",
-          Serialization.cst @@ string "=",
-          expressionToExpr @@ var "expr"]]] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      var "labelPart",
-      just $ Serialization.cst @@ string "while",
-      just $ var "condExpr",
-      just $ blockToExpr @@ var "body"])
-
-forExprToExpr :: TTermDefinition (R.ForExpr -> Expr)
-forExprToExpr = define "forExprToExpr" $
-  doc "Serialize a for expression" $
-  lambda "f" $ lets [
-    "label">: project R._ForExpr R._ForExpr_label @@ var "f",
-    "pat">: project R._ForExpr R._ForExpr_pattern @@ var "f",
-    "iter">: project R._ForExpr R._ForExpr_iter @@ var "f",
-    "body">: project R._ForExpr R._ForExpr_body @@ var "f",
-    "labelPart">: Maybes.maybe nothing (lambda "lbl" $ just $ Serialization.cst @@ (Strings.cat2 (string "'") (Strings.cat2 (var "lbl") (string ":")))) (var "label")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      var "labelPart",
-      just $ Serialization.cst @@ string "for",
-      just $ patternToExpr @@ var "pat",
-      just $ Serialization.cst @@ string "in",
-      just $ expressionToExpr @@ var "iter",
-      just $ blockToExpr @@ var "body"])
-
-binaryExprToExpr :: TTermDefinition (R.BinaryExpr -> Expr)
-binaryExprToExpr = define "binaryExprToExpr" $
-  doc "Serialize a binary expression" $
-  lambda "b" $ lets [
-    "left">: project R._BinaryExpr R._BinaryExpr_left @@ var "b",
-    "op">: project R._BinaryExpr R._BinaryExpr_op @@ var "b",
-    "right">: project R._BinaryExpr R._BinaryExpr_right @@ var "b"] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "left",
-      binaryOpToExpr @@ var "op",
-      expressionToExpr @@ var "right"]
-
-binaryOpToExpr :: TTermDefinition (R.BinaryOp -> Expr)
-binaryOpToExpr = define "binaryOpToExpr" $
-  doc "Serialize a binary operator" $
-  lambda "op" $
-    Serialization.cst @@ (cases R._BinaryOp (var "op") Nothing [
-      R._BinaryOp_add>>: constant $ string "+",
-      R._BinaryOp_sub>>: constant $ string "-",
-      R._BinaryOp_mul>>: constant $ string "*",
-      R._BinaryOp_div>>: constant $ string "/",
-      R._BinaryOp_rem>>: constant $ string "%",
-      R._BinaryOp_and>>: constant $ string "&&",
-      R._BinaryOp_or>>: constant $ string "||",
-      R._BinaryOp_bitAnd>>: constant $ string "&",
-      R._BinaryOp_bitOr>>: constant $ string "|",
-      R._BinaryOp_bitXor>>: constant $ string "^",
-      R._BinaryOp_shl>>: constant $ string "<<",
-      R._BinaryOp_shr>>: constant $ string ">>",
-      R._BinaryOp_eq>>: constant $ string "==",
-      R._BinaryOp_ne>>: constant $ string "!=",
-      R._BinaryOp_lt>>: constant $ string "<",
-      R._BinaryOp_le>>: constant $ string "<=",
-      R._BinaryOp_gt>>: constant $ string ">",
-      R._BinaryOp_ge>>: constant $ string ">="])
-
-unaryExprToExpr :: TTermDefinition (R.UnaryExpr -> Expr)
-unaryExprToExpr = define "unaryExprToExpr" $
-  doc "Serialize a unary expression" $
-  lambda "u" $ lets [
-    "op">: project R._UnaryExpr R._UnaryExpr_op @@ var "u",
-    "operand">: project R._UnaryExpr R._UnaryExpr_operand @@ var "u",
-    "opStr">: cases R._UnaryOp (var "op") Nothing [
-      R._UnaryOp_neg>>: constant $ string "-",
-      R._UnaryOp_not>>: constant $ string "!"]] $
-    Serialization.cst @@ (Strings.cat2 (var "opStr") (Serialization.printExpr @@ (expressionToExpr @@ var "operand")))
-
-refExprToExpr :: TTermDefinition (R.RefExpr -> Expr)
-refExprToExpr = define "refExprToExpr" $
-  doc "Serialize a reference expression" $
-  lambda "r" $ lets [
-    "mut">: project R._RefExpr R._RefExpr_mutable @@ var "r",
-    "expr">: project R._RefExpr R._RefExpr_expr @@ var "r",
-    "prefix">: Logic.ifElse (var "mut") (string "&mut ") (string "&")] $
-    Serialization.cst @@ (Strings.cat2 (var "prefix") (Serialization.printExpr @@ (expressionToExpr @@ var "expr")))
-
-structExprToExpr :: TTermDefinition (R.StructExpr -> Expr)
-structExprToExpr = define "structExprToExpr" $
-  doc "Serialize a struct literal expression" $
-  lambda "s" $ lets [
-    "path">: project R._StructExpr R._StructExpr_path @@ var "s",
-    "fields">: project R._StructExpr R._StructExpr_fields @@ var "s",
-    "rest">: project R._StructExpr R._StructExpr_rest @@ var "s",
-    "fieldExprs">: Lists.map (fieldValueToExpr) (var "fields"),
-    "restExpr">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "r" $ list [
-      Serialization.spaceSep @@ list [
-        Serialization.cst @@ string "..",
-        expressionToExpr @@ var "r"]]) (var "rest"),
-    "allFields">: Lists.concat2 (var "fieldExprs") (var "restExpr")] $
-    Serialization.spaceSep @@ list [
-      exprPathToExpr @@ var "path",
-      Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@ var "allFields"]
-
-fieldValueToExpr :: TTermDefinition (R.FieldValue -> Expr)
-fieldValueToExpr = define "fieldValueToExpr" $
-  doc "Serialize a field-value pair" $
-  lambda "fv" $ lets [
-    "name">: project R._FieldValue R._FieldValue_name @@ var "fv",
-    "val">: project R._FieldValue R._FieldValue_value @@ var "fv"] $
-    Maybes.maybe
-      (Serialization.cst @@ var "name")
-      (lambda "v" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-        expressionToExpr @@ var "v"])
-      (var "val")
-
-arrayExprToExpr :: TTermDefinition (R.ArrayExpr -> Expr)
-arrayExprToExpr = define "arrayExprToExpr" $
-  doc "Serialize an array expression" $
-  lambda "a" $
-    cases R._ArrayExpr (var "a") Nothing [
-      R._ArrayExpr_elements>>: lambda "es" $ Serialization.bracketList @@ Serialization.halfBlockStyle @@ (Lists.map (expressionToExpr) (var "es")),
-      R._ArrayExpr_repeat>>: lambda "r" $ lets [
-        "elem">: project R._ArrayRepeat R._ArrayRepeat_element @@ var "r",
-        "len">: project R._ArrayRepeat R._ArrayRepeat_length @@ var "r"] $
-        Serialization.cst @@ (Strings.cat (list [
-          string "[",
-          Serialization.printExpr @@ (expressionToExpr @@ var "elem"),
-          string "; ",
-          Serialization.printExpr @@ (expressionToExpr @@ var "len"),
-          string "]"]))]
-
-indexExprToExpr :: TTermDefinition (R.IndexExpr -> Expr)
-indexExprToExpr = define "indexExprToExpr" $
-  doc "Serialize an index expression" $
-  lambda "i" $ lets [
-    "obj">: project R._IndexExpr R._IndexExpr_object @@ var "i",
-    "idx">: project R._IndexExpr R._IndexExpr_index @@ var "i"] $
-    Serialization.cst @@ (Strings.cat (list [
-      Serialization.printExpr @@ (expressionToExpr @@ var "obj"),
-      string "[",
-      Serialization.printExpr @@ (expressionToExpr @@ var "idx"),
-      string "]"]))
-
-rangeExprToExpr :: TTermDefinition (R.RangeExpr -> Expr)
-rangeExprToExpr = define "rangeExprToExpr" $
-  doc "Serialize a range expression" $
-  lambda "r" $ lets [
-    "from">: project R._RangeExpr R._RangeExpr_from @@ var "r",
-    "to">: project R._RangeExpr R._RangeExpr_to @@ var "r",
-    "incl">: project R._RangeExpr R._RangeExpr_inclusive @@ var "r",
-    "fromStr">: Maybes.maybe (string "") (lambda "f" $ Serialization.printExpr @@ (expressionToExpr @@ var "f")) (var "from"),
-    "toStr">: Maybes.maybe (string "") (lambda "t" $ Serialization.printExpr @@ (expressionToExpr @@ var "t")) (var "to"),
-    "op">: Logic.ifElse (var "incl") (string "..=") (string "..")] $
-    Serialization.cst @@ (Strings.cat (list [var "fromStr", var "op", var "toStr"]))
-
-castExprToExpr :: TTermDefinition (R.CastExpr -> Expr)
-castExprToExpr = define "castExprToExpr" $
-  doc "Serialize a cast expression" $
-  lambda "c" $ lets [
-    "expr">: project R._CastExpr R._CastExpr_expr @@ var "c",
-    "typ">: project R._CastExpr R._CastExpr_type @@ var "c"] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "expr",
-      Serialization.cst @@ string "as",
-      typeToExpr @@ var "typ"]
-
-typeAscriptionExprToExpr :: TTermDefinition (R.TypeAscriptionExpr -> Expr)
-typeAscriptionExprToExpr = define "typeAscriptionExprToExpr" $
-  doc "Serialize a type ascription expression" $
-  lambda "t" $ lets [
-    "expr">: project R._TypeAscriptionExpr R._TypeAscriptionExpr_expr @@ var "t",
-    "typ">: project R._TypeAscriptionExpr R._TypeAscriptionExpr_type @@ var "t"] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "expr",
-      Serialization.cst @@ string ":",
-      typeToExpr @@ var "typ"]
-
-assignExprToExpr :: TTermDefinition (R.AssignExpr -> Expr)
-assignExprToExpr = define "assignExprToExpr" $
-  doc "Serialize an assignment expression" $
-  lambda "a" $ lets [
-    "target">: project R._AssignExpr R._AssignExpr_target @@ var "a",
-    "val">: project R._AssignExpr R._AssignExpr_value @@ var "a"] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "target",
-      Serialization.cst @@ string "=",
-      expressionToExpr @@ var "val"]
-
-compoundAssignExprToExpr :: TTermDefinition (R.CompoundAssignExpr -> Expr)
-compoundAssignExprToExpr = define "compoundAssignExprToExpr" $
-  doc "Serialize a compound assignment expression" $
-  lambda "c" $ lets [
-    "target">: project R._CompoundAssignExpr R._CompoundAssignExpr_target @@ var "c",
-    "op">: project R._CompoundAssignExpr R._CompoundAssignExpr_op @@ var "c",
-    "val">: project R._CompoundAssignExpr R._CompoundAssignExpr_value @@ var "c",
-    "opStr">: cases R._CompoundAssignOp (var "op") Nothing [
-      R._CompoundAssignOp_addAssign>>: constant $ string "+=",
-      R._CompoundAssignOp_subAssign>>: constant $ string "-=",
-      R._CompoundAssignOp_mulAssign>>: constant $ string "*=",
-      R._CompoundAssignOp_divAssign>>: constant $ string "/=",
-      R._CompoundAssignOp_remAssign>>: constant $ string "%=",
-      R._CompoundAssignOp_bitAndAssign>>: constant $ string "&=",
-      R._CompoundAssignOp_bitOrAssign>>: constant $ string "|=",
-      R._CompoundAssignOp_bitXorAssign>>: constant $ string "^=",
-      R._CompoundAssignOp_shlAssign>>: constant $ string "<<=",
-      R._CompoundAssignOp_shrAssign>>: constant $ string ">>="]] $
-    Serialization.spaceSep @@ list [
-      expressionToExpr @@ var "target",
-      Serialization.cst @@ var "opStr",
-      expressionToExpr @@ var "val"]
-
-macroInvocationToExpr :: TTermDefinition (R.MacroInvocation -> Expr)
-macroInvocationToExpr = define "macroInvocationToExpr" $
-  doc "Serialize a macro invocation" $
-  lambda "m" $ lets [
-    "path">: project R._MacroInvocation R._MacroInvocation_path @@ var "m",
-    "delim">: project R._MacroInvocation R._MacroInvocation_delimiter @@ var "m",
-    "tokens">: project R._MacroInvocation R._MacroInvocation_tokens @@ var "m",
-    "pathStr">: Strings.intercalate (string "::") (var "path"),
-    "open">: cases R._MacroDelimiter (var "delim") Nothing [
-      R._MacroDelimiter_paren>>: constant $ string "(",
-      R._MacroDelimiter_bracket>>: constant $ string "[",
-      R._MacroDelimiter_brace>>: constant $ string "{"],
-    "close">: cases R._MacroDelimiter (var "delim") Nothing [
-      R._MacroDelimiter_paren>>: constant $ string ")",
-      R._MacroDelimiter_bracket>>: constant $ string "]",
-      R._MacroDelimiter_brace>>: constant $ string "}"]] $
-    Serialization.cst @@ (Strings.cat (list [var "pathStr", string "!", var "open", var "tokens", var "close"]))
-
--- =============================================================================
--- Statements
--- =============================================================================
-
-statementToExpr :: TTermDefinition (R.Statement -> Expr)
-statementToExpr = define "statementToExpr" $
-  doc "Serialize a statement" $
-  lambda "stmt" $
-    cases R._Statement (var "stmt") Nothing [
-      R._Statement_let>>: lambda "l" $ letStatementToExpr @@ var "l",
-      R._Statement_expression>>: lambda "e" $ Serialization.spaceSep @@ list [expressionToExpr @@ var "e", Serialization.cst @@ string ";"],
-      R._Statement_item>>: lambda "i" $ itemToExpr @@ var "i",
-      R._Statement_empty>>: constant $ Serialization.cst @@ string ";"]
-
-letStatementToExpr :: TTermDefinition (R.LetStatement -> Expr)
-letStatementToExpr = define "letStatementToExpr" $
-  doc "Serialize a let statement" $
-  lambda "l" $ lets [
-    "pat">: project R._LetStatement R._LetStatement_pattern @@ var "l",
-    "mut">: project R._LetStatement R._LetStatement_mutable @@ var "l",
-    "typ">: project R._LetStatement R._LetStatement_type @@ var "l",
-    "init">: project R._LetStatement R._LetStatement_init @@ var "l",
-    "mutKw">: Logic.ifElse (var "mut") (just $ Serialization.cst @@ string "mut") nothing,
-    "typPart">: Maybes.maybe nothing (lambda "t" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string ":",
-      typeToExpr @@ var "t"]) (var "typ"),
-    "initPart">: Maybes.maybe nothing (lambda "e" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "=",
-      expressionToExpr @@ var "e"]) (var "init")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just $ Serialization.cst @@ string "let",
-      var "mutKw",
-      just $ patternToExpr @@ var "pat",
-      var "typPart",
-      var "initPart",
-      just $ Serialization.cst @@ string ";"])
-
-blockToExpr :: TTermDefinition (R.Block -> Expr)
-blockToExpr = define "blockToExpr" $
-  doc "Serialize a block" $
-  lambda "b" $ lets [
-    "stmts">: project R._Block R._Block_statements @@ var "b",
-    "expr">: project R._Block R._Block_expression @@ var "b",
-    "stmtExprs">: Lists.map (statementToExpr) (var "stmts"),
-    "exprPart">: Maybes.maybe (list ([] :: [TTerm Expr])) (lambda "e" $ list [expressionToExpr @@ var "e"]) (var "expr"),
-    "allParts">: Lists.concat2 (var "stmtExprs") (var "exprPart")] $
-    Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@ var "allParts"
-
--- =============================================================================
--- Patterns
--- =============================================================================
-
-patternToExpr :: TTermDefinition (R.Pattern -> Expr)
-patternToExpr = define "patternToExpr" $
-  doc "Serialize a pattern" $
-  lambda "pat" $
-    cases R._Pattern (var "pat") Nothing [
-      R._Pattern_wildcard>>: constant $ Serialization.cst @@ string "_",
-      R._Pattern_identifier>>: lambda "ip" $ identifierPatternToExpr @@ var "ip",
-      R._Pattern_literal>>: lambda "l" $ literalToExpr @@ var "l",
-      R._Pattern_reference>>: lambda "rp" $ refPatternToExpr @@ var "rp",
-      R._Pattern_struct>>: lambda "sp" $ structPatternToExpr @@ var "sp",
-      R._Pattern_tupleStruct>>: lambda "tsp" $ tupleStructPatternToExpr @@ var "tsp",
-      R._Pattern_tuple>>: lambda "ps" $ Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "ps")),
-      R._Pattern_slice>>: lambda "ps" $ Serialization.bracketList @@ Serialization.halfBlockStyle @@ (Lists.map (patternToExpr) (var "ps")),
-      R._Pattern_or>>: lambda "ps" $ Serialization.cst @@ (Strings.intercalate (string " | ") (Lists.map (lambda "p" $ Serialization.printExpr @@ (patternToExpr @@ var "p")) (var "ps"))),
-      R._Pattern_path>>: lambda "ep" $ exprPathToExpr @@ var "ep",
-      R._Pattern_range>>: lambda "rp" $ rangePatternToExpr @@ var "rp",
-      R._Pattern_rest>>: constant $ Serialization.cst @@ string "..",
-      R._Pattern_paren>>: lambda "p" $ Serialization.parenthesize @@ (patternToExpr @@ var "p")]
-
-identifierPatternToExpr :: TTermDefinition (R.IdentifierPattern -> Expr)
-identifierPatternToExpr = define "identifierPatternToExpr" $
-  doc "Serialize an identifier pattern" $
-  lambda "ip" $ lets [
-    "name">: project R._IdentifierPattern R._IdentifierPattern_name @@ var "ip",
-    "mut">: project R._IdentifierPattern R._IdentifierPattern_mutable @@ var "ip",
-    "atPat">: project R._IdentifierPattern R._IdentifierPattern_atPattern @@ var "ip",
-    "mutKw">: Logic.ifElse (var "mut") (just $ Serialization.cst @@ string "mut") nothing,
-    "atPart">: Maybes.maybe nothing (lambda "p" $ just $ Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "@",
-      patternToExpr @@ var "p"]) (var "atPat")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      var "mutKw",
-      just $ Serialization.cst @@ var "name",
-      var "atPart"])
-
-refPatternToExpr :: TTermDefinition (R.RefPattern -> Expr)
-refPatternToExpr = define "refPatternToExpr" $
-  doc "Serialize a reference pattern" $
-  lambda "rp" $ lets [
-    "mut">: project R._RefPattern R._RefPattern_mutable @@ var "rp",
-    "pat">: project R._RefPattern R._RefPattern_pattern @@ var "rp",
-    "prefix">: Logic.ifElse (var "mut") (string "&mut ") (string "&")] $
-    Serialization.cst @@ (Strings.cat2 (var "prefix") (Serialization.printExpr @@ (patternToExpr @@ var "pat")))
-
-structPatternToExpr :: TTermDefinition (R.StructPattern -> Expr)
-structPatternToExpr = define "structPatternToExpr" $
-  doc "Serialize a struct pattern" $
-  lambda "sp" $ lets [
-    "path">: project R._StructPattern R._StructPattern_path @@ var "sp",
-    "fields">: project R._StructPattern R._StructPattern_fields @@ var "sp",
-    "rest">: project R._StructPattern R._StructPattern_rest @@ var "sp",
-    "fieldExprs">: Lists.map (fieldPatternToExpr) (var "fields"),
-    "restExpr">: Logic.ifElse (var "rest") (list [Serialization.cst @@ string ".."]) (list ([] :: [TTerm Expr])),
-    "allFields">: Lists.concat2 (var "fieldExprs") (var "restExpr")] $
-    Serialization.spaceSep @@ list [
-      exprPathToExpr @@ var "path",
-      Serialization.curlyBracesList @@ nothing @@ Serialization.halfBlockStyle @@ var "allFields"]
-
-fieldPatternToExpr :: TTermDefinition (R.FieldPattern -> Expr)
-fieldPatternToExpr = define "fieldPatternToExpr" $
-  doc "Serialize a field pattern" $
-  lambda "fp" $ lets [
-    "name">: project R._FieldPattern R._FieldPattern_name @@ var "fp",
-    "pat">: project R._FieldPattern R._FieldPattern_pattern @@ var "fp"] $
-    Maybes.maybe
-      (Serialization.cst @@ var "name")
-      (lambda "p" $ Serialization.spaceSep @@ list [
-        Serialization.cst @@ (Strings.cat2 (var "name") (string ":")),
-        patternToExpr @@ var "p"])
-      (var "pat")
-
-tupleStructPatternToExpr :: TTermDefinition (R.TupleStructPattern -> Expr)
-tupleStructPatternToExpr = define "tupleStructPatternToExpr" $
-  doc "Serialize a tuple struct pattern" $
-  lambda "tsp" $ lets [
-    "path">: project R._TupleStructPattern R._TupleStructPattern_path @@ var "tsp",
-    "elems">: project R._TupleStructPattern R._TupleStructPattern_elements @@ var "tsp"] $
-    Serialization.spaceSep @@ list [
-      exprPathToExpr @@ var "path",
-      Serialization.parenList @@ false @@ (Lists.map (patternToExpr) (var "elems"))]
-
-rangePatternToExpr :: TTermDefinition (R.RangePattern -> Expr)
-rangePatternToExpr = define "rangePatternToExpr" $
-  doc "Serialize a range pattern" $
-  lambda "rp" $ lets [
-    "from">: project R._RangePattern R._RangePattern_from @@ var "rp",
-    "to">: project R._RangePattern R._RangePattern_to @@ var "rp",
-    "incl">: project R._RangePattern R._RangePattern_inclusive @@ var "rp",
-    "fromStr">: Maybes.maybe (string "") (lambda "p" $ Serialization.printExpr @@ (patternToExpr @@ var "p")) (var "from"),
-    "toStr">: Maybes.maybe (string "") (lambda "p" $ Serialization.printExpr @@ (patternToExpr @@ var "p")) (var "to"),
-    "op">: Logic.ifElse (var "incl") (string "..=") (string "..")] $
-    Serialization.cst @@ (Strings.cat (list [var "fromStr", var "op", var "toStr"]))
-
--- =============================================================================
--- Literals
--- =============================================================================
-
-literalToExpr :: TTermDefinition (R.Literal -> Expr)
-literalToExpr = define "literalToExpr" $
-  doc "Serialize a literal" $
-  lambda "lit" $
-    cases R._Literal (var "lit") Nothing [
-      R._Literal_integer>>: lambda "il" $ integerLiteralToExpr @@ var "il",
-      R._Literal_float>>: lambda "fl" $ floatLiteralToExpr @@ var "fl",
-      R._Literal_string>>: lambda "s" $ Serialization.cst @@ (Literals.showString $ var "s"),
-      R._Literal_rawString>>: lambda "s" $ Serialization.cst @@ (Strings.cat (list [string "r\"", var "s", string "\""])),
-      R._Literal_byteString>>: lambda "bs" $ Serialization.cst @@ string "b\"...\"", -- TODO: Proper binary encoding
-      R._Literal_char>>: lambda "c" $ Serialization.cst @@ (Strings.cat (list [string "'", Literals.showUint32 $ var "c", string "'"])),
-      R._Literal_byte>>: lambda "b" $ Serialization.cst @@ (Strings.cat (list [string "b'", Literals.showUint8 $ var "b", string "'"])),
-      R._Literal_bool>>: lambda "b" $ Serialization.cst @@ (Logic.ifElse (var "b") (string "true") (string "false"))]
-
-integerLiteralToExpr :: TTermDefinition (R.IntegerLiteral -> Expr)
-integerLiteralToExpr = define "integerLiteralToExpr" $
-  doc "Serialize an integer literal" $
-  lambda "il" $ lets [
-    "val">: project R._IntegerLiteral R._IntegerLiteral_value @@ var "il",
-    "suf">: project R._IntegerLiteral R._IntegerLiteral_suffix @@ var "il",
-    "valStr">: Literals.showBigint $ var "val",
-    "sufStr">: Maybes.maybe (string "") (lambda "s" $ var "s") (var "suf")] $
-    Serialization.cst @@ (Strings.cat2 (var "valStr") (var "sufStr"))
-
-floatLiteralToExpr :: TTermDefinition (R.FloatLiteral -> Expr)
-floatLiteralToExpr = define "floatLiteralToExpr" $
-  doc "Serialize a float literal" $
-  lambda "fl" $ lets [
-    "val">: project R._FloatLiteral R._FloatLiteral_value @@ var "fl",
-    "suf">: project R._FloatLiteral R._FloatLiteral_suffix @@ var "fl",
-    "valStr">: Literals.showFloat64 $ var "val",
-    "sufStr">: Maybes.maybe (string "") (lambda "s" $ var "s") (var "suf")] $
-    Serialization.cst @@ (Strings.cat2 (var "valStr") (var "sufStr"))
-
--- =============================================================================
--- Visibility and attributes
--- =============================================================================
-
-visibilityToExpr :: TTermDefinition (R.Visibility -> Maybe Expr)
-visibilityToExpr = define "visibilityToExpr" $
-  doc "Serialize visibility to an optional expression" $
-  lambda "vis" $
-    cases R._Visibility (var "vis") Nothing [
-      R._Visibility_public>>: constant $ just $ Serialization.cst @@ string "pub",
-      R._Visibility_crate>>: constant $ just $ Serialization.cst @@ string "pub(crate)",
-      R._Visibility_restricted>>: lambda "path" $
-        just $ Serialization.cst @@ (Strings.cat (list [
-          string "pub(in ",
-          Strings.intercalate (string "::") (var "path"),
-          string ")"])),
-      R._Visibility_private>>: constant nothing]
-
-attributeToExpr :: TTermDefinition (R.Attribute -> Expr)
-attributeToExpr = define "attributeToExpr" $
-  doc "Serialize an attribute" $
-  lambda "attr" $ lets [
-    "inner">: project R._Attribute R._Attribute_inner @@ var "attr",
-    "path">: project R._Attribute R._Attribute_path @@ var "attr",
-    "tokens">: project R._Attribute R._Attribute_tokens @@ var "attr",
-    "prefix">: Logic.ifElse (var "inner") (string "#![") (string "#["),
-    "pathStr">: Strings.intercalate (string "::") (var "path"),
-    "tokensPart">: Maybes.maybe (string "") (lambda "t" $ Strings.cat (list [string "(", var "t", string ")"])) (var "tokens")] $
-    Serialization.cst @@ (Strings.cat (list [var "prefix", var "pathStr", var "tokensPart", string "]"]))
-
-derivesToExpr :: TTermDefinition ([String] -> Maybe Expr)
-derivesToExpr = define "derivesToExpr" $
-  doc "Serialize derive macros to an attribute expression" $
-  lambda "derives" $
-    Logic.ifElse (Lists.null $ var "derives")
-      nothing
-      (just $ Serialization.cst @@ (Strings.cat (list [
-        string "#[derive(",
-        Strings.intercalate (string ", ") (var "derives"),
-        string ")]"])))
-
--- =============================================================================
--- Comments
--- =============================================================================
-
-toRustDocComment :: TTermDefinition (String -> String)
-toRustDocComment = define "toRustDocComment" $
-  doc ("Convert a string to Rust doc comments. Empty source lines emit `///`"
-    <> " (no trailing space) so blank doc lines don't carry trailing whitespace.") $
-  lambda "c" $ Strings.intercalate (string "\n") $ Lists.map
-    (lambda "s" $ Logic.ifElse (Equality.equal (var "s") (string ""))
-      (string "///")
-      (Strings.cat2 (string "/// ") (var "s")))
-    (Strings.lines $ var "c")
-
-toRustComment :: TTermDefinition (String -> String)
-toRustComment = define "toRustComment" $
-  doc ("Convert a string to Rust line comments. Empty source lines emit `//`"
-    <> " (no trailing space).") $
-  lambda "c" $ Strings.intercalate (string "\n") $ Lists.map
-    (lambda "s" $ Logic.ifElse (Equality.equal (var "s") (string ""))
-      (string "//")
-      (Strings.cat2 (string "// ") (var "s")))
-    (Strings.lines $ var "c")
diff --git a/src/main/haskell/Hydra/Sources/Rust/Syntax.hs b/src/main/haskell/Hydra/Sources/Rust/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Rust/Syntax.hs
+++ /dev/null
@@ -1,1796 +0,0 @@
--- | A Rust syntax model, based on the Rust Reference grammar.
--- | See https://doc.rust-lang.org/reference/ (retrieved 2025-01-29)
-
-module Hydra.Sources.Rust.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.rust.syntax"
-
-define :: String -> Type -> Binding
-define = datatype ns
-
-rust :: String -> Type
-rust = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A Rust syntax model, based on the Rust Reference grammar"
-      ++ " (https://doc.rust-lang.org/reference/), retrieved 2025-01-29")}
-  where
-    definitions = crateLevel ++ items ++ useDeclarations ++ structDefinitions
-      ++ enumDefinitions ++ functionDefinitions ++ typeAliases ++ constStaticMod
-      ++ implBlocks ++ traitDefinitions ++ genericsAndWhere ++ types
-      ++ expressions ++ statements ++ patterns ++ literals ++ attributesVisibility
-      ++ helperTypes
-
-    -- Crate-level constructs
-    crateLevel = [
-      crate,
-      item,
-      itemWithComments]
-
-    -- Item definitions
-    items = []
-
-    -- Use declarations
-    useDeclarations = [
-      useDeclaration,
-      useTree,
-      usePath,
-      useRename,
-      useGroup]
-
-    -- Struct definitions
-    structDefinitions = [
-      structDef,
-      structBody,
-      structField,
-      tupleField]
-
-    -- Enum definitions
-    enumDefinitions = [
-      enumDef,
-      enumVariant,
-      enumVariantBody]
-
-    -- Function definitions
-    functionDefinitions = [
-      fnDef,
-      fnParam,
-      selfParam,
-      methodParam]
-
-    -- Type aliases
-    typeAliases = [
-      typeAlias]
-
-    -- Const, static, and module definitions
-    constStaticMod = [
-      constDef,
-      staticDef,
-      modDef]
-
-    -- Impl blocks
-    implBlocks = [
-      implBlock,
-      implItem,
-      implMethod]
-
-    -- Trait definitions
-    traitDefinitions = [
-      traitDef,
-      traitItem,
-      traitMethod,
-      traitType,
-      traitConst]
-
-    -- Generics and where clauses
-    genericsAndWhere = [
-      genericParam,
-      typeParamBound,
-      lifetime,
-      whereClause,
-      wherePredicate]
-
-    -- Type expressions
-    types = [
-      type_,
-      typePath,
-      pathSegment,
-      genericArguments,
-      angleBracketedArgs,
-      genericArg,
-      typeBinding,
-      parenthesizedArgs,
-      referenceType,
-      arrayType,
-      fnPointerType,
-      rawPointerType]
-
-    -- Expressions
-    expressions = [
-      expression,
-      exprPath,
-      callExpr,
-      methodCallExpr,
-      fieldAccessExpr,
-      tupleIndexExpr,
-      closureExpr,
-      closureParam,
-      ifExpr,
-      ifCondition,
-      matchExpr,
-      matchArm,
-      loopExpr,
-      whileExpr,
-      forExpr,
-      binaryExpr,
-      binaryOp,
-      unaryExpr,
-      unaryOp,
-      refExpr,
-      structExpr,
-      fieldValue,
-      arrayExpr,
-      indexExpr,
-      rangeExpr,
-      castExpr,
-      typeAscriptionExpr,
-      assignExpr,
-      compoundAssignExpr,
-      compoundAssignOp,
-      macroInvocation,
-      macroDelimiter]
-
-    -- Statements
-    statements = [
-      statement,
-      letStatement,
-      block]
-
-    -- Patterns
-    patterns = [
-      pattern,
-      identifierPattern,
-      refPattern,
-      structPattern,
-      fieldPattern,
-      tupleStructPattern,
-      rangePattern]
-
-    -- Literals
-    literals = [
-      literal,
-      integerLiteral,
-      floatLiteral]
-
-    -- Attributes and visibility
-    attributesVisibility = [
-      attribute,
-      visibility]
-
-    -- Helper types (used in expressions)
-    helperTypes = [
-      letCondition,
-      arrayRepeat]
-
-
--- ================================================================================================
--- Crate-level / Module structure
--- ================================================================================================
-
-crate :: Binding
-crate = define "Crate" $
-  doc "A Rust crate, represented as a collection of top-level items" $
-  T.record [
-    "items">:
-      doc "The top-level items in the crate" $
-      T.list itemWithComments]
-
-item :: Binding
-item = define "Item" $
-  doc "A top-level item in a Rust module or crate" $
-  T.union [
-    "use">:
-      doc "A use declaration" $
-      rust "UseDeclaration",
-    "struct">:
-      doc "A struct definition" $
-      rust "StructDef",
-    "enum">:
-      doc "An enum definition" $
-      rust "EnumDef",
-    "fn">:
-      doc "A function definition" $
-      rust "FnDef",
-    "typeAlias">:
-      doc "A type alias" $
-      rust "TypeAlias",
-    "impl">:
-      doc "An impl block" $
-      rust "ImplBlock",
-    "trait">:
-      doc "A trait definition" $
-      rust "TraitDef",
-    "mod">:
-      doc "A module definition" $
-      rust "ModDef",
-    "const">:
-      doc "A constant item" $
-      rust "ConstDef",
-    "static">:
-      doc "A static item" $
-      rust "StaticDef",
-    "macro">:
-      doc "A macro invocation as an item" $
-      rust "MacroInvocation"]
-
-itemWithComments :: Binding
-itemWithComments = define "ItemWithComments" $
-  doc "An item together with optional doc comments and visibility" $
-  T.record [
-    "doc">:
-      doc "Optional documentation comment" $
-      T.maybe T.string,
-    "visibility">:
-      doc "The item's visibility" $
-      rust "Visibility",
-    "item">:
-      doc "The item itself" $
-      rust "Item"]
-
-
--- ================================================================================================
--- Use declarations
--- ================================================================================================
-
-useDeclaration :: Binding
-useDeclaration = define "UseDeclaration" $
-  doc "A use declaration (e.g., use std::collections::BTreeMap;)" $
-  T.record [
-    "public">:
-      doc "Whether the use is public (pub use)" $
-      T.boolean,
-    "tree">:
-      doc "The use tree describing what is imported" $
-      rust "UseTree"]
-
-useTree :: Binding
-useTree = define "UseTree" $
-  doc "A use tree, representing the structure of a use path" $
-  T.union [
-    "path">:
-      doc "A simple path import" $
-      rust "UsePath",
-    "rename">:
-      doc "A renamed import (e.g., BTreeMap as Map)" $
-      rust "UseRename",
-    "glob">:
-      doc "A glob import (e.g., std::collections::*)" $
-      T.list T.string,
-    "group">:
-      doc "A grouped import (e.g., {BTreeMap, BTreeSet})" $
-      rust "UseGroup"]
-
-usePath :: Binding
-usePath = define "UsePath" $
-  doc "A simple path import within a use tree" $
-  T.record [
-    "segments">:
-      doc "The path segments" $
-      T.list T.string]
-
-useRename :: Binding
-useRename = define "UseRename" $
-  doc "A renamed import (e.g., BTreeMap as Map)" $
-  T.record [
-    "path">:
-      doc "The original path segments" $
-      T.list T.string,
-    "alias">:
-      doc "The alias name" $
-      T.string]
-
-useGroup :: Binding
-useGroup = define "UseGroup" $
-  doc "A grouped import (e.g., std::collections::{BTreeMap, BTreeSet})" $
-  T.record [
-    "prefix">:
-      doc "The common prefix path segments" $
-      T.list T.string,
-    "trees">:
-      doc "The individual subtrees within the group" $
-      T.list $ rust "UseTree"]
-
-
--- ================================================================================================
--- Struct definition
--- ================================================================================================
-
-structDef :: Binding
-structDef = define "StructDef" $
-  doc "A struct definition (e.g., struct Foo<T> { bar: T })" $
-  T.record [
-    "name">:
-      doc "The struct name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "body">:
-      doc "The struct body (named fields, tuple fields, or unit)" $
-      rust "StructBody",
-    "derives">:
-      doc "Derive macros to apply" $
-      T.list T.string,
-    "public">:
-      doc "Whether the struct is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-structBody :: Binding
-structBody = define "StructBody" $
-  doc "The body of a struct definition" $
-  T.union [
-    "named">:
-      doc "A struct with named fields" $
-      T.list $ rust "StructField",
-    "tuple">:
-      doc "A tuple struct" $
-      T.list $ rust "TupleField",
-    "unit">:
-      doc "A unit struct" $
-      T.unit]
-
-structField :: Binding
-structField = define "StructField" $
-  doc "A named field within a struct definition" $
-  T.record [
-    "name">:
-      doc "The field name" $
-      T.string,
-    "type">:
-      doc "The field type" $
-      rust "Type",
-    "public">:
-      doc "Whether the field is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment for the field" $
-      T.maybe T.string]
-
-tupleField :: Binding
-tupleField = define "TupleField" $
-  doc "A positional field within a tuple struct" $
-  T.record [
-    "type">:
-      doc "The field type" $
-      rust "Type",
-    "public">:
-      doc "Whether the field is public" $
-      T.boolean]
-
-
--- ================================================================================================
--- Enum definition
--- ================================================================================================
-
-enumDef :: Binding
-enumDef = define "EnumDef" $
-  doc "An enum definition (e.g., enum Foo<T> { Bar(T), Baz { x: i32 } })" $
-  T.record [
-    "name">:
-      doc "The enum name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "variants">:
-      doc "The enum variants" $
-      T.list $ rust "EnumVariant",
-    "derives">:
-      doc "Derive macros to apply" $
-      T.list T.string,
-    "public">:
-      doc "Whether the enum is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-enumVariant :: Binding
-enumVariant = define "EnumVariant" $
-  doc "A variant of an enum definition" $
-  T.record [
-    "name">:
-      doc "The variant name" $
-      T.string,
-    "body">:
-      doc "The variant body" $
-      rust "EnumVariantBody",
-    "doc">:
-      doc "Optional doc comment for the variant" $
-      T.maybe T.string]
-
-enumVariantBody :: Binding
-enumVariantBody = define "EnumVariantBody" $
-  doc "The body of an enum variant" $
-  T.union [
-    "unit">:
-      doc "A unit variant (e.g., Foo)" $
-      T.unit,
-    "tuple">:
-      doc "A tuple variant (e.g., Foo(i32, String))" $
-      T.list $ rust "Type",
-    "struct">:
-      doc "A struct variant (e.g., Foo { x: i32 })" $
-      T.list $ rust "StructField"]
-
-
--- ================================================================================================
--- Function definition
--- ================================================================================================
-
-fnDef :: Binding
-fnDef = define "FnDef" $
-  doc "A function definition (e.g., fn foo<T>(x: T) -> String { ... })" $
-  T.record [
-    "name">:
-      doc "The function name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "params">:
-      doc "The function parameters" $
-      T.list $ rust "FnParam",
-    "returnType">:
-      doc "The return type (None means ())" $
-      T.maybe $ rust "Type",
-    "body">:
-      doc "The function body" $
-      rust "Block",
-    "public">:
-      doc "Whether the function is public" $
-      T.boolean,
-    "async">:
-      doc "Whether the function is async" $
-      T.boolean,
-    "const">:
-      doc "Whether the function is const" $
-      T.boolean,
-    "unsafe">:
-      doc "Whether the function is unsafe" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-fnParam :: Binding
-fnParam = define "FnParam" $
-  doc "A function parameter" $
-  T.record [
-    "pattern">:
-      doc "The parameter pattern" $
-      rust "Pattern",
-    "type">:
-      doc "The parameter type" $
-      rust "Type"]
-
-selfParam :: Binding
-selfParam = define "SelfParam" $
-  doc "A self parameter in a method" $
-  T.enum ["owned", "ref", "refMut"]
-
-methodParam :: Binding
-methodParam = define "MethodParam" $
-  doc "A method parameter, which may be self or a regular parameter" $
-  T.union [
-    "self">:
-      doc "A self parameter" $
-      rust "SelfParam",
-    "regular">:
-      doc "A regular function parameter" $
-      rust "FnParam"]
-
-
--- ================================================================================================
--- Type alias
--- ================================================================================================
-
-typeAlias :: Binding
-typeAlias = define "TypeAlias" $
-  doc "A type alias definition (e.g., type Foo<T> = Bar<T>;)" $
-  T.record [
-    "name">:
-      doc "The alias name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "type">:
-      doc "The aliased type" $
-      rust "Type",
-    "public">:
-      doc "Whether the alias is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-
--- ================================================================================================
--- Const, static, and module definitions
--- ================================================================================================
-
-constDef :: Binding
-constDef = define "ConstDef" $
-  doc "A constant item (e.g., const FOO: u32 = 42;)" $
-  T.record [
-    "name">:
-      doc "The constant name" $
-      T.string,
-    "type">:
-      doc "The constant type" $
-      rust "Type",
-    "value">:
-      doc "The constant value expression" $
-      rust "Expression",
-    "public">:
-      doc "Whether the constant is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-staticDef :: Binding
-staticDef = define "StaticDef" $
-  doc "A static item (e.g., static FOO: u32 = 42;)" $
-  T.record [
-    "name">:
-      doc "The static name" $
-      T.string,
-    "type">:
-      doc "The static type" $
-      rust "Type",
-    "value">:
-      doc "The static value expression" $
-      rust "Expression",
-    "mutable">:
-      doc "Whether the static is mutable" $
-      T.boolean,
-    "public">:
-      doc "Whether the static is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-modDef :: Binding
-modDef = define "ModDef" $
-  doc "A module definition (either inline or external)" $
-  T.record [
-    "name">:
-      doc "The module name" $
-      T.string,
-    "body">:
-      doc "The module body (None for external file)" $
-      T.maybe $ T.list $ rust "Item",
-    "public">:
-      doc "Whether the module is public" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-
--- ================================================================================================
--- Impl block
--- ================================================================================================
-
-implBlock :: Binding
-implBlock = define "ImplBlock" $
-  doc "An impl block (e.g., impl<T> Trait for Foo<T> { ... })" $
-  T.record [
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "trait">:
-      doc "The trait being implemented, if any" $
-      T.maybe $ rust "TypePath",
-    "negative">:
-      doc "Whether this is a negative impl" $
-      T.boolean,
-    "selfType">:
-      doc "The type being implemented for" $
-      rust "Type",
-    "items">:
-      doc "The items within the impl block" $
-      T.list $ rust "ImplItem"]
-
-implItem :: Binding
-implItem = define "ImplItem" $
-  doc "An item within an impl block" $
-  T.union [
-    "method">:
-      doc "A method definition" $
-      rust "ImplMethod",
-    "type">:
-      doc "An associated type definition" $
-      rust "TypeAlias",
-    "const">:
-      doc "An associated constant" $
-      rust "ConstDef"]
-
-implMethod :: Binding
-implMethod = define "ImplMethod" $
-  doc "A method within an impl block" $
-  T.record [
-    "name">:
-      doc "The method name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "params">:
-      doc "The method parameters (including self)" $
-      T.list $ rust "MethodParam",
-    "returnType">:
-      doc "The return type (None means ())" $
-      T.maybe $ rust "Type",
-    "body">:
-      doc "The method body" $
-      rust "Block",
-    "public">:
-      doc "Whether the method is public" $
-      T.boolean,
-    "default">:
-      doc "Whether the method has a default implementation" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-
--- ================================================================================================
--- Trait definition
--- ================================================================================================
-
-traitDef :: Binding
-traitDef = define "TraitDef" $
-  doc "A trait definition (e.g., trait Foo<T>: Bar + Baz { ... })" $
-  T.record [
-    "name">:
-      doc "The trait name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "superTraits">:
-      doc "Supertraits" $
-      T.list $ rust "TypeParamBound",
-    "items">:
-      doc "The items within the trait" $
-      T.list $ rust "TraitItem",
-    "public">:
-      doc "Whether the trait is public" $
-      T.boolean,
-    "unsafe">:
-      doc "Whether the trait is unsafe" $
-      T.boolean,
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-traitItem :: Binding
-traitItem = define "TraitItem" $
-  doc "An item within a trait definition" $
-  T.union [
-    "method">:
-      doc "A method signature or default method" $
-      rust "TraitMethod",
-    "type">:
-      doc "An associated type" $
-      rust "TraitType",
-    "const">:
-      doc "An associated constant" $
-      rust "TraitConst"]
-
-traitMethod :: Binding
-traitMethod = define "TraitMethod" $
-  doc "A method signature or default method within a trait" $
-  T.record [
-    "name">:
-      doc "The method name" $
-      T.string,
-    "generics">:
-      doc "Generic type parameters" $
-      T.list $ rust "GenericParam",
-    "whereClause">:
-      doc "Optional where clause" $
-      T.maybe $ rust "WhereClause",
-    "params">:
-      doc "The method parameters (including self)" $
-      T.list $ rust "MethodParam",
-    "returnType">:
-      doc "The return type" $
-      T.maybe $ rust "Type",
-    "defaultBody">:
-      doc "Optional default body" $
-      T.maybe $ rust "Block",
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-traitType :: Binding
-traitType = define "TraitType" $
-  doc "An associated type within a trait" $
-  T.record [
-    "name">:
-      doc "The associated type name" $
-      T.string,
-    "bounds">:
-      doc "Type parameter bounds" $
-      T.list $ rust "TypeParamBound",
-    "default">:
-      doc "Optional default type" $
-      T.maybe $ rust "Type",
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-traitConst :: Binding
-traitConst = define "TraitConst" $
-  doc "An associated constant within a trait" $
-  T.record [
-    "name">:
-      doc "The constant name" $
-      T.string,
-    "type">:
-      doc "The constant type" $
-      rust "Type",
-    "default">:
-      doc "Optional default value" $
-      T.maybe $ rust "Expression",
-    "doc">:
-      doc "Optional doc comment" $
-      T.maybe T.string]
-
-
--- ================================================================================================
--- Generics and where clauses
--- ================================================================================================
-
-genericParam :: Binding
-genericParam = define "GenericParam" $
-  doc "A generic type parameter (e.g., T: Clone + Debug)" $
-  T.record [
-    "name">:
-      doc "The parameter name" $
-      T.string,
-    "bounds">:
-      doc "Trait bounds on the parameter" $
-      T.list $ rust "TypeParamBound"]
-
-typeParamBound :: Binding
-typeParamBound = define "TypeParamBound" $
-  doc "A bound on a type parameter" $
-  T.union [
-    "trait">:
-      doc "A trait bound" $
-      rust "TypePath",
-    "lifetime">:
-      doc "A lifetime bound" $
-      rust "Lifetime"]
-
-lifetime :: Binding
-lifetime = define "Lifetime" $
-  doc "A lifetime (e.g., 'a, 'static)" $
-  T.record [
-    "name">:
-      doc "The lifetime name (without the leading quote)" $
-      T.string]
-
-whereClause :: Binding
-whereClause = define "WhereClause" $
-  doc "A where clause (e.g., where T: Clone, U: Debug)" $
-  T.record [
-    "predicates">:
-      doc "The predicates in the where clause" $
-      T.list $ rust "WherePredicate"]
-
-wherePredicate :: Binding
-wherePredicate = define "WherePredicate" $
-  doc "A single predicate in a where clause" $
-  T.record [
-    "type">:
-      doc "The type being constrained" $
-      rust "Type",
-    "bounds">:
-      doc "The bounds on the type" $
-      T.list $ rust "TypeParamBound"]
-
-
--- ================================================================================================
--- Types
--- ================================================================================================
-
-type_ :: Binding
-type_ = define "Type" $
-  doc "A Rust type expression" $
-  T.union [
-    "path">:
-      doc "A path type, possibly with generic arguments" $
-      rust "TypePath",
-    "reference">:
-      doc "A reference type" $
-      rust "ReferenceType",
-    "slice">:
-      doc "A slice type" $
-      rust "Type",
-    "array">:
-      doc "An array type with a fixed size" $
-      rust "ArrayType",
-    "tuple">:
-      doc "A tuple type" $
-      T.list $ rust "Type",
-    "fnPointer">:
-      doc "A function pointer type" $
-      rust "FnPointerType",
-    "implTrait">:
-      doc "An impl Trait type" $
-      T.list $ rust "TypeParamBound",
-    "dynTrait">:
-      doc "A dyn Trait type" $
-      T.list $ rust "TypeParamBound",
-    "inferred">:
-      doc "The inferred type placeholder (_)" $
-      T.unit,
-    "unit">:
-      doc "The unit type (())" $
-      T.unit,
-    "never">:
-      doc "The never type (!)" $
-      T.unit,
-    "rawPointer">:
-      doc "A raw pointer type" $
-      rust "RawPointerType",
-    "macro">:
-      doc "A macro invocation in type position" $
-      rust "MacroInvocation"]
-
-typePath :: Binding
-typePath = define "TypePath" $
-  doc "A path-based type, possibly with generic arguments" $
-  T.record [
-    "global">:
-      doc "Whether the path is absolute (starts with ::)" $
-      T.boolean,
-    "segments">:
-      doc "The segments of the path" $
-      T.list $ rust "PathSegment"]
-
-pathSegment :: Binding
-pathSegment = define "PathSegment" $
-  doc "A segment within a type path" $
-  T.record [
-    "name">:
-      doc "The segment name" $
-      T.string,
-    "arguments">:
-      doc "Generic arguments, if any" $
-      rust "GenericArguments"]
-
-genericArguments :: Binding
-genericArguments = define "GenericArguments" $
-  doc "Generic arguments to a path segment" $
-  T.union [
-    "none">:
-      doc "No generic arguments" $
-      T.unit,
-    "angleBracketed">:
-      doc "Angle-bracketed arguments" $
-      rust "AngleBracketedArgs",
-    "parenthesized">:
-      doc "Parenthesized arguments for Fn traits" $
-      rust "ParenthesizedArgs"]
-
-angleBracketedArgs :: Binding
-angleBracketedArgs = define "AngleBracketedArgs" $
-  doc "Angle-bracketed generic arguments" $
-  T.record [
-    "args">:
-      doc "The generic arguments" $
-      T.list $ rust "GenericArg"]
-
-genericArg :: Binding
-genericArg = define "GenericArg" $
-  doc "A single generic argument" $
-  T.union [
-    "type">:
-      doc "A type argument" $
-      rust "Type",
-    "lifetime">:
-      doc "A lifetime argument" $
-      rust "Lifetime",
-    "const">:
-      doc "A const expression argument" $
-      rust "Expression",
-    "binding">:
-      doc "An associated type binding" $
-      rust "TypeBinding"]
-
-typeBinding :: Binding
-typeBinding = define "TypeBinding" $
-  doc "An associated type binding within generic arguments" $
-  T.record [
-    "name">:
-      doc "The associated type name" $
-      T.string,
-    "type">:
-      doc "The bound type" $
-      rust "Type"]
-
-parenthesizedArgs :: Binding
-parenthesizedArgs = define "ParenthesizedArgs" $
-  doc "Parenthesized generic arguments for Fn traits" $
-  T.record [
-    "inputs">:
-      doc "The input types" $
-      T.list $ rust "Type",
-    "output">:
-      doc "The output type" $
-      T.maybe $ rust "Type"]
-
-referenceType :: Binding
-referenceType = define "ReferenceType" $
-  doc "A reference type (e.g., &T, &mut T, &'a T)" $
-  T.record [
-    "lifetime">:
-      doc "Optional lifetime annotation" $
-      T.maybe $ rust "Lifetime",
-    "mutable">:
-      doc "Whether the reference is mutable" $
-      T.boolean,
-    "type">:
-      doc "The referenced type" $
-      rust "Type"]
-
-arrayType :: Binding
-arrayType = define "ArrayType" $
-  doc "An array type with a fixed size (e.g., [T; 3])" $
-  T.record [
-    "element">:
-      doc "The element type" $
-      rust "Type",
-    "length">:
-      doc "The array length (as a constant expression)" $
-      rust "Expression"]
-
-fnPointerType :: Binding
-fnPointerType = define "FnPointerType" $
-  doc "A function pointer type (e.g., fn(i32, i32) -> i32)" $
-  T.record [
-    "params">:
-      doc "The parameter types" $
-      T.list $ rust "Type",
-    "returnType">:
-      doc "The return type" $
-      rust "Type"]
-
-rawPointerType :: Binding
-rawPointerType = define "RawPointerType" $
-  doc "A raw pointer type (e.g., *const T, *mut T)" $
-  T.record [
-    "mutable">:
-      doc "Whether the pointer is mutable (*mut vs *const)" $
-      T.boolean,
-    "type">:
-      doc "The pointed-to type" $
-      rust "Type"]
-
-
--- ================================================================================================
--- Expressions
--- ================================================================================================
-
-expression :: Binding
-expression = define "Expression" $
-  doc "A Rust expression" $
-  T.union [
-    "literal">:
-      doc "A literal value" $
-      rust "Literal",
-    "path">:
-      doc "A path expression" $
-      rust "ExprPath",
-    "block">:
-      doc "A block expression" $
-      rust "Block",
-    "call">:
-      doc "A function call expression" $
-      rust "CallExpr",
-    "methodCall">:
-      doc "A method call expression" $
-      rust "MethodCallExpr",
-    "fieldAccess">:
-      doc "A field access expression" $
-      rust "FieldAccessExpr",
-    "tupleIndex">:
-      doc "A tuple index expression" $
-      rust "TupleIndexExpr",
-    "closure">:
-      doc "A closure expression" $
-      rust "ClosureExpr",
-    "if">:
-      doc "An if expression, including if let" $
-      rust "IfExpr",
-    "match">:
-      doc "A match expression" $
-      rust "MatchExpr",
-    "loop">:
-      doc "A loop expression" $
-      rust "LoopExpr",
-    "while">:
-      doc "A while expression, including while let" $
-      rust "WhileExpr",
-    "for">:
-      doc "A for expression" $
-      rust "ForExpr",
-    "binary">:
-      doc "A binary operation" $
-      rust "BinaryExpr",
-    "unary">:
-      doc "A unary operation" $
-      rust "UnaryExpr",
-    "reference">:
-      doc "A reference expression" $
-      rust "RefExpr",
-    "dereference">:
-      doc "A dereference expression" $
-      rust "Expression",
-    "struct">:
-      doc "A struct literal expression" $
-      rust "StructExpr",
-    "tuple">:
-      doc "A tuple expression" $
-      T.list $ rust "Expression",
-    "array">:
-      doc "An array expression" $
-      rust "ArrayExpr",
-    "index">:
-      doc "An index expression" $
-      rust "IndexExpr",
-    "range">:
-      doc "A range expression" $
-      rust "RangeExpr",
-    "return">:
-      doc "A return expression" $
-      T.maybe $ rust "Expression",
-    "break">:
-      doc "A break expression" $
-      T.maybe $ rust "Expression",
-    "continue">:
-      doc "A continue expression" $
-      T.unit,
-    "try">:
-      doc "A try expression (expr?)" $
-      rust "Expression",
-    "cast">:
-      doc "A type cast expression" $
-      rust "CastExpr",
-    "typeAscription">:
-      doc "A type ascription expression" $
-      rust "TypeAscriptionExpr",
-    "await">:
-      doc "An await expression" $
-      rust "Expression",
-    "assign">:
-      doc "An assignment expression" $
-      rust "AssignExpr",
-    "compoundAssign">:
-      doc "A compound assignment expression" $
-      rust "CompoundAssignExpr",
-    "macro">:
-      doc "A macro invocation expression" $
-      rust "MacroInvocation",
-    "paren">:
-      doc "A parenthesized expression" $
-      rust "Expression"]
-
-exprPath :: Binding
-exprPath = define "ExprPath" $
-  doc "A path used as an expression" $
-  T.record [
-    "global">:
-      doc "Whether the path is global" $
-      T.boolean,
-    "segments">:
-      doc "The path segments" $
-      T.list $ rust "PathSegment"]
-
-callExpr :: Binding
-callExpr = define "CallExpr" $
-  doc "A function call expression" $
-  T.record [
-    "function">:
-      doc "The function being called" $
-      rust "Expression",
-    "args">:
-      doc "The arguments" $
-      T.list $ rust "Expression"]
-
-methodCallExpr :: Binding
-methodCallExpr = define "MethodCallExpr" $
-  doc "A method call expression" $
-  T.record [
-    "receiver">:
-      doc "The receiver expression" $
-      rust "Expression",
-    "method">:
-      doc "The method name" $
-      T.string,
-    "turbofish">:
-      doc "Optional turbofish generic arguments" $
-      T.list $ rust "Type",
-    "args">:
-      doc "The arguments (excluding the receiver)" $
-      T.list $ rust "Expression"]
-
-fieldAccessExpr :: Binding
-fieldAccessExpr = define "FieldAccessExpr" $
-  doc "A field access expression" $
-  T.record [
-    "object">:
-      doc "The expression being accessed" $
-      rust "Expression",
-    "field">:
-      doc "The field name" $
-      T.string]
-
-tupleIndexExpr :: Binding
-tupleIndexExpr = define "TupleIndexExpr" $
-  doc "A tuple index expression" $
-  T.record [
-    "tuple">:
-      doc "The tuple expression" $
-      rust "Expression",
-    "index">:
-      doc "The index (0-based)" $
-      T.int32]
-
-closureExpr :: Binding
-closureExpr = define "ClosureExpr" $
-  doc "A closure expression" $
-  T.record [
-    "move">:
-      doc "Whether the closure captures by move" $
-      T.boolean,
-    "params">:
-      doc "The closure parameters" $
-      T.list $ rust "ClosureParam",
-    "returnType">:
-      doc "Optional return type annotation" $
-      T.maybe $ rust "Type",
-    "body">:
-      doc "The closure body" $
-      rust "Expression"]
-
-closureParam :: Binding
-closureParam = define "ClosureParam" $
-  doc "A closure parameter" $
-  T.record [
-    "pattern">:
-      doc "The parameter pattern" $
-      rust "Pattern",
-    "type">:
-      doc "Optional type annotation" $
-      T.maybe $ rust "Type"]
-
-ifExpr :: Binding
-ifExpr = define "IfExpr" $
-  doc "An if expression, optionally with if let" $
-  T.record [
-    "condition">:
-      doc "The condition" $
-      rust "IfCondition",
-    "thenBlock">:
-      doc "The then block" $
-      rust "Block",
-    "elseBranch">:
-      doc "An optional else branch" $
-      T.maybe $ rust "Expression"]
-
-ifCondition :: Binding
-ifCondition = define "IfCondition" $
-  doc "The condition of an if expression" $
-  T.union [
-    "bool">:
-      doc "A boolean condition" $
-      rust "Expression",
-    "let">:
-      doc "A let condition" $
-      rust "LetCondition"]
-
-matchExpr :: Binding
-matchExpr = define "MatchExpr" $
-  doc "A match expression" $
-  T.record [
-    "scrutinee">:
-      doc "The expression being matched" $
-      rust "Expression",
-    "arms">:
-      doc "The match arms" $
-      T.list $ rust "MatchArm"]
-
-matchArm :: Binding
-matchArm = define "MatchArm" $
-  doc "A single arm in a match expression" $
-  T.record [
-    "pattern">:
-      doc "The pattern to match" $
-      rust "Pattern",
-    "guard">:
-      doc "Optional guard expression" $
-      T.maybe $ rust "Expression",
-    "body">:
-      doc "The body expression" $
-      rust "Expression"]
-
-loopExpr :: Binding
-loopExpr = define "LoopExpr" $
-  doc "A loop expression" $
-  T.record [
-    "label">:
-      doc "Optional loop label" $
-      T.maybe T.string,
-    "body">:
-      doc "The loop body" $
-      rust "Block"]
-
-whileExpr :: Binding
-whileExpr = define "WhileExpr" $
-  doc "A while expression, optionally with while let" $
-  T.record [
-    "label">:
-      doc "Optional loop label" $
-      T.maybe T.string,
-    "condition">:
-      doc "The condition" $
-      rust "IfCondition",
-    "body">:
-      doc "The loop body" $
-      rust "Block"]
-
-forExpr :: Binding
-forExpr = define "ForExpr" $
-  doc "A for expression" $
-  T.record [
-    "label">:
-      doc "Optional loop label" $
-      T.maybe T.string,
-    "pattern">:
-      doc "The loop variable pattern" $
-      rust "Pattern",
-    "iter">:
-      doc "The iterator expression" $
-      rust "Expression",
-    "body">:
-      doc "The loop body" $
-      rust "Block"]
-
-binaryExpr :: Binding
-binaryExpr = define "BinaryExpr" $
-  doc "A binary operation" $
-  T.record [
-    "left">:
-      doc "The left-hand operand" $
-      rust "Expression",
-    "op">:
-      doc "The binary operator" $
-      rust "BinaryOp",
-    "right">:
-      doc "The right-hand operand" $
-      rust "Expression"]
-
-binaryOp :: Binding
-binaryOp = define "BinaryOp" $
-  doc "A binary operator" $
-  T.enum [
-    "add", "sub", "mul", "div", "rem",
-    "and", "or",
-    "bitAnd", "bitOr", "bitXor", "shl", "shr",
-    "eq", "ne", "lt", "le", "gt", "ge"]
-
-unaryExpr :: Binding
-unaryExpr = define "UnaryExpr" $
-  doc "A unary operation" $
-  T.record [
-    "op">:
-      doc "The unary operator" $
-      rust "UnaryOp",
-    "operand">:
-      doc "The operand" $
-      rust "Expression"]
-
-unaryOp :: Binding
-unaryOp = define "UnaryOp" $
-  doc "A unary operator" $
-  T.enum ["neg", "not"]
-
-refExpr :: Binding
-refExpr = define "RefExpr" $
-  doc "A reference expression" $
-  T.record [
-    "mutable">:
-      doc "Whether the reference is mutable" $
-      T.boolean,
-    "expr">:
-      doc "The expression being referenced" $
-      rust "Expression"]
-
-structExpr :: Binding
-structExpr = define "StructExpr" $
-  doc "A struct literal expression" $
-  T.record [
-    "path">:
-      doc "The struct path" $
-      rust "ExprPath",
-    "fields">:
-      doc "The field assignments" $
-      T.list $ rust "FieldValue",
-    "rest">:
-      doc "Optional base expression for struct update syntax" $
-      T.maybe $ rust "Expression"]
-
-fieldValue :: Binding
-fieldValue = define "FieldValue" $
-  doc "A field-value pair in a struct literal" $
-  T.record [
-    "name">:
-      doc "The field name" $
-      T.string,
-    "value">:
-      doc "The field value (None for shorthand syntax)" $
-      T.maybe $ rust "Expression"]
-
-arrayExpr :: Binding
-arrayExpr = define "ArrayExpr" $
-  doc "An array expression" $
-  T.union [
-    "elements">:
-      doc "An array literal" $
-      T.list $ rust "Expression",
-    "repeat">:
-      doc "An array repeat expression" $
-      rust "ArrayRepeat"]
-
-indexExpr :: Binding
-indexExpr = define "IndexExpr" $
-  doc "An index expression" $
-  T.record [
-    "object">:
-      doc "The expression being indexed" $
-      rust "Expression",
-    "index">:
-      doc "The index expression" $
-      rust "Expression"]
-
-rangeExpr :: Binding
-rangeExpr = define "RangeExpr" $
-  doc "A range expression" $
-  T.record [
-    "from">:
-      doc "The lower bound (optional)" $
-      T.maybe $ rust "Expression",
-    "to">:
-      doc "The upper bound (optional)" $
-      T.maybe $ rust "Expression",
-    "inclusive">:
-      doc "Whether the range is inclusive" $
-      T.boolean]
-
-castExpr :: Binding
-castExpr = define "CastExpr" $
-  doc "A type cast expression" $
-  T.record [
-    "expr">:
-      doc "The expression being cast" $
-      rust "Expression",
-    "type">:
-      doc "The target type" $
-      rust "Type"]
-
-typeAscriptionExpr :: Binding
-typeAscriptionExpr = define "TypeAscriptionExpr" $
-  doc "A type ascription expression" $
-  T.record [
-    "expr">:
-      doc "The expression" $
-      rust "Expression",
-    "type">:
-      doc "The ascribed type" $
-      rust "Type"]
-
-assignExpr :: Binding
-assignExpr = define "AssignExpr" $
-  doc "An assignment expression" $
-  T.record [
-    "target">:
-      doc "The left-hand side (target)" $
-      rust "Expression",
-    "value">:
-      doc "The right-hand side (value)" $
-      rust "Expression"]
-
-compoundAssignExpr :: Binding
-compoundAssignExpr = define "CompoundAssignExpr" $
-  doc "A compound assignment expression" $
-  T.record [
-    "target">:
-      doc "The left-hand side (target)" $
-      rust "Expression",
-    "op">:
-      doc "The compound assignment operator" $
-      rust "CompoundAssignOp",
-    "value">:
-      doc "The right-hand side (value)" $
-      rust "Expression"]
-
-compoundAssignOp :: Binding
-compoundAssignOp = define "CompoundAssignOp" $
-  doc "A compound assignment operator" $
-  T.enum [
-    "addAssign", "subAssign", "mulAssign", "divAssign", "remAssign",
-    "bitAndAssign", "bitOrAssign", "bitXorAssign", "shlAssign", "shrAssign"]
-
-macroInvocation :: Binding
-macroInvocation = define "MacroInvocation" $
-  doc "A macro invocation" $
-  T.record [
-    "path">:
-      doc "The macro path" $
-      T.list T.string,
-    "delimiter">:
-      doc "The delimiter style used" $
-      rust "MacroDelimiter",
-    "tokens">:
-      doc "The token stream as a raw string" $
-      T.string]
-
-macroDelimiter :: Binding
-macroDelimiter = define "MacroDelimiter" $
-  doc "The delimiter style for a macro invocation" $
-  T.enum ["paren", "bracket", "brace"]
-
-
--- ================================================================================================
--- Statements
--- ================================================================================================
-
-statement :: Binding
-statement = define "Statement" $
-  doc "A statement within a block" $
-  T.union [
-    "let">:
-      doc "A let binding" $
-      rust "LetStatement",
-    "expression">:
-      doc "An expression statement" $
-      rust "Expression",
-    "item">:
-      doc "An item declaration within a block" $
-      rust "Item",
-    "empty">:
-      doc "An empty statement" $
-      T.unit]
-
-letStatement :: Binding
-letStatement = define "LetStatement" $
-  doc "A let statement" $
-  T.record [
-    "pattern">:
-      doc "The binding pattern" $
-      rust "Pattern",
-    "mutable">:
-      doc "Whether the binding is mutable" $
-      T.boolean,
-    "type">:
-      doc "Optional type annotation" $
-      T.maybe $ rust "Type",
-    "init">:
-      doc "Optional initializer expression" $
-      T.maybe $ rust "Expression"]
-
-block :: Binding
-block = define "Block" $
-  doc "A block expression" $
-  T.record [
-    "statements">:
-      doc "The statements in the block" $
-      T.list $ rust "Statement",
-    "expression">:
-      doc "An optional trailing expression" $
-      T.maybe $ rust "Expression"]
-
-
--- ================================================================================================
--- Patterns
--- ================================================================================================
-
-pattern :: Binding
-pattern = define "Pattern" $
-  doc "A Rust pattern (used in let, match, function parameters, etc.)" $
-  T.union [
-    "wildcard">:
-      doc "A wildcard pattern (_)" $
-      T.unit,
-    "identifier">:
-      doc "An identifier pattern" $
-      rust "IdentifierPattern",
-    "literal">:
-      doc "A literal pattern" $
-      rust "Literal",
-    "reference">:
-      doc "A reference pattern" $
-      rust "RefPattern",
-    "struct">:
-      doc "A struct pattern" $
-      rust "StructPattern",
-    "tupleStruct">:
-      doc "A tuple struct pattern" $
-      rust "TupleStructPattern",
-    "tuple">:
-      doc "A tuple pattern" $
-      T.list $ rust "Pattern",
-    "slice">:
-      doc "A slice pattern" $
-      T.list $ rust "Pattern",
-    "or">:
-      doc "An or-pattern" $
-      T.list $ rust "Pattern",
-    "path">:
-      doc "A path pattern" $
-      rust "ExprPath",
-    "range">:
-      doc "A range pattern" $
-      rust "RangePattern",
-    "rest">:
-      doc "A rest pattern (..)" $
-      T.unit,
-    "paren">:
-      doc "A parenthesized pattern" $
-      rust "Pattern"]
-
-identifierPattern :: Binding
-identifierPattern = define "IdentifierPattern" $
-  doc "An identifier pattern" $
-  T.record [
-    "name">:
-      doc "The identifier name" $
-      T.string,
-    "mutable">:
-      doc "Whether the binding is mutable" $
-      T.boolean,
-    "atPattern">:
-      doc "Optional sub-pattern (e.g., x @ Some(_))" $
-      T.maybe $ rust "Pattern"]
-
-refPattern :: Binding
-refPattern = define "RefPattern" $
-  doc "A reference pattern" $
-  T.record [
-    "mutable">:
-      doc "Whether the reference is mutable" $
-      T.boolean,
-    "pattern">:
-      doc "The inner pattern" $
-      rust "Pattern"]
-
-structPattern :: Binding
-structPattern = define "StructPattern" $
-  doc "A struct pattern" $
-  T.record [
-    "path">:
-      doc "The struct path" $
-      rust "ExprPath",
-    "fields">:
-      doc "The field patterns" $
-      T.list $ rust "FieldPattern",
-    "rest">:
-      doc "Whether the pattern has a rest (..) at the end" $
-      T.boolean]
-
-fieldPattern :: Binding
-fieldPattern = define "FieldPattern" $
-  doc "A field pattern within a struct pattern" $
-  T.record [
-    "name">:
-      doc "The field name" $
-      T.string,
-    "pattern">:
-      doc "The field pattern (None for shorthand)" $
-      T.maybe $ rust "Pattern"]
-
-tupleStructPattern :: Binding
-tupleStructPattern = define "TupleStructPattern" $
-  doc "A tuple struct pattern" $
-  T.record [
-    "path">:
-      doc "The path to the tuple struct or variant" $
-      rust "ExprPath",
-    "elements">:
-      doc "The element patterns" $
-      T.list $ rust "Pattern"]
-
-rangePattern :: Binding
-rangePattern = define "RangePattern" $
-  doc "A range pattern" $
-  T.record [
-    "from">:
-      doc "The lower bound" $
-      T.maybe $ rust "Pattern",
-    "to">:
-      doc "The upper bound" $
-      T.maybe $ rust "Pattern",
-    "inclusive">:
-      doc "Whether the range is inclusive" $
-      T.boolean]
-
-
--- ================================================================================================
--- Literals
--- ================================================================================================
-
-literal :: Binding
-literal = define "Literal" $
-  doc "A literal value" $
-  T.union [
-    "integer">:
-      doc "An integer literal" $
-      rust "IntegerLiteral",
-    "float">:
-      doc "A floating-point literal" $
-      rust "FloatLiteral",
-    "string">:
-      doc "A string literal" $
-      T.string,
-    "rawString">:
-      doc "A raw string literal" $
-      T.string,
-    "byteString">:
-      doc "A byte string literal" $
-      T.binary,
-    "char">:
-      doc "A character literal" $
-      T.uint32,
-    "byte">:
-      doc "A byte literal" $
-      T.uint8,
-    "bool">:
-      doc "A boolean literal" $
-      T.boolean]
-
-integerLiteral :: Binding
-integerLiteral = define "IntegerLiteral" $
-  doc "An integer literal with optional suffix" $
-  T.record [
-    "value">:
-      doc "The integer value" $
-      T.bigint,
-    "suffix">:
-      doc "Optional type suffix" $
-      T.maybe T.string]
-
-floatLiteral :: Binding
-floatLiteral = define "FloatLiteral" $
-  doc "A floating-point literal with optional suffix" $
-  T.record [
-    "value">:
-      doc "The float value" $
-      T.float64,
-    "suffix">:
-      doc "Optional type suffix" $
-      T.maybe T.string]
-
-
--- ================================================================================================
--- Attributes and visibility
--- ================================================================================================
-
-attribute :: Binding
-attribute = define "Attribute" $
-  doc "An attribute (e.g., #[derive(Clone)], #[cfg(test)])" $
-  T.record [
-    "inner">:
-      doc "Whether the attribute is an inner attribute (#![...] vs #[...])" $
-      T.boolean,
-    "path">:
-      doc "The attribute path" $
-      T.list T.string,
-    "tokens">:
-      doc "The attribute arguments as a raw token string" $
-      T.maybe T.string]
-
-visibility :: Binding
-visibility = define "Visibility" $
-  doc "A visibility qualifier" $
-  T.union [
-    "public">:
-      doc "Public (pub)" $
-      T.unit,
-    "crate">:
-      doc "Crate-visible (pub(crate))" $
-      T.unit,
-    "restricted">:
-      doc "Visible to a specific path (pub(in path))" $
-      T.list T.string,
-    "private">:
-      doc "Private (default)" $
-      T.unit]
-
-
--- ================================================================================================
--- Helper types (used in expressions)
--- ================================================================================================
-
--- | A let condition in an if-let or while-let
-letCondition :: Binding
-letCondition = define "LetCondition" $
-  doc "A let condition (e.g., let Some(x) = opt)" $
-  T.record [
-    "pattern">:
-      doc "The pattern" $
-      rust "Pattern",
-    "expr">:
-      doc "The expression being matched" $
-      rust "Expression"]
-
--- | An array repeat expression
-arrayRepeat :: Binding
-arrayRepeat = define "ArrayRepeat" $
-  doc "An array repeat expression (e.g., [0; 10])" $
-  T.record [
-    "element">:
-      doc "The element expression" $
-      rust "Expression",
-    "length">:
-      doc "The length expression" $
-      rust "Expression"]
diff --git a/src/main/haskell/Hydra/Sources/Scala/Coder.hs b/src/main/haskell/Hydra/Sources/Scala/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Coder.hs
+++ /dev/null
@@ -1,1557 +0,0 @@
--- | Scala code generator in Hydra DSL.
--- This module provides DSL versions of Scala code generation functions.
-
-module Hydra.Sources.Scala.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Scoping        as Scoping
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Resolution    as Resolution
-import qualified Hydra.Sources.Kernel.Terms.Analysis      as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Predicates    as Predicates
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Constants       as Constants
-import qualified Hydra.Sources.Kernel.Terms.Arity           as Arity
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import           Prelude hiding ((++))
-
-import qualified Data.Map as M
-import qualified Data.Set as S
-import Data.Coerce (coerce)
-
--- Additional imports
-import qualified Hydra.Scala.Syntax as Scala
-import qualified Hydra.Typing as HydraTyping
-import qualified Hydra.Sources.Scala.Syntax as ScalaSyntax
-import qualified Hydra.Sources.Scala.Language as ScalaLanguageSource
-import qualified Hydra.Sources.Scala.Utils as ScalaUtilsSource
-import qualified Hydra.Sources.Scala.Serde as ScalaSerdeSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
--- | An empty list term, avoiding ambiguous type variable issues with 'emptyList'
-emptyList :: TTerm [a]
-emptyList = TTerm $ TermList []
-
-
-ns :: Namespace
-ns = Namespace "hydra.scala.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ScalaUtilsSource.ns, ScalaSerdeSource.ns, Formatting.ns, Names.ns, Scoping.ns, Strip.ns, Variables.ns, Analysis.ns, Environment.ns, Predicates.ns, Resolution.ns, ShowCore.ns, Annotations.ns, Constants.ns,
-      Inference.ns, Sorting.ns, Arity.ns, SerializationSource.ns, Reduction.ns],
-            moduleTypeDependencies = (ScalaSyntax.ns:moduleNamespace ScalaLanguageSource.module_:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Scala code generator: converts Hydra modules to Scala source code"}
-  where
-    definitions = [
-      toDefinition applyVar,
-      toDefinition constructModule,
-      toDefinition dropDomains,
-      toDefinition encodeCase,
-      toDefinition encodeComplexTermDef,
-      toDefinition encodeFunction,
-      toDefinition encodeLetBinding,
-      toDefinition encodeLiteral,
-      toDefinition encodeLocalDef,
-      toDefinition encodeTerm,
-      toDefinition encodeTermDefinition,
-      toDefinition encodeType,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeTypedParam,
-      toDefinition encodeUntypeApplicationTerm,
-      toDefinition extractBody,
-      toDefinition extractCodomain,
-      toDefinition extractDomains,
-      toDefinition extractLetBindings,
-      toDefinition extractParams,
-      toDefinition fieldToEnumCase,
-      toDefinition fieldToParam,
-      toDefinition findDomain,
-      toDefinition findImports,
-      toDefinition findSdom,
-      toDefinition moduleToScala,
-      toDefinition stripWrapEliminations,
-      toDefinition toElImport,
-      toDefinition toPrimImport,
-      toDefinition typeParamToTypeVar]
-
-
-applyVar :: TTermDefinition (Term -> Name -> Term)
-applyVar = def "applyVar" $
-  doc "Apply a variable to a term, performing substitution for lambdas" $
-  lambda "fterm" $ lambda "avar" $ lets [
-    "v">: Core.unName (var "avar")] $
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "fterm") (Just $ Core.termApplication (record _Application [_Application_function>>: var "fterm", _Application_argument>>: Core.termVariable (var "avar")])) [
-      _Term_lambda>>: ("lam" ~> lets [
-        "lamParam">: project _Lambda _Lambda_parameter @@ var "lam",
-        "lamBody">: project _Lambda _Lambda_body @@ var "lam"] $
-        Logic.ifElse (Variables.isFreeVariableInTerm @@ var "lamParam" @@ var "lamBody")
-          (var "lamBody")
-          (Variables.substituteVariable @@ var "lamParam" @@ var "avar" @@ var "lamBody"))]
-
-constructModule :: TTermDefinition (Context -> Graph -> Module -> [Definition] -> Either Error Scala.Pkg)
-constructModule = def "constructModule" $
-  doc "Construct a Scala package from a Hydra module and its definitions" $
-  lambda "cx" $ lambda "g" $ lambda "mod" $ lambda "defs" $ lets [
-    "partitioned">: Environment.partitionDefinitions @@ var "defs",
-    "typeDefs">: Pairs.first (var "partitioned"),
-    "termDefs">: Pairs.second (var "partitioned"),
-    "nsName">: Packaging.unNamespace (Packaging.moduleNamespace (var "mod")),
-    "pname">: toScalaName (var "nsName"),
-    "pref">: inject _Data_Ref _Data_Ref_name (var "pname")] $
-    Eithers.bind
-      (Eithers.mapList ("td" ~> asTerm encodeTypeDefinition @@ var "cx" @@ var "g" @@ var "td") (var "typeDefs"))
-      ("typeDeclStats" ~>
-        Eithers.bind
-          (Eithers.mapList ("td" ~> asTerm encodeTermDefinition @@ var "cx" @@ var "g" @@ var "td") (var "termDefs"))
-          ("termDeclStats" ~>
-            Eithers.bind
-              (asTerm findImports @@ var "cx" @@ var "g" @@ var "mod")
-              ("imports" ~>
-                right (record _Pkg [
-                  _Pkg_name>>: var "pname",
-                  _Pkg_ref>>: var "pref",
-                  _Pkg_stats>>: Lists.concat (list [var "imports", var "typeDeclStats", var "termDeclStats"])]))))
-  where
-    toScalaName n = record _Data_Name [
-      _Data_Name_value>>: wrap _PredefString (Strings.intercalate (string ".") (Strings.splitOn (string ".") n))]
-
--- | Drop N domain types from a function type, returning the remaining type.
---   dropDomains 0 (A -> B -> C) = A -> B -> C
---   dropDomains 1 (A -> B -> C) = B -> C
---   dropDomains 2 (A -> B -> C) = C
-dropDomains :: TTermDefinition (Int -> Type -> Type)
-dropDomains = def "dropDomains" $
-  doc "Drop N domain types from a function type, returning the remaining type" $
-  lambda "n" $ lambda "t" $
-    Logic.ifElse (Equality.lte (var "n") (int32 0))
-      (var "t")
-      (cases _Type (Strip.deannotateType @@ var "t")
-        (Just $ var "t") [
-        _Type_function>>: ("ft" ~> dropDomains @@ (Math.sub (var "n") (int32 1)) @@ (Core.functionTypeCodomain $ var "ft")),
-        _Type_forall>>: ("fa" ~> dropDomains @@ var "n" @@ (Core.forallTypeBody $ var "fa"))])
-
-encodeCase :: TTermDefinition (Context -> Graph -> M.Map Name Type -> Maybe Name -> Field -> Either Error Scala.Case)
-encodeCase = def "encodeCase" $
-  doc "Encode a case branch" $
-  lambda "cx" $ lambda "g" $ lambda "ftypes" $ lambda "sn" $ lambda "f" $ lets [
-    "fname">: project _Field _Field_name @@ var "f",
-    "fterm">: project _Field _Field_term @@ var "f",
-    -- Determine if the field has unit type: check ftypes if available, otherwise check if term is a lambda
-    "isUnit">: Maybes.maybe
-      -- If ftypes doesn't have this field, check the term structure
-      (cases _Term (Strip.deannotateAndDetypeTerm @@ var "fterm") (Just false) [
-        -- Check lambda: unit if domain=Unit, or if lambda body doesn't use the parameter
-        _Term_lambda>>: ("lam" ~> lets [
-          "lamParam">: Core.lambdaParameter $ var "lam",
-          "lamBody">: Core.lambdaBody $ var "lam",
-          "domIsUnit">: Maybes.maybe false ("dom" ~> Equality.equal (var "dom") (Core.typeUnit)) (Core.lambdaDomain $ var "lam"),
-          -- isFreeVariableInTerm returns True when the variable is NOT present
-          "bodyIgnoresParam">: Variables.isFreeVariableInTerm @@ var "lamParam" @@ var "lamBody"] $
-          Logic.or (var "domIsUnit") (var "bodyIgnoresParam")),
-        _Term_record>>: ("r" ~> Equality.equal (Lists.length (Core.recordFields (var "r"))) (int32 0)),
-        _Term_unit>>: (constant true)])
-      ("dom" ~> cases _Type (Strip.deannotateType @@ var "dom")
-        (Just false)
-        [_Type_unit>>: constant true,
-         _Type_record>>: ("rt" ~> Equality.equal (Lists.length (var "rt")) (int32 0))])
-      (Maps.lookup (var "fname") (var "ftypes")),
-    -- Use type name + field name + lambda param name for unique variable names.
-    -- The lambda param suffix prevents shadowing in nested matches on the same union type
-    -- (e.g., outer "sf" -> "v_ParseResult_success_sf", inner "sa" -> "v_ParseResult_success_sa").
-    "shortTypeName">: Maybes.fromMaybe (string "x") (Lists.maybeLast (Strings.splitOn (string ".") (Maybes.maybe (string "x") ("n" ~> Core.unName (var "n")) (var "sn")))),
-    -- Sanitize lambda param name for use as suffix: replace apostrophes with underscores
-    "lamParamSuffix">: cases _Term (Strip.deannotateAndDetypeTerm @@ var "fterm") (Just $ string "") [
-      _Term_lambda>>: ("lam" ~> lets [
-        "rawName">: Core.unName (Core.lambdaParameter $ var "lam"),
-        "safeName">: Strings.fromList (Lists.map ("c" ~> Logic.ifElse (Equality.equal (var "c") (int32 39)) (int32 95) (var "c")) (Strings.toList (var "rawName")))] $
-        Strings.cat2 (string "_") (var "safeName"))],
-    "v">: Core.name (Strings.cat (list [string "v_", var "shortTypeName", string "_", Core.unName (var "fname"), var "lamParamSuffix"])),
-    -- Check if variant is truly parameterless (domain is Unit) vs parameterized but unused
-    "domainIsUnit">: cases _Term (Strip.deannotateAndDetypeTerm @@ var "fterm") (Just true) [
-      _Term_lambda>>: ("lam" ~>
-        Maybes.maybe true ("dom" ~> Equality.equal (var "dom") (Core.typeUnit)) (Core.lambdaDomain $ var "lam"))],
-    "patArgs">: Logic.ifElse (var "isUnit")
-      (Logic.ifElse (var "domainIsUnit")
-        (emptyList)
-        (list [inject _Pat _Pat_wildcard unit]))
-      (list [ScalaUtilsSource.svar @@ var "v"]),
-    "pat">: inject _Pat _Pat_extract (record _Pat_Extract [
-      _Pat_Extract_fun>>: ScalaUtilsSource.sname @@ (ScalaUtilsSource.qualifyUnionFieldName @@ string "MATCHED." @@ var "sn" @@ var "fname"),
-      _Pat_Extract_args>>: var "patArgs"]),
-    "applied">: asTerm applyVar @@ var "fterm" @@ var "v"] $
-    Eithers.bind
-      (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "applied")
-      ("body" ~>
-        right (record _Case [
-          _Case_pat>>: var "pat",
-          _Case_cond>>: nothing,
-          _Case_body>>: var "body"]))
-
-encodeComplexTermDef :: TTermDefinition (Context -> Graph -> String -> Term -> Type -> Either Error Scala.Stat)
-encodeComplexTermDef = def "encodeComplexTermDef" $
-  doc "Encode a complex term definition with proper parameter types from the type signature" $
-  lambda "cx" $ lambda "g" $ lambda "lname" $ lambda "term" $ lambda "typ" $ lets [
-    "doms">: extractDomains @@ var "typ",
-    "paramNames">: extractParams @@ var "term",
-    -- Only zip as many params as we have domain types (in case of mismatch)
-    "paramCount">: Math.min (Lists.length (var "paramNames")) (Lists.length (var "doms")),
-    -- Use effective codomain: only strip as many arrows as we have actual parameters
-    "cod">: dropDomains @@ var "paramCount" @@ var "typ",
-    "zippedParams">: Lists.zip (Lists.take (var "paramCount") (var "paramNames")) (Lists.take (var "paramCount") (var "doms")),
-    "freeTypeVars">: Lists.filter
-      ("v" ~> Logic.not (Lists.elem (int32 46) (Strings.toList (Core.unName (var "v")))))
-      (Sets.toList (Variables.freeVariablesInType @@ var "typ")),
-    "tparams">: Lists.map (lambda "tv" $ ScalaUtilsSource.stparam @@ var "tv") (var "freeTypeVars"),
-    "letBindings">: extractLetBindings @@ var "term",
-    -- Extend graph with the def's type variables so inner lets can see them
-    "gWithTypeVars">: Graph.graph
-      (Graph.graphBoundTerms $ var "g")
-      (Graph.graphBoundTypes $ var "g")
-      (Graph.graphClassConstraints $ var "g")
-      (Graph.graphLambdaVariables $ var "g")
-      (Graph.graphMetadata $ var "g")
-      (Graph.graphPrimitives $ var "g")
-      (Graph.graphSchemaTypes $ var "g")
-      (Sets.union (Sets.fromList (var "freeTypeVars")) (Graph.graphTypeVariables $ var "g"))] $
-    -- Create typed parameters by zipping param names with domain types
-    Eithers.bind (Eithers.mapList (asTerm encodeTypedParam @@ var "cx" @@ var "gWithTypeVars") (var "zippedParams"))
-      ("sparams" ~>
-        -- Encode the body (with all lambdas/lets stripped)
-        Eithers.bind (asTerm encodeTerm @@ var "cx" @@ var "gWithTypeVars" @@ (extractBody @@ var "term"))
-          ("sbody" ~>
-            -- Encode return type
-            Eithers.bind (asTerm encodeType @@ var "cx" @@ var "g" @@ var "cod")
-              ("scod" ~>
-                -- Extend graph with let bindings for type lookups
-                lets [
-                "gForLets">: Logic.ifElse (Lists.null (var "letBindings"))
-                  (var "gWithTypeVars")
-                  (Scoping.extendGraphForLet @@ ("g" ~> "b" ~> Logic.ifElse (Predicates.isComplexBinding @@ var "g" @@ var "b") (just MetaTerms.true) nothing) @@ var "gWithTypeVars"
-                    @@ Core.let_ (var "letBindings") (Core.termVariable (wrap _Name (string "dummy"))))] $
-                -- Encode let bindings, passing current type params as outer scope
-                Eithers.bind (Eithers.mapList (asTerm encodeLetBinding @@ var "cx" @@ var "gForLets" @@ (Sets.fromList (var "freeTypeVars"))) (var "letBindings"))
-                  ("sbindings" ~> lets [
-                    "defBody">: Logic.ifElse (Lists.null (var "sbindings"))
-                      (var "sbody")
-                      (inject _Data _Data_block (record _Data_Block [
-                        _Data_Block_stats>>: Lists.concat2 (var "sbindings") (list [inject _Stat _Stat_term (var "sbody")])]))] $
-                    right (inject _Stat _Stat_defn (inject _Defn _Defn_def (record _Defn_Def [
-                      _Defn_Def_mods>>: emptyList,
-                      _Defn_Def_name>>: record _Data_Name [_Data_Name_value>>: wrap _PredefString (var "lname")],
-                      _Defn_Def_tparams>>: var "tparams",
-                      _Defn_Def_paramss>>: Lists.map ("p" ~> list [var "p"]) (var "sparams"),
-                      _Defn_Def_decltpe>>: just (var "scod"),
-                      _Defn_Def_body>>: var "defBody"])))))))
-
-encodeFunction :: TTermDefinition (Context -> Graph -> M.Map Name Term -> Term -> Maybe Term -> Either Error Scala.Data)
-encodeFunction = def "encodeFunction" $
-  doc "Encode a Hydra function-valued term (lambda, project, cases, or unwrap) as a Scala expression" $
-  lambda "cx" $ lambda "g" $ lambda "meta" $ lambda "funTerm" $ lambda "arg" $
-    (cases _Term (Strip.deannotateAndDetypeTerm @@ var "funTerm") (Just $ left (Error.errorOther $ Error.otherError (string "unsupported function"))) [
-      _Term_lambda>>: ("lam" ~> lets [
-        "param">: project _Lambda _Lambda_parameter @@ var "lam",
-        "v">: ScalaUtilsSource.scalaEscapeName @@ (Core.unName (var "param")),
-        "body">: project _Lambda _Lambda_body @@ var "lam",
-        "rawMdom">: Core.lambdaDomain $ var "lam",
-        -- Discard lambda domain if it contains unresolved type variables.
-        -- These come from: (1) forall-residual single-char vars like 'a', 'b', 'x',
-        -- or (2) inference-generated fresh variables like 't0', 't1'.
-        -- Check: any free unqualified type variable NOT in graphTypeVariables is suspect.
-        "mdom">: Maybes.bind (var "rawMdom")
-          ("dom" ~> lets [
-            "freeVars">: Variables.freeVariablesInType @@ var "dom",
-            -- Filter to unqualified vars (no dots in name)
-            "unqualifiedFreeVars">: Sets.fromList (Lists.filter
-              ("n" ~> Logic.not (Lists.elem (int32 46) (Strings.toList (Core.unName (var "n")))))
-              (Sets.toList (var "freeVars"))),
-            -- Check if any unqualified free vars are not in the graph's type variables
-            "unresolvedVars">: Sets.difference (var "unqualifiedFreeVars") (Graph.graphTypeVariables $ var "g")] $
-            Logic.ifElse (Sets.null (var "unresolvedVars"))
-              (just (var "dom"))
-              nothing)] $
-        -- Encode lambda body and wrap in lambda with typed parameter
-        Eithers.bind
-          (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "body")
-          ("sbody" ~>
-            Eithers.bind
-              (Maybes.maybe
-                (asTerm findSdom @@ var "cx" @@ var "g" @@ var "meta")
-                ("dom" ~> Eithers.bind (asTerm encodeType @@ var "cx" @@ var "g" @@ var "dom")
-                  ("sdom" ~> right (just (var "sdom"))))
-                (var "mdom"))
-              ("sdom" ~>
-                right (ScalaUtilsSource.slambda @@ var "v" @@ var "sbody" @@ var "sdom")))),
-      _Term_unwrap>>: ("name" ~>
-        -- Wrap elimination is identity in Scala (newtypes are erased)
-        Maybes.maybe
-          (Eithers.bind (asTerm findSdom @@ var "cx" @@ var "g" @@ var "meta")
-            ("sdom" ~> right (ScalaUtilsSource.slambda @@ string "x" @@ (ScalaUtilsSource.sname @@ string "x") @@ var "sdom")))
-          ("a" ~> asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "a")
-          (var "arg")),
-      _Term_project>>: ("proj" ~> lets [
-        "fname">: ScalaUtilsSource.scalaEscapeName @@ (Core.unName (project _Projection _Projection_field @@ var "proj")),
-        "typeName">: project _Projection _Projection_typeName @@ var "proj",
-        "pv">: string "x"] $
-        Maybes.maybe
-          -- Unapplied projection: generate lambda x => x.fieldName
-          -- Try findSdom first (full type with type params), fall back to Projection.typeName
-          (Eithers.bind
-            (Eithers.either_
-              -- findSdom failed: fall back to Projection.typeName
-              (constant $ Eithers.bind
-                (asTerm encodeType @@ var "cx" @@ var "g" @@ (Core.typeVariable (var "typeName")))
-                ("st" ~> right (just (var "st"))))
-              -- findSdom succeeded: check if result is Nothing, fall back to typeName
-              ("msdom" ~> Maybes.maybe
-                -- findSdom returned Nothing: fall back to Projection.typeName
-                (Eithers.bind
-                  (asTerm encodeType @@ var "cx" @@ var "g" @@ (Core.typeVariable (var "typeName")))
-                  ("st" ~> right (just (var "st"))))
-                -- findSdom returned Just: use it
-                ("sdom" ~> right (just (var "sdom")))
-                (var "msdom"))
-              (asTerm findSdom @@ var "cx" @@ var "g" @@ var "meta"))
-            ("msdom" ~>
-              right (ScalaUtilsSource.slambda @@ var "pv" @@
-                (inject _Data _Data_ref (inject _Data_Ref _Data_Ref_select (
-                  record _Data_Select [
-                    _Data_Select_qual>>: ScalaUtilsSource.sname @@ var "pv",
-                    _Data_Select_name>>: record _Data_Name [
-                      _Data_Name_value>>: wrap _PredefString (var "fname")]])))
-                @@ var "msdom")))
-
-          -- Applied projection: encode in the application handler (shouldn't reach here)
-          ("a" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "a")
-              ("sa" ~>
-                right (inject _Data _Data_ref (inject _Data_Ref _Data_Ref_select (
-                  record _Data_Select [
-                    _Data_Select_qual>>: var "sa",
-                    _Data_Select_name>>: record _Data_Name [
-                      _Data_Name_value>>: wrap _PredefString (var "fname")]])))))
-          (var "arg")),
-      _Term_cases>>: ("cs" ~> lets [
-        "v">: string "v",
-        "tname">: project _CaseStatement _CaseStatement_typeName @@ var "cs",
-        "dom">: Core.typeVariable (var "tname"),
-        "sn">: ScalaUtilsSource.nameOfType @@ var "g" @@ var "dom",
-        "cases">: project _CaseStatement _CaseStatement_cases @@ var "cs",
-        "dflt">: project _CaseStatement _CaseStatement_default @@ var "cs",
-        -- Try to get field types from the graph; fall back to empty map if unavailable
-        "ftypes">: Eithers.either_
-          (constant Maps.empty)
-          identity
-          (Resolution.fieldTypes @@ var "cx" @@ var "g" @@ var "dom")] $
-            Eithers.bind
-              (Eithers.mapList ("f" ~> asTerm encodeCase @@ var "cx" @@ var "g" @@ var "ftypes" @@ var "sn" @@ var "f") (var "cases"))
-              ("fieldCases" ~>
-                -- Add default case if present
-                Eithers.bind
-                  (Maybes.maybe
-                    (right (var "fieldCases"))
-                    ("dfltTerm" ~>
-                      Eithers.bind
-                        (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "dfltTerm")
-                        ("sdflt" ~>
-                          right (Lists.concat2 (var "fieldCases") (list [
-                            record _Case [
-                              _Case_pat>>: inject _Pat _Pat_wildcard unit,
-                              _Case_cond>>: nothing,
-                              _Case_body>>: var "sdflt"]]))))
-                    (var "dflt"))
-                  ("scases" ~>
-                Maybes.maybe
-                  (Eithers.bind
-                    (asTerm findSdom @@ var "cx" @@ var "g" @@ var "meta")
-                    ("sdom" ~>
-                      right (ScalaUtilsSource.slambda @@ var "v" @@ (inject _Data _Data_match (record _Data_Match [
-                        _Data_Match_expr>>: ScalaUtilsSource.sname @@ var "v",
-                        _Data_Match_cases>>: var "scases"])) @@ var "sdom")))
-                  ("a" ~>
-                    Eithers.bind
-                      (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "a")
-                      ("sa" ~>
-                        right (inject _Data _Data_match (record _Data_Match [
-                          _Data_Match_expr>>: var "sa",
-                          _Data_Match_cases>>: var "scases"]))))
-                  (var "arg"))))])
-
--- | Helper to construct a lazy val statement (for top-level definitions to avoid forward reference errors)
-mkLazyVal :: TTerm String -> TTerm (Maybe Scala.Type) -> TTerm Scala.Data -> TTerm Scala.Stat
-mkLazyVal vname mdecltpe rhs =
-  inject _Stat _Stat_defn (inject _Defn _Defn_val (record _Defn_Val [
-    _Defn_Val_mods>>: list [inject Scala._Mod Scala._Mod_lazy unit],
-    _Defn_Val_pats>>: list [inject _Pat _Pat_var (record _Pat_Var [
-      _Pat_Var_name>>: record _Data_Name [_Data_Name_value>>: wrap _PredefString vname]])],
-    _Defn_Val_decltpe>>: mdecltpe,
-    _Defn_Val_rhs>>: rhs]))
-
-encodeLetBinding :: TTermDefinition (Context -> Graph -> S.Set Name -> Binding -> Either Error Scala.Stat)
-encodeLetBinding = def "encodeLetBinding" $
-  doc "Encode a let binding as a val or def declaration. outerTypeVars are type params from the enclosing scope." $
-  lambda "cx" $ lambda "g" $ lambda "outerTypeVars" $ lambda "b" $ lets [
-    "bname">: ScalaUtilsSource.scalaEscapeName @@ (Core.unName (Core.bindingName $ var "b")),
-    "bterm">: Core.bindingTerm $ var "b",
-    -- Effective type scheme: binding's own type, or fall back to graph's bound types
-    "mts">: optCases (Core.bindingTypeScheme $ var "b")
-      (Maps.lookup (Core.bindingName $ var "b") (Graph.graphBoundTypes $ var "g"))
-      ("ts" ~> just (var "ts")),
-    -- Check if the binding has a function type
-    "isFn">: Maybes.maybe false
-      ("ts" ~> cases _Type (Strip.deannotateType @@ (Core.typeSchemeBody $ var "ts"))
-        (Just false)
-        [_Type_function>>: constant true,
-         _Type_forall>>: ("fa" ~> cases _Type (Strip.deannotateType @@ Core.forallTypeBody (var "fa"))
-           (Just false) [_Type_function>>: constant true])])
-      (var "mts")] $
-    -- Route to encodeLocalDef when we have a type scheme AND either it's a function OR it has local type vars.
-    -- This mirrors the Java coder which always uses typed declarations and hoists polymorphic bindings to methods.
-    Maybes.maybe
-      -- No type scheme at all: simple val
-      (Eithers.bind (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "bterm")
-        ("srhs" ~> right (mkLazyVal (var "bname") nothing (var "srhs"))))
-      ("ts" ~> lets [
-        "newVars">: Lists.filter ("v" ~> Logic.not (Sets.member (var "v") (var "outerTypeVars"))) (Core.typeSchemeVariables $ var "ts"),
-        -- Use def when: function type, or has locally-quantified type vars (like Java's static <T0> method)
-        "useDef">: Logic.or (var "isFn") (Logic.not (Lists.null (var "newVars")))] $
-        Logic.ifElse (var "useDef")
-          -- Generate local def with type params and/or typed params
-          (asTerm encodeLocalDef @@ var "cx" @@ var "g" @@ var "outerTypeVars" @@ var "bname" @@ var "bterm" @@ (Core.typeSchemeBody $ var "ts"))
-          -- Monomorphic non-function: val with type annotation
-          (Eithers.bind (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "bterm")
-            ("srhs" ~> Eithers.bind (asTerm encodeType @@ var "cx" @@ var "g" @@ (Core.typeSchemeBody $ var "ts"))
-              ("styp" ~> right (mkLazyVal (var "bname") (just (var "styp")) (var "srhs"))))))
-      (var "mts")
-
-encodeLiteral :: TTermDefinition (Context -> Graph -> Literal -> Either Error Scala.Lit)
-encodeLiteral = def "encodeLiteral" $
-  doc "Encode a literal value as a Scala literal" $
-  lambda "cx" $ lambda "g" $ lambda "av" $
-    (cases _Literal (var "av") (Just $ left (Error.errorOther $ Error.otherError (string "unexpected literal"))) [
-      _Literal_binary>>: ("b" ~> right (inject _Lit (Name "bytes") (Literals.binaryToBytes (var "b")))),
-      _Literal_boolean>>: ("b" ~> right (inject _Lit _Lit_boolean (var "b"))),
-      _Literal_decimal>>: ("d" ~> right (inject _Lit _Lit_string (Literals.showDecimal (var "d")))),
-      _Literal_float>>: ("fv" ~> cases _FloatValue (var "fv") (Just $ left (Error.errorOther $ Error.otherError (string "unexpected float value"))) [
-        _FloatValue_bigfloat>>: ("bf" ~> right (inject _Lit _Lit_double (Literals.bigfloatToFloat64 (var "bf")))),
-        _FloatValue_float32>>: ("f" ~> right (inject _Lit _Lit_float (var "f"))),
-        _FloatValue_float64>>: ("f" ~> right (inject _Lit _Lit_double (var "f")))]),
-      _Literal_integer>>: ("iv" ~> cases _IntegerValue (var "iv") (Just $ left (Error.errorOther $ Error.otherError (string "unexpected integer value"))) [
-        _IntegerValue_bigint>>: ("i" ~> right (inject _Lit _Lit_long (Literals.bigintToInt64 (var "i")))),
-        _IntegerValue_int8>>: ("i" ~> right (inject _Lit _Lit_byte (var "i"))),
-        _IntegerValue_int16>>: ("i" ~> right (inject _Lit _Lit_short (var "i"))),
-        _IntegerValue_int32>>: ("i" ~> right (inject _Lit _Lit_int (var "i"))),
-        _IntegerValue_int64>>: ("i" ~> right (inject _Lit _Lit_long (var "i"))),
-        _IntegerValue_uint8>>: ("i" ~> right (inject _Lit _Lit_byte (Literals.bigintToInt8 (Literals.uint8ToBigint (var "i"))))),
-        _IntegerValue_uint16>>: ("i" ~> right (inject _Lit _Lit_int (Literals.bigintToInt32 (Literals.uint16ToBigint (var "i"))))),
-        _IntegerValue_uint32>>: ("i" ~> right (inject _Lit _Lit_long (Literals.bigintToInt64 (Literals.uint32ToBigint (var "i"))))),
-        _IntegerValue_uint64>>: ("i" ~> right (inject _Lit _Lit_long (Literals.bigintToInt64 (Literals.uint64ToBigint (var "i")))))]),
-      _Literal_string>>: ("s" ~> right (inject _Lit _Lit_string (var "s")))])
-
-encodeLocalDef :: TTermDefinition (Context -> Graph -> S.Set Name -> String -> Term -> Type -> Either Error Scala.Stat)
-encodeLocalDef = def "encodeLocalDef" $
-  doc "Encode a local def. outerTypeVars are type params already in scope (don't redeclare them)." $
-  lambda "cx" $ lambda "g" $ lambda "outerTypeVars" $ lambda "lname" $ lambda "term" $ lambda "typ" $ lets [
-    -- Only declare type params that are NOT in the outer scope
-    "freeTypeVars">: Lists.filter
-      ("v" ~> Logic.and
-        (Logic.not (Lists.elem (int32 46) (Strings.toList (Core.unName (var "v")))))
-        (Logic.not (Sets.member (var "v") (var "outerTypeVars"))))
-      (Sets.toList (Variables.freeVariablesInType @@ var "typ")),
-    "doms">: extractDomains @@ var "typ",
-    "paramNames">: extractParams @@ var "term",
-    "paramCount">: Math.min (Lists.length (var "paramNames")) (Lists.length (var "doms")),
-    -- Use effective codomain: only strip as many arrows as we have actual parameters
-    "cod">: dropDomains @@ var "paramCount" @@ var "typ",
-    "zippedParams">: Lists.zip (Lists.take (var "paramCount") (var "paramNames")) (Lists.take (var "paramCount") (var "doms")),
-    "letBindings">: extractLetBindings @@ var "term",
-    "tparams">: Lists.map (lambda "tv" $ ScalaUtilsSource.stparam @@ var "tv") (var "freeTypeVars"),
-    -- All type vars in scope: outer + this def's own
-    "allTypeVars">: Sets.union (var "outerTypeVars") (Sets.fromList (var "freeTypeVars")),
-    -- Extend graph with accumulated type variables
-    "gWithTypeVars">: Graph.graph
-      (Graph.graphBoundTerms $ var "g")
-      (Graph.graphBoundTypes $ var "g")
-      (Graph.graphClassConstraints $ var "g")
-      (Graph.graphLambdaVariables $ var "g")
-      (Graph.graphMetadata $ var "g")
-      (Graph.graphPrimitives $ var "g")
-      (Graph.graphSchemaTypes $ var "g")
-      (Sets.union (var "allTypeVars") (Graph.graphTypeVariables $ var "g"))] $
-    Eithers.bind (Eithers.mapList (asTerm encodeTypedParam @@ var "cx" @@ var "gWithTypeVars") (var "zippedParams"))
-      ("sparams" ~>
-        Eithers.bind (asTerm encodeTerm @@ var "cx" @@ var "gWithTypeVars" @@ (extractBody @@ var "term"))
-          ("sbody" ~>
-            Eithers.bind (asTerm encodeType @@ var "cx" @@ var "gWithTypeVars" @@ var "cod")
-              ("scod" ~>
-                -- Extend graph with let bindings for type lookups
-                lets [
-                "gForLets">: Logic.ifElse (Lists.null (var "letBindings"))
-                  (var "gWithTypeVars")
-                  (Scoping.extendGraphForLet @@ ("g" ~> "b" ~> Logic.ifElse (Predicates.isComplexBinding @@ var "g" @@ var "b") (just MetaTerms.true) nothing) @@ var "gWithTypeVars"
-                    @@ Core.let_ (var "letBindings") (Core.termVariable (wrap _Name (string "dummy"))))] $
-                Eithers.bind (Eithers.mapList (asTerm encodeLetBinding @@ var "cx" @@ var "gForLets" @@ var "allTypeVars") (var "letBindings"))
-                  ("sbindings" ~> lets [
-                    "defBody">: Logic.ifElse (Lists.null (var "sbindings"))
-                      (var "sbody")
-                      (inject _Data _Data_block (record _Data_Block [
-                        _Data_Block_stats>>: Lists.concat2 (var "sbindings") (list [inject _Stat _Stat_term (var "sbody")])]))] $
-                    right (inject _Stat _Stat_defn (inject _Defn _Defn_def (record _Defn_Def [
-                      _Defn_Def_mods>>: emptyList,
-                      _Defn_Def_name>>: record _Data_Name [_Data_Name_value>>: wrap _PredefString (var "lname")],
-                      _Defn_Def_tparams>>: var "tparams",
-                      _Defn_Def_paramss>>: Lists.map ("p" ~> list [var "p"]) (var "sparams"),
-                      _Defn_Def_decltpe>>: just (var "scod"),
-                      _Defn_Def_body>>: var "defBody"])))))))
-
-encodeTerm :: TTermDefinition (Context -> Graph -> Term -> Either Error Scala.Data)
-encodeTerm = def "encodeTerm" $
-  doc "Encode a Hydra term as a Scala expression" $
-  lambda "cx" $ lambda "g" $ lambda "term0" $ lets [
-    "term">: stripWrapEliminations @@ var "term0"] $
-    (cases _Term (Strip.deannotateTerm @@ var "term") (Just $ left (Error.errorOther $ Error.otherError (string "unexpected term"))) [
-      _Term_typeApplication>>: ("ta" ~> lets [
-        -- Collect all nested type applications into a list of type args
-        "collectTypeArgs">: ("t" ~> "acc" ~>
-          cases _Term (Strip.deannotateTerm @@ var "t")
-            (Just $ pair (var "acc") (var "t"))
-            [_Term_typeApplication>>: ("ta2" ~>
-              var "collectTypeArgs"
-                @@ (Core.typeApplicationTermBody $ var "ta2")
-                @@ (Lists.cons (Core.typeApplicationTermType $ var "ta2") (var "acc")))]),
-        "collected">: var "collectTypeArgs"
-          @@ (Core.typeApplicationTermBody $ var "ta")
-          @@ (list [Core.typeApplicationTermType $ var "ta"]),
-        "typeArgs">: Pairs.first (var "collected"),
-        "innerTerm">: Pairs.second (var "collected"),
-        -- Collect type lambda parameters from the inner term to build a substitution map
-        "collectTypeLambdas">: ("t" ~> "acc" ~>
-          cases _Term (Strip.deannotateTerm @@ var "t")
-            (Just $ pair (var "acc") (var "t"))
-            [_Term_typeLambda>>: ("tl" ~>
-              var "collectTypeLambdas"
-                @@ (Core.typeLambdaBody $ var "tl")
-                @@ (Lists.cons (Core.typeLambdaParameter $ var "tl") (var "acc")))]),
-        "tlCollected">: var "collectTypeLambdas" @@ var "innerTerm" @@ (list ([] :: [TTerm Name])),
-        "typeParams">: Pairs.first (var "tlCollected"),
-        "bodyAfterTypeLambdas">: Pairs.second (var "tlCollected"),
-        "substitutedBody">: var "bodyAfterTypeLambdas"] $
-        -- Check if the inner term is a function (primitive or variable) — if so, add type args
-        cases _Term (Strip.deannotateTerm @@ var "substitutedBody")
-          -- Not a function: encode the substituted body
-          (Just $ asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "substitutedBody")
-          [
-          -- For eliminations (record/union projections/unwrap): encode the substituted body
-          _Term_project>>: (constant $ asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "substitutedBody"),
-          _Term_cases>>: (constant $ asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "substitutedBody"),
-          _Term_unwrap>>: (constant $ asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "substitutedBody"),
-          -- TermVariable referencing a primitive: same treatment as Function_primitive
-          _Term_variable>>: ("pname" ~>
-            Maybes.cases (Maps.lookup (var "pname") (Graph.graphPrimitives (var "g")))
-              -- Not a primitive: encode the substituted body
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "substitutedBody")
-              (lambda "_prim" $
-                Eithers.bind
-                  (Eithers.mapList ("targ" ~> asTerm encodeType @@ var "cx" @@ var "g" @@ var "targ") (var "typeArgs"))
-                  ("stypeArgs" ~> lets [
-                      "inScopeTypeVarNames">: Sets.fromList (Lists.map
-                        ("n" ~> Formatting.capitalize @@ (Core.unName (var "n")))
-                        (Sets.toList (Graph.graphTypeVariables $ var "g"))),
-                      "hasForallResidual">: Logic.not (Lists.null (Lists.filter ("st" ~>
-                        cases Scala._Type (var "st") (Just false) [
-                          Scala._Type_var>>: ("tv" ~> lets [
-                            "tvName">: project Scala._Type_Name Scala._Type_Name_value @@ (project Scala._Type_Var Scala._Type_Var_name @@ var "tv")] $
-                            Logic.and
-                              (Logic.not (Lists.elem (int32 46) (Strings.toList (var "tvName"))))
-                              (Logic.not (Sets.member (var "tvName") (var "inScopeTypeVarNames"))))])
-                        (var "stypeArgs")))] $
-                      Logic.ifElse (var "hasForallResidual")
-                        (right (ScalaUtilsSource.sprim @@ var "pname"))
-                        (right (ScalaUtilsSource.sapplyTypes @@ (ScalaUtilsSource.sprim @@ var "pname") @@ var "stypeArgs")))))]),
-      _Term_typeLambda>>: ("tl" ~>
-        asTerm encodeTerm @@ var "cx" @@ (Scoping.extendGraphForTypeLambda @@ var "g" @@ var "tl") @@ (Core.typeLambdaBody $ var "tl")),
-      _Term_application>>: ("app" ~> lets [
-        "fun">: project _Application _Application_function @@ var "app",
-        "arg">: project _Application _Application_argument @@ var "app"] $
-        cases _Term (Strip.deannotateAndDetypeTerm @@ var "fun")
-          (Just $ Eithers.bind
-            (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "fun")
-            ("sfun" ~>
-              Eithers.bind
-                (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "arg")
-                ("sarg" ~>
-                  right (ScalaUtilsSource.sapply @@ var "sfun" @@ list [var "sarg"])))) [
-          -- Beta-reduce: Application(Lambda(v, body), arg) → encode body with arg substituted
-          -- Common case: Lambda(v, Cases(cs)(v)) applied to subject → subject match { cs }
-          _Term_lambda>>: ("lam" ~> lets [
-            "lamBody">: Core.lambdaBody $ var "lam"] $
-            -- Check if the body is a cases elimination applied to the lambda param
-            -- i.e. Application(Cases(cs), Variable(v))
-            cases _Term (Strip.deannotateAndDetypeTerm @@ var "lamBody")
-              -- Default: just encode as function application
-              (Just $ Eithers.bind
-                (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "fun")
-                ("sfun" ~>
-                  Eithers.bind
-                    (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "arg")
-                    ("sarg" ~>
-                      right (ScalaUtilsSource.sapply @@ var "sfun" @@ list [var "sarg"])))) [
-              -- Application(Cases(cs), lamParam) → encode as arg match { cs }
-              _Term_application>>: ("innerApp" ~> lets [
-                "innerFun">: Core.applicationFunction $ var "innerApp"] $
-                cases _Term (Strip.deannotateAndDetypeTerm @@ var "innerFun")
-                  (Just $ Eithers.bind
-                    (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "fun")
-                    ("sfun" ~>
-                      Eithers.bind
-                        (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "arg")
-                        ("sarg" ~>
-                          right (ScalaUtilsSource.sapply @@ var "sfun" @@ list [var "sarg"])))) [
-                  -- Found: Application(Cases(cs), v) — beta-reduce to arg match { cs }
-                  _Term_cases>>: (constant $
-                    -- Pass arg as the applied argument to encodeFunction's cases handler
-                    asTerm encodeFunction @@ var "cx" @@ var "g" @@ (Annotations.termAnnotationInternal @@ var "innerFun") @@ var "innerFun" @@ just (var "arg"))])]),
-          _Term_project>>: ("proj" ~> lets [
-            "fname">: ScalaUtilsSource.scalaEscapeName @@ (Core.unName (project _Projection _Projection_field @@ var "proj"))] $
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "arg")
-              ("sarg" ~>
-                right (inject _Data _Data_ref (inject _Data_Ref _Data_Ref_select (
-                  record _Data_Select [
-                    _Data_Select_qual>>: var "sarg",
-                    _Data_Select_name>>: record _Data_Name [
-                      _Data_Name_value>>: wrap _PredefString (var "fname")]]))))),
-          _Term_cases>>: (constant $
-            asTerm encodeFunction @@ var "cx" @@ var "g" @@ (Annotations.termAnnotationInternal @@ var "fun") @@ var "fun" @@ just (var "arg"))]),
-      _Term_lambda>>: (constant $
-        asTerm encodeFunction @@ var "cx" @@ var "g" @@ (Annotations.termAnnotationInternal @@ var "term") @@ var "term" @@ nothing),
-      _Term_project>>: (constant $
-        asTerm encodeFunction @@ var "cx" @@ var "g" @@ (Annotations.termAnnotationInternal @@ var "term") @@ var "term" @@ nothing),
-      _Term_cases>>: (constant $
-        asTerm encodeFunction @@ var "cx" @@ var "g" @@ (Annotations.termAnnotationInternal @@ var "term") @@ var "term" @@ nothing),
-      _Term_unwrap>>: (constant $
-        asTerm encodeFunction @@ var "cx" @@ var "g" @@ (Annotations.termAnnotationInternal @@ var "term") @@ var "term" @@ nothing),
-      _Term_list>>: ("els" ~>
-        Eithers.bind
-          (Eithers.mapList ("e" ~> asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "e") (var "els"))
-          ("sels" ~>
-            right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "Seq") @@ var "sels"))),
-      _Term_literal>>: ("v" ~>
-        Eithers.bind
-          (asTerm encodeLiteral @@ var "cx" @@ var "g" @@ var "v")
-          ("slit" ~> lets [
-            "litData">: inject _Data _Data_lit (var "slit")] $
-            -- Wrap BigInt and BigDecimal literals in constructor calls
-            cases _Literal (var "v") (Just $ right (var "litData")) [
-              _Literal_decimal>>: (constant $ right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "BigDecimal") @@ list [var "litData"])),
-              _Literal_integer>>: ("iv" ~> cases _IntegerValue (var "iv") (Just $ right (var "litData")) [
-                _IntegerValue_bigint>>: ("bi" ~> right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "BigInt") @@ list [inject _Data _Data_lit (inject _Lit _Lit_string (Literals.showBigint (var "bi")))])),
-                _IntegerValue_uint64>>: ("ui" ~> right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "BigInt") @@ list [inject _Data _Data_lit (inject _Lit _Lit_string (Literals.showBigint (Literals.uint64ToBigint (var "ui"))))]))]),
-              _Literal_float>>: ("fv" ~> cases _FloatValue (var "fv") (Just $ right (var "litData")) [
-                _FloatValue_bigfloat>>: (constant $ right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "BigDecimal") @@ list [var "litData"]))])])),
-      _Term_map>>: ("m" ~>
-        Eithers.bind
-          (Eithers.mapList ("kv" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ (Pairs.first (var "kv")))
-              ("sk" ~>
-                Eithers.bind
-                  (asTerm encodeTerm @@ var "cx" @@ var "g" @@ (Pairs.second (var "kv")))
-                  ("sv" ~>
-                    right (ScalaUtilsSource.sassign @@ var "sk" @@ var "sv"))))
-            (Maps.toList (var "m")))
-          ("spairs" ~>
-            right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "Map") @@ var "spairs"))),
-      _Term_wrap>>: ("wt" ~>
-        asTerm encodeTerm @@ var "cx" @@ var "g" @@ (project _WrappedTerm _WrappedTerm_body @@ var "wt")),
-      _Term_maybe>>: ("m" ~>
-        Maybes.maybe
-          (right (ScalaUtilsSource.sname @@ string "None"))
-          ("t" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "t")
-              ("s" ~> right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "Some") @@ list [var "s"])))
-          (var "m")),
-      _Term_record>>: ("rec" ~> lets [
-        "rname">: project _Record _Record_typeName @@ var "rec",
-        "fields">: project _Record _Record_fields @@ var "rec",
-        "n">: ScalaUtilsSource.scalaTypeName @@ true @@ var "rname"] $
-        Eithers.bind
-          (Eithers.mapList ("f" ~> asTerm encodeTerm @@ var "cx" @@ var "g" @@ (project _Field _Field_term @@ var "f")) (var "fields"))
-          ("args" ~>
-            right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ var "n") @@ var "args"))),
-      _Term_set>>: ("s" ~>
-        Eithers.bind
-          (Eithers.mapList ("e" ~> asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "e") (Sets.toList (var "s")))
-          ("sels" ~>
-            right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "scala.collection.immutable.Set") @@ var "sels"))),
-      _Term_inject>>: ("inj" ~> lets [
-        "sn">: project _Injection _Injection_typeName @@ var "inj",
-        "fn">: project _Field _Field_name @@ (project _Injection _Injection_field @@ var "inj"),
-        "ft">: project _Field _Field_term @@ (project _Injection _Injection_field @@ var "inj"),
-        "lhs">: ScalaUtilsSource.sname @@ (ScalaUtilsSource.qualifyUnionFieldName @@ string "UNION." @@ just (var "sn") @@ var "fn"),
-        -- Get field types from the union type definition if available
-        "unionFtypes">: Eithers.either_
-          (constant Maps.empty)
-          identity
-          (Resolution.fieldTypes @@ var "cx" @@ var "g" @@ Core.typeVariable (var "sn"))] $
-        -- Check if the field is unit-typed using ftypes, then term structure
-        Logic.ifElse (Maybes.maybe
-          -- No ftypes: check term structure
-          (cases _Term (Strip.deannotateAndDetypeTerm @@ var "ft") (Just false) [
-            _Term_unit>>: constant true,
-            _Term_record>>: ("rec" ~> Equality.equal (Lists.length (Core.recordFields (var "rec"))) (int32 0))])
-          -- Has ftypes: check if field type is unit or empty record
-          ("dom" ~> cases _Type (Strip.deannotateType @@ var "dom") (Just false) [
-            _Type_unit>>: constant true,
-            _Type_record>>: ("rt" ~> Equality.equal (Lists.length (var "rt")) (int32 0))])
-          (Maps.lookup (var "fn") (var "unionFtypes")))
-          -- Unit-typed: bare constructor name (simple enum case in Scala 3)
-          (right (var "lhs"))
-          -- Non-unit: apply argument
-          (Eithers.bind
-            (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "ft")
-            ("sarg" ~> right (ScalaUtilsSource.sapply @@ var "lhs" @@ list [var "sarg"])))),
-      _Term_variable>>: ("v" ~> lets [
-        "fullName">: Core.unName (var "v"),
-        "localName">: Names.localNameOf @@ var "v",
-        "parts">: Strings.splitOn (string ".") (var "fullName"),
-        "numParts">: Lists.length (var "parts"),
-        -- Use local name for local variables and hoisted params, qualified for cross-module refs
-        "escaped">: Logic.ifElse (Equality.lte (var "numParts") (int32 1))
-          (ScalaUtilsSource.scalaEscapeName @@ var "fullName")
-          (Logic.ifElse (Equality.equal (var "numParts") (int32 2))
-            -- 2 parts: always qualify (e.g. lists.map)
-            (Strings.cat2 (Maybes.fromMaybe (var "fullName") (Lists.maybeHead (var "parts"))) (Strings.cat2 (string ".") (ScalaUtilsSource.scalaEscapeName @@ var "localName")))
-            -- 3+ parts: fully qualify (module-level functions)
-            (Strings.intercalate (string ".") (Lists.concat2
-              (Lists.take (Math.sub (var "numParts") (int32 1)) (var "parts"))
-              (list [ScalaUtilsSource.scalaEscapeName @@ var "localName"]))))] $
-        right (ScalaUtilsSource.sname @@ var "escaped")),
-      _Term_annotated>>: ("at" ~>
-        asTerm encodeTerm @@ var "cx" @@ var "g" @@ (Core.annotatedTermBody $ var "at")),
-      _Term_either>>: ("e" ~>
-        Eithers.either_
-          ("l" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "l")
-              ("sl" ~> right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "Left") @@ list [var "sl"])))
-          ("r" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "r")
-              ("sr" ~> right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "Right") @@ list [var "sr"])))
-          (var "e")),
-      _Term_pair>>: ("p" ~>
-        Eithers.bind
-          (asTerm encodeTerm @@ var "cx" @@ var "g" @@ (Pairs.first (var "p")))
-          ("sf" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "g" @@ (Pairs.second (var "p")))
-              ("ss" ~>
-                right (ScalaUtilsSource.sapply @@ (ScalaUtilsSource.sname @@ string "Tuple2") @@ list [var "sf", var "ss"])))),
-      _Term_unit>>: (constant $ right (inject _Data _Data_lit (inject _Lit _Lit_unit unit))),
-      _Term_let>>: ("lt" ~> lets [
-        "bindings">: Core.letBindings $ var "lt",
-        "body">: Core.letBody $ var "lt",
-        -- Extend the graph with the let bindings so type lookups work for recursive refs
-        "gLet">: Scoping.extendGraphForLet @@ ("g" ~> "b" ~> Logic.ifElse (Predicates.isComplexBinding @@ var "g" @@ var "b") (just MetaTerms.true) nothing) @@ var "g" @@ var "lt"] $
-        Eithers.bind
-          (Eithers.mapList (asTerm encodeLetBinding @@ var "cx" @@ var "gLet" @@ (Graph.graphTypeVariables $ var "gLet"))
-            (var "bindings"))
-          ("sbindings" ~>
-            Eithers.bind
-              (asTerm encodeTerm @@ var "cx" @@ var "gLet" @@ var "body")
-              ("sbody" ~>
-                right (inject _Data _Data_block (record _Data_Block [
-                  _Data_Block_stats>>: Lists.concat2 (var "sbindings") (list [inject _Stat _Stat_term (var "sbody")])])))))])
-
-encodeTermDefinition :: TTermDefinition (Context -> Graph -> TermDefinition -> Either Error Scala.Stat)
-encodeTermDefinition = def "encodeTermDefinition" $
-  doc "Encode a term definition as a Scala statement" $
-  lambda "cx" $ lambda "g" $ lambda "td" $ lets [
-    "name">: project _TermDefinition _TermDefinition_name @@ var "td",
-    "term">: project _TermDefinition _TermDefinition_term @@ var "td",
-    "lname">: ScalaUtilsSource.scalaEscapeName @@ (Names.localNameOf @@ var "name"),
-    "typ'">: Maybes.maybe
-      (Core.typeVariable (wrap _Name (string "hydra.core.Unit")))
-      (unaryFunction Core.typeSchemeBody)
-      (project _TermDefinition _TermDefinition_typeScheme @@ var "td"),
-    -- Check if the type is a function type (needs def) by looking at the stripped type
-    "isFunctionType">: cases _Type (Strip.deannotateType @@ var "typ'")
-      (Just false)
-      [_Type_function>>: constant true,
-       _Type_forall>>: ("fa" ~> cases _Type (Strip.deannotateType @@ Core.forallTypeBody (var "fa"))
-         (Just false) [_Type_function>>: constant true])]] $
-    Logic.ifElse (var "isFunctionType")
-      -- Complex binding: extract parameter types from the type signature
-      (asTerm encodeComplexTermDef @@ var "cx" @@ var "g" @@ var "lname" @@ var "term" @@ var "typ'")
-      -- Simple binding: encode as val with type annotation
-      (Eithers.bind
-        (asTerm encodeType @@ var "cx" @@ var "g" @@ var "typ'")
-        ("stype" ~>
-          Eithers.bind
-            (asTerm encodeTerm @@ var "cx" @@ var "g" @@ var "term")
-            ("rhs" ~>
-              right (mkLazyVal (var "lname") (just (var "stype")) (var "rhs")))))
-
-encodeType :: TTermDefinition (Context -> Graph -> Type -> Either Error Scala.Type)
-encodeType = def "encodeType" $
-  doc "Encode a Hydra type as a Scala type" $
-  lambda "cx" $ lambda "g" $ lambda "t" $
-    (cases _Type (Strip.deannotateType @@ var "t") (Just $ left (Error.errorOther $ Error.otherError (string "unsupported type"))) [
-      _Type_application>>: ("at" ~> lets [
-        -- Collect all curried type application args into a flat list
-        "collectTypeArgs">: ("t" ~> "acc" ~>
-          cases _Type (Strip.deannotateType @@ var "t")
-            (Just $ pair (var "t") (var "acc"))
-            [_Type_application>>: ("at2" ~> lets [
-              "f2">: project _ApplicationType _ApplicationType_function @@ var "at2",
-              "a2">: project _ApplicationType _ApplicationType_argument @@ var "at2"] $
-              var "collectTypeArgs" @@ var "f2" @@ (Lists.cons (var "a2") (var "acc")))]),
-        "collected">: var "collectTypeArgs" @@ (Core.typeApplication $ var "at") @@ (list ([] :: [TTerm Type])),
-        "baseFun">: Pairs.first (var "collected"),
-        "allArgs">: Pairs.second (var "collected")] $
-        Eithers.bind (asTerm encodeType @@ var "cx" @@ var "g" @@ var "baseFun")
-          ("sfun" ~> Eithers.bind (Eithers.mapList ("a" ~> asTerm encodeType @@ var "cx" @@ var "g" @@ var "a") (var "allArgs"))
-            ("sargs" ~> right (ScalaUtilsSource.stapply @@ var "sfun" @@ var "sargs")))),
-      _Type_unit>>: (constant $ right (stref (string "Unit"))),
-      _Type_either>>: ("et" ~> lets [
-        "lt">: project _EitherType _EitherType_left @@ var "et",
-        "rt">: project _EitherType _EitherType_right @@ var "et"] $
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "lt")
-          ("slt" ~>
-            Eithers.bind
-              (asTerm encodeType @@ var "cx" @@ var "g" @@ var "rt")
-              ("srt" ~>
-                right (ScalaUtilsSource.stapply2 @@ stref (string "Either") @@ var "slt" @@ var "srt")))),
-      _Type_function>>: ("ft" ~> lets [
-        "dom">: project _FunctionType _FunctionType_domain @@ var "ft",
-        "cod">: project _FunctionType _FunctionType_codomain @@ var "ft"] $
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "dom")
-          ("sdom" ~>
-            Eithers.bind
-              (asTerm encodeType @@ var "cx" @@ var "g" @@ var "cod")
-              ("scod" ~>
-                right (inject Scala._Type _Type_functionType (inject _Type_FunctionType _Type_FunctionType_function (
-                  record _Type_Function [
-                    _Type_Function_params>>: list [var "sdom"],
-                    _Type_Function_res>>: var "scod"])))))),
-      _Type_list>>: ("lt" ~>
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "lt")
-          ("slt" ~>
-            right (ScalaUtilsSource.stapply1 @@ stref (string "Seq") @@ var "slt"))),
-      _Type_literal>>: ("lt" ~> cases _LiteralType (var "lt") (Just $ left (Error.errorOther $ Error.otherError (string "unsupported literal type"))) [
-        _LiteralType_binary>>: (constant $ right (ScalaUtilsSource.stapply @@ stref (string "Array") @@ list [stref (string "Byte")])),
-        _LiteralType_boolean>>: (constant $ right (stref (string "Boolean"))),
-        _LiteralType_decimal>>: (constant $ right (stref (string "BigDecimal"))),
-        _LiteralType_float>>: ("ft" ~> cases _FloatType (var "ft") (Just $ left (Error.errorOther $ Error.otherError (string "unsupported float type"))) [
-          _FloatType_bigfloat>>: (constant $ right (stref (string "BigDecimal"))),
-          _FloatType_float32>>: (constant $ right (stref (string "Float"))),
-          _FloatType_float64>>: (constant $ right (stref (string "Double")))]),
-        _LiteralType_integer>>: ("it" ~> cases _IntegerType (var "it") (Just $ left (Error.errorOther $ Error.otherError (string "unsupported integer type"))) [
-          _IntegerType_bigint>>: (constant $ right (stref (string "BigInt"))),
-          _IntegerType_int8>>: (constant $ right (stref (string "Byte"))),
-          _IntegerType_int16>>: (constant $ right (stref (string "Short"))),
-          _IntegerType_int32>>: (constant $ right (stref (string "Int"))),
-          _IntegerType_int64>>: (constant $ right (stref (string "Long"))),
-          _IntegerType_uint8>>: (constant $ right (stref (string "Byte"))),
-          _IntegerType_uint16>>: (constant $ right (stref (string "Int"))),
-          _IntegerType_uint32>>: (constant $ right (stref (string "Long"))),
-          _IntegerType_uint64>>: (constant $ right (stref (string "BigInt")))]),
-        _LiteralType_string>>: (constant $ right (stref (string "scala.Predef.String")))]),
-      _Type_map>>: ("mt" ~> lets [
-        "kt">: project _MapType _MapType_keys @@ var "mt",
-        "vt">: project _MapType _MapType_values @@ var "mt"] $
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "kt")
-          ("skt" ~>
-            Eithers.bind
-              (asTerm encodeType @@ var "cx" @@ var "g" @@ var "vt")
-              ("svt" ~>
-                right (ScalaUtilsSource.stapply2 @@ stref (string "Map") @@ var "skt" @@ var "svt")))),
-      _Type_maybe>>: ("ot" ~>
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "ot")
-          ("sot" ~>
-            right (ScalaUtilsSource.stapply1 @@ stref (string "Option") @@ var "sot"))),
-      _Type_pair>>: ("pt" ~> lets [
-        "ft">: project _PairType _PairType_first @@ var "pt",
-        "st">: project _PairType _PairType_second @@ var "pt"] $
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "ft")
-          ("sft" ~>
-            Eithers.bind
-              (asTerm encodeType @@ var "cx" @@ var "g" @@ var "st")
-              ("sst" ~>
-                right (ScalaUtilsSource.stapply2 @@ stref (string "Tuple2") @@ var "sft" @@ var "sst")))),
-      _Type_record>>: (constant $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous record type")) (var "cx")),
-      _Type_set>>: ("st" ~>
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "st")
-          ("sst" ~>
-            right (ScalaUtilsSource.stapply1 @@ stref (string "scala.collection.immutable.Set") @@ var "sst"))),
-      _Type_union>>: (constant $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous union type")) (var "cx")),
-      _Type_wrap>>: (constant $
-        Ctx.failInContext (Error.errorOther $ Error.otherError (string "unexpected anonymous wrap type")) (var "cx")),
-      _Type_forall>>: ("ft" ~> lets [
-        "v">: project _ForallType _ForallType_parameter @@ var "ft",
-        "body">: project _ForallType _ForallType_body @@ var "ft"] $
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "body")
-          ("sbody" ~>
-            right (inject Scala._Type _Type_lambda (record _Type_Lambda [
-              _Type_Lambda_tparams>>: list [ScalaUtilsSource.stparam @@ var "v"],
-              _Type_Lambda_tpe>>: var "sbody"])))),
-      _Type_variable>>: ("v" ~> lets [
-        "rawName">: Core.unName (var "v"),
-        -- Only capitalize short type variable names (no dots), not qualified type references
-        "typeName">: Logic.ifElse (Lists.elem (int32 46) (Strings.toList (var "rawName")))
-          (var "rawName")
-          (Formatting.capitalize @@ var "rawName")] $
-        right (inject Scala._Type _Type_var (record _Type_Var [
-          _Type_Var_name>>: record _Type_Name [_Type_Name_value>>: var "typeName"]])))])
-  where
-    stref s = inject Scala._Type _Type_ref (inject _Type_Ref _Type_Ref_name (record _Type_Name [_Type_Name_value>>: s]))
-
-encodeTypeDefinition :: TTermDefinition (Context -> Graph -> TypeDefinition -> Either Error Scala.Stat)
-encodeTypeDefinition = def "encodeTypeDefinition" $
-  doc "Encode a type definition as a Scala statement" $
-  lambda "cx" $ lambda "g" $ lambda "td" $ lets [
-    "name">: project _TypeDefinition _TypeDefinition_name @@ var "td",
-    "typ">: Core.typeSchemeBody $ project _TypeDefinition _TypeDefinition_typeScheme @@ var "td",
-    "lname">: Names.localNameOf @@ var "name",
-    "tname">: record _Type_Name [_Type_Name_value>>: var "lname"],
-    "dname">: record _Data_Name [_Data_Name_value>>: wrap _PredefString (var "lname")],
-    "freeVars">: Lists.filter ("v" ~> Logic.not (Lists.elem (int32 46) (Strings.toList (Core.unName (var "v"))))) (Sets.toList (Variables.freeVariablesInType @@ var "typ")),
-    "tparams">: Lists.map ("__v" ~> stparam (var "__v")) (var "freeVars")] $
-    (cases _Type (Strip.deannotateType @@ var "typ") (Just $ defaultTypeCase (var "lname") (var "tparams") (var "cx") (var "g") (var "typ")) [
-      _Type_forall>>: ("ft" ~> lets [
-        "forallBody">: project _ForallType _ForallType_body @@ var "ft",
-        "forallParam">: project _ForallType _ForallType_parameter @@ var "ft",
-        -- Collect all forall-bound type params by recursively stripping foralls
-        "collectForallParams">: ("t" ~> "acc" ~>
-          cases _Type (Strip.deannotateType @@ var "t")
-            (Just $ pair (var "acc") (var "t"))
-            [_Type_forall>>: ("ft2" ~>
-              var "collectForallParams"
-                @@ (Core.forallTypeBody $ var "ft2")
-                @@ (Lists.cons (Core.forallTypeParameter $ var "ft2") (var "acc")))]),
-        "collected">: var "collectForallParams" @@ var "forallBody" @@ (list [var "forallParam"]),
-        "allForallParams">: Lists.reverse (Pairs.first (var "collected")),
-        "innerBody">: Pairs.second (var "collected"),
-        "allTparams">: Lists.map ("__v" ~> stparam (var "__v")) (var "allForallParams")] $
-        -- Unwrap all foralls and check inner body
-        cases _Type (Strip.deannotateType @@ var "innerBody")
-          (Just $ defaultTypeCase (var "lname") (var "allTparams") (var "cx") (var "g") (var "innerBody"))
-          [ _Type_record>>: ("rt2" ~> recordTypeCase (var "tname") (var "allTparams") (var "cx") (var "g") (var "rt2"))
-          , _Type_union>>: ("rt2" ~> unionTypeCase (var "tname") (var "lname") (var "allTparams") (var "cx") (var "g") (var "rt2"))
-          , _Type_wrap>>: ("wt2" ~>
-              Eithers.bind
-                (asTerm encodeType @@ var "cx" @@ var "g" @@ var "wt2")
-                ("styp" ~>
-                  right (inject _Stat _Stat_defn (inject _Defn _Defn_type (
-                    record _Defn_Type [
-                      _Defn_Type_mods>>: emptyList,
-                      _Defn_Type_name>>: var "tname",
-                      _Defn_Type_tparams>>: var "allTparams",
-                      _Defn_Type_body>>: var "styp"])))))]),
-      _Type_record>>: ("rt" ~> recordTypeCase (var "tname") (var "tparams") (var "cx") (var "g") (var "rt")),
-      _Type_union>>: ("rt" ~> unionTypeCase (var "tname") (var "lname") (var "tparams") (var "cx") (var "g") (var "rt")),
-      _Type_wrap>>: ("wt" ~>
-        Eithers.bind
-          (asTerm encodeType @@ var "cx" @@ var "g" @@ var "wt")
-          ("styp" ~>
-            right (inject _Stat _Stat_defn (inject _Defn _Defn_type (
-              record _Defn_Type [
-                _Defn_Type_mods>>: emptyList,
-                _Defn_Type_name>>: var "tname",
-                _Defn_Type_tparams>>: var "tparams",
-                _Defn_Type_body>>: var "styp"])))))])
-  where
-    defaultTypeCase :: TTerm String -> TTerm [Scala.Type_Param] -> TTerm Context -> TTerm Graph -> TTerm Type -> TTerm (Either Error Scala.Stat)
-    defaultTypeCase lname tparams cx g typ =
-      "mkAlias" <~ ("styp" ~>
-        right (inject _Stat _Stat_defn (inject _Defn _Defn_type (
-          record _Defn_Type [
-            _Defn_Type_mods>>: emptyList,
-            _Defn_Type_name>>: record _Type_Name [_Type_Name_value>>: lname],
-            _Defn_Type_tparams>>: tparams,
-            _Defn_Type_body>>: var "styp"])))) $
-      -- Try encodeType; if it fails (e.g. for anonymous wrap/record/union), produce a type alias to Any
-      Eithers.either_
-        (constant $ var "mkAlias" @@ (ScalaUtilsSource.stref @@ string "Any"))
-        (var "mkAlias")
-        (asTerm encodeType @@ cx @@ g @@ typ)
-
-    recordTypeCase :: TTerm Scala.Type_Name -> TTerm [Scala.Type_Param] -> TTerm Context -> TTerm Graph -> TTerm [FieldType] -> TTerm (Either Error Scala.Stat)
-    recordTypeCase tname tparams cx g rt =
-      Eithers.bind
-        (Eithers.mapList ("f" ~> asTerm fieldToParam @@ cx @@ g @@ var "f") rt)
-        ("params" ~>
-          right (inject _Stat _Stat_defn (inject _Defn _Defn_class (
-            record _Defn_Class [
-              _Defn_Class_mods>>: list [inject _Mod _Mod_case unit],
-              _Defn_Class_name>>: tname,
-              _Defn_Class_tparams>>: tparams,
-              _Defn_Class_ctor>>: record _Ctor_Primary [
-                _Ctor_Primary_mods>>: emptyList,
-                _Ctor_Primary_name>>: inject Scala._Name _Name_value (string ""),
-                _Ctor_Primary_paramss>>: list [var "params"]],
-              _Defn_Class_template>>: emptyTemplate]))))
-
-    unionTypeCase :: TTerm Scala.Type_Name -> TTerm String -> TTerm [Scala.Type_Param] -> TTerm Context -> TTerm Graph -> TTerm [FieldType] -> TTerm (Either Error Scala.Stat)
-    unionTypeCase tname lname tparams cx g rt =
-      Eithers.bind
-        (Eithers.mapList ("f" ~> asTerm fieldToEnumCase @@ cx @@ g @@ lname @@ tparams @@ var "f") rt)
-        ("cases" ~>
-          right (inject _Stat _Stat_defn (inject _Defn _Defn_enum (
-            record _Defn_Enum [
-              _Defn_Enum_mods>>: emptyList,
-              _Defn_Enum_name>>: tname,
-              _Defn_Enum_tparams>>: tparams,
-              _Defn_Enum_ctor>>: record _Ctor_Primary [
-                _Ctor_Primary_mods>>: emptyList,
-                _Ctor_Primary_name>>: inject Scala._Name _Name_value (string ""),
-                _Ctor_Primary_paramss>>: emptyList],
-              _Defn_Enum_template>>: record _Template [
-                _Template_early>>: emptyList,
-                _Template_inits>>: emptyList,
-                _Template_self>>: wrap _Self unit,
-                _Template_stats>>: var "cases"]]))))
-
-    emptyTemplate = record _Template [
-      _Template_early>>: emptyList,
-      _Template_inits>>: emptyList,
-      _Template_self>>: wrap _Self unit,
-      _Template_stats>>: emptyList]
-
-    stparam v = lets [
-      "vn">: Formatting.capitalize @@ (Core.unName v)] $
-      record _Type_Param [
-        _Type_Param_mods>>: emptyList,
-        _Type_Param_name>>: inject Scala._Name _Name_value (var "vn"),
-        _Type_Param_tparams>>: emptyList,
-        _Type_Param_tbounds>>: emptyList,
-        _Type_Param_vbounds>>: emptyList,
-        _Type_Param_cbounds>>: emptyList]
-
-encodeTypedParam :: TTermDefinition (Context -> Graph -> (Name, Type) -> Either Error Scala.Data_Param)
-encodeTypedParam = def "encodeTypedParam" $
-  doc "Encode a parameter with its type annotation" $
-  lambda "cx" $ lambda "g" $ lambda "pair" $ lets [
-    "pname">: ScalaUtilsSource.scalaEscapeName @@ (Names.localNameOf @@ (Pairs.first (var "pair"))),
-    "pdom">: Pairs.second (var "pair")] $
-    Eithers.bind (asTerm encodeType @@ var "cx" @@ var "g" @@ var "pdom")
-      ("sdom" ~> right (record _Data_Param [
-        _Data_Param_mods>>: emptyList,
-        _Data_Param_name>>: inject Scala._Name _Name_value (var "pname"),
-        _Data_Param_decltpe>>: just (var "sdom"),
-        _Data_Param_default>>: nothing]))
-
-encodeUntypeApplicationTerm :: TTermDefinition (Context -> Graph -> Term -> Either Error Scala.Data)
-encodeUntypeApplicationTerm = def "encodeUntypeApplicationTerm" $
-  doc "Encode an untyped application term by first inferring types" $
-  lambda "cx" $ lambda "g" $ lambda "term" $
-    Eithers.bind
-      (Inference.inferInGraphContext @@ var "cx" @@ var "g" @@ var "term")
-      ("result" ~>
-        asTerm encodeTerm @@ var "cx" @@ var "g" @@ Typing.inferenceResultTerm (var "result"))
-
--- | Extract the body from a term by peeling off lambdas, type lambdas, lets, etc.
-extractBody :: TTermDefinition (Term -> Term)
-extractBody = def "extractBody" $
-  doc "Extract the innermost body from a term" $
-  lambda "t" $
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "t")
-      (Just $ var "t") [
-      _Term_lambda>>: ("lam" ~> extractBody @@ (Core.lambdaBody $ var "lam")),
-      _Term_typeLambda>>: ("tl" ~> extractBody @@ (Core.typeLambdaBody $ var "tl")),
-      _Term_typeApplication>>: ("ta" ~> extractBody @@ (Core.typeApplicationTermBody $ var "ta")),
-      _Term_let>>: ("lt" ~> extractBody @@ (Core.letBody $ var "lt"))]
-
--- | Extract the final codomain from a function type
-extractCodomain :: TTermDefinition (Type -> Type)
-extractCodomain = def "extractCodomain" $
-  doc "Extract the final return type from a function type" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ var "t") [
-      _Type_function>>: ("ft" ~> extractCodomain @@ (Core.functionTypeCodomain $ var "ft")),
-      _Type_forall>>: ("fa" ~> extractCodomain @@ (Core.forallTypeBody $ var "fa"))]
-
--- | Extract parameter types from a function type by peeling off function arrows
-extractDomains :: TTermDefinition (Type -> [Type])
-extractDomains = def "extractDomains" $
-  doc "Extract domain types from a function type" $
-  lambda "t" $
-    cases _Type (Strip.deannotateType @@ var "t")
-      (Just $ list ([] :: [TTerm Type])) [
-      _Type_function>>: ("ft" ~>
-        Lists.cons
-          (Core.functionTypeDomain $ var "ft")
-          (extractDomains @@ (Core.functionTypeCodomain $ var "ft"))),
-      _Type_forall>>: ("fa" ~> extractDomains @@ (Core.forallTypeBody $ var "fa"))]
-
--- | Extract let bindings from a term by peeling off lambdas, type lambdas, etc.
-extractLetBindings :: TTermDefinition (Term -> [Binding])
-extractLetBindings = def "extractLetBindings" $
-  doc "Extract let bindings from a term" $
-  lambda "t" $
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "t")
-      (Just $ list ([] :: [TTerm Binding])) [
-      _Term_lambda>>: ("lam" ~> extractLetBindings @@ (Core.lambdaBody $ var "lam")),
-      _Term_typeLambda>>: ("tl" ~> extractLetBindings @@ (Core.typeLambdaBody $ var "tl")),
-      _Term_typeApplication>>: ("ta" ~> extractLetBindings @@ (Core.typeApplicationTermBody $ var "ta")),
-      _Term_let>>: ("lt" ~>
-        Lists.concat2
-          (Core.letBindings $ var "lt")
-          (extractLetBindings @@ (Core.letBody $ var "lt")))]
-
--- | Extract parameter names from a term by peeling off lambdas
-extractParams :: TTermDefinition (Term -> [Name])
-extractParams = def "extractParams" $
-  doc "Extract parameter names from a term" $
-  lambda "t" $
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "t")
-      (Just $ list ([] :: [TTerm Name])) [
-      _Term_lambda>>: ("lam" ~>
-        Lists.cons
-          (Core.lambdaParameter $ var "lam")
-          (extractParams @@ (Core.lambdaBody $ var "lam"))),
-      _Term_typeLambda>>: ("tl" ~> extractParams @@ (Core.typeLambdaBody $ var "tl")),
-      _Term_typeApplication>>: ("ta" ~> extractParams @@ (Core.typeApplicationTermBody $ var "ta")),
-      _Term_let>>: ("lt" ~> extractParams @@ (Core.letBody $ var "lt"))]
-
-fieldToEnumCase :: TTermDefinition (Context -> Graph -> String -> [Scala.Type_Param] -> FieldType -> Either Error Scala.Stat)
-fieldToEnumCase = def "fieldToEnumCase" $
-  doc "Convert a field type to a Scala enum case" $
-  lambda "cx" $ lambda "g" $ lambda "parentName" $ lambda "tparams" $ lambda "ft" $ lets [
-    "fname">: ScalaUtilsSource.scalaEscapeName @@ (Core.unName (project _FieldType _FieldType_name @@ var "ft")),
-    "ftyp">: project _FieldType _FieldType_type @@ var "ft",
-    "caseName">: record _Data_Name [_Data_Name_value>>: wrap _PredefString (var "fname")],
-    "isUnit">: cases _Type (Strip.deannotateType @@ var "ftyp") (Just false) [
-      _Type_unit>>: (constant true),
-      _Type_record>>: ("rt" ~> Equality.equal (Lists.length (var "rt")) (int32 0))],
-    "parentType">: Logic.ifElse (Lists.null (var "tparams"))
-      (stref (var "parentName"))
-      (inject Scala._Type _Type_apply (record _Type_Apply [
-        _Type_Apply_tpe>>: stref (var "parentName"),
-        _Type_Apply_args>>: Lists.map (asTerm typeParamToTypeVar) (var "tparams")]))] $
-    Eithers.bind
-      (asTerm encodeType @@ var "cx" @@ var "g" @@ var "ftyp")
-      ("sftyp" ~>
-        right (inject _Stat _Stat_defn (inject _Defn _Defn_enumCase (
-          record _Defn_EnumCase [
-            _Defn_EnumCase_mods>>: emptyList,
-            _Defn_EnumCase_name>>: var "caseName",
-            _Defn_EnumCase_tparams>>: emptyList,
-            _Defn_EnumCase_ctor>>: record _Ctor_Primary [
-              _Ctor_Primary_mods>>: emptyList,
-              _Ctor_Primary_name>>: inject Scala._Name _Name_value (string ""),
-              _Ctor_Primary_paramss>>: list [
-                Logic.ifElse (var "isUnit")
-                  (emptyList)
-                  (list [record _Data_Param [
-                    _Data_Param_mods>>: emptyList,
-                    _Data_Param_name>>: inject Scala._Name _Name_value (string "value"),
-                    _Data_Param_decltpe>>: just (var "sftyp"),
-                    _Data_Param_default>>: nothing]])]],
-            _Defn_EnumCase_inits>>: list [record _Init [
-              _Init_tpe>>: var "parentType",
-              _Init_name>>: inject Scala._Name _Name_value (string ""),
-              _Init_argss>>: emptyList]]]))))
-  where
-    stref s = inject Scala._Type _Type_ref (inject _Type_Ref _Type_Ref_name (record _Type_Name [_Type_Name_value>>: s]))
-
-fieldToParam :: TTermDefinition (Context -> Graph -> FieldType -> Either Error Scala.Data_Param)
-fieldToParam = def "fieldToParam" $
-  doc "Convert a field type to a Scala parameter" $
-  lambda "cx" $ lambda "g" $ lambda "ft" $ lets [
-    "fname">: ScalaUtilsSource.scalaEscapeName @@ (Core.unName (project _FieldType _FieldType_name @@ var "ft")),
-    "ftyp">: project _FieldType _FieldType_type @@ var "ft"] $
-    Eithers.bind
-      (asTerm encodeType @@ var "cx" @@ var "g" @@ var "ftyp")
-      ("sftyp" ~>
-        right (record _Data_Param [
-          _Data_Param_mods>>: emptyList,
-          _Data_Param_name>>: inject Scala._Name _Name_value (var "fname"),
-          _Data_Param_decltpe>>: just (var "sftyp"),
-          _Data_Param_default>>: nothing]))
-
--- | Type alias for Result
--- type Result a = Either Error a
-
--- | Get a type annotation, converting DecodingError to InContext Error.
-getTypeE :: TTerm Context -> TTerm Graph -> TTerm (M.Map Name Term) -> TTerm (Either Error (Maybe Type))
-getTypeE cx g ann = Eithers.bimap
-  ("__de" ~> Error.errorOther (Error.otherError ((unwrap _DecodingError) @@ var "__de")))
-  ("__a" ~> var "__a")
-  (Annotations.getType @@ g @@ ann)
-
-findDomain :: TTermDefinition (Context -> Graph -> M.Map Name Term -> Either Error Type)
-findDomain = def "findDomain" $
-  doc "Find the domain type from annotations" $
-  lambda "cx" $ lambda "g" $ lambda "meta" $
-    Eithers.bind
-      (getTypeE (var "cx") (var "g") (var "meta"))
-      ("r" ~> Maybes.maybe
-        (left (Error.errorOther $ Error.otherError (string "expected a typed term")))
-        ("t" ~> cases _Type (Strip.deannotateType @@ var "t") (Just $ left (Error.errorOther $ Error.otherError (string "expected a function type"))) [
-          _Type_function>>: ("ft" ~> right (project _FunctionType _FunctionType_domain @@ var "ft"))])
-        (var "r"))
-
-findImports :: TTermDefinition (Context -> Graph -> Module -> Either Error [Scala.Stat])
-findImports = def "findImports" $
-  doc "Find import statements for the module" $
-  lambda "cx" $ lambda "g" $ lambda "mod" $
-    Eithers.bind
-      (Analysis.moduleDependencyNamespaces @@ var "cx" @@ var "g" @@ false @@ false @@ true @@ false @@ var "mod")
-      ("elImps" ~>
-        Eithers.bind
-          (Analysis.moduleDependencyNamespaces @@ var "cx" @@ var "g" @@ false @@ true @@ false @@ false @@ var "mod")
-          ("primImps" ~>
-            right (Lists.concat (list [
-              Lists.map (asTerm toElImport) (Sets.toList (var "elImps")),
-              Lists.map (asTerm toPrimImport) (Sets.toList (var "primImps"))]))))
-
-findSdom :: TTermDefinition (Context -> Graph -> M.Map Name Term -> Either Error (Maybe Scala.Type))
-findSdom = def "findSdom" $
-  doc "Find the Scala domain type for a function from annotations" $
-  lambda "cx" $ lambda "g" $ lambda "meta" $
-    Eithers.bind
-      (getTypeE (var "cx") (var "g") (var "meta"))
-      ("mtyp" ~> Maybes.maybe
-        -- No type annotation: return Nothing (shouldn't happen in well-typed terms)
-        (right nothing)
-        ("t" ~> cases _Type (Strip.deannotateType @@ var "t")
-          (Just $
-            -- Not a function type but has type annotation: encode the full type
-            Eithers.bind
-              (asTerm encodeType @@ var "cx" @@ var "g" @@ var "t")
-              ("st" ~> right (just (var "st")))) [
-          _Type_function>>: ("ft" ~> lets [
-            "dom">: project _FunctionType _FunctionType_domain @@ var "ft"] $
-            Eithers.bind
-              (asTerm encodeType @@ var "cx" @@ var "g" @@ var "dom")
-              ("sdom" ~> right (just (var "sdom")))),
-          _Type_forall>>: ("fa" ~> cases _Type (Strip.deannotateType @@ Core.forallTypeBody (var "fa"))
-            (Just $ right nothing) [
-            _Type_function>>: ("ft2" ~> lets [
-              "dom2">: project _FunctionType _FunctionType_domain @@ var "ft2"] $
-              Eithers.bind
-                (asTerm encodeType @@ var "cx" @@ var "g" @@ var "dom2")
-                ("sdom2" ~> right (just (var "sdom2"))))])])
-        (var "mtyp"))
-
-moduleToScala :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either Error (M.Map FilePath String))
-moduleToScala = def "moduleToScala" $
-  doc "Convert a Hydra module to Scala source code" $
-  lambda "mod" $ lambda "defs" $ lambda "cx" $ lambda "g" $
-    Eithers.bind
-      (asTerm constructModule @@ var "cx" @@ var "g" @@ var "mod" @@ var "defs")
-      ("pkg" ~> lets [
-        "s">: SerializationSource.printExpr @@ (SerializationSource.parenthesize @@ (TTerm (TermVariable (Name "hydra.scala.serde.writePkg")) @@ var "pkg"))] $
-        right (Maps.singleton
-          (Names.namespaceToFilePath @@ Util.caseConventionCamel @@ wrap _FileExtension (string "scala") @@ Packaging.moduleNamespace (var "mod"))
-          (var "s")))
-
--- | Strip wrap eliminations from a term (newtypes are erased in Scala)
-stripWrapEliminations :: TTermDefinition (Term -> Term)
-stripWrapEliminations = def "stripWrapEliminations" $
-  doc "Strip wrap eliminations from terms (newtypes are erased in Scala)" $
-  lambda "t" $
-    cases _Term (Strip.deannotateAndDetypeTerm @@ var "t")
-      (Just $ var "t") [
-      _Term_application>>: ("app" ~> lets [
-        "appFun">: Core.applicationFunction $ var "app",
-        "appArg">: Core.applicationArgument $ var "app"] $
-        cases _Term (Strip.deannotateAndDetypeTerm @@ var "appFun")
-          (Just $ var "t") [
-          -- unwrap(value) → value
-          _Term_unwrap>>: (constant $ stripWrapEliminations @@ var "appArg"),
-          -- unwrap(x)(arg) → x(arg) — strip the wrap but keep the intermediate application
-          _Term_application>>: ("innerApp" ~> lets [
-            "innerFun">: Core.applicationFunction $ var "innerApp",
-            "innerArg">: Core.applicationArgument $ var "innerApp"] $
-            cases _Term (Strip.deannotateAndDetypeTerm @@ var "innerFun")
-              (Just $ var "t") [
-              _Term_unwrap>>: (constant $
-                -- Reconstruct as innerArg(appArg) with wrap stripped
-                stripWrapEliminations @@ Core.termApplication (record _Application [
-                  _Application_function>>: var "innerArg",
-                  _Application_argument>>: var "appArg"]))])])]
-
-toElImport :: TTermDefinition (Namespace -> Scala.Stat)
-toElImport = def "toElImport" $
-  doc "Create an element import statement" $
-  lambda "ns" $
-    inject _Stat _Stat_importExport (
-      inject _ImportExportStat _ImportExportStat_import (
-        record _Import [
-          _Import_importers>>: list [
-            record _Importer [
-              _Importer_ref>>: inject _Data_Ref _Data_Ref_name (
-                record _Data_Name [
-                  _Data_Name_value>>: wrap _PredefString (
-                    Strings.intercalate (string ".") (Strings.splitOn (string ".") (Packaging.unNamespace (var "ns"))))]),
-              _Importer_importees>>: list [inject _Importee _Importee_wildcard unit]]]]))
-
-toPrimImport :: TTermDefinition (Namespace -> Scala.Stat)
-toPrimImport = def "toPrimImport" $
-  doc "Create a primitive import statement" $
-  lambda "ns" $
-    inject _Stat _Stat_importExport (
-      inject _ImportExportStat _ImportExportStat_import (
-        record _Import [
-          _Import_importers>>: list [
-            record _Importer [
-              _Importer_ref>>: inject _Data_Ref _Data_Ref_name (
-                record _Data_Name [
-                  _Data_Name_value>>: wrap _PredefString (
-                    Strings.intercalate (string ".") (Strings.splitOn (string ".") (Packaging.unNamespace (var "ns"))))]),
-              _Importer_importees>>: emptyList]]]))
-
-typeParamToTypeVar :: TTermDefinition (Scala.Type_Param -> Scala.Type)
-typeParamToTypeVar = def "typeParamToTypeVar" $
-  doc "Convert a type parameter to a type variable reference" $
-  lambda "tp" $ lets [
-    "n">: project _Type_Param _Type_Param_name @@ var "tp",
-    "s">: cases Scala._Name (var "n") (Just $ string "") [
-      Scala._Name_value>>: ("v" ~> var "v")]] $
-    inject Scala._Type _Type_var (record _Type_Var [
-      _Type_Var_name>>: record _Type_Name [_Type_Name_value>>: var "s"]])
-
--- | Helper to construct a Scala val statement
-mkVal :: TTerm String -> TTerm (Maybe Scala.Type) -> TTerm Scala.Data -> TTerm Scala.Stat
-mkVal vname mdecltpe rhs =
-  inject _Stat _Stat_defn (inject _Defn _Defn_val (record _Defn_Val [
-    _Defn_Val_mods>>: emptyList,
-    _Defn_Val_pats>>: list [inject _Pat _Pat_var (record _Pat_Var [
-      _Pat_Var_name>>: record _Data_Name [_Data_Name_value>>: wrap _PredefString vname]])],
-    _Defn_Val_decltpe>>: mdecltpe,
-    _Defn_Val_rhs>>: rhs]))
-
-
--- Name references used by Coder
-
--- Scala Meta names (re-exported from Utils for convenience)
-_Data = Scala._Data
-_Data_Apply = Scala._Data_Apply
-_Data_Assign = Scala._Data_Assign
-_Data_FunctionData = Scala._Data_FunctionData
-_Data_FunctionData_function = Scala._Data_FunctionData_function
-_Data_Function = Scala._Data_Function
-_Data_Function_params = Name "params"
-_Data_Function_body = Name "body"
-_Data_Match = Scala._Data_Match
-_Data_Match_expr = Name "expr"
-_Data_Match_cases = Name "cases"
-_Data_Name = Scala._Data_Name
-_Data_Name_value = Name "value"
-_Data_Param = Scala._Data_Param
-_Data_Param_mods = Name "mods"
-_Data_Param_name = Name "name"
-_Data_Param_decltpe = Name "decltpe"
-_Data_Param_default = Name "default"
-_Data_Ref = Scala._Data_Ref
-_Data_Ref_name = Name "name"
-_Data_Ref_select = Name "select"
-_Data_Select = Scala._Data_Select
-_Data_Select_qual = Name "qual"
-_Data_Select_name = Name "name"
-
-_Data_Block = Scala._Data_Block
-_Data_Block_stats = Scala._Data_Block_stats
-
-_Data_apply = Scala._Data_apply
-_Data_assign = Scala._Data_assign
-_Data_block = Scala._Data_block
-_Data_functionData = Scala._Data_functionData
-_Data_ref = Scala._Data_ref
-_Data_lit = Scala._Data_lit
-_Data_match = Scala._Data_match
-
-_Name_value = Scala._Name_value
-
-_Type_Apply = Scala._Type_Apply
-_Type_Apply_tpe = Name "tpe"
-_Type_Apply_args = Name "args"
-_Type_FunctionType = Scala._Type_FunctionType
-_Type_FunctionType_function = Name "function"
-_Type_Function = Scala._Type_Function
-_Type_Function_params = Name "params"
-_Type_Function_res = Name "res"
-_Type_Lambda = Scala._Type_Lambda
-_Type_Lambda_tparams = Name "tparams"
-_Type_Lambda_tpe = Name "tpe"
-_Type_Name = Scala._Type_Name
-_Type_Name_value = Name "value"
-_Type_Param = Scala._Type_Param
-_Type_Param_mods = Name "mods"
-_Type_Param_name = Name "name"
-_Type_Param_tparams = Name "tparams"
-_Type_Param_tbounds = Name "tbounds"
-_Type_Param_vbounds = Name "vbounds"
-_Type_Param_cbounds = Name "cbounds"
-_Type_Ref = Scala._Type_Ref
-_Type_Ref_name = Name "name"
-_Type_Var = Scala._Type_Var
-_Type_Var_name = Name "name"
-
-_Type_apply = Scala._Type_apply
-_Type_functionType = Scala._Type_functionType
-_Type_lambda = Scala._Type_lambda
-_Type_ref = Scala._Type_ref
-_Type_var = Scala._Type_var
-
-_Pat = Scala._Pat
-_Pat_Var = Scala._Pat_Var
-_Pat_Var_name = Name "name"
-_Pat_Extract = Scala._Pat_Extract
-_Pat_Extract_fun = Name "fun"
-_Pat_Extract_args = Name "args"
-_Pat_var = Scala._Pat_var
-_Pat_wildcard = Scala._Pat_wildcard
-_Pat_extract = Name "extract"
-
-_PredefString = Scala._PredefString
-
-_Lit = Scala._Lit
-_Lit_boolean = Scala._Lit_boolean
-_Lit_float = Scala._Lit_float
-_Lit_double = Scala._Lit_double
-_Lit_short = Scala._Lit_short
-_Lit_int = Scala._Lit_int
-_Lit_long = Scala._Lit_long
-_Lit_byte = Scala._Lit_byte
-_Lit_string = Scala._Lit_string
-_Lit_unit = Scala._Lit_unit
-
-_Stat = Scala._Stat
-_Stat_term = Scala._Stat_term
-_Stat_defn = Scala._Stat_defn
-_Stat_importExport = Scala._Stat_importExport
-
-_Defn = Scala._Defn
-_Defn_Class = Scala._Defn_Class
-_Defn_Class_mods = Name "mods"
-_Defn_Class_name = Name "name"
-_Defn_Class_tparams = Name "tparams"
-_Defn_Class_ctor = Name "ctor"
-_Defn_Class_template = Name "template"
-_Defn_Def = Scala._Defn_Def
-_Defn_Def_mods = Name "mods"
-_Defn_Def_name = Name "name"
-_Defn_Def_tparams = Name "tparams"
-_Defn_Def_paramss = Name "paramss"
-_Defn_Def_decltpe = Name "decltpe"
-_Defn_Def_body = Name "body"
-_Defn_Enum = Scala._Defn_Enum
-_Defn_Enum_mods = Name "mods"
-_Defn_Enum_name = Name "name"
-_Defn_Enum_tparams = Name "tparams"
-_Defn_Enum_ctor = Name "ctor"
-_Defn_Enum_template = Name "template"
-_Defn_EnumCase = Scala._Defn_EnumCase
-_Defn_EnumCase_mods = Name "mods"
-_Defn_EnumCase_name = Name "name"
-_Defn_EnumCase_tparams = Name "tparams"
-_Defn_EnumCase_ctor = Name "ctor"
-_Defn_EnumCase_inits = Name "inits"
-_Defn_Type = Scala._Defn_Type
-_Defn_Type_mods = Name "mods"
-_Defn_Type_name = Name "name"
-_Defn_Type_tparams = Name "tparams"
-_Defn_Type_body = Name "body"
-_Defn_Val = Scala._Defn_Val
-_Defn_Val_mods = Name "mods"
-_Defn_Val_pats = Name "pats"
-_Defn_Val_decltpe = Name "decltpe"
-_Defn_Val_rhs = Name "rhs"
-
-_Defn_class = Name "class"
-_Defn_def = Name "def"
-_Defn_enum = Name "enum"
-_Defn_enumCase = Name "enumCase"
-_Defn_type = Name "type"
-_Defn_val = Name "val"
-
-_Ctor_Primary = Scala._Ctor_Primary
-_Ctor_Primary_mods = Name "mods"
-_Ctor_Primary_name = Name "name"
-_Ctor_Primary_paramss = Name "paramss"
-_Template = Scala._Template
-_Template_early = Name "early"
-_Template_inits = Name "inits"
-_Template_self = Name "self"
-_Template_stats = Name "stats"
-_Self = Scala._Self
-_Mod = Scala._Mod
-_Mod_case = Name "case"
-_Pkg = Scala._Pkg
-_Pkg_name = Name "name"
-_Pkg_ref = Name "ref"
-_Pkg_stats = Name "stats"
-_Import = Scala._Import
-_Import_importers = Name "importers"
-_Importer = Scala._Importer
-_Importer_ref = Name "ref"
-_Importer_importees = Name "importees"
-_Importee = Scala._Importee
-_Importee_wildcard = Name "wildcard"
-_ImportExportStat = Scala._ImportExportStat
-_ImportExportStat_import = Name "import"
-_Init = Scala._Init
-_Init_tpe = Name "tpe"
-_Init_name = Name "name"
-_Init_argss = Name "argss"
-_Case = Scala._Case
-_Case_pat = Name "pat"
-_Case_cond = Name "cond"
-_Case_body = Name "body"
-
-
diff --git a/src/main/haskell/Hydra/Sources/Scala/Language.hs b/src/main/haskell/Hydra/Sources/Scala/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Language.hs
+++ /dev/null
@@ -1,203 +0,0 @@
-module Hydra.Sources.Scala.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.scala.language"),
-            moduleDefinitions = [toDefinition scalaLanguage, toDefinition scalaReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for Scala"}
-scalaLanguage :: TTermDefinition Language
-scalaLanguage = define "scalaLanguage" $
-  doc "Language constraints for Scala" $ lets [
-  "eliminationVariants">: Sets.fromList $ list [
-    Variants.eliminationVariantRecord,
-    Variants.eliminationVariantUnion,
-    Variants.eliminationVariantWrap],
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBoolean,
-    Variants.literalVariantDecimal,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeBigfloat,
-    Core.floatTypeFloat32,
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.fromList $ list [
-    Variants.functionVariantElimination,
-    Variants.functionVariantLambda],
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeBigint,
-    Core.integerTypeInt8,
-    Core.integerTypeInt16,
-    Core.integerTypeInt32,
-    Core.integerTypeInt64,
-    Core.integerTypeUint8,
-    Core.integerTypeUint16,
-    Core.integerTypeUint32,
-    Core.integerTypeUint64],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantApplication,
-    Variants.termVariantEither,
-
-    Variants.termVariantCases,
-
-    Variants.termVariantLambda,
-
-    Variants.termVariantProject,
-
-    Variants.termVariantUnwrap,
-
-    Variants.termVariantTypeApplication,
-
-    Variants.termVariantTypeLambda,
-    Variants.termVariantLet,
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantPair,
-    Variants.termVariantRecord,
-    Variants.termVariantSet,
-    Variants.termVariantInject,
-    Variants.termVariantUnit,
-    Variants.termVariantVariable,
-    Variants.termVariantWrap],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantApplication,
-    Variants.typeVariantEither,
-    Variants.typeVariantFunction,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantPair,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion,
-    Variants.typeVariantUnit,
-    Variants.typeVariantForall,
-    Variants.typeVariantVariable,
-    Variants.typeVariantVoid,
-    Variants.typeVariantWrap],
-  "typePredicate">: constant true] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.scala")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
-
-scalaReservedWords :: TTermDefinition (S.Set String)
-scalaReservedWords = define "scalaReservedWords" $
-  doc "A set of reserved words in Scala" $ lets [
-  "keywords">:
-    doc "Scala keywords" $
-    list $ string <$> [
-      "abstract", "case", "catch", "class", "def", "do", "else", "end", "enum", "export", "extends", "false", "final", "finally", "for",
-      "forSome", "given", "if", "implicit", "import", "lazy", "macro", "match", "new", "null", "object", "override", "package", "private",
-      "protected", "return", "sealed", "super", "then", "this", "throw", "trait", "true", "try", "type", "val", "var", "while",
-      "with", "yield"],
-  "classNames">:
-    doc "Classes in the Scala Standard Library 2.13.8" $
-    list $ string <$> [
-      "Any", "AnyVal", "App", "Array", "Boolean", "Byte", "Char", "Console", "DelayedInit", "Double", "DummyExplicit",
-      "Dynamic", "Enumeration", "Equals", "Float", "Function", "Int", "Long", "MatchError", "None",
-      "Nothing", "Null", "Option", "PartialFunction", "Predef", "Product", "Proxy",
-      "SerialVersionUID", "Short", "Singleton", "Some", "Specializable", "StringContext",
-      "Symbol", "Unit", "ValueOf"],
-  "hydraScalaKeywords">:
-    doc "Reserved words which are specific to Hydra" $
-    list $ string <$> []] $
-  Sets.fromList $ Lists.concat $ list [
-    var "keywords",
-    var "classNames",
-    var "hydraScalaKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/Scala/Manifest.hs b/src/main/haskell/Hydra/Sources/Scala/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Manifest.hs
+++ /dev/null
@@ -1,31 +0,0 @@
--- | Package manifest for hydra-scala.
---
--- Owns the Scala coder DSL sources. See feature_290_packaging-plan.md,
--- "Sync system redesign / Package manifests".
---
--- Note: Hydra.Sources.Scala.Prepare is intentionally excluded — it is a helper
--- module used by other Scala sources, not itself a generated module.
-
-module Hydra.Sources.Scala.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Scala.Coder as ScalaCoder
-import qualified Hydra.Sources.Scala.Language as ScalaLanguage
-import qualified Hydra.Sources.Scala.Serde as ScalaSerde
-import qualified Hydra.Sources.Scala.Syntax as ScalaSyntax
-import qualified Hydra.Sources.Scala.Utils as ScalaUtils
-
-mainModules :: [Module]
-mainModules = [
-  ScalaCoder.module_,
-  ScalaLanguage.module_,
-  ScalaSerde.module_,
-  ScalaSyntax.module_,
-  ScalaUtils.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Scala/Prepare.hs b/src/main/haskell/Hydra/Sources/Scala/Prepare.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Prepare.hs
+++ /dev/null
@@ -1,136 +0,0 @@
-module Hydra.Sources.Scala.Prepare where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (prepareLiteralType, prepareFloatType, prepareIntegerType, prepareType)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Set                                  as S
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.scala.prepare"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Strip.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Type preparation functions for Scala code generation"}
-  where
-    definitions = [
-      toDefinition prepareFloatType,
-      toDefinition prepareIntegerType,
-      toDefinition prepareLiteralType,
-      toDefinition prepareType,
-      toDefinition same]
-
-
-prepareFloatType :: TTermDefinition (FloatType -> (FloatType, FloatValue -> FloatValue, S.Set String))
-prepareFloatType = def "prepareFloatType" $
-  doc "Prepare a float type for Scala" $
-  lambda "ft" $
-    (cases _FloatType (var "ft") (Just (same @@ var "ft")) [
-      _FloatType_bigfloat>>: (constant $
-        triple
-          Core.floatTypeFloat64
-          ("v" ~> cases _FloatValue (var "v") (Just (var "v")) [
-            _FloatValue_bigfloat>>: ("d" ~> inject _FloatValue _FloatValue_float64 (Literals.bigfloatToFloat64 (var "d")))])
-          (Sets.fromList $ list [string "replace arbitrary-precision floating-point numbers with 64-bit floating-point numbers (doubles)"]))])
-
-prepareIntegerType :: TTermDefinition (IntegerType -> (IntegerType, IntegerValue -> IntegerValue, S.Set String))
-prepareIntegerType = def "prepareIntegerType" $
-  doc "Prepare an integer type for Scala" $
-  lambda "it" $
-    (cases _IntegerType (var "it") (Just (same @@ var "it")) [
-      _IntegerType_bigint>>: (constant $
-        triple
-          Core.integerTypeInt64
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_bigint>>: ("i" ~> inject _IntegerValue _IntegerValue_int64 (Literals.bigintToInt64 (var "i")))])
-          (Sets.fromList $ list [string "replace arbitrary-precision integers with 64-bit integers"])),
-      _IntegerType_uint8>>: (constant $
-        triple
-          Core.integerTypeInt8
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_uint8>>: ("i" ~> inject _IntegerValue _IntegerValue_int8 (Literals.bigintToInt8 (Literals.uint8ToBigint (var "i"))))])
-          (Sets.fromList $ list [string "replace unsigned 8-bit integers with signed 8-bit integers"])),
-      _IntegerType_uint32>>: (constant $
-        triple
-          Core.integerTypeInt32
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_uint32>>: ("i" ~> inject _IntegerValue _IntegerValue_int32 (Literals.bigintToInt32 (Literals.uint32ToBigint (var "i"))))])
-          (Sets.fromList $ list [string "replace unsigned 32-bit integers with signed 32-bit integers"])),
-      _IntegerType_uint64>>: (constant $
-        triple
-          Core.integerTypeInt64
-          ("v" ~> cases _IntegerValue (var "v") (Just (var "v")) [
-            _IntegerValue_uint64>>: ("i" ~> inject _IntegerValue _IntegerValue_int64 (Literals.bigintToInt64 (Literals.uint64ToBigint (var "i"))))])
-          (Sets.fromList $ list [string "replace unsigned 64-bit integers with signed 64-bit integers"]))])
-
-prepareLiteralType :: TTermDefinition (LiteralType -> (LiteralType, Literal -> Literal, S.Set String))
-prepareLiteralType = def "prepareLiteralType" $
-  doc "Prepare a literal type for Scala, substituting unsupported types" $
-  lambda "at" $
-    (cases _LiteralType (var "at") (Just (same @@ var "at")) [
-      _LiteralType_binary>>: (constant $
-        triple
-          (Core.literalTypeString)
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_binary>>: ("b" ~> inject _Literal _Literal_string (Literals.binaryToString (var "b")))])
-          (Sets.fromList $ list [string "replace binary strings with character strings"])),
-      _LiteralType_float>>: ("ft" ~> lets [
-        "result">: prepareFloatType @@ var "ft",
-        "rtyp">: Pairs.first (var "result"),
-        "rep">: Pairs.first (Pairs.second (var "result")),
-        "msgs">: Pairs.second (Pairs.second (var "result"))] $
-        triple
-          (Core.literalTypeFloat (var "rtyp"))
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_float>>: ("fv" ~> inject _Literal _Literal_float (var "rep" @@ var "fv"))])
-          (var "msgs")),
-      _LiteralType_integer>>: ("it" ~> lets [
-        "result">: prepareIntegerType @@ var "it",
-        "rtyp">: Pairs.first (var "result"),
-        "rep">: Pairs.first (Pairs.second (var "result")),
-        "msgs">: Pairs.second (Pairs.second (var "result"))] $
-        triple
-          (Core.literalTypeInteger (var "rtyp"))
-          ("v" ~> cases _Literal (var "v") (Just (var "v")) [
-            _Literal_integer>>: ("iv" ~> inject _Literal _Literal_integer (var "rep" @@ var "iv"))])
-          (var "msgs"))])
-
-prepareType :: TTermDefinition (Graph -> Type -> (Type, Term -> Term, S.Set String))
-prepareType = def "prepareType" $
-  doc "Prepare a type for Scala code generation, substituting unsupported types" $
-  lambda "cx" $ lambda "typ" $
-    (cases _Type (Strip.deannotateType @@ var "typ") (Just (same @@ var "typ")) [
-      _Type_literal>>: ("at" ~> lets [
-        "result">: prepareLiteralType @@ var "at",
-        "rtyp">: Pairs.first (var "result"),
-        "rep">: Pairs.first (Pairs.second (var "result")),
-        "msgs">: Pairs.second (Pairs.second (var "result"))] $
-        triple
-          (MetaTypes.literal (var "rtyp"))
-          ("v" ~> cases _Term (var "v") (Just (var "v")) [
-            _Term_literal>>: ("av" ~> inject _Term _Term_literal (var "rep" @@ var "av"))])
-          (var "msgs"))])
-
-same :: TTermDefinition (a -> (a, b -> b, S.Set c))
-same = def "same" $
-  doc "Return a type unchanged with identity transform and no messages" $
-  lambda "x" $
-    triple (var "x") ("y" ~> var "y") (Sets.empty)
diff --git a/src/main/haskell/Hydra/Sources/Scala/Serde.hs b/src/main/haskell/Hydra/Sources/Scala/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Serde.hs
+++ /dev/null
@@ -1,556 +0,0 @@
-module Hydra.Sources.Scala.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Scala.Syntax as Scala
-import qualified Hydra.Sources.Java.Serde as JavaSerdeSource
-import qualified Hydra.Sources.Scala.Syntax as ScalaSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.scala.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns, JavaSerdeSource.ns],
-            moduleTypeDependencies = (ScalaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Serialization functions for converting Scala AST to abstract expressions"}
-  where
-    definitions = [
-      toDefinition dotOp,
-      toDefinition functionArrowOp,
-      toDefinition matchOp,
-      toDefinition scalaFloatLiteralText,
-      toDefinition writeCase,
-      toDefinition writeData_FunctionData,
-      toDefinition writeData_Name,
-      toDefinition writeData_Param,
-      toDefinition writeData_Ref,
-      toDefinition writeData_Select,
-      toDefinition writeDefn,
-      toDefinition writeImportExportStat,
-      toDefinition writeImporter,
-      toDefinition writeInit,
-      toDefinition writeLit,
-      toDefinition writeMod,
-      toDefinition writeName,
-      toDefinition writePat,
-      toDefinition writePkg,
-      toDefinition writeStat,
-      toDefinition writeTerm,
-      toDefinition writeType,
-      toDefinition writeType_Name,
-      toDefinition writeType_Param]
-
-
-dotOp :: TTermDefinition Op
-dotOp = define "dotOp" $
-  doc "The dot operator for member access" $
-  Ast.op (Ast.symbol (string ".")) (Ast.padding Ast.wsNone Ast.wsNone) (Ast.precedence (int32 0)) Ast.associativityLeft
-
-functionArrowOp :: TTermDefinition Op
-functionArrowOp = define "functionArrowOp" $
-  doc "The function arrow operator (=>)" $
-  Serialization.op @@ string "=>" @@ Math.negate (int32 1) @@ Ast.associativityRight
-
-matchOp :: TTermDefinition Op
-matchOp = define "matchOp" $
-  doc "The match operator" $
-  Ast.op (Ast.symbol (string "match")) (Ast.padding Ast.wsSpace (Ast.wsBreakAndIndent (string "  "))) (Ast.precedence (int32 0)) Ast.associativityNone
-
-writeCase :: TTermDefinition (Scala.Case -> Expr)
-writeCase = define "writeCase" $
-  doc "Convert a case clause to an expression" $
-  lambda "c" $ lets [
-    "pat">: project Scala._Case Scala._Case_pat @@ var "c",
-    "term">: project Scala._Case Scala._Case_body @@ var "c"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "case",
-      writePat @@ var "pat",
-      Serialization.cst @@ string "=>",
-      writeTerm @@ var "term"]
-
-writeData_FunctionData :: TTermDefinition (Scala.Data_FunctionData -> Expr)
-writeData_FunctionData = define "writeData_FunctionData" $
-  doc "Convert function data to an expression" $
-  lambda "ft" $
-    cases Scala._Data_FunctionData (var "ft") Nothing [
-      Scala._Data_FunctionData_function>>: lambda "f" $ lets [
-        "params">: project Scala._Data_Function Scala._Data_Function_params @@ var "f",
-        "body">: project Scala._Data_Function Scala._Data_Function_body @@ var "f",
-        "bodyExpr">: writeTerm @@ var "body",
-        "bodyLen">: Serialization.expressionLength @@ var "bodyExpr"] $
-        -- For long lambda bodies (>60 chars), put body on indented new line
-        Logic.ifElse (Equality.gt (var "bodyLen") (int32 60))
-          (Serialization.noSep @@ list [
-            Serialization.parenList @@ false @@ (Lists.map writeData_Param (var "params")),
-            Serialization.cst @@ string " =>\n  ",
-            var "bodyExpr"])
-          (Serialization.spaceSep @@ list [
-            Serialization.parenList @@ false @@ (Lists.map writeData_Param (var "params")),
-            Serialization.cst @@ string "=>",
-            var "bodyExpr"])]
-
-writeData_Name :: TTermDefinition (Scala.Data_Name -> Expr)
-writeData_Name = define "writeData_Name" $
-  doc "Convert a data name to an expression" $
-  lambda "dn" $
-    Serialization.cst @@ (unwrap Scala._PredefString @@ (project Scala._Data_Name Scala._Data_Name_value @@ var "dn"))
-
-writeData_Param :: TTermDefinition (Scala.Data_Param -> Expr)
-writeData_Param = define "writeData_Param" $
-  doc "Convert a data parameter to an expression" $
-  lambda "dp" $ lets [
-    "name">: project Scala._Data_Param Scala._Data_Param_name @@ var "dp",
-    "stype">: project Scala._Data_Param Scala._Data_Param_decltpe @@ var "dp"] $
-    Serialization.noSep @@ (Maybes.cat $ list [
-      Maybes.pure (writeName @@ var "name"),
-      Maybes.map
-        (lambda "t" $ Serialization.spaceSep @@ list [Serialization.cst @@ string ":", writeType @@ var "t"])
-        (var "stype")])
-
-writeData_Ref :: TTermDefinition (Scala.Data_Ref -> Expr)
-writeData_Ref = define "writeData_Ref" $
-  doc "Convert a data reference to an expression" $
-  lambda "ref" $
-    cases Scala._Data_Ref (var "ref") Nothing [
-      Scala._Data_Ref_name>>: lambda "name" $ writeData_Name @@ var "name",
-      Scala._Data_Ref_select>>: lambda "sel" $ writeData_Select @@ var "sel"]
-
-writeData_Select :: TTermDefinition (Scala.Data_Select -> Expr)
-writeData_Select = define "writeData_Select" $
-  doc "Convert a data select to an expression" $
-  lambda "sel" $ lets [
-    "arg">: project Scala._Data_Select Scala._Data_Select_qual @@ var "sel",
-    "name">: project Scala._Data_Select Scala._Data_Select_name @@ var "sel"] $
-    Serialization.ifx @@ dotOp @@ (writeTerm @@ var "arg") @@
-      (writeTerm @@ (inject Scala._Data Scala._Data_ref (inject Scala._Data_Ref Scala._Data_Ref_name (var "name"))))
-
-writeDefn :: TTermDefinition (Scala.Defn -> Expr)
-writeDefn = define "writeDefn" $
-  doc "Convert a definition to an expression" $
-  lambda "def" $
-    cases Scala._Defn (var "def") Nothing [
-      Scala._Defn_def>>: lambda "dd" $ lets [
-        "name">: project Scala._Defn_Def Scala._Defn_Def_name @@ var "dd",
-        "tparams">: project Scala._Defn_Def Scala._Defn_Def_tparams @@ var "dd",
-        "paramss">: project Scala._Defn_Def Scala._Defn_Def_paramss @@ var "dd",
-        "scod">: project Scala._Defn_Def Scala._Defn_Def_decltpe @@ var "dd",
-        "body">: project Scala._Defn_Def Scala._Defn_Def_body @@ var "dd",
-        "tparamsExpr">: Logic.ifElse (Lists.null (var "tparams"))
-          nothing
-          (Maybes.pure (Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map writeType_Param (var "tparams")))),
-        "scodExpr">: Maybes.map
-          (lambda "t" $ Serialization.spaceSep @@ list [Serialization.cst @@ string ":", writeType @@ var "t"])
-          (var "scod"),
-        -- Render each parameter list in its own parens (for curried defs)
-        "paramssExprs">: Lists.map
-          ("ps" ~> Serialization.parenList @@ false @@ (Lists.map writeData_Param (var "ps")))
-          (var "paramss"),
-        "nameAndParams">: Serialization.noSep @@ (Maybes.cat $ Lists.concat (list [
-          list [Maybes.pure (writeData_Name @@ var "name")],
-          list [var "tparamsExpr"],
-          Lists.map ("pe" ~> Maybes.pure (var "pe")) (var "paramssExprs"),
-          list [var "scodExpr"]]))] $
-        "bodyExpr" <~ (writeTerm @@ var "body") $
-        "defSig" <~ (Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "def",
-          var "nameAndParams",
-          Serialization.cst @@ string "="]) $
-        "bodyLen" <~ (Serialization.expressionLength @@ var "bodyExpr") $
-        -- For long def bodies, put body on indented new line
-        Logic.ifElse (Equality.gt (var "bodyLen") (int32 80))
-          (Serialization.noSep @@ list [var "defSig", Serialization.cst @@ string "\n  ", var "bodyExpr"])
-          (Serialization.spaceSep @@ list [var "defSig", var "bodyExpr"]),
-
-      Scala._Defn_type>>: lambda "dt" $ lets [
-        "name">: project Scala._Defn_Type Scala._Defn_Type_name @@ var "dt",
-        "tparams">: project Scala._Defn_Type Scala._Defn_Type_tparams @@ var "dt",
-        "body">: project Scala._Defn_Type Scala._Defn_Type_body @@ var "dt"] $
-        Serialization.spaceSep @@ (Maybes.cat $ list [
-          Maybes.pure (Serialization.cst @@ string "type"),
-          Maybes.pure (writeType_Name @@ var "name"),
-          Logic.ifElse (Lists.null (var "tparams"))
-            nothing
-            (Maybes.pure (Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map writeType_Param (var "tparams")))),
-          Maybes.pure (Serialization.cst @@ string "="),
-          Maybes.pure (writeType @@ var "body")]),
-
-      Scala._Defn_val>>: lambda "dv" $ lets [
-        "mods">: project Scala._Defn_Val Scala._Defn_Val_mods @@ var "dv",
-        "pats">: project Scala._Defn_Val Scala._Defn_Val_pats @@ var "dv",
-        "typ">: project Scala._Defn_Val Scala._Defn_Val_decltpe @@ var "dv",
-        "rhs">: project Scala._Defn_Val Scala._Defn_Val_rhs @@ var "dv",
-        "nameStr">: Maybes.fromMaybe (string "") (Maybes.map
-          (lambda "firstPat" $
-            "patName" <~ (cases Scala._Pat (var "firstPat") Nothing [
-              Scala._Pat_var>>: lambda "pv" $ project Scala._Pat_Var Scala._Pat_Var_name @@ var "pv"]) $
-            unwrap Scala._PredefString @@ (project Scala._Data_Name Scala._Data_Name_value @@ var "patName"))
-          (Lists.maybeHead (var "pats"))),
-        "nameAndType">: Maybes.maybe
-          (Serialization.cst @@ var "nameStr")
-          (lambda "t" $ Serialization.spaceSep @@ list [
-            Serialization.cst @@ (Strings.cat2 (var "nameStr") (string ":")),
-            writeType @@ var "t"])
-          (var "typ"),
-        "valKeyword">: Logic.ifElse (Lists.null (var "mods")) (string "val") (string "lazy val")] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ var "valKeyword",
-          var "nameAndType",
-          Serialization.cst @@ string "=",
-          writeTerm @@ var "rhs"],
-
-      Scala._Defn_class>>: lambda "dc" $ lets [
-        "mods">: project Scala._Defn_Class Scala._Defn_Class_mods @@ var "dc",
-        "name">: project Scala._Defn_Class Scala._Defn_Class_name @@ var "dc",
-        "tparams">: project Scala._Defn_Class Scala._Defn_Class_tparams @@ var "dc",
-        "ctor">: project Scala._Defn_Class Scala._Defn_Class_ctor @@ var "dc",
-        "paramss">: project Scala._Ctor_Primary Scala._Ctor_Primary_paramss @@ var "ctor",
-        "tparamsExpr">: Logic.ifElse (Lists.null (var "tparams"))
-          nothing
-          (Maybes.pure (Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map writeType_Param (var "tparams")))),
-        "paramsExpr">: Logic.ifElse (Lists.null (var "paramss"))
-          nothing
-          (Maybes.pure (Serialization.parenList @@ false @@ (Lists.map writeData_Param (Lists.concat (var "paramss"))))),
-        "nameAndParams">: Serialization.noSep @@ (Maybes.cat $ list [
-          Maybes.pure (writeType_Name @@ var "name"),
-          var "tparamsExpr",
-          var "paramsExpr"])] $
-        Serialization.spaceSep @@ (Lists.concat $ list [
-          Lists.map writeMod (var "mods"),
-          list [Serialization.cst @@ string "class", var "nameAndParams"]]),
-
-      Scala._Defn_enum>>: lambda "de" $ lets [
-        "name">: project Scala._Defn_Enum Scala._Defn_Enum_name @@ var "de",
-        "tparams">: project Scala._Defn_Enum Scala._Defn_Enum_tparams @@ var "de",
-        "template">: project Scala._Defn_Enum Scala._Defn_Enum_template @@ var "de",
-        "stats">: project Scala._Template Scala._Template_stats @@ var "template",
-        "enumHeader">: Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "enum",
-          Serialization.noSep @@ (Maybes.cat $ list [
-            Maybes.pure (writeType_Name @@ var "name"),
-            Logic.ifElse (Lists.null (var "tparams"))
-              nothing
-              (Maybes.pure (Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map writeType_Param (var "tparams"))))]),
-          Serialization.cst @@ string ":"],
-        "enumCases">: Lists.map
-          (lambda "s" $ Serialization.spaceSep @@ list [Serialization.cst @@ string "  ", writeStat @@ var "s"])
-          (var "stats")] $
-        Serialization.newlineSep @@ (Lists.concat $ list [list [var "enumHeader"], var "enumCases"]),
-
-      Scala._Defn_enumCase>>: lambda "dec" $ lets [
-        "name">: project Scala._Defn_EnumCase Scala._Defn_EnumCase_name @@ var "dec",
-        "ctor">: project Scala._Defn_EnumCase Scala._Defn_EnumCase_ctor @@ var "dec",
-        "inits">: project Scala._Defn_EnumCase Scala._Defn_EnumCase_inits @@ var "dec",
-        "paramss">: project Scala._Ctor_Primary Scala._Ctor_Primary_paramss @@ var "ctor",
-        "allParams">: Lists.concat (var "paramss"),
-        "params">: Logic.ifElse (Lists.null (var "allParams"))
-          (Serialization.cst @@ string "")
-          (Serialization.parenList @@ false @@ (Lists.map writeData_Param (var "allParams"))),
-        "extendsClause">: Logic.ifElse (Lists.null (var "inits"))
-          (Serialization.cst @@ string "")
-          (Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "extends",
-            Serialization.commaSep @@ Serialization.inlineStyle @@ (Lists.map writeInit (var "inits"))])] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "case",
-          Serialization.noSep @@ list [writeData_Name @@ var "name", var "params"],
-          var "extendsClause"]]
-
-writeImportExportStat :: TTermDefinition (Scala.ImportExportStat -> Expr)
-writeImportExportStat = define "writeImportExportStat" $
-  doc "Convert an import/export statement to an expression" $
-  lambda "ie" $
-    cases Scala._ImportExportStat (var "ie") Nothing [
-      Scala._ImportExportStat_import>>: lambda "imp" $ lets [
-        "importers">: project Scala._Import Scala._Import_importers @@ var "imp"] $
-        Serialization.newlineSep @@ (Lists.map writeImporter (var "importers"))]
-
-writeImporter :: TTermDefinition (Scala.Importer -> Expr)
-writeImporter = define "writeImporter" $
-  doc "Convert an importer to an expression" $
-  lambda "imp" $ lets [
-    "ref">: project Scala._Importer Scala._Importer_ref @@ var "imp",
-    "importees">: project Scala._Importer Scala._Importer_importees @@ var "imp",
-    "refName">: cases Scala._Data_Ref (var "ref") Nothing [
-      Scala._Data_Ref_name>>: lambda "dn" $
-        unwrap Scala._PredefString @@ (project Scala._Data_Name Scala._Data_Name_value @@ var "dn")],
-    "forImportees">: Logic.ifElse (Lists.null (var "importees"))
-      (Serialization.cst @@ string "")
-      (Logic.ifElse (Equality.equal (Lists.length (var "importees")) (int32 1))
-        (Maybes.fromMaybe (Serialization.cst @@ string "") (Maybes.map
-          (lambda "firstImp" $ Serialization.noSep @@ list [
-            Serialization.cst @@ string ".",
-            cases Scala._Importee (var "firstImp") Nothing [
-              Scala._Importee_wildcard>>: constant (Serialization.cst @@ string "*"),
-              Scala._Importee_name>>: lambda "in" $
-                Serialization.cst @@ (cases Scala._Name (project Scala._Importee_Name Scala._Importee_Name_name @@ var "in") Nothing [
-                  Scala._Name_value>>: lambda "s" $ var "s"])]])
-          (Lists.maybeHead (var "importees"))))
-        (Serialization.noSep @@ list [
-          Serialization.cst @@ string ".",
-          Serialization.curlyBracesList @@ nothing @@ Serialization.inlineStyle @@
-            (Lists.map
-              (lambda "it" $ cases Scala._Importee (var "it") Nothing [
-                Scala._Importee_wildcard>>: constant (Serialization.cst @@ string "*"),
-                Scala._Importee_name>>: lambda "in" $
-                  Serialization.cst @@ (cases Scala._Name (project Scala._Importee_Name Scala._Importee_Name_name @@ var "in") Nothing [
-                    Scala._Name_value>>: lambda "s" $ var "s"])])
-              (var "importees"))]))] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "import",
-      Serialization.noSep @@ list [Serialization.cst @@ var "refName", var "forImportees"]]
-
-writeInit :: TTermDefinition (Scala.Init -> Expr)
-writeInit = define "writeInit" $
-  doc "Convert an init to an expression" $
-  lambda "init" $
-    writeType @@ (project Scala._Init Scala._Init_tpe @@ var "init")
-
--- | Convert a showFloat32/showFloat64 result into valid Scala source syntax,
--- mapping NaN and ±Infinity to {Float,Double}.{NaN,PositiveInfinity,NegativeInfinity}.
--- The 'prefix' is "Float" or "Double"; 'suffix' is "f" (Float) or "" (Double).
-scalaFloatLiteralText :: TTermDefinition (String -> String -> String -> String)
-scalaFloatLiteralText = define "scalaFloatLiteralText" $
-  lambda "prefix" $ lambda "suffix" $ lambda "s" $
-    Logic.ifElse (Equality.equal (var "s") (string "NaN"))
-      (Strings.cat2 (var "prefix") (string ".NaN")) $
-    Logic.ifElse (Equality.equal (var "s") (string "Infinity"))
-      (Strings.cat2 (var "prefix") (string ".PositiveInfinity")) $
-    Logic.ifElse (Equality.equal (var "s") (string "-Infinity"))
-      (Strings.cat2 (var "prefix") (string ".NegativeInfinity"))
-      (Strings.cat2 (var "s") (var "suffix"))
-
-writeLit :: TTermDefinition (Scala.Lit -> Expr)
-writeLit = define "writeLit" $
-  doc "Convert a literal to an expression" $
-  lambda "lit" $
-    cases Scala._Lit (var "lit") (Just $ Serialization.cst @@ string "TODO:literal") [
-      Scala._Lit_boolean>>: lambda "b" $ Serialization.cst @@ (Logic.ifElse (var "b") (string "true") (string "false")),
-      Scala._Lit_byte>>: lambda "i" $ Serialization.cst @@ (Strings.cat2 (Literals.showInt8 (var "i")) (string ".toByte")),
-      Scala._Lit_short>>: lambda "i" $ Serialization.cst @@ (Strings.cat2 (Literals.showInt16 (var "i")) (string ".toShort")),
-      Scala._Lit_int>>: lambda "i" $ Serialization.cst @@ (Literals.showInt32 (var "i")),
-      Scala._Lit_long>>: lambda "i" $ Serialization.cst @@ (Strings.cat2 (Literals.showInt64 (var "i")) (string "L")),
-      Scala._Lit_float>>: lambda "f" $
-        Serialization.cst @@ (scalaFloatLiteralText @@ string "Float" @@ string "f" @@ Literals.showFloat32 (var "f")),
-      Scala._Lit_double>>: lambda "f" $
-        Serialization.cst @@ (scalaFloatLiteralText @@ string "Double" @@ string "" @@ Literals.showFloat64 (var "f")),
-      Scala._Lit_unit>>: constant $ Serialization.cst @@ string "()",
-      Scala._Lit_string>>: lambda "s" $ Serialization.cst @@ Strings.cat2 (string "\"") (Strings.cat2 (JavaSerdeSource.escapeJavaString @@ var "s") (string "\"")),
-      Name "bytes">>: lambda "bs" $
-        Serialization.cst @@ Strings.cat2 (string "Array[Byte](")
-          (Strings.cat2
-            (Strings.intercalate (string ", ") (Lists.map (lambda "b" $ Strings.cat2 (Literals.showInt32 (var "b")) (string ".toByte")) (var "bs")))
-            (string ")"))]
-
-writeMod :: TTermDefinition (Scala.Mod -> Expr)
-writeMod = define "writeMod" $
-  doc "Convert a modifier to an expression" $
-  lambda "m" $
-    cases Scala._Mod (var "m") Nothing [
-      Scala._Mod_case>>: constant $ Serialization.cst @@ string "case",
-      Scala._Mod_sealed>>: constant $ Serialization.cst @@ string "sealed",
-      Scala._Mod_abstract>>: constant $ Serialization.cst @@ string "abstract",
-      Scala._Mod_final>>: constant $ Serialization.cst @@ string "final",
-      Scala._Mod_override>>: constant $ Serialization.cst @@ string "override",
-      Scala._Mod_implicit>>: constant $ Serialization.cst @@ string "implicit",
-      Scala._Mod_lazy>>: constant $ Serialization.cst @@ string "lazy",
-      Scala._Mod_private>>: lambda "_" $ Serialization.cst @@ string "private",
-      Scala._Mod_protected>>: lambda "_" $ Serialization.cst @@ string "protected"]
-
-writeName :: TTermDefinition (Scala.Name -> Expr)
-writeName = define "writeName" $
-  doc "Convert a name to an expression" $
-  lambda "name" $
-    cases Scala._Name (var "name") Nothing [
-      Scala._Name_value>>: lambda "s" $ Serialization.cst @@ var "s"]
-
-writePat :: TTermDefinition (Scala.Pat -> Expr)
-writePat = define "writePat" $
-  doc "Convert a pattern to an expression" $
-  lambda "pat" $
-    cases Scala._Pat (var "pat") Nothing [
-      Scala._Pat_extract>>: lambda "pe" $ lets [
-        "fun">: project Scala._Pat_Extract Scala._Pat_Extract_fun @@ var "pe",
-        "args">: project Scala._Pat_Extract Scala._Pat_Extract_args @@ var "pe"] $
-        -- Omit parens for truly parameterless enum cases; include for parameterized
-        Logic.ifElse (Lists.null (var "args"))
-          (writeTerm @@ var "fun")
-          (Serialization.noSep @@ list [
-            writeTerm @@ var "fun",
-            Serialization.parenList @@ false @@ (Lists.map writePat (var "args"))]),
-      Scala._Pat_var>>: lambda "pv" $
-        writeData_Name @@ (project Scala._Pat_Var Scala._Pat_Var_name @@ var "pv"),
-      Scala._Pat_wildcard>>: constant (Serialization.cst @@ string "_")]
-
-writePkg :: TTermDefinition (Scala.Pkg -> Expr)
-writePkg = define "writePkg" $
-  doc "Convert a package to an expression" $
-  lambda "pkg" $ lets [
-    "name">: project Scala._Pkg Scala._Pkg_name @@ var "pkg",
-    "stats">: project Scala._Pkg Scala._Pkg_stats @@ var "pkg",
-    "package">: Serialization.spaceSep @@ list [Serialization.cst @@ string "package", writeData_Name @@ var "name"]] $
-    Serialization.doubleNewlineSep @@ (Lists.concat $ list [
-      list [var "package"],
-      Lists.map writeStat (var "stats")])
-
-writeStat :: TTermDefinition (Scala.Stat -> Expr)
-writeStat = define "writeStat" $
-  doc "Convert a statement to an expression" $
-  lambda "stat" $
-    cases Scala._Stat (var "stat") Nothing [
-      Scala._Stat_term>>: lambda "t" $ writeTerm @@ var "t",
-      Scala._Stat_defn>>: lambda "def" $ writeDefn @@ var "def",
-      Scala._Stat_importExport>>: lambda "ie" $ writeImportExportStat @@ var "ie"]
-
-writeTerm :: TTermDefinition (Scala.Data -> Expr)
-writeTerm = define "writeTerm" $
-  doc "Convert a term to an expression" $
-  lambda "term" $
-    cases Scala._Data (var "term") Nothing [
-      Scala._Data_lit>>: lambda "lit" $ writeLit @@ var "lit",
-      Scala._Data_ref>>: lambda "ref" $ writeData_Ref @@ var "ref",
-      Scala._Data_apply>>: lambda "app" $ lets [
-        "fun">: project Scala._Data_Apply Scala._Data_Apply_fun @@ var "app",
-        "args">: project Scala._Data_Apply Scala._Data_Apply_args @@ var "app"] $
-        Serialization.noSep @@ list [
-          writeTerm @@ var "fun",
-          Serialization.parenList @@ false @@ (Lists.map writeTerm (var "args"))],
-      Scala._Data_assign>>: lambda "a" $ lets [
-        "lhs">: project Scala._Data_Assign Scala._Data_Assign_lhs @@ var "a",
-        "rhs">: project Scala._Data_Assign Scala._Data_Assign_rhs @@ var "a"] $
-        Serialization.spaceSep @@ list [writeTerm @@ var "lhs", Serialization.cst @@ string "->", writeTerm @@ var "rhs"],
-      Scala._Data_tuple>>: lambda "tup" $
-        Serialization.parenList @@ false @@ (Lists.map writeTerm (project Scala._Data_Tuple Scala._Data_Tuple_args @@ var "tup")),
-      Scala._Data_match>>: lambda "m" $ lets [
-        "expr">: project Scala._Data_Match Scala._Data_Match_expr @@ var "m",
-        "mCases">: project Scala._Data_Match Scala._Data_Match_cases @@ var "m"] $
-        Serialization.ifx @@ matchOp @@ (writeTerm @@ var "expr") @@
-          (Serialization.newlineSep @@ (Lists.map writeCase (var "mCases"))),
-      Scala._Data_functionData>>: lambda "ft" $ writeData_FunctionData @@ var "ft",
-      Scala._Data_block>>: lambda "blk" $ lets [
-        "stats">: project Scala._Data_Block Scala._Data_Block_stats @@ var "blk"] $
-        Serialization.curlyBlock @@ Serialization.fullBlockStyle @@ (Serialization.newlineSep @@ (Lists.map writeStat (var "stats")))]
-
-writeType :: TTermDefinition (Scala.Type -> Expr)
-writeType = define "writeType" $
-  doc "Convert a type to an expression" $
-  lambda "typ" $
-    cases Scala._Type (var "typ") Nothing [
-      Scala._Type_ref>>: lambda "tr" $
-        cases Scala._Type_Ref (var "tr") Nothing [
-          Scala._Type_Ref_name>>: lambda "name" $ writeType_Name @@ var "name"],
-      Scala._Type_apply>>: lambda "ta" $ lets [
-        "fun">: project Scala._Type_Apply Scala._Type_Apply_tpe @@ var "ta",
-        "args">: project Scala._Type_Apply Scala._Type_Apply_args @@ var "ta"] $
-        Serialization.noSep @@ list [
-          writeType @@ var "fun",
-          Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map writeType (var "args"))],
-      Scala._Type_functionType>>: lambda "ft" $
-        cases Scala._Type_FunctionType (var "ft") Nothing [
-          Scala._Type_FunctionType_function>>: lambda "tf" $ lets [
-            "cod">: project Scala._Type_Function Scala._Type_Function_res @@ var "tf",
-            "dom">: Maybes.fromMaybe (var "cod") (Lists.maybeHead (project Scala._Type_Function Scala._Type_Function_params @@ var "tf"))] $
-            Serialization.ifx @@ functionArrowOp @@ (writeType @@ var "dom") @@ (writeType @@ var "cod")],
-      Scala._Type_lambda>>: lambda "tl" $ lets [
-        "params">: project Scala._Type_Lambda Scala._Type_Lambda_tparams @@ var "tl",
-        "body">: project Scala._Type_Lambda Scala._Type_Lambda_tpe @@ var "tl"] $
-        Serialization.noSep @@ list [
-          writeType @@ var "body",
-          Serialization.bracketList @@ Serialization.inlineStyle @@ (Lists.map writeType_Param (var "params"))],
-      Scala._Type_var>>: lambda "tv" $
-        writeType_Name @@ (project Scala._Type_Var Scala._Type_Var_name @@ var "tv")]
-
-writeType_Name :: TTermDefinition (Scala.Type_Name -> Expr)
-writeType_Name = define "writeType_Name" $
-  doc "Convert a type name to an expression" $
-  lambda "tn" $
-    Serialization.cst @@ (project Scala._Type_Name Scala._Type_Name_value @@ var "tn")
-
-writeType_Param :: TTermDefinition (Scala.Type_Param -> Expr)
-writeType_Param = define "writeType_Param" $
-  doc "Convert a type parameter to an expression" $
-  lambda "tp" $
-    writeName @@ (project Scala._Type_Param Scala._Type_Param_name @@ var "tp")
diff --git a/src/main/haskell/Hydra/Sources/Scala/Syntax.hs b/src/main/haskell/Hydra/Sources/Scala/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Syntax.hs
+++ /dev/null
@@ -1,1241 +0,0 @@
-module Hydra.Sources.Scala.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.scala.syntax"
-
-def :: String -> Type -> Binding
-def = datatype ns
-
-meta :: String -> Type
-meta = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A Scala syntax model based on Scalameta (https://scalameta.org)"}
-  where
-    definitions = [
-      predefString,
-      scalaSymbol,
-      tree,
-      ref,
-      stat,
-      name,
-      lit,
-      data_,
-      data_Ref,
-      data_This,
-      data_Super,
-      data_Name,
-      data_Anonymous,
-      data_Select,
-      data_Interpolate,
-      data_Xml,
-      data_Apply,
-      data_ApplyUsing,
-      data_ApplyType,
-      data_ApplyInfix,
-      data_ApplyUnary,
-      data_Assign,
-      data_Return,
-      data_Throw,
-      data_Ascribe,
-      data_Annotate,
-      data_Tuple,
-      data_Block,
-      data_EndMarker,
-      data_If,
-      data_QuotedMacroExpr,
-      data_QuotedMacroType,
-      data_SplicedMacroExpr,
-      data_Match,
-      data_Try,
-      data_TryWithHandler,
-      data_FunctionData,
-      data_ContextFunction,
-      data_Function,
-      data_PolyFunction,
-      data_PartialFunction,
-      data_While,
-      data_Do,
-      data_For,
-      data_ForYield,
-      data_New,
-      data_NewAnonymous,
-      data_Eta,
-      data_Repeated,
-      data_Param,
-      type_,
-      type_Ref,
-      type_Name,
-      type_AnonymousName,
-      type_Select,
-      type_Project,
-      type_Singleton,
-      type_Apply,
-      type_ApplyInfix,
-      type_FunctionType,
-      type_Function,
-      type_PolyFunction,
-      type_ContextFunction,
-      type_ImplicitFunction,
-      type_Tuple,
-      type_With,
-      type_And,
-      type_Or,
-      type_Refine,
-      type_Existential,
-      type_Annotate,
-      type_Lambda,
-      type_Macro,
-      type_Method,
-      type_Placeholder,
-      typeBounds,
-      type_ByName,
-      type_Repeated,
-      type_Var,
-      type_TypedParam,
-      type_Param,
-      type_Match,
-      pat,
-      pat_Var,
-      pat_Bind,
-      pat_Alternative,
-      pat_Tuple,
-      pat_Repeated,
-      pat_Extract,
-      pat_ExtractInfix,
-      pat_Interpolate,
-      pat_Xml,
-      pat_Typed,
-      pat_Macro,
-      pat_Given,
-      member,
-      member_Data,
-      member_Type,
-      decl,
-      decl_Val,
-      decl_Var,
-      decl_,
-      decl_Type,
-      decl_Given,
-      defn,
-      defn_Val,
-      defn_Var,
-      defn_Given,
-      defn_Enum,
-      defn_EnumCase,
-      defn_RepeatedEnumCase,
-      defn_GivenAlias,
-      defn_ExtensionGroup,
-      defn_,
-      defn_Macro,
-      defn_Type,
-      defn_Class,
-      defn_Trait,
-      defn_Object,
-      pkg,
-      pkg_Object,
-      ctor,
-      ctor_Primary,
-      ctor_Secondary,
-      init_,
-      self,
-      template,
-      mod_,
-      mod_Annot,
-      mod_Private,
-      mod_Protected,
-      enumerator,
-      enumerator_Generator,
-      enumerator_CaseGenerator,
-      enumerator_Val,
-      enumerator_Guard,
-      importExportStat,
-      import_,
-      export_,
-      importer,
-      importee,
-      importee_Given,
-      importee_Name,
-      importee_Rename,
-      importee_Unimport,
-      caseTree,
-      case_,
-      typeCase,
-      source,
-      quasi]
-
-predefString :: Binding
-predefString = def "PredefString" $ --  See scala/Predef.scala
-  T.wrap T.string
-
-scalaSymbol :: Binding
-scalaSymbol = def "ScalaSymbol" $ --  See scala/Symbol.scala
-  T.record [
-    "name">: T.string]
-
-tree :: Binding
-tree = def "Tree" $ --  Note: ignoring fields of Tree and InternalTree for now
-  T.union [
-    "ref">: meta "Ref",
-    "stat">: meta "Stat",
-    "type">: meta "Type",
-    "bounds">: meta "TypeBounds",
-    "pat">: meta "Pat",
-    "member">: meta "Member",
-    "ctor">: meta "Ctor",
-    "template">: meta "Template",
-    "mod">: meta "Mod",
-    "enumerator">: meta "Enumerator",
-    "importer">: meta "Importer",
-    "importee">: meta "Importee",
-    "caseTree">: meta "CaseTree",
-    "source">: meta "Source",
-    "quasi">: meta "Quasi"]
-
-ref :: Binding
-ref = def "Ref" $
-  T.union [
-    "name">: meta "Name",
-    "init">: meta "Init"]
-
-stat :: Binding
-stat = def "Stat" $
-  T.union [
-    "term">: meta "Data",
-    "decl">: meta "Decl",
-    "defn">: meta "Defn",
-    "importExport">: meta "ImportExportStat"]
-
-name :: Binding
-name = def "Name" $
-  T.union [
-    "value">: T.string,
-    "anonymous">: T.unit,
-    "indeterminate">: meta "PredefString"]
-
-lit :: Binding
-lit = def "Lit" $
-  T.union [
-    "null">: T.unit,
-    "int">: T.int32,
-    "double">: T.float64,
-    "float">: T.float32,
-    "byte">: T.int8,
-    "short">: T.int16,
-    "char">: T.uint16,
-    "long">: T.int64,
-    "boolean">: T.boolean,
-    "unit">: T.unit,
-    "string">: T.string,
-    "bytes">: T.list T.int32,
-    "symbol">: meta "ScalaSymbol"]
-
-data_ :: Binding
-data_ = def "Data" $
-  T.union [
-    "lit">: meta "Lit",
-    "ref">: meta "Data_Ref",
-    "interpolate">: meta "Data_Interpolate",
-    "xml">: meta "Data_Xml",
-    "apply">: meta "Data_Apply",
-    "applyUsing">: meta "Data_ApplyUsing",
-    "applyType">: meta "Data_ApplyType",
-    "assign">: meta "Data_Assign",
-    "return">: meta "Data_Return",
-    "throw">: meta "Data_Throw",
-    "ascribe">: meta "Data_Ascribe",
-    "annotate">: meta "Data_Annotate",
-    "tuple">: meta "Data_Tuple",
-    "block">: meta "Data_Block",
-    "endMarker">: meta "Data_EndMarker",
-    "if">: meta "Data_If",
-    "quotedMacroExpr">: meta "Data_QuotedMacroExpr",
-    "quotedMacroType">: meta "Data_QuotedMacroType",
-    "splicedMacroExpr">: meta "Data_SplicedMacroExpr",
-    "match">: meta "Data_Match",
-    "try">: meta "Data_Try",
-    "tryWithHandler">: meta "Data_TryWithHandler",
-    "functionData">: meta "Data_FunctionData",
-    "polyFunction">: meta "Data_PolyFunction",
-    "partialFunction">: meta "Data_PartialFunction",
-    "while">: meta "Data_While",
-    "do">: meta "Data_Do",
-    "for">: meta "Data_For",
-    "forYield">: meta "Data_ForYield",
-    "new">: meta "Data_New",
-    "newAnonymous">: meta "Data_NewAnonymous",
-    "placeholder">: T.unit,
-    "eta">: meta "Data_Eta",
-    "repeated">: meta "Data_Repeated",
-    "param">: meta "Data_Param"]
-
-data_Ref :: Binding
-data_Ref = def "Data_Ref" $
-  T.union [
-    "this">: meta "Data_This",
-    "super">: meta "Data_Super",
-    "name">: meta "Data_Name",
-    "anonymous">: meta "Data_Anonymous",
-    "select">: meta "Data_Select",
-    "applyUnary">: meta "Data_ApplyUnary"]
-
-data_This :: Binding
-data_This = def "Data_This" $
-  T.wrap T.unit
-
-data_Super :: Binding
-data_Super = def "Data_Super" $
-  T.record [
-    "thisp">: meta "Name",
-    "superp">: meta "Name"]
-
-data_Name :: Binding
-data_Name = def "Data_Name" $
-  T.record [
-    "value">: meta "PredefString"]
-
-data_Anonymous :: Binding
-data_Anonymous = def "Data_Anonymous" $
-  T.wrap T.unit
-
-data_Select :: Binding
-data_Select = def "Data_Select" $
-  T.record [
-    "qual">: meta "Data",
-    "name">: meta "Data_Name"]
-
-data_Interpolate :: Binding
-data_Interpolate = def "Data_Interpolate" $
-  T.record [
-    "prefix">: meta "Data_Name",
-    "parts">: T.list $ meta "Lit",
-    "args">: T.list $ meta "Data"]
-
-data_Xml :: Binding
-data_Xml = def "Data_Xml" $
-  T.record [
-    "parts">: T.list $ meta "Lit",
-    "args">: T.list $ meta "Data"]
-
-data_Apply :: Binding
-data_Apply = def "Data_Apply" $
-  T.record [
-    "fun">: meta "Data",
-    "args">: T.list $ meta "Data"]
-
-data_ApplyUsing :: Binding
-data_ApplyUsing = def "Data_ApplyUsing" $
-  T.record [
-    "fun">: meta "Data",
-    "targs">: T.list $ meta "Data"]
-
-data_ApplyType :: Binding
-data_ApplyType = def "Data_ApplyType" $
-  T.record [
-    "lhs">: meta "Data",
-    "op">: meta "Data_Name",
-    "targs">: T.list $ meta "Type",
-    "args">: T.list $ meta "Data"]
-
-data_ApplyInfix :: Binding
-data_ApplyInfix = def "Data_ApplyInfix" $
-  T.record [
-    "lhs">: meta "Data",
-    "op">: meta "Data_Name",
-    "targs">: T.list $ meta "Type",
-    "args">: T.list $ meta "Data"]
-
-data_ApplyUnary :: Binding
-data_ApplyUnary = def "Data_ApplyUnary" $
-  T.record [
-    "op">: meta "Data_Name",
-    "arg">: meta "Data"]
-
-data_Assign :: Binding
-data_Assign = def "Data_Assign" $
-  T.record [
-    "lhs">: meta "Data",
-    "rhs">: meta "Data"]
-
-data_Return :: Binding
-data_Return = def "Data_Return" $
-  T.record [
-    "expr">: meta "Data"]
-
-data_Throw :: Binding
-data_Throw = def "Data_Throw" $
-  T.record [
-    "expr">: meta "Data"]
-
-data_Ascribe :: Binding
-data_Ascribe = def "Data_Ascribe" $
-  T.record [
-    "expr">: meta "Data",
-    "tpe">: meta "Type"]
-
-data_Annotate :: Binding
-data_Annotate = def "Data_Annotate" $
-  T.record [
-    "expr">: meta "Data",
-    "annots">: T.list $ meta "Mod_Annot"]
-
-data_Tuple :: Binding
-data_Tuple = def "Data_Tuple" $
-  T.record [
-    "args">: T.list $ meta "Data"]
-
-data_Block :: Binding
-data_Block = def "Data_Block" $
-  T.record [
-    "stats">: T.list $ meta "Stat"]
-
-data_EndMarker :: Binding
-data_EndMarker = def "Data_EndMarker" $
-  T.record [
-    "name">: meta "Data_Name"]
-
-data_If :: Binding
-data_If = def "Data_If" $
-  T.record [
-    "cond">: meta "Data",
-    "thenp">: meta "Data",
-    "elsep">: meta "Data"]
-
-data_QuotedMacroExpr :: Binding
-data_QuotedMacroExpr = def "Data_QuotedMacroExpr" $
-  T.record [
-    "body">: meta "Data"]
-
-data_QuotedMacroType :: Binding
-data_QuotedMacroType = def "Data_QuotedMacroType" $
-  T.record [
-    "tpe">: meta "Type"]
-
-data_SplicedMacroExpr :: Binding
-data_SplicedMacroExpr = def "Data_SplicedMacroExpr" $
-  T.record [
-    "body">: meta "Data"]
-
-data_Match :: Binding
-data_Match = def "Data_Match" $
-  T.record [
-    "expr">: meta "Data",
-    "cases">: T.list $ meta "Case"]
-
-data_Try :: Binding
-data_Try = def "Data_Try" $
-  T.record [
-    "expr">: meta "Data",
-    "catchp">: T.list $ meta "Case",
-    "finallyp">: T.maybe $ meta "Data"]
-
-data_TryWithHandler :: Binding
-data_TryWithHandler = def "Data_TryWithHandler" $
-  T.record [
-    "expr">: meta "Data",
-    "catchp">: meta "Data",
-    "finallyp">: T.maybe $ meta "Data"]
-
-data_FunctionData :: Binding
-data_FunctionData = def "Data_FunctionData" $
-  T.union [
-    "contextFunction">: meta "Data_ContextFunction",
-    "function">: meta "Data_Function"]
-
-data_ContextFunction :: Binding
-data_ContextFunction = def "Data_ContextFunction" $
-  T.record [
-    "params">: T.list $ meta "Data_Param",
-    "body">: meta "Data"]
-
-data_Function :: Binding
-data_Function = def "Data_Function" $
-  T.record [
-    "params">: T.list $ meta "Data_Param",
-    "body">: meta "Data"]
-
-data_PolyFunction :: Binding
-data_PolyFunction = def "Data_PolyFunction" $
-  T.record [
-    "tparams">: T.list $ meta "Type_Param",
-    "body">: meta "Data"]
-
-data_PartialFunction :: Binding
-data_PartialFunction = def "Data_PartialFunction" $
-  T.record [
-    "cases">: T.list $ meta "Case"]
-
-data_While :: Binding
-data_While = def "Data_While" $
-  T.record [
-    "expr">: meta "Data",
-    "body">: meta "Data"]
-
-data_Do :: Binding
-data_Do = def "Data_Do" $
-  T.record [
-    "body">: meta "Data",
-    "expr">: meta "Data"]
-
-data_For :: Binding
-data_For = def "Data_For" $
-  T.record [
-    "enums">: T.list $ meta "Enumerator"]
-
-data_ForYield :: Binding
-data_ForYield = def "Data_ForYield" $
-  T.record [
-    "enums">: T.list $ meta "Enumerator"]
-
-data_New :: Binding
-data_New = def "Data_New" $
-  T.record [
-    "init">: meta "Init"]
-
-data_NewAnonymous :: Binding
-data_NewAnonymous = def "Data_NewAnonymous" $
-  T.record [
-    "templ">: meta "Template"]
-
-data_Eta :: Binding
-data_Eta = def "Data_Eta" $
-  T.record [
-    "expr">: meta "Data"]
-
-data_Repeated :: Binding
-data_Repeated = def "Data_Repeated" $
-  T.record [
-    "expr">: meta "Data"]
-
-data_Param :: Binding
-data_Param = def "Data_Param" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Name",
-    "decltpe">: T.maybe $ meta "Type",
-    "default">: T.maybe $ meta "Data"]
-
-type_ :: Binding
-type_ = def "Type" $
-  T.union [
-    "ref">: meta "Type_Ref",
-    "anonymousName">: meta "Type_AnonymousName",
-    "apply">: meta "Type_Apply",
-    "applyInfix">: meta "Type_ApplyInfix",
-    "functionType">: meta "Type_FunctionType",
-    "polyFunction">: meta "Type_PolyFunction",
-    "implicitFunction">: meta "Type_ImplicitFunction",
-    "tuple">: meta "Type_Tuple",
-    "with">: meta "Type_With",
-    "and">: meta "Type_And",
-    "or">: meta "Type_Or",
-    "refine">: meta "Type_Refine",
-    "existential">: meta "Type_Existential",
-    "annotate">: meta "Type_Annotate",
-    "lambda">: meta "Type_Lambda",
-    "macro">: meta "Type_Macro",
-    "method">: meta "Type_Method",
-    "placeholder">: meta "Type_Placeholder",
-    "byName">: meta "Type_ByName",
-    "repeated">: meta "Type_Repeated",
-    "var">: meta "Type_Var",
-    "typedParam">: meta "Type_TypedParam",
-    "match">: meta "Type_Match"]
-
-type_Ref :: Binding
-type_Ref = def "Type_Ref" $
-  T.union [
-    "name">: meta "Type_Name",
-    "select">: meta "Type_Select",
-    "project">: meta "Type_Project",
-    "singleton">: meta "Type_Singleton"]
-
-type_Name :: Binding
-type_Name = def "Type_Name" $
-  T.record [
-    "value">: T.string]
-
-type_AnonymousName :: Binding
-type_AnonymousName = def "Type_AnonymousName" $
-  T.wrap T.unit
-
-type_Select :: Binding
-type_Select = def "Type_Select" $
-  T.record [
-    "qual">: meta "Data_Ref",
-    "name">: meta "Type_Name"]
-
-type_Project :: Binding
-type_Project = def "Type_Project" $
-  T.record [
-    "qual">: meta "Type",
-    "name">: meta "Type_Name"]
-
-type_Singleton :: Binding
-type_Singleton = def "Type_Singleton" $
-  T.record [
-    "ref">: meta "Data_Ref"]
-
-type_Apply :: Binding
-type_Apply = def "Type_Apply" $
-  T.record [
-    "tpe">: meta "Type",
-    "args">: T.list $ meta "Type"]
-
-type_ApplyInfix :: Binding
-type_ApplyInfix = def "Type_ApplyInfix" $
-  T.record [
-    "lhs">: meta "Type",
-    "op">: meta "Type_Name",
-    "rhs">: meta "Type"]
-
-type_FunctionType :: Binding
-type_FunctionType = def "Type_FunctionType" $
-  T.union [
-    "function">: meta "Type_Function",
-    "contextFunction">: meta "Type_ContextFunction"]
-
-type_Function :: Binding
-type_Function = def "Type_Function" $
-  T.record [
-    "params">: T.list $ meta "Type",
-    "res">: meta "Type"]
-
-type_PolyFunction :: Binding
-type_PolyFunction = def "Type_PolyFunction" $
-  T.record [
-    "tparams">: T.list $ meta "Type_Param",
-    "tpe">: meta "Type"]
-
-type_ContextFunction :: Binding
-type_ContextFunction = def "Type_ContextFunction" $
-  T.record [
-    "params">: T.list $ meta "Type",
-    "res">: meta "Type"]
-
-type_ImplicitFunction :: Binding
-type_ImplicitFunction = def "Type_ImplicitFunction" $
-  T.record [
-    "params">: T.list $ meta "Type",
-    "res">: meta "Type"]
-
-type_Tuple :: Binding
-type_Tuple = def "Type_Tuple" $
-  T.record [
-    "args">: T.list $ meta "Type"]
-
-type_With :: Binding
-type_With = def "Type_With" $
-  T.record [
-    "lhs">: meta "Type",
-    "rhs">: meta "Type"]
-
-type_And :: Binding
-type_And = def "Type_And" $
-  T.record [
-    "lhs">: meta "Type",
-    "rhs">: meta "Type"]
-
-type_Or :: Binding
-type_Or = def "Type_Or" $
-  T.record [
-    "lhs">: meta "Type",
-    "rhs">: meta "Type"]
-
-type_Refine :: Binding
-type_Refine = def "Type_Refine" $
-  T.record [
-    "tpe">: T.maybe $ meta "Type",
-    "stats">: T.list $ meta "Stat"]
-
-type_Existential :: Binding
-type_Existential = def "Type_Existential" $
-  T.record [
-    "tpe">: meta "Type",
-    "stats">: T.list $ meta "Stat"]
-
-type_Annotate :: Binding
-type_Annotate = def "Type_Annotate" $
-  T.record [
-    "tpe">: meta "Type",
-    "annots">: T.list $ meta "Mod_Annot"]
-
-type_Lambda :: Binding
-type_Lambda = def "Type_Lambda" $
-  T.record [
-    "tparams">: T.list $ meta "Type_Param",
-    "tpe">: meta "Type"]
-
-type_Macro :: Binding
-type_Macro = def "Type_Macro" $
-  T.record [
-    "body">: meta "Data"]
-
-type_Method :: Binding
-type_Method = def "Type_Method" $
-  T.record [
-    "paramss">: T.list $ T.list $ meta "Data_Param",
-    "tpe">: meta "Type"]
-
-type_Placeholder :: Binding
-type_Placeholder = def "Type_Placeholder" $
-  T.record [
-    "bounds">: meta "TypeBounds"]
-
-typeBounds :: Binding
-typeBounds = def "TypeBounds" $
-  T.record [
-    "lo">: T.maybe $ meta "Type",
-    "hi">: T.maybe $ meta "Type"]
-
-type_ByName :: Binding
-type_ByName = def "Type_ByName" $
-  T.record [
-    "tpe">: meta "Type"]
-
-type_Repeated :: Binding
-type_Repeated = def "Type_Repeated" $
-  T.record [
-    "tpe">: meta "Type"]
-
-type_Var :: Binding
-type_Var = def "Type_Var" $
-  T.record [
-    "name">: meta "Type_Name"]
-
-type_TypedParam :: Binding
-type_TypedParam = def "Type_TypedParam" $
-  T.record [
-    "name">: meta "Name",
-    "typ">: meta "Type"]
-
-type_Param :: Binding
-type_Param = def "Type_Param" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "tbounds">: T.list $ meta "TypeBounds",
-    "vbounds">: T.list $ meta "Type",
-    "cbounds">: T.list $ meta "Type"]
-
-type_Match :: Binding
-type_Match = def "Type_Match" $
-  T.record [
-    "tpe">: meta "Type",
-    "cases">: T.list $ meta "TypeCase"]
-
-pat :: Binding
-pat = def "Pat" $
-  T.union [
-    "var">: meta "Pat_Var",
-    "wildcard">: T.unit,
-    "seqWildcard">: T.unit,
-    "bind">: meta "Pat_Bind",
-    "alternative">: meta "Pat_Alternative",
-    "tuple">: meta "Pat_Tuple",
-    "repeated">: meta "Pat_Repeated",
-    "extract">: meta "Pat_Extract",
-    "extractInfix">: meta "Pat_ExtractInfix",
-    "interpolate">: meta "Pat_Interpolate",
-    "xml">: meta "Pat_Xml",
-    "typed">: meta "Pat_Typed",
-    "macro">: meta "Pat_Macro",
-    "given">: meta "Pat_Given"]
-
-pat_Var :: Binding
-pat_Var = def "Pat_Var" $
-  T.record [
-    "name">: meta "Data_Name"]
-
-pat_Bind :: Binding
-pat_Bind = def "Pat_Bind" $
-  T.record [
-    "lhs">: meta "Pat",
-    "rhs">: meta "Pat"]
-
-pat_Alternative :: Binding
-pat_Alternative = def "Pat_Alternative" $
-  T.record [
-    "lhs">: meta "Pat",
-    "rhs">: meta "Pat"]
-
-pat_Tuple :: Binding
-pat_Tuple = def "Pat_Tuple" $
-  T.record [
-    "args">: T.list $ meta "Pat"]
-
-pat_Repeated :: Binding
-pat_Repeated = def "Pat_Repeated" $
-  T.record [
-    "name">: meta "Data_Name"]
-
-pat_Extract :: Binding
-pat_Extract = def "Pat_Extract" $
-  T.record [
-    "fun">: meta "Data",
-    "args">: T.list $ meta "Pat"]
-
-pat_ExtractInfix :: Binding
-pat_ExtractInfix = def "Pat_ExtractInfix" $
-  T.record [
-    "lhs">: meta "Pat",
-    "op">: meta "Data_Name",
-    "rhs">: T.list $ meta "Pat"]
-
-pat_Interpolate :: Binding
-pat_Interpolate = def "Pat_Interpolate" $
-  T.record [
-    "prefix">: meta "Data_Name",
-    "parts">: T.list $ meta "Lit"]
-
-pat_Xml :: Binding
-pat_Xml = def "Pat_Xml" $
-  T.record [
-    "parts">: T.list $ meta "Lit",
-    "args">: T.list $ meta "Pat"]
-
-pat_Typed :: Binding
-pat_Typed = def "Pat_Typed" $
-  T.record [
-    "lhs">: meta "Pat",
-    "rhs">: meta "Type"]
-
-pat_Macro :: Binding
-pat_Macro = def "Pat_Macro" $
-  T.record [
-    "body">: meta "Data"]
-
-pat_Given :: Binding
-pat_Given = def "Pat_Given" $
-  T.record [
-    "tpe">: meta "Type"]
-
-member :: Binding
-member = def "Member" $
-  T.union [
-    "term">: meta "Member_Data",
-    "type">: meta "Member_Type",
-    "termParam">: meta "Data_Param",
-    "typeParam">: meta "Type_Param",
-    "self">: meta "Self"]
-
-member_Data :: Binding
-member_Data = def "Member_Data" $
-  T.union [
-    "pkg">: meta "Pkg",
-    "object">: meta "Pkg_Object"]
-
-member_Type :: Binding
-member_Type = def "Member_Type" $
-  T.record [
-    "name">: meta "Type_Name"]
-
-decl :: Binding
-decl = def "Decl" $
-  T.union [
-    "val">: meta "Decl_Val",
-    "var">: meta "Decl_Var",
-    "def">: meta "Decl_Def",
-    "type">: meta "Decl_Type",
-    "given">: meta "Decl_Given"]
-
-decl_Val :: Binding
-decl_Val = def "Decl_Val" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "pats">: T.list $ meta "Pat",
-    "decltpe">: meta "Type"]
-
-decl_Var :: Binding
-decl_Var = def "Decl_Var" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "pats">: T.list $ meta "Pat",
-    "decltpe">: meta "Type"]
-
-decl_ :: Binding
-decl_ = def "Decl_Def" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Data_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "paramss">: T.list $ T.list $ meta "Data_Param",
-    "decltpe">: meta "Type"]
-
-decl_Type :: Binding
-decl_Type = def "Decl_Type" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Type_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "bounds">: meta "TypeBounds"]
-
-decl_Given :: Binding
-decl_Given = def "Decl_Given" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Data_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "sparams">: T.list $ T.list $ meta "Data_Param",
-    "decltpe">: meta "Type"]
-
-defn :: Binding
-defn = def "Defn" $
-  T.union [
-    "val">: meta "Defn_Val",
-    "var">: meta "Defn_Var",
-    "given">: meta "Defn_Given",
-    "enum">: meta "Defn_Enum",
-    "enumCase">: meta "Defn_EnumCase",
-    "repeatedEnumCase">: meta "Defn_RepeatedEnumCase",
-    "givenAlias">: meta "Defn_GivenAlias",
-    "extensionGroup">: meta "Defn_ExtensionGroup",
-    "def">: meta "Defn_Def",
-    "macro">: meta "Defn_Macro",
-    "type">: meta "Defn_Type",
-    "class">: meta "Defn_Class",
-    "trait">: meta "Defn_Trait",
-    "object">: meta "Defn_Object"]
-
-defn_Val :: Binding
-defn_Val = def "Defn_Val" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "pats">: T.list $ meta "Pat",
-    "decltpe">: T.maybe $ meta "Type",
-    "rhs">: meta "Data"]
-
-defn_Var :: Binding
-defn_Var = def "Defn_Var" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "pats">: T.list $ meta "Pat",
-    "decltpe">: meta "Type",
-    "rhs">: T.maybe $ meta "Data"]
-
-defn_Given :: Binding
-defn_Given = def "Defn_Given" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Name",
-    "tparams">: T.list $ T.list $ meta "Type_Param",
-    "sparams">: T.list $ T.list $ meta "Data_Param",
-    "templ">: meta "Template"]
-
-defn_Enum :: Binding
-defn_Enum = def "Defn_Enum" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Type_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "ctor">: meta "Ctor_Primary",
-    "template">: meta "Template"]
-
-defn_EnumCase :: Binding
-defn_EnumCase = def "Defn_EnumCase" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Data_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "ctor">: meta "Ctor_Primary",
-    "inits">: T.list $ meta "Init"]
-
-defn_RepeatedEnumCase :: Binding
-defn_RepeatedEnumCase = def "Defn_RepeatedEnumCase" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "cases">: T.list $ meta "Data_Name"]
-
-defn_GivenAlias :: Binding
-defn_GivenAlias = def "Defn_GivenAlias" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Name",
-    "tparams">: T.list $ T.list $ meta "Type_Param",
-    "sparams">: T.list $ T.list $ meta "Data_Param",
-    "decltpe">: meta "Type",
-    "body">: meta "Data"]
-
-defn_ExtensionGroup :: Binding
-defn_ExtensionGroup = def "Defn_ExtensionGroup" $
-  T.record [
-    "tparams">: T.list $ meta "Type_Param",
-    "parmss">: T.list $ T.list $ meta "Data_Param",
-    "body">: meta "Stat"]
-
-defn_ :: Binding
-defn_ = def "Defn_Def" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Data_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "paramss">: T.list $ T.list $ meta "Data_Param",
-    "decltpe">: T.maybe $ meta "Type",
-    "body">: meta "Data"]
-
-defn_Macro :: Binding
-defn_Macro = def "Defn_Macro" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Data_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "paramss">: T.list $ T.list $ meta "Data_Param",
-    "decltpe">: T.maybe $ meta "Type",
-    "body">: meta "Data"]
-
-defn_Type :: Binding
-defn_Type = def "Defn_Type" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Type_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "body">: meta "Type"]
-
-defn_Class :: Binding
-defn_Class = def "Defn_Class" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Type_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "ctor">: meta "Ctor_Primary",
-    "template">: meta "Template"]
-
-defn_Trait :: Binding
-defn_Trait = def "Defn_Trait" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Type_Name",
-    "tparams">: T.list $ meta "Type_Param",
-    "ctor">: meta "Ctor_Primary",
-    "template">: meta "Template"]
-
-defn_Object :: Binding
-defn_Object = def "Defn_Object" $
-  T.record [
-    "name">: meta "Data_Name"]
-
-pkg :: Binding
-pkg = def "Pkg" $
-  T.record [
-    "name">: meta "Data_Name",
-    "ref">: meta "Data_Ref",
-    "stats">: T.list $ meta "Stat"]
-
-pkg_Object :: Binding
-pkg_Object = def "Pkg_Object" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Data_Name",
-    "template">: meta "Template"]
-
-ctor :: Binding
-ctor = def "Ctor" $
-  T.union [
-    "primary">: meta "Ctor_Primary",
-    "secondary">: meta "Ctor_Secondary"]
-
-ctor_Primary :: Binding
-ctor_Primary = def "Ctor_Primary" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Name",
-    "paramss">: T.list $ T.list $ meta "Data_Param"]
-
-ctor_Secondary :: Binding
-ctor_Secondary = def "Ctor_Secondary" $
-  T.record [
-    "mods">: T.list $ meta "Mod",
-    "name">: meta "Name",
-    "paramss">: T.list $ T.list $ meta "Data_Param",
-    "init">: meta "Init",
-    "stats">: T.list $ meta "Stat"]
-
-init_ :: Binding
-init_ = def "Init" $
-  T.record [
-    "tpe">: meta "Type",
-    "name">: meta "Name",
-    "argss">: T.list $ T.list $ meta "Data"]
-
-self :: Binding
-self = def "Self" $
-  T.wrap T.unit
-
-template :: Binding
-template = def "Template" $
-  T.record [
-    "early">: T.list $ meta "Stat",
-    "inits">: T.list $ meta "Init",
-    "self">: meta "Self",
-    "stats">: T.list $ meta "Stat"]
-
-mod_ :: Binding
-mod_ = def "Mod" $
-  T.union [
-    "annot">: meta "Mod_Annot",
-    "private">: meta "Mod_Private",
-    "protected">: meta "Mod_Protected",
-    "implicit">: T.unit,
-    "final">: T.unit,
-    "sealed">: T.unit,
-    "open">: T.unit,
-    "super">: T.unit,
-    "override">: T.unit,
-    "case">: T.unit,
-    "abstract">: T.unit,
-    "covariant">: T.unit,
-    "contravariant">: T.unit,
-    "lazy">: T.unit,
-    "valParam">: T.unit,
-    "varParam">: T.unit,
-    "infix">: T.unit,
-    "inline">: T.unit,
-    "using">: T.unit,
-    "opaque">: T.unit,
-    "transparent">: T.unit]
-
-mod_Annot :: Binding
-mod_Annot = def "Mod_Annot" $
-  T.record [
-    "init">: meta "Init"]
-
-mod_Private :: Binding
-mod_Private = def "Mod_Private" $
-  T.record [
-    "within">: meta "Ref"]
-
-mod_Protected :: Binding
-mod_Protected = def "Mod_Protected" $
-  T.record [
-    "within">: meta "Ref"]
-
-enumerator :: Binding
-enumerator = def "Enumerator" $
-  T.union [
-    "generator">: meta "Enumerator_Generator",
-    "caseGenerator">: meta "Enumerator_CaseGenerator",
-    "val">: meta "Enumerator_Val",
-    "guard">: meta "Enumerator_Guard"]
-
-enumerator_Generator :: Binding
-enumerator_Generator = def "Enumerator_Generator" $
-  T.record [
-    "pat">: meta "Pat",
-    "rhs">: meta "Data"]
-
-enumerator_CaseGenerator :: Binding
-enumerator_CaseGenerator = def "Enumerator_CaseGenerator" $
-  T.record [
-    "pat">: meta "Pat",
-    "rhs">: meta "Data"]
-
-enumerator_Val :: Binding
-enumerator_Val = def "Enumerator_Val" $
-  T.record [
-    "pat">: meta "Pat",
-    "rhs">: meta "Data"]
-
-enumerator_Guard :: Binding
-enumerator_Guard = def "Enumerator_Guard" $
-  T.record [
-    "cond">: meta "Data"]
-
-importExportStat :: Binding
-importExportStat = def "ImportExportStat" $
-  T.union [
-    "import">: meta "Import",
-    "export">: meta "Export"]
-
-import_ :: Binding
-import_ = def "Import" $
-  T.record [
-    "importers">: T.list $ meta "Importer"]
-
-export_ :: Binding
-export_ = def "Export" $
-  T.record [
-    "importers">: T.list $ meta "Importer"]
-
-importer :: Binding
-importer = def "Importer" $
-  T.record [
-    "ref">: meta "Data_Ref",
-    "importees">: T.list $ meta "Importee"]
-
-importee :: Binding
-importee = def "Importee" $
-  T.union [
-    "wildcard">: T.unit,
-    "given">: meta "Importee_Given",
-    "givenAll">: T.unit,
-    "name">: meta "Importee_Name",
-    "rename">: meta "Importee_Rename",
-    "unimport">: meta "Importee_Unimport"]
-
-importee_Given :: Binding
-importee_Given = def "Importee_Given" $
-  T.record [
-    "tpe">: meta "Type"]
-
-importee_Name :: Binding
-importee_Name = def "Importee_Name" $
-  T.record [
-    "name">: meta "Name"]
-
-importee_Rename :: Binding
-importee_Rename = def "Importee_Rename" $
-  T.record [
-    "name">: meta "Name",
-    "rename">: meta "Name"]
-
-importee_Unimport :: Binding
-importee_Unimport = def "Importee_Unimport" $
-  T.record [
-    "name">: meta "Name"]
-
-caseTree :: Binding
-caseTree = def "CaseTree" $
-  T.union [
-    "case">: meta "Case",
-    "typeCase">: meta "TypeCase"]
-
-case_ :: Binding
-case_ = def "Case" $
-  T.record [
-    "pat">: meta "Pat",
-    "cond">: T.maybe $ meta "Data",
-    "body">: meta "Data"]
-
-typeCase :: Binding
-typeCase = def "TypeCase" $
-  T.record [
-    "pat">: meta "Type",
-    "body">: meta "Type"]
-
-source :: Binding
-source = def "Source" $
-  T.record [
-    "stats">: T.list $ meta "Stat"]
-
-quasi :: Binding
-quasi = def "Quasi" $ --  TODO
-  T.wrap T.unit
diff --git a/src/main/haskell/Hydra/Sources/Scala/Utils.hs b/src/main/haskell/Hydra/Sources/Scala/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Scala/Utils.hs
+++ /dev/null
@@ -1,442 +0,0 @@
-module Hydra.Sources.Scala.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Scala.Syntax as Scala
-import qualified Hydra.Sources.Scala.Syntax as ScalaSyntax
-import qualified Hydra.Sources.Scala.Language as ScalaLanguageSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.scala.utils"
-
-scalaLanguageNs :: Namespace
-scalaLanguageNs = moduleNamespace ScalaLanguageSource.module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [scalaLanguageNs, Names.ns, Formatting.ns],
-            moduleTypeDependencies = (ScalaSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Utility functions for constructing Scala AST nodes"}
-  where
-    definitions = [
-      toDefinition nameOfType,
-      toDefinition qualifyUnionFieldName,
-      toDefinition sapply,
-      toDefinition sapplyTypes,
-      toDefinition sassign,
-      toDefinition scalaEscapeName,
-      toDefinition scalaReservedWordsRef,
-      toDefinition scalaTypeName,
-      toDefinition slambda,
-      toDefinition sname,
-      toDefinition sprim,
-      toDefinition stapply,
-      toDefinition stapply1,
-      toDefinition stapply2,
-      toDefinition stparam,
-      toDefinition stref,
-      toDefinition svar,
-      toDefinition typeToString]
-
-
-nameOfType :: TTermDefinition (Graph -> Type -> Y.Maybe Name)
-nameOfType = def "nameOfType" $
-  doc "Extract the name from a type, if it is a named type" $
-  lambda "cx" $ lambda "t" $
-    (cases _Type (Strip.deannotateType @@ var "t")
-      (Just nothing) [
-      _Type_variable>>: ("name" ~> just (var "name")),
-      _Type_forall>>: ("ft" ~> nameOfType @@ var "cx" @@ (project _ForallType _ForallType_body @@ var "ft"))])
-
-qualifyUnionFieldName :: TTermDefinition (String -> Y.Maybe Name -> Name -> String)
-qualifyUnionFieldName = def "qualifyUnionFieldName" $
-  doc "Qualify a union field name, optionally prefixing with the Scala type name" $
-  lambda "dlft" $ lambda "sname" $ lambda "fname" $
-    Maybes.maybe
-      (var "dlft")
-      ("n" ~> (scalaTypeName @@ true @@ var "n") ++ string ".")
-      (var "sname")
-    ++ (scalaEscapeName @@ (Core.unName $ var "fname"))
-
-sapply :: TTermDefinition (Scala.Data -> [Scala.Data] -> Scala.Data)
-sapply = def "sapply" $
-  doc "Apply a Scala data expression to a list of arguments" $
-  lambda "fun" $ lambda "args" $
-    inject _Data _Data_apply (
-      record _Data_Apply [
-        _Data_Apply_fun>>: var "fun",
-        _Data_Apply_args>>: var "args"])
-
-sapplyTypes :: TTermDefinition (Scala.Data -> [Scala.Type] -> Scala.Data)
-sapplyTypes = def "sapplyTypes" $
-  doc "Apply explicit type parameters to a Scala expression (e.g. f[A, B])" $
-  lambda "fun" $ lambda "typeArgs" $ lets [
-    -- Convert each Scala type to its string representation
-    "typeToStr">: ("t" ~> asTerm typeToString @@ var "t"),
-    "typeStrings">: Lists.map (var "typeToStr") (var "typeArgs"),
-    "typeArgStr">: Strings.cat (list [string "[", Strings.intercalate (string ", ") (var "typeStrings"), string "]"])] $
-    -- Combine function with type args: extract name from fun, append type args
-    cases _Data (var "fun")
-      (Just $ var "fun") -- If not a name ref, can't add type args
-      [_Data_ref>>: ("ref" ~> cases _Data_Ref (var "ref")
-        (Just $ var "fun")
-        [_Data_Ref_name>>: ("dn" ~> lets [
-          "nameStr">: project _Data_Name _Data_Name_value @@ var "dn",
-          "rawName">: unwrap Scala._PredefString @@ var "nameStr"] $
-          sname @@ (var "rawName" ++ var "typeArgStr"))])]
-
-sassign :: TTermDefinition (Scala.Data -> Scala.Data -> Scala.Data)
-sassign = def "sassign" $
-  doc "Create a Scala assignment expression" $
-  lambda "lhs" $ lambda "rhs" $
-    inject _Data _Data_assign (
-      record _Data_Assign [
-        _Data_Assign_lhs>>: var "lhs",
-        _Data_Assign_rhs>>: var "rhs"])
-
-scalaEscapeName :: TTermDefinition (String -> String)
-scalaEscapeName = def "scalaEscapeName" $
-  doc "Sanitize a name for Scala: escape reserved words, replace invalid characters" $
-  lambda "s" $ lets [
-    -- Replace apostrophes with underscores (Scala doesn't allow ' in identifiers)
-    "sanitized">: Strings.fromList (Lists.map
-      ("c" ~> Logic.ifElse (Equality.equal (var "c") (int32 39)) (int32 95) (var "c"))
-      (Strings.toList (var "s"))),
-    -- Replace lone underscore with _x (Scala _ is a wildcard, can't be used as param name)
-    "sanitized2">: Logic.ifElse (Equality.equal (var "sanitized") (string "_"))
-      (string "_x")
-      (var "sanitized"),
-    -- Rename toString to toString_ (conflicts with Any.toString in case class fields)
-    "sanitized3">: Logic.ifElse (Equality.equal (var "sanitized2") (string "toString"))
-      (string "toString_")
-      (var "sanitized2"),
-    "needsBackticks">: Logic.or
-      (Sets.member (var "sanitized3") (asTerm scalaReservedWordsRef))
-      -- Names ending in _ cause lexer ambiguity with _: type ascription
-      (Logic.and
-        (Equality.gt (Strings.length (var "sanitized3")) (int32 0))
-        (Equality.equal (Maybes.fromMaybe (int32 0) (Strings.maybeCharAt (Math.sub (Strings.length (var "sanitized3")) (int32 1)) (var "sanitized3"))) (int32 95)))] $
-    Logic.ifElse (var "needsBackticks")
-      (Strings.cat (list [string "`", var "sanitized3", string "`"]))
-      (var "sanitized3")
-
-scalaReservedWordsRef :: TTermDefinition (S.Set String)
-scalaReservedWordsRef = def "scalaReservedWords" $
-  doc "Reference to scalaReservedWords from the language module" $
-  TTerm $ TermVariable $ Name "hydra.scala.language.scalaReservedWords"
-
-scalaTypeName :: TTermDefinition (Bool -> Name -> String)
-scalaTypeName = def "scalaTypeName" $
-  doc "Convert a Hydra name to a Scala type name" $
-  lambda "qualify" $ lambda "name" $
-    Logic.ifElse
-      (Logic.or (var "qualify") (Sets.member (Names.localNameOf @@ var "name") (asTerm scalaReservedWordsRef)))
-      (Core.unName $ var "name")
-      (Names.localNameOf @@ var "name")
-
-slambda :: TTermDefinition (String -> Scala.Data -> Y.Maybe Scala.Type -> Scala.Data)
-slambda = def "slambda" $
-  doc "Create a Scala lambda (function) expression" $
-  lambda "v" $ lambda "body" $ lambda "sdom" $
-    inject _Data _Data_functionData (
-      inject _Data_FunctionData _Data_FunctionData_function (
-        record _Data_Function [
-          _Data_Function_params>>: list [
-            record _Data_Param [
-              _Data_Param_mods>>: list ([] :: [TTerm Scala.Mod]),
-              _Data_Param_name>>: inject Scala._Name Scala._Name_value (var "v"),
-              _Data_Param_decltpe>>: var "sdom",
-              _Data_Param_default>>: nothing]],
-          _Data_Function_body>>: var "body"]))
-
-sname :: TTermDefinition (String -> Scala.Data)
-sname = def "sname" $
-  doc "Create a Scala name reference" $
-  lambda "s" $
-    inject _Data _Data_ref (
-      inject _Data_Ref _Data_Ref_name (
-        record _Data_Name [
-          _Data_Name_value>>: wrap _PredefString (var "s")]))
-
-sprim :: TTermDefinition (Name -> Scala.Data)
-sprim = def "sprim" $
-  doc "Create a Scala primitive reference from a Hydra name" $
-  lambda "name" $ lets [
-    "qname">: Names.qualifyName @@ var "name",
-    "prefix">: Packaging.unNamespace (Maybes.fromMaybe (wrap _Namespace (string "")) (Packaging.qualifiedNameNamespace $ var "qname")),
-    "local">: scalaEscapeName @@ (Packaging.qualifiedNameLocal $ var "qname")] $
-    sname @@ (var "prefix" ++ string "." ++ var "local")
-
-stapply :: TTermDefinition (Scala.Type -> [Scala.Type] -> Scala.Type)
-stapply = def "stapply" $
-  doc "Apply a Scala type to a list of type arguments" $
-  lambda "t" $ lambda "args" $
-    inject Scala._Type Scala._Type_apply (
-      record _Type_Apply [
-        _Type_Apply_tpe>>: var "t",
-        _Type_Apply_args>>: var "args"])
-
-stapply1 :: TTermDefinition (Scala.Type -> Scala.Type -> Scala.Type)
-stapply1 = def "stapply1" $
-  doc "Apply a Scala type to one type argument" $
-  lambda "t1" $ lambda "t2" $
-    stapply @@ var "t1" @@ list [var "t2"]
-
-stapply2 :: TTermDefinition (Scala.Type -> Scala.Type -> Scala.Type -> Scala.Type)
-stapply2 = def "stapply2" $
-  doc "Apply a Scala type to two type arguments" $
-  lambda "t1" $ lambda "t2" $ lambda "t3" $
-    stapply @@ var "t1" @@ list [var "t2", var "t3"]
-
-stparam :: TTermDefinition (Name -> Scala.Type_Param)
-stparam = def "stparam" $
-  doc "Create a Scala type parameter from a Hydra name, capitalizing to avoid collision with value params" $
-  lambda "name" $ lets [
-    "v">: Formatting.capitalize @@ (Core.unName $ var "name")] $
-    record _Type_Param [
-      _Type_Param_mods>>: list ([] :: [TTerm Scala.Mod]),
-      _Type_Param_name>>: inject Scala._Name Scala._Name_value (var "v"),
-      _Type_Param_tparams>>: list ([] :: [TTerm Scala.Type_Param]),
-      _Type_Param_tbounds>>: list ([] :: [TTerm Scala.TypeBounds]),
-      _Type_Param_vbounds>>: list ([] :: [TTerm Scala.Type]),
-      _Type_Param_cbounds>>: list ([] :: [TTerm Scala.Type])]
-
-stref :: TTermDefinition (String -> Scala.Type)
-stref = def "stref" $
-  doc "Create a Scala type reference by name" $
-  lambda "s" $
-    inject Scala._Type Scala._Type_ref (
-      inject _Type_Ref _Type_Ref_name (
-        record _Type_Name [
-          _Type_Name_value>>: var "s"]))
-
-svar :: TTermDefinition (Name -> Scala.Pat)
-svar = def "svar" $
-  doc "Create a Scala pattern variable" $
-  lambda "name" $ lets [
-    "v">: Core.unName $ var "name"] $
-    inject _Pat _Pat_var (
-      record _Pat_Var [
-        _Pat_Var_name>>: record _Data_Name [
-          _Data_Name_value>>: wrap _PredefString (var "v")]])
-
-typeToString :: TTermDefinition (Scala.Type -> String)
-typeToString = def "typeToString" $
-  doc "Convert a Scala type to its string representation" $
-  lambda "t" $
-    cases Scala._Type (var "t")
-      (Just $ string "Any") [
-      Scala._Type_ref>>: ("tr" ~> cases Scala._Type_Ref (var "tr")
-        (Just $ string "Any")
-        [Scala._Type_Ref_name>>: ("tn" ~> project Scala._Type_Name Scala._Type_Name_value @@ var "tn")]),
-      Scala._Type_var>>: ("tv" ~> project Scala._Type_Name Scala._Type_Name_value @@ (project Scala._Type_Var Scala._Type_Var_name @@ var "tv")),
-      Scala._Type_functionType>>: ("ft" ~> cases Scala._Type_FunctionType (var "ft")
-        (Just $ string "Any") [
-        Scala._Type_FunctionType_function>>: ("fn" ~> lets [
-          "params">: Lists.map (asTerm typeToString) (project Scala._Type_Function Scala._Type_Function_params @@ var "fn"),
-          "res">: asTerm typeToString @@ (project Scala._Type_Function Scala._Type_Function_res @@ var "fn")] $
-          Strings.cat (list [string "(", Strings.intercalate (string ", ") (var "params"), string ") => ", var "res"]))]),
-      Scala._Type_apply>>: ("ta" ~> lets [
-        "base">: asTerm typeToString @@ (project Scala._Type_Apply Scala._Type_Apply_tpe @@ var "ta"),
-        "argStrs">: Lists.map (asTerm typeToString) (project Scala._Type_Apply Scala._Type_Apply_args @@ var "ta")] $
-        Strings.cat (list [var "base", string "[", Strings.intercalate (string ", ") (var "argStrs"), string "]"]))]
-
-
--- Scala Meta type/constructor name references
-
-_Data = Scala._Data
-_Data_Apply = Scala._Data_Apply
-_Data_Apply_fun = Name "fun"
-_Data_Apply_args = Name "args"
-_Data_Assign = Scala._Data_Assign
-_Data_Assign_lhs = Name "lhs"
-_Data_Assign_rhs = Name "rhs"
-_Data_FunctionData = Scala._Data_FunctionData
-_Data_FunctionData_function = Name "function"
-_Data_Function = Scala._Data_Function
-_Data_Function_params = Name "params"
-_Data_Function_body = Name "body"
-_Data_Match = Scala._Data_Match
-_Data_Name = Scala._Data_Name
-_Data_Name_value = Name "value"
-_Data_Param = Scala._Data_Param
-_Data_Param_mods = Name "mods"
-_Data_Param_name = Name "name"
-_Data_Param_decltpe = Name "decltpe"
-_Data_Param_default = Name "default"
-_Data_Ref = Scala._Data_Ref
-_Data_Ref_name = Name "name"
-
-_Data_apply = Scala._Data_apply
-_Data_assign = Scala._Data_assign
-_Data_functionData = Scala._Data_functionData
-_Data_ref = Scala._Data_ref
-_Data_lit = Scala._Data_lit
-_Data_match = Scala._Data_match
-
--- Note: _ForallType and _ForallType_body come from Hydra.Kernel (Hydra.Core)
-
--- Note: _Name and _Name_value from Scala.Meta are used via the Scala. prefix
--- to avoid ambiguity with Hydra.Kernel._Name
-
--- Note: Scala._Type is used via the Scala. prefix to avoid ambiguity with Hydra.Kernel._Type
-_Type_Apply = Scala._Type_Apply
-_Type_Apply_tpe = Name "tpe"
-_Type_Apply_args = Name "args"
-_Type_FunctionType = Scala._Type_FunctionType
-_Type_Function = Scala._Type_Function
-_Type_Function_params = Name "params"
-_Type_Function_res = Name "res"
-_Type_Lambda = Scala._Type_Lambda
-_Type_Lambda_tparams = Name "tparams"
-_Type_Lambda_tpe = Name "tpe"
-_Type_Name = Scala._Type_Name
-_Type_Name_value = Name "value"
-_Type_Param = Scala._Type_Param
-_Type_Param_mods = Name "mods"
-_Type_Param_name = Name "name"
-_Type_Param_tparams = Name "tparams"
-_Type_Param_tbounds = Name "tbounds"
-_Type_Param_vbounds = Name "vbounds"
-_Type_Param_cbounds = Name "cbounds"
-_Type_Ref = Scala._Type_Ref
-_Type_Ref_name = Name "name"
-_Type_Var = Scala._Type_Var
-_Type_Var_name = Name "name"
-
-_Type_apply = Scala._Type_apply
-_Type_functionType = Scala._Type_functionType
-_Type_lambda = Scala._Type_lambda
-_Type_ref = Scala._Type_ref
-_Type_var = Scala._Type_var
-
-_Pat = Scala._Pat
-_Pat_Var = Scala._Pat_Var
-_Pat_Var_name = Name "name"
-_Pat_Extract = Scala._Pat_Extract
-_Pat_Extract_fun = Name "fun"
-_Pat_Extract_args = Name "args"
-
-_Pat_var = Scala._Pat_var
-_Pat_extract = Name "extract"
-
-_PredefString = Scala._PredefString
-
-_Lit = Scala._Lit
-_Lit_boolean = Scala._Lit_boolean
-_Lit_float = Scala._Lit_float
-_Lit_double = Scala._Lit_double
-_Lit_short = Scala._Lit_short
-_Lit_int = Scala._Lit_int
-_Lit_long = Scala._Lit_long
-_Lit_byte = Scala._Lit_byte
-_Lit_string = Scala._Lit_string
-
-_Stat = Scala._Stat
-_Stat_defn = Scala._Stat_defn
-_Stat_importExport = Scala._Stat_importExport
-
-_Defn = Scala._Defn
-_Defn_Class = Scala._Defn_Class
-_Defn_Def = Scala._Defn_Def
-_Defn_Enum = Scala._Defn_Enum
-_Defn_EnumCase = Scala._Defn_EnumCase
-_Defn_Type = Scala._Defn_Type
-_Defn_Val = Scala._Defn_Val
-
-_Ctor_Primary = Scala._Ctor_Primary
-_Template = Scala._Template
-_Self = Scala._Self
-_Mod = Scala._Mod
-_Mod_case = Name "case"
-_Pkg = Scala._Pkg
-_Import = Scala._Import
-_Importer = Scala._Importer
-_Importee = Scala._Importee
-_ImportExportStat = Scala._ImportExportStat
-_Init = Scala._Init
-_Case = Scala._Case
diff --git a/src/main/haskell/Hydra/Sources/Shacl/Coder.hs b/src/main/haskell/Hydra/Sources/Shacl/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Shacl/Coder.hs
+++ /dev/null
@@ -1,570 +0,0 @@
-module Hydra.Sources.Shacl.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Shacl.Model as Shacl
-import qualified Hydra.Sources.Shacl.Model as ShaclModel
-import qualified Hydra.Sources.Rdf.Syntax as RdfSyntax
-import qualified Hydra.Sources.Rdf.Utils as RdfUtils
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.shacl.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Names.ns, Strip.ns, Annotations.ns, moduleNamespace DecodeCore.module_, ExtractCore.ns, Formatting.ns, Lexical.ns, RdfUtils.ns],
-            moduleTypeDependencies = (ShaclModel.ns:RdfSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "SHACL coder: converts Hydra types and terms to SHACL shapes and RDF descriptions"}
-  where
-    definitions = [
-      toDefinition common,
-      toDefinition defaultCommonProperties,
-      toDefinition elementIri,
-      toDefinition encodeField,
-      toDefinition encodeFieldType,
-      toDefinition encodeList,
-      toDefinition encodeLiteralType,
-      toDefinition encodeTerm,
-      toDefinition encodeType,
-      toDefinition err,
-      toDefinition foldAccumResult,
-      toDefinition node,
-      toDefinition property,
-      toDefinition shaclCoder,
-      toDefinition unexpectedE,
-      toDefinition withType]
-
-
--- | Construct CommonProperties with the given constraints and defaults for everything else
-common :: TTermDefinition ([Shacl.CommonConstraint] -> Shacl.CommonProperties)
-common = define "common" $
-  doc "Construct CommonProperties from a list of constraints, using defaults for other fields" $
-  lambda "constraints" $
-    record Shacl._CommonProperties [
-      Shacl._CommonProperties_constraints>>: Sets.fromList (var "constraints"),
-      Shacl._CommonProperties_deactivated>>: nothing,
-      Shacl._CommonProperties_message>>: wrap Rdf._LangStrings Maps.empty,
-      Shacl._CommonProperties_severity>>: inject Shacl._Severity Shacl._Severity_info unit,
-      Shacl._CommonProperties_targetClass>>: Sets.empty,
-      Shacl._CommonProperties_targetNode>>: Sets.empty,
-      Shacl._CommonProperties_targetObjectsOf>>: Sets.empty,
-      Shacl._CommonProperties_targetSubjectsOf>>: Sets.empty]
-
--- | Default (empty) CommonProperties
-defaultCommonProperties :: TTermDefinition Shacl.CommonProperties
-defaultCommonProperties = define "defaultCommonProperties" $
-  doc "Default CommonProperties with empty constraints and default severity" $
-  common @@ (list ([] :: [TTerm Shacl.CommonConstraint]))
-
--- | Convert a Binding's name to an RDF IRI
-elementIri :: TTermDefinition (Binding -> Rdf.Iri)
-elementIri = define "elementIri" $
-  doc "Convert a binding's name to an RDF IRI" $
-  lambda "el" $
-    nameToIri @@ (Core.bindingName (var "el"))
-
--- | Encode a record field as RDF triples
-encodeField :: TTermDefinition (Name -> Rdf.Resource -> Field -> Context -> Graph -> Either Error ([Rdf.Triple], Context))
-encodeField = define "encodeField" $
-  doc "Encode a record field as RDF triples with a given subject" $
-  lambda "rname" $ lambda "subject" $ lambda "field" $ lambda "cx" $ lambda "g" $ lets [
-    "pair1">: nextBlankNode @@ var "cx",
-    "node">: Pairs.first (var "pair1"),
-    "cx1">: Pairs.second (var "pair1")] $
-    Eithers.bind
-      (encodeTerm @@ var "node" @@ (Core.fieldTerm (var "field")) @@ var "cx1" @@ var "g")
-      ("__r1" ~> lets [
-        "descs">: Pairs.first (var "__r1"),
-        "cx2">: Pairs.second (var "__r1")] $
-        right (pair
-          (Lists.concat2
-            (triplesOf @@ var "descs")
-            (forObjects @@ var "subject"
-              @@ (propertyIri @@ var "rname" @@ (Core.fieldName (var "field")))
-              @@ (subjectsOf @@ var "descs")))
-          (var "cx2")))
-
--- | Encode a FieldType as a SHACL property shape definition
-encodeFieldType :: TTermDefinition (Name -> Maybe Integer -> FieldType -> Context -> Either Error (Shacl.Definition Shacl.PropertyShape))
-encodeFieldType = define "encodeFieldType" $
-  doc "Encode a FieldType as a SHACL property shape Definition" $
-  lambda "rname" $ lambda "order" $ lambda "ft" $ lambda "cx" $ lets [
-    "fname">: Core.fieldTypeName (var "ft"),
-    "ftype">: Core.fieldTypeType (var "ft"),
-    "iri">: propertyIri @@ var "rname" @@ var "fname",
-    "forType">: lambda "mn" $ lambda "mx" $ lambda "t" $
-      cases _Type (Strip.deannotateType @@ var "t") (Just (var "forTypeDefault" @@ var "mn" @@ var "mx" @@ var "t")) [
-        _Type_maybe>>: lambda "ot" $ var "forType" @@ (just (bigint 0)) @@ var "mx" @@ var "ot",
-        _Type_set>>: lambda "st" $ var "forType" @@ var "mn" @@ nothing @@ var "st"],
-    -- Default case: build property shape
-    "forTypeDefault">: lambda "mn" $ lambda "mx" $ lambda "t" $
-      Eithers.map
-        ("__cp" ~> lets [
-          "baseProp">: property @@ var "iri",
-          "minC">: Maybes.map
-            ("__n" ~> inject Shacl._PropertyShapeConstraint Shacl._PropertyShapeConstraint_minCount (var "__n"))
-            (var "mn"),
-          "maxC">: Maybes.map
-            ("__n" ~> inject Shacl._PropertyShapeConstraint Shacl._PropertyShapeConstraint_maxCount (var "__n"))
-            (var "mx")] $
-          record Shacl._Definition [
-            Shacl._Definition_iri>>: var "iri",
-            Shacl._Definition_target>>:
-              record Shacl._PropertyShape [
-                Shacl._PropertyShape_common>>: var "__cp",
-                Shacl._PropertyShape_constraints>>: Sets.fromList (Maybes.cat $ list [var "minC", var "maxC"]),
-                Shacl._PropertyShape_defaultValue>>: nothing,
-                Shacl._PropertyShape_description>>: wrap Rdf._LangStrings Maps.empty,
-                Shacl._PropertyShape_name>>: wrap Rdf._LangStrings Maps.empty,
-                Shacl._PropertyShape_order>>: var "order",
-                Shacl._PropertyShape_path>>: var "iri"]])
-        (encodeType @@ var "rname" @@ var "t" @@ var "cx")] $
-    -- Dispatch on the type: peel optional/set wrappers, then build shape
-    var "forType" @@ (just (bigint 1)) @@ (just (bigint 1)) @@ var "ftype"
-
--- | Helper for encoding lists as RDF (recursive)
-encodeList :: TTermDefinition (Rdf.Resource -> [Term] -> Context -> Graph -> Either Error ([Rdf.Description], Context))
-encodeList = define "encodeList" $
-  doc "Encode a list of terms as RDF list structure" $
-  lambda "subj" $ lambda "terms" $ lambda "cx0" $ lambda "g" $
-    Logic.ifElse (Lists.null (var "terms"))
-      (right $ pair
-        (list [record Rdf._Description [
-          Rdf._Description_subject>>: inject Rdf._Node Rdf._Node_iri (wrap Rdf._Iri (string "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")),
-          Rdf._Description_graph>>: wrap Rdf._Graph Sets.empty]])
-        (var "cx0"))
-      (Maybes.maybe
-        (right $ pair (list ([] :: [TTerm Rdf.Description])) (var "cx0"))
-        (lambda "p" $ lets [
-          "pair1">: nextBlankNode @@ var "cx0",
-          "node1">: Pairs.first (var "pair1"),
-          "cx1">: Pairs.second (var "pair1")] $
-          Eithers.bind
-            (encodeTerm @@ var "node1" @@ Pairs.first (var "p") @@ var "cx1" @@ var "g")
-            ("__r1" ~> lets [
-              "fdescs">: Pairs.first (var "__r1"),
-              "cx2">: Pairs.second (var "__r1"),
-              "firstTriples">: Lists.concat2
-                (triplesOf @@ var "fdescs")
-                (forObjects @@ var "subj" @@ (rdfIri @@ string "first") @@ (subjectsOf @@ var "fdescs")),
-              "pair2">: nextBlankNode @@ var "cx2",
-              "next">: Pairs.first (var "pair2"),
-              "cx3">: Pairs.second (var "pair2")] $
-              Eithers.map
-                ("__r2" ~> lets [
-                  "rdescs">: Pairs.first (var "__r2"),
-                  "cx4">: Pairs.second (var "__r2"),
-                  "restTriples">: Lists.concat2
-                    (triplesOf @@ var "rdescs")
-                    (forObjects @@ var "subj" @@ (rdfIri @@ string "rest") @@ (subjectsOf @@ var "rdescs"))] $
-                  pair
-                    (list [record Rdf._Description [
-                      Rdf._Description_subject>>: resourceToNode @@ var "subj",
-                      Rdf._Description_graph>>: wrap Rdf._Graph (Sets.fromList (Lists.concat2 (var "firstTriples") (var "restTriples")))]])
-                    (var "cx4"))
-                (encodeList @@ var "next" @@ Pairs.second (var "p") @@ var "cx3" @@ var "g")))
-        (Lists.uncons (var "terms")))
-
--- | Encode a Hydra LiteralType as SHACL CommonProperties with a datatype constraint
-encodeLiteralType :: TTermDefinition (LiteralType -> Shacl.CommonProperties)
-encodeLiteralType = define "encodeLiteralType" $
-  doc "Encode a LiteralType as SHACL CommonProperties with an XSD datatype constraint" $
-  lambda "lt" $ lets [
-    "xsd">: lambda "local" $ common @@ list [
-      inject Shacl._CommonConstraint Shacl._CommonConstraint_datatype
-        (xmlSchemaDatatypeIri @@ var "local")]] $
-    cases _LiteralType (var "lt") Nothing [
-      _LiteralType_binary>>: constant $ var "xsd" @@ string "base64Binary",
-      _LiteralType_boolean>>: constant $ var "xsd" @@ string "boolean",
-      _LiteralType_float>>: lambda "ft" $
-        cases _FloatType (var "ft") Nothing [
-          _FloatType_bigfloat>>: constant $ var "xsd" @@ string "decimal",
-          _FloatType_float32>>: constant $ var "xsd" @@ string "float",
-          _FloatType_float64>>: constant $ var "xsd" @@ string "double"],
-      _LiteralType_integer>>: lambda "it" $
-        cases _IntegerType (var "it") Nothing [
-          _IntegerType_bigint>>: constant $ var "xsd" @@ string "integer",
-          _IntegerType_int8>>: constant $ var "xsd" @@ string "byte",
-          _IntegerType_int16>>: constant $ var "xsd" @@ string "short",
-          _IntegerType_int32>>: constant $ var "xsd" @@ string "int",
-          _IntegerType_int64>>: constant $ var "xsd" @@ string "long",
-          _IntegerType_uint8>>: constant $ var "xsd" @@ string "unsignedByte",
-          _IntegerType_uint16>>: constant $ var "xsd" @@ string "unsignedShort",
-          _IntegerType_uint32>>: constant $ var "xsd" @@ string "unsignedInt",
-          _IntegerType_uint64>>: constant $ var "xsd" @@ string "unsignedLong"],
-      _LiteralType_string>>: constant $ var "xsd" @@ string "string"]
-
--- | Encode a Hydra Term as a list of RDF Descriptions
-encodeTerm :: TTermDefinition (Rdf.Resource -> Term -> Context -> Graph -> Either Error ([Rdf.Description], Context))
-encodeTerm = define "encodeTerm" $
-  doc "Encode a Hydra term as a list of RDF Descriptions" $
-  lambda "subject" $ lambda "term" $ lambda "cx" $ lambda "g" $
-    cases _Term (var "term") (Just (unexpectedE @@ var "cx" @@ string "RDF-compatible term" @@ string "unsupported term variant")) [
-      _Term_annotated>>: lambda "at" $
-        encodeTerm @@ var "subject" @@ (Core.annotatedTermBody (var "at")) @@ var "cx" @@ var "g",
-      _Term_list>>: lambda "terms" $
-        encodeList @@ var "subject" @@ var "terms" @@ var "cx" @@ var "g",
-      _Term_literal>>: lambda "lit" $ right $ pair
-        (list [record Rdf._Description [
-          Rdf._Description_subject>>: inject Rdf._Node Rdf._Node_literal (encodeLiteral @@ var "lit"),
-          Rdf._Description_graph>>: wrap Rdf._Graph Sets.empty]])
-        (var "cx"),
-      _Term_map>>: lambda "m" $
-        Eithers.map
-          ("__r" ~> pair
-            (list [record Rdf._Description [
-              Rdf._Description_subject>>: resourceToNode @@ var "subject",
-              Rdf._Description_graph>>: wrap Rdf._Graph (Sets.fromList (Lists.concat (Pairs.first (var "__r"))))]])
-            (Pairs.second (var "__r")))
-          (foldAccumResult
-            @@ ("__cx0" ~> lambda "kv" $
-              Eithers.bind
-                (ExtractCore.string @@ var "g" @@ (Strip.deannotateTerm @@ (Pairs.first (var "kv"))))
-                ("__ks" ~> lets [
-                  "pair2">: nextBlankNode @@ var "__cx0",
-                  "node2">: Pairs.first (var "pair2"),
-                  "cx2">: Pairs.second (var "pair2")] $
-                  Eithers.map
-                    ("__dr" ~> pair
-                      (Lists.concat2
-                        (forObjects @@ var "subject" @@ (keyIri @@ var "__ks") @@ (subjectsOf @@ Pairs.first (var "__dr")))
-                        (triplesOf @@ Pairs.first (var "__dr")))
-                      (Pairs.second (var "__dr")))
-                    (encodeTerm @@ var "node2" @@ (Pairs.second (var "kv")) @@ var "cx2" @@ var "g")))
-            @@ var "cx"
-            @@ (Maps.toList (var "m"))),
-      _Term_wrap>>: lambda "wt" $
-        Eithers.map
-          ("__dr" ~> lets [
-            "descs">: Pairs.first (var "__dr"),
-            "cx1">: Pairs.second (var "__dr")] $
-            pair
-              (Maybes.fromMaybe (var "descs") (Maybes.map
-                (lambda "p" $ Lists.cons
-                  (withType @@ (Core.wrappedTermTypeName (var "wt")) @@ Pairs.first (var "p"))
-                  (Pairs.second (var "p")))
-                (Lists.uncons (var "descs"))))
-              (var "cx1"))
-          (encodeTerm @@ var "subject" @@ (Core.wrappedTermBody (var "wt")) @@ var "cx" @@ var "g"),
-      _Term_maybe>>: lambda "mterm" $
-        Maybes.maybe
-          (right (pair (list ([] :: [TTerm Rdf.Description])) (var "cx")))
-          ("__inner" ~> encodeTerm @@ var "subject" @@ var "__inner" @@ var "cx" @@ var "g")
-          (var "mterm"),
-      _Term_record>>: lambda "rec" $ lets [
-        "rname">: Core.recordTypeName (var "rec"),
-        "fields">: Core.recordFields (var "rec")] $
-        Eithers.map
-          ("__r" ~> pair
-            (list [withType @@ var "rname" @@ record Rdf._Description [
-              Rdf._Description_subject>>: resourceToNode @@ var "subject",
-              Rdf._Description_graph>>: wrap Rdf._Graph (Sets.fromList (Lists.concat (Pairs.first (var "__r"))))]])
-            (Pairs.second (var "__r")))
-          (foldAccumResult
-            @@ ("__cx0" ~> lambda "field" $
-              encodeField @@ var "rname" @@ var "subject" @@ var "field" @@ var "__cx0" @@ var "g")
-            @@ var "cx"
-            @@ var "fields"),
-      _Term_set>>: lambda "terms" $
-        Eithers.map
-          ("__r" ~> pair
-            (Lists.concat (Pairs.first (var "__r")))
-            (Pairs.second (var "__r")))
-          (foldAccumResult
-            @@ ("__cx0" ~> lambda "t" $ lets [
-              "pair3">: nextBlankNode @@ var "__cx0",
-              "node3">: Pairs.first (var "pair3"),
-              "cx3">: Pairs.second (var "pair3")] $
-              encodeTerm @@ var "node3" @@ var "t" @@ var "cx3" @@ var "g")
-            @@ var "cx"
-            @@ (Sets.toList (var "terms"))),
-      _Term_inject>>: lambda "inj" $ lets [
-        "rname">: Core.injectionTypeName (var "inj"),
-        "field">: Core.injectionField (var "inj")] $
-        Eithers.map
-          ("__r" ~> pair
-            (list [withType @@ var "rname" @@ record Rdf._Description [
-              Rdf._Description_subject>>: resourceToNode @@ var "subject",
-              Rdf._Description_graph>>: wrap Rdf._Graph (Sets.fromList (Pairs.first (var "__r")))]])
-            (Pairs.second (var "__r")))
-          (encodeField @@ var "rname" @@ var "subject" @@ var "field" @@ var "cx" @@ var "g")]
-
--- | Encode a Hydra Type as SHACL CommonProperties
-encodeType :: TTermDefinition (Name -> Type -> Context -> Either Error Shacl.CommonProperties)
-encodeType = define "encodeType" $
-  doc "Encode a Hydra type as SHACL CommonProperties" $
-  lambda "tname" $ lambda "typ" $ lambda "cx" $ lets [
-    "any">: right (common @@ (list ([] :: [TTerm Shacl.CommonConstraint])))] $
-    cases _Type (Strip.deannotateType @@ var "typ") (Just (unexpectedE @@ var "cx" @@ string "type" @@ string "unsupported type variant")) [
-      _Type_either>>: lambda "_" $ var "any",
-      _Type_list>>: lambda "_" $ var "any",
-      _Type_literal>>: lambda "lt" $ right (encodeLiteralType @@ var "lt"),
-      _Type_map>>: lambda "_" $ var "any",
-      _Type_pair>>: lambda "_" $ var "any",
-      _Type_wrap>>: lambda "_" $ var "any",
-      _Type_record>>: "fts" ~>
-        Eithers.map
-          ("__props" ~> common @@ list [
-            inject Shacl._CommonConstraint Shacl._CommonConstraint_property
-              (Sets.fromList (Lists.map
-                ("__p" ~> inject Shacl._Reference Shacl._Reference_definition (var "__p"))
-                (var "__props")))])
-          (Eithers.mapList
-            ("__pair" ~> encodeFieldType @@ var "tname" @@ (just (Pairs.first (var "__pair"))) @@ (Pairs.second (var "__pair")) @@ var "cx")
-            (Lists.zip (Lists.map ("__i" ~> Literals.int32ToBigint (var "__i")) (Math.range (int32 0) (Lists.length (var "fts")))) (var "fts"))),
-      _Type_set>>: lambda "_" $ var "any",
-      _Type_union>>: "fts" ~>
-        Eithers.map
-          ("__props" ~> common @@ list [
-            inject Shacl._CommonConstraint Shacl._CommonConstraint_xone
-              (Sets.fromList (Lists.map
-                ("__p" ~> inject Shacl._Reference Shacl._Reference_anonymous (node @@ list [
-                  inject Shacl._CommonConstraint Shacl._CommonConstraint_property
-                    (Sets.fromList (list [inject Shacl._Reference Shacl._Reference_definition (var "__p")]))]))
-                (var "__props")))])
-          (Eithers.mapList
-            ("__ft" ~> encodeFieldType @@ var "tname" @@ nothing @@ var "__ft" @@ var "cx")
-            (var "fts")),
-      _Type_unit>>: constant $ var "any",
-      _Type_variable>>: lambda "vname" $
-        right (common @@ list [
-          inject Shacl._CommonConstraint Shacl._CommonConstraint_node
-            (Sets.fromList (list [
-              inject Shacl._Reference Shacl._Reference_named (nameToIri @@ var "vname")]))])]
-
--- | Construct a Left (InContext Error) error
-err :: TTermDefinition (Context -> String -> Either Error a)
-err = define "err" $
-  doc "Construct an error result with a context and message" $
-  lambda "cx" $ lambda "msg" $
-    left (Error.errorOther $ Error.otherError (var "msg"))
-
--- | Fold over a list, accumulating results and threading context
-foldAccumResult :: TTermDefinition ((Context -> a -> Either Error (b, Context)) -> Context -> [a] -> Either Error ([b], Context))
-foldAccumResult = define "foldAccumResult" $
-  doc "Fold over a list, accumulating results and threading context through each step" $
-  lambda "f" $ lambda "cx" $ lambda "xs" $
-    Maybes.maybe
-      (right (pair (list ([] :: [TTerm b])) (var "cx")))
-      (lambda "p" $
-        Eithers.bind
-          (var "f" @@ var "cx" @@ Pairs.first (var "p"))
-          ("__r" ~> Eithers.map
-            ("__rest" ~> pair
-              (Lists.cons (Pairs.first (var "__r")) (Pairs.first (var "__rest")))
-              (Pairs.second (var "__rest")))
-            (foldAccumResult @@ var "f" @@ (Pairs.second (var "__r")) @@ Pairs.second (var "p"))))
-      (Lists.uncons (var "xs"))
-
--- | Construct a SHACL node shape from a list of common constraints
-node :: TTermDefinition ([Shacl.CommonConstraint] -> Shacl.Shape)
-node = define "node" $
-  doc "Construct a SHACL node shape from a list of common constraints" $
-  lambda "constraints" $
-    inject Shacl._Shape Shacl._Shape_node
-      (record Shacl._NodeShape [Shacl._NodeShape_common>>: common @@ var "constraints"])
-
--- | Construct a default SHACL property shape with a given IRI path
-property :: TTermDefinition (Rdf.Iri -> Shacl.PropertyShape)
-property = define "property" $
-  doc "Construct a default property shape with the given IRI as its path" $
-  lambda "iri" $
-    record Shacl._PropertyShape [
-      Shacl._PropertyShape_common>>: defaultCommonProperties,
-      Shacl._PropertyShape_constraints>>: Sets.empty,
-      Shacl._PropertyShape_defaultValue>>: nothing,
-      Shacl._PropertyShape_description>>: wrap Rdf._LangStrings Maps.empty,
-      Shacl._PropertyShape_name>>: wrap Rdf._LangStrings Maps.empty,
-      Shacl._PropertyShape_order>>: nothing,
-      Shacl._PropertyShape_path>>: var "iri"]
-
--- | Main SHACL coder: encode a module's type elements into a ShapesGraph
-shaclCoder :: TTermDefinition (Module -> Context -> Graph -> Either Error (Shacl.ShapesGraph, Context))
-shaclCoder = define "shaclCoder" $
-  doc "Encode a module's type elements as a SHACL ShapesGraph" $
-  lambda "mod" $ lambda "cx" $ lambda "g" $ lets [
-    "typeEls">: Maybes.cat (Lists.map
-      ("d" ~> cases _Definition (var "d") (Just nothing) [
-        _Definition_type>>: "td" ~>
-          just (Annotations.typeBinding @@ (Packaging.typeDefinitionName $ var "td") @@ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme $ var "td"))])
-      (Packaging.moduleDefinitions (var "mod"))),
-    "toShape">: lambda "el" $
-      Eithers.bind
-        (Eithers.bimap
-          ("__de" ~> Error.errorOther (Error.otherError ((unwrap _DecodingError) @@ var "__de")))
-          ("__t" ~> var "__t")
-          (Phantoms.decoderFor _Type @@ var "g" @@ (Core.bindingTerm (var "el"))))
-        ("__typ" ~> Eithers.map
-          ("__cp" ~> record Shacl._Definition [
-            Shacl._Definition_iri>>: elementIri @@ var "el",
-            Shacl._Definition_target>>: inject Shacl._Shape Shacl._Shape_node
-              (record Shacl._NodeShape [Shacl._NodeShape_common>>: var "__cp"])])
-          (encodeType @@ (Core.bindingName (var "el")) @@ var "__typ" @@ var "cx"))] $
-    Eithers.map
-      ("__shapes" ~> pair
-        (wrap Shacl._ShapesGraph (Sets.fromList (var "__shapes")))
-        (var "cx"))
-      (Eithers.mapList (var "toShape") (var "typeEls"))
-
--- | Construct an 'expected X, found Y' error
-unexpectedE :: TTermDefinition (Context -> String -> String -> Either Error a)
-unexpectedE = define "unexpectedE" $
-  doc "Construct an error for unexpected input, given expected and found descriptions" $
-  lambda "cx" $ lambda "expected" $ lambda "found" $
-    err @@ var "cx" @@ (Strings.cat $ list [
-      string "Expected ",
-      var "expected",
-      string ", found: ",
-      var "found"])
-
--- | Add an rdf:type triple to an RDF Description
-withType :: TTermDefinition (Name -> Rdf.Description -> Rdf.Description)
-withType = define "withType" $
-  doc "Add an rdf:type triple to an RDF Description" $
-  lambda "name" $ lambda "desc" $ lets [
-    "subj">: project Rdf._Description Rdf._Description_subject @@ var "desc",
-    "triples">: unwrap Rdf._Graph @@ (project Rdf._Description Rdf._Description_graph @@ var "desc"),
-    "subjRes">: cases Rdf._Node (var "subj") Nothing [
-      Rdf._Node_iri>>: lambda "iri" $ inject Rdf._Resource Rdf._Resource_iri (var "iri"),
-      Rdf._Node_bnode>>: lambda "bnode" $ inject Rdf._Resource Rdf._Resource_bnode (var "bnode")],
-    "triple">: record Rdf._Triple [
-      Rdf._Triple_subject>>: var "subjRes",
-      Rdf._Triple_predicate>>: rdfIri @@ string "type",
-      Rdf._Triple_object>>: inject Rdf._Node Rdf._Node_iri (nameToIri @@ var "name")]] $
-    record Rdf._Description [
-      Rdf._Description_subject>>: var "subj",
-      Rdf._Description_graph>>: wrap Rdf._Graph (Sets.insert (var "triple") (var "triples"))]
-
-
--- Utility functions referenced by the coder but defined in Rdf.Utils.
--- These are provided as DSL term references to the staging implementations.
-
--- | Convert a Name to an RDF IRI
-nameToIri :: TTerm (Name -> Rdf.Iri)
-nameToIri = TTerm $ TermVariable $ Name "hydra.rdf.utils.nameToIri"
-
--- | Get the next blank node, updating the context
-nextBlankNode :: TTerm (Context -> (Rdf.Resource, Context))
-nextBlankNode = TTerm $ TermVariable $ Name "hydra.rdf.utils.nextBlankNode"
-
--- | Construct triples from a subject, predicate IRI, and list of object nodes
-forObjects :: TTerm (Rdf.Resource -> Rdf.Iri -> [Rdf.Node] -> [Rdf.Triple])
-forObjects = TTerm $ TermVariable $ Name "hydra.rdf.utils.forObjects"
-
--- | Construct an IRI for a record field property
-propertyIri :: TTerm (Name -> Name -> Rdf.Iri)
-propertyIri = TTerm $ TermVariable $ Name "hydra.rdf.utils.propertyIri"
-
--- | Construct an RDF namespace IRI
-rdfIri :: TTerm (String -> Rdf.Iri)
-rdfIri = TTerm $ TermVariable $ Name "hydra.rdf.utils.rdfIri"
-
--- | Convert an RDF Resource to a Node
-resourceToNode :: TTerm (Rdf.Resource -> Rdf.Node)
-resourceToNode = TTerm $ TermVariable $ Name "hydra.rdf.utils.resourceToNode"
-
--- | Extract subject nodes from a list of Descriptions
-subjectsOf :: TTerm ([Rdf.Description] -> [Rdf.Node])
-subjectsOf = TTerm $ TermVariable $ Name "hydra.rdf.utils.subjectsOf"
-
--- | Extract triples from a list of Descriptions
-triplesOf :: TTerm ([Rdf.Description] -> [Rdf.Triple])
-triplesOf = TTerm $ TermVariable $ Name "hydra.rdf.utils.triplesOf"
-
--- | Construct an XSD datatype IRI from a local name
-xmlSchemaDatatypeIri :: TTerm (String -> Rdf.Iri)
-xmlSchemaDatatypeIri = TTerm $ TermVariable $ Name "hydra.rdf.utils.xmlSchemaDatatypeIri"
-
--- | Construct a key IRI from a string
-keyIri :: TTerm (String -> Rdf.Iri)
-keyIri = TTerm $ TermVariable $ Name "hydra.rdf.utils.keyIri"
-
--- | Encode a Hydra Literal as an RDF Literal
-encodeLiteral :: TTerm (Literal -> Rdf.Literal)
-encodeLiteral = TTerm $ TermVariable $ Name "hydra.rdf.utils.encodeLiteral"
diff --git a/src/main/haskell/Hydra/Sources/Shacl/Language.hs b/src/main/haskell/Hydra/Sources/Shacl/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Shacl/Language.hs
+++ /dev/null
@@ -1,137 +0,0 @@
-module Hydra.Sources.Shacl.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.shacl.language"),
-            moduleDefinitions = [toDefinition shaclLanguage],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for W3C SHACL"}
-shaclLanguage :: TTermDefinition Language
-shaclLanguage = define "shaclLanguage" $
-  doc "Language constraints for W3C SHACL" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat32,
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeInt32,
-    Core.integerTypeInt64],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantWrap,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord,
-    Variants.termVariantSet,
-    Variants.termVariantInject],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantAnnotated,
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantWrap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord,
-    Variants.typeVariantSet,
-    Variants.typeVariantUnion],
-  "typePredicate">: constant true] $
-  Coders.language
-    (Coders.languageName_ $ string "hydra.shacl")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
diff --git a/src/main/haskell/Hydra/Sources/Shacl/Model.hs b/src/main/haskell/Hydra/Sources/Shacl/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Shacl/Model.hs
+++ /dev/null
@@ -1,319 +0,0 @@
-module Hydra.Sources.Shacl.Model where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:), (@@))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
--- Additional imports
-import qualified Hydra.Sources.Rdf.Syntax    as RdfSyntax
-
-
-ns :: Namespace
-ns = Namespace "hydra.shacl.model"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-shacl :: String -> Type
-shacl = typeref ns
-
-rdf :: String -> Type
-rdf = typeref $ RdfSyntax.ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [RdfSyntax.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A SHACL syntax model. See https://www.w3.org/TR/shacl"}
-  where
-    definitions = [
-      closed,
-      commonConstraint,
-      commonProperties,
-      definition,
-      nodeKind,
-      nodeShape,
-      pattern_,
-      propertyShape,
-      propertyShapeConstraint,
-      qualifiedValueShape,
-      reference,
-      severity,
-      shape,
-      shapesGraph]
-
-closed :: Binding
-closed = define "Closed" $
-  see "https://www.w3.org/TR/shacl/#ClosedPatterConstraintComponent" $
-  T.record [
-    "isClosed">: T.boolean,
-    "ignoredProperties">: T.optional $ T.set $ rdf "Property"]
-
-commonConstraint :: Binding
-commonConstraint = define "CommonConstraint" $
-  doc "Any of a number of constraint parameters which can be applied either to node or property shapes" $
-  T.union [
-    "and">:
-      see "https://www.w3.org/TR/shacl/#AndConstraintComponent" $
-      T.set $ shacl "Reference" @@ shacl "Shape",
-
-    "closed">:
-      see "https://www.w3.org/TR/shacl/#ClosedConstraintComponent" $
-      shacl "Closed",
-
-    "class">:
-      see "https://www.w3.org/TR/shacl/#ClassConstraintComponent" $
-      T.set $ rdf "RdfsClass",
-
-    "datatype">:
-      see "https://www.w3.org/TR/shacl/#DatatypeConstraintComponent" $
-      rdf "Iri",
-
-    "disjoint">:
-      see "https://www.w3.org/TR/shacl/#DisjointConstraintComponent" $
-      T.set $ rdf "Property",
-
-    "equals">:
-      see "https://www.w3.org/TR/shacl/#EqualsConstraintComponent" $
-      T.set $ rdf "Property",
-
-    "hasValue">:
-      doc ("Specifies the condition that at least one value node is equal to the given RDF term. " ++
-           "See https://www.w3.org/TR/shacl/#HasValueConstraintComponent") $
-      T.set $ rdf "Node",
-
-    "in">:
-      doc ("Specifies the condition that each value node is a member of a provided SHACL list. " ++
-           "See https://www.w3.org/TR/shacl/#InConstraintComponent") $
-      T.list $ rdf "Node",
-
-    "languageIn">:
-      see "https://www.w3.org/TR/shacl/#LanguageInConstraintComponent" $
-      T.set $ rdf "LanguageTag",
-
-    "nodeKind">:
-      see "https://www.w3.org/TR/shacl/#NodeKindConstraintComponent" $
-      shacl "NodeKind",
-
-    "node">:
-      see "https://www.w3.org/TR/shacl/#NodeConstraintComponent" $
-      T.set $ shacl "Reference" @@ shacl "NodeShape",
-
-    "not">:
-      see "https://www.w3.org/TR/shacl/#NotConstraintComponent" $
-      T.set $ shacl "Reference" @@ shacl "Shape",
-
-    "maxExclusive">:
-      see "https://www.w3.org/TR/shacl/#MaxExclusiveConstraintComponent" $
-      rdf "Literal",
-
-    "maxInclusive">:
-      see "https://www.w3.org/TR/shacl/#MaxInclusiveConstraintComponent" $
-      rdf "Literal",
-
-    "maxLength">:
-      see "https://www.w3.org/TR/shacl/#MaxLengthConstraintComponent" $
-      T.bigint,
-
-    "minExclusive">:
-      see "https://www.w3.org/TR/shacl/#MinExclusiveConstraintComponent" $
-      rdf "Literal",
-
-    "minInclusive">:
-      see "https://www.w3.org/TR/shacl/#MinInclusiveConstraintComponent" $
-      rdf "Literal",
-
-    "minLength">:
-      see "https://www.w3.org/TR/shacl/#MinLengthConstraintComponent" $
-      T.bigint,
-
-    "pattern">:
-      see "https://www.w3.org/TR/shacl/#PatternConstraintComponent" $
-      shacl "Pattern",
-
-    "property">:
-      see "https://www.w3.org/TR/shacl/#PropertyConstraintComponent" $
-      T.set $ shacl "Reference" @@ shacl "PropertyShape",
-
-    "or">:
-      see "https://www.w3.org/TR/shacl/#OrConstraintComponent" $
-      T.set $ shacl "Reference" @@ shacl "Shape",
-
-    "xone">:
-      see "https://www.w3.org/TR/shacl/#XoneConstraintComponent" $
-      T.set $ shacl "Reference" @@ shacl "Shape"]
-
-commonProperties :: Binding
-commonProperties = define "CommonProperties" $
-  doc "Common constraint parameters and other properties for SHACL shapes" $
-  T.record [
-    "constraints">:
-      doc "Common constraint parameters attached to this shape"
-      $ T.set $ shacl "CommonConstraint",
-
-    "deactivated">:
-      see "https://www.w3.org/TR/shacl/#deactivated" $
-      T.optional T.boolean,
-
-    "message">:
-      see "https://www.w3.org/TR/shacl/#message" $
-      rdf "LangStrings",
-
-    "severity">:
-      see "https://www.w3.org/TR/shacl/#severity" $
-      shacl "Severity",
-
-    "targetClass">:
-      see "https://www.w3.org/TR/shacl/#targetClass" $
-      T.set $ rdf "RdfsClass",
-
-    "targetNode">:
-      see "https://www.w3.org/TR/shacl/#targetNode" $
-      T.set $ rdf "IriOrLiteral",
-
-    "targetObjectsOf">:
-      see "https://www.w3.org/TR/shacl/#targetObjectsOf" $
-      T.set $ rdf "Property",
-
-    "targetSubjectsOf">:
-      see "https://www.w3.org/TR/shacl/#targetSubjectsOf" $
-      T.set $ rdf "Property"]
-
-definition :: Binding
-definition = define "Definition" $
-  doc "An instance of a type like sh:Shape or sh:NodeShape, together with a unique IRI for that instance" $
-  T.forAll "a" $ T.record [
-    "iri">: rdf "Iri",
-    "target">: "a"]
-
-nodeKind :: Binding
-nodeKind = define "NodeKind" $ T.union [
-  "blankNode">: doc "A blank node" T.unit,
-  "iri">: doc "An IRI" T.unit,
-  "literal">: doc "A literal" T.unit,
-  "blankNodeOrIri">: doc "A blank node or an IRI" T.unit,
-  "blankNodeOrLiteral">: doc "A blank node or a literal" T.unit,
-  "iriOrLiteral">: doc "An IRI or a literal" T.unit]
-
-nodeShape :: Binding
-nodeShape = define "NodeShape" $
-  doc "A SHACL node shape. See https://www.w3.org/TR/shacl/#node-shapes" $
-  T.record [
-    "common">: shacl "CommonProperties"]
-
-pattern_ :: Binding
-pattern_ = define "Pattern" $
-  doc "A SHACL pattern. See https://www.w3.org/TR/shacl/#PatternConstraintComponent" $
-  T.record [
-    "regex">: T.string,
-    "flags">: T.optional T.string]
-
-propertyShape :: Binding
-propertyShape = define "PropertyShape" $
-  doc "A SHACL property shape. See https://www.w3.org/TR/shacl/#property-shapes" $
-  T.record [
-    "common">: shacl "CommonProperties",
-
-    "constraints">:
-      doc "Any property shape -specific constraint parameters" $
-      T.set $ shacl "PropertyShapeConstraint",
-
-    "defaultValue">:
-      see "https://www.w3.org/TR/shacl/#defaultValue" $
-      T.optional $ rdf "Node",
-
-    "description">:
-      see "https://www.w3.org/TR/shacl/#name" $
-      rdf "LangStrings",
-
-    "name">:
-      see "https://www.w3.org/TR/shacl/#name" $
-      rdf "LangStrings",
-
-    "order">:
-      see "https://www.w3.org/TR/shacl/#order" $
-      T.optional T.bigint,
-
-    "path">: rdf "Iri"]
-    -- Note: sh:group is omitted for now, for lack of a clear definition of PropertyGroup
-
-propertyShapeConstraint :: Binding
-propertyShapeConstraint = define "PropertyShapeConstraint" $
-  doc "A number of constraint parameters which are specific to property shapes, and cannot be applied to node shapes" $
-  T.union [
-
-    "lessThan">:
-      see "https://www.w3.org/TR/shacl/#LessThanConstraintComponent" $
-      T.set $ rdf "Property",
-
-    "lessThanOrEquals">:
-      see "https://www.w3.org/TR/shacl/#LessThanOrEqualsConstraintComponent" $
-      T.set $ rdf "Property",
-
-    "maxCount">:
-      doc ("The maximum cardinality. Node shapes cannot have any value for sh:maxCount. " ++
-           "See https://www.w3.org/TR/shacl/#MaxCountConstraintComponent") $
-      T.bigint,
-
-    "minCount">:
-      doc ("The minimum cardinality. Node shapes cannot have any value for sh:minCount. " ++
-           "See https://www.w3.org/TR/shacl/#MinCountConstraintComponent") $
-      T.bigint,
-
-    "uniqueLang">:
-      see "https://www.w3.org/TR/shacl/#UniqueLangConstraintComponent" $
-      T.boolean,
-
-    "qualifiedValueShape">:
-      see "https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent" $
-      shacl "QualifiedValueShape"]
-
-qualifiedValueShape :: Binding
-qualifiedValueShape = define "QualifiedValueShape" $
-  see "https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent" $
-  T.record [
-    "qualifiedValueShape">: shacl "Reference" @@ shacl "Shape",
-    "qualifiedMaxCount">: T.bigint,
-    "qualifiedMinCount">: T.bigint,
-    "qualifiedValueShapesDisjoint">: T.optional T.boolean]
-
-reference :: Binding
-reference = define "Reference" $
-  doc "Either an instance of a type like sh:Shape or sh:NodeShape, or an IRI which refers to an instance of that type" $
-  T.forAll "a" $ T.union [
-    "named">: rdf "Iri",
-    "anonymous">:
-      doc "An anonymous instance"
-      "a",
-    "definition">:
-      doc "An inline definition" $
-      shacl "Definition" @@ "a"]
-
-severity :: Binding
-severity = define "Severity" $ T.union [
-  "info">: doc "A non-critical constraint violation indicating an informative message" T.unit,
-  "warning">: doc "A non-critical constraint violation indicating a warning" T.unit,
-  "violation">: doc "A constraint violation" T.unit]
-
-shape :: Binding
-shape = define "Shape" $
-  doc "A SHACL node or property shape. See https://www.w3.org/TR/shacl/#shapes" $
-  T.union [
-    "node">: shacl "NodeShape",
-    "property">: shacl "PropertyShape"]
-
-shapesGraph :: Binding
-shapesGraph = define "ShapesGraph" $
-  doc ("An RDF graph containing zero or more shapes that is passed into a SHACL validation process " ++
-       "so that a data graph can be validated against the shapes") $
-  T.wrap $ T.set $ shacl "Definition" @@ shacl "Shape"
diff --git a/src/main/haskell/Hydra/Sources/Shex/Syntax.hs b/src/main/haskell/Hydra/Sources/Shex/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Shex/Syntax.hs
+++ /dev/null
@@ -1,1048 +0,0 @@
-module Hydra.Sources.Shex.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-
-
-ns :: Namespace
-ns = Namespace "hydra.shex.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-shex :: String -> Type
-shex = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("A Shex model. Based on the BNF at:\n" ++
-        "  https://github.com/shexSpec/grammar/blob/master/bnf")}
-  where
-    definitions = [
-      shexDoc,
-      shexDoc_Sequence_Option,
-      shexDoc_Sequence_Option_Alts,
-      directive,
-      baseDecl,
-      prefixDecl,
-      notStartAction,
-      notStartAction_ShapeExprDecl,
-      notStartAction_ShapeExprDecl_Alts,
-      startActions,
-      statement,
-      shapeExpression,
-      inlineShapeExpression,
-      shapeOr,
-      inlineShapeOr,
-      shapeAnd,
-      inlineShapeAnd,
-      shapeNot,
-      inlineShapeNot,
-      shapeAtom,
-      shapeAtom_Sequence,
-      inlineShapeAtom,
-      inlineShapeAtom_Sequence,
-      inlineShapeAtom_Sequence2,
-      shapeOrRef,
-      inlineShapeOrRef,
-      nodeConstraint,
-      nodeConstraint_Sequence2,
-      nodeConstraint_Sequence3,
-      nodeConstraint_Sequence4,
-      nodeConstraint_Sequence5,
-      nonLiteralKind,
-      xsFacet,
-      stringFacet,
-      stringFacet_Sequence,
-      stringLength,
-      numericFacet,
-      numericFacet_Sequence,
-      numericFacet_Sequence2,
-      numericRange,
-      numericLength,
-      shapeDefinition,
-      shapeDefinition_ListOfAlts_Elmt,
-      inlineShapeDefinition,
-      inlineShapeDefinition_ListOfAlts_Elmt,
-      extraPropertySet,
-      tripleExpression,
-      oneOfTripleExpr,
-      multiElementOneOf,
-      innerTripleExpr,
-      groupTripleExpr,
-      singleElementGroup,
-      multiElementGroup,
-      unaryTripleExpr,
-      unaryTripleExpr_Sequence,
-      unaryTripleExpr_Sequence_Alts,
-      bracketedTripleExpr,
-      tripleConstraint,
-      cardinality,
-      senseFlags,
-      valueSet,
-      valueSetValue,
-      iriRange,
-      iriRange_Sequence,
-      exclusion,
-      include,
-      annotation,
-      annotation_Alts,
-      semanticActions,
-      codeDecl,
-      codeDecl_Alts,
-      literal,
-      predicate,
-      datatype_,
-      shapeExprLabel,
-      tripleExprLabel,
-      numericLiteral,
-      rdfLiteral,
-      rdfLiteral_Alts_Option,
-      booleanLiteral,
-      string_,
-      iri,
-      prefixedName,
-      blankNode,
-      includeSet,
-      code,
-      code_Elmt,
-      repeatRange,
-      repeatRange_Sequence_Option_Option_Option,
-      rdfType,
-      iriRef,
-      iriRef_Elmt,
-      pnameNs,
-      pnameLn,
-      atpNameNs,
-      atpNameLn,
-      regexp,
-      regexp_ListOfAlts_Elmt,
-      blankNodeLabel,
-      blankNodeLabel_Alts,
-      blankNodeLabel_ListOfAlts_Option_Elmt,
-      langTag,
-      integer_,
-      decimal,
-      double_,
-      stringLiteral1,
-      stringLiteral1_Elmt,
-      stringLiteral2,
-      stringLiteral2_Elmt,
-      stringLiteralLong1,
-      stringLiteralLong1_Elmt,
-      stringLiteralLong1_Elmt_Sequence,
-      stringLiteralLong1_Elmt_Sequence_Alts_Option,
-      stringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence,
-      stringLiteralLong2,
-      stringLiteralLong2_Elmt,
-      stringLiteralLong2_Elmt_Sequence,
-      stringLiteralLong2_Elmt_Sequence_Alts_Option,
-      stringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence,
-      uchar,
-      uchar_Sequence,
-      uchar_Sequence2,
-      echar,
-      pnCharsBase,
-      pnCharsU,
-      pnChars,
-      pnPrefix,
-      pnPrefix_Sequence_Option,
-      pnPrefix_Sequence_Option_Alts,
-      pnLocal,
-      pnLocal_Alts,
-      pnLocal_Sequence_Option,
-      pnLocal_Sequence_Option_ListOfAlts_Elmt,
-      pnLocal_Sequence_Option_Alts,
-      plx,
-      percent,
-      hex,
-      pnLocalEsc]
-
--- [1] ShexDoc ::= Directive* ((NotStartAction | StartActions) Statement*)?
-shexDoc :: Binding
-shexDoc = define "ShexDoc" $
-  T.record [
-    "listOfDirective">: T.list (shex "Directive"),
-    "Sequence">: T.maybe (shex "ShexDoc_Sequence_Option"),
-    "PrefixDecl">: shex "PrefixDecl"]
-
-shexDoc_Sequence_Option :: Binding
-shexDoc_Sequence_Option = define "ShexDoc_Sequence_Option" $
-  T.record [
-    "alts">: shex "ShexDoc_Sequence_Option_Alts",
-    "listOfStatement">: T.list (shex "Statement")]
-
-shexDoc_Sequence_Option_Alts :: Binding
-shexDoc_Sequence_Option_Alts = define "ShexDoc_Sequence_Option_Alts" $
-  T.union [
-    "NotStartAction">: shex "NotStartAction",
-    "StartActions">: shex "StartActions"]
-
--- [2] Directive ::= BaseDecl | PrefixDecl
-directive :: Binding
-directive = define "Directive" $
-  T.union [
-    "BaseDecl">: shex "BaseDecl",
-    "PrefixDecl">: shex "PrefixDecl"]
-
--- [3] BaseDecl ::= "BASE" IriRef
-baseDecl :: Binding
-baseDecl = define "BaseDecl" $ T.wrap $ shex "IriRef"
-
--- [4] PrefixDecl ::= "PREFIX" PnameNs IriRef
-prefixDecl :: Binding
-prefixDecl = define "PrefixDecl" $
-  T.record [
-    "PnameNs">: shex "PnameNs",
-    "IriRef">: shex "IriRef"]
-
--- [5] NotStartAction ::= start | shapeExprDecl
-notStartAction :: Binding
-notStartAction = define "NotStartAction" $
-  T.union [
-    "start">: shex "ShapeExpression",
-    "shapeExprDecl">: shex "NotStartAction_ShapeExprDecl"]
-
-notStartAction_ShapeExprDecl :: Binding
-notStartAction_ShapeExprDecl = define "NotStartAction_ShapeExprDecl" $
-  T.record [
-    "ShapeExprLabel">: shex "ShapeExprLabel",
-    "alts">: shex "NotStartAction_ShapeExprDecl_Alts"]
-
-notStartAction_ShapeExprDecl_Alts :: Binding
-notStartAction_ShapeExprDecl_Alts = define "NotStartAction_ShapeExprDecl_Alts" $
-  T.union [
-    "ShapeExpression">: shex "ShapeExpression",
-    "EXTERNAL">: T.unit]
-
--- [7] StartActions ::= CodeDecl+
-startActions :: Binding
-startActions = define "StartActions" $ T.wrap $ T.list $ shex "CodeDecl"
-
--- [8] Statement ::= Directive | NotStartAction
-statement :: Binding
-statement = define "Statement" $
-  T.union [
-    "Directive">: shex "Directive",
-    "NotStartAction">: shex "NotStartAction"]
-
--- [10] ShapeExpression ::= ShapeOr
-shapeExpression :: Binding
-shapeExpression = define "ShapeExpression" $ T.wrap $ shex "ShapeOr"
-
--- [11] InlineShapeExpression ::= InlineShapeOr
-inlineShapeExpression :: Binding
-inlineShapeExpression = define "InlineShapeExpression" $ T.wrap $ shex "InlineShapeOr"
-
--- [12] ShapeOr ::= ShapeAnd ("OR" ShapeAnd)*
-shapeOr :: Binding
-shapeOr = define "ShapeOr" $
-  T.record [
-    "ShapeAnd">: shex "ShapeAnd",
-    "listOfSequence">: T.list (shex "ShapeAnd")]
-
--- [13] InlineShapeOr ::= InlineShapeAnd ("OR" InlineShapeAnd)*
-inlineShapeOr :: Binding
-inlineShapeOr = define "InlineShapeOr" $
-  T.record [
-    "ShapeAnd">: shex "ShapeAnd",
-    "listOfSequence">: T.list (shex "InlineShapeAnd")]
-
--- [14] ShapeAnd ::= ShapeNot ("AND" ShapeNot)*
-shapeAnd :: Binding
-shapeAnd = define "ShapeAnd" $
-  T.record [
-    "ShapeNot">: shex "ShapeNot",
-    "listOfSequence">: T.list (shex "ShapeNot")]
-
--- [15] InlineShapeAnd ::= InlineShapeNot ("AND" InlineShapeNot)*
-inlineShapeAnd :: Binding
-inlineShapeAnd = define "InlineShapeAnd" $
-  T.record [
-    "InlineShapeNot">: shex "InlineShapeNot",
-    "listOfSequence">: T.list (shex "InlineShapeNot")]
-
--- [16] ShapeNot ::= "NOT"? ShapeAtom
-shapeNot :: Binding
-shapeNot = define "ShapeNot" $
-  T.record [
-    "NOT">: T.maybe T.unit,
-    "ShapeAtom">: shex "ShapeAtom"]
-
--- [17] InlineShapeNot ::= "NOT"? InlineShapeAtom
-inlineShapeNot :: Binding
-inlineShapeNot = define "InlineShapeNot" $
-  T.record [
-    "NOT">: T.maybe T.unit,
-    "InlineShapeAtom">: shex "InlineShapeAtom"]
-
--- [18] ShapeAtom
-shapeAtom :: Binding
-shapeAtom = define "ShapeAtom" $
-  T.union [
-    "sequence">: shex "ShapeAtom_Sequence",
-    "ShapeOrRef">: shex "ShapeOrRef",
-    "sequence2">: shex "ShapeExpression",
-    "Period">: T.unit]
-
-shapeAtom_Sequence :: Binding
-shapeAtom_Sequence = define "ShapeAtom_Sequence" $
-  T.record [
-    "NodeConstraint">: shex "NodeConstraint",
-    "ShapeOrRef">: T.maybe (shex "ShapeOrRef")]
-
--- [19] InlineShapeAtom
-inlineShapeAtom :: Binding
-inlineShapeAtom = define "InlineShapeAtom" $
-  T.union [
-    "sequence">: shex "InlineShapeAtom_Sequence",
-    "sequence2">: shex "InlineShapeAtom_Sequence2",
-    "sequence3">: shex "ShapeExpression",
-    "Period">: T.unit]
-
-inlineShapeAtom_Sequence :: Binding
-inlineShapeAtom_Sequence = define "InlineShapeAtom_Sequence" $
-  T.record [
-    "NodeConstraint">: shex "NodeConstraint",
-    "InlineShapeOrRef">: T.maybe (shex "InlineShapeOrRef")]
-
-inlineShapeAtom_Sequence2 :: Binding
-inlineShapeAtom_Sequence2 = define "InlineShapeAtom_Sequence2" $
-  T.record [
-    "InlineShapeOrRef">: shex "InlineShapeOrRef",
-    "NodeConstraint">: T.maybe (shex "NodeConstraint")]
-
--- [20] ShapeOrRef
-shapeOrRef :: Binding
-shapeOrRef = define "ShapeOrRef" $
-  T.union [
-    "ShapeDefinition">: shex "ShapeDefinition",
-    "AtpNameLn">: shex "AtpNameLn",
-    "AtpNameNs">: shex "AtpNameNs",
-    "sequence">: shex "ShapeExprLabel"]
-
--- [21] InlineShapeOrRef
-inlineShapeOrRef :: Binding
-inlineShapeOrRef = define "InlineShapeOrRef" $
-  T.union [
-    "InlineShapeDefinition">: shex "InlineShapeDefinition",
-    "AtpNameLn">: shex "AtpNameLn",
-    "AtpNameNs">: shex "AtpNameNs",
-    "sequence">: shex "ShapeExprLabel"]
-
--- [22] NodeConstraint
-nodeConstraint :: Binding
-nodeConstraint = define "NodeConstraint" $
-  T.union [
-    "sequence">: T.list (shex "XsFacet"),
-    "sequence2">: shex "NodeConstraint_Sequence2",
-    "sequence3">: shex "NodeConstraint_Sequence3",
-    "sequence4">: shex "NodeConstraint_Sequence4",
-    "sequence5">: shex "NodeConstraint_Sequence5",
-    "listOfXsFacet">: T.list (shex "XsFacet")]
-
-nodeConstraint_Sequence2 :: Binding
-nodeConstraint_Sequence2 = define "NodeConstraint_Sequence2" $
-  T.record [
-    "NonLiteralKind">: shex "NonLiteralKind",
-    "listOfStringFacet">: T.list (shex "StringFacet")]
-
-nodeConstraint_Sequence3 :: Binding
-nodeConstraint_Sequence3 = define "NodeConstraint_Sequence3" $
-  T.record [
-    "Datatype">: shex "Datatype",
-    "listOfXsFacet">: T.list (shex "XsFacet")]
-
-nodeConstraint_Sequence4 :: Binding
-nodeConstraint_Sequence4 = define "NodeConstraint_Sequence4" $
-  T.record [
-    "ValueSet">: shex "ValueSet",
-    "listOfXsFacet">: T.list (shex "XsFacet")]
-
-nodeConstraint_Sequence5 :: Binding
-nodeConstraint_Sequence5 = define "NodeConstraint_Sequence5" $
-  T.record [
-    "ValueSet">: shex "ValueSet",
-    "listOfXsFacet">: T.list (shex "XsFacet")]
-
--- [23] NonLiteralKind ::= "IRI" | "BNODE" | "NONLITERAL"
-nonLiteralKind :: Binding
-nonLiteralKind = define "NonLiteralKind" $
-  T.union [
-    "IRI">: T.unit,
-    "BNODE">: T.unit,
-    "NONLITERAL">: T.unit]
-
--- [24] XsFacet ::= StringFacet | NumericFacet
-xsFacet :: Binding
-xsFacet = define "XsFacet" $
-  T.union [
-    "StringFacet">: shex "StringFacet",
-    "NumericFacet">: shex "NumericFacet"]
-
--- [25] StringFacet ::= StringLength Integer | Regexp
-stringFacet :: Binding
-stringFacet = define "StringFacet" $
-  T.union [
-    "sequence">: shex "StringFacet_Sequence",
-    "Regexp">: shex "Regexp"]
-
-stringFacet_Sequence :: Binding
-stringFacet_Sequence = define "StringFacet_Sequence" $
-  T.record [
-    "StringLength">: shex "StringLength",
-    "Integer">: shex "Integer"]
-
--- [26] StringLength ::= "LENGTH" | "MINLENGTH" | "MAXLENGTH"
-stringLength :: Binding
-stringLength = define "StringLength" $
-  T.union [
-    "LENGTH">: T.unit,
-    "MINLENGTH">: T.unit,
-    "MAXLENGTH">: T.unit]
-
--- [27] NumericFacet
-numericFacet :: Binding
-numericFacet = define "NumericFacet" $
-  T.union [
-    "sequence">: shex "NumericFacet_Sequence",
-    "sequence2">: shex "NumericFacet_Sequence2"]
-
-numericFacet_Sequence :: Binding
-numericFacet_Sequence = define "NumericFacet_Sequence" $
-  T.record [
-    "NumericRange">: shex "NumericRange",
-    "NumericLiteral">: shex "NumericLiteral"]
-
-numericFacet_Sequence2 :: Binding
-numericFacet_Sequence2 = define "NumericFacet_Sequence2" $
-  T.record [
-    "NumericLength">: shex "NumericLength",
-    "Integer">: shex "Integer"]
-
--- [28] NumericRange
-numericRange :: Binding
-numericRange = define "NumericRange" $
-  T.union [
-    "MININCLUSIVE">: T.unit,
-    "MINEXCLUSIVE">: T.unit,
-    "MAXINCLUSIVE">: T.unit,
-    "MAXEXCLUSIVE">: T.unit]
-
--- [29] NumericLength
-numericLength :: Binding
-numericLength = define "NumericLength" $
-  T.union [
-    "TOTALDIGITS">: T.unit,
-    "FRACTIONDIGITS">: T.unit]
-
--- [30] ShapeDefinition
-shapeDefinition :: Binding
-shapeDefinition = define "ShapeDefinition" $
-  T.record [
-    "listOfAlts">: T.list (shex "ShapeDefinition_ListOfAlts_Elmt"),
-    "TripleExpression">: T.maybe (shex "TripleExpression"),
-    "listOfAnnotation">: T.list (shex "Annotation"),
-    "SemanticActions">: shex "SemanticActions"]
-
-shapeDefinition_ListOfAlts_Elmt :: Binding
-shapeDefinition_ListOfAlts_Elmt = define "ShapeDefinition_ListOfAlts_Elmt" $
-  T.union [
-    "IncludeSet">: shex "IncludeSet",
-    "ExtraPropertySet">: shex "ExtraPropertySet",
-    "CLOSED">: T.unit]
-
--- [31] InlineShapeDefinition
-inlineShapeDefinition :: Binding
-inlineShapeDefinition = define "InlineShapeDefinition" $
-  T.record [
-    "listOfAlts">: T.list (shex "InlineShapeDefinition_ListOfAlts_Elmt"),
-    "TripleExpression">: T.maybe (shex "TripleExpression")]
-
-inlineShapeDefinition_ListOfAlts_Elmt :: Binding
-inlineShapeDefinition_ListOfAlts_Elmt = define "InlineShapeDefinition_ListOfAlts_Elmt" $
-  T.union [
-    "IncludeSet">: shex "IncludeSet",
-    "ExtraPropertySet">: shex "ExtraPropertySet",
-    "CLOSED">: T.unit]
-
--- [32] ExtraPropertySet ::= "EXTRA" Predicate+
-extraPropertySet :: Binding
-extraPropertySet = define "ExtraPropertySet" $ T.wrap $ T.list $ shex "Predicate"
-
--- [33] TripleExpression ::= OneOfTripleExpr
-tripleExpression :: Binding
-tripleExpression = define "TripleExpression" $ T.wrap $ shex "OneOfTripleExpr"
-
--- [34] OneOfTripleExpr ::= GroupTripleExpr | MultiElementOneOf
-oneOfTripleExpr :: Binding
-oneOfTripleExpr = define "OneOfTripleExpr" $
-  T.union [
-    "GroupTripleExpr">: shex "GroupTripleExpr",
-    "MultiElementOneOf">: shex "MultiElementOneOf"]
-
--- [35] MultiElementOneOf ::= GroupTripleExpr ('|' GroupTripleExpr)+
-multiElementOneOf :: Binding
-multiElementOneOf = define "MultiElementOneOf" $
-  T.record [
-    "GroupTripleExpr">: shex "GroupTripleExpr",
-    "listOfSequence">: T.list (shex "GroupTripleExpr")]
-
--- [36] InnerTripleExpr ::= MultiElementGroup | MultiElementOneOf
-innerTripleExpr :: Binding
-innerTripleExpr = define "InnerTripleExpr" $
-  T.union [
-    "MultiElementGroup">: shex "MultiElementGroup",
-    "MultiElementOneOf">: shex "MultiElementOneOf"]
-
--- [37] GroupTripleExpr ::= SingleElementGroup | MultiElementGroup
-groupTripleExpr :: Binding
-groupTripleExpr = define "GroupTripleExpr" $
-  T.union [
-    "SingleElementGroup">: shex "SingleElementGroup",
-    "MultiElementGroup">: shex "MultiElementGroup"]
-
--- [38] SingleElementGroup ::= UnaryTripleExpr ';'?
-singleElementGroup :: Binding
-singleElementGroup = define "SingleElementGroup" $
-  T.record [
-    "UnaryTripleExpr">: shex "UnaryTripleExpr",
-    "Semi">: T.maybe T.unit]
-
--- [39] MultiElementGroup ::= UnaryTripleExpr (';' UnaryTripleExpr)+ ';'?
-multiElementGroup :: Binding
-multiElementGroup = define "MultiElementGroup" $
-  T.record [
-    "UnaryTripleExpr">: shex "UnaryTripleExpr",
-    "listOfSequence">: T.list (shex "UnaryTripleExpr"),
-    "Semi">: T.maybe T.unit]
-
--- [40] UnaryTripleExpr
-unaryTripleExpr :: Binding
-unaryTripleExpr = define "UnaryTripleExpr" $
-  T.union [
-    "sequence">: shex "UnaryTripleExpr_Sequence",
-    "Include">: shex "Include"]
-
-unaryTripleExpr_Sequence :: Binding
-unaryTripleExpr_Sequence = define "UnaryTripleExpr_Sequence" $
-  T.record [
-    "Sequence">: T.maybe (shex "TripleExprLabel"),
-    "alts">: shex "UnaryTripleExpr_Sequence_Alts"]
-
-unaryTripleExpr_Sequence_Alts :: Binding
-unaryTripleExpr_Sequence_Alts = define "UnaryTripleExpr_Sequence_Alts" $
-  T.union [
-    "TripleConstraint">: shex "TripleConstraint",
-    "BracketedTripleExpr">: shex "BracketedTripleExpr"]
-
--- [41] BracketedTripleExpr
-bracketedTripleExpr :: Binding
-bracketedTripleExpr = define "BracketedTripleExpr" $
-  T.record [
-    "InnerTripleExpr">: shex "InnerTripleExpr",
-    "Cardinality">: T.maybe (shex "Cardinality"),
-    "listOfAnnotation">: T.list (shex "Annotation"),
-    "SemanticActions">: shex "SemanticActions"]
-
--- [43] TripleConstraint
-tripleConstraint :: Binding
-tripleConstraint = define "TripleConstraint" $
-  T.record [
-    "SenseFlags">: T.maybe (shex "SenseFlags"),
-    "Predicate">: shex "Predicate",
-    "InlineShapeExpression">: shex "InlineShapeExpression",
-    "Cardinality">: T.maybe (shex "Cardinality"),
-    "listOfAnnotation">: T.list (shex "Annotation"),
-    "SemanticActions">: shex "SemanticActions"]
-
--- [44] Cardinality ::= '*' | '+' | '?' | RepeatRange
-cardinality :: Binding
-cardinality = define "Cardinality" $
-  T.union [
-    "Ast">: T.unit,
-    "Plus">: T.unit,
-    "Quest">: T.unit,
-    "RepeatRange">: shex "RepeatRange"]
-
--- [45] SenseFlags ::= '^'
-senseFlags :: Binding
-senseFlags = define "SenseFlags" $ T.wrap T.unit
-
--- [46] ValueSet ::= '[' ValueSetValue* ']'
-valueSet :: Binding
-valueSet = define "ValueSet" $ T.wrap $ T.list $ shex "ValueSetValue"
-
--- [47] ValueSetValue ::= IriRange | Literal
-valueSetValue :: Binding
-valueSetValue = define "ValueSetValue" $
-  T.union [
-    "IriRange">: shex "IriRange",
-    "Literal">: shex "Literal"]
-
--- [48] IriRange
-iriRange :: Binding
-iriRange = define "IriRange" $
-  T.union [
-    "sequence">: shex "IriRange_Sequence",
-    "sequence2">: T.list (shex "Exclusion")]
-
-iriRange_Sequence :: Binding
-iriRange_Sequence = define "IriRange_Sequence" $
-  T.record [
-    "Iri">: shex "Iri",
-    "Sequence">: T.maybe (T.list (shex "Exclusion"))]
-
--- [49] Exclusion ::= '-' Iri '~'?
-exclusion :: Binding
-exclusion = define "Exclusion" $ T.wrap $ shex "Iri"
-
--- [50] Include ::= '&' TripleExprLabel
-include :: Binding
-include = define "Include" $ T.wrap $ shex "TripleExprLabel"
-
--- [51] Annotation ::= '//' Predicate (Iri | Literal)
-annotation :: Binding
-annotation = define "Annotation" $
-  T.record [
-    "Predicate">: shex "Predicate",
-    "alts">: shex "Annotation_Alts"]
-
-annotation_Alts :: Binding
-annotation_Alts = define "Annotation_Alts" $
-  T.union [
-    "Iri">: shex "Iri",
-    "Literal">: shex "Literal"]
-
--- [52] SemanticActions ::= CodeDecl*
-semanticActions :: Binding
-semanticActions = define "SemanticActions" $ T.wrap $ T.list $ shex "CodeDecl"
-
--- [53] CodeDecl ::= '%' Iri (Code | "%")
-codeDecl :: Binding
-codeDecl = define "CodeDecl" $
-  T.record [
-    "Iri">: shex "Iri",
-    "alts">: shex "CodeDecl_Alts"]
-
-codeDecl_Alts :: Binding
-codeDecl_Alts = define "CodeDecl_Alts" $
-  T.union [
-    "Code">: shex "Code",
-    "Percnt">: T.unit]
-
--- [13t] Literal ::= RdfLiteral | NumericLiteral | BooleanLiteral
-literal :: Binding
-literal = define "Literal" $
-  T.union [
-    "RdfLiteral">: shex "RdfLiteral",
-    "NumericLiteral">: shex "NumericLiteral",
-    "BooleanLiteral">: shex "BooleanLiteral"]
-
--- [54] Predicate ::= Iri | RdfType
-predicate :: Binding
-predicate = define "Predicate" $
-  T.union [
-    "Iri">: shex "Iri",
-    "RdfType">: shex "RdfType"]
-
--- [55] Datatype ::= Iri
-datatype_ :: Binding
-datatype_ = define "Datatype" $ T.wrap $ shex "Iri"
-
--- [56] ShapeExprLabel ::= Iri | BlankNode
-shapeExprLabel :: Binding
-shapeExprLabel = define "ShapeExprLabel" $
-  T.union [
-    "Iri">: shex "Iri",
-    "BlankNode">: shex "BlankNode"]
-
--- [42] TripleExprLabel ::= Iri | BlankNode
-tripleExprLabel :: Binding
-tripleExprLabel = define "TripleExprLabel" $
-  T.union [
-    "Iri">: shex "Iri",
-    "BlankNode">: shex "BlankNode"]
-
--- [16t] NumericLiteral ::= Integer | Decimal | Double
-numericLiteral :: Binding
-numericLiteral = define "NumericLiteral" $
-  T.union [
-    "Integer">: shex "Integer",
-    "Decimal">: shex "Decimal",
-    "Double">: shex "Double"]
-
--- [129s] RdfLiteral ::= String (LangTag | '^^' Datatype)?
-rdfLiteral :: Binding
-rdfLiteral = define "RdfLiteral" $
-  T.record [
-    "String">: shex "String",
-    "Alts">: T.maybe (shex "RdfLiteral_Alts_Option")]
-
-rdfLiteral_Alts_Option :: Binding
-rdfLiteral_Alts_Option = define "RdfLiteral_Alts_Option" $
-  T.union [
-    "LangTag">: shex "LangTag",
-    "sequence">: shex "Datatype"]
-
--- [134s] BooleanLiteral ::= 'true' | 'false'
-booleanLiteral :: Binding
-booleanLiteral = define "BooleanLiteral" $
-  T.union [
-    "True">: T.unit,
-    "False">: T.unit]
-
--- [135s] String
-string_ :: Binding
-string_ = define "String" $
-  T.union [
-    "StringLiteral1">: shex "StringLiteral1",
-    "StringLiteralLong1">: shex "StringLiteralLong1",
-    "StringLiteral2">: shex "StringLiteral2",
-    "StringLiteralLong2">: shex "StringLiteralLong2"]
-
--- [136s] Iri ::= IriRef | PrefixedName
-iri :: Binding
-iri = define "Iri" $
-  T.union [
-    "IriRef">: shex "IriRef",
-    "PrefixedName">: shex "PrefixedName"]
-
--- [137s] PrefixedName ::= PnameLn | PnameNs
-prefixedName :: Binding
-prefixedName = define "PrefixedName" $
-  T.union [
-    "PnameLn">: shex "PnameLn",
-    "PnameNs">: shex "PnameNs"]
-
--- [138s] BlankNode ::= BlankNodeLabel
-blankNode :: Binding
-blankNode = define "BlankNode" $ T.wrap $ shex "BlankNodeLabel"
-
--- [57] IncludeSet ::= '&' ShapeExprLabel+
-includeSet :: Binding
-includeSet = define "IncludeSet" $ T.wrap $ T.list $ shex "ShapeExprLabel"
-
--- [58] Code
-code :: Binding
-code = define "Code" $ T.wrap $ T.list $ shex "Code_Elmt"
-
-code_Elmt :: Binding
-code_Elmt = define "Code_Elmt" $
-  T.union [
-    "regex">: T.string,
-    "sequence">: T.string,
-    "Uchar">: shex "Uchar"]
-
--- [59] RepeatRange
-repeatRange :: Binding
-repeatRange = define "RepeatRange" $
-  T.record [
-    "Integer">: shex "Integer",
-    "Sequence">: T.maybe (T.maybe (T.maybe (shex "RepeatRange_Sequence_Option_Option_Option")))]
-
-repeatRange_Sequence_Option_Option_Option :: Binding
-repeatRange_Sequence_Option_Option_Option = define "RepeatRange_Sequence_Option_Option_Option" $
-  T.union [
-    "Integer">: shex "Integer",
-    "Ast">: T.unit]
-
--- [60] RdfType ::= 'a'
-rdfType :: Binding
-rdfType = define "RdfType" $ T.wrap T.unit
-
--- [18t] IriRef
-iriRef :: Binding
-iriRef = define "IriRef" $ T.wrap $ T.list $ shex "IriRef_Elmt"
-
-iriRef_Elmt :: Binding
-iriRef_Elmt = define "IriRef_Elmt" $
-  T.union [
-    "regex">: T.string,
-    "Uchar">: shex "Uchar"]
-
--- [140s] PnameNs ::= PnPrefix? ':'
-pnameNs :: Binding
-pnameNs = define "PnameNs" $ T.wrap $ T.maybe $ shex "PnPrefix"
-
--- [141s] PnameLn ::= PnameNs PnLocal
-pnameLn :: Binding
-pnameLn = define "PnameLn" $
-  T.record [
-    "PnameNs">: shex "PnameNs",
-    "PnLocal">: shex "PnLocal"]
-
--- [61] AtpNameNs ::= '@' PnPrefix? ':'
-atpNameNs :: Binding
-atpNameNs = define "AtpNameNs" $ T.wrap $ T.maybe $ shex "PnPrefix"
-
--- [62] AtpNameLn ::= '@' PnameNs PnLocal
-atpNameLn :: Binding
-atpNameLn = define "AtpNameLn" $
-  T.record [
-    "PnameNs">: shex "PnameNs",
-    "PnLocal">: shex "PnLocal"]
-
--- [63] Regexp
-regexp :: Binding
-regexp = define "Regexp" $
-  T.record [
-    "listOfAlts">: T.list (shex "Regexp_ListOfAlts_Elmt"),
-    "listOfRegex">: T.list T.string]
-
-regexp_ListOfAlts_Elmt :: Binding
-regexp_ListOfAlts_Elmt = define "Regexp_ListOfAlts_Elmt" $
-  T.union [
-    "regex">: T.string,
-    "sequence">: T.string,
-    "Uchar">: shex "Uchar"]
-
--- [142s] BlankNodeLabel
-blankNodeLabel :: Binding
-blankNodeLabel = define "BlankNodeLabel" $
-  T.record [
-    "alts">: shex "BlankNodeLabel_Alts",
-    "ListOfAlts">: T.maybe (T.list (shex "BlankNodeLabel_ListOfAlts_Option_Elmt")),
-    "PnChars">: shex "PnChars"]
-
-blankNodeLabel_Alts :: Binding
-blankNodeLabel_Alts = define "BlankNodeLabel_Alts" $
-  T.union [
-    "PnCharsU">: shex "PnCharsU",
-    "regex">: T.string]
-
-blankNodeLabel_ListOfAlts_Option_Elmt :: Binding
-blankNodeLabel_ListOfAlts_Option_Elmt = define "BlankNodeLabel_ListOfAlts_Option_Elmt" $
-  T.union [
-    "PnChars">: shex "PnChars",
-    "Period">: T.unit]
-
--- [145s] LangTag
-langTag :: Binding
-langTag = define "LangTag" $ T.wrap T.string
-
--- [19t] Integer
-integer_ :: Binding
-integer_ = define "Integer" $ T.wrap T.string
-
--- [20t] Decimal
-decimal :: Binding
-decimal = define "Decimal" $ T.wrap T.string
-
--- [21t] Double
-double_ :: Binding
-double_ = define "Double" $ T.wrap T.string
-
--- [156s] StringLiteral1
-stringLiteral1 :: Binding
-stringLiteral1 = define "StringLiteral1" $ T.wrap $ T.list $ shex "StringLiteral1_Elmt"
-
-stringLiteral1_Elmt :: Binding
-stringLiteral1_Elmt = define "StringLiteral1_Elmt" $
-  T.union [
-    "regex">: T.string,
-    "Echar">: shex "Echar",
-    "Uchar">: shex "Uchar"]
-
--- [157s] StringLiteral2
-stringLiteral2 :: Binding
-stringLiteral2 = define "StringLiteral2" $ T.wrap $ T.list $ shex "StringLiteral2_Elmt"
-
-stringLiteral2_Elmt :: Binding
-stringLiteral2_Elmt = define "StringLiteral2_Elmt" $
-  T.union [
-    "regex">: T.string,
-    "Echar">: shex "Echar",
-    "Uchar">: shex "Uchar"]
-
--- [158s] StringLiteralLong1
-stringLiteralLong1 :: Binding
-stringLiteralLong1 = define "StringLiteralLong1" $ T.wrap $ T.list $ shex "StringLiteralLong1_Elmt"
-
-stringLiteralLong1_Elmt :: Binding
-stringLiteralLong1_Elmt = define "StringLiteralLong1_Elmt" $
-  T.union [
-    "sequence">: shex "StringLiteralLong1_Elmt_Sequence",
-    "Echar">: shex "Echar",
-    "Uchar">: shex "Uchar"]
-
-stringLiteralLong1_Elmt_Sequence :: Binding
-stringLiteralLong1_Elmt_Sequence = define "StringLiteralLong1_Elmt_Sequence" $
-  T.record [
-    "Alts">: T.maybe (shex "StringLiteralLong1_Elmt_Sequence_Alts_Option"),
-    "regex">: T.string]
-
-stringLiteralLong1_Elmt_Sequence_Alts_Option :: Binding
-stringLiteralLong1_Elmt_Sequence_Alts_Option = define "StringLiteralLong1_Elmt_Sequence_Alts_Option" $
-  T.union [
-    "Apos">: T.unit,
-    "sequence">: shex "StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence"]
-
-stringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence :: Binding
-stringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence = define "StringLiteralLong1_Elmt_Sequence_Alts_Option_Sequence" $
-  T.record []
-
--- [159s] StringLiteralLong2
-stringLiteralLong2 :: Binding
-stringLiteralLong2 = define "StringLiteralLong2" $ T.wrap $ T.list $ shex "StringLiteralLong2_Elmt"
-
-stringLiteralLong2_Elmt :: Binding
-stringLiteralLong2_Elmt = define "StringLiteralLong2_Elmt" $
-  T.union [
-    "sequence">: shex "StringLiteralLong2_Elmt_Sequence",
-    "Echar">: shex "Echar",
-    "Uchar">: shex "Uchar"]
-
-stringLiteralLong2_Elmt_Sequence :: Binding
-stringLiteralLong2_Elmt_Sequence = define "StringLiteralLong2_Elmt_Sequence" $
-  T.record [
-    "Alts">: T.maybe (shex "StringLiteralLong2_Elmt_Sequence_Alts_Option"),
-    "regex">: T.string]
-
-stringLiteralLong2_Elmt_Sequence_Alts_Option :: Binding
-stringLiteralLong2_Elmt_Sequence_Alts_Option = define "StringLiteralLong2_Elmt_Sequence_Alts_Option" $
-  T.union [
-    "Quot">: T.unit,
-    "sequence">: shex "StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence"]
-
-stringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence :: Binding
-stringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence = define "StringLiteralLong2_Elmt_Sequence_Alts_Option_Sequence" $
-  T.record []
-
--- [26t] Uchar
-uchar :: Binding
-uchar = define "Uchar" $
-  T.union [
-    "sequence">: shex "Uchar_Sequence",
-    "sequence2">: shex "Uchar_Sequence2"]
-
-uchar_Sequence :: Binding
-uchar_Sequence = define "Uchar_Sequence" $
-  T.record [
-    "Hex">: shex "Hex",
-    "Hex2">: shex "Hex",
-    "Hex3">: shex "Hex",
-    "Hex4">: shex "Hex"]
-
-uchar_Sequence2 :: Binding
-uchar_Sequence2 = define "Uchar_Sequence2" $
-  T.record [
-    "Hex">: shex "Hex",
-    "Hex2">: shex "Hex",
-    "Hex3">: shex "Hex",
-    "Hex4">: shex "Hex",
-    "Hex5">: shex "Hex",
-    "Hex6">: shex "Hex",
-    "Hex7">: shex "Hex",
-    "Hex8">: shex "Hex"]
-
--- [160s] Echar ::= '\\' [tbnrf\\\"\']
-echar :: Binding
-echar = define "Echar" $ T.wrap T.string
-
--- [164s] PnCharsBase
-pnCharsBase :: Binding
-pnCharsBase = define "PnCharsBase" $
-  T.union [
-    "regex">: T.string,
-    "regex2">: T.string]
-
--- [165s] PnCharsU ::= PnCharsBase | '_'
-pnCharsU :: Binding
-pnCharsU = define "PnCharsU" $
-  T.union [
-    "PnCharsBase">: shex "PnCharsBase",
-    "Lowbar">: T.unit]
-
--- [167s] PnChars
-pnChars :: Binding
-pnChars = define "PnChars" $
-  T.union [
-    "PnCharsU">: shex "PnCharsU",
-    "Minus">: T.unit,
-    "regex">: T.string]
-
--- [168s] PnPrefix
-pnPrefix :: Binding
-pnPrefix = define "PnPrefix" $
-  T.record [
-    "PnCharsBase">: shex "PnCharsBase",
-    "Sequence">: T.maybe (shex "PnPrefix_Sequence_Option")]
-
-pnPrefix_Sequence_Option :: Binding
-pnPrefix_Sequence_Option = define "PnPrefix_Sequence_Option" $
-  T.record [
-    "alts">: shex "PnPrefix_Sequence_Option_Alts",
-    "PnChars">: shex "PnChars"]
-
-pnPrefix_Sequence_Option_Alts :: Binding
-pnPrefix_Sequence_Option_Alts = define "PnPrefix_Sequence_Option_Alts" $
-  T.union [
-    "PnChars">: shex "PnChars",
-    "Period">: T.unit]
-
--- [169s] PnLocal
-pnLocal :: Binding
-pnLocal = define "PnLocal" $
-  T.record [
-    "alts">: shex "PnLocal_Alts",
-    "Sequence">: T.maybe (shex "PnLocal_Sequence_Option")]
-
-pnLocal_Alts :: Binding
-pnLocal_Alts = define "PnLocal_Alts" $
-  T.union [
-    "PnCharsU">: shex "PnCharsU",
-    "Colon">: T.unit,
-    "regex">: T.string,
-    "Plx">: shex "Plx"]
-
-pnLocal_Sequence_Option :: Binding
-pnLocal_Sequence_Option = define "PnLocal_Sequence_Option" $
-  T.record [
-    "listOfAlts">: T.list (shex "PnLocal_Sequence_Option_ListOfAlts_Elmt"),
-    "alts">: shex "PnLocal_Sequence_Option_Alts"]
-
-pnLocal_Sequence_Option_ListOfAlts_Elmt :: Binding
-pnLocal_Sequence_Option_ListOfAlts_Elmt = define "PnLocal_Sequence_Option_ListOfAlts_Elmt" $
-  T.union [
-    "PnChars">: shex "PnChars",
-    "Period">: T.unit,
-    "Colon">: T.unit,
-    "Plx">: shex "Plx"]
-
-pnLocal_Sequence_Option_Alts :: Binding
-pnLocal_Sequence_Option_Alts = define "PnLocal_Sequence_Option_Alts" $
-  T.union [
-    "PnChars">: shex "PnChars",
-    "Colon">: T.unit,
-    "Plx">: shex "Plx"]
-
--- [170s] Plx ::= Percent | PnLocalEsc
-plx :: Binding
-plx = define "Plx" $
-  T.union [
-    "Percent">: shex "Percent",
-    "PnLocalEsc">: shex "PnLocalEsc"]
-
--- [171s] Percent ::= '%' Hex Hex
-percent :: Binding
-percent = define "Percent" $
-  T.record [
-    "Hex">: shex "Hex",
-    "Hex2">: shex "Hex"]
-
--- [172s] Hex ::= [0-9] | [A-F] | [a-f]
-hex :: Binding
-hex = define "Hex" $ T.wrap T.string
-
--- [173s] PnLocalEsc
-pnLocalEsc :: Binding
-pnLocalEsc = define "PnLocalEsc" $ T.wrap T.string
diff --git a/src/main/haskell/Hydra/Sources/Sql/Ansi.hs b/src/main/haskell/Hydra/Sources/Sql/Ansi.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Sql/Ansi.hs
+++ /dev/null
@@ -1,832 +0,0 @@
-module Hydra.Sources.Sql.Ansi where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-
-
-ns :: Namespace
-ns = Namespace "hydra.sql.syntax"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-sql :: String -> Type
-sql = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [],
-            moduleDescription = Just ("A subset of ANSI SQL:2003, capturing selected productions of the BNF grammar provided at "
-      ++ "https://ronsavage.github.io/SQL/sql-2003-2.bnf.html, which is based on "
-      ++ "the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003")}
-  where
-    definitions = [
-      approximateNumericLiteral,
-      binaryStringLiteral,
-      characterStringLiteral,
-      columnName,
-      dateString,
-      domainName,
-      exactNumericLiteral,
-      leftBracketOrTrigraph,
-      rightBracketOrTrigraph,
-      nationalCharacterStringLiteral,
-      pathResolvedUserDefinedTypeName,
-      tableName,
-      timeString,
-      timestampLiteral,
-      unicodeCharacterStringLiteral,
-      unsignedInteger,
-      approximateNumericType,
-      arrayElement,
-      arrayElementList,
-      arrayElementReference,
-      arrayType,
-      arrayValueConstructor,
-      arrayValueConstructorByQuery,
-      arrayValueConstructorByEnumeration,
-      arrayValueExpression,
-      asSubqueryClause,
-      attributeOrMethodReference,
-      binaryLargeObjectStringType,
-      booleanFactor,
-      booleanLiteral,
-      booleanPredicand,
-      booleanPrimary,
-      booleanTerm,
-      booleanTerm_And,
-      booleanTest,
-      booleanTest_Sequence_Option,
-      booleanType,
-      booleanValueExpression,
-      booleanValueExpression_Or,
-      caseExpression,
-      castSpecification,
-      characterSetSpecification,
-      characterStringType,
-      collateClause,
-      collectionType,
-      collectionValueConstructor,
-      collectionValueExpression,
-      columnConstraintDefinition,
-      columnDefinition,
-      columnDefinition_TypeOrDomain_Option,
-      columnDefinition_DefaultOrIdentityOrGeneration_Option,
-      columnNameList,
-      columnOptions,
-      columnReference,
-      commonValueExpression,
-      contextuallyTypedRowValueExpression,
-      contextuallyTypedRowValueConstructor,
-      contextuallyTypedRowValueExpressionList,
-      contextuallyTypedTableValueConstructor,
-      dataType,
-      dateLiteral,
-      datetimeLiteral,
-      datetimeType,
-      datetimeValueExpression,
-      defaultClause,
-      exactNumericType,
-      exactNumericType_Numeric_Option,
-      exactNumericType_Decimal_Option,
-      exactNumericType_Dec_Option,
-      fieldReference,
-      fromConstructor,
-      fromDefault,
-      fromSubquery,
-      generalLiteral,
-      generalValueSpecification,
-      generationClause,
-      globalOrLocal,
-      identityColumnSpecification,
-      insertColumnList,
-      insertColumnsAndSource,
-      insertStatement,
-      insertionTarget,
-      intervalLiteral,
-      intervalType,
-      intervalValueExpression,
-      largeObjectLength,
-      length_,
-      likeClause,
-      methodInvocation,
-      multisetElementReference,
-      multisetType,
-      multisetValueConstructor,
-      multisetValueExpression,
-      nationalCharacterStringType_,
-      newSpecification,
-      nextValueExpression,
-      numericType,
-      numericValueExpression,
-      overrideClause,
-      parenthesizedValueExpression,
-      precision,
-      predefinedType,
-      predefinedType_String,
-      predefinedType_NationalString,
-      predicate,
-      queryExpression,
-      referenceScopeCheck,
-      referenceType,
-      rowType,
-      rowValueSpecialCase,
-      nonparenthesizedValueExpressionPrimary,
-      referenceResolution,
-      referenceValueExpression,
-      rowValueExpression,
-      routineInvocation,
-      scalarSubquery,
-      scale,
-      selfReferencingColumnSpecification,
-      setFunctionSpecification,
-      staticMethodInvocation,
-      stringValueExpression,
-      subquery,
-      subtableClause,
-      subtypeTreatment,
-      tableCommitAction,
-      tableConstraintDefinition,
-      tableContentsSource,
-      tableContentsSource_Subtable,
-      tableDefinition,
-      tableElement,
-      tableElementList,
-      tableScope,
-      timeLiteral,
-      truthValue,
-      unsignedLiteral,
-      unsignedNumericLiteral,
-      unsignedValueSpecification,
-      userDefinedTypeValueExpression,
-      valueExpression,
-      valueExpressionPrimary,
-      windowFunction]
-
--- Token definitions
-
-approximateNumericLiteral :: Binding
-approximateNumericLiteral = define "ApproximateNumericLiteral" $ T.wrap T.string
-
-binaryStringLiteral :: Binding
-binaryStringLiteral = define "BinaryStringLiteral" $ T.wrap T.unit
-
-characterStringLiteral :: Binding
-characterStringLiteral = define "CharacterStringLiteral" $ T.wrap T.string
-
-columnName :: Binding
-columnName = define "ColumnName" $ T.wrap T.string
-
-dateString :: Binding
-dateString = define "DateString" $ T.wrap T.unit
-
-domainName :: Binding
-domainName = define "DomainName" $ T.wrap T.string
-
-exactNumericLiteral :: Binding
-exactNumericLiteral = define "ExactNumericLiteral" $ T.wrap T.string
-
-leftBracketOrTrigraph :: Binding
-leftBracketOrTrigraph = define "LeftBracketOrTrigraph" $ T.wrap T.string
-
-rightBracketOrTrigraph :: Binding
-rightBracketOrTrigraph = define "RightBracketOrTrigraph" $ T.wrap T.string
-
-nationalCharacterStringLiteral :: Binding
-nationalCharacterStringLiteral = define "NationalCharacterStringLiteral" $ T.wrap T.unit
-
-pathResolvedUserDefinedTypeName :: Binding
-pathResolvedUserDefinedTypeName = define "PathResolvedUserDefinedTypeName" $ T.wrap T.string
-
-tableName :: Binding
-tableName = define "TableName" $ T.wrap T.string
-
-timeString :: Binding
-timeString = define "TimeString" $ T.wrap T.unit
-
-timestampLiteral :: Binding
-timestampLiteral = define "TimestampLiteral" $ T.wrap T.unit
-
-unicodeCharacterStringLiteral :: Binding
-unicodeCharacterStringLiteral = define "UnicodeCharacterStringLiteral" $ T.wrap T.unit
-
-unsignedInteger :: Binding
-unsignedInteger = define "UnsignedInteger" $ T.wrap T.string
-
--- Type definitions
-
-approximateNumericType :: Binding
-approximateNumericType = define "ApproximateNumericType" $
-  T.union [
-    "float">: T.maybe (sql "Precision"),
-    "real">: T.unit,
-    "double">: T.unit]
-
-arrayElement :: Binding
-arrayElement = define "ArrayElement" $ T.wrap $ sql "ValueExpression"
-
-arrayElementList :: Binding
-arrayElementList = define "ArrayElementList" $
-  T.record [
-    "first">: sql "ArrayElement",
-    "rest">: T.list (sql "ArrayElement")]
-
-arrayElementReference :: Binding
-arrayElementReference = define "ArrayElementReference" $ T.wrap T.unit
-
-arrayType :: Binding
-arrayType = define "ArrayType" $ T.wrap T.unit
-
-arrayValueConstructor :: Binding
-arrayValueConstructor = define "ArrayValueConstructor" $
-  T.union [
-    "enumeration">: sql "ArrayValueConstructorByEnumeration",
-    "query">: sql "ArrayValueConstructorByQuery"]
-
-arrayValueConstructorByQuery :: Binding
-arrayValueConstructorByQuery = define "ArrayValueConstructorByQuery" $ T.wrap T.unit
-
-arrayValueConstructorByEnumeration :: Binding
-arrayValueConstructorByEnumeration = define "ArrayValueConstructorByEnumeration" $
-  T.record [
-    "LeftBracketOrTrigraph">: sql "LeftBracketOrTrigraph",
-    "ArrayElementList">: sql "ArrayElementList",
-    "RightBracketOrTrigraph">: sql "RightBracketOrTrigraph"]
-
-arrayValueExpression :: Binding
-arrayValueExpression = define "ArrayValueExpression" $ T.wrap T.unit
-
-asSubqueryClause :: Binding
-asSubqueryClause = define "AsSubqueryClause" $ T.wrap T.unit
-
-attributeOrMethodReference :: Binding
-attributeOrMethodReference = define "AttributeOrMethodReference" $ T.wrap T.unit
-
-binaryLargeObjectStringType :: Binding
-binaryLargeObjectStringType = define "BinaryLargeObjectStringType" $
-  T.union [
-    "binary">: T.maybe (sql "LargeObjectLength"),
-    "blob">: T.maybe (sql "LargeObjectLength")]
-
-booleanFactor :: Binding
-booleanFactor = define "BooleanFactor" $
-  T.record [
-    "NOT">: T.maybe T.unit,
-    "BooleanTest">: sql "BooleanTest"]
-
-booleanLiteral :: Binding
-booleanLiteral = define "BooleanLiteral" $
-  T.union [
-    "TRUE">: T.unit,
-    "FALSE">: T.unit,
-    "UNKNOWN">: T.unit]
-
-booleanPredicand :: Binding
-booleanPredicand = define "BooleanPredicand" $ T.wrap T.unit
-
-booleanPrimary :: Binding
-booleanPrimary = define "BooleanPrimary" $
-  T.union [
-    "predicate">: sql "Predicate",
-    "predicand">: sql "BooleanPredicand"]
-
-booleanTerm :: Binding
-booleanTerm = define "BooleanTerm" $
-  T.union [
-    "factor">: sql "BooleanFactor",
-    "and">: sql "BooleanTerm_And"]
-
-booleanTerm_And :: Binding
-booleanTerm_And = define "BooleanTerm_And" $
-  T.record [
-    "lhs">: sql "BooleanTerm",
-    "rhs">: sql "BooleanFactor"]
-
-booleanTest :: Binding
-booleanTest = define "BooleanTest" $
-  T.record [
-    "BooleanPrimary">: sql "BooleanPrimary",
-    "Sequence">: T.maybe (sql "BooleanTest_Sequence_Option")]
-
-booleanTest_Sequence_Option :: Binding
-booleanTest_Sequence_Option = define "BooleanTest_Sequence_Option" $
-  T.record [
-    "NOT">: T.maybe T.unit,
-    "TruthValue">: sql "TruthValue"]
-
-booleanType :: Binding
-booleanType = define "BooleanType" $ T.wrap T.unit
-
-booleanValueExpression :: Binding
-booleanValueExpression = define "BooleanValueExpression" $
-  T.union [
-    "term">: sql "BooleanTerm",
-    "or">: sql "BooleanValueExpression_Or"]
-
-booleanValueExpression_Or :: Binding
-booleanValueExpression_Or = define "BooleanValueExpression_Or" $
-  T.record [
-    "lhs">: sql "BooleanValueExpression",
-    "rhs">: sql "BooleanTerm"]
-
-caseExpression :: Binding
-caseExpression = define "CaseExpression" $ T.wrap T.unit
-
-castSpecification :: Binding
-castSpecification = define "CastSpecification" $ T.wrap T.unit
-
-characterSetSpecification :: Binding
-characterSetSpecification = define "CharacterSetSpecification" $ T.wrap T.unit
-
-characterStringType :: Binding
-characterStringType = define "CharacterStringType" $
-  T.union [
-    "character">: T.maybe (sql "Length"),
-    "char">: T.maybe (sql "Length"),
-    "characterVarying">: sql "Length",
-    "charVarying">: sql "Length",
-    "varchar">: sql "Length",
-    "characterLargeObject">: T.maybe (sql "LargeObjectLength"),
-    "charLargeObject">: T.maybe (sql "LargeObjectLength"),
-    "clob">: T.maybe (sql "LargeObjectLength")]
-
-collateClause :: Binding
-collateClause = define "CollateClause" $ T.wrap T.unit
-
-collectionType :: Binding
-collectionType = define "CollectionType" $
-  T.union [
-    "array">: sql "ArrayType",
-    "multiset">: sql "MultisetType"]
-
-collectionValueConstructor :: Binding
-collectionValueConstructor = define "CollectionValueConstructor" $
-  T.union [
-    "array">: sql "ArrayValueConstructor",
-    "multiset">: sql "MultisetValueConstructor"]
-
-collectionValueExpression :: Binding
-collectionValueExpression = define "CollectionValueExpression" $
-  T.union [
-    "array">: sql "ArrayValueExpression",
-    "multiset">: sql "MultisetValueExpression"]
-
-columnConstraintDefinition :: Binding
-columnConstraintDefinition = define "ColumnConstraintDefinition" $ T.wrap T.unit
-
-columnDefinition :: Binding
-columnDefinition = define "ColumnDefinition" $
-  T.record [
-    "name">: sql "ColumnName",
-    "typeOrDomain">: T.maybe (sql "ColumnDefinition_TypeOrDomain_Option"),
-    "refScope">: T.maybe (sql "ReferenceScopeCheck"),
-    "defaultOrIdentityOrGeneration">: T.maybe (sql "ColumnDefinition_DefaultOrIdentityOrGeneration_Option"),
-    "constraints">: T.list (sql "ColumnConstraintDefinition"),
-    "collate">: T.maybe (sql "CollateClause")]
-
-columnDefinition_TypeOrDomain_Option :: Binding
-columnDefinition_TypeOrDomain_Option = define "ColumnDefinition_TypeOrDomain_Option" $
-  T.union [
-    "DataType">: sql "DataType",
-    "DomainName">: sql "DomainName"]
-
-columnDefinition_DefaultOrIdentityOrGeneration_Option :: Binding
-columnDefinition_DefaultOrIdentityOrGeneration_Option = define "ColumnDefinition_DefaultOrIdentityOrGeneration_Option" $
-  T.union [
-    "DefaultClause">: sql "DefaultClause",
-    "IdentityColumnSpecification">: sql "IdentityColumnSpecification",
-    "GenerationClause">: sql "GenerationClause"]
-
-columnNameList :: Binding
-columnNameList = define "ColumnNameList" $
-  T.record [
-    "first">: sql "ColumnName",
-    "rest">: T.list (sql "ColumnName")]
-
-columnOptions :: Binding
-columnOptions = define "ColumnOptions" $ T.wrap T.unit
-
-columnReference :: Binding
-columnReference = define "ColumnReference" $ T.wrap T.unit
-
-commonValueExpression :: Binding
-commonValueExpression = define "CommonValueExpression" $
-  T.union [
-    "numeric">: sql "NumericValueExpression",
-    "string">: sql "StringValueExpression",
-    "datetime">: sql "DatetimeValueExpression",
-    "interval">: sql "IntervalValueExpression",
-    "userDefined">: sql "UserDefinedTypeValueExpression",
-    "reference">: sql "ReferenceValueExpression",
-    "collection">: sql "CollectionValueExpression"]
-
-contextuallyTypedRowValueExpression :: Binding
-contextuallyTypedRowValueExpression = define "ContextuallyTypedRowValueExpression" $
-  T.union [
-    "specialCase">: sql "RowValueSpecialCase",
-    "constructor">: sql "ContextuallyTypedRowValueConstructor"]
-
-contextuallyTypedRowValueConstructor :: Binding
-contextuallyTypedRowValueConstructor = define "ContextuallyTypedRowValueConstructor" $ T.wrap T.unit
-
-contextuallyTypedRowValueExpressionList :: Binding
-contextuallyTypedRowValueExpressionList = define "ContextuallyTypedRowValueExpressionList" $
-  T.record [
-    "first">: sql "ContextuallyTypedRowValueExpression",
-    "rest">: T.list (sql "ContextuallyTypedRowValueExpression")]
-
-contextuallyTypedTableValueConstructor :: Binding
-contextuallyTypedTableValueConstructor = define "ContextuallyTypedTableValueConstructor" $
-  T.wrap $ sql "ContextuallyTypedRowValueExpressionList"
-
-dataType :: Binding
-dataType = define "DataType" $
-  T.union [
-    "predefined">: sql "PredefinedType",
-    "row">: sql "RowType",
-    "named">: sql "PathResolvedUserDefinedTypeName",
-    "reference">: sql "ReferenceType",
-    "collection">: sql "CollectionType"]
-
-dateLiteral :: Binding
-dateLiteral = define "DateLiteral" $ T.wrap $ sql "DateString"
-
-datetimeLiteral :: Binding
-datetimeLiteral = define "DatetimeLiteral" $
-  T.union [
-    "date">: sql "DateLiteral",
-    "time">: sql "TimeLiteral",
-    "timestamp">: sql "TimestampLiteral"]
-
-datetimeType :: Binding
-datetimeType = define "DatetimeType" $ T.wrap T.unit
-
-datetimeValueExpression :: Binding
-datetimeValueExpression = define "DatetimeValueExpression" $ T.wrap T.unit
-
-defaultClause :: Binding
-defaultClause = define "DefaultClause" $ T.wrap T.unit
-
-exactNumericType :: Binding
-exactNumericType = define "ExactNumericType" $
-  T.union [
-    "numeric">: T.maybe (sql "ExactNumericType_Numeric_Option"),
-    "decimal">: T.maybe (sql "ExactNumericType_Decimal_Option"),
-    "dec">: T.maybe (sql "ExactNumericType_Dec_Option"),
-    "smallint">: T.unit,
-    "integer">: T.unit,
-    "int">: T.unit,
-    "bigint">: T.unit]
-
-exactNumericType_Numeric_Option :: Binding
-exactNumericType_Numeric_Option = define "ExactNumericType_Numeric_Option" $
-  T.record [
-    "Precision">: sql "Precision",
-    "Sequence">: T.maybe (sql "Scale")]
-
-exactNumericType_Decimal_Option :: Binding
-exactNumericType_Decimal_Option = define "ExactNumericType_Decimal_Option" $
-  T.record [
-    "Precision">: sql "Precision",
-    "Sequence">: T.maybe (sql "Scale")]
-
-exactNumericType_Dec_Option :: Binding
-exactNumericType_Dec_Option = define "ExactNumericType_Dec_Option" $
-  T.record [
-    "Precision">: sql "Precision",
-    "Sequence">: T.maybe (sql "Scale")]
-
-fieldReference :: Binding
-fieldReference = define "FieldReference" $ T.wrap T.unit
-
-fromConstructor :: Binding
-fromConstructor = define "FromConstructor" $
-  T.record [
-    "columns">: T.maybe (sql "InsertColumnList"),
-    "override">: T.maybe (sql "OverrideClause"),
-    "values">: sql "ContextuallyTypedTableValueConstructor"]
-
-fromDefault :: Binding
-fromDefault = define "FromDefault" $ T.wrap T.unit
-
-fromSubquery :: Binding
-fromSubquery = define "FromSubquery" $ T.wrap T.unit
-
-generalLiteral :: Binding
-generalLiteral = define "GeneralLiteral" $
-  T.union [
-    "string">: sql "CharacterStringLiteral",
-    "nationalString">: sql "NationalCharacterStringLiteral",
-    "unicode">: sql "UnicodeCharacterStringLiteral",
-    "binary">: sql "BinaryStringLiteral",
-    "dateTime">: sql "DatetimeLiteral",
-    "interval">: sql "IntervalLiteral",
-    "boolean">: sql "BooleanLiteral"]
-
-generalValueSpecification :: Binding
-generalValueSpecification = define "GeneralValueSpecification" $ T.wrap T.unit
-
-generationClause :: Binding
-generationClause = define "GenerationClause" $ T.wrap T.unit
-
-globalOrLocal :: Binding
-globalOrLocal = define "GlobalOrLocal" $
-  T.union [
-    "global">: T.unit,
-    "local">: T.unit]
-
-identityColumnSpecification :: Binding
-identityColumnSpecification = define "IdentityColumnSpecification" $ T.wrap T.unit
-
-insertColumnList :: Binding
-insertColumnList = define "InsertColumnList" $ T.wrap $ sql "ColumnNameList"
-
-insertColumnsAndSource :: Binding
-insertColumnsAndSource = define "InsertColumnsAndSource" $
-  T.union [
-    "subquery">: sql "FromSubquery",
-    "constructor">: sql "FromConstructor",
-    "default">: sql "FromDefault"]
-
-insertStatement :: Binding
-insertStatement = define "InsertStatement" $
-  T.record [
-    "target">: sql "InsertionTarget",
-    "columnsAndSource">: sql "InsertColumnsAndSource"]
-
-insertionTarget :: Binding
-insertionTarget = define "InsertionTarget" $ T.wrap $ sql "TableName"
-
-intervalLiteral :: Binding
-intervalLiteral = define "IntervalLiteral" $ T.wrap T.unit
-
-intervalType :: Binding
-intervalType = define "IntervalType" $ T.wrap T.unit
-
-intervalValueExpression :: Binding
-intervalValueExpression = define "IntervalValueExpression" $ T.wrap T.unit
-
-largeObjectLength :: Binding
-largeObjectLength = define "LargeObjectLength" $ T.wrap T.unit
-
-length_ :: Binding
-length_ = define "Length" $ T.wrap $ sql "UnsignedInteger"
-
-likeClause :: Binding
-likeClause = define "LikeClause" $ T.wrap T.unit
-
-methodInvocation :: Binding
-methodInvocation = define "MethodInvocation" $ T.wrap T.unit
-
-multisetElementReference :: Binding
-multisetElementReference = define "MultisetElementReference" $ T.wrap T.unit
-
-multisetType :: Binding
-multisetType = define "MultisetType" $ T.wrap $ sql "DataType"
-
-multisetValueConstructor :: Binding
-multisetValueConstructor = define "MultisetValueConstructor" $ T.wrap T.unit
-
-multisetValueExpression :: Binding
-multisetValueExpression = define "MultisetValueExpression" $ T.wrap T.unit
-
-nationalCharacterStringType_ :: Binding
-nationalCharacterStringType_ = define "NationalCharacterStringType" $ T.wrap T.unit
-
-newSpecification :: Binding
-newSpecification = define "NewSpecification" $ T.wrap T.unit
-
-nextValueExpression :: Binding
-nextValueExpression = define "NextValueExpression" $ T.wrap T.unit
-
-numericType :: Binding
-numericType = define "NumericType" $
-  T.union [
-    "exact">: sql "ExactNumericType",
-    "approximate">: sql "ApproximateNumericType"]
-
-numericValueExpression :: Binding
-numericValueExpression = define "NumericValueExpression" $ T.wrap T.unit
-
-overrideClause :: Binding
-overrideClause = define "OverrideClause" $
-  T.union [
-    "OVERRIDINGspUSERspVALUE">: T.unit,
-    "OVERRIDINGspSYSTEMspVALUE">: T.unit]
-
-parenthesizedValueExpression :: Binding
-parenthesizedValueExpression = define "ParenthesizedValueExpression" $
-  T.wrap $ sql "ValueExpression"
-
-precision :: Binding
-precision = define "Precision" $ T.wrap $ sql "UnsignedInteger"
-
-predefinedType :: Binding
-predefinedType = define "PredefinedType" $
-  T.union [
-    "string">: sql "PredefinedType_String",
-    "nationalString">: sql "PredefinedType_NationalString",
-    "blob">: sql "BinaryLargeObjectStringType",
-    "numeric">: sql "NumericType",
-    "boolean">: sql "BooleanType",
-    "datetime">: sql "DatetimeType",
-    "interval">: sql "IntervalType"]
-
-predefinedType_String :: Binding
-predefinedType_String = define "PredefinedType_String" $
-  T.record [
-    "type">: sql "CharacterStringType",
-    "characters">: T.maybe (sql "CharacterSetSpecification"),
-    "collate">: T.maybe (sql "CollateClause")]
-
-predefinedType_NationalString :: Binding
-predefinedType_NationalString = define "PredefinedType_NationalString" $
-  T.record [
-    "type">: sql "NationalCharacterStringType",
-    "collate">: T.maybe (sql "CollateClause")]
-
-predicate :: Binding
-predicate = define "Predicate" $ T.wrap T.unit
-
-queryExpression :: Binding
-queryExpression = define "QueryExpression" $ T.wrap T.unit
-
-referenceScopeCheck :: Binding
-referenceScopeCheck = define "ReferenceScopeCheck" $ T.wrap T.unit
-
-referenceType :: Binding
-referenceType = define "ReferenceType" $ T.wrap T.unit
-
-rowType :: Binding
-rowType = define "RowType" $ T.wrap T.unit
-
-rowValueSpecialCase :: Binding
-rowValueSpecialCase = define "RowValueSpecialCase" $
-  T.wrap $ sql "NonparenthesizedValueExpressionPrimary"
-
-nonparenthesizedValueExpressionPrimary :: Binding
-nonparenthesizedValueExpressionPrimary = define "NonparenthesizedValueExpressionPrimary" $
-  T.union [
-    "unsigned">: sql "UnsignedValueSpecification",
-    "column">: sql "ColumnReference",
-    "setFunction">: sql "SetFunctionSpecification",
-    "windowFunction">: sql "WindowFunction",
-    "scalarSubquery">: sql "ScalarSubquery",
-    "cases">: sql "CaseExpression",
-    "cast">: sql "CastSpecification",
-    "field">: sql "FieldReference",
-    "subtype">: sql "SubtypeTreatment",
-    "method">: sql "MethodInvocation",
-    "staticMethod">: sql "StaticMethodInvocation",
-    "new">: sql "NewSpecification",
-    "attributeOrMethod">: sql "AttributeOrMethodReference",
-    "reference">: sql "ReferenceResolution",
-    "collection">: sql "CollectionValueConstructor",
-    "arrayElement">: sql "ArrayElementReference",
-    "multisetElement">: sql "MultisetElementReference",
-    "routine">: sql "RoutineInvocation",
-    "next">: sql "NextValueExpression"]
-
-referenceResolution :: Binding
-referenceResolution = define "ReferenceResolution" $ T.wrap T.unit
-
-referenceValueExpression :: Binding
-referenceValueExpression = define "ReferenceValueExpression" $
-  T.wrap $ sql "ValueExpressionPrimary"
-
-rowValueExpression :: Binding
-rowValueExpression = define "RowValueExpression" $ T.wrap T.unit
-
-routineInvocation :: Binding
-routineInvocation = define "RoutineInvocation" $ T.wrap T.unit
-
-scalarSubquery :: Binding
-scalarSubquery = define "ScalarSubquery" $ T.wrap $ sql "Subquery"
-
-scale :: Binding
-scale = define "Scale" $ T.wrap $ sql "UnsignedInteger"
-
-selfReferencingColumnSpecification :: Binding
-selfReferencingColumnSpecification = define "SelfReferencingColumnSpecification" $ T.wrap T.unit
-
-setFunctionSpecification :: Binding
-setFunctionSpecification = define "SetFunctionSpecification" $ T.wrap T.unit
-
-staticMethodInvocation :: Binding
-staticMethodInvocation = define "StaticMethodInvocation" $ T.wrap T.unit
-
-stringValueExpression :: Binding
-stringValueExpression = define "StringValueExpression" $ T.wrap T.unit
-
-subquery :: Binding
-subquery = define "Subquery" $ T.wrap $ sql "QueryExpression"
-
-subtableClause :: Binding
-subtableClause = define "SubtableClause" $ T.wrap T.unit
-
-subtypeTreatment :: Binding
-subtypeTreatment = define "SubtypeTreatment" $ T.wrap T.unit
-
-tableCommitAction :: Binding
-tableCommitAction = define "TableCommitAction" $
-  T.union [
-    "preserve">: T.unit,
-    "delete">: T.unit]
-
-tableConstraintDefinition :: Binding
-tableConstraintDefinition = define "TableConstraintDefinition" $ T.wrap T.unit
-
-tableContentsSource :: Binding
-tableContentsSource = define "TableContentsSource" $
-  T.union [
-    "list">: sql "TableElementList",
-    "subtable">: sql "TableContentsSource_Subtable",
-    "subquery">: sql "AsSubqueryClause"]
-
-tableContentsSource_Subtable :: Binding
-tableContentsSource_Subtable = define "TableContentsSource_Subtable" $
-  T.record [
-    "type">: sql "PathResolvedUserDefinedTypeName",
-    "subtable">: T.maybe (sql "SubtableClause"),
-    "elements">: T.maybe (sql "TableElementList")]
-
-tableDefinition :: Binding
-tableDefinition = define "TableDefinition" $
-  T.record [
-    "scope">: T.maybe (sql "TableScope"),
-    "name">: sql "TableName",
-    "source">: sql "TableContentsSource",
-    "commitActions">: T.maybe (sql "TableCommitAction")]
-
-tableElement :: Binding
-tableElement = define "TableElement" $
-  T.union [
-    "column">: sql "ColumnDefinition",
-    "tableConstraint">: sql "TableConstraintDefinition",
-    "like">: sql "LikeClause",
-    "selfReferencingColumn">: sql "SelfReferencingColumnSpecification",
-    "columOptions">: sql "ColumnOptions"]
-
-tableElementList :: Binding
-tableElementList = define "TableElementList" $
-  T.record [
-    "first">: sql "TableElement",
-    "rest">: T.list (sql "TableElement")]
-
-tableScope :: Binding
-tableScope = define "TableScope" $ T.wrap $ sql "GlobalOrLocal"
-
-timeLiteral :: Binding
-timeLiteral = define "TimeLiteral" $ T.wrap $ sql "TimeString"
-
-truthValue :: Binding
-truthValue = define "TruthValue" $
-  T.union [
-    "TRUE">: T.unit,
-    "FALSE">: T.unit,
-    "UNKNOWN">: T.unit]
-
-unsignedLiteral :: Binding
-unsignedLiteral = define "UnsignedLiteral" $
-  T.union [
-    "numeric">: sql "UnsignedNumericLiteral",
-    "general">: sql "GeneralLiteral"]
-
-unsignedNumericLiteral :: Binding
-unsignedNumericLiteral = define "UnsignedNumericLiteral" $
-  T.union [
-    "exact">: sql "ExactNumericLiteral",
-    "approximate">: sql "ApproximateNumericLiteral"]
-
-unsignedValueSpecification :: Binding
-unsignedValueSpecification = define "UnsignedValueSpecification" $
-  T.union [
-    "literal">: sql "UnsignedLiteral",
-    "general">: sql "GeneralValueSpecification"]
-
-userDefinedTypeValueExpression :: Binding
-userDefinedTypeValueExpression = define "UserDefinedTypeValueExpression" $
-  T.wrap $ sql "ValueExpressionPrimary"
-
-valueExpression :: Binding
-valueExpression = define "ValueExpression" $
-  T.union [
-    "common">: sql "CommonValueExpression",
-    "boolean">: sql "BooleanValueExpression",
-    "row">: sql "RowValueExpression"]
-
-valueExpressionPrimary :: Binding
-valueExpressionPrimary = define "ValueExpressionPrimary" $
-  T.union [
-    "parens">: sql "ParenthesizedValueExpression",
-    "noparens">: sql "NonparenthesizedValueExpressionPrimary"]
-
-windowFunction :: Binding
-windowFunction = define "WindowFunction" $ T.wrap T.unit
diff --git a/src/main/haskell/Hydra/Sources/Test/All.hs b/src/main/haskell/Hydra/Sources/Test/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/All.hs
+++ /dev/null
@@ -1,33 +0,0 @@
--- | Aggregates all Hydra test source modules
-
-module Hydra.Sources.Test.All where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Test.TestEnv as TestEnv
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestSuite as TestSuite
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-
-
--- | All test modules (including test suite modules that TestSuite depends on)
-testModules :: [Module]
-testModules = baseTestModules ++ TestSuite.testSuiteModules
-
--- | Base test modules (TestEnv is a type-only stub; TestGraph references it).
--- TestEnv has hand-written per-language runtime counterparts and must not be
--- emitted as generated source — bootstrap-from-json skips it by namespace.
-baseTestModules :: [Module]
-baseTestModules = [
-  TestEnv.module_,
-  TestGraph.module_,
-  TestTerms.module_,
-  TestTypes.module_,
-  TestSuite.module_]
-
--- | Namespaces that are in the test universe for type inference but whose
--- source should NOT be emitted by bootstrap-from-json. The hand-written
--- per-language counterparts are the source of truth.
-testSkipEmitNamespaces :: [Namespace]
-testSkipEmitNamespaces = [TestEnv.ns]
diff --git a/src/main/haskell/Hydra/Sources/Test/Annotations.hs b/src/main/haskell/Hydra/Sources/Test/Annotations.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Annotations.hs
+++ /dev/null
@@ -1,264 +0,0 @@
--- | Test cases for hydra.annotations functions
-module Hydra.Sources.Test.Annotations where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Maps as Maps
-import qualified Hydra.Sources.Kernel.Terms.Annotations as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Constants as Constants
-import qualified Hydra.Dsl.Meta.Graph as Graph
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-
-
-
--- | Test state (an empty Graph)
-testState :: TTerm Term
-testState = metaref Lexical.emptyGraph
-
--- | Empty Context for Either-based function tests
-testContext :: TTerm Term
-testContext = metaref Lexical.emptyContext
-
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.annotations"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Annotations.ns, Lexical.ns, Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for hydra.annotations functions"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-
--- | Annotation eval case: like annEvalCase but tagged as disabled because these tests
--- require kernel term bindings in the test graph (via reduceTerm), which not all
--- implementations provide yet. See hydra.test.environment in the branch plan.
-annEvalCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-annEvalCase name = evalCase name
-
--- | Test cases for getTermAnnotation and setTermAnnotation
-arbitraryAnnotationTests :: TTerm TestGroup
-arbitraryAnnotationTests = subgroup "arbitrary annotations" [
-  -- Set a single key/value pair (multiple cases for property test coverage)
-  -- Note: These tests require interpretation because setTermAnnotation uses maps.alter which has no interpreter impl
-  annEvalCase "set single annotation #1"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ int32Term 42) @@ stringTerm "foo")
-    (annotatedTerm (stringTerm "foo") $ Terms.map $ Maps.singleton (nameTerm "k1") (int32Term 42)),
-  annEvalCase "set single annotation #2"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "myKey" @@ (optional $ just $ int32Term (-17)) @@ stringTerm "bar")
-    (annotatedTerm (stringTerm "bar") $ Terms.map $ Maps.singleton (nameTerm "myKey") (int32Term (-17))),
-  annEvalCase "set single annotation #3"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "x" @@ (optional $ just $ stringTerm "hello") @@ int32Term 0)
-    (annotatedTerm (int32Term 0) $ Terms.map $ Maps.singleton (nameTerm "x") (stringTerm "hello")),
-
-  -- Retrieve a single value (multiple cases)
-  -- Note: These tests require the interpreter because getTermAnnotation uses pattern matching on Term
-  annEvalCase "get existing annotation #1"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "k1"
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ stringTerm "value") @@ int32Term 42))
-    (optional $ just $ stringTerm "value"),
-  annEvalCase "get existing annotation #2"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "foo"
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "foo" @@ (optional $ just $ stringTerm "") @@ int32Term 99))
-    (optional $ just $ stringTerm ""),
-  annEvalCase "get existing annotation #3"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "key"
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "key" @@ (optional $ just $ int32Term 123) @@ stringTerm "test"))
-    (optional $ just $ int32Term 123),
-
-  -- Retrieve a null value (annotation not present) - multiple cases
-  annEvalCase "get missing annotation #1"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "k1" @@ int16Term 42)
-    (optional nothing),
-  annEvalCase "get missing annotation #2"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "nonexistent" @@ stringTerm "hello")
-    (optional nothing),
-  annEvalCase "get missing annotation #3"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "k1"
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k2" @@ (optional $ just $ int32Term 1) @@ int32Term 42))
-    (optional nothing),
-
-  -- Set multiple values (multiple cases)
-  annEvalCase "set multiple annotations #1"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "k2" @@ (optional $ just $ int32Term 200)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ stringTerm "first") @@ booleanTerm True))
-    (annotatedTerm (booleanTerm True) $ Terms.map $ Maps.fromList $ Phantoms.list [
-      Phantoms.pair (nameTerm "k1") (stringTerm "first"),
-      Phantoms.pair (nameTerm "k2") (int32Term 200)]),
-  annEvalCase "set multiple annotations #2"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "b" @@ (optional $ just $ int32Term 0)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "a" @@ (optional $ just $ int32Term (-5)) @@ stringTerm "test"))
-    (annotatedTerm (stringTerm "test") $ Terms.map $ Maps.fromList $ Phantoms.list [
-      Phantoms.pair (nameTerm "a") (int32Term (-5)),
-      Phantoms.pair (nameTerm "b") (int32Term 0)]),
-
-  -- An outer annotation overrides an inner one (multiple cases)
-  annEvalCase "outer annotation overrides inner #1"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ stringTerm "outer")
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ stringTerm "inner") @@ stringTerm "bar"))
-    (annotatedTerm (stringTerm "bar") $ Terms.map $ Maps.singleton (nameTerm "k1") (stringTerm "outer")),
-  annEvalCase "outer annotation overrides inner #2"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "x" @@ (optional $ just $ stringTerm "new")
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "x" @@ (optional $ just $ stringTerm "old") @@ int32Term 42))
-    (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "x") (stringTerm "new")),
-  annEvalCase "outer annotation overrides inner #3"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "key" @@ (optional $ just $ int32Term 999)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "key" @@ (optional $ just $ int32Term 1) @@ booleanTerm False))
-    (annotatedTerm (booleanTerm False) $ Terms.map $ Maps.singleton (nameTerm "key") (int32Term 999)),
-
-  -- Unset a single annotation (multiple cases)
-  annEvalCase "unset single annotation #1"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional nothing)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ stringTerm "foo") @@ int64Term 137))
-    (int64Term 137),
-  annEvalCase "unset single annotation #2"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "x" @@ (optional nothing)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "x" @@ (optional $ just $ int32Term 42) @@ stringTerm "test"))
-    (stringTerm "test"),
-
-  -- Unset one of multiple annotations (multiple cases)
-  annEvalCase "unset one of multiple annotations #1"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional nothing)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k2" @@ (optional $ just $ int32Term 200)
-        @@ (metaref Annotations.setTermAnnotation @@ nameTerm "k1" @@ (optional $ just $ stringTerm "first") @@ int64Term 137)))
-    (annotatedTerm (int64Term 137) $ Terms.map $ Maps.singleton (nameTerm "k2") (int32Term 200)),
-  annEvalCase "unset one of multiple annotations #2"
-    (metaref Annotations.setTermAnnotation @@ nameTerm "b" @@ (optional nothing)
-      @@ (metaref Annotations.setTermAnnotation @@ nameTerm "b" @@ (optional $ just $ int32Term 2)
-        @@ (metaref Annotations.setTermAnnotation @@ nameTerm "a" @@ (optional $ just $ int32Term 1) @@ stringTerm "x")))
-    (annotatedTerm (stringTerm "x") $ Terms.map $ Maps.singleton (nameTerm "a") (int32Term 1))]
-
--- | Test cases for getTermDescription and setTermDescription
-descriptionTests :: TTerm TestGroup
-descriptionTests = subgroup "descriptions" [
-  -- Set a single description (multiple cases)
-  -- Note: These tests require interpretation because setTermDescription uses maps.alter which has no interpreter impl
-  annEvalCase "set description #1"
-    (metaref Annotations.setTermDescription @@ (optional $ just $ string "my description") @@ stringTerm "foo")
-    (annotatedTerm (stringTerm "foo") $ Terms.map $ Maps.singleton (nameTerm "description") (stringTerm "my description")),
-  annEvalCase "set description #2"
-    (metaref Annotations.setTermDescription @@ (optional $ just $ string "") @@ int32Term 42)
-    (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "description") (stringTerm "")),
-  annEvalCase "set description #3"
-    (metaref Annotations.setTermDescription @@ (optional $ just $ string "A longer description with spaces") @@ booleanTerm True)
-    (annotatedTerm (booleanTerm True) $ Terms.map $ Maps.singleton (nameTerm "description") (stringTerm "A longer description with spaces")),
-
-  -- Get existing description (returns Either Error (Maybe String))
-  annEvalCase "get existing description #1"
-    (metaref Annotations.getTermDescription @@ testContext @@ testState
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "hello") @@ int32Term 42))
-    (right (optional $ just $ string "hello")),
-  annEvalCase "get existing description #2"
-    (metaref Annotations.getTermDescription @@ testContext @@ testState
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "") @@ stringTerm "test"))
-    (right (optional $ just $ string "")),
-  annEvalCase "get existing description #3"
-    (metaref Annotations.getTermDescription @@ testContext @@ testState
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "desc") @@ booleanTerm False))
-    (right (optional $ just $ string "desc")),
-
-  -- Get missing description (no description annotation present)
-  annEvalCase "get missing description #1"
-    (metaref Annotations.getTermDescription @@ testContext @@ testState @@ int16Term 42)
-    (right (optional nothing)),
-  annEvalCase "get missing description #2"
-    (metaref Annotations.getTermDescription @@ testContext @@ testState @@ stringTerm "no description here")
-    (right (optional nothing)),
-  annEvalCase "get missing description #3"
-    (metaref Annotations.getTermDescription @@ testContext @@ testState @@ int32Term 0)
-    (right (optional nothing)),
-
-  -- An outer description overrides an inner one (multiple cases)
-  annEvalCase "outer description overrides inner #1"
-    (metaref Annotations.setTermDescription @@ (optional $ just $ string "outer")
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "inner") @@ stringTerm "bar"))
-    (annotatedTerm (stringTerm "bar") $ Terms.map $ Maps.singleton (nameTerm "description") (stringTerm "outer")),
-  annEvalCase "outer description overrides inner #2"
-    (metaref Annotations.setTermDescription @@ (optional $ just $ string "new")
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "old") @@ int32Term 99))
-    (annotatedTerm (int32Term 99) $ Terms.map $ Maps.singleton (nameTerm "description") (stringTerm "new")),
-
-  -- Unset a description (multiple cases)
-  annEvalCase "unset description #1"
-    (metaref Annotations.setTermDescription @@ (optional nothing)
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "desc") @@ int64Term 137))
-    (int64Term 137),
-  annEvalCase "unset description #2"
-    (metaref Annotations.setTermDescription @@ (optional nothing)
-      @@ (metaref Annotations.setTermDescription @@ (optional $ just $ string "to be removed") @@ stringTerm "test"))
-    (stringTerm "test")]
-
--- | Test cases for layered (non-compact) annotations
--- Note: These tests require interpretation because they call getTermAnnotation which is not a primitive
-layeredAnnotationTests :: TTerm TestGroup
-layeredAnnotationTests = subgroup "layered annotations" [
-  -- Annotations at different levels, with different keys, are all available
-  annEvalCase "get annotation from unannotated term"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "one" @@ int32Term 42)
-    (optional nothing),
-
-  annEvalCase "get annotation from singly annotated term"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "one"
-      @@ (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 1)))
-    (optional $ just $ int32Term 1),
-
-  annEvalCase "get inner annotation from doubly annotated term"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "one"
-      @@ (annotatedTerm
-           (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 1))
-           $ Terms.map $ Maps.singleton (nameTerm "two") (int32Term 2)))
-    (optional $ just $ int32Term 1),
-
-  annEvalCase "get outer annotation from doubly annotated term"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "two"
-      @@ (annotatedTerm
-           (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 1))
-           $ Terms.map $ Maps.singleton (nameTerm "two") (int32Term 2)))
-    (optional $ just $ int32Term 2),
-
-  -- Non-overridden annotation still accessible in triply annotated term
-  annEvalCase "get non-overridden annotation from triply annotated term"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "two"
-      @@ (annotatedTerm
-           (annotatedTerm
-             (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 1))
-             $ Terms.map $ Maps.singleton (nameTerm "two") (int32Term 2))
-           $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 99)))
-    (optional $ just $ int32Term 2),
-
-  -- Outer annotations override inner ones
-  annEvalCase "outer annotation overrides inner in layered term"
-    (metaref Annotations.getTermAnnotation @@ nameTerm "one"
-      @@ (annotatedTerm
-           (annotatedTerm
-             (annotatedTerm (int32Term 42) $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 1))
-             $ Terms.map $ Maps.singleton (nameTerm "two") (int32Term 2))
-           $ Terms.map $ Maps.singleton (nameTerm "one") (int32Term 99)))
-    (optional $ just $ int32Term 99)]
-
-allTests :: TTermDefinition TestGroup
-allTests = Phantoms.definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.annotations functions" $
-    supergroup "annotations" [
-      arbitraryAnnotationTests,
-      descriptionTests,
-      layeredAnnotationTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/Advanced.hs b/src/main/haskell/Hydra/Sources/Test/Checking/Advanced.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/Advanced.hs
+++ /dev/null
@@ -1,125 +0,0 @@
-
--- | Advanced type checking test cases: annotated terms and flows
-module Hydra.Sources.Test.Checking.Advanced where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.advanced"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.rewriting"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Advanced type checking test cases: annotated terms and flows")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition annotatedTermsTests,
-      Phantoms.toDefinition topLevelAnnotationsTests,
-      Phantoms.toDefinition nestedAnnotationsTests,
-      Phantoms.toDefinition annotationsInComplexContextsTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Advanced type checking test cases" $
-  supergroup "Advanced" [
-    annotatedTermsTests]
-
------- Helper functions ------
-
------- Annotated terms ------
-
-annotatedTermsTests :: TTermDefinition TestGroup
-annotatedTermsTests = define "annotatedTermsTests" $
-  supergroup "Annotated terms" [
-    topLevelAnnotationsTests,
-    nestedAnnotationsTests,
-    annotationsInComplexContextsTests]
-
-topLevelAnnotationsTests :: TTermDefinition TestGroup
-topLevelAnnotationsTests = define "topLevelAnnotationsTests" $
-  subgroup "Top-level annotations" [
-    noChange "annotated literal"
-      (annotated (int32 42) mapTermEmpty)
-      T.int32,
-    noChange "annotated list"
-      (annotated (list [string "a", string "b"]) mapTermEmpty)
-      (T.list T.string),
-    noChange "annotated record"
-      (annotated (record TestTypes.testTypePersonName [
-        "firstName">: string "John",
-        "lastName">: string "Doe",
-        "age">: int32 25]) mapTermEmpty)
-      (Core.typeVariable TestTypes.testTypePersonName),
-    checkTest "annotated lambda" []
-      (annotated (lambda "x" $ var "x") mapTermEmpty)
-      (annotated (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x") mapTermEmpty)
-      (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0"))]
-
-nestedAnnotationsTests :: TTermDefinition TestGroup
-nestedAnnotationsTests = define "nestedAnnotationsTests" $
-  subgroup "Nested annotations" [
-    noChange "annotation within annotation"
-      (annotated (annotated (int32 100) mapTermEmpty) mapTermEmpty)
-      T.int32,
-    checkTest "annotated terms in tuple" []
-      (tuple [annotated (int32 1) mapTermEmpty,
-              annotated (string "hello") mapTermEmpty])
-      (tyapps (pair (annotated (int32 1) mapTermEmpty) (annotated (string "hello") mapTermEmpty)) [T.int32, T.string])
-      (T.pair T.int32 T.string),
-    checkTest "annotated term in function application" []
-      (annotated (lambda "x" $ var "x") mapTermEmpty @@ annotated (int32 42) mapTermEmpty)
-      (annotated (lambdaTyped "x" T.int32 $ var "x") mapTermEmpty @@ annotated (int32 42) mapTermEmpty)
-      T.int32]
-
-annotationsInComplexContextsTests :: TTermDefinition TestGroup
-annotationsInComplexContextsTests = define "annotationsInComplexContextsTests" $
-  subgroup "Annotations in complex contexts" [
-    checkTest "annotated let binding" []
-      (lets ["x">: annotated (int32 5) mapTermEmpty,
-             "y">: annotated (string "world") mapTermEmpty] $
-        annotated (tuple [var "x", var "y"]) mapTermEmpty)
-      (letsTyped [("x", annotated (int32 5) mapTermEmpty, T.mono T.int32),
-                  ("y", annotated (string "world") mapTermEmpty, T.mono T.string)] $
-        annotated (tyapps (pair (var "x") (var "y")) [T.int32, T.string]) mapTermEmpty)
-      (T.pair T.int32 T.string),
-    noChange "annotated record fields"
-      (record TestTypes.testTypePersonName [
-        "firstName">: annotated (string "Alice") mapTermEmpty,
-        "lastName">: annotated (string "Smith") mapTermEmpty,
-        "age">: annotated (int32 30) mapTermEmpty])
-      (Core.typeVariable TestTypes.testTypePersonName),
-    checkTest "annotated function in application" []
-      (lets ["add">: annotated (primitive _math_add) mapTermEmpty] $
-        var "add" @@ annotated (int32 10) mapTermEmpty @@ annotated (int32 20) mapTermEmpty)
-      (letsTyped [("add", annotated (primitive _math_add) mapTermEmpty, T.mono $ T.function T.int32 (T.function T.int32 T.int32))] $
-        var "add" @@ (annotated (int32 10) mapTermEmpty) @@ (annotated (int32 20) mapTermEmpty))
-      T.int32]
-
---    expectTermWithType "annotated function in application"
---      (lets ["add">: annotated (primitive _math_add) M.empty] $
---            var "add" @@ annotated (int32 10) M.empty @@ annotated (int32 20) M.empty)
---      (letsTyped [("add", annotated (primitive _math_add) M.empty, Types.mono $ Types.function Types.int32 (Types.function Types.int32 Types.int32))] $
---        var "add" @@ annotated (int32 10) M.empty @@ annotated (int32 20) M.empty)
---      Types.int32
-
-
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/AlgebraicTypes.hs b/src/main/haskell/Hydra/Sources/Test/Checking/AlgebraicTypes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/AlgebraicTypes.hs
+++ /dev/null
@@ -1,407 +0,0 @@
-
--- | Algebraic type checking test cases: unit, pairs, eithers, optionals
-module Hydra.Sources.Test.Checking.AlgebraicTypes where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.algebraicTypes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.rewriting"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Algebraic type checking test cases: unit, pairs, eithers, optionals")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition unitTests,
-      Phantoms.toDefinition unitTermTests,
-      Phantoms.toDefinition unitTermInPolymorphicContextTests,
-      Phantoms.toDefinition pairsTests,
-      Phantoms.toDefinition basicPairsTests,
-      Phantoms.toDefinition polymorphicPairsTests,
-      Phantoms.toDefinition pairsInComplexContextsTests,
-      Phantoms.toDefinition nestedPairsTests,
-      Phantoms.toDefinition pairsWithComplexTypesTests,
-      Phantoms.toDefinition eithersTests,
-      Phantoms.toDefinition leftValuesTests,
-      Phantoms.toDefinition rightValuesTests,
-      Phantoms.toDefinition polymorphicEithersTests,
-      Phantoms.toDefinition eithersInComplexContextsTests,
-      Phantoms.toDefinition nestedEithersTests,
-      Phantoms.toDefinition eithersWithComplexTypesTests,
-      Phantoms.toDefinition optionalsTests,
-      Phantoms.toDefinition monomorphicOptionalsTests,
-      Phantoms.toDefinition polymorphicOptionalsTests,
-      Phantoms.toDefinition optionalsInComplexContextsTests,
-      Phantoms.toDefinition nestedOptionalsTests,
-      Phantoms.toDefinition optionalsWithComplexTypesTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  supergroup "Algebraic types" [
-  unitTests,
-  pairsTests,
-  eithersTests,
-  optionalsTests]
-
------- Helper functions ------
-
------- Unit ------
-
-unitTests :: TTermDefinition TestGroup
-unitTests = define "unitTests" $
-  supergroup "Unit" [
-  unitTermTests,
-  unitTermInPolymorphicContextTests]
-
-unitTermTests :: TTermDefinition TestGroup
-unitTermTests = define "unitTermTests" $
-  subgroup "Unit term" [
-  noChange "unit literal"
-    unit
-    T.unit]
-
-unitTermInPolymorphicContextTests :: TTermDefinition TestGroup
-unitTermInPolymorphicContextTests = define "unitTermInPolymorphicContextTests" $
-  subgroup "Unit term in polymorphic context" [
-  checkTest "unit from lambda" []
-    (lambda "x" unit)
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") unit)
-    (T.forAlls ["t0"] $ T.function (T.var "t0") T.unit)]
-
------- Pairs ------
-
-pairsTests :: TTermDefinition TestGroup
-pairsTests = define "pairsTests" $
-  supergroup "Pairs" [
-  basicPairsTests,
-  polymorphicPairsTests,
-  pairsInComplexContextsTests,
-  nestedPairsTests,
-  pairsWithComplexTypesTests]
-
-basicPairsTests :: TTermDefinition TestGroup
-basicPairsTests = define "basicPairsTests" $
-  subgroup "Basic pairs" [
-  checkTest "pair of int and string" []
-    (pair (int32 42) (string "hello"))
-    (tyapps (pair (int32 42) (string "hello")) [T.int32, T.string])
-    (T.pair T.int32 T.string),
-  checkTest "pair of string and boolean" []
-    (pair (string "test") (boolean True))
-    (tyapps (pair (string "test") (boolean True)) [T.string, T.boolean])
-    (T.pair T.string T.boolean),
-  checkTest "pair of boolean and int" []
-    (pair (boolean False) (int32 100))
-    (tyapps (pair (boolean False) (int32 100)) [T.boolean, T.int32])
-    (T.pair T.boolean T.int32)]
-
-polymorphicPairsTests :: TTermDefinition TestGroup
-polymorphicPairsTests = define "polymorphicPairsTests" $
-  subgroup "Polymorphic pairs" [
-  checkTest "pair from lambda (first element)" []
-    (lambda "x" $ pair (var "x") (string "constant"))
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapps (pair (var "x") (string "constant")) [T.var "t0", T.string])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.pair (T.var "t0") T.string)),
-  checkTest "pair from lambda (second element)" []
-    (lambda "x" $ pair (string "constant") (var "x"))
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapps (pair (string "constant") (var "x")) [T.string, T.var "t0"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.pair T.string (T.var "t0"))),
-  checkTest "pair from two lambdas" []
-    (lambda "x" $ lambda "y" $ pair (var "x") (var "y"))
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ tyapps (pair (var "x") (var "y")) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.pair (T.var "t0") (T.var "t1")))),
-  checkTest "pair with repeated variable" []
-    (lambda "x" $ pair (var "x") (var "x"))
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapps (pair (var "x") (var "x")) [T.var "t0", T.var "t0"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t0")))]
-
-pairsInComplexContextsTests :: TTermDefinition TestGroup
-pairsInComplexContextsTests = define "pairsInComplexContextsTests" $
-  subgroup "Pairs in complex contexts" [
-  checkTest "pair in list" []
-    (list [pair (int32 1) (string "one"), pair (int32 2) (string "two")])
-    (list [tyapps (pair (int32 1) (string "one")) [T.int32, T.string], tyapps (pair (int32 2) (string "two")) [T.int32, T.string]])
-    (T.list $ T.pair T.int32 T.string),
-  checkTest "pair in let binding" []
-    (lets ["result" >: pair (int32 42) (string "answer")] $
-      var "result")
-    (letsTyped [("result", tyapps (pair (int32 42) (string "answer")) [T.int32, T.string], T.mono $ T.pair T.int32 T.string)] $
-      var "result")
-    (T.pair T.int32 T.string)]
-
-nestedPairsTests :: TTermDefinition TestGroup
-nestedPairsTests = define "nestedPairsTests" $
-  subgroup "Nested pairs" [
-  checkTest "pair of pairs" []
-    (pair (pair (int32 1) (string "one")) (pair (boolean True) (int32 2)))
-    (tyapps (pair (tyapps (pair (int32 1) (string "one")) [T.int32, T.string]) (tyapps (pair (boolean True) (int32 2)) [T.boolean, T.int32])) [T.pair T.int32 T.string, T.pair T.boolean T.int32])
-    (T.pair (T.pair T.int32 T.string) (T.pair T.boolean T.int32)),
-  checkTest "pair with list" []
-    (pair (list [int32 1, int32 2]) (string "numbers"))
-    (tyapps (pair (list [int32 1, int32 2]) (string "numbers")) [T.list T.int32, T.string])
-    (T.pair (T.list T.int32) T.string),
-  checkTest "list of pairs" []
-    (list [pair (int32 1) (string "a"), pair (int32 2) (string "b")])
-    (list [tyapps (pair (int32 1) (string "a")) [T.int32, T.string], tyapps (pair (int32 2) (string "b")) [T.int32, T.string]])
-    (T.list $ T.pair T.int32 T.string)]
-
-personRecord :: String -> String -> Int -> TTerm Term
-personRecord fName lName age' =
-  record (name "Person") [
-    "firstName" >: string fName,
-    "lastName" >: string lName,
-    "age" >: int32 age']
-
-pairsWithComplexTypesTests :: TTermDefinition TestGroup
-pairsWithComplexTypesTests = define "pairsWithComplexTypesTests" $
-  subgroup "Pairs with complex types" [
-  checkTest "pair with record on first" []
-    (pair (personRecord "Alice" "Smith" 30) (int32 1))
-    (tyapps (pair (personRecord "Alice" "Smith" 30) (int32 1)) [T.var "Person", T.int32])
-    (T.pair (T.var "Person") T.int32),
-  checkTest "pair with record on second" []
-    (pair (string "name") (personRecord "Bob" "Jones" 25))
-    (tyapps (pair (string "name") (personRecord "Bob" "Jones" 25)) [T.string, T.var "Person"])
-    (T.pair T.string (T.var "Person"))]
-
------- Eithers ------
-
-eithersTests :: TTermDefinition TestGroup
-eithersTests = define "eithersTests" $
-  supergroup "Eithers" [
-  leftValuesTests,
-  rightValuesTests,
-  polymorphicEithersTests,
-  eithersInComplexContextsTests,
-  nestedEithersTests,
-  eithersWithComplexTypesTests]
-
-leftValuesTests :: TTermDefinition TestGroup
-leftValuesTests = define "leftValuesTests" $
-  subgroup "Left values" [
-  checkTest "left int" []
-    (left $ int32 42)
-    (tylam "t0" $ tyapps (left $ int32 42) [T.int32, T.var "t0"])
-    (T.forAlls ["t0"] $ T.either_ T.int32 (T.var "t0")),
-  checkTest "left string" []
-    (left $ string "error")
-    (tylam "t0" $ tyapps (left $ string "error") [T.string, T.var "t0"])
-    (T.forAlls ["t0"] $ T.either_ T.string (T.var "t0")),
-  checkTest "left boolean" []
-    (left $ boolean False)
-    (tylam "t0" $ tyapps (left $ boolean False) [T.boolean, T.var "t0"])
-    (T.forAlls ["t0"] $ T.either_ T.boolean (T.var "t0"))]
-
-rightValuesTests :: TTermDefinition TestGroup
-rightValuesTests = define "rightValuesTests" $
-  subgroup "Right values" [
-  checkTest "right int" []
-    (right $ int32 42)
-    (tylam "t0" $ tyapps (right $ int32 42) [T.var "t0", T.int32])
-    (T.forAlls ["t0"] $ T.either_ (T.var "t0") T.int32),
-  checkTest "right string" []
-    (right $ string "success")
-    (tylam "t0" $ tyapps (right $ string "success") [T.var "t0", T.string])
-    (T.forAlls ["t0"] $ T.either_ (T.var "t0") T.string),
-  checkTest "right boolean" []
-    (right $ boolean True)
-    (tylam "t0" $ tyapps (right $ boolean True) [T.var "t0", T.boolean])
-    (T.forAlls ["t0"] $ T.either_ (T.var "t0") T.boolean)]
-
-polymorphicEithersTests :: TTermDefinition TestGroup
-polymorphicEithersTests = define "polymorphicEithersTests" $
-  subgroup "Polymorphic eithers" [
-  checkTest "left from lambda" []
-    (lambda "x" $ left $ var "x")
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ tyapps (left $ var "x") [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.either_ (T.var "t0") (T.var "t1"))),
-  checkTest "right from lambda" []
-    (lambda "x" $ right $ var "x")
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ tyapps (right $ var "x") [T.var "t1", T.var "t0"])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.either_ (T.var "t1") (T.var "t0"))),
-  checkTest "either from two lambdas" []
-    (lambda "flag" $ lambda "x" $
-      primitive _logic_ifElse @@ var "flag" @@
-        (left $ var "x") @@
-        (right $ var "x"))
-    (tylam "t0" $ lambdaTyped "flag" T.boolean $ lambdaTyped "x" (T.var "t0") $
-      tyapp (primitive _logic_ifElse) (T.either_ (T.var "t0") (T.var "t0")) @@ var "flag" @@
-        tyapps (left $ var "x") [T.var "t0", T.var "t0"] @@
-        tyapps (right $ var "x") [T.var "t0", T.var "t0"])
-    (T.forAlls ["t0"] $ T.function T.boolean (T.function (T.var "t0") (T.either_ (T.var "t0") (T.var "t0"))))]
-
-eithersInComplexContextsTests :: TTermDefinition TestGroup
-eithersInComplexContextsTests = define "eithersInComplexContextsTests" $
-  subgroup "Eithers in complex contexts" [
-  checkTest "either in list" []
-    (list [left $ string "error", right $ int32 42])
-    (list [tyapps (left $ string "error") [T.string, T.int32], tyapps (right $ int32 42) [T.string, T.int32]])
-    (T.list $ T.either_ T.string T.int32),
-  checkTest "either in let binding" []
-    (lets ["result">: right $ int32 42] $
-      var "result")
-    (tylam "t0" $ letsTyped [("result", tylam "t1" $ tyapps (right $ int32 42) [T.var "t1", T.int32], T.poly ["t1"] $ T.either_ (T.var "t1") T.int32)] $
-      tyapp (var "result") (T.var "t0"))
-    (T.forAlls ["t0"] $ T.either_ (T.var "t0") T.int32)]
-
-nestedEithersTests :: TTermDefinition TestGroup
-nestedEithersTests = define "nestedEithersTests" $
-  subgroup "Nested eithers" [
-  checkTest "either of either (left left)" []
-    (left $ left $ int32 1)
-    (tylams ["t0", "t1"] $ tyapps (left $ tyapps (left $ int32 1) [T.int32, T.var "t0"]) [T.either_ T.int32 (T.var "t0"), T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.either_ (T.either_ T.int32 (T.var "t0")) (T.var "t1")),
-  checkTest "either of either (left right)" []
-    (left $ right $ string "nested")
-    (tylams ["t0", "t1"] $ tyapps (left $ tyapps (right $ string "nested") [T.var "t0", T.string]) [T.either_ (T.var "t0") T.string, T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.either_ (T.either_ (T.var "t0") T.string) (T.var "t1")),
-  checkTest "either of either (right)" []
-    (right $ boolean True)
-    (tylam "t0" $ tyapps (right $ boolean True) [T.var "t0", T.boolean])
-    (T.forAlls ["t0"] $ T.either_ (T.var "t0") T.boolean),
-  checkTest "either of list" []
-    (left $ list [int32 1, int32 2])
-    (tylam "t0" $ tyapps (left $ list [int32 1, int32 2]) [T.list T.int32, T.var "t0"])
-    (T.forAlls ["t0"] $ T.either_ (T.list T.int32) (T.var "t0")),
-  checkTest "list of eithers" []
-    (list [left $ string "a", right $ int32 1, left $ string "b"])
-    (list [tyapps (left $ string "a") [T.string, T.int32], tyapps (right $ int32 1) [T.string, T.int32], tyapps (left $ string "b") [T.string, T.int32]])
-    (T.list $ T.either_ T.string T.int32)]
-
-eithersWithComplexTypesTests :: TTermDefinition TestGroup
-eithersWithComplexTypesTests = define "eithersWithComplexTypesTests" $
-  subgroup "Eithers with complex types" [
-  checkTest "either with record on left" []
-    (left $ record TestTypes.testTypePersonName [
-      "firstName">: string "Alice",
-      "lastName">: string "Smith",
-      "age">: int32 30])
-    (tylam "t0" $ tyapps (left $ record TestTypes.testTypePersonName [
-      "firstName">: string "Alice",
-      "lastName">: string "Smith",
-      "age">: int32 30]) [Core.typeVariable TestTypes.testTypePersonName, T.var "t0"])
-    (T.forAlls ["t0"] $ T.either_ (Core.typeVariable TestTypes.testTypePersonName) (T.var "t0")),
-  checkTest "either with record on right" []
-    (right $ record TestTypes.testTypePersonName [
-      "firstName">: string "Bob",
-      "lastName">: string "Jones",
-      "age">: int32 25])
-    (tylam "t0" $ tyapps (right $ record TestTypes.testTypePersonName [
-      "firstName">: string "Bob",
-      "lastName">: string "Jones",
-      "age">: int32 25]) [T.var "t0", Core.typeVariable TestTypes.testTypePersonName])
-    (T.forAlls ["t0"] $ T.either_ (T.var "t0") (Core.typeVariable TestTypes.testTypePersonName))]
-
------- Optionals ------
-
-optionalsTests :: TTermDefinition TestGroup
-optionalsTests = define "optionalsTests" $
-  supergroup "Optionals" [
-  monomorphicOptionalsTests,
-  polymorphicOptionalsTests,
-  optionalsInComplexContextsTests,
-  nestedOptionalsTests,
-  optionalsWithComplexTypesTests]
-
-monomorphicOptionalsTests :: TTermDefinition TestGroup
-monomorphicOptionalsTests = define "monomorphicOptionalsTests" $
-  subgroup "Monomorphic optionals" [
-  checkTest "nothing" []
-    (optional nothing)
-    (tylam "t0" $ tyapp (optional nothing) (T.var "t0"))
-    (T.forAll "t0" $ T.optional $ T.var "t0"),
-  noChange "just int"
-    (optional $ just $ int32 42)
-    (T.optional T.int32),
-  noChange "just string"
-    (optional $ just $ string "hello")
-    (T.optional T.string),
-  noChange "just boolean"
-    (optional $ just $ boolean True)
-    (T.optional T.boolean)]
-
-polymorphicOptionalsTests :: TTermDefinition TestGroup
-polymorphicOptionalsTests = define "polymorphicOptionalsTests" $
-  subgroup "Polymorphic optionals" [
-  checkTest "optional from lambda" []
-    (lambda "x" $ optional $ just $ var "x")
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ optional $ just $ var "x")
-    (T.forAll "t0" $ T.function (T.var "t0") (T.optional $ T.var "t0")),
-  checkTest "nothing from lambda" []
-    (lambda "x" $ optional nothing)
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ tyapp (optional nothing) (T.var "t1"))
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.optional $ T.var "t1")),
-  checkTest "conditional optional" []
-    (lambda "x" $ lambda "flag" $
-      primitive _logic_ifElse @@ var "flag" @@
-        (optional $ just $ var "x") @@
-        (optional nothing))
-    (tylams ["t0"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "flag" T.boolean $
-      tyapp (primitive _logic_ifElse) (T.optional $ T.var "t0") @@ var "flag" @@
-        (optional $ just $ var "x") @@
-        (tyapp (optional nothing) (T.var "t0")))
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.function T.boolean (T.optional $ T.var "t0")))]
-
-optionalsInComplexContextsTests :: TTermDefinition TestGroup
-optionalsInComplexContextsTests = define "optionalsInComplexContextsTests" $
-  subgroup "Optionals in complex contexts" [
-  checkTest "optional in record" []
-    (record TestTypes.testTypeBuddyListAName [
-      "head">: string "first",
-      "tail">: optional $ just $ record TestTypes.testTypeBuddyListBName [
-        "head">: string "second",
-        "tail">: optional nothing]])
-    (tyapp (record TestTypes.testTypeBuddyListAName [
-      "head">: string "first",
-      "tail">: optional $ just $ tyapp (record TestTypes.testTypeBuddyListBName [
-        "head">: string "second",
-        "tail">: tyapp (optional nothing) (T.apply (Core.typeVariable TestTypes.testTypeBuddyListAName) T.string)]) T.string]) T.string)
-    (T.apply (Core.typeVariable TestTypes.testTypeBuddyListAName) T.string),
-  checkTest "optional in let binding" []
-    (lets ["maybeValue" >: optional $ just $ int32 42] $
-      var "maybeValue")
-    (letsTyped [("maybeValue", optional $ just $ int32 42, T.mono $ T.optional T.int32)] $
-      var "maybeValue")
-    (T.optional T.int32)]
-
-nestedOptionalsTests :: TTermDefinition TestGroup
-nestedOptionalsTests = define "nestedOptionalsTests" $
-  subgroup "Nested optionals" [
-  noChange "optional of optional"
-    (optional $ just $ optional $ just $ string "nested")
-    (T.optional $ T.optional T.string),
-  noChange "optional of list"
-    (optional $ just $ list [int32 1, int32 2, int32 3])
-    (T.optional $ T.list T.int32),
-  checkTest "list of optionals" []
-    (list [optional $ just $ string "a", optional nothing, optional $ just $ string "b"])
-    (list [optional $ just $ string "a", tyapp (optional nothing) T.string, optional $ just $ string "b"])
-    (T.list $ T.optional T.string)]
-
-optionalsWithComplexTypesTests :: TTermDefinition TestGroup
-optionalsWithComplexTypesTests = define "optionalsWithComplexTypesTests" $
-  subgroup "Optionals with complex types" [
-  noChange "optional map"
-    (optional $ just $ mapTerm [(string "key", int32 42)])
-    (T.optional $ T.map T.string T.int32)]
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/All.hs b/src/main/haskell/Hydra/Sources/Test/Checking/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/All.hs
+++ /dev/null
@@ -1,56 +0,0 @@
-
-module Hydra.Sources.Test.Checking.All where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing as Testing
-import Hydra.Sources.Kernel.Types.All
-import Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Meta.Core as Core
-import qualified Hydra.Dsl.Meta.Types as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List as L
-import qualified Data.Map  as M
-
-import qualified Hydra.Sources.Test.Checking.Advanced as Advanced
-import qualified Hydra.Sources.Test.Checking.AlgebraicTypes as AlgebraicTypes
-import qualified Hydra.Sources.Test.Checking.Collections as Collections
-import qualified Hydra.Sources.Test.Checking.Failures as Failures
-import qualified Hydra.Sources.Test.Checking.Fundamentals as Fundamentals
-import qualified Hydra.Sources.Test.Checking.NominalTypes as NominalTypes
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.all"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = namespaces,
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Hydra's type checking test suite"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-    namespaces = [
-      Advanced.ns,
-      AlgebraicTypes.ns,
-      Collections.ns,
-      Failures.ns,
-      Fundamentals.ns,
-      NominalTypes.ns,
-      Namespace "hydra.rewriting"]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    doc "The group of all type checking tests" $
-    Testing.testGroup (string "checking") nothing (list subgroups) (list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = [
-      Advanced.allTests,
-      AlgebraicTypes.allTests,
-      Collections.allTests,
-      Failures.allTests,
-      Fundamentals.allTests,
-      NominalTypes.allTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/Collections.hs b/src/main/haskell/Hydra/Sources/Test/Checking/Collections.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/Collections.hs
+++ /dev/null
@@ -1,335 +0,0 @@
-
--- | Collection type checking test cases: lists, sets, maps
-module Hydra.Sources.Test.Checking.Collections where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.collections"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.rewriting"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Collection type checking test cases: lists, sets, maps")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition listsTests,
-      Phantoms.toDefinition listsOfLiteralsTests,
-      Phantoms.toDefinition emptyListsTests,
-      Phantoms.toDefinition polymorphicListsTests,
-      Phantoms.toDefinition nestedListsTests,
-      Phantoms.toDefinition listsInComplexContextsTests,
-      Phantoms.toDefinition mapsTests,
-      Phantoms.toDefinition monomorphicMapsTests,
-      Phantoms.toDefinition polymorphicMapsTests,
-      Phantoms.toDefinition mapsInComplexContextsTests,
-      Phantoms.toDefinition mapsWithComplexTypesTests,
-      Phantoms.toDefinition setsTests,
-      Phantoms.toDefinition monomorphicSetsTests,
-      Phantoms.toDefinition polymorphicSetsTests,
-      Phantoms.toDefinition setsInComplexContextsTests,
-      Phantoms.toDefinition nestedSetsTests,
-      Phantoms.toDefinition setsWithComplexTypesTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  supergroup "Collections" [
-  listsTests,
-  setsTests,
-  mapsTests]
-
------- Helper functions ------
-
------- Lists ------
-
-listsTests :: TTermDefinition TestGroup
-listsTests = define "listsTests" $
-  supergroup "Lists" [
-  listsOfLiteralsTests,
-  emptyListsTests,
-  polymorphicListsTests,
-  nestedListsTests,
-  listsInComplexContextsTests]
-
-listsOfLiteralsTests :: TTermDefinition TestGroup
-listsOfLiteralsTests = define "listsOfLiteralsTests" $
-  subgroup "Lists of literals" [
-  noChange "int list"
-    (list [int32 1, int32 2])
-    (T.list T.int32),
-  noChange "string list"
-    (list [string "hello", string "world"])
-    (T.list T.string),
-  noChange "single element list"
-    (list [bigint 42])
-    (T.list T.bigint),
-  noChange "mixed numeric types"
-    (list [float32 1.0, float32 2.5, float32 3.14])
-    (T.list T.float32)]
-
-emptyListsTests :: TTermDefinition TestGroup
-emptyListsTests = define "emptyListsTests" $
-  subgroup "Empty lists" [
-  checkTest "empty list" []
-    (list [])
-    (tylam "t0" $ tyapp (list []) (T.var "t0"))
-    (T.forAll "t0" $ T.list $ T.var "t0"),
-  checkTest "pair of empty lists" []
-    (pair (list []) (list []))
-    (tylams ["t0", "t1"] $
-      tyapps (pair (tyapp (list []) (T.var "t0")) (tyapp (list []) (T.var "t1"))) [T.list $ T.var "t0", T.list $ T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.pair (T.list $ T.var "t0") (T.list $ T.var "t1")),
-  checkTest "empty list in tuple" []
-    (tuple [list [], string "context"])
-    (tylam "t0" $ tyapps (pair (tyapp (list []) (T.var "t0")) (string "context")) [T.list $ T.var "t0", T.string])
-    (T.forAll "t0" $ T.pair (T.list $ T.var "t0") T.string)]
-
-polymorphicListsTests :: TTermDefinition TestGroup
-polymorphicListsTests = define "polymorphicListsTests" $
-  subgroup "Polymorphic lists" [
-  checkTest "list from lambda" []
-    (lambda "x" $ list [var "x"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ list [var "x"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.list $ T.var "t0")),
-  checkTest "list with repeated var" []
-    (lambda "x" $ list [var "x", var "x"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ list [var "x", var "x"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.list $ T.var "t0")),
-  checkTest "list from two lambdas" []
-    (lambda "x" $ lambda "y" $ list [var "x", var "y"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t0") $ list [var "x", var "y"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.function (T.var "t0") (T.list $ T.var "t0")))]
-
-nestedListsTests :: TTermDefinition TestGroup
-nestedListsTests = define "nestedListsTests" $
-  subgroup "Nested lists" [
-  noChange "list of lists"
-    (list [list [int32 1], list [int32 2, int32 3]])
-    (T.list $ T.list T.int32),
-  checkTest "empty nested lists" []
-    (list [list [], list []])
-    (tylam "t0" $ list [tyapp (list []) (T.var "t0"), tyapp (list []) (T.var "t0")])
-    (T.forAll "t0" $ T.list $ T.list $ T.var "t0"),
-  checkTest "nested polymorphic" []
-    (lambda "x" $ list [list [var "x"]])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ list [list [var "x"]])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.list $ T.list $ T.var "t0"))]
-
-listsInComplexContextsTests :: TTermDefinition TestGroup
-listsInComplexContextsTests = define "listsInComplexContextsTests" $
-  subgroup "Lists in complex contexts" [
-  checkTest "multiple lists in tuple" []
-    (tuple [
-      list [int32 1, int32 2],
-      list [string "a", string "b"]])
-    (tyapps (pair (list [int32 1, int32 2]) (list [string "a", string "b"])) [T.list T.int32, T.list T.string])
-    (T.pair (T.list T.int32) (T.list T.string))]
-
------- Maps ------
-
-mapsTests :: TTermDefinition TestGroup
-mapsTests = define "mapsTests" $
-  supergroup "Maps" [
-  monomorphicMapsTests,
-  polymorphicMapsTests,
-  mapsInComplexContextsTests,
-  mapsWithComplexTypesTests]
-
-monomorphicMapsTests :: TTermDefinition TestGroup
-monomorphicMapsTests = define "monomorphicMapsTests" $
-  subgroup "Monomorphic maps" [
-  checkTest "empty map" []
-    (mapTerm [])
-    (tylams ["t0", "t1"] $ tyapps (mapTerm []) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.map (T.var "t0") (T.var "t1")),
-  noChange "int to string map"
-    (mapTerm [(int32 1, string "one"),
-                        (int32 2, string "two")])
-    (T.map T.int32 T.string),
-  noChange "string to int map"
-    (mapTerm [(string "a", int32 1),
-                        (string "b", int32 2)])
-    (T.map T.string T.int32),
-  noChange "single entry map"
-    (mapTerm [(bigint 42, boolean True)])
-    (T.map T.bigint T.boolean)]
-
-polymorphicMapsTests :: TTermDefinition TestGroup
-polymorphicMapsTests = define "polymorphicMapsTests" $
-  subgroup "Polymorphic maps" [
-  checkTest "map from lambda keys" []
-    (lambda "k" $ mapTerm [(var "k", string "value")])
-    (tylam "t0" $ lambdaTyped "k" (T.var "t0") $ mapTerm [(var "k", string "value")])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.map (T.var "t0") T.string)),
-  checkTest "map from lambda values" []
-    (lambda "v" $ mapTerm [(string "key", var "v")])
-    (tylam "t0" $ lambdaTyped "v" (T.var "t0") $ mapTerm [(string "key", var "v")])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.map T.string (T.var "t0"))),
-  checkTest "map from lambda both" []
-    (lambda "k" $ lambda "v" $ mapTerm [(var "k", var "v")])
-    (tylams ["t0", "t1"] $ lambdaTyped "k" (T.var "t0") $ lambdaTyped "v" (T.var "t1") $ mapTerm [(var "k", var "v")])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.map (T.var "t0") (T.var "t1")))),
-  checkTest "map with repeated variables" []
-    (lambda "x" $ mapTerm [(var "x", var "x")])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ mapTerm [(var "x", var "x")])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.map (T.var "t0") (T.var "t0")))]
-
-mapsInComplexContextsTests :: TTermDefinition TestGroup
-mapsInComplexContextsTests = define "mapsInComplexContextsTests" $
-  subgroup "Maps in complex contexts" [
-  checkTest "map in tuple" []
-    (tuple [mapTerm [(int32 1, string "one")],
-            string "context"])
-    (tyapps (pair (mapTerm [(int32 1, string "one")]) (string "context")) [T.map T.int32 T.string, T.string])
-    (T.pair (T.map T.int32 T.string) T.string),
-  noChange "nested maps"
-    (mapTerm [(string "outer", mapTerm [(int32 1, boolean True)])])
-    (T.map T.string (T.map T.int32 T.boolean)),
-  checkTest "map in let binding" []
-    (lets ["lookup">: mapTerm [(string "key1", int32 100),
-                                         (string "key2", int32 200)]] $
-          var "lookup")
-    (letsTyped [("lookup", mapTerm [(string "key1", int32 100),
-                                              (string "key2", int32 200)],
-                 T.mono $ T.map T.string T.int32)] $
-      var "lookup")
-    (T.map T.string T.int32)]
-
-mapsWithComplexTypesTests :: TTermDefinition TestGroup
-mapsWithComplexTypesTests = define "mapsWithComplexTypesTests" $
-  subgroup "Maps with complex types" [
-  noChange "map of records"
-    (mapTerm [(string "person1",
-                   record TestTypes.testTypePersonName [
-                     "firstName">: string "Alice",
-                     "lastName">: string "Smith",
-                     "age">: int32 25])])
-    (T.map T.string (Core.typeVariable TestTypes.testTypePersonName)),
-  noChange "map of lists"
-    (mapTerm [(int32 1, list [string "a", string "b"]),
-                        (int32 2, list [string "c", string "d"])])
-    (T.map T.int32 (T.list T.string)),
-  checkTest "map of tuples" []
-    (mapTerm [(string "coords", tuple [int32 10, int32 20])])
-    (mapTerm [(string "coords", tyapps (pair (int32 10) (int32 20)) [T.int32, T.int32])])
-    (T.map T.string (T.pair T.int32 T.int32))]
-
------- Sets ------
-
-setsTests :: TTermDefinition TestGroup
-setsTests = define "setsTests" $
-  supergroup "Sets" [
-  monomorphicSetsTests,
-  polymorphicSetsTests,
-  setsInComplexContextsTests,
-  nestedSetsTests,
-  setsWithComplexTypesTests]
-
-monomorphicSetsTests :: TTermDefinition TestGroup
-monomorphicSetsTests = define "monomorphicSetsTests" $
-  subgroup "Monomorphic sets" [
-  checkTest "empty set" []
-    (Terms.set [])
-    (tylam "t0" $ tyapp (Terms.set []) (T.var "t0"))
-    (T.forAll "t0" $ T.set $ T.var "t0"),
-  noChange "int set"
-    (Terms.set [int32 1, int32 2, int32 3])
-    (T.set T.int32),
-  noChange "string set"
-    (Terms.set [string "apple", string "banana", string "cherry"])
-    (T.set T.string),
-  noChange "single element set"
-    (Terms.set [boolean True])
-    (T.set T.boolean)]
-
-polymorphicSetsTests :: TTermDefinition TestGroup
-polymorphicSetsTests = define "polymorphicSetsTests" $
-  subgroup "Polymorphic sets" [
-  checkTest "set from lambda" []
-    (lambda "x" $ Terms.set [var "x"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ Terms.set [var "x"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.set $ T.var "t0")),
-  checkTest "set with repeated variable" []
-    (lambda "x" $ Terms.set [var "x", var "x"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ Terms.set [var "x", var "x"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.set $ T.var "t0")),
-  checkTest "set from two variables" []
-    (lambda "x" $ lambda "y" $ Terms.set [var "x", var "y"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t0") $ Terms.set [var "x", var "y"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.function (T.var "t0") (T.set $ T.var "t0")))]
-
-setsInComplexContextsTests :: TTermDefinition TestGroup
-setsInComplexContextsTests = define "setsInComplexContextsTests" $
-  subgroup "Sets in complex contexts" [
-  checkTest "set in tuple" []
-    (tuple [Terms.set [int32 1, int32 2], string "context"])
-    (tyapps (pair (Terms.set [int32 1, int32 2]) (string "context")) [T.set T.int32, T.string])
-    (T.pair (T.set T.int32) T.string),
-  checkTest "set in let binding" []
-    (lets ["numbers">: Terms.set [int32 10, int32 20, int32 30]] $
-      var "numbers")
-    (letsTyped [("numbers", Terms.set [int32 10, int32 20, int32 30],
-      T.mono $ T.set T.int32)] $
-      var "numbers")
-    (T.set T.int32)]
-
-nestedSetsTests :: TTermDefinition TestGroup
-nestedSetsTests = define "nestedSetsTests" $
-  subgroup "Nested sets" [
-  noChange "set of lists"
-    (Terms.set [
-      list [string "a", string "b"],
-      list [string "c", string "d"]])
-    (T.set $ T.list T.string),
-  checkTest "set of tuples" []
-    (Terms.set [
-      tuple [int32 1, int32 2],
-      tuple [int32 3, int32 4]])
-    (Terms.set [
-      tyapps (pair (int32 1) (int32 2)) [T.int32, T.int32],
-      tyapps (pair (int32 3) (int32 4)) [T.int32, T.int32]])
-    (T.set $ T.pair T.int32 T.int32),
-  noChange "set of sets"
-    (Terms.set [Terms.set [string "nested"]])
-    (T.set $ T.set T.string)]
-
-setsWithComplexTypesTests :: TTermDefinition TestGroup
-setsWithComplexTypesTests = define "setsWithComplexTypesTests" $
-  subgroup "Sets with complex types" [
-  noChange "set of records"
-    (Terms.set [record TestTypes.testTypePersonName [
-      "firstName">: string "Alice",
-      "lastName">: string "Smith",
-      "age">: int32 30]])
-    (T.set $ Core.typeVariable TestTypes.testTypePersonName),
-  checkTest "set of optionals" []
-    (Terms.set [
-      optional $ just $ int32 42,
-      optional nothing])
-    (Terms.set [
-      optional $ just $ int32 42,
-      tyapp (optional nothing) T.int32])
-    (T.set $ T.optional T.int32),
-  noChange "set of maps"
-    (Terms.set [Terms.map $ Phantoms.map $ M.singleton (string "key") (int32 42)])
-    (T.set $ T.map T.string T.int32)]
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/Failures.hs b/src/main/haskell/Hydra/Sources/Test/Checking/Failures.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/Failures.hs
+++ /dev/null
@@ -1,56 +0,0 @@
-
--- | Type checking failure test cases
-module Hydra.Sources.Test.Checking.Failures where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.failures"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.rewriting"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Type checking failure test cases")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition failOnUntypedTests,
-      Phantoms.toDefinition untypedLambdasTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Type checking failure test cases" $
-  supergroup "Failures" [
-    failOnUntypedTests]
-
------- Helper functions ------
-
------- Fail on untyped (pre-inference) terms ------
-
-failOnUntypedTests :: TTermDefinition TestGroup
-failOnUntypedTests = define "failOnUntypedTests" $
-  supergroup "Fail on untyped (pre-inference) terms" [
-    untypedLambdasTests]
-
-untypedLambdasTests :: TTermDefinition TestGroup
-untypedLambdasTests = define "untypedLambdasTests" $
-  subgroup "Untyped lambdas" ([] :: [TTerm TestCaseWithMetadata])
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/Fundamentals.hs b/src/main/haskell/Hydra/Sources/Test/Checking/Fundamentals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/Fundamentals.hs
+++ /dev/null
@@ -1,892 +0,0 @@
-
--- | Fundamental type checking test cases: literals, variables, lambdas, applications, let terms, and primitives
-module Hydra.Sources.Test.Checking.Fundamentals where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import qualified Data.ByteString              as B
-import qualified Data.ByteString.Char8        as BC
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.fundamentals"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.rewriting"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Fundamental type checking test cases: literals, variables, lambdas, applications, let terms, and primitives")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition applicationsTests,
-      Phantoms.toDefinition simpleFunctionApplicationsTests,
-      Phantoms.toDefinition partialApplicationsTests,
-      Phantoms.toDefinition higherOrderApplicationsTests,
-      Phantoms.toDefinition polymorphicApplicationsTests,
-      Phantoms.toDefinition applicationsInComplexContextsTests,
-      Phantoms.toDefinition applicationsWithComplexArgumentsTests,
-      Phantoms.toDefinition lambdasTests,
-      Phantoms.toDefinition simpleLambdasTests,
-      Phantoms.toDefinition multiParameterLambdasTests,
-      Phantoms.toDefinition lambdasWithOperationsTests,
-      Phantoms.toDefinition nestedLambdasTests,
-      Phantoms.toDefinition lambdasInComplexContextsTests,
-      Phantoms.toDefinition higherOrderLambdasTests,
-      Phantoms.toDefinition letTermsTests,
-      Phantoms.toDefinition simpleLetBindingsTests,
-      Phantoms.toDefinition letTermsWithShadowingTests,
-      Phantoms.toDefinition recursiveBindingsTests,
-      Phantoms.toDefinition mutualRecursionTests,
-      Phantoms.toDefinition nestedLetTermsTests,
-      Phantoms.toDefinition letWithComplexExpressionsTests,
-      Phantoms.toDefinition literalsTests,
-      Phantoms.toDefinition booleanLiteralsTests,
-      Phantoms.toDefinition stringLiteralsTests,
-      Phantoms.toDefinition integerLiteralsTests,
-      Phantoms.toDefinition floatLiteralsTests,
---      toDefinition binaryLiteralsTests,  -- TODO: restore when binary literal code generation is supported
-      Phantoms.toDefinition literalsInComplexContextsTests,
-      Phantoms.toDefinition primitivesTests,
-      Phantoms.toDefinition nullaryPrimitivesTests,
-      Phantoms.toDefinition unaryPrimitivesTests,
-      Phantoms.toDefinition binaryPrimitivesTests,
-      Phantoms.toDefinition ternaryPrimitivesTests,
-      Phantoms.toDefinition monomorphicVsPolymorphicTests,
-      Phantoms.toDefinition higherOrderPrimitivesTests,
-      Phantoms.toDefinition primitivesInComplexContextsTests,
-      Phantoms.toDefinition variablesTests,
-      Phantoms.toDefinition simpleVariableLookupTests,
-      Phantoms.toDefinition variableScopingTests,
-      Phantoms.toDefinition polymorphicVariablesTests,
-      Phantoms.toDefinition variablesInComplexContextsTests,
-      Phantoms.toDefinition recursiveVariablesTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  supergroup "Fundamentals" [
-  literalsTests,
-  variablesTests,
-  lambdasTests,
-  applicationsTests,
-  letTermsTests,
-  primitivesTests]
-
------- Helper functions ------
-
------- Applications ------
-
-applicationsTests :: TTermDefinition TestGroup
-applicationsTests = define "applicationsTests" $
-  supergroup "Applications" [
-  simpleFunctionApplicationsTests,
-  partialApplicationsTests,
-  higherOrderApplicationsTests,
-  polymorphicApplicationsTests,
-  applicationsInComplexContextsTests,
-  applicationsWithComplexArgumentsTests]
-
-simpleFunctionApplicationsTests :: TTermDefinition TestGroup
-simpleFunctionApplicationsTests = define "simpleFunctionApplicationsTests" $
-  subgroup "Simple function applications" [
-  checkTest "identity application" []
-    (lambda "x" (var "x") @@ int32 42)
-    (lambdaTyped "x" T.int32 (var "x") @@ int32 42)
-    T.int32,
-  noChange "primitive application"
-    (primitive _math_add @@ int32 10 @@ int32 20)
-    T.int32,
-  noChange "string concatenation"
-    (primitive _strings_cat2 @@ string "hello" @@ string "world")
-    T.string]
-
-partialApplicationsTests :: TTermDefinition TestGroup
-partialApplicationsTests = define "partialApplicationsTests" $
-  subgroup "Partial applications" [
-  noChange "partially applied add"
-    (primitive _math_add @@ int32 5)
-    (T.function T.int32 T.int32),
-  noChange "partially applied string cat"
-    (primitive _strings_cat2 @@ string "prefix")
-    (T.function T.string T.string)]
-
-higherOrderApplicationsTests :: TTermDefinition TestGroup
-higherOrderApplicationsTests = define "higherOrderApplicationsTests" $
-  subgroup "Higher-order applications" [
-  checkTest "apply function to function" []
-    (lets ["apply">: lambda "f" $ lambda "x" $ var "f" @@ var "x",
-           "double">: lambda "n" $ primitive _math_mul @@ var "n" @@ int32 2] $
-      var "apply" @@ var "double" @@ int32 5)
-    (letsTyped [
-      ("apply", tylams ["t0", "t1"] $ lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $ lambdaTyped "x" (T.var "t0") $ var "f" @@ var "x",
-        T.poly ["t0", "t1"] $ T.function (T.function (T.var "t0") (T.var "t1")) (T.function (T.var "t0") (T.var "t1"))),
-      ("double", lambdaTyped "n" T.int32 $ primitive _math_mul @@ var "n" @@ int32 2,
-        T.mono $ T.function T.int32 T.int32)] $
-      tyapps (var "apply") [T.int32, T.int32] @@ var "double" @@ int32 5)
-    T.int32,
-  checkTest "function composition" []
-    (lets ["compose">: lambda "f" $ lambda "g" $ lambda "x" $ var "f" @@ (var "g" @@ var "x"),
-           "add1">: lambda "n" $ primitive _math_add @@ var "n" @@ int32 1,
-           "mul2">: lambda "n" $ primitive _math_mul @@ var "n" @@ int32 2] $
-      var "compose" @@ var "add1" @@ var "mul2" @@ int32 3)
-    (letsTyped [
-      ("compose", tylams ["t0", "t1", "t2"] $ lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $ lambdaTyped "g" (T.function (T.var "t2") (T.var "t0")) $ lambdaTyped "x" (T.var "t2") $ var "f" @@ (var "g" @@ var "x"),
-        T.poly ["t0", "t1", "t2"] $ T.function (T.function (T.var "t0") (T.var "t1")) (T.function (T.function (T.var "t2") (T.var "t0")) (T.function (T.var "t2") (T.var "t1")))),
-      ("add1", lambdaTyped "n" T.int32 $ primitive _math_add @@ var "n" @@ int32 1,
-        T.mono $ T.function T.int32 T.int32),
-      ("mul2", lambdaTyped "n" T.int32 $ primitive _math_mul @@ var "n" @@ int32 2,
-        T.mono $ T.function T.int32 T.int32)] $
-      tyapps (var "compose") [T.int32, T.int32, T.int32] @@ var "add1" @@ var "mul2" @@ int32 3)
-    T.int32]
-
-polymorphicApplicationsTests :: TTermDefinition TestGroup
-polymorphicApplicationsTests = define "polymorphicApplicationsTests" $
-  subgroup "Polymorphic applications" [
-  checkTest "polymorphic identity" []
-    (lets ["id">: lambda "x" $ var "x"] $
-      tuple [var "id" @@ int32 42, var "id" @@ string "hello"])
-    (letsTyped [
-      ("id", tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x",
-        T.poly ["t0"] $ T.function (T.var "t0") (T.var "t0"))] $
-      tyapps (pair (tyapp (var "id") T.int32 @@ int32 42) (tyapp (var "id") T.string @@ string "hello")) [T.int32, T.string])
-    (T.pair T.int32 T.string),
-  checkTest "polymorphic const" []
-    (lets ["const">: lambdas ["x", "y"] $ var "x"] $
-      var "const" @@ string "keep" @@ int32 999)
-    (letsTyped [
-      ("const", tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ var "x",
-        T.poly ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.var "t0")))] $
-      tyapps (var "const") [T.string, T.int32] @@ string "keep" @@ int32 999)
-    T.string,
-  checkTest "polymorphic flip" []
-    (lets ["flip">: lambda "f" $ lambda "x" $ lambda "y" $ var "f" @@ var "y" @@ var "x"] $
-      var "flip" @@ primitive _strings_cat2 @@ string "world" @@ string "hello")
-    (letsTyped [
-      ("flip", tylams ["t0", "t1", "t2"] $ lambdaTyped "f" (T.function (T.var "t0") (T.function (T.var "t1") (T.var "t2"))) $ lambdaTyped "x" (T.var "t1") $ lambdaTyped "y" (T.var "t0") $ var "f" @@ var "y" @@ var "x",
-        T.poly ["t0", "t1", "t2"] $ T.function (T.function (T.var "t0") (T.function (T.var "t1") (T.var "t2"))) (T.function (T.var "t1") (T.function (T.var "t0") (T.var "t2"))))] $
-      tyapps (var "flip") [T.string, T.string, T.string] @@ primitive _strings_cat2 @@ string "world" @@ string "hello")
-    T.string]
-
-applicationsInComplexContextsTests :: TTermDefinition TestGroup
-applicationsInComplexContextsTests = define "applicationsInComplexContextsTests" $
-  subgroup "Applications in complex contexts" [
-  checkTest "application in tuple" []
-    (tuple [primitive _math_add @@ int32 1 @@ int32 2,
-            primitive _strings_cat2 @@ string "a" @@ string "b"])
-    (tyapps (pair (primitive _math_add @@ int32 1 @@ int32 2) (primitive _strings_cat2 @@ string "a" @@ string "b")) [T.int32, T.string])
-    (T.pair T.int32 T.string),
-  noChange "application in record"
-    (record TestTypes.testTypePersonName [
-      "firstName">: primitive _strings_cat2 @@ string "John" @@ string "ny",
-      "lastName">: string "Doe",
-      "age">: primitive _math_add @@ int32 20 @@ int32 5])
-    (Core.typeVariable TestTypes.testTypePersonName),
-  checkTest "application in let binding" []
-    (lets ["result">: primitive _math_mul @@ int32 6 @@ int32 7] $
-      var "result")
-    (letsTyped [
-      ("result", primitive _math_mul @@ int32 6 @@ int32 7,
-        T.mono T.int32)] $
-      var "result")
-    T.int32,
-  noChange "nested applications"
-    (primitive _math_add @@ (primitive _math_mul @@ int32 3 @@ int32 4) @@ (primitive _math_add @@ int32 1 @@ int32 2))
-    T.int32]
-
-applicationsWithComplexArgumentsTests :: TTermDefinition TestGroup
-applicationsWithComplexArgumentsTests = define "applicationsWithComplexArgumentsTests" $
-  subgroup "Applications with complex arguments" [
-  checkTest "application with record argument" []
-    (lets ["getName">: lambda "person" $ project TestTypes.testTypePersonName (name "firstName") @@ var "person"] $
-      var "getName" @@ record TestTypes.testTypePersonName [
-        "firstName">: string "Alice",
-        "lastName">: string "Smith",
-        "age">: int32 25])
-    (letsTyped [
-      ("getName", lambdaTyped "person" (Core.typeVariable TestTypes.testTypePersonName) $ project TestTypes.testTypePersonName (name "firstName") @@ var "person",
-        T.mono $ T.function (Core.typeVariable TestTypes.testTypePersonName) T.string)] $
-      var "getName" @@ record TestTypes.testTypePersonName [
-        "firstName">: string "Alice",
-        "lastName">: string "Smith",
-        "age">: int32 25])
-    T.string,
-  checkTest "application with list argument" []
-    (lets ["maybeHead">: lambda "xs" $ primitive _lists_maybeHead @@ var "xs"] $
-      var "maybeHead" @@ list [string "first", string "second"])
-    (letsTyped [
-      ("maybeHead", tylam "t0" $ lambdaTyped "xs" (T.list (T.var "t0")) $ tyapp (primitive _lists_maybeHead) (T.var "t0") @@ var "xs",
-        T.poly ["t0"] $ T.function (T.list (T.var "t0")) (T.optional (T.var "t0")))] $
-      tyapp (var "maybeHead") T.string @@ list [string "first", string "second"])
-    (T.optional T.string)]
-
------- Lambdas ------
-
-lambdasTests :: TTermDefinition TestGroup
-lambdasTests = define "lambdasTests" $
-  supergroup "Lambdas" [
-  simpleLambdasTests,
-  multiParameterLambdasTests,
-  lambdasWithOperationsTests,
-  nestedLambdasTests,
-  lambdasInComplexContextsTests,
-  higherOrderLambdasTests]
-
-simpleLambdasTests :: TTermDefinition TestGroup
-simpleLambdasTests = define "simpleLambdasTests" $
-  subgroup "Simple lambdas" [
-  checkTest "identity function" []
-    (lambda "x" $ var "x")
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x")
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "constant function" []
-    (lambda "x" $ int32 42)
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ int32 42)
-    (T.forAlls ["t0"] $ T.function (T.var "t0") T.int32)]
-
-multiParameterLambdasTests :: TTermDefinition TestGroup
-multiParameterLambdasTests = define "multiParameterLambdasTests" $
-  subgroup "Multi-parameter lambdas" [
-  checkTest "two parameters" []
-    (lambda "x" $ lambda "y" $ var "x")
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ var "x")
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.var "t0"))),
-  checkTest "three parameters" []
-    (lambda "x" $ lambda "y" $ lambda "z" $ var "y")
-    (tylams ["t0", "t1", "t2"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ lambdaTyped "z" (T.var "t2") $ var "y")
-    (T.forAlls ["t0", "t1", "t2"] $ T.function
-      (T.var "t0")
-      (T.function (T.var "t1") (T.function (T.var "t2") (T.var "t1")))),
-  checkTest "parameter reuse" []
-    (lambda "x" $ lambda "y" $ tuple [var "x", var "x", var "y"])
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ tyapps (pair (var "x") (tyapps (pair (var "x") (var "y")) [T.var "t0", T.var "t1"])) [T.var "t0", T.pair (T.var "t0") (T.var "t1")])
-    (T.forAlls ["t0", "t1"] $ T.function
-      (T.var "t0") (T.function (T.var "t1")
-      (T.pair (T.var "t0") (T.pair (T.var "t0") (T.var "t1")))))]
-
-lambdasWithOperationsTests :: TTermDefinition TestGroup
-lambdasWithOperationsTests = define "lambdasWithOperationsTests" $
-  subgroup "Lambdas with operations" [
-  checkTest "lambda with primitive" []
-    (lambda "x" $ primitive _math_add @@ var "x" @@ int32 1)
-    (lambdaTyped "x" T.int32 $ primitive _math_add @@ var "x" @@ int32 1)
-    (T.function T.int32 T.int32),
-  checkTest "lambda with application" []
-    (lambda "f" $ lambda "x" $ var "f" @@ var "x")
-    (tylams ["t0", "t1"] $ lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $ lambdaTyped "x" (T.var "t0") $ var "f" @@ var "x")
-    (T.forAlls ["t0", "t1"] $ T.function (T.function (T.var "t0") (T.var "t1")) (T.function (T.var "t0") (T.var "t1"))),
-  checkTest "lambda with construction" []
-    (lambda "x" $ lambda "y" $ tuple [var "x", var "y"])
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ tyapps (pair (var "x") (var "y")) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.pair (T.var "t0") (T.var "t1"))))]
-
-nestedLambdasTests :: TTermDefinition TestGroup
-nestedLambdasTests = define "nestedLambdasTests" $
-  subgroup "Nested lambdas" [
-  checkTest "lambda returning lambda" []
-    (lambda "x" $ lambda "y" $ lambda "z" $ var "x")
-    (tylams ["t0", "t1", "t2"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ lambdaTyped "z" (T.var "t2") $ var "x")
-    (T.forAlls ["t0", "t1", "t2"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.function (T.var "t2") (T.var "t0")))),
-  checkTest "lambda with let binding" []
-    (lambda "x" $ lets ["y">: var "x"] $ var "y")
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ letsTyped [("y", var "x", T.mono (T.var "t0"))] $ var "y")
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "lambda with inner lambda" []
-    (lambda "outer" $ lets ["inner">: lambda "x" $ var "x"] $ var "inner" @@ var "outer")
-    (tylam "t0" $ lambdaTyped "outer" (T.var "t0") $ letsTyped [("inner", tylam "t1" $ lambdaTyped "x" (T.var "t1") $ var "x", T.poly ["t1"] $ T.function (T.var "t1") (T.var "t1"))] $ tyapp (var "inner") (T.var "t0") @@ var "outer")
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0"))]
-
-lambdasInComplexContextsTests :: TTermDefinition TestGroup
-lambdasInComplexContextsTests = define "lambdasInComplexContextsTests" $
-  subgroup "Lambdas in complex contexts" [
-  checkTest "lambda in tuple" []
-    (tuple [lambda "x" $ var "x", int32 42])
-    (tylam "t0" $ tyapps (pair (lambdaTyped "x" (T.var "t0") $ var "x") (int32 42)) [T.function (T.var "t0") (T.var "t0"), T.int32])
-    (T.forAlls ["t0"] $ T.pair (T.function (T.var "t0") (T.var "t0")) T.int32),
-  checkTest "lambda in list" []
-    (list [lambda "x" $ primitive _math_add @@ var "x" @@ int32 1,
-           lambda "y" $ primitive _math_mul @@ var "y" @@ int32 2])
-    (list [lambdaTyped "x" T.int32 $ primitive _math_add @@ var "x" @@ int32 1,
-           lambdaTyped "y" T.int32 $ primitive _math_mul @@ var "y" @@ int32 2])
-    (T.list $ T.function T.int32 T.int32),
-  checkTest "lambda in record" []
-    (lambda "name" $ record TestTypes.testTypePersonName [
-      "firstName">: var "name",
-      "lastName">: string "Doe",
-      "age">: int32 30])
-    (lambdaTyped "name" T.string $ record TestTypes.testTypePersonName [
-      "firstName">: var "name",
-      "lastName">: string "Doe",
-      "age">: int32 30])
-    (T.function T.string (Core.typeVariable TestTypes.testTypePersonName))]
-
-higherOrderLambdasTests :: TTermDefinition TestGroup
-higherOrderLambdasTests = define "higherOrderLambdasTests" $
-  subgroup "Higher-order lambdas" [
-  checkTest "function composition" []
-    (lambda "f" $ lambda "g" $ lambda "x" $ var "f" @@ (var "g" @@ var "x"))
-    (tylams ["t0", "t1", "t2"] $ lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $ lambdaTyped "g" (T.function (T.var "t2") (T.var "t0")) $ lambdaTyped "x" (T.var "t2") $ var "f" @@ (var "g" @@ var "x"))
-    (T.forAlls ["t0", "t1", "t2"] $ T.function
-      (T.function (T.var "t0") (T.var "t1"))
-      (T.function
-        (T.function (T.var "t2") (T.var "t0"))
-        (T.function (T.var "t2") (T.var "t1")))),
-  checkTest "function application" []
-    (lambda "f" $ lambda "x" $ var "f" @@ var "x")
-    (tylams ["t0", "t1"] $ lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $ lambdaTyped "x" (T.var "t0") $ var "f" @@ var "x")
-    (T.forAlls ["t0", "t1"] $ T.function (T.function (T.var "t0") (T.var "t1")) (T.function (T.var "t0") (T.var "t1"))),
-  checkTest "curried function" []
-    (lambda "x" $ lambda "y" $ lambda "z" $ primitive _logic_ifElse @@ var "x" @@ var "y" @@ var "z")
-    (tylam "t0" $ lambdaTyped "x" T.boolean $ lambdaTyped "y" (T.var "t0") $ lambdaTyped "z" (T.var "t0") $ tyapp (primitive _logic_ifElse) (T.var "t0") @@ var "x" @@ var "y" @@ var "z")
-    (T.forAlls ["t0"] $ T.function T.boolean (T.function (T.var "t0") (T.function (T.var "t0") (T.var "t0"))))]
-
------- Let terms ------
-
-letTermsTests :: TTermDefinition TestGroup
-letTermsTests = define "letTermsTests" $
-  supergroup "Let terms" [
-  simpleLetBindingsTests,
-  letTermsWithShadowingTests,
-  recursiveBindingsTests,
-  mutualRecursionTests,
-  nestedLetTermsTests,
-  letWithComplexExpressionsTests]
-
-simpleLetBindingsTests :: TTermDefinition TestGroup
-simpleLetBindingsTests = define "simpleLetBindingsTests" $
-  subgroup "Simple let bindings" [
-  checkTest "single binding" []
-    (lets ["x">: int32 42] $
-          var "x")
-    (letsTyped [("x", int32 42, T.mono T.int32)] $
-      var "x")
-    T.int32,
-  checkTest "multiple bindings" []
-    (lets ["x">: int32 42,
-           "y">: string "hello"] $
-          tuple [var "x", var "y"])
-    (letsTyped [("x", int32 42, T.mono T.int32),
-                ("y", string "hello", T.mono T.string)] $
-      tyapps (pair (var "x") (var "y")) [T.int32, T.string])
-    (T.pair T.int32 T.string)]
-
-letTermsWithShadowingTests :: TTermDefinition TestGroup
-letTermsWithShadowingTests = define "letTermsWithShadowingTests" $
-  subgroup "Let terms with shadowing" [
-  checkTest "lambda parameter shadowing let binding" []
-    (lets ["x">: int32 42] $
-      lambda "x" $ var "x")
-    (tylam "t0" $
-      letsTyped [("x", int32 42, T.mono T.int32)] $
-        lambdaTyped "x" (T.var "t0") $ var "x")
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "nested lambda shadowing" []
-    (lambda "x" $
-      lets ["y">: var "x"] $
-        lambda "x" $
-          tuple [var "x", var "y"])
-    (tylams ["t0", "t1"] $
-      lambdaTyped "x" (T.var "t0") $
-        letsTyped [("y", var "x", T.mono $ T.var "t0")] $
-          lambdaTyped "x" (T.var "t1") $
-            tyapps (pair (var "x") (var "y")) [T.var "t1", T.var "t0"])
-    (T.forAlls ["t0", "t1"] $
-      T.function (T.var "t0") $
-        T.function (T.var "t1") $
-          T.pair (T.var "t1") (T.var "t0")),
-  checkTest "multiple levels of let shadowing" []
-    (lets ["x">: int32 1] $
-      lets ["x">: string "second"] $
-        lets ["x">: boolean True] $
-          var "x")
-    (letsTyped [("x", int32 1, T.mono T.int32)] $
-      letsTyped [("x", string "second", T.mono T.string)] $
-        letsTyped [("x", boolean True, T.mono T.boolean)] $
-          var "x")
-    T.boolean,
-  checkTest "let shadowing with lambda and reference to outer binding" []
-    (lets ["x">: int32 10, "y">: int32 20] $
-      lambda "x" $
-        lets ["z">: var "y"] $
-          tuple [var "x", var "z"])
-    (tylam "t0" $
-      letsTyped [("x", int32 10, T.mono T.int32),
-                 ("y", int32 20, T.mono T.int32)] $
-        lambdaTyped "x" (T.var "t0") $
-          letsTyped [("z", var "y", T.mono T.int32)] $
-            tyapps (pair (var "x") (var "z")) [T.var "t0", T.int32])
-    (T.forAlls ["t0"] $
-      T.function (T.var "t0") $
-        T.pair (T.var "t0") T.int32)]
-
-recursiveBindingsTests :: TTermDefinition TestGroup
-recursiveBindingsTests = define "recursiveBindingsTests" $
-  subgroup "Recursive bindings" [
-  checkTest "simple arithmetic recursion" []
-    (lets ["double">: lambda "n" $ primitive _math_add @@ var "n" @@ var "n"] $
-          var "double" @@ int32 5)
-    (letsTyped [("double", lambdaTyped "n" T.int32 $ primitive _math_add @@ var "n" @@ var "n",
-                 T.mono $ T.function T.int32 T.int32)] $
-      var "double" @@ int32 5)
-    T.int32]
-
-mutualRecursionTests :: TTermDefinition TestGroup
-mutualRecursionTests = define "mutualRecursionTests" $
-  subgroup "Mutual recursion" [
-  checkTest "mutually recursive data" []
-    (lets ["listA">: record TestTypes.testTypeBuddyListAName [
-             "head">: int32 1,
-             "tail">: optional $ just $ var "listB"],
-           "listB">: record TestTypes.testTypeBuddyListBName [
-             "head">: int32 2,
-             "tail">: optional nothing]] $
-          var "listA")
-    (letsTyped [("listA", tyapp (record TestTypes.testTypeBuddyListAName [
-                   "head">: int32 1,
-                   "tail">: optional $ just $ var "listB"]) T.int32,
-                 T.mono $ T.apply (Core.typeVariable TestTypes.testTypeBuddyListAName) T.int32),
-                ("listB", tyapp (record TestTypes.testTypeBuddyListBName [
-                   "head">: int32 2,
-                   "tail">: tyapp (optional nothing) (T.apply (Core.typeVariable TestTypes.testTypeBuddyListAName) T.int32)]) T.int32,
-                 T.mono $ T.apply (Core.typeVariable TestTypes.testTypeBuddyListBName) T.int32)] $
-      var "listA")
-    (T.apply (Core.typeVariable TestTypes.testTypeBuddyListAName) T.int32),
-  checkTest "(monomorphic) mutually recursive functions" []
-    (lets ["f">: lambda "x" $ var "g" @@ var "x",
-           "g">: lambda "y" $ primitive _math_add @@ var "y" @@ int32 1] $
-          var "f" @@ int32 5)
-    (letsTyped [("f", lambdaTyped "x" T.int32 $ var "g" @@ var "x",
-                 T.mono $ T.function T.int32 T.int32),
-                ("g", lambdaTyped "y" T.int32 $ primitive _math_add @@ var "y" @@ int32 1,
-                 T.mono $ T.function T.int32 T.int32)] $
-      var "f" @@ int32 5)
-    T.int32]
-
-nestedLetTermsTests :: TTermDefinition TestGroup
-nestedLetTermsTests = define "nestedLetTermsTests" $
-  subgroup "Nested let terms" [
-  checkTest "monomorphic nesting" []
-    (lets ["x">: int32 1] $
-     lets ["y">: primitive _math_add @@ var "x" @@ int32 2] $
-     lets ["z">: primitive _math_mul @@ var "y" @@ int32 3] $
-      var "z")
-    (letsTyped [("x", int32 1, T.mono T.int32)] $
-     letsTyped [("y", primitive _math_add @@ var "x" @@ int32 2, T.mono T.int32)] $
-     letsTyped [("z", primitive _math_mul @@ var "y" @@ int32 3, T.mono T.int32)] $
-      var "z")
-    T.int32,
-  checkTest "polymorphic nesting" []
-    (lets ["id">: lambda "x" $ var "x"] $
-     lets ["apply">: lambda "f" $ lambda "x" $ var "f" @@ var "x"] $
-      var "apply" @@ var "id" @@ string "test")
-    (letsTyped [("id", tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x",
-                 T.poly ["t0"] $ T.function (T.var "t0") (T.var "t0"))] $
-     letsTyped [("apply", tylams ["t0", "t1"] $ lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $ lambdaTyped "x" (T.var "t0") $ var "f" @@ var "x",
-                 T.poly ["t0", "t1"] $ T.function (T.function (T.var "t0") (T.var "t1")) (T.function (T.var "t0") (T.var "t1")))] $
-      tyapps (var "apply") [T.string, T.string] @@ tyapp (var "id") T.string @@ string "test")
-    T.string,
-  checkTest "variable capture avoidance" []
-    (lets ["x">: int32 1] $
-      lambda "x" $ lets ["y">: var "x"] $ var "y")
-    (tylam "t0" $ letsTyped [("x", int32 1, T.mono T.int32)] $
-      lambdaTyped "x" (T.var "t0") $ letsTyped [("y", var "x", T.mono (T.var "t0"))] $ var "y")
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "simple let in lambda" []
-    (lambda "z" $ lets ["y">: var "z"] $ var "y")
-    (tylam "t0" $ lambdaTyped "z" (T.var "t0") $ letsTyped [("y", var "z", T.mono (T.var "t0"))] $ var "y")
-    (T.forAlls ["t0"] $ T.function (T.var "t0") (T.var "t0"))]
-
-letWithComplexExpressionsTests :: TTermDefinition TestGroup
-letWithComplexExpressionsTests = define "letWithComplexExpressionsTests" $
-  subgroup "Let with complex expressions" [
-  checkTest "let in record" []
-    (record TestTypes.testTypePersonName [
-      "firstName">: lets ["first">: string "John",
-                              "middle">: string "Q"] $
-                             primitive _strings_cat2 @@ var "first" @@ var "middle",
-      "lastName">: string "Doe",
-      "age">: int32 30])
-    (record TestTypes.testTypePersonName [
-      "firstName">: letsTyped [("first", string "John", T.mono T.string),
-                                   ("middle", string "Q", T.mono T.string)] $
-                         primitive _strings_cat2 @@ var "first" @@ var "middle",
-      "lastName">: string "Doe",
-      "age">: int32 30])
-    (Core.typeVariable TestTypes.testTypePersonName),
-  checkTest "let in function application" []
-    (lets ["x">: int32 5,
-           "y">: int32 3] $
-      primitive _math_add @@ var "x" @@ var "y")
-    (letsTyped [("x", int32 5, T.mono T.int32),
-                ("y", int32 3, T.mono T.int32)] $
-      primitive _math_add @@ var "x" @@ var "y")
-    T.int32,
-  checkTest "polymorphic let binding" []
-    (lets ["id">: lambda "x" $ var "x"] $
-      tuple [var "id" @@ int32 42, var "id" @@ string "hello"])
-    (letsTyped [("id", tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x",
-                 T.poly ["t0"] $ T.function (T.var "t0") (T.var "t0"))] $
-      tyapps (pair (tyapp (var "id") T.int32 @@ int32 42) (tyapp (var "id") T.string @@ string "hello")) [T.int32, T.string])
-    (T.pair T.int32 T.string),
-  checkTest "composition" []
-    (lets ["compose">: lambda "f" $ lambda "g" $ lambda "x" $ var "f" @@ (var "g" @@ var "x"),
-           "add1">: lambda "n" $ primitive _math_add @@ var "n" @@ int32 1,
-           "double">: lambda "n" $ primitive _math_mul @@ var "n" @@ int32 2] $
-      (var "compose" @@ var "add1" @@ var "double") @@ int32 5)
-    (letsTyped [
-      ("compose", tylams ["t0", "t1", "t2"] $
-        lambdaTyped "f" (T.function (T.var "t0") (T.var "t1")) $
-          lambdaTyped "g" (T.function (T.var "t2") (T.var "t0")) $
-            lambdaTyped "x" (T.var "t2") $ var "f" @@ (var "g" @@ var "x"),
-        T.poly ["t0", "t1", "t2"] $
-          T.function
-            (T.function (T.var "t0") (T.var "t1"))
-            (T.function (T.function (T.var "t2") (T.var "t0"))
-              (T.function (T.var "t2") (T.var "t1")))),
-      ("add1", lambdaTyped "n" T.int32 $ primitive _math_add @@ var "n" @@ int32 1,
-       T.mono $ T.function T.int32 T.int32),
-      ("double", lambdaTyped "n" T.int32 $ primitive _math_mul @@ var "n" @@ int32 2,
-       T.mono $ T.function T.int32 T.int32)] $
-      (tyapps (var "compose") [T.int32, T.int32, T.int32] @@ var "add1" @@ var "double") @@ int32 5)
-    T.int32]
-
------- Literals ------
-
-literalsTests :: TTermDefinition TestGroup
-literalsTests = define "literalsTests" $
-  supergroup "Literals" [
-  booleanLiteralsTests,
-  stringLiteralsTests,
-  integerLiteralsTests,
-  floatLiteralsTests,
---  binaryLiteralsTests, -- TODO: restore this group
-  literalsInComplexContextsTests]
-
-booleanLiteralsTests :: TTermDefinition TestGroup
-booleanLiteralsTests = define "booleanLiteralsTests" $
-  subgroup "Boolean literals" [
-  noChange "true" (boolean True) T.boolean,
-  noChange "false" (boolean False) T.boolean]
-
-stringLiteralsTests :: TTermDefinition TestGroup
-stringLiteralsTests = define "stringLiteralsTests" $
-  subgroup "String literals" [
-  noChange "simple string" (string "hello") T.string,
-  noChange "empty string" (string "") T.string,
-  noChange "unicode string" (string "café") T.string]
-
-integerLiteralsTests :: TTermDefinition TestGroup
-integerLiteralsTests = define "integerLiteralsTests" $
-  subgroup "Integer literals" [
-  noChange "bigint" (bigint 42) T.bigint,
-  noChange "int8" (int8 127) T.int8,
-  noChange "int16" (int16 32767) T.int16,
-  noChange "int32" (int32 2147483647) T.int32,
-  noChange "int64" (int64 9223372036854775807) T.int64,
-  noChange "uint8" (uint8 255) T.uint8,
-  noChange "uint16" (uint16 65535) T.uint16,
-  noChange "uint32" (uint32 4294967295) T.uint32,
-  noChange "uint64" (uint64 18446744073709551615) T.uint64]
-
-floatLiteralsTests :: TTermDefinition TestGroup
-floatLiteralsTests = define "floatLiteralsTests" $
-  subgroup "Float literals" [
-  noChange "bigfloat" (bigfloat 3.14159) T.bigfloat,
-  noChange "float32" (float32 2.71828) T.float32,
-  noChange "float64" (float64 1.41421) T.float64]
-
-binaryLiteralsTests :: TTermDefinition TestGroup
-binaryLiteralsTests = define "binaryLiteralsTests" $
-  subgroup "Binary literals" [
-  noChange "binary" (binary (BC.pack "Hello World")) T.binary]
-
-literalsInComplexContextsTests :: TTermDefinition TestGroup
-literalsInComplexContextsTests = define "literalsInComplexContextsTests" $
-  subgroup "Literals in complex contexts" [
-  checkTest "literals in tuple" []
-    (tuple [boolean True, tuple [string "test", tuple [int32 42, float32 3.14]]])
-    (tyapps (pair (boolean True) (tyapps (pair (string "test") (tyapps (pair (int32 42) (float32 3.14)) [T.int32, T.float32])) [T.string, T.pair T.int32 T.float32])) [T.boolean, T.pair T.string (T.pair T.int32 T.float32)])
-    (T.pair T.boolean (T.pair T.string (T.pair T.int32 T.float32))),
-  noChange "literals in list"
-    (list [string "one", string "two", string "three"])
-    (T.list T.string)]
-
------- Primitives ------
-
-primitivesTests :: TTermDefinition TestGroup
-primitivesTests = define "primitivesTests" $
-  supergroup "Primitives" [
-  nullaryPrimitivesTests,
-  unaryPrimitivesTests,
-  binaryPrimitivesTests,
-  ternaryPrimitivesTests,
-  monomorphicVsPolymorphicTests,
-  higherOrderPrimitivesTests,
-  primitivesInComplexContextsTests]
-
-nullaryPrimitivesTests :: TTermDefinition TestGroup
-nullaryPrimitivesTests = define "nullaryPrimitivesTests" $
-  subgroup "Nullary primitives" [
-  checkTest "empty map" []
-    (primitive _maps_empty)
-    (tylams ["t0", "t1"] $ tyapps (primitive _maps_empty) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.map (T.var "t0") (T.var "t1")),
-  checkTest "empty set" []
-    (primitive _sets_empty)
-    (tylam "t0" $ tyapp (primitive _sets_empty) (T.var "t0"))
-    (T.forAll "t0" $ T.set $ T.var "t0")]
-
-unaryPrimitivesTests :: TTermDefinition TestGroup
-unaryPrimitivesTests = define "unaryPrimitivesTests" $
-  subgroup "Unary primitives" [
-  checkTest "lists maybeHead" []
-    (primitive _lists_maybeHead)
-    (tylam "t0" $ tyapp (primitive _lists_maybeHead) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.list $ T.var "t0") (T.optional $ T.var "t0")),
-  noChange "math neg"
-    (primitive _math_negate)
-    (T.function T.int32 T.int32),
-  noChange "logic not"
-    (primitive _logic_not)
-    (T.function T.boolean T.boolean)]
-
-binaryPrimitivesTests :: TTermDefinition TestGroup
-binaryPrimitivesTests = define "binaryPrimitivesTests" $
-  subgroup "Binary primitives" [
-  noChange "math add"
-    (primitive _math_add)
-    (T.function T.int32 (T.function T.int32 T.int32)),
-  checkTest "lists cons" []
-    (primitive _lists_cons)
-    (tylam "t0" $ tyapp (primitive _lists_cons) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.function (T.list $ T.var "t0") (T.list $ T.var "t0"))),
-  checkTest "maps insert" []
-    (primitive _maps_insert)
-    (tylams ["t0", "t1"] $ tyapps (primitive _maps_insert) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.function
-      (T.var "t0")
-      (T.function (T.var "t1") (T.function (T.map (T.var "t0") (T.var "t1")) (T.map (T.var "t0") (T.var "t1")))))]
-
-ternaryPrimitivesTests :: TTermDefinition TestGroup
-ternaryPrimitivesTests = define "ternaryPrimitivesTests" $
-  subgroup "Ternary primitives" [
-  checkTest "logic ifElse" []
-    (primitive _logic_ifElse)
-    (tylam "t0" $ tyapp (primitive _logic_ifElse) (T.var "t0"))
-    (T.forAll "t0" $ T.function T.boolean (T.function (T.var "t0") (T.function (T.var "t0") (T.var "t0")))),
-  checkTest "lists foldl" []
-    (primitive _lists_foldl)
-    (tylams ["t0", "t1"] $ tyapps (primitive _lists_foldl) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.function
-      (T.function (T.var "t0") (T.function (T.var "t1") (T.var "t0")))
-      (T.function (T.var "t0") (T.function (T.list $ T.var "t1") (T.var "t0"))))]
-
-monomorphicVsPolymorphicTests :: TTermDefinition TestGroup
-monomorphicVsPolymorphicTests = define "monomorphicVsPolymorphicTests" $
-  subgroup "Monomorphic vs polymorphic" [
-  noChange "monomorphic math"
-    (primitive _math_add)
-    (T.function T.int32 (T.function T.int32 T.int32)),
-  checkTest "polymorphic identity" []
-    (primitive _equality_identity)
-    (tylam "t0" $ tyapp (primitive _equality_identity) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "polymorphic map" []
-    (primitive _lists_map)
-    (tylams ["t0", "t1"] $ tyapps (primitive _lists_map) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $ T.function
-      (T.function (T.var "t0") (T.var "t1"))
-      (T.function (T.list $ T.var "t0") (T.list $ T.var "t1")))]
-
-higherOrderPrimitivesTests :: TTermDefinition TestGroup
-higherOrderPrimitivesTests = define "higherOrderPrimitivesTests" $
-  subgroup "Higher-order primitives" [
-  checkTest "lists map function" []
-    (primitive _lists_map @@ (lambda "x" $ primitive _math_add @@ var "x" @@ int32 1))
-    (tyapps (primitive _lists_map) [T.int32, T.int32] @@ (lambdaTyped "x" T.int32 $ primitive _math_add @@ var "x" @@ int32 1))
-    (T.function (T.list T.int32) (T.list T.int32)),
-  checkTest "lists filter" []
-    (primitive _lists_filter)
-    (tylam "t0" $ tyapp (primitive _lists_filter) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.function (T.var "t0") T.boolean) (T.function (T.list $ T.var "t0") (T.list $ T.var "t0"))),
-  checkTest "optionals maybe" []
-    (primitive _maybes_maybe)
-    (tylams ["t0", "t1"] $ tyapps (primitive _maybes_maybe) [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $
-      T.function (T.var "t0") (T.function (T.function (T.var "t1") (T.var "t0")) (T.function (T.optional $ T.var "t1") (T.var "t0"))))]
-
-primitivesInComplexContextsTests :: TTermDefinition TestGroup
-primitivesInComplexContextsTests = define "primitivesInComplexContextsTests" $
-  subgroup "Primitives in complex contexts" [
-  checkTest "primitive composition" []
-    (lets ["double">: lambda "x" $ primitive _math_mul @@ var "x" @@ int32 2,
-           "increment">: lambda "x" $ primitive _math_add @@ var "x" @@ int32 1] $
-      primitive _lists_map @@ var "double" @@ (primitive _lists_map @@ var "increment" @@ list [int32 1, int32 2, int32 3]))
-    (letsTyped [("double", lambdaTyped "x" T.int32 $ primitive _math_mul @@ var "x" @@ int32 2,
-                 T.mono $ T.function T.int32 T.int32),
-                ("increment", lambdaTyped "x" T.int32 $ primitive _math_add @@ var "x" @@ int32 1,
-                 T.mono $ T.function T.int32 T.int32)] $
-      tyapps (primitive _lists_map) [T.int32, T.int32] @@ var "double" @@ (tyapps (primitive _lists_map) [T.int32, T.int32] @@ var "increment" @@ list [int32 1, int32 2, int32 3]))
-    (T.list T.int32),
-  checkTest "nested higher-order" []
-    (primitive _lists_map @@ (primitive _lists_map @@ (primitive _math_add @@ int32 1)) @@
-     list [list [int32 1, int32 2], list [int32 3, int32 4]])
-    (tyapps (primitive _lists_map) [T.list T.int32, T.list T.int32] @@ (tyapps (primitive _lists_map) [T.int32, T.int32] @@ (primitive _math_add @@ int32 1)) @@
-     list [list [int32 1, int32 2], list [int32 3, int32 4]])
-    (T.list $ T.list T.int32)]
-
------- Variables ------
-
-variablesTests :: TTermDefinition TestGroup
-variablesTests = define "variablesTests" $
-  supergroup "Variables" [
-  simpleVariableLookupTests,
-  variableScopingTests,
-  polymorphicVariablesTests,
-  variablesInComplexContextsTests,
-  recursiveVariablesTests]
-
-simpleVariableLookupTests :: TTermDefinition TestGroup
-simpleVariableLookupTests = define "simpleVariableLookupTests" $
-  subgroup "Simple variable lookup" [
-  checkTest "int variable" []
-    (lambda "x" $ var "x")
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x")
-    (T.forAll "t0" $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "variable in let binding" []
-    (lets ["x">: int32 42] $ var "x")
-    (letsTyped [("x", int32 42, T.mono T.int32)] $ var "x")
-    T.int32,
-  checkTest "multiple variables" []
-    (lets ["x">: string "hello",
-           "y">: int32 42] $
-          tuple [var "x", var "y"])
-    (letsTyped [("x", string "hello", T.mono T.string),
-                ("y", int32 42, T.mono T.int32)] $
-      tyapps (pair (var "x") (var "y")) [T.string, T.int32])
-    (T.pair T.string T.int32)]
-
-variableScopingTests :: TTermDefinition TestGroup
-variableScopingTests = define "variableScopingTests" $
-  subgroup "Variable scoping" [
-  checkTest "lambda parameter" []
-    (lambda "x" $ lambda "y" $ var "x")
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ lambdaTyped "y" (T.var "t1") $ var "x")
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.var "t0"))),
-  checkTest "let binding scope" []
-    (lets ["x">: int32 1] $
-     lets ["y">: string "hello"] $
-          var "x")
-    (letsTyped [("x", int32 1, T.mono T.int32)] $
-     letsTyped [("y", string "hello", T.mono T.string)] $
-      var "x")
-    T.int32,
-  checkTest "variable shadowing" []
-    (lets ["x">: int32 1] $
-     lambda "x" $ var "x")
-    (tylam "t0" $ letsTyped [("x", int32 1, T.mono T.int32)] $
-      lambdaTyped "x" (T.var "t0") $ var "x")
-    (T.forAll "t0" $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "nested scoping" []
-    (lambda "x" $
-     lets ["y">: var "x"] $
-          lambda "z" $
-          tuple [var "x", var "y", var "z"])
-    (tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $
-     letsTyped [("y", var "x", T.mono (T.var "t0"))] $
-      lambdaTyped "z" (T.var "t1") $
-      tyapps (pair (var "x") (tyapps (pair (var "y") (var "z")) [T.var "t0", T.var "t1"])) [T.var "t0", T.pair (T.var "t0") (T.var "t1")])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.pair (T.var "t0") (T.pair (T.var "t0") (T.var "t1")))))]
-
-polymorphicVariablesTests :: TTermDefinition TestGroup
-polymorphicVariablesTests = define "polymorphicVariablesTests" $
-  subgroup "Polymorphic variables" [
-  checkTest "polymorphic function" []
-    (lets ["id">: lambda "x" $ var "x"] $
-          var "id")
-    (tylam "t0" $ letsTyped [("id", tylam "t1" $ lambdaTyped "x" (T.var "t1") $ var "x",
-                              T.poly ["t1"] $ T.function (T.var "t1") (T.var "t1"))] $
-      tyapp (var "id") (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.var "t0")),
-  checkTest "polymorphic application" []
-    (lets ["id">: lambda "x" $ var "x"] $
-          tuple [var "id" @@ int32 42, var "id" @@ string "test"])
-    (letsTyped [("id", tylam "t0" $ lambdaTyped "x" (T.var "t0") $ var "x",
-                 T.poly ["t0"] $ T.function (T.var "t0") (T.var "t0"))] $
-      tyapps (pair (tyapp (var "id") T.int32 @@ int32 42) (tyapp (var "id") T.string @@ string "test")) [T.int32, T.string])
-    (T.pair T.int32 T.string),
-  checkTest "higher order polymorphic" []
-    (lets ["apply">: lambda "f" $ lambda "x" $ var "f" @@ var "x"] $
-          var "apply")
-    (tylams ["t0", "t1"] $ letsTyped [("apply", tylams ["t2", "t3"] $ lambdaTyped "f" (T.function (T.var "t2") (T.var "t3")) $ lambdaTyped "x" (T.var "t2") $ var "f" @@ var "x",
-                                       T.poly ["t2", "t3"] $ T.function (T.function (T.var "t2") (T.var "t3")) (T.function (T.var "t2") (T.var "t3")))] $
-      tyapps (var "apply") [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $
-      T.function (T.function (T.var "t0") (T.var "t1")) (T.function (T.var "t0") (T.var "t1")))]
-
-variablesInComplexContextsTests :: TTermDefinition TestGroup
-variablesInComplexContextsTests = define "variablesInComplexContextsTests" $
-  subgroup "Variables in complex contexts" [
-  checkTest "variable in record" []
-    (lambda "name" $
-     record TestTypes.testTypePersonName [
-       "firstName">: (var "name"),
-       "lastName">: (string "Doe"),
-       "age">: (int32 25)])
-    (lambdaTyped "name" T.string $
-     record TestTypes.testTypePersonName [
-       "firstName">: (var "name"),
-       "lastName">: (string "Doe"),
-       "age">: (int32 25)])
-    (T.function T.string (Core.typeVariable TestTypes.testTypePersonName)),
-  checkTest "variable in list" []
-    (lambda "x" $ list [var "x", var "x"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ list [var "x", var "x"])
-    (T.forAll "t0" $ T.function (T.var "t0") (T.list $ T.var "t0")),
-  checkTest "variable in map" []
-    (lambda "key" $ lambda "value" $
-      mapTerm [(var "key", var "value")])
-    (tylams ["t0", "t1"] $ lambdaTyped "key" (T.var "t0") $ lambdaTyped "value" (T.var "t1") $
-      mapTerm [(var "key", var "value")])
-    (T.forAlls ["t0", "t1"] $ T.function (T.var "t0") (T.function (T.var "t1") (T.map (T.var "t0") (T.var "t1")))),
-  checkTest "variable in optional" []
-    (lambda "x" $ Core.termMaybe $ just $ var "x")
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ Core.termMaybe $ just $ var "x")
-    (T.forAll "t0" $ T.function (T.var "t0") (T.optional $ T.var "t0"))]
-
-recursiveVariablesTests :: TTermDefinition TestGroup
-recursiveVariablesTests = define "recursiveVariablesTests" $
-  subgroup "Recursive variables" [
-  checkTest "simple recursion" []
-    (lets ["f">: lambda "x" $ primitive _math_add @@ var "x" @@ int32 1] $
-          var "f")
-    (letsTyped [("f", lambdaTyped "x" T.int32 $ primitive _math_add @@ var "x" @@ int32 1,
-                 T.mono $ T.function T.int32 T.int32)] $
-      var "f")
-    (T.function T.int32 T.int32),
-  checkTest "mutual recursion" []
-    (lets ["f">: lambda "x" $ var "g" @@ var "x",
-           "g">: lambda "y" $ primitive _math_add @@ var "y" @@ int32 1] $
-          var "f")
-    (letsTyped [("f", lambdaTyped "x" T.int32 $ var "g" @@ var "x",
-                 T.mono $ T.function T.int32 T.int32),
-                ("g", lambdaTyped "y" T.int32 $ primitive _math_add @@ var "y" @@ int32 1,
-                 T.mono $ T.function T.int32 T.int32)] $
-      var "f")
-    (T.function T.int32 T.int32)]
diff --git a/src/main/haskell/Hydra/Sources/Test/Checking/NominalTypes.hs b/src/main/haskell/Hydra/Sources/Test/Checking/NominalTypes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Checking/NominalTypes.hs
+++ /dev/null
@@ -1,1634 +0,0 @@
-
--- | Nominal type checking test cases: records, unions, wrapped terms, and eliminations (projections, case statements, unwrapping)
-module Hydra.Sources.Test.Checking.NominalTypes where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.checking.nominalTypes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.rewriting"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Nominal type checking test cases: records, unions, field access, injection, projection")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition recordsTests,
-      Phantoms.toDefinition monomorphicRecordsTests,
-      Phantoms.toDefinition polymorphicRecordsTests,
-      Phantoms.toDefinition recordsInComplexContextsTests,
-      Phantoms.toDefinition multiParameterPolymorphicRecordsTests,
-      Phantoms.toDefinition recordEliminationsTests,
-      Phantoms.toDefinition simpleRecordProjectionsTests,
-      Phantoms.toDefinition recordProjectionsAppliedToRecordsTests,
-      Phantoms.toDefinition polymorphicRecordProjectionsTests,
-      Phantoms.toDefinition polymorphicRecordProjectionsAppliedTests,
-      Phantoms.toDefinition recordProjectionsWithVariablesTests,
-      Phantoms.toDefinition recordProjectionsInComplexContextsTests,
-      Phantoms.toDefinition multiParameterPolymorphicProjectionsTests,
-      Phantoms.toDefinition higherOrderRecordProjectionsTests,
-      Phantoms.toDefinition recursiveRecordProjectionsTests,
-      Phantoms.toDefinition recordProjectionsWithMutualRecursionTests,
-      Phantoms.toDefinition unionsTests,
-      Phantoms.toDefinition simpleUnionInjectionsTests,
-      Phantoms.toDefinition unionInjectionsWithDataTests,
-      Phantoms.toDefinition polymorphicUnionInjectionsTests,
-      Phantoms.toDefinition polymorphicRecursiveUnionInjectionsTests,
-      Phantoms.toDefinition polymorphicUnionsFromLambdaTests,
-      Phantoms.toDefinition unionsInComplexContextsTests,
-      Phantoms.toDefinition multiParameterPolymorphicInjectionsTests,
-      Phantoms.toDefinition unionEliminationsTests,
-      Phantoms.toDefinition simpleUnitVariantEliminationsTests,
-      Phantoms.toDefinition unionEliminationsWithDataTests,
-      Phantoms.toDefinition polymorphicUnionEliminationsTests,
-      Phantoms.toDefinition simplePolymorphicUnionTests,
-      Phantoms.toDefinition usingUnionPolymorphicRecursiveTests,
-      Phantoms.toDefinition usingKernelTypesTests,
-      Phantoms.toDefinition unionEliminationsWithDefaultsTests,
-      Phantoms.toDefinition nestedUnionEliminationsTests,
-      Phantoms.toDefinition unionEliminationsInComplexContextsTests,
-      Phantoms.toDefinition multiParameterPolymorphicCaseStatementsTests,
-      Phantoms.toDefinition higherOrderUnionEliminationsTests,
-      Phantoms.toDefinition recursiveUnionEliminationsTests,
-      Phantoms.toDefinition wrappedTermsTests,
-      Phantoms.toDefinition monomorphicWrappedTermsTests,
-      Phantoms.toDefinition polymorphicWrappedTermsTests,
-      Phantoms.toDefinition wrappedTermsInComplexContextsTests,
-      Phantoms.toDefinition nestedWrappedTermsTests,
-      Phantoms.toDefinition multipleWrappingLevelsTests,
-      Phantoms.toDefinition multiParameterPolymorphicWrappersTests,
-      Phantoms.toDefinition wrapEliminationsTests,
-      Phantoms.toDefinition monomorphicUnwrappingTests,
-      Phantoms.toDefinition polymorphicUnwrappingTests,
-      Phantoms.toDefinition unwrapEliminationsInApplicationsTests,
-      Phantoms.toDefinition unwrapInComplexContextsTests,
-      Phantoms.toDefinition multiParameterPolymorphicUnwrappersTests,
-      Phantoms.toDefinition chainedUnwrappingTests,
-      Phantoms.toDefinition multipleUnwrapOperationsTests,
-      Phantoms.toDefinition eliminationsTests,
-      Phantoms.toDefinition projectionsWithVariablesTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  supergroup "Nominal types" [
-  recordsTests,
-  unionsTests,
-  wrappedTermsTests,
-  eliminationsTests]
-
------- Helper functions ------
-
------- Records ------
-
-recordsTests :: TTermDefinition TestGroup
-recordsTests = define "recordsTests" $
-  supergroup "Records" [
-  monomorphicRecordsTests,
-  polymorphicRecordsTests,
-  recordsInComplexContextsTests,
-  multiParameterPolymorphicRecordsTests]
-
-monomorphicRecordsTests :: TTermDefinition TestGroup
-monomorphicRecordsTests = define "monomorphicRecordsTests" $
-  subgroup "Monomorphic records" [
-  noChange "latlon record"
-    (record (name "LatLon") [
-      "lat" >: float32 19.5429,
-      "lon" >: float32 (-155.6659)])
-    (T.var "LatLon"),
-  checkTest "latlon with variable" []
-    (lambda "x" $ record (name "LatLon") [
-      "lat" >: float32 19.5429,
-      "lon" >: var "x"])
-    (lambdaTyped "x" T.float32 $ record (name "LatLon") [
-      "lat" >: float32 19.5429,
-      "lon" >: var "x"])
-    (T.function T.float32 (T.var "LatLon")),
-  noChange "person record"
-    (record (name "Person") [
-      "firstName" >: string "Alice",
-      "lastName" >: string "Smith",
-      "age" >: int32 30])
-    (T.var "Person"),
-  noChange "empty record"
-    (record (name "Unit") [])
-    (T.var "Unit"),
-  checkTest "person with variables" []
-    (lambda "name" $ lambda "age" $ record (name "Person") [
-      "firstName" >: var "name",
-      "lastName" >: string "Doe",
-      "age" >: var "age"])
-    (lambdaTyped "name" T.string $ lambdaTyped "age" T.int32 $ record (name "Person") [
-      "firstName" >: var "name",
-      "lastName" >: string "Doe",
-      "age" >: var "age"])
-    (T.function T.string (T.function T.int32 (T.var "Person")))]
-
-polymorphicRecordsTests :: TTermDefinition TestGroup
-polymorphicRecordsTests = define "polymorphicRecordsTests" $
-  subgroup "Polymorphic records" [
-  checkTest "latlon poly float" []
-    (record (name "LatLonPoly") [
-      "lat" >: float32 19.5429,
-      "lon" >: float32 (-155.6659)])
-    (tyapp (record (name "LatLonPoly") [
-      "lat" >: float32 19.5429,
-      "lon" >: float32 (-155.6659)]) T.float32)
-    (T.apply (T.var "LatLonPoly") T.float32),
-  checkTest "latlon poly int64" []
-    (record (name "LatLonPoly") [
-      "lat" >: int64 195429,
-      "lon" >: int64 (-1556659)])
-    (tyapp (record (name "LatLonPoly") [
-      "lat" >: int64 195429,
-      "lon" >: int64 (-1556659)]) T.int64)
-    (T.apply (T.var "LatLonPoly") T.int64),
-  checkTest "latlon poly variable" []
-    (lambda "x" $ record (name "LatLonPoly") [
-      "lat" >: var "x",
-      "lon" >: var "x"])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapp (record (name "LatLonPoly") [
-      "lat" >: var "x",
-      "lon" >: var "x"]) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.apply (T.var "LatLonPoly") (T.var "t0"))),
-  checkTest "buddylist string" []
-    (record (name "BuddyListA") [
-      "head" >: string "first",
-      "tail" >: optional nothing])
-    (tyapp (record (name "BuddyListA") [
-      "head" >: string "first",
-      "tail" >: tyapp (optional nothing) (T.apply (T.var "BuddyListB") T.string)]) T.string)
-    (T.apply (T.var "BuddyListA") T.string),
-  checkTest "buddylist variable" []
-    (lambda "x" $ record (name "BuddyListA") [
-      "head" >: var "x",
-      "tail" >: optional nothing])
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapp (record (name "BuddyListA") [
-      "head" >: var "x",
-      "tail" >: tyapp (optional nothing) (T.apply (T.var "BuddyListB") (T.var "t0"))]) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.apply (T.var "BuddyListA") (T.var "t0")))]
-
-recordsInComplexContextsTests :: TTermDefinition TestGroup
-recordsInComplexContextsTests = define "recordsInComplexContextsTests" $
-  subgroup "Records in complex contexts" [
-  checkTest "records in tuple" []
-    (tuple [
-      record (name "Person") [
-        "firstName" >: string "Bob",
-        "lastName" >: string "Jones",
-        "age" >: int32 25],
-      record (name "LatLon") [
-        "lat" >: float32 1.0,
-        "lon" >: float32 2.0]])
-    (tyapps (pair
-      (record (name "Person") [
-        "firstName" >: string "Bob",
-        "lastName" >: string "Jones",
-        "age" >: int32 25])
-      (record (name "LatLon") [
-        "lat" >: float32 1.0,
-        "lon" >: float32 2.0])) [T.var "Person", T.var "LatLon"])
-    (T.pair (T.var "Person") (T.var "LatLon")),
-  checkTest "poly records in tuple" []
-    (tuple [
-      record (name "LatLonPoly") [
-        "lat" >: int32 1,
-        "lon" >: int32 2],
-      record (name "BuddyListA") [
-        "head" >: string "test",
-        "tail" >: optional nothing]])
-    (tyapps (pair
-      (tyapp (record (name "LatLonPoly") [
-        "lat" >: int32 1,
-        "lon" >: int32 2]) T.int32)
-      (tyapp (record (name "BuddyListA") [
-        "head" >: string "test",
-        "tail" >: tyapp (optional nothing) (T.apply (T.var "BuddyListB") T.string)]) T.string))
-      [T.apply (T.var "LatLonPoly") T.int32, T.apply (T.var "BuddyListA") T.string])
-    (T.pair
-      (T.apply (T.var "LatLonPoly") T.int32)
-      (T.apply (T.var "BuddyListA") T.string)),
-  checkTest "recursive record" []
-    (record (name "IntList") [
-      "head" >: int32 42,
-      "tail" >: optional (Phantoms.just (
-        record (name "IntList") [
-          "head" >: int32 43,
-          "tail" >: optional nothing]))])
-    (record (name "IntList") [
-      "head" >: int32 42,
-      "tail" >: optional (Phantoms.just (
-        record (name "IntList") [
-          "head" >: int32 43,
-          "tail" >: tyapp (optional nothing) (T.var "IntList")]))])
-    (T.var "IntList")]
-
-multiParameterPolymorphicRecordsTests :: TTermDefinition TestGroup
-multiParameterPolymorphicRecordsTests = define "multiParameterPolymorphicRecordsTests" $
-  subgroup "Multi-parameter polymorphic records" [
-  checkTest "triple with three monomorphic types" []
-    (record (name "Triple") [
-      "first" >: int32 1,
-      "second" >: string "middle",
-      "third" >: boolean True])
-    (tyapps (record (name "Triple") [
-      "first" >: int32 1,
-      "second" >: string "middle",
-      "third" >: boolean True]) [T.int32, T.string, T.boolean])
-    (T.applys (T.var "Triple") [T.int32, T.string, T.boolean]),
-  checkTest "triple with PersonOrSomething containing map" []
-    (lambda "k" $ lambda "v" $
-      record (name "Triple") [
-        "first" >: string "prefix",
-        "second" >: inject (TestTypes.testTypePersonOrSomethingName) "other"
-          (mapTerm [(var "k", var "v")]),
-        "third" >: int32 999])
-    (tylams ["t0", "t1"] $
-      lambdaTyped "k" (T.var "t0") $
-      lambdaTyped "v" (T.var "t1") $
-      tyapps (record (name "Triple") [
-        "first" >: string "prefix",
-        "second" >: tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other"
-          (mapTerm [(var "k", var "v")])) (T.map (T.var "t0") (T.var "t1")),
-        "third" >: int32 999])
-        [T.string,
-         T.apply (T.var "PersonOrSomething") (T.map (T.var "t0") (T.var "t1")),
-         T.int32])
-    (T.forAlls ["t0", "t1"] $
-      T.function (T.var "t0") $
-      T.function (T.var "t1") $
-      T.applys (T.var "Triple")
-        [T.string,
-         T.apply (T.var "PersonOrSomething") (T.map (T.var "t0") (T.var "t1")),
-         T.int32])]
-
------- Record eliminations ------
-
-recordEliminationsTests :: TTermDefinition TestGroup
-recordEliminationsTests = define "recordEliminationsTests" $
-  supergroup "Record eliminations" [
-  simpleRecordProjectionsTests,
-  recordProjectionsAppliedToRecordsTests,
-  polymorphicRecordProjectionsTests,
-  polymorphicRecordProjectionsAppliedTests,
-  recordProjectionsWithVariablesTests,
-  recordProjectionsInComplexContextsTests,
-  multiParameterPolymorphicProjectionsTests,
-  higherOrderRecordProjectionsTests,
-  recursiveRecordProjectionsTests,
-  recordProjectionsWithMutualRecursionTests,
-  projectionsWithVariablesTests]
-
-simpleRecordProjectionsTests :: TTermDefinition TestGroup
-simpleRecordProjectionsTests = define "simpleRecordProjectionsTests" $
-  subgroup "Simple record projections" [
-  noChange "project firstName from Person"
-    (project (TestTypes.testTypePersonName) (name "firstName"))
-    (T.function (T.var "Person") T.string),
-  noChange "project lastName from Person"
-    (project (TestTypes.testTypePersonName) (name "lastName"))
-    (T.function (T.var "Person") T.string),
-  noChange "project age from Person"
-    (project (TestTypes.testTypePersonName) (name "age"))
-    (T.function (T.var "Person") T.int32),
-  noChange "project lat from LatLon"
-    (project (TestTypes.testTypeLatLonName) (name "lat"))
-    (T.function (T.var "LatLon") T.float32),
-  noChange "project lon from LatLon"
-    (project (TestTypes.testTypeLatLonName) (name "lon"))
-    (T.function (T.var "LatLon") T.float32)]
-
-recordProjectionsAppliedToRecordsTests :: TTermDefinition TestGroup
-recordProjectionsAppliedToRecordsTests = define "recordProjectionsAppliedToRecordsTests" $
-  subgroup "Record projections applied to records" [
-  noChange "project firstName applied to person record"
-    (project (TestTypes.testTypePersonName) (name "firstName") @@
-     record (name "Person") [
-       "firstName" >: string "Alice",
-       "lastName" >: string "Smith",
-       "age" >: int32 30])
-    T.string,
-  noChange "project age applied to person record"
-    (project (TestTypes.testTypePersonName) (name "age") @@
-     record (name "Person") [
-       "firstName" >: string "Bob",
-       "lastName" >: string "Jones",
-       "age" >: int32 25])
-    T.int32,
-  noChange "project lat applied to LatLon record"
-    (project (TestTypes.testTypeLatLonName) (name "lat") @@
-     record (name "LatLon") [
-       "lat" >: float32 40.7128,
-       "lon" >: float32 (-74.0060)])
-    T.float32]
-
-polymorphicRecordProjectionsTests :: TTermDefinition TestGroup
-polymorphicRecordProjectionsTests = define "polymorphicRecordProjectionsTests" $
-  subgroup "Polymorphic record projections" [
-  checkTest "project lat from polymorphic LatLonPoly" []
-    (project (TestTypes.testTypeLatLonPolyName) (name "lat"))
-    (tylam "t0" $ tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lat")) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.apply (T.var "LatLonPoly") (T.var "t0")) (T.var "t0")),
-  checkTest "project lon from polymorphic LatLonPoly" []
-    (project (TestTypes.testTypeLatLonPolyName) (name "lon"))
-    (tylam "t0" $ tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lon")) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.apply (T.var "LatLonPoly") (T.var "t0")) (T.var "t0")),
-  checkTest "project head from BuddyListA" []
-    (project (TestTypes.testTypeBuddyListAName) (name "head"))
-    (tylam "t0" $ tyapp (project (TestTypes.testTypeBuddyListAName) (name "head")) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.apply (T.var "BuddyListA") (T.var "t0")) (T.var "t0")),
-  checkTest "project tail from BuddyListA" []
-    (project (TestTypes.testTypeBuddyListAName) (name "tail"))
-    (tylam "t0" $ tyapp (project (TestTypes.testTypeBuddyListAName) (name "tail")) (T.var "t0"))
-    (T.forAll "t0" $ T.function
-      (T.apply (T.var "BuddyListA") (T.var "t0"))
-      (T.optional (T.apply (T.var "BuddyListB") (T.var "t0"))))]
-
-polymorphicRecordProjectionsAppliedTests :: TTermDefinition TestGroup
-polymorphicRecordProjectionsAppliedTests = define "polymorphicRecordProjectionsAppliedTests" $
-  subgroup "Polymorphic record projections applied" [
-  checkTest "project lat from LatLonPoly with int32" []
-    (project (TestTypes.testTypeLatLonPolyName) (name "lat") @@
-     record (name "LatLonPoly") [
-       "lat" >: int32 40,
-       "lon" >: int32 (-74)])
-    (tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lat")) T.int32 @@
-     tyapp (record (name "LatLonPoly") [
-       "lat" >: int32 40,
-       "lon" >: int32 (-74)]) T.int32)
-    T.int32,
-  checkTest "project lon from LatLonPoly with float64" []
-    (project (TestTypes.testTypeLatLonPolyName) (name "lon") @@
-     record (name "LatLonPoly") [
-       "lat" >: float64 40.7128,
-       "lon" >: float64 (-74.0060)])
-    (tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lon")) T.float64 @@
-     tyapp (record (name "LatLonPoly") [
-       "lat" >: float64 40.7128,
-       "lon" >: float64 (-74.0060)]) T.float64)
-    T.float64,
-  checkTest "project head from BuddyListA with string" []
-    (project (TestTypes.testTypeBuddyListAName) (name "head") @@
-     record (name "BuddyListA") [
-       "head" >: string "Alice",
-       "tail" >: optional nothing])
-    (tyapp (project (TestTypes.testTypeBuddyListAName) (name "head")) T.string @@
-     tyapp (record (name "BuddyListA") [
-       "head" >: string "Alice",
-       "tail" >: tyapp (optional nothing) (T.apply (T.var "BuddyListB") T.string)]) T.string)
-    T.string]
-
-recordProjectionsWithVariablesTests :: TTermDefinition TestGroup
-recordProjectionsWithVariablesTests = define "recordProjectionsWithVariablesTests" $
-  subgroup "Record projections with variables" [
-  checkTest "project from lambda parameter" []
-    (lambda "person" $ project (TestTypes.testTypePersonName) (name "firstName") @@ var "person")
-    (lambdaTyped "person" (T.var "Person") $ project (TestTypes.testTypePersonName) (name "firstName") @@ var "person")
-    (T.function (T.var "Person") T.string),
-  checkTest "project from polymorphic lambda parameter" []
-    (lambda "coords" $ project (TestTypes.testTypeLatLonPolyName) (name "lat") @@ var "coords")
-    (tylam "t0" $ lambdaTyped "coords" (T.apply (T.var "LatLonPoly") (T.var "t0")) $ tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lat")) (T.var "t0") @@ var "coords")
-    (T.forAll "t0" $ T.function (T.apply (T.var "LatLonPoly") (T.var "t0")) (T.var "t0")),
-  checkTest "multiple projections from same record" []
-    (lambda "person" $
-     tuple [project (TestTypes.testTypePersonName) (name "firstName") @@ var "person",
-            project (TestTypes.testTypePersonName) (name "lastName") @@ var "person"])
-    (lambdaTyped "person" (T.var "Person") $
-     tyapps (pair
-       (project (TestTypes.testTypePersonName) (name "firstName") @@ var "person")
-       (project (TestTypes.testTypePersonName) (name "lastName") @@ var "person")) [T.string, T.string])
-    (T.function (T.var "Person") (T.pair T.string T.string))]
-
-recordProjectionsInComplexContextsTests :: TTermDefinition TestGroup
-recordProjectionsInComplexContextsTests = define "recordProjectionsInComplexContextsTests" $
-  subgroup "Record projections in complex contexts" [
-  checkTest "projection in let binding" []
-    (lets ["person">: record (name "Person") [
-             "firstName" >: string "Charlie",
-             "lastName" >: string "Brown",
-             "age" >: int32 35],
-           "getName">: project (TestTypes.testTypePersonName) (name "firstName")] $
-          var "getName" @@ var "person")
-    (letsTyped [("person", record (name "Person") [
-                   "firstName" >: string "Charlie",
-                   "lastName" >: string "Brown",
-                   "age" >: int32 35],
-                 T.mono $ T.var "Person"),
-                ("getName", project (TestTypes.testTypePersonName) (name "firstName"),
-                 T.mono $ T.function (T.var "Person") T.string)] $
-      var "getName" @@ var "person")
-    T.string,
-  checkTest "projection in tuple" []
-    (tuple [project (TestTypes.testTypePersonName) (name "firstName"),
-            project (TestTypes.testTypePersonName) (name "age")])
-    (tyapps (pair
-      (project (TestTypes.testTypePersonName) (name "firstName"))
-      (project (TestTypes.testTypePersonName) (name "age")))
-      [T.function (T.var "Person") T.string, T.function (T.var "Person") T.int32])
-    (T.pair (T.function (T.var "Person") T.string) (T.function (T.var "Person") T.int32)),
-  noChange "projection in list"
-    (list [project (TestTypes.testTypePersonName) (name "firstName"),
-           project (TestTypes.testTypePersonName) (name "lastName")])
-    (T.list (T.function (T.var "Person") T.string))]
-
-multiParameterPolymorphicProjectionsTests :: TTermDefinition TestGroup
-multiParameterPolymorphicProjectionsTests = define "multiParameterPolymorphicProjectionsTests" $
-  subgroup "Multi-parameter polymorphic projections" [
-  checkTest "project first from Triple" []
-    (project (TestTypes.testTypeTripleName) (name "first"))
-    (tylams ["t0", "t1", "t2"] $ tyapps (project (TestTypes.testTypeTripleName) (name "first")) [T.var "t0", T.var "t1", T.var "t2"])
-    (T.forAlls ["t0", "t1", "t2"] $
-      T.function
-        (T.applys (Core.typeVariable $ TestTypes.testTypeTripleName) [T.var "t0", T.var "t1", T.var "t2"])
-        (T.var "t0")),
-  checkTest "project second from Triple applied" []
-    (project (TestTypes.testTypeTripleName) (name "second") @@
-      record (TestTypes.testTypeTripleName) [
-        "first">: int32 1,
-        "second">: string "middle",
-        "third">: boolean True])
-    (tyapps (project (TestTypes.testTypeTripleName) (name "second")) [T.int32, T.string, T.boolean] @@
-      tyapps (record (TestTypes.testTypeTripleName) [
-        "first">: int32 1,
-        "second">: string "middle",
-        "third">: boolean True]) [T.int32, T.string, T.boolean])
-    T.string,
-  checkTest "project from Triple and use second field, which is another polymorphic record" []
-    (lambda "triple" $ lambda "key" $
-      match (TestTypes.testTypePersonOrSomethingName) nothing [
-        "person">: lambda "p" $ Core.termMaybe nothing,
-        "other">: lambda "m" $ primitive _maps_lookup @@ var "key" @@ var "m"] @@
-      (project (TestTypes.testTypeTripleName) (name "second") @@ var "triple"))
-    (tylams ["t0", "t1", "t2", "t3"] $
-      lambdaTyped "triple"
-        (T.applys (Core.typeVariable $ TestTypes.testTypeTripleName)
-          [T.var "t0",
-           T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) (T.map (T.var "t1") (T.var "t2")),
-           T.var "t3"]) $
-      lambdaTyped "key" (T.var "t1") $
-      tyapp (match (TestTypes.testTypePersonOrSomethingName) nothing [
-        "person">: lambdaTyped "p" (Core.typeVariable $ TestTypes.testTypePersonName) (tyapp (Core.termMaybe nothing) (T.var "t2")),
-        "other">: lambdaTyped "m" (T.map (T.var "t1") (T.var "t2")) $
-          tyapps (primitive _maps_lookup) [T.var "t1", T.var "t2"] @@ var "key" @@ var "m"]) (T.map (T.var "t1") (T.var "t2")) @@
-      (tyapps (project (TestTypes.testTypeTripleName) (name "second"))
-        [T.var "t0",
-         T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) (T.map (T.var "t1") (T.var "t2")),
-         T.var "t3"] @@ var "triple"))
-    (T.forAlls ["t0", "t1", "t2", "t3"] $
-      T.function
-        (T.applys (Core.typeVariable $ TestTypes.testTypeTripleName)
-          [T.var "t0",
-           T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) (T.map (T.var "t1") (T.var "t2")),
-           T.var "t3"])
-        (T.function (T.var "t1") (T.optional (T.var "t2"))))]
-
-higherOrderRecordProjectionsTests :: TTermDefinition TestGroup
-higherOrderRecordProjectionsTests = define "higherOrderRecordProjectionsTests" $
-  subgroup "Higher-order record projections" [
-  checkTest "map projection over list of records" []
-    (primitive _lists_map @@ (project (TestTypes.testTypePersonName) (name "firstName")) @@
-     list [record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Alice"),
-             "lastName">: (string "Smith"),
-             "age">: (int32 30)],
-           record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Bob"),
-             "lastName">: (string "Jones"),
-             "age">: (int32 25)]])
-    (tyapps (primitive _lists_map) [Core.typeVariable $ TestTypes.testTypePersonName, T.string] @@ (project (TestTypes.testTypePersonName) (name "firstName")) @@
-     list [record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Alice"),
-             "lastName">: (string "Smith"),
-             "age">: (int32 30)],
-           record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Bob"),
-             "lastName">: (string "Jones"),
-             "age">: (int32 25)]])
-    (T.list T.string),
-  checkTest "map polymorphic projection" []
-    (primitive _lists_map @@ (project (TestTypes.testTypeLatLonPolyName) (name "lat")) @@
-     list [record (TestTypes.testTypeLatLonPolyName) [
-             "lat">: (int32 40),
-             "lon">: (int32 (-74))],
-           record (TestTypes.testTypeLatLonPolyName) [
-             "lat">: (int32 34),
-             "lon">: (int32 (-118))]])
-    (tyapps (primitive _lists_map) [T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) T.int32, T.int32]
-      @@ (tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lat")) T.int32) @@
-     list [tyapp (record (TestTypes.testTypeLatLonPolyName) [
-             "lat">: (int32 40),
-             "lon">: (int32 (-74))]) T.int32,
-           tyapp (record (TestTypes.testTypeLatLonPolyName) [
-             "lat">: (int32 34),
-             "lon">: (int32 (-118))]) T.int32])
-    (T.list T.int32),
-  checkTest "filter using projection" []
-    (primitive _lists_filter @@
-     (lambda "person" $
-      primitive _equality_gt @@
-      (project (TestTypes.testTypePersonName) (name "age") @@ var "person") @@
-      int32 30) @@
-     list [record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Alice"),
-             "lastName">: (string "Smith"),
-             "age">: (int32 35)],
-           record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Bob"),
-             "lastName">: (string "Jones"),
-             "age">: (int32 25)]])
-    (tyapp (primitive _lists_filter) (Core.typeVariable $ TestTypes.testTypePersonName) @@
-     (lambdaTyped "person" (Core.typeVariable $ TestTypes.testTypePersonName) $
-      tyapp (primitive _equality_gt) T.int32 @@
-      (project (TestTypes.testTypePersonName) (name "age") @@ var "person") @@
-      int32 30) @@
-     list [record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Alice"),
-             "lastName">: (string "Smith"),
-             "age">: (int32 35)],
-           record (TestTypes.testTypePersonName) [
-             "firstName">: (string "Bob"),
-             "lastName">: (string "Jones"),
-             "age">: (int32 25)]])
-    (T.list (Core.typeVariable $ TestTypes.testTypePersonName))]
-
-recursiveRecordProjectionsTests :: TTermDefinition TestGroup
-recursiveRecordProjectionsTests = define "recursiveRecordProjectionsTests" $
-  subgroup "Recursive record projections" [
-  checkTest "nested projection from recursive record" []
-    (lambda "intList" $
-     primitive _maybes_maybe @@
-     int32 0 @@
-     (project (TestTypes.testTypeIntListName) (name "head")) @@
-     (project (TestTypes.testTypeIntListName) (name "tail") @@ var "intList"))
-    (lambdaTyped "intList" (Core.typeVariable $ TestTypes.testTypeIntListName) $
-     tyapps (primitive _maybes_maybe) [T.int32, Core.typeVariable $ TestTypes.testTypeIntListName] @@
-     int32 0 @@
-     (project (TestTypes.testTypeIntListName) (name "head")) @@
-     (project (TestTypes.testTypeIntListName) (name "tail") @@ var "intList"))
-    (T.function (Core.typeVariable $ TestTypes.testTypeIntListName) T.int32)]
-
-recordProjectionsWithMutualRecursionTests :: TTermDefinition TestGroup
-recordProjectionsWithMutualRecursionTests = define "recordProjectionsWithMutualRecursionTests" $
-  subgroup "Record projections with mutual recursion" [
-  checkTest "project head from BuddyListA" []
-    (project (TestTypes.testTypeBuddyListAName) (name "head"))
-    (tylam "t0" $ tyapp (project (TestTypes.testTypeBuddyListAName) (name "head")) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) (T.var "t0")) (T.var "t0")),
-  checkTest "project tail from BuddyListB" []
-    (project (TestTypes.testTypeBuddyListBName) (name "tail"))
-    (tylam "t0" $ tyapp (project (TestTypes.testTypeBuddyListBName) (name "tail")) (T.var "t0"))
-    (T.forAll "t0" $ T.function
-      (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0"))
-      (T.optional (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) (T.var "t0")))),
-  checkTest "chained projections across mutual recursion" []
-    (lambda "listA" $
-      primitive _maybes_maybe @@
-      Core.termMaybe nothing @@
-      (lambda "listB" $
-        primitive _maybes_maybe @@
-        Core.termMaybe nothing @@
-        (project (TestTypes.testTypeBuddyListAName) (name "tail")) @@
-        (project (TestTypes.testTypeBuddyListBName) (name "tail") @@ var "listB")) @@
-      (project (TestTypes.testTypeBuddyListAName) (name "tail") @@ var "listA"))
-    (tylam "t0" $ lambdaTyped "listA" (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) (T.var "t0")) $
-      tyapps (primitive _maybes_maybe) [T.optional (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0")), T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0")] @@
-      tyapp (Core.termMaybe nothing) (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0")) @@
-      (lambdaTyped "listB" (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0")) $
-        tyapps (primitive _maybes_maybe) [T.optional (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0")), T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) (T.var "t0")] @@
-        tyapp (Core.termMaybe nothing) (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0")) @@
-        (tyapp (project (TestTypes.testTypeBuddyListAName) (name "tail")) (T.var "t0")) @@
-        (tyapp (project (TestTypes.testTypeBuddyListBName) (name "tail")) (T.var "t0") @@ var "listB")) @@
-      (tyapp (project (TestTypes.testTypeBuddyListAName) (name "tail")) (T.var "t0") @@ var "listA"))
-    (T.forAll "t0" $ T.function
-      (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) (T.var "t0"))
-      (T.optional (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListBName) (T.var "t0"))))]
-
------- Unions ------
-
-unionsTests :: TTermDefinition TestGroup
-unionsTests = define "unionsTests" $
-  supergroup "Unions" [
-  simpleUnionInjectionsTests,
-  unionInjectionsWithDataTests,
-  polymorphicUnionInjectionsTests,
-  polymorphicRecursiveUnionInjectionsTests,
-  polymorphicUnionsFromLambdaTests,
-  unionsInComplexContextsTests,
-  multiParameterPolymorphicInjectionsTests]
-
-simpleUnionInjectionsTests :: TTermDefinition TestGroup
-simpleUnionInjectionsTests = define "simpleUnionInjectionsTests" $
-  subgroup "Simple union injections" [
-  noChange "inject into Comparison lessThan variant"
-    (injectUnit (TestTypes.testTypeComparisonName) "lessThan")
-    (Core.typeVariable $ TestTypes.testTypeComparisonName),
-  noChange "inject into Comparison equalTo variant"
-    (injectUnit (TestTypes.testTypeComparisonName) "equalTo")
-    (Core.typeVariable $ TestTypes.testTypeComparisonName),
-  noChange "inject into Comparison greaterThan variant"
-    (injectUnit (TestTypes.testTypeComparisonName) "greaterThan")
-    (Core.typeVariable $ TestTypes.testTypeComparisonName)]
-
-unionInjectionsWithDataTests :: TTermDefinition TestGroup
-unionInjectionsWithDataTests = define "unionInjectionsWithDataTests" $
-  subgroup "Union injections with data" [
-  noChange "inject into Number int variant"
-    (inject (TestTypes.testTypeNumberName) "int" (int32 42))
-    (Core.typeVariable $ TestTypes.testTypeNumberName),
-  noChange "inject into Number float variant"
-    (inject (TestTypes.testTypeNumberName) "float" (float32 3.14))
-    (Core.typeVariable $ TestTypes.testTypeNumberName),
-  noChange "inject into Timestamp unixTimeMillis variant"
-    (inject (TestTypes.testTypeTimestampName) "unixTimeMillis" (uint64 1609459200000))
-    (Core.typeVariable $ TestTypes.testTypeTimestampName),
-  noChange "inject into Timestamp date variant"
-    (inject (TestTypes.testTypeTimestampName) "date" (string "2021-01-01"))
-    (Core.typeVariable $ TestTypes.testTypeTimestampName)]
-
-polymorphicUnionInjectionsTests :: TTermDefinition TestGroup
-polymorphicUnionInjectionsTests = define "polymorphicUnionInjectionsTests" $
-  subgroup "Polymorphic union injections" [
-  checkTest "inject person into PersonOrSomething" []
-    (inject (TestTypes.testTypePersonOrSomethingName) "person"
-      (record (TestTypes.testTypePersonName) [
-        "firstName">: string "Alice",
-        "lastName">: string "Smith",
-        "age">: int32 30]))
-    (tylam "t0" $ tyapp (inject (TestTypes.testTypePersonOrSomethingName) "person"
-      (record (TestTypes.testTypePersonName) [
-        "firstName">: string "Alice",
-        "lastName">: string "Smith",
-        "age">: int32 30])) (T.var "t0"))
-    (T.forAll "t0" $ T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) (T.var "t0")),
-  checkTest "inject string into PersonOrSomething other variant" []
-    (inject (TestTypes.testTypePersonOrSomethingName) "other" (string "something else"))
-    (tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (string "something else")) T.string)
-    (T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) T.string),
-  checkTest "inject int into PersonOrSomething other variant" []
-    (inject (TestTypes.testTypePersonOrSomethingName) "other" (int32 42))
-    (tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (int32 42)) T.int32)
-    (T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) T.int32)]
-
-polymorphicRecursiveUnionInjectionsTests :: TTermDefinition TestGroup
-polymorphicRecursiveUnionInjectionsTests = define "polymorphicRecursiveUnionInjectionsTests" $
-  subgroup "Polymorphic recursive union injections" [
-  checkTest "inject boolean into UnionPolymorphicRecursive" []
-    (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "bool" (boolean True))
-    (tylam "t0" $ tyapp (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "bool" (boolean True)) (T.var "t0"))
-    (T.forAll "t0" $ T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t0")),
-  checkTest "inject string value into UnionPolymorphicRecursive" []
-    (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" (string "test"))
-    (tyapp (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" (string "test")) T.string)
-    (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.string),
-  checkTest "inject int value into UnionPolymorphicRecursive" []
-    (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" (int32 123))
-    (tyapp (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" (int32 123)) T.int32)
-    (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32)]
-
-polymorphicUnionsFromLambdaTests :: TTermDefinition TestGroup
-polymorphicUnionsFromLambdaTests = define "polymorphicUnionsFromLambdaTests" $
-  subgroup "Polymorphic unions from lambda" [
-  checkTest "lambda creating PersonOrSomething other variant" []
-    (lambda "x" $ inject (TestTypes.testTypePersonOrSomethingName) "other" (var "x"))
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (var "x")) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) (T.var "t0"))),
-  checkTest "lambda creating UnionPolymorphicRecursive value variant" []
-    (lambda "x" $ inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" (var "x"))
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapp (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" (var "x")) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t0")))]
-
-unionsInComplexContextsTests :: TTermDefinition TestGroup
-unionsInComplexContextsTests = define "unionsInComplexContextsTests" $
-  subgroup "Unions in complex contexts" [
-  checkTest "union in tuple" []
-    (tuple [inject (TestTypes.testTypeNumberName) "int" (int32 42),
-            string "context"])
-    (tyapps (pair
-      (inject (TestTypes.testTypeNumberName) "int" (int32 42))
-      (string "context"))
-      [Core.typeVariable $ TestTypes.testTypeNumberName, T.string])
-    (T.pair (Core.typeVariable $ TestTypes.testTypeNumberName) T.string),
-  noChange "union in list"
-    (list [inject (TestTypes.testTypeNumberName) "int" (int32 1),
-           inject (TestTypes.testTypeNumberName) "float" (float32 2.5)])
-    (T.list $ Core.typeVariable $ TestTypes.testTypeNumberName),
-  checkTest "polymorphic union in let binding" []
-    (lets ["value">: inject (TestTypes.testTypePersonOrSomethingName) "other" (string "test")] $
-          var "value")
-    (letsTyped [("value", tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (string "test")) T.string,
-                 T.mono $ T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) T.string)] $
-      var "value")
-    (T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) T.string)]
-
-multiParameterPolymorphicInjectionsTests :: TTermDefinition TestGroup
-multiParameterPolymorphicInjectionsTests = define "multiParameterPolymorphicInjectionsTests" $
-  subgroup "Multi-parameter polymorphic injections" [
-  checkTest "either left with int" []
-    (inject (TestTypes.testTypeEitherName) "left" (int32 42))
-    (tylam "t0" $ tyapps (inject (TestTypes.testTypeEitherName) "left" (int32 42)) [T.int32, T.var "t0"])
-    (T.forAll "t0" $ T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.int32, T.var "t0"]),
-  checkTest "either right with string" []
-    (inject (TestTypes.testTypeEitherName) "right" (string "hello"))
-    (tylam "t0" $ tyapps (inject (TestTypes.testTypeEitherName) "right" (string "hello")) [T.var "t0", T.string])
-    (T.forAll "t0" $ T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.string]),
-  checkTest "either containing LatLonPoly in list" []
-    (inject (TestTypes.testTypeEitherName) "right"
-      (list [record (TestTypes.testTypeLatLonPolyName) [
-        "lat">: int32 40,
-        "lon">: int32 (-74)]]))
-    (tylam "t0" $ tyapps (inject (TestTypes.testTypeEitherName) "right"
-      (list [tyapp (record (TestTypes.testTypeLatLonPolyName) [
-        "lat">: int32 40,
-        "lon">: int32 (-74)]) T.int32]))
-      [T.var "t0", T.list (T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) T.int32)])
-    (T.forAll "t0" $ T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.list (T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) T.int32)]),
-  checkTest "either in triple in map with shared type variables" []
-    (lambda "x0" $ lambda "x1" $ lambda "x2" $
-      Terms.map $ Phantoms.map $ M.singleton (string "key") $
-        record (TestTypes.testTypeTripleName) [
-          "first">: inject (TestTypes.testTypeEitherName) "left" (var "x0"),
-          "second">: inject (TestTypes.testTypeEitherName) "left" (var "x0"),
-          "third">: inject (TestTypes.testTypeEitherName) "right" (var "x1")])
-    (tylams ["t0", "t1", "t2", "t3", "t4", "t5"] $
-      lambdaTyped "x0" (T.var "t0") $
-      lambdaTyped "x1" (T.var "t1") $
-      lambdaTyped "x2" (T.var "t2") $
-      Terms.map $ Phantoms.map $ M.singleton (string "key") $
-        tyapps (record (TestTypes.testTypeTripleName) [
-          "first">: tyapps (inject (TestTypes.testTypeEitherName) "left" (var "x0")) [T.var "t0", T.var "t3"],
-          "second">: tyapps (inject (TestTypes.testTypeEitherName) "left" (var "x0")) [T.var "t0", T.var "t4"],
-          "third">: tyapps (inject (TestTypes.testTypeEitherName) "right" (var "x1")) [T.var "t5", T.var "t1"]])
-        [T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.var "t3"],
-         T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.var "t4"],
-         T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t5", T.var "t1"]])
-    (T.forAlls ["t0", "t1", "t2", "t3", "t4", "t5"] $
-      T.function (T.var "t0") $
-      T.function (T.var "t1") $
-      T.function (T.var "t2") $
-      T.map T.string $
-        T.applys (Core.typeVariable $ TestTypes.testTypeTripleName)
-          [T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.var "t3"],
-           T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.var "t4"],
-           T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t5", T.var "t1"]])]
-
------- Union eliminations ------
-
-unionEliminationsTests :: TTermDefinition TestGroup
-unionEliminationsTests = define "unionEliminationsTests" $
-  supergroup "Union eliminations" [
-  simpleUnitVariantEliminationsTests,
-  unionEliminationsWithDataTests,
-  polymorphicUnionEliminationsTests,
-  unionEliminationsWithDefaultsTests,
-  nestedUnionEliminationsTests,
-  unionEliminationsInComplexContextsTests,
-  multiParameterPolymorphicCaseStatementsTests,
-  higherOrderUnionEliminationsTests,
-  recursiveUnionEliminationsTests]
-
-simpleUnitVariantEliminationsTests :: TTermDefinition TestGroup
-simpleUnitVariantEliminationsTests = define "simpleUnitVariantEliminationsTests" $
-  subgroup "Simple unit inject eliminations" [
-  checkTest "match Comparison with all cases" []
-    (match (TestTypes.testTypeComparisonName) nothing [
-      "lessThan">: lambda "x" (string "less"),
-      "equalTo">: lambda "x" (string "equal"),
-      "greaterThan">: lambda "x" (string "greater")])
-    (match (TestTypes.testTypeComparisonName) nothing [
-      "lessThan">: lambdaTyped "x" T.unit (string "less"),
-      "equalTo">: lambdaTyped "x" T.unit (string "equal"),
-      "greaterThan">: lambdaTyped "x" T.unit (string "greater")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.string),
-  checkTest "match Comparison returning int32" []
-    (match (TestTypes.testTypeComparisonName) nothing [
-      "lessThan">: lambda "x" (int32 (-1)),
-      "equalTo">: lambda "x" (int32 0),
-      "greaterThan">: lambda "x" (int32 1)])
-    (match (TestTypes.testTypeComparisonName) nothing [
-      "lessThan">: lambdaTyped "x" T.unit (int32 (-1)),
-      "equalTo">: lambdaTyped "x" T.unit (int32 0),
-      "greaterThan">: lambdaTyped "x" T.unit (int32 1)])
-    (T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.int32),
-  checkTest "match applied to Comparison variant" []
-    (match (TestTypes.testTypeComparisonName) nothing [
-      "lessThan">: lambda "x" (string "less"),
-      "equalTo">: lambda "x" (string "equal"),
-      "greaterThan">: lambda "x" (string "greater")] @@
-     injectUnit (TestTypes.testTypeComparisonName) "equalTo")
-    (match (TestTypes.testTypeComparisonName) nothing [
-      "lessThan">: lambdaTyped "x" T.unit (string "less"),
-      "equalTo">: lambdaTyped "x" T.unit (string "equal"),
-      "greaterThan">: lambdaTyped "x" T.unit (string "greater")] @@
-     injectUnit (TestTypes.testTypeComparisonName) "equalTo")
-    T.string]
-
-unionEliminationsWithDataTests :: TTermDefinition TestGroup
-unionEliminationsWithDataTests = define "unionEliminationsWithDataTests" $
-  subgroup "Union eliminations with data" [
-  checkTest "match Number extracting int values" []
-    (match (TestTypes.testTypeNumberName) nothing [
-      "int">: lambda "i" (var "i"),
-      "float">: lambda "f" (int32 0)])
-    (match (TestTypes.testTypeNumberName) nothing [
-      "int">: lambdaTyped "i" T.int32 (var "i"),
-      "float">: lambdaTyped "f" T.float32 (int32 0)])
-    (T.function (Core.typeVariable $ TestTypes.testTypeNumberName) T.int32),
-  checkTest "match Number converting to string" []
-    (match (TestTypes.testTypeNumberName) nothing [
-      "int">: lambda "i" (primitive _literals_showInt32 @@ var "i"),
-      "float">: lambda "f" (primitive _literals_showFloat32 @@ var "f")])
-    (match (TestTypes.testTypeNumberName) nothing [
-      "int">: lambdaTyped "i" T.int32 (primitive _literals_showInt32 @@ var "i"),
-      "float">: lambdaTyped "f" T.float32 (primitive _literals_showFloat32 @@ var "f")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeNumberName) T.string),
-  checkTest "match Number applied to int variant" []
-    (match (TestTypes.testTypeNumberName) nothing [
-      "int">: lambda "i" (primitive _math_add @@ var "i" @@ int32 10),
-      "float">: lambda "f" (int32 0)] @@
-     inject (TestTypes.testTypeNumberName) "int" (int32 42))
-    (match (TestTypes.testTypeNumberName) nothing [
-      "int">: lambdaTyped "i" T.int32 (primitive _math_add @@ var "i" @@ int32 10),
-      "float">: lambdaTyped "f" T.float32 (int32 0)] @@
-     inject (TestTypes.testTypeNumberName) "int" (int32 42))
-    T.int32,
-  checkTest "match Timestamp with mixed data types" []
-    (match (TestTypes.testTypeTimestampName) nothing [
-      "unixTimeMillis">: lambda "millis" (primitive _literals_showUint64 @@ var "millis"),
-      "date">: lambda "dateStr" (var "dateStr")])
-    (match (TestTypes.testTypeTimestampName) nothing [
-      "unixTimeMillis">: lambdaTyped "millis" T.uint64 (primitive _literals_showUint64 @@ var "millis"),
-      "date">: lambdaTyped "dateStr" T.string (var "dateStr")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeTimestampName) T.string)]
-
-polymorphicUnionEliminationsTests :: TTermDefinition TestGroup
-polymorphicUnionEliminationsTests = define "polymorphicUnionEliminationsTests" $
-  supergroup "Polymorphic union eliminations" [
-  simplePolymorphicUnionTests,
-  usingUnionPolymorphicRecursiveTests,
-  usingKernelTypesTests]
-
-simplePolymorphicUnionTests :: TTermDefinition TestGroup
-simplePolymorphicUnionTests = define "simplePolymorphicUnionTests" $
-  subgroup "Simple polymorphic unions" [
-  checkTest "match PersonOrSomething with string" []
-    (match (TestTypes.testTypePersonOrSomethingName) nothing [
-      "person">: lambda "p" (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-      "other">: lambda "x" (var "x")])
-    (tyapp (match (TestTypes.testTypePersonOrSomethingName) nothing [
-      "person">: lambdaTyped "p" (Core.typeVariable $ TestTypes.testTypePersonName) (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-      "other">: lambdaTyped "x" T.string (var "x")]) T.string)
-    (T.function (T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) T.string) T.string),
-  checkTest "match PersonOrSomething instantiated with string" []
-    (match (TestTypes.testTypePersonOrSomethingName) nothing [
-      "person">: lambda "p" (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-      "other">: lambda "x" (var "x")] @@
-     inject (TestTypes.testTypePersonOrSomethingName) "other" (string "test"))
-    (tyapp (match (TestTypes.testTypePersonOrSomethingName) nothing [
-      "person">: lambdaTyped "p" (Core.typeVariable $ TestTypes.testTypePersonName) (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-      "other">: lambdaTyped "x" T.string (var "x")]) T.string @@
-     tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (string "test")) T.string)
-    T.string]
-
-usingUnionPolymorphicRecursiveTests :: TTermDefinition TestGroup
-usingUnionPolymorphicRecursiveTests = define "usingUnionPolymorphicRecursiveTests" $
-  subgroup "using UnionPolymorphicRecursive" [
-  checkTest "non-applied UnionPolymorphicRecursive" []
-    (lets [
-      "test">: (match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-        (just $ string "other") [
-        "value">: lambda "i" $ primitive _literals_showInt32 @@ var "i"])] $
-      var "test")
-    (letsTyped [
-        ("test",
-         tyapp (match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-           (just $ string "other") [
-           "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32,
-         T.mono $ T.function (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string)] $
-      var "test")
-    (T.function (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string),
-  checkTest "applied UnionPolymorphicRecursive with int32" []
-    (lets [
-      "test">: (match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-          (just $ string "other") [
-          "value">: lambda "i" $ primitive _literals_showInt32 @@ var "i"])
-        @@ (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" $ int32 42)] $
-      var "test")
-    (letsTyped [
-      ("test",
-       tyapp (match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-           (just $ string "other") [
-           "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32
-         @@ tyapp (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" $ int32 42) T.int32,
-       T.mono T.string)] $
-      var "test")
-    T.string,
-  checkTest "applied UnionPolymorphicRecursive with int32 in lambda" []
-    (lets [
-      "test">: lambda "x" $ match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-          (just $ string "other") [
-          "value">: lambda "i" $ primitive _literals_showInt32 @@ var "i"]
-        @@ var "x"] $
-      var "test")
-    (letsTyped [
-      ("test",
-       lambdaTyped "x" (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) $
-         tyapp (match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-             (just $ string "other") [
-             "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32
-           @@ var "x",
-       T.mono $ T.function (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string)] $
-      var "test")
-    (T.function (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string),
-  checkTest "applied generic UnionPolymorphicRecursive in lambda" []
-    (lets [
-      "test">: lambda "x" $ match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-          (just $ string "other") [
-          "value">: lambda "ignored" $ string "foo"]
-        @@ var "x"] $
-      var "test")
-    (tylam "t0" $ letsTyped [
-      ("test",
-       tylam "t1" $ lambdaTyped "x" (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t1")) $
-         tyapp (match (TestTypes.testTypeUnionPolymorphicRecursiveName)
-             (just $ string "other") [
-             "value">: lambdaTyped "ignored" (T.var "t1") $ string "foo"]) (T.var "t1")
-           @@ var "x",
-       T.poly ["t1"] $ T.function (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t1")) T.string)] $
-      tyapp (var "test") $ T.var "t0")
-    (T.forAll "t0" $ T.function (T.apply (Core.typeVariable $ TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t0")) T.string)]
-
-usingKernelTypesTests :: TTermDefinition TestGroup
-usingKernelTypesTests = define "usingKernelTypesTests" $
-  subgroup "Using kernel types" [
-  checkTest "case statement on CoderDirection applied to argument" [tag_disabled]
-    (lambda "dir" $
-      lambda "coder" $
-        match (name "hydra.coders.CoderDirection")
-          nothing [
-          "encode">: lambda "_" $
-            lambda "v12" $
-              project (name "hydra.coders.Coder") (name "encode")
-                @@ var "coder" @@ var "v12",
-          "decode">: lambda "_" $
-            lambda "v12" $
-              project (name "hydra.coders.Coder") (name "decode")
-                @@ var "coder" @@ var "v12"]
-          @@ var "dir")
-    (tylams ["t0"] $
-      lambdaTyped "dir" (T.var "hydra.coders.CoderDirection") $
-        lambdaTyped "coder" (T.applys (T.var "hydra.coders.Coder") (T.var <$> ["t0", "t0"])) $
-          match (name "hydra.coders.CoderDirection")
-            nothing [
-            "encode">: lambdaTyped "_" T.unit $
-              lambdaTyped "v12" (T.var "hydra.context.Context") $
-                tyapps (project (name "hydra.coders.Coder") (name "encode")) (T.var <$> ["t0", "t0"])
-                  @@ var "coder" @@ var "v12",
-            "decode">: lambdaTyped "_" T.unit $
-              lambdaTyped "v12" (T.var "hydra.context.Context") $
-                tyapps (project (name "hydra.coders.Coder") (name "decode")) (T.var <$> ["t0", "t0"])
-                  @@ var "coder" @@ var "v12"]
-          @@ var "dir")
-    (T.forAll "t0" $
-      T.functionMany [
-        T.var "hydra.coders.CoderDirection",
-        T.applys (T.var "hydra.coders.Coder") (T.var <$> ["t0", "t0"]),
-        T.var "hydra.context.Context",
-        T.var "t0",
-        T.either_ (T.applys (T.var "hydra.context.InContext") [T.var "hydra.errors.Error"]) (T.var "t0")])]
-
-unionEliminationsWithDefaultsTests :: TTermDefinition TestGroup
-unionEliminationsWithDefaultsTests = define "unionEliminationsWithDefaultsTests" $
-  subgroup "Union eliminations with defaults" [
-  checkTest "match Comparison with default case" []
-    (match (TestTypes.testTypeComparisonName) (just (string "unknown")) [
-      "lessThan">: lambda "x" (string "less"),
-      "equalTo">: lambda "x" (string "equal")])
-    (match (TestTypes.testTypeComparisonName) (just (string "unknown")) [
-      "lessThan">: lambdaTyped "x" T.unit (string "less"),
-      "equalTo">: lambdaTyped "x" T.unit (string "equal")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.string),
-  checkTest "match Number with default case" []
-    (match (TestTypes.testTypeNumberName) (just (int32 (-1))) [
-      "int">: lambda "i" (var "i")])
-    (match (TestTypes.testTypeNumberName) (just (int32 (-1))) [
-      "int">: lambdaTyped "i" T.int32 (var "i")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeNumberName) T.int32),
-  checkTest "match UnionMonomorphic with default" []
-    (match (TestTypes.testTypeUnionMonomorphicName) (just (string "fallback")) [
-      "bool">: lambda "b" (primitive _literals_showBoolean @@ var "b"),
-      "string">: lambda "s" (var "s")])
-    (match (TestTypes.testTypeUnionMonomorphicName) (just (string "fallback")) [
-      "bool">: lambdaTyped "b" T.boolean (primitive _literals_showBoolean @@ var "b"),
-      "string">: lambdaTyped "s" T.string (var "s")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeUnionMonomorphicName) T.string)]
-
-nestedUnionEliminationsTests :: TTermDefinition TestGroup
-nestedUnionEliminationsTests = define "nestedUnionEliminationsTests" $
-  subgroup "Nested union eliminations" [
-  checkTest "nested match statements" []
-    (match (TestTypes.testTypePersonOrSomethingName) nothing [
-      "person">: lambda "p" (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-      "other">: lambda "x" (
-        match (TestTypes.testTypeNumberName) nothing [
-          "int">: lambda "i" (primitive _literals_showInt32 @@ var "i"),
-          "float">: lambda "f" (primitive _literals_showFloat32 @@ var "f")] @@
-        var "x")])
-    (tyapp (match (TestTypes.testTypePersonOrSomethingName) nothing [
-      "person">: lambdaTyped "p" (Core.typeVariable $ TestTypes.testTypePersonName) (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-      "other">: lambdaTyped "x" (Core.typeVariable $ TestTypes.testTypeNumberName) (
-        match (TestTypes.testTypeNumberName) nothing [
-          "int">: lambdaTyped "i" T.int32 (primitive _literals_showInt32 @@ var "i"),
-          "float">: lambdaTyped "f" T.float32 (primitive _literals_showFloat32 @@ var "f")] @@
-        var "x")]) (Core.typeVariable $ TestTypes.testTypeNumberName))
-    (T.function (T.apply (Core.typeVariable $ TestTypes.testTypePersonOrSomethingName) (Core.typeVariable $ TestTypes.testTypeNumberName)) T.string),
-  checkTest "match in tuple" []
-    (tuple [
-      match (TestTypes.testTypeComparisonName) nothing [
-        "lessThan">: lambda "x" (int32 1),
-        "equalTo">: lambda "x" (int32 0),
-        "greaterThan">: lambda "x" (int32 (-1))],
-      string "context"])
-    (tyapps (pair
-      (match (TestTypes.testTypeComparisonName) nothing [
-        "lessThan">: lambdaTyped "x" T.unit (int32 1),
-        "equalTo">: lambdaTyped "x" T.unit (int32 0),
-        "greaterThan">: lambdaTyped "x" T.unit (int32 (-1))])
-      (string "context"))
-      [T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.int32, T.string])
-    (T.pair (T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.int32) T.string)]
-
-unionEliminationsInComplexContextsTests :: TTermDefinition TestGroup
-unionEliminationsInComplexContextsTests = define "unionEliminationsInComplexContextsTests" $
-  subgroup "Union eliminations in complex contexts" [
-  checkTest "match in let binding" []
-    (lets ["matcher">: match (TestTypes.testTypeComparisonName) nothing [
-             "lessThan">: lambda "x" (string "less"),
-             "equalTo">: lambda "x" (string "equal"),
-             "greaterThan">: lambda "x" (string "greater")]] $
-          var "matcher")
-    (letsTyped [("matcher", match (TestTypes.testTypeComparisonName) nothing [
-                   "lessThan">: lambdaTyped "x" T.unit (string "less"),
-                   "equalTo">: lambdaTyped "x" T.unit (string "equal"),
-                   "greaterThan">: lambdaTyped "x" T.unit (string "greater")],
-                 T.mono $ T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.string)] $
-      var "matcher")
-    (T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.string),
-  checkTest "match in record" []
-    (record (TestTypes.testTypePersonName) [
-      "firstName">: (match (TestTypes.testTypePersonOrSomethingName) nothing [
-        "person">: lambda "p" (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-        "other">: lambda "x" (var "x")] @@
-       inject (TestTypes.testTypePersonOrSomethingName) "other" (string "John")),
-      "lastName">: (string "Doe"),
-      "age">: (int32 30)])
-    (record (TestTypes.testTypePersonName) [
-      "firstName">: (tyapp (match (TestTypes.testTypePersonOrSomethingName) nothing [
-        "person">: lambdaTyped "p" (Core.typeVariable $ TestTypes.testTypePersonName) (project (TestTypes.testTypePersonName) (name "firstName") @@ var "p"),
-        "other">: lambdaTyped "x" T.string (var "x")]) T.string @@
-       tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (string "John")) T.string),
-      "lastName">: (string "Doe"),
-      "age">: (int32 30)])
-    (Core.typeVariable $ TestTypes.testTypePersonName),
-  checkTest "match with polymorphic result in list" []
-    (list [
-      match (TestTypes.testTypePersonOrSomethingName) nothing [
-        "person">: lambda "p" (project (TestTypes.testTypePersonName) (name "age") @@ var "p"),
-        "other">: lambda "x" (var "x")] @@
-      inject (TestTypes.testTypePersonOrSomethingName) "other" (int32 25),
-      int32 30])
-    (list [
-      tyapp (match (TestTypes.testTypePersonOrSomethingName) nothing [
-        "person">: lambdaTyped "p" (Core.typeVariable $ TestTypes.testTypePersonName) (project (TestTypes.testTypePersonName) (name "age") @@ var "p"),
-        "other">: lambdaTyped "x" T.int32 (var "x")]) T.int32 @@
-      tyapp (inject (TestTypes.testTypePersonOrSomethingName) "other" (int32 25)) T.int32,
-      int32 30])
-    (T.list T.int32)]
-
-multiParameterPolymorphicCaseStatementsTests :: TTermDefinition TestGroup
-multiParameterPolymorphicCaseStatementsTests = define "multiParameterPolymorphicCaseStatementsTests" $
-  subgroup "Multi-parameter polymorphic case statements" [
-  checkTest "case Either converting both to string" []
-    (match (TestTypes.testTypeEitherName) nothing [
-      "left">: lambda "x" $ primitive _literals_showInt32 @@ var "x",
-      "right">: lambda "y" $ primitive _literals_showFloat32 @@ var "y"])
-    (tyapps (match (TestTypes.testTypeEitherName) nothing [
-      "left">: lambdaTyped "x" T.int32 (primitive _literals_showInt32 @@ var "x"),
-      "right">: lambdaTyped "y" T.float32 (primitive _literals_showFloat32 @@ var "y")]) [T.int32, T.float32])
-    (T.function
-      (T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.int32, T.float32])
-      T.string),
-  checkTest "case Either applied to injection" []
-    (match (TestTypes.testTypeEitherName) nothing [
-      "left">: lambda "n" $ primitive _math_add @@ var "n" @@ int32 1,
-      "right">: lambda "s" $ primitive _strings_length @@ var "s"] @@
-     inject (TestTypes.testTypeEitherName) "left" (int32 42))
-    (tyapps (match (TestTypes.testTypeEitherName) nothing [
-      "left">: lambdaTyped "n" T.int32 (primitive _math_add @@ var "n" @@ int32 1),
-      "right">: lambdaTyped "s" T.string (primitive _strings_length @@ var "s")]) [T.int32, T.string] @@
-     tyapps (inject (TestTypes.testTypeEitherName) "left" (int32 42)) [T.int32, T.string])
-    T.int32,
-  checkTest "case Either with Triple and nested projections" []
-    (lambda "triple" $
-      match (TestTypes.testTypeEitherName) nothing [
-        "left">: lambda "coords" $
-          project (TestTypes.testTypeLatLonPolyName) (name "lat") @@ var "coords",
-        "right">: lambda "t" $
-          project (TestTypes.testTypeTripleName) (name "first") @@ var "t"] @@
-      (project (TestTypes.testTypeTripleName) (name "second") @@ var "triple"))
-    (tylams ["t0", "t1", "t2", "t3", "t4"] $
-      lambdaTyped "triple"
-        (T.applys (Core.typeVariable $ TestTypes.testTypeTripleName)
-          [T.var "t0",
-           T.applys (Core.typeVariable $ TestTypes.testTypeEitherName)
-             [T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) (T.var "t1"),
-              T.applys (Core.typeVariable $ TestTypes.testTypeTripleName) [T.var "t1", T.var "t2", T.var "t3"]],
-           T.var "t4"]) $
-      tyapps (match (TestTypes.testTypeEitherName) nothing [
-        "left">: lambdaTyped "coords" (T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) (T.var "t1")) $
-          tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lat")) (T.var "t1") @@ var "coords",
-        "right">: lambdaTyped "t" (T.applys (Core.typeVariable $ TestTypes.testTypeTripleName) [T.var "t1", T.var "t2", T.var "t3"]) $
-          tyapps (project (TestTypes.testTypeTripleName) (name "first")) [T.var "t1", T.var "t2", T.var "t3"] @@ var "t"])
-        [T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) (T.var "t1"),
-         T.applys (Core.typeVariable $ TestTypes.testTypeTripleName) [T.var "t1", T.var "t2", T.var "t3"]] @@
-      (tyapps (project (TestTypes.testTypeTripleName) (name "second"))
-        [T.var "t0",
-         T.applys (Core.typeVariable $ TestTypes.testTypeEitherName)
-           [T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) (T.var "t1"),
-            T.applys (Core.typeVariable $ TestTypes.testTypeTripleName) [T.var "t1", T.var "t2", T.var "t3"]],
-         T.var "t4"] @@ var "triple"))
-    (T.forAlls ["t0", "t1", "t2", "t3", "t4"] $
-      T.function
-        (T.applys (Core.typeVariable $ TestTypes.testTypeTripleName)
-          [T.var "t0",
-           T.applys (Core.typeVariable $ TestTypes.testTypeEitherName)
-             [T.apply (Core.typeVariable $ TestTypes.testTypeLatLonPolyName) (T.var "t1"),
-              T.applys (Core.typeVariable $ TestTypes.testTypeTripleName) [T.var "t1", T.var "t2", T.var "t3"]],
-           T.var "t4"])
-        (T.var "t1")),
-  checkTest "case Either with polymorphic let bindings" []
-    (lets ["makeLeft">: lambda "x" $ inject (TestTypes.testTypeEitherName) "left" (var "x"),
-           "makeRight">: lambda "y" $ inject (TestTypes.testTypeEitherName) "right" (var "y")] $
-      lambda "flag" $
-        match (TestTypes.testTypeEitherName) nothing [
-          "left">: lambda "n" $ var "makeRight" @@ (primitive _math_add @@ var "n" @@ int32 10),
-          "right">: lambda "s" $ var "makeLeft" @@ (primitive _strings_length @@ var "s")] @@
-        var "flag")
-    (letsTyped [("makeLeft", tylams ["t0", "t1"] $ lambdaTyped "x" (T.var "t0") $ tyapps (inject (TestTypes.testTypeEitherName) "left" (var "x")) [T.var "t0", T.var "t1"],
-                 T.poly ["t0", "t1"] $ T.function (T.var "t0") (T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t0", T.var "t1"])),
-                ("makeRight", tylams ["t0", "t1"] $ lambdaTyped "y" (T.var "t0") $ tyapps (inject (TestTypes.testTypeEitherName) "right" (var "y")) [T.var "t1", T.var "t0"],
-                 T.poly ["t0", "t1"] $ T.function (T.var "t0") (T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.var "t1", T.var "t0"]))] $
-      lambdaTyped "flag" (T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.int32, T.string]) $
-        tyapps (match (TestTypes.testTypeEitherName) nothing [
-          "left">: lambdaTyped "n" T.int32 $ tyapps (var "makeRight") [T.int32, T.int32] @@ (primitive _math_add @@ var "n" @@ int32 10),
-          "right">: lambdaTyped "s" T.string $ tyapps (var "makeLeft") [T.int32, T.int32] @@ (primitive _strings_length @@ var "s")]) [T.int32, T.string] @@
-        var "flag")
-    (T.function (T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.int32, T.string]) (T.applys (Core.typeVariable $ TestTypes.testTypeEitherName) [T.int32, T.int32]))]
-
-higherOrderUnionEliminationsTests :: TTermDefinition TestGroup
-higherOrderUnionEliminationsTests = define "higherOrderUnionEliminationsTests" $
-  subgroup "Higher-order union eliminations" [
-  checkTest "map match over list" []
-    (primitive _lists_map @@
-     (match (TestTypes.testTypeComparisonName) nothing [
-       "lessThan">: lambda "x" (string "less"),
-       "equalTo">: lambda "x" (string "equal"),
-       "greaterThan">: lambda "x" (string "greater")]) @@
-     list [injectUnit (TestTypes.testTypeComparisonName) "lessThan",
-           injectUnit (TestTypes.testTypeComparisonName) "equalTo"])
-    (tyapps (primitive _lists_map) [Core.typeVariable $ TestTypes.testTypeComparisonName, T.string] @@
-     (match (TestTypes.testTypeComparisonName) nothing [
-       "lessThan">: lambdaTyped "x" T.unit (string "less"),
-       "equalTo">: lambdaTyped "x" T.unit (string "equal"),
-       "greaterThan">: lambdaTyped "x" T.unit (string "greater")]) @@
-     list [injectUnit (TestTypes.testTypeComparisonName) "lessThan",
-           injectUnit (TestTypes.testTypeComparisonName) "equalTo"])
-    (T.list T.string),
-  checkTest "compose match with other functions" []
-    (lambda "comp" $
-     primitive _strings_length @@
-     (match (TestTypes.testTypeComparisonName) nothing [
-       "lessThan">: lambda "x" (string "less"),
-       "equalTo">: lambda "x" (string "equal"),
-       "greaterThan">: lambda "x" (string "greater")] @@
-      var "comp"))
-    (lambdaTyped "comp" (Core.typeVariable $ TestTypes.testTypeComparisonName) $
-     primitive _strings_length @@
-     (match (TestTypes.testTypeComparisonName) nothing [
-       "lessThan">: lambdaTyped "x" T.unit (string "less"),
-       "equalTo">: lambdaTyped "x" T.unit (string "equal"),
-       "greaterThan">: lambdaTyped "x" T.unit (string "greater")] @@
-      var "comp"))
-    (T.function (Core.typeVariable $ TestTypes.testTypeComparisonName) T.int32),
-  checkTest "match in lambda body" []
-    (lambda "unionValue" $
-     match (TestTypes.testTypeNumberName) nothing [
-       "int">: lambda "i" (primitive _math_add @@ var "i" @@ int32 1),
-       "float">: lambda "f" (int32 0)] @@
-     var "unionValue")
-    (lambdaTyped "unionValue" (Core.typeVariable $ TestTypes.testTypeNumberName) $
-     match (TestTypes.testTypeNumberName) nothing [
-       "int">: lambdaTyped "i" T.int32 (primitive _math_add @@ var "i" @@ int32 1),
-       "float">: lambdaTyped "f" T.float32 (int32 0)] @@
-     var "unionValue")
-    (T.function (Core.typeVariable $ TestTypes.testTypeNumberName) T.int32)]
-
-recursiveUnionEliminationsTests :: TTermDefinition TestGroup
-recursiveUnionEliminationsTests = define "recursiveUnionEliminationsTests" $
-  subgroup "Recursive union eliminations" [
-  checkTest "match HydraType recursively" []
-    (match (TestTypes.testTypeHydraTypeName) nothing [
-      "literal">: lambda "lit" (
-        match (TestTypes.testTypeHydraLiteralTypeName) nothing [
-          "boolean">: lambda "b" (primitive _literals_showBoolean @@ var "b"),
-          "string">: lambda "s" (var "s")] @@
-        var "lit"),
-      "list">: lambda "nested" (string "list")])
-    (match (TestTypes.testTypeHydraTypeName) nothing [
-      "literal">: lambdaTyped "lit" (Core.typeVariable $ TestTypes.testTypeHydraLiteralTypeName) (
-        match (TestTypes.testTypeHydraLiteralTypeName) nothing [
-          "boolean">: lambdaTyped "b" T.boolean (primitive _literals_showBoolean @@ var "b"),
-          "string">: lambdaTyped "s" T.string (var "s")] @@
-        var "lit"),
-      "list">: lambdaTyped "nested" (Core.typeVariable $ TestTypes.testTypeHydraTypeName) (string "list")])
-    (T.function (Core.typeVariable $ TestTypes.testTypeHydraTypeName) T.string)]
-
------- Wrapped terms ------
-
-wrappedTermsTests :: TTermDefinition TestGroup
-wrappedTermsTests = define "wrappedTermsTests" $
-  supergroup "Wrapped terms" [
-  monomorphicWrappedTermsTests,
-  polymorphicWrappedTermsTests,
-  wrappedTermsInComplexContextsTests,
-  nestedWrappedTermsTests,
-  multipleWrappingLevelsTests,
-  multiParameterPolymorphicWrappersTests]
-
-monomorphicWrappedTermsTests :: TTermDefinition TestGroup
-monomorphicWrappedTermsTests = define "monomorphicWrappedTermsTests" $
-  subgroup "Monomorphic wrapped terms" [
-  noChange "string alias"
-    (wrap (TestTypes.testTypeStringAliasName) (string "hello"))
-    (Core.typeVariable $ TestTypes.testTypeStringAliasName),
-  noChange "wrapped integer"
-    (wrap (TestTypes.testTypeStringAliasName) (string "wrapped"))
-    (Core.typeVariable $ TestTypes.testTypeStringAliasName),
-  checkTest "wrapped in tuple" []
-    (tuple [wrap (TestTypes.testTypeStringAliasName) (string "first"),
-            string "second"])
-    (tyapps (pair
-      (wrap (TestTypes.testTypeStringAliasName) (string "first"))
-      (string "second"))
-      [Core.typeVariable $ TestTypes.testTypeStringAliasName, T.string])
-    (T.pair (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string)]
-
-polymorphicWrappedTermsTests :: TTermDefinition TestGroup
-polymorphicWrappedTermsTests = define "polymorphicWrappedTermsTests" $
-  subgroup "Polymorphic wrapped terms" [
-  checkTest "polymorphic wrapper with int" []
-    (wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 1, int32 2]))
-    (tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 1, int32 2])) T.int32)
-    (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) T.int32),
-  checkTest "polymorphic wrapper with string" []
-    (wrap (TestTypes.testTypePolymorphicWrapperName) (list [string "a", string "b"]))
-    (tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [string "a", string "b"])) T.string)
-    (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) T.string),
-  checkTest "polymorphic wrapper from lambda" []
-    (lambda "x" $ wrap (TestTypes.testTypePolymorphicWrapperName) (list [var "x"]))
-    (tylam "t0" $ lambdaTyped "x" (T.var "t0") $ tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [var "x"])) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.var "t0") (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.var "t0")))]
-
-wrappedTermsInComplexContextsTests :: TTermDefinition TestGroup
-wrappedTermsInComplexContextsTests = define "wrappedTermsInComplexContextsTests" $
-  subgroup "Wrapped terms in complex contexts" [
-  noChange "wrapped in record"
-    (record (TestTypes.testTypePersonName) [
-      "firstName">: (string "John"),
-      "lastName">: (string "Doe"),
-      "age">: (int32 30)])
-    (Core.typeVariable $ TestTypes.testTypePersonName),
-  checkTest "wrapped in let binding" []
-    (lets ["alias">: wrap (TestTypes.testTypeStringAliasName) (string "test")] $
-          var "alias")
-    (letsTyped [("alias", wrap (TestTypes.testTypeStringAliasName) (string "test"),
-                 T.mono $ Core.typeVariable $ TestTypes.testTypeStringAliasName)] $
-      var "alias")
-    (Core.typeVariable $ TestTypes.testTypeStringAliasName),
-  noChange "wrapped in list"
-    (list [wrap (TestTypes.testTypeStringAliasName) (string "first"),
-           wrap (TestTypes.testTypeStringAliasName) (string "second")])
-    (T.list $ Core.typeVariable $ TestTypes.testTypeStringAliasName)]
-
-nestedWrappedTermsTests :: TTermDefinition TestGroup
-nestedWrappedTermsTests = define "nestedWrappedTermsTests" $
-  subgroup "Nested wrapped terms" [
-  checkTest "wrapped tuple" []
-    (wrap (TestTypes.testTypePolymorphicWrapperName) (list [tuple [int32 1, string "a"]]))
-    (tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [tyapps (pair (int32 1) (string "a")) [T.int32, T.string]])) (T.pair T.int32 T.string))
-    (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.pair T.int32 T.string)),
-  checkTest "wrapped optional" []
-    (wrap (TestTypes.testTypePolymorphicWrapperName) (list [Core.termMaybe $ just $ int32 42]))
-    (tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [Core.termMaybe $ just $ int32 42])) (T.optional T.int32))
-    (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.optional T.int32)),
-  checkTest "wrapped map" []
-    (wrap (TestTypes.testTypePolymorphicWrapperName) (list [mapTerm [(string "key", int32 42)]]))
-    (tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [mapTerm [(string "key", int32 42)]])) (T.map T.string T.int32))
-    (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.map T.string T.int32))]
-
-multipleWrappingLevelsTests :: TTermDefinition TestGroup
-multipleWrappingLevelsTests = define "multipleWrappingLevelsTests" $
-  subgroup "Multiple wrapping levels" [
-  noChange "wrapped in optional"
-    (Core.termMaybe $ just $ wrap (TestTypes.testTypeStringAliasName) (string "wrapped"))
-    (T.optional $ Core.typeVariable $ TestTypes.testTypeStringAliasName),
-  checkTest "list of wrapped polymorphic" []
-    (list [wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 1]),
-           wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 2])])
-    (list [tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 1])) T.int32,
-           tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 2])) T.int32])
-    (T.list $ T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) T.int32)]
-
-multiParameterPolymorphicWrappersTests :: TTermDefinition TestGroup
-multiParameterPolymorphicWrappersTests = define "multiParameterPolymorphicWrappersTests" $
-  subgroup "Multi-parameter polymorphic wrappers" [
-  checkTest "symmetric triple wrapping simple types" []
-    (wrap (TestTypes.testTypeSymmetricTripleName) $
-      record (TestTypes.testTypeTripleName) [
-        "first">: (int32 1),
-        "second">: (string "edge"),
-        "third">: (int32 2)])
-    (tyapps (wrap (TestTypes.testTypeSymmetricTripleName) $
-      tyapps (record (TestTypes.testTypeTripleName) [
-        "first">: (int32 1),
-        "second">: (string "edge"),
-        "third">: (int32 2)]) [T.int32, T.string, T.int32])
-      [T.int32, T.string])
-    (T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.int32, T.string]),
-  checkTest "symmetric triple from lambda" []
-    (lambda "v1" $ lambda "e" $ lambda "v2" $
-      wrap (TestTypes.testTypeSymmetricTripleName) $
-        record (TestTypes.testTypeTripleName) [
-          "first">: (var "v1"),
-          "second">: (var "e"),
-          "third">: (var "v2")])
-    (tylams ["t0", "t1"] $
-      lambdaTyped "v1" (T.var "t0") $
-      lambdaTyped "e" (T.var "t1") $
-      lambdaTyped "v2" (T.var "t0") $
-      tyapps (wrap (TestTypes.testTypeSymmetricTripleName) $
-        tyapps (record (TestTypes.testTypeTripleName) [
-          "first">: (var "v1"),
-          "second">: (var "e"),
-          "third">: (var "v2")]) [T.var "t0", T.var "t1", T.var "t0"])
-        [T.var "t0", T.var "t1"])
-    (T.forAlls ["t0", "t1"] $
-      T.function (T.var "t0") $
-      T.function (T.var "t1") $
-      T.function (T.var "t0") $
-      T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"]),
-  checkTest "symmetric triple with nested polymorphic types and foldl" []
-    (lets ["sumList">: lambda "lst" $
-            primitive _lists_foldl @@
-            (lambda "acc" $ lambda "x" $ primitive _math_add @@ var "acc" @@ var "x") @@
-            int32 0 @@
-            var "lst"] $
-      lambda "nums1" $ lambda "nums2" $
-        wrap (TestTypes.testTypeSymmetricTripleName) $
-          record (TestTypes.testTypeTripleName) [
-            "first">: (var "sumList" @@ var "nums1"),
-            "second">: (list [var "nums1", var "nums2"]),
-            "third">: (var "sumList" @@ var "nums2")])
-    (letsTyped [("sumList",
-                 lambdaTyped "lst" (T.list T.int32) $
-                   tyapps (primitive _lists_foldl) [T.int32, T.int32] @@
-                   (lambdaTyped "acc" T.int32 $ lambdaTyped "x" T.int32 $ primitive _math_add @@ var "acc" @@ var "x") @@
-                   int32 0 @@
-                   var "lst",
-                 T.mono $ T.function (T.list T.int32) T.int32)] $
-      lambdaTyped "nums1" (T.list T.int32) $
-      lambdaTyped "nums2" (T.list T.int32) $
-        tyapps (wrap (TestTypes.testTypeSymmetricTripleName) $
-          tyapps (record (TestTypes.testTypeTripleName) [
-            "first">: (var "sumList" @@ var "nums1"),
-            "second">: (list [var "nums1", var "nums2"]),
-            "third">: (var "sumList" @@ var "nums2")])
-            [T.int32, T.list (T.list T.int32), T.int32])
-          [T.int32, T.list (T.list T.int32)])
-    (T.function (T.list T.int32) $
-      T.function (T.list T.int32) $
-      T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.int32, T.list (T.list T.int32)])]
-
------- Wrap eliminations ------
-
-wrapEliminationsTests :: TTermDefinition TestGroup
-wrapEliminationsTests = define "wrapEliminationsTests" $
-  supergroup "Wrap eliminations" [
-  monomorphicUnwrappingTests,
-  polymorphicUnwrappingTests,
-  unwrapEliminationsInApplicationsTests,
-  unwrapInComplexContextsTests,
-  multiParameterPolymorphicUnwrappersTests,
-  chainedUnwrappingTests,
-  multipleUnwrapOperationsTests]
-
-monomorphicUnwrappingTests :: TTermDefinition TestGroup
-monomorphicUnwrappingTests = define "monomorphicUnwrappingTests" $
-  subgroup "Monomorphic unwrapping" [
-  noChange "unwrap string alias"
-    (unwrap (TestTypes.testTypeStringAliasName))
-    (T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string)]
-
-polymorphicUnwrappingTests :: TTermDefinition TestGroup
-polymorphicUnwrappingTests = define "polymorphicUnwrappingTests" $
-  subgroup "Polymorphic unwrapping" [
-  checkTest "unwrap polymorphic wrapper" []
-    (unwrap (TestTypes.testTypePolymorphicWrapperName))
-    (tylam "t0" $ tyapp (unwrap (TestTypes.testTypePolymorphicWrapperName)) (T.var "t0"))
-    (T.forAll "t0" $ T.function (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.var "t0")) (T.list $ T.var "t0"))]
-
-unwrapEliminationsInApplicationsTests :: TTermDefinition TestGroup
-unwrapEliminationsInApplicationsTests = define "unwrapEliminationsInApplicationsTests" $
-  subgroup "Unwrap eliminations in applications" [
-  noChange "unwrap applied to wrapped term"
-    (unwrap (TestTypes.testTypeStringAliasName) @@ wrap (TestTypes.testTypeStringAliasName) (string "hello"))
-    T.string,
-  checkTest "unwrap polymorphic applied" []
-    (unwrap (TestTypes.testTypePolymorphicWrapperName) @@ wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 1, int32 2]))
-    (tyapp (unwrap (TestTypes.testTypePolymorphicWrapperName)) T.int32 @@ tyapp (wrap (TestTypes.testTypePolymorphicWrapperName) (list [int32 1, int32 2])) T.int32)
-    (T.list T.int32)]
-
-unwrapInComplexContextsTests :: TTermDefinition TestGroup
-unwrapInComplexContextsTests = define "unwrapInComplexContextsTests" $
-  subgroup "Unwrap in complex contexts" [
-  checkTest "unwrap in let binding" []
-    (lets ["unwrapper" >: unwrap (TestTypes.testTypeStringAliasName),
-           "wrapped" >: wrap (TestTypes.testTypeStringAliasName) (string "test")] $
-          var "unwrapper" @@ var "wrapped")
-    (letsTyped [
-      ("unwrapper", unwrap (TestTypes.testTypeStringAliasName), T.mono $ T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string),
-      ("wrapped", wrap (TestTypes.testTypeStringAliasName) (string "test"), T.mono $ Core.typeVariable $ TestTypes.testTypeStringAliasName)] $
-      var "unwrapper" @@ var "wrapped")
-    T.string,
-  checkTest "unwrap in tuple" []
-    (tuple [unwrap (TestTypes.testTypeStringAliasName), string "context"])
-    (tyapps (pair
-      (unwrap (TestTypes.testTypeStringAliasName))
-      (string "context"))
-      [T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string, T.string])
-    (T.pair (T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string) T.string),
-  checkTest "unwrap in lambda" []
-    (lambda "wrapped" $ unwrap (TestTypes.testTypeStringAliasName) @@ var "wrapped")
-    (lambdaTyped "wrapped" (Core.typeVariable $ TestTypes.testTypeStringAliasName) $ unwrap (TestTypes.testTypeStringAliasName) @@ var "wrapped")
-    (T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string)]
-
-multiParameterPolymorphicUnwrappersTests :: TTermDefinition TestGroup
-multiParameterPolymorphicUnwrappersTests = define "multiParameterPolymorphicUnwrappersTests" $
-  subgroup "Multi-parameter polymorphic unwrappers" [
-  checkTest "unwrap symmetric triple to tuple" []
-    (lambda "st" $
-      tuple [
-        project (TestTypes.testTypeTripleName) (name "first") @@ (unwrap (TestTypes.testTypeSymmetricTripleName) @@ var "st"),
-        project (TestTypes.testTypeTripleName) (name "third") @@ (unwrap (TestTypes.testTypeSymmetricTripleName) @@ var "st")])
-    (tylams ["t0", "t1"] $
-      lambdaTyped "st" (T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"]) $
-      tyapps (pair
-        (tyapps (project (TestTypes.testTypeTripleName) (name "first")) [T.var "t0", T.var "t1", T.var "t0"] @@
-          (tyapps (unwrap (TestTypes.testTypeSymmetricTripleName)) [T.var "t0", T.var "t1"] @@ var "st"))
-        (tyapps (project (TestTypes.testTypeTripleName) (name "third")) [T.var "t0", T.var "t1", T.var "t0"] @@
-          (tyapps (unwrap (TestTypes.testTypeSymmetricTripleName)) [T.var "t0", T.var "t1"] @@ var "st")))
-        [T.var "t0", T.var "t0"])
-    (T.forAlls ["t0", "t1"] $
-      T.function
-        (T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"])
-        (T.pair (T.var "t0") (T.var "t0"))),
-  checkTest "unwrap and collect edges in set" []
-    (lets ["getEdge" >: lambda "st" $
-            project (TestTypes.testTypeTripleName) (name "second") @@ (unwrap (TestTypes.testTypeSymmetricTripleName) @@ var "st")] $
-      lambda "triples" $
-        primitive _sets_map @@ var "getEdge" @@ var "triples")
-    (tylams ["t0", "t1"] $
-      letsTyped [("getEdge",
-                 tylams ["t2", "t3"] $
-                 lambdaTyped "st" (T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t2", T.var "t3"]) $
-                   tyapps (project (TestTypes.testTypeTripleName) (name "second")) [T.var "t2", T.var "t3", T.var "t2"] @@
-                   (tyapps (unwrap (TestTypes.testTypeSymmetricTripleName)) [T.var "t2", T.var "t3"] @@ var "st"),
-                 T.poly ["t2", "t3"] $ T.function
-                   (T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t2", T.var "t3"])
-                   (T.var "t3"))] $
-      lambdaTyped "triples" (T.set $ T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"]) $
-        tyapps (primitive _sets_map) [T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"], T.var "t1"] @@
-        (tyapps (var "getEdge") [T.var "t0", T.var "t1"]) @@
-        var "triples")
-    (T.forAlls ["t0", "t1"] $
-      T.function
-        (T.set $ T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"])
-        (T.set $ T.var "t1")),
-
-  checkTest "unwrap with maybe to handle optional symmetric triple" []
-    (lambda "mst" $
-      primitive _maybes_maybe @@
-      (Core.termMaybe nothing) @@
-      (lambda "st" $ Core.termMaybe $
-        just $ project (TestTypes.testTypeTripleName) (name "second") @@ (unwrap (TestTypes.testTypeSymmetricTripleName) @@ var "st")) @@
-      var "mst")
-    (tylams ["t0", "t1"] $
-      lambdaTyped "mst" (T.optional $ T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"]) $
-      tyapps (primitive _maybes_maybe)
-        [T.optional (T.var "t1"),
-         T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"]] @@
-      tyapp (Core.termMaybe nothing) (T.var "t1") @@
-      (lambdaTyped "st" (T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"]) $
-        Core.termMaybe $ just $
-        (tyapps (project (TestTypes.testTypeTripleName) (name "second")) [T.var "t0", T.var "t1", T.var "t0"] @@
-         (tyapps (unwrap (TestTypes.testTypeSymmetricTripleName)) [T.var "t0", T.var "t1"] @@ var "st"))) @@
-      var "mst")
-    (T.forAlls ["t0", "t1"] $
-      T.function
-        (T.optional $ T.applys (Core.typeVariable $ TestTypes.testTypeSymmetricTripleName) [T.var "t0", T.var "t1"])
-        (T.optional $ T.var "t1"))]
-
-chainedUnwrappingTests :: TTermDefinition TestGroup
-chainedUnwrappingTests = define "chainedUnwrappingTests" $
-  subgroup "Chained unwrapping" [
-  checkTest "unwrap then process" []
-    (lambda "wrapped" $
-      primitive _strings_cat2 @@ (unwrap (TestTypes.testTypeStringAliasName) @@ var "wrapped") @@ string " suffix")
-    (lambdaTyped "wrapped" (Core.typeVariable $ TestTypes.testTypeStringAliasName) $
-      primitive _strings_cat2 @@ (unwrap (TestTypes.testTypeStringAliasName) @@ var "wrapped") @@ string " suffix")
-    (T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string),
-  checkTest "unwrap polymorphic then map" []
-    (lambda "wrappedList" $
-      primitive _lists_map @@ (primitive _math_add @@ int32 1) @@ (unwrap (TestTypes.testTypePolymorphicWrapperName) @@ var "wrappedList"))
-    (lambdaTyped "wrappedList" (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) T.int32) $
-      (tyapps (primitive _lists_map) [T.int32, T.int32]) @@ (primitive _math_add @@ int32 1) @@ (tyapp (unwrap (TestTypes.testTypePolymorphicWrapperName)) T.int32 @@ var "wrappedList"))
-    (T.function (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) T.int32) (T.list T.int32))]
-
-multipleUnwrapOperationsTests :: TTermDefinition TestGroup
-multipleUnwrapOperationsTests = define "multipleUnwrapOperationsTests" $
-  subgroup "Multiple unwrap operations" [
-  checkTest "unwrap different types" []
-    (lambda "stringWrapped" $
-      lambda "listWrapped" $
-        tuple [
-          unwrap (TestTypes.testTypeStringAliasName) @@ var "stringWrapped",
-          unwrap (TestTypes.testTypePolymorphicWrapperName) @@ var "listWrapped"])
-    (tylam "t0" $ lambdaTyped "stringWrapped" (Core.typeVariable $ TestTypes.testTypeStringAliasName) $
-      lambdaTyped "listWrapped" (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.var "t0")) $
-        tyapps (pair
-          (unwrap (TestTypes.testTypeStringAliasName) @@ var "stringWrapped")
-          (tyapp (unwrap (TestTypes.testTypePolymorphicWrapperName)) (T.var "t0") @@ var "listWrapped"))
-          [T.string, T.list $ T.var "t0"])
-    (T.forAll "t0" $ T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName)
-      (T.function (T.apply (Core.typeVariable $ TestTypes.testTypePolymorphicWrapperName) (T.var "t0"))
-        (T.pair T.string (T.list $ T.var "t0"))))]
-
------- Eliminations parent group ------
-
-eliminationsTests :: TTermDefinition TestGroup
-eliminationsTests = define "eliminationsTests" $
-  supergroup "Eliminations" [
-  recordEliminationsTests,
-  unionEliminationsTests,
-  wrapEliminationsTests]
-
-projectionsWithVariablesTests :: TTermDefinition TestGroup
-projectionsWithVariablesTests = define "projectionsWithVariablesTests" $
-  subgroup "Projections with variables" [
-  checkTest "project from lambda parameter" []
-    (lambda "person" $ project (TestTypes.testTypePersonName) (name "firstName") @@ var "person")
-    (lambdaTyped "person" (T.var "Person") $ project (TestTypes.testTypePersonName) (name "firstName") @@ var "person")
-    (T.function (T.var "Person") T.string),
-  checkTest "project from polymorphic lambda parameter" []
-    (lambda "coords" $ project (TestTypes.testTypeLatLonPolyName) (name "lat") @@ var "coords")
-    (tylam "t0" $ lambdaTyped "coords" (T.apply (T.var "LatLonPoly") (T.var "t0")) $ tyapp (project (TestTypes.testTypeLatLonPolyName) (name "lat")) (T.var "t0") @@ var "coords")
-    (T.forAll "t0" $ T.function (T.apply (T.var "LatLonPoly") (T.var "t0")) (T.var "t0")),
-  checkTest "multiple projections from same record" []
-    (lambda "person" $
-     tuple [project (TestTypes.testTypePersonName) (name "firstName") @@ var "person",
-            project (TestTypes.testTypePersonName) (name "lastName") @@ var "person"])
-    (lambdaTyped "person" (T.var "Person") $
-     tyapps (pair
-       (project (TestTypes.testTypePersonName) (name "firstName") @@ var "person")
-       (project (TestTypes.testTypePersonName) (name "lastName") @@ var "person")) [T.string, T.string])
-    (T.function (T.var "Person") (T.pair T.string T.string))]
-
diff --git a/src/main/haskell/Hydra/Sources/Test/Dependencies.hs b/src/main/haskell/Hydra/Sources/Test/Dependencies.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Dependencies.hs
+++ /dev/null
@@ -1,414 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for dependency analysis and let-term transformations
-module Hydra.Sources.Test.Dependencies where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Dependencies as DependenciesModule
-import qualified Hydra.Dsl.Meta.Lib.Maps as Maps
-import qualified Hydra.Dsl.Meta.Lib.Pairs as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.dependencies"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, DependenciesModule.ns, TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for dependency analysis and let-term transformations")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- | Show a term as a string using ShowCore.term
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term # t
-
--- | Helper for Term -> Term kernel function test cases
-termCase :: String -> TTermDefinition (Term -> Term) -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-termCase cname func input output = universalCase cname (showTerm (func # input)) (showTerm output)
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Helper for single-binding let
-letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letExpr varName value body = lets [(nm varName, value)] body
-
--- Helper for multi-binding let
-multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
-multiLet bindings body = lets ((\(n, v) -> (nm n, v)) <$> bindings) body
-
--- Helper to build an empty annotation map
-emptyAnnMap :: TTerm (M.Map Name Term)
-emptyAnnMap = Phantoms.map M.empty
-
--- | Universal sortBindingsCase: applies topologicalSortBindingMap and shows result
-sortBindingsCase :: String -> TTerm [(Name, Term)] -> TTerm [[(Name, Term)]] -> TTerm TestCaseWithMetadata
-sortBindingsCase cname bindings expected = universalCase cname
-  (showBindingGroups (DependenciesModule.topologicalSortBindingMap # Maps.fromList bindings))
-  (showBindingGroups expected)
-  where
-    showBindingGroups :: TTerm [[(Name, Term)]] -> TTerm String
-    showBindingGroups groups = ShowCore.list_ # showGroupFn # groups
-    showGroupFn :: TTerm ([(Name, Term)] -> String)
-    showGroupFn = Phantoms.lambda "group" $ ShowCore.list_ # showBindingFn # Phantoms.var "group"
-    showBindingFn :: TTerm ((Name, Term) -> String)
-    showBindingFn = Phantoms.lambda "pair" $ Strings.cat (Phantoms.list [
-      Phantoms.string "(",
-      Core.unName (Pairs.first (Phantoms.var "pair")),
-      Phantoms.string ", ",
-      ShowCore.term # Pairs.second (Phantoms.var "pair"),
-      Phantoms.string ")"])
-
--- | Convenience helpers for specific kernel functions
-flattenCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-flattenCase cname = termCase cname DependenciesModule.flattenLetTerms
-
-liftLambdaCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-liftLambdaCase cname = termCase cname DependenciesModule.liftLambdaAboveLet
-
-simplifyCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-simplifyCase cname = termCase cname DependenciesModule.simplifyTerm
-
--- | Test cases for term simplification (beta reduction)
-simplifyTermGroup :: TTerm TestGroup
-simplifyTermGroup = subgroup "simplifyTerm" [
-    simplifyCase "const application with literal"
-      (apply (lambda "x" (string "foo")) (int32 42))
-      (string "foo"),
-
-    simplifyCase "identity application"
-      (apply
-        (lambda "x" (list [var "x", var "x"]))
-        (var "y"))
-      (list [var "y", var "y"]),
-
-    simplifyCase "unused parameter"
-      (apply (lambda "x" (string "foo")) (var "y"))
-      (string "foo"),
-
-    simplifyCase "nested lambda applications"
-      (apply
-        (lambda "x"
-          (apply
-            (lambda "a" (list [string "foo", var "a"]))
-            (var "x")))
-        (var "y"))
-      (list [string "foo", var "y"])]
-
--- | Test cases for flattening nested let terms
-flattenLetTermsGroup :: TTerm TestGroup
-flattenLetTermsGroup = subgroup "flattenLetTerms" [
-    flattenCase "non-let term unchanged"
-      (int32 42)
-      (int32 42),
-
-    flattenCase "list term unchanged"
-      (list [string "foo"])
-      (list [string "foo"]),
-
-    flattenCase "sequential lets in body are flattened"
-      -- let x = 1 in (let y = 2 in [x, y]) becomes let x = 1, y = 2 in [x, y]
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (list [var "x", var "y"])))
-      (multiLet [("x", int32 1), ("y", int32 2)]
-        (list [var "x", var "y"])),
-
-    -- Nested bindings are flattened with prefix renaming
-    -- Dependencies come BEFORE bindings that use them (important for hoisting)
-    flattenCase "nested binding in let value is flattened"
-      -- let a = 1; b = (let x = 1; y = 2 in [x, y]) in [a, b]
-      (multiLet [
-        ("a", int32 1),
-        ("b", multiLet [("x", int32 1), ("y", int32 2)]
-                (list [var "x", var "y"]))]
-        (list [var "a", var "b"]))
-      -- let a = 1; b_x = 1; b_y = 2; b = [b_x, b_y] in [a, b]
-      -- Note: dependencies (b_x, b_y) come before b
-      (multiLet [
-        ("a", int32 1),
-        ("b_x", int32 1),
-        ("b_y", int32 2),
-        ("b", list [var "b_x", var "b_y"])]
-        (list [var "a", var "b"])),
-
-    -- Multiple levels of nesting
-    -- Dependencies come BEFORE bindings that use them (important for hoisting)
-    flattenCase "multiple levels of nesting are flattened"
-      -- let a = 1; b = (let x = 1; y = (let p = 137; q = [x, 5] in [a, q]) in [x, y]) in [a, b]
-      (multiLet [
-        ("a", int32 1),
-        ("b", multiLet [
-          ("x", int32 1),
-          ("y", multiLet [
-            ("p", int32 137),
-            ("q", list [var "x", int32 5])]
-            (list [var "a", var "q"]))]
-          (list [var "x", var "y"]))]
-        (list [var "a", var "b"]))
-      -- Flattened with proper prefixes
-      -- Order: a, then b's deps (b_x, b_y's deps (b_y_p, b_y_q), b_y), then b
-      (multiLet [
-        ("a", int32 1),
-        ("b_x", int32 1),
-        ("b_y_p", int32 137),
-        ("b_y_q", list [var "b_x", int32 5]),
-        ("b_y", list [var "a", var "b_y_q"]),
-        ("b", list [var "b_x", var "b_y"])]
-        (list [var "a", var "b"]))]
-
--- | Test cases for lifting lambda above let
-liftLambdaAboveLetGroup :: TTerm TestGroup
-liftLambdaAboveLetGroup = subgroup "liftLambdaAboveLet" [
-    liftLambdaCase "simple let with lambda in body"
-      (letExpr "x" (int32 42)
-        (lambda "y" (var "x")))
-      (lambda "y"
-        (letExpr "x" (int32 42)
-          (var "x"))),
-
-    liftLambdaCase "bare lambda unchanged"
-      (lambda "x" (var "x"))
-      (lambda "x" (var "x")),
-
-    liftLambdaCase "bare let unchanged"
-      (letExpr "x" (int32 42) (var "x"))
-      (letExpr "x" (int32 42) (var "x")),
-
-    liftLambdaCase "lambda with let in body unchanged"
-      (lambda "y" (letExpr "x" (int32 42) (var "x")))
-      (lambda "y" (letExpr "x" (int32 42) (var "x"))),
-
-    liftLambdaCase "let with two nested lambdas"
-      (letExpr "x" (int32 42)
-        (lambda "y" (lambda "z" (var "x"))))
-      (lambda "y"
-        (lambda "z"
-          (letExpr "x" (int32 42) (var "x")))),
-
-    liftLambdaCase "lambda inside let body already above let"
-      (lambda "x"
-        (lambda "y"
-          (letExpr "z" (int32 42) (var "z"))))
-      (lambda "x"
-        (lambda "y"
-          (letExpr "z" (int32 42) (var "z")))),
-
-    -- Multiple bindings and nested lets
-    liftLambdaCase "let without lambda in body unchanged"
-      (multiLet [("x", int32 42), ("y", string "hello")]
-        (pair (var "x") (var "y")))
-      (multiLet [("x", int32 42), ("y", string "hello")]
-        (pair (var "x") (var "y"))),
-
-    liftLambdaCase "multiple let bindings with lambda"
-      (multiLet [("x", int32 42), ("y", string "hello")]
-        (lambda "z" (var "x")))
-      (lambda "z"
-        (multiLet [("x", int32 42), ("y", string "hello")]
-          (var "x"))),
-
-    liftLambdaCase "nested lets with lambda at innermost level"
-      (letExpr "x" (int32 42)
-        (letExpr "y" (string "hello")
-          (lambda "z" (var "x"))))
-      (lambda "z"
-        (letExpr "x" (int32 42)
-          (letExpr "y" (string "hello")
-            (var "x")))),
-
-    liftLambdaCase "lambda between two lets"
-      (letExpr "x" (int32 42)
-        (lambda "y"
-          (letExpr "z" (string "hello")
-            (var "x"))))
-      (lambda "y"
-        (letExpr "x" (int32 42)
-          (letExpr "z" (string "hello")
-            (var "x")))),
-
-    liftLambdaCase "multiple lambdas between nested lets"
-      (letExpr "a" (int32 1)
-        (lambda "x"
-          (lambda "y"
-            (letExpr "b" (int32 2)
-              (var "a")))))
-      (lambda "x"
-        (lambda "y"
-          (letExpr "a" (int32 1)
-            (letExpr "b" (int32 2)
-              (var "a"))))),
-
-    liftLambdaCase "multiple lambdas already above let"
-      (lambda "x"
-        (lambda "y"
-          (letExpr "z" (int32 42)
-            (var "z"))))
-      (lambda "x"
-        (lambda "y"
-          (letExpr "z" (int32 42)
-            (var "z")))),
-
-    -- Annotation cases
-    liftLambdaCase "annotation above let containing lambda"
-      (annot emptyAnnMap
-        (letExpr "x" (int32 42) (lambda "y" (var "x"))))
-      (annot emptyAnnMap
-        (lambda "y" (letExpr "x" (int32 42) (var "x")))),
-
-    liftLambdaCase "annotation above lambda in let body"
-      (letExpr "x" (int32 42)
-        (annot emptyAnnMap (lambda "y" (var "x"))))
-      (lambda "y"
-        (annot emptyAnnMap (letExpr "x" (int32 42) (var "x")))),
-
-    liftLambdaCase "annotation between two lambdas"
-      (letExpr "x" (int32 42)
-        (lambda "y"
-          (annot emptyAnnMap (lambda "z" (var "x")))))
-      (lambda "y"
-        (lambda "z"
-          (annot emptyAnnMap (letExpr "x" (int32 42) (var "x"))))),
-
-    liftLambdaCase "annotation on the body of lambda in let"
-      (letExpr "x" (int32 42)
-        (lambda "y"
-          (annot emptyAnnMap (var "x"))))
-      (lambda "y"
-        (letExpr "x" (int32 42)
-          (annot emptyAnnMap (var "x")))),
-
-    liftLambdaCase "annotation on lambda already above let"
-      (annot emptyAnnMap
-        (lambda "y" (letExpr "x" (int32 42) (var "x"))))
-      (annot emptyAnnMap
-        (lambda "y" (letExpr "x" (int32 42) (var "x")))),
-
-    -- Recursive lifting in nested structures
-    liftLambdaCase "let-lambda inside a list"
-      (list [
-        int32 1,
-        letExpr "x" (int32 42) (lambda "y" (var "x")),
-        int32 2])
-      (list [
-        int32 1,
-        lambda "y" (letExpr "x" (int32 42) (var "x")),
-        int32 2]),
-
-    liftLambdaCase "let-lambda in multiple list elements"
-      (list [
-        letExpr "x" (int32 1) (lambda "y" (var "x")),
-        letExpr "z" (int32 2) (lambda "w" (var "z"))])
-      (list [
-        lambda "y" (letExpr "x" (int32 1) (var "x")),
-        lambda "w" (letExpr "z" (int32 2) (var "z"))]),
-
-    liftLambdaCase "let-lambda in a let binding value"
-      (letExpr "f" (letExpr "x" (int32 42) (lambda "y" (var "x")))
-        (var "f"))
-      (letExpr "f" (lambda "y" (letExpr "x" (int32 42) (var "x")))
-        (var "f")),
-
-    liftLambdaCase "let-lambda inside a pair"
-      (pair
-        (letExpr "x" (int32 42) (lambda "y" (var "x")))
-        (string "test"))
-      (pair
-        (lambda "y" (letExpr "x" (int32 42) (var "x")))
-        (string "test")),
-
-    liftLambdaCase "let-lambda in both elements of a pair"
-      (pair
-        (letExpr "x" (int32 1) (lambda "y" (var "x")))
-        (letExpr "z" (int32 2) (lambda "w" (var "z"))))
-      (pair
-        (lambda "y" (letExpr "x" (int32 1) (var "x")))
-        (lambda "w" (letExpr "z" (int32 2) (var "z")))),
-
-    liftLambdaCase "let-lambda inside lambda body"
-      (lambda "outer"
-        (letExpr "x" (int32 42) (lambda "inner" (var "x"))))
-      (lambda "outer"
-        (lambda "inner" (letExpr "x" (int32 42) (var "x"))))]
-
--- | Test cases for topological sort of bindings
--- The function topologicalSortBindingMap takes a map of (name -> term) bindings
--- and returns groups of bindings in topological order, where each group contains
--- mutually recursive bindings (strongly connected components).
-topologicalSortBindingsGroup :: TTerm TestGroup
-topologicalSortBindingsGroup = subgroup "topologicalSortBindings" [
-    sortBindingsCase "isolated bindings"
-      (Phantoms.list [
-        Phantoms.pair (nm "a") (string "foo"),
-        Phantoms.pair (nm "b") (string "bar")])
-      (Phantoms.list [
-        Phantoms.list [Phantoms.pair (nm "a") (string "foo")],
-        Phantoms.list [Phantoms.pair (nm "b") (string "bar")]]),
-
-    sortBindingsCase "single recursive binding"
-      (Phantoms.list [
-        Phantoms.pair (nm "a") (list [var "a"])])
-      (Phantoms.list [
-        Phantoms.list [Phantoms.pair (nm "a") (list [var "a"])]]),
-
-    sortBindingsCase "mutually recursive bindings"
-      (Phantoms.list [
-        Phantoms.pair (nm "a") (list [var "b"]),
-        Phantoms.pair (nm "b") (list [var "a"])])
-      (Phantoms.list [
-        Phantoms.list [
-          Phantoms.pair (nm "a") (list [var "b"]),
-          Phantoms.pair (nm "b") (list [var "a"])]]),
-
-    sortBindingsCase "mixed bindings"
-      (Phantoms.list [
-        Phantoms.pair (nm "a") (var "b"),
-        Phantoms.pair (nm "b") (list [var "a", var "c"]),
-        Phantoms.pair (nm "c") (string "foo"),
-        Phantoms.pair (nm "d") (string "bar")])
-      (Phantoms.list [
-        Phantoms.list [Phantoms.pair (nm "c") (string "foo")],
-        Phantoms.list [
-          Phantoms.pair (nm "a") (var "b"),
-          Phantoms.pair (nm "b") (list [var "a", var "c"])],
-        Phantoms.list [Phantoms.pair (nm "d") (string "bar")]])]
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for dependency analysis and let-term transformations" $
-    supergroup "dependencies" [
-      simplifyTermGroup,
-      flattenLetTermsGroup,
-      liftLambdaAboveLetGroup,
-      topologicalSortBindingsGroup]
diff --git a/src/main/haskell/Hydra/Sources/Test/Differentiation.hs b/src/main/haskell/Hydra/Sources/Test/Differentiation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Differentiation.hs
+++ /dev/null
@@ -1,397 +0,0 @@
--- | Test cases for automatic differentiation
-module Hydra.Sources.Test.Differentiation where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import           Hydra.Dsl.Meta.Phantoms      as Phantoms hiding ((++))
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Sources.Kernel.Terms.Differentiation as Diff
-import qualified Hydra.Sources.Kernel.Terms.Variables as Variables
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Dsl.Meta.Lib.Eithers as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Strings  as Strings
-import qualified Hydra.Dsl.Meta.Terms         as Terms
-import qualified Hydra.Lib.Math              as Math
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.differentiation"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Diff.ns, Variables.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for automatic differentiation")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    doc "Test cases for automatic differentiation" $
-    supergroup "differentiation" [
-      basicDiffGroup,
-      primitiveDiffGroup,
-      binaryDiffGroup,
-      chainRuleGroup,
-      structuralDiffGroup,
-      evalDiffGroup,
-      gradientCheckGroup,
-      gradientGroup]
-
--- ============================================================
--- Deep/meta-level helpers (for structural tests that compare term shapes)
--- ============================================================
-
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term @@ t
-
-mkName :: String -> TTerm Name
-mkName s = Core.name (string s)
-
-mkVar :: String -> TTerm Term
-mkVar s = Core.termVariable $ mkName s
-
-f64 :: Double -> TTerm Term
-f64 d = Core.termLiteral $ Core.literalFloat $ Core.floatValueFloat64 (float64 d)
-
-mkLambda :: String -> TTerm Term -> TTerm Term
-mkLambda param body = Core.termLambda $ Core.lambda (mkName param) nothing body
-
--- Deep-level primitive application (for structural test expectations)
-prim1 :: Name -> TTerm Term -> TTerm Term
-prim1 name arg = Core.termApplication $ Core.application (Core.termVariable $ encodedName name) arg
-
-prim2 :: Name -> TTerm Term -> TTerm Term -> TTerm Term
-prim2 name a b = Core.termApplication $ Core.application
-  (Core.termApplication $ Core.application (Core.termVariable $ encodedName name) a)
-  b
-
-diffCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-diffCase cname input expected =
-  universalCase cname
-    (showTerm (Diff.differentiateTerm @@ mkName "x" @@ input))
-    (showTerm expected)
-
-diffFnCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-diffFnCase cname input expected =
-  universalCase cname
-    (showTerm (Diff.differentiateFunction @@ input))
-    (showTerm expected)
-
--- ============================================================
--- Shallow-level helpers (for eval tests that need reduceTerm)
--- ============================================================
-
--- Coerce phantom types
-retype :: TTerm a -> TTerm b
-retype (TTerm t) = TTerm t
-
--- Evaluate a derivative: differentiate, substitute x=xVal, reduce
-evalDiffCase :: String -> TTerm Term -> Double -> Double -> TTerm TestCaseWithMetadata
-evalDiffCase cname expr xVal expected = roundedEvalDiffCase cname expr xVal expected
-
--- Rounded eval case: round both sides to 12 significant digits for cross-platform portability
-roundedEvalDiffCase :: String -> TTerm Term -> Double -> Double -> TTerm TestCaseWithMetadata
-roundedEvalDiffCase cname expr xVal expected = evalCase cname input output
-  where
-    digits = 12
-    deriv = Diff.differentiateTerm @@ mkName "x" @@ expr
-    substituted = Variables.replaceFreeTermVariable @@ mkName "x" @@ f64 xVal @@ deriv
-    input = prim2 _math_roundFloat64
-      (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 (int32 digits))
-      (retype substituted)
-    output = Terms.float64 (Math.roundFloat64 digits expected)
-
--- ============================================================
--- Structural tests
--- ============================================================
-
-basicDiffGroup :: TTerm TestGroup
-basicDiffGroup = subgroup "basic rules" [
-    diffCase "variable wrt itself"
-      (mkVar "x")
-      (f64 1.0),
-
-    diffCase "variable wrt different variable"
-      (mkVar "y")
-      (f64 0.0),
-
-    diffCase "float64 literal"
-      (f64 42.0)
-      (f64 0.0),
-
-    diffCase "zero literal"
-      (f64 0.0)
-      (f64 0.0),
-
-    diffFnCase "identity function"
-      (mkLambda "x" (mkVar "x"))
-      (mkLambda "x" (f64 1.0)),
-
-    diffFnCase "constant function"
-      (mkLambda "x" (f64 5.0))
-      (mkLambda "x" (f64 0.0)),
-
-    diffCase "lambda binding different variable"
-      (mkLambda "y" (mkVar "x"))
-      (mkLambda "y" (f64 1.0)),
-
-    diffCase "lambda shadowing differentiation variable"
-      (mkLambda "x" (mkVar "x"))
-      (mkLambda "x" (f64 0.0))]
-
-primitiveDiffGroup :: TTerm TestGroup
-primitiveDiffGroup = subgroup "unary primitives" [
-    diffCase "sin of variable"
-      (prim1 _math_sin (mkVar "x"))
-      (prim2 _math_mulFloat64
-        (Core.termApplication $ Core.application (Core.termVariable $ encodedName _math_cos) (mkVar "x"))
-        (f64 1.0)),
-
-    diffCase "exp of variable"
-      (prim1 _math_exp (mkVar "x"))
-      (prim2 _math_mulFloat64
-        (Core.termApplication $ Core.application (Core.termVariable $ encodedName _math_exp) (mkVar "x"))
-        (f64 1.0)),
-
-    diffCase "sin of different variable"
-      (prim1 _math_sin (mkVar "y"))
-      (prim2 _math_mulFloat64
-        (Core.termApplication $ Core.application (Core.termVariable $ encodedName _math_cos) (mkVar "y"))
-        (f64 0.0))]
-
--- Binary tests: input uses Int32 names (add/mul/sub), output uses Float64 names (addFloat64 etc.)
-binaryDiffGroup :: TTerm TestGroup
-binaryDiffGroup = subgroup "binary primitives" [
-    diffCase "add variable to itself"
-      (prim2 _math_add (mkVar "x") (mkVar "x"))
-      (prim2 _math_addFloat64 (f64 1.0) (f64 1.0)),
-
-    diffCase "multiply variable by itself"
-      (prim2 _math_mul (mkVar "x") (mkVar "x"))
-      (prim2 _math_addFloat64
-        (prim2 _math_mulFloat64 (mkVar "x") (f64 1.0))
-        (prim2 _math_mulFloat64 (mkVar "x") (f64 1.0))),
-
-    diffCase "subtract constant from variable"
-      (prim2 _math_sub (mkVar "x") (f64 5.0))
-      (prim2 _math_subFloat64 (f64 1.0) (f64 0.0))]
-
-chainRuleGroup :: TTerm TestGroup
-chainRuleGroup = subgroup "chain rule" [
-    diffCase "nested sin(cos(x))"
-      (prim1 _math_sin (prim1 _math_cos (mkVar "x")))
-      (prim2 _math_mulFloat64
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ encodedName _math_cos)
-          (prim1 _math_cos (mkVar "x")))
-        (prim2 _math_mulFloat64
-          (Core.termApplication $ Core.application
-            (mkLambda "_x" (prim1 _math_negateFloat64 (prim1 _math_sin (mkVar "_x"))))
-            (mkVar "x"))
-          (f64 1.0)))]
-
-structuralDiffGroup :: TTerm TestGroup
-structuralDiffGroup = subgroup "structural" [
-    diffCase "list of terms"
-      (Core.termList $ list [mkVar "x", f64 5.0])
-      (Core.termList $ list [f64 1.0, f64 0.0]),
-
-    diffCase "pair of terms"
-      (Core.termPair $ pair (mkVar "x") (f64 5.0))
-      (Core.termPair $ pair (f64 1.0) (f64 0.0)),
-
-    diffCase "unit term"
-      Core.termUnit
-      (f64 0.0)]
-
--- ============================================================
--- Evaluation tests (shallow level — terms actually get reduced)
--- ============================================================
-
-roundDigits :: Int
-roundDigits = 10
-
-evalDiffGroup :: TTerm TestGroup
-evalDiffGroup = subgroup "evaluate derivatives" [
-    evalDiffCase "d/dx(x) at 3.0"
-      (mkVar "x")
-      3.0 1.0,
-
-    evalDiffCase "d/dx(42.0) at 3.0"
-      (f64 42.0)
-      3.0 0.0,
-
-    evalDiffCase "d/dx(x+x) at 3.0"
-      (prim2 _math_add (mkVar "x") (mkVar "x"))
-      3.0 2.0,
-
-    evalDiffCase "d/dx(x*x) at 3.0"
-      (prim2 _math_mul (mkVar "x") (mkVar "x"))
-      3.0 6.0,
-
-    evalDiffCase "d/dx(x*x) at 5.0"
-      (prim2 _math_mul (mkVar "x") (mkVar "x"))
-      5.0 10.0,
-
-    evalDiffCase "d/dx(x-5) at 7.0"
-      (prim2 _math_sub (mkVar "x") (f64 5.0))
-      7.0 1.0,
-
-    evalDiffCase "d/dx(sin(x)) at 0.0"
-      (prim1 _math_sin (mkVar "x"))
-      0.0 1.0,
-
-    evalDiffCase "d/dx(sin(x)) at pi/2"
-      (prim1 _math_sin (mkVar "x"))
-      (pi / 2) (cos (pi / 2)),
-
-    evalDiffCase "d/dx(cos(x)) at 1.0"
-      (prim1 _math_cos (mkVar "x"))
-      1.0 (-(sin 1.0)),
-
-    evalDiffCase "d/dx(cos(x)) at pi"
-      (prim1 _math_cos (mkVar "x"))
-      pi (-(sin pi)),
-
-    evalDiffCase "d/dx(exp(x)) at 0.0"
-      (prim1 _math_exp (mkVar "x"))
-      0.0 1.0,
-
-    evalDiffCase "d/dx(exp(x)) at 1.0"
-      (prim1 _math_exp (mkVar "x"))
-      1.0 (exp 1.0),
-
-    evalDiffCase "d/dx(log(x)) at 1.0"
-      (prim1 _math_log (mkVar "x"))
-      1.0 1.0,
-
-    evalDiffCase "d/dx(log(x)) at e"
-      (prim1 _math_log (mkVar "x"))
-      (exp 1.0) (1.0 / exp 1.0),
-
-    evalDiffCase "d/dx(sqrt(x)) at 4.0"
-      (prim1 _math_sqrt (mkVar "x"))
-      4.0 0.25,
-
-    evalDiffCase "d/dx(x^3) at 2.0"
-      (prim2 _math_pow (mkVar "x") (f64 3.0))
-      2.0 12.0,
-
-    evalDiffCase "d/dx(sin(cos(x))) at 0.5"
-      (prim1 _math_sin (prim1 _math_cos (mkVar "x")))
-      0.5 (cos (cos 0.5) * (-(sin 0.5))),
-
-    evalDiffCase "d/dx(sin(cos(x))) at 1.0"
-      (prim1 _math_sin (prim1 _math_cos (mkVar "x")))
-      1.0 (cos (cos 1.0) * (-(sin 1.0))),
-
-    evalDiffCase "d/dx(exp(sin(x))) at 0.0"
-      (prim1 _math_exp (prim1 _math_sin (mkVar "x")))
-      0.0 1.0,
-
-    evalDiffCase "d/dx(x*sin(x)) at pi"
-      (prim2 _math_mul (mkVar "x") (prim1 _math_sin (mkVar "x")))
-      pi (sin pi + pi * cos pi)]
-
--- ============================================================
--- Gradient check: AD vs finite differences
--- ============================================================
-
-gradientCheckGroup :: TTerm TestGroup
-gradientCheckGroup = subgroup "gradient check" [
-    gradCheck "x^2" (\x -> x * x) (prim2 _math_mul (mkVar "x") (mkVar "x")) 2.0,
-    gradCheck "sin(x)" sin (prim1 _math_sin (mkVar "x")) 1.0,
-    gradCheck "exp(x)" exp (prim1 _math_exp (mkVar "x")) 0.5,
-    gradCheck "x^3" (\x -> x ** 3) (prim2 _math_pow (mkVar "x") (f64 3.0)) 1.5,
-    gradCheck "log(x)" log (prim1 _math_log (mkVar "x")) 2.0,
-    gradCheck "cos(x)" cos (prim1 _math_cos (mkVar "x")) 1.0,
-    gradCheck "sin(cos(x))" (\x -> sin (cos x)) (prim1 _math_sin (prim1 _math_cos (mkVar "x"))) 1.0,
-    gradCheck "x*sin(x)" (\x -> x * sin x) (prim2 _math_mul (mkVar "x") (prim1 _math_sin (mkVar "x"))) 2.0]
-  where
-    h :: Double
-    h = 1.0e-6
-
-    gradDigits :: Int
-    gradDigits = 5
-
-    gradCheck :: String -> (Double -> Double) -> TTerm Term -> Double -> TTerm TestCaseWithMetadata
-    gradCheck cname hsFn expr xVal = evalCase cname adResult fdResult
-      where
-        deriv = Diff.differentiateTerm @@ mkName "x" @@ expr
-        adSubst = Variables.replaceFreeTermVariable @@ mkName "x" @@ f64 xVal @@ deriv
-        -- Round the AD result for comparison with finite differences
-        adResult = prim2 _math_roundFloat64
-          (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 (int32 gradDigits))
-          (retype adSubst)
-
-        fdResult = Terms.float64 (Math.roundFloat64 gradDigits fdVal)
-        fdVal = (hsFn (xVal + h) - hsFn (xVal - h)) / (2.0 * h)
-
--- ============================================================
--- Gradient tests (multi-variable partial derivatives)
--- ============================================================
-
-gradCase :: String -> TTerm Term -> [String] -> TTerm Term -> TTerm TestCaseWithMetadata
-gradCase cname input vars expected =
-  universalCase cname
-    (showTerm (Diff.gradient @@ mkName "Gradient" @@ list (fmap mkName vars) @@ input))
-    (showTerm expected)
-
-mkRecord :: String -> [(String, TTerm Term)] -> TTerm Term
-mkRecord tname fields = Core.termRecord $ Core.record
-  (mkName tname)
-  (list [Core.field (mkName fname) val | (fname, val) <- fields])
-
-gradientGroup :: TTerm TestGroup
-gradientGroup = subgroup "gradient" [
-    -- gradient of x+y w.r.t. [x, y] => {x: 1+0, y: 0+1}
-    gradCase "add two variables"
-      (prim2 _math_addFloat64 (mkVar "x") (mkVar "y"))
-      ["x", "y"]
-      (mkRecord "Gradient"
-        [ ("x", prim2 _math_addFloat64 (f64 1.0) (f64 0.0))
-        , ("y", prim2 _math_addFloat64 (f64 0.0) (f64 1.0))
-        ]),
-
-    -- gradient of x*y w.r.t. [x, y] => {x: x*0+y*1, y: x*1+y*0}
-    gradCase "product of two variables"
-      (prim2 _math_mulFloat64 (mkVar "x") (mkVar "y"))
-      ["x", "y"]
-      (mkRecord "Gradient"
-        [ ("x", prim2 _math_addFloat64
-            (prim2 _math_mulFloat64 (mkVar "x") (f64 0.0))
-            (prim2 _math_mulFloat64 (mkVar "y") (f64 1.0)))
-        , ("y", prim2 _math_addFloat64
-            (prim2 _math_mulFloat64 (mkVar "x") (f64 1.0))
-            (prim2 _math_mulFloat64 (mkVar "y") (f64 0.0)))
-        ]),
-
-    -- gradient of x w.r.t. [x, y] => {x: 1.0, y: 0.0}
-    gradCase "single variable partial"
-      (mkVar "x")
-      ["x", "y"]
-      (mkRecord "Gradient" [("x", f64 1.0), ("y", f64 0.0)]),
-
-    -- gradient of constant w.r.t. [x, y] => {x: 0.0, y: 0.0}
-    gradCase "constant"
-      (f64 7.0)
-      ["x", "y"]
-      (mkRecord "Gradient" [("x", f64 0.0), ("y", f64 0.0)])]
diff --git a/src/main/haskell/Hydra/Sources/Test/EtaExpansion.hs b/src/main/haskell/Hydra/Sources/Test/EtaExpansion.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/EtaExpansion.hs
+++ /dev/null
@@ -1,453 +0,0 @@
-
-module Hydra.Sources.Test.EtaExpansion where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing hiding (checkTest, noChange)
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Strings  as Strings
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-import Prelude hiding (foldl)
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.etaExpansion"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for eta expansion of terms")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = Phantoms.definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Test cases for eta expansion of terms" $
-  testGroup (Phantoms.string "eta expansion") Phantoms.nothing (Phantoms.list subgroups) (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = [
-      partialApplicationOfPrimitives,
-      polymorphicTerms,
-      higherOrderFunctions,
-      letTerms,
-      caseStatements,
-      nonExpansionOfEliminations]
-
-    partialApplicationOfPrimitives = testGroup (Phantoms.string "Partial application of primitives") Phantoms.nothing (Phantoms.list subgroups') (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-      where
-        subgroups' = [
-          barePrimitives,
-          partiallyAppliedPrimitives,
-          fullyAppliedPrimitives,
-          recordProjections]
-
-        barePrimitives = testGroup (Phantoms.string "Bare primitives are not expanded") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          noChange "unary primitive"
-            toLower,
-          noChange "binary primitive"
-            splitOn])
-
-        partiallyAppliedPrimitives = testGroup (Phantoms.string "Partially applied primitives expand with lambdas") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          testCase "binary primitive with one argument"
-            (splitOn @@ string "foo")
-            (lambda "v1" $ splitOn @@ string "foo" @@ var "v1"),
-          testCase "ternary primitive with one argument"
-            (foldl @@ var "f")
-            (lambda "v1" $ lambda "v2" $ foldl @@ var "f" @@ var "v1" @@ var "v2")])
-
-        fullyAppliedPrimitives = testGroup (Phantoms.string "Fully applied primitives are not expanded") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          noChange "unary primitive"
-            (toLower @@ string "FOO"),
-          noChange "binary primitive"
-            (splitOn @@ string "," @@ string "a,b,c")])
-
-        recordProjections = testGroup (Phantoms.string "Record projections") Phantoms.nothing (Phantoms.list subgroups'') (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-          where
-            subgroups'' = [
-              bareProjections,
-              appliedProjections,
-              nestedProjections,
-              functionValuedProjections]
-
-            bareProjections = testGroup (Phantoms.string "Bare projections expand with a lambda") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-              testCase "projection without argument"
-                (project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")))
-                (lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1")])
-
-            appliedProjections = testGroup (Phantoms.string "Applied projections are not expanded") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-              noChange "projection with argument"
-                (project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "person"),
-              noChange "projection applied to a record"
-                (project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@
-                  record TestTypes.testTypePersonName ["firstName">: string "John", "lastName">: string "Doe"])])
-
-            nestedProjections = testGroup (Phantoms.string "Projections nested in other structures") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-              testCase "projection in a list"
-                (list [project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")), toLower])
-                (list [lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1", toLower]),
-              testCase "projection in a tuple"
-                (pair (project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName"))) (string "default"))
-                (pair (lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1") (string "default")),
-              testCase "projection in let binding"
-                (lets ["getter">: project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName"))] (var "getter"))
-                (lets ["getter">: lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1"] (var "getter")),
-              testCase "projection in lambda body"
-                (lambda "x" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")))
-                (lambda "x" $ lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1")])
-
-            functionValuedProjections = testGroup (Phantoms.string "Function-valued projections") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-              noChange "projection of function-valued field applied to arguments should not be expanded"
-                (tyapps
-                    (project TestTypes.testTypeTripleName (Core.name (Phantoms.string "first")))
-                    [T.function T.string T.string, T.string, T.string]
-                  @@ tyapps
-                    (record TestTypes.testTypeTripleName ["first">: primitive _strings_toLower, "second">: string "middle", "third">: string "last"])
-                    [T.function T.string T.string, T.string, T.string]
-                  @@ string "DATA")])
-
-    polymorphicTerms = testGroup (Phantoms.string "Polymorphic terms (System F)") Phantoms.nothing (Phantoms.list subgroups') (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-      where
-        subgroups' = [
-          typeLambdasInLetBindings,
-          typeApplicationsOfPolymorphicBindings]
-
-        typeLambdasInLetBindings = testGroup (Phantoms.string "Type lambdas in let bindings") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          noChange "polymorphic identity function"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              (var "id")),
-          testCase "monomorphic partially applied primitive"
-            (letsTyped [("partial", splitOn @@ string "foo", T.mono (T.function T.string (T.list T.string)))]
-              (var "partial"))
-            (letsTyped [("partial", lambda "v1" $ splitOn @@ string "foo" @@ var "v1", T.mono (T.function T.string (T.list T.string)))]
-              (var "partial")),
-          testCase "monomorphic projection"
-            (letsTyped [("getter", project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")), T.mono (T.function (T.var "Person") T.string))]
-              (var "getter"))
-            (letsTyped [("getter", lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1", T.mono (T.function (T.var "Person") T.string))]
-              (var "getter"))])
-
-        typeApplicationsOfPolymorphicBindings = testGroup (Phantoms.string "Type applications of polymorphic bindings") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          noChange "polymorphic variable with type application"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              (var "id" `tyapp` T.string)),
-          noChange "type application of identity applied to binary function with no arguments"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              ((var "id" `tyapp` (T.function T.string (T.function T.string (T.list T.string)))) @@ splitOn)),
-          testCase "type application of identity applied to partially applied binary function"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              ((var "id" `tyapp` (T.function T.string (T.list T.string))) @@ (splitOn @@ string ",")))
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))] $
-              (var "id" `tyapp` (T.function T.string (T.list T.string))) @@ (lambda "v1" $ splitOn @@ string "," @@ var "v1")),
-          noChange "type application of identity applied to fully applied binary function"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              ((var "id" `tyapp` (T.list T.string)) @@ (splitOn @@ string "," @@ string "foo,bar"))),
-          testCase "type application of identity applied to binary function, then applied to one argument"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              (((var "id" `tyapp` (T.function T.string (T.function T.string (T.list T.string)))) @@ splitOn) @@ string ","))
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              (lambda "v1" $ (((var "id" `tyapp` (T.function T.string (T.function T.string (T.list T.string)))) @@ splitOn) @@ string ",") @@ var "v1")),
-          noChange "type application of identity applied to binary function, then fully applied to two arguments"
-            (letsTyped [("id", tylam "a" (lambda "x" $ var "x"), T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-              (((var "id" `tyapp` (T.function T.string (T.function T.string (T.list T.string)))) @@ splitOn) @@ string "," @@ string "foo,bar"))])
-
-    higherOrderFunctions = testGroup (Phantoms.string "Higher-Order Functions") Phantoms.nothing (Phantoms.list subgroups') (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-      where
-        subgroups' = [functionsThatReturnFunctions]
-
-        functionsThatReturnFunctions = testGroup (Phantoms.string "Functions that return functions") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          noChange "lambda returning bare binary primitive"
-            (lambda "x" splitOn),
-          noChange "lambda returning bare unary primitive"
-            (lambda "x" toLower),
-          testCase "lambda returning partially applied primitive"
-            (lambda "x" $ splitOn @@ string ",")
-            (lambda "x" $ lambda "v1" $ splitOn @@ string "," @@ var "v1"),
-          noChange "lambda returning fully applied primitive"
-            (lambda "x" $ splitOn @@ string "," @@ var "x"),
-          testCase "lambda returning bare projection"
-            (lambda "person" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")))
-            (lambda "person" $ lambda "v1" $ project TestTypes.testTypePersonName (Core.name (Phantoms.string "firstName")) @@ var "v1"),
-          testCase "nested lambdas with partial application in body"
-            (lambda "x" $ lambda "y" $ splitOn @@ var "x")
-            (lambda "x" $ lambda "y" $ lambda "v1" $ splitOn @@ var "x" @@ var "v1"),
-          testCase "lambda returning lambda returning partial application"
-            (lambda "x" $ lambda "y" $ lambda "z" $ splitOn @@ var "x")
-            (lambda "x" $ lambda "y" $ lambda "z" $ lambda "v1" $ splitOn @@ var "x" @@ var "v1")])
-
-    letTerms = testGroup (Phantoms.string "Let terms") Phantoms.nothing (Phantoms.list subgroups') (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-      where
-        subgroups' = [partialApplicationOfLetBoundFunction]
-
-        partialApplicationOfLetBoundFunction = testGroup (Phantoms.string "partial application of a let-bound function") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          testCase "simple"
-            (letsTyped
-              [("helper",
-                lambda "arg1" $ lambda "arg2" $ lambda "arg3" $
-                  cat @@ list [var "arg1", var "arg2", var "arg3"],
-                T.mono $ T.functionMany [T.string, T.string, T.string, T.string])] $
-              var "helper" @@ string "foo")
-            (letsTyped
-              [("helper",
-                lambda "arg1" $ lambda "arg2" $ lambda "arg3" $
-                  cat @@ list [var "arg1", var "arg2", var "arg3"],
-                T.mono $ T.functionMany [T.string, T.string, T.string, T.string])] $
-              lambda "v1" $ lambda "v2" $ var "helper" @@ string "foo" @@ var "v1" @@ var "v2"),
-          testCase "in a fold"
-            (letsTyped
-              [("helper",
-                lambda "arg1" $ lambda "arg2" $ lambda "arg3" $
-                  cat @@ list [var "arg1", var "arg2", var "arg3"],
-                T.mono $ T.functionMany [T.string, T.string, T.string, T.string])] $
-              (tyapps foldl [T.string, T.string])
-                @@ (var "helper" @@ string "foo")
-                @@ string ""
-                @@ list [string "bar", string "baz"])
-            (letsTyped
-              [("helper",
-                lambda "arg1" $ lambda "arg2" $ lambda "arg3" $
-                  cat @@ list [var "arg1", var "arg2", var "arg3"],
-                T.mono $ T.functionMany [T.string, T.string, T.string, T.string])] $
-              (tyapps foldl [T.string, T.string])
-                @@ (lambda "v1" $ lambda "v2" $ var "helper" @@ string "foo" @@ var "v1" @@ var "v2")
-                @@ string ""
-                @@ list [string "bar", string "baz"]),
-          testCase "within another let binding"
-            (letsTyped
-              [("tryme",
-                (letsTyped
-                  [("helper",
-                    lambda "arg1" $ lambda "arg2" $ lambda "arg3" $
-                      cat @@ list [var "arg1", var "arg2", var "arg3"],
-                    T.mono $ T.functionMany [T.string, T.string, T.string, T.string])] $
-                  var "helper" @@ string "foo"),
-                T.mono $ T.functionMany [T.string, T.string, T.string])] $
-              unit)
-            (letsTyped
-              [("tryme",
-                (letsTyped
-                  [("helper",
-                    lambda "arg1" $ lambda "arg2" $ lambda "arg3" $
-                      cat @@ list [var "arg1", var "arg2", var "arg3"],
-                    T.mono $ T.functionMany [T.string, T.string, T.string, T.string])] $
-                  lambda "v1" $ lambda "v2" $ var "helper" @@ string "foo" @@ var "v1" @@ var "v2"),
-                T.mono $ T.functionMany [T.string, T.string, T.string])] $
-              unit)])
-
-    caseStatements = testGroup (Phantoms.string "Case statements") Phantoms.nothing (Phantoms.list subgroups') (Phantoms.list ([] :: [TTerm TestCaseWithMetadata]))
-      where
-        subgroups' = [
-          monomorphicAtTopLevel,
-          monomorphicInLetBinding,
-          polymorphicInLetBinding,
-          forcedExpansionInCaseBranches]
-
-        monomorphicAtTopLevel = testGroup (Phantoms.string "monomorphic at top level") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          testCase "non-applied case statement"
-            (match TestTypes.testTypeUnionMonomorphicName
-              (just $ string "other") [
-              "string">: lambda "s" $ var "s"])
-            (lambda "v1" $ (match TestTypes.testTypeUnionMonomorphicName
-                (just $ string "other") [
-                "string">: lambda "s" $ var "s"])
-              @@ var "v1"),
-          noChange "applied case statement"
-            ((match TestTypes.testTypeUnionMonomorphicName
-                (just $ string "other") [
-                "string">: lambdaTyped "s" T.string $ var "s"])
-              @@ (inject TestTypes.testTypeUnionMonomorphicName "string" (string "foo"))),
-          noChange "applied case statement in lambda"
-            (lambdaTyped "x" (Core.typeVariable TestTypes.testTypeUnionMonomorphicName) $ (match TestTypes.testTypeUnionMonomorphicName
-                (just $ string "other") [
-                "string">: lambdaTyped "s" T.string $ var "s"])
-              @@ var "x")])
-
-        monomorphicInLetBinding = testGroup (Phantoms.string "monomorphic in let binding") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          testCase "non-applied case statement"
-            (letsTyped [
-                ("test",
-                 match TestTypes.testTypeUnionMonomorphicName
-                   (just $ string "other") [
-                   "string">: lambda "s" $ var "s"],
-                 T.mono $ T.function (Core.typeVariable TestTypes.testTypeUnionMonomorphicName) T.string)]
-              (string "ignored"))
-            (letsTyped [
-                ("test",
-                 lambda "v1" $ match TestTypes.testTypeUnionMonomorphicName
-                   (just $ string "other") [
-                   "string">: lambda "s" $ var "s"] @@ var "v1",
-                 T.mono $ T.function (Core.typeVariable TestTypes.testTypeUnionMonomorphicName) T.string)]
-              (string "ignored")),
-          noChange "applied case statement"
-            (letsTyped [
-                ("test",
-                 (match TestTypes.testTypeUnionMonomorphicName
-                     (just $ string "other") [
-                     "string">: lambdaTyped "s" T.string $ var "s"])
-                   @@ (inject TestTypes.testTypeUnionMonomorphicName "string" (string "foo")),
-                 T.mono $ T.string)]
-              (string "ignored")),
-          noChange "applied case statement in lambda"
-            (letsTyped [
-                ("test",
-                 lambdaTyped "x" (Core.typeVariable TestTypes.testTypeUnionMonomorphicName) $ (match TestTypes.testTypeUnionMonomorphicName
-                     (just $ string "other") [
-                     "string">: lambdaTyped "s" T.string $ var "s"])
-                   @@ var "x",
-                 T.mono $ T.function T.string T.string)]
-              (string "ignored"))])
-
-        polymorphicInLetBinding = testGroup (Phantoms.string "polymorphic in let binding") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          testCase "non-applied UnionPolymorphicRecursive"
-            (letsTyped [
-                ("test",
-                 tyapp (match TestTypes.testTypeUnionPolymorphicRecursiveName
-                   (just $ string "other") [
-                   "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32,
-                 T.mono $ T.function (T.apply (Core.typeVariable TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string)] $
-              var "test")
-            (letsTyped [
-                ("test",
-                 lambda "v1" $ tyapp (match TestTypes.testTypeUnionPolymorphicRecursiveName
-                     (just $ string "other") [
-                     "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32
-                   @@ var "v1",
-                 T.mono $ T.function (T.apply (Core.typeVariable TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string)] $
-              var "test"),
-          noChange "applied UnionPolymorphicRecursive with int32"
-            (letsTyped [
-              ("test",
-               tyapp (match TestTypes.testTypeUnionPolymorphicRecursiveName
-                   (just $ string "other") [
-                   "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32
-                 @@ tyapp (inject TestTypes.testTypeUnionPolymorphicRecursiveName "value" (int32 42)) T.int32,
-               T.mono $ T.string)] $
-              var "test"),
-          noChange "applied UnionPolymorphicRecursive with int32 in lambda"
-            (letsTyped [
-              ("test",
-               lambdaTyped "x" (T.apply (Core.typeVariable TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) $
-                 tyapp (match TestTypes.testTypeUnionPolymorphicRecursiveName
-                     (just $ string "other") [
-                     "value">: lambdaTyped "i" T.int32 $ primitive _literals_showInt32 @@ var "i"]) T.int32
-                   @@ var "x",
-               T.mono $ T.function (T.apply (Core.typeVariable TestTypes.testTypeUnionPolymorphicRecursiveName) T.int32) T.string)] $
-              var "test"),
-          noChange "applied generic UnionPolymorphicRecursive in lambda"
-            (tylam "t0" $ letsTyped [
-              ("test",
-               tylam "t1" $ lambdaTyped "x" (T.apply (Core.typeVariable TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t1")) $
-                 tyapp (match TestTypes.testTypeUnionPolymorphicRecursiveName
-                     (just $ string "other") [
-                     "value">: lambdaTyped "ignored" (T.var "t1") $ string "foo"]) (T.var "t1")
-                   @@ var "x",
-               T.poly ["t1"] $ T.function (T.apply (Core.typeVariable TestTypes.testTypeUnionPolymorphicRecursiveName) (T.var "t1")) T.string)] $
-              tyapp (var "test") $ T.var "t0")])
-
-        forcedExpansionInCaseBranches = testGroup (Phantoms.string "Forced expansion in case statement branches") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-          testCase "variable reference in case branch is expanded"
-            (letsTyped [("handler", toLower, T.mono (T.function T.string T.string))] $
-              match TestTypes.testTypeUnionMonomorphicName nothing
-                ["bool">: lambda "ignored" $ string "boolean value",
-                 "string">: var "handler",
-                 "unit">: lambda "ignored" $ string "unit value"])
-            (letsTyped [("handler", toLower, T.mono (T.function T.string T.string))] $
-              lambda "v1" $ match TestTypes.testTypeUnionMonomorphicName nothing
-                ["bool">: lambda "ignored" $ string "boolean value",
-                 "string">: lambda "v1" $ var "handler" @@ var "v1",
-                 "unit">: lambda "ignored" $ string "unit value"] @@ var "v1"),
-          testCase "bare primitive in case branch is expanded"
-            (match TestTypes.testTypeUnionMonomorphicName nothing
-              ["bool">: lambda "ignored" $ string "boolean value",
-               "string">: toLower,
-               "unit">: lambda "ignored" $ string "unit value"])
-            (lambda "v1" $ match TestTypes.testTypeUnionMonomorphicName nothing
-              ["bool">: lambda "ignored" $ string "boolean value",
-               "string">: lambda "v1" $ toLower @@ var "v1",
-               "unit">: lambda "ignored" $ string "unit value"] @@ var "v1"),
-          noChange "variable reference outside case branch is not expanded"
-            (lets ["handler">: toLower] $ var "handler"),
-          noChange "bare primitive outside case branch is not expanded"
-            toLower])
-
-    nonExpansionOfEliminations = testGroup (Phantoms.string "Non-expansion of eliminations which produce functions") Phantoms.nothing (Phantoms.list ([] :: [TTerm TestGroup])) (Phantoms.list [
-      noChangeDisabled "applied case statement"
-        (tylams ["t0"] $
-          lambdaTyped "dir" (T.var "hydra.coders.CoderDirection") $
-            lambdaTyped "coder" (T.applys (T.var "hydra.coders.Coder") (T.var <$> ["t0", "t0"])) $
-              lambdaTyped "cx" (T.var "hydra.context.Context") $
-                lambdaTyped "v1" (T.var "t0") $
-                  match (Core.nameLift _CoderDirection)
-                    nothing [
-                    "encode">: lambdaTyped "_" T.unit $
-                      tyapps (project (Core.nameLift _Coder) (Core.name (Phantoms.string "encode"))) (T.var <$> ["t0", "t0"])
-                        @@ var "coder" @@ var "cx" @@ var "v1",
-                    "decode">: lambdaTyped "_" T.unit $
-                      tyapps (project (Core.nameLift _Coder) (Core.name (Phantoms.string "decode"))) (T.var <$> ["t0", "t0"])
-                        @@ var "coder" @@ var "cx" @@ var "v1"]
-                  @@ var "dir"),
-      noChange "applied projection"
-        (tyapps (project TestTypes.testTypeTripleName (Core.name (Phantoms.string "third"))) [T.int32, T.int32, T.function T.string T.string]
-        @@ (record TestTypes.testTypeTripleName [
-          "first">: int32 42,
-          "second">: int32 137,
-          "third">: lambda "s" $ toLower @@ var "s"]))])
-
--- Helpers
-
--- | Reference to hydra.reduction.etaExpandTypedTerm
-etaExpandRef :: TTerm (Context -> Graph -> Term -> Either Error Term)
-etaExpandRef = TTerm $ TermVariable $ Name "hydra.reduction.etaExpandTypedTerm"
-
-testCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-testCase name input output = universalCase name
-    (retype $ Eithers.either_
-      (Phantoms.lambda "e" (Strings.cat2 (Phantoms.string "ETA ERROR: ") (Phantoms.string "failed")))
-      (Phantoms.lambda "result" (showTermRef Phantoms.@@ Phantoms.var "result"))
-      (etaExpandRef Phantoms.@@ testContextRef Phantoms.@@ testGraphRef Phantoms.@@ input))
-    (retype $ showTermRef Phantoms.@@ output)
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm x) = TTerm x
-
-noChange :: String -> TTerm Term -> TTerm TestCaseWithMetadata
-noChange name term = testCase name term term
-
-noChangeDisabled :: String -> TTerm Term -> TTerm TestCaseWithMetadata
-noChangeDisabled name term = testCaseWithMetadata (Phantoms.string name)
-  (testCaseUniversal $ universalTestCase
-    (retype $ Eithers.either_
-      (Phantoms.lambda "e" (Strings.cat2 (Phantoms.string "ETA ERROR: ") (Phantoms.string "failed")))
-      (Phantoms.lambda "result" (showTermRef Phantoms.@@ Phantoms.var "result"))
-      (etaExpandRef Phantoms.@@ testContextRef Phantoms.@@ testGraphRef Phantoms.@@ term))
-    (retype $ showTermRef Phantoms.@@ term))
-  (Phantoms.nothing :: TTerm (Maybe String)) (Phantoms.list [tag . unTag $ tag_disabled])
-  where
-    retype :: TTerm x -> TTerm String
-    retype (TTerm x) = TTerm x
-
-cat = primitive $ _strings_cat
-foldl = primitive $ _lists_foldl
-splitOn = primitive $ _strings_splitOn
-toLower = primitive $ _strings_toLower
---toLower = Core.termFunction $ Core.functionPrimitive $ Core.name (Phantoms.string "hydra.lib.strings.toLower")
diff --git a/src/main/haskell/Hydra/Sources/Test/Formatting.hs b/src/main/haskell/Hydra/Sources/Test/Formatting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Formatting.hs
+++ /dev/null
@@ -1,93 +0,0 @@
-module Hydra.Sources.Test.Formatting where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import           Hydra.Dsl.Meta.Phantoms      as Phantoms hiding ((++))
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import qualified Hydra.Dsl.Util as Util
-import qualified Hydra.Show.Util as ShowUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting as FormattingModule
-
-import Hydra.Testing
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.formatting"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, FormattingModule.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for string formatting and case conversion")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition caseConversionTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    doc "Test cases for hydra.formatting" $
-    Testing.testGroup (string "formatting") nothing (list subgroups) (list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = [
-      caseConversionTests]
-
-caseConversionTests :: TTermDefinition TestGroup
-caseConversionTests = define "caseConversionTests" $
-  doc "Test cases for case conversion" $
-  Testing.testGroup (string "case conversion") nothing (list ([] :: [TTerm TestGroup])) (list cases)
-  where
-    cases = [
-      -- from lower_snake_case
-      testCase 1 CaseConventionLowerSnake CaseConventionUpperSnake "a_hello_world_42_a42_42a_b" "A_HELLO_WORLD_42_A42_42A_B",
-      testCase 2 CaseConventionLowerSnake CaseConventionCamel "a_hello_world_42_a42_42a_b" "aHelloWorld42A4242aB",
-      testCase 3 CaseConventionLowerSnake CaseConventionPascal "a_hello_world_42_a42_42a_b" "AHelloWorld42A4242aB",
-      testCase 4 CaseConventionLowerSnake CaseConventionLowerSnake "a_hello_world_42_a42_42a_b" "a_hello_world_42_a42_42a_b",
-
-      -- from UPPER_SNAKE_CASE
-      testCase 5 CaseConventionUpperSnake CaseConventionLowerSnake "A_HELLO_WORLD_42_A42_42A_B" "a_hello_world_42_a42_42a_b",
-      testCase 6 CaseConventionUpperSnake CaseConventionCamel "A_HELLO_WORLD_42_A42_42A_B" "aHelloWorld42A4242aB",
-      testCase 7 CaseConventionUpperSnake CaseConventionPascal "A_HELLO_WORLD_42_A42_42A_B" "AHelloWorld42A4242aB",
-      testCase 8 CaseConventionUpperSnake CaseConventionUpperSnake "A_HELLO_WORLD_42_A42_42A_B" "A_HELLO_WORLD_42_A42_42A_B",
-
-      -- from camelCase
-      testCase 9 CaseConventionCamel CaseConventionLowerSnake "aHelloWorld42A4242aB" "a_hello_world42_a4242a_b",
-      testCase 10 CaseConventionCamel CaseConventionUpperSnake "aHelloWorld42A4242aB" "A_HELLO_WORLD42_A4242A_B",
-      testCase 11 CaseConventionCamel CaseConventionPascal "aHelloWorld42A4242aB" "AHelloWorld42A4242aB",
-      testCase 12 CaseConventionCamel CaseConventionCamel "aHelloWorld42A4242aB" "aHelloWorld42A4242aB",
-
-      -- from PascalCase
-      testCase 13 CaseConventionPascal CaseConventionLowerSnake "AHelloWorld42A4242aB" "a_hello_world42_a4242a_b",
-      testCase 14 CaseConventionPascal CaseConventionUpperSnake "AHelloWorld42A4242aB" "A_HELLO_WORLD42_A4242A_B",
-      testCase 15 CaseConventionPascal CaseConventionCamel "AHelloWorld42A4242aB" "aHelloWorld42A4242aB",
-      testCase 16 CaseConventionPascal CaseConventionPascal "AHelloWorld42A4242aB" "AHelloWorld42A4242aB"]
-
--- Helpers
-
-testCase :: Int -> CaseConvention -> CaseConvention -> String -> String -> TTerm TestCaseWithMetadata
-testCase i fromConvention toConvention fromString toString =
-    universalCase name actual expected
-  where
-    actual = FormattingModule.convertCase @@ metaConv fromConvention
-      @@ metaConv toConvention @@ string fromString
-    expected = string toString
-    name = "#" ++ show i ++ " (" ++ ShowUtil.caseConvention fromConvention ++ " -> " ++ ShowUtil.caseConvention toConvention ++ ")"
-    metaConv conv = case conv of
-      CaseConventionLowerSnake -> Util.caseConventionLowerSnake
-      CaseConventionUpperSnake -> Util.caseConventionUpperSnake
-      CaseConventionCamel -> Util.caseConventionCamel
-      CaseConventionPascal -> Util.caseConventionPascal
diff --git a/src/main/haskell/Hydra/Sources/Test/Generation.hs b/src/main/haskell/Hydra/Sources/Test/Generation.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Generation.hs
+++ /dev/null
@@ -1,288 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for code generation operations, in particular the contract
--- between `inferModules` and `inferModulesGiven`: incremental inference of a
--- subset of the universe must produce the same inferred type schemes for the
--- target modules' term bindings as a full inference run over the same universe.
-
-module Hydra.Sources.Test.Generation where
-
-import Hydra.Kernel hiding (inferModules)
-import Hydra.Dsl.Meta.Testing                 as Testing
-import qualified Hydra.Dsl.Meta.Terms         as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import           Hydra.Dsl.Meta.Phantoms      as Phantoms hiding ((++))
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Packaging          as Packaging
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import qualified Hydra.Sources.Kernel.Terms.Generation as Generation
-import qualified Hydra.Sources.Kernel.Terms.Show.Core  as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.generation"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Generation.ns, ShowCore.ns, TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for code generation operations such as inferModules and inferModulesGiven")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application.
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
-----------------------------------------
--- Toy modules used as test input.
---
--- Two modules in a fictional `hydra.testInput.*` namespace, deliberately
--- minimal:
---
---   hydra.testInput.a:  idA = \x. x
---   hydra.testInput.b:  useId = idA 42      (depends on hydra.testInput.a)
---
--- The cross-module reference from `useId` to `idA` is the property we care
--- about: it forces inference for `b` to consult information about `a`, which
--- is exactly the path `inferModulesGiven` exercises differently from
--- `inferModules` (the former only infers `targetBindings`, the latter infers
--- the full universe).
-
-nsA :: TTerm Namespace
-nsA = Packaging.namespace (Phantoms.string "hydra.testInput.a")
-
-nsB :: TTerm Namespace
-nsB = Packaging.namespace (Phantoms.string "hydra.testInput.b")
-
-nameIdA :: TTerm Name
-nameIdA = Core.name (Phantoms.string "hydra.testInput.a.idA")
-
-nameUseId :: TTerm Name
-nameUseId = Core.name (Phantoms.string "hydra.testInput.b.useId")
-
--- An untyped term definition (Maybe TypeScheme = nothing) so inference will
--- assign a fresh scheme.
-untypedTermDef :: TTerm Name -> TTerm Term -> TTerm Definition
-untypedTermDef nm tm = Packaging.definitionTerm
-  (Packaging.termDefinition nm tm Phantoms.nothing)
-
--- A pre-annotated term definition, simulating a universe binding whose type
--- scheme was populated by a prior inference run (the future caching layer).
--- `inferModulesGiven` uses these schemes via `modulesToGraph`'s `boundTypes`
--- seeding to resolve cross-module references without re-inferring the
--- universe.
-typedTermDef :: TTerm Name -> TTerm Term -> TTerm TypeScheme -> TTerm Definition
-typedTermDef nm tm ts = Packaging.definitionTerm
-  (Packaging.termDefinition nm tm (Phantoms.just ts))
-
--- The scheme carried on `modA.idA`: forall a. a -> a.
-idAScheme :: TTerm TypeScheme
-idAScheme = T.poly ["a"] (T.function (T.var "a") (T.var "a"))
-
-modA :: TTerm Module
-modA = Packaging.module_
-  Phantoms.nothing
-  nsA
-  (Phantoms.list ([] :: [TTerm Namespace]))
-  (Phantoms.list ([] :: [TTerm Namespace]))
-  (Phantoms.list [
-    typedTermDef nameIdA (Terms.lambda "x" (Terms.var "x")) idAScheme])
-
-modB :: TTerm Module
-modB = Packaging.module_
-  Phantoms.nothing
-  nsB
-  (Phantoms.list [nsA])
-  (Phantoms.list ([] :: [TTerm Namespace]))
-  (Phantoms.list [
-    untypedTermDef nameUseId (Terms.apply (Terms.var "hydra.testInput.a.idA") (Terms.int32 42))])
-
-universeMods :: TTerm [Module]
-universeMods = Phantoms.list [modA, modB]
-
-----------------------------------------
--- Second toy universe: a "clean" module carrying a scheme with vacuous
--- quantifiers (type variables that appear only in the domain, never in the
--- codomain), plus a "stale" target that applies the function. This shape is
--- actually produced by a prior inference run on the real kernel, e.g. the
--- stored scheme for `hydra.eval.lib.eithers.either` after round-tripping
--- through JSON. `inferModules` and `inferModulesGiven` must agree on the
--- rendered inferred modules for any such universe.
---
---   hydra.testInput.v.funky :: forall t0 t1. t0 -> t1 -> int32 -> int32
---     (the body is irrelevant; only the scheme matters for seeding.)
---   hydra.testInput.w.useFunky = funky "foo" 7 100
-
-nsV :: TTerm Namespace
-nsV = Packaging.namespace (Phantoms.string "hydra.testInput.v")
-
-nsW :: TTerm Namespace
-nsW = Packaging.namespace (Phantoms.string "hydra.testInput.w")
-
-nameFunky :: TTerm Name
-nameFunky = Core.name (Phantoms.string "hydra.testInput.v.funky")
-
-nameUseFunky :: TTerm Name
-nameUseFunky = Core.name (Phantoms.string "hydra.testInput.w.useFunky")
-
--- forall t0 t1 t2. t0 -> t1 -> t2 -> t2
--- This is the canonical scheme that inferModules produces when funky is
--- inferred alone (without useFunky constraining it). The body `\x.\y.\z. z`
--- gives 3 free type variables; a caching layer would store exactly this.
-funkyScheme :: TTerm TypeScheme
-funkyScheme = T.poly ["t0", "t1", "t2"]
-  (T.function (T.var "t0")
-    (T.function (T.var "t1")
-      (T.function (T.var "t2") (T.var "t2"))))
-
--- Body: `\x. \y. \z. z`. Three args, returns the third.
-funkyTerm :: TTerm Term
-funkyTerm = Terms.lambda "x" (Terms.lambda "y" (Terms.lambda "z" (Terms.var "z")))
-
-modV :: TTerm Module
-modV = Packaging.module_
-  Phantoms.nothing
-  nsV
-  (Phantoms.list ([] :: [TTerm Namespace]))
-  (Phantoms.list ([] :: [TTerm Namespace]))
-  (Phantoms.list [typedTermDef nameFunky funkyTerm funkyScheme])
-
--- useFunky = funky "foo" 7 100
-modW :: TTerm Module
-modW = Packaging.module_
-  Phantoms.nothing
-  nsW
-  (Phantoms.list [nsV])
-  (Phantoms.list ([] :: [TTerm Namespace]))
-  (Phantoms.list [
-    untypedTermDef nameUseFunky
-      (Terms.apply
-        (Terms.apply
-          (Terms.apply (Terms.var "hydra.testInput.v.funky")
-                       (Terms.string "foo"))
-          (Terms.int32 7))
-        (Terms.int32 100))])
-
-vacuousUniverse :: TTerm [Module]
-vacuousUniverse = Phantoms.list [modV, modW]
-
-----------------------------------------
--- Show helpers.
---
--- Render a `[Module]` deterministically as the concatenation, in module order,
--- of `"<binding-name> :: <type-scheme>\n"` for every term definition. Type
--- definitions are skipped (they aren't touched by inference).
-
--- | Render a definition as "<name> :: <scheme> = <term>\n". The term component
--- is included so that two runs producing the same final type but different
--- inferred term bodies (e.g. different TypeApplication wrappers) fail the
--- equality check.
-showDef :: TTerm Definition -> TTerm String
-showDef d = Phantoms.cases _Definition d Nothing [
-    _Definition_type>>: "td" ~> Phantoms.string "",
-    _Definition_term>>: "td" ~>
-      Strings.concat [
-        Core.unName (Packaging.termDefinitionName (var "td")),
-        Phantoms.string " :: ",
-        Maybes.maybe
-          (Phantoms.string "<no scheme>")
-          ("ts" ~> ShowCore.typeScheme # var "ts")
-          (Packaging.termDefinitionTypeScheme (var "td")),
-        Phantoms.string " = ",
-        ShowCore.term # (Packaging.termDefinitionTerm (var "td")),
-        Phantoms.string "\n"]]
-
-showModule :: TTerm Module -> TTerm String
-showModule m = Strings.cat (Lists.map ("d" ~> showDef (var "d")) (Packaging.moduleDefinitions m))
-
-showModules :: TTerm [Module] -> TTerm String
-showModules ms = Strings.cat (Lists.map ("m" ~> showModule (var "m")) ms)
-
-showResult :: TTerm (Either Error [Module]) -> TTerm String
-showResult r = Eithers.either_
-  ("e" ~> Phantoms.string "<<inference error>>")
-  ("ms" ~> showModules (var "ms"))
-  r
-
-----------------------------------------
--- Test cases.
-
--- | Property: incremental inference of a strict subset of the universe
--- produces the same inferred type schemes for the target modules' term
--- bindings as a full inference run over the same universe.
-incrementalSubsetCase :: TTerm TestCaseWithMetadata
-incrementalSubsetCase = universalCase "incremental inference of subset matches full inference"
-    actual
-    expected
-  where
-    target = Phantoms.list [modB]
-    actual = showResult (Generation.inferModulesGiven
-      # TestGraph.testContext # TestGraph.testGraph # universeMods # target)
-    expected = showResult (Generation.inferModules
-      # TestGraph.testContext # TestGraph.testGraph # universeMods # target)
-
--- | Property: when target = universe, `inferModulesGiven` is equivalent to
--- `inferModules`.
-incrementalFullCase :: TTerm TestCaseWithMetadata
-incrementalFullCase = universalCase "incremental inference of full universe matches full inference"
-    actual
-    expected
-  where
-    actual = showResult (Generation.inferModulesGiven
-      # TestGraph.testContext # TestGraph.testGraph # universeMods # universeMods)
-    expected = showResult (Generation.inferModules
-      # TestGraph.testContext # TestGraph.testGraph # universeMods # universeMods)
-
--- | Property: when a clean universe module carries a pre-inferred scheme,
--- `inferModulesGiven` uses that scheme verbatim rather than re-inferring it.
--- References from stale targets to the clean module are instantiated at the
--- scheme's full quantifier count (routed through `inferTypeOfVariable`'s
--- `graphBoundTypes` branch), even if the scheme has vacuous quantifiers that
--- a fresh inference pass would collapse.
---
--- This is the behaviour that lets `inferModulesGiven` skip inference for
--- clean modules without losing soundness: the cached scheme is the source of
--- truth, and Phase 6 of `inferTypeOfLetNormalized` only rewrites references
--- to currently let-bound names, so there is no quantifier-count mismatch.
---
--- The divergence from `inferModules` (which re-infers the clean binding and
--- may collapse quantifiers) is expected and correct. Byte-identical output
--- against the real kernel JSON at regeneration time is what certifies the
--- partition; this case just pins the per-reference AST shape for the toy
--- vacuous-quantifier universe.
-vacuousQuantifierCase :: TTerm TestCaseWithMetadata
-vacuousQuantifierCase = universalCase
-    "incremental inference uses cached scheme verbatim on vacuous-quantifier universe"
-    actual
-    (Phantoms.string $
-      "hydra.testInput.w.useFunky :: (int32) = (" ++
-      "hydra.testInput.v.funky⟨string⟩⟨int32⟩⟨int32⟩" ++
-      " @ \"foo\" @ 7:int32 @ 100:int32)\n")
-  where
-    target = Phantoms.list [modW]
-    actual = showResult (Generation.inferModulesGiven
-      # TestGraph.testContext # TestGraph.testGraph # vacuousUniverse # target)
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for code generation operations" $
-    supergroup "generation" [
-      subgroup "inferModulesGiven" [
-        incrementalSubsetCase,
-        incrementalFullCase,
-        vacuousQuantifierCase]]
diff --git a/src/main/haskell/Hydra/Sources/Test/Hoisting/All.hs b/src/main/haskell/Hydra/Sources/Test/Hoisting/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Hoisting/All.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-
-module Hydra.Sources.Test.Hoisting.All where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing as Testing
-import Hydra.Sources.Kernel.Types.All
-import Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Meta.Core as Core
-import qualified Hydra.Dsl.Meta.Types as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List as L
-import qualified Data.Map  as M
-
-import qualified Hydra.Sources.Test.Hoisting.Cases as Cases
-import qualified Hydra.Sources.Test.Hoisting.Let as Let
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.hoisting.all"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = namespaces,
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Hydra's hoisting test suite"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-    namespaces = [
-      Cases.ns,
-      Let.ns]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    doc "The group of all hoisting tests" $
-    Testing.testGroup (string "hoisting") nothing (list subgroups) (list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = [
-      Cases.allTests,
-      Let.allTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Hoisting/Cases.hs b/src/main/haskell/Hydra/Sources/Test/Hoisting/Cases.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Hoisting/Cases.hs
+++ /dev/null
@@ -1,1304 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for subterm hoisting and case statement hoisting transformations
-
-module Hydra.Sources.Test.Hoisting.Cases where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing hiding (
-  hoistPredicateNothing, hoistPredicateLists, hoistPredicateApplications, hoistPredicateCaseStatements)
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Pairs as Pairs
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Hoisting as HoistingModule
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.hoisting.cases"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, HoistingModule.ns, Lexical.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for subterm hoisting and case statement hoisting"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for subterm hoisting and case statement hoisting" $
-    supergroup "hoistCases" [
-      hoistSubtermsGroup,
-      hoistCaseStatementsGroup]
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Helper to build an empty annotation map
-emptyAnnMap :: TTerm (M.Map Name Term)
-emptyAnnMap = Phantoms.map M.empty
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- | Show a term as a string using ShowCore.term
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term # t
-
--- Field constructor for cases/match (Phantoms.>>: creates Field; unqualified >>: from Testing creates tuples)
-(~>:) :: AsTerm t a => Name -> t -> Field
-(~>:) = (Phantoms.>>:)
-infixr 0 ~>:
-
--- | Predicate: never hoist anything
-hoistPredicateNothing :: TTerm (([SubtermStep], Term) -> Bool)
-hoistPredicateNothing = Phantoms.lambda "_" Phantoms.false
-
--- | Predicate: hoist list terms
-hoistPredicateLists :: TTerm (([SubtermStep], Term) -> Bool)
-hoistPredicateLists = Phantoms.lambda "pt" $
-  Phantoms.cases _Term (Pairs.second (Phantoms.var "pt")) (Just Phantoms.false) [
-    _Term_list ~>: Phantoms.lambda "_" Phantoms.true]
-
--- | Predicate: hoist function applications
-hoistPredicateApplications :: TTerm (([SubtermStep], Term) -> Bool)
-hoistPredicateApplications = Phantoms.lambda "pt" $
-  Phantoms.cases _Term (Pairs.second (Phantoms.var "pt")) (Just Phantoms.false) [
-    _Term_application ~>: Phantoms.lambda "_" Phantoms.true]
-
--- | Predicate: hoist case statements (elimination unions)
-hoistPredicateCaseStatements :: TTerm (([SubtermStep], Term) -> Bool)
-hoistPredicateCaseStatements = Phantoms.lambda "pt" $
-  Phantoms.cases _Term (Pairs.second (Phantoms.var "pt")) (Just Phantoms.false) [
-    _Term_cases ~>: Phantoms.lambda "_" Phantoms.true]
-
--- | Universal hoistSubterms test case
-hoistCase :: String -> TTerm (([SubtermStep], Term) -> Bool) -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-hoistCase cname predicate input output = universalCase cname
-  (showTerm (HoistingModule.hoistSubterms # predicate # Lexical.emptyGraph # input))
-  (showTerm output)
-
--- | Local universal version of hoistCaseStatementsCase
-hoistCaseStatementsCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-hoistCaseStatementsCase cname input output = universalCase cname
-  (showTerm (HoistingModule.hoistCaseStatements # Lexical.emptyGraph # input))
-  (showTerm output)
-
--- Helper for single-binding let
-letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letExpr varName value body = lets [(nm varName, value)] body
-
--- Helper for multi-binding let
-multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
-multiLet bindings body = lets ((\(n, v) -> (nm n, v)) <$> bindings) body
-
--- | Test cases for hoistSubterms
--- This function hoists subterms matching a predicate into local let bindings.
--- The predicate receives the term and returns True if the term should be hoisted.
--- For each let term, immediate subterms (binding values and body) are processed:
--- matching subterms are collected and hoisted into a local let that wraps
--- that immediate subterm.
-hoistSubtermsGroup :: TTerm TestGroup
-hoistSubtermsGroup = subgroup "hoistSubterms" [
-    -- ============================================================
-    -- Test: hoistNothing predicate (identity transformation)
-    -- The hoistNothing predicate never hoists anything.
-    -- ============================================================
-
-    hoistCase "hoistNothing: simple let unchanged"
-      hoistPredicateNothing
-      -- Input: let x = 42 in x
-      (letExpr "x" (int32 42) (var "x"))
-      -- Output: unchanged
-      (letExpr "x" (int32 42) (var "x")),
-
-    hoistCase "hoistNothing: let with list in body unchanged"
-      hoistPredicateNothing
-      -- Input: let x = 1 in [x, 2, 3]
-      (letExpr "x" (int32 1) (list [var "x", int32 2, int32 3]))
-      -- Output: unchanged - hoistNothing never hoists
-      (letExpr "x" (int32 1) (list [var "x", int32 2, int32 3])),
-
-    hoistCase "hoistNothing: let with application in body unchanged"
-      hoistPredicateNothing
-      -- Input: let f = g in f (h 42)
-      (letExpr "f" (var "g") (apply (var "f") (apply (var "h") (int32 42))))
-      -- Output: unchanged
-      (letExpr "f" (var "g") (apply (var "f") (apply (var "h") (int32 42)))),
-
-    -- ============================================================
-    -- Test: hoistLists predicate
-    -- Hoists list terms. Matching subterms within an immediate subterm
-    -- are collected and wrapped in a local let around that subterm.
-    -- ============================================================
-
-    hoistCase "hoistLists: list in body is hoisted into local let"
-      hoistPredicateLists
-      -- Input: let x = 1 in f [1, 2, 3]
-      (letExpr "x" (int32 1) (apply (var "f") (list [int32 1, int32 2, int32 3])))
-      -- Output: body is wrapped in local let with hoisted list
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (list [int32 1, int32 2, int32 3])
-          (apply (var "f") (var "_hoist_x_body_1")))),
-
-    hoistCase "hoistLists: multiple lists in body are hoisted together"
-      hoistPredicateLists
-      -- Input: let x = 1 in pair [1, 2] [3, 4]
-      (letExpr "x" (int32 1)
-        (apply (apply (var "pair") (list [int32 1, int32 2]))
-                                         (list [int32 3, int32 4])))
-      -- Output: body is wrapped in local let with both hoisted lists
-      (letExpr "x" (int32 1)
-        (multiLet [
-          ("_hoist_x_body_1", list [int32 1, int32 2]),
-          ("_hoist_x_body_2", list [int32 3, int32 4])]
-          (apply (apply (var "pair") (var "_hoist_x_body_1")) (var "_hoist_x_body_2")))),
-
-    hoistCase "hoistLists: list in binding value is hoisted into local let"
-      hoistPredicateLists
-      -- Input: let x = f [1, 2] in x
-      (letExpr "x" (apply (var "f") (list [int32 1, int32 2])) (var "x"))
-      -- Output: binding value is wrapped in local let
-      (letExpr "x"
-        (letExpr "_hoist_x_1" (list [int32 1, int32 2])
-          (apply (var "f") (var "_hoist_x_1")))
-        (var "x")),
-
-    hoistCase "hoistLists: nested lists hoisted from inside out"
-      hoistPredicateLists
-      -- Input: let x = 1 in f [[1, 2], 3]
-      (letExpr "x" (int32 1)
-        (apply (var "f") (list [list [int32 1, int32 2], int32 3])))
-      -- Output: inner list hoisted first, then outer list
-      (letExpr "x" (int32 1)
-        (multiLet [
-          ("_hoist_x_body_1", list [int32 1, int32 2]),
-          ("_hoist_x_body_2", list [var "_hoist_x_body_1", int32 3])]
-          (apply (var "f") (var "_hoist_x_body_2")))),
-
-    -- ============================================================
-    -- Test: hoistApplications predicate
-    -- Hoists function applications.
-    -- ============================================================
-
-    hoistCase "hoistApplications: application in list element is hoisted"
-      hoistPredicateApplications
-      -- Input: let x = 1 in [f x, y]
-      (letExpr "x" (int32 1)
-        (list [apply (var "f") (var "x"), var "y"]))
-      -- Output: body is wrapped in local let
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (apply (var "f") (var "x"))
-          (list [var "_hoist_x_body_1", var "y"]))),
-
-    hoistCase "hoistApplications: application in record field is hoisted"
-      hoistPredicateApplications
-      -- Input: let x = 1 in {value: f x}
-      (letExpr "x" (int32 1)
-        (record (nm "Data") [(nm "value", apply (var "f") (var "x"))]))
-      -- Output: body is wrapped in local let
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (apply (var "f") (var "x"))
-          (record (nm "Data") [(nm "value", var "_hoist_x_body_1")]))),
-
-    hoistCase "hoistApplications: nested applications hoisted from inside out"
-      hoistPredicateApplications
-      -- Input: let x = 1 in [f (g x)]
-      (letExpr "x" (int32 1)
-        (list [apply (var "f") (apply (var "g") (var "x"))]))
-      -- Output: inner application hoisted first, then outer
-      (letExpr "x" (int32 1)
-        (multiLet [
-          ("_hoist_x_body_1", apply (var "g") (var "x")),
-          ("_hoist_x_body_2", apply (var "f") (var "_hoist_x_body_1"))]
-          (list [var "_hoist_x_body_2"]))),
-
-    -- ============================================================
-    -- Test: hoistCaseStatements predicate
-    -- Hoists case/match statements.
-    -- ============================================================
-
-    hoistCase "hoistCaseStatements: case in application argument is hoisted"
-      hoistPredicateCaseStatements
-      -- Input: let x = just 42 in f (match x with just y -> y | nothing -> 0)
-      (letExpr "x" (optional $ just $ int32 42)
-        (apply (var "f")
-          (match (nm "Optional") (just $ var "x")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])))
-      -- Output: body is wrapped in local let with hoisted case
-      (letExpr "x" (optional $ just $ int32 42)
-        (letExpr "_hoist_x_body_1"
-          (match (nm "Optional") (just $ var "x")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (apply (var "f") (var "_hoist_x_body_1")))),
-
-    hoistCase "hoistCaseStatements: case in list element is hoisted"
-      hoistPredicateCaseStatements
-      -- Input: let x = 1 in [match y with ok -> x | err -> 0]
-      (letExpr "x" (int32 1)
-        (list [match (nm "Result") (just $ var "y")
-          [(nm "ok", var "x"),
-           (nm "err", int32 0)]]))
-      -- Output: body is wrapped in local let
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1"
-          (match (nm "Result") (just $ var "y")
-            [(nm "ok", var "x"),
-             (nm "err", int32 0)])
-          (list [var "_hoist_x_body_1"]))),
-
-    -- ============================================================
-    -- Test: Nested let expressions
-    -- Each let is processed independently; inner lets are processed first.
-    -- ============================================================
-
-    hoistCase "hoistLists: nested let - inner let processed independently"
-      hoistPredicateLists
-      -- Input: let x = 1 in (let y = 2 in f [x, y])
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (apply (var "f") (list [var "x", var "y"]))))
-      -- Output: the list is hoisted in the inner let's body
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (letExpr "_hoist_y_body_1" (list [var "x", var "y"])
-            (apply (var "f") (var "_hoist_y_body_1"))))),
-
-    -- ============================================================
-    -- Test: Non-let terms are unchanged
-    -- hoistSubterms only processes let expressions.
-    -- ============================================================
-
-    hoistCase "hoistLists: non-let term is unchanged"
-      hoistPredicateLists
-      -- Input: f [1, 2, 3] (no enclosing let)
-      (apply (var "f") (list [int32 1, int32 2, int32 3]))
-      -- Output: unchanged - no let to hoist into
-      (apply (var "f") (list [int32 1, int32 2, int32 3])),
-
-    hoistCase "hoistApplications: bare application unchanged"
-      hoistPredicateApplications
-      -- Input: f (g x) (no enclosing let)
-      (apply (var "f") (apply (var "g") (var "x")))
-      -- Output: unchanged
-      (apply (var "f") (apply (var "g") (var "x"))),
-
-    -- ============================================================
-    -- Test: Lambda-bound variable capture during hoisting
-    -- When hoisting a term that contains free variables which are
-    -- lambda-bound at an enclosing scope within the immediate subterm,
-    -- those variables must be captured: the hoisted binding is wrapped
-    -- in lambdas for those variables, and the reference is replaced
-    -- with an application of those variables.
-    -- ============================================================
-
-    -- Case 1: Hoisted term refers to let-bound variable (no capture needed)
-    hoistCase "hoistLists: term referring to let-bound variable needs no capture"
-      hoistPredicateLists
-      -- Input: let x = 1 in f [x, 2]
-      -- The list refers to x which is let-bound, not lambda-bound
-      (letExpr "x" (int32 1)
-        (apply (var "f") (list [var "x", int32 2])))
-      -- Output: list is hoisted without any lambda wrapping
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (list [var "x", int32 2])
-          (apply (var "f") (var "_hoist_x_body_1")))),
-
-    -- Case 2: Hoisted term refers to lambda-bound variable ABOVE the let (no capture needed)
-    hoistCase "hoistLists: term referring to lambda above let needs no capture"
-      hoistPredicateLists
-      -- Input: \y -> let x = 1 in f [y, x]
-      -- y is lambda-bound above the let, so it's not in the immediate subterm's scope
-      (lambda "y"
-        (letExpr "x" (int32 1)
-          (apply (var "f") (list [var "y", var "x"]))))
-      -- Output: list is hoisted without lambda wrapping (y was bound before let)
-      (lambda "y"
-        (letExpr "x" (int32 1)
-          (letExpr "_hoist_x_body_1" (list [var "y", var "x"])
-            (apply (var "f") (var "_hoist_x_body_1"))))),
-
-    -- Case 3: Lambda-bound variable between let and hoisted term, but NOT free in hoisted term
-    hoistCase "hoistLists: lambda-bound var not free in hoisted term needs no capture"
-      hoistPredicateLists
-      -- Input: let x = 1 in (\y -> f [x, 2])
-      -- y is lambda-bound between let and list, but y does not appear in the list [x, 2]
-      -- So [x, 2] should be hoisted without capturing y
-      (letExpr "x" (int32 1)
-        (lambda "y" (apply (var "f") (list [var "x", int32 2]))))
-      -- Output: list [x, 2] is hoisted without lambda wrapping for y (y not free in list)
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (list [var "x", int32 2])
-          (lambda "y" (apply (var "f") (var "_hoist_x_body_1"))))),
-
-    -- Case 4: Lambda-bound variable between let and hoisted term, IS free in hoisted term
-    hoistCase "hoistLists: lambda-bound var free in hoisted term requires capture"
-      hoistPredicateLists
-      -- Input: let x = 1 in (\y -> f [x, y])
-      -- y is lambda-bound between let and list, and y appears in the list [x, y]
-      -- So [x, y] should be hoisted with y captured
-      (letExpr "x" (int32 1)
-        (lambda "y" (apply (var "f") (list [var "x", var "y"]))))
-      -- Output: _hoist_x_body_1 = \y -> [x, y], reference becomes _hoist_x_body_1 y
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (lambda "y" (list [var "x", var "y"]))
-          (lambda "y" (apply (var "f") (apply (var "_hoist_x_body_1") (var "y")))))),
-
-    -- Case 5: Multiple lambda-bound variables, only some free in hoisted term
-    hoistCase "hoistLists: only free lambda-bound vars are captured"
-      hoistPredicateLists
-      -- Input: let x = 1 in (\a -> \b -> f [x, b])
-      -- Both a and b are lambda-bound between let and list
-      -- But only b appears in the list [x, b], so only b is captured
-      (letExpr "x" (int32 1)
-        (lambda "a" (lambda "b" (apply (var "f") (list [var "x", var "b"])))))
-      -- Output: _hoist_x_body_1 = \b -> [x, b], reference becomes _hoist_x_body_1 b
-      (letExpr "x" (int32 1)
-        (letExpr "_hoist_x_body_1" (lambda "b" (list [var "x", var "b"]))
-          (lambda "a" (lambda "b" (apply (var "f") (apply (var "_hoist_x_body_1") (var "b"))))))),
-
-    -- ============================================================
-    -- Test: Stable naming for sibling immediate subterms
-    -- Each sibling uses its parent binding name as a prefix, ensuring
-    -- that changes to one sibling don't affect the names in another.
-    -- ============================================================
-
-    hoistCase "hoistLists: stable naming for binding and body"
-      hoistPredicateLists
-      -- Input: let x = f [1, 2] in g [3, 4]
-      -- Both binding value and body have lists to hoist
-      (letExpr "x" (apply (var "f") (list [int32 1, int32 2]))
-                   (apply (var "g") (list [int32 3, int32 4])))
-      -- Output: binding uses _hoist_x_1, body uses _hoist_x_body_1
-      (letExpr "x"
-        (letExpr "_hoist_x_1" (list [int32 1, int32 2])
-          (apply (var "f") (var "_hoist_x_1")))
-        (letExpr "_hoist_x_body_1" (list [int32 3, int32 4])
-          (apply (var "g") (var "_hoist_x_body_1")))),
-
-    hoistCase "hoistLists: stable naming for multiple bindings"
-      hoistPredicateLists
-      -- Input: let x = f [1]; y = g [2] in x
-      (multiLet [
-        ("x", apply (var "f") (list [int32 1])),
-        ("y", apply (var "g") (list [int32 2]))]
-        (var "x"))
-      -- Output: each binding uses its own name as prefix (_hoist_x_1, _hoist_y_1)
-      (multiLet [
-        ("x", letExpr "_hoist_x_1" (list [int32 1])
-                (apply (var "f") (var "_hoist_x_1"))),
-        ("y", letExpr "_hoist_y_1" (list [int32 2])
-                (apply (var "g") (var "_hoist_y_1")))]
-        (var "x")),
-
-    -- ============================================================
-    -- Test: Polymorphic recursion - this is the key test case
-    -- The new local-let approach avoids polymorphic mutual recursion
-    -- by keeping hoisted bindings local to each immediate subterm.
-    -- ============================================================
-
-    hoistCase "hoistLists: polymorphic binding with self-reference below hoisted term"
-      hoistPredicateLists
-      -- Input: let f = \x -> pair (f x) [x, 1] in f 42
-      -- f is polymorphic and has a self-reference, with a list below it
-      -- With sibling hoisting, this would create: let f = ...; _hoist_f_1 = [x, 1] in ...
-      -- which causes polymorphic mutual recursion issues.
-      -- With local hoisting, we get: let f = (let _hoist_f_1 = ... in ...) in ...
-      -- which is polymorphic nesting (OK) rather than mutual recursion.
-      (letExpr "f"
-        (lambda "x" (apply (apply (var "pair") (apply (var "f") (var "x")))
-                               (list [var "x", int32 1])))
-        (apply (var "f") (int32 42)))
-      -- Output: the list is hoisted into a local let within f's binding value
-      (letExpr "f"
-        (letExpr "_hoist_f_1" (lambda "x" (list [var "x", int32 1]))
-          (lambda "x" (apply (apply (var "pair") (apply (var "f") (var "x")))
-                                 (apply (var "_hoist_f_1") (var "x")))))
-        (apply (var "f") (int32 42)))]
-
--- | Test cases for hoistCaseStatements
--- This function hoists case statements (eliminations) that are NOT at "top level".
--- Top level means: the root, or reachable through annotations, lambda bodies,
--- or ONE application LHS. Case statements at top level can become Python match
--- statements; those not at top level need to be hoisted.
-hoistCaseStatementsGroup :: TTerm TestGroup
-hoistCaseStatementsGroup = subgroup "hoistCaseStatements" [
-    -- ============================================================
-    -- Test: Case statement at top level - should NOT be hoisted
-    -- ============================================================
-
-    hoistCaseStatementsCase "case at top level of let body is NOT hoisted"
-      -- Input: let x = just 42 in match x with just y -> y | nothing -> 0
-      -- The case statement is directly in the let body (top level)
-      (letExpr "x" (optional $ just $ int32 42)
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "y" (var "y")),
-           (nm "nothing", int32 0)]))
-      -- Output: unchanged - case is at top level
-      (letExpr "x" (optional $ just $ int32 42)
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "y" (var "y")),
-           (nm "nothing", int32 0)])),
-
-    hoistCaseStatementsCase "case in let binding value is NOT hoisted"
-      -- Input: let x = match y with just z -> z | nothing -> 0 in x
-      -- The case statement is at top level of binding value
-      (letExpr "x"
-        (match (nm "Optional") (just $ var "y")
-          [(nm "just", lambda "z" (var "z")),
-           (nm "nothing", int32 0)])
-        (var "x"))
-      -- Output: unchanged - case is at top level
-      (letExpr "x"
-        (match (nm "Optional") (just $ var "y")
-          [(nm "just", lambda "z" (var "z")),
-           (nm "nothing", int32 0)])
-        (var "x")),
-
-    hoistCaseStatementsCase "case inside lambda body is NOT hoisted"
-      -- Input: let f = \a -> match a with just y -> y | nothing -> 0 in f (just 42)
-      -- The case is inside a lambda body, but lambda bodies are pass-through
-      -- This becomes def f(a): match a: ... in Python
-      (letExpr "f"
-        (lambda "a"
-          (match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (apply (var "f") (optional $ just $ int32 42)))
-      -- Output: unchanged - case is at top level (through lambda body)
-      (letExpr "f"
-        (lambda "a"
-          (match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (apply (var "f") (optional $ just $ int32 42))),
-
-    hoistCaseStatementsCase "case inside nested lambdas is NOT hoisted"
-      -- Input: let f = \a -> \b -> match a with ok -> b | err -> 0 in f
-      -- The case is inside nested lambdas - still at top level
-      -- This becomes def f(a, b): match a: ... in Python
-      (letExpr "f"
-        (lambda "a" (lambda "b"
-          (match (nm "Result") (just $ var "a")
-            [(nm "ok", var "b"),
-             (nm "err", int32 0)])))
-        (var "f"))
-      -- Output: unchanged - case is at top level (through lambda bodies)
-      (letExpr "f"
-        (lambda "a" (lambda "b"
-          (match (nm "Result") (just $ var "a")
-            [(nm "ok", var "b"),
-             (nm "err", int32 0)])))
-        (var "f")),
-
-    hoistCaseStatementsCase "case as LHS of one application is NOT hoisted"
-      -- Input: let f = (match Optional with ...) x in f
-      -- The case is LHS of one application - still at top level (one app LHS allowed)
-      -- This is match taking its single argument
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (var "x"))
-        (var "f"))
-      -- Output: unchanged - case is at top level (one application LHS)
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (var "x"))
-        (var "f")),
-
-    hoistCaseStatementsCase "case wrapped in annotation is NOT hoisted"
-      -- Input: let f = @ann (match Optional with ...) in f
-      -- The case is wrapped in annotation - annotations are transparent
-      (letExpr "f"
-        (annot emptyAnnMap
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (var "f"))
-      -- Output: unchanged - case is at top level (through annotation)
-      (letExpr "f"
-        (annot emptyAnnMap
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in lambda with one application is NOT hoisted"
-      -- Input: let f = \a -> (match Optional with ...) a in f
-      -- Lambda body + one application LHS = still at top level
-      (letExpr "f"
-        (lambda "a"
-          (apply
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (var "a")))
-        (var "f"))
-      -- Output: unchanged - case is at top level
-      (letExpr "f"
-        (lambda "a"
-          (apply
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (var "a")))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Case statement NOT at top level - SHOULD be hoisted
-    -- ============================================================
-
-    hoistCaseStatementsCase "case as RHS of application IS hoisted"
-      -- Input: let f = g (match Optional with ...) in f
-      -- The case is RHS of application (argument position) - NOT top level
-      (letExpr "f"
-        (apply (var "g")
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (apply (var "g") (var "_hoist_f_1")))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in nested application LHS IS hoisted"
-      -- Input: let f = ((match Optional with ...) x) y in f
-      -- The case is LHS of LHS of application - only ONE app LHS allowed
-      -- The second application takes us out of top level
-      (letExpr "f"
-        (apply
-          (apply
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "z" (lambda "w" (var "z"))),
-               (nm "nothing", lambda "w" (int32 0))])
-            (var "x"))
-          (var "y"))
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "z" (lambda "w" (var "z"))),
-             (nm "nothing", lambda "w" (int32 0))])
-          (apply (apply (var "_hoist_f_1") (var "x")) (var "y")))
-        (var "f")),
-
-    hoistCaseStatementsCase "case inside list element IS hoisted"
-      -- Input: let f = [match Optional with ...] in f
-      -- The case is inside a list element - NOT top level
-      (letExpr "f"
-        (list [match (nm "Optional") nothing
-          [(nm "just", lambda "y" (var "y")),
-           (nm "nothing", int32 0)]])
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (list [var "_hoist_f_1"]))
-        (var "f")),
-
-    hoistCaseStatementsCase "case inside lambda inside list IS hoisted"
-      -- Input: let f = [\a -> match a with ...] in f
-      -- Even though case is inside lambda, the lambda itself is inside a list
-      -- The list position makes it not top level
-      (letExpr "f"
-        (list [lambda "a"
-          (match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])])
-        (var "f"))
-      -- Output: case is hoisted with 'a' captured
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (lambda "a"
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)]))
-          (list [lambda "a" (apply (var "_hoist_f_1") (var "a"))]))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Non-case terms - should NOT be hoisted regardless
-    -- ============================================================
-
-    hoistCaseStatementsCase "list inside lambda is NOT hoisted (only case statements)"
-      -- Input: let f = \a -> [a, 1, 2] in f 0
-      -- The list is not at top level, but hoistCaseStatements only hoists cases
-      (letExpr "f"
-        (lambda "a" (list [var "a", int32 1, int32 2]))
-        (apply (var "f") (int32 0)))
-      -- Output: unchanged - only case statements are hoisted
-      (letExpr "f"
-        (lambda "a" (list [var "a", int32 1, int32 2]))
-        (apply (var "f") (int32 0))),
-
-    -- ============================================================
-    -- Test: Mixed scenarios
-    -- ============================================================
-
-    hoistCaseStatementsCase "case in binding is not hoisted, case in arg position is hoisted"
-      -- Input: let x = match a with ... in f (match b with ...)
-      -- First case is at top level of binding, second is in argument position
-      (letExpr "x"
-        (match (nm "Optional") (just $ var "a")
-          [(nm "just", lambda "z" (var "z")),
-           (nm "nothing", int32 0)])
-        (apply (var "f")
-          (match (nm "Optional") (just $ var "b")
-            [(nm "just", lambda "w" (var "w")),
-             (nm "nothing", int32 0)])))
-      -- Output: only second case is hoisted
-      (letExpr "x"
-        (match (nm "Optional") (just $ var "a")
-          [(nm "just", lambda "z" (var "z")),
-           (nm "nothing", int32 0)])
-        (letExpr "_hoist_x_body_1"
-          (match (nm "Optional") (just $ var "b")
-            [(nm "just", lambda "w" (var "w")),
-             (nm "nothing", int32 0)])
-          (apply (var "f") (var "_hoist_x_body_1")))),
-
-    -- ============================================================
-    -- Test: Mixed let and lambda at top level (no hoisting needed)
-    -- ============================================================
-
-    hoistCaseStatementsCase "case in nested let body is NOT hoisted"
-      -- Input: let x = 1 in let y = 2 in match z with ...
-      -- The case is in nested let body - still at top level
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (match (nm "Optional") (just $ var "z")
-            [(nm "just", lambda "w" (var "w")),
-             (nm "nothing", int32 0)])))
-      -- Output: unchanged
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (match (nm "Optional") (just $ var "z")
-            [(nm "just", lambda "w" (var "w")),
-             (nm "nothing", int32 0)]))),
-
-    hoistCaseStatementsCase "case in let inside lambda is NOT hoisted"
-      -- Input: let f = \a -> let x = 1 in match a with ...
-      -- Lambda body then let body - both pass through
-      (letExpr "f"
-        (lambda "a"
-          (letExpr "x" (int32 1)
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])))
-        (var "f"))
-      -- Output: unchanged
-      (letExpr "f"
-        (lambda "a"
-          (letExpr "x" (int32 1)
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in lambda inside let body is NOT hoisted"
-      -- Input: let x = 1 in \a -> match a with ...
-      -- Let body then lambda body - both pass through
-      (letExpr "x" (int32 1)
-        (lambda "a"
-          (match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])))
-      -- Output: unchanged
-      (letExpr "x" (int32 1)
-        (lambda "a"
-          (match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))),
-
-    hoistCaseStatementsCase "case with let+lambda+app is NOT hoisted"
-      -- Input: let f = \a -> let x = 1 in (match a with ...) x
-      -- Lambda body, let body, one app LHS - all pass through
-      (letExpr "f"
-        (lambda "a"
-          (letExpr "x" (int32 1)
-            (apply
-              (match (nm "Optional") nothing
-                [(nm "just", lambda "y" (var "y")),
-                 (nm "nothing", int32 0)])
-              (var "x"))))
-        (var "f"))
-      -- Output: unchanged
-      (letExpr "f"
-        (lambda "a"
-          (letExpr "x" (int32 1)
-            (apply
-              (match (nm "Optional") nothing
-                [(nm "just", lambda "y" (var "y")),
-                 (nm "nothing", int32 0)])
-              (var "x"))))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Multiple applications (hoisting required)
-    -- ============================================================
-
-    hoistCaseStatementsCase "case in triple application LHS IS hoisted"
-      -- Input: let f = (((match ...) x) y) z in f
-      -- Three nested applications - only one app LHS allowed
-      (letExpr "f"
-        (apply
-          (apply
-            (apply
-              (match (nm "Optional") nothing
-                [(nm "just", lambda "a" (lambda "b" (lambda "c" (var "a")))),
-                 (nm "nothing", lambda "b" (lambda "c" (int32 0)))])
-              (var "x"))
-            (var "y"))
-          (var "z"))
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "a" (lambda "b" (lambda "c" (var "a")))),
-             (nm "nothing", lambda "b" (lambda "c" (int32 0)))])
-          (apply (apply (apply (var "_hoist_f_1") (var "x")) (var "y")) (var "z")))
-        (var "f")),
-
-    hoistCaseStatementsCase "case as second argument IS hoisted"
-      -- Input: let f = g x (match ...) in f
-      -- Case is RHS of second application
-      (letExpr "f"
-        (apply (apply (var "g") (var "x"))
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (apply (apply (var "g") (var "x")) (var "_hoist_f_1")))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in both arguments - both hoisted"
-      -- Input: let f = g (match a ...) (match b ...) in f
-      -- Both cases are in argument positions
-      (letExpr "f"
-        (apply
-          (apply (var "g")
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "x" (var "x")),
-               (nm "nothing", int32 0)]))
-          (match (nm "Optional") (just $ var "b")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 1)]))
-        (var "f"))
-      -- Output: both cases hoisted into a SINGLE let with two bindings
-      -- (hoistSubterms collects all hoistable terms from one subterm into one let)
-      (letExpr "f"
-        (lets
-          [(nm "_hoist_f_1",
-            match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "x" (var "x")),
-               (nm "nothing", int32 0)]),
-           (nm "_hoist_f_2",
-            match (nm "Optional") (just $ var "b")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 1)])]
-          (apply (apply (var "g") (var "_hoist_f_1")) (var "_hoist_f_2")))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Descent into various structures (hoisting required)
-    -- ============================================================
-
-    hoistCaseStatementsCase "case in second list element IS hoisted"
-      -- Input: let f = [1, match ...] in f
-      (letExpr "f"
-        (list [int32 1,
-          match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]])
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (list [int32 1, var "_hoist_f_1"]))
-        (var "f")),
-
-    hoistCaseStatementsCase "multiple cases in list - all hoisted"
-      -- Input: let f = [match a ..., match b ...] in f
-      (letExpr "f"
-        (list [
-          match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "x" (var "x")),
-             (nm "nothing", int32 0)],
-          match (nm "Optional") (just $ var "b")
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 1)]])
-        (var "f"))
-      -- Output: both cases hoisted into a SINGLE let with two bindings
-      (letExpr "f"
-        (lets
-          [(nm "_hoist_f_1",
-            match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "x" (var "x")),
-               (nm "nothing", int32 0)]),
-           (nm "_hoist_f_2",
-            match (nm "Optional") (just $ var "b")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 1)])]
-          (list [var "_hoist_f_1", var "_hoist_f_2"]))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in pair first element IS hoisted"
-      -- Input: let f = (match ..., 1) in f
-      (letExpr "f"
-        (pair
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (int32 1))
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (pair (var "_hoist_f_1") (int32 1)))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in pair second element IS hoisted"
-      -- Input: let f = (1, match ...) in f
-      (letExpr "f"
-        (pair
-          (int32 1)
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)]))
-        (var "f"))
-      -- Output: case is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (pair (int32 1) (var "_hoist_f_1")))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Nested let terms - case hoisted into CHILD let, not parent
-    -- This is critical: hoisting is local to immediate subterms
-    -- ============================================================
-
-    hoistCaseStatementsCase "case in child let binding hoisted into child"
-      -- Input: let outer = (let inner = g (match ...) in inner) in outer
-      -- The case is in the binding of inner let, inside argument position
-      -- It should be hoisted into the inner let, not the outer
-      (letExpr "outer"
-        (letExpr "inner"
-          (apply (var "g")
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)]))
-          (var "inner"))
-        (var "outer"))
-      -- Output: case hoisted into inner let's binding
-      (letExpr "outer"
-        (letExpr "inner"
-          (letExpr "_hoist_inner_1"
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (apply (var "g") (var "_hoist_inner_1")))
-          (var "inner"))
-        (var "outer")),
-
-    hoistCaseStatementsCase "case in child let body hoisted into child"
-      -- Input: let outer = (let inner = 1 in g (match ...)) in outer
-      -- The case is in the body of inner let, inside argument position
-      -- It should be hoisted into the inner let's body, not the outer
-      (letExpr "outer"
-        (letExpr "inner" (int32 1)
-          (apply (var "g")
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])))
-        (var "outer"))
-      -- Output: case hoisted into inner let's body
-      (letExpr "outer"
-        (letExpr "inner" (int32 1)
-          (letExpr "_hoist_inner_body_1"
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (apply (var "g") (var "_hoist_inner_body_1"))))
-        (var "outer")),
-
-    hoistCaseStatementsCase "case at top level of child let NOT hoisted"
-      -- Input: let outer = (let inner = match ... in inner) in outer
-      -- The case is at top level of inner let's binding - no hoisting needed
-      (letExpr "outer"
-        (letExpr "inner"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (var "inner"))
-        (var "outer"))
-      -- Output: unchanged
-      (letExpr "outer"
-        (letExpr "inner"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (var "inner"))
-        (var "outer")),
-
-    hoistCaseStatementsCase "cases in both outer and child - each hoisted locally"
-      -- Input: let outer = f (match a ...) (let inner = g (match b ...) in inner) in outer
-      -- First case in outer's body (arg position), second in inner's binding (arg position)
-      -- Each should be hoisted into its respective scope
-      -- Each binding uses its name as prefix: inner gets _hoist_inner_1, outer gets _hoist_outer_1
-      (letExpr "outer"
-        (apply
-          (apply (var "f")
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "x" (var "x")),
-               (nm "nothing", int32 0)]))
-          (letExpr "inner"
-            (apply (var "g")
-              (match (nm "Optional") (just $ var "b")
-                [(nm "just", lambda "y" (var "y")),
-                 (nm "nothing", int32 1)]))
-            (var "inner")))
-        (var "outer"))
-      -- Output: outer binding gets _hoist_outer_1, inner binding gets _hoist_inner_1
-      (letExpr "outer"
-        (letExpr "_hoist_outer_1"
-          (match (nm "Optional") (just $ var "a")
-            [(nm "just", lambda "x" (var "x")),
-             (nm "nothing", int32 0)])
-          (apply
-            (apply (var "f") (var "_hoist_outer_1"))
-            (letExpr "inner"
-              (letExpr "_hoist_inner_1"
-                (match (nm "Optional") (just $ var "b")
-                  [(nm "just", lambda "y" (var "y")),
-                   (nm "nothing", int32 1)])
-                (apply (var "g") (var "_hoist_inner_1")))
-              (var "inner"))))
-        (var "outer")),
-
-    -- ============================================================
-    -- Test: Lambda after app LHS - should trigger hoisting
-    -- ============================================================
-
-    hoistCaseStatementsCase "lambda after app LHS takes us out of top level"
-      -- Input: let f = ((\a -> match a with ...) x) in f
-      -- App LHS then lambda body - after using app, lambda doesn't help
-      (letExpr "f"
-        (apply
-          (lambda "a"
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)]))
-          (var "x"))
-        (var "f"))
-      -- Output: case is hoisted because lambda comes after we've used our one app LHS
-      -- Path to case: letBinding, applicationFunction, lambdaBody
-      -- Processing: letBinding (pass), applicationFunction (use app, mark usedApp=true), lambdaBody (usedApp=true, fail)
-      -- So case IS hoisted. The case uses 'a' which is lambda-bound, so it's wrapped in a lambda
-      -- and the reference becomes (_hoist_f_1 a)
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          -- The hoisted case is wrapped in a lambda to capture 'a'
-          (lambda "a"
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)]))
-          -- The original lambda body is replaced with (_hoist_f_1 a)
-          (apply
-            (lambda "a" (apply (var "_hoist_f_1") (var "a")))
-            (var "x")))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Case statements inside case branches (nested cases)
-    -- Case branches bind variables, so they are like lambda bodies
-    -- ============================================================
-
-    hoistCaseStatementsCase "case inside case branch is NOT hoisted"
-      -- Input: let f = match x with just a -> match a with ... | nothing -> 0 in f
-      -- Inner case is inside a case branch - branches are pass-through like lambdas
-      (letExpr "f"
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "a"
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "b" (var "b")),
-               (nm "nothing", int32 0)])),
-           (nm "nothing", int32 0)])
-        (var "f"))
-      -- Output: unchanged - inner case is at top level (through case branch)
-      (letExpr "f"
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "a"
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "b" (var "b")),
-               (nm "nothing", int32 0)])),
-           (nm "nothing", int32 0)])
-        (var "f")),
-
-    hoistCaseStatementsCase "case inside case default branch is NOT hoisted"
-      -- Input: let f = match x with just a -> a | nothing -> match y with ... in f
-      -- Inner case is in default branch - still pass-through
-      (letExpr "f"
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "a" (var "a")),
-           (nm "nothing",
-            match (nm "Optional") (just $ var "y")
-              [(nm "just", lambda "b" (var "b")),
-               (nm "nothing", int32 0)])])
-        (var "f"))
-      -- Output: unchanged - inner case is at top level (through case default)
-      (letExpr "f"
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "a" (var "a")),
-           (nm "nothing",
-            match (nm "Optional") (just $ var "y")
-              [(nm "just", lambda "b" (var "b")),
-               (nm "nothing", int32 0)])])
-        (var "f")),
-
-    hoistCaseStatementsCase "case in arg position inside case branch IS hoisted"
-      -- Input: let f = match x with just a -> g (match a with ...) | nothing -> 0 in f
-      -- Inner case is in argument position inside a case branch - should be hoisted
-      (letExpr "f"
-        (match (nm "Optional") (just $ var "x")
-          [(nm "just", lambda "a"
-            (apply (var "g")
-              (match (nm "Optional") (just $ var "a")
-                [(nm "just", lambda "b" (var "b")),
-                 (nm "nothing", int32 0)]))),
-           (nm "nothing", int32 0)])
-        (var "f"))
-      -- Output: inner case is hoisted to the OUTER let level (not inside the branch)
-      -- because hoistSubterms only creates lets at existing let boundaries.
-      -- The inner case uses 'a' which is lambda-bound, so it's wrapped in a lambda
-      -- and the reference becomes (_hoist_f_1 a)
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          -- The inner case wrapped in a lambda to capture 'a'
-          (lambda "a"
-            (match (nm "Optional") (just $ var "a")
-              [(nm "just", lambda "b" (var "b")),
-               (nm "nothing", int32 0)]))
-          -- The outer case with the reference (_hoist_f_1 a) inside the branch
-          (match (nm "Optional") (just $ var "x")
-            [(nm "just", lambda "a"
-              (apply (var "g") (apply (var "_hoist_f_1") (var "a")))),
-             (nm "nothing", int32 0)]))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Case inside case default with let binding
-    -- This is the pattern from isSimpleAssignment in Analysis:
-    -- match term with
-    --   specific_case -> ...
-    --   _ -> let baseTerm = f(term) in match baseTerm with ...
-    -- The inner case in the default branch's let body must be hoisted
-    -- because Python can't encode match statements inline in case branches
-    -- ============================================================
-
-    hoistCaseStatementsCase "case in let body inside applied case default IS hoisted"
-      -- Input: let f = (case x of just a -> a | _ -> let b = g(x) in (case b of ...)(b)) x
-      -- The outer case is applied (through `cases`/`apply`), putting default branch
-      -- at non-top-level. Inner applied case in default > let body must be hoisted.
-      -- This is the pattern from isSimpleAssignment in Analysis.
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "a" (var "a")),
-             (nm "nothing",
-              letExpr "b" (apply (var "g") (var "x"))
-                (apply
-                  (match (nm "Result") nothing
-                    [(nm "ok", lambda "y" (var "y")),
-                     (nm "err", int32 0)])
-                  (var "b")))])
-          (var "x"))
-        (var "f"))
-      -- Output: inner applied case is hoisted within the inner let (preserving let-bound variable scoping)
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "a" (var "a")),
-             (nm "nothing",
-              letExpr "b" (apply (var "g") (var "x"))
-                (letExpr "_hoist_b_body_1"
-                  (match (nm "Result") nothing
-                    [(nm "ok", lambda "y" (var "y")),
-                     (nm "err", int32 0)])
-                  (apply (var "_hoist_b_body_1") (var "b"))))])
-          (var "x"))
-        (var "f")),
-
-    hoistCaseStatementsCase "case in let body inside applied case branch IS hoisted"
-      -- Input: let f = (case x of just a -> let b = h(a) in (case b of ...)(b) | nothing -> 0) x
-      -- Like above but inner case is in a named branch rather than default.
-      -- 'a' IS lambda-bound (from the case branch), so it IS captured.
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "a"
-              (letExpr "b" (apply (var "h") (var "a"))
-                (apply
-                  (match (nm "Result") nothing
-                    [(nm "ok", lambda "y" (var "y")),
-                     (nm "err", int32 0)])
-                  (var "b")))),
-             (nm "nothing", int32 0)])
-          (var "x"))
-        (var "f"))
-      -- Output: inner case is hoisted within the inner let (preserving let-bound variable scoping)
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "a"
-              (letExpr "b" (apply (var "h") (var "a"))
-                (letExpr "_hoist_b_body_1"
-                  (match (nm "Result") nothing
-                    [(nm "ok", lambda "y" (var "y")),
-                     (nm "err", int32 0)])
-                  (apply (var "_hoist_b_body_1") (var "b"))))),
-             (nm "nothing", int32 0)])
-          (var "x"))
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Case applications (case function applied to argument)
-    -- ============================================================
-
-    hoistCaseStatementsCase "case application at top level of binding is NOT hoisted"
-      -- Input: let f = (match Optional with ...) x in f
-      -- The case application is at top level (one app LHS)
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (var "x"))
-        (var "f"))
-      -- Output: unchanged
-      (letExpr "f"
-        (apply
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (var "x"))
-        (var "f")),
-
-    hoistCaseStatementsCase "case application in arg position IS hoisted"
-      -- Input: let f = g ((match Optional with ...) x) in f
-      -- The bare case function is hoisted first (bottom-up), then the application
-      -- uses the hoisted reference. 'x' is not lambda-bound so not captured.
-      (letExpr "f"
-        (apply (var "g")
-          (apply
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (var "x")))
-        (var "f"))
-      -- Output: bare case function is hoisted, application becomes _hoist_f_1(x)
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (apply (var "g") (apply (var "_hoist_f_1") (var "x"))))
-        (var "f")),
-
-    hoistCaseStatementsCase "case application inside immediately-applied lambda IS hoisted"
-      -- Input: let f = (\a -> (match Optional with ...) a) x in f
-      -- The bare case function is inside \a -> (case ...) a. Bottom-up processing:
-      -- The bare case function at path [LetBinding f, ApplicationFunction, LambdaBody, ApplicationFunction]
-      -- gets hoisted. No captured variables (case function has no free vars).
-      (letExpr "f"
-        (apply
-          (lambda "a"
-            (apply
-              (match (nm "Optional") nothing
-                [(nm "just", lambda "y" (var "y")),
-                 (nm "nothing", int32 0)])
-              (var "a")))
-          (var "x"))
-        (var "f"))
-      -- Output: bare case function is hoisted
-      (letExpr "f"
-        (letExpr "_hoist_f_1"
-          (match (nm "Optional") nothing
-            [(nm "just", lambda "y" (var "y")),
-             (nm "nothing", int32 0)])
-          (apply
-            (lambda "a" (apply (var "_hoist_f_1") (var "a")))
-            (var "x")))
-        (var "f")),
-
-    hoistCaseStatementsCase "case application in lambda body is NOT hoisted"
-      -- Input: let f = \a -> (match Optional with ...) a in f
-      -- Lambda body + one app LHS = still at top level
-      (letExpr "f"
-        (lambda "a"
-          (apply
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (var "a")))
-        (var "f"))
-      -- Output: unchanged
-      (letExpr "f"
-        (lambda "a"
-          (apply
-            (match (nm "Optional") nothing
-              [(nm "just", lambda "y" (var "y")),
-               (nm "nothing", int32 0)])
-            (var "a")))
-        (var "f"))]
diff --git a/src/main/haskell/Hydra/Sources/Test/Hoisting/Let.hs b/src/main/haskell/Hydra/Sources/Test/Hoisting/Let.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Hoisting/Let.hs
+++ /dev/null
@@ -1,971 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for let-binding hoisting transformations
-
-module Hydra.Sources.Test.Hoisting.Let where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Hoisting as HoistingModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.hoisting.let"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, HoistingModule.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for let-binding hoisting transformations"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for let-binding hoisting transformations" $
-    supergroup "hoistLet" [
-      hoistLetBindingsGroup,
-      hoistPolymorphicLetBindingsGroup,
-      hoistPolymorphicTypeParametersGroup]
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- | Show a Let as a string using ShowCore.let_
-showLet :: TTerm Let -> TTerm String
-showLet l = ShowCore.let_ # l
-
--- | Local universal version of hoistLetBindingsCase (hoistAll=True)
-hoistLetBindingsCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
-hoistLetBindingsCase cname input output = universalCase cname
-  (showLet (HoistingModule.hoistAllLetBindings # input))
-  (showLet output)
-
--- | Local universal version of hoistPolymorphicLetBindingsCase
-hoistPolymorphicLetBindingsCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
-hoistPolymorphicLetBindingsCase cname input output = universalCase cname
-  (showLet (HoistingModule.hoistPolymorphicLetBindings # Phantoms.lambda "b" (Phantoms.boolean True) # input))
-  (showLet output)
-
--- Helper for single-binding let
-letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letExpr varName value body = lets [(nm varName, value)] body
-
--- Helper for multi-binding let
-multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
-multiLet bindings body = lets ((\(n, v) -> (nm n, v)) <$> bindings) body
-
--- | Convenience function for creating hoist let bindings test cases (hoistAll=True)
-hoistAllCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
-hoistAllCase cname input output = hoistLetBindingsCase cname input output
-
--- | Helper for creating a Let term with typed bindings
-mkLet :: [(TTerm Name, TTerm Term, TTerm (Maybe TypeScheme))] -> TTerm Term -> TTerm Let
-mkLet bindings body = Core.let_ (Phantoms.list $ mkBinding <$> bindings) body
-  where
-    mkBinding :: (TTerm Name, TTerm Term, TTerm (Maybe TypeScheme)) -> TTerm Binding
-    mkBinding (n, t, ts) = Core.binding n t ts
-
--- | Helper for creating a Let term with untyped bindings
-mkLetUntyped :: [(TTerm Name, TTerm Term)] -> TTerm Term -> TTerm Let
-mkLetUntyped bindings body = Core.let_ (Phantoms.list $ mkBinding <$> bindings) body
-  where
-    mkBinding :: (TTerm Name, TTerm Term) -> TTerm Binding
-    mkBinding (n, t) = Core.binding n t Phantoms.nothing
-
--- | Helper for creating a monomorphic type scheme
-monoType :: TTerm Type -> TTerm (Maybe TypeScheme)
-monoType typ = Phantoms.just $ Core.typeScheme (Phantoms.list ([] :: [TTerm Name])) typ Phantoms.nothing
-
--- | Helper for creating a polymorphic type scheme
-polyType :: [String] -> TTerm Type -> TTerm (Maybe TypeScheme)
-polyType vars typ = Phantoms.just $ Core.typeScheme (Phantoms.list $ nm <$> vars) typ Phantoms.nothing
-
--- | Convenience function for creating hoist polymorphic let bindings test cases
-hoistPolyCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
-hoistPolyCase cname input output = hoistPolymorphicLetBindingsCase cname input output
-
--- | Test cases for hoistPolymorphicLetBindings
--- This function hoists polymorphic let bindings (those with non-empty type scheme variables)
--- to the top level of the given let term.
-hoistPolymorphicLetBindingsGroup :: TTerm TestGroup
-hoistPolymorphicLetBindingsGroup = subgroup "hoistPolymorphicLetBindings" [
-    -- ============================================================
-    -- Test: No polymorphic bindings - unchanged
-    -- ============================================================
-
-    hoistPolyCase "no polymorphic bindings: simple let unchanged"
-      -- Input: let x : Int32 = 42 in x
-      (mkLet [(nm "x", int32 42, monoType T.int32)] (var "x"))
-      -- Output: unchanged
-      (mkLet [(nm "x", int32 42, monoType T.int32)] (var "x")),
-
-    hoistPolyCase "no polymorphic bindings: multiple monomorphic bindings"
-      -- Input: let x : Int32 = 1; y : String = "hi" in pair x y
-      (mkLet [
-        (nm "x", int32 1, monoType T.int32),
-        (nm "y", string "hi", monoType T.string)]
-        (apply (apply (var "pair") (var "x")) (var "y")))
-      -- Output: unchanged
-      (mkLet [
-        (nm "x", int32 1, monoType T.int32),
-        (nm "y", string "hi", monoType T.string)]
-        (apply (apply (var "pair") (var "x")) (var "y"))),
-
-    -- ============================================================
-    -- Test: Single polymorphic binding at top level - stays in place
-    -- ============================================================
-
-    hoistPolyCase "single polymorphic binding: already at top level"
-      -- Input: let id : forall a. a -> a = \x -> x in id 42
-      (mkLet [(nm "id", lambda "x" (var "x"), polyType ["a"] (T.function (T.var "a") (T.var "a")))]
-        (apply (var "id") (int32 42)))
-      -- Output: unchanged (already at top)
-      (mkLet [(nm "id", lambda "x" (var "x"), polyType ["a"] (T.function (T.var "a") (T.var "a")))]
-        (apply (var "id") (int32 42))),
-
-    -- ============================================================
-    -- Test: Polymorphic binding inside lambda body
-    -- ============================================================
-
-    hoistPolyCase "polymorphic binding inside lambda: no capture"
-      -- Input: let f = \a -> (let id : forall b. b -> b = \x -> x in id a) in f 42
-      -- Here 'id' does not reference 'a', so it can be hoisted directly
-      (mkLet [(nm "f",
-        lambda "a" (Core.termLet $ mkLet [(nm "id", lambda "x" (var "x"), polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-          (apply (var "id") (var "a"))),
-        monoType (T.function T.int32 T.int32))]
-        (apply (var "f") (int32 42)))
-      -- Output: f comes first (original binding), then f_id is hoisted (no wrapping needed)
-      (mkLet [
-        (nm "f",
-          lambda "a" (apply (var "f_id") (var "a")),
-          monoType (T.function T.int32 T.int32)),
-        (nm "f_id", tylam "b" (lambda "x" (var "x")), polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-        (apply (var "f") (int32 42))),
-
-    -- ============================================================
-    -- Test: Polymorphic binding captures lambda variable - requires wrapping
-    -- ============================================================
-
-    hoistPolyCase "polymorphic binding captures lambda variable: wrapped in lambda"
-      -- Input: let f = \(a:String) -> (let g : forall b. b -> Pair<String, b> = \x -> pair a x in g 42) in f "hello"
-      -- Here 'g' references 'a' (the enclosing lambda's variable), so when hoisted,
-      -- it must be wrapped in a lambda that takes 'a', and the reference replaced with an application
-      (mkLet [(nm "f",
-        lambdaTyped "a" T.string (Core.termLet $ mkLet [
-          (nm "g", lambda "x" (apply (apply (var "pair") (var "a")) (var "x")),
-            polyType ["b"] (T.function (T.var "b") (T.pair T.string (T.var "b"))))]
-          (apply (var "g") (int32 42))),
-        monoType (T.function T.string (T.pair T.string T.int32)))]
-        (apply (var "f") (string "hello")))
-      -- Output: f comes first (original binding), then f_g is hoisted wrapped in \(a:String) -> ..., and reference becomes (f_g a)
-      (mkLet [
-        (nm "f",
-          lambdaTyped "a" T.string (apply (apply (var "f_g") (var "a")) (int32 42)),
-          monoType (T.function T.string (T.pair T.string T.int32))),
-        (nm "f_g", tylam "b" (lambdaTyped "a" T.string (lambda "x" (apply (apply (var "pair") (var "a")) (var "x")))),
-          polyType ["b"] (T.function T.string (T.function (T.var "b") (T.pair T.string (T.var "b")))))]
-        (apply (var "f") (string "hello"))),
-
-    hoistPolyCase "polymorphic binding captures multiple lambda variables"
-      -- Input: let f = \(a:Int32) -> \(b:Int32) -> (let g : forall c. c -> c = \x -> triple a b x in g 42) in f 1 2
-      -- Here 'g' references both 'a' and 'b', so it needs to be wrapped with both
-      (mkLet [(nm "f",
-        lambdaTyped "a" T.int32 (lambdaTyped "b" T.int32 (Core.termLet $ mkLet [
-          (nm "g", lambda "x" (apply (apply (apply (var "triple") (var "a")) (var "b")) (var "x")),
-            polyType ["c"] (T.function (T.var "c") (T.var "c")))]
-          (apply (var "g") (int32 42)))),
-        monoType (T.function T.int32 (T.function T.int32 T.int32)))]
-        (apply (apply (var "f") (int32 1)) (int32 2)))
-      -- Output: f comes first (original binding), then f_g is wrapped in \(a:Int32) -> \(b:Int32) -> ..., references become ((f_g a) b)
-      (mkLet [
-        (nm "f",
-          lambdaTyped "a" T.int32 (lambdaTyped "b" T.int32 (apply (apply (apply (var "f_g") (var "a")) (var "b")) (int32 42))),
-          monoType (T.function T.int32 (T.function T.int32 T.int32))),
-        (nm "f_g", tylam "c" (lambdaTyped "a" T.int32 (lambdaTyped "b" T.int32 (lambda "x" (apply (apply (apply (var "triple") (var "a")) (var "b")) (var "x"))))),
-          polyType ["c"] (T.function T.int32 (T.function T.int32 (T.function (T.var "c") (T.var "c")))))]
-        (apply (apply (var "f") (int32 1)) (int32 2))),
-
-    hoistPolyCase "polymorphic binding captures some but not all lambda variables"
-      -- Input: let f = \(a:Int32) -> \(b:Int32) -> (let g : forall c. c -> Pair<Int32, c> = \x -> pair a x in g b) in f 1 2
-      -- Here 'g' only references 'a', not 'b'
-      (mkLet [(nm "f",
-        lambdaTyped "a" T.int32 (lambdaTyped "b" T.int32 (Core.termLet $ mkLet [
-          (nm "g", lambda "x" (apply (apply (var "pair") (var "a")) (var "x")),
-            polyType ["c"] (T.function (T.var "c") (T.pair T.int32 (T.var "c"))))]
-          (apply (var "g") (var "b")))),
-        monoType (T.function T.int32 (T.function T.int32 (T.pair T.int32 T.int32))))]
-        (apply (apply (var "f") (int32 1)) (int32 2)))
-      -- Output: f comes first (original binding), then f_g is wrapped only in \(a:Int32) -> ..., reference becomes (f_g a)
-      (mkLet [
-        (nm "f",
-          lambdaTyped "a" T.int32 (lambdaTyped "b" T.int32 (apply (apply (var "f_g") (var "a")) (var "b"))),
-          monoType (T.function T.int32 (T.function T.int32 (T.pair T.int32 T.int32)))),
-        (nm "f_g", tylam "c" (lambdaTyped "a" T.int32 (lambda "x" (apply (apply (var "pair") (var "a")) (var "x")))),
-          polyType ["c"] (T.function T.int32 (T.function (T.var "c") (T.pair T.int32 (T.var "c")))))]
-        (apply (apply (var "f") (int32 1)) (int32 2))),
-
-    hoistPolyCase "polymorphic binding captures both lambda-bound and let-bound variables"
-      -- Input: let f = \(a:Int32) -> (let x : Int32 = 1; g : forall b. b -> b = \y -> add (add a x) y in g 42) in f 10
-      -- Here 'g' references 'a' (lambda-bound from enclosing scope) and 'x' (let-bound sibling).
-      -- When g is hoisted to the top level, it goes OUTSIDE the inner let block, so it must capture
-      -- both 'a' (from the enclosing lambda) AND 'x' (which is no longer a sibling after hoisting).
-      (mkLet [(nm "f",
-        lambdaTyped "a" T.int32 (Core.termLet $ mkLet [
-          (nm "x", int32 1, monoType T.int32),
-          (nm "g", lambda "y" (apply (apply (primitive _math_add)
-                    (apply (apply (primitive _math_add) (var "a")) (var "x"))) (var "y")),
-            polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-          (apply (var "g") (int32 42))),
-        monoType (T.function T.int32 T.int32))]
-        (apply (var "f") (int32 10)))
-      -- Output: f comes first (original binding), then f_g captures both 'a' and 'x', reference becomes ((f_g a) x)
-      (mkLet [
-        (nm "f",
-          lambdaTyped "a" T.int32 (Core.termLet $ mkLet [
-            (nm "x", int32 1, monoType T.int32)]
-            (apply (apply (apply (var "f_g") (var "a")) (var "x")) (int32 42))),
-          monoType (T.function T.int32 T.int32)),
-        (nm "f_g", tylam "b" (lambdaTyped "a" T.int32 (lambdaTyped "x" T.int32
-          (lambda "y" (apply (apply (primitive _math_add)
-            (apply (apply (primitive _math_add) (var "a")) (var "x"))) (var "y"))))),
-          polyType ["b"] (T.function T.int32 (T.function T.int32 (T.function (T.var "b") (T.var "b")))))]
-        (apply (var "f") (int32 10))),
-
-    hoistPolyCase "sibling polymorphic bindings inside lambda: one calls the other"
-      -- Input: let wrapper = \outer : Int32 -> let g : forall a. a -> a = \y -> add outer y; h : forall b. b -> b = \z -> g z in h 42 in wrapper 10
-      -- This mimics the structure in unifyTypeConstraints where bind and tryBinding are
-      -- both inside withConstraint lambda and one calls the other.
-      -- g captures 'outer', h calls g which means h must transitively capture 'outer'
-      (mkLet [(nm "wrapper",
-        lambdaTyped "outer" T.int32 (Core.termLet $ mkLet [
-          (nm "g", lambda "y" (apply (apply (primitive _math_add) (var "outer")) (var "y")),
-            polyType ["a"] (T.function (T.var "a") (T.var "a"))),
-          (nm "h", lambda "z" (apply (var "g") (var "z")),
-            polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-          (apply (var "h") (int32 42))),
-        monoType (T.function T.int32 T.int32))]
-        (apply (var "wrapper") (int32 10)))
-      -- Output: wrapper first (original), then wrapper_g and wrapper_h hoisted (both capture outer)
-      -- wrapper_g is wrapped: \outer -> \y -> add outer y
-      -- wrapper_h is wrapped: \outer -> \z -> (wrapper_g outer) z
-      -- The reference to wrapper_g inside wrapper_h becomes (wrapper_g outer)
-      (mkLet [
-        (nm "wrapper",
-          lambdaTyped "outer" T.int32 (apply (apply (var "wrapper_h") (var "outer")) (int32 42)),
-          monoType (T.function T.int32 T.int32)),
-        (nm "wrapper_g", tylam "a" (lambdaTyped "outer" T.int32 (lambda "y" (apply (apply (primitive _math_add) (var "outer")) (var "y")))),
-          polyType ["a"] (T.function T.int32 (T.function (T.var "a") (T.var "a")))),
-        (nm "wrapper_h", tylam "b" (lambdaTyped "outer" T.int32 (lambda "z" (apply (apply (var "wrapper_g") (var "outer")) (var "z")))),
-          polyType ["b"] (T.function T.int32 (T.function (T.var "b") (T.var "b"))))]
-        (apply (var "wrapper") (int32 10))),
-
-    hoistPolyCase "sibling polymorphic bindings inside lambda: h passes its own args to g"
-      -- Input: let wrapper = \outer -> let g : forall a. a -> a = \v -> \t -> add outer (add v t);
-      --                                    h : forall b. b -> b = \v -> \t -> g v t
-      --                                in h 1 2
-      --        in wrapper 10
-      -- Here h calls g with its own args v and t. After hoisting:
-      -- g becomes \outer -> \v -> \t -> add outer (add v t)
-      -- h becomes \outer -> \v -> \t -> ((g outer) v) t
-      -- The reference to g in h should NOT duplicate outer, v, or t
-      (mkLet [(nm "wrapper",
-        lambdaTyped "outer" T.int32 (Core.termLet $ mkLet [
-          (nm "g", lambda "v" (lambda "t" (apply (apply (primitive _math_add) (var "outer"))
-            (apply (apply (primitive _math_add) (var "v")) (var "t")))),
-            polyType ["a"] (T.function (T.var "a") (T.function (T.var "a") (T.var "a")))),
-          (nm "h", lambda "v" (lambda "t" (apply (apply (var "g") (var "v")) (var "t"))),
-            polyType ["b"] (T.function (T.var "b") (T.function (T.var "b") (T.var "b"))))]
-          (apply (apply (var "h") (int32 1)) (int32 2))),
-        monoType (T.function T.int32 T.int32))]
-        (apply (var "wrapper") (int32 10)))
-      -- Output: wrapper first (original), then wrapper_g and wrapper_h hoisted (both capture outer)
-      -- wrapper_g: \outer -> \v -> \t -> add outer (add v t)
-      -- wrapper_h: \outer -> \v -> \t -> ((wrapper_g outer) v) t
-      (mkLet [
-        (nm "wrapper",
-          lambdaTyped "outer" T.int32 (apply (apply (apply (var "wrapper_h") (var "outer")) (int32 1)) (int32 2)),
-          monoType (T.function T.int32 T.int32)),
-        (nm "wrapper_g", tylam "a" (lambdaTyped "outer" T.int32
-          (lambda "v" (lambda "t" (apply (apply (primitive _math_add) (var "outer"))
-            (apply (apply (primitive _math_add) (var "v")) (var "t")))))),
-          polyType ["a"] (T.function T.int32 (T.function (T.var "a") (T.function (T.var "a") (T.var "a"))))),
-        (nm "wrapper_h", tylam "b" (lambdaTyped "outer" T.int32
-          (lambda "v" (lambda "t" (apply (apply (apply (var "wrapper_g") (var "outer")) (var "v")) (var "t"))))),
-          polyType ["b"] (T.function T.int32 (T.function (T.var "b") (T.function (T.var "b") (T.var "b")))))]
-        (apply (var "wrapper") (int32 10))),
-
-    -- ============================================================
-    -- Test: Untyped bindings are treated as monomorphic
-    -- ============================================================
-
-    hoistPolyCase "untyped binding: not hoisted"
-      -- Input: let x = 1 in (let y = 2 in x + y)
-      -- Neither binding has a type, so neither is polymorphic
-      (mkLetUntyped [(nm "x", int32 1)]
-        (Core.termLet $ mkLetUntyped [(nm "y", int32 2)]
-          (apply (apply (primitive _math_add) (var "x")) (var "y"))))
-      -- Output: unchanged (untyped bindings are not polymorphic)
-      (mkLetUntyped [(nm "x", int32 1)]
-        (Core.termLet $ mkLetUntyped [(nm "y", int32 2)]
-          (apply (apply (primitive _math_add) (var "x")) (var "y")))),
-
-    -- ============================================================
-    -- Test: Name collision - nested binding has same name as top-level (after unshadowing)
-    -- Note: This test uses distinct names as unshadowVariables would produce.
-    -- The hoisting code assumes no shadowing. If there were shadowing,
-    -- two bindings named 'id' would collide at top level.
-    -- ============================================================
-
-    hoistPolyCase "no name collision: distinct names after unshadowing"
-      -- Input: let id = \x -> x; f = \a -> (let id2 : forall b. b -> b = \y -> y in id2 (id a)) in f 42
-      -- Here 'id' is monomorphic at top level, 'id2' is polymorphic nested
-      -- They have distinct names (as unshadowVariables would ensure)
-      (mkLet [
-        (nm "id", lambda "x" (var "x"), monoType (T.function T.int32 T.int32)),
-        (nm "f",
-          lambda "a" (Core.termLet $ mkLet [
-            (nm "id2", lambda "y" (var "y"), polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-            (apply (var "id2") (apply (var "id") (var "a")))),
-          monoType (T.function T.int32 T.int32))]
-        (apply (var "f") (int32 42)))
-      -- Output: id and f first (original), then f_id2 hoisted
-      (mkLet [
-        (nm "id", lambda "x" (var "x"), monoType (T.function T.int32 T.int32)),
-        (nm "f",
-          lambda "a" (apply (var "f_id2") (apply (var "id") (var "a"))),
-          monoType (T.function T.int32 T.int32)),
-        (nm "f_id2", tylam "b" (lambda "y" (var "y")), polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-        (apply (var "f") (int32 42))),
-
-    -- ============================================================
-    -- Test: Nested polymorphic binding calls enclosing polymorphic binding
-    -- When a polymorphic binding h at a nested level calls a polymorphic
-    -- binding g from an enclosing (but not top) level, g should NOT be
-    -- passed as a term argument to h. Instead, h's body should reference
-    -- the hoisted g (wrapper_g) directly, since polymorphic let-bound
-    -- variables are excluded from capture.
-    -- ============================================================
-
-    hoistPolyCase "nested polymorphic binding calls enclosing polymorphic binding"
-      -- Input: let wrapper = \outer:Int32 ->
-      --          let g : forall a. a -> a = \y -> y
-      --          in \inner:Int32 ->
-      --            let h : forall b. b -> b = \z -> g z
-      --            in h 42
-      --        in wrapper 10 20
-      -- Here g is polymorphic at an outer let level, and h is polymorphic
-      -- at an inner let level. h calls g. When both are hoisted:
-      -- - g becomes wrapper_g (no captures needed)
-      -- - h becomes wrapper_h, and should reference wrapper_g directly
-      --   (NOT receive g as a term parameter)
-      (mkLet [(nm "wrapper",
-        lambdaTyped "outer" T.int32 (Core.termLet $ mkLet [
-          -- g : forall a. a -> a (at outer let level)
-          (nm "g",
-            lambda "y" (var "y"),
-            polyType ["a"] (T.function (T.var "a") (T.var "a")))]
-          -- inner lambda
-          (lambdaTyped "inner" T.int32 (Core.termLet $ mkLet [
-            -- h : forall b. b -> b (at inner let level, calls g)
-            (nm "h",
-              lambda "z" (apply (var "g") (var "z")),
-              polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-            (apply (var "h") (int32 42))))),
-        monoType (T.function T.int32 (T.function T.int32 T.int32)))]
-        (apply (apply (var "wrapper") (int32 10)) (int32 20)))
-      -- Output: wrapper simplified, wrapper_g and wrapper_h hoisted.
-      -- CRITICAL: wrapper_h references wrapper_g directly, NOT through a parameter.
-      -- Neither g nor any enclosing lambda variables are captured by h,
-      -- because g is polymorphic (excluded from capture) and h doesn't use outer/inner.
-      (mkLet [
-        (nm "wrapper",
-          lambdaTyped "outer" T.int32
-            (lambdaTyped "inner" T.int32
-              (apply (var "wrapper_h") (int32 42))),
-          monoType (T.function T.int32 (T.function T.int32 T.int32))),
-        -- wrapper_g: hoisted, no captures
-        (nm "wrapper_g",
-          tylam "a" (lambda "y" (var "y")),
-          polyType ["a"] (T.function (T.var "a") (T.var "a"))),
-        -- wrapper_h: hoisted, references wrapper_g directly (no g parameter)
-        (nm "wrapper_h",
-          tylam "b" (lambda "z" (apply (var "wrapper_g") (var "z"))),
-          polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-        (apply (apply (var "wrapper") (int32 10)) (int32 20))),
-
-    -- ============================================================
-    -- Test: Polymorphic binding captures monomorphic sibling in same let
-    -- This test case demonstrates the bug in joinTypes where:
-    -- - sleft/sright are monomorphic bindings (NOT hoisted)
-    -- - cannotUnify is polymorphic (HOISTED) and references sleft/sright
-    -- When cannotUnify is hoisted, it must capture sleft/sright as parameters
-    -- because they are defined in the same let and won't be hoisted with it.
-    -- ============================================================
-
-    hoistPolyCase "polymorphic binding captures monomorphic sibling in same let"
-      -- This mirrors the joinTypes structure:
-      -- let wrapper = \left -> \right ->
-      --   let sleft : Int32 = f left;           -- monomorphic, NOT hoisted
-      --       sright : Int32 = f right;         -- monomorphic, NOT hoisted
-      --       cannotUnify : forall a. a -> a = \x -> add sleft (add sright x)  -- polymorphic, refs sleft/sright
-      --   in cannotUnify 42
-      -- in wrapper 1 2
-      --
-      -- When cannotUnify is hoisted, it must capture sleft and sright since they are
-      -- defined in the same let and won't be hoisted with it.
-      (mkLet [(nm "wrapper",
-        lambdaTyped "left" T.int32
-          (lambdaTyped "right" T.int32
-            (Core.termLet $ mkLet [
-              (nm "sleft", apply (var "f") (var "left"), monoType T.int32),
-              (nm "sright", apply (var "f") (var "right"), monoType T.int32),
-              (nm "cannotUnify",
-                lambda "x" (apply (apply (primitive _math_add) (var "sleft"))
-                  (apply (apply (primitive _math_add) (var "sright")) (var "x"))),
-                polyType ["a"] (T.function (T.var "a") (T.var "a")))]
-              (apply (var "cannotUnify") (int32 42)))),
-        monoType (T.function T.int32 (T.function T.int32 T.int32)))]
-        (apply (apply (var "wrapper") (int32 1)) (int32 2)))
-      -- Expected output:
-      -- wrapper is simplified, wrapper_cannotUnify is hoisted with sleft and sright captured
-      -- wrapper_cannotUnify: forall a. \sleft:Int32 -> \sright:Int32 -> \x -> add sleft (add sright x)
-      -- Reference becomes: ((wrapper_cannotUnify sleft) sright) 42
-      (mkLet [
-        (nm "wrapper",
-          lambdaTyped "left" T.int32
-            (lambdaTyped "right" T.int32
-              (Core.termLet $ mkLet [
-                (nm "sleft", apply (var "f") (var "left"), monoType T.int32),
-                (nm "sright", apply (var "f") (var "right"), monoType T.int32)]
-                (apply (apply (apply (var "wrapper_cannotUnify") (var "sleft")) (var "sright")) (int32 42)))),
-          monoType (T.function T.int32 (T.function T.int32 T.int32))),
-        (nm "wrapper_cannotUnify",
-          tylam "a"
-            (lambdaTyped "sleft" T.int32
-              (lambdaTyped "sright" T.int32
-                (lambda "x" (apply (apply (primitive _math_add) (var "sleft"))
-                  (apply (apply (primitive _math_add) (var "sright")) (var "x")))))),
-          polyType ["a"] (T.function T.int32 (T.function T.int32 (T.function (T.var "a") (T.var "a")))))]
-        (apply (apply (var "wrapper") (int32 1)) (int32 2))),
-
-    -- This test uses NESTED lets (as the DSL generates with <~) rather than a single flat let.
-    -- The bug: when poly bindings in different nested lets reference each other,
-    -- transitive captured variables are not propagated correctly.
-    --
-    -- Structure (nested lets, like DSL generates):
-    --   wrapper = \left ->
-    --     let sleft = left                              -- mono (outermost nested let)
-    --     in let cannotUnify = fail sleft              -- poly, refs sleft (middle nested let)
-    --        in let joinList = cannotUnify 1           -- poly, refs cannotUnify (innermost nested let)
-    --           in joinList
-    --
-    -- When joinList is hoisted, it captures cannotUnify (from outer let).
-    -- When cannotUnify is hoisted, it captures sleft and its replacement becomes: wrapper_cannotUnify sleft
-    -- The replacement for cannotUnify gets substituted into joinList's body.
-    -- Bug: joinList ends up with free variable sleft because it wasn't captured transitively.
-    hoistPolyCase "nested lets: poly binding references poly sibling from outer let"
-      (mkLet [(nm "wrapper",
-        lambdaTyped "left" T.int32
-          -- Outer nested let: sleft (mono)
-          (Core.termLet $ mkLet [
-            (nm "sleft", var "left", monoType T.int32)]
-            -- Middle nested let: cannotUnify (poly, refs sleft)
-            (Core.termLet $ mkLet [
-              (nm "cannotUnify",
-                lambda "x" (apply (apply (primitive _math_add) (var "sleft")) (var "x")),
-                polyType ["a"] (T.function (T.var "a") (T.var "a")))]
-              -- Inner nested let: joinList (poly, refs cannotUnify)
-              (Core.termLet $ mkLet [
-                (nm "joinList",
-                  lambda "y" (apply (var "cannotUnify") (var "y")),
-                  polyType ["b"] (T.function (T.var "b") (T.var "b")))]
-                (apply (var "joinList") (int32 42))))),
-        monoType (T.function T.int32 T.int32))]
-        (apply (var "wrapper") (int32 1)))
-      -- Expected: both cannotUnify and joinList are hoisted.
-      -- wrapper_cannotUnify captures sleft.
-      -- wrapper_joinList must ALSO capture sleft (transitively through cannotUnify).
-      -- The reference to cannotUnify in joinList becomes wrapper_cannotUnify sleft,
-      -- so joinList needs sleft in scope.
-      (mkLet [
-        (nm "wrapper",
-          lambdaTyped "left" T.int32
-            (Core.termLet $ mkLet [
-              (nm "sleft", var "left", monoType T.int32)]
-              (apply (apply (var "wrapper_joinList") (var "sleft")) (int32 42))),
-          monoType (T.function T.int32 T.int32)),
-        (nm "wrapper_cannotUnify",
-          tylam "a"
-            (lambdaTyped "sleft" T.int32
-              (lambda "x" (apply (apply (primitive _math_add) (var "sleft")) (var "x")))),
-          polyType ["a"] (T.function T.int32 (T.function (T.var "a") (T.var "a")))),
-        (nm "wrapper_joinList",
-          tylam "b"
-            (lambdaTyped "sleft" T.int32
-              (lambda "y" (apply (apply (var "wrapper_cannotUnify") (var "sleft")) (var "y")))),
-          polyType ["b"] (T.function T.int32 (T.function (T.var "b") (T.var "b"))))]
-        (apply (var "wrapper") (int32 1))),
-
-    -- ============================================================
-    -- Regression test: polymorphic binding with pair term must preserve
-    -- type application wrappers after hoisting. This reproduces the
-    -- "pair type requires 2 type arguments, got 0" error in Java code
-    -- generation. The binding `init` (like in hoistLetBindingsWithPredicate)
-    -- contains a pair of empty list and a set. After inference, the pair
-    -- has TypeApplication wrappers. These wrappers must survive hoisting.
-    -- ============================================================
-
-    hoistPolyCase "polymorphic binding with pair: type applications preserved"
-      -- Input: let f = \b:Name ->
-      --          let init : forall t0. Pair<List<t0>, Set<Name>>
-      --                   = Λt0. @(Set<Name>) @(List<t0>) pair((@t0 []), singleton(b))
-      --          in init
-      --        in f (name "x")
-      -- The init binding is polymorphic (has type var t0 from empty list).
-      -- After hoisting, the pair must KEEP its TypeApplication wrappers.
-      (mkLet [(nm "f",
-        lambdaTyped "b" (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string) (Core.termLet $ mkLet [
-          (nm "init",
-            -- Term with type lambda and type applications (as inference would produce):
-            -- Λt0. TypeApp(TypeApp(Pair(TypeApp([], t0), singleton(b)), List<t0>), Set<Name>)
-            tylam "t0" (tyapp (tyapp
-              (pair
-                (tyapp (list ([] :: [TTerm Term])) (T.var "t0"))
-                (apply (var "singleton") (var "b")))
-              (T.list (T.var "t0")))
-              (T.set (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string))),
-            polyType ["t0"] (T.pair (T.list (T.var "t0")) (T.set (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string))))]
-          (var "init")),
-        monoType (T.function (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)
-          (T.pair (T.list (T.var "t0")) (T.set (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)))))]
-        (apply (var "f") (var "name_x")))
-      -- Expected output: f first (original), then f_init hoisted.
-      -- The hoisted binding must retain TypeApplication wrappers on the pair.
-      -- Λt0 is stripped and re-added by hoisting, but inner type apps on pair are preserved.
-      (mkLet [
-        (nm "f",
-          lambdaTyped "b" (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)
-            (apply (var "f_init") (var "b")),
-          monoType (T.function (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)
-            (T.pair (T.list (T.var "t0")) (T.set (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string))))),
-        (nm "f_init",
-          -- After hoisting: captures b, re-adds type lambda for t0
-          -- The inner type applications on the pair MUST be preserved
-          tylam "t0" (lambdaTyped "b" (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)
-            (tyapp (tyapp
-              (pair
-                (tyapp (list ([] :: [TTerm Term])) (T.var "t0"))
-                (apply (var "singleton") (var "b")))
-              (T.list (T.var "t0")))
-              (T.set (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)))),
-          polyType ["t0"] (T.function (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)
-            (T.pair (T.list (T.var "t0")) (T.set (T.wrap (Core.name (Phantoms.string "hydra.core.Name")) T.string)))))]
-        (apply (var "f") (var "name_x"))),
-
-    -- ============================================================
-    -- Regression test: monomorphic binding referencing outer type variables
-    -- must get type applications at the call site after hoisting.
-    -- This reproduces the Java "T70848" bug: without type apps on the
-    -- hoisted reference, the Java coder falls back to tryTypeOf which
-    -- generates fresh inference variables instead of using the correct
-    -- type parameters from the enclosing scope.
-    -- ============================================================
-
-    hoistPolyCase "monomorphic binding captures type vars: replacement includes type applications"
-      -- Input: let f = TypeLambda a (TypeLambda b (
-      --          \(x:a) -> let q : TypeScheme([], a -> b) = \(y:a) -> g y
-      --                    in q x))
-      --        in f
-      -- Here 'q' is monomorphic but references outer type vars 'a' and 'b'.
-      -- When hoisted, q becomes polymorphic in [a, b].
-      -- The replacement must include TypeApp(b, TypeApp(a, Var(f_q))) to instantiate
-      -- the hoisted binding with the correct type variables.
-      (mkLet [(nm "f",
-        tylam "a" (tylam "b" (
-          lambdaTyped "x" (T.var "a") (Core.termLet $ mkLet [
-            (nm "q",
-              lambdaTyped "y" (T.var "a") (apply (var "g") (var "y")),
-              monoType (T.function (T.var "a") (T.var "b")))]
-            (apply (var "q") (var "x"))))),
-        polyType ["a", "b"] (T.function (T.var "a") (T.var "b")))]
-        (var "f"))
-      -- Expected output: f first, then f_q hoisted with type lambdas for [a, b].
-      -- q does not reference x, so no lambda capture is needed.
-      -- The replacement for q SHOULD be TypeApp(b, TypeApp(a, Var(f_q)))
-      -- so that downstream code knows the type variable instantiation.
-      -- Using Core.termTypeApplication directly to avoid meta-encoding issues with tyapp.
-      (mkLet [
-        (nm "f",
-          tylam "a" (tylam "b" (
-            lambdaTyped "x" (T.var "a")
-              (apply
-                (Core.termTypeApplication $ Core.typeApplicationTerm
-                  (Core.termTypeApplication $ Core.typeApplicationTerm (var "f_q") (T.var "a"))
-                  (T.var "b"))
-                (var "x")))),
-          polyType ["a", "b"] (T.function (T.var "a") (T.var "b"))),
-        (nm "f_q",
-          tylam "a" (tylam "b" (
-            lambdaTyped "y" (T.var "a") (apply (var "g") (var "y")))),
-          polyType ["a", "b"] (T.function (T.var "a") (T.var "b")))]
-        (var "f"))]
-
--- | Test cases for hoistLetBindings with hoistAll=True
--- This function hoists ALL let bindings (not just polymorphic ones) to the top level.
--- This is used for Java which cannot have let expressions in arbitrary positions.
--- Key behavior: type lambdas are boundaries - we don't hoist bindings OUT of type lambdas
--- because doing so could move code that references type variables outside their scope.
-hoistLetBindingsGroup :: TTerm TestGroup
-hoistLetBindingsGroup = subgroup "hoistLetBindings" [
-    -- ============================================================
-    -- Test: Basic nested let hoisting (no type lambdas)
-    -- ============================================================
-
-    hoistAllCase "nested let inside lambda: binding hoisted with lambda capture"
-      -- Input: let f = \a -> (let g = a + 1 in g * 2) in f 10
-      (mkLetUntyped [(nm "f",
-        lambda "a" (Core.termLet $ mkLetUntyped [(nm "g", apply (apply (primitive _math_add) (var "a")) (int32 1))]
-          (apply (apply (primitive _math_mul) (var "g")) (int32 2))))]
-        (apply (var "f") (int32 10)))
-      -- Output: f comes first (original binding), then f_g is hoisted with lambda to capture 'a', reference becomes (f_g a)
-      (mkLetUntyped [
-        (nm "f",
-          lambda "a" (apply (apply (primitive _math_mul) (apply (var "f_g") (var "a"))) (int32 2))),
-        (nm "f_g", lambda "a" (apply (apply (primitive _math_add) (var "a")) (int32 1)))]
-        (apply (var "f") (int32 10))),
-
-    -- ============================================================
-    -- Test: Type applications are processed normally (they don't introduce type variables)
-    -- But the inner lambda still has nested let that gets hoisted
-    -- ============================================================
-
-    hoistAllCase "type application: nested let outside lambda CAN be hoisted"
-      -- Input: let f = (let y = 1 in \x -> x + y) @Int32 in f 10
-      -- The let is OUTSIDE the lambda, so y can be hoisted without capture
-      (mkLetUntyped [(nm "f",
-        tyapp (Core.termLet $ mkLetUntyped [(nm "y", int32 1)]
-          (lambda "x" (apply (apply (primitive _math_add) (var "x")) (var "y")))) T.int32)]
-        (apply (var "f") (int32 10)))
-      -- Output: f comes first (original binding), then f_y is hoisted
-      (mkLetUntyped [
-        (nm "f",
-          tyapp (lambda "x" (apply (apply (primitive _math_add) (var "x")) (var "f_y"))) T.int32),
-        (nm "f_y", int32 1)]
-        (apply (var "f") (int32 10)))]
-
--- | Test cases for type parameter extraction when hoisting polymorphic let bindings
--- This group specifically tests scenarios where Java code generation fails because
--- type parameters (t0, t1, t2, etc.) are used in generated code but not declared
--- in method signatures. The root cause is that javaTypeParametersForType doesn't
--- properly collect all free type variables from nested generic types.
---
--- These tests illustrate the EXPECTED behavior after the issue is fixed.
--- Currently, the Java coder fails to generate compilable code for these cases.
-hoistPolymorphicTypeParametersGroup :: TTerm TestGroup
-hoistPolymorphicTypeParametersGroup = subgroup "hoistPolymorphicTypeParameters" [
-    -- ============================================================
-    -- Test: Nested polymorphic bindings with multiple type variables
-    -- This is the core issue: when a polymorphic binding like `choose`
-    -- uses type variables (t0, t1, t2) in nested function types,
-    -- those variables must be declared in the hoisted method signature.
-    -- ============================================================
-
-    hoistPolyCase "nested function types: all type variables must be declared"
-      -- Input: let f = (let choose : forall t0 t1 t2. (t0 -> t1) -> (t2 -> t1) -> t0 -> t1 = ... in choose) in f
-      -- This simulates the `mutateTrace` scenario where `choose` is a polymorphic
-      -- local binding with multiple type parameters in nested function types.
-      -- (Simplified to avoid using "Either" as a type variable name)
-      (mkLet [(nm "f",
-        Core.termLet $ mkLet [(nm "choose",
-          lambda "forLeft" (lambda "forRight" (lambda "e"
-            (apply (var "forLeft") (var "e")))),
-          -- Type: forall t0 t1 t2. (t0 -> t1) -> (t2 -> t1) -> t0 -> t1
-          polyType ["t0", "t1", "t2"]
-            (T.function
-              (T.function (T.var "t0") (T.var "t1"))
-              (T.function
-                (T.function (T.var "t2") (T.var "t1"))
-                (T.function (T.var "t0") (T.var "t1")))))]
-          (var "choose"),
-        monoType (T.function
-          (T.function T.string T.int32)
-          (T.function
-            (T.function T.boolean T.int32)
-            (T.function T.string T.int32))))]
-        (var "f"))
-      -- Output: f first (original), then f_choose hoisted with ALL type parameters preserved
-      -- When generating Java, the method signature must declare t0, t1, t2
-      (mkLet [
-        (nm "f",
-          var "f_choose",
-          monoType (T.function
-            (T.function T.string T.int32)
-            (T.function
-              (T.function T.boolean T.int32)
-              (T.function T.string T.int32)))),
-        (nm "f_choose",
-          tylam "t0" (tylam "t1" (tylam "t2" (lambda "forLeft" (lambda "forRight" (lambda "e"
-            (apply (var "forLeft") (var "e"))))))),
-          polyType ["t0", "t1", "t2"]
-            (T.function
-              (T.function (T.var "t0") (T.var "t1"))
-              (T.function
-                (T.function (T.var "t2") (T.var "t1"))
-                (T.function (T.var "t0") (T.var "t1")))))]
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Type variable in return position only
-    -- Type variables appearing only in the return type of a nested
-    -- function must still be declared.
-    -- ============================================================
-
-    hoistPolyCase "type variable in return position only"
-      -- Input: let f = (let returnT : forall t. () -> t = ... in returnT) in f
-      (mkLet [(nm "f",
-        Core.termLet $ mkLet [(nm "returnT",
-          lambda "unit" (var "undefined"),
-          polyType ["t"] (T.function T.unit (T.var "t")))]
-          (var "returnT"),
-        monoType (T.function T.unit T.int32))]
-        (var "f"))
-      -- Output: f first (original), then f_returnT hoisted with t declared
-      (mkLet [
-        (nm "f",
-          var "f_returnT",
-          monoType (T.function T.unit T.int32)),
-        (nm "f_returnT",
-          tylam "t" (lambda "unit" (var "undefined")),
-          polyType ["t"] (T.function T.unit (T.var "t")))]
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Type variables in deeply nested generic types
-    -- The Java coder uses freeVariablesInType but may not recurse
-    -- into all nested type structures.
-    -- ============================================================
-
-    hoistPolyCase "type variables in deeply nested generics"
-      -- Input: let f = (let nested : forall t0 t1 t2. ((t0, t1), t2) -> t0 = ... in nested) in f
-      -- Type variables t0, t1, t2 are in nested pair types
-      -- (Simplified from original which used List<Map<...>> - those are treated as type vars in tests)
-      (mkLet [(nm "f",
-        Core.termLet $ mkLet [(nm "nested",
-          lambda "x" (var "undefined"),
-          -- Type: forall t0 t1 t2. ((t0, t1), t2) -> t0
-          polyType ["t0", "t1", "t2"]
-            (T.function
-              (T.pair (T.pair (T.var "t0") (T.var "t1")) (T.var "t2"))
-              (T.var "t0")))]
-          (var "nested"),
-        monoType (T.function
-          (T.pair (T.pair T.string T.int32) T.boolean)
-          T.string))]
-        (var "f"))
-      -- Output: f first (original), then f_nested hoisted with all type parameters t0, t1, t2 declared
-      (mkLet [
-        (nm "f",
-          var "f_nested",
-          monoType (T.function
-            (T.pair (T.pair T.string T.int32) T.boolean)
-            T.string)),
-        (nm "f_nested",
-          tylam "t0" (tylam "t1" (tylam "t2" (lambda "x" (var "undefined")))),
-          polyType ["t0", "t1", "t2"]
-            (T.function
-              (T.pair (T.pair (T.var "t0") (T.var "t1")) (T.var "t2"))
-              (T.var "t0")))]
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Multiple polymorphic bindings that share type variable names
-    -- Each binding should independently track its own type variables.
-    -- ============================================================
-
-    hoistPolyCase "multiple bindings with overlapping type variable names"
-      -- Input: let outer = (let id1 : forall t. t -> t = \x -> x; id2 : forall t. t -> t = \y -> y in pair id1 id2) in outer
-      -- Both id1 and id2 use "t" but they are independent
-      (mkLet [(nm "outer",
-        Core.termLet $ mkLet [
-          (nm "id1", lambda "x" (var "x"), polyType ["t"] (T.function (T.var "t") (T.var "t"))),
-          (nm "id2", lambda "y" (var "y"), polyType ["t"] (T.function (T.var "t") (T.var "t")))]
-          (apply (apply (var "pair") (var "id1")) (var "id2")),
-        monoType (T.pair
-          (T.function T.int32 T.int32)
-          (T.function T.string T.string)))]
-        (var "outer"))
-      -- Output: outer first (original), then outer_id1 and outer_id2 hoisted (each with their own t parameter)
-      (mkLet [
-        (nm "outer",
-          apply (apply (var "pair") (var "outer_id1")) (var "outer_id2"),
-          monoType (T.pair
-            (T.function T.int32 T.int32)
-            (T.function T.string T.string))),
-        (nm "outer_id1", tylam "t" (lambda "x" (var "x")), polyType ["t"] (T.function (T.var "t") (T.var "t"))),
-        (nm "outer_id2", tylam "t" (lambda "y" (var "y")), polyType ["t"] (T.function (T.var "t") (T.var "t")))]
-        (var "outer")),
-
-    -- ============================================================
-    -- Test: Polymorphic binding with captured term variable AND type parameters
-    -- This is the combination case: the binding both captures a lambda-bound
-    -- term variable AND has type parameters that need to be declared.
-    -- ============================================================
-
-    hoistPolyCase "captured variable with type parameters"
-      -- Input: let f = \(a:String) -> (let g : forall t. t -> Pair<String, t> = \x -> pair a x in g 42) in f "hello"
-      -- Here 'g' captures 'a' AND has type parameter t
-      -- When hoisted: g must be wrapped in lambda for 'a', AND method must declare t
-      (mkLet [(nm "f",
-        lambdaTyped "a" T.string (Core.termLet $ mkLet [
-          (nm "g",
-            lambda "x" (apply (apply (var "pair") (var "a")) (var "x")),
-            polyType ["t"] (T.function (T.var "t") (T.pair T.string (T.var "t"))))]
-          (apply (var "g") (int32 42))),
-        monoType (T.function T.string (T.pair T.string T.int32)))]
-        (apply (var "f") (string "hello")))
-      -- Output: f first (original), then f_g hoisted with lambda wrapper for 'a', and t must be declared
-      -- Java signature: <t> Function<String, Function<t, Pair<String, t>>> f_g = a -> x -> pair(a, x);
-      (mkLet [
-        (nm "f",
-          lambdaTyped "a" T.string (apply (apply (var "f_g") (var "a")) (int32 42)),
-          monoType (T.function T.string (T.pair T.string T.int32))),
-        (nm "f_g",
-          tylam "t" (lambdaTyped "a" T.string (lambda "x" (apply (apply (var "pair") (var "a")) (var "x")))),
-          polyType ["t"] (T.function T.string (T.function (T.var "t") (T.pair T.string (T.var "t")))))]
-        (apply (var "f") (string "hello"))),
-
-    -- ============================================================
-    -- Test: Short type variable names (the isLambdaBoundVariable heuristic)
-    -- The Java coder's isLambdaBoundVariable uses name length <= 4 to identify
-    -- type variables. These tests ensure that this heuristic correctly
-    -- identifies variables that should become Java type parameters.
-    -- ============================================================
-
-    hoistPolyCase "short type variable names are treated as type parameters"
-      -- Input: let f = (let g : forall s t v. s -> t -> v = ... in g) in f
-      -- s, t, v have length <= 4, so they should be recognized as type parameters
-      (mkLet [(nm "f",
-        Core.termLet $ mkLet [(nm "g",
-          lambda "s" (lambda "t" (var "undefined")),
-          polyType ["s", "t", "v"]
-            (T.function (T.var "s")
-              (T.function (T.var "t") (T.var "v"))))]
-          (var "g"),
-        monoType (T.function T.int32 (T.function T.string T.boolean)))]
-        (var "f"))
-      -- Output: f first (original), then f_g hoisted with s, t, v declared as type parameters
-      (mkLet [
-        (nm "f",
-          var "f_g",
-          monoType (T.function T.int32 (T.function T.string T.boolean))),
-        (nm "f_g",
-          tylam "s" (tylam "t" (tylam "v" (lambda "s" (lambda "t" (var "undefined"))))),
-          polyType ["s", "t", "v"]
-            (T.function (T.var "s")
-              (T.function (T.var "t") (T.var "v"))))]
-        (var "f")),
-
-    hoistPolyCase "numbered type variables like t0 t1 t2"
-      -- Input: let f = (let g : forall t0 t1 t2. t0 -> t1 -> t2 = ... in g) in f
-      -- t0, t1, t2 have length <= 4, common pattern in generated code
-      (mkLet [(nm "f",
-        Core.termLet $ mkLet [(nm "g",
-          lambda "x" (lambda "y" (var "undefined")),
-          polyType ["t0", "t1", "t2"]
-            (T.function (T.var "t0")
-              (T.function (T.var "t1") (T.var "t2"))))]
-          (var "g"),
-        monoType (T.function T.int32 (T.function T.string T.boolean)))]
-        (var "f"))
-      -- Output: f first (original), then f_g hoisted with t0, t1, t2 declared
-      (mkLet [
-        (nm "f",
-          var "f_g",
-          monoType (T.function T.int32 (T.function T.string T.boolean))),
-        (nm "f_g",
-          tylam "t0" (tylam "t1" (tylam "t2" (lambda "x" (lambda "y" (var "undefined"))))),
-          polyType ["t0", "t1", "t2"]
-            (T.function (T.var "t0")
-              (T.function (T.var "t1") (T.var "t2"))))]
-        (var "f")),
-
-    -- ============================================================
-    -- Test: Complex "choose" pattern from mutateTrace
-    -- This directly models the failing code in Monads.java
-    -- NOTE: This test uses T.var "Either" which causes "Either" to be
-    -- treated as a free type variable. In real code, Either would be a defined
-    -- type constructor and wouldn't be captured as a free variable. This test
-    -- has been simplified to avoid this issue by using only type variables.
-    -- ============================================================
-
-    hoistPolyCase "choose pattern from mutateTrace"
-      -- Input simulates: let mutateTrace = ... in
-      --   choose <~ (forLeft ~> forRight ~> e ~> either forLeft forRight e) $
-      --   ... rest of mutateTrace ...
-      -- The `choose` binding has type:
-      --   forall t0 t1 t2. (t0 -> t1) -> (t2 -> t1) -> t0 -> t1
-      -- (Simplified to avoid using "Either" as a type variable name)
-      (mkLet [(nm "mutateTrace",
-        lambda "mutate" (lambda "restore" (lambda "f"
-          (Core.termLet $ mkLet [(nm "choose",
-            -- choose = \forLeft -> \forRight -> \e -> forLeft e
-            lambda "forLeft" (lambda "forRight" (lambda "e"
-              (apply (var "forLeft") (var "e")))),
-            -- Type: forall t0 t1 t2. (t0 -> t1) -> (t2 -> t1) -> t0 -> t1
-            polyType ["t0", "t1", "t2"]
-              (T.function
-                (T.function (T.var "t0") (T.var "t1"))
-                (T.function
-                  (T.function (T.var "t2") (T.var "t1"))
-                  (T.function (T.var "t0") (T.var "t1")))))]
-            -- Body uses choose
-            (apply (apply (apply (var "choose") (var "forLeft")) (var "forRight")) (var "e"))))),
-        -- Full type of mutateTrace (using concrete types)
-        monoType (T.function T.int32
-          (T.function T.int32
-            (T.function T.int32 T.int32))))]
-        (var "mutateTrace"))
-      -- Output: mutateTrace first (original), then mutateTrace_choose hoisted, MUST have t0, t1, t2 declared
-      (mkLet [
-        (nm "mutateTrace",
-          lambda "mutate" (lambda "restore" (lambda "f"
-            (apply (apply (apply (var "mutateTrace_choose") (var "forLeft")) (var "forRight")) (var "e")))),
-          monoType (T.function T.int32
-            (T.function T.int32
-              (T.function T.int32 T.int32)))),
-        (nm "mutateTrace_choose",
-          tylam "t0" (tylam "t1" (tylam "t2" (lambda "forLeft" (lambda "forRight" (lambda "e"
-            (apply (var "forLeft") (var "e"))))))),
-          polyType ["t0", "t1", "t2"]
-            (T.function
-              (T.function (T.var "t0") (T.var "t1"))
-              (T.function
-                (T.function (T.var "t2") (T.var "t1"))
-                (T.function (T.var "t0") (T.var "t1")))))]
-        (var "mutateTrace"))]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/AlgebraicTypes.hs b/src/main/haskell/Hydra/Sources/Test/Inference/AlgebraicTypes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/AlgebraicTypes.hs
+++ /dev/null
@@ -1,332 +0,0 @@
-module Hydra.Sources.Test.Inference.AlgebraicTypes where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.algebraicTypes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Inference tests for algebraic data types")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition testGroupForCollectionPrimitives,
-      Phantoms.toDefinition testGroupForEithers,
-      Phantoms.toDefinition testGroupForFolds,
-      Phantoms.toDefinition testGroupForLists,
-      Phantoms.toDefinition testGroupForMaps,
-      Phantoms.toDefinition testGroupForOptionals,
-      Phantoms.toDefinition testGroupForPairs,
-      Phantoms.toDefinition testGroupForSets]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Algebraic data type tests" $
-  supergroup "Algebraic terms" [
-    testGroupForCollectionPrimitives,
-    testGroupForEithers,
-    testGroupForFolds,
-    testGroupForLists,
-    testGroupForMaps,
-    testGroupForOptionals,
-    testGroupForPairs,
-    testGroupForSets]
-
-testGroupForCollectionPrimitives :: TTermDefinition TestGroup
-testGroupForCollectionPrimitives = define "testGroupForCollectionPrimitives" $
-  supergroup "Collection primitives" [
-
-    -- Applying maps.map to a concrete function
-    subgroup "maps.map applied to a function" [
-      -- maps.map (partially applied): maps.map negate => map<k, int32> -> map<k, int32>
-      expectPolyConstrained 1 [tag_disabledForMinimalInference]
-        (primitive _maps_map @@ primitive _math_negate)
-        ["t0"] [("t0", ["ordering"])] (T.function (T.map (T.var "t0") T.int32) (T.map (T.var "t0") T.int32)),
-      -- maps.map with a lambda
-      expectPolyConstrained 2 [tag_disabledForMinimalInference]
-        (primitive _maps_map @@ lambda "x" (list [var "x"]))
-        ["t0", "t1"] [("t0", ["ordering"])] (T.function (T.map (T.var "t0") (T.var "t1")) (T.map (T.var "t0") (T.list $ T.var "t1"))),
-      -- maps.map with sets.fromList: transforms map values from lists to sets
-      expectPolyConstrained 3 [tag_disabledForMinimalInference]
-        (primitive _maps_map @@ primitive _sets_fromList)
-        ["t0", "t1"] [("t0", ["ordering"]), ("t1", ["ordering"])] (T.function (T.map (T.var "t0") (T.list $ T.var "t1")) (T.map (T.var "t0") (T.set $ T.var "t1")))],
-
-    -- Applying sets.map to cross-collection functions
-    subgroup "sets.map applied to a function" [
-      -- sets.map negate => set<int32> -> set<int32>
-      expectMono 1 [tag_disabledForMinimalInference]
-        (primitive _sets_map @@ primitive _math_negate)
-        (T.function (T.set T.int32) (T.set T.int32)),
-      -- sets.map with lists.length: set<list<t>> -> set<int32>
-      expectPolyConstrained 2 [tag_disabledForMinimalInference]
-        (primitive _sets_map @@ primitive _lists_length)
-        ["t0"] [("t0", ["ordering"])] (T.function (T.set $ T.list $ T.var "t0") (T.set T.int32))],
-
-    -- Composing collection primitives in let bindings
-    subgroup "Composing collection primitives in let" [
-      -- let f = maps.map sets.fromList in f
-      expectPolyConstrained 1 [tag_disabledForMinimalInference]
-        (lets [
-          "f">: primitive _maps_map @@ primitive _sets_fromList]
-          $ var "f")
-        ["t0", "t1"] [("t0", ["ordering"]), ("t1", ["ordering"])] (T.function (T.map (T.var "t0") (T.list $ T.var "t1")) (T.map (T.var "t0") (T.set $ T.var "t1"))),
-      -- let f = maps.map sets.fromList; g = f (map literal) in g
-      expectMono 2 [tag_disabledForMinimalInference]
-        (lets [
-          "f">: primitive _maps_map @@ primitive _sets_fromList,
-          "g">: var "f" @@ mapTerm [(string "a", list [int32 1, int32 2])]]
-          $ var "g")
-        (T.map T.string (T.set T.int32))],
-
-    -- Composing map operations in lambdas
-    subgroup "Map operations in lambdas" [
-      -- \m. maps.map lists.length m  =>  map<k, list<t>> -> map<k, int32>
-      expectPolyConstrained 1 [tag_disabledForMinimalInference]
-        (lambda "m" $ primitive _maps_map @@ primitive _lists_length @@ var "m")
-        ["t0", "t1"] [("t0", ["ordering"])] (T.function (T.map (T.var "t0") (T.list $ T.var "t1")) (T.map (T.var "t0") T.int32)),
-      -- \f. \m. maps.map f m  =>  (v1 -> v2) -> map<k, v1> -> map<k, v2>
-      expectPolyConstrained 2 [tag_disabledForMinimalInference]
-        (lambda "f" $ lambda "m" $ primitive _maps_map @@ var "f" @@ var "m")
-        ["t0", "t1", "t2"] [("t2", ["ordering"])] (T.functionMany [T.function (T.var "t0") (T.var "t1"), T.map (T.var "t2") (T.var "t0"), T.map (T.var "t2") (T.var "t1")])],
-
-    -- Fully applied collection conversions
-    subgroup "Fully applied collection conversions" [
-      -- sets.fromList [1, 2, 3]  =>  set<int32>
-      expectMono 1 [tag_disabledForMinimalInference]
-        (primitive _sets_fromList @@ list (int32 <$> [1, 2, 3]))
-        (T.set T.int32),
-      -- maps.map negate (maps.fromList [(1, 2)])  =>  map<int32, int32>
-      expectMono 2 [tag_disabledForMinimalInference]
-        (primitive _maps_map @@ primitive _math_negate @@ (primitive _maps_fromList @@ list [pair (int32 1) (int32 2)]))
-        (T.map T.int32 T.int32),
-      -- maps.map sets.fromList (maps.fromList [("a", [1, 2])])  =>  map<string, set<int32>>
-      expectMono 3 [tag_disabledForMinimalInference]
-        (primitive _maps_map @@ primitive _sets_fromList @@ (primitive _maps_fromList @@ list [pair (string "a") (list [int32 1, int32 2])]))
-        (T.map T.string (T.set T.int32))]]
-
-testGroupForEithers :: TTermDefinition TestGroup
-testGroupForEithers = define "testGroupForEithers" $
-  supergroup "Either terms" [
-    subgroup "Left values" [
-      expectMono 1 []
-        (list [left $ string "error", right $ int32 42])
-        (T.list $ T.either_ T.string T.int32),
-      expectPoly 2 []
-        (left $ string "error")
-        ["t0"] (T.either_ T.string (T.var "t0"))],
-
-    subgroup "Right values" [
-      expectMono 1 []
-        (list [right $ int32 42, left $ string "error"])
-        (T.list $ T.either_ T.string T.int32),
-      expectPoly 2 []
-        (right $ int32 42)
-        ["t0"] (T.either_ (T.var "t0") T.int32)],
-
-    subgroup "Polymorphic either values" [
-      expectPoly 1 []
-        (left $ list [])
-        ["t0", "t1"] (T.either_ (T.list $ T.var "t0") (T.var "t1")),
-      expectPoly 2 []
-        (right $ list [])
-        ["t0", "t1"] (T.either_ (T.var "t0") (T.list $ T.var "t1"))],
-
-    subgroup "Nested either values" [
-      expectMono 1 []
-        (list [left $ left $ int32 1, left $ right $ string "nested", right $ true])
-        (T.list $ T.either_ (T.either_ T.int32 T.string) T.boolean),
-      expectMono 2 []
-        (list [right $ left $ int32 42, right $ right $ true, left $ string "foo"])
-        (T.list $ T.either_ T.string (T.either_ T.int32 T.boolean))],
-
-    subgroup "Either in lambda" [
-      expectPoly 1 []
-        (lambda "x" (left $ var "x"))
-        ["t0", "t1"] (T.function (T.var "t0") (T.either_ (T.var "t0") (T.var "t1"))),
-      expectPoly 2 []
-        (lambda "x" (right $ var "x"))
-        ["t0", "t1"] (T.function (T.var "t0") (T.either_ (T.var "t1") (T.var "t0")))],
-
-    subgroup "Either in data structures" [
-      expectMono 1 []
-        (list [left $ string "error", right $ int32 42])
-        (T.list $ T.either_ T.string T.int32),
-      expectPoly 2 []
-        (pair (list [left $ string "error", right $ int32 42]) (list []))
-        ["t0"] (T.pair (T.list $ T.either_ T.string T.int32) (T.list $ T.var "t0"))]]
-
-testGroupForFolds :: TTermDefinition TestGroup
-testGroupForFolds = define "testGroupForFolds" $
-  supergroup "Eliminations" [
-    subgroup "List eliminations (folds)" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        foldAdd
-        (T.functionMany [T.int32, T.list T.int32, T.int32]),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (foldAdd @@ int32 0)
-        (T.function (T.list T.int32) T.int32),
-      expectMono 3 [tag_disabledForMinimalInference]
-        (foldAdd @@ int32 0 @@ (list (int32 <$> [1, 2, 3, 4, 5])))
-        T.int32],
-
-    subgroup "Optional eliminations" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (primitive _maybes_maybe @@ (int32 42) @@ (primitive _math_negate))
-        (T.function (T.optional T.int32) T.int32),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (primitive _maybes_maybe @@ (int32 42) @@ (primitive _math_negate) @@ (optional (just $ int32 137)))
-        T.int32,
-      expectMono 3 [tag_disabledForMinimalInference]
-        (primitive _maybes_maybe @@ (int32 42) @@ (primitive _math_negate) @@ optional nothing)
-        T.int32,
-      expectPoly 4 [tag_disabledForMinimalInference]
-        (lambda "x" $ primitive _maybes_maybe @@ (var "x") @@ (primitive _maybes_pure) @@ var "x")
-        ["t0"] (T.function (T.optional $ T.var "t0") (T.optional $ T.var "t0")),
-      expectPoly 5 [tag_disabledForMinimalInference]
-        (primitive _maybes_maybe @@ (list []) @@ (lambda "x" $ list [var "x"]))
-        ["t0"] (T.function (T.optional $ T.var "t0") (T.list $ T.var "t0"))]]
-  where
-    foldAdd = primitive _lists_foldl @@ primitive _math_add
-
-testGroupForLists :: TTermDefinition TestGroup
-testGroupForLists = define "testGroupForLists" $
-  supergroup "List terms" [
-    subgroup "List of strings" [
-      expectMono 1 []
-        (list [string "foo", string "bar"])
-        (T.list T.string)],
-    subgroup "List of lists of strings" [
-      expectMono 1 []
-        (list [list [string "foo"], list []])
-        (T.list $ T.list T.string)],
-    subgroup "Empty list" [
-      expectPoly 1 []
-        (list [])
-        ["t0"] (T.list $ T.var "t0")],
-    subgroup "List containing an empty list" [
-      expectPoly 1 []
-        (list [list []])
-        ["t0"] (T.list $ T.list $ T.var "t0")],
-    subgroup "Lambda producing a polymorphic list" [
-      expectPoly 1 []
-        (lambda "x" (list [var "x"]))
-        ["t0"] (T.function (T.var "t0") (T.list $ T.var "t0"))],
-    subgroup "Lambda producing a list of integers" [
-      expectMono 1 []
-        (lambda "x" (list [var "x", int32 42]))
-        (T.function T.int32 $ T.list T.int32)],
-    subgroup "List with repeated variables" [
-      expectMono 1 []
-        (lambda "x" (list [var "x", string "foo", var "x"]))
-        (T.function T.string (T.list T.string))]]
-
-testGroupForMaps :: TTermDefinition TestGroup
-testGroupForMaps = define "testGroupForMaps" $
-  subgroup "Map terms" [
-    expectMono 1 [tag_disabledForMinimalInference]
-      (mapTerm [
-        (string "firstName", string "Arthur"),
-        (string "lastName", string "Dent")])
-      (T.map T.string T.string),
-    expectPolyConstrained 2 [tag_disabledForMinimalInference]
-      (mapTerm [])
-      ["t0", "t1"] [("t0", ["ordering"])] (T.map (T.var "t0") (T.var "t1")),
-    expectPolyConstrained 3 [tag_disabledForMinimalInference]
-      (lambdas ["x", "y"] $ mapTerm
-        [(var "x", float64 0.1), (var "y", float64 0.2)])
-      ["t0"] [("t0", ["ordering"])] (T.function (T.var "t0") (T.function (T.var "t0") (T.map (T.var "t0") T.float64)))]
-
-testGroupForOptionals :: TTermDefinition TestGroup
-testGroupForOptionals = define "testGroupForOptionals" $
-  subgroup "Optional terms" [
-    expectMono 1 [tag_disabledForMinimalInference]
-      (optional $ just $ int32 42)
-      (T.optional T.int32),
-    expectPoly 2 [tag_disabledForMinimalInference]
-      (optional nothing)
-      ["t0"] (T.optional $ T.var "t0")]
-
-testGroupForPairs :: TTermDefinition TestGroup
-testGroupForPairs = define "testGroupForPairs" $
-  supergroup "Pair terms" [
-    subgroup "Monotyped pairs" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (pair (string "foo") (int32 42))
-        (T.pair T.string T.int32),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (pair (string "foo") (list [float32 42.0, float32 137.0]))
-        (T.pair T.string (T.list T.float32))],
-
-    subgroup "Polytyped pairs" [
-      expectPoly 1 [tag_disabledForMinimalInference]
-        (pair (list []) (string "foo"))
-        ["t0"] (T.pair (T.list $ T.var "t0") T.string),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (pair (list []) (list []))
-        ["t0", "t1"] (T.pair (T.list $ T.var "t0") (T.list $ T.var "t1"))],
-
-    subgroup "Nested pairs" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (pair (pair (int32 1) (string "nested")) true)
-        (T.pair (T.pair T.int32 T.string) T.boolean),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (pair (string "foo") (pair (int32 42) (list [float32 42.0])))
-        (T.pair T.string (T.pair T.int32 (T.list T.float32)))],
-
-    subgroup "Pairs in lambda" [
-      expectPoly 1 [tag_disabledForMinimalInference]
-        (lambda "x" (pair (var "x") (string "constant")))
-        ["t0"] (T.function (T.var "t0") (T.pair (T.var "t0") T.string)),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (lambda "p" (pair (var "p") (var "p")))
-        ["t0"] (T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t0")))],
-
-    subgroup "Pairs in data structures" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (list [pair (string "a") (int32 1), pair (string "b") (int32 2)])
-        (T.list $ T.pair T.string T.int32),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (list [pair (list []) (string "foo")])
-        ["t0"] (T.list $ T.pair (T.list $ T.var "t0") T.string)],
-
-    subgroup "Additional cases" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (pair (int32 42) (string "foo"))
-        (T.pair T.int32 T.string),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (pair (list []) (string "foo"))
-        ["t0"] (T.pair (T.list $ T.var "t0") T.string),
-      expectPoly 3 [tag_disabledForMinimalInference]
-        (pair (list []) (list []))
-        ["t0", "t1"] (T.pair (T.list $ T.var "t0") (T.list $ T.var "t1"))]]
-
-testGroupForSets :: TTermDefinition TestGroup
-testGroupForSets = define "testGroupForSets" $
-  subgroup "Set terms" [
-    expectMono 1 [tag_disabledForMinimalInference]
-      (set [true])
-      (T.set T.boolean),
-    expectPolyConstrained 2 [tag_disabledForMinimalInference]
-      (set [set []])
-      ["t0"] [("t0", ["ordering"])] (T.set $ T.set $ T.var "t0")]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/AlgorithmW.hs b/src/main/haskell/Hydra/Sources/Test/Inference/AlgorithmW.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/AlgorithmW.hs
+++ /dev/null
@@ -1,215 +0,0 @@
-module Hydra.Sources.Test.Inference.AlgorithmW where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.algorithmW"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Algorithm W inference tests")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition testGroupForSystemF]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Algorithm W test cases" $
-  supergroup "Algorithm W test cases" [
-    testGroupForSystemF]
-
--- @wisnesky's original Algorithm W test cases, modified so as to normalize type variables
-testGroupForSystemF :: TTermDefinition TestGroup
-testGroupForSystemF = define "testGroupForSystemF" $
-  subgroup "STLC to System F" [
-
---  --Untyped input:
---  --	(\x. x)
---  --System F type:
---  -- 	(v0 -> v0)
-    expectPoly 1 []
-      (lambda "x" $ var "x")
-      ["t0"] (T.functionMany [T.var "t0", T.var "t0"]),
-
---  --Untyped input:
---  --	letrecs foo = (\x. x)
---  --		in 42
---  --System F type:
---  -- 	Nat
-    expectMono 2 []
-      (lets [
-        "foo" >: lambda "x" $ var "x"]
-        $ int32 42)
-      T.int32,
-
---  --Untyped input:
---  --	let f = (\x. x) in (f 0)
---  --System F type:
---  -- 	Nat
-    expectMono 3 []
-      (lets [
-        "f" >: lambda "x" $ var "x"]
-        $ var "f" @@ int32 0)
-      T.int32,
-
---  --Untyped input:
---  --	let f = ((\x. x) 0) in f
---  --System F type:
---  -- 	Nat
-    expectMono 4 []
-      (lets [
-        "f" >: (lambda "x" $ var "x") @@ int32 0]
-        $ var "f")
-      T.int32,
-
----- TODO
-----testAdt3 = TestCase "testAdt3" $ Abs "z" $ ExprConst (Fold "List")
-----  @@ Var "z"
-----  @@ ExprConst (Con "Nil")
-----  @@ ExprConst (Con "Cons")
-----
-----foldl :: TTerm ((b -> a -> b) -> b -> [a] -> b)
-----cons :: TTerm (a -> [a] -> [a])
-----
-----[testAdt3]
-----Untyped input:
-----	(\z. (fold_List z Nil Cons))
-----Type inferred by Hindley-Milner:
-----	(List v6 -> List v6)
-----
-----System F translation:
-----	(\z:List v6 . ((fold_List [List v6 ,v6]) z (Nil [v6]) (Cons [v6])))
-----  H.it "testAdt3" $ expectPolytype
-----    ()
-----    [t0] (tFun t0 t0)
---
---  --Untyped input:
---  --	let sng = (\x. (cons x nil)) in sng
---  --System F type:
---  -- 	(v5 -> (List v5))
-    expectPoly 5 []
-      (lets [
-        "sng" >: lambda "x" $ list [var "x"]]
-        $ var "sng")
-      ["t0"] (T.function (T.var "t0") (T.list $ T.var "t0")),
-
---  --Untyped input:
---  --	let sng = (\x. (cons x nil)) in (pair (sng 0) (sng alice))
---  --System F type:
---  -- 	((List Nat) * (List String))
-    expectMono 6 []
-      (lets [
-        "sng" >: lambda "x" $ list [var "x"]]
-        $ pair (var "sng" @@ int32 0) (var "sng" @@ string "alice"))
-      (T.pair (T.list T.int32) (T.list T.string)),
-
---  --Untyped input:
---  --	letrecs + = (\x. (\y. (S (+ (P x) y))))
---  --		in (+ (S (S 0)) (S 0))
---  --System F type:
---  -- 	Nat
-    expectMono 7 []
-      (lets [
-        "+" >: lambdas ["x", "y"] (primSucc @@ (var "+" @@ (primPred @@ var "x") @@ var "y"))]
-        $ var "+" @@ (primSucc @@ (primSucc @@ int32 0)) @@ (primSucc @@ int32 0))
-      T.int32,
-
---  --Untyped input:
---  --	letrecs f = (\x. (\y. (f 0 x)))
---  --		in f
---  --System F type:
---  -- 	(Nat -> (Nat -> v5))
-    expectPoly 9 []
-      (lets [
-        "f" >: lambdas ["x", "y"] (var "f" @@ int32 0 @@ var "x")]
-        $ var "f")
-      ["t0"] (T.functionMany [T.int32, T.int32, T.var "t0"]),
-
-----Untyped input:
-----	letrec f = (\x. (\y. (f 0 x)))
-----		g = (\xx. (\yy. (g 0 xx)))
-----		in (pair f g)
-----Type inferred by Hindley-Milner:
-----	((Int32 -> (Int32 -> v12)) * (Int32 -> (Int32 -> v14)))
-    expectPoly 10 []
-      (lets [
-        "f">: lambdas ["x", "y"] (var "f" @@ int32 0 @@ var "x"),
-        "g">: lambda "xx" $ lambda "yy" (var "g" @@ int32 0 @@ var "xx")]
-        $ pair (var "f") (var "g"))
-      ["t0", "t1"] (T.pair
-        (T.functionMany [T.int32, T.int32, T.var "t0"])
-        (T.functionMany [T.int32, T.int32, T.var "t1"])),
-
-    -- Note: in the following three test cases, the original Algorithm W implementation and the new inference
-    --       implementation find slightly different results. This is a result of tradeoffs between stronger support
-    --       for monomorphic recursion vs. stronger support for wide letrecs with polymorphism.
---  --Untyped input:
---  --	letrecs f = (\x. (\y. (g 0 x)))
---  --		g = (\u. (\v. (f v 0)))
---  --		in (pair f g)
---  --System F type:
---  -- 	((v12 -> (Nat -> v13)) * (Nat -> (v15 -> v16)))
-    expectPoly 11 []
-      (lets [
-        "f">: lambda "x" $ lambda "y" (var "g" @@ int32 0 @@ var "x"),
-        "g">: lambda "u" $ lambda "v" (var "f" @@ var "v" @@ int32 0)]
-        $ pair (var "f") (var "g"))
-      ["t0", "t1", "t2", "t3"] (T.pair
-        (T.functionMany [T.var "t0", T.int32, T.var "t1"])
-        (T.functionMany [T.int32, T.var "t2", T.var "t3"])),
-
---  --Untyped input:
---  --	letrecs f = (\x. (\y. (g 0 0)))
---  --		g = (\u. (\v. (f v 0)))
---  --		in (pair f g)
---  --System F type:
---  -- 	((Nat -> (Nat -> v12)) * (Nat -> (Nat -> v14)))
-    expectPoly 12 []
-      (lets [
-        "f">: lambda "x" $ lambda "y" (var "g" @@ int32 0 @@ int32 0),
-        "g">: lambda "u" $ lambda "v" (var "f" @@ var "v" @@ int32 0)]
-        $ pair (var "f") (var "g"))
-      ["t0", "t1"] (T.pair
-        (T.functionMany [T.int32, T.int32, T.var "t0"])
-        (T.functionMany [T.int32, T.int32, T.var "t1"])),
-
---  --Untyped input:
---  --	letrecs f = (\x. (\y. (g 0 x)))
---  --		g = (\u. (\v. (f 0 0)))
---  --		in (pair f g)
---  --System F type:
---  -- 	((Nat -> (Nat -> v12)) * (Nat -> (Nat -> v14)))
-    expectPoly 13 []
-      (lets [
-        "f">: lambda "x" $ lambda "y" (var "g" @@ int32 0 @@ var "x"),
-        "g">: lambda "u" $ lambda "v" (var "f" @@ int32 0 @@ int32 0)]
-        $ pair (var "f") (var "g"))
-      ["t0", "t1"] (T.pair
-        (T.functionMany [T.int32, T.int32, T.var "t0"])
-        (T.functionMany [T.int32, T.int32, T.var "t1"]))]
-  where
-    -- Placeholders for the primitives in @wisnesky's test cases; they are not necessarily the same functions,
-    -- but they have the same types.
-    primPred = primitive _math_negate
-    primSucc = primitive _math_negate
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/All.hs b/src/main/haskell/Hydra/Sources/Test/Inference/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/All.hs
+++ /dev/null
@@ -1,58 +0,0 @@
-
-module Hydra.Sources.Test.Inference.All where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing as Testing
-import Hydra.Sources.Kernel.Types.All
-import Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Meta.Core as Core
-import qualified Hydra.Dsl.Meta.Types as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List as L
-import qualified Data.Map  as M
-
-import qualified Hydra.Sources.Test.Inference.AlgebraicTypes as AlgebraicTypes
-import qualified Hydra.Sources.Test.Inference.AlgorithmW as AlgorithmW
-import qualified Hydra.Sources.Test.Inference.Classes as Classes
-import qualified Hydra.Sources.Test.Inference.Failures as Failures
-import qualified Hydra.Sources.Test.Inference.Fundamentals as Fundamentals
-import qualified Hydra.Sources.Test.Inference.KernelExamples as KernelExamples
-import qualified Hydra.Sources.Test.Inference.NominalTypes as NominalTypes
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.all"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = namespaces,
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Hydra's inference test suite"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-    namespaces = [
-      AlgebraicTypes.ns,
-      AlgorithmW.ns,
-      Classes.ns,
-      Failures.ns,
-      Fundamentals.ns,
-      KernelExamples.ns,
-      NominalTypes.ns]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    doc "The group of all inference tests" $
-    Testing.testGroup (string "inference") nothing (list subgroups) (list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = [
-      AlgebraicTypes.allTests,
-      AlgorithmW.allTests,
-      Classes.allTests,
-      Failures.allTests,
-      Fundamentals.allTests,
-      KernelExamples.allTests,
-      NominalTypes.allTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/Classes.hs b/src/main/haskell/Hydra/Sources/Test/Inference/Classes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/Classes.hs
+++ /dev/null
@@ -1,398 +0,0 @@
-module Hydra.Sources.Test.Inference.Classes where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.classes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Inference tests for type class constraints (ordering and equality)")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition testGroupForMonomorphicConstraints,
-      Phantoms.toDefinition testGroupForPrimitiveReferences,
-      Phantoms.toDefinition testGroupForPartialApplication,
-      Phantoms.toDefinition testGroupForLetBindings,
-      Phantoms.toDefinition testGroupForComposition,
-      Phantoms.toDefinition testGroupForNestedContainers,
-      Phantoms.toDefinition testGroupForCollectionTerms]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Type class constraint inference tests" $
-  supergroup "Type classes" [
-    testGroupForMonomorphicConstraints,
-    testGroupForPrimitiveReferences,
-    testGroupForPartialApplication,
-    testGroupForLetBindings,
-    testGroupForComposition,
-    testGroupForNestedContainers,
-    testGroupForCollectionTerms]
-
--- | When all type variables are instantiated to concrete types, constraints vanish.
-testGroupForMonomorphicConstraints :: TTermDefinition TestGroup
-testGroupForMonomorphicConstraints = define "testGroupForMonomorphicConstraints" $
-  supergroup "Monomorphic (constraints vanish)" [
-
-    subgroup "Map operations with concrete types" [
-      -- maps.fromList [("a", 1)] => Map String Int32
-      expectMono 1 []
-        (primitive _maps_fromList @@ list [pair (string "a") (int32 1)])
-        (T.map T.string T.int32),
-      -- maps.lookup "k" (maps.singleton "k" 42) => Optional Int32
-      expectMono 2 []
-        (primitive _maps_lookup @@ string "k" @@ (primitive _maps_singleton @@ string "k" @@ int32 42))
-        (T.optional T.int32),
-      -- maps.insert "k" 42 maps.empty => Map String Int32
-      expectMono 3 []
-        (primitive _maps_insert @@ string "k" @@ int32 42 @@ primitive _maps_empty)
-        (T.map T.string T.int32)],
-
-    subgroup "Set operations with concrete types" [
-      -- sets.fromList [1, 2, 3] => Set Int32
-      expectMono 1 []
-        (primitive _sets_fromList @@ list [int32 1, int32 2, int32 3])
-        (T.set T.int32),
-      -- sets.member 42 (sets.singleton 42) => Boolean
-      expectMono 2 []
-        (primitive _sets_member @@ int32 42 @@ (primitive _sets_singleton @@ int32 42))
-        T.boolean],
-
-    subgroup "Equality operations with concrete types" [
-      -- equality.equal 1 2 => Boolean
-      expectMono 1 []
-        (primitive _equality_equal @@ int32 1 @@ int32 2)
-        T.boolean,
-      -- equality.compare "a" "b" => Comparison
-      expectMono 2 []
-        (primitive _equality_compare @@ string "a" @@ string "b")
-        (T.var "hydra.util.Comparison")],
-
-    subgroup "List operations with concrete types" [
-      -- lists.sort [3, 1, 2] => [Int32]
-      expectMono 1 []
-        (primitive _lists_sort @@ list [int32 3, int32 1, int32 2])
-        (T.list T.int32)]]
-
--- | Bare primitive references should retain constraints on type variables.
-testGroupForPrimitiveReferences :: TTermDefinition TestGroup
-testGroupForPrimitiveReferences = define "testGroupForPrimitiveReferences" $
-  supergroup "Primitive references with constraints" [
-
-    subgroup "Map primitives (ordering on key type)" [
-      -- maps.fromList => forall k v. Ord k => [(k, v)] -> Map k v
-      expectPolyConstrained 1 []
-        (primitive _maps_fromList)
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.pair (T.var "t0") (T.var "t1")) (T.map (T.var "t0") (T.var "t1"))),
-      -- maps.lookup => forall k v. Ord k => k -> Map k v -> Optional v
-      expectPolyConstrained 2 []
-        (primitive _maps_lookup)
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.map (T.var "t0") (T.var "t1"), T.optional (T.var "t1")]),
-      -- maps.insert => forall k v. Ord k => k -> v -> Map k v -> Map k v
-      expectPolyConstrained 3 []
-        (primitive _maps_insert)
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.var "t1", T.map (T.var "t0") (T.var "t1"), T.map (T.var "t0") (T.var "t1")]),
-      -- maps.map => forall k v1 v2. Ord k => (v1 -> v2) -> Map k v1 -> Map k v2
-      expectPolyConstrained 4 []
-        (primitive _maps_map)
-        ["t0", "t1", "t2"] [("t2", ["ordering"])]
-        (T.functionMany [T.function (T.var "t0") (T.var "t1"), T.map (T.var "t2") (T.var "t0"), T.map (T.var "t2") (T.var "t1")]),
-      -- maps.empty => forall k v. Ord k => Map k v
-      expectPolyConstrained 5 []
-        (primitive _maps_empty)
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.map (T.var "t0") (T.var "t1"))],
-
-    subgroup "Set primitives (ordering on element type)" [
-      -- sets.fromList => forall x. Ord x => [x] -> Set x
-      expectPolyConstrained 1 []
-        (primitive _sets_fromList)
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.var "t0") (T.set $ T.var "t0")),
-      -- sets.member => forall x. Ord x => x -> Set x -> Boolean
-      expectPolyConstrained 2 []
-        (primitive _sets_member)
-        ["t0"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.set (T.var "t0"), T.boolean]),
-      -- sets.insert => forall x. Ord x => x -> Set x -> Set x
-      expectPolyConstrained 3 []
-        (primitive _sets_insert)
-        ["t0"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.set (T.var "t0"), T.set (T.var "t0")]),
-      -- sets.map => forall a b. (Ord a, Ord b) => (a -> b) -> Set a -> Set b
-      expectPolyConstrained 4 []
-        (primitive _sets_map)
-        ["t0", "t1"] [("t0", ["ordering"]), ("t1", ["ordering"])]
-        (T.functionMany [T.function (T.var "t0") (T.var "t1"), T.set (T.var "t0"), T.set (T.var "t1")])],
-
-    subgroup "Equality primitives" [
-      -- equality.equal => forall x. Eq x => x -> x -> Boolean
-      expectPolyConstrained 1 []
-        (primitive _equality_equal)
-        ["t0"] [("t0", ["equality"])]
-        (T.functionMany [T.var "t0", T.var "t0", T.boolean]),
-      -- equality.compare => forall x. Ord x => x -> x -> Comparison
-      expectPolyConstrained 2 []
-        (primitive _equality_compare)
-        ["t0"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.var "t0", T.var "hydra.util.Comparison"])],
-
-    subgroup "List primitives with constraints" [
-      -- lists.sort => forall x. Ord x => [x] -> [x]
-      expectPolyConstrained 1 []
-        (primitive _lists_sort)
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.var "t0") (T.list $ T.var "t0")),
-      -- lists.nub => forall x. Eq x => [x] -> [x]
-      expectPolyConstrained 2 []
-        (primitive _lists_nub)
-        ["t0"] [("t0", ["equality"])]
-        (T.function (T.list $ T.var "t0") (T.list $ T.var "t0")),
-      -- lists.elem => forall x. Eq x => x -> [x] -> Boolean
-      expectPolyConstrained 3 []
-        (primitive _lists_elem)
-        ["t0"] [("t0", ["equality"])]
-        (T.functionMany [T.var "t0", T.list (T.var "t0"), T.boolean])]]
-
--- | Partial application where the constrained variable is not yet fixed.
-testGroupForPartialApplication :: TTermDefinition TestGroup
-testGroupForPartialApplication = define "testGroupForPartialApplication" $
-  supergroup "Partial application preserving constraints" [
-
-    subgroup "Map partial application" [
-      -- \k -> maps.lookup k => forall k v. Ord k => k -> Map k v -> Optional v
-      expectPolyConstrained 1 []
-        (lambda "k" $ primitive _maps_lookup @@ var "k")
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.map (T.var "t0") (T.var "t1"), T.optional (T.var "t1")]),
-      -- \k -> \v -> maps.singleton k v => forall k v. Ord k => k -> v -> Map k v
-      expectPolyConstrained 2 []
-        (lambda "k" $ lambda "v" $ primitive _maps_singleton @@ var "k" @@ var "v")
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.var "t1", T.map (T.var "t0") (T.var "t1")])],
-
-    subgroup "Set partial application" [
-      -- \x -> sets.member x => forall x. Ord x => x -> Set x -> Boolean
-      expectPolyConstrained 1 []
-        (lambda "x" $ primitive _sets_member @@ var "x")
-        ["t0"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.set (T.var "t0"), T.boolean])],
-
-    subgroup "Equality partial application" [
-      -- \x -> \y -> equality.equal x y => forall x. Eq x => x -> x -> Boolean
-      expectPolyConstrained 1 []
-        (lambda "x" $ lambda "y" $ primitive _equality_equal @@ var "x" @@ var "y")
-        ["t0"] [("t0", ["equality"])]
-        (T.functionMany [T.var "t0", T.var "t0", T.boolean])],
-
-    subgroup "Partial application fixing the constrained variable" [
-      -- \v -> maps.singleton "key" v => forall v. String -> v -> Map String v (no constraint)
-      expectPoly 1 []
-        (lambda "v" $ primitive _maps_singleton @@ string "key" @@ var "v")
-        ["t0"] (T.function (T.var "t0") (T.map T.string (T.var "t0")))]]
-
--- | Constraints should propagate through let-bound generalizations.
-testGroupForLetBindings :: TTermDefinition TestGroup
-testGroupForLetBindings = define "testGroupForLetBindings" $
-  supergroup "Let binding constraint propagation" [
-
-    subgroup "Simple let-bound wrappers" [
-      -- let lookup = \k -> \m -> maps.lookup k m in lookup
-      expectPolyConstrained 1 []
-        (lets [
-          "lookup">: lambda "k" $ lambda "m" $ primitive _maps_lookup @@ var "k" @@ var "m"]
-          $ var "lookup")
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.map (T.var "t0") (T.var "t1"), T.optional (T.var "t1")]),
-      -- let member = \x -> \s -> sets.member x s in member
-      expectPolyConstrained 2 []
-        (lets [
-          "member">: lambda "x" $ lambda "s" $ primitive _sets_member @@ var "x" @@ var "s"]
-          $ var "member")
-        ["t0"] [("t0", ["ordering"])]
-        (T.functionMany [T.var "t0", T.set (T.var "t0"), T.boolean]),
-      -- let fromList = maps.fromList in fromList
-      expectPolyConstrained 3 []
-        (lets [
-          "fromList">: primitive _maps_fromList]
-          $ var "fromList")
-        ["t0", "t1"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.pair (T.var "t0") (T.var "t1")) (T.map (T.var "t0") (T.var "t1")))],
-
-    subgroup "Let-bound with partial instantiation" [
-      -- let f = \m -> maps.map math.negate m in f  => Ord k => Map k Int32 -> Map k Int32
-      expectPolyConstrained 1 []
-        (lets [
-          "f">: lambda "m" $ primitive _maps_map @@ primitive _math_negate @@ var "m"]
-          $ var "f")
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.map (T.var "t0") T.int32) (T.map (T.var "t0") T.int32)),
-      -- let f = \xs -> sets.fromList xs in f  => Ord x => [x] -> Set x
-      expectPolyConstrained 2 []
-        (lets [
-          "f">: lambda "xs" $ primitive _sets_fromList @@ var "xs"]
-          $ var "f")
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.var "t0") (T.set $ T.var "t0"))],
-
-    subgroup "Multiple uses of a constrained let binding" [
-      -- let f = maps.fromList in pair (f [("a", 1)]) (f [(true, "x")])
-      -- Both uses instantiate f, constraints vanish at concrete types
-      expectMono 1 []
-        (lets [
-          "f">: primitive _maps_fromList]
-          $ pair (var "f" @@ list [pair (string "a") (int32 1)])
-                 (var "f" @@ list [pair true (string "x")]))
-        (T.pair (T.map T.string T.int32) (T.map T.boolean T.string))]]
-
--- | Constraint propagation through function composition.
-testGroupForComposition :: TTermDefinition TestGroup
-testGroupForComposition = define "testGroupForComposition" $
-  supergroup "Composition and constraint merging" [
-
-    subgroup "Composing constrained primitives" [
-      -- \xs -> maps.fromList (lists.map (\x -> pair x x) xs)
-      -- Key type needs Ord (from maps.fromList)
-      expectPolyConstrained 1 []
-        (lambda "xs" $ primitive _maps_fromList @@ (primitive _lists_map @@ (lambda "x" $ pair (var "x") (var "x")) @@ var "xs"))
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.var "t0") (T.map (T.var "t0") (T.var "t0"))),
-      -- \f -> \xs -> sets.fromList (lists.map f xs)
-      -- Result element type needs Ord (from sets.fromList)
-      expectPolyConstrained 2 []
-        (lambda "f" $ lambda "xs" $ primitive _sets_fromList @@ (primitive _lists_map @@ var "f" @@ var "xs"))
-        ["t0", "t1"] [("t1", ["ordering"])]
-        (T.functionMany [T.function (T.var "t0") (T.var "t1"), T.list (T.var "t0"), T.set (T.var "t1")])],
-
-    subgroup "Composing map and sort" [
-      -- \m -> maps.map lists.sort m
-      -- Value type needs Ord (from lists.sort), key type needs Ord (from maps.map)
-      expectPolyConstrained 1 []
-        (lambda "m" $ primitive _maps_map @@ primitive _lists_sort @@ var "m")
-        ["t0", "t1"] [("t0", ["ordering"]), ("t1", ["ordering"])]
-        (T.function (T.map (T.var "t0") (T.list $ T.var "t1")) (T.map (T.var "t0") (T.list $ T.var "t1")))]]
-
--- | Nested container types where constraints apply at multiple levels.
-testGroupForNestedContainers :: TTermDefinition TestGroup
-testGroupForNestedContainers = define "testGroupForNestedContainers" $
-  supergroup "Nested containers" [
-
-    subgroup "Maps of sets" [
-      -- \m -> maps.map sets.fromList m
-      -- Map key needs Ord, set element needs Ord
-      expectPolyConstrained 1 []
-        (lambda "m" $ primitive _maps_map @@ primitive _sets_fromList @@ var "m")
-        ["t0", "t1"] [("t0", ["ordering"]), ("t1", ["ordering"])]
-        (T.function (T.map (T.var "t0") (T.list $ T.var "t1")) (T.map (T.var "t0") (T.set $ T.var "t1")))],
-
-    subgroup "Sets of sets" [
-      -- \xss -> sets.map sets.fromList xss
-      -- Outer: Set (List x) needs Ord on (List x); inner: sets.fromList needs Ord on x
-      -- Both source and target element types need Ord
-      expectPolyConstrained 1 []
-        (lambda "xss" $ primitive _sets_map @@ primitive _sets_fromList @@ var "xss")
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.set $ T.list $ T.var "t0") (T.set $ T.set $ T.var "t0"))],
-
-    subgroup "Map from sorted list" [
-      -- \xs -> maps.fromList (lists.map (\x -> pair x (sets.singleton x)) xs)
-      -- Key needs Ord (maps.fromList), element needs Ord (sets.singleton) — same variable
-      expectPolyConstrained 1 []
-        (lambda "xs" $ primitive _maps_fromList @@
-          (primitive _lists_map @@ (lambda "x" $ pair (var "x") (primitive _sets_singleton @@ var "x")) @@ var "xs"))
-        ["t0"] [("t0", ["ordering"])]
-        (T.function (T.list $ T.var "t0") (T.map (T.var "t0") (T.set $ T.var "t0")))]]
-
--- | Constraints derived from collection term literals (set and map syntax).
-testGroupForCollectionTerms :: TTermDefinition TestGroup
-testGroupForCollectionTerms = define "testGroupForCollectionTerms" $
-  supergroup "Collection term constraints" [
-
-    -- Set literals with polymorphic elements
-    subgroup "Set literals" [
-      -- \x -> set{x}  =>  forall t0. Ord t0 => t0 -> Set t0
-      expectPolyConstrained 1 [tag_disabledForMinimalInference]
-        (lambda "x" $ set [var "x"])
-        ["t0"] [("t0", ["ordering"])] (T.function (T.var "t0") (T.set $ T.var "t0")),
-      -- \x -> \y -> set{x, y}  =>  forall t0. Ord t0 => t0 -> t0 -> Set t0
-      expectPolyConstrained 2 [tag_disabledForMinimalInference]
-        (lambda "x" $ lambda "y" $ set [var "x", var "y"])
-        ["t0"] [("t0", ["ordering"])] (T.functionMany [T.var "t0", T.var "t0", T.set $ T.var "t0"]),
-      -- set{1, 2}  =>  Set Int32  (monomorphic: constraint vanishes)
-      expectMono 3 [tag_disabledForMinimalInference]
-        (set [int32 1, int32 2])
-        (T.set T.int32)],
-
-    -- Map literals with polymorphic keys
-    subgroup "Map literals" [
-      -- \k -> \v -> map{k: v}  =>  forall t0 t1. Ord t0 => t0 -> t1 -> Map t0 t1
-      expectPolyConstrained 1 [tag_disabledForMinimalInference]
-        (lambda "k" $ lambda "v" $ mapTerm [(var "k", var "v")])
-        ["t0", "t1"] [("t0", ["ordering"])] (T.functionMany [T.var "t0", T.var "t1", T.map (T.var "t0") (T.var "t1")]),
-      -- map{"a": 1}  =>  Map String Int32  (monomorphic: constraint vanishes)
-      expectMono 2 [tag_disabledForMinimalInference]
-        (mapTerm [(string "a", int32 1)])
-        (T.map T.string T.int32)],
-
-    -- Mixed: collection terms combined with primitives (monomorphic cases)
-    subgroup "Collection terms with primitives" [
-      -- \x -> set{x, math.negate x}  =>  Int32 -> Set Int32  (negate forces Int32)
-      expectMono 1 [tag_disabledForMinimalInference]
-        (lambda "x" $ set [var "x", primitive _math_negate @@ var "x"])
-        (T.function T.int32 (T.set T.int32)),
-      -- \k -> map{k: lists.sort (list [k])}
-      -- Key needs Ord (from map literal), value needs Ord (from lists.sort) — same variable
-      expectPolyConstrained 2 [tag_disabledForMinimalInference]
-        (lambda "k" $ mapTerm [(var "k", primitive _lists_sort @@ list [var "k"])])
-        ["t0"] [("t0", ["ordering"])] (T.function (T.var "t0") (T.map (T.var "t0") (T.list $ T.var "t0")))],
-
-    -- Constraint propagation through inferMany: constraints from sub-expressions
-    -- inside collection literals must survive into the final result.
-    subgroup "Constraint propagation through collection elements" [
-      -- \xs -> map{lists.length xs: sets.fromList xs}
-      -- Key is Int32 (concrete), value is Set t0 (Ord t0 from sets.fromList)
-      -- Tests: map value inference propagates constraints through inferMany
-      expectPolyConstrained 1 [tag_disabledForMinimalInference]
-        (lambda "xs" $ mapTerm [(primitive _lists_length @@ var "xs", primitive _sets_fromList @@ var "xs")])
-        ["t0"] [("t0", ["ordering"])] (T.function (T.list $ T.var "t0") (T.map T.int32 (T.set $ T.var "t0"))),
-      -- [lists.sort]  =>  forall t0. Ord t0 => [t0 -> t0]
-      -- Tests: list element inference propagates constraints through inferMany
-      expectPolyConstrained 2 [tag_disabledForMinimalInference]
-        (list [primitive _lists_sort])
-        ["t0"] [("t0", ["ordering"])] (T.list $ T.function (T.list $ T.var "t0") (T.list $ T.var "t0")),
-      -- pair (sets.fromList) 42  =>  forall t0. Ord t0 => pair<([t0] -> Set t0), Int32>
-      -- Tests: pair inference propagates constraints through inferMany
-      expectPolyConstrained 3 [tag_disabledForMinimalInference]
-        (pair (primitive _sets_fromList) (int32 42))
-        ["t0"] [("t0", ["ordering"])] (T.pair (T.function (T.list $ T.var "t0") (T.set $ T.var "t0")) T.int32),
-      -- \xs -> set{sets.fromList xs}
-      -- Outer set needs Ord on set<t0>, inner sets.fromList needs Ord on t0
-      -- Tests: set element inference propagates constraints through inferMany
-      expectPolyConstrained 4 [tag_disabledForMinimalInference]
-        (lambda "xs" $ set [primitive _sets_fromList @@ var "xs"])
-        ["t0"] [("t0", ["ordering"])] (T.function (T.list $ T.var "t0") (T.set $ T.set $ T.var "t0"))]]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/Failures.hs b/src/main/haskell/Hydra/Sources/Test/Inference/Failures.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/Failures.hs
+++ /dev/null
@@ -1,473 +0,0 @@
-module Hydra.Sources.Test.Inference.Failures where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.failures"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Inference tests for expected failures")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition undefinedVariableTests,
-      Phantoms.toDefinition unificationFailureTests,
-      Phantoms.toDefinition invalidApplicationTests,
-      Phantoms.toDefinition selfApplicationTests,
-      Phantoms.toDefinition arityMismatchTests,
-      Phantoms.toDefinition recursiveTypeTests,
-      Phantoms.toDefinition occurCheckTests,
-      Phantoms.toDefinition typeConstructorMisuseTests,
-      Phantoms.toDefinition polymorphismViolationTests,
-      Phantoms.toDefinition letBindingMismatchTests,
-      Phantoms.toDefinition constraintSolverEdgeCaseTests,
-      Phantoms.toDefinition primitiveTypeErrorTests,
-      Phantoms.toDefinition complexConstraintFailureTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Expected failure tests" $
-  supergroup "Expected failures" [
-    undefinedVariableTests,
-    unificationFailureTests,
-    invalidApplicationTests,
-    selfApplicationTests,
-    arityMismatchTests,
-    recursiveTypeTests,
-    occurCheckTests,
-    typeConstructorMisuseTests,
-    polymorphismViolationTests,
-    letBindingMismatchTests,
-    constraintSolverEdgeCaseTests,
-    primitiveTypeErrorTests,
-    complexConstraintFailureTests]
-
-undefinedVariableTests :: TTermDefinition TestGroup
-undefinedVariableTests = define "undefinedVariableTests" $
-  supergroup "Undefined variable" [
-  subgroup "Basic unbound variables" [
-    expectFailure 1 []
-      (var "x"),
-    expectFailure 2 []
-      (lambda "x" $ var "y"),
-    expectFailure 3 []
-      (lets ["x">: int32 42] $ var "y")],
-
-  subgroup "Unbound in let expressions" [
-    expectFailure 1 []
-      (lets ["x">: var "y"] $ var "x"),
-    expectFailure 2 []
-      (lets ["x">: var "y", "z">: int32 42] $ var "x"),
-    expectFailure 3 []
-      (lets ["x">: int32 42, "y">: var "z"] $ pair (var "x") (var "y"))],
-
-  subgroup "Shadowing scope errors" [
-    expectFailure 1 []
-      (lambda "x" $ lets ["y">: var "x"] $ var "z"),
-    expectFailure 2 []
-      (lets ["x">: int32 42] $ lets ["y">: var "x"] $ var "z"),
-    expectFailure 3 []
-      (lets ["x">: lambda "y" $ var "z"] $ var "x")]]
-
-unificationFailureTests :: TTermDefinition TestGroup
-unificationFailureTests = define "unificationFailureTests" $
-  supergroup "Unification failure" [
-  subgroup "Basic type mismatches" [
-    expectFailure 1 []
-      (primitive _math_add @@ int32 42 @@ string "foo"),
-    expectFailure 2 []
-      (list [int32 42, string "foo"]),
-    expectFailure 3 []
-      (list [list [int32 42], string "foo"]),
-    expectFailure 4 []
-      (pair (int32 42) (string "foo") @@ string "bar")],
-
-  subgroup "Collection type mismatches" [
-    expectFailure 1 []
-      (primitive _lists_cons @@ int32 42 @@ string "not a list"),
-    expectFailure 2 []
-      (list [int32 42, list [string "foo"]]),
-    expectFailure 3 []
-      (pair (list [int32 42]) (list [string "foo"]) @@ int32 137),
-    expectFailure 4 []
-      (primitive _lists_concat @@ list [list [int32 42], list [string "foo"]])],
-
-  subgroup "Conditional type mismatches" [
-    expectFailure 1 []
-      (primitive _logic_ifElse @@ true @@ int32 42 @@ string "foo"),
-    expectFailure 2 []
-      (primitive _logic_ifElse @@ true @@ list [int32 42] @@ string "foo"),
-    expectFailure 3 []
-      (primitive _logic_ifElse @@ true @@ (lambda "x" $ var "x") @@ int32 42)],
-
-  subgroup "Polymorphic instantiation conflicts" [
-    expectFailure 1 []
-      (lets ["f">: lambda "x" $ var "x"] $
-        list [var "f" @@ int32 42, var "f" @@ string "foo"]),
-    expectFailure 2 []
-      (lets ["id">: lambda "x" $ var "x"] $
-        pair (var "id" @@ int32 42) (var "id" @@ string "foo") @@ true),
-    expectFailure 3 []
-      (lets ["cons">: primitive _lists_cons] $
-        list [var "cons" @@ int32 42, var "cons" @@ string "foo"])]]
-
-invalidApplicationTests :: TTermDefinition TestGroup
-invalidApplicationTests = define "invalidApplicationTests" $
-  supergroup "Invalid application" [
-  subgroup "Non-function application" [
-    expectFailure 1 []
-      (int32 42 @@ int32 137),
-    expectFailure 2 []
-      (string "foo" @@ int32 42),
-    expectFailure 3 []
-      (true @@ false),
-    expectFailure 4 []
-      (float64 3.14 @@ int32 42)],
-
-  subgroup "Collection application" [
-    expectFailure 1 []
-      (list [int32 42] @@ string "bar"),
-    expectFailure 2 []
-      (pair (int32 42) (string "foo") @@ true),
-    expectFailure 3 []
-      (list [] @@ int32 42),
-    expectFailure 4 []
-      (tuple [int32 1, int32 2, int32 3] @@ string "index")],
-
-  subgroup "Primitive misapplication" [
-    expectFailure 1 []
-      (primitive _maps_empty @@ string "foo"),
-    expectFailure 2 []
-      (primitive _sets_empty @@ int32 42),
-    expectFailure 3 []
-      (optional nothing @@ string "value"),
-    expectFailure 4 []
-      (list [] @@ true)]]
-
-selfApplicationTests :: TTermDefinition TestGroup
-selfApplicationTests = define "selfApplicationTests" $
-  supergroup "Self-application" [
-  subgroup "Direct self-application" [
-    expectFailure 1 []
-      (lambda "x" $ var "x" @@ var "x"),
-    expectFailure 2 []
-      (lets ["f">: var "f" @@ var "f"] $ var "f")],
-
-  subgroup "Indirect self-application" [
-    expectFailure 1 []
-      (lets ["f">: lambda "x" $ var "g" @@ var "f", "g">: lambda "y" $ var "y" @@ var "y"] $ var "f"),
-    expectFailure 2 []
-      (lets ["a">: var "b" @@ var "a", "b">: lambda "x" $ var "x" @@ var "x"] $ var "a"),
-    expectFailure 3 []
-      (lets ["cycle">: lambda "f" $ var "f" @@ var "cycle"] $ var "cycle" @@ var "cycle")]]
-
-arityMismatchTests :: TTermDefinition TestGroup
-arityMismatchTests = define "arityMismatchTests" $
-  supergroup "Arity mismatch" [
-  subgroup "Too many arguments" [
-    expectFailure 1 []
-      (primitive _math_add @@ int32 42 @@ int32 137 @@ int32 999),
-    expectFailure 2 []
-      ((lambda "x" $ lambda "y" $ var "x") @@ int32 42 @@ string "foo" @@ true),
-    expectFailure 3 []
-      (primitive _lists_cons @@ int32 42 @@ list [int32 137] @@ string "extra")],
-
-  subgroup "Wrong argument types with extra args" [
-    expectFailure 1 []
-      (primitive _strings_length @@ int32 42 @@ string "extra"),
-    expectFailure 2 []
-      (primitive _logic_not @@ int32 42 @@ true),
-    expectFailure 3 []
-      ((lambda "x" $ int32 42) @@ string "arg" @@ int32 137 @@ true)]]
-
-recursiveTypeTests :: TTermDefinition TestGroup
-recursiveTypeTests = define "recursiveTypeTests" $
-  supergroup "Recursive type construction" [
-  subgroup "Direct recursive types" [
-    expectFailure 1 []
-      (lets ["x">: list [var "x"]] $ var "x"),
-    expectFailure 2 []
-      (lets ["x">: pair (var "x") (int32 42)] $ var "x"),
-    expectFailure 3 []
-      (lets ["x">: tuple [var "x", var "x"]] $ var "x")],
-
-  subgroup "Recursive function types" [
-    expectFailure 1 []
-      (lets ["f">: lambda "x" $ var "f"] $ var "f"),
-    expectFailure 2 []
-      (lets ["f">: lambda "x" $ lambda "y" $ var "f" @@ var "f"] $ var "f"),
-    expectFailure 3 []
-      (lets ["f">: lambda "x" $ list [var "f"]] $ var "f")],
-
-  subgroup "Mutually recursive types" [
-    expectFailure 1 []
-      (lets ["x">: list [var "y"], "y">: pair (var "x") (int32 42)] $ var "x"),
-    expectFailure 2 []
-      (lets ["a">: lambda "x" $ var "b", "b">: var "a"] $ var "a"),
-    expectFailure 3 []
-      (lets ["f">: list [var "g"], "g">: tuple [var "f", var "f"]] $ var "f")]]
-
-occurCheckTests :: TTermDefinition TestGroup
-occurCheckTests = define "occurCheckTests" $
-  supergroup "Occur check failures" [
-  subgroup "Function occur checks" [
-    expectFailure 1 []
-      (lets ["g">: lambda "h" $ var "g" @@ var "g" @@ var "h"] $ var "g")],
-
-  subgroup "Mutual occur checks" [
-    expectFailure 1 []
-      (lets [
-        "f">: lambda "x" $ var "g" @@ var "f",
-        "g">: lambda "y" $ var "f" @@ var "g"] $ var "f"),
-    expectFailure 2 []
-      (lets [
-        "a">: lambda "x" $ var "b" @@ var "a" @@ var "x",
-        "b">: lambda "y" $ var "a" @@ var "b"] $ var "a"),
-    expectFailure 3 []
-      (lets [
-        "cycle1">: var "cycle2" @@ var "cycle1",
-        "cycle2">: lambda "x" $ var "cycle1" @@ var "x"] $ var "cycle1")],
-
-  subgroup "Complex occur checks" [
-    expectFailure 1 []
-      (lets ["omega">: lambda "x" $ var "x" @@ var "x" @@ var "omega"] $ var "omega"),
-    expectFailure 2 []
-      (lets ["loop">: lambda "x" $ lambda "y" $ var "loop" @@ (var "x" @@ var "loop") @@ var "y"] $ var "loop")]]
-
-typeConstructorMisuseTests :: TTermDefinition TestGroup
-typeConstructorMisuseTests = define "typeConstructorMisuseTests" $
-  supergroup "Type constructor misuse" [
-  subgroup "List constructor errors" [
-    expectFailure 1 []
-      (primitive _lists_cons @@ (list [int32 42]) @@ int32 137),  -- Wrong order
-    expectFailure 2 []
-      (primitive _lists_length @@ int32 42),  -- Not a list
-    expectFailure 3 []
-      (primitive _lists_maybeHead @@ string "not a list"),
-    expectFailure 4 []
-      (primitive _lists_maybeTail @@ int32 42)],
-
-  subgroup "String constructor errors" [
-    expectFailure 1 []
-      (primitive _strings_length @@ list [string "foo"]),  -- Not a string
-    expectFailure 2 []
-      (primitive _strings_cat @@ int32 42),
-    expectFailure 3 []
-      (primitive _strings_fromList @@ string "not a list"),
-    expectFailure 4 []
-      (primitive _strings_toList @@ int32 42)],
-
-  subgroup "Math constructor errors" [
-    expectFailure 1 []
-      (primitive _math_add @@ list [int32 42] @@ int32 137),  -- Wrong type for math
-    expectFailure 2 []
-      (primitive _math_sub @@ string "not a number" @@ int32 42),
-    expectFailure 3 []
-      (primitive _math_mul @@ int32 42 @@ string "not a number"),
-    expectFailure 4 []
-      (primitive _math_maybeDiv @@ true @@ false)]]
-
-polymorphismViolationTests :: TTermDefinition TestGroup
-polymorphismViolationTests = define "polymorphismViolationTests" $
-  supergroup "Polymorphism violations" [
-  subgroup "Identity function violations" [
-    expectFailure 1 []
-      (lets ["id">: lambda "x" $ var "x"] $
-        primitive _math_add @@ (var "id" @@ int32 42) @@ (var "id" @@ string "foo")),
-    expectFailure 2 []
-      (lets ["id">: lambda "x" $ var "x"] $
-        list [var "id" @@ int32 42, var "id" @@ string "foo"]),
-    expectFailure 3 []
-      (lets ["id">: lambda "x" $ var "x"] $
-        pair (var "id" @@ int32 42) (var "id" @@ string "foo") @@ true)],
-
-  subgroup "Constrained polymorphism violations" [
-    expectFailure 1 []
-      (lets ["f">: lambda "x" $ list [var "x", int32 42]] $ var "f" @@ string "foo"),
-    expectFailure 2 []
-      (lets ["g">: lambda "x" $ pair (var "x") (string "constant")] $
-        primitive _math_add
-          @@ (primitive _pairs_first @@ (var "g" @@ int32 42))
-          @@ (primitive _pairs_first @@ (var "g" @@ string "bad"))),
-    expectFailure 3 []
-      (lets ["h">: lambda "x" $ primitive _lists_cons @@ var "x" @@ list [int32 0]] $
-        var "h" @@ string "incompatible")],
-
-  subgroup "Higher-order polymorphism violations" [
-    expectFailure 1 []
-      (lambda "f" $ pair (var "f" @@ int32 42) (var "f" @@ string "foo")),
-    expectFailure 2 []
-      (lambda "g" $ list [var "g" @@ int32 1, var "g" @@ string "bad"]),
-    expectFailure 3 []
-      (lambda "h" $ primitive _math_add @@ (var "h" @@ int32 42) @@ (var "h" @@ string "error"))]]
-
-letBindingMismatchTests :: TTermDefinition TestGroup
-letBindingMismatchTests = define "letBindingMismatchTests" $
-  supergroup "Let binding type mismatches" [
-  subgroup "Application type mismatches" [
-    expectFailure 1 []
-      (lets [
-        "x">: int32 42,
-        "y">: var "x" @@ string "foo"] $ var "y"),
-    expectFailure 2 []
-      (lets [
-        "f">: lambda "x" $ string "result",
-        "g">: var "f" @@ int32 42 @@ string "extra"] $ var "g"),
-    expectFailure 3 []
-      (lets [
-        "num">: int32 42,
-        "bad">: var "num" @@ var "num"] $ var "bad")],
-
-  subgroup "Collection type mismatches" [
-    expectFailure 1 []
-      (lets [
-        "list1">: list [int32 42],
-        "list2">: primitive _lists_cons @@ string "foo" @@ var "list1"] $ var "list2"),
-    expectFailure 2 []
-      (lets [
-        "nums">: list [int32 1, int32 2],
-        "mixed">: primitive _lists_cons @@ string "bad" @@ var "nums"] $ var "mixed"),
-    expectFailure 3 []
-      (lets [
-        "pair1">: pair (int32 42) (string "foo"),
-        "pair2">: pair (string "bar") (var "pair1")] $
-        primitive _math_add @@ (primitive _pairs_first @@ var "pair2") @@ int32 1)],
-
-  subgroup "Function binding mismatches" [
-    expectFailure 1 []
-      (lets [
-        "add">: primitive _math_add,
-        "badCall">: var "add" @@ string "not a number" @@ int32 42] $
-        var "badCall"),
-    expectFailure 2 []
-      (lets [
-        "f">: lambda "x" $ lambda "y" $ var "x",
-        "g">: var "f" @@ int32 42,
-        "bad">: var "g" @@ string "foo" @@ true] $
-        var "bad")]]
-
-constraintSolverEdgeCaseTests :: TTermDefinition TestGroup
-constraintSolverEdgeCaseTests = define "constraintSolverEdgeCaseTests" $
-  supergroup "Constraint solver edge cases" [
-  subgroup "Complex constraint propagation" [
-    expectFailure 1 []
-      (lets [
-        "complex">: lambda "f" $ lambda "g" $ lambda "x" $
-          var "f" @@ (var "g" @@ var "x") @@ (var "g" @@ (var "f" @@ var "x")),
-        "bad">: var "complex" @@ (lambda "a" $ int32 42) @@ (lambda "b" $ string "foo")] $ var "bad")],
-
-  subgroup "Fixed point combinators" [
-    expectFailure 1 []
-      (lets [
-        "fix">: lambda "f" $ var "f" @@ var "f",
-        "bad">: var "fix" @@ (lambda "x" $ var "x" @@ var "x")] $ var "bad"),
-    expectFailure 2 []
-      (lets [
-        "y">: lambda "f" $ (lambda "x" $ var "f" @@ (var "x" @@ var "x")) @@
-                           (lambda "x" $ var "f" @@ (var "x" @@ var "x")),
-        "bad">: var "y" @@ (lambda "rec" $ lambda "n" $ var "rec" @@ var "rec")] $ var "bad"),
-    expectFailure 3 []
-      (lets [
-        "omega">: lambda "x" $ var "x" @@ var "x",
-        "bad">: var "omega" @@ var "omega"] $ var "bad")],
-
-  subgroup "Constraint cycles" [
-    expectFailure 1 []
-      (lets [
-        "a">: lambda "x" $ var "b" @@ var "c" @@ var "x",
-        "b">: lambda "y" $ var "c" @@ var "a" @@ var "y",
-        "c">: lambda "z" $ var "a" @@ var "b" @@ var "z"] $
-        var "a" @@ int32 42),
-    expectFailure 2 []
-      (lets [
-        "circular">: lambda "f" $ var "f" @@ var "circular" @@ var "f"] $
-        var "circular" @@ var "circular")]]
-
-primitiveTypeErrorTests :: TTermDefinition TestGroup
-primitiveTypeErrorTests = define "primitiveTypeErrorTests" $
-  supergroup "Primitive function type errors" [
-  subgroup "Logic primitive errors" [
-    expectFailure 1 []
-      (primitive _logic_ifElse @@ int32 42 @@ true @@ false),  -- Condition not boolean
-    expectFailure 2 []
-      (primitive _logic_ifElse @@ true @@ int32 42 @@ false),  -- Branch type mismatch
-    expectFailure 3 []
-      (primitive _logic_and @@ int32 42 @@ true),
-    expectFailure 4 []
-      (primitive _logic_or @@ true @@ string "not boolean")],
-
-  subgroup "Collection primitive errors" [
-    expectFailure 1 []
-      (primitive _maps_lookup @@ int32 42 @@ string "not a map"),  -- Not a map
-    expectFailure 2 []
-      (primitive _sets_member @@ int32 42 @@ list [int32 42]),  -- Not a set
-    expectFailure 3 []
-      (primitive _lists_maybeHead @@ string "not a list"),
-    expectFailure 4 []
-      (primitive _maybes_fromMaybe @@ int32 42 @@ string "not optional")],
-
-  subgroup "Math primitive errors" [
-    expectFailure 1 []
-      (primitive _math_add @@ string "not a number" @@ int32 42),
-    expectFailure 2 []
-      (primitive _math_mul @@ true @@ false),
-    expectFailure 3 []
-      (primitive _math_maybeDiv @@ list [int32 42] @@ int32 2),
-    expectFailure 4 []
-      (primitive _math_maybeMod @@ int32 42 @@ string "not a number")]]
-
-complexConstraintFailureTests :: TTermDefinition TestGroup
-complexConstraintFailureTests = define "complexConstraintFailureTests" $
-  supergroup "Complex constraint failures" [
-  subgroup "Multi-level constraint conflicts" [
-    expectFailure 1 []
-      (lets [
-        "f">: lambda "x" $ lambda "y" $ pair (var "x") (var "y"),
-        "g">: lambda "a" $ var "f" @@ var "a" @@ var "a",
-        "h">: var "g" @@ (lambda "z" $ var "z")] $ var "h" @@ int32 42),
-    expectFailure 2 []
-      (lets [
-        "weird">: lambda "f" $ lambda "x" $ var "f" @@ (var "f" @@ var "x"),
-        "bad">: var "weird" @@ (lambda "y" $ pair (var "y") (int32 42))] $ var "bad"),
-    expectFailure 3 []
-      (lets [
-        "nested">: lambda "f" $ lambda "g" $ lambda "x" $
-          var "f" @@ (var "g" @@ (var "f" @@ (var "g" @@ var "x"))),
-        "int_f">: lambda "n" $ primitive _math_add @@ var "n" @@ int32 1,
-        "str_g">: lambda "s" $ primitive _strings_cat @@ list [var "s", string "!"],
-        "bad">: var "nested" @@ var "int_f" @@ var "str_g"] $ var "bad")],
-
-  subgroup "Function composition failures" [
-    expectFailure 1 []
-      (lets [
-        "triple">: lambda "f" $ lambda "x" $ var "f" @@ (var "f" @@ (var "f" @@ var "x")),
-        "increment">: lambda "n" $ primitive _math_add @@ var "n" @@ int32 1,
-        "stringify">: lambda "s" $ primitive _strings_cat @@ list [var "s", string "!"],
-        "bad">: var "triple" @@ var "increment" @@ var "stringify"] $ var "bad"),
-    expectFailure 2 []
-      (lets [
-        "compose">: lambda "f" $ lambda "g" $ lambda "x" $ var "f" @@ (var "g" @@ var "x"),
-        "reverse_compose">: lambda "g" $ lambda "f" $ lambda "x" $ var "f" @@ (var "g" @@ var "x"),
-        "bad">: var "compose" @@ var "reverse_compose" @@ primitive _math_add @@ primitive _strings_length] $
-        var "bad")]]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/Fundamentals.hs b/src/main/haskell/Hydra/Sources/Test/Inference/Fundamentals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/Fundamentals.hs
+++ /dev/null
@@ -1,660 +0,0 @@
-module Hydra.Sources.Test.Inference.Fundamentals where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.fundamentals"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Inference tests for fundamental language features")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition testGroupForLambdas,
-      Phantoms.toDefinition testGroupForLet,
-      Phantoms.toDefinition testGroupForLiterals,
-      Phantoms.toDefinition testGroupForPathologicalTerms,
-      Phantoms.toDefinition testGroupForPolymorphism,
-      Phantoms.toDefinition testGroupForPrimitives]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Fundamental language feature tests" $
-  supergroup "Fundamentals" [
-    testGroupForLambdas,
-    testGroupForLet,
-    testGroupForLiterals,
-    testGroupForPathologicalTerms,
-    testGroupForPolymorphism,
-    testGroupForPrimitives]
-
-testGroupForLambdas :: TTermDefinition TestGroup
-testGroupForLambdas = define "testGroupForLambdas" $
-  supergroup "Lambdas" [
-    subgroup "Simple lambdas" [
-      expectPoly 1 []
-        (lambda "x" $ var "x")
-        ["t0"] (T.function (T.var "t0") (T.var "t0")),
-      expectPoly 2 []
-        (lambda "x" $ int16 137)
-        ["t0"] (T.function (T.var "t0") T.int16)],
-
-    subgroup "Nested lambdas" [
-      expectMono 1 []
-        (lambda "x" $ lambda "y" $ primitive _math_add @@ var "x" @@ var "y")
-        (T.functionMany [T.int32, T.int32, T.int32]),
-      expectMono 2 []
-        (lambda "x" $ list [lambda "y" $ primitive _math_add @@ var "x" @@ var "y"])
-        (T.function T.int32 $ T.list $ T.function T.int32 T.int32)],
-
-    subgroup "Nested lambdas with shadowing" [
-      expectPoly 1 []
-        (lambda "x" $ lambda "x" $ primitive _math_add @@ var "x" @@ int32 42)
-        ["t0"] (T.function (T.var "t0") (T.function T.int32 T.int32))]]
-
-testGroupForLet :: TTermDefinition TestGroup
-testGroupForLet = define "testGroupForLet" $
-  supergroup "Let terms" [
-
-    subgroup "Simple" [
-      expectPoly 1  []
-        (lets ["x">: float32 42.0] (lambda "y" (lambda "z" (var "x"))))
-        ["t0", "t1"] (T.function (T.var "t0") (T.function (T.var "t1") T.float32))],
-    subgroup "Empty let" [
-      expectMono 1 []
-        (lets [] $ int32 42)
-        T.int32,
-      expectPoly 2 []
-        (lets [] $ lambda "x" $ var "x")
-        ["t0"] (T.function (T.var "t0") (T.var "t0"))],
-    subgroup "Trivial let" [
-      expectMono 1  []
-        (lets [
-          "foo">: int32 42]
-          $ var "foo")
-        T.int32,
-      expectMono 2 []
-        (lets [
-            "foo">: int32 42]
-          $ var "foo")
-        T.int32],
-    subgroup "Multiple references to a let-bound term" [
-      expectMono 1 []
-        (lets [
-          "foo">: int32 42,
-          "bar">: int32 137]
-          $ list [var "foo", var "bar", var "foo"])
-        (T.list T.int32)],
-
-    subgroup "Nested let" [
-      expectMono 1 []
-        (lets [
-          "foo">: int32 42]
-          $ lets [
-            "bar">: int32 137]
-            $ list [var "foo", var "bar"])
-        (T.list T.int32),
-      expectMono 2 []
-        (lets [
-          "foo">: int32 42]
-          $ lets [
-            "bar">: pair (var "foo") (int32 137)]
-            $ var "bar")
-        (T.pair T.int32 T.int32),
-      expectPoly 3 []
-        (lets [
-          "sng">: lambda "x" $ list [var "x"]]
-          $ lets [
-            "foo">: var "sng" @@ int32 42,
-            "bar">: var "sng" @@ string "bar",
-            "quux">: lambda "x" $ var "sng" @@ var "x"]
-            $ pair (var "foo") (pair (var "bar") (var "quux" @@ list [])))
-        ["t0"] (T.pair (T.list T.int32) (T.pair (T.list T.string) (T.list $ T.list $ T.var "t0")))],
-
-    subgroup "Nested let with shadowing" [
-      expectMono 1 []
-        (lets [
-          "foo">: string "foo"]
-          $ lets [
-            "foo">: int32 137]
-            $ var "foo")
-        T.int32,
-      expectMono 2 []
-        (lets [
-          "foo">: string "foo",
-          "bar">: var "foo"]
-          $ lets [
-            "foo">: int32 137]
-            $ pair (var "bar") (var "foo"))
-        (T.pair T.string T.int32)],
-
-    subgroup "Let-polymorphism" [
-      expectPoly 1 []
-        (lets ["x">: float32 42.0] $ lambdas ["y", "z"] $ var "x")
-        ["t0", "t1"] (T.function (T.var "t0") (T.function (T.var "t1") T.float32)),
-      -- Example from https://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec23.pdf
-      expectMono 2 []
-        (lets [
-            "square">: lambda "z" $ primitive _math_mul @@ var "z" @@ var "z"] $
-          lambdas ["f", "x", "y"] $ primitive _logic_ifElse
-              @@ (var "f" @@ (var "square" @@ var "x") @@ var "y")
-              @@ (var "f" @@ var "x" @@ (var "f" @@ var "x" @@ var "y"))
-              @@ (var "f" @@ var "x" @@ var "y"))
-        (T.functionMany [
-          T.functionMany [T.int32, T.boolean, T.boolean], T.int32, T.boolean, T.boolean]),
-      expectPoly 3 []
-        (lets [
-          "id">: lambda "x" $ var "x"]
-          $ lambda "x" $ var "id" @@ (var "id" @@ var "x"))
-        ["t0"] (T.function (T.var "t0") (T.var "t0")),
-      expectMono 4 []
-        (lets [
-          "id">: lambda "x" $ var "x"]
-          $ var "id" @@ (list [var "id" @@ int32 42]))
-        (T.list T.int32),
-      expectPoly 5 []
-        (lets [
-          "id">: lambda "x" $ var "x"]
-          $ lambda "x" (var "id" @@ (list [var "id" @@ var "x"])))
-        ["t0"] (T.function (T.var "t0") (T.list $ T.var "t0")),
-      expectMono 6 []
-        (lets [
-          "id">: lambda "x" $ var "x"]
-          $ pair (var "id" @@ int32 42) (var "id" @@ string "foo"))
-        (T.pair T.int32 T.string),
-      expectMono 7 []
-        (lets [
-          "list">: lambda "x" $ list [var "x"]]
-          $ pair (var "list" @@ int32 42) (var "list" @@ string "foo"))
-        (T.pair (T.list T.int32) (T.list T.string)),
-      expectPoly 8 [tag_disabled]
-        (lets [
-          "singleton">: lambda "x" $ list [var "x"],
-          "f">: lambda "x" $ lambda "y" $ primitive _lists_cons
-            @@ (pair (var "singleton" @@ var "x") (var "singleton" @@ var "y"))
-            @@ (var "g" @@ var "x" @@ var "y"),
-          "g">: lambda "x" $ lambda "y" $ var "f" @@ int32 42 @@ var "y"]
-          $ var "f")
-        ["t0"] (T.list $ T.pair T.int32 (T.var "t0")),
-      expectMono 9 [tag_disabledForMinimalInference]
-        (lets [
-          "id">: lambda "x" $ var "x",
-          "fortytwo">: var "id" @@ int32 42,
-          "foo">: var "id" @@ string "foo"]
-          $ pair (var "fortytwo") (var "foo"))
-        (T.pair T.int32 T.string),
-      expectMono 10 [tag_disabledForMinimalInference]
-        (lets [
-          "fortytwo">: var "id" @@ int32 42,
-          "id">: lambda "x" $ var "x",
-          "foo">: var "id" @@ string "foo"]
-          $ pair (var "fortytwo") (var "foo"))
-        (T.pair T.int32 T.string)],
-
-    subgroup "Recursive and mutually recursive let (@wisnesky's test cases)" [
-      expectPoly 1 []
-        (lets [
-          "f">: lambda "x" $ lambda "y" (var "f" @@ int32 0 @@ var "x")]
-          $ var "f")
-        ["t0"] (T.function T.int32 (T.function T.int32 (T.var "t0"))),
-      -- Try: :t (let (f, g) = (g, f) in (f, g))
-      expectPoly 2 []
-        (lets [
-          "x">: var "y",
-          "y">: var "x"] $
-          pair (var "x") (var "y"))
-        ["t0", "t1"] (T.pair (T.var "t0") (T.var "t1")),
-      expectPoly 3 [tag_disabled]
-        (lets [
-          "f">: lambda "x" $ lambda "y" (var "g" @@ int32 0 @@ var "x"),
-          "g">: lambda "u" $ lambda "v" (var "f" @@ var "v" @@ int32 0)]
-          $ pair (var "f") (var "g"))
-        ["t0", "t1"] (T.pair
-          (T.functionMany [T.var "t0", T.int32, T.var "t1"])
-          (T.functionMany [T.int32, T.var "v0", T.var "t1"])),
-      expectMono 4 []
-        -- letrec + = (\x . (\y . (S (+ (P x) y)))) in (+ (S (S 0)) (S 0))
-        (lets [
-          "plus">: lambda "x" $ lambda "y" $ s @@ (var "plus" @@ (p @@ var "x") @@ var "y")]
-          $ var "plus" @@ (s @@ (s @@ int32 0)) @@ (s @@ int32 0))
-        T.int32,
-      expectMono 5 []
-        -- letrecs id = (\z. z)
-        --     f = (\p0. (pair (id p0) (id p0)))
-        --     in 0
-        (lets [
-          "id">: lambda "z" $ var "z",
-          "f">: lambda "p0" $ pair (var "id" @@ var "p0") (var "id" @@ var "p0")]
-          $ int32 0)
-        T.int32,
-      expectPoly 6 []
-        (lets [
-           "x">: lambda "y" $ var "y",
-           "z">: var "x"] $
-           pair (var "x") (var "z"))
-        ["t0", "t1"] (T.pair (T.function (T.var "t0") (T.var "t0")) (T.function (T.var "t1") (T.var "t1"))),
-      expectPoly 7 []
-        (lets [
-           "x">: lambda "y" $ var "y",
-           "z">: var "x",
-           "w">: var "z"] $
-           pair (var "x") (pair (var "w") (var "z")))
-        ["t0", "t1", "t2"] (T.pair
-          (T.function (T.var "t0") (T.var "t0"))
-          (T.pair
-            (T.function (T.var "t1") (T.var "t1"))
-            (T.function (T.var "t2") (T.var "t2"))))],
-
-    subgroup "Recursive and mutually recursive let with polymorphism" [
-      expectMono 1 []
-        (lets [
-          "id">: lambda "x" $ var "x",
-          "f">: primitive _strings_length @@ var "g",
-          "g">: primitive _strings_fromList @@ list [var "f"]]
-          $ pair (var "f") (var "g"))
-        (T.pair T.int32 T.string),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (lets [
-          "id">: lambda "x" $ var "x",
-          "f">: var "id" @@ (primitive _strings_length @@ var "g"),
-          "g">: var "id" @@ (primitive _strings_fromList @@ list [var "f"])]
-          $ pair (var "f") (var "g"))
-        (T.pair T.int32 T.string),
-      expectMono 3 [tag_disabledForMinimalInference]
-        (lets [
-          "f">: var "id" @@ (primitive _strings_length @@ var "g"),
-          "id">: lambda "x" $ var "x",
-          "g">: var "id" @@ (primitive _strings_fromList @@ list [var "f"])]
-          $ pair (var "f") (var "g"))
-        (T.pair T.int32 T.string)],
-
-    subgroup "Recursion involving polymorphic functions" [ -- Note: not 'polymorphic recursion' per se
-      expectPoly 1 []
-        (lets [
-          "f">: lambda "b" $ lambda "x" $ primitive _logic_ifElse @@ var "b" @@ list [list [var "x"]] @@ (var "g" @@ var "b" @@ var "x"),
-          "g">: lambda "b" $ lambda "x" $ primitive _logic_ifElse @@ var "b" @@ (var "f" @@ var "b" @@ var "x") @@ list [list [var "x"]]]
-          $ var "f")
-        ["t0"] (T.functionMany [T.boolean, T.var "t0", T.list $ T.list $ T.var "t0"]),
-
-      -- The recursive pattern of hydra.rewriting.foldOverType is similar to this example.
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (lets [
-          "inst">: var "rec" @@ (lambda "x" false) @@ false,
-          "rec">: lambda "f" $ lambda "b0" $ var "f" @@ (var "rec" @@ var "f" @@ var "b0")] $
-          pair (var "inst") (var "rec"))
-        ["t0", "t1"] (T.pair T.boolean (T.functionMany [T.function (T.var "t0") (T.var "t0"), T.var "t1", T.var "t0"])),
-      expectPoly 3 [tag_disabledForMinimalInference] -- Try with GHC:    :t let inst = rec (\x -> False); rec = \f -> f (rec f) in (inst, rec)
-        (lets [
-          "inst">: var "rec" @@ (lambda "x" false),
-          "rec">: lambda "f" $ var "f" @@ (var "rec" @@ var "f")] $
-          pair (var "inst") (var "rec"))
-        ["t0"] (T.pair T.boolean (T.functionMany [T.function (T.var "t0") (T.var "t0"), T.var "t0"])),
-      expectPoly 4 [tag_disabledForMinimalInference]
-        (lets [
-          "inst1">: var "rec" @@ (lambda "x" false),
-          "inst2">: var "rec" @@ (lambda "x" $ int32 42),
-          "rec">: lambda "f" $ var "f" @@ (var "rec" @@ var "f")] $
-          tuple [var "inst1", var "inst2", var "rec"])
-        ["t0"] (T.product [T.boolean, T.int32, T.functionMany [T.function (T.var "t0") (T.var "t0"), T.var "t0"]]),
-
-      -- Try: :t let foo = bar; bar = foo in (foo, bar)
-      expectPoly 5 [tag_disabledForMinimalInference]
-        (lets [
-          "foo">: var "bar",
-          "bar">: var "foo"] $
-          pair (var "foo") (var "bar"))
-        ["t0", "t1"] (T.pair (T.var "t0") (T.var "t1"))],
-
-    -- Over-generalization of hoisted let-bindings.
-    -- When a nested let-binding is hoisted to a sibling, its type may be generalized
-    -- beyond what the usage context constrains.
-    subgroup "Over-generalization of hoisted let-bindings" [
-      -- Nested: \g. \val. let r = g val in g (fst r)
-      -- g is constrained: fst(g val) is used as input to g, so g : a -> (a, b)
-      -- f : forall a b. (a -> (a, b)) -> a -> (a, b)
-      expectPoly 1 []
-        (lambda "g" $ lambda "val" $
-          lets ["r">: var "g" @@ var "val"] $
-            var "g" @@ (primitive _pairs_first @@ var "r"))
-        ["t0", "t1"] (T.function
-          (T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t1")))
-          (T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t1")))),
-
-      -- Hoisted: let helper = \g. \val. g val; f = \g. \val. g (fst (helper g val)) in f
-      -- helper generalizes to forall a b. (a -> b) -> a -> b, losing the constraint b = (a, c).
-      -- So f gets: forall a b c. (a -> (b, c)) -> a -> (b, c) -- 3 vars instead of 2.
-      -- This test documents the CURRENT behavior (over-generalized).
-      -- TODO: if inference is improved, update to match test 1 above.
-      expectPoly 2 []
-        (lets [
-          "helper">: lambda "g" $ lambda "val" $ var "g" @@ var "val",
-          "f">: lambda "g" $ lambda "val" $
-            var "g" @@ (primitive _pairs_first @@ (var "helper" @@ var "g" @@ var "val"))] $
-          var "f")
-        ["t0", "t1"] (T.function
-          (T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t1")))
-          (T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t1")))),
-
-      -- Chain of captures: forField takes rec as a parameter, uses fst of result.
-      -- forField = \rec. \val. \x. let r = rec val x in (fst r, x)
-      -- Independently, forField : forall a b c d. (a -> b -> (c, d)) -> a -> b -> (c, b)
-      -- This is correct: the constraint c=a only exists at the call site, not in forField itself.
-      -- This pattern occurs in rewriteAndFoldTerm where hoisted bindings are more polymorphic
-      -- than how they are used. The Java coder must handle this discrepancy.
-      expectPoly 3 []
-        (lets [
-          "forField">: lambda "rec" $ lambda "val" $ lambda "x" $
-            lets ["r">: var "rec" @@ var "val" @@ var "x"] $
-              pair (primitive _pairs_first @@ var "r") (var "x"),
-          "main">: lambda "rec" $ lambda "val" $ lambda "x" $
-            var "forField" @@ var "rec" @@ var "val" @@ var "x"] $
-          var "main")
-        ["t0", "t1", "t2", "t3"] (T.function
-          (T.functionMany [T.var "t0", T.var "t1", T.pair (T.var "t2") (T.var "t3")])
-          (T.functionMany [T.var "t0", T.var "t1", T.pair (T.var "t2") (T.var "t1")])),
-
-      -- Models the rewriteAndFoldTerm_r pattern: a case/if expression where one branch
-      -- uses a helper's result and the other uses the direct value. Both branches must
-      -- return the same type, which should unify the helper's accumulator type with the
-      -- direct value's type.
-      -- helper = \f. \val. f val               -- helper: forall a b. (a -> b) -> a -> b
-      -- main = \f. \val. \b. ifElse b (helper f val) (val, 0)
-      --   branch 1: helper f val => instantiates to (a -> b) -> a -> b, result b
-      --   branch 2: (val, 0) => (a, Int)
-      --   unify b = (a, Int), so helper f val : (a, Int)
-      --   main : forall a. (a -> (a, Int)) -> a -> Bool -> (a, Int)  -- 1 var
-      expectPoly 4 []
-        (lets [
-          "helper">: lambda "f" $ lambda "val" $ var "f" @@ var "val",
-          "main">: lambda "f" $ lambda "val" $ lambda "b" $
-            primitive _logic_ifElse @@ var "b"
-              @@ (var "helper" @@ var "f" @@ var "val")
-              @@ (pair (var "val") (int32 0))] $
-          var "main")
-        ["t0"] (T.functionMany [
-          T.function (T.var "t0") (T.pair (T.var "t0") T.int32),
-          T.var "t0",
-          T.boolean,
-          T.pair (T.var "t0") T.int32]),
-
-      -- Closer to rewriteAndFoldTerm_r: forField has rec as lambda param (not sibling reference).
-      -- forField = \rec. \val. let r = rec val in (fst r, snd r)
-      --   rec: a -> (b, c), val: a, r: (b, c), result: (b, c) -- 3 vars
-      -- main = \rec. \val. \b. ifElse b (forField rec val) (val, 0)
-      --   branch 1: forField rec val => fresh instance of forField, result (b', c')
-      --   branch 2: (val, 0) => (a, Int)
-      --   unify (b', c') = (a, Int) => b' = a, c' = Int
-      --   also a = a (from rec's first arg), so rec: a -> (a, Int)
-      --   main: forall a. (a -> (a, Int)) -> a -> Bool -> (a, Int)  -- 1 var
-      expectPoly 5 []
-        (lets [
-          "forField">: lambda "rec" $ lambda "val" $
-            lets ["r">: var "rec" @@ var "val"] $
-              pair (primitive _pairs_first @@ var "r") (primitive _pairs_second @@ var "r"),
-          "main">: lambda "rec" $ lambda "val" $ lambda "b" $
-            primitive _logic_ifElse @@ var "b"
-              @@ (var "forField" @@ var "rec" @@ var "val")
-              @@ (pair (var "val") (int32 0))] $
-          var "main")
-        ["t0"] (T.functionMany [
-          T.function (T.var "t0") (T.pair (T.var "t0") T.int32),
-          T.var "t0",
-          T.boolean,
-          T.pair (T.var "t0") T.int32]),
-
-      -- Models the full rewriteAndFoldTerm_r pattern with an intermediate sibling "rcases".
-      -- rcases = \forFields. \val. forFields val  -- rcases: forall a b. (a -> b) -> a -> b
-      -- r = \forFields. \val. \b. ifElse b (rcases forFields val) (val, 0)
-      --   branch 1: rcases forFields val. forFields: a -> b, val: a => result: b
-      --     instantiate rcases: (a' -> b') -> a' -> b'. a' = a, b' = b. result: b
-      --   branch 2: (val, 0) = (a, Int)
-      --   unify b = (a, Int) => forFields: a -> (a, Int)
-      --   r: forall a. (a -> (a, Int)) -> a -> Bool -> (a, Int)  -- 1 var
-      expectPoly 6 []
-        (lets [
-          "rcases">: lambda "forFields" $ lambda "val" $ var "forFields" @@ var "val",
-          "r">: lambda "forFields" $ lambda "val" $ lambda "b" $
-            primitive _logic_ifElse @@ var "b"
-              @@ (var "rcases" @@ var "forFields" @@ var "val")
-              @@ (pair (var "val") (int32 0))] $
-          var "r")
-        ["t0"] (T.functionMany [
-          T.function (T.var "t0") (T.pair (T.var "t0") T.int32),
-          T.var "t0",
-          T.boolean,
-          T.pair (T.var "t0") T.int32])]]
-  where
-    s = primitive _math_negate
-    p = primitive _math_negate
-
-testGroupForLiterals :: TTermDefinition TestGroup
-testGroupForLiterals = define "testGroupForLiterals" $
-  subgroup "Literals" [
-    expectMono 1 []
-      (int32 42)
-      T.int32,
-    expectMono 2 []
-      (string "foo")
-      T.string,
-    expectMono 3 []
-      false
-      T.boolean,
-    expectMono 4 []
-      (float64 42.0)
-      T.float64]
-
-testGroupForPathologicalTerms :: TTermDefinition TestGroup
-testGroupForPathologicalTerms = define "testGroupForPathologicalTerms" $
-  supergroup "Pathological terms" [
-
-    subgroup "Recursion" [
-      expectPoly 1 []
-        (lets [
-          "x">: var "x"]
-          $ var "x")
-        ["t0"] (T.var "t0"),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (lets ["id">: lambda "x" $ var "x",
-               "weird">: var "id" @@ var "id" @@ var "id"] $
-               var "weird")
-        ["t0"] (T.function (T.var "t0") (T.var "t0")),
-      expectPoly 3 []
-        (lets ["f">: lambda "x" $ var "f" @@ (var "f" @@ var "x")] $
-               var "f")
-        ["t0"] (T.function (T.var "t0") (T.var "t0")),
-      expectPoly 4 []
-        (lets ["x">: lambda "y" $
-                 var "x" @@ var "y"] $
-               var "x")
-        ["t0", "t1"] (T.function (T.var "t0") (T.var "t1")),
-      expectPoly 5 []
-        (lets ["paradox">: lambda "f" $ var "f" @@ (var "paradox" @@ var "f")] $
-               var "paradox")
-        ["t0"] (T.function (T.function (T.var "t0") (T.var "t0")) (T.var "t0")),
-      expectMono 6 []
-        (lets [
-          "f">: lambda "x" $ var "g" @@ (var "f" @@ var "x"),
-          "g">: lambda "y" $ var "f" @@ (var "g" @@ var "y")] $
-          var "f" @@ (var "g" @@ int32 42))
-        T.int32],
-
-    subgroup "Infinite lists" [
-      expectMono 1 []
-        (lets [
-          "self">: primitive _lists_cons @@ int32 42 @@ var "self"]
-          $ var "self")
-        (T.list T.int32),
-      expectPoly 2  []
-        (lambda "x" $ lets [
-          "self">: primitive _lists_cons @@ var "x" @@ var "self"]
-          $ var "self")
-        ["t0"] (T.function (T.var "t0") (T.list $ T.var "t0")),
-      expectPoly 3  [tag_disabled]
-        (lets [
-          "self">: lambda "e" $ primitive _lists_cons @@ var "e" @@ (var "self" @@ var "e")]
-          $ lambda "x" $ var "self" @@ var "x")
-        ["t0"] (T.function (T.var "t0") (T.var "t0")),
-      expectMono 4  []
-        (lets [
-          "build">: lambda "x" $ primitive _lists_cons @@ var "x" @@ (var "build" @@
-            (primitive _math_add @@ var "x" @@ int32 1))]
-          $ var "build" @@ int32 0)
-        (T.list T.int32)]]
-
-testGroupForPolymorphism :: TTermDefinition TestGroup
-testGroupForPolymorphism = define "testGroupForPolymorphism" $
-  supergroup "Polymorphism" [
-
-    subgroup "Simple lists and optionals" [
-      expectPoly 1 []
-        (list [])
-        ["t0"] (T.list (T.var "t0")),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (optional nothing)
-        ["t0"] (T.optional (T.var "t0")),
-      expectMono 3 [tag_disabledForMinimalInference]
-        (optional $ just $ int32 42)
-        (T.optional T.int32)],
-
-    subgroup "Lambdas, lists, and products" [
-      expectPoly 1 []
-        (lambda "x" $ var "x")
-        ["t0"] (T.function (T.var "t0") (T.var "t0")),
-      expectPoly 2 []
-        (lambda "x" $ pair (var "x") (var "x"))
-        ["t0"] (T.function (T.var "t0") (T.pair (T.var "t0") (T.var "t0"))),
-      expectPoly 3 []
-        (lambda "x" $ list [var "x"])
-        ["t0"] (T.function (T.var "t0") (T.list $ T.var "t0")),
-      expectPoly 4 []
-        (list [lambda "x" $ var "x", lambda "y" $ var "y"])
-        ["t0"] (T.list (T.function (T.var "t0") (T.var "t0"))),
-      expectPoly 5 []
-        (list [lambda "x" $ lambda "y" $ pair (var "y") (var "x")])
-        ["t0", "t1"] (T.list (T.function (T.var "t0") (T.function (T.var "t1") (T.pair (T.var "t1") (T.var "t0")))))],
-
-    subgroup "Lambdas and application" [
-      expectMono 1 []
-        ((lambda "x" $ var "x") @@ string "foo")
-        T.string],
-
-    subgroup "Primitives and application" [
-      expectMono 1 []
-        (primitive _lists_concat @@ list [list [int32 42], list []])
-        (T.list T.int32)],
-
-    subgroup "Lambdas and primitives" [
-      expectMono 1 []
-        (primitive _math_add)
-        (T.functionMany [T.int32, T.int32, T.int32]),
-      expectMono 2 []
-        (lambda "x" (primitive _math_add @@ var "x"))
-        (T.functionMany [T.int32, T.int32, T.int32]),
-      expectMono 3 []
-        (lambda "x" (primitive _math_add @@ var "x" @@ var "x"))
-        (T.function T.int32 T.int32)],
-
-    subgroup "Mixed expressions with lambdas, constants, and primitive functions" [
-      expectMono 1 []
-        (lambda "x" $ (primitive _math_sub @@ (primitive _math_add @@ var "x" @@ var "x") @@ int32 1))
-        (T.function T.int32 T.int32)],
-
-    subgroup "Application terms" [
-      expectMono 1 []
-        ((lambda "x" $ var "x") @@ string "foo")
-        T.string,
-      expectMono 2 []
-        (lambda "x" $ primitive _math_sub @@ (primitive _math_add @@ var "x" @@ var "x") @@ int32 1)
-        (T.function T.int32 T.int32)],
-
-    -- Phantom type variables: positions in a polymorphic primitive's type
-    -- signature where the argument's shape leaves one slot unconstrained.
-    -- e.g. isLeft : forall a b. Either a b -> Bool applied to (Left 42)
-    -- pins a = Int32 but leaves b free. Inference must not carry b out as
-    -- a forall parameter of the enclosing binding: the binding's type
-    -- (Bool, List Bool, ...) is monomorphic and the phantom b is not part
-    -- of its external signature.
-    subgroup "Phantom type variables" [
-      -- isLeft applied to a Left pins only the left type arg; the right
-      -- type arg is phantom. Result type: Bool (monomorphic).
-      expectMono 1 []
-        (primitive _eithers_isLeft @@ left (int32 42))
-        T.boolean,
-      -- isLeft applied to a Right pins only the right type arg; the left
-      -- type arg is phantom. Result type: Bool (monomorphic).
-      expectMono 2 []
-        (primitive _eithers_isLeft @@ right (string "x"))
-        T.boolean,
-      -- A list of expressions with independent phantom vars: still
-      -- monomorphic List Bool, not forall t0 t1. List Bool.
-      expectMono 3 []
-        (list [
-          primitive _eithers_isLeft @@ left (int32 42),
-          primitive _eithers_isLeft @@ left (int32 137)])
-        (T.list T.boolean),
-      -- Control: the bare primitive (no application) must stay polymorphic.
-      -- This is the genuine forall case and must not be disturbed by the fix.
-      expectPoly 4 []
-        (primitive _eithers_isLeft)
-        ["t0", "t1"] (T.function (T.either_ (T.var "t0") (T.var "t1")) T.boolean)]]
-
-testGroupForPrimitives :: TTermDefinition TestGroup
-testGroupForPrimitives = define "testGroupForPrimitives" $
-  supergroup "Primitives" [
-
-    subgroup "Monomorphic primitive functions" [
-      expectMono 1 []
-        (primitive $ _strings_length)
-        (T.function T.string T.int32),
-      expectMono 2 []
-        (primitive _math_sub)
-        (T.functionMany [T.int32, T.int32, T.int32])],
-
-    subgroup "Polymorphic primitive functions" [
-      expectPoly 1 []
-        (lambda "el" (primitive _lists_length @@ (list [var "el"])))
-        ["t0"] (T.function (T.var "t0") T.int32),
-      expectMono 2 []
-        (lambda "el" (primitive _lists_length @@ (list [int32 42, var "el"])))
-        (T.function T.int32 T.int32),
-      expectPoly 3 []
-        (primitive _lists_concat)
-        ["t0"] (T.function (T.list $ T.list $ T.var "t0") (T.list $ T.var "t0")),
-      expectPoly 4 []
-        (lambda "lists" (primitive _lists_concat @@ var "lists"))
-        ["t0"] (T.function (T.list $ T.list $ T.var "t0") (T.list $ T.var "t0")),
-      expectPoly 5 []
-        (lambda "lists" (primitive _lists_length @@ (primitive _lists_concat @@ var "lists")))
-        ["t0"] (T.function (T.list $ T.list $ T.var "t0") T.int32),
-      expectPoly 6 []
-        (lambda "list" (primitive _lists_length @@ (primitive _lists_concat @@ list [var "list", list []])))
-        ["t0"] (T.function (T.list $ T.var "t0") T.int32),
-      expectPoly 7 []
-        (lambda "list" (primitive _math_add
-          @@ int32 1
-          @@ (primitive _lists_length @@ (primitive _lists_concat @@ list [var "list", list []]))))
-        ["t0"] (T.function (T.list $ T.var "t0") T.int32),
-      expectPoly 8 []
-        (lambda "lists" (primitive _lists_length @@ (primitive _lists_concat @@ var "lists")))
-        ["t0"] (T.function (T.list $ T.list $ T.var "t0") T.int32)]]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/KernelExamples.hs b/src/main/haskell/Hydra/Sources/Test/Inference/KernelExamples.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/KernelExamples.hs
+++ /dev/null
@@ -1,106 +0,0 @@
-module Hydra.Sources.Test.Inference.KernelExamples where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.kernelExamples"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Inference tests for examples from the Hydra kernel")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition testGroupForNestedLet]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Examples from the Hydra kernel" $
-  supergroup "Examples from the Hydra kernel" [
-    testGroupForNestedLet]
-
-testGroupForNestedLet :: TTermDefinition TestGroup
-testGroupForNestedLet = define "testGroupForNestedLet" $
-  supergroup "Nested let" [
-    subgroup "hydra.formatting.mapFirstLetter" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (lambda "mapping" $ lambda "s" $ lets [
-          "list">: primitive _strings_toList @@ var "s",
-          "firstLetter">: var "mapping" @@ (primitive _strings_fromList @@ (primitive _maybes_cat @@ list [primitive _lists_maybeHead @@ var "list"]))] $
-          primitive _logic_ifElse
-            @@ (primitive _strings_null @@ var "s")
-            @@ (var "s")
-            @@ (primitive _strings_cat2 @@ var "firstLetter" @@ (primitive _strings_fromList @@ (primitive _lists_drop @@ int32 1 @@ var "list"))))
-        (T.functionMany [T.function T.string T.string, T.string, T.string])],
-
-    -- Simplified reproduction of fullyStripAndNormalizeType's 'go' binding using ifElse.
-    -- Tests that inference gives go a monomorphic type when all types are constrained
-    -- by primitive calls (Maps.insert, Math.add).
-    subgroup "Recursive let with pair return (ifElse)" [
-      expectMono 2 [tag_disabledForMinimalInference]
-        (lambda "input" $ lets [
-          "go">:
-            lambda "depth" $ lambda "subst" $ lambda "s" $
-              primitive _logic_ifElse
-                @@ (primitive _strings_null @@ var "s")
-                @@ (pair (var "subst") (var "s"))
-                @@ (var "go"
-                      @@ (primitive _math_add @@ var "depth" @@ int32 1)
-                      @@ (primitive _maps_insert @@ string "key" @@ string "val" @@ var "subst")
-                      @@ var "s")] $
-          lets [
-            "result">: var "go" @@ int32 0 @@ primitive _maps_empty @@ var "input",
-            "subst">: primitive _pairs_first @@ var "result",
-            "body">: primitive _pairs_second @@ var "result"] $
-          pair (var "subst") (var "body"))
-        (T.function T.string
-          (T.pair (T.map T.string T.string) T.string))],
-
-    -- Closer reproduction of fullyStripAndNormalizeType's 'go' binding using
-    -- case/match on the Type union (with a default case).
-    -- The default case returns (subst, t) directly; the forall case recurses
-    -- with Maps.insert constraining subst to Map Name Name.
-    -- This tests whether union elimination with a default case causes
-    -- inference to over-generalize the pair-first type variable.
-    subgroup "Recursive let with pair return (case on Type)" [
-      expectMono 3 [tag_disabledForMinimalInference, tag_disabled]
-        (lambda "typ" $ lets [
-          "go">:
-            lambda "depth" $ lambda "subst" $ lambda "t" $
-              Terms.match (Core.nameLift _Type) (just $ pair (var "subst") (var "t")) [
-                _Type_forall >>: lambda "ft" $
-                  var "go"
-                    @@ (primitive _math_add @@ var "depth" @@ int32 1)
-                    @@ (primitive _maps_insert
-                          @@ (project (Core.nameLift _ForallType) (Core.nameLift _ForallType_parameter) @@ var "ft")
-                          @@ (Terms.wrap (Core.nameLift _Name) (primitive _strings_cat2 @@ string "_" @@ (primitive _literals_showInt32 @@ var "depth")))
-                          @@ var "subst")
-                    @@ (project (Core.nameLift _ForallType) (Core.nameLift _ForallType_body) @@ var "ft")]
-              @@ var "t"] $
-          lets [
-            "result">: var "go" @@ int32 0 @@ primitive _maps_empty @@ var "typ"] $
-          pair (primitive _pairs_first @@ var "result") (primitive _pairs_second @@ var "result"))
-        -- Expected: Type -> (Map Name Name, Type)
-        -- Named types appear as TypeVariable in schemes (e.g., hydra.core.Name, hydra.core.Type)
-        (T.function (T.variable "hydra.core.Type")
-          (T.pair (T.map (T.variable "hydra.core.Name") (T.variable "hydra.core.Name")) (T.variable "hydra.core.Type")))]]
diff --git a/src/main/haskell/Hydra/Sources/Test/Inference/NominalTypes.hs b/src/main/haskell/Hydra/Sources/Test/Inference/NominalTypes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Inference/NominalTypes.hs
+++ /dev/null
@@ -1,212 +0,0 @@
-module Hydra.Sources.Test.Inference.NominalTypes where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.inference.nominalTypes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Inference tests for nominal types")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition testGroupForCaseStatements,
-      Phantoms.toDefinition testGroupForProjections,
-      Phantoms.toDefinition testGroupForRecords,
-      Phantoms.toDefinition testGroupForVariants,
-      Phantoms.toDefinition testGroupForWrappers]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Nominal type tests" $
-  supergroup "Nominal terms" [
-    testGroupForCaseStatements,
-    testGroupForProjections,
-    testGroupForRecords,
-    testGroupForVariants,
-    testGroupForWrappers]
-
-testGroupForCaseStatements :: TTermDefinition TestGroup
-testGroupForCaseStatements = define "testGroupForCaseStatements" $
-  subgroup "Case statements" [
-    expectMono 1 [tag_disabledForMinimalInference]
-      (match (TestTypes.testTypeSimpleNumberName) nothing [
-        "int">: lambda "x" $ var "x",
-        "float">: lambda "x" $ int32 42])
-      (T.function (Core.typeVariable $ TestTypes.testTypeSimpleNumberName) T.int32),
-    expectMono 2 [tag_disabledForMinimalInference]
-      (match (TestTypes.testTypeUnionMonomorphicName) nothing [
-        "bool">: constant true,
-        "string">: constant false,
-        "unit">: constant false])
-      (T.function (Core.typeVariable $ TestTypes.testTypeUnionMonomorphicName) T.boolean)]
-
-testGroupForProjections :: TTermDefinition TestGroup
-testGroupForProjections = define "testGroupForProjections" $
-  supergroup "Projections" [
-    subgroup "Record eliminations" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (project (TestTypes.testTypePersonName) (name "firstName"))
-        (T.function (Core.typeVariable $ TestTypes.testTypePersonName) T.string)],
-
-    subgroup "Pair projections" [
-      expectPoly 1 [tag_disabledForMinimalInference]
-        (primitive _pairs_first)
-        ["t0", "t1"] (T.function (T.pair (T.var "t0") (T.var "t1")) (T.var "t0")),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (primitive _pairs_second @@ pair (int32 42) (string "foo"))
-        T.string]]
-
-testGroupForRecords :: TTermDefinition TestGroup
-testGroupForRecords = define "testGroupForRecords" $
-  supergroup "Records" [
-
-    subgroup "Simple records" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (record (TestTypes.testTypeLatLonName) [
-          "lat">: float32 37.7749,
-          "lon">: float32 $ negate 122.4194])
-        (Core.typeVariable (TestTypes.testTypeLatLonName)),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (record (TestTypes.testTypeLatLonPolyName) [
-          "lat">: float32 37.7749,
-          "lon">: float32 $ negate 122.4194])
-        (T.apply (Core.typeVariable (TestTypes.testTypeLatLonPolyName)) T.float32),
-      expectMono 3 [tag_disabledForMinimalInference]
-        (lambda "lon" (record (TestTypes.testTypeLatLonPolyName) [
-          "lat">: float32 37.7749,
-          "lon">: var "lon"]))
-        (T.function T.float32 (T.apply (Core.typeVariable (TestTypes.testTypeLatLonPolyName)) T.float32)),
-      expectPoly 4 [tag_disabledForMinimalInference]
-        (lambda "latlon" (record (TestTypes.testTypeLatLonPolyName) [
-          "lat">: var "latlon",
-          "lon">: var "latlon"]))
-        ["t0"] (T.function (T.var "t0") (T.apply (Core.typeVariable (TestTypes.testTypeLatLonPolyName)) (T.var "t0"))),
-      expectMono 5 [tag_disabledForMinimalInference]
-        (TestTerms.testDataArthur)
-        (Core.typeVariable (TestTypes.testTypePersonName))],
-
-    subgroup "Record instances of simply recursive record types" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (record (TestTypes.testTypeIntListName) [
-          "head">: int32 42,
-          "tail">: optional $ just (record (TestTypes.testTypeIntListName) [
-            "head">: int32 43,
-            "tail">: optional nothing])])
-        (Core.typeVariable (TestTypes.testTypeIntListName)),
-      expectMono 2 [tag_disabledForMinimalInference]
-        ((lambda "x" $ record (TestTypes.testTypeIntListName) [
-          "head">: var "x",
-          "tail">: optional $ just (record (TestTypes.testTypeIntListName) [
-            "head">: var "x",
-            "tail">: optional nothing])]) @@ int32 42)
-        (Core.typeVariable (TestTypes.testTypeIntListName)),
-      expectMono 3 [tag_disabledForMinimalInference]
-        (record (TestTypes.testTypeListName) [
-          "head">: int32 42,
-          "tail">: optional $ just (record (TestTypes.testTypeListName) [
-            "head">: int32 43,
-            "tail">: optional nothing])])
-        (T.apply (Core.typeVariable (TestTypes.testTypeListName)) T.int32),
-      expectMono 4 [tag_disabledForMinimalInference]
-        ((lambda "x" $ record (TestTypes.testTypeListName) [
-          "head">: var "x",
-          "tail">: optional $ just (record (TestTypes.testTypeListName) [
-            "head">: var "x",
-            "tail">: optional nothing])]) @@ int32 42)
-        (T.apply (Core.typeVariable (TestTypes.testTypeListName)) T.int32),
-      expectPoly 5 [tag_disabledForMinimalInference]
-        (lambda "x" $ record (TestTypes.testTypeListName) [
-          "head">: var "x",
-          "tail">: optional $ just (record (TestTypes.testTypeListName) [
-            "head">: var "x",
-            "tail">: optional nothing])])
-        ["t0"] (T.function (T.var "t0") (T.apply (Core.typeVariable (TestTypes.testTypeListName)) (T.var "t0")))],
-
-    subgroup "Record instances of mutually recursive record types" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        ((lambda "x" $ record (TestTypes.testTypeBuddyListAName) [
-          "head">: var "x",
-          "tail">: optional $ just $ record (TestTypes.testTypeBuddyListBName) [
-            "head">: var "x",
-            "tail">: optional nothing]]) @@ int32 42)
-        (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) T.int32),
-      expectPoly 2 [tag_disabledForMinimalInference]
-        (lambda "x" $ record (TestTypes.testTypeBuddyListAName) [
-          "head">: var "x",
-          "tail">: optional $ just $ record (TestTypes.testTypeBuddyListBName) [
-            "head">: var "x",
-            "tail">: optional nothing]])
-        ["t0"] (T.function (T.var "t0") (T.apply (Core.typeVariable $ TestTypes.testTypeBuddyListAName) (T.var "t0")))]]
-
-testGroupForVariants :: TTermDefinition TestGroup
-testGroupForVariants = define "testGroupForVariants" $
-  supergroup "Variant terms" [
-
-    subgroup "Variants" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (inject (TestTypes.testTypeTimestampName) "unixTimeMillis" $ uint64 1638200308368)
-        (Core.typeVariable (TestTypes.testTypeTimestampName)),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (inject (TestTypes.testTypeUnionMonomorphicName) "string" $ string "bar")
-        (Core.typeVariable (TestTypes.testTypeUnionMonomorphicName))],
---    TODO: inference failure test cases
---      H.it "test #3" $
---        expectFailure
---          (inject TestTypes.testTypeUnionMonomorphicName $ Field (Name "string") $ int32 42)
-
-    subgroup "Polymorphic and recursive variants" [
-      expectPoly 1 [tag_disabledForMinimalInference]
-        (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "bool" true)
-        ["t0"] (T.apply (Core.typeVariable (TestTypes.testTypeUnionPolymorphicRecursiveName)) (T.var "t0")),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" $ string "foo")
-        (T.apply (Core.typeVariable (TestTypes.testTypeUnionPolymorphicRecursiveName)) T.string),
-      expectMono 3 [tag_disabledForMinimalInference]
-        (lets [
-          "other">: inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "value" $ int32 42]
-          $ inject (TestTypes.testTypeUnionPolymorphicRecursiveName) "other" $ var "other")
-        (T.apply (Core.typeVariable (TestTypes.testTypeUnionPolymorphicRecursiveName)) T.int32)]]
-
-testGroupForWrappers :: TTermDefinition TestGroup
-testGroupForWrappers = define "testGroupForWrappers" $
-  supergroup "Wrapper introductions and eliminations" [
-
-    subgroup "Wrapper introductions" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (wrap (TestTypes.testTypeStringAliasName) $ string "foo")
-        (Core.typeVariable $ TestTypes.testTypeStringAliasName),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (lambda "v" $ wrap (TestTypes.testTypeStringAliasName) $ var "v")
-        (T.function T.string (Core.typeVariable $ TestTypes.testTypeStringAliasName))],
-
-    subgroup "Wrapper eliminations" [
-      expectMono 1 [tag_disabledForMinimalInference]
-        (unwrap (TestTypes.testTypeStringAliasName))
-        (T.function (Core.typeVariable $ TestTypes.testTypeStringAliasName) T.string),
-      expectMono 2 [tag_disabledForMinimalInference]
-        (unwrap (TestTypes.testTypeStringAliasName) @@ (wrap (TestTypes.testTypeStringAliasName) $ string "foo"))
-        T.string]]
diff --git a/src/main/haskell/Hydra/Sources/Test/Json/Parser.hs b/src/main/haskell/Hydra/Sources/Test/Json/Parser.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Json/Parser.hs
+++ /dev/null
@@ -1,215 +0,0 @@
-module Hydra.Sources.Test.Json.Parser where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-import qualified Data.Scientific              as Sci
-
--- Additional imports specific to this module
-import Hydra.Json.Model (Value)
-import Hydra.Parsing (ParseResult)
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Json.Model as Json
-import qualified Hydra.Dsl.Parsing as Parsing
-import qualified Hydra.Sources.Kernel.Terms.Parsers as Parsers
-import qualified Hydra.Sources.Json.Parser as JsonParser
-import qualified Hydra.Sources.Json.Writer as JsonWriter
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.json.parser"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.parsers", Namespace "hydra.json.parser", Namespace "hydra.json.writer",
-     Namespace "hydra.lib.strings", Namespace "hydra.parsing"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for JSON parsing")}
-  where
-    definitions = [
-        Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for JSON parsing" $
-    supergroup "JSON parsing" [
-      primitivesGroup,
-      decimalPrecisionGroup,
-      stringsGroup,
-      arraysGroup,
-      objectsGroup,
-      nestedGroup,
-      whitespaceGroup]
-
--- Show a ParseResult Value as a string for universal test comparison.
--- Uses Phantoms.cases to pattern-match the ParseResult union.
-showParseResult :: TTerm (ParseResult Value) -> TTerm String
-showParseResult pr = Phantoms.cases _ParseResult pr Nothing [
-    _ParseResult_success Phantoms.>>: Phantoms.lambda "ps" (Strings.cat2
-      (Phantoms.string "success(")
-      (Strings.cat2
-        (JsonWriter.printJson Phantoms.@@ Parsing.parseSuccessValue (Phantoms.var "ps"))
-        (Strings.cat2 (Phantoms.string ", ")
-          (Strings.cat2 (Parsing.parseSuccessRemainder (Phantoms.var "ps")) (Phantoms.string ")"))))),
-    _ParseResult_failure Phantoms.>>: Phantoms.lambda "pe" (Strings.cat2
-      (Phantoms.string "failure(")
-      (Strings.cat2 (Phantoms.string "parse error") (Phantoms.string ")")))]
-
--- Helper for creating successful JSON parser test cases as UniversalTestCase
-parserCase :: String -> String -> TTerm Value -> TTerm TestCaseWithMetadata
-parserCase name input expectedValue = universalCase name
-  (showParseResult (Parsers.runParser Phantoms.@@ JsonParser.jsonValue Phantoms.@@ Phantoms.string input))
-  (showParseResult (Parsing.parseResultSuccess $ Parsing.parseSuccess expectedValue (Phantoms.string "")))
-
-primitivesGroup :: TTerm TestGroup
-primitivesGroup = subgroup "primitives" [
-    -- Null
-    parserCase "null" "null" Json.valueNull,
-
-    -- Booleans
-    parserCase "true" "true" (Json.valueBoolean $ Phantoms.boolean True),
-    parserCase "false" "false" (Json.valueBoolean $ Phantoms.boolean False),
-
-    -- Numbers - integers
-    parserCase "zero" "0" (Json.valueNumber $ Phantoms.decimal 0.0),
-    parserCase "positive integer" "42" (Json.valueNumber $ Phantoms.decimal 42.0),
-    parserCase "negative integer" "-17" (Json.valueNumber $ Phantoms.decimal (-17.0)),
-    parserCase "large integer" "1000000" (Json.valueNumber $ Phantoms.decimal 1000000.0),
-
-    -- Numbers - decimals
-    parserCase "decimal" "3.14" (Json.valueNumber $ Phantoms.decimal 3.14),
-    parserCase "negative decimal" "-2.5" (Json.valueNumber $ Phantoms.decimal (-2.5)),
-
-    -- Numbers - scientific notation
-    parserCase "scientific notation" "1e3" (Json.valueNumber $ Phantoms.decimal 1000.0),
-    parserCase "scientific with decimal" "1.5e2" (Json.valueNumber $ Phantoms.decimal 150.0),
-    parserCase "negative exponent" "1e-2" (Json.valueNumber $ Phantoms.decimal 0.01)]
-
--- | Parser precision tests: inputs that exercise the writer's lexical output choices.
--- We do not test "more digits than Double" cases here because several Hydra hosts emit
--- decimal literals as host-native Double, losing precision before the test can exercise
--- the parser. The decimal type coder (separate test) preserves full precision end-to-end.
-decimalPrecisionGroup :: TTerm TestGroup
-decimalPrecisionGroup = subgroup "decimal precision" [
-    parserCase "tiny exponent"
-      "1e-20"
-      (Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 (-20))),
-    parserCase "huge exponent"
-      "1e20"
-      (Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 20))]
-
-stringsGroup :: TTerm TestGroup
-stringsGroup = subgroup "strings" [
-    -- Basic strings
-    parserCase "empty string" "\"\"" (Json.valueString $ Phantoms.string ""),
-    parserCase "simple string" "\"hello\"" (Json.valueString $ Phantoms.string "hello"),
-    parserCase "string with spaces" "\"hello world\"" (Json.valueString $ Phantoms.string "hello world"),
-
-    -- Escape sequences
-    parserCase "escaped double quote" "\"say \\\"hi\\\"\"" (Json.valueString $ Phantoms.string "say \"hi\""),
-    parserCase "escaped backslash" "\"path\\\\to\\\\file\"" (Json.valueString $ Phantoms.string "path\\to\\file"),
-    parserCase "escaped newline" "\"line1\\nline2\"" (Json.valueString $ Phantoms.string "line1\nline2"),
-    parserCase "escaped carriage return" "\"line1\\rline2\"" (Json.valueString $ Phantoms.string "line1\rline2"),
-    parserCase "escaped tab" "\"col1\\tcol2\"" (Json.valueString $ Phantoms.string "col1\tcol2"),
-    parserCase "escaped forward slash" "\"a\\/b\"" (Json.valueString $ Phantoms.string "a/b")]
-
-arraysGroup :: TTerm TestGroup
-arraysGroup = subgroup "arrays" [
-    -- Empty and single element
-    parserCase "empty array" "[]" (Json.valueArray $ Phantoms.list ([] :: [TTerm Value])),
-    parserCase "single element" "[1]" (Json.valueArray $ Phantoms.list [Json.valueNumber $ Phantoms.decimal 1.0]),
-
-    -- Multiple elements
-    parserCase "multiple numbers" "[1, 2, 3]" (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1.0,
-        Json.valueNumber $ Phantoms.decimal 2.0,
-        Json.valueNumber $ Phantoms.decimal 3.0]),
-
-    parserCase "multiple strings" "[\"a\", \"b\"]" (Json.valueArray $ Phantoms.list [
-        Json.valueString $ Phantoms.string "a",
-        Json.valueString $ Phantoms.string "b"]),
-
-    -- Mixed types
-    parserCase "mixed types" "[1, \"two\", true, null]" (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1.0,
-        Json.valueString $ Phantoms.string "two",
-        Json.valueBoolean $ Phantoms.boolean True,
-        Json.valueNull])]
-
-objectsGroup :: TTerm TestGroup
-objectsGroup = subgroup "objects" [
-    -- Empty and single key
-    parserCase "empty object" "{}" (Json.valueObject $ Phantoms.map M.empty),
-    parserCase "single key-value" "{\"name\": \"Alice\"}" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "name", Json.valueString $ Phantoms.string "Alice")]),
-
-    -- Multiple keys
-    parserCase "multiple keys" "{\"a\": 1, \"b\": 2}" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "a", Json.valueNumber $ Phantoms.decimal 1.0),
-        (Phantoms.string "b", Json.valueNumber $ Phantoms.decimal 2.0)]),
-
-    -- Mixed value types
-    parserCase "mixed value types" "{\"active\": true, \"count\": 42, \"name\": \"test\"}" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "count", Json.valueNumber $ Phantoms.decimal 42.0),
-        (Phantoms.string "name", Json.valueString $ Phantoms.string "test"),
-        (Phantoms.string "active", Json.valueBoolean $ Phantoms.boolean True)])]
-
-nestedGroup :: TTerm TestGroup
-nestedGroup = subgroup "nested structures" [
-    -- Array of arrays
-    parserCase "nested arrays" "[[1, 2], [3, 4]]" (Json.valueArray $ Phantoms.list [
-        Json.valueArray $ Phantoms.list [Json.valueNumber $ Phantoms.decimal 1.0, Json.valueNumber $ Phantoms.decimal 2.0],
-        Json.valueArray $ Phantoms.list [Json.valueNumber $ Phantoms.decimal 3.0, Json.valueNumber $ Phantoms.decimal 4.0]]),
-
-    -- Object with array
-    parserCase "object with array" "{\"items\": [1, 2]}" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "items", Json.valueArray $ Phantoms.list [
-            Json.valueNumber $ Phantoms.decimal 1.0,
-            Json.valueNumber $ Phantoms.decimal 2.0])]),
-
-    -- Array of objects
-    parserCase "array of objects" "[{\"id\": 1}, {\"id\": 2}]" (Json.valueArray $ Phantoms.list [
-        Json.valueObject $ Phantoms.map $ M.singleton (Phantoms.string "id") (Json.valueNumber $ Phantoms.decimal 1.0),
-        Json.valueObject $ Phantoms.map $ M.singleton (Phantoms.string "id") (Json.valueNumber $ Phantoms.decimal 2.0)]),
-
-    -- Nested object
-    parserCase "nested object" "{\"user\": {\"name\": \"Bob\"}}" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "user", Json.valueObject $ Phantoms.map $ M.fromList [
-            (Phantoms.string "name", Json.valueString $ Phantoms.string "Bob")])])]
-
-whitespaceGroup :: TTerm TestGroup
-whitespaceGroup = subgroup "whitespace handling" [
-    -- Trailing whitespace (leading whitespace is not stripped by the parser)
-    parserCase "trailing whitespace" "null  " Json.valueNull,
-
-    -- Whitespace in arrays
-    parserCase "array with whitespace" "[ 1 , 2 , 3 ]" (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1.0,
-        Json.valueNumber $ Phantoms.decimal 2.0,
-        Json.valueNumber $ Phantoms.decimal 3.0]),
-
-    -- Whitespace in objects
-    parserCase "object with whitespace" "{ \"a\" : 1 }" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "a", Json.valueNumber $ Phantoms.decimal 1.0)]),
-
-    -- Newlines
-    parserCase "multiline array" "[\n  1,\n  2\n]" (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1.0,
-        Json.valueNumber $ Phantoms.decimal 2.0])]
diff --git a/src/main/haskell/Hydra/Sources/Test/Json/Roundtrip.hs b/src/main/haskell/Hydra/Sources/Test/Json/Roundtrip.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Json/Roundtrip.hs
+++ /dev/null
@@ -1,241 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Round-trip test cases for the JSON encoder and decoder
---
--- These tests verify that:
--- 1. Terms can be encoded to JSON and decoded back to the original term
--- 2. The encoder and decoder handle all supported term constructs correctly
-module Hydra.Sources.Test.Json.Roundtrip where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-import qualified Data.Scientific              as Sci
-
--- Additional imports specific to this module
-import Hydra.Testing
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Json.Encode as EncodeModule
-import qualified Hydra.Sources.Json.Decode as DecodeModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.json.roundtrip"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, Namespace "hydra.json.encode", Namespace "hydra.json.decode"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Round-trip test cases for JSON encoding and decoding")}
-  where
-    definitions = [
-        Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Round-trip test cases for JSON encoding and decoding" $
-    supergroup "JSON round-trip" [
-      literalRoundtripGroup,
-      decimalRoundtripGroup,
-      collectionRoundtripGroup,
-      optionalRoundtripGroup,
-      recordRoundtripGroup]
-
--- Helper for creating JSON round-trip test cases (universal)
--- Encodes term to JSON, decodes back, shows both and compares.
-roundtripTest :: String -> TTerm Type -> TTerm Term -> TTerm TestCaseWithMetadata
-roundtripTest testName typ term = universalCase testName
-  (Eithers.either_
-    (Phantoms.lambda "e" $ Phantoms.var "e")
-    (Phantoms.lambda "json" $
-      Eithers.either_
-        (Phantoms.lambda "e" $ Phantoms.var "e")
-        (Phantoms.lambda "decoded" $ ShowCore.term # Phantoms.var "decoded")
-        (DecodeModule.fromJson # Maps.empty # Core.name (Phantoms.string "test") # typ # Phantoms.var "json"))
-    (EncodeModule.toJson # Maps.empty # Core.name (Phantoms.string "test") # typ # term))
-  (ShowCore.term # term)
-
-----------------------------------------
--- Literal types
-----------------------------------------
-
-literalRoundtripGroup :: TTerm TestGroup
-literalRoundtripGroup = subgroup "literal types" [
-    -- Booleans
-    roundtripTest "boolean true" T.boolean (boolean True),
-    roundtripTest "boolean false" T.boolean (boolean False),
-
-    -- Integers (native JSON numbers - fit within JSON precision)
-    roundtripTest "int8 positive" T.int8 (int8 42),
-    roundtripTest "int8 negative" T.int8 (int8 (-17)),
-    roundtripTest "int16" T.int16 (int16 1000),
-    roundtripTest "int32" T.int32 (int32 100000),
-    roundtripTest "uint8" T.uint8 (uint8 200),
-    roundtripTest "uint16" T.uint16 (uint16 50000),
-
-    -- Larger integers (within JSON safe integer range ~2^53)
-    roundtripTest "int64" T.int64 (int64 1000000000000),
-    roundtripTest "uint32" T.uint32 (uint32 4000000000),
-
-    -- Floats
-    roundtripTest "float32" T.float32 (float32 1.5),
-    roundtripTest "float64" T.float64 (float64 3.14159),
-
-    -- Special floats (NaN, Infinity, -Infinity) encoded as JSON string sentinels.
-    -- Bigfloat is omitted because Java BigDecimal and Python Decimal cannot represent
-    -- IEEE 754 special values; float32 and float64 carry them natively.
-    roundtripTest "float32 NaN" T.float32 (float32 (0/0)),
-    roundtripTest "float32 positive infinity" T.float32 (float32 (1/0)),
-    roundtripTest "float32 negative infinity" T.float32 (float32 (-1/0)),
-    roundtripTest "float64 NaN" T.float64 (float64 (0/0)),
-    roundtripTest "float64 positive infinity" T.float64 (float64 (1/0)),
-    roundtripTest "float64 negative infinity" T.float64 (float64 (-1/0)),
-
-    -- Strings
-    roundtripTest "string simple" T.string (string "hello"),
-    roundtripTest "string empty" T.string (string ""),
-    roundtripTest "string with spaces" T.string (string "hello world")]
-
-----------------------------------------
--- Decimal precision
-----------------------------------------
-
--- | Decimal round-trips must preserve arbitrary precision. Covers values that Double
--- could express exactly (everyday decimals, modest exponents) — hosts with native
--- arbitrary-precision decimals (BigDecimal in Java/Scala/Clojure, Decimal in Python) also
--- preserve large-integer precision, but dialects like Scheme/Common Lisp/Emacs Lisp emit
--- decimal literals as Double and lose it before the round trip begins, so we don't test
--- values outside Double's exact range at this level.
-decimalRoundtripGroup :: TTerm TestGroup
-decimalRoundtripGroup = subgroup "decimal precision" [
-    roundtripTest "decimal zero" T.decimal (decimal 0),
-    roundtripTest "decimal whole" T.decimal (decimal 42),
-    roundtripTest "decimal negative whole" T.decimal (decimal (-17)),
-    roundtripTest "decimal fraction" T.decimal (decimal 3.14),
-    roundtripTest "decimal negative fraction" T.decimal (decimal (-2.5)),
-    -- Tiny and huge exponents (single-coefficient, representable as Double)
-    roundtripTest "decimal tiny exponent"
-      T.decimal
-      (decimal (Sci.scientific 1 (-20))),
-    roundtripTest "decimal huge exponent"
-      T.decimal
-      (decimal (Sci.scientific 1 20))]
-
-----------------------------------------
--- Collection types
-----------------------------------------
-
-collectionRoundtripGroup :: TTerm TestGroup
-collectionRoundtripGroup = subgroup "collection types" [
-    -- Lists
-    roundtripTest "list of integers"
-      (T.list T.int32)
-      (list [int32 1, int32 2, int32 3]),
-    roundtripTest "list of strings"
-      (T.list T.string)
-      (list [string "a", string "b"]),
-    roundtripTest "empty list"
-      (T.list T.int32)
-      (list []),
-    roundtripTest "nested list"
-      (T.list $ T.list T.int32)
-      (list [list [int32 1, int32 2], list [int32 3]]),
-
-    -- Sets (encoded as arrays)
-    roundtripTest "set of strings"
-      (T.set T.string)
-      (set [string "a", string "b"]),
-    roundtripTest "empty set"
-      (T.set T.int32)
-      (set [])]
-
-----------------------------------------
--- Optional types
-----------------------------------------
-
-optionalRoundtripGroup :: TTerm TestGroup
-optionalRoundtripGroup = subgroup "optional types" [
-    -- Simple Maybe (idiomatic encoding: null for Nothing, plain value for Just)
-    roundtripTest "optional string with value"
-      (T.optional T.string)
-      (optional $ just $ string "hello"),
-    roundtripTest "optional string nothing"
-      (T.optional T.string)
-      (optional nothing),
-    roundtripTest "optional int with value"
-      (T.optional T.int32)
-      (optional $ just $ int32 42),
-
-    -- Nested Maybe (array-wrapped encoding for round-trip fidelity)
-    roundtripTest "nested optional: nothing"
-      (T.optional $ T.optional T.string)
-      (optional nothing),
-    roundtripTest "nested optional: just nothing"
-      (T.optional $ T.optional T.string)
-      (optional $ just $ optional nothing),
-    roundtripTest "nested optional: just just value"
-      (T.optional $ T.optional T.string)
-      (optional $ just $ optional $ just $ string "hello")]
-
-----------------------------------------
--- Record types with optional fields
-----------------------------------------
-
-recordRoundtripGroup :: TTerm TestGroup
-recordRoundtripGroup = subgroup "record types" [
-    -- Record with all required fields
-    roundtripTest "record with required fields"
-      (T.record (name "test") ["name">: T.string, "age">: T.int32])
-      (record (name "test") ["name">: string "Alice", "age">: int32 30]),
-
-    -- Record with optional field present
-    roundtripTest "record with optional field present"
-      (T.record (name "test") ["name">: T.string, "email">: T.optional T.string])
-      (record (name "test") ["name">: string "Alice", "email">: optional (just $ string "alice@example.com")]),
-
-    -- Record with optional field absent (Nothing -> field omitted in JSON)
-    roundtripTest "record with optional field absent"
-      (T.record (name "test") ["name">: T.string, "email">: T.optional T.string])
-      (record (name "test") ["name">: string "Alice", "email">: optional nothing]),
-
-    -- Record with multiple optional fields, some present some absent
-    roundtripTest "record with mixed optional fields"
-      (T.record (name "test") [
-        "name">: T.string,
-        "email">: T.optional T.string,
-        "age">: T.optional T.int32])
-      (record (name "test") [
-        "name">: string "Bob",
-        "email">: optional nothing,
-        "age">: optional (just $ int32 25)]),
-
-    -- Record with nested Maybe field (uses array-wrapped encoding, field not omitted)
-    roundtripTest "record with nested optional field"
-      (T.record (name "test") [
-        "name">: T.string,
-        "value">: T.optional (T.optional T.int32)])
-      (record (name "test") [
-        "name">: string "test",
-        "value">: optional (just $ optional (just $ int32 42))])]
diff --git a/src/main/haskell/Hydra/Sources/Test/Json/Writer.hs b/src/main/haskell/Hydra/Sources/Test/Json/Writer.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Json/Writer.hs
+++ /dev/null
@@ -1,186 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Test.Json.Writer where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-import qualified Data.Scientific              as Sci
-
--- Additional imports specific to this module
-import Hydra.Json.Model (Value)
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Json.Model as Json
-import qualified Hydra.Sources.Json.Writer as WriterModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.json.writer"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.json.writer"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for JSON serialization")}
-  where
-    definitions = [
-        Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for JSON serialization (writer)" $
-    supergroup "JSON serialization" [
-      primitivesGroup,
-      decimalPrecisionGroup,
-      stringsGroup,
-      arraysGroup,
-      objectsGroup,
-      nestedGroup]
-
--- Local alias for polymorphic application
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- Helper for creating JSON writer test cases (universal)
-writerCase :: String -> TTerm Value -> String -> TTerm TestCaseWithMetadata
-writerCase name jsonValue expectedStr = universalCase name
-  (WriterModule.printJson # jsonValue)
-  (Phantoms.string expectedStr)
-
-primitivesGroup :: TTerm TestGroup
-primitivesGroup = subgroup "primitives" [
-    -- Null
-    writerCase "null" Json.valueNull "null",
-
-    -- Booleans
-    writerCase "true" (Json.valueBoolean $ Phantoms.boolean True) "true",
-    writerCase "false" (Json.valueBoolean $ Phantoms.boolean False) "false",
-
-    -- Numbers - whole-valued decimals print in plain form when that's shorter than
-    -- scientific notation; fractional values use Scientific's canonical form.
-    writerCase "zero" (Json.valueNumber $ Phantoms.decimal 0.0) "0",
-    writerCase "positive integer" (Json.valueNumber $ Phantoms.decimal 42.0) "42",
-    writerCase "negative integer" (Json.valueNumber $ Phantoms.decimal (-17.0)) "-17",
-    writerCase "large integer" (Json.valueNumber $ Phantoms.decimal 1000000.0) "1000000",
-
-    -- Numbers - fractions. showDecimal (Scientific's Show) stays plain only in the
-    -- narrow [0.1, 1) ∪ whole-ish band; values like 0.01 and 0.001 come out in
-    -- scientific form. This is imperfect but uniform across all Hydra hosts.
-    writerCase "decimal" (Json.valueNumber $ Phantoms.decimal 3.14) "3.14",
-    writerCase "negative decimal" (Json.valueNumber $ Phantoms.decimal (-2.5)) "-2.5",
-    writerCase "hundredth" (Json.valueNumber $ Phantoms.decimal 0.01) "1.0e-2",
-    writerCase "small decimal" (Json.valueNumber $ Phantoms.decimal 0.001) "1.0e-3"]
-
--- | Precision tests: values at the edges of what Scientific's default Show handles.
--- Full cross-host arbitrary-precision round trip is covered by decimalRoundtripGroup in
--- Test.Json.Roundtrip; this group exercises the writer's lexical choices.
--- Note: we do not include "more digits than Double" cases (e.g. 10^20 + 1) here because
--- several Hydra hosts emit decimal literals as host-native Double, which loses precision
--- before the writer even sees the value. Those cases are exercised only via the decimal
--- type coder, which goes through BigDecimal/Scientific without the lossy emission step.
-decimalPrecisionGroup :: TTerm TestGroup
-decimalPrecisionGroup = subgroup "decimal precision" [
-    -- Tiny and huge exponents stay in scientific notation (plain would be 20+ digits
-    -- of zeroes, which no human can parse reliably).
-    writerCase "tiny exponent"
-      (Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 (-20)))
-      "1.0e-20",
-    writerCase "huge exponent"
-      (Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 20))
-      "1.0e20"]
-
-stringsGroup :: TTerm TestGroup
-stringsGroup = subgroup "strings" [
-    -- Basic strings
-    writerCase "empty string" (Json.valueString $ Phantoms.string "") "\"\"",
-    writerCase "simple string" (Json.valueString $ Phantoms.string "hello") "\"hello\"",
-    writerCase "string with spaces" (Json.valueString $ Phantoms.string "hello world") "\"hello world\"",
-
-    -- Escape sequences
-    writerCase "string with double quote" (Json.valueString $ Phantoms.string "say \"hi\"") "\"say \\\"hi\\\"\"",
-    writerCase "string with backslash" (Json.valueString $ Phantoms.string "path\\to\\file") "\"path\\\\to\\\\file\"",
-    writerCase "string with newline" (Json.valueString $ Phantoms.string "line1\nline2") "\"line1\\nline2\"",
-    writerCase "string with carriage return" (Json.valueString $ Phantoms.string "line1\rline2") "\"line1\\rline2\"",
-    writerCase "string with tab" (Json.valueString $ Phantoms.string "col1\tcol2") "\"col1\\tcol2\"",
-    writerCase "string with mixed escapes" (Json.valueString $ Phantoms.string "a\"b\\c\nd") "\"a\\\"b\\\\c\\nd\""]
-
-arraysGroup :: TTerm TestGroup
-arraysGroup = subgroup "arrays" [
-    -- Empty and single element
-    writerCase "empty array" (Json.valueArray $ Phantoms.list ([] :: [TTerm Value])) "[]",
-    writerCase "single element" (Json.valueArray $ Phantoms.list [Json.valueNumber $ Phantoms.decimal 1.0]) "[1]",
-
-    -- Multiple elements
-    writerCase "multiple numbers" (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1.0,
-        Json.valueNumber $ Phantoms.decimal 2.0,
-        Json.valueNumber $ Phantoms.decimal 3.0]) "[1, 2, 3]",
-
-    writerCase "multiple strings" (Json.valueArray $ Phantoms.list [
-        Json.valueString $ Phantoms.string "a",
-        Json.valueString $ Phantoms.string "b"]) "[\"a\", \"b\"]",
-
-    -- Mixed types
-    writerCase "mixed types" (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1.0,
-        Json.valueString $ Phantoms.string "two",
-        Json.valueBoolean $ Phantoms.boolean True,
-        Json.valueNull]) "[1, \"two\", true, null]"]
-
-objectsGroup :: TTerm TestGroup
-objectsGroup = subgroup "objects" [
-    -- Empty and single key
-    writerCase "empty object" (Json.valueObject $ Phantoms.map M.empty) "{}",
-    writerCase "single key-value" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "name", Json.valueString $ Phantoms.string "Alice")]) "{\"name\": \"Alice\"}",
-
-    -- Multiple keys
-    writerCase "multiple keys" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "a", Json.valueNumber $ Phantoms.decimal 1.0),
-        (Phantoms.string "b", Json.valueNumber $ Phantoms.decimal 2.0)]) "{\"a\": 1, \"b\": 2}",
-
-    -- Mixed value types
-    writerCase "mixed value types" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "count", Json.valueNumber $ Phantoms.decimal 42.0),
-        (Phantoms.string "name", Json.valueString $ Phantoms.string "test"),
-        (Phantoms.string "active", Json.valueBoolean $ Phantoms.boolean True)]) "{\"active\": true, \"count\": 42, \"name\": \"test\"}"]
-
-nestedGroup :: TTerm TestGroup
-nestedGroup = subgroup "nested structures" [
-    -- Array of arrays
-    writerCase "nested arrays" (Json.valueArray $ Phantoms.list [
-        Json.valueArray $ Phantoms.list [Json.valueNumber $ Phantoms.decimal 1.0, Json.valueNumber $ Phantoms.decimal 2.0],
-        Json.valueArray $ Phantoms.list [Json.valueNumber $ Phantoms.decimal 3.0, Json.valueNumber $ Phantoms.decimal 4.0]]) "[[1, 2], [3, 4]]",
-
-    -- Object with array
-    writerCase "object with array" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "items", Json.valueArray $ Phantoms.list [
-            Json.valueNumber $ Phantoms.decimal 1.0,
-            Json.valueNumber $ Phantoms.decimal 2.0])]) "{\"items\": [1, 2]}",
-
-    -- Array of objects
-    writerCase "array of objects" (Json.valueArray $ Phantoms.list [
-        Json.valueObject $ Phantoms.map $ M.singleton (Phantoms.string "id") (Json.valueNumber $ Phantoms.decimal 1.0),
-        Json.valueObject $ Phantoms.map $ M.singleton (Phantoms.string "id") (Json.valueNumber $ Phantoms.decimal 2.0)]) "[{\"id\": 1}, {\"id\": 2}]",
-
-    -- Nested object
-    writerCase "nested object" (Json.valueObject $ Phantoms.map $ M.fromList [
-        (Phantoms.string "user", Json.valueObject $ Phantoms.map $ M.fromList [
-            (Phantoms.string "name", Json.valueString $ Phantoms.string "Bob")])]) "{\"user\": {\"name\": \"Bob\"}}"]
diff --git a/src/main/haskell/Hydra/Sources/Test/Json/Yaml.hs b/src/main/haskell/Hydra/Sources/Test/Json/Yaml.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Json/Yaml.hs
+++ /dev/null
@@ -1,94 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Round-trip test cases for the JSON<->YAML bridge, focused on decimal precision.
---
--- These tests verify that JSON numbers (decimal-encoded by spec) survive the trip through
--- YAML via the dedicated decimal scalar variant in Hydra YAML.
-module Hydra.Sources.Test.Json.Yaml where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-import qualified Data.Scientific              as Sci
-
--- Additional imports specific to this module
-import Hydra.Testing
-import Hydra.Json.Model (Value)
-import qualified Hydra.Dsl.Json.Model as Json
-import qualified Hydra.Sources.Json.Writer as JsonWriter
-import qualified Hydra.Sources.Json.Yaml.Encode as JsonYamlEncode
-import qualified Hydra.Sources.Json.Yaml.Decode as JsonYamlDecode
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.json.yaml"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.json.writer", Namespace "hydra.json.yaml.encode", Namespace "hydra.json.yaml.decode"],
-            moduleTypeDependencies = (Namespace "hydra.yaml.model" : kernelTypesNamespaces),
-            moduleDescription = (Just "Round-trip test cases for the JSON<->YAML bridge, focused on decimal precision")}
-  where
-    definitions = [
-        Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Round-trip test cases for the JSON<->YAML decimal bridge" $
-    supergroup "JSON<->YAML bridge" [
-      decimalBridgeGroup]
-
--- | Round-trip a JSON value through YAML and back, asserting the result prints identically.
--- JSON -> YAML -> JSON must preserve the full decimal value for any JSON number.
-yamlBridgeCase :: String -> TTerm Value -> TTerm TestCaseWithMetadata
-yamlBridgeCase testName jsonValue = universalCase testName
-  (Eithers.either_
-    (Phantoms.lambda "e" $ Phantoms.var "e")
-    (Phantoms.lambda "back" $ JsonWriter.printJson # Phantoms.var "back")
-    (JsonYamlDecode.yamlToJson # (JsonYamlEncode.jsonToYaml # jsonValue)))
-  (JsonWriter.printJson # jsonValue)
-
-decimalBridgeGroup :: TTerm TestGroup
-decimalBridgeGroup = subgroup "decimal round-trip" [
-    yamlBridgeCase "zero" (Json.valueNumber $ Phantoms.decimal 0),
-    yamlBridgeCase "positive whole" (Json.valueNumber $ Phantoms.decimal 42),
-    yamlBridgeCase "negative whole" (Json.valueNumber $ Phantoms.decimal (-17)),
-    yamlBridgeCase "fraction" (Json.valueNumber $ Phantoms.decimal 3.14),
-    yamlBridgeCase "negative fraction" (Json.valueNumber $ Phantoms.decimal (-2.5)),
-    yamlBridgeCase "tiny exponent"
-      (Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 (-20))),
-    yamlBridgeCase "huge exponent"
-      (Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 20)),
-    -- Non-number JSON values pass through unchanged
-    yamlBridgeCase "null" Json.valueNull,
-    yamlBridgeCase "true" (Json.valueBoolean $ Phantoms.boolean True),
-    yamlBridgeCase "false" (Json.valueBoolean $ Phantoms.boolean False),
-    yamlBridgeCase "simple string" (Json.valueString $ Phantoms.string "hello"),
-    -- Array mixing decimal numbers and strings
-    yamlBridgeCase "mixed array"
-      (Json.valueArray $ Phantoms.list [
-        Json.valueNumber $ Phantoms.decimal 1,
-        Json.valueNumber $ Phantoms.decimal (Sci.scientific 1 (-20)),
-        Json.valueString $ Phantoms.string "note"])]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Chars.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Chars.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Chars.hs
+++ /dev/null
@@ -1,97 +0,0 @@
-module Hydra.Sources.Test.Lib.Chars where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Data.Char (ord)
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.chars"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for hydra.lib.chars primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
--- Test groups for hydra.lib.chars primitives
-
-charsIsAlphaNum :: TTerm TestGroup
-charsIsAlphaNum = subgroup "isAlphaNum" [
-  test "letter" (ord 'a') true,
-  test "digit" (ord '5') true,
-  test "space" (ord ' ') false,
-  test "punctuation" (ord '.') false]
-  where
-    test name x result = primCase name _chars_isAlphaNum [int32 x] result
-
-charsIsLower :: TTerm TestGroup
-charsIsLower = subgroup "isLower" [
-  test "lowercase" (ord 'a') true,
-  test "uppercase" (ord 'A') false,
-  test "digit" (ord '5') false]
-  where
-    test name x result = primCase name _chars_isLower [int32 x] result
-
-charsIsSpace :: TTerm TestGroup
-charsIsSpace = subgroup "isSpace" [
-  test "space" (ord ' ') true,
-  test "tab" (ord '\t') true,
-  test "newline" (ord '\n') true,
-  test "letter" (ord 'a') false]
-  where
-    test name x result = primCase name _chars_isSpace [int32 x] result
-
-charsIsUpper :: TTerm TestGroup
-charsIsUpper = subgroup "isUpper" [
-  test "uppercase" (ord 'A') true,
-  test "lowercase" (ord 'a') false,
-  test "digit" (ord '5') false]
-  where
-    test name x result = primCase name _chars_isUpper [int32 x] result
-
-charsToLower :: TTerm TestGroup
-charsToLower = subgroup "toLower" [
-  test "uppercase" (ord 'A') (ord 'a'),
-  test "lowercase" (ord 'a') (ord 'a'),
-  test "digit" (ord '5') (ord '5')]
-  where
-    test name x result = primCase name _chars_toLower [int32 x] (int32 result)
-
-charsToUpper :: TTerm TestGroup
-charsToUpper = subgroup "toUpper" [
-  test "lowercase" (ord 'a') (ord 'A'),
-  test "uppercase" (ord 'A') (ord 'A'),
-  test "digit" (ord '5') (ord '5')]
-  where
-    test name x result = primCase name _chars_toUpper [int32 x] (int32 result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.chars primitives" $
-    supergroup "hydra.lib.chars primitives" [
-      charsIsAlphaNum,
-      charsIsLower,
-      charsIsSpace,
-      charsIsUpper,
-      charsToLower,
-      charsToUpper]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Eithers.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Eithers.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Eithers.hs
+++ /dev/null
@@ -1,259 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Test.Lib.Eithers where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Eithers as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic as Logic
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.eithers"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for hydra.lib.eithers primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- Show functions
-
-showInt32 :: TTerm (Int -> String)
-showInt32 = Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")
-
-showBool :: TTerm (Bool -> String)
-showBool = Phantoms.lambda "b" $ Literals.showBoolean (Phantoms.var "b")
-
-showStr :: TTerm (String -> String)
-showStr = Phantoms.lambda "s" $ Literals.showString (Phantoms.var "s")
-
-showIntList :: TTerm ([Int] -> String)
-showIntList = Phantoms.lambda "xs" $ ShowCore.list_ # showInt32 # Phantoms.var "xs"
-
-showStrList :: TTerm ([String] -> String)
-showStrList = Phantoms.lambda "xs" $ ShowCore.list_ # showStr # Phantoms.var "xs"
-
-showEitherIntString :: TTerm (Either Int String -> String)
-showEitherIntString = Phantoms.lambda "e" $ ShowCore.either_ # showInt32 # showStr # Phantoms.var "e"
-
-showEitherIntInt :: TTerm (Either Int Int -> String)
-showEitherIntInt = Phantoms.lambda "e" $ ShowCore.either_ # showInt32 # showInt32 # Phantoms.var "e"
-
-showEitherStringIntList :: TTerm (Either String [Int] -> String)
-showEitherStringIntList = Phantoms.lambda "e" $ ShowCore.either_ # showStr # showIntList # Phantoms.var "e"
-
-showEitherStringMaybeInt :: TTerm (Either String (Maybe Int) -> String)
-showEitherStringMaybeInt = Phantoms.lambda "e" $ ShowCore.either_ # showStr # showMaybeInt # Phantoms.var "e"
-
-showMaybeInt :: TTerm (Maybe Int -> String)
-showMaybeInt = Phantoms.lambda "mx" $ ShowCore.maybe_ # showInt32 # Phantoms.var "mx"
-
-showPairIntListStringList :: TTerm (([Int], [String]) -> String)
-showPairIntListStringList = Phantoms.lambda "p" $ ShowCore.pair_ # showIntList # showStrList # Phantoms.var "p"
-
--- Phantom-typed helpers
-
-leftInt :: Int -> TTerm (Either Int b)
-leftInt x = Phantoms.left (Phantoms.int32 x)
-
-rightStr :: String -> TTerm (Either a String)
-rightStr s = Phantoms.right (Phantoms.string s)
-
-rightInt :: Int -> TTerm (Either a Int)
-rightInt x = Phantoms.right (Phantoms.int32 x)
-
--- Test groups for hydra.lib.eithers primitives
-
-eithersBind :: TTerm TestGroup
-eithersBind = subgroup "bind" [
-  test "bind Right with success" (rightStr "ab") (rightInt 2),
-  test "bind Right with failure" (rightStr "") (leftInt 0),
-  test "bind Left returns Left unchanged" (leftInt 42) (leftInt 42)]
-  where
-    bindFn = Phantoms.lambda "s" $
-      Logic.ifElse (Strings.null (Phantoms.var "s"))
-        (Phantoms.left (Phantoms.int32 0))
-        (Phantoms.right (Strings.length (Phantoms.var "s")))
-    test name input expected = evalPair name showEitherIntInt
-      (Eithers.bind input bindFn)
-      expected
-
-eithersBimap :: TTerm TestGroup
-eithersBimap = subgroup "bimap" [
-  test "map left value" (leftInt 5) (leftInt 10),
-  test "map right value" (rightStr "ab") (rightInt 2)]
-  where
-    test name input expected = evalPair name showEitherIntInt
-      (Eithers.bimap
-        (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2))
-        (Phantoms.lambda "s" $ Strings.length (Phantoms.var "s"))
-        input)
-      expected
-
-eithersIsLeft :: TTerm TestGroup
-eithersIsLeft = subgroup "isLeft" [
-  test "left value" (leftInt 42) True,
-  test "right value" (rightStr "test") False]
-  where
-    test name x result = evalPair name showBool
-      (Eithers.isLeft x)
-      (Phantoms.boolean result)
-
-eithersIsRight :: TTerm TestGroup
-eithersIsRight = subgroup "isRight" [
-  test "right value" (rightStr "test") True,
-  test "left value" (leftInt 42) False]
-  where
-    test name x result = evalPair name showBool
-      (Eithers.isRight x)
-      (Phantoms.boolean result)
-
-eithersFromLeft :: TTerm TestGroup
-eithersFromLeft = subgroup "fromLeft" [
-  test "extract left" 99 (leftInt 42) 42,
-  test "use default for right" 99 (rightStr "test") 99]
-  where
-    test name def x result = evalPair name showInt32
-      (Eithers.fromLeft (Phantoms.int32 def) x)
-      (Phantoms.int32 result)
-
-eithersFromRight :: TTerm TestGroup
-eithersFromRight = subgroup "fromRight" [
-  test "extract right" "default" (rightStr "test") "test",
-  test "use default for left" "default" (leftInt 42) "default"]
-  where
-    test name def x result = evalPair name showStr
-      (Eithers.fromRight (Phantoms.string def) x)
-      (Phantoms.string result)
-
-eithersEither :: TTerm TestGroup
-eithersEither = subgroup "either" [
-  test "apply left function" (leftInt 5) 10,
-  test "apply right function" (rightStr "ab") 2]
-  where
-    test name x result = evalPair name showInt32
-      (Eithers.either_
-        (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2))
-        (Phantoms.lambda "s" $ Strings.length (Phantoms.var "s"))
-        x)
-      (Phantoms.int32 result)
-
-eithersLefts :: TTerm TestGroup
-eithersLefts = subgroup "lefts" [
-  test "filter left values" [leftInt 1, rightStr "a", leftInt 2, rightStr "b"] [1, 2],
-  test "all lefts" [leftInt 1, leftInt 2] [1, 2],
-  test "all rights" [rightStr "a", rightStr "b"] [],
-  test "empty list" ([] :: [TTerm (Either Int String)]) []]
-  where
-    test name input expected = evalPair name showIntList
-      (Eithers.lefts (Phantoms.list input))
-      (Phantoms.list (Phantoms.int32 <$> expected))
-
-eithersRights :: TTerm TestGroup
-eithersRights = subgroup "rights" [
-  test "filter right values" [leftInt 1, rightStr "a", leftInt 2, rightStr "b"] ["a", "b"],
-  test "all rights" [rightStr "a", rightStr "b"] ["a", "b"],
-  test "all lefts" [leftInt 1, leftInt 2] [],
-  test "empty list" ([] :: [TTerm (Either Int String)]) []]
-  where
-    test name input expected = evalPair name showStrList
-      (Eithers.rights (Phantoms.list input))
-      (Phantoms.list (Phantoms.string <$> expected))
-
-eithersPartitionEithers :: TTerm TestGroup
-eithersPartitionEithers = subgroup "partitionEithers" [
-  test "partition mixed" [leftInt 1, rightStr "a", leftInt 2, rightStr "b"] ([1, 2], ["a", "b"]),
-  test "all lefts" [leftInt 1, leftInt 2] ([1, 2], []),
-  test "all rights" [rightStr "a", rightStr "b"] ([], ["a", "b"]),
-  test "empty list" ([] :: [TTerm (Either Int String)]) ([], [])]
-  where
-    test name input (lefts, rights) = evalPair name showPairIntListStringList
-      (Eithers.partitionEithers (Phantoms.list input))
-      (Phantoms.pair (Phantoms.list (Phantoms.int32 <$> lefts)) (Phantoms.list (Phantoms.string <$> rights)))
-
-eithersMap :: TTerm TestGroup
-eithersMap = subgroup "map" [
-  test "map right value" (rightInt 5) (rightInt 10),
-  test "preserve left" (leftInt 99) (leftInt 99)]
-  where
-    test name input expected = evalPair name showEitherIntInt
-      (Eithers.map
-        (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2))
-        input)
-      expected
-
-eithersMapList :: TTerm TestGroup
-eithersMapList = subgroup "mapList" [
-  test "all succeed" [1, 2, 3] (Phantoms.right (Phantoms.list [Phantoms.int32 2, Phantoms.int32 4, Phantoms.int32 6])),
-  test "first fails" [1, 0, 3] (Phantoms.left (Phantoms.string "zero")),
-  test "empty list" [] (Phantoms.right (Phantoms.list ([] :: [TTerm Int])))]
-  where
-    mapFn = Phantoms.lambda "x" $
-      Logic.ifElse (Equality.equal (Phantoms.var "x") (Phantoms.int32 0))
-        (Phantoms.left (Phantoms.string "zero"))
-        (Phantoms.right (Math.mul (Phantoms.var "x") (Phantoms.int32 2)))
-    test name input expected = evalPair name showEitherStringIntList
-      (Eithers.mapList mapFn (Phantoms.list (Phantoms.int32 <$> input)))
-      expected
-
-eithersMapMaybe :: TTerm TestGroup
-eithersMapMaybe = subgroup "mapMaybe" [
-  test "just succeeds" (Phantoms.just (Phantoms.int32 5)) (Phantoms.right (Phantoms.just (Phantoms.int32 10))),
-  test "just fails" (Phantoms.just (Phantoms.int32 0)) (Phantoms.left (Phantoms.string "zero")),
-  test "nothing" (Phantoms.nothing :: TTerm (Maybe Int)) (Phantoms.right (Phantoms.nothing :: TTerm (Maybe Int)))]
-  where
-    mapFn = Phantoms.lambda "x" $
-      Logic.ifElse (Equality.equal (Phantoms.var "x") (Phantoms.int32 0))
-        (Phantoms.left (Phantoms.string "zero"))
-        (Phantoms.right (Math.mul (Phantoms.var "x") (Phantoms.int32 2)))
-    test name input expected = evalPair name showEitherStringMaybeInt
-      (Eithers.mapMaybe mapFn input)
-      expected
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.eithers primitives" $
-    supergroup "hydra.lib.eithers primitives" [
-      eithersBind,
-      eithersBimap,
-      eithersIsLeft,
-      eithersIsRight,
-      eithersFromLeft,
-      eithersFromRight,
-      eithersEither,
-      eithersLefts,
-      eithersRights,
-      eithersPartitionEithers,
-      eithersMap,
-      eithersMapList,
-      eithersMapMaybe]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Equality.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Equality.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Equality.hs
+++ /dev/null
@@ -1,198 +0,0 @@
-module Hydra.Sources.Test.Lib.Equality where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.equality"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for hydra.lib.equality primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
--- Test groups for hydra.lib.equality primitives
-
-equalityCompare :: TTerm TestGroup
-equalityCompare = subgroup "compare" [
-  test "less than" 3 5 "lessThan",
-  test "equal" 5 5 "equalTo",
-  test "greater than" 5 3 "greaterThan"]
-  where
-    test testName x y resultField = primCase testName _equality_compare [int32 x, int32 y] (injectUnit (name "hydra.util.Comparison") resultField)
-
-equalityEqual :: TTerm TestGroup
-equalityEqual = subgroup "equal" [
-  test "equal integers" 5 5 true,
-  test "unequal integers" 5 3 false]
-  where
-    test name x y result = primCase name _equality_equal [int32 x, int32 y] result
-
-equalityGt :: TTerm TestGroup
-equalityGt = subgroup "gt" [
-  test "greater" 5 3 true,
-  test "equal" 5 5 false,
-  test "less" 3 5 false]
-  where
-    test name x y result = primCase name _equality_gt [int32 x, int32 y] result
-
-equalityGte :: TTerm TestGroup
-equalityGte = subgroup "gte" [
-  test "greater" 5 3 true,
-  test "equal" 5 5 true,
-  test "less" 3 5 false]
-  where
-    test name x y result = primCase name _equality_gte [int32 x, int32 y] result
-
-equalityIdentity :: TTerm TestGroup
-equalityIdentity = subgroup "identity" [
-  test "integer" 42 42]
-  where
-    test name x result = primCase name _equality_identity [int32 x] (int32 result)
-
-equalityLt :: TTerm TestGroup
-equalityLt = subgroup "lt" [
-  test "less" 3 5 true,
-  test "equal" 5 5 false,
-  test "greater" 5 3 false]
-  where
-    test name x y result = primCase name _equality_lt [int32 x, int32 y] result
-
-equalityLte :: TTerm TestGroup
-equalityLte = subgroup "lte" [
-  test "less" 3 5 true,
-  test "equal" 5 5 true,
-  test "greater" 5 3 false]
-  where
-    test name x y result = primCase name _equality_lte [int32 x, int32 y] result
-
-equalityMax :: TTerm TestGroup
-equalityMax = subgroup "max" [
-  test "first greater" 5 3 5,
-  test "second greater" 3 5 5,
-  test "equal" 5 5 5]
-  where
-    test name x y result = primCase name _equality_max [int32 x, int32 y] (int32 result)
-
-equalityMin :: TTerm TestGroup
-equalityMin = subgroup "min" [
-  test "first less" 3 5 3,
-  test "second less" 5 3 3,
-  test "equal" 5 5 5]
-  where
-    test name x y result = primCase name _equality_min [int32 x, int32 y] (int32 result)
-
--- Tests for ordering with string values
-equalityCompareStrings :: TTerm TestGroup
-equalityCompareStrings = subgroup "compare strings" [
-  test "less than (lexicographic)" "apple" "banana" "lessThan",
-  test "equal" "hello" "hello" "equalTo",
-  test "greater than (lexicographic)" "zebra" "apple" "greaterThan",
-  test "empty vs non-empty" "" "a" "lessThan",
-  test "prefix vs longer" "ab" "abc" "lessThan"]
-  where
-    test testName x y resultField = primCase testName _equality_compare [string x, string y] (injectUnit (name "hydra.util.Comparison") resultField)
-
-equalityLtStrings :: TTerm TestGroup
-equalityLtStrings = subgroup "lt strings" [
-  test "less (lexicographic)" "apple" "banana" true,
-  test "equal" "hello" "hello" false,
-  test "greater" "zebra" "apple" false]
-  where
-    test name x y result = primCase name _equality_lt [string x, string y] result
-
-equalityGtStrings :: TTerm TestGroup
-equalityGtStrings = subgroup "gt strings" [
-  test "greater (lexicographic)" "zebra" "apple" true,
-  test "equal" "hello" "hello" false,
-  test "less" "apple" "banana" false]
-  where
-    test name x y result = primCase name _equality_gt [string x, string y] result
-
-equalityMaxStrings :: TTerm TestGroup
-equalityMaxStrings = subgroup "max strings" [
-  test "first greater" "zebra" "apple" "zebra",
-  test "second greater" "apple" "zebra" "zebra",
-  test "equal" "hello" "hello" "hello"]
-  where
-    test name x y result = primCase name _equality_max [string x, string y] (string result)
-
-equalityMinStrings :: TTerm TestGroup
-equalityMinStrings = subgroup "min strings" [
-  test "first less" "apple" "zebra" "apple",
-  test "second less" "zebra" "apple" "apple",
-  test "equal" "hello" "hello" "hello"]
-  where
-    test name x y result = primCase name _equality_min [string x, string y] (string result)
-
--- Tests for ordering with float values
-equalityCompareFloats :: TTerm TestGroup
-equalityCompareFloats = subgroup "compare floats" [
-  test "less than" 1.5 2.5 "lessThan",
-  test "equal" 3.14 3.14 "equalTo",
-  test "greater than" 5.0 3.0 "greaterThan",
-  test "negative vs positive" (-1.0) 1.0 "lessThan"]
-  where
-    test testName x y resultField = primCase testName _equality_compare [float64 x, float64 y] (injectUnit (name "hydra.util.Comparison") resultField)
-
-equalityLtFloats :: TTerm TestGroup
-equalityLtFloats = subgroup "lt floats" [
-  test "less" 1.5 2.5 true,
-  test "equal" 3.14 3.14 false,
-  test "greater" 5.0 3.0 false]
-  where
-    test name x y result = primCase name _equality_lt [float64 x, float64 y] result
-
-equalityGtFloats :: TTerm TestGroup
-equalityGtFloats = subgroup "gt floats" [
-  test "greater" 5.0 3.0 true,
-  test "equal" 3.14 3.14 false,
-  test "less" 1.5 2.5 false]
-  where
-    test name x y result = primCase name _equality_gt [float64 x, float64 y] result
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.equality primitives" $
-    supergroup "hydra.lib.equality primitives" [
-      -- Integer tests
-      equalityCompare,
-      equalityEqual,
-      equalityGt,
-      equalityGte,
-      equalityIdentity,
-      equalityLt,
-      equalityLte,
-      equalityMax,
-      equalityMin,
-      -- String tests
-      equalityCompareStrings,
-      equalityLtStrings,
-      equalityGtStrings,
-      equalityMaxStrings,
-      equalityMinStrings,
-      -- Float tests
-      equalityCompareFloats,
-      equalityLtFloats,
-      equalityGtFloats]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Lists.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Lists.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Lists.hs
+++ /dev/null
@@ -1,463 +0,0 @@
-module Hydra.Sources.Test.Lib.Lists where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.lists"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for hydra.lib.lists primitives")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Helper functions for building test terms
-intList :: [Int] -> TTerm Term
-intList els = list (int32 <$> els)
-
-intListList :: [[Int]] -> TTerm Term
-intListList lists = list (intList <$> lists)
-
-optionalInt32 :: Maybe Int -> TTerm Term
-optionalInt32 Nothing = Core.termMaybe nothing
-optionalInt32 (Just x) = Core.termMaybe  $ just (int32 x)
-
-optionalIntList :: Maybe [Int] -> TTerm Term
-optionalIntList Nothing = Core.termMaybe nothing
-optionalIntList (Just xs) = Core.termMaybe $ just (intList xs)
-
-optionalIntAndIntList :: Maybe (Int, [Int]) -> TTerm Term
-optionalIntAndIntList Nothing = Core.termMaybe nothing
-optionalIntAndIntList (Just (x, xs)) = Core.termMaybe $ just (pair (int32 x) (intList xs))
-
-optionalString :: Maybe String -> TTerm Term
-optionalString Nothing = Core.termMaybe nothing
-optionalString (Just x) = Core.termMaybe  $ just (string x)
-
-optionalStringList :: Maybe [String] -> TTerm Term
-optionalStringList Nothing = Core.termMaybe nothing
-optionalStringList (Just xs) = Core.termMaybe $ just (stringList xs)
-
-stringList :: [String] -> TTerm Term
-stringList els = list (string <$> els)
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.lists primitives" $
-    supergroup "hydra.lib.lists primitives" [
-      listsApply,
-      listsBind,
-      listsConcat,
-      listsConcat2,
-      listsCons,
-      listsDrop,
-      listsDropWhile,
-      listsElem,
-      listsFilter,
-      listsFind,
-      listsFoldl,
-      listsFoldr,
-      listsGroup,
-      listsIntercalate,
-      listsIntersperse,
-      listsLength,
-      listsMap,
-      listsMaybeAt,
-      listsMaybeHead,
-      listsMaybeInit,
-      listsMaybeLast,
-      listsMaybeTail,
-      listsNub,
-      listsNull,
-      listsPartition,
-      listsPure,
-      listsReplicate,
-      listsReverse,
-      listsSingleton,
-      listsSort,
-      listsSortOn,
-      listsSpan,
-      listsTake,
-      listsTranspose,
-      listsUncons,
-      listsZip,
-      listsZipWith]
-    where
-      listsApply = supergroup "apply" [
-        subgroup "string transformations" [
-          testStr "string transformations" [primitive _strings_toUpper, primitive _strings_toLower] ["One", "Two", "Three"] ["ONE", "TWO", "THREE", "one", "two", "three"]],
-        subgroup "edge cases" [
-          testStr "empty function list" [] ["a", "b"] [],
-          testStr "empty input list" [primitive _strings_toUpper] [] [],
-          testStr "single function" [primitive _strings_toUpper] ["hello"] ["HELLO"],
-          testStr "single input" [primitive _strings_toUpper, primitive _strings_toLower] ["Test"] ["TEST", "test"]]]
-        where
-          testStr name funs lst result = primCase name _lists_apply [list funs, stringList lst] (stringList result)
-  
-      listsBind = subgroup "bind" [
-        test "negation function" [1, 2, 3, 4] (lambda "x" (primitive _lists_pure @@ (primitive _math_negate @@ var "x"))) (negate <$> [1, 2, 3, 4]),
-        test "empty list" [] (lambda "x" (primitive _lists_pure @@ (primitive _math_negate @@ var "x"))) [],
-        test "single element" [5] (lambda "x" (primitive _lists_pure @@ (primitive _math_negate @@ var "x"))) [-5],
-        test "duplicate elements" [1, 1, 2] (lambda "x" (primitive _lists_pure @@ (primitive _math_negate @@ var "x"))) [-1, -1, -2]]
-        where
-          test name lst fun result = primCase name _lists_bind [intList lst, fun] (intList result)
-  
-      listsConcat = subgroup "concat" [
-        test "multiple non-empty lists" [[1, 2, 3], [4, 5], [6, 7, 8]] [1, 2, 3, 4, 5, 6, 7, 8],
-        test "empty lists included" [[], [1, 2], [], [3]] [1, 2, 3],
-        test "single list" [[1, 2, 3]] [1, 2, 3],
-        test "all empty lists" [[], [], []] [],
-        test "empty list of lists" [] []]
-        where
-          test name lists result = primCase name _lists_concat [intListList lists] (intList result)
-  
-      listsConcat2 = subgroup "concat2" [
-        testInt "two non-empty lists" [1, 2] [3, 4] [1, 2, 3, 4],
-        testInt "first list empty" [] [1, 2] [1, 2],
-        testInt "second list empty" [1, 2] [] [1, 2],
-        testInt "both lists empty" [] [] [],
-        testInt "single elements" [1] [2] [1, 2],
-        testStr "string lists" ["a", "b"] ["c", "d"] ["a", "b", "c", "d"]]
-        where
-          testInt name lst1 lst2 result = primCase name _lists_concat2 [intList lst1, intList lst2] (intList result)
-          testStr name lst1 lst2 result = primCase name _lists_concat2 [stringList lst1, stringList lst2] (stringList result)
-  
-      listsCons = subgroup "cons" [
-        testInt "cons to non-empty list" 1 [2, 3] [1, 2, 3],
-        testInt "cons to empty list" 1 [] [1],
-        testInt "cons negative number" (-1) [2, 3] [-1, 2, 3],
-        testStr "cons string" "hello" ["world"] ["hello", "world"]]
-        where
-          testInt name x lst result = primCase name _lists_cons [int32 x, intList lst] (intList result)
-          testStr name x lst result = primCase name _lists_cons [string x, stringList lst] (stringList result)
-  
-      listsDrop = subgroup "drop" [
-        test "drop from beginning" 2 [1, 2, 3, 4, 5] [3, 4, 5],
-        test "drop zero elements" 0 [1, 2, 3] [1, 2, 3],
-        test "drop all elements" 3 [1, 2, 3] [],
-        test "drop more than length" 5 [1, 2] [],
-        test "drop from empty list" 3 [] [],
-        test "drop negative amount" (-1) [1, 2, 3] [1, 2, 3]]
-        where
-          test name n lst result = primCase name _lists_drop [int32 n, intList lst] (intList result)
-  
-      listsDropWhile = subgroup "dropWhile" [
-        test "drop while less than 3" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 3)) [1, 2, 3, 2, 1] [3, 2, 1],
-        test "drop all elements" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 10)) [1, 2, 3] [],
-        test "drop no elements" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 0)) [1, 2, 3] [1, 2, 3],
-        test "empty list" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 5)) [] []]
-        where
-          test name pred lst result = primCase name _lists_dropWhile [pred, intList lst] (intList result)
-  
-      listsElem = subgroup "elem" [
-        testInt "element present" 2 [1, 2, 3] True,
-        testInt "element not present" 4 [1, 2, 3] False,
-        testInt "empty list" 1 [] False,
-        testInt "single element present" 1 [1] True,
-        testInt "single element not present" 2 [1] False,
-        testInt "duplicate elements" 2 [1, 2, 2, 3] True,
-        testStr "string element present" "hello" ["world", "hello", "test"] True,
-        testStr "string element not present" "missing" ["world", "hello"] False]
-        where
-          testInt name x lst result = primCase name _lists_elem [int32 x, intList lst] (boolean result)
-          testStr name x lst result = primCase name _lists_elem [string x, stringList lst] (boolean result)
-  
-      listsFilter = subgroup "filter" [
-        test "filter positive numbers" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 0)) [-1, 2, -3, 4, 5] [2, 4, 5],
-        test "filter all elements" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 10)) [1, 2, 3] [1, 2, 3],
-        test "filter no elements" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 10)) [1, 2, 3] [],
-        test "empty list" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 0)) [] []]
-        where
-          test name pred lst result = primCase name _lists_filter [pred, intList lst] (intList result)
-
-      listsFind = subgroup "find" [
-        test "find existing element" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 3)) [1, 2, 4, 5] (Just 4),
-        test "find first matching" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 0)) [1, 2, 3] (Just 1),
-        test "find no match" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 10)) [1, 2, 3] Nothing,
-        test "find in empty list" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 0)) [] Nothing,
-        test "find single element" (lambda "x" (primitive _equality_equal @@ var "x" @@ int32 42)) [42] (Just 42)]
-        where
-          test name pred lst result = primCase name _lists_find [pred, intList lst] (optionalInt32 result)
-
-      listsFoldl = subgroup "foldl" [
-        test "sum with addition" (primitive _math_add) 0 [1, 2, 3, 4] 10,
-        test "product with multiplication" (primitive _math_mul) 1 [2, 3, 4] 24,
-        test "empty list" (primitive _math_add) 5 [] 5,
-        test "single element" (primitive _math_add) 10 [5] 15,
-        test "subtraction fold" (primitive _math_sub) 10 [1, 2, 3] 4]
-        where
-          test name op acc lst result = primCase name _lists_foldl [op, int32 acc, intList lst] (int32 result)
-
-      listsFoldr = subgroup "foldr" [
-        test "subtraction fold right" (primitive _math_sub) 0 [1, 2, 3] 2,
-        test "empty list" (primitive _math_add) 5 [] 5,
-        test "single element" (primitive _math_add) 10 [5] 15,
-        test "sum with addition" (primitive _math_add) 0 [1, 2, 3, 4] 10,
-        test "subtraction vs foldl" (primitive _math_sub) 10 [1, 2, 3] (-8)]
-        where
-          test name op acc lst result = primCase name _lists_foldr [op, int32 acc, intList lst] (int32 result)
-
-      listsGroup = subgroup "group" [
-        test "consecutive duplicates" [1, 1, 2, 2, 2, 3, 1] [[1, 1], [2, 2, 2], [3], [1]],
-        test "no duplicates" [1, 2, 3] [[1], [2], [3]],
-        test "all same" [1, 1, 1] [[1, 1, 1]],
-        test "empty list" [] [],
-        test "single element" [1] [[1]]]
-        where
-          test name lst result = primCase name _lists_group [intList lst] (intListList result)
-  
-      listsIntercalate = subgroup "intercalate" [
-        test "double zero separator" [0, 0] [[1, 2, 3], [4, 5], [6, 7, 8]] [1, 2, 3, 0, 0, 4, 5, 0, 0, 6, 7, 8],
-        test "empty separator" [] [[1, 2], [3, 4]] [1, 2, 3, 4],
-        test "single element separator" [99] [[1], [2], [3]] [1, 99, 2, 99, 3],
-        test "empty list of lists" [0] [] [],
-        test "single list" [0] [[1, 2, 3]] [1, 2, 3],
-        test "lists with empty lists" [0] [[], [1], []] [0, 1, 0]]
-        where
-          test name ifx lists result = primCase name _lists_intercalate [intList ifx, intListList lists] (intList result)
-  
-      listsIntersperse = subgroup "intersperse" [
-        testStr "string interspersion" "and" ["one", "two", "three"] ["one", "and", "two", "and", "three"],
-        testStr "single element" "x" ["only"] ["only"],
-        testStr "empty list" "x" [] [],
-        testStr "two elements" "+" ["a", "b"] ["a", "+", "b"],
-        testInt "number interspersion" 0 [1, 2, 3] [1, 0, 2, 0, 3]]
-        where
-          testStr name ifx lst result = primCase name _lists_intersperse [string ifx, stringList lst] (stringList result)
-          testInt name ifx lst result = primCase name _lists_intersperse [int32 ifx, intList lst] (intList result)
-  
-      listsLength = subgroup "length" [
-        testInt "three elements" [1, 2, 3] 3,
-        testInt "empty list" [] 0,
-        testInt "single element" [42] 1,
-        testInt "many elements" [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 10,
-        testStr "string list" ["a", "b", "c"] 3]
-        where
-          testInt name lst result = primCase name _lists_length [intList lst] (int32 result)
-          testStr name lst result = primCase name _lists_length [stringList lst] (int32 result)
-  
-      listsMap = subgroup "map" [
-        testStr "string to uppercase" (primitive _strings_toUpper) ["one", "two"] ["ONE", "TWO"],
-        testStr "empty list" (primitive _strings_toUpper) [] [],
-        testStr "single element" (primitive _strings_toUpper) ["hello"] ["HELLO"],
-        testInt "number negation" (primitive _math_negate) [1, 2, 3] [-1, -2, -3],
-        testInt "identity function" (primitive _equality_identity) [1, 2, 3] [1, 2, 3]]
-        where
-          testStr name fun lst result = primCase name _lists_map [fun, stringList lst] (stringList result)
-          testInt name fun lst result = primCase name _lists_map [fun, intList lst] (intList result)
-  
-      listsMaybeAt = subgroup "maybeAt" [
-        test "valid index" 1 [10, 20, 30] (Just 20),
-        test "first element" 0 [10, 20, 30] (Just 10),
-        test "last element" 2 [10, 20, 30] (Just 30),
-        test "out of bounds" 5 [10, 20, 30] Nothing,
-        test "negative index" (-1) [10, 20, 30] Nothing,
-        test "empty list" 0 [] Nothing]
-        where
-          test name i lst result = primCase name _lists_maybeAt [int32 i, intList lst] (optionalInt32 result)
-
-      listsMaybeHead = subgroup "maybeHead" [
-        testInt "non-empty int list" [1, 2, 3] (Just 1),
-        testInt "empty int list" [] Nothing,
-        testInt "single element" [42] (Just 42),
-        testStr "non-empty string list" ["hello", "world"] (Just "hello"),
-        testStr "empty string list" [] Nothing]
-        where
-          testInt name lst result = primCase name _lists_maybeHead [intList lst] (optionalInt32 result)
-          testStr name lst result = primCase name _lists_maybeHead [stringList lst] (optionalString result)
-
-      listsMaybeInit = subgroup "maybeInit" [
-        testInt "three elements" [1, 2, 3] (Just [1, 2]),
-        testInt "single element" [42] (Just []),
-        testInt "empty list" [] Nothing,
-        testStr "string list" ["a", "b", "c"] (Just ["a", "b"])]
-        where
-          testInt name lst result = primCase name _lists_maybeInit [intList lst] (optionalIntList result)
-          testStr name lst result = primCase name _lists_maybeInit [stringList lst] (optionalStringList result)
-
-      listsMaybeLast = subgroup "maybeLast" [
-        testInt "three elements" [1, 2, 3] (Just 3),
-        testInt "single element" [42] (Just 42),
-        testInt "empty list" [] Nothing,
-        testStr "string list" ["hello", "world"] (Just "world")]
-        where
-          testInt name lst result = primCase name _lists_maybeLast [intList lst] (optionalInt32 result)
-          testStr name lst result = primCase name _lists_maybeLast [stringList lst] (optionalString result)
-
-      listsMaybeTail = subgroup "maybeTail" [
-        testInt "three elements" [1, 2, 3] (Just [2, 3]),
-        testInt "single element" [42] (Just []),
-        testInt "empty list" [] Nothing,
-        testStr "string list" ["a", "b", "c"] (Just ["b", "c"])]
-        where
-          testInt name lst result = primCase name _lists_maybeTail [intList lst] (optionalIntList result)
-          testStr name lst result = primCase name _lists_maybeTail [stringList lst] (optionalStringList result)
-
-      listsNub = subgroup "nub" [
-        testInt "remove duplicates" [1, 2, 1, 3, 2, 4] [1, 2, 3, 4],
-        testInt "no duplicates" [1, 2, 3] [1, 2, 3],
-        testInt "all duplicates" [1, 1, 1] [1],
-        testInt "empty list" [] [],
-        testInt "single element" [1] [1],
-        testStr "string duplicates" ["a", "b", "a", "c"] ["a", "b", "c"]]
-        where
-          testInt name lst result = primCase name _lists_nub [intList lst] (intList result)
-          testStr name lst result = primCase name _lists_nub [stringList lst] (stringList result)
-  
-      listsNull = subgroup "null" [
-        testInt "empty int list" [] True,
-        testInt "single element" [1] False,
-        testInt "multiple elements" [1, 2, 3] False,
-        testStr "empty string list" [] True,
-        testStr "non-empty string list" ["a"] False]
-        where
-          testInt name lst result = primCase name _lists_null [intList lst] (boolean result)
-          testStr name lst result = primCase name _lists_null [stringList lst] (boolean result)
-
-      listsPartition = subgroup "partition" [
-        test "partition greater than 3" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 3)) [1, 2, 3, 4, 5, 6] ([4, 5, 6], [1, 2, 3]),
-        test "partition all elements" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 10)) [1, 2, 3] ([1, 2, 3], []),
-        test "partition no elements" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 10)) [1, 2, 3] ([], [1, 2, 3]),
-        test "partition even numbers" (lambda "x" (primitive _math_even @@ var "x")) [1, 2, 3, 4, 5, 6] ([2, 4, 6], [1, 3, 5]),
-        test "empty list" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 5)) [] ([], [])]
-        where
-          test name pred lst (yes, no) = primCase name _lists_partition [pred, intList lst] (pair (intList yes) (intList no))
-
-      listsPure = subgroup "pure" [
-        testStr "string element" "one" ["one"],
-        testStr "empty string" "" [""],
-        testInt "number element" 42 [42],
-        testInt "negative number" (-5) [-5]]
-        where
-          testStr name arg result = primCase name _lists_pure [string arg] (stringList result)
-          testInt name arg result = primCase name _lists_pure [int32 arg] (intList result)
-  
-      listsReplicate = subgroup "replicate" [
-        testInt "replicate three times" 3 42 [42, 42, 42],
-        testInt "replicate zero times" 0 1 [],
-        testInt "replicate once" 1 99 [99],
-        testStr "replicate string" 2 "hello" ["hello", "hello"]]
-        where
-          testInt name n x result = primCase name _lists_replicate [int32 n, int32 x] (intList result)
-          testStr name n x result = primCase name _lists_replicate [int32 n, string x] (stringList result)
-  
-      listsReverse = subgroup "reverse" [
-        testInt "multiple elements" [1, 2, 3, 4] [4, 3, 2, 1],
-        testInt "single element" [1] [1],
-        testInt "empty list" [] [],
-        testInt "two elements" [1, 2] [2, 1],
-        testStr "string list" ["a", "b", "c"] ["c", "b", "a"]]
-        where
-          testInt name lst result = primCase name _lists_reverse [intList lst] (intList result)
-          testStr name lst result = primCase name _lists_reverse [stringList lst] (stringList result)
-  
-      listsSingleton = subgroup "singleton" [
-        testInt "number element" 42 [42],
-        testInt "negative number" (-1) [-1],
-        testInt "zero" 0 [0],
-        testStr "string element" "hello" ["hello"]]
-        where
-          testInt name x result = primCase name _lists_singleton [int32 x] (intList result)
-          testStr name x result = primCase name _lists_singleton [string x] (stringList result)
-  
-      listsSort = subgroup "sort" [
-        testInt "unsorted numbers" [3, 1, 4, 1, 5] [1, 1, 3, 4, 5],
-        testInt "already sorted" [1, 2, 3] [1, 2, 3],
-        testInt "reverse sorted" [3, 2, 1] [1, 2, 3],
-        testInt "single element" [1] [1],
-        testInt "empty list" [] [],
-        testInt "duplicates" [2, 1, 2, 3, 1] [1, 1, 2, 2, 3],
-        testStr "string sort" ["zebra", "apple", "banana"] ["apple", "banana", "zebra"]]
-        where
-          testInt name lst result = primCase name _lists_sort [intList lst] (intList result)
-          testStr name lst result = primCase name _lists_sort [stringList lst] (stringList result)
-  
-      listsSortOn = subgroup "sortOn" [
-       testStr "sort by string length" (primitive _strings_length) ["hello", "hi", "world"] ["hi", "hello", "world"],
-       testStr "empty string list" (primitive _strings_length) [] [],
-       testStr "single string element" (primitive _strings_length) ["test"] ["test"],
-       testInt "sort by negation" (primitive _math_negate) [1, 3, 2] [3, 2, 1],
-       testInt "sort by absolute value" (primitive _math_abs) [-1, -3, 2] [-1, 2, -3]]
-       where
-         testStr name keyFn lst result = primCase name _lists_sortOn [keyFn, stringList lst] (stringList result)
-         testInt name keyFn lst result = primCase name _lists_sortOn [keyFn, intList lst] (intList result)
-  
-      listsSpan = subgroup "span" [
-        test "span less than 3" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 3)) [1, 2, 3, 1, 2] ([1, 2], [3, 1, 2]),
-        test "span all elements" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 10)) [1, 2, 3] ([1, 2, 3], []),
-        test "span no elements" (lambda "x" (primitive _equality_gt @@ var "x" @@ int32 10)) [1, 2, 3] ([], [1, 2, 3]),
-        test "empty list" (lambda "x" (primitive _equality_lt @@ var "x" @@ int32 5)) [] ([], [])]
-        where
-          test name pred lst (prefix, suffix) = primCase name _lists_span [pred, intList lst] (pair (intList prefix) (intList suffix))
-  
-      listsTake = subgroup "take" [
-        test "take from beginning" 2 [1, 2, 3, 4, 5] [1, 2],
-        test "take zero elements" 0 [1, 2, 3] [],
-        test "take all elements" 3 [1, 2, 3] [1, 2, 3],
-        test "take more than length" 5 [1, 2] [1, 2],
-        test "take from empty list" 3 [] [],
-        test "take negative amount" (-1) [1, 2, 3] []]
-        where
-          test name n lst result = primCase name _lists_take [int32 n, intList lst] (intList result)
-  
-      listsTranspose = subgroup "transpose" [
-        test "square matrix" [[1, 2, 3], [4, 5, 6]] [[1, 4], [2, 5], [3, 6]],
-        test "empty lists" [] [],
-        test "single row" [[1, 2, 3]] [[1], [2], [3]],
-        test "single column" [[1], [2], [3]] [[1, 2, 3]],
-        test "ragged matrix" [[1, 2], [3], [4, 5, 6]] [[1, 3, 4], [2, 5], [6]]]
-        where
-          test name matrix result = primCase name _lists_transpose [intListList matrix] (intListList result)
-
-      listsUncons = subgroup "uncons" [
-        test "three elements" [1, 2, 3] (Just (1, [2, 3])),
-        test "single element" [42] (Just (42, [])),
-        test "empty list" [] Nothing]
-        where
-          test name lst result = primCase name _lists_uncons [intList lst] (optionalIntAndIntList result)
-
-      listsZip = subgroup "zip" [
-        test "equal length lists" [1, 2, 3] ["a", "b", "c"] [(1, "a"), (2, "b"), (3, "c")],
-        test "first list shorter" [1, 2] ["a", "b", "c"] [(1, "a"), (2, "b")],
-        test "second list shorter" [1, 2, 3] ["a", "b"] [(1, "a"), (2, "b")],
-        test "empty first list" [] ["a", "b"] [],
-        test "empty second list" [1, 2] [] [],
-        test "both empty lists" [] [] []]
-        where
-          test name lst1 lst2 result = primCase name _lists_zip [intList lst1, stringList lst2] (list ((\(x, y) -> pair (int32 x) (string y)) <$> result))
-  
-      listsZipWith = subgroup "zipWith" [
-        testInt "addition" (primitive _math_add) [1, 2, 3] [4, 5, 6] [5, 7, 9],
-        testInt "first list shorter" (primitive _math_add) [1, 2] [4, 5, 6] [5, 7],
-        testInt "second list shorter" (primitive _math_add) [1, 2, 3] [4, 5] [5, 7],
-        testInt "empty first list" (primitive _math_add) [] [1, 2, 3] [],
-        testInt "empty second list" (primitive _math_add) [1, 2, 3] [] [],
-        testStr "string concatenation" (primitive _strings_cat2) ["a", "b"] ["1", "2"] ["a1", "b2"]]
-        where
-          testInt name op lst1 lst2 result = primCase name _lists_zipWith [op, intList lst1, intList lst2] (intList result)
-          testStr name op lst1 lst2 result = primCase name _lists_zipWith [op, stringList lst1, stringList lst2] (stringList result)
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Literals.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Literals.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Literals.hs
+++ /dev/null
@@ -1,643 +0,0 @@
-module Hydra.Sources.Test.Lib.Literals where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Char8 as BC
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.literals"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for hydra.lib.literals primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
--- Test groups for hydra.lib.literals primitives
--- Note: Testing a representative subset of the many literal conversion functions
-
-literalsBigintToInt32 :: TTerm TestGroup
-literalsBigintToInt32 = subgroup "bigintToInt32" [
-  test "positive" 42 42,
-  test "negative" (-42) (-42),
-  test "zero" 0 0]
-  where
-    test name x result = primCase name _literals_bigintToInt32 [bigint x] (int32 result)
-
-literalsInt32ToBigint :: TTerm TestGroup
-literalsInt32ToBigint = subgroup "int32ToBigint" [
-  test "positive" 42 42,
-  test "negative" (-42) (-42),
-  test "zero" 0 0]
-  where
-    test name x result = primCase name _literals_int32ToBigint [int32 x] (bigint result)
-
--- Other integer to bigint conversions
-
-literalsInt8ToBigint :: TTerm TestGroup
-literalsInt8ToBigint = subgroup "int8ToBigint" [
-  test "positive" 42 42,
-  test "negative" (-42) (-42),
-  test "max value" 127 127,
-  test "min value" (-128) (-128)]
-  where
-    test name x result = primCase name _literals_int8ToBigint [int8 x] (bigint result)
-
-literalsInt16ToBigint :: TTerm TestGroup
-literalsInt16ToBigint = subgroup "int16ToBigint" [
-  test "positive" 1000 1000,
-  test "negative" (-1000) (-1000)]
-  where
-    test name x result = primCase name _literals_int16ToBigint [int16 x] (bigint result)
-
-literalsInt64ToBigint :: TTerm TestGroup
-literalsInt64ToBigint = subgroup "int64ToBigint" [
-  test "positive" 1000000 1000000,
-  test "negative" (-1000000) (-1000000)]
-  where
-    test name x result = primCase name _literals_int64ToBigint [int64 x] (bigint result)
-
--- Unsigned integer to bigint conversions
-
-literalsUint8ToBigint :: TTerm TestGroup
-literalsUint8ToBigint = subgroup "uint8ToBigint" [
-  test "zero" 0 0,
-  test "max value" 255 255]
-  where
-    test name x result = primCase name _literals_uint8ToBigint [uint8 x] (bigint result)
-
-literalsUint16ToBigint :: TTerm TestGroup
-literalsUint16ToBigint = subgroup "uint16ToBigint" [
-  test "zero" 0 0,
-  test "typical value" 1000 1000]
-  where
-    test name x result = primCase name _literals_uint16ToBigint [uint16 x] (bigint result)
-
-literalsUint32ToBigint :: TTerm TestGroup
-literalsUint32ToBigint = subgroup "uint32ToBigint" [
-  test "zero" 0 0,
-  test "typical value" 100000 100000]
-  where
-    test name x result = primCase name _literals_uint32ToBigint [uint32 x] (bigint result)
-
-literalsUint64ToBigint :: TTerm TestGroup
-literalsUint64ToBigint = subgroup "uint64ToBigint" [
-  test "zero" 0 0,
-  test "typical value" 1000000 1000000]
-  where
-    test name x result = primCase name _literals_uint64ToBigint [uint64 x] (bigint result)
-
--- Bigint to other integer conversions
-
-literalsBigintToInt8 :: TTerm TestGroup
-literalsBigintToInt8 = subgroup "bigintToInt8" [
-  test "positive" 42 42,
-  test "negative" (-42) (-42)]
-  where
-    test name x result = primCase name _literals_bigintToInt8 [bigint x] (int8 result)
-
-literalsBigintToInt16 :: TTerm TestGroup
-literalsBigintToInt16 = subgroup "bigintToInt16" [
-  test "positive" 1000 1000,
-  test "negative" (-1000) (-1000)]
-  where
-    test name x result = primCase name _literals_bigintToInt16 [bigint x] (int16 result)
-
-literalsBigintToInt64 :: TTerm TestGroup
-literalsBigintToInt64 = subgroup "bigintToInt64" [
-  test "positive" 1000000 1000000,
-  test "negative" (-1000000) (-1000000)]
-  where
-    test name x result = primCase name _literals_bigintToInt64 [bigint x] (int64 result)
-
-literalsBigintToUint8 :: TTerm TestGroup
-literalsBigintToUint8 = subgroup "bigintToUint8" [
-  test "zero" 0 0,
-  test "typical value" 100 100]
-  where
-    test name x result = primCase name _literals_bigintToUint8 [bigint x] (uint8 result)
-
-literalsBigintToUint16 :: TTerm TestGroup
-literalsBigintToUint16 = subgroup "bigintToUint16" [
-  test "zero" 0 0,
-  test "typical value" 1000 1000]
-  where
-    test name x result = primCase name _literals_bigintToUint16 [bigint x] (uint16 result)
-
-literalsBigintToUint32 :: TTerm TestGroup
-literalsBigintToUint32 = subgroup "bigintToUint32" [
-  test "zero" 0 0,
-  test "typical value" 100000 100000]
-  where
-    test name x result = primCase name _literals_bigintToUint32 [bigint x] (uint32 result)
-
-literalsBigintToUint64 :: TTerm TestGroup
-literalsBigintToUint64 = subgroup "bigintToUint64" [
-  test "zero" 0 0,
-  test "typical value" 1000000 1000000]
-  where
-    test name x result = primCase name _literals_bigintToUint64 [bigint x] (uint64 result)
-
--- Float conversions
-
-literalsFloat32ToBigfloat :: TTerm TestGroup
-literalsFloat32ToBigfloat = subgroup "float32ToBigfloat" [
-  test "positive" 2.5 2.5,  -- use exact Float32 values
-  test "negative" (-2.5) (-2.5),
-  test "zero" 0.0 0.0]
-  where
-    test name x result = primCase name _literals_float32ToBigfloat [float32 x] (bigfloat result)
-
-literalsFloat64ToBigfloat :: TTerm TestGroup
-literalsFloat64ToBigfloat = subgroup "float64ToBigfloat" [
-  test "positive" 3.14159 3.14159,
-  test "negative" (-2.71828) (-2.71828),
-  test "zero" 0.0 0.0]
-  where
-    test name x result = primCase name _literals_float64ToBigfloat [float64 x] (bigfloat result)
-
-literalsBigfloatToFloat32 :: TTerm TestGroup
-literalsBigfloatToFloat32 = subgroup "bigfloatToFloat32" [
-  test "positive" 3.14 3.14,
-  test "negative" (-2.5) (-2.5),
-  test "zero" 0.0 0.0]
-  where
-    test name x result = primCase name _literals_bigfloatToFloat32 [bigfloat x] (float32 result)
-
-literalsBigfloatToFloat64 :: TTerm TestGroup
-literalsBigfloatToFloat64 = subgroup "bigfloatToFloat64" [
-  test "positive" 3.14159 3.14159,
-  test "negative" (-2.71828) (-2.71828),
-  test "zero" 0.0 0.0]
-  where
-    test name x result = primCase name _literals_bigfloatToFloat64 [bigfloat x] (float64 result)
-
-literalsBigintToBigfloat :: TTerm TestGroup
-literalsBigintToBigfloat = subgroup "bigintToBigfloat" [
-  test "positive" 42 42.0,
-  test "negative" (-42) (-42.0),
-  test "zero" 0 0.0]
-  where
-    test name x result = primCase name _literals_bigintToBigfloat [bigint x] (bigfloat result)
-
-literalsBigfloatToBigint :: TTerm TestGroup
-literalsBigfloatToBigint = subgroup "bigfloatToBigint" [
-  test "positive" 42.7 43,  -- round uses banker's rounding
-  test "negative" (-42.7) (-43),
-  test "zero" 0.0 0,
-  test "round down" 42.3 42,
-  test "half even up" 42.5 42,  -- banker's rounding: 42.5 rounds to 42 (even)
-  test "half even down" 43.5 44]  -- banker's rounding: 43.5 rounds to 44 (even)
-  where
-    test name x result = primCase name _literals_bigfloatToBigint [bigfloat x] (bigint result)
-
--- Decimal conversions
-
-literalsBigintToDecimal :: TTerm TestGroup
-literalsBigintToDecimal = subgroup "bigintToDecimal" [
-  test "positive" 42 42,
-  test "negative" (-42) (-42),
-  test "zero" 0 0]
-  where
-    test name x result = primCase name _literals_bigintToDecimal [bigint x] (decimal result)
-
-literalsDecimalToBigint :: TTerm TestGroup
-literalsDecimalToBigint = subgroup "decimalToBigint" [
-  test "positive whole" 42 42,
-  test "negative whole" (-42) (-42),
-  test "zero" 0 0,
-  test "round down" 42.3 42,
-  test "round up" 42.7 43]
-  where
-    test name x result = primCase name _literals_decimalToBigint [decimal x] (bigint result)
-
-literalsDecimalToFloat32 :: TTerm TestGroup
-literalsDecimalToFloat32 = subgroup "decimalToFloat32" [
-  test "zero" 0 0.0,
-  test "positive whole" 2 2.0,
-  test "negative whole" (-2) (-2.0)]
-  where
-    test name x result = primCase name _literals_decimalToFloat32 [decimal x] (float32 result)
-
-literalsDecimalToFloat64 :: TTerm TestGroup
-literalsDecimalToFloat64 = subgroup "decimalToFloat64" [
-  test "zero" 0 0.0,
-  test "positive whole" 2 2.0,
-  test "negative whole" (-2) (-2.0)]
-  where
-    test name x result = primCase name _literals_decimalToFloat64 [decimal x] (float64 result)
-
-literalsFloat32ToDecimal :: TTerm TestGroup
-literalsFloat32ToDecimal = subgroup "float32ToDecimal" [
-  test "zero" 0.0 0,
-  test "positive whole" 2.0 2,
-  test "negative whole" (-2.0) (-2)]
-  where
-    test name x result = primCase name _literals_float32ToDecimal [float32 x] (decimal result)
-
-literalsFloat64ToDecimal :: TTerm TestGroup
-literalsFloat64ToDecimal = subgroup "float64ToDecimal" [
-  test "zero" 0.0 0,
-  test "positive whole" 2.0 2,
-  test "negative whole" (-2.0) (-2)]
-  where
-    test name x result = primCase name _literals_float64ToDecimal [float64 x] (decimal result)
-
-literalsShowDecimal :: TTerm TestGroup
-literalsShowDecimal = subgroup "showDecimal" [
-  test "zero" 0 "0.0",
-  test "positive whole" 42 "42.0",
-  test "negative whole" (-42) "-42.0",
-  test "positive fraction" 3.14 "3.14",
-  test "negative fraction" (-2.5) "-2.5"]
-  where
-    test name x result = primCase name _literals_showDecimal [decimal x] (string result)
-
-literalsReadDecimal :: TTerm TestGroup
-literalsReadDecimal = subgroup "readDecimal" [
-  testJust "positive" "3.14" 3.14,
-  testJust "zero" "0" 0,
-  testJust "negative" "-42" (-42),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readDecimal [string x] (Core.termMaybe $ just (decimal result))
-    testNothing name x = primCase name _literals_readDecimal [string x] (Core.termMaybe nothing)
-
--- Show functions
-
-literalsShowInt32 :: TTerm TestGroup
-literalsShowInt32 = subgroup "showInt32" [
-  test "positive" 42 "42",
-  test "negative" (-42) "-42",
-  test "zero" 0 "0"]
-  where
-    test name x result = primCase name _literals_showInt32 [int32 x] (string result)
-
-literalsShowInt8 :: TTerm TestGroup
-literalsShowInt8 = subgroup "showInt8" [
-  test "positive" 42 "42",
-  test "negative" (-42) "-42"]
-  where
-    test name x result = primCase name _literals_showInt8 [int8 x] (string result)
-
-literalsShowInt16 :: TTerm TestGroup
-literalsShowInt16 = subgroup "showInt16" [
-  test "positive" 1000 "1000",
-  test "negative" (-1000) "-1000"]
-  where
-    test name x result = primCase name _literals_showInt16 [int16 x] (string result)
-
-literalsShowInt64 :: TTerm TestGroup
-literalsShowInt64 = subgroup "showInt64" [
-  test "positive" 1000000 "1000000",
-  test "negative" (-1000000) "-1000000"]
-  where
-    test name x result = primCase name _literals_showInt64 [int64 x] (string result)
-
-literalsShowUint8 :: TTerm TestGroup
-literalsShowUint8 = subgroup "showUint8" [
-  test "zero" 0 "0",
-  test "max value" 255 "255"]
-  where
-    test name x result = primCase name _literals_showUint8 [uint8 x] (string result)
-
-literalsShowUint16 :: TTerm TestGroup
-literalsShowUint16 = subgroup "showUint16" [
-  test "zero" 0 "0",
-  test "typical value" 1000 "1000"]
-  where
-    test name x result = primCase name _literals_showUint16 [uint16 x] (string result)
-
-literalsShowUint32 :: TTerm TestGroup
-literalsShowUint32 = subgroup "showUint32" [
-  test "zero" 0 "0",
-  test "typical value" 100000 "100000"]
-  where
-    test name x result = primCase name _literals_showUint32 [uint32 x] (string result)
-
-literalsShowUint64 :: TTerm TestGroup
-literalsShowUint64 = subgroup "showUint64" [
-  test "zero" 0 "0",
-  test "typical value" 1000000 "1000000"]
-  where
-    test name x result = primCase name _literals_showUint64 [uint64 x] (string result)
-
-literalsShowBigint :: TTerm TestGroup
-literalsShowBigint = subgroup "showBigint" [
-  test "positive" 42 "42",
-  test "negative" (-42) "-42",
-  test "zero" 0 "0"]
-  where
-    test name x result = primCase name _literals_showBigint [bigint x] (string result)
-
-literalsShowFloat32 :: TTerm TestGroup
-literalsShowFloat32 = subgroup "showFloat32" [
-  test "positive" 3.14 "3.14",
-  test "negative" (-2.5) "-2.5",
-  test "zero" 0.0 "0.0",
-  test "small positive" 0.05 "5.0e-2",
-  test "small positive 2" 0.03 "3.0e-2",
-  test "very small" 0.001 "1.0e-3",
-  test "normal decimal" 0.1 "0.1"]
-  where
-    test name x result = primCase name _literals_showFloat32 [float32 x] (string result)
-
-literalsShowFloat64 :: TTerm TestGroup
-literalsShowFloat64 = subgroup "showFloat64" [
-  test "positive" 3.14159 "3.14159",
-  test "zero" 0.0 "0.0",
-  test "small positive" 0.05 "5.0e-2",
-  test "small positive 2" 0.03 "3.0e-2",
-  test "very small" 0.001 "1.0e-3",
-  test "normal decimal" 0.1 "0.1"]
-  where
-    test name x result = primCase name _literals_showFloat64 [float64 x] (string result)
-
-literalsShowBigfloat :: TTerm TestGroup
-literalsShowBigfloat = subgroup "showBigfloat" [
-  test "positive" 3.14 "3.14",
-  test "zero" 0.0 "0.0",
-  test "small positive" 0.05 "5.0e-2",
-  test "small positive 2" 0.03 "3.0e-2",
-  test "very small" 0.001 "1.0e-3",
-  test "normal decimal" 0.1 "0.1"]
-  where
-    test name x result = primCase name _literals_showBigfloat [bigfloat x] (string result)
-
-literalsShowBoolean :: TTerm TestGroup
-literalsShowBoolean = subgroup "showBoolean" [
-  test "true" true "true",
-  test "false" false "false"]
-  where
-    test name x result = primCase name _literals_showBoolean [x] (string result)
-
-literalsShowString :: TTerm TestGroup
-literalsShowString = subgroup "showString" [
-  test "simple" "hello" "\"hello\"",
-  test "empty" "" "\"\"",
-  -- Non-ASCII characters are escaped as decimal codes
-  test "latin accented" "caf\233" "\"caf\\233\"",
-  test "greek lambda" "\955" "\"\\955\"",
-  test "mixed ascii and non-ascii" "A\233B" "\"A\\233B\"",
-  -- Standard named escapes
-  test "tab" "\t" "\"\\t\"",
-  test "newline" "\n" "\"\\n\"",
-  test "carriage return" "\r" "\"\\r\"",
-  test "backslash" "\\" "\"\\\\\"",
-  test "double quote" "\"" "\"\\\"\"",
-  -- Control characters with named escapes
-  test "null" "\0" "\"\\NUL\"",
-  test "bell" "\a" "\"\\a\"",
-  test "backspace" "\b" "\"\\b\"",
-  test "form feed" "\f" "\"\\f\"",
-  test "vertical tab" "\v" "\"\\v\"",
-  test "delete" "\127" "\"\\DEL\""]
-  where
-    test name x result = primCase name _literals_showString [string x] (string result)
-
--- Read functions
-
-literalsReadInt8 :: TTerm TestGroup
-literalsReadInt8 = subgroup "readInt8" [
-  testJust "positive" "42" 42,
-  testJust "negative" "-42" (-42),
-  testJust "max value" "127" 127,
-  testJust "min value" "-128" (-128),
-  testNothing "invalid" "abc",
-  testNothing "overflow" "128"]
-  where
-    testJust name x result = primCase name _literals_readInt8 [string x] (Core.termMaybe $ just (int8 result))
-    testNothing name x = primCase name _literals_readInt8 [string x] (Core.termMaybe nothing)
-
-literalsReadInt16 :: TTerm TestGroup
-literalsReadInt16 = subgroup "readInt16" [
-  testJust "positive" "1000" 1000,
-  testJust "negative" "-1000" (-1000),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readInt16 [string x] (Core.termMaybe $ just (int16 result))
-    testNothing name x = primCase name _literals_readInt16 [string x] (Core.termMaybe nothing)
-
-literalsReadInt32 :: TTerm TestGroup
-literalsReadInt32 = subgroup "readInt32" [
-  testJust "positive" "42" 42,
-  testJust "negative" "-42" (-42),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readInt32 [string x] (Core.termMaybe $ just (int32 result))
-    testNothing name x = primCase name _literals_readInt32 [string x] (Core.termMaybe nothing)
-
-literalsReadInt64 :: TTerm TestGroup
-literalsReadInt64 = subgroup "readInt64" [
-  testJust "positive" "1000000" 1000000,
-  testJust "negative" "-1000000" (-1000000),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readInt64 [string x] (Core.termMaybe $ just (int64 result))
-    testNothing name x = primCase name _literals_readInt64 [string x] (Core.termMaybe nothing)
-
-literalsReadFloat32 :: TTerm TestGroup
-literalsReadFloat32 = subgroup "readFloat32" [
-  testJust "positive" "3.14" 3.14,
-  testJust "negative" "-2.5" (-2.5),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readFloat32 [string x] (Core.termMaybe $ just (float32 result))
-    testNothing name x = primCase name _literals_readFloat32 [string x] (Core.termMaybe nothing)
-
-literalsReadFloat64 :: TTerm TestGroup
-literalsReadFloat64 = subgroup "readFloat64" [
-  testJust "positive" "3.14159" 3.14159,
-  testJust "negative" "-2.71828" (-2.71828),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readFloat64 [string x] (Core.termMaybe $ just (float64 result))
-    testNothing name x = primCase name _literals_readFloat64 [string x] (Core.termMaybe nothing)
-
-literalsReadBigfloat :: TTerm TestGroup
-literalsReadBigfloat = subgroup "readBigfloat" [
-  testJust "positive" "3.14" 3.14,
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readBigfloat [string x] (Core.termMaybe $ just (bigfloat result))
-    testNothing name x = primCase name _literals_readBigfloat [string x] (Core.termMaybe nothing)
-
-literalsReadBoolean :: TTerm TestGroup
-literalsReadBoolean = subgroup "readBoolean" [
-  testJust "true" "true" true,
-  testJust "false" "false" false,
-  testNothing "invalid" "yes"]
-  where
-    testJust name x result = primCase name _literals_readBoolean [string x] (Core.termMaybe $ just result)
-    testNothing name x = primCase name _literals_readBoolean [string x] (Core.termMaybe nothing)
-
-literalsReadString :: TTerm TestGroup
-literalsReadString = subgroup "readString" [
-  testJust "quoted string" "\"hello\"" "hello",
-  testJust "empty quoted" "\"\"" "",
-  testNothing "unquoted" "hello"]
-  where
-    testJust name x result = primCase name _literals_readString [string x] (Core.termMaybe $ just (string result))
-    testNothing name x = primCase name _literals_readString [string x] (Core.termMaybe nothing)
-
-literalsReadUint8 :: TTerm TestGroup
-literalsReadUint8 = subgroup "readUint8" [
-  testJust "zero" "0" 0,
-  testJust "typical" "100" 100,
-  testJust "max value" "255" 255,
-  testNothing "invalid" "abc",
-  testNothing "negative" "-1"]
-  where
-    testJust name x result = primCase name _literals_readUint8 [string x] (Core.termMaybe $ just (uint8 result))
-    testNothing name x = primCase name _literals_readUint8 [string x] (Core.termMaybe nothing)
-
-literalsReadUint16 :: TTerm TestGroup
-literalsReadUint16 = subgroup "readUint16" [
-  testJust "zero" "0" 0,
-  testJust "typical" "1000" 1000,
-  testNothing "invalid" "abc",
-  testNothing "negative" "-1"]
-  where
-    testJust name x result = primCase name _literals_readUint16 [string x] (Core.termMaybe $ just (uint16 result))
-    testNothing name x = primCase name _literals_readUint16 [string x] (Core.termMaybe nothing)
-
-literalsReadUint32 :: TTerm TestGroup
-literalsReadUint32 = subgroup "readUint32" [
-  testJust "zero" "0" 0,
-  testJust "typical" "100000" 100000,
-  testNothing "invalid" "abc",
-  testNothing "negative" "-1"]
-  where
-    testJust name x result = primCase name _literals_readUint32 [string x] (Core.termMaybe $ just (uint32 result))
-    testNothing name x = primCase name _literals_readUint32 [string x] (Core.termMaybe nothing)
-
-literalsReadUint64 :: TTerm TestGroup
-literalsReadUint64 = subgroup "readUint64" [
-  testJust "zero" "0" 0,
-  testJust "typical" "1000000" 1000000,
-  testNothing "invalid" "abc",
-  testNothing "negative" "-1"]
-  where
-    testJust name x result = primCase name _literals_readUint64 [string x] (Core.termMaybe $ just (uint64 result))
-    testNothing name x = primCase name _literals_readUint64 [string x] (Core.termMaybe nothing)
-
-literalsReadBigint :: TTerm TestGroup
-literalsReadBigint = subgroup "readBigint" [
-  testJust "positive" "42" 42,
-  testJust "negative" "-42" (-42),
-  testJust "zero" "0" 0,
-  primCaseWithTags "large" [tag_disabled] _literals_readBigint [string "123456789012345678901234567890"] (Core.termMaybe $ just (bigint 123456789012345678901234567890)),
-  testNothing "invalid" "abc"]
-  where
-    testJust name x result = primCase name _literals_readBigint [string x] (Core.termMaybe $ just (bigint result))
-    testNothing name x = primCase name _literals_readBigint [string x] (Core.termMaybe nothing)
-
--- Binary/String conversion
--- Note: binaryToStringBS and stringToBinary use base64 encoding
-
-literalsStringToBinary :: TTerm TestGroup
-literalsStringToBinary = subgroup "stringToBinary" [
-  test "simple base64" "aGVsbG8=" (BC.pack "hello"),
-  test "empty string" "" B.empty]
-  where
-    test name x result = primCase name _literals_stringToBinary [string x] (binary result)
-
-literalsBinaryToString :: TTerm TestGroup
-literalsBinaryToString = subgroup "binaryToString" [
-  test "simple binary" (BC.pack "hello") "aGVsbG8=",
-  test "empty binary" B.empty ""]
-  where
-    test name x result = primCase name _literals_binaryToString [binary x] (string result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.literals primitives" $
-    supergroup "hydra.lib.literals primitives" [
-      -- Bigint conversions
-      literalsBigintToInt8,
-      literalsBigintToInt16,
-      literalsBigintToInt32,
-      literalsBigintToInt64,
-      literalsBigintToUint8,
-      literalsBigintToUint16,
-      literalsBigintToUint32,
-      literalsBigintToUint64,
-      -- To bigint conversions
-      literalsInt8ToBigint,
-      literalsInt16ToBigint,
-      literalsInt32ToBigint,
-      literalsInt64ToBigint,
-      literalsUint8ToBigint,
-      literalsUint16ToBigint,
-      literalsUint32ToBigint,
-      literalsUint64ToBigint,
-      -- Float conversions
-      literalsFloat32ToBigfloat,
-      literalsFloat64ToBigfloat,
-      literalsBigfloatToFloat32,
-      literalsBigfloatToFloat64,
-      literalsBigintToBigfloat,
-      literalsBigfloatToBigint,
-      -- Decimal conversions
-      literalsBigintToDecimal,
-      literalsDecimalToBigint,
-      literalsDecimalToFloat32,
-      literalsDecimalToFloat64,
-      literalsFloat32ToDecimal,
-      literalsFloat64ToDecimal,
-      literalsShowDecimal,
-      literalsReadDecimal,
-      -- Show functions
-      literalsShowInt8,
-      literalsShowInt16,
-      literalsShowInt32,
-      literalsShowInt64,
-      literalsShowUint8,
-      literalsShowUint16,
-      literalsShowUint32,
-      literalsShowUint64,
-      literalsShowBigint,
-      literalsShowFloat32,
-      literalsShowFloat64,
-      literalsShowBigfloat,
-      literalsShowBoolean,
-      literalsShowString,
-      -- Read functions
-      literalsReadInt8,
-      literalsReadInt16,
-      literalsReadInt32,
-      literalsReadInt64,
-      literalsReadUint8,
-      literalsReadUint16,
-      literalsReadUint32,
-      literalsReadUint64,
-      literalsReadBigint,
-      literalsReadFloat32,
-      literalsReadFloat64,
-      literalsReadBigfloat,
-      literalsReadBoolean,
-      literalsReadString,
-      -- Binary conversions
-      literalsStringToBinary,
-      literalsBinaryToString]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Logic.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Logic.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Logic.hs
+++ /dev/null
@@ -1,88 +0,0 @@
-module Hydra.Sources.Test.Lib.Logic where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.logic"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for hydra.lib.logic primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
--- Test groups for hydra.lib.logic primitives
-
-logicAnd :: TTerm TestGroup
-logicAnd = subgroup "and" [
-  test "true and true" true true true,
-  test "true and false" true false false,
-  test "false and true" false true false,
-  test "false and false" false false false]
-  where
-    test name x y result = primCase name _logic_and [x, y] (result)
-
-logicOr :: TTerm TestGroup
-logicOr = subgroup "or" [
-  test "true or true" true true true,
-  test "true or false" true false true,
-  test "false or true" false true true,
-  test "false or false" false false false]
-  where
-    test name x y result = primCase name _logic_or [x, y] (result)
-
-logicNot :: TTerm TestGroup
-logicNot = subgroup "not" [
-  test "not true" true false,
-  test "not false" false true]
-  where
-    test name x result = primCase name _logic_not [x] (result)
-
-logicIfElse :: TTerm TestGroup
-logicIfElse = supergroup "ifElse" [
-  subgroup "boolean values" [
-    testBool "true condition returns then" true true false true,
-    testBool "false condition returns else" false true false false],
-  subgroup "integer values" [
-    testInt "true selects first int" true 42 0 42,
-    testInt "false selects second int" false 42 0 0],
-  subgroup "string values" [
-    testStr "true selects first string" true "yes" "no" "yes",
-    testStr "false selects second string" false "yes" "no" "no"]]
-  where
-    testBool name cond thenVal elseVal result =
-      primCase name _logic_ifElse [cond, thenVal, elseVal] (result)
-    testInt name cond thenVal elseVal result =
-      primCase name _logic_ifElse [cond, int32 thenVal, int32 elseVal] (int32 result)
-    testStr name cond thenVal elseVal result =
-      primCase name _logic_ifElse [cond, string thenVal, string elseVal] (string result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.logic primitives" $
-    supergroup "hydra.lib.logic primitives" [
-      logicAnd,
-      logicIfElse,
-      logicNot,
-      logicOr]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Maps.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Maps.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Maps.hs
+++ /dev/null
@@ -1,311 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Test.Lib.Maps where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Maps as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-import qualified Hydra.Dsl.Meta.Lib.Chars as Chars
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.maps"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for hydra.lib.maps primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
-showInt32 :: TTerm (Int -> String)
-showInt32 = Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")
-
-showString' :: TTerm (String -> String)
-showString' = Phantoms.lambda "s" $ Literals.showString (Phantoms.var "s")
-
-showBool :: TTerm (Bool -> String)
-showBool = Phantoms.lambda "b" $ Literals.showBoolean (Phantoms.var "b")
-
-showIntStringMap :: TTerm (M.Map Int String -> String)
-showIntStringMap = Phantoms.lambda "m" $ ShowCore.map_ # showInt32 # showString' # Phantoms.var "m"
-
-showMaybeString :: TTerm (Maybe String -> String)
-showMaybeString = Phantoms.lambda "mx" $ ShowCore.maybe_ # showString' # Phantoms.var "mx"
-
-showIntList :: TTerm ([Int] -> String)
-showIntList = Phantoms.lambda "xs" $ ShowCore.list_ # showInt32 # Phantoms.var "xs"
-
-showStringList :: TTerm ([String] -> String)
-showStringList = Phantoms.lambda "xs" $ ShowCore.list_ # showString' # Phantoms.var "xs"
-
-showPairList :: TTerm ([(Int, String)] -> String)
-showPairList = Phantoms.lambda "xs" $ ShowCore.list_ # (Phantoms.lambda "p" $ ShowCore.pair_ # showInt32 # showString' # Phantoms.var "p") # Phantoms.var "xs"
-
--- Phantom-typed map helper
-pMap :: [(Int, String)] -> TTerm (M.Map Int String)
-pMap pairs = Phantoms.map $ M.fromList $ fmap (\(k, v) -> (Phantoms.int32 k, Phantoms.string v)) pairs
-
-pPairList :: [(Int, String)] -> TTerm [(Int, String)]
-pPairList pairs = Phantoms.list $ fmap (\(k, v) -> Phantoms.pair (Phantoms.int32 k) (Phantoms.string v)) pairs
-
--- Test groups
-
-mapsEmpty :: TTerm TestGroup
-mapsEmpty = subgroup "empty" [
-  test "empty map"]
-  where
-    test name = evalPair name showIntStringMap
-      (Maps.empty :: TTerm (M.Map Int String))
-      (pMap [])
-
-mapsSingleton :: TTerm TestGroup
-mapsSingleton = subgroup "singleton" [
-  test "single entry" 42 "hello" [(42, "hello")]]
-  where
-    test name k v result = evalPair name showIntStringMap
-      (Maps.singleton (Phantoms.int32 k) (Phantoms.string v))
-      (pMap result)
-
-mapsFromList :: TTerm TestGroup
-mapsFromList = subgroup "fromList" [
-  test "create from pairs" [(1, "a"), (2, "b")] [(1, "a"), (2, "b")],
-  test "duplicate keys" [(1, "a"), (1, "b")] [(1, "b")],
-  test "empty list" [] []]
-  where
-    test name input expected = evalPair name showIntStringMap
-      (Maps.fromList (pPairList input))
-      (pMap expected)
-
-mapsToList :: TTerm TestGroup
-mapsToList = subgroup "toList" [
-  test "convert to pairs" [(1, "a"), (2, "b")] [(1, "a"), (2, "b")],
-  test "unsorted keys" [(3, "c"), (1, "a"), (2, "b")] [(1, "a"), (2, "b"), (3, "c")],
-  test "empty map" [] []]
-  where
-    test name input expected = evalPair name showPairList
-      (Maps.toList (pMap input))
-      (pPairList expected)
-
-mapsInsert :: TTerm TestGroup
-mapsInsert = subgroup "insert" [
-  test "insert new key" 3 "c" [(1, "a"), (2, "b")] [(1, "a"), (2, "b"), (3, "c")],
-  test "update existing" 2 "updated" [(1, "a"), (2, "b")] [(1, "a"), (2, "updated")],
-  test "insert into empty" 1 "x" [] [(1, "x")]]
-  where
-    test name k v m result = evalPair name showIntStringMap
-      (Maps.insert (Phantoms.int32 k) (Phantoms.string v) (pMap m))
-      (pMap result)
-
-mapsRemove :: TTerm TestGroup
-mapsRemove = subgroup "remove" [
-  test "remove existing" 2 [(1, "a"), (2, "b"), (3, "c")] [(1, "a"), (3, "c")],
-  test "remove non-existing" 4 [(1, "a"), (2, "b")] [(1, "a"), (2, "b")],
-  test "remove from empty" 1 [] []]
-  where
-    test name k m result = evalPair name showIntStringMap
-      (Maps.delete (Phantoms.int32 k) (pMap m))
-      (pMap result)
-
-mapsLookup :: TTerm TestGroup
-mapsLookup = subgroup "lookup" [
-  test "find existing key" 2 [(1, "a"), (2, "b")] (Just "b"),
-  test "key not found" 3 [(1, "a"), (2, "b")] Nothing,
-  test "lookup in empty" 1 [] Nothing]
-  where
-    test name k m result = evalPair name showMaybeString
-      (Maps.lookup (Phantoms.int32 k) (pMap m))
-      (maybe Phantoms.nothing (Phantoms.just . Phantoms.string) result)
-
-mapsMember :: TTerm TestGroup
-mapsMember = subgroup "member" [
-  test "key exists" 2 [(1, "a"), (2, "b")] True,
-  test "key missing" 3 [(1, "a"), (2, "b")] False,
-  test "empty map" 1 [] False]
-  where
-    test name k m result = evalPair name showBool
-      (Maps.member (Phantoms.int32 k) (pMap m))
-      (Phantoms.boolean result)
-
-mapsSize :: TTerm TestGroup
-mapsSize = subgroup "size" [
-  test "three entries" [(1, "a"), (2, "b"), (3, "c")] 3,
-  test "single entry" [(42, "test")] 1,
-  test "empty map" [] 0]
-  where
-    test name m result = evalPair name showInt32
-      (Maps.size (pMap m))
-      (Phantoms.int32 result)
-
-mapsNull :: TTerm TestGroup
-mapsNull = subgroup "null" [
-  test "empty map" [] True,
-  test "non-empty map" [(1, "a")] False]
-  where
-    test name m result = evalPair name showBool
-      (Maps.null (pMap m))
-      (Phantoms.boolean result)
-
-mapsKeys :: TTerm TestGroup
-mapsKeys = subgroup "keys" [
-  test "get all keys" [(1, "a"), (2, "b"), (3, "c")] [1, 2, 3],
-  test "unsorted keys" [(3, "c"), (1, "a"), (2, "b")] [1, 2, 3],
-  test "empty map" [] []]
-  where
-    test name m result = evalPair name showIntList
-      (Maps.keys (pMap m))
-      (Phantoms.list $ Phantoms.int32 <$> result)
-
-mapsElems :: TTerm TestGroup
-mapsElems = subgroup "elems" [
-  test "get all elements" [(1, "a"), (2, "b")] ["a", "b"],
-  test "unsorted keys" [(3, "c"), (1, "a"), (2, "b")] ["a", "b", "c"],
-  test "empty map" [] []]
-  where
-    test name m result = evalPair name showStringList
-      (Maps.elems (pMap m))
-      (Phantoms.list $ Phantoms.string <$> result)
-
-mapsMap :: TTerm TestGroup
-mapsMap = subgroup "map" [
-  test "map over values" [(1, "a"), (2, "b")] [(1, "A"), (2, "B")],
-  test "map empty" [] []]
-  where
-    test name m result = evalPair name showIntStringMap
-      (Maps.map (Phantoms.lambda "s" $ Strings.toUpper (Phantoms.var "s")) (pMap m))
-      (pMap result)
-
-mapsFindWithDefault :: TTerm TestGroup
-mapsFindWithDefault = subgroup "findWithDefault" [
-  test "find existing" "default" 2 [(1, "a"), (2, "b")] "b",
-  test "use default" "default" 3 [(1, "a"), (2, "b")] "default"]
-  where
-    test name def k m result = stringEvalPair name
-      (Maps.findWithDefault (Phantoms.string def) (Phantoms.int32 k) (pMap m))
-      (Phantoms.string result)
-
-mapsUnion :: TTerm TestGroup
-mapsUnion = subgroup "union" [
-  test "union two maps" [(1, "a"), (2, "b")] [(2, "x"), (3, "c")] [(1, "a"), (2, "b"), (3, "c")],
-  test "union with empty" [(1, "a")] [] [(1, "a")],
-  test "empty with map" [] [(1, "a")] [(1, "a")]]
-  where
-    test name m1 m2 result = evalPair name showIntStringMap
-      (Maps.union (pMap m1) (pMap m2))
-      (pMap result)
-
-mapsMapKeys :: TTerm TestGroup
-mapsMapKeys = subgroup "mapKeys" [
-  test "double keys" [(1, "a"), (2, "b")] [(2, "a"), (4, "b")],
-  test "empty map" [] []]
-  where
-    test name m result = evalPair name showIntStringMap
-      (Maps.mapKeys (Phantoms.lambda "k" $ Math.mul (Phantoms.var "k") (Phantoms.int32 2)) (pMap m))
-      (pMap result)
-
-mapsFilter :: TTerm TestGroup
-mapsFilter = subgroup "filter" [
-  test "filter values starting with a" [(1, "a"), (2, "b"), (3, "ab")] [(1, "a"), (3, "ab")],
-  test "filter all" [(1, "b"), (2, "c")] [],
-  test "empty map" [] []]
-  where
-    test name m result = evalPair name showIntStringMap
-      (Maps.filter
-        (Phantoms.lambda "v" $ Equality.equal
-          (Maybes.fromMaybe (Phantoms.int32 0)
-            (Maybes.map (Phantoms.lambda "c" $ Chars.toLower (Phantoms.var "c"))
-              (Strings.maybeCharAt (Phantoms.int32 0) (Phantoms.var "v"))))
-          (Phantoms.int32 97))
-        (pMap m))
-      (pMap result)
-
-mapsFilterWithKey :: TTerm TestGroup
-mapsFilterWithKey = subgroup "filterWithKey" [
-  test "filter by key > 1" [(1, "a"), (2, "b"), (3, "c")] [(2, "b"), (3, "c")],
-  test "filter all" [(1, "a")] [],
-  test "empty map" [] []]
-  where
-    test name m result = evalPair name showIntStringMap
-      (Maps.filterWithKey (Phantoms.lambda "k" $ Phantoms.lambda "v" $ Equality.gt (Phantoms.var "k") (Phantoms.int32 1)) (pMap m))
-      (pMap result)
-
-mapsBimap :: TTerm TestGroup
-mapsBimap = subgroup "bimap" [
-  test "transform both" [(1, "a"), (2, "b")] [(2, "A"), (4, "B")],
-  test "empty map" [] []]
-  where
-    test name m result = evalPair name showIntStringMap
-      (Maps.bimap
-        (Phantoms.lambda "k" $ Math.mul (Phantoms.var "k") (Phantoms.int32 2))
-        (Phantoms.lambda "v" $ Strings.toUpper (Phantoms.var "v"))
-        (pMap m))
-      (pMap result)
-
-mapsAlter :: TTerm TestGroup
-mapsAlter = subgroup "alter" [
-  testInsert "insert new key" 3 [(1, "a"), (2, "b")] [(1, "a"), (2, "b"), (3, "new")],
-  testUpdate "update existing key" 2 [(1, "a"), (2, "b")] [(1, "a"), (2, "updated")],
-  testDelete "delete key" 2 [(1, "a"), (2, "b")] [(1, "a")]]
-  where
-    testInsert name k m result = evalPair name showIntStringMap
-      (Maps.alter (Phantoms.lambda "_" $ Phantoms.just (Phantoms.string "new")) (Phantoms.int32 k) (pMap m))
-      (pMap result)
-    testUpdate name k m result = evalPair name showIntStringMap
-      (Maps.alter (Phantoms.lambda "_" $ Phantoms.just (Phantoms.string "updated")) (Phantoms.int32 k) (pMap m))
-      (pMap result)
-    testDelete name k m result = evalPair name showIntStringMap
-      (Maps.alter (Phantoms.lambda "_" $ (Phantoms.nothing :: TTerm (Maybe String))) (Phantoms.int32 k) (pMap m))
-      (pMap result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.maps primitives" $
-    supergroup "hydra.lib.maps primitives" [
-      mapsAlter,
-      mapsBimap,
-      mapsElems,
-      mapsEmpty,
-      mapsFilter,
-      mapsFilterWithKey,
-      mapsFindWithDefault,
-      mapsFromList,
-      mapsInsert,
-      mapsKeys,
-      mapsLookup,
-      mapsMap,
-      mapsMapKeys,
-      mapsMember,
-      mapsNull,
-      mapsRemove,
-      mapsSingleton,
-      mapsSize,
-      mapsToList,
-      mapsUnion]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Math.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Math.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Math.hs
+++ /dev/null
@@ -1,726 +0,0 @@
-module Hydra.Sources.Test.Lib.Math where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Lib.Math as Math
-
-
-optionalInt32 :: Maybe Int -> TTerm Term
-optionalInt32 Nothing = Core.termMaybe nothing
-optionalInt32 (Just x) = Core.termMaybe $ just (int32 x)
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.math"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for hydra.lib.math primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
--- Test groups for hydra.lib.math primitives
-
-mathAbs :: TTerm TestGroup
-mathAbs = subgroup "abs" [
-  test "positive" 5 5,
-  test "negative" (-5) 5,
-  test "zero" 0 0]
-  where
-    test name x result = primCase name _math_abs [int32 x] (int32 result)
-
-mathAdd :: TTerm TestGroup
-mathAdd = subgroup "add" [
-  test "positive numbers" 3 5 8,
-  test "negative numbers" (-3) (-5) (-8),
-  test "mixed sign" 10 (-3) 7,
-  test "with zero" 42 0 42]
-  where
-    test name x y result = primCase name _math_add [int32 x, int32 y] (int32 result)
-
-mathEven :: TTerm TestGroup
-mathEven = subgroup "even" [
-  test "even positive" 4 true,
-  test "odd positive" 5 false,
-  test "even negative" (-4) true,
-  test "odd negative" (-5) false,
-  test "zero" 0 true]
-  where
-    test name x result = primCase name _math_even [int32 x] result
-
-mathMax :: TTerm TestGroup
-mathMax = subgroup "max" [
-  test "first is larger" 10 5 10,
-  test "second is larger" 5 10 10,
-  test "equal values" 7 7 7,
-  test "negative numbers" (-3) (-5) (-3),
-  test "mixed sign" (-5) 5 5,
-  test "with zero" 0 42 42]
-  where
-    test name x y result = primCase name _math_max [int32 x, int32 y] (int32 result)
-
-mathMin :: TTerm TestGroup
-mathMaybeDiv :: TTerm TestGroup
-mathMaybeDiv = subgroup "maybeDiv" [
-  test "basic division" 10 3 (Just 3),
-  test "exact division" 10 2 (Just 5),
-  test "division by zero" 10 0 Nothing,
-  test "zero divided" 0 5 (Just 0),
-  test "negative dividend" (-10) 3 (Just (-4)),
-  test "negative divisor" 10 (-3) (Just (-4))]
-  where
-    test name x y result = primCase name _math_maybeDiv [int32 x, int32 y] (optionalInt32 result)
-
-mathMin = subgroup "min" [
-  test "first is smaller" 5 10 5,
-  test "second is smaller" 10 5 5,
-  test "equal values" 7 7 7,
-  test "negative numbers" (-3) (-5) (-5),
-  test "mixed sign" (-5) 5 (-5),
-  test "with zero" 0 42 0]
-  where
-    test name x y result = primCase name _math_min [int32 x, int32 y] (int32 result)
-
-mathMaybeMod :: TTerm TestGroup
-mathMaybeMod = subgroup "maybeMod" [
-  test "basic modulo" 10 3 (Just 1),
-  test "exact division" 10 2 (Just 0),
-  test "division by zero" 10 0 Nothing,
-  test "negative dividend" (-10) 3 (Just 2),
-  test "negative divisor" 10 (-3) (Just (-2))]
-  where
-    test name x y result = primCase name _math_maybeMod [int32 x, int32 y] (optionalInt32 result)
-
-mathMul :: TTerm TestGroup
-mathMul = subgroup "mul" [
-  test "positive numbers" 3 5 15,
-  test "negative numbers" (-3) (-5) 15,
-  test "mixed sign" 3 (-5) (-15),
-  test "with zero" 42 0 0,
-  test "with one" 42 1 42]
-  where
-    test name x y result = primCase name _math_mul [int32 x, int32 y] (int32 result)
-
-mathNegate :: TTerm TestGroup
-mathNegate = subgroup "negate" [
-  test "positive" 5 (-5),
-  test "negative" (-5) 5,
-  test "zero" 0 0]
-  where
-    test name x result = primCase name _math_negate [int32 x] (int32 result)
-
-mathOdd :: TTerm TestGroup
-mathOdd = subgroup "odd" [
-  test "odd positive" 5 true,
-  test "even positive" 4 false,
-  test "odd negative" (-5) true,
-  test "even negative" (-4) false,
-  test "zero" 0 false]
-  where
-    test name x result = primCase name _math_odd [int32 x] result
-
-mathMaybePred :: TTerm TestGroup
-mathMaybePred = subgroup "maybePred" [
-  test "positive" 5 (Just 4),
-  test "zero" 0 (Just (-1)),
-  test "negative" (-5) (Just (-6)),
-  test "minBound" (-2147483648) Nothing]
-  where
-    test name x result = primCase name _math_maybePred [int32 x] (optionalInt32 result)
-
-mathRange :: TTerm TestGroup
-mathRange = subgroup "range" [
-  test "ascending range" 1 5 [1, 2, 3, 4, 5],
-  test "single element" 5 5 [5],
-  test "two elements" 3 4 [3, 4],
-  test "negative start" (-2) 2 [(-2), (-1), 0, 1, 2]]
-  where
-    test name start end result = primCase name _math_range [int32 start, int32 end] (list $ int32 <$> result)
-
-mathMaybeRem :: TTerm TestGroup
-mathMaybeRem = subgroup "maybeRem" [
-  test "basic remainder" 10 3 (Just 1),
-  test "exact division" 10 2 (Just 0),
-  test "division by zero" 10 0 Nothing,
-  test "negative dividend" (-10) 3 (Just (-1)),
-  test "negative divisor" 10 (-3) (Just 1)]
-  where
-    test name x y result = primCase name _math_maybeRem [int32 x, int32 y] (optionalInt32 result)
-
-mathSignum :: TTerm TestGroup
-mathSignum = subgroup "signum" [
-  test "positive" 5 1,
-  test "negative" (-5) (-1),
-  test "zero" 0 0]
-  where
-    test name x result = primCase name _math_signum [int32 x] (int32 result)
-
-mathSub :: TTerm TestGroup
-mathSub = subgroup "sub" [
-  test "positive numbers" 10 3 7,
-  test "negative numbers" (-10) (-3) (-7),
-  test "mixed sign" 10 (-3) 13,
-  test "with zero" 42 0 42]
-  where
-    test name x y result = primCase name _math_sub [int32 x, int32 y] (int32 result)
-
-mathMaybeSucc :: TTerm TestGroup
-mathMaybeSucc = subgroup "maybeSucc" [
-  test "positive" 5 (Just 6),
-  test "zero" 0 (Just 1),
-  test "negative" (-5) (Just (-4)),
-  test "maxBound" 2147483647 Nothing]
-  where
-    test name x result = primCase name _math_maybeSucc [int32 x] (optionalInt32 result)
-
--- Float64 tests
---
--- Note on floating-point portability (see also docs/recipes/extending-tests.md):
--- Transcendental functions (sin, cos, exp, atanh, etc.) are implemented via the platform's
--- C math library (libm), which is NOT required by IEEE 754 to produce bit-identical results
--- across platforms. Even GHC delegates to libm, so Haskell-computed expected values like
--- (sinh 1.0) can differ by 1 ULP between macOS and Linux.
---
--- When adding float64 test cases for transcendental functions:
---   * Prefer inputs that produce exact results: sin(0)=0, exp(0)=1, sqrt(4)=2
---   * If a non-trivial input is needed, use roundFloat64 (or roundFloat32/roundBigfloat)
---     on both the expected value and the test input's expected result to eliminate
---     platform-dependent rounding in the last digit.
-
--- | Special float64 values: positive infinity, negative infinity, and NaN.
--- These are used to test that domain-restricted primitives return IEEE 754
--- special values (NaN/Inf) rather than throwing exceptions, and that all
--- float-accepting primitives propagate NaN/Inf correctly.
-nan64 :: Double
-nan64 = 0/0
-
-posInf64 :: Double
-posInf64 = 1/0
-
-negInf64 :: Double
-negInf64 = -1/0
-
--- | Number of significant digits to use when rounding transcendental results
--- for platform-independent comparison. 12 digits is well within float64 precision
--- (which has ~15.9 significant digits) while safely absorbing 1-ULP differences.
-roundDigits :: Int
-roundDigits = 12
-
--- | Build a test case that rounds both the computed and expected results to
--- a fixed number of significant digits using roundFloat64. This makes
--- transcendental function tests portable across platforms with different libm
--- implementations.
-roundedPrimCase1 :: String -> Name -> Double -> Double -> TTerm TestCaseWithMetadata
-roundedPrimCase1 cname primName x result = evalCase cname input output
-  where
-    input = Terms.primitive _math_roundFloat64 @@ int32 roundDigits @@ (Terms.primitive primName @@ float64 x)
-    output = float64 (Math.roundFloat64 roundDigits result)
-
-roundedPrimCase2 :: String -> Name -> Double -> Double -> Double -> TTerm TestCaseWithMetadata
-roundedPrimCase2 cname primName x y result = evalCase cname input output
-  where
-    input = Terms.primitive _math_roundFloat64 @@ int32 roundDigits @@ (Terms.primitive primName @@ float64 x @@ float64 y)
-    output = float64 (Math.roundFloat64 roundDigits result)
-
-mathAddFloat64 :: TTerm TestGroup
-mathAddFloat64 = subgroup "addFloat64" [
-  test "positive numbers" 3.0 5.0 8.0,
-  test "negative numbers" (-3.0) (-5.0) (-8.0),
-  test "mixed sign" 10.0 (-3.0) 7.0,
-  test "with zero" 42.0 0.0 42.0,
-  test "fractional" 1.5 2.5 4.0]
-  where
-    test name x y result = primCase name _math_addFloat64 [float64 x, float64 y] (float64 result)
-
-mathMulFloat64 :: TTerm TestGroup
-mathMulFloat64 = subgroup "mulFloat64" [
-  test "positive numbers" 3.0 5.0 15.0,
-  test "negative numbers" (-3.0) (-5.0) 15.0,
-  test "mixed sign" 10.0 (-3.0) (-30.0),
-  test "with zero" 42.0 0.0 0.0,
-  test "with one" 42.0 1.0 42.0,
-  test "fractional" 1.5 2.0 3.0]
-  where
-    test name x y result = primCase name _math_mulFloat64 [float64 x, float64 y] (float64 result)
-
-mathNegateFloat64 :: TTerm TestGroup
-mathNegateFloat64 = subgroup "negateFloat64" [
-  test "positive" 5.0 (-5.0),
-  test "negative" (-5.0) 5.0,
-  -- "zero" case (negate 0.0 = -0.0) is intentionally omitted:
-  -- the Haskell coder normalizes the literal -0.0 to 0.0 when regenerating
-  -- the test file, so the expected side drifts away from the actual side.
-  -- Tracking: follow-up to #340 on IEEE negative zero preservation.
-  test "fractional" 1.5 (-1.5)]
-  where
-    test name x result = primCase name _math_negateFloat64 [float64 x] (float64 result)
-
-mathSubFloat64 :: TTerm TestGroup
-mathSubFloat64 = subgroup "subFloat64" [
-  test "positive numbers" 5.0 3.0 2.0,
-  test "negative result" 3.0 5.0 (-2.0),
-  test "negative numbers" (-3.0) (-5.0) 2.0,
-  test "with zero" 42.0 0.0 42.0,
-  test "same value" 42.0 42.0 0.0,
-  test "fractional" 2.5 1.5 1.0]
-  where
-    test name x y result = primCase name _math_subFloat64 [float64 x, float64 y] (float64 result)
-
-mathE :: TTerm TestGroup
-mathE = subgroup "e" [
-  evalCase "Euler's number"
-    (Terms.primitive _math_roundFloat64 @@ int32 roundDigits @@ Terms.primitive _math_e)
-    (float64 (Math.roundFloat64 roundDigits (exp 1)))]
-
-mathPi :: TTerm TestGroup
-mathPi = subgroup "pi" [
-  evalCase "pi constant"
-    (Terms.primitive _math_roundFloat64 @@ int32 roundDigits @@ Terms.primitive _math_pi)
-    (float64 (Math.roundFloat64 roundDigits pi))]
-
-mathSin :: TTerm TestGroup
-mathSin = subgroup "sin" [
-  test "sin 0" 0.0 0.0,
-  roundedPrimCase1 "sin pi/2" _math_sin (pi / 2) 1.0,
-  roundedPrimCase1 "sin pi" _math_sin pi (sin pi),
-  roundedPrimCase1 "sin 1" _math_sin 1.0 (sin 1.0),
-  roundedPrimCase1 "sin 0.5" _math_sin 0.5 (sin 0.5),
-  -- Special values
-  test "sin NaN" nan64 nan64,
-  test "sin +Inf" posInf64 nan64,
-  test "sin -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_sin [float64 x] (float64 result)
-
-mathCos :: TTerm TestGroup
-mathCos = subgroup "cos" [
-  test "cos 0" 0.0 1.0,
-  roundedPrimCase1 "cos pi/2" _math_cos (pi / 2) (cos (pi / 2)),
-  test "cos pi" pi (-1.0),
-  roundedPrimCase1 "cos 1" _math_cos 1.0 (cos 1.0),
-  roundedPrimCase1 "cos 0.5" _math_cos 0.5 (cos 0.5),
-  -- Special values
-  test "cos NaN" nan64 nan64,
-  test "cos +Inf" posInf64 nan64,
-  test "cos -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_cos [float64 x] (float64 result)
-
-mathTan :: TTerm TestGroup
-mathTan = subgroup "tan" [
-  test "tan 0" 0.0 0.0,
-  roundedPrimCase1 "tan pi/4" _math_tan (pi / 4) (tan (pi / 4)),
-  roundedPrimCase1 "tan 1" _math_tan 1.0 (tan 1.0),
-  roundedPrimCase1 "tan 0.5" _math_tan 0.5 (tan 0.5),
-  -- Special values
-  test "tan NaN" nan64 nan64,
-  test "tan +Inf" posInf64 nan64,
-  test "tan -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_tan [float64 x] (float64 result)
-
-mathAsin :: TTerm TestGroup
-mathAsin = subgroup "asin" [
-  test "asin 0" 0.0 0.0,
-  roundedPrimCase1 "asin 1" _math_asin 1.0 (pi / 2),
-  roundedPrimCase1 "asin -1" _math_asin (-1.0) (-(pi / 2)),
-  roundedPrimCase1 "asin 0.5" _math_asin 0.5 (asin 0.5),
-  -- Out-of-domain: returns NaN
-  test "asin below domain" (-2.0) nan64,
-  test "asin above domain" 2.0 nan64,
-  -- Special values
-  test "asin NaN" nan64 nan64,
-  test "asin +Inf" posInf64 nan64,
-  test "asin -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_asin [float64 x] (float64 result)
-
-mathAcos :: TTerm TestGroup
-mathAcos = subgroup "acos" [
-  test "acos 1" 1.0 0.0,
-  roundedPrimCase1 "acos 0" _math_acos 0.0 (pi / 2),
-  roundedPrimCase1 "acos -1" _math_acos (-1.0) pi,
-  roundedPrimCase1 "acos 0.5" _math_acos 0.5 (acos 0.5),
-  -- Out-of-domain: returns NaN
-  test "acos below domain" (-2.0) nan64,
-  test "acos above domain" 2.0 nan64,
-  -- Special values
-  test "acos NaN" nan64 nan64,
-  test "acos +Inf" posInf64 nan64,
-  test "acos -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_acos [float64 x] (float64 result)
-
-mathAtan :: TTerm TestGroup
-mathAtan = subgroup "atan" [
-  test "atan 0" 0.0 0.0,
-  roundedPrimCase1 "atan 1" _math_atan 1.0 (pi / 4),
-  roundedPrimCase1 "atan 0.5" _math_atan 0.5 (atan 0.5),
-  -- Special values: atan's range is (-pi/2, pi/2); saturates at infinities
-  test "atan NaN" nan64 nan64,
-  roundedPrimCase1 "atan +Inf" _math_atan posInf64 (pi / 2),
-  roundedPrimCase1 "atan -Inf" _math_atan negInf64 (-(pi / 2))]
-  where
-    test name x result = primCase name _math_atan [float64 x] (float64 result)
-
-mathAtan2 :: TTerm TestGroup
-mathAtan2 = subgroup "atan2" [
-  roundedPrimCase2 "atan2 1 1" _math_atan2 1.0 1.0 (pi / 4),
-  roundedPrimCase2 "atan2 1 0" _math_atan2 1.0 0.0 (pi / 2),
-  test "atan2 0 1" 0.0 1.0 0.0,
-  roundedPrimCase2 "atan2 3 4" _math_atan2 3.0 4.0 (atan2 3.0 4.0),
-  -- Special values in y (first argument)
-  test "atan2 NaN 1" nan64 1.0 nan64,
-  roundedPrimCase2 "atan2 +Inf 1" _math_atan2 posInf64 1.0 (pi / 2),
-  roundedPrimCase2 "atan2 -Inf 1" _math_atan2 negInf64 1.0 (-(pi / 2)),
-  -- Special values in x (second argument)
-  test "atan2 1 NaN" 1.0 nan64 nan64,
-  test "atan2 1 +Inf" 1.0 posInf64 0.0,
-  roundedPrimCase2 "atan2 1 -Inf" _math_atan2 1.0 negInf64 pi,
-  -- Cross-infinity combinations: Haskell returns NaN; other languages' native atan2
-  -- returns ±pi/4 or ±3pi/4, so each implementation must special-case these.
-  test "atan2 +Inf +Inf" posInf64 posInf64 nan64,
-  test "atan2 +Inf -Inf" posInf64 negInf64 nan64,
-  test "atan2 -Inf +Inf" negInf64 posInf64 nan64,
-  test "atan2 -Inf -Inf" negInf64 negInf64 nan64]
-  where
-    test name y x result = primCase name _math_atan2 [float64 y, float64 x] (float64 result)
-
-mathSinh :: TTerm TestGroup
-mathSinh = subgroup "sinh" [
-  test "sinh 0" 0.0 0.0,
-  roundedPrimCase1 "sinh 1" _math_sinh 1.0 (sinh 1.0),
-  roundedPrimCase1 "sinh 2" _math_sinh 2.0 (sinh 2.0),
-  -- Special values
-  test "sinh NaN" nan64 nan64,
-  test "sinh +Inf" posInf64 posInf64,
-  test "sinh -Inf" negInf64 negInf64]
-  where
-    test name x result = primCase name _math_sinh [float64 x] (float64 result)
-
-mathCosh :: TTerm TestGroup
-mathCosh = subgroup "cosh" [
-  test "cosh 0" 0.0 1.0,
-  roundedPrimCase1 "cosh 1" _math_cosh 1.0 (cosh 1.0),
-  roundedPrimCase1 "cosh 2" _math_cosh 2.0 (cosh 2.0),
-  -- Special values
-  test "cosh NaN" nan64 nan64,
-  test "cosh +Inf" posInf64 posInf64,
-  test "cosh -Inf" negInf64 posInf64]
-  where
-    test name x result = primCase name _math_cosh [float64 x] (float64 result)
-
-mathTanh :: TTerm TestGroup
-mathTanh = subgroup "tanh" [
-  test "tanh 0" 0.0 0.0,
-  roundedPrimCase1 "tanh 1" _math_tanh 1.0 (tanh 1.0),
-  roundedPrimCase1 "tanh 0.5" _math_tanh 0.5 (tanh 0.5),
-  -- Special values: tanh's range is (-1, 1); saturates at infinities
-  test "tanh NaN" nan64 nan64,
-  test "tanh +Inf" posInf64 1.0,
-  test "tanh -Inf" negInf64 (-1.0)]
-  where
-    test name x result = primCase name _math_tanh [float64 x] (float64 result)
-
-mathAsinh :: TTerm TestGroup
-mathAsinh = subgroup "asinh" [
-  test "asinh 0" 0.0 0.0,
-  roundedPrimCase1 "asinh 1" _math_asinh 1.0 (asinh 1.0),
-  roundedPrimCase1 "asinh 0.5" _math_asinh 0.5 (asinh 0.5),
-  -- Special values
-  test "asinh NaN" nan64 nan64,
-  test "asinh +Inf" posInf64 posInf64,
-  test "asinh -Inf" negInf64 negInf64]
-  where
-    test name x result = primCase name _math_asinh [float64 x] (float64 result)
-
-mathAcosh :: TTerm TestGroup
-mathAcosh = subgroup "acosh" [
-  test "acosh 1" 1.0 0.0,
-  roundedPrimCase1 "acosh 2" _math_acosh 2.0 (acosh 2.0),
-  roundedPrimCase1 "acosh 3" _math_acosh 3.0 (acosh 3.0),
-  -- Out-of-domain: returns NaN (lower limit is 1)
-  test "acosh below domain" 0.5 nan64,
-  test "acosh negative" (-1.0) nan64,
-  -- Special values
-  test "acosh NaN" nan64 nan64,
-  test "acosh +Inf" posInf64 posInf64,
-  test "acosh -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_acosh [float64 x] (float64 result)
-
-mathAtanh :: TTerm TestGroup
-mathAtanh = subgroup "atanh" [
-  test "atanh 0" 0.0 0.0,
-  roundedPrimCase1 "atanh 0.5" _math_atanh 0.5 (atanh 0.5),
-  roundedPrimCase1 "atanh 0.1" _math_atanh 0.1 (atanh 0.1),
-  -- Boundary: open interval (-1, 1); at the boundary atanh returns infinity
-  test "atanh upper boundary" 1.0 posInf64,
-  test "atanh lower boundary" (-1.0) negInf64,
-  -- Out-of-domain: returns NaN
-  test "atanh above domain" 2.0 nan64,
-  test "atanh below domain" (-2.0) nan64,
-  -- Special values
-  test "atanh NaN" nan64 nan64,
-  test "atanh +Inf" posInf64 nan64,
-  test "atanh -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_atanh [float64 x] (float64 result)
-
-mathExp :: TTerm TestGroup
-mathExp = subgroup "exp" [
-  test "exp 0" 0.0 1.0,
-  roundedPrimCase1 "exp 1" _math_exp 1.0 (exp 1.0),
-  roundedPrimCase1 "exp -1" _math_exp (-1.0) (exp (-1.0)),
-  roundedPrimCase1 "exp 2" _math_exp 2.0 (exp 2.0),
-  roundedPrimCase1 "exp 0.5" _math_exp 0.5 (exp 0.5),
-  -- Special values
-  test "exp NaN" nan64 nan64,
-  test "exp +Inf" posInf64 posInf64,
-  test "exp -Inf" negInf64 0.0]
-  where
-    test name x result = primCase name _math_exp [float64 x] (float64 result)
-
-mathLog :: TTerm TestGroup
-mathLog = subgroup "log" [
-  test "log 1" 1.0 0.0,
-  roundedPrimCase1 "log e" _math_log (exp 1.0) 1.0,
-  roundedPrimCase1 "log 2" _math_log 2.0 (log 2.0),
-  roundedPrimCase1 "log 10" _math_log 10.0 (log 10.0),
-  -- Boundary: domain is (0, inf); at the boundary log returns -Inf
-  test "log 0" 0.0 negInf64,
-  -- Out-of-domain: returns NaN
-  test "log negative" (-1.0) nan64,
-  -- Special values
-  test "log NaN" nan64 nan64,
-  test "log +Inf" posInf64 posInf64,
-  test "log -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_log [float64 x] (float64 result)
-
-mathLogBase :: TTerm TestGroup
-mathLogBase = subgroup "logBase" [
-  test "log10 1" 10.0 1.0 0.0,
-  test "log10 10" 10.0 10.0 1.0,
-  test "log10 100" 10.0 100.0 2.0,
-  test "log2 8" 2.0 8.0 3.0,
-  roundedPrimCase2 "log2 10" _math_logBase 2.0 10.0 (logBase 2.0 10.0),
-  -- Boundary/out-of-domain in x (second argument): x=0 -> -Inf, x<0 -> NaN
-  test "logBase 10 0" 10.0 0.0 negInf64,
-  test "logBase 10 negative" 10.0 (-1.0) nan64,
-  -- Out-of-domain in base (first argument)
-  test "logBase negative 10" (-1.0) 10.0 nan64,
-  -- Special values in x (second argument)
-  test "logBase 10 NaN" 10.0 nan64 nan64,
-  test "logBase 10 +Inf" 10.0 posInf64 posInf64,
-  test "logBase 10 -Inf" 10.0 negInf64 nan64,
-  -- Special values in base (first argument)
-  test "logBase NaN 10" nan64 10.0 nan64,
-  test "logBase +Inf 10" posInf64 10.0 0.0,
-  test "logBase -Inf 10" negInf64 10.0 nan64]
-  where
-    test name base x result = primCase name _math_logBase [float64 base, float64 x] (float64 result)
-
-mathPow :: TTerm TestGroup
-mathPow = subgroup "pow" [
-  test "2^3" 2.0 3.0 8.0,
-  test "10^0" 10.0 0.0 1.0,
-  test "2^-1" 2.0 (-1.0) 0.5,
-  roundedPrimCase2 "2^0.5" _math_pow 2.0 0.5 (2.0 ** 0.5),
-  -- Boundaries: 0^0 = 1, 0^(-1) = +Inf, negative^fractional = NaN
-  test "0^0" 0.0 0.0 1.0,
-  test "0^-1" 0.0 (-1.0) posInf64,
-  test "(-1)^0.5" (-1.0) 0.5 nan64,
-  -- Special values in base (first argument)
-  test "NaN^2" nan64 2.0 nan64,
-  test "+Inf^2" posInf64 2.0 posInf64,
-  test "-Inf^2" negInf64 2.0 posInf64,
-  test "+Inf^-1" posInf64 (-1.0) 0.0,
-  -- Special values in exponent (second argument)
-  test "2^NaN" 2.0 nan64 nan64,
-  test "2^+Inf" 2.0 posInf64 posInf64,
-  test "2^-Inf" 2.0 negInf64 0.0]
-  where
-    test name base exp result = primCase name _math_pow [float64 base, float64 exp] (float64 result)
-
-mathSqrt :: TTerm TestGroup
-mathSqrt = subgroup "sqrt" [
-  test "sqrt 4" 4.0 2.0,
-  test "sqrt 9" 9.0 3.0,
-  test "sqrt 2" 2.0 (sqrt 2.0),
-  test "sqrt 0" 0.0 0.0,
-  roundedPrimCase1 "sqrt 3" _math_sqrt 3.0 (sqrt 3.0),
-  -- Out-of-domain: returns NaN (domain [0, inf))
-  test "sqrt negative" (-1.0) nan64,
-  -- Special values
-  test "sqrt NaN" nan64 nan64,
-  test "sqrt +Inf" posInf64 posInf64,
-  test "sqrt -Inf" negInf64 nan64]
-  where
-    test name x result = primCase name _math_sqrt [float64 x] (float64 result)
-
-mathCeiling :: TTerm TestGroup
-mathCeiling = subgroup "ceiling" [
-  test "ceiling 3.2" 3.2 4.0,
-  test "ceiling 3.0" 3.0 3.0,
-  test "ceiling -3.2" (-3.2) (-3.0),
-  test "ceiling -3.0" (-3.0) (-3.0),
-  -- Special values propagate per IEEE 754 (see divergence comment on Math.ceiling)
-  test "ceiling NaN" nan64 nan64,
-  test "ceiling +Inf" posInf64 posInf64,
-  test "ceiling -Inf" negInf64 negInf64]
-  where
-    test name x result = primCase name _math_ceiling [float64 x] (float64 result)
-
-mathFloor :: TTerm TestGroup
-mathFloor = subgroup "floor" [
-  test "floor 3.8" 3.8 3.0,
-  test "floor 3.0" 3.0 3.0,
-  test "floor -3.2" (-3.2) (-4.0),
-  test "floor -3.0" (-3.0) (-3.0),
-  -- Special values propagate per IEEE 754 (see divergence comment on Math.floor)
-  test "floor NaN" nan64 nan64,
-  test "floor +Inf" posInf64 posInf64,
-  test "floor -Inf" negInf64 negInf64]
-  where
-    test name x result = primCase name _math_floor [float64 x] (float64 result)
-
-mathRound :: TTerm TestGroup
-mathRound = subgroup "round" [
-  test "round 3.4" 3.4 3.0,
-  test "round 3.5" 3.5 4.0,
-  test "round 3.6" 3.6 4.0,
-  test "round -3.4" (-3.4) (-3.0),
-  test "round -3.5" (-3.5) (-4.0),
-  -- Special values propagate per IEEE 754 (see divergence comment on Math.round)
-  test "round NaN" nan64 nan64,
-  test "round +Inf" posInf64 posInf64,
-  test "round -Inf" negInf64 negInf64]
-  where
-    test name x result = primCase name _math_round [float64 x] (float64 result)
-
-mathRoundBigfloat :: TTerm TestGroup
-mathRoundBigfloat = subgroup "roundBigfloat" [
-  test "zero" 5 0.0 0.0,
-  test "round pi to 4 digits" 4 3.141592653589793 3.142,
-  test "round 1234.5 to 3 digits" 3 1234.5 1230.0,
-  test "round 0.001234 to 2 digits" 2 0.001234 0.0012,
-  test "negative" 3 (-1234.5) (-1230.0)]
-  -- NOTE: bigfloat (Java BigDecimal / Python Decimal) cannot represent NaN or Inf,
-  -- so roundBigfloat cannot be tested with those special values.]
-  where
-    test name n x result = primCase name _math_roundBigfloat [int32 n, bigfloat x] (bigfloat result)
-
-mathRoundFloat32 :: TTerm TestGroup
-mathRoundFloat32 = subgroup "roundFloat32" [
-  test "zero" 5 0.0 0.0,
-  test "round pi to 4 digits" 4 3.1415927 3.142,
-  test "round 1234.5 to 3 digits" 3 1234.5 1230.0,
-  test "negative" 3 (-1234.5) (-1230.0),
-  -- Special values propagate unchanged (logBase 10 (abs x) is undefined for these)
-  test "NaN" 3 (0/0) (0/0),
-  test "+Inf" 3 (1/0) (1/0),
-  test "-Inf" 3 (-1/0) (-1/0)]
-  where
-    test name n x result = primCase name _math_roundFloat32 [int32 n, float32 x] (float32 result)
-
-mathRoundFloat64 :: TTerm TestGroup
-mathRoundFloat64 = subgroup "roundFloat64" [
-  test "zero" 5 0.0 0.0,
-  test "round pi to 4 digits" 4 3.141592653589793 3.142,
-  test "round pi to 10 digits" 10 3.141592653589793 3.141592654,
-  test "round 1234.5 to 3 digits" 3 1234.5 1230.0,
-  test "round 0.001234 to 2 digits" 2 0.001234 0.0012,
-  test "negative" 3 (-1234.5) (-1230.0),
-  test "round 1 digit" 1 9.876 10.0,
-  -- Special values propagate unchanged (logBase 10 (abs x) is undefined for these)
-  test "NaN" 3 nan64 nan64,
-  test "+Inf" 3 posInf64 posInf64,
-  test "-Inf" 3 negInf64 negInf64]
-  where
-    test name n x result = primCase name _math_roundFloat64 [int32 n, float64 x] (float64 result)
-
-mathTruncate :: TTerm TestGroup
-mathTruncate = subgroup "truncate" [
-  test "truncate 3.8" 3.8 3.0,
-  test "truncate 3.2" 3.2 3.0,
-  test "truncate -3.8" (-3.8) (-3.0),
-  test "truncate -3.2" (-3.2) (-3.0),
-  -- Special values propagate per IEEE 754 (see divergence comment on Math.truncate)
-  test "truncate NaN" nan64 nan64,
-  test "truncate +Inf" posInf64 posInf64,
-  test "truncate -Inf" negInf64 negInf64]
-  where
-    test name x result = primCase name _math_truncate [float64 x] (float64 result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.math primitives" $
-    supergroup "hydra.lib.math primitives" [
-      -- Int32 primitives
-      mathAbs,
-      mathAdd,
-      mathEven,
-      mathMax,
-      mathMaybeDiv,
-      mathMin,
-      mathMaybeMod,
-      mathMul,
-      mathNegate,
-      mathOdd,
-      mathMaybePred,
-      mathRange,
-      mathMaybeRem,
-      mathSignum,
-      mathSub,
-      mathMaybeSucc,
-      -- Float64 primitives
-      mathAddFloat64,
-      mathMulFloat64,
-      mathNegateFloat64,
-      mathSubFloat64,
-      mathE,
-      mathPi,
-      mathSin,
-      mathCos,
-      mathTan,
-      mathAsin,
-      mathAcos,
-      mathAtan,
-      mathAtan2,
-      mathSinh,
-      mathCosh,
-      mathTanh,
-      mathAsinh,
-      mathAcosh,
-      mathAtanh,
-      mathExp,
-      mathLog,
-      mathLogBase,
-      mathPow,
-      mathSqrt,
-      mathCeiling,
-      mathFloor,
-      mathRound,
-      mathRoundBigfloat,
-      mathRoundFloat32,
-      mathRoundFloat64,
-      mathTruncate]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Maybes.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Maybes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Maybes.hs
+++ /dev/null
@@ -1,229 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Test.Lib.Maybes where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic as Logic
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes as Maybes
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.maybes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for hydra.lib.maybes primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
-showInt32 :: TTerm (Int -> String)
-showInt32 = Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")
-
-showBool :: TTerm (Bool -> String)
-showBool = Phantoms.lambda "b" $ Literals.showBoolean (Phantoms.var "b")
-
-showMaybeInt :: TTerm (Maybe Int -> String)
-showMaybeInt = Phantoms.lambda "mx" $ ShowCore.maybe_ # showInt32 # Phantoms.var "mx"
-
-showIntList :: TTerm ([Int] -> String)
-showIntList = Phantoms.lambda "xs" $ ShowCore.list_ # showInt32 # Phantoms.var "xs"
-
-showMaybeString :: TTerm (Maybe String -> String)
-showMaybeString = Phantoms.lambda "mx" $ ShowCore.maybe_ # (Phantoms.lambda "s" $ Literals.showString (Phantoms.var "s")) # Phantoms.var "mx"
-
--- Phantom-typed helpers
-justInt :: Int -> TTerm (Maybe Int)
-justInt x = Phantoms.just (Phantoms.int32 x)
-
-nothingInt :: TTerm (Maybe Int)
-nothingInt = Phantoms.nothing
-
--- Test groups
-
-maybesIsJust :: TTerm TestGroup
-maybesIsJust = subgroup "isJust" [
-  test "just value" (justInt 42) True,
-  test "nothing" nothingInt False]
-  where
-    test name x result = evalPair name showBool
-      (Maybes.isJust x)
-      (Phantoms.boolean result)
-
-maybesIsNothing :: TTerm TestGroup
-maybesIsNothing = subgroup "isNothing" [
-  test "just value" (justInt 42) False,
-  test "nothing" nothingInt True]
-  where
-    test name x result = evalPair name showBool
-      (Maybes.isNothing x)
-      (Phantoms.boolean result)
-
-maybesFromMaybe :: TTerm TestGroup
-maybesFromMaybe = subgroup "fromMaybe" [
-  test "just value" 0 (justInt 42) 42,
-  test "nothing with default" 99 nothingInt 99]
-  where
-    test name def x result = evalPair name showInt32
-      (Maybes.fromMaybe (Phantoms.int32 def) x)
-      (Phantoms.int32 result)
-
-maybesMaybe :: TTerm TestGroup
-maybesMaybe = subgroup "maybe" [
-  test "just value applies function" 0 (justInt 5) 10,
-  test "nothing returns default" 99 nothingInt 99]
-  where
-    test name def x result = evalPair name showInt32
-      (Maybes.maybe (Phantoms.int32 def) (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2)) x)
-      (Phantoms.int32 result)
-
-maybesPure :: TTerm TestGroup
-maybesPure = subgroup "pure" [
-  testInt "wraps integer" 42 42,
-  testStr "wraps string" "hello" "hello"]
-  where
-    testInt name x expected = evalPair name showMaybeInt
-      (Maybes.pure (Phantoms.int32 x))
-      (justInt expected)
-    testStr name x expected = evalPair name showMaybeString
-      (Maybes.pure (Phantoms.string x))
-      (Phantoms.just (Phantoms.string expected))
-
-maybesCat :: TTerm TestGroup
-maybesCat = subgroup "cat" [
-  test "filters nothings" [justInt 1, nothingInt, justInt 2] [1, 2],
-  test "all justs" [justInt 1, justInt 2] [1, 2],
-  test "all nothings" [nothingInt, nothingInt] [],
-  test "empty list" ([] :: [TTerm (Maybe Int)]) []]
-  where
-    test name input expected = evalPair name showIntList
-      (Maybes.cat (Phantoms.list input))
-      (Phantoms.list (Phantoms.int32 <$> expected))
-
-maybesMap :: TTerm TestGroup
-maybesMap = subgroup "map" [
-  test "maps just value" (justInt 5) (justInt 10),
-  test "nothing unchanged" nothingInt nothingInt]
-  where
-    test name x expected = evalPair name showMaybeInt
-      (Maybes.map (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2)) x)
-      expected
-
-maybesApply :: TTerm TestGroup
-maybesApply = subgroup "apply" [
-  test "both just" (Phantoms.just (Phantoms.lambda "x" $ Math.add (Phantoms.int32 3) (Phantoms.var "x"))) (justInt 5) (justInt 8),
-  test "nothing function" (Phantoms.nothing :: TTerm (Maybe (Int -> Int))) (justInt 5) nothingInt,
-  test "nothing value" (Phantoms.just (Phantoms.lambda "x" $ Math.add (Phantoms.int32 3) (Phantoms.var "x"))) nothingInt nothingInt]
-  where
-    test name f x expected = evalPair name showMaybeInt
-      (Maybes.apply f x)
-      expected
-
-maybesBind :: TTerm TestGroup
-maybesBind = subgroup "bind" [
-  test "just to just" (justInt 5) (justInt 10),
-  test "nothing to nothing" nothingInt nothingInt]
-  where
-    test name x expected = evalPair name showMaybeInt
-      (Maybes.bind x (Phantoms.lambda "x" $ Phantoms.just (Math.mul (Phantoms.var "x") (Phantoms.int32 2))))
-      expected
-
-maybesCases :: TTerm TestGroup
-maybesCases = subgroup "cases" [
-  test "just applies function" (justInt 5) 0 10,
-  test "nothing returns default" nothingInt 99 99]
-  where
-    test name opt def expected = evalPair name showInt32
-      (Maybes.cases opt (Phantoms.int32 def) (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2)))
-      (Phantoms.int32 expected)
-
-maybesMapMaybe :: TTerm TestGroup
-maybesMapMaybe = subgroup "mapMaybe" [
-  test "filter and transform" [1, 2, 3, 4, 5] [6, 8, 10],
-  test "empty result" [1, 2] [],
-  test "empty input" [] []]
-  where
-    filterFn = Phantoms.lambda "x" $
-      Logic.ifElse (Equality.gt (Phantoms.var "x") (Phantoms.int32 2))
-        (Phantoms.just (Math.mul (Phantoms.var "x") (Phantoms.int32 2)))
-        (Phantoms.nothing :: TTerm (Maybe Int))
-    test name xs expected = evalPair name showIntList
-      (Maybes.mapMaybe filterFn (Phantoms.list $ Phantoms.int32 <$> xs))
-      (Phantoms.list $ Phantoms.int32 <$> expected)
-
-maybesCompose :: TTerm TestGroup
-maybesCompose = subgroup "compose" [
-  test "both succeed" 5 (justInt 12),
-  testFails "first fails" 10,
-  testFails "second fails" 3]
-  where
-    -- f: x -> if x <= 5 then Just (x + 1) else Nothing
-    funF = Phantoms.lambda "x" $
-      Logic.ifElse (Equality.lte (Phantoms.var "x") (Phantoms.int32 5))
-        (Phantoms.just (Math.add (Phantoms.var "x") (Phantoms.int32 1)))
-        (Phantoms.nothing :: TTerm (Maybe Int))
-    -- g: y -> if y >= 5 then Just (y * 2) else Nothing
-    funG = Phantoms.lambda "y" $
-      Logic.ifElse (Equality.gte (Phantoms.var "y") (Phantoms.int32 5))
-        (Phantoms.just (Math.mul (Phantoms.var "y") (Phantoms.int32 2)))
-        (Phantoms.nothing :: TTerm (Maybe Int))
-    test name input expected = evalPair name showMaybeInt
-      (Maybes.compose funF funG # Phantoms.int32 input)
-      expected
-    testFails name input = evalPair name showMaybeInt
-      (Maybes.compose funF funG # Phantoms.int32 input)
-      nothingInt
-
-maybesToList :: TTerm TestGroup
-maybesToList = subgroup "toList" [
-  test "just value" (justInt 42) [42],
-  test "nothing" nothingInt []]
-  where
-    test name x expected = evalPair name showIntList
-      (Maybes.toList x)
-      (Phantoms.list $ Phantoms.int32 <$> expected)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.maybes primitives" $
-    supergroup "hydra.lib.maybes primitives" [
-      maybesApply,
-      maybesBind,
-      maybesCases,
-      maybesCat,
-      maybesCompose,
-      maybesFromMaybe,
-      maybesIsJust,
-      maybesIsNothing,
-      maybesMap,
-      maybesMapMaybe,
-      maybesMaybe,
-      maybesPure,
-      maybesToList]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Pairs.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Pairs.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Pairs.hs
+++ /dev/null
@@ -1,93 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Test.Lib.Pairs where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Pairs as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.pairs"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for hydra.lib.pairs primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-showInt32 :: TTerm (Int -> String)
-showInt32 = Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")
-
--- Show a (Int, Int) pair as "(<int>, <int>)"
-showIntIntPair :: TTerm ((Int, Int) -> String)
-showIntIntPair = Phantoms.lambda "p" $ Strings.cat (Phantoms.list [
-  Phantoms.string "(",
-  Literals.showInt32 (Pairs.first (Phantoms.var "p")),
-  Phantoms.string ", ",
-  Literals.showInt32 (Pairs.second (Phantoms.var "p")),
-  Phantoms.string ")"])
-
--- Test groups for hydra.lib.pairs primitives
-
-pairsBimap :: TTerm TestGroup
-pairsBimap = subgroup "bimap" [
-  test "transform both elements" 5 "ab" 10 2,
-  test "with zero" 0 "hello" 0 5]
-  where
-    test name fst snd resultFst resultSnd = evalPair name showIntIntPair
-      (Pairs.bimap
-        (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2))
-        (Phantoms.lambda "s" $ Strings.length (Phantoms.var "s"))
-        (Phantoms.pair (Phantoms.int32 fst) (Phantoms.string snd)))
-      (Phantoms.pair (Phantoms.int32 resultFst) (Phantoms.int32 resultSnd))
-
-pairsFirst :: TTerm TestGroup
-pairsFirst = subgroup "first" [
-  test "extract first element" 42 "hello" 42,
-  test "with zero" 0 "world" 0,
-  test "negative number" (-5) "test" (-5)]
-  where
-    test name fst snd result = evalPair name showInt32
-      (Pairs.first (Phantoms.pair (Phantoms.int32 fst) (Phantoms.string snd)))
-      (Phantoms.int32 result)
-
-pairsSecond :: TTerm TestGroup
-pairsSecond = subgroup "second" [
-  test "extract second element" 42 "hello" "hello",
-  test "empty string" 0 "" "",
-  test "long string" 123 "testing" "testing"]
-  where
-    test name fst snd result = stringEvalPair name
-      (Pairs.second (Phantoms.pair (Phantoms.int32 fst) (Phantoms.string snd)))
-      (Phantoms.string result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.pairs primitives" $
-    supergroup "hydra.lib.pairs primitives" [
-      pairsBimap,
-      pairsFirst,
-      pairsSecond]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Regex.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Regex.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Regex.hs
+++ /dev/null
@@ -1,123 +0,0 @@
-module Hydra.Sources.Test.Lib.Regex where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.regex"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for hydra.lib.regex primitives")}
-  where
-    definitions = [
-        Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.regex primitives" $
-    supergroup "hydra.lib.regex primitives" [
-      regexMatches,
-      regexFind,
-      regexFindAll,
-      regexReplace,
-      regexReplaceAll,
-      regexSplit]
-    where
-      regexMatches = subgroup "matches" [
-        -- Basic matching
-        test2 "exact match" "hello" "hello" True,
-        test2 "pattern match" "[a-z]+" "hello" True,
-        test2 "no match" "[0-9]+" "hello" False,
-
-        -- Anchoring behavior (matches checks full string)
-        test2 "partial content does not match" "[a-z]+" "hello123" False,
-        test2 "digit pattern" "[0-9]+" "12345" True,
-        test2 "mixed pattern" "[a-z]+[0-9]+" "hello123" True,
-
-        -- Empty string
-        test2 "empty pattern matches empty" "" "" True,
-        test2 "empty pattern does not match non-empty" "" "hello" False,
-        test2 "star matches empty" "a*" "" True,
-
-        -- Special regex features
-        test2 "alternation" "cat|dog" "cat" True,
-        test2 "alternation second" "cat|dog" "dog" True,
-        test2 "alternation no match" "cat|dog" "bird" False,
-        test2 "quantifier" "ab?c" "ac" True,
-        test2 "quantifier with optional" "ab?c" "abc" True]
-        where
-          test2 name pat input result =
-            primCase name _regex_matches [string pat, string input] (boolean result)
-
-      regexFind = subgroup "find" [
-        test2 "simple find" "[0-9]+" "abc123def" (Just "123"),
-        test2 "no match" "[0-9]+" "abcdef" Nothing,
-        test2 "find first" "[a-z]+" "123abc456def" (Just "abc"),
-        test2 "empty input" "[0-9]+" "" Nothing,
-        test2 "full match" ".*" "hello" (Just "hello")]
-        where
-          test2 name pat input result =
-            primCase name _regex_find [string pat, string input] (Core.termMaybe $ optStr result)
-          optStr Nothing = nothing
-          optStr (Just s) = just (string s)
-
-      regexFindAll = subgroup "findAll" [
-        test2 "multiple matches" "[0-9]+" "a1b2c3" ["1", "2", "3"],
-        test2 "no matches" "[0-9]+" "abc" [],
-        test2 "overlapping words" "[a-z]+" "abc def ghi" ["abc", "def", "ghi"],
-        test2 "single match" "hello" "say hello world" ["hello"]]
-        where
-          test2 name pat input result =
-            primCase name _regex_findAll [string pat, string input] (list (string <$> result))
-
-      regexReplace = subgroup "replace" [
-        test3 "basic replace" "[0-9]+" "X" "abc123def456" "abcXdef456",
-        test3 "no match" "[0-9]+" "X" "abcdef" "abcdef",
-        test3 "replace at start" "^[a-z]+" "X" "abc123" "X123",
-        test3 "empty replacement" "[0-9]+" "" "abc123def" "abcdef"]
-        where
-          test3 name pat repl input result =
-            primCase name _regex_replace [string pat, string repl, string input] (string result)
-
-      regexReplaceAll = subgroup "replaceAll" [
-        test3 "replace all digits" "[0-9]+" "X" "a1b2c3" "aXbXcX",
-        test3 "no match" "[0-9]+" "X" "abc" "abc",
-        test3 "replace all words" "[a-z]+" "X" "abc 123 def" "X 123 X",
-        test3 "empty replacement" "[0-9]+" "" "a1b2c3" "abc"]
-        where
-          test3 name pat repl input result =
-            primCase name _regex_replaceAll [string pat, string repl, string input] (string result)
-
-      regexSplit = subgroup "split" [
-        test2 "split on comma" "," "a,b,c" ["a", "b", "c"],
-        test2 "split on spaces" " +" "a b  c" ["a", "b", "c"],
-        test2 "no match" "," "abc" ["abc"],
-        test2 "split on digits" "[0-9]+" "a1b2c" ["a", "b", "c"],
-        test2 "trailing delimiter" "," "a,b," ["a", "b", ""]]
-        where
-          test2 name pat input result =
-            primCase name _regex_split [string pat, string input] (list (string <$> result))
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Sets.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Sets.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Sets.hs
+++ /dev/null
@@ -1,215 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
-module Hydra.Sources.Test.Lib.Sets where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-import qualified Data.Set                     as S
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Sets as Sets
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.sets"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for hydra.lib.sets primitives"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
-showInt32 :: TTerm (Int -> String)
-showInt32 = Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")
-
-showBool :: TTerm (Bool -> String)
-showBool = Phantoms.lambda "b" $ Literals.showBoolean (Phantoms.var "b")
-
-showIntSet :: TTerm (S.Set Int -> String)
-showIntSet = Phantoms.lambda "s" $ ShowCore.set_ # showInt32 # Phantoms.var "s"
-
-showIntList :: TTerm ([Int] -> String)
-showIntList = Phantoms.lambda "xs" $ ShowCore.list_ # showInt32 # Phantoms.var "xs"
-
--- Phantom-typed helper for int sets
-pIntSet :: [Int] -> TTerm (S.Set Int)
-pIntSet xs = Phantoms.set (Phantoms.int32 <$> xs)
-
--- Test groups for hydra.lib.sets primitives
-
-setsEmpty :: TTerm TestGroup
-setsEmpty = subgroup "empty" [
-  test "empty set" []]
-  where
-    test name expected = evalPair name showIntSet
-      (Sets.empty :: TTerm (S.Set Int))
-      (pIntSet expected)
-
-setsSingleton :: TTerm TestGroup
-setsSingleton = subgroup "singleton" [
-  test "single element" 42 [42]]
-  where
-    test name x result = evalPair name showIntSet
-      (Sets.singleton (Phantoms.int32 x))
-      (pIntSet result)
-
-setsFromList :: TTerm TestGroup
-setsFromList = subgroup "fromList" [
-  test "create from list" [1, 2, 3] [1, 2, 3],
-  test "duplicates removed" [1, 2, 1, 3] [1, 2, 3],
-  test "empty list" [] []]
-  where
-    test name input expected = evalPair name showIntSet
-      (Sets.fromList (Phantoms.list $ Phantoms.int32 <$> input))
-      (pIntSet expected)
-
-setsToList :: TTerm TestGroup
-setsToList = subgroup "toList" [
-  test "convert to list" [1, 2, 3] [1, 2, 3],
-  test "unsorted input" [3, 1, 2] [1, 2, 3],
-  test "empty set" [] []]
-  where
-    test name input expected = evalPair name showIntList
-      (Sets.toList (pIntSet input))
-      (Phantoms.list $ Phantoms.int32 <$> expected)
-
-setsInsert :: TTerm TestGroup
-setsInsert = subgroup "insert" [
-  test "insert new element" 4 [1, 2, 3] [1, 2, 3, 4],
-  test "insert existing element" 2 [1, 2, 3] [1, 2, 3],
-  test "insert into empty" 1 [] [1]]
-  where
-    test name x s result = evalPair name showIntSet
-      (Sets.insert (Phantoms.int32 x) (pIntSet s))
-      (pIntSet result)
-
-setsDelete :: TTerm TestGroup
-setsDelete = subgroup "delete" [
-  test "delete existing" 2 [1, 2, 3] [1, 3],
-  test "delete non-existing" 4 [1, 2, 3] [1, 2, 3],
-  test "delete from empty" 1 [] []]
-  where
-    test name x s result = evalPair name showIntSet
-      (Sets.delete (Phantoms.int32 x) (pIntSet s))
-      (pIntSet result)
-
-setsMember :: TTerm TestGroup
-setsMember = subgroup "member" [
-  test "element exists" 2 [1, 2, 3] True,
-  test "element missing" 4 [1, 2, 3] False,
-  test "empty set" 1 [] False]
-  where
-    test name x s result = evalPair name showBool
-      (Sets.member (Phantoms.int32 x) (pIntSet s))
-      (Phantoms.boolean result)
-
-setsSize :: TTerm TestGroup
-setsSize = subgroup "size" [
-  test "three elements" [1, 2, 3] 3,
-  test "single element" [42] 1,
-  test "empty set" [] 0]
-  where
-    test name s result = evalPair name showInt32
-      (Sets.size (pIntSet s))
-      (Phantoms.int32 result)
-
-setsNull :: TTerm TestGroup
-setsNull = subgroup "null" [
-  test "empty set" [] True,
-  test "non-empty set" [1, 2] False]
-  where
-    test name s result = evalPair name showBool
-      (Sets.null (pIntSet s))
-      (Phantoms.boolean result)
-
-setsUnion :: TTerm TestGroup
-setsUnion = subgroup "union" [
-  test "union two sets" [1, 2] [2, 3] [1, 2, 3],
-  test "union with empty" [1, 2] [] [1, 2],
-  test "empty with non-empty" [] [1, 2] [1, 2]]
-  where
-    test name s1 s2 result = evalPair name showIntSet
-      (Sets.union (pIntSet s1) (pIntSet s2))
-      (pIntSet result)
-
-setsIntersection :: TTerm TestGroup
-setsIntersection = subgroup "intersection" [
-  test "common elements" [1, 2, 3] [2, 3, 4] [2, 3],
-  test "no common elements" [1, 2] [3, 4] [],
-  test "intersection with empty" [1, 2] [] []]
-  where
-    test name s1 s2 result = evalPair name showIntSet
-      (Sets.intersection (pIntSet s1) (pIntSet s2))
-      (pIntSet result)
-
-setsDifference :: TTerm TestGroup
-setsDifference = subgroup "difference" [
-  test "remove elements" [1, 2, 3] [2, 4] [1, 3],
-  test "no overlap" [1, 2] [3, 4] [1, 2],
-  test "difference with empty" [1, 2] [] [1, 2]]
-  where
-    test name s1 s2 result = evalPair name showIntSet
-      (Sets.difference (pIntSet s1) (pIntSet s2))
-      (pIntSet result)
-
-setsUnions :: TTerm TestGroup
-setsUnions = subgroup "unions" [
-  test "union of multiple sets" [[1, 2], [2, 3], [3, 4]] [1, 2, 3, 4],
-  test "union with empty sets" [[1, 2], [], [3]] [1, 2, 3],
-  test "empty list of sets" [] [],
-  test "single set" [[1, 2, 3]] [1, 2, 3]]
-  where
-    test name sets result = evalPair name showIntSet
-      (Sets.unions (Phantoms.list $ pIntSet <$> sets))
-      (pIntSet result)
-
-setsMap :: TTerm TestGroup
-setsMap = subgroup "map" [
-  test "map function" [1, 2, 3] [2, 4, 6],
-  test "map on empty" [] []]
-  where
-    test name s result = evalPair name showIntSet
-      (Sets.map (Phantoms.lambda "x" $ Math.mul (Phantoms.var "x") (Phantoms.int32 2)) (pIntSet s))
-      (pIntSet result)
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.sets primitives" $
-    supergroup "hydra.lib.sets primitives" [
-      setsEmpty,
-      setsSingleton,
-      setsFromList,
-      setsToList,
-      setsInsert,
-      setsDelete,
-      setsMember,
-      setsSize,
-      setsNull,
-      setsUnion,
-      setsUnions,
-      setsIntersection,
-      setsDifference,
-      setsMap]
diff --git a/src/main/haskell/Hydra/Sources/Test/Lib/Strings.hs b/src/main/haskell/Hydra/Sources/Test/Lib/Strings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Lib/Strings.hs
+++ /dev/null
@@ -1,307 +0,0 @@
-module Hydra.Sources.Test.Lib.Strings where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Additional imports specific to this file
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Lists as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.lib.strings"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestGraph.ns, Namespace "hydra.reduction", Namespace "hydra.show.core"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for hydra.lib.strings primitives")}
-  where
-    definitions = [
-        Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for hydra.lib.strings primitives" $
-    supergroup "hydra.lib.strings primitives" [
-      stringsCat,
-      stringsCat2,
-      stringsFromList,
-      stringsIntercalate,
-      stringsLength,
-      stringsLines,
-      stringsMaybeCharAt,
-      stringsNull,
-      stringsSplitOn,
-      stringsToList,
-      stringsToLower,
-      stringsToUpper,
-      stringsUnlines]
-    where
-      -- Show functions for evalPair
-      showInt32 :: TTerm (Int -> String)
-      showInt32 = Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")
-      showBool :: TTerm (Bool -> String)
-      showBool = Phantoms.lambda "b" $ Literals.showBoolean (Phantoms.var "b")
-      showStringList :: TTerm ([String] -> String)
-      showStringList = Phantoms.lambda "xs" $ Literals.showString (Strings.intercalate (Phantoms.string ", ") (Phantoms.var "xs"))
-      showIntList :: TTerm ([Int] -> String)
-      showIntList = Phantoms.lambda "xs" $ Strings.intercalate (Phantoms.string ", ") (Lists.map (Phantoms.lambda "n" $ Literals.showInt32 (Phantoms.var "n")) (Phantoms.var "xs"))
-
-      stringsCat = subgroup "cat" [
-        -- Basic functionality
-        test "basic concatenation" ["one", "two", "three"] "onetwothree",
-        test "single string" ["hello"] "hello",
-        test "empty list" [] "",
-
-        -- Empty string handling
-        test "with empty strings" ["", "one", "", ""] "one",
-        test "all empty strings" ["", "", "", ""] "",
-
-        -- Unicode correctness
-        test "unicode strings" ["\241", "\19990", "\127757"] "\241\19990\127757",  -- ñ, 世, 🌍
-        test "combining characters" ["e", "\769"] "e\769",  -- e + combining acute accent
-
-        -- Special characters (control characters may be handled specially)
-        test "control characters" ["\n", "\t", "\r"] "\n\t\r",
-        test "null character" ["hello", "\0", "world"] "hello\0world"]
-        where
-          test name ls result = stringEvalPair name
-            (Strings.cat (Phantoms.list (Phantoms.string <$> ls)))
-            (Phantoms.string result)
-  
-      stringsCat2 = subgroup "cat2" [
-        test "basic concatenation" "hello" "world" "helloworld",
-        test "empty first string" "" "world" "world",
-        test "empty second string" "hello" "" "hello",
-        test "both empty strings" "" "" "",
-        test "unicode characters" "\241" "\19990" "\241\19990",  -- ñ, 世
-        test "special characters" "\n" "\t" "\n\t",
-        test "null characters" "hello\0" "world" "hello\0world"]
-        where
-          test name s1 s2 result = stringEvalPair name
-            (Strings.cat2 (Phantoms.string s1) (Phantoms.string s2))
-            (Phantoms.string result)
-  
-      stringsFromList = subgroup "fromList" [
-        test "basic ascii string" [104, 101, 108, 108, 111] "hello",
-        test "empty code point list" [] "",
-        test "single character" [97] "a",
-        test "unicode characters" [241, 19990, 127757] "\241\19990\127757",  -- ñ, 世, 🌍
-        test "combining character sequence" [101, 769] "e\769",  -- e + combining acute
-        test "special characters" [10, 9, 13] "\n\t\r",
-        test "null character" [104, 0, 105] "h\0i"]  -- h, null, i
-        where
-          test name codePoints result = stringEvalPair name
-            (Strings.fromList (Phantoms.list (Phantoms.int32 <$> codePoints)))
-            (Phantoms.string result)
-  
-      stringsIntercalate = subgroup "intercalate" [
-        -- Basic functionality
-        test "comma separator" "," ["one", "two", "three"] "one,two,three",
-        test "empty separator" "" ["a", "b", "c"] "abc",
-        test "multi-character separator" " | " ["A", "B", "C"] "A | B | C",
-
-        -- Edge cases
-        test "empty string list" "," [] "",
-        test "single item list" "," ["only"] "only",
-        test "empty strings in list" "," ["", "a", ""] ",a,",
-
-        -- Unicode and special characters
-        test "unicode separator" "\127757" ["link1", "link2"] "link1\127757link2",  -- 🌍
-        test "newline separator" "\n" ["line1", "line2"] "line1\nline2"]
-        where
-          test name sep strs result = stringEvalPair name
-            (Strings.intercalate (Phantoms.string sep) (Phantoms.list (Phantoms.string <$> strs)))
-            (Phantoms.string result)
-  
-      stringsLength = subgroup "length" [
-        test "empty string" "" 0,
-        test "single character" "a" 1,
-        test "basic word" "hello" 5,
-        test "unicode characters" "\241\19990\127757" 3,  -- ñ, 世, 🌍 (verifies code point count)
-        test "combining character sequence" "e\769" 2,  -- e + combining acute (separate code points)
-        test "special characters" "\n\t\r" 3]
-        where
-          test name s result = evalPair name showInt32
-            (Strings.length (Phantoms.string s))
-            (Phantoms.int32 result)
-  
-      stringsLines = subgroup "lines" [
-        -- Basic functionality
-        test "single line" "hello world" ["hello world"],
-        test "two lines" "hello\nworld" ["hello", "world"],
-        test "three lines" "one\ntwo\nthree" ["one", "two", "three"],
-
-        -- Edge cases with newlines
-        test "empty string" "" [],
-        test "just newline" "\n" [""],
-        test "trailing newline" "hello\n" ["hello"],
-        test "leading newline" "\nhello" ["", "hello"],
-
-        -- Consecutive newlines
-        test "multiple consecutive newlines" "a\n\nb" ["a", "", "b"],
-
-        -- Unicode and other whitespace
-        test "unicode content" "\241\n\19990" ["\241", "\19990"],  -- ñ, 世
-        test "tabs not split" "a\tb\nc" ["a\tb", "c"]]  -- only \n splits, not \t
-        where
-          test name s result = evalPair name showStringList
-            (Strings.lines (Phantoms.string s))
-            (Phantoms.list (Phantoms.string <$> result))
-  
-      stringsMaybeCharAt = subgroup "maybeCharAt" [
-        test "first character" 0 "hello" (Just 104),
-        test "middle character" 2 "hello" (Just 108),
-        test "last character" 4 "hello" (Just 111),
-        test "single character string" 0 "a" (Just 97),
-        test "unicode character" 0 "\241" (Just 241),           -- ñ
-        test "multi-byte unicode" 0 "\19990" (Just 19990),      -- 世
-        test "second of combining pair" 1 "e\769" (Just 769),   -- combining acute accent
-        test "out of bounds" 5 "hello" Nothing,
-        test "negative index" (-1) "hello" Nothing,
-        test "empty string" 0 "" Nothing]
-        where
-          test name idx s result = primCase name _strings_maybeCharAt [int32 idx, string s] (optionalInt32 result)
-          optionalInt32 Nothing = Core.termMaybe nothing
-          optionalInt32 (Just x) = Core.termMaybe $ just (int32 x)
-
-      stringsNull = subgroup "null" [
-        test "empty string" "" True,
-        test "single character" "a" False,
-        test "space" " " False,
-        test "unicode space" "\160" False,  -- non-breaking space
-        test "newline" "\n" False,
-        test "null character" "\0" False,
-        test "multi-character" "hello" False]
-        where
-          test name s result = evalPair name showBool
-            (Strings.null (Phantoms.string s))
-            (Phantoms.boolean result)
-  
-      stringsSplitOn = subgroup "splitOn" [
-        -- Basic functionality
-        test "basic separator" "ss" "Mississippi" ["Mi", "i", "ippi"],
-        test "single char separator" " " "one two three" ["one", "two", "three"],
-        test "multi-char separator" "  " "a  b  c" ["a", "b", "c"],
-        test "separator not found" "x" "hello" ["hello"],
-
-        -- Edge cases with separator positions
-        test "separator at start" "h" "hello" ["", "ello"],
-        test "separator at end" "o" "hello" ["hell", ""],
-        test "leading and trailing separator" " " " one two " ["", "one", "two", ""],
-        test "whole string as separator" "Mississippi" "Mississippi" ["", ""],
-
-        -- Consecutive and overlapping separators
-        test "consecutive separators" " " "a  b" ["a", "", "b"],
-        test "multiple occurrences" "l" "hello" ["he", "", "o"],
-        test "overlapping pattern" "aa" "aaa" ["", "a"],
-
-        -- Empty string cases
-        test "empty separator" "" "abc" ["", "a", "b", "c"],
-        test "separator on empty string" "x" "" [""],
-        test "both empty" "" "" [""],
-
-        -- Single character cases
-        test "single char both" "a" "a" ["", ""],
-
-        -- Unicode
-        test "unicode separator" "\19990" "hello\19990world" ["hello", "world"],  -- 世
-        test "unicode content" "," "\241,\19990,\127757" ["\241", "\19990", "\127757"],  -- ñ,世,🌍
-
-        -- Special characters
-        test "newline separator" "\n" "line1\nline2\nline3" ["line1", "line2", "line3"]]
-        where
-          test name s0 s1 result = evalPair name showStringList
-            (Strings.splitOn (Phantoms.string s0) (Phantoms.string s1))
-            (Phantoms.list (Phantoms.string <$> result))
-  
-      stringsToList = subgroup "toList" [
-        -- Basic functionality
-        test "empty string" "" [],
-        test "single character" "a" [97],
-        test "basic word" "hello" [104, 101, 108, 108, 111],
-
-        -- Unicode
-        test "unicode characters" "\241\19990\127757" [241, 19990, 127757],  -- ñ, 世, 🌍
-        test "combining character sequence" "e\769" [101, 769],  -- e + combining acute
-
-        -- Special characters
-        test "control characters" "\n\t\r" [10, 9, 13],
-        test "null character" "h\0i" [104, 0, 105]]
-        where
-          test name s result = evalPair name showIntList
-            (Strings.toList (Phantoms.string s))
-            (Phantoms.list (Phantoms.int32 <$> result))
-  
-      stringsToLower = subgroup "toLower" [
-        -- Basic functionality
-        test "mixed case" "Hello World" "hello world",
-        test "all uppercase" "HELLO" "hello",
-        test "all lowercase" "hello" "hello",
-        test "empty string" "" "",
-
-        -- Non-letter characters unchanged
-        test "with numbers and punctuation" "Abc123, XYZ!" "abc123, xyz!",
-        test "control characters" "\n\t\r" "\n\t\r",
-
-        -- Unicode
-        test "unicode accented chars" "\209\193\201\205\211\218" "\241\225\233\237\243\250"]  -- ÑÁÉÍÓÚ -> ñáéíóú
-        where
-          test name s result = stringEvalPair name
-            (Strings.toLower (Phantoms.string s))
-            (Phantoms.string result)
-  
-      stringsToUpper = subgroup "toUpper" [
-        -- Basic functionality
-        test "mixed case" "hello World" "HELLO WORLD",
-        test "all lowercase" "hello" "HELLO",
-        test "all uppercase" "HELLO" "HELLO",
-        test "empty string" "" "",
-
-        -- Non-letter characters unchanged
-        test "with numbers and punctuation" "abc123, xyz!" "ABC123, XYZ!",
-        test "control characters" "\n\t\r" "\n\t\r",
-
-        -- Unicode
-        test "unicode accented chars" "\241\225\233\237\243\250" "\209\193\201\205\211\218"]  -- ñáéíóú -> ÑÁÉÍÓÚ
-        where
-          test name s result = stringEvalPair name
-            (Strings.toUpper (Phantoms.string s))
-            (Phantoms.string result)
-  
-      stringsUnlines = subgroup "unlines" [
-        -- Basic functionality
-        test "multiple lines" ["one", "two", "three"] "one\ntwo\nthree\n",
-        test "single line" ["hello"] "hello\n",
-        test "empty list" [] "",
-
-        -- Empty strings in list
-        test "with empty lines" ["hello", "", "world"] "hello\n\nworld\n",
-        test "all empty lines" ["", "", ""] "\n\n\n",
-
-        -- Unicode
-        test "unicode content" ["\241o\241o", "\19990\30028"] "\241o\241o\n\19990\30028\n"]  -- ñoño, 世界
-        where
-          test name strs result = stringEvalPair name
-            (Strings.unlines (Phantoms.list (Phantoms.string <$> strs)))
-            (Phantoms.string result)
diff --git a/src/main/haskell/Hydra/Sources/Test/Ordering.hs b/src/main/haskell/Hydra/Sources/Test/Ordering.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Ordering.hs
+++ /dev/null
@@ -1,385 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for Ord instance comparisons on complex Hydra types
-module Hydra.Sources.Test.Ordering where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Sources.Kernel.Terms.Show.Util as ShowUtil
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.ordering"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.show.core", ShowUtil.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Test cases for Ord instance comparisons on complex Hydra types"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-showBool :: TTerm (Bool -> String)
-showBool = Phantoms.lambda "b" $ Literals.showBoolean (Phantoms.var "b")
-
-compResult :: String -> TTerm Comparison
-compResult "lessThan" = Phantoms.injectUnit _Comparison _Comparison_lessThan
-compResult "equalTo" = Phantoms.injectUnit _Comparison _Comparison_equalTo
-compResult "greaterThan" = Phantoms.injectUnit _Comparison _Comparison_greaterThan
-compResult _ = error "Invalid comparison"
-
--- Test comparing two values
-compareTest :: String -> TTerm a -> TTerm a -> String -> TTerm TestCaseWithMetadata
-compareTest testName x y resultField = evalPair testName (asTerm ShowUtil.comparison)
-  (Equality.compare x y)
-  (compResult resultField)
-
--- Test equality
-equalTest :: String -> TTerm a -> TTerm a -> Bool -> TTerm TestCaseWithMetadata
-equalTest testName x y result = evalPair testName showBool
-  (Equality.equal x y)
-  (Phantoms.boolean result)
-
--- ============================================================
--- Name comparison tests
--- ============================================================
-
-nameComparisonTests :: TTerm TestGroup
-nameComparisonTests = subgroup "Name comparison" [
-  -- Compare two names (using nameTerm which creates a Name wrapped term)
-  compareTest "name less than (alphabetic)"
-    (nameTerm "apple")
-    (nameTerm "banana")
-    "lessThan",
-  compareTest "name equal"
-    (nameTerm "hello")
-    (nameTerm "hello")
-    "equalTo",
-  compareTest "name greater than"
-    (nameTerm "zebra")
-    (nameTerm "apple")
-    "greaterThan",
-  -- Qualified names
-  compareTest "qualified name less than"
-    (nameTerm "hydra.core.Term")
-    (nameTerm "hydra.core.Type")
-    "lessThan",
-  compareTest "qualified name equal"
-    (nameTerm "hydra.core.Term")
-    (nameTerm "hydra.core.Term")
-    "equalTo",
-  -- Boolean equality
-  equalTest "name equality true" 
-    (nameTerm "foo")
-    (nameTerm "foo")
-    True,
-  equalTest "name equality false" 
-    (nameTerm "foo")
-    (nameTerm "bar")
-    False]
-
--- ============================================================
--- Literal comparison tests
--- ============================================================
-
-literalComparisonTests :: TTerm TestGroup
-literalComparisonTests = subgroup "Literal comparison" [
-  -- Integer literals
-  compareTest "int32 literal less than"
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 10)
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 20)
-    "lessThan",
-  compareTest "int32 literal equal"
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 42)
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 42)
-    "equalTo",
-  -- String literals
-  compareTest "string literal less than"
-    (Core.termLiteral $ Core.literalString $ Phantoms.string "aaa")
-    (Core.termLiteral $ Core.literalString $ Phantoms.string "bbb")
-    "lessThan",
-  -- Boolean literals
-  compareTest "boolean false < true"
-    (Core.termLiteral $ Core.literalBoolean Phantoms.false)
-    (Core.termLiteral $ Core.literalBoolean Phantoms.true)
-    "lessThan",
-  compareTest "boolean true == true"
-    (Core.termLiteral $ Core.literalBoolean Phantoms.true)
-    (Core.termLiteral $ Core.literalBoolean Phantoms.true)
-    "equalTo"]
-
--- ============================================================
--- Type comparison tests
--- ============================================================
-
-typeComparisonTests :: TTerm TestGroup
-typeComparisonTests = subgroup "Type comparison" [
-  -- Primitive types
-  compareTest "type int32 vs string"
-    T.int32
-    T.string
-    "lessThan",  -- int32 < string lexicographically in the Type union
-  compareTest "type equal (int32)"
-    T.int32
-    T.int32
-    "equalTo",
-  -- List types
-  compareTest "list type comparison by element"
-    (T.list T.int32)
-    (T.list T.string)
-    "lessThan",  -- list<int32> < list<string>
-  compareTest "list type equal"
-    (T.list T.int32)
-    (T.list T.int32)
-    "equalTo",
-  -- Equality tests
-  equalTest "type equality true" 
-    T.int32
-    T.int32
-    True,
-  equalTest "type equality false" 
-    T.int32
-    T.string
-    False]
-
--- ============================================================
--- Term comparison tests
--- ============================================================
-
-termComparisonTests :: TTerm TestGroup
-termComparisonTests = subgroup "Term comparison" [
-  -- Integer term literals
-  compareTest "term int32 42 vs 43"
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 42)
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 43)
-    "lessThan",
-  compareTest "term int32 equal"
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 42)
-    (Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 42)
-    "equalTo",
-  -- String term literals
-  compareTest "term string a vs b"
-    (Core.termLiteral $ Core.literalString $ Phantoms.string "a")
-    (Core.termLiteral $ Core.literalString $ Phantoms.string "b")
-    "lessThan",
-  -- List terms
-  compareTest "term list [1] vs [2]"
-    (Core.termList $ Phantoms.list [Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 1])
-    (Core.termList $ Phantoms.list [Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 2])
-    "lessThan",
-  compareTest "term list equal"
-    (Core.termList $ Phantoms.list [Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 1])
-    (Core.termList $ Phantoms.list [Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 $ Phantoms.int32 1])
-    "equalTo"]
-
--- ============================================================
--- Custom record type comparison tests (monomorphic)
--- ============================================================
-
--- Helper to build a Person record term
-personTerm :: String -> String -> Int -> TTerm Term
-personTerm firstName lastName age = record TestTypes.testTypePersonName [
-  "firstName" >: string firstName,
-  "lastName" >: string lastName,
-  "age" >: int32 (fromIntegral age)]
-
--- Helper to build a LatLon record term
-latLonTerm :: Float -> Float -> TTerm Term
-latLonTerm lat lon = record TestTypes.testTypeLatLonName [
-  "lat" >: float32 (realToFrac lat),
-  "lon" >: float32 (realToFrac lon)]
-
-recordComparisonTests :: TTerm TestGroup
-recordComparisonTests = subgroup "Record comparison (monomorphic)" [
-  -- Person records - compared field by field
-  compareTest "person less than by firstName"
-    (personTerm "Alice" "Smith" 30)
-    (personTerm "Bob" "Smith" 30)
-    "lessThan",
-  compareTest "person less than by lastName"
-    (personTerm "Alice" "Jones" 30)
-    (personTerm "Alice" "Smith" 30)
-    "lessThan",
-  compareTest "person less than by age"
-    (personTerm "Alice" "Smith" 25)
-    (personTerm "Alice" "Smith" 30)
-    "lessThan",
-  compareTest "person equal"
-    (personTerm "Alice" "Smith" 30)
-    (personTerm "Alice" "Smith" 30)
-    "equalTo",
-  -- LatLon records
-  compareTest "latLon less than by lat"
-    (latLonTerm 10.0 20.0)
-    (latLonTerm 15.0 20.0)
-    "lessThan",
-  compareTest "latLon less than by lon"
-    (latLonTerm 10.0 20.0)
-    (latLonTerm 10.0 25.0)
-    "lessThan",
-  compareTest "latLon equal"
-    (latLonTerm 10.0 20.0)
-    (latLonTerm 10.0 20.0)
-    "equalTo",
-  -- Equality tests
-  equalTest "person equality true" 
-    (personTerm "Alice" "Smith" 30)
-    (personTerm "Alice" "Smith" 30)
-    True,
-  equalTest "person equality false" 
-    (personTerm "Alice" "Smith" 30)
-    (personTerm "Bob" "Smith" 30)
-    False]
-
--- ============================================================
--- Polymorphic type comparison tests
--- ============================================================
-
--- Helper to build a LatLonPoly record term with type application
-latLonPolyInt32Term :: Int -> Int -> TTerm Term
-latLonPolyInt32Term lat lon = tyapp
-  (record TestTypes.testTypeLatLonPolyName [
-    "lat" >: int32 (fromIntegral lat),
-    "lon" >: int32 (fromIntegral lon)])
-  T.int32
-
-latLonPolyStringTerm :: String -> String -> TTerm Term
-latLonPolyStringTerm lat lon = tyapp
-  (record TestTypes.testTypeLatLonPolyName [
-    "lat" >: string lat,
-    "lon" >: string lon])
-  T.string
-
--- Helper to build a PersonOrSomething union term
-personOrSomethingPersonTerm :: String -> String -> Int -> TTerm Term
-personOrSomethingPersonTerm firstName lastName age = tyapp
-  (inject TestTypes.testTypePersonOrSomethingName "person" (personTerm firstName lastName age))
-  (T.list $ Core.typeVariable TestTypes.testTypePersonName)
-
-personOrSomethingOtherListTerm :: [TTerm Term] -> TTerm Term
-personOrSomethingOtherListTerm persons = tyapp
-  (inject TestTypes.testTypePersonOrSomethingName "other" (list persons))
-  (T.list $ Core.typeVariable TestTypes.testTypePersonName)
-
-polymorphicComparisonTests :: TTerm TestGroup
-polymorphicComparisonTests = subgroup "Polymorphic type comparison" [
-  -- LatLonPoly Int32
-  compareTest "LatLonPoly Int32 less than by lat"
-    (latLonPolyInt32Term 10 20)
-    (latLonPolyInt32Term 15 20)
-    "lessThan",
-  compareTest "LatLonPoly Int32 less than by lon"
-    (latLonPolyInt32Term 10 20)
-    (latLonPolyInt32Term 10 25)
-    "lessThan",
-  compareTest "LatLonPoly Int32 equal"
-    (latLonPolyInt32Term 10 20)
-    (latLonPolyInt32Term 10 20)
-    "equalTo",
-  -- LatLonPoly String
-  compareTest "LatLonPoly String less than"
-    (latLonPolyStringTerm "10N" "20W")
-    (latLonPolyStringTerm "15N" "20W")
-    "lessThan",
-  compareTest "LatLonPoly String equal"
-    (latLonPolyStringTerm "10N" "20W")
-    (latLonPolyStringTerm "10N" "20W")
-    "equalTo",
-  -- PersonOrSomething (List Person)
-  compareTest "PersonOrSomething person vs person"
-    (personOrSomethingPersonTerm "Alice" "Smith" 30)
-    (personOrSomethingPersonTerm "Bob" "Smith" 30)
-    "lessThan",
-  compareTest "PersonOrSomething person equal"
-    (personOrSomethingPersonTerm "Alice" "Smith" 30)
-    (personOrSomethingPersonTerm "Alice" "Smith" 30)
-    "equalTo",
-  -- Equality tests
-  equalTest "LatLonPoly Int32 equality true" 
-    (latLonPolyInt32Term 10 20)
-    (latLonPolyInt32Term 10 20)
-    True,
-  equalTest "LatLonPoly Int32 equality false" 
-    (latLonPolyInt32Term 10 20)
-    (latLonPolyInt32Term 10 25)
-    False]
-
--- ============================================================
--- Union type comparison tests
--- ============================================================
-
--- Helper for Number union (int vs float)
-numberIntTerm :: Int -> TTerm Term
-numberIntTerm n = inject TestTypes.testTypeNumberName "int" (int32 (fromIntegral n))
-
-numberFloatTerm :: Float -> TTerm Term
-numberFloatTerm f = inject TestTypes.testTypeNumberName "float" (float32 (realToFrac f))
-
-unionComparisonTests :: TTerm TestGroup
-unionComparisonTests = subgroup "Union comparison" [
-  -- Same variant, different values
-  compareTest "Number int variant less than"
-    (numberIntTerm 10)
-    (numberIntTerm 20)
-    "lessThan",
-  compareTest "Number int variant equal"
-    (numberIntTerm 42)
-    (numberIntTerm 42)
-    "equalTo",
-  compareTest "Number float variant less than"
-    (numberFloatTerm 1.5)
-    (numberFloatTerm 2.5)
-    "lessThan",
-  -- Different variants (compared by variant name)
-  compareTest "Number float vs int (variant name comparison)"
-    (numberFloatTerm 100.0)
-    (numberIntTerm 1)
-    "lessThan",  -- "float" < "int" alphabetically
-  -- Equality
-  equalTest "Number int equality true" 
-    (numberIntTerm 42)
-    (numberIntTerm 42)
-    True,
-  equalTest "Number int equality false (different value)" 
-    (numberIntTerm 42)
-    (numberIntTerm 43)
-    False,
-  equalTest "Number equality false (different variant)" 
-    (numberIntTerm 42)
-    (numberFloatTerm 42.0)
-    False]
-
--- ============================================================
--- All tests
--- ============================================================
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for Ord instance comparisons on complex Hydra types" $
-    supergroup "ordering" [
-      nameComparisonTests,
-      literalComparisonTests,
-      -- Note: typeComparisonTests and termComparisonTests are excluded because
-      -- comparing Type and Term values (meta-level structures) causes issues
-      -- with the kernel test generator's schema type inference
-      recordComparisonTests,
-      polymorphicComparisonTests,
-      unionComparisonTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Reduction.hs b/src/main/haskell/Hydra/Sources/Test/Reduction.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Reduction.hs
+++ /dev/null
@@ -1,439 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for term reduction/evaluation mechanics
-module Hydra.Sources.Test.Reduction where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Reduction as ReductionModule
-import qualified Hydra.Dsl.Meta.Lib.Eithers as Eithers
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.reduction"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.reduction", Namespace "hydra.inference", Namespace "hydra.show.core"],
-            moduleTypeDependencies = [],
-            moduleDescription = Just "Test cases for term reduction/evaluation mechanics"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- Field constructor for cases/match (uses Phantoms.>>: to create Field, since the unqualified >>: from Testing creates tuples)
-(~>:) :: AsTerm t a => Name -> t -> Field
-(~>:) = (Phantoms.>>:)
-infixr 0 ~>:
-
--- | Show a term as a string using ShowCore.term
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term # t
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Helper for single-binding let
-letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letExpr varName value body = lets [(nm varName, value)] body
-
--- | Test cases for beta reduction (lambda application)
-betaReductionTests :: TTerm TestGroup
-betaReductionTests = subgroup "beta reduction" [
-  test "identity function applied to literal"
-    (lambda "x" (var "x") @@ int32 42)
-    (int32 42),
-  test "constant function"
-    (lambda "x" (int32 1) @@ int32 42)
-    (int32 1),
-  test "nested application"
-    (lambda "x" (lambda "y" (var "x")) @@ int32 1 @@ int32 2)
-    (int32 1)]
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for monomorphic primitive application
--- Property: Simple applications of a unary primitive function succeed.
--- Property: Simple applications of a binary primitive function succeed.
--- Property: Extra arguments to a primitive function are tolerated (primitive is applied, extra args remain).
-monomorphicPrimitiveTests :: TTerm TestGroup
-monomorphicPrimitiveTests = subgroup "monomorphic primitives" [
-  -- Unary string functions
-  test "toUpper on lowercase"
-    (primitive _strings_toUpper @@ string "hello")
-    (string "HELLO"),
-  test "toUpper on mixed case"
-    (primitive _strings_toUpper @@ string "Hello World")
-    (string "HELLO WORLD"),
-  test "toUpper on empty string"
-    (primitive _strings_toUpper @@ string "")
-    (string ""),
-  test "toLower on uppercase"
-    (primitive _strings_toLower @@ string "HELLO")
-    (string "hello"),
-  test "string length"
-    (primitive _strings_length @@ string "hello")
-    (int32 5),
-  test "string length of empty"
-    (primitive _strings_length @@ string "")
-    (int32 0),
-  -- Binary arithmetic functions
-  test "add two positive integers"
-    (primitive _math_add @@ int32 3 @@ int32 5)
-    (int32 8),
-  test "add negative and positive"
-    (primitive _math_add @@ int32 (-10) @@ int32 3)
-    (int32 (-7)),
-  test "add with zero"
-    (primitive _math_add @@ int32 0 @@ int32 42)
-    (int32 42),
-  test "subtract integers"
-    (primitive _math_sub @@ int32 10 @@ int32 3)
-    (int32 7),
-  test "multiply integers"
-    (primitive _math_mul @@ int32 6 @@ int32 7)
-    (int32 42),
-  test "multiply by zero"
-    (primitive _math_mul @@ int32 100 @@ int32 0)
-    (int32 0),
-  test "divide integers"
-    (primitive _math_maybeDiv @@ int32 20 @@ int32 4)
-    (Core.termMaybe $ just (int32 5)),
-  test "modulo"
-    (primitive _math_maybeMod @@ int32 17 @@ int32 5)
-    (Core.termMaybe $ just (int32 2)),
-  -- Binary string functions
-  test "splitOn basic"
-    (primitive _strings_splitOn @@ string "," @@ string "a,b,c")
-    (list [string "a", string "b", string "c"]),
-  test "cat2 strings"
-    (primitive _strings_cat2 @@ string "hello" @@ string "world")
-    (string "helloworld")]
-  -- Note: "extra arguments are tolerated" test removed; it produces non-well-typed output
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for polymorphic primitive application
--- Property: Polymorphic primitives work correctly with different element types.
-polymorphicPrimitiveTests :: TTerm TestGroup
-polymorphicPrimitiveTests = subgroup "polymorphic primitives" [
-  -- List length (polymorphic in element type)
-  test "length of integer list"
-    (primitive _lists_length @@ list [int32 1, int32 2, int32 3])
-    (int32 3),
-  test "length of string list"
-    (primitive _lists_length @@ list [string "a", string "b"])
-    (int32 2),
-  test "length of empty list"
-    (primitive _lists_length @@ list [])
-    (int32 0),
-  test "length of single element list"
-    (primitive _lists_length @@ list [true])
-    (int32 1),
-  -- List maybeHead
-  test "maybeHead of integer list"
-    (primitive _lists_maybeHead @@ list [int32 10, int32 20, int32 30])
-    (Core.termMaybe $ just (int32 10)),
-  test "maybeHead of string list"
-    (primitive _lists_maybeHead @@ list [string "first", string "second"])
-    (Core.termMaybe $ just (string "first")),
-  -- List maybeLast
-  test "maybeLast of integer list"
-    (primitive _lists_maybeLast @@ list [int32 10, int32 20, int32 30])
-    (Core.termMaybe $ just (int32 30)),
-  -- List concat
-  test "concat two integer lists"
-    (primitive _lists_concat2 @@ list [int32 1, int32 2] @@ list [int32 3, int32 4])
-    (list [int32 1, int32 2, int32 3, int32 4]),
-  test "concat with empty list"
-    (primitive _lists_concat2 @@ list [] @@ list [int32 1, int32 2])
-    (list [int32 1, int32 2]),
-  -- List reverse
-  test "reverse integer list"
-    (primitive _lists_reverse @@ list [int32 1, int32 2, int32 3])
-    (list [int32 3, int32 2, int32 1]),
-  test "reverse empty list"
-    (primitive _lists_reverse @@ list [])
-    (list [])]
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for nullary primitives (constants)
-nullaryPrimitiveTests :: TTerm TestGroup
-nullaryPrimitiveTests = subgroup "nullary primitives" [
-  test "empty set has size zero"
-    (primitive _sets_size @@ primitive _sets_empty)
-    (int32 0)]
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for literal values
--- Property: Literal terms are fully reduced; evaluating a literal returns the same literal.
--- Property: Literal terms cannot be applied; applying a literal to another term leaves the application unchanged.
-literalValueTests :: TTerm TestGroup
-literalValueTests = subgroup "literals as values" [
-  -- Various literal types reduce to themselves
-  test "integer literal is a value"
-    (int32 42)
-    (int32 42),
-  test "negative integer literal"
-    (int32 (-17))
-    (int32 (-17)),
-  test "zero integer literal"
-    (int32 0)
-    (int32 0),
-  test "string literal is a value"
-    (string "hello")
-    (string "hello"),
-  test "empty string literal"
-    (string "")
-    (string ""),
-  test "string with special characters"
-    (string "hello\nworld\ttab")
-    (string "hello\nworld\ttab"),
-  test "boolean true is a value"
-    true
-    true,
-  test "boolean false is a value"
-    false
-    false,
-  test "float literal is a value"
-    (float64 3.14)
-    (float64 3.14),
-  test "negative float literal"
-    (float64 (-2.718))
-    (float64 (-2.718)),
-  test "zero float literal"
-    (float64 0.0)
-    (float64 0.0)]
-  -- Note: "literal applied to literal" tests removed; they produce non-well-typed output
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for list reduction
-listReductionTests :: TTerm TestGroup
-listReductionTests = subgroup "list reduction" [
-  test "empty list is a value"
-    (list [])
-    (list []),
-  test "list of literals is a value"
-    (list [int32 1, int32 2, int32 3])
-    (list [int32 1, int32 2, int32 3]),
-  test "list with reducible element"
-    (list [lambda "x" (var "x") @@ int32 42])
-    (list [int32 42])]
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for optional/maybe reduction
-optionalReductionTests :: TTerm TestGroup
-optionalReductionTests = subgroup "optional reduction" [
-  test "nothing is a value"
-    (optional nothing)
-    (optional nothing),
-  test "just literal is a value"
-    (optional $ just $ int32 42)
-    (optional $ just $ int32 42),
-  test "just with reducible content"
-    (optional $ just $ lambda "x" (var "x") @@ int32 42)
-    (optional $ just $ int32 42)]
-  where
-    test name input output = evalCase name input output
-
--- | Test cases for alpha conversion (variable renaming in lambda calculus)
--- Property: Variables are correctly substituted at all levels.
--- Property: Lambdas binding the old variable are opaque to alpha conversion (prevent variable capture).
-alphaConversionTests :: TTerm TestGroup
-alphaConversionTests = subgroup "alpha conversion" [
-  -- Variables are substituted at the top level
-  alphaCase "variable at top level"
-    (var "x")
-    (name "x") (name "y")
-    (var "y"),
-  -- Variables are substituted within subexpressions
-  alphaCase "variable in list"
-    (list [int32 42, var "x"])
-    (name "x") (name "y")
-    (list [int32 42, var "y"]),
-  -- Lambdas with unrelated variables are transparent to alpha conversion
-  alphaCase "lambda with different variable is transparent"
-    (lambda "z" $ list [int32 42, var "x", var "z"])
-    (name "x") (name "y")
-    (lambda "z" $ list [int32 42, var "y", var "z"]),
-  -- Lambdas of the same variable are opaque to alpha conversion (to prevent capture)
-  alphaCase "lambda with same variable is opaque"
-    (lambda "x" $ list [int32 42, var "x", var "z"])
-    (name "x") (name "y")
-    (lambda "x" $ list [int32 42, var "x", var "z"]),
-  -- Nested lambdas
-  alphaCase "nested lambda outer variable"
-    (lambda "a" $ lambda "b" $ var "x")
-    (name "x") (name "y")
-    (lambda "a" $ lambda "b" $ var "y"),
-  alphaCase "nested lambda shadows outer"
-    (lambda "x" $ lambda "y" $ var "x")
-    (name "x") (name "z")
-    (lambda "x" $ lambda "y" $ var "x"),
-  -- Application
-  alphaCase "application with variable"
-    (var "f" @@ var "x")
-    (name "x") (name "y")
-    (var "f" @@ var "y"),
-  alphaCase "application with both variables same"
-    (var "x" @@ var "x")
-    (name "x") (name "y")
-    (var "y" @@ var "y")]
-
--- | Test cases for type-level beta reduction
--- Property: Type applications of forall types are reduced by substitution.
--- Property: Non-application types are unchanged by reduction.
-typeReductionTests :: TTerm TestGroup
-typeReductionTests = subgroup "type reduction" [
-  -- Non-application types are unchanged
-  typeRedCase "unit type unchanged"
-    T.unit
-    T.unit,
-  typeRedCase "string type unchanged"
-    T.string
-    T.string,
-  typeRedCase "int32 type unchanged"
-    T.int32
-    T.int32,
-  -- Simple type application: (forall t. t -> t) String = String -> String
-  typeRedCase "identity type applied to string"
-    (T.forAll "t" (T.function (T.var "t") (T.var "t")) T.@@ T.string)
-    (T.function T.string T.string),
-  -- Type application with unused variable: (forall x. Int32) Bool = Int32
-  typeRedCase "constant type ignores argument"
-    (T.forAll "x" T.int32 T.@@ T.boolean)
-    T.int32,
-  -- Nested forall application
-  typeRedCase "nested forall first application"
-    (T.forAll "x" (T.forAll "y" (T.function (T.var "x") (T.var "y"))) T.@@ T.int32)
-    (T.forAll "y" (T.function T.int32 (T.var "y"))),
-  -- Full application of nested forall
-  typeRedCase "nested forall both applications"
-    (T.forAll "x" (T.forAll "y" (T.function (T.var "x") (T.var "y"))) T.@@ T.int32 T.@@ T.string)
-    (T.function T.int32 T.string),
-  -- List type application
-  typeRedCase "list type applied"
-    (T.forAll "a" (T.list (T.var "a")) T.@@ T.int32)
-    (T.list T.int32),
-  -- Optional type application
-  typeRedCase "optional type applied"
-    (T.forAll "a" (T.optional (T.var "a")) T.@@ T.string)
-    (T.optional T.string)]
-
--- | Universal eta expansion test case: applies etaExpandTypedTerm with testContext and testGraph
-etaCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-etaCase cname input output = universalCase cname
-  (Eithers.either_
-    (Phantoms.lambda "_" $ Phantoms.string "eta expansion failed")
-    (Phantoms.lambda "t" $ ShowCore.term # Phantoms.var "t")
-    (ReductionModule.etaExpandTypedTerm # TestGraph.testContext # TestGraph.testGraph # input))
-  (showTerm output)
-
--- | Test cases for eta expansion of terms
--- Eta expansion adds explicit lambda wrappers to partially applied functions
-etaExpandTermGroup :: TTerm TestGroup
-etaExpandTermGroup = subgroup "etaExpandTerm" [
-    -- Terms that don't expand (already saturated or not functions)
-    etaCase "integer literal unchanged"
-      (int32 42)
-      (int32 42),
-
-    etaCase "string list unchanged"
-      (list [string "foo", string "bar"])
-      (list [string "foo", string "bar"]),
-
-    etaCase "fully applied binary function unchanged"
-      (apply (apply (primitive _strings_splitOn) (string "foo")) (string "bar"))
-      (apply (apply (primitive _strings_splitOn) (string "foo")) (string "bar")),
-
-    -- Lambda with fully applied primitive using a string literal (matches EtaExpansion.hs pattern)
-    etaCase "lambda with fully applied primitive unchanged"
-      (lambda "x" (apply (apply (primitive _strings_splitOn) (string ",")) (var "x")))
-      (lambda "x" (apply (apply (primitive _strings_splitOn) (string ",")) (var "x"))),
-
-    etaCase "lambda returning constant unchanged"
-      (lambda "x" (int32 42))
-      (lambda "x" (int32 42)),
-
-    -- Bare primitives are NOT expanded (they stay as-is)
-    etaCase "bare unary primitive unchanged"
-      (primitive _strings_toLower)
-      (primitive _strings_toLower),
-
-    etaCase "bare binary primitive unchanged"
-      (primitive _strings_splitOn)
-      (primitive _strings_splitOn),
-
-    etaCase "partially applied binary primitive expands to one lambda"
-      (apply (primitive _strings_splitOn) (var "foo"))
-      (lambda "v1" (apply (apply (primitive _strings_splitOn) (var "foo")) (var "v1"))),
-
-    etaCase "projection expands to lambda"
-      (project (nm "Person") (nm "firstName"))
-      (lambda "v1" (apply (project (nm "Person") (nm "firstName")) (var "v1"))),
-
-    -- Subterms within applications
-    etaCase "partial application inside lambda expands"
-      (lambda "x" (apply (primitive _strings_splitOn) (var "x")))
-      (lambda "x" (lambda "v1" (apply (apply (primitive _strings_splitOn) (var "x")) (var "v1")))),
-
-    -- Let bindings
-    etaCase "let with constant body unchanged"
-      (letExpr "foo" (int32 137) (int32 42))
-      (letExpr "foo" (int32 137) (int32 42)),
-
-    etaCase "let with bare primitive value unchanged"
-      (letExpr "foo" (primitive _strings_splitOn) (var "foo"))
-      (letExpr "foo" (primitive _strings_splitOn) (var "foo")),
-
-    -- Complete applications are no-ops
-    etaCase "fully applied unary unchanged"
-      (apply (primitive _strings_toLower) (string "FOO"))
-      (apply (primitive _strings_toLower) (string "FOO")),
-
-    -- Subterms
-    etaCase "partial application in list expands"
-      (list [lambda "x" (list [string "foo"]), apply (primitive _strings_splitOn) (string "bar")])
-      (list [lambda "x" (list [string "foo"]), lambda "v1" (apply (apply (primitive _strings_splitOn) (string "bar")) (var "v1"))])]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    Phantoms.doc "Test cases for term reduction mechanics" $
-    supergroup "reduction" [
-      betaReductionTests,
-      monomorphicPrimitiveTests,
-      polymorphicPrimitiveTests,
-      nullaryPrimitiveTests,
-      literalValueTests,
-      listReductionTests,
-      optionalReductionTests,
-      alphaConversionTests,
-      typeReductionTests,
-      etaExpandTermGroup]
diff --git a/src/main/haskell/Hydra/Sources/Test/Rewriting.hs b/src/main/haskell/Hydra/Sources/Test/Rewriting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Rewriting.hs
+++ /dev/null
@@ -1,532 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for core rewrite/fold combinators (foldOverTerm, rewriteTerm, rewriteType, rewriteAndFoldTermWithPath)
-module Hydra.Sources.Test.Rewriting where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Dsl.Coders        as Coders
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as RewritingModule
-import qualified Hydra.Dsl.Meta.Lib.Lists as Lists
-import qualified Hydra.Dsl.Meta.Lib.Equality as Equality
-import qualified Hydra.Dsl.Meta.Lib.Logic as Logic
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Dsl.Meta.Lib.Pairs as Pairs
-
--- NOTE: This file previously used T for Terms and Ty for Types.
--- After standardization: Terms are unqualified, T is for Types.
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.rewriting"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, RewritingModule.ns, TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for core rewrite/fold combinators")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- Field constructor for cases/match (uses Phantoms.>>: to create Field, since the unqualified >>: from Testing creates tuples)
-(~>:) :: AsTerm t a => Name -> t -> Field
-(~>:) = (Phantoms.>>:)
-infixr 0 ~>:
-
--- | Show a term as a string using ShowCore.term
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term # t
-
--- | Show a type as a string using ShowCore.type_
-showType :: TTerm Type -> TTerm String
-showType t = ShowCore.type_ # t
-
--- | Core DSL Term-level constructors for building Term-typed values
--- These produce values of Hydra type Term (not String, Int, etc.)
-tStr :: String -> TTerm Term
-tStr s = Core.termLiteral (Core.literalString (Phantoms.string s))
-
--- | The "replaceFooWithBar" rewriter function for rewriteTerm tests
--- \recurse term -> if term == literal "foo" then literal "bar" else recurse term
-replaceFooWithBarFn :: TTerm ((Term -> Term) -> Term -> Term)
-replaceFooWithBarFn = Phantoms.lambda "recurse" $ Phantoms.lambda "term" $
-  Logic.ifElse
-    (Equality.equal (Phantoms.var "term") (tStr "foo"))
-    (tStr "bar")
-    (Phantoms.var "recurse" # Phantoms.var "term")
-
--- | The "replaceStringWithInt32" rewriter function for rewriteType tests
--- \recurse typ -> if typ == TypeLiteral LiteralTypeString then TypeLiteral (LiteralTypeInteger IntegerTypeInt32) else recurse typ
-replaceStringWithInt32Fn :: TTerm ((Type -> Type) -> Type -> Type)
-replaceStringWithInt32Fn = Phantoms.lambda "recurse" $ Phantoms.lambda "typ" $
-  Logic.ifElse
-    (Equality.equal (Phantoms.var "typ") (Core.typeLiteral Core.literalTypeString))
-    (Core.typeLiteral (Core.literalTypeInteger Core.integerTypeInt32))
-    (Phantoms.var "recurse" # Phantoms.var "typ")
-
--- | Fold operation: sum int32 literals
--- \acc term -> acc + (case term of TermLiteral (LiteralInteger (IntegerValueInt32 n)) -> n; _ -> 0)
-sumInt32LiteralsFoldFn :: TTerm (Int -> Term -> Int)
-sumInt32LiteralsFoldFn = Phantoms.lambda "acc" $ Phantoms.lambda "term" $
-  Math.add (Phantoms.var "acc") $
-    Phantoms.cases _Term (Phantoms.var "term") (Just (Phantoms.int32 0)) [
-      _Term_literal ~>: Phantoms.lambda "lit" $
-        Phantoms.cases _Literal (Phantoms.var "lit") (Just (Phantoms.int32 0)) [
-          _Literal_integer ~>: Phantoms.lambda "intVal" $
-            Phantoms.cases _IntegerValue (Phantoms.var "intVal") (Just (Phantoms.int32 0)) [
-              _IntegerValue_int32 ~>: Phantoms.lambda "n" $ Phantoms.var "n"]]]
-
--- | Fold operation: collect list lengths
--- \acc term -> acc ++ (case term of TermList elems -> [length elems]; _ -> [])
-collectListLengthsFoldFn :: TTerm ([Int] -> Term -> [Int])
-collectListLengthsFoldFn = Phantoms.lambda "acc" $ Phantoms.lambda "term" $
-  Lists.concat (Phantoms.list [
-    Phantoms.var "acc",
-    Phantoms.cases _Term (Phantoms.var "term") (Just (Phantoms.list ([] :: [TTerm Int]))) [
-      _Term_list ~>: Phantoms.lambda "elems" $
-        Phantoms.list [Lists.length (Phantoms.var "elems")]]])
-
--- | Fold operation: collect labels from pair terms
--- \acc term -> acc ++ (case term of TermPair (TermLiteral s, _) -> [s]; _ -> [])
-collectLabelsFoldFn :: TTerm ([Literal] -> Term -> [Literal])
-collectLabelsFoldFn = Phantoms.lambda "acc" $ Phantoms.lambda "term" $
-  Lists.concat (Phantoms.list [
-    Phantoms.var "acc",
-    Phantoms.cases _Term (Phantoms.var "term") (Just (Phantoms.list ([] :: [TTerm Literal]))) [
-      _Term_pair ~>: Phantoms.lambda "p" $
-        Phantoms.cases _Term (Pairs.first (Phantoms.var "p")) (Just (Phantoms.list ([] :: [TTerm Literal]))) [
-          _Term_literal ~>: Phantoms.lambda "lit" $ Phantoms.list [Phantoms.var "lit"]]]])
-
--- | Universal foldOverTermCase: applies fold operation and shows result
-foldOverTermCase :: String -> TTerm Term -> TTerm TraversalOrder -> FoldOp -> TTerm Term -> TTerm TestCaseWithMetadata
-foldOverTermCase cname input order op output = universalCase cname
-  (showTerm (applyFoldOp op order input))
-  (showTerm output)
-
--- | Fold operations (local enum to replace the Testing.FoldOperation type)
-data FoldOp = FoldOpSumInt32 | FoldOpCollectListLengths | FoldOpCollectLabels
-
-foldOpSumInt32Literals :: FoldOp
-foldOpSumInt32Literals = FoldOpSumInt32
-
-foldOpCollectListLengths :: FoldOp
-foldOpCollectListLengths = FoldOpCollectListLengths
-
-foldOpCollectLabels :: FoldOp
-foldOpCollectLabels = FoldOpCollectLabels
-
--- | Apply a fold operation and wrap the result as a Term
-applyFoldOp :: FoldOp -> TTerm TraversalOrder -> TTerm Term -> TTerm Term
-applyFoldOp FoldOpSumInt32 order input =
-  Core.termLiteral (Core.literalInteger (Core.integerValueInt32
-    (RewritingModule.foldOverTerm # order # sumInt32LiteralsFoldFn # Phantoms.int32 0 # input)))
-applyFoldOp FoldOpCollectListLengths order input =
-  Core.termList (Lists.map
-    (Phantoms.lambda "n" $ Core.termLiteral (Core.literalInteger (Core.integerValueInt32 (Phantoms.var "n"))))
-    (RewritingModule.foldOverTerm # order # collectListLengthsFoldFn # Phantoms.list ([] :: [TTerm Int]) # input))
-applyFoldOp FoldOpCollectLabels order input =
-  Core.termList (Lists.map
-    (Phantoms.lambda "lit" $ Core.termLiteral (Phantoms.var "lit"))
-    (RewritingModule.foldOverTerm # order # collectLabelsFoldFn # Phantoms.list ([] :: [TTerm Literal]) # input))
-
--- | Universal rewriteTerm test case: applies replaceFooWithBar rewriter
-rewriteTermCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-rewriteTermCase cname input output = universalCase cname
-  (showTerm (RewritingModule.rewriteTerm # replaceFooWithBarFn # input))
-  (showTerm output)
-
--- | Universal rewriteType test case: applies replaceStringWithInt32 rewriter
-rewriteTypeCase :: String -> TTerm Type -> TTerm Type -> TTerm TestCaseWithMetadata
-rewriteTypeCase cname input output = universalCase cname
-  (showType (RewritingModule.rewriteType # replaceStringWithInt32Fn # input))
-  (showType output)
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Helper for single-binding let
-letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letExpr varName value body = lets [(nm varName, value)] body
-
--- Helper for multi-binding let
-multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
-multiLet bindings body = lets ((\(n, v) -> (nm n, v)) <$> bindings) body
-
--- Helper to build an empty annotation map
-emptyAnnMap :: TTerm (M.Map Name Term)
-emptyAnnMap = Phantoms.map M.empty
-
--- | Test cases for rewriteAndFoldTermWithPath
--- These tests verify that the path-tracking rewrite function correctly tracks accessor paths
--- and properly folds values while rewriting terms
-rewriteAndFoldTermWithPathGroup :: TTerm TestGroup
-rewriteAndFoldTermWithPathGroup = subgroup "rewriteAndFoldTermWithPath" [
-    -- The function is used by hoistSubtermsIntoLet, so we test that behavior
-    -- Note: These test the path-tracking through the fold accumulator behavior
-
-    -- Simple terms - no path-dependent rewriting needed
-    foldOverTermCase "path tracking through application - sum literals"
-      (apply (lambda "x" (var "x")) (int32 42))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 42),
-
-    foldOverTermCase "path tracking through nested applications"
-      (apply (apply (lambda "x" (lambda "y" (list [var "x", var "y"]))) (int32 1)) (int32 2))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 3),
-
-    foldOverTermCase "path tracking through let bindings"
-      (lets [(nm "x", int32 10)] (list [var "x", int32 32]))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 42),
-
-    foldOverTermCase "path tracking through record fields"
-      (record (nm "Point") [(nm "x", int32 10), (nm "y", int32 20)])
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 30),
-
-    foldOverTermCase "path tracking through case branches"
-      (match (nm "Result") nothing [(nm "ok", int32 1), (nm "err", int32 2)])
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 3),
-
-    foldOverTermCase "path tracking through pair"
-      (pair (int32 5) (int32 7))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 12),
-
-    foldOverTermCase "path tracking through optional"
-      (optional (just (int32 42)))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 42),
-
-    foldOverTermCase "path tracking through wrapped term"
-      (wrap (nm "Age") (int32 25))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 25),
-
-    foldOverTermCase "path tracking through type lambda"
-      (tylam "a" (int32 100))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 100),
-
-    foldOverTermCase "path tracking through type application"
-      (tyapp (int32 50) T.string)
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 50),
-
-    foldOverTermCase "path tracking through set elements"
-      (set [int32 1, int32 2, int32 3])
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 6),
-
-    foldOverTermCase "deep nesting - application in lambda in let"
-      (lets [(nm "f", lambda "x" (apply (var "x") (int32 5)))] (int32 10))
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 15),
-
-    -- Collect list lengths tests verify proper path traversal
-    foldOverTermCase "collect list lengths in nested structure"
-      (list [list [int32 1, int32 2], list [int32 3]])
-      Coders.traversalOrderPre
-      foldOpCollectListLengths
-      (list [int32 2, int32 2, int32 1]),
-
-    foldOverTermCase "collect list lengths in let body"
-      (lets [(nm "xs", list [int32 1])] (list [int32 2, int32 3]))
-      Coders.traversalOrderPre
-      foldOpCollectListLengths
-      (list [int32 2, int32 1])]
-
--- Helper to create labeled node (pair of label and list of children)
-labeledNode :: String -> [TTerm Term] -> TTerm Term
-labeledNode label children = pair (string label) (list children)
-
--- | Test cases for foldOverTerm
--- Using predefined fold operations: collectLabels, sumInt32Literals, collectListLengths
-foldOverTermGroup :: TTerm TestGroup
-foldOverTermGroup = subgroup "foldOverTerm" [
-    -- collectLabels tests (from checkFoldOverTerm in RewritingSpec.hs)
-    -- Nodes are represented as pairs: (label, children)
-    foldOverTermCase "collect labels from single node - pre-order"
-      (labeledNode "a" [])
-      Coders.traversalOrderPre
-      foldOpCollectLabels
-      (list [string "a"]),
-
-    foldOverTermCase "collect labels from tree - pre-order"
-      (labeledNode "a" [labeledNode "b" [], labeledNode "c" [labeledNode "d" []]])
-      Coders.traversalOrderPre
-      foldOpCollectLabels
-      (list [string "a", string "b", string "c", string "d"]),
-
-    foldOverTermCase "collect labels from single node - post-order"
-      (labeledNode "a" [])
-      Coders.traversalOrderPost
-      foldOpCollectLabels
-      (list [string "a"]),
-
-    foldOverTermCase "collect labels from tree - post-order"
-      (labeledNode "a" [labeledNode "b" [], labeledNode "c" [labeledNode "d" []]])
-      Coders.traversalOrderPost
-      foldOpCollectLabels
-      (list [string "b", string "d", string "c", string "a"]),
-
-    -- sumInt32Literals tests (from testFoldOverTerm in RewritingSpec.hs)
-    foldOverTermCase "sum int32 literals"
-      (list [int32 42, apply (lambda "x" (var "x")) (int32 10)])
-      Coders.traversalOrderPre
-      foldOpSumInt32Literals
-      (int32 52),
-
-    -- collectListLengths tests (from testFoldOverTerm in RewritingSpec.hs)
-    foldOverTermCase "collect list lengths - pre-order"
-      (list [list [string "foo", string "bar"], apply (lambda "x" (var "x")) (list [string "quux"])])
-      Coders.traversalOrderPre
-      foldOpCollectListLengths
-      (list [int32 2, int32 2, int32 1]),
-
-    foldOverTermCase "collect list lengths - post-order"
-      (list [list [string "foo", string "bar"], apply (lambda "x" (var "x")) (list [string "quux"])])
-      Coders.traversalOrderPost
-      foldOpCollectListLengths
-      (list [int32 2, int32 1, int32 2])]
-
--- | Test cases for rewriteType
--- Using predefined type rewriter: replaceStringWithInt32
-rewriteTypeGroup :: TTerm TestGroup
-rewriteTypeGroup = subgroup "rewriteType" [
-    rewriteTypeCase "String type in left side of either is replaced"
-      (T.either_ T.string T.int32)
-      (T.either_ T.int32 T.int32),
-
-    rewriteTypeCase "String type in right side of either is replaced"
-      (T.either_ T.int32 T.string)
-      (T.either_ T.int32 T.int32),
-
-    rewriteTypeCase "String types in both sides of either are replaced"
-      (T.either_ T.string T.string)
-      (T.either_ T.int32 T.int32),
-
-    rewriteTypeCase "String type in nested either (left of left) is replaced"
-      (T.either_ (T.either_ T.string T.int32) T.int64)
-      (T.either_ (T.either_ T.int32 T.int32) T.int64),
-
-    rewriteTypeCase "String type in nested either (right of right) is replaced"
-      (T.either_ T.int64 (T.either_ T.int32 T.string))
-      (T.either_ T.int64 (T.either_ T.int32 T.int32)),
-
-    rewriteTypeCase "String types in complex nested either are all replaced"
-      (T.either_ (T.either_ T.string T.string) (T.either_ T.string T.int64))
-      (T.either_ (T.either_ T.int32 T.int32) (T.either_ T.int32 T.int64)),
-
-    rewriteTypeCase "String in list type is replaced"
-      (T.list T.string)
-      (T.list T.int32),
-
-    rewriteTypeCase "String in function domain is replaced"
-      (T.function T.string T.int64)
-      (T.function T.int32 T.int64),
-
-    rewriteTypeCase "String in function codomain is replaced"
-      (T.function T.int64 T.string)
-      (T.function T.int64 T.int32),
-
-    rewriteTypeCase "String in optional type is replaced"
-      (T.optional T.string)
-      (T.optional T.int32)]
-
--- Helper for foo, bar, baz
-foo :: TTerm Term
-foo = string "foo"
-
-bar :: TTerm Term
-bar = string "bar"
-
-baz :: TTerm Term
-baz = string "baz"
-
--- | Test cases for rewriteTerm
--- Using predefined term rewriter: replaceFooWithBar
-rewriteTermGroup :: TTerm TestGroup
-rewriteTermGroup = subgroup "rewriteTerm" [
-    -- Simple terms
-    rewriteTermCase "string literal foo replaced with bar"
-      foo
-      bar,
-
-    rewriteTermCase "string in variable not changed"
-      (var "x")
-      (var "x"),
-
-    -- Collections
-    rewriteTermCase "string in list"
-      (list [foo, baz])
-      (list [bar, baz]),
-
-    rewriteTermCase "multiple strings in list"
-      (list [foo, foo, baz])
-      (list [bar, bar, baz]),
-
-    rewriteTermCase "string in optional (just)"
-      (optional (just foo))
-      (optional (just bar)),
-
-    -- Applications and functions
-    rewriteTermCase "string in function application"
-      (apply (var "print") foo)
-      (apply (var "print") bar),
-
-    rewriteTermCase "string in lambda body"
-      (lambda "x" foo)
-      (lambda "x" bar),
-
-    rewriteTermCase "string in nested applications"
-      (apply (var "f") (apply (var "g") foo))
-      (apply (var "f") (apply (var "g") bar)),
-
-    -- Records and products
-    rewriteTermCase "string in record field"
-      (record (nm "Person") [(nm "name", foo)])
-      (record (nm "Person") [(nm "name", bar)]),
-
-    rewriteTermCase "strings in multiple record fields"
-      (record (nm "Data") [(nm "a", foo), (nm "b", baz), (nm "c", foo)])
-      (record (nm "Data") [(nm "a", bar), (nm "b", baz), (nm "c", bar)]),
-
-    rewriteTermCase "string in pair"
-      (pair foo (int32 42))
-      (pair bar (int32 42)),
-
-    -- Let bindings
-    rewriteTermCase "string in let binding value"
-      (letExpr "x" foo (var "x"))
-      (letExpr "x" bar (var "x")),
-
-    rewriteTermCase "string in let body"
-      (letExpr "x" (int32 1) foo)
-      (letExpr "x" (int32 1) bar),
-
-    -- Case statements
-    rewriteTermCase "string in first case branch"
-      (match (nm "Result") nothing [(nm "success", foo), (nm "error", baz)])
-      (match (nm "Result") nothing [(nm "success", bar), (nm "error", baz)]),
-
-    rewriteTermCase "string in second case branch"
-      (match (nm "Result") nothing [(nm "success", baz), (nm "error", foo)])
-      (match (nm "Result") nothing [(nm "success", baz), (nm "error", bar)]),
-
-    rewriteTermCase "string in default branch"
-      (match (nm "Result") (just foo) [(nm "success", baz), (nm "error", baz)])
-      (match (nm "Result") (just bar) [(nm "success", baz), (nm "error", baz)]),
-
-    -- Deeply nested
-    rewriteTermCase "string deeply nested in record in list in application"
-      (apply (var "process") (list [record (nm "Item") [(nm "value", foo)]]))
-      (apply (var "process") (list [record (nm "Item") [(nm "value", bar)]])),
-
-    -- Unions and injections
-    rewriteTermCase "string in union inject value"
-      (inject (nm "Result") "success" foo)
-      (inject (nm "Result") "success" bar),
-
-    -- Wrapped terms
-    rewriteTermCase "string in wrapped term"
-      (wrap (nm "Email") foo)
-      (wrap (nm "Email") bar),
-
-    -- Annotated terms
-    rewriteTermCase "string in annotated term body"
-      (annot emptyAnnMap foo)
-      (annot emptyAnnMap bar),
-
-    -- Multiple bindings in let
-    rewriteTermCase "string in first of multiple let bindings"
-      (multiLet [("x", foo), ("y", baz)] (var "x"))
-      (multiLet [("x", bar), ("y", baz)] (var "x")),
-
-    rewriteTermCase "string in second of multiple let bindings"
-      (multiLet [("x", baz), ("y", foo)] (var "y"))
-      (multiLet [("x", baz), ("y", bar)] (var "y")),
-
-    rewriteTermCase "string in all let bindings and body"
-      (multiLet [("x", foo), ("y", foo)] foo)
-      (multiLet [("x", bar), ("y", bar)] bar),
-
-    -- Sets
-    rewriteTermCase "string in set"
-      (set [foo, baz])
-      (set [bar, baz]),
-
-    -- Type lambdas and type applications (System F)
-    rewriteTermCase "string in type lambda body"
-      (tylam "a" foo)
-      (tylam "a" bar),
-
-    rewriteTermCase "string in type application body"
-      (tyapp foo T.string)
-      (tyapp bar T.string),
-
-    rewriteTermCase "string in nested type lambdas"
-      (tylam "a" (tylam "b" foo))
-      (tylam "a" (tylam "b" bar)),
-
-    -- Annotation edge case: string in annotation subject is replaced, but body stays same
-    -- Note: annotations on the annotation map itself are not traversed by rewriteTerm
-
-    -- Complex nested structures
-    rewriteTermCase "string in case branch within let binding"
-      (letExpr "handler" (match (nm "Result") nothing [(nm "ok", foo), (nm "err", baz)]) (var "handler"))
-      (letExpr "handler" (match (nm "Result") nothing [(nm "ok", bar), (nm "err", baz)]) (var "handler")),
-
-    rewriteTermCase "string in annotated wrapped record field"
-      (annot emptyAnnMap (wrap (nm "User") (record (nm "UserData") [(nm "name", foo)])))
-      (annot emptyAnnMap (wrap (nm "User") (record (nm "UserData") [(nm "name", bar)])))]
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for core rewrite/fold combinators" $
-    supergroup "rewriting" [
-      foldOverTermGroup,
-      rewriteTypeGroup,
-      rewriteTermGroup,
-      rewriteAndFoldTermWithPathGroup]
diff --git a/src/main/haskell/Hydra/Sources/Test/Serialization.hs b/src/main/haskell/Hydra/Sources/Test/Serialization.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Serialization.hs
+++ /dev/null
@@ -1,223 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for AST serialization (printExpr and parenthesize)
---
--- Note: This module supersedes the Haskell-specific Hydra.SerializationSpec tests.
-module Hydra.Sources.Test.Serialization where
-
--- Standard imports for deep DSL tests (produces TTerm a with specific types)
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Phantoms                as Phantoms hiding ((++))
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import Hydra.Dsl.AsTerm
-import qualified Hydra.Dsl.Ast as Ast
-import qualified Hydra.Dsl.Meta.Lib.Math as Math
-import qualified Hydra.Sources.Kernel.Terms.Serialization as Serialization
-
-import Hydra.Ast (Expr, Op, BlockStyle)
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.serialization"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Serialization.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for AST serialization")}
-  where
-    definitions = [
-      Phantoms.toDefinition arrowOp,
-      Phantoms.toDefinition gtOp,
-      Phantoms.toDefinition plusOp,
-      Phantoms.toDefinition multOp,
-      Phantoms.toDefinition lambdaOp,
-      Phantoms.toDefinition caseOp,
-      Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    doc "Test cases for AST serialization" $
-    supergroup "serialization" [
-      associativityGroup,
-      caseStatementGroup,
-      lambdaGroup,
-      listGroup,
-      precedenceGroup]
-
--- Helper for building an infix expression: ifx op lhs rhs
-infixExpr :: AsTerm t Op => t -> TTerm Expr -> TTerm Expr -> TTerm Expr
-infixExpr opExpr lhs rhs = Serialization.ifx @@ asTerm opExpr @@ lhs @@ rhs
-
--- Universal serialization test case: printExpr (parenthesize expr) == expected
-serCase :: String -> TTerm Expr -> TTerm String -> TTerm TestCaseWithMetadata
-serCase cname expr expected = universalCase cname (Serialization.printExpr @@ (Serialization.parenthesize @@ expr)) expected
-
--- Helper for building a constant expression
-cstExpr :: TTerm String -> TTerm Expr
-cstExpr s = Serialization.cst @@ s
-
--- Helper for building a numeric expression
-numExpr :: Int -> TTerm Expr
-numExpr n = Serialization.num @@ int32 n
-
--- Helper for building a space-separated expression
-spaceSepExpr :: [TTerm Expr] -> TTerm Expr
-spaceSepExpr exprs = Serialization.spaceSep @@ list exprs
-
--- Helper for building a newline-separated expression
-newlineSepExpr :: [TTerm Expr] -> TTerm Expr
-newlineSepExpr exprs = Serialization.newlineSep @@ list exprs
-
--- Helper for building a bracket list
-bracketListExpr :: AsTerm t BlockStyle => t -> [TTerm Expr] -> TTerm Expr
-bracketListExpr style exprs = Serialization.bracketList @@ asTerm style @@ list exprs
-
--- Inline style (reference to kernel)
-inlineBlockStyle :: TTermDefinition BlockStyle
-inlineBlockStyle = Serialization.inlineStyle
-
--- Test operators defined locally to avoid a dependency on hydra.haskell.operators
-arrowOp :: TTermDefinition Op
-arrowOp = define "arrowOp" $
-  Serialization.op @@ string "->" @@ (Math.negate $ int32 1) @@ Ast.associativityRight
-
-gtOp :: TTermDefinition Op
-gtOp = define "gtOp" $
-  Serialization.op @@ string ">" @@ int32 4 @@ Ast.associativityNone
-
-plusOp :: TTermDefinition Op
-plusOp = define "plusOp" $
-  Serialization.op @@ string "+" @@ int32 6 @@ Ast.associativityBoth
-
-multOp :: TTermDefinition Op
-multOp = define "multOp" $
-  Serialization.op @@ string "*" @@ int32 7 @@ Ast.associativityBoth
-
-lambdaOp :: TTermDefinition Op
-lambdaOp = define "lambdaOp" $
-  Serialization.op @@ string "->" @@ (Math.negate $ int32 1) @@ Ast.associativityRight
-
-caseOp :: TTermDefinition Op
-caseOp = define "caseOp" $
-  Serialization.op @@ string "->" @@ int32 0 @@ Ast.associativityNone
-
--- Helper for lambda expressions: \vars -> body
--- lambdaExpr ["x", "y"] body = ifx lambdaOp (cst "\x y") body
-lambdaExpr :: [String] -> TTerm Expr -> TTerm Expr
-lambdaExpr vars body = infixExpr lambdaOp (cstExpr $ string ("\\" ++ unwords vars)) body
-
--- Helper for case statements
--- This creates: case cond of { pattern1 -> expr1; pattern2 -> expr2; ... }
-casesExpr :: TTerm Expr -> [(TTerm Expr, TTerm Expr)] -> TTerm Expr
-casesExpr cond branches = infixExpr ofOp lhs rhs
-  where
-    lhs = spaceSepExpr [cstExpr $ string "case", cond]
-    rhs = newlineSepExpr [infixExpr caseOp pat expr | (pat, expr) <- branches]
-    ofOp = Ast.op
-      (Ast.symbol $ string "of")
-      (Ast.padding Ast.wsSpace (Ast.wsBreakAndIndent $ string "  "))
-      (Ast.precedence $ int32 0)
-      Ast.associativityNone
-
--- | Test cases for associativity
-associativityGroup :: TTerm TestGroup
-associativityGroup = subgroup "associativity" [
-    serCase "right-associative operator"
-      -- (a -> b) -> c -> d
-      (infixExpr arrowOp (infixExpr arrowOp (cstExpr $ string "a") (cstExpr $ string "b"))
-                         (infixExpr arrowOp (cstExpr $ string "c") (cstExpr $ string "d")))
-      (string "(a -> b) -> c -> d")]
-
--- | Test cases for case statements
-caseStatementGroup :: TTerm TestGroup
-caseStatementGroup = subgroup "case statements" [
-    serCase "simple case statement"
-      (casesExpr (infixExpr gtOp (cstExpr $ string "x") (numExpr 42))
-                 [(cstExpr $ string "False", cstExpr $ string "Big"),
-                  (cstExpr $ string "True", cstExpr $ string "Small")])
-      (string "case x > 42 of\n  False -> Big\n  True -> Small"),
-
-    serCase "nested case statement"
-      (casesExpr (infixExpr gtOp (cstExpr $ string "x") (numExpr 42))
-                 [(cstExpr $ string "True",
-                   casesExpr (infixExpr gtOp (cstExpr $ string "x") (numExpr 100))
-                             [(cstExpr $ string "True", cstExpr $ string "ReallyBig"),
-                              (cstExpr $ string "False", cstExpr $ string "Big")]),
-                  (cstExpr $ string "False", cstExpr $ string "Small")])
-      (string "case x > 42 of\n  True -> case x > 100 of\n    True -> ReallyBig\n    False -> Big\n  False -> Small")]
-
--- | Test cases for lambda expressions
-lambdaGroup :: TTerm TestGroup
-lambdaGroup = subgroup "lambdas" [
-    serCase "simple lambda"
-      (lambdaExpr ["x", "y"] (infixExpr plusOp (cstExpr $ string "x") (cstExpr $ string "y")))
-      (string "\\x y -> x + y")]
-
--- | Test cases for list expressions
-listGroup :: TTerm TestGroup
-listGroup = subgroup "lists" [
-    serCase "empty list"
-      (bracketListExpr inlineBlockStyle [])
-      (string "[]"),
-
-    serCase "simple non-empty list"
-      (bracketListExpr inlineBlockStyle [numExpr 1, numExpr 2, numExpr 3])
-      (string "[1, 2, 3]"),
-
-    serCase "nested list"
-      (bracketListExpr inlineBlockStyle
-        [bracketListExpr inlineBlockStyle [numExpr 1, numExpr 3], numExpr 2])
-      (string "[[1, 3], 2]"),
-
-    serCase "list with parenthesized expression inside"
-      (bracketListExpr inlineBlockStyle
-        [bracketListExpr inlineBlockStyle
-          [numExpr 1,
-           infixExpr multOp
-             (infixExpr plusOp (numExpr 2) (numExpr 3))
-             (infixExpr plusOp (numExpr 1) (numExpr 10))],
-         numExpr 2])
-      (string "[[1, (2 + 3) * (1 + 10)], 2]")]
-
--- | Test cases for operator precedence
-precedenceGroup :: TTerm TestGroup
-precedenceGroup = subgroup "precedence" [
-    serCase "operators with different precedence - no parens needed"
-      (infixExpr plusOp
-        (infixExpr multOp (numExpr 2) (numExpr 3))
-        (infixExpr multOp (numExpr 1) (numExpr 10)))
-      (string "2 * 3 + 1 * 10"),
-
-    serCase "operators with different precedence - parens needed"
-      (infixExpr multOp
-        (infixExpr plusOp (numExpr 2) (numExpr 3))
-        (infixExpr plusOp (numExpr 1) (numExpr 10)))
-      (string "(2 + 3) * (1 + 10)"),
-
-    serCase "associative operator left nesting"
-      (infixExpr multOp (cstExpr $ string "x")
-        (infixExpr multOp (cstExpr $ string "y") (cstExpr $ string "z")))
-      (string "x * y * z"),
-
-    serCase "associative operator right nesting"
-      (infixExpr multOp
-        (infixExpr multOp (cstExpr $ string "x") (cstExpr $ string "y"))
-        (cstExpr $ string "z"))
-      (string "x * y * z")]
diff --git a/src/main/haskell/Hydra/Sources/Test/Sorting.hs b/src/main/haskell/Hydra/Sources/Test/Sorting.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Sorting.hs
+++ /dev/null
@@ -1,194 +0,0 @@
--- | Test cases for topological sorting algorithms
---
--- Note: This module supersedes the Haskell-specific Hydra.SortingSpec tests.
--- Historical note: The expected orderings changed when the algorithm was updated
--- to produce a canonical ordering (sorted by node value within each SCC).
-module Hydra.Sources.Test.Sorting where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import           Hydra.Dsl.Meta.Phantoms      as Phantoms hiding ((++))
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Sources.Kernel.Terms.Sorting as SortingModule
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Dsl.Meta.Lib.Eithers  as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Lists    as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals as Literals
-import qualified Hydra.Dsl.Meta.Lib.Strings  as Strings
-
-import qualified Data.Int as I
-
-
--- Note: We use Int for input types in helpers because int32 expects Int
--- and produces TTerm I.Int32. The test data literals (1, 2, 3) are polymorphic.
-
-ns :: Namespace
-ns = Namespace "hydra.test.sorting"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [SortingModule.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for topological sorting algorithms")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    doc "Test cases for topological sorting" $
-    supergroup "sorting" [
-      topologicalSortGroup,
-      topologicalSortSCCGroup]
-
--- | Show a list of Int32 as a string like "[1, 2, 3]"
-showIntList :: TTerm [Int] -> TTerm String
-showIntList xs = ShowCore.list_ @@ unaryFunction Literals.showInt32 @@ xs
-
--- | Show a list of lists of Int32 as a string like "[[1, 2], [3]]"
-showIntListList :: TTerm [[Int]] -> TTerm String
-showIntListList xs = ShowCore.list_ @@ unaryFunction showIntList @@ xs
-
--- | Show Either [[Int]] [Int] as "left([[1, 2]])" or "right([1, 2, 3])"
-showEitherResult :: TTerm (Either [[Int]] [Int]) -> TTerm String
-showEitherResult = Eithers.either_
-  (lambda "cs" (Strings.cat2 (string "left(") (Strings.cat2 (showIntListList (var "cs")) (string ")"))))
-  (lambda "xs" (Strings.cat2 (string "right(") (Strings.cat2 (showIntList (var "xs")) (string ")"))))
-
--- Helper to create adjacency list
-adj :: [(Int, [Int])] -> TTerm [(Int, [Int])]
-adj pairs = list [pair (int32 n) (list (int32 <$> deps)) | (n, deps) <- pairs]
-
--- Universal sort test case
-sortCase :: String -> TTerm [(Int, [Int])] -> TTerm (Either [[Int]] [Int]) -> TTerm TestCaseWithMetadata
-sortCase cname adjList expected =
-  universalCase cname
-    (showEitherResult (SortingModule.topologicalSort @@ adjList))
-    (showEitherResult expected)
-
--- Universal SCC test case
-sortSCCCase :: String -> TTerm [(Int, [Int])] -> TTerm [[Int]] -> TTerm TestCaseWithMetadata
-sortSCCCase cname adjList expected =
-  universalCase cname
-    (showIntListList (SortingModule.topologicalSortComponents @@ adjList))
-    (showIntListList expected)
-
--- Helper for Right result (sorted list)
-sorted :: [Int] -> TTerm (Either [[Int]] [Int])
-sorted xs = right $ list (int32 <$> xs)
-
--- Helper for Left result (cycles)
-cycles :: [[Int]] -> TTerm (Either [[Int]] [Int])
-cycles cs = left $ list [list (int32 <$> c) | c <- cs]
-
--- Helper for SCC result
-sccs :: [[Int]] -> TTerm [[Int]]
-sccs cs = list [list (int32 <$> c) | c <- cs]
-
--- | Test cases for topological sort (without cycles)
-topologicalSortGroup :: TTerm TestGroup
-topologicalSortGroup = subgroup "topological sort" [
-    -- Discrete sets (no dependencies)
-    sortCase "empty set"
-      (adj [])
-      (sorted []),
-    sortCase "singleton set"
-      (adj [(1, [])])
-      (sorted [1]),
-    sortCase "discrete set with multiple elements"
-      (adj [(3, []), (1, []), (2, [])])
-      (sorted [1, 2, 3]),
-
-    -- Trees and DAGs
-    sortCase "linked list"
-      (adj [(3, [1]), (2, [3]), (1, [])])
-      (sorted [1, 3, 2]),
-    sortCase "binary tree"
-      (adj [(3, [1, 4]), (4, [6, 2]), (1, [5]), (2, []), (6, []), (5, [])])
-      (sorted [5, 1, 2, 6, 4, 3]),
-    sortCase "two trees"
-      (adj [(3, [1, 4]), (5, [6, 2]), (2, [7]), (1, []), (4, []), (6, []), (7, [])])
-      (sorted [1, 7, 2, 4, 3, 6, 5]),
-    sortCase "diamond DAG"
-      (adj [(1, [3, 4]), (3, [2]), (4, [2]), (2, [5]), (5, [])])
-      (sorted [5, 2, 3, 4, 1]),
-
-    -- Cycles (expected to fail)
-    sortCase "two-node cycle"
-      (adj [(1, [2]), (2, [1])])
-      (cycles [[1, 2]]),
-    sortCase "cycle with incoming and outgoing edges"
-      (adj [(1, [3]), (3, [2]), (2, [3, 4]), (4, [5]), (5, [])])
-      (cycles [[2, 3]])]
-
--- | Test cases for topological sort with strongly connected component detection
-topologicalSortSCCGroup :: TTerm TestGroup
-topologicalSortSCCGroup = subgroup "topological sort SCC" [
-    -- Discrete sets
-    sortSCCCase "empty set"
-      (adj [])
-      (sccs []),
-    sortSCCCase "singleton set"
-      (adj [(1, [])])
-      (sccs [[1]]),
-    sortSCCCase "discrete set with multiple elements"
-      (adj [(3, []), (1, []), (2, [])])
-      (sccs [[1], [2], [3]]),
-
-    -- Weakly-connected components
-    sortSCCCase "single two-element component #1"
-      (adj [(1, [2]), (2, [])])
-      (sccs [[2], [1]]),
-    sortSCCCase "single two-element component #2"
-      (adj [(2, [1]), (1, [])])
-      (sccs [[1], [2]]),
-    sortSCCCase "multiple-element component"
-      (adj [(2, [1, 3]), (1, [3]), (3, [])])
-      (sccs [[3], [1], [2]]),
-
-    -- Strongly-connected components (cycles)
-    sortSCCCase "cycle of two nodes #1"
-      (adj [(1, [2]), (2, [1])])
-      (sccs [[1, 2]]),
-    sortSCCCase "cycle of two nodes #2"
-      (adj [(2, [1]), (1, [2])])
-      (sccs [[1, 2]]),
-    sortSCCCase "cycle of three nodes #1"
-      (adj [(1, [2]), (2, [3]), (3, [1])])
-      (sccs [[1, 2, 3]]),
-    sortSCCCase "cycle of three nodes #2"
-      (adj [(2, [1]), (3, [2]), (1, [3])])
-      (sccs [[1, 2, 3]]),
-    sortSCCCase "multiple disconnected cycles"
-      (adj ([(200, [])] ++ [(100, [])] ++ [(300, [])] ++ [(10, [20]), (20, [10])] ++ [(1, [2]), (2, [3]), (3, [1])]))
-      (sccs [[1, 2, 3], [10, 20], [100], [200], [300]]),
-    sortSCCCase "complex cycles"
-      (adj [(1, [2, 3]), (2, [3]), (3, [1])])
-      (sccs [[1, 2, 3]]),
-
-    -- Mixed weakly- and strongly-connected components
-    sortSCCCase "chain of three SCCs"
-      (adj [(1, [2, 10]), (2, [3]), (3, [1]), (10, [20]), (20, [100, 10]), (100, [])])
-      (sccs [[100], [10, 20], [1, 2, 3]]),
-    sortSCCCase "SCCs with dependencies to/from non-SCC nodes"
-      (adj [(1, [2, 3, 10]), (2, [3]), (3, [1]),
-            (10, [20, 30]), (20, [30]), (30, []),
-            (100, [200, 2]), (200, []), (300, [100]),
-            (1000, []),
-            (2000, [])])
-      (sccs [[30], [20], [10], [1, 2, 3], [200], [100], [300], [1000], [2000]])]
diff --git a/src/main/haskell/Hydra/Sources/Test/Strip.hs b/src/main/haskell/Hydra/Sources/Test/Strip.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Strip.hs
+++ /dev/null
@@ -1,144 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for annotation and type stripping operations
-module Hydra.Sources.Test.Strip where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Strip as StripModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.strip"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, StripModule.ns, TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for annotation and type stripping operations")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- | Show a term as a string using ShowCore.term
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term # t
-
--- | Show a type as a string using ShowCore.type_
-showType :: TTerm Type -> TTerm String
-showType t = ShowCore.type_ # t
-
--- | Helper for Term -> Term kernel function test cases
-termCase :: String -> TTermDefinition (Term -> Term) -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-termCase cname func input output = universalCase cname (showTerm (func # input)) (showTerm output)
-
--- | Helper for Type -> Type kernel function test cases
-typeCase :: String -> TTermDefinition (Type -> Type) -> TTerm Type -> TTerm Type -> TTerm TestCaseWithMetadata
-typeCase cname func input output = universalCase cname (showType (func # input)) (showType output)
-
--- | Convenience helpers for specific kernel functions
-deannotateTermCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-deannotateTermCase cname = termCase cname StripModule.deannotateTerm
-
-deannotateTypeCase :: String -> TTerm Type -> TTerm Type -> TTerm TestCaseWithMetadata
-deannotateTypeCase cname = typeCase cname StripModule.deannotateType
-
--- Helper to build an empty annotation map
-emptyAnnMap :: TTerm (M.Map Name Term)
-emptyAnnMap = Phantoms.map M.empty
-
--- | Test cases for deannotating terms (stripping top-level annotations)
--- Note: deannotateTerm only strips annotations at the top level, not recursively
-deannotateTermGroup :: TTerm TestGroup
-deannotateTermGroup = subgroup "deannotateTerm" [
-    deannotateTermCase "unannotated literal unchanged"
-      (int32 42)
-      (int32 42),
-
-    deannotateTermCase "unannotated variable unchanged"
-      (var "x")
-      (var "x"),
-
-    deannotateTermCase "unannotated lambda unchanged"
-      (lambda "x" (var "x"))
-      (lambda "x" (var "x")),
-
-    deannotateTermCase "single annotation stripped"
-      (annot emptyAnnMap (int32 42))
-      (int32 42),
-
-    deannotateTermCase "nested annotations stripped"
-      (annot emptyAnnMap (annot emptyAnnMap (int32 42)))
-      (int32 42),
-
-    deannotateTermCase "annotated lambda stripped"
-      (annot emptyAnnMap (lambda "x" (var "x")))
-      (lambda "x" (var "x")),
-
-    deannotateTermCase "annotated application stripped"
-      (annot emptyAnnMap (apply (var "f") (var "x")))
-      (apply (var "f") (var "x"))]
-
--- | Test cases for deannotating types (stripping top-level annotations)
--- Note: deannotateType only strips annotations at the top level, not recursively
-deannotateTypeGroup :: TTerm TestGroup
-deannotateTypeGroup = subgroup "deannotateType" [
-    deannotateTypeCase "unannotated primitive type unchanged"
-      T.int32
-      T.int32,
-
-    deannotateTypeCase "unannotated string type unchanged"
-      T.string
-      T.string,
-
-    deannotateTypeCase "unannotated function type unchanged"
-      (T.function T.int32 T.string)
-      (T.function T.int32 T.string),
-
-    deannotateTypeCase "single annotation stripped"
-      (T.annot emptyAnnMap T.int32)
-      T.int32,
-
-    deannotateTypeCase "nested annotations stripped"
-      (T.annot emptyAnnMap (T.annot emptyAnnMap T.string))
-      T.string,
-
-    deannotateTypeCase "annotated list type stripped"
-      (T.annot emptyAnnMap (T.list T.int32))
-      (T.list T.int32),
-
-    deannotateTypeCase "annotated function type stripped"
-      (T.annot emptyAnnMap (T.function T.int32 T.string))
-      (T.function T.int32 T.string)]
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for annotation and type stripping operations" $
-    supergroup "strip" [
-      deannotateTermGroup,
-      deannotateTypeGroup]
diff --git a/src/main/haskell/Hydra/Sources/Test/Substitution.hs b/src/main/haskell/Hydra/Sources/Test/Substitution.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Substitution.hs
+++ /dev/null
@@ -1,220 +0,0 @@
--- | Test cases for type and term substitution operations
-module Hydra.Sources.Test.Substitution where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import           Hydra.Dsl.Meta.Phantoms      as Phantoms hiding ((++))
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Substitution as SubstitutionModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.substitution"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, SubstitutionModule.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for type and term substitution operations")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ string s
-
--- Helper for building substitution pairs
-subst :: [(String, TTerm Type)] -> TTerm [(Name, Type)]
-subst pairs = list [pair (nm n) t | (n, t) <- pairs]
-
--- | Apply substInType and show the result as a string
-showSubstInType :: [(String, TTerm Type)] -> TTerm Type -> TTerm String
-showSubstInType pairs inputType =
-  ShowCore.type_ @@ (SubstitutionModule.substInType @@
-    (wrap _TypeSubst (Maps.fromList (subst pairs))) @@ inputType)
-
--- | Universal substInType test case
-substInTypeCase :: String -> [(String, TTerm Type)] -> TTerm Type -> TTerm Type -> TTerm TestCaseWithMetadata
-substInTypeCase cname pairs input output =
-  universalCase cname (showSubstInType pairs input) (ShowCore.type_ @@ output)
-
--- | Build a TypeScheme DSL value
-scheme :: [String] -> TTerm Type -> TTerm TypeScheme
-scheme vars body = Core.typeScheme (list [nm v | v <- vars]) body nothing
-
--- | Apply substInTypeScheme and render just the scheme's body type, which is
--- where the capture-avoidance behavior shows up. The quantifier list is
--- preserved unchanged so we test it separately via showSubstInTypeSchemeVars.
-showSubstInTypeSchemeBody :: [(String, TTerm Type)] -> TTerm TypeScheme -> TTerm String
-showSubstInTypeSchemeBody pairs inputScheme =
-  ShowCore.type_ @@ (Core.typeSchemeBody $ SubstitutionModule.substInTypeScheme @@
-    (wrap _TypeSubst (Maps.fromList (subst pairs))) @@ inputScheme)
-
-substInTypeSchemeBodyCase :: String -> [(String, TTerm Type)] -> TTerm TypeScheme -> TTerm Type -> TTerm TestCaseWithMetadata
-substInTypeSchemeBodyCase cname pairs input expectedBody =
-  universalCase cname (showSubstInTypeSchemeBody pairs input)
-    (ShowCore.type_ @@ expectedBody)
-
--- ============================================================
--- substInType tests
--- ============================================================
-
-substInTypeTests :: TTerm TestGroup
-substInTypeTests = subgroup "substInType" [
-  -- Empty substitution returns type unchanged
-  substInTypeCase "empty substitution returns type unchanged"
-    []
-    T.string
-    T.string,
-
-  -- Substitute a type variable with a concrete type
-  substInTypeCase "substitute type variable with int32"
-    [("a", T.int32)]
-    (T.var "a")
-    T.int32,
-
-  -- Non-matching variable is unchanged
-  substInTypeCase "non-matching variable unchanged"
-    [("a", T.int32)]
-    (T.var "b")
-    (T.var "b"),
-
-  -- Substitute in function type
-  substInTypeCase "substitute in function domain"
-    [("a", T.int32)]
-    (T.function (T.var "a") T.string)
-    (T.function T.int32 T.string),
-
-  substInTypeCase "substitute in function codomain"
-    [("a", T.string)]
-    (T.function T.int32 (T.var "a"))
-    (T.function T.int32 T.string),
-
-  -- Substitute in list type
-  substInTypeCase "substitute in list element type"
-    [("a", T.int32)]
-    (T.list (T.var "a"))
-    (T.list T.int32),
-
-  -- Substitute in optional type
-  substInTypeCase "substitute in optional type"
-    [("a", T.string)]
-    (T.optional (T.var "a"))
-    (T.optional T.string),
-
-  -- Substitute in pair type
-  substInTypeCase "substitute in pair type both sides"
-    [("a", T.int32)]
-    (T.pair (T.var "a") (T.var "a"))
-    (T.pair T.int32 T.int32),
-
-  -- Substitute in either type
-  substInTypeCase "substitute in either type"
-    [("a", T.string)]
-    (T.either_ (T.var "a") T.int32)
-    (T.either_ T.string T.int32),
-
-  -- Substitute in map type
-  substInTypeCase "substitute in map key type"
-    [("k", T.string)]
-    (T.map (T.var "k") T.int32)
-    (T.map T.string T.int32),
-
-  -- Substitute in set type
-  substInTypeCase "substitute in set type"
-    [("a", T.int32)]
-    (T.set (T.var "a"))
-    (T.set T.int32),
-
-  -- Nested substitution
-  substInTypeCase "nested substitution in list of pairs"
-    [("a", T.int32)]
-    (T.list (T.pair (T.var "a") T.string))
-    (T.list (T.pair T.int32 T.string)),
-
-  -- Multiple substitutions
-  substInTypeCase "multiple substitutions"
-    [("a", T.int32), ("b", T.string)]
-    (T.pair (T.var "a") (T.var "b"))
-    (T.pair T.int32 T.string),
-
-  -- Forall type: bound variable should not be substituted in body
-  substInTypeCase "forAll bound variable not substituted"
-    [("a", T.int32)]
-    (T.forAll "a" (T.function (T.var "a") (T.var "a")))
-    (T.forAll "a" (T.function (T.var "a") (T.var "a"))),
-
-  -- Forall type: free variable in body should be substituted
-  substInTypeCase "forAll free variable substituted"
-    [("b", T.string)]
-    (T.forAll "a" (T.function (T.var "a") (T.var "b")))
-    (T.forAll "a" (T.function (T.var "a") T.string))]
-
--- ============================================================
--- substInTypeScheme tests: quantifier-shadowing
--- ============================================================
-
-substInTypeSchemeTests :: TTerm TestGroup
-substInTypeSchemeTests = subgroup "substInTypeScheme" [
-  -- Bound variable in scheme's quantifier list must shadow the substitution.
-  -- Without proper shadowing, {t0 -> Foo} applied to `forall [t0]. t0 -> t0`
-  -- would incorrectly rewrite the body to `Foo -> Foo`, leaving the scheme
-  -- with quantifier [t0] and body Foo -> Foo — a scheme with no free t0
-  -- and an escaped Foo. Regression test for the incremental-inference
-  -- unification bug (2026-04-24).
-  substInTypeSchemeBodyCase "quantified variable shadows substitution"
-    [("a", T.int32)]
-    (scheme ["a"] (T.function (T.var "a") (T.var "a")))
-    (T.function (T.var "a") (T.var "a")),
-
-  -- Free variable in scheme body (not in quantifier list) is substituted.
-  substInTypeSchemeBodyCase "free variable in body is substituted"
-    [("b", T.string)]
-    (scheme ["a"] (T.function (T.var "a") (T.var "b")))
-    (T.function (T.var "a") T.string),
-
-  -- Mixed: substitute frees, not quantified
-  substInTypeSchemeBodyCase "mixed: free substituted, quantified shadowed"
-    [("a", T.int32), ("b", T.string)]
-    (scheme ["a"] (T.function (T.var "a") (T.var "b")))
-    (T.function (T.var "a") T.string),
-
-  -- Multiple quantifiers: all are shadowed
-  substInTypeSchemeBodyCase "multiple quantifiers shadow substitution"
-    [("a", T.int32), ("b", T.string)]
-    (scheme ["a", "b"] (T.pair (T.var "a") (T.var "b")))
-    (T.pair (T.var "a") (T.var "b")),
-
-  -- Empty quantifier list: substitution applies normally
-  substInTypeSchemeBodyCase "empty quantifiers: normal substitution"
-    [("a", T.int32)]
-    (scheme [] (T.var "a"))
-    T.int32]
-
--- ============================================================
--- All tests
--- ============================================================
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    doc "Test cases for type and term substitution operations" $
-    supergroup "substitution" [
-      substInTypeTests,
-      substInTypeSchemeTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/TestEnv.hs b/src/main/haskell/Hydra/Sources/Test/TestEnv.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/TestEnv.hs
+++ /dev/null
@@ -1,54 +0,0 @@
--- | DSL declarations for hydra.test.testEnv.
---
--- This module declares the FQNs hydra.test.testEnv.testGraph and
--- hydra.test.testEnv.testContext so the code generator can resolve
--- references to them (from Meta/Testing.hs) during type inference. It is
--- included in the generator's universe for type resolution but is NOT
--- emitted to src/gen-test/haskell, so the hand-written
--- src/gen-test/haskell/Hydra/Test/TestEnv.hs is the source of truth at
--- the Haskell level.
---
--- The bodies here are stubs (emptyGraph/emptyContext). The real runtime
--- values come from the hand-written Haskell module and include primitives
--- and kernel term bindings, which are inherently host-language specific
--- and cannot be expressed at the DSL level.
-
-module Hydra.Sources.Test.TestEnv where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Phantoms
-import qualified Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-import Hydra.Sources.Kernel.Types.All
-import qualified Data.Map as M
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.testEnv"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Type-level declarations for the hand-written Hydra.Test.TestEnv module.")}
-  where
-   definitions = [
-     Phantoms.toDefinition testContext,
-     Phantoms.toDefinition testGraph]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- | Stub: the real testContext lives in hand-written Hydra.Test.TestEnv
-testContext :: TTermDefinition Context
-testContext = define "testContext" $ asTerm Lexical.emptyContext
-
--- | Stub: the real testGraph lives in hand-written Hydra.Test.TestEnv.
--- The hand-written runtime takes a test-types map; the DSL stub has the
--- matching signature so the generator emits calls of the form
--- `TestEnv.testGraph testTypes` rather than a bare value reference.
-testGraph :: TTermDefinition (M.Map Name Type -> Graph)
-testGraph = define "testGraph" $
-  "tys" ~> asTerm Lexical.emptyGraph
diff --git a/src/main/haskell/Hydra/Sources/Test/TestGraph.hs b/src/main/haskell/Hydra/Sources/Test/TestGraph.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/TestGraph.hs
+++ /dev/null
@@ -1,105 +0,0 @@
-module Hydra.Sources.Test.TestGraph where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Kernel.Terms.Lexical as Lexical
-import qualified Hydra.Sources.Test.TestEnv as TestEnv
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Hydra.Dsl.Meta.Graph         as Graph
-import qualified Hydra.Dsl.Packaging        as DPackaging
-import qualified Hydra.Dsl.Meta.Lib.Chars     as Chars
-import qualified Hydra.Dsl.Meta.Lib.Equality  as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic     as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math      as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes    as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Sets      as Sets
-import           Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Dsl.Terms              as DslTerms
-import qualified Hydra.Dsl.Types              as Types
-import qualified Hydra.Sources.Kernel.Types.Core as CoreTypes
-import           Prelude hiding ((++))
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-import qualified Data.Set                     as S
-import qualified Data.Maybe                   as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.testGraph"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestTerms.ns, TestTypes.ns, TestEnv.ns, Lexical.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("A module defining the graph used in the test suite.")}
-  where
-   definitions = [
-     Phantoms.toDefinition testTerms,
-     Phantoms.toDefinition testTypes,
-     Phantoms.toDefinition testNamespace,
-     Phantoms.toDefinition testSchemaNamespace,
-     Phantoms.toDefinition testGraph,
-     Phantoms.toDefinition testContext]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-testTerms :: TTermDefinition (M.Map Name Term)
-testTerms = define "testTerms" $
-  Maps.fromList $ Phantoms.list [
-    Phantoms.pair (name "testDataArthur") TestTerms.testDataArthur]
-
-testNamespace :: TTermDefinition Namespace
-testNamespace = define "testNamespace" $ DPackaging.namespace $ Phantoms.string "testGraph"
-
--- | The test graph. Emits a call to the hand-written
--- Hydra.Test.TestEnv.testGraph (applied to testTypes).
-testGraph :: TTermDefinition Graph
-testGraph = define "testGraph" $
-  TestEnv.testGraph Phantoms.@@ testTypes
-
--- | The test context. Emits a reference to the hand-written
--- Hydra.Test.TestEnv.testContext.
-testContext :: TTermDefinition Context
-testContext = define "testContext" $ asTerm TestEnv.testContext
-
-testTypes :: TTermDefinition (M.Map Name Type)
-testTypes = define "testTypes" $
-  Maps.fromList $ Phantoms.list [
-    Phantoms.pair TestTypes.testTypeBuddyListAName TestTypes.testTypeBuddyListA,
-    Phantoms.pair TestTypes.testTypeBuddyListBName TestTypes.testTypeBuddyListB,
-    Phantoms.pair TestTypes.testTypeComparisonName TestTypes.testTypeComparison,
-    Phantoms.pair TestTypes.testTypeEitherName TestTypes.testTypeEither,
-    Phantoms.pair TestTypes.testTypeHydraLiteralTypeName TestTypes.testTypeHydraLiteralType,
-    Phantoms.pair TestTypes.testTypeHydraTypeName TestTypes.testTypeHydraType,
-    Phantoms.pair TestTypes.testTypeIntListName TestTypes.testTypeIntList,
-    Phantoms.pair TestTypes.testTypeLatLonName TestTypes.testTypeLatLon,
-    Phantoms.pair TestTypes.testTypeLatLonPolyName TestTypes.testTypeLatLonPoly,
-    Phantoms.pair TestTypes.testTypeListName TestTypes.testTypeList,
-    Phantoms.pair TestTypes.testTypeNumberName TestTypes.testTypeNumber,
-    Phantoms.pair TestTypes.testTypePersonName TestTypes.testTypePerson,
-    Phantoms.pair TestTypes.testTypePersonOrSomethingName TestTypes.testTypePersonOrSomething,
-    Phantoms.pair TestTypes.testTypePolymorphicWrapperName TestTypes.testTypePolymorphicWrapper,
-    Phantoms.pair TestTypes.testTypeSimpleNumberName TestTypes.testTypeSimpleNumber,
-    Phantoms.pair TestTypes.testTypeStringAliasName TestTypes.testTypeStringAlias,
-    Phantoms.pair TestTypes.testTypeSymmetricTripleName TestTypes.testTypeSymmetricTriple,
-    Phantoms.pair TestTypes.testTypeTimestampName TestTypes.testTypeTimestamp,
-    Phantoms.pair TestTypes.testTypeTripleName TestTypes.testTypeTriple,
-    Phantoms.pair TestTypes.testTypeUnionMonomorphicName TestTypes.testTypeUnionMonomorphic,
-    Phantoms.pair TestTypes.testTypeUnionPolymorphicRecursiveName TestTypes.testTypeUnionPolymorphicRecursive,
-    Phantoms.pair TestTypes.testTypeUnitName TestTypes.testTypeUnit]
-
-testSchemaNamespace :: TTermDefinition Namespace
-testSchemaNamespace = define "testSchemaNamespace" $ DPackaging.namespace $ Phantoms.string "testSchemaGraph"
diff --git a/src/main/haskell/Hydra/Sources/Test/TestSuite.hs b/src/main/haskell/Hydra/Sources/Test/TestSuite.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/TestSuite.hs
+++ /dev/null
@@ -1,168 +0,0 @@
--- | Complete test suite combining all Hydra test groups
-
-module Hydra.Sources.Test.TestSuite where
-
--- Standard imports for deep DSL tests (produces TTerm a with specific types)
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Phantoms                as Phantoms hiding ((++))
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
--- Test module imports
-import qualified Hydra.Sources.Test.Lib.Chars as Chars
-import qualified Hydra.Sources.Test.Lib.Eithers as Eithers
-import qualified Hydra.Sources.Test.Lib.Equality as Equality
-import qualified Hydra.Sources.Test.Lib.Lists as Lists
-import qualified Hydra.Sources.Test.Lib.Literals as Literals
-import qualified Hydra.Sources.Test.Lib.Logic as Logic
-import qualified Hydra.Sources.Test.Lib.Maps as Maps
-import qualified Hydra.Sources.Test.Lib.Math as Math
-import qualified Hydra.Sources.Test.Lib.Maybes as Maybes
-import qualified Hydra.Sources.Test.Annotations as Annotations
-import qualified Hydra.Sources.Test.Ordering as Ordering
-import qualified Hydra.Sources.Test.Lib.Pairs as Pairs
-import qualified Hydra.Sources.Test.Lib.Regex as Regex
-import qualified Hydra.Sources.Test.Lib.Sets as Sets
-import qualified Hydra.Sources.Test.Lib.Strings as Strings
-import qualified Hydra.Sources.Test.Checking.All as CheckingAll
-import qualified Hydra.Sources.Test.Checking.Advanced as CheckingAdvanced
-import qualified Hydra.Sources.Test.Checking.AlgebraicTypes as CheckingAlgebraicTypes
-import qualified Hydra.Sources.Test.Checking.Collections as CheckingCollections
-import qualified Hydra.Sources.Test.Checking.Failures as CheckingFailures
-import qualified Hydra.Sources.Test.Checking.Fundamentals as CheckingFundamentals
-import qualified Hydra.Sources.Test.Checking.NominalTypes as CheckingNominalTypes
-import qualified Hydra.Sources.Test.EtaExpansion as EtaExpansion
-import qualified Hydra.Sources.Test.Formatting as Formatting
-import qualified Hydra.Sources.Test.Generation as Generation
-import qualified Hydra.Sources.Test.Inference.All as InferenceAll
-import qualified Hydra.Sources.Test.Inference.AlgebraicTypes as InferenceAlgebraicTypes
-import qualified Hydra.Sources.Test.Inference.AlgorithmW as InferenceAlgorithmW
-import qualified Hydra.Sources.Test.Inference.Failures as InferenceFailures
-import qualified Hydra.Sources.Test.Inference.Fundamentals as InferenceFundamentals
-import qualified Hydra.Sources.Test.Inference.KernelExamples as InferenceKernelExamples
-import qualified Hydra.Sources.Test.Inference.Classes as InferenceClasses
-import qualified Hydra.Sources.Test.Inference.NominalTypes as InferenceNominalTypes
-import qualified Hydra.Sources.Test.Json.Parser as JsonParser
-import qualified Hydra.Sources.Test.Json.Roundtrip as JsonRoundtrip
-import qualified Hydra.Sources.Test.Json.Writer as JsonWriter
-import qualified Hydra.Sources.Test.Json.Yaml as JsonYaml
-import qualified Hydra.Sources.Test.Hoisting.All as HoistingAll
-import qualified Hydra.Sources.Test.Hoisting.Cases as HoistingCases
-import qualified Hydra.Sources.Test.Hoisting.Let as HoistingLet
-import qualified Hydra.Sources.Test.Dependencies as Dependencies
-import qualified Hydra.Sources.Test.Differentiation as Differentiation
-import qualified Hydra.Sources.Test.Reduction as Reduction
-import qualified Hydra.Sources.Test.Rewriting as Rewriting
-import qualified Hydra.Sources.Test.Serialization as Serialization
-import qualified Hydra.Sources.Test.Sorting as Sorting
-import qualified Hydra.Sources.Test.Strip as Strip
-import qualified Hydra.Sources.Test.Substitution as Substitution
-import qualified Hydra.Sources.Test.Unification as Unification
-import qualified Hydra.Sources.Test.Validate.All as ValidateAll
-import qualified Hydra.Sources.Test.Validate.Core as ValidateCore
-import qualified Hydra.Sources.Test.Variables as Variables
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.testSuite"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = namespaces,
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just ("Hydra's common test suite, which is designed to run identically in each Hydra implementation;"
-      <> " the criterion for a true Hydra implementation is that all test cases pass.")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-    namespaces = fst <$> testPairs
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    doc "The group of all common tests" $
-    Testing.testGroup (string "common") nothing (list subgroups) (list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = snd <$> testPairs
-
-libPairs :: [(Namespace, TTermDefinition TestGroup)]
-libPairs = [
-  (Chars.ns, Chars.allTests),
-  (Eithers.ns, Eithers.allTests),
-  (Equality.ns, Equality.allTests),
-  (Lists.ns, Lists.allTests),
-  (Literals.ns, Literals.allTests),
-  (Logic.ns, Logic.allTests),
-  (Maps.ns, Maps.allTests),
-  (Math.ns, Math.allTests),
-  (Maybes.ns, Maybes.allTests),
-  (Pairs.ns, Pairs.allTests),
-  (Regex.ns, Regex.allTests),
-  (Sets.ns, Sets.allTests),
-  (Strings.ns, Strings.allTests)]
-
-otherPairs :: [(Namespace, TTermDefinition TestGroup)]
-otherPairs = [
-  (Annotations.ns, Annotations.allTests),
-  (CheckingAll.ns, CheckingAll.allTests),
-  (Dependencies.ns, Dependencies.allTests),
-  (Differentiation.ns, Differentiation.allTests),
-  (EtaExpansion.ns, EtaExpansion.allTests),
-  (Formatting.ns, Formatting.allTests),
-  (Generation.ns, Generation.allTests),
-  (HoistingAll.ns, HoistingAll.allTests),
-  (InferenceAll.ns, InferenceAll.allTests),
-  -- TODO #336: JsonParser temporarily excluded — polymorphic ParseResult type blocks code generation
-  -- (JsonParser.ns, JsonParser.allTests),
-  (JsonRoundtrip.ns, JsonRoundtrip.allTests),
-  (JsonWriter.ns, JsonWriter.allTests),
-  (JsonYaml.ns, JsonYaml.allTests),
-  -- TODO #336: (Ordering.ns, Ordering.allTests) temporarily removed - needs investigation
-  (Reduction.ns, Reduction.allTests),
-  (Rewriting.ns, Rewriting.allTests),
-  (Serialization.ns, Serialization.allTests),
-  (Sorting.ns, Sorting.allTests),
-  (Strip.ns, Strip.allTests),
-  (Substitution.ns, Substitution.allTests),
-  (Unification.ns, Unification.allTests),
-  (ValidateAll.ns, ValidateAll.allTests),
-  (Variables.ns, Variables.allTests)]
-
-testPairs :: [(Namespace, TTermDefinition TestGroup)]
-testPairs = libPairs ++ otherPairs
-
--- | All test suite modules (the actual Module values)
-testSuiteModules :: [Module]
-testSuiteModules =
-  -- Lib tests
-  [Chars.module_, Eithers.module_, Equality.module_,
-   Lists.module_, Literals.module_, Logic.module_, Maps.module_,
-   Math.module_, Maybes.module_, Pairs.module_, Regex.module_, Sets.module_, Strings.module_,
-   -- Hoisting tests (including sub-modules)
-   HoistingAll.module_, HoistingCases.module_, HoistingLet.module_,
-   -- Other tests
-   Annotations.module_, Dependencies.module_, Differentiation.module_, EtaExpansion.module_, Formatting.module_,
-   Generation.module_,
-   JsonRoundtrip.module_, JsonWriter.module_, JsonYaml.module_,
-   Reduction.module_, Rewriting.module_, Serialization.module_, Sorting.module_,
-   Strip.module_, Variables.module_,
-   -- TODO #336: Ordering.module_ temporarily removed - needs investigation
-   -- Checking tests (including sub-modules)
-   CheckingAll.module_,
-   CheckingAdvanced.module_, CheckingAlgebraicTypes.module_, CheckingCollections.module_,
-   CheckingFailures.module_, CheckingFundamentals.module_, CheckingNominalTypes.module_,
-   -- Inference tests (including sub-modules)
-   InferenceAll.module_,
-   InferenceAlgebraicTypes.module_, InferenceAlgorithmW.module_, InferenceClasses.module_, InferenceFailures.module_,
-   InferenceFundamentals.module_, InferenceKernelExamples.module_, InferenceNominalTypes.module_,
-   -- Substitution and unification tests
-   Substitution.module_, Unification.module_,
-   -- Validation tests
-   ValidateAll.module_, ValidateCore.module_]
diff --git a/src/main/haskell/Hydra/Sources/Test/TestTerms.hs b/src/main/haskell/Hydra/Sources/Test/TestTerms.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/TestTerms.hs
+++ /dev/null
@@ -1,67 +0,0 @@
-module Hydra.Sources.Test.TestTerms where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import qualified Hydra.Dsl.Packaging        as DPackaging
-import           Prelude hiding ((++))
-
-
--- Type alias to avoid confusion with DSL Module
-type HydraModule = Module
-
-ns :: Namespace
-ns = Namespace "hydra.test.testTerms"
-
-module_ :: HydraModule
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [TestTypes.ns],
-            moduleTypeDependencies = [],
-            moduleDescription = (Just "Term definitions for the test suite")}
-  where
-    definitions = [
-      Phantoms.toDefinition latlonRecord,
-      Phantoms.toDefinition testDataArthur,
-      Phantoms.toDefinition testElementArthur,
-      Phantoms.toDefinition testElementFirstName]
-
-defineTerm :: String -> TTerm a -> TTermDefinition a
-defineTerm = definitionInModule module_
-
-latlonRecord :: TTermDefinition (Float -> Float -> Term)
-latlonRecord = defineTerm "latlonRecord" $
-  Phantoms.lambdas ["lat", "lon"] $ record TestTypes.testTypeLatLonName [
-    "lat">: float32Lift $ varPhantom "lat",
-    "lon">: float32Lift $ varPhantom "lon"]
-
-testDataArthur :: TTermDefinition Term
-testDataArthur = defineTerm "testDataArthur" $
-  record TestTypes.testTypePersonName [
-    "firstName">: string "Arthur",
-    "lastName">: string "Dent",
-    "age">: int32 42]
-
-testElementArthur :: TTermDefinition Binding
-testElementArthur = defineTerm "testElementArthur" $
-  Core.binding
-    (name "firstName")
-    testDataArthur
-    (Phantoms.just $ Core.typeScheme (Phantoms.list ([] :: [TTerm Name])) (Core.typeVariable TestTypes.testTypePersonName) Phantoms.nothing)
-
-testElementFirstName :: TTermDefinition Binding
-testElementFirstName = defineTerm "testElementFirstName" $
-  Core.binding
-    (name "firstName")
-    (project TestTypes.testTypePersonName (name "firstName"))
-    (Phantoms.just $ Core.typeScheme (Phantoms.list ([] :: [TTerm Name]))
-      (Core.typeFunction $ Core.functionType (Core.typeVariable TestTypes.testTypePersonName) T.string) Phantoms.nothing)
diff --git a/src/main/haskell/Hydra/Sources/Test/TestTypes.hs b/src/main/haskell/Hydra/Sources/Test/TestTypes.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/TestTypes.hs
+++ /dev/null
@@ -1,404 +0,0 @@
-module Hydra.Sources.Test.TestTypes where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Phantoms                as Phantoms hiding ((++), (>:))
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Dsl.Meta.Base (name, (>:))
-import qualified Hydra.Dsl.Packaging        as DPackaging
-import qualified Hydra.Dsl.Types              as Types
-import           Prelude hiding ((++))
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.testTypes"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Type definitions for the test suite")}
-  where
-    definitions = [
-      toDefinition testTypeBuddyListA,
-      toDefinition testTypeBuddyListAName,
-      toDefinition testTypeBuddyListB,
-      toDefinition testTypeBuddyListBName,
-      toDefinition testTypeComparison,
-      toDefinition testTypeComparisonName,
-      toDefinition testTypeEither,
-      toDefinition testTypeEitherName,
-      toDefinition testTypeHydraLiteralType,
-      toDefinition testTypeHydraLiteralTypeName,
-      toDefinition testTypeHydraType,
-      toDefinition testTypeHydraTypeName,
-      toDefinition testTypeIntList,
-      toDefinition testTypeIntListName,
-      toDefinition testTypeLatLon,
-      toDefinition testTypeLatLonName,
-      toDefinition testTypeLatLonPoly,
-      toDefinition testTypeLatLonPolyName,
-      toDefinition testTypeList,
-      toDefinition testTypeListName,
-      toDefinition testTypeNumber,
-      toDefinition testTypeNumberName,
-      toDefinition testTypePerson,
-      toDefinition testTypePersonName,
-      toDefinition testTypePersonOrSomething,
-      toDefinition testTypePersonOrSomethingName,
-      toDefinition testTypePolymorphicWrapper,
-      toDefinition testTypePolymorphicWrapperName,
-      toDefinition testTypeSimpleNumber,
-      toDefinition testTypeSimpleNumberName,
-      toDefinition testTypeStringAlias,
-      toDefinition testTypeStringAliasName,
-      toDefinition testTypeSymmetricTriple,
-      toDefinition testTypeSymmetricTripleName,
-      toDefinition testTypeTimestamp,
-      toDefinition testTypeTimestampName,
-      toDefinition testTypeTriple,
-      toDefinition testTypeTripleName,
-      toDefinition testTypeUnionMonomorphic,
-      toDefinition testTypeUnionMonomorphicName,
-      toDefinition testTypeUnionPolymorphicRecursive,
-      toDefinition testTypeUnionPolymorphicRecursiveName,
-      toDefinition testTypeUnit,
-      toDefinition testTypeUnitName,
-      -- Additional utility types
-      toDefinition concatType,
-      toDefinition compareStringsType,
-      toDefinition eitherStringOrInt8TypeName,
-      toDefinition eitherStringOrInt8Type,
-      toDefinition exampleProjectionType,
-      toDefinition listOfInt8sType,
-      toDefinition listOfInt16sType,
-      toDefinition listOfListsOfStringsType,
-      toDefinition listOfSetOfStringsType,
-      toDefinition listOfStringsType,
-      toDefinition mapOfStringsToIntsType,
-      toDefinition optionalInt8Type,
-      toDefinition optionalInt16Type,
-      toDefinition optionalStringType,
-      toDefinition setOfStringsType,
-      toDefinition stringOrIntName,
-      toDefinition stringOrIntType,
-      toDefinition testTypeName]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-defineType :: String -> TTerm Type -> TTermDefinition Type
-defineType name = define name . firstClassType
-
--- Helper to create fully qualified names within this module
-testTypesName :: String -> TTerm Name
---testTypesName localName = name $ "test." <> localName -- TODO: restore the test namespace, which is distinct from the test sources namespace. There are still tests with raw references to test types, e.g. (var "Person").
-testTypesName localName = name localName
-
--- Type name definitions
-testTypeBuddyListAName :: TTermDefinition Name
-testTypeBuddyListAName = define "testTypeBuddyListAName" $
-  testTypesName "BuddyListA"
-
-testTypeBuddyListBName :: TTermDefinition Name
-testTypeBuddyListBName = define "testTypeBuddyListBName" $
-  testTypesName "BuddyListB"
-
-testTypeComparisonName :: TTermDefinition Name
-testTypeComparisonName = define "testTypeComparisonName" $
-  testTypesName "Comparison"
-
-testTypeEitherName :: TTermDefinition Name
-testTypeEitherName = define "testTypeEitherName" $
-  testTypesName "Either"
-
-testTypeHydraLiteralTypeName :: TTermDefinition Name
-testTypeHydraLiteralTypeName = define "testTypeHydraLiteralTypeName" $
-  testTypesName "HydraLiteralType"
-
-testTypeHydraTypeName :: TTermDefinition Name
-testTypeHydraTypeName = define "testTypeHydraTypeName" $
-  testTypesName "HydraType"
-
-testTypeIntListName :: TTermDefinition Name
-testTypeIntListName = define "testTypeIntListName" $
-  testTypesName "IntList"
-
-testTypeLatLonName :: TTermDefinition Name
-testTypeLatLonName = define "testTypeLatLonName" $
-  testTypesName "LatLon"
-
-testTypeLatLonPolyName :: TTermDefinition Name
-testTypeLatLonPolyName = define "testTypeLatLonPolyName" $
-  testTypesName "LatLonPoly"
-
-testTypeListName :: TTermDefinition Name
-testTypeListName = define "testTypeListName" $
-  testTypesName "List"
-
-testTypeNumberName :: TTermDefinition Name
-testTypeNumberName = define "testTypeNumberName" $
-  testTypesName "Number"
-
-testTypePersonName :: TTermDefinition Name
-testTypePersonName = define "testTypePersonName" $
-  testTypesName "Person"
-
-testTypePersonOrSomethingName :: TTermDefinition Name
-testTypePersonOrSomethingName = define "testTypePersonOrSomethingName" $
-  testTypesName "PersonOrSomething"
-
-testTypePolymorphicWrapperName :: TTermDefinition Name
-testTypePolymorphicWrapperName = define "testTypePolymorphicWrapperName" $
-  testTypesName "PolymorphicWrapper"
-
-testTypeSimpleNumberName :: TTermDefinition Name
-testTypeSimpleNumberName = define "testTypeSimpleNumberName" $
-  testTypesName "SimpleNumber"
-
-testTypeStringAliasName :: TTermDefinition Name
-testTypeStringAliasName = define "testTypeStringAliasName" $
-  testTypesName "StringAlias"
-
-testTypeSymmetricTripleName :: TTermDefinition Name
-testTypeSymmetricTripleName = define "testTypeSymmetricTripleName" $
-  testTypesName "SymmetricTriple"
-
-testTypeTimestampName :: TTermDefinition Name
-testTypeTimestampName = define "testTypeTimestampName" $
-  testTypesName "Timestamp"
-
-testTypeTripleName :: TTermDefinition Name
-testTypeTripleName = define "testTypeTripleName" $
-  testTypesName "Triple"
-
-testTypeUnionMonomorphicName :: TTermDefinition Name
-testTypeUnionMonomorphicName = define "testTypeUnionMonomorphicName" $
-  testTypesName "UnionMonomorphic"
-
-testTypeUnionPolymorphicRecursiveName :: TTermDefinition Name
-testTypeUnionPolymorphicRecursiveName = define "testTypeUnionPolymorphicRecursiveName" $
-  testTypesName "UnionPolymorphicRecursive"
-
-testTypeUnitName :: TTermDefinition Name
-testTypeUnitName = define "testTypeUnitName" $
-  testTypesName "Unit"
-
--- Type definitions
-testTypeBuddyListA :: TTermDefinition Type
-testTypeBuddyListA = defineType "testTypeBuddyListA" $
-  T.forAll "a" $ T.record (testTypeBuddyListAName) [
-    "head">: T.variable "a",
-    "tail">: T.maybe $
-      T.apply (Core.typeVariable $ testTypeBuddyListBName) (T.variable "a")]
-
-testTypeBuddyListB :: TTermDefinition Type
-testTypeBuddyListB = defineType "testTypeBuddyListB" $
-  T.forAll "a" $ T.record (testTypeBuddyListBName) [
-    "head">: T.variable "a",
-    "tail">: T.maybe $
-      T.apply (Core.typeVariable $ testTypeBuddyListAName) (T.variable "a")]
-
-testTypeComparison :: TTermDefinition Type
-testTypeComparison = defineType "testTypeComparison" $
-  T.union (testTypeComparisonName) [
-    "lessThan">: T.unit,
-    "equalTo">: T.unit,
-    "greaterThan">: T.unit]
-
-testTypeEither :: TTermDefinition Type
-testTypeEither = defineType "testTypeEither" $
-  T.forAll "a" $ T.forAll "b" $ T.union testTypeEitherName [
-    "left">: T.variable "a",
-    "right">: T.variable "b"]
-
-testTypeHydraLiteralType :: TTermDefinition Type
-testTypeHydraLiteralType = defineType "testTypeHydraLiteralType" $
-  T.union testTypeHydraLiteralTypeName [
-    "boolean">: T.boolean,
-    "string">: T.string]
-
-testTypeHydraType :: TTermDefinition Type
-testTypeHydraType = defineType "testTypeHydraType" $
-  T.union testTypeHydraTypeName [
-    "literal">: Core.typeVariable testTypeHydraLiteralTypeName,
-    "list">: Core.typeVariable testTypeHydraTypeName]
-
-testTypeIntList :: TTermDefinition Type
-testTypeIntList = defineType "testTypeIntList" $
-  T.record testTypeIntListName [
-    "head">: T.int32,
-    "tail">: T.maybe $ Core.typeVariable testTypeIntListName]
-
-testTypeLatLon :: TTermDefinition Type
-testTypeLatLon = defineType "testTypeLatLon" $
-  T.record testTypeLatLonName [
-    "lat">: T.float32,
-    "lon">: T.float32]
-
-testTypeLatLonPoly :: TTermDefinition Type
-testTypeLatLonPoly = defineType "testTypeLatLonPoly" $
-  T.forAll "a" $ T.record testTypeLatLonPolyName [
-    "lat">: T.variable "a",
-    "lon">: T.variable "a"]
-
-testTypeList :: TTermDefinition Type
-testTypeList = defineType "testTypeList" $
-  T.forAll "a" $ T.record testTypeListName [
-    "head">: T.variable "a",
-    "tail">: T.maybe $
-      T.apply (Core.typeVariable testTypeListName) (T.variable "a")]
-
-testTypeNumber :: TTermDefinition Type
-testTypeNumber = defineType "testTypeNumber" $
-  T.union testTypeNumberName [
-    "int">: T.int32,
-    "float">: T.float32]
-
-testTypePerson :: TTermDefinition Type
-testTypePerson = defineType "testTypePerson" $
-  T.record testTypePersonName [
-    "firstName">: T.string,
-    "lastName">: T.string,
-    "age">: T.int32]
-
-testTypePersonOrSomething :: TTermDefinition Type
-testTypePersonOrSomething = defineType "testTypePersonOrSomething" $
-  T.forAll "a" $ T.union testTypePersonOrSomethingName [
-    "person">: Core.typeVariable testTypePersonName,
-    "other">: T.variable "a"]
-
-testTypePolymorphicWrapper :: TTermDefinition Type
-testTypePolymorphicWrapper = defineType "testTypePolymorphicWrapper" $
-  T.forAll "a" $ Core.typeWrap (T.list $ T.variable "a")
-
-testTypeSimpleNumber :: TTermDefinition Type
-testTypeSimpleNumber = defineType "testTypeSimpleNumber" $
-  T.union testTypeSimpleNumberName [
-    "int">: T.int32,
-    "float">: T.float32]
-
-testTypeStringAlias :: TTermDefinition Type
-testTypeStringAlias = defineType "testTypeStringAlias" $
-  Core.typeWrap T.string
-
-testTypeSymmetricTriple :: TTermDefinition Type
-testTypeSymmetricTriple = defineType "testTypeSymmetricTriple" $
-  T.forAlls ["v", "e"] $ T.wrap testTypeSymmetricTripleName $
-    T.applys (Core.typeVariable testTypeTripleName) [T.variable "v", T.variable "e", T.variable "v"]
-
-testTypeTimestamp :: TTermDefinition Type
-testTypeTimestamp = defineType "testTypeTimestamp" $
-  T.union testTypeTimestampName [
-    "unixTimeMillis">: T.uint64,
-    "date">: T.string]
-
-testTypeTriple :: TTermDefinition Type
-testTypeTriple = defineType "testTypeTriple" $
-  T.forAll "a" $ T.forAll "b" $ T.forAll "c" $ T.record testTypeTripleName [
-    "first">: T.variable "a",
-    "second">: T.variable "b",
-    "third">: T.variable "c"]
-
-testTypeUnionMonomorphic :: TTermDefinition Type
-testTypeUnionMonomorphic = defineType "testTypeUnionMonomorphic" $
-  T.union testTypeUnionMonomorphicName [
-    "bool">: T.boolean,
-    "string">: T.string,
-    "unit">: T.unit]
-
-testTypeUnionPolymorphicRecursive :: TTermDefinition Type
-testTypeUnionPolymorphicRecursive = defineType "testTypeUnionPolymorphicRecursive" $
-  T.forAll "a" $ T.union testTypeUnionPolymorphicRecursiveName [
-    "bool">: T.boolean,
-    "value">: T.variable "a",
-    "other">: T.apply (Core.typeVariable testTypeUnionPolymorphicRecursiveName) (T.variable "a")]
-
-testTypeUnit :: TTermDefinition Type
-testTypeUnit = defineType "testTypeUnit" $
-  T.record testTypeUnitName []
-
--- Additional type utilities for tests
-
-concatType :: TTermDefinition Type
-concatType = defineType "concatType" $
-  T.function T.string $ T.function T.string T.string
-
-compareStringsType :: TTermDefinition Type
-compareStringsType = defineType "compareStringsType" $
-  T.function T.string T.string
-
-eitherStringOrInt8TypeName :: TTermDefinition Name
-eitherStringOrInt8TypeName = define "eitherStringOrInt8TypeName" $
-  testTypesName "EitherStringOrInt8"
-
-eitherStringOrInt8Type :: TTermDefinition Type
-eitherStringOrInt8Type = defineType "eitherStringOrInt8Type" $
-  T.union eitherStringOrInt8TypeName [
-    "left">: T.string,
-    "right">: Core.typeLiteral $ Core.literalTypeInteger Core.integerTypeInt8]
-
-exampleProjectionType :: TTermDefinition Type
-exampleProjectionType = defineType "exampleProjectionType" $
-  T.function (Core.typeVariable testTypePersonName) T.string
-
-listOfInt8sType :: TTermDefinition Type
-listOfInt8sType = defineType "listOfInt8sType" $
-  T.list (Core.typeLiteral $ Core.literalTypeInteger Core.integerTypeInt8)
-
-listOfInt16sType :: TTermDefinition Type
-listOfInt16sType = defineType "listOfInt16sType" $
-  T.list T.int16
-
-listOfListsOfStringsType :: TTermDefinition Type
-listOfListsOfStringsType = defineType "listOfListsOfStringsType" $
-  T.list $ T.list T.string
-
-listOfSetOfStringsType :: TTermDefinition Type
-listOfSetOfStringsType = defineType "listOfSetOfStringsType" $
-  T.list $ T.set T.string
-
-listOfStringsType :: TTermDefinition Type
-listOfStringsType = defineType "listOfStringsType" $
-  T.list T.string
-
-mapOfStringsToIntsType :: TTermDefinition Type
-mapOfStringsToIntsType = defineType "mapOfStringsToIntsType" $
-  T.map T.string T.int32
-
-optionalInt8Type :: TTermDefinition Type
-optionalInt8Type = defineType "optionalInt8Type" $
-  T.maybe (Core.typeLiteral $ Core.literalTypeInteger Core.integerTypeInt8)
-
-optionalInt16Type :: TTermDefinition Type
-optionalInt16Type = defineType "optionalInt16Type" $
-  T.maybe T.int16
-
-optionalStringType :: TTermDefinition Type
-optionalStringType = defineType "optionalStringType" $
-  T.maybe T.string
-
-setOfStringsType :: TTermDefinition Type
-setOfStringsType = defineType "setOfStringsType" $
-  T.set T.string
-
-stringOrIntName :: TTermDefinition Name
-stringOrIntName = define "stringOrIntName" $
-  testTypesName "StringOrInt"
-
-stringOrIntType :: TTermDefinition Type
-stringOrIntType = defineType "stringOrIntType" $
-  T.union stringOrIntName [
-    "left">: T.string,
-    "right">: T.int32]
-
-testTypeName :: TTermDefinition Name
-testTypeName = define "testTypeName" $
-  testTypesName "Test"
diff --git a/src/main/haskell/Hydra/Sources/Test/Transform.hs b/src/main/haskell/Hydra/Sources/Test/Transform.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Transform.hs
+++ /dev/null
@@ -1,244 +0,0 @@
--- | Transform test cases for code generation, filtering to tests that can be compiled to target languages
-
-module Hydra.Sources.Test.Transform where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (transformModule)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                     as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.transform"
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Formatting.ns, Sorting.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Transform test cases for code generation, filtering to tests that can be compiled to target languages"}
-  where
-    definitions = [
-      toDefinition addGenerationPrefix,
-      toDefinition buildConvertCaseCall,
-      toDefinition buildTopologicalSortCall,
-      toDefinition buildTopologicalSortSCCCall,
-      toDefinition collectTestCases,
-      toDefinition encodeAdjacencyList,
-      toDefinition encodeCaseConvention,
-      toDefinition encodeEitherListList,
-      toDefinition encodeInt,
-      toDefinition encodeIntList,
-      toDefinition encodeListList,
-      toDefinition transformModule,
-      toDefinition transformTestCase,
-      toDefinition transformToCompiledTests]
-
-
--- | Add "generation" namespace prefix
-addGenerationPrefix :: TTermDefinition (Namespace -> Namespace)
-addGenerationPrefix = define "addGenerationPrefix" $
-  doc "Add generation namespace prefix" $
-  lambda "ns_" $
-    wrap _Namespace (Strings.cat2 (string "generation.") (unwrap _Namespace @@ var "ns_"))
-
-
--- | Build a Term representing a convertCase function call
-buildConvertCaseCall :: TTermDefinition (CaseConvention -> CaseConvention -> String -> Term)
-buildConvertCaseCall = define "buildConvertCaseCall" $
-  doc "Build a Term representing a convertCase function call" $
-  lambdas ["fromConv", "toConv", "input_"] $
-    Core.termApplication $ Core.application
-      (Core.termApplication $ Core.application
-        (Core.termApplication $ Core.application
-          (Core.termVariable $ Core.name (string "hydra.formatting.convertCase"))
-          (encodeCaseConvention @@ var "fromConv"))
-        (encodeCaseConvention @@ var "toConv"))
-      (Core.termLiteral $ Core.literalString (var "input_"))
-
-
--- | Build a Term representing a topologicalSort function call
-buildTopologicalSortCall :: TTermDefinition ([(Int, [Int])] -> Term)
-buildTopologicalSortCall = define "buildTopologicalSortCall" $
-  doc "Build a Term representing a topologicalSort function call" $
-  lambda "adjList" $
-    Core.termApplication $ Core.application
-      (Core.termVariable $ Core.name (string "hydra.sorting.topologicalSort"))
-      (encodeAdjacencyList @@ var "adjList")
-
-
--- | Build a Term representing a topologicalSortComponents function call
-buildTopologicalSortSCCCall :: TTermDefinition ([(Int, [Int])] -> Term)
-buildTopologicalSortSCCCall = define "buildTopologicalSortSCCCall" $
-  doc "Build a Term representing a topologicalSortComponents function call" $
-  lambda "adjList" $
-    Core.termApplication $ Core.application
-      (Core.termVariable $ Core.name (string "hydra.sorting.topologicalSortComponents"))
-      (encodeAdjacencyList @@ var "adjList")
-
-
--- | Collect all test cases from a test group (flattening hierarchy)
-collectTestCases :: TTermDefinition (TestGroup -> [TestCaseWithMetadata])
-collectTestCases = define "collectTestCases" $
-  doc "Collect all test cases from a test group (flattening hierarchy)" $
-  lambda "tg" $
-    Lists.concat2
-      (project _TestGroup _TestGroup_cases @@ var "tg")
-      (Lists.concat (Lists.map (lambda "sg" $ collectTestCases @@ var "sg")
-        (project _TestGroup _TestGroup_subgroups @@ var "tg")))
-
-
--- | Encode an adjacency list as a Term
-encodeAdjacencyList :: TTermDefinition ([(Int, [Int])] -> Term)
-encodeAdjacencyList = define "encodeAdjacencyList" $
-  doc "Encode an adjacency list as a Term" $
-  lambda "pairs" $
-    Core.termList (Lists.map
-      (lambda "p" $
-        Core.termPair (pair
-          (encodeInt @@ (Pairs.first (var "p")))
-          (Core.termList (Lists.map (lambda "d" $ encodeInt @@ var "d") (Pairs.second (var "p"))))))
-      (var "pairs"))
-
-
--- | Encode CaseConvention as a Term (unit variant)
-encodeCaseConvention :: TTermDefinition (CaseConvention -> Term)
-encodeCaseConvention = define "encodeCaseConvention" $
-  doc "Encode CaseConvention as a Term (unit variant)" $
-  lambda "conv" $
-    Core.termInject $ Core.injection
-      (Core.nameLift _CaseConvention)
-      (Core.field
-        (cases _CaseConvention (var "conv") Nothing [
-          _CaseConvention_lowerSnake>>: constant (Core.nameLift _CaseConvention_lowerSnake),
-          _CaseConvention_upperSnake>>: constant (Core.nameLift _CaseConvention_upperSnake),
-          _CaseConvention_camel>>: constant (Core.nameLift _CaseConvention_camel),
-          _CaseConvention_pascal>>: constant (Core.nameLift _CaseConvention_pascal)])
-        Core.termUnit)
-
-
--- | Encode Either [[Int]] [Int] as a Term
-encodeEitherListList :: TTermDefinition (Either [[Int]] [Int] -> Term)
-encodeEitherListList = define "encodeEitherListList" $
-  doc "Encode Either [[Int]] [Int] as a Term" $
-  lambda "e" $
-    Core.termEither (Eithers.bimap
-      (lambda "cycles" $ encodeListList @@ var "cycles")
-      (lambda "sorted" $ encodeIntList @@ var "sorted")
-      (var "e"))
-
-
--- | Encode an Int as a Term
-encodeInt :: TTermDefinition (Int -> Term)
-encodeInt = define "encodeInt" $
-  doc "Encode an Int as a Term" $
-  lambda "n" $
-    Core.termLiteral $ Core.literalInteger $ Core.integerValueInt32 (var "n")
-
-
--- | Encode [Int] as a Term
-encodeIntList :: TTermDefinition ([Int] -> Term)
-encodeIntList = define "encodeIntList" $
-  doc "Encode [Int] as a Term" $
-  lambda "ints" $
-    Core.termList (Lists.map (lambda "n" $ encodeInt @@ var "n") (var "ints"))
-
-
--- | Encode [[Int]] as a Term
-encodeListList :: TTermDefinition ([[Int]] -> Term)
-encodeListList = define "encodeListList" $
-  doc "Encode [[Int]] as a Term" $
-  lambda "lists" $
-    Core.termList (Lists.map (lambda "l" $ encodeIntList @@ var "l") (var "lists"))
-
-
--- | Transform module with generation namespace
-transformModule :: TTermDefinition (Module -> Module)
-transformModule = define "transformModule" $
-  doc "Transform module with generation namespace" $
-  lambda "m" $
-    Packaging.module_
-      (project _Module _Module_description @@ var "m")
-      (addGenerationPrefix @@ (project _Module _Module_namespace @@ var "m"))
-      (project _Module _Module_termDependencies @@ var "m")
-      (project _Module _Module_typeDependencies @@ var "m")
-      (project _Module _Module_definitions @@ var "m")
-
-
--- | Transform a test case (pass through unchanged — all test cases are now universal)
-transformTestCase :: TTermDefinition (TestCaseWithMetadata -> Maybe TestCaseWithMetadata)
-transformTestCase = define "transformTestCase" $
-  doc "Pass through test cases unchanged" $
-  lambda "tcm" $ just (var "tcm")
-
-
--- | Transform test group hierarchy to only include delegated evaluation tests
-transformToCompiledTests :: TTermDefinition (TestGroup -> Maybe TestGroup)
-transformToCompiledTests = define "transformToCompiledTests" $
-  doc "Transform test group hierarchy to only include delegated evaluation tests" $
-  lambda "tg" $ lets [
-    "name_">: project _TestGroup _TestGroup_name @@ var "tg",
-    "desc">: project _TestGroup _TestGroup_description @@ var "tg",
-    "subgroups">: project _TestGroup _TestGroup_subgroups @@ var "tg",
-    "cases_">: project _TestGroup _TestGroup_cases @@ var "tg",
-    "transformedCases">: Maybes.cat (Lists.map (lambda "tc" $ transformTestCase @@ var "tc") (var "cases_")),
-    "transformedSubgroups">: Maybes.cat (Lists.map (lambda "sg" $ transformToCompiledTests @@ var "sg") (var "subgroups"))] $
-    Logic.ifElse
-      (Logic.and (Lists.null (var "transformedCases")) (Lists.null (var "transformedSubgroups")))
-      nothing
-      (just $ Testing.testGroup (var "name_") (var "desc") (var "transformedSubgroups") (var "transformedCases"))
-
diff --git a/src/main/haskell/Hydra/Sources/Test/Unification.hs b/src/main/haskell/Hydra/Sources/Test/Unification.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Unification.hs
+++ /dev/null
@@ -1,511 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for type unification operations
-module Hydra.Sources.Test.Unification where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Pairs     as Pairs
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Dsl.Typing             as Typing
-import qualified Hydra.Dsl.Meta.Lib.Eithers   as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Lists     as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals  as Literals
-import qualified Hydra.Dsl.Meta.Lib.Maps      as Maps
-import qualified Hydra.Dsl.Meta.Lib.Strings   as Strings
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Hydra.Sources.Kernel.Terms.Lexical as LexicalModule
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-import qualified Hydra.Sources.Kernel.Terms.Unification as UnificationModule
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.unification"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [UnificationModule.ns, LexicalModule.ns, ShowCore.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for type unification operations")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Local alias for polymorphic application
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- | Universal variableOccursInType test case
-variableOccursCase :: String -> TTerm Name -> TTerm Type -> TTerm Bool -> TTerm TestCaseWithMetadata
-variableOccursCase cname variable typ expected =
-  universalCase cname
-    (Literals.showBoolean (UnificationModule.variableOccursInType # variable # typ))
-    (Literals.showBoolean expected)
-
--- | Build schema types map from a list of names.
--- Each name gets TypeScheme [] (TypeVariable name) Nothing
-buildSchemaMap :: TTerm [Name] -> TTerm (M.Map Name TypeScheme)
-buildSchemaMap names = Maps.fromList (Lists.map
-  (Phantoms.lambda "n" $ Phantoms.pair (Phantoms.var "n") (T.mono (Core.typeVariable (Phantoms.var "n"))))
-  names)
-
--- | Show a TypeSubst as a sorted string like "{a: int32, b: string}"
-showTypeSubst :: TTerm TypeSubst -> TTerm String
-showTypeSubst ts = Strings.cat (Phantoms.list [
-  Phantoms.string "{",
-  Strings.intercalate (Phantoms.string ", ")
-    (Lists.map (Phantoms.lambda "p" $ Strings.cat (Phantoms.list [
-      Core.unName (Pairs.first (Phantoms.var "p")),
-      Phantoms.string ": ",
-      ShowCore.type_ # Pairs.second (Phantoms.var "p")]))
-      (Maps.toList (Typing.unTypeSubst ts))),
-  Phantoms.string "}"])
-
--- | Show a list of TypeConstraints as "[(left ~ right), ...]"
-showConstraints :: TTerm [TypeConstraint] -> TTerm String
-showConstraints cs = Strings.cat (Phantoms.list [
-  Phantoms.string "[",
-  Strings.intercalate (Phantoms.string ", ")
-    (Lists.map (Phantoms.lambda "c" $ Strings.cat (Phantoms.list [
-      Phantoms.string "(",
-      ShowCore.type_ # Typing.typeConstraintLeft (Phantoms.var "c"),
-      Phantoms.string " ~ ",
-      ShowCore.type_ # Typing.typeConstraintRight (Phantoms.var "c"),
-      Phantoms.string ")"]))
-      cs),
-  Phantoms.string "]"])
-
--- | Universal unifyTypes test case (expecting success)
-unifyTypesCase :: String -> TTerm [Name] -> TTerm Type -> TTerm Type -> [(TTerm Name, TTerm Type)] -> TTerm TestCaseWithMetadata
-unifyTypesCase cname schemaTypes left right substPairs = universalCase cname
-  (Eithers.either_
-    (Phantoms.lambda "_" $ Phantoms.string "failure")
-    (Phantoms.lambda "ts" $ showTypeSubst (Phantoms.var "ts"))
-    (UnificationModule.unifyTypes # LexicalModule.emptyContext # buildSchemaMap schemaTypes # left # right # Phantoms.string "test"))
-  (showTypeSubst (Phantoms.wrap _TypeSubst (Phantoms.map (M.fromList substPairs))))
-
--- | Universal unifyTypes test case (expecting failure)
-unifyTypesFailCase :: String -> TTerm [Name] -> TTerm Type -> TTerm Type -> String -> TTerm TestCaseWithMetadata
-unifyTypesFailCase cname schemaTypes left right _errSubstring = universalCase cname
-  (Eithers.either_
-    (Phantoms.lambda "_" $ Phantoms.string "failure")
-    (Phantoms.lambda "ts" $ showTypeSubst (Phantoms.var "ts"))
-    (UnificationModule.unifyTypes # LexicalModule.emptyContext # buildSchemaMap schemaTypes # left # right # Phantoms.string "test"))
-  (Phantoms.string "failure")
-
--- | Universal joinTypes test case (expecting success)
-joinTypesCase :: String -> TTerm Type -> TTerm Type -> TTerm [TypeConstraint] -> TTerm TestCaseWithMetadata
-joinTypesCase cname left right constraints = universalCase cname
-  (Eithers.either_
-    (Phantoms.lambda "_" $ Phantoms.string "failure")
-    (Phantoms.lambda "cs" $ showConstraints (Phantoms.var "cs"))
-    (UnificationModule.joinTypes # LexicalModule.emptyContext # left # right # Phantoms.string "test"))
-  (showConstraints constraints)
-
--- | Universal joinTypes test case (expecting failure)
-joinTypesFailCase :: String -> TTerm Type -> TTerm Type -> TTerm TestCaseWithMetadata
-joinTypesFailCase cname left right = universalCase cname
-  (Eithers.either_
-    (Phantoms.lambda "_" $ Phantoms.string "failure")
-    (Phantoms.lambda "cs" $ showConstraints (Phantoms.var "cs"))
-    (UnificationModule.joinTypes # LexicalModule.emptyContext # left # right # Phantoms.string "test"))
-  (Phantoms.string "failure")
-
--- ============================================================
--- variableOccursInType tests
--- ============================================================
-
-variableOccursInTypeTests :: TTerm TestGroup
-variableOccursInTypeTests = subgroup "variableOccursInType" [
-  -- Variable occurs in itself
-  variableOccursCase "variable occurs in itself"
-    (nm "a")
-    (T.var "a")
-    Phantoms.true,
-
-  -- Variable does not occur in different variable
-  variableOccursCase "variable does not occur in different variable"
-    (nm "a")
-    (T.var "b")
-    Phantoms.false,
-
-  -- Variable does not occur in primitive type
-  variableOccursCase "variable does not occur in int32"
-    (nm "a")
-    T.int32
-    Phantoms.false,
-
-  variableOccursCase "variable does not occur in string"
-    (nm "a")
-    T.string
-    Phantoms.false,
-
-  -- Variable occurs in list type
-  variableOccursCase "variable occurs in list element type"
-    (nm "a")
-    (T.list (T.var "a"))
-    Phantoms.true,
-
-  variableOccursCase "variable does not occur in list of different type"
-    (nm "a")
-    (T.list (T.var "b"))
-    Phantoms.false,
-
-  -- Variable occurs in function type
-  variableOccursCase "variable occurs in function domain"
-    (nm "a")
-    (T.function (T.var "a") T.int32)
-    Phantoms.true,
-
-  variableOccursCase "variable occurs in function codomain"
-    (nm "a")
-    (T.function T.int32 (T.var "a"))
-    Phantoms.true,
-
-  variableOccursCase "variable does not occur in function with different vars"
-    (nm "a")
-    (T.function (T.var "b") (T.var "c"))
-    Phantoms.false,
-
-  -- Variable occurs in optional type
-  variableOccursCase "variable occurs in optional type"
-    (nm "a")
-    (T.optional (T.var "a"))
-    Phantoms.true,
-
-  -- Variable occurs in pair type
-  variableOccursCase "variable occurs in pair first"
-    (nm "a")
-    (T.pair (T.var "a") T.int32)
-    Phantoms.true,
-
-  variableOccursCase "variable occurs in pair second"
-    (nm "a")
-    (T.pair T.int32 (T.var "a"))
-    Phantoms.true,
-
-  -- Variable occurs in either type
-  variableOccursCase "variable occurs in either left"
-    (nm "a")
-    (T.either_ (T.var "a") T.int32)
-    Phantoms.true,
-
-  variableOccursCase "variable occurs in either right"
-    (nm "a")
-    (T.either_ T.int32 (T.var "a"))
-    Phantoms.true,
-
-  -- Variable occurs in map type
-  variableOccursCase "variable occurs in map key type"
-    (nm "a")
-    (T.map (T.var "a") T.int32)
-    Phantoms.true,
-
-  variableOccursCase "variable occurs in map value type"
-    (nm "a")
-    (T.map T.string (T.var "a"))
-    Phantoms.true,
-
-  -- Variable occurs in set type
-  variableOccursCase "variable occurs in set type"
-    (nm "a")
-    (T.set (T.var "a"))
-    Phantoms.true,
-
-  -- Nested structures
-  variableOccursCase "variable occurs in nested list"
-    (nm "a")
-    (T.list (T.list (T.var "a")))
-    Phantoms.true,
-
-  variableOccursCase "variable occurs in list of functions"
-    (nm "a")
-    (T.list (T.function T.int32 (T.var "a")))
-    Phantoms.true,
-
-  variableOccursCase "variable does not occur in complex type without it"
-    (nm "a")
-    (T.function (T.list T.int32) (T.optional (T.pair T.string (T.var "b"))))
-    Phantoms.false,
-
-  variableOccursCase "variable occurs deep in complex type"
-    (nm "a")
-    (T.function (T.list T.int32) (T.optional (T.pair T.string (T.var "a"))))
-    Phantoms.true,
-
-  -- Forall types (note: no distinction between free and bound)
-  variableOccursCase "variable occurs in forAll body"
-    (nm "a")
-    (T.forAll "b" (T.function (T.var "b") (T.var "a")))
-    Phantoms.true,
-
-  variableOccursCase "variable occurs in forAll bound position"
-    (nm "a")
-    (T.forAll "a" (T.function (T.var "a") (T.var "a")))
-    Phantoms.true]
-
--- ============================================================
--- unifyTypes tests
--- ============================================================
-
--- Helper: empty schema types list
-noSchema :: TTerm [Name]
-noSchema = Phantoms.list ([] :: [TTerm Name])
-
--- Helper: empty substitution (success with no bindings)
-emptySubst :: [(TTerm Name, TTerm Type)]
-emptySubst = []
-
-unifyTypesTests :: TTerm TestGroup
-unifyTypesTests = subgroup "unifyTypes" [
-  -- Identical types unify with empty substitution
-  unifyTypesCase "unify identical int32 types"
-    noSchema
-    T.int32
-    T.int32
-    emptySubst,
-
-  unifyTypesCase "unify identical string types"
-    noSchema
-    T.string
-    T.string
-    emptySubst,
-
-  unifyTypesCase "unify identical variable types"
-    noSchema
-    (T.var "a")
-    (T.var "a")
-    emptySubst,
-
-  -- Variable unifies with concrete type
-  unifyTypesCase "unify variable with int32"
-    noSchema
-    (T.var "a")
-    T.int32
-    [(nm "a", T.int32)],
-
-  unifyTypesCase "unify int32 with variable"
-    noSchema
-    T.int32
-    (T.var "a")
-    [(nm "a", T.int32)],
-
-  -- Variable unifies with variable (binding one to the other)
-  unifyTypesCase "unify two different variables"
-    noSchema
-    (T.var "a")
-    (T.var "b")
-    [(nm "a", T.var "b")],
-
-  -- List types unify element types
-  unifyTypesCase "unify list of variables with list of int32"
-    noSchema
-    (T.list (T.var "a"))
-    (T.list T.int32)
-    [(nm "a", T.int32)],
-
-  unifyTypesCase "unify identical list types"
-    noSchema
-    (T.list T.string)
-    (T.list T.string)
-    emptySubst,
-
-  -- Function types unify domains and codomains
-  unifyTypesCase "unify function types with variables"
-    noSchema
-    (T.function (T.var "a") (T.var "b"))
-    (T.function T.int32 T.string)
-    [(nm "a", T.int32), (nm "b", T.string)],
-
-  unifyTypesCase "unify identical function types"
-    noSchema
-    (T.function T.int32 T.string)
-    (T.function T.int32 T.string)
-    emptySubst,
-
-  -- Optional types
-  unifyTypesCase "unify optional types"
-    noSchema
-    (T.optional (T.var "a"))
-    (T.optional T.int32)
-    [(nm "a", T.int32)],
-
-  -- Pair types
-  unifyTypesCase "unify pair types"
-    noSchema
-    (T.pair (T.var "a") (T.var "b"))
-    (T.pair T.int32 T.string)
-    [(nm "a", T.int32), (nm "b", T.string)],
-
-  -- Either types
-  unifyTypesCase "unify either types"
-    noSchema
-    (T.either_ (T.var "a") (T.var "b"))
-    (T.either_ T.int32 T.string)
-    [(nm "a", T.int32), (nm "b", T.string)],
-
-  -- Map types
-  unifyTypesCase "unify map types"
-    noSchema
-    (T.map (T.var "k") (T.var "v"))
-    (T.map T.string T.int32)
-    [(nm "k", T.string), (nm "v", T.int32)],
-
-  -- Set types
-  unifyTypesCase "unify set types"
-    noSchema
-    (T.set (T.var "a"))
-    (T.set T.int32)
-    [(nm "a", T.int32)],
-
-  -- Unit types
-  unifyTypesCase "unify unit types"
-    noSchema
-    T.unit
-    T.unit
-    emptySubst,
-
-  -- Failure cases
-  unifyTypesFailCase "fail to unify int32 with string"
-    noSchema
-    T.int32
-    T.string
-    "cannot unify",
-
-  unifyTypesFailCase "fail to unify list with function"
-    noSchema
-    (T.list T.int32)
-    (T.function T.int32 T.int32)
-    "cannot unify",
-
-  -- Occur check failure
-  unifyTypesFailCase "occur check: variable with list containing it"
-    noSchema
-    (T.var "a")
-    (T.list (T.var "a"))
-    "appears free"]
-
--- ============================================================
--- joinTypes tests
--- ============================================================
-
--- Helper to create type constraints
-constraint :: TTerm Type -> TTerm Type -> TTerm TypeConstraint
-constraint left right = Phantoms.record _TypeConstraint [
-  Phantoms.field _TypeConstraint_left left,
-  Phantoms.field _TypeConstraint_right right,
-  Phantoms.field _TypeConstraint_comment (Phantoms.string "join types; test")]
-
--- Helper for empty constraint list
-noConstraints :: TTerm [TypeConstraint]
-noConstraints = Phantoms.list ([] :: [TTerm TypeConstraint])
-
-joinTypesTests :: TTerm TestGroup
-joinTypesTests = subgroup "joinTypes" [
-  -- Identical primitive types produce no constraints
-  joinTypesCase "join identical int32"
-    T.int32
-    T.int32
-    noConstraints,
-
-  joinTypesCase "join identical string"
-    T.string
-    T.string
-    noConstraints,
-
-  -- Note: joinTypes doesn't handle type variables directly - those are handled by unifyTypeConstraints.
-  -- Testing variable joining with joinTypes would fail because it's not the right level of abstraction.
-
-  -- List types produce constraint on element types
-  joinTypesCase "join list types"
-    (T.list (T.var "a"))
-    (T.list T.int32)
-    (Phantoms.list [constraint (T.var "a") T.int32]),
-
-  -- Function types produce constraints on domain and codomain
-  joinTypesCase "join function types"
-    (T.function (T.var "a") (T.var "b"))
-    (T.function T.int32 T.string)
-    (Phantoms.list [constraint (T.var "a") T.int32, constraint (T.var "b") T.string]),
-
-  -- Optional types
-  joinTypesCase "join optional types"
-    (T.optional (T.var "a"))
-    (T.optional T.int32)
-    (Phantoms.list [constraint (T.var "a") T.int32]),
-
-  -- Pair types
-  joinTypesCase "join pair types"
-    (T.pair (T.var "a") (T.var "b"))
-    (T.pair T.int32 T.string)
-    (Phantoms.list [constraint (T.var "a") T.int32, constraint (T.var "b") T.string]),
-
-  -- Either types
-  joinTypesCase "join either types"
-    (T.either_ (T.var "a") (T.var "b"))
-    (T.either_ T.int32 T.string)
-    (Phantoms.list [constraint (T.var "a") T.int32, constraint (T.var "b") T.string]),
-
-  -- Map types
-  joinTypesCase "join map types"
-    (T.map (T.var "k") (T.var "v"))
-    (T.map T.string T.int32)
-    (Phantoms.list [constraint (T.var "k") T.string, constraint (T.var "v") T.int32]),
-
-  -- Set types
-  joinTypesCase "join set types"
-    (T.set (T.var "a"))
-    (T.set T.int32)
-    (Phantoms.list [constraint (T.var "a") T.int32]),
-
-  -- Unit types
-  joinTypesCase "join unit types"
-    T.unit
-    T.unit
-    noConstraints,
-
-  -- Failure cases
-  joinTypesFailCase "fail to join int32 with string"
-    T.int32
-    T.string,
-
-  joinTypesFailCase "fail to join list with function"
-    (T.list T.int32)
-    (T.function T.int32 T.int32),
-
-  joinTypesFailCase "fail to join pair with either"
-    (T.pair T.int32 T.string)
-    (T.either_ T.int32 T.string)]
-
--- ============================================================
--- All tests
--- ============================================================
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for type unification operations" $
-    supergroup "unification" [
-      variableOccursInTypeTests,
-      unifyTypesTests,
-      joinTypesTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Utils.hs b/src/main/haskell/Hydra/Sources/Test/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Utils.hs
+++ /dev/null
@@ -1,152 +0,0 @@
--- | Shared utility functions for test code generation codecs.
--- These functions handle type inference on test group terms and are used by
--- both the Java and Python test codec modules.
-
-module Hydra.Sources.Test.Utils where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                  as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                     as Error
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Rewriting      as Rewriting
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Errors    as ShowError
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants      as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.utils"
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Inference.ns, ShowError.ns, Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Shared utility functions for test code generation codecs"}
-  where
-    definitions = [
-      toDefinition inferTestGroupTerms,
-      toDefinition inferTestCase,
-      toDefinition inferTerm]
-
-
--- | Run type inference on all terms in a TestGroup
-inferTestGroupTerms :: TTermDefinition (Graph -> TestGroup -> Either String TestGroup)
-inferTestGroupTerms = define "inferTestGroupTerms" $
-  doc "Run type inference on all terms in a TestGroup to ensure lambdas have domain types" $
-  lambda "g" $ lambda "tg" $ lets [
-    "name_">: project _TestGroup _TestGroup_name @@ var "tg",
-    "desc">: project _TestGroup _TestGroup_description @@ var "tg",
-    "subgroups">: project _TestGroup _TestGroup_subgroups @@ var "tg",
-    "cases_">: project _TestGroup _TestGroup_cases @@ var "tg"] $
-    Eithers.bind
-      (Eithers.mapList (lambda "sg" $ inferTestGroupTerms @@ var "g" @@ var "sg") (var "subgroups"))
-      (lambda "inferredSubgroups" $
-        Eithers.map
-          (lambda "inferredCases" $
-            Testing.testGroup (var "name_") (var "desc") (var "inferredSubgroups") (var "inferredCases"))
-          (Eithers.mapList (lambda "tc" $ inferTestCase @@ var "g" @@ var "tc") (var "cases_")))
-
-
--- | Run type inference on the terms in a test case
-inferTestCase :: TTermDefinition (Graph -> TestCaseWithMetadata -> Either String TestCaseWithMetadata)
-inferTestCase = define "inferTestCase" $
-  doc "Run type inference on the terms in a test case" $
-  lambda "g" $ lambda "tcm" $ lets [
-    "name_">: project _TestCaseWithMetadata _TestCaseWithMetadata_name @@ var "tcm",
-    "tcase">: project _TestCaseWithMetadata _TestCaseWithMetadata_case @@ var "tcm",
-    "desc">: project _TestCaseWithMetadata _TestCaseWithMetadata_description @@ var "tcm",
-    "tags_">: project _TestCaseWithMetadata _TestCaseWithMetadata_tags @@ var "tcm"] $
-    Eithers.map
-      (lambda "inferredCase" $
-        Testing.testCaseWithMetadata (var "name_") (var "inferredCase") (var "desc") (var "tags_"))
-      (Phantoms.right (var "tcase"))
-
-
--- | Run type inference on a single term
-inferTerm :: TTermDefinition (Graph -> Term -> Either String Term)
-inferTerm = define "inferTerm" $
-  doc "Run type inference on a single term" $
-  lambda "g" $ lambda "term" $
-    Eithers.bimap
-      ("e" ~> ShowError.error_ @@ var "e")
-      ("x" ~> Typing.inferenceResultTerm (var "x"))
-      (Inference.inferInGraphContext @@ asTerm Lexical.emptyContext @@ var "g" @@ var "term")
diff --git a/src/main/haskell/Hydra/Sources/Test/Validate/All.hs b/src/main/haskell/Hydra/Sources/Test/Validate/All.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Validate/All.hs
+++ /dev/null
@@ -1,38 +0,0 @@
-
-module Hydra.Sources.Test.Validate.All where
-
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing as Testing
-import Hydra.Sources.Kernel.Types.All
-import Hydra.Dsl.Meta.Phantoms as Phantoms
-import qualified Hydra.Dsl.Meta.Core as Core
-import qualified Hydra.Dsl.Meta.Types as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List as L
-import qualified Data.Map  as M
-
-import qualified Hydra.Sources.Test.Validate.Core as ValidateCore
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.validate.all"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = namespaces,
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = Just "Hydra's validation test suite"}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-    namespaces = [ValidateCore.ns]
-
-allTests :: TTermDefinition TestGroup
-allTests = definitionInModule module_ "allTests" $
-    doc "The group of all validation tests" $
-    Testing.testGroup (string "validation") nothing (list subgroups) (list ([] :: [TTerm TestCaseWithMetadata]))
-  where
-    subgroups = [ValidateCore.allTests]
diff --git a/src/main/haskell/Hydra/Sources/Test/Validate/Core.hs b/src/main/haskell/Hydra/Sources/Test/Validate/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Validate/Core.hs
+++ /dev/null
@@ -1,448 +0,0 @@
-
--- | Test cases for core term and type validation
-module Hydra.Sources.Test.Validate.Core where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.validate.core"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Namespace "hydra.validate.core", Namespace "hydra.show.error.core"],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for core term and type validation")}
-  where
-    definitions = [
-      Phantoms.toDefinition allTests,
-      Phantoms.toDefinition duplicateBindingsTests,
-      Phantoms.toDefinition duplicateFieldsTests,
-      Phantoms.toDefinition emptyLetBindingsTests,
-      Phantoms.toDefinition identityApplicationTests,
-      Phantoms.toDefinition variableShadowingTests]
-      -- Commented out pending test gen fixes (raw constructors / unresolvable names):
-      -- annotationTests, selfApplicationTests, emptyCaseStatementTests,
-      -- emptyTypeNameTests, namingConventionTests
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- ============================================================================
--- Helpers
--- ============================================================================
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- No error expected
-noError :: TTerm (Maybe InvalidTermError)
-noError = TTerm $ TermMaybe Nothing
-
--- Typed just for InvalidTermError
-justError :: TTerm InvalidTermError -> TTerm (Maybe InvalidTermError)
-justError (TTerm t) = TTerm $ TermMaybe $ Just t
-
--- Shorthand for untyped term test case
-untypedCase :: String -> TTerm Term -> TTerm (Maybe InvalidTermError) -> TTerm TestCaseWithMetadata
-untypedCase name = validateCoreTermCase name (Phantoms.boolean False)
-
--- Empty accessor path
-emptyPath :: TTerm SubtermPath
-emptyPath = Phantoms.wrap _SubtermPath (Phantoms.list ([] :: [TTerm SubtermStep]))
-
--- Error constructors
-
-dupBinding :: [TTerm SubtermStep] -> String -> TTerm (Maybe InvalidTermError)
-dupBinding path name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_duplicateBinding $
-    Phantoms.record _DuplicateBindingError [
-      unName _DuplicateBindingError_location Phantoms.>: Phantoms.wrap _SubtermPath (Phantoms.list path),
-      unName _DuplicateBindingError_name Phantoms.>: nm name]
-
-dupField :: [TTerm SubtermStep] -> String -> TTerm (Maybe InvalidTermError)
-dupField path name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_duplicateField $
-    Phantoms.record _DuplicateFieldError [
-      unName _DuplicateFieldError_location Phantoms.>: Phantoms.wrap _SubtermPath (Phantoms.list path),
-      unName _DuplicateFieldError_name Phantoms.>: nm name]
-
-emptyLetErr :: TTerm (Maybe InvalidTermError)
-emptyLetErr = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_emptyLetBindings $
-    Phantoms.record _EmptyLetBindingsError [
-      unName _EmptyLetBindingsError_location Phantoms.>: emptyPath]
-
-emptyTypeNameErr :: TTerm (Maybe InvalidTermError)
-emptyTypeNameErr = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_emptyTypeNameInTerm $
-    Phantoms.record _EmptyTypeNameInTermError [
-      unName _EmptyTypeNameInTermError_location Phantoms.>: emptyPath]
-
-emptyCaseErr :: String -> TTerm (Maybe InvalidTermError)
-emptyCaseErr tname = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_emptyCaseStatement $
-    Phantoms.record _EmptyCaseStatementError [
-      unName _EmptyCaseStatementError_location Phantoms.>: emptyPath,
-      unName _EmptyCaseStatementError_typeName Phantoms.>: nm tname]
-
-nestedAnnotErr :: TTerm (Maybe InvalidTermError)
-nestedAnnotErr = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_nestedTermAnnotation $
-    Phantoms.record _NestedTermAnnotationError [
-      unName _NestedTermAnnotationError_location Phantoms.>: emptyPath]
-
-emptyAnnotErr :: TTerm (Maybe InvalidTermError)
-emptyAnnotErr = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_emptyTermAnnotation $
-    Phantoms.record _EmptyTermAnnotationError [
-      unName _EmptyTermAnnotationError_location Phantoms.>: emptyPath]
-
-unknownPrimErr :: String -> TTerm (Maybe InvalidTermError)
-unknownPrimErr name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_unknownPrimitiveName $
-    Phantoms.record _UnknownPrimitiveNameError [
-      unName _UnknownPrimitiveNameError_location Phantoms.>: emptyPath,
-      unName _UnknownPrimitiveNameError_name Phantoms.>: nm name]
-
-selfAppErr :: String -> TTerm (Maybe InvalidTermError)
-selfAppErr name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_selfApplication $
-    Phantoms.record _SelfApplicationError [
-      unName _SelfApplicationError_location Phantoms.>: emptyPath,
-      unName _SelfApplicationError_name Phantoms.>: nm name]
-
-identityAppErr :: TTerm (Maybe InvalidTermError)
-identityAppErr = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_unnecessaryIdentityApplication $
-    Phantoms.record _UnnecessaryIdentityApplicationError [
-      unName _UnnecessaryIdentityApplicationError_location Phantoms.>: emptyPath]
-
-redundantWrapErr :: String -> TTerm (Maybe InvalidTermError)
-redundantWrapErr tname = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_redundantWrapUnwrap $
-    Phantoms.record _RedundantWrapUnwrapError [
-      unName _RedundantWrapUnwrapError_location Phantoms.>: emptyPath,
-      unName _RedundantWrapUnwrapError_typeName Phantoms.>: nm tname]
-
-shadowErr :: String -> TTerm (Maybe InvalidTermError)
-shadowErr name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_termVariableShadowing $
-    Phantoms.record _TermVariableShadowingError [
-      unName _TermVariableShadowingError_location Phantoms.>: emptyPath,
-      unName _TermVariableShadowingError_name Phantoms.>: nm name]
-
-invalidNameErr :: String -> TTerm (Maybe InvalidTermError)
-invalidNameErr name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_invalidLambdaParameterName $
-    Phantoms.record _InvalidLambdaParameterNameError [
-      unName _InvalidLambdaParameterNameError_location Phantoms.>: emptyPath,
-      unName _InvalidLambdaParameterNameError_name Phantoms.>: nm name]
-
-invalidLetNameErr :: String -> TTerm (Maybe InvalidTermError)
-invalidLetNameErr name = justError $
-  Phantoms.inject _InvalidTermError _InvalidTermError_invalidLetBindingName $
-    Phantoms.record _InvalidLetBindingNameError [
-      unName _InvalidLetBindingNameError_location Phantoms.>: emptyPath,
-      unName _InvalidLetBindingNameError_name Phantoms.>: nm name]
-
--- SubtermStep helpers
-accLambdaBody :: TTerm SubtermStep
-accLambdaBody = Phantoms.inject _SubtermStep _SubtermStep_lambdaBody Phantoms.unit
-
-accLetBody :: TTerm SubtermStep
-accLetBody = Phantoms.inject _SubtermStep _SubtermStep_letBody Phantoms.unit
-
-accLetBinding :: String -> TTerm SubtermStep
-accLetBinding name = Phantoms.inject _SubtermStep _SubtermStep_letBinding (nm name)
-
--- Term construction helpers
-
--- DSL-based term construction helpers (raw Haskell constructors break test generation)
-
--- | Construct an annotated term with a single annotation
-annotateTerm :: TTerm Term -> String -> TTerm Term -> TTerm Term
-annotateTerm body key val = Phantoms.annot (Name key) Nothing body
-
--- | Construct a wrap term
-wrapTerm :: String -> TTerm Term -> TTerm Term
-wrapTerm tname = Phantoms.wrap (Name tname)
-
--- | Coerce a phantom-typed term to TTerm Term
-toTermTerm :: TTerm a -> TTerm Term
-toTermTerm (TTerm t) = TTerm t
-
--- | Construct an unwrap elimination applied to a term
-unwrapApply :: String -> TTerm Term -> TTerm Term
-unwrapApply tname (TTerm arg) = TTerm $ TermApplication $ Application
-  (TermUnwrap (Name tname)) arg
-
--- | Construct a primitive function reference
-primRef :: String -> TTerm Term
-primRef name = toTermTerm $ Phantoms.primitive (Name name)
-
--- | Construct a projection
-projTerm :: String -> String -> TTerm Term
-projTerm tname fname = toTermTerm $ Phantoms.project (Name tname) (Name fname)
-
--- ============================================================================
--- Test groups
--- ============================================================================
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-  Phantoms.doc "Test cases for core term and type validation" $
-  supergroup "validate.core" [
-    duplicateBindingsTests,
-    duplicateFieldsTests,
-    emptyLetBindingsTests,
-    -- annotationTests,            -- needs raw TermAnnotated constructor (no DSL equivalent for empty annotations)
-    -- unknownPrimitiveTests,      -- primitive refs cause type unification with Term
-    -- selfApplicationTests,       -- needs unbound variables
-    identityApplicationTests,
-    -- redundantWrapUnwrapTests,   -- uses unresolvable type names TypeA/TypeB/MyType
-    variableShadowingTests]
-    -- emptyCaseStatementTests,    -- needs unresolvable type name "MyUnion"
-    -- emptyTypeNameTests,         -- needs empty string type names
-    -- namingConventionTests       -- needs raw Lambda constructor for empty name
-
--- ============================================================================
--- T2: Duplicate bindings
--- ============================================================================
-
-duplicateBindingsTests :: TTermDefinition TestGroup
-duplicateBindingsTests = define "duplicateBindingsTests" $
-  subgroup "duplicate bindings" [
-    untypedCase "no bindings (literal)"
-      (int32 42) noError,
-    untypedCase "single binding"
-      (lets [(nm "x", int32 1)] (var "x")) noError,
-    untypedCase "distinct bindings"
-      (lets [(nm "x", int32 1), (nm "y", int32 2)] (var "x")) noError,
-    untypedCase "duplicate bindings at top level"
-      (lets [(nm "x", int32 1), (nm "x", int32 2)] (var "x"))
-      (dupBinding [] "x"),
-    untypedCase "duplicate bindings in lambda body"
-      (lambda "f" (lets [(nm "a", int32 1), (nm "a", int32 2)] (var "a")))
-      (dupBinding [accLambdaBody] "a"),
-    untypedCase "duplicate bindings in let body"
-      (lets [(nm "x", int32 1)]
-        (lets [(nm "y", int32 2), (nm "y", int32 3)] (var "y")))
-      (dupBinding [accLetBody] "y"),
-    untypedCase "duplicate bindings in let binding value"
-      (lets [(nm "x", lets [(nm "a", int32 1), (nm "a", int32 2)] (var "a"))] (var "x"))
-      (dupBinding [accLetBinding "x"] "a"),
-    untypedCase "same name in different scopes is valid"
-      (lets [(nm "x", int32 1)]
-        (lets [(nm "x", int32 2)] (var "x")))
-      noError]
-
--- ============================================================================
--- T3/T4: Duplicate fields
--- ============================================================================
-
-duplicateFieldsTests :: TTermDefinition TestGroup
-duplicateFieldsTests = define "duplicateFieldsTests" $
-  subgroup "duplicate fields" [
-    untypedCase "no fields (literal)"
-      (int32 42) noError,
-    untypedCase "distinct record fields"
-      (record (nm "Point") [(nm "x", int32 1), (nm "y", int32 2)]) noError,
-    untypedCase "duplicate record fields at top level"
-      (record (nm "Point") [(nm "x", int32 1), (nm "x", int32 2)])
-      (dupField [] "x"),
-    untypedCase "duplicate fields in record inside lambda"
-      (lambda "f"
-        (record (nm "Point") [(nm "x", int32 1), (nm "x", int32 2)]))
-      (dupField [accLambdaBody] "x"),
-    untypedCase "duplicate fields in record inside let body"
-      (lets [(nm "r", int32 0)]
-        (record (nm "Point") [(nm "x", int32 1), (nm "x", int32 2)]))
-      (dupField [accLetBody] "x")]
-
--- ============================================================================
--- T1: Empty let bindings
--- ============================================================================
-
-emptyLetBindingsTests :: TTermDefinition TestGroup
-emptyLetBindingsTests = define "emptyLetBindingsTests" $
-  subgroup "empty let bindings" [
-    untypedCase "let with bindings is valid"
-      (lets [(nm "x", int32 1)] (var "x")) noError,
-    -- Raw Term constructors cause test gen failures; use DSL helpers instead
-    untypedCase "empty let bindings"
-      (lets [] (int32 0))
-      emptyLetErr]
-
--- ============================================================================
--- T5: Empty type name
--- ============================================================================
-
-{- emptyTypeNameTests :: TTermDefinition TestGroup
-emptyTypeNameTests = define "emptyTypeNameTests" $
-  subgroup "empty type name" [
-    untypedCase "record with valid type name"
-      (record (nm "Point") [(nm "x", int32 1)]) noError,
-    untypedCase "record with empty type name"
-      (record (nm "") [(nm "x", int32 1)])
-      emptyTypeNameErr,
-    untypedCase "injection with empty type name"
-      (TTerm $ TermInject $ Injection (Name "") (Field (Name "x") (TermLiteral $ LiteralInteger $ IntegerValueInt32 1)))
-      emptyTypeNameErr,
-    untypedCase "projection with empty type name"
-      (projTerm "" "x")
-      emptyTypeNameErr,
-    untypedCase "wrap with empty type name"
-      (wrapTerm "" (int32 1))
-      emptyTypeNameErr]
--}
-
--- ============================================================================
--- T6: Empty case statement
--- ============================================================================
-
-{- emptyCaseStatementTests :: TTermDefinition TestGroup
-emptyCaseStatementTests = define "emptyCaseStatementTests" $
-  subgroup "empty case statement" [
-    untypedCase "case with branches is valid"
-      (caseTerm "MyUnion" Nothing [("x", int32 1)])
-      noError,
-    untypedCase "case with default only is valid"
-      (caseTerm "MyUnion" (Just $ int32 0) [])
-      noError,
-    untypedCase "empty case with no default"
-      (caseTerm "MyUnion" Nothing [])
-      (emptyCaseErr "MyUnion")]
--}
-
--- ============================================================================
--- T20/T21: Annotations
--- ============================================================================
-
-{- annotationTests :: TTermDefinition TestGroup
-annotationTests = define "annotationTests" $
-  subgroup "annotations" [
-    untypedCase "annotated term is valid"
-      (annotateTerm (int32 42) "key" (string "value"))
-      noError,
-    untypedCase "empty annotation"
-      (emptyAnnotation (int32 42))
-      emptyAnnotErr,
-    untypedCase "nested annotations"
-      (annotateTerm (emptyAnnotation (int32 42)) "key" (string "value"))
-      emptyAnnotErr]
--}
-
--- ============================================================================
--- T22: Unknown primitive
--- ============================================================================
-
-unknownPrimitiveTests :: TTermDefinition TestGroup
-unknownPrimitiveTests = define "unknownPrimitiveTests" $
-  subgroup "unknown primitive" [
-    untypedCase "known primitive is valid"
-      (primRef "hydra.lib.math.add")
-      noError,
-    untypedCase "unknown primitive"
-      (primRef "hydra.lib.nonexistent.foo")
-      (unknownPrimErr "hydra.lib.nonexistent.foo")]
-
--- ============================================================================
--- T15: Self-application
--- ============================================================================
-
-{- selfApplicationTests :: TTermDefinition TestGroup
-selfApplicationTests = define "selfApplicationTests" $
-  subgroup "self application" [
-    untypedCase "normal application is valid"
-      (app (var "f") (var "x"))
-      noError,
-    untypedCase "self-application"
-      (app (var "x") (var "x"))
-      (selfAppErr "x")]
--}
-
--- ============================================================================
--- T16: Identity application
--- ============================================================================
-
-identityApplicationTests :: TTermDefinition TestGroup
-identityApplicationTests = define "identityApplicationTests" $
-  subgroup "identity application" [
-    untypedCase "non-identity lambda application is valid"
-      (lambda "x" (int32 1) @@ int32 2)
-      noError,
-    untypedCase "identity lambda application"
-      (lambda "x" (var "x") @@ int32 42)
-      identityAppErr]
-
--- ============================================================================
--- T14: Redundant wrap/unwrap
--- ============================================================================
-
-redundantWrapUnwrapTests :: TTermDefinition TestGroup
-redundantWrapUnwrapTests = define "redundantWrapUnwrapTests" $
-  subgroup "redundant wrap unwrap" [
-    untypedCase "unwrap of different type is valid"
-      (unwrapApply "TypeA" (wrapTerm "TypeB" (int32 1)))
-      noError,
-    untypedCase "unwrap of same type wrap"
-      (unwrapApply "MyType" (wrapTerm "MyType" (int32 1)))
-      (redundantWrapErr "MyType")]
-
--- ============================================================================
--- T11: Variable shadowing
--- ============================================================================
-
-variableShadowingTests :: TTermDefinition TestGroup
-variableShadowingTests = define "variableShadowingTests" $
-  subgroup "variable shadowing" [
-    untypedCase "lambda with fresh variable is valid"
-      (lambda "x" (var "x"))
-      noError,
-    -- Note: shadowing detection deferred; needs pre-extension graph access
-    untypedCase "lambda shadows outer lambda"
-      (lambda "x" (lambda "x" (var "x")))
-      noError,
-    untypedCase "let binding shadows lambda parameter"
-      (lambda "x" (lets [(nm "x", int32 1)] (var "x")))
-      noError]
-
--- ============================================================================
--- T17/T18: Naming conventions
--- ============================================================================
-
-{- namingConventionTests :: TTermDefinition TestGroup
-namingConventionTests = define "namingConventionTests" $
-  subgroup "naming conventions" [
-    untypedCase "lambda with valid name"
-      (lambda "x" (var "x"))
-      noError,
-    untypedCase "lambda with empty name"
-      (TTerm $ TermLambda $ Lambda (Name "") Nothing (TermVariable $ Name "x"))
-      (invalidNameErr ""),
-    untypedCase "let binding with valid name"
-      (lets [(nm "x", int32 1)] (var "x"))
-      noError,
-    untypedCase "let binding with empty name"
-      (TTerm $ TermLet $ Let [Binding (Name "") (TermLiteral $ LiteralInteger $ IntegerValueInt32 1) Nothing] (TermVariable $ Name "x"))
-      (invalidLetNameErr "")]
--}
diff --git a/src/main/haskell/Hydra/Sources/Test/Variables.hs b/src/main/haskell/Hydra/Sources/Test/Variables.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Test/Variables.hs
+++ /dev/null
@@ -1,495 +0,0 @@
-{-# LANGUAGE FlexibleContexts #-}
-
--- | Test cases for variable analysis and manipulation (free variables, unshadowing, normalization)
-module Hydra.Sources.Test.Variables where
-
--- Standard imports for shallow DSL tests
-import Hydra.Kernel
-import Hydra.Dsl.Meta.Testing                 as Testing
-import Hydra.Dsl.Meta.Terms                   as Terms
-import Hydra.Sources.Kernel.Types.All
-import qualified Hydra.Dsl.Meta.Core          as Core
-import qualified Hydra.Dsl.Meta.Phantoms      as Phantoms
-import qualified Hydra.Dsl.Meta.Types         as T
-import qualified Hydra.Sources.Test.TestGraph as TestGraph
-import qualified Hydra.Sources.Test.TestTerms as TestTerms
-import qualified Hydra.Sources.Test.TestTypes as TestTypes
-import qualified Data.List                    as L
-import qualified Data.Map                     as M
-
-import Hydra.Testing
-import Hydra.Sources.Libraries
-
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Variables as VariablesModule
-import qualified Hydra.Dsl.Meta.Lib.Sets as Sets
-import qualified Hydra.Dsl.Meta.Lib.Lists as Lists
-import qualified Hydra.Dsl.Meta.Lib.Strings as Strings
-
-import qualified Data.Set                     as S
-
-
-ns :: Namespace
-ns = Namespace "hydra.test.variables"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [ShowCore.ns, VariablesModule.ns, TestGraph.ns],
-            moduleTypeDependencies = kernelTypesNamespaces,
-            moduleDescription = (Just "Test cases for variable analysis and manipulation")}
-  where
-    definitions = [Phantoms.toDefinition allTests]
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
--- Local alias for polymorphic application (Phantoms.@@ applies TBindings; Terms.@@ only works on TTerm Term)
-(#) :: (AsTerm f (a -> b), AsTerm g a) => f -> g -> TTerm b
-(#) = (Phantoms.@@)
-infixl 1 #
-
--- Field constructor for cases/match (uses Phantoms.>>: to create Field, since the unqualified >>: from Testing creates tuples)
-(~>:) :: AsTerm t a => Name -> t -> Field
-(~>:) = (Phantoms.>>:)
-infixr 0 ~>:
-
--- | Show a term as a string using ShowCore.term
-showTerm :: TTerm Term -> TTerm String
-showTerm t = ShowCore.term # t
-
--- | Show a set of names as a sorted, comma-separated string: "{name1, name2, ...}"
-showNameSet :: TTerm (S.Set Name) -> TTerm String
-showNameSet s = Strings.cat $ plist [
-  pstring "{",
-  Strings.intercalate (pstring ", ") (Lists.map (plambda "n" (Core.unName (pvar "n"))) (Sets.toList s)),
-  pstring "}"]
-  where
-    plist = Phantoms.list; pstring = Phantoms.string; plambda = Phantoms.lambda; pvar = Phantoms.var
-
--- | Helper for Term -> Term kernel function test cases
-termCase :: String -> TTermDefinition (Term -> Term) -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-termCase cname func input output = universalCase cname (showTerm (func # input)) (showTerm output)
-
--- Helper to build names
-nm :: String -> TTerm Name
-nm s = Core.name $ Phantoms.string s
-
--- Helper to build a set of Names
-nameSet :: [String] -> TTerm (S.Set Name)
-nameSet names = Phantoms.set $ (nm <$> names)
-
--- Helper for single-binding let
-letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
-letExpr varName value body = lets [(nm varName, value)] body
-
--- Helper for multi-binding let
-multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
-multiLet bindings body = lets ((\(n, v) -> (nm n, v)) <$> bindings) body
-
--- | Convenience helpers for specific kernel functions
-unshadowCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-unshadowCase cname = termCase cname VariablesModule.unshadowVariables
-
-normalizeTypeVarsCase :: String -> TTerm Term -> TTerm Term -> TTerm TestCaseWithMetadata
-normalizeTypeVarsCase cname = termCase cname VariablesModule.normalizeTypeVariablesInTerm
-
-freeVarsCase :: String -> TTerm Term -> TTerm (S.Set Name) -> TTerm TestCaseWithMetadata
-freeVarsCase cname input expected = universalCase cname
-  (showNameSet (VariablesModule.freeVariablesInTerm # input))
-  (showNameSet expected)
-
--- | Test cases for free variables computation
-freeVariablesGroup :: TTerm TestGroup
-freeVariablesGroup = subgroup "freeVariables" [
-    freeVarsCase "string literal has no free variables"
-      (string "foo")
-      (nameSet []),
-
-    freeVarsCase "single variable"
-      (var "x")
-      (nameSet ["x"]),
-
-    freeVarsCase "bound variable is not free"
-      (lambda "y" (var "y"))
-      (nameSet []),
-
-    freeVarsCase "unbound variable in lambda body"
-      (lambda "y" (var "x"))
-      (nameSet ["x"]),
-
-    freeVarsCase "mixed free and bound variables"
-      (list [
-        var "x",
-        apply (lambda "y" (var "y")) (int32 42)])
-      (nameSet ["x"]),
-
-    freeVarsCase "multiple free variables"
-      (list [
-        var "x",
-        apply (lambda "y" (var "y")) (var "y")])
-      (nameSet ["x", "y"])]
-
--- | Test cases for normalizing type variables in terms
--- The function normalizeTypeVariablesInTerm renames type variables to a canonical form (t0, t1, t2, etc.)
-normalizeTypeVariablesGroup :: TTerm TestGroup
-normalizeTypeVariablesGroup = subgroup "normalizeTypeVariables" [
-    -- No type variables - terms should remain unchanged
-    normalizeTypeVarsCase "literal without type variables unchanged"
-      (int32 42)
-      (int32 42),
-
-    normalizeTypeVarsCase "simple let without type annotations unchanged"
-      (letExpr "foo" (string "foo") (int32 42))
-      (letExpr "foo" (string "foo") (int32 42)),
-
-    normalizeTypeVarsCase "let with monomorphic type scheme unchanged"
-      (letsTyped [("foo", string "foo", T.mono T.string)] (int32 42))
-      (letsTyped [("foo", string "foo", T.mono T.string)] (int32 42)),
-
-    normalizeTypeVarsCase "let with monomorphic binding referencing string"
-      (letsTyped [("foo", string "foo", T.mono T.string)] (int32 42))
-      (letsTyped [("foo", string "foo", T.mono T.string)] (int32 42)),
-
-    -- Only free type variables - no normalization needed
-    normalizeTypeVarsCase "polymorphic binding with free type variable unchanged"
-      (letsTyped [("foo", var "bar", T.mono (T.var "a"))] (int32 42))
-      (letsTyped [("foo", var "bar", T.mono (T.var "a"))] (int32 42)),
-
-    normalizeTypeVarsCase "monomorphic binding with typed lambda unchanged"
-      (letsTyped [("foo", string "foo", T.mono T.string)]
-        (lambdaTyped "x" (T.function (T.var "a") T.int32) (int32 42)))
-      (letsTyped [("foo", string "foo", T.mono T.string)]
-        (lambdaTyped "x" (T.function (T.var "a") T.int32) (int32 42))),
-
-    normalizeTypeVarsCase "polymorphic binding with typed lambda in body unchanged"
-      (letsTyped [("foo", var "bar", T.mono (T.var "a"))]
-        (lambdaTyped "x" (T.function (T.var "a") T.int32) (int32 42)))
-      (letsTyped [("foo", var "bar", T.mono (T.var "a"))]
-        (lambdaTyped "x" (T.function (T.var "a") T.int32) (int32 42))),
-
-    -- Polymorphic let bindings should have type variables normalized
-    normalizeTypeVarsCase "polymorphic identity function normalized"
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-        (apply (var "id") (int32 42)))
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-        (apply (var "id") (int32 42))),
-
-    normalizeTypeVarsCase "polymorphic const function normalized"
-      (letsTyped [("const", lambda "x" (lambda "y" (var "x")),
-        T.poly ["a", "b"] (T.function (T.var "a") (T.function (T.var "b") (T.var "a"))))]
-        (apply (apply (var "const") (int32 42)) (string "foo")))
-      (letsTyped [("const", lambda "x" (lambda "y" (var "x")),
-        T.poly ["t0", "t1"] (T.function (T.var "t0") (T.function (T.var "t1") (T.var "t0"))))]
-        (apply (apply (var "const") (int32 42)) (string "foo"))),
-
-    -- Rewriting of bindings does not affect body (free variable in body coincides with bound variable in binding)
-    normalizeTypeVarsCase "binding rewriting does not affect body with typed lambda"
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-        (lambdaTyped "x" (T.function (T.var "a") T.int32) (int32 42)))
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-        (lambdaTyped "x" (T.function (T.var "a") T.int32) (int32 42))),
-
-    -- Nested polymorphic let bindings - each type scheme is normalized independently
-    normalizeTypeVarsCase "nested polymorphic lets normalized"
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-        (letsTyped [("id2", lambda "y" (var "y"),
-          T.poly ["b"] (T.function (T.var "b") (T.var "b")))]
-          (apply (var "id") (apply (var "id2") (int32 42)))))
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-        (letsTyped [("id2", lambda "y" (var "y"),
-          T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-          (apply (var "id") (apply (var "id2") (int32 42))))),
-
-    normalizeTypeVarsCase "nested same substitution in bindings and environment"
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-        (letsTyped [("id2", lambda "x" (var "x"),
-          T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-          (apply (var "id") (int32 42))))
-      (letsTyped [("id", lambda "x" (var "x"),
-        T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-        (letsTyped [("id2", lambda "x" (var "x"),
-          T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-          (apply (var "id") (int32 42)))),
-
-    -- Parent variable shadows child variable in nested lets with typed lambdas
-    normalizeTypeVarsCase "parent type variable shadows child variable"
-      (letsTyped [("id",
-        letsTyped [("id2",
-          lambdaTyped "x" (T.var "a") (var "x"),
-          T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-          (lambdaTyped "y" (T.var "a") (apply (var "id2") (var "y"))),
-        T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-        (apply (var "id") (int32 42)))
-      (letsTyped [("id",
-        letsTyped [("id2",
-          lambdaTyped "x" (T.var "t1") (var "x"),
-          T.poly ["t1"] (T.function (T.var "t1") (T.var "t1")))]
-          (lambdaTyped "y" (T.var "t0") (apply (var "id2") (var "y"))),
-        T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-        (apply (var "id") (int32 42))),
-
-    -- No shadowing: distinct type variable names in nested lets
-    normalizeTypeVarsCase "no shadowing distinct type variables"
-      (letsTyped [("id",
-        letsTyped [("id2",
-          lambdaTyped "x" (T.var "b") (var "x"),
-          T.poly ["b"] (T.function (T.var "b") (T.var "b")))]
-          (lambdaTyped "y" (T.var "a") (apply (var "id2") (var "y"))),
-        T.poly ["a"] (T.function (T.var "a") (T.var "a")))]
-        (apply (var "id") (int32 42)))
-      (letsTyped [("id",
-        letsTyped [("id2",
-          lambdaTyped "x" (T.var "t1") (var "x"),
-          T.poly ["t1"] (T.function (T.var "t1") (T.var "t1")))]
-          (lambdaTyped "y" (T.var "t0") (apply (var "id2") (var "y"))),
-        T.poly ["t0"] (T.function (T.var "t0") (T.var "t0")))]
-        (apply (var "id") (int32 42))),
-
-    -- Complex: locally free type variable in nested binding
-    normalizeTypeVarsCase "locally free type variable in nested binding"
-      (letsTyped [("fun1",
-        lambdaTyped "x" (T.var "a") (lambdaTyped "y" (T.var "b")
-          (letsTyped [("fun2",
-            lambdaTyped "z" (T.var "c") (pair (var "z") (var "y")),
-            T.poly ["c"] (T.function (T.var "c") (T.pair (T.var "c") (T.var "b"))))]
-            (apply (var "fun2") (var "x")))),
-        T.poly ["a", "b"] (T.function (T.var "a") (T.function (T.var "b") (T.pair (T.var "a") (T.var "b")))))]
-        (apply (apply (var "fun1") (string "foo")) (int32 42)))
-      (letsTyped [("fun1",
-        lambdaTyped "x" (T.var "t0") (lambdaTyped "y" (T.var "t1")
-          (letsTyped [("fun2",
-            lambdaTyped "z" (T.var "t2") (pair (var "z") (var "y")),
-            T.poly ["t2"] (T.function (T.var "t2") (T.pair (T.var "t2") (T.var "t1"))))]
-            (apply (var "fun2") (var "x")))),
-        T.poly ["t0", "t1"] (T.function (T.var "t0") (T.function (T.var "t1") (T.pair (T.var "t0") (T.var "t1")))))]
-        (apply (apply (var "fun1") (string "foo")) (int32 42)))]
-
--- | Test cases for unshadowVariables
--- The function renames shadowed variables by appending a counter suffix.
--- When a variable name is first introduced (lambda or let), it keeps its name.
--- When the same name is introduced again in an inner scope (shadowing), the inner
--- binding is renamed to name<counter> (e.g., x2, x3, ...), and references in
--- the inner body are updated accordingly.
-unshadowVariablesGroup :: TTerm TestGroup
-unshadowVariablesGroup = subgroup "unshadowVariables" [
-
-    -- === No shadowing: terms should be unchanged ===
-
-    unshadowCase "literal unchanged"
-      (int32 42)
-      (int32 42),
-
-    unshadowCase "variable unchanged"
-      (var "x")
-      (var "x"),
-
-    unshadowCase "single lambda unchanged"
-      (lambda "x" (var "x"))
-      (lambda "x" (var "x")),
-
-    unshadowCase "distinct lambda parameters unchanged"
-      (lambda "x" (lambda "y" (list [var "x", var "y"])))
-      (lambda "x" (lambda "y" (list [var "x", var "y"]))),
-
-    unshadowCase "let with no shadowing unchanged"
-      (letExpr "x" (int32 1) (var "x"))
-      (letExpr "x" (int32 1) (var "x")),
-
-    unshadowCase "let and lambda with distinct names unchanged"
-      (letExpr "x" (int32 1) (lambda "y" (list [var "x", var "y"])))
-      (letExpr "x" (int32 1) (lambda "y" (list [var "x", var "y"]))),
-
-    -- === Simple lambda shadowing ===
-
-    unshadowCase "inner lambda shadows outer lambda"
-      (lambda "x" (lambda "x" (var "x")))
-      (lambda "x" (lambda "x2" (var "x2"))),
-
-    unshadowCase "inner lambda shadows outer - body references both"
-      (lambda "x" (list [var "x", lambda "x" (var "x")]))
-      (lambda "x" (list [var "x", lambda "x2" (var "x2")])),
-
-    unshadowCase "triple nested lambda same name"
-      (lambda "x" (lambda "x" (lambda "x" (var "x"))))
-      (lambda "x" (lambda "x2" (lambda "x3" (var "x3")))),
-
-    -- === Lambda shadowing with different parameters ===
-
-    unshadowCase "two parameters shadow sequentially"
-      (lambda "x" (lambda "y" (lambda "x" (lambda "y" (list [var "x", var "y"])))))
-      (lambda "x" (lambda "y" (lambda "x2" (lambda "y2" (list [var "x2", var "y2"]))))),
-
-    -- === Let introduces names that lambdas can shadow ===
-
-    unshadowCase "lambda shadows let-bound variable"
-      (letExpr "x" (int32 1) (lambda "x" (var "x")))
-      (letExpr "x" (int32 1) (lambda "x2" (var "x2"))),
-
-    unshadowCase "lambda shadows one of multiple let bindings"
-      (multiLet [("x", int32 1), ("y", int32 2)]
-        (lambda "x" (list [var "x", var "y"])))
-      (multiLet [("x", int32 1), ("y", int32 2)]
-        (lambda "x2" (list [var "x2", var "y"]))),
-
-    -- === Nested lets ===
-
-    unshadowCase "inner let body with lambda shadowing outer let"
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (lambda "x" (var "x"))))
-      (letExpr "x" (int32 1)
-        (letExpr "y" (int32 2)
-          (lambda "x2" (var "x2")))),
-
-    -- === Shadowing inside application ===
-
-    unshadowCase "shadowed lambda in function position of application"
-      (lambda "f" (apply (lambda "f" (var "f")) (var "f")))
-      (lambda "f" (apply (lambda "f2" (var "f2")) (var "f"))),
-
-    -- === Shadowing inside list ===
-
-    unshadowCase "shadowed lambdas in list elements"
-      (lambda "x"
-        (list [
-          lambda "x" (var "x"),
-          lambda "x" (var "x")]))
-      (lambda "x"
-        (list [
-          lambda "x2" (var "x2"),
-          lambda "x2" (var "x2")])),
-
-    -- === Shadowing inside record ===
-
-    unshadowCase "shadowed lambda in record field"
-      (lambda "x"
-        (record (nm "Pair") [
-          (nm "fst", lambda "x" (var "x")),
-          (nm "snd", var "x")]))
-      (lambda "x"
-        (record (nm "Pair") [
-          (nm "fst", lambda "x2" (var "x2")),
-          (nm "snd", var "x")])),
-
-    -- === Shadowing inside case/match branches ===
-
-    unshadowCase "shadowed lambda in case branch"
-      (lambda "x"
-        (match (nm "Maybe") nothing [
-          (nm "nothing", int32 0),
-          (nm "just", lambda "x" (var "x"))]))
-      (lambda "x"
-        (match (nm "Maybe") nothing [
-          (nm "nothing", int32 0),
-          (nm "just", lambda "x2" (var "x2"))])),
-
-    -- === Shadowing inside pair ===
-
-    unshadowCase "shadowed lambda in pair"
-      (lambda "x" (pair (lambda "x" (var "x")) (var "x")))
-      (lambda "x" (pair (lambda "x2" (var "x2")) (var "x"))),
-
-    -- === Shadowing inside optional ===
-
-    unshadowCase "shadowed lambda inside optional"
-      (lambda "x" (optional (just (lambda "x" (var "x")))))
-      (lambda "x" (optional (just (lambda "x2" (var "x2"))))),
-
-    -- === Shadowing inside set ===
-
-    unshadowCase "shadowed lambda inside set element"
-      (lambda "x" (set [lambda "x" (var "x")]))
-      (lambda "x" (set [lambda "x2" (var "x2")])),
-
-    -- === Shadowing inside inject (union construction) ===
-
-    unshadowCase "shadowed lambda in union injection"
-      (lambda "x" (inject (nm "Result") "ok" (lambda "x" (var "x"))))
-      (lambda "x" (inject (nm "Result") "ok" (lambda "x2" (var "x2")))),
-
-    -- === Shadowing inside wrap ===
-
-    unshadowCase "shadowed lambda inside wrapped term"
-      (lambda "x" (wrap (nm "Age") (lambda "x" (var "x"))))
-      (lambda "x" (wrap (nm "Age") (lambda "x2" (var "x2")))),
-
-    -- === Shadowing inside type lambda ===
-
-    unshadowCase "shadowed lambda inside type lambda"
-      (lambda "x" (tylam "a" (lambda "x" (var "x"))))
-      (lambda "x" (tylam "a" (lambda "x2" (var "x2")))),
-
-    -- === Shadowing inside type application ===
-
-    unshadowCase "shadowed lambda inside type application"
-      (lambda "x" (tyapp (lambda "x" (var "x")) T.string))
-      (lambda "x" (tyapp (lambda "x2" (var "x2")) T.string)),
-
-    -- === Shadowing inside annotation ===
-
-    unshadowCase "shadowed lambda inside annotated term"
-      (lambda "x" (annot emptyAnnMap (lambda "x" (var "x"))))
-      (lambda "x" (annot emptyAnnMap (lambda "x2" (var "x2")))),
-
-    -- === Complex nesting ===
-
-    unshadowCase "shadowing at multiple depths"
-      (lambda "x"
-        (lambda "y"
-          (lambda "x"
-            (lambda "y"
-              (list [var "x", var "y"])))))
-      (lambda "x"
-        (lambda "y"
-          (lambda "x2"
-            (lambda "y2"
-              (list [var "x2", var "y2"]))))),
-
-    unshadowCase "let then lambda then lambda all same name"
-      (letExpr "x" (int32 1)
-        (lambda "x" (lambda "x" (var "x"))))
-      (letExpr "x" (int32 1)
-        (lambda "x2" (lambda "x3" (var "x3")))),
-
-    unshadowCase "lambda with shadowing in let binding value"
-      (lambda "x"
-        (letExpr "y" (lambda "x" (var "x"))
-          (apply (var "y") (var "x"))))
-      (lambda "x"
-        (letExpr "y" (lambda "x2" (var "x2"))
-          (apply (var "y") (var "x")))),
-
-    -- === No-op cases: terms without binding forms ===
-
-    unshadowCase "application without shadowing unchanged"
-      (apply (var "f") (int32 42))
-      (apply (var "f") (int32 42)),
-
-    unshadowCase "list of literals unchanged"
-      (list [int32 1, int32 2, int32 3])
-      (list [int32 1, int32 2, int32 3]),
-
-    unshadowCase "nested record unchanged"
-      (record (nm "Point") [(nm "x", int32 10), (nm "y", int32 20)])
-      (record (nm "Point") [(nm "x", int32 10), (nm "y", int32 20)])]
-
--- Helper to build an empty annotation map
-emptyAnnMap :: TTerm (M.Map Name Term)
-emptyAnnMap = Phantoms.map M.empty
-
-allTests :: TTermDefinition TestGroup
-allTests = define "allTests" $
-    Phantoms.doc "Test cases for variable analysis and manipulation" $
-    supergroup "variables" [
-      freeVariablesGroup,
-      normalizeTypeVariablesGroup,
-      unshadowVariablesGroup]
diff --git a/src/main/haskell/Hydra/Sources/Tinkerpop/Features.hs b/src/main/haskell/Hydra/Sources/Tinkerpop/Features.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Tinkerpop/Features.hs
+++ /dev/null
@@ -1,189 +0,0 @@
-module Hydra.Sources.Tinkerpop.Features where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.tinkerpop.features"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-core :: String -> Type
-core = typeref $ Core.ns
-
-features :: String -> Type
-features = typeref ns
-
-supports :: String -> String -> FieldType
-supports name comment = ("supports" ++ capitalize name)>: doc comment T.boolean
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A model derived from TinkerPop's Graph.Features. See\n" ++
-      "  https://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/structure/Graph.Features.html\n" ++
-      "\n" ++
-      "An interface that represents the capabilities of a Graph implementation.\n" ++
-      "By default all methods of features return true and it is up to implementers to disable feature they don't support.\n" ++
-      "Users should check features prior to using various functions of TinkerPop to help ensure code portability across implementations.\n" ++
-      "For example, a common usage would be to check if a graph supports transactions prior to calling the commit method on Graph.tx().")}
-  where
-    definitions = [
-      dataTypeFeatures,
-      edgeFeatures,
-      edgePropertyFeatures,
-      elementFeatures,
-      extraFeatures,
-      features_,
-      graphFeatures,
-      propertyFeatures,
-      variableFeatures,
-      vertexFeatures,
-      vertexPropertyFeatures]
-
-dataTypeFeatures :: Binding
-dataTypeFeatures = define "DataTypeFeatures" $
-  doc "Base interface for features that relate to supporting different data types." $
-  T.record [
-    supports "booleanArrayValues" "Supports setting of an array of boolean values.",
-    supports "booleanValues" "Supports setting of a boolean value.",
-    supports "byteArrayValues" "Supports setting of an array of byte values.",
-    supports "byteValues" "Supports setting of a byte value.",
-    supports "doubleArrayValues" "Supports setting of an array of double values.",
-    supports "doubleValues" "Supports setting of a double value.",
-    supports "floatArrayValues" "Supports setting of an array of float values.",
-    supports "floatValues" "Supports setting of a float value.",
-    supports "integerArrayValues" "Supports setting of an array of integer values.",
-    supports "integerValues" "Supports setting of a integer value.",
-    supports "longArrayValues" "Supports setting of an array of long values.",
-    supports "longValues" "Supports setting of a long value.",
-    supports "mapValues" "Supports setting of a Map value.",
-    supports "mixedListValues" "Supports setting of a List value.",
-    supports "serializableValues" "Supports setting of a Java serializable value.",
-    supports "stringArrayValues" "Supports setting of an array of string values.",
-    supports "stringValues" "Supports setting of a string value.",
-    supports "uniformListValues" "Supports setting of a List value."]
-
-edgeFeatures :: Binding
-edgeFeatures = define "EdgeFeatures" $
-  doc "Features that are related to Edge operations." $
-  T.record [
-    "elementFeatures">: features "ElementFeatures",
-    "properties">: features "EdgePropertyFeatures",
-    supports "addEdges" "Determines if an Edge can be added to a Vertex.",
-    supports "removeEdges" "Determines if an Edge can be removed from a Vertex.",
-    supports "upsert" ("Determines if the Graph implementation uses upsert functionality as opposed to insert " ++
-      "functionality for Vertex.addEdge(String, Vertex, Object...).")]
-
-edgePropertyFeatures :: Binding
-edgePropertyFeatures = define "EdgePropertyFeatures" $
-  doc "Features that are related to Edge Property objects." $
-  T.record [
-    "propertyFeatures">: features "PropertyFeatures"]
-
-elementFeatures :: Binding
-elementFeatures = define "ElementFeatures" $
-  doc "Features that are related to Element objects." $
-  T.record [
-    supports "addProperty" "Determines if an Element allows properties to be added.",
-    supports "anyIds" "Determines if an Element any Java object is a suitable identifier.",
-    supports "customIds" "Determines if an Element has a specific custom object as their internal representation.",
-    supports "numericIds" "Determines if an Element has numeric identifiers as their internal representation.",
-    supports "removeProperty" "Determines if an Element allows properties to be removed.",
-    supports "stringIds" "Determines if an Element has string identifiers as their internal representation.",
-    supports "userSuppliedIds" "Determines if an Element can have a user defined identifier.",
-    supports "uuidIds" "Determines if an Element has UUID identifiers as their internal representation."]
-
-extraFeatures :: Binding
-extraFeatures = define "ExtraFeatures" $
-  doc ("Additional features which are needed for the complete specification of language constraints in Hydra, "
-    ++ "above and beyond TinkerPop Graph.Features") $
-  T.forAll "a" $ T.record [
-    "supportsMapKey">: T.function (core "Type") T.boolean]
-
-features_ :: Binding
-features_ = define "Features" $
-  doc ("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().\n\n" ++
-      "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.") $
-  T.record [
-    "edge">: doc "Gets the features related to edge operation." $
-      features "EdgeFeatures",
-    "graph">: doc "Gets the features related to graph operation." $
-      features "GraphFeatures",
-    "vertex">: doc "Gets the features related to vertex operation." $
-      features "VertexFeatures"]
-
-graphFeatures :: Binding
-graphFeatures = define "GraphFeatures" $
-  doc "Features specific to a operations of a graph." $
-  T.record [
-    supports "computer" "Determines if the Graph implementation supports GraphComputer based processing.",
-    supports "concurrentAccess" "Determines if the Graph implementation supports more than one connection to the same instance at the same time.",
-    supports "ioRead" "Determines if the Graph implementations supports read operations as executed with the GraphTraversalSource.io(String) step.",
-    supports "ioWrite" "Determines if the Graph implementations supports write operations as executed with the GraphTraversalSource.io(String) step.",
-    supports "persistence" "Determines if the Graph implementation supports persisting it's contents natively to disk.",
-    supports "threadedTransactions" "Determines if the Graph implementation supports threaded transactions which allow a transaction to be executed across multiple threads via Transaction.createThreadedTx().",
-    supports "transactions" "Determines if the Graph implementations supports transactions.",
-    "variables">:
-      doc "Gets the features related to graph sideEffects operation." $
-      features "VariableFeatures"]
-
-propertyFeatures :: Binding
-propertyFeatures = define "PropertyFeatures" $
-  doc "A base interface for Edge or Vertex Property features." $
-  T.record [
-    "dataTypeFeatures">: features "DataTypeFeatures",
-    supports "properties" "Determines if an Element allows for the processing of at least one data type defined by the features."]
-
-variableFeatures :: Binding
-variableFeatures = define "VariableFeatures" $
-  doc "Features for Graph.Variables." $
-  T.record [
-    "dataTypeFeatures">: features "DataTypeFeatures",
-    supports "variables" "If any of the features on Graph.Features.VariableFeatures is true then this value must be true."]
-
-vertexFeatures :: Binding
-vertexFeatures = define "VertexFeatures" $
-  doc "Features that are related to Vertex operations." $
-  T.record [
-    "elementFeatures">: features "ElementFeatures",
-    "properties">: features "VertexPropertyFeatures",
-    supports "addVertices" "Determines if a Vertex can be added to the Graph.",
-    supports "duplicateMultiProperties" "Determines if a Vertex can support non-unique values on the same key.",
-    supports "metaProperties" "Determines if a Vertex can support properties on vertex properties.",
-    supports "multiProperties" "Determines if a Vertex can support multiple properties with the same key.",
-    supports "removeVertices" "Determines if a Vertex can be removed from the Graph.",
-    supports "upsert" ("Determines if the Graph implementation uses upsert functionality as opposed to insert " ++
-      "functionality for Graph.addVertex(String).")]
-
-vertexPropertyFeatures :: Binding
-vertexPropertyFeatures = define "VertexPropertyFeatures" $
-  doc "Features that are related to Vertex Property objects." $
-  T.record [
-    "dataTypeFeatures">: features "DataTypeFeatures",
-    "propertyFeatures">: features "PropertyFeatures",
-    -- Note: re-using ElementFeatures here rather than repeating the individual features (which are identical)
-    "elementFeatures">: features "ElementFeatures",
-    supports "remove" "Determines if a VertexProperty allows properties to be removed."]
diff --git a/src/main/haskell/Hydra/Sources/Tinkerpop/Gremlin.hs b/src/main/haskell/Hydra/Sources/Tinkerpop/Gremlin.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Tinkerpop/Gremlin.hs
+++ /dev/null
@@ -1,1114 +0,0 @@
-module Hydra.Sources.Tinkerpop.Gremlin where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.tinkerpop.gremlin"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-gremlin :: String -> Type
-gremlin = typeref ns
-
--- Helper for argument types (value or variable)
-defArgument :: String -> Type -> Binding
-defArgument name typ = define name $ T.union [
-  "value">: typ,
-  "variable">: gremlin "Identifier"]
-
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A Gremlin model, based on the Gremlin ANTLR grammar "
-      ++ "(master branch, as of 2024-06-30).")}
-  where
-    definitions = [
-      queryList,
-      query,
-      traversalSourceQuery,
-      rootTraversalQuery,
-      traversalSource,
-      transactionPart,
-      rootTraversal,
-      traversalSourceSelfMethod,
-      genericLiteralArgumentAndOptionalTraversalBiFunctionArgument,
-      stringArgumentAndGenericLiteralArgument,
-      stringArgumentAndOptionalGenericLiteralArgument,
-      traversalSourceSpawnMethod,
-      genericLiteralMapNullableArgumentOrNestedTraversal,
-      serviceCall,
-      serviceArguments,
-      chainedTraversal,
-      chainedTraversalElement,
-      nestedTraversal,
-      terminatedTraversal,
-      traversalMethod,
-      stringArgumentOrNestedTraversal,
-      optionalTraversalScopeArgumentAndStringArgument,
-      stringArgumentAndOptionalStringLiteralVarargs,
-      traversalSackMethodArgumentOrIntegerArgument,
-      byArgs,
-      byOtherArgs,
-      traversalFunctionArgumentOrStringArgumentOrNestedTraversal,
-      chooseArgs,
-      predicateTraversalArgument,
-      nestedTraversalArgument,
-      dedupArgs,
-      scopeStringArgument,
-      predicateOrTraversal,
-      genericLiteralArgumentAndTraversalBiFunctionArgument,
-      fromArgs,
-      hasArgs,
-      hasStringArgumentAndOptionalStringLiteralVarargs,
-      hasStringArgumentAndOptionalStringLiteralVarargsRest,
-      stringNullableArgumentAndGenericLiteralArgument,
-      stringNullableArgumentAndTraversalPredicate,
-      hasTraversalTokenArgs,
-      hasTraversalTokenArgsRest,
-      genericLiteralArgumentAndTraversalPredicate,
-      traversalPredicateOrStringLiteralVarargs,
-      traversalPredicateOrGenericLiteralArgument,
-      optionArgs,
-      traversalPredicateAndNestedTraversal,
-      traversalMergeArgumentAndGenericLiteralMapNullableArgument,
-      traversalMergeArgumentAndNestedTraversal,
-      genericLiteralArgumentAndNestedTraversal,
-      propertyArgs,
-      traversalCardinalityArgumentAndObjects,
-      genericLiteralMapNullableArgumentAndTraversalCardinalityArgument,
-      rangeArgs,
-      optionalStringArgumentAndNestedTraversal,
-      optionalTraversalScopeArgumentAndIntegerArgument,
-      selectArgs,
-      popStringsArgument,
-      traversalPopArgumentAndNestedTraversal,
-      tailArgs,
-      toArgs,
-      directionAndVarargs,
-      valueMapArgs,
-      valueMapBooleanArgs,
-      whereArgs,
-      whereWithPredicateArgs,
-      withArgs,
-      withArgsKeys,
-      withArgsValues,
-      concatArgs,
-      replaceArgs,
-      splitArgs,
-      substringArgs,
-      dateAddArgs,
-      dateDiffArgs,
-      structureVertex,
-      traversalStrategy,
-      configuration,
-      keywordOrIdentifier,
-      traversalScope,
-      traversalToken,
-      traversalMerge,
-      traversalOrder,
-      traversalDirection,
-      traversalCardinality,
-      traversalColumn,
-      traversalPop,
-      traversalOperator,
-      traversalPick,
-      traversalDT,
-      traversalPredicate,
-      twoTraversalPredicates,
-      traversalTerminalMethod,
-      traversalSelfMethod,
-      traversalFunction,
-      rangeArgument,
-      withOptionKeys,
-      connectedComponentConstants,
-      pageRankConstants,
-      peerPressureConstants,
-      shortestPathConstants,
-      withOptionsValues,
-      ioOptionsKeys,
-      ioOptionsValues,
-      booleanArgument,
-      integerArgument,
-      floatArgument,
-      stringArgument,
-      stringNullableArgument,
-      dateArgument,
-      genericLiteralArgument,
-      genericLiteralListArgument,
-      genericLiteralMapArgument,
-      genericLiteralMapNullableArgument,
-      structureVertexArgument,
-      traversalCardinalityArgument,
-      traversalColumnArgument,
-      traversalDirectionArgument,
-      traversalMergeArgument,
-      traversalOrderArgument,
-      traversalPopArgument,
-      traversalSackMethodArgument,
-      traversalScopeArgument,
-      traversalTokenArgument,
-      traversalComparatorArgument,
-      traversalFunctionArgument,
-      traversalBiFunctionArgument,
-      traversalDTArgument,
-      genericLiteralList,
-      genericLiteralRange,
-      integerRange,
-      stringRange,
-      genericLiteralSet,
-      genericLiteralCollection,
-      genericLiteral,
-      genericLiteralMap,
-      mapEntry,
-      mapKey,
-      integerLiteral,
-      floatLiteral,
-      numericLiteral,
-      dateLiteral,
-      keyword,
-      identifier]
-
-
--- Type definitions
-
-queryList :: Binding
-queryList = define "QueryList" $ T.wrap $ nonemptyList $ gremlin "Query"
-
-query :: Binding
-query = define "Query" $ T.union [
-  "traversalSource">: gremlin "TraversalSourceQuery",
-  "rootTraversal">: gremlin "RootTraversalQuery",
-  "toString">: T.unit,
-  "empty">: T.unit]
-
-traversalSourceQuery :: Binding
-traversalSourceQuery = define "TraversalSourceQuery" $ T.record [
-  "source">: gremlin "TraversalSource",
-  "transactionPart">: T.optional $ gremlin "TransactionPart"]
-
-rootTraversalQuery :: Binding
-rootTraversalQuery = define "RootTraversalQuery" $ T.record [
-  "root">: gremlin "RootTraversal",
-  "terminalMethod">: T.optional $ gremlin "TraversalTerminalMethod"]
-
-traversalSource :: Binding
-traversalSource = define "TraversalSource" $ T.wrap $ T.list $ gremlin "TraversalSourceSelfMethod"
-
-transactionPart :: Binding
-transactionPart = define "TransactionPart" $ T.enum [
-  "begin",
-  "commit",
-  "rollback"]
-
-rootTraversal :: Binding
-rootTraversal = define "RootTraversal" $ T.record [
-  "source">: gremlin "TraversalSource",
-  "spawnMethod">: gremlin "TraversalSourceSpawnMethod",
-  "chained">: T.list $ gremlin "ChainedTraversalElement"]
-
-traversalSourceSelfMethod :: Binding
-traversalSourceSelfMethod = define "TraversalSourceSelfMethod" $ T.union [
-  "withBulk">: T.boolean,
-  "withPath">: T.unit,
-  "withSack">: gremlin "GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument",
-  "withSideEffect">: gremlin "StringArgumentAndGenericLiteralArgument",
-  "withStrategies">: nonemptyList $ gremlin "TraversalStrategy",
-  "withoutStrategies">: nonemptyList $ gremlin "Identifier",
-  "with">: gremlin "StringArgumentAndOptionalGenericLiteralArgument"]
-
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgument :: Binding
-genericLiteralArgumentAndOptionalTraversalBiFunctionArgument = define "GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument" $ T.record [
-  "literal">: gremlin "GenericLiteralArgument",
-  "biFunction">: T.optional $ gremlin "TraversalBiFunctionArgument"]
-
-stringArgumentAndGenericLiteralArgument :: Binding
-stringArgumentAndGenericLiteralArgument = define "StringArgumentAndGenericLiteralArgument" $ T.record [
-  "string">: gremlin "StringArgument",
-  "literal">: gremlin "GenericLiteralArgument"]
-
-stringArgumentAndOptionalGenericLiteralArgument :: Binding
-stringArgumentAndOptionalGenericLiteralArgument = define "StringArgumentAndOptionalGenericLiteralArgument" $ T.record [
-  "string">: gremlin "StringArgument",
-  "literal">: T.optional $ gremlin "GenericLiteralArgument"]
-
-traversalSourceSpawnMethod :: Binding
-traversalSourceSpawnMethod = define "TraversalSourceSpawnMethod" $ T.union [
-  "addE">: gremlin "StringArgumentOrNestedTraversal",
-  "addV">: T.optional $ gremlin "StringArgumentOrNestedTraversal",
-  "e">: nonemptyList $ gremlin "GenericLiteralArgument",
-  "v">: nonemptyList $ gremlin "GenericLiteralArgument",
-  "mergeV">: gremlin "GenericLiteralMapNullableArgumentOrNestedTraversal",
-  "mergeE">: gremlin "GenericLiteralMapNullableArgumentOrNestedTraversal",
-  "inject">: nonemptyList $ gremlin "GenericLiteralArgument",
-  "io">: gremlin "StringArgument",
-  "call">: T.optional $ gremlin "ServiceCall",
-  "union">: T.list $ gremlin "NestedTraversal"]
-
-genericLiteralMapNullableArgumentOrNestedTraversal :: Binding
-genericLiteralMapNullableArgumentOrNestedTraversal = define "GenericLiteralMapNullableArgumentOrNestedTraversal" $ T.union [
-  "map">: gremlin "GenericLiteralMapNullableArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-serviceCall :: Binding
-serviceCall = define "ServiceCall" $ T.record [
-  "service">: gremlin "StringArgument",
-  "arguments">: gremlin "ServiceArguments"]
-
-serviceArguments :: Binding
-serviceArguments = define "ServiceArguments" $ T.union [
-  "map">: T.optional $ gremlin "GenericLiteralMapArgument",
-  "traversal">: T.optional $ gremlin "NestedTraversal"]
-
-chainedTraversal :: Binding
-chainedTraversal = define "ChainedTraversal" $ T.record [
-  "first">: gremlin "TraversalMethod",
-  "rest">: gremlin "ChainedTraversalElement"]
-
-chainedTraversalElement :: Binding
-chainedTraversalElement = define "ChainedTraversalElement" $ T.union [
-  "method">: gremlin "TraversalMethod",
-  "self">: gremlin "TraversalSelfMethod"]
-
-nestedTraversal :: Binding
-nestedTraversal = define "NestedTraversal" $ T.union [
-  "root">: gremlin "RootTraversal",
-  "chained">: gremlin "ChainedTraversal",
-  "anonymous">: gremlin "ChainedTraversal"]
-
-terminatedTraversal :: Binding
-terminatedTraversal = define "TerminatedTraversal" $ T.record [
-  "root">: gremlin "RootTraversal",
-  "terminal">: gremlin "TraversalTerminalMethod"]
-
-traversalMethod :: Binding
-traversalMethod = define "TraversalMethod" $ T.union [
-  "v">: nonemptyList $ gremlin "GenericLiteralArgument",
-  "e">: nonemptyList $ gremlin "GenericLiteralArgument",
-  "addE">: gremlin "StringArgumentOrNestedTraversal",
-  "addV">: T.optional $ gremlin "StringArgumentOrNestedTraversal",
-  "mergeE">: T.optional $ gremlin "GenericLiteralMapNullableArgumentOrNestedTraversal",
-  "mergeV">: T.optional $ gremlin "GenericLiteralMapNullableArgumentOrNestedTraversal",
-  "aggregate">: gremlin "OptionalTraversalScopeArgumentAndStringArgument",
-  "all">: gremlin "TraversalPredicate",
-  "and">: T.list $ gremlin "NestedTraversal",
-  "any">: gremlin "TraversalPredicate",
-  "as">: gremlin "StringArgumentAndOptionalStringLiteralVarargs",
-  "barrier">: T.optional $ gremlin "TraversalSackMethodArgumentOrIntegerArgument",
-  "both">: nonemptyList $ gremlin "StringNullableArgument",
-  "bothE">: nonemptyList $ gremlin "StringNullableArgument",
-  "bothV">: T.unit,
-  "branch">: gremlin "NestedTraversal",
-  "by">: gremlin "ByArgs",
-  "cap">: gremlin "StringArgumentAndOptionalStringLiteralVarargs",
-  "choose">: gremlin "ChooseArgs",
-  "coalesce">: T.list $ gremlin "NestedTraversal",
-  "coin">: gremlin "FloatArgument",
-  "conjoin">: gremlin "StringArgument",
-  "connectedComponent">: T.unit,
-  "constant">: gremlin "GenericLiteralArgument",
-  "count">: T.optional $ gremlin "TraversalScopeArgument",
-  "cyclicPath">: T.unit,
-  "dedup">: gremlin "DedupArgs",
-  "difference">: gremlin "GenericLiteralArgument",
-  "disjunct">: gremlin "GenericLiteralArgument",
-  "drop">: T.unit,
-  "elementMap">: nonemptyList $ gremlin "StringNullableArgument",
-  "emit">: T.optional $ gremlin "PredicateOrTraversal",
-  "filter">: gremlin "PredicateOrTraversal",
-  "flatMap">: gremlin "NestedTraversal",
-  "fold">: T.optional $ gremlin "GenericLiteralArgumentAndTraversalBiFunctionArgument",
-  "from">: gremlin "FromArgs",
-  "group">: T.optional $ gremlin "StringArgument",
-  "groupCount">: T.optional $ gremlin "StringArgument",
-  "has">: gremlin "HasArgs",
-  "hasId">: gremlin "GenericLiteralArgumentAndTraversalPredicate",
-  "hasKey">: gremlin "TraversalPredicateOrStringLiteralVarargs",
-  "hasLabel">: gremlin "TraversalPredicateOrStringLiteralVarargs",
-  "hasNot">: gremlin "StringNullableArgument",
-  "hasValue">: gremlin "TraversalPredicateOrGenericLiteralArgument",
-  "id">: T.unit,
-  "identity">: T.unit,
-  "in">: nonemptyList $ gremlin "StringNullableArgument",
-  "inE">: nonemptyList $ gremlin "StringNullableArgument",
-  "intersect">: gremlin "GenericLiteralArgument",
-  "inV">: T.unit,
-  "index">: T.unit,
-  "inject">: nonemptyList $ gremlin "GenericLiteralArgument",
-  "is">: gremlin "TraversalPredicateOrGenericLiteralArgument",
-  "key">: T.unit,
-  "label">: T.unit,
-  "limit">: gremlin "OptionalTraversalScopeArgumentAndIntegerArgument",
-  "local">: gremlin "NestedTraversal",
-  "loops">: T.optional $ gremlin "StringArgument",
-  "map">: gremlin "NestedTraversal",
-  "match">: T.list $ gremlin "NestedTraversal",
-  "math">: gremlin "StringArgument",
-  "max">: T.optional $ gremlin "TraversalScopeArgument",
-  "mean">: T.optional $ gremlin "TraversalScopeArgument",
-  "min">: T.optional $ gremlin "TraversalScopeArgument",
-  "none">: gremlin "TraversalPredicate",
-  "not">: gremlin "NestedTraversal",
-  "option">: gremlin "OptionArgs",
-  "optional">: gremlin "NestedTraversal",
-  "or">: T.list $ gremlin "NestedTraversal",
-  "order">: T.optional $ gremlin "TraversalScopeArgument",
-  "otherV">: T.unit,
-  "out">: nonemptyList $ gremlin "StringNullableArgument",
-  "outE">: nonemptyList $ gremlin "StringNullableArgument",
-  "outV">: T.unit,
-  "pageRank">: T.optional $ gremlin "FloatArgument",
-  "path">: T.unit,
-  "peerPressure">: T.unit,
-  "profile">: T.optional $ gremlin "StringArgument",
-  "project">: gremlin "StringArgumentAndOptionalStringLiteralVarargs",
-  "properties">: nonemptyList $ gremlin "StringNullableArgument",
-  "property">: gremlin "PropertyArgs",
-  "propertyMap">: nonemptyList $ gremlin "StringNullableArgument",
-  "range">: gremlin "RangeArgs",
-  "read">: T.unit,
-  "repeat">: gremlin "OptionalStringArgumentAndNestedTraversal",
-  "sack">: T.optional $ gremlin "TraversalBiFunctionArgument",
-  "sample">: gremlin "OptionalTraversalScopeArgumentAndIntegerArgument",
-  "select">: gremlin "SelectArgs",
-  "combine">: gremlin "GenericLiteralArgument",
-  "product">: gremlin "GenericLiteralArgument",
-  "merge">: gremlin "GenericLiteralArgument",
-  "shortestPath">: T.unit,
-  "sideEffect">: gremlin "NestedTraversal",
-  "simplePath">: T.unit,
-  "skip">: gremlin "OptionalTraversalScopeArgumentAndIntegerArgument",
-  "store">: gremlin "StringArgument",
-  "subgraph">: gremlin "StringArgument",
-  "sum">: T.optional $ gremlin "TraversalScopeArgument",
-  "tail">: T.optional $ gremlin "TailArgs",
-  "fail">: T.optional $ gremlin "StringArgument",
-  "times">: gremlin "IntegerArgument",
-  "to">: gremlin "ToArgs",
-  "toE">: gremlin "DirectionAndVarargs",
-  "toV">: gremlin "TraversalDirectionArgument",
-  "tree">: T.optional $ gremlin "StringArgument",
-  "unfold">: T.unit,
-  "union">: T.list $ gremlin "NestedTraversal",
-  "until">: gremlin "PredicateOrTraversal",
-  "value">: T.unit,
-  "valueMap">: gremlin "ValueMapArgs",
-  "values">: nonemptyList $ gremlin "StringNullableArgument",
-  "where">: gremlin "WhereArgs",
-  "with">: gremlin "WithArgs",
-  "write">: T.unit,
-  "element">: nonemptyList $ gremlin "StringNullableArgument",
-  "call">: gremlin "ServiceCall",
-  "concat">: gremlin "ConcatArgs",
-  "asString">: T.optional $ gremlin "TraversalScopeArgument",
-  "format">: gremlin "StringArgument",
-  "toUpper">: T.optional $ gremlin "TraversalScopeArgument",
-  "toLower">: T.optional $ gremlin "TraversalScopeArgument",
-  "length">: T.optional $ gremlin "TraversalScopeArgument",
-  "trim">: T.optional $ gremlin "TraversalScopeArgument",
-  "lTrim">: T.optional $ gremlin "TraversalScopeArgument",
-  "rTrim">: T.optional $ gremlin "TraversalScopeArgument",
-  "reverse">: T.unit,
-  "replace">: gremlin "ReplaceArgs",
-  "split">: gremlin "SplitArgs",
-  "substring">: gremlin "SubstringArgs",
-  "asDate">: T.unit,
-  "dateAdd">: gremlin "DateAddArgs",
-  "dateDiff">: gremlin "DateDiffArgs"]
-
-stringArgumentOrNestedTraversal :: Binding
-stringArgumentOrNestedTraversal = define "StringArgumentOrNestedTraversal" $ T.union [
-  "string">: gremlin "StringArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-optionalTraversalScopeArgumentAndStringArgument :: Binding
-optionalTraversalScopeArgumentAndStringArgument = define "OptionalTraversalScopeArgumentAndStringArgument" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "string">: gremlin "StringArgument"]
-
-stringArgumentAndOptionalStringLiteralVarargs :: Binding
-stringArgumentAndOptionalStringLiteralVarargs = define "StringArgumentAndOptionalStringLiteralVarargs" $ T.record [
-  "first">: gremlin "StringArgument",
-  "rest">: T.list $ gremlin "StringNullableArgument"]
-
-traversalSackMethodArgumentOrIntegerArgument :: Binding
-traversalSackMethodArgumentOrIntegerArgument = define "TraversalSackMethodArgumentOrIntegerArgument" $ T.union [
-  "consumer">: gremlin "TraversalSackMethodArgument",
-  "int">: gremlin "IntegerArgument"]
-
-byArgs :: Binding
-byArgs = define "ByArgs" $ T.union [
-  "order">: gremlin "TraversalOrderArgument",
-  "token">: gremlin "TraversalTokenArgument",
-  "other">: gremlin "ByOtherArgs"]
-
-byOtherArgs :: Binding
-byOtherArgs = define "ByOtherArgs" $ T.union [
-  "comparator">: T.optional $ gremlin "TraversalComparatorArgument",
-  "other">: T.optional $ gremlin "TraversalFunctionArgumentOrStringArgumentOrNestedTraversal"]
-
-traversalFunctionArgumentOrStringArgumentOrNestedTraversal :: Binding
-traversalFunctionArgumentOrStringArgumentOrNestedTraversal = define "TraversalFunctionArgumentOrStringArgumentOrNestedTraversal" $ T.union [
-  "function">: gremlin "TraversalFunctionArgument",
-  "string">: gremlin "StringArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-chooseArgs :: Binding
-chooseArgs = define "ChooseArgs" $ T.union [
-  "function">: gremlin "TraversalFunctionArgument",
-  "predicateTraversal">: gremlin "PredicateTraversalArgument",
-  "traversal">: gremlin "NestedTraversalArgument"]
-
-predicateTraversalArgument :: Binding
-predicateTraversalArgument = define "PredicateTraversalArgument" $ T.record [
-  "predicate">: gremlin "TraversalPredicate",
-  "traversal1">: gremlin "NestedTraversal",
-  "traversal2">: T.optional $ gremlin "NestedTraversal"]
-
-nestedTraversalArgument :: Binding
-nestedTraversalArgument = define "NestedTraversalArgument" $ T.record [
-  "traversal1">: gremlin "NestedTraversal",
-  "traversal2">: T.optional $ gremlin "NestedTraversal",
-  "traversal3">: T.optional $ gremlin "NestedTraversal"]
-
-dedupArgs :: Binding
-dedupArgs = define "DedupArgs" $ T.union [
-  "scopeString">: gremlin "ScopeStringArgument",
-  "string">: nonemptyList $ gremlin "StringNullableArgument"]
-
-scopeStringArgument :: Binding
-scopeStringArgument = define "ScopeStringArgument" $ T.record [
-  "scope">: gremlin "TraversalScopeArgument",
-  "strings">: T.list $ gremlin "StringNullableArgument"]
-
-predicateOrTraversal :: Binding
-predicateOrTraversal = define "PredicateOrTraversal" $ T.union [
-  "predicate">: gremlin "TraversalPredicate",
-  "traversal">: gremlin "NestedTraversal"]
-
-genericLiteralArgumentAndTraversalBiFunctionArgument :: Binding
-genericLiteralArgumentAndTraversalBiFunctionArgument = define "GenericLiteralArgumentAndTraversalBiFunctionArgument" $ T.record [
-  "literal">: gremlin "GenericLiteralArgument",
-  "biFunction">: gremlin "TraversalBiFunctionArgument"]
-
-fromArgs :: Binding
-fromArgs = define "FromArgs" $ T.union [
-  "string">: gremlin "StringArgument",
-  "vertex">: gremlin "StructureVertexArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-hasArgs :: Binding
-hasArgs = define "HasArgs" $ T.union [
-  "string">: gremlin "HasStringArgumentAndOptionalStringLiteralVarargs",
-  "traversalToken">: gremlin "HasTraversalTokenArgs"]
-
-hasStringArgumentAndOptionalStringLiteralVarargs :: Binding
-hasStringArgumentAndOptionalStringLiteralVarargs = define "HasStringArgumentAndOptionalStringLiteralVarargs" $ T.record [
-  "string">: gremlin "StringNullableArgument",
-  "rest">: T.optional $ gremlin "HasStringArgumentAndOptionalStringLiteralVarargsRest"]
-
-hasStringArgumentAndOptionalStringLiteralVarargsRest :: Binding
-hasStringArgumentAndOptionalStringLiteralVarargsRest = define "HasStringArgumentAndOptionalStringLiteralVarargsRest" $ T.union [
-  "object">: gremlin "GenericLiteralArgument",
-  "predicate">: gremlin "TraversalPredicate",
-  "stringObject">: gremlin "StringNullableArgumentAndGenericLiteralArgument",
-  "stringPredicate">: gremlin "StringNullableArgumentAndTraversalPredicate",
-  "traversal">: gremlin "NestedTraversal"]
-
-stringNullableArgumentAndGenericLiteralArgument :: Binding
-stringNullableArgumentAndGenericLiteralArgument = define "StringNullableArgumentAndGenericLiteralArgument" $ T.record [
-  "string">: gremlin "StringNullableArgument",
-  "literal">: gremlin "GenericLiteralArgument"]
-
-stringNullableArgumentAndTraversalPredicate :: Binding
-stringNullableArgumentAndTraversalPredicate = define "StringNullableArgumentAndTraversalPredicate" $ T.record [
-  "string">: gremlin "StringNullableArgument",
-  "predicate">: gremlin "TraversalPredicate"]
-
-hasTraversalTokenArgs :: Binding
-hasTraversalTokenArgs = define "HasTraversalTokenArgs" $ T.record [
-  "traversalToken">: gremlin "TraversalTokenArgument",
-  "rest">: gremlin "HasTraversalTokenArgsRest"]
-
-hasTraversalTokenArgsRest :: Binding
-hasTraversalTokenArgsRest = define "HasTraversalTokenArgsRest" $ T.union [
-  "literal">: gremlin "GenericLiteralArgument",
-  "predicate">: gremlin "TraversalPredicate",
-  "traversal">: gremlin "NestedTraversal"]
-
-genericLiteralArgumentAndTraversalPredicate :: Binding
-genericLiteralArgumentAndTraversalPredicate = define "GenericLiteralArgumentAndTraversalPredicate" $ T.union [
-  "literal">: gremlin "GenericLiteralArgument",
-  "predicate">: gremlin "TraversalPredicate"]
-
-traversalPredicateOrStringLiteralVarargs :: Binding
-traversalPredicateOrStringLiteralVarargs = define "TraversalPredicateOrStringLiteralVarargs" $ T.union [
-  "predicate">: gremlin "TraversalPredicate",
-  "string">: nonemptyList $ gremlin "StringNullableArgument"]
-
-traversalPredicateOrGenericLiteralArgument :: Binding
-traversalPredicateOrGenericLiteralArgument = define "TraversalPredicateOrGenericLiteralArgument" $ T.union [
-  "predicate">: gremlin "TraversalPredicate",
-  "literal">: T.list $ gremlin "GenericLiteralArgument"]
-
-optionArgs :: Binding
-optionArgs = define "OptionArgs" $ T.union [
-  "predicateTraversal">: gremlin "TraversalPredicateAndNestedTraversal",
-  "mergeMap">: gremlin "TraversalMergeArgumentAndGenericLiteralMapNullableArgument",
-  "mergeTraversal">: gremlin "TraversalMergeArgumentAndNestedTraversal",
-  "objectTraversal">: gremlin "GenericLiteralArgumentAndNestedTraversal",
-  "traversal">: gremlin "NestedTraversal"]
-
-traversalPredicateAndNestedTraversal :: Binding
-traversalPredicateAndNestedTraversal = define "TraversalPredicateAndNestedTraversal" $ T.record [
-  "predicate">: gremlin "TraversalPredicate",
-  "traversal">: gremlin "NestedTraversal"]
-
-traversalMergeArgumentAndGenericLiteralMapNullableArgument :: Binding
-traversalMergeArgumentAndGenericLiteralMapNullableArgument = define "TraversalMergeArgumentAndGenericLiteralMapNullableArgument" $ T.record [
-  "merge">: gremlin "TraversalMergeArgument",
-  "map">: gremlin "GenericLiteralMapNullableArgument",
-  "cardinality">: T.optional $ gremlin "TraversalCardinality"]
-
-traversalMergeArgumentAndNestedTraversal :: Binding
-traversalMergeArgumentAndNestedTraversal = define "TraversalMergeArgumentAndNestedTraversal" $ T.record [
-  "merge">: gremlin "TraversalMergeArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-genericLiteralArgumentAndNestedTraversal :: Binding
-genericLiteralArgumentAndNestedTraversal = define "GenericLiteralArgumentAndNestedTraversal" $ T.record [
-  "object">: gremlin "GenericLiteralArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-propertyArgs :: Binding
-propertyArgs = define "PropertyArgs" $ T.union [
-  "cardinalityObjects">: gremlin "TraversalCardinalityArgumentAndObjects",
-  "objects">: minLengthList 2 $ gremlin "GenericLiteralArgument",
-  "object">: gremlin "GenericLiteralMapNullableArgument",
-  "cardinalityObject">: gremlin "GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"]
-
-traversalCardinalityArgumentAndObjects :: Binding
-traversalCardinalityArgumentAndObjects = define "TraversalCardinalityArgumentAndObjects" $ T.record [
-  "cardinality">: gremlin "TraversalCardinalityArgument",
-  "objects">: minLengthList 2 $ gremlin "GenericLiteralArgument"]
-
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgument :: Binding
-genericLiteralMapNullableArgumentAndTraversalCardinalityArgument = define "GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument" $ T.record [
-  "cardinality">: gremlin "TraversalCardinalityArgument",
-  "object">: gremlin "GenericLiteralMapNullableArgument"]
-
-rangeArgs :: Binding
-rangeArgs = define "RangeArgs" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "min">: gremlin "IntegerArgument",
-  "max">: gremlin "IntegerArgument"]
-
-optionalStringArgumentAndNestedTraversal :: Binding
-optionalStringArgumentAndNestedTraversal = define "OptionalStringArgumentAndNestedTraversal" $ T.record [
-  "string">: T.optional $ gremlin "StringArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-optionalTraversalScopeArgumentAndIntegerArgument :: Binding
-optionalTraversalScopeArgumentAndIntegerArgument = define "OptionalTraversalScopeArgumentAndIntegerArgument" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "long">: gremlin "IntegerArgument"]
-
-selectArgs :: Binding
-selectArgs = define "SelectArgs" $ T.union [
-  "column">: gremlin "TraversalColumnArgument",
-  "popStrings">: gremlin "PopStringsArgument",
-  "popTraversal">: gremlin "TraversalPopArgumentAndNestedTraversal",
-  "strings">: nonemptyList $ gremlin "StringArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-popStringsArgument :: Binding
-popStringsArgument = define "PopStringsArgument" $ T.record [
-  "pop">: gremlin "TraversalPopArgument",
-  "string">: nonemptyList $ gremlin "StringArgument"]
-
-traversalPopArgumentAndNestedTraversal :: Binding
-traversalPopArgumentAndNestedTraversal = define "TraversalPopArgumentAndNestedTraversal" $ T.record [
-  "pop">: gremlin "TraversalPopArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-tailArgs :: Binding
-tailArgs = define "TailArgs" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "integer">: T.optional $ gremlin "IntegerArgument"]
-
-toArgs :: Binding
-toArgs = define "ToArgs" $ T.union [
-  "direction">: gremlin "DirectionAndVarargs",
-  "string">: gremlin "StringArgument",
-  "vertex">: gremlin "StructureVertexArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-directionAndVarargs :: Binding
-directionAndVarargs = define "DirectionAndVarargs" $ T.record [
-  "direction">: gremlin "TraversalDirectionArgument",
-  "varargs">: T.list $ gremlin "StringNullableArgument"]
-
-valueMapArgs :: Binding
-valueMapArgs = define "ValueMapArgs" $ T.union [
-  "string">: nonemptyList $ gremlin "StringNullableArgument",
-  "boolean">: gremlin "ValueMapBooleanArgs"]
-
-valueMapBooleanArgs :: Binding
-valueMapBooleanArgs = define "ValueMapBooleanArgs" $ T.record [
-  "value">: gremlin "BooleanArgument",
-  "keys">: T.optional $ nonemptyList $ gremlin "StringNullableArgument"]
-
-whereArgs :: Binding
-whereArgs = define "WhereArgs" $ T.union [
-  "predicate">: gremlin "WhereWithPredicateArgs",
-  "string">: gremlin "StringArgument",
-  "traversal">: gremlin "NestedTraversal"]
-
-whereWithPredicateArgs :: Binding
-whereWithPredicateArgs = define "WhereWithPredicateArgs" $ T.record [
-  "leftArg">: T.optional $ gremlin "StringArgument",
-  "predicate">: gremlin "TraversalPredicate"]
-
-withArgs :: Binding
-withArgs = define "WithArgs" $ T.record [
-  "keys">: gremlin "WithArgsKeys",
-  "values">: T.optional $ gremlin "WithArgsValues"]
-
-withArgsKeys :: Binding
-withArgsKeys = define "WithArgsKeys" $ T.union [
-  "withOption">: gremlin "WithOptionKeys",
-  "string">: gremlin "StringArgument"]
-
-withArgsValues :: Binding
-withArgsValues = define "WithArgsValues" $ T.union [
-  "withOptions">: gremlin "WithOptionsValues",
-  "io">: gremlin "IoOptionsValues",
-  "object">: gremlin "GenericLiteralArgument"]
-
-concatArgs :: Binding
-concatArgs = define "ConcatArgs" $ T.union [
-  "traversal">: nonemptyList $ gremlin "NestedTraversal",
-  "string">: nonemptyList $ gremlin "StringNullableArgument"]
-
-replaceArgs :: Binding
-replaceArgs = define "ReplaceArgs" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "from">: gremlin "StringNullableArgument",
-  "to">: gremlin "StringNullableArgument"]
-
-splitArgs :: Binding
-splitArgs = define "SplitArgs" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "delimiter">: gremlin "StringNullableArgument"]
-
-substringArgs :: Binding
-substringArgs = define "SubstringArgs" $ T.record [
-  "scope">: T.optional $ gremlin "TraversalScopeArgument",
-  "start">: gremlin "IntegerArgument",
-  "end">: T.optional $ gremlin "IntegerArgument"]
-
-dateAddArgs :: Binding
-dateAddArgs = define "DateAddArgs" $ T.record [
-  "unit">: gremlin "TraversalDTArgument",
-  "duration">: gremlin "IntegerArgument"]
-
-dateDiffArgs :: Binding
-dateDiffArgs = define "DateDiffArgs" $ T.union [
-  "traversal">: gremlin "NestedTraversal",
-  "date">: gremlin "DateArgument"]
-
-structureVertex :: Binding
-structureVertex = define "StructureVertex" $ T.record [
-  "new">: T.boolean,
-  "id">: gremlin "GenericLiteralArgument",
-  "label">: gremlin "StringArgument"]
-
-traversalStrategy :: Binding
-traversalStrategy = define "TraversalStrategy" $ T.record [
-  "new">: T.boolean,
-  "class">: gremlin "Identifier",
-  "configurations">: T.list $ gremlin "Configuration"]
-
-configuration :: Binding
-configuration = define "Configuration" $ T.record [
-  "key">: gremlin "KeywordOrIdentifier",
-  "value">: gremlin "GenericLiteralArgument"]
-
-keywordOrIdentifier :: Binding
-keywordOrIdentifier = define "KeywordOrIdentifier" $ T.union [
-  "keyword">: gremlin "Keyword",
-  "identifier">: gremlin "Identifier"]
-
-traversalScope :: Binding
-traversalScope = define "TraversalScope" $ T.enum [
-  "local",
-  "global"]
-
-traversalToken :: Binding
-traversalToken = define "TraversalToken" $ T.enum [
-  "id",
-  "label",
-  "key",
-  "value"]
-
-traversalMerge :: Binding
-traversalMerge = define "TraversalMerge" $ T.enum [
-  "onCreate",
-  "onMatch",
-  "outV",
-  "inV"]
-
-traversalOrder :: Binding
-traversalOrder = define "TraversalOrder" $ T.enum [
-  "incr",
-  "decr",
-  "asc",
-  "desc",
-  "shuffle"]
-
-traversalDirection :: Binding
-traversalDirection = define "TraversalDirection" $ T.enum [
-  "in",
-  "out",
-  "both"]
-
-traversalCardinality :: Binding
-traversalCardinality = define "TraversalCardinality" $ T.union [
-  "single">: gremlin "GenericLiteral",
-  "set">: gremlin "GenericLiteral",
-  "list">: gremlin "GenericLiteral"]
-
-traversalColumn :: Binding
-traversalColumn = define "TraversalColumn" $ T.enum [
-  "keys",
-  "values"]
-
-traversalPop :: Binding
-traversalPop = define "TraversalPop" $ T.enum [
-  "first",
-  "last",
-  "all",
-  "mixed"]
-
-traversalOperator :: Binding
-traversalOperator = define "TraversalOperator" $ T.enum [
-  "addAll",
-  "and",
-  "assign",
-  "div",
-  "max",
-  "min",
-  "minus",
-  "mult",
-  "or",
-  "sum",
-  "sumLong"]
-
-traversalPick :: Binding
-traversalPick = define "TraversalPick" $ T.enum [
-  "any",
-  "none"]
-
-traversalDT :: Binding
-traversalDT = define "TraversalDT" $ T.enum [
-  "second",
-  "minute",
-  "hour",
-  "day"]
-
-traversalPredicate :: Binding
-traversalPredicate = define "TraversalPredicate" $ T.union [
-  "eq">: gremlin "GenericLiteralArgument",
-  "neq">: gremlin "GenericLiteralArgument",
-  "lt">: gremlin "GenericLiteralArgument",
-  "lte">: gremlin "GenericLiteralArgument",
-  "gt">: gremlin "GenericLiteralArgument",
-  "gte">: gremlin "GenericLiteralArgument",
-  "inside">: gremlin "RangeArgument",
-  "outside">: gremlin "RangeArgument",
-  "between">: gremlin "RangeArgument",
-  "within">: T.optional $ gremlin "GenericLiteralArgument",
-  "without">: T.optional $ gremlin "GenericLiteralArgument",
-  "not">: gremlin "TraversalPredicate",
-  "startingWith">: gremlin "StringArgument",
-  "notStartingWith">: gremlin "StringArgument",
-  "endingWith">: gremlin "StringArgument",
-  "notEndingWith">: gremlin "StringArgument",
-  "containing">: gremlin "StringArgument",
-  "notContaining">: gremlin "StringArgument",
-  "regex">: gremlin "StringArgument",
-  "notRegex">: gremlin "StringArgument",
-  "and">: gremlin "TwoTraversalPredicates",
-  "or">: gremlin "TwoTraversalPredicates",
-  "negate">: gremlin "TraversalPredicate"]
-
-twoTraversalPredicates :: Binding
-twoTraversalPredicates = define "TwoTraversalPredicates" $ T.record [
-  "left">: gremlin "TraversalPredicate",
-  "right">: gremlin "TraversalPredicate"]
-
-traversalTerminalMethod :: Binding
-traversalTerminalMethod = define "TraversalTerminalMethod" $ T.union [
-  "explain">: T.unit,
-  "iterate">: T.unit,
-  "hasNext">: T.unit,
-  "tryNext">: T.unit,
-  "next">: T.optional $ gremlin "IntegerLiteral",
-  "toList">: T.unit,
-  "toSet">: T.unit,
-  "toBulkSet">: T.unit]
-
-traversalSelfMethod :: Binding
-traversalSelfMethod = define "TraversalSelfMethod" $ T.enum [
-  "discard"]
-
-traversalFunction :: Binding
-traversalFunction = define "TraversalFunction" $ T.union [
-  "token">: gremlin "TraversalToken",
-  "column">: gremlin "TraversalColumn"]
-
-rangeArgument :: Binding
-rangeArgument = define "RangeArgument" $ T.record [
-  "min">: gremlin "GenericLiteralArgument",
-  "max">: gremlin "GenericLiteralArgument"]
-
-withOptionKeys :: Binding
-withOptionKeys = define "WithOptionKeys" $ T.union [
-  "shortestPath">: gremlin "ShortestPathConstants",
-  "connectedComponent">: gremlin "ConnectedComponentConstants",
-  "pageRank">: gremlin "PageRankConstants",
-  "peerPressure">: gremlin "PeerPressureConstants",
-  "io">: gremlin "IoOptionsKeys",
-  "withOptionsTokens">: T.unit,
-  "withOptionsIndexer">: T.unit]
-
-connectedComponentConstants :: Binding
-connectedComponentConstants = define "ConnectedComponentConstants" $ T.enum [
-  "component",
-  "edges",
-  "propertyName"]
-
-pageRankConstants :: Binding
-pageRankConstants = define "PageRankConstants" $ T.enum [
-  "edges",
-  "times",
-  "propertyName"]
-
-peerPressureConstants :: Binding
-peerPressureConstants = define "PeerPressureConstants" $ T.enum [
-  "edges",
-  "times",
-  "propertyName"]
-
-shortestPathConstants :: Binding
-shortestPathConstants = define "ShortestPathConstants" $ T.enum [
-  "target",
-  "edges",
-  "distance",
-  "maxDistance",
-  "includeEdges"]
-
-withOptionsValues :: Binding
-withOptionsValues = define "WithOptionsValues" $ T.enum [
-  "tokens",
-  "none",
-  "ids",
-  "labels",
-  "keys",
-  "values",
-  "all",
-  "list",
-  "map"]
-
-ioOptionsKeys :: Binding
-ioOptionsKeys = define "IoOptionsKeys" $ T.enum [
-  "reader",
-  "writer"]
-
-ioOptionsValues :: Binding
-ioOptionsValues = define "IoOptionsValues" $ T.enum [
-  "gryo",
-  "graphson",
-  "graphml"]
-
--- Argument types
-
-booleanArgument :: Binding
-booleanArgument = defArgument "BooleanArgument" T.boolean
-
-integerArgument :: Binding
-integerArgument = defArgument "IntegerArgument" $ gremlin "IntegerLiteral"
-
-floatArgument :: Binding
-floatArgument = defArgument "FloatArgument" $ gremlin "FloatLiteral"
-
-stringArgument :: Binding
-stringArgument = defArgument "StringArgument" T.string
-
-stringNullableArgument :: Binding
-stringNullableArgument = defArgument "StringNullableArgument" $ T.optional T.string
-
-dateArgument :: Binding
-dateArgument = defArgument "DateArgument" $ gremlin "DateLiteral"
-
-genericLiteralArgument :: Binding
-genericLiteralArgument = defArgument "GenericLiteralArgument" $ gremlin "GenericLiteral"
-
-genericLiteralListArgument :: Binding
-genericLiteralListArgument = defArgument "GenericLiteralListArgument" $ gremlin "GenericLiteralList"
-
-genericLiteralMapArgument :: Binding
-genericLiteralMapArgument = defArgument "GenericLiteralMapArgument" $ gremlin "GenericLiteralMap"
-
-genericLiteralMapNullableArgument :: Binding
-genericLiteralMapNullableArgument = defArgument "GenericLiteralMapNullableArgument" $ T.optional $ gremlin "GenericLiteralMap"
-
-structureVertexArgument :: Binding
-structureVertexArgument = defArgument "StructureVertexArgument" $ gremlin "StructureVertex"
-
-traversalCardinalityArgument :: Binding
-traversalCardinalityArgument = defArgument "TraversalCardinalityArgument" $ gremlin "TraversalCardinality"
-
-traversalColumnArgument :: Binding
-traversalColumnArgument = defArgument "TraversalColumnArgument" $ gremlin "TraversalColumn"
-
-traversalDirectionArgument :: Binding
-traversalDirectionArgument = defArgument "TraversalDirectionArgument" $ gremlin "TraversalDirection"
-
-traversalMergeArgument :: Binding
-traversalMergeArgument = defArgument "TraversalMergeArgument" $ gremlin "TraversalMerge"
-
-traversalOrderArgument :: Binding
-traversalOrderArgument = defArgument "TraversalOrderArgument" $ gremlin "TraversalOrder"
-
-traversalPopArgument :: Binding
-traversalPopArgument = defArgument "TraversalPopArgument" $ gremlin "TraversalPop"
-
-traversalSackMethodArgument :: Binding
-traversalSackMethodArgument = defArgument "TraversalSackMethodArgument" T.unit
-
-traversalScopeArgument :: Binding
-traversalScopeArgument = defArgument "TraversalScopeArgument" $ gremlin "TraversalScope"
-
-traversalTokenArgument :: Binding
-traversalTokenArgument = defArgument "TraversalTokenArgument" $ gremlin "TraversalToken"
-
-traversalComparatorArgument :: Binding
-traversalComparatorArgument = defArgument "TraversalComparatorArgument" $ gremlin "TraversalOrder"
-
-traversalFunctionArgument :: Binding
-traversalFunctionArgument = defArgument "TraversalFunctionArgument" $ gremlin "TraversalFunction"
-
-traversalBiFunctionArgument :: Binding
-traversalBiFunctionArgument = defArgument "TraversalBiFunctionArgument" $ gremlin "TraversalOperator"
-
-traversalDTArgument :: Binding
-traversalDTArgument = defArgument "TraversalDTArgument" $ gremlin "TraversalDT"
-
--- Literal types
-
-genericLiteralList :: Binding
-genericLiteralList = define "GenericLiteralList" $ T.wrap $ T.list $ gremlin "GenericLiteral"
-
-genericLiteralRange :: Binding
-genericLiteralRange = define "GenericLiteralRange" $ T.union [
-  "integer">: gremlin "IntegerRange",
-  "string">: gremlin "StringRange"]
-
-integerRange :: Binding
-integerRange = define "IntegerRange" $ T.record [
-  "left">: gremlin "IntegerLiteral",
-  "right">: gremlin "IntegerLiteral"]
-
-stringRange :: Binding
-stringRange = define "StringRange" $ T.record [
-  "left">: T.string,
-  "right">: T.string]
-
-genericLiteralSet :: Binding
-genericLiteralSet = define "GenericLiteralSet" $ T.wrap $ T.list $ gremlin "GenericLiteral"
-
-genericLiteralCollection :: Binding
-genericLiteralCollection = define "GenericLiteralCollection" $ T.wrap $ T.list $ gremlin "GenericLiteral"
-
-genericLiteral :: Binding
-genericLiteral = define "GenericLiteral" $ T.union [
-  "numeric">: gremlin "NumericLiteral",
-  "boolean">: T.boolean,
-  "string">: T.string,
-  "date">: gremlin "DateLiteral",
-  "null">: T.unit,
-  "nan">: T.unit,
-  "inf">: T.unit,
-  "traversalToken">: gremlin "TraversalToken",
-  "traversalCardinality">: gremlin "TraversalCardinality",
-  "traversalDirection">: gremlin "TraversalDirection",
-  "traversalMerge">: gremlin "TraversalMerge",
-  "traversalPick">: gremlin "TraversalPick",
-  "traversalDT">: gremlin "TraversalDT",
-  "structureVertex">: gremlin "StructureVertex",
-  "genericLiteralSet">: gremlin "GenericLiteralSet",
-  "genericLiteralCollection">: gremlin "GenericLiteralCollection",
-  "genericLiteralRange">: gremlin "GenericLiteralRange",
-  "nestedTraversal">: gremlin "NestedTraversal",
-  "terminatedTraversal">: gremlin "TerminatedTraversal",
-  "genericLiteralMap">: gremlin "GenericLiteralMap"]
-
-genericLiteralMap :: Binding
-genericLiteralMap = define "GenericLiteralMap" $ T.wrap $ T.list $ gremlin "MapEntry"
-
-mapEntry :: Binding
-mapEntry = define "MapEntry" $ T.union [
-  "key">: gremlin "MapKey",
-  "value">: gremlin "GenericLiteral"]
-
-mapKey :: Binding
-mapKey = define "MapKey" $ T.union [
-  "string">: T.string,
-  "numeric">: gremlin "NumericLiteral",
-  "traversalToken">: gremlin "TraversalToken",
-  "traversalDirection">: gremlin "TraversalDirection",
-  "set">: gremlin "GenericLiteralSet",
-  "collection">: gremlin "GenericLiteralCollection",
-  "map">: gremlin "GenericLiteralMap",
-  "keyword">: gremlin "Keyword",
-  "identifier">: gremlin "Identifier"]
-
-integerLiteral :: Binding
-integerLiteral = define "IntegerLiteral" $ T.wrap T.bigint
-
-floatLiteral :: Binding
-floatLiteral = define "FloatLiteral" $ T.wrap T.bigfloat
-
-numericLiteral :: Binding
-numericLiteral = define "NumericLiteral" $ T.union [
-  "integer">: gremlin "IntegerLiteral",
-  "float">: gremlin "FloatLiteral"]
-
-dateLiteral :: Binding
-dateLiteral = define "DateLiteral" $ T.wrap $ T.optional $ gremlin "StringArgument"
-
-keyword :: Binding
-keyword = define "Keyword" $ T.enum [
-  "edges",
-  "keys",
-  "new",
-  "values"]
-
-identifier :: Binding
-identifier = define "Identifier" $ T.wrap T.string
diff --git a/src/main/haskell/Hydra/Sources/Tinkerpop/Language.hs b/src/main/haskell/Hydra/Sources/Tinkerpop/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Tinkerpop/Language.hs
+++ /dev/null
@@ -1,224 +0,0 @@
-module Hydra.Sources.Tinkerpop.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import qualified Hydra.Tinkerpop.Features as TF
-import qualified Hydra.Sources.Tinkerpop.Features as TinkerpopFeatures
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.tinkerpop.language"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Strip.ns],
-            moduleTypeDependencies = (TinkerpopFeatures.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "Language constraints based on TinkerPop Graph.Features"}
-  where
-    definitions = [
-      toDefinition tinkerpopLanguage]
-
-
--- | Populate language constraints based on TinkerPop Graph.Features.
--- Note: although Graph.Features is phrased such that it defaults to supporting features not explicitly mentioned,
---       for Hydra we cannot support a term or type pattern unless it is provably safe in the target environment.
---       Otherwise, generated expressions could cause failure during runtime operations.
--- Also note that extra features are required on top of Graph.Features, again for reasons of completeness.
-tinkerpopLanguage :: TTermDefinition (LanguageName -> TF.Features -> TF.ExtraFeatures a -> Language)
-tinkerpopLanguage = define "tinkerpopLanguage" $
-  doc "Populate language constraints based on TinkerPop Graph.Features" $
-  lambda "name" $ lambda "features" $ lambda "extras" $ lets [
-    -- Extract vertex property data type features
-    "vpFeatures">:
-      project TF._VertexPropertyFeatures TF._VertexPropertyFeatures_dataTypeFeatures @@
-        (project TF._VertexFeatures TF._VertexFeatures_properties @@
-          (project TF._Features TF._Features_vertex @@ var "features")),
-
-    -- Helper: conditional inclusion
-    "cond">: lambda "v" $ lambda "b" $
-      Logic.ifElse (var "b") (Maybes.pure (var "v")) nothing,
-
-    -- Whether lists are supported (any array type is supported)
-    "supportsLists">:
-      Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsBooleanArrayValues @@ var "vpFeatures")
-        (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsByteArrayValues @@ var "vpFeatures")
-        (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsDoubleArrayValues @@ var "vpFeatures")
-        (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsFloatArrayValues @@ var "vpFeatures")
-        (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsIntegerArrayValues @@ var "vpFeatures")
-        (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsLongArrayValues @@ var "vpFeatures")
-          (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsStringArrayValues @@ var "vpFeatures")))))),
-
-    -- Support for at least one of the Graph.Features literal types is assumed.
-    "supportsLiterals">: true,
-
-    -- Note: additional constraints are required, beyond Graph.Features, if maps are supported
-    "supportsMaps">: project TF._DataTypeFeatures TF._DataTypeFeatures_supportsMapValues @@ var "vpFeatures",
-
-    "eliminationVariants">: Sets.empty,
-
-    "literalVariants">: Sets.fromList (Maybes.cat $ list [
-      var "cond" @@ Variants.literalVariantBinary
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsByteArrayValues @@ var "vpFeatures"),
-      var "cond" @@ Variants.literalVariantBoolean
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsBooleanValues @@ var "vpFeatures"),
-      var "cond" @@ Variants.literalVariantFloat
-        @@ (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsFloatValues @@ var "vpFeatures")
-                     (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsDoubleValues @@ var "vpFeatures")),
-      var "cond" @@ Variants.literalVariantInteger
-        @@ (Logic.or (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsIntegerValues @@ var "vpFeatures")
-                     (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsLongValues @@ var "vpFeatures")),
-      var "cond" @@ Variants.literalVariantString
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsStringValues @@ var "vpFeatures")]),
-
-    "floatTypes">: Sets.fromList (Maybes.cat $ list [
-      var "cond" @@ Core.floatTypeFloat32
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsFloatValues @@ var "vpFeatures"),
-      var "cond" @@ Core.floatTypeFloat64
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsDoubleValues @@ var "vpFeatures")]),
-
-    "functionVariants">: Sets.empty,
-
-    "integerTypes">: Sets.fromList (Maybes.cat $ list [
-      var "cond" @@ Core.integerTypeInt32
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsIntegerValues @@ var "vpFeatures"),
-      var "cond" @@ Core.integerTypeInt64
-        @@ (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsLongValues @@ var "vpFeatures")]),
-
-    -- Only lists and literal values may be explicitly supported via Graph.Features.
-    "termVariants">: Sets.fromList (Maybes.cat $ list [
-      var "cond" @@ Variants.termVariantList @@ var "supportsLists",
-      var "cond" @@ Variants.termVariantLiteral @@ var "supportsLiterals",
-      var "cond" @@ Variants.termVariantMap @@ var "supportsMaps",
-      -- An optional value translates to an absent vertex property
-      Maybes.pure Variants.termVariantMaybe]),
-
-    "typeVariants">: Sets.fromList (Maybes.cat $ list [
-      var "cond" @@ Variants.typeVariantList @@ var "supportsLists",
-      var "cond" @@ Variants.typeVariantLiteral @@ var "supportsLiterals",
-      var "cond" @@ Variants.typeVariantMap @@ var "supportsMaps",
-      Maybes.pure Variants.typeVariantMaybe,
-      Maybes.pure Variants.typeVariantWrap]),
-
-    "typePredicate">: "typ" ~> lets [
-      "dt">: Strip.deannotateType @@ var "typ"] $
-      cases _Type (var "dt") (Just true) [
-        -- Only lists of literal values are supported, as nothing else is mentioned in Graph.Features
-        _Type_list>>: "t" ~> cases _Type (Strip.deannotateType @@ var "t") (Just false) [
-          _Type_literal>>: "lt" ~> cases _LiteralType (var "lt") (Just false) [
-            _LiteralType_boolean>>: constant
-              (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsBooleanArrayValues @@ var "vpFeatures"),
-            _LiteralType_float>>: "ft" ~> cases _FloatType (var "ft") (Just false) [
-              _FloatType_float64>>: constant
-                (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsDoubleArrayValues @@ var "vpFeatures"),
-              _FloatType_float32>>: constant
-                (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsFloatArrayValues @@ var "vpFeatures")],
-            _LiteralType_integer>>: "it" ~> cases _IntegerType (var "it") (Just false) [
-              _IntegerType_uint8>>: constant
-                (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsByteArrayValues @@ var "vpFeatures"),
-              _IntegerType_int32>>: constant
-                (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsIntegerArrayValues @@ var "vpFeatures"),
-              _IntegerType_int64>>: constant
-                (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsLongArrayValues @@ var "vpFeatures")],
-            _LiteralType_string>>: constant
-              (project TF._DataTypeFeatures TF._DataTypeFeatures_supportsStringArrayValues @@ var "vpFeatures")]],
-        _Type_literal>>: constant true,
-        _Type_map>>: "mt" ~>
-          project TF._ExtraFeatures TF._ExtraFeatures_supportsMapKey @@ var "extras"
-            @@ (project _MapType _MapType_keys @@ var "mt"),
-        _Type_wrap>>: constant true,
-        _Type_maybe>>: "ot" ~> cases _Type (Strip.deannotateType @@ var "ot") (Just false) [
-          _Type_literal>>: constant true]]] $
-
-  Coders.language
-    (var "name")
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
diff --git a/src/main/haskell/Hydra/Sources/TypeScript/Language.hs b/src/main/haskell/Hydra/Sources/TypeScript/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/TypeScript/Language.hs
+++ /dev/null
@@ -1,151 +0,0 @@
-module Hydra.Sources.TypeScript.Language (module_) where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.typeScript.language"),
-            moduleDefinitions = [toDefinition typeScriptLanguage, toDefinition typeScriptReservedWords],
-            moduleTermDependencies = [Strip.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for TypeScript"}
-typeScriptLanguage :: TTermDefinition Language
-typeScriptLanguage = define "typeScriptLanguage" $
-  doc "Language constraints for TypeScript" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [
-    Core.floatTypeFloat64],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [
-    Core.integerTypeBigint],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantList,
-    Variants.termVariantLiteral,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord,
-    Variants.termVariantInject],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantList,
-    Variants.typeVariantLiteral,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord,
-    Variants.typeVariantUnion],
-  "types">: match _Type
-    (Just true) [
-    _Type_map>>: "mt" ~> (cases _Type ((Strip.deannotateType @@ (Core.mapTypeValues $ var "mt")))
-      (Just true) [
-      _Type_maybe>>: constant false])]] $
-  Coders.language
-    (Coders.languageName_ (string "hydra.typeScript"))
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "types"))
-
-typeScriptReservedWords :: TTermDefinition (S.Set String)
-typeScriptReservedWords = define "typeScriptReservedWords" $
-  doc ("A set of reserved words in TypeScript."
-    <> " Taken directly from https://github.com/microsoft/TypeScript/issues/2536") $ lets [
-  "reservedWords">: list [
-    "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "import",
-    "in", "instanceof", "new", "null", "return", "super", "switch", "this", "throw", "true", "try", "typeof", "var",
-    "void", "while", "with"],
-  "strictModeReservedWords">: list [
-    "as", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
-  "contextuallKeywords">: list [
-    "any", "boolean", "constructor", "declare", "from", "get", "module", "number", "of", "require", "set", "string",
-    "symbol", "type"]] $
-  Sets.fromList $ Lists.concat $
-    list [var "reservedWords", var "strictModeReservedWords", var "contextuallKeywords"]
diff --git a/src/main/haskell/Hydra/Sources/TypeScript/Model.hs b/src/main/haskell/Hydra/Sources/TypeScript/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/TypeScript/Model.hs
+++ /dev/null
@@ -1,105 +0,0 @@
-module Hydra.Sources.TypeScript.Model where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.typeScript.model"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-ts :: String -> Type
-ts = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A basic TypeScript model, constructed on the basis of the typescriptlang.org documentation"}
-  where
-    definitions = [
-      functionType,
-      parameter,
-      primitiveType_,
-      type_]
-
-functionType :: Binding
-functionType = define "FunctionType" $
-  T.record [
-    "parameters">: T.list $ ts "Parameter",
-    "range">: ts "Type"]
-
-parameter :: Binding
-parameter = define "Parameter" $
-  T.record [
-    "name">: T.string,
-    "type">: ts "Type"]
-
-primitiveType_ :: Binding
-primitiveType_ = define "PrimitiveType" $
-  T.union [
-    "bigint">:
-      doc "integers in the arbitrary precision format"
-      T.unit,
-    "boolean">:
-      doc "true and false"
-      T.unit,
-    "null">:
-      doc "equivalent to the unit type"
-      T.unit,
-    "number">:
-      doc "a double-precision IEEE 754 floating point"
-      T.unit,
-    "object">:
-      doc "similar to records"
-      T.unit,
-    "string">:
-      doc "an immutable UTF-16 string"
-      T.unit,
-    "symbol">:
-      doc "a unique value usually used as a key"
-      T.unit,
-    "undefined">:
-      doc "also equivalent to the unit type"
-      T.unit]
-
-type_ :: Binding
-type_ = define "Type" $
-  T.union [
-    "array">:
-      doc "mutable arrays, also written Array<T>" $
-      ts "Type",
-    "function">:
-      doc "functions" $
-      ts "FunctionType",
-    "never">:
-      doc "the bottom type"
-      T.unit,
-    "objectLiteral">:
-      doc "e.g. { property: Type }"
-      T.unit,
-    "primitive">:
-      doc "A primitive type" $
-      ts "PrimitiveType",
-    "tuple">:
-      doc "tuples, which are fixed-length but mutable" $
-      T.list $ ts "Type",
-    "unknown">:
-      doc "The top type"
-      T.unit,
-    "void">:
-      doc "for functions with no documented return value"
-      T.unit]
diff --git a/src/main/haskell/Hydra/Sources/Validate/Pg.hs b/src/main/haskell/Hydra/Sources/Validate/Pg.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Validate/Pg.hs
+++ /dev/null
@@ -1,239 +0,0 @@
-module Hydra.Sources.Validate.Pg where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel hiding (Edge(..), _Edge, _Edge_in, _Edge_out, Element(..), _Element, Graph(..), _Graph)
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import           Prelude hiding ((++))
-import qualified Data.Map                                  as M
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Pg.Model as PG
-import Hydra.Error.Pg as Err
-import qualified Hydra.Sources.Pg.Model as PgModel
-import qualified Hydra.Sources.Error.Pg as ErrorPg
-
-
-validationDefinition :: String -> TTerm a -> TTermDefinition a
-validationDefinition = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.validate.pg"),
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = [PgModel.ns, ErrorPg.ns],
-            moduleDescription = Just "Validation functions for property graphs"}
-  where
-   definitions = [
-     toDefinition checkAll,
-     toDefinition validateEdge,
-     toDefinition validateGraph,
-     toDefinition validateProperties,
-     toDefinition validateVertex]
-
-checkAll :: TTermDefinition ([Y.Maybe a] -> Y.Maybe a)
-checkAll = validationDefinition "checkAll" $
-  "checks" ~> lets [
-    "errors">: Maybes.cat $ var "checks"]
-    $ Lists.maybeHead $ var "errors"
-
-validateVertex :: TTermDefinition (
-     (t -> v -> Maybe InvalidValueError)
-  -> PG.VertexType t
-  -> PG.Vertex v
-  -> Y.Maybe InvalidVertexError)
-validateVertex = validationDefinition "validateVertex" $
-  "checkValue" ~> "typ" ~> "el" ~> lets [
-    "checkLabel">: lets [
-      "expected">: project _VertexType _VertexType_label @@ var "typ",
-      "actual">: project _Vertex _Vertex_label @@ var "el"]
-      $ Logic.ifElse
-          (Equality.equal
-            (unwrap _VertexLabel @@ var "actual")
-            (unwrap _VertexLabel @@ var "expected"))
-          nothing
-          (just $ inject _InvalidVertexError _InvalidVertexError_label $
-            record _NoSuchVertexLabelError [
-              _NoSuchVertexLabelError_label>>: var "actual"]),
-    "checkId">: Maybes.map
-      ("err" ~> inject _InvalidVertexError _InvalidVertexError_id $ var "err")
-      (var "checkValue" @@ (project _VertexType _VertexType_id @@ var "typ") @@ (project _Vertex _Vertex_id @@ var "el")),
-    "checkProperties">: Maybes.map
-      ("err" ~> inject _InvalidVertexError _InvalidVertexError_property $ var "err")
-      (validateProperties
-        @@ var "checkValue"
-        @@ (project _VertexType _VertexType_properties @@ var "typ")
-        @@ (project _Vertex _Vertex_properties @@ var "el"))]
-    $ checkAll @@ list [var "checkLabel", var "checkId", var "checkProperties"]
-
-validateEdge :: TTermDefinition (
-     (t -> v -> Maybe InvalidValueError)
-  -> Y.Maybe (v -> Y.Maybe PG.VertexLabel)
-  -> PG.EdgeType t
-  -> PG.Edge v
-  -> Y.Maybe InvalidEdgeError)
-validateEdge = validationDefinition "validateEdge" $
-  "checkValue" ~> "labelForVertexId" ~> "typ" ~> "el" ~>
-    lets [
-      "checkLabel">: lets [
-        "expected">: project _EdgeType _EdgeType_label @@ var "typ",
-        "actual">: project _Edge _Edge_label @@ var "el"]
-        $ Logic.ifElse
-            (Equality.equal
-              (unwrap _EdgeLabel @@ var "actual")
-              (unwrap _EdgeLabel @@ var "expected"))
-            nothing
-            (just $ inject _InvalidEdgeError _InvalidEdgeError_label $
-              record _NoSuchEdgeLabelError [
-                _NoSuchEdgeLabelError_label>>: var "actual"]),
-      "checkId">: Maybes.map
-        ("err" ~> inject _InvalidEdgeError _InvalidEdgeError_id $ var "err")
-        (var "checkValue" @@ (project _EdgeType _EdgeType_id @@ var "typ") @@ (project _Edge _Edge_id @@ var "el")),
-      "checkProperties">: Maybes.map
-        ("err" ~> inject _InvalidEdgeError _InvalidEdgeError_property $ var "err")
-        (validateProperties
-          @@ var "checkValue"
-          @@ (project _EdgeType _EdgeType_properties @@ var "typ")
-          @@ (project _Edge _Edge_properties @@ var "el")),
-      "checkOut">: Maybes.maybe
-        nothing
-        ("f" ~> Maybes.maybe
-          (just (inject _InvalidEdgeError _InvalidEdgeError_outVertexNotFound $ unit))
-          ("label" ~> Logic.ifElse
-            (Equality.equal
-              (unwrap _VertexLabel @@ var "label")
-              (unwrap _VertexLabel @@ (project _EdgeType _EdgeType_out @@ var "typ")))
-            nothing
-            (just $ inject _InvalidEdgeError _InvalidEdgeError_outVertexLabel $
-              record _WrongVertexLabelError [
-                _WrongVertexLabelError_expected>>: project _EdgeType _EdgeType_out @@ var "typ",
-                _WrongVertexLabelError_actual>>: var "label"]))
-          (var "f" @@ (project _Edge _Edge_out @@ var "el")))
-          (var "labelForVertexId"),
-      "checkIn">: Maybes.maybe
-        nothing
-        ("f" ~> Maybes.maybe
-          (just (inject _InvalidEdgeError _InvalidEdgeError_inVertexNotFound $ unit))
-          ("label" ~> Logic.ifElse
-            (Equality.equal
-              (unwrap _VertexLabel @@ var "label")
-              (unwrap _VertexLabel @@ (project _EdgeType _EdgeType_in @@ var "typ")))
-            nothing
-            (just $ inject _InvalidEdgeError _InvalidEdgeError_inVertexLabel $
-              record _WrongVertexLabelError [
-                _WrongVertexLabelError_expected>>: project _EdgeType _EdgeType_in @@ var "typ",
-                _WrongVertexLabelError_actual>>: var "label"]))
-          (var "f" @@ (project _Edge _Edge_in @@ var "el")))
-        (var "labelForVertexId")]
-      $ checkAll @@ list [var "checkLabel", var "checkId", var "checkProperties", var "checkOut", var "checkIn"]
-
-validateProperties :: TTermDefinition (
-     (t -> v -> Maybe InvalidValueError)
-  -> [PG.PropertyType t]
-  -> M.Map PG.PropertyKey v
-  -> Y.Maybe InvalidElementPropertyError)
-validateProperties = validationDefinition "validateProperties" $
-  "checkValue" ~> "types" ~> "props" ~> lets [
-    "checkTypes">: checkAll @@ (Lists.map (var "checkType") (var "types")),
-    "checkType">:
-      "t" ~> Logic.ifElse (project _PropertyType _PropertyType_required @@ var "t")
-        (Maybes.maybe
-          (just (record _InvalidElementPropertyError [
-            _InvalidElementPropertyError_key>>: project _PropertyType _PropertyType_key @@ var "t",
-            _InvalidElementPropertyError_error>>:
-              inject _InvalidPropertyError _InvalidPropertyError_missingRequired $
-                project _PropertyType _PropertyType_key @@ var "t"]))
-          (constant nothing)
-          (Maps.lookup (project _PropertyType _PropertyType_key @@ var "t") $ var "props"))
-        nothing,
-    "checkValues">: lets [
-      "m">: Maps.fromList (Lists.map
-          ("p" ~> pair
-            (project _PropertyType _PropertyType_key @@ var "p")
-            (project _PropertyType _PropertyType_value @@ var "p"))
-          (var "types")),
-      "checkPair">: "pair" ~> lets [
-        "key">: Pairs.first $ var "pair",
-        "val">: Pairs.second $ var "pair"]
-        $ Maybes.maybe
-          (just (record _InvalidElementPropertyError [
-            _InvalidElementPropertyError_key>>: var "key",
-            _InvalidElementPropertyError_error>>:
-              inject _InvalidPropertyError _InvalidPropertyError_unexpectedKey $ var "key"]))
-          ("typ" ~> Maybes.map
-            ("err" ~> record _InvalidElementPropertyError [
-              _InvalidElementPropertyError_key>>: var "key",
-              _InvalidElementPropertyError_error>>:
-                inject _InvalidPropertyError _InvalidPropertyError_invalidValue $ var "err"])
-            (var "checkValue" @@ var "typ" @@ var "val"))
-          (Maps.lookup (var "key") (var "m"))]
-      $ checkAll @@ (Lists.map (var "checkPair") (Maps.toList $ var "props"))]
-    $ checkAll @@ list [var "checkTypes", var "checkValues"]
-
-validateGraph :: TTermDefinition (
-     (t -> v -> Maybe InvalidValueError)
-  -> PG.GraphSchema t
-  -> PG.Graph v
-  -> Y.Maybe (InvalidGraphError v))
-validateGraph = validationDefinition "validateGraph" $
-  "checkValue" ~> "schema" ~> "graph" ~> lets [
-    "checkVertices">: lets [
-      "checkVertex">: "el" ~> Maybes.maybe
-        (just (inject _InvalidGraphError _InvalidGraphError_vertex $
-          record _InvalidGraphVertexError [
-            _InvalidGraphVertexError_id>>: project _Vertex _Vertex_id @@ var "el",
-            _InvalidGraphVertexError_error>>:
-              inject _InvalidVertexError _InvalidVertexError_label $
-                record _NoSuchVertexLabelError [
-                  _NoSuchVertexLabelError_label>>: project _Vertex _Vertex_label @@ var "el"]]))
-        ("t" ~> Maybes.map
-          ("err" ~> inject _InvalidGraphError _InvalidGraphError_vertex $
-            record _InvalidGraphVertexError [
-              _InvalidGraphVertexError_id>>: project _Vertex _Vertex_id @@ var "el",
-              _InvalidGraphVertexError_error>>: var "err"])
-          (validateVertex
-            @@ var "checkValue"
-            @@ var "t"
-            @@ var "el"))
-        (Maps.lookup
-          (project _Vertex _Vertex_label @@ var "el")
-          (project _GraphSchema _GraphSchema_vertices @@ var "schema"))]
-      $ checkAll
-          @@ (Lists.map (var "checkVertex") $ Maps.elems $ project _Graph _Graph_vertices @@ var "graph"),
-    "checkEdges">: lets [
-        "checkEdge">: "el" ~> Maybes.maybe
-          (just (inject _InvalidGraphError _InvalidGraphError_edge $
-            record _InvalidGraphEdgeError [
-              _InvalidGraphEdgeError_id>>: project _Edge _Edge_id @@ var "el",
-              _InvalidGraphEdgeError_error>>:
-                inject _InvalidEdgeError _InvalidEdgeError_label $
-                  record _NoSuchEdgeLabelError [
-                    _NoSuchEdgeLabelError_label>>: project _Edge _Edge_label @@ var "el"]]))
-          ("t" ~> Maybes.map
-            ("err" ~> inject _InvalidGraphError _InvalidGraphError_edge $
-              record _InvalidGraphEdgeError [
-                _InvalidGraphEdgeError_id>>: project _Edge _Edge_id @@ var "el",
-                _InvalidGraphEdgeError_error>>: var "err"])
-            (validateEdge
-              @@ var "checkValue"
-              @@ var "labelForVertexId"
-              @@ var "t"
-              @@ var "el"))
-          (Maps.lookup
-            (project _Edge _Edge_label @@ var "el")
-            (project _GraphSchema _GraphSchema_edges @@ var "schema")),
-        "labelForVertexId">: just $ "i" ~>
-          Maybes.map (project _Vertex _Vertex_label) (Maps.lookup (var "i") (project _Graph _Graph_vertices @@ var "graph"))]
-      $ checkAll
-          @@ (Lists.map (var "checkEdge") $ Maps.elems $ project _Graph _Graph_edges @@ var "graph")]
-    $ checkAll @@ list [var "checkVertices", var "checkEdges"]
diff --git a/src/main/haskell/Hydra/Sources/Wasm/Coder.hs b/src/main/haskell/Hydra/Sources/Wasm/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Wasm/Coder.hs
+++ /dev/null
@@ -1,1751 +0,0 @@
--- | WebAssembly code generator in Hydra DSL.
--- This module provides DSL versions of WAT code generation functions.
--- Type definitions are mapped to memory layout conventions; term definitions are mapped to WASM functions.
-
-module Hydra.Sources.Wasm.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Graph                            as DslGraph
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Variables      as Variables
-import qualified Hydra.Sources.Kernel.Terms.Environment   as Environment
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as SerializationSource
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Analysis       as Analysis
-import qualified Hydra.Sources.Kernel.Terms.Rewriting       as Rewriting
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports for WASM AST
-import qualified Hydra.Wasm.Syntax as W
-import qualified Hydra.Sources.Wasm.Syntax as WasmSyntax
-import qualified Hydra.Sources.Wasm.Serde as WasmSerdeSource
-import qualified Hydra.Sources.Wasm.Language as WasmLanguageSource
-
-
-def :: String -> TTerm a -> TTermDefinition a
-def = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.wasm.coder"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [moduleNamespace WasmSerdeSource.module_, moduleNamespace WasmLanguageSource.module_,
-      Analysis.ns, Formatting.ns, Names.ns, Rewriting.ns, Strip.ns, Variables.ns, Environment.ns, Lexical.ns, SerializationSource.ns],
-            moduleTypeDependencies = (WasmSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "WebAssembly code generator: converts Hydra type and term modules to WAT source code"}
-  where
-    definitions = [
-      toDefinition buildFieldOffsets,
-      toDefinition buildFunctionSignatures,
-      toDefinition buildStringOffsets,
-      toDefinition buildVariantIndexes,
-      toDefinition clampValTypesToI32,
-      toDefinition collectCallTargets,
-      toDefinition collectInstructionLocals,
-      toDefinition collectStrings,
-      toDefinition encodeApplication,
-      toDefinition encodeCases,
-      toDefinition encodeLiteral,
-      toDefinition encodeLiteralType,
-      toDefinition encodeProjection,
-      toDefinition encodeTerm,
-      toDefinition encodeTermDefinition,
-      toDefinition encodeType,
-      toDefinition encodeTypeDefinition,
-      toDefinition encodeValType,
-      toDefinition extractLambdaParams,
-      toDefinition peelLambdaApp,
-      toDefinition extractParamTypes,
-      toDefinition extractSignature,
-      toDefinition hexEscapeString,
-      toDefinition moduleToWasm,
-      toDefinition stringDataSegment]
-
-
--- =============================================================================
--- Value type encoding
--- =============================================================================
-
--- | Map a Hydra type to a WASM value type
-encodeValType :: TTermDefinition (Context -> Graph -> Type -> Either (InContext Error) W.ValType)
-encodeValType = def "encodeValType" $
-  "cx" ~> "g" ~> lambda "t" $
-    "typ" <~ (Strip.deannotateType @@ var "t") $
-    cases _Type (var "typ") (Just $
-      -- Default: compound types are represented as i32 (memory pointer)
-      right (inject W._ValType W._ValType_i32 unit))
-    [_Type_annotated>>: lambda "at" $
-       encodeValType @@ var "cx" @@ var "g" @@ Core.annotatedTypeBody (var "at"),
-     _Type_application>>: lambda "at" $
-       encodeValType @@ var "cx" @@ var "g" @@ Core.applicationTypeFunction (var "at"),
-     _Type_literal>>: lambda "lt" $
-       right (encodeLiteralType @@ var "lt"),
-     _Type_unit>>: constant $
-       right (inject W._ValType W._ValType_i32 unit),
-     _Type_void>>: constant $
-       right (inject W._ValType W._ValType_i32 unit),
-     _Type_forall>>: lambda "fa" $
-       encodeValType @@ var "cx" @@ var "g" @@ Core.forallTypeBody (var "fa")]
-
-
--- =============================================================================
--- Literal type encoding
--- =============================================================================
-
--- | Encode a Hydra literal type as a WASM value type
-encodeLiteralType :: TTermDefinition (LiteralType -> W.ValType)
-encodeLiteralType = def "encodeLiteralType" $
-  lambda "lt" $ cases _LiteralType (var "lt") Nothing [
-    _LiteralType_binary>>: constant $
-      inject W._ValType W._ValType_i32 unit, -- pointer to memory
-    _LiteralType_boolean>>: constant $
-      inject W._ValType W._ValType_i32 unit, -- 0 or 1
-    _LiteralType_float>>: lambda "ft" $
-      cases _FloatType (var "ft") Nothing [
-        _FloatType_bigfloat>>: constant $ inject W._ValType W._ValType_f64 unit,
-        _FloatType_float32>>: constant $ inject W._ValType W._ValType_f32 unit,
-        _FloatType_float64>>: constant $ inject W._ValType W._ValType_f64 unit],
-    _LiteralType_integer>>: lambda "it" $
-      cases _IntegerType (var "it") Nothing [
-        _IntegerType_bigint>>: constant $ inject W._ValType W._ValType_i64 unit,
-        _IntegerType_int8>>: constant $ inject W._ValType W._ValType_i32 unit,
-        _IntegerType_int16>>: constant $ inject W._ValType W._ValType_i32 unit,
-        _IntegerType_int32>>: constant $ inject W._ValType W._ValType_i32 unit,
-        _IntegerType_int64>>: constant $ inject W._ValType W._ValType_i64 unit,
-        _IntegerType_uint8>>: constant $ inject W._ValType W._ValType_i32 unit,
-        _IntegerType_uint16>>: constant $ inject W._ValType W._ValType_i32 unit,
-        _IntegerType_uint32>>: constant $ inject W._ValType W._ValType_i32 unit,
-        _IntegerType_uint64>>: constant $ inject W._ValType W._ValType_i64 unit],
-    _LiteralType_string>>: constant $
-      inject W._ValType W._ValType_i32 unit] -- pointer to memory
-
-
--- =============================================================================
--- Literal value encoding
--- =============================================================================
-
--- | Encode a Hydra literal value as a WASM const instruction
-encodeLiteral :: TTermDefinition (Literal -> W.Instruction)
-encodeLiteral = def "encodeLiteral" $
-  lambda "lit" $ cases _Literal (var "lit") Nothing [
-    _Literal_boolean>>: lambda "b" $
-      inject W._Instruction W._Instruction_const $
-        inject W._ConstValue W._ConstValue_i32 $
-          Logic.ifElse (var "b") (int32 1) (int32 0),
-    _Literal_string>>: lambda "_s" $
-      -- Strings in WASM are stored in linear memory.
-      -- This is a placeholder: emit i32.const 0 (null pointer).
-      -- A full implementation would allocate memory and return a (pointer, length) pair.
-      -- NOTE: we deliberately do not embed the string value as a comment, since the
-      -- underlying string may contain raw newlines which would break WAT parsing.
-      inject W._Instruction W._Instruction_const $
-        inject W._ConstValue W._ConstValue_i32 (int32 0),
-    -- Under the uniform 1-i32-value-per-term placeholder convention, non-i32 literals
-    -- (f32, f64, i64) would push a value of the wrong type for enclosing blocks declared
-    -- `(result i32)`. Emit `i32.const 0` for all non-i32 literals to maintain uniformity.
-    -- Runtime semantic correctness is deferred.
-    _Literal_float>>: lambda "_fv" $
-      inject W._Instruction W._Instruction_const $
-        inject W._ConstValue W._ConstValue_i32 (int32 0),
-    _Literal_integer>>: lambda "iv" $
-      cases _IntegerValue (var "iv") Nothing [
-        _IntegerValue_int8>>: lambda "i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (Literals.bigintToInt32 (Literals.int8ToBigint (var "i"))),
-        _IntegerValue_int16>>: lambda "i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (Literals.bigintToInt32 (Literals.int16ToBigint (var "i"))),
-        _IntegerValue_int32>>: lambda "i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (var "i"),
-        _IntegerValue_int64>>: lambda "_i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (int32 0),
-        _IntegerValue_uint8>>: lambda "i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (Literals.bigintToInt32 (Literals.uint8ToBigint (var "i"))),
-        _IntegerValue_uint16>>: lambda "i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (Literals.bigintToInt32 (Literals.uint16ToBigint (var "i"))),
-        _IntegerValue_uint32>>: lambda "i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (Literals.bigintToInt32 (Literals.uint32ToBigint (var "i"))),
-        _IntegerValue_uint64>>: lambda "_i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (int32 0),
-        _IntegerValue_bigint>>: lambda "_i" $
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (int32 0)]]
-
-
--- =============================================================================
--- Type encoding (for function signatures)
--- =============================================================================
-
--- | Encode a Hydra type as a list of WASM result types (for function signatures).
--- For function types, returns the innermost codomain (after stripping all arrows).
-encodeType :: TTermDefinition (Context -> Graph -> Type -> Either (InContext Error) [W.ValType])
-encodeType = def "encodeType" $
-  "cx" ~> "g" ~> lambda "t" $
-    "typ" <~ (Strip.deannotateType @@ var "t") $
-    cases _Type (var "typ") (Just $
-      -- Default: single i32 result (pointer)
-      right (list [inject W._ValType W._ValType_i32 unit]))
-    [_Type_annotated>>: lambda "at" $
-       encodeType @@ var "cx" @@ var "g" @@ Core.annotatedTypeBody (var "at"),
-     _Type_function>>: lambda "ft" $
-       -- For function types, skip domain and recurse into codomain
-       encodeType @@ var "cx" @@ var "g" @@ Core.functionTypeCodomain (var "ft"),
-     _Type_unit>>: constant $
-       right (list ([] :: [TTerm W.ValType])),
-     _Type_void>>: constant $
-       right (list ([] :: [TTerm W.ValType])),
-     _Type_literal>>: lambda "lt" $
-       right (list [encodeLiteralType @@ var "lt"]),
-     _Type_forall>>: lambda "fa" $
-       encodeType @@ var "cx" @@ var "g" @@ Core.forallTypeBody (var "fa")]
-
-
--- =============================================================================
--- Application encoding
--- =============================================================================
-
--- | Encode a function application. Each external call is emitted as "evaluate args for
--- side effect, drop them, push a single i32 placeholder arg, call". This maintains the
--- invariant that every encoded term produces exactly one stack value, while matching the
--- `(param i32) (result i32)` signature of our import declarations. Correct runtime
--- semantics (actual arg passing) is out of scope for this pass — we're producing
--- syntactically valid WAT only.
-encodeApplication :: TTermDefinition (Context -> Graph -> M.Map String Int -> M.Map Name [(Name, Int)] -> M.Map Name [(Name, Int)] -> M.Map String ([W.ValType], [W.ValType]) -> Term -> Either (InContext Error) [W.Instruction])
-encodeApplication = def "encodeApplication" $
-  "cx" ~> "g" ~> "stringOffsets" ~> "fieldOffsets" ~> "variantIndexes" ~> "funcSigs" ~> lambda "term" $
-    "gathered" <~ (Analysis.gatherArgs @@ var "term" @@ list ([] :: [TTerm Term])) $
-    "fun" <~ Pairs.first (var "gathered") $
-    "args" <~ Pairs.second (var "gathered") $
-    "dfun" <~ (Strip.deannotateTerm @@ var "fun") $
-    -- Encode each argument, leaving its value on the stack (no drop). This produces
-    -- the real argument values in left-to-right order for multi-param calls.
-    "realArgInstrs" <<~ (Eithers.mapList
-      (lambda "a" $
-        encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "a")
-      (var "args")) $
-    "flatRealArgInstrs" <~ Lists.concat (var "realArgInstrs") $
-    -- Encode-and-drop version for cases where we don't want the values (local vars, etc.)
-    "droppedArgInstrs" <~ Lists.concat (Lists.map
-      (lambda "ai" $ Lists.concat2 (var "ai")
-        (list [inject W._Instruction W._Instruction_drop unit]))
-      (var "realArgInstrs")) $
-    -- Dispatch based on the head function
-    cases _Term (var "dfun") (Just $
-      -- Default: encode the head function, ignore it (drop), then return placeholder.
-      "funInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "fun") $
-        right (Lists.concat (list [
-          var "droppedArgInstrs",
-          var "funInstrs",
-          list [inject W._Instruction W._Instruction_drop unit,
-                inject W._Instruction W._Instruction_const $
-                  inject W._ConstValue W._ConstValue_i32 (int32 0)]])))
-    [_Term_variable>>: lambda "name" $
-       "rawName" <~ Core.unName (var "name") $
-       "lname" <~ (Formatting.convertCaseCamelToLowerSnake @@ var "rawName") $
-       Logic.ifElse (Lists.null (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeTail (Strings.splitOn (string ".") (var "rawName")))))
-         -- Local variable head: the local holds a closure value — a pointer into
-         -- linear memory to an 8-byte record {table_idx:i32 at 0, env:i32 at 4}.
-         -- Dispatch by loading env + table_idx, pushing env + (first) real arg,
-         -- then call_indirect through $__closure_table using the $__closure_1
-         -- signature. The closure callee is (env:i32, arg:i32) -> i32.
-         --
-         -- Multi-arg closures are not yet supported (M4b is single-arg). If the
-         -- call site provides zero args, push a placeholder i32.const 0 as the
-         -- arg; if it provides more than one, drop the extras after the first.
-         -- Table index 0 is reserved for unlifted / placeholder closures; calling
-         -- through it will trap at runtime, which is distinguishable from a
-         -- correctly-constructed closure dispatch.
-         ("mFirstArg" <~ Lists.maybeHead (var "args") $
-          "firstArgInstrs" <~ Maybes.cases (var "mFirstArg")
-            -- Zero-arg closure call: push placeholder. Real zero-arg closures
-            -- need a separate signature (to come).
-            (list [inject W._Instruction W._Instruction_const $
-              inject W._ConstValue W._ConstValue_i32 (int32 0)])
-            (lambda "_a" $ Maybes.fromMaybe (list ([] :: [TTerm W.Instruction])) (Lists.maybeHead (var "realArgInstrs"))) $
-          -- Drop extra args beyond the first (M4b: single-arg closures only).
-          "extraArgDropInstrs" <~ Lists.concat (Lists.map
-            (lambda "ai" $ Lists.concat2 (var "ai")
-              (list [inject W._Instruction W._Instruction_drop unit]))
-            (Lists.drop (int32 1) (var "realArgInstrs"))) $
-          right (Lists.concat (list [
-            var "extraArgDropInstrs",
-            -- Push env (offset 4 of the closure record)
-            list [inject W._Instruction W._Instruction_localGet (var "lname"),
-                  inject W._Instruction W._Instruction_load $
-                    record W._MemoryInstruction [
-                      W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-                      W._MemoryInstruction_memArg>>: record W._MemArg [
-                        W._MemArg_offset>>: int32 4,
-                        W._MemArg_align>>: int32 2]]],
-            -- Push real arg (first only; others already dropped)
-            var "firstArgInstrs",
-            -- Push table index (offset 0)
-            list [inject W._Instruction W._Instruction_localGet (var "lname"),
-                  inject W._Instruction W._Instruction_load $
-                    record W._MemoryInstruction [
-                      W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-                      W._MemoryInstruction_memArg>>: record W._MemArg [
-                        W._MemArg_offset>>: int32 0,
-                        W._MemArg_align>>: int32 2]],
-                  -- call_indirect via $__closure_1 signature
-                  inject W._Instruction W._Instruction_callIndirect $
-                    record W._TypeUse [
-                      W._TypeUse_index>>: just (string "__closure_1"),
-                      W._TypeUse_params>>: list ([] :: [TTerm W.Param]),
-                      W._TypeUse_results>>: list ([] :: [TTerm W.ValType])]]])))
-         -- Cross-module or primitive call: push real args, emit call.
-         -- The callee's Wasm signature has exactly `n` i32 params where `n` is the
-         -- Hydra arity derived from funcSigs. If the call-site provides fewer args
-         -- (partial application), we'd need closures — for now, pad with i32.const 0
-         -- to match the callee's param count.
-         ("mSig" <~ Maps.lookup (var "lname") (var "funcSigs") $
-          "callerArgCount" <~ Lists.length (var "args") $
-          "calleeParamCount" <~ Maybes.maybe (var "callerArgCount")
-            (lambda "sig" $ Lists.length (Pairs.first (var "sig")))
-            (var "mSig") $
-          "padCount" <~ Math.sub (var "calleeParamCount") (var "callerArgCount") $
-          "padInstrs" <~ Lists.concat (Lists.replicate
-            (Logic.ifElse (Equality.gt (var "padCount") (int32 0)) (var "padCount") (int32 0))
-            (list [inject W._Instruction W._Instruction_const $
-              inject W._ConstValue W._ConstValue_i32 (int32 0)])) $
-          right (Lists.concat (list [
-            var "flatRealArgInstrs",
-            var "padInstrs",
-            list [inject W._Instruction W._Instruction_call (var "lname")]]))),
-     -- Projection applied to args: the first arg is the record being projected from.
-     -- Encode just that first arg as the scrutinee, and let encodeProjection emit the
-     -- real i32.load. Note: we deliberately skip argInstrs (which would evaluate-and-drop
-     -- every arg) because we need the first arg's VALUE on the stack, not just its
-     -- side effect. Projection takes only one "real" arg, so extra args would be a
-     -- type error at the Hydra level anyway.
-     _Term_project>>: lambda "proj" $
-       Maybes.cases (Lists.maybeHead (var "args"))
-         -- No args: treat as a bare projection function value. Push placeholder.
-         (right (list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (int32 0)]))
-         (lambda "firstArg" $
-          "firstArgInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "firstArg") $
-          encodeProjection @@ var "cx" @@ var "g" @@ var "fieldOffsets" @@ var "proj" @@ var "firstArgInstrs"),
-     -- Case statement applied to args: the first arg is the union value being dispatched
-     -- on. Encode just that first arg as the scrutinee, same pattern as _Term_project.
-     _Term_cases>>: lambda "cs" $
-       Maybes.cases (Lists.maybeHead (var "args"))
-         -- No args: treat as a bare cases function value. Push placeholder.
-         (right (list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (int32 0)]))
-         (lambda "firstArg" $
-          "firstArgInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "firstArg") $
-          encodeCases @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "cs" @@ var "firstArgInstrs"),
-     -- Lambda applied to args: beta-reduce by binding each arg to its lambda
-     -- parameter's local, then encode the inner body. Peels N outer lambdas
-     -- where N is the number of args supplied; any leftover args or lambdas
-     -- fall through as placeholders (closures, needed for partial application,
-     -- are M4+ work).
-     _Term_lambda>>: lambda "lam" $
-       "peeled" <~ (peelLambdaApp @@ (Core.termLambda (var "lam")) @@ var "args") $
-       "paramNames" <~ Pairs.first (var "peeled") $
-       "innerBody" <~ Pairs.second (var "peeled") $
-       -- For each bound (param, arg-instrs) pair, emit `<arg-instrs> local.set $param`.
-       "bindInstrs" <~ Lists.concat (Lists.map
-         (lambda "np" $
-           "pname" <~ Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Pairs.first (var "np")) $
-           "argInstrs" <~ Pairs.second (var "np") $
-             Lists.concat2 (var "argInstrs")
-               (list [inject W._Instruction W._Instruction_localSet (var "pname")]))
-         (Lists.zip (var "paramNames") (var "realArgInstrs"))) $
-       -- Drop any extra args past the number of bound params (arity mismatch).
-       "extraArgInstrs" <~ Lists.concat (Lists.map
-         (lambda "ai" $ Lists.concat2 (var "ai")
-           (list [inject W._Instruction W._Instruction_drop unit]))
-         (Lists.drop (Lists.length (var "paramNames")) (var "realArgInstrs"))) $
-       "bodyInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "innerBody") $
-         right (Lists.concat (list [
-           var "bindInstrs",
-           var "extraArgInstrs",
-           var "bodyInstrs"]))]
-
-
--- =============================================================================
--- Term encoding
--- =============================================================================
-
--- | Encode a Hydra term as a list of WASM instructions. The stringOffsets argument is
--- a module-level string→data-segment-offset map used to encode _Literal_string values
--- as real memory pointers instead of `i32.const 0` placeholders. The fieldOffsets map
--- is the universe-wide record-type→field-offset table used by encodeProjection. The
--- variantIndexes map is the universe-wide union-type→variant-tag-index table used by
--- `_Term_inject` (tag at construction) and by `encodeCases` (tag dispatch).
-encodeTerm :: TTermDefinition (Context -> Graph -> M.Map String Int -> M.Map Name [(Name, Int)] -> M.Map Name [(Name, Int)] -> M.Map String ([W.ValType], [W.ValType]) -> Term -> Either (InContext Error) [W.Instruction])
-encodeTerm = def "encodeTerm" $
-  "cx" ~> "g" ~> "stringOffsets" ~> "fieldOffsets" ~> "variantIndexes" ~> "funcSigs" ~> lambda "term" $
-    cases _Term (var "term") (Just $
-      Ctx.failInContext (Error.errorOther $ Error.otherError $ string "unexpected term variant in WASM encoding") (var "cx"))
-    [_Term_annotated>>: lambda "at" $
-       encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.annotatedTermBody (var "at"),
-     _Term_application>>: lambda "app" $
-       encodeApplication @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.termApplication (var "app"),
-     _Term_cases>>: lambda "_cs" $
-       -- A bare cases term is a function value (Union -> a), not a dispatch. Emit a
-       -- placeholder i32. Real dispatches happen in encodeApplication's _Term_cases
-       -- branch (using the first arg as scrutinee) or in encodeTermDefinition's bare-
-       -- eliminator path (using the first param as scrutinee).
-       right (list [inject W._Instruction W._Instruction_const $
-         inject W._ConstValue W._ConstValue_i32 (int32 0)]),
-     _Term_either>>: lambda "e" $
-       -- Real either construction. Layout: `[tag, payload_ptr]`, 8 bytes.
-       -- Left → tag=0, Right → tag=1. Matches the inject layout (tag + payload)
-       -- but uses a fixed {0, 1} tagging instead of a variant-index lookup.
-       "eitherTag" <~ Eithers.either_
-         (lambda "_lv" $ int32 0)
-         (lambda "_rv" $ int32 1)
-         (var "e") $
-       "innerTerm" <~ Eithers.either_
-         (lambda "lv" $ var "lv")
-         (lambda "rv" $ var "rv")
-         (var "e") $
-       "payloadInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "innerTerm") $
-       right (Lists.concat (list [
-         list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "eitherTag")],
-         var "payloadInstrs",
-         list [
-           inject W._Instruction W._Instruction_const $
-             inject W._ConstValue W._ConstValue_i32 (int32 8),
-           inject W._Instruction W._Instruction_call (string "__alloc"),
-           inject W._Instruction W._Instruction_localSet (string "__rec_ptr"),
-           -- Pop payload (top) into scratch, store at offset 4
-           inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_store $
-             record W._MemoryInstruction [
-               W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-               W._MemoryInstruction_memArg>>: record W._MemArg [
-                 W._MemArg_offset>>: int32 4,
-                 W._MemArg_align>>: int32 2]],
-           -- Pop tag into scratch, store at offset 0
-           inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_store $
-             record W._MemoryInstruction [
-               W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-               W._MemoryInstruction_memArg>>: record W._MemArg [
-                 W._MemArg_offset>>: int32 0,
-                 W._MemArg_align>>: int32 2]],
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr")]])),
-     _Term_inject>>: lambda "inj" $
-       -- Real tagged-union construction: allocate 8 bytes and store [tag, payload_ptr].
-       -- Tag is looked up in variantIndexes by (typeName, fieldName). Payload is 0 for
-       -- unit-like variants (e.g. True/False in an enum-style union) or the encoded
-       -- injected term otherwise. Layout matches what encodeCases expects when it loads
-       -- `scrutinee + 0` as the tag and `scrutinee + 4` as the payload.
-       "typeName" <~ Core.injectionTypeName (var "inj") $
-       "field" <~ Core.injectionField (var "inj") $
-       "fieldName" <~ Core.fieldName (var "field") $
-       "fterm" <~ Core.fieldTerm (var "field") $
-       "dterm" <~ (Strip.deannotateTerm @@ var "fterm") $
-       "isUnit" <~ (cases _Term (var "dterm") (Just $ boolean False) [
-         _Term_unit>>: constant $ boolean True,
-         _Term_record>>: lambda "rt" $ Lists.null (Core.recordFields (var "rt"))]) $
-       -- Look up the tag in the universe-wide variant table. Fall back to 0 when the
-       -- type or variant is unknown (shouldn't happen for well-formed Hydra terms).
-       "mVariants" <~ Maps.lookup (var "typeName") (var "variantIndexes") $
-       "tag" <~ Maybes.cases (var "mVariants")
-         (int32 0)
-         (lambda "pairs" $
-           "matching" <~ Lists.filter
-             (lambda "p" $ Equality.equal (Pairs.first (var "p")) (var "fieldName"))
-             (var "pairs") $
-           Maybes.cases (Lists.maybeHead (var "matching"))
-             (int32 0)
-             (lambda "p" $ Pairs.second (var "p"))) $
-       -- Compute payload instructions: `i32.const 0` for unit, else encode the term.
-       "payloadInstrs" <<~ Logic.ifElse (var "isUnit")
-         (right (list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (int32 0)]))
-         (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "fterm") $
-       -- Allocate 8 bytes and store [tag, payload] using the same $__rec_ptr /
-       -- $__rec_scratch locals that record construction uses. Nested inject + record
-       -- construction is safe by the same argument as nested record construction.
-       right (Lists.concat (list [
-         list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "tag")],
-         var "payloadInstrs",
-         list [
-           inject W._Instruction W._Instruction_const $
-             inject W._ConstValue W._ConstValue_i32 (int32 8),
-           inject W._Instruction W._Instruction_call (string "__alloc"),
-           inject W._Instruction W._Instruction_localSet (string "__rec_ptr"),
-           -- Pop payload (top) into scratch, store at offset 4
-           inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_store $
-             record W._MemoryInstruction [
-               W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-               W._MemoryInstruction_memArg>>: record W._MemArg [
-                 W._MemArg_offset>>: int32 4,
-                 W._MemArg_align>>: int32 2]],
-           -- Pop tag (now top) into scratch, store at offset 0
-           inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_store $
-             record W._MemoryInstruction [
-               W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-               W._MemoryInstruction_memArg>>: record W._MemArg [
-                 W._MemArg_offset>>: int32 0,
-                 W._MemArg_align>>: int32 2]],
-           -- Push the union-record pointer as the term's single-value result.
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr")]])),
-     _Term_lambda>>: lambda "lam" $
-       -- Lambdas at the term level: encode the body directly.
-       -- Parameters are bound as WASM function locals at the term-definition level
-       -- (see encodeTermDefinition's use of extractLambdaParams).
-       encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.lambdaBody (var "lam"),
-     _Term_let>>: lambda "lt" $
-       "bindings" <~ Core.letBindings (var "lt") $
-       "body" <~ Core.letBody (var "lt") $
-       "bindInstrs" <<~ (Eithers.mapList
-         (lambda "b" $
-           "bname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.bindingName (var "b"))) $
-           "bval" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.bindingTerm (var "b")) $
-             right (Lists.concat2 (var "bval")
-               (list [inject W._Instruction W._Instruction_localSet (var "bname")])))
-         (var "bindings")) $
-       "bodyInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "body") $
-         right (Lists.concat2 (Lists.concat (var "bindInstrs")) (var "bodyInstrs")),
-     _Term_list>>: lambda "els" $
-       -- Real list construction. Layout: a length-prefixed array of i32 cells,
-       -- `[length:i32, elem_0:i32, ..., elem_{N-1}:i32]`, total `(N+1)*4` bytes.
-       -- The pointer on the stack points at the length word (offset 0).
-       -- Sequence:
-       --   1. Evaluate every element (each leaves one i32 on the stack).
-       --   2. Allocate `(N+1)*4` bytes; localSet $__rec_ptr.
-       --   3. Store the length word at offset 0.
-       --   4. For i = N-1 down to 0: pop the top stack value into $__rec_scratch
-       --      and store it at offset `(i+1)*4` via $__rec_ptr.
-       --   5. Push $__rec_ptr as the term's single-value result.
-       -- Nested lists/records are safe because each inner construction leaves exactly
-       -- one value on the stack and touches $__rec_ptr / $__rec_scratch only during
-       -- its own body. Reuses the same scratch locals as record construction.
-       "numElems" <~ Lists.length (var "els") $
-       "listSize" <~ Math.mul (Math.add (var "numElems") (int32 1)) (int32 4) $
-       "encodedElems" <<~ (Eithers.mapList
-         (lambda "el" $
-           encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "el")
-         (var "els")) $
-       "allElemInstrs" <~ Lists.concat (var "encodedElems") $
-       "allocInstrs" <~ list [
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "listSize"),
-         inject W._Instruction W._Instruction_call (string "__alloc"),
-         inject W._Instruction W._Instruction_localSet (string "__rec_ptr")] $
-       "lengthStoreInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "numElems"),
-         inject W._Instruction W._Instruction_store $
-           record W._MemoryInstruction [
-             W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-             W._MemoryInstruction_memArg>>: record W._MemArg [
-               W._MemArg_offset>>: int32 0,
-               W._MemArg_align>>: int32 2]]] $
-       -- Reverse index list [N-1, N-2, ..., 0] built the same way as in _Term_record.
-       -- Each store pops one value (the last-pushed element first) and writes it to
-       -- offset (i+1)*4 so elem_i lands at its declared position.
-       "storeInstrs" <~ Lists.concat (Lists.map
-         (lambda "i" $
-           list [
-             inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_store $
-               record W._MemoryInstruction [
-                 W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-                 W._MemoryInstruction_memArg>>: record W._MemArg [
-                   W._MemArg_offset>>: Math.mul (Math.add (var "i") (int32 1)) (int32 4),
-                   W._MemArg_align>>: int32 2]]])
-         (Lists.foldl
-           (lambda "acc" $ lambda "_e" $ Lists.cons (Lists.length (var "acc")) (var "acc"))
-           (list ([] :: [TTerm Int]))
-           (var "els"))) $
-       "finalInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr")] $
-       right (Lists.concat (list [
-         var "allElemInstrs",
-         var "allocInstrs",
-         var "lengthStoreInstrs",
-         var "storeInstrs",
-         var "finalInstrs"])),
-     _Term_literal>>: lambda "lit" $
-       -- String literals are the one non-placeholder path: look up the literal's offset
-       -- in the module-level stringOffsets map and emit `i32.const <offset>`. All other
-       -- literal kinds (i32, bool, placeholder-emitted floats/i64/etc.) go through
-       -- encodeLiteral unchanged.
-       cases _Literal (var "lit") (Just $
-         right (list [encodeLiteral @@ var "lit"])) [
-         _Literal_string>>: lambda "s" $
-           Maybes.maybe
-             -- Unknown string (shouldn't happen if collectStrings was run first):
-             -- fall back to the placeholder.
-             (right (list [inject W._Instruction W._Instruction_const $
-               inject W._ConstValue W._ConstValue_i32 (int32 0)]))
-             (lambda "off" $
-               right (list [inject W._Instruction W._Instruction_const $
-                 inject W._ConstValue W._ConstValue_i32 (var "off")]))
-             (Maps.lookup (var "s") (var "stringOffsets"))],
-     _Term_map>>: lambda "m" $
-       -- Real map construction. Layout: `[length, k_0, v_0, ..., k_{N-1}, v_{N-1}]`,
-       -- `(2N+1)*4` bytes. The length word is the number of entries (not the word
-       -- count). Keys and values are interleaved and stored at offsets
-       -- (2i+1)*4 and (2i+2)*4 respectively. Maps.toList gives entries in
-       -- deterministic (sorted) order.
-       -- We encode each (k,v) pair into a pair of Instruction lists, then flatten
-       -- so the stack has [k_0, v_0, k_1, v_1, ..., k_{N-1}, v_{N-1}] in order.
-       "mapEntries" <~ Maps.toList (var "m") $
-       "numMapEntries" <~ Lists.length (var "mapEntries") $
-       "mapWordCount" <~ Math.add (Math.mul (var "numMapEntries") (int32 2)) (int32 1) $
-       "mapSize" <~ Math.mul (var "mapWordCount") (int32 4) $
-       "encodedMapKVs" <<~ (Eithers.mapList
-         (lambda "kv" $ Eithers.bind
-           (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Pairs.first (var "kv"))
-           (lambda "kInstrs" $ Eithers.map
-             (lambda "vInstrs" $ Lists.concat2 (var "kInstrs") (var "vInstrs"))
-             (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Pairs.second (var "kv"))))
-         (var "mapEntries")) $
-       "allMapKVInstrs" <~ Lists.concat (var "encodedMapKVs") $
-       "mapAllocInstrs" <~ list [
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "mapSize"),
-         inject W._Instruction W._Instruction_call (string "__alloc"),
-         inject W._Instruction W._Instruction_localSet (string "__rec_ptr")] $
-       "mapLengthStoreInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "numMapEntries"),
-         inject W._Instruction W._Instruction_store $
-           record W._MemoryInstruction [
-             W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-             W._MemoryInstruction_memArg>>: record W._MemArg [
-               W._MemArg_offset>>: int32 0,
-               W._MemArg_align>>: int32 2]]] $
-       -- The stack order (top to bottom) is v_{N-1}, k_{N-1}, ..., v_0, k_0.
-       -- So we store v_{N-1} first at offset (2*(N-1)+2)*4, then k_{N-1} at
-       -- (2*(N-1)+1)*4, then v_{N-2} at (2*(N-2)+2)*4, etc. We build a reversed
-       -- index list `[2N-1, 2N-2, ..., 1, 0]` (one index per STORED WORD, not per
-       -- entry) and store at offset `(j+1)*4` where j is the stored-word index.
-       -- This is identical to the list-store pattern but with (2N-1) instead of
-       -- (N-1) words.
-       "numMapWords" <~ Math.mul (var "numMapEntries") (int32 2) $
-       "mapReverseIndices" <~ (Lists.foldl
-         (lambda "acc" $ lambda "_i" $ Lists.cons (Lists.length (var "acc")) (var "acc"))
-         (list ([] :: [TTerm Int]))
-         (Lists.replicate (var "numMapWords") unit)) $
-       "mapStoreInstrs" <~ Lists.concat (Lists.map
-         (lambda "j" $
-           list [
-             inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_store $
-               record W._MemoryInstruction [
-                 W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-                 W._MemoryInstruction_memArg>>: record W._MemArg [
-                   W._MemArg_offset>>: Math.mul (Math.add (var "j") (int32 1)) (int32 4),
-                   W._MemArg_align>>: int32 2]]])
-         (var "mapReverseIndices")) $
-       "mapFinalInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr")] $
-       right (Lists.concat (list [
-         var "allMapKVInstrs",
-         var "mapAllocInstrs",
-         var "mapLengthStoreInstrs",
-         var "mapStoreInstrs",
-         var "mapFinalInstrs"])),
-     _Term_maybe>>: lambda "mt" $
-       Maybes.cases (var "mt")
-         -- Nothing: push 0 (null pointer / tag for None)
-         (right (list [
-           inject W._Instruction W._Instruction_const $
-             inject W._ConstValue W._ConstValue_i32 (int32 0)]))
-         (lambda "val" $
-           encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "val"),
-     _Term_pair>>: lambda "p" $
-       -- Real pair construction. Layout: `[first_ptr, second_ptr]`, 8 bytes.
-       -- Encode both components, alloc 8 bytes, store at offsets 0 and 4.
-       -- Reuses the same $__rec_ptr / $__rec_scratch scratch locals as record
-       -- construction; nested pairs are safe by the same argument.
-       "firstInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Pairs.first (var "p")) $
-       "secondInstrs" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Pairs.second (var "p")) $
-       right (Lists.concat (list [
-         var "firstInstrs",
-         var "secondInstrs",
-         list [
-           inject W._Instruction W._Instruction_const $
-             inject W._ConstValue W._ConstValue_i32 (int32 8),
-           inject W._Instruction W._Instruction_call (string "__alloc"),
-           inject W._Instruction W._Instruction_localSet (string "__rec_ptr"),
-           -- Pop second (top) into scratch, store at offset 4
-           inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_store $
-             record W._MemoryInstruction [
-               W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-               W._MemoryInstruction_memArg>>: record W._MemArg [
-                 W._MemArg_offset>>: int32 4,
-                 W._MemArg_align>>: int32 2]],
-           -- Pop first into scratch, store at offset 0
-           inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-           inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-           inject W._Instruction W._Instruction_store $
-             record W._MemoryInstruction [
-               W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-               W._MemoryInstruction_memArg>>: record W._MemArg [
-                 W._MemArg_offset>>: int32 0,
-                 W._MemArg_align>>: int32 2]],
-           inject W._Instruction W._Instruction_localGet (string "__rec_ptr")]])),
-     _Term_project>>: lambda "_proj" $
-       -- A bare projection term is a function value (of type Record -> Field), not an
-       -- application. We don't have a record pointer to load from, so we emit a single
-       -- i32.const 0 placeholder (a "function-index" stand-in). Real loads happen in
-       -- encodeApplication's _Term_project case, where the record IS available as the
-       -- first argument.
-       right (list [inject W._Instruction W._Instruction_const $
-         inject W._ConstValue W._ConstValue_i32 (int32 0)]),
-     _Term_record>>: lambda "rec" $
-       -- Real record construction. Layout: each field is a 4-byte i32, in the order
-       -- the fields appear in the record term. Sequence:
-       --   1. Evaluate every field value (each leaves one i32 on the stack).
-       --   2. Push the record byte size; call $__alloc to get a fresh pointer.
-       --   3. Pop the pointer into $__rec_ptr.
-       --   4. For each field in REVERSE order (so the stack pops them in field order):
-       --        local.set $__rec_scratch  (pops the field value)
-       --        local.get $__rec_ptr      (push addr)
-       --        local.get $__rec_scratch  (push value)
-       --        i32.store offset=<fieldOffset>
-       --   5. Push $__rec_ptr as the term's single-value result.
-       -- Nested records are safe because each inner record leaves exactly one value on
-       -- the stack and touches $__rec_ptr / $__rec_scratch only during its own body.
-       "recFields" <~ Core.recordFields (var "rec") $
-       "numFields" <~ Lists.length (var "recFields") $
-       "recSize" <~ Math.mul (var "numFields") (int32 4) $
-       "encodedFields" <<~ (Eithers.mapList
-         (lambda "fld" $
-           encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs"
-             @@ Core.fieldTerm (var "fld"))
-         (var "recFields")) $
-       "allFieldInstrs" <~ Lists.concat (var "encodedFields") $
-       "allocInstrs" <~ list [
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "recSize"),
-         inject W._Instruction W._Instruction_call (string "__alloc"),
-         inject W._Instruction W._Instruction_localSet (string "__rec_ptr")] $
-       -- Build store sequences from the LAST field to the FIRST, because that's the
-       -- order the stack pops them. Each store sequence pops one value and reads
-       -- $__rec_ptr, so the order within each is: localSet scratch; localGet ptr;
-       -- localGet scratch; store offset=i*4.
-       "storeInstrs" <~ Lists.concat (Lists.map
-         (lambda "i" $
-           list [
-             inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_store $
-               record W._MemoryInstruction [
-                 W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-                 W._MemoryInstruction_memArg>>: record W._MemArg [
-                   W._MemArg_offset>>: Math.mul (var "i") (int32 4),
-                   W._MemArg_align>>: int32 2]]])
-         -- Reverse index list: [N-1, N-2, ..., 0]. Built by a foldl over the field list
-         -- that conses `length acc` at each step; since length is always the next index,
-         -- the accumulator ends up naturally reversed.
-         (Lists.foldl
-           (lambda "acc" $ lambda "_f" $ Lists.cons (Lists.length (var "acc")) (var "acc"))
-           (list ([] :: [TTerm Int]))
-           (var "recFields"))) $
-       "finalInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr")] $
-       right (Lists.concat (list [
-         var "allFieldInstrs",
-         var "allocInstrs",
-         var "storeInstrs",
-         var "finalInstrs"])),
-     _Term_set>>: lambda "s" $
-       -- Real set construction. Layout identical to list: length-prefixed array
-       -- `[length, elem_0, ..., elem_{N-1}]`, `(N+1)*4` bytes. Sets.toList returns
-       -- elements in deterministic (sorted) order, so the encoding is stable.
-       "setElems" <~ Sets.toList (var "s") $
-       "numSetElems" <~ Lists.length (var "setElems") $
-       "setSize" <~ Math.mul (Math.add (var "numSetElems") (int32 1)) (int32 4) $
-       "encodedSetElems" <<~ (Eithers.mapList
-         (lambda "el" $
-           encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "el")
-         (var "setElems")) $
-       "allSetElemInstrs" <~ Lists.concat (var "encodedSetElems") $
-       "setAllocInstrs" <~ list [
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "setSize"),
-         inject W._Instruction W._Instruction_call (string "__alloc"),
-         inject W._Instruction W._Instruction_localSet (string "__rec_ptr")] $
-       "setLengthStoreInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-         inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (var "numSetElems"),
-         inject W._Instruction W._Instruction_store $
-           record W._MemoryInstruction [
-             W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-             W._MemoryInstruction_memArg>>: record W._MemArg [
-               W._MemArg_offset>>: int32 0,
-               W._MemArg_align>>: int32 2]]] $
-       "setStoreInstrs" <~ Lists.concat (Lists.map
-         (lambda "i" $
-           list [
-             inject W._Instruction W._Instruction_localSet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-             inject W._Instruction W._Instruction_localGet (string "__rec_scratch"),
-             inject W._Instruction W._Instruction_store $
-               record W._MemoryInstruction [
-                 W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-                 W._MemoryInstruction_memArg>>: record W._MemArg [
-                   W._MemArg_offset>>: Math.mul (Math.add (var "i") (int32 1)) (int32 4),
-                   W._MemArg_align>>: int32 2]]])
-         (Lists.foldl
-           (lambda "acc" $ lambda "_e" $ Lists.cons (Lists.length (var "acc")) (var "acc"))
-           (list ([] :: [TTerm Int]))
-           (var "setElems"))) $
-       "setFinalInstrs" <~ list [
-         inject W._Instruction W._Instruction_localGet (string "__rec_ptr")] $
-       right (Lists.concat (list [
-         var "allSetElemInstrs",
-         var "setAllocInstrs",
-         var "setLengthStoreInstrs",
-         var "setStoreInstrs",
-         var "setFinalInstrs"])),
-     _Term_typeApplication>>: lambda "ta" $
-       encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.typeApplicationTermBody (var "ta"),
-     _Term_typeLambda>>: lambda "tl" $
-       encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.typeLambdaBody (var "tl"),
-     _Term_unit>>: constant $
-       -- Unit: push a placeholder i32 for stack consistency (every term produces 1 value).
-       right (list [inject W._Instruction W._Instruction_const $
-         inject W._ConstValue W._ConstValue_i32 (int32 0)]),
-     _Term_unwrap>>: lambda "_" $
-       -- Unwrap is identity in WASM (the wrapper is erased).
-       -- Push a placeholder i32 so the term produces exactly 1 value.
-       right (list [inject W._Instruction W._Instruction_const $
-         inject W._ConstValue W._ConstValue_i32 (int32 0)]),
-     _Term_variable>>: lambda "name" $
-       "rawName" <~ Core.unName (var "name") $
-       "lname" <~ (Formatting.convertCaseCamelToLowerSnake @@ var "rawName") $
-       -- Unqualified names are local variables → emit local.get.
-       -- Qualified names are cross-module function *references* (not calls): we push
-       -- an i32 placeholder representing the function index. Actual calls are emitted
-       -- from encodeApplication when the function is in head position.
-       Logic.ifElse (Lists.null (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeTail (Strings.splitOn (string ".") (var "rawName")))))
-         (right (list [inject W._Instruction W._Instruction_localGet (var "lname")]))
-         (right (list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (int32 0)])),
-     _Term_wrap>>: lambda "wt" $
-       encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ Core.wrappedTermBody (var "wt")]
-
-
--- =============================================================================
--- Elimination encoding
--- =============================================================================
-
--- | Encode a record projection as WASM instructions.
--- Takes scrutinee instructions to place before the dispatch. The fieldOffsets map is
--- looked up by (typeName, fieldName) to find the record's field offset in bytes. If the
--- type is known, the projection is encoded as `scrutinee; i32.load offset=N` (a real
--- memory read from the record pointer). If the type is unknown (e.g. a projection from
--- a term whose type hasn't been declared as a record), we fall back to the session-8
--- placeholder: drop the scrutinee and push `i32.const 0`.
-encodeProjection :: TTermDefinition (Context -> Graph -> M.Map Name [(Name, Int)] -> Projection -> [W.Instruction] -> Either (InContext Error) [W.Instruction])
-encodeProjection = def "encodeProjection" $
-  "cx" ~> "g" ~> "fieldOffsets" ~> lambda "proj" $ lambda "scrutineeInstrs" $
-    "typeName" <~ Core.projectionTypeName (var "proj") $
-    "fieldName" <~ Core.projectionField (var "proj") $
-    "mFields" <~ Maps.lookup (var "typeName") (var "fieldOffsets") $
-    -- Compute the offset if the type is known and the field exists in it. Returns
-    -- Maybe Int — Nothing if the type is unknown or the field name doesn't match
-    -- any entry in the type's field list.
-    "mOffset" <~ (Maybes.cases (var "mFields")
-      (nothing :: TTerm (Maybe Int))
-      (lambda "pairs" $
-        -- Find the first pair (fn, off) where fn == fieldName.
-        "matching" <~ Lists.filter
-          (lambda "p" $ Equality.equal (Pairs.first (var "p")) (var "fieldName"))
-          (var "pairs") $
-        Maybes.map (unaryFunction Pairs.second) (Lists.maybeHead (var "matching")))) $
-    Maybes.cases (var "mOffset")
-      -- Unknown: fall back to placeholder (drop scrutinee if any, push i32.const 0).
-      (right (Lists.concat (list [
-        var "scrutineeInstrs",
-        Logic.ifElse (Lists.null (var "scrutineeInstrs"))
-          (list ([] :: [TTerm W.Instruction]))
-          (list [inject W._Instruction W._Instruction_drop unit]),
-        list [inject W._Instruction W._Instruction_const $
-          inject W._ConstValue W._ConstValue_i32 (int32 0)]])))
-      -- Known: emit the scrutinee (the record pointer), then i32.load offset=N.
-      -- If the scrutinee is empty (shouldn't happen for a real projection, but guard
-      -- anyway), synthesize an i32.const 0 placeholder scrutinee so the load has an
-      -- address on the stack.
-      (lambda "off" $
-        right (Lists.concat (list [
-          Logic.ifElse (Lists.null (var "scrutineeInstrs"))
-            (list [inject W._Instruction W._Instruction_const $
-              inject W._ConstValue W._ConstValue_i32 (int32 0)])
-            (var "scrutineeInstrs"),
-          list [inject W._Instruction W._Instruction_load $
-            record W._MemoryInstruction [
-              W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-              W._MemoryInstruction_memArg>>: record W._MemArg [
-                W._MemArg_offset>>: var "off",
-                W._MemArg_align>>: int32 2]]]])))
-
--- | Encode a case statement (union elimination) as WASM instructions.
--- Takes scrutinee instructions to place before the dispatch.
-encodeCases :: TTermDefinition (Context -> Graph -> M.Map String Int -> M.Map Name [(Name, Int)] -> M.Map Name [(Name, Int)] -> M.Map String ([W.ValType], [W.ValType]) -> CaseStatement -> [W.Instruction] -> Either (InContext Error) [W.Instruction])
-encodeCases = def "encodeCases" $
-  "cx" ~> "g" ~> "stringOffsets" ~> "fieldOffsets" ~> "variantIndexes" ~> "funcSigs" ~> lambda "cs" $ lambda "scrutineeInstrsRaw" $
-    "tname" <~ (Formatting.convertCaseCamelToLowerSnake @@ (Names.localNameOf @@ Core.caseStatementTypeName (var "cs"))) $
-    "caseFields" <~ Core.caseStatementCases (var "cs") $
-    -- Ensure the scrutinee pushes exactly one i32 onto the stack.
-    -- If the caller passed no instructions, synthesize a placeholder pointer.
-    "scrutineeInstrs" <~ Logic.ifElse (Lists.null (var "scrutineeInstrsRaw"))
-      (list [inject W._Instruction W._Instruction_const $
-        inject W._ConstValue W._ConstValue_i32 (int32 0)])
-      (var "scrutineeInstrsRaw") $
-    -- Scrutinee prologue: evaluate the scrutinee pointer, save to $__rec_ptr (reused
-    -- as a scratch local — nested cases/records overwrite it within their own body
-    -- and restore nothing, which is safe because the outer case has already bound $v
-    -- and loaded its tag before running any arm body). Then:
-    --   1. Load payload from offset 4 and bind to $v (the fresh case variable).
-    --   2. Load tag from offset 0 and leave it on the stack for the br_table dispatch.
-    "prologue" <~ Lists.concat (list [
-      var "scrutineeInstrs",
-      list [
-        inject W._Instruction W._Instruction_localSet (string "__rec_ptr"),
-        -- Load payload and bind to $v
-        inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-        inject W._Instruction W._Instruction_load $
-          record W._MemoryInstruction [
-            W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-            W._MemoryInstruction_memArg>>: record W._MemArg [
-              W._MemArg_offset>>: int32 4,
-              W._MemArg_align>>: int32 2]],
-        inject W._Instruction W._Instruction_localSet (string "v"),
-        -- Load tag (selector for br_table)
-        inject W._Instruction W._Instruction_localGet (string "__rec_ptr"),
-        inject W._Instruction W._Instruction_load $
-          record W._MemoryInstruction [
-            W._MemoryInstruction_type>>: inject W._ValType W._ValType_i32 unit,
-            W._MemoryInstruction_memArg>>: record W._MemArg [
-              W._MemArg_offset>>: int32 0,
-              W._MemArg_align>>: int32 2]]]]) $
-    -- Encode each explicit case arm body. Each arm is synthesized as
-    -- `apply (cfterm) (termVariable "v")` — encodeTerm will resolve `v` to `local.get $v`,
-    -- which is now initialized to the loaded payload before any arm runs.
-    "explicitArms" <<~ (Eithers.mapList
-      (lambda "cf" $
-        "cfname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Core.fieldName (var "cf"))) $
-        "cfterm" <~ Core.fieldTerm (var "cf") $
-        "armBody" <<~ (encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@
-          (Core.termApplication (Core.application (var "cfterm")
-            (Core.termVariable (wrap _Name (string "v")))))) $
-          right (pair (var "cfname") (var "armBody")))
-      (var "caseFields")) $
-    -- Encode the optional default arm. When present, its body is a Term that does
-    -- NOT reference $v (the payload is irrelevant for a default). When absent, we
-    -- still synthesize a default label so that uncovered tags have somewhere to
-    -- branch to; its body is an `i32.const 0` placeholder.
-    "defaultArmLabel" <~ (string "_default") $
-    "mDefault" <~ Core.caseStatementDefault (var "cs") $
-    "defaultArmBody" <<~ Maybes.cases (var "mDefault")
-      (right (list [inject W._Instruction W._Instruction_const $
-        inject W._ConstValue W._ConstValue_i32 (int32 0)]))
-      (lambda "defTerm" $
-        encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "defTerm") $
-    "arms" <~ Lists.concat2 (var "explicitArms") (list [pair (var "defaultArmLabel") (var "defaultArmBody")]) $
-    -- Build the br_table label array. Each entry at index i gets the label of
-    -- the arm handling tag i — either an explicit arm matching the union's
-    -- variant-name-at-index-i, or the default arm's label. The lookup uses the
-    -- universe-wide variantIndexes map keyed by the union's type name; if the
-    -- type isn't found (e.g. dispatching on a locally-defined union not visible
-    -- to the coder), every tag routes to the default.
-    "explicitLabelForName" <~ (lambda "fname" $
-      Maybes.fromMaybe (var "defaultArmLabel")
-        (Maybes.map
-          (unaryFunction Pairs.first)
-          (Lists.find
-            (lambda "arm" $ Equality.equal (Pairs.first (var "arm")) (var "fname"))
-            (var "explicitArms")))) $
-    "typeName" <~ Core.caseStatementTypeName (var "cs") $
-    "mUnionVariants" <~ Maps.lookup (var "typeName") (var "variantIndexes") $
-    "brTableLabels" <~ Maybes.cases (var "mUnionVariants")
-      -- Fallback: no variant info for this type. Use the explicit-arm labels
-      -- at positions 0..len-1 (preserving pre-fix behavior); tags beyond the
-      -- explicit arms hit the default.
-      (Lists.map (unaryFunction Pairs.first) (var "explicitArms"))
-      (lambda "variantPairs" $
-        -- variantPairs :: [(Name, Int)]. Sort by index, emit label per index.
-        "sorted" <~ Lists.sortOn (unaryFunction Pairs.second) (var "variantPairs") $
-        Lists.map
-          (lambda "np" $
-            "fieldName" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Pairs.first (var "np"))) $
-            var "explicitLabelForName" @@ var "fieldName")
-          (var "sorted")) $
-    -- Block-based union dispatch: nested empty dispatch blocks, innermost holds the
-    -- prologue + br_table, outer blocks wrap each arm body (explicit + default).
-    "endLabel" <~ (Strings.cat2 (string "end_") (var "tname")) $
-    "innerDispatch" <~ Lists.concat2
-      (var "prologue")
-      (list [inject W._Instruction W._Instruction_brTable $
-        record W._BrTableArgs [
-          W._BrTableArgs_labels>>: var "brTableLabels",
-          W._BrTableArgs_default>>: var "defaultArmLabel"]]) $
-    "dispatch" <~ Lists.foldl
-      (lambda "acc" $ lambda "arm" $
-        "label" <~ Pairs.first (var "arm") $
-        "body" <~ Pairs.second (var "arm") $
-          Lists.concat (list [
-            list [inject W._Instruction W._Instruction_block $
-              record W._BlockInstruction [
-                W._BlockInstruction_label>>: just (var "label"),
-                W._BlockInstruction_blockType>>: inject W._BlockType W._BlockType_empty unit,
-                W._BlockInstruction_body>>: var "acc"]],
-            var "body",
-            list [inject W._Instruction W._Instruction_br (var "endLabel")]]))
-      (var "innerDispatch")
-      (var "arms") $
-      -- Wrap everything in the outermost end block with result type.
-      -- Even with zero explicit arms, the default arm always exists, so arms is
-      -- never empty — no need to short-circuit.
-      right (list [inject W._Instruction W._Instruction_block $
-        record W._BlockInstruction [
-          W._BlockInstruction_label>>: just (var "endLabel"),
-          W._BlockInstruction_blockType>>: inject W._BlockType W._BlockType_value (inject W._ValType W._ValType_i32 unit),
-          W._BlockInstruction_body>>: var "dispatch"]])
-
-
--- =============================================================================
--- Type definition encoding
--- =============================================================================
-
--- | Encode a Hydra type definition as WASM module fields.
--- Types are erased at runtime in WASM, but we emit function type definitions
--- for types that represent function signatures (useful for call_indirect).
-encodeTypeDefinition :: TTermDefinition (Context -> Graph -> TypeDefinition -> Either (InContext Error) [W.ModuleField])
-encodeTypeDefinition = def "encodeTypeDefinition" $
-  "cx" ~> "g" ~> lambda "tdef" $
-    "name" <~ Packaging.typeDefinitionName (var "tdef") $
-    "lname" <~ (Formatting.convertCaseCamelToLowerSnake @@ (Names.localNameOf @@ var "name")) $
-    "typ" <~ (Core.typeSchemeBody $ Packaging.typeDefinitionTypeScheme (var "tdef")) $
-    "dtyp" <~ (Strip.deannotateType @@ var "typ") $
-    -- Emit a type section entry for function types
-    cases _Type (var "dtyp") (Just $
-      -- Non-function types are erased
-      right (list ([] :: [TTerm W.ModuleField])))
-    [_Type_function>>: lambda "ft" $
-      "paramTypes" <<~ (extractParamTypes @@ var "cx" @@ var "g" @@ var "typ") $
-      "resultTypes" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "typ") $
-        right (list [
-          inject W._ModuleField W._ModuleField_type $
-            record W._TypeDef [
-              W._TypeDef_name>>: just (var "lname"),
-              W._TypeDef_type>>: record W._FuncType [
-                W._FuncType_params>>: var "paramTypes",
-                W._FuncType_results>>: var "resultTypes"]]])]
-
-
--- =============================================================================
--- Term definition encoding
--- =============================================================================
-
--- | Peel up to N outer lambdas from `term`, where N = length of `args`. Returns
--- (peeledParamNames, innerBody). If `term` has fewer nested lambdas than there
--- are args, the extra args are not peeled (they remain for the caller to drop
--- or ignore). Used by encodeApplication's `_Term_lambda` case to beta-reduce
--- `(\x -> \y -> body) @@ argX @@ argY` by binding each arg to its param's local.
-peelLambdaApp :: TTermDefinition (Term -> [Term] -> ([Name], Term))
-peelLambdaApp = def "peelLambdaApp" $
-  lambda "term" $ lambda "args" $
-    Logic.ifElse (Lists.null (var "args"))
-      (pair (list ([] :: [TTerm Name])) (var "term"))
-      ("stripped" <~ (Strip.deannotateTerm @@ var "term") $
-       cases _Term (var "stripped") (Just $ pair (list ([] :: [TTerm Name])) (var "term")) [
-         _Term_lambda>>: lambda "lam" $
-           "paramName" <~ Core.lambdaParameter (var "lam") $
-           "body" <~ Core.lambdaBody (var "lam") $
-           "restArgs" <~ Maybes.fromMaybe (list ([] :: [TTerm Term])) (Lists.maybeTail (var "args")) $
-           "inner" <~ (peelLambdaApp @@ var "body" @@ var "restArgs") $
-             pair
-               (Lists.cons (var "paramName") (Pairs.first (var "inner")))
-               (Pairs.second (var "inner"))])
-
--- | Extract parameter names from nested lambdas, returning (params, innerBody)
-extractLambdaParams :: TTermDefinition (Term -> ([Name], Term))
-extractLambdaParams = def "extractLambdaParams" $
-  lambda "term" $
-    "stripped" <~ (Strip.deannotateTerm @@ var "term") $
-    cases _Term (var "stripped") (Just $ pair (list ([] :: [TTerm Name])) (var "term")) [
-      _Term_lambda>>: lambda "lam" $
-        "paramName" <~ Core.lambdaParameter (var "lam") $
-        "body" <~ Core.lambdaBody (var "lam") $
-        "inner" <~ (extractLambdaParams @@ var "body") $
-          pair
-            (Lists.cons (var "paramName") (Pairs.first (var "inner")))
-            (Pairs.second (var "inner")),
-      -- Bare eliminations: generate a synthetic parameter name.
-      -- The elimination itself becomes the body (applied to the synthetic param).
-      _Term_cases>>: lambda "_cs" $
-        pair (list [wrap _Name (string "arg_0")]) (var "term"),
-      _Term_project>>: lambda "_proj" $
-        pair (list [wrap _Name (string "arg_0")]) (var "term"),
-      _Term_unwrap>>: lambda "_name" $
-        pair (list [wrap _Name (string "arg_0")]) (var "term"),
-      _Term_typeLambda>>: lambda "tl" $
-        extractLambdaParams @@ Core.typeLambdaBody (var "tl"),
-      _Term_typeApplication>>: lambda "ta" $
-        extractLambdaParams @@ Core.typeApplicationTermBody (var "ta")]
-
--- | Collect all local variable names referenced by local.get and local.set in a list of instructions.
--- Recurses into block, loop, and if bodies.
-collectInstructionLocals :: TTermDefinition ([W.Instruction] -> S.Set String)
-collectInstructionLocals = def "collectInstructionLocals" $
-  lambda "instrs" $
-    Lists.foldl
-      (lambda "acc" $ lambda "instr" $
-        cases W._Instruction (var "instr") (Just $ var "acc") [
-          W._Instruction_localGet>>: lambda "v" $ Sets.insert (var "v") (var "acc"),
-          W._Instruction_localSet>>: lambda "v" $ Sets.insert (var "v") (var "acc"),
-          W._Instruction_localTee>>: lambda "v" $ Sets.insert (var "v") (var "acc"),
-          W._Instruction_block>>: lambda "b" $
-            Sets.union (var "acc") (collectInstructionLocals @@ (project W._BlockInstruction W._BlockInstruction_body @@ var "b")),
-          W._Instruction_loop>>: lambda "b" $
-            Sets.union (var "acc") (collectInstructionLocals @@ (project W._BlockInstruction W._BlockInstruction_body @@ var "b")),
-          W._Instruction_if>>: lambda "i" $
-            Sets.union (Sets.union (var "acc")
-              (collectInstructionLocals @@ (project W._IfInstruction W._IfInstruction_then @@ var "i")))
-              (collectInstructionLocals @@ (project W._IfInstruction W._IfInstruction_else @@ var "i"))])
-      (Sets.empty :: TTerm (S.Set String))
-      (var "instrs")
-
--- | Collect all call targets from a list of instructions.
--- Recurses into block, loop, and if bodies.
-collectCallTargets :: TTermDefinition ([W.Instruction] -> S.Set String)
-collectCallTargets = def "collectCallTargets" $
-  lambda "instrs" $
-    Lists.foldl
-      (lambda "acc" $ lambda "instr" $
-        cases W._Instruction (var "instr") (Just $ var "acc") [
-          W._Instruction_call>>: lambda "v" $ Sets.insert (var "v") (var "acc"),
-          W._Instruction_block>>: lambda "b" $
-            Sets.union (var "acc") (collectCallTargets @@ (project W._BlockInstruction W._BlockInstruction_body @@ var "b")),
-          W._Instruction_loop>>: lambda "b" $
-            Sets.union (var "acc") (collectCallTargets @@ (project W._BlockInstruction W._BlockInstruction_body @@ var "b")),
-          W._Instruction_if>>: lambda "i" $
-            Sets.union (Sets.union (var "acc")
-              (collectCallTargets @@ (project W._IfInstruction W._IfInstruction_then @@ var "i")))
-              (collectCallTargets @@ (project W._IfInstruction W._IfInstruction_else @@ var "i"))])
-      (Sets.empty :: TTerm (S.Set String))
-      (var "instrs")
-
--- | Extract parameter types from a function type, returning a list of domain types
-extractParamTypes :: TTermDefinition (Context -> Graph -> Type -> Either (InContext Error) [W.ValType])
-extractParamTypes = def "extractParamTypes" $
-  "cx" ~> "g" ~> lambda "t" $
-    "typ" <~ (Strip.deannotateType @@ var "t") $
-    cases _Type (var "typ") (Just $ right (list ([] :: [TTerm W.ValType]))) [
-      _Type_function>>: lambda "ft" $
-        "domType" <<~ (encodeValType @@ var "cx" @@ var "g" @@ Core.functionTypeDomain (var "ft")) $
-        "rest" <<~ (extractParamTypes @@ var "cx" @@ var "g" @@ Core.functionTypeCodomain (var "ft")) $
-          right (Lists.cons (var "domType") (var "rest")),
-      _Type_forall>>: lambda "fa" $
-        extractParamTypes @@ var "cx" @@ var "g" @@ Core.forallTypeBody (var "fa")]
-
--- | Clamp a list of Wasm value types to all-i32. The coder's function bodies still
--- assume the 1-i32-per-term stack invariant (sessions 8-15), so non-i32 types like
--- f64 or i64 in a primitive's signature would violate that invariant at call sites.
--- Clamping to i32 universally keeps the body encoding valid while letting the signature
--- have the right arity. Runtime semantic correctness for non-i32 primitives (floats,
--- i64 integers) is deferred.
-clampValTypesToI32 :: TTermDefinition ([W.ValType] -> [W.ValType])
-clampValTypesToI32 = def "clampValTypesToI32" $
-  lambda "vts" $
-    Lists.map (lambda "_vt" $ inject W._ValType W._ValType_i32 unit) (var "vts")
-
--- | Extract a complete function signature (params + results) from a Hydra type,
--- clamping every Wasm value type to i32. Returns a pair `(paramTypes, resultTypes)`
--- suitable for direct use in a Wasm TypeUse. Non-function types have zero params
--- and a single i32 result (constants).
-extractSignature :: TTermDefinition (Context -> Graph -> Type -> Either (InContext Error) ([W.ValType], [W.ValType]))
-extractSignature = def "extractSignature" $
-  "cx" ~> "g" ~> lambda "t" $
-    "params" <<~ (extractParamTypes @@ var "cx" @@ var "g" @@ var "t") $
-    "results" <<~ (encodeType @@ var "cx" @@ var "g" @@ var "t") $
-      right (pair (clampValTypesToI32 @@ var "params") (clampValTypesToI32 @@ var "results"))
-
--- | Build a universe-wide map from snake-cased function names to Wasm signatures.
--- Walks three sources: (1) the graph's primitives (hydra.lib.*), (2) the graph's
--- boundTypes (all kernel cross-module definitions), and (3) the current module's
--- own term definitions (for internal consistency). Each entry's Hydra type scheme
--- is stripped of its Forall and passed through extractSignature. Any entry whose
--- type extraction fails is silently dropped — the call site will fall back to
--- the default (param i32) (result i32) signature.
---
--- Keys are snake-cased to match the form used by Formatting.convertCaseCamelToLowerSnake
--- at call and import emission sites. If two distinct Hydra names collide to the same
--- snake form, the last one wins (deterministic by Maps.toList order).
-buildFunctionSignatures :: TTermDefinition (Context -> Graph -> [TermDefinition] -> M.Map String ([W.ValType], [W.ValType]))
-buildFunctionSignatures = def "buildFunctionSignatures" $
-  "cx" ~> "g" ~> lambda "termDefs" $
-    -- Helper: given a (Name, TypeScheme) pair, produce a (snakeName, signature) pair
-    -- or Nothing on failure.
-    "toSigEntry" <~ (lambda "nameAndScheme" $
-      "nm" <~ Pairs.first (var "nameAndScheme") $
-      "ts" <~ Pairs.second (var "nameAndScheme") $
-      "snakeName" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (var "nm")) $
-      "sigEither" <~ (extractSignature @@ var "cx" @@ var "g" @@ Core.typeSchemeBody (var "ts")) $
-      Eithers.either_
-        (lambda "_err" $ nothing)
-        (lambda "sig" $ just (pair (var "snakeName") (var "sig")))
-        (var "sigEither")) $
-    -- Primitives: walk graph.primitives -> Map Name Primitive, extract type from each.
-    "primEntries" <~ Maybes.cat (Lists.map
-      (lambda "kv" $ var "toSigEntry" @@ pair (Pairs.first (var "kv")) (DslGraph.primitiveTypeScheme (Pairs.second (var "kv"))))
-      (Maps.toList (DslGraph.graphPrimitives (var "g")))) $
-    -- Cross-module bound term types: walk graph.boundTypes -> Map Name TypeScheme.
-    "boundEntries" <~ Maybes.cat (Lists.map
-      (lambda "kv" $ var "toSigEntry" @@ var "kv")
-      (Maps.toList (DslGraph.graphBoundTypes (var "g")))) $
-    -- Current module's own term defs: use their optional TypeScheme field directly.
-    "localEntries" <~ Maybes.cat (Lists.map
-      (lambda "td" $
-        Maybes.bind (Packaging.termDefinitionTypeScheme (var "td"))
-          (lambda "ts" $ var "toSigEntry" @@ pair (Packaging.termDefinitionName (var "td")) (var "ts")))
-      (var "termDefs")) $
-    Maps.fromList (Lists.concat (list [var "primEntries", var "boundEntries", var "localEntries"]))
-
--- | Encode a Hydra term definition as a WASM function. The stringOffsets map is threaded
--- down to encodeTerm so that _Literal_string values can be resolved to real memory offsets.
--- The fieldOffsets map is threaded down to encodeProjection so that record projection emits
--- a real `i32.load offset=N` instead of the placeholder. The variantIndexes map is threaded
--- down to encodeTerm (for _Term_inject tags) and encodeCases (for br_table tag dispatch).
-encodeTermDefinition :: TTermDefinition (Context -> Graph -> M.Map String Int -> M.Map Name [(Name, Int)] -> M.Map Name [(Name, Int)] -> M.Map String ([W.ValType], [W.ValType]) -> TermDefinition -> Either (InContext Error) W.ModuleField)
-encodeTermDefinition = def "encodeTermDefinition" $
-  "cx" ~> "g" ~> "stringOffsets" ~> "fieldOffsets" ~> "variantIndexes" ~> "funcSigs" ~> lambda "tdef" $
-    "name" <~ Packaging.termDefinitionName (var "tdef") $
-    "term" <~ Packaging.termDefinitionTerm (var "tdef") $
-    "lname" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (var "name")) $
-    "typ" <~ Maybes.maybe
-      (Core.typeUnit)
-      (unaryFunction Core.typeSchemeBody)
-      (Packaging.termDefinitionTypeScheme (var "tdef")) $
-    -- Extract lambda parameters and inner body
-    "extracted" <~ (extractLambdaParams @@ var "term") $
-    "paramNames" <~ Pairs.first (var "extracted") $
-    "innerBody" <~ Pairs.second (var "extracted") $
-    -- Real n-ary calling convention: one Wasm param per Hydra lambda param, all i32.
-    -- Each param is named after the Hydra param (snake-cased).
-    "lambdaParamNameStrs" <~ Lists.map
-      (lambda "pn" $ Formatting.convertCaseCamelToLowerSnake @@ Core.unName (var "pn"))
-      (var "paramNames") $
-    -- Align the Wasm signature with funcSigs: if the term is eta-contracted (e.g.
-    -- sanitizeHaskellName = sanitizeWithUnderscores @@ reservedWords has 0 lambda
-    -- params but type `String -> String`), callers push one real arg and expect
-    -- the callee to consume it. Without padding, the call site leaves an extra
-    -- value on the stack and the function fails wat2wasm's end-of-function
-    -- stack-size check. The padding synthesizes `$arg_synth_<i>` Wasm params
-    -- and drops each at body start, preserving the "body produces exactly 1 i32"
-    -- invariant. Semantics are placeholder: the synthetic args are discarded,
-    -- matching the existing placeholder behavior for eta-contracted bodies.
-    "typeParams" <<~ (extractParamTypes @@ var "cx" @@ var "g" @@ var "typ") $
-    "typeParamCount" <~ Lists.length (var "typeParams") $
-    "lambdaParamCount" <~ Lists.length (var "lambdaParamNameStrs") $
-    "syntheticCount" <~ Logic.ifElse (Equality.gt (var "typeParamCount") (var "lambdaParamCount"))
-      (Math.sub (var "typeParamCount") (var "lambdaParamCount"))
-      (int32 0) $
-    -- Note: Math.range is INCLUSIVE of its upper bound (range 0 n = [0..n]),
-    -- so we map over [0 .. n-1] only when n > 0. When n == 0 we want the
-    -- empty list, not [0].
-    "syntheticParamNames" <~ Logic.ifElse (Equality.gt (var "syntheticCount") (int32 0))
-      (Lists.map
-        (lambda "i" $ Strings.cat2 (string "arg_synth_") (Literals.showInt32 (var "i")))
-        (Math.range (int32 0) (Math.sub (var "syntheticCount") (int32 1))))
-      (list ([] :: [TTerm String])) $
-    "paramNameStrs" <~ Lists.concat2 (var "lambdaParamNameStrs") (var "syntheticParamNames") $
-    "wasmParams" <~ Lists.map
-      (lambda "pn" $ record W._Param [
-        W._Param_name>>: just (var "pn"),
-        W._Param_type>>: inject W._ValType W._ValType_i32 unit])
-      (var "paramNameStrs") $
-    -- Prologue: drop each synthetic arg so the body still produces exactly 1 i32.
-    -- Real params extracted from Hydra lambdas are accessed by the body directly
-    -- via local.get by name; no copy from a synthetic $arg_0 is needed.
-    "initPrologue" <~ Lists.concat (Lists.map
-      (lambda "sn" $ list [
-        inject W._Instruction W._Instruction_localGet (var "sn"),
-        inject W._Instruction W._Instruction_drop unit])
-      (var "syntheticParamNames")) $
-    -- Every function returns a single i32 (the body encoding still produces one i32 per term).
-    "resultTypes" <~ list [inject W._ValType W._ValType_i32 unit] $
-    -- Encode body: for bare eliminations (detected by extractLambdaParams producing synthetic
-    -- param "arg_0"), pass local.get of the first Hydra param as the scrutinee.
-    "dBody" <~ (Strip.deannotateTerm @@ var "innerBody") $
-    "scrutineeInstrs" <~ Maybes.cases (Lists.maybeHead (var "paramNameStrs"))
-      (list ([] :: [TTerm W.Instruction]))
-      (lambda "p0" $ list [inject W._Instruction W._Instruction_localGet (var "p0")]) $
-    "rawBodyInstrs" <<~ (cases _Term (var "dBody") (Just $
-        encodeTerm @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "innerBody")
-      [_Term_project>>: lambda "proj" $
-         encodeProjection @@ var "cx" @@ var "g" @@ var "fieldOffsets" @@ var "proj" @@ var "scrutineeInstrs",
-       _Term_cases>>: lambda "cs" $
-         encodeCases @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs" @@ var "cs" @@ var "scrutineeInstrs",
-       _Term_unwrap>>: lambda "_name" $
-         -- Unwrap is identity; keep the 1-value invariant.
-         right (list [inject W._Instruction W._Instruction_const $
-           inject W._ConstValue W._ConstValue_i32 (int32 0)])]) $
-    "bodyInstrs" <~ Lists.concat2 (var "initPrologue") (var "rawBodyInstrs") $
-    -- Collect all local variable names referenced in the body instructions
-    "referencedLocals" <~ (collectInstructionLocals @@ var "bodyInstrs") $
-    -- Union referenced locals with all Hydra param names (so param locals always exist,
-    -- even if the body never reads them), then subtract the real WASM params (which are
-    -- already declared in the function signature, not as locals).
-    "allLocalNames" <~ Sets.toList (Sets.difference
-      (var "referencedLocals")
-      (Sets.fromList (var "paramNameStrs"))) $
-    "wasmLocals" <~ Lists.map
-      (lambda "ln" $
-        record W._FuncLocal [
-          W._FuncLocal_name>>: just (var "ln"),
-          -- Default to i32 for locals (all compound types are pointers)
-          W._FuncLocal_type>>: inject W._ValType W._ValType_i32 unit])
-      (var "allLocalNames") $
-      right (inject W._ModuleField W._ModuleField_func $
-        record W._Func [
-          W._Func_name>>: just (var "lname"),
-          W._Func_typeUse>>: record W._TypeUse [
-            W._TypeUse_index>>: nothing,
-            W._TypeUse_params>>: var "wasmParams",
-            W._TypeUse_results>>: var "resultTypes"],
-          W._Func_locals>>: var "wasmLocals",
-          W._Func_body>>: var "bodyInstrs"])
-
-
--- =============================================================================
--- String data segment support
--- =============================================================================
-
--- | Collect every distinct string literal reachable from a list of term definitions.
--- Uses Rewriting.foldOverTerm in pre-order to walk every subterm and accumulate
--- _Literal_string values into a Set, then returns the Set as a sorted list so that
--- offset assignments are deterministic across regenerations.
-collectStrings :: TTermDefinition ([TermDefinition] -> [String])
-collectStrings = def "collectStrings" $
-  lambda "termDefs" $
-    "collectOne" <~ (lambda "acc" $ lambda "t" $
-      cases _Term (var "t") (Just $ var "acc") [
-        _Term_literal>>: lambda "lit" $
-          cases _Literal (var "lit") (Just $ var "acc") [
-            _Literal_string>>: lambda "s" $ Sets.insert (var "s") (var "acc")]]) $
-    "allStrings" <~ Lists.foldl
-      (lambda "acc" $ lambda "td" $
-        Rewriting.foldOverTerm @@ Coders.traversalOrderPre @@
-          (var "collectOne") @@ (var "acc") @@ (Packaging.termDefinitionTerm (var "td")))
-      (Sets.empty :: TTerm (S.Set String))
-      (var "termDefs") $
-    Sets.toList (var "allStrings")
-
--- | Build a module-level field-offset table from a Graph. For each record type defined
--- anywhere in the universe (i.e. every entry in `graphSchemaTypes`), walks its `TypeScheme`
--- (stripping `Annotated`, `Forall`, and `TypeLambda` layers) and, if the underlying type is
--- `_Type_record [FieldType]`, records a list of (fieldName, byteOffset) pairs in declaration
--- order (offsets 0, 4, 8, ...). Non-record types contribute nothing.
---
--- The resulting `M.Map Name [(Name, Int)]` is consumed by `encodeProjection` to replace
--- placeholder projection output with a real `i32.load offset=N` at `scrutinee + fieldOffset`.
--- Using the full graph (not just the current module's type defs) is essential because
--- most record projections reference types defined in other modules — e.g. every
--- projection of a `hydra.core.Record` happens in modules that don't themselves define
--- that type.
-buildFieldOffsets :: TTermDefinition (Graph -> M.Map Name [(Name, Int)])
-buildFieldOffsets = def "buildFieldOffsets" $
-  lambda "g" $
-    -- Return Just [FieldType] if the stripped type is a record; Nothing otherwise.
-    -- Handles two layers of Forall + one Annotated wrapper, which covers the kernel.
-    "recordFieldsOf" <~ (lambda "t" $
-      "stripped" <~ (Strip.deannotateType @@ var "t") $
-      cases _Type (var "stripped") (Just $ (nothing :: TTerm (Maybe [FieldType]))) [
-        _Type_record>>: lambda "fts" $ just (var "fts"),
-        _Type_forall>>: lambda "fa" $
-          -- A Forall over a record: recurse one level.
-          "innerStripped" <~ (Strip.deannotateType @@ Core.forallTypeBody (var "fa")) $
-          cases _Type (var "innerStripped") (Just $ (nothing :: TTerm (Maybe [FieldType]))) [
-            _Type_record>>: lambda "fts" $ just (var "fts")]]) $
-    "entryFor" <~ (lambda "nameSchemePair" $
-      "tname" <~ Pairs.first (var "nameSchemePair") $
-      "tscheme" <~ Pairs.second (var "nameSchemePair") $
-      "tbody" <~ Core.typeSchemeBody (var "tscheme") $
-      "mfields" <~ (var "recordFieldsOf" @@ var "tbody") $
-      Maybes.cases (var "mfields")
-        (nothing :: TTerm (Maybe (Name, [(Name, Int)])))
-        (lambda "fts" $
-          "namedOffsets" <~ (Lists.map
-            (lambda "p" $
-              "i" <~ Pairs.first (var "p") $
-              "ft" <~ Pairs.second (var "p") $
-                pair (Core.fieldTypeName (var "ft")) (Math.mul (var "i") (int32 4)))
-            -- Zip [0..N-1] with the field type list.
-            (Lists.zip
-              (Lists.foldl
-                (lambda "acc" $ lambda "_f" $ Lists.concat2 (var "acc") (list [Lists.length (var "acc")]))
-                (list ([] :: [TTerm Int]))
-                (var "fts"))
-              (var "fts"))) $
-          just (pair (var "tname") (var "namedOffsets")))) $
-    "schemaTypesList" <~ (Maps.toList (DslGraph.graphSchemaTypes (var "g"))) $
-    "entries" <~ (Maybes.cat (Lists.map (var "entryFor") (var "schemaTypesList"))) $
-    Maps.fromList (var "entries")
-
--- | Build a universe-wide variant-tag table from a Graph. For each union type defined
--- anywhere in the graph's schemaTypes, walks the stripped `TypeScheme` and, if the
--- underlying type is `_Type_union [FieldType]`, records a list of (variantName, tagIndex)
--- pairs in declaration order (indexes 0, 1, 2, ...). Non-union types contribute nothing.
---
--- The resulting `M.Map Name [(Name, Int)]` is consumed by `encodeTerm`'s `_Term_inject`
--- case to look up the tag index to store at offset 0 of the allocated union record. The
--- indexes here are raw integers (not byte offsets), unlike `buildFieldOffsets`.
-buildVariantIndexes :: TTermDefinition (Graph -> M.Map Name [(Name, Int)])
-buildVariantIndexes = def "buildVariantIndexes" $
-  lambda "g" $
-    -- Return Just [FieldType] if the stripped type is a union; Nothing otherwise.
-    "unionFieldsOf" <~ (lambda "t" $
-      "stripped" <~ (Strip.deannotateType @@ var "t") $
-      cases _Type (var "stripped") (Just $ (nothing :: TTerm (Maybe [FieldType]))) [
-        _Type_union>>: lambda "fts" $ just (var "fts"),
-        _Type_forall>>: lambda "fa" $
-          "innerStripped" <~ (Strip.deannotateType @@ Core.forallTypeBody (var "fa")) $
-          cases _Type (var "innerStripped") (Just $ (nothing :: TTerm (Maybe [FieldType]))) [
-            _Type_union>>: lambda "fts" $ just (var "fts")]]) $
-    "entryFor" <~ (lambda "nameSchemePair" $
-      "tname" <~ Pairs.first (var "nameSchemePair") $
-      "tscheme" <~ Pairs.second (var "nameSchemePair") $
-      "tbody" <~ Core.typeSchemeBody (var "tscheme") $
-      "mfields" <~ (var "unionFieldsOf" @@ var "tbody") $
-      Maybes.cases (var "mfields")
-        (nothing :: TTerm (Maybe (Name, [(Name, Int)])))
-        (lambda "fts" $
-          "namedIndexes" <~ (Lists.map
-            (lambda "p" $
-              "i" <~ Pairs.first (var "p") $
-              "ft" <~ Pairs.second (var "p") $
-                pair (Core.fieldTypeName (var "ft")) (var "i"))
-            -- Zip [0..N-1] with the field type list.
-            (Lists.zip
-              (Lists.foldl
-                (lambda "acc" $ lambda "_f" $ Lists.concat2 (var "acc") (list [Lists.length (var "acc")]))
-                (list ([] :: [TTerm Int]))
-                (var "fts"))
-              (var "fts"))) $
-          just (pair (var "tname") (var "namedIndexes")))) $
-    "schemaTypesList" <~ (Maps.toList (DslGraph.graphSchemaTypes (var "g"))) $
-    "entries" <~ (Maybes.cat (Lists.map (var "entryFor") (var "schemaTypesList"))) $
-    Maps.fromList (var "entries")
-
--- | Assign a byte offset to each distinct string. Offsets start at 1024 (reserving the
--- low 1KB for a null-pointer region) and grow by 4 + UTF-8 byte count per entry, to
--- match the length-prefixed layout used by stringDataSegment. Each length-prefix is
--- 4 bytes (little-endian i32 length). Returns a pair (offsetMap, bumpStart) where
--- bumpStart is the next 16-byte-aligned offset past the end of the string segment;
--- it's used to initialize the runtime bump allocator.
-buildStringOffsets :: TTermDefinition ([String] -> (M.Map String Int, Int))
-buildStringOffsets = def "buildStringOffsets" $
-  lambda "strs" $
-    "step" <~ (lambda "acc" $ lambda "s" $
-      "m" <~ Pairs.first (var "acc") $
-      "off" <~ Pairs.second (var "acc") $
-      "len" <~ Strings.length (var "s") $
-        pair
-          (Maps.insert (var "s") (var "off") (var "m"))
-          (Math.add (var "off") (Math.add (int32 4) (var "len")))) $
-    "final" <~ (Lists.foldl (var "step")
-      (pair (Maps.empty :: TTerm (M.Map String Int)) (int32 1024))
-      (var "strs")) $
-    "rawEnd" <~ Pairs.second (var "final") $
-    -- Round up to the next 16-byte boundary so the bump pointer starts aligned.
-    "aligned" <~ Math.mul (Maybes.fromMaybe (int32 0) (Math.maybeDiv (Math.add (var "rawEnd") (int32 15)) (int32 16))) (int32 16) $
-    pair (Pairs.first (var "final")) (var "aligned")
-
--- | Emit a single byte as a two-character lowercase hex escape prefixed with backslash,
--- e.g. 65 -> "\41". Inputs outside 0..255 (e.g. non-ASCII code points from Strings.toList)
--- are masked to the low 8 bits, so the output is always well-formed WAT. This is a lossy
--- fallback for non-ASCII kernel strings; proper UTF-8 byte encoding is future work.
-hexEscapeString :: TTermDefinition (Int -> String)
-hexEscapeString = def "hexEscapeString" $
-  lambda "b" $
-    "byte" <~ (Maybes.fromMaybe (int32 0) (Math.maybeMod (var "b") (int32 256))) $
-    "digitToHex" <~ (lambda "d" $
-      Logic.ifElse (Equality.lt (var "d") (int32 10))
-        -- '0' = 48
-        (Strings.fromList (list [Math.add (var "d") (int32 48)]))
-        -- 'a' - 10 = 87
-        (Strings.fromList (list [Math.add (var "d") (int32 87)]))) $
-    Strings.cat (list [
-      string "\\",
-      var "digitToHex" @@ (Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "byte") (int32 16))),
-      var "digitToHex" @@ (Maybes.fromMaybe (int32 0) (Math.maybeMod (var "byte") (int32 16)))])
-
--- | Build the (data ...) module field for a string-offset map. The data segment contains,
--- for each string s with offset off, a 4-byte little-endian length prefix followed by the
--- UTF-8 bytes of s. Strings are emitted in offset order, so consecutive entries pack
--- contiguously starting at offset 1024. The segment is emitted as a single hex-escaped
--- byte string (two hex chars per byte) to avoid any edge cases with quotes, backslashes,
--- newlines, or non-ASCII bytes inside WAT string literals.
---
--- If the map is empty, emits a zero-length data segment at offset 1024 (benign).
-stringDataSegment :: TTermDefinition (M.Map String Int -> W.ModuleField)
-stringDataSegment = def "stringDataSegment" $
-  lambda "offsets" $
-    -- Sort (string, offset) pairs by offset so the data segment packs contiguously
-    "entries" <~ Lists.sortOn (unaryFunction Pairs.second) (Maps.toList (var "offsets")) $
-    -- For each string: emit 4 length-prefix bytes (little-endian) followed by content bytes,
-    -- every byte as a hex escape.
-    "bytesForEntry" <~ (lambda "entry" $
-      "s" <~ Pairs.first (var "entry") $
-      "len" <~ Strings.length (var "s") $
-      "lenBytes" <~ list [
-        Maybes.fromMaybe (int32 0) (Math.maybeMod (var "len") (int32 256)),
-        Maybes.fromMaybe (int32 0) (Math.maybeMod (Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "len") (int32 256))) (int32 256)),
-        Maybes.fromMaybe (int32 0) (Math.maybeMod (Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "len") (int32 65536))) (int32 256)),
-        Maybes.fromMaybe (int32 0) (Math.maybeMod (Maybes.fromMaybe (int32 0) (Math.maybeDiv (var "len") (int32 16777216))) (int32 256))] $
-      "contentBytes" <~ Strings.toList (var "s") $
-      "allBytes" <~ Lists.concat2 (var "lenBytes") (var "contentBytes") $
-        Strings.cat (Lists.map (lambda "b" $ hexEscapeString @@ var "b") (var "allBytes"))) $
-    "allHex" <~ Strings.cat (Lists.map (var "bytesForEntry") (var "entries")) $
-    inject W._ModuleField W._ModuleField_data $
-      record W._DataSegment [
-        W._DataSegment_name>>: nothing,
-        W._DataSegment_mode>>: inject W._DataMode W._DataMode_active (list [
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (int32 1024)]),
-        W._DataSegment_bytes>>: var "allHex"]
-
-
--- =============================================================================
--- Module entry point
--- =============================================================================
-
--- | Convert a Hydra module to a map of file paths to WAT source code strings.
-moduleToWasm :: TTermDefinition (Module -> [Definition] -> Context -> Graph -> Either (InContext Error) (M.Map FilePath String))
-moduleToWasm = def "moduleToWasm" $
-  "mod" ~> "defs" ~> "cx" ~> "g" ~>
-    "partitioned" <~ (Environment.partitionDefinitions @@ var "defs") $
-    "typeDefs" <~ Pairs.first (var "partitioned") $
-    "termDefs" <~ Pairs.second (var "partitioned") $
-    -- Build the module-level string→offset map once, before any term encoding runs,
-    -- by walking every term definition and collecting _Literal_string values.
-    "stringList" <~ (collectStrings @@ var "termDefs") $
-    "stringOffsetsAndEnd" <~ (buildStringOffsets @@ var "stringList") $
-    "stringOffsets" <~ Pairs.first (var "stringOffsetsAndEnd") $
-    "stringEnd" <~ Pairs.second (var "stringOffsetsAndEnd") $
-    "dataField" <~ (stringDataSegment @@ var "stringOffsets") $
-    -- Build the universe-wide record-type→field-offset and union-type→variant-tag-index
-    -- tables once, before any term encoding runs, by walking every type in the graph's
-    -- schemaTypes. Using the full graph (not just this module's type defs) is essential
-    -- because most projections and injections reference types defined in other modules.
-    "fieldOffsets" <~ (buildFieldOffsets @@ var "g") $
-    "variantIndexes" <~ (buildVariantIndexes @@ var "g") $
-    "funcSigs" <~ (buildFunctionSignatures @@ var "cx" @@ var "g" @@ var "termDefs") $
-    "typeFields" <<~ (Eithers.mapList (encodeTypeDefinition @@ var "cx" @@ var "g") (var "typeDefs")) $
-    "termFields" <<~ (Eithers.mapList (encodeTermDefinition @@ var "cx" @@ var "g" @@ var "stringOffsets" @@ var "fieldOffsets" @@ var "variantIndexes" @@ var "funcSigs") (var "termDefs")) $
-    "allFields" <~ Lists.concat2 (Lists.concat (var "typeFields")) (var "termFields") $
-    -- The bump allocator global: starts just past the string data segment, grows upward.
-    -- Records and other heap-allocated compound values occupy memory from stringEnd
-    -- onward. Must be mutable so $__alloc can update it.
-    "bumpGlobal" <~ (inject W._ModuleField W._ModuleField_global $
-      record W._GlobalDef [
-        W._GlobalDef_name>>: just (string "__bump_ptr"),
-        W._GlobalDef_type>>: record W._GlobalType [
-          W._GlobalType_valType>>: inject W._ValType W._ValType_i32 unit,
-          W._GlobalType_mutable>>: boolean True],
-        W._GlobalDef_init>>: list [
-          inject W._Instruction W._Instruction_const $
-            inject W._ConstValue W._ConstValue_i32 (var "stringEnd")]]) $
-    -- The bump allocator helper: (func $__alloc (param $sz i32) (result i32)). Reads
-    -- the current bump pointer, advances it by $sz, returns the original value.
-    --   global.get $__bump_ptr   ;; result = old ptr
-    --   global.get $__bump_ptr
-    --   local.get $sz
-    --   i32.add
-    --   global.set $__bump_ptr    ;; advance
-    "allocFunc" <~ (inject W._ModuleField W._ModuleField_func $
-      record W._Func [
-        W._Func_name>>: just (string "__alloc"),
-        W._Func_typeUse>>: record W._TypeUse [
-          W._TypeUse_index>>: nothing,
-          W._TypeUse_params>>: list [record W._Param [
-            W._Param_name>>: just (string "sz"),
-            W._Param_type>>: inject W._ValType W._ValType_i32 unit]],
-          W._TypeUse_results>>: list [inject W._ValType W._ValType_i32 unit]],
-        W._Func_locals>>: list ([] :: [TTerm W.FuncLocal]),
-        W._Func_body>>: list [
-          inject W._Instruction W._Instruction_globalGet (string "__bump_ptr"),
-          inject W._Instruction W._Instruction_globalGet (string "__bump_ptr"),
-          inject W._Instruction W._Instruction_localGet (string "sz"),
-          inject W._Instruction W._Instruction_binop $
-            record W._NumericOp [
-              W._NumericOp_type>>: inject W._ValType W._ValType_i32 unit,
-              W._NumericOp_name>>: string "add"],
-          inject W._Instruction W._Instruction_globalSet (string "__bump_ptr")]]) $
-    -- Add a memory definition (2 pages = 128KB): room for the string data segment,
-    -- a bump allocator arena, and the stack for nested records.
-    "memField" <~ (inject W._ModuleField W._ModuleField_memory $
-      record W._MemoryDef [
-        W._MemoryDef_name>>: just (string "memory"),
-        W._MemoryDef_limits>>: record W._Limits [
-          W._Limits_min>>: int32 2,
-          W._Limits_max>>: nothing]]) $
-    -- Add memory export
-    "memExport" <~ (inject W._ModuleField W._ModuleField_export $
-      record W._ExportDef [
-        W._ExportDef_name>>: string "memory",
-        W._ExportDef_desc>>: inject W._ExportDesc W._ExportDesc_memory (string "memory")]) $
-    -- Export the bump pointer global so the JS host can observe allocations.
-    "bumpExport" <~ (inject W._ModuleField W._ModuleField_export $
-      record W._ExportDef [
-        W._ExportDef_name>>: string "__bump_ptr",
-        W._ExportDef_desc>>: inject W._ExportDesc W._ExportDesc_global (string "__bump_ptr")]) $
-    -- Export the bump allocator helper so the JS host can build kernel values
-    -- (records, tagged unions, strings) in the module's linear memory from outside.
-    "allocExport" <~ (inject W._ModuleField W._ModuleField_export $
-      record W._ExportDef [
-        W._ExportDef_name>>: string "__alloc",
-        W._ExportDef_desc>>: inject W._ExportDesc W._ExportDesc_func (string "__alloc")]) $
-    -- Closure infrastructure (M4b): one type signature for 1-arg closures plus an
-    -- empty function table. Later milestones grow the table as lambdas get lifted
-    -- into it; closures carry a stable table index that call_indirect dispatches on.
-    -- Signature is uniform `(env:i32, arg:i32) -> i32`; multi-arg closures are
-    -- future work (additional signatures, one per arity).
-    "closureType" <~ (inject W._ModuleField W._ModuleField_type $
-      record W._TypeDef [
-        W._TypeDef_name>>: just (string "__closure_1"),
-        W._TypeDef_type>>: record W._FuncType [
-          W._FuncType_params>>: list [
-            inject W._ValType W._ValType_i32 unit,
-            inject W._ValType W._ValType_i32 unit],
-          W._FuncType_results>>: list [
-            inject W._ValType W._ValType_i32 unit]]]) $
-    "closureTable" <~ (inject W._ModuleField W._ModuleField_table $
-      record W._TableDef [
-        W._TableDef_name>>: just (string "__closure_table"),
-        W._TableDef_refType>>: inject W._RefType W._RefType_funcref unit,
-        W._TableDef_limits>>: record W._Limits [
-          W._Limits_min>>: int32 0,
-          W._Limits_max>>: nothing]]) $
-    -- Build function exports for each term definition
-    "funcExports" <~ Lists.map
-      (lambda "td" $
-        "ename" <~ (Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Packaging.termDefinitionName (var "td"))) $
-        inject W._ModuleField W._ModuleField_export $
-          record W._ExportDef [
-            W._ExportDef_name>>: var "ename",
-            W._ExportDef_desc>>: inject W._ExportDesc W._ExportDesc_func (var "ename")])
-      (var "termDefs") $
-    -- Collect all call targets from all function bodies to generate imports
-    "allBodyInstrs" <~ Lists.concat (Lists.map
-      (lambda "tf" $
-        cases W._ModuleField (var "tf") (Just $ list ([] :: [TTerm W.Instruction])) [
-          W._ModuleField_func>>: lambda "fn" $ project W._Func W._Func_body @@ var "fn"])
-      (var "termFields")) $
-    "allCallTargets" <~ (collectCallTargets @@ var "allBodyInstrs") $
-    -- Local function names (defined in this module), plus the runtime helper __alloc
-    -- (which is emitted by the coder itself, not imported).
-    "localFuncNames" <~ Sets.insert (string "__alloc") (Sets.fromList (Lists.map
-      (lambda "td" $
-        Formatting.convertCaseCamelToLowerSnake @@ Core.unName (Packaging.termDefinitionName (var "td")))
-      (var "termDefs"))) $
-    -- External call targets = all calls minus local functions (including __alloc)
-    "externalCalls" <~ Sets.toList (Sets.difference (var "allCallTargets") (var "localFuncNames")) $
-    -- Generate import declarations for external functions, using the signature from
-    -- funcSigs when available, falling back to the old (param i32) (result i32) shape.
-    "defaultSig" <~ pair
-      (list [inject W._ValType W._ValType_i32 unit])
-      (list [inject W._ValType W._ValType_i32 unit]) $
-    "importFields" <~ Lists.map
-      (lambda "fname" $
-        "parts" <~ (Strings.splitOn (string ".") (var "fname")) $
-        "modName" <~ Strings.intercalate (string ".") (Lists.reverse (Maybes.fromMaybe (list ([] :: [TTerm String])) (Lists.maybeTail (Lists.reverse (var "parts"))))) $
-        "sig" <~ Maybes.fromMaybe (var "defaultSig") (Maps.lookup (var "fname") (var "funcSigs")) $
-        "sigParams" <~ Pairs.first (var "sig") $
-        "sigResults" <~ Pairs.second (var "sig") $
-        "wasmImportParams" <~ Lists.map
-          (lambda "vt" $ record W._Param [
-            W._Param_name>>: nothing,
-            W._Param_type>>: var "vt"])
-          (var "sigParams") $
-          inject W._ModuleField W._ModuleField_import $
-            record W._ImportDef [
-              W._ImportDef_module>>: var "modName",
-              W._ImportDef_name>>: var "fname",
-              W._ImportDef_desc>>: inject W._ImportDesc W._ImportDesc_func $
-                record W._ImportFunc [
-                  W._ImportFunc_name>>: just (var "fname"),
-                  W._ImportFunc_typeUse>>: record W._TypeUse [
-                    W._TypeUse_index>>: nothing,
-                    W._TypeUse_params>>: var "wasmImportParams",
-                    W._TypeUse_results>>: var "sigResults"]]])
-      (var "externalCalls") $
-    "wasmMod" <~ (record W._Module [
-      W._Module_name>>: nothing,
-      W._Module_fields>>: Lists.concat (list [
-        var "importFields",
-        list [var "closureType", var "memField", var "memExport", var "dataField",
-              var "bumpGlobal", var "bumpExport", var "allocFunc",
-              var "allocExport", var "closureTable"],
-        var "funcExports",
-        var "allFields"])]) $
-    "code" <~ (SerializationSource.printExpr @@ (SerializationSource.parenthesize @@ (WasmSerdeSource.moduleToExpr @@ var "wasmMod"))) $
-    "filePath" <~ (Names.namespaceToFilePath @@ Util.caseConventionLowerSnake @@ wrap _FileExtension (string "wat") @@ (Packaging.moduleNamespace (var "mod"))) $
-      right (Maps.singleton (var "filePath") (var "code"))
diff --git a/src/main/haskell/Hydra/Sources/Wasm/Language.hs b/src/main/haskell/Hydra/Sources/Wasm/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Wasm/Language.hs
+++ /dev/null
@@ -1,196 +0,0 @@
-module Hydra.Sources.Wasm.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = (Namespace "hydra.wasm.language"),
-            moduleDefinitions = [toDefinition wasmLanguage, toDefinition wasmReservedWords],
-            moduleTermDependencies = [Lexical.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints and reserved words for WebAssembly (WAT text format)"}
-wasmLanguage :: TTermDefinition Language
-wasmLanguage = define "wasmLanguage" $
-    doc "Language constraints for WebAssembly" $ lets [
-    "eliminationVariants">: Sets.fromList $ list [
-      Variants.eliminationVariantRecord,
-      Variants.eliminationVariantUnion],
-    "literalVariants">: Sets.fromList $ list [
-      Variants.literalVariantBoolean, -- i32 (0/1)
-      Variants.literalVariantFloat, -- f32, f64
-      Variants.literalVariantInteger, -- i32, i64
-      Variants.literalVariantString], -- i32 (memory pointer)
-    "floatTypes">: Sets.fromList $ list [
-      Core.floatTypeFloat32, -- f32
-      Core.floatTypeFloat64], -- f64
-    "functionVariants">: Sets.fromList $ list [
-      Variants.functionVariantElimination,
-      Variants.functionVariantLambda],
-    "integerTypes">: Sets.fromList $ list [
-      Core.integerTypeInt8,   -- i32
-      Core.integerTypeInt16,  -- i32
-      Core.integerTypeInt32,  -- i32
-      Core.integerTypeInt64,  -- i64
-      Core.integerTypeUint8,  -- i32
-      Core.integerTypeUint16, -- i32
-      Core.integerTypeUint32, -- i32
-      Core.integerTypeUint64], -- i64
-    "termVariants">: Sets.fromList $ list [
-      Variants.termVariantAnnotated,
-      Variants.termVariantApplication,
-      Variants.termVariantCases,
-      Variants.termVariantEither,
-      Variants.termVariantInject,
-      Variants.termVariantLambda,
-      Variants.termVariantLet,
-      Variants.termVariantList,
-      Variants.termVariantLiteral,
-      Variants.termVariantMap,
-      Variants.termVariantMaybe,
-      Variants.termVariantPair,
-      Variants.termVariantProject,
-      Variants.termVariantRecord,
-      Variants.termVariantSet,
-      Variants.termVariantTypeApplication,
-      Variants.termVariantTypeLambda,
-      Variants.termVariantUnit,
-      Variants.termVariantUnwrap,
-      Variants.termVariantVariable,
-      Variants.termVariantWrap],
-    "typeVariants">: Sets.fromList $ list [
-      Variants.typeVariantAnnotated,
-      Variants.typeVariantApplication,
-      Variants.typeVariantEither,
-      Variants.typeVariantFunction,
-      Variants.typeVariantForall,
-      Variants.typeVariantList,
-      Variants.typeVariantLiteral,
-      Variants.typeVariantMap,
-      Variants.typeVariantMaybe,
-      Variants.typeVariantPair,
-      Variants.typeVariantRecord,
-      Variants.typeVariantSet,
-      Variants.typeVariantUnion,
-      Variants.typeVariantUnit,
-      Variants.typeVariantVariable,
-      Variants.typeVariantVoid,
-      Variants.typeVariantWrap],
-    "typePredicate">: constant true] $
-    Coders.language
-      (Coders.languageName_ $ string "hydra.wasm")
-      (Coders.languageConstraints_
-        (var "eliminationVariants")
-        (var "literalVariants")
-        (var "floatTypes")
-        (var "functionVariants")
-        (var "integerTypes")
-        (var "termVariants")
-        (var "typeVariants")
-        (var "typePredicate"))
-
-wasmReservedWords :: TTermDefinition (S.Set String)
-wasmReservedWords = define "wasmReservedWords" $
-  doc "A set of reserved words in WebAssembly text format" $
-  lets [
-    "keywords">:
-      doc "WAT keywords (section and instruction keywords)" $
-      list $ string <$> [
-        "module", "type", "func", "param", "result", "local", "global",
-        "table", "memory", "elem", "data", "start", "import", "export",
-        "block", "loop", "if", "then", "else", "end", "br", "br_if",
-        "br_table", "return", "call", "call_indirect", "drop", "select",
-        "unreachable", "nop", "mut", "offset", "align"],
-    "valueTypes">:
-      doc "WAT value type keywords" $
-      list $ string <$> [
-        "i32", "i64", "f32", "f64", "v128", "funcref", "externref"],
-    "instructionPrefixes">:
-      doc "Common WAT instruction prefixes" $
-      list $ string <$> [
-        "i32", "i64", "f32", "f64",
-        "local.get", "local.set", "local.tee",
-        "global.get", "global.set",
-        "memory.size", "memory.grow"]] $
-    Sets.fromList $ Lists.concat $ list [
-      var "keywords",
-      var "valueTypes",
-      var "instructionPrefixes"]
diff --git a/src/main/haskell/Hydra/Sources/Wasm/Manifest.hs b/src/main/haskell/Hydra/Sources/Wasm/Manifest.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Wasm/Manifest.hs
+++ /dev/null
@@ -1,23 +0,0 @@
--- | Package manifest for hydra-wasm: DSL sources for the WebAssembly (WAT) coder.
-
-module Hydra.Sources.Wasm.Manifest (
-  mainModules,
-  testModules,
-) where
-
-import Hydra.Kernel
-
-import qualified Hydra.Sources.Wasm.Coder     as WasmCoder
-import qualified Hydra.Sources.Wasm.Language  as WasmLanguage
-import qualified Hydra.Sources.Wasm.Serde     as WasmSerde
-import qualified Hydra.Sources.Wasm.Syntax    as WasmSyntax
-
-mainModules :: [Module]
-mainModules = [
-  WasmCoder.module_,
-  WasmLanguage.module_,
-  WasmSerde.module_,
-  WasmSyntax.module_]
-
-testModules :: [Module]
-testModules = []
diff --git a/src/main/haskell/Hydra/Sources/Wasm/Serde.hs b/src/main/haskell/Hydra/Sources/Wasm/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Wasm/Serde.hs
+++ /dev/null
@@ -1,661 +0,0 @@
--- | WebAssembly serializer: converts WAT AST to concrete WAT text format.
--- Serializes the WASM syntax model (Hydra.Wasm.Syntax) into properly formatted WAT source code.
-
-module Hydra.Sources.Wasm.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Annotations                     as Annotations
-import qualified Hydra.Dsl.Bootstrap                       as Bootstrap
-import qualified Hydra.Dsl.LiteralTypes                    as LiteralTypes
-import qualified Hydra.Dsl.Literals                        as Literals
-import qualified Hydra.Dsl.Paths                      as Paths
-import qualified Hydra.Dsl.Ast                        as Ast
-import qualified Hydra.Dsl.Meta.Base                       as MetaBase
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Graph                      as Graph
-import qualified Hydra.Dsl.Json.Model                       as Json
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Math                   as Math
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Packaging                     as Packaging
-import qualified Hydra.Dsl.Meta.Terms                      as MetaTerms
-import qualified Hydra.Dsl.Meta.Testing                    as Testing
-import qualified Hydra.Dsl.Topology                   as Topology
-import qualified Hydra.Dsl.Meta.Types                      as MetaTypes
-import qualified Hydra.Dsl.Typing                     as Typing
-import qualified Hydra.Dsl.Util                       as Util
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Prims                           as Prims
-import qualified Hydra.Dsl.Meta.Tabular                         as Tabular
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Tests                           as Tests
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Decode.Core                 as DecodeCore
-import qualified Hydra.Sources.Encode.Core                 as EncodeCore
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.All            as KernelTerms
-import qualified Hydra.Sources.Kernel.Terms.Annotations    as Annotations
-import qualified Hydra.Sources.Kernel.Terms.Arity          as Arity
-import qualified Hydra.Sources.Kernel.Terms.Checking       as Checking
-import qualified Hydra.Sources.Kernel.Terms.Constants      as Constants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Extract.Util   as ExtractUtil
-import qualified Hydra.Sources.Kernel.Terms.Formatting     as Formatting
-import qualified Hydra.Sources.Kernel.Terms.Inference      as Inference
-import qualified Hydra.Sources.Kernel.Terms.Languages      as Languages
-import qualified Hydra.Sources.Kernel.Terms.Lexical        as Lexical
-import qualified Hydra.Sources.Kernel.Terms.Literals       as Literals
-import qualified Hydra.Sources.Kernel.Terms.Names          as Names
-import qualified Hydra.Sources.Kernel.Terms.Reduction      as Reduction
-import qualified Hydra.Sources.Kernel.Terms.Reflect        as Reflect
-import qualified Hydra.Sources.Kernel.Terms.Serialization  as Serialization
-import qualified Hydra.Sources.Kernel.Terms.Show.Paths as ShowPaths
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Terms.Show.Graph     as ShowGraph
-import qualified Hydra.Sources.Kernel.Terms.Show.Variants  as ShowVariants
-import qualified Hydra.Sources.Kernel.Terms.Show.Typing    as ShowTyping
-import qualified Hydra.Sources.Kernel.Terms.Sorting        as Sorting
-import qualified Hydra.Sources.Kernel.Terms.Substitution   as Substitution
-import qualified Hydra.Sources.Kernel.Terms.Templates      as Templates
-import qualified Hydra.Sources.Kernel.Terms.Unification    as Unification
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.Int                                  as I
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-import qualified Data.Maybe                                as Y
-
--- Additional imports
-import Hydra.Ast
-import qualified Hydra.Wasm.Syntax as W
-import qualified Hydra.Sources.Wasm.Syntax as WasmSyntax
-
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-ns :: Namespace
-ns = Namespace "hydra.wasm.serde"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Constants.ns, Serialization.ns],
-            moduleTypeDependencies = (WasmSyntax.ns:KernelTypes.kernelTypesNamespaces),
-            moduleDescription = Just "WebAssembly serializer: converts WAT AST to concrete WAT text format"}
-  where
-    definitions = [
-      -- Top-level serialization
-      toDefinition moduleToExpr,
-      toDefinition moduleFieldToExpr,
-      -- Types
-      toDefinition valTypeToStr,
-      toDefinition funcTypeToExpr,
-      toDefinition typeUseToExpr,
-      toDefinition typeDefToExpr,
-      toDefinition paramToExpr,
-      -- Functions
-      toDefinition funcToExpr,
-      toDefinition funcLocalToExpr,
-      -- Instructions
-      toDefinition instructionToExpr,
-      toDefinition blockInstructionToExpr,
-      toDefinition blockTypeToExpr,
-      toDefinition ifInstructionToExpr,
-      -- Memory
-      toDefinition memoryDefToExpr,
-      toDefinition dataSegmentToExpr,
-      toDefinition limitsToExpr,
-      -- Globals
-      toDefinition globalDefToExpr,
-      toDefinition globalTypeToExpr,
-      -- Tables
-      toDefinition tableDefToExpr,
-      -- Imports and exports
-      toDefinition importDefToExpr,
-      toDefinition importDescToExpr,
-      toDefinition exportDefToExpr,
-      toDefinition exportDescToExpr,
-      -- Constants
-      toDefinition constValueToExpr,
-      -- Helpers
-      toDefinition refTypeToStr,
-      toDefinition toWatComment]
-
-
--- =============================================================================
--- Top-level serialization
--- =============================================================================
-
-moduleToExpr :: TTermDefinition (W.Module -> Expr)
-moduleToExpr = define "moduleToExpr" $
-  doc "Serialize a WebAssembly module to a WAT expression" $
-  lambda "mod" $ lets [
-    "name">: project W._Module W._Module_name @@ var "mod",
-    "fields">: project W._Module W._Module_fields @@ var "mod",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name"),
-    "fieldExprs">: Lists.map moduleFieldToExpr (var "fields")] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      list [Serialization.cst @@ Strings.cat2 (string "(module") (var "nameStr")],
-      Lists.map (lambda "fe" $ Serialization.cst @@ Strings.cat2 (string "  ") (Serialization.printExpr @@ var "fe")) (var "fieldExprs"),
-      list [Serialization.cst @@ string ")"]])
-
-moduleFieldToExpr :: TTermDefinition (W.ModuleField -> Expr)
-moduleFieldToExpr = define "moduleFieldToExpr" $
-  doc "Serialize a module field to a WAT expression" $
-  lambda "field" $
-    cases W._ModuleField (var "field") Nothing [
-      W._ModuleField_type>>: lambda "t" $ typeDefToExpr @@ var "t",
-      W._ModuleField_func>>: lambda "f" $ funcToExpr @@ var "f",
-      W._ModuleField_memory>>: lambda "m" $ memoryDefToExpr @@ var "m",
-      W._ModuleField_table>>: lambda "t" $ tableDefToExpr @@ var "t",
-      W._ModuleField_global>>: lambda "g" $ globalDefToExpr @@ var "g",
-      W._ModuleField_import>>: lambda "i" $ importDefToExpr @@ var "i",
-      W._ModuleField_export>>: lambda "e" $ exportDefToExpr @@ var "e",
-      W._ModuleField_data>>: lambda "d" $ dataSegmentToExpr @@ var "d",
-      W._ModuleField_elem>>: lambda "_" $ Serialization.cst @@ string ";; elem segment (not yet supported)",
-      W._ModuleField_start>>: lambda "s" $
-        Serialization.cst @@ Strings.cat (list [string "(start $", var "s", string ")"])]
-
-
--- =============================================================================
--- Types
--- =============================================================================
-
-valTypeToStr :: TTermDefinition (W.ValType -> String)
-valTypeToStr = define "valTypeToStr" $
-  doc "Convert a value type to its WAT string representation" $
-  lambda "vt" $
-    cases W._ValType (var "vt") Nothing [
-      W._ValType_i32>>: constant $ string "i32",
-      W._ValType_i64>>: constant $ string "i64",
-      W._ValType_f32>>: constant $ string "f32",
-      W._ValType_f64>>: constant $ string "f64",
-      W._ValType_funcref>>: constant $ string "funcref",
-      W._ValType_externref>>: constant $ string "externref"]
-
-funcTypeToExpr :: TTermDefinition (W.FuncType -> Expr)
-funcTypeToExpr = define "funcTypeToExpr" $
-  doc "Serialize a function type to WAT" $
-  lambda "ft" $ lets [
-    "params">: project W._FuncType W._FuncType_params @@ var "ft",
-    "results">: project W._FuncType W._FuncType_results @@ var "ft",
-    "paramParts">: Lists.map
-      (lambda "p" $ Serialization.cst @@ Strings.cat (list [string "(param ", valTypeToStr @@ var "p", string ")"]))
-      (var "params"),
-    "resultParts">: Lists.map
-      (lambda "r" $ Serialization.cst @@ Strings.cat (list [string "(result ", valTypeToStr @@ var "r", string ")"]))
-      (var "results")] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just (Serialization.cst @@ string "(func"),
-      Logic.ifElse (Lists.null (var "paramParts")) nothing (just (Serialization.spaceSep @@ var "paramParts")),
-      Logic.ifElse (Lists.null (var "resultParts")) nothing (just (Serialization.spaceSep @@ var "resultParts")),
-      just (Serialization.cst @@ string ")")])
-
-typeUseToExpr :: TTermDefinition (W.TypeUse -> Expr)
-typeUseToExpr = define "typeUseToExpr" $
-  doc "Serialize a type use clause to WAT" $
-  lambda "tu" $ lets [
-    "idx">: project W._TypeUse W._TypeUse_index @@ var "tu",
-    "params">: project W._TypeUse W._TypeUse_params @@ var "tu",
-    "results">: project W._TypeUse W._TypeUse_results @@ var "tu",
-    "idxPart">: Maybes.map
-      (lambda "i" $ Serialization.cst @@ Strings.cat (list [string "(type $", var "i", string ")"]))
-      (var "idx"),
-    "paramParts">: Lists.map (paramToExpr) (var "params"),
-    "resultParts">: Lists.map
-      (lambda "r" $ Serialization.cst @@ Strings.cat (list [string "(result ", valTypeToStr @@ var "r", string ")"]))
-      (var "results")] $
-    Serialization.spaceSep @@ Maybes.cat (Lists.concat (list [
-      list [var "idxPart"],
-      Lists.map (lambda "p" $ just (var "p")) (var "paramParts"),
-      Lists.map (lambda "r" $ just (var "r")) (var "resultParts")]))
-
-typeDefToExpr :: TTermDefinition (W.TypeDef -> Expr)
-typeDefToExpr = define "typeDefToExpr" $
-  doc "Serialize a type definition to WAT" $
-  lambda "td" $ lets [
-    "name">: project W._TypeDef W._TypeDef_name @@ var "td",
-    "ft">: project W._TypeDef W._TypeDef_type @@ var "td",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ Strings.cat2 (string "(type") (var "nameStr"),
-      funcTypeToExpr @@ var "ft",
-      Serialization.cst @@ string ")"]
-
-paramToExpr :: TTermDefinition (W.Param -> Expr)
-paramToExpr = define "paramToExpr" $
-  doc "Serialize a function parameter to WAT" $
-  lambda "p" $ lets [
-    "name">: project W._Param W._Param_name @@ var "p",
-    "typ">: project W._Param W._Param_type @@ var "p",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    Serialization.cst @@ Strings.cat (list [string "(param", var "nameStr", string " ", valTypeToStr @@ var "typ", string ")"])
-
-
--- =============================================================================
--- Functions
--- =============================================================================
-
-funcToExpr :: TTermDefinition (W.Func -> Expr)
-funcToExpr = define "funcToExpr" $
-  doc "Serialize a function definition to WAT" $
-  lambda "f" $ lets [
-    "name">: project W._Func W._Func_name @@ var "f",
-    "typeUse">: project W._Func W._Func_typeUse @@ var "f",
-    "locals">: project W._Func W._Func_locals @@ var "f",
-    "body">: project W._Func W._Func_body @@ var "f",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name"),
-    "headerStr">: Strings.cat2 (string "(func") (var "nameStr"),
-    "typeUsePart">: typeUseToExpr @@ var "typeUse",
-    "localParts">: Lists.map funcLocalToExpr (var "locals"),
-    "bodyParts">: Lists.map instructionToExpr (var "body"),
-    "innerParts">: Lists.concat2 (var "localParts") (var "bodyParts")] $
-    Logic.ifElse (Lists.null (var "innerParts"))
-      (Serialization.spaceSep @@ list [
-        Serialization.cst @@ var "headerStr",
-        var "typeUsePart",
-        Serialization.cst @@ string ")"])
-      (Serialization.newlineSep @@ Lists.concat (list [
-        list [Serialization.spaceSep @@ list [Serialization.cst @@ var "headerStr", var "typeUsePart"]],
-        Lists.map (lambda "p" $ Serialization.cst @@ Strings.cat2 (string "  ") (Serialization.printExpr @@ var "p")) (var "innerParts"),
-        list [Serialization.cst @@ string ")"]]))
-
-funcLocalToExpr :: TTermDefinition (W.FuncLocal -> Expr)
-funcLocalToExpr = define "funcLocalToExpr" $
-  doc "Serialize a local variable declaration to WAT" $
-  lambda "l" $ lets [
-    "name">: project W._FuncLocal W._FuncLocal_name @@ var "l",
-    "typ">: project W._FuncLocal W._FuncLocal_type @@ var "l",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    Serialization.cst @@ Strings.cat (list [
-      string "(local", var "nameStr", string " ", valTypeToStr @@ var "typ", string ")"])
-
-
--- =============================================================================
--- Instructions
--- =============================================================================
-
-instructionToExpr :: TTermDefinition (W.Instruction -> Expr)
-instructionToExpr = define "instructionToExpr" $
-  doc "Serialize an instruction to WAT" $
-  lambda "instr" $
-    cases W._Instruction (var "instr") Nothing [
-      W._Instruction_const>>: lambda "c" $ constValueToExpr @@ var "c",
-      W._Instruction_localGet>>: lambda "v" $
-        Serialization.cst @@ Strings.cat (list [string "local.get $", var "v"]),
-      W._Instruction_localSet>>: lambda "v" $
-        Serialization.cst @@ Strings.cat (list [string "local.set $", var "v"]),
-      W._Instruction_localTee>>: lambda "v" $
-        Serialization.cst @@ Strings.cat (list [string "local.tee $", var "v"]),
-      W._Instruction_globalGet>>: lambda "v" $
-        Serialization.cst @@ Strings.cat (list [string "global.get $", var "v"]),
-      W._Instruction_globalSet>>: lambda "v" $
-        Serialization.cst @@ Strings.cat (list [string "global.set $", var "v"]),
-      W._Instruction_load>>: lambda "ld" $ lets [
-        "vt">: project W._MemoryInstruction W._MemoryInstruction_type @@ var "ld",
-        "ma">: project W._MemoryInstruction W._MemoryInstruction_memArg @@ var "ld",
-        "off">: project W._MemArg W._MemArg_offset @@ var "ma",
-        "offStr">: Logic.ifElse (Equality.equal (var "off") (int32 0))
-          (string "")
-          (Strings.cat2 (string " offset=") (Literals.showInt32 (var "off")))] $
-        Serialization.cst @@ Strings.cat (list [
-          valTypeToStr @@ var "vt", string ".load", var "offStr"]),
-      W._Instruction_store>>: lambda "st" $ lets [
-        "vt">: project W._MemoryInstruction W._MemoryInstruction_type @@ var "st",
-        "ma">: project W._MemoryInstruction W._MemoryInstruction_memArg @@ var "st",
-        "off">: project W._MemArg W._MemArg_offset @@ var "ma",
-        "offStr">: Logic.ifElse (Equality.equal (var "off") (int32 0))
-          (string "")
-          (Strings.cat2 (string " offset=") (Literals.showInt32 (var "off")))] $
-        Serialization.cst @@ Strings.cat (list [
-          valTypeToStr @@ var "vt", string ".store", var "offStr"]),
-      W._Instruction_unop>>: lambda "op" $ lets [
-        "vt">: project W._NumericOp W._NumericOp_type @@ var "op",
-        "nm">: project W._NumericOp W._NumericOp_name @@ var "op"] $
-        Serialization.cst @@ Strings.cat (list [
-          valTypeToStr @@ var "vt", string ".", var "nm"]),
-      W._Instruction_binop>>: lambda "op" $ lets [
-        "vt">: project W._NumericOp W._NumericOp_type @@ var "op",
-        "nm">: project W._NumericOp W._NumericOp_name @@ var "op"] $
-        Serialization.cst @@ Strings.cat (list [
-          valTypeToStr @@ var "vt", string ".", var "nm"]),
-      W._Instruction_testop>>: lambda "op" $ lets [
-        "vt">: project W._NumericOp W._NumericOp_type @@ var "op",
-        "nm">: project W._NumericOp W._NumericOp_name @@ var "op"] $
-        Serialization.cst @@ Strings.cat (list [
-          valTypeToStr @@ var "vt", string ".", var "nm"]),
-      W._Instruction_relop>>: lambda "op" $ lets [
-        "vt">: project W._NumericOp W._NumericOp_type @@ var "op",
-        "nm">: project W._NumericOp W._NumericOp_name @@ var "op"] $
-        Serialization.cst @@ Strings.cat (list [
-          valTypeToStr @@ var "vt", string ".", var "nm"]),
-      W._Instruction_convert>>: lambda "c" $
-        Serialization.cst @@ var "c",
-      W._Instruction_call>>: lambda "f" $
-        Serialization.cst @@ Strings.cat (list [string "call $", var "f"]),
-      W._Instruction_callIndirect>>: lambda "tu" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ string "call_indirect",
-          typeUseToExpr @@ var "tu"],
-      W._Instruction_block>>: lambda "b" $
-        blockInstructionToExpr @@ string "block" @@ var "b",
-      W._Instruction_loop>>: lambda "b" $
-        blockInstructionToExpr @@ string "loop" @@ var "b",
-      W._Instruction_if>>: lambda "i" $
-        ifInstructionToExpr @@ var "i",
-      W._Instruction_br>>: lambda "l" $
-        Serialization.cst @@ Strings.cat (list [string "br $", var "l"]),
-      W._Instruction_brIf>>: lambda "l" $
-        Serialization.cst @@ Strings.cat (list [string "br_if $", var "l"]),
-      W._Instruction_brTable>>: lambda "bt" $ lets [
-        "labels">: project W._BrTableArgs W._BrTableArgs_labels @@ var "bt",
-        "def">: project W._BrTableArgs W._BrTableArgs_default @@ var "bt"] $
-        Serialization.cst @@ Strings.cat (list [
-          string "br_table ",
-          Strings.intercalate (string " ") (Lists.map (lambda "l" $ Strings.cat2 (string "$") (var "l")) (var "labels")),
-          string " $", var "def"]),
-      W._Instruction_return>>: constant $ Serialization.cst @@ string "return",
-      W._Instruction_drop>>: constant $ Serialization.cst @@ string "drop",
-      W._Instruction_select>>: constant $ Serialization.cst @@ string "select",
-      W._Instruction_unreachable>>: constant $ Serialization.cst @@ string "unreachable",
-      W._Instruction_nop>>: constant $ Serialization.cst @@ string "nop",
-      W._Instruction_memorySize>>: constant $ Serialization.cst @@ string "memory.size",
-      W._Instruction_memoryGrow>>: constant $ Serialization.cst @@ string "memory.grow",
-      W._Instruction_refNull>>: lambda "rt" $
-        Serialization.cst @@ Strings.cat (list [string "ref.null ", refTypeToStr @@ var "rt"]),
-      W._Instruction_refIsNull>>: constant $ Serialization.cst @@ string "ref.is_null",
-      W._Instruction_raw>>: lambda "s" $
-        Serialization.cst @@ var "s"]
-
-blockInstructionToExpr :: TTermDefinition (String -> W.BlockInstruction -> Expr)
-blockInstructionToExpr = define "blockInstructionToExpr" $
-  doc "Serialize a block or loop instruction to WAT" $
-  lambda "keyword" $ lambda "b" $ lets [
-    "label">: project W._BlockInstruction W._BlockInstruction_label @@ var "b",
-    "bt">: project W._BlockInstruction W._BlockInstruction_blockType @@ var "b",
-    "body">: project W._BlockInstruction W._BlockInstruction_body @@ var "b",
-    "labelStr">: Maybes.maybe (string "") (lambda "l" $ Strings.cat2 (string " $") (var "l")) (var "label"),
-    "btPart">: blockTypeToExpr @@ var "bt",
-    "bodyParts">: Lists.map instructionToExpr (var "body"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      just (Serialization.cst @@ Strings.cat (list [string "(", var "keyword", var "labelStr"])),
-      var "btPart"])] $
-    Serialization.newlineSep @@ Lists.concat (list [
-      list [var "header"],
-      Lists.map (lambda "p" $ Serialization.cst @@ Strings.cat2 (string "  ") (Serialization.printExpr @@ var "p")) (var "bodyParts"),
-      list [Serialization.cst @@ string ")"]])
-
-blockTypeToExpr :: TTermDefinition (W.BlockType -> Maybe Expr)
-blockTypeToExpr = define "blockTypeToExpr" $
-  doc "Serialize a block type to WAT" $
-  lambda "bt" $
-    cases W._BlockType (var "bt") Nothing [
-      W._BlockType_empty>>: constant nothing,
-      W._BlockType_value>>: lambda "vt" $
-        just (Serialization.cst @@ Strings.cat (list [string "(result ", valTypeToStr @@ var "vt", string ")"])),
-      W._BlockType_typeUse>>: lambda "tu" $
-        just (typeUseToExpr @@ var "tu")]
-
-ifInstructionToExpr :: TTermDefinition (W.IfInstruction -> Expr)
-ifInstructionToExpr = define "ifInstructionToExpr" $
-  doc "Serialize an if instruction to WAT" $
-  lambda "i" $ lets [
-    "label">: project W._IfInstruction W._IfInstruction_label @@ var "i",
-    "bt">: project W._IfInstruction W._IfInstruction_blockType @@ var "i",
-    "thenBranch">: project W._IfInstruction W._IfInstruction_then @@ var "i",
-    "elseBranch">: project W._IfInstruction W._IfInstruction_else @@ var "i",
-    "labelStr">: Maybes.maybe (string "") (lambda "l" $ Strings.cat2 (string " $") (var "l")) (var "label"),
-    "btPart">: blockTypeToExpr @@ var "bt",
-    "thenParts">: Lists.map instructionToExpr (var "thenBranch"),
-    "elseParts">: Lists.map instructionToExpr (var "elseBranch"),
-    "header">: Serialization.spaceSep @@ Maybes.cat (list [
-      just (Serialization.cst @@ Strings.cat (list [string "(if", var "labelStr"])),
-      var "btPart"]),
-    "thenBlock">: Serialization.newlineSep @@ Lists.concat (list [
-      list [Serialization.cst @@ string "(then"],
-      Lists.map (lambda "p" $ Serialization.cst @@ Strings.cat2 (string "  ") (Serialization.printExpr @@ var "p")) (var "thenParts"),
-      list [Serialization.cst @@ string ")"]]),
-    "elseBlock">: Serialization.newlineSep @@ Lists.concat (list [
-      list [Serialization.cst @@ string "(else"],
-      Lists.map (lambda "p" $ Serialization.cst @@ Strings.cat2 (string "  ") (Serialization.printExpr @@ var "p")) (var "elseParts"),
-      list [Serialization.cst @@ string ")"]])] $
-    Logic.ifElse (Lists.null (var "elseParts"))
-      (Serialization.newlineSep @@ list [var "header", var "thenBlock", Serialization.cst @@ string ")"])
-      (Serialization.newlineSep @@ list [var "header", var "thenBlock", var "elseBlock", Serialization.cst @@ string ")"])
-
-
--- =============================================================================
--- Memory
--- =============================================================================
-
-memoryDefToExpr :: TTermDefinition (W.MemoryDef -> Expr)
-memoryDefToExpr = define "memoryDefToExpr" $
-  doc "Serialize a memory definition to WAT" $
-  lambda "m" $ lets [
-    "name">: project W._MemoryDef W._MemoryDef_name @@ var "m",
-    "lim">: project W._MemoryDef W._MemoryDef_limits @@ var "m",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ Strings.cat2 (string "(memory") (var "nameStr"),
-      limitsToExpr @@ var "lim",
-      Serialization.cst @@ string ")"]
-
-dataSegmentToExpr :: TTermDefinition (W.DataSegment -> Expr)
-dataSegmentToExpr = define "dataSegmentToExpr" $
-  doc "Serialize a data segment to WAT" $
-  lambda "d" $ lets [
-    "name">: project W._DataSegment W._DataSegment_name @@ var "d",
-    "mode">: project W._DataSegment W._DataSegment_mode @@ var "d",
-    "bytes">: project W._DataSegment W._DataSegment_bytes @@ var "d",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    cases W._DataMode (var "mode") Nothing [
-      W._DataMode_active>>: lambda "offset" $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ Strings.cat2 (string "(data") (var "nameStr"),
-          Serialization.spaceSep @@ list [
-            Serialization.cst @@ string "(offset",
-            Serialization.spaceSep @@ Lists.map instructionToExpr (var "offset"),
-            Serialization.cst @@ string ")"],
-          Serialization.cst @@ Strings.cat (list [string "\"", var "bytes", string "\")"]) ],
-      W._DataMode_passive>>: constant $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ Strings.cat2 (string "(data") (var "nameStr"),
-          Serialization.cst @@ Strings.cat (list [string "\"", var "bytes", string "\")"])]]
-
-limitsToExpr :: TTermDefinition (W.Limits -> Expr)
-limitsToExpr = define "limitsToExpr" $
-  doc "Serialize limits to WAT" $
-  lambda "l" $ lets [
-    "mn">: project W._Limits W._Limits_min @@ var "l",
-    "mx">: project W._Limits W._Limits_max @@ var "l"] $
-    Serialization.spaceSep @@ Maybes.cat (list [
-      just (Serialization.cst @@ Literals.showInt32 (var "mn")),
-      Maybes.map (lambda "m" $ Serialization.cst @@ Literals.showInt32 (var "m")) (var "mx")])
-
-
--- =============================================================================
--- Globals
--- =============================================================================
-
-globalDefToExpr :: TTermDefinition (W.GlobalDef -> Expr)
-globalDefToExpr = define "globalDefToExpr" $
-  doc "Serialize a global definition to WAT" $
-  lambda "g" $ lets [
-    "name">: project W._GlobalDef W._GlobalDef_name @@ var "g",
-    "gt">: project W._GlobalDef W._GlobalDef_type @@ var "g",
-    "init">: project W._GlobalDef W._GlobalDef_init @@ var "g",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ Strings.cat2 (string "(global") (var "nameStr"),
-      globalTypeToExpr @@ var "gt",
-      Serialization.spaceSep @@ Lists.map instructionToExpr (var "init"),
-      Serialization.cst @@ string ")"]
-
-globalTypeToExpr :: TTermDefinition (W.GlobalType -> Expr)
-globalTypeToExpr = define "globalTypeToExpr" $
-  doc "Serialize a global type to WAT" $
-  lambda "gt" $ lets [
-    "vt">: project W._GlobalType W._GlobalType_valType @@ var "gt",
-    "mut">: project W._GlobalType W._GlobalType_mutable @@ var "gt"] $
-    Logic.ifElse (var "mut")
-      (Serialization.cst @@ Strings.cat (list [string "(mut ", valTypeToStr @@ var "vt", string ")"]))
-      (Serialization.cst @@ (valTypeToStr @@ var "vt"))
-
-
--- =============================================================================
--- Tables
--- =============================================================================
-
-tableDefToExpr :: TTermDefinition (W.TableDef -> Expr)
-tableDefToExpr = define "tableDefToExpr" $
-  doc "Serialize a table definition to WAT" $
-  lambda "t" $ lets [
-    "name">: project W._TableDef W._TableDef_name @@ var "t",
-    "rt">: project W._TableDef W._TableDef_refType @@ var "t",
-    "lim">: project W._TableDef W._TableDef_limits @@ var "t",
-    "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ Strings.cat2 (string "(table") (var "nameStr"),
-      limitsToExpr @@ var "lim",
-      Serialization.cst @@ (refTypeToStr @@ var "rt"),
-      Serialization.cst @@ string ")"]
-
-
--- =============================================================================
--- Imports and exports
--- =============================================================================
-
-importDefToExpr :: TTermDefinition (W.ImportDef -> Expr)
-importDefToExpr = define "importDefToExpr" $
-  doc "Serialize an import declaration to WAT" $
-  lambda "i" $ lets [
-    "modName">: project W._ImportDef W._ImportDef_module @@ var "i",
-    "name">: project W._ImportDef W._ImportDef_name @@ var "i",
-    "desc">: project W._ImportDef W._ImportDef_desc @@ var "i"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "(import",
-      Serialization.cst @@ Strings.cat (list [string "\"", var "modName", string "\""]),
-      Serialization.cst @@ Strings.cat (list [string "\"", var "name", string "\""]),
-      importDescToExpr @@ var "desc",
-      Serialization.cst @@ string ")"]
-
-importDescToExpr :: TTermDefinition (W.ImportDesc -> Expr)
-importDescToExpr = define "importDescToExpr" $
-  doc "Serialize an import descriptor to WAT" $
-  lambda "desc" $
-    cases W._ImportDesc (var "desc") Nothing [
-      W._ImportDesc_func>>: lambda "f" $ lets [
-        "name">: project W._ImportFunc W._ImportFunc_name @@ var "f",
-        "tu">: project W._ImportFunc W._ImportFunc_typeUse @@ var "f",
-        "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ Strings.cat2 (string "(func") (var "nameStr"),
-          typeUseToExpr @@ var "tu",
-          Serialization.cst @@ string ")"],
-      W._ImportDesc_memory>>: lambda "m" $ lets [
-        "name">: project W._ImportMemory W._ImportMemory_name @@ var "m",
-        "lim">: project W._ImportMemory W._ImportMemory_limits @@ var "m",
-        "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ Strings.cat2 (string "(memory") (var "nameStr"),
-          limitsToExpr @@ var "lim",
-          Serialization.cst @@ string ")"],
-      W._ImportDesc_table>>: lambda "t" $ lets [
-        "name">: project W._ImportTable W._ImportTable_name @@ var "t",
-        "rt">: project W._ImportTable W._ImportTable_refType @@ var "t",
-        "lim">: project W._ImportTable W._ImportTable_limits @@ var "t",
-        "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ Strings.cat2 (string "(table") (var "nameStr"),
-          limitsToExpr @@ var "lim",
-          Serialization.cst @@ (refTypeToStr @@ var "rt"),
-          Serialization.cst @@ string ")"],
-      W._ImportDesc_global>>: lambda "g" $ lets [
-        "name">: project W._ImportGlobal W._ImportGlobal_name @@ var "g",
-        "gt">: project W._ImportGlobal W._ImportGlobal_type @@ var "g",
-        "nameStr">: Maybes.maybe (string "") (lambda "n" $ Strings.cat2 (string " $") (var "n")) (var "name")] $
-        Serialization.spaceSep @@ list [
-          Serialization.cst @@ Strings.cat2 (string "(global") (var "nameStr"),
-          globalTypeToExpr @@ var "gt",
-          Serialization.cst @@ string ")"]]
-
-exportDefToExpr :: TTermDefinition (W.ExportDef -> Expr)
-exportDefToExpr = define "exportDefToExpr" $
-  doc "Serialize an export declaration to WAT" $
-  lambda "e" $ lets [
-    "name">: project W._ExportDef W._ExportDef_name @@ var "e",
-    "desc">: project W._ExportDef W._ExportDef_desc @@ var "e"] $
-    Serialization.spaceSep @@ list [
-      Serialization.cst @@ string "(export",
-      Serialization.cst @@ Strings.cat (list [string "\"", var "name", string "\""]),
-      exportDescToExpr @@ var "desc",
-      Serialization.cst @@ string ")"]
-
-exportDescToExpr :: TTermDefinition (W.ExportDesc -> Expr)
-exportDescToExpr = define "exportDescToExpr" $
-  doc "Serialize an export descriptor to WAT" $
-  lambda "desc" $
-    cases W._ExportDesc (var "desc") Nothing [
-      W._ExportDesc_func>>: lambda "f" $
-        Serialization.cst @@ Strings.cat (list [string "(func $", var "f", string ")"]),
-      W._ExportDesc_memory>>: lambda "m" $
-        Serialization.cst @@ Strings.cat (list [string "(memory $", var "m", string ")"]),
-      W._ExportDesc_table>>: lambda "t" $
-        Serialization.cst @@ Strings.cat (list [string "(table $", var "t", string ")"]),
-      W._ExportDesc_global>>: lambda "g" $
-        Serialization.cst @@ Strings.cat (list [string "(global $", var "g", string ")"])]
-
-
--- =============================================================================
--- Constants
--- =============================================================================
-
-constValueToExpr :: TTermDefinition (W.ConstValue -> Expr)
-constValueToExpr = define "constValueToExpr" $
-  doc "Serialize a constant value instruction to WAT" $
-  lambda "c" $
-    cases W._ConstValue (var "c") Nothing [
-      W._ConstValue_i32>>: lambda "v" $
-        Serialization.cst @@ Strings.cat2 (string "i32.const ") (Literals.showInt32 (var "v")),
-      W._ConstValue_i64>>: lambda "v" $
-        Serialization.cst @@ Strings.cat2 (string "i64.const ") (Literals.showInt64 (var "v")),
-      W._ConstValue_f32>>: lambda "v" $
-        Serialization.cst @@ Strings.cat2 (string "f32.const ") (Literals.showFloat32 (var "v")),
-      W._ConstValue_f64>>: lambda "v" $
-        Serialization.cst @@ Strings.cat2 (string "f64.const ") (Literals.showFloat64 (var "v"))]
-
-
--- =============================================================================
--- Helpers
--- =============================================================================
-
-refTypeToStr :: TTermDefinition (W.RefType -> String)
-refTypeToStr = define "refTypeToStr" $
-  doc "Convert a reference type to its WAT string" $
-  lambda "rt" $
-    cases W._RefType (var "rt") Nothing [
-      W._RefType_funcref>>: constant $ string "funcref",
-      W._RefType_externref>>: constant $ string "externref"]
-
-toWatComment :: TTermDefinition (String -> String)
-toWatComment = define "toWatComment" $
-  doc "Convert a string to a WAT comment" $
-  lambda "s" $
-    Strings.cat (list [string ";; ", var "s"])
diff --git a/src/main/haskell/Hydra/Sources/Wasm/Syntax.hs b/src/main/haskell/Hydra/Sources/Wasm/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Wasm/Syntax.hs
+++ /dev/null
@@ -1,754 +0,0 @@
--- | A WebAssembly text format (WAT) syntax model.
--- | See https://webassembly.github.io/spec/core/ (retrieved 2026-04-06)
-
-module Hydra.Sources.Wasm.Syntax where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.wasm.syntax"
-
-define :: String -> Type -> Binding
-define = datatype ns
-
-wasm :: String -> Type
-wasm = typeref ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A WebAssembly text format (WAT) syntax model, based on the WebAssembly spec"
-      ++ " (https://webassembly.github.io/spec/core/), retrieved 2026-04-06")}
-  where
-    definitions = moduleLevel ++ types ++ functions ++ instructions ++ memory
-      ++ globals ++ tables ++ imports ++ exports ++ literals
-
-    -- Module-level constructs
-    moduleLevel = [
-      wasmModule,
-      moduleField]
-
-    -- Type system
-    types = [
-      valType,
-      funcType,
-      funcTypeRef,
-      typeUse,
-      typeDef]
-
-    -- Function definitions
-    functions = [
-      func,
-      funcLocal,
-      param]
-
-    -- Instructions
-    instructions = [
-      brTableArgs,
-      instruction,
-      blockInstruction,
-      blockType,
-      memArg,
-      memoryInstruction,
-      ifInstruction,
-      numericOp]
-
-    -- Memory
-    memory = [
-      memoryDef,
-      dataSegment,
-      dataMode,
-      limits]
-
-    -- Globals
-    globals = [
-      globalDef,
-      globalType]
-
-    -- Tables
-    tables = [
-      tableDef,
-      elemActive,
-      elemSegment,
-      elemMode,
-      refType]
-
-    -- Imports and exports
-    imports = [
-      importDef,
-      importDesc,
-      importFunc,
-      importGlobal,
-      importMemory,
-      importTable]
-
-    exports = [
-      exportDef,
-      exportDesc]
-
-    -- Literal values
-    literals = [
-      constValue]
-
-
--- ================================================================================================
--- Module-level constructs
--- ================================================================================================
-
-wasmModule :: Binding
-wasmModule = define "Module" $
-  doc "A WebAssembly module, the top-level container" $
-  T.record [
-    "name">:
-      doc "Optional module name" $
-      T.maybe T.string,
-    "fields">:
-      doc "The module's fields (types, functions, memories, tables, globals, imports, exports, etc.)" $
-      T.list moduleField]
-
-moduleField :: Binding
-moduleField = define "ModuleField" $
-  doc "A field within a WebAssembly module" $
-  T.union [
-    "type">:
-      doc "A type definition" $
-      wasm "TypeDef",
-    "func">:
-      doc "A function definition" $
-      wasm "Func",
-    "memory">:
-      doc "A memory definition" $
-      wasm "MemoryDef",
-    "table">:
-      doc "A table definition" $
-      wasm "TableDef",
-    "global">:
-      doc "A global variable definition" $
-      wasm "GlobalDef",
-    "import">:
-      doc "An import declaration" $
-      wasm "ImportDef",
-    "export">:
-      doc "An export declaration" $
-      wasm "ExportDef",
-    "data">:
-      doc "A data segment" $
-      wasm "DataSegment",
-    "elem">:
-      doc "An element segment" $
-      wasm "ElemSegment",
-    "start">:
-      doc "A start function index" $
-      T.string]
-
-
--- ================================================================================================
--- Type system
--- ================================================================================================
-
-valType :: Binding
-valType = define "ValType" $
-  doc "A WebAssembly value type" $
-  T.union [
-    "i32">:
-      doc "32-bit integer" $
-      T.unit,
-    "i64">:
-      doc "64-bit integer" $
-      T.unit,
-    "f32">:
-      doc "32-bit float" $
-      T.unit,
-    "f64">:
-      doc "64-bit float" $
-      T.unit,
-    "funcref">:
-      doc "Function reference" $
-      T.unit,
-    "externref">:
-      doc "External reference" $
-      T.unit]
-
-funcType :: Binding
-funcType = define "FuncType" $
-  doc "A function type signature" $
-  T.record [
-    "params">:
-      doc "Parameter types" $
-      T.list (wasm "ValType"),
-    "results">:
-      doc "Result types" $
-      T.list (wasm "ValType")]
-
-funcTypeRef :: Binding
-funcTypeRef = define "FuncTypeRef" $
-  doc "A reference to a function type, either by index or inline" $
-  T.union [
-    "index">:
-      doc "Reference by type index" $
-      T.string,
-    "inline">:
-      doc "Inline function type" $
-      wasm "FuncType"]
-
-typeUse :: Binding
-typeUse = define "TypeUse" $
-  doc "A type use clause, referencing a type definition" $
-  T.record [
-    "index">:
-      doc "Optional type index reference" $
-      T.maybe T.string,
-    "params">:
-      doc "Explicit parameter declarations (may augment or override type index)" $
-      T.list (wasm "Param"),
-    "results">:
-      doc "Explicit result types" $
-      T.list (wasm "ValType")]
-
-typeDef :: Binding
-typeDef = define "TypeDef" $
-  doc "A named type definition in the type section" $
-  T.record [
-    "name">:
-      doc "Optional type name" $
-      T.maybe T.string,
-    "type">:
-      doc "The function type" $
-      wasm "FuncType"]
-
-
--- ================================================================================================
--- Function definitions
--- ================================================================================================
-
-func :: Binding
-func = define "Func" $
-  doc "A function definition" $
-  T.record [
-    "name">:
-      doc "Optional function name" $
-      T.maybe T.string,
-    "typeUse">:
-      doc "The function's type signature" $
-      wasm "TypeUse",
-    "locals">:
-      doc "Local variable declarations" $
-      T.list (wasm "FuncLocal"),
-    "body">:
-      doc "The function body (a sequence of instructions)" $
-      T.list (wasm "Instruction")]
-
-funcLocal :: Binding
-funcLocal = define "FuncLocal" $
-  doc "A local variable declaration within a function" $
-  T.record [
-    "name">:
-      doc "Optional local name" $
-      T.maybe T.string,
-    "type">:
-      doc "The local's value type" $
-      wasm "ValType"]
-
-param :: Binding
-param = define "Param" $
-  doc "A function parameter declaration" $
-  T.record [
-    "name">:
-      doc "Optional parameter name" $
-      T.maybe T.string,
-    "type">:
-      doc "The parameter's value type" $
-      wasm "ValType"]
-
-
--- ================================================================================================
--- Instructions
--- ================================================================================================
-
-instruction :: Binding
-instruction = define "Instruction" $
-  doc "A WebAssembly instruction" $
-  T.union [
-    "const">:
-      doc "Push a constant value" $
-      wasm "ConstValue",
-    "localGet">:
-      doc "Get local variable by name or index" $
-      T.string,
-    "localSet">:
-      doc "Set local variable by name or index" $
-      T.string,
-    "localTee">:
-      doc "Set local variable and keep value on stack" $
-      T.string,
-    "globalGet">:
-      doc "Get global variable by name or index" $
-      T.string,
-    "globalSet">:
-      doc "Set global variable by name or index" $
-      T.string,
-    "load">:
-      doc "Load from memory (e.g., i32.load, f64.load)" $
-      wasm "MemoryInstruction",
-    "store">:
-      doc "Store to memory (e.g., i32.store, f64.store)" $
-      wasm "MemoryInstruction",
-    "unop">:
-      doc "Unary numeric operation (e.g., i32.clz, f64.neg)" $
-      wasm "NumericOp",
-    "binop">:
-      doc "Binary numeric operation (e.g., i32.add, f64.mul)" $
-      wasm "NumericOp",
-    "testop">:
-      doc "Test operation (e.g., i32.eqz)" $
-      wasm "NumericOp",
-    "relop">:
-      doc "Comparison operation (e.g., i32.eq, f64.lt)" $
-      wasm "NumericOp",
-    "convert">:
-      doc "Type conversion (e.g., i32.wrap_i64, f64.convert_i32_s)" $
-      T.string,
-    "call">:
-      doc "Call a function by name or index" $
-      T.string,
-    "callIndirect">:
-      doc "Indirect function call through a table" $
-      wasm "TypeUse",
-    "block">:
-      doc "A block instruction" $
-      wasm "BlockInstruction",
-    "loop">:
-      doc "A loop instruction" $
-      wasm "BlockInstruction",
-    "if">:
-      doc "An if-then-else instruction" $
-      wasm "IfInstruction",
-    "br">:
-      doc "Branch to a label" $
-      T.string,
-    "brIf">:
-      doc "Conditional branch to a label" $
-      T.string,
-    "brTable">:
-      doc "Branch table" $
-      wasm "BrTableArgs",
-    "return">:
-      doc "Return from the current function" $
-      T.unit,
-    "drop">:
-      doc "Drop the top value from the stack" $
-      T.unit,
-    "select">:
-      doc "Select one of two values based on a condition" $
-      T.unit,
-    "unreachable">:
-      doc "Trap immediately" $
-      T.unit,
-    "nop">:
-      doc "No operation" $
-      T.unit,
-    "memorySize">:
-      doc "Get current memory size in pages" $
-      T.unit,
-    "memoryGrow">:
-      doc "Grow memory by a number of pages" $
-      T.unit,
-    "refNull">:
-      doc "Null reference of the given type" $
-      wasm "RefType",
-    "refIsNull">:
-      doc "Test if a reference is null" $
-      T.unit,
-    "raw">:
-      doc "A raw WAT instruction string (escape hatch)" $
-      T.string]
-
-brTableArgs :: Binding
-brTableArgs = define "BrTableArgs" $
-  doc "Arguments for a branch table instruction" $
-  T.record [
-    "labels">:
-      doc "Branch target labels" $
-      T.list T.string,
-    "default">:
-      doc "Default branch target" $
-      T.string]
-
-blockInstruction :: Binding
-blockInstruction = define "BlockInstruction" $
-  doc "A block or loop instruction with a label and body" $
-  T.record [
-    "label">:
-      doc "Optional block label" $
-      T.maybe T.string,
-    "blockType">:
-      doc "The block's result type" $
-      wasm "BlockType",
-    "body">:
-      doc "The instructions in the block" $
-      T.list (wasm "Instruction")]
-
-blockType :: Binding
-blockType = define "BlockType" $
-  doc "The type of a block, loop, or if instruction" $
-  T.union [
-    "empty">:
-      doc "No result" $
-      T.unit,
-    "value">:
-      doc "Single result value type" $
-      wasm "ValType",
-    "typeUse">:
-      doc "Full function type signature" $
-      wasm "TypeUse"]
-
-memoryInstruction :: Binding
-memoryInstruction = define "MemoryInstruction" $
-  doc "A memory load or store instruction" $
-  T.record [
-    "type">:
-      doc "Value type to load or store" $
-      wasm "ValType",
-    "memArg">:
-      doc "Memory argument (offset and alignment)" $
-      wasm "MemArg"]
-
-numericOp :: Binding
-numericOp = define "NumericOp" $
-  doc "A typed numeric operation (used for unop, binop, testop, relop)" $
-  T.record [
-    "type">:
-      doc "Operand value type" $
-      wasm "ValType",
-    "name">:
-      doc "Operation name (e.g., add, sub, mul, eqz, lt_s)" $
-      T.string]
-
-memArg :: Binding
-memArg = define "MemArg" $
-  doc "Memory access arguments" $
-  T.record [
-    "offset">:
-      doc "Memory offset in bytes" $
-      T.int32,
-    "align">:
-      doc "Alignment hint (power of 2)" $
-      T.int32]
-
-ifInstruction :: Binding
-ifInstruction = define "IfInstruction" $
-  doc "An if-then-else instruction" $
-  T.record [
-    "label">:
-      doc "Optional label for the if block" $
-      T.maybe T.string,
-    "blockType">:
-      doc "The result type of the if" $
-      wasm "BlockType",
-    "then">:
-      doc "The 'then' branch instructions" $
-      T.list (wasm "Instruction"),
-    "else">:
-      doc "The 'else' branch instructions (may be empty)" $
-      T.list (wasm "Instruction")]
-
-
--- ================================================================================================
--- Memory
--- ================================================================================================
-
-memoryDef :: Binding
-memoryDef = define "MemoryDef" $
-  doc "A memory definition" $
-  T.record [
-    "name">:
-      doc "Optional memory name" $
-      T.maybe T.string,
-    "limits">:
-      doc "Memory size limits (in pages of 64KB)" $
-      wasm "Limits"]
-
-dataSegment :: Binding
-dataSegment = define "DataSegment" $
-  doc "A data segment for initializing memory" $
-  T.record [
-    "name">:
-      doc "Optional data segment name" $
-      T.maybe T.string,
-    "mode">:
-      doc "Whether this is an active or passive data segment" $
-      wasm "DataMode",
-    "bytes">:
-      doc "The data bytes (as a string of escaped bytes)" $
-      T.string]
-
-dataMode :: Binding
-dataMode = define "DataMode" $
-  doc "The mode of a data segment" $
-  T.union [
-    "active">:
-      doc "Active segment: loaded at the given offset expression" $
-      T.list (wasm "Instruction"),
-    "passive">:
-      doc "Passive segment: must be explicitly loaded via memory.init" $
-      T.unit]
-
-limits :: Binding
-limits = define "Limits" $
-  doc "Size limits for memories and tables" $
-  T.record [
-    "min">:
-      doc "Minimum size" $
-      T.int32,
-    "max">:
-      doc "Optional maximum size" $
-      T.maybe T.int32]
-
-
--- ================================================================================================
--- Globals
--- ================================================================================================
-
-globalDef :: Binding
-globalDef = define "GlobalDef" $
-  doc "A global variable definition" $
-  T.record [
-    "name">:
-      doc "Optional global name" $
-      T.maybe T.string,
-    "type">:
-      doc "The global's type (value type and mutability)" $
-      wasm "GlobalType",
-    "init">:
-      doc "Initialization expression" $
-      T.list (wasm "Instruction")]
-
-globalType :: Binding
-globalType = define "GlobalType" $
-  doc "A global variable type" $
-  T.record [
-    "valType">:
-      doc "The value type" $
-      wasm "ValType",
-    "mutable">:
-      doc "Whether the global is mutable" $
-      T.boolean]
-
-
--- ================================================================================================
--- Tables
--- ================================================================================================
-
-tableDef :: Binding
-tableDef = define "TableDef" $
-  doc "A table definition" $
-  T.record [
-    "name">:
-      doc "Optional table name" $
-      T.maybe T.string,
-    "refType">:
-      doc "The reference type of table elements" $
-      wasm "RefType",
-    "limits">:
-      doc "Table size limits" $
-      wasm "Limits"]
-
-elemSegment :: Binding
-elemSegment = define "ElemSegment" $
-  doc "An element segment for initializing tables" $
-  T.record [
-    "name">:
-      doc "Optional element segment name" $
-      T.maybe T.string,
-    "mode">:
-      doc "Whether this is an active or passive element segment" $
-      wasm "ElemMode",
-    "type">:
-      doc "The reference type of elements" $
-      wasm "RefType",
-    "init">:
-      doc "Initialization expressions (one per element)" $
-      T.list (T.list (wasm "Instruction"))]
-
-elemActive :: Binding
-elemActive = define "ElemActive" $
-  doc "Active element segment parameters" $
-  T.record [
-    "table">:
-      doc "Table index" $
-      T.string,
-    "offset">:
-      doc "Offset expression" $
-      T.list (wasm "Instruction")]
-
-elemMode :: Binding
-elemMode = define "ElemMode" $
-  doc "The mode of an element segment" $
-  T.union [
-    "active">:
-      doc "Active segment: loaded at the given table index and offset" $
-      wasm "ElemActive",
-    "passive">:
-      doc "Passive segment: must be explicitly loaded via table.init" $
-      T.unit,
-    "declarative">:
-      doc "Declarative segment: declares function references for ref.func" $
-      T.unit]
-
-refType :: Binding
-refType = define "RefType" $
-  doc "A reference type for tables and reference instructions" $
-  T.union [
-    "funcref">:
-      doc "Function reference" $
-      T.unit,
-    "externref">:
-      doc "External reference" $
-      T.unit]
-
-
--- ================================================================================================
--- Imports and exports
--- ================================================================================================
-
-importDef :: Binding
-importDef = define "ImportDef" $
-  doc "An import declaration" $
-  T.record [
-    "module">:
-      doc "The module name to import from" $
-      T.string,
-    "name">:
-      doc "The name of the imported entity" $
-      T.string,
-    "desc">:
-      doc "The import descriptor (what kind of entity is imported)" $
-      wasm "ImportDesc"]
-
-importDesc :: Binding
-importDesc = define "ImportDesc" $
-  doc "An import descriptor specifying the kind of imported entity" $
-  T.union [
-    "func">:
-      doc "Import a function with the given type" $
-      wasm "ImportFunc",
-    "memory">:
-      doc "Import a memory with the given limits" $
-      wasm "ImportMemory",
-    "table">:
-      doc "Import a table" $
-      wasm "ImportTable",
-    "global">:
-      doc "Import a global variable" $
-      wasm "ImportGlobal"]
-
-importFunc :: Binding
-importFunc = define "ImportFunc" $
-  doc "A function import descriptor" $
-  T.record [
-    "name">:
-      doc "Optional local name for the imported function" $
-      T.maybe T.string,
-    "typeUse">:
-      doc "The function's type" $
-      wasm "TypeUse"]
-
-importGlobal :: Binding
-importGlobal = define "ImportGlobal" $
-  doc "A global import descriptor" $
-  T.record [
-    "name">:
-      doc "Optional local name" $
-      T.maybe T.string,
-    "type">:
-      doc "Global type" $
-      wasm "GlobalType"]
-
-importMemory :: Binding
-importMemory = define "ImportMemory" $
-  doc "A memory import descriptor" $
-  T.record [
-    "name">:
-      doc "Optional local name" $
-      T.maybe T.string,
-    "limits">:
-      doc "Memory limits" $
-      wasm "Limits"]
-
-importTable :: Binding
-importTable = define "ImportTable" $
-  doc "A table import descriptor" $
-  T.record [
-    "name">:
-      doc "Optional local name" $
-      T.maybe T.string,
-    "refType">:
-      doc "Reference type" $
-      wasm "RefType",
-    "limits">:
-      doc "Table limits" $
-      wasm "Limits"]
-
-exportDef :: Binding
-exportDef = define "ExportDef" $
-  doc "An export declaration" $
-  T.record [
-    "name">:
-      doc "The exported name" $
-      T.string,
-    "desc">:
-      doc "What is being exported" $
-      wasm "ExportDesc"]
-
-exportDesc :: Binding
-exportDesc = define "ExportDesc" $
-  doc "An export descriptor identifying what is being exported" $
-  T.union [
-    "func">:
-      doc "Export a function by name or index" $
-      T.string,
-    "memory">:
-      doc "Export a memory by name or index" $
-      T.string,
-    "table">:
-      doc "Export a table by name or index" $
-      T.string,
-    "global">:
-      doc "Export a global by name or index" $
-      T.string]
-
-
--- ================================================================================================
--- Literal / constant values
--- ================================================================================================
-
-constValue :: Binding
-constValue = define "ConstValue" $
-  doc "A constant value instruction" $
-  T.union [
-    "i32">:
-      doc "A 32-bit integer constant" $
-      T.int32,
-    "i64">:
-      doc "A 64-bit integer constant" $
-      T.int64,
-    "f32">:
-      doc "A 32-bit float constant" $
-      T.float32,
-    "f64">:
-      doc "A 64-bit float constant" $
-      T.float64]
diff --git a/src/main/haskell/Hydra/Sources/Workflow.hs b/src/main/haskell/Hydra/Sources/Workflow.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Workflow.hs
+++ /dev/null
@@ -1,73 +0,0 @@
-module Hydra.Sources.Workflow where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:), (@@), (~>))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Hydra.Sources.Kernel.Types.Graph as Graph
-import qualified Hydra.Sources.Kernel.Types.Packaging as Module
-
-
-ns :: Namespace
-ns = Namespace "hydra.workflow"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Graph.ns, Module.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just "A model for Hydra transformation workflows"}
-  where
-    definitions = [
-      hydraSchemaSpec,
-      schemaSpec,
-      transformWorkflow]
-
-hydraSchemaSpec :: Binding
-hydraSchemaSpec = define "HydraSchemaSpec" $
-  doc "The specification of a Hydra schema, provided as a set of modules and a distinguished type" $
-  T.record [
-    "modules">:
-      doc "The modules to include in the schema graph" $
-      T.list Module.module',
-    "typeName">:
-      doc "The name of the top-level type; all data which passes through the workflow will be instances of this type"
-      Core.name]
-
-schemaSpec :: Binding
-schemaSpec = define "SchemaSpec" $
-  doc "The specification of a schema at the source end of a workflow" $
-  T.union [
-    "hydra">:
-      doc "A native Hydra schema"
-      hydraSchemaSpec,
-    "file">:
-      doc "A schema provided as a file, available at the given file path" $
-      T.string,
-    "provided">:
-      doc "A schema which will be provided within the workflow" $
-      T.unit]
-
-transformWorkflow :: Binding
-transformWorkflow = define "TransformWorkflow" $
-  doc "The specification of a workflow which takes a schema specification, reads data from a directory, and writes data to another directory" $
-  T.record [
-    "name">:
-      doc "A descriptive name for the workflow" $
-      T.string,
-    "schemaSpec">:
-      doc "The schema specification"
-      schemaSpec,
-    "srcDir">:
-      doc "The source directory" $
-      T.string,
-    "destDir">:
-      doc "The destination directory" $
-      T.string]
diff --git a/src/main/haskell/Hydra/Sources/Xml/Schema.hs b/src/main/haskell/Hydra/Sources/Xml/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Xml/Schema.hs
+++ /dev/null
@@ -1,266 +0,0 @@
-module Hydra.Sources.Xml.Schema where
-
--- Standard imports for type-level sources outside of the kernel
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types                 ((>:))
-import qualified Hydra.Dsl.Types                 as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-import qualified Data.List                       as L
-import qualified Data.Map                        as M
-import qualified Data.Set                        as S
-import qualified Data.Maybe                      as Y
-
-
-ns :: Namespace
-ns = Namespace "hydra.xml.schema"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A partial XML Schema model, focusing on datatypes. All simple datatypes (i.e. xsd:anySimpleType and below) are included.\n" ++
-      "See: https://www.w3.org/TR/xmlschema-2\n" ++
-      "Note: for most of the XML Schema datatype definitions included here, the associated Hydra type is simply\n" ++
-      "      the string type. Exceptions are made for xsd:boolean and most of the numeric types, where there is a clearly\n" ++
-      "      corresponding Hydra literal type.")}
-  where
-    definitions = datatypes ++ others
-    datatypes = [
-      anySimpleType,
-      anyType,
-      anyURI,
-      base64Binary,
-      boolean_,
-      byte_,
-      date,
-      dateTime,
-      decimal,
-      double_,
-      duration,
-      entities,
-      entity,
-      float_,
-      gDay,
-      gMonth,
-      gMonthDay,
-      gYear,
-      gYearMonth,
-      hexBinary,
-      id_,
-      idref,
-      idrefs,
-      int_,
-      integer_,
-      language_,
-      long_,
-      nmtoken,
-      notation,
-      name_,
-      negativeInteger,
-      nonNegativeInteger,
-      nonPositiveInteger,
-      normalizedString,
-      positiveInteger,
-      qName,
-      short_,
-      string_,
-      time,
-      token,
-      unsignedByte,
-      unsignedInt,
-      unsignedLong,
-      unsignedShort]
-    others = [
-      constrainingFacet,
-      datatype_]
-
-anySimpleType :: Binding
-anySimpleType = define "AnySimpleType" $ T.wrap T.string
-
-anyType :: Binding
-anyType = define "AnyType" $ T.wrap T.string
-
-anyURI :: Binding
-anyURI = define "AnyURI" $ T.wrap T.string
-
-base64Binary :: Binding
-base64Binary = define "Base64Binary" $ T.wrap T.string
-
-boolean_ :: Binding
-boolean_ = define "Boolean" $ T.wrap T.boolean
-
-byte_ :: Binding
-byte_ = define "Byte" $ T.wrap T.int8
-
-date :: Binding
-date = define "Date" $ T.wrap T.string
-
-dateTime :: Binding
-dateTime = define "DateTime" $ T.wrap T.string
-
-decimal :: Binding
-decimal = define "Decimal" $ T.wrap T.string
-
-double_ :: Binding
-double_ = define "Double" $ T.wrap T.float64
-
-duration :: Binding
-duration = define "Duration" $ T.wrap T.string
-
-entities :: Binding
-entities = define "ENTITIES" $ T.wrap T.string
-
-entity :: Binding
-entity = define "ENTITY" $ T.wrap T.string
-
-float_ :: Binding
-float_ = define "Float" $ T.wrap T.float32
-
-gDay :: Binding
-gDay = define "GDay" $ T.wrap T.string
-
-gMonth :: Binding
-gMonth = define "GMonth" $ T.wrap T.string
-
-gMonthDay :: Binding
-gMonthDay = define "GMonthDay" $ T.wrap T.string
-
-gYear :: Binding
-gYear = define "GYear" $ T.wrap T.string
-
-gYearMonth :: Binding
-gYearMonth = define "GYearMonth" $ T.wrap T.string
-
-hexBinary :: Binding
-hexBinary = define "HexBinary" $ T.wrap T.string
-
-id_ :: Binding
-id_ = define "ID" $ T.wrap T.string
-
-idref :: Binding
-idref = define "IDREF" $ T.wrap T.string
-
-idrefs :: Binding
-idrefs = define "IDREFS" $ T.wrap T.string
-
-int_ :: Binding
-int_ = define "Int" $ T.wrap T.int32
-
-integer_ :: Binding
-integer_ = define "Integer" $ T.wrap T.bigint
-
-language_ :: Binding
-language_ = define "Language" $ T.wrap T.string
-
-long_ :: Binding
-long_ = define "Long" $ T.wrap T.int64
-
-nmtoken :: Binding
-nmtoken = define "NMTOKEN" $ T.wrap T.string
-
-notation :: Binding
-notation = define "NOTATION" $ T.wrap T.string
-
-name_ :: Binding
-name_ = define "Name" $ T.wrap T.string
-
-negativeInteger :: Binding
-negativeInteger = define "NegativeInteger" $ T.wrap T.bigint
-
-nonNegativeInteger :: Binding
-nonNegativeInteger = define "NonNegativeInteger" $ T.wrap T.bigint
-
-nonPositiveInteger :: Binding
-nonPositiveInteger = define "NonPositiveInteger" $ T.wrap T.bigint
-
-normalizedString :: Binding
-normalizedString = define "NormalizedString" $ T.wrap T.string
-
-positiveInteger :: Binding
-positiveInteger = define "PositiveInteger" $ T.wrap T.bigint
-
-qName :: Binding
-qName = define "QName" $ T.wrap T.string
-
-short_ :: Binding
-short_ = define "Short" $ T.wrap T.int16
-
-string_ :: Binding
-string_ = define "String" $ T.wrap T.string
-
-time :: Binding
-time = define "Time" $ T.wrap T.string
-
-token :: Binding
-token = define "Token" $ T.wrap T.string
-
-unsignedByte :: Binding
-unsignedByte = define "UnsignedByte" $ T.wrap T.uint8
-
-unsignedInt :: Binding
-unsignedInt = define "UnsignedInt" $ T.wrap T.uint32
-
-unsignedLong :: Binding
-unsignedLong = define "UnsignedLong" $ T.wrap T.uint64
-
-unsignedShort :: Binding
-unsignedShort = define "UnsignedShort" $ T.wrap T.uint16
-
-constrainingFacet :: Binding
-constrainingFacet = define "ConstrainingFacet" $
-  see "https://www.w3.org/TR/xmlschema-2/#non-fundamental" $
-  T.wrap T.unit -- TODO: concrete facets
-
-datatype_ :: Binding
-datatype_ = define "Datatype" $ T.enum [
-  "anySimpleType",
-  "anyType",
-  "anyURI",
-  "base64Binary",
-  "boolean",
-  "byte",
-  "date",
-  "dateTime",
-  "decimal",
-  "double",
-  "duration",
-  "ENTITIES",
-  "ENTITY",
-  "float",
-  "gDay",
-  "gMonth",
-  "gMonthDay",
-  "gYear",
-  "gYearMonth",
-  "hexBinary",
-  "ID",
-  "IDREF",
-  "IDREFS",
-  "int",
-  "integer",
-  "language",
-  "long",
-  "NMTOKEN",
-  "NOTATION",
-  "name",
-  "negativeInteger",
-  "nonNegativeInteger",
-  "nonPositiveInteger",
-  "normalizedString",
-  "positiveInteger",
-  "qName",
-  "short",
-  "string",
-  "time",
-  "token",
-  "unsignedByte",
-  "unsignedInt",
-  "unsignedLong",
-  "unsignedShort"]
diff --git a/src/main/haskell/Hydra/Sources/Yaml/Coder.hs b/src/main/haskell/Hydra/Sources/Yaml/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Yaml/Coder.hs
+++ /dev/null
@@ -1,326 +0,0 @@
-
-module Hydra.Sources.Yaml.Coder where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Util                    as Util
-import qualified Hydra.Dsl.Meta.Context                    as Ctx
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Errors                      as Error
-import qualified Hydra.Dsl.Meta.Lib.Eithers                as Eithers
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Yaml.Model                       as Yaml
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Kernel.Terms.Adapt           as Adapt
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core   as ExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Literals       as HydraLiterals
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Terms.Show.Core      as ShowCore
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import qualified Hydra.Sources.Yaml.Language           as YamlLanguage
-import           Prelude hiding ((++))
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-
-import qualified Hydra.Yaml.Model as YM
-
-
--- | Lift Either String to Either Error using a context
-liftStringError :: TTerm Context -> TTerm (Either String a) -> TTerm (Either Error a)
-liftStringError cx = Eithers.bimap ("_s" ~> Error.errorOther (Error.otherError $ var "_s")) ("_x" ~> var "_x")
-
-ns :: Namespace
-ns = Namespace "hydra.yaml.coder"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [Adapt.ns,
-     ExtractCore.ns, HydraLiterals.ns, YamlLanguage.ns, Strip.ns],
-            moduleTypeDependencies = (KernelTypes.kernelTypesNamespaces L.++ [Namespace "hydra.yaml.model"]),
-            moduleDescription = Just "YAML encoding and decoding for Hydra terms"}
-  where
-    definitions = [
-      toDefinition decodeRecord,
-      toDefinition encodeRecord,
-      toDefinition literalYamlCoder,
-      toDefinition recordCoder,
-      toDefinition requiresYamlStringSentinel,
-      toDefinition termCoder,
-      toDefinition unitCoder,
-      toDefinition yamlCoder]
-
-decodeRecord :: TTermDefinition (Name -> [(FieldType, Coder Term YM.Node)] -> Context -> YM.Node -> Either Error Term)
-decodeRecord = define "decodeRecord" $
-  doc "Decode a YAML value to a record term" $
-  "tname" ~> "coders" ~> "cx" ~> "n" ~>
-  "decodeObjectBody" <~ ("m" ~>
-    "decodeField" <~ ("coder" ~>
-      "ft" <~ (Pairs.first $ var "coder") $
-      "coder'" <~ (Pairs.second $ var "coder") $
-      "fname" <~ (Core.fieldTypeName $ var "ft") $
-      "defaultValue" <~ (Yaml.nodeScalar Yaml.scalarNull) $
-      "yamlValue" <~ (Maybes.fromMaybe (var "defaultValue") $ Maps.lookup (Yaml.nodeScalar $ Yaml.scalarStr $ Core.unName $ var "fname") (var "m")) $
-      "v" <<~ Coders.coderDecode (var "coder'") @@ var "cx" @@ var "yamlValue" $
-      right (Core.field (var "fname") (var "v"))) $
-    "fields" <<~ Eithers.mapList (var "decodeField") (var "coders") $
-    right (Core.termRecord $ Core.record (var "tname") (var "fields"))) $
-  cases YM._Node (var "n")
-    (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "expected mapping")) (var "cx")) [
-    YM._Node_mapping>>: var "decodeObjectBody"]
-
-encodeRecord :: TTermDefinition ([(FieldType, Coder Term YM.Node)] -> Context -> Graph -> Term -> Either Error YM.Node)
-encodeRecord = define "encodeRecord" $
-  doc "Encode a record term to YAML" $
-  "coders" ~> "cx" ~> "graph" ~> "term" ~>
-  "stripped" <~ (Strip.deannotateTerm @@ var "term") $
-  -- Check if a field should be omitted: type is Maybe and value is TermMaybe Nothing
-  "isMaybeNothing" <~ ("ft" ~> "fvalue" ~>
-    cases _Type (Core.fieldTypeType $ var "ft")
-      (Just false) [
-      _Type_maybe>>: constant $
-        cases _Term (var "fvalue")
-          (Just false) [
-          _Term_maybe>>: "opt" ~> Maybes.isNothing (var "opt")]]) $
-  "encodeField" <~ ("coderAndField" ~>
-    "ftAndCoder" <~ (Pairs.first $ var "coderAndField") $
-    "field" <~ (Pairs.second $ var "coderAndField") $
-    "ft" <~ (Pairs.first $ var "ftAndCoder") $
-    "coder'" <~ (Pairs.second $ var "ftAndCoder") $
-    "fname" <~ (Core.fieldName $ var "field") $
-    "fvalue" <~ (Core.fieldTerm $ var "field") $
-    Logic.ifElse (var "isMaybeNothing" @@ var "ft" @@ var "fvalue")
-      (right nothing)
-      ("encoded" <<~ Coders.coderEncode (var "coder'") @@ var "cx" @@ var "fvalue" $
-        right (just $ pair (Yaml.nodeScalar $ Yaml.scalarStr $ Core.unName $ var "fname") (var "encoded")))) $
-  "record" <<~ ExtractCore.termRecord @@ var "graph" @@ var "stripped" $
-  "fields" <~ (Core.recordFields $ var "record") $
-  "maybeFields" <<~ Eithers.mapList (var "encodeField") (Lists.zip (var "coders") (var "fields")) $
-  right (Yaml.nodeMapping $ Maps.fromList $ Maybes.cat $ var "maybeFields")
-
-literalYamlCoder :: TTermDefinition (LiteralType -> Either Error (Coder Literal YM.Scalar))
-literalYamlCoder = define "literalYamlCoder" $
-  doc "Create a YAML coder for literal types" $
-  "lt" ~>
-  "decodeBool" <~ ("cx" ~> "s" ~>
-    cases YM._Scalar (var "s")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected boolean, found scalar"])) (var "cx")) [
-      YM._Scalar_bool>>: "b" ~> right (Core.literalBoolean $ var "b")]) $
-  "decodeDecimal" <~ ("cx" ~> "s" ~>
-    cases YM._Scalar (var "s")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected decimal, found scalar"])) (var "cx")) [
-      YM._Scalar_decimal>>: "d" ~> right (Core.literalDecimal $ var "d"),
-      YM._Scalar_float>>: "f" ~> right (Core.literalDecimal $ Literals.float64ToDecimal $ Literals.bigfloatToFloat64 $ var "f"),
-      YM._Scalar_int>>: "i" ~> right (Core.literalDecimal $ Literals.bigintToDecimal $ var "i")]) $
-  "decodeFloat" <~ ("cx" ~> "s" ~>
-    cases YM._Scalar (var "s")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected float, found scalar"])) (var "cx")) [
-      YM._Scalar_decimal>>: "d" ~> right (Core.literalFloat $ Core.floatValueBigfloat $ Literals.float64ToBigfloat $ Literals.decimalToFloat64 $ var "d"),
-      YM._Scalar_float>>: "f" ~> right (Core.literalFloat $ Core.floatValueBigfloat $ var "f")]) $
-  "decodeInteger" <~ ("cx" ~> "s" ~>
-    cases YM._Scalar (var "s")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected integer, found scalar"])) (var "cx")) [
-      YM._Scalar_int>>: "i" ~> right (Core.literalInteger $ Core.integerValueBigint $ var "i")]) $
-  "decodeString" <~ ("cx" ~> "s" ~>
-    cases YM._Scalar (var "s")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected string, found scalar"])) (var "cx")) [
-      YM._Scalar_str>>: "s'" ~> right (Core.literalString $ var "s'")]) $
-  "encoded" <~ (cases _LiteralType (var "lt") Nothing [
-    _LiteralType_boolean>>: constant $ Coders.coder
-      ("cx" ~> "lit" ~>
-        "b" <<~ ExtractCore.booleanLiteral @@ var "lit" $
-        right (Yaml.scalarBool $ var "b"))
-      (var "decodeBool"),
-    _LiteralType_decimal>>: constant $ Coders.coder
-      ("cx" ~> "lit" ~>
-        "d" <<~ ExtractCore.decimalLiteral @@ var "lit" $
-        right (Yaml.scalarDecimal $ var "d"))
-      (var "decodeDecimal"),
-    _LiteralType_float>>: constant $ Coders.coder
-      ("cx" ~> "lit" ~>
-        "f" <<~ ExtractCore.floatLiteral @@ var "lit" $
-        "bf" <<~ ExtractCore.bigfloatValue @@ var "f" $
-        "shown" <~ (Literals.showBigfloat $ var "bf") $
-        Logic.ifElse (requiresYamlStringSentinel @@ var "shown")
-          (Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "YAML cannot represent bigfloat value: ", var "shown"])) (var "cx"))
-          (right (Yaml.scalarFloat $ var "bf")))
-      (var "decodeFloat"),
-    _LiteralType_integer>>: constant $ Coders.coder
-      ("cx" ~> "lit" ~>
-        "i" <<~ ExtractCore.integerLiteral @@ var "lit" $
-        "bi" <<~ ExtractCore.bigintValue @@ var "i" $
-        right (Yaml.scalarInt $ var "bi"))
-      (var "decodeInteger"),
-    _LiteralType_string>>: constant $ Coders.coder
-      ("cx" ~> "lit" ~>
-        "s" <<~ ExtractCore.stringLiteral @@ var "lit" $
-        right (Yaml.scalarStr $ var "s"))
-      (var "decodeString")]) $
-  right $ var "encoded"
-
-recordCoder :: TTermDefinition (Name -> [FieldType] -> Context -> Graph -> Either Error (Coder Term YM.Node))
-recordCoder = define "recordCoder" $
-  doc "Create a YAML coder for record types" $
-  "tname" ~> "rt" ~> "cx" ~> "g" ~>
-  "getCoder" <~ ("f" ~>
-    "coder" <<~ termCoder @@ (Core.fieldTypeType $ var "f") @@ var "cx" @@ var "g" $
-    right $ pair (var "f") (var "coder")) $
-  "coders" <<~ Eithers.mapList (var "getCoder") (var "rt") $
-  right $ Coders.coder
-    ("cx" ~> "term" ~> encodeRecord @@ var "coders" @@ var "cx" @@ var "g" @@ var "term")
-    ("cx" ~> "val" ~> decodeRecord @@ var "tname" @@ var "coders" @@ var "cx" @@ var "val")
-
--- | Check whether a float's string form is an IEEE value that Hydra YAML cannot represent
--- as a plain scalar: NaN, Infinity, -Infinity, or -0.0. Hydra YAML's float scalar deliberately
--- excludes these (see Yaml.Model) so the encoder must refuse them rather than silently coerce.
-requiresYamlStringSentinel :: TTermDefinition (String -> Bool)
-requiresYamlStringSentinel = define "requiresYamlStringSentinel" $
-  doc "True for IEEE sentinel strings that Hydra YAML cannot represent as a float scalar." $
-  "s" ~> Logic.or (Equality.equal (var "s") (string "NaN")) $
-         Logic.or (Equality.equal (var "s") (string "Infinity")) $
-         Logic.or (Equality.equal (var "s") (string "-Infinity"))
-                  (Equality.equal (var "s") (string "-0.0"))
-
-termCoder :: TTermDefinition (Type -> Context -> Graph -> Either Error (Coder Term YM.Node))
-termCoder = define "termCoder" $
-  doc "Create a YAML coder for term types" $
-  "typ" ~> "cx" ~> "g" ~>
-  "stripped" <~ (Strip.deannotateType @@ var "typ") $
-  "encodeLiteral" <~ ("ac" ~> "cx" ~> "term" ~>
-    cases _Term (var "term")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected literal term, found: ", ShowCore.term @@ var "term"])) (var "cx")) [
-      _Term_literal>>: "av" ~>
-        "scalar" <<~ Coders.coderEncode (var "ac") @@ var "cx" @@ var "av" $
-        right (Yaml.nodeScalar $ var "scalar")]) $
-  "encodeList" <~ ("lc" ~> "cx" ~> "term" ~>
-    cases _Term (var "term")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected list term, found: ", ShowCore.term @@ var "term"])) (var "cx")) [
-      _Term_list>>: "els" ~>
-        "encodedEls" <<~ Eithers.mapList ("el" ~> Coders.coderEncode (var "lc") @@ var "cx" @@ var "el") (var "els") $
-        right (Yaml.nodeSequence $ var "encodedEls")]) $
-  "decodeList" <~ ("lc" ~> "cx" ~> "n" ~>
-    cases YM._Node (var "n")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "expected sequence")) (var "cx")) [
-      YM._Node_sequence>>: "nodes" ~>
-        "decodedNodes" <<~ Eithers.mapList ("node" ~> Coders.coderDecode (var "lc") @@ var "cx" @@ var "node") (var "nodes") $
-        right (Core.termList $ var "decodedNodes")]) $
-  "encodeMaybe" <~ ("maybeElementCoder" ~> "cx" ~> "maybeTerm" ~>
-    "strippedMaybeTerm" <~ (Strip.deannotateTerm @@ var "maybeTerm") $
-    cases _Term (var "strippedMaybeTerm")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected optional term, found: ", ShowCore.term @@ var "maybeTerm"])) (var "cx")) [
-      _Term_maybe>>: "maybeContents" ~>
-        Maybes.maybe
-          (right $ Yaml.nodeScalar Yaml.scalarNull)
-          ("innerTerm" ~>
-            "encodedInner" <<~ Coders.coderEncode (var "maybeElementCoder") @@ var "cx" @@ var "innerTerm" $
-            right (var "encodedInner"))
-          (var "maybeContents")]) $
-  "decodeMaybe" <~ ("maybeElementCoder" ~> "cx" ~> "yamlVal" ~>
-    cases YM._Node (var "yamlVal")
-      (Just $
-        "decodedInner" <<~ Coders.coderDecode (var "maybeElementCoder") @@ var "cx" @@ var "yamlVal" $
-        right (Core.termMaybe $ just $ var "decodedInner")) [
-      YM._Node_scalar>>: "s" ~>
-        cases YM._Scalar (var "s")
-          (Just $
-            "decodedInner" <<~ Coders.coderDecode (var "maybeElementCoder") @@ var "cx" @@ var "yamlVal" $
-            right (Core.termMaybe $ just $ var "decodedInner")) [
-          YM._Scalar_null>>: constant $ right (Core.termMaybe nothing)]]) $
-  "result" <~ (cases _Type (var "stripped")
-    (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [
-      string "unsupported type in YAML: ",
-      ShowCore.type_ @@ var "typ"])) (var "cx")) [
-    _Type_literal>>: "at" ~>
-      "ac" <<~ literalYamlCoder @@ var "at" $
-      right $ Coders.coder
-        (var "encodeLiteral" @@ var "ac")
-        ("cx" ~> "n" ~>
-          cases YM._Node (var "n")
-            (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "expected scalar node")) (var "cx")) [
-            YM._Node_scalar>>: "s" ~>
-              "lit" <<~ Coders.coderDecode (var "ac") @@ var "cx" @@ var "s" $
-              right (Core.termLiteral $ var "lit")]),
-    _Type_list>>: "lt" ~>
-      "lc" <<~ termCoder @@ var "lt" @@ var "cx" @@ var "g" $
-      right $ Coders.coder
-        (var "encodeList" @@ var "lc")
-        (var "decodeList" @@ var "lc"),
-    _Type_map>>: "mt" ~>
-      "kt" <~ (Core.mapTypeKeys $ var "mt") $
-      "vt" <~ (Core.mapTypeValues $ var "mt") $
-      "kc" <<~ termCoder @@ var "kt" @@ var "cx" @@ var "g" $
-      "vc" <<~ termCoder @@ var "vt" @@ var "cx" @@ var "g" $
-      "encodeEntry" <~ ("cx" ~> "kv" ~>
-        "k" <~ (Pairs.first $ var "kv") $
-        "v" <~ (Pairs.second $ var "kv") $
-        "encodedK" <<~ Coders.coderEncode (var "kc") @@ var "cx" @@ var "k" $
-        "encodedV" <<~ Coders.coderEncode (var "vc") @@ var "cx" @@ var "v" $
-        right (pair (var "encodedK") (var "encodedV"))) $
-      "decodeEntry" <~ ("cx" ~> "kv" ~>
-        "k" <~ (Pairs.first $ var "kv") $
-        "v" <~ (Pairs.second $ var "kv") $
-        "decodedK" <<~ Coders.coderDecode (var "kc") @@ var "cx" @@ var "k" $
-        "decodedV" <<~ Coders.coderDecode (var "vc") @@ var "cx" @@ var "v" $
-        right (pair (var "decodedK") (var "decodedV"))) $
-      right $ Coders.coder
-        ("cx" ~> "term" ~>
-          cases _Term (var "term")
-            (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected map term, found: ", ShowCore.term @@ var "term"])) (var "cx")) [
-            _Term_map>>: "m" ~>
-              "entries" <<~ Eithers.mapList ("entry" ~> var "encodeEntry" @@ var "cx" @@ var "entry") (Maps.toList $ var "m") $
-              right (Yaml.nodeMapping $ Maps.fromList $ var "entries")])
-        ("cx" ~> "n" ~>
-          cases YM._Node (var "n")
-            (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "expected mapping")) (var "cx")) [
-            YM._Node_mapping>>: "m" ~>
-              "entries" <<~ Eithers.mapList ("entry" ~> var "decodeEntry" @@ var "cx" @@ var "entry") (Maps.toList $ var "m") $
-              right (Core.termMap $ Maps.fromList $ var "entries")]),
-    _Type_maybe>>: "maybeElementType" ~>
-      "maybeElementCoder" <<~ termCoder @@ var "maybeElementType" @@ var "cx" @@ var "g" $
-      right $ Coders.coder
-        (var "encodeMaybe" @@ var "maybeElementCoder")
-        (var "decodeMaybe" @@ var "maybeElementCoder"),
-    _Type_record>>: "rt" ~> recordCoder @@ Core.name (string "yaml") @@ var "rt" @@ var "cx" @@ var "g",
-    _Type_unit>>: constant $ right $ (var "hydra.yaml.coder.unitCoder" :: TTerm (Coder Term YM.Node))]) $
-  var "result"
-
-unitCoder :: TTermDefinition (Coder Term YM.Node)
-unitCoder = define "unitCoder" $
-  doc "YAML coder for unit values" $
-  "encodeUnit" <~ ("cx" ~> "term" ~>
-    cases _Term (Strip.deannotateTerm @@ var "term")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (Strings.cat $ list [string "expected unit, found: ", ShowCore.term @@ var "term"])) (var "cx")) [
-      _Term_unit>>: constant $ right $ Yaml.nodeScalar Yaml.scalarNull]) $
-  "decodeUnit" <~ ("cx" ~> "n" ~>
-    cases YM._Node (var "n")
-      (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "expected null")) (var "cx")) [
-      YM._Node_scalar>>: "s" ~>
-        cases YM._Scalar (var "s")
-          (Just $ Ctx.failInContext (Error.errorOther $ Error.otherError (string "expected null scalar")) (var "cx")) [
-          YM._Scalar_null>>: constant $ right Core.termUnit]]) $
-  Coders.coder (var "encodeUnit") (var "decodeUnit")
-
-yamlCoder :: TTermDefinition (Type -> Context -> Graph -> Either Error (Coder Term YM.Node))
-yamlCoder = define "yamlCoder" $
-  doc "Create a YAML coder for a given type" $
-  "typ" ~> "cx" ~> "g" ~>
-  "mkTermCoder" <~ ("t" ~> termCoder @@ var "t" @@ var "cx" @@ var "g") $
-  "adapter" <<~ (Adapt.simpleLanguageAdapter @@ YamlLanguage.yamlLanguage @@ var "cx" @@ var "g" @@ var "typ") $
-  "coder" <<~ var "mkTermCoder" @@ (Coders.adapterTarget $ var "adapter") $
-  right $ Adapt.composeCoders @@ (Coders.adapterCoder $ var "adapter") @@ var "coder"
diff --git a/src/main/haskell/Hydra/Sources/Yaml/Language.hs b/src/main/haskell/Hydra/Sources/Yaml/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Yaml/Language.hs
+++ /dev/null
@@ -1,80 +0,0 @@
-
-module Hydra.Sources.Yaml.Language where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Coders                     as Coders
-import qualified Hydra.Dsl.Meta.Core                       as Core
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Sets                   as Sets
-import qualified Hydra.Dsl.Meta.Variants                   as Variants
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Kernel.Terms.Strip          as Strip
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-
-
-ns :: Namespace
-ns = Namespace "hydra.yaml.language"
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = [toDefinition yamlLanguage],
-            moduleTermDependencies = [Strip.ns],
-            moduleTypeDependencies = KernelTypes.kernelTypesNamespaces,
-            moduleDescription = Just "Language constraints for YAML"}
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInModule module_
-
-yamlLanguage :: TTermDefinition Language
-yamlLanguage = define "yamlLanguage" $
-  doc "Language constraints for YAML" $ lets [
-  "eliminationVariants">: Sets.empty,
-  "literalVariants">: Sets.fromList $ list [
-    Variants.literalVariantBoolean,
-    Variants.literalVariantFloat,
-    Variants.literalVariantInteger,
-    Variants.literalVariantString],
-  "floatTypes">: Sets.fromList $ list [Core.floatTypeBigfloat],
-  "functionVariants">: Sets.empty,
-  "integerTypes">: Sets.fromList $ list [Core.integerTypeBigint],
-  "termVariants">: Sets.fromList $ list [
-    Variants.termVariantLiteral,
-    Variants.termVariantList,
-    Variants.termVariantMap,
-    Variants.termVariantMaybe,
-    Variants.termVariantRecord,
-    Variants.termVariantUnit],
-  "typeVariants">: Sets.fromList $ list [
-    Variants.typeVariantLiteral,
-    Variants.typeVariantList,
-    Variants.typeVariantMap,
-    Variants.typeVariantMaybe,
-    Variants.typeVariantRecord,
-    Variants.typeVariantUnit,
-    Variants.typeVariantVoid],
-  "typePredicate">: lambda "typ" $ cases _Type (Strip.deannotateType @@ var "typ")
-    (Just true) [
-    _Type_maybe>>: lambda "innerType" $
-      cases _Type (var "innerType")
-        (Just true) [
-        _Type_maybe>>: constant false]]] $
-  Coders.language
-    (Coders.languageName_ (string "hydra.yaml"))
-    (Coders.languageConstraints_
-      (var "eliminationVariants")
-      (var "literalVariants")
-      (var "floatTypes")
-      (var "functionVariants")
-      (var "integerTypes")
-      (var "termVariants")
-      (var "typeVariants")
-      (var "typePredicate"))
diff --git a/src/main/haskell/Hydra/Sources/Yaml/Model.hs b/src/main/haskell/Hydra/Sources/Yaml/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Yaml/Model.hs
+++ /dev/null
@@ -1,90 +0,0 @@
--- | A basic YAML representation model
-
-module Hydra.Sources.Yaml.Model where
-
--- Standard type-level imports
-import           Hydra.Kernel
-import           Hydra.Dsl.Annotations (doc)
-import           Hydra.Dsl.Bootstrap
-import           Hydra.Dsl.Types ((>:))
-import qualified Hydra.Dsl.Types as T
-import qualified Hydra.Sources.Kernel.Types.Core as Core
-
-
-ns :: Namespace
-ns = Namespace "hydra.yaml.model"
-
-define :: String -> Type -> Binding
-define = defineType ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = (map toTypeDef definitions),
-            moduleTermDependencies = [Core.ns],
-            moduleTypeDependencies = [Core.ns],
-            moduleDescription = Just ("A basic YAML representation model. Based on:\n" ++
-      "  https://yaml.org/spec/1.2/spec.html\n" ++
-      "The Serialization and Presentation properties of YAML,\n" ++
-      "including directives, comments, anchors, style, formatting, and aliases, are not supported by this model.\n" ++
-      "In addition, tags are omitted from this model, and non-standard scalars are unsupported.")}
-  where
-    definitions = [
-      node,
-      scalar]
-
--- Every YAML node has an optional scalar tag or non-specific tag (omitted from this model)
-node :: Binding
-node = define "Node" $
-  doc "A YAML node (value)" $
-  T.union [
-    "mapping">:
-      doc "A mapping from nodes to nodes" $
-      T.map node node, -- Failsafe schema: tag:yaml.org,2002:map
-    "scalar">:
-      doc "A scalar value"
-      scalar,
-    "sequence">:
-      doc "A sequence of nodes" $
-      T.list node] -- Failsafe schema: tag:yaml.org,2002:seq
-
-scalar :: Binding
-scalar = define "Scalar" $
-  doc "A union of scalars supported in the YAML failsafe and JSON schemas. Other scalars are not supported here" $
-  T.union [
-    -- Represents a true/false value
-    -- JSON schema: tag:yaml.org,2002:bool
-    "bool">:
-      doc "Represents a true/false value"
-      T.boolean,
-    -- An arbitrary-precision decimal number, encoded as a plain scalar whose lexical form is a
-    -- valid JSON number. Under the YAML 1.2.2 core schema this resolves as !!float, but Hydra
-    -- preserves full source precision on its side of the wire (the YAML spec leaves the value
-    -- space of !!float implementation-defined). Used by the JSON<->YAML bridge so JSON numbers,
-    -- which are decimal-encoded by spec, survive the trip losslessly. Like "float", the
-    -- decimal scalar has no NaN or infinity value in Hydra YAML.
-    "decimal">:
-      doc "An arbitrary-precision decimal number (lexically a valid JSON number)"
-      T.decimal,
-    -- Represents an approximation to real numbers
-    -- JSON schema: tag:yaml.org,2002:float
-    -- In addition to arbitrary-precision floating-point numbers in scientific notation,
-    -- YAML allows for three special values, which are not supported here:
-    -- positive and negative infinity (.inf and -.inf), and "not a number (.nan)
-    "float">:
-      doc "Represents an approximation to real numbers"
-      T.bigfloat,
-    -- Represents arbitrary sized finite mathematical integers
-    -- JSON schema: tag:yaml.org,2002:int
-    "int">:
-      doc "Represents arbitrary sized finite mathematical integers"
-      T.bigint,
-    -- Represents the lack of a value
-    -- JSON schema: tag:yaml.org,2002:null
-    "null">:
-      doc "Represents the lack of a value"
-      T.unit,
-    -- Failsafe schema: tag:yaml.org,2002:str
-    "str">:
-      doc "A string value"
-      T.string]
diff --git a/src/main/haskell/Hydra/Sources/Yaml/Serde.hs b/src/main/haskell/Hydra/Sources/Yaml/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sources/Yaml/Serde.hs
+++ /dev/null
@@ -1,304 +0,0 @@
-
-module Hydra.Sources.Yaml.Serde where
-
--- Standard imports for term-level sources outside of the kernel
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import           Hydra.Dsl.Meta.Lib.Strings                as Strings
-import           Hydra.Dsl.Meta.Phantoms                   as Phantoms
-import qualified Hydra.Dsl.Meta.Lib.Chars                  as Chars
-import qualified Hydra.Dsl.Meta.Lib.Equality               as Equality
-import qualified Hydra.Dsl.Meta.Lib.Lists                  as Lists
-import qualified Hydra.Dsl.Meta.Lib.Logic                  as Logic
-import qualified Hydra.Dsl.Meta.Lib.Literals               as Literals
-import qualified Hydra.Dsl.Meta.Lib.Maps                   as Maps
-import qualified Hydra.Dsl.Meta.Lib.Maybes                 as Maybes
-import qualified Hydra.Dsl.Meta.Lib.Pairs                  as Pairs
-import qualified Hydra.Dsl.Terms                           as Terms
-import qualified Hydra.Dsl.Types                           as Types
-import qualified Hydra.Sources.Kernel.Types.All            as KernelTypes
-import           Prelude hiding ((++))
-import qualified Data.List                                 as L
-import qualified Data.Map                                  as M
-import qualified Data.Set                                  as S
-
-import qualified Hydra.Yaml.Model as YM
-
-
-ns :: Namespace
-ns = Namespace "hydra.yaml.serde"
-
-define :: String -> TTerm a -> TTermDefinition a
-define = definitionInNamespace ns
-
-module_ :: Module
-module_ = Module {
-            moduleNamespace = ns,
-            moduleDefinitions = definitions,
-            moduleTermDependencies = [],
-            moduleTypeDependencies = (KernelTypes.kernelTypesNamespaces L.++ [Namespace "hydra.yaml.model"]),
-            moduleDescription = Just "Native YAML serialization: YAML Node to String"}
-  where
-    definitions = [
-      toDefinition escapeSingleQuotes,
-      toDefinition hasLeadingTrailingSpace,
-      toDefinition hydraYamlToString,
-      toDefinition indentString,
-      toDefinition isDecimalString,
-      toDefinition looksLikeNumber,
-      toDefinition needsQuoting,
-      toDefinition writeMappingEntry,
-      toDefinition writeMappingEntryInline,
-      toDefinition writeNode,
-      toDefinition writeNodeInline,
-      toDefinition writeScalar,
-      toDefinition writeSequenceItem,
-      toDefinition writeString,
-      toDefinition yamlReservedWords,
-      toDefinition yamlSpecialChars]
-
--- | Escape single quotes by doubling them
-escapeSingleQuotes :: TTermDefinition (String -> String)
-escapeSingleQuotes = define "escapeSingleQuotes" $
-  doc "Escape single quotes by doubling them" $
-  "s" ~>
-  "squote" <~ int32 39 $  -- '\''
-  Strings.fromList $ Lists.bind (Strings.toList $ var "s")
-    ("c" ~> Logic.ifElse (Equality.equal (var "c") (var "squote"))
-      (list [var "squote", var "squote"])
-      (list [var "c"]))
-
--- | Check if a string has leading or trailing whitespace
-hasLeadingTrailingSpace :: TTermDefinition (String -> Bool)
-hasLeadingTrailingSpace = define "hasLeadingTrailingSpace" $
-  doc "Check if a string has leading or trailing whitespace" $
-  "s" ~>
-  "chars" <~ Strings.toList (var "s") $
-  Logic.or
-    (Maybes.fromMaybe false (Maybes.map (lambda "c" $ Chars.isSpace (var "c")) (Lists.maybeHead (var "chars"))))
-    (Maybes.fromMaybe false (Maybes.map (lambda "c" $ Chars.isSpace (var "c")) (Lists.maybeLast (var "chars"))))
-
--- | Serialize a YAML node to a string
-hydraYamlToString :: TTermDefinition (YM.Node -> String)
-hydraYamlToString = define "hydraYamlToString" $
-  doc "Serialize a YAML node to a string" $
-  lambda "node" $ writeNode @@ var "node"
-
--- | Indent all lines of a string by 2 spaces
-indentString :: TTermDefinition (String -> String)
-indentString = define "indentString" $
-  doc "Indent all lines of a string by 2 spaces" $
-  "s" ~>
-  Strings.cat $ Lists.map
-    ("line" ~> Logic.ifElse (Strings.null $ var "line")
-      (string "")
-      (Strings.cat $ list [string "  ", var "line", string "\n"]))
-    (Strings.lines $ var "s")
-
--- | Check if a list of character codes represents a decimal number (digits.digits)
-isDecimalString :: TTermDefinition ([Int] -> Bool)
-isDecimalString = define "isDecimalString" $
-  doc "Check if character codes represent a decimal number" $
-  "chars" ~>
-  "dotCode" <~ int32 46 $  -- '.'
-  "parts" <~ Lists.span ("c" ~> Logic.not (Equality.equal (var "c") (var "dotCode"))) (var "chars") $
-  "before" <~ Pairs.first (var "parts") $
-  "afterWithDot" <~ Pairs.second (var "parts") $
-  -- Must have something before the dot
-  Logic.ifElse (Lists.null $ var "before") false $
-  -- Must have the dot
-  Logic.ifElse (Lists.null $ var "afterWithDot") false $
-  -- Drop the dot
-  "after" <~ Lists.drop (int32 1) (var "afterWithDot") $
-  -- Must have something after the dot
-  Logic.ifElse (Lists.null $ var "after") false $
-  -- Both parts must be all digits
-  "isDigitFn" <~ ("c" ~> Logic.and
-    (Equality.gte (var "c") (int32 48))
-    (Equality.lte (var "c") (int32 57))) $
-  Logic.and
-    (Lists.null (Lists.filter ("c" ~> Logic.not (var "isDigitFn" @@ var "c")) (var "before")))
-    (Lists.null (Lists.filter ("c" ~> Logic.not (var "isDigitFn" @@ var "c")) (var "after")))
-
--- | Check if a string looks like a number
-looksLikeNumber :: TTermDefinition (String -> Bool)
-looksLikeNumber = define "looksLikeNumber" $
-  doc "Check if a string looks like a number" $
-  "s" ~>
-  "chars" <~ Strings.toList (var "s") $
-  Maybes.fromMaybe false $ Maybes.map
-    (lambda "p" $ lets [
-      "firstCh">: Pairs.first (var "p"),
-      "tailCh">: Pairs.second (var "p"),
-      -- Handle leading minus
-      "rest">: Logic.ifElse (Equality.equal (var "firstCh") (int32 45))  -- '-'
-        (var "tailCh")
-        (var "chars"),
-      "isDigitFn">: "c" ~> Logic.and
-        (Equality.gte (var "c") (int32 48))   -- '0'
-        (Equality.lte (var "c") (int32 57)),  -- '9'
-      "allDigits">: Logic.and
-        (Logic.not (Lists.null (var "rest")))
-        (Lists.null (Lists.filter
-          ("c" ~> Logic.not (var "isDigitFn" @@ var "c"))
-          (var "rest")))] $
-      Logic.ifElse (var "allDigits") true $
-      -- Decimal?
-      isDecimalString @@ var "rest")
-    (Lists.uncons (var "chars"))
-
--- | Check if a string needs quoting in YAML
-needsQuoting :: TTermDefinition (String -> Bool)
-needsQuoting = define "needsQuoting" $
-  doc "Check if a string needs quoting in YAML" $
-  "s" ~>
-  -- Empty string needs quoting
-  Logic.ifElse (Strings.null $ var "s") true $
-  -- Reserved words need quoting
-  Logic.ifElse (Lists.elem (var "s") (var "hydra.yaml.serde.yamlReservedWords" :: TTerm [String])) true $
-  -- Looks like a number needs quoting
-  Logic.ifElse (looksLikeNumber @@ var "s") true $
-  -- Contains special characters needs quoting
-  "chars" <~ Strings.toList (var "s") $
-  "specials" <~ Strings.toList (var "hydra.yaml.serde.yamlSpecialChars" :: TTerm String) $
-  "hasSpecial" <~ Logic.not (Lists.null (Lists.filter
-    ("c" ~> Lists.elem (var "c" :: TTerm Int) (var "specials"))
-    (var "chars"))) $
-  Logic.ifElse (var "hasSpecial") true $
-  -- Leading or trailing space needs quoting
-  hasLeadingTrailingSpace @@ var "s"
-
--- | Write a mapping entry in block style (key: value\n)
-writeMappingEntry :: TTermDefinition ((YM.Node, YM.Node) -> String)
-writeMappingEntry = define "writeMappingEntry" $
-  doc "Write a mapping entry in block style" $
-  "entry" ~>
-  "key" <~ Pairs.first (var "entry") $
-  "value" <~ Pairs.second (var "entry") $
-  cases YM._Node (var "value") Nothing [
-    YM._Node_scalar>>: "s" ~> Strings.cat $ list [writeNodeInline @@ var "key", string ": ", writeScalar @@ var "s", string "\n"],
-    YM._Node_sequence>>: "items" ~>
-      Logic.ifElse (Lists.null $ var "items")
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ": []\n"])
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ":\n", indentString @@ (writeNode @@ var "value")]),
-    YM._Node_mapping>>: "m" ~>
-      Logic.ifElse (Equality.equal (Maps.size (var "m")) (int32 0))
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ": {}\n"])
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ":\n", indentString @@ (writeNode @@ var "value")])]
-
--- | Write a mapping entry for the first item of a sequence element
-writeMappingEntryInline :: TTermDefinition ((YM.Node, YM.Node) -> String)
-writeMappingEntryInline = define "writeMappingEntryInline" $
-  doc "Write a mapping entry for the first item of a sequence element" $
-  "entry" ~>
-  "key" <~ Pairs.first (var "entry") $
-  "value" <~ Pairs.second (var "entry") $
-  cases YM._Node (var "value") Nothing [
-    YM._Node_scalar>>: "s" ~> Strings.cat $ list [writeNodeInline @@ var "key", string ": ", writeScalar @@ var "s", string "\n"],
-    YM._Node_sequence>>: "items" ~>
-      Logic.ifElse (Lists.null $ var "items")
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ": []\n"])
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ":\n", indentString @@ (writeNode @@ var "value")]),
-    YM._Node_mapping>>: "m" ~>
-      Logic.ifElse (Equality.equal (Maps.size (var "m")) (int32 0))
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ": {}\n"])
-        (Strings.cat $ list [writeNodeInline @@ var "key", string ":\n", indentString @@ (writeNode @@ var "value")])]
-
--- | Write a YAML node as a top-level value (block style)
-writeNode :: TTermDefinition (YM.Node -> String)
-writeNode = define "writeNode" $
-  doc "Write a YAML node as a top-level value in block style" $
-  "node" ~> cases YM._Node (var "node") Nothing [
-    YM._Node_scalar>>: "s" ~> Strings.cat2 (writeScalar @@ var "s") (string "\n"),
-    YM._Node_sequence>>: "items" ~>
-      Logic.ifElse (Lists.null $ var "items")
-        (string "[]\n")
-        (Strings.cat $ Lists.map (lambda "item" $ writeSequenceItem @@ var "item") (var "items")),
-    YM._Node_mapping>>: "m" ~>
-      Logic.ifElse (Equality.equal (Maps.size (var "m")) (int32 0))
-        (string "{}\n")
-        (Strings.cat $ Lists.map (lambda "e" $ writeMappingEntry @@ var "e") (Maps.toList $ var "m"))]
-
--- | Write a node inline (for use as a mapping key)
-writeNodeInline :: TTermDefinition (YM.Node -> String)
-writeNodeInline = define "writeNodeInline" $
-  doc "Write a node inline (for use as a mapping key)" $
-  "node" ~> cases YM._Node (var "node") Nothing [
-    YM._Node_scalar>>: "s" ~> writeScalar @@ var "s",
-    YM._Node_sequence>>: "items" ~>
-      Strings.cat $ list [
-        string "[",
-        Strings.intercalate (string ", ") (Lists.map (lambda "item" $ writeNodeInline @@ var "item") (var "items")),
-        string "]"],
-    YM._Node_mapping>>: "m" ~>
-      "writeFlowEntry" <~ ("e" ~>
-        Strings.cat $ list [
-          writeNodeInline @@ (Pairs.first $ var "e"),
-          string ": ",
-          writeNodeInline @@ (Pairs.second $ var "e")]) $
-      Strings.cat $ list [
-        string "{",
-        Strings.intercalate (string ", ") (Lists.map (var "writeFlowEntry") (Maps.toList $ var "m")),
-        string "}"]]
-
--- | Write a scalar value
-writeScalar :: TTermDefinition (YM.Scalar -> String)
-writeScalar = define "writeScalar" $
-  doc "Write a scalar value" $
-  "s" ~> cases YM._Scalar (var "s") Nothing [
-    YM._Scalar_bool>>: "b" ~> Logic.ifElse (var "b") (string "true") (string "false"),
-    YM._Scalar_decimal>>: "d" ~> Literals.showDecimal (var "d"),
-    YM._Scalar_float>>: "f" ~> Literals.showBigfloat (var "f"),
-    YM._Scalar_int>>: "i" ~> Literals.showBigint (var "i"),
-    YM._Scalar_null>>: constant (string "null"),
-    YM._Scalar_str>>: "str" ~> writeString @@ var "str"]
-
--- | Write a sequence item in block style
-writeSequenceItem :: TTermDefinition (YM.Node -> String)
-writeSequenceItem = define "writeSequenceItem" $
-  doc "Write a sequence item in block style" $
-  "node" ~> cases YM._Node (var "node") Nothing [
-    YM._Node_scalar>>: "s" ~> Strings.cat $ list [string "- ", writeScalar @@ var "s", string "\n"],
-    YM._Node_sequence>>: "items" ~>
-      Logic.ifElse (Lists.null $ var "items")
-        (string "- []\n")
-        (Strings.cat2 (string "-\n") (indentString @@ (writeNode @@ var "node"))),
-    YM._Node_mapping>>: "m" ~>
-      Logic.ifElse (Equality.equal (Maps.size (var "m")) (int32 0))
-        (string "- {}\n")
-        ("entries" <~ Maps.toList (var "m") $
-         Maybes.fromMaybe (string "") $ Maybes.map
-           (lambda "p" $ lets [
-             "firstEntry">: Pairs.first (var "p"),
-             "restEntries">: Pairs.second (var "p"),
-             "firstStr">: writeMappingEntryInline @@ var "firstEntry",
-             "restStr">: Strings.cat $ Lists.map (lambda "e" $ writeMappingEntry @@ var "e") (var "restEntries")] $
-             Strings.cat $ list [string "- ", var "firstStr", indentString @@ var "restStr"])
-           (Lists.uncons (var "entries")))]
-
--- | Write a string value, quoting if necessary
-writeString :: TTermDefinition (String -> String)
-writeString = define "writeString" $
-  doc "Write a string value, quoting if necessary" $
-  "s" ~>
-  Logic.ifElse (needsQuoting @@ var "s")
-    (Strings.cat $ list [string "'", escapeSingleQuotes @@ var "s", string "'"])
-    (var "s")
-
--- | YAML reserved words that need quoting
-yamlReservedWords :: TTermDefinition [String]
-yamlReservedWords = define "yamlReservedWords" $
-  doc "YAML reserved words that need quoting" $
-  list [
-    string "true", string "false", string "null", string "~",
-    string "yes", string "no", string "on", string "off",
-    string "True", string "False", string "Null",
-    string "Yes", string "No", string "On", string "Off",
-    string "TRUE", string "FALSE", string "NULL",
-    string "YES", string "NO", string "ON", string "OFF"]
-
--- | YAML special characters that trigger quoting
-yamlSpecialChars :: TTermDefinition String
-yamlSpecialChars = define "yamlSpecialChars" $
-  doc "YAML special characters that trigger quoting" $
-  string ": {}[]#,&*!|>'\"%@`"
diff --git a/src/main/haskell/Hydra/Sql/Syntax.hs b/src/main/haskell/Hydra/Sql/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Sql/Syntax.hs
+++ /dev/null
@@ -1,1435 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A subset of ANSI SQL:2003, capturing selected productions of the BNF grammar provided at https://ronsavage.github.io/SQL/sql-2003-2.bnf.html, which is based on the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003
-
-module Hydra.Sql.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
-
-newtype ApproximateNumericLiteral =
-  ApproximateNumericLiteral {
-    unApproximateNumericLiteral :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ApproximateNumericLiteral = Core.Name "hydra.sql.syntax.ApproximateNumericLiteral"
-
-newtype BinaryStringLiteral =
-  BinaryStringLiteral {
-    unBinaryStringLiteral :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryStringLiteral = Core.Name "hydra.sql.syntax.BinaryStringLiteral"
-
-newtype CharacterStringLiteral =
-  CharacterStringLiteral {
-    unCharacterStringLiteral :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_CharacterStringLiteral = Core.Name "hydra.sql.syntax.CharacterStringLiteral"
-
-newtype ColumnName =
-  ColumnName {
-    unColumnName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnName = Core.Name "hydra.sql.syntax.ColumnName"
-
-newtype DateString =
-  DateString {
-    unDateString :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_DateString = Core.Name "hydra.sql.syntax.DateString"
-
-newtype DomainName =
-  DomainName {
-    unDomainName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_DomainName = Core.Name "hydra.sql.syntax.DomainName"
-
-newtype ExactNumericLiteral =
-  ExactNumericLiteral {
-    unExactNumericLiteral :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ExactNumericLiteral = Core.Name "hydra.sql.syntax.ExactNumericLiteral"
-
-newtype LeftBracketOrTrigraph =
-  LeftBracketOrTrigraph {
-    unLeftBracketOrTrigraph :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_LeftBracketOrTrigraph = Core.Name "hydra.sql.syntax.LeftBracketOrTrigraph"
-
-newtype RightBracketOrTrigraph =
-  RightBracketOrTrigraph {
-    unRightBracketOrTrigraph :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_RightBracketOrTrigraph = Core.Name "hydra.sql.syntax.RightBracketOrTrigraph"
-
-newtype NationalCharacterStringLiteral =
-  NationalCharacterStringLiteral {
-    unNationalCharacterStringLiteral :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NationalCharacterStringLiteral = Core.Name "hydra.sql.syntax.NationalCharacterStringLiteral"
-
-newtype PathResolvedUserDefinedTypeName =
-  PathResolvedUserDefinedTypeName {
-    unPathResolvedUserDefinedTypeName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_PathResolvedUserDefinedTypeName = Core.Name "hydra.sql.syntax.PathResolvedUserDefinedTypeName"
-
-newtype TableName =
-  TableName {
-    unTableName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_TableName = Core.Name "hydra.sql.syntax.TableName"
-
-newtype TimeString =
-  TimeString {
-    unTimeString :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_TimeString = Core.Name "hydra.sql.syntax.TimeString"
-
-newtype TimestampLiteral =
-  TimestampLiteral {
-    unTimestampLiteral :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_TimestampLiteral = Core.Name "hydra.sql.syntax.TimestampLiteral"
-
-newtype UnicodeCharacterStringLiteral =
-  UnicodeCharacterStringLiteral {
-    unUnicodeCharacterStringLiteral :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_UnicodeCharacterStringLiteral = Core.Name "hydra.sql.syntax.UnicodeCharacterStringLiteral"
-
-newtype UnsignedInteger =
-  UnsignedInteger {
-    unUnsignedInteger :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedInteger = Core.Name "hydra.sql.syntax.UnsignedInteger"
-
-data ApproximateNumericType =
-  ApproximateNumericTypeFloat (Maybe Precision) |
-  ApproximateNumericTypeReal  |
-  ApproximateNumericTypeDouble
-  deriving (Eq, Ord, Read, Show)
-
-_ApproximateNumericType = Core.Name "hydra.sql.syntax.ApproximateNumericType"
-
-_ApproximateNumericType_float = Core.Name "float"
-
-_ApproximateNumericType_real = Core.Name "real"
-
-_ApproximateNumericType_double = Core.Name "double"
-
-newtype ArrayElement =
-  ArrayElement {
-    unArrayElement :: ValueExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayElement = Core.Name "hydra.sql.syntax.ArrayElement"
-
-data ArrayElementList =
-  ArrayElementList {
-    arrayElementListFirst :: ArrayElement,
-    arrayElementListRest :: [ArrayElement]}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayElementList = Core.Name "hydra.sql.syntax.ArrayElementList"
-
-_ArrayElementList_first = Core.Name "first"
-
-_ArrayElementList_rest = Core.Name "rest"
-
-newtype ArrayElementReference =
-  ArrayElementReference {
-    unArrayElementReference :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayElementReference = Core.Name "hydra.sql.syntax.ArrayElementReference"
-
-newtype ArrayType =
-  ArrayType {
-    unArrayType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayType = Core.Name "hydra.sql.syntax.ArrayType"
-
-data ArrayValueConstructor =
-  ArrayValueConstructorEnumeration ArrayValueConstructorByEnumeration |
-  ArrayValueConstructorQuery ArrayValueConstructorByQuery
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayValueConstructor = Core.Name "hydra.sql.syntax.ArrayValueConstructor"
-
-_ArrayValueConstructor_enumeration = Core.Name "enumeration"
-
-_ArrayValueConstructor_query = Core.Name "query"
-
-newtype ArrayValueConstructorByQuery =
-  ArrayValueConstructorByQuery {
-    unArrayValueConstructorByQuery :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayValueConstructorByQuery = Core.Name "hydra.sql.syntax.ArrayValueConstructorByQuery"
-
-data ArrayValueConstructorByEnumeration =
-  ArrayValueConstructorByEnumeration {
-    arrayValueConstructorByEnumerationLeftBracketOrTrigraph :: LeftBracketOrTrigraph,
-    arrayValueConstructorByEnumerationArrayElementList :: ArrayElementList,
-    arrayValueConstructorByEnumerationRightBracketOrTrigraph :: RightBracketOrTrigraph}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayValueConstructorByEnumeration = Core.Name "hydra.sql.syntax.ArrayValueConstructorByEnumeration"
-
-_ArrayValueConstructorByEnumeration_LeftBracketOrTrigraph = Core.Name "LeftBracketOrTrigraph"
-
-_ArrayValueConstructorByEnumeration_ArrayElementList = Core.Name "ArrayElementList"
-
-_ArrayValueConstructorByEnumeration_RightBracketOrTrigraph = Core.Name "RightBracketOrTrigraph"
-
-newtype ArrayValueExpression =
-  ArrayValueExpression {
-    unArrayValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ArrayValueExpression = Core.Name "hydra.sql.syntax.ArrayValueExpression"
-
-newtype AsSubqueryClause =
-  AsSubqueryClause {
-    unAsSubqueryClause :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_AsSubqueryClause = Core.Name "hydra.sql.syntax.AsSubqueryClause"
-
-newtype AttributeOrMethodReference =
-  AttributeOrMethodReference {
-    unAttributeOrMethodReference :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_AttributeOrMethodReference = Core.Name "hydra.sql.syntax.AttributeOrMethodReference"
-
-data BinaryLargeObjectStringType =
-  BinaryLargeObjectStringTypeBinary (Maybe LargeObjectLength) |
-  BinaryLargeObjectStringTypeBlob (Maybe LargeObjectLength)
-  deriving (Eq, Ord, Read, Show)
-
-_BinaryLargeObjectStringType = Core.Name "hydra.sql.syntax.BinaryLargeObjectStringType"
-
-_BinaryLargeObjectStringType_binary = Core.Name "binary"
-
-_BinaryLargeObjectStringType_blob = Core.Name "blob"
-
-data BooleanFactor =
-  BooleanFactor {
-    booleanFactorNOT :: (Maybe ()),
-    booleanFactorBooleanTest :: BooleanTest}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanFactor = Core.Name "hydra.sql.syntax.BooleanFactor"
-
-_BooleanFactor_NOT = Core.Name "NOT"
-
-_BooleanFactor_BooleanTest = Core.Name "BooleanTest"
-
-data BooleanLiteral =
-  BooleanLiteralTRUE  |
-  BooleanLiteralFALSE  |
-  BooleanLiteralUNKNOWN
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanLiteral = Core.Name "hydra.sql.syntax.BooleanLiteral"
-
-_BooleanLiteral_TRUE = Core.Name "TRUE"
-
-_BooleanLiteral_FALSE = Core.Name "FALSE"
-
-_BooleanLiteral_UNKNOWN = Core.Name "UNKNOWN"
-
-newtype BooleanPredicand =
-  BooleanPredicand {
-    unBooleanPredicand :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanPredicand = Core.Name "hydra.sql.syntax.BooleanPredicand"
-
-data BooleanPrimary =
-  BooleanPrimaryPredicate Predicate |
-  BooleanPrimaryPredicand BooleanPredicand
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanPrimary = Core.Name "hydra.sql.syntax.BooleanPrimary"
-
-_BooleanPrimary_predicate = Core.Name "predicate"
-
-_BooleanPrimary_predicand = Core.Name "predicand"
-
-data BooleanTerm =
-  BooleanTermFactor BooleanFactor |
-  BooleanTermAnd BooleanTerm_And
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanTerm = Core.Name "hydra.sql.syntax.BooleanTerm"
-
-_BooleanTerm_factor = Core.Name "factor"
-
-_BooleanTerm_and = Core.Name "and"
-
-data BooleanTerm_And =
-  BooleanTerm_And {
-    booleanTerm_AndLhs :: BooleanTerm,
-    booleanTerm_AndRhs :: BooleanFactor}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanTerm_And = Core.Name "hydra.sql.syntax.BooleanTerm_And"
-
-_BooleanTerm_And_lhs = Core.Name "lhs"
-
-_BooleanTerm_And_rhs = Core.Name "rhs"
-
-data BooleanTest =
-  BooleanTest {
-    booleanTestBooleanPrimary :: BooleanPrimary,
-    booleanTestSequence :: (Maybe BooleanTest_Sequence_Option)}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanTest = Core.Name "hydra.sql.syntax.BooleanTest"
-
-_BooleanTest_BooleanPrimary = Core.Name "BooleanPrimary"
-
-_BooleanTest_Sequence = Core.Name "Sequence"
-
-data BooleanTest_Sequence_Option =
-  BooleanTest_Sequence_Option {
-    booleanTest_Sequence_OptionNOT :: (Maybe ()),
-    booleanTest_Sequence_OptionTruthValue :: TruthValue}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanTest_Sequence_Option = Core.Name "hydra.sql.syntax.BooleanTest_Sequence_Option"
-
-_BooleanTest_Sequence_Option_NOT = Core.Name "NOT"
-
-_BooleanTest_Sequence_Option_TruthValue = Core.Name "TruthValue"
-
-newtype BooleanType =
-  BooleanType {
-    unBooleanType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanType = Core.Name "hydra.sql.syntax.BooleanType"
-
-data BooleanValueExpression =
-  BooleanValueExpressionTerm BooleanTerm |
-  BooleanValueExpressionOr BooleanValueExpression_Or
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanValueExpression = Core.Name "hydra.sql.syntax.BooleanValueExpression"
-
-_BooleanValueExpression_term = Core.Name "term"
-
-_BooleanValueExpression_or = Core.Name "or"
-
-data BooleanValueExpression_Or =
-  BooleanValueExpression_Or {
-    booleanValueExpression_OrLhs :: BooleanValueExpression,
-    booleanValueExpression_OrRhs :: BooleanTerm}
-  deriving (Eq, Ord, Read, Show)
-
-_BooleanValueExpression_Or = Core.Name "hydra.sql.syntax.BooleanValueExpression_Or"
-
-_BooleanValueExpression_Or_lhs = Core.Name "lhs"
-
-_BooleanValueExpression_Or_rhs = Core.Name "rhs"
-
-newtype CaseExpression =
-  CaseExpression {
-    unCaseExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_CaseExpression = Core.Name "hydra.sql.syntax.CaseExpression"
-
-newtype CastSpecification =
-  CastSpecification {
-    unCastSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_CastSpecification = Core.Name "hydra.sql.syntax.CastSpecification"
-
-newtype CharacterSetSpecification =
-  CharacterSetSpecification {
-    unCharacterSetSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_CharacterSetSpecification = Core.Name "hydra.sql.syntax.CharacterSetSpecification"
-
-data CharacterStringType =
-  CharacterStringTypeCharacter (Maybe Length) |
-  CharacterStringTypeChar (Maybe Length) |
-  CharacterStringTypeCharacterVarying Length |
-  CharacterStringTypeCharVarying Length |
-  CharacterStringTypeVarchar Length |
-  CharacterStringTypeCharacterLargeObject (Maybe LargeObjectLength) |
-  CharacterStringTypeCharLargeObject (Maybe LargeObjectLength) |
-  CharacterStringTypeClob (Maybe LargeObjectLength)
-  deriving (Eq, Ord, Read, Show)
-
-_CharacterStringType = Core.Name "hydra.sql.syntax.CharacterStringType"
-
-_CharacterStringType_character = Core.Name "character"
-
-_CharacterStringType_char = Core.Name "char"
-
-_CharacterStringType_characterVarying = Core.Name "characterVarying"
-
-_CharacterStringType_charVarying = Core.Name "charVarying"
-
-_CharacterStringType_varchar = Core.Name "varchar"
-
-_CharacterStringType_characterLargeObject = Core.Name "characterLargeObject"
-
-_CharacterStringType_charLargeObject = Core.Name "charLargeObject"
-
-_CharacterStringType_clob = Core.Name "clob"
-
-newtype CollateClause =
-  CollateClause {
-    unCollateClause :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_CollateClause = Core.Name "hydra.sql.syntax.CollateClause"
-
-data CollectionType =
-  CollectionTypeArray ArrayType |
-  CollectionTypeMultiset MultisetType
-  deriving (Eq, Ord, Read, Show)
-
-_CollectionType = Core.Name "hydra.sql.syntax.CollectionType"
-
-_CollectionType_array = Core.Name "array"
-
-_CollectionType_multiset = Core.Name "multiset"
-
-data CollectionValueConstructor =
-  CollectionValueConstructorArray ArrayValueConstructor |
-  CollectionValueConstructorMultiset MultisetValueConstructor
-  deriving (Eq, Ord, Read, Show)
-
-_CollectionValueConstructor = Core.Name "hydra.sql.syntax.CollectionValueConstructor"
-
-_CollectionValueConstructor_array = Core.Name "array"
-
-_CollectionValueConstructor_multiset = Core.Name "multiset"
-
-data CollectionValueExpression =
-  CollectionValueExpressionArray ArrayValueExpression |
-  CollectionValueExpressionMultiset MultisetValueExpression
-  deriving (Eq, Ord, Read, Show)
-
-_CollectionValueExpression = Core.Name "hydra.sql.syntax.CollectionValueExpression"
-
-_CollectionValueExpression_array = Core.Name "array"
-
-_CollectionValueExpression_multiset = Core.Name "multiset"
-
-newtype ColumnConstraintDefinition =
-  ColumnConstraintDefinition {
-    unColumnConstraintDefinition :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnConstraintDefinition = Core.Name "hydra.sql.syntax.ColumnConstraintDefinition"
-
-data ColumnDefinition =
-  ColumnDefinition {
-    columnDefinitionName :: ColumnName,
-    columnDefinitionTypeOrDomain :: (Maybe ColumnDefinition_TypeOrDomain_Option),
-    columnDefinitionRefScope :: (Maybe ReferenceScopeCheck),
-    columnDefinitionDefaultOrIdentityOrGeneration :: (Maybe ColumnDefinition_DefaultOrIdentityOrGeneration_Option),
-    columnDefinitionConstraints :: [ColumnConstraintDefinition],
-    columnDefinitionCollate :: (Maybe CollateClause)}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnDefinition = Core.Name "hydra.sql.syntax.ColumnDefinition"
-
-_ColumnDefinition_name = Core.Name "name"
-
-_ColumnDefinition_typeOrDomain = Core.Name "typeOrDomain"
-
-_ColumnDefinition_refScope = Core.Name "refScope"
-
-_ColumnDefinition_defaultOrIdentityOrGeneration = Core.Name "defaultOrIdentityOrGeneration"
-
-_ColumnDefinition_constraints = Core.Name "constraints"
-
-_ColumnDefinition_collate = Core.Name "collate"
-
-data ColumnDefinition_TypeOrDomain_Option =
-  ColumnDefinition_TypeOrDomain_OptionDataType DataType |
-  ColumnDefinition_TypeOrDomain_OptionDomainName DomainName
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnDefinition_TypeOrDomain_Option = Core.Name "hydra.sql.syntax.ColumnDefinition_TypeOrDomain_Option"
-
-_ColumnDefinition_TypeOrDomain_Option_DataType = Core.Name "DataType"
-
-_ColumnDefinition_TypeOrDomain_Option_DomainName = Core.Name "DomainName"
-
-data ColumnDefinition_DefaultOrIdentityOrGeneration_Option =
-  ColumnDefinition_DefaultOrIdentityOrGeneration_OptionDefaultClause DefaultClause |
-  ColumnDefinition_DefaultOrIdentityOrGeneration_OptionIdentityColumnSpecification IdentityColumnSpecification |
-  ColumnDefinition_DefaultOrIdentityOrGeneration_OptionGenerationClause GenerationClause
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option =
-    Core.Name "hydra.sql.syntax.ColumnDefinition_DefaultOrIdentityOrGeneration_Option"
-
-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option_DefaultClause = Core.Name "DefaultClause"
-
-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option_IdentityColumnSpecification =
-    Core.Name "IdentityColumnSpecification"
-
-_ColumnDefinition_DefaultOrIdentityOrGeneration_Option_GenerationClause = Core.Name "GenerationClause"
-
-data ColumnNameList =
-  ColumnNameList {
-    columnNameListFirst :: ColumnName,
-    columnNameListRest :: [ColumnName]}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnNameList = Core.Name "hydra.sql.syntax.ColumnNameList"
-
-_ColumnNameList_first = Core.Name "first"
-
-_ColumnNameList_rest = Core.Name "rest"
-
-newtype ColumnOptions =
-  ColumnOptions {
-    unColumnOptions :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnOptions = Core.Name "hydra.sql.syntax.ColumnOptions"
-
-newtype ColumnReference =
-  ColumnReference {
-    unColumnReference :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ColumnReference = Core.Name "hydra.sql.syntax.ColumnReference"
-
-data CommonValueExpression =
-  CommonValueExpressionNumeric NumericValueExpression |
-  CommonValueExpressionString StringValueExpression |
-  CommonValueExpressionDatetime DatetimeValueExpression |
-  CommonValueExpressionInterval IntervalValueExpression |
-  CommonValueExpressionUserDefined UserDefinedTypeValueExpression |
-  CommonValueExpressionReference ReferenceValueExpression |
-  CommonValueExpressionCollection CollectionValueExpression
-  deriving (Eq, Ord, Read, Show)
-
-_CommonValueExpression = Core.Name "hydra.sql.syntax.CommonValueExpression"
-
-_CommonValueExpression_numeric = Core.Name "numeric"
-
-_CommonValueExpression_string = Core.Name "string"
-
-_CommonValueExpression_datetime = Core.Name "datetime"
-
-_CommonValueExpression_interval = Core.Name "interval"
-
-_CommonValueExpression_userDefined = Core.Name "userDefined"
-
-_CommonValueExpression_reference = Core.Name "reference"
-
-_CommonValueExpression_collection = Core.Name "collection"
-
-data ContextuallyTypedRowValueExpression =
-  ContextuallyTypedRowValueExpressionSpecialCase RowValueSpecialCase |
-  ContextuallyTypedRowValueExpressionConstructor ContextuallyTypedRowValueConstructor
-  deriving (Eq, Ord, Read, Show)
-
-_ContextuallyTypedRowValueExpression = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpression"
-
-_ContextuallyTypedRowValueExpression_specialCase = Core.Name "specialCase"
-
-_ContextuallyTypedRowValueExpression_constructor = Core.Name "constructor"
-
-newtype ContextuallyTypedRowValueConstructor =
-  ContextuallyTypedRowValueConstructor {
-    unContextuallyTypedRowValueConstructor :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ContextuallyTypedRowValueConstructor = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueConstructor"
-
-data ContextuallyTypedRowValueExpressionList =
-  ContextuallyTypedRowValueExpressionList {
-    contextuallyTypedRowValueExpressionListFirst :: ContextuallyTypedRowValueExpression,
-    contextuallyTypedRowValueExpressionListRest :: [ContextuallyTypedRowValueExpression]}
-  deriving (Eq, Ord, Read, Show)
-
-_ContextuallyTypedRowValueExpressionList = Core.Name "hydra.sql.syntax.ContextuallyTypedRowValueExpressionList"
-
-_ContextuallyTypedRowValueExpressionList_first = Core.Name "first"
-
-_ContextuallyTypedRowValueExpressionList_rest = Core.Name "rest"
-
-newtype ContextuallyTypedTableValueConstructor =
-  ContextuallyTypedTableValueConstructor {
-    unContextuallyTypedTableValueConstructor :: ContextuallyTypedRowValueExpressionList}
-  deriving (Eq, Ord, Read, Show)
-
-_ContextuallyTypedTableValueConstructor = Core.Name "hydra.sql.syntax.ContextuallyTypedTableValueConstructor"
-
-data DataType =
-  DataTypePredefined PredefinedType |
-  DataTypeRow RowType |
-  DataTypeNamed PathResolvedUserDefinedTypeName |
-  DataTypeReference ReferenceType |
-  DataTypeCollection CollectionType
-  deriving (Eq, Ord, Read, Show)
-
-_DataType = Core.Name "hydra.sql.syntax.DataType"
-
-_DataType_predefined = Core.Name "predefined"
-
-_DataType_row = Core.Name "row"
-
-_DataType_named = Core.Name "named"
-
-_DataType_reference = Core.Name "reference"
-
-_DataType_collection = Core.Name "collection"
-
-newtype DateLiteral =
-  DateLiteral {
-    unDateLiteral :: DateString}
-  deriving (Eq, Ord, Read, Show)
-
-_DateLiteral = Core.Name "hydra.sql.syntax.DateLiteral"
-
-data DatetimeLiteral =
-  DatetimeLiteralDate DateLiteral |
-  DatetimeLiteralTime TimeLiteral |
-  DatetimeLiteralTimestamp TimestampLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_DatetimeLiteral = Core.Name "hydra.sql.syntax.DatetimeLiteral"
-
-_DatetimeLiteral_date = Core.Name "date"
-
-_DatetimeLiteral_time = Core.Name "time"
-
-_DatetimeLiteral_timestamp = Core.Name "timestamp"
-
-newtype DatetimeType =
-  DatetimeType {
-    unDatetimeType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_DatetimeType = Core.Name "hydra.sql.syntax.DatetimeType"
-
-newtype DatetimeValueExpression =
-  DatetimeValueExpression {
-    unDatetimeValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_DatetimeValueExpression = Core.Name "hydra.sql.syntax.DatetimeValueExpression"
-
-newtype DefaultClause =
-  DefaultClause {
-    unDefaultClause :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_DefaultClause = Core.Name "hydra.sql.syntax.DefaultClause"
-
-data ExactNumericType =
-  ExactNumericTypeNumeric (Maybe ExactNumericType_Numeric_Option) |
-  ExactNumericTypeDecimal (Maybe ExactNumericType_Decimal_Option) |
-  ExactNumericTypeDec (Maybe ExactNumericType_Dec_Option) |
-  ExactNumericTypeSmallint  |
-  ExactNumericTypeInteger  |
-  ExactNumericTypeInt  |
-  ExactNumericTypeBigint
-  deriving (Eq, Ord, Read, Show)
-
-_ExactNumericType = Core.Name "hydra.sql.syntax.ExactNumericType"
-
-_ExactNumericType_numeric = Core.Name "numeric"
-
-_ExactNumericType_decimal = Core.Name "decimal"
-
-_ExactNumericType_dec = Core.Name "dec"
-
-_ExactNumericType_smallint = Core.Name "smallint"
-
-_ExactNumericType_integer = Core.Name "integer"
-
-_ExactNumericType_int = Core.Name "int"
-
-_ExactNumericType_bigint = Core.Name "bigint"
-
-data ExactNumericType_Numeric_Option =
-  ExactNumericType_Numeric_Option {
-    exactNumericType_Numeric_OptionPrecision :: Precision,
-    exactNumericType_Numeric_OptionSequence :: (Maybe Scale)}
-  deriving (Eq, Ord, Read, Show)
-
-_ExactNumericType_Numeric_Option = Core.Name "hydra.sql.syntax.ExactNumericType_Numeric_Option"
-
-_ExactNumericType_Numeric_Option_Precision = Core.Name "Precision"
-
-_ExactNumericType_Numeric_Option_Sequence = Core.Name "Sequence"
-
-data ExactNumericType_Decimal_Option =
-  ExactNumericType_Decimal_Option {
-    exactNumericType_Decimal_OptionPrecision :: Precision,
-    exactNumericType_Decimal_OptionSequence :: (Maybe Scale)}
-  deriving (Eq, Ord, Read, Show)
-
-_ExactNumericType_Decimal_Option = Core.Name "hydra.sql.syntax.ExactNumericType_Decimal_Option"
-
-_ExactNumericType_Decimal_Option_Precision = Core.Name "Precision"
-
-_ExactNumericType_Decimal_Option_Sequence = Core.Name "Sequence"
-
-data ExactNumericType_Dec_Option =
-  ExactNumericType_Dec_Option {
-    exactNumericType_Dec_OptionPrecision :: Precision,
-    exactNumericType_Dec_OptionSequence :: (Maybe Scale)}
-  deriving (Eq, Ord, Read, Show)
-
-_ExactNumericType_Dec_Option = Core.Name "hydra.sql.syntax.ExactNumericType_Dec_Option"
-
-_ExactNumericType_Dec_Option_Precision = Core.Name "Precision"
-
-_ExactNumericType_Dec_Option_Sequence = Core.Name "Sequence"
-
-newtype FieldReference =
-  FieldReference {
-    unFieldReference :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_FieldReference = Core.Name "hydra.sql.syntax.FieldReference"
-
-data FromConstructor =
-  FromConstructor {
-    fromConstructorColumns :: (Maybe InsertColumnList),
-    fromConstructorOverride :: (Maybe OverrideClause),
-    fromConstructorValues :: ContextuallyTypedTableValueConstructor}
-  deriving (Eq, Ord, Read, Show)
-
-_FromConstructor = Core.Name "hydra.sql.syntax.FromConstructor"
-
-_FromConstructor_columns = Core.Name "columns"
-
-_FromConstructor_override = Core.Name "override"
-
-_FromConstructor_values = Core.Name "values"
-
-newtype FromDefault =
-  FromDefault {
-    unFromDefault :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_FromDefault = Core.Name "hydra.sql.syntax.FromDefault"
-
-newtype FromSubquery =
-  FromSubquery {
-    unFromSubquery :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_FromSubquery = Core.Name "hydra.sql.syntax.FromSubquery"
-
-data GeneralLiteral =
-  GeneralLiteralString CharacterStringLiteral |
-  GeneralLiteralNationalString NationalCharacterStringLiteral |
-  GeneralLiteralUnicode UnicodeCharacterStringLiteral |
-  GeneralLiteralBinary BinaryStringLiteral |
-  GeneralLiteralDateTime DatetimeLiteral |
-  GeneralLiteralInterval IntervalLiteral |
-  GeneralLiteralBoolean BooleanLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_GeneralLiteral = Core.Name "hydra.sql.syntax.GeneralLiteral"
-
-_GeneralLiteral_string = Core.Name "string"
-
-_GeneralLiteral_nationalString = Core.Name "nationalString"
-
-_GeneralLiteral_unicode = Core.Name "unicode"
-
-_GeneralLiteral_binary = Core.Name "binary"
-
-_GeneralLiteral_dateTime = Core.Name "dateTime"
-
-_GeneralLiteral_interval = Core.Name "interval"
-
-_GeneralLiteral_boolean = Core.Name "boolean"
-
-newtype GeneralValueSpecification =
-  GeneralValueSpecification {
-    unGeneralValueSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_GeneralValueSpecification = Core.Name "hydra.sql.syntax.GeneralValueSpecification"
-
-newtype GenerationClause =
-  GenerationClause {
-    unGenerationClause :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_GenerationClause = Core.Name "hydra.sql.syntax.GenerationClause"
-
-data GlobalOrLocal =
-  GlobalOrLocalGlobal  |
-  GlobalOrLocalLocal
-  deriving (Eq, Ord, Read, Show)
-
-_GlobalOrLocal = Core.Name "hydra.sql.syntax.GlobalOrLocal"
-
-_GlobalOrLocal_global = Core.Name "global"
-
-_GlobalOrLocal_local = Core.Name "local"
-
-newtype IdentityColumnSpecification =
-  IdentityColumnSpecification {
-    unIdentityColumnSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_IdentityColumnSpecification = Core.Name "hydra.sql.syntax.IdentityColumnSpecification"
-
-newtype InsertColumnList =
-  InsertColumnList {
-    unInsertColumnList :: ColumnNameList}
-  deriving (Eq, Ord, Read, Show)
-
-_InsertColumnList = Core.Name "hydra.sql.syntax.InsertColumnList"
-
-data InsertColumnsAndSource =
-  InsertColumnsAndSourceSubquery FromSubquery |
-  InsertColumnsAndSourceConstructor FromConstructor |
-  InsertColumnsAndSourceDefault FromDefault
-  deriving (Eq, Ord, Read, Show)
-
-_InsertColumnsAndSource = Core.Name "hydra.sql.syntax.InsertColumnsAndSource"
-
-_InsertColumnsAndSource_subquery = Core.Name "subquery"
-
-_InsertColumnsAndSource_constructor = Core.Name "constructor"
-
-_InsertColumnsAndSource_default = Core.Name "default"
-
-data InsertStatement =
-  InsertStatement {
-    insertStatementTarget :: InsertionTarget,
-    insertStatementColumnsAndSource :: InsertColumnsAndSource}
-  deriving (Eq, Ord, Read, Show)
-
-_InsertStatement = Core.Name "hydra.sql.syntax.InsertStatement"
-
-_InsertStatement_target = Core.Name "target"
-
-_InsertStatement_columnsAndSource = Core.Name "columnsAndSource"
-
-newtype InsertionTarget =
-  InsertionTarget {
-    unInsertionTarget :: TableName}
-  deriving (Eq, Ord, Read, Show)
-
-_InsertionTarget = Core.Name "hydra.sql.syntax.InsertionTarget"
-
-newtype IntervalLiteral =
-  IntervalLiteral {
-    unIntervalLiteral :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_IntervalLiteral = Core.Name "hydra.sql.syntax.IntervalLiteral"
-
-newtype IntervalType =
-  IntervalType {
-    unIntervalType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_IntervalType = Core.Name "hydra.sql.syntax.IntervalType"
-
-newtype IntervalValueExpression =
-  IntervalValueExpression {
-    unIntervalValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_IntervalValueExpression = Core.Name "hydra.sql.syntax.IntervalValueExpression"
-
-newtype LargeObjectLength =
-  LargeObjectLength {
-    unLargeObjectLength :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_LargeObjectLength = Core.Name "hydra.sql.syntax.LargeObjectLength"
-
-newtype Length =
-  Length {
-    unLength :: UnsignedInteger}
-  deriving (Eq, Ord, Read, Show)
-
-_Length = Core.Name "hydra.sql.syntax.Length"
-
-newtype LikeClause =
-  LikeClause {
-    unLikeClause :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_LikeClause = Core.Name "hydra.sql.syntax.LikeClause"
-
-newtype MethodInvocation =
-  MethodInvocation {
-    unMethodInvocation :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_MethodInvocation = Core.Name "hydra.sql.syntax.MethodInvocation"
-
-newtype MultisetElementReference =
-  MultisetElementReference {
-    unMultisetElementReference :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_MultisetElementReference = Core.Name "hydra.sql.syntax.MultisetElementReference"
-
-newtype MultisetType =
-  MultisetType {
-    unMultisetType :: DataType}
-  deriving (Eq, Ord, Read, Show)
-
-_MultisetType = Core.Name "hydra.sql.syntax.MultisetType"
-
-newtype MultisetValueConstructor =
-  MultisetValueConstructor {
-    unMultisetValueConstructor :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_MultisetValueConstructor = Core.Name "hydra.sql.syntax.MultisetValueConstructor"
-
-newtype MultisetValueExpression =
-  MultisetValueExpression {
-    unMultisetValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_MultisetValueExpression = Core.Name "hydra.sql.syntax.MultisetValueExpression"
-
-newtype NationalCharacterStringType =
-  NationalCharacterStringType {
-    unNationalCharacterStringType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NationalCharacterStringType = Core.Name "hydra.sql.syntax.NationalCharacterStringType"
-
-newtype NewSpecification =
-  NewSpecification {
-    unNewSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NewSpecification = Core.Name "hydra.sql.syntax.NewSpecification"
-
-newtype NextValueExpression =
-  NextValueExpression {
-    unNextValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NextValueExpression = Core.Name "hydra.sql.syntax.NextValueExpression"
-
-data NumericType =
-  NumericTypeExact ExactNumericType |
-  NumericTypeApproximate ApproximateNumericType
-  deriving (Eq, Ord, Read, Show)
-
-_NumericType = Core.Name "hydra.sql.syntax.NumericType"
-
-_NumericType_exact = Core.Name "exact"
-
-_NumericType_approximate = Core.Name "approximate"
-
-newtype NumericValueExpression =
-  NumericValueExpression {
-    unNumericValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_NumericValueExpression = Core.Name "hydra.sql.syntax.NumericValueExpression"
-
-data OverrideClause =
-  OverrideClauseOVERRIDINGspUSERspVALUE  |
-  OverrideClauseOVERRIDINGspSYSTEMspVALUE
-  deriving (Eq, Ord, Read, Show)
-
-_OverrideClause = Core.Name "hydra.sql.syntax.OverrideClause"
-
-_OverrideClause_OVERRIDINGspUSERspVALUE = Core.Name "OVERRIDINGspUSERspVALUE"
-
-_OverrideClause_OVERRIDINGspSYSTEMspVALUE = Core.Name "OVERRIDINGspSYSTEMspVALUE"
-
-newtype ParenthesizedValueExpression =
-  ParenthesizedValueExpression {
-    unParenthesizedValueExpression :: ValueExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_ParenthesizedValueExpression = Core.Name "hydra.sql.syntax.ParenthesizedValueExpression"
-
-newtype Precision =
-  Precision {
-    unPrecision :: UnsignedInteger}
-  deriving (Eq, Ord, Read, Show)
-
-_Precision = Core.Name "hydra.sql.syntax.Precision"
-
-data PredefinedType =
-  PredefinedTypeString PredefinedType_String |
-  PredefinedTypeNationalString PredefinedType_NationalString |
-  PredefinedTypeBlob BinaryLargeObjectStringType |
-  PredefinedTypeNumeric NumericType |
-  PredefinedTypeBoolean BooleanType |
-  PredefinedTypeDatetime DatetimeType |
-  PredefinedTypeInterval IntervalType
-  deriving (Eq, Ord, Read, Show)
-
-_PredefinedType = Core.Name "hydra.sql.syntax.PredefinedType"
-
-_PredefinedType_string = Core.Name "string"
-
-_PredefinedType_nationalString = Core.Name "nationalString"
-
-_PredefinedType_blob = Core.Name "blob"
-
-_PredefinedType_numeric = Core.Name "numeric"
-
-_PredefinedType_boolean = Core.Name "boolean"
-
-_PredefinedType_datetime = Core.Name "datetime"
-
-_PredefinedType_interval = Core.Name "interval"
-
-data PredefinedType_String =
-  PredefinedType_String {
-    predefinedType_StringType :: CharacterStringType,
-    predefinedType_StringCharacters :: (Maybe CharacterSetSpecification),
-    predefinedType_StringCollate :: (Maybe CollateClause)}
-  deriving (Eq, Ord, Read, Show)
-
-_PredefinedType_String = Core.Name "hydra.sql.syntax.PredefinedType_String"
-
-_PredefinedType_String_type = Core.Name "type"
-
-_PredefinedType_String_characters = Core.Name "characters"
-
-_PredefinedType_String_collate = Core.Name "collate"
-
-data PredefinedType_NationalString =
-  PredefinedType_NationalString {
-    predefinedType_NationalStringType :: NationalCharacterStringType,
-    predefinedType_NationalStringCollate :: (Maybe CollateClause)}
-  deriving (Eq, Ord, Read, Show)
-
-_PredefinedType_NationalString = Core.Name "hydra.sql.syntax.PredefinedType_NationalString"
-
-_PredefinedType_NationalString_type = Core.Name "type"
-
-_PredefinedType_NationalString_collate = Core.Name "collate"
-
-newtype Predicate =
-  Predicate {
-    unPredicate :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_Predicate = Core.Name "hydra.sql.syntax.Predicate"
-
-newtype QueryExpression =
-  QueryExpression {
-    unQueryExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_QueryExpression = Core.Name "hydra.sql.syntax.QueryExpression"
-
-newtype ReferenceScopeCheck =
-  ReferenceScopeCheck {
-    unReferenceScopeCheck :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceScopeCheck = Core.Name "hydra.sql.syntax.ReferenceScopeCheck"
-
-newtype ReferenceType =
-  ReferenceType {
-    unReferenceType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceType = Core.Name "hydra.sql.syntax.ReferenceType"
-
-newtype RowType =
-  RowType {
-    unRowType :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_RowType = Core.Name "hydra.sql.syntax.RowType"
-
-newtype RowValueSpecialCase =
-  RowValueSpecialCase {
-    unRowValueSpecialCase :: NonparenthesizedValueExpressionPrimary}
-  deriving (Eq, Ord, Read, Show)
-
-_RowValueSpecialCase = Core.Name "hydra.sql.syntax.RowValueSpecialCase"
-
-data NonparenthesizedValueExpressionPrimary =
-  NonparenthesizedValueExpressionPrimaryUnsigned UnsignedValueSpecification |
-  NonparenthesizedValueExpressionPrimaryColumn ColumnReference |
-  NonparenthesizedValueExpressionPrimarySetFunction SetFunctionSpecification |
-  NonparenthesizedValueExpressionPrimaryWindowFunction WindowFunction |
-  NonparenthesizedValueExpressionPrimaryScalarSubquery ScalarSubquery |
-  NonparenthesizedValueExpressionPrimaryCases CaseExpression |
-  NonparenthesizedValueExpressionPrimaryCast CastSpecification |
-  NonparenthesizedValueExpressionPrimaryField FieldReference |
-  NonparenthesizedValueExpressionPrimarySubtype SubtypeTreatment |
-  NonparenthesizedValueExpressionPrimaryMethod MethodInvocation |
-  NonparenthesizedValueExpressionPrimaryStaticMethod StaticMethodInvocation |
-  NonparenthesizedValueExpressionPrimaryNew NewSpecification |
-  NonparenthesizedValueExpressionPrimaryAttributeOrMethod AttributeOrMethodReference |
-  NonparenthesizedValueExpressionPrimaryReference ReferenceResolution |
-  NonparenthesizedValueExpressionPrimaryCollection CollectionValueConstructor |
-  NonparenthesizedValueExpressionPrimaryArrayElement ArrayElementReference |
-  NonparenthesizedValueExpressionPrimaryMultisetElement MultisetElementReference |
-  NonparenthesizedValueExpressionPrimaryRoutine RoutineInvocation |
-  NonparenthesizedValueExpressionPrimaryNext NextValueExpression
-  deriving (Eq, Ord, Read, Show)
-
-_NonparenthesizedValueExpressionPrimary = Core.Name "hydra.sql.syntax.NonparenthesizedValueExpressionPrimary"
-
-_NonparenthesizedValueExpressionPrimary_unsigned = Core.Name "unsigned"
-
-_NonparenthesizedValueExpressionPrimary_column = Core.Name "column"
-
-_NonparenthesizedValueExpressionPrimary_setFunction = Core.Name "setFunction"
-
-_NonparenthesizedValueExpressionPrimary_windowFunction = Core.Name "windowFunction"
-
-_NonparenthesizedValueExpressionPrimary_scalarSubquery = Core.Name "scalarSubquery"
-
-_NonparenthesizedValueExpressionPrimary_cases = Core.Name "cases"
-
-_NonparenthesizedValueExpressionPrimary_cast = Core.Name "cast"
-
-_NonparenthesizedValueExpressionPrimary_field = Core.Name "field"
-
-_NonparenthesizedValueExpressionPrimary_subtype = Core.Name "subtype"
-
-_NonparenthesizedValueExpressionPrimary_method = Core.Name "method"
-
-_NonparenthesizedValueExpressionPrimary_staticMethod = Core.Name "staticMethod"
-
-_NonparenthesizedValueExpressionPrimary_new = Core.Name "new"
-
-_NonparenthesizedValueExpressionPrimary_attributeOrMethod = Core.Name "attributeOrMethod"
-
-_NonparenthesizedValueExpressionPrimary_reference = Core.Name "reference"
-
-_NonparenthesizedValueExpressionPrimary_collection = Core.Name "collection"
-
-_NonparenthesizedValueExpressionPrimary_arrayElement = Core.Name "arrayElement"
-
-_NonparenthesizedValueExpressionPrimary_multisetElement = Core.Name "multisetElement"
-
-_NonparenthesizedValueExpressionPrimary_routine = Core.Name "routine"
-
-_NonparenthesizedValueExpressionPrimary_next = Core.Name "next"
-
-newtype ReferenceResolution =
-  ReferenceResolution {
-    unReferenceResolution :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceResolution = Core.Name "hydra.sql.syntax.ReferenceResolution"
-
-newtype ReferenceValueExpression =
-  ReferenceValueExpression {
-    unReferenceValueExpression :: ValueExpressionPrimary}
-  deriving (Eq, Ord, Read, Show)
-
-_ReferenceValueExpression = Core.Name "hydra.sql.syntax.ReferenceValueExpression"
-
-newtype RowValueExpression =
-  RowValueExpression {
-    unRowValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_RowValueExpression = Core.Name "hydra.sql.syntax.RowValueExpression"
-
-newtype RoutineInvocation =
-  RoutineInvocation {
-    unRoutineInvocation :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_RoutineInvocation = Core.Name "hydra.sql.syntax.RoutineInvocation"
-
-newtype ScalarSubquery =
-  ScalarSubquery {
-    unScalarSubquery :: Subquery}
-  deriving (Eq, Ord, Read, Show)
-
-_ScalarSubquery = Core.Name "hydra.sql.syntax.ScalarSubquery"
-
-newtype Scale =
-  Scale {
-    unScale :: UnsignedInteger}
-  deriving (Eq, Ord, Read, Show)
-
-_Scale = Core.Name "hydra.sql.syntax.Scale"
-
-newtype SelfReferencingColumnSpecification =
-  SelfReferencingColumnSpecification {
-    unSelfReferencingColumnSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_SelfReferencingColumnSpecification = Core.Name "hydra.sql.syntax.SelfReferencingColumnSpecification"
-
-newtype SetFunctionSpecification =
-  SetFunctionSpecification {
-    unSetFunctionSpecification :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_SetFunctionSpecification = Core.Name "hydra.sql.syntax.SetFunctionSpecification"
-
-newtype StaticMethodInvocation =
-  StaticMethodInvocation {
-    unStaticMethodInvocation :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_StaticMethodInvocation = Core.Name "hydra.sql.syntax.StaticMethodInvocation"
-
-newtype StringValueExpression =
-  StringValueExpression {
-    unStringValueExpression :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_StringValueExpression = Core.Name "hydra.sql.syntax.StringValueExpression"
-
-newtype Subquery =
-  Subquery {
-    unSubquery :: QueryExpression}
-  deriving (Eq, Ord, Read, Show)
-
-_Subquery = Core.Name "hydra.sql.syntax.Subquery"
-
-newtype SubtableClause =
-  SubtableClause {
-    unSubtableClause :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_SubtableClause = Core.Name "hydra.sql.syntax.SubtableClause"
-
-newtype SubtypeTreatment =
-  SubtypeTreatment {
-    unSubtypeTreatment :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_SubtypeTreatment = Core.Name "hydra.sql.syntax.SubtypeTreatment"
-
-data TableCommitAction =
-  TableCommitActionPreserve  |
-  TableCommitActionDelete
-  deriving (Eq, Ord, Read, Show)
-
-_TableCommitAction = Core.Name "hydra.sql.syntax.TableCommitAction"
-
-_TableCommitAction_preserve = Core.Name "preserve"
-
-_TableCommitAction_delete = Core.Name "delete"
-
-newtype TableConstraintDefinition =
-  TableConstraintDefinition {
-    unTableConstraintDefinition :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_TableConstraintDefinition = Core.Name "hydra.sql.syntax.TableConstraintDefinition"
-
-data TableContentsSource =
-  TableContentsSourceList TableElementList |
-  TableContentsSourceSubtable TableContentsSource_Subtable |
-  TableContentsSourceSubquery AsSubqueryClause
-  deriving (Eq, Ord, Read, Show)
-
-_TableContentsSource = Core.Name "hydra.sql.syntax.TableContentsSource"
-
-_TableContentsSource_list = Core.Name "list"
-
-_TableContentsSource_subtable = Core.Name "subtable"
-
-_TableContentsSource_subquery = Core.Name "subquery"
-
-data TableContentsSource_Subtable =
-  TableContentsSource_Subtable {
-    tableContentsSource_SubtableType :: PathResolvedUserDefinedTypeName,
-    tableContentsSource_SubtableSubtable :: (Maybe SubtableClause),
-    tableContentsSource_SubtableElements :: (Maybe TableElementList)}
-  deriving (Eq, Ord, Read, Show)
-
-_TableContentsSource_Subtable = Core.Name "hydra.sql.syntax.TableContentsSource_Subtable"
-
-_TableContentsSource_Subtable_type = Core.Name "type"
-
-_TableContentsSource_Subtable_subtable = Core.Name "subtable"
-
-_TableContentsSource_Subtable_elements = Core.Name "elements"
-
-data TableDefinition =
-  TableDefinition {
-    tableDefinitionScope :: (Maybe TableScope),
-    tableDefinitionName :: TableName,
-    tableDefinitionSource :: TableContentsSource,
-    tableDefinitionCommitActions :: (Maybe TableCommitAction)}
-  deriving (Eq, Ord, Read, Show)
-
-_TableDefinition = Core.Name "hydra.sql.syntax.TableDefinition"
-
-_TableDefinition_scope = Core.Name "scope"
-
-_TableDefinition_name = Core.Name "name"
-
-_TableDefinition_source = Core.Name "source"
-
-_TableDefinition_commitActions = Core.Name "commitActions"
-
-data TableElement =
-  TableElementColumn ColumnDefinition |
-  TableElementTableConstraint TableConstraintDefinition |
-  TableElementLike LikeClause |
-  TableElementSelfReferencingColumn SelfReferencingColumnSpecification |
-  TableElementColumOptions ColumnOptions
-  deriving (Eq, Ord, Read, Show)
-
-_TableElement = Core.Name "hydra.sql.syntax.TableElement"
-
-_TableElement_column = Core.Name "column"
-
-_TableElement_tableConstraint = Core.Name "tableConstraint"
-
-_TableElement_like = Core.Name "like"
-
-_TableElement_selfReferencingColumn = Core.Name "selfReferencingColumn"
-
-_TableElement_columOptions = Core.Name "columOptions"
-
-data TableElementList =
-  TableElementList {
-    tableElementListFirst :: TableElement,
-    tableElementListRest :: [TableElement]}
-  deriving (Eq, Ord, Read, Show)
-
-_TableElementList = Core.Name "hydra.sql.syntax.TableElementList"
-
-_TableElementList_first = Core.Name "first"
-
-_TableElementList_rest = Core.Name "rest"
-
-newtype TableScope =
-  TableScope {
-    unTableScope :: GlobalOrLocal}
-  deriving (Eq, Ord, Read, Show)
-
-_TableScope = Core.Name "hydra.sql.syntax.TableScope"
-
-newtype TimeLiteral =
-  TimeLiteral {
-    unTimeLiteral :: TimeString}
-  deriving (Eq, Ord, Read, Show)
-
-_TimeLiteral = Core.Name "hydra.sql.syntax.TimeLiteral"
-
-data TruthValue =
-  TruthValueTRUE  |
-  TruthValueFALSE  |
-  TruthValueUNKNOWN
-  deriving (Eq, Ord, Read, Show)
-
-_TruthValue = Core.Name "hydra.sql.syntax.TruthValue"
-
-_TruthValue_TRUE = Core.Name "TRUE"
-
-_TruthValue_FALSE = Core.Name "FALSE"
-
-_TruthValue_UNKNOWN = Core.Name "UNKNOWN"
-
-data UnsignedLiteral =
-  UnsignedLiteralNumeric UnsignedNumericLiteral |
-  UnsignedLiteralGeneral GeneralLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedLiteral = Core.Name "hydra.sql.syntax.UnsignedLiteral"
-
-_UnsignedLiteral_numeric = Core.Name "numeric"
-
-_UnsignedLiteral_general = Core.Name "general"
-
-data UnsignedNumericLiteral =
-  UnsignedNumericLiteralExact ExactNumericLiteral |
-  UnsignedNumericLiteralApproximate ApproximateNumericLiteral
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedNumericLiteral = Core.Name "hydra.sql.syntax.UnsignedNumericLiteral"
-
-_UnsignedNumericLiteral_exact = Core.Name "exact"
-
-_UnsignedNumericLiteral_approximate = Core.Name "approximate"
-
-data UnsignedValueSpecification =
-  UnsignedValueSpecificationLiteral UnsignedLiteral |
-  UnsignedValueSpecificationGeneral GeneralValueSpecification
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedValueSpecification = Core.Name "hydra.sql.syntax.UnsignedValueSpecification"
-
-_UnsignedValueSpecification_literal = Core.Name "literal"
-
-_UnsignedValueSpecification_general = Core.Name "general"
-
-newtype UserDefinedTypeValueExpression =
-  UserDefinedTypeValueExpression {
-    unUserDefinedTypeValueExpression :: ValueExpressionPrimary}
-  deriving (Eq, Ord, Read, Show)
-
-_UserDefinedTypeValueExpression = Core.Name "hydra.sql.syntax.UserDefinedTypeValueExpression"
-
-data ValueExpression =
-  ValueExpressionCommon CommonValueExpression |
-  ValueExpressionBoolean BooleanValueExpression |
-  ValueExpressionRow RowValueExpression
-  deriving (Eq, Ord, Read, Show)
-
-_ValueExpression = Core.Name "hydra.sql.syntax.ValueExpression"
-
-_ValueExpression_common = Core.Name "common"
-
-_ValueExpression_boolean = Core.Name "boolean"
-
-_ValueExpression_row = Core.Name "row"
-
-data ValueExpressionPrimary =
-  ValueExpressionPrimaryParens ParenthesizedValueExpression |
-  ValueExpressionPrimaryNoparens NonparenthesizedValueExpressionPrimary
-  deriving (Eq, Ord, Read, Show)
-
-_ValueExpressionPrimary = Core.Name "hydra.sql.syntax.ValueExpressionPrimary"
-
-_ValueExpressionPrimary_parens = Core.Name "parens"
-
-_ValueExpressionPrimary_noparens = Core.Name "noparens"
-
-newtype WindowFunction =
-  WindowFunction {
-    unWindowFunction :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_WindowFunction = Core.Name "hydra.sql.syntax.WindowFunction"
diff --git a/src/main/haskell/Hydra/Stac/Items.hs b/src/main/haskell/Hydra/Stac/Items.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Stac/Items.hs
+++ /dev/null
@@ -1,185 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for SpatioTemporal Asset Catalog (STAC) Items. See https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md
-
-module Hydra.Stac.Items where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Geojson.Model as Model
-import qualified Hydra.Iana.Linkrelations as Linkrelations
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-
--- | An Asset is an object that contains a URI to data associated with the Item that can be downloaded or streamed. It is allowed to add additional fields.
-data Asset =
-  Asset {
-    -- | URI to the asset object. Relative and absolute URI are both allowed.
-    assetHref :: Uri,
-    -- | The displayed title for clients and users.
-    assetTitle :: (Maybe String),
-    -- | A description of the Asset providing additional details, such as how it was processed or created. CommonMark 0.29 syntax MAY be used for rich text representation.
-    assetDescription :: (Maybe String),
-    -- | Media type of the asset. See the common media types in the best practice doc for commonly used asset types.
-    assetType :: (Maybe MediaType),
-    -- | The semantic roles of the asset, similar to the use of rel in links.
-    assetRoles :: [Role]}
-  deriving (Eq, Ord, Read, Show)
-
-_Asset = Core.Name "hydra.stac.items.Asset"
-
-_Asset_href = Core.Name "href"
-
-_Asset_title = Core.Name "title"
-
-_Asset_description = Core.Name "description"
-
-_Asset_type = Core.Name "type"
-
-_Asset_roles = Core.Name "roles"
-
--- | This object describes a STAC Item. The fields id, type, bbox, geometry and properties are inherited from GeoJSON.
-data Item =
-  Item {
-    itemFeature :: Model.Feature,
-    -- | The STAC version the Item implements
-    itemStacVersion :: StacVersion,
-    -- | A list of extensions the Item implements
-    itemStacExtensions :: [Url],
-    -- | List of link objects to resources and related URLs. A link with the rel set to self is strongly recommended.
-    itemLinks :: [Link],
-    -- | Dictionary of asset objects that can be downloaded, each with a unique key.
-    itemAssets :: (M.Map String Asset),
-    -- | The id of the STAC Collection this Item references to (see collection relation type). This field is required if such a relation type is present and is not allowed otherwise. This field provides an easy way for a user to search for any Items that belong in a specified Collection. Must be a non-empty string.
-    itemCollection :: (Maybe Model.Id)}
-  deriving (Eq, Ord, Read, Show)
-
-_Item = Core.Name "hydra.stac.items.Item"
-
-_Item_feature = Core.Name "feature"
-
-_Item_stacVersion = Core.Name "stacVersion"
-
-_Item_stacExtensions = Core.Name "stacExtensions"
-
-_Item_links = Core.Name "links"
-
-_Item_assets = Core.Name "assets"
-
-_Item_collection = Core.Name "collection"
-
--- | This object describes a relationship with another entity. Data providers are advised to be liberal with the links section, to describe things like the Catalog an Item is in, related Items, parent or child Items (modeled in different ways, like an 'acquisition' or derived data). It is allowed to add additional fields such as a title and type.
-data Link =
-  Link {
-    -- | The actual link in the format of an URL. Relative and absolute links are both allowed.
-    linkHref :: Url,
-    -- | Relationship between the current document and the linked document. See chapter "Relation types" for more information.
-    linkRel :: RelationType,
-    -- | Media type of the referenced entity.
-    linkType :: (Maybe MediaType),
-    -- | A human readable title to be used in rendered displays of the link.
-    linkTitle :: (Maybe String)}
-  deriving (Eq, Ord, Read, Show)
-
-_Link = Core.Name "hydra.stac.items.Link"
-
-_Link_href = Core.Name "href"
-
-_Link_rel = Core.Name "rel"
-
-_Link_type = Core.Name "type"
-
-_Link_title = Core.Name "title"
-
-newtype MediaType =
-  MediaType {
-    unMediaType :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_MediaType = Core.Name "hydra.stac.items.MediaType"
-
--- | STAC Items use a variety of rel types in the link object, to describe the exact nature of the link between this Item and the entity it is linking to. It is recommended to use the official IANA Link Relation Types where possible. The following table explains places where STAC use custom rel types are used with Items. This happens where there is not a clear official option, or where STAC uses an official type but adds additional meaning for the STAC context.
-data RelationType =
-  RelationTypeIana Linkrelations.LinkRelationType |
-  RelationTypeStac StacRelationType |
-  RelationTypeOther String
-  deriving (Eq, Ord, Read, Show)
-
-_RelationType = Core.Name "hydra.stac.items.RelationType"
-
-_RelationType_iana = Core.Name "iana"
-
-_RelationType_stac = Core.Name "stac"
-
-_RelationType_other = Core.Name "other"
-
--- | The roles field is used to describe the purpose of each asset. It is recommended to include one for every asset, to give users a sense of why they might want to make use of the asset. There are some emerging standards that enable clients to take particular action when they encounter particular roles, listed below. But implementors are encouraged to come up with their own terms to describe the role.
-data Role =
-  -- | An asset that represents a thumbnail of the Item, typically a true color image (for Items with assets in the visible wavelengths), lower-resolution (typically smaller 600x600 pixels), and typically a JPEG or PNG (suitable for display in a web browser). Multiple assets may have this purpose, but it recommended that the type and roles be unique tuples. For example, Sentinel-2 L2A provides thumbnail images in both JPEG and JPEG2000 formats, and would be distinguished by their media types.
-  RoleThumbnail  |
-  -- | An asset that represents a possibly larger view than the thumbnail of the Item, for example, a true color composite of multi-band data.
-  RoleOverview  |
-  -- | The data itself. This is a suggestion for a common role for data files to be used in case data providers don't come up with their own names and semantics.
-  RoleData  |
-  -- | A metadata sidecar file describing the data in this Item, for example the Landsat-8 MTL file.
-  RoleMetadata  |
-  RoleOther String
-  deriving (Eq, Ord, Read, Show)
-
-_Role = Core.Name "hydra.stac.items.Role"
-
-_Role_thumbnail = Core.Name "thumbnail"
-
-_Role_overview = Core.Name "overview"
-
-_Role_data = Core.Name "data"
-
-_Role_metadata = Core.Name "metadata"
-
-_Role_other = Core.Name "other"
-
-data StacRelationType =
-  -- | STRONGLY RECOMMENDED. Absolute URL to the Item if it is available at a public URL. This is particularly useful when in a download package that includes metadata, so that the downstream user can know where the data has come from.
-  StacRelationTypeSelf  |
-  -- | URL to the root STAC entity (Catalog or Collection).
-  StacRelationTypeRoot  |
-  -- | URL to the parent STAC entity (Catalog or Collection).
-  StacRelationTypeParent  |
-  -- | STRONGLY RECOMMENDED. URL to a Collection. Absolute URLs should be used whenever possible. The referenced Collection is STRONGLY RECOMMENDED to implement the same STAC version as the Item. A link with this rel type is required if the collection field in properties is present.
-  StacRelationTypeCollection  |
-  -- | URL to a STAC Item that was used as input data in the creation of this Item.
-  StacRelationTypeDerivedFrom
-  deriving (Eq, Ord, Read, Show)
-
-_StacRelationType = Core.Name "hydra.stac.items.StacRelationType"
-
-_StacRelationType_self = Core.Name "self"
-
-_StacRelationType_root = Core.Name "root"
-
-_StacRelationType_parent = Core.Name "parent"
-
-_StacRelationType_collection = Core.Name "collection"
-
-_StacRelationType_derivedFrom = Core.Name "derivedFrom"
-
-newtype StacVersion =
-  StacVersion {
-    unStacVersion :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_StacVersion = Core.Name "hydra.stac.items.StacVersion"
-
-newtype Uri =
-  Uri {
-    unUri :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Uri = Core.Name "hydra.stac.items.Uri"
-
-newtype Url =
-  Url {
-    unUrl :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Url = Core.Name "hydra.stac.items.Url"
diff --git a/src/main/haskell/Hydra/Strip.hs b/src/main/haskell/Hydra/Strip.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Strip.hs
+++ /dev/null
@@ -1,148 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Annotation and type stripping and normalization
-
-module Hydra.Strip where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Rewriting as Rewriting
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Strip type annotations from the top levels of a term
-deannotateAndDetypeTerm :: Core.Term -> Core.Term
-deannotateAndDetypeTerm t =
-    case t of
-      Core.TermAnnotated v0 -> deannotateAndDetypeTerm (Core.annotatedTermBody v0)
-      Core.TermTypeApplication v0 -> deannotateAndDetypeTerm (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> deannotateAndDetypeTerm (Core.typeLambdaBody v0)
-      _ -> t
--- | Strip all annotations (including System F type annotations) from the top levels of a term
-deannotateTerm :: Core.Term -> Core.Term
-deannotateTerm t =
-    case t of
-      Core.TermAnnotated v0 -> deannotateTerm (Core.annotatedTermBody v0)
-      _ -> t
--- | Strip all annotations from a term
-deannotateType :: Core.Type -> Core.Type
-deannotateType t =
-    case t of
-      Core.TypeAnnotated v0 -> deannotateType (Core.annotatedTypeBody v0)
-      _ -> t
--- | Strip any top-level type lambdas from a type, extracting the (possibly nested) type body
-deannotateTypeParameters :: Core.Type -> Core.Type
-deannotateTypeParameters t =
-    case (deannotateType t) of
-      Core.TypeForall v0 -> deannotateTypeParameters (Core.forallTypeBody v0)
-      _ -> t
--- | Recursively strip all annotations from a type
-deannotateTypeRecursive :: Core.Type -> Core.Type
-deannotateTypeRecursive typ =
-
-      let strip =
-              \recurse -> \typ2 ->
-                let rewritten = recurse typ2
-                in case rewritten of
-                  Core.TypeAnnotated v0 -> Core.annotatedTypeBody v0
-                  _ -> rewritten
-      in (Rewriting.rewriteType strip typ)
--- | Recursively strip all annotations from a type scheme
-deannotateTypeSchemeRecursive :: Core.TypeScheme -> Core.TypeScheme
-deannotateTypeSchemeRecursive ts =
-
-      let vars = Core.typeSchemeVariables ts
-          typ = Core.typeSchemeBody ts
-          constraints = Core.typeSchemeConstraints ts
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = vars,
-        Core.typeSchemeBody = (deannotateTypeRecursive typ),
-        Core.typeSchemeConstraints = constraints}
--- | Strip System F type annotations from the top levels of a term, but leave application-specific annotations intact
-detypeTerm :: Core.Term -> Core.Term
-detypeTerm t =
-    case t of
-      Core.TermAnnotated v0 ->
-        let subj = Core.annotatedTermBody v0
-            ann = Core.annotatedTermAnnotation v0
-        in (Core.TermAnnotated (Core.AnnotatedTerm {
-          Core.annotatedTermBody = (detypeTerm subj),
-          Core.annotatedTermAnnotation = ann}))
-      Core.TermTypeApplication v0 -> deannotateAndDetypeTerm (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> deannotateAndDetypeTerm (Core.typeLambdaBody v0)
-      _ -> t
--- | Recursively remove term annotations, including within subterms
-removeTermAnnotations :: Core.Term -> Core.Term
-removeTermAnnotations term =
-
-      let remove =
-              \recurse -> \term2 ->
-                let rewritten = recurse term2
-                in case term2 of
-                  Core.TermAnnotated v0 -> Core.annotatedTermBody v0
-                  _ -> rewritten
-      in (Rewriting.rewriteTerm remove term)
--- | Recursively remove type annotations, including within subtypes
-removeTypeAnnotations :: Core.Type -> Core.Type
-removeTypeAnnotations typ =
-
-      let remove =
-              \recurse -> \typ2 ->
-                let rewritten = recurse typ2
-                in case rewritten of
-                  Core.TypeAnnotated v0 -> Core.annotatedTypeBody v0
-                  _ -> rewritten
-      in (Rewriting.rewriteType remove typ)
--- | Strip type annotations (TypeLambda, TypeApplication, binding type schemes) from terms while preserving lambda domain types and other annotations
-removeTypeAnnotationsFromTerm :: Core.Term -> Core.Term
-removeTypeAnnotationsFromTerm term =
-
-      let strip =
-              \recurse -> \term2 ->
-                let rewritten = recurse term2
-                    stripBinding =
-                            \b -> Core.Binding {
-                              Core.bindingName = (Core.bindingName b),
-                              Core.bindingTerm = (Core.bindingTerm b),
-                              Core.bindingTypeScheme = Nothing}
-                in case rewritten of
-                  Core.TermLet v0 -> Core.TermLet (Core.Let {
-                    Core.letBindings = (Lists.map stripBinding (Core.letBindings v0)),
-                    Core.letBody = (Core.letBody v0)})
-                  Core.TermTypeApplication v0 -> Core.typeApplicationTermBody v0
-                  Core.TermTypeLambda v0 -> Core.typeLambdaBody v0
-                  _ -> rewritten
-      in (Rewriting.rewriteTerm strip term)
--- | Strip type annotations from terms while preserving other annotations
-removeTypesFromTerm :: Core.Term -> Core.Term
-removeTypesFromTerm term =
-
-      let strip =
-              \recurse -> \term2 ->
-                let rewritten = recurse term2
-                    stripBinding =
-                            \b -> Core.Binding {
-                              Core.bindingName = (Core.bindingName b),
-                              Core.bindingTerm = (Core.bindingTerm b),
-                              Core.bindingTypeScheme = Nothing}
-                in case rewritten of
-                  Core.TermLambda v0 -> Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.lambdaParameter v0),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.lambdaBody v0)})
-                  Core.TermLet v0 -> Core.TermLet (Core.Let {
-                    Core.letBindings = (Lists.map stripBinding (Core.letBindings v0)),
-                    Core.letBody = (Core.letBody v0)})
-                  Core.TermTypeApplication v0 -> Core.typeApplicationTermBody v0
-                  Core.TermTypeLambda v0 -> Core.typeLambdaBody v0
-                  _ -> rewritten
-      in (Rewriting.rewriteTerm strip term)
--- | Strip outer type lambda wrappers from a term, preserving type application wrappers and annotations
-stripTypeLambdas :: Core.Term -> Core.Term
-stripTypeLambdas t =
-    case t of
-      Core.TermAnnotated v0 ->
-        let subj = Core.annotatedTermBody v0
-            ann = Core.annotatedTermAnnotation v0
-        in (Core.TermAnnotated (Core.AnnotatedTerm {
-          Core.annotatedTermBody = (stripTypeLambdas subj),
-          Core.annotatedTermAnnotation = ann}))
-      Core.TermTypeLambda v0 -> stripTypeLambdas (Core.typeLambdaBody v0)
-      _ -> t
diff --git a/src/main/haskell/Hydra/Substitution.hs b/src/main/haskell/Hydra/Substitution.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Substitution.hs
+++ /dev/null
@@ -1,197 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Variable substitution in type and term expressions.
-
-module Hydra.Substitution where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Compose two type substitutions
-composeTypeSubst :: Typing.TypeSubst -> Typing.TypeSubst -> Typing.TypeSubst
-composeTypeSubst s1 s2 =
-    Logic.ifElse (Maps.null (Typing.unTypeSubst s1)) s2 (Logic.ifElse (Maps.null (Typing.unTypeSubst s2)) s1 (composeTypeSubstNonEmpty s1 s2))
--- | Compose a list of type substitutions
-composeTypeSubstList :: [Typing.TypeSubst] -> Typing.TypeSubst
-composeTypeSubstList = Lists.foldl composeTypeSubst idTypeSubst
--- | Compose two non-empty type substitutions (internal helper)
-composeTypeSubstNonEmpty :: Typing.TypeSubst -> Typing.TypeSubst -> Typing.TypeSubst
-composeTypeSubstNonEmpty s1 s2 =
-
-      let isExtra = \k -> \v -> Maybes.isNothing (Maps.lookup k (Typing.unTypeSubst s1))
-          withExtra = Maps.filterWithKey isExtra (Typing.unTypeSubst s2)
-      in (Typing.TypeSubst (Maps.union withExtra (Maps.map (substInType s2) (Typing.unTypeSubst s1))))
--- | The identity type substitution
-idTypeSubst :: Typing.TypeSubst
-idTypeSubst = Typing.TypeSubst Maps.empty
--- | Create a type substitution with a single variable mapping
-singletonTypeSubst :: Core.Name -> Core.Type -> Typing.TypeSubst
-singletonTypeSubst v t = Typing.TypeSubst (Maps.singleton v t)
--- | Apply a type substitution to class constraints, propagating to free variables
-substInClassConstraints :: Typing.TypeSubst -> M.Map Core.Name Core.TypeVariableMetadata -> M.Map Core.Name Core.TypeVariableMetadata
-substInClassConstraints subst constraints =
-
-      let substMap = Typing.unTypeSubst subst
-          insertOrMerge =
-                  \varName -> \metadata -> \acc -> Maybes.maybe (Maps.insert varName metadata acc) (\existing ->
-                    let merged =
-                            Core.TypeVariableMetadata {
-                              Core.typeVariableMetadataClasses = (Sets.union (Core.typeVariableMetadataClasses existing) (Core.typeVariableMetadataClasses metadata))}
-                    in (Maps.insert varName merged acc)) (Maps.lookup varName acc)
-      in (Lists.foldl (\acc -> \pair ->
-        let varName = Pairs.first pair
-            metadata = Pairs.second pair
-        in (Maybes.maybe (insertOrMerge varName metadata acc) (\targetType ->
-          let freeVars = Sets.toList (Variables.freeVariablesInType targetType)
-          in (Lists.foldl (\acc2 -> \freeVar -> insertOrMerge freeVar metadata acc2) acc freeVars)) (Maps.lookup varName substMap))) Maps.empty (Maps.toList constraints))
--- | Apply a type substitution to a graph's bound types and class constraints
-substInContext :: Typing.TypeSubst -> Graph.Graph -> Graph.Graph
-substInContext subst cx =
-
-      let newBoundTypes = Maps.map (substInTypeScheme subst) (Graph.graphBoundTypes cx)
-          newClassConstraints = substInClassConstraints subst (Graph.graphClassConstraints cx)
-          cx2 =
-                  Graph.Graph {
-                    Graph.graphBoundTerms = (Graph.graphBoundTerms cx),
-                    Graph.graphBoundTypes = newBoundTypes,
-                    Graph.graphClassConstraints = (Graph.graphClassConstraints cx),
-                    Graph.graphLambdaVariables = (Graph.graphLambdaVariables cx),
-                    Graph.graphMetadata = (Graph.graphMetadata cx),
-                    Graph.graphPrimitives = (Graph.graphPrimitives cx),
-                    Graph.graphSchemaTypes = (Graph.graphSchemaTypes cx),
-                    Graph.graphTypeVariables = (Graph.graphTypeVariables cx)}
-      in Graph.Graph {
-        Graph.graphBoundTerms = (Graph.graphBoundTerms cx2),
-        Graph.graphBoundTypes = (Graph.graphBoundTypes cx2),
-        Graph.graphClassConstraints = newClassConstraints,
-        Graph.graphLambdaVariables = (Graph.graphLambdaVariables cx2),
-        Graph.graphMetadata = (Graph.graphMetadata cx2),
-        Graph.graphPrimitives = (Graph.graphPrimitives cx2),
-        Graph.graphSchemaTypes = (Graph.graphSchemaTypes cx2),
-        Graph.graphTypeVariables = (Graph.graphTypeVariables cx2)}
--- | Apply a type substitution to a type
-substInType :: Typing.TypeSubst -> Core.Type -> Core.Type
-substInType subst typ0 = Logic.ifElse (Maps.null (Typing.unTypeSubst subst)) typ0 (substInTypeNonEmpty subst typ0)
--- | Apply a non-empty type substitution to a type (internal helper)
-substInTypeNonEmpty :: Typing.TypeSubst -> Core.Type -> Core.Type
-substInTypeNonEmpty subst typ0 =
-
-      let rewrite =
-              \recurse -> \typ -> case typ of
-                Core.TypeForall v0 -> Maybes.maybe (recurse typ) (\styp -> Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.forallTypeParameter v0),
-                  Core.forallTypeBody = (substInType (removeVar (Core.forallTypeParameter v0)) (Core.forallTypeBody v0))})) (Maps.lookup (Core.forallTypeParameter v0) (Typing.unTypeSubst subst))
-                Core.TypeVariable v0 -> Maybes.maybe typ (\styp -> styp) (Maps.lookup v0 (Typing.unTypeSubst subst))
-                _ -> recurse typ
-          removeVar = \v -> Typing.TypeSubst (Maps.delete v (Typing.unTypeSubst subst))
-      in (Rewriting.rewriteType rewrite typ0)
--- | Apply a type substitution to a type scheme. The scheme's quantifier variables shadow the substitution: any name in typeSchemeVariables is removed from subst before substituting into the body and constraints. Without this, a substitution like {t0 -> Foo} applied to `forall [t0]. t0 -> t0` would incorrectly replace the bound t0.
-substInTypeScheme :: Typing.TypeSubst -> Core.TypeScheme -> Core.TypeScheme
-substInTypeScheme subst ts =
-
-      let scopedSubst =
-              Typing.TypeSubst (Lists.foldl (\m -> \v -> Maps.delete v m) (Typing.unTypeSubst subst) (Core.typeSchemeVariables ts))
-      in Core.TypeScheme {
-        Core.typeSchemeVariables = (Core.typeSchemeVariables ts),
-        Core.typeSchemeBody = (substInType scopedSubst (Core.typeSchemeBody ts)),
-        Core.typeSchemeConstraints = (Maybes.map (substInClassConstraints scopedSubst) (Core.typeSchemeConstraints ts))}
--- | Apply a type substitution to the type annotations within a term
-substTypesInTerm :: Typing.TypeSubst -> Core.Term -> Core.Term
-substTypesInTerm subst term0 =
-
-      let rewrite =
-              \recurse -> \term ->
-                let dflt = recurse term
-                    forLambda =
-                            \l -> Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.lambdaParameter l),
-                              Core.lambdaDomain = (Maybes.map (substInType subst) (Core.lambdaDomain l)),
-                              Core.lambdaBody = (substTypesInTerm subst (Core.lambdaBody l))})
-                    forLet =
-                            \l ->
-                              let rewriteBinding =
-                                      \b -> Core.Binding {
-                                        Core.bindingName = (Core.bindingName b),
-                                        Core.bindingTerm = (substTypesInTerm subst (Core.bindingTerm b)),
-                                        Core.bindingTypeScheme = (Maybes.map (substInTypeScheme subst) (Core.bindingTypeScheme b))}
-                              in (Core.TermLet (Core.Let {
-                                Core.letBindings = (Lists.map rewriteBinding (Core.letBindings l)),
-                                Core.letBody = (substTypesInTerm subst (Core.letBody l))}))
-                    forTypeApplication =
-                            \tt -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (substTypesInTerm subst (Core.typeApplicationTermBody tt)),
-                              Core.typeApplicationTermType = (substInType subst (Core.typeApplicationTermType tt))})
-                    forTypeLambda =
-                            \ta ->
-                              let param = Core.typeLambdaParameter ta
-                                  subst2 = Typing.TypeSubst (Maps.delete param (Typing.unTypeSubst subst))
-                              in (Core.TermTypeLambda (Core.TypeLambda {
-                                Core.typeLambdaParameter = param,
-                                Core.typeLambdaBody = (substTypesInTerm subst2 (Core.typeLambdaBody ta))}))
-                in case term of
-                  Core.TermLambda v0 -> forLambda v0
-                  Core.TermLet v0 -> forLet v0
-                  Core.TermTypeApplication v0 -> forTypeApplication v0
-                  Core.TermTypeLambda v0 -> forTypeLambda v0
-                  _ -> dflt
-      in (Rewriting.rewriteTerm rewrite term0)
--- | Apply a term substitution to a binding
-substituteInBinding :: Typing.TermSubst -> Core.Binding -> Core.Binding
-substituteInBinding subst b =
-    Core.Binding {
-      Core.bindingName = (Core.bindingName b),
-      Core.bindingTerm = (substituteInTerm subst (Core.bindingTerm b)),
-      Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
--- | Apply a type substitution to a type constraint
-substituteInConstraint :: Typing.TypeSubst -> Typing.TypeConstraint -> Typing.TypeConstraint
-substituteInConstraint subst c =
-    Typing.TypeConstraint {
-      Typing.typeConstraintLeft = (substInType subst (Typing.typeConstraintLeft c)),
-      Typing.typeConstraintRight = (substInType subst (Typing.typeConstraintRight c)),
-      Typing.typeConstraintComment = (Typing.typeConstraintComment c)}
--- | Apply a type substitution to a list of type constraints
-substituteInConstraints :: Typing.TypeSubst -> [Typing.TypeConstraint] -> [Typing.TypeConstraint]
-substituteInConstraints subst cs = Lists.map (substituteInConstraint subst) cs
--- | Apply a term substitution to a term
-substituteInTerm :: Typing.TermSubst -> Core.Term -> Core.Term
-substituteInTerm subst term0 =
-
-      let s = Typing.unTermSubst subst
-          rewrite =
-                  \recurse -> \term ->
-                    let withLambda =
-                            \l ->
-                              let v = Core.lambdaParameter l
-                                  subst2 = Typing.TermSubst (Maps.delete v s)
-                              in (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = v,
-                                Core.lambdaDomain = (Core.lambdaDomain l),
-                                Core.lambdaBody = (substituteInTerm subst2 (Core.lambdaBody l))}))
-                        withLet =
-                                \lt ->
-                                  let bindings = Core.letBindings lt
-                                      names = Sets.fromList (Lists.map Core.bindingName bindings)
-                                      subst2 = Typing.TermSubst (Maps.filterWithKey (\k -> \v -> Logic.not (Sets.member k names)) s)
-                                      rewriteBinding =
-                                              \b -> Core.Binding {
-                                                Core.bindingName = (Core.bindingName b),
-                                                Core.bindingTerm = (substituteInTerm subst2 (Core.bindingTerm b)),
-                                                Core.bindingTypeScheme = (Core.bindingTypeScheme b)}
-                                  in (Core.TermLet (Core.Let {
-                                    Core.letBindings = (Lists.map rewriteBinding bindings),
-                                    Core.letBody = (substituteInTerm subst2 (Core.letBody lt))}))
-                    in case term of
-                      Core.TermLambda v0 -> withLambda v0
-                      Core.TermLet v0 -> withLet v0
-                      Core.TermVariable v0 -> Maybes.maybe (recurse term) (\sterm -> sterm) (Maps.lookup v0 s)
-                      _ -> recurse term
-      in (Rewriting.rewriteTerm rewrite term0)
diff --git a/src/main/haskell/Hydra/Tabular.hs b/src/main/haskell/Hydra/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tabular.hs
+++ /dev/null
@@ -1,49 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A simple, untyped tabular data model, suitable for CSVs and TSVs
-
-module Hydra.Tabular where
-import qualified Hydra.Core as Core
-import qualified Hydra.Relational as Relational
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | A column type, consisting of a name and a value type
-data ColumnType =
-  ColumnType {
-    columnTypeName :: Relational.ColumnName,
-    columnTypeType :: Core.Type}
-  deriving (Eq, Ord, Read, Show)
-_ColumnType = Core.Name "hydra.tabular.ColumnType"
-_ColumnType_name = Core.Name "name"
-_ColumnType_type = Core.Name "type"
--- | A data row, containing optional-valued cells; one per column
-newtype DataRow v =
-  DataRow {
-    unDataRow :: [Maybe v]}
-  deriving (Eq, Ord, Read, Show)
-_DataRow = Core.Name "hydra.tabular.DataRow"
--- | A header row, containing column names (but no types or data)
-newtype HeaderRow =
-  HeaderRow {
-    unHeaderRow :: [String]}
-  deriving (Eq, Ord, Read, Show)
-_HeaderRow = Core.Name "hydra.tabular.HeaderRow"
--- | A simple table as in a CSV file, having an optional header row and any number of data rows
-data Table v =
-  Table {
-    -- | The optional header row of the table. If present, the header must have the same number of cells as each data row.
-    tableHeader :: (Maybe HeaderRow),
-    -- | The data rows of the table. Each row must have the same number of cells.
-    tableData :: [DataRow v]}
-  deriving (Eq, Ord, Read, Show)
-_Table = Core.Name "hydra.tabular.Table"
-_Table_header = Core.Name "header"
-_Table_data = Core.Name "data"
--- | A type definition for a table, including column names and types
-data TableType =
-  TableType {
-    tableTypeName :: Relational.RelationName,
-    tableTypeColumns :: [ColumnType]}
-  deriving (Eq, Ord, Read, Show)
-_TableType = Core.Name "hydra.tabular.TableType"
-_TableType_name = Core.Name "name"
-_TableType_columns = Core.Name "columns"
diff --git a/src/main/haskell/Hydra/Templates.hs b/src/main/haskell/Hydra/Templates.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Templates.hs
+++ /dev/null
@@ -1,89 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A utility which instantiates a nonrecursive type with default values
-
-module Hydra.Templates where
-import qualified Hydra.Core as Core
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-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 Hydra.Lib.Literals as Literals
--- | Decode a list of type-encoding bindings into a map of named types
-graphToSchema :: t0 -> Graph.Graph -> [Core.Binding] -> Either Errors.DecodingError (M.Map Core.Name Core.Type)
-graphToSchema cx graph els =
-
-      let toPair =
-              \el ->
-                let name = Core.bindingName el
-                in (Eithers.bind (DecodeCore.type_ graph (Core.bindingTerm el)) (\t -> Right (name, t)))
-      in (Eithers.bind (Eithers.mapList toPair els) (\pairs -> Right (Maps.fromList pairs)))
--- | Given a graph schema and a nonrecursive type, instantiate it with default values. If the minimal flag is set, the smallest possible term is produced; otherwise, exactly one subterm is produced for constructors which do not otherwise require one, e.g. in lists and optionals. The name parameter provides the element name for nominal type construction.
-instantiateTemplate :: t0 -> Bool -> M.Map Core.Name Core.Type -> Core.Name -> Core.Type -> Either Errors.Error Core.Term
-instantiateTemplate cx minimal schema tname t =
-
-      let inst = \tn -> instantiateTemplate cx minimal schema tn
-          noPoly =
-                  Left (Errors.ErrorExtraction (Errors.ExtractionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-                    Errors.unexpectedShapeErrorExpected = "non-polymorphic type",
-                    Errors.unexpectedShapeErrorActual = "polymorphic or function type"})))
-          forFloat =
-                  \ft -> case ft of
-                    Core.FloatTypeBigfloat -> Core.FloatValueBigfloat 0.0
-                    Core.FloatTypeFloat32 -> Core.FloatValueFloat32 0.0
-                    Core.FloatTypeFloat64 -> Core.FloatValueFloat64 0.0
-          forInteger =
-                  \it -> case it of
-                    Core.IntegerTypeBigint -> Core.IntegerValueBigint 0
-                    Core.IntegerTypeInt8 -> Core.IntegerValueInt8 0
-                    Core.IntegerTypeInt16 -> Core.IntegerValueInt16 0
-                    Core.IntegerTypeInt32 -> Core.IntegerValueInt32 0
-                    Core.IntegerTypeInt64 -> Core.IntegerValueInt64 0
-                    Core.IntegerTypeUint8 -> Core.IntegerValueUint8 0
-                    Core.IntegerTypeUint16 -> Core.IntegerValueUint16 0
-                    Core.IntegerTypeUint32 -> Core.IntegerValueUint32 0
-                    Core.IntegerTypeUint64 -> Core.IntegerValueUint64 0
-          forLiteral =
-                  \lt -> case lt of
-                    Core.LiteralTypeBinary -> Core.LiteralString ""
-                    Core.LiteralTypeBoolean -> Core.LiteralBoolean False
-                    Core.LiteralTypeDecimal -> Core.LiteralDecimal (Literals.stringToDecimal "0.0")
-                    Core.LiteralTypeInteger v0 -> Core.LiteralInteger (forInteger v0)
-                    Core.LiteralTypeFloat v0 -> Core.LiteralFloat (forFloat v0)
-                    Core.LiteralTypeString -> Core.LiteralString ""
-      in case t of
-        Core.TypeAnnotated v0 -> inst tname (Core.annotatedTypeBody v0)
-        Core.TypeApplication _ -> noPoly
-        Core.TypeFunction _ -> noPoly
-        Core.TypeForall _ -> noPoly
-        Core.TypeList v0 -> Logic.ifElse minimal (Right (Core.TermList [])) (Eithers.bind (inst tname v0) (\e -> Right (Core.TermList [
-          e])))
-        Core.TypeLiteral v0 -> Right (Core.TermLiteral (forLiteral v0))
-        Core.TypeMap v0 ->
-          let kt = Core.mapTypeKeys v0
-              vt = Core.mapTypeValues v0
-          in (Logic.ifElse minimal (Right (Core.TermMap Maps.empty)) (Eithers.bind (inst tname kt) (\ke -> Eithers.bind (inst tname vt) (\ve -> Right (Core.TermMap (Maps.singleton ke ve))))))
-        Core.TypeMaybe v0 -> Logic.ifElse minimal (Right (Core.TermMaybe Nothing)) (Eithers.bind (inst tname v0) (\e -> Right (Core.TermMaybe (Just e))))
-        Core.TypeRecord v0 ->
-          let toField =
-                  \ft -> Eithers.bind (inst tname (Core.fieldTypeType ft)) (\e -> Right (Core.Field {
-                    Core.fieldName = (Core.fieldTypeName ft),
-                    Core.fieldTerm = e}))
-          in (Eithers.bind (Eithers.mapList toField v0) (\dfields -> Right (Core.TermRecord (Core.Record {
-            Core.recordTypeName = tname,
-            Core.recordFields = dfields}))))
-        Core.TypeSet v0 -> Logic.ifElse minimal (Right (Core.TermSet Sets.empty)) (Eithers.bind (inst tname v0) (\e -> Right (Core.TermSet (Sets.fromList [
-          e]))))
-        Core.TypeVariable v0 -> Maybes.maybe (Left (Errors.ErrorResolution (Errors.ResolutionErrorUnexpectedShape (Errors.UnexpectedShapeError {
-          Errors.unexpectedShapeErrorExpected = "bound type variable",
-          Errors.unexpectedShapeErrorActual = (Strings.cat2 "unbound variable " (Core.unName v0))})))) (inst v0) (Maps.lookup v0 schema)
-        Core.TypeWrap v0 -> Eithers.bind (inst tname v0) (\e -> Right (Core.TermWrap (Core.WrappedTerm {
-          Core.wrappedTermTypeName = tname,
-          Core.wrappedTermBody = e})))
diff --git a/src/main/haskell/Hydra/Test/Transform.hs b/src/main/haskell/Hydra/Test/Transform.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Test/Transform.hs
+++ /dev/null
@@ -1,101 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Transform test cases for code generation, filtering to tests that can be compiled to target languages
-
-module Hydra.Test.Transform where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Add generation namespace prefix
-addGenerationPrefix :: Packaging.Namespace -> Packaging.Namespace
-addGenerationPrefix ns_ = Packaging.Namespace (Strings.cat2 "generation." (Packaging.unNamespace ns_))
--- | Build a Term representing a convertCase function call
-buildConvertCaseCall :: Util.CaseConvention -> Util.CaseConvention -> String -> Core.Term
-buildConvertCaseCall fromConv toConv input_ =
-    Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermApplication (Core.Application {
-        Core.applicationFunction = (Core.TermApplication (Core.Application {
-          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.formatting.convertCase")),
-          Core.applicationArgument = (encodeCaseConvention fromConv)})),
-        Core.applicationArgument = (encodeCaseConvention toConv)})),
-      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString input_))})
--- | Build a Term representing a topologicalSort function call
-buildTopologicalSortCall :: [(Int, [Int])] -> Core.Term
-buildTopologicalSortCall adjList =
-    Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.sorting.topologicalSort")),
-      Core.applicationArgument = (encodeAdjacencyList adjList)})
--- | Build a Term representing a topologicalSortComponents function call
-buildTopologicalSortSCCCall :: [(Int, [Int])] -> Core.Term
-buildTopologicalSortSCCCall adjList =
-    Core.TermApplication (Core.Application {
-      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.sorting.topologicalSortComponents")),
-      Core.applicationArgument = (encodeAdjacencyList adjList)})
--- | Collect all test cases from a test group (flattening hierarchy)
-collectTestCases :: Testing.TestGroup -> [Testing.TestCaseWithMetadata]
-collectTestCases tg =
-    Lists.concat2 (Testing.testGroupCases tg) (Lists.concat (Lists.map (\sg -> collectTestCases sg) (Testing.testGroupSubgroups tg)))
--- | Encode an adjacency list as a Term
-encodeAdjacencyList :: [(Int, [Int])] -> Core.Term
-encodeAdjacencyList pairs =
-    Core.TermList (Lists.map (\p -> Core.TermPair (encodeInt (Pairs.first p), (Core.TermList (Lists.map (\d -> encodeInt d) (Pairs.second p))))) pairs)
--- | Encode CaseConvention as a Term (unit variant)
-encodeCaseConvention :: Util.CaseConvention -> Core.Term
-encodeCaseConvention conv =
-    Core.TermInject (Core.Injection {
-      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),
-      Core.injectionField = Core.Field {
-        Core.fieldName = case conv of
-          Util.CaseConventionLowerSnake -> Core.Name "lowerSnake"
-          Util.CaseConventionUpperSnake -> Core.Name "upperSnake"
-          Util.CaseConventionCamel -> Core.Name "camel"
-          Util.CaseConventionPascal -> Core.Name "pascal",
-        Core.fieldTerm = Core.TermUnit}})
--- | Encode Either [[Int]] [Int] as a Term
-encodeEitherListList :: Either [[Int]] [Int] -> Core.Term
-encodeEitherListList e =
-    Core.TermEither (Eithers.bimap (\cycles -> encodeListList cycles) (\sorted -> encodeIntList sorted) e)
--- | Encode an Int as a Term
-encodeInt :: Int -> Core.Term
-encodeInt n = Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 n))
--- | Encode [Int] as a Term
-encodeIntList :: [Int] -> Core.Term
-encodeIntList ints = Core.TermList (Lists.map (\n -> encodeInt n) ints)
--- | Encode [[Int]] as a Term
-encodeListList :: [[Int]] -> Core.Term
-encodeListList lists = Core.TermList (Lists.map (\l -> encodeIntList l) lists)
--- | Transform module with generation namespace
-transformModule :: Packaging.Module -> Packaging.Module
-transformModule m =
-    Packaging.Module {
-      Packaging.moduleDescription = (Packaging.moduleDescription m),
-      Packaging.moduleNamespace = (addGenerationPrefix (Packaging.moduleNamespace m)),
-      Packaging.moduleTermDependencies = (Packaging.moduleTermDependencies m),
-      Packaging.moduleTypeDependencies = (Packaging.moduleTypeDependencies m),
-      Packaging.moduleDefinitions = (Packaging.moduleDefinitions m)}
--- | Pass through test cases unchanged
-transformTestCase :: t0 -> Maybe t0
-transformTestCase tcm = Just tcm
--- | Transform test group hierarchy to only include delegated evaluation tests
-transformToCompiledTests :: Testing.TestGroup -> Maybe Testing.TestGroup
-transformToCompiledTests tg =
-
-      let name_ = Testing.testGroupName tg
-          desc = Testing.testGroupDescription tg
-          subgroups = Testing.testGroupSubgroups tg
-          cases_ = Testing.testGroupCases tg
-          transformedCases = Maybes.cat (Lists.map (\tc -> transformTestCase tc) cases_)
-          transformedSubgroups = Maybes.cat (Lists.map (\sg -> transformToCompiledTests sg) subgroups)
-      in (Logic.ifElse (Logic.and (Lists.null transformedCases) (Lists.null transformedSubgroups)) Nothing (Just (Testing.TestGroup {
-        Testing.testGroupName = name_,
-        Testing.testGroupDescription = desc,
-        Testing.testGroupSubgroups = transformedSubgroups,
-        Testing.testGroupCases = transformedCases})))
diff --git a/src/main/haskell/Hydra/Test/Utils.hs b/src/main/haskell/Hydra/Test/Utils.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Test/Utils.hs
+++ /dev/null
@@ -1,44 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Shared utility functions for test code generation codecs
-
-module Hydra.Test.Utils where
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Show.Errors as Errors
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Run type inference on a single term
-inferTerm :: Graph.Graph -> Core.Term -> Either String Core.Term
-inferTerm g term =
-    Eithers.bimap (\e -> Errors.error e) (\x -> Typing.inferenceResultTerm x) (Inference.inferInGraphContext Lexical.emptyContext g term)
--- | Run type inference on the terms in a test case
-inferTestCase :: t0 -> Testing.TestCaseWithMetadata -> Either t1 Testing.TestCaseWithMetadata
-inferTestCase g tcm =
-
-      let name_ = Testing.testCaseWithMetadataName tcm
-          tcase = Testing.testCaseWithMetadataCase tcm
-          desc = Testing.testCaseWithMetadataDescription tcm
-          tags_ = Testing.testCaseWithMetadataTags tcm
-      in (Eithers.map (\inferredCase -> Testing.TestCaseWithMetadata {
-        Testing.testCaseWithMetadataName = name_,
-        Testing.testCaseWithMetadataCase = inferredCase,
-        Testing.testCaseWithMetadataDescription = desc,
-        Testing.testCaseWithMetadataTags = tags_}) (Right tcase))
--- | Run type inference on all terms in a TestGroup to ensure lambdas have domain types
-inferTestGroupTerms :: t0 -> Testing.TestGroup -> Either t1 Testing.TestGroup
-inferTestGroupTerms g tg =
-
-      let name_ = Testing.testGroupName tg
-          desc = Testing.testGroupDescription tg
-          subgroups = Testing.testGroupSubgroups tg
-          cases_ = Testing.testGroupCases tg
-      in (Eithers.bind (Eithers.mapList (\sg -> inferTestGroupTerms g sg) subgroups) (\inferredSubgroups -> Eithers.map (\inferredCases -> Testing.TestGroup {
-        Testing.testGroupName = name_,
-        Testing.testGroupDescription = desc,
-        Testing.testGroupSubgroups = inferredSubgroups,
-        Testing.testGroupCases = inferredCases}) (Eithers.mapList (\tc -> inferTestCase g tc) cases_)))
diff --git a/src/main/haskell/Hydra/Testing.hs b/src/main/haskell/Hydra/Testing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Testing.hs
+++ /dev/null
@@ -1,65 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A model for unit testing
-
-module Hydra.Testing 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 tag for test cases
-newtype Tag =
-  Tag {
-    unTag :: String}
-  deriving (Eq, Ord, Read, Show)
-_Tag = Core.Name "hydra.testing.Tag"
--- | A test case with an actual and expected string for comparison
-data TestCase =
-  -- | A universal test case (string comparison)
-  TestCaseUniversal UniversalTestCase
-  deriving (Eq, Ord, Read, Show)
-_TestCase = Core.Name "hydra.testing.TestCase"
-_TestCase_universal = Core.Name "universal"
--- | A test case together with metadata
-data TestCaseWithMetadata =
-  TestCaseWithMetadata {
-    -- | A short name for the test case
-    testCaseWithMetadataName :: String,
-    -- | The test case itself
-    testCaseWithMetadataCase :: TestCase,
-    -- | An optional longer description of the test case
-    testCaseWithMetadataDescription :: (Maybe String),
-    -- | Zero or more tags for the test case
-    testCaseWithMetadataTags :: [Tag]}
-  deriving (Eq, Ord, Read, Show)
-_TestCaseWithMetadata = Core.Name "hydra.testing.TestCaseWithMetadata"
-_TestCaseWithMetadata_name = Core.Name "name"
-_TestCaseWithMetadata_case = Core.Name "case"
-_TestCaseWithMetadata_description = Core.Name "description"
-_TestCaseWithMetadata_tags = Core.Name "tags"
--- | A collection of test cases with a name and optional description
-data TestGroup =
-  TestGroup {
-    -- | A short name for the test group
-    testGroupName :: String,
-    -- | An optional longer description of the test group
-    testGroupDescription :: (Maybe String),
-    -- | Zero or more subgroups
-    testGroupSubgroups :: [TestGroup],
-    -- | Zero or more test cases
-    testGroupCases :: [TestCaseWithMetadata]}
-  deriving (Eq, Ord, Read, Show)
-_TestGroup = Core.Name "hydra.testing.TestGroup"
-_TestGroup_name = Core.Name "name"
-_TestGroup_description = Core.Name "description"
-_TestGroup_subgroups = Core.Name "subgroups"
-_TestGroup_cases = Core.Name "cases"
--- | A universal test case: the actual and expected values are both strings
-data UniversalTestCase =
-  UniversalTestCase {
-    -- | The actual result (a string produced by evaluating and showing the test expression)
-    universalTestCaseActual :: String,
-    -- | The expected result (a string produced by showing the expected value)
-    universalTestCaseExpected :: String}
-  deriving (Eq, Ord, Read, Show)
-_UniversalTestCase = Core.Name "hydra.testing.UniversalTestCase"
-_UniversalTestCase_actual = Core.Name "actual"
-_UniversalTestCase_expected = Core.Name "expected"
diff --git a/src/main/haskell/Hydra/Tinkerpop/Features.hs b/src/main/haskell/Hydra/Tinkerpop/Features.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tinkerpop/Features.hs
+++ /dev/null
@@ -1,322 +0,0 @@
--- 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
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tinkerpop/Gremlin.hs
+++ /dev/null
@@ -1,2426 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A Gremlin model, based on the Gremlin ANTLR grammar (master branch, as of 2024-06-30).
-
-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
-
-newtype QueryList =
-  QueryList {
-    unQueryList :: [Query]}
-  deriving (Eq, Ord, Read, Show)
-
-_QueryList = Core.Name "hydra.tinkerpop.gremlin.QueryList"
-
-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"
-
-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 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"
-
-newtype TraversalSource =
-  TraversalSource {
-    unTraversalSource :: [TraversalSourceSelfMethod]}
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalSource = Core.Name "hydra.tinkerpop.gremlin.TraversalSource"
-
-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 RootTraversal =
-  RootTraversal {
-    rootTraversalSource :: TraversalSource,
-    rootTraversalSpawnMethod :: TraversalSourceSpawnMethod,
-    rootTraversalChained :: [ChainedTraversalElement]}
-  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 TraversalSourceSelfMethod =
-  TraversalSourceSelfMethodWithBulk Bool |
-  TraversalSourceSelfMethodWithPath  |
-  TraversalSourceSelfMethodWithSack GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument |
-  TraversalSourceSelfMethodWithSideEffect StringArgumentAndGenericLiteralArgument |
-  TraversalSourceSelfMethodWithStrategies [TraversalStrategy] |
-  TraversalSourceSelfMethodWithoutStrategies [Identifier] |
-  TraversalSourceSelfMethodWith StringArgumentAndOptionalGenericLiteralArgument
-  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 GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument =
-  GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument {
-    genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentLiteral :: GenericLiteralArgument,
-    genericLiteralArgumentAndOptionalTraversalBiFunctionArgumentBiFunction :: (Maybe TraversalBiFunctionArgument)}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument =
-    Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument"
-
-_GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument_literal = Core.Name "literal"
-
-_GenericLiteralArgumentAndOptionalTraversalBiFunctionArgument_biFunction = Core.Name "biFunction"
-
-data StringArgumentAndGenericLiteralArgument =
-  StringArgumentAndGenericLiteralArgument {
-    stringArgumentAndGenericLiteralArgumentString :: StringArgument,
-    stringArgumentAndGenericLiteralArgumentLiteral :: GenericLiteralArgument}
-  deriving (Eq, Ord, Read, Show)
-
-_StringArgumentAndGenericLiteralArgument = Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndGenericLiteralArgument"
-
-_StringArgumentAndGenericLiteralArgument_string = Core.Name "string"
-
-_StringArgumentAndGenericLiteralArgument_literal = Core.Name "literal"
-
-data StringArgumentAndOptionalGenericLiteralArgument =
-  StringArgumentAndOptionalGenericLiteralArgument {
-    stringArgumentAndOptionalGenericLiteralArgumentString :: StringArgument,
-    stringArgumentAndOptionalGenericLiteralArgumentLiteral :: (Maybe GenericLiteralArgument)}
-  deriving (Eq, Ord, Read, Show)
-
-_StringArgumentAndOptionalGenericLiteralArgument =
-    Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalGenericLiteralArgument"
-
-_StringArgumentAndOptionalGenericLiteralArgument_string = Core.Name "string"
-
-_StringArgumentAndOptionalGenericLiteralArgument_literal = Core.Name "literal"
-
-data TraversalSourceSpawnMethod =
-  TraversalSourceSpawnMethodAddE StringArgumentOrNestedTraversal |
-  TraversalSourceSpawnMethodAddV (Maybe StringArgumentOrNestedTraversal) |
-  TraversalSourceSpawnMethodE [GenericLiteralArgument] |
-  TraversalSourceSpawnMethodV [GenericLiteralArgument] |
-  TraversalSourceSpawnMethodMergeV GenericLiteralMapNullableArgumentOrNestedTraversal |
-  TraversalSourceSpawnMethodMergeE GenericLiteralMapNullableArgumentOrNestedTraversal |
-  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 GenericLiteralMapNullableArgumentOrNestedTraversal =
-  GenericLiteralMapNullableArgumentOrNestedTraversalMap GenericLiteralMapNullableArgument |
-  GenericLiteralMapNullableArgumentOrNestedTraversalTraversal NestedTraversal
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralMapNullableArgumentOrNestedTraversal =
-    Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentOrNestedTraversal"
-
-_GenericLiteralMapNullableArgumentOrNestedTraversal_map = Core.Name "map"
-
-_GenericLiteralMapNullableArgumentOrNestedTraversal_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 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 ChainedTraversal =
-  ChainedTraversal {
-    chainedTraversalFirst :: TraversalMethod,
-    chainedTraversalRest :: ChainedTraversalElement}
-  deriving (Eq, Ord, Read, Show)
-
-_ChainedTraversal = Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"
-
-_ChainedTraversal_first = Core.Name "first"
-
-_ChainedTraversal_rest = Core.Name "rest"
-
-data ChainedTraversalElement =
-  ChainedTraversalElementMethod TraversalMethod |
-  ChainedTraversalElementSelf TraversalSelfMethod
-  deriving (Eq, Ord, Read, Show)
-
-_ChainedTraversalElement = Core.Name "hydra.tinkerpop.gremlin.ChainedTraversalElement"
-
-_ChainedTraversalElement_method = Core.Name "method"
-
-_ChainedTraversalElement_self = Core.Name "self"
-
-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 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 TraversalMethod =
-  TraversalMethodV [GenericLiteralArgument] |
-  TraversalMethodE [GenericLiteralArgument] |
-  TraversalMethodAddE StringArgumentOrNestedTraversal |
-  TraversalMethodAddV (Maybe StringArgumentOrNestedTraversal) |
-  TraversalMethodMergeE (Maybe GenericLiteralMapNullableArgumentOrNestedTraversal) |
-  TraversalMethodMergeV (Maybe GenericLiteralMapNullableArgumentOrNestedTraversal) |
-  TraversalMethodAggregate OptionalTraversalScopeArgumentAndStringArgument |
-  TraversalMethodAll TraversalPredicate |
-  TraversalMethodAnd [NestedTraversal] |
-  TraversalMethodAny TraversalPredicate |
-  TraversalMethodAs StringArgumentAndOptionalStringLiteralVarargs |
-  TraversalMethodBarrier (Maybe TraversalSackMethodArgumentOrIntegerArgument) |
-  TraversalMethodBoth [StringNullableArgument] |
-  TraversalMethodBothE [StringNullableArgument] |
-  TraversalMethodBothV  |
-  TraversalMethodBranch NestedTraversal |
-  TraversalMethodBy ByArgs |
-  TraversalMethodCap StringArgumentAndOptionalStringLiteralVarargs |
-  TraversalMethodChoose ChooseArgs |
-  TraversalMethodCoalesce [NestedTraversal] |
-  TraversalMethodCoin FloatArgument |
-  TraversalMethodConjoin StringArgument |
-  TraversalMethodConnectedComponent  |
-  TraversalMethodConstant GenericLiteralArgument |
-  TraversalMethodCount (Maybe TraversalScopeArgument) |
-  TraversalMethodCyclicPath  |
-  TraversalMethodDedup DedupArgs |
-  TraversalMethodDifference GenericLiteralArgument |
-  TraversalMethodDisjunct GenericLiteralArgument |
-  TraversalMethodDrop  |
-  TraversalMethodElementMap [StringNullableArgument] |
-  TraversalMethodEmit (Maybe PredicateOrTraversal) |
-  TraversalMethodFilter PredicateOrTraversal |
-  TraversalMethodFlatMap NestedTraversal |
-  TraversalMethodFold (Maybe GenericLiteralArgumentAndTraversalBiFunctionArgument) |
-  TraversalMethodFrom FromArgs |
-  TraversalMethodGroup (Maybe StringArgument) |
-  TraversalMethodGroupCount (Maybe StringArgument) |
-  TraversalMethodHas HasArgs |
-  TraversalMethodHasId GenericLiteralArgumentAndTraversalPredicate |
-  TraversalMethodHasKey TraversalPredicateOrStringLiteralVarargs |
-  TraversalMethodHasLabel TraversalPredicateOrStringLiteralVarargs |
-  TraversalMethodHasNot StringNullableArgument |
-  TraversalMethodHasValue TraversalPredicateOrGenericLiteralArgument |
-  TraversalMethodId  |
-  TraversalMethodIdentity  |
-  TraversalMethodIn [StringNullableArgument] |
-  TraversalMethodInE [StringNullableArgument] |
-  TraversalMethodIntersect GenericLiteralArgument |
-  TraversalMethodInV  |
-  TraversalMethodIndex  |
-  TraversalMethodInject [GenericLiteralArgument] |
-  TraversalMethodIs TraversalPredicateOrGenericLiteralArgument |
-  TraversalMethodKey  |
-  TraversalMethodLabel  |
-  TraversalMethodLimit OptionalTraversalScopeArgumentAndIntegerArgument |
-  TraversalMethodLocal NestedTraversal |
-  TraversalMethodLoops (Maybe StringArgument) |
-  TraversalMethodMap NestedTraversal |
-  TraversalMethodMatch [NestedTraversal] |
-  TraversalMethodMath StringArgument |
-  TraversalMethodMax (Maybe TraversalScopeArgument) |
-  TraversalMethodMean (Maybe TraversalScopeArgument) |
-  TraversalMethodMin (Maybe TraversalScopeArgument) |
-  TraversalMethodNone TraversalPredicate |
-  TraversalMethodNot NestedTraversal |
-  TraversalMethodOption OptionArgs |
-  TraversalMethodOptional NestedTraversal |
-  TraversalMethodOr [NestedTraversal] |
-  TraversalMethodOrder (Maybe TraversalScopeArgument) |
-  TraversalMethodOtherV  |
-  TraversalMethodOut [StringNullableArgument] |
-  TraversalMethodOutE [StringNullableArgument] |
-  TraversalMethodOutV  |
-  TraversalMethodPageRank (Maybe FloatArgument) |
-  TraversalMethodPath  |
-  TraversalMethodPeerPressure  |
-  TraversalMethodProfile (Maybe StringArgument) |
-  TraversalMethodProject StringArgumentAndOptionalStringLiteralVarargs |
-  TraversalMethodProperties [StringNullableArgument] |
-  TraversalMethodProperty PropertyArgs |
-  TraversalMethodPropertyMap [StringNullableArgument] |
-  TraversalMethodRange RangeArgs |
-  TraversalMethodRead  |
-  TraversalMethodRepeat OptionalStringArgumentAndNestedTraversal |
-  TraversalMethodSack (Maybe TraversalBiFunctionArgument) |
-  TraversalMethodSample OptionalTraversalScopeArgumentAndIntegerArgument |
-  TraversalMethodSelect SelectArgs |
-  TraversalMethodCombine GenericLiteralArgument |
-  TraversalMethodProduct GenericLiteralArgument |
-  TraversalMethodMerge GenericLiteralArgument |
-  TraversalMethodShortestPath  |
-  TraversalMethodSideEffect NestedTraversal |
-  TraversalMethodSimplePath  |
-  TraversalMethodSkip OptionalTraversalScopeArgumentAndIntegerArgument |
-  TraversalMethodStore StringArgument |
-  TraversalMethodSubgraph StringArgument |
-  TraversalMethodSum (Maybe TraversalScopeArgument) |
-  TraversalMethodTail (Maybe TailArgs) |
-  TraversalMethodFail (Maybe StringArgument) |
-  TraversalMethodTimes IntegerArgument |
-  TraversalMethodTo ToArgs |
-  TraversalMethodToE DirectionAndVarargs |
-  TraversalMethodToV TraversalDirectionArgument |
-  TraversalMethodTree (Maybe StringArgument) |
-  TraversalMethodUnfold  |
-  TraversalMethodUnion [NestedTraversal] |
-  TraversalMethodUntil PredicateOrTraversal |
-  TraversalMethodValue  |
-  TraversalMethodValueMap ValueMapArgs |
-  TraversalMethodValues [StringNullableArgument] |
-  TraversalMethodWhere WhereArgs |
-  TraversalMethodWith WithArgs |
-  TraversalMethodWrite  |
-  TraversalMethodElement [StringNullableArgument] |
-  TraversalMethodCall ServiceCall |
-  TraversalMethodConcat ConcatArgs |
-  TraversalMethodAsString (Maybe TraversalScopeArgument) |
-  TraversalMethodFormat StringArgument |
-  TraversalMethodToUpper (Maybe TraversalScopeArgument) |
-  TraversalMethodToLower (Maybe TraversalScopeArgument) |
-  TraversalMethodLength (Maybe TraversalScopeArgument) |
-  TraversalMethodTrim (Maybe TraversalScopeArgument) |
-  TraversalMethodLTrim (Maybe TraversalScopeArgument) |
-  TraversalMethodRTrim (Maybe TraversalScopeArgument) |
-  TraversalMethodReverse  |
-  TraversalMethodReplace ReplaceArgs |
-  TraversalMethodSplit SplitArgs |
-  TraversalMethodSubstring SubstringArgs |
-  TraversalMethodAsDate  |
-  TraversalMethodDateAdd DateAddArgs |
-  TraversalMethodDateDiff DateDiffArgs
-  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_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_cap = Core.Name "cap"
-
-_TraversalMethod_choose = Core.Name "choose"
-
-_TraversalMethod_coalesce = Core.Name "coalesce"
-
-_TraversalMethod_coin = Core.Name "coin"
-
-_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_dedup = Core.Name "dedup"
-
-_TraversalMethod_difference = Core.Name "difference"
-
-_TraversalMethod_disjunct = Core.Name "disjunct"
-
-_TraversalMethod_drop = Core.Name "drop"
-
-_TraversalMethod_elementMap = Core.Name "elementMap"
-
-_TraversalMethod_emit = Core.Name "emit"
-
-_TraversalMethod_filter = Core.Name "filter"
-
-_TraversalMethod_flatMap = Core.Name "flatMap"
-
-_TraversalMethod_fold = Core.Name "fold"
-
-_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_intersect = Core.Name "intersect"
-
-_TraversalMethod_inV = Core.Name "inV"
-
-_TraversalMethod_index = Core.Name "index"
-
-_TraversalMethod_inject = Core.Name "inject"
-
-_TraversalMethod_is = Core.Name "is"
-
-_TraversalMethod_key = Core.Name "key"
-
-_TraversalMethod_label = Core.Name "label"
-
-_TraversalMethod_limit = Core.Name "limit"
-
-_TraversalMethod_local = Core.Name "local"
-
-_TraversalMethod_loops = Core.Name "loops"
-
-_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_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_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_sack = Core.Name "sack"
-
-_TraversalMethod_sample = Core.Name "sample"
-
-_TraversalMethod_select = Core.Name "select"
-
-_TraversalMethod_combine = Core.Name "combine"
-
-_TraversalMethod_product = Core.Name "product"
-
-_TraversalMethod_merge = Core.Name "merge"
-
-_TraversalMethod_shortestPath = Core.Name "shortestPath"
-
-_TraversalMethod_sideEffect = Core.Name "sideEffect"
-
-_TraversalMethod_simplePath = Core.Name "simplePath"
-
-_TraversalMethod_skip = Core.Name "skip"
-
-_TraversalMethod_store = Core.Name "store"
-
-_TraversalMethod_subgraph = Core.Name "subgraph"
-
-_TraversalMethod_sum = Core.Name "sum"
-
-_TraversalMethod_tail = Core.Name "tail"
-
-_TraversalMethod_fail = Core.Name "fail"
-
-_TraversalMethod_times = Core.Name "times"
-
-_TraversalMethod_to = Core.Name "to"
-
-_TraversalMethod_toE = Core.Name "toE"
-
-_TraversalMethod_toV = Core.Name "toV"
-
-_TraversalMethod_tree = Core.Name "tree"
-
-_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"
-
-_TraversalMethod_element = Core.Name "element"
-
-_TraversalMethod_call = Core.Name "call"
-
-_TraversalMethod_concat = Core.Name "concat"
-
-_TraversalMethod_asString = Core.Name "asString"
-
-_TraversalMethod_format = Core.Name "format"
-
-_TraversalMethod_toUpper = Core.Name "toUpper"
-
-_TraversalMethod_toLower = Core.Name "toLower"
-
-_TraversalMethod_length = Core.Name "length"
-
-_TraversalMethod_trim = Core.Name "trim"
-
-_TraversalMethod_lTrim = Core.Name "lTrim"
-
-_TraversalMethod_rTrim = Core.Name "rTrim"
-
-_TraversalMethod_reverse = Core.Name "reverse"
-
-_TraversalMethod_replace = Core.Name "replace"
-
-_TraversalMethod_split = Core.Name "split"
-
-_TraversalMethod_substring = Core.Name "substring"
-
-_TraversalMethod_asDate = Core.Name "asDate"
-
-_TraversalMethod_dateAdd = Core.Name "dateAdd"
-
-_TraversalMethod_dateDiff = Core.Name "dateDiff"
-
-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 OptionalTraversalScopeArgumentAndStringArgument =
-  OptionalTraversalScopeArgumentAndStringArgument {
-    optionalTraversalScopeArgumentAndStringArgumentScope :: (Maybe TraversalScopeArgument),
-    optionalTraversalScopeArgumentAndStringArgumentString :: StringArgument}
-  deriving (Eq, Ord, Read, Show)
-
-_OptionalTraversalScopeArgumentAndStringArgument =
-    Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndStringArgument"
-
-_OptionalTraversalScopeArgumentAndStringArgument_scope = Core.Name "scope"
-
-_OptionalTraversalScopeArgumentAndStringArgument_string = Core.Name "string"
-
-data StringArgumentAndOptionalStringLiteralVarargs =
-  StringArgumentAndOptionalStringLiteralVarargs {
-    stringArgumentAndOptionalStringLiteralVarargsFirst :: StringArgument,
-    stringArgumentAndOptionalStringLiteralVarargsRest :: [StringNullableArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_StringArgumentAndOptionalStringLiteralVarargs =
-    Core.Name "hydra.tinkerpop.gremlin.StringArgumentAndOptionalStringLiteralVarargs"
-
-_StringArgumentAndOptionalStringLiteralVarargs_first = Core.Name "first"
-
-_StringArgumentAndOptionalStringLiteralVarargs_rest = Core.Name "rest"
-
-data TraversalSackMethodArgumentOrIntegerArgument =
-  TraversalSackMethodArgumentOrIntegerArgumentConsumer TraversalSackMethodArgument |
-  TraversalSackMethodArgumentOrIntegerArgumentInt IntegerArgument
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalSackMethodArgumentOrIntegerArgument =
-    Core.Name "hydra.tinkerpop.gremlin.TraversalSackMethodArgumentOrIntegerArgument"
-
-_TraversalSackMethodArgumentOrIntegerArgument_consumer = Core.Name "consumer"
-
-_TraversalSackMethodArgumentOrIntegerArgument_int = Core.Name "int"
-
-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) |
-  ByOtherArgsOther (Maybe TraversalFunctionArgumentOrStringArgumentOrNestedTraversal)
-  deriving (Eq, Ord, Read, Show)
-
-_ByOtherArgs = Core.Name "hydra.tinkerpop.gremlin.ByOtherArgs"
-
-_ByOtherArgs_comparator = Core.Name "comparator"
-
-_ByOtherArgs_other = Core.Name "other"
-
-data TraversalFunctionArgumentOrStringArgumentOrNestedTraversal =
-  TraversalFunctionArgumentOrStringArgumentOrNestedTraversalFunction TraversalFunctionArgument |
-  TraversalFunctionArgumentOrStringArgumentOrNestedTraversalString StringArgument |
-  TraversalFunctionArgumentOrStringArgumentOrNestedTraversalTraversal NestedTraversal
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalFunctionArgumentOrStringArgumentOrNestedTraversal =
-    Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgumentOrStringArgumentOrNestedTraversal"
-
-_TraversalFunctionArgumentOrStringArgumentOrNestedTraversal_function = Core.Name "function"
-
-_TraversalFunctionArgumentOrStringArgumentOrNestedTraversal_string = Core.Name "string"
-
-_TraversalFunctionArgumentOrStringArgumentOrNestedTraversal_traversal = Core.Name "traversal"
-
-data ChooseArgs =
-  ChooseArgsFunction TraversalFunctionArgument |
-  ChooseArgsPredicateTraversal PredicateTraversalArgument |
-  ChooseArgsTraversal NestedTraversalArgument
-  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 PredicateTraversalArgument =
-  PredicateTraversalArgument {
-    predicateTraversalArgumentPredicate :: TraversalPredicate,
-    predicateTraversalArgumentTraversal1 :: NestedTraversal,
-    predicateTraversalArgumentTraversal2 :: (Maybe NestedTraversal)}
-  deriving (Eq, Ord, Read, Show)
-
-_PredicateTraversalArgument = Core.Name "hydra.tinkerpop.gremlin.PredicateTraversalArgument"
-
-_PredicateTraversalArgument_predicate = Core.Name "predicate"
-
-_PredicateTraversalArgument_traversal1 = Core.Name "traversal1"
-
-_PredicateTraversalArgument_traversal2 = Core.Name "traversal2"
-
-data NestedTraversalArgument =
-  NestedTraversalArgument {
-    nestedTraversalArgumentTraversal1 :: NestedTraversal,
-    nestedTraversalArgumentTraversal2 :: (Maybe NestedTraversal),
-    nestedTraversalArgumentTraversal3 :: (Maybe NestedTraversal)}
-  deriving (Eq, Ord, Read, Show)
-
-_NestedTraversalArgument = Core.Name "hydra.tinkerpop.gremlin.NestedTraversalArgument"
-
-_NestedTraversalArgument_traversal1 = Core.Name "traversal1"
-
-_NestedTraversalArgument_traversal2 = Core.Name "traversal2"
-
-_NestedTraversalArgument_traversal3 = Core.Name "traversal3"
-
-data DedupArgs =
-  DedupArgsScopeString ScopeStringArgument |
-  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 ScopeStringArgument =
-  ScopeStringArgument {
-    scopeStringArgumentScope :: TraversalScopeArgument,
-    scopeStringArgumentStrings :: [StringNullableArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_ScopeStringArgument = Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgument"
-
-_ScopeStringArgument_scope = Core.Name "scope"
-
-_ScopeStringArgument_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 GenericLiteralArgumentAndTraversalBiFunctionArgument =
-  GenericLiteralArgumentAndTraversalBiFunctionArgument {
-    genericLiteralArgumentAndTraversalBiFunctionArgumentLiteral :: GenericLiteralArgument,
-    genericLiteralArgumentAndTraversalBiFunctionArgumentBiFunction :: TraversalBiFunctionArgument}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralArgumentAndTraversalBiFunctionArgument =
-    Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalBiFunctionArgument"
-
-_GenericLiteralArgumentAndTraversalBiFunctionArgument_literal = Core.Name "literal"
-
-_GenericLiteralArgumentAndTraversalBiFunctionArgument_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 HasArgs =
-  HasArgsString HasStringArgumentAndOptionalStringLiteralVarargs |
-  HasArgsTraversalToken HasTraversalTokenArgs
-  deriving (Eq, Ord, Read, Show)
-
-_HasArgs = Core.Name "hydra.tinkerpop.gremlin.HasArgs"
-
-_HasArgs_string = Core.Name "string"
-
-_HasArgs_traversalToken = Core.Name "traversalToken"
-
-data HasStringArgumentAndOptionalStringLiteralVarargs =
-  HasStringArgumentAndOptionalStringLiteralVarargs {
-    hasStringArgumentAndOptionalStringLiteralVarargsString :: StringNullableArgument,
-    hasStringArgumentAndOptionalStringLiteralVarargsRest :: (Maybe HasStringArgumentAndOptionalStringLiteralVarargsRest)}
-  deriving (Eq, Ord, Read, Show)
-
-_HasStringArgumentAndOptionalStringLiteralVarargs =
-    Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargs"
-
-_HasStringArgumentAndOptionalStringLiteralVarargs_string = Core.Name "string"
-
-_HasStringArgumentAndOptionalStringLiteralVarargs_rest = Core.Name "rest"
-
-data HasStringArgumentAndOptionalStringLiteralVarargsRest =
-  HasStringArgumentAndOptionalStringLiteralVarargsRestObject GenericLiteralArgument |
-  HasStringArgumentAndOptionalStringLiteralVarargsRestPredicate TraversalPredicate |
-  HasStringArgumentAndOptionalStringLiteralVarargsRestStringObject StringNullableArgumentAndGenericLiteralArgument |
-  HasStringArgumentAndOptionalStringLiteralVarargsRestStringPredicate StringNullableArgumentAndTraversalPredicate |
-  HasStringArgumentAndOptionalStringLiteralVarargsRestTraversal NestedTraversal
-  deriving (Eq, Ord, Read, Show)
-
-_HasStringArgumentAndOptionalStringLiteralVarargsRest =
-    Core.Name "hydra.tinkerpop.gremlin.HasStringArgumentAndOptionalStringLiteralVarargsRest"
-
-_HasStringArgumentAndOptionalStringLiteralVarargsRest_object = Core.Name "object"
-
-_HasStringArgumentAndOptionalStringLiteralVarargsRest_predicate = Core.Name "predicate"
-
-_HasStringArgumentAndOptionalStringLiteralVarargsRest_stringObject = Core.Name "stringObject"
-
-_HasStringArgumentAndOptionalStringLiteralVarargsRest_stringPredicate = Core.Name "stringPredicate"
-
-_HasStringArgumentAndOptionalStringLiteralVarargsRest_traversal = Core.Name "traversal"
-
-data StringNullableArgumentAndGenericLiteralArgument =
-  StringNullableArgumentAndGenericLiteralArgument {
-    stringNullableArgumentAndGenericLiteralArgumentString :: StringNullableArgument,
-    stringNullableArgumentAndGenericLiteralArgumentLiteral :: GenericLiteralArgument}
-  deriving (Eq, Ord, Read, Show)
-
-_StringNullableArgumentAndGenericLiteralArgument =
-    Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndGenericLiteralArgument"
-
-_StringNullableArgumentAndGenericLiteralArgument_string = Core.Name "string"
-
-_StringNullableArgumentAndGenericLiteralArgument_literal = Core.Name "literal"
-
-data StringNullableArgumentAndTraversalPredicate =
-  StringNullableArgumentAndTraversalPredicate {
-    stringNullableArgumentAndTraversalPredicateString :: StringNullableArgument,
-    stringNullableArgumentAndTraversalPredicatePredicate :: TraversalPredicate}
-  deriving (Eq, Ord, Read, Show)
-
-_StringNullableArgumentAndTraversalPredicate =
-    Core.Name "hydra.tinkerpop.gremlin.StringNullableArgumentAndTraversalPredicate"
-
-_StringNullableArgumentAndTraversalPredicate_string = Core.Name "string"
-
-_StringNullableArgumentAndTraversalPredicate_predicate = Core.Name "predicate"
-
-data HasTraversalTokenArgs =
-  HasTraversalTokenArgs {
-    hasTraversalTokenArgsTraversalToken :: TraversalTokenArgument,
-    hasTraversalTokenArgsRest :: HasTraversalTokenArgsRest}
-  deriving (Eq, Ord, Read, Show)
-
-_HasTraversalTokenArgs = Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgs"
-
-_HasTraversalTokenArgs_traversalToken = Core.Name "traversalToken"
-
-_HasTraversalTokenArgs_rest = Core.Name "rest"
-
-data HasTraversalTokenArgsRest =
-  HasTraversalTokenArgsRestLiteral GenericLiteralArgument |
-  HasTraversalTokenArgsRestPredicate TraversalPredicate |
-  HasTraversalTokenArgsRestTraversal NestedTraversal
-  deriving (Eq, Ord, Read, Show)
-
-_HasTraversalTokenArgsRest = Core.Name "hydra.tinkerpop.gremlin.HasTraversalTokenArgsRest"
-
-_HasTraversalTokenArgsRest_literal = Core.Name "literal"
-
-_HasTraversalTokenArgsRest_predicate = Core.Name "predicate"
-
-_HasTraversalTokenArgsRest_traversal = Core.Name "traversal"
-
-data GenericLiteralArgumentAndTraversalPredicate =
-  GenericLiteralArgumentAndTraversalPredicateLiteral GenericLiteralArgument |
-  GenericLiteralArgumentAndTraversalPredicatePredicate TraversalPredicate
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralArgumentAndTraversalPredicate =
-    Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndTraversalPredicate"
-
-_GenericLiteralArgumentAndTraversalPredicate_literal = Core.Name "literal"
-
-_GenericLiteralArgumentAndTraversalPredicate_predicate = Core.Name "predicate"
-
-data TraversalPredicateOrStringLiteralVarargs =
-  TraversalPredicateOrStringLiteralVarargsPredicate TraversalPredicate |
-  TraversalPredicateOrStringLiteralVarargsString [StringNullableArgument]
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalPredicateOrStringLiteralVarargs = Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateOrStringLiteralVarargs"
-
-_TraversalPredicateOrStringLiteralVarargs_predicate = Core.Name "predicate"
-
-_TraversalPredicateOrStringLiteralVarargs_string = Core.Name "string"
-
-data TraversalPredicateOrGenericLiteralArgument =
-  TraversalPredicateOrGenericLiteralArgumentPredicate TraversalPredicate |
-  TraversalPredicateOrGenericLiteralArgumentLiteral [GenericLiteralArgument]
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalPredicateOrGenericLiteralArgument =
-    Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateOrGenericLiteralArgument"
-
-_TraversalPredicateOrGenericLiteralArgument_predicate = Core.Name "predicate"
-
-_TraversalPredicateOrGenericLiteralArgument_literal = Core.Name "literal"
-
-data OptionArgs =
-  OptionArgsPredicateTraversal TraversalPredicateAndNestedTraversal |
-  OptionArgsMergeMap TraversalMergeArgumentAndGenericLiteralMapNullableArgument |
-  OptionArgsMergeTraversal TraversalMergeArgumentAndNestedTraversal |
-  OptionArgsObjectTraversal GenericLiteralArgumentAndNestedTraversal |
-  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 TraversalPredicateAndNestedTraversal =
-  TraversalPredicateAndNestedTraversal {
-    traversalPredicateAndNestedTraversalPredicate :: TraversalPredicate,
-    traversalPredicateAndNestedTraversalTraversal :: NestedTraversal}
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalPredicateAndNestedTraversal = Core.Name "hydra.tinkerpop.gremlin.TraversalPredicateAndNestedTraversal"
-
-_TraversalPredicateAndNestedTraversal_predicate = Core.Name "predicate"
-
-_TraversalPredicateAndNestedTraversal_traversal = Core.Name "traversal"
-
-data TraversalMergeArgumentAndGenericLiteralMapNullableArgument =
-  TraversalMergeArgumentAndGenericLiteralMapNullableArgument {
-    traversalMergeArgumentAndGenericLiteralMapNullableArgumentMerge :: TraversalMergeArgument,
-    traversalMergeArgumentAndGenericLiteralMapNullableArgumentMap :: GenericLiteralMapNullableArgument,
-    traversalMergeArgumentAndGenericLiteralMapNullableArgumentCardinality :: (Maybe TraversalCardinality)}
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalMergeArgumentAndGenericLiteralMapNullableArgument =
-    Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndGenericLiteralMapNullableArgument"
-
-_TraversalMergeArgumentAndGenericLiteralMapNullableArgument_merge = Core.Name "merge"
-
-_TraversalMergeArgumentAndGenericLiteralMapNullableArgument_map = Core.Name "map"
-
-_TraversalMergeArgumentAndGenericLiteralMapNullableArgument_cardinality = Core.Name "cardinality"
-
-data TraversalMergeArgumentAndNestedTraversal =
-  TraversalMergeArgumentAndNestedTraversal {
-    traversalMergeArgumentAndNestedTraversalMerge :: TraversalMergeArgument,
-    traversalMergeArgumentAndNestedTraversalTraversal :: NestedTraversal}
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalMergeArgumentAndNestedTraversal = Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgumentAndNestedTraversal"
-
-_TraversalMergeArgumentAndNestedTraversal_merge = Core.Name "merge"
-
-_TraversalMergeArgumentAndNestedTraversal_traversal = Core.Name "traversal"
-
-data GenericLiteralArgumentAndNestedTraversal =
-  GenericLiteralArgumentAndNestedTraversal {
-    genericLiteralArgumentAndNestedTraversalObject :: GenericLiteralArgument,
-    genericLiteralArgumentAndNestedTraversalTraversal :: NestedTraversal}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralArgumentAndNestedTraversal = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgumentAndNestedTraversal"
-
-_GenericLiteralArgumentAndNestedTraversal_object = Core.Name "object"
-
-_GenericLiteralArgumentAndNestedTraversal_traversal = Core.Name "traversal"
-
-data PropertyArgs =
-  PropertyArgsCardinalityObjects TraversalCardinalityArgumentAndObjects |
-  PropertyArgsObjects [GenericLiteralArgument] |
-  PropertyArgsObject GenericLiteralMapNullableArgument |
-  PropertyArgsCardinalityObject GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument
-  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 TraversalCardinalityArgumentAndObjects =
-  TraversalCardinalityArgumentAndObjects {
-    traversalCardinalityArgumentAndObjectsCardinality :: TraversalCardinalityArgument,
-    traversalCardinalityArgumentAndObjectsObjects :: [GenericLiteralArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalCardinalityArgumentAndObjects = Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgumentAndObjects"
-
-_TraversalCardinalityArgumentAndObjects_cardinality = Core.Name "cardinality"
-
-_TraversalCardinalityArgumentAndObjects_objects = Core.Name "objects"
-
-data GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument =
-  GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument {
-    genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentCardinality :: TraversalCardinalityArgument,
-    genericLiteralMapNullableArgumentAndTraversalCardinalityArgumentObject :: GenericLiteralMapNullableArgument}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument =
-    Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument"
-
-_GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument_cardinality = Core.Name "cardinality"
-
-_GenericLiteralMapNullableArgumentAndTraversalCardinalityArgument_object = Core.Name "object"
-
-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 OptionalStringArgumentAndNestedTraversal =
-  OptionalStringArgumentAndNestedTraversal {
-    optionalStringArgumentAndNestedTraversalString :: (Maybe StringArgument),
-    optionalStringArgumentAndNestedTraversalTraversal :: NestedTraversal}
-  deriving (Eq, Ord, Read, Show)
-
-_OptionalStringArgumentAndNestedTraversal = Core.Name "hydra.tinkerpop.gremlin.OptionalStringArgumentAndNestedTraversal"
-
-_OptionalStringArgumentAndNestedTraversal_string = Core.Name "string"
-
-_OptionalStringArgumentAndNestedTraversal_traversal = Core.Name "traversal"
-
-data OptionalTraversalScopeArgumentAndIntegerArgument =
-  OptionalTraversalScopeArgumentAndIntegerArgument {
-    optionalTraversalScopeArgumentAndIntegerArgumentScope :: (Maybe TraversalScopeArgument),
-    optionalTraversalScopeArgumentAndIntegerArgumentLong :: IntegerArgument}
-  deriving (Eq, Ord, Read, Show)
-
-_OptionalTraversalScopeArgumentAndIntegerArgument =
-    Core.Name "hydra.tinkerpop.gremlin.OptionalTraversalScopeArgumentAndIntegerArgument"
-
-_OptionalTraversalScopeArgumentAndIntegerArgument_scope = Core.Name "scope"
-
-_OptionalTraversalScopeArgumentAndIntegerArgument_long = Core.Name "long"
-
-data SelectArgs =
-  SelectArgsColumn TraversalColumnArgument |
-  SelectArgsPopStrings PopStringsArgument |
-  SelectArgsPopTraversal TraversalPopArgumentAndNestedTraversal |
-  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 PopStringsArgument =
-  PopStringsArgument {
-    popStringsArgumentPop :: TraversalPopArgument,
-    popStringsArgumentString :: [StringArgument]}
-  deriving (Eq, Ord, Read, Show)
-
-_PopStringsArgument = Core.Name "hydra.tinkerpop.gremlin.PopStringsArgument"
-
-_PopStringsArgument_pop = Core.Name "pop"
-
-_PopStringsArgument_string = Core.Name "string"
-
-data TraversalPopArgumentAndNestedTraversal =
-  TraversalPopArgumentAndNestedTraversal {
-    traversalPopArgumentAndNestedTraversalPop :: TraversalPopArgument,
-    traversalPopArgumentAndNestedTraversalTraversal :: NestedTraversal}
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalPopArgumentAndNestedTraversal = Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgumentAndNestedTraversal"
-
-_TraversalPopArgumentAndNestedTraversal_pop = Core.Name "pop"
-
-_TraversalPopArgumentAndNestedTraversal_traversal = Core.Name "traversal"
-
-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 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 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 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 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 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 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 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 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 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"
-
-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 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 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 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 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 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 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 TraversalOrder =
-  TraversalOrderIncr  |
-  TraversalOrderDecr  |
-  TraversalOrderAsc  |
-  TraversalOrderDesc  |
-  TraversalOrderShuffle
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalOrder = Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"
-
-_TraversalOrder_incr = Core.Name "incr"
-
-_TraversalOrder_decr = Core.Name "decr"
-
-_TraversalOrder_asc = Core.Name "asc"
-
-_TraversalOrder_desc = Core.Name "desc"
-
-_TraversalOrder_shuffle = Core.Name "shuffle"
-
-data TraversalDirection =
-  TraversalDirectionIn  |
-  TraversalDirectionOut  |
-  TraversalDirectionBoth
-  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"
-
-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 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 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 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 TraversalPick =
-  TraversalPickAny  |
-  TraversalPickNone
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalPick = Core.Name "hydra.tinkerpop.gremlin.TraversalPick"
-
-_TraversalPick_any = Core.Name "any"
-
-_TraversalPick_none = Core.Name "none"
-
-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 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 |
-  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_and = Core.Name "and"
-
-_TraversalPredicate_or = Core.Name "or"
-
-_TraversalPredicate_negate = Core.Name "negate"
-
-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 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 TraversalSelfMethod =
-  TraversalSelfMethodDiscard
-  deriving (Eq, Ord, Read, Show)
-
-_TraversalSelfMethod = Core.Name "hydra.tinkerpop.gremlin.TraversalSelfMethod"
-
-_TraversalSelfMethod_discard = Core.Name "discard"
-
-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 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 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 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 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 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 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 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 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 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 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 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 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 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 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"
-
-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"
-
-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 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 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 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 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 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 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 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 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 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"
-
-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 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 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 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 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"
-
-newtype GenericLiteralList =
-  GenericLiteralList {
-    unGenericLiteralList :: [GenericLiteral]}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralList = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralList"
-
-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"
-
-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 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"
-
-newtype GenericLiteralSet =
-  GenericLiteralSet {
-    unGenericLiteralSet :: [GenericLiteral]}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralSet = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralSet"
-
-newtype GenericLiteralCollection =
-  GenericLiteralCollection {
-    unGenericLiteralCollection :: [GenericLiteral]}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralCollection = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralCollection"
-
-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 |
-  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_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"
-
-newtype GenericLiteralMap =
-  GenericLiteralMap {
-    unGenericLiteralMap :: [MapEntry]}
-  deriving (Eq, Ord, Read, Show)
-
-_GenericLiteralMap = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMap"
-
-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"
-
-newtype IntegerLiteral =
-  IntegerLiteral {
-    unIntegerLiteral :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_IntegerLiteral = Core.Name "hydra.tinkerpop.gremlin.IntegerLiteral"
-
-newtype FloatLiteral =
-  FloatLiteral {
-    unFloatLiteral :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_FloatLiteral = Core.Name "hydra.tinkerpop.gremlin.FloatLiteral"
-
-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"
-
-newtype DateLiteral =
-  DateLiteral {
-    unDateLiteral :: (Maybe StringArgument)}
-  deriving (Eq, Ord, Read, Show)
-
-_DateLiteral = Core.Name "hydra.tinkerpop.gremlin.DateLiteral"
-
-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"
-
-newtype Identifier =
-  Identifier {
-    unIdentifier :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Identifier = Core.Name "hydra.tinkerpop.gremlin.Identifier"
diff --git a/src/main/haskell/Hydra/Tinkerpop/Language.hs b/src/main/haskell/Hydra/Tinkerpop/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tinkerpop/Language.hs
+++ /dev/null
@@ -1,95 +0,0 @@
--- 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.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Tinkerpop.Features as Features
-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 (Maybes.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
-          eliminationVariants = Sets.empty
-          literalVariants =
-                  Sets.fromList (Maybes.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 (Maybes.cat [
-                    cond Core.FloatTypeFloat32 (Features.dataTypeFeaturesSupportsFloatValues vpFeatures),
-                    (cond Core.FloatTypeFloat64 (Features.dataTypeFeaturesSupportsDoubleValues vpFeatures))])
-          functionVariants = Sets.empty
-          integerTypes =
-                  Sets.fromList (Maybes.cat [
-                    cond Core.IntegerTypeInt32 (Features.dataTypeFeaturesSupportsIntegerValues vpFeatures),
-                    (cond Core.IntegerTypeInt64 (Features.dataTypeFeaturesSupportsLongValues vpFeatures))])
-          termVariants =
-                  Sets.fromList (Maybes.cat [
-                    cond Variants.TermVariantList supportsLists,
-                    (cond Variants.TermVariantLiteral supportsLiterals),
-                    (cond Variants.TermVariantMap supportsMaps),
-                    (Maybes.pure Variants.TermVariantMaybe)])
-          typeVariants =
-                  Sets.fromList (Maybes.cat [
-                    cond Variants.TypeVariantList supportsLists,
-                    (cond Variants.TypeVariantLiteral supportsLiterals),
-                    (cond Variants.TypeVariantMap supportsMaps),
-                    (Maybes.pure Variants.TypeVariantMaybe),
-                    (Maybes.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.TypeMaybe v0 -> case (Strip.deannotateType v0) of
-                        Core.TypeLiteral _ -> True
-                        _ -> False
-                      _ -> True
-      in Coders.Language {
-        Coders.languageName = name,
-        Coders.languageConstraints = Coders.LanguageConstraints {
-          Coders.languageConstraintsEliminationVariants = eliminationVariants,
-          Coders.languageConstraintsLiteralVariants = literalVariants,
-          Coders.languageConstraintsFloatTypes = floatTypes,
-          Coders.languageConstraintsFunctionVariants = functionVariants,
-          Coders.languageConstraintsIntegerTypes = integerTypes,
-          Coders.languageConstraintsTermVariants = termVariants,
-          Coders.languageConstraintsTypeVariants = typeVariants,
-          Coders.languageConstraintsTypes = typePredicate}}
diff --git a/src/main/haskell/Hydra/Tools/AvroWorkflows.hs b/src/main/haskell/Hydra/Tools/AvroWorkflows.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tools/AvroWorkflows.hs
+++ /dev/null
@@ -1,266 +0,0 @@
--- | A utility for transforming Avro-compliant JSON into other models
-
-module Hydra.Tools.AvroWorkflows (
-  TransformWorkflow(..),
-  JsonPayloadFormat(..),
-  TermEncoder(..),
-  LastMile(..),
-  defaultTinkerpopAnnotations,
-  encodeStringValue,
-  examplePgSchema,
-  executeAvroTransformWorkflow,
-  propertyGraphGraphsonLastMile,
-  rdfDescriptionsToNtriples,
-  shaclRdfLastMile,
-  typeApplicationTermToShaclRdf,
-  transformAvroJsonDirectory,
-) where
-
-import Hydra.Kernel
-import Hydra.Workflow
-import qualified Hydra.Show.Errors as ShowError
-import Hydra.Dsl.Annotations
-import qualified Hydra.Avro.Schema as Avro
-import qualified Hydra.Json.Model as Json
-import Hydra.Extract.Json
-import Hydra.Parsing (ParseResult(..), ParseSuccess(..), ParseError(..))
-import qualified Hydra.Json.Parser as JsonParser
-import Hydra.Avro.Coder
-import Hydra.Avro.Environment
-import Hydra.Avro.SchemaJson hiding (Result)
-import Hydra.Pg.Graphson.Utils
-import qualified Hydra.Shacl.Coder as Shacl
-import qualified Hydra.Rdf.Syntax as Rdf
-import qualified Hydra.Rdf.Utils as RdfUt
-import qualified Hydra.Pg.Model as PG
-import qualified Hydra.Pg.Mapping as PGM
-import Hydra.Rdf.Serde
-import Hydra.Sources.Kernel.Types.Core
-import Hydra.Pg.Graphson.Coder
-import Hydra.Pg.Graphson.Syntax as G
-import Hydra.Pg.Utils (defaultTinkerpopAnnotations, examplePgSchema, typeApplicationTermToPropertyGraph)
-import qualified Hydra.Json.Writer as JsonWriter
-
-import qualified Control.Monad as CM
-import qualified Data.Either as E
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Data.Maybe as Y
-import System.IO
-import System.FilePath
-import System.FilePath.Posix
-import System.Directory
-
-
-type Result a = Either Error a
-
--- | The last mile of a transformation, which encodes and serializes terms to a file
-data LastMile a =
-  LastMile {
-    -- | An encoder for terms to a list of output objects
-    lastMileEncoder :: (Type -> Context -> Graph -> Result (Term -> Graph -> Context -> Result [a])),
-    -- | A function which serializes a list of output objects to a string representation
-    lastMileSerializer :: ([a] -> Result String),
-    -- | A file extension for the generated file(s)
-    lastMileFileExtension :: String}
-
--- | Parse a JSON string, returning Either for compatibility
-parseJsonEither :: String -> Either String Json.Value
-parseJsonEither s = case JsonParser.parseJson s of
-  ParseResultSuccess success -> Right (parseSuccessValue success)
-  ParseResultFailure err -> Left (parseErrorMessage err)
-
-eitherToIo :: Result a -> IO a
-eitherToIo (Left ic) = fail (ShowError.error ic)
-eitherToIo (Right v) = return v
-
-data JsonPayloadFormat = Json | Jsonl
-
-type TermEncoder x = Term -> Graph -> Context -> Result [x]
-
--- | A convenience for transformAvroJsonDirectory, bundling all of the input parameters together as a workflow
-executeAvroTransformWorkflow :: LastMile x -> TransformWorkflow -> IO ()
-executeAvroTransformWorkflow lastMile (TransformWorkflow name schemaSpec srcDir destDir) = do
-    schemaPath <- case schemaSpec of
-      SchemaSpecFile p -> pure p
-      _ -> fail "unsupported schema spec"
-    putStrLn $ "Executing workflow " ++ show name ++ ":"
-    transformAvroJsonDirectory lastMile schemaPath srcDir destDir
-
--- Replace all lists with sets, for better query performance.
--- This is a last-mile step which breaks type/term conformance
--- (a more robust solution would modify the target language in the SHACL coder, so that list types are also transformed to set types).
-listsToSets :: Term -> Term
-listsToSets = rewriteTerm mapExpr
-  where
-    mapExpr recurse = recurse . replaceLists
-    replaceLists term = case term of
-      TermList els -> TermSet $ S.fromList els
-      _ -> term
-
-rdfDescriptionsToNtriples :: [Rdf.Description] -> String
-rdfDescriptionsToNtriples = rdfGraphToNtriples . RdfUt.descriptionsToGraph
-
--- | A LastMile which converts Hydra terms to GraphSON property graph JSON (JSONL format).
---   Uses the default Tinkerpop annotation schema for vertex/edge labels and IDs.
-propertyGraphGraphsonLastMile :: LastMile Json.Value
-propertyGraphGraphsonLastMile = LastMile encoder serializer "jsonl"
-  where
-    encoder typ cx graf = do
-      encodeTerm <- typeApplicationTermToPropertyGraph examplePgSchema typ () () cx graf
-      return $ \term _graf cx' -> do
-        elements <- encodeTerm term cx'
-        pgElementsToGraphson encodeStringValue elements
-    serializer jsonValues = Right $ L.unlines $ L.map JsonWriter.printJson jsonValues
-
-shaclRdfLastMile :: LastMile Rdf.Description
-shaclRdfLastMile = LastMile typeApplicationTermToShaclRdf (Right . rdfDescriptionsToNtriples) "nt"
-
-typeApplicationTermToShaclRdf :: Type -> Context -> Graph -> Result (Term -> Graph -> Context -> Result [Rdf.Description])
-typeApplicationTermToShaclRdf _ _cx _g = Right encode
-  where
-    encode term graf cx = do
-        elDescs <- CM.mapM (encodeElement cx) $ graphToBindings graf
-        termDescs <- encodeBlankTerm cx
-        return $ L.concat (termDescs:elDescs)
-      where
-        encodeElement cx' el = do
-          let subject = Rdf.ResourceIri $ RdfUt.nameToIri $ bindingName el
-          fst <$> Shacl.encodeTerm subject (listsToSets $ bindingTerm el) cx' graf
-        encodeBlankTerm cx' = if notInGraph
-          then do
-            let (subject, cx'') = RdfUt.nextBlankNode cx'
-            fst <$> Shacl.encodeTerm subject (listsToSets term) cx'' graf
-          else pure []
-        notInGraph = L.null $ L.filter (\e -> bindingTerm e == term) $ graphToBindings graf
-
-transformAvroJson :: JsonPayloadFormat -> Adapter Avro.Schema Type Json.Value Term -> LastMile x -> FilePath -> FilePath -> IO ()
-transformAvroJson format adapter lastMile inFile outFile = do
-    putStr $ "\t" ++ inFile ++ " --> "
-    contents <- readFile inFile
-    let cx = emptyContext
-    let entities = case format of
-          Json -> [contents]
-          Jsonl -> L.filter (not . L.null) $ lines contents
-    lmEncoder <- eitherToIo $ lastMileEncoder lastMile (adapterTarget adapter) cx hydraCoreGraph
-    descs <- L.concat <$> CM.mapM (jsonToTarget inFile adapter lmEncoder cx) (L.zip [1..] entities)
-    result <- eitherToIo $ lastMileSerializer lastMile descs
-    writeFile outFile result
-    putStrLn $ outFile ++ " (" ++ descEntities entities ++ ")"
-  where
-    descEntities entities = if L.length entities == 1 then "1 entity" else show (L.length entities) ++ " entities"
-
-    jsonToTarget inFile' adapter' lmEncoder cx (index, payload) = case parseJsonEither payload of
-        Left msg -> fail $ "Failed to read JSON payload #" ++ show index ++ " in file " ++ inFile' ++ ": " ++ msg
-        Right json -> do
-          term <- eitherToIo $ coderEncode (adapterCoder adapter') cx json
-          let bindings = extractElements (adapterTarget adapter') term
-          let graph = bindingsToGraph hydraCoreGraph bindings
-          eitherToIo $ lmEncoder term graph cx
-
--- | Given a payload format (one JSON object per file, or one per line),
---   a path to an Avro *.avsc schema, a path to a source directory containing JSON files conforming to the schema,
---   and a path to a destination directory, map each input file to a corresponding output file in the
---   destination directory. This transformation is sensitive to Hydra-specific annotations (primaryKey/foreignKey)
---   in the Avro schema, which tell Hydra which objects to treat as elements and which fields are references to elements.
-transformAvroJsonDirectory :: LastMile x -> FilePath -> FilePath -> FilePath -> IO ()
-transformAvroJsonDirectory lastMile schemaPath srcDir destDir = do
-    createDirectoryIfMissing True destDir
-    schemaStr <- readFile schemaPath
-    let cx = emptyContext
-    adapter <- eitherToIo $ loadAdapter cx schemaStr
-    paths <- getDirectoryContents srcDir
-    conf <- CM.mapM (transformFile adapter) paths
-    return ()
-  where
-    loadAdapter cx schemaStr = do
-      avroSchema <- coderDecode (avroSchemaStringCoder cx) cx schemaStr
-      fst <$> avroHydraAdapter cx avroSchema emptyAvroEnvironment
-
-    transformFile adapter srcFile = do
-      case jsonPayloadFormat srcFile of
-        Nothing -> return False
-        Just format -> do
-          let destFile = replaceExtension srcFile (lastMileFileExtension lastMile)
-          transformAvroJson format adapter lastMile (combine srcDir srcFile) (combine destDir destFile)
-          return True
-
-    jsonPayloadFormat fileName = if ext == ".json"
-        then Just Json
-        else if ext == ".jsonl"
-        then Just Jsonl
-        else Nothing
-      where
-        ext = takeExtension fileName
-
--- | Extract elements from a term based on @primaryKey annotations in the type.
---   Walks the type and term together; for each record with a @primaryKey field,
---   creates a Binding using the primary key value as the element name.
-extractElements :: Type -> Term -> [Binding]
-extractElements typ term = case (stripType typ, stripTerm term) of
-    (TypeRecord fieldTypes, TermRecord (Record _ fields)) ->
-      let fieldMap = M.fromList [(fieldName f, fieldTerm f) | f <- fields]
-          -- Check if this record has a @primaryKey annotation
-          selfElements = case findPrimaryKeyInType fieldTypes of
-            Nothing -> []
-            Just (pkFieldName, pkConstructor) ->
-              case M.lookup pkFieldName fieldMap of
-                Nothing -> []
-                Just pkTerm -> case extractStringFromTerm pkTerm of
-                  Nothing -> []
-                  Just pkValue ->
-                    let elementName = pkConstructor pkValue
-                    in [Binding elementName term Nothing]
-          -- Recurse into nested record fields
-          childElements = L.concatMap (\ft ->
-            case M.lookup (fieldTypeName ft) fieldMap of
-              Nothing -> []
-              Just fTerm -> extractElements (fieldTypeType ft) fTerm) fieldTypes
-      in selfElements ++ childElements
-    (TypeList innerType, TermList terms) ->
-      L.concatMap (extractElements innerType) terms
-    (TypeMaybe innerType, TermMaybe (Just t)) ->
-      extractElements innerType t
-    _ -> []
-  where
-    stripType t = case t of
-      TypeAnnotated (AnnotatedType inner _) -> stripType inner
-      TypeWrap inner -> stripType inner
-      _ -> t
-    stripTerm t = case t of
-      TermAnnotated (AnnotatedTerm inner _) -> stripTerm inner
-      _ -> t
-
--- | Find a @primaryKey annotation among the record's field types.
---   Returns the field name and constructor function if found.
-findPrimaryKeyInType :: [FieldType] -> Maybe (Name, String -> Name)
-findPrimaryKeyInType fieldTypes = Y.listToMaybe $ Y.mapMaybe checkField fieldTypes
-  where
-    checkField (FieldType fname ftyp) = case ftyp of
-      TypeAnnotated (AnnotatedType _ anns) ->
-        case M.lookup (Name "@primaryKey") anns of
-          Just (TermLiteral (LiteralString pattern_)) -> Just (fname, patternToName pattern_)
-          _ -> Nothing
-      _ -> Nothing
-    patternToName pattern_ value = Name $ L.intercalate value $ splitOn "${}" pattern_
-    splitOn :: String -> String -> [String]
-    splitOn sep s = case L.break (== head sep) s of
-      (before, []) -> [before]
-      (before, rest) ->
-        if L.take (length sep) rest == sep
-        then before : splitOn sep (L.drop (length sep) rest)
-        else [s]
-
--- | Extract a string value from a term (handling wraps and literals)
-extractStringFromTerm :: Term -> Maybe String
-extractStringFromTerm term = case term of
-  TermLiteral (LiteralString s) -> Just s
-  TermAnnotated (AnnotatedTerm inner _) -> extractStringFromTerm inner
-  TermVariable (Name s) -> Just s  -- Foreign key references are stored as variables
-  _ -> Nothing
-
--- | Build a Graph from a base graph and a list of bindings (elements)
-bindingsToGraph :: Graph -> [Binding] -> Graph
-bindingsToGraph base bindings = base {
-  graphBoundTerms = M.union (M.fromList [(bindingName b, bindingTerm b) | b <- bindings]) (graphBoundTerms base)}
diff --git a/src/main/haskell/Hydra/Tools/Bytestrings.hs b/src/main/haskell/Hydra/Tools/Bytestrings.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tools/Bytestrings.hs
+++ /dev/null
@@ -1,14 +0,0 @@
--- | Utilities for converting between lazy ByteStrings and Strings via UTF-8 encoding
-
-module Hydra.Tools.Bytestrings where
-
-import qualified Data.ByteString.Lazy as BS
-import qualified Data.Text.Lazy.Encoding as DTE
-import qualified Data.Text.Lazy as TL
-
-
-bytesToString :: BS.ByteString -> String
-bytesToString = TL.unpack . DTE.decodeUtf8
-
-stringToBytes :: String -> BS.ByteString
-stringToBytes = DTE.encodeUtf8 . TL.pack
diff --git a/src/main/haskell/Hydra/Tools/Csv.hs b/src/main/haskell/Hydra/Tools/Csv.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tools/Csv.hs
+++ /dev/null
@@ -1,133 +0,0 @@
--- | A collection of tools for working with comma-separated values (CSVs).
-
-module Hydra.Tools.Csv where
-
-import Hydra.Kernel
-import Hydra.Tabular
-import qualified Hydra.Relational as RM
-import Hydra.Tools.Tabular
-
-import qualified Control.Monad as CM
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Maybe as Y
-
-
--- Untyped tables --------------------------------------------------------------
-
--- | Encodes a single DataRow as a line of a CSV, and vice versa.
---   No support for optional cells; only empty strings. No attempt is made to check that rows are of a consistent width.
-dataRowCsvCoder :: Coder (DataRow String) String
-dataRowCsvCoder = Coder encode decode
-  where
-    encode _cx (DataRow cells) = Right $ encodeCsvLine $ Y.catMaybes cells
-    decode _cx line = Right $ DataRow $ fmap Just $ decodeCsvLine line
-
-tableCsvCoder :: Bool -> Coder (Table String) [String]
-tableCsvCoder hasHeader = Coder encode decode
-  where
-    encode cx (Table mheader rows) = do
-        hrows <- headerRows
-        drows <- CM.mapM (coderEncode dataRowCsvCoder cx) rows
-        return $ hrows ++ drows
-      where
-        headerRows = if hasHeader
-          then case mheader of
-            Just (HeaderRow names) -> Right [encodeCsvLine names]
-            Nothing -> Left $ ErrorOther (OtherError "missing header")
-          else Right []
-    decode cx rows = do
-        (mheader, rest) <- if hasHeader
-          then if L.null rows
-            then Left $ ErrorOther (OtherError "missing header")
-            else Right (Just $ HeaderRow $ decodeCsvLine $ head rows, tail rows)
-          else Right (Nothing, rows)
-        drows <- CM.mapM (coderDecode dataRowCsvCoder cx) rest
-        return $ Table mheader drows
-
-
--- Relational tables -----------------------------------------------------------
-
-type DomainCoders t v = M.Map t (Coder v String)
-
-relationCsvCoder :: (Ord t, Show t) => DomainCoders t v -> RM.RelationSchema t -> Bool -> Context -> Either Error (Coder (RM.Relation v) [String])
-relationCsvCoder coderMap schema hasHeader cx = do
-    coder <- rowCsvCoder coderMap schema cx
-    return $ Coder (encode coder) (decode coder)
-  where
-    encode coder cx (RM.Relation rows) = do
-        dataRows <- CM.mapM (coderEncode coder cx) rows
-        return $ headerRows ++ dataRows
-      where
-        headerRows = if hasHeader
-          then [encodeCsvLine (RM.unColumnName . RM.columnSchemaName <$> (RM.relationSchemaColumns schema))]
-          else []
-    decode coder cx inRows = do
-        outRows <- CM.mapM (coderDecode coder cx) dataRows
-        return $ RM.Relation outRows
-      where
-        dataRows = if hasHeader then L.tail inRows else inRows
-
--- | Encodes a single Row as a line of a CSV, and vice versa.
-rowCsvCoder :: (Ord t, Show t) => DomainCoders t v -> RM.RelationSchema t -> Context -> Either Error (Coder (RM.Row v) String)
-rowCsvCoder coderMap schema cx = do
-    coders <- CM.mapM findCoder (RM.columnSchemaDomain <$> RM.relationSchemaColumns schema)
-    return $ Coder (encode coders) (decode coders)
-  where
-    encode coders cx' (RM.Row cells) = encodeCsvLine <$> (encodeCells cx' coders cells)
-    decode coders cx' line = RM.Row <$> (decodeCells cx' coders $ decodeCsvLine line)
-    findCoder typ = case M.lookup typ coderMap of
-      Nothing -> Left $ ErrorOther (OtherError $ "no coder for type: " ++ show typ)
-      Just c -> pure c
-    encodeCells cx' coders = CM.zipWithM (\c v -> coderEncode c cx' v) coders
-    decodeCells cx' coders = CM.zipWithM (\c v -> coderDecode c cx' v) coders
-
-stringCoders :: DomainCoders () String
-stringCoders = M.singleton () $ Coder encode decode
-  where
-    encode _cx s = Right s
-    decode _cx s = Right s
-
-stringSchema :: Int -> RM.RelationSchema ()
-stringSchema len = RM.RelationSchema (RM.RelationName $ "StringTable" ++ show len) (colSchema <$> [1..len]) [] []
-  where
-    colSchema i = RM.ColumnSchema (RM.ColumnName $ "Column" ++ show i) ()
-
--- Common functions ------------------------------------------------------------
-
-decodeCsvCell :: String -> String
-decodeCsvCell ('"':xs) = decodeCsvQuotes (init xs)  -- Remove surrounding quotes
-decodeCsvCell cell = cell  -- If not quoted, return as is
-
-decodeCsvLine :: String -> [String]
-decodeCsvLine xs = fmap decodeCsvCell (splitCsvLine xs)
-
-decodeCsvQuotes :: String -> String
-decodeCsvQuotes [] = []
-decodeCsvQuotes ('"':'"':ys) = '"' : decodeCsvQuotes ys  -- Handle escaped quotes
-decodeCsvQuotes (y:ys) = y : decodeCsvQuotes ys
-
-encodeCsvCell :: String -> String
-encodeCsvCell cell
-  | any (`elem` cell) [',', '\n', '"'] = '"' : escapeCsvQuotes cell ++ "\""
-  | otherwise = cell
-
-encodeCsvLine :: [String] -> String
-encodeCsvLine = L.intercalate "," . fmap encodeCsvCell
-
-escapeCsvQuotes :: String -> String
-escapeCsvQuotes [] = []
-escapeCsvQuotes (x:xs)
-  | x == '"'  = '"' : '"' : escapeCsvQuotes xs
-  | otherwise = x : escapeCsvQuotes xs
-
-splitCsvLine :: String -> [String]
-splitCsvLine [] = []
-splitCsvLine ('"':xs) = ('"':quoted ++ "\"") : splitCsvLine next
-  where
-    (quoted, rest) = span (/= '"') xs
-    afterQuote = drop 1 rest  -- Skip closing quote
-    next = dropWhile (== ',') afterQuote  -- Skip comma
-splitCsvLine xs = cell : splitCsvLine (drop 1 rest)  -- Skip comma
-  where
-    (cell, rest) = break (== ',') xs
diff --git a/src/main/haskell/Hydra/Tools/Debug.hs b/src/main/haskell/Hydra/Tools/Debug.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tools/Debug.hs
+++ /dev/null
@@ -1,12 +0,0 @@
--- | Debugging utilities
-
-module Hydra.Tools.Debug where
-
-import Control.Exception
-
-newtype DebugException = DebugException String deriving Show
-
-instance Exception DebugException
-
-throwDebugException :: String -> c
-throwDebugException = throw . DebugException
diff --git a/src/main/haskell/Hydra/Tools/Tabular.hs b/src/main/haskell/Hydra/Tools/Tabular.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Tools/Tabular.hs
+++ /dev/null
@@ -1,55 +0,0 @@
--- | A loose collection of tools for working with tabular data, including CSVs.
-
-module Hydra.Tools.Tabular (
-  referenceCoder,
-  tabularAdapter,
-) where
-
-import Hydra.Kernel
-import Hydra.Tabular
-import qualified Hydra.Show.Core as ShowCore
-
-import qualified Control.Monad as CM
-import qualified Data.List as L
-import qualified Data.Map as M
-
-
--- | Consumes a map of field names to value coders, producing a record coder.
---   The record coder maps records with concrete values on the left, to records with references on the right, and vice versa.
---   Fields not designated in the map are unaffected; they are simply copied as-is in either direction.
---   For fields designated in the map, terms on the right *must* be variables.
-referenceCoder :: (M.Map Name (Coder Term Name)) -> Coder Record Record
-referenceCoder fieldCoders = Coder encode decode
-  where
-    encode cx (Record tname fields) = Record tname <$> CM.sequence (encodeField <$> fields)
-      where
-        encodeField field@(Field fname fterm) = case M.lookup fname fieldCoders of
-          Just coder -> Field fname <$> (TermVariable <$> coderEncode coder cx fterm)
-          Nothing -> return field
-    decode cx (Record tname fields) = Record tname <$> CM.sequence (decodeField <$> fields)
-      where
-        decodeField field@(Field fname fterm) = case M.lookup fname fieldCoders of
-          Just coder -> case fterm of
-            TermVariable v -> Field fname <$> coderDecode coder cx v
-            _ -> Left $ ErrorOther (OtherError $ "expected variable, found: " ++ ShowCore.term fterm)
-          Nothing -> return field
-
--- | Consumes a type name and field types plus a cell-level coder, producing a record coder.
---   The record coder maps data rows on the left to records on the right, and vice versa.
-tabularAdapter :: Name -> [FieldType] -> (Type -> Coder (Maybe v) Term) -> Coder (DataRow v) Record
-tabularAdapter typeName fieldTypes cellAdapter = Coder encode decode
-  where
-    cellCoders = cellAdapter <$> (fieldTypeType <$> fieldTypes)
-    encode cx (DataRow cells) = do
-      values <- CM.zipWithM (\coder cell -> coderEncode coder cx cell) cellCoders cells
-      let fields = L.zipWith Field (fieldTypeName <$> fieldTypes) values
-      return $ Record typeName fields
-    decode cx (Record tname fields) = do
-      if (tname /= typeName)
-        then Left $ ErrorOther (OtherError $ "expected record of type " ++ unName typeName ++ ", found record of type " ++ unName tname)
-        else DataRow <$> CM.sequence (fieldDecoders cx <*> fields)
-    fieldDecoders cx = L.zipWith (decodeField cx) fieldTypes cellCoders
-      where
-        decodeField cx fieldType coder field = if (fieldName field /= fieldTypeName fieldType)
-          then Left $ ErrorOther (OtherError $ "expected field " ++ unName (fieldTypeName fieldType) ++ ", found field " ++ unName (fieldName field))
-          else coderDecode coder cx (fieldTerm field)
diff --git a/src/main/haskell/Hydra/Topology.hs b/src/main/haskell/Hydra/Topology.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Topology.hs
+++ /dev/null
@@ -1,46 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A model for simple graphs as adjacency lists
-
-module Hydra.Topology 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
-import qualified Data.Set as S
--- | A directed graph represented as an adjacency list mapping vertices to their outgoing neighbors
-type Graph = (M.Map Vertex [Vertex])
-_Graph = Core.Name "hydra.topology.Graph"
-data OrderingIsomorphism a =
-  OrderingIsomorphism {
-    -- | Mapping from source ordering to target ordering
-    orderingIsomorphismEncode :: ([a] -> [a]),
-    -- | Mapping from target ordering to source ordering
-    orderingIsomorphismDecode :: ([a] -> [a])}
-_OrderingIsomorphism = Core.Name "hydra.topology.OrderingIsomorphism"
-_OrderingIsomorphism_encode = Core.Name "encode"
-_OrderingIsomorphism_decode = Core.Name "decode"
-data TarjanState =
-  TarjanState {
-    -- | Next available index for vertices in the DFS traversal
-    tarjanStateCounter :: Int,
-    -- | Mapping from vertices to their indices in the DFS traversal
-    tarjanStateIndices :: (M.Map Vertex Int),
-    -- | Mapping from vertices to their lowest reachable index in the DFS traversal
-    tarjanStateLowLinks :: (M.Map Vertex Int),
-    -- | Current DFS stack, with vertices in reverse order
-    tarjanStateStack :: [Vertex],
-    -- | Set of vertices currently on the stack, for quick lookup
-    tarjanStateOnStack :: (S.Set Vertex),
-    -- | Accumulated strongly connected components, each a list of vertices
-    tarjanStateSccs :: [[Vertex]]}
-  deriving (Eq, Ord, Read, Show)
-_TarjanState = Core.Name "hydra.topology.TarjanState"
-_TarjanState_counter = Core.Name "counter"
-_TarjanState_indices = Core.Name "indices"
-_TarjanState_lowLinks = Core.Name "lowLinks"
-_TarjanState_stack = Core.Name "stack"
-_TarjanState_onStack = Core.Name "onStack"
-_TarjanState_sccs = Core.Name "sccs"
--- | A graph vertex, represented as a 32-bit integer identifier
-type Vertex = Int
-_Vertex = Core.Name "hydra.topology.Vertex"
diff --git a/src/main/haskell/Hydra/TypeScript/Language.hs b/src/main/haskell/Hydra/TypeScript/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/TypeScript/Language.hs
+++ /dev/null
@@ -1,132 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for TypeScript
-
-module Hydra.TypeScript.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-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.Set as S
-
--- | Language constraints for TypeScript
-typeScriptLanguage :: Coders.Language
-typeScriptLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.typeScript"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = types}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes = Sets.fromList [
-      Core.FloatTypeFloat64]
-    functionVariants = Sets.empty
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord,
-          Variants.TermVariantInject]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantUnion]
-    types =
-        \x -> case x of
-          Core.TypeMap v0 -> case (Strip.deannotateType (Core.mapTypeValues v0)) of
-            Core.TypeMaybe _ -> False
-            _ -> True
-          _ -> True
-
--- | A set of reserved words in TypeScript. Taken directly from https://github.com/microsoft/TypeScript/issues/2536
-typeScriptReservedWords :: S.Set String
-typeScriptReservedWords =
-    Sets.fromList (Lists.concat [
-      reservedWords,
-      strictModeReservedWords,
-      contextuallKeywords])
-  where
-    reservedWords =
-        [
-          "delete",
-          "do",
-          "else",
-          "enum",
-          "export",
-          "extends",
-          "false",
-          "finally",
-          "for",
-          "function",
-          "if",
-          "import",
-          "in",
-          "instanceof",
-          "new",
-          "null",
-          "return",
-          "super",
-          "switch",
-          "this",
-          "throw",
-          "true",
-          "try",
-          "typeof",
-          "var",
-          "void",
-          "while",
-          "with"]
-    strictModeReservedWords =
-        [
-          "as",
-          "implements",
-          "interface",
-          "let",
-          "package",
-          "private",
-          "protected",
-          "public",
-          "static",
-          "yield"]
-    contextuallKeywords =
-        [
-          "any",
-          "boolean",
-          "constructor",
-          "declare",
-          "from",
-          "get",
-          "module",
-          "number",
-          "of",
-          "require",
-          "set",
-          "string",
-          "symbol",
-          "type"]
diff --git a/src/main/haskell/Hydra/TypeScript/Model.hs b/src/main/haskell/Hydra/TypeScript/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/TypeScript/Model.hs
+++ /dev/null
@@ -1,107 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A basic TypeScript model, constructed on the basis of the typescriptlang.org documentation
-
-module Hydra.TypeScript.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
-
-data FunctionType =
-  FunctionType {
-    functionTypeParameters :: [Parameter],
-    functionTypeRange :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_FunctionType = Core.Name "hydra.typeScript.model.FunctionType"
-
-_FunctionType_parameters = Core.Name "parameters"
-
-_FunctionType_range = Core.Name "range"
-
-data Parameter =
-  Parameter {
-    parameterName :: String,
-    parameterType :: Type}
-  deriving (Eq, Ord, Read, Show)
-
-_Parameter = Core.Name "hydra.typeScript.model.Parameter"
-
-_Parameter_name = Core.Name "name"
-
-_Parameter_type = Core.Name "type"
-
-data PrimitiveType =
-  -- | integers in the arbitrary precision format
-  PrimitiveTypeBigint  |
-  -- | true and false
-  PrimitiveTypeBoolean  |
-  -- | equivalent to the unit type
-  PrimitiveTypeNull  |
-  -- | a double-precision IEEE 754 floating point
-  PrimitiveTypeNumber  |
-  -- | similar to records
-  PrimitiveTypeObject  |
-  -- | an immutable UTF-16 string
-  PrimitiveTypeString  |
-  -- | a unique value usually used as a key
-  PrimitiveTypeSymbol  |
-  -- | also equivalent to the unit type
-  PrimitiveTypeUndefined
-  deriving (Eq, Ord, Read, Show)
-
-_PrimitiveType = Core.Name "hydra.typeScript.model.PrimitiveType"
-
-_PrimitiveType_bigint = Core.Name "bigint"
-
-_PrimitiveType_boolean = Core.Name "boolean"
-
-_PrimitiveType_null = Core.Name "null"
-
-_PrimitiveType_number = Core.Name "number"
-
-_PrimitiveType_object = Core.Name "object"
-
-_PrimitiveType_string = Core.Name "string"
-
-_PrimitiveType_symbol = Core.Name "symbol"
-
-_PrimitiveType_undefined = Core.Name "undefined"
-
-data Type =
-  -- | mutable arrays, also written Array<T>
-  TypeArray Type |
-  -- | functions
-  TypeFunction FunctionType |
-  -- | the bottom type
-  TypeNever  |
-  -- | e.g. { property: Type }
-  TypeObjectLiteral  |
-  -- | A primitive type
-  TypePrimitive PrimitiveType |
-  -- | tuples, which are fixed-length but mutable
-  TypeTuple [Type] |
-  -- | The top type
-  TypeUnknown  |
-  -- | for functions with no documented return value
-  TypeVoid
-  deriving (Eq, Ord, Read, Show)
-
-_Type = Core.Name "hydra.typeScript.model.Type"
-
-_Type_array = Core.Name "array"
-
-_Type_function = Core.Name "function"
-
-_Type_never = Core.Name "never"
-
-_Type_objectLiteral = Core.Name "objectLiteral"
-
-_Type_primitive = Core.Name "primitive"
-
-_Type_tuple = Core.Name "tuple"
-
-_Type_unknown = Core.Name "unknown"
-
-_Type_void = Core.Name "void"
diff --git a/src/main/haskell/Hydra/Typing.hs b/src/main/haskell/Hydra/Typing.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Typing.hs
+++ /dev/null
@@ -1,81 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Types supporting type inference and type reconstruction.
-
-module Hydra.Typing where
-import qualified Hydra.Context as Context
-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
--- | A structured representation of a function term's components, replacing ad-hoc tuples. This captures all the information extracted from peeling lambdas, type lambdas, lets, and type applications from a term.
-data FunctionStructure env =
-  FunctionStructure {
-    -- | Type parameters (from type lambdas)
-    functionStructureTypeParams :: [Core.Name],
-    -- | Value parameters (from lambdas)
-    functionStructureParams :: [Core.Name],
-    -- | Let bindings accumulated from the term
-    functionStructureBindings :: [Core.Binding],
-    -- | The body term after removing all lambdas, lets, etc.
-    functionStructureBody :: Core.Term,
-    -- | Domain types of the value parameters
-    functionStructureDomains :: [Core.Type],
-    -- | The return type of the function (if type inference succeeded)
-    functionStructureCodomain :: (Maybe Core.Type),
-    -- | Updated environment after processing all bindings
-    functionStructureEnvironment :: env}
-  deriving (Eq, Ord, Read, Show)
-_FunctionStructure = Core.Name "hydra.typing.FunctionStructure"
-_FunctionStructure_typeParams = Core.Name "typeParams"
-_FunctionStructure_params = Core.Name "params"
-_FunctionStructure_bindings = Core.Name "bindings"
-_FunctionStructure_body = Core.Name "body"
-_FunctionStructure_domains = Core.Name "domains"
-_FunctionStructure_codomain = Core.Name "codomain"
-_FunctionStructure_environment = Core.Name "environment"
--- | The result of applying inference rules to a term.
-data InferenceResult =
-  InferenceResult {
-    -- | The term which was inferred
-    inferenceResultTerm :: Core.Term,
-    -- | The inferred type of the term
-    inferenceResultType :: Core.Type,
-    -- | The type substitution resulting from unification
-    inferenceResultSubst :: TypeSubst,
-    -- | Class constraints discovered during inference (e.g., Ord constraints from Map.lookup)
-    inferenceResultClassConstraints :: (M.Map Core.Name Core.TypeVariableMetadata),
-    -- | The updated context after inference (carries fresh variable state)
-    inferenceResultContext :: Context.Context}
-  deriving (Eq, Ord, Read, Show)
-_InferenceResult = Core.Name "hydra.typing.InferenceResult"
-_InferenceResult_term = Core.Name "term"
-_InferenceResult_type = Core.Name "type"
-_InferenceResult_subst = Core.Name "subst"
-_InferenceResult_classConstraints = Core.Name "classConstraints"
-_InferenceResult_context = Core.Name "context"
--- | A substitution of term variables for terms
-newtype TermSubst =
-  TermSubst {
-    unTermSubst :: (M.Map Core.Name Core.Term)}
-  deriving (Eq, Ord, Read, Show)
-_TermSubst = Core.Name "hydra.typing.TermSubst"
--- | An assertion that two types can be unified into a single type
-data TypeConstraint =
-  TypeConstraint {
-    -- | The left-hand side of the constraint
-    typeConstraintLeft :: Core.Type,
-    -- | The right-hand side of the constraint
-    typeConstraintRight :: Core.Type,
-    -- | A description of the type constraint which may be used for tracing or debugging
-    typeConstraintComment :: String}
-  deriving (Eq, Ord, Read, Show)
-_TypeConstraint = Core.Name "hydra.typing.TypeConstraint"
-_TypeConstraint_left = Core.Name "left"
-_TypeConstraint_right = Core.Name "right"
-_TypeConstraint_comment = Core.Name "comment"
--- | A substitution of type variables for types
-newtype TypeSubst =
-  TypeSubst {
-    unTypeSubst :: (M.Map Core.Name Core.Type)}
-  deriving (Eq, Ord, Read, Show)
-_TypeSubst = Core.Name "hydra.typing.TypeSubst"
diff --git a/src/main/haskell/Hydra/Unification.hs b/src/main/haskell/Hydra/Unification.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Unification.hs
+++ /dev/null
@@ -1,166 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Utilities for type unification.
-
-module Hydra.Unification where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Substitution as Substitution
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Join two types, producing a list of type constraints.The comment is used to provide context for the constraints.
-joinTypes :: t0 -> Core.Type -> Core.Type -> String -> Either Errors.UnificationError [Typing.TypeConstraint]
-joinTypes cx left right comment =
-
-      let sleft = Strip.deannotateType left
-          sright = Strip.deannotateType right
-          joinOne =
-                  \l -> \r -> Typing.TypeConstraint {
-                    Typing.typeConstraintLeft = l,
-                    Typing.typeConstraintRight = r,
-                    Typing.typeConstraintComment = (Strings.cat2 "join types; " comment)}
-          cannotUnify =
-                  Left (Errors.UnificationError {
-                    Errors.unificationErrorLeftType = sleft,
-                    Errors.unificationErrorRightType = sright,
-                    Errors.unificationErrorMessage = (Strings.cat2 (Strings.cat2 (Strings.cat2 "cannot unify " (ShowCore.type_ sleft)) " with ") (ShowCore.type_ sright))})
-          assertEqual = Logic.ifElse (Equality.equal sleft sright) (Right []) cannotUnify
-          joinList =
-                  \lefts -> \rights -> Logic.ifElse (Equality.equal (Lists.length lefts) (Lists.length rights)) (Right (Lists.zipWith joinOne lefts rights)) cannotUnify
-          joinRowTypes =
-                  \left2 -> \right2 -> Logic.ifElse (Logic.and (Equality.equal (Lists.length (Lists.map Core.fieldTypeName left2)) (Lists.length (Lists.map Core.fieldTypeName right2))) (Lists.foldl Logic.and True (Lists.zipWith (\left3 -> \right3 -> Equality.equal (Core.unName left3) (Core.unName right3)) (Lists.map Core.fieldTypeName left2) (Lists.map Core.fieldTypeName right2)))) (joinList (Lists.map Core.fieldTypeType left2) (Lists.map Core.fieldTypeType right2)) cannotUnify
-      in case sleft of
-        Core.TypeApplication v0 -> case sright of
-          Core.TypeApplication v1 -> Right [
-            joinOne (Core.applicationTypeFunction v0) (Core.applicationTypeFunction v1),
-            (joinOne (Core.applicationTypeArgument v0) (Core.applicationTypeArgument v1))]
-          _ -> cannotUnify
-        Core.TypeEither v0 -> case sright of
-          Core.TypeEither v1 -> Right [
-            joinOne (Core.eitherTypeLeft v0) (Core.eitherTypeLeft v1),
-            (joinOne (Core.eitherTypeRight v0) (Core.eitherTypeRight v1))]
-          _ -> cannotUnify
-        Core.TypeFunction v0 -> case sright of
-          Core.TypeFunction v1 -> Right [
-            joinOne (Core.functionTypeDomain v0) (Core.functionTypeDomain v1),
-            (joinOne (Core.functionTypeCodomain v0) (Core.functionTypeCodomain v1))]
-          _ -> cannotUnify
-        Core.TypeList v0 -> case sright of
-          Core.TypeList v1 -> Right [
-            joinOne v0 v1]
-          _ -> cannotUnify
-        Core.TypeLiteral _ -> assertEqual
-        Core.TypeMap v0 -> case sright of
-          Core.TypeMap v1 -> Right [
-            joinOne (Core.mapTypeKeys v0) (Core.mapTypeKeys v1),
-            (joinOne (Core.mapTypeValues v0) (Core.mapTypeValues v1))]
-          _ -> cannotUnify
-        Core.TypeMaybe v0 -> case sright of
-          Core.TypeMaybe v1 -> Right [
-            joinOne v0 v1]
-          _ -> cannotUnify
-        Core.TypePair v0 -> case sright of
-          Core.TypePair v1 -> Right [
-            joinOne (Core.pairTypeFirst v0) (Core.pairTypeFirst v1),
-            (joinOne (Core.pairTypeSecond v0) (Core.pairTypeSecond v1))]
-          _ -> cannotUnify
-        Core.TypeRecord v0 -> case sright of
-          Core.TypeRecord v1 -> joinRowTypes v0 v1
-          _ -> cannotUnify
-        Core.TypeSet v0 -> case sright of
-          Core.TypeSet v1 -> Right [
-            joinOne v0 v1]
-          _ -> cannotUnify
-        Core.TypeUnion v0 -> case sright of
-          Core.TypeUnion v1 -> joinRowTypes v0 v1
-          _ -> cannotUnify
-        Core.TypeUnit -> case sright of
-          Core.TypeUnit -> Right []
-          _ -> cannotUnify
-        Core.TypeVoid -> case sright of
-          Core.TypeVoid -> Right []
-          _ -> cannotUnify
-        Core.TypeWrap v0 -> case sright of
-          Core.TypeWrap v1 -> Right [
-            joinOne v0 v1]
-          _ -> cannotUnify
-        _ -> cannotUnify
--- | Robinson's algorithm, following https://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec23.pdf
--- | Specifically this is an implementation of the following rules:
--- |   * Unify({(x, t)} ∪ E) = {t/x} Unify(E{t/x}) if x ∉ FV(t)
--- |   * Unify(∅) = I (the identity substitution x ↦ x)
--- |   * Unify({(x, x)} ∪ E) = Unify(E)
--- |   * Unify({(f(s1, ..., sn), f(t1, ..., tn))} ∪ E) = Unify({(s1, t1), ..., (sn, tn)} ∪ E))
-unifyTypeConstraints :: t0 -> M.Map Core.Name t1 -> [Typing.TypeConstraint] -> Either Errors.UnificationError Typing.TypeSubst
-unifyTypeConstraints cx schemaTypes constraints =
-
-      let withConstraint =
-              \c -> \rest ->
-                let sleft = Strip.deannotateType (Typing.typeConstraintLeft c)
-                    sright = Strip.deannotateType (Typing.typeConstraintRight c)
-                    comment = Typing.typeConstraintComment c
-                    bind =
-                            \v -> \t ->
-                              let subst = Substitution.singletonTypeSubst v t
-                                  withResult = \s -> Substitution.composeTypeSubst subst s
-                              in (Eithers.map withResult (unifyTypeConstraints cx schemaTypes (Substitution.substituteInConstraints subst rest)))
-                    tryBinding =
-                            \v -> \t -> Logic.ifElse (variableOccursInType v t) (Left (Errors.UnificationError {
-                              Errors.unificationErrorLeftType = sleft,
-                              Errors.unificationErrorRightType = sright,
-                              Errors.unificationErrorMessage = (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "Variable " (Core.unName v)) " appears free in type ") (ShowCore.type_ t)) " (") comment) ")")})) (bind v t)
-                    noVars =
-
-                              let withConstraints = \constraints2 -> unifyTypeConstraints cx schemaTypes (Lists.concat2 constraints2 rest)
-                              in (Eithers.bind (joinTypes cx sleft sright comment) withConstraints)
-                    dflt =
-                            case sright of
-                              Core.TypeVariable v0 -> tryBinding v0 sleft
-                              _ -> noVars
-                in case sleft of
-                  Core.TypeVariable v0 -> case sright of
-                    Core.TypeVariable v1 -> Logic.ifElse (Equality.equal (Core.unName v0) (Core.unName v1)) (unifyTypeConstraints cx schemaTypes rest) (Logic.ifElse (Maybes.isJust (Maps.lookup v0 schemaTypes)) (Logic.ifElse (Maybes.isJust (Maps.lookup v1 schemaTypes)) (Left (Errors.UnificationError {
-                      Errors.unificationErrorLeftType = sleft,
-                      Errors.unificationErrorRightType = sright,
-                      Errors.unificationErrorMessage = (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "Attempted to unify schema names " (Core.unName v0)) " and ") (Core.unName v1)) " (") comment) ")")})) (bind v1 sleft)) (bind v0 sright))
-                    _ -> tryBinding v0 sright
-                  _ -> dflt
-      in (Maybes.maybe (Right Substitution.idTypeSubst) (\uc -> withConstraint (Pairs.first uc) (Pairs.second uc)) (Lists.uncons constraints))
-unifyTypeLists :: t0 -> M.Map Core.Name t1 -> [Core.Type] -> [Core.Type] -> String -> Either Errors.UnificationError Typing.TypeSubst
-unifyTypeLists cx schemaTypes l r comment =
-
-      let toConstraint =
-              \l2 -> \r2 -> Typing.TypeConstraint {
-                Typing.typeConstraintLeft = l2,
-                Typing.typeConstraintRight = r2,
-                Typing.typeConstraintComment = comment}
-      in (unifyTypeConstraints cx schemaTypes (Lists.zipWith toConstraint l r))
-unifyTypes :: t0 -> M.Map Core.Name t1 -> Core.Type -> Core.Type -> String -> Either Errors.UnificationError Typing.TypeSubst
-unifyTypes cx schemaTypes l r comment =
-    unifyTypeConstraints cx schemaTypes [
-      Typing.TypeConstraint {
-        Typing.typeConstraintLeft = l,
-        Typing.typeConstraintRight = r,
-        Typing.typeConstraintComment = comment}]
--- | Determine whether a type variable appears within a type expression.No distinction is made between free and bound type variables.
-variableOccursInType :: Core.Name -> Core.Type -> Bool
-variableOccursInType var typ0 =
-
-      let tryType =
-              \b -> \typ -> case typ of
-                Core.TypeVariable v0 -> Logic.or b (Equality.equal (Core.unName v0) (Core.unName var))
-                _ -> b
-      in (Rewriting.foldOverType Coders.TraversalOrderPre tryType False typ0)
diff --git a/src/main/haskell/Hydra/Util.hs b/src/main/haskell/Hydra/Util.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Util.hs
+++ /dev/null
@@ -1,39 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | General-purpose utility types used across Hydra.
-
-module Hydra.Util 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 naming convention for symbols, such as camelCase or snake_case
-data CaseConvention =
-  CaseConventionCamel |
-  CaseConventionPascal |
-  CaseConventionLowerSnake |
-  CaseConventionUpperSnake
-  deriving (Eq, Ord, Read, Show)
-_CaseConvention = Core.Name "hydra.util.CaseConvention"
-_CaseConvention_camel = Core.Name "camel"
-_CaseConvention_pascal = Core.Name "pascal"
-_CaseConvention_lowerSnake = Core.Name "lowerSnake"
-_CaseConvention_upperSnake = Core.Name "upperSnake"
--- | An equality judgement: less than, equal to, or greater than
-data Comparison =
-  ComparisonLessThan |
-  ComparisonEqualTo |
-  ComparisonGreaterThan
-  deriving (Eq, Ord, Read, Show)
-_Comparison = Core.Name "hydra.util.Comparison"
-_Comparison_lessThan = Core.Name "lessThan"
-_Comparison_equalTo = Core.Name "equalTo"
-_Comparison_greaterThan = Core.Name "greaterThan"
--- | Numeric precision: arbitrary precision, or precision to a specified number of bits
-data Precision =
-  -- | Arbitrary precision
-  PrecisionArbitrary |
-  -- | Precision to a specified number of bits
-  PrecisionBits Int
-  deriving (Eq, Ord, Read, Show)
-_Precision = Core.Name "hydra.util.Precision"
-_Precision_arbitrary = Core.Name "arbitrary"
-_Precision_bits = Core.Name "bits"
diff --git a/src/main/haskell/Hydra/Validate/Core.hs b/src/main/haskell/Hydra/Validate/Core.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Validate/Core.hs
+++ /dev/null
@@ -1,334 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Validation functions for core terms and types
-
-module Hydra.Validate.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Check for duplicate binding names in a list of bindings
-checkDuplicateBindings :: Paths.SubtermPath -> [Core.Binding] -> Maybe ErrorCore.InvalidTermError
-checkDuplicateBindings path bindings =
-
-      let names = Lists.map Core.bindingName bindings
-          dup = findDuplicate names
-      in (Maybes.map (\name -> ErrorCore.InvalidTermErrorDuplicateBinding (ErrorCore.DuplicateBindingError {
-        ErrorCore.duplicateBindingErrorLocation = path,
-        ErrorCore.duplicateBindingErrorName = name})) dup)
--- | Check for duplicate field names in a list of field types
-checkDuplicateFieldTypes :: [Core.FieldType] -> (Core.Name -> Maybe t0) -> Maybe t0
-checkDuplicateFieldTypes fields mkError =
-
-      let names = Lists.map Core.fieldTypeName fields
-          dup = findDuplicateFieldType names
-      in (Maybes.cases dup Nothing (\name -> mkError name))
--- | Check for duplicate field names in a list of fields
-checkDuplicateFields :: Paths.SubtermPath -> [Core.Name] -> Maybe ErrorCore.InvalidTermError
-checkDuplicateFields path names =
-
-      let dup = findDuplicate names
-      in (Maybes.map (\name -> ErrorCore.InvalidTermErrorDuplicateField (ErrorCore.DuplicateFieldError {
-        ErrorCore.duplicateFieldErrorLocation = path,
-        ErrorCore.duplicateFieldErrorName = name})) dup)
--- | Check if any name in a list shadows a variable already in scope
-checkShadowing :: Paths.SubtermPath -> Graph.Graph -> [Core.Name] -> Maybe ErrorCore.InvalidTermError
-checkShadowing path cx names =
-
-      let result =
-              Lists.foldl (\acc -> \name -> Maybes.cases acc (Logic.ifElse (Logic.or (Maybes.isJust (Maps.lookup name (Graph.graphBoundTerms cx))) (Sets.member name (Graph.graphLambdaVariables cx))) (Just (ErrorCore.InvalidTermErrorTermVariableShadowing (ErrorCore.TermVariableShadowingError {
-                ErrorCore.termVariableShadowingErrorLocation = path,
-                ErrorCore.termVariableShadowingErrorName = name}))) Nothing) (\_ -> acc)) Nothing names
-      in result
--- | Check a single term node for validation errors
-checkTerm :: Bool -> Paths.SubtermPath -> Graph.Graph -> Core.Term -> Maybe ErrorCore.InvalidTermError
-checkTerm typed path cx term =
-    case term of
-      Core.TermAnnotated v0 ->
-        let body = Core.annotatedTermBody v0
-            annMap = Core.annotatedTermAnnotation v0
-        in (firstError [
-          Logic.ifElse (Maps.null annMap) (Just (ErrorCore.InvalidTermErrorEmptyTermAnnotation (ErrorCore.EmptyTermAnnotationError {
-            ErrorCore.emptyTermAnnotationErrorLocation = path}))) Nothing,
-          case body of
-            Core.TermAnnotated _ -> Just (ErrorCore.InvalidTermErrorNestedTermAnnotation (ErrorCore.NestedTermAnnotationError {
-              ErrorCore.nestedTermAnnotationErrorLocation = path}))
-            _ -> Nothing])
-      Core.TermApplication v0 ->
-        let fun = Core.applicationFunction v0
-            arg = Core.applicationArgument v0
-        in (firstError [
-          case fun of
-            Core.TermVariable v1 -> Logic.ifElse (Equality.equal (Core.unName v1) "hydra.lib.logic.ifElse") (case arg of
-              Core.TermLiteral v2 -> case v2 of
-                Core.LiteralBoolean v3 -> Just (ErrorCore.InvalidTermErrorConstantCondition (ErrorCore.ConstantConditionError {
-                  ErrorCore.constantConditionErrorLocation = path,
-                  ErrorCore.constantConditionErrorValue = v3}))
-                _ -> Nothing
-              _ -> Nothing) Nothing
-            _ -> Nothing,
-          case fun of
-            Core.TermVariable v1 -> case arg of
-              Core.TermVariable v2 -> Logic.ifElse (Equality.equal v1 v2) (Just (ErrorCore.InvalidTermErrorSelfApplication (ErrorCore.SelfApplicationError {
-                ErrorCore.selfApplicationErrorLocation = path,
-                ErrorCore.selfApplicationErrorName = v1}))) Nothing
-              _ -> Nothing
-            _ -> Nothing,
-          case fun of
-            Core.TermLambda v1 ->
-              let param = Core.lambdaParameter v1
-                  body = Core.lambdaBody v1
-              in case body of
-                Core.TermVariable v2 -> Logic.ifElse (Equality.equal param v2) (Just (ErrorCore.InvalidTermErrorUnnecessaryIdentityApplication (ErrorCore.UnnecessaryIdentityApplicationError {
-                  ErrorCore.unnecessaryIdentityApplicationErrorLocation = path}))) Nothing
-                _ -> Nothing
-            _ -> Nothing,
-          case fun of
-            Core.TermUnwrap v1 -> case arg of
-              Core.TermWrap v2 ->
-                let wrapName = Core.wrappedTermTypeName v2
-                in (Logic.ifElse (Equality.equal v1 wrapName) (Just (ErrorCore.InvalidTermErrorRedundantWrapUnwrap (ErrorCore.RedundantWrapUnwrapError {
-                  ErrorCore.redundantWrapUnwrapErrorLocation = path,
-                  ErrorCore.redundantWrapUnwrapErrorTypeName = v1}))) Nothing)
-              _ -> Nothing
-            _ -> Nothing])
-      Core.TermRecord v0 ->
-        let tname = Core.recordTypeName v0
-            flds = Core.recordFields v0
-        in (firstError [
-          Logic.ifElse (Equality.equal (Core.unName tname) "") (Just (ErrorCore.InvalidTermErrorEmptyTypeNameInTerm (ErrorCore.EmptyTypeNameInTermError {
-            ErrorCore.emptyTypeNameInTermErrorLocation = path}))) Nothing,
-          (checkDuplicateFields path (Lists.map Core.fieldName flds))])
-      Core.TermLet v0 ->
-        let bindings = Core.letBindings v0
-            names = Lists.map Core.bindingName bindings
-        in (firstError [
-          Logic.ifElse (Lists.null bindings) (Just (ErrorCore.InvalidTermErrorEmptyLetBindings (ErrorCore.EmptyLetBindingsError {
-            ErrorCore.emptyLetBindingsErrorLocation = path}))) Nothing,
-          (checkDuplicateBindings path bindings),
-          Nothing,
-          (firstError (Lists.map (\bname -> Logic.ifElse (isValidName bname) Nothing (Just (ErrorCore.InvalidTermErrorInvalidLetBindingName (ErrorCore.InvalidLetBindingNameError {
-            ErrorCore.invalidLetBindingNameErrorLocation = path,
-            ErrorCore.invalidLetBindingNameErrorName = bname})))) names)),
-          (Logic.ifElse typed (firstError (Lists.map (\b -> Maybes.cases (Core.bindingTypeScheme b) Nothing (\ts -> checkUndefinedTypeVariablesInTypeScheme path cx ts (\uvName -> Just (ErrorCore.InvalidTermErrorUndefinedTypeVariableInBindingType (ErrorCore.UndefinedTypeVariableInBindingTypeError {
-            ErrorCore.undefinedTypeVariableInBindingTypeErrorLocation = path,
-            ErrorCore.undefinedTypeVariableInBindingTypeErrorName = uvName}))))) bindings)) Nothing)])
-      Core.TermInject v0 ->
-        let tname = Core.injectionTypeName v0
-        in (Logic.ifElse (Equality.equal (Core.unName tname) "") (Just (ErrorCore.InvalidTermErrorEmptyTypeNameInTerm (ErrorCore.EmptyTypeNameInTermError {
-          ErrorCore.emptyTypeNameInTermErrorLocation = path}))) Nothing)
-      Core.TermLambda v0 ->
-        let paramName = Core.lambdaParameter v0
-        in (firstError [
-          Logic.ifElse (Maybes.isJust (Maps.lookup paramName (Graph.graphBoundTerms cx))) (Just (ErrorCore.InvalidTermErrorTermVariableShadowing (ErrorCore.TermVariableShadowingError {
-            ErrorCore.termVariableShadowingErrorLocation = path,
-            ErrorCore.termVariableShadowingErrorName = paramName}))) Nothing,
-          (Logic.ifElse (isValidName paramName) Nothing (Just (ErrorCore.InvalidTermErrorInvalidLambdaParameterName (ErrorCore.InvalidLambdaParameterNameError {
-            ErrorCore.invalidLambdaParameterNameErrorLocation = path,
-            ErrorCore.invalidLambdaParameterNameErrorName = paramName})))),
-          (Logic.ifElse typed (Maybes.cases (Core.lambdaDomain v0) Nothing (\dom -> checkUndefinedTypeVariablesInType path cx dom (\uvName -> Just (ErrorCore.InvalidTermErrorUndefinedTypeVariableInLambdaDomain (ErrorCore.UndefinedTypeVariableInLambdaDomainError {
-            ErrorCore.undefinedTypeVariableInLambdaDomainErrorLocation = path,
-            ErrorCore.undefinedTypeVariableInLambdaDomainErrorName = uvName}))))) Nothing)])
-      Core.TermProject v0 ->
-        let tname = Core.projectionTypeName v0
-        in (Logic.ifElse (Equality.equal (Core.unName tname) "") (Just (ErrorCore.InvalidTermErrorEmptyTypeNameInTerm (ErrorCore.EmptyTypeNameInTermError {
-          ErrorCore.emptyTypeNameInTermErrorLocation = path}))) Nothing)
-      Core.TermCases v0 ->
-        let tname = Core.caseStatementTypeName v0
-            csDefault = Core.caseStatementDefault v0
-            csCases = Core.caseStatementCases v0
-        in (firstError [
-          Logic.ifElse (Equality.equal (Core.unName tname) "") (Just (ErrorCore.InvalidTermErrorEmptyTypeNameInTerm (ErrorCore.EmptyTypeNameInTermError {
-            ErrorCore.emptyTypeNameInTermErrorLocation = path}))) Nothing,
-          (Logic.ifElse (Logic.and (Lists.null csCases) (Maybes.isNothing csDefault)) (Just (ErrorCore.InvalidTermErrorEmptyCaseStatement (ErrorCore.EmptyCaseStatementError {
-            ErrorCore.emptyCaseStatementErrorLocation = path,
-            ErrorCore.emptyCaseStatementErrorTypeName = tname}))) Nothing),
-          (checkDuplicateFields path (Lists.map Core.fieldName csCases))])
-      Core.TermTypeApplication v0 -> Logic.ifElse typed (checkUndefinedTypeVariablesInType path cx (Core.typeApplicationTermType v0) (\uvName -> Just (ErrorCore.InvalidTermErrorUndefinedTypeVariableInTypeApplication (ErrorCore.UndefinedTypeVariableInTypeApplicationError {
-        ErrorCore.undefinedTypeVariableInTypeApplicationErrorLocation = path,
-        ErrorCore.undefinedTypeVariableInTypeApplicationErrorName = uvName})))) Nothing
-      Core.TermTypeLambda v0 ->
-        let tvName = Core.typeLambdaParameter v0
-        in (firstError [
-          Logic.ifElse (Sets.member tvName (Sets.delete tvName (Graph.graphTypeVariables cx))) (Just (ErrorCore.InvalidTermErrorTypeVariableShadowingInTypeLambda (ErrorCore.TypeVariableShadowingInTypeLambdaError {
-            ErrorCore.typeVariableShadowingInTypeLambdaErrorLocation = path,
-            ErrorCore.typeVariableShadowingInTypeLambdaErrorName = tvName}))) Nothing,
-          (Logic.ifElse (isValidName tvName) Nothing (Just (ErrorCore.InvalidTermErrorInvalidTypeLambdaParameterName (ErrorCore.InvalidTypeLambdaParameterNameError {
-            ErrorCore.invalidTypeLambdaParameterNameErrorLocation = path,
-            ErrorCore.invalidTypeLambdaParameterNameErrorName = tvName}))))])
-      Core.TermVariable v0 -> Logic.ifElse (Logic.or (Maybes.isJust (Maps.lookup v0 (Graph.graphBoundTerms cx))) (Logic.or (Sets.member v0 (Graph.graphLambdaVariables cx)) (Maybes.isJust (Maps.lookup v0 (Graph.graphPrimitives cx))))) Nothing (Just (ErrorCore.InvalidTermErrorUndefinedTermVariable (ErrorCore.UndefinedTermVariableError {
-        ErrorCore.undefinedTermVariableErrorLocation = path,
-        ErrorCore.undefinedTermVariableErrorName = v0})))
-      Core.TermWrap v0 ->
-        let tname = Core.wrappedTermTypeName v0
-        in (Logic.ifElse (Equality.equal (Core.unName tname) "") (Just (ErrorCore.InvalidTermErrorEmptyTypeNameInTerm (ErrorCore.EmptyTypeNameInTermError {
-          ErrorCore.emptyTypeNameInTermErrorLocation = path}))) Nothing)
-      _ -> Nothing
--- | Check a type for type variables not bound in the current scope
-checkUndefinedTypeVariablesInType :: t0 -> Graph.Graph -> Core.Type -> (Core.Name -> Maybe t1) -> Maybe t1
-checkUndefinedTypeVariablesInType path cx typ mkError =
-
-      let freeVars = Variables.freeVariablesInType typ
-          undefined = Sets.difference freeVars (Graph.graphTypeVariables cx)
-      in (Maybes.maybe Nothing (\firstUndefined -> mkError firstUndefined) (Lists.maybeHead (Sets.toList undefined)))
--- | Check a type scheme for type variables not bound by the scheme or the current scope
-checkUndefinedTypeVariablesInTypeScheme :: t0 -> Graph.Graph -> Core.TypeScheme -> (Core.Name -> Maybe t1) -> Maybe t1
-checkUndefinedTypeVariablesInTypeScheme path cx ts mkError =
-
-      let freeVars = Variables.freeVariablesInTypeScheme ts
-          undefined = Sets.difference freeVars (Graph.graphTypeVariables cx)
-      in (Maybes.maybe Nothing (\firstUndefined -> mkError firstUndefined) (Lists.maybeHead (Sets.toList undefined)))
--- | Return an error if the given type is TypeVoid
-checkVoid :: Core.Type -> Maybe ErrorCore.InvalidTypeError
-checkVoid typ =
-    case typ of
-      Core.TypeVoid -> Just (ErrorCore.InvalidTypeErrorVoidInNonBottomPosition (ErrorCore.VoidInNonBottomPositionError {
-        ErrorCore.voidInNonBottomPositionErrorLocation = (Paths.SubtermPath [])}))
-      _ -> Nothing
--- | Find the first duplicate name in a list
-findDuplicate :: Ord t0 => ([t0] -> Maybe t0)
-findDuplicate names =
-
-      let result =
-              Lists.foldl (\acc -> \name ->
-                let seen = Pairs.first acc
-                    dup = Pairs.second acc
-                in (Maybes.cases dup (Logic.ifElse (Sets.member name seen) (seen, (Just name)) (Sets.insert name seen, Nothing)) (\_ -> acc))) (Sets.empty, Nothing) names
-      in (Pairs.second result)
--- | Find the first duplicate name in a list (for field type validation)
-findDuplicateFieldType :: Ord t0 => ([t0] -> Maybe t0)
-findDuplicateFieldType names =
-
-      let result =
-              Lists.foldl (\acc -> \name ->
-                let seen = Pairs.first acc
-                    dup = Pairs.second acc
-                in (Maybes.cases dup (Logic.ifElse (Sets.member name seen) (seen, (Just name)) (Sets.insert name seen, Nothing)) (\_ -> acc))) (Sets.empty, Nothing) names
-      in (Pairs.second result)
--- | Return the first error from a list of optional errors, or nothing if all are valid
-firstError :: [Maybe t0] -> Maybe t0
-firstError checks = Lists.foldl (\acc -> \check -> Maybes.cases acc check (\_ -> acc)) Nothing checks
--- | Return the first type error from a list of optional errors, or nothing if all are valid
-firstTypeError :: [Maybe t0] -> Maybe t0
-firstTypeError checks = Lists.foldl (\acc -> \check -> Maybes.cases acc check (\_ -> acc)) Nothing checks
--- | Check whether a name is valid at an introduction site. Currently rejects empty strings.
-isValidName :: Core.Name -> Bool
-isValidName name = Logic.not (Equality.equal (Core.unName name) "")
--- | Validate a term, returning the first error found or nothing if valid. The 'typed' parameter indicates whether to expect System F (typed) terms; when true, type variable binding checks and UntypedTermVariableError are active.
-term :: Bool -> Graph.Graph -> Core.Term -> Maybe ErrorCore.InvalidTermError
-term typed g t =
-    Rewriting.foldTermWithGraphAndPath (\recurse -> \path -> \cx -> \acc -> \trm -> Maybes.cases acc (
-      let checkResult = checkTerm typed (Paths.SubtermPath path) cx trm
-      in (Maybes.cases checkResult (recurse Nothing trm) (\err -> Just err))) (\_ -> acc)) g Nothing t
--- | Validate a type, returning the first error found or nothing if valid. The first argument is the set of type variables already in scope.
-type_ :: S.Set Core.Name -> Core.Type -> Maybe ErrorCore.InvalidTypeError
-type_ boundVars typ =
-
-      let checkResult = validateTypeNode boundVars typ
-      in (Maybes.cases checkResult (case typ of
-        Core.TypeForall v0 ->
-          let newBound = Sets.insert (Core.forallTypeParameter v0) boundVars
-          in (type_ newBound (Core.forallTypeBody v0))
-        Core.TypeAnnotated v0 -> type_ boundVars (Core.annotatedTypeBody v0)
-        Core.TypeApplication v0 -> firstTypeError [
-          type_ boundVars (Core.applicationTypeFunction v0),
-          (type_ boundVars (Core.applicationTypeArgument v0))]
-        Core.TypeEither v0 -> firstTypeError [
-          type_ boundVars (Core.eitherTypeLeft v0),
-          (type_ boundVars (Core.eitherTypeRight v0))]
-        Core.TypeFunction v0 -> firstTypeError [
-          type_ boundVars (Core.functionTypeDomain v0),
-          (type_ boundVars (Core.functionTypeCodomain v0))]
-        Core.TypeList v0 -> type_ boundVars v0
-        Core.TypeMap v0 -> firstTypeError [
-          type_ boundVars (Core.mapTypeKeys v0),
-          (type_ boundVars (Core.mapTypeValues v0))]
-        Core.TypeMaybe v0 -> type_ boundVars v0
-        Core.TypePair v0 -> firstTypeError [
-          type_ boundVars (Core.pairTypeFirst v0),
-          (type_ boundVars (Core.pairTypeSecond v0))]
-        Core.TypeRecord v0 -> firstTypeError (Lists.map (\f -> type_ boundVars (Core.fieldTypeType f)) v0)
-        Core.TypeSet v0 -> type_ boundVars v0
-        Core.TypeUnion v0 -> firstTypeError (Lists.map (\f -> type_ boundVars (Core.fieldTypeType f)) v0)
-        Core.TypeWrap v0 -> type_ boundVars v0
-        _ -> Nothing) (\err -> Just err))
--- | Check a single type node for validation errors
-validateTypeNode :: S.Set Core.Name -> Core.Type -> Maybe ErrorCore.InvalidTypeError
-validateTypeNode boundVars typ =
-    case typ of
-      Core.TypeAnnotated v0 ->
-        let body = Core.annotatedTypeBody v0
-            annMap = Core.annotatedTypeAnnotation v0
-        in (firstTypeError [
-          Logic.ifElse (Maps.null annMap) (Just (ErrorCore.InvalidTypeErrorEmptyTypeAnnotation (ErrorCore.EmptyTypeAnnotationError {
-            ErrorCore.emptyTypeAnnotationErrorLocation = (Paths.SubtermPath [])}))) Nothing,
-          case body of
-            Core.TypeAnnotated _ -> Just (ErrorCore.InvalidTypeErrorNestedTypeAnnotation (ErrorCore.NestedTypeAnnotationError {
-              ErrorCore.nestedTypeAnnotationErrorLocation = (Paths.SubtermPath [])}))
-            _ -> Nothing])
-      Core.TypeEither v0 -> firstTypeError [
-        checkVoid (Core.eitherTypeLeft v0),
-        (checkVoid (Core.eitherTypeRight v0))]
-      Core.TypeForall v0 ->
-        let paramName = Core.forallTypeParameter v0
-        in (firstTypeError [
-          Logic.ifElse (Sets.member paramName boundVars) (Just (ErrorCore.InvalidTypeErrorTypeVariableShadowingInForall (ErrorCore.TypeVariableShadowingInForallError {
-            ErrorCore.typeVariableShadowingInForallErrorLocation = (Paths.SubtermPath []),
-            ErrorCore.typeVariableShadowingInForallErrorName = paramName}))) Nothing,
-          (Logic.ifElse (isValidName paramName) Nothing (Just (ErrorCore.InvalidTypeErrorInvalidForallParameterName (ErrorCore.InvalidForallParameterNameError {
-            ErrorCore.invalidForallParameterNameErrorLocation = (Paths.SubtermPath []),
-            ErrorCore.invalidForallParameterNameErrorName = paramName}))))])
-      Core.TypeFunction v0 -> checkVoid (Core.functionTypeCodomain v0)
-      Core.TypeList v0 -> checkVoid v0
-      Core.TypeMap v0 ->
-        let keyType = Core.mapTypeKeys v0
-        in (firstTypeError [
-          case keyType of
-            Core.TypeFunction _ -> Just (ErrorCore.InvalidTypeErrorNonComparableMapKeyType (ErrorCore.NonComparableMapKeyTypeError {
-              ErrorCore.nonComparableMapKeyTypeErrorLocation = (Paths.SubtermPath []),
-              ErrorCore.nonComparableMapKeyTypeErrorKeyType = keyType}))
-            _ -> Nothing,
-          (checkVoid keyType),
-          (checkVoid (Core.mapTypeValues v0))])
-      Core.TypePair v0 -> firstTypeError [
-        checkVoid (Core.pairTypeFirst v0),
-        (checkVoid (Core.pairTypeSecond v0))]
-      Core.TypeRecord v0 -> firstTypeError [
-        Logic.ifElse (Lists.null v0) (Just (ErrorCore.InvalidTypeErrorEmptyRecordType (ErrorCore.EmptyRecordTypeError {
-          ErrorCore.emptyRecordTypeErrorLocation = (Paths.SubtermPath [])}))) Nothing,
-        (checkDuplicateFieldTypes v0 (\dupName -> Just (ErrorCore.InvalidTypeErrorDuplicateRecordTypeFieldNames (ErrorCore.DuplicateRecordTypeFieldNamesError {
-          ErrorCore.duplicateRecordTypeFieldNamesErrorLocation = (Paths.SubtermPath []),
-          ErrorCore.duplicateRecordTypeFieldNamesErrorName = dupName})))),
-        (firstTypeError (Lists.map (\f -> checkVoid (Core.fieldTypeType f)) v0))]
-      Core.TypeSet v0 -> firstTypeError [
-        case v0 of
-          Core.TypeFunction _ -> Just (ErrorCore.InvalidTypeErrorNonComparableSetElementType (ErrorCore.NonComparableSetElementTypeError {
-            ErrorCore.nonComparableSetElementTypeErrorLocation = (Paths.SubtermPath []),
-            ErrorCore.nonComparableSetElementTypeErrorElementType = v0}))
-          _ -> Nothing,
-        (checkVoid v0)]
-      Core.TypeUnion v0 -> firstTypeError [
-        Logic.ifElse (Lists.null v0) (Just (ErrorCore.InvalidTypeErrorEmptyUnionType (ErrorCore.EmptyUnionTypeError {
-          ErrorCore.emptyUnionTypeErrorLocation = (Paths.SubtermPath [])}))) Nothing,
-        (Logic.ifElse (Equality.equal (Lists.length v0) 1) (Maybes.maybe Nothing (\singleField -> Just (ErrorCore.InvalidTypeErrorSingleVariantUnion (ErrorCore.SingleVariantUnionError {
-          ErrorCore.singleVariantUnionErrorLocation = (Paths.SubtermPath []),
-          ErrorCore.singleVariantUnionErrorFieldName = (Core.fieldTypeName singleField)}))) (Lists.maybeHead v0)) Nothing),
-        (checkDuplicateFieldTypes v0 (\dupName -> Just (ErrorCore.InvalidTypeErrorDuplicateUnionTypeFieldNames (ErrorCore.DuplicateUnionTypeFieldNamesError {
-          ErrorCore.duplicateUnionTypeFieldNamesErrorLocation = (Paths.SubtermPath []),
-          ErrorCore.duplicateUnionTypeFieldNamesErrorName = dupName})))),
-        (firstTypeError (Lists.map (\f -> checkVoid (Core.fieldTypeType f)) v0))]
-      Core.TypeVariable v0 -> Logic.ifElse (Sets.member v0 boundVars) Nothing (Just (ErrorCore.InvalidTypeErrorUndefinedTypeVariable (ErrorCore.UndefinedTypeVariableError {
-        ErrorCore.undefinedTypeVariableErrorLocation = (Paths.SubtermPath []),
-        ErrorCore.undefinedTypeVariableErrorName = v0})))
-      _ -> Nothing
diff --git a/src/main/haskell/Hydra/Validate/Packaging.hs b/src/main/haskell/Hydra/Validate/Packaging.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Validate/Packaging.hs
+++ /dev/null
@@ -1,123 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Validation functions for modules and packages
-
-module Hydra.Validate.Packaging where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Packaging as ErrorPackaging
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Check for module namespaces that conflict when mapped to target language paths
-checkConflictingModuleNamespaces :: Packaging.Package -> Maybe ErrorPackaging.InvalidPackageError
-checkConflictingModuleNamespaces pkg =
-
-      let result =
-              Lists.foldl (\acc -> \mod ->
-                let seen = Pairs.first acc
-                    err = Pairs.second acc
-                in (Maybes.cases err (
-                  let ns = Packaging.moduleNamespace mod
-                      key = Strings.toLower (Packaging.unNamespace ns)
-                      existing = Maps.lookup key seen
-                  in (Maybes.cases existing (Maps.insert key ns seen, Nothing) (\first -> (seen, (Just (ErrorPackaging.InvalidPackageErrorConflictingModuleNamespace (ErrorPackaging.ConflictingModuleNamespaceError {
-                    ErrorPackaging.conflictingModuleNamespaceErrorFirst = first,
-                    ErrorPackaging.conflictingModuleNamespaceErrorSecond = ns}))))))) (\_ -> acc))) (Maps.empty, Nothing) (Packaging.packageModules pkg)
-      in (Pairs.second result)
--- | Check for union variant names that, when mapped to constructor names, conflict with other type definitions
-checkConflictingVariantNames :: Packaging.Module -> Maybe ErrorPackaging.InvalidModuleError
-checkConflictingVariantNames mod =
-
-      let ns = Packaging.moduleNamespace mod
-          defs = Packaging.moduleDefinitions mod
-          defNames = Lists.foldl (\acc -> \def -> Sets.insert (Names.localNameOf (definitionName def)) acc) Sets.empty defs
-      in (Lists.foldl (\acc -> \def -> Maybes.cases acc (case def of
-        Packaging.DefinitionType v0 ->
-          let typeName = Packaging.typeDefinitionName v0
-              localTypeName = Names.localNameOf typeName
-              typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme v0)
-          in case typ of
-            Core.TypeUnion v1 -> Lists.foldl (\innerAcc -> \field -> Maybes.cases innerAcc (
-              let fieldName = Core.fieldTypeName field
-                  localFieldName = Names.localNameOf fieldName
-                  constructorName = Strings.cat2 (Formatting.capitalize localTypeName) (Formatting.capitalize localFieldName)
-              in (Logic.ifElse (Sets.member constructorName defNames) (Just (ErrorPackaging.InvalidModuleErrorConflictingVariantName (ErrorPackaging.ConflictingVariantNameError {
-                ErrorPackaging.conflictingVariantNameErrorNamespace = ns,
-                ErrorPackaging.conflictingVariantNameErrorTypeName = typeName,
-                ErrorPackaging.conflictingVariantNameErrorVariantName = fieldName,
-                ErrorPackaging.conflictingVariantNameErrorConflictingName = (Core.Name constructorName)}))) Nothing)) (\_ -> innerAcc)) Nothing v1
-            _ -> Nothing
-        _ -> Nothing) (\_ -> acc)) Nothing defs)
--- | Check that all definition names in a module have the module's namespace as a prefix
-checkDefinitionNamespaces :: Packaging.Module -> Maybe ErrorPackaging.InvalidModuleError
-checkDefinitionNamespaces mod =
-
-      let ns = Packaging.moduleNamespace mod
-          prefix = Strings.cat2 (Packaging.unNamespace ns) "."
-          prefixLen = Strings.length prefix
-      in (Lists.foldl (\acc -> \def -> Maybes.cases acc (
-        let name = definitionName def
-            nameStr = Core.unName name
-            namePrefix = Lists.take prefixLen (Strings.toList nameStr)
-        in (Logic.ifElse (Equality.equal (Strings.fromList namePrefix) prefix) Nothing (Just (ErrorPackaging.InvalidModuleErrorDefinitionNotInModuleNamespace (ErrorPackaging.DefinitionNotInModuleNamespaceError {
-          ErrorPackaging.definitionNotInModuleNamespaceErrorNamespace = ns,
-          ErrorPackaging.definitionNotInModuleNamespaceErrorName = name}))))) (\_ -> acc)) Nothing (Packaging.moduleDefinitions mod))
--- | Check for duplicate definition names in a module
-checkDuplicateDefinitionNames :: Packaging.Module -> Maybe ErrorPackaging.InvalidModuleError
-checkDuplicateDefinitionNames mod =
-
-      let ns = Packaging.moduleNamespace mod
-          result =
-                  Lists.foldl (\acc -> \def ->
-                    let seen = Pairs.first acc
-                        err = Pairs.second acc
-                    in (Maybes.cases err (
-                      let name = definitionName def
-                      in (Logic.ifElse (Sets.member name seen) (seen, (Just (ErrorPackaging.InvalidModuleErrorDuplicateDefinitionName (ErrorPackaging.DuplicateDefinitionNameError {
-                        ErrorPackaging.duplicateDefinitionNameErrorNamespace = ns,
-                        ErrorPackaging.duplicateDefinitionNameErrorName = name})))) (Sets.insert name seen, Nothing))) (\_ -> acc))) (Sets.empty, Nothing) (Packaging.moduleDefinitions mod)
-      in (Pairs.second result)
--- | Check for duplicate module namespaces in a package
-checkDuplicateModuleNamespaces :: Packaging.Package -> Maybe ErrorPackaging.InvalidPackageError
-checkDuplicateModuleNamespaces pkg =
-
-      let result =
-              Lists.foldl (\acc -> \mod ->
-                let seen = Pairs.first acc
-                    err = Pairs.second acc
-                in (Maybes.cases err (
-                  let ns = Packaging.moduleNamespace mod
-                  in (Logic.ifElse (Sets.member ns seen) (seen, (Just (ErrorPackaging.InvalidPackageErrorDuplicateModuleNamespace (ErrorPackaging.DuplicateModuleNamespaceError {
-                    ErrorPackaging.duplicateModuleNamespaceErrorNamespace = ns})))) (Sets.insert ns seen, Nothing))) (\_ -> acc))) (Sets.empty, Nothing) (Packaging.packageModules pkg)
-      in (Pairs.second result)
--- | Extract the name from a definition
-definitionName :: Packaging.Definition -> Core.Name
-definitionName def =
-    case def of
-      Packaging.DefinitionTerm v0 -> Packaging.termDefinitionName v0
-      Packaging.DefinitionType v0 -> Packaging.typeDefinitionName v0
--- | Validate a module, returning the first error found or nothing if valid
-module_ :: Packaging.Module -> Maybe ErrorPackaging.InvalidModuleError
-module_ mod =
-
-      let r1 = checkDefinitionNamespaces mod
-      in (Maybes.cases r1 (
-        let r2 = checkDuplicateDefinitionNames mod
-        in (Maybes.cases r2 (checkConflictingVariantNames mod) (\_ -> r2))) (\_ -> r1))
--- | Validate a package, returning the first error found or nothing if valid
-package :: Packaging.Package -> Maybe ErrorPackaging.InvalidPackageError
-package pkg =
-
-      let r1 = checkDuplicateModuleNamespaces pkg
-      in (Maybes.cases r1 (
-        let r2 = checkConflictingModuleNamespaces pkg
-        in (Maybes.cases r2 (Lists.foldl (\acc -> \mod -> Maybes.cases acc (Maybes.map (\err -> ErrorPackaging.InvalidPackageErrorInvalidModule err) (module_ mod)) (\_ -> acc)) Nothing (Packaging.packageModules pkg)) (\_ -> r2))) (\_ -> r1))
diff --git a/src/main/haskell/Hydra/Validate/Pg.hs b/src/main/haskell/Hydra/Validate/Pg.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Validate/Pg.hs
+++ /dev/null
@@ -1,120 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Validation functions for property graphs
-
-module Hydra.Validate.Pg where
-
-import qualified Hydra.Error.Pg as Pg
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-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
-
-checkAll :: [Maybe t0] -> Maybe t0
-checkAll checks =
-
-      let errors = Maybes.cat checks
-      in (Lists.maybeHead errors)
-
-validateEdge :: (t0 -> t1 -> Maybe Pg.InvalidValueError) -> Maybe (t1 -> Maybe Model.VertexLabel) -> Model.EdgeType t0 -> Model.Edge t1 -> Maybe Pg.InvalidEdgeError
-validateEdge checkValue labelForVertexId typ el =
-
-      let checkLabel =
-
-                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}))))
-          checkId = Maybes.map (\err -> Pg.InvalidEdgeErrorId err) (checkValue (Model.edgeTypeId typ) (Model.edgeId el))
-          checkProperties =
-                  Maybes.map (\err -> Pg.InvalidEdgeErrorProperty err) (validateProperties checkValue (Model.edgeTypeProperties typ) (Model.edgeProperties el))
-          checkOut =
-                  Maybes.maybe Nothing (\f -> Maybes.maybe (Just Pg.InvalidEdgeErrorOutVertexNotFound) (\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})))) (f (Model.edgeOut el))) labelForVertexId
-          checkIn =
-                  Maybes.maybe Nothing (\f -> Maybes.maybe (Just Pg.InvalidEdgeErrorInVertexNotFound) (\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})))) (f (Model.edgeIn el))) labelForVertexId
-      in (checkAll [
-        checkLabel,
-        checkId,
-        checkProperties,
-        checkOut,
-        checkIn])
-
-validateGraph :: Ord t1 => ((t0 -> t1 -> Maybe Pg.InvalidValueError) -> Model.GraphSchema t0 -> Model.Graph t1 -> Maybe (Pg.InvalidGraphError t1))
-validateGraph checkValue schema graph =
-
-      let checkVertices =
-
-                let checkVertex =
-                        \el -> Maybes.maybe (Just (Pg.InvalidGraphErrorVertex (Pg.InvalidGraphVertexError {
-                          Pg.invalidGraphVertexErrorId = (Model.vertexId el),
-                          Pg.invalidGraphVertexErrorError = (Pg.InvalidVertexErrorLabel (Pg.NoSuchVertexLabelError {
-                            Pg.noSuchVertexLabelErrorLabel = (Model.vertexLabel el)}))}))) (\t -> Maybes.map (\err -> Pg.InvalidGraphErrorVertex (Pg.InvalidGraphVertexError {
-                          Pg.invalidGraphVertexErrorId = (Model.vertexId el),
-                          Pg.invalidGraphVertexErrorError = err})) (validateVertex checkValue t el)) (Maps.lookup (Model.vertexLabel el) (Model.graphSchemaVertices schema))
-                in (checkAll (Lists.map checkVertex (Maps.elems (Model.graphVertices graph))))
-          checkEdges =
-
-                    let checkEdge =
-                            \el -> Maybes.maybe (Just (Pg.InvalidGraphErrorEdge (Pg.InvalidGraphEdgeError {
-                              Pg.invalidGraphEdgeErrorId = (Model.edgeId el),
-                              Pg.invalidGraphEdgeErrorError = (Pg.InvalidEdgeErrorLabel (Pg.NoSuchEdgeLabelError {
-                                Pg.noSuchEdgeLabelErrorLabel = (Model.edgeLabel el)}))}))) (\t -> Maybes.map (\err -> Pg.InvalidGraphErrorEdge (Pg.InvalidGraphEdgeError {
-                              Pg.invalidGraphEdgeErrorId = (Model.edgeId el),
-                              Pg.invalidGraphEdgeErrorError = err})) (validateEdge checkValue labelForVertexId t el)) (Maps.lookup (Model.edgeLabel el) (Model.graphSchemaEdges schema))
-                        labelForVertexId = Just (\i -> Maybes.map Model.vertexLabel (Maps.lookup i (Model.graphVertices graph)))
-                    in (checkAll (Lists.map checkEdge (Maps.elems (Model.graphEdges graph))))
-      in (checkAll [
-        checkVertices,
-        checkEdges])
-
-validateProperties :: (t0 -> t1 -> Maybe Pg.InvalidValueError) -> [Model.PropertyType t0] -> M.Map Model.PropertyKey t1 -> Maybe Pg.InvalidElementPropertyError
-validateProperties checkValue types props =
-
-      let checkTypes = checkAll (Lists.map checkType types)
-          checkType =
-                  \t -> Logic.ifElse (Model.propertyTypeRequired t) (Maybes.maybe (Just (Pg.InvalidElementPropertyError {
-                    Pg.invalidElementPropertyErrorKey = (Model.propertyTypeKey t),
-                    Pg.invalidElementPropertyErrorError = (Pg.InvalidPropertyErrorMissingRequired (Model.propertyTypeKey t))})) (\_ -> Nothing) (Maps.lookup (Model.propertyTypeKey t) props)) Nothing
-          checkValues =
-
-                    let m = Maps.fromList (Lists.map (\p -> (Model.propertyTypeKey p, (Model.propertyTypeValue p))) types)
-                        checkPair =
-                                \pair ->
-                                  let key = Pairs.first pair
-                                      val = Pairs.second pair
-                                  in (Maybes.maybe (Just (Pg.InvalidElementPropertyError {
-                                    Pg.invalidElementPropertyErrorKey = key,
-                                    Pg.invalidElementPropertyErrorError = (Pg.InvalidPropertyErrorUnexpectedKey key)})) (\typ -> Maybes.map (\err -> Pg.InvalidElementPropertyError {
-                                    Pg.invalidElementPropertyErrorKey = key,
-                                    Pg.invalidElementPropertyErrorError = (Pg.InvalidPropertyErrorInvalidValue err)}) (checkValue typ val)) (Maps.lookup key m))
-                    in (checkAll (Lists.map checkPair (Maps.toList props)))
-      in (checkAll [
-        checkTypes,
-        checkValues])
-
-validateVertex :: (t0 -> t1 -> Maybe Pg.InvalidValueError) -> Model.VertexType t0 -> Model.Vertex t1 -> Maybe Pg.InvalidVertexError
-validateVertex checkValue typ el =
-
-      let checkLabel =
-
-                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}))))
-          checkId = Maybes.map (\err -> Pg.InvalidVertexErrorId err) (checkValue (Model.vertexTypeId typ) (Model.vertexId el))
-          checkProperties =
-                  Maybes.map (\err -> Pg.InvalidVertexErrorProperty err) (validateProperties checkValue (Model.vertexTypeProperties typ) (Model.vertexProperties el))
-      in (checkAll [
-        checkLabel,
-        checkId,
-        checkProperties])
diff --git a/src/main/haskell/Hydra/Variables.hs b/src/main/haskell/Hydra/Variables.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Variables.hs
+++ /dev/null
@@ -1,274 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Free variable analysis, term-level substitution, and unshadowing
-
-module Hydra.Variables where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Rewriting as Rewriting
-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
--- | Get the set of free type variables in a term (including schema names, where they appear in type annotations). In this context, only the type schemes of let bindings can bind type variables; type lambdas do not.
-freeTypeVariablesInTerm :: Core.Term -> S.Set Core.Name
-freeTypeVariablesInTerm term0 =
-
-      let allOf = \sets -> Lists.foldl Sets.union Sets.empty sets
-          tryType = \tvars -> \typ -> Sets.difference (freeVariablesInType typ) tvars
-          getAll =
-                  \vars -> \term ->
-                    let recurse = getAll vars
-                        dflt = allOf (Lists.map recurse (Rewriting.subterms term))
-                    in case term of
-                      Core.TermLambda v0 ->
-                        let domt = Maybes.maybe Sets.empty (tryType vars) (Core.lambdaDomain v0)
-                        in (Sets.union domt (recurse (Core.lambdaBody v0)))
-                      Core.TermLet v0 ->
-                        let forBinding =
-                                \b ->
-                                  let newVars =
-                                          Maybes.maybe vars (\ts -> Sets.union vars (Sets.fromList (Core.typeSchemeVariables ts))) (Core.bindingTypeScheme b)
-                                  in (Sets.union (getAll newVars (Core.bindingTerm b)) (Maybes.maybe Sets.empty (\ts -> tryType newVars (Core.typeSchemeBody ts)) (Core.bindingTypeScheme b)))
-                        in (Sets.union (allOf (Lists.map forBinding (Core.letBindings v0))) (recurse (Core.letBody v0)))
-                      Core.TermTypeApplication v0 -> Sets.union (tryType vars (Core.typeApplicationTermType v0)) (recurse (Core.typeApplicationTermBody v0))
-                      Core.TermTypeLambda v0 -> Sets.union (tryType vars (Core.TypeVariable (Core.typeLambdaParameter v0))) (recurse (Core.typeLambdaBody v0))
-                      _ -> dflt
-      in (getAll Sets.empty term0)
--- | Find the free variables (i.e. variables not bound by a lambda or let) in a term
-freeVariablesInTerm :: Core.Term -> S.Set Core.Name
-freeVariablesInTerm term =
-
-      let dfltVars = \_ -> Lists.foldl (\s -> \t -> Sets.union s (freeVariablesInTerm t)) Sets.empty (Rewriting.subterms term)
-      in case term of
-        Core.TermLambda v0 -> Sets.delete (Core.lambdaParameter v0) (freeVariablesInTerm (Core.lambdaBody v0))
-        Core.TermLet v0 -> Sets.difference (dfltVars ()) (Sets.fromList (Lists.map Core.bindingName (Core.letBindings v0)))
-        Core.TermVariable v0 -> Sets.singleton v0
-        _ -> dfltVars ()
--- | Find the free variables (i.e. variables not bound by a lambda or let) in a type
-freeVariablesInType :: Core.Type -> S.Set Core.Name
-freeVariablesInType typ =
-
-      let dfltVars = Lists.foldl (\s -> \t -> Sets.union s (freeVariablesInType t)) Sets.empty (Rewriting.subtypes typ)
-      in case typ of
-        Core.TypeForall v0 -> Sets.delete (Core.forallTypeParameter v0) (freeVariablesInType (Core.forallTypeBody v0))
-        Core.TypeVariable v0 -> Sets.singleton v0
-        _ -> dfltVars
--- | Find the free variables in a type in deterministic left-to-right order
-freeVariablesInTypeOrdered :: Core.Type -> [Core.Name]
-freeVariablesInTypeOrdered typ =
-
-      let collectVars =
-              \boundVars -> \t -> case t of
-                Core.TypeVariable v0 -> Logic.ifElse (Sets.member v0 boundVars) [] [
-                  v0]
-                Core.TypeForall v0 -> collectVars (Sets.insert (Core.forallTypeParameter v0) boundVars) (Core.forallTypeBody v0)
-                _ -> Lists.concat (Lists.map (collectVars boundVars) (Rewriting.subtypes t))
-      in (Lists.nub (collectVars Sets.empty typ))
--- | Find free variables in a type scheme
-freeVariablesInTypeScheme :: Core.TypeScheme -> S.Set Core.Name
-freeVariablesInTypeScheme ts =
-
-      let vars = Core.typeSchemeVariables ts
-          t = Core.typeSchemeBody ts
-      in (Sets.difference (freeVariablesInType t) (Sets.fromList vars))
--- | Find free variables in a type scheme (simple version)
-freeVariablesInTypeSchemeSimple :: Core.TypeScheme -> S.Set Core.Name
-freeVariablesInTypeSchemeSimple ts =
-
-      let vars = Core.typeSchemeVariables ts
-          t = Core.typeSchemeBody ts
-      in (Sets.difference (freeVariablesInTypeSimple t) (Sets.fromList vars))
--- | Same as freeVariablesInType, but ignores the binding action of lambda types
-freeVariablesInTypeSimple :: Core.Type -> S.Set Core.Name
-freeVariablesInTypeSimple typ =
-
-      let helper =
-              \types -> \typ2 -> case typ2 of
-                Core.TypeVariable v0 -> Sets.insert v0 types
-                _ -> types
-      in (Rewriting.foldOverType Coders.TraversalOrderPre helper Sets.empty typ)
--- | Check whether a variable is free (not bound) in a term
-isFreeVariableInTerm :: Core.Name -> Core.Term -> Bool
-isFreeVariableInTerm v term = Logic.not (Sets.member v (freeVariablesInTerm term))
--- | Recursively replace the type variables of let bindings with the systematic type variables t0, t1, t2, ...
-normalizeTypeVariablesInTerm :: Core.Term -> Core.Term
-normalizeTypeVariablesInTerm term =
-
-      let replaceName = \subst -> \v -> Maybes.fromMaybe v (Maps.lookup v subst)
-          substType =
-                  \subst -> \typ ->
-                    let rewrite =
-                            \recurse -> \typ2 -> case typ2 of
-                              Core.TypeVariable v0 -> Core.TypeVariable (replaceName subst v0)
-                              _ -> recurse typ2
-                    in (Rewriting.rewriteType rewrite typ)
-          rewriteWithSubst =
-                  \state -> \term0 ->
-                    let sb = Pairs.first state
-                        next = Pairs.second state
-                        subst = Pairs.first sb
-                        boundVars = Pairs.second sb
-                        rewrite =
-                                \recurse -> \term2 -> case term2 of
-                                  Core.TermLambda v0 ->
-                                    let domain = Core.lambdaDomain v0
-                                    in (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.lambdaParameter v0),
-                                      Core.lambdaDomain = (Maybes.map (substType subst) domain),
-                                      Core.lambdaBody = (rewriteWithSubst ((subst, boundVars), next) (Core.lambdaBody v0))}))
-                                  Core.TermLet v0 ->
-                                    let bindings0 = Core.letBindings v0
-                                        body0 = Core.letBody v0
-                                        step =
-                                                \acc -> \bs -> Maybes.maybe (Lists.reverse acc) (\uc ->
-                                                  let b = Pairs.first uc
-                                                      tl = Pairs.second uc
-                                                      noType =
-
-                                                                let newVal = rewriteWithSubst ((subst, boundVars), next) (Core.bindingTerm b)
-                                                                    b1 =
-                                                                            Core.Binding {
-                                                                              Core.bindingName = (Core.bindingName b),
-                                                                              Core.bindingTerm = newVal,
-                                                                              Core.bindingTypeScheme = Nothing}
-                                                                in (step (Lists.cons b1 acc) tl)
-                                                      withType =
-                                                              \ts ->
-                                                                let vars = Core.typeSchemeVariables ts
-                                                                    typ = Core.typeSchemeBody ts
-                                                                    k = Lists.length vars
-                                                                    gen =
-                                                                            \i -> \rem -> \acc2 ->
-                                                                              let ti = Core.Name (Strings.cat2 "t" (Literals.showInt32 (Math.add next i)))
-                                                                              in (Logic.ifElse (Equality.equal rem 0) (Lists.reverse acc2) (gen (Math.add i 1) (Math.sub rem 1) (Lists.cons ti acc2)))
-                                                                    newVars = gen 0 k []
-                                                                    newSubst = Maps.union (Maps.fromList (Lists.zip vars newVars)) subst
-                                                                    newBound = Sets.union boundVars (Sets.fromList newVars)
-                                                                    newVal = rewriteWithSubst ((newSubst, newBound), (Math.add next k)) (Core.bindingTerm b)
-                                                                    renameConstraintKeys =
-                                                                            \constraintMap -> Maps.fromList (Lists.map (\p ->
-                                                                              let oldName = Pairs.first p
-                                                                                  meta = Pairs.second p
-                                                                                  newName = Maybes.fromMaybe oldName (Maps.lookup oldName newSubst)
-                                                                              in (newName, meta)) (Maps.toList constraintMap))
-                                                                    oldConstraints = Core.typeSchemeConstraints ts
-                                                                    newConstraints = Maybes.map renameConstraintKeys oldConstraints
-                                                                    b1 =
-                                                                            Core.Binding {
-                                                                              Core.bindingName = (Core.bindingName b),
-                                                                              Core.bindingTerm = newVal,
-                                                                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                                                                Core.typeSchemeVariables = newVars,
-                                                                                Core.typeSchemeBody = (substType newSubst typ),
-                                                                                Core.typeSchemeConstraints = newConstraints}))}
-                                                                in (step (Lists.cons b1 acc) tl)
-                                                  in (Maybes.maybe noType (\ts -> withType ts) (Core.bindingTypeScheme b))) (Lists.uncons bs)
-                                        bindings1 = step [] bindings0
-                                    in (Core.TermLet (Core.Let {
-                                      Core.letBindings = bindings1,
-                                      Core.letBody = (rewriteWithSubst ((subst, boundVars), next) body0)}))
-                                  Core.TermTypeApplication v0 -> Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                    Core.typeApplicationTermBody = (rewriteWithSubst ((subst, boundVars), next) (Core.typeApplicationTermBody v0)),
-                                    Core.typeApplicationTermType = (substType subst (Core.typeApplicationTermType v0))})
-                                  Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {
-                                    Core.typeLambdaParameter = (replaceName subst (Core.typeLambdaParameter v0)),
-                                    Core.typeLambdaBody = (rewriteWithSubst ((subst, boundVars), next) (Core.typeLambdaBody v0))})
-                                  _ -> recurse term2
-                    in (Rewriting.rewriteTerm rewrite term0)
-      in (rewriteWithSubst ((Maps.empty, Sets.empty), 0) term)
--- | Replace a free variable in a term
-replaceFreeTermVariable :: Core.Name -> Core.Term -> Core.Term -> Core.Term
-replaceFreeTermVariable vold tnew term =
-
-      let rewrite =
-              \recurse -> \t -> case t of
-                Core.TermLambda v0 ->
-                  let v = Core.lambdaParameter v0
-                  in (Logic.ifElse (Equality.equal v vold) t (recurse t))
-                Core.TermVariable v0 -> Logic.ifElse (Equality.equal v0 vold) tnew (Core.TermVariable v0)
-                _ -> recurse t
-      in (Rewriting.rewriteTerm rewrite term)
--- | Replace free occurrences of a name in a type
-replaceFreeTypeVariable :: Core.Name -> Core.Type -> Core.Type -> Core.Type
-replaceFreeTypeVariable v rep typ =
-
-      let mapExpr =
-              \recurse -> \t -> case t of
-                Core.TypeForall v0 -> Logic.ifElse (Equality.equal v (Core.forallTypeParameter v0)) t (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.forallTypeParameter v0),
-                  Core.forallTypeBody = (recurse (Core.forallTypeBody v0))}))
-                Core.TypeVariable v0 -> Logic.ifElse (Equality.equal v v0) rep t
-                _ -> recurse t
-      in (Rewriting.rewriteType mapExpr typ)
--- | Substitute type variables in a type
-substituteTypeVariables :: M.Map Core.Name Core.Name -> Core.Type -> Core.Type
-substituteTypeVariables subst typ =
-
-      let replace =
-              \recurse -> \typ2 -> case typ2 of
-                Core.TypeVariable v0 -> Core.TypeVariable (Maybes.fromMaybe v0 (Maps.lookup v0 subst))
-                _ -> recurse typ2
-      in (Rewriting.rewriteType replace typ)
--- | Substitute one variable for another in a term
-substituteVariable :: Core.Name -> Core.Name -> Core.Term -> Core.Term
-substituteVariable from to term =
-
-      let replace =
-              \recurse -> \term2 -> case term2 of
-                Core.TermVariable v0 -> Core.TermVariable (Logic.ifElse (Equality.equal v0 from) to v0)
-                Core.TermLambda v0 -> Logic.ifElse (Equality.equal (Core.lambdaParameter v0) from) term2 (recurse term2)
-                _ -> recurse term2
-      in (Rewriting.rewriteTerm replace term)
--- | Substitute multiple variables in a term
-substituteVariables :: M.Map Core.Name Core.Name -> Core.Term -> Core.Term
-substituteVariables subst term =
-
-      let replace =
-              \recurse -> \term2 -> case term2 of
-                Core.TermVariable v0 -> Core.TermVariable (Maybes.fromMaybe v0 (Maps.lookup v0 subst))
-                Core.TermLambda v0 -> Maybes.maybe (recurse term2) (\_ -> term2) (Maps.lookup (Core.lambdaParameter v0) subst)
-                _ -> recurse term2
-      in (Rewriting.rewriteTerm replace term)
--- | Rename all shadowed variables (both lambda parameters and let-bound variables that shadow lambda parameters) in a term.
-unshadowVariables :: Core.Term -> Core.Term
-unshadowVariables term0 =
-
-      let freshName =
-              \base -> \i -> \m ->
-                let candidate = Core.Name (Strings.cat2 (Core.unName base) (Literals.showInt32 i))
-                in (Logic.ifElse (Maps.member candidate m) (freshName base (Math.add i 1) m) candidate)
-          f =
-                  \recurse -> \m -> \term -> case term of
-                    Core.TermLambda v0 ->
-                      let v = Core.lambdaParameter v0
-                          domain = Core.lambdaDomain v0
-                          body = Core.lambdaBody v0
-                      in (Logic.ifElse (Maps.member v m) (
-                        let v2 = freshName v 2 m
-                            m2 = Maps.insert v v2 (Maps.insert v2 v2 m)
-                        in (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = v2,
-                          Core.lambdaDomain = domain,
-                          Core.lambdaBody = (f recurse m2 body)}))) (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = v,
-                        Core.lambdaDomain = domain,
-                        Core.lambdaBody = (f recurse (Maps.insert v v m) body)})))
-                    Core.TermLet v0 ->
-                      let m2 =
-                              Lists.foldl (\acc -> \b ->
-                                let bname = Core.bindingName b
-                                in (Logic.ifElse (Maps.member bname acc) acc (Maps.insert bname bname acc))) m (Core.letBindings v0)
-                      in (recurse m2 term)
-                    Core.TermVariable v0 -> Core.TermVariable (Maybes.maybe v0 (\renamed -> renamed) (Maps.lookup v0 m))
-                    _ -> recurse m term
-      in (Rewriting.rewriteTermWithContext f Maps.empty term0)
diff --git a/src/main/haskell/Hydra/Variants.hs b/src/main/haskell/Hydra/Variants.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Variants.hs
+++ /dev/null
@@ -1,125 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Variant types which describe the structure of Hydra core types and terms.
-
-module Hydra.Variants where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The identifier of an elimination constructor (legacy)
-data EliminationVariant =
-  EliminationVariantRecord |
-  EliminationVariantUnion |
-  EliminationVariantWrap
-  deriving (Eq, Ord, Read, Show)
-_EliminationVariant = Core.Name "hydra.variants.EliminationVariant"
-_EliminationVariant_record = Core.Name "record"
-_EliminationVariant_union = Core.Name "union"
-_EliminationVariant_wrap = Core.Name "wrap"
--- | The identifier of a function constructor (legacy)
-data FunctionVariant =
-  FunctionVariantElimination |
-  FunctionVariantLambda
-  deriving (Eq, Ord, Read, Show)
-_FunctionVariant = Core.Name "hydra.variants.FunctionVariant"
-_FunctionVariant_elimination = Core.Name "elimination"
-_FunctionVariant_lambda = Core.Name "lambda"
--- | The identifier of a literal constructor
-data LiteralVariant =
-  LiteralVariantBinary |
-  LiteralVariantBoolean |
-  LiteralVariantDecimal |
-  LiteralVariantFloat |
-  LiteralVariantInteger |
-  LiteralVariantString
-  deriving (Eq, Ord, Read, Show)
-_LiteralVariant = Core.Name "hydra.variants.LiteralVariant"
-_LiteralVariant_binary = Core.Name "binary"
-_LiteralVariant_boolean = Core.Name "boolean"
-_LiteralVariant_decimal = Core.Name "decimal"
-_LiteralVariant_float = Core.Name "float"
-_LiteralVariant_integer = Core.Name "integer"
-_LiteralVariant_string = Core.Name "string"
--- | The identifier of a term expression constructor
-data TermVariant =
-  TermVariantAnnotated |
-  TermVariantApplication |
-  TermVariantCases |
-  TermVariantEither |
-  TermVariantInject |
-  TermVariantLambda |
-  TermVariantLet |
-  TermVariantList |
-  TermVariantLiteral |
-  TermVariantMap |
-  TermVariantMaybe |
-  TermVariantPair |
-  TermVariantProject |
-  TermVariantRecord |
-  TermVariantSet |
-  TermVariantTypeApplication |
-  TermVariantTypeLambda |
-  TermVariantUnit |
-  TermVariantUnwrap |
-  TermVariantVariable |
-  TermVariantWrap
-  deriving (Eq, Ord, Read, Show)
-_TermVariant = Core.Name "hydra.variants.TermVariant"
-_TermVariant_annotated = Core.Name "annotated"
-_TermVariant_application = Core.Name "application"
-_TermVariant_cases = Core.Name "cases"
-_TermVariant_either = Core.Name "either"
-_TermVariant_inject = Core.Name "inject"
-_TermVariant_lambda = Core.Name "lambda"
-_TermVariant_let = Core.Name "let"
-_TermVariant_list = Core.Name "list"
-_TermVariant_literal = Core.Name "literal"
-_TermVariant_map = Core.Name "map"
-_TermVariant_maybe = Core.Name "maybe"
-_TermVariant_pair = Core.Name "pair"
-_TermVariant_project = Core.Name "project"
-_TermVariant_record = Core.Name "record"
-_TermVariant_set = Core.Name "set"
-_TermVariant_typeApplication = Core.Name "typeApplication"
-_TermVariant_typeLambda = Core.Name "typeLambda"
-_TermVariant_unit = Core.Name "unit"
-_TermVariant_unwrap = Core.Name "unwrap"
-_TermVariant_variable = Core.Name "variable"
-_TermVariant_wrap = Core.Name "wrap"
--- | The identifier of a type constructor
-data TypeVariant =
-  TypeVariantAnnotated |
-  TypeVariantApplication |
-  TypeVariantEither |
-  TypeVariantForall |
-  TypeVariantFunction |
-  TypeVariantList |
-  TypeVariantLiteral |
-  TypeVariantMap |
-  TypeVariantMaybe |
-  TypeVariantPair |
-  TypeVariantRecord |
-  TypeVariantSet |
-  TypeVariantUnion |
-  TypeVariantUnit |
-  TypeVariantVariable |
-  TypeVariantVoid |
-  TypeVariantWrap
-  deriving (Eq, Ord, Read, Show)
-_TypeVariant = Core.Name "hydra.variants.TypeVariant"
-_TypeVariant_annotated = Core.Name "annotated"
-_TypeVariant_application = Core.Name "application"
-_TypeVariant_either = Core.Name "either"
-_TypeVariant_forall = Core.Name "forall"
-_TypeVariant_function = Core.Name "function"
-_TypeVariant_list = Core.Name "list"
-_TypeVariant_literal = Core.Name "literal"
-_TypeVariant_map = Core.Name "map"
-_TypeVariant_maybe = Core.Name "maybe"
-_TypeVariant_pair = Core.Name "pair"
-_TypeVariant_record = Core.Name "record"
-_TypeVariant_set = Core.Name "set"
-_TypeVariant_union = Core.Name "union"
-_TypeVariant_unit = Core.Name "unit"
-_TypeVariant_variable = Core.Name "variable"
-_TypeVariant_void = Core.Name "void"
-_TypeVariant_wrap = Core.Name "wrap"
diff --git a/src/main/haskell/Hydra/Wasm/Coder.hs b/src/main/haskell/Hydra/Wasm/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Wasm/Coder.hs
+++ /dev/null
@@ -1,984 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | WebAssembly code generator: converts Hydra type and term modules to WAT source code
-
-module Hydra.Wasm.Coder where
-
-import qualified Hydra.Analysis as Analysis
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Environment as Environment
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Names as Names
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Util as Util
-import qualified Hydra.Wasm.Serde as Serde
-import qualified Hydra.Wasm.Syntax as Syntax
-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
-
-buildFieldOffsets :: Graph.Graph -> M.Map Core.Name [(Core.Name, Int)]
-buildFieldOffsets g =
-
-      let recordFieldsOf =
-              \t ->
-                let stripped = Strip.deannotateType t
-                in case stripped of
-                  Core.TypeRecord v0 -> Just v0
-                  Core.TypeForall v0 ->
-                    let innerStripped = Strip.deannotateType (Core.forallTypeBody v0)
-                    in case innerStripped of
-                      Core.TypeRecord v1 -> Just v1
-                      _ -> Nothing
-                  _ -> Nothing
-          entryFor =
-                  \nameSchemePair ->
-                    let tname = Pairs.first nameSchemePair
-                        tscheme = Pairs.second nameSchemePair
-                        tbody = Core.typeSchemeBody tscheme
-                        mfields = recordFieldsOf tbody
-                    in (Maybes.cases mfields Nothing (\fts ->
-                      let namedOffsets =
-                              Lists.map (\p ->
-                                let i = Pairs.first p
-                                    ft = Pairs.second p
-                                in (Core.fieldTypeName ft, (Math.mul i 4))) (Lists.zip (Lists.foldl (\acc -> \_f -> Lists.concat2 acc [
-                                Lists.length acc]) [] fts) fts)
-                      in (Just (tname, namedOffsets))))
-          schemaTypesList = Maps.toList (Graph.graphSchemaTypes g)
-          entries = Maybes.cat (Lists.map entryFor schemaTypesList)
-      in (Maps.fromList entries)
-
-buildFunctionSignatures :: t0 -> Graph.Graph -> [Packaging.TermDefinition] -> M.Map String ([Syntax.ValType], [Syntax.ValType])
-buildFunctionSignatures cx g termDefs =
-
-      let toSigEntry =
-              \nameAndScheme ->
-                let nm = Pairs.first nameAndScheme
-                    ts = Pairs.second nameAndScheme
-                    snakeName = Formatting.convertCaseCamelToLowerSnake (Core.unName nm)
-                    sigEither = extractSignature cx g (Core.typeSchemeBody ts)
-                in (Eithers.either (\_err -> Nothing) (\sig -> Just (snakeName, sig)) sigEither)
-          primEntries =
-                  Maybes.cat (Lists.map (\kv -> toSigEntry (Pairs.first kv, (Graph.primitiveTypeScheme (Pairs.second kv)))) (Maps.toList (Graph.graphPrimitives g)))
-          boundEntries = Maybes.cat (Lists.map (\kv -> toSigEntry kv) (Maps.toList (Graph.graphBoundTypes g)))
-          localEntries =
-                  Maybes.cat (Lists.map (\td -> Maybes.bind (Packaging.termDefinitionTypeScheme td) (\ts -> toSigEntry (Packaging.termDefinitionName td, ts))) termDefs)
-      in (Maps.fromList (Lists.concat [
-        primEntries,
-        boundEntries,
-        localEntries]))
-
-buildStringOffsets :: [String] -> (M.Map String Int, Int)
-buildStringOffsets strs =
-
-      let step =
-              \acc -> \s ->
-                let m = Pairs.first acc
-                    off = Pairs.second acc
-                    len = Strings.length s
-                in (Maps.insert s off m, (Math.add off (Math.add 4 len)))
-          final = Lists.foldl step (Maps.empty, 1024) strs
-          rawEnd = Pairs.second final
-          aligned = Math.mul (Maybes.fromMaybe 0 (Math.maybeDiv (Math.add rawEnd 15) 16)) 16
-      in (Pairs.first final, aligned)
-
-buildVariantIndexes :: Graph.Graph -> M.Map Core.Name [(Core.Name, Int)]
-buildVariantIndexes g =
-
-      let unionFieldsOf =
-              \t ->
-                let stripped = Strip.deannotateType t
-                in case stripped of
-                  Core.TypeUnion v0 -> Just v0
-                  Core.TypeForall v0 ->
-                    let innerStripped = Strip.deannotateType (Core.forallTypeBody v0)
-                    in case innerStripped of
-                      Core.TypeUnion v1 -> Just v1
-                      _ -> Nothing
-                  _ -> Nothing
-          entryFor =
-                  \nameSchemePair ->
-                    let tname = Pairs.first nameSchemePair
-                        tscheme = Pairs.second nameSchemePair
-                        tbody = Core.typeSchemeBody tscheme
-                        mfields = unionFieldsOf tbody
-                    in (Maybes.cases mfields Nothing (\fts ->
-                      let namedIndexes =
-                              Lists.map (\p ->
-                                let i = Pairs.first p
-                                    ft = Pairs.second p
-                                in (Core.fieldTypeName ft, i)) (Lists.zip (Lists.foldl (\acc -> \_f -> Lists.concat2 acc [
-                                Lists.length acc]) [] fts) fts)
-                      in (Just (tname, namedIndexes))))
-          schemaTypesList = Maps.toList (Graph.graphSchemaTypes g)
-          entries = Maybes.cat (Lists.map entryFor schemaTypesList)
-      in (Maps.fromList entries)
-
-clampValTypesToI32 :: [t0] -> [Syntax.ValType]
-clampValTypesToI32 vts = Lists.map (\_vt -> Syntax.ValTypeI32) vts
-
-collectCallTargets :: [Syntax.Instruction] -> S.Set String
-collectCallTargets instrs =
-    Lists.foldl (\acc -> \instr -> case instr of
-      Syntax.InstructionCall v0 -> Sets.insert v0 acc
-      Syntax.InstructionBlock v0 -> Sets.union acc (collectCallTargets (Syntax.blockInstructionBody v0))
-      Syntax.InstructionLoop v0 -> Sets.union acc (collectCallTargets (Syntax.blockInstructionBody v0))
-      Syntax.InstructionIf v0 -> Sets.union (Sets.union acc (collectCallTargets (Syntax.ifInstructionThen v0))) (collectCallTargets (Syntax.ifInstructionElse v0))
-      _ -> acc) Sets.empty instrs
-
-collectInstructionLocals :: [Syntax.Instruction] -> S.Set String
-collectInstructionLocals instrs =
-    Lists.foldl (\acc -> \instr -> case instr of
-      Syntax.InstructionLocalGet v0 -> Sets.insert v0 acc
-      Syntax.InstructionLocalSet v0 -> Sets.insert v0 acc
-      Syntax.InstructionLocalTee v0 -> Sets.insert v0 acc
-      Syntax.InstructionBlock v0 -> Sets.union acc (collectInstructionLocals (Syntax.blockInstructionBody v0))
-      Syntax.InstructionLoop v0 -> Sets.union acc (collectInstructionLocals (Syntax.blockInstructionBody v0))
-      Syntax.InstructionIf v0 -> Sets.union (Sets.union acc (collectInstructionLocals (Syntax.ifInstructionThen v0))) (collectInstructionLocals (Syntax.ifInstructionElse v0))
-      _ -> acc) Sets.empty instrs
-
-collectStrings :: [Packaging.TermDefinition] -> [String]
-collectStrings termDefs =
-
-      let collectOne =
-              \acc -> \t -> case t of
-                Core.TermLiteral v0 -> case v0 of
-                  Core.LiteralString v1 -> Sets.insert v1 acc
-                  _ -> acc
-                _ -> acc
-          allStrings =
-                  Lists.foldl (\acc -> \td -> Rewriting.foldOverTerm Coders.TraversalOrderPre collectOne acc (Packaging.termDefinitionTerm td)) Sets.empty termDefs
-      in (Sets.toList allStrings)
-
-encodeApplication :: t0 -> t1 -> M.Map String Int -> M.Map Core.Name [(Core.Name, Int)] -> M.Map Core.Name [(Core.Name, Int)] -> M.Map String ([t2], t3) -> Core.Term -> Either Errors.Error [Syntax.Instruction]
-encodeApplication cx g stringOffsets fieldOffsets variantIndexes funcSigs term =
-
-      let gathered = Analysis.gatherArgs term []
-          fun = Pairs.first gathered
-          args = Pairs.second gathered
-          dfun = Strip.deannotateTerm fun
-      in (Eithers.bind (Eithers.mapList (\a -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs a) args) (\realArgInstrs ->
-        let flatRealArgInstrs = Lists.concat realArgInstrs
-            droppedArgInstrs = Lists.concat (Lists.map (\ai -> Lists.concat2 ai [
-                  Syntax.InstructionDrop]) realArgInstrs)
-        in case dfun of
-          Core.TermVariable v0 ->
-            let rawName = Core.unName v0
-                lname = Formatting.convertCaseCamelToLowerSnake rawName
-            in (Logic.ifElse (Lists.null (Maybes.fromMaybe [] (Lists.maybeTail (Strings.splitOn "." rawName)))) (
-              let mFirstArg = Lists.maybeHead args
-                  firstArgInstrs =
-                          Maybes.cases mFirstArg [
-                            Syntax.InstructionConst (Syntax.ConstValueI32 0)] (\_a -> Maybes.fromMaybe [] (Lists.maybeHead realArgInstrs))
-                  extraArgDropInstrs =
-                          Lists.concat (Lists.map (\ai -> Lists.concat2 ai [
-                            Syntax.InstructionDrop]) (Lists.drop 1 realArgInstrs))
-              in (Right (Lists.concat [
-                extraArgDropInstrs,
-                [
-                  Syntax.InstructionLocalGet lname,
-                  (Syntax.InstructionLoad (Syntax.MemoryInstruction {
-                    Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                    Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                      Syntax.memArgOffset = 4,
-                      Syntax.memArgAlign = 2}}))],
-                firstArgInstrs,
-                [
-                  Syntax.InstructionLocalGet lname,
-                  (Syntax.InstructionLoad (Syntax.MemoryInstruction {
-                    Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                    Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                      Syntax.memArgOffset = 0,
-                      Syntax.memArgAlign = 2}})),
-                  (Syntax.InstructionCallIndirect (Syntax.TypeUse {
-                    Syntax.typeUseIndex = (Just "__closure_1"),
-                    Syntax.typeUseParams = [],
-                    Syntax.typeUseResults = []}))]]))) (
-              let mSig = Maps.lookup lname funcSigs
-                  callerArgCount = Lists.length args
-                  calleeParamCount = Maybes.maybe callerArgCount (\sig -> Lists.length (Pairs.first sig)) mSig
-                  padCount = Math.sub calleeParamCount callerArgCount
-                  padInstrs =
-                          Lists.concat (Lists.replicate (Logic.ifElse (Equality.gt padCount 0) padCount 0) [
-                            Syntax.InstructionConst (Syntax.ConstValueI32 0)])
-              in (Right (Lists.concat [
-                flatRealArgInstrs,
-                padInstrs,
-                [
-                  Syntax.InstructionCall lname]]))))
-          Core.TermProject v0 -> Maybes.cases (Lists.maybeHead args) (Right [
-            Syntax.InstructionConst (Syntax.ConstValueI32 0)]) (\firstArg -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs firstArg) (\firstArgInstrs -> encodeProjection cx g fieldOffsets v0 firstArgInstrs))
-          Core.TermCases v0 -> Maybes.cases (Lists.maybeHead args) (Right [
-            Syntax.InstructionConst (Syntax.ConstValueI32 0)]) (\firstArg -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs firstArg) (\firstArgInstrs -> encodeCases cx g stringOffsets fieldOffsets variantIndexes funcSigs v0 firstArgInstrs))
-          Core.TermLambda v0 ->
-            let peeled = peelLambdaApp (Core.TermLambda v0) args
-                paramNames = Pairs.first peeled
-                innerBody = Pairs.second peeled
-                bindInstrs =
-                        Lists.concat (Lists.map (\np ->
-                          let pname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Pairs.first np))
-                              argInstrs = Pairs.second np
-                          in (Lists.concat2 argInstrs [
-                            Syntax.InstructionLocalSet pname])) (Lists.zip paramNames realArgInstrs))
-                extraArgInstrs =
-                        Lists.concat (Lists.map (\ai -> Lists.concat2 ai [
-                          Syntax.InstructionDrop]) (Lists.drop (Lists.length paramNames) realArgInstrs))
-            in (Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs innerBody) (\bodyInstrs -> Right (Lists.concat [
-              bindInstrs,
-              extraArgInstrs,
-              bodyInstrs])))
-          _ -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs fun) (\funInstrs -> Right (Lists.concat [
-            droppedArgInstrs,
-            funInstrs,
-            [
-              Syntax.InstructionDrop,
-              (Syntax.InstructionConst (Syntax.ConstValueI32 0))]]))))
-
-encodeCases :: t0 -> t1 -> M.Map String Int -> M.Map Core.Name [(Core.Name, Int)] -> M.Map Core.Name [(Core.Name, Int)] -> M.Map String ([t2], t3) -> Core.CaseStatement -> [Syntax.Instruction] -> Either Errors.Error [Syntax.Instruction]
-encodeCases cx g stringOffsets fieldOffsets variantIndexes funcSigs cs scrutineeInstrsRaw =
-
-      let tname = Formatting.convertCaseCamelToLowerSnake (Names.localNameOf (Core.caseStatementTypeName cs))
-          caseFields = Core.caseStatementCases cs
-          scrutineeInstrs =
-                  Logic.ifElse (Lists.null scrutineeInstrsRaw) [
-                    Syntax.InstructionConst (Syntax.ConstValueI32 0)] scrutineeInstrsRaw
-          prologue =
-                  Lists.concat [
-                    scrutineeInstrs,
-                    [
-                      Syntax.InstructionLocalSet "__rec_ptr",
-                      (Syntax.InstructionLocalGet "__rec_ptr"),
-                      (Syntax.InstructionLoad (Syntax.MemoryInstruction {
-                        Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                        Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                          Syntax.memArgOffset = 4,
-                          Syntax.memArgAlign = 2}})),
-                      (Syntax.InstructionLocalSet "v"),
-                      (Syntax.InstructionLocalGet "__rec_ptr"),
-                      (Syntax.InstructionLoad (Syntax.MemoryInstruction {
-                        Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                        Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                          Syntax.memArgOffset = 0,
-                          Syntax.memArgAlign = 2}}))]]
-      in (Eithers.bind (Eithers.mapList (\cf ->
-        let cfname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.fieldName cf))
-            cfterm = Core.fieldTerm cf
-        in (Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.TermApplication (Core.Application {
-          Core.applicationFunction = cfterm,
-          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))) (\armBody -> Right (cfname, armBody)))) caseFields) (\explicitArms ->
-        let defaultArmLabel = "_default"
-            mDefault = Core.caseStatementDefault cs
-        in (Eithers.bind (Maybes.cases mDefault (Right [
-          Syntax.InstructionConst (Syntax.ConstValueI32 0)]) (\defTerm -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs defTerm)) (\defaultArmBody ->
-          let arms = Lists.concat2 explicitArms [
-                (defaultArmLabel, defaultArmBody)]
-              explicitLabelForName =
-                      \fname -> Maybes.fromMaybe defaultArmLabel (Maybes.map Pairs.first (Lists.find (\arm -> Equality.equal (Pairs.first arm) fname) explicitArms))
-              typeName = Core.caseStatementTypeName cs
-              mUnionVariants = Maps.lookup typeName variantIndexes
-              brTableLabels =
-                      Maybes.cases mUnionVariants (Lists.map Pairs.first explicitArms) (\variantPairs ->
-                        let sorted = Lists.sortOn Pairs.second variantPairs
-                        in (Lists.map (\np ->
-                          let fieldName = Formatting.convertCaseCamelToLowerSnake (Core.unName (Pairs.first np))
-                          in (explicitLabelForName fieldName)) sorted))
-              endLabel = Strings.cat2 "end_" tname
-              innerDispatch =
-                      Lists.concat2 prologue [
-                        Syntax.InstructionBrTable (Syntax.BrTableArgs {
-                          Syntax.brTableArgsLabels = brTableLabels,
-                          Syntax.brTableArgsDefault = defaultArmLabel})]
-              dispatch =
-                      Lists.foldl (\acc -> \arm ->
-                        let label = Pairs.first arm
-                            body = Pairs.second arm
-                        in (Lists.concat [
-                          [
-                            Syntax.InstructionBlock (Syntax.BlockInstruction {
-                              Syntax.blockInstructionLabel = (Just label),
-                              Syntax.blockInstructionBlockType = Syntax.BlockTypeEmpty,
-                              Syntax.blockInstructionBody = acc})],
-                          body,
-                          [
-                            Syntax.InstructionBr endLabel]])) innerDispatch arms
-          in (Right [
-            Syntax.InstructionBlock (Syntax.BlockInstruction {
-              Syntax.blockInstructionLabel = (Just endLabel),
-              Syntax.blockInstructionBlockType = (Syntax.BlockTypeValue Syntax.ValTypeI32),
-              Syntax.blockInstructionBody = dispatch})])))))
-
-encodeLiteral :: Core.Literal -> Syntax.Instruction
-encodeLiteral lit =
-    case lit of
-      Core.LiteralBoolean v0 -> Syntax.InstructionConst (Syntax.ConstValueI32 (Logic.ifElse v0 1 0))
-      Core.LiteralString _ -> Syntax.InstructionConst (Syntax.ConstValueI32 0)
-      Core.LiteralFloat _ -> Syntax.InstructionConst (Syntax.ConstValueI32 0)
-      Core.LiteralInteger v0 -> case v0 of
-        Core.IntegerValueInt8 v1 -> Syntax.InstructionConst (Syntax.ConstValueI32 (Literals.bigintToInt32 (Literals.int8ToBigint v1)))
-        Core.IntegerValueInt16 v1 -> Syntax.InstructionConst (Syntax.ConstValueI32 (Literals.bigintToInt32 (Literals.int16ToBigint v1)))
-        Core.IntegerValueInt32 v1 -> Syntax.InstructionConst (Syntax.ConstValueI32 v1)
-        Core.IntegerValueInt64 _ -> Syntax.InstructionConst (Syntax.ConstValueI32 0)
-        Core.IntegerValueUint8 v1 -> Syntax.InstructionConst (Syntax.ConstValueI32 (Literals.bigintToInt32 (Literals.uint8ToBigint v1)))
-        Core.IntegerValueUint16 v1 -> Syntax.InstructionConst (Syntax.ConstValueI32 (Literals.bigintToInt32 (Literals.uint16ToBigint v1)))
-        Core.IntegerValueUint32 v1 -> Syntax.InstructionConst (Syntax.ConstValueI32 (Literals.bigintToInt32 (Literals.uint32ToBigint v1)))
-        Core.IntegerValueUint64 _ -> Syntax.InstructionConst (Syntax.ConstValueI32 0)
-        Core.IntegerValueBigint _ -> Syntax.InstructionConst (Syntax.ConstValueI32 0)
-
-encodeLiteralType :: Core.LiteralType -> Syntax.ValType
-encodeLiteralType lt =
-    case lt of
-      Core.LiteralTypeBinary -> Syntax.ValTypeI32
-      Core.LiteralTypeBoolean -> Syntax.ValTypeI32
-      Core.LiteralTypeFloat v0 -> case v0 of
-        Core.FloatTypeBigfloat -> Syntax.ValTypeF64
-        Core.FloatTypeFloat32 -> Syntax.ValTypeF32
-        Core.FloatTypeFloat64 -> Syntax.ValTypeF64
-      Core.LiteralTypeInteger v0 -> case v0 of
-        Core.IntegerTypeBigint -> Syntax.ValTypeI64
-        Core.IntegerTypeInt8 -> Syntax.ValTypeI32
-        Core.IntegerTypeInt16 -> Syntax.ValTypeI32
-        Core.IntegerTypeInt32 -> Syntax.ValTypeI32
-        Core.IntegerTypeInt64 -> Syntax.ValTypeI64
-        Core.IntegerTypeUint8 -> Syntax.ValTypeI32
-        Core.IntegerTypeUint16 -> Syntax.ValTypeI32
-        Core.IntegerTypeUint32 -> Syntax.ValTypeI32
-        Core.IntegerTypeUint64 -> Syntax.ValTypeI64
-      Core.LiteralTypeString -> Syntax.ValTypeI32
-
-encodeProjection :: t0 -> t1 -> M.Map Core.Name [(Core.Name, Int)] -> Core.Projection -> [Syntax.Instruction] -> Either t2 [Syntax.Instruction]
-encodeProjection cx g fieldOffsets proj scrutineeInstrs =
-
-      let typeName = Core.projectionTypeName proj
-          fieldName = Core.projectionField proj
-          mFields = Maps.lookup typeName fieldOffsets
-          mOffset =
-                  Maybes.cases mFields Nothing (\pairs ->
-                    let matching = Lists.filter (\p -> Equality.equal (Pairs.first p) fieldName) pairs
-                    in (Maybes.map Pairs.second (Lists.maybeHead matching)))
-      in (Maybes.cases mOffset (Right (Lists.concat [
-        scrutineeInstrs,
-        (Logic.ifElse (Lists.null scrutineeInstrs) [] [
-          Syntax.InstructionDrop]),
-        [
-          Syntax.InstructionConst (Syntax.ConstValueI32 0)]])) (\off -> Right (Lists.concat [
-        Logic.ifElse (Lists.null scrutineeInstrs) [
-          Syntax.InstructionConst (Syntax.ConstValueI32 0)] scrutineeInstrs,
-        [
-          Syntax.InstructionLoad (Syntax.MemoryInstruction {
-            Syntax.memoryInstructionType = Syntax.ValTypeI32,
-            Syntax.memoryInstructionMemArg = Syntax.MemArg {
-              Syntax.memArgOffset = off,
-              Syntax.memArgAlign = 2}})]])))
-
-encodeTerm :: t0 -> t1 -> M.Map String Int -> M.Map Core.Name [(Core.Name, Int)] -> M.Map Core.Name [(Core.Name, Int)] -> M.Map String ([t2], t3) -> Core.Term -> Either Errors.Error [Syntax.Instruction]
-encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs term =
-    case term of
-      Core.TermAnnotated v0 -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.annotatedTermBody v0)
-      Core.TermApplication v0 -> encodeApplication cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.TermApplication v0)
-      Core.TermCases _ -> Right [
-        Syntax.InstructionConst (Syntax.ConstValueI32 0)]
-      Core.TermEither v0 ->
-        let eitherTag = Eithers.either (\_lv -> 0) (\_rv -> 1) v0
-            innerTerm = Eithers.either (\lv -> lv) (\rv -> rv) v0
-        in (Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs innerTerm) (\payloadInstrs -> Right (Lists.concat [
-          [
-            Syntax.InstructionConst (Syntax.ConstValueI32 eitherTag)],
-          payloadInstrs,
-          [
-            Syntax.InstructionConst (Syntax.ConstValueI32 8),
-            (Syntax.InstructionCall "__alloc"),
-            (Syntax.InstructionLocalSet "__rec_ptr"),
-            (Syntax.InstructionLocalSet "__rec_scratch"),
-            (Syntax.InstructionLocalGet "__rec_ptr"),
-            (Syntax.InstructionLocalGet "__rec_scratch"),
-            (Syntax.InstructionStore (Syntax.MemoryInstruction {
-              Syntax.memoryInstructionType = Syntax.ValTypeI32,
-              Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                Syntax.memArgOffset = 4,
-                Syntax.memArgAlign = 2}})),
-            (Syntax.InstructionLocalSet "__rec_scratch"),
-            (Syntax.InstructionLocalGet "__rec_ptr"),
-            (Syntax.InstructionLocalGet "__rec_scratch"),
-            (Syntax.InstructionStore (Syntax.MemoryInstruction {
-              Syntax.memoryInstructionType = Syntax.ValTypeI32,
-              Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                Syntax.memArgOffset = 0,
-                Syntax.memArgAlign = 2}})),
-            (Syntax.InstructionLocalGet "__rec_ptr")]])))
-      Core.TermInject v0 ->
-        let typeName = Core.injectionTypeName v0
-            field = Core.injectionField v0
-            fieldName = Core.fieldName field
-            fterm = Core.fieldTerm field
-            dterm = Strip.deannotateTerm fterm
-            isUnit =
-                    case dterm of
-                      Core.TermUnit -> True
-                      Core.TermRecord v1 -> Lists.null (Core.recordFields v1)
-                      _ -> False
-            mVariants = Maps.lookup typeName variantIndexes
-            tag =
-                    Maybes.cases mVariants 0 (\pairs ->
-                      let matching = Lists.filter (\p -> Equality.equal (Pairs.first p) fieldName) pairs
-                      in (Maybes.cases (Lists.maybeHead matching) 0 (\p -> Pairs.second p)))
-        in (Eithers.bind (Logic.ifElse isUnit (Right [
-          Syntax.InstructionConst (Syntax.ConstValueI32 0)]) (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs fterm)) (\payloadInstrs -> Right (Lists.concat [
-          [
-            Syntax.InstructionConst (Syntax.ConstValueI32 tag)],
-          payloadInstrs,
-          [
-            Syntax.InstructionConst (Syntax.ConstValueI32 8),
-            (Syntax.InstructionCall "__alloc"),
-            (Syntax.InstructionLocalSet "__rec_ptr"),
-            (Syntax.InstructionLocalSet "__rec_scratch"),
-            (Syntax.InstructionLocalGet "__rec_ptr"),
-            (Syntax.InstructionLocalGet "__rec_scratch"),
-            (Syntax.InstructionStore (Syntax.MemoryInstruction {
-              Syntax.memoryInstructionType = Syntax.ValTypeI32,
-              Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                Syntax.memArgOffset = 4,
-                Syntax.memArgAlign = 2}})),
-            (Syntax.InstructionLocalSet "__rec_scratch"),
-            (Syntax.InstructionLocalGet "__rec_ptr"),
-            (Syntax.InstructionLocalGet "__rec_scratch"),
-            (Syntax.InstructionStore (Syntax.MemoryInstruction {
-              Syntax.memoryInstructionType = Syntax.ValTypeI32,
-              Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                Syntax.memArgOffset = 0,
-                Syntax.memArgAlign = 2}})),
-            (Syntax.InstructionLocalGet "__rec_ptr")]])))
-      Core.TermLambda v0 -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.lambdaBody v0)
-      Core.TermLet v0 ->
-        let bindings = Core.letBindings v0
-            body = Core.letBody v0
-        in (Eithers.bind (Eithers.mapList (\b ->
-          let bname = Formatting.convertCaseCamelToLowerSnake (Core.unName (Core.bindingName b))
-          in (Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.bindingTerm b)) (\bval -> Right (Lists.concat2 bval [
-            Syntax.InstructionLocalSet bname])))) bindings) (\bindInstrs -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs body) (\bodyInstrs -> Right (Lists.concat2 (Lists.concat bindInstrs) bodyInstrs))))
-      Core.TermList v0 ->
-        let numElems = Lists.length v0
-            listSize = Math.mul (Math.add numElems 1) 4
-        in (Eithers.bind (Eithers.mapList (\el -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs el) v0) (\encodedElems ->
-          let allElemInstrs = Lists.concat encodedElems
-              allocInstrs =
-                      [
-                        Syntax.InstructionConst (Syntax.ConstValueI32 listSize),
-                        (Syntax.InstructionCall "__alloc"),
-                        (Syntax.InstructionLocalSet "__rec_ptr")]
-              lengthStoreInstrs =
-                      [
-                        Syntax.InstructionLocalGet "__rec_ptr",
-                        (Syntax.InstructionConst (Syntax.ConstValueI32 numElems)),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = 0,
-                            Syntax.memArgAlign = 2}}))]
-              storeInstrs =
-                      Lists.concat (Lists.map (\i -> [
-                        Syntax.InstructionLocalSet "__rec_scratch",
-                        (Syntax.InstructionLocalGet "__rec_ptr"),
-                        (Syntax.InstructionLocalGet "__rec_scratch"),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = (Math.mul (Math.add i 1) 4),
-                            Syntax.memArgAlign = 2}}))]) (Lists.foldl (\acc -> \_e -> Lists.cons (Lists.length acc) acc) [] v0))
-              finalInstrs = [
-                    Syntax.InstructionLocalGet "__rec_ptr"]
-          in (Right (Lists.concat [
-            allElemInstrs,
-            allocInstrs,
-            lengthStoreInstrs,
-            storeInstrs,
-            finalInstrs]))))
-      Core.TermLiteral v0 -> case v0 of
-        Core.LiteralString v1 -> Maybes.maybe (Right [
-          Syntax.InstructionConst (Syntax.ConstValueI32 0)]) (\off -> Right [
-          Syntax.InstructionConst (Syntax.ConstValueI32 off)]) (Maps.lookup v1 stringOffsets)
-        _ -> Right [
-          encodeLiteral v0]
-      Core.TermMap v0 ->
-        let mapEntries = Maps.toList v0
-            numMapEntries = Lists.length mapEntries
-            mapWordCount = Math.add (Math.mul numMapEntries 2) 1
-            mapSize = Math.mul mapWordCount 4
-        in (Eithers.bind (Eithers.mapList (\kv -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Pairs.first kv)) (\kInstrs -> Eithers.map (\vInstrs -> Lists.concat2 kInstrs vInstrs) (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Pairs.second kv)))) mapEntries) (\encodedMapKVs ->
-          let allMapKVInstrs = Lists.concat encodedMapKVs
-              mapAllocInstrs =
-                      [
-                        Syntax.InstructionConst (Syntax.ConstValueI32 mapSize),
-                        (Syntax.InstructionCall "__alloc"),
-                        (Syntax.InstructionLocalSet "__rec_ptr")]
-              mapLengthStoreInstrs =
-                      [
-                        Syntax.InstructionLocalGet "__rec_ptr",
-                        (Syntax.InstructionConst (Syntax.ConstValueI32 numMapEntries)),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = 0,
-                            Syntax.memArgAlign = 2}}))]
-              numMapWords = Math.mul numMapEntries 2
-              mapReverseIndices = Lists.foldl (\acc -> \_i -> Lists.cons (Lists.length acc) acc) [] (Lists.replicate numMapWords ())
-              mapStoreInstrs =
-                      Lists.concat (Lists.map (\j -> [
-                        Syntax.InstructionLocalSet "__rec_scratch",
-                        (Syntax.InstructionLocalGet "__rec_ptr"),
-                        (Syntax.InstructionLocalGet "__rec_scratch"),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = (Math.mul (Math.add j 1) 4),
-                            Syntax.memArgAlign = 2}}))]) mapReverseIndices)
-              mapFinalInstrs = [
-                    Syntax.InstructionLocalGet "__rec_ptr"]
-          in (Right (Lists.concat [
-            allMapKVInstrs,
-            mapAllocInstrs,
-            mapLengthStoreInstrs,
-            mapStoreInstrs,
-            mapFinalInstrs]))))
-      Core.TermMaybe v0 -> Maybes.cases v0 (Right [
-        Syntax.InstructionConst (Syntax.ConstValueI32 0)]) (\val -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs val)
-      Core.TermPair v0 -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Pairs.first v0)) (\firstInstrs -> Eithers.bind (encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Pairs.second v0)) (\secondInstrs -> Right (Lists.concat [
-        firstInstrs,
-        secondInstrs,
-        [
-          Syntax.InstructionConst (Syntax.ConstValueI32 8),
-          (Syntax.InstructionCall "__alloc"),
-          (Syntax.InstructionLocalSet "__rec_ptr"),
-          (Syntax.InstructionLocalSet "__rec_scratch"),
-          (Syntax.InstructionLocalGet "__rec_ptr"),
-          (Syntax.InstructionLocalGet "__rec_scratch"),
-          (Syntax.InstructionStore (Syntax.MemoryInstruction {
-            Syntax.memoryInstructionType = Syntax.ValTypeI32,
-            Syntax.memoryInstructionMemArg = Syntax.MemArg {
-              Syntax.memArgOffset = 4,
-              Syntax.memArgAlign = 2}})),
-          (Syntax.InstructionLocalSet "__rec_scratch"),
-          (Syntax.InstructionLocalGet "__rec_ptr"),
-          (Syntax.InstructionLocalGet "__rec_scratch"),
-          (Syntax.InstructionStore (Syntax.MemoryInstruction {
-            Syntax.memoryInstructionType = Syntax.ValTypeI32,
-            Syntax.memoryInstructionMemArg = Syntax.MemArg {
-              Syntax.memArgOffset = 0,
-              Syntax.memArgAlign = 2}})),
-          (Syntax.InstructionLocalGet "__rec_ptr")]])))
-      Core.TermProject _ -> Right [
-        Syntax.InstructionConst (Syntax.ConstValueI32 0)]
-      Core.TermRecord v0 ->
-        let recFields = Core.recordFields v0
-            numFields = Lists.length recFields
-            recSize = Math.mul numFields 4
-        in (Eithers.bind (Eithers.mapList (\fld -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.fieldTerm fld)) recFields) (\encodedFields ->
-          let allFieldInstrs = Lists.concat encodedFields
-              allocInstrs =
-                      [
-                        Syntax.InstructionConst (Syntax.ConstValueI32 recSize),
-                        (Syntax.InstructionCall "__alloc"),
-                        (Syntax.InstructionLocalSet "__rec_ptr")]
-              storeInstrs =
-                      Lists.concat (Lists.map (\i -> [
-                        Syntax.InstructionLocalSet "__rec_scratch",
-                        (Syntax.InstructionLocalGet "__rec_ptr"),
-                        (Syntax.InstructionLocalGet "__rec_scratch"),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = (Math.mul i 4),
-                            Syntax.memArgAlign = 2}}))]) (Lists.foldl (\acc -> \_f -> Lists.cons (Lists.length acc) acc) [] recFields))
-              finalInstrs = [
-                    Syntax.InstructionLocalGet "__rec_ptr"]
-          in (Right (Lists.concat [
-            allFieldInstrs,
-            allocInstrs,
-            storeInstrs,
-            finalInstrs]))))
-      Core.TermSet v0 ->
-        let setElems = Sets.toList v0
-            numSetElems = Lists.length setElems
-            setSize = Math.mul (Math.add numSetElems 1) 4
-        in (Eithers.bind (Eithers.mapList (\el -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs el) setElems) (\encodedSetElems ->
-          let allSetElemInstrs = Lists.concat encodedSetElems
-              setAllocInstrs =
-                      [
-                        Syntax.InstructionConst (Syntax.ConstValueI32 setSize),
-                        (Syntax.InstructionCall "__alloc"),
-                        (Syntax.InstructionLocalSet "__rec_ptr")]
-              setLengthStoreInstrs =
-                      [
-                        Syntax.InstructionLocalGet "__rec_ptr",
-                        (Syntax.InstructionConst (Syntax.ConstValueI32 numSetElems)),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = 0,
-                            Syntax.memArgAlign = 2}}))]
-              setStoreInstrs =
-                      Lists.concat (Lists.map (\i -> [
-                        Syntax.InstructionLocalSet "__rec_scratch",
-                        (Syntax.InstructionLocalGet "__rec_ptr"),
-                        (Syntax.InstructionLocalGet "__rec_scratch"),
-                        (Syntax.InstructionStore (Syntax.MemoryInstruction {
-                          Syntax.memoryInstructionType = Syntax.ValTypeI32,
-                          Syntax.memoryInstructionMemArg = Syntax.MemArg {
-                            Syntax.memArgOffset = (Math.mul (Math.add i 1) 4),
-                            Syntax.memArgAlign = 2}}))]) (Lists.foldl (\acc -> \_e -> Lists.cons (Lists.length acc) acc) [] setElems))
-              setFinalInstrs = [
-                    Syntax.InstructionLocalGet "__rec_ptr"]
-          in (Right (Lists.concat [
-            allSetElemInstrs,
-            setAllocInstrs,
-            setLengthStoreInstrs,
-            setStoreInstrs,
-            setFinalInstrs]))))
-      Core.TermTypeApplication v0 -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.typeApplicationTermBody v0)
-      Core.TermTypeLambda v0 -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.typeLambdaBody v0)
-      Core.TermUnit -> Right [
-        Syntax.InstructionConst (Syntax.ConstValueI32 0)]
-      Core.TermUnwrap _ -> Right [
-        Syntax.InstructionConst (Syntax.ConstValueI32 0)]
-      Core.TermVariable v0 ->
-        let rawName = Core.unName v0
-            lname = Formatting.convertCaseCamelToLowerSnake rawName
-        in (Logic.ifElse (Lists.null (Maybes.fromMaybe [] (Lists.maybeTail (Strings.splitOn "." rawName)))) (Right [
-          Syntax.InstructionLocalGet lname]) (Right [
-          Syntax.InstructionConst (Syntax.ConstValueI32 0)]))
-      Core.TermWrap v0 -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs (Core.wrappedTermBody v0)
-      _ -> Left (Errors.ErrorOther (Errors.OtherError "unexpected term variant in WASM encoding"))
-
-encodeTermDefinition :: t0 -> t1 -> M.Map String Int -> M.Map Core.Name [(Core.Name, Int)] -> M.Map Core.Name [(Core.Name, Int)] -> M.Map String ([t2], t3) -> Packaging.TermDefinition -> Either Errors.Error Syntax.ModuleField
-encodeTermDefinition cx g stringOffsets fieldOffsets variantIndexes funcSigs tdef =
-
-      let name = Packaging.termDefinitionName tdef
-          term = Packaging.termDefinitionTerm tdef
-          lname = Formatting.convertCaseCamelToLowerSnake (Core.unName name)
-          typ = Maybes.maybe Core.TypeUnit Core.typeSchemeBody (Packaging.termDefinitionTypeScheme tdef)
-          extracted = extractLambdaParams term
-          paramNames = Pairs.first extracted
-          innerBody = Pairs.second extracted
-          lambdaParamNameStrs = Lists.map (\pn -> Formatting.convertCaseCamelToLowerSnake (Core.unName pn)) paramNames
-      in (Eithers.bind (extractParamTypes cx g typ) (\typeParams ->
-        let typeParamCount = Lists.length typeParams
-            lambdaParamCount = Lists.length lambdaParamNameStrs
-            syntheticCount = Logic.ifElse (Equality.gt typeParamCount lambdaParamCount) (Math.sub typeParamCount lambdaParamCount) 0
-            syntheticParamNames = Logic.ifElse (Equality.gt syntheticCount 0) (Lists.map (\i -> Strings.cat2 "arg_synth_" (Literals.showInt32 i)) (Math.range 0 (Math.sub syntheticCount 1))) []
-            paramNameStrs = Lists.concat2 lambdaParamNameStrs syntheticParamNames
-            wasmParams =
-                    Lists.map (\pn -> Syntax.Param {
-                      Syntax.paramName = (Just pn),
-                      Syntax.paramType = Syntax.ValTypeI32}) paramNameStrs
-            initPrologue =
-                    Lists.concat (Lists.map (\sn -> [
-                      Syntax.InstructionLocalGet sn,
-                      Syntax.InstructionDrop]) syntheticParamNames)
-            resultTypes = [
-                  Syntax.ValTypeI32]
-            dBody = Strip.deannotateTerm innerBody
-            scrutineeInstrs = Maybes.cases (Lists.maybeHead paramNameStrs) [] (\p0 -> [
-                  Syntax.InstructionLocalGet p0])
-        in (Eithers.bind (case dBody of
-          Core.TermProject v0 -> encodeProjection cx g fieldOffsets v0 scrutineeInstrs
-          Core.TermCases v0 -> encodeCases cx g stringOffsets fieldOffsets variantIndexes funcSigs v0 scrutineeInstrs
-          Core.TermUnwrap _ -> Right [
-            Syntax.InstructionConst (Syntax.ConstValueI32 0)]
-          _ -> encodeTerm cx g stringOffsets fieldOffsets variantIndexes funcSigs innerBody) (\rawBodyInstrs ->
-          let bodyInstrs = Lists.concat2 initPrologue rawBodyInstrs
-              referencedLocals = collectInstructionLocals bodyInstrs
-              allLocalNames = Sets.toList (Sets.difference referencedLocals (Sets.fromList paramNameStrs))
-              wasmLocals =
-                      Lists.map (\ln -> Syntax.FuncLocal {
-                        Syntax.funcLocalName = (Just ln),
-                        Syntax.funcLocalType = Syntax.ValTypeI32}) allLocalNames
-          in (Right (Syntax.ModuleFieldFunc (Syntax.Func {
-            Syntax.funcName = (Just lname),
-            Syntax.funcTypeUse = Syntax.TypeUse {
-              Syntax.typeUseIndex = Nothing,
-              Syntax.typeUseParams = wasmParams,
-              Syntax.typeUseResults = resultTypes},
-            Syntax.funcLocals = wasmLocals,
-            Syntax.funcBody = bodyInstrs})))))))
-
-encodeType :: t0 -> t1 -> Core.Type -> Either t2 [Syntax.ValType]
-encodeType cx g t =
-
-      let typ = Strip.deannotateType t
-      in case typ of
-        Core.TypeAnnotated v0 -> encodeType cx g (Core.annotatedTypeBody v0)
-        Core.TypeFunction v0 -> encodeType cx g (Core.functionTypeCodomain v0)
-        Core.TypeUnit -> Right []
-        Core.TypeVoid -> Right []
-        Core.TypeLiteral v0 -> Right [
-          encodeLiteralType v0]
-        Core.TypeForall v0 -> encodeType cx g (Core.forallTypeBody v0)
-        _ -> Right [
-          Syntax.ValTypeI32]
-
-encodeTypeDefinition :: t0 -> t1 -> Packaging.TypeDefinition -> Either t2 [Syntax.ModuleField]
-encodeTypeDefinition cx g tdef =
-
-      let name = Packaging.typeDefinitionName tdef
-          lname = Formatting.convertCaseCamelToLowerSnake (Names.localNameOf name)
-          typ = Core.typeSchemeBody (Packaging.typeDefinitionTypeScheme tdef)
-          dtyp = Strip.deannotateType typ
-      in case dtyp of
-        Core.TypeFunction _ -> Eithers.bind (extractParamTypes cx g typ) (\paramTypes -> Eithers.bind (encodeType cx g typ) (\resultTypes -> Right [
-          Syntax.ModuleFieldType (Syntax.TypeDef {
-            Syntax.typeDefName = (Just lname),
-            Syntax.typeDefType = Syntax.FuncType {
-              Syntax.funcTypeParams = paramTypes,
-              Syntax.funcTypeResults = resultTypes}})]))
-        _ -> Right []
-
-encodeValType :: t0 -> t1 -> Core.Type -> Either t2 Syntax.ValType
-encodeValType cx g t =
-
-      let typ = Strip.deannotateType t
-      in case typ of
-        Core.TypeAnnotated v0 -> encodeValType cx g (Core.annotatedTypeBody v0)
-        Core.TypeApplication v0 -> encodeValType cx g (Core.applicationTypeFunction v0)
-        Core.TypeLiteral v0 -> Right (encodeLiteralType v0)
-        Core.TypeUnit -> Right Syntax.ValTypeI32
-        Core.TypeVoid -> Right Syntax.ValTypeI32
-        Core.TypeForall v0 -> encodeValType cx g (Core.forallTypeBody v0)
-        _ -> Right Syntax.ValTypeI32
-
-extractLambdaParams :: Core.Term -> ([Core.Name], Core.Term)
-extractLambdaParams term =
-
-      let stripped = Strip.deannotateTerm term
-      in case stripped of
-        Core.TermLambda v0 ->
-          let paramName = Core.lambdaParameter v0
-              body = Core.lambdaBody v0
-              inner = extractLambdaParams body
-          in (Lists.cons paramName (Pairs.first inner), (Pairs.second inner))
-        Core.TermCases _ -> ([
-          Core.Name "arg_0"], term)
-        Core.TermProject _ -> ([
-          Core.Name "arg_0"], term)
-        Core.TermUnwrap _ -> ([
-          Core.Name "arg_0"], term)
-        Core.TermTypeLambda v0 -> extractLambdaParams (Core.typeLambdaBody v0)
-        Core.TermTypeApplication v0 -> extractLambdaParams (Core.typeApplicationTermBody v0)
-        _ -> ([], term)
-
-extractParamTypes :: t0 -> t1 -> Core.Type -> Either t2 [Syntax.ValType]
-extractParamTypes cx g t =
-
-      let typ = Strip.deannotateType t
-      in case typ of
-        Core.TypeFunction v0 -> Eithers.bind (encodeValType cx g (Core.functionTypeDomain v0)) (\domType -> Eithers.bind (extractParamTypes cx g (Core.functionTypeCodomain v0)) (\rest -> Right (Lists.cons domType rest)))
-        Core.TypeForall v0 -> extractParamTypes cx g (Core.forallTypeBody v0)
-        _ -> Right []
-
-extractSignature :: t0 -> t1 -> Core.Type -> Either t2 ([Syntax.ValType], [Syntax.ValType])
-extractSignature cx g t =
-    Eithers.bind (extractParamTypes cx g t) (\params -> Eithers.bind (encodeType cx g t) (\results -> Right (clampValTypesToI32 params, (clampValTypesToI32 results))))
-
-hexEscapeString :: Int -> String
-hexEscapeString b =
-
-      let byte = Maybes.fromMaybe 0 (Math.maybeMod b 256)
-          digitToHex =
-                  \d -> Logic.ifElse (Equality.lt d 10) (Strings.fromList [
-                    Math.add d 48]) (Strings.fromList [
-                    Math.add d 87])
-      in (Strings.cat [
-        "\\",
-        (digitToHex (Maybes.fromMaybe 0 (Math.maybeDiv byte 16))),
-        (digitToHex (Maybes.fromMaybe 0 (Math.maybeMod byte 16)))])
-
-moduleToWasm :: Packaging.Module -> [Packaging.Definition] -> t0 -> Graph.Graph -> Either Errors.Error (M.Map String String)
-moduleToWasm mod defs cx g =
-
-      let partitioned = Environment.partitionDefinitions defs
-          typeDefs = Pairs.first partitioned
-          termDefs = Pairs.second partitioned
-          stringList = collectStrings termDefs
-          stringOffsetsAndEnd = buildStringOffsets stringList
-          stringOffsets = Pairs.first stringOffsetsAndEnd
-          stringEnd = Pairs.second stringOffsetsAndEnd
-          dataField = stringDataSegment stringOffsets
-          fieldOffsets = buildFieldOffsets g
-          variantIndexes = buildVariantIndexes g
-          funcSigs = buildFunctionSignatures cx g termDefs
-      in (Eithers.bind (Eithers.mapList (encodeTypeDefinition cx g) typeDefs) (\typeFields -> Eithers.bind (Eithers.mapList (encodeTermDefinition cx g stringOffsets fieldOffsets variantIndexes funcSigs) termDefs) (\termFields ->
-        let allFields = Lists.concat2 (Lists.concat typeFields) termFields
-            bumpGlobal =
-                    Syntax.ModuleFieldGlobal (Syntax.GlobalDef {
-                      Syntax.globalDefName = (Just "__bump_ptr"),
-                      Syntax.globalDefType = Syntax.GlobalType {
-                        Syntax.globalTypeValType = Syntax.ValTypeI32,
-                        Syntax.globalTypeMutable = True},
-                      Syntax.globalDefInit = [
-                        Syntax.InstructionConst (Syntax.ConstValueI32 stringEnd)]})
-            allocFunc =
-                    Syntax.ModuleFieldFunc (Syntax.Func {
-                      Syntax.funcName = (Just "__alloc"),
-                      Syntax.funcTypeUse = Syntax.TypeUse {
-                        Syntax.typeUseIndex = Nothing,
-                        Syntax.typeUseParams = [
-                          Syntax.Param {
-                            Syntax.paramName = (Just "sz"),
-                            Syntax.paramType = Syntax.ValTypeI32}],
-                        Syntax.typeUseResults = [
-                          Syntax.ValTypeI32]},
-                      Syntax.funcLocals = [],
-                      Syntax.funcBody = [
-                        Syntax.InstructionGlobalGet "__bump_ptr",
-                        (Syntax.InstructionGlobalGet "__bump_ptr"),
-                        (Syntax.InstructionLocalGet "sz"),
-                        (Syntax.InstructionBinop (Syntax.NumericOp {
-                          Syntax.numericOpType = Syntax.ValTypeI32,
-                          Syntax.numericOpName = "add"})),
-                        (Syntax.InstructionGlobalSet "__bump_ptr")]})
-            memField =
-                    Syntax.ModuleFieldMemory (Syntax.MemoryDef {
-                      Syntax.memoryDefName = (Just "memory"),
-                      Syntax.memoryDefLimits = Syntax.Limits {
-                        Syntax.limitsMin = 2,
-                        Syntax.limitsMax = Nothing}})
-            memExport =
-                    Syntax.ModuleFieldExport (Syntax.ExportDef {
-                      Syntax.exportDefName = "memory",
-                      Syntax.exportDefDesc = (Syntax.ExportDescMemory "memory")})
-            bumpExport =
-                    Syntax.ModuleFieldExport (Syntax.ExportDef {
-                      Syntax.exportDefName = "__bump_ptr",
-                      Syntax.exportDefDesc = (Syntax.ExportDescGlobal "__bump_ptr")})
-            allocExport =
-                    Syntax.ModuleFieldExport (Syntax.ExportDef {
-                      Syntax.exportDefName = "__alloc",
-                      Syntax.exportDefDesc = (Syntax.ExportDescFunc "__alloc")})
-            closureType =
-                    Syntax.ModuleFieldType (Syntax.TypeDef {
-                      Syntax.typeDefName = (Just "__closure_1"),
-                      Syntax.typeDefType = Syntax.FuncType {
-                        Syntax.funcTypeParams = [
-                          Syntax.ValTypeI32,
-                          Syntax.ValTypeI32],
-                        Syntax.funcTypeResults = [
-                          Syntax.ValTypeI32]}})
-            closureTable =
-                    Syntax.ModuleFieldTable (Syntax.TableDef {
-                      Syntax.tableDefName = (Just "__closure_table"),
-                      Syntax.tableDefRefType = Syntax.RefTypeFuncref,
-                      Syntax.tableDefLimits = Syntax.Limits {
-                        Syntax.limitsMin = 0,
-                        Syntax.limitsMax = Nothing}})
-            funcExports =
-                    Lists.map (\td ->
-                      let ename = Formatting.convertCaseCamelToLowerSnake (Core.unName (Packaging.termDefinitionName td))
-                      in (Syntax.ModuleFieldExport (Syntax.ExportDef {
-                        Syntax.exportDefName = ename,
-                        Syntax.exportDefDesc = (Syntax.ExportDescFunc ename)}))) termDefs
-            allBodyInstrs =
-                    Lists.concat (Lists.map (\tf -> case tf of
-                      Syntax.ModuleFieldFunc v0 -> Syntax.funcBody v0
-                      _ -> []) termFields)
-            allCallTargets = collectCallTargets allBodyInstrs
-            localFuncNames =
-                    Sets.insert "__alloc" (Sets.fromList (Lists.map (\td -> Formatting.convertCaseCamelToLowerSnake (Core.unName (Packaging.termDefinitionName td))) termDefs))
-            externalCalls = Sets.toList (Sets.difference allCallTargets localFuncNames)
-            defaultSig = ([
-                  Syntax.ValTypeI32], [
-                  Syntax.ValTypeI32])
-            importFields =
-                    Lists.map (\fname ->
-                      let parts = Strings.splitOn "." fname
-                          modName = Strings.intercalate "." (Lists.reverse (Maybes.fromMaybe [] (Lists.maybeTail (Lists.reverse parts))))
-                          sig = Maybes.fromMaybe defaultSig (Maps.lookup fname funcSigs)
-                          sigParams = Pairs.first sig
-                          sigResults = Pairs.second sig
-                          wasmImportParams =
-                                  Lists.map (\vt -> Syntax.Param {
-                                    Syntax.paramName = Nothing,
-                                    Syntax.paramType = vt}) sigParams
-                      in (Syntax.ModuleFieldImport (Syntax.ImportDef {
-                        Syntax.importDefModule = modName,
-                        Syntax.importDefName = fname,
-                        Syntax.importDefDesc = (Syntax.ImportDescFunc (Syntax.ImportFunc {
-                          Syntax.importFuncName = (Just fname),
-                          Syntax.importFuncTypeUse = Syntax.TypeUse {
-                            Syntax.typeUseIndex = Nothing,
-                            Syntax.typeUseParams = wasmImportParams,
-                            Syntax.typeUseResults = sigResults}}))}))) externalCalls
-            wasmMod =
-                    Syntax.Module {
-                      Syntax.moduleName = Nothing,
-                      Syntax.moduleFields = (Lists.concat [
-                        importFields,
-                        [
-                          closureType,
-                          memField,
-                          memExport,
-                          dataField,
-                          bumpGlobal,
-                          bumpExport,
-                          allocFunc,
-                          allocExport,
-                          closureTable],
-                        funcExports,
-                        allFields])}
-            code = Serialization.printExpr (Serialization.parenthesize (Serde.moduleToExpr wasmMod))
-            filePath =
-                    Names.namespaceToFilePath Util.CaseConventionLowerSnake (Packaging.FileExtension "wat") (Packaging.moduleNamespace mod)
-        in (Right (Maps.singleton filePath code)))))
-
-peelLambdaApp :: Core.Term -> [t0] -> ([Core.Name], Core.Term)
-peelLambdaApp term args =
-    Logic.ifElse (Lists.null args) ([], term) (
-      let stripped = Strip.deannotateTerm term
-      in case stripped of
-        Core.TermLambda v0 ->
-          let paramName = Core.lambdaParameter v0
-              body = Core.lambdaBody v0
-              restArgs = Maybes.fromMaybe [] (Lists.maybeTail args)
-              inner = peelLambdaApp body restArgs
-          in (Lists.cons paramName (Pairs.first inner), (Pairs.second inner))
-        _ -> ([], term))
-
-stringDataSegment :: Ord t0 => (M.Map String t0 -> Syntax.ModuleField)
-stringDataSegment offsets =
-
-      let entries = Lists.sortOn Pairs.second (Maps.toList offsets)
-          bytesForEntry =
-                  \entry ->
-                    let s = Pairs.first entry
-                        len = Strings.length s
-                        lenBytes =
-                                [
-                                  Maybes.fromMaybe 0 (Math.maybeMod len 256),
-                                  (Maybes.fromMaybe 0 (Math.maybeMod (Maybes.fromMaybe 0 (Math.maybeDiv len 256)) 256)),
-                                  (Maybes.fromMaybe 0 (Math.maybeMod (Maybes.fromMaybe 0 (Math.maybeDiv len 65536)) 256)),
-                                  (Maybes.fromMaybe 0 (Math.maybeMod (Maybes.fromMaybe 0 (Math.maybeDiv len 16777216)) 256))]
-                        contentBytes = Strings.toList s
-                        allBytes = Lists.concat2 lenBytes contentBytes
-                    in (Strings.cat (Lists.map (\b -> hexEscapeString b) allBytes))
-          allHex = Strings.cat (Lists.map bytesForEntry entries)
-      in (Syntax.ModuleFieldData (Syntax.DataSegment {
-        Syntax.dataSegmentName = Nothing,
-        Syntax.dataSegmentMode = (Syntax.DataModeActive [
-          Syntax.InstructionConst (Syntax.ConstValueI32 1024)]),
-        Syntax.dataSegmentBytes = allHex}))
diff --git a/src/main/haskell/Hydra/Wasm/Language.hs b/src/main/haskell/Hydra/Wasm/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Wasm/Language.hs
+++ /dev/null
@@ -1,167 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints and reserved words for WebAssembly (WAT text format)
-
-module Hydra.Wasm.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-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.Set as S
-
--- | Language constraints for WebAssembly
-wasmLanguage :: Coders.Language
-wasmLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.wasm"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants =
-        Sets.fromList [
-          Variants.EliminationVariantRecord,
-          Variants.EliminationVariantUnion]
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes =
-        Sets.fromList [
-          Core.FloatTypeFloat32,
-          Core.FloatTypeFloat64]
-    functionVariants =
-        Sets.fromList [
-          Variants.FunctionVariantElimination,
-          Variants.FunctionVariantLambda]
-    integerTypes =
-        Sets.fromList [
-          Core.IntegerTypeInt8,
-          Core.IntegerTypeInt16,
-          Core.IntegerTypeInt32,
-          Core.IntegerTypeInt64,
-          Core.IntegerTypeUint8,
-          Core.IntegerTypeUint16,
-          Core.IntegerTypeUint32,
-          Core.IntegerTypeUint64]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantAnnotated,
-          Variants.TermVariantApplication,
-          Variants.TermVariantCases,
-          Variants.TermVariantEither,
-          Variants.TermVariantInject,
-          Variants.TermVariantLambda,
-          Variants.TermVariantLet,
-          Variants.TermVariantList,
-          Variants.TermVariantLiteral,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantPair,
-          Variants.TermVariantProject,
-          Variants.TermVariantRecord,
-          Variants.TermVariantSet,
-          Variants.TermVariantTypeApplication,
-          Variants.TermVariantTypeLambda,
-          Variants.TermVariantUnit,
-          Variants.TermVariantUnwrap,
-          Variants.TermVariantVariable,
-          Variants.TermVariantWrap]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantAnnotated,
-          Variants.TypeVariantApplication,
-          Variants.TypeVariantEither,
-          Variants.TypeVariantFunction,
-          Variants.TypeVariantForall,
-          Variants.TypeVariantList,
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantPair,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantSet,
-          Variants.TypeVariantUnion,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVariable,
-          Variants.TypeVariantVoid,
-          Variants.TypeVariantWrap]
-    typePredicate = \_ -> True
-
--- | A set of reserved words in WebAssembly text format
-wasmReservedWords :: S.Set String
-wasmReservedWords =
-    Sets.fromList (Lists.concat [
-      keywords,
-      valueTypes,
-      instructionPrefixes])
-  where
-    keywords =
-        [
-          "module",
-          "type",
-          "func",
-          "param",
-          "result",
-          "local",
-          "global",
-          "table",
-          "memory",
-          "elem",
-          "data",
-          "start",
-          "import",
-          "export",
-          "block",
-          "loop",
-          "if",
-          "then",
-          "else",
-          "end",
-          "br",
-          "br_if",
-          "br_table",
-          "return",
-          "call",
-          "call_indirect",
-          "drop",
-          "select",
-          "unreachable",
-          "nop",
-          "mut",
-          "offset",
-          "align"]
-    valueTypes =
-        [
-          "i32",
-          "i64",
-          "f32",
-          "f64",
-          "v128",
-          "funcref",
-          "externref"]
-    instructionPrefixes =
-        [
-          "i32",
-          "i64",
-          "f32",
-          "f64",
-          "local.get",
-          "local.set",
-          "local.tee",
-          "global.get",
-          "global.set",
-          "memory.size",
-          "memory.grow"]
diff --git a/src/main/haskell/Hydra/Wasm/Serde.hs b/src/main/haskell/Hydra/Wasm/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Wasm/Serde.hs
+++ /dev/null
@@ -1,557 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | WebAssembly serializer: converts WAT AST to concrete WAT text format
-
-module Hydra.Wasm.Serde where
-
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Wasm.Syntax as Syntax
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Serialize a block or loop instruction to WAT
-blockInstructionToExpr :: String -> Syntax.BlockInstruction -> Ast.Expr
-blockInstructionToExpr keyword b =
-
-      let label = Syntax.blockInstructionLabel b
-          bt = Syntax.blockInstructionBlockType b
-          body = Syntax.blockInstructionBody b
-          labelStr = Maybes.maybe "" (\l -> Strings.cat2 " $" l) label
-          btPart = blockTypeToExpr bt
-          bodyParts = Lists.map instructionToExpr body
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    Just (Serialization.cst (Strings.cat [
-                      "(",
-                      keyword,
-                      labelStr])),
-                    btPart])
-      in (Serialization.newlineSep (Lists.concat [
-        [
-          header],
-        (Lists.map (\p -> Serialization.cst (Strings.cat2 "  " (Serialization.printExpr p))) bodyParts),
-        [
-          Serialization.cst ")"]]))
-
--- | Serialize a block type to WAT
-blockTypeToExpr :: Syntax.BlockType -> Maybe Ast.Expr
-blockTypeToExpr bt =
-    case bt of
-      Syntax.BlockTypeEmpty -> Nothing
-      Syntax.BlockTypeValue v0 -> Just (Serialization.cst (Strings.cat [
-        "(result ",
-        (valTypeToStr v0),
-        ")"]))
-      Syntax.BlockTypeTypeUse v0 -> Just (typeUseToExpr v0)
-
--- | Serialize a constant value instruction to WAT
-constValueToExpr :: Syntax.ConstValue -> Ast.Expr
-constValueToExpr c =
-    case c of
-      Syntax.ConstValueI32 v0 -> Serialization.cst (Strings.cat2 "i32.const " (Literals.showInt32 v0))
-      Syntax.ConstValueI64 v0 -> Serialization.cst (Strings.cat2 "i64.const " (Literals.showInt64 v0))
-      Syntax.ConstValueF32 v0 -> Serialization.cst (Strings.cat2 "f32.const " (Literals.showFloat32 v0))
-      Syntax.ConstValueF64 v0 -> Serialization.cst (Strings.cat2 "f64.const " (Literals.showFloat64 v0))
-
--- | Serialize a data segment to WAT
-dataSegmentToExpr :: Syntax.DataSegment -> Ast.Expr
-dataSegmentToExpr d =
-
-      let name = Syntax.dataSegmentName d
-          mode = Syntax.dataSegmentMode d
-          bytes = Syntax.dataSegmentBytes d
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in case mode of
-        Syntax.DataModeActive v0 -> Serialization.spaceSep [
-          Serialization.cst (Strings.cat2 "(data" nameStr),
-          (Serialization.spaceSep [
-            Serialization.cst "(offset",
-            (Serialization.spaceSep (Lists.map instructionToExpr v0)),
-            (Serialization.cst ")")]),
-          (Serialization.cst (Strings.cat [
-            "\"",
-            bytes,
-            "\")"]))]
-        Syntax.DataModePassive -> Serialization.spaceSep [
-          Serialization.cst (Strings.cat2 "(data" nameStr),
-          (Serialization.cst (Strings.cat [
-            "\"",
-            bytes,
-            "\")"]))]
-
--- | Serialize an export declaration to WAT
-exportDefToExpr :: Syntax.ExportDef -> Ast.Expr
-exportDefToExpr e =
-
-      let name = Syntax.exportDefName e
-          desc = Syntax.exportDefDesc e
-      in (Serialization.spaceSep [
-        Serialization.cst "(export",
-        (Serialization.cst (Strings.cat [
-          "\"",
-          name,
-          "\""])),
-        (exportDescToExpr desc),
-        (Serialization.cst ")")])
-
--- | Serialize an export descriptor to WAT
-exportDescToExpr :: Syntax.ExportDesc -> Ast.Expr
-exportDescToExpr desc =
-    case desc of
-      Syntax.ExportDescFunc v0 -> Serialization.cst (Strings.cat [
-        "(func $",
-        v0,
-        ")"])
-      Syntax.ExportDescMemory v0 -> Serialization.cst (Strings.cat [
-        "(memory $",
-        v0,
-        ")"])
-      Syntax.ExportDescTable v0 -> Serialization.cst (Strings.cat [
-        "(table $",
-        v0,
-        ")"])
-      Syntax.ExportDescGlobal v0 -> Serialization.cst (Strings.cat [
-        "(global $",
-        v0,
-        ")"])
-
--- | Serialize a local variable declaration to WAT
-funcLocalToExpr :: Syntax.FuncLocal -> Ast.Expr
-funcLocalToExpr l =
-
-      let name = Syntax.funcLocalName l
-          typ = Syntax.funcLocalType l
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in (Serialization.cst (Strings.cat [
-        "(local",
-        nameStr,
-        " ",
-        (valTypeToStr typ),
-        ")"]))
-
--- | Serialize a function definition to WAT
-funcToExpr :: Syntax.Func -> Ast.Expr
-funcToExpr f =
-
-      let name = Syntax.funcName f
-          typeUse = Syntax.funcTypeUse f
-          locals = Syntax.funcLocals f
-          body = Syntax.funcBody f
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-          headerStr = Strings.cat2 "(func" nameStr
-          typeUsePart = typeUseToExpr typeUse
-          localParts = Lists.map funcLocalToExpr locals
-          bodyParts = Lists.map instructionToExpr body
-          innerParts = Lists.concat2 localParts bodyParts
-      in (Logic.ifElse (Lists.null innerParts) (Serialization.spaceSep [
-        Serialization.cst headerStr,
-        typeUsePart,
-        (Serialization.cst ")")]) (Serialization.newlineSep (Lists.concat [
-        [
-          Serialization.spaceSep [
-            Serialization.cst headerStr,
-            typeUsePart]],
-        (Lists.map (\p -> Serialization.cst (Strings.cat2 "  " (Serialization.printExpr p))) innerParts),
-        [
-          Serialization.cst ")"]])))
-
--- | Serialize a function type to WAT
-funcTypeToExpr :: Syntax.FuncType -> Ast.Expr
-funcTypeToExpr ft =
-
-      let params = Syntax.funcTypeParams ft
-          results = Syntax.funcTypeResults ft
-          paramParts =
-                  Lists.map (\p -> Serialization.cst (Strings.cat [
-                    "(param ",
-                    (valTypeToStr p),
-                    ")"])) params
-          resultParts =
-                  Lists.map (\r -> Serialization.cst (Strings.cat [
-                    "(result ",
-                    (valTypeToStr r),
-                    ")"])) results
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst "(func"),
-        (Logic.ifElse (Lists.null paramParts) Nothing (Just (Serialization.spaceSep paramParts))),
-        (Logic.ifElse (Lists.null resultParts) Nothing (Just (Serialization.spaceSep resultParts))),
-        (Just (Serialization.cst ")"))]))
-
--- | Serialize a global definition to WAT
-globalDefToExpr :: Syntax.GlobalDef -> Ast.Expr
-globalDefToExpr g =
-
-      let name = Syntax.globalDefName g
-          gt = Syntax.globalDefType g
-          init = Syntax.globalDefInit g
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 "(global" nameStr),
-        (globalTypeToExpr gt),
-        (Serialization.spaceSep (Lists.map instructionToExpr init)),
-        (Serialization.cst ")")])
-
--- | Serialize a global type to WAT
-globalTypeToExpr :: Syntax.GlobalType -> Ast.Expr
-globalTypeToExpr gt =
-
-      let vt = Syntax.globalTypeValType gt
-          mut = Syntax.globalTypeMutable gt
-      in (Logic.ifElse mut (Serialization.cst (Strings.cat [
-        "(mut ",
-        (valTypeToStr vt),
-        ")"])) (Serialization.cst (valTypeToStr vt)))
-
--- | Serialize an if instruction to WAT
-ifInstructionToExpr :: Syntax.IfInstruction -> Ast.Expr
-ifInstructionToExpr i =
-
-      let label = Syntax.ifInstructionLabel i
-          bt = Syntax.ifInstructionBlockType i
-          thenBranch = Syntax.ifInstructionThen i
-          elseBranch = Syntax.ifInstructionElse i
-          labelStr = Maybes.maybe "" (\l -> Strings.cat2 " $" l) label
-          btPart = blockTypeToExpr bt
-          thenParts = Lists.map instructionToExpr thenBranch
-          elseParts = Lists.map instructionToExpr elseBranch
-          header =
-                  Serialization.spaceSep (Maybes.cat [
-                    Just (Serialization.cst (Strings.cat [
-                      "(if",
-                      labelStr])),
-                    btPart])
-          thenBlock =
-                  Serialization.newlineSep (Lists.concat [
-                    [
-                      Serialization.cst "(then"],
-                    (Lists.map (\p -> Serialization.cst (Strings.cat2 "  " (Serialization.printExpr p))) thenParts),
-                    [
-                      Serialization.cst ")"]])
-          elseBlock =
-                  Serialization.newlineSep (Lists.concat [
-                    [
-                      Serialization.cst "(else"],
-                    (Lists.map (\p -> Serialization.cst (Strings.cat2 "  " (Serialization.printExpr p))) elseParts),
-                    [
-                      Serialization.cst ")"]])
-      in (Logic.ifElse (Lists.null elseParts) (Serialization.newlineSep [
-        header,
-        thenBlock,
-        (Serialization.cst ")")]) (Serialization.newlineSep [
-        header,
-        thenBlock,
-        elseBlock,
-        (Serialization.cst ")")]))
-
--- | Serialize an import declaration to WAT
-importDefToExpr :: Syntax.ImportDef -> Ast.Expr
-importDefToExpr i =
-
-      let modName = Syntax.importDefModule i
-          name = Syntax.importDefName i
-          desc = Syntax.importDefDesc i
-      in (Serialization.spaceSep [
-        Serialization.cst "(import",
-        (Serialization.cst (Strings.cat [
-          "\"",
-          modName,
-          "\""])),
-        (Serialization.cst (Strings.cat [
-          "\"",
-          name,
-          "\""])),
-        (importDescToExpr desc),
-        (Serialization.cst ")")])
-
--- | Serialize an import descriptor to WAT
-importDescToExpr :: Syntax.ImportDesc -> Ast.Expr
-importDescToExpr desc =
-    case desc of
-      Syntax.ImportDescFunc v0 ->
-        let name = Syntax.importFuncName v0
-            tu = Syntax.importFuncTypeUse v0
-            nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-        in (Serialization.spaceSep [
-          Serialization.cst (Strings.cat2 "(func" nameStr),
-          (typeUseToExpr tu),
-          (Serialization.cst ")")])
-      Syntax.ImportDescMemory v0 ->
-        let name = Syntax.importMemoryName v0
-            lim = Syntax.importMemoryLimits v0
-            nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-        in (Serialization.spaceSep [
-          Serialization.cst (Strings.cat2 "(memory" nameStr),
-          (limitsToExpr lim),
-          (Serialization.cst ")")])
-      Syntax.ImportDescTable v0 ->
-        let name = Syntax.importTableName v0
-            rt = Syntax.importTableRefType v0
-            lim = Syntax.importTableLimits v0
-            nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-        in (Serialization.spaceSep [
-          Serialization.cst (Strings.cat2 "(table" nameStr),
-          (limitsToExpr lim),
-          (Serialization.cst (refTypeToStr rt)),
-          (Serialization.cst ")")])
-      Syntax.ImportDescGlobal v0 ->
-        let name = Syntax.importGlobalName v0
-            gt = Syntax.importGlobalType v0
-            nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-        in (Serialization.spaceSep [
-          Serialization.cst (Strings.cat2 "(global" nameStr),
-          (globalTypeToExpr gt),
-          (Serialization.cst ")")])
-
--- | Serialize an instruction to WAT
-instructionToExpr :: Syntax.Instruction -> Ast.Expr
-instructionToExpr instr =
-    case instr of
-      Syntax.InstructionConst v0 -> constValueToExpr v0
-      Syntax.InstructionLocalGet v0 -> Serialization.cst (Strings.cat [
-        "local.get $",
-        v0])
-      Syntax.InstructionLocalSet v0 -> Serialization.cst (Strings.cat [
-        "local.set $",
-        v0])
-      Syntax.InstructionLocalTee v0 -> Serialization.cst (Strings.cat [
-        "local.tee $",
-        v0])
-      Syntax.InstructionGlobalGet v0 -> Serialization.cst (Strings.cat [
-        "global.get $",
-        v0])
-      Syntax.InstructionGlobalSet v0 -> Serialization.cst (Strings.cat [
-        "global.set $",
-        v0])
-      Syntax.InstructionLoad v0 ->
-        let vt = Syntax.memoryInstructionType v0
-            ma = Syntax.memoryInstructionMemArg v0
-            off = Syntax.memArgOffset ma
-            offStr = Logic.ifElse (Equality.equal off 0) "" (Strings.cat2 " offset=" (Literals.showInt32 off))
-        in (Serialization.cst (Strings.cat [
-          valTypeToStr vt,
-          ".load",
-          offStr]))
-      Syntax.InstructionStore v0 ->
-        let vt = Syntax.memoryInstructionType v0
-            ma = Syntax.memoryInstructionMemArg v0
-            off = Syntax.memArgOffset ma
-            offStr = Logic.ifElse (Equality.equal off 0) "" (Strings.cat2 " offset=" (Literals.showInt32 off))
-        in (Serialization.cst (Strings.cat [
-          valTypeToStr vt,
-          ".store",
-          offStr]))
-      Syntax.InstructionUnop v0 ->
-        let vt = Syntax.numericOpType v0
-            nm = Syntax.numericOpName v0
-        in (Serialization.cst (Strings.cat [
-          valTypeToStr vt,
-          ".",
-          nm]))
-      Syntax.InstructionBinop v0 ->
-        let vt = Syntax.numericOpType v0
-            nm = Syntax.numericOpName v0
-        in (Serialization.cst (Strings.cat [
-          valTypeToStr vt,
-          ".",
-          nm]))
-      Syntax.InstructionTestop v0 ->
-        let vt = Syntax.numericOpType v0
-            nm = Syntax.numericOpName v0
-        in (Serialization.cst (Strings.cat [
-          valTypeToStr vt,
-          ".",
-          nm]))
-      Syntax.InstructionRelop v0 ->
-        let vt = Syntax.numericOpType v0
-            nm = Syntax.numericOpName v0
-        in (Serialization.cst (Strings.cat [
-          valTypeToStr vt,
-          ".",
-          nm]))
-      Syntax.InstructionConvert v0 -> Serialization.cst v0
-      Syntax.InstructionCall v0 -> Serialization.cst (Strings.cat [
-        "call $",
-        v0])
-      Syntax.InstructionCallIndirect v0 -> Serialization.spaceSep [
-        Serialization.cst "call_indirect",
-        (typeUseToExpr v0)]
-      Syntax.InstructionBlock v0 -> blockInstructionToExpr "block" v0
-      Syntax.InstructionLoop v0 -> blockInstructionToExpr "loop" v0
-      Syntax.InstructionIf v0 -> ifInstructionToExpr v0
-      Syntax.InstructionBr v0 -> Serialization.cst (Strings.cat [
-        "br $",
-        v0])
-      Syntax.InstructionBrIf v0 -> Serialization.cst (Strings.cat [
-        "br_if $",
-        v0])
-      Syntax.InstructionBrTable v0 ->
-        let labels = Syntax.brTableArgsLabels v0
-            def = Syntax.brTableArgsDefault v0
-        in (Serialization.cst (Strings.cat [
-          "br_table ",
-          (Strings.intercalate " " (Lists.map (\l -> Strings.cat2 "$" l) labels)),
-          " $",
-          def]))
-      Syntax.InstructionReturn -> Serialization.cst "return"
-      Syntax.InstructionDrop -> Serialization.cst "drop"
-      Syntax.InstructionSelect -> Serialization.cst "select"
-      Syntax.InstructionUnreachable -> Serialization.cst "unreachable"
-      Syntax.InstructionNop -> Serialization.cst "nop"
-      Syntax.InstructionMemorySize -> Serialization.cst "memory.size"
-      Syntax.InstructionMemoryGrow -> Serialization.cst "memory.grow"
-      Syntax.InstructionRefNull v0 -> Serialization.cst (Strings.cat [
-        "ref.null ",
-        (refTypeToStr v0)])
-      Syntax.InstructionRefIsNull -> Serialization.cst "ref.is_null"
-      Syntax.InstructionRaw v0 -> Serialization.cst v0
-
--- | Serialize limits to WAT
-limitsToExpr :: Syntax.Limits -> Ast.Expr
-limitsToExpr l =
-
-      let mn = Syntax.limitsMin l
-          mx = Syntax.limitsMax l
-      in (Serialization.spaceSep (Maybes.cat [
-        Just (Serialization.cst (Literals.showInt32 mn)),
-        (Maybes.map (\m -> Serialization.cst (Literals.showInt32 m)) mx)]))
-
--- | Serialize a memory definition to WAT
-memoryDefToExpr :: Syntax.MemoryDef -> Ast.Expr
-memoryDefToExpr m =
-
-      let name = Syntax.memoryDefName m
-          lim = Syntax.memoryDefLimits m
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 "(memory" nameStr),
-        (limitsToExpr lim),
-        (Serialization.cst ")")])
-
--- | Serialize a module field to a WAT expression
-moduleFieldToExpr :: Syntax.ModuleField -> Ast.Expr
-moduleFieldToExpr field =
-    case field of
-      Syntax.ModuleFieldType v0 -> typeDefToExpr v0
-      Syntax.ModuleFieldFunc v0 -> funcToExpr v0
-      Syntax.ModuleFieldMemory v0 -> memoryDefToExpr v0
-      Syntax.ModuleFieldTable v0 -> tableDefToExpr v0
-      Syntax.ModuleFieldGlobal v0 -> globalDefToExpr v0
-      Syntax.ModuleFieldImport v0 -> importDefToExpr v0
-      Syntax.ModuleFieldExport v0 -> exportDefToExpr v0
-      Syntax.ModuleFieldData v0 -> dataSegmentToExpr v0
-      Syntax.ModuleFieldElem _ -> Serialization.cst ";; elem segment (not yet supported)"
-      Syntax.ModuleFieldStart v0 -> Serialization.cst (Strings.cat [
-        "(start $",
-        v0,
-        ")"])
-
--- | Serialize a WebAssembly module to a WAT expression
-moduleToExpr :: Syntax.Module -> Ast.Expr
-moduleToExpr mod =
-
-      let name = Syntax.moduleName mod
-          fields = Syntax.moduleFields mod
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-          fieldExprs = Lists.map moduleFieldToExpr fields
-      in (Serialization.newlineSep (Lists.concat [
-        [
-          Serialization.cst (Strings.cat2 "(module" nameStr)],
-        (Lists.map (\fe -> Serialization.cst (Strings.cat2 "  " (Serialization.printExpr fe))) fieldExprs),
-        [
-          Serialization.cst ")"]]))
-
--- | Serialize a function parameter to WAT
-paramToExpr :: Syntax.Param -> Ast.Expr
-paramToExpr p =
-
-      let name = Syntax.paramName p
-          typ = Syntax.paramType p
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in (Serialization.cst (Strings.cat [
-        "(param",
-        nameStr,
-        " ",
-        (valTypeToStr typ),
-        ")"]))
-
--- | Convert a reference type to its WAT string
-refTypeToStr :: Syntax.RefType -> String
-refTypeToStr rt =
-    case rt of
-      Syntax.RefTypeFuncref -> "funcref"
-      Syntax.RefTypeExternref -> "externref"
-
--- | Serialize a table definition to WAT
-tableDefToExpr :: Syntax.TableDef -> Ast.Expr
-tableDefToExpr t =
-
-      let name = Syntax.tableDefName t
-          rt = Syntax.tableDefRefType t
-          lim = Syntax.tableDefLimits t
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 "(table" nameStr),
-        (limitsToExpr lim),
-        (Serialization.cst (refTypeToStr rt)),
-        (Serialization.cst ")")])
-
--- | Convert a string to a WAT comment
-toWatComment :: String -> String
-toWatComment s =
-    Strings.cat [
-      ";; ",
-      s]
-
--- | Serialize a type definition to WAT
-typeDefToExpr :: Syntax.TypeDef -> Ast.Expr
-typeDefToExpr td =
-
-      let name = Syntax.typeDefName td
-          ft = Syntax.typeDefType td
-          nameStr = Maybes.maybe "" (\n -> Strings.cat2 " $" n) name
-      in (Serialization.spaceSep [
-        Serialization.cst (Strings.cat2 "(type" nameStr),
-        (funcTypeToExpr ft),
-        (Serialization.cst ")")])
-
--- | Serialize a type use clause to WAT
-typeUseToExpr :: Syntax.TypeUse -> Ast.Expr
-typeUseToExpr tu =
-
-      let idx = Syntax.typeUseIndex tu
-          params = Syntax.typeUseParams tu
-          results = Syntax.typeUseResults tu
-          idxPart =
-                  Maybes.map (\i -> Serialization.cst (Strings.cat [
-                    "(type $",
-                    i,
-                    ")"])) idx
-          paramParts = Lists.map paramToExpr params
-          resultParts =
-                  Lists.map (\r -> Serialization.cst (Strings.cat [
-                    "(result ",
-                    (valTypeToStr r),
-                    ")"])) results
-      in (Serialization.spaceSep (Maybes.cat (Lists.concat [
-        [
-          idxPart],
-        (Lists.map (\p -> Just p) paramParts),
-        (Lists.map (\r -> Just r) resultParts)])))
-
--- | Convert a value type to its WAT string representation
-valTypeToStr :: Syntax.ValType -> String
-valTypeToStr vt =
-    case vt of
-      Syntax.ValTypeI32 -> "i32"
-      Syntax.ValTypeI64 -> "i64"
-      Syntax.ValTypeF32 -> "f32"
-      Syntax.ValTypeF64 -> "f64"
-      Syntax.ValTypeFuncref -> "funcref"
-      Syntax.ValTypeExternref -> "externref"
diff --git a/src/main/haskell/Hydra/Wasm/Syntax.hs b/src/main/haskell/Hydra/Wasm/Syntax.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Wasm/Syntax.hs
+++ /dev/null
@@ -1,817 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A WebAssembly text format (WAT) syntax model, based on the WebAssembly spec (https://webassembly.github.io/spec/core/), retrieved 2026-04-06
-
-module Hydra.Wasm.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
-
--- | A WebAssembly module, the top-level container
-data Module =
-  Module {
-    -- | Optional module name
-    moduleName :: (Maybe String),
-    -- | The module's fields (types, functions, memories, tables, globals, imports, exports, etc.)
-    moduleFields :: [ModuleField]}
-  deriving (Eq, Ord, Read, Show)
-
-_Module = Core.Name "hydra.wasm.syntax.Module"
-
-_Module_name = Core.Name "name"
-
-_Module_fields = Core.Name "fields"
-
--- | A field within a WebAssembly module
-data ModuleField =
-  -- | A type definition
-  ModuleFieldType TypeDef |
-  -- | A function definition
-  ModuleFieldFunc Func |
-  -- | A memory definition
-  ModuleFieldMemory MemoryDef |
-  -- | A table definition
-  ModuleFieldTable TableDef |
-  -- | A global variable definition
-  ModuleFieldGlobal GlobalDef |
-  -- | An import declaration
-  ModuleFieldImport ImportDef |
-  -- | An export declaration
-  ModuleFieldExport ExportDef |
-  -- | A data segment
-  ModuleFieldData DataSegment |
-  -- | An element segment
-  ModuleFieldElem ElemSegment |
-  -- | A start function index
-  ModuleFieldStart String
-  deriving (Eq, Ord, Read, Show)
-
-_ModuleField = Core.Name "hydra.wasm.syntax.ModuleField"
-
-_ModuleField_type = Core.Name "type"
-
-_ModuleField_func = Core.Name "func"
-
-_ModuleField_memory = Core.Name "memory"
-
-_ModuleField_table = Core.Name "table"
-
-_ModuleField_global = Core.Name "global"
-
-_ModuleField_import = Core.Name "import"
-
-_ModuleField_export = Core.Name "export"
-
-_ModuleField_data = Core.Name "data"
-
-_ModuleField_elem = Core.Name "elem"
-
-_ModuleField_start = Core.Name "start"
-
--- | A WebAssembly value type
-data ValType =
-  -- | 32-bit integer
-  ValTypeI32  |
-  -- | 64-bit integer
-  ValTypeI64  |
-  -- | 32-bit float
-  ValTypeF32  |
-  -- | 64-bit float
-  ValTypeF64  |
-  -- | Function reference
-  ValTypeFuncref  |
-  -- | External reference
-  ValTypeExternref
-  deriving (Eq, Ord, Read, Show)
-
-_ValType = Core.Name "hydra.wasm.syntax.ValType"
-
-_ValType_i32 = Core.Name "i32"
-
-_ValType_i64 = Core.Name "i64"
-
-_ValType_f32 = Core.Name "f32"
-
-_ValType_f64 = Core.Name "f64"
-
-_ValType_funcref = Core.Name "funcref"
-
-_ValType_externref = Core.Name "externref"
-
--- | A function type signature
-data FuncType =
-  FuncType {
-    -- | Parameter types
-    funcTypeParams :: [ValType],
-    -- | Result types
-    funcTypeResults :: [ValType]}
-  deriving (Eq, Ord, Read, Show)
-
-_FuncType = Core.Name "hydra.wasm.syntax.FuncType"
-
-_FuncType_params = Core.Name "params"
-
-_FuncType_results = Core.Name "results"
-
--- | A reference to a function type, either by index or inline
-data FuncTypeRef =
-  -- | Reference by type index
-  FuncTypeRefIndex String |
-  -- | Inline function type
-  FuncTypeRefInline FuncType
-  deriving (Eq, Ord, Read, Show)
-
-_FuncTypeRef = Core.Name "hydra.wasm.syntax.FuncTypeRef"
-
-_FuncTypeRef_index = Core.Name "index"
-
-_FuncTypeRef_inline = Core.Name "inline"
-
--- | A type use clause, referencing a type definition
-data TypeUse =
-  TypeUse {
-    -- | Optional type index reference
-    typeUseIndex :: (Maybe String),
-    -- | Explicit parameter declarations (may augment or override type index)
-    typeUseParams :: [Param],
-    -- | Explicit result types
-    typeUseResults :: [ValType]}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeUse = Core.Name "hydra.wasm.syntax.TypeUse"
-
-_TypeUse_index = Core.Name "index"
-
-_TypeUse_params = Core.Name "params"
-
-_TypeUse_results = Core.Name "results"
-
--- | A named type definition in the type section
-data TypeDef =
-  TypeDef {
-    -- | Optional type name
-    typeDefName :: (Maybe String),
-    -- | The function type
-    typeDefType :: FuncType}
-  deriving (Eq, Ord, Read, Show)
-
-_TypeDef = Core.Name "hydra.wasm.syntax.TypeDef"
-
-_TypeDef_name = Core.Name "name"
-
-_TypeDef_type = Core.Name "type"
-
--- | A function definition
-data Func =
-  Func {
-    -- | Optional function name
-    funcName :: (Maybe String),
-    -- | The function's type signature
-    funcTypeUse :: TypeUse,
-    -- | Local variable declarations
-    funcLocals :: [FuncLocal],
-    -- | The function body (a sequence of instructions)
-    funcBody :: [Instruction]}
-  deriving (Eq, Ord, Read, Show)
-
-_Func = Core.Name "hydra.wasm.syntax.Func"
-
-_Func_name = Core.Name "name"
-
-_Func_typeUse = Core.Name "typeUse"
-
-_Func_locals = Core.Name "locals"
-
-_Func_body = Core.Name "body"
-
--- | A local variable declaration within a function
-data FuncLocal =
-  FuncLocal {
-    -- | Optional local name
-    funcLocalName :: (Maybe String),
-    -- | The local's value type
-    funcLocalType :: ValType}
-  deriving (Eq, Ord, Read, Show)
-
-_FuncLocal = Core.Name "hydra.wasm.syntax.FuncLocal"
-
-_FuncLocal_name = Core.Name "name"
-
-_FuncLocal_type = Core.Name "type"
-
--- | A function parameter declaration
-data Param =
-  Param {
-    -- | Optional parameter name
-    paramName :: (Maybe String),
-    -- | The parameter's value type
-    paramType :: ValType}
-  deriving (Eq, Ord, Read, Show)
-
-_Param = Core.Name "hydra.wasm.syntax.Param"
-
-_Param_name = Core.Name "name"
-
-_Param_type = Core.Name "type"
-
--- | Arguments for a branch table instruction
-data BrTableArgs =
-  BrTableArgs {
-    -- | Branch target labels
-    brTableArgsLabels :: [String],
-    -- | Default branch target
-    brTableArgsDefault :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_BrTableArgs = Core.Name "hydra.wasm.syntax.BrTableArgs"
-
-_BrTableArgs_labels = Core.Name "labels"
-
-_BrTableArgs_default = Core.Name "default"
-
--- | A WebAssembly instruction
-data Instruction =
-  -- | Push a constant value
-  InstructionConst ConstValue |
-  -- | Get local variable by name or index
-  InstructionLocalGet String |
-  -- | Set local variable by name or index
-  InstructionLocalSet String |
-  -- | Set local variable and keep value on stack
-  InstructionLocalTee String |
-  -- | Get global variable by name or index
-  InstructionGlobalGet String |
-  -- | Set global variable by name or index
-  InstructionGlobalSet String |
-  -- | Load from memory (e.g., i32.load, f64.load)
-  InstructionLoad MemoryInstruction |
-  -- | Store to memory (e.g., i32.store, f64.store)
-  InstructionStore MemoryInstruction |
-  -- | Unary numeric operation (e.g., i32.clz, f64.neg)
-  InstructionUnop NumericOp |
-  -- | Binary numeric operation (e.g., i32.add, f64.mul)
-  InstructionBinop NumericOp |
-  -- | Test operation (e.g., i32.eqz)
-  InstructionTestop NumericOp |
-  -- | Comparison operation (e.g., i32.eq, f64.lt)
-  InstructionRelop NumericOp |
-  -- | Type conversion (e.g., i32.wrap_i64, f64.convert_i32_s)
-  InstructionConvert String |
-  -- | Call a function by name or index
-  InstructionCall String |
-  -- | Indirect function call through a table
-  InstructionCallIndirect TypeUse |
-  -- | A block instruction
-  InstructionBlock BlockInstruction |
-  -- | A loop instruction
-  InstructionLoop BlockInstruction |
-  -- | An if-then-else instruction
-  InstructionIf IfInstruction |
-  -- | Branch to a label
-  InstructionBr String |
-  -- | Conditional branch to a label
-  InstructionBrIf String |
-  -- | Branch table
-  InstructionBrTable BrTableArgs |
-  -- | Return from the current function
-  InstructionReturn  |
-  -- | Drop the top value from the stack
-  InstructionDrop  |
-  -- | Select one of two values based on a condition
-  InstructionSelect  |
-  -- | Trap immediately
-  InstructionUnreachable  |
-  -- | No operation
-  InstructionNop  |
-  -- | Get current memory size in pages
-  InstructionMemorySize  |
-  -- | Grow memory by a number of pages
-  InstructionMemoryGrow  |
-  -- | Null reference of the given type
-  InstructionRefNull RefType |
-  -- | Test if a reference is null
-  InstructionRefIsNull  |
-  -- | A raw WAT instruction string (escape hatch)
-  InstructionRaw String
-  deriving (Eq, Ord, Read, Show)
-
-_Instruction = Core.Name "hydra.wasm.syntax.Instruction"
-
-_Instruction_const = Core.Name "const"
-
-_Instruction_localGet = Core.Name "localGet"
-
-_Instruction_localSet = Core.Name "localSet"
-
-_Instruction_localTee = Core.Name "localTee"
-
-_Instruction_globalGet = Core.Name "globalGet"
-
-_Instruction_globalSet = Core.Name "globalSet"
-
-_Instruction_load = Core.Name "load"
-
-_Instruction_store = Core.Name "store"
-
-_Instruction_unop = Core.Name "unop"
-
-_Instruction_binop = Core.Name "binop"
-
-_Instruction_testop = Core.Name "testop"
-
-_Instruction_relop = Core.Name "relop"
-
-_Instruction_convert = Core.Name "convert"
-
-_Instruction_call = Core.Name "call"
-
-_Instruction_callIndirect = Core.Name "callIndirect"
-
-_Instruction_block = Core.Name "block"
-
-_Instruction_loop = Core.Name "loop"
-
-_Instruction_if = Core.Name "if"
-
-_Instruction_br = Core.Name "br"
-
-_Instruction_brIf = Core.Name "brIf"
-
-_Instruction_brTable = Core.Name "brTable"
-
-_Instruction_return = Core.Name "return"
-
-_Instruction_drop = Core.Name "drop"
-
-_Instruction_select = Core.Name "select"
-
-_Instruction_unreachable = Core.Name "unreachable"
-
-_Instruction_nop = Core.Name "nop"
-
-_Instruction_memorySize = Core.Name "memorySize"
-
-_Instruction_memoryGrow = Core.Name "memoryGrow"
-
-_Instruction_refNull = Core.Name "refNull"
-
-_Instruction_refIsNull = Core.Name "refIsNull"
-
-_Instruction_raw = Core.Name "raw"
-
--- | A block or loop instruction with a label and body
-data BlockInstruction =
-  BlockInstruction {
-    -- | Optional block label
-    blockInstructionLabel :: (Maybe String),
-    -- | The block's result type
-    blockInstructionBlockType :: BlockType,
-    -- | The instructions in the block
-    blockInstructionBody :: [Instruction]}
-  deriving (Eq, Ord, Read, Show)
-
-_BlockInstruction = Core.Name "hydra.wasm.syntax.BlockInstruction"
-
-_BlockInstruction_label = Core.Name "label"
-
-_BlockInstruction_blockType = Core.Name "blockType"
-
-_BlockInstruction_body = Core.Name "body"
-
--- | The type of a block, loop, or if instruction
-data BlockType =
-  -- | No result
-  BlockTypeEmpty  |
-  -- | Single result value type
-  BlockTypeValue ValType |
-  -- | Full function type signature
-  BlockTypeTypeUse TypeUse
-  deriving (Eq, Ord, Read, Show)
-
-_BlockType = Core.Name "hydra.wasm.syntax.BlockType"
-
-_BlockType_empty = Core.Name "empty"
-
-_BlockType_value = Core.Name "value"
-
-_BlockType_typeUse = Core.Name "typeUse"
-
--- | Memory access arguments
-data MemArg =
-  MemArg {
-    -- | Memory offset in bytes
-    memArgOffset :: Int,
-    -- | Alignment hint (power of 2)
-    memArgAlign :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_MemArg = Core.Name "hydra.wasm.syntax.MemArg"
-
-_MemArg_offset = Core.Name "offset"
-
-_MemArg_align = Core.Name "align"
-
--- | A memory load or store instruction
-data MemoryInstruction =
-  MemoryInstruction {
-    -- | Value type to load or store
-    memoryInstructionType :: ValType,
-    -- | Memory argument (offset and alignment)
-    memoryInstructionMemArg :: MemArg}
-  deriving (Eq, Ord, Read, Show)
-
-_MemoryInstruction = Core.Name "hydra.wasm.syntax.MemoryInstruction"
-
-_MemoryInstruction_type = Core.Name "type"
-
-_MemoryInstruction_memArg = Core.Name "memArg"
-
--- | An if-then-else instruction
-data IfInstruction =
-  IfInstruction {
-    -- | Optional label for the if block
-    ifInstructionLabel :: (Maybe String),
-    -- | The result type of the if
-    ifInstructionBlockType :: BlockType,
-    -- | The 'then' branch instructions
-    ifInstructionThen :: [Instruction],
-    -- | The 'else' branch instructions (may be empty)
-    ifInstructionElse :: [Instruction]}
-  deriving (Eq, Ord, Read, Show)
-
-_IfInstruction = Core.Name "hydra.wasm.syntax.IfInstruction"
-
-_IfInstruction_label = Core.Name "label"
-
-_IfInstruction_blockType = Core.Name "blockType"
-
-_IfInstruction_then = Core.Name "then"
-
-_IfInstruction_else = Core.Name "else"
-
--- | A typed numeric operation (used for unop, binop, testop, relop)
-data NumericOp =
-  NumericOp {
-    -- | Operand value type
-    numericOpType :: ValType,
-    -- | Operation name (e.g., add, sub, mul, eqz, lt_s)
-    numericOpName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_NumericOp = Core.Name "hydra.wasm.syntax.NumericOp"
-
-_NumericOp_type = Core.Name "type"
-
-_NumericOp_name = Core.Name "name"
-
--- | A memory definition
-data MemoryDef =
-  MemoryDef {
-    -- | Optional memory name
-    memoryDefName :: (Maybe String),
-    -- | Memory size limits (in pages of 64KB)
-    memoryDefLimits :: Limits}
-  deriving (Eq, Ord, Read, Show)
-
-_MemoryDef = Core.Name "hydra.wasm.syntax.MemoryDef"
-
-_MemoryDef_name = Core.Name "name"
-
-_MemoryDef_limits = Core.Name "limits"
-
--- | A data segment for initializing memory
-data DataSegment =
-  DataSegment {
-    -- | Optional data segment name
-    dataSegmentName :: (Maybe String),
-    -- | Whether this is an active or passive data segment
-    dataSegmentMode :: DataMode,
-    -- | The data bytes (as a string of escaped bytes)
-    dataSegmentBytes :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_DataSegment = Core.Name "hydra.wasm.syntax.DataSegment"
-
-_DataSegment_name = Core.Name "name"
-
-_DataSegment_mode = Core.Name "mode"
-
-_DataSegment_bytes = Core.Name "bytes"
-
--- | The mode of a data segment
-data DataMode =
-  -- | Active segment: loaded at the given offset expression
-  DataModeActive [Instruction] |
-  -- | Passive segment: must be explicitly loaded via memory.init
-  DataModePassive
-  deriving (Eq, Ord, Read, Show)
-
-_DataMode = Core.Name "hydra.wasm.syntax.DataMode"
-
-_DataMode_active = Core.Name "active"
-
-_DataMode_passive = Core.Name "passive"
-
--- | Size limits for memories and tables
-data Limits =
-  Limits {
-    -- | Minimum size
-    limitsMin :: Int,
-    -- | Optional maximum size
-    limitsMax :: (Maybe Int)}
-  deriving (Eq, Ord, Read, Show)
-
-_Limits = Core.Name "hydra.wasm.syntax.Limits"
-
-_Limits_min = Core.Name "min"
-
-_Limits_max = Core.Name "max"
-
--- | A global variable definition
-data GlobalDef =
-  GlobalDef {
-    -- | Optional global name
-    globalDefName :: (Maybe String),
-    -- | The global's type (value type and mutability)
-    globalDefType :: GlobalType,
-    -- | Initialization expression
-    globalDefInit :: [Instruction]}
-  deriving (Eq, Ord, Read, Show)
-
-_GlobalDef = Core.Name "hydra.wasm.syntax.GlobalDef"
-
-_GlobalDef_name = Core.Name "name"
-
-_GlobalDef_type = Core.Name "type"
-
-_GlobalDef_init = Core.Name "init"
-
--- | A global variable type
-data GlobalType =
-  GlobalType {
-    -- | The value type
-    globalTypeValType :: ValType,
-    -- | Whether the global is mutable
-    globalTypeMutable :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_GlobalType = Core.Name "hydra.wasm.syntax.GlobalType"
-
-_GlobalType_valType = Core.Name "valType"
-
-_GlobalType_mutable = Core.Name "mutable"
-
--- | A table definition
-data TableDef =
-  TableDef {
-    -- | Optional table name
-    tableDefName :: (Maybe String),
-    -- | The reference type of table elements
-    tableDefRefType :: RefType,
-    -- | Table size limits
-    tableDefLimits :: Limits}
-  deriving (Eq, Ord, Read, Show)
-
-_TableDef = Core.Name "hydra.wasm.syntax.TableDef"
-
-_TableDef_name = Core.Name "name"
-
-_TableDef_refType = Core.Name "refType"
-
-_TableDef_limits = Core.Name "limits"
-
--- | Active element segment parameters
-data ElemActive =
-  ElemActive {
-    -- | Table index
-    elemActiveTable :: String,
-    -- | Offset expression
-    elemActiveOffset :: [Instruction]}
-  deriving (Eq, Ord, Read, Show)
-
-_ElemActive = Core.Name "hydra.wasm.syntax.ElemActive"
-
-_ElemActive_table = Core.Name "table"
-
-_ElemActive_offset = Core.Name "offset"
-
--- | An element segment for initializing tables
-data ElemSegment =
-  ElemSegment {
-    -- | Optional element segment name
-    elemSegmentName :: (Maybe String),
-    -- | Whether this is an active or passive element segment
-    elemSegmentMode :: ElemMode,
-    -- | The reference type of elements
-    elemSegmentType :: RefType,
-    -- | Initialization expressions (one per element)
-    elemSegmentInit :: [[Instruction]]}
-  deriving (Eq, Ord, Read, Show)
-
-_ElemSegment = Core.Name "hydra.wasm.syntax.ElemSegment"
-
-_ElemSegment_name = Core.Name "name"
-
-_ElemSegment_mode = Core.Name "mode"
-
-_ElemSegment_type = Core.Name "type"
-
-_ElemSegment_init = Core.Name "init"
-
--- | The mode of an element segment
-data ElemMode =
-  -- | Active segment: loaded at the given table index and offset
-  ElemModeActive ElemActive |
-  -- | Passive segment: must be explicitly loaded via table.init
-  ElemModePassive  |
-  -- | Declarative segment: declares function references for ref.func
-  ElemModeDeclarative
-  deriving (Eq, Ord, Read, Show)
-
-_ElemMode = Core.Name "hydra.wasm.syntax.ElemMode"
-
-_ElemMode_active = Core.Name "active"
-
-_ElemMode_passive = Core.Name "passive"
-
-_ElemMode_declarative = Core.Name "declarative"
-
--- | A reference type for tables and reference instructions
-data RefType =
-  -- | Function reference
-  RefTypeFuncref  |
-  -- | External reference
-  RefTypeExternref
-  deriving (Eq, Ord, Read, Show)
-
-_RefType = Core.Name "hydra.wasm.syntax.RefType"
-
-_RefType_funcref = Core.Name "funcref"
-
-_RefType_externref = Core.Name "externref"
-
--- | An import declaration
-data ImportDef =
-  ImportDef {
-    -- | The module name to import from
-    importDefModule :: String,
-    -- | The name of the imported entity
-    importDefName :: String,
-    -- | The import descriptor (what kind of entity is imported)
-    importDefDesc :: ImportDesc}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportDef = Core.Name "hydra.wasm.syntax.ImportDef"
-
-_ImportDef_module = Core.Name "module"
-
-_ImportDef_name = Core.Name "name"
-
-_ImportDef_desc = Core.Name "desc"
-
--- | An import descriptor specifying the kind of imported entity
-data ImportDesc =
-  -- | Import a function with the given type
-  ImportDescFunc ImportFunc |
-  -- | Import a memory with the given limits
-  ImportDescMemory ImportMemory |
-  -- | Import a table
-  ImportDescTable ImportTable |
-  -- | Import a global variable
-  ImportDescGlobal ImportGlobal
-  deriving (Eq, Ord, Read, Show)
-
-_ImportDesc = Core.Name "hydra.wasm.syntax.ImportDesc"
-
-_ImportDesc_func = Core.Name "func"
-
-_ImportDesc_memory = Core.Name "memory"
-
-_ImportDesc_table = Core.Name "table"
-
-_ImportDesc_global = Core.Name "global"
-
--- | A function import descriptor
-data ImportFunc =
-  ImportFunc {
-    -- | Optional local name for the imported function
-    importFuncName :: (Maybe String),
-    -- | The function's type
-    importFuncTypeUse :: TypeUse}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportFunc = Core.Name "hydra.wasm.syntax.ImportFunc"
-
-_ImportFunc_name = Core.Name "name"
-
-_ImportFunc_typeUse = Core.Name "typeUse"
-
--- | A global import descriptor
-data ImportGlobal =
-  ImportGlobal {
-    -- | Optional local name
-    importGlobalName :: (Maybe String),
-    -- | Global type
-    importGlobalType :: GlobalType}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportGlobal = Core.Name "hydra.wasm.syntax.ImportGlobal"
-
-_ImportGlobal_name = Core.Name "name"
-
-_ImportGlobal_type = Core.Name "type"
-
--- | A memory import descriptor
-data ImportMemory =
-  ImportMemory {
-    -- | Optional local name
-    importMemoryName :: (Maybe String),
-    -- | Memory limits
-    importMemoryLimits :: Limits}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportMemory = Core.Name "hydra.wasm.syntax.ImportMemory"
-
-_ImportMemory_name = Core.Name "name"
-
-_ImportMemory_limits = Core.Name "limits"
-
--- | A table import descriptor
-data ImportTable =
-  ImportTable {
-    -- | Optional local name
-    importTableName :: (Maybe String),
-    -- | Reference type
-    importTableRefType :: RefType,
-    -- | Table limits
-    importTableLimits :: Limits}
-  deriving (Eq, Ord, Read, Show)
-
-_ImportTable = Core.Name "hydra.wasm.syntax.ImportTable"
-
-_ImportTable_name = Core.Name "name"
-
-_ImportTable_refType = Core.Name "refType"
-
-_ImportTable_limits = Core.Name "limits"
-
--- | An export declaration
-data ExportDef =
-  ExportDef {
-    -- | The exported name
-    exportDefName :: String,
-    -- | What is being exported
-    exportDefDesc :: ExportDesc}
-  deriving (Eq, Ord, Read, Show)
-
-_ExportDef = Core.Name "hydra.wasm.syntax.ExportDef"
-
-_ExportDef_name = Core.Name "name"
-
-_ExportDef_desc = Core.Name "desc"
-
--- | An export descriptor identifying what is being exported
-data ExportDesc =
-  -- | Export a function by name or index
-  ExportDescFunc String |
-  -- | Export a memory by name or index
-  ExportDescMemory String |
-  -- | Export a table by name or index
-  ExportDescTable String |
-  -- | Export a global by name or index
-  ExportDescGlobal String
-  deriving (Eq, Ord, Read, Show)
-
-_ExportDesc = Core.Name "hydra.wasm.syntax.ExportDesc"
-
-_ExportDesc_func = Core.Name "func"
-
-_ExportDesc_memory = Core.Name "memory"
-
-_ExportDesc_table = Core.Name "table"
-
-_ExportDesc_global = Core.Name "global"
-
--- | A constant value instruction
-data ConstValue =
-  -- | A 32-bit integer constant
-  ConstValueI32 Int |
-  -- | A 64-bit integer constant
-  ConstValueI64 I.Int64 |
-  -- | A 32-bit float constant
-  ConstValueF32 Float |
-  -- | A 64-bit float constant
-  ConstValueF64 Double
-  deriving (Eq, Ord, Read, Show)
-
-_ConstValue = Core.Name "hydra.wasm.syntax.ConstValue"
-
-_ConstValue_i32 = Core.Name "i32"
-
-_ConstValue_i64 = Core.Name "i64"
-
-_ConstValue_f32 = Core.Name "f32"
-
-_ConstValue_f64 = Core.Name "f64"
diff --git a/src/main/haskell/Hydra/Workflow.hs b/src/main/haskell/Hydra/Workflow.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Workflow.hs
+++ /dev/null
@@ -1,66 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A model for Hydra transformation workflows
-
-module Hydra.Workflow where
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Packaging as Packaging
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | The specification of a Hydra schema, provided as a set of modules and a distinguished type
-data HydraSchemaSpec =
-  HydraSchemaSpec {
-    -- | The modules to include in the schema graph
-    hydraSchemaSpecModules :: [Packaging.Module],
-    -- | The name of the top-level type; all data which passes through the workflow will be instances of this type
-    hydraSchemaSpecTypeName :: Core.Name}
-  deriving (Eq, Ord, Read, Show)
-
-_HydraSchemaSpec = Core.Name "hydra.workflow.HydraSchemaSpec"
-
-_HydraSchemaSpec_modules = Core.Name "modules"
-
-_HydraSchemaSpec_typeName = Core.Name "typeName"
-
--- | The specification of a schema at the source end of a workflow
-data SchemaSpec =
-  -- | A native Hydra schema
-  SchemaSpecHydra HydraSchemaSpec |
-  -- | A schema provided as a file, available at the given file path
-  SchemaSpecFile String |
-  -- | A schema which will be provided within the workflow
-  SchemaSpecProvided
-  deriving (Eq, Ord, Read, Show)
-
-_SchemaSpec = Core.Name "hydra.workflow.SchemaSpec"
-
-_SchemaSpec_hydra = Core.Name "hydra"
-
-_SchemaSpec_file = Core.Name "file"
-
-_SchemaSpec_provided = Core.Name "provided"
-
--- | The specification of a workflow which takes a schema specification, reads data from a directory, and writes data to another directory
-data TransformWorkflow =
-  TransformWorkflow {
-    -- | A descriptive name for the workflow
-    transformWorkflowName :: String,
-    -- | The schema specification
-    transformWorkflowSchemaSpec :: SchemaSpec,
-    -- | The source directory
-    transformWorkflowSrcDir :: String,
-    -- | The destination directory
-    transformWorkflowDestDir :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_TransformWorkflow = Core.Name "hydra.workflow.TransformWorkflow"
-
-_TransformWorkflow_name = Core.Name "name"
-
-_TransformWorkflow_schemaSpec = Core.Name "schemaSpec"
-
-_TransformWorkflow_srcDir = Core.Name "srcDir"
-
-_TransformWorkflow_destDir = Core.Name "destDir"
diff --git a/src/main/haskell/Hydra/Xml/Schema.hs b/src/main/haskell/Hydra/Xml/Schema.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Xml/Schema.hs
+++ /dev/null
@@ -1,467 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | A partial XML Schema model, focusing on datatypes. All simple datatypes (i.e. xsd:anySimpleType and below) are included.
--- | See: https://www.w3.org/TR/xmlschema-2
--- | Note: for most of the XML Schema datatype definitions included here, the associated Hydra type is simply
--- |       the string type. Exceptions are made for xsd:boolean and most of the numeric types, where there is a clearly
--- |       corresponding Hydra literal type.
-
-module Hydra.Xml.Schema 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
-
-newtype AnySimpleType =
-  AnySimpleType {
-    unAnySimpleType :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_AnySimpleType = Core.Name "hydra.xml.schema.AnySimpleType"
-
-newtype AnyType =
-  AnyType {
-    unAnyType :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_AnyType = Core.Name "hydra.xml.schema.AnyType"
-
-newtype AnyURI =
-  AnyURI {
-    unAnyURI :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_AnyURI = Core.Name "hydra.xml.schema.AnyURI"
-
-newtype Base64Binary =
-  Base64Binary {
-    unBase64Binary :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Base64Binary = Core.Name "hydra.xml.schema.Base64Binary"
-
-newtype Boolean =
-  Boolean {
-    unBoolean :: Bool}
-  deriving (Eq, Ord, Read, Show)
-
-_Boolean = Core.Name "hydra.xml.schema.Boolean"
-
-newtype Byte =
-  Byte {
-    unByte :: I.Int8}
-  deriving (Eq, Ord, Read, Show)
-
-_Byte = Core.Name "hydra.xml.schema.Byte"
-
-newtype Date =
-  Date {
-    unDate :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Date = Core.Name "hydra.xml.schema.Date"
-
-newtype DateTime =
-  DateTime {
-    unDateTime :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_DateTime = Core.Name "hydra.xml.schema.DateTime"
-
-newtype Decimal =
-  Decimal {
-    unDecimal :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Decimal = Core.Name "hydra.xml.schema.Decimal"
-
-newtype Double_ =
-  Double_ {
-    unDouble :: Double}
-  deriving (Eq, Ord, Read, Show)
-
-_Double = Core.Name "hydra.xml.schema.Double"
-
-newtype Duration =
-  Duration {
-    unDuration :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Duration = Core.Name "hydra.xml.schema.Duration"
-
-newtype ENTITIES =
-  ENTITIES {
-    unENTITIES :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ENTITIES = Core.Name "hydra.xml.schema.ENTITIES"
-
-newtype ENTITY =
-  ENTITY {
-    unENTITY :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ENTITY = Core.Name "hydra.xml.schema.ENTITY"
-
-newtype Float_ =
-  Float_ {
-    unFloat :: Float}
-  deriving (Eq, Ord, Read, Show)
-
-_Float = Core.Name "hydra.xml.schema.Float"
-
-newtype GDay =
-  GDay {
-    unGDay :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_GDay = Core.Name "hydra.xml.schema.GDay"
-
-newtype GMonth =
-  GMonth {
-    unGMonth :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_GMonth = Core.Name "hydra.xml.schema.GMonth"
-
-newtype GMonthDay =
-  GMonthDay {
-    unGMonthDay :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_GMonthDay = Core.Name "hydra.xml.schema.GMonthDay"
-
-newtype GYear =
-  GYear {
-    unGYear :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_GYear = Core.Name "hydra.xml.schema.GYear"
-
-newtype GYearMonth =
-  GYearMonth {
-    unGYearMonth :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_GYearMonth = Core.Name "hydra.xml.schema.GYearMonth"
-
-newtype HexBinary =
-  HexBinary {
-    unHexBinary :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_HexBinary = Core.Name "hydra.xml.schema.HexBinary"
-
-newtype ID =
-  ID {
-    unID :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_ID = Core.Name "hydra.xml.schema.ID"
-
-newtype IDREF =
-  IDREF {
-    unIDREF :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IDREF = Core.Name "hydra.xml.schema.IDREF"
-
-newtype IDREFS =
-  IDREFS {
-    unIDREFS :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_IDREFS = Core.Name "hydra.xml.schema.IDREFS"
-
-newtype Int_ =
-  Int_ {
-    unInt :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_Int = Core.Name "hydra.xml.schema.Int"
-
-newtype Integer_ =
-  Integer_ {
-    unInteger :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_Integer = Core.Name "hydra.xml.schema.Integer"
-
-newtype Language =
-  Language {
-    unLanguage :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Language = Core.Name "hydra.xml.schema.Language"
-
-newtype Long =
-  Long {
-    unLong :: I.Int64}
-  deriving (Eq, Ord, Read, Show)
-
-_Long = Core.Name "hydra.xml.schema.Long"
-
-newtype NMTOKEN =
-  NMTOKEN {
-    unNMTOKEN :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_NMTOKEN = Core.Name "hydra.xml.schema.NMTOKEN"
-
-newtype NOTATION =
-  NOTATION {
-    unNOTATION :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_NOTATION = Core.Name "hydra.xml.schema.NOTATION"
-
-newtype Name =
-  Name {
-    unName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Name = Core.Name "hydra.xml.schema.Name"
-
-newtype NegativeInteger =
-  NegativeInteger {
-    unNegativeInteger :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_NegativeInteger = Core.Name "hydra.xml.schema.NegativeInteger"
-
-newtype NonNegativeInteger =
-  NonNegativeInteger {
-    unNonNegativeInteger :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_NonNegativeInteger = Core.Name "hydra.xml.schema.NonNegativeInteger"
-
-newtype NonPositiveInteger =
-  NonPositiveInteger {
-    unNonPositiveInteger :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_NonPositiveInteger = Core.Name "hydra.xml.schema.NonPositiveInteger"
-
-newtype NormalizedString =
-  NormalizedString {
-    unNormalizedString :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_NormalizedString = Core.Name "hydra.xml.schema.NormalizedString"
-
-newtype PositiveInteger =
-  PositiveInteger {
-    unPositiveInteger :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_PositiveInteger = Core.Name "hydra.xml.schema.PositiveInteger"
-
-newtype QName =
-  QName {
-    unQName :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_QName = Core.Name "hydra.xml.schema.QName"
-
-newtype Short =
-  Short {
-    unShort :: I.Int16}
-  deriving (Eq, Ord, Read, Show)
-
-_Short = Core.Name "hydra.xml.schema.Short"
-
-newtype String_ =
-  String_ {
-    unString :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_String = Core.Name "hydra.xml.schema.String"
-
-newtype Time =
-  Time {
-    unTime :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Time = Core.Name "hydra.xml.schema.Time"
-
-newtype Token =
-  Token {
-    unToken :: String}
-  deriving (Eq, Ord, Read, Show)
-
-_Token = Core.Name "hydra.xml.schema.Token"
-
-newtype UnsignedByte =
-  UnsignedByte {
-    unUnsignedByte :: I.Int16}
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedByte = Core.Name "hydra.xml.schema.UnsignedByte"
-
-newtype UnsignedInt =
-  UnsignedInt {
-    unUnsignedInt :: I.Int64}
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedInt = Core.Name "hydra.xml.schema.UnsignedInt"
-
-newtype UnsignedLong =
-  UnsignedLong {
-    unUnsignedLong :: Integer}
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedLong = Core.Name "hydra.xml.schema.UnsignedLong"
-
-newtype UnsignedShort =
-  UnsignedShort {
-    unUnsignedShort :: Int}
-  deriving (Eq, Ord, Read, Show)
-
-_UnsignedShort = Core.Name "hydra.xml.schema.UnsignedShort"
-
--- | See https://www.w3.org/TR/xmlschema-2/#non-fundamental
-newtype ConstrainingFacet =
-  ConstrainingFacet {
-    unConstrainingFacet :: ()}
-  deriving (Eq, Ord, Read, Show)
-
-_ConstrainingFacet = Core.Name "hydra.xml.schema.ConstrainingFacet"
-
-data Datatype =
-  DatatypeAnySimpleType  |
-  DatatypeAnyType  |
-  DatatypeAnyURI  |
-  DatatypeBase64Binary  |
-  DatatypeBoolean  |
-  DatatypeByte  |
-  DatatypeDate  |
-  DatatypeDateTime  |
-  DatatypeDecimal  |
-  DatatypeDouble  |
-  DatatypeDuration  |
-  DatatypeENTITIES  |
-  DatatypeENTITY  |
-  DatatypeFloat  |
-  DatatypeGDay  |
-  DatatypeGMonth  |
-  DatatypeGMonthDay  |
-  DatatypeGYear  |
-  DatatypeGYearMonth  |
-  DatatypeHexBinary  |
-  DatatypeID  |
-  DatatypeIDREF  |
-  DatatypeIDREFS  |
-  DatatypeInt  |
-  DatatypeInteger  |
-  DatatypeLanguage  |
-  DatatypeLong  |
-  DatatypeNMTOKEN  |
-  DatatypeNOTATION  |
-  DatatypeName  |
-  DatatypeNegativeInteger  |
-  DatatypeNonNegativeInteger  |
-  DatatypeNonPositiveInteger  |
-  DatatypeNormalizedString  |
-  DatatypePositiveInteger  |
-  DatatypeQName  |
-  DatatypeShort  |
-  DatatypeString  |
-  DatatypeTime  |
-  DatatypeToken  |
-  DatatypeUnsignedByte  |
-  DatatypeUnsignedInt  |
-  DatatypeUnsignedLong  |
-  DatatypeUnsignedShort
-  deriving (Eq, Ord, Read, Show)
-
-_Datatype = Core.Name "hydra.xml.schema.Datatype"
-
-_Datatype_anySimpleType = Core.Name "anySimpleType"
-
-_Datatype_anyType = Core.Name "anyType"
-
-_Datatype_anyURI = Core.Name "anyURI"
-
-_Datatype_base64Binary = Core.Name "base64Binary"
-
-_Datatype_boolean = Core.Name "boolean"
-
-_Datatype_byte = Core.Name "byte"
-
-_Datatype_date = Core.Name "date"
-
-_Datatype_dateTime = Core.Name "dateTime"
-
-_Datatype_decimal = Core.Name "decimal"
-
-_Datatype_double = Core.Name "double"
-
-_Datatype_duration = Core.Name "duration"
-
-_Datatype_ENTITIES = Core.Name "ENTITIES"
-
-_Datatype_ENTITY = Core.Name "ENTITY"
-
-_Datatype_float = Core.Name "float"
-
-_Datatype_gDay = Core.Name "gDay"
-
-_Datatype_gMonth = Core.Name "gMonth"
-
-_Datatype_gMonthDay = Core.Name "gMonthDay"
-
-_Datatype_gYear = Core.Name "gYear"
-
-_Datatype_gYearMonth = Core.Name "gYearMonth"
-
-_Datatype_hexBinary = Core.Name "hexBinary"
-
-_Datatype_ID = Core.Name "ID"
-
-_Datatype_IDREF = Core.Name "IDREF"
-
-_Datatype_IDREFS = Core.Name "IDREFS"
-
-_Datatype_int = Core.Name "int"
-
-_Datatype_integer = Core.Name "integer"
-
-_Datatype_language = Core.Name "language"
-
-_Datatype_long = Core.Name "long"
-
-_Datatype_NMTOKEN = Core.Name "NMTOKEN"
-
-_Datatype_NOTATION = Core.Name "NOTATION"
-
-_Datatype_name = Core.Name "name"
-
-_Datatype_negativeInteger = Core.Name "negativeInteger"
-
-_Datatype_nonNegativeInteger = Core.Name "nonNegativeInteger"
-
-_Datatype_nonPositiveInteger = Core.Name "nonPositiveInteger"
-
-_Datatype_normalizedString = Core.Name "normalizedString"
-
-_Datatype_positiveInteger = Core.Name "positiveInteger"
-
-_Datatype_qName = Core.Name "qName"
-
-_Datatype_short = Core.Name "short"
-
-_Datatype_string = Core.Name "string"
-
-_Datatype_time = Core.Name "time"
-
-_Datatype_token = Core.Name "token"
-
-_Datatype_unsignedByte = Core.Name "unsignedByte"
-
-_Datatype_unsignedInt = Core.Name "unsignedInt"
-
-_Datatype_unsignedLong = Core.Name "unsignedLong"
-
-_Datatype_unsignedShort = Core.Name "unsignedShort"
diff --git a/src/main/haskell/Hydra/Yaml/Coder.hs b/src/main/haskell/Hydra/Yaml/Coder.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Yaml/Coder.hs
+++ /dev/null
@@ -1,249 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | YAML encoding and decoding for Hydra terms
-
-module Hydra.Yaml.Coder where
-
-import qualified Hydra.Adapt as Adapt
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Errors as Errors
-import qualified Hydra.Extract.Core as ExtractCore
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Yaml.Language as Language
-import qualified Hydra.Yaml.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Decode a YAML value to a record term
-decodeRecord :: Core.Name -> [(Core.FieldType, (Coders.Coder Core.Term Model.Node))] -> Context.Context -> Model.Node -> Either Errors.Error Core.Term
-decodeRecord tname coders cx n =
-
-      let decodeObjectBody =
-              \m ->
-                let decodeField =
-                        \coder ->
-                          let ft = Pairs.first coder
-                              coder_ = Pairs.second coder
-                              fname = Core.fieldTypeName ft
-                              defaultValue = Model.NodeScalar Model.ScalarNull
-                              yamlValue = Maybes.fromMaybe defaultValue (Maps.lookup (Model.NodeScalar (Model.ScalarStr (Core.unName fname))) m)
-                          in (Eithers.bind (Coders.coderDecode coder_ cx yamlValue) (\v -> Right (Core.Field {
-                            Core.fieldName = fname,
-                            Core.fieldTerm = v})))
-                in (Eithers.bind (Eithers.mapList decodeField coders) (\fields -> Right (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = tname,
-                  Core.recordFields = fields}))))
-      in case n of
-        Model.NodeMapping v0 -> decodeObjectBody v0
-        _ -> Left (Errors.ErrorOther (Errors.OtherError "expected mapping"))
-
--- | Encode a record term to YAML
-encodeRecord :: [(Core.FieldType, (Coders.Coder Core.Term Model.Node))] -> Context.Context -> Graph.Graph -> Core.Term -> Either Errors.Error Model.Node
-encodeRecord coders cx graph term =
-
-      let stripped = Strip.deannotateTerm term
-          isMaybeNothing =
-                  \ft -> \fvalue -> case (Core.fieldTypeType ft) of
-                    Core.TypeMaybe _ -> case fvalue of
-                      Core.TermMaybe v1 -> Maybes.isNothing v1
-                      _ -> False
-                    _ -> False
-          encodeField =
-                  \coderAndField ->
-                    let ftAndCoder = Pairs.first coderAndField
-                        field = Pairs.second coderAndField
-                        ft = Pairs.first ftAndCoder
-                        coder_ = Pairs.second ftAndCoder
-                        fname = Core.fieldName field
-                        fvalue = Core.fieldTerm field
-                    in (Logic.ifElse (isMaybeNothing ft fvalue) (Right Nothing) (Eithers.bind (Coders.coderEncode coder_ cx fvalue) (\encoded -> Right (Just (Model.NodeScalar (Model.ScalarStr (Core.unName fname)), encoded)))))
-      in (Eithers.bind (ExtractCore.termRecord graph stripped) (\record ->
-        let fields = Core.recordFields record
-        in (Eithers.bind (Eithers.mapList encodeField (Lists.zip coders fields)) (\maybeFields -> Right (Model.NodeMapping (Maps.fromList (Maybes.cat maybeFields)))))))
-
--- | Create a YAML coder for literal types
-literalYamlCoder :: Core.LiteralType -> Either t0 (Coders.Coder Core.Literal Model.Scalar)
-literalYamlCoder lt =
-
-      let decodeBool =
-              \cx -> \s -> case s of
-                Model.ScalarBool v0 -> Right (Core.LiteralBoolean v0)
-                _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                  "expected boolean, found scalar"])))
-          decodeDecimal =
-                  \cx -> \s -> case s of
-                    Model.ScalarDecimal v0 -> Right (Core.LiteralDecimal v0)
-                    Model.ScalarFloat v0 -> Right (Core.LiteralDecimal (Literals.float64ToDecimal (Literals.bigfloatToFloat64 v0)))
-                    Model.ScalarInt v0 -> Right (Core.LiteralDecimal (Literals.bigintToDecimal v0))
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "expected decimal, found scalar"])))
-          decodeFloat =
-                  \cx -> \s -> case s of
-                    Model.ScalarDecimal v0 -> Right (Core.LiteralFloat (Core.FloatValueBigfloat (Literals.float64ToBigfloat (Literals.decimalToFloat64 v0))))
-                    Model.ScalarFloat v0 -> Right (Core.LiteralFloat (Core.FloatValueBigfloat v0))
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "expected float, found scalar"])))
-          decodeInteger =
-                  \cx -> \s -> case s of
-                    Model.ScalarInt v0 -> Right (Core.LiteralInteger (Core.IntegerValueBigint v0))
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "expected integer, found scalar"])))
-          decodeString =
-                  \cx -> \s -> case s of
-                    Model.ScalarStr v0 -> Right (Core.LiteralString v0)
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "expected string, found scalar"])))
-          encoded =
-                  case lt of
-                    Core.LiteralTypeBoolean -> Coders.Coder {
-                      Coders.coderEncode = (\cx -> \lit -> Eithers.bind (ExtractCore.booleanLiteral lit) (\b -> Right (Model.ScalarBool b))),
-                      Coders.coderDecode = decodeBool}
-                    Core.LiteralTypeDecimal -> Coders.Coder {
-                      Coders.coderEncode = (\cx -> \lit -> Eithers.bind (ExtractCore.decimalLiteral lit) (\d -> Right (Model.ScalarDecimal d))),
-                      Coders.coderDecode = decodeDecimal}
-                    Core.LiteralTypeFloat _ -> Coders.Coder {
-                      Coders.coderEncode = (\cx -> \lit -> Eithers.bind (ExtractCore.floatLiteral lit) (\f -> Eithers.bind (ExtractCore.bigfloatValue f) (\bf ->
-                        let shown = Literals.showBigfloat bf
-                        in (Logic.ifElse (requiresYamlStringSentinel shown) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                          "YAML cannot represent bigfloat value: ",
-                          shown])))) (Right (Model.ScalarFloat bf)))))),
-                      Coders.coderDecode = decodeFloat}
-                    Core.LiteralTypeInteger _ -> Coders.Coder {
-                      Coders.coderEncode = (\cx -> \lit -> Eithers.bind (ExtractCore.integerLiteral lit) (\i -> Eithers.bind (ExtractCore.bigintValue i) (\bi -> Right (Model.ScalarInt bi)))),
-                      Coders.coderDecode = decodeInteger}
-                    Core.LiteralTypeString -> Coders.Coder {
-                      Coders.coderEncode = (\cx -> \lit -> Eithers.bind (ExtractCore.stringLiteral lit) (\s -> Right (Model.ScalarStr s))),
-                      Coders.coderDecode = decodeString}
-      in (Right encoded)
-
--- | Create a YAML coder for record types
-recordCoder :: Core.Name -> [Core.FieldType] -> t0 -> Graph.Graph -> Either Errors.Error (Coders.Coder Core.Term Model.Node)
-recordCoder tname rt cx g =
-
-      let getCoder = \f -> Eithers.bind (termCoder (Core.fieldTypeType f) cx g) (\coder -> Right (f, coder))
-      in (Eithers.bind (Eithers.mapList getCoder rt) (\coders -> Right (Coders.Coder {
-        Coders.coderEncode = (\cx2 -> \term -> encodeRecord coders cx2 g term),
-        Coders.coderDecode = (\cx2 -> \val -> decodeRecord tname coders cx2 val)})))
-
--- | True for IEEE sentinel strings that Hydra YAML cannot represent as a float scalar.
-requiresYamlStringSentinel :: String -> Bool
-requiresYamlStringSentinel s =
-    Logic.or (Equality.equal s "NaN") (Logic.or (Equality.equal s "Infinity") (Logic.or (Equality.equal s "-Infinity") (Equality.equal s "-0.0")))
-
--- | Create a YAML coder for term types
-termCoder :: Core.Type -> t0 -> Graph.Graph -> Either Errors.Error (Coders.Coder Core.Term Model.Node)
-termCoder typ cx g =
-
-      let stripped = Strip.deannotateType typ
-          encodeLiteral =
-                  \ac -> \cx2 -> \term -> case term of
-                    Core.TermLiteral v0 -> Eithers.bind (Coders.coderEncode ac cx2 v0) (\scalar -> Right (Model.NodeScalar scalar))
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "expected literal term, found: ",
-                      (ShowCore.term term)])))
-          encodeList =
-                  \lc -> \cx2 -> \term -> case term of
-                    Core.TermList v0 -> Eithers.bind (Eithers.mapList (\el -> Coders.coderEncode lc cx2 el) v0) (\encodedEls -> Right (Model.NodeSequence encodedEls))
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "expected list term, found: ",
-                      (ShowCore.term term)])))
-          decodeList =
-                  \lc -> \cx2 -> \n -> case n of
-                    Model.NodeSequence v0 -> Eithers.bind (Eithers.mapList (\node -> Coders.coderDecode lc cx2 node) v0) (\decodedNodes -> Right (Core.TermList decodedNodes))
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError "expected sequence"))
-          encodeMaybe =
-                  \maybeElementCoder -> \cx2 -> \maybeTerm ->
-                    let strippedMaybeTerm = Strip.deannotateTerm maybeTerm
-                    in case strippedMaybeTerm of
-                      Core.TermMaybe v0 -> Maybes.maybe (Right (Model.NodeScalar Model.ScalarNull)) (\innerTerm -> Eithers.bind (Coders.coderEncode maybeElementCoder cx2 innerTerm) (\encodedInner -> Right encodedInner)) v0
-                      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                        "expected optional term, found: ",
-                        (ShowCore.term maybeTerm)])))
-          decodeMaybe =
-                  \maybeElementCoder -> \cx2 -> \yamlVal -> case yamlVal of
-                    Model.NodeScalar v0 -> case v0 of
-                      Model.ScalarNull -> Right (Core.TermMaybe Nothing)
-                      _ -> Eithers.bind (Coders.coderDecode maybeElementCoder cx2 yamlVal) (\decodedInner -> Right (Core.TermMaybe (Just decodedInner)))
-                    _ -> Eithers.bind (Coders.coderDecode maybeElementCoder cx2 yamlVal) (\decodedInner -> Right (Core.TermMaybe (Just decodedInner)))
-          result =
-                  case stripped of
-                    Core.TypeLiteral v0 -> Eithers.bind (literalYamlCoder v0) (\ac -> Right (Coders.Coder {
-                      Coders.coderEncode = (encodeLiteral ac),
-                      Coders.coderDecode = (\cx2 -> \n -> case n of
-                        Model.NodeScalar v1 -> Eithers.bind (Coders.coderDecode ac cx2 v1) (\lit -> Right (Core.TermLiteral lit))
-                        _ -> Left (Errors.ErrorOther (Errors.OtherError "expected scalar node")))}))
-                    Core.TypeList v0 -> Eithers.bind (termCoder v0 cx g) (\lc -> Right (Coders.Coder {
-                      Coders.coderEncode = (encodeList lc),
-                      Coders.coderDecode = (decodeList lc)}))
-                    Core.TypeMap v0 ->
-                      let kt = Core.mapTypeKeys v0
-                          vt = Core.mapTypeValues v0
-                      in (Eithers.bind (termCoder kt cx g) (\kc -> Eithers.bind (termCoder vt cx g) (\vc ->
-                        let encodeEntry =
-                                \cx2 -> \kv ->
-                                  let k = Pairs.first kv
-                                      v = Pairs.second kv
-                                  in (Eithers.bind (Coders.coderEncode kc cx2 k) (\encodedK -> Eithers.bind (Coders.coderEncode vc cx2 v) (\encodedV -> Right (encodedK, encodedV))))
-                            decodeEntry =
-                                    \cx2 -> \kv ->
-                                      let k = Pairs.first kv
-                                          v = Pairs.second kv
-                                      in (Eithers.bind (Coders.coderDecode kc cx2 k) (\decodedK -> Eithers.bind (Coders.coderDecode vc cx2 v) (\decodedV -> Right (decodedK, decodedV))))
-                        in (Right (Coders.Coder {
-                          Coders.coderEncode = (\cx2 -> \term -> case term of
-                            Core.TermMap v1 -> Eithers.bind (Eithers.mapList (\entry -> encodeEntry cx2 entry) (Maps.toList v1)) (\entries -> Right (Model.NodeMapping (Maps.fromList entries)))
-                            _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                              "expected map term, found: ",
-                              (ShowCore.term term)])))),
-                          Coders.coderDecode = (\cx2 -> \n -> case n of
-                            Model.NodeMapping v1 -> Eithers.bind (Eithers.mapList (\entry -> decodeEntry cx2 entry) (Maps.toList v1)) (\entries -> Right (Core.TermMap (Maps.fromList entries)))
-                            _ -> Left (Errors.ErrorOther (Errors.OtherError "expected mapping")))})))))
-                    Core.TypeMaybe v0 -> Eithers.bind (termCoder v0 cx g) (\maybeElementCoder -> Right (Coders.Coder {
-                      Coders.coderEncode = (encodeMaybe maybeElementCoder),
-                      Coders.coderDecode = (decodeMaybe maybeElementCoder)}))
-                    Core.TypeRecord v0 -> recordCoder (Core.Name "yaml") v0 cx g
-                    Core.TypeUnit -> Right unitCoder
-                    _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-                      "unsupported type in YAML: ",
-                      (ShowCore.type_ typ)])))
-      in result
-
--- | YAML coder for unit values
-unitCoder :: Coders.Coder Core.Term Model.Node
-unitCoder =
-    Coders.Coder {
-      Coders.coderEncode = encodeUnit,
-      Coders.coderDecode = decodeUnit}
-  where
-    encodeUnit =
-        \cx -> \term -> case (Strip.deannotateTerm term) of
-          Core.TermUnit -> Right (Model.NodeScalar Model.ScalarNull)
-          _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat [
-            "expected unit, found: ",
-            (ShowCore.term term)])))
-    decodeUnit =
-        \cx -> \n -> case n of
-          Model.NodeScalar v0 -> case v0 of
-            Model.ScalarNull -> Right Core.TermUnit
-            _ -> Left (Errors.ErrorOther (Errors.OtherError "expected null scalar"))
-          _ -> Left (Errors.ErrorOther (Errors.OtherError "expected null"))
-
--- | Create a YAML coder for a given type
-yamlCoder :: Core.Type -> t0 -> Graph.Graph -> Either Errors.Error (Coders.Coder Core.Term Model.Node)
-yamlCoder typ cx g =
-
-      let mkTermCoder = \t -> termCoder t cx g
-      in (Eithers.bind (Adapt.simpleLanguageAdapter Language.yamlLanguage cx g typ) (\adapter -> Eithers.bind (mkTermCoder (Coders.adapterTarget adapter)) (\coder -> Right (Adapt.composeCoders (Coders.adapterCoder adapter) coder))))
diff --git a/src/main/haskell/Hydra/Yaml/Language.hs b/src/main/haskell/Hydra/Yaml/Language.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Yaml/Language.hs
+++ /dev/null
@@ -1,64 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Language constraints for YAML
-
-module Hydra.Yaml.Language where
-
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Variants as Variants
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Language constraints for YAML
-yamlLanguage :: Coders.Language
-yamlLanguage =
-    Coders.Language {
-      Coders.languageName = (Coders.LanguageName "hydra.yaml"),
-      Coders.languageConstraints = Coders.LanguageConstraints {
-        Coders.languageConstraintsEliminationVariants = eliminationVariants,
-        Coders.languageConstraintsLiteralVariants = literalVariants,
-        Coders.languageConstraintsFloatTypes = floatTypes,
-        Coders.languageConstraintsFunctionVariants = functionVariants,
-        Coders.languageConstraintsIntegerTypes = integerTypes,
-        Coders.languageConstraintsTermVariants = termVariants,
-        Coders.languageConstraintsTypeVariants = typeVariants,
-        Coders.languageConstraintsTypes = typePredicate}}
-  where
-    eliminationVariants = Sets.empty
-    literalVariants =
-        Sets.fromList [
-          Variants.LiteralVariantBoolean,
-          Variants.LiteralVariantFloat,
-          Variants.LiteralVariantInteger,
-          Variants.LiteralVariantString]
-    floatTypes = Sets.fromList [
-      Core.FloatTypeBigfloat]
-    functionVariants = Sets.empty
-    integerTypes = Sets.fromList [
-      Core.IntegerTypeBigint]
-    termVariants =
-        Sets.fromList [
-          Variants.TermVariantLiteral,
-          Variants.TermVariantList,
-          Variants.TermVariantMap,
-          Variants.TermVariantMaybe,
-          Variants.TermVariantRecord,
-          Variants.TermVariantUnit]
-    typeVariants =
-        Sets.fromList [
-          Variants.TypeVariantLiteral,
-          Variants.TypeVariantList,
-          Variants.TypeVariantMap,
-          Variants.TypeVariantMaybe,
-          Variants.TypeVariantRecord,
-          Variants.TypeVariantUnit,
-          Variants.TypeVariantVoid]
-    typePredicate =
-        \typ -> case (Strip.deannotateType typ) of
-          Core.TypeMaybe v0 -> case v0 of
-            Core.TypeMaybe _ -> False
-            _ -> True
-          _ -> True
diff --git a/src/main/haskell/Hydra/Yaml/Model.hs b/src/main/haskell/Hydra/Yaml/Model.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Yaml/Model.hs
+++ /dev/null
@@ -1,47 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A basic YAML representation model. Based on:
--- |   https://yaml.org/spec/1.2/spec.html
--- | The Serialization and Presentation properties of YAML,
--- | including directives, comments, anchors, style, formatting, and aliases, are not supported by this model.
--- | In addition, tags are omitted from this model, and non-standard scalars are unsupported.
-
-module Hydra.Yaml.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
--- | A YAML node (value)
-data Node =
-  -- | A mapping from nodes to nodes
-  NodeMapping (M.Map Node Node) |
-  -- | A scalar value
-  NodeScalar Scalar |
-  -- | A sequence of nodes
-  NodeSequence [Node]
-  deriving (Eq, Ord, Read, Show)
-_Node = Core.Name "hydra.yaml.model.Node"
-_Node_mapping = Core.Name "mapping"
-_Node_scalar = Core.Name "scalar"
-_Node_sequence = Core.Name "sequence"
--- | A union of scalars supported in the YAML failsafe and JSON schemas. Other scalars are not supported here
-data Scalar =
-  -- | Represents a true/false value
-  ScalarBool Bool |
-  -- | An arbitrary-precision decimal number (lexically a valid JSON number)
-  ScalarDecimal Sci.Scientific |
-  -- | Represents an approximation to real numbers
-  ScalarFloat Double |
-  -- | Represents arbitrary sized finite mathematical integers
-  ScalarInt Integer |
-  -- | Represents the lack of a value
-  ScalarNull |
-  -- | A string value
-  ScalarStr String
-  deriving (Eq, Ord, Read, Show)
-_Scalar = Core.Name "hydra.yaml.model.Scalar"
-_Scalar_bool = Core.Name "bool"
-_Scalar_decimal = Core.Name "decimal"
-_Scalar_float = Core.Name "float"
-_Scalar_int = Core.Name "int"
-_Scalar_null = Core.Name "null"
-_Scalar_str = Core.Name "str"
diff --git a/src/main/haskell/Hydra/Yaml/Serde.hs b/src/main/haskell/Hydra/Yaml/Serde.hs
deleted file mode 100644
--- a/src/main/haskell/Hydra/Yaml/Serde.hs
+++ /dev/null
@@ -1,232 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
-
--- | Native YAML serialization: YAML Node to String
-
-module Hydra.Yaml.Serde where
-
-import qualified Hydra.Lib.Chars as Chars
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Yaml.Model as Model
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-
--- | Escape single quotes by doubling them
-escapeSingleQuotes :: String -> String
-escapeSingleQuotes s =
-
-      let squote = 39
-      in (Strings.fromList (Lists.bind (Strings.toList s) (\c -> Logic.ifElse (Equality.equal c squote) [
-        squote,
-        squote] [
-        c])))
-
--- | Check if a string has leading or trailing whitespace
-hasLeadingTrailingSpace :: String -> Bool
-hasLeadingTrailingSpace s =
-
-      let chars = Strings.toList s
-      in (Logic.or (Maybes.fromMaybe False (Maybes.map (\c -> Chars.isSpace c) (Lists.maybeHead chars))) (Maybes.fromMaybe False (Maybes.map (\c -> Chars.isSpace c) (Lists.maybeLast chars))))
-
--- | Serialize a YAML node to a string
-hydraYamlToString :: Model.Node -> String
-hydraYamlToString node = writeNode node
-
--- | Indent all lines of a string by 2 spaces
-indentString :: String -> String
-indentString s =
-    Strings.cat (Lists.map (\line -> Logic.ifElse (Strings.null line) "" (Strings.cat [
-      "  ",
-      line,
-      "\n"])) (Strings.lines s))
-
--- | Check if character codes represent a decimal number
-isDecimalString :: [Int] -> Bool
-isDecimalString chars =
-
-      let dotCode = 46
-          parts = Lists.span (\c -> Logic.not (Equality.equal c dotCode)) chars
-          before = Pairs.first parts
-          afterWithDot = Pairs.second parts
-      in (Logic.ifElse (Lists.null before) False (Logic.ifElse (Lists.null afterWithDot) False (
-        let after = Lists.drop 1 afterWithDot
-        in (Logic.ifElse (Lists.null after) False (
-          let isDigitFn = \c -> Logic.and (Equality.gte c 48) (Equality.lte c 57)
-          in (Logic.and (Lists.null (Lists.filter (\c -> Logic.not (isDigitFn c)) before)) (Lists.null (Lists.filter (\c -> Logic.not (isDigitFn c)) after))))))))
-
--- | Check if a string looks like a number
-looksLikeNumber :: String -> Bool
-looksLikeNumber s =
-
-      let chars = Strings.toList s
-      in (Maybes.fromMaybe False (Maybes.map (\p ->
-        let firstCh = Pairs.first p
-            tailCh = Pairs.second p
-            rest = Logic.ifElse (Equality.equal firstCh 45) tailCh chars
-            isDigitFn = \c -> Logic.and (Equality.gte c 48) (Equality.lte c 57)
-            allDigits = Logic.and (Logic.not (Lists.null rest)) (Lists.null (Lists.filter (\c -> Logic.not (isDigitFn c)) rest))
-        in (Logic.ifElse allDigits True (isDecimalString rest))) (Lists.uncons chars)))
-
--- | Check if a string needs quoting in YAML
-needsQuoting :: String -> Bool
-needsQuoting s =
-    Logic.ifElse (Strings.null s) True (Logic.ifElse (Lists.elem s yamlReservedWords) True (Logic.ifElse (looksLikeNumber s) True (
-      let chars = Strings.toList s
-          specials = Strings.toList yamlSpecialChars
-          hasSpecial = Logic.not (Lists.null (Lists.filter (\c -> Lists.elem c specials) chars))
-      in (Logic.ifElse hasSpecial True (hasLeadingTrailingSpace s)))))
-
--- | Write a mapping entry in block style
-writeMappingEntry :: (Model.Node, Model.Node) -> String
-writeMappingEntry entry =
-
-      let key = Pairs.first entry
-          value = Pairs.second entry
-      in case value of
-        Model.NodeScalar v0 -> Strings.cat [
-          writeNodeInline key,
-          ": ",
-          (writeScalar v0),
-          "\n"]
-        Model.NodeSequence v0 -> Logic.ifElse (Lists.null v0) (Strings.cat [
-          writeNodeInline key,
-          ": []\n"]) (Strings.cat [
-          writeNodeInline key,
-          ":\n",
-          (indentString (writeNode value))])
-        Model.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) (Strings.cat [
-          writeNodeInline key,
-          ": {}\n"]) (Strings.cat [
-          writeNodeInline key,
-          ":\n",
-          (indentString (writeNode value))])
-
--- | Write a mapping entry for the first item of a sequence element
-writeMappingEntryInline :: (Model.Node, Model.Node) -> String
-writeMappingEntryInline entry =
-
-      let key = Pairs.first entry
-          value = Pairs.second entry
-      in case value of
-        Model.NodeScalar v0 -> Strings.cat [
-          writeNodeInline key,
-          ": ",
-          (writeScalar v0),
-          "\n"]
-        Model.NodeSequence v0 -> Logic.ifElse (Lists.null v0) (Strings.cat [
-          writeNodeInline key,
-          ": []\n"]) (Strings.cat [
-          writeNodeInline key,
-          ":\n",
-          (indentString (writeNode value))])
-        Model.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) (Strings.cat [
-          writeNodeInline key,
-          ": {}\n"]) (Strings.cat [
-          writeNodeInline key,
-          ":\n",
-          (indentString (writeNode value))])
-
--- | Write a YAML node as a top-level value in block style
-writeNode :: Model.Node -> String
-writeNode node =
-    case node of
-      Model.NodeScalar v0 -> Strings.cat2 (writeScalar v0) "\n"
-      Model.NodeSequence v0 -> Logic.ifElse (Lists.null v0) "[]\n" (Strings.cat (Lists.map (\item -> writeSequenceItem item) v0))
-      Model.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) "{}\n" (Strings.cat (Lists.map (\e -> writeMappingEntry e) (Maps.toList v0)))
-
--- | Write a node inline (for use as a mapping key)
-writeNodeInline :: Model.Node -> String
-writeNodeInline node =
-    case node of
-      Model.NodeScalar v0 -> writeScalar v0
-      Model.NodeSequence v0 -> Strings.cat [
-        "[",
-        (Strings.intercalate ", " (Lists.map (\item -> writeNodeInline item) v0)),
-        "]"]
-      Model.NodeMapping v0 ->
-        let writeFlowEntry =
-                \e -> Strings.cat [
-                  writeNodeInline (Pairs.first e),
-                  ": ",
-                  (writeNodeInline (Pairs.second e))]
-        in (Strings.cat [
-          "{",
-          (Strings.intercalate ", " (Lists.map writeFlowEntry (Maps.toList v0))),
-          "}"])
-
--- | Write a scalar value
-writeScalar :: Model.Scalar -> String
-writeScalar s =
-    case s of
-      Model.ScalarBool v0 -> Logic.ifElse v0 "true" "false"
-      Model.ScalarDecimal v0 -> Literals.showDecimal v0
-      Model.ScalarFloat v0 -> Literals.showBigfloat v0
-      Model.ScalarInt v0 -> Literals.showBigint v0
-      Model.ScalarNull -> "null"
-      Model.ScalarStr v0 -> writeString v0
-
--- | Write a sequence item in block style
-writeSequenceItem :: Model.Node -> String
-writeSequenceItem node =
-    case node of
-      Model.NodeScalar v0 -> Strings.cat [
-        "- ",
-        (writeScalar v0),
-        "\n"]
-      Model.NodeSequence v0 -> Logic.ifElse (Lists.null v0) "- []\n" (Strings.cat2 "-\n" (indentString (writeNode node)))
-      Model.NodeMapping v0 -> Logic.ifElse (Equality.equal (Maps.size v0) 0) "- {}\n" (
-        let entries = Maps.toList v0
-        in (Maybes.fromMaybe "" (Maybes.map (\p ->
-          let firstEntry = Pairs.first p
-              restEntries = Pairs.second p
-              firstStr = writeMappingEntryInline firstEntry
-              restStr = Strings.cat (Lists.map (\e -> writeMappingEntry e) restEntries)
-          in (Strings.cat [
-            "- ",
-            firstStr,
-            (indentString restStr)])) (Lists.uncons entries))))
-
--- | Write a string value, quoting if necessary
-writeString :: String -> String
-writeString s =
-    Logic.ifElse (needsQuoting s) (Strings.cat [
-      "'",
-      (escapeSingleQuotes s),
-      "'"]) s
-
--- | YAML reserved words that need quoting
-yamlReservedWords :: [String]
-yamlReservedWords =
-    [
-      "true",
-      "false",
-      "null",
-      "~",
-      "yes",
-      "no",
-      "on",
-      "off",
-      "True",
-      "False",
-      "Null",
-      "Yes",
-      "No",
-      "On",
-      "Off",
-      "TRUE",
-      "FALSE",
-      "NULL",
-      "YES",
-      "NO",
-      "ON",
-      "OFF"]
-
--- | YAML special characters that trigger quoting
-yamlSpecialChars :: String
-yamlSpecialChars = ": {}[]#,&*!|>'\"%@`"
diff --git a/src/main/haskell/OpenGql/Grammar.hs b/src/main/haskell/OpenGql/Grammar.hs
deleted file mode 100644
--- a/src/main/haskell/OpenGql/Grammar.hs
+++ /dev/null
@@ -1,7077 +0,0 @@
--- 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"
diff --git a/src/test/haskell/Hydra/ArbitraryCore.hs b/src/test/haskell/Hydra/ArbitraryCore.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/ArbitraryCore.hs
+++ /dev/null
@@ -1,308 +0,0 @@
-
-{-# LANGUAGE FlexibleInstances #-} -- TODO: temporary, for QC.Arbitrary Term and QC.Arbitrary Type
-module Hydra.ArbitraryCore where
-
-import Hydra.Kernel
-import Hydra.Dsl.Terms
-import qualified Hydra.Dsl.Types as Types
-
-import qualified Control.Monad as CM
-import qualified Data.ByteString as B
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Data.Maybe as Y
-import qualified Test.QuickCheck as QC
-
-
--- Arbitrary instance for ByteString
-instance QC.Arbitrary B.ByteString where
-  arbitrary = B.pack <$> QC.arbitrary
-  shrink bs = B.pack <$> QC.shrink (B.unpack bs)
-
-
-instance QC.Arbitrary LiteralType
-  where
-    arbitrary = QC.oneof [
-      pure LiteralTypeBinary,
-      pure LiteralTypeBoolean,
-      LiteralTypeFloat <$> QC.arbitrary,
-      LiteralTypeInteger <$> QC.arbitrary,
-      pure LiteralTypeString]
-
-instance QC.Arbitrary Literal
-  where
-    arbitrary = QC.oneof [
-      LiteralBinary <$> QC.arbitrary,
-      LiteralBoolean <$> QC.arbitrary,
-      LiteralFloat <$> QC.arbitrary,
-      LiteralInteger <$> QC.arbitrary,
-      LiteralString <$> QC.arbitrary]
-
-instance QC.Arbitrary FloatType
-  where
-    arbitrary = QC.oneof $ pure <$> [
-      FloatTypeBigfloat,
-      FloatTypeFloat32,
-      FloatTypeFloat64]
-
-instance QC.Arbitrary FloatValue
-  where
-    arbitrary = QC.oneof [
-      FloatValueBigfloat <$> QC.arbitrary,
-      FloatValueFloat32 <$> QC.arbitrary,
-      FloatValueFloat64 <$> QC.arbitrary]
-
-instance QC.Arbitrary IntegerType
-  where
-    arbitrary = QC.oneof $ pure <$> [
-      IntegerTypeBigint,
-      IntegerTypeInt8,
-      IntegerTypeInt16,
-      IntegerTypeInt32,
-      IntegerTypeInt64,
-      IntegerTypeUint8,
-      IntegerTypeUint16,
-      IntegerTypeUint32,
-      IntegerTypeUint64]
-
-instance QC.Arbitrary IntegerValue
-  where
-    arbitrary = QC.oneof [
-      IntegerValueBigint <$> QC.arbitrary,
-      IntegerValueInt8 <$> QC.arbitrary,
-      IntegerValueInt16 <$> QC.arbitrary,
-      IntegerValueInt32 <$> QC.arbitrary,
-      IntegerValueInt64 <$> QC.arbitrary,
-      IntegerValueUint8 <$> QC.arbitrary,
-      IntegerValueUint16 <$> QC.arbitrary,
-      IntegerValueUint32 <$> QC.arbitrary,
-      IntegerValueUint64 <$> QC.arbitrary]
-
-instance QC.Arbitrary Term where
-  arbitrary = (\(TypeApplicationTerm term _) -> term) <$> QC.sized arbitraryTypeApplicationTerm
-
-instance QC.Arbitrary Name
-  where
-    arbitrary = Name <$> QC.arbitrary
-    shrink (Name name)= Name <$> QC.shrink name
-
-instance QC.Arbitrary Type where
-  arbitrary = QC.sized arbitraryType
-  shrink typ = case typ of
-    TypeLiteral at -> Types.literal <$> case at of
-      LiteralTypeInteger _ -> [LiteralTypeBoolean]
-      LiteralTypeFloat _ -> [LiteralTypeBoolean]
-      _ -> []
-    _ -> [] -- TODO
-
-instance QC.Arbitrary TypeApplicationTerm where
-  arbitrary = QC.sized arbitraryTypeApplicationTerm
-  shrink (TypeApplicationTerm term typ) = L.concat ((\(t, m) -> TypeApplicationTerm <$> m term <*> pure t) <$> shrinkers typ)
-
-arbitraryLiteral :: LiteralType -> QC.Gen Literal
-arbitraryLiteral at = case at of
-  LiteralTypeBinary -> LiteralBinary <$> QC.arbitrary
-  LiteralTypeBoolean -> LiteralBoolean <$> QC.arbitrary
-  LiteralTypeFloat ft -> LiteralFloat <$> arbitraryFloatValue ft
-  LiteralTypeInteger it -> LiteralInteger <$> arbitraryIntegerValue it
-  LiteralTypeString -> LiteralString <$> QC.arbitrary
-
-arbitraryField :: FieldType -> Int -> QC.Gen Field
-arbitraryField (FieldType fn ft) n = Field fn <$> arbitraryTerm ft n
-
-arbitraryFieldType :: Int -> QC.Gen (FieldType)
-arbitraryFieldType n = FieldType <$> QC.arbitrary <*> arbitraryType n
-
-arbitraryFloatValue :: FloatType -> QC.Gen FloatValue
-arbitraryFloatValue ft = case ft of
-  FloatTypeBigfloat -> FloatValueBigfloat <$> QC.arbitrary
-  FloatTypeFloat32 -> FloatValueFloat32 <$> QC.arbitrary
-  FloatTypeFloat64 -> FloatValueFloat64 <$> QC.arbitrary
-
--- Note: primitive functions and data terms are not currently generated, as they require a context.
-arbitraryFunctionTerm :: FunctionType -> Int -> QC.Gen Term
-arbitraryFunctionTerm (FunctionType dom cod) n = QC.oneof $ defaults ++ domainSpecific
-  where
-    n' = decr n
-    defaults = [
-      -- Note: this simple lambda is a bit of a cheat. We just have to make sure we can generate at least one term
-      --       for any supported function type.
-      TermLambda <$> (Lambda (Name "x") Nothing <$> arbitraryTerm cod n')]
-     -- Note: two random types will rarely be equal, but it will happen occasionally with simple types
-    domainSpecific = case dom of
-      TypeUnion sfields -> [cs]
-        where
-          cs = do
-            afields <- CM.mapM arbitraryCase sfields
-            return $ TermCases $ CaseStatement (Name "placeholder") Nothing afields
-          arbitraryCase (FieldType fn dom') = do
-            term <- arbitraryFunctionTerm (FunctionType dom' cod) n2
-            return $ Field fn term
-          n2 = div n' $ L.length sfields
-        -- Note: projections now require nominally-typed records
-      _ -> []
-
-arbitraryIntegerValue :: IntegerType -> QC.Gen IntegerValue
-arbitraryIntegerValue it = case it of
-  IntegerTypeBigint -> IntegerValueBigint <$> QC.arbitrary
-  IntegerTypeInt8 -> IntegerValueInt8 <$> QC.arbitrary
-  IntegerTypeInt16 -> IntegerValueInt16 <$> QC.arbitrary
-  IntegerTypeInt32 -> IntegerValueInt32 <$> QC.arbitrary
-  IntegerTypeInt64 -> IntegerValueInt64 <$> QC.arbitrary
-  IntegerTypeUint8 -> IntegerValueUint8 <$> QC.arbitrary
-  IntegerTypeUint16 -> IntegerValueUint16 <$> QC.arbitrary
-  IntegerTypeUint32 -> IntegerValueUint32 <$> QC.arbitrary
-  IntegerTypeUint64 -> IntegerValueUint64 <$> QC.arbitrary
-
-arbitraryList :: Bool -> (Int -> QC.Gen a) -> Int -> QC.Gen [a]
-arbitraryList nonempty g n = do
-  l <- QC.choose (0, div n 2)
-  if nonempty && l == 0
-    then do
-      x <- g (decr n)
-      return [x]
-    else QC.vectorOf l (g (div n l))
-
-arbitraryOptional :: (Int -> QC.Gen a) -> Int -> QC.Gen (Maybe a)
-arbitraryOptional gen n = do
-  b <- QC.arbitrary
-  if b || n == 0 then pure Nothing else Just <$> gen (decr n)
-
-arbitraryPair :: (a -> a -> b) -> (Int -> QC.Gen a) -> Int -> QC.Gen b
-arbitraryPair c g n = c <$> g n' <*> g n'
-  where n' = div n 2
-
--- Note: variables and function applications are not (currently) generated
-arbitraryTerm :: Type -> Int -> QC.Gen Term
-arbitraryTerm typ n = case typ of
-    TypeLiteral at -> literal <$> arbitraryLiteral at
-    TypeFunction ft -> arbitraryFunctionTerm ft n'
-    TypeList lt -> list <$> arbitraryList False (arbitraryTerm lt) n'
-    TypeMap (MapType kt vt) -> TermMap <$> (M.fromList <$> arbitraryList False arbPair n')
-      where
-        arbPair n = do
-            k <- arbitraryTerm kt n'
-            v <- arbitraryTerm vt n'
-            return (k, v)
-          where
-            n' = div n 2
-    TypeMaybe ot -> optional <$> arbitraryOptional (arbitraryTerm ot) n'
-    TypeRecord sfields -> record (Name "placeholder") <$> arbitraryFields sfields
-    TypeSet st -> set <$> (S.fromList <$> arbitraryList False (arbitraryTerm st) n')
-    TypeUnion sfields -> do
-      f <- QC.elements sfields
-      let fn = fieldTypeName f
-      let Name fnStr = fn
-      ft <- arbitraryTerm (fieldTypeType f) n'
-      return $ inject (Name "placeholder") (Name fnStr) ft
-    TypeUnit -> pure TermUnit
-  where
-    n' = decr n
-    arbitraryFields sfields = if L.null sfields
-        then pure []
-        else CM.mapM (`arbitraryField` n2) sfields
-      where
-        n2 = div n' $ L.length sfields
-
--- Note: nominal types and element types are not currently generated, as instantiating them requires a context
-arbitraryType :: Int -> QC.Gen Type
-arbitraryType n = if n == 0 then pure Types.unit else QC.oneof [
-    TypeLiteral <$> QC.arbitrary,
-    TypeFunction <$> arbitraryPair FunctionType arbitraryType n',
-    TypeList <$> arbitraryType n',
-    TypeMap <$> arbitraryPair MapType arbitraryType n',
-    TypeMaybe <$> arbitraryType n',
---    TypeRecord <$> arbitraryList False arbitraryFieldType n', -- TODO: avoid duplicate field names
-    TypeSet <$> arbitraryType n']
---    TypeUnion <$> arbitraryList True arbitraryFieldType n'] -- TODO: avoid duplicate field names
-  where n' = decr n
-
-arbitraryTypeApplicationTerm :: Int -> QC.Gen TypeApplicationTerm
-arbitraryTypeApplicationTerm n = do
-    typ <- arbitraryType n'
-    term <- arbitraryTerm typ n'
-    return $ TypeApplicationTerm term typ
-  where
-    n' = div n 2 -- TODO: a term is usually bigger than its type
-
-decr :: Int -> Int
-decr n = max 0 (n-1)
-
--- Note: shrinking currently discards any metadata
-shrinkers :: Type -> [(Type, Term -> [Term])]
-shrinkers typ = trivialShrinker ++ case typ of
-    TypeLiteral at -> case at of
-      LiteralTypeBinary -> [(Types.binary, \(TermLiteral (LiteralBinary s)) -> binary <$> QC.shrink s)]
-      LiteralTypeBoolean -> []
-      LiteralTypeFloat ft -> []
-      LiteralTypeInteger it -> []
-      LiteralTypeString -> [(Types.string, \(TermLiteral (LiteralString s)) -> string <$> QC.shrink s)]
-  --  TypeFunction ft ->
-    TypeList lt -> dropElements : promoteType : shrinkType
-      where
-        dropElements = (Types.list lt, \(TermList els) -> list <$> dropAny els)
-        promoteType = (lt, \(TermList els) -> els)
-        shrinkType = (\(t, m) -> (Types.list t, \(TermList els) -> list <$> CM.mapM m els)) <$> shrinkers lt
-    TypeMap (MapType kt vt) -> shrinkKeys ++ shrinkValues ++ dropPairs
-      where
-        shrinkKeys = (\(t, m) -> (Types.map t vt,
-            \(TermMap mp) -> TermMap . M.fromList <$> (shrinkPair m <$> M.toList mp))) <$> shrinkers kt
-          where
-            shrinkPair m (km, vm) = (\km' -> (km', vm)) <$> m km
-        shrinkValues = (\(t, m) -> (Types.map kt t,
-            \(TermMap mp) -> TermMap . M.fromList <$> (shrinkPair m <$> M.toList mp))) <$> shrinkers vt
-          where
-            shrinkPair m (km, vm) = (\vm' -> (km, vm')) <$> m vm
-        dropPairs = [(Types.map kt vt, \(TermMap m) -> TermMap . M.fromList <$> dropAny (M.toList m))]
-    TypeMaybe ot -> toNothing : promoteType : shrinkType
-      where
-        toNothing = (Types.maybe ot, \(TermMaybe m) -> optional <$> Y.maybe [] (const [Nothing]) m)
-        promoteType = (ot, \(TermMaybe m) -> Y.maybeToList m)
-        shrinkType = (\(t, m) -> (Types.maybe t,
-          \(TermMaybe mb) -> Y.maybe [] (fmap (optional . Just) . m) mb)) <$> shrinkers ot
-    TypeRecord sfields -> dropFields
-        ++ shrinkFieldNames TypeRecord (record (Name "placeholder")) (\(TermRecord (Record _ dfields)) -> dfields) sfields
-        ++ promoteTypes ++ shrinkTypes
-      where
-        dropFields = dropField <$> indices
-          where
-            dropField i = (TypeRecord $ dropIth i sfields, \(TermRecord (Record _ dfields))
-              -> [record (Name "placeholder") $ dropIth i dfields])
-        promoteTypes = promoteField <$> indices
-          where
-            promoteField i = (fieldTypeType $ sfields !! i, \(TermRecord (Record _ dfields))
-              -> [fieldTerm $ dfields !! i])
-        shrinkTypes = [] -- TODO
-        indices = [0..(L.length sfields - 1)]
-    TypeSet st -> dropElements : promoteType : shrinkType
-      where
-        dropElements = (Types.set st, \(TermSet els) -> set . S.fromList <$> dropAny (S.toList els))
-        promoteType = (st, \(TermSet els) -> S.toList els)
-        shrinkType = (\(t, m) -> (Types.set t, \(TermSet els) -> set . S.fromList <$> CM.mapM m (S.toList els))) <$> shrinkers st
-    TypeUnion sfields -> dropFields
-        ++ shrinkFieldNames TypeUnion (\fs -> let Field (Name fn) ft = L.head fs in inject (Name "placeholder") (Name fn) ft) (\(TermInject (Injection _ f)) -> [f]) sfields
-        ++ promoteTypes ++ shrinkTypes
-      where
-        dropFields = [] -- TODO
-        promoteTypes = [] -- TODO
-        shrinkTypes = [] -- TODO
-    _ -> []
-  where
-    dropAny l = case l of
-      [] -> []
-      (h:r) -> [r] ++ ((h :) <$> dropAny r)
-    dropIth i l = L.take i l ++ L.drop (i+1) l
-    nodupes l = L.length (L.nub l) == L.length l
-    trivialShrinker = [(Types.unit, const [unit]) | typ /= Types.unit]
-    shrinkFieldNames toType toTerm fromTerm sfields = forNames <$> altNames
-      where
-        forNames names = (toType $ withFieldTypeNames names sfields,
-           \term -> [toTerm $ withFieldNames names $ fromTerm term])
-        altNames = L.filter nodupes $ CM.mapM QC.shrink (fieldTypeName <$> sfields)
-        withFieldTypeNames = L.zipWith (\n f -> FieldType n $ fieldTypeType f)
-        withFieldNames = L.zipWith (\n f -> Field n $ fieldTerm f)
-
--- | A placeholder for a type name. Use in tests only, where a union term is needed but no type name is known.
-untyped :: Name
-untyped = Name "Unknown"
diff --git a/src/test/haskell/Hydra/CoreCodersSpec.hs b/src/test/haskell/Hydra/CoreCodersSpec.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/CoreCodersSpec.hs
+++ /dev/null
@@ -1,321 +0,0 @@
-{-
-stack ghci hydra:lib hydra:hydra-test
-
-Test.Hspec.hspec Hydra.CoreCodersSpec.spec
--}
-
-module Hydra.CoreCodersSpec where
-
-import Hydra.Kernel
-import Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Types as Types
-import qualified Hydra.Decode.Core as DecodeCore
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Errors as Error
-
-import Hydra.TestData
-import Hydra.TestUtils
-import Hydra.ArbitraryCore (untyped)
-
-import qualified Test.Hspec as H
-import qualified Test.QuickCheck as QC
-import qualified Data.Map as M
-
-
--- | Helper to map DecodingError to String for test assertions
-decodeE :: Either DecodingError a -> Either String a
-decodeE = either (Left . Error.unDecodingError) Right
-
-individualEncoderTestCases :: H.SpecWith ()
-individualEncoderTestCases = do
-  H.describe "Individual encoder test cases" $ do
-
-    H.it "string literal type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.literalType LiteralTypeString :: Term)
-        (strip $ injectUnit _LiteralType _LiteralType_string)
-
-    H.it "string type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.type_ Types.string :: Term)
-        (strip $ inject _Type _Type_literal (injectUnit _LiteralType _LiteralType_string))
-
-    H.it "int32 type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.type_ Types.int32 :: Term)
-        (strip $ inject _Type _Type_literal (inject _LiteralType _LiteralType_integer $ injectUnit _IntegerType _IntegerType_int32))
-
-    H.it "record type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.type_ (TypeRecord
-          [Types.field "something" Types.string, Types.field "nothing" Types.unit]) :: Term)
-        (strip $ inject _Type _Type_record $
-          list [
-            record _FieldType [
-              Field _FieldType_name $ wrap _Name $ string "something",
-              Field _FieldType_type $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_string],
-            record _FieldType [
-              Field _FieldType_name $ wrap _Name $ string "nothing",
-              Field _FieldType_type $ injectUnit _Type _Type_unit]])
-
-    H.it "Name (wrapped type)" $ do
-      H.shouldBe
-        (strip $ EncodeCore.name (Name "test.Name") :: Term)
-        (strip $ wrap _Name $ string "test.Name")
-
-    H.it "string literal" $ do
-      H.shouldBe
-        (strip $ EncodeCore.literal (LiteralString "hello") :: Term)
-        (strip $ inject _Literal _Literal_string $ string "hello")
-
-    H.it "int32 literal" $ do
-      H.shouldBe
-        (strip $ EncodeCore.literal (LiteralInteger (IntegerValueInt32 42)) :: Term)
-        (strip $ inject _Literal _Literal_integer $ inject _IntegerValue _IntegerValue_int32 $ int32 42)
-
-    H.it "boolean literal" $ do
-      H.shouldBe
-        (strip $ EncodeCore.literal (LiteralBoolean True) :: Term)
-        (strip $ inject _Literal _Literal_boolean $ boolean True)
-
-    H.it "Field (record type)" $ do
-      H.shouldBe
-        (strip $ EncodeCore.field (Field (Name "myField") (Terms.string "value")) :: Term)
-        (strip $ record _Field [
-          Field _Field_name $ wrap _Name $ string "myField",
-          Field _Field_term $ inject _Term _Term_literal $ inject _Literal _Literal_string $ string "value"])
-
-    H.it "Lambda function" $ do
-      H.shouldBe
-        (strip $ EncodeCore.lambda (Lambda (Name "x") Nothing (TermVariable (Name "x"))) :: Term)
-        (strip $ record _Lambda [
-          Field _Lambda_parameter $ wrap _Name $ string "x",
-          Field _Lambda_domain $ optional Nothing,
-          Field _Lambda_body $ inject _Term _Term_variable $ wrap _Name $ string "x"])
-
-    H.it "function type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.type_ (Types.function Types.string Types.int32) :: Term)
-        (strip $ inject _Type _Type_function $ record _FunctionType [
-          Field _FunctionType_domain $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_string,
-          Field _FunctionType_codomain $ inject _Type _Type_literal $ inject _LiteralType _LiteralType_integer $
-            injectUnit _IntegerType _IntegerType_int32])
-
-    H.it "list type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.type_ (Types.list Types.boolean) :: Term)
-        (strip $ inject _Type _Type_list $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_boolean)
-
-    H.it "optional type" $ do
-      H.shouldBe
-        (strip $ EncodeCore.type_ (Types.optional Types.string) :: Term)
-        (strip $ inject _Type _Type_maybe $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_string)
-
-individualDecoderTestCases :: H.SpecWith ()
-individualDecoderTestCases = do
-  H.describe "Individual decoder test cases" $ do
-
-    H.it "float32 literal type" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.literalType (testGraph)
-          (inject _LiteralType _LiteralType_float $ injectUnit _FloatType _FloatType_float32))
-        (LiteralTypeFloat FloatTypeFloat32)
-
-    H.it "float32 type" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.type_ (testGraph)
-          (inject _Type _Type_literal $ inject _LiteralType _LiteralType_float $ injectUnit _FloatType _FloatType_float32))
-        Types.float32
-
-    H.it "union type" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.type_ (testGraph) $
-          inject _Type _Type_union $
-            list [
-              record _FieldType [
-                Field _FieldType_name $ wrap _Name $ string "left",
-                Field _FieldType_type $ inject _Type _Type_literal $ inject _LiteralType _LiteralType_integer $
-                  injectUnit _IntegerType _IntegerType_int64],
-              record _FieldType [
-                Field _FieldType_name $ wrap _Name $ string "right",
-                Field _FieldType_type $ inject _Type _Type_literal $ inject _LiteralType _LiteralType_float $
-                  injectUnit _FloatType _FloatType_float64]])
-          (TypeUnion [
-            Types.field "left" Types.int64,
-            Types.field "right" Types.float64])
-
-    H.it "Name (wrapped type)" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.name (testGraph) $
-          wrap _Name $ string "test.Name")
-        (Name "test.Name")
-
-    H.it "string literal" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.literal (testGraph) $
-          inject _Literal _Literal_string $ string "hello")
-        (LiteralString "hello")
-
-    H.it "int32 literal" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.literal (testGraph) $
-          inject _Literal _Literal_integer $ inject _IntegerValue _IntegerValue_int32 $ int32 42)
-        (LiteralInteger (IntegerValueInt32 42))
-
-    H.it "boolean literal" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.literal (testGraph) $
-          inject _Literal _Literal_boolean $ boolean True)
-        (LiteralBoolean True)
-
-    H.it "Field (record type)" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.field (testGraph) $
-          record _Field [
-            Field _Field_name $ wrap _Name $ string "myField",
-            Field _Field_term $ inject _Term _Term_literal $ inject _Literal _Literal_string $ string "value"])
-        (Field (Name "myField") (Terms.string "value"))
-
-    H.it "Lambda function" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.lambda (testGraph) $
-          record _Lambda [
-            Field _Lambda_parameter $ wrap _Name $ string "x",
-            Field _Lambda_domain $ optional Nothing,
-            Field _Lambda_body $ inject _Term _Term_variable $ wrap _Name $ string "x"])
-        (Lambda (Name "x") Nothing (TermVariable (Name "x")))
-
-    H.it "function type" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.type_ (testGraph) $
-          inject _Type _Type_function $ record _FunctionType [
-            Field _FunctionType_domain $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_string,
-            Field _FunctionType_codomain $ inject _Type _Type_literal $ inject _LiteralType _LiteralType_integer $
-              injectUnit _IntegerType _IntegerType_int32])
-        (Types.function Types.string Types.int32)
-
-    H.it "list type" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.type_ (testGraph) $
-          inject _Type _Type_list $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_boolean)
-        (Types.list Types.boolean)
-
-    H.it "optional type" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.type_ (testGraph) $
-          inject _Type _Type_maybe $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_string)
-        (Types.optional Types.string)
-
-decodeInvalidTerms :: H.SpecWith ()
-decodeInvalidTerms = do
-  H.describe "Decode invalid terms" $ do
-
-    H.it "Try to decode a term with wrong fields for Type" $ do
-      shouldFail (decodeE $ DecodeCore.type_ (testGraph) $ inject untyped (Name "unknownField") $ list [])
-
-    H.it "Try to decode an incomplete representation of a Type" $ do
-      shouldFail (decodeE $ DecodeCore.type_ (testGraph) $ inject _Type _Type_literal $ injectUnit _LiteralType _LiteralType_integer)
-
-    H.it "Try to decode a Name from non-string" $ do
-      shouldFail (decodeE $ DecodeCore.name (testGraph) $ wrap _Name $ int32 42)
-
-    H.it "Try to decode a Literal from wrong union variant" $ do
-      shouldFail (decodeE $ DecodeCore.literal (testGraph) $ inject untyped (Name "unknownVariant") $ string "bad")
-
-    H.it "Try to decode a record with missing field" $ do
-      shouldFail (decodeE $ DecodeCore.field (testGraph) $
-        record _Field [Field _Field_name $ wrap _Name $ string "onlyName"])
-
-    H.it "Try to decode a Lambda with wrong body type" $ do
-      shouldFail (decodeE $ DecodeCore.lambda (testGraph) $
-        record _Lambda [
-          Field _Lambda_parameter $ wrap _Name $ string "x",
-          Field _Lambda_domain $ optional Nothing,
-          Field _Lambda_body $ string "notATerm"])
-
-metadataIsPreserved :: H.SpecWith ()
-metadataIsPreserved = do
-  H.describe "Check that metadata is preserved through a type-encoding round trip" $ do
-
-    H.it "Basic metadata" $ do
-      shouldSucceedWith
-        (decodeE $ DecodeCore.type_ (testGraph) $ EncodeCore.type_ annotatedStringType)
-        annotatedStringType
-  where
-    annotatedStringType :: Type
-    annotatedStringType = TypeAnnotated $ AnnotatedType Types.string $ M.fromList [
-      (key_description, Terms.string "The string literal type"),
-      (key_type, EncodeCore.type_ $ TypeVariable _Type)]
-
-testRoundTripsFromType :: H.SpecWith ()
-testRoundTripsFromType = do
-  H.describe "Check that encoding, then decoding random types is a no-op" $ do
-
-    H.it "Try random types" $
-      QC.property $ \typ ->
-        shouldSucceedWith
-          (decodeE $ DecodeCore.type_ (testGraph) $ EncodeCore.type_ typ)
-          typ
-
-testRoundTripsFromLiteral :: H.SpecWith ()
-testRoundTripsFromLiteral = do
-  H.describe "Check that encoding, then decoding random literals is a no-op" $ do
-
-    H.it "Try random literals" $
-      QC.property $ \lit ->
-        shouldSucceedWith
-          (decodeE $ DecodeCore.literal (testGraph) $ EncodeCore.literal lit)
-          lit
-
-testRoundTripsFromLiteralType :: H.SpecWith ()
-testRoundTripsFromLiteralType = do
-  H.describe "Check that encoding, then decoding random literal types is a no-op" $ do
-
-    H.it "Try random literal types" $
-      QC.property $ \litType ->
-        shouldSucceedWith
-          (decodeE $ DecodeCore.literalType (testGraph) $ EncodeCore.literalType litType)
-          litType
-
-testRoundTripsFromName :: H.SpecWith ()
-testRoundTripsFromName = do
-  H.describe "Check that encoding, then decoding random names is a no-op" $ do
-
-    H.it "Try random names" $
-      QC.property $ \name ->
-        shouldSucceedWith
-          (decodeE $ DecodeCore.name (testGraph) $ EncodeCore.name name)
-          name
-
-testRoundTripsFromIntegerType :: H.SpecWith ()
-testRoundTripsFromIntegerType = do
-  H.describe "Check that encoding, then decoding random integer types is a no-op" $ do
-
-    H.it "Try random integer types" $
-      QC.property $ \intType ->
-        shouldSucceedWith
-          (decodeE $ DecodeCore.integerType (testGraph) $ EncodeCore.integerType intType)
-          intType
-
-testRoundTripsFromFloatType :: H.SpecWith ()
-testRoundTripsFromFloatType = do
-  H.describe "Check that encoding, then decoding random float types is a no-op" $ do
-
-    H.it "Try random float types" $
-      QC.property $ \floatType ->
-        shouldSucceedWith
-          (decodeE $ DecodeCore.floatType (testGraph) $ EncodeCore.floatType floatType)
-          floatType
-
-spec :: H.Spec
-spec = do
-  individualEncoderTestCases
-  individualDecoderTestCases
-  decodeInvalidTerms
-  metadataIsPreserved
-  testRoundTripsFromType
-  testRoundTripsFromLiteral
-  testRoundTripsFromLiteralType
-  testRoundTripsFromName
-  testRoundTripsFromIntegerType
-  testRoundTripsFromFloatType
diff --git a/src/test/haskell/Hydra/Dsl/TypesSpec.hs b/src/test/haskell/Hydra/Dsl/TypesSpec.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Dsl/TypesSpec.hs
+++ /dev/null
@@ -1,49 +0,0 @@
-module Hydra.Dsl.TypesSpec where
-
-import Hydra.Kernel
-import Hydra.Dsl.Types
-
-import qualified Test.Hspec as H
-
-
-check :: Type -> Type -> H.Expectation
-check = H.shouldBe
-
-checkFunctionSyntax :: H.SpecWith ()
-checkFunctionSyntax = do
-  H.describe "Check function syntax" $ do
-
-    H.it "Function arrows are supported" $ do
-      check
-        ("a" ~> "b")
-        (function (variable "a") (variable "b"))
-      check
-        (string ~> int32)
-        (function string int32)
-
-    H.it "Function arrows are right-associative" $ do
-      check
-        ("a" ~> "b" ~> "c")
-        ("a" ~> ("b" ~> "c"))
-
-    H.it "Functions bind less tightly than application" $ do
-      check
-        ("a" @@ "b" ~> "c" @@ "d")
-        (("a" @@ "b") ~> ("c" @@ "d"))
-
-checkHelperFunctions :: H.SpecWith ()
-checkHelperFunctions = do
-  H.describe "Check helper functions" $ do
-
-    H.it "Check n-ary functions" $ do
-      check
-        (functionMany [variable "a", variable "b"])
-        (function (variable "a") (variable "b"))
-      check
-        (functionMany [int32, string, boolean])
-        (function int32 $ function string boolean)
-
-spec :: H.Spec
-spec = do
-  checkFunctionSyntax
-  checkHelperFunctions
diff --git a/src/test/haskell/Hydra/EvalPrimitives.hs b/src/test/haskell/Hydra/EvalPrimitives.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/EvalPrimitives.hs
+++ /dev/null
@@ -1,335 +0,0 @@
--- | Eval-mode primitive adapters. Wraps the generated eval library functions
---   (from Hydra.Eval.Lib.*) into Primitive values for the test infrastructure.
---   The generated code is the source of truth; this module only adapts calling conventions.
-
-module Hydra.EvalPrimitives (
-  evalLibraries,
-) where
-
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import Hydra.Dsl.Prims as Prims
-
-import qualified Hydra.Eval.Lib.Eithers as EvalEithers
-import qualified Hydra.Eval.Lib.Equality as EvalEquality
-import qualified Hydra.Eval.Lib.Lists as EvalLists
-import qualified Hydra.Eval.Lib.Logic as EvalLogic
-import qualified Hydra.Eval.Lib.Maps as EvalMaps
-import qualified Hydra.Eval.Lib.Math as EvalMath
-import qualified Hydra.Eval.Lib.Maybes as EvalMaybes
-import qualified Hydra.Eval.Lib.Pairs as EvalPairs
-import qualified Hydra.Eval.Lib.Sets as EvalSets
-
-
--- | All eval-mode libraries, to be used as replacements for standard libraries in test mode.
-evalLibraries :: [Library]
-evalLibraries = [
-  evalLibEithers,
-  evalLibEquality,
-  evalLibLists,
-  evalLibLogic,
-  evalLibMaps,
-  evalLibMath,
-  evalLibMaybes,
-  evalLibPairs,
-  evalLibSets]
-
--- Helpers
-
-mkPrim :: Name -> Int -> (Context -> Graph -> [Term] -> Either Error Term) -> Primitive
-mkPrim name arity impl = Primitive {
-  primitiveName = name,
-  primitiveTypeScheme = dummyType arity,
-  primitiveImplementation = impl}
-
-dummyType :: Int -> TypeScheme
-dummyType 0 = TypeScheme [] (TypeVariable (Name "a")) Nothing
-dummyType n = TypeScheme [] (go n) Nothing
-  where
-    go 1 = funType (TypeVariable (Name "a")) (TypeVariable (Name "b"))
-    go k = funType (TypeVariable (Name "a")) (go (k - 1))
-
-funType :: Type -> Type -> Type
-funType a b = TypeFunction (FunctionType a b)
-
--- | Coerce polymorphic error type to Error for generated eval primitives
---   whose type parameters are universally quantified (they always return Right).
-coerceError :: Either e Term -> Either Error Term
-coerceError (Right t) = Right t
-coerceError (Left _) = error "coerceError: impossible Left from always-Right eval primitive"
-
--- | Bridge: convert InContext Error to Error (temporary until gen-main is regenerated)
-dropCtx :: Either (InContext Error) Term -> Either Error Term
-dropCtx (Left ic) = Left (inContextObject ic)
-dropCtx (Right t) = Right t
-
--- ---- Eithers ----
-
-evalLibEithers :: Library
-evalLibEithers = standardLibrary _hydra_lib_eithers [
-  mkPrim _eithers_bimap 3 $ \cx g args -> case args of
-    [lf, rf, t] -> EvalEithers.bimap cx g lf rf t
-    _ -> unexpected cx "eithers.bimap" 3,
-  mkPrim _eithers_bind 2 $ \cx g args -> case args of
-    [t, f] -> EvalEithers.bind cx g t f
-    _ -> unexpected cx "eithers.bind" 2,
-  mkPrim _eithers_either 3 $ \cx g args -> case args of
-    [lf, rf, t] -> EvalEithers.either cx g lf rf t
-    _ -> unexpected cx "eithers.either" 3,
-  mkPrim _eithers_foldl 3 $ \cx g args -> case args of
-    [f, init_, lt] -> EvalEithers.foldl cx g f init_ lt
-    _ -> unexpected cx "eithers.foldl" 3,
-  mkPrim _eithers_fromLeft 2 $ \cx g args -> case args of
-    [def, t] -> EvalEithers.fromLeft cx g def t
-    _ -> unexpected cx "eithers.fromLeft" 2,
-  mkPrim _eithers_fromRight 2 $ \cx g args -> case args of
-    [def, t] -> EvalEithers.fromRight cx g def t
-    _ -> unexpected cx "eithers.fromRight" 2,
-  mkPrim _eithers_isLeft 1 $ \cx g args -> case args of
-    [t] -> EvalEithers.isLeft cx g t
-    _ -> unexpected cx "eithers.isLeft" 1,
-  mkPrim _eithers_isRight 1 $ \cx g args -> case args of
-    [t] -> EvalEithers.isRight cx g t
-    _ -> unexpected cx "eithers.isRight" 1,
-  mkPrim _eithers_lefts 1 $ \cx g args -> case args of
-    [t] -> EvalEithers.lefts cx g t
-    _ -> unexpected cx "eithers.lefts" 1,
-  mkPrim _eithers_map 2 $ \cx g args -> case args of
-    [f, t] -> EvalEithers.map cx g f t
-    _ -> unexpected cx "eithers.map" 2,
-  mkPrim _eithers_mapList 2 $ \cx g args -> case args of
-    [f, lt] -> EvalEithers.mapList cx g f lt
-    _ -> unexpected cx "eithers.mapList" 2,
-  mkPrim _eithers_mapMaybe 2 $ \cx g args -> case args of
-    [f, mt] -> EvalEithers.mapMaybe cx g f mt
-    _ -> unexpected cx "eithers.mapMaybe" 2,
-  mkPrim _eithers_mapSet 2 $ \cx g args -> case args of
-    [f, st] -> EvalEithers.mapSet cx g f st
-    _ -> unexpected cx "eithers.mapSet" 2,
-  mkPrim _eithers_partitionEithers 1 $ \cx g args -> case args of
-    [t] -> fmap (\(ls, rs) -> TermPair (TermList ls, TermList rs)) (EvalEithers.partitionEithers cx g t)
-    _ -> unexpected cx "eithers.partitionEithers" 1,
-  mkPrim _eithers_rights 1 $ \cx g args -> case args of
-    [t] -> EvalEithers.rights cx g t
-    _ -> unexpected cx "eithers.rights" 1]
-
--- ---- Equality ----
-
-evalLibEquality :: Library
-evalLibEquality = standardLibrary _hydra_lib_equality [
-  mkPrim _equality_identity 1 $ \cx g args -> case args of
-    [x] -> coerceError $ EvalEquality.identity cx g x
-    _ -> unexpected cx "equality.identity" 1,
-  mkPrim _equality_max 2 $ \cx g args -> case args of
-    [x, y] -> coerceError $ EvalEquality.max cx g x y
-    _ -> unexpected cx "equality.max" 2,
-  mkPrim _equality_min 2 $ \cx g args -> case args of
-    [x, y] -> coerceError $ EvalEquality.min cx g x y
-    _ -> unexpected cx "equality.min" 2]
-
--- ---- Lists ----
-
-evalLibLists :: Library
-evalLibLists = standardLibrary _hydra_lib_lists [
-  mkPrim _lists_apply 2 $ \cx g args -> case args of
-    [ft, xt] -> EvalLists.apply cx g ft xt
-    _ -> unexpected cx "lists.apply" 2,
-  mkPrim _lists_bind 2 $ \cx g args -> case args of
-    [lt, f] -> EvalLists.bind cx g lt f
-    _ -> unexpected cx "lists.bind" 2,
-  mkPrim _lists_concat2 2 $ \cx g args -> case args of
-    [l1, l2] -> coerceError $ EvalLists.concat2 cx g l1 l2
-    _ -> unexpected cx "lists.concat2" 2,
-  mkPrim _lists_dropWhile 2 $ \cx g args -> case args of
-    [p, lt] -> coerceError $ EvalLists.dropWhile cx g p lt
-    _ -> unexpected cx "lists.dropWhile" 2,
-  mkPrim _lists_elem 2 $ \cx g args -> case args of
-    [x, lt] -> coerceError $ EvalLists.elem cx g x lt
-    _ -> unexpected cx "lists.elem" 2,
-  mkPrim _lists_filter 2 $ \cx g args -> case args of
-    [p, lt] -> EvalLists.filter cx g p lt
-    _ -> unexpected cx "lists.filter" 2,
-  mkPrim _lists_find 2 $ \cx g args -> case args of
-    [p, lt] -> coerceError $ EvalLists.find cx g p lt
-    _ -> unexpected cx "lists.find" 2,
-  mkPrim _lists_foldl 3 $ \cx g args -> case args of
-    [f, init_, lt] -> EvalLists.foldl cx g f init_ lt
-    _ -> unexpected cx "lists.foldl" 3,
-  mkPrim _lists_foldr 3 $ \cx g args -> case args of
-    [f, init_, lt] -> EvalLists.foldr cx g f init_ lt
-    _ -> unexpected cx "lists.foldr" 3,
-  mkPrim _lists_group 1 $ \cx g args -> case args of
-    [lt] -> EvalLists.group cx g lt
-    _ -> unexpected cx "lists.group" 1,
-  mkPrim _lists_intercalate 2 $ \cx g args -> case args of
-    [sep, xss] -> coerceError $ EvalLists.intercalate cx g sep xss
-    _ -> unexpected cx "lists.intercalate" 2,
-  mkPrim _lists_intersperse 2 $ \cx g args -> case args of
-    [sep, lt] -> EvalLists.intersperse cx g sep lt
-    _ -> unexpected cx "lists.intersperse" 2,
-  mkPrim _lists_map 2 $ \cx g args -> case args of
-    [f, lt] -> EvalLists.map cx g f lt
-    _ -> unexpected cx "lists.map" 2,
-  mkPrim _lists_maybeHead 1 $ \cx g args -> case args of
-    [lt] -> EvalLists.maybeHead cx g lt
-    _ -> unexpected cx "lists.maybeHead" 1,
-  mkPrim _lists_nub 1 $ \cx g args -> case args of
-    [lt] -> EvalLists.nub cx g lt
-    _ -> unexpected cx "lists.nub" 1,
-  mkPrim _lists_partition 2 $ \cx g args -> case args of
-    [p, lt] -> EvalLists.partition cx g p lt
-    _ -> unexpected cx "lists.partition" 2,
-  mkPrim _lists_pure 1 $ \cx g args -> case args of
-    [x] -> coerceError $ EvalLists.pure cx g x
-    _ -> unexpected cx "lists.pure" 1,
-  mkPrim _lists_replicate 2 $ \cx g args -> case args of
-    [n, x] -> coerceError $ EvalLists.replicate cx g n x
-    _ -> unexpected cx "lists.replicate" 2,
-  mkPrim _lists_singleton 1 $ \cx g args -> case args of
-    [x] -> coerceError $ EvalLists.singleton cx g x
-    _ -> unexpected cx "lists.singleton" 1,
-  mkPrim _lists_sort 1 $ \cx g args -> case args of
-    [lt] -> coerceError $ EvalLists.sort cx g lt
-    _ -> unexpected cx "lists.sort" 1,
-  mkPrim _lists_sortOn 2 $ \cx g args -> case args of
-    [proj, lt] -> EvalLists.sortOn cx g proj lt
-    _ -> unexpected cx "lists.sortOn" 2,
-  mkPrim _lists_span 2 $ \cx g args -> case args of
-    [p, lt] -> EvalLists.span cx g p lt
-    _ -> unexpected cx "lists.span" 2,
-  mkPrim _lists_zipWith 3 $ \cx g args -> case args of
-    [f, lt1, lt2] -> EvalLists.zipWith cx g f lt1 lt2
-    _ -> unexpected cx "lists.zipWith" 3]
-
--- ---- Logic ----
-
-evalLibLogic :: Library
-evalLibLogic = standardLibrary _hydra_lib_logic [
-  mkPrim _logic_and 2 $ \cx g args -> case args of
-    [a, b] -> coerceError $ EvalLogic.and cx g a b
-    _ -> unexpected cx "logic.and" 2,
-  mkPrim _logic_not 1 $ \cx g args -> case args of
-    [a] -> coerceError $ EvalLogic.not cx g a
-    _ -> unexpected cx "logic.not" 1,
-  mkPrim _logic_or 2 $ \cx g args -> case args of
-    [a, b] -> coerceError $ EvalLogic.or cx g a b
-    _ -> unexpected cx "logic.or" 2]
-
--- ---- Maps ----
-
-evalLibMaps :: Library
-evalLibMaps = standardLibrary _hydra_lib_maps [
-  mkPrim _maps_alter 3 $ \cx g args -> case args of
-    [f, k, mt] -> EvalMaps.alter cx g f k mt
-    _ -> unexpected cx "maps.alter" 3,
-  mkPrim _maps_bimap 3 $ \cx g args -> case args of
-    [kf, vf, mt] -> EvalMaps.bimap cx g kf vf mt
-    _ -> unexpected cx "maps.bimap" 3,
-  mkPrim _maps_filter 2 $ \cx g args -> case args of
-    [p, mt] -> EvalMaps.filter cx g p mt
-    _ -> unexpected cx "maps.filter" 2,
-  mkPrim _maps_filterWithKey 2 $ \cx g args -> case args of
-    [p, mt] -> EvalMaps.filterWithKey cx g p mt
-    _ -> unexpected cx "maps.filterWithKey" 2,
-  mkPrim _maps_findWithDefault 3 $ \cx g args -> case args of
-    [def, k, mt] -> coerceError $ EvalMaps.findWithDefault cx g def k mt
-    _ -> unexpected cx "maps.findWithDefault" 3,
-  mkPrim _maps_map 2 $ \cx g args -> case args of
-    [vf, mt] -> EvalMaps.map cx g vf mt
-    _ -> unexpected cx "maps.map" 2,
-  mkPrim _maps_mapKeys 2 $ \cx g args -> case args of
-    [kf, mt] -> EvalMaps.mapKeys cx g kf mt
-    _ -> unexpected cx "maps.mapKeys" 2]
-
--- ---- Math ----
-
-evalLibMath :: Library
-evalLibMath = standardLibrary _hydra_lib_math [
-  mkPrim _math_even 1 $ \cx g args -> case args of
-    [x] -> coerceError $ EvalMath.even cx g x
-    _ -> unexpected cx "math.even" 1,
-  mkPrim _math_odd 1 $ \cx g args -> case args of
-    [x] -> coerceError $ EvalMath.odd cx g x
-    _ -> unexpected cx "math.odd" 1]
-
--- ---- Maybes ----
-
-evalLibMaybes :: Library
-evalLibMaybes = standardLibrary _hydra_lib_maybes [
-  mkPrim _maybes_apply 2 $ \cx g args -> case args of
-    [ft, xt] -> EvalMaybes.apply cx g ft xt
-    _ -> unexpected cx "maybes.apply" 2,
-  mkPrim _maybes_bind 2 $ \cx g args -> case args of
-    [t, f] -> EvalMaybes.bind cx g t f
-    _ -> unexpected cx "maybes.bind" 2,
-  mkPrim _maybes_cases 3 $ \cx g args -> case args of
-    [t, def, f] -> EvalMaybes.cases cx g t def f
-    _ -> unexpected cx "maybes.cases" 3,
-  mkPrim _maybes_cat 1 $ \cx g args -> case args of
-    [t] -> fmap TermList (EvalMaybes.cat cx g t)
-    _ -> unexpected cx "maybes.cat" 1,
-  mkPrim _maybes_compose 3 $ \cx g args -> case args of
-    [f, g_, x] -> coerceError $ EvalMaybes.compose cx g f g_ x
-    _ -> unexpected cx "maybes.compose" 3,
-  mkPrim _maybes_fromMaybe 2 $ \cx g args -> case args of
-    [def, t] -> EvalMaybes.fromMaybe cx g def t
-    _ -> unexpected cx "maybes.fromMaybe" 2,
-  mkPrim _maybes_isJust 1 $ \cx g args -> case args of
-    [t] -> EvalMaybes.isJust cx g t
-    _ -> unexpected cx "maybes.isJust" 1,
-  mkPrim _maybes_isNothing 1 $ \cx g args -> case args of
-    [t] -> EvalMaybes.isNothing cx g t
-    _ -> unexpected cx "maybes.isNothing" 1,
-  mkPrim _maybes_map 2 $ \cx g args -> case args of
-    [f, t] -> EvalMaybes.map cx g f t
-    _ -> unexpected cx "maybes.map" 2,
-  mkPrim _maybes_mapMaybe 2 $ \cx g args -> case args of
-    [f, t] -> EvalMaybes.mapMaybe cx g f t
-    _ -> unexpected cx "maybes.mapMaybe" 2,
-  mkPrim _maybes_maybe 3 $ \cx g args -> case args of
-    [def, f, t] -> EvalMaybes.maybe cx g def f t
-    _ -> unexpected cx "maybes.maybe" 3,
-  mkPrim _maybes_pure 1 $ \cx g args -> case args of
-    [x] -> coerceError $ EvalMaybes.pure cx g x
-    _ -> unexpected cx "maybes.pure" 1,
-  mkPrim _maybes_toList 1 $ \cx g args -> case args of
-    [t] -> EvalMaybes.toList cx g t
-    _ -> unexpected cx "maybes.toList" 1]
-
--- ---- Pairs ----
-
-evalLibPairs :: Library
-evalLibPairs = standardLibrary _hydra_lib_pairs [
-  mkPrim _pairs_bimap 3 $ \cx g args -> case args of
-    [ff, sf, p] -> EvalPairs.bimap cx g ff sf p
-    _ -> unexpected cx "pairs.bimap" 3,
-  mkPrim _pairs_first 1 $ \cx g args -> case args of
-    [p] -> EvalPairs.first cx g p
-    _ -> unexpected cx "pairs.first" 1,
-  mkPrim _pairs_second 1 $ \cx g args -> case args of
-    [p] -> EvalPairs.second cx g p
-    _ -> unexpected cx "pairs.second" 1]
-
--- ---- Sets ----
-
-evalLibSets :: Library
-evalLibSets = standardLibrary _hydra_lib_sets [
-  mkPrim _sets_difference 2 $ \cx g args -> case args of
-    [s1, s2] -> EvalSets.difference cx g s1 s2
-    _ -> unexpected cx "sets.difference" 2,
-  mkPrim _sets_intersection 2 $ \cx g args -> case args of
-    [s1, s2] -> EvalSets.intersection cx g s1 s2
-    _ -> unexpected cx "sets.intersection" 2,
-  mkPrim _sets_map 2 $ \cx g args -> case args of
-    [f, st] -> EvalSets.map cx g f st
-    _ -> unexpected cx "sets.map" 2,
-  mkPrim _sets_union 2 $ \cx g args -> case args of
-    [s1, s2] -> EvalSets.union cx g s1 s2
-    _ -> unexpected cx "sets.union" 2,
-  mkPrim _sets_unions 1 $ \cx g args -> case args of
-    [lt] -> EvalSets.unions cx g lt
-    _ -> unexpected cx "sets.unions" 1]
-
--- | Error helper for wrong argument count
-unexpected :: Context -> String -> Int -> Either Error Term
-unexpected _cx name arity = Left $ ErrorOther (OtherError (name ++ ": expected " ++ show arity ++ " args"))
diff --git a/src/test/haskell/Hydra/Reference/AlgorithmW.hs b/src/test/haskell/Hydra/Reference/AlgorithmW.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Reference/AlgorithmW.hs
+++ /dev/null
@@ -1,683 +0,0 @@
-{-# LANGUAGE TypeSynonymInstances #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE OverlappingInstances #-}
-
--- Implementation of Hindley Milner algorithm W to system F translation by Ryan Wisnesky.
--- Lightweight adaptation to Hydra by Joshua Shinavier.
--- License: Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0 
-
-{-
-  Usage:
-    testOne test1
-    testOne test2
-    etc.
--}
-module Hydra.Reference.AlgorithmW where
-
-import Prelude
-import Control.Monad.Except
-import Control.Monad.State
-import Data.List (nub)
-import Debug.Trace
-
-import Hydra.Minimal
-
-natType = TyLit $ LiteralTypeInteger IntegerTypeInt32
-constNeg = Const $ PrimTyped $ TypedPrimitive (Name "hydra.lib.math.negate") $ Forall [] $ TyFn natType natType
--- Note: Hydra has no built-in pred or succ functions, but neg has the expected type
-constPred = constNeg
-constSucc = constNeg
-nat = Const . PrimLiteral . int32
-str = Const . PrimLiteral . string
-
--- A typed primitive corresponds to the Hydra primitive of the same name
-data TypedPrimitive = TypedPrimitive Name TypSch deriving (Eq, Show)
-
-------------------------
--- STLC
-
-type Var = String
-
-data Prim
- = PrimLiteral Literal
- | PrimTyped TypedPrimitive
- | Succ | Pred | If0
- | Fst | Snd | Pair | TT
- | Nil | Cons | FoldList  
- | FF | Inl | Inr | Case 
- deriving (Eq, Show)
- 
-showPrim :: Prim -> String
-showPrim (PrimLiteral l) = case l of
-  LiteralBoolean b -> show b
-  LiteralFloat fv -> case fv of
-    FloatValueBigfloat f -> show f
-    FloatValueFloat32 f -> show f
-    _ -> show fv
-  LiteralInteger iv -> case iv of
-    IntegerValueInt32 i -> show i
-    _ -> show iv
-  LiteralString s -> show s
-  _ -> show l
-showPrim (PrimTyped (TypedPrimitive name _)) = unName name ++ "()"
-showPrim Succ = "S"
-showPrim Pred = "P"
-showPrim FoldList = "fold"
-showPrim Fst = "fst"
-showPrim Snd = "snd"
-showPrim Nil = "nil"
-showPrim Cons = "cons"
-showPrim TT = "tt"
-showPrim FF = "ff"
-showPrim Inl = "inl"
-showPrim Inr = "inr"
-showPrim Case = "case"
-showPrim If0 = "if0"
-showPrim Pair = "pair"
-
-data Expr = Const Prim
- | Var Var
- | App Expr Expr
- | Abs Var Expr
- | Letrec [(Var, Expr)] Expr
- deriving (Eq, Show)
-
-showExpr :: Expr -> String
-showExpr (Const p) = showPrim p
-showExpr (Var v) = v
-showExpr (App (App (App a' a) b) b') = "(" ++ showExpr a' ++ " " ++ showExpr a ++ " " ++ showExpr b ++ " " ++ showExpr b' ++ ")"
-showExpr (App (App a b) b') = "(" ++ showExpr a ++ " " ++ showExpr b ++ " " ++ showExpr b' ++ ")"
-showExpr (App a b) = "(" ++ showExpr a ++ " " ++ showExpr b ++ ")"
-showExpr (Abs a b) = "(\\" ++ a ++ ". " ++ showExpr b ++ ")"
-showExpr (Letrec ab c) = "let " ++ d ++ showExpr c
-  where d = foldr (\(p, q) r -> p ++ " = " ++ showExpr q ++ " \n\t\t" ++ r) "in " ab
-
-data MTy = TyVar Var
-  | TyLit LiteralType
-  | TyList MTy
-  | TyFn MTy MTy
-  | TyProd MTy MTy
-  | TySum MTy MTy
-  | TyEither MTy MTy
-  | TyUnit
-  | TyVoid
- deriving (Eq, Show)
- 
-showMTy :: MTy -> String
-showMTy (TyLit lt) = case lt of
-  LiteralTypeInteger it -> drop (length "IntegerType") $ show it
-  LiteralTypeFloat ft -> drop (length "FloatType") $ show ft
-  _ -> drop (length "LiteralType") $ show lt
-showMTy (TyVar v) = v
-showMTy (TyList t) = "(List " ++ (showMTy t) ++ ")"
-showMTy (TyFn t1 t2) = "(" ++ showMTy t1 ++ " -> " ++ showMTy t2 ++ ")"
-showMTy (TyProd t1 t2) = "(" ++ showMTy t1 ++ " * " ++ showMTy t2 ++  ")"
-showMTy (TySum t1 t2) = "(" ++ showMTy t1 ++ " + " ++ showMTy t2 ++  ")"
-showMTy (TyEither t1 t2) = "(Either " ++ showMTy t1 ++ " " ++ showMTy t2 ++  ")"
-showMTy TyUnit = "Unit"
-showMTy TyVoid = "Void"
-  
-instance Show TypSch where
-  show (Forall [] t) = show t
-  show (Forall x t) = "forall " ++ d ++ show t
-   where d = foldr (\p q -> p ++ " " ++ q) ", " x
-  
-data TypSch = Forall [Var] MTy
- deriving Eq 
-
-------------------------
--- System F
-
-data FExpr = FConst Prim
- | FVar Var
- | FApp FExpr FExpr
- | FAbs Var FTy FExpr
- | FTyApp FExpr [FTy]
- | FTyAbs [Var] FExpr 
- | FLetrec [(Var, FTy, FExpr)] FExpr
- deriving (Eq, Show)
-
-showFExpr :: FExpr -> String
-showFExpr (FConst p) = showPrim p
-showFExpr (FVar v) = v
-showFExpr (FTyApp e t) = "(" ++ showFExpr e ++ " " ++ show (showFTy <$> t) ++ ")"
-showFExpr (FApp (FApp (FApp a' a) b) b') = "(" ++ showFExpr a' ++ " " ++ showFExpr a ++ " " ++ showFExpr b ++ " " ++ showFExpr b' ++ ")"
-showFExpr (FApp (FApp a b) b') = "(" ++ showFExpr a ++ " " ++ showFExpr b ++ " " ++ showFExpr b' ++ ")"
-showFExpr (FApp a b) = "(" ++ showFExpr a ++ " " ++ showFExpr b ++ ")"
-showFExpr (FAbs a t b) = "(\\" ++ a ++ ":" ++ showFTy t ++ ". " ++ showFExpr b ++ ")"
-showFExpr (FLetrec ab c) = "let " ++ d ++ showFExpr c
-  where d = foldr (\(p, t, q) r -> p ++ ":" ++ showFTy t ++ " = " ++ showFExpr q ++ " \n\t\t" ++ r) "in " ab
-showFExpr (FTyAbs ab c) = "(/\\" ++ d ++ showFExpr c ++ ")"
-  where d = foldr (\p r -> p ++ " " ++ r) ". " ab
-
-data FTy = FTyVar Var
-  | FTyLit LiteralType
-  | FTyList FTy
-  | FTyFn FTy FTy
-  | FTyProd FTy FTy
-  | FTySum FTy FTy
-  | FTyEither FTy FTy
-  | FTyUnit
-  | FTyVoid
-  | FForall [Var] FTy
- deriving (Eq, Show)
- 
-showFTy :: FTy -> String
-showFTy (FTyLit lt) = showMTy $ TyLit lt
-showFTy (FTyVar v) = v
-showFTy (FTyList t) = "(List " ++ (showFTy t) ++ ")"
-showFTy (FTyFn t1 t2) = "(" ++ showFTy t1 ++ " -> " ++ showFTy t2 ++ ")"
-showFTy (FTyProd t1 t2) = "(" ++ showFTy t1 ++ " * " ++ showFTy t2 ++  ")"
-showFTy (FTySum t1 t2) = "(" ++ showFTy t1 ++ " + " ++ showFTy t2 ++  ")"
-showFTy (FTyEither t1 t2) = "(Either " ++ showFTy t1 ++ " " ++ showFTy t2 ++  ")"
-showFTy FTyUnit = "Unit"
-showFTy FTyVoid = "Void"
-showFTy (FForall x t) = "(forall " ++ d ++ showFTy t ++ ")"
- where d = foldr (\p q -> p ++ " " ++ q) ", " x
-
-mTyToFTy :: MTy -> FTy
-mTyToFTy (TyVar v) = FTyVar v
-mTyToFTy (TyLit lt) = FTyLit lt
-mTyToFTy TyUnit = FTyUnit
-mTyToFTy TyVoid = FTyVoid
-mTyToFTy (TyList x) = FTyList $ mTyToFTy x
-mTyToFTy (TyFn x y) = FTyFn (mTyToFTy x) (mTyToFTy y)
-mTyToFTy (TyProd x y) = FTyProd (mTyToFTy x) (mTyToFTy y)
-mTyToFTy (TySum x y) = FTySum (mTyToFTy x) (mTyToFTy y)
-mTyToFTy (TyEither x y) = FTyEither (mTyToFTy x) (mTyToFTy y)
-
-tyToFTy :: TypSch -> FTy 
-tyToFTy (Forall [] t) = mTyToFTy t
-tyToFTy (Forall vs t) = FForall vs (mTyToFTy t)
-
---------------------
--- Contexts 
-
-type Ctx  = [(Var, TypSch)]
-type FCtx = [(Var, FTy)]
-
-instance Show Ctx
- where show [] = ""
-       show ((v,t):[]) = v ++ ":" ++ show t ++ "  "
-       show ((v,t):x ) = v ++ ":" ++ show t ++ " " ++ show x
-
-instance Show FCtx
- where show [] = ""
-       show ((v,t):[]) = v ++ ":" ++ show t
-       show ((v,t):x ) = v ++ ":" ++ show t ++ " " ++ show x
-
-class Vars a where
-  vars :: a -> [Var]
-
-instance Vars Ctx where
- vars [] = []
- vars ((v,t):l) = vars t ++ vars l
-
-instance Vars TypSch where
- vars (Forall vs t) = filter (\v -> not $ elem v vs) (vars t) 
-
-instance Vars MTy where
- vars (TyVar v) = [v] 
- vars (TyList t) = vars t 
- vars (TyFn t1 t2) = vars t1 ++ vars t2
- vars TyUnit = []
- vars TyVoid = []
- vars (TyProd t1 t2) = vars t1 ++ vars t2
- vars (TySum t1 t2) = vars t1 ++ vars t2
- vars (TyEither t1 t2) = vars t1 ++ vars t2
- vars (TyLit _) = []
-
-primTy :: Prim -> TypSch
-primTy (PrimLiteral l) = Forall [] $ TyLit $ literalType l
-primTy (PrimTyped (TypedPrimitive _ forAll)) = forAll
-primTy Fst = Forall ["x", "y"] $ (TyProd (TyVar "x") (TyVar "y")) `TyFn` (TyVar "x")
-primTy Snd = Forall ["x", "y"] $ (TyProd (TyVar "x") (TyVar "y")) `TyFn` (TyVar "y")
-primTy Nil = Forall ["t"] $ TyList (TyVar "t")
-primTy Cons = Forall ["t"] $ TyFn (TyVar "t") (TyFn (TyList (TyVar "t")) (TyList (TyVar "t")))
-primTy TT = Forall [] TyUnit
-primTy FF = Forall ["t"] $ TyFn TyVoid (TyVar "t")
-primTy Inl = Forall ["x", "y"] $ (TyVar "x") `TyFn` (TyEither (TyVar "x") (TyVar "y"))
-primTy Inr = Forall ["x", "y"] $ (TyVar "y") `TyFn` (TyEither (TyVar "x") (TyVar "y"))
-primTy Succ = Forall [] $ natType `TyFn` natType
-primTy Pred = Forall [] $ natType `TyFn` natType
-primTy Pair = Forall ["x", "y"] $ (TyFn (TyVar "x") (TyFn (TyVar "y") (TyProd (TyVar "x") (TyVar "y"))))
-primTy If0 = Forall [] $ natType `TyFn` (natType `TyFn` (natType `TyFn` natType))
-primTy FoldList = Forall ["a", "b"] $ p `TyFn` ((TyVar "b") `TyFn` ((TyList $ TyVar "a") `TyFn` (TyVar "b")))
- where p = TyVar "b" `TyFn` (TyVar "a" `TyFn` TyVar "b")
-primTy Case = Forall ["x", "y", "z"] $ (TySum (TyVar "x") (TyVar "y")) `TyFn` (l `TyFn` (r `TyFn` (TyVar "z"))) 
- where l = (TyVar "x") `TyFn` (TyVar "z")
-       r = (TyVar "y") `TyFn` (TyVar "z")
-  
-ctxToFCtx :: Ctx -> [(Var, FTy)]
-ctxToFCtx [] = []
-ctxToFCtx ((k,v):b) = (k, (tyToFTy v)) : ctxToFCtx b
-
------------------------------
--- Substitution
-
-type Subst = [(Var, MTy)]
-
-idSubst :: Subst 
-idSubst = []
-
-o :: Subst -> Subst -> Subst
-o f g = addExtra ++ map h g
- where h (v, g') = (v, subst f g')
-       addExtra = filter (\(v,f')-> case lookup v g of 
-                                      Just y  -> False 
-                                      Nothing -> True) f
-       
-class Substable a where
-  subst :: Subst -> a -> a
-  
-instance Substable MTy where
- subst f (TyLit lt) = TyLit lt
- subst f TyUnit = TyUnit
- subst f TyVoid = TyVoid
- subst f (TyList t) = TyList $ subst f t
- subst f (TyFn t1 t2) = TyFn (subst f t1) (subst f t2)
- subst f (TyProd t1 t2) = TyProd  (subst f t1) (subst f t2)
- subst f (TySum t1 t2) = TySum  (subst f t1) (subst f t2)
- subst f (TyEither t1 t2) = TyEither  (subst f t1) (subst f t2)
- subst f (TyVar v) = case lookup v f of
-                      Nothing -> TyVar v
-                      Just y -> y
-                      
-instance Substable FTy where
- subst f (FTyLit lt) = FTyLit lt
- subst f FTyUnit = FTyUnit
- subst f FTyVoid = FTyVoid
- subst f (FTyList t) = FTyList $ subst f t
- subst f (FTyFn t1 t2) = FTyFn (subst f t1) (subst f t2)
- subst f (FTyProd t1 t2) = FTyProd  (subst f t1) (subst f t2)
- subst f (FTySum t1 t2) = FTySum  (subst f t1) (subst f t2)
- subst f (FTyEither t1 t2) = FTyEither  (subst f t1) (subst f t2)
- subst f (FTyVar v) = case lookup v f of
-                        Nothing -> FTyVar v
-                        Just y -> mTyToFTy y
- subst f (FForall vs t) = FForall vs $ subst phi' t
-  where phi' = filter (\(v,f')-> not (elem v vs)) f
-
-instance Substable TypSch where
- subst f (Forall vs t) = Forall vs $ subst f' t 
-   where f' = filter (\(v,t')-> not $ elem v vs) f
-
-instance Substable Ctx where
- subst phi g = map (\(k,v)->(k, subst phi v)) g
-
-instance Substable FExpr where 
- subst phi (FConst p) = FConst p
- subst phi (FVar p) = FVar p
- subst phi (FApp p q) = FApp (subst phi p) (subst phi q)
- subst phi (FAbs p t q) = FAbs p (subst phi t) (subst phi q)
- subst phi (FTyApp p q) = FTyApp (subst phi p) (map (subst phi) q) 
- subst phi (FTyAbs vs p) = FTyAbs vs (subst phi' p)
-  where phi' = filter (\(v,f')-> not (elem v vs)) phi
- subst phi (FLetrec vs p) = FLetrec (map (\(k,t,v)->(k,subst phi t, subst phi v)) vs) (subst phi p)
-
-subst' :: [(Var,FTy)] -> FTy -> FTy
-subst' f (FTyLit lt) = FTyLit lt
-subst' f FTyUnit = FTyUnit
-subst' f FTyVoid = FTyVoid
-subst' f (FTyList t) = FTyList $ subst' f t
-subst' f (FTyFn t1 t2) = FTyFn (subst' f t1) (subst' f t2)
-subst' f (FTyProd t1 t2) = FTyProd  (subst' f t1) (subst' f t2)
-subst' f (FTySum t1 t2) = FTySum  (subst' f t1) (subst' f t2)
-subst' f (FTyEither t1 t2) = FTyEither  (subst' f t1) (subst' f t2)
-subst' f (FTyVar v) = case lookup v f of
-                        Nothing -> FTyVar v
-                        Just y -> y
-subst' f (FForall vs t) = FForall vs $ subst' f' t
- where f' = filter (\(v,f')-> not (elem v vs)) f
- 
-------------------------------------
--- Type checking for F
-
-open :: [Var] -> [FTy] -> FTy -> Either String FTy
-open vs ts e | length vs == length ts = return $ subst' (zip vs ts) e
-             | otherwise = throwError "Cannot open"
-
-
-wfTy :: [Var] -> FTy -> Either String ()
-wfTy tvs x = case x of
-                FTyLit _ -> return ()
-                FTyList y -> wfTy tvs y
-                FTyFn w v -> wfTy tvs w >> wfTy tvs v
-                FTyProd w v -> wfTy tvs w >> wfTy tvs v
-                FTySum w v -> wfTy tvs w >> wfTy tvs v
-                FTyEither w v -> wfTy tvs w >> wfTy tvs v
-                FTyUnit -> return ()
-                FTyVoid -> return ()
-                FForall vs y -> wfTy (vs++tvs) y
-                FTyVar v -> if elem v tvs then return () else throwError $ "unbound tyvar " ++ v ++ " in " ++ show tvs
-
-
-typeOf :: [Var] -> [(Var,FTy)] -> FExpr -> Either String FTy
-typeOf tvs g (FVar x) = case lookup x g of
-  Nothing -> throwError $ "unbound var: " ++ x ++ " in ctx " ++ show g
-  Just y -> return y
-typeOf tvs g (FConst p) = return $ tyToFTy $ primTy p
-typeOf tvs g (FApp a b) = do { t1 <- typeOf tvs g a
-                             ; t2 <- typeOf tvs g b
-                             ; wfTy tvs t1
-                             ; wfTy tvs t2
-                             ; case t1 of
-                                (FTyFn p q) -> if p == t2
-                                               then return q
-                                               else throwError $ "3In " ++ (show $ FApp a b) ++ " expected " ++ show p ++ " given " ++ show t2
-                                v -> throwError $ "4In " ++ show g ++ " |- " ++ show (FApp a b) ++ " not a fn type: " ++ show v }
-typeOf tvs g (FAbs x t e) = do { wfTy tvs t
-                               ; t1 <- typeOf tvs ((x,t):g) e
-                               ; wfTy tvs t1
-                               ; return $ t `FTyFn` t1 }
-typeOf tvs g (FTyAbs vs e) = do { t1 <- typeOf (vs++tvs) g e
-                                ; wfTy (vs++tvs) t1
-                                ; return $ FForall vs t1 }
-typeOf tvs g (FTyApp e ts) = do { t1 <- typeOf tvs g e
-                                ; wfTy tvs t1
-                                ; case t1 of
-                                    FForall vs t -> open vs ts t
-                                    v -> throwError $ "not a forall type: " ++ show v }
-typeOf tvs g (FLetrec es e) = do { let g' = map (\(k,t,e)->(k,t)) es
-                                 ; est <- mapM (\(_,_,v)->typeOf tvs (g'++g) v) es
-                                 ; mapM (wfTy tvs) est
-                                 ; mapM (wfTy tvs) $ snd $ unzip g'
-                                 ; if est == (snd $ unzip g')
-                                   then typeOf tvs (g'++g) e
-                                   else throwError $ "Disagree: " ++ show est ++ " and " ++ (show $ snd $ unzip g') }
-
-
------------------------------
--- Unification
-
-mgu :: MTy -> MTy -> E Subst
-mgu (TyLit lt1) (TyLit lt2) = if lt1 == lt2
-  then return []
-  else throwError $ "Cannot unify literal types " ++ show lt1 ++ " and " ++ show lt2
-mgu (TyList a) (TyList b) = mgu a b
-mgu TyUnit TyUnit = return []
-mgu TyVoid TyVoid = return []
-mgu (TyProd a b) (TyProd a' b') = do { s <- mgu a a' ; s' <- mgu (subst s b) (subst s b'); return $ s' `o` s }
-mgu (TySum  a b) (TySum  a' b') = do { s <- mgu a a' ; s' <- mgu (subst s b) (subst s b'); return $ s' `o` s }
-mgu (TyEither a b) (TyEither a' b') = do { s <- mgu a a' ; s' <- mgu (subst s b) (subst s b'); return $ s' `o` s }
-mgu (TyFn   a b) (TyFn   a' b') = do { s <- mgu a a' ; s' <- mgu (subst s b) (subst s b'); return $ s' `o` s }
-mgu (TyVar a) (TyVar b) | a == b = return []
-mgu (TyVar a) b = do { occurs a b; return [(a, b)] }
-mgu a (TyVar b) = mgu (TyVar b) a
-mgu a b = throwError $ "cannot unify " ++ show a ++ " with " ++ show b 
-
-mgu' :: [MTy] -> [MTy] -> E Subst
-mgu' [] [] = return idSubst
-mgu' (a:as) (b:bs) = do { f <- mgu a b; s <- mgu' (map (subst f) as) (map (subst f) bs); return $ s `o` f }
-
-occurs :: Var -> MTy -> E ()
-occurs v (TyLit _) = return ()
-occurs v (TyList l) = occurs v l
-occurs v TyUnit = return ()
-occurs v TyVoid = return ()
-occurs v (TyFn   a b) = do { occurs v a; occurs v b }
-occurs v (TyProd a b) = do { occurs v a; occurs v b }
-occurs v (TySum  a b) = do { occurs v a; occurs v b }
-occurs v (TyEither a b) = do { occurs v a; occurs v b }
-occurs v (TyVar v') | v == v' = throwError $ "occurs check failed"
-                    | otherwise = return ()
-
------------------------------
--- Algorithm W 
-
-type E = ExceptT String (State Integer)
-type M a = E (Subst, a)
-
-fresh :: E MTy
-fresh = do { s <- get; put (s + 1); return $ TyVar $ "v" ++ show s }
-
-inst :: TypSch -> E (MTy, [MTy])
-inst (Forall vs ty) = do { vs' <- mapM (\_->fresh) vs; return $ (subst (zip vs vs') ty,  vs') }
-
-gen :: Ctx -> MTy -> (TypSch, [Var])
-gen g t = (Forall vs t , vs)
- where vs = nub $ filter (\v -> not $ elem v (vars g)) (vars t)
-
-fTyApp x [] = x
-fTyApp x y = FTyApp x y
-
-fTyAbs [] x = x
-fTyAbs x y = FTyAbs x y
-
-check :: [Var] -> Ctx -> MTy -> FExpr -> M ()
-check k g t e = let ret = typeOf k (ctxToFCtx g) e
-                in case ret of
-                  Right t0 -> if t0 == mTyToFTy t
-                              then return (idSubst, ())
-                              else throwError $ "2In\n" ++ show k ++ ", " ++ show g ++
-                                 " |- " ++ show e ++ " : " ++ show t ++ "\n " ++ show t0 ++ " is computed"
-                  Left err -> throwError $ "1In\n" ++ show k ++ ", " ++ show g ++
-                                 " |- " ++ show e ++ " : " ++ show t ++ "\n" ++ err
-
-check0 :: [Var] -> Ctx -> [MTy] -> [FExpr] -> M ()
-check0 k g [] [] = return (idSubst, ())
-check0 k g (a:b) (c:d) = check k g a c >> check0 k g b d
-
-w :: Ctx -> Expr -> M (MTy, FExpr)
-w g (Const p) = do { (t,vs) <- inst $ primTy p
-                     ; let ret = (idSubst, (t, fTyApp (FConst p) $ map mTyToFTy vs))
-                     ; check (map (\(TyVar a )->a) vs) (subst (fst ret) g) (fst $ snd $ ret) (snd $ snd $ ret)
-                     ; return ret }
- where Forall vs t' = primTy p
-w g (Var x) = case lookup x g of
-                Nothing -> throwError $ "Unknown var: " ++ (show x) ++ " in ctx " ++ (show g)
-                Just s -> do { (t, vs) <- inst s
-                             ; let ret = (idSubst, (t, fTyApp (FVar x) $ map mTyToFTy vs))
-                             ; check (map (\(TyVar a )->a) vs) (subst (fst ret) g) (fst $ snd $ ret) (snd $ snd $ ret)
-                             ; return ret }
-w g (App e0 e1) = do { (s0, (t0, a)) <- w g e0
-                     ; (s1, (t1, b)) <- w (subst s0 g) e1
-                     ; t' <- fresh
-                     ; s2 <-  (subst s1 t0) `mgu` (t1 `TyFn` t')
-                     ; let ret = (s2 `o` (s1 `o` s0), (subst s2 t', FApp (subst (s2 `o` s1) a) (subst s2 b)))
-                     ; check ((vars (subst (fst ret) g)) ++ (vars (subst (fst ret) t'))) (subst (fst ret) g) (fst $ snd $ ret) (snd $ snd $ ret)
-                     ; return ret; }
-w g (Abs x e) = do { t  <- fresh
-                   ; (s, (t', a)) <- w ((x, (Forall [] t)):g) e
-                   ; let ret = (s, (TyFn (subst s t) t', FAbs x (mTyToFTy $ subst s t) a))
-                   ; check ((vars (subst s t)) ++ (vars t') ++ (vars $ subst (fst ret) ((x, (Forall [] t)):g)))
-                       (subst (fst ret) g) (fst $ snd $ ret) (snd $ snd $ ret)
-                   ; return ret; }
-w g (Letrec xe0 e1) = do { t0s <- mapM (\(k,v) -> do { f <- fresh; return (k, f) }) xe0
-                         ; let g' = map (\(k,v) -> (k, Forall [] v)) t0s ++ g
-                         ; (s0, (ts,e0Xs)) <- w' g' xe0
-                         ; s' <- mgu' (map (\(_,v) -> subst s0 v) t0s) ts
-
-                         ; let g''' = subst (s' `o` s0) g
-                               g''  = map (\(k,t) -> (k, fst $ gen {--((subst s' g') ++ --} g''' (subst s' t))) $ zip (fst $ unzip xe0) ts
-                               g''X = map (\(k,t) -> (k,       gen {--((subst s' g') ++ --} g''' (subst s' t))) $ zip (fst $ unzip xe0) ts
-                         ; (s2, (t',e1X)) <- w (g'' ++ g''') e1
-
-                         ; let mmm    = map (\((x,(ww,ww2)),e0X)->(x, (fTyApp (FVar x) $ map FTyVar ww2))) $  zip g''X e0Xs
-                         ; let e0X's  = map (\((x,(ww,ww2)),e0X)->(x,ww,ww2, subst'' mmm e0X))             $  zip g''X e0Xs
-                         ; let e0X''s = map (\( x, ww,ww2,  e  )->(x,ww,ww2,  fTyAbs ww2 e  ))                         e0X's
-
-                         ; let bs = map (\(x,ww,ww2,e0X'') -> (x, subst s2 $ tyToFTy ww, subst (s' `o` s2) e0X'')) e0X''s
-                         ; let ret = (s2 `o` s' `o` s0, (t', FLetrec bs e1X))
-                         ; check ((vars $ subst (fst ret) g') ++ (vars t')) (subst (fst ret) g) (fst $ snd $ ret) (snd $ snd $ ret)
-                         ; return ret }
-
- where w' g [] = return (idSubst, ([], []))
-       w' g  ((k,v):tl) = do { (u,(u', j)) <- w g v
-                             ; (r,(r', h)) <- w' (subst u g ) tl
-                             ; let ret = (r `o` u, ((subst r u'):r', (subst r j):h))
-                             ; --check0 (subst (fst ret) g) (fst $ snd $ ret) (snd $ snd $ ret)
-                             ; return ret }
-       
-
-
-subst'' :: [(Var, FExpr)] -> FExpr -> FExpr
-subst'' phi (FConst c) = FConst c
-subst'' phi (FVar v') = case lookup v' phi of
-                         Just y -> y
-                         Nothing -> FVar v'
-subst'' phi (FApp a b) = FApp (subst'' phi a) (subst'' phi b)
-subst'' phi (FAbs v' a b) = FAbs v' a $ subst'' phi' b 
- where phi' = filter (\(k,v) -> not (k == v')) phi 
-subst'' phi (FTyApp a ts) = FTyApp (subst'' phi a) ts
-subst'' phi (FTyAbs vs a) = FTyAbs vs $ subst'' phi a
-subst'' phi (FLetrec es e) = FLetrec (map (\(k,t,f)->(k,t,subst'' phi' f)) es) (subst'' phi' e)
- where phi' = filter (\(k,v) -> not (elem k ns)) phi
-       (ns,ts,es') = unzip3 es 
-       
-----------------------------------------
--- Main
- 
-tests = [testJ, testM, testJ, testB'', testB' , testB, test4, testC, testA, test0, test1, testB, test2, test3a, test5, test6]
--- tests = [testJ, testB'', testB' , testB]
-
-
-testOne t = do { putStrLn $ "Untyped input: "
-               ; putStrLn $ "\t" ++  showExpr t
-               ; let out = fst $ runState (runExceptT (w [] t)) 0
-               ; case out of
-                   Left  e -> putStrLn $ "\t" ++ "err: " ++ e
-                   Right (s, (ty, f)) -> do {
-                                            ; putStrLn $ "\nType inferred by Hindley-Milner: "
-                                            ; putStrLn $ "\t" ++ show ty
-                                            ; putStrLn "\nSystem F translation: "
-                                            ; putStrLn $ "\t" ++ showFExpr f
-                                            ; putStrLn "\nSystem F type: "
-                                            ; case (typeOf (vars ty) [] f) of
-                                               Left err -> putStrLn $ "\t" ++  "err: " ++ err
-                                               Right tt -> do { putStrLn $ " \t" ++ showFTy tt
-                                                              ; if tt == mTyToFTy ty then return () else putStrLn "**** !!! NO MATCH" } }
-               ; putStrLn ""
-               ; putStrLn "------------------------"
-               ; putStrLn ""  }
-
---testOne t = do { putStrLn $ "Untyped input: "
---               ; putStrLn $ "\t" ++  showExpr t
---               ; let out = fst $ runState (runExceptT (w [] t)) 0
---               ; case out of
---                   Left  e -> putStrLn $ "\t" ++ "err: " ++ e
---                   Right (s, (ty, f)) -> do {
---                                            ; putStrLn $ "\nType inferred by Hindley-Milner: "
---                                            ; putStrLn $ "\t" ++ showMTy ty
---                                            ; putStrLn "\nSystem F translation: "
---                                            ; putStrLn $ "\t" ++ showFExpr f
---                                            ; putStrLn "\nSystem F type: "
---                                            ; case (typeOf (vars ty) [] f) of
---                                               Left err -> putStrLn $ "\t" ++  "err: " ++ err
---                                               Right tt -> do { putStrLn $ " \t" ++ showFTy tt
---                                                              ; if tt == mTyToFTy ty then return () else putStrLn "**** !!! NO MATCH" } }
---               ; putStrLn ""
---               ; putStrLn "------------------------"
---               ; putStrLn ""  }
-
-stlc = Letrec [("x",Var "y"),("y",Var "x")] (App (App (Const Pair) (Var "x")) (Var "y"))
---main = testOne stlc
-
-yyy = let x = y
-          y = x in (x,y)
-
-xxx = let foo = bar
-          bar = \f -> f $ bar f
-      in (foo, bar)
-
-testM :: Expr
-testM = Letrec [("g", Var "f"), ("f", Var "g")] $ App (App (Const Pair) $ Var "f") (Var "g")
-
-testJ :: Expr
-testJ = Letrec [ ("bar2", barBody2), ("bar1", barBody) ] $ App (App (Const Pair) (Var "bar1")) (Var "bar2")
- where fooBody = (App (Var "bar1") (Abs "x" $ str "false"))
-       barBody = Abs "f" $ App (Var "f") $  (App (Var "bar1") (Var "f"))
-       barBody2 = Abs "f" $ App (Var "f") $  (App (Var "bar2") (Var "f"))
-
-letrec' x e f = Letrec [(x,e)] f
-
-testA :: Expr
-testA =  letrec' "f" ( (Abs "x" (Var "x"))) $ App (Var "f")  (nat 0)
- where sng0 = App (Var "sng") (nat 0)
-       sngAlice = App (Var "sng") (str "alice")
-       body = (Var "sng")
-
-test0 :: Expr
-test0 =  letrec' "f" (App (Abs "x" (Var "x")) (nat 0)) (Var "f")
- where sng0 = App (Var "sng") (nat 0)
-       sngAlice = App (Var "sng") (str "alice")
-
-testB' :: Expr
-testB' = (Abs "x" (App (App (Const Cons) (Var "x")) (Const Nil)))
-
-testB''' :: Expr
-testB''' = (Abs "x" (( (Var "x")) ))
-
-testB'' :: Expr
-testB'' = (Abs "x" ((App (Const Cons) (Var "x")) ))
-
-testB :: Expr
-testB = letrec' "sng" (Abs "x" (App (App (Const Cons) (Var "x")) (Const Nil))) body
- where body = (Var "sng")
-
-test1 :: Expr
-test1 = letrec' "sng" (Abs "x" (App (App (Const Cons) (Var "x")) (Const Nil))) body
- where sng0 = App (Var "sng") (nat 0)
-       sngAlice = App (Var "sng") (str "alice")
-       body = App (App (Const Pair) sng0) sngAlice
-
-test2 :: Expr
-test2 = letrec' "+" (Abs "x" $ Abs "y" $ recCall) twoPlusOne
- where
-   recCall = App (Const Succ) $ App (App (Var "+") (App (Const Pred) (Var "x"))) (Var "y")
-   ifz x y z = App (App (App (Const If0) x) y) z
-   twoPlusOne = App (App (Var "+") two) one
-   two = App (Const Succ) one
-   one = App (Const Succ) (nat 0)
-
-testC :: Expr
-testC = letrec' "+" (Abs "x" $ Abs "y" $ recCall) $ twoPlusOne
- where
-   recCall = App (Const Succ) $ App (App (Var "+") (App (Const Pred) (Var "x"))) ( (Var "y"))
-   ifz x y z = App (App (App (Const If0) x) y) z
-   twoPlusOne = App (App (Var "+") two) one
-   two = App (Const Succ) one
-   one = App (Const Succ) (nat 0)
-
-test3 :: Expr
-test3 = letrec' "f" f x
- where x =  (Var "f")
-       f = Abs "x" $ Abs "y" $ App (App (Var "f") (nat 0)) (Var "x")
-
-test3a :: Expr
-test3a = Letrec [("f", f), ("g", g)] x
- where x =  App (App (Const $ Pair) (Var "f")) (Var "g")
-       f = Abs "x" $ Abs "y" $ App (App (Var "f") (nat 0)) (Var "x")
-       g = Abs "xx" $ Abs "yy" $ App (App (Var "g") (nat 0)) (Var "xx")
-
-test4 :: Expr
-test4 = Letrec [("f", f) ,("g", g)] b
- where b = App (App (Const Pair) (Var "f")) (Var "f")
-       f = Abs "f" $ Abs "x" $  (App (Var "f") (nat 0))
-       g = Abs "u" $ Abs "v" $ App (App (Var "g") (Var "v")) (nat 0)
-
-test4x :: Expr
-test4x = Letrec [("f", f) {--,("g", g)--}] (Var "f") --b
- where b = App (App (Const Pair) (Var "f")) (Var "f")
-       f = Abs "x" $ Abs "y" $ App (App (Var "f") (nat 0)) (Var "x")
-       g = Abs "u" $ Abs "v" $ App (App (Var "g") (Var "v")) (nat 0)
-
-test5 :: Expr
-test5 = Letrec [("f", f), ("g", g)] b
- where b = App (App (Const Pair) (Var "f")) (Var "g")
-       f = Abs "x" $ Abs "y" $ App (App (Var "g") (nat 0)) (nat 0)
-       g = Abs "u" $ Abs "v" $ App (App (Var "f") (Var "v")) (nat 0)
-
-test6 :: Expr
-test6 = Letrec [("f", f), ("g", g)] b
- where b = App (App (Const Pair) (Var "f")) (Var "g")
-       f = Abs "x" $ Abs "y" $ App (App (Var "g") (nat 0)) (Var "x")
-       g = Abs "u" $ Abs "v" $ App (App (Var "f") (nat 0)) (nat 0)
-
-
-
-
--- For Hydra debugging
-
-test7 :: Expr
-test7 = letrec' "foo" (letrec' "id" (Abs "x" (Var "x")) (Var "id")) (str "whatever")
diff --git a/src/test/haskell/Hydra/Reference/AlgorithmWBridge.hs b/src/test/haskell/Hydra/Reference/AlgorithmWBridge.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Reference/AlgorithmWBridge.hs
+++ /dev/null
@@ -1,179 +0,0 @@
--- | Wrapper for @wisnesky's Algorithm W implementation which makes it into an alternative inferencer for Hydra
-
-module Hydra.Reference.AlgorithmWBridge where
-
-import Hydra.Reference.AlgorithmW
-
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Dsl.Literals as Literals
-import qualified Hydra.Dsl.LiteralTypes as LiteralTypes
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Types as Types
-import Hydra.Sources.Libraries
-import Hydra.Coders
-import Hydra.Rewriting
-import Hydra.Strip
-import Hydra.Variables
-
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Control.Monad as CM
-
-import Control.Monad.Except
-import Control.Monad.State
-
-
--- A minimal Hydra graph container for use in these translation functions
-data HydraContext = HydraContext (M.Map Core.Name Graph.Primitive)
-
-----------------------------------------
-
--- Note: no support for @wisnesky's Prim constructors other than Str, Nat, Cons, and Nil
-hydraTermToStlc :: HydraContext -> Core.Term -> Either String Expr
-hydraTermToStlc context term = case term of
-    Core.TermApplication (Core.Application t1 t2) -> App <$> toStlc t1 <*> toStlc t2
-    Core.TermLambda (Core.Lambda (Core.Name v) _ body) -> Abs <$> pure v <*> toStlc body
-    Core.TermVariable name -> do
-      prim <- case M.lookup name prims of
-        Nothing -> Left $ "no such primitive: " ++ Core.unName name
-        Just p -> Right p
-      ts <- hydraTypeSchemeToStlc $ Graph.primitiveTypeScheme prim
-      return $ Const $ PrimTyped $ TypedPrimitive name ts
-    Core.TermLet (Core.Let bindings env) -> Letrec <$> CM.mapM bindingToStlc bindings <*> toStlc env
-      where
-        bindingToStlc (Core.Binding (Core.Name v) term _) = do
-          s <- toStlc term
-          return (v, s)
-    Core.TermList els -> do
-      sels <- CM.mapM toStlc els
-      return $ foldr (\el acc -> App (App (Const Cons) el) acc) (Const Nil) sels
-    Core.TermLiteral lit -> pure $ Const $ PrimLiteral lit
-    Core.TermPair (t1, t2) -> pair <$> toStlc t1 <*> toStlc t2
-    Core.TermEither et -> case et of
-      Left l -> App (Const Inl) <$> toStlc l
-      Right r -> App (Const Inr) <$> toStlc r
-    Core.TermUnit -> pure $ Const TT
-    Core.TermVariable (Core.Name v) -> pure $ Var v
-    _ -> Left $ "Unsupported term: " ++ show term
-  where
-    HydraContext prims = context
-    toStlc = hydraTermToStlc context
-    pair a b = App (App (Const Pair) a) b
-
-hydraTypeSchemeToStlc :: Core.TypeScheme -> Either String TypSch
-hydraTypeSchemeToStlc (Core.TypeScheme vars body _) = do
-    sbody <- toStlc body
-    return $ Forall (Core.unName <$> vars) sbody
-  where
-    toStlc typ = case deannotateType typ of
-      Core.TypeFunction (Core.FunctionType dom cod) -> TyFn <$> toStlc dom <*> toStlc cod
-      Core.TypeList et -> TyList <$> toStlc et
-      Core.TypeLiteral lt -> pure $ TyLit lt
---      TypeMap MapType |
---      TypeMaybe Type |
-      Core.TypePair (Core.PairType first second) -> TyProd <$> toStlc first <*> toStlc second
---      TypeRecord RowType |
---      TypeSet Type |
-      Core.TypeEither (Core.EitherType left right) -> TyEither <$> toStlc left <*> toStlc right
---      TypeUnion RowType |
-      Core.TypeVariable name -> pure $ TyVar $ Core.unName name
---      TypeWrap (Nominal Type)
-      _ -> Left $ "unsupported type: " ++ show typ
-
--- | Convert a System F term expression to a Hydra term
-toTerm :: FExpr -> Core.Term
-toTerm expr = case expr of
-  FAbs v dom e -> Core.TermLambda (Core.Lambda (Core.Name v) (Just hdom) (toTerm e))
-    where
-      hdom = Core.typeSchemeBody $ toTypeScheme dom
-  -- App (App (Const Pair) (nat 0)) (nat 1)
-  --   e1 = App (Const Pair) (nat 0)
-  --   e2 = nat 1
-
-  -- FApp (FApp (FTyApp (FConst pair) [Int32,Int32]) (FConst 0)) (FConst 1)
-  --   e1 = FApp (FTyApp (FConst pair) [Int32,Int32]) (FConst 0)
-  --   e2 = FConst 1
-  FApp e1 e2 -> case e1 of
-    FApp (FTyApp (FConst Cons) _) hd -> Core.TermList $
-        fmap toTerm (hd:(gather e2)) -- TODO: include inferred type
-      where
-        gather e = case e of
-          FTyApp (FConst Nil) _ -> []
-          FApp (FApp (FTyApp (FConst Cons) _) hd) tl -> hd:(gather tl)
-    FApp (FTyApp (FConst Pair) _) lhs -> Core.TermPair (toTerm lhs, toTerm e2)
-    FTyApp (FConst Inl) _ -> Core.TermEither $ Left $ toTerm e2
-    FTyApp (FConst Inr) _ -> Core.TermEither $ Right $ toTerm e2
-    _ -> Core.TermApplication $ Core.Application (toTerm e1) (toTerm e2)
-  FConst prim -> case prim of
-    PrimLiteral lit -> Core.TermLiteral lit
-    PrimTyped (TypedPrimitive name _) -> Core.TermVariable name
-    Nil -> Core.TermList []
-    Pair -> Terms.lambdas ["a", "b"] $ Terms.pair (Terms.var "a") (Terms.var "b")
-    TT -> Core.TermUnit
-    _ -> Terms.string $ "unexpected primitive: " ++ show prim
-    -- Note: other prims are unsupported; they can be added here as needed
-  FLetrec bindings env -> Core.TermLet $ Core.Let (fmap bindingToHydra bindings) (toTerm env)
-    where
-      bindingToHydra (v, ty, term) = Core.Binding (Core.Name v) (toTerm term) $ Just $ toTypeScheme ty
-  FTyAbs params body -> L.foldl (\t v -> Core.TermTypeLambda $ Core.TypeLambda (Core.Name v) t) (toTerm body) $ L.reverse params
-  FTyApp fun args -> L.foldl (\t a -> Core.TermTypeApplication $ Core.TypeApplicationTerm t a) (toTerm fun) $ L.reverse hargs
-    where
-      hargs = fmap (\t -> Core.typeSchemeBody $ toTypeScheme t) args
-  FVar v -> Core.TermVariable $ Core.Name v
-
-toType :: FTy -> Core.Type
-toType ty = case ty of
-  FTyVar v -> Core.TypeVariable $ Core.Name v
-  FTyLit lt -> Core.TypeLiteral lt
-  FTyList lt -> Core.TypeList $ toType lt
-  FTyFn dom cod -> Core.TypeFunction $ Core.FunctionType (toType dom) (toType cod)
-  FTyProd t1 t2 -> Core.TypePair $ Core.PairType (toType t1) (toType t2)
-  FTySum t1 t2 -> Core.TypeEither $ Core.EitherType (toType t1) (toType t2)
-  FTyEither t1 t2 -> Core.TypeEither $ Core.EitherType (toType t1) (toType t2)
-  FTyUnit -> Core.TypeUnit
-  FTyVoid -> Core.TypeUnit
-
--- | Convert a System F type expression to a Hydra type scheme
-toTypeScheme :: FTy -> Core.TypeScheme
-toTypeScheme ty = case ty of
-  FForall vars body -> Core.TypeScheme (Core.Name <$> vars) (toType body) Nothing
-  _ -> Core.TypeScheme [] (toType ty) Nothing
-
-termToInferredFExpr :: HydraContext -> Core.Term -> IO (FExpr, FTy)
-termToInferredFExpr context term = do
-  stlc <- case hydraTermToStlc context (wrapTerm term) of
-     Left err -> fail err
-     Right t -> return t
-  inferExpr stlc
-
-termToInferredTerm :: HydraContext -> Core.Term -> IO (Core.Term, Core.TypeScheme)
-termToInferredTerm context term = do
-  fexpr <- fst <$> termToInferredFExpr context term
-  unwrapTerm (normalizeTypeVariablesInTerm $ toTerm fexpr)
-
-sFieldName = Core.Name "tempVar"
-
--- Wrap a term inside a let-term; the Algorithm W implementation only produces "forall" types for let-bindings.
-wrapTerm :: Core.Term -> Core.Term
-wrapTerm term = Core.TermLet $ Core.Let ([Core.Binding sFieldName term Nothing]) $
-  Core.TermLiteral $ Core.LiteralString "tempEnvironment"
-
-unwrapTerm :: Core.Term -> IO (Core.Term, Core.TypeScheme)
-unwrapTerm term = case term of
-  Core.TermLet (Core.Let bindings _) -> case bindings of
-    [(Core.Binding fname t mts)] -> if fname == sFieldName
-      then case mts of
-         Nothing -> fail "no type scheme in inferred let binding"
-         Just ts -> pure (t, ts)
-      else fail "expected let binding matching input"
-    _ -> fail "expected let bindings"
-
-inferExpr :: Expr -> IO (FExpr, FTy)
-inferExpr t = case (fst $ runState (runExceptT (w [] t)) 0) of
-  Left e -> fail $ "inference error: " ++ e
-  Right (_, (ty, f)) -> case (typeOf [] [] f) of
-    Left err -> fail $ "type error: " ++ err
-    Right tt -> if tt == mTyToFTy ty
-      then return (f, tt)
-      else fail "no match"
diff --git a/src/test/haskell/Hydra/Reference/AlgorithmWSpec.hs b/src/test/haskell/Hydra/Reference/AlgorithmWSpec.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Reference/AlgorithmWSpec.hs
+++ /dev/null
@@ -1,68 +0,0 @@
-{-
-stack ghci hydra:lib hydra:hydra-test
-
-Test.Hspec.hspec Hydra.Reference.AlgorithmWSpec.spec
--}
-module Hydra.Reference.AlgorithmWSpec where
-
-import Hydra.Kernel
-import Hydra.Sources.Libraries
-import Hydra.TestUtils
-import Hydra.TestData
-import qualified Hydra.Extract.Core as ExtractCore
-import Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Annotations as Ann
-import qualified Hydra.Dsl.Types as Types
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Reference.AlgorithmWBridge as W
-
-import qualified Hydra.TestUtils as TU
-import Hydra.Testing
-import Hydra.TestSuiteSpec
-import Hydra.Test.TestSuite
-import qualified Hydra.Dsl.Meta.Testing as Testing
-
-import qualified Test.Hspec as H
-import qualified Test.QuickCheck as QC
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Control.Exception as Exception
-import Control.Monad
-
-
-testHydraContext = W.HydraContext $ graphPrimitives testGraph
-
-inferType :: Term -> IO (Either String (Term, TypeScheme))
-inferType term = do
-  result <- Exception.try (W.termToInferredTerm testHydraContext term)
-    :: IO (Either Exception.SomeException (Term, TypeScheme))
-  return $ case result of
-    Left e -> Left (show e)
-    Right r -> Right r
-
--- | Strip class constraints from a TypeScheme, since the reference Algorithm W
---   implementation does not track type class constraints.
-stripConstraints :: TypeScheme -> TypeScheme
-stripConstraints ts = ts { typeSchemeConstraints = Nothing }
-
-expectType :: Term -> TypeScheme -> H.SpecWith ()
-expectType term ts = do
-  result <- H.runIO $ inferType term
-  case result of
-    Left err -> H.it "inferred type (skipped: unsupported by reference implementation)" $
-      H.pendingWith err
-    Right (iterm, its) -> do
-      H.it "inferred type" $
-        H.shouldBe (ShowCore.typeScheme $ stripConstraints its) (ShowCore.typeScheme $ stripConstraints ts)
-      H.it "inferred term" $
-        H.shouldBe (ShowCore.term $ removeTypesFromTerm iterm) (ShowCore.term $ removeTypesFromTerm term)
-
-algorithmWRunner :: TestRunner
-algorithmWRunner desc tcase = if Testing.isDisabled tcase || Testing.isDisabledForMinimalInference tcase
-  then Nothing
-  else case testCaseWithMetadataCase tcase of
-    _ -> Nothing
-
-spec :: H.Spec
-spec = runTestGroup "" algorithmWRunner allTests
diff --git a/src/test/haskell/Hydra/Test/Annotations.hs b/src/test/haskell/Hydra/Test/Annotations.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Annotations.hs
+++ /dev/null
@@ -1,2227 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.annotations functions
-
-module Hydra.Test.Annotations where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.annotations functions
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "annotations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "arbitrary annotations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set single annotation #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set single annotation #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "myKey"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-17))))}}))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "myKey"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-17))))}}))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set single annotation #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "hello"))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "integer"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "int32"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}}))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}}))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "hello"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get existing annotation #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "value"))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "string"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "value"))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get existing annotation #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foo"))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foo"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString ""))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "string"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString ""))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get existing annotation #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 123)))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int32"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 123)))}}))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get missing annotation #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "integer"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "int16"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 42)))}}))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get missing annotation #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "nonexistent"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "hello"))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get missing annotation #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k2"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set multiple annotations #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k2"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 200)))}}))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "first"))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "boolean"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "boolean"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.fromList [
-                            (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}), (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "string"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "first"))}}))}}))),
-                            (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k2"))}), (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 200)))}}))}}))}})))]))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set multiple annotations #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "b"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}}))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "a"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.fromList [
-                            (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "a"))}), (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))}}))}}))}}))),
-                            (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "b"))}), (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}}))}}))}})))]))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "outer annotation overrides inner #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "outer"))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "inner"))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "outer"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "outer annotation overrides inner #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "new"))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "old"))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "new"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "outer annotation overrides inner #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 999)))}}))}}))}}))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "boolean"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean False))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "boolean"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean False))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "key"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 999)))}}))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unset single annotation #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int64"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 137)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int64"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 137)))}}))}}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unset single annotation #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "x"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "string"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unset one of multiple annotations #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k2"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 200)))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                          Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k1"))}))})),
-                        Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "literal"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "string"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "first"))}}))}}))))})),
-                      Core.applicationArgument = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int64"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 137)))}}))}}))}}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int64"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 137)))}}))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "k2"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 200)))}}))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unset one of multiple annotations #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                      Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "b"))}))})),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                        Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "b"))}))})),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "integer"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "int32"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}}))))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermAnnotation")),
-                          Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "a"))}))})),
-                        Core.applicationArgument = (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "literal"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "integer"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "int32"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))})),
-                      Core.applicationArgument = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "literal"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "x"))}}))}}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "x"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "a"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "descriptions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set description #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "my description"))))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "my description"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set description #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString ""))))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "integer"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "int32"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString ""))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set description #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "A longer description with spaces"))))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "boolean"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "boolean"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "A longer description with spaces"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get existing description #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermDescription")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyContext"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyGraph"))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello"))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermEither (Right (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get existing description #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermDescription")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyContext"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyGraph"))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString ""))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermEither (Right (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "")))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get existing description #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermDescription")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyContext"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyGraph"))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "desc"))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "boolean"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean False))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermEither (Right (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "desc")))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get missing description #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermDescription")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyContext"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyGraph"))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "integer"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "int16"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 42)))}}))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermEither (Right (Core.TermMaybe Nothing))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get missing description #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermDescription")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyContext"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyGraph"))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "no description here"))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermEither (Right (Core.TermMaybe Nothing))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get missing description #3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermDescription")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyContext"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lexical.emptyGraph"))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "integer"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "int32"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}}))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermEither (Right (Core.TermMaybe Nothing))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "outer description overrides inner #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "outer"))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "inner"))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "outer"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "outer description overrides inner #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "new"))))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "old"))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int32"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "annotated"),
-                    Core.fieldTerm = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "body"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "integer"),
-                                  Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                    Core.injectionField = Core.Field {
-                                      Core.fieldName = (Core.Name "int32"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))}}))}}))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "annotation"),
-                          Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "description"))})) (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "literal"),
-                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "new"))}}))}}))))}]}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unset description #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "desc"))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "integer"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "int64"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 137)))}}))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int64"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 137)))}}))}}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unset description #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.setTermDescription")),
-                      Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "to be removed"))))})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "literal"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "string"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "layered annotations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get annotation from unannotated term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "literal"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "integer"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "int32"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get annotation from singly annotated term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "annotated"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "body"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "annotation"),
-                            Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))}]}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int32"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get inner annotation from doubly annotated term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "annotated"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "body"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "annotated"),
-                                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                  Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                  Core.recordFields = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "body"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "annotation"),
-                                      Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))}]}))}}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "annotation"),
-                            Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "two"))})) (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}}))))}]}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int32"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get outer annotation from doubly annotated term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "two"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "annotated"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "body"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "annotated"),
-                                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                  Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                  Core.recordFields = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "body"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "annotation"),
-                                      Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))}]}))}}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "annotation"),
-                            Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "two"))})) (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}}))))}]}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int32"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get non-overridden annotation from triply annotated term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "two"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "annotated"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "body"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "annotated"),
-                                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                  Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                  Core.recordFields = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "body"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "annotated"),
-                                          Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "body"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                      Core.injectionField = Core.Field {
-                                                        Core.fieldName = (Core.Name "integer"),
-                                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                          Core.injectionField = Core.Field {
-                                                            Core.fieldName = (Core.Name "int32"),
-                                                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "annotation"),
-                                                Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                      Core.injectionField = Core.Field {
-                                                        Core.fieldName = (Core.Name "integer"),
-                                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                          Core.injectionField = Core.Field {
-                                                            Core.fieldName = (Core.Name "int32"),
-                                                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))}]}))}}))},
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "annotation"),
-                                      Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "two"))})) (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}}))))}]}))}}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "annotation"),
-                            Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))}}))}}))}}))))}]}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int32"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "outer annotation overrides inner in layered term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.annotations.getTermAnnotation")),
-                    Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))}))})),
-                  Core.applicationArgument = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "annotated"),
-                      Core.fieldTerm = (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "body"),
-                            Core.fieldTerm = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "annotated"),
-                                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                  Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                  Core.recordFields = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "body"),
-                                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "annotated"),
-                                          Core.fieldTerm = (Core.TermRecord (Core.Record {
-                                            Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),
-                                            Core.recordFields = [
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "body"),
-                                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                      Core.injectionField = Core.Field {
-                                                        Core.fieldName = (Core.Name "integer"),
-                                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                          Core.injectionField = Core.Field {
-                                                            Core.fieldName = (Core.Name "int32"),
-                                                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))}}))}}))},
-                                              Core.Field {
-                                                Core.fieldName = (Core.Name "annotation"),
-                                                Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                                  Core.injectionField = Core.Field {
-                                                    Core.fieldName = (Core.Name "literal"),
-                                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                                      Core.injectionField = Core.Field {
-                                                        Core.fieldName = (Core.Name "integer"),
-                                                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                          Core.injectionField = Core.Field {
-                                                            Core.fieldName = (Core.Name "int32"),
-                                                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}))}}))}}))))}]}))}}))},
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "annotation"),
-                                      Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                                        Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "two"))})) (Core.TermInject (Core.Injection {
-                                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                                        Core.injectionField = Core.Field {
-                                          Core.fieldName = (Core.Name "literal"),
-                                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                            Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                            Core.injectionField = Core.Field {
-                                              Core.fieldName = (Core.Name "integer"),
-                                              Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                                Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                                Core.injectionField = Core.Field {
-                                                  Core.fieldName = (Core.Name "int32"),
-                                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}}))}}))}}))))}]}))}}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "annotation"),
-                            Core.fieldTerm = (Core.TermMap (Maps.singleton (Core.TermWrap (Core.WrappedTerm {
-                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "one"))})) (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "literal"),
-                                Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                  Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                                  Core.injectionField = Core.Field {
-                                    Core.fieldName = (Core.Name "integer"),
-                                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                                      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                                      Core.injectionField = Core.Field {
-                                        Core.fieldName = (Core.Name "int32"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))}}))}}))}}))))}]}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "literal"),
-                    Core.fieldTerm = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "integer"),
-                        Core.fieldTerm = (Core.TermInject (Core.Injection {
-                          Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),
-                          Core.injectionField = Core.Field {
-                            Core.fieldName = (Core.Name "int32"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))}}))}}))}})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Checking/Advanced.hs b/src/test/haskell/Hydra/Test/Checking/Advanced.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/Advanced.hs
+++ /dev/null
@@ -1,224 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Advanced type checking test cases: annotated terms and flows
-
-module Hydra.Test.Checking.Advanced where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Advanced type checking test cases
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Advanced",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        annotatedTermsTests],
-      Testing.testGroupCases = []}
-annotatedTermsTests :: Testing.TestGroup
-annotatedTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Annotated terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        topLevelAnnotationsTests,
-        nestedAnnotationsTests,
-        annotationsInComplexContextsTests],
-      Testing.testGroupCases = []}
-annotationsInComplexContextsTests :: Testing.TestGroup
-annotationsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Annotations in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                    Core.annotatedTermAnnotation = M.empty})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "y"),
-                  Core.bindingTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralString "world")),
-                    Core.annotatedTermAnnotation = M.empty})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                Core.annotatedTermBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y")))),
-                Core.annotatedTermAnnotation = M.empty}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated record fields",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralString "Alice")),
-                    Core.annotatedTermAnnotation = M.empty}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralString "Smith")),
-                    Core.annotatedTermAnnotation = M.empty}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30))),
-                    Core.annotatedTermAnnotation = M.empty}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypePersonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated function in application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "add"),
-                  Core.bindingTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.annotatedTermAnnotation = M.empty})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "add")),
-                  Core.applicationArgument = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))),
-                    Core.annotatedTermAnnotation = M.empty}))})),
-                Core.applicationArgument = (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                  Core.annotatedTermAnnotation = M.empty}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedAnnotationsTests :: Testing.TestGroup
-nestedAnnotationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested annotations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotation within annotation",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100))),
-                Core.annotatedTermAnnotation = M.empty})),
-              Core.annotatedTermAnnotation = M.empty})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated terms in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-              Core.annotatedTermAnnotation = M.empty}), (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralString "hello")),
-              Core.annotatedTermAnnotation = M.empty})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated term in function application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermAnnotated (Core.AnnotatedTerm {
-                Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                Core.annotatedTermAnnotation = M.empty})),
-              Core.applicationArgument = (Core.TermAnnotated (Core.AnnotatedTerm {
-                Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                Core.annotatedTermAnnotation = M.empty}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-topLevelAnnotationsTests :: Testing.TestGroup
-topLevelAnnotationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Top-level annotations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated literal",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-              Core.annotatedTermAnnotation = M.empty})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermList [
-                Core.TermLiteral (Core.LiteralString "a"),
-                (Core.TermLiteral (Core.LiteralString "b"))]),
-              Core.annotatedTermAnnotation = M.empty})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypePersonName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "John"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]})),
-              Core.annotatedTermAnnotation = M.empty})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypePersonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "annotated lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermAnnotated (Core.AnnotatedTerm {
-              Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-              Core.annotatedTermAnnotation = M.empty})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
diff --git a/src/test/haskell/Hydra/Test/Checking/AlgebraicTypes.hs b/src/test/haskell/Hydra/Test/Checking/AlgebraicTypes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/AlgebraicTypes.hs
+++ /dev/null
@@ -1,846 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Algebraic type checking test cases: unit, pairs, eithers, optionals
-
-module Hydra.Test.Checking.AlgebraicTypes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Algebraic types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        unitTests,
-        pairsTests,
-        eithersTests,
-        optionalsTests],
-      Testing.testGroupCases = []}
-basicPairsTests :: Testing.TestGroup
-basicPairsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Basic pairs",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair of int and string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "hello")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair of string and boolean",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralString "test"), (Core.TermLiteral (Core.LiteralBoolean True)))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeBoolean)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair of boolean and int",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralBoolean False), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeBoolean),
-              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-eithersInComplexContextsTests :: Testing.TestGroup
-eithersInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Eithers in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error"))),
-              (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeEither (Core.EitherType {
-              Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "result"),
-                  Core.bindingTerm = (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "result"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-eithersTests :: Testing.TestGroup
-eithersTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Eithers",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        leftValuesTests,
-        rightValuesTests,
-        polymorphicEithersTests,
-        eithersInComplexContextsTests,
-        nestedEithersTests,
-        eithersWithComplexTypesTests],
-      Testing.testGroupCases = []}
-eithersWithComplexTypesTests :: Testing.TestGroup
-eithersWithComplexTypesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Eithers with complex types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either with record on left",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable TestTypes.testTypePersonName),
-                Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either with record on right",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Jones"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                Core.eitherTypeRight = (Core.TypeVariable TestTypes.testTypePersonName)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-leftValuesTests :: Testing.TestGroup
-leftValuesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Left values",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "left int",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "left string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "left boolean",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermLiteral (Core.LiteralBoolean False)))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-monomorphicOptionalsTests :: Testing.TestGroup
-monomorphicOptionalsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic optionals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nothing",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe Nothing))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0")))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "just int",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "just string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "just boolean",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralBoolean True)))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeBoolean)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedEithersTests :: Testing.TestGroup
-nestedEithersTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested eithers",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either of either (left left)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t1"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either of either (left right)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermEither (Right (Core.TermLiteral (Core.LiteralString "nested")))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                    Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t1"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either of either (right)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermLiteral (Core.LiteralBoolean True)))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either of list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list of eithers",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "a"))),
-              (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))),
-              (Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "b"))))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeEither (Core.EitherType {
-              Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedOptionalsTests :: Testing.TestGroup
-nestedOptionalsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested optionals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optional of optional",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "nested")))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optional of list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list of optionals",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "a"))),
-              (Core.TermMaybe Nothing),
-              (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "b"))))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedPairsTests :: Testing.TestGroup
-nestedPairsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested pairs",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair of pairs",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "one"))), (Core.TermPair (Core.TermLiteral (Core.LiteralBoolean True), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair with list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))], (Core.TermLiteral (Core.LiteralString "numbers")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list of pairs",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "a"))),
-              (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralString "b"))))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-optionalsInComplexContextsTests :: Testing.TestGroup
-optionalsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Optionals in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optional in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypeBuddyListAName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "head"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "first"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "tail"),
-                  Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeBuddyListBName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "head"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "second"))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "tail"),
-                        Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optional in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "maybeValue"),
-                  Core.bindingTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "maybeValue"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-optionalsTests :: Testing.TestGroup
-optionalsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Optionals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        monomorphicOptionalsTests,
-        polymorphicOptionalsTests,
-        optionalsInComplexContextsTests,
-        nestedOptionalsTests,
-        optionalsWithComplexTypesTests],
-      Testing.testGroupCases = []}
-optionalsWithComplexTypesTests :: Testing.TestGroup
-optionalsWithComplexTypesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Optionals with complex types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optional map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralString "key"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))])))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-pairsInComplexContextsTests :: Testing.TestGroup
-pairsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Pairs in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "one"))),
-              (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralString "two"))))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "result"),
-                  Core.bindingTerm = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "answer")))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "result"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-pairsTests :: Testing.TestGroup
-pairsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Pairs",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        basicPairsTests,
-        polymorphicPairsTests,
-        pairsInComplexContextsTests,
-        nestedPairsTests,
-        pairsWithComplexTypesTests],
-      Testing.testGroupCases = []}
-pairsWithComplexTypesTests :: Testing.TestGroup
-pairsWithComplexTypesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Pairs with complex types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair with record on first",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Person"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]}), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeVariable (Core.Name "Person")),
-              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair with record on second",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralString "name"), (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Person"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Jones"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "Person"))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicEithersTests :: Testing.TestGroup
-polymorphicEithersTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic eithers",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "left from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "x"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t1"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "right from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "x"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t1")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either from two lambdas",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "flag"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "flag"))})),
-                    Core.applicationArgument = (Core.TermEither (Left (Core.TermVariable (Core.Name "x"))))})),
-                  Core.applicationArgument = (Core.TermEither (Right (Core.TermVariable (Core.Name "x"))))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicOptionalsTests :: Testing.TestGroup
-polymorphicOptionalsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic optionals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optional from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermMaybe (Just (Core.TermVariable (Core.Name "x"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nothing from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermMaybe Nothing)})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t1")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "conditional optional",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "flag"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "flag"))})),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermVariable (Core.Name "x"))))})),
-                  Core.applicationArgument = (Core.TermMaybe Nothing)}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                  Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicPairsTests :: Testing.TestGroup
-polymorphicPairsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic pairs",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair from lambda (first element)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralString "constant"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair from lambda (second element)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermPair (Core.TermLiteral (Core.LiteralString "constant"), (Core.TermVariable (Core.Name "x"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair from two lambdas",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair with repeated variable",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "x"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-rightValuesTests :: Testing.TestGroup
-rightValuesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Right values",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "right int",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "right string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermLiteral (Core.LiteralString "success")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "right boolean",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermLiteral (Core.LiteralBoolean True)))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeEither (Core.EitherType {
-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unitTermInPolymorphicContextTests :: Testing.TestGroup
-unitTermInPolymorphicContextTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unit term in polymorphic context",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unit from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = Core.TermUnit})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = Core.TypeUnit}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unitTermTests :: Testing.TestGroup
-unitTermTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unit term",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unit literal",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph Core.TermUnit)),
-            Testing.universalTestCaseExpected = (ShowCore.type_ Core.TypeUnit)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unitTests :: Testing.TestGroup
-unitTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unit",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        unitTermTests,
-        unitTermInPolymorphicContextTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Checking/All.hs b/src/test/haskell/Hydra/Test/Checking/All.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/All.hs
+++ /dev/null
@@ -1,27 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Hydra's type checking test suite
-
-module Hydra.Test.Checking.All where
-import qualified Hydra.Test.Checking.Advanced as Advanced
-import qualified Hydra.Test.Checking.AlgebraicTypes as AlgebraicTypes
-import qualified Hydra.Test.Checking.Collections as Collections
-import qualified Hydra.Test.Checking.Failures as Failures
-import qualified Hydra.Test.Checking.Fundamentals as Fundamentals
-import qualified Hydra.Test.Checking.NominalTypes as NominalTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The group of all type checking tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "checking",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Advanced.allTests,
-        AlgebraicTypes.allTests,
-        Collections.allTests,
-        Failures.allTests,
-        Fundamentals.allTests,
-        NominalTypes.allTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Checking/Collections.hs b/src/test/haskell/Hydra/Test/Checking/Collections.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/Collections.hs
+++ /dev/null
@@ -1,730 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Collection type checking test cases: lists, sets, maps
-
-module Hydra.Test.Checking.Collections where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-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
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Collections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        listsTests,
-        setsTests,
-        mapsTests],
-      Testing.testGroupCases = []}
-emptyListsTests :: Testing.TestGroup
-emptyListsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Empty lists",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList []))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "pair of empty lists",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [], (Core.TermList []))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                  Core.pairTypeSecond = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty list in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [], (Core.TermLiteral (Core.LiteralString "context")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-listsInComplexContextsTests :: Testing.TestGroup
-listsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lists in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "multiple lists in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))], (Core.TermList [
-              Core.TermLiteral (Core.LiteralString "a"),
-              (Core.TermLiteral (Core.LiteralString "b"))]))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-              Core.pairTypeSecond = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-listsOfLiteralsTests :: Testing.TestGroup
-listsOfLiteralsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lists of literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "string list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermLiteral (Core.LiteralString "hello"),
-              (Core.TermLiteral (Core.LiteralString "world"))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "single element list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeBigint))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "mixed numeric types",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1.0)),
-              (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.5))),
-              (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.14)))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-listsTests :: Testing.TestGroup
-listsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lists",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        listsOfLiteralsTests,
-        emptyListsTests,
-        polymorphicListsTests,
-        nestedListsTests,
-        listsInComplexContextsTests],
-      Testing.testGroupCases = []}
-mapsInComplexContextsTests :: Testing.TestGroup
-mapsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Maps in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "one")))]), (Core.TermLiteral (Core.LiteralString "context")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested maps",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralString "outer"), (Core.TermMap (M.fromList [
-                (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralBoolean True)))])))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "lookup"),
-                  Core.bindingTerm = (Core.TermMap (M.fromList [
-                    (Core.TermLiteral (Core.LiteralString "key1"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100)))),
-                    (Core.TermLiteral (Core.LiteralString "key2"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 200))))])),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "lookup"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-mapsTests :: Testing.TestGroup
-mapsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Maps",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        monomorphicMapsTests,
-        polymorphicMapsTests,
-        mapsInComplexContextsTests,
-        mapsWithComplexTypesTests],
-      Testing.testGroupCases = []}
-mapsWithComplexTypesTests :: Testing.TestGroup
-mapsWithComplexTypesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Maps with complex types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map of records",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralString "person1"), (Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypePersonName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]})))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypeVariable TestTypes.testTypePersonName)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map of lists",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermList [
-                Core.TermLiteral (Core.LiteralString "a"),
-                (Core.TermLiteral (Core.LiteralString "b"))])),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermList [
-                Core.TermLiteral (Core.LiteralString "c"),
-                (Core.TermLiteral (Core.LiteralString "d"))]))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.mapTypeValues = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map of tuples",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralString "coords"), (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))))))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-monomorphicMapsTests :: Testing.TestGroup
-monomorphicMapsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic maps",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap M.empty))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int to string map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "one"))),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralString "two")))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "string to int map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralString "a"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))),
-              (Core.TermLiteral (Core.LiteralString "b"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "single entry map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42)), (Core.TermLiteral (Core.LiteralBoolean True)))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeBigint)),
-              Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeBoolean)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-monomorphicSetsTests :: Testing.TestGroup
-monomorphicSetsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic sets",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty set",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet S.empty))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int set",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "string set",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermLiteral (Core.LiteralString "apple"),
-              (Core.TermLiteral (Core.LiteralString "banana")),
-              (Core.TermLiteral (Core.LiteralString "cherry"))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "single element set",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermLiteral (Core.LiteralBoolean True)])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeBoolean)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedListsTests :: Testing.TestGroup
-nestedListsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested lists",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list of lists",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermList [
-                Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))],
-              (Core.TermList [
-                Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty nested lists",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermList [],
-              (Core.TermList [])]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0"))))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested polymorphic",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermList [
-                Core.TermList [
-                  Core.TermVariable (Core.Name "x")]])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0"))))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedSetsTests :: Testing.TestGroup
-nestedSetsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested sets",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set of lists",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermList [
-                Core.TermLiteral (Core.LiteralString "a"),
-                (Core.TermLiteral (Core.LiteralString "b"))],
-              (Core.TermList [
-                Core.TermLiteral (Core.LiteralString "c"),
-                (Core.TermLiteral (Core.LiteralString "d"))])])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set of tuples",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))),
-              (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))))])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set of sets",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermSet (S.fromList [
-                Core.TermLiteral (Core.LiteralString "nested")])])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeString))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicListsTests :: Testing.TestGroup
-polymorphicListsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic lists",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermList [
-                Core.TermVariable (Core.Name "x")])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list with repeated var",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermList [
-                Core.TermVariable (Core.Name "x"),
-                (Core.TermVariable (Core.Name "x"))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list from two lambdas",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermList [
-                  Core.TermVariable (Core.Name "x"),
-                  (Core.TermVariable (Core.Name "y"))])}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicMapsTests :: Testing.TestGroup
-polymorphicMapsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic maps",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map from lambda keys",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "k"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermMap (M.fromList [
-                (Core.TermVariable (Core.Name "k"), (Core.TermLiteral (Core.LiteralString "value")))]))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                  Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeString)}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map from lambda values",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "v"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermMap (M.fromList [
-                (Core.TermLiteral (Core.LiteralString "key"), (Core.TermVariable (Core.Name "v")))]))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map from lambda both",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "k"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "v"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermMap (M.fromList [
-                  (Core.TermVariable (Core.Name "k"), (Core.TermVariable (Core.Name "v")))]))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map with repeated variables",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermMap (M.fromList [
-                (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "x")))]))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicSetsTests :: Testing.TestGroup
-polymorphicSetsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic sets",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermSet (S.fromList [
-                Core.TermVariable (Core.Name "x")]))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set with repeated variable",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermSet (S.fromList [
-                Core.TermVariable (Core.Name "x")]))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set from two variables",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermSet (S.fromList [
-                  Core.TermVariable (Core.Name "x"),
-                  (Core.TermVariable (Core.Name "y"))]))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-setsInComplexContextsTests :: Testing.TestGroup
-setsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Sets in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermSet (S.fromList [
-              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]), (Core.TermLiteral (Core.LiteralString "context")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "numbers"),
-                  Core.bindingTerm = (Core.TermSet (S.fromList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "numbers"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-setsTests :: Testing.TestGroup
-setsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Sets",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        monomorphicSetsTests,
-        polymorphicSetsTests,
-        setsInComplexContextsTests,
-        nestedSetsTests,
-        setsWithComplexTypesTests],
-      Testing.testGroupCases = []}
-setsWithComplexTypesTests :: Testing.TestGroup
-setsWithComplexTypesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Sets with complex types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set of records",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypePersonName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeVariable TestTypes.testTypePersonName)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set of optionals",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))),
-              (Core.TermMaybe Nothing)])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "set of maps",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermMap (M.fromList [
-                (Core.TermLiteral (Core.LiteralString "key"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))])])))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeMap (Core.MapType {
-              Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
diff --git a/src/test/haskell/Hydra/Test/Checking/Failures.hs b/src/test/haskell/Hydra/Test/Checking/Failures.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/Failures.hs
+++ /dev/null
@@ -1,31 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type checking failure test cases
-
-module Hydra.Test.Checking.Failures where
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Type checking failure test cases
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Failures",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        failOnUntypedTests],
-      Testing.testGroupCases = []}
-failOnUntypedTests :: Testing.TestGroup
-failOnUntypedTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Fail on untyped (pre-inference) terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        untypedLambdasTests],
-      Testing.testGroupCases = []}
-untypedLambdasTests :: Testing.TestGroup
-untypedLambdasTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Untyped lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Checking/Fundamentals.hs b/src/test/haskell/Hydra/Test/Checking/Fundamentals.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/Fundamentals.hs
+++ /dev/null
@@ -1,2338 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Fundamental type checking test cases: literals, variables, lambdas, applications, let terms, and primitives
-
-module Hydra.Test.Checking.Fundamentals where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Fundamentals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        literalsTests,
-        variablesTests,
-        lambdasTests,
-        applicationsTests,
-        letTermsTests,
-        primitivesTests],
-      Testing.testGroupCases = []}
-applicationsInComplexContextsTests :: Testing.TestGroup
-applicationsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Applications in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "application in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}), (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a"))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "b"))})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "application in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "John"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ny"))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypePersonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "application in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "result"),
-                  Core.bindingTerm = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "result"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested applications",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))}))})),
-              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-applicationsTests :: Testing.TestGroup
-applicationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Applications",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleFunctionApplicationsTests,
-        partialApplicationsTests,
-        higherOrderApplicationsTests,
-        polymorphicApplicationsTests,
-        applicationsInComplexContextsTests,
-        applicationsWithComplexArgumentsTests],
-      Testing.testGroupCases = []}
-applicationsWithComplexArgumentsTests :: Testing.TestGroup
-applicationsWithComplexArgumentsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Applications with complex arguments",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "application with record argument",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "getName"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "person"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                        Core.projectionTypeName = TestTypes.testTypePersonName,
-                        Core.projectionField = (Core.Name "firstName")})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "getName")),
-                Core.applicationArgument = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypePersonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "application with list argument",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "maybeHead"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "xs"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "maybeHead")),
-                Core.applicationArgument = (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "first"),
-                  (Core.TermLiteral (Core.LiteralString "second"))])}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-binaryPrimitivesTests :: Testing.TestGroup
-binaryPrimitivesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Binary primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "math add",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.math.add")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lists cons",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.cons")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                  Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "maps insert",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.insert")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                      Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-booleanLiteralsTests :: Testing.TestGroup
-booleanLiteralsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Boolean literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "true",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralBoolean True)))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeBoolean))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "false",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralBoolean False)))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeBoolean))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-floatLiteralsTests :: Testing.TestGroup
-floatLiteralsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Float literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "bigfloat",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.14159))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeBigfloat)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "float32",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.71828))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "float64",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.41421))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-higherOrderApplicationsTests :: Testing.TestGroup
-higherOrderApplicationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Higher-order applications",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "apply function to function",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "apply"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "double"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "n"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "apply")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "double"))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "function composition",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "compose"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "g"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "add1"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "n"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "mul2"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "n"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "compose")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "add1"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "mul2"))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-higherOrderLambdasTests :: Testing.TestGroup
-higherOrderLambdasTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Higher-order lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "function composition",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "f"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "g"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "function application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "f"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "curried function",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-higherOrderPrimitivesTests :: Testing.TestGroup
-higherOrderPrimitivesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Higher-order primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lists map function",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-              Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-              Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lists filter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.filter")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                  Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "optionals maybe",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t1"))),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-integerLiteralsTests :: Testing.TestGroup
-integerLiteralsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Integer literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "bigint",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeBigint)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int8",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 127))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int16",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 32767))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int32",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2147483647))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int64",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 9223372036854775807))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "uint8",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 255))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint8)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "uint16",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 65535))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint16)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "uint32",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 4294967295))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "uint64",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 18446744073709551615))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint64)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-lambdasInComplexContextsTests :: Testing.TestGroup
-lambdasInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lambdas in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}),
-              (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "name"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypePersonName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermVariable (Core.Name "name"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.functionTypeCodomain = (Core.TypeVariable TestTypes.testTypePersonName)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-lambdasTests :: Testing.TestGroup
-lambdasTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleLambdasTests,
-        multiParameterLambdasTests,
-        lambdasWithOperationsTests,
-        nestedLambdasTests,
-        lambdasInComplexContextsTests,
-        higherOrderLambdasTests],
-      Testing.testGroupCases = []}
-lambdasWithOperationsTests :: Testing.TestGroup
-lambdasWithOperationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lambdas with operations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda with primitive",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda with application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "f"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda with construction",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-letTermsTests :: Testing.TestGroup
-letTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Let terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleLetBindingsTests,
-        letTermsWithShadowingTests,
-        recursiveBindingsTests,
-        mutualRecursionTests,
-        nestedLetTermsTests,
-        letWithComplexExpressionsTests],
-      Testing.testGroupCases = []}
-letTermsWithShadowingTests :: Testing.TestGroup
-letTermsWithShadowingTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Let terms with shadowing",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda parameter shadowing let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested lambda shadowing",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t1")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "multiple levels of let shadowing",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "x"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "second")),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralBoolean True)),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeBoolean))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "let shadowing with lambda and reference to outer binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "y"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "z"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "y")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "z"))))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                  Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-letWithComplexExpressionsTests :: Testing.TestGroup
-letWithComplexExpressionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Let with complex expressions",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "let in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "first"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "John")),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "middle"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "Q")),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "first"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "middle"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypePersonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "let in function application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "y"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "id"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "composition",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "compose"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "g"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "add1"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "n"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "double"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "n"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "compose")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "add1"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "double"))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-literalsInComplexContextsTests :: Testing.TestGroup
-literalsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Literals in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "literals in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralBoolean True), (Core.TermPair (Core.TermLiteral (Core.LiteralString "test"), (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.14))))))))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeBoolean),
-              Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "literals in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermLiteral (Core.LiteralString "one"),
-              (Core.TermLiteral (Core.LiteralString "two")),
-              (Core.TermLiteral (Core.LiteralString "three"))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-literalsTests :: Testing.TestGroup
-literalsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        booleanLiteralsTests,
-        stringLiteralsTests,
-        integerLiteralsTests,
-        floatLiteralsTests,
-        literalsInComplexContextsTests],
-      Testing.testGroupCases = []}
-monomorphicVsPolymorphicTests :: Testing.TestGroup
-monomorphicVsPolymorphicTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic vs polymorphic",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "monomorphic math",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.math.add")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic identity",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.equality.identity")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.map")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterLambdasTests :: Testing.TestGroup
-multiParameterLambdasTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "two parameters",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "three parameters",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "parameter reuse",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-mutualRecursionTests :: Testing.TestGroup
-mutualRecursionTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Mutual recursion",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "mutually recursive data",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "listA"),
-                  Core.bindingTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeBuddyListAName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "head"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "tail"),
-                        Core.fieldTerm = (Core.TermMaybe (Just (Core.TermVariable (Core.Name "listB"))))}]})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "listB"),
-                  Core.bindingTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeBuddyListBName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "head"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "tail"),
-                        Core.fieldTerm = (Core.TermMaybe Nothing)}]})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "listA"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "(monomorphic) mutually recursive functions",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "g"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedLambdasTests :: Testing.TestGroup
-nestedLambdasTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda returning lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda with let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "y"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda with inner lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "outer"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "inner"),
-                    Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "inner")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedLetTermsTests :: Testing.TestGroup
-nestedLetTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested let terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "monomorphic nesting",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "z"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "z"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic nesting",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "id"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "apply"),
-                    Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "f"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "apply")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "id"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "test"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable capture avoidance",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "y"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "simple let in lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "z"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermVariable (Core.Name "z")),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "y"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nullaryPrimitivesTests :: Testing.TestGroup
-nullaryPrimitivesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nullary primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.empty")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty set",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.sets.empty")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-partialApplicationsTests :: Testing.TestGroup
-partialApplicationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Partial applications",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "partially applied add",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "partially applied string cat",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "prefix"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicApplicationsTests :: Testing.TestGroup
-polymorphicApplicationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic applications",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic identity",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "id"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic const",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "const"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "const")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "keep"))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 999)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic flip",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "flip"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "flip")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "world"))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicVariablesTests :: Testing.TestGroup
-polymorphicVariablesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic variables",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic function",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "id"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "id"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "id"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "test"))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "higher order polymorphic",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "apply"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "apply"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-primitivesInComplexContextsTests :: Testing.TestGroup
-primitivesInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Primitives in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "primitive composition",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "double"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "increment"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "double"))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "increment"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested higher-order",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))})),
-              Core.applicationArgument = (Core.TermList [
-                Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-primitivesTests :: Testing.TestGroup
-primitivesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        nullaryPrimitivesTests,
-        unaryPrimitivesTests,
-        binaryPrimitivesTests,
-        ternaryPrimitivesTests,
-        monomorphicVsPolymorphicTests,
-        higherOrderPrimitivesTests,
-        primitivesInComplexContextsTests],
-      Testing.testGroupCases = []}
-recursiveBindingsTests :: Testing.TestGroup
-recursiveBindingsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Recursive bindings",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "simple arithmetic recursion",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "double"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "n"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "n"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "double")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recursiveVariablesTests :: Testing.TestGroup
-recursiveVariablesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Recursive variables",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "simple recursion",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "mutual recursion",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "g"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleFunctionApplicationsTests :: Testing.TestGroup
-simpleFunctionApplicationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple function applications",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "identity application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "primitive application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "string concatenation",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "world"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleLambdasTests :: Testing.TestGroup
-simpleLambdasTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "identity function",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "constant function",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleLetBindingsTests :: Testing.TestGroup
-simpleLetBindingsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple let bindings",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "single binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "multiple bindings",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "y"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleVariableLookupTests :: Testing.TestGroup
-simpleVariableLookupTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple variable lookup",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "int variable",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "multiple variables",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "y"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-stringLiteralsTests :: Testing.TestGroup
-stringLiteralsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "String literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "simple string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralString "hello")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralString "")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unicode string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralString "caf\233")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-ternaryPrimitivesTests :: Testing.TestGroup
-ternaryPrimitivesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Ternary primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "logic ifElse",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lists foldl",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t1"))),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unaryPrimitivesTests :: Testing.TestGroup
-unaryPrimitivesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unary primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lists maybeHead",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "math neg",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.math.negate")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "logic not",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.logic.not")))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-variableScopingTests :: Testing.TestGroup
-variableScopingTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Variable scoping",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda parameter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "let binding scope",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable shadowing",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested scoping",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermPair (Core.TermVariable (Core.Name "y"), (Core.TermVariable (Core.Name "z"))))))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-variablesInComplexContextsTests :: Testing.TestGroup
-variablesInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Variables in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "name"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypePersonName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermVariable (Core.Name "name"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.functionTypeCodomain = (Core.TypeVariable TestTypes.testTypePersonName)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermList [
-                Core.TermVariable (Core.Name "x"),
-                (Core.TermVariable (Core.Name "x"))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable in map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "key"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "value"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermMap (M.fromList [
-                  (Core.TermVariable (Core.Name "key"), (Core.TermVariable (Core.Name "value")))]))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "variable in optional",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermMaybe (Just (Core.TermVariable (Core.Name "x"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-variablesTests :: Testing.TestGroup
-variablesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Variables",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleVariableLookupTests,
-        variableScopingTests,
-        polymorphicVariablesTests,
-        variablesInComplexContextsTests,
-        recursiveVariablesTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Checking/NominalTypes.hs b/src/test/haskell/Hydra/Test/Checking/NominalTypes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Checking/NominalTypes.hs
+++ /dev/null
@@ -1,3597 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Nominal type checking test cases: records, unions, field access, injection, projection
-
-module Hydra.Test.Checking.NominalTypes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Scoping as Scoping
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nominal types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        recordsTests,
-        unionsTests,
-        wrappedTermsTests,
-        eliminationsTests],
-      Testing.testGroupCases = []}
-chainedUnwrappingTests :: Testing.TestGroup
-chainedUnwrappingTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Chained unwrapping",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap then process",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "wrapped"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeStringAliasName),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "wrapped"))}))})),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString " suffix"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap polymorphic then map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "wrappedList"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypePolymorphicWrapperName),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedList"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-eliminationsTests :: Testing.TestGroup
-eliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        recordEliminationsTests,
-        unionEliminationsTests,
-        wrapEliminationsTests],
-      Testing.testGroupCases = []}
-higherOrderRecordProjectionsTests :: Testing.TestGroup
-higherOrderRecordProjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Higher-order record projections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map projection over list of records",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                Core.applicationArgument = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "firstName")}))})),
-              Core.applicationArgument = (Core.TermList [
-                Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypePersonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]}),
-                (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypePersonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Jones"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]}))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map polymorphic projection",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                Core.applicationArgument = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-                  Core.projectionField = (Core.Name "lat")}))})),
-              Core.applicationArgument = (Core.TermList [
-                Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypeLatLonPolyName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lat"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 40)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lon"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-74))))}]}),
-                (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypeLatLonPolyName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lat"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 34)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lon"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-118))))}]}))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "filter using projection",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
-                Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "person"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypePersonName,
-                          Core.projectionField = (Core.Name "age")})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}))}))})),
-              Core.applicationArgument = (Core.TermList [
-                Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypePersonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 35)))}]}),
-                (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypePersonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Jones"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]}))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeVariable TestTypes.testTypePersonName)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-higherOrderUnionEliminationsTests :: Testing.TestGroup
-higherOrderUnionEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Higher-order union eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "map match over list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lessThan"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "less"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "equalTo"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "equal"))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "greaterThan"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "greater"))}))}]}))})),
-              Core.applicationArgument = (Core.TermList [
-                Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypeComparisonName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}}),
-                (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypeComparisonName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "equalTo"),
-                    Core.fieldTerm = Core.TermUnit}}))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "compose match with other functions",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "comp"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lessThan"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "less"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "equalTo"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "equal"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "greaterThan"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "greater"))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "comp"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeComparisonName),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match in lambda body",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "unionValue"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = TestTypes.testTypeNumberName,
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "int"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "i"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "i"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "float"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}]})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "unionValue"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeNumberName),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-monomorphicRecordsTests :: Testing.TestGroup
-monomorphicRecordsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic records",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "latlon record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "LatLon"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lat"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 19.5429)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lon"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-155.6659))))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable (Core.Name "LatLon")))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "latlon with variable",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "LatLon"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lat"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 19.5429)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lon"),
-                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)),
-              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "LatLon"))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "person record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Person"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable (Core.Name "Person")))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Unit"),
-              Core.recordFields = []})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable (Core.Name "Unit")))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "person with variables",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "name"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "age"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Person"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermVariable (Core.Name "name"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermVariable (Core.Name "age"))}]}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "Person"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-monomorphicUnwrappingTests :: Testing.TestGroup
-monomorphicUnwrappingTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic unwrapping",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap string alias",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermUnwrap TestTypes.testTypeStringAliasName))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-monomorphicWrappedTermsTests :: Testing.TestGroup
-monomorphicWrappedTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic wrapped terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "string alias",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeStringAliasName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped integer",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrapped"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeStringAliasName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "first"))}), (Core.TermLiteral (Core.LiteralString "second")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterPolymorphicCaseStatementsTests :: Testing.TestGroup
-multiParameterPolymorphicCaseStatementsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter polymorphic case statements",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "case Either converting both to string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeEitherName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "left"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "right"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))})),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "case Either applied to injection",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                Core.caseStatementTypeName = TestTypes.testTypeEitherName,
-                Core.caseStatementDefault = Nothing,
-                Core.caseStatementCases = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "left"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "n"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "right"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "s"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}))}]})),
-              Core.applicationArgument = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypeEitherName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "left"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "case Either with Triple and nested projections",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "triple"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = TestTypes.testTypeEitherName,
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "left"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "coords"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-                            Core.projectionField = (Core.Name "lat")})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "coords"))}))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "right"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "t"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypeTripleName,
-                            Core.projectionField = (Core.Name "first")})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))}]})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                    Core.projectionTypeName = TestTypes.testTypeTripleName,
-                    Core.projectionField = (Core.Name "second")})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "triple"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "t3"),
-                    Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                      Core.forallTypeParameter = (Core.Name "t4"),
-                      Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                            Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeTripleName),
-                              Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                            Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                              Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                                Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeLatLonPolyName),
-                                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))})),
-                              Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeTripleName),
-                                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t2"))})),
-                                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t3"))}))}))})),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t4"))})),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "case Either with polymorphic let bindings",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "makeLeft"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = TestTypes.testTypeEitherName,
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "left"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "makeRight"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = TestTypes.testTypeEitherName,
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "right"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "y"))}}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "flag"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = TestTypes.testTypeEitherName,
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "left"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "n"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "makeRight")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "right"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "s"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "makeLeft")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "flag"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterPolymorphicInjectionsTests :: Testing.TestGroup
-multiParameterPolymorphicInjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter polymorphic injections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either left with int",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeEitherName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "left"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either right with string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeEitherName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "right"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "hello"))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either containing LatLonPoly in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeEitherName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "right"),
-                Core.fieldTerm = (Core.TermList [
-                  Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeLatLonPolyName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lat"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 40)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lon"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-74))))}]})])}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.applicationTypeArgument = (Core.TypeList (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeLatLonPolyName),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "either in triple in map with shared type variables",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x0"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x1"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x2"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermMap (M.fromList [
-                    (Core.TermLiteral (Core.LiteralString "key"), (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = TestTypes.testTypeTripleName,
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "first"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = TestTypes.testTypeEitherName,
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "left"),
-                              Core.fieldTerm = (Core.TermVariable (Core.Name "x0"))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "second"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = TestTypes.testTypeEitherName,
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "left"),
-                              Core.fieldTerm = (Core.TermVariable (Core.Name "x0"))}}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "third"),
-                          Core.fieldTerm = (Core.TermInject (Core.Injection {
-                            Core.injectionTypeName = TestTypes.testTypeEitherName,
-                            Core.injectionField = Core.Field {
-                              Core.fieldName = (Core.Name "right"),
-                              Core.fieldTerm = (Core.TermVariable (Core.Name "x1"))}}))}]})))]))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "t3"),
-                    Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                      Core.forallTypeParameter = (Core.Name "t4"),
-                      Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                        Core.forallTypeParameter = (Core.Name "t5"),
-                        Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                              Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                                Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.mapTypeValues = (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeTripleName),
-                                      Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                          Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t3"))}))})),
-                                    Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                                      Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                        Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t4"))}))})),
-                                  Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeEitherName),
-                                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t5"))})),
-                                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))}))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterPolymorphicProjectionsTests :: Testing.TestGroup
-multiParameterPolymorphicProjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter polymorphic projections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project first from Triple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeTripleName,
-              Core.projectionField = (Core.Name "first")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeTripleName),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t2"))})),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project second from Triple applied",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypeTripleName,
-                Core.projectionField = (Core.Name "second")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypeTripleName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "first"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "second"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "middle"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "third"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project from Triple and use second field, which is another polymorphic record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "triple"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "key"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = TestTypes.testTypePersonOrSomethingName,
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "person"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "p"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermMaybe Nothing)}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "other"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "m"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "key"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}))}]})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                      Core.projectionTypeName = TestTypes.testTypeTripleName,
-                      Core.projectionField = (Core.Name "second")})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "triple"))}))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "t2"),
-                  Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "t3"),
-                    Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                            Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeTripleName),
-                            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                          Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                            Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-                            Core.applicationTypeArgument = (Core.TypeMap (Core.MapType {
-                              Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t1")),
-                              Core.mapTypeValues = (Core.TypeVariable (Core.Name "t2"))}))}))})),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t3"))})),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                        Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t2")))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterPolymorphicRecordsTests :: Testing.TestGroup
-multiParameterPolymorphicRecordsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter polymorphic records",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "triple with three monomorphic types",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Triple"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "first"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "second"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "middle"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "third"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "Triple")),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeBoolean)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "triple with PersonOrSomething containing map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "k"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "v"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Triple"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "first"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "prefix"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "second"),
-                      Core.fieldTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "other"),
-                          Core.fieldTerm = (Core.TermMap (M.fromList [
-                            (Core.TermVariable (Core.Name "k"), (Core.TermVariable (Core.Name "v")))]))}}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "third"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 999)))}]}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "Triple")),
-                          Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})),
-                        Core.applicationTypeArgument = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "PersonOrSomething")),
-                          Core.applicationTypeArgument = (Core.TypeMap (Core.MapType {
-                            Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                            Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                      Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterPolymorphicUnwrappersTests :: Testing.TestGroup
-multiParameterPolymorphicUnwrappersTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter polymorphic unwrappers",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap symmetric triple to tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "st"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypeTripleName,
-                  Core.projectionField = (Core.Name "first")})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeSymmetricTripleName),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "st"))}))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypeTripleName,
-                  Core.projectionField = (Core.Name "third")})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeSymmetricTripleName),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "st"))}))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeSymmetricTripleName),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap and collect edges in set",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "getEdge"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "st"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                        Core.projectionTypeName = TestTypes.testTypeTripleName,
-                        Core.projectionField = (Core.Name "second")})),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeSymmetricTripleName),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "st"))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "triples"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "getEdge"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "triples"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeSet (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeSymmetricTripleName),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))),
-                  Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t1")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap with maybe to handle optional symmetric triple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "mst"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "st"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermMaybe (Just (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                        Core.projectionTypeName = TestTypes.testTypeTripleName,
-                        Core.projectionField = (Core.Name "second")})),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeSymmetricTripleName),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "st"))}))}))))}))})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "mst"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeSymmetricTripleName),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))),
-                  Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t1")))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multiParameterPolymorphicWrappersTests :: Testing.TestGroup
-multiParameterPolymorphicWrappersTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multi-parameter polymorphic wrappers",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "symmetric triple wrapping simple types",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypeSymmetricTripleName,
-              Core.wrappedTermBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = TestTypes.testTypeTripleName,
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "first"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "second"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "edge"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "third"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeSymmetricTripleName),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "symmetric triple from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "v1"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "e"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "v2"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = TestTypes.testTypeSymmetricTripleName,
-                    Core.wrappedTermBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = TestTypes.testTypeTripleName,
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "first"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "v1"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "second"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "e"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "third"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "v2"))}]}))}))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                Core.forallTypeParameter = (Core.Name "t1"),
-                Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeSymmetricTripleName),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "symmetric triple with nested polymorphic types and foldl",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "sumList"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "lst"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "acc"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "acc"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "lst"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "nums1"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "nums2"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = TestTypes.testTypeSymmetricTripleName,
-                    Core.wrappedTermBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = TestTypes.testTypeTripleName,
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "first"),
-                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "sumList")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "nums1"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "second"),
-                          Core.fieldTerm = (Core.TermList [
-                            Core.TermVariable (Core.Name "nums1"),
-                            (Core.TermVariable (Core.Name "nums2"))])},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "third"),
-                          Core.fieldTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "sumList")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "nums2"))}))}]}))}))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeSymmetricTripleName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.applicationTypeArgument = (Core.TypeList (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multipleUnwrapOperationsTests :: Testing.TestGroup
-multipleUnwrapOperationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multiple unwrap operations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap different types",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "stringWrapped"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "listWrapped"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeStringAliasName),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "stringWrapped"))}), (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypePolymorphicWrapperName),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "listWrapped"))}))))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-multipleWrappingLevelsTests :: Testing.TestGroup
-multipleWrappingLevelsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Multiple wrapping levels",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped in optional",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "wrapped"))})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeVariable TestTypes.testTypeStringAliasName)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "list of wrapped polymorphic",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-                Core.wrappedTermBody = (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])}),
-              (Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-                Core.wrappedTermBody = (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))])}))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedUnionEliminationsTests :: Testing.TestGroup
-nestedUnionEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested union eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested match statements",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypePersonOrSomethingName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "person"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "p"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                        Core.projectionTypeName = TestTypes.testTypePersonName,
-                        Core.projectionField = (Core.Name "firstName")})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "other"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeNumberName,
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "int"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "i"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "float"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "f"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-                Core.applicationTypeArgument = (Core.TypeVariable TestTypes.testTypeNumberName)})),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lessThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "equalTo"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "greaterThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))}))}]}), (Core.TermLiteral (Core.LiteralString "context")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeComparisonName),
-                Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-nestedWrappedTermsTests :: Testing.TestGroup
-nestedWrappedTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested wrapped terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-              Core.wrappedTermBody = (Core.TermList [
-                Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "a")))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationTypeArgument = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped optional",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-              Core.wrappedTermBody = (Core.TermList [
-                Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationTypeArgument = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped map",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-              Core.wrappedTermBody = (Core.TermList [
-                Core.TermMap (M.fromList [
-                  (Core.TermLiteral (Core.LiteralString "key"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))])])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationTypeArgument = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicRecordProjectionsAppliedTests :: Testing.TestGroup
-polymorphicRecordProjectionsAppliedTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic record projections applied",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lat from LatLonPoly with int32",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-                Core.projectionField = (Core.Name "lat")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "LatLonPoly"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lat"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 40)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lon"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-74))))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lon from LatLonPoly with float64",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-                Core.projectionField = (Core.Name "lon")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "LatLonPoly"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lat"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 40.7128)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lon"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-74.006))))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project head from BuddyListA with string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypeBuddyListAName,
-                Core.projectionField = (Core.Name "head")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "BuddyListA"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "head"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "tail"),
-                    Core.fieldTerm = (Core.TermMaybe Nothing)}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicRecordProjectionsTests :: Testing.TestGroup
-polymorphicRecordProjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic record projections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lat from polymorphic LatLonPoly",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-              Core.projectionField = (Core.Name "lat")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lon from polymorphic LatLonPoly",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-              Core.projectionField = (Core.Name "lon")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project head from BuddyListA",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeBuddyListAName,
-              Core.projectionField = (Core.Name "head")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "BuddyListA")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project tail from BuddyListA",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeBuddyListAName,
-              Core.projectionField = (Core.Name "tail")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "BuddyListA")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "BuddyListB")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicRecordsTests :: Testing.TestGroup
-polymorphicRecordsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic records",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "latlon poly float",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "LatLonPoly"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lat"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 19.5429)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lon"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-155.6659))))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "latlon poly int64",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "LatLonPoly"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lat"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 195429)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lon"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (-1556659))))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "latlon poly variable",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "LatLonPoly"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lat"),
-                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lon"),
-                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "buddylist string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "BuddyListA"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "head"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "first"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "tail"),
-                  Core.fieldTerm = (Core.TermMaybe Nothing)}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "BuddyListA")),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "buddylist variable",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "BuddyListA"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "head"),
-                    Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "tail"),
-                    Core.fieldTerm = (Core.TermMaybe Nothing)}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "BuddyListA")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicRecursiveUnionInjectionsTests :: Testing.TestGroup
-polymorphicRecursiveUnionInjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic recursive union injections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject boolean into UnionPolymorphicRecursive",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "bool"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject string value into UnionPolymorphicRecursive",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "value"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject int value into UnionPolymorphicRecursive",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "value"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 123)))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicUnionEliminationsTests :: Testing.TestGroup
-polymorphicUnionEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic union eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simplePolymorphicUnionTests,
-        usingUnionPolymorphicRecursiveTests,
-        usingKernelTypesTests],
-      Testing.testGroupCases = []}
-polymorphicUnionInjectionsTests :: Testing.TestGroup
-polymorphicUnionInjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic union injections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject person into PersonOrSomething",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "person"),
-                Core.fieldTerm = (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypePersonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "firstName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lastName"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]}))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-                Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject string into PersonOrSomething other variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "other"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "something else"))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject int into PersonOrSomething other variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "other"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicUnionsFromLambdaTests :: Testing.TestGroup
-polymorphicUnionsFromLambdaTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic unions from lambda",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda creating PersonOrSomething other variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "other"),
-                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda creating UnionPolymorphicRecursive value variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "value"),
-                  Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicUnwrappingTests :: Testing.TestGroup
-polymorphicUnwrappingTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic unwrapping",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap polymorphic wrapper",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermUnwrap TestTypes.testTypePolymorphicWrapperName))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-polymorphicWrappedTermsTests :: Testing.TestGroup
-polymorphicWrappedTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphic wrapped terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic wrapper with int",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-              Core.wrappedTermBody = (Core.TermList [
-                Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic wrapper with string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-              Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-              Core.wrappedTermBody = (Core.TermList [
-                Core.TermLiteral (Core.LiteralString "a"),
-                (Core.TermLiteral (Core.LiteralString "b"))])})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic wrapper from lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-                Core.wrappedTermBody = (Core.TermList [
-                  Core.TermVariable (Core.Name "x")])}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePolymorphicWrapperName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-projectionsWithVariablesTests :: Testing.TestGroup
-projectionsWithVariablesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Projections with variables",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project from lambda parameter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "person"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "firstName")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project from polymorphic lambda parameter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "coords"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-                  Core.projectionField = (Core.Name "lat")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "coords"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "multiple projections from same record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "person"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "firstName")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "lastName")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recordEliminationsTests :: Testing.TestGroup
-recordEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Record eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleRecordProjectionsTests,
-        recordProjectionsAppliedToRecordsTests,
-        polymorphicRecordProjectionsTests,
-        polymorphicRecordProjectionsAppliedTests,
-        recordProjectionsWithVariablesTests,
-        recordProjectionsInComplexContextsTests,
-        multiParameterPolymorphicProjectionsTests,
-        higherOrderRecordProjectionsTests,
-        recursiveRecordProjectionsTests,
-        recordProjectionsWithMutualRecursionTests,
-        projectionsWithVariablesTests],
-      Testing.testGroupCases = []}
-recordProjectionsAppliedToRecordsTests :: Testing.TestGroup
-recordProjectionsAppliedToRecordsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Record projections applied to records",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project firstName applied to person record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypePersonName,
-                Core.projectionField = (Core.Name "firstName")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "Person"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Smith"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project age applied to person record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypePersonName,
-                Core.projectionField = (Core.Name "age")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "Person"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "firstName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lastName"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Jones"))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "age"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lat applied to LatLon record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypeLatLonName,
-                Core.projectionField = (Core.Name "lat")})),
-              Core.applicationArgument = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "LatLon"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lat"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 40.7128)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lon"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-74.006))))}]}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recordProjectionsInComplexContextsTests :: Testing.TestGroup
-recordProjectionsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Record projections in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "projection in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "person"),
-                  Core.bindingTerm = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "Person"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "firstName"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Charlie"))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lastName"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Brown"))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "age"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 35)))}]})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "getName"),
-                  Core.bindingTerm = (Core.TermProject (Core.Projection {
-                    Core.projectionTypeName = TestTypes.testTypePersonName,
-                    Core.projectionField = (Core.Name "firstName")})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "getName")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "projection in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypePersonName,
-              Core.projectionField = (Core.Name "firstName")}), (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypePersonName,
-              Core.projectionField = (Core.Name "age")})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-                Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "projection in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypePersonName,
-                Core.projectionField = (Core.Name "firstName")}),
-              (Core.TermProject (Core.Projection {
-                Core.projectionTypeName = TestTypes.testTypePersonName,
-                Core.projectionField = (Core.Name "lastName")}))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recordProjectionsWithMutualRecursionTests :: Testing.TestGroup
-recordProjectionsWithMutualRecursionTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Record projections with mutual recursion",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project head from BuddyListA",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeBuddyListAName,
-              Core.projectionField = (Core.Name "head")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project tail from BuddyListB",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeBuddyListBName,
-              Core.projectionField = (Core.Name "tail")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListBName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "chained projections across mutual recursion",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "listA"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                    Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "listB"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                          Core.applicationArgument = (Core.TermMaybe Nothing)})),
-                        Core.applicationArgument = (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypeBuddyListAName,
-                          Core.projectionField = (Core.Name "tail")}))})),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypeBuddyListBName,
-                          Core.projectionField = (Core.Name "tail")})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "listB"))}))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                    Core.projectionTypeName = TestTypes.testTypeBuddyListAName,
-                    Core.projectionField = (Core.Name "tail")})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "listA"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListBName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recordProjectionsWithVariablesTests :: Testing.TestGroup
-recordProjectionsWithVariablesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Record projections with variables",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project from lambda parameter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "person"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "firstName")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project from polymorphic lambda parameter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "coords"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypeLatLonPolyName,
-                  Core.projectionField = (Core.Name "lat")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "coords"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "multiple projections from same record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "person"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "firstName")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "lastName")})),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "person"))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recordsInComplexContextsTests :: Testing.TestGroup
-recordsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Records in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "records in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Person"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Jones"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}]}), (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "LatLon"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lat"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1.0)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lon"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.0)))}]})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeVariable (Core.Name "Person")),
-              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "LatLon"))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "poly records in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "LatLonPoly"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lat"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lon"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]}), (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "BuddyListA"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "head"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "tail"),
-                  Core.fieldTerm = (Core.TermMaybe Nothing)}]})))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "LatLonPoly")),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.pairTypeSecond = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "BuddyListA")),
-                Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "recursive record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "IntList"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "head"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "tail"),
-                  Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "IntList"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "head"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 43)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "tail"),
-                        Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable (Core.Name "IntList")))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recordsTests :: Testing.TestGroup
-recordsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Records",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        monomorphicRecordsTests,
-        polymorphicRecordsTests,
-        recordsInComplexContextsTests,
-        multiParameterPolymorphicRecordsTests],
-      Testing.testGroupCases = []}
-recursiveRecordProjectionsTests :: Testing.TestGroup
-recursiveRecordProjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Recursive record projections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "nested projection from recursive record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "intList"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermProject (Core.Projection {
-                    Core.projectionTypeName = TestTypes.testTypeIntListName,
-                    Core.projectionField = (Core.Name "head")}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                    Core.projectionTypeName = TestTypes.testTypeIntListName,
-                    Core.projectionField = (Core.Name "tail")})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "intList"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeIntListName),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-recursiveUnionEliminationsTests :: Testing.TestGroup
-recursiveUnionEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Recursive union eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match HydraType recursively",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeHydraTypeName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "literal"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "lit"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeHydraLiteralTypeName,
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "boolean"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "b"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBoolean")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "s"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "lit"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "list"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "nested"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "list"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeHydraTypeName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simplePolymorphicUnionTests :: Testing.TestGroup
-simplePolymorphicUnionTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple polymorphic unions",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match PersonOrSomething with string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypePersonOrSomethingName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "person"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "p"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermProject (Core.Projection {
-                        Core.projectionTypeName = TestTypes.testTypePersonName,
-                        Core.projectionField = (Core.Name "firstName")})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "other"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-                Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match PersonOrSomething instantiated with string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                Core.caseStatementTypeName = TestTypes.testTypePersonOrSomethingName,
-                Core.caseStatementDefault = Nothing,
-                Core.caseStatementCases = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "person"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "p"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypePersonName,
-                          Core.projectionField = (Core.Name "firstName")})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "other"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}]})),
-              Core.applicationArgument = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "other"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleRecordProjectionsTests :: Testing.TestGroup
-simpleRecordProjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple record projections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project firstName from Person",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypePersonName,
-              Core.projectionField = (Core.Name "firstName")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lastName from Person",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypePersonName,
-              Core.projectionField = (Core.Name "lastName")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project age from Person",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypePersonName,
-              Core.projectionField = (Core.Name "age")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lat from LatLon",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeLatLonName,
-              Core.projectionField = (Core.Name "lat")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "LatLon")),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "project lon from LatLon",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-              Core.projectionTypeName = TestTypes.testTypeLatLonName,
-              Core.projectionField = (Core.Name "lon")})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "LatLon")),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleUnionInjectionsTests :: Testing.TestGroup
-simpleUnionInjectionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple union injections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Comparison lessThan variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeComparisonName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "lessThan"),
-                Core.fieldTerm = Core.TermUnit}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeComparisonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Comparison equalTo variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeComparisonName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "equalTo"),
-                Core.fieldTerm = Core.TermUnit}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeComparisonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Comparison greaterThan variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeComparisonName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "greaterThan"),
-                Core.fieldTerm = Core.TermUnit}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeComparisonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-simpleUnitVariantEliminationsTests :: Testing.TestGroup
-simpleUnitVariantEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Simple unit inject eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Comparison with all cases",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lessThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "less"))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "equalTo"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "equal"))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "greaterThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "greater"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeComparisonName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Comparison returning int32",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lessThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "equalTo"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "greaterThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeComparisonName),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match applied to Comparison variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-                Core.caseStatementDefault = Nothing,
-                Core.caseStatementCases = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "less"))}))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "equalTo"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "equal"))}))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "greaterThan"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "greater"))}))}]})),
-              Core.applicationArgument = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypeComparisonName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "equalTo"),
-                  Core.fieldTerm = Core.TermUnit}}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unionEliminationsInComplexContextsTests :: Testing.TestGroup
-unionEliminationsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Union eliminations in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "matcher"),
-                  Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lessThan"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "less"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "equalTo"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "equal"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "greaterThan"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "greater"))}))}]})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "matcher"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeComparisonName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = TestTypes.testTypePersonOrSomethingName,
-                      Core.caseStatementDefault = Nothing,
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "person"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "p"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                Core.projectionTypeName = TestTypes.testTypePersonName,
-                                Core.projectionField = (Core.Name "firstName")})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "other"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}]})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "other"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "John"))}}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypePersonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match with polymorphic result in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = TestTypes.testTypePersonOrSomethingName,
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "person"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "p"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "age")})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "p"))}))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "other"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}]})),
-                Core.applicationArgument = (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "other"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}}))}),
-              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unionEliminationsTests :: Testing.TestGroup
-unionEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Union eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleUnitVariantEliminationsTests,
-        unionEliminationsWithDataTests,
-        polymorphicUnionEliminationsTests,
-        unionEliminationsWithDefaultsTests,
-        nestedUnionEliminationsTests,
-        unionEliminationsInComplexContextsTests,
-        multiParameterPolymorphicCaseStatementsTests,
-        higherOrderUnionEliminationsTests,
-        recursiveUnionEliminationsTests],
-      Testing.testGroupCases = []}
-unionEliminationsWithDataTests :: Testing.TestGroup
-unionEliminationsWithDataTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Union eliminations with data",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Number extracting int values",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeNumberName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "int"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "i"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "i"))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "float"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeNumberName),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Number converting to string",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeNumberName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "int"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "i"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "float"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeNumberName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Number applied to int variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                Core.caseStatementTypeName = TestTypes.testTypeNumberName,
-                Core.caseStatementDefault = Nothing,
-                Core.caseStatementCases = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "int"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "i"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "i"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "float"),
-                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "f"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}]})),
-              Core.applicationArgument = (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypeNumberName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "int"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Timestamp with mixed data types",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeTimestampName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "unixTimeMillis"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "millis"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint64")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "millis"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "date"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "dateStr"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "dateStr"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeTimestampName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unionEliminationsWithDefaultsTests :: Testing.TestGroup
-unionEliminationsWithDefaultsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Union eliminations with defaults",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Comparison with default case",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeComparisonName,
-              Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "unknown"))),
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "lessThan"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "less"))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "equalTo"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "equal"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeComparisonName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match Number with default case",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeNumberName,
-              Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))),
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "int"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "i"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "i"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeNumberName),
-              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "match UnionMonomorphic with default",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-              Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "fallback"))),
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "bool"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "b"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBoolean")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "string"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "s"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unionInjectionsWithDataTests :: Testing.TestGroup
-unionInjectionsWithDataTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Union injections with data",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Number int variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeNumberName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "int"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeNumberName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Number float variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeNumberName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "float"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.14)))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeNumberName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Timestamp unixTimeMillis variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeTimestampName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "unixTimeMillis"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 1609459200000)))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeTimestampName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "inject into Timestamp date variant",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeTimestampName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "date"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "2021-01-01"))}})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeTimestampName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unionsInComplexContextsTests :: Testing.TestGroup
-unionsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unions in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "union in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermInject (Core.Injection {
-              Core.injectionTypeName = TestTypes.testTypeNumberName,
-              Core.injectionField = Core.Field {
-                Core.fieldName = (Core.Name "int"),
-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}), (Core.TermLiteral (Core.LiteralString "context")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeVariable TestTypes.testTypeNumberName),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "union in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypeNumberName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "int"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}}),
-              (Core.TermInject (Core.Injection {
-                Core.injectionTypeName = TestTypes.testTypeNumberName,
-                Core.injectionField = Core.Field {
-                  Core.fieldName = (Core.Name "float"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.5)))}}))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeVariable TestTypes.testTypeNumberName)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "polymorphic union in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "value"),
-                  Core.bindingTerm = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = TestTypes.testTypePersonOrSomethingName,
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "other"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))}})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "value"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypePersonOrSomethingName),
-              Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unionsTests :: Testing.TestGroup
-unionsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unions",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        simpleUnionInjectionsTests,
-        unionInjectionsWithDataTests,
-        polymorphicUnionInjectionsTests,
-        polymorphicRecursiveUnionInjectionsTests,
-        polymorphicUnionsFromLambdaTests,
-        unionsInComplexContextsTests,
-        multiParameterPolymorphicInjectionsTests],
-      Testing.testGroupCases = []}
-unwrapEliminationsInApplicationsTests :: Testing.TestGroup
-unwrapEliminationsInApplicationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unwrap eliminations in applications",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap applied to wrapped term",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeStringAliasName),
-              Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "hello"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap polymorphic applied",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypePolymorphicWrapperName),
-              Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypePolymorphicWrapperName,
-                Core.wrappedTermBody = (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-unwrapInComplexContextsTests :: Testing.TestGroup
-unwrapInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unwrap in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "unwrapper"),
-                  Core.bindingTerm = (Core.TermUnwrap TestTypes.testTypeStringAliasName),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "wrapped"),
-                  Core.bindingTerm = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "test"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "unwrapper")),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "wrapped"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap in tuple",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermUnwrap TestTypes.testTypeStringAliasName, (Core.TermLiteral (Core.LiteralString "context")))))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-              Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "unwrap in lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "wrapped"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeStringAliasName),
-                Core.applicationArgument = (Core.TermVariable (Core.Name "wrapped"))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-usingKernelTypesTests :: Testing.TestGroup
-usingKernelTypesTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Using kernel types",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "case statement on CoderDirection applied to argument",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "dir"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "coder"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "hydra.coders.CoderDirection"),
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "encode"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "_"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v12"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                  Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-                                  Core.projectionField = (Core.Name "encode")})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "coder"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v12"))}))}))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "decode"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "_"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v12"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                  Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-                                  Core.projectionField = (Core.Name "decode")})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "coder"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v12"))}))}))}))}]})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "dir"))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.coders.CoderDirection")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Coder")),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.context.Context")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                        Core.eitherTypeLeft = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.context.InContext")),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "hydra.errors.Error"))})),
-                        Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))}))}))}))}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabled"]}]}
-usingUnionPolymorphicRecursiveTests :: Testing.TestGroup
-usingUnionPolymorphicRecursiveTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "using UnionPolymorphicRecursive",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "non-applied UnionPolymorphicRecursive",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "test"),
-                  Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                    Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "value"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "i"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "applied UnionPolymorphicRecursive with int32",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "test"),
-                  Core.bindingTerm = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                      Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "value"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "i"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                    Core.applicationArgument = (Core.TermInject (Core.Injection {
-                      Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                      Core.injectionField = Core.Field {
-                        Core.fieldName = (Core.Name "value"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "applied UnionPolymorphicRecursive with int32 in lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "test"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                        Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "value"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "i"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "applied generic UnionPolymorphicRecursive in lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "test"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                        Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "value"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "ignored"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))}))}]})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-              Core.forallTypeParameter = (Core.Name "t0"),
-              Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-wrapEliminationsTests :: Testing.TestGroup
-wrapEliminationsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Wrap eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        monomorphicUnwrappingTests,
-        polymorphicUnwrappingTests,
-        unwrapEliminationsInApplicationsTests,
-        unwrapInComplexContextsTests,
-        multiParameterPolymorphicUnwrappersTests,
-        chainedUnwrappingTests,
-        multipleUnwrapOperationsTests],
-      Testing.testGroupCases = []}
-wrappedTermsInComplexContextsTests :: Testing.TestGroup
-wrappedTermsInComplexContextsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Wrapped terms in complex contexts",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped in record",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = TestTypes.testTypePersonName,
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "firstName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "John"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "lastName"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "age"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypePersonName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped in let binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "alias"),
-                  Core.bindingTerm = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "test"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "alias"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable TestTypes.testTypeStringAliasName))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "wrapped in list",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\result -> ShowCore.type_ (Scoping.typeSchemeToFType (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-              Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "first"))}),
-              (Core.TermWrap (Core.WrappedTerm {
-                Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "second"))}))]))),
-            Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeVariable TestTypes.testTypeStringAliasName)))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-wrappedTermsTests :: Testing.TestGroup
-wrappedTermsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Wrapped terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        monomorphicWrappedTermsTests,
-        polymorphicWrappedTermsTests,
-        wrappedTermsInComplexContextsTests,
-        nestedWrappedTermsTests,
-        multipleWrappingLevelsTests,
-        multiParameterPolymorphicWrappersTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Dependencies.hs b/src/test/haskell/Hydra/Test/Dependencies.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Dependencies.hs
+++ /dev/null
@@ -1,1104 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for dependency analysis and let-term transformations
-
-module Hydra.Test.Dependencies where
-import qualified Hydra.Core as Core
-import qualified Hydra.Dependencies as Dependencies
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Test cases for dependency analysis and let-term transformations
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "dependencies",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "simplifyTerm",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "const application with literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.simplifyTerm (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "foo")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "identity application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.simplifyTerm (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "x"))])})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermVariable (Core.Name "y"),
-                  (Core.TermVariable (Core.Name "y"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unused parameter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.simplifyTerm (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "foo")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested lambda applications",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.simplifyTerm (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralString "foo"),
-                          (Core.TermVariable (Core.Name "a"))])})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo"),
-                  (Core.TermVariable (Core.Name "y"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "flattenLetTerms",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-let term unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.flattenLetTerms (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list term unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.flattenLetTerms (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo")]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sequential lets in body are flattened",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.flattenLetTerms (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermVariable (Core.Name "y"))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested binding in let value is flattened",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.flattenLetTerms (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "x"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                            Core.bindingTypeScheme = Nothing},
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "y"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermVariable (Core.Name "y"))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "a"),
-                    (Core.TermVariable (Core.Name "b"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b_x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b_y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "b_x"),
-                        (Core.TermVariable (Core.Name "b_y"))]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "a"),
-                    (Core.TermVariable (Core.Name "b"))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple levels of nesting are flattened",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.flattenLetTerms (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "x"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                            Core.bindingTypeScheme = Nothing},
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "y"),
-                            Core.bindingTerm = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "p"),
-                                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                                  Core.bindingTypeScheme = Nothing},
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "q"),
-                                  Core.bindingTerm = (Core.TermList [
-                                    Core.TermVariable (Core.Name "x"),
-                                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]),
-                                  Core.bindingTypeScheme = Nothing}],
-                              Core.letBody = (Core.TermList [
-                                Core.TermVariable (Core.Name "a"),
-                                (Core.TermVariable (Core.Name "q"))])})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermVariable (Core.Name "y"))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "a"),
-                    (Core.TermVariable (Core.Name "b"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b_x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b_y_p"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b_y_q"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "b_x"),
-                        (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b_y"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "a"),
-                        (Core.TermVariable (Core.Name "b_y_q"))]),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "b_x"),
-                        (Core.TermVariable (Core.Name "b_y"))]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "a"),
-                    (Core.TermVariable (Core.Name "b"))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "liftLambdaAboveLet",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple let with lambda in body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bare lambda unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bare let unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda with let in body unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let with two nested lambdas",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "z"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "z"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda inside let body already above let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "z"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "z"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let without lambda in body unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple let bindings with lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "z"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested lets with lambda at innermost level",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "z"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "y"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda between two lets",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hello")),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple lambdas between nested lets",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "b"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "a"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "a"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "b"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "a"))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple lambdas already above let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "z"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "z"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotation above let containing lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.annotatedTermAnnotation = M.empty})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotation above lambda in let body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.annotatedTermAnnotation = M.empty}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.annotatedTermAnnotation = M.empty}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotation between two lambdas",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "z"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.annotatedTermAnnotation = M.empty}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "z"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "x"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.annotatedTermAnnotation = M.empty}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotation on the body of lambda in let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (Core.TermVariable (Core.Name "x")),
-                      Core.annotatedTermAnnotation = M.empty}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                      Core.annotatedTermBody = (Core.TermVariable (Core.Name "x")),
-                      Core.annotatedTermAnnotation = M.empty}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotation on lambda already above let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.annotatedTermAnnotation = M.empty})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let-lambda inside a list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let-lambda in multiple list elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermList [
-                  Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}),
-                  (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "z"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "w"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))}))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))}),
-                  (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "w"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "z"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "z"))}))}))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let-lambda in a let binding value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "x"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let-lambda inside a pair",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermPair (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}), (Core.TermLiteral (Core.LiteralString "test")))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "x"))}))}), (Core.TermLiteral (Core.LiteralString "test")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let-lambda in both elements of a pair",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermPair (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}), (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "z"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "w"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))})))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "x"))}))}), (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "w"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "z"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "z"))}))})))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let-lambda inside lambda body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Dependencies.liftLambdaAboveLet (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "outer"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "inner"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "outer"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "inner"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "x"),
-                          Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "x"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "topologicalSortBindings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "isolated bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) (Dependencies.topologicalSortBindingMap (Maps.fromList [
-                  (Core.Name "a", (Core.TermLiteral (Core.LiteralString "foo"))),
-                  (Core.Name "b", (Core.TermLiteral (Core.LiteralString "bar")))]))),
-                Testing.universalTestCaseExpected = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) [
-                  [
-                    (Core.Name "a", (Core.TermLiteral (Core.LiteralString "foo")))],
-                  [
-                    (Core.Name "b", (Core.TermLiteral (Core.LiteralString "bar")))]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single recursive binding",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) (Dependencies.topologicalSortBindingMap (Maps.fromList [
-                  (Core.Name "a", (Core.TermList [
-                    Core.TermVariable (Core.Name "a")]))]))),
-                Testing.universalTestCaseExpected = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) [
-                  [
-                    (Core.Name "a", (Core.TermList [
-                      Core.TermVariable (Core.Name "a")]))]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mutually recursive bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) (Dependencies.topologicalSortBindingMap (Maps.fromList [
-                  (Core.Name "a", (Core.TermList [
-                    Core.TermVariable (Core.Name "b")])),
-                  (Core.Name "b", (Core.TermList [
-                    Core.TermVariable (Core.Name "a")]))]))),
-                Testing.universalTestCaseExpected = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) [
-                  [
-                    (Core.Name "a", (Core.TermList [
-                      Core.TermVariable (Core.Name "b")])),
-                    (Core.Name "b", (Core.TermList [
-                      Core.TermVariable (Core.Name "a")]))]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) (Dependencies.topologicalSortBindingMap (Maps.fromList [
-                  (Core.Name "a", (Core.TermVariable (Core.Name "b"))),
-                  (Core.Name "b", (Core.TermList [
-                    Core.TermVariable (Core.Name "a"),
-                    (Core.TermVariable (Core.Name "c"))])),
-                  (Core.Name "c", (Core.TermLiteral (Core.LiteralString "foo"))),
-                  (Core.Name "d", (Core.TermLiteral (Core.LiteralString "bar")))]))),
-                Testing.universalTestCaseExpected = (ShowCore.list (\group -> ShowCore.list (\pair -> Strings.cat [
-                  "(",
-                  (Core.unName (Pairs.first pair)),
-                  ", ",
-                  (ShowCore.term (Pairs.second pair)),
-                  ")"]) group) [
-                  [
-                    (Core.Name "c", (Core.TermLiteral (Core.LiteralString "foo")))],
-                  [
-                    (Core.Name "a", (Core.TermVariable (Core.Name "b"))),
-                    (Core.Name "b", (Core.TermList [
-                      Core.TermVariable (Core.Name "a"),
-                      (Core.TermVariable (Core.Name "c"))]))],
-                  [
-                    (Core.Name "d", (Core.TermLiteral (Core.LiteralString "bar")))]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Differentiation.hs b/src/test/haskell/Hydra/Test/Differentiation.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Differentiation.hs
+++ /dev/null
@@ -1,795 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for automatic differentiation
-
-module Hydra.Test.Differentiation where
-import qualified Hydra.Core as Core
-import qualified Hydra.Differentiation as Differentiation
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Variables as Variables
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for automatic differentiation
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "differentiation",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "basic rules",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable wrt itself",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable wrt different variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermVariable (Core.Name "y")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float64 literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "identity function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateFunction (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "constant function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateFunction (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda binding different variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda shadowing differentiation variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "unary primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin of variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp of variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin of different variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "binary primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "add variable to itself",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiply variable by itself",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "subtract constant from variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "chain rule",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested sin(cos(x))",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "_x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "_x"))}))}))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "structural",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list of terms",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermList [
-                  Core.TermVariable (Core.Name "x"),
-                  (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)),
-                  (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "pair of terms",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)), (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unit term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.differentiateTerm (Core.Name "x") Core.TermUnit)),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "evaluate derivatives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x) at 3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermVariable (Core.Name "x"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(42.0) at 3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x+x) at 3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x*x) at 3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 6.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x*x) at 5.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x-5) at 7.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 7.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(sin(x)) at 0.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(sin(x)) at pi/2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5707963267948966))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 6.12323399574e-17))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(cos(x)) at 1.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-0.841470984808)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(cos(x)) at pi",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592653589793))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.22464679915e-16)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(exp(x)) at 0.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(exp(x)) at 1.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.71828182846))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(log(x)) at 1.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(log(x)) at e",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.718281828459045))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.367879441171))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(sqrt(x)) at 4.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.25))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x^3) at 2.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 12.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(sin(cos(x))) at 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-0.30635890919)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(sin(cos(x))) at 1.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-0.721606149063)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(exp(sin(x))) at 0.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "d/dx(x*sin(x)) at pi",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592653589793))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.14159265359)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "gradient check",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "x^2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin(x)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5403))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp(x)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.6487))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "x^3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 6.75))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log(x)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos(x)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-0.84147)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin(cos(x))",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-0.72161)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "x*sin(x)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Variables.replaceFreeTermVariable (Core.Name "x") (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))) (Differentiation.differentiateTerm (Core.Name "x") (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 7.7004e-2))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "gradient",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "add two variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.gradient (Core.Name "Gradient") [
-                  Core.Name "x",
-                  (Core.Name "y")] (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Gradient"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "product of two variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.gradient (Core.Name "Gradient") [
-                  Core.Name "x",
-                  (Core.Name "y")] (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Gradient"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))}))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))}))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single variable partial",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.gradient (Core.Name "Gradient") [
-                  Core.Name "x",
-                  (Core.Name "y")] (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Gradient"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "constant",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Differentiation.gradient (Core.Name "Gradient") [
-                  Core.Name "x",
-                  (Core.Name "y")] (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 7.0))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Gradient"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/EtaExpansion.hs b/src/test/haskell/Hydra/Test/EtaExpansion.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/EtaExpansion.hs
+++ /dev/null
@@ -1,2235 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for eta expansion of terms
-
-module Hydra.Test.EtaExpansion where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for eta expansion of terms
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "eta expansion",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Partial application of primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "Bare primitives are not expanded",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "unary primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "binary primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "Partially applied primitives expand with lambdas",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "binary primitive with one argument",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v1"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "ternary primitive with one argument",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v1"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "v2"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v2"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "Fully applied primitives are not expanded",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "unary primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "FOO"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "FOO"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "binary primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a,b,c"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a,b,c"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "Record projections",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [
-                Testing.TestGroup {
-                  Testing.testGroupName = "Bare projections expand with a lambda",
-                  Testing.testGroupDescription = Nothing,
-                  Testing.testGroupSubgroups = [],
-                  Testing.testGroupCases = [
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection without argument",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypePersonName,
-                          Core.projectionField = (Core.Name "firstName")})))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v1"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermProject (Core.Projection {
-                              Core.projectionTypeName = TestTypes.testTypePersonName,
-                              Core.projectionField = (Core.Name "firstName")})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []}]},
-                Testing.TestGroup {
-                  Testing.testGroupName = "Applied projections are not expanded",
-                  Testing.testGroupDescription = Nothing,
-                  Testing.testGroupSubgroups = [],
-                  Testing.testGroupCases = [
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection with argument",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "person"))})))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "person"))})))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []},
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection applied to a record",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")})),
-                          Core.applicationArgument = (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = TestTypes.testTypePersonName,
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "firstName"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "John"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "lastName"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))}]}))})))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")})),
-                          Core.applicationArgument = (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = TestTypes.testTypePersonName,
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "firstName"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "John"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "lastName"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Doe"))}]}))})))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []}]},
-                Testing.TestGroup {
-                  Testing.testGroupName = "Projections nested in other structures",
-                  Testing.testGroupDescription = Nothing,
-                  Testing.testGroupSubgroups = [],
-                  Testing.testGroupCases = [
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection in a list",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                          Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")}),
-                          (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))]))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                          Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                Core.projectionTypeName = TestTypes.testTypePersonName,
-                                Core.projectionField = (Core.Name "firstName")})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}),
-                          (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))]))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []},
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection in a tuple",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypePersonName,
-                          Core.projectionField = (Core.Name "firstName")}), (Core.TermLiteral (Core.LiteralString "default")))))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v1"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermProject (Core.Projection {
-                              Core.projectionTypeName = TestTypes.testTypePersonName,
-                              Core.projectionField = (Core.Name "firstName")})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}), (Core.TermLiteral (Core.LiteralString "default")))))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []},
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection in let binding",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "getter"),
-                              Core.bindingTerm = (Core.TermProject (Core.Projection {
-                                Core.projectionTypeName = TestTypes.testTypePersonName,
-                                Core.projectionField = (Core.Name "firstName")})),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermVariable (Core.Name "getter"))})))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "getter"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "v1"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = TestTypes.testTypePersonName,
-                                    Core.projectionField = (Core.Name "firstName")})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermVariable (Core.Name "getter"))})))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []},
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection in lambda body",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")}))})))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                Core.projectionTypeName = TestTypes.testTypePersonName,
-                                Core.projectionField = (Core.Name "firstName")})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))})))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []}]},
-                Testing.TestGroup {
-                  Testing.testGroupName = "Function-valued projections",
-                  Testing.testGroupDescription = Nothing,
-                  Testing.testGroupSubgroups = [],
-                  Testing.testGroupCases = [
-                    Testing.TestCaseWithMetadata {
-                      Testing.testCaseWithMetadataName = "projection of function-valued field applied to arguments should not be expanded",
-                      Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                        Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                  Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = TestTypes.testTypeTripleName,
-                                    Core.projectionField = (Core.Name "first")})),
-                                  Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.applicationArgument = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                  Core.typeApplicationTermBody = (Core.TermRecord (Core.Record {
-                                    Core.recordTypeName = TestTypes.testTypeTripleName,
-                                    Core.recordFields = [
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "first"),
-                                        Core.fieldTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))},
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "second"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "middle"))},
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "third"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "last"))}]})),
-                                  Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "DATA"))})))),
-                        Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                  Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                                    Core.projectionTypeName = TestTypes.testTypeTripleName,
-                                    Core.projectionField = (Core.Name "first")})),
-                                  Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.applicationArgument = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                  Core.typeApplicationTermBody = (Core.TermRecord (Core.Record {
-                                    Core.recordTypeName = TestTypes.testTypeTripleName,
-                                    Core.recordFields = [
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "first"),
-                                        Core.fieldTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))},
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "second"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "middle"))},
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "third"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "last"))}]})),
-                                  Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "DATA"))})))})),
-                      Testing.testCaseWithMetadataDescription = Nothing,
-                      Testing.testCaseWithMetadataTags = []}]}],
-              Testing.testGroupCases = []}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "Polymorphic terms (System F)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "Type lambdas in let bindings",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "polymorphic identity function",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "id"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "id"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "monomorphic partially applied primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "partial"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "partial"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "partial"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "partial"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "monomorphic projection",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "getter"),
-                          Core.bindingTerm = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "getter"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "getter"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                Core.projectionTypeName = TestTypes.testTypePersonName,
-                                Core.projectionField = (Core.Name "firstName")})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "Person")),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "getter"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "Type applications of polymorphic bindings",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "polymorphic variable with type application",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                        Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                        Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "type application of identity applied to binary function with no arguments",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                          Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))}))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                          Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))}))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "type application of identity applied to partially applied binary function",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                          Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))}))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                          Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))})),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v1"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "type application of identity applied to fully applied binary function",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                          Core.typeApplicationTermType = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo,bar"))}))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                          Core.typeApplicationTermType = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo,bar"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "type application of identity applied to binary function, then applied to one argument",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                            Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                            Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))}))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "v1"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                                Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))}))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "type application of identity applied to binary function, then fully applied to two arguments",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                              Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))}))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo,bar"))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "id"),
-                          Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "a"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [
-                              Core.Name "a"],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "id")),
-                              Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))}))}))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo,bar"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "Higher-Order Functions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "Functions that return functions",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "lambda returning bare binary primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "lambda returning bare unary primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "lambda returning partially applied primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "v1"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "lambda returning fully applied primitive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "lambda returning bare projection",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "person"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermProject (Core.Projection {
-                        Core.projectionTypeName = TestTypes.testTypePersonName,
-                        Core.projectionField = (Core.Name "firstName")}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "person"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "v1"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermProject (Core.Projection {
-                            Core.projectionTypeName = TestTypes.testTypePersonName,
-                            Core.projectionField = (Core.Name "firstName")})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "nested lambdas with partial application in body",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v1"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "lambda returning lambda returning partial application",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "z"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "z"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "Let terms",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "partial application of a let-bound function",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "simple",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "helper"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "arg1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "arg2"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "arg3"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                  Core.applicationArgument = (Core.TermList [
-                                    Core.TermVariable (Core.Name "arg1"),
-                                    (Core.TermVariable (Core.Name "arg2")),
-                                    (Core.TermVariable (Core.Name "arg3"))])}))}))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))}))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "helper"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "arg1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "arg2"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "arg3"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                  Core.applicationArgument = (Core.TermList [
-                                    Core.TermVariable (Core.Name "arg1"),
-                                    (Core.TermVariable (Core.Name "arg2")),
-                                    (Core.TermVariable (Core.Name "arg3"))])}))}))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))}))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "v1"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v2"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "v2"))}))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "in a fold",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "helper"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "arg1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "arg2"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "arg3"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                  Core.applicationArgument = (Core.TermList [
-                                    Core.TermVariable (Core.Name "arg1"),
-                                    (Core.TermVariable (Core.Name "arg2")),
-                                    (Core.TermVariable (Core.Name "arg3"))])}))}))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))}))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                                Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralString "bar"),
-                          (Core.TermLiteral (Core.LiteralString "baz"))])}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "helper"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "arg1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "arg2"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "arg3"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                  Core.applicationArgument = (Core.TermList [
-                                    Core.TermVariable (Core.Name "arg1"),
-                                    (Core.TermVariable (Core.Name "arg2")),
-                                    (Core.TermVariable (Core.Name "arg3"))])}))}))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))}))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                                Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "v1"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "v2"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v2"))}))}))}))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralString "bar"),
-                          (Core.TermLiteral (Core.LiteralString "baz"))])}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "within another let binding",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "tryme"),
-                          Core.bindingTerm = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "helper"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "arg1"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "arg2"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "arg3"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                        Core.applicationArgument = (Core.TermList [
-                                          Core.TermVariable (Core.Name "arg1"),
-                                          (Core.TermVariable (Core.Name "arg2")),
-                                          (Core.TermVariable (Core.Name "arg3"))])}))}))}))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                        Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))}))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = Core.TermUnit})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "tryme"),
-                          Core.bindingTerm = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "helper"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "arg1"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "arg2"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "arg3"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                                        Core.applicationArgument = (Core.TermList [
-                                          Core.TermVariable (Core.Name "arg1"),
-                                          (Core.TermVariable (Core.Name "arg2")),
-                                          (Core.TermVariable (Core.Name "arg3"))])}))}))}))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                        Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))}))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "v1"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "v2"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v2"))}))}))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = Core.TermUnit})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "Case statements",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "monomorphic at top level",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "non-applied case statement",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                      Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "s"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v1"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                          Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "s"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied case statement",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                        Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "s"),
-                              Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                      Core.applicationArgument = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = TestTypes.testTypeUnionMonomorphicName,
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                        Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "s"),
-                              Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                      Core.applicationArgument = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = TestTypes.testTypeUnionMonomorphicName,
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied case statement in lambda",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = (Just (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName)),
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                          Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "s"),
-                                Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = (Just (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName)),
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                          Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "s"),
-                                Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "monomorphic in let binding",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "non-applied case statement",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                            Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "string"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "s"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLiteral (Core.LiteralString "ignored"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                                Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "string"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "s"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLiteral (Core.LiteralString "ignored"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied case statement",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                              Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "s"),
-                                    Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                            Core.applicationArgument = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = TestTypes.testTypeUnionMonomorphicName,
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "string"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLiteral (Core.LiteralString "ignored"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                              Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "string"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "s"),
-                                    Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                            Core.applicationArgument = (Core.TermInject (Core.Injection {
-                              Core.injectionTypeName = TestTypes.testTypeUnionMonomorphicName,
-                              Core.injectionField = Core.Field {
-                                Core.fieldName = (Core.Name "string"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLiteral (Core.LiteralString "ignored"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied case statement in lambda",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName)),
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                                Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "string"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "s"),
-                                      Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLiteral (Core.LiteralString "ignored"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName)),
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                                Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "string"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "s"),
-                                      Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "s"))}))}]})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLiteral (Core.LiteralString "ignored"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "polymorphic in let binding",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "non-applied UnionPolymorphicRecursive",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                            Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                              Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "value"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "i"),
-                                    Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                            Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v1"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                  Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "value"),
-                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "i"),
-                                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "test"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied UnionPolymorphicRecursive with int32",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "value"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "i"),
-                                      Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                            Core.applicationArgument = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "value"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "value"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "i"),
-                                      Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                            Core.applicationArgument = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermInject (Core.Injection {
-                                Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                Core.injectionField = Core.Field {
-                                  Core.fieldName = (Core.Name "value"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}})),
-                              Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "test"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied UnionPolymorphicRecursive with int32 in lambda",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeApplication (Core.ApplicationType {
-                              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                  Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "value"),
-                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "i"),
-                                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "test"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "test"),
-                          Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeApplication (Core.ApplicationType {
-                              Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                              Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                  Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "value"),
-                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "i"),
-                                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "i"))}))}))}]})),
-                                Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                                Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermVariable (Core.Name "test"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "applied generic UnionPolymorphicRecursive in lambda",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermTypeLambda (Core.TypeLambda {
-                      Core.typeLambdaParameter = (Core.Name "t0"),
-                      Core.typeLambdaBody = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "test"),
-                            Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                              Core.typeLambdaParameter = (Core.Name "t1"),
-                              Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "x"),
-                                Core.lambdaDomain = (Just (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))),
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                    Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                      Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "value"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "ignored"),
-                                            Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t1"))),
-                                            Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))}))}]})),
-                                    Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t1"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t1"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "test")),
-                          Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))}))}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermTypeLambda (Core.TypeLambda {
-                      Core.typeLambdaParameter = (Core.Name "t0"),
-                      Core.typeLambdaBody = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "test"),
-                            Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                              Core.typeLambdaParameter = (Core.Name "t1"),
-                              Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "x"),
-                                Core.lambdaDomain = (Just (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))}))),
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                    Core.typeApplicationTermBody = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                                      Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "other"))),
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "value"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "ignored"),
-                                            Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t1"))),
-                                            Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))}))}]})),
-                                    Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t1"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t1"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {
-                                  Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                                  Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t1"))})),
-                                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                          Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "test")),
-                          Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "Forced expansion in case statement branches",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "variable reference in case branch is expanded",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "handler"),
-                          Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "bool"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "ignored"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "boolean value"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "string"),
-                            Core.fieldTerm = (Core.TermVariable (Core.Name "handler"))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "unit"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "ignored"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "unit value"))}))}]}))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "handler"),
-                          Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                          Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                            Core.typeSchemeVariables = [],
-                            Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                            Core.typeSchemeConstraints = Nothing}))}],
-                      Core.letBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "v1"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "bool"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "ignored"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "boolean value"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "string"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "v1"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "handler")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "unit"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "ignored"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "unit value"))}))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "bare primitive in case branch is expanded",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                      Core.caseStatementDefault = Nothing,
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "bool"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "ignored"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "boolean value"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "string"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "unit"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "ignored"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "unit value"))}))}]})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v1"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "bool"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "ignored"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "boolean value"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "string"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "v1"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "unit"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "ignored"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "unit value"))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "variable reference outside case branch is not expanded",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "handler"),
-                          Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "handler"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "handler"),
-                          Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermVariable (Core.Name "handler"))})))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "bare primitive outside case branch is not expanded",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "Non-expansion of eliminations which produce functions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "applied case statement",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "t0"),
-                  Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "dir"),
-                    Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "hydra.coders.CoderDirection"))),
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "coder"),
-                      Core.lambdaDomain = (Just (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Coder")),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))),
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "cx"),
-                        Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "hydra.context.Context"))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v1"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t0"))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "hydra.coders.CoderDirection"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "encode"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "_"),
-                                    Core.lambdaDomain = (Just Core.TypeUnit),
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                            Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                              Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                                                Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-                                                Core.projectionField = (Core.Name "encode")})),
-                                              Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                            Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "coder"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "decode"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "_"),
-                                    Core.lambdaDomain = (Just Core.TypeUnit),
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                            Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                              Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                                                Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-                                                Core.projectionField = (Core.Name "decode")})),
-                                              Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                            Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "coder"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "dir"))}))}))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "t0"),
-                  Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "dir"),
-                    Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "hydra.coders.CoderDirection"))),
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "coder"),
-                      Core.lambdaDomain = (Just (Core.TypeApplication (Core.ApplicationType {
-                        Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                          Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.coders.Coder")),
-                          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))),
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "cx"),
-                        Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "hydra.context.Context"))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v1"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t0"))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "hydra.coders.CoderDirection"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "encode"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "_"),
-                                    Core.lambdaDomain = (Just Core.TypeUnit),
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                            Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                              Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                                                Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-                                                Core.projectionField = (Core.Name "encode")})),
-                                              Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                            Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "coder"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "decode"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "_"),
-                                    Core.lambdaDomain = (Just Core.TypeUnit),
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                            Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                              Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                                                Core.projectionTypeName = (Core.Name "hydra.coders.Coder"),
-                                                Core.projectionField = (Core.Name "decode")})),
-                                              Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                            Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))})),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "coder"))})),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "dir"))}))}))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabled"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "applied projection",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "ETA ERROR: " "failed") (\result -> ShowCore.term result) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                      Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypeTripleName,
-                          Core.projectionField = (Core.Name "third")})),
-                        Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                      Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                    Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                  Core.applicationArgument = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeTripleName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "first"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "second"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "third"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "s"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                      Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (Core.TermProject (Core.Projection {
-                          Core.projectionTypeName = TestTypes.testTypeTripleName,
-                          Core.projectionField = (Core.Name "third")})),
-                        Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                      Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                    Core.typeApplicationTermType = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                  Core.applicationArgument = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeTripleName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "first"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "second"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "third"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "s"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}))}]}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Formatting.hs b/src/test/haskell/Hydra/Test/Formatting.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Formatting.hs
+++ /dev/null
@@ -1,138 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for string formatting and case conversion
-
-module Hydra.Test.Formatting where
-import qualified Hydra.Formatting as Formatting
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Util as Util
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.formatting
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "formatting",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        caseConversionTests],
-      Testing.testGroupCases = []}
--- | Test cases for case conversion
-caseConversionTests :: Testing.TestGroup
-caseConversionTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "case conversion",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1 (lower_snake_case -> UPPER_SNAKE_CASE)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionLowerSnake Util.CaseConventionUpperSnake "a_hello_world_42_a42_42a_b"),
-            Testing.universalTestCaseExpected = "A_HELLO_WORLD_42_A42_42A_B"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2 (lower_snake_case -> camelCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionLowerSnake Util.CaseConventionCamel "a_hello_world_42_a42_42a_b"),
-            Testing.universalTestCaseExpected = "aHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#3 (lower_snake_case -> PascalCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionLowerSnake Util.CaseConventionPascal "a_hello_world_42_a42_42a_b"),
-            Testing.universalTestCaseExpected = "AHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#4 (lower_snake_case -> lower_snake_case)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionLowerSnake Util.CaseConventionLowerSnake "a_hello_world_42_a42_42a_b"),
-            Testing.universalTestCaseExpected = "a_hello_world_42_a42_42a_b"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#5 (UPPER_SNAKE_CASE -> lower_snake_case)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionUpperSnake Util.CaseConventionLowerSnake "A_HELLO_WORLD_42_A42_42A_B"),
-            Testing.universalTestCaseExpected = "a_hello_world_42_a42_42a_b"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#6 (UPPER_SNAKE_CASE -> camelCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionUpperSnake Util.CaseConventionCamel "A_HELLO_WORLD_42_A42_42A_B"),
-            Testing.universalTestCaseExpected = "aHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#7 (UPPER_SNAKE_CASE -> PascalCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionUpperSnake Util.CaseConventionPascal "A_HELLO_WORLD_42_A42_42A_B"),
-            Testing.universalTestCaseExpected = "AHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#8 (UPPER_SNAKE_CASE -> UPPER_SNAKE_CASE)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionUpperSnake Util.CaseConventionUpperSnake "A_HELLO_WORLD_42_A42_42A_B"),
-            Testing.universalTestCaseExpected = "A_HELLO_WORLD_42_A42_42A_B"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#9 (camelCase -> lower_snake_case)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionLowerSnake "aHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "a_hello_world42_a4242a_b"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#10 (camelCase -> UPPER_SNAKE_CASE)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake "aHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "A_HELLO_WORLD42_A4242A_B"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#11 (camelCase -> PascalCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionPascal "aHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "AHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#12 (camelCase -> camelCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionCamel "aHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "aHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#13 (PascalCase -> lower_snake_case)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionPascal Util.CaseConventionLowerSnake "AHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "a_hello_world42_a4242a_b"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#14 (PascalCase -> UPPER_SNAKE_CASE)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionPascal Util.CaseConventionUpperSnake "AHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "A_HELLO_WORLD42_A4242A_B"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#15 (PascalCase -> camelCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionPascal Util.CaseConventionCamel "AHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "aHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#16 (PascalCase -> PascalCase)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Formatting.convertCase Util.CaseConventionPascal Util.CaseConventionPascal "AHelloWorld42A4242aB"),
-            Testing.universalTestCaseExpected = "AHelloWorld42A4242aB"})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
diff --git a/src/test/haskell/Hydra/Test/Generation.hs b/src/test/haskell/Hydra/Test/Generation.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Generation.hs
+++ /dev/null
@@ -1,373 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for code generation operations such as inferModules and inferModulesGiven
-
-module Hydra.Test.Generation where
-import qualified Hydra.Codegen as Codegen
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for code generation operations
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "generation",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "inferModulesGiven",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "incremental inference of subset matches full inference",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\ms -> Strings.cat (Lists.map (\m -> Strings.cat (Lists.map (\d -> case d of
-                  Packaging.DefinitionType _ -> ""
-                  Packaging.DefinitionTerm v0 -> Strings.cat [
-                    Core.unName (Packaging.termDefinitionName v0),
-                    " :: ",
-                    (Maybes.maybe "<no scheme>" (\ts -> ShowCore.typeScheme ts) (Packaging.termDefinitionTypeScheme v0)),
-                    " = ",
-                    (ShowCore.term (Packaging.termDefinitionTerm v0)),
-                    "\n"]) (Packaging.moduleDefinitions m))) ms)) (Codegen.inferModulesGiven TestGraph.testContext TestGraph.testGraph [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.a"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.a.idA"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}] [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}])),
-                Testing.universalTestCaseExpected = (Eithers.either (\e -> "<<inference error>>") (\ms -> Strings.cat (Lists.map (\m -> Strings.cat (Lists.map (\d -> case d of
-                  Packaging.DefinitionType _ -> ""
-                  Packaging.DefinitionTerm v0 -> Strings.cat [
-                    Core.unName (Packaging.termDefinitionName v0),
-                    " :: ",
-                    (Maybes.maybe "<no scheme>" (\ts -> ShowCore.typeScheme ts) (Packaging.termDefinitionTypeScheme v0)),
-                    " = ",
-                    (ShowCore.term (Packaging.termDefinitionTerm v0)),
-                    "\n"]) (Packaging.moduleDefinitions m))) ms)) (Codegen.inferModules TestGraph.testContext TestGraph.testGraph [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.a"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.a.idA"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}] [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "incremental inference of full universe matches full inference",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\ms -> Strings.cat (Lists.map (\m -> Strings.cat (Lists.map (\d -> case d of
-                  Packaging.DefinitionType _ -> ""
-                  Packaging.DefinitionTerm v0 -> Strings.cat [
-                    Core.unName (Packaging.termDefinitionName v0),
-                    " :: ",
-                    (Maybes.maybe "<no scheme>" (\ts -> ShowCore.typeScheme ts) (Packaging.termDefinitionTypeScheme v0)),
-                    " = ",
-                    (ShowCore.term (Packaging.termDefinitionTerm v0)),
-                    "\n"]) (Packaging.moduleDefinitions m))) ms)) (Codegen.inferModulesGiven TestGraph.testContext TestGraph.testGraph [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.a"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.a.idA"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}] [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.a"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.a.idA"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}])),
-                Testing.universalTestCaseExpected = (Eithers.either (\e -> "<<inference error>>") (\ms -> Strings.cat (Lists.map (\m -> Strings.cat (Lists.map (\d -> case d of
-                  Packaging.DefinitionType _ -> ""
-                  Packaging.DefinitionTerm v0 -> Strings.cat [
-                    Core.unName (Packaging.termDefinitionName v0),
-                    " :: ",
-                    (Maybes.maybe "<no scheme>" (\ts -> ShowCore.typeScheme ts) (Packaging.termDefinitionTypeScheme v0)),
-                    " = ",
-                    (ShowCore.term (Packaging.termDefinitionTerm v0)),
-                    "\n"]) (Packaging.moduleDefinitions m))) ms)) (Codegen.inferModules TestGraph.testContext TestGraph.testGraph [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.a"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.a.idA"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}] [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.a"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.a.idA"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.b"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.a"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.b.useId"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.a.idA")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "incremental inference uses cached scheme verbatim on vacuous-quantifier universe",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<inference error>>") (\ms -> Strings.cat (Lists.map (\m -> Strings.cat (Lists.map (\d -> case d of
-                  Packaging.DefinitionType _ -> ""
-                  Packaging.DefinitionTerm v0 -> Strings.cat [
-                    Core.unName (Packaging.termDefinitionName v0),
-                    " :: ",
-                    (Maybes.maybe "<no scheme>" (\ts -> ShowCore.typeScheme ts) (Packaging.termDefinitionTypeScheme v0)),
-                    " = ",
-                    (ShowCore.term (Packaging.termDefinitionTerm v0)),
-                    "\n"]) (Packaging.moduleDefinitions m))) ms)) (Codegen.inferModulesGiven TestGraph.testContext TestGraph.testGraph [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.v"),
-                    Packaging.moduleTermDependencies = [],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.v.funky"),
-                        Packaging.termDefinitionTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "z"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))}))})),
-                        Packaging.termDefinitionTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "t0",
-                            (Core.Name "t1"),
-                            (Core.Name "t2")],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                              Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t2"))}))}))})),
-                          Core.typeSchemeConstraints = Nothing}))})]},
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.w"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.v"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.w.useFunky"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.v.funky")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}] [
-                  Packaging.Module {
-                    Packaging.moduleDescription = Nothing,
-                    Packaging.moduleNamespace = (Packaging.Namespace "hydra.testInput.w"),
-                    Packaging.moduleTermDependencies = [
-                      Packaging.Namespace "hydra.testInput.v"],
-                    Packaging.moduleTypeDependencies = [],
-                    Packaging.moduleDefinitions = [
-                      Packaging.DefinitionTerm (Packaging.TermDefinition {
-                        Packaging.termDefinitionName = (Core.Name "hydra.testInput.w.useFunky"),
-                        Packaging.termDefinitionTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.testInput.v.funky")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100)))})),
-                        Packaging.termDefinitionTypeScheme = Nothing})]}])),
-                Testing.universalTestCaseExpected = "hydra.testInput.w.useFunky :: (int32) = (hydra.testInput.v.funky\10216string\10217\10216int32\10217\10216int32\10217 @ \"foo\" @ 7:int32 @ 100:int32)\n"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Hoisting/All.hs b/src/test/haskell/Hydra/Test/Hoisting/All.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Hoisting/All.hs
+++ /dev/null
@@ -1,19 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Hydra's hoisting test suite
-
-module Hydra.Test.Hoisting.All where
-import qualified Hydra.Test.Hoisting.Cases as Cases
-import qualified Hydra.Test.Hoisting.Let as Let
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The group of all hoisting tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hoisting",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Cases.allTests,
-        Let.allTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Hoisting/Cases.hs b/src/test/haskell/Hydra/Test/Hoisting/Cases.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Hoisting/Cases.hs
+++ /dev/null
@@ -1,3294 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for subterm hoisting and case statement hoisting
-
-module Hydra.Test.Hoisting.Cases where
-import qualified Hydra.Core as Core
-import qualified Hydra.Hoisting as Hoisting
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Test cases for subterm hoisting and case statement hoisting
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hoistCases",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "hoistSubterms",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistNothing: simple let unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\_ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistNothing: let with list in body unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\_ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistNothing: let with application in body unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\_ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "g")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "g")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: list in body is hoisted into local let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: multiple lists in body are hoisted together",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                        (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_2"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_2"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: list in binding value is hoisted into local let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_x_1"),
-                            Core.bindingTerm = (Core.TermList [
-                              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_1"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: nested lists hoisted from inside out",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                        (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_2"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermVariable (Core.Name "_hoist_x_body_1"),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_2"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistApplications: application in list element is hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermApplication _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}),
-                    (Core.TermVariable (Core.Name "y"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "_hoist_x_body_1"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistApplications: application in record field is hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermApplication _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "Data"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "value"),
-                        Core.fieldTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "Data"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "value"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}]}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistApplications: nested applications hoisted from inside out",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermApplication _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_2"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "_hoist_x_body_2")])}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistCaseStatements: case in application argument is hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermCases _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Optional"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "just"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "nothing"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistCaseStatements: case in list element is hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermCases _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Result"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "y"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "ok"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "err"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Result"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "y"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "ok"),
-                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "err"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "_hoist_x_body_1")])}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: nested let - inner let processed independently",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermVariable (Core.Name "x"),
-                        (Core.TermVariable (Core.Name "y"))])}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "_hoist_y_body_1"),
-                          Core.bindingTerm = (Core.TermList [
-                            Core.TermVariable (Core.Name "x"),
-                            (Core.TermVariable (Core.Name "y"))]),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_y_body_1"))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: non-let term is unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistApplications: bare application unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermApplication _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: term referring to let-bound variable needs no capture",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: term referring to lambda above let needs no capture",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermVariable (Core.Name "y"),
-                        (Core.TermVariable (Core.Name "x"))])}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "y"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "x"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                          Core.bindingTerm = (Core.TermList [
-                            Core.TermVariable (Core.Name "y"),
-                            (Core.TermVariable (Core.Name "x"))]),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: lambda-bound var not free in hoisted term needs no capture",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermVariable (Core.Name "x"),
-                        (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: lambda-bound var free in hoisted term requires capture",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermVariable (Core.Name "x"),
-                        (Core.TermVariable (Core.Name "y"))])}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermList [
-                            Core.TermVariable (Core.Name "x"),
-                            (Core.TermVariable (Core.Name "y"))])})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_x_body_1")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: only free lambda-bound vars are captured",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "a"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "b"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermVariable (Core.Name "b"))])}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermList [
-                            Core.TermVariable (Core.Name "x"),
-                            (Core.TermVariable (Core.Name "b"))])})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "a"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "b"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_x_body_1")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: stable naming for binding and body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_x_1"),
-                            Core.bindingTerm = (Core.TermList [
-                              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                              (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_1"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: stable naming for multiple bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_x_1"),
-                            Core.bindingTerm = (Core.TermList [
-                              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_1"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_y_1"),
-                            Core.bindingTerm = (Core.TermList [
-                              Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))]),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_y_1"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hoistLists: polymorphic binding with self-reference below hoisted term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistSubterms (\pt -> case (Pairs.second pt) of
-                  Core.TermList _ -> True
-                  _ -> False) Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermVariable (Core.Name "x"),
-                            (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermList [
-                                Core.TermVariable (Core.Name "x"),
-                                (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "hoistCaseStatements",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case at top level of let body is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "Optional"),
-                    Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "just"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "nothing"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "Optional"),
-                    Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "just"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "nothing"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in let binding value is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "y"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "z"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "y"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "z"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case inside lambda body is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case inside nested lambdas is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Result"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "ok"),
-                                Core.fieldTerm = (Core.TermVariable (Core.Name "b"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "err"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Result"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "ok"),
-                                Core.fieldTerm = (Core.TermVariable (Core.Name "b"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "err"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case as LHS of one application is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case wrapped in annotation is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                        Core.annotatedTermBody = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.annotatedTermAnnotation = M.empty})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermAnnotated (Core.AnnotatedTerm {
-                        Core.annotatedTermBody = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.annotatedTermAnnotation = M.empty})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in lambda with one application is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case as RHS of application IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_f_1"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in nested application LHS IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "z"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "w"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "w"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "z"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "w"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "w"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case inside list element IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "_hoist_f_1")])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case inside lambda inside list IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "y"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermList [
-                          Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "a"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list inside lambda is NOT hoisted (only case statements)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "a"),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "a"),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in binding is not hoisted, case in arg position is hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "z"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Optional"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "just"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "w"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "w"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "nothing"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "z"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "_hoist_x_body_1"),
-                        Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "w"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "w"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_x_body_1"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in nested let body is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Optional"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "z"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "just"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "w"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "w"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "nothing"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Optional"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "z"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "just"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "w"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "w"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "nothing"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in let inside lambda is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in lambda inside let body is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "a"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Optional"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "just"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "nothing"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "a"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                      Core.caseStatementTypeName = (Core.Name "Optional"),
-                      Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                      Core.caseStatementCases = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "just"),
-                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "nothing"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case with let+lambda+app is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in triple application LHS IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "a"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "c"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermVariable (Core.Name "a"))}))}))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "c"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "z"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "a"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "c"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermVariable (Core.Name "a"))}))}))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "c"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case as second argument IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_f_1"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in both arguments - both hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                        Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}]}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "x"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing},
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_2"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_f_1"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_f_2"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in second list element IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                        (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermList [
-                          Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                          (Core.TermVariable (Core.Name "_hoist_f_1"))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple cases in list - all hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "x"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}),
-                        (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}]}))]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "x"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing},
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_2"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "_hoist_f_1"),
-                          (Core.TermVariable (Core.Name "_hoist_f_2"))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in pair first element IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "y"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "_hoist_f_1"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in pair second element IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "y"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermVariable (Core.Name "_hoist_f_1"))))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in child let binding hoisted into child",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "inner"),
-                            Core.bindingTerm = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                              Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = Nothing,
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "y"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "inner"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "inner"),
-                            Core.bindingTerm = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "_hoist_inner_1"),
-                                  Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                                    Core.caseStatementTypeName = (Core.Name "Optional"),
-                                    Core.caseStatementDefault = Nothing,
-                                    Core.caseStatementCases = [
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "just"),
-                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "y"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "nothing"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                                  Core.bindingTypeScheme = Nothing}],
-                              Core.letBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_inner_1"))}))})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "inner"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in child let body hoisted into child",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "inner"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "inner"),
-                            Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "_hoist_inner_body_1"),
-                              Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = Nothing,
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "y"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_inner_body_1"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case at top level of child let NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "inner"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "inner"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "inner"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermVariable (Core.Name "inner"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cases in both outer and child - each hoisted locally",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                        Core.applicationArgument = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "inner"),
-                              Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = (Core.Name "Optional"),
-                                  Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "just"),
-                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "y"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "nothing"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}]}))})),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermVariable (Core.Name "inner"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_outer_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "x"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_outer_1"))})),
-                          Core.applicationArgument = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "inner"),
-                                Core.bindingTerm = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "_hoist_inner_1"),
-                                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "b"))),
-                                        Core.caseStatementCases = [
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "just"),
-                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "y"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "nothing"),
-                                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}]})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "_hoist_inner_1"))}))})),
-                                Core.bindingTypeScheme = Nothing}],
-                            Core.letBody = (Core.TermVariable (Core.Name "inner"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda after app LHS takes us out of top level",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "y"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "a"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case inside case branch is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "b"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "b"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case inside case default branch is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "a"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "y"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "b"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "a"))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "y"))),
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "b"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "b"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in arg position inside case branch IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Optional"),
-                        Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "just"),
-                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = (Core.Name "Optional"),
-                                  Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "just"),
-                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "b"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermVariable (Core.Name "b"))}))},
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "nothing"),
-                                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))}))}))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "nothing"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "a"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                                Core.caseStatementTypeName = (Core.Name "Optional"),
-                                Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "a"))),
-                                Core.caseStatementCases = [
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "just"),
-                                    Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "b"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermVariable (Core.Name "b"))}))},
-                                  Core.Field {
-                                    Core.fieldName = (Core.Name "nothing"),
-                                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = (Just (Core.TermVariable (Core.Name "x"))),
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "a"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))}))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in let body inside applied case default IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "a"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "a"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "b"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                    Core.caseStatementTypeName = (Core.Name "Result"),
-                                    Core.caseStatementDefault = Nothing,
-                                    Core.caseStatementCases = [
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "ok"),
-                                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                          Core.lambdaParameter = (Core.Name "y"),
-                                          Core.lambdaDomain = Nothing,
-                                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                      Core.Field {
-                                        Core.fieldName = (Core.Name "err"),
-                                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "a"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "a"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLet (Core.Let {
-                                Core.letBindings = [
-                                  Core.Binding {
-                                    Core.bindingName = (Core.Name "b"),
-                                    Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                                    Core.bindingTypeScheme = Nothing}],
-                                Core.letBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "_hoist_b_body_1"),
-                                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                                        Core.caseStatementTypeName = (Core.Name "Result"),
-                                        Core.caseStatementDefault = Nothing,
-                                        Core.caseStatementCases = [
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "ok"),
-                                            Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                              Core.lambdaParameter = (Core.Name "y"),
-                                              Core.lambdaDomain = Nothing,
-                                              Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                          Core.Field {
-                                            Core.fieldName = (Core.Name "err"),
-                                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_b_body_1")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))}))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case in let body inside applied case branch IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "a"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "b"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                      Core.caseStatementTypeName = (Core.Name "Result"),
-                                      Core.caseStatementDefault = Nothing,
-                                      Core.caseStatementCases = [
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "ok"),
-                                          Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                            Core.lambdaParameter = (Core.Name "y"),
-                                            Core.lambdaDomain = Nothing,
-                                            Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                        Core.Field {
-                                          Core.fieldName = (Core.Name "err"),
-                                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "a"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLet (Core.Let {
-                                  Core.letBindings = [
-                                    Core.Binding {
-                                      Core.bindingName = (Core.Name "b"),
-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                      Core.bindingTypeScheme = Nothing}],
-                                  Core.letBody = (Core.TermLet (Core.Let {
-                                    Core.letBindings = [
-                                      Core.Binding {
-                                        Core.bindingName = (Core.Name "_hoist_b_body_1"),
-                                        Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                                          Core.caseStatementTypeName = (Core.Name "Result"),
-                                          Core.caseStatementDefault = Nothing,
-                                          Core.caseStatementCases = [
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "ok"),
-                                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                                Core.lambdaParameter = (Core.Name "y"),
-                                                Core.lambdaDomain = Nothing,
-                                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                            Core.Field {
-                                              Core.fieldName = (Core.Name "err"),
-                                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                                        Core.bindingTypeScheme = Nothing}],
-                                    Core.letBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_b_body_1")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))}))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case application at top level of binding is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                          Core.caseStatementTypeName = (Core.Name "Optional"),
-                          Core.caseStatementDefault = Nothing,
-                          Core.caseStatementCases = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "just"),
-                              Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "nothing"),
-                              Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case application in arg position IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case application inside immediately-applied lambda IS hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "_hoist_f_1"),
-                            Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                              Core.caseStatementTypeName = (Core.Name "Optional"),
-                              Core.caseStatementDefault = Nothing,
-                              Core.caseStatementCases = [
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "just"),
-                                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                                Core.Field {
-                                  Core.fieldName = (Core.Name "nothing"),
-                                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                            Core.bindingTypeScheme = Nothing}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "a"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "_hoist_f_1")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "case application in lambda body is NOT hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Hoisting.hoistCaseStatements Lexical.emptyGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                            Core.caseStatementTypeName = (Core.Name "Optional"),
-                            Core.caseStatementDefault = Nothing,
-                            Core.caseStatementCases = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "just"),
-                                Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "y"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "nothing"),
-                                Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}]})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Hoisting/Let.hs b/src/test/haskell/Hydra/Test/Hoisting/Let.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Hoisting/Let.hs
+++ /dev/null
@@ -1,2559 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for let-binding hoisting transformations
-
-module Hydra.Test.Hoisting.Let where
-import qualified Hydra.Core as Core
-import qualified Hydra.Hoisting as Hoisting
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for let-binding hoisting transformations
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hoistLet",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "hoistLetBindings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested let inside lambda: binding hoisted with lambda capture",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistAllLetBindings (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "g"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f_g")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "type application: nested let outside lambda CAN be hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistAllLetBindings (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "y"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = Nothing}],
-                          Core.letBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                        Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                        Core.typeApplicationTermBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "f_y"))}))})),
-                        Core.typeApplicationTermType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "hoistPolymorphicLetBindings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no polymorphic bindings: simple let unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no polymorphic bindings: multiple monomorphic bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hi")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "hi")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single polymorphic binding: already at top level",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding inside lambda: no capture",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "id"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "x"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "b"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f_id")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_id"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding captures lambda variable: wrapped in lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "x"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "b"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                  Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))}))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f_g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding captures multiple lambda variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "g"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "triple")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [
-                                    Core.Name "c"],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "c")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "c"))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "f_g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "c"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "b"),
-                            Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "triple")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "c"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "c")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "c"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding captures some but not all lambda variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "g"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [
-                                    Core.Name "c"],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "c")),
-                                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                                      Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "c"))}))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f_g")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "c"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "c"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "c")),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "c"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding captures both lambda-bound and let-bound variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [],
-                                Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                Core.typeSchemeConstraints = Nothing}))},
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "b"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "x"),
-                              Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [],
-                                Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "f_g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "y"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sibling polymorphic bindings inside lambda: one calls the other",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "outer"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "a"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                                Core.typeSchemeConstraints = Nothing}))},
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "h"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "z"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "b"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "outer"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_h")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "outer"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_h"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "outer"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "z"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sibling polymorphic bindings inside lambda: h passes its own args to g",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "outer"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "v"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "t"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "a"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})),
-                                Core.typeSchemeConstraints = Nothing}))},
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "h"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "v"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "t"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "b"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))}))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "outer"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_h")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "outer"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "t"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_h"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "outer"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "v"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "t"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_g")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "outer"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "untyped binding: not hoisted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no name collision: distinct names after unshadowing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "id2"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "b"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f_id2")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_id2"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested polymorphic binding calls enclosing polymorphic binding",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "outer"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "a"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "inner"),
-                            Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                            Core.lambdaBody = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "h"),
-                                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "z"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))})),
-                                  Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                    Core.typeSchemeVariables = [
-                                      Core.Name "b"],
-                                    Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                    Core.typeSchemeConstraints = Nothing}))}],
-                              Core.letBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "outer"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "inner"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_h")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_h"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "z"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding captures monomorphic sibling in same let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "left"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "right"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "sleft"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "left"))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [],
-                                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                  Core.typeSchemeConstraints = Nothing}))},
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "sright"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "right"))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [],
-                                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                  Core.typeSchemeConstraints = Nothing}))},
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "cannotUnify"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "sright"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [
-                                    Core.Name "a"],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "cannotUnify")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "left"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "right"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "sleft"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "left"))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [],
-                                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                  Core.typeSchemeConstraints = Nothing}))},
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "sright"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "right"))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [],
-                                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_cannotUnify")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "sright"))})),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_cannotUnify"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "sleft"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "sright"),
-                            Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "sright"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested lets: poly binding references poly sibling from outer let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "left"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "sleft"),
-                              Core.bindingTerm = (Core.TermVariable (Core.Name "left")),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [],
-                                Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "cannotUnify"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "x"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [
-                                    Core.Name "a"],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "joinList"),
-                                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "cannotUnify")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                                  Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                    Core.typeSchemeVariables = [
-                                      Core.Name "b"],
-                                    Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                    Core.typeSchemeConstraints = Nothing}))}],
-                              Core.letBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "joinList")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "left"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "sleft"),
-                              Core.bindingTerm = (Core.TermVariable (Core.Name "left")),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [],
-                                Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_joinList")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_cannotUnify"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "sleft"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "wrapper_joinList"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "b"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "sleft"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper_cannotUnify")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "sleft"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "b"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "wrapper")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding with pair: type applications preserved",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "b"),
-                        Core.lambdaDomain = (Just (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString))),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "init"),
-                              Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                                Core.typeLambdaParameter = (Core.Name "t0"),
-                                Core.typeLambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                  Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                    Core.typeApplicationTermBody = (Core.TermPair (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                      Core.typeApplicationTermBody = (Core.TermList []),
-                                      Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))}), (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "singleton")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})))),
-                                    Core.typeApplicationTermType = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                                  Core.typeApplicationTermType = (Core.TypeSet (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "t0"],
-                                Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                                  Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                                  Core.pairTypeSecond = (Core.TypeSet (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermVariable (Core.Name "init"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                            Core.pairTypeSecond = (Core.TypeSet (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "name_x"))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "b"),
-                        Core.lambdaDomain = (Just (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString))),
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f_init")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                            Core.pairTypeSecond = (Core.TypeSet (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_init"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t0"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = (Just (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString))),
-                          Core.lambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                            Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                              Core.typeApplicationTermBody = (Core.TermPair (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermList []),
-                                Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "t0"))}), (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "singleton")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})))),
-                              Core.typeApplicationTermType = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                            Core.typeApplicationTermType = (Core.TypeSet (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                            Core.pairTypeSecond = (Core.TypeSet (Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "name_x"))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "monomorphic binding captures type vars: replacement includes type applications",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "b"),
-                          Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                            Core.lambdaBody = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "q"),
-                                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "y"),
-                                    Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                                  Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                    Core.typeSchemeVariables = [],
-                                    Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                                    Core.typeSchemeConstraints = Nothing}))}],
-                              Core.letBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "q")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a",
-                          (Core.Name "b")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "b"),
-                          Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                Core.typeApplicationTermBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                                  Core.typeApplicationTermBody = (Core.TermVariable (Core.Name "f_q")),
-                                  Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "a"))})),
-                                Core.typeApplicationTermType = (Core.TypeVariable (Core.Name "b"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a",
-                          (Core.Name "b")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_q"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "a"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "b"),
-                          Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "y"),
-                            Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a",
-                          (Core.Name "b")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "hoistPolymorphicTypeParameters",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested function types: all type variables must be declared",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "choose"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "forLeft"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "forRight"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "e"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "forLeft")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))}))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t0",
-                                (Core.Name "t1"),
-                                (Core.Name "t2")],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermVariable (Core.Name "choose"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "f_choose")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_choose"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t0"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "t1"),
-                          Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "t2"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "forLeft"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "forRight"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "e"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "forLeft")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0",
-                          (Core.Name "t1"),
-                          (Core.Name "t2")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "type variable in return position only",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "returnT"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "unit"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = Core.TypeUnit,
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermVariable (Core.Name "returnT"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = Core.TypeUnit,
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "f_returnT")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = Core.TypeUnit,
-                          Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_returnT"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "unit"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = Core.TypeUnit,
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "type variables in deeply nested generics",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "nested"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t0",
-                                (Core.Name "t1"),
-                                (Core.Name "t2")],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypePair (Core.PairType {
-                                  Core.pairTypeFirst = (Core.TypePair (Core.PairType {
-                                    Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))})),
-                                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t2"))})),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermVariable (Core.Name "nested"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                            Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-                          Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "f_nested")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                            Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-                          Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_nested"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t0"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "t1"),
-                          Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "t2"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0",
-                          (Core.Name "t1"),
-                          (Core.Name "t2")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))})),
-                            Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t2"))})),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple bindings with overlapping type variable names",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "id1"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))})),
-                              Core.typeSchemeConstraints = Nothing}))},
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "id2"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "y"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "id1"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "id2"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                          Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "outer_id1"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "outer_id2"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                          Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer_id1"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "outer_id2"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "outer"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "captured variable with type parameters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                        Core.lambdaBody = (Core.TermLet (Core.Let {
-                          Core.letBindings = [
-                            Core.Binding {
-                              Core.bindingName = (Core.Name "g"),
-                              Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "x"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                              Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                Core.typeSchemeVariables = [
-                                  Core.Name "t"],
-                                Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                                  Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t"))}))})),
-                                Core.typeSchemeConstraints = Nothing}))}],
-                          Core.letBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f_g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                          Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                            Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t"),
-                        Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "a"),
-                          Core.lambdaDomain = (Just (Core.TypeLiteral Core.LiteralTypeString)),
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "pair")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))}))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "short type variable names are treated as type parameters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "g"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "s"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "t"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))}))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "s",
-                                (Core.Name "t"),
-                                (Core.Name "v")],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "s")),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "v"))}))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermVariable (Core.Name "g"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "f_g")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "s"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "t"),
-                          Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "v"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "s"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "t"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "s",
-                          (Core.Name "t"),
-                          (Core.Name "v")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "s")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "v"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "numbered type variables like t0 t1 t2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "g"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))}))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t0",
-                                (Core.Name "t1"),
-                                (Core.Name "t2")],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t2"))}))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermVariable (Core.Name "g"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "f_g")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                            Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f_g"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t0"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "t1"),
-                          Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "t2"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "y"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermVariable (Core.Name "undefined"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0",
-                          (Core.Name "t1"),
-                          (Core.Name "t2")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t2"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "choose pattern from mutateTrace",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.let_ (Hoisting.hoistPolymorphicLetBindings (\b -> True) (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "mutateTrace"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "mutate"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "restore"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "f"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "choose"),
-                                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                    Core.lambdaParameter = (Core.Name "forLeft"),
-                                    Core.lambdaDomain = Nothing,
-                                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                      Core.lambdaParameter = (Core.Name "forRight"),
-                                      Core.lambdaDomain = Nothing,
-                                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "e"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "forLeft")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))}))})),
-                                  Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                    Core.typeSchemeVariables = [
-                                      Core.Name "t0",
-                                      (Core.Name "t1"),
-                                      (Core.Name "t2")],
-                                    Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                      Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                        Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                                        Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                                    Core.typeSchemeConstraints = Nothing}))}],
-                              Core.letBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "choose")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "forLeft"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "forRight"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "mutateTrace"))}))),
-                Testing.universalTestCaseExpected = (ShowCore.let_ (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "mutateTrace"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "mutate"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "restore"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "f"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "mutateTrace_choose")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "forLeft"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "forRight"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                              Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "mutateTrace_choose"),
-                      Core.bindingTerm = (Core.TermTypeLambda (Core.TypeLambda {
-                        Core.typeLambdaParameter = (Core.Name "t0"),
-                        Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                          Core.typeLambdaParameter = (Core.Name "t1"),
-                          Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                            Core.typeLambdaParameter = (Core.Name "t2"),
-                            Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "forLeft"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                Core.lambdaParameter = (Core.Name "forRight"),
-                                Core.lambdaDomain = Nothing,
-                                Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "e"),
-                                  Core.lambdaDomain = Nothing,
-                                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "forLeft")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))}))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0",
-                          (Core.Name "t1"),
-                          (Core.Name "t2")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                              Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermVariable (Core.Name "mutateTrace"))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Inference/AlgebraicTypes.hs b/src/test/haskell/Hydra/Test/Inference/AlgebraicTypes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/AlgebraicTypes.hs
+++ /dev/null
@@ -1,1265 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Inference tests for algebraic data types
-
-module Hydra.Test.Inference.AlgebraicTypes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-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
--- | Algebraic data type tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Algebraic terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        testGroupForCollectionPrimitives,
-        testGroupForEithers,
-        testGroupForFolds,
-        testGroupForLists,
-        testGroupForMaps,
-        testGroupForOptionals,
-        testGroupForPairs,
-        testGroupForSets],
-      Testing.testGroupCases = []}
-testGroupForCollectionPrimitives :: Testing.TestGroup
-testGroupForCollectionPrimitives =
-    Testing.TestGroup {
-      Testing.testGroupName = "Collection primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "maps.map applied to a function",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x")])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeSet (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])}),
-                    (Core.Name "t1", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sets.map applied to a function",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.lists.length"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeSet (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Composing collection primitives in let",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeSet (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])}),
-                    (Core.Name "t1", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermMap (M.fromList [
-                          (Core.TermLiteral (Core.LiteralString "a"), (Core.TermList [
-                            Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                            (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))]))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "g"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.mapTypeValues = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Map operations in lambdas",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "m"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.lists.length"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "f"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "m"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1"),
-                    (Core.Name "t2")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t2")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t0"))})),
-                      Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t2")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t2", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Fully applied collection conversions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                        (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.mapTypeValues = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForEithers :: Testing.TestGroup
-testGroupForEithers =
-    Testing.TestGroup {
-      Testing.testGroupName = "Either terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Left values",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error"))),
-                  (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error")))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Right values",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))),
-                  (Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error"))))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Polymorphic either values",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Left (Core.TermList []))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermEither (Right (Core.TermList []))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                    Core.eitherTypeRight = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Nested either values",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermEither (Left (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))))),
-                  (Core.TermEither (Left (Core.TermEither (Right (Core.TermLiteral (Core.LiteralString "nested")))))),
-                  (Core.TermEither (Right (Core.TermLiteral (Core.LiteralBoolean True))))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})),
-                    Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeBoolean)}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermEither (Right (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))),
-                  (Core.TermEither (Right (Core.TermEither (Right (Core.TermLiteral (Core.LiteralBoolean True)))))),
-                  (Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "foo"))))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeBoolean)}))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Either in lambda",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Left (Core.TermVariable (Core.Name "x"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                      Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t1"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "x"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t1")),
-                      Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Either in data structures",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error"))),
-                  (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [
-                  Core.TermEither (Left (Core.TermLiteral (Core.LiteralString "error"))),
-                  (Core.TermEither (Right (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))], (Core.TermList []))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.pairTypeSecond = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForFolds :: Testing.TestGroup
-testGroupForFolds =
-    Testing.TestGroup {
-      Testing.testGroupName = "Eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "List eliminations (folds)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Optional eliminations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})),
-                  Core.applicationArgument = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})),
-                  Core.applicationArgument = (Core.TermMaybe Nothing)})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.maybes.pure"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.maybe")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x")])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForLists :: Testing.TestGroup
-testGroupForLists =
-    Testing.TestGroup {
-      Testing.testGroupName = "List terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "List of strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo"),
-                  (Core.TermLiteral (Core.LiteralString "bar"))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "List of lists of strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "foo")],
-                  (Core.TermList [])]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Empty list",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList []))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "List containing an empty list",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermList []]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Lambda producing a polymorphic list",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Lambda producing a list of integers",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "List with repeated variables",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLiteral (Core.LiteralString "foo")),
-                    (Core.TermVariable (Core.Name "x"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForMaps :: Testing.TestGroup
-testGroupForMaps =
-    Testing.TestGroup {
-      Testing.testGroupName = "Map terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-              (Core.TermLiteral (Core.LiteralString "firstName"), (Core.TermLiteral (Core.LiteralString "Arthur"))),
-              (Core.TermLiteral (Core.LiteralString "lastName"), (Core.TermLiteral (Core.LiteralString "Dent")))])))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeString)})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap M.empty))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0",
-                (Core.Name "t1")],
-              Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-              Core.typeSchemeConstraints = (Just (M.fromList [
-                (Core.Name "t0", Core.TypeVariableMetadata {
-                  Core.typeVariableMetadataClasses = (S.fromList [
-                    Core.Name "ordering"])})]))}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#3",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "y"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermMap (M.fromList [
-                  (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.1)))),
-                  (Core.TermVariable (Core.Name "y"), (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.2))))]))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0"],
-              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                    Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64))}))}))})),
-              Core.typeSchemeConstraints = (Just (M.fromList [
-                (Core.Name "t0", Core.TypeVariableMetadata {
-                  Core.typeVariableMetadataClasses = (S.fromList [
-                    Core.Name "ordering"])})]))}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]}]}
-testGroupForOptionals :: Testing.TestGroup
-testGroupForOptionals =
-    Testing.TestGroup {
-      Testing.testGroupName = "Optional terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe Nothing))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0"],
-              Core.typeSchemeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0"))),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]}]}
-testGroupForPairs :: Testing.TestGroup
-testGroupForPairs =
-    Testing.TestGroup {
-      Testing.testGroupName = "Pair terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Monotyped pairs",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralString "foo"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralString "foo"), (Core.TermList [
-                  Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 42.0)),
-                  (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 137.0)))]))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Polytyped pairs",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [], (Core.TermLiteral (Core.LiteralString "foo")))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [], (Core.TermList []))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.pairTypeSecond = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Nested pairs",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "nested"))), (Core.TermLiteral (Core.LiteralBoolean True)))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralString "foo"), (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermList [
-                  Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 42.0))]))))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.pairTypeSecond = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Pairs in lambda",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralString "constant"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "p"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "p"), (Core.TermVariable (Core.Name "p"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Pairs in data structures",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralString "b"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermPair (Core.TermList [], (Core.TermLiteral (Core.LiteralString "foo")))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Additional cases",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "foo")))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [], (Core.TermLiteral (Core.LiteralString "foo")))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermList [], (Core.TermList []))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.pairTypeSecond = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForSets :: Testing.TestGroup
-testGroupForSets =
-    Testing.TestGroup {
-      Testing.testGroupName = "Set terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermLiteral (Core.LiteralBoolean True)])))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeBoolean)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-              Core.TermSet S.empty])))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0"],
-              Core.typeSchemeBody = (Core.TypeSet (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))),
-              Core.typeSchemeConstraints = (Just (M.fromList [
-                (Core.Name "t0", Core.TypeVariableMetadata {
-                  Core.typeVariableMetadataClasses = (S.fromList [
-                    Core.Name "ordering"])})]))}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]}]}
diff --git a/src/test/haskell/Hydra/Test/Inference/AlgorithmW.hs b/src/test/haskell/Hydra/Test/Inference/AlgorithmW.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/AlgorithmW.hs
+++ /dev/null
@@ -1,437 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Algorithm W inference tests
-
-module Hydra.Test.Inference.AlgorithmW where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Algorithm W test cases
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Algorithm W test cases",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        testGroupForSystemF],
-      Testing.testGroupCases = []}
-testGroupForSystemF :: Testing.TestGroup
-testGroupForSystemF =
-    Testing.TestGroup {
-      Testing.testGroupName = "STLC to System F",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0"],
-              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "foo"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#3",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#4",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#5",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "sng"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x")])})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "sng"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0"],
-              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#6",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "sng"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x")])})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "sng")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}), (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermVariable (Core.Name "sng")),
-                Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "alice"))}))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                Core.pairTypeSecond = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#7",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "+"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "+")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermApplication (Core.Application {
-                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "+")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#9",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0"],
-              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#10",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "g"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "xx"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "yy"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "xx"))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0",
-                (Core.Name "t1")],
-              Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#11",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "g"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "u"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0",
-                (Core.Name "t1"),
-                (Core.Name "t2"),
-                (Core.Name "t3")],
-              Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))})),
-                Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t3"))}))}))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#12",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "g"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "u"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0",
-                (Core.Name "t1")],
-              Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#13",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "f"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "g"),
-                  Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "u"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "v"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [
-                Core.Name "t0",
-                (Core.Name "t1")],
-              Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
diff --git a/src/test/haskell/Hydra/Test/Inference/All.hs b/src/test/haskell/Hydra/Test/Inference/All.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/All.hs
+++ /dev/null
@@ -1,29 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Hydra's inference test suite
-
-module Hydra.Test.Inference.All where
-import qualified Hydra.Test.Inference.AlgebraicTypes as AlgebraicTypes
-import qualified Hydra.Test.Inference.AlgorithmW as AlgorithmW
-import qualified Hydra.Test.Inference.Classes as Classes
-import qualified Hydra.Test.Inference.Failures as Failures
-import qualified Hydra.Test.Inference.Fundamentals as Fundamentals
-import qualified Hydra.Test.Inference.KernelExamples as KernelExamples
-import qualified Hydra.Test.Inference.NominalTypes as NominalTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The group of all inference tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "inference",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        AlgebraicTypes.allTests,
-        AlgorithmW.allTests,
-        Classes.allTests,
-        Failures.allTests,
-        Fundamentals.allTests,
-        KernelExamples.allTests,
-        NominalTypes.allTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Inference/Classes.hs b/src/test/haskell/Hydra/Test/Inference/Classes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/Classes.hs
+++ /dev/null
@@ -1,1330 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Inference tests for type class constraints (ordering and equality)
-
-module Hydra.Test.Inference.Classes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-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
--- | Type class constraint inference tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Type classes",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        testGroupForMonomorphicConstraints,
-        testGroupForPrimitiveReferences,
-        testGroupForPartialApplication,
-        testGroupForLetBindings,
-        testGroupForComposition,
-        testGroupForNestedContainers,
-        testGroupForCollectionTerms],
-      Testing.testGroupCases = []}
-testGroupForCollectionTerms :: Testing.TestGroup
-testGroupForCollectionTerms =
-    Testing.TestGroup {
-      Testing.testGroupName = "Collection term constraints",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Set literals",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermSet (S.fromList [
-                    Core.TermVariable (Core.Name "x")]))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermSet (S.fromList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))]))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermSet (S.fromList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Map literals",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "k"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "v"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermMap (M.fromList [
-                      (Core.TermVariable (Core.Name "k"), (Core.TermVariable (Core.Name "v")))]))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMap (M.fromList [
-                  (Core.TermLiteral (Core.LiteralString "a"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))])))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Collection terms with primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermSet (S.fromList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}),
-                    (Core.TermVariable (Core.Name "x"))]))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "k"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermMap (M.fromList [
-                    (Core.TermVariable (Core.Name "k"), (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermVariable (Core.Name "k")])})))]))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Constraint propagation through collection elements",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "xs"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermMap (M.fromList [
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}), (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))})))]))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.mapTypeValues = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermVariable (Core.Name "hydra.lib.lists.sort")]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))}))),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermPair (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))})),
-                    Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "xs"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermSet (S.fromList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))})]))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForComposition :: Testing.TestGroup
-testGroupForComposition =
-    Testing.TestGroup {
-      Testing.testGroupName = "Composition and constraint merging",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Composing constrained primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "xs"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "x"))))}))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "f"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "xs"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t1", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Composing map and sort",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "m"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.lists.sort"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])}),
-                    (Core.Name "t1", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForLetBindings :: Testing.TestGroup
-testGroupForLetBindings =
-    Testing.TestGroup {
-      Testing.testGroupName = "Let binding constraint propagation",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Simple let-bound wrappers",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "lookup"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "k"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "m"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "k"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "lookup"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                      Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "member"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "s"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.member")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "member"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "fromList"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "fromList"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Let-bound with partial instantiation",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "m"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "xs"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Multiple uses of a constrained let binding",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))])}), (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermPair (Core.TermLiteral (Core.LiteralBoolean True), (Core.TermLiteral (Core.LiteralString "x")))])}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                    Core.pairTypeSecond = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                      Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForMonomorphicConstraints :: Testing.TestGroup
-testGroupForMonomorphicConstraints =
-    Testing.TestGroup {
-      Testing.testGroupName = "Monomorphic (constraints vanish)",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Map operations with concrete types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "k"))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.singleton")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "k"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.insert")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "k"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.maps.empty"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Set operations with concrete types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.member")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.singleton")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Equality operations with concrete types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "b"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable (Core.Name "hydra.util.Comparison")),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "List operations with concrete types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForNestedContainers :: Testing.TestGroup
-testGroupForNestedContainers =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested containers",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Maps of sets",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "m"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.map")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "m"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeList (Core.TypeVariable (Core.Name "t1")))})),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeSet (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])}),
-                    (Core.Name "t1", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Sets of sets",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "xss"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.map")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.fromList"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "xss"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeSet (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Map from sorted list",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "xs"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.singleton")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))))}))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "xs"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForPartialApplication :: Testing.TestGroup
-testGroupForPartialApplication =
-    Testing.TestGroup {
-      Testing.testGroupName = "Partial application preserving constraints",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Map partial application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "k"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "k"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                      Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "k"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "v"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.singleton")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "k"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Set partial application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.member")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Equality partial application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "equality"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Partial application fixing the constrained variable",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "v"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.singleton")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "key"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForPrimitiveReferences :: Testing.TestGroup
-testGroupForPrimitiveReferences =
-    Testing.TestGroup {
-      Testing.testGroupName = "Primitive references with constraints",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Map primitives (ordering on key type)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.fromList")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))),
-                    Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                      Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                      Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                      Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.insert")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                          Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                          Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                        Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                          Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                          Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.map")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1"),
-                    (Core.Name "t2")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t2")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t0"))})),
-                      Core.functionTypeCodomain = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t2")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t2", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.maps.empty")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeMap (Core.MapType {
-                    Core.mapTypeKeys = (Core.TypeVariable (Core.Name "t0")),
-                    Core.mapTypeValues = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Set primitives (ordering on element type)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.sets.fromList")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.sets.member")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.sets.insert")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.sets.map")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeSet (Core.TypeVariable (Core.Name "t1")))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])}),
-                    (Core.Name "t1", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Equality primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.equality.equal")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "equality"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.equality.compare")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "hydra.util.Comparison"))}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "List primitives with constraints",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.sort")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "ordering"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.nub")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "equality"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.elem")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                  Core.typeSchemeConstraints = (Just (M.fromList [
-                    (Core.Name "t0", Core.TypeVariableMetadata {
-                      Core.typeVariableMetadataClasses = (S.fromList [
-                        Core.Name "equality"])})]))}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Inference/Failures.hs b/src/test/haskell/Hydra/Test/Inference/Failures.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/Failures.hs
+++ /dev/null
@@ -1,2295 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Inference tests for expected failures
-
-module Hydra.Test.Inference.Failures where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Expected failure tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Expected failures",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        undefinedVariableTests,
-        unificationFailureTests,
-        invalidApplicationTests,
-        selfApplicationTests,
-        arityMismatchTests,
-        recursiveTypeTests,
-        occurCheckTests,
-        typeConstructorMisuseTests,
-        polymorphismViolationTests,
-        letBindingMismatchTests,
-        constraintSolverEdgeCaseTests,
-        primitiveTypeErrorTests,
-        complexConstraintFailureTests],
-      Testing.testGroupCases = []}
-arityMismatchTests :: Testing.TestGroup
-arityMismatchTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Arity mismatch",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Too many arguments",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 999)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))])})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "extra"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Wrong argument types with extra args",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "extra"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.not")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "arg"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-complexConstraintFailureTests :: Testing.TestGroup
-complexConstraintFailureTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Complex constraint failures",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Multi-level constraint conflicts",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "a"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "a"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "h"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "z"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "z"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "weird"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "weird")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "y"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "nested"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "g"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "int_f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "n"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "str_g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "s"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermVariable (Core.Name "s"),
-                            (Core.TermLiteral (Core.LiteralString "!"))])}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "nested")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "int_f"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "str_g"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Function composition failures",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "triple"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "increment"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "n"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "n"))})),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "stringify"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "s"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermVariable (Core.Name "s"),
-                            (Core.TermLiteral (Core.LiteralString "!"))])}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "triple")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "increment"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stringify"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "compose"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "g"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "reverse_compose"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "g"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "f"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "compose")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "reverse_compose"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.length"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-constraintSolverEdgeCaseTests :: Testing.TestGroup
-constraintSolverEdgeCaseTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Constraint solver edge cases",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Complex constraint propagation",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "complex"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "g"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "complex")),
-                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "a"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Fixed point combinators",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "fix"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "fix")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "y")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "rec"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "n"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "rec"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "omega"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "omega")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "omega"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Constraint cycles",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "b")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "c"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "c")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "c"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "z"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "a")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "a")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "circular"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "circular"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "circular")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "circular"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-invalidApplicationTests :: Testing.TestGroup
-invalidApplicationTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Invalid application",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Non-function application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLiteral (Core.LiteralString "foo")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLiteral (Core.LiteralBoolean True)),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14))),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Collection application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))]),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "foo")))),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermList []),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))))),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "index"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Primitive misapplication",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.empty")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.empty")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermMaybe Nothing),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "value"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermList []),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-letBindingMismatchTests :: Testing.TestGroup
-letBindingMismatchTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Let binding type mismatches",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Application type mismatches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "result"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "extra"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "g"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "num"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "num")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "num"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Collection type mismatches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "list1"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))]),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "list2"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "list1"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "list2"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "nums"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                        (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "mixed"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bad"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "nums"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "mixed"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "pair1"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "foo")))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "pair2"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermLiteral (Core.LiteralString "bar"), (Core.TermVariable (Core.Name "pair1")))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "pair2"))}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Function binding mismatches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "add"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "badCall"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "add")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a number"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "badCall"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bad"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "bad"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-occurCheckTests :: Testing.TestGroup
-occurCheckTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Occur check failures",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Function occur checks",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "h"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "g"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "h"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "g"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Mutual occur checks",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "g"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "b")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "a")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "b"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "cycle1"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "cycle2")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "cycle1"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "cycle2"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "cycle1")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "cycle1"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Complex occur checks",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "omega"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "omega"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "omega"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "loop"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "loop")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "loop"))}))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "loop"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-polymorphismViolationTests :: Testing.TestGroup
-polymorphismViolationTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphism violations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Identity function violations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}),
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermPair (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Constrained polymorphism violations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralString "constant"))))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bad"))}))}))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "h"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))])}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "incompatible"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Higher-order polymorphism violations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "f"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "g"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}),
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bad"))}))])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "h"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "h")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "error"))}))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-primitiveTypeErrorTests :: Testing.TestGroup
-primitiveTypeErrorTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Primitive function type errors",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Logic primitive errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.and")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.or")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not boolean"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Collection primitive errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.lookup")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a map"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.member")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a list"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.fromMaybe")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not optional"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Math primitive errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a number"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a number"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-recursiveTypeTests :: Testing.TestGroup
-recursiveTypeTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Recursive type construction",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Direct recursive types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "x")]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "x")))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursive function types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "f"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "f")])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Mutually recursive types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "y")]),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "b"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "a")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermVariable (Core.Name "g")]),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "f")))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-selfApplicationTests :: Testing.TestGroup
-selfApplicationTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Self-application",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Direct self-application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Indirect self-application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "y")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "a"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "b")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "a"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "b"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "cycle"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "cycle"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "cycle")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "cycle"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-typeConstructorMisuseTests :: Testing.TestGroup
-typeConstructorMisuseTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Type constructor misuse",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "List constructor errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a list"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeTail")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "String constructor errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "foo")])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.fromList")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a list"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toList")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Math constructor errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a number"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a number"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-undefinedVariableTests :: Testing.TestGroup
-undefinedVariableTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Undefined variable",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Basic unbound variables",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Unbound in let expressions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "y")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "y")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "z"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "z")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Shadowing scope errors",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "z"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "z"))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "z"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-unificationFailureTests :: Testing.TestGroup
-unificationFailureTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Unification failure",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Basic type mismatches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                  (Core.TermLiteral (Core.LiteralString "foo"))]))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))],
-                  (Core.TermLiteral (Core.LiteralString "foo"))]))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "foo")))),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Collection type mismatches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "not a list"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "foo")])]))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermPair (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))], (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "foo")]))),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "foo")])])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Conditional type mismatches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Polymorphic instantiation conflicts",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}),
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermPair (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))}))})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "FAIL") (\result -> Strings.cat2 "unexpected: " (ShowCore.typeScheme (Pairs.second (Pairs.first result)))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "cons"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "cons")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}),
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "cons")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))])})))),
-                Testing.universalTestCaseExpected = "FAIL"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Inference/Fundamentals.hs b/src/test/haskell/Hydra/Test/Inference/Fundamentals.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/Fundamentals.hs
+++ /dev/null
@@ -1,2698 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Inference tests for fundamental language features
-
-module Hydra.Test.Inference.Fundamentals where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Fundamental language feature tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Fundamentals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        testGroupForLambdas,
-        testGroupForLet,
-        testGroupForLiterals,
-        testGroupForPathologicalTerms,
-        testGroupForPolymorphism,
-        testGroupForPrimitives],
-      Testing.testGroupCases = []}
-testGroupForLambdas :: Testing.TestGroup
-testGroupForLambdas =
-    Testing.TestGroup {
-      Testing.testGroupName = "Lambdas",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Simple lambdas",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 137)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Nested lambdas",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Nested lambdas with shadowing",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForLet :: Testing.TestGroup
-testGroupForLet =
-    Testing.TestGroup {
-      Testing.testGroupName = "Let terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Simple",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 42.0))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "z"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Empty let",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Trivial let",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Multiple references to a let-bound term",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bar"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "foo"),
-                    (Core.TermVariable (Core.Name "bar")),
-                    (Core.TermVariable (Core.Name "foo"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Nested let",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "bar"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "foo"),
-                      (Core.TermVariable (Core.Name "bar"))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "bar"),
-                        Core.bindingTerm = (Core.TermPair (Core.TermVariable (Core.Name "foo"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "bar"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "sng"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x")])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "foo"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "sng")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "bar"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "sng")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "quux"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "sng")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "foo"), (Core.TermPair (Core.TermVariable (Core.Name "bar"), (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "quux")),
-                      Core.applicationArgument = (Core.TermList [])}))))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)),
-                      Core.pairTypeSecond = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0"))))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Nested let with shadowing",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "foo"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "foo"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bar"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "foo"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "bar"), (Core.TermVariable (Core.Name "foo"))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Let-polymorphism",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 42.0))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "z"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "square"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "z"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "z"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "z"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "f"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "square")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                        Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                        Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})])}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#6",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#7",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "list"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x")])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "list")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}), (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "list")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    Core.pairTypeSecond = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "singleton"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x")])})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                              Core.applicationArgument = (Core.TermPair (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "singleton")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}), (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "singleton")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))))})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabled"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#9",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "fortytwo"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "fortytwo"), (Core.TermVariable (Core.Name "foo"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "fortytwo"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "fortytwo"), (Core.TermVariable (Core.Name "foo"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursive and mutually recursive let (@wisnesky's test cases)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "y")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "y"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "u"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "v"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))})),
-                            Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))})),
-                    Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "v0")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabled"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "plus"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "plus")),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "plus")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "z"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "z"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "p0"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "p0"))}), (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "p0"))}))))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#6",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "z"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "z"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#7",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "z"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "w"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "z")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermPair (Core.TermVariable (Core.Name "w"), (Core.TermVariable (Core.Name "z"))))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1"),
-                    (Core.Name "t2")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                      Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t2"))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursive and mutually recursive let with polymorphism",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "g"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.fromList")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "f")])})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "g"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.fromList")),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermVariable (Core.Name "f")])}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "g"))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.fromList")),
-                          Core.applicationArgument = (Core.TermList [
-                            Core.TermVariable (Core.Name "f")])}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "f"), (Core.TermVariable (Core.Name "g"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursion involving polymorphic functions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "b"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                              Core.applicationArgument = (Core.TermList [
-                                Core.TermList [
-                                  Core.TermVariable (Core.Name "x")]])})),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "b"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                            Core.applicationArgument = (Core.TermList [
-                              Core.TermList [
-                                Core.TermVariable (Core.Name "x")]])}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0"))))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "inst"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                          Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLiteral (Core.LiteralBoolean False))}))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "rec"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "b0"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "b0"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "inst"), (Core.TermVariable (Core.Name "rec"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                    Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "inst"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralBoolean False))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "rec"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "inst"), (Core.TermVariable (Core.Name "rec"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                    Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "inst1"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralBoolean False))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "inst2"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                        Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "rec"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "inst1"), (Core.TermPair (Core.TermVariable (Core.Name "inst2"), (Core.TermVariable (Core.Name "rec"))))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                    Core.pairTypeSecond = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.pairTypeSecond = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "bar")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "bar"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "foo"), (Core.TermVariable (Core.Name "bar"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Over-generalization of hoisted let-bindings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "g"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "val"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "r"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "val"))})),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "r"))}))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "helper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "g"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "g"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "g"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "forField"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "rec"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLet (Core.Let {
-                              Core.letBindings = [
-                                Core.Binding {
-                                  Core.bindingName = (Core.Name "r"),
-                                  Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "val"))})),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                                  Core.bindingTypeScheme = Nothing}],
-                              Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "r"))}), (Core.TermVariable (Core.Name "x"))))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "main"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "rec"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "x"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "forField")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "rec"))})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "val"))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "main"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1"),
-                    (Core.Name "t2"),
-                    (Core.Name "t3")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                        Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t2")),
-                          Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t3"))}))}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                        Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t2")),
-                          Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "helper"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "main"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "b"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "helper")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "f"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))})),
-                              Core.applicationArgument = (Core.TermPair (Core.TermVariable (Core.Name "val"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "main"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                        Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                          Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "forField"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "rec"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "r"),
-                                Core.bindingTerm = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "rec")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "val"))})),
-                                Core.bindingTypeScheme = Nothing}],
-                            Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "r"))}), (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "r"))}))))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "main"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "rec"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "b"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "forField")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "rec"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))})),
-                              Core.applicationArgument = (Core.TermPair (Core.TermVariable (Core.Name "val"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "main"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                        Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                          Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#6",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "rcases"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "forFields"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "forFields")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "r"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "forFields"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "val"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "b"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "b"))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "rcases")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "forFields"))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "val"))}))})),
-                              Core.applicationArgument = (Core.TermPair (Core.TermVariable (Core.Name "val"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "r"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                        Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                        Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                          Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                          Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))}))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForLiterals :: Testing.TestGroup
-testGroupForLiterals =
-    Testing.TestGroup {
-      Testing.testGroupName = "Literals",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralString "foo")))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#3",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralBoolean False)))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#4",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0))))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-testGroupForPathologicalTerms :: Testing.TestGroup
-testGroupForPathologicalTerms =
-    Testing.TestGroup {
-      Testing.testGroupName = "Pathological terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursion",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "x")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeVariable (Core.Name "t0")),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "weird"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "id"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "id"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "weird"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "paradox"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "f"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "paradox")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "paradox"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#6",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "g"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Infinite lists",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "self"),
-                      Core.bindingTerm = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "self"))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "self"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "self"),
-                        Core.bindingTerm = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "self"))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "self"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "self"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "e"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "e"))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "self")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "e"))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "self")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabled"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "build"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "build")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))}))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "build")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForPolymorphism :: Testing.TestGroup
-testGroupForPolymorphism =
-    Testing.TestGroup {
-      Testing.testGroupName = "Polymorphism",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Simple lists and optionals",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList []))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe Nothing))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "t0"))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Lambdas, lists, and products",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "x"), (Core.TermVariable (Core.Name "x"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}),
-                  (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "y"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "y"), (Core.TermVariable (Core.Name "x"))))}))})]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                      Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                        Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t1")),
-                        Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t0"))}))}))}))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Lambdas and application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Primitives and application",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))],
-                    (Core.TermList [])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Lambdas and primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.math.add")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Mixed expressions with lambdas, constants, and primitive functions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Application terms",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Phantom type variables",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.isLeft")),
-                  Core.applicationArgument = (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.isLeft")),
-                  Core.applicationArgument = (Core.TermEither (Right (Core.TermLiteral (Core.LiteralString "x"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeBoolean),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.isLeft")),
-                    Core.applicationArgument = (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))}),
-                  (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.eithers.isLeft")),
-                    Core.applicationArgument = (Core.TermEither (Left (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137)))))}))]))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeList (Core.TypeLiteral Core.LiteralTypeBoolean)),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.eithers.isLeft")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeEither (Core.EitherType {
-                      Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "t0")),
-                      Core.eitherTypeRight = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-testGroupForPrimitives :: Testing.TestGroup
-testGroupForPrimitives =
-    Testing.TestGroup {
-      Testing.testGroupName = "Primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Monomorphic primitive functions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.strings.length")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.math.sub")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Polymorphic primitive functions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "el"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermVariable (Core.Name "el")])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "el"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                      (Core.TermVariable (Core.Name "el"))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.lists.concat")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "lists"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "lists"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                    Core.functionTypeCodomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0")))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "lists"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "lists"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#6",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "list"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermVariable (Core.Name "list"),
-                        (Core.TermList [])])}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#7",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "list"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "list"),
-                          (Core.TermList [])])}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeVariable (Core.Name "t0"))),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "lists"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "lists"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "t0")))),
-                    Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Inference/KernelExamples.hs b/src/test/haskell/Hydra/Test/Inference/KernelExamples.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/KernelExamples.hs
+++ /dev/null
@@ -1,285 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Inference tests for examples from the Hydra kernel
-
-module Hydra.Test.Inference.KernelExamples where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Examples from the Hydra kernel
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Examples from the Hydra kernel",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        testGroupForNestedLet],
-      Testing.testGroupCases = []}
-testGroupForNestedLet :: Testing.TestGroup
-testGroupForNestedLet =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nested let",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "hydra.formatting.mapFirstLetter",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "mapping"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "s"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "list"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toList")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "s"))})),
-                          Core.bindingTypeScheme = Nothing},
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "firstLetter"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "mapping")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.fromList")),
-                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maybes.cat")),
-                                Core.applicationArgument = (Core.TermList [
-                                  Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                                    Core.applicationArgument = (Core.TermVariable (Core.Name "list"))})])}))}))})),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.null")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))})),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "s"))})),
-                        Core.applicationArgument = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "firstLetter"))})),
-                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.fromList")),
-                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "list"))}))}))}))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursive let with pair return (ifElse)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "input"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "go"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "depth"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "subst"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "s"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.null")),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))})),
-                                  Core.applicationArgument = (Core.TermPair (Core.TermVariable (Core.Name "subst"), (Core.TermVariable (Core.Name "s"))))})),
-                                Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermVariable (Core.Name "go")),
-                                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                          Core.applicationArgument = (Core.TermVariable (Core.Name "depth"))})),
-                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.insert")),
-                                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "key"))})),
-                                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "val"))})),
-                                      Core.applicationArgument = (Core.TermVariable (Core.Name "subst"))}))})),
-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))}))}))}))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "result"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "go")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.maps.empty"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "input"))})),
-                          Core.bindingTypeScheme = Nothing},
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "subst"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "result"))})),
-                          Core.bindingTypeScheme = Nothing},
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "body"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "result"))})),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermPair (Core.TermVariable (Core.Name "subst"), (Core.TermVariable (Core.Name "body"))))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.mapTypeValues = (Core.TypeLiteral Core.LiteralTypeString)})),
-                      Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Recursive let with pair return (case on Type)",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "typ"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "go"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "depth"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                            Core.lambdaParameter = (Core.Name "subst"),
-                            Core.lambdaDomain = Nothing,
-                            Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "t"),
-                              Core.lambdaDomain = Nothing,
-                              Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermCases (Core.CaseStatement {
-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.Type"),
-                                  Core.caseStatementDefault = (Just (Core.TermPair (Core.TermVariable (Core.Name "subst"), (Core.TermVariable (Core.Name "t"))))),
-                                  Core.caseStatementCases = [
-                                    Core.Field {
-                                      Core.fieldName = (Core.Name "forall"),
-                                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                                        Core.lambdaParameter = (Core.Name "ft"),
-                                        Core.lambdaDomain = Nothing,
-                                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                                          Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermVariable (Core.Name "go")),
-                                              Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                                                  Core.applicationArgument = (Core.TermVariable (Core.Name "depth"))})),
-                                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))}))})),
-                                            Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.maps.insert")),
-                                                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                                      Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-                                                      Core.projectionField = (Core.Name "parameter")})),
-                                                    Core.applicationArgument = (Core.TermVariable (Core.Name "ft"))}))})),
-                                                Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),
-                                                  Core.wrappedTermBody = (Core.TermApplication (Core.Application {
-                                                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                                                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "_"))})),
-                                                    Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                                                      Core.applicationArgument = (Core.TermVariable (Core.Name "depth"))}))}))}))})),
-                                              Core.applicationArgument = (Core.TermVariable (Core.Name "subst"))}))})),
-                                          Core.applicationArgument = (Core.TermApplication (Core.Application {
-                                            Core.applicationFunction = (Core.TermProject (Core.Projection {
-                                              Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),
-                                              Core.projectionField = (Core.Name "body")})),
-                                            Core.applicationArgument = (Core.TermVariable (Core.Name "ft"))}))}))}))}]})),
-                                Core.applicationArgument = (Core.TermVariable (Core.Name "t"))}))}))}))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLet (Core.Let {
-                      Core.letBindings = [
-                        Core.Binding {
-                          Core.bindingName = (Core.Name "result"),
-                          Core.bindingTerm = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermApplication (Core.Application {
-                                Core.applicationFunction = (Core.TermVariable (Core.Name "go")),
-                                Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.maps.empty"))})),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "typ"))})),
-                          Core.bindingTypeScheme = Nothing}],
-                      Core.letBody = (Core.TermPair (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.first")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "result"))}), (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "result"))}))))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Type")),
-                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeMap (Core.MapType {
-                        Core.mapTypeKeys = (Core.TypeVariable (Core.Name "hydra.core.Name")),
-                        Core.mapTypeValues = (Core.TypeVariable (Core.Name "hydra.core.Name"))})),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "hydra.core.Type"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference",
-                (Testing.Tag "disabled")]}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Inference/NominalTypes.hs b/src/test/haskell/Hydra/Test/Inference/NominalTypes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Inference/NominalTypes.hs
+++ /dev/null
@@ -1,697 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Inference tests for nominal types
-
-module Hydra.Test.Inference.NominalTypes where
-import qualified Hydra.Core as Core
-import qualified Hydra.Inference as Inference
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Test.TestTerms as TestTerms
-import qualified Hydra.Test.TestTypes as TestTypes
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Nominal type tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "Nominal terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        testGroupForCaseStatements,
-        testGroupForProjections,
-        testGroupForRecords,
-        testGroupForVariants,
-        testGroupForWrappers],
-      Testing.testGroupCases = []}
-testGroupForCaseStatements :: Testing.TestGroup
-testGroupForCaseStatements =
-    Testing.TestGroup {
-      Testing.testGroupName = "Case statements",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#1",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeSimpleNumberName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "int"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "float"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeSimpleNumberName),
-                Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "#2",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermCases (Core.CaseStatement {
-              Core.caseStatementTypeName = TestTypes.testTypeUnionMonomorphicName,
-              Core.caseStatementDefault = Nothing,
-              Core.caseStatementCases = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "bool"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "_"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralBoolean True))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "string"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "_"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralBoolean False))}))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "unit"),
-                  Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "_"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralBoolean False))}))}]})))),
-            Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-              Core.typeSchemeVariables = [],
-              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName),
-                Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeBoolean)})),
-              Core.typeSchemeConstraints = Nothing}))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = [
-            Testing.Tag "disabledForMinimalInference"]}]}
-testGroupForProjections :: Testing.TestGroup
-testGroupForProjections =
-    Testing.TestGroup {
-      Testing.testGroupName = "Projections",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Record eliminations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = TestTypes.testTypePersonName,
-                  Core.projectionField = (Core.Name "firstName")})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypePersonName),
-                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Pair projections",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.pairs.first")))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0",
-                    (Core.Name "t1")],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypePair (Core.PairType {
-                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))})),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.pairs.second")),
-                  Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "foo"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForRecords :: Testing.TestGroup
-testGroupForRecords =
-    Testing.TestGroup {
-      Testing.testGroupName = "Records",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Simple records",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypeLatLonName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lat"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 37.7749)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lon"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-122.4194))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypeLatLonName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypeLatLonPolyName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lat"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 37.7749)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "lon"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-122.4194))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeLatLonPolyName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "lon"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeLatLonPolyName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lat"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 37.7749)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lon"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "lon"))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)),
-                    Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeLatLonPolyName),
-                      Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "latlon"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeLatLonPolyName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lat"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "latlon"))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "lon"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "latlon"))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeLatLonPolyName),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph TestTerms.testDataArthur)),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypePersonName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Record instances of simply recursive record types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypeIntListName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "head"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "tail"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = TestTypes.testTypeIntListName,
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "head"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 43)))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "tail"),
-                            Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypeIntListName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = TestTypes.testTypeIntListName,
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "head"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "tail"),
-                          Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = TestTypes.testTypeIntListName,
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "head"),
-                                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "tail"),
-                                Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypeIntListName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = TestTypes.testTypeListName,
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "head"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "tail"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                        Core.recordTypeName = TestTypes.testTypeListName,
-                        Core.recordFields = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "head"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 43)))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "tail"),
-                            Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeListName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = TestTypes.testTypeListName,
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "head"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "tail"),
-                          Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = TestTypes.testTypeListName,
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "head"),
-                                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "tail"),
-                                Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeListName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeListName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "head"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "tail"),
-                        Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = TestTypes.testTypeListName,
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "head"),
-                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "tail"),
-                              Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeListName),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Record instances of mutually recursive record types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = TestTypes.testTypeBuddyListAName,
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "head"),
-                          Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                        Core.Field {
-                          Core.fieldName = (Core.Name "tail"),
-                          Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                            Core.recordTypeName = TestTypes.testTypeBuddyListBName,
-                            Core.recordFields = [
-                              Core.Field {
-                                Core.fieldName = (Core.Name "head"),
-                                Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                              Core.Field {
-                                Core.fieldName = (Core.Name "tail"),
-                                Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]}))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = TestTypes.testTypeBuddyListAName,
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "head"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "tail"),
-                        Core.fieldTerm = (Core.TermMaybe (Just (Core.TermRecord (Core.Record {
-                          Core.recordTypeName = TestTypes.testTypeBuddyListBName,
-                          Core.recordFields = [
-                            Core.Field {
-                              Core.fieldName = (Core.Name "head"),
-                              Core.fieldTerm = (Core.TermVariable (Core.Name "x"))},
-                            Core.Field {
-                              Core.fieldName = (Core.Name "tail"),
-                              Core.fieldTerm = (Core.TermMaybe Nothing)}]}))))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                    Core.functionTypeCodomain = (Core.TypeApplication (Core.ApplicationType {
-                      Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeBuddyListAName),
-                      Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))}))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForVariants :: Testing.TestGroup
-testGroupForVariants =
-    Testing.TestGroup {
-      Testing.testGroupName = "Variant terms",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Variants",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypeTimestampName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "unixTimeMillis"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 1638200308368)))}})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypeTimestampName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypeUnionMonomorphicName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "string"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypeUnionMonomorphicName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Polymorphic and recursive variants",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "bool"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean True))}})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "t0"],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                    Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "t0"))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "value"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "other"),
-                      Core.bindingTerm = (Core.TermInject (Core.Injection {
-                        Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                        Core.injectionField = Core.Field {
-                          Core.fieldName = (Core.Name "value"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = TestTypes.testTypeUnionPolymorphicRecursiveName,
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "other"),
-                      Core.fieldTerm = (Core.TermVariable (Core.Name "other"))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeVariable TestTypes.testTypeUnionPolymorphicRecursiveName),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
-testGroupForWrappers :: Testing.TestGroup
-testGroupForWrappers =
-    Testing.TestGroup {
-      Testing.testGroupName = "Wrapper introductions and eliminations",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "Wrapper introductions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermWrap (Core.WrappedTerm {
-                  Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "v"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "v"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.functionTypeCodomain = (Core.TypeVariable TestTypes.testTypeStringAliasName)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "Wrapper eliminations",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermUnwrap TestTypes.testTypeStringAliasName))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypeStringAliasName),
-                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "#2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> Strings.cat2 "INFERENCE ERROR: " "failed") (\result -> ShowCore.typeScheme (Pairs.second (Pairs.first result))) (Inference.inferTypeOf TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermUnwrap TestTypes.testTypeStringAliasName),
-                  Core.applicationArgument = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = TestTypes.testTypeStringAliasName,
-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foo"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.typeScheme (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.typeSchemeConstraints = Nothing}))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabledForMinimalInference"]}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Json/Roundtrip.hs b/src/test/haskell/Hydra/Test/Json/Roundtrip.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Json/Roundtrip.hs
+++ /dev/null
@@ -1,539 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Round-trip test cases for JSON encoding and decoding
-
-module Hydra.Test.Json.Roundtrip where
-import qualified Hydra.Core as Core
-import qualified Hydra.Json.Decode as Decode
-import qualified Hydra.Json.Encode as Encode
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
-import qualified Hydra.Lib.Literals as Literals
--- | Round-trip test cases for JSON encoding and decoding
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "JSON round-trip",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "literal types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "boolean true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeBoolean) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeBoolean) (Core.TermLiteral (Core.LiteralBoolean True)))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "boolean false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeBoolean) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeBoolean) (Core.TermLiteral (Core.LiteralBoolean False)))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "int8 positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "int8 negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-17)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-17)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "int16",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 1000))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 1000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "int32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100000))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uint8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint8)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint8)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 200))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 200))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uint16",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint16)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint16)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 50000))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 50000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "int64",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 1000000000000))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 1000000000000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uint32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint32)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint32)) (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 4000000000))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 4000000000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1.5))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1.5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float64",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float32 NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (0/0)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float32 positive infinity",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (1/0)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float32 negative infinity",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-(1/0))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float64 NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float64 positive infinity",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float64 negative infinity",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat64)) (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string simple",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeString) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeString) (Core.TermLiteral (Core.LiteralString "hello")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeString) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeString) (Core.TermLiteral (Core.LiteralString "")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with spaces",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeString) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeString) (Core.TermLiteral (Core.LiteralString "hello world")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello world")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "decimal precision",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.0"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-17.0"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-17.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal fraction",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "3.14"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "3.14"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal negative fraction",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.5"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.5"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal tiny exponent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "1.0e-20"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "1.0e-20"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal huge exponent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeLiteral Core.LiteralTypeDecimal) (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "1.0e20"))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "1.0e20"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "collection types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list of integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list of strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)) (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b"))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Core.TermList []))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeList (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))) (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "set of strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeString)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeString)) (Core.TermSet (S.fromList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b"))])))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermSet (S.fromList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b"))])))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Core.TermSet S.empty))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermSet S.empty))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "optional types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "optional string with value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)) (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "optional string nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)) (Core.TermMaybe Nothing))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "optional int with value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested optional: nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))) (Core.TermMaybe Nothing))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested optional: just nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))) (Core.TermMaybe (Just (Core.TermMaybe Nothing))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermMaybe Nothing))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested optional: just just value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))) (Core.TermMaybe (Just (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "record types",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "record with required fields",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "age"),
-                    Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}]) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "age"),
-                    Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}]) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "record with optional field present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "email"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))}]) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "email"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))}]) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "email"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "alice@example.com"))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "email"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "alice@example.com"))))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "record with optional field absent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "email"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))}]) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "email"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))}]) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "email"),
-                      Core.fieldTerm = (Core.TermMaybe Nothing)}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Alice"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "email"),
-                      Core.fieldTerm = (Core.TermMaybe Nothing)}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "record with mixed optional fields",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "email"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "age"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))}]) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "email"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString))},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "age"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))}]) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "email"),
-                      Core.fieldTerm = (Core.TermMaybe Nothing)},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Bob"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "email"),
-                      Core.fieldTerm = (Core.TermMaybe Nothing)},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "age"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "record with nested optional field",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\json -> Eithers.either (\e -> e) (\decoded -> ShowCore.term decoded) (Decode.fromJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "value"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))}]) json)) (Encode.toJson Maps.empty (Core.Name "test") (Core.TypeRecord [
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "name"),
-                    Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-                  Core.FieldType {
-                    Core.fieldTypeName = (Core.Name "value"),
-                    Core.fieldTypeType = (Core.TypeMaybe (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))}]) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "value"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "test"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "test"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "value"),
-                      Core.fieldTerm = (Core.TermMaybe (Just (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Json/Writer.hs b/src/test/haskell/Hydra/Test/Json/Writer.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Json/Writer.hs
+++ /dev/null
@@ -1,325 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for JSON serialization
-
-module Hydra.Test.Json.Writer where
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Json.Writer as Writer
-import qualified Hydra.Testing as Testing
-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 Hydra.Lib.Literals as Literals
--- | Test cases for JSON serialization (writer)
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "JSON serialization",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson Model.ValueNull),
-                Testing.universalTestCaseExpected = "null"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueBoolean True)),
-                Testing.universalTestCaseExpected = "true"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueBoolean False)),
-                Testing.universalTestCaseExpected = "false"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "0.0"))),
-                Testing.universalTestCaseExpected = "0"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive integer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "42.0"))),
-                Testing.universalTestCaseExpected = "42"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative integer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "-17.0"))),
-                Testing.universalTestCaseExpected = "-17"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "large integer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1000000.0"))),
-                Testing.universalTestCaseExpected = "1000000"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "decimal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "3.14"))),
-                Testing.universalTestCaseExpected = "3.14"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative decimal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "-2.5"))),
-                Testing.universalTestCaseExpected = "-2.5"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "hundredth",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1.0e-2"))),
-                Testing.universalTestCaseExpected = "1.0e-2"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small decimal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1.0e-3"))),
-                Testing.universalTestCaseExpected = "1.0e-3"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "decimal precision",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tiny exponent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1.0e-20"))),
-                Testing.universalTestCaseExpected = "1.0e-20"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "huge exponent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1.0e20"))),
-                Testing.universalTestCaseExpected = "1.0e20"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "")),
-                Testing.universalTestCaseExpected = "\"\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "hello")),
-                Testing.universalTestCaseExpected = "\"hello\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with spaces",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "hello world")),
-                Testing.universalTestCaseExpected = "\"hello world\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with double quote",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "say \"hi\"")),
-                Testing.universalTestCaseExpected = "\"say \\\"hi\\\"\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with backslash",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "path\\to\\file")),
-                Testing.universalTestCaseExpected = "\"path\\\\to\\\\file\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "line1\nline2")),
-                Testing.universalTestCaseExpected = "\"line1\\nline2\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with carriage return",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "line1\rline2")),
-                Testing.universalTestCaseExpected = "\"line1\\rline2\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with tab",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "col1\tcol2")),
-                Testing.universalTestCaseExpected = "\"col1\\tcol2\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with mixed escapes",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueString "a\"b\\c\nd")),
-                Testing.universalTestCaseExpected = "\"a\\\"b\\\\c\\nd\""})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "arrays",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty array",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [])),
-                Testing.universalTestCaseExpected = "[]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [
-                  Model.ValueNumber (Literals.stringToDecimal "1.0")])),
-                Testing.universalTestCaseExpected = "[1]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [
-                  Model.ValueNumber (Literals.stringToDecimal "1.0"),
-                  (Model.ValueNumber (Literals.stringToDecimal "2.0")),
-                  (Model.ValueNumber (Literals.stringToDecimal "3.0"))])),
-                Testing.universalTestCaseExpected = "[1, 2, 3]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [
-                  Model.ValueString "a",
-                  (Model.ValueString "b")])),
-                Testing.universalTestCaseExpected = "[\"a\", \"b\"]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [
-                  Model.ValueNumber (Literals.stringToDecimal "1.0"),
-                  (Model.ValueString "two"),
-                  (Model.ValueBoolean True),
-                  Model.ValueNull])),
-                Testing.universalTestCaseExpected = "[1, \"two\", true, null]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "objects",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty object",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueObject M.empty)),
-                Testing.universalTestCaseExpected = "{}"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single key-value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueObject (M.fromList [
-                  ("name", (Model.ValueString "Alice"))]))),
-                Testing.universalTestCaseExpected = "{\"name\": \"Alice\"}"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueObject (M.fromList [
-                  ("a", (Model.ValueNumber (Literals.stringToDecimal "1.0"))),
-                  ("b", (Model.ValueNumber (Literals.stringToDecimal "2.0")))]))),
-                Testing.universalTestCaseExpected = "{\"a\": 1, \"b\": 2}"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed value types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueObject (M.fromList [
-                  ("active", (Model.ValueBoolean True)),
-                  ("count", (Model.ValueNumber (Literals.stringToDecimal "42.0"))),
-                  ("name", (Model.ValueString "test"))]))),
-                Testing.universalTestCaseExpected = "{\"active\": true, \"count\": 42, \"name\": \"test\"}"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "nested structures",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested arrays",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [
-                  Model.ValueArray [
-                    Model.ValueNumber (Literals.stringToDecimal "1.0"),
-                    (Model.ValueNumber (Literals.stringToDecimal "2.0"))],
-                  (Model.ValueArray [
-                    Model.ValueNumber (Literals.stringToDecimal "3.0"),
-                    (Model.ValueNumber (Literals.stringToDecimal "4.0"))])])),
-                Testing.universalTestCaseExpected = "[[1, 2], [3, 4]]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "object with array",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueObject (M.fromList [
-                  ("items", (Model.ValueArray [
-                    Model.ValueNumber (Literals.stringToDecimal "1.0"),
-                    (Model.ValueNumber (Literals.stringToDecimal "2.0"))]))]))),
-                Testing.universalTestCaseExpected = "{\"items\": [1, 2]}"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "array of objects",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueArray [
-                  Model.ValueObject (M.fromList [
-                    ("id", (Model.ValueNumber (Literals.stringToDecimal "1.0")))]),
-                  (Model.ValueObject (M.fromList [
-                    ("id", (Model.ValueNumber (Literals.stringToDecimal "2.0")))]))])),
-                Testing.universalTestCaseExpected = "[{\"id\": 1}, {\"id\": 2}]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested object",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Writer.printJson (Model.ValueObject (M.fromList [
-                  ("user", (Model.ValueObject (M.fromList [
-                    ("name", (Model.ValueString "Bob"))])))]))),
-                Testing.universalTestCaseExpected = "{\"user\": {\"name\": \"Bob\"}}"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Json/Yaml.hs b/src/test/haskell/Hydra/Test/Json/Yaml.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Json/Yaml.hs
+++ /dev/null
@@ -1,116 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Round-trip test cases for the JSON<->YAML bridge, focused on decimal precision
-
-module Hydra.Test.Json.Yaml where
-import qualified Hydra.Json.Model as Model
-import qualified Hydra.Json.Writer as Writer
-import qualified Hydra.Json.Yaml.Decode as Decode
-import qualified Hydra.Json.Yaml.Encode as Encode
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Hydra.Lib.Literals as Literals
--- | Round-trip test cases for the JSON<->YAML decimal bridge
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "JSON<->YAML bridge",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "decimal round-trip",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "0.0"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "0.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "42.0"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "42.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "-17.0"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "-17.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fraction",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "3.14"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "3.14")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative fraction",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "-2.5"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "-2.5")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tiny exponent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "1.0e-20"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1.0e-20")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "huge exponent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueNumber (Literals.stringToDecimal "1.0e20"))))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueNumber (Literals.stringToDecimal "1.0e20")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml Model.ValueNull))),
-                Testing.universalTestCaseExpected = (Writer.printJson Model.ValueNull)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueBoolean True)))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueBoolean True))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueBoolean False)))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueBoolean False))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueString "hello")))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueString "hello"))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed array",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> e) (\back -> Writer.printJson back) (Decode.yamlToJson (Encode.jsonToYaml (Model.ValueArray [
-                  Model.ValueNumber (Literals.stringToDecimal "1.0"),
-                  (Model.ValueNumber (Literals.stringToDecimal "1.0e-20")),
-                  (Model.ValueString "note")])))),
-                Testing.universalTestCaseExpected = (Writer.printJson (Model.ValueArray [
-                  Model.ValueNumber (Literals.stringToDecimal "1.0"),
-                  (Model.ValueNumber (Literals.stringToDecimal "1.0e-20")),
-                  (Model.ValueString "note")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Chars.hs b/src/test/haskell/Hydra/Test/Lib/Chars.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Chars.hs
+++ /dev/null
@@ -1,230 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.chars primitives
-
-module Hydra.Test.Lib.Chars where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.chars primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.chars primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "isAlphaNum",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "letter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isAlphaNum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "digit",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isAlphaNum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "space",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isAlphaNum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 32)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "punctuation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isAlphaNum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 46)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isLower",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 65)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "digit",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isSpace",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "space",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isSpace")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 32)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tab",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isSpace")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 9)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isSpace")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "letter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isSpace")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isUpper",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 65)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "digit",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.isUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toLower",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.toLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 65)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.toLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "digit",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.toLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toUpper",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.toUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 65))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.toUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 65)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 65))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "digit",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.chars.toUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 53))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Eithers.hs b/src/test/haskell/Hydra/Test/Lib/Eithers.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Eithers.hs
+++ /dev/null
@@ -1,381 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.eithers primitives
-
-module Hydra.Test.Lib.Eithers where
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as Core
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.eithers primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.eithers primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "bind",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bind Right with success",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.bind (Right "ab") (\s -> Logic.ifElse (Strings.null s) (Left 0) (Right (Strings.length s))))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Right 2))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bind Right with failure",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.bind (Right "") (\s -> Logic.ifElse (Strings.null s) (Left 0) (Right (Strings.length s))))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Left 0))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bind Left returns Left unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.bind (Left 42) (\s -> Logic.ifElse (Strings.null s) (Left 0) (Right (Strings.length s))))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Left 42))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bimap",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map left value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.bimap (\x -> Math.mul x 2) (\s -> Strings.length s) (Left 5))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Left 10))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map right value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.bimap (\x -> Math.mul x 2) (\s -> Strings.length s) (Right "ab"))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Right 2))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isLeft",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "left value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Eithers.isLeft (Left 42))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "right value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Eithers.isLeft (Right "test"))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isRight",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "right value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Eithers.isRight (Right "test"))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "left value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Eithers.isRight (Left 42))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "fromLeft",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "extract left",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Eithers.fromLeft 99 (Left 42))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 42)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "use default for right",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Eithers.fromLeft 99 (Right "test"))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 99)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "fromRight",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "extract right",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Literals.showString s) (Eithers.fromRight "default" (Right "test"))),
-                Testing.universalTestCaseExpected = ((\s -> Literals.showString s) "test")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "use default for left",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Literals.showString s) (Eithers.fromRight "default" (Left 42))),
-                Testing.universalTestCaseExpected = ((\s -> Literals.showString s) "default")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "either",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "apply left function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Eithers.either (\x -> Math.mul x 2) (\s -> Strings.length s) (Left 5))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 10)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "apply right function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Eithers.either (\x -> Math.mul x 2) (\s -> Strings.length s) (Right "ab"))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 2)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lefts",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter left values",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Eithers.lefts [
-                  Left 1,
-                  (Right "a"),
-                  (Left 2),
-                  (Right "b")])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all lefts",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Eithers.lefts [
-                  Left 1,
-                  (Left 2)])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all rights",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Eithers.lefts [
-                  Right "a",
-                  (Right "b")])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Eithers.lefts [])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "rights",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter right values",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Eithers.rights [
-                  Left 1,
-                  (Right "a"),
-                  (Left 2),
-                  (Right "b")])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [
-                  "a",
-                  "b"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all rights",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Eithers.rights [
-                  Right "a",
-                  (Right "b")])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [
-                  "a",
-                  "b"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all lefts",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Eithers.rights [
-                  Left 1,
-                  (Left 2)])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Eithers.rights [])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "partitionEithers",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partition mixed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) (Eithers.partitionEithers [
-                  Left 1,
-                  (Right "a"),
-                  (Left 2),
-                  (Right "b")])),
-                Testing.universalTestCaseExpected = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) ([
-                  1,
-                  2], [
-                  "a",
-                  "b"]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all lefts",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) (Eithers.partitionEithers [
-                  Left 1,
-                  (Left 2)])),
-                Testing.universalTestCaseExpected = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) ([
-                  1,
-                  2], []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all rights",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) (Eithers.partitionEithers [
-                  Right "a",
-                  (Right "b")])),
-                Testing.universalTestCaseExpected = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) ([], [
-                  "a",
-                  "b"]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) (Eithers.partitionEithers [])),
-                Testing.universalTestCaseExpected = ((\p -> Core.pair (\xs -> Core.list (\n -> Literals.showInt32 n) xs) (\xs -> Core.list (\s -> Literals.showString s) xs) p) ([], []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "map",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map right value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.map (\x -> Math.mul x 2) (Right 5))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Right 10))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "preserve left",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Eithers.map (\x -> Math.mul x 2) (Left 99))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\n -> Literals.showInt32 n) (\n -> Literals.showInt32 n) e) (Left 99))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "mapList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all succeed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\s -> Literals.showString s) (\xs -> Core.list (\n -> Literals.showInt32 n) xs) e) (Eithers.mapList (\x -> Logic.ifElse (Equality.equal x 0) (Left "zero") (Right (Math.mul x 2))) [
-                  1,
-                  2,
-                  3])),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\s -> Literals.showString s) (\xs -> Core.list (\n -> Literals.showInt32 n) xs) e) (Right [
-                  2,
-                  4,
-                  6]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first fails",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\s -> Literals.showString s) (\xs -> Core.list (\n -> Literals.showInt32 n) xs) e) (Eithers.mapList (\x -> Logic.ifElse (Equality.equal x 0) (Left "zero") (Right (Math.mul x 2))) [
-                  1,
-                  0,
-                  3])),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\s -> Literals.showString s) (\xs -> Core.list (\n -> Literals.showInt32 n) xs) e) (Left "zero"))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\s -> Literals.showString s) (\xs -> Core.list (\n -> Literals.showInt32 n) xs) e) (Eithers.mapList (\x -> Logic.ifElse (Equality.equal x 0) (Left "zero") (Right (Math.mul x 2))) [])),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\s -> Literals.showString s) (\xs -> Core.list (\n -> Literals.showInt32 n) xs) e) (Right []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "mapMaybe",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just succeeds",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\s -> Literals.showString s) (\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) e) (Eithers.mapMaybe (\x -> Logic.ifElse (Equality.equal x 0) (Left "zero") (Right (Math.mul x 2))) (Just 5))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\s -> Literals.showString s) (\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) e) (Right (Just 10)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just fails",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\s -> Literals.showString s) (\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) e) (Eithers.mapMaybe (\x -> Logic.ifElse (Equality.equal x 0) (Left "zero") (Right (Math.mul x 2))) (Just 0))),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\s -> Literals.showString s) (\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) e) (Left "zero"))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\e -> Core.either (\s -> Literals.showString s) (\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) e) (Eithers.mapMaybe (\x -> Logic.ifElse (Equality.equal x 0) (Left "zero") (Right (Math.mul x 2))) Nothing)),
-                Testing.universalTestCaseExpected = ((\e -> Core.either (\s -> Literals.showString s) (\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) e) (Right Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Equality.hs b/src/test/haskell/Hydra/Test/Lib/Equality.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Equality.hs
+++ /dev/null
@@ -1,712 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.equality primitives
-
-module Hydra.Test.Lib.Equality where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.equality primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.equality primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "compare",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less than",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "equalTo"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater than",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "greaterThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "equal",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unequal integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "gt",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "gte",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gte")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gte")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gte")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "identity",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "integer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.identity")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lt",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lte",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lte")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lte")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lte")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "max",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "min",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "compare strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less than (lexicographic)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "banana"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "equalTo"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater than (lexicographic)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "greaterThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty vs non-empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "prefix vs longer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ab"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lt strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less (lexicographic)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "banana"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "gt strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater (lexicographic)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "banana"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "max strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "zebra")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "zebra")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "min strings",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "apple")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "zebra"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "apple"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "apple")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "compare floats",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less than",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "equalTo"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater than",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "greaterThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative vs positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.compare")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "lessThan"),
-                    Core.fieldTerm = Core.TermUnit}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lt floats",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "gt floats",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greater",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "less",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Lists.hs b/src/test/haskell/Hydra/Test/Lib/Lists.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Lists.hs
+++ /dev/null
@@ -1,3088 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.lists primitives
-
-module Hydra.Test.Lib.Lists where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.lists primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.lists primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "apply",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "string transformations",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "string transformations",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.apply")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "hydra.lib.strings.toUpper"),
-                          (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))])})),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralString "One"),
-                        (Core.TermLiteral (Core.LiteralString "Two")),
-                        (Core.TermLiteral (Core.LiteralString "Three"))])})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "ONE"),
-                      (Core.TermLiteral (Core.LiteralString "TWO")),
-                      (Core.TermLiteral (Core.LiteralString "THREE")),
-                      (Core.TermLiteral (Core.LiteralString "one")),
-                      (Core.TermLiteral (Core.LiteralString "two")),
-                      (Core.TermLiteral (Core.LiteralString "three"))]))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "edge cases",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "empty function list",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.apply")),
-                        Core.applicationArgument = (Core.TermList [])})),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralString "a"),
-                        (Core.TermLiteral (Core.LiteralString "b"))])})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "empty input list",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.apply")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "hydra.lib.strings.toUpper")])})),
-                      Core.applicationArgument = (Core.TermList [])})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "single function",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.apply")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "hydra.lib.strings.toUpper")])})),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralString "hello")])})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "HELLO")]))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "single input",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.apply")),
-                        Core.applicationArgument = (Core.TermList [
-                          Core.TermVariable (Core.Name "hydra.lib.strings.toUpper"),
-                          (Core.TermVariable (Core.Name "hydra.lib.strings.toLower"))])})),
-                      Core.applicationArgument = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralString "Test")])})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "TEST"),
-                      (Core.TermLiteral (Core.LiteralString "test"))]))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "bind",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negation function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.bind")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2)))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3)))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-4))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.bind")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.bind")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))])})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "duplicate elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.bind")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1)))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "concat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple non-empty lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]),
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8)))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty lists included",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                    (Core.TermList []),
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all empty lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [],
-                    (Core.TermList []),
-                    (Core.TermList [])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list of lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "concat2",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two non-empty lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first list empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second list empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "both lists empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "a"),
-                      (Core.TermLiteral (Core.LiteralString "b"))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "c"),
-                    (Core.TermLiteral (Core.LiteralString "d"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c")),
-                  (Core.TermLiteral (Core.LiteralString "d"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "cons",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cons to non-empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cons to empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cons negative number",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cons string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "world")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "hello"),
-                  (Core.TermLiteral (Core.LiteralString "world"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "drop",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop from beginning",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop zero elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop more than length",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop from empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop negative amount",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "dropWhile",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop while less than 3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.dropWhile")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.dropWhile")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "drop no elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.dropWhile")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.dropWhile")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "elem",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "element present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "element not present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element not present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "duplicate elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string element present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "world"),
-                    (Core.TermLiteral (Core.LiteralString "hello")),
-                    (Core.TermLiteral (Core.LiteralString "test"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string element not present",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.elem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "missing"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "world"),
-                    (Core.TermLiteral (Core.LiteralString "hello"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "filter",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3)))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter no elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "find",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find existing element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find first matching",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find in empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.equal")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "foldl",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sum with addition",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "product with multiplication",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.mul"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 24))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 15))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "subtraction fold",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.sub"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "foldr",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "subtraction fold right",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldr")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.sub"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldr")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldr")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 15))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sum with addition",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldr")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "subtraction vs foldl",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldr")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.sub"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-8)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "group",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "consecutive duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.group")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))]),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.group")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))]),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all same",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.group")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.group")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.group")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "intercalate",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "double zero separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intercalate")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]),
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8)))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intercalate")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intercalate")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))]),
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list of lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intercalate")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))])})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intercalate")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lists with empty lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intercalate")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]),
-                    (Core.TermList [])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "intersperse",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string interspersion",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "and"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "one"),
-                    (Core.TermLiteral (Core.LiteralString "two")),
-                    (Core.TermLiteral (Core.LiteralString "three"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "one"),
-                  (Core.TermLiteral (Core.LiteralString "and")),
-                  (Core.TermLiteral (Core.LiteralString "two")),
-                  (Core.TermLiteral (Core.LiteralString "and")),
-                  (Core.TermLiteral (Core.LiteralString "three"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "x"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "only")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "only")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "x"))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "+"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "+")),
-                  (Core.TermLiteral (Core.LiteralString "b"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "number interspersion",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "length",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "many elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 9))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "map",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string to uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.toUpper"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "one"),
-                    (Core.TermLiteral (Core.LiteralString "two"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "ONE"),
-                  (Core.TermLiteral (Core.LiteralString "TWO"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.toUpper"))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.toUpper"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "hello")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "HELLO")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "number negation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2)))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "identity function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.equality.identity"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeAt",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "valid index",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "last element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "out of bounds",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative index",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeHead",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-empty int list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty int list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-empty string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "hello"),
-                    (Core.TermLiteral (Core.LiteralString "world"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeInit",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeInit")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeInit")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermList []))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeInit")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeInit")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b"))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeLast",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeLast")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeLast")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeLast")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeLast")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "hello"),
-                    (Core.TermLiteral (Core.LiteralString "world"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "world")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeTail",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeTail")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeTail")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermList []))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeTail")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeTail")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "b"),
-                  (Core.TermLiteral (Core.LiteralString "c"))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "nub",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "remove duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.nub")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.nub")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.nub")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.nub")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.nub")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.nub")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "a")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "null",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty int list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-empty string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "partition",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partition greater than 3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.partition")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))], (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partition all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.partition")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))], (Core.TermList []))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partition no elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.partition")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [], (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partition even numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.partition")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))], (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.partition")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [], (Core.TermList []))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "pure",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "one"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "one")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "number element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative number",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "replicate",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replicate three times",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.replicate")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replicate zero times",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.replicate")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replicate once",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.replicate")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 99))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replicate string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.replicate")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "hello"),
-                  (Core.TermLiteral (Core.LiteralString "hello"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "reverse",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "c"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "a"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "singleton",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "number element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.singleton")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative number",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.singleton")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.singleton")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.singleton")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "hello")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sort",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unsorted numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "already sorted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "reverse sorted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "duplicates",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string sort",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "zebra"),
-                    (Core.TermLiteral (Core.LiteralString "apple")),
-                    (Core.TermLiteral (Core.LiteralString "banana"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "apple"),
-                  (Core.TermLiteral (Core.LiteralString "banana")),
-                  (Core.TermLiteral (Core.LiteralString "zebra"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sortOn",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sort by string length",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortOn")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.length"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "hello"),
-                    (Core.TermLiteral (Core.LiteralString "hi")),
-                    (Core.TermLiteral (Core.LiteralString "world"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "hi"),
-                  (Core.TermLiteral (Core.LiteralString "hello")),
-                  (Core.TermLiteral (Core.LiteralString "world"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortOn")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.length"))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single string element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortOn")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.length"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "test")])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "test")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sort by negation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortOn")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.negate"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sort by absolute value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortOn")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.abs"))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3)))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "span",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "span less than 3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))], (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "span all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))], (Core.TermList []))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "span no elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.gt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [], (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
-                    Core.applicationArgument = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.equality.lt")),
-                          Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))}))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermList [], (Core.TermList []))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "take",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "take from beginning",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "take zero elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "take all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "take more than length",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "take from empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "take negative amount",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "transpose",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "square matrix",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.transpose")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.transpose")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single row",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.transpose")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))]),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single column",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.transpose")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))]),
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ragged matrix",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.transpose")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))]),
-                    (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]),
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6))])]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "uncons",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.uncons")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.uncons")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermList []))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.uncons")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "zip",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal length lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "a"))),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralString "b")))),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)), (Core.TermLiteral (Core.LiteralString "c"))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first list shorter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b")),
-                    (Core.TermLiteral (Core.LiteralString "c"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "a"))),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralString "b"))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second list shorter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)), (Core.TermLiteral (Core.LiteralString "a"))),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)), (Core.TermLiteral (Core.LiteralString "b"))))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty first list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty second list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "both empty lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "zipWith",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "addition",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 9)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first list shorter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second list shorter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty first list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty second list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.add"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string concatenation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "a"),
-                      (Core.TermLiteral (Core.LiteralString "b"))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "1"),
-                    (Core.TermLiteral (Core.LiteralString "2"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a1"),
-                  (Core.TermLiteral (Core.LiteralString "b2"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Literals.hs b/src/test/haskell/Hydra/Test/Lib/Literals.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Literals.hs
+++ /dev/null
@@ -1,2104 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.literals primitives
-
-module Hydra.Test.Lib.Literals where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Hydra.Lib.Literals as Literals
--- | Test cases for hydra.lib.literals primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.literals primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToInt8",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-42)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToInt16",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 1000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-1000))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 (-1000)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToInt32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-42)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToInt64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 1000000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-1000000))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (-1000000)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToUint8",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 100)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 100))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToUint16",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 1000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToUint32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 100000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 100000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToUint64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 1000000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "int8ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int8ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int8ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "max value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int8ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 127)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 127))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "min value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int8ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-128))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-128)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "int16ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int16ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 1000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int16ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 (-1000))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-1000)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "int32ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int32ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int32ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int32ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "int64ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int64ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 1000000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.int64ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (-1000000))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-1000000)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "uint8ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint8ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "max value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint8ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 255)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 255))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "uint16ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint16ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint16ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 1000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "uint32ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint32ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint32ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 100000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 100000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "uint64ToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint64ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.uint64ToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 1000000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 1000000))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "float32ToBigfloat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float32ToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 2.5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float32ToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-2.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-2.5)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float32ToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "float64ToBigfloat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float64ToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.14159))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float64ToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.71828))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-2.71828)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float64ToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigfloatToFloat32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.14)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.14))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-2.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-2.5)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigfloatToFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.14159)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-2.71828))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.71828)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToBigfloat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 42.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-42.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigfloatToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 42.7)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 43))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-42.7))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-43)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round down",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 42.3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "half even up",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 42.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "half even down",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigfloatToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 43.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 44))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bigintToDecimal",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-42.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.bigintToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "decimalToBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-42.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round down",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.3")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round up",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.7")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 43))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "decimalToFloat32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "2.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-2.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "decimalToFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "2.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.decimalToFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "float32ToDecimal",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float32ToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float32ToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "2.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float32ToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-2.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "float64ToDecimal",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float64ToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float64ToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "2.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.float64ToDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.0"))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showDecimal",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "42.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "42.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative whole",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-42.0")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-42.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive fraction",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "3.14")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.14")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative fraction",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-2.5")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-2.5")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readDecimal",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "3.14"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "3.14"))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "0"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "0.0"))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralDecimal (Literals.stringToDecimal "-42.0"))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readDecimal")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showInt8",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "42")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-42")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showInt16",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 1000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 (-1000))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-1000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showInt32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "42")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-42")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showInt64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 1000000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1000000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (-1000000))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-1000000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showUint8",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "max value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 255)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "255")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showUint16",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 1000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showUint32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 100000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "100000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showUint64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 1000000)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1000000")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "42")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-42")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showFloat32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.14)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.14")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-2.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "-2.5")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 5.0e-2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "5.0e-2")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small positive 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.0e-2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.0e-2")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "very small",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1.0e-3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1.0e-3")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "normal decimal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.1)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.1")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.14159")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0e-2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "5.0e-2")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small positive 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0e-2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.0e-2")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "very small",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0e-3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1.0e-3")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "normal decimal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.1)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.1")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showBigfloat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.14)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.14")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.0")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 5.0e-2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "5.0e-2")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "small positive 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.0e-2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "3.0e-2")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "very small",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 1.0e-3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "1.0e-3")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "normal decimal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.1)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "0.1")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showBoolean",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBoolean")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "true")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showBoolean")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "false")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "showString",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"hello\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "latin accented",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "caf\233"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"caf\\233\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "greek lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\955"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\955\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed ascii and non-ascii",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "A\233B"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"A\\233B\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tab",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\t"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\t\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\n"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\n\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "carriage return",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\r"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\r\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "backslash",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\\"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\\\\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "double quote",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\\"\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\NUL"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\NUL\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bell",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\a"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\a\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "backspace",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\b"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\b\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "form feed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\f"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\f\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "vertical tab",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\v"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\v\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "delete",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.showString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\DEL"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "\"\\DEL\"")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readInt8",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-42)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "max value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "127"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 127))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "min value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-128"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 (-128)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "overflow",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "128"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readInt16",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "1000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 1000))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-1000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 (-1000)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readInt32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-42)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readInt64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "1000000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 1000000))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-1000000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 (-1000000)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readInt64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readUint8",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "0"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "100"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 100))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "max value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "255"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 255))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint8")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-1"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readUint16",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "0"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "1000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 1000))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint16")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-1"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readUint32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "0"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "100000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 100000))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-1"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readUint64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "0"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "typical",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "1000000"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 1000000))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readUint64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-1"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readBigint",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-42"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint (-42)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "0"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "large",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "123456789012345678901234567890"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint 123456789012345678901234567890))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = [
-                Testing.Tag "disabled"]},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigint")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readFloat32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "3.14"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.14))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-2.5"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-2.5)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readFloat32")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "3.14159"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "-2.71828"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.71828)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readBigfloat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "3.14"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.14))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBigfloat")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readBoolean",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBoolean")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "true"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralBoolean True)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBoolean")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "false"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralBoolean False)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "invalid",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readBoolean")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "yes"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "readString",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "quoted string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\"hello\""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty quoted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\"\""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unquoted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.readString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "stringToBinary",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple base64",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.stringToBinary")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "aGVsbG8="))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary "aGVsbG8="))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.stringToBinary")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary ""))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "binaryToString",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple binary",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.binaryToString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary "aGVsbG8=")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "aGVsbG8=")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty binary",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.literals.binaryToString")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBinary (Literals.stringToBinary "")))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Logic.hs b/src/test/haskell/Hydra/Test/Lib/Logic.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Logic.hs
+++ /dev/null
@@ -1,239 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.logic primitives
-
-module Hydra.Test.Lib.Logic where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.logic primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.logic primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "and",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true and true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.and")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true and false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.and")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false and true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.and")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false and false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.and")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "ifElse",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [
-            Testing.TestGroup {
-              Testing.testGroupName = "boolean values",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "true condition returns then",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "false condition returns else",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "integer values",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "true selects first int",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "false selects second int",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]},
-            Testing.TestGroup {
-              Testing.testGroupName = "string values",
-              Testing.testGroupDescription = Nothing,
-              Testing.testGroupSubgroups = [],
-              Testing.testGroupCases = [
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "true selects first string",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "yes"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "no"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "yes")))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []},
-                Testing.TestCaseWithMetadata {
-                  Testing.testCaseWithMetadataName = "false selects second string",
-                  Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                    Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.ifElse")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "yes"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "no"))})))),
-                    Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "no")))})),
-                  Testing.testCaseWithMetadataDescription = Nothing,
-                  Testing.testCaseWithMetadataTags = []}]}],
-          Testing.testGroupCases = []},
-        Testing.TestGroup {
-          Testing.testGroupName = "not",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "not true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.not")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "not false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.not")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "or",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true or true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.or")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "true or false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.or")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false or true",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.or")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean True))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "false or false",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.logic.or")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralBoolean False))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Maps.hs b/src/test/haskell/Hydra/Test/Lib/Maps.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Maps.hs
+++ /dev/null
@@ -1,605 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.maps primitives
-
-module Hydra.Test.Lib.Maps where
-import qualified Hydra.Lib.Chars as Chars
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as Core
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Test cases for hydra.lib.maps primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.maps primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "alter",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "insert new key",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.alter (\_ -> Just "new") 3 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "new")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "update existing key",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.alter (\_ -> Just "updated") 2 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "updated")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "delete key",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.alter (\_ -> Nothing) 2 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bimap",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "transform both",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.bimap (\k -> Math.mul k 2) (\v -> Strings.toUpper v) (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (2, "A"),
-                  (4, "B")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.bimap (\k -> Math.mul k 2) (\v -> Strings.toUpper v) M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "elems",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get all elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Maps.elems (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [
-                  "a",
-                  "b"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unsorted keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Maps.elems (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [
-                  "a",
-                  "b",
-                  "c"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\s -> Literals.showString s) xs) (Maps.elems M.empty)),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\s -> Literals.showString s) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "empty",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) Maps.empty),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "filter",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter values starting with a",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.filter (\v -> Equality.equal (Maybes.fromMaybe 0 (Maybes.map (\c -> Chars.toLower c) (Strings.maybeCharAt 0 v))) 97) (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "ab")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (3, "ab")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter all",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.filter (\v -> Equality.equal (Maybes.fromMaybe 0 (Maybes.map (\c -> Chars.toLower c) (Strings.maybeCharAt 0 v))) 97) (M.fromList [
-                  (1, "b"),
-                  (2, "c")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.filter (\v -> Equality.equal (Maybes.fromMaybe 0 (Maybes.map (\c -> Chars.toLower c) (Strings.maybeCharAt 0 v))) 97) M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "filterWithKey",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter by key > 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.filterWithKey (\k -> \v -> Equality.gt k 1) (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (2, "b"),
-                  (3, "c")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter all",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.filterWithKey (\k -> \v -> Equality.gt k 1) (M.fromList [
-                  (1, "a")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.filterWithKey (\k -> \v -> Equality.gt k 1) M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "findWithDefault",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find existing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Maps.findWithDefault "default" 2 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\s -> s) "b")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "use default",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Maps.findWithDefault "default" 3 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\s -> s) "default")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "fromList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "create from pairs",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.fromList [
-                  (1, "a"),
-                  (2, "b")])),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "duplicate keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.fromList [
-                  (1, "a"),
-                  (1, "b")])),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "b")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.fromList [])),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "insert",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "insert new key",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.insert 3 "c" (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "update existing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.insert 2 "updated" (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "updated")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "insert into empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.insert 1 "x" M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "x")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "keys",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "get all keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maps.keys (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2,
-                  3])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unsorted keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maps.keys (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2,
-                  3])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maps.keys M.empty)),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lookup",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find existing key",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) (Maps.lookup 2 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) (Just "b"))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "key not found",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) (Maps.lookup 3 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lookup in empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) (Maps.lookup 1 M.empty)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "map",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map over values",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.map (\s -> Strings.toUpper s) (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "A"),
-                  (2, "B")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.map (\s -> Strings.toUpper s) M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "mapKeys",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "double keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.mapKeys (\k -> Math.mul k 2) (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (2, "a"),
-                  (4, "b")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.mapKeys (\k -> Math.mul k 2) M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "member",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "key exists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maps.member 2 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "key missing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maps.member 3 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maps.member 1 M.empty)),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "null",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maps.null M.empty)),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maps.null (M.fromList [
-                  (1, "a")]))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "remove",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "remove existing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.delete 2 (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (3, "c")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "remove non-existing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.delete 4 (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "remove from empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.delete 1 M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) M.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "singleton",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single entry",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.singleton 42 "hello")),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (42, "hello")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "size",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three entries",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maps.size (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 3)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single entry",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maps.size (M.fromList [
-                  (42, "test")]))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 1)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maps.size M.empty)),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 0)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "convert to pairs",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\p -> Core.pair (\n -> Literals.showInt32 n) (\s -> Literals.showString s) p) xs) (Maps.toList (M.fromList [
-                  (1, "a"),
-                  (2, "b")]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\p -> Core.pair (\n -> Literals.showInt32 n) (\s -> Literals.showString s) p) xs) [
-                  (1, "a"),
-                  (2, "b")])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unsorted keys",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\p -> Core.pair (\n -> Literals.showInt32 n) (\s -> Literals.showString s) p) xs) (Maps.toList (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\p -> Core.pair (\n -> Literals.showInt32 n) (\s -> Literals.showString s) p) xs) [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\p -> Core.pair (\n -> Literals.showInt32 n) (\s -> Literals.showString s) p) xs) (Maps.toList M.empty)),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\p -> Core.pair (\n -> Literals.showInt32 n) (\s -> Literals.showString s) p) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "union",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "union two maps",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.union (M.fromList [
-                  (1, "a"),
-                  (2, "b")]) (M.fromList [
-                  (2, "x"),
-                  (3, "c")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a"),
-                  (2, "b"),
-                  (3, "c")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "union with empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.union (M.fromList [
-                  (1, "a")]) M.empty)),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty with map",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (Maps.union M.empty (M.fromList [
-                  (1, "a")]))),
-                Testing.universalTestCaseExpected = ((\m -> Core.map (\n -> Literals.showInt32 n) (\s -> Literals.showString s) m) (M.fromList [
-                  (1, "a")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Math.hs b/src/test/haskell/Hydra/Test/Lib/Math.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Math.hs
+++ /dev/null
@@ -1,3434 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.math primitives
-
-module Hydra.Test.Lib.Math where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.math primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.math primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "abs",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.abs")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.abs")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.abs")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "add",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-8)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "even",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "even positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "odd positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "even negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-4))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "odd negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "max",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first is larger",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second is larger",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal values",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.max")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeDiv",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic division",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exact division",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "division by zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero divided",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative dividend",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-10))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-4)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative divisor",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-4)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "min",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first is smaller",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second is smaller",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "equal values",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.min")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeMod",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic modulo",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exact division",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "division by zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative dividend",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-10))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative divisor",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "mul",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 15))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 15))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-15)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with one",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "negate",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "odd",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "odd positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.odd")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "even positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.odd")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "odd negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.odd")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "even negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.odd")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-4))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.odd")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybePred",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybePred")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybePred")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybePred")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-6)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "minBound",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybePred")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2147483648))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "range",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ascending range",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.range")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.range")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.range")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative start",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.range")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1)))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeRem",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic remainder",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeRem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exact division",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeRem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "division by zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeRem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative dividend",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeRem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-10))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative divisor",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeRem")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "signum",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.signum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.signum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.signum")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sub",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-10))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-7)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-3))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 13))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeSucc",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeSucc")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeSucc")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeSucc")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-4)))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "maxBound",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeSucc")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2147483647)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "addFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 8.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-5.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-8.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 7.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fractional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "mulFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 15.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-5.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 15.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed sign",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-30.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with one",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fractional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "negateFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-5.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-5.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fractional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.5)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "subFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "positive numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative result",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 5.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative numbers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-5.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "same value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 42.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fractional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "e",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "Euler's number",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.e"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.71828182846))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "pi",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "pi constant",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.math.pi"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159265359))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sin",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin pi/2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5707963267948966)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin pi",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592653589793)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.22464679915e-16))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.841470984808))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.479425538604))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sin -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "cos",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos pi/2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.5707963267948966)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 6.12323399574e-17))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos pi",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592653589793)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.540302305868))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.87758256189))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cos -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "tan",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan pi/4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.7853981633974483)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.55740772465))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.546302489844))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tan -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "asin",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.57079632679))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin -1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.57079632679)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.523598775598))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin below domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin above domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asin -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "acos",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.57079632679))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos -1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159265359))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0471975512))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos below domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos above domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acos -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "atan",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.785398163397))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.463647609001))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.57079632679))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.57079632679)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "atan2",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 1 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.785398163397))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 1 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.57079632679))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 0 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 3 4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.643501108793))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 NaN 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 +Inf 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.57079632679))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 -Inf 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.57079632679)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 1 NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 1 +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 1 -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14159265359))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 +Inf +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 +Inf -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 -Inf +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atan2 -Inf -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sinh",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sinh 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sinh 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.17520119364))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sinh 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.62686040785))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sinh NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sinh +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sinh -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "cosh",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cosh 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cosh 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.54308063482))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cosh 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.76219569108))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cosh NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cosh +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cosh -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "tanh",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tanh 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tanh 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.761594155956))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tanh 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.46211715726))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tanh NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tanh +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tanh -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "asinh",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asinh 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asinh 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.88137358702))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asinh 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.48121182506))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asinh NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asinh +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "asinh -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "acosh",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.31695789692))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh 3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.76274717404))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh below domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "acosh -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "atanh",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.549306144334))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh 0.1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.1)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.100335347731))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh upper boundary",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh lower boundary",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh above domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh below domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "atanh -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "exp",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.71828182846))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp -1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.367879441171))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 7.38905609893))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp 0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.6487212707))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exp -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "log",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log e",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.718281828459045)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.69314718056))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.30258509299))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "logBase",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log10 1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log10 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log10 100",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 100.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log2 8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 8.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "log2 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.32192809489))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase 10 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase 10 negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase negative 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase 10 NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase 10 +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase 10 -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase NaN 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase +Inf 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "logBase -Inf 10",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "pow",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "2^3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 8.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "10^0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "2^-1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "2^0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.41421356237))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "0^0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "0^-1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "(-1)^0.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "NaN^2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "+Inf^2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "-Inf^2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "+Inf^-1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "2^NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "2^+Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "2^-Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "sqrt",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt 4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt 9",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 9.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt 2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 2.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.4142135623730951))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt 0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt 3",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12)))})),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.73205080757))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sqrt -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "ceiling",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling 3.2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling 3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling -3.2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.2))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling -3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "ceiling -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "floor",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor 3.8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.8)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor 3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor -3.2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.2))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-4.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor -3.0",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "floor -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "round",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 3.4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.4)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 3.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 3.6",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.6)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 4.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round -3.4",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.4))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round -3.5",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-4.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "roundBigfloat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundBigfloat")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round pi to 4 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundBigfloat")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.141592653589793)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 3.142))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 1234.5 to 3 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundBigfloat")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 1234.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 1230.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 0.001234 to 2 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundBigfloat")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 1.234e-3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat 1.2e-3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundBigfloat")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-1234.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat (-1230.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "roundFloat32",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round pi to 4 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.1415927)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 3.142))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 1234.5 to 3 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1234.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 1230.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-1234.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-1230.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "+Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "-Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "roundFloat64",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round pi to 4 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592653589793)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.142))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round pi to 10 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592653589793)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.141592654))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 1234.5 to 3 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1234.5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1230.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 0.001234 to 2 digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.234e-3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 1.2e-3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1234.5))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-1230.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "round 1 digit",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 9.876)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 10.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "+Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "-Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "truncate",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate 3.8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.8)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate 3.2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate -3.8",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.8))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate -3.2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.2))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-3.0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate NaN",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (0/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate +Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (1/0)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "truncate -Inf",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0)))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-(1/0))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Maybes.hs b/src/test/haskell/Hydra/Test/Lib/Maybes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Maybes.hs
+++ /dev/null
@@ -1,325 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.maybes primitives
-
-module Hydra.Test.Lib.Maybes where
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Show.Core as Core
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.maybes primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.maybes primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "apply",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "both just",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.apply (Just (\x -> Math.add 3 x)) (Just 5))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Just 8))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.apply Nothing (Just 5))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.apply (Just (\x -> Math.add 3 x)) Nothing)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "bind",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just to just",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.bind (Just 5) (\x -> Just (Math.mul x 2)))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Just 10))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing to nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.bind Nothing (\x -> Just (Math.mul x 2)))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "cases",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just applies function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maybes.cases (Just 5) 0 (\x -> Math.mul x 2))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 10)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing returns default",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maybes.cases Nothing 99 (\x -> Math.mul x 2))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 99)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "cat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filters nothings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.cat [
-                  Just 1,
-                  Nothing,
-                  (Just 2)])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all justs",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.cat [
-                  Just 1,
-                  (Just 2)])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all nothings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.cat [
-                  Nothing,
-                  Nothing])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.cat [])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "compose",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "both succeed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.compose (\x -> Logic.ifElse (Equality.lte x 5) (Just (Math.add x 1)) Nothing) (\y -> Logic.ifElse (Equality.gte y 5) (Just (Math.mul y 2)) Nothing) 5)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Just 12))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first fails",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.compose (\x -> Logic.ifElse (Equality.lte x 5) (Just (Math.add x 1)) Nothing) (\y -> Logic.ifElse (Equality.gte y 5) (Just (Math.mul y 2)) Nothing) 10)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second fails",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.compose (\x -> Logic.ifElse (Equality.lte x 5) (Just (Math.add x 1)) Nothing) (\y -> Logic.ifElse (Equality.gte y 5) (Just (Math.mul y 2)) Nothing) 3)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "fromMaybe",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maybes.fromMaybe 0 (Just 42))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 42)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing with default",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maybes.fromMaybe 99 Nothing)),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 99)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isJust",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maybes.isJust (Just 42))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maybes.isJust Nothing)),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "isNothing",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maybes.isNothing (Just 42))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Maybes.isNothing Nothing)),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "map",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "maps just value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.map (\x -> Math.mul x 2) (Just 5))),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Just 10))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.map (\x -> Math.mul x 2) Nothing)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) Nothing)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "mapMaybe",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "filter and transform",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.mapMaybe (\x -> Logic.ifElse (Equality.gt x 2) (Just (Math.mul x 2)) Nothing) [
-                  1,
-                  2,
-                  3,
-                  4,
-                  5])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  6,
-                  8,
-                  10])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty result",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.mapMaybe (\x -> Logic.ifElse (Equality.gt x 2) (Just (Math.mul x 2)) Nothing) [
-                  1,
-                  2])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty input",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.mapMaybe (\x -> Logic.ifElse (Equality.gt x 2) (Just (Math.mul x 2)) Nothing) [])),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybe",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just value applies function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maybes.maybe 0 (\x -> Math.mul x 2) (Just 5))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 10)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing returns default",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Maybes.maybe 99 (\x -> Math.mul x 2) Nothing)),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 99)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "pure",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "wraps integer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Maybes.pure 42)),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\n -> Literals.showInt32 n) mx) (Just 42))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "wraps string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) (Maybes.pure "hello")),
-                Testing.universalTestCaseExpected = ((\mx -> Core.maybe (\s -> Literals.showString s) mx) (Just "hello"))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.toList (Just 42))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  42])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Maybes.toList Nothing)),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Pairs.hs b/src/test/haskell/Hydra/Test/Lib/Pairs.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Pairs.hs
+++ /dev/null
@@ -1,110 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.pairs primitives
-
-module Hydra.Test.Lib.Pairs where
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.pairs primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.pairs primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "bimap",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "transform both elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\p -> Strings.cat [
-                  "(",
-                  (Literals.showInt32 (Pairs.first p)),
-                  ", ",
-                  (Literals.showInt32 (Pairs.second p)),
-                  ")"]) (Pairs.bimap (\x -> Math.mul x 2) (\s -> Strings.length s) (5, "ab"))),
-                Testing.universalTestCaseExpected = ((\p -> Strings.cat [
-                  "(",
-                  (Literals.showInt32 (Pairs.first p)),
-                  ", ",
-                  (Literals.showInt32 (Pairs.second p)),
-                  ")"]) (10, 2))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\p -> Strings.cat [
-                  "(",
-                  (Literals.showInt32 (Pairs.first p)),
-                  ", ",
-                  (Literals.showInt32 (Pairs.second p)),
-                  ")"]) (Pairs.bimap (\x -> Math.mul x 2) (\s -> Strings.length s) (0, "hello"))),
-                Testing.universalTestCaseExpected = ((\p -> Strings.cat [
-                  "(",
-                  (Literals.showInt32 (Pairs.first p)),
-                  ", ",
-                  (Literals.showInt32 (Pairs.second p)),
-                  ")"]) (0, 5))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "first",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "extract first element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Pairs.first (42, "hello"))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 42)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Pairs.first (0, "world"))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 0)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative number",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Pairs.first ((-5), "test"))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) (-5))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "second",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "extract second element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Pairs.second (42, "hello"))),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Pairs.second (0, ""))),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "long string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Pairs.second (123, "testing"))),
-                Testing.universalTestCaseExpected = ((\s -> s) "testing")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Regex.hs b/src/test/haskell/Hydra/Test/Lib/Regex.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Regex.hs
+++ /dev/null
@@ -1,482 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.regex primitives
-
-module Hydra.Test.Lib.Regex where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.regex primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.regex primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "matches",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "exact match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "pattern match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[a-z]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partial content does not match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[a-z]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello123"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "digit pattern",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "12345"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed pattern",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[a-z]+[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello123"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty pattern matches empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty pattern does not match non-empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "star matches empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a*"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "alternation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cat|dog"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cat"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "alternation second",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cat|dog"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "dog"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "alternation no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "cat|dog"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bird"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "quantifier",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ab?c"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ac"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "quantifier with optional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.matches")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "ab?c"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "find",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple find",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.find")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc123def"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "123")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.find")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abcdef"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "find first",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.find")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[a-z]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "123abc456def"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "abc")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty input",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.find")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "full match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.find")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ".*"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "hello")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "findAll",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple matches",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.findAll")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a1b2c3"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "1"),
-                  (Core.TermLiteral (Core.LiteralString "2")),
-                  (Core.TermLiteral (Core.LiteralString "3"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no matches",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.findAll")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "overlapping words",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.findAll")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[a-z]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc def ghi"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "abc"),
-                  (Core.TermLiteral (Core.LiteralString "def")),
-                  (Core.TermLiteral (Core.LiteralString "ghi"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.findAll")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "say hello world"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "hello")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "replace",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic replace",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replace")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "X"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc123def456"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "abcXdef456")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replace")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "X"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abcdef"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "abcdef")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replace at start",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replace")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "^[a-z]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "X"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc123"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "X123")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty replacement",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replace")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc123def"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "abcdef")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "replaceAll",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replace all digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replaceAll")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "X"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a1b2c3"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "aXbXcX")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replaceAll")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "X"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "abc")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "replace all words",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replaceAll")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[a-z]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "X"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc 123 def"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "X 123 X")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty replacement",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.replaceAll")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a1b2c3"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "abc")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "split",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "split on comma",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.split")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a,b,c"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "split on spaces",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.split")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString " +"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a b  c"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no match",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.split")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "abc"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "abc")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "split on digits",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.split")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "[0-9]+"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a1b2c"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "trailing delimiter",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.regex.split")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a,b,"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString ""))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Sets.hs b/src/test/haskell/Hydra/Test/Lib/Sets.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Sets.hs
+++ /dev/null
@@ -1,493 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.sets primitives
-
-module Hydra.Test.Lib.Sets where
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Show.Core as Core
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Set as S
--- | Test cases for hydra.lib.sets primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.sets primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "empty",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) Sets.empty),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "singleton",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.singleton 42)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  42]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "fromList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "create from list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.fromList [
-                  1,
-                  2,
-                  3])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "duplicates removed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.fromList [
-                  1,
-                  2,
-                  1,
-                  3])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.fromList [])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "convert to list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Sets.toList (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2,
-                  3])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unsorted input",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Sets.toList (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [
-                  1,
-                  2,
-                  3])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) (Sets.toList S.empty)),
-                Testing.universalTestCaseExpected = ((\xs -> Core.list (\n -> Literals.showInt32 n) xs) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "insert",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "insert new element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.insert 4 (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3,
-                  4]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "insert existing element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.insert 2 (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "insert into empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.insert 1 S.empty)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "delete",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "delete existing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.delete 2 (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "delete non-existing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.delete 4 (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "delete from empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.delete 1 S.empty)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "member",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "element exists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Sets.member 2 (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "element missing",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Sets.member 4 (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Sets.member 1 S.empty)),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "size",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Sets.size (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 3)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Sets.size (S.fromList [
-                  42]))),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 1)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Sets.size S.empty)),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 0)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "null",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Sets.null S.empty)),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Sets.null (S.fromList [
-                  1,
-                  2]))),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "union",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "union two sets",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.union (S.fromList [
-                  1,
-                  2]) (S.fromList [
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "union with empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.union (S.fromList [
-                  1,
-                  2]) S.empty)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty with non-empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.union S.empty (S.fromList [
-                  1,
-                  2]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "unions",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "union of multiple sets",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.unions [
-                  S.fromList [
-                    1,
-                    2],
-                  (S.fromList [
-                    2,
-                    3]),
-                  (S.fromList [
-                    3,
-                    4])])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3,
-                  4]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "union with empty sets",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.unions [
-                  S.fromList [
-                    1,
-                    2],
-                  S.empty,
-                  (S.fromList [
-                    3])])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list of sets",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.unions [])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.unions [
-                  S.fromList [
-                    1,
-                    2,
-                    3]])),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "intersection",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "common elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.intersection (S.fromList [
-                  1,
-                  2,
-                  3]) (S.fromList [
-                  2,
-                  3,
-                  4]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no common elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.intersection (S.fromList [
-                  1,
-                  2]) (S.fromList [
-                  3,
-                  4]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "intersection with empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.intersection (S.fromList [
-                  1,
-                  2]) S.empty)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "difference",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "remove elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.difference (S.fromList [
-                  1,
-                  2,
-                  3]) (S.fromList [
-                  2,
-                  4]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no overlap",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.difference (S.fromList [
-                  1,
-                  2]) (S.fromList [
-                  3,
-                  4]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "difference with empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.difference (S.fromList [
-                  1,
-                  2]) S.empty)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  1,
-                  2]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "map",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.map (\x -> Math.mul x 2) (S.fromList [
-                  1,
-                  2,
-                  3]))),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (S.fromList [
-                  2,
-                  4,
-                  6]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "map on empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> Core.set (\n -> Literals.showInt32 n) s) (Sets.map (\x -> Math.mul x 2) S.empty)),
-                Testing.universalTestCaseExpected = ((\s -> Core.set (\n -> Literals.showInt32 n) s) S.empty)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Lib/Strings.hs b/src/test/haskell/Hydra/Test/Lib/Strings.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Lib/Strings.hs
+++ /dev/null
@@ -1,1038 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for hydra.lib.strings primitives
-
-module Hydra.Test.Lib.Strings where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for hydra.lib.strings primitives
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "hydra.lib.strings primitives",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "cat",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic concatenation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "one",
-                  "two",
-                  "three"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "onetwothree")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "hello"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [])),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with empty strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "",
-                  "one",
-                  "",
-                  ""])),
-                Testing.universalTestCaseExpected = ((\s -> s) "one")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all empty strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "",
-                  "",
-                  "",
-                  ""])),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "\241",
-                  "\19990",
-                  "\127757"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "\241\19990\127757")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "combining characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "e",
-                  "\769"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "e\769")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "control characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "\n",
-                  "\t",
-                  "\r"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "\n\t\r")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat [
-                  "hello",
-                  "\NUL",
-                  "world"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello\NULworld")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "cat2",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic concatenation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "hello" "world")),
-                Testing.universalTestCaseExpected = ((\s -> s) "helloworld")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty first string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "" "world")),
-                Testing.universalTestCaseExpected = ((\s -> s) "world")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty second string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "hello" "")),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "both empty strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "" "")),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "\241" "\19990")),
-                Testing.universalTestCaseExpected = ((\s -> s) "\241\19990")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "special characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "\n" "\t")),
-                Testing.universalTestCaseExpected = ((\s -> s) "\n\t")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.cat2 "hello\NUL" "world")),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello\NULworld")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "fromList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic ascii string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [
-                  104,
-                  101,
-                  108,
-                  108,
-                  111])),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty code point list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [])),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [
-                  97])),
-                Testing.universalTestCaseExpected = ((\s -> s) "a")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [
-                  241,
-                  19990,
-                  127757])),
-                Testing.universalTestCaseExpected = ((\s -> s) "\241\19990\127757")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "combining character sequence",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [
-                  101,
-                  769])),
-                Testing.universalTestCaseExpected = ((\s -> s) "e\769")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "special characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [
-                  10,
-                  9,
-                  13])),
-                Testing.universalTestCaseExpected = ((\s -> s) "\n\t\r")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.fromList [
-                  104,
-                  0,
-                  105])),
-                Testing.universalTestCaseExpected = ((\s -> s) "h\NULi")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "intercalate",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "comma separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "," [
-                  "one",
-                  "two",
-                  "three"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "one,two,three")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "" [
-                  "a",
-                  "b",
-                  "c"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "abc")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multi-character separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate " | " [
-                  "A",
-                  "B",
-                  "C"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "A | B | C")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "," [])),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single item list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "," [
-                  "only"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "only")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty strings in list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "," [
-                  "",
-                  "a",
-                  ""])),
-                Testing.universalTestCaseExpected = ((\s -> s) ",a,")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "\127757" [
-                  "link1",
-                  "link2"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "link1\127757link2")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "newline separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.intercalate "\n" [
-                  "line1",
-                  "line2"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "line1\nline2")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "length",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Strings.length "")),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 0)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Strings.length "a")),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 1)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic word",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Strings.length "hello")),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 5)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Strings.length "\241\19990\127757")),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 3)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "combining character sequence",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Strings.length "e\769")),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 2)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "special characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\n -> Literals.showInt32 n) (Strings.length "\n\t\r")),
-                Testing.universalTestCaseExpected = ((\n -> Literals.showInt32 n) 3)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lines",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single line",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "hello world")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "hello world"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two lines",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "hello\nworld")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "hello",
-                  "world"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "three lines",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "one\ntwo\nthree")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "one",
-                  "two",
-                  "three"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "\n")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "trailing newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "hello\n")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "hello"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "leading newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "\nhello")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  "hello"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple consecutive newlines",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "a\n\nb")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "a",
-                  "",
-                  "b"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode content",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "\241\n\19990")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "\241",
-                  "\19990"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "tabs not split",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.lines "a\tb\nc")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "a\tb",
-                  "c"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "maybeCharAt",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "first character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 104))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "middle character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 108))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "last character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 111))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single character string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 97))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\241"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 241))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multi-byte unicode",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "\19990"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 19990))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "second of combining pair",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "e\769"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 769))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "out of bounds",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative index",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-1))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.maybeCharAt")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "null",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null "")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null "a")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "space",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null " ")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode space",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null "\160")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "newline",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null "\n")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null "\NUL")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multi-character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\b -> Literals.showBoolean b) (Strings.null "hello")),
-                Testing.universalTestCaseExpected = ((\b -> Literals.showBoolean b) False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "splitOn",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "ss" "Mississippi")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "Mi",
-                  "i",
-                  "ippi"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single char separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn " " "one two three")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "one",
-                  "two",
-                  "three"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multi-char separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "  " "a  b  c")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "a",
-                  "b",
-                  "c"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "separator not found",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "x" "hello")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "hello"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "separator at start",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "h" "hello")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  "ello"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "separator at end",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "o" "hello")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "hell",
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "leading and trailing separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn " " " one two ")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  "one",
-                  "two",
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "whole string as separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "Mississippi" "Mississippi")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "consecutive separators",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn " " "a  b")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "a",
-                  "",
-                  "b"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple occurrences",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "l" "hello")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "he",
-                  "",
-                  "o"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "overlapping pattern",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "aa" "aaa")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  "a"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "" "abc")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  "a",
-                  "b",
-                  "c"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "separator on empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "x" "")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "both empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "" "")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single char both",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "a" "a")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "",
-                  ""])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "\19990" "hello\19990world")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "hello",
-                  "world"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode content",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "," "\241,\19990,\127757")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "\241",
-                  "\19990",
-                  "\127757"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "newline separator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) (Strings.splitOn "\n" "line1\nline2\nline3")),
-                Testing.universalTestCaseExpected = ((\xs -> Literals.showString (Strings.intercalate ", " xs)) [
-                  "line1",
-                  "line2",
-                  "line3"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toList",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "a")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [
-                  97])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "basic word",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "hello")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [
-                  104,
-                  101,
-                  108,
-                  108,
-                  111])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "\241\19990\127757")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [
-                  241,
-                  19990,
-                  127757])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "combining character sequence",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "e\769")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [
-                  101,
-                  769])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "control characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "\n\t\r")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [
-                  10,
-                  9,
-                  13])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "null character",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) (Strings.toList "h\NULi")),
-                Testing.universalTestCaseExpected = ((\xs -> Strings.intercalate ", " (Lists.map (\n -> Literals.showInt32 n) xs)) [
-                  104,
-                  0,
-                  105])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toLower",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed case",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "Hello World")),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello world")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "HELLO")),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "hello")),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "")),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with numbers and punctuation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "Abc123, XYZ!")),
-                Testing.universalTestCaseExpected = ((\s -> s) "abc123, xyz!")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "control characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "\n\t\r")),
-                Testing.universalTestCaseExpected = ((\s -> s) "\n\t\r")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode accented chars",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toLower "\209\193\201\205\211\218")),
-                Testing.universalTestCaseExpected = ((\s -> s) "\241\225\233\237\243\250")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "toUpper",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed case",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "hello World")),
-                Testing.universalTestCaseExpected = ((\s -> s) "HELLO WORLD")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "hello")),
-                Testing.universalTestCaseExpected = ((\s -> s) "HELLO")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "HELLO")),
-                Testing.universalTestCaseExpected = ((\s -> s) "HELLO")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "")),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with numbers and punctuation",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "abc123, xyz!")),
-                Testing.universalTestCaseExpected = ((\s -> s) "ABC123, XYZ!")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "control characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "\n\t\r")),
-                Testing.universalTestCaseExpected = ((\s -> s) "\n\t\r")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode accented chars",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.toUpper "\241\225\233\237\243\250")),
-                Testing.universalTestCaseExpected = ((\s -> s) "\209\193\201\205\211\218")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "unlines",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple lines",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.unlines [
-                  "one",
-                  "two",
-                  "three"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "one\ntwo\nthree\n")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single line",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.unlines [
-                  "hello"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello\n")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.unlines [])),
-                Testing.universalTestCaseExpected = ((\s -> s) "")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "with empty lines",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.unlines [
-                  "hello",
-                  "",
-                  "world"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "hello\n\nworld\n")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "all empty lines",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.unlines [
-                  "",
-                  "",
-                  ""])),
-                Testing.universalTestCaseExpected = ((\s -> s) "\n\n\n")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unicode content",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = ((\s -> s) (Strings.unlines [
-                  "\241o\241o",
-                  "\19990\30028"])),
-                Testing.universalTestCaseExpected = ((\s -> s) "\241o\241o\n\19990\30028\n")})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Reduction.hs b/src/test/haskell/Hydra/Test/Reduction.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Reduction.hs
+++ /dev/null
@@ -1,994 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for term reduction/evaluation mechanics
-
-module Hydra.Test.Reduction where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Reduction as Reduction
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for term reduction mechanics
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "reduction",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "beta reduction",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "identity function applied to literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "constant function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "monomorphic primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "toUpper on lowercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "HELLO")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "toUpper on mixed case",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "Hello World"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "HELLO WORLD")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "toUpper on empty string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toUpper")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "toLower on uppercase",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "HELLO"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string length",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string length of empty",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.length")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ""))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "add two positive integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 8))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "add negative and positive",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-10))))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-7)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "add with zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "subtract integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiply integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiply by zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "divide integers",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeDiv")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "modulo",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.maybeMod")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 17)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "splitOn basic",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "a,b,c"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cat2 strings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.cat2")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "hello"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "world"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "helloworld")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "polymorphic primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "length of integer list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "length of string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "a"),
-                    (Core.TermLiteral (Core.LiteralString "b"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "length of empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "length of single element list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralBoolean True)])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "maybeHead of integer list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "maybeHead of string list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeHead")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "first"),
-                    (Core.TermLiteral (Core.LiteralString "second"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "first")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "maybeLast of integer list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.maybeLast")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "concat two integer lists",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                      (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 4)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "concat with empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
-                    Core.applicationArgument = (Core.TermList [])})),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "reverse integer list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "reverse empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
-                  Core.applicationArgument = (Core.TermList [])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "nullary primitives",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set has size zero",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.sets.size")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "hydra.lib.sets.empty"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "literals as values",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "integer literal is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative integer literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-17)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-17)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero integer literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string literal is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralString "hello")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty string literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralString "")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string with special characters",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralString "hello\nworld\ttab")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "hello\nworld\ttab")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "boolean true is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralBoolean True)))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean True)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "boolean false is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralBoolean False)))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralBoolean False)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "float literal is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 3.14))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "negative float literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.718)))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 (-2.718)))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "zero float literal",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 0.0))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "list reduction",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermList []))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list of literals is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list with reducible element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermList [
-                  Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "optional reduction",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nothing is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermMaybe Nothing))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe Nothing))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just literal is a value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "just with reducible content",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<eval error>>") (\t -> ShowCore.term t) (Reduction.reduceTerm TestGraph.testContext TestGraph.testGraph True (Core.TermMaybe (Just (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "alpha conversion",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable at top level",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "y")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable in list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                  (Core.TermVariable (Core.Name "x"))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                  (Core.TermVariable (Core.Name "y"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda with different variable is transparent",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                    (Core.TermVariable (Core.Name "x")),
-                    (Core.TermVariable (Core.Name "z"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "z"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                    (Core.TermVariable (Core.Name "y")),
-                    (Core.TermVariable (Core.Name "z"))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda with same variable is opaque",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                    (Core.TermVariable (Core.Name "x")),
-                    (Core.TermVariable (Core.Name "z"))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                    (Core.TermVariable (Core.Name "x")),
-                    (Core.TermVariable (Core.Name "z"))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested lambda outer variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "a"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "b"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "a"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "b"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested lambda shadows outer",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "z") (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "application with variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "application with both variables same",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Reduction.alphaConvert (Core.Name "x") (Core.Name "y") (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "y")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "y"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "type reduction",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unit type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph Core.TypeUnit)),
-                Testing.universalTestCaseExpected = (ShowCore.type_ Core.TypeUnit)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeLiteral Core.LiteralTypeString))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "int32 type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "identity type applied to string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "t"),
-                    Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t")),
-                      Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t"))}))})),
-                  Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "constant type ignores argument",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "x"),
-                    Core.forallTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeBoolean)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested forall first application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "x"),
-                    Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                      Core.forallTypeParameter = (Core.Name "y"),
-                      Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "x")),
-                        Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "y"))}))}))})),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "y"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "y"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested forall both applications",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-                    Core.applicationTypeFunction = (Core.TypeForall (Core.ForallType {
-                      Core.forallTypeParameter = (Core.Name "x"),
-                      Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-                        Core.forallTypeParameter = (Core.Name "y"),
-                        Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "x")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "y"))}))}))})),
-                    Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list type applied",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "a"),
-                    Core.forallTypeBody = (Core.TypeList (Core.TypeVariable (Core.Name "a")))})),
-                  Core.applicationTypeArgument = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "optional type applied",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\e -> "<<type reduction error>>") (\t -> ShowCore.type_ t) (Reduction.betaReduceType TestGraph.testContext TestGraph.testGraph (Core.TypeApplication (Core.ApplicationType {
-                  Core.applicationTypeFunction = (Core.TypeForall (Core.ForallType {
-                    Core.forallTypeParameter = (Core.Name "a"),
-                    Core.forallTypeBody = (Core.TypeMaybe (Core.TypeVariable (Core.Name "a")))})),
-                  Core.applicationTypeArgument = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "etaExpandTerm",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "integer literal unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string list unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo"),
-                  (Core.TermLiteral (Core.LiteralString "bar"))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo"),
-                  (Core.TermLiteral (Core.LiteralString "bar"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fully applied binary function unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda with fully applied primitive unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString ","))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda returning constant unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bare unary primitive unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bare binary primitive unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partially applied binary primitive expands to one lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "v1"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "foo"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "projection expands to lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermProject (Core.Projection {
-                  Core.projectionTypeName = (Core.Name "Person"),
-                  Core.projectionField = (Core.Name "firstName")})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "v1"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermProject (Core.Projection {
-                      Core.projectionTypeName = (Core.Name "Person"),
-                      Core.projectionField = (Core.Name "firstName")})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partial application inside lambda expands",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "v1"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                        Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let with constant body unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 137))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let with bare primitive value unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "foo"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fully applied unary unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "FOO"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.toLower")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "FOO"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "partial application in list expands",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "eta expansion failed") (\t -> ShowCore.term t) (Reduction.etaExpandTypedTerm TestGraph.testContext TestGraph.testGraph (Core.TermList [
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "foo")])}),
-                  (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))}))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "foo")])}),
-                  (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "v1"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.strings.splitOn")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "v1"))}))}))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Rewriting.hs b/src/test/haskell/Hydra/Test/Rewriting.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Rewriting.hs
+++ /dev/null
@@ -1,1068 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for core rewrite/fold combinators
-
-module Hydra.Test.Rewriting where
-import qualified Hydra.Coders as Coders
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Equality as Equality
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Logic as Logic
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Rewriting as Rewriting
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-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
--- | Test cases for core rewrite/fold combinators
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "rewriting",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "foldOverTerm",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect labels from single node - pre-order",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\lit -> Core.TermLiteral lit) (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermPair v0 -> case (Pairs.first v0) of
-                      Core.TermLiteral v1 -> [
-                        v1]
-                      _ -> []
-                    _ -> []]) [] (Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermList []))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect labels from tree - pre-order",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\lit -> Core.TermLiteral lit) (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermPair v0 -> case (Pairs.first v0) of
-                      Core.TermLiteral v1 -> [
-                        v1]
-                      _ -> []
-                    _ -> []]) [] (Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermList [
-                  Core.TermPair (Core.TermLiteral (Core.LiteralString "b"), (Core.TermList [])),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralString "c"), (Core.TermList [
-                    Core.TermPair (Core.TermLiteral (Core.LiteralString "d"), (Core.TermList []))])))]))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a"),
-                  (Core.TermLiteral (Core.LiteralString "b")),
-                  (Core.TermLiteral (Core.LiteralString "c")),
-                  (Core.TermLiteral (Core.LiteralString "d"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect labels from single node - post-order",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\lit -> Core.TermLiteral lit) (Rewriting.foldOverTerm Coders.TraversalOrderPost (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermPair v0 -> case (Pairs.first v0) of
-                      Core.TermLiteral v1 -> [
-                        v1]
-                      _ -> []
-                    _ -> []]) [] (Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermList []))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "a")]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect labels from tree - post-order",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\lit -> Core.TermLiteral lit) (Rewriting.foldOverTerm Coders.TraversalOrderPost (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermPair v0 -> case (Pairs.first v0) of
-                      Core.TermLiteral v1 -> [
-                        v1]
-                      _ -> []
-                    _ -> []]) [] (Core.TermPair (Core.TermLiteral (Core.LiteralString "a"), (Core.TermList [
-                  Core.TermPair (Core.TermLiteral (Core.LiteralString "b"), (Core.TermList [])),
-                  (Core.TermPair (Core.TermLiteral (Core.LiteralString "c"), (Core.TermList [
-                    Core.TermPair (Core.TermLiteral (Core.LiteralString "d"), (Core.TermList []))])))]))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "b"),
-                  (Core.TermLiteral (Core.LiteralString "d")),
-                  (Core.TermLiteral (Core.LiteralString "c")),
-                  (Core.TermLiteral (Core.LiteralString "a"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "sum int32 literals",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)),
-                  (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))])))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 52))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect list lengths - pre-order",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 n))) (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermList v0 -> [
-                      Lists.length v0]
-                    _ -> []]) [] (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "foo"),
-                    (Core.TermLiteral (Core.LiteralString "bar"))],
-                  (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "quux")])}))]))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect list lengths - post-order",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 n))) (Rewriting.foldOverTerm Coders.TraversalOrderPost (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermList v0 -> [
-                      Lists.length v0]
-                    _ -> []]) [] (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralString "foo"),
-                    (Core.TermLiteral (Core.LiteralString "bar"))],
-                  (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.applicationArgument = (Core.TermList [
-                      Core.TermLiteral (Core.LiteralString "quux")])}))]))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "rewriteType",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String type in left side of either is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String type in right side of either is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String types in both sides of either are replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String type in nested either (left of left) is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String type in nested either (right of right) is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)),
-                  Core.eitherTypeRight = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)),
-                  Core.eitherTypeRight = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String types in complex nested either are all replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.eitherTypeRight = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})),
-                  Core.eitherTypeRight = (Core.TypeEither (Core.EitherType {
-                    Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String in list type is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String in function domain is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String in function codomain is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt64)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "String in optional type is replaced",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Rewriting.rewriteType (\recurse -> \typ -> Logic.ifElse (Equality.equal typ (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (recurse typ)) (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "rewriteTerm",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string literal foo replaced with bar",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLiteral (Core.LiteralString "foo")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralString "bar")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in variable not changed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "x")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo"),
-                  (Core.TermLiteral (Core.LiteralString "baz"))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "bar"),
-                  (Core.TermLiteral (Core.LiteralString "baz"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple strings in list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "foo"),
-                  (Core.TermLiteral (Core.LiteralString "foo")),
-                  (Core.TermLiteral (Core.LiteralString "baz"))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralString "bar"),
-                  (Core.TermLiteral (Core.LiteralString "bar")),
-                  (Core.TermLiteral (Core.LiteralString "baz"))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in optional (just)",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "foo")))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralString "bar")))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in function application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "print")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "print")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in lambda body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in nested applications",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "g")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "bar"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in record field",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Person"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Person"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "name"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "strings in multiple record fields",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Data"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "a"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "b"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "c"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Data"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "a"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "b"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "c"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in pair",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermPair (Core.TermLiteral (Core.LiteralString "foo"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermPair (Core.TermLiteral (Core.LiteralString "bar"), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in let binding value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "bar")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in let body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in first case branch",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "success"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "error"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "success"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "error"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in second case branch",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "success"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "error"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "success"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "error"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in default branch",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "foo"))),
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "success"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "error"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = (Just (Core.TermLiteral (Core.LiteralString "bar"))),
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "success"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "error"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string deeply nested in record in list in application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "process")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "Item"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "value"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}]})])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "process")),
-                  Core.applicationArgument = (Core.TermList [
-                    Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "Item"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "value"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}]})])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in union inject value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "Result"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "success"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermInject (Core.Injection {
-                  Core.injectionTypeName = (Core.Name "Result"),
-                  Core.injectionField = Core.Field {
-                    Core.fieldName = (Core.Name "success"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in wrapped term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermWrap (Core.WrappedTerm {
-                  Core.wrappedTermTypeName = (Core.Name "Email"),
-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermWrap (Core.WrappedTerm {
-                  Core.wrappedTermTypeName = (Core.Name "Email"),
-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in annotated term body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralString "foo")),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralString "bar")),
-                  Core.annotatedTermAnnotation = M.empty})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in first of multiple let bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "baz")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "bar")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "baz")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in second of multiple let bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "baz")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "y"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "baz")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "bar")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "y"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in all let bindings and body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "bar")),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "bar")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermSet (S.fromList [
-                  Core.TermLiteral (Core.LiteralString "baz"),
-                  (Core.TermLiteral (Core.LiteralString "foo"))])))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermSet (S.fromList [
-                  Core.TermLiteral (Core.LiteralString "bar"),
-                  (Core.TermLiteral (Core.LiteralString "baz"))])))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in type lambda body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "a"),
-                  Core.typeLambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "a"),
-                  Core.typeLambdaBody = (Core.TermLiteral (Core.LiteralString "bar"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in type application body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                  Core.typeApplicationTermBody = (Core.TermLiteral (Core.LiteralString "foo")),
-                  Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                  Core.typeApplicationTermBody = (Core.TermLiteral (Core.LiteralString "bar")),
-                  Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in nested type lambdas",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "a"),
-                  Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.Name "b"),
-                    Core.typeLambdaBody = (Core.TermLiteral (Core.LiteralString "foo"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "a"),
-                  Core.typeLambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.Name "b"),
-                    Core.typeLambdaBody = (Core.TermLiteral (Core.LiteralString "bar"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in case branch within let binding",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "handler"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Result"),
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "ok"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "err"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "handler"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "handler"),
-                      Core.bindingTerm = (Core.TermCases (Core.CaseStatement {
-                        Core.caseStatementTypeName = (Core.Name "Result"),
-                        Core.caseStatementDefault = Nothing,
-                        Core.caseStatementCases = [
-                          Core.Field {
-                            Core.fieldName = (Core.Name "ok"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))},
-                          Core.Field {
-                            Core.fieldName = (Core.Name "err"),
-                            Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "baz"))}]})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "handler"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string in annotated wrapped record field",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Rewriting.rewriteTerm (\recurse -> \term -> Logic.ifElse (Equality.equal term (Core.TermLiteral (Core.LiteralString "foo"))) (Core.TermLiteral (Core.LiteralString "bar")) (recurse term)) (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.Name "User"),
-                    Core.wrappedTermBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "UserData"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "name"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "foo"))}]}))})),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.Name "User"),
-                    Core.wrappedTermBody = (Core.TermRecord (Core.Record {
-                      Core.recordTypeName = (Core.Name "UserData"),
-                      Core.recordFields = [
-                        Core.Field {
-                          Core.fieldName = (Core.Name "name"),
-                          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "bar"))}]}))})),
-                  Core.annotatedTermAnnotation = M.empty})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "rewriteAndFoldTermWithPath",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through application - sum literals",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through nested applications",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermVariable (Core.Name "y"))])}))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through let bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 32)))])}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through record fields",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Point"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))}]}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 30))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through case branches",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermCases (Core.CaseStatement {
-                  Core.caseStatementTypeName = (Core.Name "Result"),
-                  Core.caseStatementDefault = Nothing,
-                  Core.caseStatementCases = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "ok"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "err"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through pair",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 7)))))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 12))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through optional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermMaybe (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through wrapped term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermWrap (Core.WrappedTerm {
-                  Core.wrappedTermTypeName = (Core.Name "Age"),
-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25)))}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 25))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through type lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermTypeLambda (Core.TypeLambda {
-                  Core.typeLambdaParameter = (Core.Name "a"),
-                  Core.typeLambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100)))}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 100))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through type application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                  Core.typeApplicationTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 50))),
-                  Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 50))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "path tracking through set elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermSet (S.fromList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 6))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "deep nesting - application in lambda in let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Math.add acc (case term of
-                  Core.TermLiteral v0 -> case v0 of
-                    Core.LiteralInteger v1 -> case v1 of
-                      Core.IntegerValueInt32 v2 -> v2
-                      _ -> 0
-                    _ -> 0
-                  _ -> 0)) 0 (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "f"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermApplication (Core.Application {
-                          Core.applicationFunction = (Core.TermVariable (Core.Name "x")),
-                          Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))}))})),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))}))))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 15))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect list lengths in nested structure",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 n))) (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermList v0 -> [
-                      Lists.length v0]
-                    _ -> []]) [] (Core.TermList [
-                  Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))],
-                  (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))])]))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "collect list lengths in let body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Core.TermList (Lists.map (\n -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 n))) (Rewriting.foldOverTerm Coders.TraversalOrderPre (\acc -> \term -> Lists.concat [
-                  acc,
-                  case term of
-                    Core.TermList v0 -> [
-                      Lists.length v0]
-                    _ -> []]) [] (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "xs"),
-                      Core.bindingTerm = (Core.TermList [
-                        Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))]),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermList [
-                    Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                    (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))])})))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Serialization.hs b/src/test/haskell/Hydra/Test/Serialization.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Serialization.hs
+++ /dev/null
@@ -1,180 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for AST serialization
-
-module Hydra.Test.Serialization where
-import qualified Hydra.Ast as Ast
-import qualified Hydra.Lib.Math as Math
-import qualified Hydra.Serialization as Serialization
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for AST serialization
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "serialization",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "associativity",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "right-associative operator",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx arrowOp (Serialization.ifx arrowOp (Serialization.cst "a") (Serialization.cst "b")) (Serialization.ifx arrowOp (Serialization.cst "c") (Serialization.cst "d"))))),
-                Testing.universalTestCaseExpected = "(a -> b) -> c -> d"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "case statements",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple case statement",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx (Ast.Op {
-                  Ast.opSymbol = (Ast.Symbol "of"),
-                  Ast.opPadding = Ast.Padding {
-                    Ast.paddingLeft = Ast.WsSpace,
-                    Ast.paddingRight = (Ast.WsBreakAndIndent "  ")},
-                  Ast.opPrecedence = (Ast.Precedence 0),
-                  Ast.opAssociativity = Ast.AssociativityNone}) (Serialization.spaceSep [
-                  Serialization.cst "case",
-                  (Serialization.ifx gtOp (Serialization.cst "x") (Serialization.num 42))]) (Serialization.newlineSep [
-                  Serialization.ifx caseOp (Serialization.cst "False") (Serialization.cst "Big"),
-                  (Serialization.ifx caseOp (Serialization.cst "True") (Serialization.cst "Small"))])))),
-                Testing.universalTestCaseExpected = "case x > 42 of\n  False -> Big\n  True -> Small"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested case statement",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx (Ast.Op {
-                  Ast.opSymbol = (Ast.Symbol "of"),
-                  Ast.opPadding = Ast.Padding {
-                    Ast.paddingLeft = Ast.WsSpace,
-                    Ast.paddingRight = (Ast.WsBreakAndIndent "  ")},
-                  Ast.opPrecedence = (Ast.Precedence 0),
-                  Ast.opAssociativity = Ast.AssociativityNone}) (Serialization.spaceSep [
-                  Serialization.cst "case",
-                  (Serialization.ifx gtOp (Serialization.cst "x") (Serialization.num 42))]) (Serialization.newlineSep [
-                  Serialization.ifx caseOp (Serialization.cst "True") (Serialization.ifx (Ast.Op {
-                    Ast.opSymbol = (Ast.Symbol "of"),
-                    Ast.opPadding = Ast.Padding {
-                      Ast.paddingLeft = Ast.WsSpace,
-                      Ast.paddingRight = (Ast.WsBreakAndIndent "  ")},
-                    Ast.opPrecedence = (Ast.Precedence 0),
-                    Ast.opAssociativity = Ast.AssociativityNone}) (Serialization.spaceSep [
-                    Serialization.cst "case",
-                    (Serialization.ifx gtOp (Serialization.cst "x") (Serialization.num 100))]) (Serialization.newlineSep [
-                    Serialization.ifx caseOp (Serialization.cst "True") (Serialization.cst "ReallyBig"),
-                    (Serialization.ifx caseOp (Serialization.cst "False") (Serialization.cst "Big"))])),
-                  (Serialization.ifx caseOp (Serialization.cst "False") (Serialization.cst "Small"))])))),
-                Testing.universalTestCaseExpected = "case x > 42 of\n  True -> case x > 100 of\n    True -> ReallyBig\n    False -> Big\n  False -> Small"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lambdas",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx lambdaOp (Serialization.cst "\\x y") (Serialization.ifx plusOp (Serialization.cst "x") (Serialization.cst "y"))))),
-                Testing.universalTestCaseExpected = "\\x y -> x + y"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "lists",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.bracketList Serialization.inlineStyle []))),
-                Testing.universalTestCaseExpected = "[]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple non-empty list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.bracketList Serialization.inlineStyle [
-                  Serialization.num 1,
-                  (Serialization.num 2),
-                  (Serialization.num 3)]))),
-                Testing.universalTestCaseExpected = "[1, 2, 3]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.bracketList Serialization.inlineStyle [
-                  Serialization.bracketList Serialization.inlineStyle [
-                    Serialization.num 1,
-                    (Serialization.num 3)],
-                  (Serialization.num 2)]))),
-                Testing.universalTestCaseExpected = "[[1, 3], 2]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list with parenthesized expression inside",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.bracketList Serialization.inlineStyle [
-                  Serialization.bracketList Serialization.inlineStyle [
-                    Serialization.num 1,
-                    (Serialization.ifx multOp (Serialization.ifx plusOp (Serialization.num 2) (Serialization.num 3)) (Serialization.ifx plusOp (Serialization.num 1) (Serialization.num 10)))],
-                  (Serialization.num 2)]))),
-                Testing.universalTestCaseExpected = "[[1, (2 + 3) * (1 + 10)], 2]"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "precedence",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "operators with different precedence - no parens needed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx plusOp (Serialization.ifx multOp (Serialization.num 2) (Serialization.num 3)) (Serialization.ifx multOp (Serialization.num 1) (Serialization.num 10))))),
-                Testing.universalTestCaseExpected = "2 * 3 + 1 * 10"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "operators with different precedence - parens needed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx multOp (Serialization.ifx plusOp (Serialization.num 2) (Serialization.num 3)) (Serialization.ifx plusOp (Serialization.num 1) (Serialization.num 10))))),
-                Testing.universalTestCaseExpected = "(2 + 3) * (1 + 10)"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "associative operator left nesting",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx multOp (Serialization.cst "x") (Serialization.ifx multOp (Serialization.cst "y") (Serialization.cst "z"))))),
-                Testing.universalTestCaseExpected = "x * y * z"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "associative operator right nesting",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Serialization.printExpr (Serialization.parenthesize (Serialization.ifx multOp (Serialization.ifx multOp (Serialization.cst "x") (Serialization.cst "y")) (Serialization.cst "z")))),
-                Testing.universalTestCaseExpected = "x * y * z"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
-arrowOp :: Ast.Op
-arrowOp = Serialization.op "->" (Math.negate 1) Ast.AssociativityRight
-caseOp :: Ast.Op
-caseOp = Serialization.op "->" 0 Ast.AssociativityNone
-gtOp :: Ast.Op
-gtOp = Serialization.op ">" 4 Ast.AssociativityNone
-lambdaOp :: Ast.Op
-lambdaOp = Serialization.op "->" (Math.negate 1) Ast.AssociativityRight
-multOp :: Ast.Op
-multOp = Serialization.op "*" 7 Ast.AssociativityBoth
-plusOp :: Ast.Op
-plusOp = Serialization.op "+" 6 Ast.AssociativityBoth
diff --git a/src/test/haskell/Hydra/Test/Sorting.hs b/src/test/haskell/Hydra/Test/Sorting.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Sorting.hs
+++ /dev/null
@@ -1,451 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for topological sorting algorithms
-
-module Hydra.Test.Sorting where
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as Core
-import qualified Hydra.Sorting as Sorting
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for topological sorting
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "sorting",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "topological sort",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right []))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "singleton set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (1, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right [
-                  1]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "discrete set with multiple elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (3, []),
-                  (1, []),
-                  (2, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right [
-                  1,
-                  2,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "linked list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (3, [
-                    1]),
-                  (2, [
-                    3]),
-                  (1, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right [
-                  1,
-                  3,
-                  2]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "binary tree",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (3, [
-                    1,
-                    4]),
-                  (4, [
-                    6,
-                    2]),
-                  (1, [
-                    5]),
-                  (2, []),
-                  (6, []),
-                  (5, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right [
-                  5,
-                  1,
-                  2,
-                  6,
-                  4,
-                  3]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two trees",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (3, [
-                    1,
-                    4]),
-                  (5, [
-                    6,
-                    2]),
-                  (2, [
-                    7]),
-                  (1, []),
-                  (4, []),
-                  (6, []),
-                  (7, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right [
-                  1,
-                  7,
-                  2,
-                  4,
-                  3,
-                  6,
-                  5]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "diamond DAG",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (1, [
-                    3,
-                    4]),
-                  (3, [
-                    2]),
-                  (4, [
-                    2]),
-                  (2, [
-                    5]),
-                  (5, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Right [
-                  5,
-                  2,
-                  3,
-                  4,
-                  1]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two-node cycle",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (1, [
-                    2]),
-                  (2, [
-                    1])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Left [
-                  [
-                    1,
-                    2]]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cycle with incoming and outgoing edges",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Sorting.topologicalSort [
-                  (1, [
-                    3]),
-                  (3, [
-                    2]),
-                  (2, [
-                    3,
-                    4]),
-                  (4, [
-                    5]),
-                  (5, [])])),
-                Testing.universalTestCaseExpected = (Eithers.either (\cs -> Strings.cat2 "left(" (Strings.cat2 (Core.list (Core.list Literals.showInt32) cs) ")")) (\xs -> Strings.cat2 "right(" (Strings.cat2 (Core.list Literals.showInt32 xs) ")")) (Left [
-                  [
-                    2,
-                    3]]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "topological sort SCC",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "singleton set",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "discrete set with multiple elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (3, []),
-                  (1, []),
-                  (2, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1],
-                  [
-                    2],
-                  [
-                    3]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single two-element component #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [
-                    2]),
-                  (2, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    2],
-                  [
-                    1]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single two-element component #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (2, [
-                    1]),
-                  (1, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1],
-                  [
-                    2]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple-element component",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (2, [
-                    1,
-                    3]),
-                  (1, [
-                    3]),
-                  (3, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    3],
-                  [
-                    1],
-                  [
-                    2]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cycle of two nodes #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [
-                    2]),
-                  (2, [
-                    1])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1,
-                    2]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cycle of two nodes #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (2, [
-                    1]),
-                  (1, [
-                    2])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1,
-                    2]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cycle of three nodes #1",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [
-                    2]),
-                  (2, [
-                    3]),
-                  (3, [
-                    1])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1,
-                    2,
-                    3]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "cycle of three nodes #2",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (2, [
-                    1]),
-                  (3, [
-                    2]),
-                  (1, [
-                    3])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1,
-                    2,
-                    3]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple disconnected cycles",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (200, []),
-                  (100, []),
-                  (300, []),
-                  (10, [
-                    20]),
-                  (20, [
-                    10]),
-                  (1, [
-                    2]),
-                  (2, [
-                    3]),
-                  (3, [
-                    1])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1,
-                    2,
-                    3],
-                  [
-                    10,
-                    20],
-                  [
-                    100],
-                  [
-                    200],
-                  [
-                    300]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "complex cycles",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [
-                    2,
-                    3]),
-                  (2, [
-                    3]),
-                  (3, [
-                    1])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    1,
-                    2,
-                    3]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "chain of three SCCs",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [
-                    2,
-                    10]),
-                  (2, [
-                    3]),
-                  (3, [
-                    1]),
-                  (10, [
-                    20]),
-                  (20, [
-                    100,
-                    10]),
-                  (100, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    100],
-                  [
-                    10,
-                    20],
-                  [
-                    1,
-                    2,
-                    3]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "SCCs with dependencies to/from non-SCC nodes",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Core.list (Core.list Literals.showInt32) (Sorting.topologicalSortComponents [
-                  (1, [
-                    2,
-                    3,
-                    10]),
-                  (2, [
-                    3]),
-                  (3, [
-                    1]),
-                  (10, [
-                    20,
-                    30]),
-                  (20, [
-                    30]),
-                  (30, []),
-                  (100, [
-                    200,
-                    2]),
-                  (200, []),
-                  (300, [
-                    100]),
-                  (1000, []),
-                  (2000, [])])),
-                Testing.universalTestCaseExpected = (Core.list (Core.list Literals.showInt32) [
-                  [
-                    30],
-                  [
-                    20],
-                  [
-                    10],
-                  [
-                    1,
-                    2,
-                    3],
-                  [
-                    200],
-                  [
-                    100],
-                  [
-                    300],
-                  [
-                    1000],
-                  [
-                    2000]])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Strip.hs b/src/test/haskell/Hydra/Test/Strip.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Strip.hs
+++ /dev/null
@@ -1,171 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for annotation and type stripping operations
-
-module Hydra.Test.Strip where
-import qualified Hydra.Core as Core
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Strip as Strip
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Test cases for annotation and type stripping operations
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "strip",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "deannotateTerm",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unannotated literal unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unannotated variable unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "x")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unannotated lambda unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single annotation stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested annotations stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))),
-                    Core.annotatedTermAnnotation = M.empty})),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotated lambda stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotated application stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Strip.deannotateTerm (Core.TermAnnotated (Core.AnnotatedTerm {
-                  Core.annotatedTermBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
-                  Core.annotatedTermAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "deannotateType",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unannotated primitive type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unannotated string type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeLiteral Core.LiteralTypeString))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unannotated function type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single annotation stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.annotatedTypeAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested annotations stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (Core.TypeAnnotated (Core.AnnotatedType {
-                    Core.annotatedTypeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.annotatedTypeAnnotation = M.empty})),
-                  Core.annotatedTypeAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotated list type stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.annotatedTypeAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "annotated function type stripped",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Strip.deannotateType (Core.TypeAnnotated (Core.AnnotatedType {
-                  Core.annotatedTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-                  Core.annotatedTypeAnnotation = M.empty})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Substitution.hs b/src/test/haskell/Hydra/Test/Substitution.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Substitution.hs
+++ /dev/null
@@ -1,272 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for type and term substitution operations
-
-module Hydra.Test.Substitution where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Substitution as Substitution
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Typing as Typing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for type and term substitution operations
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "substitution",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "substInType",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty substitution returns type unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [])) (Core.TypeLiteral Core.LiteralTypeString))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral Core.LiteralTypeString))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute type variable with int32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeVariable (Core.Name "a")))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "non-matching variable unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeVariable (Core.Name "b")))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeVariable (Core.Name "b")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in function domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in function codomain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in list element type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeList (Core.TypeVariable (Core.Name "a"))))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in optional type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeMaybe (Core.TypeVariable (Core.Name "a"))))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in pair type both sides",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in either type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "a")),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in map key type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "k", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "k")),
-                  Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "substitute in set type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeSet (Core.TypeVariable (Core.Name "a"))))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested substitution in list of pairs",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeList (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeList (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)}))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple substitutions",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "forAll bound variable not substituted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "a"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "a"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "forAll free variable substituted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Substitution.substInType (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "a"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "a"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "substInTypeScheme",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "quantified variable shadows substitution",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Core.typeSchemeBody (Substitution.substInTypeScheme (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "a"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                  Core.typeSchemeConstraints = Nothing})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "free variable in body is substituted",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Core.typeSchemeBody (Substitution.substInTypeScheme (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "a"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                  Core.typeSchemeConstraints = Nothing})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed: free substituted, quantified shadowed",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Core.typeSchemeBody (Substitution.substInTypeScheme (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "a"],
-                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                  Core.typeSchemeConstraints = Nothing})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple quantifiers shadow substitution",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Core.typeSchemeBody (Substitution.substInTypeScheme (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])) (Core.TypeScheme {
-                  Core.typeSchemeVariables = [
-                    Core.Name "a",
-                    (Core.Name "b")],
-                  Core.typeSchemeBody = (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))})),
-                  Core.typeSchemeConstraints = Nothing})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "empty quantifiers: normal substitution",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.type_ (Core.typeSchemeBody (Substitution.substInTypeScheme (Typing.TypeSubst (Maps.fromList [
-                  (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])) (Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable (Core.Name "a")),
-                  Core.typeSchemeConstraints = Nothing})))),
-                Testing.universalTestCaseExpected = (ShowCore.type_ (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/TestEnv.hs b/src/test/haskell/Hydra/Test/TestEnv.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/TestEnv.hs
+++ /dev/null
@@ -1,67 +0,0 @@
--- | Test environment providing the test graph and context with primitives.
--- This is a hand-written bridge module referenced by the generated TestGraph.
--- It should NOT be overwritten by code generation.
-
-module Hydra.Test.TestEnv (testGraph, testContext) where
-
-import Hydra.Kernel
-import Hydra.Sources.Libraries (standardLibraries)
-import Hydra.Json.Bootstrap (typesByName)
-import qualified Hydra.Sources.Kernel.Terms.Annotations as TermAnnotations
-import qualified Hydra.Sources.Kernel.Terms.Constants as TermConstants
-import qualified Hydra.Sources.Kernel.Terms.Dependencies as TermDependencies
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as TermExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical as TermLexical
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as TermRewriting
-import qualified Hydra.Sources.Kernel.Terms.Scoping as TermScoping
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as TermShowCore
-import qualified Hydra.Sources.Kernel.Terms.Strip as TermStrip
-import qualified Hydra.Sources.Kernel.Terms.Variables as TermVariables
-import qualified Hydra.Decode.Core as TermDecodeCore
-import qualified Hydra.Encode.Core as TermEncodeCore
-import qualified Data.List as L
-import qualified Data.Map as M
-
--- | Convert a Type to a TypeScheme, extracting forall-bound variables.
--- Also strips top-level annotations.
-typeToScheme :: Type -> TypeScheme
-typeToScheme = go []
-  where
-    go vars (TypeForall (ForallType var body)) = go (vars ++ [var]) body
-    go vars (TypeAnnotated (AnnotatedType body _)) = go vars body
-    go vars body = TypeScheme vars body Nothing
-
--- | The test graph with primitives, schema types, and kernel term bindings.
-testGraph :: M.Map Name Type -> Graph
-testGraph testTypes = let
-    allPrims = L.concatMap libraryPrimitives standardLibraries
-    primsMap = M.fromList $ fmap (\p -> (primitiveName p, p)) allPrims
-    kernelSchemas = M.map typeToScheme typesByName
-    testSchemas = M.map typeToScheme testTypes
-    allSchemas = M.union kernelSchemas testSchemas
-    -- Kernel term bindings needed for reduceTerm to evaluate kernel functions
-    kernelTermBindings = L.concat $ fmap moduleBindings
-      [ TermAnnotations.module_
-      , TermConstants.module_
-      , TermDependencies.module_
-      , TermExtractCore.module_
-      , TermLexical.module_
-      , TermRewriting.module_
-      , TermScoping.module_
-      , TermShowCore.module_
-      , TermStrip.module_
-      , TermVariables.module_
-      ]
-    boundTerms = M.fromList $ fmap (\b -> (bindingName b, bindingTerm b)) kernelTermBindings
-    boundTypes = M.fromList
-      [ (bindingName b, ts) | b <- kernelTermBindings, Just ts <- [bindingTypeScheme b] ]
-    base = emptyGraph
-  in base {
-    graphPrimitives = primsMap,
-    graphSchemaTypes = allSchemas,
-    graphBoundTerms = boundTerms,
-    graphBoundTypes = boundTypes }
-
--- | The test context (empty).
-testContext :: Context
-testContext = emptyContext
diff --git a/src/test/haskell/Hydra/Test/TestGraph.hs b/src/test/haskell/Hydra/Test/TestGraph.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/TestGraph.hs
+++ /dev/null
@@ -1,51 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | A module defining the graph used in the test suite.
-
-module Hydra.Test.TestGraph where
-import qualified Hydra.Context as Context
-import qualified Hydra.Core as Core
-import qualified Hydra.Graph as Graph
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Packaging as Packaging
-import qualified Hydra.Test.TestEnv as TestEnv
-import qualified Hydra.Test.TestTerms as TestTerms
-import qualified Hydra.Test.TestTypes as TestTypes
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
-testContext :: Context.Context
-testContext = TestEnv.testContext
-testGraph :: Graph.Graph
-testGraph = TestEnv.testGraph testTypes
-testNamespace :: Packaging.Namespace
-testNamespace = Packaging.Namespace "testGraph"
-testSchemaNamespace :: Packaging.Namespace
-testSchemaNamespace = Packaging.Namespace "testSchemaGraph"
-testTerms :: M.Map Core.Name Core.Term
-testTerms = Maps.fromList [
-  (Core.Name "testDataArthur", TestTerms.testDataArthur)]
-testTypes :: M.Map Core.Name Core.Type
-testTypes =
-    Maps.fromList [
-      (TestTypes.testTypeBuddyListAName, TestTypes.testTypeBuddyListA),
-      (TestTypes.testTypeBuddyListBName, TestTypes.testTypeBuddyListB),
-      (TestTypes.testTypeComparisonName, TestTypes.testTypeComparison),
-      (TestTypes.testTypeEitherName, TestTypes.testTypeEither),
-      (TestTypes.testTypeHydraLiteralTypeName, TestTypes.testTypeHydraLiteralType),
-      (TestTypes.testTypeHydraTypeName, TestTypes.testTypeHydraType),
-      (TestTypes.testTypeIntListName, TestTypes.testTypeIntList),
-      (TestTypes.testTypeLatLonName, TestTypes.testTypeLatLon),
-      (TestTypes.testTypeLatLonPolyName, TestTypes.testTypeLatLonPoly),
-      (TestTypes.testTypeListName, TestTypes.testTypeList),
-      (TestTypes.testTypeNumberName, TestTypes.testTypeNumber),
-      (TestTypes.testTypePersonName, TestTypes.testTypePerson),
-      (TestTypes.testTypePersonOrSomethingName, TestTypes.testTypePersonOrSomething),
-      (TestTypes.testTypePolymorphicWrapperName, TestTypes.testTypePolymorphicWrapper),
-      (TestTypes.testTypeSimpleNumberName, TestTypes.testTypeSimpleNumber),
-      (TestTypes.testTypeStringAliasName, TestTypes.testTypeStringAlias),
-      (TestTypes.testTypeSymmetricTripleName, TestTypes.testTypeSymmetricTriple),
-      (TestTypes.testTypeTimestampName, TestTypes.testTypeTimestamp),
-      (TestTypes.testTypeTripleName, TestTypes.testTypeTriple),
-      (TestTypes.testTypeUnionMonomorphicName, TestTypes.testTypeUnionMonomorphic),
-      (TestTypes.testTypeUnionPolymorphicRecursiveName, TestTypes.testTypeUnionPolymorphicRecursive),
-      (TestTypes.testTypeUnitName, TestTypes.testTypeUnit)]
diff --git a/src/test/haskell/Hydra/Test/TestSuite.hs b/src/test/haskell/Hydra/Test/TestSuite.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/TestSuite.hs
+++ /dev/null
@@ -1,83 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Hydra's common test suite, which is designed to run identically in each Hydra implementation; the criterion for a true Hydra implementation is that all test cases pass.
-
-module Hydra.Test.TestSuite where
-import qualified Hydra.Test.Annotations as Annotations
-import qualified Hydra.Test.Checking.All as CheckingAll
-import qualified Hydra.Test.Dependencies as Dependencies
-import qualified Hydra.Test.Differentiation as Differentiation
-import qualified Hydra.Test.EtaExpansion as EtaExpansion
-import qualified Hydra.Test.Formatting as Formatting
-import qualified Hydra.Test.Generation as Generation
-import qualified Hydra.Test.Hoisting.All as HoistingAll
-import qualified Hydra.Test.Inference.All as InferenceAll
-import qualified Hydra.Test.Json.Roundtrip as Roundtrip
-import qualified Hydra.Test.Json.Writer as Writer
-import qualified Hydra.Test.Json.Yaml as Yaml
-import qualified Hydra.Test.Lib.Chars as Chars
-import qualified Hydra.Test.Lib.Eithers as Eithers
-import qualified Hydra.Test.Lib.Equality as Equality
-import qualified Hydra.Test.Lib.Lists as Lists
-import qualified Hydra.Test.Lib.Literals as Literals
-import qualified Hydra.Test.Lib.Logic as Logic
-import qualified Hydra.Test.Lib.Maps as Maps
-import qualified Hydra.Test.Lib.Math as Math
-import qualified Hydra.Test.Lib.Maybes as Maybes
-import qualified Hydra.Test.Lib.Pairs as Pairs
-import qualified Hydra.Test.Lib.Regex as Regex
-import qualified Hydra.Test.Lib.Sets as Sets
-import qualified Hydra.Test.Lib.Strings as Strings
-import qualified Hydra.Test.Reduction as Reduction
-import qualified Hydra.Test.Rewriting as Rewriting
-import qualified Hydra.Test.Serialization as Serialization
-import qualified Hydra.Test.Sorting as Sorting
-import qualified Hydra.Test.Strip as Strip
-import qualified Hydra.Test.Substitution as Substitution
-import qualified Hydra.Test.Unification as Unification
-import qualified Hydra.Test.Validate.All as ValidateAll
-import qualified Hydra.Test.Variables as Variables
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The group of all common tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "common",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Chars.allTests,
-        Eithers.allTests,
-        Equality.allTests,
-        Lists.allTests,
-        Literals.allTests,
-        Logic.allTests,
-        Maps.allTests,
-        Math.allTests,
-        Maybes.allTests,
-        Pairs.allTests,
-        Regex.allTests,
-        Sets.allTests,
-        Strings.allTests,
-        Annotations.allTests,
-        CheckingAll.allTests,
-        Dependencies.allTests,
-        Differentiation.allTests,
-        EtaExpansion.allTests,
-        Formatting.allTests,
-        Generation.allTests,
-        HoistingAll.allTests,
-        InferenceAll.allTests,
-        Roundtrip.allTests,
-        Writer.allTests,
-        Yaml.allTests,
-        Reduction.allTests,
-        Rewriting.allTests,
-        Serialization.allTests,
-        Sorting.allTests,
-        Strip.allTests,
-        Substitution.allTests,
-        Unification.allTests,
-        ValidateAll.allTests,
-        Variables.allTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/TestTerms.hs b/src/test/haskell/Hydra/Test/TestTerms.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/TestTerms.hs
+++ /dev/null
@@ -1,55 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Term definitions for the test suite
-
-module Hydra.Test.TestTerms where
-import qualified Hydra.Core as Core
-import qualified Hydra.Test.TestTypes as TestTypes
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-latlonRecord :: Float -> Float -> Core.Term
-latlonRecord lat lon =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = TestTypes.testTypeLatLonName,
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "lat"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 lat)))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lon"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 lon)))}]})
-testDataArthur :: Core.Term
-testDataArthur =
-    Core.TermRecord (Core.Record {
-      Core.recordTypeName = TestTypes.testTypePersonName,
-      Core.recordFields = [
-        Core.Field {
-          Core.fieldName = (Core.Name "firstName"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Arthur"))},
-        Core.Field {
-          Core.fieldName = (Core.Name "lastName"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString "Dent"))},
-        Core.Field {
-          Core.fieldName = (Core.Name "age"),
-          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}]})
-testElementArthur :: Core.Binding
-testElementArthur =
-    Core.Binding {
-      Core.bindingName = (Core.Name "firstName"),
-      Core.bindingTerm = testDataArthur,
-      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-        Core.typeSchemeVariables = [],
-        Core.typeSchemeBody = (Core.TypeVariable TestTypes.testTypePersonName),
-        Core.typeSchemeConstraints = Nothing}))}
-testElementFirstName :: Core.Binding
-testElementFirstName =
-    Core.Binding {
-      Core.bindingName = (Core.Name "firstName"),
-      Core.bindingTerm = (Core.TermProject (Core.Projection {
-        Core.projectionTypeName = TestTypes.testTypePersonName,
-        Core.projectionField = (Core.Name "firstName")})),
-      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-        Core.typeSchemeVariables = [],
-        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-          Core.functionTypeDomain = (Core.TypeVariable TestTypes.testTypePersonName),
-          Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})),
-        Core.typeSchemeConstraints = Nothing}))}
diff --git a/src/test/haskell/Hydra/Test/TestTypes.hs b/src/test/haskell/Hydra/Test/TestTypes.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/TestTypes.hs
+++ /dev/null
@@ -1,344 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Type definitions for the test suite
-
-module Hydra.Test.TestTypes where
-import qualified Hydra.Core as Core
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-compareStringsType :: Core.Type
-compareStringsType =
-    Core.TypeFunction (Core.FunctionType {
-      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})
-concatType :: Core.Type
-concatType =
-    Core.TypeFunction (Core.FunctionType {
-      Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-        Core.functionTypeDomain = (Core.TypeLiteral Core.LiteralTypeString),
-        Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)}))})
-eitherStringOrInt8Type :: Core.Type
-eitherStringOrInt8Type =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "left"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "right"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8))}]
-eitherStringOrInt8TypeName :: Core.Name
-eitherStringOrInt8TypeName = Core.Name "EitherStringOrInt8"
-exampleProjectionType :: Core.Type
-exampleProjectionType =
-    Core.TypeFunction (Core.FunctionType {
-      Core.functionTypeDomain = (Core.TypeVariable testTypePersonName),
-      Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})
-listOfInt16sType :: Core.Type
-listOfInt16sType = Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16))
-listOfInt8sType :: Core.Type
-listOfInt8sType = Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8))
-listOfListsOfStringsType :: Core.Type
-listOfListsOfStringsType = Core.TypeList (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString))
-listOfSetOfStringsType :: Core.Type
-listOfSetOfStringsType = Core.TypeList (Core.TypeSet (Core.TypeLiteral Core.LiteralTypeString))
-listOfStringsType :: Core.Type
-listOfStringsType = Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)
-mapOfStringsToIntsType :: Core.Type
-mapOfStringsToIntsType =
-    Core.TypeMap (Core.MapType {
-      Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-      Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})
-optionalInt16Type :: Core.Type
-optionalInt16Type = Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt16))
-optionalInt8Type :: Core.Type
-optionalInt8Type = Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt8))
-optionalStringType :: Core.Type
-optionalStringType = Core.TypeMaybe (Core.TypeLiteral Core.LiteralTypeString)
-setOfStringsType :: Core.Type
-setOfStringsType = Core.TypeSet (Core.TypeLiteral Core.LiteralTypeString)
-stringOrIntName :: Core.Name
-stringOrIntName = Core.Name "StringOrInt"
-stringOrIntType :: Core.Type
-stringOrIntType =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "left"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "right"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}]
-testTypeBuddyListA :: Core.Type
-testTypeBuddyListA =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "head"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "tail"),
-          Core.fieldTypeType = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-            Core.applicationTypeFunction = (Core.TypeVariable testTypeBuddyListBName),
-            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})))}])})
-testTypeBuddyListAName :: Core.Name
-testTypeBuddyListAName = Core.Name "BuddyListA"
-testTypeBuddyListB :: Core.Type
-testTypeBuddyListB =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "head"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "tail"),
-          Core.fieldTypeType = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-            Core.applicationTypeFunction = (Core.TypeVariable testTypeBuddyListAName),
-            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})))}])})
-testTypeBuddyListBName :: Core.Name
-testTypeBuddyListBName = Core.Name "BuddyListB"
-testTypeComparison :: Core.Type
-testTypeComparison =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "lessThan"),
-        Core.fieldTypeType = Core.TypeUnit},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "equalTo"),
-        Core.fieldTypeType = Core.TypeUnit},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "greaterThan"),
-        Core.fieldTypeType = Core.TypeUnit}]
-testTypeComparisonName :: Core.Name
-testTypeComparisonName = Core.Name "Comparison"
-testTypeEither :: Core.Type
-testTypeEither =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = (Core.Name "b"),
-        Core.forallTypeBody = (Core.TypeUnion [
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "left"),
-            Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-          Core.FieldType {
-            Core.fieldTypeName = (Core.Name "right"),
-            Core.fieldTypeType = (Core.TypeVariable (Core.Name "b"))}])}))})
-testTypeEitherName :: Core.Name
-testTypeEitherName = Core.Name "Either"
-testTypeHydraLiteralType :: Core.Type
-testTypeHydraLiteralType =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "boolean"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeBoolean)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "string"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)}]
-testTypeHydraLiteralTypeName :: Core.Name
-testTypeHydraLiteralTypeName = Core.Name "HydraLiteralType"
-testTypeHydraType :: Core.Type
-testTypeHydraType =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "literal"),
-        Core.fieldTypeType = (Core.TypeVariable testTypeHydraLiteralTypeName)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "list"),
-        Core.fieldTypeType = (Core.TypeVariable testTypeHydraTypeName)}]
-testTypeHydraTypeName :: Core.Name
-testTypeHydraTypeName = Core.Name "HydraType"
-testTypeIntList :: Core.Type
-testTypeIntList =
-    Core.TypeRecord [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "head"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "tail"),
-        Core.fieldTypeType = (Core.TypeMaybe (Core.TypeVariable testTypeIntListName))}]
-testTypeIntListName :: Core.Name
-testTypeIntListName = Core.Name "IntList"
-testTypeLatLon :: Core.Type
-testTypeLatLon =
-    Core.TypeRecord [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "lat"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "lon"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}]
-testTypeLatLonName :: Core.Name
-testTypeLatLonName = Core.Name "LatLon"
-testTypeLatLonPoly :: Core.Type
-testTypeLatLonPoly =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "lat"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "lon"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))}])})
-testTypeLatLonPolyName :: Core.Name
-testTypeLatLonPolyName = Core.Name "LatLonPoly"
-testTypeList :: Core.Type
-testTypeList =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeRecord [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "head"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "tail"),
-          Core.fieldTypeType = (Core.TypeMaybe (Core.TypeApplication (Core.ApplicationType {
-            Core.applicationTypeFunction = (Core.TypeVariable testTypeListName),
-            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))})))}])})
-testTypeListName :: Core.Name
-testTypeListName = Core.Name "List"
-testTypeName :: Core.Name
-testTypeName = Core.Name "Test"
-testTypeNumber :: Core.Type
-testTypeNumber =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "int"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "float"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}]
-testTypeNumberName :: Core.Name
-testTypeNumberName = Core.Name "Number"
-testTypePerson :: Core.Type
-testTypePerson =
-    Core.TypeRecord [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "firstName"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "lastName"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "age"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}]
-testTypePersonName :: Core.Name
-testTypePersonName = Core.Name "Person"
-testTypePersonOrSomething :: Core.Type
-testTypePersonOrSomething =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeUnion [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "person"),
-          Core.fieldTypeType = (Core.TypeVariable testTypePersonName)},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "other"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))}])})
-testTypePersonOrSomethingName :: Core.Name
-testTypePersonOrSomethingName = Core.Name "PersonOrSomething"
-testTypePolymorphicWrapper :: Core.Type
-testTypePolymorphicWrapper =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeWrap (Core.TypeList (Core.TypeVariable (Core.Name "a"))))})
-testTypePolymorphicWrapperName :: Core.Name
-testTypePolymorphicWrapperName = Core.Name "PolymorphicWrapper"
-testTypeSimpleNumber :: Core.Type
-testTypeSimpleNumber =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "int"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "float"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeFloat Core.FloatTypeFloat32))}]
-testTypeSimpleNumberName :: Core.Name
-testTypeSimpleNumberName = Core.Name "SimpleNumber"
-testTypeStringAlias :: Core.Type
-testTypeStringAlias = Core.TypeWrap (Core.TypeLiteral Core.LiteralTypeString)
-testTypeStringAliasName :: Core.Name
-testTypeStringAliasName = Core.Name "StringAlias"
-testTypeSymmetricTriple :: Core.Type
-testTypeSymmetricTriple =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "v"),
-      Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = (Core.Name "e"),
-        Core.forallTypeBody = (Core.TypeWrap (Core.TypeApplication (Core.ApplicationType {
-          Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-            Core.applicationTypeFunction = (Core.TypeApplication (Core.ApplicationType {
-              Core.applicationTypeFunction = (Core.TypeVariable testTypeTripleName),
-              Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})),
-            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "e"))})),
-          Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "v"))})))}))})
-testTypeSymmetricTripleName :: Core.Name
-testTypeSymmetricTripleName = Core.Name "SymmetricTriple"
-testTypeTimestamp :: Core.Type
-testTypeTimestamp =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "unixTimeMillis"),
-        Core.fieldTypeType = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeUint64))},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "date"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)}]
-testTypeTimestampName :: Core.Name
-testTypeTimestampName = Core.Name "Timestamp"
-testTypeTriple :: Core.Type
-testTypeTriple =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-        Core.forallTypeParameter = (Core.Name "b"),
-        Core.forallTypeBody = (Core.TypeForall (Core.ForallType {
-          Core.forallTypeParameter = (Core.Name "c"),
-          Core.forallTypeBody = (Core.TypeRecord [
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "first"),
-              Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "second"),
-              Core.fieldTypeType = (Core.TypeVariable (Core.Name "b"))},
-            Core.FieldType {
-              Core.fieldTypeName = (Core.Name "third"),
-              Core.fieldTypeType = (Core.TypeVariable (Core.Name "c"))}])}))}))})
-testTypeTripleName :: Core.Name
-testTypeTripleName = Core.Name "Triple"
-testTypeUnionMonomorphic :: Core.Type
-testTypeUnionMonomorphic =
-    Core.TypeUnion [
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "bool"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeBoolean)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "string"),
-        Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},
-      Core.FieldType {
-        Core.fieldTypeName = (Core.Name "unit"),
-        Core.fieldTypeType = Core.TypeUnit}]
-testTypeUnionMonomorphicName :: Core.Name
-testTypeUnionMonomorphicName = Core.Name "UnionMonomorphic"
-testTypeUnionPolymorphicRecursive :: Core.Type
-testTypeUnionPolymorphicRecursive =
-    Core.TypeForall (Core.ForallType {
-      Core.forallTypeParameter = (Core.Name "a"),
-      Core.forallTypeBody = (Core.TypeUnion [
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "bool"),
-          Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeBoolean)},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "value"),
-          Core.fieldTypeType = (Core.TypeVariable (Core.Name "a"))},
-        Core.FieldType {
-          Core.fieldTypeName = (Core.Name "other"),
-          Core.fieldTypeType = (Core.TypeApplication (Core.ApplicationType {
-            Core.applicationTypeFunction = (Core.TypeVariable testTypeUnionPolymorphicRecursiveName),
-            Core.applicationTypeArgument = (Core.TypeVariable (Core.Name "a"))}))}])})
-testTypeUnionPolymorphicRecursiveName :: Core.Name
-testTypeUnionPolymorphicRecursiveName = Core.Name "UnionPolymorphicRecursive"
-testTypeUnit :: Core.Type
-testTypeUnit = Core.TypeRecord []
-testTypeUnitName :: Core.Name
-testTypeUnitName = Core.Name "Unit"
diff --git a/src/test/haskell/Hydra/Test/Unification.hs b/src/test/haskell/Hydra/Test/Unification.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Unification.hs
+++ /dev/null
@@ -1,1016 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for type unification operations
-
-module Hydra.Test.Unification where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lexical as Lexical
-import qualified Hydra.Lib.Eithers as Eithers
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Literals as Literals
-import qualified Hydra.Lib.Maps as Maps
-import qualified Hydra.Lib.Pairs as Pairs
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Typing as Typing
-import qualified Hydra.Unification as Unification
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
-import qualified Data.Map as M
--- | Test cases for type unification operations
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "unification",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "variableOccursInType",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in itself",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeVariable (Core.Name "a")))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable does not occur in different variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeVariable (Core.Name "b")))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable does not occur in int32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable does not occur in string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeLiteral Core.LiteralTypeString))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in list element type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeList (Core.TypeVariable (Core.Name "a"))))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable does not occur in list of different type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeList (Core.TypeVariable (Core.Name "b"))))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in function domain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in function codomain",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable does not occur in function with different vars",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "c"))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in optional type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeMaybe (Core.TypeVariable (Core.Name "a"))))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in pair first",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in pair second",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in either left",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "a")),
-                  Core.eitherTypeRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in either right",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in map key type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "a")),
-                  Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in map value type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "a"))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in set type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeSet (Core.TypeVariable (Core.Name "a"))))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in nested list",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeList (Core.TypeList (Core.TypeVariable (Core.Name "a")))))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in list of functions",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeList (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable does not occur in complex type without it",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))})))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean False)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs deep in complex type",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                  Core.functionTypeCodomain = (Core.TypeMaybe (Core.TypePair (Core.PairType {
-                    Core.pairTypeFirst = (Core.TypeLiteral Core.LiteralTypeString),
-                    Core.pairTypeSecond = (Core.TypeVariable (Core.Name "a"))})))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in forAll body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "b"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable occurs in forAll bound position",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Literals.showBoolean (Unification.variableOccursInType (Core.Name "a") (Core.TypeForall (Core.ForallType {
-                  Core.forallTypeParameter = (Core.Name "a"),
-                  Core.forallTypeBody = (Core.TypeFunction (Core.FunctionType {
-                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                    Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})))),
-                Testing.universalTestCaseExpected = (Literals.showBoolean True)})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "unifyTypes",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify identical int32 types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst M.empty))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify identical string types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeLiteral Core.LiteralTypeString) (Core.TypeLiteral Core.LiteralTypeString) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst M.empty))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify identical variable types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeVariable (Core.Name "a")) (Core.TypeVariable (Core.Name "a")) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst M.empty))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify variable with int32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeVariable (Core.Name "a")) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify int32 with variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (Core.TypeVariable (Core.Name "a")) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify two different variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeVariable (Core.Name "a")) (Core.TypeVariable (Core.Name "b")) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeVariable (Core.Name "b")))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify list of variables with list of int32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeList (Core.TypeVariable (Core.Name "a"))) (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify identical list types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)) (Core.TypeList (Core.TypeLiteral Core.LiteralTypeString)) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst M.empty))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify function types with variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify identical function types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst M.empty))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify optional types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeMaybe (Core.TypeVariable (Core.Name "a"))) (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify pair types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))})) (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify either types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "a")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "b"))})) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))),
-                    (Core.Name "b", (Core.TypeLiteral Core.LiteralTypeString))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify map types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "k")),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "v"))})) (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "k", (Core.TypeLiteral Core.LiteralTypeString)),
-                    (Core.Name "v", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify set types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeSet (Core.TypeVariable (Core.Name "a"))) (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst (M.fromList [
-                    (Core.Name "a", (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)))])))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unify unit types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) Core.TypeUnit Core.TypeUnit "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst (Typing.TypeSubst M.empty))))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fail to unify int32 with string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (Core.TypeLiteral Core.LiteralTypeString) "test")),
-                Testing.universalTestCaseExpected = "failure"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fail to unify list with function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})) "test")),
-                Testing.universalTestCaseExpected = "failure"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "occur check: variable with list containing it",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\ts -> Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [
-                    Core.unName (Pairs.first p),
-                    ": ",
-                    (ShowCore.type_ (Pairs.second p))]) (Maps.toList (Typing.unTypeSubst ts)))),
-                  "}"]) (Unification.unifyTypes Lexical.emptyContext (Maps.fromList (Lists.map (\n -> (n, Core.TypeScheme {
-                  Core.typeSchemeVariables = [],
-                  Core.typeSchemeBody = (Core.TypeVariable n),
-                  Core.typeSchemeConstraints = Nothing})) [])) (Core.TypeVariable (Core.Name "a")) (Core.TypeList (Core.TypeVariable (Core.Name "a"))) "test")),
-                Testing.universalTestCaseExpected = "failure"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "joinTypes",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join identical int32",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join identical string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeLiteral Core.LiteralTypeString) (Core.TypeLiteral Core.LiteralTypeString) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join list types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeList (Core.TypeVariable (Core.Name "a"))) (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "a")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join function types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                  Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "a")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"},
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "b")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral Core.LiteralTypeString),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join optional types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeMaybe (Core.TypeVariable (Core.Name "a"))) (Core.TypeMaybe (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "a")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join pair types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                  Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))})) (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "a")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"},
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "b")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral Core.LiteralTypeString),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join either types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "a")),
-                  Core.eitherTypeRight = (Core.TypeVariable (Core.Name "b"))})) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "a")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"},
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "b")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral Core.LiteralTypeString),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join map types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeVariable (Core.Name "k")),
-                  Core.mapTypeValues = (Core.TypeVariable (Core.Name "v"))})) (Core.TypeMap (Core.MapType {
-                  Core.mapTypeKeys = (Core.TypeLiteral Core.LiteralTypeString),
-                  Core.mapTypeValues = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "k")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral Core.LiteralTypeString),
-                      Typing.typeConstraintComment = "join types; test"},
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "v")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join set types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeSet (Core.TypeVariable (Core.Name "a"))) (Core.TypeSet (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [
-                    Typing.TypeConstraint {
-                      Typing.typeConstraintLeft = (Core.TypeVariable (Core.Name "a")),
-                      Typing.typeConstraintRight = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                      Typing.typeConstraintComment = "join types; test"}])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "join unit types",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext Core.TypeUnit Core.TypeUnit "test")),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) [])),
-                  "]"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fail to join int32 with string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)) (Core.TypeLiteral Core.LiteralTypeString) "test")),
-                Testing.universalTestCaseExpected = "failure"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fail to join list with function",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypeList (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))) (Core.TypeFunction (Core.FunctionType {
-                  Core.functionTypeDomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))})) "test")),
-                Testing.universalTestCaseExpected = "failure"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "fail to join pair with either",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Eithers.either (\_ -> "failure") (\cs -> Strings.cat [
-                  "[",
-                  (Strings.intercalate ", " (Lists.map (\c -> Strings.cat [
-                    "(",
-                    (ShowCore.type_ (Typing.typeConstraintLeft c)),
-                    " ~ ",
-                    (ShowCore.type_ (Typing.typeConstraintRight c)),
-                    ")"]) cs)),
-                  "]"]) (Unification.joinTypes Lexical.emptyContext (Core.TypePair (Core.PairType {
-                  Core.pairTypeFirst = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.pairTypeSecond = (Core.TypeLiteral Core.LiteralTypeString)})) (Core.TypeEither (Core.EitherType {
-                  Core.eitherTypeLeft = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32)),
-                  Core.eitherTypeRight = (Core.TypeLiteral Core.LiteralTypeString)})) "test")),
-                Testing.universalTestCaseExpected = "failure"})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Validate/All.hs b/src/test/haskell/Hydra/Test/Validate/All.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Validate/All.hs
+++ /dev/null
@@ -1,17 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Hydra's validation test suite
-
-module Hydra.Test.Validate.All where
-import qualified Hydra.Test.Validate.Core as Core
-import qualified Hydra.Testing as Testing
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | The group of all validation tests
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "validation",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Core.allTests],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/Test/Validate/Core.hs b/src/test/haskell/Hydra/Test/Validate/Core.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Validate/Core.hs
+++ /dev/null
@@ -1,383 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for core term and type validation
-
-module Hydra.Test.Validate.Core where
-import qualified Hydra.Core as Core
-import qualified Hydra.Error.Core as ErrorCore
-import qualified Hydra.Lib.Maybes as Maybes
-import qualified Hydra.Paths as Paths
-import qualified Hydra.Show.Error.Core as ShowErrorCore
-import qualified Hydra.Test.TestGraph as TestGraph
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Validate.Core as ValidateCore
-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
-import qualified Data.Scientific as Sci
--- | Test cases for core term and type validation
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "validate.core",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        duplicateBindingsTests,
-        duplicateFieldsTests,
-        emptyLetBindingsTests,
-        identityApplicationTests,
-        variableShadowingTests],
-      Testing.testGroupCases = []}
-duplicateBindingsTests :: Testing.TestGroup
-duplicateBindingsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "duplicate bindings",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "no bindings (literal)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "single binding",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "distinct bindings",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "y"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate bindings at top level",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing},
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateBinding (ErrorCore.DuplicateBindingError {
-              ErrorCore.duplicateBindingErrorLocation = (Paths.SubtermPath []),
-              ErrorCore.duplicateBindingErrorName = (Core.Name "x")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate bindings in lambda body",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "f"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "a"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    Core.bindingTypeScheme = Nothing},
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "a"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "a"))}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateBinding (ErrorCore.DuplicateBindingError {
-              ErrorCore.duplicateBindingErrorLocation = (Paths.SubtermPath [
-                Paths.SubtermStepLambdaBody]),
-              ErrorCore.duplicateBindingErrorName = (Core.Name "a")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate bindings in let body",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    Core.bindingTypeScheme = Nothing},
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "y"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3))),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "y"))}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateBinding (ErrorCore.DuplicateBindingError {
-              ErrorCore.duplicateBindingErrorLocation = (Paths.SubtermPath [
-                Paths.SubtermStepLetBody]),
-              ErrorCore.duplicateBindingErrorName = (Core.Name "y")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate bindings in let binding value",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "a"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                        Core.bindingTypeScheme = Nothing},
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "a"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermVariable (Core.Name "a"))})),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateBinding (ErrorCore.DuplicateBindingError {
-              ErrorCore.duplicateBindingErrorLocation = (Paths.SubtermPath [
-                Paths.SubtermStepLetBinding (Core.Name "x")]),
-              ErrorCore.duplicateBindingErrorName = (Core.Name "a")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "same name in different scopes is valid",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "x"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-duplicateFieldsTests :: Testing.TestGroup
-duplicateFieldsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "duplicate fields",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "no fields (literal)",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "distinct record fields",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Point"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "x"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "y"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate record fields at top level",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermRecord (Core.Record {
-              Core.recordTypeName = (Core.Name "Point"),
-              Core.recordFields = [
-                Core.Field {
-                  Core.fieldName = (Core.Name "x"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                Core.Field {
-                  Core.fieldName = (Core.Name "x"),
-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateField (ErrorCore.DuplicateFieldError {
-              ErrorCore.duplicateFieldErrorLocation = (Paths.SubtermPath []),
-              ErrorCore.duplicateFieldErrorName = (Core.Name "x")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate fields in record inside lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "f"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "Point"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "x"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "x"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateField (ErrorCore.DuplicateFieldError {
-              ErrorCore.duplicateFieldErrorLocation = (Paths.SubtermPath [
-                Paths.SubtermStepLambdaBody]),
-              ErrorCore.duplicateFieldErrorName = (Core.Name "x")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "duplicate fields in record inside let body",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "r"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermRecord (Core.Record {
-                Core.recordTypeName = (Core.Name "Point"),
-                Core.recordFields = [
-                  Core.Field {
-                    Core.fieldName = (Core.Name "x"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))},
-                  Core.Field {
-                    Core.fieldName = (Core.Name "x"),
-                    Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}]}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorDuplicateField (ErrorCore.DuplicateFieldError {
-              ErrorCore.duplicateFieldErrorLocation = (Paths.SubtermPath [
-                Paths.SubtermStepLetBody]),
-              ErrorCore.duplicateFieldErrorName = (Core.Name "x")}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-emptyLetBindingsTests :: Testing.TestGroup
-emptyLetBindingsTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "empty let bindings",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "let with bindings is valid",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [
-                Core.Binding {
-                  Core.bindingName = (Core.Name "x"),
-                  Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                  Core.bindingTypeScheme = Nothing}],
-              Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "empty let bindings",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLet (Core.Let {
-              Core.letBindings = [],
-              Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorEmptyLetBindings (ErrorCore.EmptyLetBindingsError {
-              ErrorCore.emptyLetBindingsErrorLocation = (Paths.SubtermPath [])}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-identityApplicationTests :: Testing.TestGroup
-identityApplicationTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "identity application",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "non-identity lambda application is valid",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "identity lambda application",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermApplication (Core.Application {
-              Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-              Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (Just (ErrorCore.InvalidTermErrorUnnecessaryIdentityApplication (ErrorCore.UnnecessaryIdentityApplicationError {
-              ErrorCore.unnecessaryIdentityApplicationErrorLocation = (Paths.SubtermPath [])}))))})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
-variableShadowingTests :: Testing.TestGroup
-variableShadowingTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "variable shadowing",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [],
-      Testing.testGroupCases = [
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda with fresh variable is valid",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "lambda shadows outer lambda",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                Core.lambdaParameter = (Core.Name "x"),
-                Core.lambdaDomain = Nothing,
-                Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []},
-        Testing.TestCaseWithMetadata {
-          Testing.testCaseWithMetadataName = "let binding shadows lambda parameter",
-          Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-            Testing.universalTestCaseActual = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) (ValidateCore.term False TestGraph.testGraph (Core.TermLambda (Core.Lambda {
-              Core.lambdaParameter = (Core.Name "x"),
-              Core.lambdaDomain = Nothing,
-              Core.lambdaBody = (Core.TermLet (Core.Let {
-                Core.letBindings = [
-                  Core.Binding {
-                    Core.bindingName = (Core.Name "x"),
-                    Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                    Core.bindingTypeScheme = Nothing}],
-                Core.letBody = (Core.TermVariable (Core.Name "x"))}))})))),
-            Testing.universalTestCaseExpected = (Maybes.maybe "valid" (\e -> ShowErrorCore.invalidTermError e) Nothing)})),
-          Testing.testCaseWithMetadataDescription = Nothing,
-          Testing.testCaseWithMetadataTags = []}]}
diff --git a/src/test/haskell/Hydra/Test/Variables.hs b/src/test/haskell/Hydra/Test/Variables.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/Test/Variables.hs
+++ /dev/null
@@ -1,1601 +0,0 @@
--- Note: this is an automatically generated file. Do not edit.
--- | Test cases for variable analysis and manipulation
-
-module Hydra.Test.Variables where
-import qualified Hydra.Core as Core
-import qualified Hydra.Lib.Lists as Lists
-import qualified Hydra.Lib.Sets as Sets
-import qualified Hydra.Lib.Strings as Strings
-import qualified Hydra.Show.Core as ShowCore
-import qualified Hydra.Testing as Testing
-import qualified Hydra.Variables as Variables
-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
--- | Test cases for variable analysis and manipulation
-allTests :: Testing.TestGroup
-allTests =
-    Testing.TestGroup {
-      Testing.testGroupName = "variables",
-      Testing.testGroupDescription = Nothing,
-      Testing.testGroupSubgroups = [
-        Testing.TestGroup {
-          Testing.testGroupName = "freeVariables",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "string literal has no free variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (Variables.freeVariablesInTerm (Core.TermLiteral (Core.LiteralString "foo")))))),
-                  "}"]),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList S.empty))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (Variables.freeVariablesInTerm (Core.TermVariable (Core.Name "x")))))),
-                  "}"]),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (S.fromList [
-                    Core.Name "x"])))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "bound variable is not free",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (Variables.freeVariablesInTerm (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})))))),
-                  "}"]),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList S.empty))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "unbound variable in lambda body",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (Variables.freeVariablesInTerm (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))))),
-                  "}"]),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (S.fromList [
-                    Core.Name "x"])))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "mixed free and bound variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (Variables.freeVariablesInTerm (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))]))))),
-                  "}"]),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (S.fromList [
-                    Core.Name "x"])))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "multiple free variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (Variables.freeVariablesInTerm (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))]))))),
-                  "}"]),
-                Testing.universalTestCaseExpected = (Strings.cat [
-                  "{",
-                  (Strings.intercalate ", " (Lists.map (\n -> Core.unName n) (Sets.toList (S.fromList [
-                    Core.Name "x",
-                    (Core.Name "y")])))),
-                  "}"])})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "normalizeTypeVariables",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "literal without type variables unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "simple let without type annotations unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let with monomorphic type scheme unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let with monomorphic binding referencing string",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding with free type variable unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "bar")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeVariable (Core.Name "a")),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "bar")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeVariable (Core.Name "a")),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "monomorphic binding with typed lambda unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralString "foo")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeLiteral Core.LiteralTypeString),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic binding with typed lambda in body unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "bar")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeVariable (Core.Name "a")),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "foo"),
-                      Core.bindingTerm = (Core.TermVariable (Core.Name "bar")),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [],
-                        Core.typeSchemeBody = (Core.TypeVariable (Core.Name "a")),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic identity function normalized",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "polymorphic const function normalized",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "const"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a",
-                          (Core.Name "b")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "const")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "const"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0",
-                          (Core.Name "t1")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "const")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "binding rewriting does not affect body with typed lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = (Just (Core.TypeFunction (Core.FunctionType {
-                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                      Core.functionTypeCodomain = (Core.TypeLiteral (Core.LiteralTypeInteger Core.IntegerTypeInt32))}))),
-                    Core.lambdaBody = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested polymorphic lets normalized",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "id2"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "b"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                          Core.typeSchemeConstraints = Nothing}))}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "id2"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "y"))})),
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "t0"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                          Core.typeSchemeConstraints = Nothing}))}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermApplication (Core.Application {
-                        Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                        Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested same substitution in bindings and environment",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "id2"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "a"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                          Core.typeSchemeConstraints = Nothing}))}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "id2"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                          Core.typeSchemeVariables = [
-                            Core.Name "t0"],
-                          Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                            Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                          Core.typeSchemeConstraints = Nothing}))}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "parent type variable shadows child variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "id2"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "a"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "id2"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t1"))),
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t1"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t0"))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "no shadowing distinct type variables",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "id2"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "b"))),
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "b"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "b"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "a"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "id"),
-                      Core.bindingTerm = (Core.TermLet (Core.Let {
-                        Core.letBindings = [
-                          Core.Binding {
-                            Core.bindingName = (Core.Name "id2"),
-                            Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                              Core.lambdaParameter = (Core.Name "x"),
-                              Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t1"))),
-                              Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                            Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                              Core.typeSchemeVariables = [
-                                Core.Name "t1"],
-                              Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                                Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t1"))})),
-                              Core.typeSchemeConstraints = Nothing}))}],
-                        Core.letBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t0"))),
-                          Core.lambdaBody = (Core.TermApplication (Core.Application {
-                            Core.applicationFunction = (Core.TermVariable (Core.Name "id2")),
-                            Core.applicationArgument = (Core.TermVariable (Core.Name "y"))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0"],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeVariable (Core.Name "t0"))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermVariable (Core.Name "id")),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "locally free type variable in nested binding",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.normalizeTypeVariablesInTerm (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "fun1"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "a"))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "b"))),
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "fun2"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "z"),
-                                  Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "c"))),
-                                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "z"), (Core.TermVariable (Core.Name "y"))))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [
-                                    Core.Name "c"],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "c")),
-                                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "c")),
-                                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))}))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "fun2")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "a",
-                          (Core.Name "b")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "a")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "b")),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeVariable (Core.Name "a")),
-                              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "b"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "fun1")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "fun1"),
-                      Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t0"))),
-                        Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "y"),
-                          Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t1"))),
-                          Core.lambdaBody = (Core.TermLet (Core.Let {
-                            Core.letBindings = [
-                              Core.Binding {
-                                Core.bindingName = (Core.Name "fun2"),
-                                Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                                  Core.lambdaParameter = (Core.Name "z"),
-                                  Core.lambdaDomain = (Just (Core.TypeVariable (Core.Name "t2"))),
-                                  Core.lambdaBody = (Core.TermPair (Core.TermVariable (Core.Name "z"), (Core.TermVariable (Core.Name "y"))))})),
-                                Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                                  Core.typeSchemeVariables = [
-                                    Core.Name "t2"],
-                                  Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t2")),
-                                    Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                                      Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t2")),
-                                      Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))})),
-                                  Core.typeSchemeConstraints = Nothing}))}],
-                            Core.letBody = (Core.TermApplication (Core.Application {
-                              Core.applicationFunction = (Core.TermVariable (Core.Name "fun2")),
-                              Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))}))})),
-                      Core.bindingTypeScheme = (Just (Core.TypeScheme {
-                        Core.typeSchemeVariables = [
-                          Core.Name "t0",
-                          (Core.Name "t1")],
-                        Core.typeSchemeBody = (Core.TypeFunction (Core.FunctionType {
-                          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t0")),
-                          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {
-                            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "t1")),
-                            Core.functionTypeCodomain = (Core.TypePair (Core.PairType {
-                              Core.pairTypeFirst = (Core.TypeVariable (Core.Name "t0")),
-                              Core.pairTypeSecond = (Core.TypeVariable (Core.Name "t1"))}))}))})),
-                        Core.typeSchemeConstraints = Nothing}))}],
-                  Core.letBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "fun1")),
-                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString "foo"))})),
-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]},
-        Testing.TestGroup {
-          Testing.testGroupName = "unshadowVariables",
-          Testing.testGroupDescription = Nothing,
-          Testing.testGroupSubgroups = [],
-          Testing.testGroupCases = [
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "literal unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42))))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "variable unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermVariable (Core.Name "x")))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermVariable (Core.Name "x")))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "single lambda unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "distinct lambda parameters unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let with no shadowing unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermVariable (Core.Name "x"))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let and lambda with distinct names unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "inner lambda shadows outer lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "inner lambda shadows outer - body references both",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermVariable (Core.Name "x"),
-                    (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "triple nested lambda same name",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x3"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x3"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "two parameters shadow sequentially",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermVariable (Core.Name "y"))])}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y2"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x2"),
-                          (Core.TermVariable (Core.Name "y2"))])}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda shadows let-bound variable",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda shadows one of multiple let bindings",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing},
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "y"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermList [
-                      Core.TermVariable (Core.Name "x2"),
-                      (Core.TermVariable (Core.Name "y"))])}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "inner let body with lambda shadowing outer let",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda in function position of application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "f"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "f"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "f"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "f"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermApplication (Core.Application {
-                    Core.applicationFunction = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "f2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "f2"))})),
-                    Core.applicationArgument = (Core.TermVariable (Core.Name "f"))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambdas in list elements",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}),
-                    (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))])})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermList [
-                    Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}),
-                    (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))])})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda in record field",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "Pair"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fst"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "snd"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermRecord (Core.Record {
-                    Core.recordTypeName = (Core.Name "Pair"),
-                    Core.recordFields = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "fst"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x2"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "snd"),
-                        Core.fieldTerm = (Core.TermVariable (Core.Name "x"))}]}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda in case branch",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "Maybe"),
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "nothing"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "just"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}]}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermCases (Core.CaseStatement {
-                    Core.caseStatementTypeName = (Core.Name "Maybe"),
-                    Core.caseStatementDefault = Nothing,
-                    Core.caseStatementCases = [
-                      Core.Field {
-                        Core.fieldName = (Core.Name "nothing"),
-                        Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))},
-                      Core.Field {
-                        Core.fieldName = (Core.Name "just"),
-                        Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x2"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))}]}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda in pair",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}), (Core.TermVariable (Core.Name "x"))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermPair (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}), (Core.TermVariable (Core.Name "x"))))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda inside optional",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermMaybe (Just (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermMaybe (Just (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda inside set element",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermSet (S.fromList [
-                    Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})]))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermSet (S.fromList [
-                    Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))})]))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda in union injection",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "Result"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "ok"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermInject (Core.Injection {
-                    Core.injectionTypeName = (Core.Name "Result"),
-                    Core.injectionField = Core.Field {
-                      Core.fieldName = (Core.Name "ok"),
-                      Core.fieldTerm = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "x2"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))}}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda inside wrapped term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.Name "Age"),
-                    Core.wrappedTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {
-                    Core.wrappedTermTypeName = (Core.Name "Age"),
-                    Core.wrappedTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda inside type lambda",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.Name "a"),
-                    Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermTypeLambda (Core.TypeLambda {
-                    Core.typeLambdaParameter = (Core.Name "a"),
-                    Core.typeLambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda inside type application",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {
-                    Core.typeApplicationTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))})),
-                    Core.typeApplicationTermType = (Core.TypeLiteral Core.LiteralTypeString)}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowed lambda inside annotated term",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                    Core.annotatedTermAnnotation = M.empty}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermAnnotated (Core.AnnotatedTerm {
-                    Core.annotatedTermBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))})),
-                    Core.annotatedTermAnnotation = M.empty}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "shadowing at multiple depths",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x"),
-                          (Core.TermVariable (Core.Name "y"))])}))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "y"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x2"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                        Core.lambdaParameter = (Core.Name "y2"),
-                        Core.lambdaDomain = Nothing,
-                        Core.lambdaBody = (Core.TermList [
-                          Core.TermVariable (Core.Name "x2"),
-                          (Core.TermVariable (Core.Name "y2"))])}))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "let then lambda then lambda all same name",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLet (Core.Let {
-                  Core.letBindings = [
-                    Core.Binding {
-                      Core.bindingName = (Core.Name "x"),
-                      Core.bindingTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1))),
-                      Core.bindingTypeScheme = Nothing}],
-                  Core.letBody = (Core.TermLambda (Core.Lambda {
-                    Core.lambdaParameter = (Core.Name "x2"),
-                    Core.lambdaDomain = Nothing,
-                    Core.lambdaBody = (Core.TermLambda (Core.Lambda {
-                      Core.lambdaParameter = (Core.Name "x3"),
-                      Core.lambdaDomain = Nothing,
-                      Core.lambdaBody = (Core.TermVariable (Core.Name "x3"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "lambda with shadowing in let binding value",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x"))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "y")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermLambda (Core.Lambda {
-                  Core.lambdaParameter = (Core.Name "x"),
-                  Core.lambdaDomain = Nothing,
-                  Core.lambdaBody = (Core.TermLet (Core.Let {
-                    Core.letBindings = [
-                      Core.Binding {
-                        Core.bindingName = (Core.Name "y"),
-                        Core.bindingTerm = (Core.TermLambda (Core.Lambda {
-                          Core.lambdaParameter = (Core.Name "x2"),
-                          Core.lambdaDomain = Nothing,
-                          Core.lambdaBody = (Core.TermVariable (Core.Name "x2"))})),
-                        Core.bindingTypeScheme = Nothing}],
-                    Core.letBody = (Core.TermApplication (Core.Application {
-                      Core.applicationFunction = (Core.TermVariable (Core.Name "y")),
-                      Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "application without shadowing unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermApplication (Core.Application {
-                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),
-                  Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "list of literals unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermList [
-                  Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 1)),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2))),
-                  (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 3)))]))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []},
-            Testing.TestCaseWithMetadata {
-              Testing.testCaseWithMetadataName = "nested record unchanged",
-              Testing.testCaseWithMetadataCase = (Testing.TestCaseUniversal (Testing.UniversalTestCase {
-                Testing.universalTestCaseActual = (ShowCore.term (Variables.unshadowVariables (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Point"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))}]})))),
-                Testing.universalTestCaseExpected = (ShowCore.term (Core.TermRecord (Core.Record {
-                  Core.recordTypeName = (Core.Name "Point"),
-                  Core.recordFields = [
-                    Core.Field {
-                      Core.fieldName = (Core.Name "x"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)))},
-                    Core.Field {
-                      Core.fieldName = (Core.Name "y"),
-                      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 20)))}]})))})),
-              Testing.testCaseWithMetadataDescription = Nothing,
-              Testing.testCaseWithMetadataTags = []}]}],
-      Testing.testGroupCases = []}
diff --git a/src/test/haskell/Hydra/TestData.hs b/src/test/haskell/Hydra/TestData.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/TestData.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Hydra.TestData where
-
-import Hydra.Kernel
-import Hydra.Dsl.Terms
-import qualified Hydra.Dsl.Terms as Terms
-
-import qualified Data.Map as M
-
-
-makeMap :: [(String, Int)] -> Term
-makeMap keyvals = Terms.map $ M.fromList $ ((\(k, v) -> (string k, int32 v)) <$> keyvals)
diff --git a/src/test/haskell/Hydra/TestSuiteSpec.hs b/src/test/haskell/Hydra/TestSuiteSpec.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/TestSuiteSpec.hs
+++ /dev/null
@@ -1,130 +0,0 @@
-{-
-stack ghci hydra:lib hydra:hydra-test
-
-Test.Hspec.hspec Hydra.TestSuiteSpec.spec
--}
-
-module Hydra.TestSuiteSpec where
-
-import Hydra.Testing
-import Hydra.Test.TestSuite
-import qualified Hydra.Dsl.Meta.Testing as Testing
-
-import qualified Control.Monad as CM
-import qualified Test.Hspec as H
-import qualified Data.IORef as IORef
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Maybe as Y
-import qualified Data.Time.Clock.POSIX as POSIX
-import qualified System.Environment as Env
-
-
-type TestRunner = String -> TestCaseWithMetadata -> Y.Maybe (H.SpecWith ())
-
-defaultTestRunner :: TestRunner
-defaultTestRunner desc tcase = if Testing.isDisabled tcase
-  then Nothing
-  else Just $ case testCaseWithMetadataCase tcase of
-    TestCaseUniversal (UniversalTestCase actual expected) ->
-      H.it "universal" $ H.shouldBe actual expected
-
-runTestCase :: String -> TestRunner -> TestCaseWithMetadata -> H.SpecWith ()
-runTestCase pdesc runner tcase@(TestCaseWithMetadata name _ mdesc _) =
-  case runner cdesc tcase of
-    Nothing -> return ()
-    Just spec -> H.describe desc spec
-  where
-    desc = name ++ Y.maybe ("") (\d -> ": " ++ d) mdesc
-    cdesc = if L.null pdesc then desc else pdesc ++ ", " ++ desc
-
-runTestGroup :: String -> TestRunner -> TestGroup -> H.SpecWith ()
-runTestGroup pdesc runner tg = H.describe desc $ do
-    CM.mapM (runTestCase cdesc runner) $ testGroupCases tg
-    CM.sequence [runTestGroup cdesc runner sub | sub <- testGroupSubgroups tg]
-    return ()
-  where
-    desc = testGroupName tg ++ descSuffix
-    cdesc = if L.null pdesc then desc else pdesc ++ ", " ++ desc
-    descSuffix = case testGroupDescription tg of
-      Nothing -> ""
-      Just d -> " (" ++ d ++ ")"
-
--- | Timed variant for benchmark output
-runTestGroupTimed :: IORef.IORef (M.Map String Double) -> String -> TestRunner -> TestGroup -> H.SpecWith ()
-runTestGroupTimed timingsRef hydraPath runner tg = do
-    H.describe desc $ do
-      H.runIO $ IORef.modifyIORef' timingsRef (M.insert hydraPath 0)
-      startRef <- H.runIO $ IORef.newIORef (0 :: Double)
-      H.beforeAll_ (recordStart startRef) $ H.afterAll_ (recordStop startRef) $ do
-        CM.mapM (runTestCase cdesc runner) $ testGroupCases tg
-        CM.sequence [runTestGroupTimed timingsRef subPath runner sub
-          | sub <- testGroupSubgroups tg
-          , let subPath = hydraPath ++ "/" ++ testGroupName sub]
-        return ()
-  where
-    desc = testGroupName tg ++ descSuffix
-    cdesc = ""
-    descSuffix = case testGroupDescription tg of
-      Nothing -> ""
-      Just d -> " (" ++ d ++ ")"
-    recordStart startRef = do
-      now <- POSIX.getPOSIXTime
-      IORef.writeIORef startRef (realToFrac now :: Double)
-    recordStop startRef = do
-      startTime <- IORef.readIORef startRef
-      now <- POSIX.getPOSIXTime
-      let elapsedMs = (realToFrac now - startTime) * 1000.0
-      IORef.modifyIORef' timingsRef (M.insert hydraPath elapsedMs)
-
-spec :: H.Spec
-spec = do
-  benchmarkOutput <- H.runIO $ Env.lookupEnv "HYDRA_BENCHMARK_OUTPUT"
-  case benchmarkOutput of
-    Nothing -> runTestGroup "" defaultTestRunner allTests
-    Just outputPath -> do
-      timingsRef <- H.runIO $ IORef.newIORef M.empty
-      let rootPath = testGroupName allTests
-      runTestGroupTimed timingsRef rootPath defaultTestRunner allTests
-      H.afterAll_ (writeBenchmarkJson outputPath timingsRef allTests) $ do
-        H.it "benchmark finalize" $ True `H.shouldBe` True
-
--- | Write benchmark JSON
-writeBenchmarkJson :: String -> IORef.IORef (M.Map String Double) -> TestGroup -> IO ()
-writeBenchmarkJson outputPath timingsRef tg = do
-    timings <- IORef.readIORef timingsRef
-    let json = renderBenchmarkJson timings tg
-    writeFile outputPath json
-
-renderBenchmarkJson :: M.Map String Double -> TestGroup -> String
-renderBenchmarkJson timings tg =
-    "{\n" ++
-    "  \"metadata\": {\n" ++
-    "    \"language\": \"haskell\"\n" ++
-    "  },\n" ++
-    "  \"groups\": [\n" ++
-    renderGroup "    " (testGroupName tg) tg ++ "\n" ++
-    "  ],\n" ++
-    "  \"summary\": {\n" ++
-    "    \"totalPassed\": " ++ show totalPassed ++ ",\n" ++
-    "    \"totalFailed\": 0,\n" ++
-    "    \"totalSkipped\": " ++ show totalSkipped ++ ",\n" ++
-    "    \"totalTimeMs\": " ++ show totalTime ++ "\n" ++
-    "  }\n" ++
-    "}"
-  where
-    totalTime = Y.fromMaybe 0 $ M.lookup (testGroupName tg) timings
-    totalPassed = countCases False tg
-    totalSkipped = countCases True tg
-    countCases wantSkipped g =
-      length [() | c <- testGroupCases g, Testing.isDisabled c == wantSkipped] +
-      sum [countCases wantSkipped sub | sub <- testGroupSubgroups g]
-    renderGroup indent path g =
-      indent ++ "{\n" ++
-      indent ++ "  \"name\": " ++ show (testGroupName g) ++ ",\n" ++
-      indent ++ "  \"time_ms\": " ++ show (Y.fromMaybe 0 $ M.lookup path timings) ++ ",\n" ++
-      indent ++ "  \"subgroups\": [" ++
-      (if null (testGroupSubgroups g) then "]" else
-        "\n" ++ L.intercalate ",\n" [renderGroup (indent ++ "    ") (path ++ "/" ++ testGroupName sub) sub | sub <- testGroupSubgroups g] ++
-        "\n" ++ indent ++ "  ]") ++
-      "\n" ++ indent ++ "}"
diff --git a/src/test/haskell/Hydra/TestUtils.hs b/src/test/haskell/Hydra/TestUtils.hs
deleted file mode 100644
--- a/src/test/haskell/Hydra/TestUtils.hs
+++ /dev/null
@@ -1,234 +0,0 @@
-module Hydra.TestUtils (
-  module Hydra.TestUtils,
-  module Hydra.Sources.Libraries,
-  module Hydra.Test.TestGraph,
-  module Hydra.Test.TestTypes,
-  module Hydra.Test.TestTerms,
-) where
-
-import Hydra.Kernel
-import Hydra.Generation (showError)
-import Hydra.ArbitraryCore()
-import Hydra.Dsl.Bootstrap
-import Hydra.Dsl.Terms
-import qualified Hydra.EvalPrimitives as EvalPrims
-import qualified Hydra.Sources.Kernel.Types.Coders as TypeCoders
-import qualified Hydra.Sources.Kernel.Types.Context as TypeContext
-import qualified Hydra.Sources.Kernel.Types.Core as TypeCore
-import qualified Hydra.Sources.Kernel.Types.Errors as TypeError
-import qualified Hydra.Sources.Kernel.Types.Util as TypeUtil
-import qualified Hydra.Sources.Kernel.Terms.Annotations as TermAnnotations
-import qualified Hydra.Sources.Kernel.Terms.Constants as TermConstants
-import qualified Hydra.Sources.Kernel.Terms.Extract.Core as TermExtractCore
-import qualified Hydra.Sources.Kernel.Terms.Lexical as TermLexical
-import qualified Hydra.Sources.Kernel.Terms.Dependencies as TermDependencies
-import qualified Hydra.Sources.Kernel.Terms.Rewriting as TermRewriting
-import qualified Hydra.Sources.Kernel.Terms.Scoping as TermScoping
-import qualified Hydra.Sources.Kernel.Terms.Strip as TermStrip
-import qualified Hydra.Sources.Kernel.Terms.Variables as TermVariables
-import qualified Hydra.Sources.Kernel.Terms.Show.Core as TermShowCore
-import qualified Hydra.Sources.Decode.Core as TermDecodeCore
-import qualified Hydra.Sources.Encode.Core as TermEncodeCore
-import Hydra.Sources.Kernel.Types.Core
-import Hydra.Sources.Libraries
-import Hydra.Test.TestGraph hiding (testGraph, testContext)
-import Hydra.Test.TestTypes
-import Hydra.Test.TestTerms
-import qualified Hydra.Dsl.Terms as Terms
-import qualified Hydra.Dsl.Types as Types
-import qualified Hydra.Encode.Core as EncodeCore
-import qualified Hydra.Show.Core as ShowCore
-
-import qualified Test.Hspec as H
-import qualified Test.HUnit.Lang as HL
-import qualified Data.List as L
-import qualified Data.Map as M
-import qualified Data.Maybe as Y
-import qualified Data.ByteString.Lazy as BS
-
-
-decodeSchemaTypes :: Graph -> M.Map Name TypeScheme
-decodeSchemaTypes sg = case schemaGraphToTypingEnvironment sg of
-  Left _ -> M.empty
-  Right result -> result
-
-testGraph :: Graph
-testGraph = elementsToGraph hydraCoreGraph (decodeSchemaTypes testSchemaGraph) (kernelTermBindings ++ dataBindings)
-  where
-    -- Include only essential kernel term definitions for interpreter tests.
-    -- The evaluator needs hydra.annotations (and its dependencies).
-    kernelTermBindings = L.concat $ fmap moduleBindings
-      [ TermAnnotations.module_
-      , TermConstants.module_
-      , TermDecodeCore.module_
-      , TermDependencies.module_
-      , TermEncodeCore.module_
-      , TermExtractCore.module_
-      , TermLexical.module_
-      , TermRewriting.module_
-      , TermScoping.module_
-      , TermShowCore.module_
-      , TermStrip.module_
-      , TermVariables.module_
-      ]
-    dataBindings = (\(name, term) -> Binding name term Nothing) <$> M.toList testTerms
-
-testSchemaGraph :: Graph
-testSchemaGraph = elementsToGraph hydraCoreGraph (decodeSchemaTypes hydraCoreGraph)
-    -- Only the kernel type modules that define types referenced by the test suite schema graph:
-    -- CoderDirection (hydra.coders), Coder (hydra.util), and Type/Name/ForallType (hydra.core).
-    (kernelElements ++ testElements)
-  where
-    kernelElements = L.concat $ fmap moduleBindings
-      [ TypeCoders.module_
-      , TypeContext.module_
-      , TypeCore.module_
-      , TypeError.module_
-      , TypeUtil.module_
-      ]
-    testElements = fmap
-      (\(n, t) -> Binding n (EncodeCore.type_ t) $ Just $ Types.mono $ TypeVariable _Type) $ M.toList testTypes
-
-testContext :: Context
-testContext = Context [] [] M.empty
-
-check :: String -> H.SpecWith a -> H.SpecWith a
-check desc = H.describe $ "Check type inference for " <> desc
-
-checkSerdeRoundTrip :: (Context -> Graph -> Type -> Either Error (Coder Term BS.ByteString))
-  -> TypeApplicationTerm -> H.Expectation
-checkSerdeRoundTrip mkSerde (TypeApplicationTerm term typ) = do
-    case mkSerde testContext testGraph typ of
-      Left e -> HL.assertFailure (showError e)
-      Right serde -> do
-        case coderEncode serde testContext term >>= coderDecode serde testContext of
-          Left e -> HL.assertFailure (showError e)
-          Right roundTripped -> deannotateTerm roundTripped `H.shouldBe` deannotateTerm term
-
-checkSerialization :: (Context -> Graph -> Type -> Either Error (Coder Term String))
-  -> TypeApplicationTerm -> String -> H.Expectation
-checkSerialization mkSerdeStr (TypeApplicationTerm term typ) expected = do
-    case mkSerdeStr testContext testGraph typ of
-      Left e -> HL.assertFailure (showError e)
-      Right serde -> shouldSucceedWith
-        (mapError $ fmap normalize $ coderEncode serde testContext term)
-        (normalize expected)
-  where
-    normalize = unlines . L.filter (not . L.null) . lines
-
-eval :: Term -> Either String Term
-eval term = case reduceTerm testContext testGraph True term of
-    Left err -> Left (showError err)
-    Right result -> Right result
-
--- | A test graph where eval-mode primitives replace native ones where available.
--- Eval primitives operate at the term level (building application terms) rather than
--- using native Haskell implementations, testing that the eval approach is correct.
-evalTestGraph :: Graph
-evalTestGraph = elementsToGraph evalCoreGraph (decodeSchemaTypes testSchemaGraph) (kernelTermBindings ++ dataBindings)
-  where
-    kernelTermBindings = L.concat $ fmap moduleBindings
-      [ TermAnnotations.module_
-      , TermConstants.module_
-      , TermDecodeCore.module_
-      , TermDependencies.module_
-      , TermEncodeCore.module_
-      , TermExtractCore.module_
-      , TermLexical.module_
-      , TermRewriting.module_
-      , TermScoping.module_
-      , TermShowCore.module_
-      , TermStrip.module_
-      , TermVariables.module_
-      ]
-    dataBindings = (\(name, term) -> Binding name term Nothing) <$> M.toList testTerms
-
--- | A core graph with eval primitives merged over the standard ones.
--- Standard primitives are kept for functions that don't have eval implementations.
--- Eval primitives override the standard ones where they exist.
-evalCoreGraph :: Graph
-evalCoreGraph = hydraCoreGraph {
-  graphPrimitives = M.union evalPrimMap (graphPrimitives hydraCoreGraph)}
-  where
-    evalPrimMap = M.fromList $ fmap (\p -> (primitiveName p, p))
-      (L.concat (libraryPrimitives <$> EvalPrims.evalLibraries))
-
-evalEval :: Term -> Either String Term
-evalEval term = case reduceTerm testContext evalTestGraph True term of
-    Left err -> Left (showError err)
-    Right result -> Right result
-
-expectEtaExpansionResult :: String -> Term -> Term -> H.SpecWith ()
-expectEtaExpansionResult desc input output = H.it "eta expansion" $ do
-  case etaExpandTypedTerm testContext testGraph input of
-    Left err -> HL.assertFailure (showError err)
-    Right result -> result `H.shouldBe` output
-
-expectFailure :: (a -> String) -> String -> Either String a -> H.Expectation
-expectFailure print desc f = case f of
-    Left _ -> return ()
-    Right v -> HL.assertFailure $ "Failure case succeeded with " ++ print v
-
-expectInferenceFailure :: String -> Term -> H.Expectation
-expectInferenceFailure desc term = case inferTypeOf testContext testGraph term of
-    Left _ -> return ()
-    Right ((_, ts), _) -> HL.assertFailure $ "Expected inference failure but got: " ++ ShowCore.typeScheme ts
-
-expectInferenceResult :: String -> Term -> TypeScheme -> H.SpecWith ()
-expectInferenceResult desc term expected = do
-  case inferTypeOf testContext testGraph term of
-    Left err -> H.runIO (HL.assertFailure (showError err)) >> return ()
-    Right ((iterm, its), _cx') -> do
-      H.it "inferred type" $
-        H.shouldBe (ShowCore.typeScheme its) (ShowCore.typeScheme expected)
-      H.it "inferred term" $
-        H.shouldBe (ShowCore.term $ removeTypesFromTerm iterm) (ShowCore.term $ removeTypesFromTerm term)
-
-expectSuccess :: (Eq a, Show a) => String -> Either String a -> a -> H.Expectation
-expectSuccess desc result x = case result of
-    Left err -> HL.assertFailure err
-    Right y -> y `H.shouldBe` x
-
-expectTypeCheckingResult :: String -> Term -> Term -> Type -> H.SpecWith ()
-expectTypeCheckingResult desc input outputTerm outputType = do
-  case inferTypeOf testContext testGraph input of
-    Left err -> H.runIO (HL.assertFailure (showError err)) >> return ()
-    Right ((iterm, ts), cx1) -> do
-      let itype = typeSchemeToFType ts
-      case typeOf cx1 testGraph [] iterm of
-        Left err2 -> H.runIO (HL.assertFailure (showError err2)) >> return ()
-        Right (rtype, _cx2) -> do
-          H.it "inferred term" $
-            H.shouldBe (ShowCore.term iterm) (ShowCore.term outputTerm)
-          H.it "inferred type" $
-            H.shouldBe (ShowCore.type_ itype) (ShowCore.type_ outputType)
-          H.it "reconstructed type" $
-            H.shouldBe (ShowCore.type_ rtype) (ShowCore.type_ outputType)
-
-makeMap :: [(String, Int)] -> Term
-makeMap keyvals = Terms.map $ M.fromList $ ((\(k, v) -> (Terms.string k, Terms.int32 v)) <$> keyvals)
-
-shouldFail :: Either String a -> H.Expectation
-shouldFail f = H.shouldBe True (either (const True) (const False) f)
-
-shouldSucceed :: Either String a -> H.Expectation
-shouldSucceed f = case f of
-    Left err -> HL.assertFailure err
-    Right _ -> True `H.shouldBe` True
-
-shouldSucceedWith :: (Eq a, Show a) => Either String a -> a -> H.Expectation
-shouldSucceedWith f x = case f of
-    Left err -> HL.assertFailure err
-    Right y -> y `H.shouldBe` x
-
--- | Map an Error to a plain String error (legacy name)
-mapInContextError :: Either Error a -> Either String a
-mapInContextError = mapError
-
-mapError :: Either Error a -> Either String a
-mapError (Left e) = Left (showError e)
-mapError (Right a) = Right a
-
-strip :: Term -> Term
-strip = deannotateTerm
-
diff --git a/src/test/haskell/Spec.hs b/src/test/haskell/Spec.hs
deleted file mode 100644
--- a/src/test/haskell/Spec.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
-{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
